diff --git a/.github/linters/.eslintrc.yml b/.github/linters/.eslintrc.yml index e5babfb..e700637 100644 --- a/.github/linters/.eslintrc.yml +++ b/.github/linters/.eslintrc.yml @@ -35,6 +35,12 @@ extends: - plugin:github/recommended - plugin:jest/recommended +settings: + import/resolver: + typescript: + project: ./tsconfig.json + node: true + rules: { 'camelcase': 'off', @@ -54,7 +60,6 @@ rules: ['error', { 'accessibility': 'no-public' }], '@typescript-eslint/explicit-function-return-type': ['error', { 'allowExpressions': true }], - '@typescript-eslint/func-call-spacing': ['error', 'never'], '@typescript-eslint/no-array-constructor': 'error', '@typescript-eslint/no-empty-interface': 'error', '@typescript-eslint/no-explicit-any': 'error', @@ -79,6 +84,5 @@ rules: '@typescript-eslint/restrict-plus-operands': 'error', '@typescript-eslint/semi': 'off', '@typescript-eslint/space-before-function-paren': 'off', - '@typescript-eslint/type-annotation-spacing': 'error', '@typescript-eslint/unbound-method': 'error', } diff --git a/.tool-versions b/.tool-versions index e8fc3f8..67a6731 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -nodejs 20.18.1 +nodejs 24.15.0 diff --git a/dist/index.js b/dist/index.js index 05a76d2..693ae28 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,125124 +1,68294 @@ -require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ 87351: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url); +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 __require = /* @__PURE__ */ ((x3) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x3, { + get: (a2, b2) => (typeof require !== "undefined" ? require : a2)[b2] +}) : x3)(function(x3) { + if (typeof require !== "undefined") return require.apply(this, arguments); + throw Error('Dynamic require of "' + x3 + '" is not supported'); +}); +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.issue = exports.issueCommand = void 0; -const os = __importStar(__nccwpck_require__(22037)); -const utils_1 = __nccwpck_require__(5278); -/** - * Commands - * - * Command Format: - * ::name key=value,key=value::message - * - * Examples: - * ::warning::This is the message - * ::set-env name=MY_VAR::some value - */ -function issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os.EOL); -} -exports.issueCommand = issueCommand; -function issue(name, message = '') { - issueCommand(name, {}, message); -} -exports.issue = issue; -const CMD_STRING = '::'; -class Command { - constructor(command, properties, message) { +var __commonJS = (cb, mod) => function __require2() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all2) => { + for (var name in all2) + __defProp(target, name, { get: all2[name], enumerable: true }); +}; +var __copyProps = (to2, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to2, key) && key !== except) + __defProp(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to2; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); + +// node_modules/@actions/core/lib/utils.js +var require_utils = __commonJS({ + "node_modules/@actions/core/lib/utils.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.toCommandProperties = exports.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports.toCommandValue = toCommandValue; + 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 + }; + } + exports.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/core/lib/command.js +var require_command = __commonJS({ + "node_modules/@actions/core/lib/command.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + var desc = Object.getOwnPropertyDescriptor(m, k3); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k3]; + } }; + } + Object.defineProperty(o, k22, desc); + }) : (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + o[k22] = m[k3]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v3) { + Object.defineProperty(o, "default", { enumerable: true, value: v3 }); + }) : function(o, v3) { + o["default"] = v3; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.issue = exports.issueCommand = void 0; + var os2 = __importStar(__require("os")); + var utils_1 = require_utils(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os2.EOL); + } + exports.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { if (!command) { - command = 'missing.command'; + command = "missing.command"; } this.command = command; this.properties = properties; this.message = message; - } - toString() { + } + 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 += " "; + 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(s2) { + return (0, utils_1.toCommandValue)(s2).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); } -} -function escapeData(s) { - return (0, utils_1.toCommandValue)(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A'); -} -function escapeProperty(s) { - return (0, utils_1.toCommandValue)(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/:/g, '%3A') - .replace(/,/g, '%2C'); -} -//# sourceMappingURL=command.js.map - -/***/ }), - -/***/ 42186: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __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.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; -const command_1 = __nccwpck_require__(87351); -const file_command_1 = __nccwpck_require__(717); -const utils_1 = __nccwpck_require__(5278); -const os = __importStar(__nccwpck_require__(22037)); -const path = __importStar(__nccwpck_require__(71017)); -const oidc_utils_1 = __nccwpck_require__(98041); -/** - * 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 || (exports.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 = (0, utils_1.toCommandValue)(val); - process.env[name] = convertedVal; - const filePath = process.env['GITHUB_ENV'] || ''; - if (filePath) { - return (0, file_command_1.issueFileCommand)('ENV', (0, file_command_1.prepareKeyValueMessage)(name, val)); - } - (0, command_1.issueCommand)('set-env', { name }, convertedVal); -} -exports.exportVariable = exportVariable; -/** - * Registers a secret which will get masked from logs - * @param secret value of the secret - */ -function setSecret(secret) { - (0, command_1.issueCommand)('add-mask', {}, secret); -} -exports.setSecret = setSecret; -/** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ -function addPath(inputPath) { - const filePath = process.env['GITHUB_PATH'] || ''; - if (filePath) { - (0, file_command_1.issueFileCommand)('PATH', inputPath); - } - else { - (0, command_1.issueCommand)('add-path', {}, inputPath); - } - process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; -} -exports.addPath = addPath; -/** - * 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(); -} -exports.getInput = getInput; -/** - * 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; + function escapeProperty(s2) { + return (0, utils_1.toCommandValue)(s2).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); } - return inputs.map(input => input.trim()); -} -exports.getMultilineInput = getMultilineInput; -/** - * 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\``); -} -exports.getBooleanInput = getBooleanInput; -/** - * 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 (0, file_command_1.issueFileCommand)('OUTPUT', (0, file_command_1.prepareKeyValueMessage)(name, value)); - } - process.stdout.write(os.EOL); - (0, command_1.issueCommand)('set-output', { name }, (0, utils_1.toCommandValue)(value)); -} -exports.setOutput = setOutput; -/** - * 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) { - (0, command_1.issue)('echo', enabled ? 'on' : 'off'); -} -exports.setCommandEcho = setCommandEcho; -//----------------------------------------------------------------------- -// 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); -} -exports.setFailed = setFailed; -//----------------------------------------------------------------------- -// Logging Commands -//----------------------------------------------------------------------- -/** - * Gets whether Actions Step Debug is on or not - */ -function isDebug() { - return process.env['RUNNER_DEBUG'] === '1'; -} -exports.isDebug = isDebug; -/** - * Writes debug message to user log - * @param message debug message - */ -function debug(message) { - (0, command_1.issueCommand)('debug', {}, message); -} -exports.debug = debug; -/** - * 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 = {}) { - (0, command_1.issueCommand)('error', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); -} -exports.error = error; -/** - * 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 = {}) { - (0, command_1.issueCommand)('warning', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); -} -exports.warning = warning; -/** - * 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 = {}) { - (0, command_1.issueCommand)('notice', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); -} -exports.notice = notice; -/** - * Writes info to log with console.log. - * @param message info message - */ -function info(message) { - process.stdout.write(message + os.EOL); -} -exports.info = info; -/** - * 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) { - (0, command_1.issue)('group', name); -} -exports.startGroup = startGroup; -/** - * End an output group. - */ -function endGroup() { - (0, command_1.issue)('endgroup'); -} -exports.endGroup = 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 __awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } - finally { - endGroup(); - } - return result; - }); -} -exports.group = group; -//----------------------------------------------------------------------- -// 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 (0, file_command_1.issueFileCommand)('STATE', (0, file_command_1.prepareKeyValueMessage)(name, value)); - } - (0, command_1.issueCommand)('save-state', { name }, (0, utils_1.toCommandValue)(value)); -} -exports.saveState = saveState; -/** - * 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}`] || ''; -} -exports.getState = getState; -function getIDToken(aud) { - return __awaiter(this, void 0, void 0, function* () { - return yield oidc_utils_1.OidcClient.getIDToken(aud); + } +}); + +// node_modules/@actions/core/lib/file-command.js +var require_file_command = __commonJS({ + "node_modules/@actions/core/lib/file-command.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + var desc = Object.getOwnPropertyDescriptor(m, k3); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k3]; + } }; + } + Object.defineProperty(o, k22, desc); + }) : (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + o[k22] = m[k3]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v3) { + Object.defineProperty(o, "default", { enumerable: true, value: v3 }); + }) : function(o, v3) { + o["default"] = v3; }); -} -exports.getIDToken = getIDToken; -/** - * Summary exports - */ -var summary_1 = __nccwpck_require__(81327); -Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); -/** - * @deprecated use core.summary - */ -var summary_2 = __nccwpck_require__(81327); -Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); -/** - * Path exports - */ -var path_utils_1 = __nccwpck_require__(2981); -Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); -Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); -Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); -/** - * Platform utilities exports - */ -exports.platform = __importStar(__nccwpck_require__(85243)); -//# sourceMappingURL=core.js.map - -/***/ }), - -/***/ 717: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -// For internal use, subject to change. -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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ -const crypto = __importStar(__nccwpck_require__(6113)); -const fs = __importStar(__nccwpck_require__(57147)); -const os = __importStar(__nccwpck_require__(22037)); -const utils_1 = __nccwpck_require__(5278); -function issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; + var crypto = __importStar(__require("crypto")); + var fs9 = __importStar(__require("fs")); + var os2 = __importStar(__require("os")); + var utils_1 = require_utils(); + 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)) { + } + if (!fs9.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); + } + fs9.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os2.EOL}`, { + encoding: "utf8" + }); } - fs.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { - encoding: 'utf8' - }); -} -exports.issueFileCommand = issueFileCommand; -function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; - const convertedValue = (0, utils_1.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)) { + exports.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - } - if (convertedValue.includes(delimiter)) { + } + if (convertedValue.includes(delimiter)) { throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } - return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; -} -exports.prepareKeyValueMessage = prepareKeyValueMessage; -//# sourceMappingURL=file-command.js.map - -/***/ }), - -/***/ 98041: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; + exports.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); -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.OidcClient = void 0; -const http_client_1 = __nccwpck_require__(96255); -const auth_1 = __nccwpck_require__(35526); -const core_1 = __nccwpck_require__(42186); -class OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(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'); +// node_modules/@actions/http-client/lib/proxy.js +var require_proxy = __commonJS({ + "node_modules/@actions/http-client/lib/proxy.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.checkBypass = exports.getProxyUrl = void 0; + function getProxyUrl2(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; } - 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'); + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); } - return runtimeUrl; + } else { + return void 0; + } } - static getCall(id_token_url) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - const httpclient = 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; - }); + exports.getProxyUrl = getProxyUrl2; + 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((x3) => x3.trim().toUpperCase()).filter((x3) => x3)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x3) => x3 === upperNoProxyItem || x3.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x3.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; } - static getIDToken(audience) { - return __awaiter(this, void 0, void 0, function* () { - try { - // New ID Token is requested from action service - let id_token_url = OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - (0, core_1.debug)(`ID token url is ${id_token_url}`); - const id_token = yield OidcClient.getCall(id_token_url); - (0, core_1.setSecret)(id_token); - return id_token; - } - catch (error) { - throw new Error(`Error message: ${error.message}`); - } - }); + exports.checkBypass = checkBypass; + 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]"); } -} -exports.OidcClient = OidcClient; -//# sourceMappingURL=oidc-utils.js.map - -/***/ }), - -/***/ 2981: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; -const path = __importStar(__nccwpck_require__(71017)); -/** - * 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, '/'); -} -exports.toPosixPath = toPosixPath; -/** - * 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, '\\'); -} -exports.toWin32Path = toWin32Path; -/** - * 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); -} -exports.toPlatformPath = toPlatformPath; -//# sourceMappingURL=path-utils.js.map - -/***/ }), - -/***/ 85243: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __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()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getDetails = exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0; -const os_1 = __importDefault(__nccwpck_require__(22037)); -const exec = __importStar(__nccwpck_require__(71514)); -const getWindowsInfo = () => __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 = () => __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 = () => __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 + var DecodedURL = class extends URL { + constructor(url3, base) { + super(url3, base); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } }; + } }); -exports.platform = os_1.default.platform(); -exports.arch = os_1.default.arch(); -exports.isWindows = exports.platform === 'win32'; -exports.isMacOS = exports.platform === 'darwin'; -exports.isLinux = exports.platform === 'linux'; -function getDetails() { - return __awaiter(this, void 0, void 0, function* () { - return Object.assign(Object.assign({}, (yield (exports.isWindows - ? getWindowsInfo() - : exports.isMacOS - ? getMacOsInfo() - : getLinuxInfo()))), { platform: exports.platform, - arch: exports.arch, - isWindows: exports.isWindows, - isMacOS: exports.isMacOS, - isLinux: exports.isLinux }); - }); -} -exports.getDetails = getDetails; -//# sourceMappingURL=platform.js.map - -/***/ }), -/***/ 81327: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; -const os_1 = __nccwpck_require__(22037); -const fs_1 = __nccwpck_require__(57147); -const { access, appendFile, writeFile } = fs_1.promises; -exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; -exports.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 __awaiter(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; - } - const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - } - try { - yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.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}>`; +// node_modules/tunnel/lib/tunnel.js +var require_tunnel = __commonJS({ + "node_modules/tunnel/lib/tunnel.js"(exports) { + "use strict"; + var net = __require("net"); + var tls = __require("tls"); + var http = __require("http"); + var https = __require("https"); + var events = __require("events"); + var assert = __require("assert"); + var util = __require("util"); + exports.httpOverHttp = httpOverHttp; + exports.httpsOverHttp = httpsOverHttp; + exports.httpOverHttps = httpOverHttps; + exports.httpsOverHttps = httpsOverHttps; + function httpOverHttp(options2) { + var agent = new TunnelingAgent(options2); + agent.request = http.request; + return agent; + } + function httpsOverHttp(options2) { + var agent = new TunnelingAgent(options2); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } + function httpOverHttps(options2) { + var agent = new TunnelingAgent(options2); + agent.request = https.request; + return agent; + } + function httpsOverHttps(options2) { + var agent = new TunnelingAgent(options2); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } + function TunnelingAgent(options2) { + var self = this; + self.options = options2 || {}; + 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 options3 = toOptions(host, port, localAddress); + for (var i2 = 0, len = self.requests.length; i2 < len; ++i2) { + var pending = self.requests[i2]; + if (pending.host === options3.host && pending.port === options3.port) { + self.requests.splice(i2, 1); + pending.request.onSocket(socket); + return; + } } - return `<${tag}${htmlAttrs}>${content}`; + socket.destroy(); + self.removeSocket(socket); + }); } - /** - * 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(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(); + util.inherits(TunnelingAgent, events.EventEmitter); + TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options2 = mergeOptions({ request: req }, self.options, toOptions(host, port, localAddress)); + if (self.sockets.length >= this.maxSockets) { + self.requests.push(options2); + return; + } + self.createSocket(options2, function(socket) { + socket.on("free", onFree); + socket.on("close", onCloseOrRemove); + socket.on("agentRemove", onCloseOrRemove); + req.onSocket(socket); + function onFree() { + self.emit("free", socket, options2); + } + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener("free", onFree); + socket.removeListener("close", onCloseOrRemove); + socket.removeListener("agentRemove", onCloseOrRemove); + } + }); + }; + TunnelingAgent.prototype.createSocket = function createSocket(options2, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: "CONNECT", + path: options2.host + ":" + options2.port, + agent: false, + headers: { + host: options2.host + ":" + options2.port + } + }); + if (options2.localAddress) { + connectOptions.localAddress = options2.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); }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return __awaiter(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); + } + 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 error2 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error2.code = "ECONNRESET"; + options2.request.emit("error", error2); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug("got illegal response body from proxy"); + socket.destroy(); + var error2 = new Error("got illegal response body from proxy"); + error2.code = "ECONNRESET"; + options2.request.emit("error", error2); + 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 error2 = new Error("tunneling socket could not be established, cause=" + cause.message); + error2.code = "ECONNRESET"; + options2.request.emit("error", error2); + 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(socket2) { + pending.request.onSocket(socket2); }); + } + }; + function createSecureSocket(options2, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options2, function(socket) { + var hostHeader = options2.request.getHeader("host"); + var tlsOptions = mergeOptions({}, self.options, { + socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options2.host + }); + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); } - /** - * 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; + function toOptions(host, port, localAddress) { + if (typeof host === "string") { + return { + host, + port, + localAddress + }; + } + return host; } - /** - * 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(os_1.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` - */ -exports.markdownSummary = _summary; -exports.summary = _summary; -//# sourceMappingURL=summary.js.map - -/***/ }), - -/***/ 5278: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toCommandProperties = exports.toCommandValue = void 0; -/** - * 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 === undefined) { - return ''; - } - else if (typeof input === 'string' || input instanceof String) { - return input; - } - return JSON.stringify(input); -} -exports.toCommandValue = toCommandValue; -/** - * - * @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 - }; -} -exports.toCommandProperties = toCommandProperties; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 71514: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __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.getExecOutput = exports.exec = void 0; -const string_decoder_1 = __nccwpck_require__(71576); -const tr = __importStar(__nccwpck_require__(88159)); -/** - * 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(commandLine, args, options) { - return __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(); - }); -} -exports.exec = 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) { - var _a, _b; - return __awaiter(this, void 0, void 0, function* () { - let stdout = ''; - let stderr = ''; - //Using string decoder covers the case where a mult-byte character is split - const stdoutDecoder = new string_decoder_1.StringDecoder('utf8'); - const stderrDecoder = new string_decoder_1.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(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); - //flush any remaining characters - stdout += stdoutDecoder.end(); - stderr += stderrDecoder.end(); - return { - exitCode, - stdout, - stderr - }; - }); -} -exports.getExecOutput = getExecOutput; -//# sourceMappingURL=exec.js.map - -/***/ }), - -/***/ 88159: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __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.argStringToArray = exports.ToolRunner = void 0; -const os = __importStar(__nccwpck_require__(22037)); -const events = __importStar(__nccwpck_require__(82361)); -const child = __importStar(__nccwpck_require__(32081)); -const path = __importStar(__nccwpck_require__(71017)); -const io = __importStar(__nccwpck_require__(47351)); -const ioUtil = __importStar(__nccwpck_require__(81962)); -const timers_1 = __nccwpck_require__(39512); -/* eslint-disable @typescript-eslint/unbound-method */ -const IS_WINDOWS = process.platform === 'win32'; -/* - * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way. - */ -class ToolRunner extends 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 (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(os.EOL); - while (n > -1) { - const line = s.substring(0, n); - onLine(line); - // the rest of the string ... - s = s.substring(n + os.EOL.length); - n = s.indexOf(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 (IS_WINDOWS) { - if (this._isCmdFile()) { - return process.env['COMSPEC'] || 'cmd.exe'; - } - } - return this.toolPath; - } - _getSpawnArgs(options) { - if (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; + function mergeOptions(target) { + for (var i2 = 1, len = arguments.length; i2 < len; ++i2) { + var overrides = arguments[i2]; + if (typeof overrides === "object") { + var keys = Object.keys(overrides); + for (var j3 = 0, keyLen = keys.length; j3 < keyLen; ++j3) { + var k3 = keys[j3]; + if (overrides[k3] !== void 0) { + target[k3] = overrides[k3]; } + } } - 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; + } + return target; } - _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}"`; + 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:"); } - 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 __awaiter(this, void 0, void 0, function* () { - // root the tool path if it is unrooted and contains relative pathing - if (!ioUtil.isRooted(this.toolPath) && - (this.toolPath.includes('/') || - (IS_WINDOWS && this.toolPath.includes('\\')))) { - // prefer options.cwd if it is specified, however options.cwd may also need to be rooted - this.toolPath = 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 io.which(this.toolPath, true); - return new Promise((resolve, reject) => __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) + os.EOL); - } - const state = new ExecState(optionsNonNull, this.toolPath); - state.on('debug', (message) => { - this._debug(message); - }); - if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { - return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); - } - const fileName = this._getSpawnFileName(); - const cp = child.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); - } - })); - }); - } -} -exports.ToolRunner = ToolRunner; -/** - * 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; + console.error.apply(console, args); + }; + } else { + debug = function() { + }; } - 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; + exports.debug = debug; + } +}); + +// node_modules/tunnel/index.js +var require_tunnel2 = __commonJS({ + "node_modules/tunnel/index.js"(exports, module3) { + module3.exports = require_tunnel(); + } +}); + +// node_modules/undici/lib/core/symbols.js +var require_symbols = __commonJS({ + "node_modules/undici/lib/core/symbols.js"(exports, module3) { + "use strict"; + module3.exports = { + kClose: /* @__PURE__ */ Symbol("close"), + kDestroy: /* @__PURE__ */ Symbol("destroy"), + kDispatch: /* @__PURE__ */ Symbol("dispatch"), + kUrl: /* @__PURE__ */ Symbol("url"), + kWriting: /* @__PURE__ */ Symbol("writing"), + kResuming: /* @__PURE__ */ Symbol("resuming"), + kQueue: /* @__PURE__ */ Symbol("queue"), + kConnect: /* @__PURE__ */ Symbol("connect"), + kConnecting: /* @__PURE__ */ Symbol("connecting"), + kKeepAliveDefaultTimeout: /* @__PURE__ */ Symbol("default keep alive timeout"), + kKeepAliveMaxTimeout: /* @__PURE__ */ Symbol("max keep alive timeout"), + kKeepAliveTimeoutThreshold: /* @__PURE__ */ Symbol("keep alive timeout threshold"), + kKeepAliveTimeoutValue: /* @__PURE__ */ Symbol("keep alive timeout"), + kKeepAlive: /* @__PURE__ */ Symbol("keep alive"), + kHeadersTimeout: /* @__PURE__ */ Symbol("headers timeout"), + kBodyTimeout: /* @__PURE__ */ Symbol("body timeout"), + kServerName: /* @__PURE__ */ Symbol("server name"), + kLocalAddress: /* @__PURE__ */ Symbol("local address"), + kHost: /* @__PURE__ */ Symbol("host"), + kNoRef: /* @__PURE__ */ Symbol("no ref"), + kBodyUsed: /* @__PURE__ */ Symbol("used"), + kBody: /* @__PURE__ */ Symbol("abstracted request body"), + kRunning: /* @__PURE__ */ Symbol("running"), + kBlocking: /* @__PURE__ */ Symbol("blocking"), + kPending: /* @__PURE__ */ Symbol("pending"), + kSize: /* @__PURE__ */ Symbol("size"), + kBusy: /* @__PURE__ */ Symbol("busy"), + kQueued: /* @__PURE__ */ Symbol("queued"), + kFree: /* @__PURE__ */ Symbol("free"), + kConnected: /* @__PURE__ */ Symbol("connected"), + kClosed: /* @__PURE__ */ Symbol("closed"), + kNeedDrain: /* @__PURE__ */ Symbol("need drain"), + kReset: /* @__PURE__ */ Symbol("reset"), + kDestroyed: /* @__PURE__ */ Symbol.for("nodejs.stream.destroyed"), + kResume: /* @__PURE__ */ Symbol("resume"), + kOnError: /* @__PURE__ */ Symbol("on error"), + kMaxHeadersSize: /* @__PURE__ */ Symbol("max headers size"), + kRunningIdx: /* @__PURE__ */ Symbol("running index"), + kPendingIdx: /* @__PURE__ */ Symbol("pending index"), + kError: /* @__PURE__ */ Symbol("error"), + kClients: /* @__PURE__ */ Symbol("clients"), + kClient: /* @__PURE__ */ Symbol("client"), + kParser: /* @__PURE__ */ Symbol("parser"), + kOnDestroyed: /* @__PURE__ */ Symbol("destroy callbacks"), + kPipelining: /* @__PURE__ */ Symbol("pipelining"), + kSocket: /* @__PURE__ */ Symbol("socket"), + kHostHeader: /* @__PURE__ */ Symbol("host header"), + kConnector: /* @__PURE__ */ Symbol("connector"), + kStrictContentLength: /* @__PURE__ */ Symbol("strict content length"), + kMaxRedirections: /* @__PURE__ */ Symbol("maxRedirections"), + kMaxRequests: /* @__PURE__ */ Symbol("maxRequestsPerClient"), + kProxy: /* @__PURE__ */ Symbol("proxy agent options"), + kCounter: /* @__PURE__ */ Symbol("socket request counter"), + kMaxResponseSize: /* @__PURE__ */ Symbol("max response size"), + kHTTP2Session: /* @__PURE__ */ Symbol("http2Session"), + kHTTP2SessionState: /* @__PURE__ */ Symbol("http2Session state"), + kRetryHandlerDefaultRetry: /* @__PURE__ */ Symbol("retry agent default retry"), + kConstruct: /* @__PURE__ */ Symbol("constructable"), + kListeners: /* @__PURE__ */ Symbol("listeners"), + kHTTPContext: /* @__PURE__ */ Symbol("http context"), + kMaxConcurrentStreams: /* @__PURE__ */ Symbol("max concurrent streams"), + kHTTP2InitialWindowSize: /* @__PURE__ */ Symbol("http2 initial window size"), + kHTTP2ConnectionWindowSize: /* @__PURE__ */ Symbol("http2 connection window size"), + kEnableConnectProtocol: /* @__PURE__ */ Symbol("http2session connect protocol"), + kRemoteSettings: /* @__PURE__ */ Symbol("http2session remote settings"), + kHTTP2Stream: /* @__PURE__ */ Symbol("http2session client stream"), + kPingInterval: /* @__PURE__ */ Symbol("ping interval"), + kNoProxyAgent: /* @__PURE__ */ Symbol("no proxy agent"), + kHttpProxyAgent: /* @__PURE__ */ Symbol("http proxy agent"), + kHttpsProxyAgent: /* @__PURE__ */ Symbol("https proxy agent"), + kSocks5ProxyAgent: /* @__PURE__ */ Symbol("socks5 proxy agent") + }; + } +}); + +// node_modules/undici/lib/util/timers.js +var require_timers = __commonJS({ + "node_modules/undici/lib/util/timers.js"(exports, module3) { + "use strict"; + var fastNow = 0; + var RESOLUTION_MS = 1e3; + var TICK_MS = (RESOLUTION_MS >> 1) - 1; + var fastNowTimeout; + var kFastTimer = /* @__PURE__ */ Symbol("kFastTimer"); + var fastTimers = []; + var NOT_IN_LIST = -2; + var TO_BE_CLEARED = -1; + var PENDING = 0; + var ACTIVE = 1; + function onTick() { + fastNow += TICK_MS; + let idx = 0; + let len = fastTimers.length; + while (idx < len) { + 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; } - append(c); - } - if (arg.length > 0) { - args.push(arg.trim()); + } + fastTimers.length = len; + if (fastTimers.length !== 0) { + refreshTimeout(); + } } - return args; -} -exports.argStringToArray = argStringToArray; -class ExecState extends 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; - } + function refreshTimeout() { + if (fastNowTimeout?.refresh) { + fastNowTimeout.refresh(); + } else { + clearTimeout(fastNowTimeout); + fastNowTimeout = setTimeout(onTick, TICK_MS); + fastNowTimeout?.unref(); + } } - CheckComplete() { - if (this.done) { - return; - } - if (this.processClosed) { - this._setResult(); - } - else if (this.processExited) { - this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this); + 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); } - } - _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`); - } + if (!fastNowTimeout || fastTimers.length === 1) { + refreshTimeout(); } - // clear the timeout - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; + 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; + } + }; + module3.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]) { + timeout.clear(); + } else { + clearTimeout(timeout); } - 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 - -/***/ }), + }, + /** + * 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 + }; + } +}); -/***/ 74087: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +// node_modules/undici/lib/core/errors.js +var require_errors = __commonJS({ + "node_modules/undici/lib/core/errors.js"(exports, module3) { + "use strict"; + var kUndiciError = /* @__PURE__ */ Symbol.for("undici.error.UND_ERR"); + var UndiciError = class extends Error { + constructor(message, options2) { + super(message, options2); + this.name = "UndiciError"; + this.code = "UND_ERR"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kUndiciError] === true; + } + get [kUndiciError]() { + return true; + } + }; + var kConnectTimeoutError = /* @__PURE__ */ 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; + } + get [kConnectTimeoutError]() { + return true; + } + }; + var kHeadersTimeoutError = /* @__PURE__ */ 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; + } + get [kHeadersTimeoutError]() { + return true; + } + }; + var kHeadersOverflowError = /* @__PURE__ */ 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; + } + get [kHeadersOverflowError]() { + return true; + } + }; + var kBodyTimeoutError = /* @__PURE__ */ 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; + } + get [kBodyTimeoutError]() { + return true; + } + }; + var kInvalidArgumentError = /* @__PURE__ */ 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; + } + get [kInvalidArgumentError]() { + return true; + } + }; + var kInvalidReturnValueError = /* @__PURE__ */ 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; + } + get [kInvalidReturnValueError]() { + return true; + } + }; + var kAbortError = /* @__PURE__ */ 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; + } + get [kAbortError]() { + return true; + } + }; + var kRequestAbortedError = /* @__PURE__ */ 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; + } + get [kRequestAbortedError]() { + return true; + } + }; + var kInformationalError = /* @__PURE__ */ 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; + } + get [kInformationalError]() { + return true; + } + }; + var kRequestContentLengthMismatchError = /* @__PURE__ */ 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; + } + get [kRequestContentLengthMismatchError]() { + return true; + } + }; + var kResponseContentLengthMismatchError = /* @__PURE__ */ 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; + } + get [kResponseContentLengthMismatchError]() { + return true; + } + }; + var kClientDestroyedError = /* @__PURE__ */ 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; + } + get [kClientDestroyedError]() { + return true; + } + }; + var kClientClosedError = /* @__PURE__ */ 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; + } + get [kClientClosedError]() { + return true; + } + }; + var kSocketError = /* @__PURE__ */ 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; + } + get [kSocketError]() { + return true; + } + }; + var kNotSupportedError = /* @__PURE__ */ 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; + } + get [kNotSupportedError]() { + return true; + } + }; + var kBalancedPoolMissingUpstreamError = /* @__PURE__ */ 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; + } + get [kBalancedPoolMissingUpstreamError]() { + return true; + } + }; + var kHTTPParserError = /* @__PURE__ */ 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; + } + get [kHTTPParserError]() { + return true; + } + }; + var kResponseExceededMaxSizeError = /* @__PURE__ */ 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; + } + get [kResponseExceededMaxSizeError]() { + return true; + } + }; + var kRequestRetryError = /* @__PURE__ */ 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; + } + get [kRequestRetryError]() { + return true; + } + }; + var kResponseError = /* @__PURE__ */ Symbol.for("undici.error.UND_ERR_RESPONSE"); + var ResponseError = class extends UndiciError { + constructor(message, code, { headers, body }) { + super(message); + this.name = "ResponseError"; + this.message = message || "Response error"; + this.code = "UND_ERR_RESPONSE"; + this.statusCode = code; + this.body = body; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseError] === true; + } + get [kResponseError]() { + return true; + } + }; + var kSecureProxyConnectionError = /* @__PURE__ */ Symbol.for("undici.error.UND_ERR_PRX_TLS"); + var SecureProxyConnectionError = class extends UndiciError { + constructor(cause, message, options2 = {}) { + super(message, { cause, ...options2 }); + 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; + } + get [kSecureProxyConnectionError]() { + return true; + } + }; + var kMaxOriginsReachedError = /* @__PURE__ */ Symbol.for("undici.error.UND_ERR_MAX_ORIGINS_REACHED"); + var MaxOriginsReachedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "MaxOriginsReachedError"; + this.message = message || "Maximum allowed origins reached"; + this.code = "UND_ERR_MAX_ORIGINS_REACHED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kMaxOriginsReachedError] === true; + } + get [kMaxOriginsReachedError]() { + return true; + } + }; + var Socks5ProxyError = class extends UndiciError { + constructor(message, code) { + super(message); + this.name = "Socks5ProxyError"; + this.message = message || "SOCKS5 proxy error"; + this.code = code || "UND_ERR_SOCKS5"; + } + }; + var kMessageSizeExceededError = /* @__PURE__ */ 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; + } + }; + module3.exports = { + AbortError, + HTTPParserError, + UndiciError, + HeadersTimeoutError, + HeadersOverflowError, + BodyTimeoutError, + RequestContentLengthMismatchError, + ConnectTimeoutError, + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + ClientDestroyedError, + ClientClosedError, + InformationalError, + SocketError, + NotSupportedError, + ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError, + ResponseError, + SecureProxyConnectionError, + MaxOriginsReachedError, + Socks5ProxyError, + MessageSizeExceededError + }; + } +}); -"use strict"; +// node_modules/undici/lib/core/constants.js +var require_constants = __commonJS({ + "node_modules/undici/lib/core/constants.js"(exports, module3) { + "use strict"; + var wellknownHeaderNames = ( + /** @type {const} */ + [ + "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" + ] + ); + var headerNameLowerCasedRecord = {}; + Object.setPrototypeOf(headerNameLowerCasedRecord, null); + var wellknownHeaderNameBuffers = {}; + Object.setPrototypeOf(wellknownHeaderNameBuffers, null); + function getHeaderNameAsBuffer(header) { + let buffer = wellknownHeaderNameBuffers[header]; + if (buffer === void 0) { + buffer = Buffer.from(header); + } + return buffer; + } + for (let i2 = 0; i2 < wellknownHeaderNames.length; ++i2) { + const key = wellknownHeaderNames[i2]; + const lowerCasedKey = key.toLowerCase(); + headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; + } + module3.exports = { + wellknownHeaderNames, + headerNameLowerCasedRecord, + getHeaderNameAsBuffer + }; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Context = void 0; -const fs_1 = __nccwpck_require__(57147); -const os_1 = __nccwpck_require__(22037); -class Context { - /** - * Hydrate the context from the environment - */ - constructor() { - var _a, _b, _c; - this.payload = {}; - if (process.env.GITHUB_EVENT_PATH) { - if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { - this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); +// node_modules/undici/lib/core/tree.js +var require_tree = __commonJS({ + "node_modules/undici/lib/core/tree.js"(exports, module3) { + "use strict"; + var { + wellknownHeaderNames, + headerNameLowerCasedRecord + } = require_constants(); + 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"); + } + const code = this.code = key.charCodeAt(index); + if (code > 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 + * @returns {void} + */ + 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 { - const path = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`); + } 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; + } } - 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.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 }); + } + /** + * @param {Uint8Array} key + * @returns {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 + * @returns {void} + * */ + insert(key, value) { + if (this.node === null) { + this.node = new TstNode(key, value, 0); + } else { + this.node.add(key, value); + } + } + /** + * @param {Uint8Array} key + * @returns {any} + */ + lookup(key) { + return this.node?.search(key)?.value ?? null; + } + }; + var tree = new TernarySearchTree(); + for (let i2 = 0; i2 < wellknownHeaderNames.length; ++i2) { + const key = headerNameLowerCasedRecord[wellknownHeaderNames[i2]]; + tree.insert(key, key); + } + module3.exports = { + TernarySearchTree, + tree + }; + } +}); + +// node_modules/undici/lib/core/util.js +var require_util = __commonJS({ + "node_modules/undici/lib/core/util.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols(); + var { IncomingMessage } = __require("node:http"); + var stream = __require("node:stream"); + var net = __require("node:net"); + var { stringify } = __require("node:querystring"); + var { EventEmitter: EE } = __require("node:events"); + var timers = require_timers(); + var { InvalidArgumentError, ConnectTimeoutError } = require_errors(); + var { headerNameLowerCasedRecord } = require_constants(); + var { tree } = require_tree(); + var [nodeMajor, nodeMinor] = process.versions.node.split(".", 2).map((v3) => Number(v3)); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + function noop() { } - get repo() { - if (process.env.GITHUB_REPOSITORY) { - const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); - return { owner, repo }; + function wrapRequestBody(body) { + if (isStream(body)) { + if (bodyLength(body) === 0) { + body.on("data", function() { + assert(false); + }); } - if (this.payload.repository) { - return { - owner: this.payload.repository.owner.login, - repo: this.payload.repository.name - }; + if (typeof body.readableDidRead !== "boolean") { + body[kBodyUsed] = false; + EE.prototype.on.call(body, "data", function() { + this[kBodyUsed] = true; + }); } - throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'"); + return body; + } else if (body && typeof body.pipeTo === "function") { + return new BodyAsyncIterable(body); + } else if (body && isFormDataLike(body)) { + return body; + } else if (body && typeof body !== "string" && !ArrayBuffer.isView(body) && isIterable(body)) { + return new BodyAsyncIterable(body); + } else { + return body; + } } -} -exports.Context = Context; -//# sourceMappingURL=context.js.map - -/***/ }), - -/***/ 95438: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getOctokit = exports.context = void 0; -const Context = __importStar(__nccwpck_require__(74087)); -const utils_1 = __nccwpck_require__(73030); -exports.context = new Context.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 = utils_1.GitHub.plugin(...additionalPlugins); - return new GitHubWithPlugins((0, utils_1.getOctokitOptions)(token, options)); -} -exports.getOctokit = getOctokit; -//# sourceMappingURL=github.js.map - -/***/ }), - -/***/ 47914: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __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.getApiBaseUrl = exports.getProxyFetch = exports.getProxyAgentDispatcher = exports.getProxyAgent = exports.getAuthString = void 0; -const httpClient = __importStar(__nccwpck_require__(96255)); -const undici_1 = __nccwpck_require__(41773); -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}`; -} -exports.getAuthString = getAuthString; -function getProxyAgent(destinationUrl) { - const hc = new httpClient.HttpClient(); - return hc.getAgent(destinationUrl); -} -exports.getProxyAgent = getProxyAgent; -function getProxyAgentDispatcher(destinationUrl) { - const hc = new httpClient.HttpClient(); - return hc.getAgentDispatcher(destinationUrl); -} -exports.getProxyAgentDispatcher = getProxyAgentDispatcher; -function getProxyFetch(destinationUrl) { - const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url, opts) => __awaiter(this, void 0, void 0, function* () { - return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); - }); - return proxyFetch; -} -exports.getProxyFetch = getProxyFetch; -function getApiBaseUrl() { - return process.env['GITHUB_API_URL'] || 'https://api.github.com'; -} -exports.getApiBaseUrl = getApiBaseUrl; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 73030: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0; -const Context = __importStar(__nccwpck_require__(74087)); -const Utils = __importStar(__nccwpck_require__(47914)); -// octokit + plugins -const core_1 = __nccwpck_require__(76762); -const plugin_rest_endpoint_methods_1 = __nccwpck_require__(83044); -const plugin_paginate_rest_1 = __nccwpck_require__(64193); -exports.context = new Context.Context(); -const baseUrl = Utils.getApiBaseUrl(); -exports.defaults = { - baseUrl, - request: { - agent: Utils.getProxyAgent(baseUrl), - fetch: Utils.getProxyFetch(baseUrl) - } -}; -exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.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 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; + function isStream(obj) { + return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; } - return opts; -} -exports.getOctokitOptions = getOctokitOptions; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 35526: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - -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.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; -class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; + 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"); + } } - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; + function pathHasQueryOrFragment(url3) { + return url3.includes("?") || url3.includes("#"); } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; + function serializePathWithQuery(url3, queryParams) { + if (pathHasQueryOrFragment(url3)) { + throw new Error('Query params cannot be passed when url already contains "?" or "#".'); + } + const stringified = stringify(queryParams); + if (stringified) { + url3 += "?" + stringified; + } + return url3; } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); + function isValidPort(port) { + const value = parseInt(port, 10); + return value === Number(port) && value >= 0 && value <= 65535; } -} -exports.BasicCredentialHandler = BasicCredentialHandler; -class BearerCredentialHandler { - constructor(token) { - this.token = token; + 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] === ":"); } - // 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'); + function parseURL(url3) { + if (typeof url3 === "string") { + url3 = new URL(url3); + if (!isHttpOrHttpsPrefixed(url3.origin || url3.protocol)) { + throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + } + return url3; + } + if (!url3 || typeof url3 !== "object") { + throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); + } + if (!(url3 instanceof URL)) { + if (url3.port != null && url3.port !== "" && isValidPort(url3.port) === false) { + throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); + } + if (url3.path != null && typeof url3.path !== "string") { + throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); + } + if (url3.pathname != null && typeof url3.pathname !== "string") { + throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); } - options.headers['Authorization'] = `Bearer ${this.token}`; + if (url3.hostname != null && typeof url3.hostname !== "string") { + throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); + } + if (url3.origin != null && typeof url3.origin !== "string") { + throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); + } + if (!isHttpOrHttpsPrefixed(url3.origin || url3.protocol)) { + throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + } + const port = url3.port != null ? url3.port : url3.protocol === "https:" ? 443 : 80; + let origin = url3.origin != null ? url3.origin : `${url3.protocol || ""}//${url3.hostname || ""}:${port}`; + let path13 = url3.path != null ? url3.path : `${url3.pathname || ""}${url3.search || ""}`; + if (origin[origin.length - 1] === "/") { + origin = origin.slice(0, origin.length - 1); + } + if (path13 && path13[0] !== "/") { + path13 = `/${path13}`; + } + return new URL(`${origin}${path13}`); + } + if (!isHttpOrHttpsPrefixed(url3.origin || url3.protocol)) { + throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + } + return url3; } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; + function parseOrigin(url3) { + url3 = parseURL(url3); + if (url3.pathname !== "/" || url3.search || url3.hash) { + throw new InvalidArgumentError("invalid url"); + } + return url3; } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); + function getHostname(host) { + if (host[0] === "[") { + const idx2 = host.indexOf("]"); + assert(idx2 !== -1); + return host.substring(1, idx2); + } + const idx = host.indexOf(":"); + if (idx === -1) return host; + return host.substring(0, idx); } -} -exports.BearerCredentialHandler = BearerCredentialHandler; -class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; + function getServerName(host) { + if (!host) { + return null; + } + assert(typeof host === "string"); + const servername = getHostname(host); + if (net.isIP(servername)) { + return ""; + } + return servername; } - // 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')}`; + function deepClone(obj) { + return JSON.parse(JSON.stringify(obj)); } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; + function isAsyncIterable(obj) { + return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); + function isIterable(obj) { + return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); } -} -exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; -//# sourceMappingURL=auth.js.map - -/***/ }), - -/***/ 96255: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* 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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __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.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; -const http = __importStar(__nccwpck_require__(13685)); -const https = __importStar(__nccwpck_require__(95687)); -const pm = __importStar(__nccwpck_require__(19835)); -const tunnel = __importStar(__nccwpck_require__(74294)); -const undici_1 = __nccwpck_require__(41773); -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 : ''; -} -exports.getProxyUrl = getProxyUrl; -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); + function hasSafeIterator(obj) { + const prototype = Object.getPrototypeOf(obj); + const ownIterator = Object.prototype.hasOwnProperty.call(obj, Symbol.iterator); + return ownIterator || prototype != null && prototype !== Object.prototype && typeof obj[Symbol.iterator] === "function"; } -} -exports.HttpClientError = HttpClientError; -class HttpClientResponse { - constructor(message) { - this.message = message; + 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; } - 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()); - }); - })); - }); + function isDestroyed(body) { + return body && !!(body.destroyed || body[kDestroyed] || stream.isDestroyed?.(body)); } - 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 destroy(stream2, err) { + if (stream2 == null || !isStream(stream2) || isDestroyed(stream2)) { + return; + } + if (typeof stream2.destroy === "function") { + if (Object.getPrototypeOf(stream2).constructor === IncomingMessage) { + stream2.socket = null; + } + stream2.destroy(err); + } else if (err) { + queueMicrotask(() => { + stream2.emit("error", err); }); - } -} -exports.HttpClientResponse = HttpClientResponse; -function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === 'https:'; -} -exports.isHttps = isHttps; -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 = 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 (stream2.destroyed !== true) { + stream2[kDestroyed] = true; + } + } + var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; + function parseKeepAliveTimeout(val) { + const m = val.match(KEEPALIVE_TIMEOUT_EXPR); + return m ? parseInt(m[1], 10) * 1e3 : null; + } + function headerNameToString(value) { + return typeof value === "string" ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() : tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + function bufferToLowerCasedHeaderName(value) { + return tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + function parseHeaders(headers, obj) { + if (obj === void 0) obj = {}; + for (let i2 = 0; i2 < headers.length; i2 += 2) { + const key = headerNameToString(headers[i2]); + let val = obj[key]; + if (val !== void 0) { + if (!Object.hasOwn(obj, key)) { + const headersValue = typeof headers[i2 + 1] === "string" ? headers[i2 + 1] : Array.isArray(headers[i2 + 1]) ? headers[i2 + 1].map((x3) => x3.toString("latin1")) : headers[i2 + 1].toString("latin1"); + if (key === "__proto__") { + Object.defineProperty(obj, key, { + value: headersValue, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = headersValue; } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; + } else { + if (typeof val === "string") { + val = [val]; + obj[key] = val; } + val.push(headers[i2 + 1].toString("latin1")); + } + } else { + const headersValue = typeof headers[i2 + 1] === "string" ? headers[i2 + 1] : Array.isArray(headers[i2 + 1]) ? headers[i2 + 1].map((x3) => x3.toString("latin1")) : headers[i2 + 1].toString("latin1"); + obj[key] = headersValue; } + } + return obj; } - 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 || {}); - }); + function parseRawHeaders(headers) { + const headersLength = headers.length; + const ret = new Array(headersLength); + let key; + let val; + for (let n8 = 0; n8 < headersLength; n8 += 2) { + key = headers[n8]; + val = headers[n8 + 1]; + typeof key !== "string" && (key = key.toString()); + typeof val !== "string" && (val = val.toString("latin1")); + ret[n8] = key; + ret[n8 + 1] = val; + } + return ret; } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - }); + function encodeRawHeaders(headers) { + if (!Array.isArray(headers)) { + throw new TypeError("expected headers to be an array"); + } + return headers.map((x3) => Buffer.from(x3)); } - patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - }); + function isBuffer(buffer) { + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - }); + function assertRequestHandler(handler, method, upgrade) { + if (!handler || typeof handler !== "object") { + throw new InvalidArgumentError("handler must be an object"); + } + if (typeof handler.onRequestStart === "function") { + return; + } + 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"); + } + } } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - }); + function isDisturbed(body) { + return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])); } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); + 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 + }; + } + function ReadableStreamFrom(iterable) { + let iterator; + return new ReadableStream( + { + start() { + iterator = iterable[Symbol.asyncIterator](); + }, + pull(controller) { + return iterator.next().then(({ done, value }) => { + if (done) { + return queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + } else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); + if (buf.byteLength) { + return controller.enqueue(new Uint8Array(buf)); + } else { + return this.pull(controller); + } + } + }); + }, + cancel() { + return iterator.return(); + }, + type: "bytes" + } + ); } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); + 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.once("abort", listener); + return () => signal.removeListener("abort", listener); + } + var validTokenChars = new Uint8Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + // 0-15 + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + // 16-31 + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + // 32-47 (!"#$%&'()*+,-./) + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + // 48-63 (0-9:;<=>?) + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + // 64-79 (@A-O) + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + // 80-95 (P-Z[\]^_) + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + // 96-111 (`a-o) + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + // 112-127 (p-z{|}~) + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + // 128-143 + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + // 144-159 + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + // 160-175 + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + // 176-191 + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + // 192-207 + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + // 208-223 + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + // 224-239 + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + // 240-255 + ]); + function isTokenCharCode(c2) { + return validTokenChars[c2] === 1; } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); + var tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/; + function isValidHTTPToken(characters) { + if (characters.length >= 12) return tokenRegExp.test(characters); + if (characters.length === 0) return false; + for (let i2 = 0; i2 < characters.length; i2++) { + if (validTokenChars[characters.charCodeAt(i2)] !== 1) { + return false; + } + } + return true; } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); + var headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + function isValidHeaderValue(characters) { + return !headerCharRegex.test(characters); } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); + var rangeHeaderRegex = /^bytes (\d+)-(\d+)\/(\d+)?$/; + function parseRangeHeader(range) { + if (range == null || range === "") return { start: 0, end: null, size: null }; + const m = range ? range.match(rangeHeaderRegex) : null; + return m ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } : null; } - /** - * 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; - }); + function addListener(obj, name, listener) { + const listeners = obj[kListeners] ??= []; + listeners.push([name, listener]); + obj.on(name, listener); + return obj; } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); + function removeAllListeners(obj) { + if (obj[kListeners] != null) { + for (const [name, listener] of obj[kListeners]) { + obj.removeListener(name, listener); } - this._disposed = true; + obj[kListeners] = null; + } + return obj; } - /** - * 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); - }); - }); + function errorRequest(client, request, err) { + try { + request.onError(err); + assert(request.aborted); + } catch (err2) { + client.emit("error", err2); + } } - /** - * 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}`)); + var 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)); }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err); + }, 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); }); - if (data && typeof data === 'string') { - req.write(data, 'utf8'); - } - if (data && typeof data !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + }; + }; + 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)`; + destroy(socket, new ConnectTimeoutError(message)); + } + function getProtocolFromUrlString(urlString) { + if (urlString[0] === "h" && urlString[1] === "t" && urlString[2] === "t" && urlString[3] === "p") { + switch (urlString[4]) { + case ":": + return "http:"; + case "s": + if (urlString[5] === ":") { + return "https:"; + } + } + } + return urlString.slice(0, urlString.indexOf(":") + 1); + } + var kEnumerableProperty = /* @__PURE__ */ Object.create(null); + kEnumerableProperty.enumerable = true; + var 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" + }; + var normalizedMethodRecords = { + ...normalizedMethodRecordsBase, + patch: "patch", + PATCH: "PATCH" + }; + Object.setPrototypeOf(normalizedMethodRecordsBase, null); + Object.setPrototypeOf(normalizedMethodRecords, null); + module3.exports = { + kEnumerableProperty, + isDisturbed, + isBlobLike, + parseOrigin, + parseURL, + getServerName, + isStream, + isIterable, + hasSafeIterator, + isAsyncIterable, + isDestroyed, + headerNameToString, + bufferToLowerCasedHeaderName, + addListener, + removeAllListeners, + errorRequest, + parseRawHeaders, + encodeRawHeaders, + parseHeaders, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom, + isBuffer, + assertRequestHandler, + getSocketInfo, + isFormDataLike, + pathHasQueryOrFragment, + serializePathWithQuery, + addAbortListener, + isValidHTTPToken, + isValidHeaderValue, + isTokenCharCode, + parseRangeHeader, + normalizedMethodRecordsBase, + normalizedMethodRecords, + isValidPort, + isHttpOrHttpsPrefixed, + nodeMajor, + nodeMinor, + safeHTTPMethods: Object.freeze(["GET", "HEAD", "OPTIONS", "TRACE"]), + wrapRequestBody, + setupConnectTimeout, + getProtocolFromUrlString + }; + } +}); + +// node_modules/undici/lib/util/stats.js +var require_stats = __commonJS({ + "node_modules/undici/lib/util/stats.js"(exports, module3) { + "use strict"; + var { + kConnected, + kPending, + kRunning, + kSize, + kFree, + kQueued + } = require_symbols(); + var ClientStats = class { + constructor(client) { + this.connected = client[kConnected]; + this.pending = client[kPending]; + this.running = client[kRunning]; + this.size = client[kSize]; + } + }; + var PoolStats = class { + constructor(pool) { + this.connected = pool[kConnected]; + this.free = pool[kFree]; + this.pending = pool[kPending]; + this.queued = pool[kQueued]; + this.running = pool[kRunning]; + this.size = pool[kSize]; + } + }; + module3.exports = { ClientStats, PoolStats }; + } +}); + +// node_modules/undici/lib/core/diagnostics.js +var require_diagnostics = __commonJS({ + "node_modules/undici/lib/core/diagnostics.js"(exports, module3) { + "use strict"; + var diagnosticsChannel = __require("node:diagnostics_channel"); + var util = __require("node:util"); + var undiciDebugLog = util.debuglog("undici"); + var fetchDebuglog = util.debuglog("fetch"); + var websocketDebuglog = util.debuglog("websocket"); + var 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"), + bodyChunkSent: diagnosticsChannel.channel("undici:request:bodyChunkSent"), + bodyChunkReceived: diagnosticsChannel.channel("undici:request:bodyChunkReceived"), + 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"), + // ProxyAgent + proxyConnected: diagnosticsChannel.channel("undici:proxy:connected") + }; + var isTrackingClientEvents = false; + function trackClientEvents(debugLog = undiciDebugLog) { + if (isTrackingClientEvents) { + return; + } + if (channels.beforeConnect.hasSubscribers || channels.connected.hasSubscribers || channels.connectError.hasSubscribers || channels.sendHeaders.hasSubscribers) { + isTrackingClientEvents = true; + return; + } + isTrackingClientEvents = true; + diagnosticsChannel.subscribe( + "undici:client:beforeConnect", + (evt) => { + const { + connectParams: { version: version2, protocol, port, host } + } = evt; + debugLog( + "connecting to %s%s using %s%s", + host, + port ? `:${port}` : "", + protocol, + version2 + ); } - else { - req.end(); + ); + diagnosticsChannel.subscribe( + "undici:client:connected", + (evt) => { + const { + connectParams: { version: version2, protocol, port, host } + } = evt; + debugLog( + "connected to %s%s using %s%s", + host, + port ? `:${port}` : "", + protocol, + version2 + ); } - } - /** - * 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; + ); + diagnosticsChannel.subscribe( + "undici:client:connectError", + (evt) => { + const { + connectParams: { version: version2, protocol, port, host }, + error: error2 + } = evt; + debugLog( + "connection to %s%s using %s%s errored - %s", + host, + port ? `:${port}` : "", + protocol, + version2, + error2.message + ); } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + ); + diagnosticsChannel.subscribe( + "undici:client:sendHeaders", + (evt) => { + const { + request: { method, path: path13, origin } + } = evt; + debugLog("sending request to %s %s%s", method, origin, path13); + } + ); } - _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; + var isTrackingRequestEvents = false; + function trackRequestEvents(debugLog = undiciDebugLog) { + if (isTrackingRequestEvents) { + return; + } + if (channels.headers.hasSubscribers || channels.trailers.hasSubscribers || channels.error.hasSubscribers) { + isTrackingRequestEvents = true; + return; + } + isTrackingRequestEvents = true; + diagnosticsChannel.subscribe( + "undici:request:headers", + (evt) => { + const { + request: { method, path: path13, origin }, + response: { statusCode } + } = evt; + debugLog( + "received response to %s %s%s - HTTP %d", + method, + origin, + path13, + statusCode + ); } - 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); - } + ); + diagnosticsChannel.subscribe( + "undici:request:trailers", + (evt) => { + const { + request: { method, path: path13, origin } + } = evt; + debugLog("trailers received from %s %s%s", method, origin, path13); } - return info; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + ); + diagnosticsChannel.subscribe( + "undici:request:error", + (evt) => { + const { + request: { method, path: path13, origin }, + error: error2 + } = evt; + debugLog( + "request to %s %s%s errored - %s", + method, + origin, + path13, + error2.message + ); } - return lowercaseKeys(headers || {}); + ); } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + var isTrackingWebSocketEvents = false; + function trackWebSocketEvents(debugLog = websocketDebuglog) { + if (isTrackingWebSocketEvents) { + return; + } + if (channels.open.hasSubscribers || channels.close.hasSubscribers || channels.socketError.hasSubscribers || channels.ping.hasSubscribers || channels.pong.hasSubscribers) { + isTrackingWebSocketEvents = true; + return; + } + isTrackingWebSocketEvents = true; + diagnosticsChannel.subscribe( + "undici:websocket:open", + (evt) => { + if (evt.address != null) { + const { address, port } = evt.address; + debugLog("connection opened %s%s", address, port ? `:${port}` : ""); + } else { + debugLog("connection opened"); + } } - return additionalHeaders[header] || clientHeader || _default; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; + ); + diagnosticsChannel.subscribe( + "undici:websocket:close", + (evt) => { + const { websocket, code, reason } = evt; + debugLog( + "closed connection to %s - %s %s", + websocket.url, + code, + reason + ); } - if (this._keepAlive && !useProxy) { - agent = this._agent; + ); + diagnosticsChannel.subscribe( + "undici:websocket:socket_error", + (err) => { + debugLog("connection errored - %s", err.message); } - // if agent is already assigned use that agent. - if (agent) { - return agent; + ); + diagnosticsChannel.subscribe( + "undici:websocket:ping", + (evt) => { + debugLog("ping received"); } - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + ); + diagnosticsChannel.subscribe( + "undici:websocket:pong", + (evt) => { + debugLog("pong received"); } - // 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 }) + ); + } + if (undiciDebugLog.enabled || fetchDebuglog.enabled) { + trackClientEvents(fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog); + trackRequestEvents(fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog); + } + if (websocketDebuglog.enabled) { + trackClientEvents(undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog); + trackWebSocketEvents(websocketDebuglog); + } + module3.exports = { + channels + }; + } +}); + +// node_modules/undici/lib/core/request.js +var require_request = __commonJS({ + "node_modules/undici/lib/core/request.js"(exports, module3) { + "use strict"; + var { + InvalidArgumentError, + NotSupportedError + } = require_errors(); + var assert = __require("node:assert"); + var { + isValidHTTPToken, + isValidHeaderValue, + isStream, + destroy, + isBuffer, + isFormDataLike, + isIterable, + hasSafeIterator, + isBlobLike, + serializePathWithQuery, + assertRequestHandler, + getServerName, + normalizedMethodRecords, + getProtocolFromUrlString + } = require_util(); + var { channels } = require_diagnostics(); + var { headerNameLowerCasedRecord } = require_constants(); + var invalidPathRegex = /[^\u0021-\u00ff]/; + var kHandler = /* @__PURE__ */ Symbol("handler"); + var Request = class { + constructor(origin, { + path: path13, + method, + body, + headers, + query, + idempotent, + blocking, + upgrade, + headersTimeout, + bodyTimeout, + reset: reset2, + expectContinue, + servername, + throwOnError, + maxRedirections, + typeOfService + }, handler) { + if (typeof path13 !== "string") { + throw new InvalidArgumentError("path must be a string"); + } else if (path13[0] !== "/" && !(path13.startsWith("http://") || path13.startsWith("https://")) && method !== "CONNECT") { + throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); + } else if (invalidPathRegex.test(path13)) { + 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 (reset2 != null && typeof reset2 !== "boolean") { + throw new InvalidArgumentError("invalid reset"); + } + if (expectContinue != null && typeof expectContinue !== "boolean") { + throw new InvalidArgumentError("invalid expectContinue"); + } + if (throwOnError != null) { + throw new InvalidArgumentError("invalid throwOnError"); + } + if (maxRedirections != null && maxRedirections !== 0) { + throw new InvalidArgumentError("maxRedirections is not supported, use the redirect interceptor"); + } + if (typeOfService != null && (!Number.isInteger(typeOfService) || typeOfService < 0 || typeOfService > 255)) { + throw new InvalidArgumentError("typeOfService must be an integer between 0 and 255"); + } + this.headersTimeout = headersTimeout; + this.bodyTimeout = bodyTimeout; + this.method = method; + this.typeOfService = typeOfService ?? 0; + 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); }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + this.body.on("end", this.endHandler); + } + this.errorHandler = (err) => { + if (this.abort) { + this.abort(err); + } else { + this.error = err; } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + }; + 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 ? serializePathWithQuery(path13, query) : path13; + this.origin = origin; + this.protocol = getProtocolFromUrlString(origin); + this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; + this.blocking = blocking ?? this.method !== "HEAD"; + this.reset = reset2 == null ? null : reset2; + 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 i2 = 0; i2 < headers.length; i2 += 2) { + processHeader(this, headers[i2], headers[i2 + 1]); + } + } else if (headers && typeof headers === "object") { + if (hasSafeIterator(headers)) { + 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]); } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if reusing agent across request and tunneling agent isn't assigned create a new agent - if (this._keepAlive && !agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; + } else { + const keys = Object.keys(headers); + for (let i2 = 0; i2 < keys.length; ++i2) { + processHeader(this, keys[i2], headers[keys[i2]]); + } + } + } else if (headers != null) { + throw new InvalidArgumentError("headers must be an object or an array"); } - // if not using private agent and tunnel agent isn't setup then use global agent - if (!agent) { - agent = usingSsl ? https.globalAgent : http.globalAgent; + assertRequestHandler(handler, method, upgrade); + this.servername = servername || getServerName(this.host) || null; + this[kHandler] = handler; + if (channels.create.hasSubscribers) { + channels.create.publish({ request: this }); } - 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 - }); + } + onBodySent(chunk) { + if (channels.bodyChunkSent.hasSubscribers) { + channels.bodyChunkSent.publish({ request: this, chunk }); } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; + if (this[kHandler].onBodySent) { + try { + return this[kHandler].onBodySent(chunk); + } catch (err) { + this.abort(err); + } } - // if agent is already assigned use that agent. - if (proxyAgent) { - return proxyAgent; + } + onRequestSent() { + if (channels.bodySent.hasSubscribers) { + channels.bodySent.publish({ request: this }); } - 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: `${proxyUrl.username}:${proxyUrl.password}` - }))); - 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 - }); + if (this[kHandler].onRequestSent) { + try { + return this[kHandler].onRequestSent(); + } catch (err) { + this.abort(err); + } } - return proxyAgent; - } - _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 - -/***/ }), - -/***/ 19835: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.checkBypass = exports.getProxyUrl = void 0; -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']; + } + onConnect(abort) { + assert(!this.aborted); + assert(!this.completed); + if (this.error) { + abort(this.error); + } else { + this.abort = abort; + return this[kHandler].onConnect(abort); } - else { - return process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + 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 } }); } - })(); - if (proxyVar) { try { - return new URL(proxyVar); - } - catch (_a) { - if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) - return new URL(`http://${proxyVar}`); + return this[kHandler].onHeaders(statusCode, headers, resume, statusText); + } catch (err) { + this.abort(err); } - } - else { - return undefined; - } -} -exports.getProxyUrl = getProxyUrl; -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; + } + onData(chunk) { + assert(!this.aborted); + assert(!this.completed); + if (channels.bodyChunkReceived.hasSubscribers) { + channels.bodyChunkReceived.publish({ request: this, chunk }); } - } - return false; -} -exports.checkBypass = checkBypass; -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]')); -} -//# sourceMappingURL=proxy.js.map - -/***/ }), - -/***/ 81962: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __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()); - }); -}; -var _a; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; -const fs = __importStar(__nccwpck_require__(57147)); -const path = __importStar(__nccwpck_require__(71017)); -_a = fs.promises -// export const {open} = 'fs' -, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; -// export const {open} = 'fs' -exports.IS_WINDOWS = process.platform === 'win32'; -// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691 -exports.UV_FS_O_EXLOCK = 0x10000000; -exports.READONLY = fs.constants.O_RDONLY; -function exists(fsPath) { - return __awaiter(this, void 0, void 0, function* () { try { - yield exports.stat(fsPath); + return this[kHandler].onData(chunk); + } catch (err) { + this.abort(err); + return false; } - catch (err) { - if (err.code === 'ENOENT') { - return false; - } - throw err; + } + onUpgrade(statusCode, headers, socket) { + assert(!this.aborted); + assert(!this.completed); + return this[kHandler].onUpgrade(statusCode, headers, socket); + } + onComplete(trailers) { + this.onFinally(); + assert(!this.aborted); + assert(!this.completed); + this.completed = true; + if (channels.trailers.hasSubscribers) { + channels.trailers.publish({ request: this, trailers }); } - return true; - }); -} -exports.exists = exists; -function isDirectory(fsPath, useStat = false) { - return __awaiter(this, void 0, void 0, function* () { - const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); - return stats.isDirectory(); - }); -} -exports.isDirectory = 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 (exports.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('/'); -} -exports.isRooted = isRooted; -/** - * 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(this, void 0, void 0, function* () { - let stats = undefined; try { - // test file exists - stats = yield exports.stat(filePath); + return this[kHandler].onComplete(trailers); + } catch (err) { + this.onError(err); } - 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}`); - } + } + onError(error2) { + this.onFinally(); + if (channels.error.hasSubscribers) { + channels.error.publish({ request: this, error: error2 }); } - if (stats && stats.isFile()) { - if (exports.IS_WINDOWS) { - // on Windows, test for valid extension - const upperExt = path.extname(filePath).toUpperCase(); - if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } + if (this.aborted) { + return; } - // try each extension - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = undefined; - try { - stats = yield exports.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 (exports.IS_WINDOWS) { - // preserve the case of the actual file (since an extension was appended) - try { - const directory = path.dirname(filePath); - const upperName = path.basename(filePath).toUpperCase(); - for (const actualName of yield exports.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = 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; - } - } - } + this.aborted = true; + return this[kHandler].onError(error2); + } + onFinally() { + if (this.errorHandler) { + this.body.off("error", this.errorHandler); + this.errorHandler = null; } - return ''; - }); -} -exports.tryGetExecutablePath = tryGetExecutablePath; -function normalizeSeparators(p) { - p = p || ''; - if (exports.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 && stats.gid === process.getgid()) || - ((stats.mode & 64) > 0 && 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`; -} -exports.getCmdPath = getCmdPath; -//# sourceMappingURL=io-util.js.map - -/***/ }), - -/***/ 47351: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __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.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; -const assert_1 = __nccwpck_require__(39491); -const path = __importStar(__nccwpck_require__(71017)); -const ioUtil = __importStar(__nccwpck_require__(81962)); -/** - * 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, dest, options = {}) { - return __awaiter(this, void 0, void 0, function* () { - 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 (this.endHandler) { + this.body.off("end", this.endHandler); + this.endHandler = null; } - // 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}`); + } + 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"); } - 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); - } + } + if (Array.isArray(val)) { + const arr = []; + for (let i2 = 0; i2 < val.length; i2++) { + if (typeof val[i2] === "string") { + if (!isValidHeaderValue(val[i2])) { + throw new InvalidArgumentError(`invalid ${key} header`); + } + arr.push(val[i2]); + } else if (val[i2] === null) { + arr.push(""); + } else if (typeof val[i2] === "object") { + throw new InvalidArgumentError(`invalid ${key} header`); + } else { + arr.push(`${val[i2]}`); + } } - else { - if (path.relative(source, newDest) === '') { - // a file cannot be copied to itself - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); + val = arr; + } else if (typeof val === "string") { + if (!isValidHeaderValue(val)) { + throw new InvalidArgumentError(`invalid ${key} header`); } - }); -} -exports.cp = cp; -/** - * Moves a path. - * - * @param source source path - * @param dest destination path - * @param options optional. See MoveOptions. - */ -function mv(source, dest, options = {}) { - return __awaiter(this, void 0, void 0, function* () { - 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'); - } - } + } 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 : null; + if (value === null) { + throw new InvalidArgumentError("invalid connection header"); + } + for (const token of value.toLowerCase().split(",")) { + const trimmed = token.trim(); + if (!isValidHTTPToken(trimmed)) { + throw new InvalidArgumentError("invalid connection header"); + } + if (trimmed === "close") { + request.reset = true; + } } - yield mkdirP(path.dirname(dest)); - yield ioUtil.rename(source, dest); - }); -} -exports.mv = mv; -/** - * Remove a path recursively with force - * - * @param inputPath path to remove - */ -function rmRF(inputPath) { - return __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'); - } + } else if (headerName === "expect") { + throw new NotSupportedError("expect header not supported"); + } else { + request.headers.push(key, val); + } + } + module3.exports = Request; + } +}); + +// node_modules/undici/lib/handler/wrap-handler.js +var require_wrap_handler = __commonJS({ + "node_modules/undici/lib/handler/wrap-handler.js"(exports, module3) { + "use strict"; + var { InvalidArgumentError } = require_errors(); + module3.exports = class WrapHandler { + #handler; + constructor(handler) { + this.#handler = handler; + } + static wrap(handler) { + return handler.onRequestStart ? handler : new WrapHandler(handler); + } + // Unwrap Interface + onConnect(abort, context2) { + return this.#handler.onConnect?.(abort, context2); + } + onResponseStarted() { + return this.#handler.onResponseStarted?.(); + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + return this.#handler.onHeaders?.(statusCode, rawHeaders, resume, statusMessage); + } + onUpgrade(statusCode, rawHeaders, socket) { + return this.#handler.onUpgrade?.(statusCode, rawHeaders, socket); + } + onData(data) { + return this.#handler.onData?.(data); + } + onComplete(trailers) { + return this.#handler.onComplete?.(trailers); + } + onError(err) { + if (!this.#handler.onError) { + throw err; } - try { - // note if path does not exist, error is silent - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); + return this.#handler.onError?.(err); + } + // Wrap Interface + onRequestStart(controller, context2) { + this.#handler.onConnect?.((reason) => controller.abort(reason), context2); + } + onRequestUpgrade(controller, statusCode, headers, socket) { + const rawHeaders = []; + for (const [key, val] of Object.entries(headers)) { + rawHeaders.push(Buffer.from(key, "latin1"), toRawHeaderValue(val)); } - catch (err) { - throw new Error(`File was unable to be removed ${err}`); + this.#handler.onUpgrade?.(statusCode, rawHeaders, socket); + } + onResponseStart(controller, statusCode, headers, statusMessage) { + const rawHeaders = []; + for (const [key, val] of Object.entries(headers)) { + rawHeaders.push(Buffer.from(key, "latin1"), toRawHeaderValue(val)); } - }); -} -exports.rmRF = rmRF; -/** - * 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 __awaiter(this, void 0, void 0, function* () { - assert_1.ok(fsPath, 'a path argument must be provided'); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); -} -exports.mkdirP = mkdirP; -/** - * 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(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); + if (this.#handler.onHeaders?.(statusCode, rawHeaders, () => controller.resume(), statusMessage) === false) { + controller.pause(); } - // recursive when check=true - if (check) { - const result = yield which(tool, false); - if (!result) { - if (ioUtil.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; + } + onResponseData(controller, data) { + if (this.#handler.onData?.(data) === false) { + controller.pause(); } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; + } + onResponseEnd(controller, trailers) { + const rawTrailers = []; + for (const [key, val] of Object.entries(trailers)) { + rawTrailers.push(Buffer.from(key, "latin1"), toRawHeaderValue(val)); } - return ''; - }); -} -exports.which = which; -/** - * 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(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); + this.#handler.onComplete?.(rawTrailers); + } + onResponseError(controller, err) { + if (!this.#handler.onError) { + throw new InvalidArgumentError("invalid onError method"); } - // build the list of extensions to try - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) { - for (const extension of process.env['PATHEXT'].split(path.delimiter)) { - if (extension) { - extensions.push(extension); - } - } + this.#handler.onError?.(err); + } + }; + function toRawHeaderValue(value) { + return Array.isArray(value) ? value.map((item) => Buffer.from(item, "latin1")) : Buffer.from(value, "latin1"); + } + } +}); + +// node_modules/undici/lib/dispatcher/dispatcher.js +var require_dispatcher = __commonJS({ + "node_modules/undici/lib/dispatcher/dispatcher.js"(exports, module3) { + "use strict"; + var EventEmitter = __require("node:events"); + var WrapHandler = require_wrap_handler(); + var wrapInterceptor = (dispatch) => (opts, handler) => dispatch(opts, WrapHandler.wrap(handler)); + 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); + dispatch = wrapInterceptor(dispatch); + if (dispatch == null || typeof dispatch !== "function" || dispatch.length !== 2) { + throw new TypeError("invalid interceptor"); + } } - // if it's rooted, return it if exists. otherwise return empty. - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; + return new Proxy(this, { + get: (target, key) => key === "dispatch" ? dispatch : target[key] + }); + } + }; + module3.exports = Dispatcher; + } +}); + +// node_modules/undici/lib/handler/unwrap-handler.js +var require_unwrap_handler = __commonJS({ + "node_modules/undici/lib/handler/unwrap-handler.js"(exports, module3) { + "use strict"; + var { parseHeaders } = require_util(); + var { InvalidArgumentError } = require_errors(); + var kResume = /* @__PURE__ */ Symbol("resume"); + var UnwrapController = class { + #paused = false; + #reason = null; + #aborted = false; + #abort; + [kResume] = null; + constructor(abort) { + this.#abort = abort; + } + pause() { + this.#paused = true; + } + resume() { + if (this.#paused) { + this.#paused = false; + this[kResume]?.(); } - // if any path separators, return empty - if (tool.includes(path.sep)) { - return []; + } + abort(reason) { + if (!this.#aborted) { + this.#aborted = true; + this.#reason = reason; + this.#abort(reason); } - // 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(path.delimiter)) { - if (p) { - directories.push(p); - } - } + } + get aborted() { + return this.#aborted; + } + get reason() { + return this.#reason; + } + get paused() { + return this.#paused; + } + }; + module3.exports = class UnwrapHandler { + #handler; + #controller; + constructor(handler) { + this.#handler = handler; + } + static unwrap(handler) { + return !handler.onRequestStart ? handler : new UnwrapHandler(handler); + } + onConnect(abort, context2) { + this.#controller = new UnwrapController(abort); + this.#handler.onRequestStart?.(this.#controller, context2); + } + onResponseStarted() { + return this.#handler.onResponseStarted?.(); + } + onUpgrade(statusCode, rawHeaders, socket) { + this.#handler.onRequestUpgrade?.(this.#controller, statusCode, parseHeaders(rawHeaders), socket); + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + this.#controller[kResume] = resume; + this.#handler.onResponseStart?.(this.#controller, statusCode, parseHeaders(rawHeaders), statusMessage); + return !this.#controller.paused; + } + onData(data) { + this.#handler.onResponseData?.(this.#controller, data); + return !this.#controller.paused; + } + onComplete(rawTrailers) { + this.#handler.onResponseEnd?.(this.#controller, parseHeaders(rawTrailers)); + } + onError(err) { + if (!this.#handler.onResponseError) { + throw new InvalidArgumentError("invalid onError method"); } - // find all matches - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } + this.#handler.onResponseError?.(this.#controller, err); + } + }; + } +}); + +// node_modules/undici/lib/dispatcher/dispatcher-base.js +var require_dispatcher_base = __commonJS({ + "node_modules/undici/lib/dispatcher/dispatcher-base.js"(exports, module3) { + "use strict"; + var Dispatcher = require_dispatcher(); + var UnwrapHandler = require_unwrap_handler(); + var { + ClientDestroyedError, + ClientClosedError, + InvalidArgumentError + } = require_errors(); + var { kDestroy, kClose, kClosed, kDestroyed, kDispatch } = require_symbols(); + var kOnDestroyed = /* @__PURE__ */ Symbol("onDestroyed"); + var kOnClosed = /* @__PURE__ */ Symbol("onClosed"); + var DispatcherBase = class extends Dispatcher { + /** @type {boolean} */ + [kDestroyed] = false; + /** @type {Array|null} */ + [kOnClosed] = null; + /** @returns {boolean} */ + get destroyed() { + return this[kDestroyed]; + } + /** @returns {boolean} */ + get closed() { + return this[kClosed]; + } + close(callback) { + if (callback === void 0) { + return new Promise((resolve8, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve8(data); + }); + }); } - return matches; - }); -} -exports.findInPath = findInPath; -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 __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 copyFile(srcFile, destFile, force); - } + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); } - // Change the mode for the newly created directory - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); -} -// Buffered file copy -function copyFile(srcFile, destFile, force) { - return __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); + if (this[kDestroyed]) { + const err = new ClientDestroyedError(); + queueMicrotask(() => callback(err, null)); + return; } - else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); + if (this[kClosed]) { + if (this[kOnClosed]) { + this[kOnClosed].push(callback); + } else { + queueMicrotask(() => callback(null, null)); + } + return; } - }); -} -//# sourceMappingURL=io.js.map - -/***/ }), - -/***/ 40334: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - createTokenAuth: () => createTokenAuth -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/auth.js -var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; -var REGEX_IS_INSTALLATION = /^ghs_/; -var REGEX_IS_USER_TO_SERVER = /^ghu_/; -async function auth(token) { - const isApp = token.split(/\./).length === 3; - const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); - const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); - 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) - }); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 76762: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - Octokit: () => Octokit -}); -module.exports = __toCommonJS(dist_src_exports); -var import_universal_user_agent = __nccwpck_require__(45030); -var import_before_after_hook = __nccwpck_require__(83682); -var import_request = __nccwpck_require__(36234); -var import_graphql = __nccwpck_require__(88467); -var import_auth_token = __nccwpck_require__(40334); - -// pkg/dist-src/version.js -var VERSION = "5.2.0"; - -// pkg/dist-src/index.js -var noop = () => { -}; -var consoleWarn = console.warn.bind(console); -var consoleError = console.error.bind(console); -var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; -var Octokit = class { - static { - this.VERSION = VERSION; - } - static defaults(defaults) { - const OctokitWithDefaults = class extends this { - constructor(...args) { - const options = args[0] || {}; - if (typeof defaults === "function") { - super(defaults(options)); + this[kClosed] = true; + this[kOnClosed] ??= []; + this[kOnClosed].push(callback); + const onClosed = () => { + const callbacks = this[kOnClosed]; + this[kOnClosed] = null; + for (let i2 = 0; i2 < callbacks.length; i2++) { + callbacks[i2](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((resolve8, reject) => { + this.destroy(err, (err2, data) => { + return err2 ? reject(err2) : resolve8(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; } - super( - Object.assign( - {}, - defaults, - options, - options.userAgent && defaults.userAgent ? { - userAgent: `${options.userAgent} ${defaults.userAgent}` - } : null - ) - ); + if (!err) { + err = new ClientDestroyedError(); + } + this[kDestroyed] = true; + this[kOnDestroyed] ??= []; + this[kOnDestroyed].push(callback); + const onDestroyed = () => { + const callbacks = this[kOnDestroyed]; + this[kOnDestroyed] = null; + for (let i2 = 0; i2 < callbacks.length; i2++) { + callbacks[i2](null, null); + } + }; + this[kDestroy](err).then(() => queueMicrotask(onDestroyed)); } - }; - return OctokitWithDefaults; - } - static { - this.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 { - this.plugins = currentPlugins.concat( - newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) - ); + dispatch(opts, handler) { + if (!handler || typeof handler !== "object") { + throw new InvalidArgumentError("handler must be an object"); + } + handler = UnwrapHandler.unwrap(handler); + 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[kDispatch](opts, handler); + } catch (err) { + if (typeof handler.onError !== "function") { + throw err; + } + handler.onError(err); + return false; + } } }; - return NewOctokit; + module3.exports = DispatcherBase; } - constructor(options = {}) { - const hook = new import_before_after_hook.Collection(); - const requestDefaults = { - baseUrl: import_request.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: "" +}); + +// node_modules/undici/lib/core/connect.js +var require_connect = __commonJS({ + "node_modules/undici/lib/core/connect.js"(exports, module3) { + "use strict"; + var net = __require("node:net"); + var assert = __require("node:assert"); + var util = require_util(); + var { InvalidArgumentError } = require_errors(); + var tls; + var SessionCache = class WeakSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + this._sessionRegistry = new 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); } }; - 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 = import_request.request.defaults(requestDefaults); - this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); - this.log = Object.assign( - { - debug: noop, - info: noop, - warn: consoleWarn, - error: consoleError - }, - options.log - ); - this.hook = hook; - if (!options.authStrategy) { - if (!options.auth) { - this.auth = async () => ({ - type: "unauthenticated" + function buildConnector({ allowH2, useH2c, 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 options2 = { 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 || options2.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... + ...options2, + servername, + session, + localAddress, + ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], + socket: httpSocket, + // upgrade socket connection + port, + host: hostname + }); + socket.on("session", function(session2) { + sessionCache.set(sessionKey, session2); + }); + } 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. + ...options2, + localAddress, + port, + host: hostname + }); + if (useH2c === true) { + socket.alpnProtocol = "h2"; + } + } + if (options2.keepAlive == null || options2.keepAlive) { + const keepAliveInitialDelay = options2.keepAliveInitialDelay === void 0 ? 6e4 : options2.keepAliveInitialDelay; + socket.setKeepAlive(true, keepAliveInitialDelay); + } + const clearConnectTimeout = util.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); + } }); - } else { - const auth = (0, import_auth_token.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)); + return socket; + }; } + module3.exports = buildConnector; } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 59440: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; +}); -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +// node_modules/undici/lib/llhttp/utils.js +var require_utils2 = __commonJS({ + "node_modules/undici/lib/llhttp/utils.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.enumToMap = enumToMap; + function enumToMap(obj, filter2 = [], exceptions = []) { + const emptyFilter = (filter2?.length ?? 0) === 0; + const emptyExceptions = (exceptions?.length ?? 0) === 0; + return Object.fromEntries(Object.entries(obj).filter(([, value]) => { + return typeof value === "number" && (emptyFilter || filter2.includes(value)) && (emptyExceptions || !exceptions.includes(value)); + })); + } } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - endpoint: () => endpoint }); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/defaults.js -var import_universal_user_agent = __nccwpck_require__(45030); -// pkg/dist-src/version.js -var VERSION = "9.0.6"; - -// pkg/dist-src/defaults.js -var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.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 lowercaseKeys(object) { - if (!object) { - return {}; +// node_modules/undici/lib/llhttp/constants.js +var require_constants2 = __commonJS({ + "node_modules/undici/lib/llhttp/constants.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SPECIAL_HEADERS = exports.MINOR = exports.MAJOR = exports.HTAB_SP_VCHAR_OBS_TEXT = exports.QUOTED_STRING = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.HEX = exports.URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.STATUSES_HTTP = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.HEADER_STATE = exports.FINISH = exports.STATUSES = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; + var utils_1 = require_utils2(); + exports.ERROR = { + OK: 0, + INTERNAL: 1, + STRICT: 2, + CR_EXPECTED: 25, + LF_EXPECTED: 3, + UNEXPECTED_CONTENT_LENGTH: 4, + UNEXPECTED_SPACE: 30, + CLOSED_CONNECTION: 5, + INVALID_METHOD: 6, + INVALID_URL: 7, + INVALID_CONSTANT: 8, + INVALID_VERSION: 9, + INVALID_HEADER_TOKEN: 10, + INVALID_CONTENT_LENGTH: 11, + INVALID_CHUNK_SIZE: 12, + INVALID_STATUS: 13, + INVALID_EOF_STATE: 14, + INVALID_TRANSFER_ENCODING: 15, + CB_MESSAGE_BEGIN: 16, + CB_HEADERS_COMPLETE: 17, + CB_MESSAGE_COMPLETE: 18, + CB_CHUNK_HEADER: 19, + CB_CHUNK_COMPLETE: 20, + PAUSED: 21, + PAUSED_UPGRADE: 22, + PAUSED_H2_UPGRADE: 23, + USER: 24, + CB_URL_COMPLETE: 26, + CB_STATUS_COMPLETE: 27, + CB_METHOD_COMPLETE: 32, + CB_VERSION_COMPLETE: 33, + CB_HEADER_FIELD_COMPLETE: 28, + CB_HEADER_VALUE_COMPLETE: 29, + CB_CHUNK_EXTENSION_NAME_COMPLETE: 34, + CB_CHUNK_EXTENSION_VALUE_COMPLETE: 35, + CB_RESET: 31, + CB_PROTOCOL_COMPLETE: 38 + }; + exports.TYPE = { + BOTH: 0, + // default + REQUEST: 1, + RESPONSE: 2 + }; + exports.FLAGS = { + CONNECTION_KEEP_ALIVE: 1 << 0, + CONNECTION_CLOSE: 1 << 1, + CONNECTION_UPGRADE: 1 << 2, + CHUNKED: 1 << 3, + UPGRADE: 1 << 4, + CONTENT_LENGTH: 1 << 5, + SKIPBODY: 1 << 6, + TRAILING: 1 << 7, + // 1 << 8 is unused + TRANSFER_ENCODING: 1 << 9 + }; + exports.LENIENT_FLAGS = { + HEADERS: 1 << 0, + CHUNKED_LENGTH: 1 << 1, + KEEP_ALIVE: 1 << 2, + TRANSFER_ENCODING: 1 << 3, + VERSION: 1 << 4, + DATA_AFTER_CLOSE: 1 << 5, + OPTIONAL_LF_AFTER_CR: 1 << 6, + OPTIONAL_CRLF_AFTER_CHUNK: 1 << 7, + OPTIONAL_CR_BEFORE_LF: 1 << 8, + SPACES_AFTER_CHUNK_SIZE: 1 << 9 + }; + exports.METHODS = { + "DELETE": 0, + "GET": 1, + "HEAD": 2, + "POST": 3, + "PUT": 4, + /* pathological */ + "CONNECT": 5, + "OPTIONS": 6, + "TRACE": 7, + /* WebDAV */ + "COPY": 8, + "LOCK": 9, + "MKCOL": 10, + "MOVE": 11, + "PROPFIND": 12, + "PROPPATCH": 13, + "SEARCH": 14, + "UNLOCK": 15, + "BIND": 16, + "REBIND": 17, + "UNBIND": 18, + "ACL": 19, + /* subversion */ + "REPORT": 20, + "MKACTIVITY": 21, + "CHECKOUT": 22, + "MERGE": 23, + /* upnp */ + "M-SEARCH": 24, + "NOTIFY": 25, + "SUBSCRIBE": 26, + "UNSUBSCRIBE": 27, + /* RFC-5789 */ + "PATCH": 28, + "PURGE": 29, + /* CalDAV */ + "MKCALENDAR": 30, + /* RFC-2068, section 19.6.1.2 */ + "LINK": 31, + "UNLINK": 32, + /* icecast */ + "SOURCE": 33, + /* RFC-7540, section 11.6 */ + "PRI": 34, + /* RFC-2326 RTSP */ + "DESCRIBE": 35, + "ANNOUNCE": 36, + "SETUP": 37, + "PLAY": 38, + "PAUSE": 39, + "TEARDOWN": 40, + "GET_PARAMETER": 41, + "SET_PARAMETER": 42, + "REDIRECT": 43, + "RECORD": 44, + /* RAOP */ + "FLUSH": 45, + /* DRAFT https://www.ietf.org/archive/id/draft-ietf-httpbis-safe-method-w-body-02.html */ + "QUERY": 46 + }; + exports.STATUSES = { + CONTINUE: 100, + SWITCHING_PROTOCOLS: 101, + PROCESSING: 102, + EARLY_HINTS: 103, + RESPONSE_IS_STALE: 110, + // Unofficial + REVALIDATION_FAILED: 111, + // Unofficial + DISCONNECTED_OPERATION: 112, + // Unofficial + HEURISTIC_EXPIRATION: 113, + // Unofficial + MISCELLANEOUS_WARNING: 199, + // Unofficial + OK: 200, + CREATED: 201, + ACCEPTED: 202, + NON_AUTHORITATIVE_INFORMATION: 203, + NO_CONTENT: 204, + RESET_CONTENT: 205, + PARTIAL_CONTENT: 206, + MULTI_STATUS: 207, + ALREADY_REPORTED: 208, + TRANSFORMATION_APPLIED: 214, + // Unofficial + IM_USED: 226, + MISCELLANEOUS_PERSISTENT_WARNING: 299, + // Unofficial + MULTIPLE_CHOICES: 300, + MOVED_PERMANENTLY: 301, + FOUND: 302, + SEE_OTHER: 303, + NOT_MODIFIED: 304, + USE_PROXY: 305, + SWITCH_PROXY: 306, + // No longer used + TEMPORARY_REDIRECT: 307, + PERMANENT_REDIRECT: 308, + BAD_REQUEST: 400, + UNAUTHORIZED: 401, + PAYMENT_REQUIRED: 402, + FORBIDDEN: 403, + NOT_FOUND: 404, + METHOD_NOT_ALLOWED: 405, + NOT_ACCEPTABLE: 406, + PROXY_AUTHENTICATION_REQUIRED: 407, + REQUEST_TIMEOUT: 408, + CONFLICT: 409, + GONE: 410, + LENGTH_REQUIRED: 411, + PRECONDITION_FAILED: 412, + PAYLOAD_TOO_LARGE: 413, + URI_TOO_LONG: 414, + UNSUPPORTED_MEDIA_TYPE: 415, + RANGE_NOT_SATISFIABLE: 416, + EXPECTATION_FAILED: 417, + IM_A_TEAPOT: 418, + PAGE_EXPIRED: 419, + // Unofficial + ENHANCE_YOUR_CALM: 420, + // Unofficial + MISDIRECTED_REQUEST: 421, + UNPROCESSABLE_ENTITY: 422, + LOCKED: 423, + FAILED_DEPENDENCY: 424, + TOO_EARLY: 425, + UPGRADE_REQUIRED: 426, + PRECONDITION_REQUIRED: 428, + TOO_MANY_REQUESTS: 429, + REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL: 430, + // Unofficial + REQUEST_HEADER_FIELDS_TOO_LARGE: 431, + LOGIN_TIMEOUT: 440, + // Unofficial + NO_RESPONSE: 444, + // Unofficial + RETRY_WITH: 449, + // Unofficial + BLOCKED_BY_PARENTAL_CONTROL: 450, + // Unofficial + UNAVAILABLE_FOR_LEGAL_REASONS: 451, + CLIENT_CLOSED_LOAD_BALANCED_REQUEST: 460, + // Unofficial + INVALID_X_FORWARDED_FOR: 463, + // Unofficial + REQUEST_HEADER_TOO_LARGE: 494, + // Unofficial + SSL_CERTIFICATE_ERROR: 495, + // Unofficial + SSL_CERTIFICATE_REQUIRED: 496, + // Unofficial + HTTP_REQUEST_SENT_TO_HTTPS_PORT: 497, + // Unofficial + INVALID_TOKEN: 498, + // Unofficial + CLIENT_CLOSED_REQUEST: 499, + // Unofficial + INTERNAL_SERVER_ERROR: 500, + NOT_IMPLEMENTED: 501, + BAD_GATEWAY: 502, + SERVICE_UNAVAILABLE: 503, + GATEWAY_TIMEOUT: 504, + HTTP_VERSION_NOT_SUPPORTED: 505, + VARIANT_ALSO_NEGOTIATES: 506, + INSUFFICIENT_STORAGE: 507, + LOOP_DETECTED: 508, + BANDWIDTH_LIMIT_EXCEEDED: 509, + NOT_EXTENDED: 510, + NETWORK_AUTHENTICATION_REQUIRED: 511, + WEB_SERVER_UNKNOWN_ERROR: 520, + // Unofficial + WEB_SERVER_IS_DOWN: 521, + // Unofficial + CONNECTION_TIMEOUT: 522, + // Unofficial + ORIGIN_IS_UNREACHABLE: 523, + // Unofficial + TIMEOUT_OCCURED: 524, + // Unofficial + SSL_HANDSHAKE_FAILED: 525, + // Unofficial + INVALID_SSL_CERTIFICATE: 526, + // Unofficial + RAILGUN_ERROR: 527, + // Unofficial + SITE_IS_OVERLOADED: 529, + // Unofficial + SITE_IS_FROZEN: 530, + // Unofficial + IDENTITY_PROVIDER_AUTHENTICATION_ERROR: 561, + // Unofficial + NETWORK_READ_TIMEOUT: 598, + // Unofficial + NETWORK_CONNECT_TIMEOUT: 599 + // Unofficial + }; + exports.FINISH = { + SAFE: 0, + SAFE_WITH_CB: 1, + UNSAFE: 2 + }; + exports.HEADER_STATE = { + GENERAL: 0, + CONNECTION: 1, + CONTENT_LENGTH: 2, + TRANSFER_ENCODING: 3, + UPGRADE: 4, + CONNECTION_KEEP_ALIVE: 5, + CONNECTION_CLOSE: 6, + CONNECTION_UPGRADE: 7, + TRANSFER_ENCODING_CHUNKED: 8 + }; + exports.METHODS_HTTP = [ + exports.METHODS.DELETE, + exports.METHODS.GET, + exports.METHODS.HEAD, + exports.METHODS.POST, + exports.METHODS.PUT, + exports.METHODS.CONNECT, + exports.METHODS.OPTIONS, + exports.METHODS.TRACE, + exports.METHODS.COPY, + exports.METHODS.LOCK, + exports.METHODS.MKCOL, + exports.METHODS.MOVE, + exports.METHODS.PROPFIND, + exports.METHODS.PROPPATCH, + exports.METHODS.SEARCH, + exports.METHODS.UNLOCK, + exports.METHODS.BIND, + exports.METHODS.REBIND, + exports.METHODS.UNBIND, + exports.METHODS.ACL, + exports.METHODS.REPORT, + exports.METHODS.MKACTIVITY, + exports.METHODS.CHECKOUT, + exports.METHODS.MERGE, + exports.METHODS["M-SEARCH"], + exports.METHODS.NOTIFY, + exports.METHODS.SUBSCRIBE, + exports.METHODS.UNSUBSCRIBE, + exports.METHODS.PATCH, + exports.METHODS.PURGE, + exports.METHODS.MKCALENDAR, + exports.METHODS.LINK, + exports.METHODS.UNLINK, + exports.METHODS.PRI, + // TODO(indutny): should we allow it with HTTP? + exports.METHODS.SOURCE, + exports.METHODS.QUERY + ]; + exports.METHODS_ICE = [ + exports.METHODS.SOURCE + ]; + exports.METHODS_RTSP = [ + exports.METHODS.OPTIONS, + exports.METHODS.DESCRIBE, + exports.METHODS.ANNOUNCE, + exports.METHODS.SETUP, + exports.METHODS.PLAY, + exports.METHODS.PAUSE, + exports.METHODS.TEARDOWN, + exports.METHODS.GET_PARAMETER, + exports.METHODS.SET_PARAMETER, + exports.METHODS.REDIRECT, + exports.METHODS.RECORD, + exports.METHODS.FLUSH, + // For AirPlay + exports.METHODS.GET, + exports.METHODS.POST + ]; + exports.METHOD_MAP = (0, utils_1.enumToMap)(exports.METHODS); + exports.H_METHOD_MAP = Object.fromEntries(Object.entries(exports.METHODS).filter(([k3]) => k3.startsWith("H"))); + exports.STATUSES_HTTP = [ + exports.STATUSES.CONTINUE, + exports.STATUSES.SWITCHING_PROTOCOLS, + exports.STATUSES.PROCESSING, + exports.STATUSES.EARLY_HINTS, + exports.STATUSES.RESPONSE_IS_STALE, + exports.STATUSES.REVALIDATION_FAILED, + exports.STATUSES.DISCONNECTED_OPERATION, + exports.STATUSES.HEURISTIC_EXPIRATION, + exports.STATUSES.MISCELLANEOUS_WARNING, + exports.STATUSES.OK, + exports.STATUSES.CREATED, + exports.STATUSES.ACCEPTED, + exports.STATUSES.NON_AUTHORITATIVE_INFORMATION, + exports.STATUSES.NO_CONTENT, + exports.STATUSES.RESET_CONTENT, + exports.STATUSES.PARTIAL_CONTENT, + exports.STATUSES.MULTI_STATUS, + exports.STATUSES.ALREADY_REPORTED, + exports.STATUSES.TRANSFORMATION_APPLIED, + exports.STATUSES.IM_USED, + exports.STATUSES.MISCELLANEOUS_PERSISTENT_WARNING, + exports.STATUSES.MULTIPLE_CHOICES, + exports.STATUSES.MOVED_PERMANENTLY, + exports.STATUSES.FOUND, + exports.STATUSES.SEE_OTHER, + exports.STATUSES.NOT_MODIFIED, + exports.STATUSES.USE_PROXY, + exports.STATUSES.SWITCH_PROXY, + exports.STATUSES.TEMPORARY_REDIRECT, + exports.STATUSES.PERMANENT_REDIRECT, + exports.STATUSES.BAD_REQUEST, + exports.STATUSES.UNAUTHORIZED, + exports.STATUSES.PAYMENT_REQUIRED, + exports.STATUSES.FORBIDDEN, + exports.STATUSES.NOT_FOUND, + exports.STATUSES.METHOD_NOT_ALLOWED, + exports.STATUSES.NOT_ACCEPTABLE, + exports.STATUSES.PROXY_AUTHENTICATION_REQUIRED, + exports.STATUSES.REQUEST_TIMEOUT, + exports.STATUSES.CONFLICT, + exports.STATUSES.GONE, + exports.STATUSES.LENGTH_REQUIRED, + exports.STATUSES.PRECONDITION_FAILED, + exports.STATUSES.PAYLOAD_TOO_LARGE, + exports.STATUSES.URI_TOO_LONG, + exports.STATUSES.UNSUPPORTED_MEDIA_TYPE, + exports.STATUSES.RANGE_NOT_SATISFIABLE, + exports.STATUSES.EXPECTATION_FAILED, + exports.STATUSES.IM_A_TEAPOT, + exports.STATUSES.PAGE_EXPIRED, + exports.STATUSES.ENHANCE_YOUR_CALM, + exports.STATUSES.MISDIRECTED_REQUEST, + exports.STATUSES.UNPROCESSABLE_ENTITY, + exports.STATUSES.LOCKED, + exports.STATUSES.FAILED_DEPENDENCY, + exports.STATUSES.TOO_EARLY, + exports.STATUSES.UPGRADE_REQUIRED, + exports.STATUSES.PRECONDITION_REQUIRED, + exports.STATUSES.TOO_MANY_REQUESTS, + exports.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL, + exports.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE, + exports.STATUSES.LOGIN_TIMEOUT, + exports.STATUSES.NO_RESPONSE, + exports.STATUSES.RETRY_WITH, + exports.STATUSES.BLOCKED_BY_PARENTAL_CONTROL, + exports.STATUSES.UNAVAILABLE_FOR_LEGAL_REASONS, + exports.STATUSES.CLIENT_CLOSED_LOAD_BALANCED_REQUEST, + exports.STATUSES.INVALID_X_FORWARDED_FOR, + exports.STATUSES.REQUEST_HEADER_TOO_LARGE, + exports.STATUSES.SSL_CERTIFICATE_ERROR, + exports.STATUSES.SSL_CERTIFICATE_REQUIRED, + exports.STATUSES.HTTP_REQUEST_SENT_TO_HTTPS_PORT, + exports.STATUSES.INVALID_TOKEN, + exports.STATUSES.CLIENT_CLOSED_REQUEST, + exports.STATUSES.INTERNAL_SERVER_ERROR, + exports.STATUSES.NOT_IMPLEMENTED, + exports.STATUSES.BAD_GATEWAY, + exports.STATUSES.SERVICE_UNAVAILABLE, + exports.STATUSES.GATEWAY_TIMEOUT, + exports.STATUSES.HTTP_VERSION_NOT_SUPPORTED, + exports.STATUSES.VARIANT_ALSO_NEGOTIATES, + exports.STATUSES.INSUFFICIENT_STORAGE, + exports.STATUSES.LOOP_DETECTED, + exports.STATUSES.BANDWIDTH_LIMIT_EXCEEDED, + exports.STATUSES.NOT_EXTENDED, + exports.STATUSES.NETWORK_AUTHENTICATION_REQUIRED, + exports.STATUSES.WEB_SERVER_UNKNOWN_ERROR, + exports.STATUSES.WEB_SERVER_IS_DOWN, + exports.STATUSES.CONNECTION_TIMEOUT, + exports.STATUSES.ORIGIN_IS_UNREACHABLE, + exports.STATUSES.TIMEOUT_OCCURED, + exports.STATUSES.SSL_HANDSHAKE_FAILED, + exports.STATUSES.INVALID_SSL_CERTIFICATE, + exports.STATUSES.RAILGUN_ERROR, + exports.STATUSES.SITE_IS_OVERLOADED, + exports.STATUSES.SITE_IS_FROZEN, + exports.STATUSES.IDENTITY_PROVIDER_AUTHENTICATION_ERROR, + exports.STATUSES.NETWORK_READ_TIMEOUT, + exports.STATUSES.NETWORK_CONNECT_TIMEOUT + ]; + exports.ALPHA = []; + for (let i2 = "A".charCodeAt(0); i2 <= "Z".charCodeAt(0); i2++) { + exports.ALPHA.push(String.fromCharCode(i2)); + exports.ALPHA.push(String.fromCharCode(i2 + 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.URL_CHAR = [ + "!", + '"', + "$", + "%", + "&", + "'", + "(", + ")", + "*", + "+", + ",", + "-", + ".", + "/", + ":", + ";", + "<", + "=", + ">", + "@", + "[", + "\\", + "]", + "^", + "_", + "`", + "{", + "|", + "}", + "~" + ].concat(exports.ALPHANUM); + exports.HEX = exports.NUM.concat(["a", "b", "c", "d", "e", "f", "A", "B", "C", "D", "E", "F"]); + exports.TOKEN = [ + "!", + "#", + "$", + "%", + "&", + "'", + "*", + "+", + "-", + ".", + "^", + "_", + "`", + "|", + "~" + ].concat(exports.ALPHANUM); + exports.HEADER_CHARS = [" "]; + for (let i2 = 32; i2 <= 255; i2++) { + if (i2 !== 127) { + exports.HEADER_CHARS.push(i2); + } + } + exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c2) => c2 !== 44); + exports.QUOTED_STRING = [" ", " "]; + for (let i2 = 33; i2 <= 255; i2++) { + if (i2 !== 34 && i2 !== 92) { + exports.QUOTED_STRING.push(i2); + } + } + exports.HTAB_SP_VCHAR_OBS_TEXT = [" ", " "]; + for (let i2 = 33; i2 <= 126; i2++) { + exports.HTAB_SP_VCHAR_OBS_TEXT.push(i2); + } + for (let i2 = 128; i2 <= 255; i2++) { + exports.HTAB_SP_VCHAR_OBS_TEXT.push(i2); + } + exports.MAJOR = exports.NUM_MAP; + exports.MINOR = exports.MAJOR; + exports.SPECIAL_HEADERS = { + "connection": exports.HEADER_STATE.CONNECTION, + "content-length": exports.HEADER_STATE.CONTENT_LENGTH, + "proxy-connection": exports.HEADER_STATE.CONNECTION, + "transfer-encoding": exports.HEADER_STATE.TRANSFER_ENCODING, + "upgrade": exports.HEADER_STATE.UPGRADE + }; + exports.default = { + ERROR: exports.ERROR, + TYPE: exports.TYPE, + FLAGS: exports.FLAGS, + LENIENT_FLAGS: exports.LENIENT_FLAGS, + METHODS: exports.METHODS, + STATUSES: exports.STATUSES, + FINISH: exports.FINISH, + HEADER_STATE: exports.HEADER_STATE, + ALPHA: exports.ALPHA, + NUM_MAP: exports.NUM_MAP, + HEX_MAP: exports.HEX_MAP, + NUM: exports.NUM, + ALPHANUM: exports.ALPHANUM, + MARK: exports.MARK, + USERINFO_CHARS: exports.USERINFO_CHARS, + URL_CHAR: exports.URL_CHAR, + HEX: exports.HEX, + TOKEN: exports.TOKEN, + HEADER_CHARS: exports.HEADER_CHARS, + CONNECTION_TOKEN_CHARS: exports.CONNECTION_TOKEN_CHARS, + QUOTED_STRING: exports.QUOTED_STRING, + HTAB_SP_VCHAR_OBS_TEXT: exports.HTAB_SP_VCHAR_OBS_TEXT, + MAJOR: exports.MAJOR, + MINOR: exports.MINOR, + SPECIAL_HEADERS: exports.SPECIAL_HEADERS, + METHODS_HTTP: exports.METHODS_HTTP, + METHODS_ICE: exports.METHODS_ICE, + METHODS_RTSP: exports.METHODS_RTSP, + METHOD_MAP: exports.METHOD_MAP, + H_METHOD_MAP: exports.H_METHOD_MAP, + STATUSES_HTTP: exports.STATUSES_HTTP + }; } - 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]; - } +// node_modules/undici/lib/llhttp/llhttp-wasm.js +var require_llhttp_wasm = __commonJS({ + "node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports, module3) { + "use strict"; + var { Buffer: Buffer2 } = __require("node:buffer"); + var wasmBase64 = "AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEBAwAAAwAAAAQFAXABExMFAwEAAgYIAX8BQcDZBA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RkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgL5YUCAgd/A34gASACaiEEAkAgACIDKAIMIgANACADKAIEBEAgAyABNgIECyMAQRBrIgkkAAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAygCHCICQQJrDvwBAfkBAgME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gtBwgEMHQtBAQwcC0HDAQwbC0HEAQwaC0HFAQwZC0HGAQwYC0HHAQwXC0HIAQwWC0HJAQwVC0HKAQwUC0HLAQwTC0HMAQwSC0HNAQwRC0HOAQwQC0HPAQwPC0HQAQwOC0HRAQwNC0HSAQwMC0HTAQwLC0HUAQwKC0HVAQwJC0HWAQwIC0HjAQwHC0HXAQwGC0HYAQwFC0HZAQwEC0HaAQwDC0HbAQwCC0HdAQwBC0HcAQshAgNAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJ/AkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJA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JDYCHCADIAE2AhQgA0GbGzYCECADQRU2AgxBACECDJQDC0EAIQIgA0EANgIcIAMgATYCFCADQZAONgIQIANBFDYCDAyTAwtBACECIANBADYCHCADIAE2AhQgA0G+IDYCECADQQI2AgwMkgMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABIAynaiIBEDIiAEUNKyADQQc2AhwgAyABNgIUIAMgADYCDAyRAwsgAy0ALkHAAHFFDQELQQAhAAJAIAMoAjgiAkUNACACKAJYIgJFDQAgAyACEQAAIQALIABFDSsgAEEVRgRAIANBCjYCHCADIAE2AhQgA0HrGTYCECADQRU2AgxBACECDJADC0EAIQIgA0EANgIcIAMgATYCFCADQZMMNgIQIANBEzYCDAyPAwtBACECIANBADYCHCADIAE2AhQgA0GCFTYCECADQQI2AgwMjgMLQQAhAiADQQA2AhwgAyABNgIUIANB3RQ2AhAgA0EZNgIMDI0DC0EAIQIgA0EANgIcIAMgATYCFCADQeYdNgIQIANBGTYCDAyMAwsgAEEVRg09QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIsDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFDSggA0ENNgIcIAMgATYCFCADIAA2AgwMigMLIABBFUYNOkEAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAyJAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMyIARQRAIAFBAWohAQwoCyADQQ42AhwgAyAANgIMIAMgAUEBajYCFAyIAwsgAEEVRg03QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIcDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDCcLIANBDzYCHCADIAA2AgwgAyABQQFqNgIUDIYDC0EAIQIgA0EANgIcIAMgATYCFCADQeIXNgIQIANBGTYCDAyFAwsgAEEVRg0zQQAhAiADQQA2AhwgAyABNgIUIANB1gw2AhAgA0EjNgIMDIQDCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgB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L4CC0HlACECDL0CCyADQT02AhwgAyABNgIUIAMgADYCDEEAIQIM1QILIANBGzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDNQCCyADQSA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzTAgsgA0ETNgIcIAMgATYCFCADQZgaNgIQIANBFTYCDEEAIQIM0gILIANBCzYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNECCyADQRA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzQAgsgA0EgNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIMzwILIANBCzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDM4CCyADQQw2AhwgAyABNgIUIANBpBw2AhAgA0EVNgIMQQAhAgzNAgtBACECIANBADYCHCADIAE2AhQgA0HdDjYCECADQRI2AgwMzAILAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB/QEhAgzMAgsCQAJAIAMtADZBAUcNAEEAIQACQCADKAI4IgJFDQAgAigCYCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUcNASADQfwBNgIcIAMgATYCFCADQdwZNgIQIANBFTYCDEEAIQIMzQILQdwBIQIMswILIANBADYCHCADIAE2AhQgA0H5CzYCECADQR82AgxBACECDMsCCwJAAkAgAy0AKEEBaw4CBAEAC0HbASECDLICC0HUASECDLECCyADQQI6ADFBACEAAkAgAygCOCICRQ0AIAIoAgAiAkUNACADIAIRAAAhAAsgAEUEQEHdASECDLECCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQbQMNgIQIANBEDYCDEEAIQIMygILIANB+wE2AhwgAyABNgIUIANBgRo2AhAgA0EVNgIMQQAhAgzJAgsgASAERgRAQfoBIQIMyQILIAEtAABByABGDQEgA0EBOgAoC0HAASECDK4CC0HaASECDK0CCyABIARHBEAgA0EMNgIIIAMgATYCBEHZASECDK0CC0H5ASECDMUCCyABIARGBEBB+AEhAgzFAgsgAS0AAEHIAEcNBCABQQFqIQFB2AEhAgyrAgsgASAERgRAQfcBIQIMxAILAkACQCABLQAAQcUAaw4QAAUFBQUFBQUFBQUFBQUFAQULIAFBAWohAUHWASECDKsCCyABQQFqIQFB1wEhAgyqAgtB9gEhAiABIARGDcICIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbrVAGotAABHDQMgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMMCCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIARQRAQeMBIQIMqgILIANB9QE2AhwgAyABNgIUIAMgADYCDEEAIQIMwgILQfQBIQIgASAERg3BAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEG41QBqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzCAgsgA0GBBDsBKCADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIADQMMAgsgA0EANgIAC0EAIQIgA0EANgIcIAMgATYCFCADQeUfNgIQIANBCDYCDAy/AgtB1QEhAgylAgsgA0HzATYCHCADIAE2AhQgAyAANgIMQQAhAgy9AgtBACEAAkAgAygCOCICRQ0AIAIoAkAiAkUNACADIAIRAAAhAAsgAEUNbiAAQRVHBEAgA0EANgIcIAMgATYCFCADQYIPNgIQIANBIDYCDEEAIQIMvQILIANBjwE2AhwgAyABNgIUIANB7Bs2AhAgA0EVNgIMQQAhAgy8AgsgASAERwRAIANBDTYCCCADIAE2AgRB0wEhAgyjAgtB8gEhAgy7AgsgASAERgRAQfEBIQIMuwILAkACQAJAIAEtAABByABrDgsAAQgICAgICAgIAggLIAFBAWohAUHQASECDKMCCyABQQFqIQFB0QEhAgyiAgsgAUEBaiEBQdIBIQIMoQILQfABIQIgASAERg25AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBtdUAai0AAEcNBCAAQQJGDQMgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuQILQe8BIQIgASAERg24AiADKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABBs9UAai0AAEcNAyAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuAILQe4BIQIgASAERg23AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMtwILIAMoAgQhACADQgA3AwAgAyAAIAVBAWoiARArIgBFDQIgA0HsATYCHCADIAE2AhQgAyAANgIMQQAhAgy2AgsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNnAIgA0HtATYCHCADIAE2AhQgAyAANgIMQQAhAgy0AgtBzwEhAgyaAgtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDLQCC0HOASECDJoCCyADQesBNgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMsgILIAEgBEYEQEHrASECDLICCyABLQAAQS9GBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GyODYCECADQQg2AgxBACECDLECC0HNASECDJcCCyABIARHBEAgA0EONgIIIAMgATYCBEHMASECDJcCC0HqASECDK8CCyABIARGBEBB6QEhAgyvAgsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFBywEhAgyWAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZcCIANB6AE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAEgBEYEQEHnASECDK4CCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5gE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILQcoBIQIMlAILIAEgBEYEQEHlASECDK0CC0EAIQBBASEFQQEhB0EAIQICQAJAAkACQAJAAn8CQAJAAkACQAJAAkAC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Amo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqgILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKkCC0HFASECDI8CCyABIARGBEBB3gEhAgyoAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKkCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyoAgtBxAEhAgyOAgsgASAERgRAQd0BIQIMpwILAkACQAJAAkAgAS0AAEEKaw4XAgMDAAMDAwMDAwMDAwMDAwMDAwMDAwEDCyABQQFqDAULIAFBAWohAUHDASECDI8CCyABQQFqIQEgA0Evai0AAEEBcQ0IIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKcCCyADQQA2AhwgAyABNgIUIANBjQs2AhAgA0ENNgIMQQAhAgymAgsgASAERwRAIANBDzYCCCADIAE2AgRBASECDI0CC0HcASECDKUCCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtB2wEhAgymAgsgAygCBCEAIANBADYCBCADIAAgARAtIgBFBEAgAUEBaiEBDAQLIANB2gE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMpQILIAMoAgQhACADQQA2AgQgAyAAIAEQLSIADQEgAUEBagshAUHBASECDIoCCyADQdkBNgIcIAMgADYCDCADIAFBAWo2AhRBACECDKICC0HCASECDIgCCyADQS9qLQAAQQFxDQEgA0EANgIcIAMgATYCFCADQeQcNgIQIANBGTYCDEEAIQIMoAILIAEgBEYEQEHZASECDKACCwJAAkACQCABLQAAQQprDgQBAgIAAgsgAUEBaiEBDAILIAFBAWohAQwBCyADLQAuQcAAcUUNAQtBACEAAkAgAygCOCICRQ0AIAIoAjwiAkUNACADIAIRAAAhAAsgA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BaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7gELIANBADYCACAGQQFqIQFBHgwaC0GoASECIAEgBEYN7AEgAygCACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCABLQAAIABBytQAai0AAEcNGSAAQQZGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7QELIANBADYCACAGQQFqIQFBFQwZC0GnASECIAEgBEYN6wEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBx9QAai0AAEcNGCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7AELIANBADYCACAGQQFqIQFBFwwYC0GmASECIAEgBEYN6gEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBwdQAai0AAEcNFyAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6wELIANBADYCACAGQQFqIQFBGAwXCyABIARGBEBBpQEhAgzqAQsCQAJAIAEtAABByQBrDgcAGRkZGRkBGQsgAUEBaiEBQYsBIQIM0QELIAFBAWohAUGMASECDNABC0GkASECIAEgBEYN6AEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBptUAai0AAEcNFSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6QELIANBADYCACAGQQFqIQFBCQwVC0GjASECIAEgBEYN5wEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBpNUAai0AAEcNFCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6AELIANBADYCACAGQQFqIQFBHwwUC0GiASECIAEgBEYN5gEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBvtQAai0AAEcNEyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5wELIANBADYCACAGQQFqIQFBAgwTC0GhASECIAEgBEYN5QEgAygCACIAIAQgAWt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hAgzDAQsgAUEBaiEBQf8AIQIMwgELIAEgBEYEQEGXASECDNsBCyABLQAAQdkARw0IIAFBAWohAUEIDAcLQZYBIQIgASAERg3ZASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEGs1ABqLQAARw0GIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzaAQsgA0EANgIAIAZBAWohAUEFDAYLQZUBIQIgASAERg3YASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGm1ABqLQAARw0FIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzZAQsgA0EANgIAIAZBAWohAUEWDAULQZQBIQIgASAERg3XASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGh1QBqLQAARw0EIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzYAQsgA0EANgIAIAZBAWohAUEQDAQLIAEgBEYEQEGTASECDNcBCwJAAkAgAS0AAEHDAGsODAAGBgYGBgYGBgYGAQYLIAFBAWohAUH5ACECDL4BCyABQQFqIQFB+gAhAgy9AQtBkgEhAiABIARGDdUBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQaDUAGotAABHDQIgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNYBCyADQQA2AgAgBkEBaiEBQSQMAgsgA0EANgIADAILIAEgBEYEQEGRASECDNQBCyABLQAAQcwARw0BIAFBAWohAUETCzoAKSADKAIEIQAgA0EANgIEIAMgACABEC4iAA0CDAELQQAhAiADQQA2AhwgAyABNgIUIANB/h82AhAgA0EGNgIMDNEBC0H4ACECDLcBCyADQZABNgIcIAMgATYCFCADIAA2AgxBACECDM8BC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUYNASADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgzOAQtB9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ARQ0IIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIANBADYCHCADIAE2AhQgA0GNFDYCECADQQc2AgxBACECDKgBCwJAAkACQAJAA0AgAS0AAEGgygBqLQAAIgBBBUcEQAJAIABBAWsOBi4DBAUGAAYLQegAIQIMlAELIAQgAUEBaiIBRw0AC0H9ACECDKsBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQdsANgIcIAMgATYCFCADIAA2AgxBACECDKoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDKkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQfoANgIcIAMgATYCFCADIAA2AgxBACECDKgBCyADQQA2AhwgAyABNgIUIANB5Ag2AhAgA0EHNgIMQQAhAgynAQsgASAERg0BIAFBAWoLIQFBBiECDIwBC0H8ACECDKQBCwJAAkACQAJAA0AgAS0AAEGgyABqLQAAIgBBBUcEQCAAQQFrDgQpAgMEBQsgBCABQQFqIgFHDQALQfsAIQIMpwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMpgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMpQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMpAELIANBADYCHCADIAE2AhQgA0G8CjYCECADQQc2AgxBACECDKMBC0HPACECDIkBC0HRACECDIgBC0HnACECDIcBCyABIARGBEBB+gAhAgygAQsCQCABLQAAQQlrDgQgAAAgAAsgAUEBaiEBQeYAIQIMhg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8LQQAhAAJAIAMoAjgiAkUNACACKAI0IgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANB6g02AhAgA0EmNgIMQQAhAgyZAQtB3gAhAgx/CyADQfAANgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMlwELIAMtAClBIUYNBiADQQA2AhwgAyABNgIUIANBkQo2AhAgA0EINgIMQQAhAgyWAQtB7wAhAiABIARGDZUBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDVAGotAABHDQIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJYBCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQKyIARQ0CIANB7QA2AhwgAyABNgIUIAMgADYCDEEAIQIMlQELIANBADYCAAsgAygCBCEAIANBADYCBCADIAAgARArIgBFDYABIANB7gA2AhwgAyABNgIUIAMgADYCDEEAIQIMkwELQdwAIQIMeQtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJMBC0HbACECDHkLIANB7AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyRAQsgAy0AKSIAQSNJDQAgAEEuRg0AIANBADYCHCADIAE2AhQgA0HJCTYCECADQQg2AgxBACECDJABC0HaACECDHYLIAEgBEYEQEHrACECDI8BCwJAIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMjwELQdkAIQIMdQsgASAERwRAIANBDjYCCCADIAE2AgRB2AAhAgx1C0HqACECDI0BCyABIARGBEBB6QAhAgyNAQsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFB1wAhAgx0CyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeiADQegANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyABIARGBEBB5wAhAgyMAQsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ17IANB5gA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELQdYAIQIMcgsgASAERgRAQeUAIQIMiwELQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIANgIcIAMgATYCFCADIAA2AgxBACECDI0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNfSADQeMANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeyADQeQANgIcIAMgATYCFCADIAA2AgwMiwELQdQAIQIMcQsgAy0AKUEiRg2GAUHTACECDHALQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALIABFBEBB1QAhAgxwCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQaQNNgIQIANBITYCDEEAIQIMiQELIANB4QA2AhwgAyABNgIUIANB0Bo2AhAgA0EVNgIMQQAhAgyIAQsgASAERgRAQeAAIQIMiAELAkACQAJAAkACQCABLQAAQQprDgQBBAQABAsgAUEBaiEBDAELIAFBAWohASADQS9qLQAAQQFxRQ0BC0HSACECDHALIANBADYCHCADIAE2AhQgA0G2ETYCECADQQk2AgxBACECDIgBCyADQQA2AhwgAyABNgIUIANBthE2AhAgA0EJNgIMQQAhAgyHAQsgASAERgRAQd8AIQIMhwELIAEtAABBCkYEQCABQQFqIQEMCQsgAy0ALkHAAHENCCADQQA2AhwgAyABNgIUIANBthE2AhAgA0ECNgIMQQAhAgyGAQsgASAERgRAQd0AIQIMhgELIAEtAAAiAkENRgRAIAFBAWohAUHQACECDG0LIAEhACACQQlrDgQFAQEFAQsgBCABIgBGBEBB3AAhAgyFAQsgAC0AAEEKRw0AIABBAWoMAgtBACECIANBADYCHCADIAA2AhQgA0HKLTYCECADQQc2AgwMgwELIAEgBEYEQEHbACECDIMBCwJAIAEtAABBCWsOBAMAAAMACyABQQFqCyEBQc4AIQIMaAsgASAERgRAQdoAIQIMgQELIAEtAABBCWsOBAABAQABC0EAIQIgA0EANgIcIANBmhI2AhAgA0EHNgIMIAMgAUEBajYCFAx/CyADQYASOwEqQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2QA2AhwgAyABNgIUIANB6ho2AhAgA0EVNgIMQQAhAgx+C0HNACECDGQLIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDHwLIAEgBEYEQEHZACECDHwLIAEtAABBIEcNPSABQQFqIQEgAy0ALkEBcQ09IANBADYCHCADIAE2AhQgA0HCHDYCECADQR42AgxBACECDHsLIAEgBEYEQEHYACECDHsLAkACQAJAAkACQCABLQAAIgBBCmsOBAIDAwABCyABQQFqIQFBLCECDGULIABBOkcNASADQQA2AhwgAyABNgIUIANB5xE2AhAgA0EKNgIMQQAhAgx9CyABQQFqIQEgA0Evai0AAEEBcUUNcyADLQAyQYABcUUEQCADQTJqIQIgAxA1QQAhAAJAIAMoAjgiBkUNACAGKAIoIgZFDQAgAyAGEQAAIQALAkACQCAADhZNTEsBAQEBAQEBAQEBAQEBAQEBAQEAAQsgA0EpNgIcIAMgATYCFCADQawZNgIQIANBFTYCDEEAIQIMfgsgA0EANgIcIAMgATYCFCADQeULNgIQIANBETYCDEEAIQIMfQtBACEAAkAgAygCOCICRQ0AIAIoAlwiAkUNACADIAIRAAAhAAsgAEUNWSAAQRVHDQEgA0EFNgIcIAMgATYCFCAD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ABLQAAQQprDgQAAgIBAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFDQIgA0EzNgIcIAMgATYCFCADIAA2AgxBACECDFULIAMoAgQhACADQQA2AgQgAyAAIAEQMSIARQRAIAFBAWohAQwGCyADQTI2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMVAsgAy0ALkEBcQRAQd8BIQIMOwsgAygCBCEAIANBADYCBCADIAAgARAxIgANAQxJC0E0IQIMOQsgA0E1NgIcIAMgATYCFCADIAA2AgxBACECDFELQTUhAgw3CyADQS9qLQAAQQFxDQAgA0EANgIcIAMgATYCFCADQesWNgIQIANBGTYCDEEAIQIMTwtBMyECDDULIAEgBEYEQEEyIQIMTgsCQCABLQAAQQpGBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GSFzYCECADQQM2AgxBACECDE4LQTIhAgw0CyABIARGBEBBMSECDE0LAkAgAS0AACIAQQlGDQAgAEEgRg0AQQEhAgJAIAMtACxBBWsOBAYEBQANCyADIAMvATJBCHI7ATIMDAsgAy0ALkEBcUUNASADLQAsQQhHDQAgA0EAOgAsC0E9IQIMMgsgA0EANgIcIAMgATYCFCADQcIWNgIQIANBCjYCDEEAIQIMSgtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiACcjsBMgwGCyABIARGBEBBMCECDEcLIAEtAABBCkYEQCABQQFqIQEMAQsgAy0ALkEBcQ0AIANBADYCHCADIAE2AhQgA0HcKDYCECADQQI2AgxBACECDEYLQTAhAgwsCyABQQFqIQFBMSECDCsLIAEgBEYEQEEvIQIMRAsgAS0AACIAQQlHIABBIEdxRQRAIAFBAWohASADLQAuQQFxDQEgA0EANgIcIAMgATYCFCADQZcQNgIQIANBCjYCDEEAIQIMRAtBASECAkACQAJAAkACQAJAIAMtACxBAmsOBwUEBAMBAgAECyADIAMvATJBCHI7ATIMAwtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiACcjsBMgtBLyECDCsLIANBADYCHCADIAE2AhQgA0GEEzYCECADQ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ACAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAEGpzgALBQECAAEDAEHAzgALXwQFAAAFBQUFBQUFBQUFBQYFBQUFBQUFBQUFBQUABQAHCAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQAFAAUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEGp0AALBQEBAAEBAEHA0AALAQEAQdrQAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQanSAAsFAQEAAQEAQcDSAAsBAQBBytIACwYCAAAAAAIAQeHSAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw=="; + var wasmBuffer; + Object.defineProperty(module3, "exports", { + get: () => { + return wasmBuffer ? wasmBuffer : wasmBuffer = Buffer2.from(wasmBase64, "base64"); + } + }); } - 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 = 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/, "")); +// node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +var require_llhttp_simd_wasm = __commonJS({ + "node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports, module3) { + "use strict"; + var { Buffer: Buffer2 } = __require("node:buffer"); + var wasmBase64 = "AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEBAwAAAwAAAAQFAXABExMFAwEAAgYIAX8BQcDZBAsHxQcoBm1lbW9yeQIAC19pbml0aWFsaXplAAgZX19pbmRpcmVjdF9mdW5jdGlvbl90YWJsZQEAC2xsaHR0cF9pbml0AAkYbGxodHRwX3Nob3VsZF9rZWVwX2FsaXZlADcMbGxodHRwX2FsbG9jAAsGbWFsbG9jADkLbGxodHRwX2ZyZWUADARmcmVlAAwPbGxodHRwX2dldF90eXBlAA0VbGxodHRwX2dldF9odHRwX21ham9yAA4VbGxodHRwX2dldF9odHRwX21pbm9yAA8RbGxodHRwX2dldF9tZXRob2QAEBZsbGh0dHBfZ2V0X3N0YXR1c19jb2RlABESbGxodHRwX2dldF91cGdyYWRlABIMbGxodHRw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CDAwDCyAFQRRqIgMoAgAiAkUEQCAFKAIQIgJFDQIgBUEQaiEDCwNAIAMhByACIgBBFGoiAygCACICDQAgAEEQaiEDIAAoAhAiAg0ACyAHQQA2AgAMAgsgBSAAQX5xNgIEIAEgBGogBDYCACABIARBAXI2AgQMAwtBACEACyAGRQ0AAkAgBSgCHCICQQJ0QfTXAGoiAygCACAFRgRAIAMgADYCACAADQFByNUAQcjVACgCAEF+IAJ3cTYCAAwCCyAGQRBBFCAGKAIQIAVGG2ogADYCACAARQ0BCyAAIAY2AhggBSgCECICBEAgACACNgIQIAIgADYCGAsgBUEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgBGogBDYCACABIARBAXI2AgQgAUHY1QAoAgBHDQBBzNUAIAQ2AgAMAQsgBEH/AU0EQCAEQXhxQezVAGohAAJ/QcTVACgCACICQQEgBEEDdnQiA3FFBEBBxNUAIAIgA3I2AgAgAAwBCyAAKAIICyICIAE2AgwgACABNgIIIAEgADYCDCABIAI2AggMAQtBHyECIARB////B00EQCAEQSYgBEEIdmciAGt2QQFxIABBAXRrQT5qIQILIAEgAjYCHCABQgA3AhAgAkECdEH01wBqIQACQEHI1QAoAgAiA0EBIAJ0IgdxRQRAIAAgATYCAEHI1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE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AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAn8CQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAwJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCACDuMBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISMkJScoKZ4DmwOaA5EDigODA4AD/QL7AvgC8gLxAu8C7QLoAucC5gLlAuQC3ALbAtoC2QLYAtcC1gLVAs8CzgLMAssCygLJAsgCxwLGAsQCwwK+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ADQSM2AgwM+wILIANBFDYCHCADIAE2AhQgAyAANgIMDPoCCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgBFBEAgAUEBaiEBDPUCCyADQRU2AhwgAyAANgIMIAMgAUEBajYCFAz5AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQzzAgsgA0EXNgIcIAMgADYCDCADIAFBAWo2AhQM+AILIABBFUYNI0EAIQIgA0EANgIcIAMgATYCFCADQdYMNgIQIANBIzYCDAz3AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQwdCyADQRk2AhwgAyAANgIMIAMgAUEBajYCFAz2AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQzvAgsgA0EaNgIcIAMgADYCDCADIAFBAWo2AhQM9QILIABBFUYNH0EAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAz0AgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDBsLIANBHDYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgzzAgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDOsCCyADQR02AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM8gILIABBO0cNASABQQFqIQELQSYhAgzXAgtBACECIANBADYCHCADIAE2AhQgA0GfFTYCECADQQw2AgwM7wILIAEgBEcEQANAIAEtAABBIEcNhAIgBCABQQFqIgFHDQALQSwhAgzvAgtBLCECDO4CCyABIARGBEBBNCECDO4CCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtBNCECDO8CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNnwIgA0EyNgIcIAMgATYCFCADIAA2AgxBACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUEQCABQQFqIQEMnwILIANBMjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgztAgsgASAERwRAAkADQCABLQAAQTBrIgBB/wFxQQpPBEBBOiECDNcCCyADKQMgIgtCmbPmzJmz5swZVg0BIAMgC0IKfiIKNwMgIAogAK1C/wGDIgtCf4VWDQEgAyAKIAt8NwMgIAQgAUEBaiIBRw0AC0HAACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABQQFqIgEQMSIADRcM4gILQcAAIQIM7AILIAEgBEYEQEHJACECDOwCCwJAA0ACQCABLQAAQQlrDhgAAqICogKpAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAgCiAgsgBCABQQFqIgFHDQALQckAIQIM7AILIAFBAWohASADQS9qLQAAQQFxDaUCIANBADYCHCADIAE2AhQgA0GXEDYCECADQQo2AgxBACECDOsCCyABIARHBEADQCABLQAAQSBHDRUgBCABQQFqIgFHDQALQfgAIQIM6wILQfgAIQIM6gILIANBAjoAKAw4C0EAIQIgA0EANgIcIANBvws2AhAgA0ECNgIMIAMgAUEBajYCFAzoAgtBACECDM4CC0ENIQIMzQILQRMhAgzMAgtBFSECDMsCC0EWIQIMygILQRghAgzJAgtBGSECDMgCC0EaIQIMxwILQRshAgzGAgtBHCECDMUCC0EdIQIMxAILQR4hAgzDAgtBHyECDMICC0EgIQIMwQILQSIhAgzAAgtBIyECDL8CC0ElIQIMvgILQeUAIQIMvQILIANBPTYCHCADIAE2AhQgAyAANgIMQQAhAgzVAgsgA0EbNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIM1AILIANBIDYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNMCCyADQRM2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzSAgsgA0ELNgIcIAMgATYCFCADQZgaNgIQIANBFTYCDEEAIQIM0QILIANBEDYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNACCyADQSA2AhwgAyABNgIUIANBpBw2AhAgA0EVNgIMQQAhAgzPAgsgA0ELNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIMzgILIANBDDYCHC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FraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjVAGotAABHDQIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMICCyADQYEEOwEoIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgANAwwCCyADQQA2AgALQQAhAiADQQA2AhwgAyABNgIUIANB5R82AhAgA0EINgIMDL8CC0HVASECDKUCCyADQfMBNgIcIAMgATYCFCADIAA2AgxBACECDL0CC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ1uIABBFUcEQCADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgy9AgsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDLwCCyABIARHBEAgA0ENNgIIIAMgATYCBEHTASECDKMCC0HyASECDLsCCyABIARGBEBB8QEhAgy7AgsCQAJAAkAgAS0AAEHIAGsOCwABCAgICAgICAgCCAsgAUEBaiEBQdABIQIMowILIAFBAWohAUHRASECDKICCyABQQFqIQFB0gEhAgyhAgtB8AEhAiABIARGDbkCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEG11QBqLQAARw0EIABBAkYNAyAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy5AgtB7wEhAiABIARGDbgCIAMoAgAiACAEIAFraiEGIAEgAGtBAWohBQNAIAEtAAAgAEGz1QBqLQAARw0DIABBAUYNAiAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy4AgtB7gEhAiABIARGDbcCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEGw1QBqLQAARw0CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy3AgsgAygCBCEAIANCADcDACADIAAgBUEBaiIBECsiAEUNAiADQewBNgIcIAMgATYCFCADIAA2AgxBACECDLYCCyADQQA2AgALIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ2cAiADQe0BNgIcIAMgATYCFCADIAA2AgxBACECDLQCC0HPASECDJoCC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMtAILQc4BIQIMmgILIANB6wE2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyyAgsgASAERgRAQesBIQIMsgILIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMsQILQc0BIQIMlwILIAEgBEcEQCADQQ42AgggAyABNgIEQcwBIQIMlwILQeoBIQIMrwILIAEgBEYEQEHpASECDK8CCyABLQAAQTBrIgBB/wFxQQpJBEAgAyAAOgAqIAFBAWohAUHLASECDJYCCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNlwIgA0HoATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgASAERgRAQecBIQIMrgILAkAgAS0AAEEuRgRAIAFBAWohAQwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmAIgA0HmATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgtBygEhAgyUAgsgASAERgRAQeUBIQIMrQILQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIBNgIcIAMgATYCFCADIAA2AgxBACECDK8CCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmgIgA0HjATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5AE2AhwgAyABNgIUIAMgADYCDAytAgtByQEhAgyTAgtBACEAAkAgAygCOCICRQ0AIAIoAkQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GkDTYCECADQSE2AgxBACECDK0CC0HIASECDJMCCyADQeEBNgIcIAMgATYCFCADQdAaNgIQIANBFTYCDEEAIQIMqwILIAEgBEYEQEHhASECDKsCCwJAIAEtAABBIEYEQCADQQA7ATQgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GZETYCECADQQk2AgxBACECDKsCC0HHASECDJECCyABIARGBEBB4AEhAgyqAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKsCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyqAgtBxgEhAgyQAgsgASAERgRAQd8BIQIMqQILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyqAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqQILQcUBIQIMjwILIAEgBEYEQEHeASECDKgCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqQILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKgCC0HEASECDI4CCyABIARGBEBB3QEhAgynAgsCQAJAAkACQCABLQAAQQprDhcCAwMAAwMDAwMDAwMDAwMDAwMDAwMDAQMLIAFBAWoMBQsgAUEBaiEBQcMBIQIMjwILIAFBAWohASADQS9qLQAAQQFxDQggA0EANgIcIAMgATYCFCADQY0LNgIQIANBDTYCDEEAIQIMpwILIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKYCCyABIARHBEAgA0EPNgIIIAMgATYCBEEBIQIMjQILQdwBIQIMpQILAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0HbASECDKYCCyADKAIEIQAgA0EANgIEIAMgACABEC0iAEUEQCABQQFqIQEMBAsgA0HaATYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgylAgsgAygCBCEAIANBADYCBCADIAAgARAtIgANASABQQFqCyEBQcEBIQIMigILIANB2QE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMogILQcIBIQIMiAILIANBL2otAABBAXENASADQQA2AhwgAyABNgIUIANB5Bw2AhAgA0EZNgIMQQAhAgygAgsgASAERgRAQdkBIQIMoAILAkACQAJAIAEtAABBCmsOBAECAgACCyABQQFqIQEMAgsgAUEBaiEBDAELIAMtAC5BwABxRQ0BC0EAIQACQCADKAI4IgJFDQAgAigCPCICRQ0AIAMgAhEAACEACyAARQ2gASAAQRVGBEAgA0HZADYCHCADIAE2AhQgA0G3GjYCECADQRU2AgxBACECDJ8CCyADQQA2AhwgAyABNgIUIANBgA02AhAgA0EbNgIMQQAhAgyeAgsgA0EANgIcIAMgATYCFCADQdwoNgIQIANBAjYCDEEAIQIMnQILIAEgBEcEQCADQQw2AgggAyABNgIEQb8BIQIMhAILQdgBIQIMnAILIAEgBEYEQEHXASECDJwCCwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEHBAGsOFQABAgNaBAUGWlpaBwgJCgsMDQ4PEFoLIAFBAWohAUH7ACECDJICCyABQQFqIQFB/AAhAgyRAgsgAUEBaiEBQYEBIQI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8PAE8CyABQQFqIQFBrgEhAgz0AQsgAUEBaiEBQa8BIQIM8wELQccBIQIgASAERg2LAiADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw04IABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyMAgsgA0EANgIAIAZBAWohAUEqDDgLIAEgBEYEQEHGASECDIsCCyABLQAAQdAARw04IAFBAWohAUElDDcLQcUBIQIgASAERg2JAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGB1QBqLQAARw02IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyKAgsgA0EANgIAIAZBAWohAUEODDYLIAEgBEYEQEHEASECDIkCCyABLQAAQcUARw02IAFBAWohAUGrASECDO8BCyABIARGBEBBwwEhAgyIAgsCQAJAAkACQCABLQAAQcIAaw4PAAECOTk5OTk5OTk5OTkDOQsgAUEBaiEBQacBIQIM8QELIAFBAWohAUGoASECDPABCyABQQFqIQFBqQEhAgzvAQsgAUEBaiEBQaoBIQIM7gELQcIBIQIgASAERg2GAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEH+1ABqLQAARw0zIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyHAgsgA0EANgIAIAZBAWohAUEUDDMLQcEBIQIgASAERg2FAiADKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEH51ABqLQAARw0yIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyGAgsgA0EANgIAIAZBAWohAUErDDILQcABIQIgASAERg2EAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEH21ABqLQAARw0xIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyFAgsgA0EANgIAIAZBAWohAUEsDDELQb8BIQIgASAERg2DAiADKAIAIgAgBCABa2ohBSABIABrQQJ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KAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHB1ABqLQAARw0XIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzrAQsgA0EANgIAIAZBAWohAUEYDBcLIAEgBEYEQEGlASECDOoBCwJAAkAgAS0AAEHJAGsOBwAZGRkZGQEZCyABQQFqIQFBiwEhAgzRAQsgAUEBaiEBQYwBIQIM0AELQaQBIQIgASAERg3oASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm1QBqLQAARw0VIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzpAQsgA0EANgIAIAZBAWohAUEJDBULQaMBIQIgASAERg3nASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk1QBqLQAARw0UIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzoAQsgA0EANgIAIAZBAWohAUEfDBQLQaIBIQIgASAERg3mASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEG+1ABqLQAARw0TIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAznAQsgA0EANgIAIAZBAWohAUECDBMLQaEBIQIgASAERg3lASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYDQCABLQAAIABBvNQAai0AAEcNESAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5QELIAEgBEYEQEGgASECDOUBC0EBIAEtAABB3wBHDREaIAFBAWohAUGHASECDMsBCyADQQA2AgAgBkEBaiEBQYgBIQIMygELQZ8BIQIgASAERg3iASADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw0PIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzjAQsgA0EANgIAIAZBAWohAUEpDA8LQZ4BIQIgASAERg3hASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQAN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hAiABIARGDdcBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQaHVAGotAABHDQQgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNgBCyADQQA2AgAgBkEBaiEBQRAMBAsgASAERgRAQZMBIQIM1wELAkACQCABLQAAQcMAaw4MAAYGBgYGBgYGBgYBBgsgAUEBaiEBQfkAIQIMvgELIAFBAWohAUH6ACECDL0BC0GSASECIAEgBEYN1QEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBoNQAai0AAEcNAiAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM1gELIANBADYCACAGQQFqIQFBJAwCCyADQQA2AgAMAgsgASAERgRAQZEBIQIM1AELIAEtAABBzABHDQEgAUEBaiEBQRMLOgApIAMoAgQhACADQQA2AgQgAyAAIAEQLiIADQIMAQtBACECIANBADYCHCADIAE2AhQgA0H+HzYCECADQQY2AgwM0QELQfgAIQIMtwELIANBkAE2AhwgAyABNgIUIAMgADYCDEEAIQIMzwELQQAhAAJAIAMoAjgiAkUNACACKAJAIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GCDzYCECADQSA2AgxBACECDM4BC0H3ACECDLQBCyADQY8BNgIcIAMgATYCFCADQewbNgIQIANBFTYCDEEAIQIMzAELIAEgBEYEQEGPASECDMwBCwJAIAEtAABBIEYEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQZsfNgIQIANBBjYCDEEAIQIMzAELQQIhAgyyAQsDQCABLQAAQSBHDQIgBCABQQFqIgFHDQALQY4BIQIMygELIAEgBEYEQEGNASECDMoBCwJAIAEtAABBCWsOBEoAAEoAC0H1ACECDLABCyADLQApQQVGBEBB9gAhAgywAQtB9AAhAgyvAQsgASAERgRAQYwBIQIMyAELIANBEDYCCCADIAE2AgQMCgsgASAERgRAQYsBIQIMxwELAkAgAS0AAEEJaw4ERwAARwALQfMAIQIMrQELIAEgBEcEQCADQRA2AgggAyABNgIEQfEAIQIMrQELQYoBIQIMxQELAkAgASAERwRAA0AgAS0AAEGg0ABqLQAAIgBBA0cEQAJAIABBAWsOAkkABAtB8AAhAgyvAQsgBCABQQFqIgFHDQALQYgBIQIMxgELQYgBIQIMxQELIANBADYCHCADIAE2AhQgA0HbIDYCECADQQc2AgxBACECDMQBCyABIARGBEBBiQEhAgzEAQsCQAJAAkAgAS0AAEGg0gBqLQAAQQFrDgNGAgABC0HyACECDKwBCyADQQA2AhwgAyABNgIUIANBtBI2AhAgA0EHNgIMQQAhAgzEAQtB6gAhAgyqAQsgASAERwRAIAFBAWohAUHvACECDKoBC0GHASECDMIBCyAEIAEiAEYEQEGGASECDMIBCyAALQAAIgFBL0YEQCAAQQFqIQFB7gAhAgypAQsgAUEJayICQRdLDQEgACEBQQEgAnRBm4CABHENQQwBCyAEIAEiAEYEQEGFASECDMEBCyAALQAAQS9HDQAgAEEBaiEBDAMLQQAhAiADQQA2AhwgAyAANgIUIANB2yA2AhAgA0EHNgIMDL8BCwJAAkACQAJAAkADQCABLQAAQaDOAGotAAAiAEEFRwRAAkACQCAAQQFrDghHBQYHCAAEAQgLQesAIQIMrQELIAFBAWohAUHtACECDKwBCyAEIAFBAWoiAUcNAAtBhAEhAgzDAQsgAUEBagwUCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDMEBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDMABCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDL8BCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy+AQsgASAERgRAQYMBIQIMvgELAkAgAS0AAEGgzgBqLQAAQQFrDgg+BAUGAAgCAwcLIAFBAWohAQtBAyECDKMBCyABQQFqDA0LQQAhAiADQQA2AhwgA0HREjYCECADQQc2AgwgAyABQQFqNgIUDLoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDLkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDLgBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDLcBCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy2AQtB7AAhAgycAQsgASAERgRAQYIBIQIMtQELIAFBAWoMAgsgASAERgRAQYEBIQIMtAELIAFBAWoMAQsgASAERg0BIAFBAWoLIQFBBCECDJgBC0GAASECDLABCwNAIAEtAABBoMwAai0AACIAQQJHBEAgAEEBRwRAQekAIQIMmQELDDELIAQgAUEBaiIBRw0AC0H/ACECDK8BCyABIARGBEBB/gAhAgyvAQsCQCABLQAAQQlrDjcvAwYvBAYGBgYGBgYGBgYGBgYGBgYGBgUGBgIGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYABgsgAUEBagshAUEFIQIMlAELIAFBAWoMBgsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgyrAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyqAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgypAQsgA0EANgIcIAMgATYCFCADQY0UNgIQIANBBzYCDEEAIQIMqAELAkACQAJAAkADQCABLQAAQaDKAGotAAAiAEEFRwRAAkAgAEEBaw4GLgMEBQYABgtB6AAhAgyUAQsgBCABQQFqIgFHDQALQf0AIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqAELIANBADYCHCADIAE2AhQgA0HkCDYCECADQQc2AgxBACECDKcBCyABIARGDQEgAUEBagshAUEGIQIMjAELQfwAIQIMpAELAkACQAJAAkADQCABLQAAQaDIAGotAAAiAEEFRwRAIABBAWsOBCkCAwQFCyAEIAFBAWoiAUcNAAtB+wAhAgynAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgymAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgylAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgykAQsgA0EANgIcIAMgATYCFCADQbwKNgIQIANBBzYCDEEAIQIMowELQc8AIQIMiQELQdEAIQIMiAELQecAIQIMhwELIAEgBEYEQEH6ACECDKABCwJAIAEtAABBCWsOBCAAACAACyABQQFqIQFB5gAhAgyGAQsgASAERgRAQfkAIQIMnwELAkAgAS0AAEEJaw4EHwAAHwALQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFBEBB4gEhAgyGAQsgAEEVRwRAIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDJ8BCyADQfgANgIcIAMgATYCFCADQeoaNgIQIANBFTYCDEEAIQIMngELIAEgBEcEQCADQQ02AgggAyABNgIEQeQAIQIMhQELQfcAIQIMnQELIAEgBEYEQEH2ACECDJ0BCwJAAkACQCABLQAAQcgAaw4LAAELCwsLCwsLCwILCyABQQFqIQFB3QAhAgyFAQsgAUEBaiEBQeAAIQIMhAELIAFBAWohAUHjACECDIMBC0H1ACECIAEgBEYNmwEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBtdUAai0AAEcNCCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMnAELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgAEQCADQfQANgIcIAMgATYCFCADIAA2AgxBACECDJwBC0HiACECDIIBC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMnAELQeEAIQIMggELIANB8wA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyaAQsgAy0AKSIAQSNrQQtJDQkCQCAAQQZLDQBBASAAdEHKAHFFDQAMCgtBACECIANBADYCHCADIAE2AhQgA0HtCTYCECADQQg2AgwMmQELQfIAIQIgASAERg2YASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGz1QBqLQAARw0FIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyZAQsgAygCBCEAIANCADcDACADIAAgBkEBaiIBECsiAARAIANB8QA2AhwgAyABNgIUIAMgADYCDEEAIQIMmQELQd8AIQIMfwtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJkBC0HeACECDH8LIANB8AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyXAQsgAy0AKUEhRg0GIANBADYCHCADIAE2AhQgA0GRCjYCECADQQg2AgxBACECDJYBC0HvACECIAEgBEYNlQEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMlgELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgBFDQIgA0HtADYCHCADIAE2AhQgAyAANgIMQQAh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AkUEQCADKAIMIQAMAQsgAyACNgIcQQAhACADKAIEIgFFDQAgAyABIAQgAygCCBEBACIBRQ0AIAMgBDYCFCADIAE2AgwgASEACyAAC74CAQJ/IABBADoAACAAQeQAaiIBQQFrQQA6AAAgAEEAOgACIABBADoAASABQQNrQQA6AAAgAUECa0EAOgAAIABBADoAAyABQQRrQQA6AABBACAAa0EDcSIBIABqIgBBADYCAEHkACABa0F8cSICIABqIgFBBGtBADYCAAJAIAJBCUkNACAAQQA2AgggAEEANgIEIAFBCGtBADYCACABQQxrQQA2AgAgAkEZSQ0AIABBADYCGCAAQQA2AhQgAEEANgIQIABBADYCDCABQRBrQQA2AgAgAUEUa0EANgIAIAFBGGtBADYCACABQRxrQQA2AgAgAiAAQQRxQRhyIgJrIgFBIEkNACAAIAJqIQADQCAAQgA3AxggAEIANwMQIABCADcDCCAAQgA3AwAgAEEgaiEAIAFBIGsiAUEfSw0ACwsLVgEBfwJAIAAoAgwNAAJAAkACQAJAIAAtADEOAwEAAwILIAAoAjgiAUUNACABKAIwIgFFDQAgACABEQAAIgENAwtBAA8LAAsgAEHKGTYCEEEOIQELIAELGgAgACgCDEUEQCAAQd4fNgIQIABBFTYCDAsLFAAgACgCDEEVRgRAIABBADYCDAsLFAAgACgCDEEWRgRAIABBADYCDAsLBwAgACgCDAsHACAAKAIQCwkAIAAgATYCEAsHACAAKAIUCysAAkAgAEEnTw0AQv//////CSAArYhCAYNQDQAgAEECdEHQOGooAgAPCwALFwAgAEEvTwRAAAsgAEECdEHsOWooAgALvwkBAX9B9C0hAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQ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BQECAAEDAEHAzgALXwQFAAAFBQUFBQUFBQUFBQYFBQUFBQUFBQUFBQUABQAHCAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQAFAAUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEGp0AALBQEBAAEBAEHA0AALAQEAQdrQAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQanSAAsFAQEAAQEAQcDSAAsBAQBBytIACwYCAAAAAAIAQeHSAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw=="; + var wasmBuffer; + Object.defineProperty(module3, "exports", { + get: () => { + return wasmBuffer ? wasmBuffer : wasmBuffer = Buffer2.from(wasmBase64, "base64"); + } + }); } - 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; +// node_modules/undici/lib/web/fetch/constants.js +var require_constants3 = __commonJS({ + "node_modules/undici/lib/web/fetch/constants.js"(exports, module3) { + "use strict"; + var corsSafeListedMethods = ( + /** @type {const} */ + ["GET", "HEAD", "POST"] + ); + var corsSafeListedMethodsSet = new Set(corsSafeListedMethods); + var nullBodyStatus = ( + /** @type {const} */ + [101, 204, 205, 304] + ); + var redirectStatus = ( + /** @type {const} */ + [301, 302, 303, 307, 308] + ); + var redirectStatusSet = new Set(redirectStatus); + var 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" + ] + ); + var badPortsSet = new Set(badPorts); + var referrerPolicyTokens = ( + /** @type {const} */ + [ + "no-referrer", + "no-referrer-when-downgrade", + "same-origin", + "origin", + "strict-origin", + "origin-when-cross-origin", + "strict-origin-when-cross-origin", + "unsafe-url" + ] + ); + var referrerPolicy = ( + /** @type {const} */ + [ + "", + ...referrerPolicyTokens + ] + ); + var referrerPolicyTokensSet = new Set(referrerPolicyTokens); + var requestRedirect = ( + /** @type {const} */ + ["follow", "manual", "error"] + ); + var safeMethods = ( + /** @type {const} */ + ["GET", "HEAD", "OPTIONS", "TRACE"] + ); + var safeMethodsSet = new Set(safeMethods); + var requestMode = ( + /** @type {const} */ + ["navigate", "same-origin", "no-cors", "cors"] + ); + var requestCredentials = ( + /** @type {const} */ + ["omit", "same-origin", "include"] + ); + var requestCache = ( + /** @type {const} */ + [ + "default", + "no-store", + "reload", + "no-cache", + "force-cache", + "only-if-cached" + ] + ); + var 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" + ] + ); + var requestDuplex = ( + /** @type {const} */ + [ + "half" + ] + ); + var forbiddenMethods = ( + /** @type {const} */ + ["CONNECT", "TRACE", "TRACK"] + ); + var forbiddenMethodsSet = new Set(forbiddenMethods); + var subresource = ( + /** @type {const} */ + [ + "audio", + "audioworklet", + "font", + "image", + "manifest", + "paintworklet", + "script", + "style", + "track", + "video", + "xslt", + "" + ] + ); + var subresourceSet = new Set(subresource); + module3.exports = { + subresource, + forbiddenMethods, + requestBodyHeader, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus, + safeMethods, + badPorts, + requestDuplex, + subresourceSet, + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicyTokens: referrerPolicyTokensSet + }; } - 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]; +// node_modules/undici/lib/encoding/index.js +var require_encoding = __commonJS({ + "node_modules/undici/lib/encoding/index.js"(exports, module3) { + "use strict"; + var textDecoder = new TextDecoder(); + function utf8DecodeBytes(buffer) { + if (buffer.length === 0) { + return ""; + } + if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) { + buffer = buffer.subarray(3); + } + const output = textDecoder.decode(buffer); + return output; } + module3.exports = { + utf8DecodeBytes + }; } - 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, "]"); +// node_modules/undici/lib/web/infra/index.js +var require_infra = __commonJS({ + "node_modules/undici/lib/web/infra/index.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var { utf8DecodeBytes } = require_encoding(); + function collectASequenceOfCodePoints(condition, input, position) { + let result = ""; + while (position.position < input.length && condition(input[position.position])) { + result += input[position.position]; + position.position++; + } + return result; } - 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 === "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(",")); + 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); + } + var ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g; + 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; + } } } - } - } else { - if (operator === ";") { - if (isDefined(value)) { - result.push(encodeUnreserved(key)); + if (dataLength % 4 === 1) { + return "failure"; } - } else if (value === "" && (operator === "&" || operator === "?")) { - result.push(encodeUnreserved(key) + "="); - } else if (value === "") { - result.push(""); + 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); } - } - 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(","); + function isASCIIWhitespace(char) { + return char === 9 || // \t + char === 10 || // \n + char === 12 || // \f + char === 13 || // \r + char === 32; + } + function isomorphicDecode(input) { + const length = input.length; + if ((2 << 15) - 1 > length) { + return String.fromCharCode.apply(null, input); + } + let result = ""; + let i2 = 0; + let addition = (2 << 15) - 1; + while (i2 < length) { + if (i2 + addition > length) { + addition = length - i2; } - } else { - return encodeReserved(literal); + result += String.fromCharCode.apply(null, input.subarray(i2, i2 += addition)); } + return result; } - ); - 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(","); + var invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; + function isomorphicEncode(input) { + assert(!invalidIsomorphicEncodeValueRegex.test(input)); + return input; + } + function parseJSONFromBytes(bytes) { + return JSON.parse(utf8DecodeBytes(bytes)); + } + function removeASCIIWhitespace(str2, leading = true, trailing = true) { + return removeChars(str2, leading, trailing, isASCIIWhitespace); } - 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(","); + function removeChars(str2, leading, trailing, predicate) { + let lead = 0; + let trail = str2.length - 1; + if (leading) { + while (lead < str2.length && predicate(str2.charCodeAt(lead))) lead++; } + if (trailing) { + while (trail > 0 && predicate(str2.charCodeAt(trail))) trail--; + } + return lead === 0 && trail === str2.length - 1 ? str2 : str2.slice(lead, trail + 1); } - } - 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; + function serializeJavascriptValueToJSONString(value) { + const result = JSON.stringify(value); + if (result === void 0) { + throw new TypeError("Value is not JSON serializable"); } + assert(typeof result === "string"); + return result; } + module3.exports = { + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, + forgivingBase64, + isASCIIWhitespace, + isomorphicDecode, + isomorphicEncode, + parseJSONFromBytes, + removeASCIIWhitespace, + removeChars, + serializeJavascriptValueToJSONString + }; } - 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); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 88467: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var index_exports = {}; -__export(index_exports, { - GraphqlResponseError: () => GraphqlResponseError, - graphql: () => graphql2, - withCustomRequest: () => withCustomRequest }); -module.exports = __toCommonJS(index_exports); -var import_request3 = __nccwpck_require__(36234); -var import_universal_user_agent = __nccwpck_require__(45030); - -// pkg/dist-src/version.js -var VERSION = "7.1.1"; -// pkg/dist-src/with-defaults.js -var import_request2 = __nccwpck_require__(36234); - -// pkg/dist-src/graphql.js -var import_request = __nccwpck_require__(36234); - -// 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.name = "GraphqlResponseError"; - this.errors = response.errors; - this.data = response.data; - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - } -}; - -// pkg/dist-src/graphql.js -var NON_VARIABLE_OPTIONS = [ - "method", - "baseUrl", - "url", - "headers", - "request", - "query", - "mediaType" -]; -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`) +// node_modules/undici/lib/web/fetch/data-url.js +var require_data_url = __commonJS({ + "node_modules/undici/lib/web/fetch/data-url.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var { forgivingBase64, collectASequenceOfCodePoints, collectASequenceOfCodePointsFast, isomorphicDecode, removeASCIIWhitespace, removeChars } = require_infra(); + var encoder = new TextEncoder(); + var HTTP_TOKEN_CODEPOINTS = /^[-!#$%&'*+.^_|~A-Za-z0-9]+$/u; + var HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/u; + var HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/u; + function dataURLProcessor(dataURL) { + assert(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++; + const encodedBody = input.slice(mimeTypeLength + 1); + let body = stringPercentDecode(encodedBody); + if (/;(?:\u0020*)base64$/ui.test(mimeType)) { + const stringBody = isomorphicDecode(body); + body = forgivingBase64(stringBody); + if (body === "failure") { + return "failure"; + } + mimeType = mimeType.slice(0, -6); + mimeType = mimeType.replace(/(\u0020+)$/u, ""); + 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 }; } - 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` - ) - ); + function URLSerializer(url3, excludeFragment = false) { + if (!excludeFragment) { + return url3.href; + } + const href = url3.href; + const hashLength = url3.hash.length; + const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); + if (!hashLength && href.endsWith("#")) { + return serialized.slice(0, -1); + } + return serialized; } - } - 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; + function stringPercentDecode(input) { + const bytes = encoder.encode(input); + return percentDecode(bytes); } - if (!result.variables) { - result.variables = {}; + function isHexCharByte(byte) { + return byte >= 48 && byte <= 57 || byte >= 65 && byte <= 70 || byte >= 97 && byte <= 102; } - 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 + function hexByteToNumber(byte) { + return ( + // 0-9 + byte >= 48 && byte <= 57 ? byte - 48 : (byte & 223) - 55 ); } - return response.data.data; - }); -} - -// pkg/dist-src/with-defaults.js -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 - }); -} - -// pkg/dist-src/index.js -var graphql2 = withDefaults(import_request3.request, { - headers: { - "user-agent": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` - }, - method: "POST", - url: "/graphql" -}); -function withCustomRequest(customRequest) { - return withDefaults(customRequest, { - method: "POST", - url: "/graphql" - }); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 64193: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - composePaginateRest: () => composePaginateRest, - isPaginatingEndpoint: () => isPaginatingEndpoint, - paginateRest: () => paginateRest, - paginatingEndpoints: () => paginatingEndpoints -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/version.js -var VERSION = "9.2.2"; - -// pkg/dist-src/normalize-paginated-list-response.js -function normalizePaginatedListResponse(response) { - if (!response.data) { - return { - ...response, - data: [] - }; - } - const responseNeedsNormalization = "total_count" 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; - delete response.data.incomplete_results; - delete response.data.repository_selection; - delete response.data.total_count; - 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; - 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]; - return { value: normalizedResponse }; - } catch (error) { - if (error.status !== 409) - throw error; - url = ""; - return { - value: { - status: 200, - headers: {}, - data: [] - } - }; + function percentDecode(input) { + const length = input.length; + const output = new Uint8Array(length); + let j3 = 0; + let i2 = 0; + while (i2 < length) { + const byte = input[i2]; + if (byte !== 37) { + output[j3++] = byte; + } else if (byte === 37 && !(isHexCharByte(input[i2 + 1]) && isHexCharByte(input[i2 + 2]))) { + output[j3++] = 37; + } else { + output[j3++] = hexByteToNumber(input[i2 + 1]) << 4 | hexByteToNumber(input[i2 + 2]); + i2 += 2; } + ++i2; } - }) - }; -} - -// 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; + return length === j3 ? output : output.subarray(0, j3); } - 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 = [ - "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}/dependabot/alerts", - "GET /enterprises/{enterprise}/secret-scanning/alerts", - "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 /orgs/{org}/actions/cache/usage-by-repository", - "GET /orgs/{org}/actions/permissions/repositories", - "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}/blocks", - "GET /orgs/{org}/code-scanning/alerts", - "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}/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}/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}/projects", - "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}/secret-scanning/alerts", - "GET /orgs/{org}/security-advisories", - "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/columns/{column_id}/cards", - "GET /projects/{project_id}/collaborators", - "GET /projects/{project_id}/columns", - "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}/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}/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}/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}/events", - "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", - "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", - "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}/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 /repositories/{repository_id}/environments/{environment_name}/secrets", - "GET /repositories/{repository_id}/environments/{environment_name}/variables", - "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}/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}/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 = VERSION; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 83044: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - legacyRestEndpointMethods: () => legacyRestEndpointMethods, - restEndpointMethods: () => restEndpointMethods -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/version.js -var VERSION = "10.4.1"; - -// pkg/dist-src/generated/endpoints.js -var Endpoints = { - actions: { - addCustomLabelsToSelfHostedRunnerForOrg: [ - "POST /orgs/{org}/actions/runners/{runner_id}/labels" - ], - addCustomLabelsToSelfHostedRunnerForRepo: [ - "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" - ], - 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 /repositories/{repository_id}/environments/{environment_name}/variables" - ], - createOrUpdateEnvironmentSecret: [ - "PUT /repositories/{repository_id}/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}" - ], - deleteEnvironmentSecret: [ - "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" - ], - deleteEnvironmentVariable: [ - "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}" - ], - 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}"], - getCustomOidcSubClaimForRepo: [ - "GET /repos/{owner}/{repo}/actions/oidc/customization/sub" - ], - getEnvironmentPublicKey: [ - "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key" - ], - getEnvironmentSecret: [ - "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" - ], - getEnvironmentVariable: [ - "GET /repositories/{repository_id}/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" - ], - 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"], - listEnvironmentSecrets: [ - "GET /repositories/{repository_id}/environments/{environment_name}/secrets" - ], - listEnvironmentVariables: [ - "GET /repositories/{repository_id}/environments/{environment_name}/variables" - ], - 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 /repositories/{repository_id}/environments/{environment_name}/variables/{name}" - ], - 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" - ], - 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" - ] - }, - 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: { - deleteAnalysis: [ - "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}" - ], - 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}" - ], - 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}"], - 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"] - }, - 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" - ], - getCopilotOrganizationDetails: ["GET /orgs/{org}/copilot/billing"], - getCopilotSeatDetailsForUser: [ - "GET /orgs/{org}/members/{username}/copilot" - ], - listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"] - }, - 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}" - ], - setSelectedReposForOrgSecret: [ - "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories" - ], - updateAlert: [ - "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}" - ] - }, - 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"] }, - 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}"] - }, - 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" - ], - addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"], - 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}"], - 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"], - 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"], - 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" - ], - removeLabel: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}" - ], - 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: { - cancelImport: [ - "DELETE /repos/{owner}/{repo}/import", - {}, - { - deprecated: "octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import" - } - ], - 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" - ], - getCommitAuthors: [ - "GET /repos/{owner}/{repo}/import/authors", - {}, - { - deprecated: "octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors" - } - ], - getImportStatus: [ - "GET /repos/{owner}/{repo}/import", - {}, - { - deprecated: "octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status" - } - ], - getLargeFiles: [ - "GET /repos/{owner}/{repo}/import/large_files", - {}, - { - deprecated: "octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files" - } - ], - 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"] } - ], - mapCommitAuthor: [ - "PATCH /repos/{owner}/{repo}/import/authors/{author_id}", - {}, - { - deprecated: "octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author" + function parseMIMEType(input) { + input = removeHTTPWhitespace(input, true, true); + const position = { position: 0 }; + const type2 = collectASequenceOfCodePointsFast( + "/", + input, + position + ); + if (type2.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type2)) { + return "failure"; } - ], - setLfsPreference: [ - "PATCH /repos/{owner}/{repo}/import/lfs", - {}, - { - deprecated: "octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference" - } - ], - startForAuthenticatedUser: ["POST /user/migrations"], - startForOrg: ["POST /orgs/{org}/migrations"], - startImport: [ - "PUT /repos/{owner}/{repo}/import", - {}, - { - deprecated: "octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import" - } - ], - unlockRepoForAuthenticatedUser: [ - "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock" - ], - unlockRepoForOrg: [ - "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock" - ], - updateImport: [ - "PATCH /repos/{owner}/{repo}/import", - {}, - { - deprecated: "octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import" - } - ] - }, - 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}" - ], - 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}" - ], - createCustomOrganizationRole: ["POST /orgs/{org}/organization-roles"], - createInvitation: ["POST /orgs/{org}/invitations"], - createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"], - createOrUpdateCustomPropertiesValuesForRepos: [ - "PATCH /orgs/{org}/properties/values" - ], - createOrUpdateCustomProperty: [ - "PUT /orgs/{org}/properties/schema/{custom_property_name}" - ], - createWebhook: ["POST /orgs/{org}/hooks"], - delete: ["DELETE /orgs/{org}"], - deleteCustomOrganizationRole: [ - "DELETE /orgs/{org}/organization-roles/{role_id}" - ], - deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], - enableOrDisableSecurityProductOnAllOrgRepos: [ - "POST /orgs/{org}/{security_product}/{enablement}" - ], - get: ["GET /orgs/{org}"], - getAllCustomProperties: ["GET /orgs/{org}/properties/schema"], - getCustomProperty: [ - "GET /orgs/{org}/properties/schema/{custom_property_name}" - ], - getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], - getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], - getOrgRole: ["GET /orgs/{org}/organization-roles/{role_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"], - listBlockedUsers: ["GET /orgs/{org}/blocks"], - listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"], - listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], - listForAuthenticatedUser: ["GET /user/orgs"], - listForUser: ["GET /users/{username}/orgs"], - listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"], - 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"], - listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], - listWebhooks: ["GET /orgs/{org}/hooks"], - patchCustomOrganizationRole: [ - "PATCH /orgs/{org}/organization-roles/{role_id}" - ], - pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], - redeliverWebhookDelivery: [ - "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" - ], - removeCustomProperty: [ - "DELETE /orgs/{org}/properties/schema/{custom_property_name}" - ], - 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}" - ], - 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}" - ], - setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"], - setPublicMembershipForAuthenticatedUser: [ - "PUT /orgs/{org}/public_members/{username}" - ], - unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], - update: ["PATCH /orgs/{org}"], - 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" - ] + if (position.position >= input.length) { + return "failure"; } - ], - 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" - ] - }, - projects: { - addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"], - createCard: ["POST /projects/columns/{column_id}/cards"], - createColumn: ["POST /projects/{project_id}/columns"], - createForAuthenticatedUser: ["POST /user/projects"], - createForOrg: ["POST /orgs/{org}/projects"], - createForRepo: ["POST /repos/{owner}/{repo}/projects"], - delete: ["DELETE /projects/{project_id}"], - deleteCard: ["DELETE /projects/columns/cards/{card_id}"], - deleteColumn: ["DELETE /projects/columns/{column_id}"], - get: ["GET /projects/{project_id}"], - getCard: ["GET /projects/columns/cards/{card_id}"], - getColumn: ["GET /projects/columns/{column_id}"], - getPermissionForUser: [ - "GET /projects/{project_id}/collaborators/{username}/permission" - ], - listCards: ["GET /projects/columns/{column_id}/cards"], - listCollaborators: ["GET /projects/{project_id}/collaborators"], - listColumns: ["GET /projects/{project_id}/columns"], - listForOrg: ["GET /orgs/{org}/projects"], - listForRepo: ["GET /repos/{owner}/{repo}/projects"], - listForUser: ["GET /users/{username}/projects"], - moveCard: ["POST /projects/columns/cards/{card_id}/moves"], - moveColumn: ["POST /projects/columns/{column_id}/moves"], - removeCollaborator: [ - "DELETE /projects/{project_id}/collaborators/{username}" - ], - update: ["PATCH /projects/{project_id}"], - updateCard: ["PATCH /projects/columns/cards/{card_id}"], - updateColumn: ["PATCH /projects/columns/{column_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}"], - 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}" - ], - 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"], - createOrUpdateCustomPropertiesValues: [ - "PATCH /repos/{owner}/{repo}/properties/values" - ], - 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"], - createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"], - createUsingTemplate: [ - "POST /repos/{template_owner}/{template_repo}/generate" - ], - createWebhook: ["POST /repos/{owner}/{repo}/hooks"], - 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}"], - deleteTagProtection: [ - "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_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}" - ], - 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" - ], - 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}" - ], - getCustomPropertiesValues: ["GET /repos/{owner}/{repo}/properties/values"], - 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}"], - 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"], - 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"], - listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"], - 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: { - getAlert: [ - "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" - ], - listAlertsForEnterprise: [ - "GET /enterprises/{enterprise}/secret-scanning/alerts" - ], - 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" - ], - updateAlert: [ - "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" - ] - }, - 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}" - ], - addOrUpdateProjectPermissionsInOrg: [ - "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}" - ], - addOrUpdateRepoPermissionsInOrg: [ - "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" - ], - checkPermissionsForProjectInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}" - ], - 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" - ], - listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"], - listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], - removeMembershipForUserInOrg: [ - "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}" - ], - removeProjectInOrg: [ - "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}" - ], - 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"], - 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"], - 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"], - 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; - -// pkg/dist-src/endpoints-to-methods.js -var 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 - }); - } -} -var 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}()` + position.position++; + let subtype = collectASequenceOfCodePointsFast( + ";", + input, + position ); - } - 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` + subtype = removeHTTPWhitespace(subtype, false, true); + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { + return "failure"; + } + const typeLowercase = type2.toLowerCase(); + const subtypeLowercase = subtype.toLowerCase(); + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + /** @type {Map} */ + parameters: /* @__PURE__ */ new Map(), + // https://mimesniff.spec.whatwg.org/#mime-type-essence + essence: `${typeLowercase}/${subtypeLowercase}` + }; + while (position.position < input.length) { + position.position++; + collectASequenceOfCodePoints( + // https://fetch.spec.whatwg.org/#http-whitespace + (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 ); - if (!(alias in options2)) { - options2[alias] = options2[name]; + parameterValue = removeHTTPWhitespace(parameterValue, false, true); + if (parameterValue.length === 0) { + continue; } - delete options2[name]; + } + 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 requestWithDefaults(options2); - } - return requestWithDefaults(...args); - } - return Object.assign(withDecorations, requestWithDefaults); -} - -// pkg/dist-src/index.js -function restEndpointMethods(octokit) { - const api = endpointsToMethods(octokit); - return { - rest: api - }; -} -restEndpointMethods.VERSION = VERSION; -function legacyRestEndpointMethods(octokit) { - const api = endpointsToMethods(octokit); - return { - ...api, - rest: api - }; -} -legacyRestEndpointMethods.VERSION = VERSION; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 10537: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -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 __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - RequestError: () => RequestError -}); -module.exports = __toCommonJS(dist_src_exports); -var import_deprecation = __nccwpck_require__(58932); -var import_once = __toESM(__nccwpck_require__(1223)); -var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); -var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); -var RequestError = class extends Error { - constructor(message, statusCode, options) { - super(message); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - this.name = "HttpError"; - this.status = statusCode; - let headers; - if ("headers" in options && typeof options.headers !== "undefined") { - headers = options.headers; - } - if ("response" in options) { - this.response = options.response; - headers = options.response.headers; - } - const requestCopy = Object.assign({}, options.request); - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace( - /(? char !== '"' && char !== "\\", + input, + position ); - return statusCode; + 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(quoteOrBackslash === '"'); + break; + } } - }); - Object.defineProperty(this, "headers", { - get() { - logOnceHeaders( - new import_deprecation.Deprecation( - "[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`." - ) - ); - return headers || {}; + if (extractValue) { + return value; } - }); - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 36234: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + return input.slice(positionStart, position.position); + } + function serializeAMimeType(mimeType) { + assert(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(/[\\"]/ug, "\\$&"); + value = '"' + value; + value += '"'; + } + serialization += value; + } + return serialization; + } + function isHTTPWhiteSpace(char) { + return char === 13 || char === 10 || char === 9 || char === 32; + } + function removeHTTPWhitespace(str2, leading = true, trailing = true) { + return removeChars(str2, leading, trailing, isHTTPWhiteSpace); + } + 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 ""; + } + module3.exports = { + dataURLProcessor, + URLSerializer, + stringPercentDecode, + parseMIMEType, + collectAnHTTPQuotedString, + serializeAMimeType, + removeHTTPWhitespace, + minimizeSupportedMimeType, + HTTP_TOKEN_CODEPOINTS + }; } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - request: () => request }); -module.exports = __toCommonJS(dist_src_exports); -var import_endpoint = __nccwpck_require__(59440); -var import_universal_user_agent = __nccwpck_require__(45030); - -// pkg/dist-src/version.js -var VERSION = "8.4.1"; - -// pkg/dist-src/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/fetch-wrapper.js -var import_request_error = __nccwpck_require__(10537); - -// pkg/dist-src/get-buffer-response.js -function getBufferResponse(response) { - return response.arrayBuffer(); -} - -// pkg/dist-src/fetch-wrapper.js -function fetchWrapper(requestOptions) { - var _a, _b, _c, _d; - const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; - const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; - if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { - requestOptions.body = JSON.stringify(requestOptions.body); - } - let headers = {}; - let status; - let url; - let { fetch } = globalThis; - if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { - fetch = requestOptions.request.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" - ); - } - return fetch(requestOptions.url, { - method: requestOptions.method, - body: requestOptions.body, - redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect, - headers: requestOptions.headers, - signal: (_d = requestOptions.request) == null ? void 0 : _d.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" } - }).then(async (response) => { - url = response.url; - status = response.status; - for (const keyAndValue of response.headers) { - headers[keyAndValue[0]] = keyAndValue[1]; - } - if ("deprecation" in headers) { - const matches = headers.link && headers.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 ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` - ); - } - if (status === 204 || status === 205) { - return; - } - if (requestOptions.method === "HEAD") { - if (status < 400) { - return; +// node_modules/undici/lib/util/runtime-features.js +var require_runtime_features = __commonJS({ + "node_modules/undici/lib/util/runtime-features.js"(exports, module3) { + "use strict"; + var lazyLoaders = { + __proto__: null, + "node:crypto": () => __require("node:crypto"), + "node:sqlite": () => __require("node:sqlite"), + "node:worker_threads": () => __require("node:worker_threads"), + "node:zlib": () => __require("node:zlib") + }; + function detectRuntimeFeatureByNodeModule(moduleName) { + try { + lazyLoaders[moduleName](); + return true; + } catch (err) { + if (err.code !== "ERR_UNKNOWN_BUILTIN_MODULE" && err.code !== "ERR_NO_CRYPTO") { + throw err; + } + return false; } - throw new import_request_error.RequestError(response.statusText, status, { - response: { - url, - status, - headers, - data: void 0 - }, - request: requestOptions - }); - } - if (status === 304) { - throw new import_request_error.RequestError("Not modified", status, { - response: { - url, - status, - headers, - data: await getResponseData(response) - }, - request: requestOptions - }); } - if (status >= 400) { - const data = await getResponseData(response); - const error = new import_request_error.RequestError(toErrorMessage(data), status, { - response: { - url, - status, - headers, - data - }, - request: requestOptions - }); - throw error; + function detectRuntimeFeatureByExportedProperty(moduleName, property) { + const module4 = lazyLoaders[moduleName](); + return typeof module4[property] !== "undefined"; } - return parseSuccessResponseBody ? await getResponseData(response) : response.body; - }).then((data) => { - return { - status, - url, - headers, - data - }; - }).catch((error) => { - if (error instanceof import_request_error.RequestError) - throw error; - else if (error.name === "AbortError") - throw error; - let 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; - } - } - throw new import_request_error.RequestError(message, 500, { - request: requestOptions - }); - }); -} -async function getResponseData(response) { - const contentType = response.headers.get("content-type"); - if (/application\/json/.test(contentType)) { - return response.json().catch(() => response.text()).catch(() => ""); - } - if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { - return response.text(); - } - return getBufferResponse(response); -} -function toErrorMessage(data) { - if (typeof data === "string") - return data; - let suffix; - if ("documentation_url" in data) { - suffix = ` - ${data.documentation_url}`; - } else { - suffix = ""; - } - if ("message" in data) { - if (Array.isArray(data.errors)) { - return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`; + var runtimeFeaturesByExportedProperty = ( + /** @type {const} */ + ["markAsUncloneable", "zstd"] + ); + var exportedPropertyLookup = { + markAsUncloneable: ["node:worker_threads", "markAsUncloneable"], + zstd: ["node:zlib", "createZstdDecompress"] + }; + var runtimeFeaturesAsNodeModule = ( + /** @type {const} */ + ["crypto", "sqlite"] + ); + var features = ( + /** @type {const} */ + [ + ...runtimeFeaturesAsNodeModule, + ...runtimeFeaturesByExportedProperty + ] + ); + function detectRuntimeFeature(feature) { + if (runtimeFeaturesAsNodeModule.includes( + /** @type {RuntimeFeatureByNodeModule} */ + feature + )) { + return detectRuntimeFeatureByNodeModule(`node:${feature}`); + } else if (runtimeFeaturesByExportedProperty.includes( + /** @type {RuntimeFeatureByExportedProperty} */ + feature + )) { + const [moduleName, property] = exportedPropertyLookup[feature]; + return detectRuntimeFeatureByExportedProperty(moduleName, property); + } + throw new TypeError(`unknown feature: ${feature}`); } - return `${data.message}${suffix}`; + var RuntimeFeatures = class { + /** @type {Map} */ + #map = /* @__PURE__ */ new Map(); + /** + * Clears all cached feature detections. + */ + clear() { + this.#map.clear(); + } + /** + * @param {Feature} feature + * @returns {boolean} + */ + has(feature) { + return this.#map.get(feature) ?? this.#detectRuntimeFeature(feature); + } + /** + * @param {Feature} feature + * @param {boolean} value + */ + set(feature, value) { + if (features.includes(feature) === false) { + throw new TypeError(`unknown feature: ${feature}`); + } + this.#map.set(feature, value); + } + /** + * @param {Feature} feature + * @returns {boolean} + */ + #detectRuntimeFeature(feature) { + const result = detectRuntimeFeature(feature); + this.#map.set(feature, result); + return result; + } + }; + var instance = new RuntimeFeatures(); + module3.exports.runtimeFeatures = instance; + module3.exports.default = instance; } - return `Unknown error: ${JSON.stringify(data)}`; -} +}); -// pkg/dist-src/with-defaults.js -function 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)) - ); +// node_modules/undici/lib/web/webidl/index.js +var require_webidl = __commonJS({ + "node_modules/undici/lib/web/webidl/index.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var { types: types2, inspect } = __require("node:util"); + var { runtimeFeatures } = require_runtime_features(); + var UNDEFINED = 1; + var BOOLEAN = 2; + var STRING = 3; + var SYMBOL = 4; + var NUMBER = 5; + var BIGINT = 6; + var NULL = 7; + var OBJECT = 8; + var FunctionPrototypeSymbolHasInstance = Function.call.bind(Function.prototype[Symbol.hasInstance]); + var webidl = { + converters: {}, + util: {}, + errors: {}, + is: {} }; - Object.assign(request2, { - endpoint: endpoint2, - defaults: withDefaults.bind(null, endpoint2) - }); - return endpointOptions.request.hook(request2, endpointOptions); - }; - return Object.assign(newApi, { - endpoint: endpoint2, - defaults: withDefaults.bind(null, endpoint2) - }); -} - -// pkg/dist-src/index.js -var request = withDefaults(import_endpoint.endpoint, { - headers: { - "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 57171: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ContextAPI = void 0; -const NoopContextManager_1 = __nccwpck_require__(54118); -const global_utils_1 = __nccwpck_require__(85135); -const diag_1 = __nccwpck_require__(11877); -const API_NAME = 'context'; -const NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager(); -/** - * Singleton object which represents the entry point to the OpenTelemetry Context API - */ -class ContextAPI { - /** Empty private constructor prevents end users from constructing a new instance of the API */ - constructor() { } - /** Get the singleton instance of the Context API */ - static getInstance() { - if (!this._instance) { - this._instance = new ContextAPI(); - } - return this._instance; - } - /** - * Set the current context manager. - * - * @returns true if the context manager was successfully registered, else false - */ - setGlobalContextManager(contextManager) { - return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance()); - } - /** - * Get the currently active context - */ - active() { - return this._getContextManager().active(); - } - /** - * Execute a function with an active context - * - * @param context context to be active during function execution - * @param fn function to execute in a context - * @param thisArg optional receiver to be used for calling fn - * @param args optional arguments forwarded to fn - */ - with(context, fn, thisArg, ...args) { - return this._getContextManager().with(context, fn, thisArg, ...args); - } - /** - * Bind a context to a target function or event emitter - * - * @param context context to bind to the event emitter or function. Defaults to the currently active context - * @param target function or event emitter to bind - */ - bind(context, target) { - return this._getContextManager().bind(context, target); - } - _getContextManager() { - return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER; - } - /** Disable and remove the global context manager */ - disable() { - this._getContextManager().disable(); - (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance()); - } -} -exports.ContextAPI = ContextAPI; -//# sourceMappingURL=context.js.map - -/***/ }), - -/***/ 11877: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DiagAPI = void 0; -const ComponentLogger_1 = __nccwpck_require__(17978); -const logLevelLogger_1 = __nccwpck_require__(99639); -const types_1 = __nccwpck_require__(78077); -const global_utils_1 = __nccwpck_require__(85135); -const API_NAME = 'diag'; -/** - * Singleton object which represents the entry point to the OpenTelemetry internal - * diagnostic API - */ -class DiagAPI { - /** - * Private internal constructor - * @private - */ - constructor() { - function _logProxy(funcName) { - return function (...args) { - const logger = (0, global_utils_1.getGlobal)('diag'); - // shortcut if logger not set - if (!logger) - return; - return logger[funcName](...args); - }; - } - // Using self local variable for minification purposes as 'this' cannot be minified - const self = this; - // DiagAPI specific functions - const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => { - var _a, _b, _c; - if (logger === self) { - // There isn't much we can do here. - // Logging to the console might break the user application. - // Try to log to self. If a logger was previously registered it will receive the log. - const err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation'); - self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message); - return false; - } - if (typeof optionsOrLogLevel === 'number') { - optionsOrLogLevel = { - logLevel: optionsOrLogLevel, - }; - } - const oldLogger = (0, global_utils_1.getGlobal)('diag'); - const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : types_1.DiagLogLevel.INFO, logger); - // There already is an logger registered. We'll let it know before overwriting it. - if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) { - const stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : ''; - oldLogger.warn(`Current logger will be overwritten from ${stack}`); - newLogger.warn(`Current logger will overwrite one already registered from ${stack}`); - } - return (0, global_utils_1.registerGlobal)('diag', newLogger, self, true); - }; - self.setLogger = setLogger; - self.disable = () => { - (0, global_utils_1.unregisterGlobal)(API_NAME, self); - }; - self.createComponentLogger = (options) => { - return new ComponentLogger_1.DiagComponentLogger(options); - }; - self.verbose = _logProxy('verbose'); - self.debug = _logProxy('debug'); - self.info = _logProxy('info'); - self.warn = _logProxy('warn'); - self.error = _logProxy('error'); - } - /** Get the singleton instance of the DiagAPI API */ - static instance() { - if (!this._instance) { - this._instance = new DiagAPI(); - } - return this._instance; - } -} -exports.DiagAPI = DiagAPI; -//# sourceMappingURL=diag.js.map - -/***/ }), - -/***/ 17696: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MetricsAPI = void 0; -const NoopMeterProvider_1 = __nccwpck_require__(72647); -const global_utils_1 = __nccwpck_require__(85135); -const diag_1 = __nccwpck_require__(11877); -const API_NAME = 'metrics'; -/** - * Singleton object which represents the entry point to the OpenTelemetry Metrics API - */ -class MetricsAPI { - /** Empty private constructor prevents end users from constructing a new instance of the API */ - constructor() { } - /** Get the singleton instance of the Metrics API */ - static getInstance() { - if (!this._instance) { - this._instance = new MetricsAPI(); - } - return this._instance; - } - /** - * Set the current global meter provider. - * Returns true if the meter provider was successfully registered, else false. - */ - setGlobalMeterProvider(provider) { - return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance()); - } - /** - * Returns the global meter provider. - */ - getMeterProvider() { - return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER; - } - /** - * Returns a meter from the global meter provider. - */ - getMeter(name, version, options) { - return this.getMeterProvider().getMeter(name, version, options); - } - /** Remove the global meter provider */ - disable() { - (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance()); - } -} -exports.MetricsAPI = MetricsAPI; -//# sourceMappingURL=metrics.js.map - -/***/ }), - -/***/ 89909: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PropagationAPI = void 0; -const global_utils_1 = __nccwpck_require__(85135); -const NoopTextMapPropagator_1 = __nccwpck_require__(72368); -const TextMapPropagator_1 = __nccwpck_require__(80865); -const context_helpers_1 = __nccwpck_require__(37682); -const utils_1 = __nccwpck_require__(28136); -const diag_1 = __nccwpck_require__(11877); -const API_NAME = 'propagation'; -const NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator(); -/** - * Singleton object which represents the entry point to the OpenTelemetry Propagation API - */ -class PropagationAPI { - /** Empty private constructor prevents end users from constructing a new instance of the API */ - constructor() { - this.createBaggage = utils_1.createBaggage; - this.getBaggage = context_helpers_1.getBaggage; - this.getActiveBaggage = context_helpers_1.getActiveBaggage; - this.setBaggage = context_helpers_1.setBaggage; - this.deleteBaggage = context_helpers_1.deleteBaggage; - } - /** Get the singleton instance of the Propagator API */ - static getInstance() { - if (!this._instance) { - this._instance = new PropagationAPI(); - } - return this._instance; - } - /** - * Set the current propagator. - * - * @returns true if the propagator was successfully registered, else false - */ - setGlobalPropagator(propagator) { - return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance()); - } - /** - * Inject context into a carrier to be propagated inter-process - * - * @param context Context carrying tracing data to inject - * @param carrier carrier to inject context into - * @param setter Function used to set values on the carrier - */ - inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) { - return this._getGlobalPropagator().inject(context, carrier, setter); - } - /** - * Extract context from a carrier - * - * @param context Context which the newly created context will inherit from - * @param carrier Carrier to extract context from - * @param getter Function used to extract keys from a carrier - */ - extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) { - return this._getGlobalPropagator().extract(context, carrier, getter); - } - /** - * Return a list of all fields which may be used by the propagator. - */ - fields() { - return this._getGlobalPropagator().fields(); - } - /** Remove the global propagator */ - disable() { - (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance()); - } - _getGlobalPropagator() { - return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR; - } -} -exports.PropagationAPI = PropagationAPI; -//# sourceMappingURL=propagation.js.map - -/***/ }), - -/***/ 81539: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceAPI = void 0; -const global_utils_1 = __nccwpck_require__(85135); -const ProxyTracerProvider_1 = __nccwpck_require__(2285); -const spancontext_utils_1 = __nccwpck_require__(49745); -const context_utils_1 = __nccwpck_require__(23326); -const diag_1 = __nccwpck_require__(11877); -const API_NAME = 'trace'; -/** - * Singleton object which represents the entry point to the OpenTelemetry Tracing API - */ -class TraceAPI { - /** Empty private constructor prevents end users from constructing a new instance of the API */ - constructor() { - this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider(); - this.wrapSpanContext = spancontext_utils_1.wrapSpanContext; - this.isSpanContextValid = spancontext_utils_1.isSpanContextValid; - this.deleteSpan = context_utils_1.deleteSpan; - this.getSpan = context_utils_1.getSpan; - this.getActiveSpan = context_utils_1.getActiveSpan; - this.getSpanContext = context_utils_1.getSpanContext; - this.setSpan = context_utils_1.setSpan; - this.setSpanContext = context_utils_1.setSpanContext; - } - /** Get the singleton instance of the Trace API */ - static getInstance() { - if (!this._instance) { - this._instance = new TraceAPI(); - } - return this._instance; - } - /** - * Set the current global tracer. - * - * @returns true if the tracer provider was successfully registered, else false - */ - setGlobalTracerProvider(provider) { - const success = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance()); - if (success) { - this._proxyTracerProvider.setDelegate(provider); - } - return success; - } - /** - * Returns the global tracer provider. - */ - getTracerProvider() { - return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider; - } - /** - * Returns a tracer from the global tracer provider. - */ - getTracer(name, version) { - return this.getTracerProvider().getTracer(name, version); - } - /** Remove the global tracer provider */ - disable() { - (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance()); - this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider(); - } -} -exports.TraceAPI = TraceAPI; -//# sourceMappingURL=trace.js.map - -/***/ }), - -/***/ 37682: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = void 0; -const context_1 = __nccwpck_require__(57171); -const context_2 = __nccwpck_require__(78242); -/** - * Baggage key - */ -const BAGGAGE_KEY = (0, context_2.createContextKey)('OpenTelemetry Baggage Key'); -/** - * Retrieve the current baggage from the given context - * - * @param {Context} Context that manage all context values - * @returns {Baggage} Extracted baggage from the context - */ -function getBaggage(context) { - return context.getValue(BAGGAGE_KEY) || undefined; -} -exports.getBaggage = getBaggage; -/** - * Retrieve the current baggage from the active/current context - * - * @returns {Baggage} Extracted baggage from the context - */ -function getActiveBaggage() { - return getBaggage(context_1.ContextAPI.getInstance().active()); -} -exports.getActiveBaggage = getActiveBaggage; -/** - * Store a baggage in the given context - * - * @param {Context} Context that manage all context values - * @param {Baggage} baggage that will be set in the actual context - */ -function setBaggage(context, baggage) { - return context.setValue(BAGGAGE_KEY, baggage); -} -exports.setBaggage = setBaggage; -/** - * Delete the baggage stored in the given context - * - * @param {Context} Context that manage all context values - */ -function deleteBaggage(context) { - return context.deleteValue(BAGGAGE_KEY); -} -exports.deleteBaggage = deleteBaggage; -//# sourceMappingURL=context-helpers.js.map - -/***/ }), - -/***/ 84811: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BaggageImpl = void 0; -class BaggageImpl { - constructor(entries) { - this._entries = entries ? new Map(entries) : new Map(); - } - getEntry(key) { - const entry = this._entries.get(key); - if (!entry) { - return undefined; - } - return Object.assign({}, entry); - } - getAllEntries() { - return Array.from(this._entries.entries()).map(([k, v]) => [k, v]); - } - setEntry(key, entry) { - const newBaggage = new BaggageImpl(this._entries); - newBaggage._entries.set(key, entry); - return newBaggage; - } - removeEntry(key) { - const newBaggage = new BaggageImpl(this._entries); - newBaggage._entries.delete(key); - return newBaggage; - } - removeEntries(...keys) { - const newBaggage = new BaggageImpl(this._entries); - for (const key of keys) { - newBaggage._entries.delete(key); - } - return newBaggage; - } - clear() { - return new BaggageImpl(); - } -} -exports.BaggageImpl = BaggageImpl; -//# sourceMappingURL=baggage-impl.js.map - -/***/ }), - -/***/ 23542: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.baggageEntryMetadataSymbol = void 0; -/** - * Symbol used to make BaggageEntryMetadata an opaque type - */ -exports.baggageEntryMetadataSymbol = Symbol('BaggageEntryMetadata'); -//# sourceMappingURL=symbol.js.map - -/***/ }), - -/***/ 28136: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.baggageEntryMetadataFromString = exports.createBaggage = void 0; -const diag_1 = __nccwpck_require__(11877); -const baggage_impl_1 = __nccwpck_require__(84811); -const symbol_1 = __nccwpck_require__(23542); -const diag = diag_1.DiagAPI.instance(); -/** - * Create a new Baggage with optional entries - * - * @param entries An array of baggage entries the new baggage should contain - */ -function createBaggage(entries = {}) { - return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries))); -} -exports.createBaggage = createBaggage; -/** - * Create a serializable BaggageEntryMetadata object from a string. - * - * @param str string metadata. Format is currently not defined by the spec and has no special meaning. - * - */ -function baggageEntryMetadataFromString(str) { - if (typeof str !== 'string') { - diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`); - str = ''; - } - return { - __TYPE__: symbol_1.baggageEntryMetadataSymbol, - toString() { - return str; - }, + webidl.errors.exception = function(message) { + return new TypeError(`${message.header}: ${message.message}`); }; -} -exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 7393: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.context = void 0; -// Split module-level variable definition into separate files to allow -// tree-shaking on each api instance. -const context_1 = __nccwpck_require__(57171); -/** Entrypoint for context API */ -exports.context = context_1.ContextAPI.getInstance(); -//# sourceMappingURL=context-api.js.map - -/***/ }), - -/***/ 54118: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoopContextManager = void 0; -const context_1 = __nccwpck_require__(78242); -class NoopContextManager { - active() { - return context_1.ROOT_CONTEXT; - } - with(_context, fn, thisArg, ...args) { - return fn.call(thisArg, ...args); - } - bind(_context, target) { - return target; - } - enable() { - return this; - } - disable() { - return this; - } -} -exports.NoopContextManager = NoopContextManager; -//# sourceMappingURL=NoopContextManager.js.map - -/***/ }), - -/***/ 78242: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ROOT_CONTEXT = exports.createContextKey = void 0; -/** Get a key to uniquely identify a context value */ -function createContextKey(description) { - // The specification states that for the same input, multiple calls should - // return different keys. Due to the nature of the JS dependency management - // system, this creates problems where multiple versions of some package - // could hold different keys for the same property. - // - // Therefore, we use Symbol.for which returns the same key for the same input. - return Symbol.for(description); -} -exports.createContextKey = createContextKey; -class BaseContext { - /** - * Construct a new context which inherits values from an optional parent context. - * - * @param parentContext a context from which to inherit values - */ - constructor(parentContext) { - // for minification - const self = this; - self._currentContext = parentContext ? new Map(parentContext) : new Map(); - self.getValue = (key) => self._currentContext.get(key); - self.setValue = (key, value) => { - const context = new BaseContext(self._currentContext); - context._currentContext.set(key, value); - return context; - }; - self.deleteValue = (key) => { - const context = new BaseContext(self._currentContext); - context._currentContext.delete(key); - return context; - }; - } -} -/** The root context is used as the default parent context when there is no active context */ -exports.ROOT_CONTEXT = new BaseContext(); -//# sourceMappingURL=context.js.map - -/***/ }), - -/***/ 39721: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.diag = void 0; -// Split module-level variable definition into separate files to allow -// tree-shaking on each api instance. -const diag_1 = __nccwpck_require__(11877); -/** - * Entrypoint for Diag API. - * Defines Diagnostic handler used for internal diagnostic logging operations. - * The default provides a Noop DiagLogger implementation which may be changed via the - * diag.setLogger(logger: DiagLogger) function. - */ -exports.diag = diag_1.DiagAPI.instance(); -//# sourceMappingURL=diag-api.js.map - -/***/ }), - -/***/ 17978: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DiagComponentLogger = void 0; -const global_utils_1 = __nccwpck_require__(85135); -/** - * Component Logger which is meant to be used as part of any component which - * will add automatically additional namespace in front of the log message. - * It will then forward all message to global diag logger - * @example - * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' }); - * cLogger.debug('test'); - * // @opentelemetry/instrumentation-http test - */ -class DiagComponentLogger { - constructor(props) { - this._namespace = props.namespace || 'DiagComponentLogger'; - } - debug(...args) { - return logProxy('debug', this._namespace, args); - } - error(...args) { - return logProxy('error', this._namespace, args); - } - info(...args) { - return logProxy('info', this._namespace, args); - } - warn(...args) { - return logProxy('warn', this._namespace, args); - } - verbose(...args) { - return logProxy('verbose', this._namespace, args); - } -} -exports.DiagComponentLogger = DiagComponentLogger; -function logProxy(funcName, namespace, args) { - const logger = (0, global_utils_1.getGlobal)('diag'); - // shortcut if logger not set - if (!logger) { - return; - } - args.unshift(namespace); - return logger[funcName](...args); -} -//# sourceMappingURL=ComponentLogger.js.map - -/***/ }), - -/***/ 3041: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DiagConsoleLogger = void 0; -const consoleMap = [ - { n: 'error', c: 'error' }, - { n: 'warn', c: 'warn' }, - { n: 'info', c: 'info' }, - { n: 'debug', c: 'debug' }, - { n: 'verbose', c: 'trace' }, -]; -/** - * A simple Immutable Console based diagnostic logger which will output any messages to the Console. - * If you want to limit the amount of logging to a specific level or lower use the - * {@link createLogLevelDiagLogger} - */ -class DiagConsoleLogger { - constructor() { - function _consoleFunc(funcName) { - return function (...args) { - if (console) { - // Some environments only expose the console when the F12 developer console is open - // eslint-disable-next-line no-console - let theFunc = console[funcName]; - if (typeof theFunc !== 'function') { - // Not all environments support all functions - // eslint-disable-next-line no-console - theFunc = console.log; - } - // One last final check - if (typeof theFunc === 'function') { - return theFunc.apply(console, args); - } - } - }; - } - for (let i = 0; i < consoleMap.length; i++) { - this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c); - } - } -} -exports.DiagConsoleLogger = DiagConsoleLogger; -//# sourceMappingURL=consoleLogger.js.map - -/***/ }), - -/***/ 99639: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createLogLevelDiagLogger = void 0; -const types_1 = __nccwpck_require__(78077); -function createLogLevelDiagLogger(maxLevel, logger) { - if (maxLevel < types_1.DiagLogLevel.NONE) { - maxLevel = types_1.DiagLogLevel.NONE; - } - else if (maxLevel > types_1.DiagLogLevel.ALL) { - maxLevel = types_1.DiagLogLevel.ALL; - } - // In case the logger is null or undefined - logger = logger || {}; - function _filterFunc(funcName, theLevel) { - const theFunc = logger[funcName]; - if (typeof theFunc === 'function' && maxLevel >= theLevel) { - return theFunc.bind(logger); - } - return function () { }; - } - return { - error: _filterFunc('error', types_1.DiagLogLevel.ERROR), - warn: _filterFunc('warn', types_1.DiagLogLevel.WARN), - info: _filterFunc('info', types_1.DiagLogLevel.INFO), - debug: _filterFunc('debug', types_1.DiagLogLevel.DEBUG), - verbose: _filterFunc('verbose', types_1.DiagLogLevel.VERBOSE), + webidl.errors.conversionFailed = function(opts) { + const plural = opts.types.length === 1 ? "" : " one of"; + const message = `${opts.argument} could not be converted to${plural}: ${opts.types.join(", ")}.`; + return webidl.errors.exception({ + header: opts.prefix, + message + }); }; -} -exports.createLogLevelDiagLogger = createLogLevelDiagLogger; -//# sourceMappingURL=logLevelLogger.js.map - -/***/ }), - -/***/ 78077: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DiagLogLevel = void 0; -/** - * Defines the available internal logging levels for the diagnostic logger, the numeric values - * of the levels are defined to match the original values from the initial LogLevel to avoid - * compatibility/migration issues for any implementation that assume the numeric ordering. - */ -var DiagLogLevel; -(function (DiagLogLevel) { - /** Diagnostic Logging level setting to disable all logging (except and forced logs) */ - DiagLogLevel[DiagLogLevel["NONE"] = 0] = "NONE"; - /** Identifies an error scenario */ - DiagLogLevel[DiagLogLevel["ERROR"] = 30] = "ERROR"; - /** Identifies a warning scenario */ - DiagLogLevel[DiagLogLevel["WARN"] = 50] = "WARN"; - /** General informational log message */ - DiagLogLevel[DiagLogLevel["INFO"] = 60] = "INFO"; - /** General debug log message */ - DiagLogLevel[DiagLogLevel["DEBUG"] = 70] = "DEBUG"; - /** - * Detailed trace level logging should only be used for development, should only be set - * in a development environment. - */ - DiagLogLevel[DiagLogLevel["VERBOSE"] = 80] = "VERBOSE"; - /** Used to set the logging level to include all logging */ - DiagLogLevel[DiagLogLevel["ALL"] = 9999] = "ALL"; -})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {})); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 65163: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.trace = exports.propagation = exports.metrics = exports.diag = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.TraceFlags = exports.SpanStatusCode = exports.SpanKind = exports.SamplingDecision = exports.ProxyTracerProvider = exports.ProxyTracer = exports.defaultTextMapSetter = exports.defaultTextMapGetter = exports.ValueType = exports.createNoopMeter = exports.DiagLogLevel = exports.DiagConsoleLogger = exports.ROOT_CONTEXT = exports.createContextKey = exports.baggageEntryMetadataFromString = void 0; -var utils_1 = __nccwpck_require__(28136); -Object.defineProperty(exports, "baggageEntryMetadataFromString", ({ enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } })); -// Context APIs -var context_1 = __nccwpck_require__(78242); -Object.defineProperty(exports, "createContextKey", ({ enumerable: true, get: function () { return context_1.createContextKey; } })); -Object.defineProperty(exports, "ROOT_CONTEXT", ({ enumerable: true, get: function () { return context_1.ROOT_CONTEXT; } })); -// Diag APIs -var consoleLogger_1 = __nccwpck_require__(3041); -Object.defineProperty(exports, "DiagConsoleLogger", ({ enumerable: true, get: function () { return consoleLogger_1.DiagConsoleLogger; } })); -var types_1 = __nccwpck_require__(78077); -Object.defineProperty(exports, "DiagLogLevel", ({ enumerable: true, get: function () { return types_1.DiagLogLevel; } })); -// Metrics APIs -var NoopMeter_1 = __nccwpck_require__(4837); -Object.defineProperty(exports, "createNoopMeter", ({ enumerable: true, get: function () { return NoopMeter_1.createNoopMeter; } })); -var Metric_1 = __nccwpck_require__(89999); -Object.defineProperty(exports, "ValueType", ({ enumerable: true, get: function () { return Metric_1.ValueType; } })); -// Propagation APIs -var TextMapPropagator_1 = __nccwpck_require__(80865); -Object.defineProperty(exports, "defaultTextMapGetter", ({ enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapGetter; } })); -Object.defineProperty(exports, "defaultTextMapSetter", ({ enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapSetter; } })); -var ProxyTracer_1 = __nccwpck_require__(43503); -Object.defineProperty(exports, "ProxyTracer", ({ enumerable: true, get: function () { return ProxyTracer_1.ProxyTracer; } })); -var ProxyTracerProvider_1 = __nccwpck_require__(2285); -Object.defineProperty(exports, "ProxyTracerProvider", ({ enumerable: true, get: function () { return ProxyTracerProvider_1.ProxyTracerProvider; } })); -var SamplingResult_1 = __nccwpck_require__(33209); -Object.defineProperty(exports, "SamplingDecision", ({ enumerable: true, get: function () { return SamplingResult_1.SamplingDecision; } })); -var span_kind_1 = __nccwpck_require__(31424); -Object.defineProperty(exports, "SpanKind", ({ enumerable: true, get: function () { return span_kind_1.SpanKind; } })); -var status_1 = __nccwpck_require__(48845); -Object.defineProperty(exports, "SpanStatusCode", ({ enumerable: true, get: function () { return status_1.SpanStatusCode; } })); -var trace_flags_1 = __nccwpck_require__(26905); -Object.defineProperty(exports, "TraceFlags", ({ enumerable: true, get: function () { return trace_flags_1.TraceFlags; } })); -var utils_2 = __nccwpck_require__(32615); -Object.defineProperty(exports, "createTraceState", ({ enumerable: true, get: function () { return utils_2.createTraceState; } })); -var spancontext_utils_1 = __nccwpck_require__(49745); -Object.defineProperty(exports, "isSpanContextValid", ({ enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } })); -Object.defineProperty(exports, "isValidTraceId", ({ enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } })); -Object.defineProperty(exports, "isValidSpanId", ({ enumerable: true, get: function () { return spancontext_utils_1.isValidSpanId; } })); -var invalid_span_constants_1 = __nccwpck_require__(91760); -Object.defineProperty(exports, "INVALID_SPANID", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPANID; } })); -Object.defineProperty(exports, "INVALID_TRACEID", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_TRACEID; } })); -Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPAN_CONTEXT; } })); -// Split module-level variable definition into separate files to allow -// tree-shaking on each api instance. -const context_api_1 = __nccwpck_require__(7393); -Object.defineProperty(exports, "context", ({ enumerable: true, get: function () { return context_api_1.context; } })); -const diag_api_1 = __nccwpck_require__(39721); -Object.defineProperty(exports, "diag", ({ enumerable: true, get: function () { return diag_api_1.diag; } })); -const metrics_api_1 = __nccwpck_require__(72601); -Object.defineProperty(exports, "metrics", ({ enumerable: true, get: function () { return metrics_api_1.metrics; } })); -const propagation_api_1 = __nccwpck_require__(17591); -Object.defineProperty(exports, "propagation", ({ enumerable: true, get: function () { return propagation_api_1.propagation; } })); -const trace_api_1 = __nccwpck_require__(98989); -Object.defineProperty(exports, "trace", ({ enumerable: true, get: function () { return trace_api_1.trace; } })); -// Default export. -exports["default"] = { - context: context_api_1.context, - diag: diag_api_1.diag, - metrics: metrics_api_1.metrics, - propagation: propagation_api_1.propagation, - trace: trace_api_1.trace, -}; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 85135: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = void 0; -const platform_1 = __nccwpck_require__(99957); -const version_1 = __nccwpck_require__(98996); -const semver_1 = __nccwpck_require__(81522); -const major = version_1.VERSION.split('.')[0]; -const GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`); -const _global = platform_1._globalThis; -function registerGlobal(type, instance, diag, allowOverride = false) { - var _a; - const api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : { - version: version_1.VERSION, - }); - if (!allowOverride && api[type]) { - // already registered an API of this type - const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`); - diag.error(err.stack || err.message); - return false; - } - if (api.version !== version_1.VERSION) { - // All registered APIs must be of the same version exactly - const err = new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${version_1.VERSION}`); - diag.error(err.stack || err.message); - return false; - } - api[type] = instance; - diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`); - return true; -} -exports.registerGlobal = registerGlobal; -function getGlobal(type) { - var _a, _b; - const globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version; - if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) { - return; - } - return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type]; -} -exports.getGlobal = getGlobal; -function unregisterGlobal(type, diag) { - diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`); - const api = _global[GLOBAL_OPENTELEMETRY_API_KEY]; - if (api) { - delete api[type]; - } -} -exports.unregisterGlobal = unregisterGlobal; -//# sourceMappingURL=global-utils.js.map - -/***/ }), - -/***/ 81522: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isCompatible = exports._makeCompatibilityCheck = void 0; -const version_1 = __nccwpck_require__(98996); -const re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/; -/** - * Create a function to test an API version to see if it is compatible with the provided ownVersion. - * - * The returned function has the following semantics: - * - Exact match is always compatible - * - Major versions must match exactly - * - 1.x package cannot use global 2.x package - * - 2.x package cannot use global 1.x package - * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API - * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects - * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3 - * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor - * - Patch and build tag differences are not considered at this time - * - * @param ownVersion version which should be checked against - */ -function _makeCompatibilityCheck(ownVersion) { - const acceptedVersions = new Set([ownVersion]); - const rejectedVersions = new Set(); - const myVersionMatch = ownVersion.match(re); - if (!myVersionMatch) { - // we cannot guarantee compatibility so we always return noop - return () => false; - } - const ownVersionParsed = { - major: +myVersionMatch[1], - minor: +myVersionMatch[2], - patch: +myVersionMatch[3], - prerelease: myVersionMatch[4], + webidl.errors.invalidArgument = function(context2) { + return webidl.errors.exception({ + header: context2.prefix, + message: `"${context2.value}" is an invalid ${context2.type}.` + }); }; - // if ownVersion has a prerelease tag, versions must match exactly - if (ownVersionParsed.prerelease != null) { - return function isExactmatch(globalVersion) { - return globalVersion === ownVersion; - }; - } - function _reject(v) { - rejectedVersions.add(v); - return false; - } - function _accept(v) { - acceptedVersions.add(v); - return true; - } - return function isCompatible(globalVersion) { - if (acceptedVersions.has(globalVersion)) { - return true; - } - if (rejectedVersions.has(globalVersion)) { - return false; + webidl.brandCheck = function(V3, I3) { + if (!FunctionPrototypeSymbolHasInstance(I3, V3)) { + const err = new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + }; + webidl.brandCheckMultiple = function(List) { + const prototypes = List.map((c2) => webidl.util.MakeTypeAssertion(c2)); + return (V3) => { + if (prototypes.every((typeCheck) => !typeCheck(V3))) { + const err = 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.MakeTypeAssertion = function(I3) { + return (O3) => FunctionPrototypeSymbolHasInstance(I3, O3); + }; + webidl.util.Type = function(V3) { + switch (typeof V3) { + 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 (V3 === null) { + return NULL; + } + return OBJECT; } - const globalVersionMatch = globalVersion.match(re); - if (!globalVersionMatch) { - // cannot parse other version - // we cannot guarantee compatibility so we always noop - return _reject(globalVersion); - } - const globalVersionParsed = { - major: +globalVersionMatch[1], - minor: +globalVersionMatch[2], - patch: +globalVersionMatch[3], - prerelease: globalVersionMatch[4], - }; - // if globalVersion has a prerelease tag, versions must match exactly - if (globalVersionParsed.prerelease != null) { - return _reject(globalVersion); + } + }; + webidl.util.Types = { + UNDEFINED, + BOOLEAN, + STRING, + SYMBOL, + NUMBER, + BIGINT, + NULL, + OBJECT + }; + webidl.util.TypeValueToString = function(o) { + switch (webidl.util.Type(o)) { + 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 NULL: + return "Null"; + case OBJECT: + return "Object"; + } + }; + webidl.util.markAsUncloneable = runtimeFeatures.has("markAsUncloneable") ? __require("node:worker_threads").markAsUncloneable : () => { + }; + webidl.util.ConvertToInt = function(V3, bitLength, signedness, flags) { + 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; } - // major versions must match - if (ownVersionParsed.major !== globalVersionParsed.major) { - return _reject(globalVersion); + } 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 x3 = Number(V3); + if (x3 === 0) { + x3 = 0; + } + if (webidl.util.HasFlag(flags, webidl.attributes.EnforceRange)) { + if (Number.isNaN(x3) || x3 === Number.POSITIVE_INFINITY || x3 === Number.NEGATIVE_INFINITY) { + throw webidl.errors.exception({ + header: "Integer conversion", + message: `Could not convert ${webidl.util.Stringify(V3)} to an integer.` + }); } - if (ownVersionParsed.major === 0) { - if (ownVersionParsed.minor === globalVersionParsed.minor && - ownVersionParsed.patch <= globalVersionParsed.patch) { - return _accept(globalVersion); - } - return _reject(globalVersion); + x3 = webidl.util.IntegerPart(x3); + if (x3 < lowerBound || x3 > upperBound) { + throw webidl.errors.exception({ + header: "Integer conversion", + message: `Value must be between ${lowerBound}-${upperBound}, got ${x3}.` + }); } - if (ownVersionParsed.minor <= globalVersionParsed.minor) { - return _accept(globalVersion); + return x3; + } + if (!Number.isNaN(x3) && webidl.util.HasFlag(flags, webidl.attributes.Clamp)) { + x3 = Math.min(Math.max(x3, lowerBound), upperBound); + if (Math.floor(x3) % 2 === 0) { + x3 = Math.floor(x3); + } else { + x3 = Math.ceil(x3); } - return _reject(globalVersion); + return x3; + } + if (Number.isNaN(x3) || x3 === 0 && Object.is(0, x3) || x3 === Number.POSITIVE_INFINITY || x3 === Number.NEGATIVE_INFINITY) { + return 0; + } + x3 = webidl.util.IntegerPart(x3); + x3 = x3 % Math.pow(2, bitLength); + if (signedness === "signed" && x3 >= Math.pow(2, bitLength) - 1) { + return x3 - Math.pow(2, bitLength); + } + return x3; }; -} -exports._makeCompatibilityCheck = _makeCompatibilityCheck; -/** - * Test an API version to see if it is compatible with this API. - * - * - Exact match is always compatible - * - Major versions must match exactly - * - 1.x package cannot use global 2.x package - * - 2.x package cannot use global 1.x package - * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API - * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects - * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3 - * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor - * - Patch and build tag differences are not considered at this time - * - * @param version version of the API requesting an instance of the global API - */ -exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION); -//# sourceMappingURL=semver.js.map - -/***/ }), - -/***/ 72601: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.metrics = void 0; -// Split module-level variable definition into separate files to allow -// tree-shaking on each api instance. -const metrics_1 = __nccwpck_require__(17696); -/** Entrypoint for metrics API */ -exports.metrics = metrics_1.MetricsAPI.getInstance(); -//# sourceMappingURL=metrics-api.js.map - -/***/ }), - -/***/ 89999: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ValueType = void 0; -/** The Type of value. It describes how the data is reported. */ -var ValueType; -(function (ValueType) { - ValueType[ValueType["INT"] = 0] = "INT"; - ValueType[ValueType["DOUBLE"] = 1] = "DOUBLE"; -})(ValueType = exports.ValueType || (exports.ValueType = {})); -//# sourceMappingURL=Metric.js.map - -/***/ }), - -/***/ 4837: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_GAUGE_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopGaugeMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = void 0; -/** - * NoopMeter is a noop implementation of the {@link Meter} interface. It reuses - * constant NoopMetrics for all of its methods. - */ -class NoopMeter { - constructor() { } - /** - * @see {@link Meter.createGauge} - */ - createGauge(_name, _options) { - return exports.NOOP_GAUGE_METRIC; - } - /** - * @see {@link Meter.createHistogram} - */ - createHistogram(_name, _options) { - return exports.NOOP_HISTOGRAM_METRIC; - } - /** - * @see {@link Meter.createCounter} - */ - createCounter(_name, _options) { - return exports.NOOP_COUNTER_METRIC; - } - /** - * @see {@link Meter.createUpDownCounter} - */ - createUpDownCounter(_name, _options) { - return exports.NOOP_UP_DOWN_COUNTER_METRIC; - } - /** - * @see {@link Meter.createObservableGauge} - */ - createObservableGauge(_name, _options) { - return exports.NOOP_OBSERVABLE_GAUGE_METRIC; - } - /** - * @see {@link Meter.createObservableCounter} - */ - createObservableCounter(_name, _options) { - return exports.NOOP_OBSERVABLE_COUNTER_METRIC; - } - /** - * @see {@link Meter.createObservableUpDownCounter} - */ - createObservableUpDownCounter(_name, _options) { - return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC; - } - /** - * @see {@link Meter.addBatchObservableCallback} - */ - addBatchObservableCallback(_callback, _observables) { } - /** - * @see {@link Meter.removeBatchObservableCallback} - */ - removeBatchObservableCallback(_callback) { } -} -exports.NoopMeter = NoopMeter; -class NoopMetric { -} -exports.NoopMetric = NoopMetric; -class NoopCounterMetric extends NoopMetric { - add(_value, _attributes) { } -} -exports.NoopCounterMetric = NoopCounterMetric; -class NoopUpDownCounterMetric extends NoopMetric { - add(_value, _attributes) { } -} -exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric; -class NoopGaugeMetric extends NoopMetric { - record(_value, _attributes) { } -} -exports.NoopGaugeMetric = NoopGaugeMetric; -class NoopHistogramMetric extends NoopMetric { - record(_value, _attributes) { } -} -exports.NoopHistogramMetric = NoopHistogramMetric; -class NoopObservableMetric { - addCallback(_callback) { } - removeCallback(_callback) { } -} -exports.NoopObservableMetric = NoopObservableMetric; -class NoopObservableCounterMetric extends NoopObservableMetric { -} -exports.NoopObservableCounterMetric = NoopObservableCounterMetric; -class NoopObservableGaugeMetric extends NoopObservableMetric { -} -exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric; -class NoopObservableUpDownCounterMetric extends NoopObservableMetric { -} -exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric; -exports.NOOP_METER = new NoopMeter(); -// Synchronous instruments -exports.NOOP_COUNTER_METRIC = new NoopCounterMetric(); -exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric(); -exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric(); -exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric(); -// Asynchronous instruments -exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric(); -exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric(); -exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric(); -/** - * Create a no-op Meter - */ -function createNoopMeter() { - return exports.NOOP_METER; -} -exports.createNoopMeter = createNoopMeter; -//# sourceMappingURL=NoopMeter.js.map - -/***/ }), - -/***/ 72647: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = void 0; -const NoopMeter_1 = __nccwpck_require__(4837); -/** - * An implementation of the {@link MeterProvider} which returns an impotent Meter - * for all calls to `getMeter` - */ -class NoopMeterProvider { - getMeter(_name, _version, _options) { - return NoopMeter_1.NOOP_METER; - } -} -exports.NoopMeterProvider = NoopMeterProvider; -exports.NOOP_METER_PROVIDER = new NoopMeterProvider(); -//# sourceMappingURL=NoopMeterProvider.js.map - -/***/ }), - -/***/ 99957: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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__(87200), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 55926: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports._globalThis = void 0; -/** only globals that common to node and browsers are allowed */ -// eslint-disable-next-line node/no-unsupported-features/es-builtins -exports._globalThis = typeof globalThis === 'object' ? globalThis : global; -//# sourceMappingURL=globalThis.js.map - -/***/ }), - -/***/ 87200: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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__(55926), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 17591: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.propagation = void 0; -// Split module-level variable definition into separate files to allow -// tree-shaking on each api instance. -const propagation_1 = __nccwpck_require__(89909); -/** Entrypoint for propagation API */ -exports.propagation = propagation_1.PropagationAPI.getInstance(); -//# sourceMappingURL=propagation-api.js.map - -/***/ }), - -/***/ 72368: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoopTextMapPropagator = void 0; -/** - * No-op implementations of {@link TextMapPropagator}. - */ -class NoopTextMapPropagator { - /** Noop inject function does nothing */ - inject(_context, _carrier) { } - /** Noop extract function does nothing and returns the input context */ - extract(context, _carrier) { - return context; - } - fields() { - return []; - } -} -exports.NoopTextMapPropagator = NoopTextMapPropagator; -//# sourceMappingURL=NoopTextMapPropagator.js.map - -/***/ }), - -/***/ 80865: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultTextMapSetter = exports.defaultTextMapGetter = void 0; -exports.defaultTextMapGetter = { - get(carrier, key) { - if (carrier == null) { - return undefined; - } - return carrier[key]; - }, - keys(carrier) { - if (carrier == null) { - return []; - } - return Object.keys(carrier); - }, -}; -exports.defaultTextMapSetter = { - set(carrier, key, value) { - if (carrier == null) { - return; - } - carrier[key] = value; - }, -}; -//# sourceMappingURL=TextMapPropagator.js.map - -/***/ }), - -/***/ 98989: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.trace = void 0; -// Split module-level variable definition into separate files to allow -// tree-shaking on each api instance. -const trace_1 = __nccwpck_require__(81539); -/** Entrypoint for trace API */ -exports.trace = trace_1.TraceAPI.getInstance(); -//# sourceMappingURL=trace-api.js.map - -/***/ }), - -/***/ 81462: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NonRecordingSpan = void 0; -const invalid_span_constants_1 = __nccwpck_require__(91760); -/** - * The NonRecordingSpan is the default {@link Span} that is used when no Span - * implementation is available. All operations are no-op including context - * propagation. - */ -class NonRecordingSpan { - constructor(_spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) { - this._spanContext = _spanContext; - } - // Returns a SpanContext. - spanContext() { - return this._spanContext; - } - // By default does nothing - setAttribute(_key, _value) { - return this; - } - // By default does nothing - setAttributes(_attributes) { - return this; - } - // By default does nothing - addEvent(_name, _attributes) { - return this; - } - addLink(_link) { - return this; - } - addLinks(_links) { - return this; - } - // By default does nothing - setStatus(_status) { - return this; - } - // By default does nothing - updateName(_name) { - return this; - } - // By default does nothing - end(_endTime) { } - // isRecording always returns false for NonRecordingSpan. - isRecording() { - return false; - } - // By default does nothing - recordException(_exception, _time) { } -} -exports.NonRecordingSpan = NonRecordingSpan; -//# sourceMappingURL=NonRecordingSpan.js.map - -/***/ }), - -/***/ 17606: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoopTracer = void 0; -const context_1 = __nccwpck_require__(57171); -const context_utils_1 = __nccwpck_require__(23326); -const NonRecordingSpan_1 = __nccwpck_require__(81462); -const spancontext_utils_1 = __nccwpck_require__(49745); -const contextApi = context_1.ContextAPI.getInstance(); -/** - * No-op implementations of {@link Tracer}. - */ -class NoopTracer { - // startSpan starts a noop span. - startSpan(name, options, context = contextApi.active()) { - const root = Boolean(options === null || options === void 0 ? void 0 : options.root); - if (root) { - return new NonRecordingSpan_1.NonRecordingSpan(); - } - const parentFromContext = context && (0, context_utils_1.getSpanContext)(context); - if (isSpanContext(parentFromContext) && - (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) { - return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext); + webidl.util.IntegerPart = function(n8) { + const r2 = Math.floor(Math.abs(n8)); + if (n8 < 0) { + return -1 * r2; + } + return r2; + }; + webidl.util.Stringify = function(V3) { + const type2 = webidl.util.Type(V3); + switch (type2) { + case SYMBOL: + return `Symbol(${V3.description})`; + case OBJECT: + return inspect(V3); + case STRING: + return `"${V3}"`; + case BIGINT: + return `${V3}n`; + default: + return `${V3}`; + } + }; + webidl.util.IsResizableArrayBuffer = function(V3) { + if (types2.isArrayBuffer(V3)) { + return V3.resizable; + } + if (types2.isSharedArrayBuffer(V3)) { + return V3.growable; + } + throw webidl.errors.exception({ + header: "IsResizableArrayBuffer", + message: `"${webidl.util.Stringify(V3)}" is not an array buffer.` + }); + }; + webidl.util.HasFlag = function(flags, attributes) { + return typeof flags === "number" && (flags & attributes) === attributes; + }; + webidl.sequenceConverter = function(converter) { + return (V3, prefix, argument, Iterable) => { + if (webidl.util.Type(V3) !== OBJECT) { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} (${webidl.util.Stringify(V3)}) is not iterable.` + }); } - else { - return new NonRecordingSpan_1.NonRecordingSpan(); + const method = typeof Iterable === "function" ? Iterable() : V3?.[Symbol.iterator]?.(); + const seq2 = []; + let index = 0; + if (method === void 0 || typeof method.next !== "function") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} is not iterable.` + }); } - } - startActiveSpan(name, arg2, arg3, arg4) { - let opts; - let ctx; - let fn; - if (arguments.length < 2) { - return; + while (true) { + const { done, value } = method.next(); + if (done) { + break; + } + seq2.push(converter(value, prefix, `${argument}[${index++}]`)); } - else if (arguments.length === 2) { - fn = arg2; + return seq2; + }; + }; + webidl.recordConverter = function(keyConverter, valueConverter) { + return (O3, prefix, argument) => { + if (webidl.util.Type(O3) !== OBJECT) { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} ("${webidl.util.TypeValueToString(O3)}") is not an Object.` + }); } - else if (arguments.length === 3) { - opts = arg2; - fn = arg3; + const result = {}; + if (!types2.isProxy(O3)) { + const keys2 = [...Object.getOwnPropertyNames(O3), ...Object.getOwnPropertySymbols(O3)]; + for (const key of keys2) { + const keyName = webidl.util.Stringify(key); + const typedKey = keyConverter(key, prefix, `Key ${keyName} in ${argument}`); + const typedValue = valueConverter(O3[key], prefix, `${argument}[${keyName}]`); + result[typedKey] = typedValue; + } + return result; } - else { - opts = arg2; - ctx = arg3; - fn = arg4; + const keys = Reflect.ownKeys(O3); + for (const key of keys) { + const desc = Reflect.getOwnPropertyDescriptor(O3, key); + if (desc?.enumerable) { + const typedKey = keyConverter(key, prefix, argument); + const typedValue = valueConverter(O3[key], prefix, argument); + result[typedKey] = typedValue; + } } - const parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active(); - const span = this.startSpan(name, opts, parentContext); - const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span); - return contextApi.with(contextWithSpanSet, fn, undefined, span); - } -} -exports.NoopTracer = NoopTracer; -function isSpanContext(spanContext) { - return (typeof spanContext === 'object' && - typeof spanContext['spanId'] === 'string' && - typeof spanContext['traceId'] === 'string' && - typeof spanContext['traceFlags'] === 'number'); -} -//# sourceMappingURL=NoopTracer.js.map - -/***/ }), - -/***/ 23259: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoopTracerProvider = void 0; -const NoopTracer_1 = __nccwpck_require__(17606); -/** - * An implementation of the {@link TracerProvider} which returns an impotent - * Tracer for all calls to `getTracer`. - * - * All operations are no-op. - */ -class NoopTracerProvider { - getTracer(_name, _version, _options) { - return new NoopTracer_1.NoopTracer(); - } -} -exports.NoopTracerProvider = NoopTracerProvider; -//# sourceMappingURL=NoopTracerProvider.js.map - -/***/ }), - -/***/ 43503: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ProxyTracer = void 0; -const NoopTracer_1 = __nccwpck_require__(17606); -const NOOP_TRACER = new NoopTracer_1.NoopTracer(); -/** - * Proxy tracer provided by the proxy tracer provider - */ -class ProxyTracer { - constructor(_provider, name, version, options) { - this._provider = _provider; - this.name = name; - this.version = version; - this.options = options; - } - startSpan(name, options, context) { - return this._getTracer().startSpan(name, options, context); - } - startActiveSpan(_name, _options, _context, _fn) { - const tracer = this._getTracer(); - return Reflect.apply(tracer.startActiveSpan, tracer, arguments); - } - /** - * Try to get a tracer from the proxy tracer provider. - * If the proxy tracer provider has no delegate, return a noop tracer. - */ - _getTracer() { - if (this._delegate) { - return this._delegate; + return result; + }; + }; + webidl.interfaceConverter = function(TypeCheck, name) { + return (V3, prefix, argument) => { + if (!TypeCheck(V3)) { + throw webidl.errors.exception({ + header: prefix, + message: `Expected ${argument} ("${webidl.util.Stringify(V3)}") to be an instance of ${name}.` + }); } - const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options); - if (!tracer) { - return NOOP_TRACER; + return V3; + }; + }; + webidl.dictionaryConverter = function(converters) { + converters.sort((a2, b2) => (a2.key > b2.key) - (a2.key < b2.key)); + return (dictionary, prefix, argument) => { + const dict = {}; + if (dictionary != null && webidl.util.Type(dictionary) !== OBJECT) { + throw webidl.errors.exception({ + header: prefix, + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }); } - this._delegate = tracer; - return this._delegate; - } -} -exports.ProxyTracer = ProxyTracer; -//# sourceMappingURL=ProxyTracer.js.map - -/***/ }), - -/***/ 2285: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ProxyTracerProvider = void 0; -const ProxyTracer_1 = __nccwpck_require__(43503); -const NoopTracerProvider_1 = __nccwpck_require__(23259); -const NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider(); -/** - * Tracer provider which provides {@link ProxyTracer}s. - * - * Before a delegate is set, tracers provided are NoOp. - * When a delegate is set, traces are provided from the delegate. - * When a delegate is set after tracers have already been provided, - * all tracers already provided will use the provided delegate implementation. - */ -class ProxyTracerProvider { - /** - * Get a {@link ProxyTracer} - */ - getTracer(name, version, options) { - var _a; - return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options)); - } - getDelegate() { - var _a; - return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER; - } - /** - * Set the delegate tracer provider - */ - setDelegate(delegate) { - this._delegate = delegate; - } - getDelegateTracer(name, version, options) { - var _a; - return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options); - } -} -exports.ProxyTracerProvider = ProxyTracerProvider; -//# sourceMappingURL=ProxyTracerProvider.js.map - -/***/ }), - -/***/ 33209: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SamplingDecision = void 0; -/** - * @deprecated use the one declared in @opentelemetry/sdk-trace-base instead. - * A sampling decision that determines how a {@link Span} will be recorded - * and collected. - */ -var SamplingDecision; -(function (SamplingDecision) { - /** - * `Span.isRecording() === false`, span will not be recorded and all events - * and attributes will be dropped. - */ - SamplingDecision[SamplingDecision["NOT_RECORD"] = 0] = "NOT_RECORD"; - /** - * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags} - * MUST NOT be set. - */ - SamplingDecision[SamplingDecision["RECORD"] = 1] = "RECORD"; - /** - * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags} - * MUST be set. - */ - SamplingDecision[SamplingDecision["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED"; -})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {})); -//# sourceMappingURL=SamplingResult.js.map - -/***/ }), - -/***/ 23326: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = void 0; -const context_1 = __nccwpck_require__(78242); -const NonRecordingSpan_1 = __nccwpck_require__(81462); -const context_2 = __nccwpck_require__(57171); -/** - * span key - */ -const SPAN_KEY = (0, context_1.createContextKey)('OpenTelemetry Context Key SPAN'); -/** - * Return the span if one exists - * - * @param context context to get span from - */ -function getSpan(context) { - return context.getValue(SPAN_KEY) || undefined; -} -exports.getSpan = getSpan; -/** - * Gets the span from the current context, if one exists. - */ -function getActiveSpan() { - return getSpan(context_2.ContextAPI.getInstance().active()); -} -exports.getActiveSpan = getActiveSpan; -/** - * Set the span on a context - * - * @param context context to use as parent - * @param span span to set active - */ -function setSpan(context, span) { - return context.setValue(SPAN_KEY, span); -} -exports.setSpan = setSpan; -/** - * Remove current span stored in the context - * - * @param context context to delete span from - */ -function deleteSpan(context) { - return context.deleteValue(SPAN_KEY); -} -exports.deleteSpan = deleteSpan; -/** - * Wrap span context in a NoopSpan and set as span in a new - * context - * - * @param context context to set active span on - * @param spanContext span context to be wrapped - */ -function setSpanContext(context, spanContext) { - return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext)); -} -exports.setSpanContext = setSpanContext; -/** - * Get the span context of the span if it exists. - * - * @param context context to get values from - */ -function getSpanContext(context) { - var _a; - return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext(); -} -exports.getSpanContext = getSpanContext; -//# sourceMappingURL=context-utils.js.map - -/***/ }), - -/***/ 62110: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceStateImpl = void 0; -const tracestate_validators_1 = __nccwpck_require__(54864); -const MAX_TRACE_STATE_ITEMS = 32; -const MAX_TRACE_STATE_LEN = 512; -const LIST_MEMBERS_SEPARATOR = ','; -const LIST_MEMBER_KEY_VALUE_SPLITTER = '='; -/** - * TraceState must be a class and not a simple object type because of the spec - * requirement (https://www.w3.org/TR/trace-context/#tracestate-field). - * - * Here is the list of allowed mutations: - * - New key-value pair should be added into the beginning of the list - * - The value of any key can be updated. Modified keys MUST be moved to the - * beginning of the list. - */ -class TraceStateImpl { - constructor(rawTraceState) { - this._internalState = new Map(); - if (rawTraceState) - this._parse(rawTraceState); - } - set(key, value) { - // TODO: Benchmark the different approaches(map vs list) and - // use the faster one. - const traceState = this._clone(); - if (traceState._internalState.has(key)) { - traceState._internalState.delete(key); - } - traceState._internalState.set(key, value); - return traceState; - } - unset(key) { - const traceState = this._clone(); - traceState._internalState.delete(key); - return traceState; - } - get(key) { - return this._internalState.get(key); - } - serialize() { - return this._keys() - .reduce((agg, key) => { - agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key)); - return agg; - }, []) - .join(LIST_MEMBERS_SEPARATOR); - } - _parse(rawTraceState) { - if (rawTraceState.length > MAX_TRACE_STATE_LEN) - return; - this._internalState = rawTraceState - .split(LIST_MEMBERS_SEPARATOR) - .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning - .reduce((agg, part) => { - const listMember = part.trim(); // Optional Whitespace (OWS) handling - const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER); - if (i !== -1) { - const key = listMember.slice(0, i); - const value = listMember.slice(i + 1, part.length); - if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) { - agg.set(key, value); - } - else { - // TODO: Consider to add warning log - } + for (const options2 of converters) { + const { key, defaultValue, required, converter } = options2; + if (required === true) { + if (dictionary == null || !Object.hasOwn(dictionary, key)) { + throw webidl.errors.exception({ + header: prefix, + message: `Missing required key "${key}".` + }); } - return agg; - }, new Map()); - // Because of the reverse() requirement, trunc must be done after map is created - if (this._internalState.size > MAX_TRACE_STATE_ITEMS) { - this._internalState = new Map(Array.from(this._internalState.entries()) - .reverse() // Use reverse same as original tracestate parse chain - .slice(0, MAX_TRACE_STATE_ITEMS)); + } + let value = dictionary?.[key]; + const hasDefault = defaultValue !== void 0; + if (hasDefault && value === void 0) { + value = defaultValue(); + } + if (required || hasDefault || value !== void 0) { + value = converter(value, prefix, `${argument}.${key}`); + if (options2.allowedValues && !options2.allowedValues.includes(value)) { + throw webidl.errors.exception({ + header: prefix, + message: `${value} is not an accepted type. Expected one of ${options2.allowedValues.join(", ")}.` + }); + } + dict[key] = value; + } } + return dict; + }; + }; + webidl.nullableConverter = function(converter) { + return (V3, prefix, argument) => { + if (V3 === null) { + return V3; + } + return converter(V3, prefix, argument); + }; + }; + webidl.is.USVString = function(value) { + return typeof value === "string" && value.isWellFormed(); + }; + webidl.is.ReadableStream = webidl.util.MakeTypeAssertion(ReadableStream); + webidl.is.Blob = webidl.util.MakeTypeAssertion(Blob); + webidl.is.URLSearchParams = webidl.util.MakeTypeAssertion(URLSearchParams); + webidl.is.File = webidl.util.MakeTypeAssertion(File); + webidl.is.URL = webidl.util.MakeTypeAssertion(URL); + webidl.is.AbortSignal = webidl.util.MakeTypeAssertion(AbortSignal); + webidl.is.MessagePort = webidl.util.MakeTypeAssertion(MessagePort); + webidl.is.BufferSource = function(V3) { + return types2.isArrayBuffer(V3) || ArrayBuffer.isView(V3) && types2.isArrayBuffer(V3.buffer); + }; + webidl.util.getCopyOfBytesHeldByBufferSource = function(bufferSource) { + const jsBufferSource = bufferSource; + let jsArrayBuffer = jsBufferSource; + let offset = 0; + let length = 0; + if (types2.isTypedArray(jsBufferSource) || types2.isDataView(jsBufferSource)) { + jsArrayBuffer = jsBufferSource.buffer; + offset = jsBufferSource.byteOffset; + length = jsBufferSource.byteLength; + } else { + assert(types2.isAnyArrayBuffer(jsBufferSource)); + length = jsBufferSource.byteLength; + } + if (jsArrayBuffer.detached) { + return new Uint8Array(0); + } + const bytes = new Uint8Array(length); + const view = new Uint8Array(jsArrayBuffer, offset, length); + bytes.set(view); + return bytes; + }; + webidl.converters.DOMString = function(V3, prefix, argument, flags) { + if (V3 === null && webidl.util.HasFlag(flags, webidl.attributes.LegacyNullToEmptyString)) { + return ""; + } + if (typeof V3 === "symbol") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a DOMString.` + }); + } + return String(V3); + }; + webidl.converters.ByteString = function(V3, prefix, argument) { + if (typeof V3 === "symbol") { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a ByteString.` + }); + } + const x3 = String(V3); + for (let index = 0; index < x3.length; index++) { + if (x3.charCodeAt(index) > 255) { + throw new TypeError( + `Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x3.charCodeAt(index)} which is greater than 255.` + ); + } + } + return x3; + }; + webidl.converters.USVString = function(value) { + if (typeof value === "string") { + return value.toWellFormed(); + } + return `${value}`.toWellFormed(); + }; + webidl.converters.boolean = function(V3) { + const x3 = Boolean(V3); + return x3; + }; + webidl.converters.any = function(V3) { + return V3; + }; + webidl.converters["long long"] = function(V3, prefix, argument) { + const x3 = webidl.util.ConvertToInt(V3, 64, "signed", 0, prefix, argument); + return x3; + }; + webidl.converters["unsigned long long"] = function(V3, prefix, argument) { + const x3 = webidl.util.ConvertToInt(V3, 64, "unsigned", 0, prefix, argument); + return x3; + }; + webidl.converters["unsigned long"] = function(V3, prefix, argument) { + const x3 = webidl.util.ConvertToInt(V3, 32, "unsigned", 0, prefix, argument); + return x3; + }; + webidl.converters["unsigned short"] = function(V3, prefix, argument, flags) { + const x3 = webidl.util.ConvertToInt(V3, 16, "unsigned", flags, prefix, argument); + return x3; + }; + webidl.converters.ArrayBuffer = function(V3, prefix, argument, flags) { + if (webidl.util.Type(V3) !== OBJECT || !types2.isArrayBuffer(V3)) { + throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V3)}")`, + types: ["ArrayBuffer"] + }); + } + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V3)) { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a resizable ArrayBuffer.` + }); + } + return V3; + }; + webidl.converters.SharedArrayBuffer = function(V3, prefix, argument, flags) { + if (webidl.util.Type(V3) !== OBJECT || !types2.isSharedArrayBuffer(V3)) { + throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V3)}")`, + types: ["SharedArrayBuffer"] + }); + } + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V3)) { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a resizable SharedArrayBuffer.` + }); + } + return V3; + }; + webidl.converters.TypedArray = function(V3, T3, prefix, argument, flags) { + if (webidl.util.Type(V3) !== OBJECT || !types2.isTypedArray(V3) || V3.constructor.name !== T3.name) { + throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V3)}")`, + types: [T3.name] + }); + } + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types2.isSharedArrayBuffer(V3.buffer)) { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a view on a shared array buffer.` + }); + } + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V3.buffer)) { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a view on a resizable array buffer.` + }); + } + return V3; + }; + webidl.converters.DataView = function(V3, prefix, argument, flags) { + if (webidl.util.Type(V3) !== OBJECT || !types2.isDataView(V3)) { + throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V3)}")`, + types: ["DataView"] + }); + } + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types2.isSharedArrayBuffer(V3.buffer)) { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a view on a shared array buffer.` + }); + } + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V3.buffer)) { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a view on a resizable array buffer.` + }); + } + return V3; + }; + webidl.converters.ArrayBufferView = function(V3, prefix, argument, flags) { + if (webidl.util.Type(V3) !== OBJECT || !types2.isArrayBufferView(V3)) { + throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V3)}")`, + types: ["ArrayBufferView"] + }); + } + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types2.isSharedArrayBuffer(V3.buffer)) { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a view on a shared array buffer.` + }); + } + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V3.buffer)) { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a view on a resizable array buffer.` + }); + } + return V3; + }; + webidl.converters.BufferSource = function(V3, prefix, argument, flags) { + if (types2.isArrayBuffer(V3)) { + return webidl.converters.ArrayBuffer(V3, prefix, argument, flags); + } + if (types2.isArrayBufferView(V3)) { + flags &= ~webidl.attributes.AllowShared; + return webidl.converters.ArrayBufferView(V3, prefix, argument, flags); + } + if (types2.isSharedArrayBuffer(V3)) { + throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a SharedArrayBuffer.` + }); + } + throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V3)}")`, + types: ["ArrayBuffer", "ArrayBufferView"] + }); + }; + webidl.converters.AllowSharedBufferSource = function(V3, prefix, argument, flags) { + if (types2.isArrayBuffer(V3)) { + return webidl.converters.ArrayBuffer(V3, prefix, argument, flags); + } + if (types2.isSharedArrayBuffer(V3)) { + return webidl.converters.SharedArrayBuffer(V3, prefix, argument, flags); + } + if (types2.isArrayBufferView(V3)) { + flags |= webidl.attributes.AllowShared; + return webidl.converters.ArrayBufferView(V3, prefix, argument, flags); + } + throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V3)}")`, + types: ["ArrayBuffer", "SharedArrayBuffer", "ArrayBufferView"] + }); + }; + 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 + ); + webidl.converters.Blob = webidl.interfaceConverter(webidl.is.Blob, "Blob"); + webidl.converters.AbortSignal = webidl.interfaceConverter( + webidl.is.AbortSignal, + "AbortSignal" + ); + webidl.converters.EventHandlerNonNull = function(V3) { + if (webidl.util.Type(V3) !== OBJECT) { + return null; + } + if (typeof V3 === "function") { + return V3; + } + return () => { + }; + }; + webidl.attributes = { + Clamp: 1 << 0, + EnforceRange: 1 << 1, + AllowShared: 1 << 2, + AllowResizable: 1 << 3, + LegacyNullToEmptyString: 1 << 4 + }; + module3.exports = { + webidl + }; + } +}); + +// node_modules/undici/lib/web/fetch/util.js +var require_util2 = __commonJS({ + "node_modules/undici/lib/web/fetch/util.js"(exports, module3) { + "use strict"; + var { Transform } = __require("node:stream"); + var zlib = __require("node:zlib"); + var { redirectStatusSet, referrerPolicyTokens, badPortsSet } = require_constants3(); + var { getGlobalOrigin } = require_global(); + var { collectAnHTTPQuotedString, parseMIMEType } = require_data_url(); + var { performance: performance3 } = __require("node:perf_hooks"); + var { ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util(); + var assert = __require("node:assert"); + var { isUint8Array } = __require("node:util/types"); + var { webidl } = require_webidl(); + var { isomorphicEncode, collectASequenceOfCodePoints, removeChars } = require_infra(); + 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; } - _keys() { - return Array.from(this._internalState.keys()).reverse(); - } - _clone() { - const traceState = new TraceStateImpl(); - traceState._internalState = new Map(this._internalState); - return traceState; - } -} -exports.TraceStateImpl = TraceStateImpl; -//# sourceMappingURL=tracestate-impl.js.map - -/***/ }), - -/***/ 54864: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.validateValue = exports.validateKey = void 0; -const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]'; -const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`; -const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`; -const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`); -const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/; -const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/; -/** - * Key is opaque string up to 256 characters printable. It MUST begin with a - * lowercase letter, and can only contain lowercase letters a-z, digits 0-9, - * underscores _, dashes -, asterisks *, and forward slashes /. - * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the - * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key. - * see https://www.w3.org/TR/trace-context/#key - */ -function validateKey(key) { - return VALID_KEY_REGEX.test(key); -} -exports.validateKey = validateKey; -/** - * Value is opaque string up to 256 characters printable ASCII RFC0020 - * characters (i.e., the range 0x20 to 0x7E) except comma , and =. - */ -function validateValue(value) { - return (VALID_VALUE_BASE_REGEX.test(value) && - !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value)); -} -exports.validateValue = validateValue; -//# sourceMappingURL=tracestate-validators.js.map - -/***/ }), - -/***/ 32615: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createTraceState = void 0; -const tracestate_impl_1 = __nccwpck_require__(62110); -function createTraceState(rawTraceState) { - return new tracestate_impl_1.TraceStateImpl(rawTraceState); -} -exports.createTraceState = createTraceState; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 91760: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = void 0; -const trace_flags_1 = __nccwpck_require__(26905); -exports.INVALID_SPANID = '0000000000000000'; -exports.INVALID_TRACEID = '00000000000000000000000000000000'; -exports.INVALID_SPAN_CONTEXT = { - traceId: exports.INVALID_TRACEID, - spanId: exports.INVALID_SPANID, - traceFlags: trace_flags_1.TraceFlags.NONE, -}; -//# sourceMappingURL=invalid-span-constants.js.map - -/***/ }), - -/***/ 31424: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SpanKind = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var SpanKind; -(function (SpanKind) { - /** Default value. Indicates that the span is used internally. */ - SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL"; - /** - * Indicates that the span covers server-side handling of an RPC or other - * remote request. - */ - SpanKind[SpanKind["SERVER"] = 1] = "SERVER"; - /** - * Indicates that the span covers the client-side wrapper around an RPC or - * other remote request. - */ - SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT"; - /** - * Indicates that the span describes producer sending a message to a - * broker. Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans. - */ - SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER"; - /** - * Indicates that the span describes consumer receiving a message from a - * broker. Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans. - */ - SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER"; -})(SpanKind = exports.SpanKind || (exports.SpanKind = {})); -//# sourceMappingURL=span_kind.js.map - -/***/ }), - -/***/ 49745: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const invalid_span_constants_1 = __nccwpck_require__(91760); -const NonRecordingSpan_1 = __nccwpck_require__(81462); -const VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i; -const VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i; -function isValidTraceId(traceId) { - return VALID_TRACEID_REGEX.test(traceId) && traceId !== invalid_span_constants_1.INVALID_TRACEID; -} -exports.isValidTraceId = isValidTraceId; -function isValidSpanId(spanId) { - return VALID_SPANID_REGEX.test(spanId) && spanId !== invalid_span_constants_1.INVALID_SPANID; -} -exports.isValidSpanId = isValidSpanId; -/** - * Returns true if this {@link SpanContext} is valid. - * @return true if this {@link SpanContext} is valid. - */ -function isSpanContextValid(spanContext) { - return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId)); -} -exports.isSpanContextValid = isSpanContextValid; -/** - * Wrap the given {@link SpanContext} in a new non-recording {@link Span} - * - * @param spanContext span context to be wrapped - * @returns a new non-recording {@link Span} with the provided context - */ -function wrapSpanContext(spanContext) { - return new NonRecordingSpan_1.NonRecordingSpan(spanContext); -} -exports.wrapSpanContext = wrapSpanContext; -//# sourceMappingURL=spancontext-utils.js.map - -/***/ }), - -/***/ 48845: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SpanStatusCode = void 0; -/** - * An enumeration of status codes. - */ -var SpanStatusCode; -(function (SpanStatusCode) { - /** - * The default status. - */ - SpanStatusCode[SpanStatusCode["UNSET"] = 0] = "UNSET"; - /** - * The operation has been validated by an Application developer or - * Operator to have completed successfully. - */ - SpanStatusCode[SpanStatusCode["OK"] = 1] = "OK"; - /** - * The operation contains an error. - */ - SpanStatusCode[SpanStatusCode["ERROR"] = 2] = "ERROR"; -})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {})); -//# sourceMappingURL=status.js.map - -/***/ }), - -/***/ 26905: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceFlags = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var TraceFlags; -(function (TraceFlags) { - /** Represents no flag set. */ - TraceFlags[TraceFlags["NONE"] = 0] = "NONE"; - /** Bit to represent whether trace is sampled in trace flags. */ - TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED"; -})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {})); -//# sourceMappingURL=trace_flags.js.map - -/***/ }), - -/***/ 98996: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.VERSION = void 0; -// this is autogenerated file, see scripts/version-update.js -exports.VERSION = '1.9.0'; -//# sourceMappingURL=version.js.map - -/***/ }), - -/***/ 85788: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AbstractAsyncHooksContextManager = void 0; -const events_1 = __nccwpck_require__(82361); -const ADD_LISTENER_METHODS = [ - 'addListener', - 'on', - 'once', - 'prependListener', - 'prependOnceListener', -]; -class AbstractAsyncHooksContextManager { - constructor() { - this._kOtListeners = Symbol('OtListeners'); - this._wrapped = false; - } - /** - * Binds a the certain context or the active one to the target function and then returns the target - * @param context A context (span) to be bind to target - * @param target a function or event emitter. When target or one of its callbacks is called, - * the provided context will be used as the active context for the duration of the call. - */ - bind(context, target) { - if (target instanceof events_1.EventEmitter) { - return this._bindEventEmitter(context, target); - } - if (typeof target === 'function') { - return this._bindFunction(context, target); - } - return target; - } - _bindFunction(context, target) { - const manager = this; - const contextWrapper = function (...args) { - return manager.with(context, () => target.apply(this, args)); - }; - Object.defineProperty(contextWrapper, 'length', { - enumerable: false, - configurable: true, - writable: false, - value: target.length, - }); - /** - * It isn't possible to tell Typescript that contextWrapper is the same as T - * so we forced to cast as any here. - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return contextWrapper; - } - /** - * By default, EventEmitter call their callback with their context, which we do - * not want, instead we will bind a specific context to all callbacks that - * go through it. - * @param context the context we want to bind - * @param ee EventEmitter an instance of EventEmitter to patch - */ - _bindEventEmitter(context, ee) { - const map = this._getPatchMap(ee); - if (map !== undefined) - return ee; - this._createPatchMap(ee); - // patch methods that add a listener to propagate context - ADD_LISTENER_METHODS.forEach(methodName => { - if (ee[methodName] === undefined) - return; - ee[methodName] = this._patchAddListener(ee, ee[methodName], context); - }); - // patch methods that remove a listener - if (typeof ee.removeListener === 'function') { - ee.removeListener = this._patchRemoveListener(ee, ee.removeListener); - } - if (typeof ee.off === 'function') { - ee.off = this._patchRemoveListener(ee, ee.off); - } - // patch method that remove all listeners - if (typeof ee.removeAllListeners === 'function') { - ee.removeAllListeners = this._patchRemoveAllListeners(ee, ee.removeAllListeners); - } - return ee; - } - /** - * Patch methods that remove a given listener so that we match the "patched" - * version of that listener (the one that propagate context). - * @param ee EventEmitter instance - * @param original reference to the patched method - */ - _patchRemoveListener(ee, original) { - const contextManager = this; - return function (event, listener) { - var _a; - const events = (_a = contextManager._getPatchMap(ee)) === null || _a === void 0 ? void 0 : _a[event]; - if (events === undefined) { - return original.call(this, event, listener); - } - const patchedListener = events.get(listener); - return original.call(this, event, patchedListener || listener); - }; - } - /** - * Patch methods that remove all listeners so we remove our - * internal references for a given event. - * @param ee EventEmitter instance - * @param original reference to the patched method - */ - _patchRemoveAllListeners(ee, original) { - const contextManager = this; - return function (event) { - const map = contextManager._getPatchMap(ee); - if (map !== undefined) { - if (arguments.length === 0) { - contextManager._createPatchMap(ee); - } - else if (map[event] !== undefined) { - delete map[event]; - } - } - return original.apply(this, arguments); - }; - } - /** - * Patch methods on an event emitter instance that can add listeners so we - * can force them to propagate a given context. - * @param ee EventEmitter instance - * @param original reference to the patched method - * @param [context] context to propagate when calling listeners - */ - _patchAddListener(ee, original, context) { - const contextManager = this; - return function (event, listener) { - /** - * This check is required to prevent double-wrapping the listener. - * The implementation for ee.once wraps the listener and calls ee.on. - * Without this check, we would wrap that wrapped listener. - * This causes an issue because ee.removeListener depends on the onceWrapper - * to properly remove the listener. If we wrap their wrapper, we break - * that detection. - */ - if (contextManager._wrapped) { - return original.call(this, event, listener); - } - let map = contextManager._getPatchMap(ee); - if (map === undefined) { - map = contextManager._createPatchMap(ee); - } - let listeners = map[event]; - if (listeners === undefined) { - listeners = new WeakMap(); - map[event] = listeners; - } - const patchedListener = contextManager.bind(context, listener); - // store a weak reference of the user listener to ours - listeners.set(listener, patchedListener); - /** - * See comment at the start of this function for the explanation of this property. - */ - contextManager._wrapped = true; - try { - return original.call(this, event, patchedListener); - } - finally { - contextManager._wrapped = false; - } - }; + function isValidEncodedURL(url3) { + for (let i2 = 0; i2 < url3.length; ++i2) { + const code = url3.charCodeAt(i2); + if (code > 126 || // Non-US-ASCII + DEL + code < 32) { + return false; + } + } + return true; } - _createPatchMap(ee) { - const map = Object.create(null); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ee[this._kOtListeners] = map; - return map; + function normalizeBinaryStringToUtf8(value) { + return Buffer.from(value, "binary").toString("utf8"); } - _getPatchMap(ee) { - return ee[this._kOtListeners]; + function requestCurrentURL(request) { + return request.urlList[request.urlList.length - 1]; } -} -exports.AbstractAsyncHooksContextManager = AbstractAsyncHooksContextManager; -//# sourceMappingURL=AbstractAsyncHooksContextManager.js.map - -/***/ }), - -/***/ 14096: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AsyncHooksContextManager = void 0; -const api_1 = __nccwpck_require__(65163); -const asyncHooks = __nccwpck_require__(50852); -const AbstractAsyncHooksContextManager_1 = __nccwpck_require__(85788); -class AsyncHooksContextManager extends AbstractAsyncHooksContextManager_1.AbstractAsyncHooksContextManager { - constructor() { - super(); - this._contexts = new Map(); - this._stack = []; - this._asyncHook = asyncHooks.createHook({ - init: this._init.bind(this), - before: this._before.bind(this), - after: this._after.bind(this), - destroy: this._destroy.bind(this), - promiseResolve: this._destroy.bind(this), - }); + function requestBadPort(request) { + const url3 = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url3) && badPortsSet.has(url3.port)) { + return "blocked"; + } + return "allowed"; } - active() { - var _a; - return (_a = this._stack[this._stack.length - 1]) !== null && _a !== void 0 ? _a : api_1.ROOT_CONTEXT; + function isErrorLike(object) { + return object instanceof Error || (object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"); } - with(context, fn, thisArg, ...args) { - this._enterContext(context); - try { - return fn.call(thisArg, ...args); - } - finally { - this._exitContext(); + function isValidReasonPhrase(statusText) { + for (let i2 = 0; i2 < statusText.length; ++i2) { + const c2 = statusText.charCodeAt(i2); + if (!(c2 === 9 || // HTAB + c2 >= 32 && c2 <= 126 || // SP / VCHAR + c2 >= 128 && c2 <= 255)) { + return false; } + } + return true; } - enable() { - this._asyncHook.enable(); - return this; - } - disable() { - this._asyncHook.disable(); - this._contexts.clear(); - this._stack = []; - return this; - } - /** - * Init hook will be called when userland create a async context, setting the - * context as the current one if it exist. - * @param uid id of the async context - * @param type the resource type - */ - _init(uid, type) { - // ignore TIMERWRAP as they combine timers with same timeout which can lead to - // false context propagation. TIMERWRAP has been removed in node 11 - // every timer has it's own `Timeout` resource anyway which is used to propagate - // context. - if (type === 'TIMERWRAP') - return; - const context = this._stack[this._stack.length - 1]; - if (context !== undefined) { - this._contexts.set(uid, context); - } - } - /** - * Destroy hook will be called when a given context is no longer used so we can - * remove its attached context. - * @param uid uid of the async context - */ - _destroy(uid) { - this._contexts.delete(uid); - } - /** - * Before hook is called just before executing a async context. - * @param uid uid of the async context - */ - _before(uid) { - const context = this._contexts.get(uid); - if (context !== undefined) { - this._enterContext(context); - } - } - /** - * After hook is called just after completing the execution of a async context. - */ - _after() { - this._exitContext(); - } - /** - * Set the given context as active - */ - _enterContext(context) { - this._stack.push(context); - } - /** - * Remove the context at the root of the stack - */ - _exitContext() { - this._stack.pop(); + var isValidHeaderName = isValidHTTPToken; + 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 parseReferrerPolicy(actualResponse) { + const policyHeader = (actualResponse.headersList.get("referrer-policy", true) ?? "").split(","); + let policy = ""; + if (policyHeader.length) { + for (let i2 = policyHeader.length; i2 !== 0; i2--) { + const token = policyHeader[i2 - 1].trim(); + if (referrerPolicyTokens.has(token)) { + policy = token; + break; + } + } + } + return policy; } -} -exports.AsyncHooksContextManager = AsyncHooksContextManager; -//# sourceMappingURL=AsyncHooksContextManager.js.map - -/***/ }), - -/***/ 20551: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AsyncLocalStorageContextManager = void 0; -const api_1 = __nccwpck_require__(65163); -const async_hooks_1 = __nccwpck_require__(50852); -const AbstractAsyncHooksContextManager_1 = __nccwpck_require__(85788); -class AsyncLocalStorageContextManager extends AbstractAsyncHooksContextManager_1.AbstractAsyncHooksContextManager { - constructor() { - super(); - this._asyncLocalStorage = new async_hooks_1.AsyncLocalStorage(); + function setRequestReferrerPolicyOnRedirect(request, actualResponse) { + const policy = parseReferrerPolicy(actualResponse); + if (policy !== "") { + request.referrerPolicy = policy; + } } - active() { - var _a; - return (_a = this._asyncLocalStorage.getStore()) !== null && _a !== void 0 ? _a : api_1.ROOT_CONTEXT; + function crossOriginResourcePolicyCheck() { + return "allowed"; } - with(context, fn, thisArg, ...args) { - const cb = thisArg == null ? fn : fn.bind(thisArg); - return this._asyncLocalStorage.run(context, cb, ...args); + function corsCheck() { + return "success"; } - enable() { - return this; + function TAOCheck() { + return "success"; } - disable() { - this._asyncLocalStorage.disable(); - return this; + function appendFetchMetadata(httpRequest) { + let header = null; + header = httpRequest.mode; + httpRequest.headersList.set("sec-fetch-mode", header, true); } -} -exports.AsyncLocalStorageContextManager = AsyncLocalStorageContextManager; -//# sourceMappingURL=AsyncLocalStorageContextManager.js.map - -/***/ }), - -/***/ 81616: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AsyncLocalStorageContextManager = exports.AsyncHooksContextManager = void 0; -var AsyncHooksContextManager_1 = __nccwpck_require__(14096); -Object.defineProperty(exports, "AsyncHooksContextManager", ({ enumerable: true, get: function () { return AsyncHooksContextManager_1.AsyncHooksContextManager; } })); -var AsyncLocalStorageContextManager_1 = __nccwpck_require__(20551); -Object.defineProperty(exports, "AsyncLocalStorageContextManager", ({ enumerable: true, get: function () { return AsyncLocalStorageContextManager_1.AsyncLocalStorageContextManager; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 67959: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExportResultCode = void 0; -var ExportResultCode; -(function (ExportResultCode) { - ExportResultCode[ExportResultCode["SUCCESS"] = 0] = "SUCCESS"; - ExportResultCode[ExportResultCode["FAILED"] = 1] = "FAILED"; -})(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {})); -//# sourceMappingURL=ExportResult.js.map - -/***/ }), - -/***/ 36178: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = void 0; -exports.BAGGAGE_KEY_PAIR_SEPARATOR = '='; -exports.BAGGAGE_PROPERTIES_SEPARATOR = ';'; -exports.BAGGAGE_ITEMS_SEPARATOR = ','; -// Name of the http header used to propagate the baggage -exports.BAGGAGE_HEADER = 'baggage'; -// Maximum number of name-value pairs allowed by w3c spec -exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180; -// Maximum number of bytes per a single name-value pair allowed by w3c spec -exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096; -// Maximum total length of all name-value pairs allowed by w3c spec -exports.BAGGAGE_MAX_TOTAL_LENGTH = 8192; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 61476: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.W3CBaggagePropagator = void 0; -const api_1 = __nccwpck_require__(65163); -const suppress_tracing_1 = __nccwpck_require__(54463); -const constants_1 = __nccwpck_require__(36178); -const utils_1 = __nccwpck_require__(49884); -/** - * Propagates {@link Baggage} through Context format propagation. - * - * Based on the Baggage specification: - * https://w3c.github.io/baggage/ - */ -class W3CBaggagePropagator { - inject(context, carrier, setter) { - const baggage = api_1.propagation.getBaggage(context); - if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context)) - return; - const keyPairs = (0, utils_1.getKeyPairs)(baggage) - .filter((pair) => { - return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS; - }) - .slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS); - const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs); - if (headerValue.length > 0) { - setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue); - } - } - extract(context, carrier, getter) { - const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER); - const baggageString = Array.isArray(headerValue) - ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR) - : headerValue; - if (!baggageString) - return context; - const baggage = {}; - if (baggageString.length === 0) { - return context; - } - const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR); - pairs.forEach(entry => { - const keyPair = (0, utils_1.parsePairKeyValue)(entry); - if (keyPair) { - const baggageEntry = { value: keyPair.value }; - if (keyPair.metadata) { - baggageEntry.metadata = keyPair.metadata; - } - baggage[keyPair.key] = baggageEntry; + 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; } - }); - if (Object.entries(baggage).length === 0) { - return context; + break; + case "same-origin": + if (!sameOrigin(request, requestCurrentURL(request))) { + serializedOrigin = null; + } + break; + default: } - return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage)); - } - fields() { - return [constants_1.BAGGAGE_HEADER]; - } -} -exports.W3CBaggagePropagator = W3CBaggagePropagator; -//# sourceMappingURL=W3CBaggagePropagator.js.map - -/***/ }), - -/***/ 49884: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const api_1 = __nccwpck_require__(65163); -const constants_1 = __nccwpck_require__(36178); -function serializeKeyPairs(keyPairs) { - return keyPairs.reduce((hValue, current) => { - const value = `${hValue}${hValue !== '' ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ''}${current}`; - return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value; - }, ''); -} -exports.serializeKeyPairs = serializeKeyPairs; -function getKeyPairs(baggage) { - return baggage.getAllEntries().map(([key, value]) => { - let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`; - // include opaque metadata if provided - // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation - if (value.metadata !== undefined) { - entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString(); - } - return entry; - }); -} -exports.getKeyPairs = getKeyPairs; -function parsePairKeyValue(entry) { - const valueProps = entry.split(constants_1.BAGGAGE_PROPERTIES_SEPARATOR); - if (valueProps.length <= 0) - return; - const keyPairPart = valueProps.shift(); - if (!keyPairPart) - return; - const separatorIndex = keyPairPart.indexOf(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR); - if (separatorIndex <= 0) - return; - const key = decodeURIComponent(keyPairPart.substring(0, separatorIndex).trim()); - const value = decodeURIComponent(keyPairPart.substring(separatorIndex + 1).trim()); - let metadata; - if (valueProps.length > 0) { - metadata = (0, api_1.baggageEntryMetadataFromString)(valueProps.join(constants_1.BAGGAGE_PROPERTIES_SEPARATOR)); + request.headersList.append("origin", serializedOrigin, true); + } } - return { key, value, metadata }; -} -exports.parsePairKeyValue = parsePairKeyValue; -/** - * Parse a string serialized in the baggage HTTP Format (without metadata): - * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md - */ -function parseKeyPairsIntoRecord(value) { - if (typeof value !== 'string' || value.length === 0) - return {}; - return value - .split(constants_1.BAGGAGE_ITEMS_SEPARATOR) - .map(entry => { - return parsePairKeyValue(entry); - }) - .filter(keyPair => keyPair !== undefined && keyPair.value.length > 0) - .reduce((headers, keyPair) => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - headers[keyPair.key] = keyPair.value; - return headers; - }, {}); -} -exports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 54848: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AnchoredClock = void 0; -/** - * A utility for returning wall times anchored to a given point in time. Wall time measurements will - * not be taken from the system, but instead are computed by adding a monotonic clock time - * to the anchor point. - * - * This is needed because the system time can change and result in unexpected situations like - * spans ending before they are started. Creating an anchored clock for each local root span - * ensures that span timings and durations are accurate while preventing span times from drifting - * too far from the system clock. - * - * Only creating an anchored clock once per local trace ensures span times are correct relative - * to each other. For example, a child span will never have a start time before its parent even - * if the system clock is corrected during the local trace. - * - * Heavily inspired by the OTel Java anchored clock - * https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/AnchoredClock.java - */ -class AnchoredClock { - /** - * Create a new AnchoredClock anchored to the current time returned by systemClock. - * - * @param systemClock should be a clock that returns the number of milliseconds since January 1 1970 such as Date - * @param monotonicClock should be a clock that counts milliseconds monotonically such as window.performance or perf_hooks.performance - */ - constructor(systemClock, monotonicClock) { - this._monotonicClock = monotonicClock; - this._epochMillis = systemClock.now(); - this._performanceMillis = monotonicClock.now(); - } - /** - * Returns the current time by adding the number of milliseconds since the - * AnchoredClock was created to the creation epoch time - */ - now() { - const delta = this._monotonicClock.now() - this._performanceMillis; - return this._epochMillis + delta; + function coarsenTime(timestamp2, crossOriginIsolatedCapability) { + return timestamp2; } -} -exports.AnchoredClock = AnchoredClock; -//# sourceMappingURL=anchored-clock.js.map - -/***/ }), - -/***/ 82807: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isAttributeValue = exports.isAttributeKey = exports.sanitizeAttributes = void 0; -const api_1 = __nccwpck_require__(65163); -function sanitizeAttributes(attributes) { - const out = {}; - if (typeof attributes !== 'object' || attributes == null) { - return out; + 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(performance3.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" + }; } - for (const [key, val] of Object.entries(attributes)) { - if (!isAttributeKey(key)) { - api_1.diag.warn(`Invalid attribute key: ${key}`); - continue; + function clonePolicyContainer(policyContainer) { + return { + referrerPolicy: policyContainer.referrerPolicy + }; + } + function determineRequestsReferrer(request) { + const policy = request.referrerPolicy; + assert(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 (webidl.is.URL(request.referrer)) { + referrerSource = request.referrer; + } + let referrerURL = stripURLForReferrer(referrerSource); + const referrerOrigin = stripURLForReferrer(referrerSource, true); + if (referrerURL.toString().length > 4096) { + referrerURL = referrerOrigin; + } + switch (policy) { + case "no-referrer": + return "no-referrer"; + case "origin": + if (referrerOrigin != null) { + return referrerOrigin; + } + return stripURLForReferrer(referrerSource, true); + case "unsafe-url": + return referrerURL; + case "strict-origin": { + const currentURL = requestCurrentURL(request); + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { + return "no-referrer"; + } + return referrerOrigin; } - if (!isAttributeValue(val)) { - api_1.diag.warn(`Invalid attribute value set for key: ${key}`); - continue; + 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; } - if (Array.isArray(val)) { - out[key] = val.slice(); + case "same-origin": + if (sameOrigin(request, referrerURL)) { + return referrerURL; + } + return "no-referrer"; + case "origin-when-cross-origin": + if (sameOrigin(request, referrerURL)) { + return referrerURL; + } + return referrerOrigin; + case "no-referrer-when-downgrade": { + const currentURL = requestCurrentURL(request); + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { + return "no-referrer"; + } + return referrerURL; } - else { - out[key] = val; + } + } + function stripURLForReferrer(url3, originOnly = false) { + assert(webidl.is.URL(url3)); + url3 = new URL(url3); + if (urlIsLocal(url3)) { + return "no-referrer"; + } + url3.username = ""; + url3.password = ""; + url3.hash = ""; + if (originOnly === true) { + url3.pathname = ""; + url3.search = ""; + } + return url3; + } + var isPotentialleTrustworthyIPv4 = RegExp.prototype.test.bind(/^127\.(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){2}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)$/); + var isPotentiallyTrustworthyIPv6 = RegExp.prototype.test.bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/); + function isOriginIPPotentiallyTrustworthy(origin) { + if (origin.includes(":")) { + if (origin[0] === "[" && origin[origin.length - 1] === "]") { + origin = origin.slice(1, -1); } + return isPotentiallyTrustworthyIPv6(origin); + } + return isPotentialleTrustworthyIPv4(origin); } - return out; -} -exports.sanitizeAttributes = sanitizeAttributes; -function isAttributeKey(key) { - return typeof key === 'string' && key.length > 0; -} -exports.isAttributeKey = isAttributeKey; -function isAttributeValue(val) { - if (val == null) { + function isOriginPotentiallyTrustworthy(origin) { + if (origin == null || origin === "null") { + return false; + } + origin = new URL(origin); + if (origin.protocol === "https:" || origin.protocol === "wss:") { return true; + } + if (isOriginIPPotentiallyTrustworthy(origin.hostname)) { + return true; + } + if (origin.hostname === "localhost" || origin.hostname === "localhost.") { + return true; + } + if (origin.hostname.endsWith(".localhost") || origin.hostname.endsWith(".localhost.")) { + return true; + } + if (origin.protocol === "file:") { + return true; + } + return false; } - if (Array.isArray(val)) { - return isHomogeneousAttributeValueArray(val); - } - return isValidPrimitiveAttributeValue(val); -} -exports.isAttributeValue = isAttributeValue; -function isHomogeneousAttributeValueArray(arr) { - let type; - for (const element of arr) { - // null/undefined elements are allowed - if (element == null) - continue; - if (!type) { - if (isValidPrimitiveAttributeValue(element)) { - type = typeof element; - continue; - } - // encountered an invalid primitive - return false; - } - if (typeof element === type) { - continue; - } + function isURLPotentiallyTrustworthy(url3) { + if (!webidl.is.URL(url3)) { return false; + } + if (url3.href === "about:blank" || url3.href === "about:srcdoc") { + return true; + } + if (url3.protocol === "data:") return true; + if (url3.protocol === "blob:") return true; + return isOriginPotentiallyTrustworthy(url3.origin); } - return true; -} -function isValidPrimitiveAttributeValue(val) { - switch (typeof val) { - case 'number': - case 'boolean': - case 'string': - return true; + function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) { } - return false; -} -//# sourceMappingURL=attributes.js.map - -/***/ }), - -/***/ 69246: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.globalErrorHandler = exports.setGlobalErrorHandler = void 0; -const logging_error_handler_1 = __nccwpck_require__(32882); -/** The global error handler delegate */ -let delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)(); -/** - * Set the global error handler - * @param {ErrorHandler} handler - */ -function setGlobalErrorHandler(handler) { - delegateHandler = handler; -} -exports.setGlobalErrorHandler = setGlobalErrorHandler; -/** - * Return the global error handler - * @param {Exception} ex - */ -function globalErrorHandler(ex) { - try { - delegateHandler(ex); + function sameOrigin(A3, B3) { + if (A3.origin === B3.origin && A3.origin === "null") { + return true; + } + if (A3.protocol === B3.protocol && A3.hostname === B3.hostname && A3.port === B3.port) { + return true; + } + return false; } - catch (_a) { } // eslint-disable-line no-empty -} -exports.globalErrorHandler = globalErrorHandler; -//# sourceMappingURL=global-error-handler.js.map - -/***/ }), - -/***/ 54986: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.hexToBinary = void 0; -function intValue(charCode) { - // 0-9 - if (charCode >= 48 && charCode <= 57) { - return charCode - 48; - } - // a-f - if (charCode >= 97 && charCode <= 102) { - return charCode - 87; - } - // A-F - return charCode - 55; -} -function hexToBinary(hexStr) { - const buf = new Uint8Array(hexStr.length / 2); - let offset = 0; - for (let i = 0; i < hexStr.length; i += 2) { - const hi = intValue(hexStr.charCodeAt(i)); - const lo = intValue(hexStr.charCodeAt(i + 1)); - buf[offset++] = (hi << 4) | lo; - } - return buf; -} -exports.hexToBinary = hexToBinary; -//# sourceMappingURL=hex-to-binary.js.map - -/***/ }), - -/***/ 32882: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.loggingErrorHandler = void 0; -const api_1 = __nccwpck_require__(65163); -/** - * Returns a function that logs an error using the provided logger, or a - * console logger if one was not provided. - */ -function loggingErrorHandler() { - return (ex) => { - api_1.diag.error(stringifyException(ex)); - }; -} -exports.loggingErrorHandler = loggingErrorHandler; -/** - * Converts an exception into a string representation - * @param {Exception} ex - */ -function stringifyException(ex) { - if (typeof ex === 'string') { - return ex; - } - else { - return JSON.stringify(flattenException(ex)); - } -} -/** - * Flattens an exception into key-value pairs by traversing the prototype chain - * and coercing values to strings. Duplicate properties will not be overwritten; - * the first insert wins. - */ -function flattenException(ex) { - const result = {}; - let current = ex; - while (current !== null) { - Object.getOwnPropertyNames(current).forEach(propertyName => { - if (result[propertyName]) - return; - const value = current[propertyName]; - if (value) { - result[propertyName] = String(value); - } - }); - current = Object.getPrototypeOf(current); - } - return result; -} -//# sourceMappingURL=logging-error-handler.js.map - -/***/ }), - -/***/ 86161: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.addHrTimes = exports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = exports.getTimeOrigin = exports.millisToHrTime = void 0; -const platform_1 = __nccwpck_require__(6730); -const NANOSECOND_DIGITS = 9; -const NANOSECOND_DIGITS_IN_MILLIS = 6; -const MILLISECONDS_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS_IN_MILLIS); -const SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS); -/** - * Converts a number of milliseconds from epoch to HrTime([seconds, remainder in nanoseconds]). - * @param epochMillis - */ -function millisToHrTime(epochMillis) { - const epochSeconds = epochMillis / 1000; - // Decimals only. - const seconds = Math.trunc(epochSeconds); - // Round sub-nanosecond accuracy to nanosecond. - const nanos = Math.round((epochMillis % 1000) * MILLISECONDS_TO_NANOSECONDS); - return [seconds, nanos]; -} -exports.millisToHrTime = millisToHrTime; -function getTimeOrigin() { - let timeOrigin = platform_1.otperformance.timeOrigin; - if (typeof timeOrigin !== 'number') { - const perf = platform_1.otperformance; - timeOrigin = perf.timing && perf.timing.fetchStart; - } - return timeOrigin; -} -exports.getTimeOrigin = getTimeOrigin; -/** - * Returns an hrtime calculated via performance component. - * @param performanceNow - */ -function hrTime(performanceNow) { - const timeOrigin = millisToHrTime(getTimeOrigin()); - const now = millisToHrTime(typeof performanceNow === 'number' ? performanceNow : platform_1.otperformance.now()); - return addHrTimes(timeOrigin, now); -} -exports.hrTime = hrTime; -/** - * - * Converts a TimeInput to an HrTime, defaults to _hrtime(). - * @param time - */ -function timeInputToHrTime(time) { - // process.hrtime - if (isTimeInputHrTime(time)) { - return time; - } - else if (typeof time === 'number') { - // Must be a performance.now() if it's smaller than process start time. - if (time < getTimeOrigin()) { - return hrTime(time); - } - else { - // epoch milliseconds or performance.timeOrigin - return millisToHrTime(time); - } + function isAborted(fetchParams) { + return fetchParams.controller.state === "aborted"; } - else if (time instanceof Date) { - return millisToHrTime(time.getTime()); + function isCancelled(fetchParams) { + return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; } - else { - throw TypeError('Invalid input type'); + function normalizeMethod(method) { + return normalizedMethodRecordsBase[method.toLowerCase()] ?? method; } -} -exports.timeInputToHrTime = timeInputToHrTime; -/** - * Returns a duration of two hrTime. - * @param startTime - * @param endTime - */ -function hrTimeDuration(startTime, endTime) { - let seconds = endTime[0] - startTime[0]; - let nanos = endTime[1] - startTime[1]; - // overflow - if (nanos < 0) { - seconds -= 1; - // negate - nanos += SECOND_TO_NANOSECONDS; - } - return [seconds, nanos]; -} -exports.hrTimeDuration = hrTimeDuration; -/** - * Convert hrTime to timestamp, for example "2019-05-14T17:00:00.000123456Z" - * @param time - */ -function hrTimeToTimeStamp(time) { - const precision = NANOSECOND_DIGITS; - const tmp = `${'0'.repeat(precision)}${time[1]}Z`; - const nanoString = tmp.substr(tmp.length - precision - 1); - const date = new Date(time[0] * 1000).toISOString(); - return date.replace('000Z', nanoString); -} -exports.hrTimeToTimeStamp = hrTimeToTimeStamp; -/** - * Convert hrTime to nanoseconds. - * @param time - */ -function hrTimeToNanoseconds(time) { - return time[0] * SECOND_TO_NANOSECONDS + time[1]; -} -exports.hrTimeToNanoseconds = hrTimeToNanoseconds; -/** - * Convert hrTime to milliseconds. - * @param time - */ -function hrTimeToMilliseconds(time) { - return time[0] * 1e3 + time[1] / 1e6; -} -exports.hrTimeToMilliseconds = hrTimeToMilliseconds; -/** - * Convert hrTime to microseconds. - * @param time - */ -function hrTimeToMicroseconds(time) { - return time[0] * 1e6 + time[1] / 1e3; -} -exports.hrTimeToMicroseconds = hrTimeToMicroseconds; -/** - * check if time is HrTime - * @param value - */ -function isTimeInputHrTime(value) { - return (Array.isArray(value) && - value.length === 2 && - typeof value[0] === 'number' && - typeof value[1] === 'number'); -} -exports.isTimeInputHrTime = isTimeInputHrTime; -/** - * check if input value is a correct types.TimeInput - * @param value - */ -function isTimeInput(value) { - return (isTimeInputHrTime(value) || - typeof value === 'number' || - value instanceof Date); -} -exports.isTimeInput = isTimeInput; -/** - * Given 2 HrTime formatted times, return their sum as an HrTime. - */ -function addHrTimes(time1, time2) { - const out = [time1[0] + time2[0], time1[1] + time2[1]]; - // Nanoseconds - if (out[1] >= SECOND_TO_NANOSECONDS) { - out[1] -= SECOND_TO_NANOSECONDS; - out[0] += 1; - } - return out; -} -exports.addHrTimes = addHrTimes; -//# sourceMappingURL=time.js.map - -/***/ }), - -/***/ 89736: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.TraceState = exports.unsuppressTracing = exports.suppressTracing = exports.isTracingSuppressed = exports.TraceIdRatioBasedSampler = exports.ParentBasedSampler = exports.AlwaysOnSampler = exports.AlwaysOffSampler = exports.setRPCMetadata = exports.getRPCMetadata = exports.deleteRPCMetadata = exports.RPCType = exports.parseTraceParent = exports.W3CTraceContextPropagator = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = exports.CompositePropagator = exports.unrefTimer = exports.otperformance = exports.hexToBase64 = exports.getEnvWithoutDefaults = exports.getEnv = exports._globalThis = exports.SDK_INFO = exports.RandomIdGenerator = exports.baggageUtils = exports.ExportResultCode = exports.hexToBinary = exports.timeInputToHrTime = exports.millisToHrTime = exports.isTimeInputHrTime = exports.isTimeInput = exports.hrTimeToTimeStamp = exports.hrTimeToNanoseconds = exports.hrTimeToMilliseconds = exports.hrTimeToMicroseconds = exports.hrTimeDuration = exports.hrTime = exports.getTimeOrigin = exports.addHrTimes = exports.loggingErrorHandler = exports.setGlobalErrorHandler = exports.globalErrorHandler = exports.sanitizeAttributes = exports.isAttributeValue = exports.isAttributeKey = exports.AnchoredClock = exports.W3CBaggagePropagator = void 0; -exports.internal = exports.VERSION = exports.BindOnceFuture = exports.isWrapped = exports.urlMatches = exports.isUrlIgnored = exports.callWithTimeout = exports.TimeoutError = exports.TracesSamplerValues = exports.merge = exports.parseEnvironment = exports.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT = exports.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT = exports.DEFAULT_ENVIRONMENT = void 0; -var W3CBaggagePropagator_1 = __nccwpck_require__(61476); -Object.defineProperty(exports, "W3CBaggagePropagator", ({ enumerable: true, get: function () { return W3CBaggagePropagator_1.W3CBaggagePropagator; } })); -var anchored_clock_1 = __nccwpck_require__(54848); -Object.defineProperty(exports, "AnchoredClock", ({ enumerable: true, get: function () { return anchored_clock_1.AnchoredClock; } })); -var attributes_1 = __nccwpck_require__(82807); -Object.defineProperty(exports, "isAttributeKey", ({ enumerable: true, get: function () { return attributes_1.isAttributeKey; } })); -Object.defineProperty(exports, "isAttributeValue", ({ enumerable: true, get: function () { return attributes_1.isAttributeValue; } })); -Object.defineProperty(exports, "sanitizeAttributes", ({ enumerable: true, get: function () { return attributes_1.sanitizeAttributes; } })); -var global_error_handler_1 = __nccwpck_require__(69246); -Object.defineProperty(exports, "globalErrorHandler", ({ enumerable: true, get: function () { return global_error_handler_1.globalErrorHandler; } })); -Object.defineProperty(exports, "setGlobalErrorHandler", ({ enumerable: true, get: function () { return global_error_handler_1.setGlobalErrorHandler; } })); -var logging_error_handler_1 = __nccwpck_require__(32882); -Object.defineProperty(exports, "loggingErrorHandler", ({ enumerable: true, get: function () { return logging_error_handler_1.loggingErrorHandler; } })); -var time_1 = __nccwpck_require__(86161); -Object.defineProperty(exports, "addHrTimes", ({ enumerable: true, get: function () { return time_1.addHrTimes; } })); -Object.defineProperty(exports, "getTimeOrigin", ({ enumerable: true, get: function () { return time_1.getTimeOrigin; } })); -Object.defineProperty(exports, "hrTime", ({ enumerable: true, get: function () { return time_1.hrTime; } })); -Object.defineProperty(exports, "hrTimeDuration", ({ enumerable: true, get: function () { return time_1.hrTimeDuration; } })); -Object.defineProperty(exports, "hrTimeToMicroseconds", ({ enumerable: true, get: function () { return time_1.hrTimeToMicroseconds; } })); -Object.defineProperty(exports, "hrTimeToMilliseconds", ({ enumerable: true, get: function () { return time_1.hrTimeToMilliseconds; } })); -Object.defineProperty(exports, "hrTimeToNanoseconds", ({ enumerable: true, get: function () { return time_1.hrTimeToNanoseconds; } })); -Object.defineProperty(exports, "hrTimeToTimeStamp", ({ enumerable: true, get: function () { return time_1.hrTimeToTimeStamp; } })); -Object.defineProperty(exports, "isTimeInput", ({ enumerable: true, get: function () { return time_1.isTimeInput; } })); -Object.defineProperty(exports, "isTimeInputHrTime", ({ enumerable: true, get: function () { return time_1.isTimeInputHrTime; } })); -Object.defineProperty(exports, "millisToHrTime", ({ enumerable: true, get: function () { return time_1.millisToHrTime; } })); -Object.defineProperty(exports, "timeInputToHrTime", ({ enumerable: true, get: function () { return time_1.timeInputToHrTime; } })); -var hex_to_binary_1 = __nccwpck_require__(54986); -Object.defineProperty(exports, "hexToBinary", ({ enumerable: true, get: function () { return hex_to_binary_1.hexToBinary; } })); -var ExportResult_1 = __nccwpck_require__(67959); -Object.defineProperty(exports, "ExportResultCode", ({ enumerable: true, get: function () { return ExportResult_1.ExportResultCode; } })); -const utils_1 = __nccwpck_require__(49884); -exports.baggageUtils = { - getKeyPairs: utils_1.getKeyPairs, - serializeKeyPairs: utils_1.serializeKeyPairs, - parseKeyPairsIntoRecord: utils_1.parseKeyPairsIntoRecord, - parsePairKeyValue: utils_1.parsePairKeyValue, -}; -var platform_1 = __nccwpck_require__(6730); -Object.defineProperty(exports, "RandomIdGenerator", ({ enumerable: true, get: function () { return platform_1.RandomIdGenerator; } })); -Object.defineProperty(exports, "SDK_INFO", ({ enumerable: true, get: function () { return platform_1.SDK_INFO; } })); -Object.defineProperty(exports, "_globalThis", ({ enumerable: true, get: function () { return platform_1._globalThis; } })); -Object.defineProperty(exports, "getEnv", ({ enumerable: true, get: function () { return platform_1.getEnv; } })); -Object.defineProperty(exports, "getEnvWithoutDefaults", ({ enumerable: true, get: function () { return platform_1.getEnvWithoutDefaults; } })); -Object.defineProperty(exports, "hexToBase64", ({ enumerable: true, get: function () { return platform_1.hexToBase64; } })); -Object.defineProperty(exports, "otperformance", ({ enumerable: true, get: function () { return platform_1.otperformance; } })); -Object.defineProperty(exports, "unrefTimer", ({ enumerable: true, get: function () { return platform_1.unrefTimer; } })); -var composite_1 = __nccwpck_require__(57785); -Object.defineProperty(exports, "CompositePropagator", ({ enumerable: true, get: function () { return composite_1.CompositePropagator; } })); -var W3CTraceContextPropagator_1 = __nccwpck_require__(61463); -Object.defineProperty(exports, "TRACE_PARENT_HEADER", ({ enumerable: true, get: function () { return W3CTraceContextPropagator_1.TRACE_PARENT_HEADER; } })); -Object.defineProperty(exports, "TRACE_STATE_HEADER", ({ enumerable: true, get: function () { return W3CTraceContextPropagator_1.TRACE_STATE_HEADER; } })); -Object.defineProperty(exports, "W3CTraceContextPropagator", ({ enumerable: true, get: function () { return W3CTraceContextPropagator_1.W3CTraceContextPropagator; } })); -Object.defineProperty(exports, "parseTraceParent", ({ enumerable: true, get: function () { return W3CTraceContextPropagator_1.parseTraceParent; } })); -var rpc_metadata_1 = __nccwpck_require__(52992); -Object.defineProperty(exports, "RPCType", ({ enumerable: true, get: function () { return rpc_metadata_1.RPCType; } })); -Object.defineProperty(exports, "deleteRPCMetadata", ({ enumerable: true, get: function () { return rpc_metadata_1.deleteRPCMetadata; } })); -Object.defineProperty(exports, "getRPCMetadata", ({ enumerable: true, get: function () { return rpc_metadata_1.getRPCMetadata; } })); -Object.defineProperty(exports, "setRPCMetadata", ({ enumerable: true, get: function () { return rpc_metadata_1.setRPCMetadata; } })); -var AlwaysOffSampler_1 = __nccwpck_require__(16478); -Object.defineProperty(exports, "AlwaysOffSampler", ({ enumerable: true, get: function () { return AlwaysOffSampler_1.AlwaysOffSampler; } })); -var AlwaysOnSampler_1 = __nccwpck_require__(88317); -Object.defineProperty(exports, "AlwaysOnSampler", ({ enumerable: true, get: function () { return AlwaysOnSampler_1.AlwaysOnSampler; } })); -var ParentBasedSampler_1 = __nccwpck_require__(15136); -Object.defineProperty(exports, "ParentBasedSampler", ({ enumerable: true, get: function () { return ParentBasedSampler_1.ParentBasedSampler; } })); -var TraceIdRatioBasedSampler_1 = __nccwpck_require__(69326); -Object.defineProperty(exports, "TraceIdRatioBasedSampler", ({ enumerable: true, get: function () { return TraceIdRatioBasedSampler_1.TraceIdRatioBasedSampler; } })); -var suppress_tracing_1 = __nccwpck_require__(54463); -Object.defineProperty(exports, "isTracingSuppressed", ({ enumerable: true, get: function () { return suppress_tracing_1.isTracingSuppressed; } })); -Object.defineProperty(exports, "suppressTracing", ({ enumerable: true, get: function () { return suppress_tracing_1.suppressTracing; } })); -Object.defineProperty(exports, "unsuppressTracing", ({ enumerable: true, get: function () { return suppress_tracing_1.unsuppressTracing; } })); -var TraceState_1 = __nccwpck_require__(1914); -Object.defineProperty(exports, "TraceState", ({ enumerable: true, get: function () { return TraceState_1.TraceState; } })); -var environment_1 = __nccwpck_require__(7238); -Object.defineProperty(exports, "DEFAULT_ATTRIBUTE_COUNT_LIMIT", ({ enumerable: true, get: function () { return environment_1.DEFAULT_ATTRIBUTE_COUNT_LIMIT; } })); -Object.defineProperty(exports, "DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT", ({ enumerable: true, get: function () { return environment_1.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT; } })); -Object.defineProperty(exports, "DEFAULT_ENVIRONMENT", ({ enumerable: true, get: function () { return environment_1.DEFAULT_ENVIRONMENT; } })); -Object.defineProperty(exports, "DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT", ({ enumerable: true, get: function () { return environment_1.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT; } })); -Object.defineProperty(exports, "DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT", ({ enumerable: true, get: function () { return environment_1.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT; } })); -Object.defineProperty(exports, "parseEnvironment", ({ enumerable: true, get: function () { return environment_1.parseEnvironment; } })); -var merge_1 = __nccwpck_require__(65387); -Object.defineProperty(exports, "merge", ({ enumerable: true, get: function () { return merge_1.merge; } })); -var sampling_1 = __nccwpck_require__(28289); -Object.defineProperty(exports, "TracesSamplerValues", ({ enumerable: true, get: function () { return sampling_1.TracesSamplerValues; } })); -var timeout_1 = __nccwpck_require__(48400); -Object.defineProperty(exports, "TimeoutError", ({ enumerable: true, get: function () { return timeout_1.TimeoutError; } })); -Object.defineProperty(exports, "callWithTimeout", ({ enumerable: true, get: function () { return timeout_1.callWithTimeout; } })); -var url_1 = __nccwpck_require__(90839); -Object.defineProperty(exports, "isUrlIgnored", ({ enumerable: true, get: function () { return url_1.isUrlIgnored; } })); -Object.defineProperty(exports, "urlMatches", ({ enumerable: true, get: function () { return url_1.urlMatches; } })); -var wrap_1 = __nccwpck_require__(67226); -Object.defineProperty(exports, "isWrapped", ({ enumerable: true, get: function () { return wrap_1.isWrapped; } })); -var callback_1 = __nccwpck_require__(12408); -Object.defineProperty(exports, "BindOnceFuture", ({ enumerable: true, get: function () { return callback_1.BindOnceFuture; } })); -var version_1 = __nccwpck_require__(55687); -Object.defineProperty(exports, "VERSION", ({ enumerable: true, get: function () { return version_1.VERSION; } })); -const exporter_1 = __nccwpck_require__(87795); -exports.internal = { - _export: exporter_1._export, -}; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 87795: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports._export = void 0; -const api_1 = __nccwpck_require__(65163); -const suppress_tracing_1 = __nccwpck_require__(54463); -/** - * @internal - * Shared functionality used by Exporters while exporting data, including suppression of Traces. - */ -function _export(exporter, arg) { - return new Promise(resolve => { - // prevent downstream exporter calls from generating spans - api_1.context.with((0, suppress_tracing_1.suppressTracing)(api_1.context.active()), () => { - exporter.export(arg, (result) => { - resolve(result); - }); - }); - }); -} -exports._export = _export; -//# sourceMappingURL=exporter.js.map - -/***/ }), - -/***/ 96242: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.validateValue = exports.validateKey = void 0; -const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]'; -const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`; -const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`; -const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`); -const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/; -const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/; -/** - * Key is opaque string up to 256 characters printable. It MUST begin with a - * lowercase letter, and can only contain lowercase letters a-z, digits 0-9, - * underscores _, dashes -, asterisks *, and forward slashes /. - * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the - * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key. - * see https://www.w3.org/TR/trace-context/#key - */ -function validateKey(key) { - return VALID_KEY_REGEX.test(key); -} -exports.validateKey = validateKey; -/** - * Value is opaque string up to 256 characters printable ASCII RFC0020 - * characters (i.e., the range 0x20 to 0x7E) except comma , and =. - */ -function validateValue(value) { - return (VALID_VALUE_BASE_REGEX.test(value) && - !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value)); -} -exports.validateValue = validateValue; -//# sourceMappingURL=validators.js.map - -/***/ }), - -/***/ 6730: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.unrefTimer = exports.otperformance = exports.hexToBase64 = exports.getEnvWithoutDefaults = exports.getEnv = exports._globalThis = exports.SDK_INFO = exports.RandomIdGenerator = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var node_1 = __nccwpck_require__(9340); -Object.defineProperty(exports, "RandomIdGenerator", ({ enumerable: true, get: function () { return node_1.RandomIdGenerator; } })); -Object.defineProperty(exports, "SDK_INFO", ({ enumerable: true, get: function () { return node_1.SDK_INFO; } })); -Object.defineProperty(exports, "_globalThis", ({ enumerable: true, get: function () { return node_1._globalThis; } })); -Object.defineProperty(exports, "getEnv", ({ enumerable: true, get: function () { return node_1.getEnv; } })); -Object.defineProperty(exports, "getEnvWithoutDefaults", ({ enumerable: true, get: function () { return node_1.getEnvWithoutDefaults; } })); -Object.defineProperty(exports, "hexToBase64", ({ enumerable: true, get: function () { return node_1.hexToBase64; } })); -Object.defineProperty(exports, "otperformance", ({ enumerable: true, get: function () { return node_1.otperformance; } })); -Object.defineProperty(exports, "unrefTimer", ({ enumerable: true, get: function () { return node_1.unrefTimer; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 25476: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RandomIdGenerator = void 0; -const SPAN_ID_BYTES = 8; -const TRACE_ID_BYTES = 16; -/** - * @deprecated Use the one defined in @opentelemetry/sdk-trace-base instead. - */ -class RandomIdGenerator { - constructor() { - /** - * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex - * characters corresponding to 128 bits. - */ - this.generateTraceId = getIdGenerator(TRACE_ID_BYTES); + var esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); + function createIterator(name, kInternalIterator, keyIndex = 0, valueIndex = 1) { + class FastIterableIterator { + /** @type {any} */ + #target; + /** @type {'key' | 'value' | 'key+value'} */ + #kind; + /** @type {number} */ + #index; /** - * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex - * characters corresponding to 64 bits. + * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind */ - this.generateSpanId = getIdGenerator(SPAN_ID_BYTES); - } -} -exports.RandomIdGenerator = RandomIdGenerator; -const SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES); -function getIdGenerator(bytes) { - return function generateId() { - for (let i = 0; i < bytes / 4; i++) { - // unsigned right shift drops decimal part of the number - // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE - SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4); - } - // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated - for (let i = 0; i < bytes; i++) { - if (SHARED_BUFFER[i] > 0) { - break; - } - else if (i === bytes - 1) { - SHARED_BUFFER[bytes - 1] = 1; - } + 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 = kInternalIterator(this.#target); + const len = values.length; + if (index >= len) { + 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 + }; } - return SHARED_BUFFER.toString('hex', 0, bytes); - }; -} -//# sourceMappingURL=RandomIdGenerator.js.map - -/***/ }), - -/***/ 76494: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEnvWithoutDefaults = exports.getEnv = void 0; -const environment_1 = __nccwpck_require__(7238); -/** - * Gets the environment variables - */ -function getEnv() { - const processEnv = (0, environment_1.parseEnvironment)(process.env); - return Object.assign({}, environment_1.DEFAULT_ENVIRONMENT, processEnv); -} -exports.getEnv = getEnv; -function getEnvWithoutDefaults() { - return (0, environment_1.parseEnvironment)(process.env); -} -exports.getEnvWithoutDefaults = getEnvWithoutDefaults; -//# sourceMappingURL=environment.js.map - -/***/ }), - -/***/ 57196: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports._globalThis = void 0; -/** only globals that common to node and browsers are allowed */ -// eslint-disable-next-line node/no-unsupported-features/es-builtins -exports._globalThis = typeof globalThis === 'object' ? globalThis : global; -//# sourceMappingURL=globalThis.js.map - -/***/ }), - -/***/ 75004: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.hexToBase64 = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const hex_to_binary_1 = __nccwpck_require__(54986); -function hexToBase64(hexStr) { - return Buffer.from((0, hex_to_binary_1.hexToBinary)(hexStr)).toString('base64'); -} -exports.hexToBase64 = hexToBase64; -//# sourceMappingURL=hex-to-base64.js.map - -/***/ }), - -/***/ 9340: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.unrefTimer = exports.SDK_INFO = exports.otperformance = exports.RandomIdGenerator = exports.hexToBase64 = exports._globalThis = exports.getEnv = exports.getEnvWithoutDefaults = void 0; -var environment_1 = __nccwpck_require__(76494); -Object.defineProperty(exports, "getEnvWithoutDefaults", ({ enumerable: true, get: function () { return environment_1.getEnvWithoutDefaults; } })); -Object.defineProperty(exports, "getEnv", ({ enumerable: true, get: function () { return environment_1.getEnv; } })); -var globalThis_1 = __nccwpck_require__(57196); -Object.defineProperty(exports, "_globalThis", ({ enumerable: true, get: function () { return globalThis_1._globalThis; } })); -var hex_to_base64_1 = __nccwpck_require__(75004); -Object.defineProperty(exports, "hexToBase64", ({ enumerable: true, get: function () { return hex_to_base64_1.hexToBase64; } })); -var RandomIdGenerator_1 = __nccwpck_require__(25476); -Object.defineProperty(exports, "RandomIdGenerator", ({ enumerable: true, get: function () { return RandomIdGenerator_1.RandomIdGenerator; } })); -var performance_1 = __nccwpck_require__(39338); -Object.defineProperty(exports, "otperformance", ({ enumerable: true, get: function () { return performance_1.otperformance; } })); -var sdk_info_1 = __nccwpck_require__(10265); -Object.defineProperty(exports, "SDK_INFO", ({ enumerable: true, get: function () { return sdk_info_1.SDK_INFO; } })); -var timer_util_1 = __nccwpck_require__(51027); -Object.defineProperty(exports, "unrefTimer", ({ enumerable: true, get: function () { return timer_util_1.unrefTimer; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 39338: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.otperformance = void 0; -const perf_hooks_1 = __nccwpck_require__(4074); -exports.otperformance = perf_hooks_1.performance; -//# sourceMappingURL=performance.js.map - -/***/ }), - -/***/ 10265: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SDK_INFO = void 0; -const version_1 = __nccwpck_require__(55687); -const semantic_conventions_1 = __nccwpck_require__(67275); -/** Constants describing the SDK in use */ -exports.SDK_INFO = { - [semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_NAME]: 'opentelemetry', - [semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_NAME]: 'node', - [semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TELEMETRYSDKLANGUAGEVALUES_NODEJS, - [semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_VERSION]: version_1.VERSION, -}; -//# sourceMappingURL=sdk-info.js.map - -/***/ }), - -/***/ 51027: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.unrefTimer = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function unrefTimer(timer) { - timer.unref(); -} -exports.unrefTimer = unrefTimer; -//# sourceMappingURL=timer-util.js.map - -/***/ }), - -/***/ 57785: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CompositePropagator = void 0; -const api_1 = __nccwpck_require__(65163); -/** Combines multiple propagators into a single propagator. */ -class CompositePropagator { - /** - * Construct a composite propagator from a list of propagators. - * - * @param [config] Configuration object for composite propagator - */ - constructor(config = {}) { - var _a; - this._propagators = (_a = config.propagators) !== null && _a !== void 0 ? _a : []; - this._fields = Array.from(new Set(this._propagators - // older propagators may not have fields function, null check to be sure - .map(p => (typeof p.fields === 'function' ? p.fields() : [])) - .reduce((x, y) => x.concat(y), []))); - } - /** - * Run each of the configured propagators with the given context and carrier. - * Propagators are run in the order they are configured, so if multiple - * propagators write the same carrier key, the propagator later in the list - * will "win". - * - * @param context Context to inject - * @param carrier Carrier into which context will be injected - */ - inject(context, carrier, setter) { - for (const propagator of this._propagators) { - try { - propagator.inject(context, carrier, setter); - } - catch (err) { - api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`); + } + 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 } + }); + return function(target, kind) { + return new FastIterableIterator(target, kind); + }; + } + 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 + } + }); } - /** - * Run each of the configured propagators with the given context and carrier. - * Propagators are run in the order they are configured, so if multiple - * propagators write the same context key, the propagator later in the list - * will "win". - * - * @param context Context to add values to - * @param carrier Carrier from which to extract context - */ - extract(context, carrier, getter) { - return this._propagators.reduce((ctx, propagator) => { - try { - return propagator.extract(ctx, carrier, getter); - } - catch (err) { - api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`); - } - return ctx; - }, context); + function fullyReadBody(body, processBody, processBodyError) { + const successSteps = processBody; + const errorSteps = processBodyError; + try { + const reader = body.stream.getReader(); + readAllBytes(reader, successSteps, errorSteps); + } catch (e2) { + errorSteps(e2); + } } - fields() { - // return a new array so our fields cannot be modified - return this._fields.slice(); + 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; + } + } } -} -exports.CompositePropagator = CompositePropagator; -//# sourceMappingURL=composite.js.map - -/***/ }), - -/***/ 1914: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceState = void 0; -const validators_1 = __nccwpck_require__(96242); -const MAX_TRACE_STATE_ITEMS = 32; -const MAX_TRACE_STATE_LEN = 512; -const LIST_MEMBERS_SEPARATOR = ','; -const LIST_MEMBER_KEY_VALUE_SPLITTER = '='; -/** - * TraceState must be a class and not a simple object type because of the spec - * requirement (https://www.w3.org/TR/trace-context/#tracestate-field). - * - * Here is the list of allowed mutations: - * - New key-value pair should be added into the beginning of the list - * - The value of any key can be updated. Modified keys MUST be moved to the - * beginning of the list. - */ -class TraceState { - constructor(rawTraceState) { - this._internalState = new Map(); - if (rawTraceState) - this._parse(rawTraceState); - } - set(key, value) { - // TODO: Benchmark the different approaches(map vs list) and - // use the faster one. - const traceState = this._clone(); - if (traceState._internalState.has(key)) { - traceState._internalState.delete(key); - } - traceState._internalState.set(key, value); - return traceState; - } - unset(key) { - const traceState = this._clone(); - traceState._internalState.delete(key); - return traceState; - } - get(key) { - return this._internalState.get(key); - } - serialize() { - return this._keys() - .reduce((agg, key) => { - agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key)); - return agg; - }, []) - .join(LIST_MEMBERS_SEPARATOR); - } - _parse(rawTraceState) { - if (rawTraceState.length > MAX_TRACE_STATE_LEN) + async function readAllBytes(reader, successSteps, failureSteps) { + try { + const bytes = []; + let byteLength = 0; + do { + const { done, value: chunk } = await reader.read(); + if (done) { + successSteps(Buffer.concat(bytes, byteLength)); return; - this._internalState = rawTraceState - .split(LIST_MEMBERS_SEPARATOR) - .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning - .reduce((agg, part) => { - const listMember = part.trim(); // Optional Whitespace (OWS) handling - const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER); - if (i !== -1) { - const key = listMember.slice(0, i); - const value = listMember.slice(i + 1, part.length); - if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) { - agg.set(key, value); - } - else { - // TODO: Consider to add warning log - } - } - return agg; - }, new Map()); - // Because of the reverse() requirement, trunc must be done after map is created - if (this._internalState.size > MAX_TRACE_STATE_ITEMS) { - this._internalState = new Map(Array.from(this._internalState.entries()) - .reverse() // Use reverse same as original tracestate parse chain - .slice(0, MAX_TRACE_STATE_ITEMS)); + } + if (!isUint8Array(chunk)) { + failureSteps(new TypeError("Received non-Uint8Array chunk")); + return; + } + bytes.push(chunk); + byteLength += chunk.length; + } while (true); + } catch (e2) { + failureSteps(e2); + } + } + function urlIsLocal(url3) { + assert("protocol" in url3); + const protocol = url3.protocol; + return protocol === "about:" || protocol === "blob:" || protocol === "data:"; + } + function urlHasHttpsScheme(url3) { + return typeof url3 === "string" && url3[5] === ":" && url3[0] === "h" && url3[1] === "t" && url3[2] === "t" && url3[3] === "p" && url3[4] === "s" || url3.protocol === "https:"; + } + function urlIsHttpHttpsScheme(url3) { + assert("protocol" in url3); + const protocol = url3.protocol; + return protocol === "http:" || protocol === "https:"; + } + 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 }; + } + 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 { + #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.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)); } - } - _keys() { - return Array.from(this._internalState.keys()).reverse(); - } - _clone() { - const traceState = new TraceState(); - traceState._internalState = new Map(this._internalState); - return traceState; - } -} -exports.TraceState = TraceState; -//# sourceMappingURL=TraceState.js.map - -/***/ }), - -/***/ 61463: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = void 0; -const api_1 = __nccwpck_require__(65163); -const suppress_tracing_1 = __nccwpck_require__(54463); -const TraceState_1 = __nccwpck_require__(1914); -exports.TRACE_PARENT_HEADER = 'traceparent'; -exports.TRACE_STATE_HEADER = 'tracestate'; -const VERSION = '00'; -const VERSION_PART = '(?!ff)[\\da-f]{2}'; -const TRACE_ID_PART = '(?![0]{32})[\\da-f]{32}'; -const PARENT_ID_PART = '(?![0]{16})[\\da-f]{16}'; -const FLAGS_PART = '[\\da-f]{2}'; -const TRACE_PARENT_REGEX = new RegExp(`^\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\s?$`); -/** - * Parses information from the [traceparent] span tag and converts it into {@link SpanContext} - * @param traceParent - A meta property that comes from server. - * It should be dynamically generated server side to have the server's request trace Id, - * a parent span Id that was set on the server's request span, - * and the trace flags to indicate the server's sampling decision - * (01 = sampled, 00 = not sampled). - * for example: '{version}-{traceId}-{spanId}-{sampleDecision}' - * For more information see {@link https://www.w3.org/TR/trace-context/} - */ -function parseTraceParent(traceParent) { - const match = TRACE_PARENT_REGEX.exec(traceParent); - if (!match) - return null; - // According to the specification the implementation should be compatible - // with future versions. If there are more parts, we only reject it if it's using version 00 - // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent - if (match[1] === '00' && match[5]) - return null; - return { - traceId: match[2], - spanId: match[3], - traceFlags: parseInt(match[4], 16), + this._inflateStream.write(chunk, encoding, callback); + } + _final(callback) { + if (this._inflateStream) { + this._inflateStream.end(); + this._inflateStream = null; + } + callback(); + } }; -} -exports.parseTraceParent = parseTraceParent; -/** - * Propagates {@link SpanContext} through Trace Context format propagation. - * - * Based on the Trace Context specification: - * https://www.w3.org/TR/trace-context/ - */ -class W3CTraceContextPropagator { - inject(context, carrier, setter) { - const spanContext = api_1.trace.getSpanContext(context); - if (!spanContext || - (0, suppress_tracing_1.isTracingSuppressed)(context) || - !(0, api_1.isSpanContextValid)(spanContext)) - return; - const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`; - setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent); - if (spanContext.traceState) { - setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize()); - } - } - extract(context, carrier, getter) { - const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER); - if (!traceParentHeader) - return context; - const traceParent = Array.isArray(traceParentHeader) - ? traceParentHeader[0] - : traceParentHeader; - if (typeof traceParent !== 'string') - return context; - const spanContext = parseTraceParent(traceParent); - if (!spanContext) - return context; - spanContext.isRemote = true; - const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER); - if (traceStateHeader) { - // If more than one `tracestate` header is found, we merge them into a - // single header. - const state = Array.isArray(traceStateHeader) - ? traceStateHeader.join(',') - : traceStateHeader; - spanContext.traceState = new TraceState_1.TraceState(typeof state === 'string' ? state : undefined); - } - return api_1.trace.setSpanContext(context, spanContext); - } - fields() { - return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER]; - } -} -exports.W3CTraceContextPropagator = W3CTraceContextPropagator; -//# sourceMappingURL=W3CTraceContextPropagator.js.map - -/***/ }), - -/***/ 52992: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = void 0; -const api_1 = __nccwpck_require__(65163); -const RPC_METADATA_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key RPC_METADATA'); -var RPCType; -(function (RPCType) { - RPCType["HTTP"] = "http"; -})(RPCType = exports.RPCType || (exports.RPCType = {})); -function setRPCMetadata(context, meta) { - return context.setValue(RPC_METADATA_KEY, meta); -} -exports.setRPCMetadata = setRPCMetadata; -function deleteRPCMetadata(context) { - return context.deleteValue(RPC_METADATA_KEY); -} -exports.deleteRPCMetadata = deleteRPCMetadata; -function getRPCMetadata(context) { - return context.getValue(RPC_METADATA_KEY); -} -exports.getRPCMetadata = getRPCMetadata; -//# sourceMappingURL=rpc-metadata.js.map - -/***/ }), - -/***/ 16478: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AlwaysOffSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** - * @deprecated Use the one defined in @opentelemetry/sdk-trace-base instead. - * Sampler that samples no traces. - */ -class AlwaysOffSampler { - shouldSample() { - return { - decision: api_1.SamplingDecision.NOT_RECORD, - }; - } - toString() { - return 'AlwaysOffSampler'; - } -} -exports.AlwaysOffSampler = AlwaysOffSampler; -//# sourceMappingURL=AlwaysOffSampler.js.map - -/***/ }), - -/***/ 88317: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AlwaysOnSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** - * @deprecated Use the one defined in @opentelemetry/sdk-trace-base instead. - * Sampler that samples all traces. - */ -class AlwaysOnSampler { - shouldSample() { - return { - decision: api_1.SamplingDecision.RECORD_AND_SAMPLED, - }; + function createInflate(zlibOptions) { + return new InflateStream(zlibOptions); + } + 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; } - toString() { - return 'AlwaysOnSampler'; + 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(input.charCodeAt(position.position) === 44); + position.position++; + } + } + temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 9 || char === 32); + values.push(temporaryValue); + temporaryValue = ""; + } + return values; } -} -exports.AlwaysOnSampler = AlwaysOnSampler; -//# sourceMappingURL=AlwaysOnSampler.js.map - -/***/ }), - -/***/ 15136: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ParentBasedSampler = void 0; -const api_1 = __nccwpck_require__(65163); -const global_error_handler_1 = __nccwpck_require__(69246); -const AlwaysOffSampler_1 = __nccwpck_require__(16478); -const AlwaysOnSampler_1 = __nccwpck_require__(88317); -/** - * @deprecated Use the one defined in @opentelemetry/sdk-trace-base instead. - * A composite sampler that either respects the parent span's sampling decision - * or delegates to `delegateSampler` for root spans. - */ -class ParentBasedSampler { - constructor(config) { - var _a, _b, _c, _d; - this._root = config.root; - if (!this._root) { - (0, global_error_handler_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured')); - this._root = new AlwaysOnSampler_1.AlwaysOnSampler(); - } - this._remoteParentSampled = - (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler(); - this._remoteParentNotSampled = - (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler(); - this._localParentSampled = - (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler(); - this._localParentNotSampled = - (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler(); - } - shouldSample(context, traceId, spanName, spanKind, attributes, links) { - const parentContext = api_1.trace.getSpanContext(context); - if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) { - return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.isRemote) { - if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { - return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { - return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - toString() { - return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`; + function getDecodeSplit(name, list) { + const value = list.get(name, true); + if (value === null) { + return null; + } + return gettingDecodingSplitting(value); } -} -exports.ParentBasedSampler = ParentBasedSampler; -//# sourceMappingURL=ParentBasedSampler.js.map - -/***/ }), - -/***/ 69326: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceIdRatioBasedSampler = void 0; -const api_1 = __nccwpck_require__(65163); -/** - * @deprecated Use the one defined in @opentelemetry/sdk-trace-base instead. - * Sampler that samples a given fraction of traces based of trace id deterministically. - */ -class TraceIdRatioBasedSampler { - constructor(_ratio = 0) { - this._ratio = _ratio; - this._ratio = this._normalize(_ratio); - this._upperBound = Math.floor(this._ratio * 0xffffffff); - } - shouldSample(context, traceId) { - return { - decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound - ? api_1.SamplingDecision.RECORD_AND_SAMPLED - : api_1.SamplingDecision.NOT_RECORD, - }; + function hasAuthenticationEntry(request) { + return false; } - toString() { - return `TraceIdRatioBased{${this._ratio}}`; + function includesCredentials(url3) { + return !!(url3.username || url3.password); } - _normalize(ratio) { - if (typeof ratio !== 'number' || isNaN(ratio)) - return 0; - return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio; + function isTraversableNavigable(navigable) { + return navigable != null && navigable !== "client" && navigable !== "no-traversable"; } - _accumulate(traceId) { - let accumulation = 0; - for (let i = 0; i < traceId.length / 8; i++) { - const pos = i * 8; - const part = parseInt(traceId.slice(pos, pos + 8), 16); - accumulation = (accumulation ^ part) >>> 0; + var EnvironmentSettingsObjectBase = class { + get baseUrl() { + return getGlobalOrigin(); + } + get origin() { + return this.baseUrl?.origin; + } + policyContainer = makePolicyContainer(); + }; + var EnvironmentSettingsObject = class { + settingsObject = new EnvironmentSettingsObjectBase(); + }; + var environmentSettingsObject = new EnvironmentSettingsObject(); + module3.exports = { + isAborted, + isCancelled, + isValidEncodedURL, + ReadableStreamFrom, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + clampAndCoarsenConnectionTimingInfo, + coarsenedSharedCurrentTime, + determineRequestsReferrer, + makePolicyContainer, + clonePolicyContainer, + appendFetchMetadata, + appendRequestOriginHeader, + TAOCheck, + corsCheck, + crossOriginResourcePolicyCheck, + createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect, + isValidHTTPToken, + requestBadPort, + requestCurrentURL, + responseURL, + responseLocationURL, + isURLPotentiallyTrustworthy, + isValidReasonPhrase, + sameOrigin, + normalizeMethod, + iteratorMixin, + createIterator, + isValidHeaderName, + isValidHeaderValue, + isErrorLike, + fullyReadBody, + readableStreamClose, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + simpleRangeHeaderValue, + buildContentRange, + createInflate, + extractMimeType, + getDecodeSplit, + environmentSettingsObject, + isOriginIPPotentiallyTrustworthy, + hasAuthenticationEntry, + includesCredentials, + isTraversableNavigable + }; + } +}); + +// node_modules/undici/lib/web/fetch/formdata.js +var require_formdata = __commonJS({ + "node_modules/undici/lib/web/fetch/formdata.js"(exports, module3) { + "use strict"; + var { iteratorMixin } = require_util2(); + var { kEnumerableProperty } = require_util(); + var { webidl } = require_webidl(); + var nodeUtil = __require("node:util"); + var FormData = class _FormData { + #state = []; + constructor(form = void 0) { + webidl.util.markAsUncloneable(this); + if (form !== void 0) { + throw webidl.errors.conversionFailed({ + prefix: "FormData constructor", + argument: "Argument 1", + types: ["undefined"] + }); } - return accumulation; - } -} -exports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler; -//# sourceMappingURL=TraceIdRatioBasedSampler.js.map - -/***/ }), - -/***/ 54463: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = void 0; -const api_1 = __nccwpck_require__(65163); -const SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key SUPPRESS_TRACING'); -function suppressTracing(context) { - return context.setValue(SUPPRESS_TRACING_KEY, true); -} -exports.suppressTracing = suppressTracing; -function unsuppressTracing(context) { - return context.deleteValue(SUPPRESS_TRACING_KEY); -} -exports.unsuppressTracing = unsuppressTracing; -function isTracingSuppressed(context) { - return context.getValue(SUPPRESS_TRACING_KEY) === true; -} -exports.isTracingSuppressed = isTracingSuppressed; -//# sourceMappingURL=suppress-tracing.js.map - -/***/ }), - -/***/ 12408: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BindOnceFuture = void 0; -const promise_1 = __nccwpck_require__(28329); -/** - * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked. - */ -class BindOnceFuture { - constructor(_callback, _that) { - this._callback = _callback; - this._that = _that; - this._isCalled = false; - this._deferred = new promise_1.Deferred(); - } - get isCalled() { - return this._isCalled; - } - get promise() { - return this._deferred.promise; - } - call(...args) { - if (!this._isCalled) { - this._isCalled = true; - try { - Promise.resolve(this._callback.call(this._that, ...args)).then(val => this._deferred.resolve(val), err => this._deferred.reject(err)); - } - catch (err) { - this._deferred.reject(err); - } + } + append(name, value, filename = void 0) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.append"; + webidl.argumentLengthCheck(arguments, 2, prefix); + name = webidl.converters.USVString(name); + if (arguments.length === 3 || webidl.is.Blob(value)) { + value = webidl.converters.Blob(value, prefix, "value"); + if (filename !== void 0) { + filename = webidl.converters.USVString(filename); + } + } else { + value = webidl.converters.USVString(value); + } + const entry = makeEntry(name, value, filename); + this.#state.push(entry); + } + delete(name) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name); + this.#state = this.#state.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); + const idx = this.#state.findIndex((entry) => entry.name === name); + if (idx === -1) { + return null; + } + return this.#state[idx].value; + } + getAll(name) { + webidl.brandCheck(this, _FormData); + const prefix = "FormData.getAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name); + return this.#state.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); + return this.#state.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); + name = webidl.converters.USVString(name); + if (arguments.length === 3 || webidl.is.Blob(value)) { + value = webidl.converters.Blob(value, prefix, "value"); + if (filename !== void 0) { + filename = webidl.converters.USVString(filename); + } + } else { + value = webidl.converters.USVString(value); } - return this._deferred.promise; - } -} -exports.BindOnceFuture = BindOnceFuture; -//# sourceMappingURL=callback.js.map - -/***/ }), - -/***/ 7238: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseEnvironment = exports.DEFAULT_ENVIRONMENT = exports.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT = exports.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = void 0; -const api_1 = __nccwpck_require__(65163); -const sampling_1 = __nccwpck_require__(28289); -const DEFAULT_LIST_SEPARATOR = ','; -/** - * Environment interface to define all names - */ -const ENVIRONMENT_BOOLEAN_KEYS = ['OTEL_SDK_DISABLED']; -function isEnvVarABoolean(key) { - return (ENVIRONMENT_BOOLEAN_KEYS.indexOf(key) > -1); -} -const ENVIRONMENT_NUMBERS_KEYS = [ - 'OTEL_BSP_EXPORT_TIMEOUT', - 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE', - 'OTEL_BSP_MAX_QUEUE_SIZE', - 'OTEL_BSP_SCHEDULE_DELAY', - 'OTEL_BLRP_EXPORT_TIMEOUT', - 'OTEL_BLRP_MAX_EXPORT_BATCH_SIZE', - 'OTEL_BLRP_MAX_QUEUE_SIZE', - 'OTEL_BLRP_SCHEDULE_DELAY', - 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT', - 'OTEL_ATTRIBUTE_COUNT_LIMIT', - 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT', - 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT', - 'OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT', - 'OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT', - 'OTEL_SPAN_EVENT_COUNT_LIMIT', - 'OTEL_SPAN_LINK_COUNT_LIMIT', - 'OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT', - 'OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT', - 'OTEL_EXPORTER_OTLP_TIMEOUT', - 'OTEL_EXPORTER_OTLP_TRACES_TIMEOUT', - 'OTEL_EXPORTER_OTLP_METRICS_TIMEOUT', - 'OTEL_EXPORTER_OTLP_LOGS_TIMEOUT', - 'OTEL_EXPORTER_JAEGER_AGENT_PORT', -]; -function isEnvVarANumber(key) { - return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1); -} -const ENVIRONMENT_LISTS_KEYS = [ - 'OTEL_NO_PATCH_MODULES', - 'OTEL_PROPAGATORS', -]; -function isEnvVarAList(key) { - return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1; -} -exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity; -exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128; -exports.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT = 128; -exports.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT = 128; -/** - * Default environment variables - */ -exports.DEFAULT_ENVIRONMENT = { - OTEL_SDK_DISABLED: false, - CONTAINER_NAME: '', - ECS_CONTAINER_METADATA_URI_V4: '', - ECS_CONTAINER_METADATA_URI: '', - HOSTNAME: '', - KUBERNETES_SERVICE_HOST: '', - NAMESPACE: '', - OTEL_BSP_EXPORT_TIMEOUT: 30000, - OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512, - OTEL_BSP_MAX_QUEUE_SIZE: 2048, - OTEL_BSP_SCHEDULE_DELAY: 5000, - OTEL_BLRP_EXPORT_TIMEOUT: 30000, - OTEL_BLRP_MAX_EXPORT_BATCH_SIZE: 512, - OTEL_BLRP_MAX_QUEUE_SIZE: 2048, - OTEL_BLRP_SCHEDULE_DELAY: 5000, - OTEL_EXPORTER_JAEGER_AGENT_HOST: '', - OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832, - OTEL_EXPORTER_JAEGER_ENDPOINT: '', - OTEL_EXPORTER_JAEGER_PASSWORD: '', - OTEL_EXPORTER_JAEGER_USER: '', - OTEL_EXPORTER_OTLP_ENDPOINT: '', - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '', - OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '', - OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: '', - OTEL_EXPORTER_OTLP_HEADERS: '', - OTEL_EXPORTER_OTLP_TRACES_HEADERS: '', - OTEL_EXPORTER_OTLP_METRICS_HEADERS: '', - OTEL_EXPORTER_OTLP_LOGS_HEADERS: '', - OTEL_EXPORTER_OTLP_TIMEOUT: 10000, - OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: 10000, - OTEL_EXPORTER_OTLP_METRICS_TIMEOUT: 10000, - OTEL_EXPORTER_OTLP_LOGS_TIMEOUT: 10000, - OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans', - OTEL_LOG_LEVEL: api_1.DiagLogLevel.INFO, - OTEL_NO_PATCH_MODULES: [], - OTEL_PROPAGATORS: ['tracecontext', 'baggage'], - OTEL_RESOURCE_ATTRIBUTES: '', - OTEL_SERVICE_NAME: '', - OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, - OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT, - OTEL_SPAN_EVENT_COUNT_LIMIT: 128, - OTEL_SPAN_LINK_COUNT_LIMIT: 128, - OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT: exports.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT, - OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT: exports.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT, - OTEL_TRACES_EXPORTER: '', - OTEL_TRACES_SAMPLER: sampling_1.TracesSamplerValues.ParentBasedAlwaysOn, - OTEL_TRACES_SAMPLER_ARG: '', - OTEL_LOGS_EXPORTER: '', - OTEL_EXPORTER_OTLP_INSECURE: '', - OTEL_EXPORTER_OTLP_TRACES_INSECURE: '', - OTEL_EXPORTER_OTLP_METRICS_INSECURE: '', - OTEL_EXPORTER_OTLP_LOGS_INSECURE: '', - OTEL_EXPORTER_OTLP_CERTIFICATE: '', - OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE: '', - OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE: '', - OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE: '', - OTEL_EXPORTER_OTLP_COMPRESSION: '', - OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '', - OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: '', - OTEL_EXPORTER_OTLP_LOGS_COMPRESSION: '', - OTEL_EXPORTER_OTLP_CLIENT_KEY: '', - OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY: '', - OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY: '', - OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY: '', - OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: '', - OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE: '', - OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE: '', - OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE: '', - OTEL_EXPORTER_OTLP_PROTOCOL: 'http/protobuf', - OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: 'http/protobuf', - OTEL_EXPORTER_OTLP_METRICS_PROTOCOL: 'http/protobuf', - OTEL_EXPORTER_OTLP_LOGS_PROTOCOL: 'http/protobuf', - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: 'cumulative', -}; -/** - * @param key - * @param environment - * @param values - */ -function parseBoolean(key, environment, values) { - if (typeof values[key] === 'undefined') { - return; - } - const value = String(values[key]); - // support case-insensitive "true" - environment[key] = value.toLowerCase() === 'true'; -} -/** - * Parses a variable as number with number validation - * @param name - * @param environment - * @param values - * @param min - * @param max - */ -function parseNumber(name, environment, values, min = -Infinity, max = Infinity) { - if (typeof values[name] !== 'undefined') { - const value = Number(values[name]); - if (!isNaN(value)) { - if (value < min) { - environment[name] = min; - } - else if (value > max) { - environment[name] = max; - } - else { - environment[name] = value; + const entry = makeEntry(name, value, filename); + const idx = this.#state.findIndex((entry2) => entry2.name === name); + if (idx !== -1) { + this.#state = [ + ...this.#state.slice(0, idx), + entry, + ...this.#state.slice(idx + 1).filter((entry2) => entry2.name !== name) + ]; + } else { + this.#state.push(entry); + } + } + [nodeUtil.inspect.custom](depth, options2) { + const state = this.#state.reduce((a2, b2) => { + if (a2[b2.name]) { + if (Array.isArray(a2[b2.name])) { + a2[b2.name].push(b2.value); + } else { + a2[b2.name] = [a2[b2.name], b2.value]; } + } else { + a2[b2.name] = b2.value; + } + return a2; + }, { __proto__: null }); + options2.depth ??= depth; + options2.colors ??= true; + const output = nodeUtil.formatWithOptions(options2, state); + return `FormData ${output.slice(output.indexOf("]") + 2)}`; + } + /** + * @param {FormData} formData + */ + static getFormDataState(formData) { + return formData.#state; + } + /** + * @param {FormData} formData + * @param {any[]} newState + */ + static setFormDataState(formData, newState) { + formData.#state = newState; + } + }; + var { getFormDataState, setFormDataState } = FormData; + Reflect.deleteProperty(FormData, "getFormDataState"); + Reflect.deleteProperty(FormData, "setFormDataState"); + iteratorMixin("FormData", FormData, getFormDataState, "name", "value"); + Object.defineProperties(FormData.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + getAll: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FormData", + configurable: true + } + }); + function makeEntry(name, value, filename) { + if (typeof value === "string") { + } else { + if (!webidl.is.File(value)) { + value = new File([value], "blob", { type: value.type }); } - } -} -/** - * Parses list-like strings from input into output. - * @param name - * @param environment - * @param values - * @param separator - */ -function parseStringList(name, output, input, separator = DEFAULT_LIST_SEPARATOR) { - const givenValue = input[name]; - if (typeof givenValue === 'string') { - output[name] = givenValue.split(separator).map(v => v.trim()); - } -} -// The support string -> DiagLogLevel mappings -const logLevelMap = { - ALL: api_1.DiagLogLevel.ALL, - VERBOSE: api_1.DiagLogLevel.VERBOSE, - DEBUG: api_1.DiagLogLevel.DEBUG, - INFO: api_1.DiagLogLevel.INFO, - WARN: api_1.DiagLogLevel.WARN, - ERROR: api_1.DiagLogLevel.ERROR, - NONE: api_1.DiagLogLevel.NONE, -}; -/** - * Environmentally sets log level if valid log level string is provided - * @param key - * @param environment - * @param values - */ -function setLogLevelFromEnv(key, environment, values) { - const value = values[key]; - if (typeof value === 'string') { - const theLevel = logLevelMap[value.toUpperCase()]; - if (theLevel != null) { - environment[key] = theLevel; + if (filename !== void 0) { + const options2 = { + type: value.type, + lastModified: value.lastModified + }; + value = new File([value], filename, options2); } + } + return { name, value }; } -} -/** - * Parses environment values - * @param values - */ -function parseEnvironment(values) { - const environment = {}; - for (const env in exports.DEFAULT_ENVIRONMENT) { - const key = env; - switch (key) { - case 'OTEL_LOG_LEVEL': - setLogLevelFromEnv(key, environment, values); - break; - default: - if (isEnvVarABoolean(key)) { - parseBoolean(key, environment, values); - } - else if (isEnvVarANumber(key)) { - parseNumber(key, environment, values); - } - else if (isEnvVarAList(key)) { - parseStringList(key, environment, values); - } - else { - const value = values[key]; - if (typeof value !== 'undefined' && value !== null) { - environment[key] = String(value); - } - } + webidl.is.FormData = webidl.util.MakeTypeAssertion(FormData); + module3.exports = { FormData, makeEntry, setFormDataState }; + } +}); + +// node_modules/undici/lib/web/fetch/formdata-parser.js +var require_formdata_parser = __commonJS({ + "node_modules/undici/lib/web/fetch/formdata-parser.js"(exports, module3) { + "use strict"; + var { bufferToLowerCasedHeaderName } = require_util(); + var { HTTP_TOKEN_CODEPOINTS } = require_data_url(); + var { makeEntry } = require_formdata(); + var { webidl } = require_webidl(); + var assert = __require("node:assert"); + var { isomorphicDecode } = require_infra(); + var dd = Buffer.from("--"); + var decoder = new TextDecoder(); + var decoderIgnoreBOM = new TextDecoder("utf-8", { ignoreBOM: true }); + function isAsciiString(chars) { + for (let i2 = 0; i2 < chars.length; ++i2) { + if ((chars.charCodeAt(i2) & ~127) !== 0) { + return false; } + } + return true; } - return environment; -} -exports.parseEnvironment = parseEnvironment; -//# sourceMappingURL=environment.js.map - -/***/ }), - -/***/ 71780: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isPlainObject = void 0; -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * based on lodash in order to support esm builds without esModuleInterop. - * lodash is using MIT License. - **/ -const objectTag = '[object Object]'; -const nullTag = '[object Null]'; -const undefinedTag = '[object Undefined]'; -const funcProto = Function.prototype; -const funcToString = funcProto.toString; -const objectCtorString = funcToString.call(Object); -const getPrototype = overArg(Object.getPrototypeOf, Object); -const objectProto = Object.prototype; -const hasOwnProperty = objectProto.hasOwnProperty; -const symToStringTag = Symbol ? Symbol.toStringTag : undefined; -const nativeObjectToString = objectProto.toString; -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function (arg) { - return func(transform(arg)); - }; -} -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) !== objectTag) { + function validateBoundary(boundary) { + const length = boundary.length; + if (length < 27 || length > 70) { return false; + } + for (let i2 = 0; i2 < length; ++i2) { + const cp = boundary.charCodeAt(i2); + if (!(cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 39 || cp === 45 || cp === 95)) { + return false; + } + } + return true; } - const proto = getPrototype(value); - if (proto === null) { - return true; - } - const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return (typeof Ctor == 'function' && - Ctor instanceof Ctor && - funcToString.call(Ctor) === objectCtorString); -} -exports.isPlainObject = isPlainObject; -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return symToStringTag && symToStringTag in Object(value) - ? getRawTag(value) - : objectToString(value); -} -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; - let unmasked = false; - try { - value[symToStringTag] = undefined; - unmasked = true; - } - catch (e) { - // silence - } - const result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; + function multipartFormDataParser(input, mimeType) { + assert(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); + const boundaryString = mimeType.parameters.get("boundary"); + if (boundaryString === void 0) { + throw parsingError("missing boundary in content-type header"); + } + const boundary = Buffer.from(`--${boundaryString}`, "utf8"); + const entryList = []; + const position = { position: 0 }; + const firstBoundaryIndex = input.indexOf(boundary); + if (firstBoundaryIndex === -1) { + throw parsingError("no boundary found in multipart body"); + } + position.position = firstBoundaryIndex; + while (true) { + if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) { + position.position += boundary.length; + } else { + throw parsingError("expected a value starting with -- and the boundary"); } - else { - delete value[symToStringTag]; + if (bufferStartsWith(input, dd, position)) { + return entryList; } - } - return result; -} -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} -//# sourceMappingURL=lodash.merge.js.map - -/***/ }), - -/***/ 65387: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.merge = void 0; -/* eslint-disable @typescript-eslint/no-explicit-any */ -const lodash_merge_1 = __nccwpck_require__(71780); -const MAX_LEVEL = 20; -/** - * Merges objects together - * @param args - objects / values to be merged - */ -function merge(...args) { - let result = args.shift(); - const objects = new WeakMap(); - while (args.length > 0) { - result = mergeTwoObjects(result, args.shift(), 0, objects); - } - return result; -} -exports.merge = merge; -function takeValue(value) { - if (isArray(value)) { - return value.slice(); - } - return value; -} -/** - * Merges two objects - * @param one - first object - * @param two - second object - * @param level - current deep level - * @param objects - objects holder that has been already referenced - to prevent - * cyclic dependency - */ -function mergeTwoObjects(one, two, level = 0, objects) { - let result; - if (level > MAX_LEVEL) { - return undefined; - } - level++; - if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) { - result = takeValue(two); - } - else if (isArray(one)) { - result = one.slice(); - if (isArray(two)) { - for (let i = 0, j = two.length; i < j; i++) { - result.push(takeValue(two[i])); - } - } - else if (isObject(two)) { - const keys = Object.keys(two); - for (let i = 0, j = keys.length; i < j; i++) { - const key = keys[i]; - result[key] = takeValue(two[key]); - } - } - } - else if (isObject(one)) { - if (isObject(two)) { - if (!shouldMerge(one, two)) { - return two; - } - result = Object.assign({}, one); - const keys = Object.keys(two); - for (let i = 0, j = keys.length; i < j; i++) { - const key = keys[i]; - const twoValue = two[key]; - if (isPrimitive(twoValue)) { - if (typeof twoValue === 'undefined') { - delete result[key]; - } - else { - // result[key] = takeValue(twoValue); - result[key] = twoValue; - } - } - else { - const obj1 = result[key]; - const obj2 = twoValue; - if (wasObjectReferenced(one, key, objects) || - wasObjectReferenced(two, key, objects)) { - delete result[key]; - } - else { - if (isObject(obj1) && isObject(obj2)) { - const arr1 = objects.get(obj1) || []; - const arr2 = objects.get(obj2) || []; - arr1.push({ obj: one, key }); - arr2.push({ obj: two, key }); - objects.set(obj1, arr1); - objects.set(obj2, arr2); - } - result[key] = mergeTwoObjects(result[key], twoValue, level, objects); - } - } - } + if (input[position.position] !== 13 || input[position.position + 1] !== 10) { + throw parsingError("expected CRLF"); } - else { - result = two; + position.position += 2; + const result = parseMultipartFormDataHeaders(input, position); + let { name, filename, contentType, encoding } = result; + position.position += 2; + let body; + { + const boundaryIndex = input.indexOf(boundary.subarray(2), position.position); + if (boundaryIndex === -1) { + throw parsingError("expected boundary after body"); + } + body = input.subarray(position.position, boundaryIndex - 4); + position.position += body.length; + if (encoding === "base64") { + body = Buffer.from(body.toString(), "base64"); + } } - } - return result; -} -/** - * Function to check if object has been already reference - * @param obj - * @param key - * @param objects - */ -function wasObjectReferenced(obj, key, objects) { - const arr = objects.get(obj[key]) || []; - for (let i = 0, j = arr.length; i < j; i++) { - const info = arr[i]; - if (info.key === key && info.obj === obj) { - return true; + if (input[position.position] !== 13 || input[position.position + 1] !== 10) { + throw parsingError("expected CRLF"); + } else { + position.position += 2; } - } - return false; -} -function isArray(value) { - return Array.isArray(value); -} -function isFunction(value) { - return typeof value === 'function'; -} -function isObject(value) { - return (!isPrimitive(value) && - !isArray(value) && - !isFunction(value) && - typeof value === 'object'); -} -function isPrimitive(value) { - return (typeof value === 'string' || - typeof value === 'number' || - typeof value === 'boolean' || - typeof value === 'undefined' || - value instanceof Date || - value instanceof RegExp || - value === null); -} -function shouldMerge(one, two) { - if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) { - return false; - } - return true; -} -//# sourceMappingURL=merge.js.map - -/***/ }), - -/***/ 28329: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Deferred = void 0; -class Deferred { - constructor() { - this._promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - }); - } - get promise() { - return this._promise; - } - resolve(val) { - this._resolve(val); - } - reject(err) { - this._reject(err); - } -} -exports.Deferred = Deferred; -//# sourceMappingURL=promise.js.map - -/***/ }), - -/***/ 28289: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TracesSamplerValues = void 0; -var TracesSamplerValues; -(function (TracesSamplerValues) { - TracesSamplerValues["AlwaysOff"] = "always_off"; - TracesSamplerValues["AlwaysOn"] = "always_on"; - TracesSamplerValues["ParentBasedAlwaysOff"] = "parentbased_always_off"; - TracesSamplerValues["ParentBasedAlwaysOn"] = "parentbased_always_on"; - TracesSamplerValues["ParentBasedTraceIdRatio"] = "parentbased_traceidratio"; - TracesSamplerValues["TraceIdRatio"] = "traceidratio"; -})(TracesSamplerValues = exports.TracesSamplerValues || (exports.TracesSamplerValues = {})); -//# sourceMappingURL=sampling.js.map - -/***/ }), - -/***/ 48400: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.callWithTimeout = exports.TimeoutError = void 0; -/** - * Error that is thrown on timeouts. - */ -class TimeoutError extends Error { - constructor(message) { - super(message); - // manually adjust prototype to retain `instanceof` functionality when targeting ES5, see: - // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work - Object.setPrototypeOf(this, TimeoutError.prototype); - } -} -exports.TimeoutError = TimeoutError; -/** - * Adds a timeout to a promise and rejects if the specified timeout has elapsed. Also rejects if the specified promise - * rejects, and resolves if the specified promise resolves. - * - *

NOTE: this operation will continue even after it throws a {@link TimeoutError}. - * - * @param promise promise to use with timeout. - * @param timeout the timeout in milliseconds until the returned promise is rejected. - */ -function callWithTimeout(promise, timeout) { - let timeoutHandle; - const timeoutPromise = new Promise(function timeoutFunction(_resolve, reject) { - timeoutHandle = setTimeout(function timeoutHandler() { - reject(new TimeoutError('Operation timed out.')); - }, timeout); - }); - return Promise.race([promise, timeoutPromise]).then(result => { - clearTimeout(timeoutHandle); - return result; - }, reason => { - clearTimeout(timeoutHandle); - throw reason; - }); -} -exports.callWithTimeout = callWithTimeout; -//# sourceMappingURL=timeout.js.map - -/***/ }), - -/***/ 90839: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isUrlIgnored = exports.urlMatches = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -function urlMatches(url, urlToMatch) { - if (typeof urlToMatch === 'string') { - return url === urlToMatch; - } - else { - return !!url.match(urlToMatch); - } -} -exports.urlMatches = urlMatches; -/** - * Check if {@param url} should be ignored when comparing against {@param ignoredUrls} - * @param url - * @param ignoredUrls - */ -function isUrlIgnored(url, ignoredUrls) { - if (!ignoredUrls) { - return false; - } - for (const ignoreUrl of ignoredUrls) { - if (urlMatches(url, ignoreUrl)) { - return true; + let value; + if (filename !== null) { + contentType ??= "text/plain"; + if (!isAsciiString(contentType)) { + contentType = ""; + } + value = new File([body], filename, { type: contentType }); + } else { + value = decoderIgnoreBOM.decode(Buffer.from(body)); } + assert(webidl.is.USVString(name)); + assert(typeof value === "string" && webidl.is.USVString(value) || webidl.is.File(value)); + entryList.push(makeEntry(name, value, filename)); + } } - return false; -} -exports.isUrlIgnored = isUrlIgnored; -//# sourceMappingURL=url.js.map - -/***/ }), - -/***/ 67226: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isWrapped = void 0; -/** - * Checks if certain function has been already wrapped - * @param func - */ -function isWrapped(func) { - return (typeof func === 'function' && - typeof func.__original === 'function' && - typeof func.__unwrap === 'function' && - func.__wrapped === true); -} -exports.isWrapped = isWrapped; -//# sourceMappingURL=wrap.js.map - -/***/ }), - -/***/ 55687: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.VERSION = void 0; -// this is autogenerated file, see scripts/version-update.js -exports.VERSION = '1.26.0'; -//# sourceMappingURL=version.js.map - -/***/ }), - -/***/ 35401: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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 })); -/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] -- - * TODO: Replace export * with named exports before next major version - */ -__exportStar(__nccwpck_require__(96437), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 96437: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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 })); -/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] -- - * TODO: Replace export * with named exports before next major version - */ -__exportStar(__nccwpck_require__(90081), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 19377: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPTraceExporter = void 0; -const core_1 = __nccwpck_require__(89736); -const otlp_exporter_base_1 = __nccwpck_require__(11363); -const otlp_exporter_base_2 = __nccwpck_require__(11363); -const version_1 = __nccwpck_require__(35992); -const otlp_transformer_1 = __nccwpck_require__(74357); -const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces'; -const DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`; -const USER_AGENT = { - 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${version_1.VERSION}`, -}; -/** - * Collector Trace Exporter for Node - */ -class OTLPTraceExporter extends otlp_exporter_base_1.OTLPExporterNodeBase { - constructor(config = {}) { - super(config, otlp_transformer_1.JsonTraceSerializer, Object.assign(Object.assign(Object.assign(Object.assign({}, core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS)), (0, otlp_exporter_base_1.parseHeaders)(config === null || config === void 0 ? void 0 : config.headers)), USER_AGENT), { 'Content-Type': 'application/json' })); - } - getDefaultUrl(config) { - if (typeof config.url === 'string') { - return config.url; - } - const env = (0, core_1.getEnv)(); - if (env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0) { - return (0, otlp_exporter_base_2.appendRootPathToUrlIfNeeded)(env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT); + function parseContentDispositionAttribute(input, position) { + if (input[position.position] === 59) { + position.position++; + } + collectASequenceOfBytes( + (char) => char === 32 || char === 9, + input, + position + ); + const attributeName = collectASequenceOfBytes( + (char) => isToken(char) && char !== 61 && char !== 42, + // not = or * + input, + position + ); + if (attributeName.length === 0) { + return null; + } + const attrNameStr = attributeName.toString("ascii").toLowerCase(); + const isExtended = input[position.position] === 42; + if (isExtended) { + position.position++; + } + if (input[position.position] !== 61) { + return null; + } + position.position++; + collectASequenceOfBytes( + (char) => char === 32 || char === 9, + input, + position + ); + let value; + if (isExtended) { + const headerValue = collectASequenceOfBytes( + (char) => char !== 32 && char !== 13 && char !== 10 && char !== 59, + // not space, CRLF, or ; + input, + position + ); + if (headerValue[0] !== 117 && headerValue[0] !== 85 || // u or U + headerValue[1] !== 116 && headerValue[1] !== 84 || // t or T + headerValue[2] !== 102 && headerValue[2] !== 70 || // f or F + headerValue[3] !== 45 || // - + headerValue[4] !== 56) { + throw parsingError("unknown encoding, expected utf-8''"); + } + value = decodeURIComponent(decoder.decode(headerValue.subarray(7))); + } else if (input[position.position] === 34) { + position.position++; + const quotedValue = collectASequenceOfBytes( + (char) => char !== 10 && char !== 13 && char !== 34, + // not LF, CR, or " + input, + position + ); + if (input[position.position] !== 34) { + throw parsingError("Closing quote not found"); } - if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) { - return (0, otlp_exporter_base_2.appendResourcePathToUrl)(env.OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH); + position.position++; + value = decoder.decode(quotedValue).replace(/%0A/ig, "\n").replace(/%0D/ig, "\r").replace(/%22/g, '"'); + } else { + const tokenValue = collectASequenceOfBytes( + (char) => isToken(char) && char !== 59, + // not ; + input, + position + ); + value = decoder.decode(tokenValue); + } + return { name: attrNameStr, value }; + } + 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) { + throw parsingError("header name is null"); + } + return { name, filename, contentType, encoding }; } - return DEFAULT_COLLECTOR_URL; - } -} -exports.OTLPTraceExporter = OTLPTraceExporter; -//# sourceMappingURL=OTLPTraceExporter.js.map - -/***/ }), - -/***/ 90081: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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 })); -/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] -- - * TODO: Replace export * with named exports before next major version - */ -__exportStar(__nccwpck_require__(19377), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 35992: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.VERSION = void 0; -// this is autogenerated file, see scripts/version-update.js -exports.VERSION = '0.53.0'; -//# sourceMappingURL=version.js.map - -/***/ }), - -/***/ 67684: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPExporterBase = void 0; -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -const util_1 = __nccwpck_require__(14425); -/** - * Collector Exporter abstract base class - */ -class OTLPExporterBase { - /** - * @param config - */ - constructor(config = {}) { - this._sendingPromises = []; - this.url = this.getDefaultUrl(config); - if (typeof config.hostname === 'string') { - this.hostname = config.hostname; - } - this.shutdown = this.shutdown.bind(this); - this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this); - this._concurrencyLimit = - typeof config.concurrencyLimit === 'number' - ? config.concurrencyLimit - : 30; - this.timeoutMillis = (0, util_1.configureExporterTimeout)(config.timeoutMillis); - // platform dependent - this.onInit(config); - } - /** - * Export items. - * @param items - * @param resultCallback - */ - export(items, resultCallback) { - if (this._shutdownOnce.isCalled) { - resultCallback({ - code: core_1.ExportResultCode.FAILED, - error: new Error('Exporter has been shutdown'), - }); - return; + 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())) { + throw parsingError("header name does not match the field-name token production"); } - if (this._sendingPromises.length >= this._concurrencyLimit) { - resultCallback({ - code: core_1.ExportResultCode.FAILED, - error: new Error('Concurrent export limit reached'), - }); - return; + if (input[position.position] !== 58) { + throw parsingError("expected :"); } - this._export(items) - .then(() => { - resultCallback({ code: core_1.ExportResultCode.SUCCESS }); - }) - .catch((error) => { - resultCallback({ code: core_1.ExportResultCode.FAILED, error }); - }); - } - _export(items) { - return new Promise((resolve, reject) => { - try { - api_1.diag.debug('items to be sent', items); - this.send(items, resolve, reject); + position.position++; + collectASequenceOfBytes( + (char) => char === 32 || char === 9, + input, + position + ); + switch (bufferToLowerCasedHeaderName(headerName)) { + case "content-disposition": { + name = filename = null; + const dispositionType = collectASequenceOfBytes( + (char) => isToken(char), + input, + position + ); + if (dispositionType.toString("ascii").toLowerCase() !== "form-data") { + throw parsingError("expected form-data for content-disposition header"); } - catch (e) { - reject(e); + while (position.position < input.length && input[position.position] !== 13 && input[position.position + 1] !== 10) { + const attribute = parseContentDispositionAttribute(input, position); + if (!attribute) { + break; + } + if (attribute.name === "name") { + name = attribute.value; + } else if (attribute.name === "filename") { + filename = attribute.value; + } } - }); - } - /** - * Shutdown the exporter. - */ - shutdown() { - return this._shutdownOnce.call(); - } - /** - * Exports any pending spans in the exporter - */ - forceFlush() { - return Promise.all(this._sendingPromises).then(() => { - /** ignore resolved values */ - }); - } - /** - * Called by _shutdownOnce with BindOnceFuture - */ - _shutdown() { - api_1.diag.debug('shutdown started'); - this.onShutdown(); - return this.forceFlush(); - } -} -exports.OTLPExporterBase = OTLPExporterBase; -//# sourceMappingURL=OTLPExporterBase.js.map - -/***/ }), - -/***/ 11363: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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 })); -exports.invalidTimeout = exports.configureExporterTimeout = exports.appendRootPathToUrlIfNeeded = exports.appendResourcePathToUrl = exports.parseHeaders = exports.OTLPExporterError = exports.OTLPExporterBase = void 0; -/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] -- - * TODO: Replace export * with named exports before next major version - */ -__exportStar(__nccwpck_require__(78959), exports); -var OTLPExporterBase_1 = __nccwpck_require__(67684); -Object.defineProperty(exports, "OTLPExporterBase", ({ enumerable: true, get: function () { return OTLPExporterBase_1.OTLPExporterBase; } })); -var types_1 = __nccwpck_require__(44111); -Object.defineProperty(exports, "OTLPExporterError", ({ enumerable: true, get: function () { return types_1.OTLPExporterError; } })); -var util_1 = __nccwpck_require__(14425); -Object.defineProperty(exports, "parseHeaders", ({ enumerable: true, get: function () { return util_1.parseHeaders; } })); -Object.defineProperty(exports, "appendResourcePathToUrl", ({ enumerable: true, get: function () { return util_1.appendResourcePathToUrl; } })); -Object.defineProperty(exports, "appendRootPathToUrlIfNeeded", ({ enumerable: true, get: function () { return util_1.appendRootPathToUrlIfNeeded; } })); -Object.defineProperty(exports, "configureExporterTimeout", ({ enumerable: true, get: function () { return util_1.configureExporterTimeout; } })); -Object.defineProperty(exports, "invalidTimeout", ({ enumerable: true, get: function () { return util_1.invalidTimeout; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 31665: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseRetryAfterToMills = exports.isExportRetryable = void 0; -function isExportRetryable(statusCode) { - const retryCodes = [429, 502, 503, 504]; - return retryCodes.includes(statusCode); -} -exports.isExportRetryable = isExportRetryable; -function parseRetryAfterToMills(retryAfter) { - if (retryAfter == null) { - return undefined; + if (name === null) { + throw parsingError("name attribute is required in content-disposition header"); + } + 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) { + throw parsingError("expected CRLF"); + } else { + position.position += 2; + } + } } - const seconds = Number.parseInt(retryAfter, 10); - if (Number.isInteger(seconds)) { - return seconds > 0 ? seconds * 1000 : -1; + 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); } - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After#directives - const delay = new Date(retryAfter).getTime() - Date.now(); - if (delay >= 0) { - return delay; + 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); } - return 0; -} -exports.parseRetryAfterToMills = parseRetryAfterToMills; -//# sourceMappingURL=is-export-retryable.js.map - -/***/ }), - -/***/ 24343: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPExporterBrowserBase = void 0; -const OTLPExporterBase_1 = __nccwpck_require__(67684); -const types_1 = __nccwpck_require__(44111); -const util_1 = __nccwpck_require__(14425); -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -const xhr_transport_1 = __nccwpck_require__(55525); -const send_beacon_transport_1 = __nccwpck_require__(83740); -const retrying_transport_1 = __nccwpck_require__(2527); -/** - * Collector Metric Exporter abstract base class - */ -class OTLPExporterBrowserBase extends OTLPExporterBase_1.OTLPExporterBase { - /** - * @param config - * @param serializer - * @param contentType - */ - constructor(config = {}, serializer, contentType) { - super(config); - this._serializer = serializer; - const useXhr = !!config.headers || typeof navigator.sendBeacon !== 'function'; - if (useXhr) { - this._transport = (0, retrying_transport_1.createRetryingTransport)({ - transport: (0, xhr_transport_1.createXhrTransport)({ - headers: Object.assign({}, (0, util_1.parseHeaders)(config.headers), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_HEADERS), { 'Content-Type': contentType }), - url: this.url, - }), - }); - } - else { - // sendBeacon has no way to signal retry, so we do not wrap it in a RetryingTransport - this._transport = (0, send_beacon_transport_1.createSendBeaconTransport)({ - url: this.url, - blobType: contentType, - }); + function bufferStartsWith(buffer, start, position) { + if (buffer.length < start.length) { + return false; + } + for (let i2 = 0; i2 < start.length; i2++) { + if (start[i2] !== buffer[position.position + i2]) { + return false; } + } + return true; } - onInit() { } - onShutdown() { } - send(objects, onSuccess, onError) { - if (this._shutdownOnce.isCalled) { - api_1.diag.debug('Shutdown already started. Cannot send objects'); - return; - } - const data = this._serializer.serializeRequest(objects); - if (data == null) { - onError(new Error('Could not serialize message')); - return; - } - const promise = this._transport - .send(data, this.timeoutMillis) - .then(response => { - if (response.status === 'success') { - onSuccess(); - } - else if (response.status === 'failure' && response.error) { - onError(response.error); - } - else if (response.status === 'retryable') { - onError(new types_1.OTLPExporterError('Export failed with retryable status')); - } - else { - onError(new types_1.OTLPExporterError('Export failed with unknown error')); - } - }, onError); - this._sendingPromises.push(promise); - const popPromise = () => { - const index = this._sendingPromises.indexOf(promise); - this._sendingPromises.splice(index, 1); - }; - promise.then(popPromise, popPromise); + function parsingError(cause) { + return new TypeError("Failed to parse body as FormData.", { cause: new TypeError(cause) }); + } + function isCTL(char) { + return char <= 31 || char === 127; + } + function isTSpecial(char) { + return char === 40 || // ( + char === 41 || // ) + char === 60 || // < + char === 62 || // > + char === 64 || // @ + char === 44 || // , + char === 59 || // ; + char === 58 || // : + char === 92 || // \ + char === 34 || // " + char === 47 || // / + char === 91 || // [ + char === 93 || // ] + char === 63 || // ? + char === 61; + } + function isToken(char) { + return char <= 127 && // ascii + char !== 32 && // space + char !== 9 && !isCTL(char) && !isTSpecial(char); + } + module3.exports = { + multipartFormDataParser, + validateBoundary + }; + } +}); + +// node_modules/undici/lib/util/promise.js +var require_promise = __commonJS({ + "node_modules/undici/lib/util/promise.js"(exports, module3) { + "use strict"; + function createDeferredPromise() { + let res; + let rej; + const promise = new Promise((resolve8, reject) => { + res = resolve8; + rej = reject; + }); + return { promise, resolve: res, reject: rej }; } -} -exports.OTLPExporterBrowserBase = OTLPExporterBrowserBase; -//# sourceMappingURL=OTLPExporterBrowserBase.js.map - -/***/ }), - -/***/ 51979: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPExporterBrowserBase = void 0; -var OTLPExporterBrowserBase_1 = __nccwpck_require__(24343); -Object.defineProperty(exports, "OTLPExporterBrowserBase", ({ enumerable: true, get: function () { return OTLPExporterBrowserBase_1.OTLPExporterBrowserBase; } })); -//# sourceMappingURL=index.js.map + module3.exports = { + createDeferredPromise + }; + } +}); -/***/ }), - -/***/ 83740: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createSendBeaconTransport = void 0; -const api_1 = __nccwpck_require__(65163); -class SendBeaconTransport { - constructor(_params) { - this._params = _params; - } - send(data) { - return new Promise(resolve => { - if (navigator.sendBeacon(this._params.url, new Blob([data], { type: this._params.blobType }))) { - // no way to signal retry, treat everything as success - api_1.diag.debug('SendBeacon success'); - resolve({ - status: 'success', - }); +// node_modules/undici/lib/web/fetch/body.js +var require_body = __commonJS({ + "node_modules/undici/lib/web/fetch/body.js"(exports, module3) { + "use strict"; + var util = require_util(); + var { + ReadableStreamFrom, + readableStreamClose, + fullyReadBody, + extractMimeType + } = require_util2(); + var { FormData, setFormDataState } = require_formdata(); + var { webidl } = require_webidl(); + var assert = __require("node:assert"); + var { isErrored, isDisturbed } = __require("node:stream"); + var { isUint8Array } = __require("node:util/types"); + var { serializeAMimeType } = require_data_url(); + var { multipartFormDataParser } = require_formdata_parser(); + var { createDeferredPromise } = require_promise(); + var { parseJSONFromBytes } = require_infra(); + var { utf8DecodeBytes } = require_encoding(); + var { runtimeFeatures } = require_runtime_features(); + var random = runtimeFeatures.has("crypto") ? __require("node:crypto").randomInt : (max) => Math.floor(Math.random() * max); + var textEncoder = new TextEncoder(); + function noop() { + } + var 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; + let controller = null; + if (webidl.is.ReadableStream(object)) { + stream = object; + } else if (webidl.is.Blob(object)) { + stream = object.stream(); + } else { + stream = new ReadableStream({ + pull() { + }, + start(c2) { + controller = c2; + }, + cancel() { + }, + type: "bytes" + }); + } + assert(webidl.is.ReadableStream(stream)); + let action = null; + let source = null; + let length = null; + let type2 = null; + if (typeof object === "string") { + source = object; + type2 = "text/plain;charset=UTF-8"; + } else if (webidl.is.URLSearchParams(object)) { + source = object.toString(); + type2 = "application/x-www-form-urlencoded;charset=UTF-8"; + } else if (webidl.is.BufferSource(object)) { + source = webidl.util.getCopyOfBytesHeldByBufferSource(object); + } else if (webidl.is.FormData(object)) { + const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; + const prefix = `--${boundary}\r +Content-Disposition: form-data`; + const formdataEscape = (str2) => str2.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 chunk2 = textEncoder.encode(prefix + `; name="${formdataEscape(normalizeLinefeeds(name))}"\r +\r +${normalizeLinefeeds(value)}\r +`); + blobParts.push(chunk2); + length += chunk2.byteLength; + } else { + const chunk2 = textEncoder.encode(`${prefix}; name="${formdataEscape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${formdataEscape(value.name)}"` : "") + `\r +Content-Type: ${value.type || "application/octet-stream"}\r +\r +`); + blobParts.push(chunk2, value, rn); + if (typeof value.size === "number") { + length += chunk2.byteLength + value.size + rn.byteLength; + } else { + hasUnknownSizeValue = true; } - else { - resolve({ - status: 'failure', - error: new Error('SendBeacon failed'), - }); + } + } + const chunk = textEncoder.encode(`--${boundary}--\r +`); + 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; } - }); + } + }; + type2 = `multipart/form-data; boundary=${boundary}`; + } else if (webidl.is.Blob(object)) { + source = object; + length = object.size; + if (object.type) { + type2 = 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 = webidl.is.ReadableStream(object) ? object : ReadableStreamFrom(object); + } + if (typeof source === "string" || isUint8Array(source)) { + action = () => { + length = typeof source === "string" ? Buffer.byteLength(source) : source.length; + return source; + }; + } + if (action != null) { + ; + (async () => { + const result = action(); + const iterator = result?.[Symbol.asyncIterator]?.(); + if (iterator) { + for await (const bytes of iterator) { + if (isErrored(stream)) break; + if (bytes.length) { + controller.enqueue(new Uint8Array(bytes)); + } + } + } else if (result?.length && !isErrored(stream)) { + controller.enqueue(typeof result === "string" ? textEncoder.encode(result) : new Uint8Array(result)); + } + queueMicrotask(() => readableStreamClose(controller)); + })(); + } + const body = { stream, source, length }; + return [body, type2]; } - shutdown() { - // Intentionally left empty, nothing to do. + function safelyExtractBody(object, keepalive = false) { + if (webidl.is.ReadableStream(object)) { + assert(!util.isDisturbed(object), "The body has already been consumed."); + assert(!object.locked, "The stream is locked."); + } + return extractBody(object, keepalive); } -} -function createSendBeaconTransport(parameters) { - return new SendBeaconTransport(parameters); -} -exports.createSendBeaconTransport = createSendBeaconTransport; -//# sourceMappingURL=send-beacon-transport.js.map - -/***/ }), - -/***/ 55525: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createXhrTransport = void 0; -const util_1 = __nccwpck_require__(14425); -const api_1 = __nccwpck_require__(65163); -class XhrTransport { - constructor(_parameters) { - this._parameters = _parameters; - } - send(data, timeoutMillis) { - return new Promise(resolve => { - const xhr = new XMLHttpRequest(); - xhr.timeout = timeoutMillis; - xhr.open('POST', this._parameters.url); - Object.entries(this._parameters.headers).forEach(([k, v]) => { - xhr.setRequestHeader(k, v); - }); - xhr.ontimeout = _ => { - resolve({ - status: 'failure', - error: new Error('XHR request timed out'), - }); - }; - xhr.onreadystatechange = () => { - if (xhr.status >= 200 && xhr.status <= 299) { - api_1.diag.debug('XHR success'); - resolve({ - status: 'success', - }); - } - else if (xhr.status && (0, util_1.isExportRetryable)(xhr.status)) { - resolve({ - status: 'retryable', - retryInMillis: (0, util_1.parseRetryAfterToMills)(xhr.getResponseHeader('Retry-After')), - }); - } - else if (xhr.status !== 0) { - resolve({ - status: 'failure', - error: new Error('XHR request failed with non-retryable status'), - }); + function cloneBody(body) { + const { 0: out1, 1: out2 } = body.stream.tee(); + body.stream = out1; + return { + stream: out2, + length: body.length, + source: body.source + }; + } + function bodyMixinMethods(instance, getInternalState) { + const methods = { + blob() { + return consumeBody(this, (bytes) => { + let mimeType = bodyMimeType(getInternalState(this)); + if (mimeType === null) { + mimeType = ""; + } else if (mimeType) { + mimeType = serializeAMimeType(mimeType); + } + return new Blob([bytes], { type: mimeType }); + }, instance, getInternalState); + }, + arrayBuffer() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer; + }, instance, getInternalState); + }, + text() { + return consumeBody(this, utf8DecodeBytes, instance, getInternalState); + }, + json() { + return consumeBody(this, parseJSONFromBytes, instance, getInternalState); + }, + formData() { + return consumeBody(this, (value) => { + const mimeType = bodyMimeType(getInternalState(this)); + if (mimeType !== null) { + switch (mimeType.essence) { + case "multipart/form-data": { + const parsed = multipartFormDataParser(value, mimeType); + const fd = new FormData(); + setFormDataState(fd, parsed); + return fd; } - }; - xhr.onabort = () => { - resolve({ - status: 'failure', - error: new Error('XHR request aborted'), - }); - }; - xhr.onerror = () => { - resolve({ - status: 'failure', - error: new Error('XHR request errored'), - }); - }; - xhr.send(new Blob([data], { type: this._parameters.headers['Content-Type'] })); - }); - } - shutdown() { - // Intentionally left empty, nothing to do. - } -} -/** - * Creates an exporter transport that uses XHR to send the data - * @param parameters applied to each request made by transport - */ -function createXhrTransport(parameters) { - return new XhrTransport(parameters); -} -exports.createXhrTransport = createXhrTransport; -//# sourceMappingURL=xhr-transport.js.map - -/***/ }), - -/***/ 78959: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPExporterBrowserBase = exports.CompressionAlgorithm = exports.OTLPExporterNodeBase = void 0; -var node_1 = __nccwpck_require__(22853); -Object.defineProperty(exports, "OTLPExporterNodeBase", ({ enumerable: true, get: function () { return node_1.OTLPExporterNodeBase; } })); -Object.defineProperty(exports, "CompressionAlgorithm", ({ enumerable: true, get: function () { return node_1.CompressionAlgorithm; } })); -var browser_1 = __nccwpck_require__(51979); -Object.defineProperty(exports, "OTLPExporterBrowserBase", ({ enumerable: true, get: function () { return browser_1.OTLPExporterBrowserBase; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 75780: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPExporterNodeBase = void 0; -const OTLPExporterBase_1 = __nccwpck_require__(67684); -const util_1 = __nccwpck_require__(58926); -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -const http_exporter_transport_1 = __nccwpck_require__(55369); -const types_1 = __nccwpck_require__(44111); -const retrying_transport_1 = __nccwpck_require__(2527); -/** - * Collector Metric Exporter abstract base class - */ -class OTLPExporterNodeBase extends OTLPExporterBase_1.OTLPExporterBase { - constructor(config = {}, serializer, signalSpecificHeaders) { - var _a; - super(config); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - if (config.metadata) { - api_1.diag.warn('Metadata cannot be set when using http'); - } - this._serializer = serializer; - // populate keepAlive for use with new settings - if ((config === null || config === void 0 ? void 0 : config.keepAlive) != null) { - if (config.httpAgentOptions != null) { - if (config.httpAgentOptions.keepAlive == null) { - // specific setting is not set, populate with non-specific setting. - config.httpAgentOptions.keepAlive = config.keepAlive; + case "application/x-www-form-urlencoded": { + const entries = new URLSearchParams(value.toString()); + const fd = new FormData(); + for (const [name, value2] of entries) { + fd.append(name, value2); + } + return fd; } - // do nothing, use specific setting otherwise - } - else { - // populate specific option if AgentOptions does not exist. - config.httpAgentOptions = { - keepAlive: config.keepAlive, - }; + } } + throw new TypeError( + 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' + ); + }, instance, getInternalState); + }, + bytes() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes); + }, instance, getInternalState); } - const nonSignalSpecificHeaders = core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_HEADERS); - this._transport = (0, retrying_transport_1.createRetryingTransport)({ - transport: (0, http_exporter_transport_1.createHttpExporterTransport)({ - agentOptions: (_a = config.httpAgentOptions) !== null && _a !== void 0 ? _a : { keepAlive: true }, - compression: (0, util_1.configureCompression)(config.compression), - headers: Object.assign({}, nonSignalSpecificHeaders, signalSpecificHeaders), - url: this.url, - }), - }); + }; + return methods; } - onInit(_config) { } - send(objects, onSuccess, onError) { - if (this._shutdownOnce.isCalled) { - api_1.diag.debug('Shutdown already started. Cannot send objects'); - return; - } - const data = this._serializer.serializeRequest(objects); - if (data == null) { - onError(new Error('Could not serialize message')); - return; - } - const promise = this._transport - .send(data, this.timeoutMillis) - .then(response => { - if (response.status === 'success') { - onSuccess(); - } - else if (response.status === 'failure' && response.error) { - onError(response.error); - } - else if (response.status === 'retryable') { - onError(new types_1.OTLPExporterError('Export failed with retryable status')); - } - else { - onError(new types_1.OTLPExporterError('Export failed with unknown error')); - } - }, onError); - this._sendingPromises.push(promise); - const popPromise = () => { - const index = this._sendingPromises.indexOf(promise); - this._sendingPromises.splice(index, 1); - }; - promise.then(popPromise, popPromise); + function mixinBody(prototype, getInternalState) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype, getInternalState)); } - onShutdown() { } -} -exports.OTLPExporterNodeBase = OTLPExporterNodeBase; -//# sourceMappingURL=OTLPExporterNodeBase.js.map - -/***/ }), - -/***/ 55369: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createHttpExporterTransport = void 0; -class HttpExporterTransport { - constructor(_parameters) { - this._parameters = _parameters; - this._send = null; - this._agent = null; - } - async send(data, timeoutMillis) { - if (this._send == null) { - // Lazy require to ensure that http/https is not required before instrumentations can wrap it. - const { sendWithHttp, createHttpAgent, - // eslint-disable-next-line @typescript-eslint/no-var-requires - } = __nccwpck_require__(79666); - this._agent = createHttpAgent(this._parameters.url, this._parameters.agentOptions); - this._send = sendWithHttp; - } - return new Promise(resolve => { - var _a; - // this will always be defined - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - (_a = this._send) === null || _a === void 0 ? void 0 : _a.call(this, this._parameters, this._agent, data, result => { - resolve(result); - }, timeoutMillis); - }); + function consumeBody(object, convertBytesToJSValue, instance, getInternalState) { + try { + webidl.brandCheck(object, instance); + } catch (e2) { + return Promise.reject(e2); + } + object = getInternalState(object); + if (bodyUnusable(object)) { + return Promise.reject(new TypeError("Body is unusable: Body has already been read")); + } + const promise = createDeferredPromise(); + const errorSteps = promise.reject; + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)); + } catch (e2) { + errorSteps(e2); + } + }; + if (object.body == null) { + successSteps(Buffer.allocUnsafe(0)); + return promise.promise; + } + fullyReadBody(object.body, successSteps, errorSteps); + return promise.promise; + } + function bodyUnusable(object) { + const body = object.body; + return body != null && (body.stream.locked || util.isDisturbed(body.stream)); + } + function bodyMimeType(requestOrResponse) { + const headers = requestOrResponse.headersList; + const mimeType = extractMimeType(headers); + if (mimeType === "failure") { + return null; + } + return mimeType; } - shutdown() { - // intentionally left empty, nothing to do. + module3.exports = { + extractBody, + safelyExtractBody, + cloneBody, + mixinBody, + streamRegistry, + bodyUnusable + }; + } +}); + +// node_modules/undici/lib/dispatcher/client-h1.js +var require_client_h1 = __commonJS({ + "node_modules/undici/lib/dispatcher/client-h1.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var util = require_util(); + var { channels } = require_diagnostics(); + var timers = require_timers(); + var { + RequestContentLengthMismatchError, + ResponseContentLengthMismatchError, + RequestAbortedError, + HeadersTimeoutError, + HeadersOverflowError, + SocketError, + InformationalError, + BodyTimeoutError, + HTTPParserError, + ResponseExceededMaxSizeError + } = require_errors(); + var { + 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, + kClosed + } = require_symbols(); + var constants = require_constants2(); + var EMPTY_BUF = Buffer.alloc(0); + var FastBuffer = Buffer[Symbol.species]; + var removeAllListeners = util.removeAllListeners; + var extractBody; + function lazyllhttp() { + const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; + let mod; + let useWasmSIMD = process.arch !== "ppc64"; + if (process.env.UNDICI_NO_WASM_SIMD === "1") { + useWasmSIMD = true; + } else if (process.env.UNDICI_NO_WASM_SIMD === "0") { + useWasmSIMD = false; + } + if (useWasmSIMD) { + try { + mod = new WebAssembly.Module(require_llhttp_simd_wasm()); + } catch { + } + } + if (!mod) { + mod = new WebAssembly.Module(llhttpWasmData || require_llhttp_wasm()); + } + return new WebAssembly.Instance(mod, { + env: { + /** + * @param {number} p + * @param {number} at + * @param {number} len + * @returns {number} + */ + wasm_on_url: (p2, at3, len) => { + return 0; + }, + /** + * @param {number} p + * @param {number} at + * @param {number} len + * @returns {number} + */ + wasm_on_status: (p2, at3, len) => { + assert(currentParser.ptr === p2); + const start = at3 - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)); + }, + /** + * @param {number} p + * @returns {number} + */ + wasm_on_message_begin: (p2) => { + assert(currentParser.ptr === p2); + return currentParser.onMessageBegin(); + }, + /** + * @param {number} p + * @param {number} at + * @param {number} len + * @returns {number} + */ + wasm_on_header_field: (p2, at3, len) => { + assert(currentParser.ptr === p2); + const start = at3 - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)); + }, + /** + * @param {number} p + * @param {number} at + * @param {number} len + * @returns {number} + */ + wasm_on_header_value: (p2, at3, len) => { + assert(currentParser.ptr === p2); + const start = at3 - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)); + }, + /** + * @param {number} p + * @param {number} statusCode + * @param {0|1} upgrade + * @param {0|1} shouldKeepAlive + * @returns {number} + */ + wasm_on_headers_complete: (p2, statusCode, upgrade, shouldKeepAlive) => { + assert(currentParser.ptr === p2); + return currentParser.onHeadersComplete(statusCode, upgrade === 1, shouldKeepAlive === 1); + }, + /** + * @param {number} p + * @param {number} at + * @param {number} len + * @returns {number} + */ + wasm_on_body: (p2, at3, len) => { + assert(currentParser.ptr === p2); + const start = at3 - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)); + }, + /** + * @param {number} p + * @returns {number} + */ + wasm_on_message_complete: (p2) => { + assert(currentParser.ptr === p2); + return currentParser.onMessageComplete(); + } + } + }); } -} -function createHttpExporterTransport(parameters) { - return new HttpExporterTransport(parameters); -} -exports.createHttpExporterTransport = createHttpExporterTransport; -//# sourceMappingURL=http-exporter-transport.js.map - -/***/ }), - -/***/ 79666: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createHttpAgent = exports.sendWithHttp = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const http = __nccwpck_require__(13685); -const https = __nccwpck_require__(95687); -const zlib = __nccwpck_require__(59796); -const stream_1 = __nccwpck_require__(12781); -const is_export_retryable_1 = __nccwpck_require__(31665); -const types_1 = __nccwpck_require__(44111); -/** - * Sends data using http - * @param params - * @param agent - * @param data - * @param onDone - * @param timeoutMillis - */ -function sendWithHttp(params, agent, data, onDone, timeoutMillis) { - const parsedUrl = new URL(params.url); - const nodeVersion = Number(process.versions.node.split('.')[0]); - const options = { - hostname: parsedUrl.hostname, - port: parsedUrl.port, - path: parsedUrl.pathname, - method: 'POST', - headers: Object.assign({}, params.headers), - agent: agent, - }; - const request = parsedUrl.protocol === 'http:' ? http.request : https.request; - const req = request(options, (res) => { - const responseData = []; - res.on('data', chunk => responseData.push(chunk)); - res.on('end', () => { - if (res.statusCode && res.statusCode < 299) { - onDone({ - status: 'success', - data: Buffer.concat(responseData), - }); + var llhttpInstance = null; + var currentParser = null; + var currentBufferRef = null; + var currentBufferSize = 0; + var currentBufferPtr = null; + var USE_NATIVE_TIMER = 0; + var USE_FAST_TIMER = 1; + var TIMEOUT_HEADERS = 2 | USE_FAST_TIMER; + var TIMEOUT_BODY = 4 | USE_FAST_TIMER; + var TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER; + var Parser = class { + /** + * @param {import('./client.js')} client + * @param {import('net').Socket} socket + * @param {*} llhttp + */ + constructor(client, socket, { exports: exports2 }) { + this.llhttp = exports2; + 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 = 0; + 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, type2) { + if (delay !== this.timeoutValue || type2 & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { + if (this.timeout) { + timers.clearTimeout(this.timeout); + this.timeout = null; + } + if (delay) { + if (type2 & USE_FAST_TIMER) { + this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)); + } else { + this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)); + this.timeout?.unref(); } - else if (res.statusCode && (0, is_export_retryable_1.isExportRetryable)(res.statusCode)) { - onDone({ - status: 'retryable', - retryInMillis: (0, is_export_retryable_1.parseRetryAfterToMills)(res.headers['retry-after']), - }); + } + this.timeoutValue = delay; + } else if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + this.timeoutType = type2; + } + 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) { + 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); + } + } + /** + * @param {Buffer} chunk + */ + execute(chunk) { + assert(currentParser === null); + assert(this.ptr != null); + assert(!this.paused); + const { socket, llhttp } = this; + if (chunk.length > currentBufferSize) { + if (currentBufferPtr) { + llhttp.free(currentBufferPtr); + } + currentBufferSize = Math.ceil(chunk.length / 4096) * 4096; + currentBufferPtr = llhttp.malloc(currentBufferSize); + } + new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(chunk); + try { + let ret; + try { + currentBufferRef = chunk; + currentParser = this; + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, chunk.length); + } finally { + currentParser = null; + currentBufferRef = null; + } + if (ret !== constants.ERROR.OK) { + const data = chunk.subarray(llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr); + if (ret === constants.ERROR.PAUSED_UPGRADE) { + this.onUpgrade(data); + } else if (ret === constants.ERROR.PAUSED) { + this.paused = true; + socket.unshift(data); + } else { + const ptr = llhttp.llhttp_get_error_reason(this.ptr); + let message = ""; + 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); } - else { - const error = new types_1.OTLPExporterError(res.statusMessage, res.statusCode); - onDone({ - status: 'failure', - error, - }); + } + } catch (err) { + util.destroy(socket, err); + } + } + destroy() { + assert(currentParser === null); + assert(this.ptr != 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; + } + /** + * @param {Buffer} buf + * @returns {0} + */ + onStatus(buf) { + this.statusText = buf.toString(); + return 0; + } + /** + * @returns {0|-1} + */ + onMessageBegin() { + const { socket, client } = this; + if (socket.destroyed) { + return -1; + } + const request = client[kQueue][client[kRunningIdx]]; + if (!request) { + return -1; + } + request.onResponseStarted(); + return 0; + } + /** + * @param {Buffer} buf + * @returns {number} + */ + 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); + return 0; + } + /** + * @param {Buffer} buf + * @returns {number} + */ + 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); + return 0; + } + /** + * @param {number} len + */ + trackHeader(len) { + this.headersSize += len; + if (this.headersSize >= this.headersMaxSize) { + util.destroy(this.socket, new HeadersOverflowError()); + } + } + /** + * @param {Buffer} head + */ + 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 = 0; + this.statusText = ""; + this.shouldKeepAlive = false; + 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](); + } + /** + * @param {number} statusCode + * @param {boolean} upgrade + * @param {boolean} shouldKeepAlive + * @returns {number} + */ + onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { + const { client, socket, headers, statusText } = this; + if (socket.destroyed) { + return -1; + } + const request = client[kQueue][client[kRunningIdx]]; + 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; + } + 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) { + 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; } - }); - }); - req.setTimeout(timeoutMillis, () => { - req.destroy(); - onDone({ - status: 'failure', - error: new Error('Request Timeout'), - }); - }); - req.on('error', (error) => { - onDone({ - status: 'failure', - error: error, - }); - }); - const reportTimeoutErrorEvent = nodeVersion >= 14 ? 'close' : 'abort'; - req.on(reportTimeoutErrorEvent, () => { - onDone({ - status: 'failure', - error: new Error('Request timed out'), - }); - }); - compressAndSend(req, params.compression, data, (error) => { - onDone({ - status: 'failure', - error, - }); - }); -} -exports.sendWithHttp = sendWithHttp; -function compressAndSend(req, compression, data, onError) { - let dataStream = readableFromUint8Array(data); - if (compression === 'gzip') { - req.setHeader('Content-Encoding', 'gzip'); - dataStream = dataStream - .on('error', onError) - .pipe(zlib.createGzip()) - .on('error', onError); - } - dataStream.pipe(req); -} -function readableFromUint8Array(buff) { - const readable = new stream_1.Readable(); - readable.push(buff); - readable.push(null); - return readable; -} -function createHttpAgent(rawUrl, agentOptions) { - const parsedUrl = new URL(rawUrl); - const Agent = parsedUrl.protocol === 'http:' ? http.Agent : https.Agent; - return new Agent(agentOptions); -} -exports.createHttpAgent = createHttpAgent; -//# sourceMappingURL=http-transport-utils.js.map - -/***/ }), - -/***/ 22853: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CompressionAlgorithm = exports.OTLPExporterNodeBase = void 0; -var OTLPExporterNodeBase_1 = __nccwpck_require__(75780); -Object.defineProperty(exports, "OTLPExporterNodeBase", ({ enumerable: true, get: function () { return OTLPExporterNodeBase_1.OTLPExporterNodeBase; } })); -var types_1 = __nccwpck_require__(96572); -Object.defineProperty(exports, "CompressionAlgorithm", ({ enumerable: true, get: function () { return types_1.CompressionAlgorithm; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 96572: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CompressionAlgorithm = void 0; -var CompressionAlgorithm; -(function (CompressionAlgorithm) { - CompressionAlgorithm["NONE"] = "none"; - CompressionAlgorithm["GZIP"] = "gzip"; -})(CompressionAlgorithm = exports.CompressionAlgorithm || (exports.CompressionAlgorithm = {})); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 58926: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.configureCompression = void 0; -const types_1 = __nccwpck_require__(96572); -const core_1 = __nccwpck_require__(89736); -function configureCompression(compression) { - if (compression) { - return compression; - } - else { - const definedCompression = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION || - (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION; - return definedCompression === types_1.CompressionAlgorithm.GZIP - ? types_1.CompressionAlgorithm.GZIP - : types_1.CompressionAlgorithm.NONE; - } -} -exports.configureCompression = configureCompression; -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ 2527: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createRetryingTransport = void 0; -const MAX_ATTEMPTS = 5; -const INITIAL_BACKOFF = 1000; -const MAX_BACKOFF = 5000; -const BACKOFF_MULTIPLIER = 1.5; -const JITTER = 0.2; -/** - * Get a pseudo-random jitter that falls in the range of [-JITTER, +JITTER] - */ -function getJitter() { - return Math.random() * (2 * JITTER) - JITTER; -} -class RetryingTransport { - constructor(_transport) { - this._transport = _transport; - } - retry(data, timeoutMillis, inMillis) { - return new Promise((resolve, reject) => { - setTimeout(() => { - this._transport.send(data, timeoutMillis).then(resolve, reject); - }, inMillis); - }); - } - async send(data, timeoutMillis) { - var _a; - const deadline = Date.now() + timeoutMillis; - let result = await this._transport.send(data, timeoutMillis); - let attempts = MAX_ATTEMPTS; - let nextBackoff = INITIAL_BACKOFF; - while (result.status === 'retryable' && attempts > 0) { - attempts--; - // use maximum of computed backoff and 0 to avoid negative timeouts - const backoff = Math.max(Math.min(nextBackoff, MAX_BACKOFF) + getJitter(), 0); - nextBackoff = nextBackoff * BACKOFF_MULTIPLIER; - const retryInMillis = (_a = result.retryInMillis) !== null && _a !== void 0 ? _a : backoff; - // return when expected retry time is after the export deadline. - const remainingTimeoutMillis = deadline - Date.now(); - if (retryInMillis > remainingTimeoutMillis) { - return result; - } - result = await this.retry(data, remainingTimeoutMillis, retryInMillis); + } else { + client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; + } + } else { + socket[kReset] = true; } - return result; - } - shutdown() { - return this._transport.shutdown(); - } -} -/** - * Creates an Exporter Transport that retries on 'retryable' response. - */ -function createRetryingTransport(options) { - return new RetryingTransport(options.transport); -} -exports.createRetryingTransport = createRetryingTransport; -//# sourceMappingURL=retrying-transport.js.map - -/***/ }), - -/***/ 44111: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OTLPExporterError = void 0; -/** - * Interface for handling error - */ -class OTLPExporterError extends Error { - constructor(message, code, data) { - super(message); - this.name = 'OTLPExporterError'; - this.data = data; - this.code = code; - } -} -exports.OTLPExporterError = OTLPExporterError; -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 14425: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseRetryAfterToMills = exports.isExportRetryable = exports.invalidTimeout = exports.configureExporterTimeout = exports.appendRootPathToUrlIfNeeded = exports.appendResourcePathToUrl = exports.parseHeaders = exports.DEFAULT_EXPORT_BACKOFF_MULTIPLIER = exports.DEFAULT_EXPORT_MAX_BACKOFF = exports.DEFAULT_EXPORT_INITIAL_BACKOFF = exports.DEFAULT_EXPORT_MAX_ATTEMPTS = void 0; -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -const DEFAULT_TRACE_TIMEOUT = 10000; -exports.DEFAULT_EXPORT_MAX_ATTEMPTS = 5; -exports.DEFAULT_EXPORT_INITIAL_BACKOFF = 1000; -exports.DEFAULT_EXPORT_MAX_BACKOFF = 5000; -exports.DEFAULT_EXPORT_BACKOFF_MULTIPLIER = 1.5; -/** - * Parses headers from config leaving only those that have defined values - * @param partialHeaders - */ -function parseHeaders(partialHeaders = {}) { - const headers = {}; - Object.entries(partialHeaders).forEach(([key, value]) => { - if (typeof value !== 'undefined') { - headers[key] = String(value); + const pause2 = request.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request.aborted) { + return -1; } - else { - api_1.diag.warn(`Header "${key}" has invalid value (${value}) and will be ignored`); + if (request.method === "HEAD") { + return 1; } - }); - return headers; -} -exports.parseHeaders = parseHeaders; -/** - * Adds path (version + signal) to a no per-signal endpoint - * @param url - * @param path - * @returns url + path - */ -function appendResourcePathToUrl(url, path) { - if (!url.endsWith('/')) { - url = url + '/'; - } - return url + path; -} -exports.appendResourcePathToUrl = appendResourcePathToUrl; -/** - * Adds root path to signal specific endpoint when endpoint contains no path part and no root path - * @param url - * @returns url - */ -function appendRootPathToUrlIfNeeded(url) { - try { - const parsedUrl = new URL(url); - if (parsedUrl.pathname === '') { - parsedUrl.pathname = parsedUrl.pathname + '/'; + if (statusCode < 200) { + return 1; } - return parsedUrl.toString(); - } - catch (_a) { - api_1.diag.warn(`Could not parse export URL: '${url}'`); - return url; + if (socket[kBlocking]) { + socket[kBlocking] = false; + client[kResume](); + } + return pause2 ? constants.ERROR.PAUSED : 0; + } + /** + * @param {Buffer} buf + * @returns {number} + */ + 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) { + 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; + } + return 0; + } + /** + * @returns {number} + */ + onMessageComplete() { + const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; + if (socket.destroyed && (!statusCode || shouldKeepAlive)) { + return -1; + } + if (upgrade) { + return 0; + } + assert(statusCode >= 100); + assert((this.headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert(request); + this.statusCode = 0; + this.statusText = ""; + this.bytesRead = 0; + this.contentLength = ""; + this.keepAlive = ""; + this.connection = ""; + this.headers = []; + this.headersSize = 0; + if (statusCode < 200) { + return 0; + } + 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); + 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](); + } + return 0; + } + }; + function onParserTimeout(parserWeakRef) { + const parser = parserWeakRef.deref(); + if (!parser) { + return; + } + const { socket, timeoutType, client, paused } = parser; + 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")); + } + } + function connectH1(client, socket) { + client[kSocket] = socket; + if (!llhttpInstance) { + llhttpInstance = lazyllhttp(); + } + if (socket.errored) { + throw socket.errored; + } + if (socket.destroyed) { + throw new SocketError("destroyed"); + } + socket[kNoRef] = false; + socket[kWriting] = false; + socket[kReset] = false; + socket[kBlocking] = false; + socket[kParser] = new Parser(client, socket, llhttpInstance); + util.addListener(socket, "error", onHttpSocketError); + util.addListener(socket, "readable", onHttpSocketReadable); + util.addListener(socket, "end", onHttpSocketEnd); + util.addListener(socket, "close", onHttpSocketClose); + socket[kClosed] = false; + socket.on("close", onSocketClose); + return { + version: "h1", + defaultPipelining: 1, + write(request) { + return writeH1(client, request); + }, + resume() { + resumeH1(client); + }, + /** + * @param {Error|undefined} err + * @param {() => void} callback + */ + destroy(err, callback) { + if (socket[kClosed]) { + queueMicrotask(callback); + } else { + socket.on("close", callback); + socket.destroy(err); + } + }, + /** + * @returns {boolean} + */ + get destroyed() { + return socket.destroyed; + }, + /** + * @param {import('../core/request.js')} request + * @returns {boolean} + */ + 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; + } + }; } -} -exports.appendRootPathToUrlIfNeeded = appendRootPathToUrlIfNeeded; -/** - * Configure exporter trace timeout value from passed in value or environment variables - * @param timeoutMillis - * @returns timeout value in milliseconds - */ -function configureExporterTimeout(timeoutMillis) { - if (typeof timeoutMillis === 'number') { - if (timeoutMillis <= 0) { - // OTLP exporter configured timeout - using default value of 10000ms - return invalidTimeout(timeoutMillis, DEFAULT_TRACE_TIMEOUT); - } - return timeoutMillis; - } - else { - return getExporterTimeoutFromEnv(); + function onHttpSocketError(err) { + assert(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); } -} -exports.configureExporterTimeout = configureExporterTimeout; -function getExporterTimeoutFromEnv() { - var _a; - const definedTimeout = Number((_a = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT) !== null && _a !== void 0 ? _a : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT); - if (definedTimeout <= 0) { - // OTLP exporter configured timeout - using default value of 10000ms - return invalidTimeout(definedTimeout, DEFAULT_TRACE_TIMEOUT); + function onHttpSocketReadable() { + this[kParser]?.readMore(); } - else { - return definedTimeout; + function onHttpSocketEnd() { + const parser = this[kParser]; + if (parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); } -} -// OTLP exporter configured timeout - using default value of 10000ms -function invalidTimeout(timeout, defaultTimeout) { - api_1.diag.warn('Timeout must be greater than 0', timeout); - return defaultTimeout; -} -exports.invalidTimeout = invalidTimeout; -function isExportRetryable(statusCode) { - const retryCodes = [429, 502, 503, 504]; - return retryCodes.includes(statusCode); -} -exports.isExportRetryable = isExportRetryable; -function parseRetryAfterToMills(retryAfter) { - if (retryAfter == null) { - return -1; + function onHttpSocketClose() { + 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)); + const client = this[kClient]; + client[kSocket] = null; + client[kHTTPContext] = null; + if (client.destroyed) { + assert(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i2 = 0; i2 < requests.length; i2++) { + const request = requests[i2]; + 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(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + } + function onSocketClose() { + this[kClosed] = true; + } + 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); + } + } + } } - const seconds = Number.parseInt(retryAfter, 10); - if (Number.isInteger(seconds)) { - return seconds > 0 ? seconds * 1000 : -1; + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After#directives - const delay = new Date(retryAfter).getTime() - Date.now(); - if (delay >= 0) { - return delay; + function writeH1(client, request) { + const { method, path: path13, host, upgrade, blocking, reset: reset2 } = 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 (reset2 != null) { + socket[kReset] = reset2; + } + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { + socket[kReset] = true; + } + if (blocking) { + socket[kBlocking] = true; + } + if (socket.setTypeOfService) { + socket.setTypeOfService(request.typeOfService); + } + let header = `${method} ${path13} HTTP/1.1\r +`; + if (typeof host === "string") { + header += `host: ${host}\r +`; + } else { + header += client[kHostHeader]; + } + if (upgrade) { + header += `connection: upgrade\r +upgrade: ${upgrade}\r +`; + } else if (client[kPipelining] && !socket[kReset]) { + header += "connection: keep-alive\r\n"; + } else { + header += "connection: close\r\n"; + } + if (Array.isArray(headers)) { + for (let n8 = 0; n8 < headers.length; n8 += 2) { + const key = headers[n8 + 0]; + const val = headers[n8 + 1]; + if (Array.isArray(val)) { + for (let i2 = 0; i2 < val.length; i2++) { + header += `${key}: ${val[i2]}\r +`; + } + } else { + header += `${key}: ${val}\r +`; + } + } + } + if (channels.sendHeaders.hasSubscribers) { + channels.sendHeaders.publish({ request, headers: header, socket }); + } + 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; } - return 0; -} -exports.parseRetryAfterToMills = parseRetryAfterToMills; -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ 27471: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getOtlpEncoder = exports.encodeAsString = exports.encodeAsLongBits = exports.toLongBits = exports.hrTimeToNanos = void 0; -const core_1 = __nccwpck_require__(89736); -function hrTimeToNanos(hrTime) { - const NANOSECONDS = BigInt(1000000000); - return BigInt(hrTime[0]) * NANOSECONDS + BigInt(hrTime[1]); -} -exports.hrTimeToNanos = hrTimeToNanos; -function toLongBits(value) { - const low = Number(BigInt.asUintN(32, value)); - const high = Number(BigInt.asUintN(32, value >> BigInt(32))); - return { low, high }; -} -exports.toLongBits = toLongBits; -function encodeAsLongBits(hrTime) { - const nanos = hrTimeToNanos(hrTime); - return toLongBits(nanos); -} -exports.encodeAsLongBits = encodeAsLongBits; -function encodeAsString(hrTime) { - const nanos = hrTimeToNanos(hrTime); - return nanos.toString(); -} -exports.encodeAsString = encodeAsString; -const encodeTimestamp = typeof BigInt !== 'undefined' ? encodeAsString : core_1.hrTimeToNanoseconds; -function identity(value) { - return value; -} -function optionalHexToBinary(str) { - if (str === undefined) - return undefined; - return (0, core_1.hexToBinary)(str); -} -const DEFAULT_ENCODER = { - encodeHrTime: encodeAsLongBits, - encodeSpanContext: core_1.hexToBinary, - encodeOptionalSpanContext: optionalHexToBinary, -}; -function getOtlpEncoder(options) { - var _a, _b; - if (options === undefined) { - return DEFAULT_ENCODER; - } - const useLongBits = (_a = options.useLongBits) !== null && _a !== void 0 ? _a : true; - const useHex = (_b = options.useHex) !== null && _b !== void 0 ? _b : false; - return { - encodeHrTime: useLongBits ? encodeAsLongBits : encodeTimestamp, - encodeSpanContext: useHex ? identity : core_1.hexToBinary, - encodeOptionalSpanContext: useHex ? identity : optionalHexToBinary, - }; -} -exports.getOtlpEncoder = getOtlpEncoder; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 50037: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toAnyValue = exports.toKeyValue = exports.toAttributes = exports.createInstrumentationScope = void 0; -function createInstrumentationScope(scope) { - return { - name: scope.name, - version: scope.version, - }; -} -exports.createInstrumentationScope = createInstrumentationScope; -function toAttributes(attributes) { - return Object.keys(attributes).map(key => toKeyValue(key, attributes[key])); -} -exports.toAttributes = toAttributes; -function toKeyValue(key, value) { - return { - key: key, - value: toAnyValue(value), - }; -} -exports.toKeyValue = toKeyValue; -function toAnyValue(value) { - const t = typeof value; - if (t === 'string') - return { stringValue: value }; - if (t === 'number') { - if (!Number.isInteger(value)) - return { doubleValue: value }; - return { intValue: value }; - } - if (t === 'boolean') - return { boolValue: value }; - if (value instanceof Uint8Array) - return { bytesValue: value }; - if (Array.isArray(value)) - return { arrayValue: { values: value.map(toAnyValue) } }; - if (t === 'object' && value != null) - return { - kvlistValue: { - values: Object.entries(value).map(([k, v]) => toKeyValue(k, v)), - }, - }; - return {}; -} -exports.toAnyValue = toAnyValue; -//# sourceMappingURL=internal.js.map - -/***/ }), - -/***/ 75574: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ - -var $protobuf = __nccwpck_require__(96916); -// Common aliases -var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; -// Exported root namespace -var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); -$root.opentelemetry = (function () { - /** - * Namespace opentelemetry. - * @exports opentelemetry - * @namespace - */ - var opentelemetry = {}; - opentelemetry.proto = (function () { - /** - * Namespace proto. - * @memberof opentelemetry - * @namespace - */ - var proto = {}; - proto.common = (function () { - /** - * Namespace common. - * @memberof opentelemetry.proto - * @namespace - */ - var common = {}; - common.v1 = (function () { - /** - * Namespace v1. - * @memberof opentelemetry.proto.common - * @namespace - */ - var v1 = {}; - v1.AnyValue = (function () { - /** - * Properties of an AnyValue. - * @memberof opentelemetry.proto.common.v1 - * @interface IAnyValue - * @property {string|null} [stringValue] AnyValue stringValue - * @property {boolean|null} [boolValue] AnyValue boolValue - * @property {number|Long|null} [intValue] AnyValue intValue - * @property {number|null} [doubleValue] AnyValue doubleValue - * @property {opentelemetry.proto.common.v1.IArrayValue|null} [arrayValue] AnyValue arrayValue - * @property {opentelemetry.proto.common.v1.IKeyValueList|null} [kvlistValue] AnyValue kvlistValue - * @property {Uint8Array|null} [bytesValue] AnyValue bytesValue - */ - /** - * Constructs a new AnyValue. - * @memberof opentelemetry.proto.common.v1 - * @classdesc Represents an AnyValue. - * @implements IAnyValue - * @constructor - * @param {opentelemetry.proto.common.v1.IAnyValue=} [properties] Properties to set - */ - function AnyValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * AnyValue stringValue. - * @member {string|null|undefined} stringValue - * @memberof opentelemetry.proto.common.v1.AnyValue - * @instance - */ - AnyValue.prototype.stringValue = null; - /** - * AnyValue boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof opentelemetry.proto.common.v1.AnyValue - * @instance - */ - AnyValue.prototype.boolValue = null; - /** - * AnyValue intValue. - * @member {number|Long|null|undefined} intValue - * @memberof opentelemetry.proto.common.v1.AnyValue - * @instance - */ - AnyValue.prototype.intValue = null; - /** - * AnyValue doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof opentelemetry.proto.common.v1.AnyValue - * @instance - */ - AnyValue.prototype.doubleValue = null; - /** - * AnyValue arrayValue. - * @member {opentelemetry.proto.common.v1.IArrayValue|null|undefined} arrayValue - * @memberof opentelemetry.proto.common.v1.AnyValue - * @instance - */ - AnyValue.prototype.arrayValue = null; - /** - * AnyValue kvlistValue. - * @member {opentelemetry.proto.common.v1.IKeyValueList|null|undefined} kvlistValue - * @memberof opentelemetry.proto.common.v1.AnyValue - * @instance - */ - AnyValue.prototype.kvlistValue = null; - /** - * AnyValue bytesValue. - * @member {Uint8Array|null|undefined} bytesValue - * @memberof opentelemetry.proto.common.v1.AnyValue - * @instance - */ - AnyValue.prototype.bytesValue = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - /** - * AnyValue value. - * @member {"stringValue"|"boolValue"|"intValue"|"doubleValue"|"arrayValue"|"kvlistValue"|"bytesValue"|undefined} value - * @memberof opentelemetry.proto.common.v1.AnyValue - * @instance - */ - Object.defineProperty(AnyValue.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["stringValue", "boolValue", "intValue", "doubleValue", "arrayValue", "kvlistValue", "bytesValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - /** - * Creates a new AnyValue instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.common.v1.AnyValue - * @static - * @param {opentelemetry.proto.common.v1.IAnyValue=} [properties] Properties to set - * @returns {opentelemetry.proto.common.v1.AnyValue} AnyValue instance - */ - AnyValue.create = function create(properties) { - return new AnyValue(properties); - }; - /** - * Encodes the specified AnyValue message. Does not implicitly {@link opentelemetry.proto.common.v1.AnyValue.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.common.v1.AnyValue - * @static - * @param {opentelemetry.proto.common.v1.IAnyValue} message AnyValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnyValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.stringValue); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) - writer.uint32(/* id 2, wireType 0 =*/ 16).bool(message.boolValue); - if (message.intValue != null && Object.hasOwnProperty.call(message, "intValue")) - writer.uint32(/* id 3, wireType 0 =*/ 24).int64(message.intValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 4, wireType 1 =*/ 33).double(message.doubleValue); - if (message.arrayValue != null && Object.hasOwnProperty.call(message, "arrayValue")) - $root.opentelemetry.proto.common.v1.ArrayValue.encode(message.arrayValue, writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim(); - if (message.kvlistValue != null && Object.hasOwnProperty.call(message, "kvlistValue")) - $root.opentelemetry.proto.common.v1.KeyValueList.encode(message.kvlistValue, writer.uint32(/* id 6, wireType 2 =*/ 50).fork()).ldelim(); - if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) - writer.uint32(/* id 7, wireType 2 =*/ 58).bytes(message.bytesValue); - return writer; - }; - /** - * Encodes the specified AnyValue message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.AnyValue.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.common.v1.AnyValue - * @static - * @param {opentelemetry.proto.common.v1.IAnyValue} message AnyValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnyValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes an AnyValue message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.common.v1.AnyValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.common.v1.AnyValue} AnyValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnyValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.AnyValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.stringValue = reader.string(); - break; - } - case 2: { - message.boolValue = reader.bool(); - break; - } - case 3: { - message.intValue = reader.int64(); - break; - } - case 4: { - message.doubleValue = reader.double(); - break; - } - case 5: { - message.arrayValue = $root.opentelemetry.proto.common.v1.ArrayValue.decode(reader, reader.uint32()); - break; - } - case 6: { - message.kvlistValue = $root.opentelemetry.proto.common.v1.KeyValueList.decode(reader, reader.uint32()); - break; - } - case 7: { - message.bytesValue = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an AnyValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.common.v1.AnyValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.common.v1.AnyValue} AnyValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnyValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an AnyValue message. - * @function verify - * @memberof opentelemetry.proto.common.v1.AnyValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AnyValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - properties.value = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.intValue != null && message.hasOwnProperty("intValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high))) - return "intValue: integer|Long expected"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - } - if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.opentelemetry.proto.common.v1.ArrayValue.verify(message.arrayValue); - if (error) - return "arrayValue." + error; - } - } - if (message.kvlistValue != null && message.hasOwnProperty("kvlistValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.opentelemetry.proto.common.v1.KeyValueList.verify(message.kvlistValue); - if (error) - return "kvlistValue." + error; - } - } - if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!(message.bytesValue && typeof message.bytesValue.length === "number" || $util.isString(message.bytesValue))) - return "bytesValue: buffer expected"; - } - return null; - }; - /** - * Creates an AnyValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.common.v1.AnyValue - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.common.v1.AnyValue} AnyValue - */ - AnyValue.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.common.v1.AnyValue) - return object; - var message = new $root.opentelemetry.proto.common.v1.AnyValue(); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.intValue != null) - if ($util.Long) - (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false; - else if (typeof object.intValue === "string") - message.intValue = parseInt(object.intValue, 10); - else if (typeof object.intValue === "number") - message.intValue = object.intValue; - else if (typeof object.intValue === "object") - message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.arrayValue != null) { - if (typeof object.arrayValue !== "object") - throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected"); - message.arrayValue = $root.opentelemetry.proto.common.v1.ArrayValue.fromObject(object.arrayValue); - } - if (object.kvlistValue != null) { - if (typeof object.kvlistValue !== "object") - throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected"); - message.kvlistValue = $root.opentelemetry.proto.common.v1.KeyValueList.fromObject(object.kvlistValue); - } - if (object.bytesValue != null) - if (typeof object.bytesValue === "string") - $util.base64.decode(object.bytesValue, message.bytesValue = $util.newBuffer($util.base64.length(object.bytesValue)), 0); - else if (object.bytesValue.length >= 0) - message.bytesValue = object.bytesValue; - return message; - }; - /** - * Creates a plain object from an AnyValue message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.common.v1.AnyValue - * @static - * @param {opentelemetry.proto.common.v1.AnyValue} message AnyValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AnyValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.value = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.value = "boolValue"; - } - if (message.intValue != null && message.hasOwnProperty("intValue")) { - if (typeof message.intValue === "number") - object.intValue = options.longs === String ? String(message.intValue) : message.intValue; - else - object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue; - if (options.oneofs) - object.value = "intValue"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.value = "doubleValue"; - } - if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) { - object.arrayValue = $root.opentelemetry.proto.common.v1.ArrayValue.toObject(message.arrayValue, options); - if (options.oneofs) - object.value = "arrayValue"; - } - if (message.kvlistValue != null && message.hasOwnProperty("kvlistValue")) { - object.kvlistValue = $root.opentelemetry.proto.common.v1.KeyValueList.toObject(message.kvlistValue, options); - if (options.oneofs) - object.value = "kvlistValue"; - } - if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { - object.bytesValue = options.bytes === String ? $util.base64.encode(message.bytesValue, 0, message.bytesValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytesValue) : message.bytesValue; - if (options.oneofs) - object.value = "bytesValue"; - } - return object; - }; - /** - * Converts this AnyValue to JSON. - * @function toJSON - * @memberof opentelemetry.proto.common.v1.AnyValue - * @instance - * @returns {Object.} JSON object - */ - AnyValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for AnyValue - * @function getTypeUrl - * @memberof opentelemetry.proto.common.v1.AnyValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AnyValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.common.v1.AnyValue"; - }; - return AnyValue; - })(); - v1.ArrayValue = (function () { - /** - * Properties of an ArrayValue. - * @memberof opentelemetry.proto.common.v1 - * @interface IArrayValue - * @property {Array.|null} [values] ArrayValue values - */ - /** - * Constructs a new ArrayValue. - * @memberof opentelemetry.proto.common.v1 - * @classdesc Represents an ArrayValue. - * @implements IArrayValue - * @constructor - * @param {opentelemetry.proto.common.v1.IArrayValue=} [properties] Properties to set - */ - function ArrayValue(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ArrayValue values. - * @member {Array.} values - * @memberof opentelemetry.proto.common.v1.ArrayValue - * @instance - */ - ArrayValue.prototype.values = $util.emptyArray; - /** - * Creates a new ArrayValue instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.common.v1.ArrayValue - * @static - * @param {opentelemetry.proto.common.v1.IArrayValue=} [properties] Properties to set - * @returns {opentelemetry.proto.common.v1.ArrayValue} ArrayValue instance - */ - ArrayValue.create = function create(properties) { - return new ArrayValue(properties); - }; - /** - * Encodes the specified ArrayValue message. Does not implicitly {@link opentelemetry.proto.common.v1.ArrayValue.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.common.v1.ArrayValue - * @static - * @param {opentelemetry.proto.common.v1.IArrayValue} message ArrayValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ArrayValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.opentelemetry.proto.common.v1.AnyValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified ArrayValue message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.ArrayValue.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.common.v1.ArrayValue - * @static - * @param {opentelemetry.proto.common.v1.IArrayValue} message ArrayValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ArrayValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes an ArrayValue message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.common.v1.ArrayValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.common.v1.ArrayValue} ArrayValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ArrayValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.ArrayValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.opentelemetry.proto.common.v1.AnyValue.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an ArrayValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.common.v1.ArrayValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.common.v1.ArrayValue} ArrayValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ArrayValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an ArrayValue message. - * @function verify - * @memberof opentelemetry.proto.common.v1.ArrayValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ArrayValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.opentelemetry.proto.common.v1.AnyValue.verify(message.values[i]); - if (error) - return "values." + error; - } - } - return null; - }; - /** - * Creates an ArrayValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.common.v1.ArrayValue - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.common.v1.ArrayValue} ArrayValue - */ - ArrayValue.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.common.v1.ArrayValue) - return object; - var message = new $root.opentelemetry.proto.common.v1.ArrayValue(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected"); - message.values[i] = $root.opentelemetry.proto.common.v1.AnyValue.fromObject(object.values[i]); - } - } - return message; - }; - /** - * Creates a plain object from an ArrayValue message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.common.v1.ArrayValue - * @static - * @param {opentelemetry.proto.common.v1.ArrayValue} message ArrayValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ArrayValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.values[j], options); - } - return object; - }; - /** - * Converts this ArrayValue to JSON. - * @function toJSON - * @memberof opentelemetry.proto.common.v1.ArrayValue - * @instance - * @returns {Object.} JSON object - */ - ArrayValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ArrayValue - * @function getTypeUrl - * @memberof opentelemetry.proto.common.v1.ArrayValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ArrayValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.common.v1.ArrayValue"; - }; - return ArrayValue; - })(); - v1.KeyValueList = (function () { - /** - * Properties of a KeyValueList. - * @memberof opentelemetry.proto.common.v1 - * @interface IKeyValueList - * @property {Array.|null} [values] KeyValueList values - */ - /** - * Constructs a new KeyValueList. - * @memberof opentelemetry.proto.common.v1 - * @classdesc Represents a KeyValueList. - * @implements IKeyValueList - * @constructor - * @param {opentelemetry.proto.common.v1.IKeyValueList=} [properties] Properties to set - */ - function KeyValueList(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * KeyValueList values. - * @member {Array.} values - * @memberof opentelemetry.proto.common.v1.KeyValueList - * @instance - */ - KeyValueList.prototype.values = $util.emptyArray; - /** - * Creates a new KeyValueList instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.common.v1.KeyValueList - * @static - * @param {opentelemetry.proto.common.v1.IKeyValueList=} [properties] Properties to set - * @returns {opentelemetry.proto.common.v1.KeyValueList} KeyValueList instance - */ - KeyValueList.create = function create(properties) { - return new KeyValueList(properties); - }; - /** - * Encodes the specified KeyValueList message. Does not implicitly {@link opentelemetry.proto.common.v1.KeyValueList.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.common.v1.KeyValueList - * @static - * @param {opentelemetry.proto.common.v1.IKeyValueList} message KeyValueList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeyValueList.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.opentelemetry.proto.common.v1.KeyValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified KeyValueList message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.KeyValueList.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.common.v1.KeyValueList - * @static - * @param {opentelemetry.proto.common.v1.IKeyValueList} message KeyValueList message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeyValueList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a KeyValueList message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.common.v1.KeyValueList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.common.v1.KeyValueList} KeyValueList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeyValueList.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.KeyValueList(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a KeyValueList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.common.v1.KeyValueList - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.common.v1.KeyValueList} KeyValueList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeyValueList.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a KeyValueList message. - * @function verify - * @memberof opentelemetry.proto.common.v1.KeyValueList - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KeyValueList.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.values[i]); - if (error) - return "values." + error; - } - } - return null; - }; - /** - * Creates a KeyValueList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.common.v1.KeyValueList - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.common.v1.KeyValueList} KeyValueList - */ - KeyValueList.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.common.v1.KeyValueList) - return object; - var message = new $root.opentelemetry.proto.common.v1.KeyValueList(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected"); - message.values[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.values[i]); - } - } - return message; - }; - /** - * Creates a plain object from a KeyValueList message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.common.v1.KeyValueList - * @static - * @param {opentelemetry.proto.common.v1.KeyValueList} message KeyValueList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KeyValueList.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.values[j], options); - } - return object; - }; - /** - * Converts this KeyValueList to JSON. - * @function toJSON - * @memberof opentelemetry.proto.common.v1.KeyValueList - * @instance - * @returns {Object.} JSON object - */ - KeyValueList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for KeyValueList - * @function getTypeUrl - * @memberof opentelemetry.proto.common.v1.KeyValueList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - KeyValueList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.common.v1.KeyValueList"; - }; - return KeyValueList; - })(); - v1.KeyValue = (function () { - /** - * Properties of a KeyValue. - * @memberof opentelemetry.proto.common.v1 - * @interface IKeyValue - * @property {string|null} [key] KeyValue key - * @property {opentelemetry.proto.common.v1.IAnyValue|null} [value] KeyValue value - */ - /** - * Constructs a new KeyValue. - * @memberof opentelemetry.proto.common.v1 - * @classdesc Represents a KeyValue. - * @implements IKeyValue - * @constructor - * @param {opentelemetry.proto.common.v1.IKeyValue=} [properties] Properties to set - */ - function KeyValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * KeyValue key. - * @member {string|null|undefined} key - * @memberof opentelemetry.proto.common.v1.KeyValue - * @instance - */ - KeyValue.prototype.key = null; - /** - * KeyValue value. - * @member {opentelemetry.proto.common.v1.IAnyValue|null|undefined} value - * @memberof opentelemetry.proto.common.v1.KeyValue - * @instance - */ - KeyValue.prototype.value = null; - /** - * Creates a new KeyValue instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.common.v1.KeyValue - * @static - * @param {opentelemetry.proto.common.v1.IKeyValue=} [properties] Properties to set - * @returns {opentelemetry.proto.common.v1.KeyValue} KeyValue instance - */ - KeyValue.create = function create(properties) { - return new KeyValue(properties); - }; - /** - * Encodes the specified KeyValue message. Does not implicitly {@link opentelemetry.proto.common.v1.KeyValue.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.common.v1.KeyValue - * @static - * @param {opentelemetry.proto.common.v1.IKeyValue} message KeyValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeyValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.opentelemetry.proto.common.v1.AnyValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified KeyValue message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.KeyValue.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.common.v1.KeyValue - * @static - * @param {opentelemetry.proto.common.v1.IKeyValue} message KeyValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeyValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a KeyValue message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.common.v1.KeyValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.common.v1.KeyValue} KeyValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeyValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.KeyValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.key = reader.string(); - break; - } - case 2: { - message.value = $root.opentelemetry.proto.common.v1.AnyValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a KeyValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.common.v1.KeyValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.common.v1.KeyValue} KeyValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeyValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a KeyValue message. - * @function verify - * @memberof opentelemetry.proto.common.v1.KeyValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KeyValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.opentelemetry.proto.common.v1.AnyValue.verify(message.value); - if (error) - return "value." + error; - } - return null; - }; - /** - * Creates a KeyValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.common.v1.KeyValue - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.common.v1.KeyValue} KeyValue - */ - KeyValue.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.common.v1.KeyValue) - return object; - var message = new $root.opentelemetry.proto.common.v1.KeyValue(); - if (object.key != null) - message.key = String(object.key); - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected"); - message.value = $root.opentelemetry.proto.common.v1.AnyValue.fromObject(object.value); - } - return message; - }; - /** - * Creates a plain object from a KeyValue message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.common.v1.KeyValue - * @static - * @param {opentelemetry.proto.common.v1.KeyValue} message KeyValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KeyValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = ""; - object.value = null; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.value, options); - return object; - }; - /** - * Converts this KeyValue to JSON. - * @function toJSON - * @memberof opentelemetry.proto.common.v1.KeyValue - * @instance - * @returns {Object.} JSON object - */ - KeyValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for KeyValue - * @function getTypeUrl - * @memberof opentelemetry.proto.common.v1.KeyValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - KeyValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.common.v1.KeyValue"; - }; - return KeyValue; - })(); - v1.InstrumentationScope = (function () { - /** - * Properties of an InstrumentationScope. - * @memberof opentelemetry.proto.common.v1 - * @interface IInstrumentationScope - * @property {string|null} [name] InstrumentationScope name - * @property {string|null} [version] InstrumentationScope version - * @property {Array.|null} [attributes] InstrumentationScope attributes - * @property {number|null} [droppedAttributesCount] InstrumentationScope droppedAttributesCount - */ - /** - * Constructs a new InstrumentationScope. - * @memberof opentelemetry.proto.common.v1 - * @classdesc Represents an InstrumentationScope. - * @implements IInstrumentationScope - * @constructor - * @param {opentelemetry.proto.common.v1.IInstrumentationScope=} [properties] Properties to set - */ - function InstrumentationScope(properties) { - this.attributes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * InstrumentationScope name. - * @member {string|null|undefined} name - * @memberof opentelemetry.proto.common.v1.InstrumentationScope - * @instance - */ - InstrumentationScope.prototype.name = null; - /** - * InstrumentationScope version. - * @member {string|null|undefined} version - * @memberof opentelemetry.proto.common.v1.InstrumentationScope - * @instance - */ - InstrumentationScope.prototype.version = null; - /** - * InstrumentationScope attributes. - * @member {Array.} attributes - * @memberof opentelemetry.proto.common.v1.InstrumentationScope - * @instance - */ - InstrumentationScope.prototype.attributes = $util.emptyArray; - /** - * InstrumentationScope droppedAttributesCount. - * @member {number|null|undefined} droppedAttributesCount - * @memberof opentelemetry.proto.common.v1.InstrumentationScope - * @instance - */ - InstrumentationScope.prototype.droppedAttributesCount = null; - /** - * Creates a new InstrumentationScope instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.common.v1.InstrumentationScope - * @static - * @param {opentelemetry.proto.common.v1.IInstrumentationScope=} [properties] Properties to set - * @returns {opentelemetry.proto.common.v1.InstrumentationScope} InstrumentationScope instance - */ - InstrumentationScope.create = function create(properties) { - return new InstrumentationScope(properties); - }; - /** - * Encodes the specified InstrumentationScope message. Does not implicitly {@link opentelemetry.proto.common.v1.InstrumentationScope.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.common.v1.InstrumentationScope - * @static - * @param {opentelemetry.proto.common.v1.IInstrumentationScope} message InstrumentationScope message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstrumentationScope.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.name); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.version); - if (message.attributes != null && message.attributes.length) - for (var i = 0; i < message.attributes.length; ++i) - $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 3, wireType 2 =*/ 26).fork()).ldelim(); - if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) - writer.uint32(/* id 4, wireType 0 =*/ 32).uint32(message.droppedAttributesCount); - return writer; - }; - /** - * Encodes the specified InstrumentationScope message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.InstrumentationScope.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.common.v1.InstrumentationScope - * @static - * @param {opentelemetry.proto.common.v1.IInstrumentationScope} message InstrumentationScope message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstrumentationScope.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes an InstrumentationScope message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.common.v1.InstrumentationScope - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.common.v1.InstrumentationScope} InstrumentationScope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstrumentationScope.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.InstrumentationScope(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.version = reader.string(); - break; - } - case 3: { - if (!(message.attributes && message.attributes.length)) - message.attributes = []; - message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); - break; - } - case 4: { - message.droppedAttributesCount = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an InstrumentationScope message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.common.v1.InstrumentationScope - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.common.v1.InstrumentationScope} InstrumentationScope - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstrumentationScope.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an InstrumentationScope message. - * @function verify - * @memberof opentelemetry.proto.common.v1.InstrumentationScope - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InstrumentationScope.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!Array.isArray(message.attributes)) - return "attributes: array expected"; - for (var i = 0; i < message.attributes.length; ++i) { - var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); - if (error) - return "attributes." + error; - } - } - if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) - if (!$util.isInteger(message.droppedAttributesCount)) - return "droppedAttributesCount: integer expected"; - return null; - }; - /** - * Creates an InstrumentationScope message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.common.v1.InstrumentationScope - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.common.v1.InstrumentationScope} InstrumentationScope - */ - InstrumentationScope.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.common.v1.InstrumentationScope) - return object; - var message = new $root.opentelemetry.proto.common.v1.InstrumentationScope(); - if (object.name != null) - message.name = String(object.name); - if (object.version != null) - message.version = String(object.version); - if (object.attributes) { - if (!Array.isArray(object.attributes)) - throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected"); - message.attributes = []; - for (var i = 0; i < object.attributes.length; ++i) { - if (typeof object.attributes[i] !== "object") - throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected"); - message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); - } - } - if (object.droppedAttributesCount != null) - message.droppedAttributesCount = object.droppedAttributesCount >>> 0; - return message; - }; - /** - * Creates a plain object from an InstrumentationScope message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.common.v1.InstrumentationScope - * @static - * @param {opentelemetry.proto.common.v1.InstrumentationScope} message InstrumentationScope - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InstrumentationScope.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.attributes = []; - if (options.defaults) { - object.name = ""; - object.version = ""; - object.droppedAttributesCount = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.attributes && message.attributes.length) { - object.attributes = []; - for (var j = 0; j < message.attributes.length; ++j) - object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); - } - if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) - object.droppedAttributesCount = message.droppedAttributesCount; - return object; - }; - /** - * Converts this InstrumentationScope to JSON. - * @function toJSON - * @memberof opentelemetry.proto.common.v1.InstrumentationScope - * @instance - * @returns {Object.} JSON object - */ - InstrumentationScope.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for InstrumentationScope - * @function getTypeUrl - * @memberof opentelemetry.proto.common.v1.InstrumentationScope - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InstrumentationScope.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.common.v1.InstrumentationScope"; - }; - return InstrumentationScope; - })(); - return v1; - })(); - return common; - })(); - proto.resource = (function () { - /** - * Namespace resource. - * @memberof opentelemetry.proto - * @namespace - */ - var resource = {}; - resource.v1 = (function () { - /** - * Namespace v1. - * @memberof opentelemetry.proto.resource - * @namespace - */ - var v1 = {}; - v1.Resource = (function () { - /** - * Properties of a Resource. - * @memberof opentelemetry.proto.resource.v1 - * @interface IResource - * @property {Array.|null} [attributes] Resource attributes - * @property {number|null} [droppedAttributesCount] Resource droppedAttributesCount - */ - /** - * Constructs a new Resource. - * @memberof opentelemetry.proto.resource.v1 - * @classdesc Represents a Resource. - * @implements IResource - * @constructor - * @param {opentelemetry.proto.resource.v1.IResource=} [properties] Properties to set - */ - function Resource(properties) { - this.attributes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * Resource attributes. - * @member {Array.} attributes - * @memberof opentelemetry.proto.resource.v1.Resource - * @instance - */ - Resource.prototype.attributes = $util.emptyArray; - /** - * Resource droppedAttributesCount. - * @member {number|null|undefined} droppedAttributesCount - * @memberof opentelemetry.proto.resource.v1.Resource - * @instance - */ - Resource.prototype.droppedAttributesCount = null; - /** - * Creates a new Resource instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.resource.v1.Resource - * @static - * @param {opentelemetry.proto.resource.v1.IResource=} [properties] Properties to set - * @returns {opentelemetry.proto.resource.v1.Resource} Resource instance - */ - Resource.create = function create(properties) { - return new Resource(properties); - }; - /** - * Encodes the specified Resource message. Does not implicitly {@link opentelemetry.proto.resource.v1.Resource.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.resource.v1.Resource - * @static - * @param {opentelemetry.proto.resource.v1.IResource} message Resource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Resource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.attributes != null && message.attributes.length) - for (var i = 0; i < message.attributes.length; ++i) - $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) - writer.uint32(/* id 2, wireType 0 =*/ 16).uint32(message.droppedAttributesCount); - return writer; - }; - /** - * Encodes the specified Resource message, length delimited. Does not implicitly {@link opentelemetry.proto.resource.v1.Resource.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.resource.v1.Resource - * @static - * @param {opentelemetry.proto.resource.v1.IResource} message Resource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Resource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a Resource message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.resource.v1.Resource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.resource.v1.Resource} Resource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Resource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.resource.v1.Resource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.attributes && message.attributes.length)) - message.attributes = []; - message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); - break; - } - case 2: { - message.droppedAttributesCount = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a Resource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.resource.v1.Resource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.resource.v1.Resource} Resource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Resource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a Resource message. - * @function verify - * @memberof opentelemetry.proto.resource.v1.Resource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Resource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!Array.isArray(message.attributes)) - return "attributes: array expected"; - for (var i = 0; i < message.attributes.length; ++i) { - var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); - if (error) - return "attributes." + error; - } - } - if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) - if (!$util.isInteger(message.droppedAttributesCount)) - return "droppedAttributesCount: integer expected"; - return null; - }; - /** - * Creates a Resource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.resource.v1.Resource - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.resource.v1.Resource} Resource - */ - Resource.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.resource.v1.Resource) - return object; - var message = new $root.opentelemetry.proto.resource.v1.Resource(); - if (object.attributes) { - if (!Array.isArray(object.attributes)) - throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected"); - message.attributes = []; - for (var i = 0; i < object.attributes.length; ++i) { - if (typeof object.attributes[i] !== "object") - throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected"); - message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); - } - } - if (object.droppedAttributesCount != null) - message.droppedAttributesCount = object.droppedAttributesCount >>> 0; - return message; - }; - /** - * Creates a plain object from a Resource message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.resource.v1.Resource - * @static - * @param {opentelemetry.proto.resource.v1.Resource} message Resource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Resource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.attributes = []; - if (options.defaults) - object.droppedAttributesCount = 0; - if (message.attributes && message.attributes.length) { - object.attributes = []; - for (var j = 0; j < message.attributes.length; ++j) - object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); - } - if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) - object.droppedAttributesCount = message.droppedAttributesCount; - return object; - }; - /** - * Converts this Resource to JSON. - * @function toJSON - * @memberof opentelemetry.proto.resource.v1.Resource - * @instance - * @returns {Object.} JSON object - */ - Resource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for Resource - * @function getTypeUrl - * @memberof opentelemetry.proto.resource.v1.Resource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Resource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.resource.v1.Resource"; - }; - return Resource; - })(); - return v1; - })(); - return resource; - })(); - proto.trace = (function () { - /** - * Namespace trace. - * @memberof opentelemetry.proto - * @namespace - */ - var trace = {}; - trace.v1 = (function () { - /** - * Namespace v1. - * @memberof opentelemetry.proto.trace - * @namespace - */ - var v1 = {}; - v1.TracesData = (function () { - /** - * Properties of a TracesData. - * @memberof opentelemetry.proto.trace.v1 - * @interface ITracesData - * @property {Array.|null} [resourceSpans] TracesData resourceSpans - */ - /** - * Constructs a new TracesData. - * @memberof opentelemetry.proto.trace.v1 - * @classdesc Represents a TracesData. - * @implements ITracesData - * @constructor - * @param {opentelemetry.proto.trace.v1.ITracesData=} [properties] Properties to set - */ - function TracesData(properties) { - this.resourceSpans = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * TracesData resourceSpans. - * @member {Array.} resourceSpans - * @memberof opentelemetry.proto.trace.v1.TracesData - * @instance - */ - TracesData.prototype.resourceSpans = $util.emptyArray; - /** - * Creates a new TracesData instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.trace.v1.TracesData - * @static - * @param {opentelemetry.proto.trace.v1.ITracesData=} [properties] Properties to set - * @returns {opentelemetry.proto.trace.v1.TracesData} TracesData instance - */ - TracesData.create = function create(properties) { - return new TracesData(properties); - }; - /** - * Encodes the specified TracesData message. Does not implicitly {@link opentelemetry.proto.trace.v1.TracesData.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.trace.v1.TracesData - * @static - * @param {opentelemetry.proto.trace.v1.ITracesData} message TracesData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TracesData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceSpans != null && message.resourceSpans.length) - for (var i = 0; i < message.resourceSpans.length; ++i) - $root.opentelemetry.proto.trace.v1.ResourceSpans.encode(message.resourceSpans[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified TracesData message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.TracesData.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.trace.v1.TracesData - * @static - * @param {opentelemetry.proto.trace.v1.ITracesData} message TracesData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TracesData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a TracesData message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.trace.v1.TracesData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.trace.v1.TracesData} TracesData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TracesData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.TracesData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.resourceSpans && message.resourceSpans.length)) - message.resourceSpans = []; - message.resourceSpans.push($root.opentelemetry.proto.trace.v1.ResourceSpans.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a TracesData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.trace.v1.TracesData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.trace.v1.TracesData} TracesData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TracesData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a TracesData message. - * @function verify - * @memberof opentelemetry.proto.trace.v1.TracesData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TracesData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceSpans != null && message.hasOwnProperty("resourceSpans")) { - if (!Array.isArray(message.resourceSpans)) - return "resourceSpans: array expected"; - for (var i = 0; i < message.resourceSpans.length; ++i) { - var error = $root.opentelemetry.proto.trace.v1.ResourceSpans.verify(message.resourceSpans[i]); - if (error) - return "resourceSpans." + error; - } - } - return null; - }; - /** - * Creates a TracesData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.trace.v1.TracesData - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.trace.v1.TracesData} TracesData - */ - TracesData.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.trace.v1.TracesData) - return object; - var message = new $root.opentelemetry.proto.trace.v1.TracesData(); - if (object.resourceSpans) { - if (!Array.isArray(object.resourceSpans)) - throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected"); - message.resourceSpans = []; - for (var i = 0; i < object.resourceSpans.length; ++i) { - if (typeof object.resourceSpans[i] !== "object") - throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected"); - message.resourceSpans[i] = $root.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(object.resourceSpans[i]); - } - } - return message; - }; - /** - * Creates a plain object from a TracesData message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.trace.v1.TracesData - * @static - * @param {opentelemetry.proto.trace.v1.TracesData} message TracesData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TracesData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceSpans = []; - if (message.resourceSpans && message.resourceSpans.length) { - object.resourceSpans = []; - for (var j = 0; j < message.resourceSpans.length; ++j) - object.resourceSpans[j] = $root.opentelemetry.proto.trace.v1.ResourceSpans.toObject(message.resourceSpans[j], options); - } - return object; - }; - /** - * Converts this TracesData to JSON. - * @function toJSON - * @memberof opentelemetry.proto.trace.v1.TracesData - * @instance - * @returns {Object.} JSON object - */ - TracesData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for TracesData - * @function getTypeUrl - * @memberof opentelemetry.proto.trace.v1.TracesData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TracesData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.trace.v1.TracesData"; - }; - return TracesData; - })(); - v1.ResourceSpans = (function () { - /** - * Properties of a ResourceSpans. - * @memberof opentelemetry.proto.trace.v1 - * @interface IResourceSpans - * @property {opentelemetry.proto.resource.v1.IResource|null} [resource] ResourceSpans resource - * @property {Array.|null} [scopeSpans] ResourceSpans scopeSpans - * @property {string|null} [schemaUrl] ResourceSpans schemaUrl - */ - /** - * Constructs a new ResourceSpans. - * @memberof opentelemetry.proto.trace.v1 - * @classdesc Represents a ResourceSpans. - * @implements IResourceSpans - * @constructor - * @param {opentelemetry.proto.trace.v1.IResourceSpans=} [properties] Properties to set - */ - function ResourceSpans(properties) { - this.scopeSpans = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ResourceSpans resource. - * @member {opentelemetry.proto.resource.v1.IResource|null|undefined} resource - * @memberof opentelemetry.proto.trace.v1.ResourceSpans - * @instance - */ - ResourceSpans.prototype.resource = null; - /** - * ResourceSpans scopeSpans. - * @member {Array.} scopeSpans - * @memberof opentelemetry.proto.trace.v1.ResourceSpans - * @instance - */ - ResourceSpans.prototype.scopeSpans = $util.emptyArray; - /** - * ResourceSpans schemaUrl. - * @member {string|null|undefined} schemaUrl - * @memberof opentelemetry.proto.trace.v1.ResourceSpans - * @instance - */ - ResourceSpans.prototype.schemaUrl = null; - /** - * Creates a new ResourceSpans instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.trace.v1.ResourceSpans - * @static - * @param {opentelemetry.proto.trace.v1.IResourceSpans=} [properties] Properties to set - * @returns {opentelemetry.proto.trace.v1.ResourceSpans} ResourceSpans instance - */ - ResourceSpans.create = function create(properties) { - return new ResourceSpans(properties); - }; - /** - * Encodes the specified ResourceSpans message. Does not implicitly {@link opentelemetry.proto.trace.v1.ResourceSpans.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.trace.v1.ResourceSpans - * @static - * @param {opentelemetry.proto.trace.v1.IResourceSpans} message ResourceSpans message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceSpans.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.opentelemetry.proto.resource.v1.Resource.encode(message.resource, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - if (message.scopeSpans != null && message.scopeSpans.length) - for (var i = 0; i < message.scopeSpans.length; ++i) - $root.opentelemetry.proto.trace.v1.ScopeSpans.encode(message.scopeSpans[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); - if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); - return writer; - }; - /** - * Encodes the specified ResourceSpans message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.ResourceSpans.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.trace.v1.ResourceSpans - * @static - * @param {opentelemetry.proto.trace.v1.IResourceSpans} message ResourceSpans message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceSpans.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a ResourceSpans message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.trace.v1.ResourceSpans - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.trace.v1.ResourceSpans} ResourceSpans - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceSpans.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.ResourceSpans(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = $root.opentelemetry.proto.resource.v1.Resource.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.scopeSpans && message.scopeSpans.length)) - message.scopeSpans = []; - message.scopeSpans.push($root.opentelemetry.proto.trace.v1.ScopeSpans.decode(reader, reader.uint32())); - break; - } - case 3: { - message.schemaUrl = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a ResourceSpans message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.trace.v1.ResourceSpans - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.trace.v1.ResourceSpans} ResourceSpans - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceSpans.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a ResourceSpans message. - * @function verify - * @memberof opentelemetry.proto.trace.v1.ResourceSpans - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceSpans.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.opentelemetry.proto.resource.v1.Resource.verify(message.resource); - if (error) - return "resource." + error; - } - if (message.scopeSpans != null && message.hasOwnProperty("scopeSpans")) { - if (!Array.isArray(message.scopeSpans)) - return "scopeSpans: array expected"; - for (var i = 0; i < message.scopeSpans.length; ++i) { - var error = $root.opentelemetry.proto.trace.v1.ScopeSpans.verify(message.scopeSpans[i]); - if (error) - return "scopeSpans." + error; - } - } - if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) - if (!$util.isString(message.schemaUrl)) - return "schemaUrl: string expected"; - return null; - }; - /** - * Creates a ResourceSpans message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.trace.v1.ResourceSpans - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.trace.v1.ResourceSpans} ResourceSpans - */ - ResourceSpans.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.trace.v1.ResourceSpans) - return object; - var message = new $root.opentelemetry.proto.trace.v1.ResourceSpans(); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected"); - message.resource = $root.opentelemetry.proto.resource.v1.Resource.fromObject(object.resource); - } - if (object.scopeSpans) { - if (!Array.isArray(object.scopeSpans)) - throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected"); - message.scopeSpans = []; - for (var i = 0; i < object.scopeSpans.length; ++i) { - if (typeof object.scopeSpans[i] !== "object") - throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected"); - message.scopeSpans[i] = $root.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(object.scopeSpans[i]); - } - } - if (object.schemaUrl != null) - message.schemaUrl = String(object.schemaUrl); - return message; - }; - /** - * Creates a plain object from a ResourceSpans message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.trace.v1.ResourceSpans - * @static - * @param {opentelemetry.proto.trace.v1.ResourceSpans} message ResourceSpans - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceSpans.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.scopeSpans = []; - if (options.defaults) { - object.resource = null; - object.schemaUrl = ""; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource, options); - if (message.scopeSpans && message.scopeSpans.length) { - object.scopeSpans = []; - for (var j = 0; j < message.scopeSpans.length; ++j) - object.scopeSpans[j] = $root.opentelemetry.proto.trace.v1.ScopeSpans.toObject(message.scopeSpans[j], options); - } - if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) - object.schemaUrl = message.schemaUrl; - return object; - }; - /** - * Converts this ResourceSpans to JSON. - * @function toJSON - * @memberof opentelemetry.proto.trace.v1.ResourceSpans - * @instance - * @returns {Object.} JSON object - */ - ResourceSpans.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ResourceSpans - * @function getTypeUrl - * @memberof opentelemetry.proto.trace.v1.ResourceSpans - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceSpans.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.trace.v1.ResourceSpans"; - }; - return ResourceSpans; - })(); - v1.ScopeSpans = (function () { - /** - * Properties of a ScopeSpans. - * @memberof opentelemetry.proto.trace.v1 - * @interface IScopeSpans - * @property {opentelemetry.proto.common.v1.IInstrumentationScope|null} [scope] ScopeSpans scope - * @property {Array.|null} [spans] ScopeSpans spans - * @property {string|null} [schemaUrl] ScopeSpans schemaUrl - */ - /** - * Constructs a new ScopeSpans. - * @memberof opentelemetry.proto.trace.v1 - * @classdesc Represents a ScopeSpans. - * @implements IScopeSpans - * @constructor - * @param {opentelemetry.proto.trace.v1.IScopeSpans=} [properties] Properties to set - */ - function ScopeSpans(properties) { - this.spans = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ScopeSpans scope. - * @member {opentelemetry.proto.common.v1.IInstrumentationScope|null|undefined} scope - * @memberof opentelemetry.proto.trace.v1.ScopeSpans - * @instance - */ - ScopeSpans.prototype.scope = null; - /** - * ScopeSpans spans. - * @member {Array.} spans - * @memberof opentelemetry.proto.trace.v1.ScopeSpans - * @instance - */ - ScopeSpans.prototype.spans = $util.emptyArray; - /** - * ScopeSpans schemaUrl. - * @member {string|null|undefined} schemaUrl - * @memberof opentelemetry.proto.trace.v1.ScopeSpans - * @instance - */ - ScopeSpans.prototype.schemaUrl = null; - /** - * Creates a new ScopeSpans instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.trace.v1.ScopeSpans - * @static - * @param {opentelemetry.proto.trace.v1.IScopeSpans=} [properties] Properties to set - * @returns {opentelemetry.proto.trace.v1.ScopeSpans} ScopeSpans instance - */ - ScopeSpans.create = function create(properties) { - return new ScopeSpans(properties); - }; - /** - * Encodes the specified ScopeSpans message. Does not implicitly {@link opentelemetry.proto.trace.v1.ScopeSpans.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.trace.v1.ScopeSpans - * @static - * @param {opentelemetry.proto.trace.v1.IScopeSpans} message ScopeSpans message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScopeSpans.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - $root.opentelemetry.proto.common.v1.InstrumentationScope.encode(message.scope, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - if (message.spans != null && message.spans.length) - for (var i = 0; i < message.spans.length; ++i) - $root.opentelemetry.proto.trace.v1.Span.encode(message.spans[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); - if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); - return writer; - }; - /** - * Encodes the specified ScopeSpans message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.ScopeSpans.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.trace.v1.ScopeSpans - * @static - * @param {opentelemetry.proto.trace.v1.IScopeSpans} message ScopeSpans message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScopeSpans.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a ScopeSpans message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.trace.v1.ScopeSpans - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.trace.v1.ScopeSpans} ScopeSpans - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScopeSpans.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.ScopeSpans(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.spans && message.spans.length)) - message.spans = []; - message.spans.push($root.opentelemetry.proto.trace.v1.Span.decode(reader, reader.uint32())); - break; - } - case 3: { - message.schemaUrl = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a ScopeSpans message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.trace.v1.ScopeSpans - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.trace.v1.ScopeSpans} ScopeSpans - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScopeSpans.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a ScopeSpans message. - * @function verify - * @memberof opentelemetry.proto.trace.v1.ScopeSpans - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ScopeSpans.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scope != null && message.hasOwnProperty("scope")) { - var error = $root.opentelemetry.proto.common.v1.InstrumentationScope.verify(message.scope); - if (error) - return "scope." + error; - } - if (message.spans != null && message.hasOwnProperty("spans")) { - if (!Array.isArray(message.spans)) - return "spans: array expected"; - for (var i = 0; i < message.spans.length; ++i) { - var error = $root.opentelemetry.proto.trace.v1.Span.verify(message.spans[i]); - if (error) - return "spans." + error; - } - } - if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) - if (!$util.isString(message.schemaUrl)) - return "schemaUrl: string expected"; - return null; - }; - /** - * Creates a ScopeSpans message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.trace.v1.ScopeSpans - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.trace.v1.ScopeSpans} ScopeSpans - */ - ScopeSpans.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.trace.v1.ScopeSpans) - return object; - var message = new $root.opentelemetry.proto.trace.v1.ScopeSpans(); - if (object.scope != null) { - if (typeof object.scope !== "object") - throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected"); - message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(object.scope); - } - if (object.spans) { - if (!Array.isArray(object.spans)) - throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected"); - message.spans = []; - for (var i = 0; i < object.spans.length; ++i) { - if (typeof object.spans[i] !== "object") - throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected"); - message.spans[i] = $root.opentelemetry.proto.trace.v1.Span.fromObject(object.spans[i]); - } - } - if (object.schemaUrl != null) - message.schemaUrl = String(object.schemaUrl); - return message; - }; - /** - * Creates a plain object from a ScopeSpans message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.trace.v1.ScopeSpans - * @static - * @param {opentelemetry.proto.trace.v1.ScopeSpans} message ScopeSpans - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ScopeSpans.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.spans = []; - if (options.defaults) { - object.scope = null; - object.schemaUrl = ""; - } - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope, options); - if (message.spans && message.spans.length) { - object.spans = []; - for (var j = 0; j < message.spans.length; ++j) - object.spans[j] = $root.opentelemetry.proto.trace.v1.Span.toObject(message.spans[j], options); - } - if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) - object.schemaUrl = message.schemaUrl; - return object; - }; - /** - * Converts this ScopeSpans to JSON. - * @function toJSON - * @memberof opentelemetry.proto.trace.v1.ScopeSpans - * @instance - * @returns {Object.} JSON object - */ - ScopeSpans.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ScopeSpans - * @function getTypeUrl - * @memberof opentelemetry.proto.trace.v1.ScopeSpans - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ScopeSpans.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.trace.v1.ScopeSpans"; - }; - return ScopeSpans; - })(); - v1.Span = (function () { - /** - * Properties of a Span. - * @memberof opentelemetry.proto.trace.v1 - * @interface ISpan - * @property {Uint8Array|null} [traceId] Span traceId - * @property {Uint8Array|null} [spanId] Span spanId - * @property {string|null} [traceState] Span traceState - * @property {Uint8Array|null} [parentSpanId] Span parentSpanId - * @property {string|null} [name] Span name - * @property {opentelemetry.proto.trace.v1.Span.SpanKind|null} [kind] Span kind - * @property {number|Long|null} [startTimeUnixNano] Span startTimeUnixNano - * @property {number|Long|null} [endTimeUnixNano] Span endTimeUnixNano - * @property {Array.|null} [attributes] Span attributes - * @property {number|null} [droppedAttributesCount] Span droppedAttributesCount - * @property {Array.|null} [events] Span events - * @property {number|null} [droppedEventsCount] Span droppedEventsCount - * @property {Array.|null} [links] Span links - * @property {number|null} [droppedLinksCount] Span droppedLinksCount - * @property {opentelemetry.proto.trace.v1.IStatus|null} [status] Span status - */ - /** - * Constructs a new Span. - * @memberof opentelemetry.proto.trace.v1 - * @classdesc Represents a Span. - * @implements ISpan - * @constructor - * @param {opentelemetry.proto.trace.v1.ISpan=} [properties] Properties to set - */ - function Span(properties) { - this.attributes = []; - this.events = []; - this.links = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * Span traceId. - * @member {Uint8Array|null|undefined} traceId - * @memberof opentelemetry.proto.trace.v1.Span - * @instance - */ - Span.prototype.traceId = null; - /** - * Span spanId. - * @member {Uint8Array|null|undefined} spanId - * @memberof opentelemetry.proto.trace.v1.Span - * @instance - */ - Span.prototype.spanId = null; - /** - * Span traceState. - * @member {string|null|undefined} traceState - * @memberof opentelemetry.proto.trace.v1.Span - * @instance - */ - Span.prototype.traceState = null; - /** - * Span parentSpanId. - * @member {Uint8Array|null|undefined} parentSpanId - * @memberof opentelemetry.proto.trace.v1.Span - * @instance - */ - Span.prototype.parentSpanId = null; - /** - * Span name. - * @member {string|null|undefined} name - * @memberof opentelemetry.proto.trace.v1.Span - * @instance - */ - Span.prototype.name = null; - /** - * Span kind. - * @member {opentelemetry.proto.trace.v1.Span.SpanKind|null|undefined} kind - * @memberof opentelemetry.proto.trace.v1.Span - * @instance - */ - Span.prototype.kind = null; - /** - * Span startTimeUnixNano. - * @member {number|Long|null|undefined} startTimeUnixNano - * @memberof opentelemetry.proto.trace.v1.Span - * @instance - */ - Span.prototype.startTimeUnixNano = null; - /** - * Span endTimeUnixNano. - * @member {number|Long|null|undefined} endTimeUnixNano - * @memberof opentelemetry.proto.trace.v1.Span - * @instance - */ - Span.prototype.endTimeUnixNano = null; - /** - * Span attributes. - * @member {Array.} attributes - * @memberof opentelemetry.proto.trace.v1.Span - * @instance - */ - Span.prototype.attributes = $util.emptyArray; - /** - * Span droppedAttributesCount. - * @member {number|null|undefined} droppedAttributesCount - * @memberof opentelemetry.proto.trace.v1.Span - * @instance - */ - Span.prototype.droppedAttributesCount = null; - /** - * Span events. - * @member {Array.} events - * @memberof opentelemetry.proto.trace.v1.Span - * @instance - */ - Span.prototype.events = $util.emptyArray; - /** - * Span droppedEventsCount. - * @member {number|null|undefined} droppedEventsCount - * @memberof opentelemetry.proto.trace.v1.Span - * @instance - */ - Span.prototype.droppedEventsCount = null; - /** - * Span links. - * @member {Array.} links - * @memberof opentelemetry.proto.trace.v1.Span - * @instance - */ - Span.prototype.links = $util.emptyArray; - /** - * Span droppedLinksCount. - * @member {number|null|undefined} droppedLinksCount - * @memberof opentelemetry.proto.trace.v1.Span - * @instance - */ - Span.prototype.droppedLinksCount = null; - /** - * Span status. - * @member {opentelemetry.proto.trace.v1.IStatus|null|undefined} status - * @memberof opentelemetry.proto.trace.v1.Span - * @instance - */ - Span.prototype.status = null; - /** - * Creates a new Span instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.trace.v1.Span - * @static - * @param {opentelemetry.proto.trace.v1.ISpan=} [properties] Properties to set - * @returns {opentelemetry.proto.trace.v1.Span} Span instance - */ - Span.create = function create(properties) { - return new Span(properties); - }; - /** - * Encodes the specified Span message. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.trace.v1.Span - * @static - * @param {opentelemetry.proto.trace.v1.ISpan} message Span message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Span.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.traceId != null && Object.hasOwnProperty.call(message, "traceId")) - writer.uint32(/* id 1, wireType 2 =*/ 10).bytes(message.traceId); - if (message.spanId != null && Object.hasOwnProperty.call(message, "spanId")) - writer.uint32(/* id 2, wireType 2 =*/ 18).bytes(message.spanId); - if (message.traceState != null && Object.hasOwnProperty.call(message, "traceState")) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.traceState); - if (message.parentSpanId != null && Object.hasOwnProperty.call(message, "parentSpanId")) - writer.uint32(/* id 4, wireType 2 =*/ 34).bytes(message.parentSpanId); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/ 42).string(message.name); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 6, wireType 0 =*/ 48).int32(message.kind); - if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, "startTimeUnixNano")) - writer.uint32(/* id 7, wireType 1 =*/ 57).fixed64(message.startTimeUnixNano); - if (message.endTimeUnixNano != null && Object.hasOwnProperty.call(message, "endTimeUnixNano")) - writer.uint32(/* id 8, wireType 1 =*/ 65).fixed64(message.endTimeUnixNano); - if (message.attributes != null && message.attributes.length) - for (var i = 0; i < message.attributes.length; ++i) - $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 9, wireType 2 =*/ 74).fork()).ldelim(); - if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) - writer.uint32(/* id 10, wireType 0 =*/ 80).uint32(message.droppedAttributesCount); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.opentelemetry.proto.trace.v1.Span.Event.encode(message.events[i], writer.uint32(/* id 11, wireType 2 =*/ 90).fork()).ldelim(); - if (message.droppedEventsCount != null && Object.hasOwnProperty.call(message, "droppedEventsCount")) - writer.uint32(/* id 12, wireType 0 =*/ 96).uint32(message.droppedEventsCount); - if (message.links != null && message.links.length) - for (var i = 0; i < message.links.length; ++i) - $root.opentelemetry.proto.trace.v1.Span.Link.encode(message.links[i], writer.uint32(/* id 13, wireType 2 =*/ 106).fork()).ldelim(); - if (message.droppedLinksCount != null && Object.hasOwnProperty.call(message, "droppedLinksCount")) - writer.uint32(/* id 14, wireType 0 =*/ 112).uint32(message.droppedLinksCount); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - $root.opentelemetry.proto.trace.v1.Status.encode(message.status, writer.uint32(/* id 15, wireType 2 =*/ 122).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified Span message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.trace.v1.Span - * @static - * @param {opentelemetry.proto.trace.v1.ISpan} message Span message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Span.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a Span message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.trace.v1.Span - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.trace.v1.Span} Span - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Span.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.Span(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.traceId = reader.bytes(); - break; - } - case 2: { - message.spanId = reader.bytes(); - break; - } - case 3: { - message.traceState = reader.string(); - break; - } - case 4: { - message.parentSpanId = reader.bytes(); - break; - } - case 5: { - message.name = reader.string(); - break; - } - case 6: { - message.kind = reader.int32(); - break; - } - case 7: { - message.startTimeUnixNano = reader.fixed64(); - break; - } - case 8: { - message.endTimeUnixNano = reader.fixed64(); - break; - } - case 9: { - if (!(message.attributes && message.attributes.length)) - message.attributes = []; - message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); - break; - } - case 10: { - message.droppedAttributesCount = reader.uint32(); - break; - } - case 11: { - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.opentelemetry.proto.trace.v1.Span.Event.decode(reader, reader.uint32())); - break; - } - case 12: { - message.droppedEventsCount = reader.uint32(); - break; - } - case 13: { - if (!(message.links && message.links.length)) - message.links = []; - message.links.push($root.opentelemetry.proto.trace.v1.Span.Link.decode(reader, reader.uint32())); - break; - } - case 14: { - message.droppedLinksCount = reader.uint32(); - break; - } - case 15: { - message.status = $root.opentelemetry.proto.trace.v1.Status.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a Span message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.trace.v1.Span - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.trace.v1.Span} Span - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Span.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a Span message. - * @function verify - * @memberof opentelemetry.proto.trace.v1.Span - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Span.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.traceId != null && message.hasOwnProperty("traceId")) - if (!(message.traceId && typeof message.traceId.length === "number" || $util.isString(message.traceId))) - return "traceId: buffer expected"; - if (message.spanId != null && message.hasOwnProperty("spanId")) - if (!(message.spanId && typeof message.spanId.length === "number" || $util.isString(message.spanId))) - return "spanId: buffer expected"; - if (message.traceState != null && message.hasOwnProperty("traceState")) - if (!$util.isString(message.traceState)) - return "traceState: string expected"; - if (message.parentSpanId != null && message.hasOwnProperty("parentSpanId")) - if (!(message.parentSpanId && typeof message.parentSpanId.length === "number" || $util.isString(message.parentSpanId))) - return "parentSpanId: buffer expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - switch (message.kind) { - default: - return "kind: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) - if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high))) - return "startTimeUnixNano: integer|Long expected"; - if (message.endTimeUnixNano != null && message.hasOwnProperty("endTimeUnixNano")) - if (!$util.isInteger(message.endTimeUnixNano) && !(message.endTimeUnixNano && $util.isInteger(message.endTimeUnixNano.low) && $util.isInteger(message.endTimeUnixNano.high))) - return "endTimeUnixNano: integer|Long expected"; - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!Array.isArray(message.attributes)) - return "attributes: array expected"; - for (var i = 0; i < message.attributes.length; ++i) { - var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); - if (error) - return "attributes." + error; - } - } - if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) - if (!$util.isInteger(message.droppedAttributesCount)) - return "droppedAttributesCount: integer expected"; - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.opentelemetry.proto.trace.v1.Span.Event.verify(message.events[i]); - if (error) - return "events." + error; - } - } - if (message.droppedEventsCount != null && message.hasOwnProperty("droppedEventsCount")) - if (!$util.isInteger(message.droppedEventsCount)) - return "droppedEventsCount: integer expected"; - if (message.links != null && message.hasOwnProperty("links")) { - if (!Array.isArray(message.links)) - return "links: array expected"; - for (var i = 0; i < message.links.length; ++i) { - var error = $root.opentelemetry.proto.trace.v1.Span.Link.verify(message.links[i]); - if (error) - return "links." + error; - } - } - if (message.droppedLinksCount != null && message.hasOwnProperty("droppedLinksCount")) - if (!$util.isInteger(message.droppedLinksCount)) - return "droppedLinksCount: integer expected"; - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.opentelemetry.proto.trace.v1.Status.verify(message.status); - if (error) - return "status." + error; - } - return null; - }; - /** - * Creates a Span message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.trace.v1.Span - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.trace.v1.Span} Span - */ - Span.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.trace.v1.Span) - return object; - var message = new $root.opentelemetry.proto.trace.v1.Span(); - if (object.traceId != null) - if (typeof object.traceId === "string") - $util.base64.decode(object.traceId, message.traceId = $util.newBuffer($util.base64.length(object.traceId)), 0); - else if (object.traceId.length >= 0) - message.traceId = object.traceId; - if (object.spanId != null) - if (typeof object.spanId === "string") - $util.base64.decode(object.spanId, message.spanId = $util.newBuffer($util.base64.length(object.spanId)), 0); - else if (object.spanId.length >= 0) - message.spanId = object.spanId; - if (object.traceState != null) - message.traceState = String(object.traceState); - if (object.parentSpanId != null) - if (typeof object.parentSpanId === "string") - $util.base64.decode(object.parentSpanId, message.parentSpanId = $util.newBuffer($util.base64.length(object.parentSpanId)), 0); - else if (object.parentSpanId.length >= 0) - message.parentSpanId = object.parentSpanId; - if (object.name != null) - message.name = String(object.name); - switch (object.kind) { - default: - if (typeof object.kind === "number") { - message.kind = object.kind; - break; - } - break; - case "SPAN_KIND_UNSPECIFIED": - case 0: - message.kind = 0; - break; - case "SPAN_KIND_INTERNAL": - case 1: - message.kind = 1; - break; - case "SPAN_KIND_SERVER": - case 2: - message.kind = 2; - break; - case "SPAN_KIND_CLIENT": - case 3: - message.kind = 3; - break; - case "SPAN_KIND_PRODUCER": - case 4: - message.kind = 4; - break; - case "SPAN_KIND_CONSUMER": - case 5: - message.kind = 5; - break; - } - if (object.startTimeUnixNano != null) - if ($util.Long) - (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false; - else if (typeof object.startTimeUnixNano === "string") - message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10); - else if (typeof object.startTimeUnixNano === "number") - message.startTimeUnixNano = object.startTimeUnixNano; - else if (typeof object.startTimeUnixNano === "object") - message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber(); - if (object.endTimeUnixNano != null) - if ($util.Long) - (message.endTimeUnixNano = $util.Long.fromValue(object.endTimeUnixNano)).unsigned = false; - else if (typeof object.endTimeUnixNano === "string") - message.endTimeUnixNano = parseInt(object.endTimeUnixNano, 10); - else if (typeof object.endTimeUnixNano === "number") - message.endTimeUnixNano = object.endTimeUnixNano; - else if (typeof object.endTimeUnixNano === "object") - message.endTimeUnixNano = new $util.LongBits(object.endTimeUnixNano.low >>> 0, object.endTimeUnixNano.high >>> 0).toNumber(); - if (object.attributes) { - if (!Array.isArray(object.attributes)) - throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected"); - message.attributes = []; - for (var i = 0; i < object.attributes.length; ++i) { - if (typeof object.attributes[i] !== "object") - throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected"); - message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); - } - } - if (object.droppedAttributesCount != null) - message.droppedAttributesCount = object.droppedAttributesCount >>> 0; - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected"); - message.events[i] = $root.opentelemetry.proto.trace.v1.Span.Event.fromObject(object.events[i]); - } - } - if (object.droppedEventsCount != null) - message.droppedEventsCount = object.droppedEventsCount >>> 0; - if (object.links) { - if (!Array.isArray(object.links)) - throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected"); - message.links = []; - for (var i = 0; i < object.links.length; ++i) { - if (typeof object.links[i] !== "object") - throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected"); - message.links[i] = $root.opentelemetry.proto.trace.v1.Span.Link.fromObject(object.links[i]); - } - } - if (object.droppedLinksCount != null) - message.droppedLinksCount = object.droppedLinksCount >>> 0; - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected"); - message.status = $root.opentelemetry.proto.trace.v1.Status.fromObject(object.status); - } - return message; - }; - /** - * Creates a plain object from a Span message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.trace.v1.Span - * @static - * @param {opentelemetry.proto.trace.v1.Span} message Span - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Span.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.attributes = []; - object.events = []; - object.links = []; - } - if (options.defaults) { - if (options.bytes === String) - object.traceId = ""; - else { - object.traceId = []; - if (options.bytes !== Array) - object.traceId = $util.newBuffer(object.traceId); - } - if (options.bytes === String) - object.spanId = ""; - else { - object.spanId = []; - if (options.bytes !== Array) - object.spanId = $util.newBuffer(object.spanId); - } - object.traceState = ""; - if (options.bytes === String) - object.parentSpanId = ""; - else { - object.parentSpanId = []; - if (options.bytes !== Array) - object.parentSpanId = $util.newBuffer(object.parentSpanId); - } - object.name = ""; - object.kind = options.enums === String ? "SPAN_KIND_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.startTimeUnixNano = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.endTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.endTimeUnixNano = options.longs === String ? "0" : 0; - object.droppedAttributesCount = 0; - object.droppedEventsCount = 0; - object.droppedLinksCount = 0; - object.status = null; - } - if (message.traceId != null && message.hasOwnProperty("traceId")) - object.traceId = options.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId; - if (message.spanId != null && message.hasOwnProperty("spanId")) - object.spanId = options.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId; - if (message.traceState != null && message.hasOwnProperty("traceState")) - object.traceState = message.traceState; - if (message.parentSpanId != null && message.hasOwnProperty("parentSpanId")) - object.parentSpanId = options.bytes === String ? $util.base64.encode(message.parentSpanId, 0, message.parentSpanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.parentSpanId) : message.parentSpanId; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.opentelemetry.proto.trace.v1.Span.SpanKind[message.kind] === undefined ? message.kind : $root.opentelemetry.proto.trace.v1.Span.SpanKind[message.kind] : message.kind; - if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) - if (typeof message.startTimeUnixNano === "number") - object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano; - else - object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano; - if (message.endTimeUnixNano != null && message.hasOwnProperty("endTimeUnixNano")) - if (typeof message.endTimeUnixNano === "number") - object.endTimeUnixNano = options.longs === String ? String(message.endTimeUnixNano) : message.endTimeUnixNano; - else - object.endTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.endTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.endTimeUnixNano.low >>> 0, message.endTimeUnixNano.high >>> 0).toNumber() : message.endTimeUnixNano; - if (message.attributes && message.attributes.length) { - object.attributes = []; - for (var j = 0; j < message.attributes.length; ++j) - object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); - } - if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) - object.droppedAttributesCount = message.droppedAttributesCount; - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.opentelemetry.proto.trace.v1.Span.Event.toObject(message.events[j], options); - } - if (message.droppedEventsCount != null && message.hasOwnProperty("droppedEventsCount")) - object.droppedEventsCount = message.droppedEventsCount; - if (message.links && message.links.length) { - object.links = []; - for (var j = 0; j < message.links.length; ++j) - object.links[j] = $root.opentelemetry.proto.trace.v1.Span.Link.toObject(message.links[j], options); - } - if (message.droppedLinksCount != null && message.hasOwnProperty("droppedLinksCount")) - object.droppedLinksCount = message.droppedLinksCount; - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.opentelemetry.proto.trace.v1.Status.toObject(message.status, options); - return object; - }; - /** - * Converts this Span to JSON. - * @function toJSON - * @memberof opentelemetry.proto.trace.v1.Span - * @instance - * @returns {Object.} JSON object - */ - Span.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for Span - * @function getTypeUrl - * @memberof opentelemetry.proto.trace.v1.Span - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Span.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.trace.v1.Span"; - }; - /** - * SpanKind enum. - * @name opentelemetry.proto.trace.v1.Span.SpanKind - * @enum {number} - * @property {number} SPAN_KIND_UNSPECIFIED=0 SPAN_KIND_UNSPECIFIED value - * @property {number} SPAN_KIND_INTERNAL=1 SPAN_KIND_INTERNAL value - * @property {number} SPAN_KIND_SERVER=2 SPAN_KIND_SERVER value - * @property {number} SPAN_KIND_CLIENT=3 SPAN_KIND_CLIENT value - * @property {number} SPAN_KIND_PRODUCER=4 SPAN_KIND_PRODUCER value - * @property {number} SPAN_KIND_CONSUMER=5 SPAN_KIND_CONSUMER value - */ - Span.SpanKind = (function () { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SPAN_KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "SPAN_KIND_INTERNAL"] = 1; - values[valuesById[2] = "SPAN_KIND_SERVER"] = 2; - values[valuesById[3] = "SPAN_KIND_CLIENT"] = 3; - values[valuesById[4] = "SPAN_KIND_PRODUCER"] = 4; - values[valuesById[5] = "SPAN_KIND_CONSUMER"] = 5; - return values; - })(); - Span.Event = (function () { - /** - * Properties of an Event. - * @memberof opentelemetry.proto.trace.v1.Span - * @interface IEvent - * @property {number|Long|null} [timeUnixNano] Event timeUnixNano - * @property {string|null} [name] Event name - * @property {Array.|null} [attributes] Event attributes - * @property {number|null} [droppedAttributesCount] Event droppedAttributesCount - */ - /** - * Constructs a new Event. - * @memberof opentelemetry.proto.trace.v1.Span - * @classdesc Represents an Event. - * @implements IEvent - * @constructor - * @param {opentelemetry.proto.trace.v1.Span.IEvent=} [properties] Properties to set - */ - function Event(properties) { - this.attributes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * Event timeUnixNano. - * @member {number|Long|null|undefined} timeUnixNano - * @memberof opentelemetry.proto.trace.v1.Span.Event - * @instance - */ - Event.prototype.timeUnixNano = null; - /** - * Event name. - * @member {string|null|undefined} name - * @memberof opentelemetry.proto.trace.v1.Span.Event - * @instance - */ - Event.prototype.name = null; - /** - * Event attributes. - * @member {Array.} attributes - * @memberof opentelemetry.proto.trace.v1.Span.Event - * @instance - */ - Event.prototype.attributes = $util.emptyArray; - /** - * Event droppedAttributesCount. - * @member {number|null|undefined} droppedAttributesCount - * @memberof opentelemetry.proto.trace.v1.Span.Event - * @instance - */ - Event.prototype.droppedAttributesCount = null; - /** - * Creates a new Event instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.trace.v1.Span.Event - * @static - * @param {opentelemetry.proto.trace.v1.Span.IEvent=} [properties] Properties to set - * @returns {opentelemetry.proto.trace.v1.Span.Event} Event instance - */ - Event.create = function create(properties) { - return new Event(properties); - }; - /** - * Encodes the specified Event message. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.Event.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.trace.v1.Span.Event - * @static - * @param {opentelemetry.proto.trace.v1.Span.IEvent} message Event message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Event.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) - writer.uint32(/* id 1, wireType 1 =*/ 9).fixed64(message.timeUnixNano); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.name); - if (message.attributes != null && message.attributes.length) - for (var i = 0; i < message.attributes.length; ++i) - $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 3, wireType 2 =*/ 26).fork()).ldelim(); - if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) - writer.uint32(/* id 4, wireType 0 =*/ 32).uint32(message.droppedAttributesCount); - return writer; - }; - /** - * Encodes the specified Event message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.Event.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.trace.v1.Span.Event - * @static - * @param {opentelemetry.proto.trace.v1.Span.IEvent} message Event message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Event.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes an Event message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.trace.v1.Span.Event - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.trace.v1.Span.Event} Event - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Event.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.Span.Event(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.timeUnixNano = reader.fixed64(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - if (!(message.attributes && message.attributes.length)) - message.attributes = []; - message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); - break; - } - case 4: { - message.droppedAttributesCount = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an Event message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.trace.v1.Span.Event - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.trace.v1.Span.Event} Event - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Event.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an Event message. - * @function verify - * @memberof opentelemetry.proto.trace.v1.Span.Event - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Event.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) - if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) - return "timeUnixNano: integer|Long expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!Array.isArray(message.attributes)) - return "attributes: array expected"; - for (var i = 0; i < message.attributes.length; ++i) { - var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); - if (error) - return "attributes." + error; - } - } - if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) - if (!$util.isInteger(message.droppedAttributesCount)) - return "droppedAttributesCount: integer expected"; - return null; - }; - /** - * Creates an Event message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.trace.v1.Span.Event - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.trace.v1.Span.Event} Event - */ - Event.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.trace.v1.Span.Event) - return object; - var message = new $root.opentelemetry.proto.trace.v1.Span.Event(); - if (object.timeUnixNano != null) - if ($util.Long) - (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; - else if (typeof object.timeUnixNano === "string") - message.timeUnixNano = parseInt(object.timeUnixNano, 10); - else if (typeof object.timeUnixNano === "number") - message.timeUnixNano = object.timeUnixNano; - else if (typeof object.timeUnixNano === "object") - message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); - if (object.name != null) - message.name = String(object.name); - if (object.attributes) { - if (!Array.isArray(object.attributes)) - throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected"); - message.attributes = []; - for (var i = 0; i < object.attributes.length; ++i) { - if (typeof object.attributes[i] !== "object") - throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected"); - message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); - } - } - if (object.droppedAttributesCount != null) - message.droppedAttributesCount = object.droppedAttributesCount >>> 0; - return message; - }; - /** - * Creates a plain object from an Event message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.trace.v1.Span.Event - * @static - * @param {opentelemetry.proto.trace.v1.Span.Event} message Event - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Event.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.attributes = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.timeUnixNano = options.longs === String ? "0" : 0; - object.name = ""; - object.droppedAttributesCount = 0; - } - if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) - if (typeof message.timeUnixNano === "number") - object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; - else - object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.attributes && message.attributes.length) { - object.attributes = []; - for (var j = 0; j < message.attributes.length; ++j) - object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); - } - if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) - object.droppedAttributesCount = message.droppedAttributesCount; - return object; - }; - /** - * Converts this Event to JSON. - * @function toJSON - * @memberof opentelemetry.proto.trace.v1.Span.Event - * @instance - * @returns {Object.} JSON object - */ - Event.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for Event - * @function getTypeUrl - * @memberof opentelemetry.proto.trace.v1.Span.Event - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Event.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.trace.v1.Span.Event"; - }; - return Event; - })(); - Span.Link = (function () { - /** - * Properties of a Link. - * @memberof opentelemetry.proto.trace.v1.Span - * @interface ILink - * @property {Uint8Array|null} [traceId] Link traceId - * @property {Uint8Array|null} [spanId] Link spanId - * @property {string|null} [traceState] Link traceState - * @property {Array.|null} [attributes] Link attributes - * @property {number|null} [droppedAttributesCount] Link droppedAttributesCount - */ - /** - * Constructs a new Link. - * @memberof opentelemetry.proto.trace.v1.Span - * @classdesc Represents a Link. - * @implements ILink - * @constructor - * @param {opentelemetry.proto.trace.v1.Span.ILink=} [properties] Properties to set - */ - function Link(properties) { - this.attributes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * Link traceId. - * @member {Uint8Array|null|undefined} traceId - * @memberof opentelemetry.proto.trace.v1.Span.Link - * @instance - */ - Link.prototype.traceId = null; - /** - * Link spanId. - * @member {Uint8Array|null|undefined} spanId - * @memberof opentelemetry.proto.trace.v1.Span.Link - * @instance - */ - Link.prototype.spanId = null; - /** - * Link traceState. - * @member {string|null|undefined} traceState - * @memberof opentelemetry.proto.trace.v1.Span.Link - * @instance - */ - Link.prototype.traceState = null; - /** - * Link attributes. - * @member {Array.} attributes - * @memberof opentelemetry.proto.trace.v1.Span.Link - * @instance - */ - Link.prototype.attributes = $util.emptyArray; - /** - * Link droppedAttributesCount. - * @member {number|null|undefined} droppedAttributesCount - * @memberof opentelemetry.proto.trace.v1.Span.Link - * @instance - */ - Link.prototype.droppedAttributesCount = null; - /** - * Creates a new Link instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.trace.v1.Span.Link - * @static - * @param {opentelemetry.proto.trace.v1.Span.ILink=} [properties] Properties to set - * @returns {opentelemetry.proto.trace.v1.Span.Link} Link instance - */ - Link.create = function create(properties) { - return new Link(properties); - }; - /** - * Encodes the specified Link message. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.Link.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.trace.v1.Span.Link - * @static - * @param {opentelemetry.proto.trace.v1.Span.ILink} message Link message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Link.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.traceId != null && Object.hasOwnProperty.call(message, "traceId")) - writer.uint32(/* id 1, wireType 2 =*/ 10).bytes(message.traceId); - if (message.spanId != null && Object.hasOwnProperty.call(message, "spanId")) - writer.uint32(/* id 2, wireType 2 =*/ 18).bytes(message.spanId); - if (message.traceState != null && Object.hasOwnProperty.call(message, "traceState")) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.traceState); - if (message.attributes != null && message.attributes.length) - for (var i = 0; i < message.attributes.length; ++i) - $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 4, wireType 2 =*/ 34).fork()).ldelim(); - if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) - writer.uint32(/* id 5, wireType 0 =*/ 40).uint32(message.droppedAttributesCount); - return writer; - }; - /** - * Encodes the specified Link message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.Link.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.trace.v1.Span.Link - * @static - * @param {opentelemetry.proto.trace.v1.Span.ILink} message Link message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Link.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a Link message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.trace.v1.Span.Link - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.trace.v1.Span.Link} Link - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Link.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.Span.Link(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.traceId = reader.bytes(); - break; - } - case 2: { - message.spanId = reader.bytes(); - break; - } - case 3: { - message.traceState = reader.string(); - break; - } - case 4: { - if (!(message.attributes && message.attributes.length)) - message.attributes = []; - message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); - break; - } - case 5: { - message.droppedAttributesCount = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a Link message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.trace.v1.Span.Link - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.trace.v1.Span.Link} Link - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Link.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a Link message. - * @function verify - * @memberof opentelemetry.proto.trace.v1.Span.Link - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Link.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.traceId != null && message.hasOwnProperty("traceId")) - if (!(message.traceId && typeof message.traceId.length === "number" || $util.isString(message.traceId))) - return "traceId: buffer expected"; - if (message.spanId != null && message.hasOwnProperty("spanId")) - if (!(message.spanId && typeof message.spanId.length === "number" || $util.isString(message.spanId))) - return "spanId: buffer expected"; - if (message.traceState != null && message.hasOwnProperty("traceState")) - if (!$util.isString(message.traceState)) - return "traceState: string expected"; - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!Array.isArray(message.attributes)) - return "attributes: array expected"; - for (var i = 0; i < message.attributes.length; ++i) { - var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); - if (error) - return "attributes." + error; - } - } - if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) - if (!$util.isInteger(message.droppedAttributesCount)) - return "droppedAttributesCount: integer expected"; - return null; - }; - /** - * Creates a Link message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.trace.v1.Span.Link - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.trace.v1.Span.Link} Link - */ - Link.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.trace.v1.Span.Link) - return object; - var message = new $root.opentelemetry.proto.trace.v1.Span.Link(); - if (object.traceId != null) - if (typeof object.traceId === "string") - $util.base64.decode(object.traceId, message.traceId = $util.newBuffer($util.base64.length(object.traceId)), 0); - else if (object.traceId.length >= 0) - message.traceId = object.traceId; - if (object.spanId != null) - if (typeof object.spanId === "string") - $util.base64.decode(object.spanId, message.spanId = $util.newBuffer($util.base64.length(object.spanId)), 0); - else if (object.spanId.length >= 0) - message.spanId = object.spanId; - if (object.traceState != null) - message.traceState = String(object.traceState); - if (object.attributes) { - if (!Array.isArray(object.attributes)) - throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected"); - message.attributes = []; - for (var i = 0; i < object.attributes.length; ++i) { - if (typeof object.attributes[i] !== "object") - throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected"); - message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); - } - } - if (object.droppedAttributesCount != null) - message.droppedAttributesCount = object.droppedAttributesCount >>> 0; - return message; - }; - /** - * Creates a plain object from a Link message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.trace.v1.Span.Link - * @static - * @param {opentelemetry.proto.trace.v1.Span.Link} message Link - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Link.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.attributes = []; - if (options.defaults) { - if (options.bytes === String) - object.traceId = ""; - else { - object.traceId = []; - if (options.bytes !== Array) - object.traceId = $util.newBuffer(object.traceId); - } - if (options.bytes === String) - object.spanId = ""; - else { - object.spanId = []; - if (options.bytes !== Array) - object.spanId = $util.newBuffer(object.spanId); - } - object.traceState = ""; - object.droppedAttributesCount = 0; - } - if (message.traceId != null && message.hasOwnProperty("traceId")) - object.traceId = options.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId; - if (message.spanId != null && message.hasOwnProperty("spanId")) - object.spanId = options.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId; - if (message.traceState != null && message.hasOwnProperty("traceState")) - object.traceState = message.traceState; - if (message.attributes && message.attributes.length) { - object.attributes = []; - for (var j = 0; j < message.attributes.length; ++j) - object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); - } - if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) - object.droppedAttributesCount = message.droppedAttributesCount; - return object; - }; - /** - * Converts this Link to JSON. - * @function toJSON - * @memberof opentelemetry.proto.trace.v1.Span.Link - * @instance - * @returns {Object.} JSON object - */ - Link.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for Link - * @function getTypeUrl - * @memberof opentelemetry.proto.trace.v1.Span.Link - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Link.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.trace.v1.Span.Link"; - }; - return Link; - })(); - return Span; - })(); - v1.Status = (function () { - /** - * Properties of a Status. - * @memberof opentelemetry.proto.trace.v1 - * @interface IStatus - * @property {string|null} [message] Status message - * @property {opentelemetry.proto.trace.v1.Status.StatusCode|null} [code] Status code - */ - /** - * Constructs a new Status. - * @memberof opentelemetry.proto.trace.v1 - * @classdesc Represents a Status. - * @implements IStatus - * @constructor - * @param {opentelemetry.proto.trace.v1.IStatus=} [properties] Properties to set - */ - function Status(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * Status message. - * @member {string|null|undefined} message - * @memberof opentelemetry.proto.trace.v1.Status - * @instance - */ - Status.prototype.message = null; - /** - * Status code. - * @member {opentelemetry.proto.trace.v1.Status.StatusCode|null|undefined} code - * @memberof opentelemetry.proto.trace.v1.Status - * @instance - */ - Status.prototype.code = null; - /** - * Creates a new Status instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.trace.v1.Status - * @static - * @param {opentelemetry.proto.trace.v1.IStatus=} [properties] Properties to set - * @returns {opentelemetry.proto.trace.v1.Status} Status instance - */ - Status.create = function create(properties) { - return new Status(properties); - }; - /** - * Encodes the specified Status message. Does not implicitly {@link opentelemetry.proto.trace.v1.Status.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.trace.v1.Status - * @static - * @param {opentelemetry.proto.trace.v1.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.message); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 3, wireType 0 =*/ 24).int32(message.code); - return writer; - }; - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.Status.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.trace.v1.Status - * @static - * @param {opentelemetry.proto.trace.v1.IStatus} message Status message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Status.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a Status message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.trace.v1.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.trace.v1.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.Status(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.message = reader.string(); - break; - } - case 3: { - message.code = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.trace.v1.Status - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.trace.v1.Status} Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Status.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a Status message. - * @function verify - * @memberof opentelemetry.proto.trace.v1.Status - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Status.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - if (message.code != null && message.hasOwnProperty("code")) - switch (message.code) { - default: - return "code: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.trace.v1.Status - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.trace.v1.Status} Status - */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.trace.v1.Status) - return object; - var message = new $root.opentelemetry.proto.trace.v1.Status(); - if (object.message != null) - message.message = String(object.message); - switch (object.code) { - default: - if (typeof object.code === "number") { - message.code = object.code; - break; - } - break; - case "STATUS_CODE_UNSET": - case 0: - message.code = 0; - break; - case "STATUS_CODE_OK": - case 1: - message.code = 1; - break; - case "STATUS_CODE_ERROR": - case 2: - message.code = 2; - break; - } - return message; - }; - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.trace.v1.Status - * @static - * @param {opentelemetry.proto.trace.v1.Status} message Status - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Status.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.message = ""; - object.code = options.enums === String ? "STATUS_CODE_UNSET" : 0; - } - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.code != null && message.hasOwnProperty("code")) - object.code = options.enums === String ? $root.opentelemetry.proto.trace.v1.Status.StatusCode[message.code] === undefined ? message.code : $root.opentelemetry.proto.trace.v1.Status.StatusCode[message.code] : message.code; - return object; - }; - /** - * Converts this Status to JSON. - * @function toJSON - * @memberof opentelemetry.proto.trace.v1.Status - * @instance - * @returns {Object.} JSON object - */ - Status.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for Status - * @function getTypeUrl - * @memberof opentelemetry.proto.trace.v1.Status - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.trace.v1.Status"; - }; - /** - * StatusCode enum. - * @name opentelemetry.proto.trace.v1.Status.StatusCode - * @enum {number} - * @property {number} STATUS_CODE_UNSET=0 STATUS_CODE_UNSET value - * @property {number} STATUS_CODE_OK=1 STATUS_CODE_OK value - * @property {number} STATUS_CODE_ERROR=2 STATUS_CODE_ERROR value - */ - Status.StatusCode = (function () { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATUS_CODE_UNSET"] = 0; - values[valuesById[1] = "STATUS_CODE_OK"] = 1; - values[valuesById[2] = "STATUS_CODE_ERROR"] = 2; - return values; - })(); - return Status; - })(); - return v1; - })(); - return trace; - })(); - proto.collector = (function () { - /** - * Namespace collector. - * @memberof opentelemetry.proto - * @namespace - */ - var collector = {}; - collector.trace = (function () { - /** - * Namespace trace. - * @memberof opentelemetry.proto.collector - * @namespace - */ - var trace = {}; - trace.v1 = (function () { - /** - * Namespace v1. - * @memberof opentelemetry.proto.collector.trace - * @namespace - */ - var v1 = {}; - v1.TraceService = (function () { - /** - * Constructs a new TraceService service. - * @memberof opentelemetry.proto.collector.trace.v1 - * @classdesc Represents a TraceService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function TraceService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - (TraceService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TraceService; - /** - * Creates new TraceService service using the specified rpc implementation. - * @function create - * @memberof opentelemetry.proto.collector.trace.v1.TraceService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {TraceService} RPC service. Useful where requests and/or responses are streamed. - */ - TraceService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - /** - * Callback as used by {@link opentelemetry.proto.collector.trace.v1.TraceService#export_}. - * @memberof opentelemetry.proto.collector.trace.v1.TraceService - * @typedef ExportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} [response] ExportTraceServiceResponse - */ - /** - * Calls Export. - * @function export - * @memberof opentelemetry.proto.collector.trace.v1.TraceService - * @instance - * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest} request ExportTraceServiceRequest message or plain object - * @param {opentelemetry.proto.collector.trace.v1.TraceService.ExportCallback} callback Node-style callback called with the error, if any, and ExportTraceServiceResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TraceService.prototype["export"] = function export_(request, callback) { - return this.rpcCall(export_, $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest, $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse, request, callback); - }, "name", { value: "Export" }); - /** - * Calls Export. - * @function export - * @memberof opentelemetry.proto.collector.trace.v1.TraceService - * @instance - * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest} request ExportTraceServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - return TraceService; - })(); - v1.ExportTraceServiceRequest = (function () { - /** - * Properties of an ExportTraceServiceRequest. - * @memberof opentelemetry.proto.collector.trace.v1 - * @interface IExportTraceServiceRequest - * @property {Array.|null} [resourceSpans] ExportTraceServiceRequest resourceSpans - */ - /** - * Constructs a new ExportTraceServiceRequest. - * @memberof opentelemetry.proto.collector.trace.v1 - * @classdesc Represents an ExportTraceServiceRequest. - * @implements IExportTraceServiceRequest - * @constructor - * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest=} [properties] Properties to set - */ - function ExportTraceServiceRequest(properties) { - this.resourceSpans = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ExportTraceServiceRequest resourceSpans. - * @member {Array.} resourceSpans - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest - * @instance - */ - ExportTraceServiceRequest.prototype.resourceSpans = $util.emptyArray; - /** - * Creates a new ExportTraceServiceRequest instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest - * @static - * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest=} [properties] Properties to set - * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} ExportTraceServiceRequest instance - */ - ExportTraceServiceRequest.create = function create(properties) { - return new ExportTraceServiceRequest(properties); - }; - /** - * Encodes the specified ExportTraceServiceRequest message. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest - * @static - * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest} message ExportTraceServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportTraceServiceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceSpans != null && message.resourceSpans.length) - for (var i = 0; i < message.resourceSpans.length; ++i) - $root.opentelemetry.proto.trace.v1.ResourceSpans.encode(message.resourceSpans[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified ExportTraceServiceRequest message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest - * @static - * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest} message ExportTraceServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportTraceServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes an ExportTraceServiceRequest message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} ExportTraceServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportTraceServiceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.resourceSpans && message.resourceSpans.length)) - message.resourceSpans = []; - message.resourceSpans.push($root.opentelemetry.proto.trace.v1.ResourceSpans.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an ExportTraceServiceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} ExportTraceServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportTraceServiceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an ExportTraceServiceRequest message. - * @function verify - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportTraceServiceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceSpans != null && message.hasOwnProperty("resourceSpans")) { - if (!Array.isArray(message.resourceSpans)) - return "resourceSpans: array expected"; - for (var i = 0; i < message.resourceSpans.length; ++i) { - var error = $root.opentelemetry.proto.trace.v1.ResourceSpans.verify(message.resourceSpans[i]); - if (error) - return "resourceSpans." + error; - } - } - return null; - }; - /** - * Creates an ExportTraceServiceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} ExportTraceServiceRequest - */ - ExportTraceServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest) - return object; - var message = new $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest(); - if (object.resourceSpans) { - if (!Array.isArray(object.resourceSpans)) - throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected"); - message.resourceSpans = []; - for (var i = 0; i < object.resourceSpans.length; ++i) { - if (typeof object.resourceSpans[i] !== "object") - throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected"); - message.resourceSpans[i] = $root.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(object.resourceSpans[i]); - } - } - return message; - }; - /** - * Creates a plain object from an ExportTraceServiceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest - * @static - * @param {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} message ExportTraceServiceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportTraceServiceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceSpans = []; - if (message.resourceSpans && message.resourceSpans.length) { - object.resourceSpans = []; - for (var j = 0; j < message.resourceSpans.length; ++j) - object.resourceSpans[j] = $root.opentelemetry.proto.trace.v1.ResourceSpans.toObject(message.resourceSpans[j], options); - } - return object; - }; - /** - * Converts this ExportTraceServiceRequest to JSON. - * @function toJSON - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest - * @instance - * @returns {Object.} JSON object - */ - ExportTraceServiceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ExportTraceServiceRequest - * @function getTypeUrl - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportTraceServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"; - }; - return ExportTraceServiceRequest; - })(); - v1.ExportTraceServiceResponse = (function () { - /** - * Properties of an ExportTraceServiceResponse. - * @memberof opentelemetry.proto.collector.trace.v1 - * @interface IExportTraceServiceResponse - * @property {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess|null} [partialSuccess] ExportTraceServiceResponse partialSuccess - */ - /** - * Constructs a new ExportTraceServiceResponse. - * @memberof opentelemetry.proto.collector.trace.v1 - * @classdesc Represents an ExportTraceServiceResponse. - * @implements IExportTraceServiceResponse - * @constructor - * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceResponse=} [properties] Properties to set - */ - function ExportTraceServiceResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ExportTraceServiceResponse partialSuccess. - * @member {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess|null|undefined} partialSuccess - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse - * @instance - */ - ExportTraceServiceResponse.prototype.partialSuccess = null; - /** - * Creates a new ExportTraceServiceResponse instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse - * @static - * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceResponse=} [properties] Properties to set - * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} ExportTraceServiceResponse instance - */ - ExportTraceServiceResponse.create = function create(properties) { - return new ExportTraceServiceResponse(properties); - }; - /** - * Encodes the specified ExportTraceServiceResponse message. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse - * @static - * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceResponse} message ExportTraceServiceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportTraceServiceResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.partialSuccess != null && Object.hasOwnProperty.call(message, "partialSuccess")) - $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(message.partialSuccess, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified ExportTraceServiceResponse message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse - * @static - * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceResponse} message ExportTraceServiceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportTraceServiceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes an ExportTraceServiceResponse message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} ExportTraceServiceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportTraceServiceResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.partialSuccess = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an ExportTraceServiceResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} ExportTraceServiceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportTraceServiceResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an ExportTraceServiceResponse message. - * @function verify - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportTraceServiceResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) { - var error = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(message.partialSuccess); - if (error) - return "partialSuccess." + error; - } - return null; - }; - /** - * Creates an ExportTraceServiceResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} ExportTraceServiceResponse - */ - ExportTraceServiceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse) - return object; - var message = new $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse(); - if (object.partialSuccess != null) { - if (typeof object.partialSuccess !== "object") - throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected"); - message.partialSuccess = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(object.partialSuccess); - } - return message; - }; - /** - * Creates a plain object from an ExportTraceServiceResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse - * @static - * @param {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} message ExportTraceServiceResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportTraceServiceResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.partialSuccess = null; - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - object.partialSuccess = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(message.partialSuccess, options); - return object; - }; - /** - * Converts this ExportTraceServiceResponse to JSON. - * @function toJSON - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse - * @instance - * @returns {Object.} JSON object - */ - ExportTraceServiceResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ExportTraceServiceResponse - * @function getTypeUrl - * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportTraceServiceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"; - }; - return ExportTraceServiceResponse; - })(); - v1.ExportTracePartialSuccess = (function () { - /** - * Properties of an ExportTracePartialSuccess. - * @memberof opentelemetry.proto.collector.trace.v1 - * @interface IExportTracePartialSuccess - * @property {number|Long|null} [rejectedSpans] ExportTracePartialSuccess rejectedSpans - * @property {string|null} [errorMessage] ExportTracePartialSuccess errorMessage - */ - /** - * Constructs a new ExportTracePartialSuccess. - * @memberof opentelemetry.proto.collector.trace.v1 - * @classdesc Represents an ExportTracePartialSuccess. - * @implements IExportTracePartialSuccess - * @constructor - * @param {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess=} [properties] Properties to set - */ - function ExportTracePartialSuccess(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ExportTracePartialSuccess rejectedSpans. - * @member {number|Long|null|undefined} rejectedSpans - * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess - * @instance - */ - ExportTracePartialSuccess.prototype.rejectedSpans = null; - /** - * ExportTracePartialSuccess errorMessage. - * @member {string|null|undefined} errorMessage - * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess - * @instance - */ - ExportTracePartialSuccess.prototype.errorMessage = null; - /** - * Creates a new ExportTracePartialSuccess instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess - * @static - * @param {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess=} [properties] Properties to set - * @returns {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} ExportTracePartialSuccess instance - */ - ExportTracePartialSuccess.create = function create(properties) { - return new ExportTracePartialSuccess(properties); - }; - /** - * Encodes the specified ExportTracePartialSuccess message. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess - * @static - * @param {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess} message ExportTracePartialSuccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportTracePartialSuccess.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rejectedSpans != null && Object.hasOwnProperty.call(message, "rejectedSpans")) - writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.rejectedSpans); - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.errorMessage); - return writer; - }; - /** - * Encodes the specified ExportTracePartialSuccess message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess - * @static - * @param {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess} message ExportTracePartialSuccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportTracePartialSuccess.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes an ExportTracePartialSuccess message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} ExportTracePartialSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportTracePartialSuccess.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rejectedSpans = reader.int64(); - break; - } - case 2: { - message.errorMessage = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an ExportTracePartialSuccess message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} ExportTracePartialSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportTracePartialSuccess.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an ExportTracePartialSuccess message. - * @function verify - * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportTracePartialSuccess.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rejectedSpans != null && message.hasOwnProperty("rejectedSpans")) - if (!$util.isInteger(message.rejectedSpans) && !(message.rejectedSpans && $util.isInteger(message.rejectedSpans.low) && $util.isInteger(message.rejectedSpans.high))) - return "rejectedSpans: integer|Long expected"; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - if (!$util.isString(message.errorMessage)) - return "errorMessage: string expected"; - return null; - }; - /** - * Creates an ExportTracePartialSuccess message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} ExportTracePartialSuccess - */ - ExportTracePartialSuccess.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess) - return object; - var message = new $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess(); - if (object.rejectedSpans != null) - if ($util.Long) - (message.rejectedSpans = $util.Long.fromValue(object.rejectedSpans)).unsigned = false; - else if (typeof object.rejectedSpans === "string") - message.rejectedSpans = parseInt(object.rejectedSpans, 10); - else if (typeof object.rejectedSpans === "number") - message.rejectedSpans = object.rejectedSpans; - else if (typeof object.rejectedSpans === "object") - message.rejectedSpans = new $util.LongBits(object.rejectedSpans.low >>> 0, object.rejectedSpans.high >>> 0).toNumber(); - if (object.errorMessage != null) - message.errorMessage = String(object.errorMessage); - return message; - }; - /** - * Creates a plain object from an ExportTracePartialSuccess message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess - * @static - * @param {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} message ExportTracePartialSuccess - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportTracePartialSuccess.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.rejectedSpans = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.rejectedSpans = options.longs === String ? "0" : 0; - object.errorMessage = ""; - } - if (message.rejectedSpans != null && message.hasOwnProperty("rejectedSpans")) - if (typeof message.rejectedSpans === "number") - object.rejectedSpans = options.longs === String ? String(message.rejectedSpans) : message.rejectedSpans; - else - object.rejectedSpans = options.longs === String ? $util.Long.prototype.toString.call(message.rejectedSpans) : options.longs === Number ? new $util.LongBits(message.rejectedSpans.low >>> 0, message.rejectedSpans.high >>> 0).toNumber() : message.rejectedSpans; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - object.errorMessage = message.errorMessage; - return object; - }; - /** - * Converts this ExportTracePartialSuccess to JSON. - * @function toJSON - * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess - * @instance - * @returns {Object.} JSON object - */ - ExportTracePartialSuccess.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ExportTracePartialSuccess - * @function getTypeUrl - * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportTracePartialSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"; - }; - return ExportTracePartialSuccess; - })(); - return v1; - })(); - return trace; - })(); - collector.metrics = (function () { - /** - * Namespace metrics. - * @memberof opentelemetry.proto.collector - * @namespace - */ - var metrics = {}; - metrics.v1 = (function () { - /** - * Namespace v1. - * @memberof opentelemetry.proto.collector.metrics - * @namespace - */ - var v1 = {}; - v1.MetricsService = (function () { - /** - * Constructs a new MetricsService service. - * @memberof opentelemetry.proto.collector.metrics.v1 - * @classdesc Represents a MetricsService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function MetricsService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - (MetricsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetricsService; - /** - * Creates new MetricsService service using the specified rpc implementation. - * @function create - * @memberof opentelemetry.proto.collector.metrics.v1.MetricsService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {MetricsService} RPC service. Useful where requests and/or responses are streamed. - */ - MetricsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - /** - * Callback as used by {@link opentelemetry.proto.collector.metrics.v1.MetricsService#export_}. - * @memberof opentelemetry.proto.collector.metrics.v1.MetricsService - * @typedef ExportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} [response] ExportMetricsServiceResponse - */ - /** - * Calls Export. - * @function export - * @memberof opentelemetry.proto.collector.metrics.v1.MetricsService - * @instance - * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest} request ExportMetricsServiceRequest message or plain object - * @param {opentelemetry.proto.collector.metrics.v1.MetricsService.ExportCallback} callback Node-style callback called with the error, if any, and ExportMetricsServiceResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MetricsService.prototype["export"] = function export_(request, callback) { - return this.rpcCall(export_, $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest, $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse, request, callback); - }, "name", { value: "Export" }); - /** - * Calls Export. - * @function export - * @memberof opentelemetry.proto.collector.metrics.v1.MetricsService - * @instance - * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest} request ExportMetricsServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - return MetricsService; - })(); - v1.ExportMetricsServiceRequest = (function () { - /** - * Properties of an ExportMetricsServiceRequest. - * @memberof opentelemetry.proto.collector.metrics.v1 - * @interface IExportMetricsServiceRequest - * @property {Array.|null} [resourceMetrics] ExportMetricsServiceRequest resourceMetrics - */ - /** - * Constructs a new ExportMetricsServiceRequest. - * @memberof opentelemetry.proto.collector.metrics.v1 - * @classdesc Represents an ExportMetricsServiceRequest. - * @implements IExportMetricsServiceRequest - * @constructor - * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest=} [properties] Properties to set - */ - function ExportMetricsServiceRequest(properties) { - this.resourceMetrics = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ExportMetricsServiceRequest resourceMetrics. - * @member {Array.} resourceMetrics - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest - * @instance - */ - ExportMetricsServiceRequest.prototype.resourceMetrics = $util.emptyArray; - /** - * Creates a new ExportMetricsServiceRequest instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest - * @static - * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest=} [properties] Properties to set - * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} ExportMetricsServiceRequest instance - */ - ExportMetricsServiceRequest.create = function create(properties) { - return new ExportMetricsServiceRequest(properties); - }; - /** - * Encodes the specified ExportMetricsServiceRequest message. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest - * @static - * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest} message ExportMetricsServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportMetricsServiceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceMetrics != null && message.resourceMetrics.length) - for (var i = 0; i < message.resourceMetrics.length; ++i) - $root.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(message.resourceMetrics[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified ExportMetricsServiceRequest message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest - * @static - * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest} message ExportMetricsServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportMetricsServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes an ExportMetricsServiceRequest message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} ExportMetricsServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportMetricsServiceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.resourceMetrics && message.resourceMetrics.length)) - message.resourceMetrics = []; - message.resourceMetrics.push($root.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an ExportMetricsServiceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} ExportMetricsServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportMetricsServiceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an ExportMetricsServiceRequest message. - * @function verify - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportMetricsServiceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceMetrics != null && message.hasOwnProperty("resourceMetrics")) { - if (!Array.isArray(message.resourceMetrics)) - return "resourceMetrics: array expected"; - for (var i = 0; i < message.resourceMetrics.length; ++i) { - var error = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(message.resourceMetrics[i]); - if (error) - return "resourceMetrics." + error; - } - } - return null; - }; - /** - * Creates an ExportMetricsServiceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} ExportMetricsServiceRequest - */ - ExportMetricsServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest) - return object; - var message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest(); - if (object.resourceMetrics) { - if (!Array.isArray(object.resourceMetrics)) - throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected"); - message.resourceMetrics = []; - for (var i = 0; i < object.resourceMetrics.length; ++i) { - if (typeof object.resourceMetrics[i] !== "object") - throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected"); - message.resourceMetrics[i] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(object.resourceMetrics[i]); - } - } - return message; - }; - /** - * Creates a plain object from an ExportMetricsServiceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest - * @static - * @param {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} message ExportMetricsServiceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportMetricsServiceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceMetrics = []; - if (message.resourceMetrics && message.resourceMetrics.length) { - object.resourceMetrics = []; - for (var j = 0; j < message.resourceMetrics.length; ++j) - object.resourceMetrics[j] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(message.resourceMetrics[j], options); - } - return object; - }; - /** - * Converts this ExportMetricsServiceRequest to JSON. - * @function toJSON - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest - * @instance - * @returns {Object.} JSON object - */ - ExportMetricsServiceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ExportMetricsServiceRequest - * @function getTypeUrl - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportMetricsServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"; - }; - return ExportMetricsServiceRequest; - })(); - v1.ExportMetricsServiceResponse = (function () { - /** - * Properties of an ExportMetricsServiceResponse. - * @memberof opentelemetry.proto.collector.metrics.v1 - * @interface IExportMetricsServiceResponse - * @property {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess|null} [partialSuccess] ExportMetricsServiceResponse partialSuccess - */ - /** - * Constructs a new ExportMetricsServiceResponse. - * @memberof opentelemetry.proto.collector.metrics.v1 - * @classdesc Represents an ExportMetricsServiceResponse. - * @implements IExportMetricsServiceResponse - * @constructor - * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceResponse=} [properties] Properties to set - */ - function ExportMetricsServiceResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ExportMetricsServiceResponse partialSuccess. - * @member {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess|null|undefined} partialSuccess - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse - * @instance - */ - ExportMetricsServiceResponse.prototype.partialSuccess = null; - /** - * Creates a new ExportMetricsServiceResponse instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse - * @static - * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceResponse=} [properties] Properties to set - * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} ExportMetricsServiceResponse instance - */ - ExportMetricsServiceResponse.create = function create(properties) { - return new ExportMetricsServiceResponse(properties); - }; - /** - * Encodes the specified ExportMetricsServiceResponse message. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse - * @static - * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceResponse} message ExportMetricsServiceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportMetricsServiceResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.partialSuccess != null && Object.hasOwnProperty.call(message, "partialSuccess")) - $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(message.partialSuccess, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified ExportMetricsServiceResponse message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse - * @static - * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceResponse} message ExportMetricsServiceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportMetricsServiceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes an ExportMetricsServiceResponse message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} ExportMetricsServiceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportMetricsServiceResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.partialSuccess = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an ExportMetricsServiceResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} ExportMetricsServiceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportMetricsServiceResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an ExportMetricsServiceResponse message. - * @function verify - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportMetricsServiceResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) { - var error = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(message.partialSuccess); - if (error) - return "partialSuccess." + error; - } - return null; - }; - /** - * Creates an ExportMetricsServiceResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} ExportMetricsServiceResponse - */ - ExportMetricsServiceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse) - return object; - var message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse(); - if (object.partialSuccess != null) { - if (typeof object.partialSuccess !== "object") - throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected"); - message.partialSuccess = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(object.partialSuccess); - } - return message; - }; - /** - * Creates a plain object from an ExportMetricsServiceResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse - * @static - * @param {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} message ExportMetricsServiceResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportMetricsServiceResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.partialSuccess = null; - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - object.partialSuccess = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(message.partialSuccess, options); - return object; - }; - /** - * Converts this ExportMetricsServiceResponse to JSON. - * @function toJSON - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse - * @instance - * @returns {Object.} JSON object - */ - ExportMetricsServiceResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ExportMetricsServiceResponse - * @function getTypeUrl - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportMetricsServiceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"; - }; - return ExportMetricsServiceResponse; - })(); - v1.ExportMetricsPartialSuccess = (function () { - /** - * Properties of an ExportMetricsPartialSuccess. - * @memberof opentelemetry.proto.collector.metrics.v1 - * @interface IExportMetricsPartialSuccess - * @property {number|Long|null} [rejectedDataPoints] ExportMetricsPartialSuccess rejectedDataPoints - * @property {string|null} [errorMessage] ExportMetricsPartialSuccess errorMessage - */ - /** - * Constructs a new ExportMetricsPartialSuccess. - * @memberof opentelemetry.proto.collector.metrics.v1 - * @classdesc Represents an ExportMetricsPartialSuccess. - * @implements IExportMetricsPartialSuccess - * @constructor - * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess=} [properties] Properties to set - */ - function ExportMetricsPartialSuccess(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ExportMetricsPartialSuccess rejectedDataPoints. - * @member {number|Long|null|undefined} rejectedDataPoints - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess - * @instance - */ - ExportMetricsPartialSuccess.prototype.rejectedDataPoints = null; - /** - * ExportMetricsPartialSuccess errorMessage. - * @member {string|null|undefined} errorMessage - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess - * @instance - */ - ExportMetricsPartialSuccess.prototype.errorMessage = null; - /** - * Creates a new ExportMetricsPartialSuccess instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess - * @static - * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess=} [properties] Properties to set - * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} ExportMetricsPartialSuccess instance - */ - ExportMetricsPartialSuccess.create = function create(properties) { - return new ExportMetricsPartialSuccess(properties); - }; - /** - * Encodes the specified ExportMetricsPartialSuccess message. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess - * @static - * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess} message ExportMetricsPartialSuccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportMetricsPartialSuccess.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rejectedDataPoints != null && Object.hasOwnProperty.call(message, "rejectedDataPoints")) - writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.rejectedDataPoints); - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.errorMessage); - return writer; - }; - /** - * Encodes the specified ExportMetricsPartialSuccess message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess - * @static - * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess} message ExportMetricsPartialSuccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportMetricsPartialSuccess.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes an ExportMetricsPartialSuccess message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} ExportMetricsPartialSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportMetricsPartialSuccess.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rejectedDataPoints = reader.int64(); - break; - } - case 2: { - message.errorMessage = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an ExportMetricsPartialSuccess message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} ExportMetricsPartialSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportMetricsPartialSuccess.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an ExportMetricsPartialSuccess message. - * @function verify - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportMetricsPartialSuccess.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rejectedDataPoints != null && message.hasOwnProperty("rejectedDataPoints")) - if (!$util.isInteger(message.rejectedDataPoints) && !(message.rejectedDataPoints && $util.isInteger(message.rejectedDataPoints.low) && $util.isInteger(message.rejectedDataPoints.high))) - return "rejectedDataPoints: integer|Long expected"; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - if (!$util.isString(message.errorMessage)) - return "errorMessage: string expected"; - return null; - }; - /** - * Creates an ExportMetricsPartialSuccess message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} ExportMetricsPartialSuccess - */ - ExportMetricsPartialSuccess.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess) - return object; - var message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess(); - if (object.rejectedDataPoints != null) - if ($util.Long) - (message.rejectedDataPoints = $util.Long.fromValue(object.rejectedDataPoints)).unsigned = false; - else if (typeof object.rejectedDataPoints === "string") - message.rejectedDataPoints = parseInt(object.rejectedDataPoints, 10); - else if (typeof object.rejectedDataPoints === "number") - message.rejectedDataPoints = object.rejectedDataPoints; - else if (typeof object.rejectedDataPoints === "object") - message.rejectedDataPoints = new $util.LongBits(object.rejectedDataPoints.low >>> 0, object.rejectedDataPoints.high >>> 0).toNumber(); - if (object.errorMessage != null) - message.errorMessage = String(object.errorMessage); - return message; - }; - /** - * Creates a plain object from an ExportMetricsPartialSuccess message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess - * @static - * @param {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} message ExportMetricsPartialSuccess - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportMetricsPartialSuccess.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.rejectedDataPoints = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.rejectedDataPoints = options.longs === String ? "0" : 0; - object.errorMessage = ""; - } - if (message.rejectedDataPoints != null && message.hasOwnProperty("rejectedDataPoints")) - if (typeof message.rejectedDataPoints === "number") - object.rejectedDataPoints = options.longs === String ? String(message.rejectedDataPoints) : message.rejectedDataPoints; - else - object.rejectedDataPoints = options.longs === String ? $util.Long.prototype.toString.call(message.rejectedDataPoints) : options.longs === Number ? new $util.LongBits(message.rejectedDataPoints.low >>> 0, message.rejectedDataPoints.high >>> 0).toNumber() : message.rejectedDataPoints; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - object.errorMessage = message.errorMessage; - return object; - }; - /** - * Converts this ExportMetricsPartialSuccess to JSON. - * @function toJSON - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess - * @instance - * @returns {Object.} JSON object - */ - ExportMetricsPartialSuccess.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ExportMetricsPartialSuccess - * @function getTypeUrl - * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportMetricsPartialSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"; - }; - return ExportMetricsPartialSuccess; - })(); - return v1; - })(); - return metrics; - })(); - collector.logs = (function () { - /** - * Namespace logs. - * @memberof opentelemetry.proto.collector - * @namespace - */ - var logs = {}; - logs.v1 = (function () { - /** - * Namespace v1. - * @memberof opentelemetry.proto.collector.logs - * @namespace - */ - var v1 = {}; - v1.LogsService = (function () { - /** - * Constructs a new LogsService service. - * @memberof opentelemetry.proto.collector.logs.v1 - * @classdesc Represents a LogsService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function LogsService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - (LogsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LogsService; - /** - * Creates new LogsService service using the specified rpc implementation. - * @function create - * @memberof opentelemetry.proto.collector.logs.v1.LogsService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {LogsService} RPC service. Useful where requests and/or responses are streamed. - */ - LogsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - /** - * Callback as used by {@link opentelemetry.proto.collector.logs.v1.LogsService#export_}. - * @memberof opentelemetry.proto.collector.logs.v1.LogsService - * @typedef ExportCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} [response] ExportLogsServiceResponse - */ - /** - * Calls Export. - * @function export - * @memberof opentelemetry.proto.collector.logs.v1.LogsService - * @instance - * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest} request ExportLogsServiceRequest message or plain object - * @param {opentelemetry.proto.collector.logs.v1.LogsService.ExportCallback} callback Node-style callback called with the error, if any, and ExportLogsServiceResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(LogsService.prototype["export"] = function export_(request, callback) { - return this.rpcCall(export_, $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest, $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse, request, callback); - }, "name", { value: "Export" }); - /** - * Calls Export. - * @function export - * @memberof opentelemetry.proto.collector.logs.v1.LogsService - * @instance - * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest} request ExportLogsServiceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - return LogsService; - })(); - v1.ExportLogsServiceRequest = (function () { - /** - * Properties of an ExportLogsServiceRequest. - * @memberof opentelemetry.proto.collector.logs.v1 - * @interface IExportLogsServiceRequest - * @property {Array.|null} [resourceLogs] ExportLogsServiceRequest resourceLogs - */ - /** - * Constructs a new ExportLogsServiceRequest. - * @memberof opentelemetry.proto.collector.logs.v1 - * @classdesc Represents an ExportLogsServiceRequest. - * @implements IExportLogsServiceRequest - * @constructor - * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest=} [properties] Properties to set - */ - function ExportLogsServiceRequest(properties) { - this.resourceLogs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ExportLogsServiceRequest resourceLogs. - * @member {Array.} resourceLogs - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest - * @instance - */ - ExportLogsServiceRequest.prototype.resourceLogs = $util.emptyArray; - /** - * Creates a new ExportLogsServiceRequest instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest - * @static - * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest=} [properties] Properties to set - * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} ExportLogsServiceRequest instance - */ - ExportLogsServiceRequest.create = function create(properties) { - return new ExportLogsServiceRequest(properties); - }; - /** - * Encodes the specified ExportLogsServiceRequest message. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest - * @static - * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest} message ExportLogsServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportLogsServiceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceLogs != null && message.resourceLogs.length) - for (var i = 0; i < message.resourceLogs.length; ++i) - $root.opentelemetry.proto.logs.v1.ResourceLogs.encode(message.resourceLogs[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified ExportLogsServiceRequest message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest - * @static - * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest} message ExportLogsServiceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportLogsServiceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes an ExportLogsServiceRequest message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} ExportLogsServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportLogsServiceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.resourceLogs && message.resourceLogs.length)) - message.resourceLogs = []; - message.resourceLogs.push($root.opentelemetry.proto.logs.v1.ResourceLogs.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an ExportLogsServiceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} ExportLogsServiceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportLogsServiceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an ExportLogsServiceRequest message. - * @function verify - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportLogsServiceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceLogs != null && message.hasOwnProperty("resourceLogs")) { - if (!Array.isArray(message.resourceLogs)) - return "resourceLogs: array expected"; - for (var i = 0; i < message.resourceLogs.length; ++i) { - var error = $root.opentelemetry.proto.logs.v1.ResourceLogs.verify(message.resourceLogs[i]); - if (error) - return "resourceLogs." + error; - } - } - return null; - }; - /** - * Creates an ExportLogsServiceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} ExportLogsServiceRequest - */ - ExportLogsServiceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest) - return object; - var message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest(); - if (object.resourceLogs) { - if (!Array.isArray(object.resourceLogs)) - throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected"); - message.resourceLogs = []; - for (var i = 0; i < object.resourceLogs.length; ++i) { - if (typeof object.resourceLogs[i] !== "object") - throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected"); - message.resourceLogs[i] = $root.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(object.resourceLogs[i]); - } - } - return message; - }; - /** - * Creates a plain object from an ExportLogsServiceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest - * @static - * @param {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} message ExportLogsServiceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportLogsServiceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceLogs = []; - if (message.resourceLogs && message.resourceLogs.length) { - object.resourceLogs = []; - for (var j = 0; j < message.resourceLogs.length; ++j) - object.resourceLogs[j] = $root.opentelemetry.proto.logs.v1.ResourceLogs.toObject(message.resourceLogs[j], options); - } - return object; - }; - /** - * Converts this ExportLogsServiceRequest to JSON. - * @function toJSON - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest - * @instance - * @returns {Object.} JSON object - */ - ExportLogsServiceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ExportLogsServiceRequest - * @function getTypeUrl - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportLogsServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"; - }; - return ExportLogsServiceRequest; - })(); - v1.ExportLogsServiceResponse = (function () { - /** - * Properties of an ExportLogsServiceResponse. - * @memberof opentelemetry.proto.collector.logs.v1 - * @interface IExportLogsServiceResponse - * @property {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess|null} [partialSuccess] ExportLogsServiceResponse partialSuccess - */ - /** - * Constructs a new ExportLogsServiceResponse. - * @memberof opentelemetry.proto.collector.logs.v1 - * @classdesc Represents an ExportLogsServiceResponse. - * @implements IExportLogsServiceResponse - * @constructor - * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceResponse=} [properties] Properties to set - */ - function ExportLogsServiceResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ExportLogsServiceResponse partialSuccess. - * @member {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess|null|undefined} partialSuccess - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse - * @instance - */ - ExportLogsServiceResponse.prototype.partialSuccess = null; - /** - * Creates a new ExportLogsServiceResponse instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse - * @static - * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceResponse=} [properties] Properties to set - * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} ExportLogsServiceResponse instance - */ - ExportLogsServiceResponse.create = function create(properties) { - return new ExportLogsServiceResponse(properties); - }; - /** - * Encodes the specified ExportLogsServiceResponse message. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse - * @static - * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceResponse} message ExportLogsServiceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportLogsServiceResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.partialSuccess != null && Object.hasOwnProperty.call(message, "partialSuccess")) - $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(message.partialSuccess, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified ExportLogsServiceResponse message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse - * @static - * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceResponse} message ExportLogsServiceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportLogsServiceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes an ExportLogsServiceResponse message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} ExportLogsServiceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportLogsServiceResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.partialSuccess = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an ExportLogsServiceResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} ExportLogsServiceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportLogsServiceResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an ExportLogsServiceResponse message. - * @function verify - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportLogsServiceResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) { - var error = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(message.partialSuccess); - if (error) - return "partialSuccess." + error; - } - return null; - }; - /** - * Creates an ExportLogsServiceResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} ExportLogsServiceResponse - */ - ExportLogsServiceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse) - return object; - var message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse(); - if (object.partialSuccess != null) { - if (typeof object.partialSuccess !== "object") - throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected"); - message.partialSuccess = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(object.partialSuccess); - } - return message; - }; - /** - * Creates a plain object from an ExportLogsServiceResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse - * @static - * @param {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} message ExportLogsServiceResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportLogsServiceResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.partialSuccess = null; - if (message.partialSuccess != null && message.hasOwnProperty("partialSuccess")) - object.partialSuccess = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(message.partialSuccess, options); - return object; - }; - /** - * Converts this ExportLogsServiceResponse to JSON. - * @function toJSON - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse - * @instance - * @returns {Object.} JSON object - */ - ExportLogsServiceResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ExportLogsServiceResponse - * @function getTypeUrl - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportLogsServiceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"; - }; - return ExportLogsServiceResponse; - })(); - v1.ExportLogsPartialSuccess = (function () { - /** - * Properties of an ExportLogsPartialSuccess. - * @memberof opentelemetry.proto.collector.logs.v1 - * @interface IExportLogsPartialSuccess - * @property {number|Long|null} [rejectedLogRecords] ExportLogsPartialSuccess rejectedLogRecords - * @property {string|null} [errorMessage] ExportLogsPartialSuccess errorMessage - */ - /** - * Constructs a new ExportLogsPartialSuccess. - * @memberof opentelemetry.proto.collector.logs.v1 - * @classdesc Represents an ExportLogsPartialSuccess. - * @implements IExportLogsPartialSuccess - * @constructor - * @param {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess=} [properties] Properties to set - */ - function ExportLogsPartialSuccess(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ExportLogsPartialSuccess rejectedLogRecords. - * @member {number|Long|null|undefined} rejectedLogRecords - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess - * @instance - */ - ExportLogsPartialSuccess.prototype.rejectedLogRecords = null; - /** - * ExportLogsPartialSuccess errorMessage. - * @member {string|null|undefined} errorMessage - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess - * @instance - */ - ExportLogsPartialSuccess.prototype.errorMessage = null; - /** - * Creates a new ExportLogsPartialSuccess instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess - * @static - * @param {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess=} [properties] Properties to set - * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} ExportLogsPartialSuccess instance - */ - ExportLogsPartialSuccess.create = function create(properties) { - return new ExportLogsPartialSuccess(properties); - }; - /** - * Encodes the specified ExportLogsPartialSuccess message. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess - * @static - * @param {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess} message ExportLogsPartialSuccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportLogsPartialSuccess.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rejectedLogRecords != null && Object.hasOwnProperty.call(message, "rejectedLogRecords")) - writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.rejectedLogRecords); - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.errorMessage); - return writer; - }; - /** - * Encodes the specified ExportLogsPartialSuccess message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess - * @static - * @param {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess} message ExportLogsPartialSuccess message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExportLogsPartialSuccess.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes an ExportLogsPartialSuccess message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} ExportLogsPartialSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportLogsPartialSuccess.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rejectedLogRecords = reader.int64(); - break; - } - case 2: { - message.errorMessage = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an ExportLogsPartialSuccess message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} ExportLogsPartialSuccess - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExportLogsPartialSuccess.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an ExportLogsPartialSuccess message. - * @function verify - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExportLogsPartialSuccess.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rejectedLogRecords != null && message.hasOwnProperty("rejectedLogRecords")) - if (!$util.isInteger(message.rejectedLogRecords) && !(message.rejectedLogRecords && $util.isInteger(message.rejectedLogRecords.low) && $util.isInteger(message.rejectedLogRecords.high))) - return "rejectedLogRecords: integer|Long expected"; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - if (!$util.isString(message.errorMessage)) - return "errorMessage: string expected"; - return null; - }; - /** - * Creates an ExportLogsPartialSuccess message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} ExportLogsPartialSuccess - */ - ExportLogsPartialSuccess.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess) - return object; - var message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess(); - if (object.rejectedLogRecords != null) - if ($util.Long) - (message.rejectedLogRecords = $util.Long.fromValue(object.rejectedLogRecords)).unsigned = false; - else if (typeof object.rejectedLogRecords === "string") - message.rejectedLogRecords = parseInt(object.rejectedLogRecords, 10); - else if (typeof object.rejectedLogRecords === "number") - message.rejectedLogRecords = object.rejectedLogRecords; - else if (typeof object.rejectedLogRecords === "object") - message.rejectedLogRecords = new $util.LongBits(object.rejectedLogRecords.low >>> 0, object.rejectedLogRecords.high >>> 0).toNumber(); - if (object.errorMessage != null) - message.errorMessage = String(object.errorMessage); - return message; - }; - /** - * Creates a plain object from an ExportLogsPartialSuccess message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess - * @static - * @param {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} message ExportLogsPartialSuccess - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportLogsPartialSuccess.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.rejectedLogRecords = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.rejectedLogRecords = options.longs === String ? "0" : 0; - object.errorMessage = ""; - } - if (message.rejectedLogRecords != null && message.hasOwnProperty("rejectedLogRecords")) - if (typeof message.rejectedLogRecords === "number") - object.rejectedLogRecords = options.longs === String ? String(message.rejectedLogRecords) : message.rejectedLogRecords; - else - object.rejectedLogRecords = options.longs === String ? $util.Long.prototype.toString.call(message.rejectedLogRecords) : options.longs === Number ? new $util.LongBits(message.rejectedLogRecords.low >>> 0, message.rejectedLogRecords.high >>> 0).toNumber() : message.rejectedLogRecords; - if (message.errorMessage != null && message.hasOwnProperty("errorMessage")) - object.errorMessage = message.errorMessage; - return object; - }; - /** - * Converts this ExportLogsPartialSuccess to JSON. - * @function toJSON - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess - * @instance - * @returns {Object.} JSON object - */ - ExportLogsPartialSuccess.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ExportLogsPartialSuccess - * @function getTypeUrl - * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExportLogsPartialSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"; - }; - return ExportLogsPartialSuccess; - })(); - return v1; - })(); - return logs; - })(); - return collector; - })(); - proto.metrics = (function () { - /** - * Namespace metrics. - * @memberof opentelemetry.proto - * @namespace - */ - var metrics = {}; - metrics.v1 = (function () { - /** - * Namespace v1. - * @memberof opentelemetry.proto.metrics - * @namespace - */ - var v1 = {}; - v1.MetricsData = (function () { - /** - * Properties of a MetricsData. - * @memberof opentelemetry.proto.metrics.v1 - * @interface IMetricsData - * @property {Array.|null} [resourceMetrics] MetricsData resourceMetrics - */ - /** - * Constructs a new MetricsData. - * @memberof opentelemetry.proto.metrics.v1 - * @classdesc Represents a MetricsData. - * @implements IMetricsData - * @constructor - * @param {opentelemetry.proto.metrics.v1.IMetricsData=} [properties] Properties to set - */ - function MetricsData(properties) { - this.resourceMetrics = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * MetricsData resourceMetrics. - * @member {Array.} resourceMetrics - * @memberof opentelemetry.proto.metrics.v1.MetricsData - * @instance - */ - MetricsData.prototype.resourceMetrics = $util.emptyArray; - /** - * Creates a new MetricsData instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.metrics.v1.MetricsData - * @static - * @param {opentelemetry.proto.metrics.v1.IMetricsData=} [properties] Properties to set - * @returns {opentelemetry.proto.metrics.v1.MetricsData} MetricsData instance - */ - MetricsData.create = function create(properties) { - return new MetricsData(properties); - }; - /** - * Encodes the specified MetricsData message. Does not implicitly {@link opentelemetry.proto.metrics.v1.MetricsData.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.metrics.v1.MetricsData - * @static - * @param {opentelemetry.proto.metrics.v1.IMetricsData} message MetricsData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricsData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceMetrics != null && message.resourceMetrics.length) - for (var i = 0; i < message.resourceMetrics.length; ++i) - $root.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(message.resourceMetrics[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified MetricsData message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.MetricsData.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.metrics.v1.MetricsData - * @static - * @param {opentelemetry.proto.metrics.v1.IMetricsData} message MetricsData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricsData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a MetricsData message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.metrics.v1.MetricsData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.metrics.v1.MetricsData} MetricsData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricsData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.MetricsData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.resourceMetrics && message.resourceMetrics.length)) - message.resourceMetrics = []; - message.resourceMetrics.push($root.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a MetricsData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.metrics.v1.MetricsData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.metrics.v1.MetricsData} MetricsData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricsData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a MetricsData message. - * @function verify - * @memberof opentelemetry.proto.metrics.v1.MetricsData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricsData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceMetrics != null && message.hasOwnProperty("resourceMetrics")) { - if (!Array.isArray(message.resourceMetrics)) - return "resourceMetrics: array expected"; - for (var i = 0; i < message.resourceMetrics.length; ++i) { - var error = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(message.resourceMetrics[i]); - if (error) - return "resourceMetrics." + error; - } - } - return null; - }; - /** - * Creates a MetricsData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.metrics.v1.MetricsData - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.metrics.v1.MetricsData} MetricsData - */ - MetricsData.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.metrics.v1.MetricsData) - return object; - var message = new $root.opentelemetry.proto.metrics.v1.MetricsData(); - if (object.resourceMetrics) { - if (!Array.isArray(object.resourceMetrics)) - throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected"); - message.resourceMetrics = []; - for (var i = 0; i < object.resourceMetrics.length; ++i) { - if (typeof object.resourceMetrics[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected"); - message.resourceMetrics[i] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(object.resourceMetrics[i]); - } - } - return message; - }; - /** - * Creates a plain object from a MetricsData message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.metrics.v1.MetricsData - * @static - * @param {opentelemetry.proto.metrics.v1.MetricsData} message MetricsData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricsData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceMetrics = []; - if (message.resourceMetrics && message.resourceMetrics.length) { - object.resourceMetrics = []; - for (var j = 0; j < message.resourceMetrics.length; ++j) - object.resourceMetrics[j] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(message.resourceMetrics[j], options); - } - return object; - }; - /** - * Converts this MetricsData to JSON. - * @function toJSON - * @memberof opentelemetry.proto.metrics.v1.MetricsData - * @instance - * @returns {Object.} JSON object - */ - MetricsData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for MetricsData - * @function getTypeUrl - * @memberof opentelemetry.proto.metrics.v1.MetricsData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetricsData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.MetricsData"; - }; - return MetricsData; - })(); - v1.ResourceMetrics = (function () { - /** - * Properties of a ResourceMetrics. - * @memberof opentelemetry.proto.metrics.v1 - * @interface IResourceMetrics - * @property {opentelemetry.proto.resource.v1.IResource|null} [resource] ResourceMetrics resource - * @property {Array.|null} [scopeMetrics] ResourceMetrics scopeMetrics - * @property {string|null} [schemaUrl] ResourceMetrics schemaUrl - */ - /** - * Constructs a new ResourceMetrics. - * @memberof opentelemetry.proto.metrics.v1 - * @classdesc Represents a ResourceMetrics. - * @implements IResourceMetrics - * @constructor - * @param {opentelemetry.proto.metrics.v1.IResourceMetrics=} [properties] Properties to set - */ - function ResourceMetrics(properties) { - this.scopeMetrics = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ResourceMetrics resource. - * @member {opentelemetry.proto.resource.v1.IResource|null|undefined} resource - * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics - * @instance - */ - ResourceMetrics.prototype.resource = null; - /** - * ResourceMetrics scopeMetrics. - * @member {Array.} scopeMetrics - * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics - * @instance - */ - ResourceMetrics.prototype.scopeMetrics = $util.emptyArray; - /** - * ResourceMetrics schemaUrl. - * @member {string|null|undefined} schemaUrl - * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics - * @instance - */ - ResourceMetrics.prototype.schemaUrl = null; - /** - * Creates a new ResourceMetrics instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics - * @static - * @param {opentelemetry.proto.metrics.v1.IResourceMetrics=} [properties] Properties to set - * @returns {opentelemetry.proto.metrics.v1.ResourceMetrics} ResourceMetrics instance - */ - ResourceMetrics.create = function create(properties) { - return new ResourceMetrics(properties); - }; - /** - * Encodes the specified ResourceMetrics message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ResourceMetrics.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics - * @static - * @param {opentelemetry.proto.metrics.v1.IResourceMetrics} message ResourceMetrics message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceMetrics.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.opentelemetry.proto.resource.v1.Resource.encode(message.resource, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - if (message.scopeMetrics != null && message.scopeMetrics.length) - for (var i = 0; i < message.scopeMetrics.length; ++i) - $root.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(message.scopeMetrics[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); - if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); - return writer; - }; - /** - * Encodes the specified ResourceMetrics message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ResourceMetrics.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics - * @static - * @param {opentelemetry.proto.metrics.v1.IResourceMetrics} message ResourceMetrics message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceMetrics.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a ResourceMetrics message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.metrics.v1.ResourceMetrics} ResourceMetrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceMetrics.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ResourceMetrics(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = $root.opentelemetry.proto.resource.v1.Resource.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.scopeMetrics && message.scopeMetrics.length)) - message.scopeMetrics = []; - message.scopeMetrics.push($root.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(reader, reader.uint32())); - break; - } - case 3: { - message.schemaUrl = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a ResourceMetrics message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.metrics.v1.ResourceMetrics} ResourceMetrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceMetrics.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a ResourceMetrics message. - * @function verify - * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceMetrics.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.opentelemetry.proto.resource.v1.Resource.verify(message.resource); - if (error) - return "resource." + error; - } - if (message.scopeMetrics != null && message.hasOwnProperty("scopeMetrics")) { - if (!Array.isArray(message.scopeMetrics)) - return "scopeMetrics: array expected"; - for (var i = 0; i < message.scopeMetrics.length; ++i) { - var error = $root.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(message.scopeMetrics[i]); - if (error) - return "scopeMetrics." + error; - } - } - if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) - if (!$util.isString(message.schemaUrl)) - return "schemaUrl: string expected"; - return null; - }; - /** - * Creates a ResourceMetrics message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.metrics.v1.ResourceMetrics} ResourceMetrics - */ - ResourceMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.metrics.v1.ResourceMetrics) - return object; - var message = new $root.opentelemetry.proto.metrics.v1.ResourceMetrics(); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected"); - message.resource = $root.opentelemetry.proto.resource.v1.Resource.fromObject(object.resource); - } - if (object.scopeMetrics) { - if (!Array.isArray(object.scopeMetrics)) - throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected"); - message.scopeMetrics = []; - for (var i = 0; i < object.scopeMetrics.length; ++i) { - if (typeof object.scopeMetrics[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected"); - message.scopeMetrics[i] = $root.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(object.scopeMetrics[i]); - } - } - if (object.schemaUrl != null) - message.schemaUrl = String(object.schemaUrl); - return message; - }; - /** - * Creates a plain object from a ResourceMetrics message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics - * @static - * @param {opentelemetry.proto.metrics.v1.ResourceMetrics} message ResourceMetrics - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceMetrics.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.scopeMetrics = []; - if (options.defaults) { - object.resource = null; - object.schemaUrl = ""; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource, options); - if (message.scopeMetrics && message.scopeMetrics.length) { - object.scopeMetrics = []; - for (var j = 0; j < message.scopeMetrics.length; ++j) - object.scopeMetrics[j] = $root.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(message.scopeMetrics[j], options); - } - if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) - object.schemaUrl = message.schemaUrl; - return object; - }; - /** - * Converts this ResourceMetrics to JSON. - * @function toJSON - * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics - * @instance - * @returns {Object.} JSON object - */ - ResourceMetrics.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ResourceMetrics - * @function getTypeUrl - * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.ResourceMetrics"; - }; - return ResourceMetrics; - })(); - v1.ScopeMetrics = (function () { - /** - * Properties of a ScopeMetrics. - * @memberof opentelemetry.proto.metrics.v1 - * @interface IScopeMetrics - * @property {opentelemetry.proto.common.v1.IInstrumentationScope|null} [scope] ScopeMetrics scope - * @property {Array.|null} [metrics] ScopeMetrics metrics - * @property {string|null} [schemaUrl] ScopeMetrics schemaUrl - */ - /** - * Constructs a new ScopeMetrics. - * @memberof opentelemetry.proto.metrics.v1 - * @classdesc Represents a ScopeMetrics. - * @implements IScopeMetrics - * @constructor - * @param {opentelemetry.proto.metrics.v1.IScopeMetrics=} [properties] Properties to set - */ - function ScopeMetrics(properties) { - this.metrics = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ScopeMetrics scope. - * @member {opentelemetry.proto.common.v1.IInstrumentationScope|null|undefined} scope - * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics - * @instance - */ - ScopeMetrics.prototype.scope = null; - /** - * ScopeMetrics metrics. - * @member {Array.} metrics - * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics - * @instance - */ - ScopeMetrics.prototype.metrics = $util.emptyArray; - /** - * ScopeMetrics schemaUrl. - * @member {string|null|undefined} schemaUrl - * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics - * @instance - */ - ScopeMetrics.prototype.schemaUrl = null; - /** - * Creates a new ScopeMetrics instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics - * @static - * @param {opentelemetry.proto.metrics.v1.IScopeMetrics=} [properties] Properties to set - * @returns {opentelemetry.proto.metrics.v1.ScopeMetrics} ScopeMetrics instance - */ - ScopeMetrics.create = function create(properties) { - return new ScopeMetrics(properties); - }; - /** - * Encodes the specified ScopeMetrics message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ScopeMetrics.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics - * @static - * @param {opentelemetry.proto.metrics.v1.IScopeMetrics} message ScopeMetrics message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScopeMetrics.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - $root.opentelemetry.proto.common.v1.InstrumentationScope.encode(message.scope, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.opentelemetry.proto.metrics.v1.Metric.encode(message.metrics[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); - if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); - return writer; - }; - /** - * Encodes the specified ScopeMetrics message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ScopeMetrics.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics - * @static - * @param {opentelemetry.proto.metrics.v1.IScopeMetrics} message ScopeMetrics message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScopeMetrics.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a ScopeMetrics message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.metrics.v1.ScopeMetrics} ScopeMetrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScopeMetrics.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ScopeMetrics(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.opentelemetry.proto.metrics.v1.Metric.decode(reader, reader.uint32())); - break; - } - case 3: { - message.schemaUrl = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a ScopeMetrics message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.metrics.v1.ScopeMetrics} ScopeMetrics - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScopeMetrics.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a ScopeMetrics message. - * @function verify - * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ScopeMetrics.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scope != null && message.hasOwnProperty("scope")) { - var error = $root.opentelemetry.proto.common.v1.InstrumentationScope.verify(message.scope); - if (error) - return "scope." + error; - } - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.opentelemetry.proto.metrics.v1.Metric.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) - if (!$util.isString(message.schemaUrl)) - return "schemaUrl: string expected"; - return null; - }; - /** - * Creates a ScopeMetrics message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.metrics.v1.ScopeMetrics} ScopeMetrics - */ - ScopeMetrics.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.metrics.v1.ScopeMetrics) - return object; - var message = new $root.opentelemetry.proto.metrics.v1.ScopeMetrics(); - if (object.scope != null) { - if (typeof object.scope !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected"); - message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(object.scope); - } - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected"); - message.metrics[i] = $root.opentelemetry.proto.metrics.v1.Metric.fromObject(object.metrics[i]); - } - } - if (object.schemaUrl != null) - message.schemaUrl = String(object.schemaUrl); - return message; - }; - /** - * Creates a plain object from a ScopeMetrics message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics - * @static - * @param {opentelemetry.proto.metrics.v1.ScopeMetrics} message ScopeMetrics - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ScopeMetrics.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.metrics = []; - if (options.defaults) { - object.scope = null; - object.schemaUrl = ""; - } - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope, options); - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.opentelemetry.proto.metrics.v1.Metric.toObject(message.metrics[j], options); - } - if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) - object.schemaUrl = message.schemaUrl; - return object; - }; - /** - * Converts this ScopeMetrics to JSON. - * @function toJSON - * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics - * @instance - * @returns {Object.} JSON object - */ - ScopeMetrics.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ScopeMetrics - * @function getTypeUrl - * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ScopeMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.ScopeMetrics"; - }; - return ScopeMetrics; - })(); - v1.Metric = (function () { - /** - * Properties of a Metric. - * @memberof opentelemetry.proto.metrics.v1 - * @interface IMetric - * @property {string|null} [name] Metric name - * @property {string|null} [description] Metric description - * @property {string|null} [unit] Metric unit - * @property {opentelemetry.proto.metrics.v1.IGauge|null} [gauge] Metric gauge - * @property {opentelemetry.proto.metrics.v1.ISum|null} [sum] Metric sum - * @property {opentelemetry.proto.metrics.v1.IHistogram|null} [histogram] Metric histogram - * @property {opentelemetry.proto.metrics.v1.IExponentialHistogram|null} [exponentialHistogram] Metric exponentialHistogram - * @property {opentelemetry.proto.metrics.v1.ISummary|null} [summary] Metric summary - */ - /** - * Constructs a new Metric. - * @memberof opentelemetry.proto.metrics.v1 - * @classdesc Represents a Metric. - * @implements IMetric - * @constructor - * @param {opentelemetry.proto.metrics.v1.IMetric=} [properties] Properties to set - */ - function Metric(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * Metric name. - * @member {string|null|undefined} name - * @memberof opentelemetry.proto.metrics.v1.Metric - * @instance - */ - Metric.prototype.name = null; - /** - * Metric description. - * @member {string|null|undefined} description - * @memberof opentelemetry.proto.metrics.v1.Metric - * @instance - */ - Metric.prototype.description = null; - /** - * Metric unit. - * @member {string|null|undefined} unit - * @memberof opentelemetry.proto.metrics.v1.Metric - * @instance - */ - Metric.prototype.unit = null; - /** - * Metric gauge. - * @member {opentelemetry.proto.metrics.v1.IGauge|null|undefined} gauge - * @memberof opentelemetry.proto.metrics.v1.Metric - * @instance - */ - Metric.prototype.gauge = null; - /** - * Metric sum. - * @member {opentelemetry.proto.metrics.v1.ISum|null|undefined} sum - * @memberof opentelemetry.proto.metrics.v1.Metric - * @instance - */ - Metric.prototype.sum = null; - /** - * Metric histogram. - * @member {opentelemetry.proto.metrics.v1.IHistogram|null|undefined} histogram - * @memberof opentelemetry.proto.metrics.v1.Metric - * @instance - */ - Metric.prototype.histogram = null; - /** - * Metric exponentialHistogram. - * @member {opentelemetry.proto.metrics.v1.IExponentialHistogram|null|undefined} exponentialHistogram - * @memberof opentelemetry.proto.metrics.v1.Metric - * @instance - */ - Metric.prototype.exponentialHistogram = null; - /** - * Metric summary. - * @member {opentelemetry.proto.metrics.v1.ISummary|null|undefined} summary - * @memberof opentelemetry.proto.metrics.v1.Metric - * @instance - */ - Metric.prototype.summary = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - /** - * Metric data. - * @member {"gauge"|"sum"|"histogram"|"exponentialHistogram"|"summary"|undefined} data - * @memberof opentelemetry.proto.metrics.v1.Metric - * @instance - */ - Object.defineProperty(Metric.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["gauge", "sum", "histogram", "exponentialHistogram", "summary"]), - set: $util.oneOfSetter($oneOfFields) - }); - /** - * Creates a new Metric instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.metrics.v1.Metric - * @static - * @param {opentelemetry.proto.metrics.v1.IMetric=} [properties] Properties to set - * @returns {opentelemetry.proto.metrics.v1.Metric} Metric instance - */ - Metric.create = function create(properties) { - return new Metric(properties); - }; - /** - * Encodes the specified Metric message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Metric.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.metrics.v1.Metric - * @static - * @param {opentelemetry.proto.metrics.v1.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.description); - if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.unit); - if (message.gauge != null && Object.hasOwnProperty.call(message, "gauge")) - $root.opentelemetry.proto.metrics.v1.Gauge.encode(message.gauge, writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim(); - if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) - $root.opentelemetry.proto.metrics.v1.Sum.encode(message.sum, writer.uint32(/* id 7, wireType 2 =*/ 58).fork()).ldelim(); - if (message.histogram != null && Object.hasOwnProperty.call(message, "histogram")) - $root.opentelemetry.proto.metrics.v1.Histogram.encode(message.histogram, writer.uint32(/* id 9, wireType 2 =*/ 74).fork()).ldelim(); - if (message.exponentialHistogram != null && Object.hasOwnProperty.call(message, "exponentialHistogram")) - $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(message.exponentialHistogram, writer.uint32(/* id 10, wireType 2 =*/ 82).fork()).ldelim(); - if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) - $root.opentelemetry.proto.metrics.v1.Summary.encode(message.summary, writer.uint32(/* id 11, wireType 2 =*/ 90).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Metric.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.metrics.v1.Metric - * @static - * @param {opentelemetry.proto.metrics.v1.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a Metric message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.metrics.v1.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.metrics.v1.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Metric(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.unit = reader.string(); - break; - } - case 5: { - message.gauge = $root.opentelemetry.proto.metrics.v1.Gauge.decode(reader, reader.uint32()); - break; - } - case 7: { - message.sum = $root.opentelemetry.proto.metrics.v1.Sum.decode(reader, reader.uint32()); - break; - } - case 9: { - message.histogram = $root.opentelemetry.proto.metrics.v1.Histogram.decode(reader, reader.uint32()); - break; - } - case 10: { - message.exponentialHistogram = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(reader, reader.uint32()); - break; - } - case 11: { - message.summary = $root.opentelemetry.proto.metrics.v1.Summary.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.metrics.v1.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.metrics.v1.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a Metric message. - * @function verify - * @memberof opentelemetry.proto.metrics.v1.Metric - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metric.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.unit != null && message.hasOwnProperty("unit")) - if (!$util.isString(message.unit)) - return "unit: string expected"; - if (message.gauge != null && message.hasOwnProperty("gauge")) { - properties.data = 1; - { - var error = $root.opentelemetry.proto.metrics.v1.Gauge.verify(message.gauge); - if (error) - return "gauge." + error; - } - } - if (message.sum != null && message.hasOwnProperty("sum")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.opentelemetry.proto.metrics.v1.Sum.verify(message.sum); - if (error) - return "sum." + error; - } - } - if (message.histogram != null && message.hasOwnProperty("histogram")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.opentelemetry.proto.metrics.v1.Histogram.verify(message.histogram); - if (error) - return "histogram." + error; - } - } - if (message.exponentialHistogram != null && message.hasOwnProperty("exponentialHistogram")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(message.exponentialHistogram); - if (error) - return "exponentialHistogram." + error; - } - } - if (message.summary != null && message.hasOwnProperty("summary")) { - if (properties.data === 1) - return "data: multiple values"; - properties.data = 1; - { - var error = $root.opentelemetry.proto.metrics.v1.Summary.verify(message.summary); - if (error) - return "summary." + error; - } - } - return null; - }; - /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.metrics.v1.Metric - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.metrics.v1.Metric} Metric - */ - Metric.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.metrics.v1.Metric) - return object; - var message = new $root.opentelemetry.proto.metrics.v1.Metric(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.unit != null) - message.unit = String(object.unit); - if (object.gauge != null) { - if (typeof object.gauge !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected"); - message.gauge = $root.opentelemetry.proto.metrics.v1.Gauge.fromObject(object.gauge); - } - if (object.sum != null) { - if (typeof object.sum !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected"); - message.sum = $root.opentelemetry.proto.metrics.v1.Sum.fromObject(object.sum); - } - if (object.histogram != null) { - if (typeof object.histogram !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected"); - message.histogram = $root.opentelemetry.proto.metrics.v1.Histogram.fromObject(object.histogram); - } - if (object.exponentialHistogram != null) { - if (typeof object.exponentialHistogram !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected"); - message.exponentialHistogram = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(object.exponentialHistogram); - } - if (object.summary != null) { - if (typeof object.summary !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected"); - message.summary = $root.opentelemetry.proto.metrics.v1.Summary.fromObject(object.summary); - } - return message; - }; - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.metrics.v1.Metric - * @static - * @param {opentelemetry.proto.metrics.v1.Metric} message Metric - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metric.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.unit = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.unit != null && message.hasOwnProperty("unit")) - object.unit = message.unit; - if (message.gauge != null && message.hasOwnProperty("gauge")) { - object.gauge = $root.opentelemetry.proto.metrics.v1.Gauge.toObject(message.gauge, options); - if (options.oneofs) - object.data = "gauge"; - } - if (message.sum != null && message.hasOwnProperty("sum")) { - object.sum = $root.opentelemetry.proto.metrics.v1.Sum.toObject(message.sum, options); - if (options.oneofs) - object.data = "sum"; - } - if (message.histogram != null && message.hasOwnProperty("histogram")) { - object.histogram = $root.opentelemetry.proto.metrics.v1.Histogram.toObject(message.histogram, options); - if (options.oneofs) - object.data = "histogram"; - } - if (message.exponentialHistogram != null && message.hasOwnProperty("exponentialHistogram")) { - object.exponentialHistogram = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(message.exponentialHistogram, options); - if (options.oneofs) - object.data = "exponentialHistogram"; - } - if (message.summary != null && message.hasOwnProperty("summary")) { - object.summary = $root.opentelemetry.proto.metrics.v1.Summary.toObject(message.summary, options); - if (options.oneofs) - object.data = "summary"; - } - return object; - }; - /** - * Converts this Metric to JSON. - * @function toJSON - * @memberof opentelemetry.proto.metrics.v1.Metric - * @instance - * @returns {Object.} JSON object - */ - Metric.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for Metric - * @function getTypeUrl - * @memberof opentelemetry.proto.metrics.v1.Metric - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Metric"; - }; - return Metric; - })(); - v1.Gauge = (function () { - /** - * Properties of a Gauge. - * @memberof opentelemetry.proto.metrics.v1 - * @interface IGauge - * @property {Array.|null} [dataPoints] Gauge dataPoints - */ - /** - * Constructs a new Gauge. - * @memberof opentelemetry.proto.metrics.v1 - * @classdesc Represents a Gauge. - * @implements IGauge - * @constructor - * @param {opentelemetry.proto.metrics.v1.IGauge=} [properties] Properties to set - */ - function Gauge(properties) { - this.dataPoints = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * Gauge dataPoints. - * @member {Array.} dataPoints - * @memberof opentelemetry.proto.metrics.v1.Gauge - * @instance - */ - Gauge.prototype.dataPoints = $util.emptyArray; - /** - * Creates a new Gauge instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.metrics.v1.Gauge - * @static - * @param {opentelemetry.proto.metrics.v1.IGauge=} [properties] Properties to set - * @returns {opentelemetry.proto.metrics.v1.Gauge} Gauge instance - */ - Gauge.create = function create(properties) { - return new Gauge(properties); - }; - /** - * Encodes the specified Gauge message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Gauge.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.metrics.v1.Gauge - * @static - * @param {opentelemetry.proto.metrics.v1.IGauge} message Gauge message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Gauge.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataPoints != null && message.dataPoints.length) - for (var i = 0; i < message.dataPoints.length; ++i) - $root.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified Gauge message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Gauge.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.metrics.v1.Gauge - * @static - * @param {opentelemetry.proto.metrics.v1.IGauge} message Gauge message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Gauge.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a Gauge message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.metrics.v1.Gauge - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.metrics.v1.Gauge} Gauge - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Gauge.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Gauge(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.dataPoints && message.dataPoints.length)) - message.dataPoints = []; - message.dataPoints.push($root.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a Gauge message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.metrics.v1.Gauge - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.metrics.v1.Gauge} Gauge - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Gauge.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a Gauge message. - * @function verify - * @memberof opentelemetry.proto.metrics.v1.Gauge - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Gauge.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { - if (!Array.isArray(message.dataPoints)) - return "dataPoints: array expected"; - for (var i = 0; i < message.dataPoints.length; ++i) { - var error = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(message.dataPoints[i]); - if (error) - return "dataPoints." + error; - } - } - return null; - }; - /** - * Creates a Gauge message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.metrics.v1.Gauge - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.metrics.v1.Gauge} Gauge - */ - Gauge.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.metrics.v1.Gauge) - return object; - var message = new $root.opentelemetry.proto.metrics.v1.Gauge(); - if (object.dataPoints) { - if (!Array.isArray(object.dataPoints)) - throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected"); - message.dataPoints = []; - for (var i = 0; i < object.dataPoints.length; ++i) { - if (typeof object.dataPoints[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected"); - message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(object.dataPoints[i]); - } - } - return message; - }; - /** - * Creates a plain object from a Gauge message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.metrics.v1.Gauge - * @static - * @param {opentelemetry.proto.metrics.v1.Gauge} message Gauge - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Gauge.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dataPoints = []; - if (message.dataPoints && message.dataPoints.length) { - object.dataPoints = []; - for (var j = 0; j < message.dataPoints.length; ++j) - object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(message.dataPoints[j], options); - } - return object; - }; - /** - * Converts this Gauge to JSON. - * @function toJSON - * @memberof opentelemetry.proto.metrics.v1.Gauge - * @instance - * @returns {Object.} JSON object - */ - Gauge.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for Gauge - * @function getTypeUrl - * @memberof opentelemetry.proto.metrics.v1.Gauge - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Gauge.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Gauge"; - }; - return Gauge; - })(); - v1.Sum = (function () { - /** - * Properties of a Sum. - * @memberof opentelemetry.proto.metrics.v1 - * @interface ISum - * @property {Array.|null} [dataPoints] Sum dataPoints - * @property {opentelemetry.proto.metrics.v1.AggregationTemporality|null} [aggregationTemporality] Sum aggregationTemporality - * @property {boolean|null} [isMonotonic] Sum isMonotonic - */ - /** - * Constructs a new Sum. - * @memberof opentelemetry.proto.metrics.v1 - * @classdesc Represents a Sum. - * @implements ISum - * @constructor - * @param {opentelemetry.proto.metrics.v1.ISum=} [properties] Properties to set - */ - function Sum(properties) { - this.dataPoints = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * Sum dataPoints. - * @member {Array.} dataPoints - * @memberof opentelemetry.proto.metrics.v1.Sum - * @instance - */ - Sum.prototype.dataPoints = $util.emptyArray; - /** - * Sum aggregationTemporality. - * @member {opentelemetry.proto.metrics.v1.AggregationTemporality|null|undefined} aggregationTemporality - * @memberof opentelemetry.proto.metrics.v1.Sum - * @instance - */ - Sum.prototype.aggregationTemporality = null; - /** - * Sum isMonotonic. - * @member {boolean|null|undefined} isMonotonic - * @memberof opentelemetry.proto.metrics.v1.Sum - * @instance - */ - Sum.prototype.isMonotonic = null; - /** - * Creates a new Sum instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.metrics.v1.Sum - * @static - * @param {opentelemetry.proto.metrics.v1.ISum=} [properties] Properties to set - * @returns {opentelemetry.proto.metrics.v1.Sum} Sum instance - */ - Sum.create = function create(properties) { - return new Sum(properties); - }; - /** - * Encodes the specified Sum message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Sum.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.metrics.v1.Sum - * @static - * @param {opentelemetry.proto.metrics.v1.ISum} message Sum message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Sum.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataPoints != null && message.dataPoints.length) - for (var i = 0; i < message.dataPoints.length; ++i) - $root.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - if (message.aggregationTemporality != null && Object.hasOwnProperty.call(message, "aggregationTemporality")) - writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.aggregationTemporality); - if (message.isMonotonic != null && Object.hasOwnProperty.call(message, "isMonotonic")) - writer.uint32(/* id 3, wireType 0 =*/ 24).bool(message.isMonotonic); - return writer; - }; - /** - * Encodes the specified Sum message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Sum.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.metrics.v1.Sum - * @static - * @param {opentelemetry.proto.metrics.v1.ISum} message Sum message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Sum.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a Sum message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.metrics.v1.Sum - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.metrics.v1.Sum} Sum - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Sum.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Sum(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.dataPoints && message.dataPoints.length)) - message.dataPoints = []; - message.dataPoints.push($root.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(reader, reader.uint32())); - break; - } - case 2: { - message.aggregationTemporality = reader.int32(); - break; - } - case 3: { - message.isMonotonic = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a Sum message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.metrics.v1.Sum - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.metrics.v1.Sum} Sum - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Sum.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a Sum message. - * @function verify - * @memberof opentelemetry.proto.metrics.v1.Sum - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Sum.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { - if (!Array.isArray(message.dataPoints)) - return "dataPoints: array expected"; - for (var i = 0; i < message.dataPoints.length; ++i) { - var error = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(message.dataPoints[i]); - if (error) - return "dataPoints." + error; - } - } - if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) - switch (message.aggregationTemporality) { - default: - return "aggregationTemporality: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.isMonotonic != null && message.hasOwnProperty("isMonotonic")) - if (typeof message.isMonotonic !== "boolean") - return "isMonotonic: boolean expected"; - return null; - }; - /** - * Creates a Sum message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.metrics.v1.Sum - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.metrics.v1.Sum} Sum - */ - Sum.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.metrics.v1.Sum) - return object; - var message = new $root.opentelemetry.proto.metrics.v1.Sum(); - if (object.dataPoints) { - if (!Array.isArray(object.dataPoints)) - throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected"); - message.dataPoints = []; - for (var i = 0; i < object.dataPoints.length; ++i) { - if (typeof object.dataPoints[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected"); - message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(object.dataPoints[i]); - } - } - switch (object.aggregationTemporality) { - default: - if (typeof object.aggregationTemporality === "number") { - message.aggregationTemporality = object.aggregationTemporality; - break; - } - break; - case "AGGREGATION_TEMPORALITY_UNSPECIFIED": - case 0: - message.aggregationTemporality = 0; - break; - case "AGGREGATION_TEMPORALITY_DELTA": - case 1: - message.aggregationTemporality = 1; - break; - case "AGGREGATION_TEMPORALITY_CUMULATIVE": - case 2: - message.aggregationTemporality = 2; - break; - } - if (object.isMonotonic != null) - message.isMonotonic = Boolean(object.isMonotonic); - return message; - }; - /** - * Creates a plain object from a Sum message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.metrics.v1.Sum - * @static - * @param {opentelemetry.proto.metrics.v1.Sum} message Sum - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Sum.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dataPoints = []; - if (options.defaults) { - object.aggregationTemporality = options.enums === String ? "AGGREGATION_TEMPORALITY_UNSPECIFIED" : 0; - object.isMonotonic = false; - } - if (message.dataPoints && message.dataPoints.length) { - object.dataPoints = []; - for (var j = 0; j < message.dataPoints.length; ++j) - object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(message.dataPoints[j], options); - } - if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) - object.aggregationTemporality = options.enums === String ? $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] === undefined ? message.aggregationTemporality : $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] : message.aggregationTemporality; - if (message.isMonotonic != null && message.hasOwnProperty("isMonotonic")) - object.isMonotonic = message.isMonotonic; - return object; - }; - /** - * Converts this Sum to JSON. - * @function toJSON - * @memberof opentelemetry.proto.metrics.v1.Sum - * @instance - * @returns {Object.} JSON object - */ - Sum.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for Sum - * @function getTypeUrl - * @memberof opentelemetry.proto.metrics.v1.Sum - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Sum.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Sum"; - }; - return Sum; - })(); - v1.Histogram = (function () { - /** - * Properties of a Histogram. - * @memberof opentelemetry.proto.metrics.v1 - * @interface IHistogram - * @property {Array.|null} [dataPoints] Histogram dataPoints - * @property {opentelemetry.proto.metrics.v1.AggregationTemporality|null} [aggregationTemporality] Histogram aggregationTemporality - */ - /** - * Constructs a new Histogram. - * @memberof opentelemetry.proto.metrics.v1 - * @classdesc Represents a Histogram. - * @implements IHistogram - * @constructor - * @param {opentelemetry.proto.metrics.v1.IHistogram=} [properties] Properties to set - */ - function Histogram(properties) { - this.dataPoints = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * Histogram dataPoints. - * @member {Array.} dataPoints - * @memberof opentelemetry.proto.metrics.v1.Histogram - * @instance - */ - Histogram.prototype.dataPoints = $util.emptyArray; - /** - * Histogram aggregationTemporality. - * @member {opentelemetry.proto.metrics.v1.AggregationTemporality|null|undefined} aggregationTemporality - * @memberof opentelemetry.proto.metrics.v1.Histogram - * @instance - */ - Histogram.prototype.aggregationTemporality = null; - /** - * Creates a new Histogram instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.metrics.v1.Histogram - * @static - * @param {opentelemetry.proto.metrics.v1.IHistogram=} [properties] Properties to set - * @returns {opentelemetry.proto.metrics.v1.Histogram} Histogram instance - */ - Histogram.create = function create(properties) { - return new Histogram(properties); - }; - /** - * Encodes the specified Histogram message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Histogram.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.metrics.v1.Histogram - * @static - * @param {opentelemetry.proto.metrics.v1.IHistogram} message Histogram message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Histogram.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataPoints != null && message.dataPoints.length) - for (var i = 0; i < message.dataPoints.length; ++i) - $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - if (message.aggregationTemporality != null && Object.hasOwnProperty.call(message, "aggregationTemporality")) - writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.aggregationTemporality); - return writer; - }; - /** - * Encodes the specified Histogram message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Histogram.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.metrics.v1.Histogram - * @static - * @param {opentelemetry.proto.metrics.v1.IHistogram} message Histogram message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Histogram.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a Histogram message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.metrics.v1.Histogram - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.metrics.v1.Histogram} Histogram - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Histogram.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Histogram(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.dataPoints && message.dataPoints.length)) - message.dataPoints = []; - message.dataPoints.push($root.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(reader, reader.uint32())); - break; - } - case 2: { - message.aggregationTemporality = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a Histogram message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.metrics.v1.Histogram - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.metrics.v1.Histogram} Histogram - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Histogram.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a Histogram message. - * @function verify - * @memberof opentelemetry.proto.metrics.v1.Histogram - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Histogram.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { - if (!Array.isArray(message.dataPoints)) - return "dataPoints: array expected"; - for (var i = 0; i < message.dataPoints.length; ++i) { - var error = $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(message.dataPoints[i]); - if (error) - return "dataPoints." + error; - } - } - if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) - switch (message.aggregationTemporality) { - default: - return "aggregationTemporality: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - /** - * Creates a Histogram message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.metrics.v1.Histogram - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.metrics.v1.Histogram} Histogram - */ - Histogram.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.metrics.v1.Histogram) - return object; - var message = new $root.opentelemetry.proto.metrics.v1.Histogram(); - if (object.dataPoints) { - if (!Array.isArray(object.dataPoints)) - throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected"); - message.dataPoints = []; - for (var i = 0; i < object.dataPoints.length; ++i) { - if (typeof object.dataPoints[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected"); - message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(object.dataPoints[i]); - } - } - switch (object.aggregationTemporality) { - default: - if (typeof object.aggregationTemporality === "number") { - message.aggregationTemporality = object.aggregationTemporality; - break; - } - break; - case "AGGREGATION_TEMPORALITY_UNSPECIFIED": - case 0: - message.aggregationTemporality = 0; - break; - case "AGGREGATION_TEMPORALITY_DELTA": - case 1: - message.aggregationTemporality = 1; - break; - case "AGGREGATION_TEMPORALITY_CUMULATIVE": - case 2: - message.aggregationTemporality = 2; - break; - } - return message; - }; - /** - * Creates a plain object from a Histogram message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.metrics.v1.Histogram - * @static - * @param {opentelemetry.proto.metrics.v1.Histogram} message Histogram - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Histogram.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dataPoints = []; - if (options.defaults) - object.aggregationTemporality = options.enums === String ? "AGGREGATION_TEMPORALITY_UNSPECIFIED" : 0; - if (message.dataPoints && message.dataPoints.length) { - object.dataPoints = []; - for (var j = 0; j < message.dataPoints.length; ++j) - object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(message.dataPoints[j], options); - } - if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) - object.aggregationTemporality = options.enums === String ? $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] === undefined ? message.aggregationTemporality : $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] : message.aggregationTemporality; - return object; - }; - /** - * Converts this Histogram to JSON. - * @function toJSON - * @memberof opentelemetry.proto.metrics.v1.Histogram - * @instance - * @returns {Object.} JSON object - */ - Histogram.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for Histogram - * @function getTypeUrl - * @memberof opentelemetry.proto.metrics.v1.Histogram - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Histogram.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Histogram"; - }; - return Histogram; - })(); - v1.ExponentialHistogram = (function () { - /** - * Properties of an ExponentialHistogram. - * @memberof opentelemetry.proto.metrics.v1 - * @interface IExponentialHistogram - * @property {Array.|null} [dataPoints] ExponentialHistogram dataPoints - * @property {opentelemetry.proto.metrics.v1.AggregationTemporality|null} [aggregationTemporality] ExponentialHistogram aggregationTemporality - */ - /** - * Constructs a new ExponentialHistogram. - * @memberof opentelemetry.proto.metrics.v1 - * @classdesc Represents an ExponentialHistogram. - * @implements IExponentialHistogram - * @constructor - * @param {opentelemetry.proto.metrics.v1.IExponentialHistogram=} [properties] Properties to set - */ - function ExponentialHistogram(properties) { - this.dataPoints = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ExponentialHistogram dataPoints. - * @member {Array.} dataPoints - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram - * @instance - */ - ExponentialHistogram.prototype.dataPoints = $util.emptyArray; - /** - * ExponentialHistogram aggregationTemporality. - * @member {opentelemetry.proto.metrics.v1.AggregationTemporality|null|undefined} aggregationTemporality - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram - * @instance - */ - ExponentialHistogram.prototype.aggregationTemporality = null; - /** - * Creates a new ExponentialHistogram instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram - * @static - * @param {opentelemetry.proto.metrics.v1.IExponentialHistogram=} [properties] Properties to set - * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogram} ExponentialHistogram instance - */ - ExponentialHistogram.create = function create(properties) { - return new ExponentialHistogram(properties); - }; - /** - * Encodes the specified ExponentialHistogram message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogram.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram - * @static - * @param {opentelemetry.proto.metrics.v1.IExponentialHistogram} message ExponentialHistogram message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExponentialHistogram.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataPoints != null && message.dataPoints.length) - for (var i = 0; i < message.dataPoints.length; ++i) - $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - if (message.aggregationTemporality != null && Object.hasOwnProperty.call(message, "aggregationTemporality")) - writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.aggregationTemporality); - return writer; - }; - /** - * Encodes the specified ExponentialHistogram message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogram.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram - * @static - * @param {opentelemetry.proto.metrics.v1.IExponentialHistogram} message ExponentialHistogram message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExponentialHistogram.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes an ExponentialHistogram message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogram} ExponentialHistogram - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExponentialHistogram.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogram(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.dataPoints && message.dataPoints.length)) - message.dataPoints = []; - message.dataPoints.push($root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(reader, reader.uint32())); - break; - } - case 2: { - message.aggregationTemporality = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an ExponentialHistogram message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogram} ExponentialHistogram - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExponentialHistogram.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an ExponentialHistogram message. - * @function verify - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExponentialHistogram.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { - if (!Array.isArray(message.dataPoints)) - return "dataPoints: array expected"; - for (var i = 0; i < message.dataPoints.length; ++i) { - var error = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(message.dataPoints[i]); - if (error) - return "dataPoints." + error; - } - } - if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) - switch (message.aggregationTemporality) { - default: - return "aggregationTemporality: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - /** - * Creates an ExponentialHistogram message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogram} ExponentialHistogram - */ - ExponentialHistogram.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.metrics.v1.ExponentialHistogram) - return object; - var message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogram(); - if (object.dataPoints) { - if (!Array.isArray(object.dataPoints)) - throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected"); - message.dataPoints = []; - for (var i = 0; i < object.dataPoints.length; ++i) { - if (typeof object.dataPoints[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected"); - message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(object.dataPoints[i]); - } - } - switch (object.aggregationTemporality) { - default: - if (typeof object.aggregationTemporality === "number") { - message.aggregationTemporality = object.aggregationTemporality; - break; - } - break; - case "AGGREGATION_TEMPORALITY_UNSPECIFIED": - case 0: - message.aggregationTemporality = 0; - break; - case "AGGREGATION_TEMPORALITY_DELTA": - case 1: - message.aggregationTemporality = 1; - break; - case "AGGREGATION_TEMPORALITY_CUMULATIVE": - case 2: - message.aggregationTemporality = 2; - break; - } - return message; - }; - /** - * Creates a plain object from an ExponentialHistogram message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram - * @static - * @param {opentelemetry.proto.metrics.v1.ExponentialHistogram} message ExponentialHistogram - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExponentialHistogram.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dataPoints = []; - if (options.defaults) - object.aggregationTemporality = options.enums === String ? "AGGREGATION_TEMPORALITY_UNSPECIFIED" : 0; - if (message.dataPoints && message.dataPoints.length) { - object.dataPoints = []; - for (var j = 0; j < message.dataPoints.length; ++j) - object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(message.dataPoints[j], options); - } - if (message.aggregationTemporality != null && message.hasOwnProperty("aggregationTemporality")) - object.aggregationTemporality = options.enums === String ? $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] === undefined ? message.aggregationTemporality : $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] : message.aggregationTemporality; - return object; - }; - /** - * Converts this ExponentialHistogram to JSON. - * @function toJSON - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram - * @instance - * @returns {Object.} JSON object - */ - ExponentialHistogram.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ExponentialHistogram - * @function getTypeUrl - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExponentialHistogram.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.ExponentialHistogram"; - }; - return ExponentialHistogram; - })(); - v1.Summary = (function () { - /** - * Properties of a Summary. - * @memberof opentelemetry.proto.metrics.v1 - * @interface ISummary - * @property {Array.|null} [dataPoints] Summary dataPoints - */ - /** - * Constructs a new Summary. - * @memberof opentelemetry.proto.metrics.v1 - * @classdesc Represents a Summary. - * @implements ISummary - * @constructor - * @param {opentelemetry.proto.metrics.v1.ISummary=} [properties] Properties to set - */ - function Summary(properties) { - this.dataPoints = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * Summary dataPoints. - * @member {Array.} dataPoints - * @memberof opentelemetry.proto.metrics.v1.Summary - * @instance - */ - Summary.prototype.dataPoints = $util.emptyArray; - /** - * Creates a new Summary instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.metrics.v1.Summary - * @static - * @param {opentelemetry.proto.metrics.v1.ISummary=} [properties] Properties to set - * @returns {opentelemetry.proto.metrics.v1.Summary} Summary instance - */ - Summary.create = function create(properties) { - return new Summary(properties); - }; - /** - * Encodes the specified Summary message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Summary.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.metrics.v1.Summary - * @static - * @param {opentelemetry.proto.metrics.v1.ISummary} message Summary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Summary.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataPoints != null && message.dataPoints.length) - for (var i = 0; i < message.dataPoints.length; ++i) - $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified Summary message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Summary.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.metrics.v1.Summary - * @static - * @param {opentelemetry.proto.metrics.v1.ISummary} message Summary message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Summary.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a Summary message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.metrics.v1.Summary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.metrics.v1.Summary} Summary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Summary.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Summary(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.dataPoints && message.dataPoints.length)) - message.dataPoints = []; - message.dataPoints.push($root.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a Summary message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.metrics.v1.Summary - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.metrics.v1.Summary} Summary - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Summary.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a Summary message. - * @function verify - * @memberof opentelemetry.proto.metrics.v1.Summary - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Summary.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataPoints != null && message.hasOwnProperty("dataPoints")) { - if (!Array.isArray(message.dataPoints)) - return "dataPoints: array expected"; - for (var i = 0; i < message.dataPoints.length; ++i) { - var error = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(message.dataPoints[i]); - if (error) - return "dataPoints." + error; - } - } - return null; - }; - /** - * Creates a Summary message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.metrics.v1.Summary - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.metrics.v1.Summary} Summary - */ - Summary.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.metrics.v1.Summary) - return object; - var message = new $root.opentelemetry.proto.metrics.v1.Summary(); - if (object.dataPoints) { - if (!Array.isArray(object.dataPoints)) - throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected"); - message.dataPoints = []; - for (var i = 0; i < object.dataPoints.length; ++i) { - if (typeof object.dataPoints[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected"); - message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(object.dataPoints[i]); - } - } - return message; - }; - /** - * Creates a plain object from a Summary message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.metrics.v1.Summary - * @static - * @param {opentelemetry.proto.metrics.v1.Summary} message Summary - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Summary.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.dataPoints = []; - if (message.dataPoints && message.dataPoints.length) { - object.dataPoints = []; - for (var j = 0; j < message.dataPoints.length; ++j) - object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(message.dataPoints[j], options); - } - return object; - }; - /** - * Converts this Summary to JSON. - * @function toJSON - * @memberof opentelemetry.proto.metrics.v1.Summary - * @instance - * @returns {Object.} JSON object - */ - Summary.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for Summary - * @function getTypeUrl - * @memberof opentelemetry.proto.metrics.v1.Summary - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Summary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Summary"; - }; - return Summary; - })(); - /** - * AggregationTemporality enum. - * @name opentelemetry.proto.metrics.v1.AggregationTemporality - * @enum {number} - * @property {number} AGGREGATION_TEMPORALITY_UNSPECIFIED=0 AGGREGATION_TEMPORALITY_UNSPECIFIED value - * @property {number} AGGREGATION_TEMPORALITY_DELTA=1 AGGREGATION_TEMPORALITY_DELTA value - * @property {number} AGGREGATION_TEMPORALITY_CUMULATIVE=2 AGGREGATION_TEMPORALITY_CUMULATIVE value - */ - v1.AggregationTemporality = (function () { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AGGREGATION_TEMPORALITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "AGGREGATION_TEMPORALITY_DELTA"] = 1; - values[valuesById[2] = "AGGREGATION_TEMPORALITY_CUMULATIVE"] = 2; - return values; - })(); - /** - * DataPointFlags enum. - * @name opentelemetry.proto.metrics.v1.DataPointFlags - * @enum {number} - * @property {number} DATA_POINT_FLAGS_DO_NOT_USE=0 DATA_POINT_FLAGS_DO_NOT_USE value - * @property {number} DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK=1 DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK value - */ - v1.DataPointFlags = (function () { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATA_POINT_FLAGS_DO_NOT_USE"] = 0; - values[valuesById[1] = "DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"] = 1; - return values; - })(); - v1.NumberDataPoint = (function () { - /** - * Properties of a NumberDataPoint. - * @memberof opentelemetry.proto.metrics.v1 - * @interface INumberDataPoint - * @property {Array.|null} [attributes] NumberDataPoint attributes - * @property {number|Long|null} [startTimeUnixNano] NumberDataPoint startTimeUnixNano - * @property {number|Long|null} [timeUnixNano] NumberDataPoint timeUnixNano - * @property {number|null} [asDouble] NumberDataPoint asDouble - * @property {number|Long|null} [asInt] NumberDataPoint asInt - * @property {Array.|null} [exemplars] NumberDataPoint exemplars - * @property {number|null} [flags] NumberDataPoint flags - */ - /** - * Constructs a new NumberDataPoint. - * @memberof opentelemetry.proto.metrics.v1 - * @classdesc Represents a NumberDataPoint. - * @implements INumberDataPoint - * @constructor - * @param {opentelemetry.proto.metrics.v1.INumberDataPoint=} [properties] Properties to set - */ - function NumberDataPoint(properties) { - this.attributes = []; - this.exemplars = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * NumberDataPoint attributes. - * @member {Array.} attributes - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @instance - */ - NumberDataPoint.prototype.attributes = $util.emptyArray; - /** - * NumberDataPoint startTimeUnixNano. - * @member {number|Long|null|undefined} startTimeUnixNano - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @instance - */ - NumberDataPoint.prototype.startTimeUnixNano = null; - /** - * NumberDataPoint timeUnixNano. - * @member {number|Long|null|undefined} timeUnixNano - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @instance - */ - NumberDataPoint.prototype.timeUnixNano = null; - /** - * NumberDataPoint asDouble. - * @member {number|null|undefined} asDouble - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @instance - */ - NumberDataPoint.prototype.asDouble = null; - /** - * NumberDataPoint asInt. - * @member {number|Long|null|undefined} asInt - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @instance - */ - NumberDataPoint.prototype.asInt = null; - /** - * NumberDataPoint exemplars. - * @member {Array.} exemplars - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @instance - */ - NumberDataPoint.prototype.exemplars = $util.emptyArray; - /** - * NumberDataPoint flags. - * @member {number|null|undefined} flags - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @instance - */ - NumberDataPoint.prototype.flags = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - /** - * NumberDataPoint value. - * @member {"asDouble"|"asInt"|undefined} value - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @instance - */ - Object.defineProperty(NumberDataPoint.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["asDouble", "asInt"]), - set: $util.oneOfSetter($oneOfFields) - }); - /** - * Creates a new NumberDataPoint instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @static - * @param {opentelemetry.proto.metrics.v1.INumberDataPoint=} [properties] Properties to set - * @returns {opentelemetry.proto.metrics.v1.NumberDataPoint} NumberDataPoint instance - */ - NumberDataPoint.create = function create(properties) { - return new NumberDataPoint(properties); - }; - /** - * Encodes the specified NumberDataPoint message. Does not implicitly {@link opentelemetry.proto.metrics.v1.NumberDataPoint.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @static - * @param {opentelemetry.proto.metrics.v1.INumberDataPoint} message NumberDataPoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NumberDataPoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, "startTimeUnixNano")) - writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.startTimeUnixNano); - if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) - writer.uint32(/* id 3, wireType 1 =*/ 25).fixed64(message.timeUnixNano); - if (message.asDouble != null && Object.hasOwnProperty.call(message, "asDouble")) - writer.uint32(/* id 4, wireType 1 =*/ 33).double(message.asDouble); - if (message.exemplars != null && message.exemplars.length) - for (var i = 0; i < message.exemplars.length; ++i) - $root.opentelemetry.proto.metrics.v1.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim(); - if (message.asInt != null && Object.hasOwnProperty.call(message, "asInt")) - writer.uint32(/* id 6, wireType 1 =*/ 49).sfixed64(message.asInt); - if (message.attributes != null && message.attributes.length) - for (var i = 0; i < message.attributes.length; ++i) - $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 7, wireType 2 =*/ 58).fork()).ldelim(); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) - writer.uint32(/* id 8, wireType 0 =*/ 64).uint32(message.flags); - return writer; - }; - /** - * Encodes the specified NumberDataPoint message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.NumberDataPoint.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @static - * @param {opentelemetry.proto.metrics.v1.INumberDataPoint} message NumberDataPoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NumberDataPoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a NumberDataPoint message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.metrics.v1.NumberDataPoint} NumberDataPoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NumberDataPoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.NumberDataPoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 7: { - if (!(message.attributes && message.attributes.length)) - message.attributes = []; - message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); - break; - } - case 2: { - message.startTimeUnixNano = reader.fixed64(); - break; - } - case 3: { - message.timeUnixNano = reader.fixed64(); - break; - } - case 4: { - message.asDouble = reader.double(); - break; - } - case 6: { - message.asInt = reader.sfixed64(); - break; - } - case 5: { - if (!(message.exemplars && message.exemplars.length)) - message.exemplars = []; - message.exemplars.push($root.opentelemetry.proto.metrics.v1.Exemplar.decode(reader, reader.uint32())); - break; - } - case 8: { - message.flags = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a NumberDataPoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.metrics.v1.NumberDataPoint} NumberDataPoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NumberDataPoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a NumberDataPoint message. - * @function verify - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NumberDataPoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!Array.isArray(message.attributes)) - return "attributes: array expected"; - for (var i = 0; i < message.attributes.length; ++i) { - var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); - if (error) - return "attributes." + error; - } - } - if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) - if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high))) - return "startTimeUnixNano: integer|Long expected"; - if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) - if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) - return "timeUnixNano: integer|Long expected"; - if (message.asDouble != null && message.hasOwnProperty("asDouble")) { - properties.value = 1; - if (typeof message.asDouble !== "number") - return "asDouble: number expected"; - } - if (message.asInt != null && message.hasOwnProperty("asInt")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!$util.isInteger(message.asInt) && !(message.asInt && $util.isInteger(message.asInt.low) && $util.isInteger(message.asInt.high))) - return "asInt: integer|Long expected"; - } - if (message.exemplars != null && message.hasOwnProperty("exemplars")) { - if (!Array.isArray(message.exemplars)) - return "exemplars: array expected"; - for (var i = 0; i < message.exemplars.length; ++i) { - var error = $root.opentelemetry.proto.metrics.v1.Exemplar.verify(message.exemplars[i]); - if (error) - return "exemplars." + error; - } - } - if (message.flags != null && message.hasOwnProperty("flags")) - if (!$util.isInteger(message.flags)) - return "flags: integer expected"; - return null; - }; - /** - * Creates a NumberDataPoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.metrics.v1.NumberDataPoint} NumberDataPoint - */ - NumberDataPoint.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.metrics.v1.NumberDataPoint) - return object; - var message = new $root.opentelemetry.proto.metrics.v1.NumberDataPoint(); - if (object.attributes) { - if (!Array.isArray(object.attributes)) - throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected"); - message.attributes = []; - for (var i = 0; i < object.attributes.length; ++i) { - if (typeof object.attributes[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected"); - message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); - } - } - if (object.startTimeUnixNano != null) - if ($util.Long) - (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false; - else if (typeof object.startTimeUnixNano === "string") - message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10); - else if (typeof object.startTimeUnixNano === "number") - message.startTimeUnixNano = object.startTimeUnixNano; - else if (typeof object.startTimeUnixNano === "object") - message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber(); - if (object.timeUnixNano != null) - if ($util.Long) - (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; - else if (typeof object.timeUnixNano === "string") - message.timeUnixNano = parseInt(object.timeUnixNano, 10); - else if (typeof object.timeUnixNano === "number") - message.timeUnixNano = object.timeUnixNano; - else if (typeof object.timeUnixNano === "object") - message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); - if (object.asDouble != null) - message.asDouble = Number(object.asDouble); - if (object.asInt != null) - if ($util.Long) - (message.asInt = $util.Long.fromValue(object.asInt)).unsigned = false; - else if (typeof object.asInt === "string") - message.asInt = parseInt(object.asInt, 10); - else if (typeof object.asInt === "number") - message.asInt = object.asInt; - else if (typeof object.asInt === "object") - message.asInt = new $util.LongBits(object.asInt.low >>> 0, object.asInt.high >>> 0).toNumber(); - if (object.exemplars) { - if (!Array.isArray(object.exemplars)) - throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected"); - message.exemplars = []; - for (var i = 0; i < object.exemplars.length; ++i) { - if (typeof object.exemplars[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected"); - message.exemplars[i] = $root.opentelemetry.proto.metrics.v1.Exemplar.fromObject(object.exemplars[i]); - } - } - if (object.flags != null) - message.flags = object.flags >>> 0; - return message; - }; - /** - * Creates a plain object from a NumberDataPoint message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @static - * @param {opentelemetry.proto.metrics.v1.NumberDataPoint} message NumberDataPoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NumberDataPoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.exemplars = []; - object.attributes = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.startTimeUnixNano = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.timeUnixNano = options.longs === String ? "0" : 0; - object.flags = 0; - } - if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) - if (typeof message.startTimeUnixNano === "number") - object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano; - else - object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano; - if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) - if (typeof message.timeUnixNano === "number") - object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; - else - object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; - if (message.asDouble != null && message.hasOwnProperty("asDouble")) { - object.asDouble = options.json && !isFinite(message.asDouble) ? String(message.asDouble) : message.asDouble; - if (options.oneofs) - object.value = "asDouble"; - } - if (message.exemplars && message.exemplars.length) { - object.exemplars = []; - for (var j = 0; j < message.exemplars.length; ++j) - object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j], options); - } - if (message.asInt != null && message.hasOwnProperty("asInt")) { - if (typeof message.asInt === "number") - object.asInt = options.longs === String ? String(message.asInt) : message.asInt; - else - object.asInt = options.longs === String ? $util.Long.prototype.toString.call(message.asInt) : options.longs === Number ? new $util.LongBits(message.asInt.low >>> 0, message.asInt.high >>> 0).toNumber() : message.asInt; - if (options.oneofs) - object.value = "asInt"; - } - if (message.attributes && message.attributes.length) { - object.attributes = []; - for (var j = 0; j < message.attributes.length; ++j) - object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); - } - if (message.flags != null && message.hasOwnProperty("flags")) - object.flags = message.flags; - return object; - }; - /** - * Converts this NumberDataPoint to JSON. - * @function toJSON - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @instance - * @returns {Object.} JSON object - */ - NumberDataPoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for NumberDataPoint - * @function getTypeUrl - * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NumberDataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.NumberDataPoint"; - }; - return NumberDataPoint; - })(); - v1.HistogramDataPoint = (function () { - /** - * Properties of a HistogramDataPoint. - * @memberof opentelemetry.proto.metrics.v1 - * @interface IHistogramDataPoint - * @property {Array.|null} [attributes] HistogramDataPoint attributes - * @property {number|Long|null} [startTimeUnixNano] HistogramDataPoint startTimeUnixNano - * @property {number|Long|null} [timeUnixNano] HistogramDataPoint timeUnixNano - * @property {number|Long|null} [count] HistogramDataPoint count - * @property {number|null} [sum] HistogramDataPoint sum - * @property {Array.|null} [bucketCounts] HistogramDataPoint bucketCounts - * @property {Array.|null} [explicitBounds] HistogramDataPoint explicitBounds - * @property {Array.|null} [exemplars] HistogramDataPoint exemplars - * @property {number|null} [flags] HistogramDataPoint flags - * @property {number|null} [min] HistogramDataPoint min - * @property {number|null} [max] HistogramDataPoint max - */ - /** - * Constructs a new HistogramDataPoint. - * @memberof opentelemetry.proto.metrics.v1 - * @classdesc Represents a HistogramDataPoint. - * @implements IHistogramDataPoint - * @constructor - * @param {opentelemetry.proto.metrics.v1.IHistogramDataPoint=} [properties] Properties to set - */ - function HistogramDataPoint(properties) { - this.attributes = []; - this.bucketCounts = []; - this.explicitBounds = []; - this.exemplars = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * HistogramDataPoint attributes. - * @member {Array.} attributes - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @instance - */ - HistogramDataPoint.prototype.attributes = $util.emptyArray; - /** - * HistogramDataPoint startTimeUnixNano. - * @member {number|Long|null|undefined} startTimeUnixNano - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @instance - */ - HistogramDataPoint.prototype.startTimeUnixNano = null; - /** - * HistogramDataPoint timeUnixNano. - * @member {number|Long|null|undefined} timeUnixNano - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @instance - */ - HistogramDataPoint.prototype.timeUnixNano = null; - /** - * HistogramDataPoint count. - * @member {number|Long|null|undefined} count - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @instance - */ - HistogramDataPoint.prototype.count = null; - /** - * HistogramDataPoint sum. - * @member {number|null|undefined} sum - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @instance - */ - HistogramDataPoint.prototype.sum = null; - /** - * HistogramDataPoint bucketCounts. - * @member {Array.} bucketCounts - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @instance - */ - HistogramDataPoint.prototype.bucketCounts = $util.emptyArray; - /** - * HistogramDataPoint explicitBounds. - * @member {Array.} explicitBounds - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @instance - */ - HistogramDataPoint.prototype.explicitBounds = $util.emptyArray; - /** - * HistogramDataPoint exemplars. - * @member {Array.} exemplars - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @instance - */ - HistogramDataPoint.prototype.exemplars = $util.emptyArray; - /** - * HistogramDataPoint flags. - * @member {number|null|undefined} flags - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @instance - */ - HistogramDataPoint.prototype.flags = null; - /** - * HistogramDataPoint min. - * @member {number|null|undefined} min - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @instance - */ - HistogramDataPoint.prototype.min = null; - /** - * HistogramDataPoint max. - * @member {number|null|undefined} max - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @instance - */ - HistogramDataPoint.prototype.max = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - /** - * HistogramDataPoint _sum. - * @member {"sum"|undefined} _sum - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @instance - */ - Object.defineProperty(HistogramDataPoint.prototype, "_sum", { - get: $util.oneOfGetter($oneOfFields = ["sum"]), - set: $util.oneOfSetter($oneOfFields) - }); - /** - * HistogramDataPoint _min. - * @member {"min"|undefined} _min - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @instance - */ - Object.defineProperty(HistogramDataPoint.prototype, "_min", { - get: $util.oneOfGetter($oneOfFields = ["min"]), - set: $util.oneOfSetter($oneOfFields) - }); - /** - * HistogramDataPoint _max. - * @member {"max"|undefined} _max - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @instance - */ - Object.defineProperty(HistogramDataPoint.prototype, "_max", { - get: $util.oneOfGetter($oneOfFields = ["max"]), - set: $util.oneOfSetter($oneOfFields) - }); - /** - * Creates a new HistogramDataPoint instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @static - * @param {opentelemetry.proto.metrics.v1.IHistogramDataPoint=} [properties] Properties to set - * @returns {opentelemetry.proto.metrics.v1.HistogramDataPoint} HistogramDataPoint instance - */ - HistogramDataPoint.create = function create(properties) { - return new HistogramDataPoint(properties); - }; - /** - * Encodes the specified HistogramDataPoint message. Does not implicitly {@link opentelemetry.proto.metrics.v1.HistogramDataPoint.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @static - * @param {opentelemetry.proto.metrics.v1.IHistogramDataPoint} message HistogramDataPoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HistogramDataPoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, "startTimeUnixNano")) - writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.startTimeUnixNano); - if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) - writer.uint32(/* id 3, wireType 1 =*/ 25).fixed64(message.timeUnixNano); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 4, wireType 1 =*/ 33).fixed64(message.count); - if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) - writer.uint32(/* id 5, wireType 1 =*/ 41).double(message.sum); - if (message.bucketCounts != null && message.bucketCounts.length) { - writer.uint32(/* id 6, wireType 2 =*/ 50).fork(); - for (var i = 0; i < message.bucketCounts.length; ++i) - writer.fixed64(message.bucketCounts[i]); - writer.ldelim(); - } - if (message.explicitBounds != null && message.explicitBounds.length) { - writer.uint32(/* id 7, wireType 2 =*/ 58).fork(); - for (var i = 0; i < message.explicitBounds.length; ++i) - writer.double(message.explicitBounds[i]); - writer.ldelim(); - } - if (message.exemplars != null && message.exemplars.length) - for (var i = 0; i < message.exemplars.length; ++i) - $root.opentelemetry.proto.metrics.v1.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 8, wireType 2 =*/ 66).fork()).ldelim(); - if (message.attributes != null && message.attributes.length) - for (var i = 0; i < message.attributes.length; ++i) - $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 9, wireType 2 =*/ 74).fork()).ldelim(); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) - writer.uint32(/* id 10, wireType 0 =*/ 80).uint32(message.flags); - if (message.min != null && Object.hasOwnProperty.call(message, "min")) - writer.uint32(/* id 11, wireType 1 =*/ 89).double(message.min); - if (message.max != null && Object.hasOwnProperty.call(message, "max")) - writer.uint32(/* id 12, wireType 1 =*/ 97).double(message.max); - return writer; - }; - /** - * Encodes the specified HistogramDataPoint message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.HistogramDataPoint.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @static - * @param {opentelemetry.proto.metrics.v1.IHistogramDataPoint} message HistogramDataPoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HistogramDataPoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a HistogramDataPoint message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.metrics.v1.HistogramDataPoint} HistogramDataPoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HistogramDataPoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.HistogramDataPoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 9: { - if (!(message.attributes && message.attributes.length)) - message.attributes = []; - message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); - break; - } - case 2: { - message.startTimeUnixNano = reader.fixed64(); - break; - } - case 3: { - message.timeUnixNano = reader.fixed64(); - break; - } - case 4: { - message.count = reader.fixed64(); - break; - } - case 5: { - message.sum = reader.double(); - break; - } - case 6: { - if (!(message.bucketCounts && message.bucketCounts.length)) - message.bucketCounts = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.bucketCounts.push(reader.fixed64()); - } - else - message.bucketCounts.push(reader.fixed64()); - break; - } - case 7: { - if (!(message.explicitBounds && message.explicitBounds.length)) - message.explicitBounds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.explicitBounds.push(reader.double()); - } - else - message.explicitBounds.push(reader.double()); - break; - } - case 8: { - if (!(message.exemplars && message.exemplars.length)) - message.exemplars = []; - message.exemplars.push($root.opentelemetry.proto.metrics.v1.Exemplar.decode(reader, reader.uint32())); - break; - } - case 10: { - message.flags = reader.uint32(); - break; - } - case 11: { - message.min = reader.double(); - break; - } - case 12: { - message.max = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a HistogramDataPoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.metrics.v1.HistogramDataPoint} HistogramDataPoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HistogramDataPoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a HistogramDataPoint message. - * @function verify - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HistogramDataPoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!Array.isArray(message.attributes)) - return "attributes: array expected"; - for (var i = 0; i < message.attributes.length; ++i) { - var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); - if (error) - return "attributes." + error; - } - } - if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) - if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high))) - return "startTimeUnixNano: integer|Long expected"; - if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) - if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) - return "timeUnixNano: integer|Long expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - if (message.sum != null && message.hasOwnProperty("sum")) { - properties._sum = 1; - if (typeof message.sum !== "number") - return "sum: number expected"; - } - if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { - if (!Array.isArray(message.bucketCounts)) - return "bucketCounts: array expected"; - for (var i = 0; i < message.bucketCounts.length; ++i) - if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) - return "bucketCounts: integer|Long[] expected"; - } - if (message.explicitBounds != null && message.hasOwnProperty("explicitBounds")) { - if (!Array.isArray(message.explicitBounds)) - return "explicitBounds: array expected"; - for (var i = 0; i < message.explicitBounds.length; ++i) - if (typeof message.explicitBounds[i] !== "number") - return "explicitBounds: number[] expected"; - } - if (message.exemplars != null && message.hasOwnProperty("exemplars")) { - if (!Array.isArray(message.exemplars)) - return "exemplars: array expected"; - for (var i = 0; i < message.exemplars.length; ++i) { - var error = $root.opentelemetry.proto.metrics.v1.Exemplar.verify(message.exemplars[i]); - if (error) - return "exemplars." + error; - } - } - if (message.flags != null && message.hasOwnProperty("flags")) - if (!$util.isInteger(message.flags)) - return "flags: integer expected"; - if (message.min != null && message.hasOwnProperty("min")) { - properties._min = 1; - if (typeof message.min !== "number") - return "min: number expected"; - } - if (message.max != null && message.hasOwnProperty("max")) { - properties._max = 1; - if (typeof message.max !== "number") - return "max: number expected"; - } - return null; - }; - /** - * Creates a HistogramDataPoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.metrics.v1.HistogramDataPoint} HistogramDataPoint - */ - HistogramDataPoint.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.metrics.v1.HistogramDataPoint) - return object; - var message = new $root.opentelemetry.proto.metrics.v1.HistogramDataPoint(); - if (object.attributes) { - if (!Array.isArray(object.attributes)) - throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected"); - message.attributes = []; - for (var i = 0; i < object.attributes.length; ++i) { - if (typeof object.attributes[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected"); - message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); - } - } - if (object.startTimeUnixNano != null) - if ($util.Long) - (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false; - else if (typeof object.startTimeUnixNano === "string") - message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10); - else if (typeof object.startTimeUnixNano === "number") - message.startTimeUnixNano = object.startTimeUnixNano; - else if (typeof object.startTimeUnixNano === "object") - message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber(); - if (object.timeUnixNano != null) - if ($util.Long) - (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; - else if (typeof object.timeUnixNano === "string") - message.timeUnixNano = parseInt(object.timeUnixNano, 10); - else if (typeof object.timeUnixNano === "number") - message.timeUnixNano = object.timeUnixNano; - else if (typeof object.timeUnixNano === "object") - message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - if (object.sum != null) - message.sum = Number(object.sum); - if (object.bucketCounts) { - if (!Array.isArray(object.bucketCounts)) - throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected"); - message.bucketCounts = []; - for (var i = 0; i < object.bucketCounts.length; ++i) - if ($util.Long) - (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; - else if (typeof object.bucketCounts[i] === "string") - message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); - else if (typeof object.bucketCounts[i] === "number") - message.bucketCounts[i] = object.bucketCounts[i]; - else if (typeof object.bucketCounts[i] === "object") - message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); - } - if (object.explicitBounds) { - if (!Array.isArray(object.explicitBounds)) - throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected"); - message.explicitBounds = []; - for (var i = 0; i < object.explicitBounds.length; ++i) - message.explicitBounds[i] = Number(object.explicitBounds[i]); - } - if (object.exemplars) { - if (!Array.isArray(object.exemplars)) - throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected"); - message.exemplars = []; - for (var i = 0; i < object.exemplars.length; ++i) { - if (typeof object.exemplars[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected"); - message.exemplars[i] = $root.opentelemetry.proto.metrics.v1.Exemplar.fromObject(object.exemplars[i]); - } - } - if (object.flags != null) - message.flags = object.flags >>> 0; - if (object.min != null) - message.min = Number(object.min); - if (object.max != null) - message.max = Number(object.max); - return message; - }; - /** - * Creates a plain object from a HistogramDataPoint message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @static - * @param {opentelemetry.proto.metrics.v1.HistogramDataPoint} message HistogramDataPoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HistogramDataPoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.bucketCounts = []; - object.explicitBounds = []; - object.exemplars = []; - object.attributes = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.startTimeUnixNano = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.timeUnixNano = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.count = options.longs === String ? "0" : 0; - object.flags = 0; - } - if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) - if (typeof message.startTimeUnixNano === "number") - object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano; - else - object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano; - if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) - if (typeof message.timeUnixNano === "number") - object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; - else - object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - if (message.sum != null && message.hasOwnProperty("sum")) { - object.sum = options.json && !isFinite(message.sum) ? String(message.sum) : message.sum; - if (options.oneofs) - object._sum = "sum"; - } - if (message.bucketCounts && message.bucketCounts.length) { - object.bucketCounts = []; - for (var j = 0; j < message.bucketCounts.length; ++j) - if (typeof message.bucketCounts[j] === "number") - object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; - else - object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; - } - if (message.explicitBounds && message.explicitBounds.length) { - object.explicitBounds = []; - for (var j = 0; j < message.explicitBounds.length; ++j) - object.explicitBounds[j] = options.json && !isFinite(message.explicitBounds[j]) ? String(message.explicitBounds[j]) : message.explicitBounds[j]; - } - if (message.exemplars && message.exemplars.length) { - object.exemplars = []; - for (var j = 0; j < message.exemplars.length; ++j) - object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j], options); - } - if (message.attributes && message.attributes.length) { - object.attributes = []; - for (var j = 0; j < message.attributes.length; ++j) - object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); - } - if (message.flags != null && message.hasOwnProperty("flags")) - object.flags = message.flags; - if (message.min != null && message.hasOwnProperty("min")) { - object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; - if (options.oneofs) - object._min = "min"; - } - if (message.max != null && message.hasOwnProperty("max")) { - object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; - if (options.oneofs) - object._max = "max"; - } - return object; - }; - /** - * Converts this HistogramDataPoint to JSON. - * @function toJSON - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @instance - * @returns {Object.} JSON object - */ - HistogramDataPoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for HistogramDataPoint - * @function getTypeUrl - * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HistogramDataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.HistogramDataPoint"; - }; - return HistogramDataPoint; - })(); - v1.ExponentialHistogramDataPoint = (function () { - /** - * Properties of an ExponentialHistogramDataPoint. - * @memberof opentelemetry.proto.metrics.v1 - * @interface IExponentialHistogramDataPoint - * @property {Array.|null} [attributes] ExponentialHistogramDataPoint attributes - * @property {number|Long|null} [startTimeUnixNano] ExponentialHistogramDataPoint startTimeUnixNano - * @property {number|Long|null} [timeUnixNano] ExponentialHistogramDataPoint timeUnixNano - * @property {number|Long|null} [count] ExponentialHistogramDataPoint count - * @property {number|null} [sum] ExponentialHistogramDataPoint sum - * @property {number|null} [scale] ExponentialHistogramDataPoint scale - * @property {number|Long|null} [zeroCount] ExponentialHistogramDataPoint zeroCount - * @property {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets|null} [positive] ExponentialHistogramDataPoint positive - * @property {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets|null} [negative] ExponentialHistogramDataPoint negative - * @property {number|null} [flags] ExponentialHistogramDataPoint flags - * @property {Array.|null} [exemplars] ExponentialHistogramDataPoint exemplars - * @property {number|null} [min] ExponentialHistogramDataPoint min - * @property {number|null} [max] ExponentialHistogramDataPoint max - * @property {number|null} [zeroThreshold] ExponentialHistogramDataPoint zeroThreshold - */ - /** - * Constructs a new ExponentialHistogramDataPoint. - * @memberof opentelemetry.proto.metrics.v1 - * @classdesc Represents an ExponentialHistogramDataPoint. - * @implements IExponentialHistogramDataPoint - * @constructor - * @param {opentelemetry.proto.metrics.v1.IExponentialHistogramDataPoint=} [properties] Properties to set - */ - function ExponentialHistogramDataPoint(properties) { - this.attributes = []; - this.exemplars = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ExponentialHistogramDataPoint attributes. - * @member {Array.} attributes - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - ExponentialHistogramDataPoint.prototype.attributes = $util.emptyArray; - /** - * ExponentialHistogramDataPoint startTimeUnixNano. - * @member {number|Long|null|undefined} startTimeUnixNano - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - ExponentialHistogramDataPoint.prototype.startTimeUnixNano = null; - /** - * ExponentialHistogramDataPoint timeUnixNano. - * @member {number|Long|null|undefined} timeUnixNano - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - ExponentialHistogramDataPoint.prototype.timeUnixNano = null; - /** - * ExponentialHistogramDataPoint count. - * @member {number|Long|null|undefined} count - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - ExponentialHistogramDataPoint.prototype.count = null; - /** - * ExponentialHistogramDataPoint sum. - * @member {number|null|undefined} sum - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - ExponentialHistogramDataPoint.prototype.sum = null; - /** - * ExponentialHistogramDataPoint scale. - * @member {number|null|undefined} scale - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - ExponentialHistogramDataPoint.prototype.scale = null; - /** - * ExponentialHistogramDataPoint zeroCount. - * @member {number|Long|null|undefined} zeroCount - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - ExponentialHistogramDataPoint.prototype.zeroCount = null; - /** - * ExponentialHistogramDataPoint positive. - * @member {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets|null|undefined} positive - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - ExponentialHistogramDataPoint.prototype.positive = null; - /** - * ExponentialHistogramDataPoint negative. - * @member {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets|null|undefined} negative - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - ExponentialHistogramDataPoint.prototype.negative = null; - /** - * ExponentialHistogramDataPoint flags. - * @member {number|null|undefined} flags - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - ExponentialHistogramDataPoint.prototype.flags = null; - /** - * ExponentialHistogramDataPoint exemplars. - * @member {Array.} exemplars - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - ExponentialHistogramDataPoint.prototype.exemplars = $util.emptyArray; - /** - * ExponentialHistogramDataPoint min. - * @member {number|null|undefined} min - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - ExponentialHistogramDataPoint.prototype.min = null; - /** - * ExponentialHistogramDataPoint max. - * @member {number|null|undefined} max - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - ExponentialHistogramDataPoint.prototype.max = null; - /** - * ExponentialHistogramDataPoint zeroThreshold. - * @member {number|null|undefined} zeroThreshold - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - ExponentialHistogramDataPoint.prototype.zeroThreshold = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - /** - * ExponentialHistogramDataPoint _sum. - * @member {"sum"|undefined} _sum - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - Object.defineProperty(ExponentialHistogramDataPoint.prototype, "_sum", { - get: $util.oneOfGetter($oneOfFields = ["sum"]), - set: $util.oneOfSetter($oneOfFields) - }); - /** - * ExponentialHistogramDataPoint _min. - * @member {"min"|undefined} _min - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - Object.defineProperty(ExponentialHistogramDataPoint.prototype, "_min", { - get: $util.oneOfGetter($oneOfFields = ["min"]), - set: $util.oneOfSetter($oneOfFields) - }); - /** - * ExponentialHistogramDataPoint _max. - * @member {"max"|undefined} _max - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - */ - Object.defineProperty(ExponentialHistogramDataPoint.prototype, "_max", { - get: $util.oneOfGetter($oneOfFields = ["max"]), - set: $util.oneOfSetter($oneOfFields) - }); - /** - * Creates a new ExponentialHistogramDataPoint instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @static - * @param {opentelemetry.proto.metrics.v1.IExponentialHistogramDataPoint=} [properties] Properties to set - * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} ExponentialHistogramDataPoint instance - */ - ExponentialHistogramDataPoint.create = function create(properties) { - return new ExponentialHistogramDataPoint(properties); - }; - /** - * Encodes the specified ExponentialHistogramDataPoint message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @static - * @param {opentelemetry.proto.metrics.v1.IExponentialHistogramDataPoint} message ExponentialHistogramDataPoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExponentialHistogramDataPoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.attributes != null && message.attributes.length) - for (var i = 0; i < message.attributes.length; ++i) - $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, "startTimeUnixNano")) - writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.startTimeUnixNano); - if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) - writer.uint32(/* id 3, wireType 1 =*/ 25).fixed64(message.timeUnixNano); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 4, wireType 1 =*/ 33).fixed64(message.count); - if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) - writer.uint32(/* id 5, wireType 1 =*/ 41).double(message.sum); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) - writer.uint32(/* id 6, wireType 0 =*/ 48).sint32(message.scale); - if (message.zeroCount != null && Object.hasOwnProperty.call(message, "zeroCount")) - writer.uint32(/* id 7, wireType 1 =*/ 57).fixed64(message.zeroCount); - if (message.positive != null && Object.hasOwnProperty.call(message, "positive")) - $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(message.positive, writer.uint32(/* id 8, wireType 2 =*/ 66).fork()).ldelim(); - if (message.negative != null && Object.hasOwnProperty.call(message, "negative")) - $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(message.negative, writer.uint32(/* id 9, wireType 2 =*/ 74).fork()).ldelim(); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) - writer.uint32(/* id 10, wireType 0 =*/ 80).uint32(message.flags); - if (message.exemplars != null && message.exemplars.length) - for (var i = 0; i < message.exemplars.length; ++i) - $root.opentelemetry.proto.metrics.v1.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 11, wireType 2 =*/ 90).fork()).ldelim(); - if (message.min != null && Object.hasOwnProperty.call(message, "min")) - writer.uint32(/* id 12, wireType 1 =*/ 97).double(message.min); - if (message.max != null && Object.hasOwnProperty.call(message, "max")) - writer.uint32(/* id 13, wireType 1 =*/ 105).double(message.max); - if (message.zeroThreshold != null && Object.hasOwnProperty.call(message, "zeroThreshold")) - writer.uint32(/* id 14, wireType 1 =*/ 113).double(message.zeroThreshold); - return writer; - }; - /** - * Encodes the specified ExponentialHistogramDataPoint message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @static - * @param {opentelemetry.proto.metrics.v1.IExponentialHistogramDataPoint} message ExponentialHistogramDataPoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExponentialHistogramDataPoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes an ExponentialHistogramDataPoint message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} ExponentialHistogramDataPoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExponentialHistogramDataPoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.attributes && message.attributes.length)) - message.attributes = []; - message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); - break; - } - case 2: { - message.startTimeUnixNano = reader.fixed64(); - break; - } - case 3: { - message.timeUnixNano = reader.fixed64(); - break; - } - case 4: { - message.count = reader.fixed64(); - break; - } - case 5: { - message.sum = reader.double(); - break; - } - case 6: { - message.scale = reader.sint32(); - break; - } - case 7: { - message.zeroCount = reader.fixed64(); - break; - } - case 8: { - message.positive = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(reader, reader.uint32()); - break; - } - case 9: { - message.negative = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(reader, reader.uint32()); - break; - } - case 10: { - message.flags = reader.uint32(); - break; - } - case 11: { - if (!(message.exemplars && message.exemplars.length)) - message.exemplars = []; - message.exemplars.push($root.opentelemetry.proto.metrics.v1.Exemplar.decode(reader, reader.uint32())); - break; - } - case 12: { - message.min = reader.double(); - break; - } - case 13: { - message.max = reader.double(); - break; - } - case 14: { - message.zeroThreshold = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an ExponentialHistogramDataPoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} ExponentialHistogramDataPoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExponentialHistogramDataPoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an ExponentialHistogramDataPoint message. - * @function verify - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExponentialHistogramDataPoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!Array.isArray(message.attributes)) - return "attributes: array expected"; - for (var i = 0; i < message.attributes.length; ++i) { - var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); - if (error) - return "attributes." + error; - } - } - if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) - if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high))) - return "startTimeUnixNano: integer|Long expected"; - if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) - if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) - return "timeUnixNano: integer|Long expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - if (message.sum != null && message.hasOwnProperty("sum")) { - properties._sum = 1; - if (typeof message.sum !== "number") - return "sum: number expected"; - } - if (message.scale != null && message.hasOwnProperty("scale")) - if (!$util.isInteger(message.scale)) - return "scale: integer expected"; - if (message.zeroCount != null && message.hasOwnProperty("zeroCount")) - if (!$util.isInteger(message.zeroCount) && !(message.zeroCount && $util.isInteger(message.zeroCount.low) && $util.isInteger(message.zeroCount.high))) - return "zeroCount: integer|Long expected"; - if (message.positive != null && message.hasOwnProperty("positive")) { - var error = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(message.positive); - if (error) - return "positive." + error; - } - if (message.negative != null && message.hasOwnProperty("negative")) { - var error = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(message.negative); - if (error) - return "negative." + error; - } - if (message.flags != null && message.hasOwnProperty("flags")) - if (!$util.isInteger(message.flags)) - return "flags: integer expected"; - if (message.exemplars != null && message.hasOwnProperty("exemplars")) { - if (!Array.isArray(message.exemplars)) - return "exemplars: array expected"; - for (var i = 0; i < message.exemplars.length; ++i) { - var error = $root.opentelemetry.proto.metrics.v1.Exemplar.verify(message.exemplars[i]); - if (error) - return "exemplars." + error; - } - } - if (message.min != null && message.hasOwnProperty("min")) { - properties._min = 1; - if (typeof message.min !== "number") - return "min: number expected"; - } - if (message.max != null && message.hasOwnProperty("max")) { - properties._max = 1; - if (typeof message.max !== "number") - return "max: number expected"; - } - if (message.zeroThreshold != null && message.hasOwnProperty("zeroThreshold")) - if (typeof message.zeroThreshold !== "number") - return "zeroThreshold: number expected"; - return null; - }; - /** - * Creates an ExponentialHistogramDataPoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} ExponentialHistogramDataPoint - */ - ExponentialHistogramDataPoint.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint) - return object; - var message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint(); - if (object.attributes) { - if (!Array.isArray(object.attributes)) - throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected"); - message.attributes = []; - for (var i = 0; i < object.attributes.length; ++i) { - if (typeof object.attributes[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected"); - message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); - } - } - if (object.startTimeUnixNano != null) - if ($util.Long) - (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false; - else if (typeof object.startTimeUnixNano === "string") - message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10); - else if (typeof object.startTimeUnixNano === "number") - message.startTimeUnixNano = object.startTimeUnixNano; - else if (typeof object.startTimeUnixNano === "object") - message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber(); - if (object.timeUnixNano != null) - if ($util.Long) - (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; - else if (typeof object.timeUnixNano === "string") - message.timeUnixNano = parseInt(object.timeUnixNano, 10); - else if (typeof object.timeUnixNano === "number") - message.timeUnixNano = object.timeUnixNano; - else if (typeof object.timeUnixNano === "object") - message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - if (object.sum != null) - message.sum = Number(object.sum); - if (object.scale != null) - message.scale = object.scale | 0; - if (object.zeroCount != null) - if ($util.Long) - (message.zeroCount = $util.Long.fromValue(object.zeroCount)).unsigned = false; - else if (typeof object.zeroCount === "string") - message.zeroCount = parseInt(object.zeroCount, 10); - else if (typeof object.zeroCount === "number") - message.zeroCount = object.zeroCount; - else if (typeof object.zeroCount === "object") - message.zeroCount = new $util.LongBits(object.zeroCount.low >>> 0, object.zeroCount.high >>> 0).toNumber(); - if (object.positive != null) { - if (typeof object.positive !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected"); - message.positive = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(object.positive); - } - if (object.negative != null) { - if (typeof object.negative !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected"); - message.negative = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(object.negative); - } - if (object.flags != null) - message.flags = object.flags >>> 0; - if (object.exemplars) { - if (!Array.isArray(object.exemplars)) - throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected"); - message.exemplars = []; - for (var i = 0; i < object.exemplars.length; ++i) { - if (typeof object.exemplars[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected"); - message.exemplars[i] = $root.opentelemetry.proto.metrics.v1.Exemplar.fromObject(object.exemplars[i]); - } - } - if (object.min != null) - message.min = Number(object.min); - if (object.max != null) - message.max = Number(object.max); - if (object.zeroThreshold != null) - message.zeroThreshold = Number(object.zeroThreshold); - return message; - }; - /** - * Creates a plain object from an ExponentialHistogramDataPoint message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @static - * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} message ExponentialHistogramDataPoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExponentialHistogramDataPoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.attributes = []; - object.exemplars = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.startTimeUnixNano = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.timeUnixNano = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.count = options.longs === String ? "0" : 0; - object.scale = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.zeroCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.zeroCount = options.longs === String ? "0" : 0; - object.positive = null; - object.negative = null; - object.flags = 0; - object.zeroThreshold = 0; - } - if (message.attributes && message.attributes.length) { - object.attributes = []; - for (var j = 0; j < message.attributes.length; ++j) - object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); - } - if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) - if (typeof message.startTimeUnixNano === "number") - object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano; - else - object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano; - if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) - if (typeof message.timeUnixNano === "number") - object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; - else - object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - if (message.sum != null && message.hasOwnProperty("sum")) { - object.sum = options.json && !isFinite(message.sum) ? String(message.sum) : message.sum; - if (options.oneofs) - object._sum = "sum"; - } - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = message.scale; - if (message.zeroCount != null && message.hasOwnProperty("zeroCount")) - if (typeof message.zeroCount === "number") - object.zeroCount = options.longs === String ? String(message.zeroCount) : message.zeroCount; - else - object.zeroCount = options.longs === String ? $util.Long.prototype.toString.call(message.zeroCount) : options.longs === Number ? new $util.LongBits(message.zeroCount.low >>> 0, message.zeroCount.high >>> 0).toNumber() : message.zeroCount; - if (message.positive != null && message.hasOwnProperty("positive")) - object.positive = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(message.positive, options); - if (message.negative != null && message.hasOwnProperty("negative")) - object.negative = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(message.negative, options); - if (message.flags != null && message.hasOwnProperty("flags")) - object.flags = message.flags; - if (message.exemplars && message.exemplars.length) { - object.exemplars = []; - for (var j = 0; j < message.exemplars.length; ++j) - object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j], options); - } - if (message.min != null && message.hasOwnProperty("min")) { - object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; - if (options.oneofs) - object._min = "min"; - } - if (message.max != null && message.hasOwnProperty("max")) { - object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; - if (options.oneofs) - object._max = "max"; - } - if (message.zeroThreshold != null && message.hasOwnProperty("zeroThreshold")) - object.zeroThreshold = options.json && !isFinite(message.zeroThreshold) ? String(message.zeroThreshold) : message.zeroThreshold; - return object; - }; - /** - * Converts this ExponentialHistogramDataPoint to JSON. - * @function toJSON - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @instance - * @returns {Object.} JSON object - */ - ExponentialHistogramDataPoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ExponentialHistogramDataPoint - * @function getTypeUrl - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExponentialHistogramDataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"; - }; - ExponentialHistogramDataPoint.Buckets = (function () { - /** - * Properties of a Buckets. - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @interface IBuckets - * @property {number|null} [offset] Buckets offset - * @property {Array.|null} [bucketCounts] Buckets bucketCounts - */ - /** - * Constructs a new Buckets. - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint - * @classdesc Represents a Buckets. - * @implements IBuckets - * @constructor - * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets=} [properties] Properties to set - */ - function Buckets(properties) { - this.bucketCounts = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * Buckets offset. - * @member {number|null|undefined} offset - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets - * @instance - */ - Buckets.prototype.offset = null; - /** - * Buckets bucketCounts. - * @member {Array.} bucketCounts - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets - * @instance - */ - Buckets.prototype.bucketCounts = $util.emptyArray; - /** - * Creates a new Buckets instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets - * @static - * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets=} [properties] Properties to set - * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} Buckets instance - */ - Buckets.create = function create(properties) { - return new Buckets(properties); - }; - /** - * Encodes the specified Buckets message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets - * @static - * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets} message Buckets message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Buckets.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 1, wireType 0 =*/ 8).sint32(message.offset); - if (message.bucketCounts != null && message.bucketCounts.length) { - writer.uint32(/* id 2, wireType 2 =*/ 18).fork(); - for (var i = 0; i < message.bucketCounts.length; ++i) - writer.uint64(message.bucketCounts[i]); - writer.ldelim(); - } - return writer; - }; - /** - * Encodes the specified Buckets message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets - * @static - * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets} message Buckets message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Buckets.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a Buckets message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} Buckets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Buckets.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.offset = reader.sint32(); - break; - } - case 2: { - if (!(message.bucketCounts && message.bucketCounts.length)) - message.bucketCounts = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.bucketCounts.push(reader.uint64()); - } - else - message.bucketCounts.push(reader.uint64()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a Buckets message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} Buckets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Buckets.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a Buckets message. - * @function verify - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Buckets.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.offset != null && message.hasOwnProperty("offset")) - if (!$util.isInteger(message.offset)) - return "offset: integer expected"; - if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { - if (!Array.isArray(message.bucketCounts)) - return "bucketCounts: array expected"; - for (var i = 0; i < message.bucketCounts.length; ++i) - if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) - return "bucketCounts: integer|Long[] expected"; - } - return null; - }; - /** - * Creates a Buckets message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} Buckets - */ - Buckets.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets) - return object; - var message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets(); - if (object.offset != null) - message.offset = object.offset | 0; - if (object.bucketCounts) { - if (!Array.isArray(object.bucketCounts)) - throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected"); - message.bucketCounts = []; - for (var i = 0; i < object.bucketCounts.length; ++i) - if ($util.Long) - (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = true; - else if (typeof object.bucketCounts[i] === "string") - message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); - else if (typeof object.bucketCounts[i] === "number") - message.bucketCounts[i] = object.bucketCounts[i]; - else if (typeof object.bucketCounts[i] === "object") - message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(true); - } - return message; - }; - /** - * Creates a plain object from a Buckets message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets - * @static - * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} message Buckets - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Buckets.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.bucketCounts = []; - if (options.defaults) - object.offset = 0; - if (message.offset != null && message.hasOwnProperty("offset")) - object.offset = message.offset; - if (message.bucketCounts && message.bucketCounts.length) { - object.bucketCounts = []; - for (var j = 0; j < message.bucketCounts.length; ++j) - if (typeof message.bucketCounts[j] === "number") - object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; - else - object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber(true) : message.bucketCounts[j]; - } - return object; - }; - /** - * Converts this Buckets to JSON. - * @function toJSON - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets - * @instance - * @returns {Object.} JSON object - */ - Buckets.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for Buckets - * @function getTypeUrl - * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Buckets.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"; - }; - return Buckets; - })(); - return ExponentialHistogramDataPoint; - })(); - v1.SummaryDataPoint = (function () { - /** - * Properties of a SummaryDataPoint. - * @memberof opentelemetry.proto.metrics.v1 - * @interface ISummaryDataPoint - * @property {Array.|null} [attributes] SummaryDataPoint attributes - * @property {number|Long|null} [startTimeUnixNano] SummaryDataPoint startTimeUnixNano - * @property {number|Long|null} [timeUnixNano] SummaryDataPoint timeUnixNano - * @property {number|Long|null} [count] SummaryDataPoint count - * @property {number|null} [sum] SummaryDataPoint sum - * @property {Array.|null} [quantileValues] SummaryDataPoint quantileValues - * @property {number|null} [flags] SummaryDataPoint flags - */ - /** - * Constructs a new SummaryDataPoint. - * @memberof opentelemetry.proto.metrics.v1 - * @classdesc Represents a SummaryDataPoint. - * @implements ISummaryDataPoint - * @constructor - * @param {opentelemetry.proto.metrics.v1.ISummaryDataPoint=} [properties] Properties to set - */ - function SummaryDataPoint(properties) { - this.attributes = []; - this.quantileValues = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * SummaryDataPoint attributes. - * @member {Array.} attributes - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @instance - */ - SummaryDataPoint.prototype.attributes = $util.emptyArray; - /** - * SummaryDataPoint startTimeUnixNano. - * @member {number|Long|null|undefined} startTimeUnixNano - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @instance - */ - SummaryDataPoint.prototype.startTimeUnixNano = null; - /** - * SummaryDataPoint timeUnixNano. - * @member {number|Long|null|undefined} timeUnixNano - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @instance - */ - SummaryDataPoint.prototype.timeUnixNano = null; - /** - * SummaryDataPoint count. - * @member {number|Long|null|undefined} count - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @instance - */ - SummaryDataPoint.prototype.count = null; - /** - * SummaryDataPoint sum. - * @member {number|null|undefined} sum - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @instance - */ - SummaryDataPoint.prototype.sum = null; - /** - * SummaryDataPoint quantileValues. - * @member {Array.} quantileValues - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @instance - */ - SummaryDataPoint.prototype.quantileValues = $util.emptyArray; - /** - * SummaryDataPoint flags. - * @member {number|null|undefined} flags - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @instance - */ - SummaryDataPoint.prototype.flags = null; - /** - * Creates a new SummaryDataPoint instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @static - * @param {opentelemetry.proto.metrics.v1.ISummaryDataPoint=} [properties] Properties to set - * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint} SummaryDataPoint instance - */ - SummaryDataPoint.create = function create(properties) { - return new SummaryDataPoint(properties); - }; - /** - * Encodes the specified SummaryDataPoint message. Does not implicitly {@link opentelemetry.proto.metrics.v1.SummaryDataPoint.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @static - * @param {opentelemetry.proto.metrics.v1.ISummaryDataPoint} message SummaryDataPoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SummaryDataPoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, "startTimeUnixNano")) - writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.startTimeUnixNano); - if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) - writer.uint32(/* id 3, wireType 1 =*/ 25).fixed64(message.timeUnixNano); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 4, wireType 1 =*/ 33).fixed64(message.count); - if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) - writer.uint32(/* id 5, wireType 1 =*/ 41).double(message.sum); - if (message.quantileValues != null && message.quantileValues.length) - for (var i = 0; i < message.quantileValues.length; ++i) - $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(message.quantileValues[i], writer.uint32(/* id 6, wireType 2 =*/ 50).fork()).ldelim(); - if (message.attributes != null && message.attributes.length) - for (var i = 0; i < message.attributes.length; ++i) - $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 7, wireType 2 =*/ 58).fork()).ldelim(); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) - writer.uint32(/* id 8, wireType 0 =*/ 64).uint32(message.flags); - return writer; - }; - /** - * Encodes the specified SummaryDataPoint message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.SummaryDataPoint.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @static - * @param {opentelemetry.proto.metrics.v1.ISummaryDataPoint} message SummaryDataPoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SummaryDataPoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a SummaryDataPoint message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint} SummaryDataPoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SummaryDataPoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.SummaryDataPoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 7: { - if (!(message.attributes && message.attributes.length)) - message.attributes = []; - message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); - break; - } - case 2: { - message.startTimeUnixNano = reader.fixed64(); - break; - } - case 3: { - message.timeUnixNano = reader.fixed64(); - break; - } - case 4: { - message.count = reader.fixed64(); - break; - } - case 5: { - message.sum = reader.double(); - break; - } - case 6: { - if (!(message.quantileValues && message.quantileValues.length)) - message.quantileValues = []; - message.quantileValues.push($root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(reader, reader.uint32())); - break; - } - case 8: { - message.flags = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a SummaryDataPoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint} SummaryDataPoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SummaryDataPoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a SummaryDataPoint message. - * @function verify - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SummaryDataPoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!Array.isArray(message.attributes)) - return "attributes: array expected"; - for (var i = 0; i < message.attributes.length; ++i) { - var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); - if (error) - return "attributes." + error; - } - } - if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) - if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high))) - return "startTimeUnixNano: integer|Long expected"; - if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) - if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) - return "timeUnixNano: integer|Long expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - if (message.sum != null && message.hasOwnProperty("sum")) - if (typeof message.sum !== "number") - return "sum: number expected"; - if (message.quantileValues != null && message.hasOwnProperty("quantileValues")) { - if (!Array.isArray(message.quantileValues)) - return "quantileValues: array expected"; - for (var i = 0; i < message.quantileValues.length; ++i) { - var error = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(message.quantileValues[i]); - if (error) - return "quantileValues." + error; - } - } - if (message.flags != null && message.hasOwnProperty("flags")) - if (!$util.isInteger(message.flags)) - return "flags: integer expected"; - return null; - }; - /** - * Creates a SummaryDataPoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint} SummaryDataPoint - */ - SummaryDataPoint.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.metrics.v1.SummaryDataPoint) - return object; - var message = new $root.opentelemetry.proto.metrics.v1.SummaryDataPoint(); - if (object.attributes) { - if (!Array.isArray(object.attributes)) - throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected"); - message.attributes = []; - for (var i = 0; i < object.attributes.length; ++i) { - if (typeof object.attributes[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected"); - message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); - } - } - if (object.startTimeUnixNano != null) - if ($util.Long) - (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false; - else if (typeof object.startTimeUnixNano === "string") - message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10); - else if (typeof object.startTimeUnixNano === "number") - message.startTimeUnixNano = object.startTimeUnixNano; - else if (typeof object.startTimeUnixNano === "object") - message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber(); - if (object.timeUnixNano != null) - if ($util.Long) - (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; - else if (typeof object.timeUnixNano === "string") - message.timeUnixNano = parseInt(object.timeUnixNano, 10); - else if (typeof object.timeUnixNano === "number") - message.timeUnixNano = object.timeUnixNano; - else if (typeof object.timeUnixNano === "object") - message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - if (object.sum != null) - message.sum = Number(object.sum); - if (object.quantileValues) { - if (!Array.isArray(object.quantileValues)) - throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected"); - message.quantileValues = []; - for (var i = 0; i < object.quantileValues.length; ++i) { - if (typeof object.quantileValues[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected"); - message.quantileValues[i] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(object.quantileValues[i]); - } - } - if (object.flags != null) - message.flags = object.flags >>> 0; - return message; - }; - /** - * Creates a plain object from a SummaryDataPoint message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @static - * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint} message SummaryDataPoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SummaryDataPoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.quantileValues = []; - object.attributes = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.startTimeUnixNano = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.timeUnixNano = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.count = options.longs === String ? "0" : 0; - object.sum = 0; - object.flags = 0; - } - if (message.startTimeUnixNano != null && message.hasOwnProperty("startTimeUnixNano")) - if (typeof message.startTimeUnixNano === "number") - object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano; - else - object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano; - if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) - if (typeof message.timeUnixNano === "number") - object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; - else - object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - if (message.sum != null && message.hasOwnProperty("sum")) - object.sum = options.json && !isFinite(message.sum) ? String(message.sum) : message.sum; - if (message.quantileValues && message.quantileValues.length) { - object.quantileValues = []; - for (var j = 0; j < message.quantileValues.length; ++j) - object.quantileValues[j] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(message.quantileValues[j], options); - } - if (message.attributes && message.attributes.length) { - object.attributes = []; - for (var j = 0; j < message.attributes.length; ++j) - object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); - } - if (message.flags != null && message.hasOwnProperty("flags")) - object.flags = message.flags; - return object; - }; - /** - * Converts this SummaryDataPoint to JSON. - * @function toJSON - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @instance - * @returns {Object.} JSON object - */ - SummaryDataPoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for SummaryDataPoint - * @function getTypeUrl - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SummaryDataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.SummaryDataPoint"; - }; - SummaryDataPoint.ValueAtQuantile = (function () { - /** - * Properties of a ValueAtQuantile. - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @interface IValueAtQuantile - * @property {number|null} [quantile] ValueAtQuantile quantile - * @property {number|null} [value] ValueAtQuantile value - */ - /** - * Constructs a new ValueAtQuantile. - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint - * @classdesc Represents a ValueAtQuantile. - * @implements IValueAtQuantile - * @constructor - * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.IValueAtQuantile=} [properties] Properties to set - */ - function ValueAtQuantile(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ValueAtQuantile quantile. - * @member {number|null|undefined} quantile - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile - * @instance - */ - ValueAtQuantile.prototype.quantile = null; - /** - * ValueAtQuantile value. - * @member {number|null|undefined} value - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile - * @instance - */ - ValueAtQuantile.prototype.value = null; - /** - * Creates a new ValueAtQuantile instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile - * @static - * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.IValueAtQuantile=} [properties] Properties to set - * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} ValueAtQuantile instance - */ - ValueAtQuantile.create = function create(properties) { - return new ValueAtQuantile(properties); - }; - /** - * Encodes the specified ValueAtQuantile message. Does not implicitly {@link opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile - * @static - * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.IValueAtQuantile} message ValueAtQuantile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValueAtQuantile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.quantile != null && Object.hasOwnProperty.call(message, "quantile")) - writer.uint32(/* id 1, wireType 1 =*/ 9).double(message.quantile); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 1 =*/ 17).double(message.value); - return writer; - }; - /** - * Encodes the specified ValueAtQuantile message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile - * @static - * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.IValueAtQuantile} message ValueAtQuantile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValueAtQuantile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a ValueAtQuantile message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} ValueAtQuantile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValueAtQuantile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.quantile = reader.double(); - break; - } - case 2: { - message.value = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a ValueAtQuantile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} ValueAtQuantile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValueAtQuantile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a ValueAtQuantile message. - * @function verify - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValueAtQuantile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.quantile != null && message.hasOwnProperty("quantile")) - if (typeof message.quantile !== "number") - return "quantile: number expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; - /** - * Creates a ValueAtQuantile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} ValueAtQuantile - */ - ValueAtQuantile.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile) - return object; - var message = new $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile(); - if (object.quantile != null) - message.quantile = Number(object.quantile); - if (object.value != null) - message.value = Number(object.value); - return message; - }; - /** - * Creates a plain object from a ValueAtQuantile message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile - * @static - * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} message ValueAtQuantile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValueAtQuantile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.quantile = 0; - object.value = 0; - } - if (message.quantile != null && message.hasOwnProperty("quantile")) - object.quantile = options.json && !isFinite(message.quantile) ? String(message.quantile) : message.quantile; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; - /** - * Converts this ValueAtQuantile to JSON. - * @function toJSON - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile - * @instance - * @returns {Object.} JSON object - */ - ValueAtQuantile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ValueAtQuantile - * @function getTypeUrl - * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ValueAtQuantile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"; - }; - return ValueAtQuantile; - })(); - return SummaryDataPoint; - })(); - v1.Exemplar = (function () { - /** - * Properties of an Exemplar. - * @memberof opentelemetry.proto.metrics.v1 - * @interface IExemplar - * @property {Array.|null} [filteredAttributes] Exemplar filteredAttributes - * @property {number|Long|null} [timeUnixNano] Exemplar timeUnixNano - * @property {number|null} [asDouble] Exemplar asDouble - * @property {number|Long|null} [asInt] Exemplar asInt - * @property {Uint8Array|null} [spanId] Exemplar spanId - * @property {Uint8Array|null} [traceId] Exemplar traceId - */ - /** - * Constructs a new Exemplar. - * @memberof opentelemetry.proto.metrics.v1 - * @classdesc Represents an Exemplar. - * @implements IExemplar - * @constructor - * @param {opentelemetry.proto.metrics.v1.IExemplar=} [properties] Properties to set - */ - function Exemplar(properties) { - this.filteredAttributes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * Exemplar filteredAttributes. - * @member {Array.} filteredAttributes - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @instance - */ - Exemplar.prototype.filteredAttributes = $util.emptyArray; - /** - * Exemplar timeUnixNano. - * @member {number|Long|null|undefined} timeUnixNano - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @instance - */ - Exemplar.prototype.timeUnixNano = null; - /** - * Exemplar asDouble. - * @member {number|null|undefined} asDouble - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @instance - */ - Exemplar.prototype.asDouble = null; - /** - * Exemplar asInt. - * @member {number|Long|null|undefined} asInt - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @instance - */ - Exemplar.prototype.asInt = null; - /** - * Exemplar spanId. - * @member {Uint8Array|null|undefined} spanId - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @instance - */ - Exemplar.prototype.spanId = null; - /** - * Exemplar traceId. - * @member {Uint8Array|null|undefined} traceId - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @instance - */ - Exemplar.prototype.traceId = null; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - /** - * Exemplar value. - * @member {"asDouble"|"asInt"|undefined} value - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @instance - */ - Object.defineProperty(Exemplar.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["asDouble", "asInt"]), - set: $util.oneOfSetter($oneOfFields) - }); - /** - * Creates a new Exemplar instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @static - * @param {opentelemetry.proto.metrics.v1.IExemplar=} [properties] Properties to set - * @returns {opentelemetry.proto.metrics.v1.Exemplar} Exemplar instance - */ - Exemplar.create = function create(properties) { - return new Exemplar(properties); - }; - /** - * Encodes the specified Exemplar message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Exemplar.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @static - * @param {opentelemetry.proto.metrics.v1.IExemplar} message Exemplar message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exemplar.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) - writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.timeUnixNano); - if (message.asDouble != null && Object.hasOwnProperty.call(message, "asDouble")) - writer.uint32(/* id 3, wireType 1 =*/ 25).double(message.asDouble); - if (message.spanId != null && Object.hasOwnProperty.call(message, "spanId")) - writer.uint32(/* id 4, wireType 2 =*/ 34).bytes(message.spanId); - if (message.traceId != null && Object.hasOwnProperty.call(message, "traceId")) - writer.uint32(/* id 5, wireType 2 =*/ 42).bytes(message.traceId); - if (message.asInt != null && Object.hasOwnProperty.call(message, "asInt")) - writer.uint32(/* id 6, wireType 1 =*/ 49).sfixed64(message.asInt); - if (message.filteredAttributes != null && message.filteredAttributes.length) - for (var i = 0; i < message.filteredAttributes.length; ++i) - $root.opentelemetry.proto.common.v1.KeyValue.encode(message.filteredAttributes[i], writer.uint32(/* id 7, wireType 2 =*/ 58).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Exemplar.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @static - * @param {opentelemetry.proto.metrics.v1.IExemplar} message Exemplar message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exemplar.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes an Exemplar message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.metrics.v1.Exemplar} Exemplar - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exemplar.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Exemplar(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 7: { - if (!(message.filteredAttributes && message.filteredAttributes.length)) - message.filteredAttributes = []; - message.filteredAttributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); - break; - } - case 2: { - message.timeUnixNano = reader.fixed64(); - break; - } - case 3: { - message.asDouble = reader.double(); - break; - } - case 6: { - message.asInt = reader.sfixed64(); - break; - } - case 4: { - message.spanId = reader.bytes(); - break; - } - case 5: { - message.traceId = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes an Exemplar message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.metrics.v1.Exemplar} Exemplar - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exemplar.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies an Exemplar message. - * @function verify - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Exemplar.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.filteredAttributes != null && message.hasOwnProperty("filteredAttributes")) { - if (!Array.isArray(message.filteredAttributes)) - return "filteredAttributes: array expected"; - for (var i = 0; i < message.filteredAttributes.length; ++i) { - var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.filteredAttributes[i]); - if (error) - return "filteredAttributes." + error; - } - } - if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) - if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) - return "timeUnixNano: integer|Long expected"; - if (message.asDouble != null && message.hasOwnProperty("asDouble")) { - properties.value = 1; - if (typeof message.asDouble !== "number") - return "asDouble: number expected"; - } - if (message.asInt != null && message.hasOwnProperty("asInt")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - if (!$util.isInteger(message.asInt) && !(message.asInt && $util.isInteger(message.asInt.low) && $util.isInteger(message.asInt.high))) - return "asInt: integer|Long expected"; - } - if (message.spanId != null && message.hasOwnProperty("spanId")) - if (!(message.spanId && typeof message.spanId.length === "number" || $util.isString(message.spanId))) - return "spanId: buffer expected"; - if (message.traceId != null && message.hasOwnProperty("traceId")) - if (!(message.traceId && typeof message.traceId.length === "number" || $util.isString(message.traceId))) - return "traceId: buffer expected"; - return null; - }; - /** - * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.metrics.v1.Exemplar} Exemplar - */ - Exemplar.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.metrics.v1.Exemplar) - return object; - var message = new $root.opentelemetry.proto.metrics.v1.Exemplar(); - if (object.filteredAttributes) { - if (!Array.isArray(object.filteredAttributes)) - throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected"); - message.filteredAttributes = []; - for (var i = 0; i < object.filteredAttributes.length; ++i) { - if (typeof object.filteredAttributes[i] !== "object") - throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected"); - message.filteredAttributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.filteredAttributes[i]); - } - } - if (object.timeUnixNano != null) - if ($util.Long) - (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; - else if (typeof object.timeUnixNano === "string") - message.timeUnixNano = parseInt(object.timeUnixNano, 10); - else if (typeof object.timeUnixNano === "number") - message.timeUnixNano = object.timeUnixNano; - else if (typeof object.timeUnixNano === "object") - message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); - if (object.asDouble != null) - message.asDouble = Number(object.asDouble); - if (object.asInt != null) - if ($util.Long) - (message.asInt = $util.Long.fromValue(object.asInt)).unsigned = false; - else if (typeof object.asInt === "string") - message.asInt = parseInt(object.asInt, 10); - else if (typeof object.asInt === "number") - message.asInt = object.asInt; - else if (typeof object.asInt === "object") - message.asInt = new $util.LongBits(object.asInt.low >>> 0, object.asInt.high >>> 0).toNumber(); - if (object.spanId != null) - if (typeof object.spanId === "string") - $util.base64.decode(object.spanId, message.spanId = $util.newBuffer($util.base64.length(object.spanId)), 0); - else if (object.spanId.length >= 0) - message.spanId = object.spanId; - if (object.traceId != null) - if (typeof object.traceId === "string") - $util.base64.decode(object.traceId, message.traceId = $util.newBuffer($util.base64.length(object.traceId)), 0); - else if (object.traceId.length >= 0) - message.traceId = object.traceId; - return message; - }; - /** - * Creates a plain object from an Exemplar message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @static - * @param {opentelemetry.proto.metrics.v1.Exemplar} message Exemplar - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Exemplar.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.filteredAttributes = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.timeUnixNano = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.spanId = ""; - else { - object.spanId = []; - if (options.bytes !== Array) - object.spanId = $util.newBuffer(object.spanId); - } - if (options.bytes === String) - object.traceId = ""; - else { - object.traceId = []; - if (options.bytes !== Array) - object.traceId = $util.newBuffer(object.traceId); - } - } - if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) - if (typeof message.timeUnixNano === "number") - object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; - else - object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; - if (message.asDouble != null && message.hasOwnProperty("asDouble")) { - object.asDouble = options.json && !isFinite(message.asDouble) ? String(message.asDouble) : message.asDouble; - if (options.oneofs) - object.value = "asDouble"; - } - if (message.spanId != null && message.hasOwnProperty("spanId")) - object.spanId = options.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId; - if (message.traceId != null && message.hasOwnProperty("traceId")) - object.traceId = options.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId; - if (message.asInt != null && message.hasOwnProperty("asInt")) { - if (typeof message.asInt === "number") - object.asInt = options.longs === String ? String(message.asInt) : message.asInt; - else - object.asInt = options.longs === String ? $util.Long.prototype.toString.call(message.asInt) : options.longs === Number ? new $util.LongBits(message.asInt.low >>> 0, message.asInt.high >>> 0).toNumber() : message.asInt; - if (options.oneofs) - object.value = "asInt"; - } - if (message.filteredAttributes && message.filteredAttributes.length) { - object.filteredAttributes = []; - for (var j = 0; j < message.filteredAttributes.length; ++j) - object.filteredAttributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.filteredAttributes[j], options); - } - return object; - }; - /** - * Converts this Exemplar to JSON. - * @function toJSON - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @instance - * @returns {Object.} JSON object - */ - Exemplar.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for Exemplar - * @function getTypeUrl - * @memberof opentelemetry.proto.metrics.v1.Exemplar - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Exemplar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.metrics.v1.Exemplar"; - }; - return Exemplar; - })(); - return v1; - })(); - return metrics; - })(); - proto.logs = (function () { - /** - * Namespace logs. - * @memberof opentelemetry.proto - * @namespace - */ - var logs = {}; - logs.v1 = (function () { - /** - * Namespace v1. - * @memberof opentelemetry.proto.logs - * @namespace - */ - var v1 = {}; - v1.LogsData = (function () { - /** - * Properties of a LogsData. - * @memberof opentelemetry.proto.logs.v1 - * @interface ILogsData - * @property {Array.|null} [resourceLogs] LogsData resourceLogs - */ - /** - * Constructs a new LogsData. - * @memberof opentelemetry.proto.logs.v1 - * @classdesc Represents a LogsData. - * @implements ILogsData - * @constructor - * @param {opentelemetry.proto.logs.v1.ILogsData=} [properties] Properties to set - */ - function LogsData(properties) { - this.resourceLogs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * LogsData resourceLogs. - * @member {Array.} resourceLogs - * @memberof opentelemetry.proto.logs.v1.LogsData - * @instance - */ - LogsData.prototype.resourceLogs = $util.emptyArray; - /** - * Creates a new LogsData instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.logs.v1.LogsData - * @static - * @param {opentelemetry.proto.logs.v1.ILogsData=} [properties] Properties to set - * @returns {opentelemetry.proto.logs.v1.LogsData} LogsData instance - */ - LogsData.create = function create(properties) { - return new LogsData(properties); - }; - /** - * Encodes the specified LogsData message. Does not implicitly {@link opentelemetry.proto.logs.v1.LogsData.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.logs.v1.LogsData - * @static - * @param {opentelemetry.proto.logs.v1.ILogsData} message LogsData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogsData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceLogs != null && message.resourceLogs.length) - for (var i = 0; i < message.resourceLogs.length; ++i) - $root.opentelemetry.proto.logs.v1.ResourceLogs.encode(message.resourceLogs[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - return writer; - }; - /** - * Encodes the specified LogsData message, length delimited. Does not implicitly {@link opentelemetry.proto.logs.v1.LogsData.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.logs.v1.LogsData - * @static - * @param {opentelemetry.proto.logs.v1.ILogsData} message LogsData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogsData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a LogsData message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.logs.v1.LogsData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.logs.v1.LogsData} LogsData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogsData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.logs.v1.LogsData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.resourceLogs && message.resourceLogs.length)) - message.resourceLogs = []; - message.resourceLogs.push($root.opentelemetry.proto.logs.v1.ResourceLogs.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a LogsData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.logs.v1.LogsData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.logs.v1.LogsData} LogsData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogsData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a LogsData message. - * @function verify - * @memberof opentelemetry.proto.logs.v1.LogsData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogsData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceLogs != null && message.hasOwnProperty("resourceLogs")) { - if (!Array.isArray(message.resourceLogs)) - return "resourceLogs: array expected"; - for (var i = 0; i < message.resourceLogs.length; ++i) { - var error = $root.opentelemetry.proto.logs.v1.ResourceLogs.verify(message.resourceLogs[i]); - if (error) - return "resourceLogs." + error; - } - } - return null; - }; - /** - * Creates a LogsData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.logs.v1.LogsData - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.logs.v1.LogsData} LogsData - */ - LogsData.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.logs.v1.LogsData) - return object; - var message = new $root.opentelemetry.proto.logs.v1.LogsData(); - if (object.resourceLogs) { - if (!Array.isArray(object.resourceLogs)) - throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected"); - message.resourceLogs = []; - for (var i = 0; i < object.resourceLogs.length; ++i) { - if (typeof object.resourceLogs[i] !== "object") - throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected"); - message.resourceLogs[i] = $root.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(object.resourceLogs[i]); - } - } - return message; - }; - /** - * Creates a plain object from a LogsData message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.logs.v1.LogsData - * @static - * @param {opentelemetry.proto.logs.v1.LogsData} message LogsData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LogsData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.resourceLogs = []; - if (message.resourceLogs && message.resourceLogs.length) { - object.resourceLogs = []; - for (var j = 0; j < message.resourceLogs.length; ++j) - object.resourceLogs[j] = $root.opentelemetry.proto.logs.v1.ResourceLogs.toObject(message.resourceLogs[j], options); - } - return object; - }; - /** - * Converts this LogsData to JSON. - * @function toJSON - * @memberof opentelemetry.proto.logs.v1.LogsData - * @instance - * @returns {Object.} JSON object - */ - LogsData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for LogsData - * @function getTypeUrl - * @memberof opentelemetry.proto.logs.v1.LogsData - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LogsData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.logs.v1.LogsData"; - }; - return LogsData; - })(); - v1.ResourceLogs = (function () { - /** - * Properties of a ResourceLogs. - * @memberof opentelemetry.proto.logs.v1 - * @interface IResourceLogs - * @property {opentelemetry.proto.resource.v1.IResource|null} [resource] ResourceLogs resource - * @property {Array.|null} [scopeLogs] ResourceLogs scopeLogs - * @property {string|null} [schemaUrl] ResourceLogs schemaUrl - */ - /** - * Constructs a new ResourceLogs. - * @memberof opentelemetry.proto.logs.v1 - * @classdesc Represents a ResourceLogs. - * @implements IResourceLogs - * @constructor - * @param {opentelemetry.proto.logs.v1.IResourceLogs=} [properties] Properties to set - */ - function ResourceLogs(properties) { - this.scopeLogs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ResourceLogs resource. - * @member {opentelemetry.proto.resource.v1.IResource|null|undefined} resource - * @memberof opentelemetry.proto.logs.v1.ResourceLogs - * @instance - */ - ResourceLogs.prototype.resource = null; - /** - * ResourceLogs scopeLogs. - * @member {Array.} scopeLogs - * @memberof opentelemetry.proto.logs.v1.ResourceLogs - * @instance - */ - ResourceLogs.prototype.scopeLogs = $util.emptyArray; - /** - * ResourceLogs schemaUrl. - * @member {string|null|undefined} schemaUrl - * @memberof opentelemetry.proto.logs.v1.ResourceLogs - * @instance - */ - ResourceLogs.prototype.schemaUrl = null; - /** - * Creates a new ResourceLogs instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.logs.v1.ResourceLogs - * @static - * @param {opentelemetry.proto.logs.v1.IResourceLogs=} [properties] Properties to set - * @returns {opentelemetry.proto.logs.v1.ResourceLogs} ResourceLogs instance - */ - ResourceLogs.create = function create(properties) { - return new ResourceLogs(properties); - }; - /** - * Encodes the specified ResourceLogs message. Does not implicitly {@link opentelemetry.proto.logs.v1.ResourceLogs.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.logs.v1.ResourceLogs - * @static - * @param {opentelemetry.proto.logs.v1.IResourceLogs} message ResourceLogs message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceLogs.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.opentelemetry.proto.resource.v1.Resource.encode(message.resource, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - if (message.scopeLogs != null && message.scopeLogs.length) - for (var i = 0; i < message.scopeLogs.length; ++i) - $root.opentelemetry.proto.logs.v1.ScopeLogs.encode(message.scopeLogs[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); - if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); - return writer; - }; - /** - * Encodes the specified ResourceLogs message, length delimited. Does not implicitly {@link opentelemetry.proto.logs.v1.ResourceLogs.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.logs.v1.ResourceLogs - * @static - * @param {opentelemetry.proto.logs.v1.IResourceLogs} message ResourceLogs message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceLogs.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a ResourceLogs message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.logs.v1.ResourceLogs - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.logs.v1.ResourceLogs} ResourceLogs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceLogs.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.logs.v1.ResourceLogs(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = $root.opentelemetry.proto.resource.v1.Resource.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.scopeLogs && message.scopeLogs.length)) - message.scopeLogs = []; - message.scopeLogs.push($root.opentelemetry.proto.logs.v1.ScopeLogs.decode(reader, reader.uint32())); - break; - } - case 3: { - message.schemaUrl = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a ResourceLogs message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.logs.v1.ResourceLogs - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.logs.v1.ResourceLogs} ResourceLogs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceLogs.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a ResourceLogs message. - * @function verify - * @memberof opentelemetry.proto.logs.v1.ResourceLogs - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceLogs.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.opentelemetry.proto.resource.v1.Resource.verify(message.resource); - if (error) - return "resource." + error; - } - if (message.scopeLogs != null && message.hasOwnProperty("scopeLogs")) { - if (!Array.isArray(message.scopeLogs)) - return "scopeLogs: array expected"; - for (var i = 0; i < message.scopeLogs.length; ++i) { - var error = $root.opentelemetry.proto.logs.v1.ScopeLogs.verify(message.scopeLogs[i]); - if (error) - return "scopeLogs." + error; - } - } - if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) - if (!$util.isString(message.schemaUrl)) - return "schemaUrl: string expected"; - return null; - }; - /** - * Creates a ResourceLogs message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.logs.v1.ResourceLogs - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.logs.v1.ResourceLogs} ResourceLogs - */ - ResourceLogs.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.logs.v1.ResourceLogs) - return object; - var message = new $root.opentelemetry.proto.logs.v1.ResourceLogs(); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected"); - message.resource = $root.opentelemetry.proto.resource.v1.Resource.fromObject(object.resource); - } - if (object.scopeLogs) { - if (!Array.isArray(object.scopeLogs)) - throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected"); - message.scopeLogs = []; - for (var i = 0; i < object.scopeLogs.length; ++i) { - if (typeof object.scopeLogs[i] !== "object") - throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected"); - message.scopeLogs[i] = $root.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(object.scopeLogs[i]); - } - } - if (object.schemaUrl != null) - message.schemaUrl = String(object.schemaUrl); - return message; - }; - /** - * Creates a plain object from a ResourceLogs message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.logs.v1.ResourceLogs - * @static - * @param {opentelemetry.proto.logs.v1.ResourceLogs} message ResourceLogs - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceLogs.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.scopeLogs = []; - if (options.defaults) { - object.resource = null; - object.schemaUrl = ""; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource, options); - if (message.scopeLogs && message.scopeLogs.length) { - object.scopeLogs = []; - for (var j = 0; j < message.scopeLogs.length; ++j) - object.scopeLogs[j] = $root.opentelemetry.proto.logs.v1.ScopeLogs.toObject(message.scopeLogs[j], options); - } - if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) - object.schemaUrl = message.schemaUrl; - return object; - }; - /** - * Converts this ResourceLogs to JSON. - * @function toJSON - * @memberof opentelemetry.proto.logs.v1.ResourceLogs - * @instance - * @returns {Object.} JSON object - */ - ResourceLogs.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ResourceLogs - * @function getTypeUrl - * @memberof opentelemetry.proto.logs.v1.ResourceLogs - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceLogs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.logs.v1.ResourceLogs"; - }; - return ResourceLogs; - })(); - v1.ScopeLogs = (function () { - /** - * Properties of a ScopeLogs. - * @memberof opentelemetry.proto.logs.v1 - * @interface IScopeLogs - * @property {opentelemetry.proto.common.v1.IInstrumentationScope|null} [scope] ScopeLogs scope - * @property {Array.|null} [logRecords] ScopeLogs logRecords - * @property {string|null} [schemaUrl] ScopeLogs schemaUrl - */ - /** - * Constructs a new ScopeLogs. - * @memberof opentelemetry.proto.logs.v1 - * @classdesc Represents a ScopeLogs. - * @implements IScopeLogs - * @constructor - * @param {opentelemetry.proto.logs.v1.IScopeLogs=} [properties] Properties to set - */ - function ScopeLogs(properties) { - this.logRecords = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * ScopeLogs scope. - * @member {opentelemetry.proto.common.v1.IInstrumentationScope|null|undefined} scope - * @memberof opentelemetry.proto.logs.v1.ScopeLogs - * @instance - */ - ScopeLogs.prototype.scope = null; - /** - * ScopeLogs logRecords. - * @member {Array.} logRecords - * @memberof opentelemetry.proto.logs.v1.ScopeLogs - * @instance - */ - ScopeLogs.prototype.logRecords = $util.emptyArray; - /** - * ScopeLogs schemaUrl. - * @member {string|null|undefined} schemaUrl - * @memberof opentelemetry.proto.logs.v1.ScopeLogs - * @instance - */ - ScopeLogs.prototype.schemaUrl = null; - /** - * Creates a new ScopeLogs instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.logs.v1.ScopeLogs - * @static - * @param {opentelemetry.proto.logs.v1.IScopeLogs=} [properties] Properties to set - * @returns {opentelemetry.proto.logs.v1.ScopeLogs} ScopeLogs instance - */ - ScopeLogs.create = function create(properties) { - return new ScopeLogs(properties); - }; - /** - * Encodes the specified ScopeLogs message. Does not implicitly {@link opentelemetry.proto.logs.v1.ScopeLogs.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.logs.v1.ScopeLogs - * @static - * @param {opentelemetry.proto.logs.v1.IScopeLogs} message ScopeLogs message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScopeLogs.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) - $root.opentelemetry.proto.common.v1.InstrumentationScope.encode(message.scope, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim(); - if (message.logRecords != null && message.logRecords.length) - for (var i = 0; i < message.logRecords.length; ++i) - $root.opentelemetry.proto.logs.v1.LogRecord.encode(message.logRecords[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim(); - if (message.schemaUrl != null && Object.hasOwnProperty.call(message, "schemaUrl")) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl); - return writer; - }; - /** - * Encodes the specified ScopeLogs message, length delimited. Does not implicitly {@link opentelemetry.proto.logs.v1.ScopeLogs.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.logs.v1.ScopeLogs - * @static - * @param {opentelemetry.proto.logs.v1.IScopeLogs} message ScopeLogs message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScopeLogs.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a ScopeLogs message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.logs.v1.ScopeLogs - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.logs.v1.ScopeLogs} ScopeLogs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScopeLogs.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.logs.v1.ScopeLogs(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.logRecords && message.logRecords.length)) - message.logRecords = []; - message.logRecords.push($root.opentelemetry.proto.logs.v1.LogRecord.decode(reader, reader.uint32())); - break; - } - case 3: { - message.schemaUrl = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a ScopeLogs message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.logs.v1.ScopeLogs - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.logs.v1.ScopeLogs} ScopeLogs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScopeLogs.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a ScopeLogs message. - * @function verify - * @memberof opentelemetry.proto.logs.v1.ScopeLogs - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ScopeLogs.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scope != null && message.hasOwnProperty("scope")) { - var error = $root.opentelemetry.proto.common.v1.InstrumentationScope.verify(message.scope); - if (error) - return "scope." + error; - } - if (message.logRecords != null && message.hasOwnProperty("logRecords")) { - if (!Array.isArray(message.logRecords)) - return "logRecords: array expected"; - for (var i = 0; i < message.logRecords.length; ++i) { - var error = $root.opentelemetry.proto.logs.v1.LogRecord.verify(message.logRecords[i]); - if (error) - return "logRecords." + error; - } - } - if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) - if (!$util.isString(message.schemaUrl)) - return "schemaUrl: string expected"; - return null; - }; - /** - * Creates a ScopeLogs message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.logs.v1.ScopeLogs - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.logs.v1.ScopeLogs} ScopeLogs - */ - ScopeLogs.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.logs.v1.ScopeLogs) - return object; - var message = new $root.opentelemetry.proto.logs.v1.ScopeLogs(); - if (object.scope != null) { - if (typeof object.scope !== "object") - throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected"); - message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(object.scope); - } - if (object.logRecords) { - if (!Array.isArray(object.logRecords)) - throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected"); - message.logRecords = []; - for (var i = 0; i < object.logRecords.length; ++i) { - if (typeof object.logRecords[i] !== "object") - throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected"); - message.logRecords[i] = $root.opentelemetry.proto.logs.v1.LogRecord.fromObject(object.logRecords[i]); - } - } - if (object.schemaUrl != null) - message.schemaUrl = String(object.schemaUrl); - return message; - }; - /** - * Creates a plain object from a ScopeLogs message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.logs.v1.ScopeLogs - * @static - * @param {opentelemetry.proto.logs.v1.ScopeLogs} message ScopeLogs - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ScopeLogs.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.logRecords = []; - if (options.defaults) { - object.scope = null; - object.schemaUrl = ""; - } - if (message.scope != null && message.hasOwnProperty("scope")) - object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope, options); - if (message.logRecords && message.logRecords.length) { - object.logRecords = []; - for (var j = 0; j < message.logRecords.length; ++j) - object.logRecords[j] = $root.opentelemetry.proto.logs.v1.LogRecord.toObject(message.logRecords[j], options); - } - if (message.schemaUrl != null && message.hasOwnProperty("schemaUrl")) - object.schemaUrl = message.schemaUrl; - return object; - }; - /** - * Converts this ScopeLogs to JSON. - * @function toJSON - * @memberof opentelemetry.proto.logs.v1.ScopeLogs - * @instance - * @returns {Object.} JSON object - */ - ScopeLogs.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for ScopeLogs - * @function getTypeUrl - * @memberof opentelemetry.proto.logs.v1.ScopeLogs - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ScopeLogs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.logs.v1.ScopeLogs"; - }; - return ScopeLogs; - })(); - /** - * SeverityNumber enum. - * @name opentelemetry.proto.logs.v1.SeverityNumber - * @enum {number} - * @property {number} SEVERITY_NUMBER_UNSPECIFIED=0 SEVERITY_NUMBER_UNSPECIFIED value - * @property {number} SEVERITY_NUMBER_TRACE=1 SEVERITY_NUMBER_TRACE value - * @property {number} SEVERITY_NUMBER_TRACE2=2 SEVERITY_NUMBER_TRACE2 value - * @property {number} SEVERITY_NUMBER_TRACE3=3 SEVERITY_NUMBER_TRACE3 value - * @property {number} SEVERITY_NUMBER_TRACE4=4 SEVERITY_NUMBER_TRACE4 value - * @property {number} SEVERITY_NUMBER_DEBUG=5 SEVERITY_NUMBER_DEBUG value - * @property {number} SEVERITY_NUMBER_DEBUG2=6 SEVERITY_NUMBER_DEBUG2 value - * @property {number} SEVERITY_NUMBER_DEBUG3=7 SEVERITY_NUMBER_DEBUG3 value - * @property {number} SEVERITY_NUMBER_DEBUG4=8 SEVERITY_NUMBER_DEBUG4 value - * @property {number} SEVERITY_NUMBER_INFO=9 SEVERITY_NUMBER_INFO value - * @property {number} SEVERITY_NUMBER_INFO2=10 SEVERITY_NUMBER_INFO2 value - * @property {number} SEVERITY_NUMBER_INFO3=11 SEVERITY_NUMBER_INFO3 value - * @property {number} SEVERITY_NUMBER_INFO4=12 SEVERITY_NUMBER_INFO4 value - * @property {number} SEVERITY_NUMBER_WARN=13 SEVERITY_NUMBER_WARN value - * @property {number} SEVERITY_NUMBER_WARN2=14 SEVERITY_NUMBER_WARN2 value - * @property {number} SEVERITY_NUMBER_WARN3=15 SEVERITY_NUMBER_WARN3 value - * @property {number} SEVERITY_NUMBER_WARN4=16 SEVERITY_NUMBER_WARN4 value - * @property {number} SEVERITY_NUMBER_ERROR=17 SEVERITY_NUMBER_ERROR value - * @property {number} SEVERITY_NUMBER_ERROR2=18 SEVERITY_NUMBER_ERROR2 value - * @property {number} SEVERITY_NUMBER_ERROR3=19 SEVERITY_NUMBER_ERROR3 value - * @property {number} SEVERITY_NUMBER_ERROR4=20 SEVERITY_NUMBER_ERROR4 value - * @property {number} SEVERITY_NUMBER_FATAL=21 SEVERITY_NUMBER_FATAL value - * @property {number} SEVERITY_NUMBER_FATAL2=22 SEVERITY_NUMBER_FATAL2 value - * @property {number} SEVERITY_NUMBER_FATAL3=23 SEVERITY_NUMBER_FATAL3 value - * @property {number} SEVERITY_NUMBER_FATAL4=24 SEVERITY_NUMBER_FATAL4 value - */ - v1.SeverityNumber = (function () { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEVERITY_NUMBER_UNSPECIFIED"] = 0; - values[valuesById[1] = "SEVERITY_NUMBER_TRACE"] = 1; - values[valuesById[2] = "SEVERITY_NUMBER_TRACE2"] = 2; - values[valuesById[3] = "SEVERITY_NUMBER_TRACE3"] = 3; - values[valuesById[4] = "SEVERITY_NUMBER_TRACE4"] = 4; - values[valuesById[5] = "SEVERITY_NUMBER_DEBUG"] = 5; - values[valuesById[6] = "SEVERITY_NUMBER_DEBUG2"] = 6; - values[valuesById[7] = "SEVERITY_NUMBER_DEBUG3"] = 7; - values[valuesById[8] = "SEVERITY_NUMBER_DEBUG4"] = 8; - values[valuesById[9] = "SEVERITY_NUMBER_INFO"] = 9; - values[valuesById[10] = "SEVERITY_NUMBER_INFO2"] = 10; - values[valuesById[11] = "SEVERITY_NUMBER_INFO3"] = 11; - values[valuesById[12] = "SEVERITY_NUMBER_INFO4"] = 12; - values[valuesById[13] = "SEVERITY_NUMBER_WARN"] = 13; - values[valuesById[14] = "SEVERITY_NUMBER_WARN2"] = 14; - values[valuesById[15] = "SEVERITY_NUMBER_WARN3"] = 15; - values[valuesById[16] = "SEVERITY_NUMBER_WARN4"] = 16; - values[valuesById[17] = "SEVERITY_NUMBER_ERROR"] = 17; - values[valuesById[18] = "SEVERITY_NUMBER_ERROR2"] = 18; - values[valuesById[19] = "SEVERITY_NUMBER_ERROR3"] = 19; - values[valuesById[20] = "SEVERITY_NUMBER_ERROR4"] = 20; - values[valuesById[21] = "SEVERITY_NUMBER_FATAL"] = 21; - values[valuesById[22] = "SEVERITY_NUMBER_FATAL2"] = 22; - values[valuesById[23] = "SEVERITY_NUMBER_FATAL3"] = 23; - values[valuesById[24] = "SEVERITY_NUMBER_FATAL4"] = 24; - return values; - })(); - /** - * LogRecordFlags enum. - * @name opentelemetry.proto.logs.v1.LogRecordFlags - * @enum {number} - * @property {number} LOG_RECORD_FLAGS_DO_NOT_USE=0 LOG_RECORD_FLAGS_DO_NOT_USE value - * @property {number} LOG_RECORD_FLAGS_TRACE_FLAGS_MASK=255 LOG_RECORD_FLAGS_TRACE_FLAGS_MASK value - */ - v1.LogRecordFlags = (function () { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOG_RECORD_FLAGS_DO_NOT_USE"] = 0; - values[valuesById[255] = "LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"] = 255; - return values; - })(); - v1.LogRecord = (function () { - /** - * Properties of a LogRecord. - * @memberof opentelemetry.proto.logs.v1 - * @interface ILogRecord - * @property {number|Long|null} [timeUnixNano] LogRecord timeUnixNano - * @property {number|Long|null} [observedTimeUnixNano] LogRecord observedTimeUnixNano - * @property {opentelemetry.proto.logs.v1.SeverityNumber|null} [severityNumber] LogRecord severityNumber - * @property {string|null} [severityText] LogRecord severityText - * @property {opentelemetry.proto.common.v1.IAnyValue|null} [body] LogRecord body - * @property {Array.|null} [attributes] LogRecord attributes - * @property {number|null} [droppedAttributesCount] LogRecord droppedAttributesCount - * @property {number|null} [flags] LogRecord flags - * @property {Uint8Array|null} [traceId] LogRecord traceId - * @property {Uint8Array|null} [spanId] LogRecord spanId - */ - /** - * Constructs a new LogRecord. - * @memberof opentelemetry.proto.logs.v1 - * @classdesc Represents a LogRecord. - * @implements ILogRecord - * @constructor - * @param {opentelemetry.proto.logs.v1.ILogRecord=} [properties] Properties to set - */ - function LogRecord(properties) { - this.attributes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - /** - * LogRecord timeUnixNano. - * @member {number|Long|null|undefined} timeUnixNano - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @instance - */ - LogRecord.prototype.timeUnixNano = null; - /** - * LogRecord observedTimeUnixNano. - * @member {number|Long|null|undefined} observedTimeUnixNano - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @instance - */ - LogRecord.prototype.observedTimeUnixNano = null; - /** - * LogRecord severityNumber. - * @member {opentelemetry.proto.logs.v1.SeverityNumber|null|undefined} severityNumber - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @instance - */ - LogRecord.prototype.severityNumber = null; - /** - * LogRecord severityText. - * @member {string|null|undefined} severityText - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @instance - */ - LogRecord.prototype.severityText = null; - /** - * LogRecord body. - * @member {opentelemetry.proto.common.v1.IAnyValue|null|undefined} body - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @instance - */ - LogRecord.prototype.body = null; - /** - * LogRecord attributes. - * @member {Array.} attributes - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @instance - */ - LogRecord.prototype.attributes = $util.emptyArray; - /** - * LogRecord droppedAttributesCount. - * @member {number|null|undefined} droppedAttributesCount - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @instance - */ - LogRecord.prototype.droppedAttributesCount = null; - /** - * LogRecord flags. - * @member {number|null|undefined} flags - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @instance - */ - LogRecord.prototype.flags = null; - /** - * LogRecord traceId. - * @member {Uint8Array|null|undefined} traceId - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @instance - */ - LogRecord.prototype.traceId = null; - /** - * LogRecord spanId. - * @member {Uint8Array|null|undefined} spanId - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @instance - */ - LogRecord.prototype.spanId = null; - /** - * Creates a new LogRecord instance using the specified properties. - * @function create - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @static - * @param {opentelemetry.proto.logs.v1.ILogRecord=} [properties] Properties to set - * @returns {opentelemetry.proto.logs.v1.LogRecord} LogRecord instance - */ - LogRecord.create = function create(properties) { - return new LogRecord(properties); - }; - /** - * Encodes the specified LogRecord message. Does not implicitly {@link opentelemetry.proto.logs.v1.LogRecord.verify|verify} messages. - * @function encode - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @static - * @param {opentelemetry.proto.logs.v1.ILogRecord} message LogRecord message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogRecord.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, "timeUnixNano")) - writer.uint32(/* id 1, wireType 1 =*/ 9).fixed64(message.timeUnixNano); - if (message.severityNumber != null && Object.hasOwnProperty.call(message, "severityNumber")) - writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.severityNumber); - if (message.severityText != null && Object.hasOwnProperty.call(message, "severityText")) - writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.severityText); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - $root.opentelemetry.proto.common.v1.AnyValue.encode(message.body, writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim(); - if (message.attributes != null && message.attributes.length) - for (var i = 0; i < message.attributes.length; ++i) - $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 6, wireType 2 =*/ 50).fork()).ldelim(); - if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, "droppedAttributesCount")) - writer.uint32(/* id 7, wireType 0 =*/ 56).uint32(message.droppedAttributesCount); - if (message.flags != null && Object.hasOwnProperty.call(message, "flags")) - writer.uint32(/* id 8, wireType 5 =*/ 69).fixed32(message.flags); - if (message.traceId != null && Object.hasOwnProperty.call(message, "traceId")) - writer.uint32(/* id 9, wireType 2 =*/ 74).bytes(message.traceId); - if (message.spanId != null && Object.hasOwnProperty.call(message, "spanId")) - writer.uint32(/* id 10, wireType 2 =*/ 82).bytes(message.spanId); - if (message.observedTimeUnixNano != null && Object.hasOwnProperty.call(message, "observedTimeUnixNano")) - writer.uint32(/* id 11, wireType 1 =*/ 89).fixed64(message.observedTimeUnixNano); - return writer; - }; - /** - * Encodes the specified LogRecord message, length delimited. Does not implicitly {@link opentelemetry.proto.logs.v1.LogRecord.verify|verify} messages. - * @function encodeDelimited - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @static - * @param {opentelemetry.proto.logs.v1.ILogRecord} message LogRecord message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LogRecord.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - /** - * Decodes a LogRecord message from the specified reader or buffer. - * @function decode - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {opentelemetry.proto.logs.v1.LogRecord} LogRecord - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogRecord.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.logs.v1.LogRecord(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.timeUnixNano = reader.fixed64(); - break; - } - case 11: { - message.observedTimeUnixNano = reader.fixed64(); - break; - } - case 2: { - message.severityNumber = reader.int32(); - break; - } - case 3: { - message.severityText = reader.string(); - break; - } - case 5: { - message.body = $root.opentelemetry.proto.common.v1.AnyValue.decode(reader, reader.uint32()); - break; - } - case 6: { - if (!(message.attributes && message.attributes.length)) - message.attributes = []; - message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32())); - break; - } - case 7: { - message.droppedAttributesCount = reader.uint32(); - break; - } - case 8: { - message.flags = reader.fixed32(); - break; - } - case 9: { - message.traceId = reader.bytes(); - break; - } - case 10: { - message.spanId = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - /** - * Decodes a LogRecord message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {opentelemetry.proto.logs.v1.LogRecord} LogRecord - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LogRecord.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - /** - * Verifies a LogRecord message. - * @function verify - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LogRecord.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) - if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high))) - return "timeUnixNano: integer|Long expected"; - if (message.observedTimeUnixNano != null && message.hasOwnProperty("observedTimeUnixNano")) - if (!$util.isInteger(message.observedTimeUnixNano) && !(message.observedTimeUnixNano && $util.isInteger(message.observedTimeUnixNano.low) && $util.isInteger(message.observedTimeUnixNano.high))) - return "observedTimeUnixNano: integer|Long expected"; - if (message.severityNumber != null && message.hasOwnProperty("severityNumber")) - switch (message.severityNumber) { - default: - return "severityNumber: enum value expected"; - 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: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - case 21: - case 22: - case 23: - case 24: - break; - } - if (message.severityText != null && message.hasOwnProperty("severityText")) - if (!$util.isString(message.severityText)) - return "severityText: string expected"; - if (message.body != null && message.hasOwnProperty("body")) { - var error = $root.opentelemetry.proto.common.v1.AnyValue.verify(message.body); - if (error) - return "body." + error; - } - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!Array.isArray(message.attributes)) - return "attributes: array expected"; - for (var i = 0; i < message.attributes.length; ++i) { - var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]); - if (error) - return "attributes." + error; - } - } - if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) - if (!$util.isInteger(message.droppedAttributesCount)) - return "droppedAttributesCount: integer expected"; - if (message.flags != null && message.hasOwnProperty("flags")) - if (!$util.isInteger(message.flags)) - return "flags: integer expected"; - if (message.traceId != null && message.hasOwnProperty("traceId")) - if (!(message.traceId && typeof message.traceId.length === "number" || $util.isString(message.traceId))) - return "traceId: buffer expected"; - if (message.spanId != null && message.hasOwnProperty("spanId")) - if (!(message.spanId && typeof message.spanId.length === "number" || $util.isString(message.spanId))) - return "spanId: buffer expected"; - return null; - }; - /** - * Creates a LogRecord message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @static - * @param {Object.} object Plain object - * @returns {opentelemetry.proto.logs.v1.LogRecord} LogRecord - */ - LogRecord.fromObject = function fromObject(object) { - if (object instanceof $root.opentelemetry.proto.logs.v1.LogRecord) - return object; - var message = new $root.opentelemetry.proto.logs.v1.LogRecord(); - if (object.timeUnixNano != null) - if ($util.Long) - (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false; - else if (typeof object.timeUnixNano === "string") - message.timeUnixNano = parseInt(object.timeUnixNano, 10); - else if (typeof object.timeUnixNano === "number") - message.timeUnixNano = object.timeUnixNano; - else if (typeof object.timeUnixNano === "object") - message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber(); - if (object.observedTimeUnixNano != null) - if ($util.Long) - (message.observedTimeUnixNano = $util.Long.fromValue(object.observedTimeUnixNano)).unsigned = false; - else if (typeof object.observedTimeUnixNano === "string") - message.observedTimeUnixNano = parseInt(object.observedTimeUnixNano, 10); - else if (typeof object.observedTimeUnixNano === "number") - message.observedTimeUnixNano = object.observedTimeUnixNano; - else if (typeof object.observedTimeUnixNano === "object") - message.observedTimeUnixNano = new $util.LongBits(object.observedTimeUnixNano.low >>> 0, object.observedTimeUnixNano.high >>> 0).toNumber(); - switch (object.severityNumber) { - default: - if (typeof object.severityNumber === "number") { - message.severityNumber = object.severityNumber; - break; - } - break; - case "SEVERITY_NUMBER_UNSPECIFIED": - case 0: - message.severityNumber = 0; - break; - case "SEVERITY_NUMBER_TRACE": - case 1: - message.severityNumber = 1; - break; - case "SEVERITY_NUMBER_TRACE2": - case 2: - message.severityNumber = 2; - break; - case "SEVERITY_NUMBER_TRACE3": - case 3: - message.severityNumber = 3; - break; - case "SEVERITY_NUMBER_TRACE4": - case 4: - message.severityNumber = 4; - break; - case "SEVERITY_NUMBER_DEBUG": - case 5: - message.severityNumber = 5; - break; - case "SEVERITY_NUMBER_DEBUG2": - case 6: - message.severityNumber = 6; - break; - case "SEVERITY_NUMBER_DEBUG3": - case 7: - message.severityNumber = 7; - break; - case "SEVERITY_NUMBER_DEBUG4": - case 8: - message.severityNumber = 8; - break; - case "SEVERITY_NUMBER_INFO": - case 9: - message.severityNumber = 9; - break; - case "SEVERITY_NUMBER_INFO2": - case 10: - message.severityNumber = 10; - break; - case "SEVERITY_NUMBER_INFO3": - case 11: - message.severityNumber = 11; - break; - case "SEVERITY_NUMBER_INFO4": - case 12: - message.severityNumber = 12; - break; - case "SEVERITY_NUMBER_WARN": - case 13: - message.severityNumber = 13; - break; - case "SEVERITY_NUMBER_WARN2": - case 14: - message.severityNumber = 14; - break; - case "SEVERITY_NUMBER_WARN3": - case 15: - message.severityNumber = 15; - break; - case "SEVERITY_NUMBER_WARN4": - case 16: - message.severityNumber = 16; - break; - case "SEVERITY_NUMBER_ERROR": - case 17: - message.severityNumber = 17; - break; - case "SEVERITY_NUMBER_ERROR2": - case 18: - message.severityNumber = 18; - break; - case "SEVERITY_NUMBER_ERROR3": - case 19: - message.severityNumber = 19; - break; - case "SEVERITY_NUMBER_ERROR4": - case 20: - message.severityNumber = 20; - break; - case "SEVERITY_NUMBER_FATAL": - case 21: - message.severityNumber = 21; - break; - case "SEVERITY_NUMBER_FATAL2": - case 22: - message.severityNumber = 22; - break; - case "SEVERITY_NUMBER_FATAL3": - case 23: - message.severityNumber = 23; - break; - case "SEVERITY_NUMBER_FATAL4": - case 24: - message.severityNumber = 24; - break; - } - if (object.severityText != null) - message.severityText = String(object.severityText); - if (object.body != null) { - if (typeof object.body !== "object") - throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected"); - message.body = $root.opentelemetry.proto.common.v1.AnyValue.fromObject(object.body); - } - if (object.attributes) { - if (!Array.isArray(object.attributes)) - throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected"); - message.attributes = []; - for (var i = 0; i < object.attributes.length; ++i) { - if (typeof object.attributes[i] !== "object") - throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected"); - message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]); - } - } - if (object.droppedAttributesCount != null) - message.droppedAttributesCount = object.droppedAttributesCount >>> 0; - if (object.flags != null) - message.flags = object.flags >>> 0; - if (object.traceId != null) - if (typeof object.traceId === "string") - $util.base64.decode(object.traceId, message.traceId = $util.newBuffer($util.base64.length(object.traceId)), 0); - else if (object.traceId.length >= 0) - message.traceId = object.traceId; - if (object.spanId != null) - if (typeof object.spanId === "string") - $util.base64.decode(object.spanId, message.spanId = $util.newBuffer($util.base64.length(object.spanId)), 0); - else if (object.spanId.length >= 0) - message.spanId = object.spanId; - return message; - }; - /** - * Creates a plain object from a LogRecord message. Also converts values to other types if specified. - * @function toObject - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @static - * @param {opentelemetry.proto.logs.v1.LogRecord} message LogRecord - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LogRecord.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.attributes = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.timeUnixNano = options.longs === String ? "0" : 0; - object.severityNumber = options.enums === String ? "SEVERITY_NUMBER_UNSPECIFIED" : 0; - object.severityText = ""; - object.body = null; - object.droppedAttributesCount = 0; - object.flags = 0; - if (options.bytes === String) - object.traceId = ""; - else { - object.traceId = []; - if (options.bytes !== Array) - object.traceId = $util.newBuffer(object.traceId); - } - if (options.bytes === String) - object.spanId = ""; - else { - object.spanId = []; - if (options.bytes !== Array) - object.spanId = $util.newBuffer(object.spanId); - } - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.observedTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } - else - object.observedTimeUnixNano = options.longs === String ? "0" : 0; - } - if (message.timeUnixNano != null && message.hasOwnProperty("timeUnixNano")) - if (typeof message.timeUnixNano === "number") - object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano; - else - object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano; - if (message.severityNumber != null && message.hasOwnProperty("severityNumber")) - object.severityNumber = options.enums === String ? $root.opentelemetry.proto.logs.v1.SeverityNumber[message.severityNumber] === undefined ? message.severityNumber : $root.opentelemetry.proto.logs.v1.SeverityNumber[message.severityNumber] : message.severityNumber; - if (message.severityText != null && message.hasOwnProperty("severityText")) - object.severityText = message.severityText; - if (message.body != null && message.hasOwnProperty("body")) - object.body = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.body, options); - if (message.attributes && message.attributes.length) { - object.attributes = []; - for (var j = 0; j < message.attributes.length; ++j) - object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options); - } - if (message.droppedAttributesCount != null && message.hasOwnProperty("droppedAttributesCount")) - object.droppedAttributesCount = message.droppedAttributesCount; - if (message.flags != null && message.hasOwnProperty("flags")) - object.flags = message.flags; - if (message.traceId != null && message.hasOwnProperty("traceId")) - object.traceId = options.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId; - if (message.spanId != null && message.hasOwnProperty("spanId")) - object.spanId = options.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId; - if (message.observedTimeUnixNano != null && message.hasOwnProperty("observedTimeUnixNano")) - if (typeof message.observedTimeUnixNano === "number") - object.observedTimeUnixNano = options.longs === String ? String(message.observedTimeUnixNano) : message.observedTimeUnixNano; - else - object.observedTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.observedTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.observedTimeUnixNano.low >>> 0, message.observedTimeUnixNano.high >>> 0).toNumber() : message.observedTimeUnixNano; - return object; - }; - /** - * Converts this LogRecord to JSON. - * @function toJSON - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @instance - * @returns {Object.} JSON object - */ - LogRecord.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - /** - * Gets the default type url for LogRecord - * @function getTypeUrl - * @memberof opentelemetry.proto.logs.v1.LogRecord - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LogRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/opentelemetry.proto.logs.v1.LogRecord"; - }; - return LogRecord; - })(); - return v1; - })(); - return logs; - })(); - return proto; - })(); - return opentelemetry; -})(); -module.exports = $root; -//# sourceMappingURL=root.js.map - -/***/ }), - -/***/ 74357: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.JsonMetricsSerializer = exports.JsonLogsSerializer = exports.JsonTraceSerializer = exports.ProtobufTraceSerializer = exports.ProtobufMetricsSerializer = exports.ProtobufLogsSerializer = exports.createExportLogsServiceRequest = exports.createExportMetricsServiceRequest = exports.createExportTraceServiceRequest = exports.ESpanKind = exports.hrTimeToNanos = exports.encodeAsString = exports.encodeAsLongBits = exports.getOtlpEncoder = exports.toLongBits = void 0; -var common_1 = __nccwpck_require__(27471); -Object.defineProperty(exports, "toLongBits", ({ enumerable: true, get: function () { return common_1.toLongBits; } })); -Object.defineProperty(exports, "getOtlpEncoder", ({ enumerable: true, get: function () { return common_1.getOtlpEncoder; } })); -Object.defineProperty(exports, "encodeAsLongBits", ({ enumerable: true, get: function () { return common_1.encodeAsLongBits; } })); -Object.defineProperty(exports, "encodeAsString", ({ enumerable: true, get: function () { return common_1.encodeAsString; } })); -Object.defineProperty(exports, "hrTimeToNanos", ({ enumerable: true, get: function () { return common_1.hrTimeToNanos; } })); -var types_1 = __nccwpck_require__(31699); -Object.defineProperty(exports, "ESpanKind", ({ enumerable: true, get: function () { return types_1.ESpanKind; } })); -var trace_1 = __nccwpck_require__(29036); -Object.defineProperty(exports, "createExportTraceServiceRequest", ({ enumerable: true, get: function () { return trace_1.createExportTraceServiceRequest; } })); -var metrics_1 = __nccwpck_require__(17387); -Object.defineProperty(exports, "createExportMetricsServiceRequest", ({ enumerable: true, get: function () { return metrics_1.createExportMetricsServiceRequest; } })); -var logs_1 = __nccwpck_require__(17861); -Object.defineProperty(exports, "createExportLogsServiceRequest", ({ enumerable: true, get: function () { return logs_1.createExportLogsServiceRequest; } })); -var serializers_1 = __nccwpck_require__(16443); -Object.defineProperty(exports, "ProtobufLogsSerializer", ({ enumerable: true, get: function () { return serializers_1.ProtobufLogsSerializer; } })); -Object.defineProperty(exports, "ProtobufMetricsSerializer", ({ enumerable: true, get: function () { return serializers_1.ProtobufMetricsSerializer; } })); -Object.defineProperty(exports, "ProtobufTraceSerializer", ({ enumerable: true, get: function () { return serializers_1.ProtobufTraceSerializer; } })); -var serializers_2 = __nccwpck_require__(9338); -Object.defineProperty(exports, "JsonTraceSerializer", ({ enumerable: true, get: function () { return serializers_2.JsonTraceSerializer; } })); -Object.defineProperty(exports, "JsonLogsSerializer", ({ enumerable: true, get: function () { return serializers_2.JsonLogsSerializer; } })); -Object.defineProperty(exports, "JsonMetricsSerializer", ({ enumerable: true, get: function () { return serializers_2.JsonMetricsSerializer; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 9338: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.JsonLogsSerializer = exports.JsonMetricsSerializer = exports.JsonTraceSerializer = void 0; -const trace_1 = __nccwpck_require__(29036); -const metrics_1 = __nccwpck_require__(17387); -const logs_1 = __nccwpck_require__(17861); -exports.JsonTraceSerializer = { - serializeRequest: (arg) => { - const request = (0, trace_1.createExportTraceServiceRequest)(arg, { - useHex: true, - useLongBits: false, - }); - const encoder = new TextEncoder(); - return encoder.encode(JSON.stringify(request)); - }, - deserializeResponse: (arg) => { - const decoder = new TextDecoder(); - return JSON.parse(decoder.decode(arg)); - }, -}; -exports.JsonMetricsSerializer = { - serializeRequest: (arg) => { - const request = (0, metrics_1.createExportMetricsServiceRequest)(arg, { - useLongBits: false, - }); - const encoder = new TextEncoder(); - return encoder.encode(JSON.stringify(request)); - }, - deserializeResponse: (arg) => { - const decoder = new TextDecoder(); - return JSON.parse(decoder.decode(arg)); - }, -}; -exports.JsonLogsSerializer = { - serializeRequest: (arg) => { - const request = (0, logs_1.createExportLogsServiceRequest)(arg, { - useHex: true, - useLongBits: false, - }); - const encoder = new TextEncoder(); - return encoder.encode(JSON.stringify(request)); - }, - deserializeResponse: (arg) => { - const decoder = new TextDecoder(); - return JSON.parse(decoder.decode(arg)); - }, -}; -//# sourceMappingURL=serializers.js.map - -/***/ }), - -/***/ 17861: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toLogAttributes = exports.createExportLogsServiceRequest = void 0; -const common_1 = __nccwpck_require__(27471); -const internal_1 = __nccwpck_require__(50037); -const internal_2 = __nccwpck_require__(72018); -function createExportLogsServiceRequest(logRecords, options) { - const encoder = (0, common_1.getOtlpEncoder)(options); - return { - resourceLogs: logRecordsToResourceLogs(logRecords, encoder), - }; -} -exports.createExportLogsServiceRequest = createExportLogsServiceRequest; -function createResourceMap(logRecords) { - const resourceMap = new Map(); - for (const record of logRecords) { - const { resource, instrumentationScope: { name, version = '', schemaUrl = '' }, } = record; - let ismMap = resourceMap.get(resource); - if (!ismMap) { - ismMap = new Map(); - resourceMap.set(resource, ismMap); - } - const ismKey = `${name}@${version}:${schemaUrl}`; - let records = ismMap.get(ismKey); - if (!records) { - records = []; - ismMap.set(ismKey, records); - } - records.push(record); - } - return resourceMap; -} -function logRecordsToResourceLogs(logRecords, encoder) { - const resourceMap = createResourceMap(logRecords); - return Array.from(resourceMap, ([resource, ismMap]) => ({ - resource: (0, internal_2.createResource)(resource), - scopeLogs: Array.from(ismMap, ([, scopeLogs]) => { - return { - scope: (0, internal_1.createInstrumentationScope)(scopeLogs[0].instrumentationScope), - logRecords: scopeLogs.map(log => toLogRecord(log, encoder)), - schemaUrl: scopeLogs[0].instrumentationScope.schemaUrl, - }; - }), - schemaUrl: undefined, - })); -} -function toLogRecord(log, encoder) { - var _a, _b, _c; - return { - timeUnixNano: encoder.encodeHrTime(log.hrTime), - observedTimeUnixNano: encoder.encodeHrTime(log.hrTimeObserved), - severityNumber: toSeverityNumber(log.severityNumber), - severityText: log.severityText, - body: (0, internal_1.toAnyValue)(log.body), - attributes: toLogAttributes(log.attributes), - droppedAttributesCount: log.droppedAttributesCount, - flags: (_a = log.spanContext) === null || _a === void 0 ? void 0 : _a.traceFlags, - traceId: encoder.encodeOptionalSpanContext((_b = log.spanContext) === null || _b === void 0 ? void 0 : _b.traceId), - spanId: encoder.encodeOptionalSpanContext((_c = log.spanContext) === null || _c === void 0 ? void 0 : _c.spanId), - }; -} -function toSeverityNumber(severityNumber) { - return severityNumber; -} -function toLogAttributes(attributes) { - return Object.keys(attributes).map(key => (0, internal_1.toKeyValue)(key, attributes[key])); -} -exports.toLogAttributes = toLogAttributes; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 17387: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createExportMetricsServiceRequest = void 0; -const internal_1 = __nccwpck_require__(2587); -function createExportMetricsServiceRequest(resourceMetrics, options) { - return { - resourceMetrics: resourceMetrics.map(metrics => (0, internal_1.toResourceMetrics)(metrics, options)), - }; -} -exports.createExportMetricsServiceRequest = createExportMetricsServiceRequest; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 2587: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toMetric = exports.toScopeMetrics = exports.toResourceMetrics = void 0; -const api_1 = __nccwpck_require__(65163); -const sdk_metrics_1 = __nccwpck_require__(67349); -const common_1 = __nccwpck_require__(27471); -const internal_1 = __nccwpck_require__(50037); -const internal_2 = __nccwpck_require__(72018); -function toResourceMetrics(resourceMetrics, options) { - const encoder = (0, common_1.getOtlpEncoder)(options); - return { - resource: (0, internal_2.createResource)(resourceMetrics.resource), - schemaUrl: undefined, - scopeMetrics: toScopeMetrics(resourceMetrics.scopeMetrics, encoder), - }; -} -exports.toResourceMetrics = toResourceMetrics; -function toScopeMetrics(scopeMetrics, encoder) { - return Array.from(scopeMetrics.map(metrics => ({ - scope: (0, internal_1.createInstrumentationScope)(metrics.scope), - metrics: metrics.metrics.map(metricData => toMetric(metricData, encoder)), - schemaUrl: metrics.scope.schemaUrl, - }))); -} -exports.toScopeMetrics = toScopeMetrics; -function toMetric(metricData, encoder) { - const out = { - name: metricData.descriptor.name, - description: metricData.descriptor.description, - unit: metricData.descriptor.unit, - }; - const aggregationTemporality = toAggregationTemporality(metricData.aggregationTemporality); - switch (metricData.dataPointType) { - case sdk_metrics_1.DataPointType.SUM: - out.sum = { - aggregationTemporality, - isMonotonic: metricData.isMonotonic, - dataPoints: toSingularDataPoints(metricData, encoder), - }; - break; - case sdk_metrics_1.DataPointType.GAUGE: - out.gauge = { - dataPoints: toSingularDataPoints(metricData, encoder), - }; - break; - case sdk_metrics_1.DataPointType.HISTOGRAM: - out.histogram = { - aggregationTemporality, - dataPoints: toHistogramDataPoints(metricData, encoder), - }; - break; - case sdk_metrics_1.DataPointType.EXPONENTIAL_HISTOGRAM: - out.exponentialHistogram = { - aggregationTemporality, - dataPoints: toExponentialHistogramDataPoints(metricData, encoder), - }; - break; - } - return out; -} -exports.toMetric = toMetric; -function toSingularDataPoint(dataPoint, valueType, encoder) { - const out = { - attributes: (0, internal_1.toAttributes)(dataPoint.attributes), - startTimeUnixNano: encoder.encodeHrTime(dataPoint.startTime), - timeUnixNano: encoder.encodeHrTime(dataPoint.endTime), - }; - switch (valueType) { - case api_1.ValueType.INT: - out.asInt = dataPoint.value; - break; - case api_1.ValueType.DOUBLE: - out.asDouble = dataPoint.value; - break; - } - return out; -} -function toSingularDataPoints(metricData, encoder) { - return metricData.dataPoints.map(dataPoint => { - return toSingularDataPoint(dataPoint, metricData.descriptor.valueType, encoder); - }); -} -function toHistogramDataPoints(metricData, encoder) { - return metricData.dataPoints.map(dataPoint => { - const histogram = dataPoint.value; - return { - attributes: (0, internal_1.toAttributes)(dataPoint.attributes), - bucketCounts: histogram.buckets.counts, - explicitBounds: histogram.buckets.boundaries, - count: histogram.count, - sum: histogram.sum, - min: histogram.min, - max: histogram.max, - startTimeUnixNano: encoder.encodeHrTime(dataPoint.startTime), - timeUnixNano: encoder.encodeHrTime(dataPoint.endTime), - }; - }); -} -function toExponentialHistogramDataPoints(metricData, encoder) { - return metricData.dataPoints.map(dataPoint => { - const histogram = dataPoint.value; - return { - attributes: (0, internal_1.toAttributes)(dataPoint.attributes), - count: histogram.count, - min: histogram.min, - max: histogram.max, - sum: histogram.sum, - positive: { - offset: histogram.positive.offset, - bucketCounts: histogram.positive.bucketCounts, - }, - negative: { - offset: histogram.negative.offset, - bucketCounts: histogram.negative.bucketCounts, - }, - scale: histogram.scale, - zeroCount: histogram.zeroCount, - startTimeUnixNano: encoder.encodeHrTime(dataPoint.startTime), - timeUnixNano: encoder.encodeHrTime(dataPoint.endTime), - }; - }); -} -function toAggregationTemporality(temporality) { - switch (temporality) { - case sdk_metrics_1.AggregationTemporality.DELTA: - return 1 /* AGGREGATION_TEMPORALITY_DELTA */; - case sdk_metrics_1.AggregationTemporality.CUMULATIVE: - return 2 /* AGGREGATION_TEMPORALITY_CUMULATIVE */; - } -} -//# sourceMappingURL=internal.js.map - -/***/ }), - -/***/ 16443: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ProtobufTraceSerializer = exports.ProtobufMetricsSerializer = exports.ProtobufLogsSerializer = void 0; -const root = __nccwpck_require__(75574); -const trace_1 = __nccwpck_require__(29036); -const metrics_1 = __nccwpck_require__(17387); -const logs_1 = __nccwpck_require__(17861); -const logsResponseType = root.opentelemetry.proto.collector.logs.v1 - .ExportLogsServiceResponse; -const logsRequestType = root.opentelemetry.proto.collector.logs.v1 - .ExportLogsServiceRequest; -const metricsResponseType = root.opentelemetry.proto.collector.metrics.v1 - .ExportMetricsServiceResponse; -const metricsRequestType = root.opentelemetry.proto.collector.metrics.v1 - .ExportMetricsServiceRequest; -const traceResponseType = root.opentelemetry.proto.collector.trace.v1 - .ExportTraceServiceResponse; -const traceRequestType = root.opentelemetry.proto.collector.trace.v1 - .ExportTraceServiceRequest; -exports.ProtobufLogsSerializer = { - serializeRequest: (arg) => { - const request = (0, logs_1.createExportLogsServiceRequest)(arg); - return logsRequestType.encode(request).finish(); - }, - deserializeResponse: (arg) => { - return logsResponseType.decode(arg); - }, -}; -exports.ProtobufMetricsSerializer = { - serializeRequest: (arg) => { - const request = (0, metrics_1.createExportMetricsServiceRequest)(arg); - return metricsRequestType.encode(request).finish(); - }, - deserializeResponse: (arg) => { - return metricsResponseType.decode(arg); - }, -}; -exports.ProtobufTraceSerializer = { - serializeRequest: (arg) => { - const request = (0, trace_1.createExportTraceServiceRequest)(arg); - return traceRequestType.encode(request).finish(); - }, - deserializeResponse: (arg) => { - return traceResponseType.decode(arg); - }, -}; -//# sourceMappingURL=serializers.js.map - -/***/ }), - -/***/ 72018: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createResource = void 0; -const internal_1 = __nccwpck_require__(50037); -function createResource(resource) { - return { - attributes: (0, internal_1.toAttributes)(resource.attributes), - droppedAttributesCount: 0, - }; -} -exports.createResource = createResource; -//# sourceMappingURL=internal.js.map - -/***/ }), - -/***/ 29036: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createExportTraceServiceRequest = void 0; -const internal_1 = __nccwpck_require__(18106); -const common_1 = __nccwpck_require__(27471); -const internal_2 = __nccwpck_require__(50037); -const internal_3 = __nccwpck_require__(72018); -function createExportTraceServiceRequest(spans, options) { - const encoder = (0, common_1.getOtlpEncoder)(options); - return { - resourceSpans: spanRecordsToResourceSpans(spans, encoder), - }; -} -exports.createExportTraceServiceRequest = createExportTraceServiceRequest; -function createResourceMap(readableSpans) { - const resourceMap = new Map(); - for (const record of readableSpans) { - let ilmMap = resourceMap.get(record.resource); - if (!ilmMap) { - ilmMap = new Map(); - resourceMap.set(record.resource, ilmMap); - } - // TODO this is duplicated in basic tracer. Consolidate on a common helper in core - const instrumentationLibraryKey = `${record.instrumentationLibrary.name}@${record.instrumentationLibrary.version || ''}:${record.instrumentationLibrary.schemaUrl || ''}`; - let records = ilmMap.get(instrumentationLibraryKey); - if (!records) { - records = []; - ilmMap.set(instrumentationLibraryKey, records); + 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; } - records.push(record); - } - return resourceMap; -} -function spanRecordsToResourceSpans(readableSpans, encoder) { - const resourceMap = createResourceMap(readableSpans); - const out = []; - const entryIterator = resourceMap.entries(); - let entry = entryIterator.next(); - while (!entry.done) { - const [resource, ilmMap] = entry.value; - const scopeResourceSpans = []; - const ilmIterator = ilmMap.values(); - let ilmEntry = ilmIterator.next(); - while (!ilmEntry.done) { - const scopeSpans = ilmEntry.value; - if (scopeSpans.length > 0) { - const spans = scopeSpans.map(readableSpan => (0, internal_1.sdkSpanToOtlpSpan)(readableSpan, encoder)); - scopeResourceSpans.push({ - scope: (0, internal_2.createInstrumentationScope)(scopeSpans[0].instrumentationLibrary), - spans: spans, - schemaUrl: scopeSpans[0].instrumentationLibrary.schemaUrl, - }); - } - ilmEntry = ilmIterator.next(); + try { + if (!writer.write(chunk) && this.pause) { + this.pause(); + } + } catch (err) { + util.destroy(this, err); } - // TODO SDK types don't provide resource schema URL at this time - const transformedSpans = { - resource: (0, internal_3.createResource)(resource), - scopeSpans: scopeResourceSpans, - schemaUrl: undefined, - }; - out.push(transformedSpans); - entry = entryIterator.next(); - } - return out; -} -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 18106: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toOtlpSpanEvent = exports.toOtlpLink = exports.sdkSpanToOtlpSpan = void 0; -const internal_1 = __nccwpck_require__(50037); -function sdkSpanToOtlpSpan(span, encoder) { - var _a; - const ctx = span.spanContext(); - const status = span.status; - return { - traceId: encoder.encodeSpanContext(ctx.traceId), - spanId: encoder.encodeSpanContext(ctx.spanId), - parentSpanId: encoder.encodeOptionalSpanContext(span.parentSpanId), - traceState: (_a = ctx.traceState) === null || _a === void 0 ? void 0 : _a.serialize(), - name: span.name, - // Span kind is offset by 1 because the API does not define a value for unset - kind: span.kind == null ? 0 : span.kind + 1, - startTimeUnixNano: encoder.encodeHrTime(span.startTime), - endTimeUnixNano: encoder.encodeHrTime(span.endTime), - attributes: (0, internal_1.toAttributes)(span.attributes), - droppedAttributesCount: span.droppedAttributesCount, - events: span.events.map(event => toOtlpSpanEvent(event, encoder)), - droppedEventsCount: span.droppedEventsCount, - status: { - // API and proto enums share the same values - code: status.code, - message: status.message, - }, - links: span.links.map(link => toOtlpLink(link, encoder)), - droppedLinksCount: span.droppedLinksCount, - }; -} -exports.sdkSpanToOtlpSpan = sdkSpanToOtlpSpan; -function toOtlpLink(link, encoder) { - var _a; - return { - attributes: link.attributes ? (0, internal_1.toAttributes)(link.attributes) : [], - spanId: encoder.encodeSpanContext(link.context.spanId), - traceId: encoder.encodeSpanContext(link.context.traceId), - traceState: (_a = link.context.traceState) === null || _a === void 0 ? void 0 : _a.serialize(), - droppedAttributesCount: link.droppedAttributesCount || 0, - }; -} -exports.toOtlpLink = toOtlpLink; -function toOtlpSpanEvent(timedEvent, encoder) { - return { - attributes: timedEvent.attributes - ? (0, internal_1.toAttributes)(timedEvent.attributes) - : [], - name: timedEvent.name, - timeUnixNano: encoder.encodeHrTime(timedEvent.time), - droppedAttributesCount: timedEvent.droppedAttributesCount || 0, - }; -} -exports.toOtlpSpanEvent = toOtlpSpanEvent; -//# sourceMappingURL=internal.js.map - -/***/ }), - -/***/ 31699: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ESpanKind = void 0; -/** - * SpanKind is the type of span. Can be used to specify additional relationships between spans - * in addition to a parent/child relationship. - */ -var ESpanKind; -(function (ESpanKind) { - /** Unspecified. Do NOT use as default. Implementations MAY assume SpanKind to be INTERNAL when receiving UNSPECIFIED. */ - ESpanKind[ESpanKind["SPAN_KIND_UNSPECIFIED"] = 0] = "SPAN_KIND_UNSPECIFIED"; - /** Indicates that the span represents an internal operation within an application, - * as opposed to an operation happening at the boundaries. Default value. - */ - ESpanKind[ESpanKind["SPAN_KIND_INTERNAL"] = 1] = "SPAN_KIND_INTERNAL"; - /** Indicates that the span covers server-side handling of an RPC or other - * remote network request. - */ - ESpanKind[ESpanKind["SPAN_KIND_SERVER"] = 2] = "SPAN_KIND_SERVER"; - /** Indicates that the span describes a request to some remote service. - */ - ESpanKind[ESpanKind["SPAN_KIND_CLIENT"] = 3] = "SPAN_KIND_CLIENT"; - /** Indicates that the span describes a producer sending a message to a broker. - * Unlike CLIENT and SERVER, there is often no direct critical path latency relationship - * between producer and consumer spans. A PRODUCER span ends when the message was accepted - * by the broker while the logical processing of the message might span a much longer time. - */ - ESpanKind[ESpanKind["SPAN_KIND_PRODUCER"] = 4] = "SPAN_KIND_PRODUCER"; - /** Indicates that the span describes consumer receiving a message from a broker. - * Like the PRODUCER kind, there is often no direct critical path latency relationship - * between producer and consumer spans. - */ - ESpanKind[ESpanKind["SPAN_KIND_CONSUMER"] = 5] = "SPAN_KIND_CONSUMER"; -})(ESpanKind = exports.ESpanKind || (exports.ESpanKind = {})); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 20427: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.B3MultiPropagator = void 0; -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -const common_1 = __nccwpck_require__(16859); -const constants_1 = __nccwpck_require__(72995); -const VALID_SAMPLED_VALUES = new Set([true, 'true', 'True', '1', 1]); -const VALID_UNSAMPLED_VALUES = new Set([false, 'false', 'False', '0', 0]); -function isValidSampledValue(sampled) { - return sampled === api_1.TraceFlags.SAMPLED || sampled === api_1.TraceFlags.NONE; -} -function parseHeader(header) { - return Array.isArray(header) ? header[0] : header; -} -function getHeaderValue(carrier, getter, key) { - const header = getter.get(carrier, key); - return parseHeader(header); -} -function getTraceId(carrier, getter) { - const traceId = getHeaderValue(carrier, getter, constants_1.X_B3_TRACE_ID); - if (typeof traceId === 'string') { - return traceId.padStart(32, '0'); - } - return ''; -} -function getSpanId(carrier, getter) { - const spanId = getHeaderValue(carrier, getter, constants_1.X_B3_SPAN_ID); - if (typeof spanId === 'string') { - return spanId; - } - return ''; -} -function getDebug(carrier, getter) { - const debug = getHeaderValue(carrier, getter, constants_1.X_B3_FLAGS); - return debug === '1' ? '1' : undefined; -} -function getTraceFlags(carrier, getter) { - const traceFlags = getHeaderValue(carrier, getter, constants_1.X_B3_SAMPLED); - const debug = getDebug(carrier, getter); - if (debug === '1' || VALID_SAMPLED_VALUES.has(traceFlags)) { - return api_1.TraceFlags.SAMPLED; - } - if (traceFlags === undefined || VALID_UNSAMPLED_VALUES.has(traceFlags)) { - return api_1.TraceFlags.NONE; - } - // This indicates to isValidSampledValue that this is not valid - return; -} -/** - * Propagator for the B3 multiple-header HTTP format. - * Based on: https://github.com/openzipkin/b3-propagation - */ -class B3MultiPropagator { - inject(context, carrier, setter) { - const spanContext = api_1.trace.getSpanContext(context); - if (!spanContext || - !(0, api_1.isSpanContextValid)(spanContext) || - (0, core_1.isTracingSuppressed)(context)) - return; - const debug = context.getValue(common_1.B3_DEBUG_FLAG_KEY); - setter.set(carrier, constants_1.X_B3_TRACE_ID, spanContext.traceId); - setter.set(carrier, constants_1.X_B3_SPAN_ID, spanContext.spanId); - // According to the B3 spec, if the debug flag is set, - // the sampled flag shouldn't be propagated as well. - if (debug === '1') { - setter.set(carrier, constants_1.X_B3_FLAGS, debug); - } - else if (spanContext.traceFlags !== undefined) { - // We set the header only if there is an existing sampling decision. - // Otherwise we will omit it => Absent. - setter.set(carrier, constants_1.X_B3_SAMPLED, (api_1.TraceFlags.SAMPLED & spanContext.traceFlags) === api_1.TraceFlags.SAMPLED - ? '1' - : '0'); - } - } - extract(context, carrier, getter) { - const traceId = getTraceId(carrier, getter); - const spanId = getSpanId(carrier, getter); - const traceFlags = getTraceFlags(carrier, getter); - const debug = getDebug(carrier, getter); - if ((0, api_1.isValidTraceId)(traceId) && - (0, api_1.isValidSpanId)(spanId) && - isValidSampledValue(traceFlags)) { - context = context.setValue(common_1.B3_DEBUG_FLAG_KEY, debug); - return api_1.trace.setSpanContext(context, { - traceId, - spanId, - isRemote: true, - traceFlags, - }); + }; + const onDrain = function() { + if (finished) { + return; } - return context; - } - fields() { - return [ - constants_1.X_B3_TRACE_ID, - constants_1.X_B3_SPAN_ID, - constants_1.X_B3_FLAGS, - constants_1.X_B3_SAMPLED, - constants_1.X_B3_PARENT_SPAN_ID, - ]; - } -} -exports.B3MultiPropagator = B3MultiPropagator; -//# sourceMappingURL=B3MultiPropagator.js.map - -/***/ }), - -/***/ 50160: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.B3Propagator = void 0; -const core_1 = __nccwpck_require__(89736); -const B3MultiPropagator_1 = __nccwpck_require__(20427); -const B3SinglePropagator_1 = __nccwpck_require__(33736); -const constants_1 = __nccwpck_require__(72995); -const types_1 = __nccwpck_require__(14776); -/** - * Propagator that extracts B3 context in both single and multi-header variants, - * with configurable injection format defaulting to B3 single-header. Due to - * the asymmetry in injection and extraction formats this is not suitable to - * be implemented as a composite propagator. - * Based on: https://github.com/openzipkin/b3-propagation - */ -class B3Propagator { - constructor(config = {}) { - this._b3MultiPropagator = new B3MultiPropagator_1.B3MultiPropagator(); - this._b3SinglePropagator = new B3SinglePropagator_1.B3SinglePropagator(); - if (config.injectEncoding === types_1.B3InjectEncoding.MULTI_HEADER) { - this._inject = this._b3MultiPropagator.inject; - this._fields = this._b3MultiPropagator.fields(); + if (body.resume) { + body.resume(); } - else { - this._inject = this._b3SinglePropagator.inject; - this._fields = this._b3SinglePropagator.fields(); + }; + const onClose = function() { + queueMicrotask(() => { + body.removeListener("error", onFinished); + }); + if (!finished) { + const err = new RequestAbortedError(); + queueMicrotask(() => onFinished(err)); } - } - inject(context, carrier, setter) { - if ((0, core_1.isTracingSuppressed)(context)) { - return; + }; + const onFinished = function(err) { + if (finished) { + return; } - this._inject(context, carrier, setter); - } - extract(context, carrier, getter) { - const header = getter.get(carrier, constants_1.B3_CONTEXT_HEADER); - const b3Context = Array.isArray(header) ? header[0] : header; - if (b3Context) { - return this._b3SinglePropagator.extract(context, carrier, getter); + 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 (er2) { + err = er2; + } } - else { - return this._b3MultiPropagator.extract(context, carrier, getter); + 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); + } } - fields() { - return this._fields; + function writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) { + try { + if (!body) { + if (contentLength === 0) { + socket.write(`${header}content-length: 0\r +\r +`, "latin1"); + } else { + assert(contentLength === null, "no body must not have content length"); + socket.write(`${header}\r +`, "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 +\r +`, "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); + } } -} -exports.B3Propagator = B3Propagator; -//# sourceMappingURL=B3Propagator.js.map - -/***/ }), - -/***/ 33736: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.B3SinglePropagator = void 0; -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -const common_1 = __nccwpck_require__(16859); -const constants_1 = __nccwpck_require__(72995); -const B3_CONTEXT_REGEX = /((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/; -const PADDING = '0'.repeat(16); -const SAMPLED_VALUES = new Set(['d', '1']); -const DEBUG_STATE = 'd'; -function convertToTraceId128(traceId) { - return traceId.length === 32 ? traceId : `${PADDING}${traceId}`; -} -function convertToTraceFlags(samplingState) { - if (samplingState && SAMPLED_VALUES.has(samplingState)) { - return api_1.TraceFlags.SAMPLED; + 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 +\r +`, "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); + } } - return api_1.TraceFlags.NONE; -} -/** - * Propagator for the B3 single-header HTTP format. - * Based on: https://github.com/openzipkin/b3-propagation - */ -class B3SinglePropagator { - inject(context, carrier, setter) { - const spanContext = api_1.trace.getSpanContext(context); - if (!spanContext || - !(0, api_1.isSpanContextValid)(spanContext) || - (0, core_1.isTracingSuppressed)(context)) - return; - const samplingState = context.getValue(common_1.B3_DEBUG_FLAG_KEY) || spanContext.traceFlags & 0x1; - const value = `${spanContext.traceId}-${spanContext.spanId}-${samplingState}`; - setter.set(carrier, constants_1.B3_CONTEXT_HEADER, value); - } - extract(context, carrier, getter) { - const header = getter.get(carrier, constants_1.B3_CONTEXT_HEADER); - const b3Context = Array.isArray(header) ? header[0] : header; - if (typeof b3Context !== 'string') - return context; - const match = b3Context.match(B3_CONTEXT_REGEX); - if (!match) - return context; - const [, extractedTraceId, spanId, samplingState] = match; - const traceId = convertToTraceId128(extractedTraceId); - if (!(0, api_1.isValidTraceId)(traceId) || !(0, api_1.isValidSpanId)(spanId)) - return context; - const traceFlags = convertToTraceFlags(samplingState); - if (samplingState === DEBUG_STATE) { - context = context.setValue(common_1.B3_DEBUG_FLAG_KEY, samplingState); - } - return api_1.trace.setSpanContext(context, { - traceId, - spanId, - isRemote: true, - traceFlags, - }); - } - fields() { - return [constants_1.B3_CONTEXT_HEADER]; - } -} -exports.B3SinglePropagator = B3SinglePropagator; -//# sourceMappingURL=B3SinglePropagator.js.map - -/***/ }), - -/***/ 16859: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.B3_DEBUG_FLAG_KEY = void 0; -const api_1 = __nccwpck_require__(65163); -/** shared context for storing an extracted b3 debug flag */ -exports.B3_DEBUG_FLAG_KEY = (0, api_1.createContextKey)('OpenTelemetry Context Key B3 Debug Flag'); -//# sourceMappingURL=common.js.map - -/***/ }), - -/***/ 72995: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.X_B3_FLAGS = exports.X_B3_PARENT_SPAN_ID = exports.X_B3_SAMPLED = exports.X_B3_SPAN_ID = exports.X_B3_TRACE_ID = exports.B3_CONTEXT_HEADER = void 0; -/** B3 single-header key */ -exports.B3_CONTEXT_HEADER = 'b3'; -/* b3 multi-header keys */ -exports.X_B3_TRACE_ID = 'x-b3-traceid'; -exports.X_B3_SPAN_ID = 'x-b3-spanid'; -exports.X_B3_SAMPLED = 'x-b3-sampled'; -exports.X_B3_PARENT_SPAN_ID = 'x-b3-parentspanid'; -exports.X_B3_FLAGS = 'x-b3-flags'; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 62650: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.B3InjectEncoding = exports.X_B3_TRACE_ID = exports.X_B3_SPAN_ID = exports.X_B3_SAMPLED = exports.X_B3_PARENT_SPAN_ID = exports.X_B3_FLAGS = exports.B3_CONTEXT_HEADER = exports.B3Propagator = void 0; -var B3Propagator_1 = __nccwpck_require__(50160); -Object.defineProperty(exports, "B3Propagator", ({ enumerable: true, get: function () { return B3Propagator_1.B3Propagator; } })); -var constants_1 = __nccwpck_require__(72995); -Object.defineProperty(exports, "B3_CONTEXT_HEADER", ({ enumerable: true, get: function () { return constants_1.B3_CONTEXT_HEADER; } })); -Object.defineProperty(exports, "X_B3_FLAGS", ({ enumerable: true, get: function () { return constants_1.X_B3_FLAGS; } })); -Object.defineProperty(exports, "X_B3_PARENT_SPAN_ID", ({ enumerable: true, get: function () { return constants_1.X_B3_PARENT_SPAN_ID; } })); -Object.defineProperty(exports, "X_B3_SAMPLED", ({ enumerable: true, get: function () { return constants_1.X_B3_SAMPLED; } })); -Object.defineProperty(exports, "X_B3_SPAN_ID", ({ enumerable: true, get: function () { return constants_1.X_B3_SPAN_ID; } })); -Object.defineProperty(exports, "X_B3_TRACE_ID", ({ enumerable: true, get: function () { return constants_1.X_B3_TRACE_ID; } })); -var types_1 = __nccwpck_require__(14776); -Object.defineProperty(exports, "B3InjectEncoding", ({ enumerable: true, get: function () { return types_1.B3InjectEncoding; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 14776: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.B3InjectEncoding = void 0; -/** Enumeration of B3 inject encodings */ -var B3InjectEncoding; -(function (B3InjectEncoding) { - B3InjectEncoding[B3InjectEncoding["SINGLE_HEADER"] = 0] = "SINGLE_HEADER"; - B3InjectEncoding[B3InjectEncoding["MULTI_HEADER"] = 1] = "MULTI_HEADER"; -})(B3InjectEncoding = exports.B3InjectEncoding || (exports.B3InjectEncoding = {})); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 2781: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.JaegerPropagator = exports.UBER_BAGGAGE_HEADER_PREFIX = exports.UBER_TRACE_ID_HEADER = void 0; -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -exports.UBER_TRACE_ID_HEADER = 'uber-trace-id'; -exports.UBER_BAGGAGE_HEADER_PREFIX = 'uberctx'; -/** - * Propagates {@link SpanContext} through Trace Context format propagation. - * {trace-id}:{span-id}:{parent-span-id}:{flags} - * {trace-id} - * 64-bit or 128-bit random number in base16 format. - * Can be variable length, shorter values are 0-padded on the left. - * Value of 0 is invalid. - * {span-id} - * 64-bit random number in base16 format. - * {parent-span-id} - * Set to 0 because this field is deprecated. - * {flags} - * One byte bitmap, as two hex digits. - * Inspired by jaeger-client-node project. - */ -class JaegerPropagator { - constructor(config) { - if (typeof config === 'string') { - this._jaegerTraceHeader = config; - this._jaegerBaggageHeaderPrefix = exports.UBER_BAGGAGE_HEADER_PREFIX; - } - else { - this._jaegerTraceHeader = - (config === null || config === void 0 ? void 0 : config.customTraceHeader) || exports.UBER_TRACE_ID_HEADER; - this._jaegerBaggageHeaderPrefix = - (config === null || config === void 0 ? void 0 : config.customBaggageHeaderPrefix) || exports.UBER_BAGGAGE_HEADER_PREFIX; + 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(); } - } - inject(context, carrier, setter) { - const spanContext = api_1.trace.getSpanContext(context); - const baggage = api_1.propagation.getBaggage(context); - if (spanContext && (0, core_1.isTracingSuppressed)(context) === false) { - const traceFlags = `0${(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`; - setter.set(carrier, this._jaegerTraceHeader, `${spanContext.traceId}:${spanContext.spanId}:0:${traceFlags}`); + } + const waitForDrain = () => new Promise((resolve8, reject) => { + assert(callback === null); + if (socket[kError]) { + reject(socket[kError]); + } else { + callback = resolve8; } - if (baggage) { - for (const [key, entry] of baggage.getAllEntries()) { - setter.set(carrier, `${this._jaegerBaggageHeaderPrefix}-${key}`, encodeURIComponent(entry.value)); - } + }); + 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); + } } - extract(context, carrier, getter) { - var _a; - const uberTraceIdHeader = getter.get(carrier, this._jaegerTraceHeader); - const uberTraceId = Array.isArray(uberTraceIdHeader) - ? uberTraceIdHeader[0] - : uberTraceIdHeader; - const baggageValues = getter - .keys(carrier) - .filter(key => key.startsWith(`${this._jaegerBaggageHeaderPrefix}-`)) - .map(key => { - const value = getter.get(carrier, key); - return { - key: key.substring(this._jaegerBaggageHeaderPrefix.length + 1), - value: Array.isArray(value) ? value[0] : value, - }; - }); - let newContext = context; - // if the trace id header is present and valid, inject it into the context - if (typeof uberTraceId === 'string') { - const spanContext = deserializeSpanContext(uberTraceId); - if (spanContext) { - newContext = api_1.trace.setSpanContext(newContext, spanContext); - } - } - if (baggageValues.length === 0) - return newContext; - // if baggage values are present, inject it into the current baggage - let currentBaggage = (_a = api_1.propagation.getBaggage(context)) !== null && _a !== void 0 ? _a : api_1.propagation.createBaggage(); - for (const baggageEntry of baggageValues) { - if (baggageEntry.value === undefined) - continue; - currentBaggage = currentBaggage.setEntry(baggageEntry.key, { - value: decodeURIComponent(baggageEntry.value), - }); + var AsyncWriter = class { + /** + * + * @param {object} arg + * @param {AbortCallback} arg.abort + * @param {import('net').Socket} arg.socket + * @param {import('../core/request.js')} arg.request + * @param {number} arg.contentLength + * @param {import('./client.js')} arg.client + * @param {boolean} arg.expectsPayload + * @param {string} arg.header + */ + 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; + } + /** + * @param {Buffer} chunk + * @returns + */ + write(chunk) { + const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this; + if (socket[kError]) { + throw socket[kError]; } - newContext = api_1.propagation.setBaggage(newContext, currentBaggage); - return newContext; - } - fields() { - return [this._jaegerTraceHeader]; - } -} -exports.JaegerPropagator = JaegerPropagator; -const VALID_HEX_RE = /^[0-9a-f]{1,2}$/i; -/** - * @param {string} serializedString - a serialized span context. - * @return {SpanContext} - returns a span context represented by the serializedString. - **/ -function deserializeSpanContext(serializedString) { - const headers = decodeURIComponent(serializedString).split(':'); - if (headers.length !== 4) { - return null; - } - const [_traceId, _spanId, , flags] = headers; - const traceId = _traceId.padStart(32, '0'); - const spanId = _spanId.padStart(16, '0'); - const traceFlags = VALID_HEX_RE.test(flags) ? parseInt(flags, 16) & 1 : 1; - return { traceId, spanId, isRemote: true, traceFlags }; -} -//# sourceMappingURL=JaegerPropagator.js.map - -/***/ }), - -/***/ 73534: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.UBER_TRACE_ID_HEADER = exports.UBER_BAGGAGE_HEADER_PREFIX = exports.JaegerPropagator = void 0; -var JaegerPropagator_1 = __nccwpck_require__(2781); -Object.defineProperty(exports, "JaegerPropagator", ({ enumerable: true, get: function () { return JaegerPropagator_1.JaegerPropagator; } })); -Object.defineProperty(exports, "UBER_BAGGAGE_HEADER_PREFIX", ({ enumerable: true, get: function () { return JaegerPropagator_1.UBER_BAGGAGE_HEADER_PREFIX; } })); -Object.defineProperty(exports, "UBER_TRACE_ID_HEADER", ({ enumerable: true, get: function () { return JaegerPropagator_1.UBER_TRACE_ID_HEADER; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 72723: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Resource = void 0; -const api_1 = __nccwpck_require__(65163); -const semantic_conventions_1 = __nccwpck_require__(67275); -const core_1 = __nccwpck_require__(89736); -const platform_1 = __nccwpck_require__(7784); -/** - * A Resource describes the entity for which a signals (metrics or trace) are - * collected. - */ -class Resource { - constructor( - /** - * A dictionary of attributes with string keys and values that provide - * information about the entity as numbers, strings or booleans - * TODO: Consider to add check/validation on attributes. - */ - attributes, asyncAttributesPromise) { - var _a; - this._attributes = attributes; - this.asyncAttributesPending = asyncAttributesPromise != null; - this._syncAttributes = (_a = this._attributes) !== null && _a !== void 0 ? _a : {}; - this._asyncAttributesPromise = asyncAttributesPromise === null || asyncAttributesPromise === void 0 ? void 0 : asyncAttributesPromise.then(asyncAttributes => { - this._attributes = Object.assign({}, this._attributes, asyncAttributes); - this.asyncAttributesPending = false; - return asyncAttributes; - }, err => { - api_1.diag.debug("a resource's async attributes promise rejected: %s", err); - this.asyncAttributesPending = false; - return {}; - }); - } - /** - * Returns an empty Resource - */ - static empty() { - return Resource.EMPTY; - } - /** - * Returns a Resource that identifies the SDK in use. - */ - static default() { - return new Resource({ - [semantic_conventions_1.SEMRESATTRS_SERVICE_NAME]: (0, platform_1.defaultServiceName)(), - [semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE]: core_1.SDK_INFO[semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE], - [semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_NAME]: core_1.SDK_INFO[semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_NAME], - [semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_VERSION]: core_1.SDK_INFO[semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_VERSION], - }); - } - get attributes() { - var _a; - if (this.asyncAttributesPending) { - api_1.diag.error('Accessing resource attributes before async attributes settled'); - } - return (_a = this._attributes) !== null && _a !== void 0 ? _a : {}; - } - /** - * Returns a promise that will never be rejected. Resolves when all async attributes have finished being added to - * this Resource's attributes. This is useful in exporters to block until resource detection - * has finished. - */ - async waitForAsyncAttributes() { - if (this.asyncAttributesPending) { - await this._asyncAttributesPromise; - } - } - /** - * Returns a new, merged {@link Resource} by merging the current Resource - * with the other Resource. In case of a collision, other Resource takes - * precedence. - * - * @param other the Resource that will be merged with this. - * @returns the newly merged Resource. - */ - merge(other) { - var _a; - if (!other) - return this; - // SpanAttributes from other resource overwrite attributes from this resource. - const mergedSyncAttributes = Object.assign(Object.assign({}, this._syncAttributes), ((_a = other._syncAttributes) !== null && _a !== void 0 ? _a : other.attributes)); - if (!this._asyncAttributesPromise && - !other._asyncAttributesPromise) { - return new Resource(mergedSyncAttributes); - } - const mergedAttributesPromise = Promise.all([ - this._asyncAttributesPromise, - other._asyncAttributesPromise, - ]).then(([thisAsyncAttributes, otherAsyncAttributes]) => { - var _a; - return Object.assign(Object.assign(Object.assign(Object.assign({}, this._syncAttributes), thisAsyncAttributes), ((_a = other._syncAttributes) !== null && _a !== void 0 ? _a : other.attributes)), otherAsyncAttributes); - }); - return new Resource(mergedSyncAttributes, mergedAttributesPromise); - } -} -exports.Resource = Resource; -Resource.EMPTY = new Resource({}); -//# sourceMappingURL=Resource.js.map - -/***/ }), - -/***/ 990: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.detectResourcesSync = exports.detectResources = void 0; -const Resource_1 = __nccwpck_require__(72723); -const api_1 = __nccwpck_require__(65163); -const utils_1 = __nccwpck_require__(44298); -/** - * Runs all resource detectors and returns the results merged into a single Resource. Promise - * does not resolve until all the underlying detectors have resolved, unlike - * detectResourcesSync. - * - * @deprecated use detectResourcesSync() instead. - * @param config Configuration for resource detection - */ -const detectResources = async (config = {}) => { - const resources = await Promise.all((config.detectors || []).map(async (d) => { - try { - const resource = await d.detect(config); - api_1.diag.debug(`${d.constructor.name} found resource.`, resource); - return resource; + if (socket.destroyed) { + return false; } - catch (e) { - api_1.diag.debug(`${d.constructor.name} failed: ${e.message}`); - return Resource_1.Resource.empty(); + const len = Buffer.byteLength(chunk); + if (!len) { + return true; } - })); - // Future check if verbose logging is enabled issue #1903 - logResources(resources); - return resources.reduce((acc, resource) => acc.merge(resource), Resource_1.Resource.empty()); -}; -exports.detectResources = detectResources; -/** - * Runs all resource detectors synchronously, merging their results. In case of attribute collision later resources will take precedence. - * - * @param config Configuration for resource detection - */ -const detectResourcesSync = (config = {}) => { - var _a; - const resources = ((_a = config.detectors) !== null && _a !== void 0 ? _a : []).map((d) => { - try { - const resourceOrPromise = d.detect(config); - let resource; - if ((0, utils_1.isPromiseLike)(resourceOrPromise)) { - const createPromise = async () => { - const resolvedResource = await resourceOrPromise; - return resolvedResource.attributes; - }; - resource = new Resource_1.Resource({}, createPromise()); - } - else { - resource = resourceOrPromise; - } - if (resource.waitForAsyncAttributes) { - void resource - .waitForAsyncAttributes() - .then(() => api_1.diag.debug(`${d.constructor.name} found resource.`, resource)); - } - else { - api_1.diag.debug(`${d.constructor.name} found resource.`, resource); - } - return resource; + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError(); + } + process.emitWarning(new RequestContentLengthMismatchError()); } - catch (e) { - api_1.diag.error(`${d.constructor.name} failed: ${e.message}`); - return Resource_1.Resource.empty(); + socket.cork(); + if (bytesWritten === 0) { + if (!expectsPayload && request.reset !== false) { + socket[kReset] = true; + } + if (contentLength === null) { + socket.write(`${header}transfer-encoding: chunked\r +`, "latin1"); + } else { + socket.write(`${header}content-length: ${contentLength}\r +\r +`, "latin1"); + } } - }); - const mergedResources = resources.reduce((acc, resource) => acc.merge(resource), Resource_1.Resource.empty()); - if (mergedResources.waitForAsyncAttributes) { - void mergedResources.waitForAsyncAttributes().then(() => { - // Future check if verbose logging is enabled issue #1903 - logResources(resources); - }); - } - return mergedResources; -}; -exports.detectResourcesSync = detectResourcesSync; -/** - * Writes debug information about the detected resources to the logger defined in the resource detection config, if one is provided. - * - * @param resources The array of {@link Resource} that should be logged. Empty entries will be ignored. - */ -const logResources = (resources) => { - resources.forEach(resource => { - // Print only populated resources - if (Object.keys(resource.attributes).length > 0) { - const resourceDebugString = JSON.stringify(resource.attributes, null, 4); - api_1.diag.verbose(resourceDebugString); + if (contentLength === null) { + socket.write(`\r +${len.toString(16)}\r +`, "latin1"); } - }); -}; -//# sourceMappingURL=detect-resources.js.map - -/***/ }), - -/***/ 15969: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.browserDetector = void 0; -const BrowserDetectorSync_1 = __nccwpck_require__(33010); -/** - * BrowserDetector will be used to detect the resources related to browser. - */ -class BrowserDetector { - detect(config) { - return Promise.resolve(BrowserDetectorSync_1.browserDetectorSync.detect(config)); - } -} -exports.browserDetector = new BrowserDetector(); -//# sourceMappingURL=BrowserDetector.js.map - -/***/ }), - -/***/ 33010: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.browserDetectorSync = void 0; -const semantic_conventions_1 = __nccwpck_require__(67275); -const api_1 = __nccwpck_require__(65163); -const Resource_1 = __nccwpck_require__(72723); -/** - * BrowserDetectorSync will be used to detect the resources related to browser. - */ -class BrowserDetectorSync { - detect(config) { - var _a, _b, _c; - const isBrowser = typeof navigator !== 'undefined' && - ((_b = (_a = global.process) === null || _a === void 0 ? void 0 : _a.versions) === null || _b === void 0 ? void 0 : _b.node) === undefined && // Node.js v21 adds `navigator` - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore don't have Bun types - ((_c = global.Bun) === null || _c === void 0 ? void 0 : _c.version) === undefined; // Bun (bun.sh) defines `navigator` - if (!isBrowser) { - return Resource_1.Resource.empty(); - } - const browserResource = { - [semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_NAME]: 'browser', - [semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION]: 'Web Browser', - [semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_VERSION]: navigator.userAgent, - }; - return this._getResourceAttributes(browserResource, config); - } - /** - * Validates process resource attribute map from process variables - * - * @param browserResource The un-sanitized resource attributes from process as key/value pairs. - * @param config: Config - * @returns The sanitized resource attributes. - */ - _getResourceAttributes(browserResource, _config) { - if (browserResource[semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_VERSION] === '') { - api_1.diag.debug('BrowserDetector failed: Unable to find required browser resources. '); - return Resource_1.Resource.empty(); + this.bytesWritten += len; + const ret = socket.write(chunk); + socket.uncork(); + request.onBodySent(chunk); + if (!ret) { + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh(); + } + } } - else { - return new Resource_1.Resource(Object.assign({}, browserResource)); + return ret; + } + /** + * @returns {void} + */ + 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; } - } -} -exports.browserDetectorSync = new BrowserDetectorSync(); -//# sourceMappingURL=BrowserDetectorSync.js.map - -/***/ }), - -/***/ 22474: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.envDetector = void 0; -const EnvDetectorSync_1 = __nccwpck_require__(84565); -/** - * EnvDetector can be used to detect the presence of and create a Resource - * from the OTEL_RESOURCE_ATTRIBUTES environment variable. - */ -class EnvDetector { - /** - * Returns a {@link Resource} populated with attributes from the - * OTEL_RESOURCE_ATTRIBUTES environment variable. Note this is an async - * function to conform to the Detector interface. - * - * @param config The resource detection config - */ - detect(config) { - return Promise.resolve(EnvDetectorSync_1.envDetectorSync.detect(config)); - } -} -exports.envDetector = new EnvDetector(); -//# sourceMappingURL=EnvDetector.js.map - -/***/ }), - -/***/ 84565: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.envDetectorSync = void 0; -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -const semantic_conventions_1 = __nccwpck_require__(67275); -const Resource_1 = __nccwpck_require__(72723); -/** - * EnvDetectorSync can be used to detect the presence of and create a Resource - * from the OTEL_RESOURCE_ATTRIBUTES environment variable. - */ -class EnvDetectorSync { - constructor() { - // Type, attribute keys, and attribute values should not exceed 256 characters. - this._MAX_LENGTH = 255; - // OTEL_RESOURCE_ATTRIBUTES is a comma-separated list of attributes. - this._COMMA_SEPARATOR = ','; - // OTEL_RESOURCE_ATTRIBUTES contains key value pair separated by '='. - this._LABEL_KEY_VALUE_SPLITTER = '='; - this._ERROR_MESSAGE_INVALID_CHARS = 'should be a ASCII string with a length greater than 0 and not exceed ' + - this._MAX_LENGTH + - ' characters.'; - this._ERROR_MESSAGE_INVALID_VALUE = 'should be a ASCII string with a length not exceed ' + - this._MAX_LENGTH + - ' characters.'; - } - /** - * Returns a {@link Resource} populated with attributes from the - * OTEL_RESOURCE_ATTRIBUTES environment variable. Note this is an async - * function to conform to the Detector interface. - * - * @param config The resource detection config - */ - detect(_config) { - const attributes = {}; - const env = (0, core_1.getEnv)(); - const rawAttributes = env.OTEL_RESOURCE_ATTRIBUTES; - const serviceName = env.OTEL_SERVICE_NAME; - if (rawAttributes) { - try { - const parsedAttributes = this._parseResourceAttributes(rawAttributes); - Object.assign(attributes, parsedAttributes); - } - catch (e) { - api_1.diag.debug(`EnvDetector failed: ${e.message}`); - } - } - if (serviceName) { - attributes[semantic_conventions_1.SEMRESATTRS_SERVICE_NAME] = serviceName; - } - return new Resource_1.Resource(attributes); - } - /** - * Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment - * variable. - * - * OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes describing - * the source in more detail, e.g. “key1=val1,key2=val2”. Domain names and - * paths are accepted as attribute keys. Values may be quoted or unquoted in - * general. If a value contains whitespace, =, or " characters, it must - * always be quoted. - * - * @param rawEnvAttributes The resource attributes as a comma-separated list - * of key/value pairs. - * @returns The sanitized resource attributes. - */ - _parseResourceAttributes(rawEnvAttributes) { - if (!rawEnvAttributes) - return {}; - const attributes = {}; - const rawAttributes = rawEnvAttributes.split(this._COMMA_SEPARATOR, -1); - for (const rawAttribute of rawAttributes) { - const keyValuePair = rawAttribute.split(this._LABEL_KEY_VALUE_SPLITTER, -1); - if (keyValuePair.length !== 2) { - continue; - } - let [key, value] = keyValuePair; - // Leading and trailing whitespaces are trimmed. - key = key.trim(); - value = value.trim().split(/^"|"$/).join(''); - if (!this._isValidAndNotEmpty(key)) { - throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`); - } - if (!this._isValid(value)) { - throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`); - } - attributes[key] = decodeURIComponent(value); - } - return attributes; - } - /** - * Determines whether the given String is a valid printable ASCII string with - * a length not exceed _MAX_LENGTH characters. - * - * @param str The String to be validated. - * @returns Whether the String is valid. - */ - _isValid(name) { - return name.length <= this._MAX_LENGTH && this._isBaggageOctetString(name); - } - // https://www.w3.org/TR/baggage/#definition - _isBaggageOctetString(str) { - for (let i = 0; i < str.length; i++) { - const ch = str.charCodeAt(i); - if (ch < 0x21 || ch === 0x2c || ch === 0x3b || ch === 0x5c || ch > 0x7e) { - return false; - } + if (bytesWritten === 0) { + if (expectsPayload) { + socket.write(`${header}content-length: 0\r +\r +`, "latin1"); + } else { + socket.write(`${header}\r +`, "latin1"); + } + } else if (contentLength === null) { + socket.write("\r\n0\r\n\r\n", "latin1"); } - return true; - } - /** - * Determines whether the given String is a valid printable ASCII string with - * a length greater than 0 and not exceed _MAX_LENGTH characters. - * - * @param str The String to be validated. - * @returns Whether the String is valid and not empty. - */ - _isValidAndNotEmpty(str) { - return str.length > 0 && this._isValid(str); - } -} -exports.envDetectorSync = new EnvDetectorSync(); -//# sourceMappingURL=EnvDetectorSync.js.map - -/***/ }), - -/***/ 24918: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.envDetectorSync = exports.browserDetectorSync = exports.envDetector = exports.browserDetector = exports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = void 0; -var platform_1 = __nccwpck_require__(3098); -Object.defineProperty(exports, "hostDetector", ({ enumerable: true, get: function () { return platform_1.hostDetector; } })); -Object.defineProperty(exports, "hostDetectorSync", ({ enumerable: true, get: function () { return platform_1.hostDetectorSync; } })); -Object.defineProperty(exports, "osDetector", ({ enumerable: true, get: function () { return platform_1.osDetector; } })); -Object.defineProperty(exports, "osDetectorSync", ({ enumerable: true, get: function () { return platform_1.osDetectorSync; } })); -Object.defineProperty(exports, "processDetector", ({ enumerable: true, get: function () { return platform_1.processDetector; } })); -Object.defineProperty(exports, "processDetectorSync", ({ enumerable: true, get: function () { return platform_1.processDetectorSync; } })); -Object.defineProperty(exports, "serviceInstanceIdDetectorSync", ({ enumerable: true, get: function () { return platform_1.serviceInstanceIdDetectorSync; } })); -var BrowserDetector_1 = __nccwpck_require__(15969); -Object.defineProperty(exports, "browserDetector", ({ enumerable: true, get: function () { return BrowserDetector_1.browserDetector; } })); -var EnvDetector_1 = __nccwpck_require__(22474); -Object.defineProperty(exports, "envDetector", ({ enumerable: true, get: function () { return EnvDetector_1.envDetector; } })); -var BrowserDetectorSync_1 = __nccwpck_require__(33010); -Object.defineProperty(exports, "browserDetectorSync", ({ enumerable: true, get: function () { return BrowserDetectorSync_1.browserDetectorSync; } })); -var EnvDetectorSync_1 = __nccwpck_require__(84565); -Object.defineProperty(exports, "envDetectorSync", ({ enumerable: true, get: function () { return EnvDetectorSync_1.envDetectorSync; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 3098: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var node_1 = __nccwpck_require__(29920); -Object.defineProperty(exports, "hostDetector", ({ enumerable: true, get: function () { return node_1.hostDetector; } })); -Object.defineProperty(exports, "hostDetectorSync", ({ enumerable: true, get: function () { return node_1.hostDetectorSync; } })); -Object.defineProperty(exports, "osDetector", ({ enumerable: true, get: function () { return node_1.osDetector; } })); -Object.defineProperty(exports, "osDetectorSync", ({ enumerable: true, get: function () { return node_1.osDetectorSync; } })); -Object.defineProperty(exports, "processDetector", ({ enumerable: true, get: function () { return node_1.processDetector; } })); -Object.defineProperty(exports, "processDetectorSync", ({ enumerable: true, get: function () { return node_1.processDetectorSync; } })); -Object.defineProperty(exports, "serviceInstanceIdDetectorSync", ({ enumerable: true, get: function () { return node_1.serviceInstanceIdDetectorSync; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 59251: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.hostDetector = void 0; -const HostDetectorSync_1 = __nccwpck_require__(13172); -/** - * HostDetector detects the resources related to the host current process is - * running on. Currently only non-cloud-based attributes are included. - */ -class HostDetector { - detect(_config) { - return Promise.resolve(HostDetectorSync_1.hostDetectorSync.detect(_config)); - } -} -exports.hostDetector = new HostDetector(); -//# sourceMappingURL=HostDetector.js.map - -/***/ }), - -/***/ 13172: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.hostDetectorSync = void 0; -const semantic_conventions_1 = __nccwpck_require__(67275); -const Resource_1 = __nccwpck_require__(72723); -const os_1 = __nccwpck_require__(22037); -const utils_1 = __nccwpck_require__(88227); -const getMachineId_1 = __nccwpck_require__(11804); -/** - * HostDetectorSync detects the resources related to the host current process is - * running on. Currently only non-cloud-based attributes are included. - */ -class HostDetectorSync { - detect(_config) { - const attributes = { - [semantic_conventions_1.SEMRESATTRS_HOST_NAME]: (0, os_1.hostname)(), - [semantic_conventions_1.SEMRESATTRS_HOST_ARCH]: (0, utils_1.normalizeArch)((0, os_1.arch)()), - }; - return new Resource_1.Resource(attributes, this._getAsyncAttributes()); - } - _getAsyncAttributes() { - return (0, getMachineId_1.getMachineId)().then(machineId => { - const attributes = {}; - if (machineId) { - attributes[semantic_conventions_1.SEMRESATTRS_HOST_ID] = machineId; - } - return attributes; - }); - } -} -exports.hostDetectorSync = new HostDetectorSync(); -//# sourceMappingURL=HostDetectorSync.js.map - -/***/ }), - -/***/ 58102: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.osDetector = void 0; -const OSDetectorSync_1 = __nccwpck_require__(53136); -/** - * OSDetector detects the resources related to the operating system (OS) on - * which the process represented by this resource is running. - */ -class OSDetector { - detect(_config) { - return Promise.resolve(OSDetectorSync_1.osDetectorSync.detect(_config)); - } -} -exports.osDetector = new OSDetector(); -//# sourceMappingURL=OSDetector.js.map - -/***/ }), - -/***/ 53136: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.osDetectorSync = void 0; -const semantic_conventions_1 = __nccwpck_require__(67275); -const Resource_1 = __nccwpck_require__(72723); -const os_1 = __nccwpck_require__(22037); -const utils_1 = __nccwpck_require__(88227); -/** - * OSDetectorSync detects the resources related to the operating system (OS) on - * which the process represented by this resource is running. - */ -class OSDetectorSync { - detect(_config) { - const attributes = { - [semantic_conventions_1.SEMRESATTRS_OS_TYPE]: (0, utils_1.normalizeType)((0, os_1.platform)()), - [semantic_conventions_1.SEMRESATTRS_OS_VERSION]: (0, os_1.release)(), - }; - return new Resource_1.Resource(attributes); - } -} -exports.osDetectorSync = new OSDetectorSync(); -//# sourceMappingURL=OSDetectorSync.js.map - -/***/ }), - -/***/ 62471: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.processDetector = void 0; -const ProcessDetectorSync_1 = __nccwpck_require__(68786); -/** - * ProcessDetector will be used to detect the resources related current process running - * and being instrumented from the NodeJS Process module. - */ -class ProcessDetector { - detect(config) { - return Promise.resolve(ProcessDetectorSync_1.processDetectorSync.detect(config)); - } -} -exports.processDetector = new ProcessDetector(); -//# sourceMappingURL=ProcessDetector.js.map - -/***/ }), - -/***/ 68786: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.processDetectorSync = void 0; -const api_1 = __nccwpck_require__(65163); -const semantic_conventions_1 = __nccwpck_require__(67275); -const Resource_1 = __nccwpck_require__(72723); -const os = __nccwpck_require__(22037); -/** - * ProcessDetectorSync will be used to detect the resources related current process running - * and being instrumented from the NodeJS Process module. - */ -class ProcessDetectorSync { - detect(_config) { - const attributes = { - [semantic_conventions_1.SEMRESATTRS_PROCESS_PID]: process.pid, - [semantic_conventions_1.SEMRESATTRS_PROCESS_EXECUTABLE_NAME]: process.title, - [semantic_conventions_1.SEMRESATTRS_PROCESS_EXECUTABLE_PATH]: process.execPath, - [semantic_conventions_1.SEMRESATTRS_PROCESS_COMMAND_ARGS]: [ - process.argv[0], - ...process.execArgv, - ...process.argv.slice(1), - ], - [semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_VERSION]: process.versions.node, - [semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_NAME]: 'nodejs', - [semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION]: 'Node.js', - }; - if (process.argv.length > 1) { - attributes[semantic_conventions_1.SEMRESATTRS_PROCESS_COMMAND] = process.argv[1]; + if (contentLength !== null && bytesWritten !== contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError(); + } else { + process.emitWarning(new RequestContentLengthMismatchError()); + } } - try { - const userInfo = os.userInfo(); - attributes[semantic_conventions_1.SEMRESATTRS_PROCESS_OWNER] = userInfo.username; + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh(); + } } - catch (e) { - api_1.diag.debug(`error obtaining process owner: ${e}`); + client[kResume](); + } + /** + * @param {Error} [err] + * @returns {void} + */ + destroy(err) { + const { socket, client, abort } = this; + socket[kWriting] = false; + if (err) { + assert(client[kRunning] <= 1, "pipeline should only contain this request"); + abort(err); } - return new Resource_1.Resource(attributes); - } -} -exports.processDetectorSync = new ProcessDetectorSync(); -//# sourceMappingURL=ProcessDetectorSync.js.map - -/***/ }), - -/***/ 47750: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.serviceInstanceIdDetectorSync = void 0; -const semantic_conventions_1 = __nccwpck_require__(67275); -const Resource_1 = __nccwpck_require__(72723); -const crypto_1 = __nccwpck_require__(6113); -/** - * ServiceInstanceIdDetectorSync detects the resources related to the service instance ID. - */ -class ServiceInstanceIdDetectorSync { - detect(_config) { - const attributes = { - [semantic_conventions_1.SEMRESATTRS_SERVICE_INSTANCE_ID]: (0, crypto_1.randomUUID)(), - }; - return new Resource_1.Resource(attributes); - } -} -/** - * @experimental - */ -exports.serviceInstanceIdDetectorSync = new ServiceInstanceIdDetectorSync(); -//# sourceMappingURL=ServiceInstanceIdDetectorSync.js.map - -/***/ }), - -/***/ 29920: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = void 0; -var HostDetector_1 = __nccwpck_require__(59251); -Object.defineProperty(exports, "hostDetector", ({ enumerable: true, get: function () { return HostDetector_1.hostDetector; } })); -var HostDetectorSync_1 = __nccwpck_require__(13172); -Object.defineProperty(exports, "hostDetectorSync", ({ enumerable: true, get: function () { return HostDetectorSync_1.hostDetectorSync; } })); -var OSDetector_1 = __nccwpck_require__(58102); -Object.defineProperty(exports, "osDetector", ({ enumerable: true, get: function () { return OSDetector_1.osDetector; } })); -var OSDetectorSync_1 = __nccwpck_require__(53136); -Object.defineProperty(exports, "osDetectorSync", ({ enumerable: true, get: function () { return OSDetectorSync_1.osDetectorSync; } })); -var ProcessDetector_1 = __nccwpck_require__(62471); -Object.defineProperty(exports, "processDetector", ({ enumerable: true, get: function () { return ProcessDetector_1.processDetector; } })); -var ProcessDetectorSync_1 = __nccwpck_require__(68786); -Object.defineProperty(exports, "processDetectorSync", ({ enumerable: true, get: function () { return ProcessDetectorSync_1.processDetectorSync; } })); -var ServiceInstanceIdDetectorSync_1 = __nccwpck_require__(47750); -Object.defineProperty(exports, "serviceInstanceIdDetectorSync", ({ enumerable: true, get: function () { return ServiceInstanceIdDetectorSync_1.serviceInstanceIdDetectorSync; } })); -//# sourceMappingURL=index.js.map + } + }; + module3.exports = connectH1; + } +}); -/***/ }), - -/***/ 70055: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.execAsync = void 0; -const child_process = __nccwpck_require__(32081); -const util = __nccwpck_require__(73837); -exports.execAsync = util.promisify(child_process.exec); -//# sourceMappingURL=execAsync.js.map - -/***/ }), - -/***/ 82605: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; -var __webpack_unused_export__; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__webpack_unused_export__ = ({ value: true }); -exports.$ = void 0; -const fs_1 = __nccwpck_require__(57147); -const execAsync_1 = __nccwpck_require__(70055); -const api_1 = __nccwpck_require__(65163); -async function getMachineId() { - try { - const result = await fs_1.promises.readFile('/etc/hostid', { encoding: 'utf8' }); - return result.trim(); - } - catch (e) { - api_1.diag.debug(`error reading machine id: ${e}`); - } - try { - const result = await (0, execAsync_1.execAsync)('kenv -q smbios.system.uuid'); - return result.stdout.trim(); - } - catch (e) { - api_1.diag.debug(`error reading machine id: ${e}`); - } - return ''; -} -exports.$ = getMachineId; -//# sourceMappingURL=getMachineId-bsd.js.map - -/***/ }), - -/***/ 32685: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; -var __webpack_unused_export__; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__webpack_unused_export__ = ({ value: true }); -exports.$ = void 0; -const execAsync_1 = __nccwpck_require__(70055); -const api_1 = __nccwpck_require__(65163); -async function getMachineId() { +// node_modules/undici/lib/dispatcher/client-h2.js +var require_client_h2 = __commonJS({ + "node_modules/undici/lib/dispatcher/client-h2.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var { pipeline } = __require("node:stream"); + var util = require_util(); + var { + RequestContentLengthMismatchError, + RequestAbortedError, + SocketError, + InformationalError, + InvalidArgumentError + } = require_errors(); + var { + kUrl, + kReset, + kClient, + kRunning, + kPending, + kQueue, + kPendingIdx, + kRunningIdx, + kError, + kSocket, + kStrictContentLength, + kOnError, + kMaxConcurrentStreams, + kPingInterval, + kHTTP2Session, + kHTTP2InitialWindowSize, + kHTTP2ConnectionWindowSize, + kResume, + kSize, + kHTTPContext, + kClosed, + kBodyTimeout, + kEnableConnectProtocol, + kRemoteSettings, + kHTTP2Stream, + kHTTP2SessionState + } = require_symbols(); + var { channels } = require_diagnostics(); + var kOpenStreams = /* @__PURE__ */ Symbol("open streams"); + var extractBody; + var http2; try { - const result = await (0, execAsync_1.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"'); - const idLine = result.stdout - .split('\n') - .find(line => line.includes('IOPlatformUUID')); - if (!idLine) { - return ''; - } - const parts = idLine.split('" = "'); - if (parts.length === 2) { - return parts[1].slice(0, -1); + http2 = __require("node:http2"); + } catch { + http2 = { constants: {} }; + } + var { + constants: { + HTTP2_HEADER_AUTHORITY, + HTTP2_HEADER_METHOD, + HTTP2_HEADER_PATH, + HTTP2_HEADER_SCHEME, + HTTP2_HEADER_CONTENT_LENGTH, + HTTP2_HEADER_EXPECT, + HTTP2_HEADER_STATUS, + HTTP2_HEADER_PROTOCOL, + NGHTTP2_REFUSED_STREAM, + NGHTTP2_CANCEL + } + } = 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; } - catch (e) { - api_1.diag.debug(`error reading machine id: ${e}`); - } - return ''; -} -exports.$ = getMachineId; -//# sourceMappingURL=getMachineId-darwin.js.map - -/***/ }), - -/***/ 8319: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; -var __webpack_unused_export__; - -__webpack_unused_export__ = ({ value: true }); -exports.$ = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const fs_1 = __nccwpck_require__(57147); -const api_1 = __nccwpck_require__(65163); -async function getMachineId() { - const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id']; - for (const path of paths) { - try { - const result = await fs_1.promises.readFile(path, { encoding: 'utf8' }); - return result.trim(); + function connectH2(client, socket) { + client[kSocket] = socket; + const http2InitialWindowSize = client[kHTTP2InitialWindowSize]; + const http2ConnectionWindowSize = client[kHTTP2ConnectionWindowSize]; + const session = http2.connect(client[kUrl], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kMaxConcurrentStreams], + settings: { + // TODO(metcoder95): add support for PUSH + enablePush: false, + ...http2InitialWindowSize != null ? { initialWindowSize: http2InitialWindowSize } : null } - catch (e) { - api_1.diag.debug(`error reading machine id: ${e}`); + }); + client[kSocket] = socket; + session[kOpenStreams] = 0; + session[kClient] = client; + session[kSocket] = socket; + session[kHTTP2SessionState] = { + ping: { + interval: client[kPingInterval] === 0 ? null : setInterval(onHttp2SendPing, client[kPingInterval], session).unref() + } + }; + session[kEnableConnectProtocol] = false; + session[kRemoteSettings] = false; + if (http2ConnectionWindowSize) { + util.addListener(session, "connect", applyConnectionWindowSize.bind(session, http2ConnectionWindowSize)); + } + util.addListener(session, "error", onHttp2SessionError); + util.addListener(session, "frameError", onHttp2FrameError); + util.addListener(session, "end", onHttp2SessionEnd); + util.addListener(session, "goaway", onHttp2SessionGoAway); + util.addListener(session, "close", onHttp2SessionClose); + util.addListener(session, "remoteSettings", onHttp2RemoteSettings); + session.unref(); + client[kHTTP2Session] = session; + socket[kHTTP2Session] = session; + util.addListener(socket, "error", onHttp2SocketError); + util.addListener(socket, "end", onHttp2SocketEnd); + util.addListener(socket, "close", onHttp2SocketClose); + socket[kClosed] = false; + socket.on("close", onSocketClose); + return { + version: "h2", + defaultPipelining: Infinity, + /** + * @param {import('../core/request.js')} request + * @returns {boolean} + */ + write(request) { + return writeH2(client, request); + }, + /** + * @returns {void} + */ + resume() { + resumeH2(client); + }, + /** + * @param {Error | null} err + * @param {() => void} callback + */ + destroy(err, callback) { + if (socket[kClosed]) { + queueMicrotask(callback); + } else { + socket.destroy(err).on("close", callback); + } + }, + /** + * @type {boolean} + */ + get destroyed() { + return socket.destroyed; + }, + /** + * @param {import('../core/request.js')} request + * @returns {boolean} + */ + busy(request) { + if (request != null) { + if (client[kRunning] > 0) { + if (request.idempotent === false) return true; + if ((request.upgrade === "websocket" || request.method === "CONNECT") && session[kRemoteSettings] === false) return true; + if (util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) return true; + } else { + return (request.upgrade === "websocket" || request.method === "CONNECT") && session[kRemoteSettings] === false; + } + } + return false; } + }; } - return ''; -} -exports.$ = getMachineId; -//# sourceMappingURL=getMachineId-linux.js.map - -/***/ }), - -/***/ 56083: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; -var __webpack_unused_export__; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__webpack_unused_export__ = ({ value: true }); -exports.$ = void 0; -const api_1 = __nccwpck_require__(65163); -async function getMachineId() { - api_1.diag.debug('could not read machine-id: unsupported platform'); - return ''; -} -exports.$ = getMachineId; -//# sourceMappingURL=getMachineId-unsupported.js.map - -/***/ }), - -/***/ 29937: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; -var __webpack_unused_export__; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -__webpack_unused_export__ = ({ value: true }); -exports.$ = void 0; -const process = __nccwpck_require__(77282); -const execAsync_1 = __nccwpck_require__(70055); -const api_1 = __nccwpck_require__(65163); -async function getMachineId() { - const args = 'QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid'; - let command = '%windir%\\System32\\REG.exe'; - if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) { - command = '%windir%\\sysnative\\cmd.exe /c ' + command; - } - try { - const result = await (0, execAsync_1.execAsync)(`${command} ${args}`); - const parts = result.stdout.split('REG_SZ'); - if (parts.length === 2) { - return parts[1].trim(); + 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(); } + } } - catch (e) { - api_1.diag.debug(`error reading machine id: ${e}`); - } - return ''; -} -exports.$ = getMachineId; -//# sourceMappingURL=getMachineId-win.js.map - -/***/ }), - -/***/ 11804: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getMachineId = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const process = __nccwpck_require__(77282); -let getMachineId; -exports.getMachineId = getMachineId; -switch (process.platform) { - case 'darwin': - (exports.getMachineId = getMachineId = (__nccwpck_require__(32685)/* .getMachineId */ .$)); - break; - case 'linux': - (exports.getMachineId = getMachineId = (__nccwpck_require__(8319)/* .getMachineId */ .$)); - break; - case 'freebsd': - (exports.getMachineId = getMachineId = (__nccwpck_require__(82605)/* .getMachineId */ .$)); - break; - case 'win32': - (exports.getMachineId = getMachineId = (__nccwpck_require__(29937)/* .getMachineId */ .$)); - break; - default: - (exports.getMachineId = getMachineId = (__nccwpck_require__(56083)/* .getMachineId */ .$)); -} -//# sourceMappingURL=getMachineId.js.map - -/***/ }), - -/***/ 88227: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.normalizeType = exports.normalizeArch = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const normalizeArch = (nodeArchString) => { - // Maps from https://nodejs.org/api/os.html#osarch to arch values in spec: - // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md - switch (nodeArchString) { - case 'arm': - return 'arm32'; - case 'ppc': - return 'ppc32'; - case 'x64': - return 'amd64'; - default: - return nodeArchString; - } -}; -exports.normalizeArch = normalizeArch; -const normalizeType = (nodePlatform) => { - // Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec: - // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md - switch (nodePlatform) { - case 'sunos': - return 'solaris'; - case 'win32': - return 'windows'; - default: - return nodePlatform; + function applyConnectionWindowSize(connectionWindowSize) { + try { + if (typeof this.setLocalWindowSize === "function") { + this.setLocalWindowSize(connectionWindowSize); + } + } catch { + } } -}; -exports.normalizeType = normalizeType; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 3871: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.detectResources = exports.detectResourcesSync = exports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = exports.envDetectorSync = exports.envDetector = exports.browserDetectorSync = exports.browserDetector = exports.defaultServiceName = exports.Resource = void 0; -var Resource_1 = __nccwpck_require__(72723); -Object.defineProperty(exports, "Resource", ({ enumerable: true, get: function () { return Resource_1.Resource; } })); -var platform_1 = __nccwpck_require__(7784); -Object.defineProperty(exports, "defaultServiceName", ({ enumerable: true, get: function () { return platform_1.defaultServiceName; } })); -var detectors_1 = __nccwpck_require__(24918); -Object.defineProperty(exports, "browserDetector", ({ enumerable: true, get: function () { return detectors_1.browserDetector; } })); -Object.defineProperty(exports, "browserDetectorSync", ({ enumerable: true, get: function () { return detectors_1.browserDetectorSync; } })); -Object.defineProperty(exports, "envDetector", ({ enumerable: true, get: function () { return detectors_1.envDetector; } })); -Object.defineProperty(exports, "envDetectorSync", ({ enumerable: true, get: function () { return detectors_1.envDetectorSync; } })); -Object.defineProperty(exports, "hostDetector", ({ enumerable: true, get: function () { return detectors_1.hostDetector; } })); -Object.defineProperty(exports, "hostDetectorSync", ({ enumerable: true, get: function () { return detectors_1.hostDetectorSync; } })); -Object.defineProperty(exports, "osDetector", ({ enumerable: true, get: function () { return detectors_1.osDetector; } })); -Object.defineProperty(exports, "osDetectorSync", ({ enumerable: true, get: function () { return detectors_1.osDetectorSync; } })); -Object.defineProperty(exports, "processDetector", ({ enumerable: true, get: function () { return detectors_1.processDetector; } })); -Object.defineProperty(exports, "processDetectorSync", ({ enumerable: true, get: function () { return detectors_1.processDetectorSync; } })); -Object.defineProperty(exports, "serviceInstanceIdDetectorSync", ({ enumerable: true, get: function () { return detectors_1.serviceInstanceIdDetectorSync; } })); -var detect_resources_1 = __nccwpck_require__(990); -Object.defineProperty(exports, "detectResourcesSync", ({ enumerable: true, get: function () { return detect_resources_1.detectResourcesSync; } })); -Object.defineProperty(exports, "detectResources", ({ enumerable: true, get: function () { return detect_resources_1.detectResources; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 7784: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultServiceName = void 0; -var node_1 = __nccwpck_require__(90342); -Object.defineProperty(exports, "defaultServiceName", ({ enumerable: true, get: function () { return node_1.defaultServiceName; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 85671: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultServiceName = void 0; -function defaultServiceName() { - return `unknown_service:${process.argv0}`; -} -exports.defaultServiceName = defaultServiceName; -//# sourceMappingURL=default-service-name.js.map - -/***/ }), - -/***/ 90342: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultServiceName = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var default_service_name_1 = __nccwpck_require__(85671); -Object.defineProperty(exports, "defaultServiceName", ({ enumerable: true, get: function () { return default_service_name_1.defaultServiceName; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 44298: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isPromiseLike = void 0; -const isPromiseLike = (val) => { - return (val !== null && typeof val === 'object' && typeof val.then === 'function'); -}; -exports.isPromiseLike = isPromiseLike; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 42671: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isValidName = exports.isDescriptorCompatibleWith = exports.createInstrumentDescriptorWithView = exports.createInstrumentDescriptor = exports.InstrumentType = void 0; -const api_1 = __nccwpck_require__(65163); -const utils_1 = __nccwpck_require__(89158); -/** - * Supported types of metric instruments. - */ -var InstrumentType; -(function (InstrumentType) { - InstrumentType["COUNTER"] = "COUNTER"; - InstrumentType["GAUGE"] = "GAUGE"; - InstrumentType["HISTOGRAM"] = "HISTOGRAM"; - InstrumentType["UP_DOWN_COUNTER"] = "UP_DOWN_COUNTER"; - InstrumentType["OBSERVABLE_COUNTER"] = "OBSERVABLE_COUNTER"; - InstrumentType["OBSERVABLE_GAUGE"] = "OBSERVABLE_GAUGE"; - InstrumentType["OBSERVABLE_UP_DOWN_COUNTER"] = "OBSERVABLE_UP_DOWN_COUNTER"; -})(InstrumentType = exports.InstrumentType || (exports.InstrumentType = {})); -function createInstrumentDescriptor(name, type, options) { - var _a, _b, _c, _d; - if (!isValidName(name)) { - api_1.diag.warn(`Invalid metric name: "${name}". The metric name should be a ASCII string with a length no greater than 255 characters.`); + function onHttp2RemoteSettings(settings) { + this[kClient][kMaxConcurrentStreams] = settings.maxConcurrentStreams ?? this[kClient][kMaxConcurrentStreams]; + if (this[kRemoteSettings] === true && this[kEnableConnectProtocol] === true && settings.enableConnectProtocol === false) { + const err = new InformationalError("HTTP/2: Server disabled extended CONNECT protocol against RFC-8441"); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + return; + } + this[kEnableConnectProtocol] = settings.enableConnectProtocol ?? this[kEnableConnectProtocol]; + this[kRemoteSettings] = true; + this[kClient][kResume](); } - return { - name, - type, - description: (_a = options === null || options === void 0 ? void 0 : options.description) !== null && _a !== void 0 ? _a : '', - unit: (_b = options === null || options === void 0 ? void 0 : options.unit) !== null && _b !== void 0 ? _b : '', - valueType: (_c = options === null || options === void 0 ? void 0 : options.valueType) !== null && _c !== void 0 ? _c : api_1.ValueType.DOUBLE, - advice: (_d = options === null || options === void 0 ? void 0 : options.advice) !== null && _d !== void 0 ? _d : {}, - }; -} -exports.createInstrumentDescriptor = createInstrumentDescriptor; -function createInstrumentDescriptorWithView(view, instrument) { - var _a, _b; - return { - name: (_a = view.name) !== null && _a !== void 0 ? _a : instrument.name, - description: (_b = view.description) !== null && _b !== void 0 ? _b : instrument.description, - type: instrument.type, - unit: instrument.unit, - valueType: instrument.valueType, - advice: instrument.advice, - }; -} -exports.createInstrumentDescriptorWithView = createInstrumentDescriptorWithView; -function isDescriptorCompatibleWith(descriptor, otherDescriptor) { - // Names are case-insensitive strings. - return ((0, utils_1.equalsCaseInsensitive)(descriptor.name, otherDescriptor.name) && - descriptor.unit === otherDescriptor.unit && - descriptor.type === otherDescriptor.type && - descriptor.valueType === otherDescriptor.valueType); -} -exports.isDescriptorCompatibleWith = isDescriptorCompatibleWith; -// ASCII string with a length no greater than 255 characters. -// NB: the first character counted separately from the rest. -const NAME_REGEXP = /^[a-z][a-z0-9_.\-/]{0,254}$/i; -function isValidName(name) { - return name.match(NAME_REGEXP) != null; -} -exports.isValidName = isValidName; -//# sourceMappingURL=InstrumentDescriptor.js.map - -/***/ }), - -/***/ 20667: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isObservableInstrument = exports.ObservableUpDownCounterInstrument = exports.ObservableGaugeInstrument = exports.ObservableCounterInstrument = exports.ObservableInstrument = exports.HistogramInstrument = exports.GaugeInstrument = exports.CounterInstrument = exports.UpDownCounterInstrument = exports.SyncInstrument = void 0; -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -class SyncInstrument { - constructor(_writableMetricStorage, _descriptor) { - this._writableMetricStorage = _writableMetricStorage; - this._descriptor = _descriptor; - } - _record(value, attributes = {}, context = api_1.context.active()) { - if (typeof value !== 'number') { - api_1.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${value}`); - return; + function onHttp2SendPing(session) { + const state = session[kHTTP2SessionState]; + if ((session.closed || session.destroyed) && state.ping.interval != null) { + clearInterval(state.ping.interval); + state.ping.interval = null; + return; + } + session.ping(onPing.bind(session)); + function onPing(err, duration) { + const client = this[kClient]; + const socket = this[kClient]; + if (err != null) { + const error2 = new InformationalError(`HTTP/2: "PING" errored - type ${err.message}`); + socket[kError] = error2; + client[kOnError](error2); + } else { + client.emit("ping", duration); + } + } + } + function onHttp2SessionError(err) { + assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + function onHttp2FrameError(type2, code, id) { + if (id === 0) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type2}, 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); + } + function onHttp2SessionGoAway(errorCode) { + const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${errorCode}`, util.getSocketInfo(this[kSocket])); + const client = this[kClient]; + client[kSocket] = null; + client[kHTTPContext] = null; + this.close(); + 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(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client.emit("connectionError", client[kUrl], [client], err); + client[kResume](); + } + function onHttp2SessionClose() { + const { [kClient]: client, [kHTTP2SessionState]: state } = this; + const { [kSocket]: socket } = client; + const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util.getSocketInfo(socket)); + client[kSocket] = null; + client[kHTTPContext] = null; + if (state.ping.interval != null) { + clearInterval(state.ping.interval); + state.ping.interval = null; + } + if (client.destroyed) { + assert(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i2 = 0; i2 < requests.length; i2++) { + const request = requests[i2]; + util.errorRequest(client, request, err); + } + } + } + function onHttp2SocketClose() { + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + const client = this[kHTTP2Session][kClient]; + client[kSocket] = null; + client[kHTTPContext] = 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](); + } + function onHttp2SocketError(err) { + assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kError] = err; + this[kClient][kOnError](err); + } + function onHttp2SocketEnd() { + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + } + function onSocketClose() { + this[kClosed] = true; + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH2(client, request) { + const requestTimeout = request.bodyTimeout ?? client[kBodyTimeout]; + const session = client[kHTTP2Session]; + const { method, path: path13, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request; + let { body } = request; + if (upgrade != null && upgrade !== "websocket") { + util.errorRequest(client, request, new InvalidArgumentError(`Custom upgrade "${upgrade}" not supported over HTTP/2`)); + return false; + } + const headers = {}; + for (let n8 = 0; n8 < reqHeaders.length; n8 += 2) { + const key = reqHeaders[n8 + 0]; + const val = reqHeaders[n8 + 1]; + if (key === "cookie") { + if (headers[key] != null) { + headers[key] = Array.isArray(headers[key]) ? (headers[key].push(val), headers[key]) : [headers[key], val]; + } else { + headers[key] = val; + } + continue; } - if (this._descriptor.valueType === api_1.ValueType.INT && - !Number.isInteger(value)) { - api_1.diag.warn(`INT value type cannot accept a floating-point value for ${this._descriptor.name}, ignoring the fractional digits.`); - value = Math.trunc(value); - // ignore non-finite values. - if (!Number.isInteger(value)) { - return; + if (Array.isArray(val)) { + for (let i2 = 0; i2 < val.length; i2++) { + if (headers[key]) { + headers[key] += `, ${val[i2]}`; + } else { + headers[key] = val[i2]; } + } + } else if (headers[key]) { + headers[key] += `, ${val}`; + } else { + headers[key] = val; } - this._writableMetricStorage.record(value, attributes, context, (0, core_1.millisToHrTime)(Date.now())); - } -} -exports.SyncInstrument = SyncInstrument; -/** - * The class implements {@link UpDownCounter} interface. - */ -class UpDownCounterInstrument extends SyncInstrument { - /** - * Increment value of counter by the input. Inputs may be negative. - */ - add(value, attributes, ctx) { - this._record(value, attributes, ctx); - } -} -exports.UpDownCounterInstrument = UpDownCounterInstrument; -/** - * The class implements {@link Counter} interface. - */ -class CounterInstrument extends SyncInstrument { - /** - * Increment value of counter by the input. Inputs may not be negative. - */ - add(value, attributes, ctx) { - if (value < 0) { - api_1.diag.warn(`negative value provided to counter ${this._descriptor.name}: ${value}`); - return; + } + let stream = null; + 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; } - this._record(value, attributes, ctx); - } -} -exports.CounterInstrument = CounterInstrument; -/** - * The class implements {@link Gauge} interface. - */ -class GaugeInstrument extends SyncInstrument { - /** - * Records a measurement. - */ - record(value, attributes, ctx) { - this._record(value, attributes, ctx); - } -} -exports.GaugeInstrument = GaugeInstrument; -/** - * The class implements {@link Histogram} interface. - */ -class HistogramInstrument extends SyncInstrument { - /** - * Records a measurement. Value of the measurement must not be negative. - */ - record(value, attributes, ctx) { - if (value < 0) { - api_1.diag.warn(`negative value provided to histogram ${this._descriptor.name}: ${value}`); - return; + err = err || new RequestAbortedError(); + util.errorRequest(client, request, err); + if (stream != null) { + stream.removeAllListeners("data"); + stream.close(); + client[kOnError](err); + client[kResume](); } - this._record(value, attributes, ctx); - } -} -exports.HistogramInstrument = HistogramInstrument; -class ObservableInstrument { - constructor(descriptor, metricStorages, _observableRegistry) { - this._observableRegistry = _observableRegistry; - this._descriptor = descriptor; - this._metricStorages = metricStorages; - } - /** - * @see {Observable.addCallback} - */ - addCallback(callback) { - this._observableRegistry.addCallback(callback, this); - } - /** - * @see {Observable.removeCallback} - */ - removeCallback(callback) { - this._observableRegistry.removeCallback(callback, this); - } -} -exports.ObservableInstrument = ObservableInstrument; -class ObservableCounterInstrument extends ObservableInstrument { -} -exports.ObservableCounterInstrument = ObservableCounterInstrument; -class ObservableGaugeInstrument extends ObservableInstrument { -} -exports.ObservableGaugeInstrument = ObservableGaugeInstrument; -class ObservableUpDownCounterInstrument extends ObservableInstrument { -} -exports.ObservableUpDownCounterInstrument = ObservableUpDownCounterInstrument; -function isObservableInstrument(it) { - return it instanceof ObservableInstrument; -} -exports.isObservableInstrument = isObservableInstrument; -//# sourceMappingURL=Instruments.js.map - -/***/ }), - -/***/ 45894: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Meter = void 0; -const InstrumentDescriptor_1 = __nccwpck_require__(42671); -const Instruments_1 = __nccwpck_require__(20667); -/** - * This class implements the {@link IMeter} interface. - */ -class Meter { - constructor(_meterSharedState) { - this._meterSharedState = _meterSharedState; - } - /** - * Create a {@link Gauge} instrument. - */ - createGauge(name, options) { - const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.GAUGE, options); - const storage = this._meterSharedState.registerMetricStorage(descriptor); - return new Instruments_1.GaugeInstrument(storage, descriptor); - } - /** - * Create a {@link Histogram} instrument. - */ - createHistogram(name, options) { - const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.HISTOGRAM, options); - const storage = this._meterSharedState.registerMetricStorage(descriptor); - return new Instruments_1.HistogramInstrument(storage, descriptor); - } - /** - * Create a {@link Counter} instrument. - */ - createCounter(name, options) { - const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.COUNTER, options); - const storage = this._meterSharedState.registerMetricStorage(descriptor); - return new Instruments_1.CounterInstrument(storage, descriptor); - } - /** - * Create a {@link UpDownCounter} instrument. - */ - createUpDownCounter(name, options) { - const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.UP_DOWN_COUNTER, options); - const storage = this._meterSharedState.registerMetricStorage(descriptor); - return new Instruments_1.UpDownCounterInstrument(storage, descriptor); - } - /** - * Create a {@link ObservableGauge} instrument. - */ - createObservableGauge(name, options) { - const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.OBSERVABLE_GAUGE, options); - const storages = this._meterSharedState.registerAsyncMetricStorage(descriptor); - return new Instruments_1.ObservableGaugeInstrument(descriptor, storages, this._meterSharedState.observableRegistry); - } - /** - * Create a {@link ObservableCounter} instrument. - */ - createObservableCounter(name, options) { - const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.OBSERVABLE_COUNTER, options); - const storages = this._meterSharedState.registerAsyncMetricStorage(descriptor); - return new Instruments_1.ObservableCounterInstrument(descriptor, storages, this._meterSharedState.observableRegistry); - } - /** - * Create a {@link ObservableUpDownCounter} instrument. - */ - createObservableUpDownCounter(name, options) { - const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER, options); - const storages = this._meterSharedState.registerAsyncMetricStorage(descriptor); - return new Instruments_1.ObservableUpDownCounterInstrument(descriptor, storages, this._meterSharedState.observableRegistry); - } - /** - * @see {@link Meter.addBatchObservableCallback} - */ - addBatchObservableCallback(callback, observables) { - this._meterSharedState.observableRegistry.addBatchCallback(callback, observables); - } - /** - * @see {@link Meter.removeBatchObservableCallback} - */ - removeBatchObservableCallback(callback, observables) { - this._meterSharedState.observableRegistry.removeBatchCallback(callback, observables); - } -} -exports.Meter = Meter; -//# sourceMappingURL=Meter.js.map - -/***/ }), - -/***/ 60310: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MeterProvider = void 0; -const api_1 = __nccwpck_require__(65163); -const resources_1 = __nccwpck_require__(3871); -const MeterProviderSharedState_1 = __nccwpck_require__(30898); -const MetricCollector_1 = __nccwpck_require__(20142); -/** - * This class implements the {@link MeterProvider} interface. - */ -class MeterProvider { - constructor(options) { - var _a; - this._shutdown = false; - const resource = resources_1.Resource.default().merge((_a = options === null || options === void 0 ? void 0 : options.resource) !== null && _a !== void 0 ? _a : resources_1.Resource.empty()); - this._sharedState = new MeterProviderSharedState_1.MeterProviderSharedState(resource); - if ((options === null || options === void 0 ? void 0 : options.views) != null && options.views.length > 0) { - for (const view of options.views) { - this._sharedState.viewRegistry.addView(view); - } - } - if ((options === null || options === void 0 ? void 0 : options.readers) != null && options.readers.length > 0) { - for (const metricReader of options.readers) { - this.addMetricReader(metricReader); - } - } - } - /** - * Get a meter with the configuration of the MeterProvider. - */ - getMeter(name, version = '', options = {}) { - // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#meter-creation - if (this._shutdown) { - api_1.diag.warn('A shutdown MeterProvider cannot provide a Meter'); - return (0, api_1.createNoopMeter)(); - } - return this._sharedState.getMeterSharedState({ - name, - version, - schemaUrl: options.schemaUrl, - }).meter; - } - /** - * Register a {@link MetricReader} to the meter provider. After the - * registration, the MetricReader can start metrics collection. - * - *

NOTE: {@link MetricReader} instances MUST be added before creating any instruments. - * A {@link MetricReader} instance registered later may receive no or incomplete metric data. - * - * @param metricReader the metric reader to be registered. - * - * @deprecated This method will be removed in SDK 2.0. Please use - * {@link MeterProviderOptions.readers} via the {@link MeterProvider} constructor instead - */ - addMetricReader(metricReader) { - const collector = new MetricCollector_1.MetricCollector(this._sharedState, metricReader); - metricReader.setMetricProducer(collector); - this._sharedState.metricCollectors.push(collector); - } - /** - * Flush all buffered data and shut down the MeterProvider and all registered - * MetricReaders. - * - * Returns a promise which is resolved when all flushes are complete. - */ - async shutdown(options) { - if (this._shutdown) { - api_1.diag.warn('shutdown may only be called once per MeterProvider'); - return; - } - this._shutdown = true; - await Promise.all(this._sharedState.metricCollectors.map(collector => { - return collector.shutdown(options); - })); - } - /** - * Notifies all registered MetricReaders to flush any buffered data. - * - * Returns a promise which is resolved when all flushes are complete. - */ - async forceFlush(options) { - // do not flush after shutdown - if (this._shutdown) { - api_1.diag.warn('invalid attempt to force flush after MeterProvider shutdown'); - return; - } - await Promise.all(this._sharedState.metricCollectors.map(collector => { - return collector.forceFlush(options); - })); - } -} -exports.MeterProvider = MeterProvider; -//# sourceMappingURL=MeterProvider.js.map - -/***/ }), - -/***/ 80183: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BatchObservableResultImpl = exports.ObservableResultImpl = void 0; -const api_1 = __nccwpck_require__(65163); -const HashMap_1 = __nccwpck_require__(99909); -const Instruments_1 = __nccwpck_require__(20667); -/** - * The class implements {@link ObservableResult} interface. - */ -class ObservableResultImpl { - constructor(_instrumentName, _valueType) { - this._instrumentName = _instrumentName; - this._valueType = _valueType; - /** - * @internal - */ - this._buffer = new HashMap_1.AttributeHashMap(); - } - /** - * Observe a measurement of the value associated with the given attributes. - */ - observe(value, attributes = {}) { - if (typeof value !== 'number') { - api_1.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${value}`); - return; - } - if (this._valueType === api_1.ValueType.INT && !Number.isInteger(value)) { - api_1.diag.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`); - value = Math.trunc(value); - // ignore non-finite values. - if (!Number.isInteger(value)) { - return; + util.destroy(body, err); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) { + return false; + } + if (upgrade || method === "CONNECT") { + session.ref(); + if (upgrade === "websocket") { + if (session[kEnableConnectProtocol] === false) { + util.errorRequest(client, request, new InformationalError("HTTP/2: Extended CONNECT protocol not supported by server")); + session.unref(); + return false; + } + headers[HTTP2_HEADER_METHOD] = "CONNECT"; + headers[HTTP2_HEADER_PROTOCOL] = "websocket"; + headers[HTTP2_HEADER_PATH] = path13; + if (protocol === "ws:" || protocol === "wss:") { + headers[HTTP2_HEADER_SCHEME] = protocol === "ws:" ? "http" : "https"; + } else { + headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https"; + } + stream = session.request(headers, { endStream: false, signal }); + stream[kHTTP2Stream] = true; + stream.once("response", (headers2, _flags) => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2; + request.onUpgrade(statusCode, parseH2Headers(realHeaders), stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + }); + stream.on("error", () => { + if (stream.rstCode === NGHTTP2_REFUSED_STREAM || stream.rstCode === NGHTTP2_CANCEL) { + abort(new InformationalError(`HTTP/2: "stream error" received - code ${stream.rstCode}`)); } + }); + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + stream.setTimeout(requestTimeout); + return true; + } + stream = session.request(headers, { endStream: false, signal }); + stream[kHTTP2Stream] = true; + stream.on("response", (headers2) => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2; + request.onUpgrade(statusCode, parseH2Headers(realHeaders), stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + }); + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + stream.setTimeout(requestTimeout); + return true; + } + headers[HTTP2_HEADER_PATH] = path13; + headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "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 (!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(body || contentLength === 0, "no body must not have content length"); + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; + } + session.ref(); + if (channels.sendHeaders.hasSubscribers) { + let header = ""; + for (const key in headers) { + header += `${key}: ${headers[key]}\r +`; + } + channels.sendHeaders.publish({ request, headers: header, socket: session[kSocket] }); + } + const shouldEndStream = method === "GET" || method === "HEAD" || body === null; + if (expectContinue) { + headers[HTTP2_HEADER_EXPECT] = "100-continue"; + stream = session.request(headers, { endStream: shouldEndStream, signal }); + stream[kHTTP2Stream] = true; + stream.once("continue", writeBodyH2); + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + stream[kHTTP2Stream] = true; + writeBodyH2(); + } + ++session[kOpenStreams]; + stream.setTimeout(requestTimeout); + let responseReceived = false; + stream.once("response", (headers2) => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2; + request.onResponseStarted(); + responseReceived = true; + if (request.aborted) { + stream.removeAllListeners("data"); + return; } - this._buffer.set(attributes, value); - } -} -exports.ObservableResultImpl = ObservableResultImpl; -/** - * The class implements {@link BatchObservableCallback} interface. - */ -class BatchObservableResultImpl { - constructor() { - /** - * @internal - */ - this._buffer = new Map(); - } - /** - * Observe a measurement of the value associated with the given attributes. - */ - observe(metric, value, attributes = {}) { - if (!(0, Instruments_1.isObservableInstrument)(metric)) { + if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), "") === false) { + stream.pause(); + } + stream.on("data", (chunk) => { + if (request.aborted || request.completed) { return; + } + if (request.onData(chunk) === false) { + stream.pause(); + } + }); + }); + stream.once("end", () => { + stream.removeAllListeners("data"); + if (responseReceived) { + if (!request.aborted && !request.completed) { + request.onComplete({}); + } + client[kQueue][client[kRunningIdx]++] = null; + client[kResume](); + } else { + abort(new InformationalError("HTTP/2: stream half-closed (remote)")); + client[kQueue][client[kRunningIdx]++] = null; + client[kPendingIdx] = client[kRunningIdx]; + client[kResume](); } - let map = this._buffer.get(metric); - if (map == null) { - map = new HashMap_1.AttributeHashMap(); - this._buffer.set(metric, map); + }); + stream.once("close", () => { + stream.removeAllListeners("data"); + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) { + session.unref(); } - if (typeof value !== 'number') { - api_1.diag.warn(`non-number value provided to metric ${metric._descriptor.name}: ${value}`); - return; + }); + stream.once("error", function(err) { + stream.removeAllListeners("data"); + abort(err); + }); + stream.once("frameError", (type2, code) => { + stream.removeAllListeners("data"); + abort(new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code}`)); + }); + stream.on("aborted", () => { + stream.removeAllListeners("data"); + }); + stream.on("timeout", () => { + const err = new InformationalError(`HTTP/2: "stream timeout after ${requestTimeout}"`); + stream.removeAllListeners("data"); + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) { + session.unref(); + } + abort(err); + }); + stream.once("trailers", (trailers) => { + if (request.aborted || request.completed) { + return; } - if (metric._descriptor.valueType === api_1.ValueType.INT && - !Number.isInteger(value)) { - api_1.diag.warn(`INT value type cannot accept a floating-point value for ${metric._descriptor.name}, ignoring the fractional digits.`); - value = Math.trunc(value); - // ignore non-finite values. - if (!Number.isInteger(value)) { - return; - } + stream.removeAllListeners("data"); + request.onComplete(trailers); + }); + return true; + function writeBodyH2() { + 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); } - map.set(attributes, value); - } -} -exports.BatchObservableResultImpl = BatchObservableResultImpl; -//# sourceMappingURL=ObservableResult.js.map - -/***/ }), - -/***/ 4905: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DropAggregator = void 0; -const types_1 = __nccwpck_require__(66430); -/** Basic aggregator for None which keeps no recorded value. */ -class DropAggregator { - constructor() { - this.kind = types_1.AggregatorKind.DROP; - } - createAccumulation() { - return undefined; - } - merge(_previous, _delta) { - return undefined; - } - diff(_previous, _current) { - return undefined; - } - toMetricData(_descriptor, _aggregationTemporality, _accumulationByAttributes, _endTime) { - return undefined; - } -} -exports.DropAggregator = DropAggregator; -//# sourceMappingURL=Drop.js.map - -/***/ }), - -/***/ 39405: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExponentialHistogramAggregator = exports.ExponentialHistogramAccumulation = void 0; -const types_1 = __nccwpck_require__(66430); -const MetricData_1 = __nccwpck_require__(51729); -const api_1 = __nccwpck_require__(65163); -const InstrumentDescriptor_1 = __nccwpck_require__(42671); -const Buckets_1 = __nccwpck_require__(57202); -const getMapping_1 = __nccwpck_require__(21861); -const util_1 = __nccwpck_require__(4589); -// HighLow is a utility class used for computing a common scale for -// two exponential histogram accumulations -class HighLow { - constructor(low, high) { - this.low = low; - this.high = high; - } - static combine(h1, h2) { - return new HighLow(Math.min(h1.low, h2.low), Math.max(h1.high, h2.high)); - } -} -const MAX_SCALE = 20; -const DEFAULT_MAX_SIZE = 160; -const MIN_MAX_SIZE = 2; -class ExponentialHistogramAccumulation { - constructor(startTime = startTime, _maxSize = DEFAULT_MAX_SIZE, _recordMinMax = true, _sum = 0, _count = 0, _zeroCount = 0, _min = Number.POSITIVE_INFINITY, _max = Number.NEGATIVE_INFINITY, _positive = new Buckets_1.Buckets(), _negative = new Buckets_1.Buckets(), _mapping = (0, getMapping_1.getMapping)(MAX_SCALE)) { - this.startTime = startTime; - this._maxSize = _maxSize; - this._recordMinMax = _recordMinMax; - this._sum = _sum; - this._count = _count; - this._zeroCount = _zeroCount; - this._min = _min; - this._max = _max; - this._positive = _positive; - this._negative = _negative; - this._mapping = _mapping; - if (this._maxSize < MIN_MAX_SIZE) { - api_1.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, \ - changing to the minimum size of: ${MIN_MAX_SIZE}`); - this._maxSize = MIN_MAX_SIZE; - } - } - /** - * record updates a histogram with a single count - * @param {Number} value - */ - record(value) { - this.updateByIncrement(value, 1); - } - /** - * Sets the start time for this accumulation - * @param {HrTime} startTime - */ - setStartTime(startTime) { - this.startTime = startTime; - } - /** - * Returns the datapoint representation of this accumulation - * @param {HrTime} startTime - */ - toPointValue() { - return { - hasMinMax: this._recordMinMax, - min: this.min, - max: this.max, - sum: this.sum, - positive: { - offset: this.positive.offset, - bucketCounts: this.positive.counts(), - }, - negative: { - offset: this.negative.offset, - bucketCounts: this.negative.counts(), - }, - count: this.count, - scale: this.scale, - zeroCount: this.zeroCount, - }; + } } - /** - * @returns {Number} The sum of values recorded by this accumulation - */ - get sum() { - return this._sum; - } - /** - * @returns {Number} The minimum value recorded by this accumulation - */ - get min() { - return this._min; - } - /** - * @returns {Number} The maximum value recorded by this accumulation - */ - get max() { - return this._max; - } - /** - * @returns {Number} The count of values recorded by this accumulation - */ - get count() { - return this._count; - } - /** - * @returns {Number} The number of 0 values recorded by this accumulation - */ - get zeroCount() { - return this._zeroCount; - } - /** - * @returns {Number} The scale used by this accumulation - */ - get scale() { - if (this._count === this._zeroCount) { - // all zeros! scale doesn't matter, use zero - return 0; + 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); } - return this._mapping.scale; - } - /** - * positive holds the positive values - * @returns {Buckets} - */ - get positive() { - return this._positive; - } - /** - * negative holds the negative values by their absolute value - * @returns {Buckets} - */ - get negative() { - return this._negative; - } - /** - * updateByIncr supports updating a histogram with a non-negative - * increment. - * @param value - * @param increment - */ - updateByIncrement(value, increment) { - // NaN does not fall into any bucket, is not zero and should not be counted, - // NaN is never greater than max nor less than min, therefore return as there's nothing for us to do. - if (Number.isNaN(value)) { - return; + if (!expectsPayload) { + socket[kReset] = true; } - if (value > this._max) { - this._max = value; + request.onRequestSent(); + client[kResume](); + } catch (error2) { + abort(error2); + } + } + function writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { + assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + 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](); + } } - if (value < this._min) { - this._min = value; + ); + 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; } - this._count += increment; - if (value === 0) { - this._zeroCount += increment; - return; + 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(); } - this._sum += value * increment; - if (value > 0) { - this._updateBuckets(this._positive, value, increment); + } + const waitForDrain = () => new Promise((resolve8, reject) => { + assert(callback === null); + if (socket[kError]) { + reject(socket[kError]); + } else { + callback = resolve8; } - else { - this._updateBuckets(this._negative, -value, increment); - } - } - /** - * merge combines data from previous value into self - * @param {ExponentialHistogramAccumulation} previous - */ - merge(previous) { - if (this._count === 0) { - this._min = previous.min; - this._max = previous.max; - } - else if (previous.count !== 0) { - if (previous.min < this.min) { - this._min = previous.min; - } - if (previous.max > this.max) { - this._max = previous.max; - } - } - this.startTime = previous.startTime; - this._sum += previous.sum; - this._count += previous.count; - this._zeroCount += previous.zeroCount; - const minScale = this._minScale(previous); - this._downscale(this.scale - minScale); - this._mergeBuckets(this.positive, previous, previous.positive, minScale); - this._mergeBuckets(this.negative, previous, previous.negative, minScale); - } - /** - * diff subtracts other from self - * @param {ExponentialHistogramAccumulation} other - */ - diff(other) { - this._min = Infinity; - this._max = -Infinity; - this._sum -= other.sum; - this._count -= other.count; - this._zeroCount -= other.zeroCount; - const minScale = this._minScale(other); - this._downscale(this.scale - minScale); - this._diffBuckets(this.positive, other, other.positive, minScale); - this._diffBuckets(this.negative, other, other.negative, minScale); - } - /** - * clone returns a deep copy of self - * @returns {ExponentialHistogramAccumulation} - */ - clone() { - return new ExponentialHistogramAccumulation(this.startTime, this._maxSize, this._recordMinMax, this._sum, this._count, this._zeroCount, this._min, this._max, this.positive.clone(), this.negative.clone(), this._mapping); - } - /** - * _updateBuckets maps the incoming value to a bucket index for the current - * scale. If the bucket index is outside of the range of the backing array, - * it will rescale the backing array and update the mapping for the new scale. - */ - _updateBuckets(buckets, value, increment) { - let index = this._mapping.mapToIndex(value); - // rescale the mapping if needed - let rescalingNeeded = false; - let high = 0; - let low = 0; - if (buckets.length === 0) { - buckets.indexStart = index; - buckets.indexEnd = buckets.indexStart; - buckets.indexBase = buckets.indexStart; - } - else if (index < buckets.indexStart && - buckets.indexEnd - index >= this._maxSize) { - rescalingNeeded = true; - low = index; - high = buckets.indexEnd; - } - else if (index > buckets.indexEnd && - index - buckets.indexStart >= this._maxSize) { - rescalingNeeded = true; - low = buckets.indexStart; - high = index; - } - // rescale and compute index at new scale - if (rescalingNeeded) { - const change = this._changeScale(high, low); - this._downscale(change); - index = this._mapping.mapToIndex(value); - } - this._incrementIndexBy(buckets, index, increment); - } - /** - * _incrementIndexBy increments the count of the bucket specified by `index`. - * If the index is outside of the range [buckets.indexStart, buckets.indexEnd] - * the boundaries of the backing array will be adjusted and more buckets will - * be added if needed. - */ - _incrementIndexBy(buckets, index, increment) { - if (increment === 0) { - // nothing to do for a zero increment, can happen during a merge operation - return; + }); + 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(); + } } - if (buckets.length === 0) { - buckets.indexStart = buckets.indexEnd = buckets.indexBase = index; - } - if (index < buckets.indexStart) { - const span = buckets.indexEnd - index; - if (span >= buckets.backing.length) { - this._grow(buckets, span + 1); - } - buckets.indexStart = index; - } - else if (index > buckets.indexEnd) { - const span = index - buckets.indexStart; - if (span >= buckets.backing.length) { - this._grow(buckets, span + 1); - } - buckets.indexEnd = index; - } - let bucketIndex = index - buckets.indexBase; - if (bucketIndex < 0) { - bucketIndex += buckets.backing.length; - } - buckets.incrementBucket(bucketIndex, increment); - } - /** - * grow resizes the backing array by doubling in size up to maxSize. - * This extends the array with a bunch of zeros and copies the - * existing counts to the same position. - */ - _grow(buckets, needed) { - const size = buckets.backing.length; - const bias = buckets.indexBase - buckets.indexStart; - const oldPositiveLimit = size - bias; - let newSize = (0, util_1.nextGreaterSquare)(needed); - if (newSize > this._maxSize) { - newSize = this._maxSize; - } - const newPositiveLimit = newSize - bias; - buckets.backing.growTo(newSize, oldPositiveLimit, newPositiveLimit); - } - /** - * _changeScale computes how much downscaling is needed by shifting the - * high and low values until they are separated by no more than size. - */ - _changeScale(high, low) { - let change = 0; - while (high - low >= this._maxSize) { - high >>= 1; - low >>= 1; - change++; - } - return change; - } - /** - * _downscale subtracts `change` from the current mapping scale. - */ - _downscale(change) { - if (change === 0) { - return; + h2stream.end(); + request.onRequestSent(); + if (!expectsPayload) { + socket[kReset] = true; } - if (change < 0) { - // Note: this should be impossible. If we get here it's because - // there is a bug in the implementation. - throw new Error(`impossible change of scale: ${this.scale}`); - } - const newScale = this._mapping.scale - change; - this._positive.downscale(change); - this._negative.downscale(change); - this._mapping = (0, getMapping_1.getMapping)(newScale); - } - /** - * _minScale is used by diff and merge to compute an ideal combined scale - */ - _minScale(other) { - const minScale = Math.min(this.scale, other.scale); - const highLowPos = HighLow.combine(this._highLowAtScale(this.positive, this.scale, minScale), this._highLowAtScale(other.positive, other.scale, minScale)); - const highLowNeg = HighLow.combine(this._highLowAtScale(this.negative, this.scale, minScale), this._highLowAtScale(other.negative, other.scale, minScale)); - return Math.min(minScale - this._changeScale(highLowPos.high, highLowPos.low), minScale - this._changeScale(highLowNeg.high, highLowNeg.low)); - } - /** - * _highLowAtScale is used by diff and merge to compute an ideal combined scale. - */ - _highLowAtScale(buckets, currentScale, newScale) { - if (buckets.length === 0) { - return new HighLow(0, -1); - } - const shift = currentScale - newScale; - return new HighLow(buckets.indexStart >> shift, buckets.indexEnd >> shift); - } - /** - * _mergeBuckets translates index values from another histogram and - * adds the values into the corresponding buckets of this histogram. - */ - _mergeBuckets(ours, other, theirs, scale) { - const theirOffset = theirs.offset; - const theirChange = other.scale - scale; - for (let i = 0; i < theirs.length; i++) { - this._incrementIndexBy(ours, (theirOffset + i) >> theirChange, theirs.at(i)); - } - } - /** - * _diffBuckets translates index values from another histogram and - * subtracts the values in the corresponding buckets of this histogram. - */ - _diffBuckets(ours, other, theirs, scale) { - const theirOffset = theirs.offset; - const theirChange = other.scale - scale; - for (let i = 0; i < theirs.length; i++) { - const ourIndex = (theirOffset + i) >> theirChange; - let bucketIndex = ourIndex - ours.indexBase; - if (bucketIndex < 0) { - bucketIndex += ours.backing.length; - } - ours.decrementBucket(bucketIndex, theirs.at(i)); - } - ours.trim(); - } -} -exports.ExponentialHistogramAccumulation = ExponentialHistogramAccumulation; -/** - * Aggregator for ExponentialHistogramAccumulations - */ -class ExponentialHistogramAggregator { - /** - * @param _maxSize Maximum number of buckets for each of the positive - * and negative ranges, exclusive of the zero-bucket. - * @param _recordMinMax If set to true, min and max will be recorded. - * Otherwise, min and max will not be recorded. - */ - constructor(_maxSize, _recordMinMax) { - this._maxSize = _maxSize; - this._recordMinMax = _recordMinMax; - this.kind = types_1.AggregatorKind.EXPONENTIAL_HISTOGRAM; - } - createAccumulation(startTime) { - return new ExponentialHistogramAccumulation(startTime, this._maxSize, this._recordMinMax); - } - /** - * Return the result of the merge of two exponential histogram accumulations. - */ - merge(previous, delta) { - const result = delta.clone(); - result.merge(previous); - return result; - } - /** - * Returns a new DELTA aggregation by comparing two cumulative measurements. - */ - diff(previous, current) { - const result = current.clone(); - result.diff(previous); - return result; - } - toMetricData(descriptor, aggregationTemporality, accumulationByAttributes, endTime) { - return { - descriptor, - aggregationTemporality, - dataPointType: MetricData_1.DataPointType.EXPONENTIAL_HISTOGRAM, - dataPoints: accumulationByAttributes.map(([attributes, accumulation]) => { - const pointValue = accumulation.toPointValue(); - // determine if instrument allows negative values. - const allowsNegativeValues = descriptor.type === InstrumentDescriptor_1.InstrumentType.GAUGE || - descriptor.type === InstrumentDescriptor_1.InstrumentType.UP_DOWN_COUNTER || - descriptor.type === InstrumentDescriptor_1.InstrumentType.OBSERVABLE_GAUGE || - descriptor.type === InstrumentDescriptor_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER; - return { - attributes, - startTime: accumulation.startTime, - endTime, - value: { - min: pointValue.hasMinMax ? pointValue.min : undefined, - max: pointValue.hasMinMax ? pointValue.max : undefined, - sum: !allowsNegativeValues ? pointValue.sum : undefined, - positive: { - offset: pointValue.positive.offset, - bucketCounts: pointValue.positive.bucketCounts, - }, - negative: { - offset: pointValue.negative.offset, - bucketCounts: pointValue.negative.bucketCounts, - }, - count: pointValue.count, - scale: pointValue.scale, - zeroCount: pointValue.zeroCount, - }, - }; - }), - }; + client[kResume](); + } catch (err) { + abort(err); + } finally { + h2stream.off("close", onDrain).off("drain", onDrain); + } } -} -exports.ExponentialHistogramAggregator = ExponentialHistogramAggregator; -//# sourceMappingURL=ExponentialHistogram.js.map - -/***/ }), - -/***/ 85389: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HistogramAggregator = exports.HistogramAccumulation = void 0; -const types_1 = __nccwpck_require__(66430); -const MetricData_1 = __nccwpck_require__(51729); -const InstrumentDescriptor_1 = __nccwpck_require__(42671); -const utils_1 = __nccwpck_require__(89158); -function createNewEmptyCheckpoint(boundaries) { - const counts = boundaries.map(() => 0); - counts.push(0); - return { - buckets: { - boundaries, - counts, - }, - sum: 0, - count: 0, - hasMinMax: false, - min: Infinity, - max: -Infinity, + module3.exports = connectH2; + } +}); + +// node_modules/undici/lib/dispatcher/client.js +var require_client = __commonJS({ + "node_modules/undici/lib/dispatcher/client.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var net = __require("node:net"); + var http = __require("node:http"); + var util = require_util(); + var { ClientStats } = require_stats(); + var { channels } = require_diagnostics(); + var Request = require_request(); + var DispatcherBase = require_dispatcher_base(); + var { + InvalidArgumentError, + InformationalError, + ClientDestroyedError + } = require_errors(); + var buildConnector = require_connect(); + var { + 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, + kMaxRequests, + kCounter, + kClose, + kDestroy, + kDispatch, + kLocalAddress, + kMaxResponseSize, + kOnError, + kHTTPContext, + kMaxConcurrentStreams, + kHTTP2InitialWindowSize, + kHTTP2ConnectionWindowSize, + kResume, + kPingInterval + } = require_symbols(); + var connectH1 = require_client_h1(); + var connectH2 = require_client_h2(); + var kClosedResolve = /* @__PURE__ */ Symbol("kClosedResolve"); + var getDefaultNodeMaxHeaderSize = http && http.maxHeaderSize && Number.isInteger(http.maxHeaderSize) && http.maxHeaderSize > 0 ? () => http.maxHeaderSize : () => { + throw new InvalidArgumentError("http module not available or http.maxHeaderSize invalid"); }; -} -class HistogramAccumulation { - constructor(startTime, _boundaries, _recordMinMax = true, _current = createNewEmptyCheckpoint(_boundaries)) { - this.startTime = startTime; - this._boundaries = _boundaries; - this._recordMinMax = _recordMinMax; - this._current = _current; - } - record(value) { - // NaN does not fall into any bucket, is not zero and should not be counted, - // NaN is never greater than max nor less than min, therefore return as there's nothing for us to do. - if (Number.isNaN(value)) { - return; - } - this._current.count += 1; - this._current.sum += value; - if (this._recordMinMax) { - this._current.min = Math.min(value, this._current.min); - this._current.max = Math.max(value, this._current.max); - this._current.hasMinMax = true; - } - const idx = (0, utils_1.binarySearchUB)(this._boundaries, value); - this._current.buckets.counts[idx] += 1; - } - setStartTime(startTime) { - this.startTime = startTime; - } - toPointValue() { - return this._current; - } -} -exports.HistogramAccumulation = HistogramAccumulation; -/** - * Basic aggregator which observes events and counts them in pre-defined buckets - * and provides the total sum and count of all observations. - */ -class HistogramAggregator { - /** - * @param _boundaries sorted upper bounds of recorded values. - * @param _recordMinMax If set to true, min and max will be recorded. Otherwise, min and max will not be recorded. - */ - constructor(_boundaries, _recordMinMax) { - this._boundaries = _boundaries; - this._recordMinMax = _recordMinMax; - this.kind = types_1.AggregatorKind.HISTOGRAM; - } - createAccumulation(startTime) { - return new HistogramAccumulation(startTime, this._boundaries, this._recordMinMax); - } - /** - * Return the result of the merge of two histogram accumulations. As long as one Aggregator - * instance produces all Accumulations with constant boundaries we don't need to worry about - * merging accumulations with different boundaries. - */ - merge(previous, delta) { - const previousValue = previous.toPointValue(); - const deltaValue = delta.toPointValue(); - const previousCounts = previousValue.buckets.counts; - const deltaCounts = deltaValue.buckets.counts; - const mergedCounts = new Array(previousCounts.length); - for (let idx = 0; idx < previousCounts.length; idx++) { - mergedCounts[idx] = previousCounts[idx] + deltaCounts[idx]; - } - let min = Infinity; - let max = -Infinity; - if (this._recordMinMax) { - if (previousValue.hasMinMax && deltaValue.hasMinMax) { - min = Math.min(previousValue.min, deltaValue.min); - max = Math.max(previousValue.max, deltaValue.max); - } - else if (previousValue.hasMinMax) { - min = previousValue.min; - max = previousValue.max; - } - else if (deltaValue.hasMinMax) { - min = deltaValue.min; - max = deltaValue.max; - } - } - return new HistogramAccumulation(previous.startTime, previousValue.buckets.boundaries, this._recordMinMax, { - buckets: { - boundaries: previousValue.buckets.boundaries, - counts: mergedCounts, - }, - count: previousValue.count + deltaValue.count, - sum: previousValue.sum + deltaValue.sum, - hasMinMax: this._recordMinMax && - (previousValue.hasMinMax || deltaValue.hasMinMax), - min: min, - max: max, - }); - } - /** - * Returns a new DELTA aggregation by comparing two cumulative measurements. - */ - diff(previous, current) { - const previousValue = previous.toPointValue(); - const currentValue = current.toPointValue(); - const previousCounts = previousValue.buckets.counts; - const currentCounts = currentValue.buckets.counts; - const diffedCounts = new Array(previousCounts.length); - for (let idx = 0; idx < previousCounts.length; idx++) { - diffedCounts[idx] = currentCounts[idx] - previousCounts[idx]; - } - return new HistogramAccumulation(current.startTime, previousValue.buckets.boundaries, this._recordMinMax, { - buckets: { - boundaries: previousValue.buckets.boundaries, - counts: diffedCounts, - }, - count: currentValue.count - previousValue.count, - sum: currentValue.sum - previousValue.sum, - hasMinMax: false, - min: Infinity, - max: -Infinity, - }); - } - toMetricData(descriptor, aggregationTemporality, accumulationByAttributes, endTime) { - return { - descriptor, - aggregationTemporality, - dataPointType: MetricData_1.DataPointType.HISTOGRAM, - dataPoints: accumulationByAttributes.map(([attributes, accumulation]) => { - const pointValue = accumulation.toPointValue(); - // determine if instrument allows negative values. - const allowsNegativeValues = descriptor.type === InstrumentDescriptor_1.InstrumentType.GAUGE || - descriptor.type === InstrumentDescriptor_1.InstrumentType.UP_DOWN_COUNTER || - descriptor.type === InstrumentDescriptor_1.InstrumentType.OBSERVABLE_GAUGE || - descriptor.type === InstrumentDescriptor_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER; - return { - attributes, - startTime: accumulation.startTime, - endTime, - value: { - min: pointValue.hasMinMax ? pointValue.min : undefined, - max: pointValue.hasMinMax ? pointValue.max : undefined, - sum: !allowsNegativeValues ? pointValue.sum : undefined, - buckets: pointValue.buckets, - count: pointValue.count, - }, - }; - }), - }; - } -} -exports.HistogramAggregator = HistogramAggregator; -//# sourceMappingURL=Histogram.js.map - -/***/ }), - -/***/ 75209: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LastValueAggregator = exports.LastValueAccumulation = void 0; -const types_1 = __nccwpck_require__(66430); -const core_1 = __nccwpck_require__(89736); -const MetricData_1 = __nccwpck_require__(51729); -class LastValueAccumulation { - constructor(startTime, _current = 0, sampleTime = [0, 0]) { - this.startTime = startTime; - this._current = _current; - this.sampleTime = sampleTime; - } - record(value) { - this._current = value; - this.sampleTime = (0, core_1.millisToHrTime)(Date.now()); - } - setStartTime(startTime) { - this.startTime = startTime; - } - toPointValue() { - return this._current; - } -} -exports.LastValueAccumulation = LastValueAccumulation; -/** Basic aggregator which calculates a LastValue from individual measurements. */ -class LastValueAggregator { - constructor() { - this.kind = types_1.AggregatorKind.LAST_VALUE; - } - createAccumulation(startTime) { - return new LastValueAccumulation(startTime); - } - /** - * Returns the result of the merge of the given accumulations. - * - * Return the newly captured (delta) accumulation for LastValueAggregator. - */ - merge(previous, delta) { - // nanoseconds may lose precisions. - const latestAccumulation = (0, core_1.hrTimeToMicroseconds)(delta.sampleTime) >= - (0, core_1.hrTimeToMicroseconds)(previous.sampleTime) - ? delta - : previous; - return new LastValueAccumulation(previous.startTime, latestAccumulation.toPointValue(), latestAccumulation.sampleTime); - } - /** - * Returns a new DELTA aggregation by comparing two cumulative measurements. - * - * A delta aggregation is not meaningful to LastValueAggregator, just return - * the newly captured (delta) accumulation for LastValueAggregator. - */ - diff(previous, current) { - // nanoseconds may lose precisions. - const latestAccumulation = (0, core_1.hrTimeToMicroseconds)(current.sampleTime) >= - (0, core_1.hrTimeToMicroseconds)(previous.sampleTime) - ? current - : previous; - return new LastValueAccumulation(current.startTime, latestAccumulation.toPointValue(), latestAccumulation.sampleTime); - } - toMetricData(descriptor, aggregationTemporality, accumulationByAttributes, endTime) { - return { - descriptor, - aggregationTemporality, - dataPointType: MetricData_1.DataPointType.GAUGE, - dataPoints: accumulationByAttributes.map(([attributes, accumulation]) => { - return { - attributes, - startTime: accumulation.startTime, - endTime, - value: accumulation.toPointValue(), - }; - }), - }; + var noop = () => { + }; + function getPipelining(client) { + return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1; } -} -exports.LastValueAggregator = LastValueAggregator; -//# sourceMappingURL=LastValue.js.map - -/***/ }), - -/***/ 95394: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SumAggregator = exports.SumAccumulation = void 0; -const types_1 = __nccwpck_require__(66430); -const MetricData_1 = __nccwpck_require__(51729); -class SumAccumulation { - constructor(startTime, monotonic, _current = 0, reset = false) { - this.startTime = startTime; - this.monotonic = monotonic; - this._current = _current; - this.reset = reset; - } - record(value) { - if (this.monotonic && value < 0) { - return; + var Client = class extends DispatcherBase { + /** + * + * @param {string|URL} url + * @param {import('../../types/client.js').Client.Options} options + */ + constructor(url3, { + maxHeaderSize, + headersTimeout, + socketTimeout, + requestTimeout, + connectTimeout, + bodyTimeout, + idleTimeout, + keepAlive, + keepAliveTimeout, + maxKeepAliveTimeout, + keepAliveMaxTimeout, + keepAliveTimeoutThreshold, + socketPath, + pipelining, + tls, + strictContentLength, + maxCachedSessions, + connect: connect2, + maxRequestsPerClient, + localAddress, + maxResponseSize, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + // h2 + maxConcurrentStreams, + allowH2, + useH2c, + initialWindowSize, + connectionWindowSize, + pingInterval + } = {}) { + if (keepAlive !== void 0) { + throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); } - this._current += value; - } - setStartTime(startTime) { - this.startTime = startTime; - } - toPointValue() { - return this._current; - } -} -exports.SumAccumulation = SumAccumulation; -/** Basic aggregator which calculates a Sum from individual measurements. */ -class SumAggregator { - constructor(monotonic) { - this.monotonic = monotonic; - this.kind = types_1.AggregatorKind.SUM; - } - createAccumulation(startTime) { - return new SumAccumulation(startTime, this.monotonic); - } - /** - * Returns the result of the merge of the given accumulations. - */ - merge(previous, delta) { - const prevPv = previous.toPointValue(); - const deltaPv = delta.toPointValue(); - if (delta.reset) { - return new SumAccumulation(delta.startTime, this.monotonic, deltaPv, delta.reset); - } - return new SumAccumulation(previous.startTime, this.monotonic, prevPv + deltaPv); - } - /** - * Returns a new DELTA aggregation by comparing two cumulative measurements. - */ - diff(previous, current) { - const prevPv = previous.toPointValue(); - const currPv = current.toPointValue(); - /** - * If the SumAggregator is a monotonic one and the previous point value is - * greater than the current one, a reset is deemed to be happened. - * Return the current point value to prevent the value from been reset. - */ - if (this.monotonic && prevPv > currPv) { - return new SumAccumulation(current.startTime, this.monotonic, currPv, true); + if (socketTimeout !== void 0) { + throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); } - return new SumAccumulation(current.startTime, this.monotonic, currPv - prevPv); - } - toMetricData(descriptor, aggregationTemporality, accumulationByAttributes, endTime) { - return { - descriptor, - aggregationTemporality, - dataPointType: MetricData_1.DataPointType.SUM, - dataPoints: accumulationByAttributes.map(([attributes, accumulation]) => { - return { - attributes, - startTime: accumulation.startTime, - endTime, - value: accumulation.toPointValue(), - }; - }), - isMonotonic: this.monotonic, - }; - } -} -exports.SumAggregator = SumAggregator; -//# sourceMappingURL=Sum.js.map - -/***/ }), - -/***/ 57202: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Buckets = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -class Buckets { - /** - * The term index refers to the number of the exponential histogram bucket - * used to determine its boundaries. The lower boundary of a bucket is - * determined by base ** index and the upper boundary of a bucket is - * determined by base ** (index + 1). index values are signed to account - * for values less than or equal to 1. - * - * indexBase is the index of the 0th position in the - * backing array, i.e., backing[0] is the count - * in the bucket with index `indexBase`. - * - * indexStart is the smallest index value represented - * in the backing array. - * - * indexEnd is the largest index value represented in - * the backing array. - */ - constructor(backing = new BucketsBacking(), indexBase = 0, indexStart = 0, indexEnd = 0) { - this.backing = backing; - this.indexBase = indexBase; - this.indexStart = indexStart; - this.indexEnd = indexEnd; - } - /** - * Offset is the bucket index of the smallest entry in the counts array - * @returns {number} - */ - get offset() { - return this.indexStart; - } - /** - * Buckets is a view into the backing array. - * @returns {number} - */ - get length() { - if (this.backing.length === 0) { - return 0; + if (requestTimeout !== void 0) { + throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); } - if (this.indexEnd === this.indexStart && this.at(0) === 0) { - return 0; + if (idleTimeout !== void 0) { + throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); } - return this.indexEnd - this.indexStart + 1; - } - /** - * An array of counts, where count[i] carries the count - * of the bucket at index (offset+i). count[i] is the count of - * values greater than base^(offset+i) and less than or equal to - * base^(offset+i+1). - * @returns {number} The logical counts based on the backing array - */ - counts() { - return Array.from({ length: this.length }, (_, i) => this.at(i)); - } - /** - * At returns the count of the bucket at a position in the logical - * array of counts. - * @param position - * @returns {number} - */ - at(position) { - const bias = this.indexBase - this.indexStart; - if (position < bias) { - position += this.backing.length; - } - position -= bias; - return this.backing.countAt(position); - } - /** - * incrementBucket increments the backing array index by `increment` - * @param bucketIndex - * @param increment - */ - incrementBucket(bucketIndex, increment) { - this.backing.increment(bucketIndex, increment); - } - /** - * decrementBucket decrements the backing array index by `decrement` - * if decrement is greater than the current value, it's set to 0. - * @param bucketIndex - * @param decrement - */ - decrementBucket(bucketIndex, decrement) { - this.backing.decrement(bucketIndex, decrement); - } - /** - * trim removes leading and / or trailing zero buckets (which can occur - * after diffing two histos) and rotates the backing array so that the - * smallest non-zero index is in the 0th position of the backing array - */ - trim() { - for (let i = 0; i < this.length; i++) { - if (this.at(i) !== 0) { - this.indexStart += i; - break; - } - else if (i === this.length - 1) { - //the entire array is zeroed out - this.indexStart = this.indexEnd = this.indexBase = 0; - return; - } + if (maxKeepAliveTimeout !== void 0) { + throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); } - for (let i = this.length - 1; i >= 0; i--) { - if (this.at(i) !== 0) { - this.indexEnd -= this.length - i - 1; - break; - } + if (maxHeaderSize != null) { + if (!Number.isInteger(maxHeaderSize) || maxHeaderSize < 1) { + throw new InvalidArgumentError("invalid maxHeaderSize"); + } + } else { + maxHeaderSize = getDefaultNodeMaxHeaderSize(); } - this._rotate(); - } - /** - * downscale first rotates, then collapses 2**`by`-to-1 buckets. - * @param by - */ - downscale(by) { - this._rotate(); - const size = 1 + this.indexEnd - this.indexStart; - const each = 1 << by; - let inpos = 0; - let outpos = 0; - for (let pos = this.indexStart; pos <= this.indexEnd;) { - let mod = pos % each; - if (mod < 0) { - mod += each; - } - for (let i = mod; i < each && inpos < size; i++) { - this._relocateBucket(outpos, inpos); - inpos++; - pos++; - } - outpos++; - } - this.indexStart >>= by; - this.indexEnd >>= by; - this.indexBase = this.indexStart; - } - /** - * Clone returns a deep copy of Buckets - * @returns {Buckets} - */ - clone() { - return new Buckets(this.backing.clone(), this.indexBase, this.indexStart, this.indexEnd); - } - /** - * _rotate shifts the backing array contents so that indexStart == - * indexBase to simplify the downscale logic. - */ - _rotate() { - const bias = this.indexBase - this.indexStart; - if (bias === 0) { - return; + if (socketPath != null && typeof socketPath !== "string") { + throw new InvalidArgumentError("invalid socketPath"); } - else if (bias > 0) { - this.backing.reverse(0, this.backing.length); - this.backing.reverse(0, bias); - this.backing.reverse(bias, this.backing.length); + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { + throw new InvalidArgumentError("invalid connectTimeout"); } - else { - // negative bias, this can happen when diffing two histograms - this.backing.reverse(0, this.backing.length); - this.backing.reverse(0, this.backing.length + bias); - } - this.indexBase = this.indexStart; - } - /** - * _relocateBucket adds the count in counts[src] to counts[dest] and - * resets count[src] to zero. - */ - _relocateBucket(dest, src) { - if (dest === src) { - return; + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { + throw new InvalidArgumentError("invalid keepAliveTimeout"); } - this.incrementBucket(dest, this.backing.emptyBucket(src)); - } -} -exports.Buckets = Buckets; -/** - * BucketsBacking holds the raw buckets and some utility methods to - * manage them. - */ -class BucketsBacking { - constructor(_counts = [0]) { - this._counts = _counts; - } - /** - * length returns the physical size of the backing array, which - * is >= buckets.length() - */ - get length() { - return this._counts.length; - } - /** - * countAt returns the count in a specific bucket - */ - countAt(pos) { - return this._counts[pos]; - } - /** - * growTo grows a backing array and copies old entries - * into their correct new positions. - */ - growTo(newSize, oldPositiveLimit, newPositiveLimit) { - const tmp = new Array(newSize).fill(0); - tmp.splice(newPositiveLimit, this._counts.length - oldPositiveLimit, ...this._counts.slice(oldPositiveLimit)); - tmp.splice(0, oldPositiveLimit, ...this._counts.slice(0, oldPositiveLimit)); - this._counts = tmp; - } - /** - * reverse the items in the backing array in the range [from, limit). - */ - reverse(from, limit) { - const num = Math.floor((from + limit) / 2) - from; - for (let i = 0; i < num; i++) { - const tmp = this._counts[from + i]; - this._counts[from + i] = this._counts[limit - i - 1]; - this._counts[limit - i - 1] = tmp; - } - } - /** - * emptyBucket empties the count from a bucket, for - * moving into another. - */ - emptyBucket(src) { - const tmp = this._counts[src]; - this._counts[src] = 0; - return tmp; - } - /** - * increments a bucket by `increment` - */ - increment(bucketIndex, increment) { - this._counts[bucketIndex] += increment; - } - /** - * decrements a bucket by `decrement` - */ - decrement(bucketIndex, decrement) { - if (this._counts[bucketIndex] >= decrement) { - this._counts[bucketIndex] -= decrement; + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { + throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); } - else { - // this should not happen, but we're being defensive against - // negative counts. - this._counts[bucketIndex] = 0; + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { + throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); } - } - /** - * clone returns a deep copy of BucketsBacking - */ - clone() { - return new BucketsBacking([...this._counts]); - } -} -//# sourceMappingURL=Buckets.js.map - -/***/ }), - -/***/ 6074: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExponentMapping = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const ieee754 = __nccwpck_require__(64708); -const util = __nccwpck_require__(4589); -const types_1 = __nccwpck_require__(33133); -/** - * ExponentMapping implements exponential mapping functions for - * scales <=0. For scales > 0 LogarithmMapping should be used. - */ -class ExponentMapping { - constructor(scale) { - this._shift = -scale; - } - /** - * Maps positive floating point values to indexes corresponding to scale - * @param value - * @returns {number} index for provided value at the current scale - */ - mapToIndex(value) { - if (value < ieee754.MIN_VALUE) { - return this._minNormalLowerBoundaryIndex(); - } - const exp = ieee754.getNormalBase2(value); - // In case the value is an exact power of two, compute a - // correction of -1. Note, we are using a custom _rightShift - // to accommodate a 52-bit argument, which the native bitwise - // operators do not support - const correction = this._rightShift(ieee754.getSignificand(value) - 1, ieee754.SIGNIFICAND_WIDTH); - return (exp + correction) >> this._shift; - } - /** - * Returns the lower bucket boundary for the given index for scale - * - * @param index - * @returns {number} - */ - lowerBoundary(index) { - const minIndex = this._minNormalLowerBoundaryIndex(); - if (index < minIndex) { - throw new types_1.MappingError(`underflow: ${index} is < minimum lower boundary: ${minIndex}`); - } - const maxIndex = this._maxNormalLowerBoundaryIndex(); - if (index > maxIndex) { - throw new types_1.MappingError(`overflow: ${index} is > maximum lower boundary: ${maxIndex}`); - } - return util.ldexp(1, index << this._shift); - } - /** - * The scale used by this mapping - * @returns {number} - */ - get scale() { - if (this._shift === 0) { - return 0; + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { + throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); } - return -this._shift; - } - _minNormalLowerBoundaryIndex() { - let index = ieee754.MIN_NORMAL_EXPONENT >> this._shift; - if (this._shift < 2) { - index--; + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { + throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); } - return index; - } - _maxNormalLowerBoundaryIndex() { - return ieee754.MAX_NORMAL_EXPONENT >> this._shift; - } - _rightShift(value, shift) { - return Math.floor(value * Math.pow(2, -shift)); - } -} -exports.ExponentMapping = ExponentMapping; -//# sourceMappingURL=ExponentMapping.js.map - -/***/ }), - -/***/ 59147: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LogarithmMapping = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const ieee754 = __nccwpck_require__(64708); -const util = __nccwpck_require__(4589); -const types_1 = __nccwpck_require__(33133); -/** - * LogarithmMapping implements exponential mapping functions for scale > 0. - * For scales <= 0 the exponent mapping should be used. - */ -class LogarithmMapping { - constructor(scale) { - this._scale = scale; - this._scaleFactor = util.ldexp(Math.LOG2E, scale); - this._inverseFactor = util.ldexp(Math.LN2, -scale); - } - /** - * Maps positive floating point values to indexes corresponding to scale - * @param value - * @returns {number} index for provided value at the current scale - */ - mapToIndex(value) { - if (value <= ieee754.MIN_VALUE) { - return this._minNormalLowerBoundaryIndex() - 1; - } - // exact power of two special case - if (ieee754.getSignificand(value) === 0) { - const exp = ieee754.getNormalBase2(value); - return (exp << this._scale) - 1; - } - // non-power of two cases. use Math.floor to round the scaled logarithm - const index = Math.floor(Math.log(value) * this._scaleFactor); - const maxIndex = this._maxNormalLowerBoundaryIndex(); - if (index >= maxIndex) { - return maxIndex; - } - return index; - } - /** - * Returns the lower bucket boundary for the given index for scale - * - * @param index - * @returns {number} - */ - lowerBoundary(index) { - const maxIndex = this._maxNormalLowerBoundaryIndex(); - if (index >= maxIndex) { - if (index === maxIndex) { - return 2 * Math.exp((index - (1 << this._scale)) / this._scaleFactor); - } - throw new types_1.MappingError(`overflow: ${index} is > maximum lower boundary: ${maxIndex}`); - } - const minIndex = this._minNormalLowerBoundaryIndex(); - if (index <= minIndex) { - if (index === minIndex) { - return ieee754.MIN_VALUE; - } - else if (index === minIndex - 1) { - return Math.exp((index + (1 << this._scale)) / this._scaleFactor) / 2; - } - throw new types_1.MappingError(`overflow: ${index} is < minimum lower boundary: ${minIndex}`); - } - return Math.exp(index * this._inverseFactor); - } - /** - * The scale used by this mapping - * @returns {number} - */ - get scale() { - return this._scale; - } - _minNormalLowerBoundaryIndex() { - return ieee754.MIN_NORMAL_EXPONENT << this._scale; - } - _maxNormalLowerBoundaryIndex() { - return ((ieee754.MAX_NORMAL_EXPONENT + 1) << this._scale) - 1; - } -} -exports.LogarithmMapping = LogarithmMapping; -//# sourceMappingURL=LogarithmMapping.js.map - -/***/ }), - -/***/ 21861: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getMapping = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const ExponentMapping_1 = __nccwpck_require__(6074); -const LogarithmMapping_1 = __nccwpck_require__(59147); -const types_1 = __nccwpck_require__(33133); -const MIN_SCALE = -10; -const MAX_SCALE = 20; -const PREBUILT_MAPPINGS = Array.from({ length: 31 }, (_, i) => { - if (i > 10) { - return new LogarithmMapping_1.LogarithmMapping(i - 10); - } - return new ExponentMapping_1.ExponentMapping(i - 10); -}); -/** - * getMapping returns an appropriate mapping for the given scale. For scales -10 - * to 0 the underlying type will be ExponentMapping. For scales 1 to 20 the - * underlying type will be LogarithmMapping. - * @param scale a number in the range [-10, 20] - * @returns {Mapping} - */ -function getMapping(scale) { - if (scale > MAX_SCALE || scale < MIN_SCALE) { - throw new types_1.MappingError(`expected scale >= ${MIN_SCALE} && <= ${MAX_SCALE}, got: ${scale}`); - } - // mappings are offset by 10. scale -10 is at position 0 and scale 20 is at 30 - return PREBUILT_MAPPINGS[scale + 10]; -} -exports.getMapping = getMapping; -//# sourceMappingURL=getMapping.js.map - -/***/ }), - -/***/ 64708: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSignificand = exports.getNormalBase2 = exports.MIN_VALUE = exports.MAX_NORMAL_EXPONENT = exports.MIN_NORMAL_EXPONENT = exports.SIGNIFICAND_WIDTH = void 0; -/** - * The functions and constants in this file allow us to interact - * with the internal representation of an IEEE 64-bit floating point - * number. We need to work with all 64-bits, thus, care needs to be - * taken when working with Javascript's bitwise operators (<<, >>, &, - * |, etc) as they truncate operands to 32-bits. In order to work around - * this we work with the 64-bits as two 32-bit halves, perform bitwise - * operations on them independently, and combine the results (if needed). - */ -exports.SIGNIFICAND_WIDTH = 52; -/** - * EXPONENT_MASK is set to 1 for the hi 32-bits of an IEEE 754 - * floating point exponent: 0x7ff00000. - */ -const EXPONENT_MASK = 0x7ff00000; -/** - * SIGNIFICAND_MASK is the mask for the significand portion of the hi 32-bits - * of an IEEE 754 double-precision floating-point value: 0xfffff - */ -const SIGNIFICAND_MASK = 0xfffff; -/** - * EXPONENT_BIAS is the exponent bias specified for encoding - * the IEEE 754 double-precision floating point exponent: 1023 - */ -const EXPONENT_BIAS = 1023; -/** - * MIN_NORMAL_EXPONENT is the minimum exponent of a normalized - * floating point: -1022. - */ -exports.MIN_NORMAL_EXPONENT = -EXPONENT_BIAS + 1; -/** - * MAX_NORMAL_EXPONENT is the maximum exponent of a normalized - * floating point: 1023. - */ -exports.MAX_NORMAL_EXPONENT = EXPONENT_BIAS; -/** - * MIN_VALUE is the smallest normal number - */ -exports.MIN_VALUE = Math.pow(2, -1022); -/** - * getNormalBase2 extracts the normalized base-2 fractional exponent. - * This returns k for the equation f x 2**k where f is - * in the range [1, 2). Note that this function is not called for - * subnormal numbers. - * @param {number} value - the value to determine normalized base-2 fractional - * exponent for - * @returns {number} the normalized base-2 exponent - */ -function getNormalBase2(value) { - const dv = new DataView(new ArrayBuffer(8)); - dv.setFloat64(0, value); - // access the raw 64-bit float as 32-bit uints - const hiBits = dv.getUint32(0); - const expBits = (hiBits & EXPONENT_MASK) >> 20; - return expBits - EXPONENT_BIAS; -} -exports.getNormalBase2 = getNormalBase2; -/** - * GetSignificand returns the 52 bit (unsigned) significand as a signed value. - * @param {number} value - the floating point number to extract the significand from - * @returns {number} The 52-bit significand - */ -function getSignificand(value) { - const dv = new DataView(new ArrayBuffer(8)); - dv.setFloat64(0, value); - // access the raw 64-bit float as two 32-bit uints - const hiBits = dv.getUint32(0); - const loBits = dv.getUint32(4); - // extract the significand bits from the hi bits and left shift 32 places note: - // we can't use the native << operator as it will truncate the result to 32-bits - const significandHiBits = (hiBits & SIGNIFICAND_MASK) * Math.pow(2, 32); - // combine the hi and lo bits and return - return significandHiBits + loBits; -} -exports.getSignificand = getSignificand; -//# sourceMappingURL=ieee754.js.map - -/***/ }), - -/***/ 33133: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MappingError = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -class MappingError extends Error { -} -exports.MappingError = MappingError; -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 4589: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.nextGreaterSquare = exports.ldexp = void 0; -/** - * Note: other languages provide this as a built in function. This is - * a naive, but functionally correct implementation. This is used sparingly, - * when creating a new mapping in a running application. - * - * ldexp returns frac × 2**exp. With the following special cases: - * ldexp(±0, exp) = ±0 - * ldexp(±Inf, exp) = ±Inf - * ldexp(NaN, exp) = NaN - * @param frac - * @param exp - * @returns {number} - */ -function ldexp(frac, exp) { - if (frac === 0 || - frac === Number.POSITIVE_INFINITY || - frac === Number.NEGATIVE_INFINITY || - Number.isNaN(frac)) { - return frac; - } - return frac * Math.pow(2, exp); -} -exports.ldexp = ldexp; -/** - * Computes the next power of two that is greater than or equal to v. - * This implementation more efficient than, but functionally equivalent - * to Math.pow(2, Math.ceil(Math.log(x)/Math.log(2))). - * @param v - * @returns {number} - */ -function nextGreaterSquare(v) { - // The following expression computes the least power-of-two - // that is >= v. There are a number of tricky ways to - // do this, see https://stackoverflow.com/questions/466204/rounding-up-to-next-power-of-2 - v--; - v |= v >> 1; - v |= v >> 2; - v |= v >> 4; - v |= v >> 8; - v |= v >> 16; - v++; - return v; -} -exports.nextGreaterSquare = nextGreaterSquare; -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ 85922: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SumAggregator = exports.SumAccumulation = exports.LastValueAggregator = exports.LastValueAccumulation = exports.ExponentialHistogramAggregator = exports.ExponentialHistogramAccumulation = exports.HistogramAggregator = exports.HistogramAccumulation = exports.DropAggregator = void 0; -var Drop_1 = __nccwpck_require__(4905); -Object.defineProperty(exports, "DropAggregator", ({ enumerable: true, get: function () { return Drop_1.DropAggregator; } })); -var Histogram_1 = __nccwpck_require__(85389); -Object.defineProperty(exports, "HistogramAccumulation", ({ enumerable: true, get: function () { return Histogram_1.HistogramAccumulation; } })); -Object.defineProperty(exports, "HistogramAggregator", ({ enumerable: true, get: function () { return Histogram_1.HistogramAggregator; } })); -var ExponentialHistogram_1 = __nccwpck_require__(39405); -Object.defineProperty(exports, "ExponentialHistogramAccumulation", ({ enumerable: true, get: function () { return ExponentialHistogram_1.ExponentialHistogramAccumulation; } })); -Object.defineProperty(exports, "ExponentialHistogramAggregator", ({ enumerable: true, get: function () { return ExponentialHistogram_1.ExponentialHistogramAggregator; } })); -var LastValue_1 = __nccwpck_require__(75209); -Object.defineProperty(exports, "LastValueAccumulation", ({ enumerable: true, get: function () { return LastValue_1.LastValueAccumulation; } })); -Object.defineProperty(exports, "LastValueAggregator", ({ enumerable: true, get: function () { return LastValue_1.LastValueAggregator; } })); -var Sum_1 = __nccwpck_require__(95394); -Object.defineProperty(exports, "SumAccumulation", ({ enumerable: true, get: function () { return Sum_1.SumAccumulation; } })); -Object.defineProperty(exports, "SumAggregator", ({ enumerable: true, get: function () { return Sum_1.SumAggregator; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 66430: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AggregatorKind = void 0; -/** The kind of aggregator. */ -var AggregatorKind; -(function (AggregatorKind) { - AggregatorKind[AggregatorKind["DROP"] = 0] = "DROP"; - AggregatorKind[AggregatorKind["SUM"] = 1] = "SUM"; - AggregatorKind[AggregatorKind["LAST_VALUE"] = 2] = "LAST_VALUE"; - AggregatorKind[AggregatorKind["HISTOGRAM"] = 3] = "HISTOGRAM"; - AggregatorKind[AggregatorKind["EXPONENTIAL_HISTOGRAM"] = 4] = "EXPONENTIAL_HISTOGRAM"; -})(AggregatorKind = exports.AggregatorKind || (exports.AggregatorKind = {})); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 18747: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR = exports.DEFAULT_AGGREGATION_SELECTOR = void 0; -const Aggregation_1 = __nccwpck_require__(14769); -const AggregationTemporality_1 = __nccwpck_require__(28589); -const DEFAULT_AGGREGATION_SELECTOR = _instrumentType => Aggregation_1.Aggregation.Default(); -exports.DEFAULT_AGGREGATION_SELECTOR = DEFAULT_AGGREGATION_SELECTOR; -const DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR = _instrumentType => AggregationTemporality_1.AggregationTemporality.CUMULATIVE; -exports.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR = DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR; -//# sourceMappingURL=AggregationSelector.js.map - -/***/ }), - -/***/ 28589: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AggregationTemporality = void 0; -/** - * AggregationTemporality indicates the way additive quantities are expressed. - */ -var AggregationTemporality; -(function (AggregationTemporality) { - AggregationTemporality[AggregationTemporality["DELTA"] = 0] = "DELTA"; - AggregationTemporality[AggregationTemporality["CUMULATIVE"] = 1] = "CUMULATIVE"; -})(AggregationTemporality = exports.AggregationTemporality || (exports.AggregationTemporality = {})); -//# sourceMappingURL=AggregationTemporality.js.map - -/***/ }), - -/***/ 38144: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ConsoleMetricExporter = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const core_1 = __nccwpck_require__(89736); -const AggregationSelector_1 = __nccwpck_require__(18747); -/** - * This is an implementation of {@link PushMetricExporter} that prints metrics to the - * console. This class can be used for diagnostic purposes. - * - * NOTE: This {@link PushMetricExporter} is intended for diagnostics use only, output rendered to the console may change at any time. - */ -/* eslint-disable no-console */ -class ConsoleMetricExporter { - constructor(options) { - var _a; - this._shutdown = false; - this._temporalitySelector = - (_a = options === null || options === void 0 ? void 0 : options.temporalitySelector) !== null && _a !== void 0 ? _a : AggregationSelector_1.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR; - } - export(metrics, resultCallback) { - if (this._shutdown) { - // If the exporter is shutting down, by spec, we need to return FAILED as export result - setImmediate(resultCallback, { code: core_1.ExportResultCode.FAILED }); - return; + if (connect2 != null && typeof connect2 !== "function" && typeof connect2 !== "object") { + throw new InvalidArgumentError("connect must be a function or an object"); } - return ConsoleMetricExporter._sendMetrics(metrics, resultCallback); - } - forceFlush() { - return Promise.resolve(); - } - selectAggregationTemporality(_instrumentType) { - return this._temporalitySelector(_instrumentType); - } - shutdown() { - this._shutdown = true; - return Promise.resolve(); - } - static _sendMetrics(metrics, done) { - for (const scopeMetrics of metrics.scopeMetrics) { - for (const metric of scopeMetrics.metrics) { - console.dir({ - descriptor: metric.descriptor, - dataPointType: metric.dataPointType, - dataPoints: metric.dataPoints, - }, { depth: null }); - } + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { + throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); } - done({ code: core_1.ExportResultCode.SUCCESS }); - } -} -exports.ConsoleMetricExporter = ConsoleMetricExporter; -//# sourceMappingURL=ConsoleMetricExporter.js.map - -/***/ }), - -/***/ 89094: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.InMemoryMetricExporter = void 0; -const core_1 = __nccwpck_require__(89736); -/** - * In-memory Metrics Exporter is a Push Metric Exporter - * which accumulates metrics data in the local memory and - * allows to inspect it (useful for e.g. unit tests). - */ -class InMemoryMetricExporter { - constructor(aggregationTemporality) { - this._shutdown = false; - this._metrics = []; - this._aggregationTemporality = aggregationTemporality; - } - /** - * @inheritedDoc - */ - export(metrics, resultCallback) { - // Avoid storing metrics when exporter is shutdown - if (this._shutdown) { - setTimeout(() => resultCallback({ code: core_1.ExportResultCode.FAILED }), 0); - return; + if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) { + throw new InvalidArgumentError("localAddress must be valid string IP address"); } - this._metrics.push(metrics); - setTimeout(() => resultCallback({ code: core_1.ExportResultCode.SUCCESS }), 0); - } - /** - * Returns all the collected resource metrics - * @returns ResourceMetrics[] - */ - getMetrics() { - return this._metrics; - } - forceFlush() { - return Promise.resolve(); - } - reset() { - this._metrics = []; - } - selectAggregationTemporality(_instrumentType) { - return this._aggregationTemporality; - } - shutdown() { - this._shutdown = true; - return Promise.resolve(); - } -} -exports.InMemoryMetricExporter = InMemoryMetricExporter; -//# sourceMappingURL=InMemoryMetricExporter.js.map - -/***/ }), - -/***/ 51729: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DataPointType = void 0; -/** - * The aggregated point data type. - */ -var DataPointType; -(function (DataPointType) { - /** - * A histogram data point contains a histogram statistics of collected - * values with a list of explicit bucket boundaries and statistics such - * as min, max, count, and sum of all collected values. - */ - DataPointType[DataPointType["HISTOGRAM"] = 0] = "HISTOGRAM"; - /** - * An exponential histogram data point contains a histogram statistics of - * collected values where bucket boundaries are automatically calculated - * using an exponential function, and statistics such as min, max, count, - * and sum of all collected values. - */ - DataPointType[DataPointType["EXPONENTIAL_HISTOGRAM"] = 1] = "EXPONENTIAL_HISTOGRAM"; - /** - * A gauge metric data point has only a single numeric value. - */ - DataPointType[DataPointType["GAUGE"] = 2] = "GAUGE"; - /** - * A sum metric data point has a single numeric value and a - * monotonicity-indicator. - */ - DataPointType[DataPointType["SUM"] = 3] = "SUM"; -})(DataPointType = exports.DataPointType || (exports.DataPointType = {})); -//# sourceMappingURL=MetricData.js.map - -/***/ }), - -/***/ 56313: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MetricReader = void 0; -const api = __nccwpck_require__(65163); -const utils_1 = __nccwpck_require__(89158); -const AggregationSelector_1 = __nccwpck_require__(18747); -/** - * A registered reader of metrics that, when linked to a {@link MetricProducer}, offers global - * control over metrics. - */ -class MetricReader { - constructor(options) { - var _a, _b, _c; - // Tracks the shutdown state. - // TODO: use BindOncePromise here once a new version of @opentelemetry/core is available. - this._shutdown = false; - this._aggregationSelector = - (_a = options === null || options === void 0 ? void 0 : options.aggregationSelector) !== null && _a !== void 0 ? _a : AggregationSelector_1.DEFAULT_AGGREGATION_SELECTOR; - this._aggregationTemporalitySelector = - (_b = options === null || options === void 0 ? void 0 : options.aggregationTemporalitySelector) !== null && _b !== void 0 ? _b : AggregationSelector_1.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR; - this._metricProducers = (_c = options === null || options === void 0 ? void 0 : options.metricProducers) !== null && _c !== void 0 ? _c : []; - } - /** - * Set the {@link MetricProducer} used by this instance. **This should only be called by the - * SDK and should be considered internal.** - * - * To add additional {@link MetricProducer}s to a {@link MetricReader}, pass them to the - * constructor as {@link MetricReaderOptions.metricProducers}. - * - * @internal - * @param metricProducer - */ - setMetricProducer(metricProducer) { - if (this._sdkMetricProducer) { - throw new Error('MetricReader can not be bound to a MeterProvider again.'); - } - this._sdkMetricProducer = metricProducer; - this.onInitialized(); - } - /** - * Select the {@link Aggregation} for the given {@link InstrumentType} for this - * reader. - */ - selectAggregation(instrumentType) { - return this._aggregationSelector(instrumentType); - } - /** - * Select the {@link AggregationTemporality} for the given - * {@link InstrumentType} for this reader. - */ - selectAggregationTemporality(instrumentType) { - return this._aggregationTemporalitySelector(instrumentType); - } - /** - * Handle once the SDK has initialized this {@link MetricReader} - * Overriding this method is optional. - */ - onInitialized() { - // Default implementation is empty. - } - /** - * Collect all metrics from the associated {@link MetricProducer} - */ - async collect(options) { - if (this._sdkMetricProducer === undefined) { - throw new Error('MetricReader is not bound to a MetricProducer'); - } - // Subsequent invocations to collect are not allowed. SDKs SHOULD return some failure for these calls. - if (this._shutdown) { - throw new Error('MetricReader is shutdown'); - } - const [sdkCollectionResults, ...additionalCollectionResults] = await Promise.all([ - this._sdkMetricProducer.collect({ - timeoutMillis: options === null || options === void 0 ? void 0 : options.timeoutMillis, - }), - ...this._metricProducers.map(producer => producer.collect({ - timeoutMillis: options === null || options === void 0 ? void 0 : options.timeoutMillis, - })), - ]); - // Merge the results, keeping the SDK's Resource - const errors = sdkCollectionResults.errors.concat((0, utils_1.FlatMap)(additionalCollectionResults, result => result.errors)); - const resource = sdkCollectionResults.resourceMetrics.resource; - const scopeMetrics = sdkCollectionResults.resourceMetrics.scopeMetrics.concat((0, utils_1.FlatMap)(additionalCollectionResults, result => result.resourceMetrics.scopeMetrics)); - return { - resourceMetrics: { - resource, - scopeMetrics, - }, - errors, - }; - } - /** - * Shuts down the metric reader, the promise will reject after the optional timeout or resolve after completion. - * - *

NOTE: this operation will continue even after the promise rejects due to a timeout. - * @param options options with timeout. - */ - async shutdown(options) { - // Do not call shutdown again if it has already been called. - if (this._shutdown) { - api.diag.error('Cannot call shutdown twice.'); - return; + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { + throw new InvalidArgumentError("maxResponseSize must be a positive number"); } - // No timeout if timeoutMillis is undefined or null. - if ((options === null || options === void 0 ? void 0 : options.timeoutMillis) == null) { - await this.onShutdown(); + if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) { + throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); } - else { - await (0, utils_1.callWithTimeout)(this.onShutdown(), options.timeoutMillis); - } - this._shutdown = true; - } - /** - * Flushes metrics read by this reader, the promise will reject after the optional timeout or resolve after completion. - * - *

NOTE: this operation will continue even after the promise rejects due to a timeout. - * @param options options with timeout. - */ - async forceFlush(options) { - if (this._shutdown) { - api.diag.warn('Cannot forceFlush on already shutdown MetricReader.'); - return; + if (allowH2 != null && typeof allowH2 !== "boolean") { + throw new InvalidArgumentError("allowH2 must be a valid boolean value"); } - // No timeout if timeoutMillis is undefined or null. - if ((options === null || options === void 0 ? void 0 : options.timeoutMillis) == null) { - await this.onForceFlush(); - return; + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) { + throw new InvalidArgumentError("maxConcurrentStreams must be a positive integer, greater than 0"); } - await (0, utils_1.callWithTimeout)(this.onForceFlush(), options.timeoutMillis); - } -} -exports.MetricReader = MetricReader; -//# sourceMappingURL=MetricReader.js.map - -/***/ }), - -/***/ 60542: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PeriodicExportingMetricReader = void 0; -const api = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -const MetricReader_1 = __nccwpck_require__(56313); -const utils_1 = __nccwpck_require__(89158); -const api_1 = __nccwpck_require__(65163); -/** - * {@link MetricReader} which collects metrics based on a user-configurable time interval, and passes the metrics to - * the configured {@link PushMetricExporter} - */ -class PeriodicExportingMetricReader extends MetricReader_1.MetricReader { - constructor(options) { - var _a, _b, _c, _d; - super({ - aggregationSelector: (_a = options.exporter.selectAggregation) === null || _a === void 0 ? void 0 : _a.bind(options.exporter), - aggregationTemporalitySelector: (_b = options.exporter.selectAggregationTemporality) === null || _b === void 0 ? void 0 : _b.bind(options.exporter), - metricProducers: options.metricProducers, - }); - if (options.exportIntervalMillis !== undefined && - options.exportIntervalMillis <= 0) { - throw Error('exportIntervalMillis must be greater than 0'); + if (useH2c != null && typeof useH2c !== "boolean") { + throw new InvalidArgumentError("useH2c must be a valid boolean value"); } - if (options.exportTimeoutMillis !== undefined && - options.exportTimeoutMillis <= 0) { - throw Error('exportTimeoutMillis must be greater than 0'); + if (initialWindowSize != null && (!Number.isInteger(initialWindowSize) || initialWindowSize < 1)) { + throw new InvalidArgumentError("initialWindowSize must be a positive integer, greater than 0"); } - if (options.exportTimeoutMillis !== undefined && - options.exportIntervalMillis !== undefined && - options.exportIntervalMillis < options.exportTimeoutMillis) { - throw Error('exportIntervalMillis must be greater than or equal to exportTimeoutMillis'); + if (connectionWindowSize != null && (!Number.isInteger(connectionWindowSize) || connectionWindowSize < 1)) { + throw new InvalidArgumentError("connectionWindowSize must be a positive integer, greater than 0"); } - this._exportInterval = (_c = options.exportIntervalMillis) !== null && _c !== void 0 ? _c : 60000; - this._exportTimeout = (_d = options.exportTimeoutMillis) !== null && _d !== void 0 ? _d : 30000; - this._exporter = options.exporter; - } - async _runOnce() { - try { - await (0, utils_1.callWithTimeout)(this._doRun(), this._exportTimeout); + if (pingInterval != null && (typeof pingInterval !== "number" || !Number.isInteger(pingInterval) || pingInterval < 0)) { + throw new InvalidArgumentError("pingInterval must be a positive integer, greater or equal to 0"); } - catch (err) { - if (err instanceof utils_1.TimeoutError) { - api.diag.error('Export took longer than %s milliseconds and timed out.', this._exportTimeout); - return; - } - (0, core_1.globalErrorHandler)(err); + super(); + if (typeof connect2 !== "function") { + connect2 = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + useH2c, + socketPath, + timeout: connectTimeout, + ...typeof autoSelectFamily === "boolean" ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, + ...connect2 + }); + } else if (socketPath != null) { + const customConnect = connect2; + connect2 = (opts, callback) => customConnect({ ...opts, socketPath }, callback); + } + this[kUrl] = util.parseOrigin(url3); + this[kConnector] = connect2; + this[kPipelining] = pipelining != null ? pipelining : 1; + this[kMaxHeadersSize] = 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 +`; + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; + this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; + this[kMaxRequests] = maxRequestsPerClient; + this[kClosedResolve] = null; + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; + this[kHTTPContext] = null; + this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100; + this[kHTTP2InitialWindowSize] = initialWindowSize != null ? initialWindowSize : 262144; + this[kHTTP2ConnectionWindowSize] = connectionWindowSize != null ? connectionWindowSize : 524288; + this[kPingInterval] = pingInterval != null ? pingInterval : 6e4; + 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 stats() { + return new ClientStats(this); + } + 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 + ); + } + [kConnect](cb) { + connect(this); + this.once("connect", cb); + } + [kDispatch](opts, handler) { + const request = new Request(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); } - } - async _doRun() { - var _a, _b; - const { resourceMetrics, errors } = await this.collect({ - timeoutMillis: this._exportTimeout, - }); - if (errors.length > 0) { - api.diag.error('PeriodicExportingMetricReader: metrics collection errors', ...errors); + if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { + this[kNeedDrain] = 2; } - const doExport = async () => { - const result = await core_1.internal._export(this._exporter, resourceMetrics); - if (result.code !== core_1.ExportResultCode.SUCCESS) { - throw new Error(`PeriodicExportingMetricReader: metrics export failed (error ${result.error})`); + return this[kNeedDrain] < 2; + } + [kClose]() { + return new Promise((resolve8) => { + if (this[kSize]) { + this[kClosedResolve] = resolve8; + } else { + resolve8(null); + } + }); + } + [kDestroy](err) { + return new Promise((resolve8) => { + const requests = this[kQueue].splice(this[kPendingIdx]); + for (let i2 = 0; i2 < requests.length; i2++) { + const request = requests[i2]; + util.errorRequest(this, request, err); + } + const callback = () => { + if (this[kClosedResolve]) { + this[kClosedResolve](); + this[kClosedResolve] = null; } - }; - // Avoid scheduling a promise to make the behavior more predictable and easier to test - if (resourceMetrics.resource.asyncAttributesPending) { - (_b = (_a = resourceMetrics.resource).waitForAsyncAttributes) === null || _b === void 0 ? void 0 : _b.call(_a).then(doExport, err => api_1.diag.debug('Error while resolving async portion of resource: ', err)); - } - else { - await doExport(); - } - } - onInitialized() { - // start running the interval as soon as this reader is initialized and keep handle for shutdown. - this._interval = setInterval(() => { - // this._runOnce never rejects. Using void operator to suppress @typescript-eslint/no-floating-promises. - void this._runOnce(); - }, this._exportInterval); - (0, core_1.unrefTimer)(this._interval); - } - async onForceFlush() { - await this._runOnce(); - await this._exporter.forceFlush(); - } - async onShutdown() { - if (this._interval) { - clearInterval(this._interval); - } - await this._exporter.shutdown(); - } -} -exports.PeriodicExportingMetricReader = PeriodicExportingMetricReader; -//# sourceMappingURL=PeriodicExportingMetricReader.js.map - -/***/ }), - -/***/ 67349: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TimeoutError = exports.View = exports.Aggregation = exports.SumAggregation = exports.LastValueAggregation = exports.HistogramAggregation = exports.DropAggregation = exports.ExponentialHistogramAggregation = exports.ExplicitBucketHistogramAggregation = exports.DefaultAggregation = exports.MeterProvider = exports.InstrumentType = exports.ConsoleMetricExporter = exports.InMemoryMetricExporter = exports.PeriodicExportingMetricReader = exports.MetricReader = exports.DataPointType = exports.AggregationTemporality = void 0; -var AggregationTemporality_1 = __nccwpck_require__(28589); -Object.defineProperty(exports, "AggregationTemporality", ({ enumerable: true, get: function () { return AggregationTemporality_1.AggregationTemporality; } })); -var MetricData_1 = __nccwpck_require__(51729); -Object.defineProperty(exports, "DataPointType", ({ enumerable: true, get: function () { return MetricData_1.DataPointType; } })); -var MetricReader_1 = __nccwpck_require__(56313); -Object.defineProperty(exports, "MetricReader", ({ enumerable: true, get: function () { return MetricReader_1.MetricReader; } })); -var PeriodicExportingMetricReader_1 = __nccwpck_require__(60542); -Object.defineProperty(exports, "PeriodicExportingMetricReader", ({ enumerable: true, get: function () { return PeriodicExportingMetricReader_1.PeriodicExportingMetricReader; } })); -var InMemoryMetricExporter_1 = __nccwpck_require__(89094); -Object.defineProperty(exports, "InMemoryMetricExporter", ({ enumerable: true, get: function () { return InMemoryMetricExporter_1.InMemoryMetricExporter; } })); -var ConsoleMetricExporter_1 = __nccwpck_require__(38144); -Object.defineProperty(exports, "ConsoleMetricExporter", ({ enumerable: true, get: function () { return ConsoleMetricExporter_1.ConsoleMetricExporter; } })); -var InstrumentDescriptor_1 = __nccwpck_require__(42671); -Object.defineProperty(exports, "InstrumentType", ({ enumerable: true, get: function () { return InstrumentDescriptor_1.InstrumentType; } })); -var MeterProvider_1 = __nccwpck_require__(60310); -Object.defineProperty(exports, "MeterProvider", ({ enumerable: true, get: function () { return MeterProvider_1.MeterProvider; } })); -var Aggregation_1 = __nccwpck_require__(14769); -Object.defineProperty(exports, "DefaultAggregation", ({ enumerable: true, get: function () { return Aggregation_1.DefaultAggregation; } })); -Object.defineProperty(exports, "ExplicitBucketHistogramAggregation", ({ enumerable: true, get: function () { return Aggregation_1.ExplicitBucketHistogramAggregation; } })); -Object.defineProperty(exports, "ExponentialHistogramAggregation", ({ enumerable: true, get: function () { return Aggregation_1.ExponentialHistogramAggregation; } })); -Object.defineProperty(exports, "DropAggregation", ({ enumerable: true, get: function () { return Aggregation_1.DropAggregation; } })); -Object.defineProperty(exports, "HistogramAggregation", ({ enumerable: true, get: function () { return Aggregation_1.HistogramAggregation; } })); -Object.defineProperty(exports, "LastValueAggregation", ({ enumerable: true, get: function () { return Aggregation_1.LastValueAggregation; } })); -Object.defineProperty(exports, "SumAggregation", ({ enumerable: true, get: function () { return Aggregation_1.SumAggregation; } })); -Object.defineProperty(exports, "Aggregation", ({ enumerable: true, get: function () { return Aggregation_1.Aggregation; } })); -var View_1 = __nccwpck_require__(1265); -Object.defineProperty(exports, "View", ({ enumerable: true, get: function () { return View_1.View; } })); -var utils_1 = __nccwpck_require__(89158); -Object.defineProperty(exports, "TimeoutError", ({ enumerable: true, get: function () { return utils_1.TimeoutError; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 12745: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AsyncMetricStorage = void 0; -const MetricStorage_1 = __nccwpck_require__(33134); -const DeltaMetricProcessor_1 = __nccwpck_require__(21904); -const TemporalMetricProcessor_1 = __nccwpck_require__(22566); -const HashMap_1 = __nccwpck_require__(99909); -/** - * Internal interface. - * - * Stores and aggregates {@link MetricData} for asynchronous instruments. - */ -class AsyncMetricStorage extends MetricStorage_1.MetricStorage { - constructor(_instrumentDescriptor, aggregator, _attributesProcessor, collectorHandles) { - super(_instrumentDescriptor); - this._attributesProcessor = _attributesProcessor; - this._deltaMetricStorage = new DeltaMetricProcessor_1.DeltaMetricProcessor(aggregator); - this._temporalMetricStorage = new TemporalMetricProcessor_1.TemporalMetricProcessor(aggregator, collectorHandles); - } - record(measurements, observationTime) { - const processed = new HashMap_1.AttributeHashMap(); - Array.from(measurements.entries()).forEach(([attributes, value]) => { - processed.set(this._attributesProcessor.process(attributes), value); + resolve8(null); + }; + if (this[kHTTPContext]) { + this[kHTTPContext].destroy(err, callback); + this[kHTTPContext] = null; + } else { + queueMicrotask(callback); + } + this[kResume](); + }); + } + }; + function onError(client, err) { + if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { + assert(client[kPendingIdx] === client[kRunningIdx]); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i2 = 0; i2 < requests.length; i2++) { + const request = requests[i2]; + util.errorRequest(client, request, err); + } + assert(client[kSize] === 0); + } + } + function connect(client) { + assert(!client[kConnecting]); + assert(!client[kHTTPContext]); + let { host, hostname, protocol, port } = client[kUrl]; + if (hostname[0] === "[") { + const idx = hostname.indexOf("]"); + assert(idx !== -1); + const ip = hostname.substring(1, idx); + assert(net.isIPv6(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 { + client[kConnector]({ + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, (err, socket) => { + if (err) { + handleConnectError(client, err, { host, hostname, protocol, port }); + client[kResume](); + return; + } + if (client.destroyed) { + util.destroy(socket.on("error", noop), new ClientDestroyedError()); + client[kResume](); + return; + } + assert(socket); + try { + client[kHTTPContext] = socket.alpnProtocol === "h2" ? connectH2(client, socket) : connectH1(client, socket); + } catch (err2) { + socket.destroy().on("error", noop); + handleConnectError(client, err2, { host, hostname, protocol, port }); + client[kResume](); + return; + } + 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]); + client[kResume](); }); - this._deltaMetricStorage.batchCumulate(processed, observationTime); - } - /** - * Collects the metrics from this storage. The ObservableCallback is invoked - * during the collection. - * - * Note: This is a stateful operation and may reset any interval-related - * state for the MetricCollector. - */ - collect(collector, collectionTime) { - const accumulations = this._deltaMetricStorage.collect(); - return this._temporalMetricStorage.buildMetrics(collector, this._instrumentDescriptor, accumulations, collectionTime); + } catch (err) { + handleConnectError(client, err, { host, hostname, protocol, port }); + client[kResume](); + } } -} -exports.AsyncMetricStorage = AsyncMetricStorage; -//# sourceMappingURL=AsyncMetricStorage.js.map - -/***/ }), - -/***/ 21904: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DeltaMetricProcessor = void 0; -const HashMap_1 = __nccwpck_require__(99909); -/** - * Internal interface. - * - * Allows synchronous collection of metrics. This processor should allow - * allocation of new aggregation cells for metrics and convert cumulative - * recording to delta data points. - */ -class DeltaMetricProcessor { - constructor(_aggregator) { - this._aggregator = _aggregator; - this._activeCollectionStorage = new HashMap_1.AttributeHashMap(); - // TODO: find a reasonable mean to clean the memo; - // https://github.com/open-telemetry/opentelemetry-specification/pull/2208 - this._cumulativeMemoStorage = new HashMap_1.AttributeHashMap(); - } - record(value, attributes, _context, collectionTime) { - const accumulation = this._activeCollectionStorage.getOrDefault(attributes, () => this._aggregator.createAccumulation(collectionTime)); - accumulation === null || accumulation === void 0 ? void 0 : accumulation.record(value); - } - batchCumulate(measurements, collectionTime) { - Array.from(measurements.entries()).forEach(([attributes, value, hashCode]) => { - const accumulation = this._aggregator.createAccumulation(collectionTime); - accumulation === null || accumulation === void 0 ? void 0 : accumulation.record(value); - let delta = accumulation; - // Diff with recorded cumulative memo. - if (this._cumulativeMemoStorage.has(attributes, hashCode)) { - // has() returned true, previous is present. - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const previous = this._cumulativeMemoStorage.get(attributes, hashCode); - delta = this._aggregator.diff(previous, accumulation); - } - // Merge with uncollected active delta. - if (this._activeCollectionStorage.has(attributes, hashCode)) { - // has() returned true, previous is present. - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const active = this._activeCollectionStorage.get(attributes, hashCode); - delta = this._aggregator.merge(active, delta); - } - // Save the current record and the delta record. - this._cumulativeMemoStorage.set(attributes, accumulation, hashCode); - this._activeCollectionStorage.set(attributes, delta, hashCode); + function handleConnectError(client, err, { host, hostname, protocol, port }) { + 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); } - /** - * Returns a collection of delta metrics. Start time is the when first - * time event collected. - */ - collect() { - const unreportedDelta = this._activeCollectionStorage; - this._activeCollectionStorage = new HashMap_1.AttributeHashMap(); - return unreportedDelta; + function emitDrain(client) { + client[kNeedDrain] = 0; + client.emit("drain", client[kUrl], [client]); } -} -exports.DeltaMetricProcessor = DeltaMetricProcessor; -//# sourceMappingURL=DeltaMetricProcessor.js.map - -/***/ }), - -/***/ 99909: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AttributeHashMap = exports.HashMap = void 0; -const utils_1 = __nccwpck_require__(89158); -class HashMap { - constructor(_hash) { - this._hash = _hash; - this._valueMap = new Map(); - this._keyMap = new Map(); - } - get(key, hashCode) { - hashCode !== null && hashCode !== void 0 ? hashCode : (hashCode = this._hash(key)); - return this._valueMap.get(hashCode); - } - getOrDefault(key, defaultFactory) { - const hash = this._hash(key); - if (this._valueMap.has(hash)) { - return this._valueMap.get(hash); - } - const val = defaultFactory(); - if (!this._keyMap.has(hash)) { - this._keyMap.set(hash, key); - } - this._valueMap.set(hash, val); - return val; + 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; + } } - set(key, value, hashCode) { - hashCode !== null && hashCode !== void 0 ? hashCode : (hashCode = this._hash(key)); - if (!this._keyMap.has(hashCode)) { - this._keyMap.set(hashCode, key); + function _resume(client, sync) { + while (true) { + if (client.destroyed) { + assert(client[kPending] === 0); + return; } - this._valueMap.set(hashCode, value); - } - has(key, hashCode) { - hashCode !== null && hashCode !== void 0 ? hashCode : (hashCode = this._hash(key)); - return this._valueMap.has(hashCode); - } - *keys() { - const keyIterator = this._keyMap.entries(); - let next = keyIterator.next(); - while (next.done !== true) { - yield [next.value[1], next.value[0]]; - next = keyIterator.next(); + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve](); + client[kClosedResolve] = null; + return; } - } - *entries() { - const valueIterator = this._valueMap.entries(); - let next = valueIterator.next(); - while (next.done !== true) { - // next.value[0] here can not be undefined - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - yield [this._keyMap.get(next.value[0]), next.value[1], next.value[0]]; - next = valueIterator.next(); + if (client[kHTTPContext]) { + client[kHTTPContext].resume(); } - } - get size() { - return this._valueMap.size; - } -} -exports.HashMap = HashMap; -class AttributeHashMap extends HashMap { - constructor() { - super(utils_1.hashAttributes); - } -} -exports.AttributeHashMap = AttributeHashMap; -//# sourceMappingURL=HashMap.js.map - -/***/ }), - -/***/ 30898: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MeterProviderSharedState = void 0; -const utils_1 = __nccwpck_require__(89158); -const ViewRegistry_1 = __nccwpck_require__(6379); -const MeterSharedState_1 = __nccwpck_require__(14881); -/** - * An internal record for shared meter provider states. - */ -class MeterProviderSharedState { - constructor(resource) { - this.resource = resource; - this.viewRegistry = new ViewRegistry_1.ViewRegistry(); - this.metricCollectors = []; - this.meterSharedStates = new Map(); - } - getMeterSharedState(instrumentationScope) { - const id = (0, utils_1.instrumentationScopeId)(instrumentationScope); - let meterSharedState = this.meterSharedStates.get(id); - if (meterSharedState == null) { - meterSharedState = new MeterSharedState_1.MeterSharedState(this, instrumentationScope); - this.meterSharedStates.set(id, meterSharedState); - } - return meterSharedState; - } - selectAggregations(instrumentType) { - const result = []; - for (const collector of this.metricCollectors) { - result.push([collector, collector.selectAggregation(instrumentType)]); + if (client[kBusy]) { + client[kNeedDrain] = 2; + } else if (client[kNeedDrain] === 2) { + if (sync) { + client[kNeedDrain] = 1; + queueMicrotask(() => emitDrain(client)); + } else { + emitDrain(client); + } + continue; } - return result; - } -} -exports.MeterProviderSharedState = MeterProviderSharedState; -//# sourceMappingURL=MeterProviderSharedState.js.map - -/***/ }), - -/***/ 14881: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MeterSharedState = void 0; -const InstrumentDescriptor_1 = __nccwpck_require__(42671); -const Meter_1 = __nccwpck_require__(45894); -const utils_1 = __nccwpck_require__(89158); -const AsyncMetricStorage_1 = __nccwpck_require__(12745); -const MetricStorageRegistry_1 = __nccwpck_require__(72749); -const MultiWritableMetricStorage_1 = __nccwpck_require__(73250); -const ObservableRegistry_1 = __nccwpck_require__(99043); -const SyncMetricStorage_1 = __nccwpck_require__(72766); -const AttributesProcessor_1 = __nccwpck_require__(31952); -/** - * An internal record for shared meter provider states. - */ -class MeterSharedState { - constructor(_meterProviderSharedState, _instrumentationScope) { - this._meterProviderSharedState = _meterProviderSharedState; - this._instrumentationScope = _instrumentationScope; - this.metricStorageRegistry = new MetricStorageRegistry_1.MetricStorageRegistry(); - this.observableRegistry = new ObservableRegistry_1.ObservableRegistry(); - this.meter = new Meter_1.Meter(this); - } - registerMetricStorage(descriptor) { - const storages = this._registerMetricStorage(descriptor, SyncMetricStorage_1.SyncMetricStorage); - if (storages.length === 1) { - return storages[0]; - } - return new MultiWritableMetricStorage_1.MultiMetricStorage(storages); - } - registerAsyncMetricStorage(descriptor) { - const storages = this._registerMetricStorage(descriptor, AsyncMetricStorage_1.AsyncMetricStorage); - return storages; - } - /** - * @param collector opaque handle of {@link MetricCollector} which initiated the collection. - * @param collectionTime the HrTime at which the collection was initiated. - * @param options options for collection. - * @returns the list of metric data collected. - */ - async collect(collector, collectionTime, options) { - /** - * 1. Call all observable callbacks first. - * 2. Collect metric result for the collector. - */ - const errors = await this.observableRegistry.observe(collectionTime, options === null || options === void 0 ? void 0 : options.timeoutMillis); - const storages = this.metricStorageRegistry.getStorages(collector); - // prevent more allocations if there are no storages. - if (storages.length === 0) { - return null; - } - const metricDataList = storages - .map(metricStorage => { - return metricStorage.collect(collector, collectionTime); - }) - .filter(utils_1.isNotNullish); - // skip this scope if no data was collected (storage created, but no data observed) - if (metricDataList.length === 0) { - return { errors }; + if (client[kPending] === 0) { + return; } - return { - scopeMetrics: { - scope: this._instrumentationScope, - metrics: metricDataList, - }, - errors, - }; - } - _registerMetricStorage(descriptor, MetricStorageType) { - const views = this._meterProviderSharedState.viewRegistry.findViews(descriptor, this._instrumentationScope); - let storages = views.map(view => { - const viewDescriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptorWithView)(view, descriptor); - const compatibleStorage = this.metricStorageRegistry.findOrUpdateCompatibleStorage(viewDescriptor); - if (compatibleStorage != null) { - return compatibleStorage; - } - const aggregator = view.aggregation.createAggregator(viewDescriptor); - const viewStorage = new MetricStorageType(viewDescriptor, aggregator, view.attributesProcessor, this._meterProviderSharedState.metricCollectors); - this.metricStorageRegistry.register(viewStorage); - return viewStorage; - }); - // Fallback to the per-collector aggregations if no view is configured for the instrument. - if (storages.length === 0) { - const perCollectorAggregations = this._meterProviderSharedState.selectAggregations(descriptor.type); - const collectorStorages = perCollectorAggregations.map(([collector, aggregation]) => { - const compatibleStorage = this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(collector, descriptor); - if (compatibleStorage != null) { - return compatibleStorage; - } - const aggregator = aggregation.createAggregator(descriptor); - const storage = new MetricStorageType(descriptor, aggregator, AttributesProcessor_1.AttributesProcessor.Noop(), [collector]); - this.metricStorageRegistry.registerForCollector(collector, storage); - return storage; - }); - storages = storages.concat(collectorStorages); + if (client[kRunning] >= (getPipelining(client) || 1)) { + return; } - return storages; - } -} -exports.MeterSharedState = MeterSharedState; -//# sourceMappingURL=MeterSharedState.js.map - -/***/ }), - -/***/ 20142: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MetricCollector = void 0; -const core_1 = __nccwpck_require__(89736); -/** - * An internal opaque interface that the MetricReader receives as - * MetricProducer. It acts as the storage key to the internal metric stream - * state for each MetricReader. - */ -class MetricCollector { - constructor(_sharedState, _metricReader) { - this._sharedState = _sharedState; - this._metricReader = _metricReader; - } - async collect(options) { - const collectionTime = (0, core_1.millisToHrTime)(Date.now()); - const scopeMetrics = []; - const errors = []; - const meterCollectionPromises = Array.from(this._sharedState.meterSharedStates.values()).map(async (meterSharedState) => { - const current = await meterSharedState.collect(this, collectionTime, options); - // only add scope metrics if available - if ((current === null || current === void 0 ? void 0 : current.scopeMetrics) != null) { - scopeMetrics.push(current.scopeMetrics); - } - // only add errors if available - if ((current === null || current === void 0 ? void 0 : current.errors) != null) { - errors.push(...current.errors); - } - }); - await Promise.all(meterCollectionPromises); - return { - resourceMetrics: { - resource: this._sharedState.resource, - scopeMetrics: scopeMetrics, - }, - errors: errors, - }; - } - /** - * Delegates for MetricReader.forceFlush. - */ - async forceFlush(options) { - await this._metricReader.forceFlush(options); - } - /** - * Delegates for MetricReader.shutdown. - */ - async shutdown(options) { - await this._metricReader.shutdown(options); - } - selectAggregationTemporality(instrumentType) { - return this._metricReader.selectAggregationTemporality(instrumentType); - } - selectAggregation(instrumentType) { - return this._metricReader.selectAggregation(instrumentType); - } -} -exports.MetricCollector = MetricCollector; -//# sourceMappingURL=MetricCollector.js.map - -/***/ }), - -/***/ 33134: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MetricStorage = void 0; -const InstrumentDescriptor_1 = __nccwpck_require__(42671); -/** - * Internal interface. - * - * Represents a storage from which we can collect metrics. - */ -class MetricStorage { - constructor(_instrumentDescriptor) { - this._instrumentDescriptor = _instrumentDescriptor; - } - getInstrumentDescriptor() { - return this._instrumentDescriptor; - } - updateDescription(description) { - this._instrumentDescriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(this._instrumentDescriptor.name, this._instrumentDescriptor.type, { - description: description, - valueType: this._instrumentDescriptor.valueType, - unit: this._instrumentDescriptor.unit, - advice: this._instrumentDescriptor.advice, - }); - } -} -exports.MetricStorage = MetricStorage; -//# sourceMappingURL=MetricStorage.js.map - -/***/ }), - -/***/ 72749: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MetricStorageRegistry = void 0; -const InstrumentDescriptor_1 = __nccwpck_require__(42671); -const api = __nccwpck_require__(65163); -const RegistrationConflicts_1 = __nccwpck_require__(76212); -/** - * Internal class for storing {@link MetricStorage} - */ -class MetricStorageRegistry { - constructor() { - this._sharedRegistry = new Map(); - this._perCollectorRegistry = new Map(); - } - static create() { - return new MetricStorageRegistry(); - } - getStorages(collector) { - let storages = []; - for (const metricStorages of this._sharedRegistry.values()) { - storages = storages.concat(metricStorages); - } - const perCollectorStorages = this._perCollectorRegistry.get(collector); - if (perCollectorStorages != null) { - for (const metricStorages of perCollectorStorages.values()) { - storages = storages.concat(metricStorages); - } - } - return storages; - } - register(storage) { - this._registerStorage(storage, this._sharedRegistry); - } - registerForCollector(collector, storage) { - let storageMap = this._perCollectorRegistry.get(collector); - if (storageMap == null) { - storageMap = new Map(); - this._perCollectorRegistry.set(collector, storageMap); - } - this._registerStorage(storage, storageMap); - } - findOrUpdateCompatibleStorage(expectedDescriptor) { - const storages = this._sharedRegistry.get(expectedDescriptor.name); - if (storages === undefined) { - return null; - } - // If the descriptor is compatible, the type of their metric storage - // (either SyncMetricStorage or AsyncMetricStorage) must be compatible. - return this._findOrUpdateCompatibleStorage(expectedDescriptor, storages); - } - findOrUpdateCompatibleCollectorStorage(collector, expectedDescriptor) { - const storageMap = this._perCollectorRegistry.get(collector); - if (storageMap === undefined) { - return null; - } - const storages = storageMap.get(expectedDescriptor.name); - if (storages === undefined) { - return null; - } - // If the descriptor is compatible, the type of their metric storage - // (either SyncMetricStorage or AsyncMetricStorage) must be compatible. - return this._findOrUpdateCompatibleStorage(expectedDescriptor, storages); - } - _registerStorage(storage, storageMap) { - const descriptor = storage.getInstrumentDescriptor(); - const storages = storageMap.get(descriptor.name); - if (storages === undefined) { - storageMap.set(descriptor.name, [storage]); + const request = client[kQueue][client[kPendingIdx]]; + if (request === null) { + return; + } + 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); + }); } - storages.push(storage); - } - _findOrUpdateCompatibleStorage(expectedDescriptor, existingStorages) { - let compatibleStorage = null; - for (const existingStorage of existingStorages) { - const existingDescriptor = existingStorage.getInstrumentDescriptor(); - if ((0, InstrumentDescriptor_1.isDescriptorCompatibleWith)(existingDescriptor, expectedDescriptor)) { - // Use the longer description if it does not match. - if (existingDescriptor.description !== expectedDescriptor.description) { - if (expectedDescriptor.description.length > - existingDescriptor.description.length) { - existingStorage.updateDescription(expectedDescriptor.description); - } - api.diag.warn('A view or instrument with the name ', expectedDescriptor.name, ' has already been registered, but has a different description and is incompatible with another registered view.\n', 'Details:\n', (0, RegistrationConflicts_1.getIncompatibilityDetails)(existingDescriptor, expectedDescriptor), 'The longer description will be used.\nTo resolve the conflict:', (0, RegistrationConflicts_1.getConflictResolutionRecipe)(existingDescriptor, expectedDescriptor)); - } - // Storage is fully compatible. There will never be more than one pre-existing fully compatible storage. - compatibleStorage = existingStorage; - } - else { - // The implementation SHOULD warn about duplicate instrument registration - // conflicts after applying View configuration. - api.diag.warn('A view or instrument with the name ', expectedDescriptor.name, ' has already been registered and is incompatible with another registered view.\n', 'Details:\n', (0, RegistrationConflicts_1.getIncompatibilityDetails)(existingDescriptor, expectedDescriptor), 'To resolve the conflict:\n', (0, RegistrationConflicts_1.getConflictResolutionRecipe)(existingDescriptor, expectedDescriptor)); - } + if (client[kConnecting]) { + return; } - return compatibleStorage; - } -} -exports.MetricStorageRegistry = MetricStorageRegistry; -//# sourceMappingURL=MetricStorageRegistry.js.map - -/***/ }), - -/***/ 73250: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MultiMetricStorage = void 0; -/** - * Internal interface. - */ -class MultiMetricStorage { - constructor(_backingStorages) { - this._backingStorages = _backingStorages; - } - record(value, attributes, context, recordTime) { - this._backingStorages.forEach(it => { - it.record(value, attributes, context, recordTime); - }); - } -} -exports.MultiMetricStorage = MultiMetricStorage; -//# sourceMappingURL=MultiWritableMetricStorage.js.map - -/***/ }), - -/***/ 99043: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ObservableRegistry = void 0; -const api_1 = __nccwpck_require__(65163); -const Instruments_1 = __nccwpck_require__(20667); -const ObservableResult_1 = __nccwpck_require__(80183); -const utils_1 = __nccwpck_require__(89158); -/** - * An internal interface for managing ObservableCallbacks. - * - * Every registered callback associated with a set of instruments are be evaluated - * exactly once during collection prior to reading data for that instrument. - */ -class ObservableRegistry { - constructor() { - this._callbacks = []; - this._batchCallbacks = []; - } - addCallback(callback, instrument) { - const idx = this._findCallback(callback, instrument); - if (idx >= 0) { - return; + if (!client[kHTTPContext]) { + connect(client); + return; } - this._callbacks.push({ callback, instrument }); - } - removeCallback(callback, instrument) { - const idx = this._findCallback(callback, instrument); - if (idx < 0) { - return; + if (client[kHTTPContext].destroyed) { + return; } - this._callbacks.splice(idx, 1); - } - addBatchCallback(callback, instruments) { - // Create a set of unique instruments. - const observableInstruments = new Set(instruments.filter(Instruments_1.isObservableInstrument)); - if (observableInstruments.size === 0) { - api_1.diag.error('BatchObservableCallback is not associated with valid instruments', instruments); - return; + if (client[kHTTPContext].busy(request)) { + return; } - const idx = this._findBatchCallback(callback, observableInstruments); - if (idx >= 0) { - return; + if (!request.aborted && client[kHTTPContext].write(request)) { + client[kPendingIdx]++; + } else { + client[kQueue].splice(client[kPendingIdx], 1); } - this._batchCallbacks.push({ callback, instruments: observableInstruments }); + } } - removeBatchCallback(callback, instruments) { - // Create a set of unique instruments. - const observableInstruments = new Set(instruments.filter(Instruments_1.isObservableInstrument)); - const idx = this._findBatchCallback(callback, observableInstruments); - if (idx < 0) { - return; + module3.exports = Client; + } +}); + +// node_modules/undici/lib/dispatcher/fixed-queue.js +var require_fixed_queue = __commonJS({ + "node_modules/undici/lib/dispatcher/fixed-queue.js"(exports, module3) { + "use strict"; + var kSize = 2048; + var kMask = kSize - 1; + var FixedCircularBuffer = class { + /** @type {number} */ + bottom = 0; + /** @type {number} */ + top = 0; + /** @type {Array} */ + list = new Array(kSize).fill(void 0); + /** @type {T|null} */ + next = null; + /** @returns {boolean} */ + isEmpty() { + return this.top === this.bottom; + } + /** @returns {boolean} */ + isFull() { + return (this.top + 1 & kMask) === this.bottom; + } + /** + * @param {T} data + * @returns {void} + */ + push(data) { + this.list[this.top] = data; + this.top = this.top + 1 & kMask; + } + /** @returns {T|null} */ + shift() { + const nextItem = this.list[this.bottom]; + if (nextItem === void 0) { + return null; } - this._batchCallbacks.splice(idx, 1); - } - /** - * @returns a promise of rejected reasons for invoking callbacks. - */ - async observe(collectionTime, timeoutMillis) { - const callbackFutures = this._observeCallbacks(collectionTime, timeoutMillis); - const batchCallbackFutures = this._observeBatchCallbacks(collectionTime, timeoutMillis); - const results = await (0, utils_1.PromiseAllSettled)([ - ...callbackFutures, - ...batchCallbackFutures, - ]); - const rejections = results - .filter(utils_1.isPromiseAllSettledRejectionResult) - .map(it => it.reason); - return rejections; - } - _observeCallbacks(observationTime, timeoutMillis) { - return this._callbacks.map(async ({ callback, instrument }) => { - const observableResult = new ObservableResult_1.ObservableResultImpl(instrument._descriptor.name, instrument._descriptor.valueType); - let callPromise = Promise.resolve(callback(observableResult)); - if (timeoutMillis != null) { - callPromise = (0, utils_1.callWithTimeout)(callPromise, timeoutMillis); - } - await callPromise; - instrument._metricStorages.forEach(metricStorage => { - metricStorage.record(observableResult._buffer, observationTime); - }); - }); - } - _observeBatchCallbacks(observationTime, timeoutMillis) { - return this._batchCallbacks.map(async ({ callback, instruments }) => { - const observableResult = new ObservableResult_1.BatchObservableResultImpl(); - let callPromise = Promise.resolve(callback(observableResult)); - if (timeoutMillis != null) { - callPromise = (0, utils_1.callWithTimeout)(callPromise, timeoutMillis); - } - await callPromise; - instruments.forEach(instrument => { - const buffer = observableResult._buffer.get(instrument); - if (buffer == null) { - return; - } - instrument._metricStorages.forEach(metricStorage => { - metricStorage.record(buffer, observationTime); - }); - }); - }); - } - _findCallback(callback, instrument) { - return this._callbacks.findIndex(record => { - return record.callback === callback && record.instrument === instrument; - }); - } - _findBatchCallback(callback, instruments) { - return this._batchCallbacks.findIndex(record => { - return (record.callback === callback && - (0, utils_1.setEquals)(record.instruments, instruments)); - }); - } -} -exports.ObservableRegistry = ObservableRegistry; -//# sourceMappingURL=ObservableRegistry.js.map - -/***/ }), - -/***/ 72766: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SyncMetricStorage = void 0; -const MetricStorage_1 = __nccwpck_require__(33134); -const DeltaMetricProcessor_1 = __nccwpck_require__(21904); -const TemporalMetricProcessor_1 = __nccwpck_require__(22566); -/** - * Internal interface. - * - * Stores and aggregates {@link MetricData} for synchronous instruments. - */ -class SyncMetricStorage extends MetricStorage_1.MetricStorage { - constructor(instrumentDescriptor, aggregator, _attributesProcessor, collectorHandles) { - super(instrumentDescriptor); - this._attributesProcessor = _attributesProcessor; - this._deltaMetricStorage = new DeltaMetricProcessor_1.DeltaMetricProcessor(aggregator); - this._temporalMetricStorage = new TemporalMetricProcessor_1.TemporalMetricProcessor(aggregator, collectorHandles); - } - record(value, attributes, context, recordTime) { - attributes = this._attributesProcessor.process(attributes, context); - this._deltaMetricStorage.record(value, attributes, context, recordTime); - } - /** - * Collects the metrics from this storage. - * - * Note: This is a stateful operation and may reset any interval-related - * state for the MetricCollector. - */ - collect(collector, collectionTime) { - const accumulations = this._deltaMetricStorage.collect(); - return this._temporalMetricStorage.buildMetrics(collector, this._instrumentDescriptor, accumulations, collectionTime); - } -} -exports.SyncMetricStorage = SyncMetricStorage; -//# sourceMappingURL=SyncMetricStorage.js.map - -/***/ }), - -/***/ 22566: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TemporalMetricProcessor = void 0; -const AggregationTemporality_1 = __nccwpck_require__(28589); -const HashMap_1 = __nccwpck_require__(99909); -/** - * Internal interface. - * - * Provides unique reporting for each collector. Allows synchronous collection - * of metrics and reports given temporality values. - */ -class TemporalMetricProcessor { - constructor(_aggregator, collectorHandles) { - this._aggregator = _aggregator; - this._unreportedAccumulations = new Map(); - this._reportHistory = new Map(); - collectorHandles.forEach(handle => { - this._unreportedAccumulations.set(handle, []); - }); - } - /** - * Builds the {@link MetricData} streams to report against a specific MetricCollector. - * @param collector The information of the MetricCollector. - * @param collectors The registered collectors. - * @param instrumentDescriptor The instrumentation descriptor that these metrics generated with. - * @param currentAccumulations The current accumulation of metric data from instruments. - * @param collectionTime The current collection timestamp. - * @returns The {@link MetricData} points or `null`. - */ - buildMetrics(collector, instrumentDescriptor, currentAccumulations, collectionTime) { - this._stashAccumulations(currentAccumulations); - const unreportedAccumulations = this._getMergedUnreportedAccumulations(collector); - let result = unreportedAccumulations; - let aggregationTemporality; - // Check our last report time. - if (this._reportHistory.has(collector)) { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const last = this._reportHistory.get(collector); - const lastCollectionTime = last.collectionTime; - aggregationTemporality = last.aggregationTemporality; - // Use aggregation temporality + instrument to determine if we do a merge or a diff of - // previous. We have the following four scenarios: - // 1. Cumulative Aggregation (temporality) + Delta recording (sync instrument). - // Here we merge with our last record to get a cumulative aggregation. - // 2. Cumulative Aggregation + Cumulative recording (async instrument). - // Cumulative records are converted to delta recording with DeltaMetricProcessor. - // Here we merge with our last record to get a cumulative aggregation. - // 3. Delta Aggregation + Delta recording - // Calibrate the startTime of metric streams to be the reader's lastCollectionTime. - // 4. Delta Aggregation + Cumulative recording. - // Cumulative records are converted to delta recording with DeltaMetricProcessor. - // Calibrate the startTime of metric streams to be the reader's lastCollectionTime. - if (aggregationTemporality === AggregationTemporality_1.AggregationTemporality.CUMULATIVE) { - // We need to make sure the current delta recording gets merged into the previous cumulative - // for the next cumulative recording. - result = TemporalMetricProcessor.merge(last.accumulations, unreportedAccumulations, this._aggregator); - } - else { - result = TemporalMetricProcessor.calibrateStartTime(last.accumulations, unreportedAccumulations, lastCollectionTime); - } + this.list[this.bottom] = void 0; + this.bottom = this.bottom + 1 & kMask; + return nextItem; + } + }; + module3.exports = class FixedQueue { + constructor() { + this.head = this.tail = new FixedCircularBuffer(); + } + /** @returns {boolean} */ + isEmpty() { + return this.head.isEmpty(); + } + /** @param {T} data */ + push(data) { + if (this.head.isFull()) { + this.head = this.head.next = new FixedCircularBuffer(); } - else { - // Call into user code to select aggregation temporality for the instrument. - aggregationTemporality = collector.selectAggregationTemporality(instrumentDescriptor.type); - } - // Update last reported (cumulative) accumulation. - this._reportHistory.set(collector, { - accumulations: result, - collectionTime, - aggregationTemporality, - }); - const accumulationRecords = AttributesMapToAccumulationRecords(result); - // do not convert to metric data if there is nothing to convert. - if (accumulationRecords.length === 0) { - return undefined; - } - return this._aggregator.toMetricData(instrumentDescriptor, aggregationTemporality, accumulationRecords, - /* endTime */ collectionTime); - } - _stashAccumulations(currentAccumulation) { - const registeredCollectors = this._unreportedAccumulations.keys(); - for (const collector of registeredCollectors) { - let stash = this._unreportedAccumulations.get(collector); - if (stash === undefined) { - stash = []; - this._unreportedAccumulations.set(collector, stash); - } - stash.push(currentAccumulation); - } - } - _getMergedUnreportedAccumulations(collector) { - let result = new HashMap_1.AttributeHashMap(); - const unreportedList = this._unreportedAccumulations.get(collector); - this._unreportedAccumulations.set(collector, []); - if (unreportedList === undefined) { - return result; + this.head.push(data); + } + /** @returns {T|null} */ + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) { + this.tail = tail.next; + tail.next = null; + } + return next; + } + }; + } +}); + +// node_modules/undici/lib/dispatcher/pool-base.js +var require_pool_base = __commonJS({ + "node_modules/undici/lib/dispatcher/pool-base.js"(exports, module3) { + "use strict"; + var { PoolStats } = require_stats(); + var DispatcherBase = require_dispatcher_base(); + var FixedQueue = require_fixed_queue(); + var { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols(); + var kClients = /* @__PURE__ */ Symbol("clients"); + var kNeedDrain = /* @__PURE__ */ Symbol("needDrain"); + var kQueue = /* @__PURE__ */ Symbol("queue"); + var kClosedResolve = /* @__PURE__ */ Symbol("closed resolve"); + var kOnDrain = /* @__PURE__ */ Symbol("onDrain"); + var kOnConnect = /* @__PURE__ */ Symbol("onConnect"); + var kOnDisconnect = /* @__PURE__ */ Symbol("onDisconnect"); + var kOnConnectionError = /* @__PURE__ */ Symbol("onConnectionError"); + var kGetDispatcher = /* @__PURE__ */ Symbol("get dispatcher"); + var kAddClient = /* @__PURE__ */ Symbol("add client"); + var kRemoveClient = /* @__PURE__ */ Symbol("remove client"); + var PoolBase = class extends DispatcherBase { + [kQueue] = new FixedQueue(); + [kQueued] = 0; + [kClients] = []; + [kNeedDrain] = false; + [kOnDrain](client, origin, targets) { + const queue = this[kQueue]; + let needDrain = false; + while (!needDrain) { + const item = queue.shift(); + if (!item) { + break; + } + this[kQueued]--; + needDrain = !client.dispatch(item.opts, item.handler); } - for (const it of unreportedList) { - result = TemporalMetricProcessor.merge(result, it, this._aggregator); + client[kNeedDrain] = needDrain; + if (!needDrain && this[kNeedDrain]) { + this[kNeedDrain] = false; + this.emit("drain", origin, [this, ...targets]); } - return result; - } - static merge(last, current, aggregator) { - const result = last; - const iterator = current.entries(); - let next = iterator.next(); - while (next.done !== true) { - const [key, record, hash] = next.value; - if (last.has(key, hash)) { - const lastAccumulation = last.get(key, hash); - // last.has() returned true, lastAccumulation is present. - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const accumulation = aggregator.merge(lastAccumulation, record); - result.set(key, accumulation, hash); + if (this[kClosedResolve] && queue.isEmpty()) { + const closeAll = []; + for (let i2 = 0; i2 < this[kClients].length; i2++) { + const client2 = this[kClients][i2]; + if (!client2.destroyed) { + closeAll.push(client2.close()); } - else { - result.set(key, record, hash); - } - next = iterator.next(); - } - return result; - } - /** - * Calibrate the reported metric streams' startTime to lastCollectionTime. Leaves - * the new stream to be the initial observation time unchanged. - */ - static calibrateStartTime(last, current, lastCollectionTime) { - for (const [key, hash] of last.keys()) { - const currentAccumulation = current.get(key, hash); - currentAccumulation === null || currentAccumulation === void 0 ? void 0 : currentAccumulation.setStartTime(lastCollectionTime); + } + return Promise.all(closeAll).then(this[kClosedResolve]); } - return current; - } -} -exports.TemporalMetricProcessor = TemporalMetricProcessor; -// TypeScript complains about converting 3 elements tuple to AccumulationRecord. -function AttributesMapToAccumulationRecords(map) { - return Array.from(map.entries()); -} -//# sourceMappingURL=TemporalMetricProcessor.js.map - -/***/ }), - -/***/ 89158: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.equalsCaseInsensitive = exports.binarySearchUB = exports.setEquals = exports.FlatMap = exports.isPromiseAllSettledRejectionResult = exports.PromiseAllSettled = exports.callWithTimeout = exports.TimeoutError = exports.instrumentationScopeId = exports.hashAttributes = exports.isNotNullish = void 0; -function isNotNullish(item) { - return item !== undefined && item !== null; -} -exports.isNotNullish = isNotNullish; -/** - * Converting the unordered attributes into unique identifier string. - * @param attributes user provided unordered MetricAttributes. - */ -function hashAttributes(attributes) { - let keys = Object.keys(attributes); - if (keys.length === 0) - return ''; - // Return a string that is stable on key orders. - keys = keys.sort(); - return JSON.stringify(keys.map(key => [key, attributes[key]])); -} -exports.hashAttributes = hashAttributes; -/** - * Converting the instrumentation scope object to a unique identifier string. - * @param instrumentationScope - */ -function instrumentationScopeId(instrumentationScope) { - var _a, _b; - return `${instrumentationScope.name}:${(_a = instrumentationScope.version) !== null && _a !== void 0 ? _a : ''}:${(_b = instrumentationScope.schemaUrl) !== null && _b !== void 0 ? _b : ''}`; -} -exports.instrumentationScopeId = instrumentationScopeId; -/** - * Error that is thrown on timeouts. - */ -class TimeoutError extends Error { - constructor(message) { - super(message); - // manually adjust prototype to retain `instanceof` functionality when targeting ES5, see: - // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work - Object.setPrototypeOf(this, TimeoutError.prototype); - } -} -exports.TimeoutError = TimeoutError; -/** - * Adds a timeout to a promise and rejects if the specified timeout has elapsed. Also rejects if the specified promise - * rejects, and resolves if the specified promise resolves. - * - *

NOTE: this operation will continue even after it throws a {@link TimeoutError}. - * - * @param promise promise to use with timeout. - * @param timeout the timeout in milliseconds until the returned promise is rejected. - */ -function callWithTimeout(promise, timeout) { - let timeoutHandle; - const timeoutPromise = new Promise(function timeoutFunction(_resolve, reject) { - timeoutHandle = setTimeout(function timeoutHandler() { - reject(new TimeoutError('Operation timed out.')); - }, timeout); - }); - return Promise.race([promise, timeoutPromise]).then(result => { - clearTimeout(timeoutHandle); - return result; - }, reason => { - clearTimeout(timeoutHandle); - throw reason; - }); -} -exports.callWithTimeout = callWithTimeout; -/** - * Node.js v12.9 lower and browser compatible `Promise.allSettled`. - */ -async function PromiseAllSettled(promises) { - return Promise.all(promises.map(async (p) => { - try { - const ret = await p; - return { - status: 'fulfilled', - value: ret, - }; + } + [kOnConnect] = (origin, targets) => { + this.emit("connect", origin, [this, ...targets]); + }; + [kOnDisconnect] = (origin, targets, err) => { + this.emit("disconnect", origin, [this, ...targets], err); + }; + [kOnConnectionError] = (origin, targets, err) => { + this.emit("connectionError", origin, [this, ...targets], err); + }; + get [kBusy]() { + return this[kNeedDrain]; + } + get [kConnected]() { + let ret = 0; + for (const { [kConnected]: connected } of this[kClients]) { + ret += connected; } - catch (e) { - return { - status: 'rejected', - reason: e, - }; + return ret; + } + get [kFree]() { + let ret = 0; + for (const { [kConnected]: connected, [kNeedDrain]: needDrain } of this[kClients]) { + ret += connected && !needDrain; } - })); -} -exports.PromiseAllSettled = PromiseAllSettled; -function isPromiseAllSettledRejectionResult(it) { - return it.status === 'rejected'; -} -exports.isPromiseAllSettledRejectionResult = isPromiseAllSettledRejectionResult; -/** - * Node.js v11.0 lower and browser compatible `Array.prototype.flatMap`. - */ -function FlatMap(arr, fn) { - const result = []; - arr.forEach(it => { - result.push(...fn(it)); - }); - return result; -} -exports.FlatMap = FlatMap; -function setEquals(lhs, rhs) { - if (lhs.size !== rhs.size) { - return false; - } - for (const item of lhs) { - if (!rhs.has(item)) { - return false; + return ret; + } + get [kPending]() { + let ret = this[kQueued]; + for (const { [kPending]: pending } of this[kClients]) { + ret += pending; } - } - return true; -} -exports.setEquals = setEquals; -/** - * Binary search the sorted array to the find upper bound for the value. - * @param arr - * @param value - * @returns - */ -function binarySearchUB(arr, value) { - let lo = 0; - let hi = arr.length - 1; - let ret = arr.length; - while (hi >= lo) { - const mid = lo + Math.trunc((hi - lo) / 2); - if (arr[mid] < value) { - lo = mid + 1; + return ret; + } + get [kRunning]() { + let ret = 0; + for (const { [kRunning]: running } of this[kClients]) { + ret += running; } - else { - ret = mid; - hi = mid - 1; + return ret; + } + get [kSize]() { + let ret = this[kQueued]; + for (const { [kSize]: size } of this[kClients]) { + ret += size; } - } - return ret; -} -exports.binarySearchUB = binarySearchUB; -function equalsCaseInsensitive(lhs, rhs) { - return lhs.toLowerCase() === rhs.toLowerCase(); -} -exports.equalsCaseInsensitive = equalsCaseInsensitive; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 14769: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DefaultAggregation = exports.ExponentialHistogramAggregation = exports.ExplicitBucketHistogramAggregation = exports.HistogramAggregation = exports.LastValueAggregation = exports.SumAggregation = exports.DropAggregation = exports.Aggregation = void 0; -const api = __nccwpck_require__(65163); -const aggregator_1 = __nccwpck_require__(85922); -const InstrumentDescriptor_1 = __nccwpck_require__(42671); -/** - * Configures how measurements are combined into metrics for views. - * - * Aggregation provides a set of built-in aggregations via static methods. - */ -class Aggregation { - static Drop() { - return DROP_AGGREGATION; - } - static Sum() { - return SUM_AGGREGATION; - } - static LastValue() { - return LAST_VALUE_AGGREGATION; - } - static Histogram() { - return HISTOGRAM_AGGREGATION; - } - static ExponentialHistogram() { - return EXPONENTIAL_HISTOGRAM_AGGREGATION; - } - static Default() { - return DEFAULT_AGGREGATION; - } -} -exports.Aggregation = Aggregation; -/** - * The default drop aggregation. - */ -class DropAggregation extends Aggregation { - createAggregator(_instrument) { - return DropAggregation.DEFAULT_INSTANCE; - } -} -exports.DropAggregation = DropAggregation; -DropAggregation.DEFAULT_INSTANCE = new aggregator_1.DropAggregator(); -/** - * The default sum aggregation. - */ -class SumAggregation extends Aggregation { - createAggregator(instrument) { - switch (instrument.type) { - case InstrumentDescriptor_1.InstrumentType.COUNTER: - case InstrumentDescriptor_1.InstrumentType.OBSERVABLE_COUNTER: - case InstrumentDescriptor_1.InstrumentType.HISTOGRAM: { - return SumAggregation.MONOTONIC_INSTANCE; - } - default: { - return SumAggregation.NON_MONOTONIC_INSTANCE; + return ret; + } + get stats() { + return new PoolStats(this); + } + [kClose]() { + if (this[kQueue].isEmpty()) { + const closeAll = []; + for (let i2 = 0; i2 < this[kClients].length; i2++) { + const client = this[kClients][i2]; + if (!client.destroyed) { + closeAll.push(client.close()); } + } + return Promise.all(closeAll); + } else { + return new Promise((resolve8) => { + this[kClosedResolve] = resolve8; + }); } - } -} -exports.SumAggregation = SumAggregation; -SumAggregation.MONOTONIC_INSTANCE = new aggregator_1.SumAggregator(true); -SumAggregation.NON_MONOTONIC_INSTANCE = new aggregator_1.SumAggregator(false); -/** - * The default last value aggregation. - */ -class LastValueAggregation extends Aggregation { - createAggregator(_instrument) { - return LastValueAggregation.DEFAULT_INSTANCE; - } -} -exports.LastValueAggregation = LastValueAggregation; -LastValueAggregation.DEFAULT_INSTANCE = new aggregator_1.LastValueAggregator(); -/** - * The default histogram aggregation. - */ -class HistogramAggregation extends Aggregation { - createAggregator(_instrument) { - return HistogramAggregation.DEFAULT_INSTANCE; - } -} -exports.HistogramAggregation = HistogramAggregation; -HistogramAggregation.DEFAULT_INSTANCE = new aggregator_1.HistogramAggregator([0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000], true); -/** - * The explicit bucket histogram aggregation. - */ -class ExplicitBucketHistogramAggregation extends Aggregation { - /** - * @param boundaries the bucket boundaries of the histogram aggregation - * @param _recordMinMax If set to true, min and max will be recorded. Otherwise, min and max will not be recorded. - */ - constructor(boundaries, _recordMinMax = true) { - super(); - this._recordMinMax = _recordMinMax; - if (boundaries == null) { - throw new Error('ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array'); - } - // Copy the boundaries array for modification. - boundaries = boundaries.concat(); - // We need to an ordered set to be able to correctly compute count for each - // boundary since we'll iterate on each in order. - boundaries = boundaries.sort((a, b) => a - b); - // Remove all Infinity from the boundaries. - const minusInfinityIndex = boundaries.lastIndexOf(-Infinity); - let infinityIndex = boundaries.indexOf(Infinity); - if (infinityIndex === -1) { - infinityIndex = undefined; - } - this._boundaries = boundaries.slice(minusInfinityIndex + 1, infinityIndex); - } - createAggregator(_instrument) { - return new aggregator_1.HistogramAggregator(this._boundaries, this._recordMinMax); - } -} -exports.ExplicitBucketHistogramAggregation = ExplicitBucketHistogramAggregation; -class ExponentialHistogramAggregation extends Aggregation { - constructor(_maxSize = 160, _recordMinMax = true) { - super(); - this._maxSize = _maxSize; - this._recordMinMax = _recordMinMax; - } - createAggregator(_instrument) { - return new aggregator_1.ExponentialHistogramAggregator(this._maxSize, this._recordMinMax); - } -} -exports.ExponentialHistogramAggregation = ExponentialHistogramAggregation; -/** - * The default aggregation. - */ -class DefaultAggregation extends Aggregation { - _resolve(instrument) { - // cast to unknown to disable complaints on the (unreachable) fallback. - switch (instrument.type) { - case InstrumentDescriptor_1.InstrumentType.COUNTER: - case InstrumentDescriptor_1.InstrumentType.UP_DOWN_COUNTER: - case InstrumentDescriptor_1.InstrumentType.OBSERVABLE_COUNTER: - case InstrumentDescriptor_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER: { - return SUM_AGGREGATION; - } - case InstrumentDescriptor_1.InstrumentType.GAUGE: - case InstrumentDescriptor_1.InstrumentType.OBSERVABLE_GAUGE: { - return LAST_VALUE_AGGREGATION; - } - case InstrumentDescriptor_1.InstrumentType.HISTOGRAM: { - if (instrument.advice.explicitBucketBoundaries) { - return new ExplicitBucketHistogramAggregation(instrument.advice.explicitBucketBoundaries); - } - return HISTOGRAM_AGGREGATION; - } + } + [kDestroy](err) { + while (true) { + const item = this[kQueue].shift(); + if (!item) { + break; + } + item.handler.onError(err); } - api.diag.warn(`Unable to recognize instrument type: ${instrument.type}`); - return DROP_AGGREGATION; - } - createAggregator(instrument) { - return this._resolve(instrument).createAggregator(instrument); - } -} -exports.DefaultAggregation = DefaultAggregation; -const DROP_AGGREGATION = new DropAggregation(); -const SUM_AGGREGATION = new SumAggregation(); -const LAST_VALUE_AGGREGATION = new LastValueAggregation(); -const HISTOGRAM_AGGREGATION = new HistogramAggregation(); -const EXPONENTIAL_HISTOGRAM_AGGREGATION = new ExponentialHistogramAggregation(); -const DEFAULT_AGGREGATION = new DefaultAggregation(); -//# sourceMappingURL=Aggregation.js.map - -/***/ }), - -/***/ 31952: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FilteringAttributesProcessor = exports.NoopAttributesProcessor = exports.AttributesProcessor = void 0; -/** - * The {@link AttributesProcessor} is responsible for customizing which - * attribute(s) are to be reported as metrics dimension(s) and adding - * additional dimension(s) from the {@link Context}. - */ -class AttributesProcessor { - static Noop() { - return NOOP; - } -} -exports.AttributesProcessor = AttributesProcessor; -class NoopAttributesProcessor extends AttributesProcessor { - process(incoming, _context) { - return incoming; - } -} -exports.NoopAttributesProcessor = NoopAttributesProcessor; -/** - * {@link AttributesProcessor} that filters by allowed attribute names and drops any names that are not in the - * allow list. - */ -class FilteringAttributesProcessor extends AttributesProcessor { - constructor(_allowedAttributeNames) { - super(); - this._allowedAttributeNames = _allowedAttributeNames; - } - process(incoming, _context) { - const filteredAttributes = {}; - Object.keys(incoming) - .filter(attributeName => this._allowedAttributeNames.includes(attributeName)) - .forEach(attributeName => (filteredAttributes[attributeName] = incoming[attributeName])); - return filteredAttributes; - } -} -exports.FilteringAttributesProcessor = FilteringAttributesProcessor; -const NOOP = new NoopAttributesProcessor(); -//# sourceMappingURL=AttributesProcessor.js.map - -/***/ }), - -/***/ 32979: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.InstrumentSelector = void 0; -const Predicate_1 = __nccwpck_require__(46443); -class InstrumentSelector { - constructor(criteria) { - var _a; - this._nameFilter = new Predicate_1.PatternPredicate((_a = criteria === null || criteria === void 0 ? void 0 : criteria.name) !== null && _a !== void 0 ? _a : '*'); - this._type = criteria === null || criteria === void 0 ? void 0 : criteria.type; - this._unitFilter = new Predicate_1.ExactPredicate(criteria === null || criteria === void 0 ? void 0 : criteria.unit); - } - getType() { - return this._type; - } - getNameFilter() { - return this._nameFilter; - } - getUnitFilter() { - return this._unitFilter; - } -} -exports.InstrumentSelector = InstrumentSelector; -//# sourceMappingURL=InstrumentSelector.js.map - -/***/ }), - -/***/ 49851: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MeterSelector = void 0; -const Predicate_1 = __nccwpck_require__(46443); -class MeterSelector { - constructor(criteria) { - this._nameFilter = new Predicate_1.ExactPredicate(criteria === null || criteria === void 0 ? void 0 : criteria.name); - this._versionFilter = new Predicate_1.ExactPredicate(criteria === null || criteria === void 0 ? void 0 : criteria.version); - this._schemaUrlFilter = new Predicate_1.ExactPredicate(criteria === null || criteria === void 0 ? void 0 : criteria.schemaUrl); - } - getNameFilter() { - return this._nameFilter; - } - /** - * TODO: semver filter? no spec yet. - */ - getVersionFilter() { - return this._versionFilter; - } - getSchemaUrlFilter() { - return this._schemaUrlFilter; - } -} -exports.MeterSelector = MeterSelector; -//# sourceMappingURL=MeterSelector.js.map - -/***/ }), - -/***/ 46443: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExactPredicate = exports.PatternPredicate = void 0; -// https://tc39.es/proposal-regex-escaping -// escape ^ $ \ . + ? ( ) [ ] { } | -// do not need to escape * as we interpret it as wildcard -const ESCAPE = /[\^$\\.+?()[\]{}|]/g; -/** - * Wildcard pattern predicate, supports patterns like `*`, `foo*`, `*bar`. - */ -class PatternPredicate { - constructor(pattern) { - if (pattern === '*') { - this._matchAll = true; - this._regexp = /.*/; + const destroyAll = new Array(this[kClients].length); + for (let i2 = 0; i2 < this[kClients].length; i2++) { + destroyAll[i2] = this[kClients][i2].destroy(err); } - else { - this._matchAll = false; - this._regexp = new RegExp(PatternPredicate.escapePattern(pattern)); - } - } - match(str) { - if (this._matchAll) { - return true; - } - return this._regexp.test(str); - } - static escapePattern(pattern) { - return `^${pattern.replace(ESCAPE, '\\$&').replace('*', '.*')}$`; - } - static hasWildcard(pattern) { - return pattern.includes('*'); - } -} -exports.PatternPredicate = PatternPredicate; -class ExactPredicate { - constructor(pattern) { - this._matchAll = pattern === undefined; - this._pattern = pattern; - } - match(str) { - if (this._matchAll) { - return true; - } - if (str === this._pattern) { - return true; + return Promise.all(destroyAll); + } + [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 false; - } -} -exports.ExactPredicate = ExactPredicate; -//# sourceMappingURL=Predicate.js.map - -/***/ }), - -/***/ 76212: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getConflictResolutionRecipe = exports.getDescriptionResolutionRecipe = exports.getTypeConflictResolutionRecipe = exports.getUnitConflictResolutionRecipe = exports.getValueTypeConflictResolutionRecipe = exports.getIncompatibilityDetails = void 0; -function getIncompatibilityDetails(existing, otherDescriptor) { - let incompatibility = ''; - if (existing.unit !== otherDescriptor.unit) { - incompatibility += `\t- Unit '${existing.unit}' does not match '${otherDescriptor.unit}'\n`; - } - if (existing.type !== otherDescriptor.type) { - incompatibility += `\t- Type '${existing.type}' does not match '${otherDescriptor.type}'\n`; - } - if (existing.valueType !== otherDescriptor.valueType) { - incompatibility += `\t- Value Type '${existing.valueType}' does not match '${otherDescriptor.valueType}'\n`; - } - if (existing.description !== otherDescriptor.description) { - incompatibility += `\t- Description '${existing.description}' does not match '${otherDescriptor.description}'\n`; - } - return incompatibility; -} -exports.getIncompatibilityDetails = getIncompatibilityDetails; -function getValueTypeConflictResolutionRecipe(existing, otherDescriptor) { - return `\t- use valueType '${existing.valueType}' on instrument creation or use an instrument name other than '${otherDescriptor.name}'`; -} -exports.getValueTypeConflictResolutionRecipe = getValueTypeConflictResolutionRecipe; -function getUnitConflictResolutionRecipe(existing, otherDescriptor) { - return `\t- use unit '${existing.unit}' on instrument creation or use an instrument name other than '${otherDescriptor.name}'`; -} -exports.getUnitConflictResolutionRecipe = getUnitConflictResolutionRecipe; -function getTypeConflictResolutionRecipe(existing, otherDescriptor) { - const selector = { - name: otherDescriptor.name, - type: otherDescriptor.type, - unit: otherDescriptor.unit, - }; - const selectorString = JSON.stringify(selector); - return `\t- create a new view with a name other than '${existing.name}' and InstrumentSelector '${selectorString}'`; -} -exports.getTypeConflictResolutionRecipe = getTypeConflictResolutionRecipe; -function getDescriptionResolutionRecipe(existing, otherDescriptor) { - const selector = { - name: otherDescriptor.name, - type: otherDescriptor.type, - unit: otherDescriptor.unit, - }; - const selectorString = JSON.stringify(selector); - return `\t- create a new view with a name other than '${existing.name}' and InstrumentSelector '${selectorString}' - \t- OR - create a new view with the name ${existing.name} and description '${existing.description}' and InstrumentSelector ${selectorString} - \t- OR - create a new view with the name ${otherDescriptor.name} and description '${existing.description}' and InstrumentSelector ${selectorString}`; -} -exports.getDescriptionResolutionRecipe = getDescriptionResolutionRecipe; -function getConflictResolutionRecipe(existing, otherDescriptor) { - // Conflicts that cannot be solved via views. - if (existing.valueType !== otherDescriptor.valueType) { - return getValueTypeConflictResolutionRecipe(existing, otherDescriptor); - } - if (existing.unit !== otherDescriptor.unit) { - return getUnitConflictResolutionRecipe(existing, otherDescriptor); - } - // Conflicts that can be solved via views. - if (existing.type !== otherDescriptor.type) { - // this will automatically solve possible description conflicts. - return getTypeConflictResolutionRecipe(existing, otherDescriptor); - } - if (existing.description !== otherDescriptor.description) { - return getDescriptionResolutionRecipe(existing, otherDescriptor); - } - return ''; -} -exports.getConflictResolutionRecipe = getConflictResolutionRecipe; -//# sourceMappingURL=RegistrationConflicts.js.map - -/***/ }), - -/***/ 1265: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.View = void 0; -const Predicate_1 = __nccwpck_require__(46443); -const AttributesProcessor_1 = __nccwpck_require__(31952); -const InstrumentSelector_1 = __nccwpck_require__(32979); -const MeterSelector_1 = __nccwpck_require__(49851); -const Aggregation_1 = __nccwpck_require__(14769); -function isSelectorNotProvided(options) { - return (options.instrumentName == null && - options.instrumentType == null && - options.instrumentUnit == null && - options.meterName == null && - options.meterVersion == null && - options.meterSchemaUrl == null); -} -/** - * Can be passed to a {@link MeterProvider} to select instruments and alter their metric stream. - */ -class View { - /** - * Create a new {@link View} instance. - * - * Parameters can be categorized as two types: - * Instrument selection criteria: Used to describe the instrument(s) this view will be applied to. - * Will be treated as additive (the Instrument has to meet all the provided criteria to be selected). - * - * Metric stream altering: Alter the metric stream of instruments selected by instrument selection criteria. - * - * @param viewOptions {@link ViewOptions} for altering the metric stream and instrument selection. - * @param viewOptions.name - * Alters the metric stream: - * This will be used as the name of the metrics stream. - * If not provided, the original Instrument name will be used. - * @param viewOptions.description - * Alters the metric stream: - * This will be used as the description of the metrics stream. - * If not provided, the original Instrument description will be used by default. - * @param viewOptions.attributeKeys - * Alters the metric stream: - * If provided, the attributes that are not in the list will be ignored. - * If not provided, all attribute keys will be used by default. - * @param viewOptions.aggregation - * Alters the metric stream: - * Alters the {@link Aggregation} of the metric stream. - * @param viewOptions.instrumentName - * Instrument selection criteria: - * Original name of the Instrument(s) with wildcard support. - * @param viewOptions.instrumentType - * Instrument selection criteria: - * The original type of the Instrument(s). - * @param viewOptions.instrumentUnit - * Instrument selection criteria: - * The unit of the Instrument(s). - * @param viewOptions.meterName - * Instrument selection criteria: - * The name of the Meter. No wildcard support, name must match the meter exactly. - * @param viewOptions.meterVersion - * Instrument selection criteria: - * The version of the Meter. No wildcard support, version must match exactly. - * @param viewOptions.meterSchemaUrl - * Instrument selection criteria: - * The schema URL of the Meter. No wildcard support, schema URL must match exactly. - * - * @example - * // Create a view that changes the Instrument 'my.instrument' to use to an - * // ExplicitBucketHistogramAggregation with the boundaries [20, 30, 40] - * new View({ - * aggregation: new ExplicitBucketHistogramAggregation([20, 30, 40]), - * instrumentName: 'my.instrument' - * }) - */ - constructor(viewOptions) { - var _a; - // If no criteria is provided, the SDK SHOULD treat it as an error. - // It is recommended that the SDK implementations fail fast. - if (isSelectorNotProvided(viewOptions)) { - throw new Error('Cannot create view with no selector arguments supplied'); - } - // the SDK SHOULD NOT allow Views with a specified name to be declared with instrument selectors that - // may select more than one instrument (e.g. wild card instrument name) in the same Meter. - if (viewOptions.name != null && - ((viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.instrumentName) == null || - Predicate_1.PatternPredicate.hasWildcard(viewOptions.instrumentName))) { - throw new Error('Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.'); - } - // Create AttributesProcessor if attributeKeys are defined set. - if (viewOptions.attributeKeys != null) { - this.attributesProcessor = new AttributesProcessor_1.FilteringAttributesProcessor(viewOptions.attributeKeys); + return !this[kNeedDrain]; + } + [kAddClient](client) { + client.on("drain", this[kOnDrain].bind(this, client)).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, client[kUrl], [client, this]); + } + }); } - else { - this.attributesProcessor = AttributesProcessor_1.AttributesProcessor.Noop(); - } - this.name = viewOptions.name; - this.description = viewOptions.description; - this.aggregation = (_a = viewOptions.aggregation) !== null && _a !== void 0 ? _a : Aggregation_1.Aggregation.Default(); - this.instrumentSelector = new InstrumentSelector_1.InstrumentSelector({ - name: viewOptions.instrumentName, - type: viewOptions.instrumentType, - unit: viewOptions.instrumentUnit, - }); - this.meterSelector = new MeterSelector_1.MeterSelector({ - name: viewOptions.meterName, - version: viewOptions.meterVersion, - schemaUrl: viewOptions.meterSchemaUrl, - }); - } -} -exports.View = View; -//# sourceMappingURL=View.js.map - -/***/ }), - -/***/ 6379: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ViewRegistry = void 0; -class ViewRegistry { - constructor() { - this._registeredViews = []; - } - addView(view) { - this._registeredViews.push(view); - } - findViews(instrument, meter) { - const views = this._registeredViews.filter(registeredView => { - return (this._matchInstrument(registeredView.instrumentSelector, instrument) && - this._matchMeter(registeredView.meterSelector, meter)); - }); - return views; - } - _matchInstrument(selector, instrument) { - return ((selector.getType() === undefined || - instrument.type === selector.getType()) && - selector.getNameFilter().match(instrument.name) && - selector.getUnitFilter().match(instrument.unit)); - } - _matchMeter(selector, meter) { - return (selector.getNameFilter().match(meter.name) && - (meter.version === undefined || - selector.getVersionFilter().match(meter.version)) && - (meter.schemaUrl === undefined || - selector.getSchemaUrlFilter().match(meter.schemaUrl))); - } -} -exports.ViewRegistry = ViewRegistry; -//# sourceMappingURL=ViewRegistry.js.map - -/***/ }), - -/***/ 78920: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BasicTracerProvider = exports.ForceFlushState = void 0; -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -const resources_1 = __nccwpck_require__(3871); -const _1 = __nccwpck_require__(29253); -const config_1 = __nccwpck_require__(91); -const MultiSpanProcessor_1 = __nccwpck_require__(12352); -const NoopSpanProcessor_1 = __nccwpck_require__(69252); -const platform_1 = __nccwpck_require__(10262); -const utility_1 = __nccwpck_require__(54324); -var ForceFlushState; -(function (ForceFlushState) { - ForceFlushState[ForceFlushState["resolved"] = 0] = "resolved"; - ForceFlushState[ForceFlushState["timeout"] = 1] = "timeout"; - ForceFlushState[ForceFlushState["error"] = 2] = "error"; - ForceFlushState[ForceFlushState["unresolved"] = 3] = "unresolved"; -})(ForceFlushState = exports.ForceFlushState || (exports.ForceFlushState = {})); -/** - * This class represents a basic tracer provider which platform libraries can extend - */ -class BasicTracerProvider { - constructor(config = {}) { - var _a; - this._registeredSpanProcessors = []; - this._tracers = new Map(); - const mergedConfig = (0, core_1.merge)({}, (0, config_1.loadDefaultConfig)(), (0, utility_1.reconfigureLimits)(config)); - this.resource = (_a = mergedConfig.resource) !== null && _a !== void 0 ? _a : resources_1.Resource.empty(); - this.resource = resources_1.Resource.default().merge(this.resource); - this._config = Object.assign({}, mergedConfig, { - resource: this.resource, + return this; + } + [kRemoveClient](client) { + client.close(() => { + const idx = this[kClients].indexOf(client); + if (idx !== -1) { + this[kClients].splice(idx, 1); + } }); - const defaultExporter = this._buildExporterFromEnv(); - if (defaultExporter !== undefined) { - const batchProcessor = new platform_1.BatchSpanProcessor(defaultExporter); - this.activeSpanProcessor = batchProcessor; + this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); + } + }; + module3.exports = { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher + }; + } +}); + +// node_modules/undici/lib/dispatcher/pool.js +var require_pool = __commonJS({ + "node_modules/undici/lib/dispatcher/pool.js"(exports, module3) { + "use strict"; + var { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kGetDispatcher, + kRemoveClient + } = require_pool_base(); + var Client = require_client(); + var { + InvalidArgumentError + } = require_errors(); + var util = require_util(); + var { kUrl } = require_symbols(); + var buildConnector = require_connect(); + var kOptions = /* @__PURE__ */ Symbol("options"); + var kConnections = /* @__PURE__ */ Symbol("connections"); + var kFactory = /* @__PURE__ */ 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, + clientTtl, + ...options2 + } = {}) { + 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, + ...typeof autoSelectFamily === "boolean" ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, + ...connect + }); } - else { - this.activeSpanProcessor = new NoopSpanProcessor_1.NoopSpanProcessor(); - } - } - getTracer(name, version, options) { - const key = `${name}@${version || ''}:${(options === null || options === void 0 ? void 0 : options.schemaUrl) || ''}`; - if (!this._tracers.has(key)) { - this._tracers.set(key, new _1.Tracer({ name, version, schemaUrl: options === null || options === void 0 ? void 0 : options.schemaUrl }, this._config, this)); - } - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - return this._tracers.get(key); - } - /** - * Adds a new {@link SpanProcessor} to this tracer. - * @param spanProcessor the new SpanProcessor to be added. - */ - addSpanProcessor(spanProcessor) { - if (this._registeredSpanProcessors.length === 0) { - // since we might have enabled by default a batchProcessor, we disable it - // before adding the new one - this.activeSpanProcessor - .shutdown() - .catch(err => api_1.diag.error('Error while trying to shutdown current span processor', err)); - } - this._registeredSpanProcessors.push(spanProcessor); - this.activeSpanProcessor = new MultiSpanProcessor_1.MultiSpanProcessor(this._registeredSpanProcessors); - } - getActiveSpanProcessor() { - return this.activeSpanProcessor; - } - /** - * Register this TracerProvider for use with the OpenTelemetry API. - * Undefined values may be replaced with defaults, and - * null values will be skipped. - * - * @param config Configuration object for SDK registration - */ - register(config = {}) { - api_1.trace.setGlobalTracerProvider(this); - if (config.propagator === undefined) { - config.propagator = this._buildPropagatorFromEnv(); - } - if (config.contextManager) { - api_1.context.setGlobalContextManager(config.contextManager); - } - if (config.propagator) { - api_1.propagation.setGlobalPropagator(config.propagator); - } - } - forceFlush() { - const timeout = this._config.forceFlushTimeoutMillis; - const promises = this._registeredSpanProcessors.map((spanProcessor) => { - return new Promise(resolve => { - let state; - const timeoutInterval = setTimeout(() => { - resolve(new Error(`Span processor did not completed within timeout period of ${timeout} ms`)); - state = ForceFlushState.timeout; - }, timeout); - spanProcessor - .forceFlush() - .then(() => { - clearTimeout(timeoutInterval); - if (state !== ForceFlushState.timeout) { - state = ForceFlushState.resolved; - resolve(state); - } - }) - .catch(error => { - clearTimeout(timeoutInterval); - state = ForceFlushState.error; - resolve(error); - }); - }); - }); - return new Promise((resolve, reject) => { - Promise.all(promises) - .then(results => { - const errors = results.filter(result => result !== ForceFlushState.resolved); - if (errors.length > 0) { - reject(errors); - } - else { - resolve(); - } - }) - .catch(error => reject([error])); - }); - } - shutdown() { - return this.activeSpanProcessor.shutdown(); - } - /** - * TS cannot yet infer the type of this.constructor: - * https://github.com/Microsoft/TypeScript/issues/3841#issuecomment-337560146 - * There is no need to override either of the getters in your child class. - * The type of the registered component maps should be the same across all - * classes in the inheritance tree. - */ - _getPropagator(name) { - var _a; - return (_a = this.constructor._registeredPropagators.get(name)) === null || _a === void 0 ? void 0 : _a(); - } - _getSpanExporter(name) { - var _a; - return (_a = this.constructor._registeredExporters.get(name)) === null || _a === void 0 ? void 0 : _a(); - } - _buildPropagatorFromEnv() { - // per spec, propagators from env must be deduplicated - const uniquePropagatorNames = Array.from(new Set((0, core_1.getEnv)().OTEL_PROPAGATORS)); - const propagators = uniquePropagatorNames.map(name => { - const propagator = this._getPropagator(name); - if (!propagator) { - api_1.diag.warn(`Propagator "${name}" requested through environment variable is unavailable.`); + super(); + this[kConnections] = connections || null; + this[kUrl] = util.parseOrigin(origin); + this[kOptions] = { ...util.deepClone(options2), connect, allowH2, clientTtl, socketPath }; + this[kOptions].interceptors = options2.interceptors ? { ...options2.interceptors } : void 0; + this[kFactory] = factory; + this.on("connect", (origin2, targets) => { + if (clientTtl != null && clientTtl > 0) { + for (const target of targets) { + Object.assign(target, { ttl: Date.now() }); } - return propagator; + } }); - const validPropagators = propagators.reduce((list, item) => { - if (item) { - list.push(item); + this.on("connectionError", (origin2, targets, error2) => { + for (const target of targets) { + const idx = this[kClients].indexOf(target); + if (idx !== -1) { + this[kClients].splice(idx, 1); } - return list; - }, []); - if (validPropagators.length === 0) { - return; - } - else if (uniquePropagatorNames.length === 1) { - return validPropagators[0]; - } - else { - return new core_1.CompositePropagator({ - propagators: validPropagators, - }); - } - } - _buildExporterFromEnv() { - const exporterName = (0, core_1.getEnv)().OTEL_TRACES_EXPORTER; - if (exporterName === 'none' || exporterName === '') - return; - const exporter = this._getSpanExporter(exporterName); - if (!exporter) { - api_1.diag.error(`Exporter "${exporterName}" requested through environment variable is unavailable.`); - } - return exporter; - } -} -exports.BasicTracerProvider = BasicTracerProvider; -BasicTracerProvider._registeredPropagators = new Map([ - ['tracecontext', () => new core_1.W3CTraceContextPropagator()], - ['baggage', () => new core_1.W3CBaggagePropagator()], -]); -BasicTracerProvider._registeredExporters = new Map(); -//# sourceMappingURL=BasicTracerProvider.js.map - -/***/ }), - -/***/ 12352: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MultiSpanProcessor = void 0; -const core_1 = __nccwpck_require__(89736); -/** - * Implementation of the {@link SpanProcessor} that simply forwards all - * received events to a list of {@link SpanProcessor}s. - */ -class MultiSpanProcessor { - constructor(_spanProcessors) { - this._spanProcessors = _spanProcessors; - } - forceFlush() { - const promises = []; - for (const spanProcessor of this._spanProcessors) { - promises.push(spanProcessor.forceFlush()); - } - return new Promise(resolve => { - Promise.all(promises) - .then(() => { - resolve(); - }) - .catch(error => { - (0, core_1.globalErrorHandler)(error || new Error('MultiSpanProcessor: forceFlush failed')); - resolve(); - }); + } }); - } - onStart(span, context) { - for (const spanProcessor of this._spanProcessors) { - spanProcessor.onStart(span, context); + } + [kGetDispatcher]() { + const clientTtlOption = this[kOptions].clientTtl; + for (const client of this[kClients]) { + if (clientTtlOption != null && clientTtlOption > 0 && client.ttl && Date.now() - client.ttl > clientTtlOption) { + this[kRemoveClient](client); + } else if (!client[kNeedDrain]) { + return client; + } } - } - onEnd(span) { - for (const spanProcessor of this._spanProcessors) { - spanProcessor.onEnd(span); + if (!this[kConnections] || this[kClients].length < this[kConnections]) { + const dispatcher = this[kFactory](this[kUrl], this[kOptions]); + this[kAddClient](dispatcher); + return dispatcher; } - } - shutdown() { - const promises = []; - for (const spanProcessor of this._spanProcessors) { - promises.push(spanProcessor.shutdown()); + } + }; + module3.exports = Pool; + } +}); + +// node_modules/undici/lib/dispatcher/balanced-pool.js +var require_balanced_pool = __commonJS({ + "node_modules/undici/lib/dispatcher/balanced-pool.js"(exports, module3) { + "use strict"; + var { + BalancedPoolMissingUpstreamError, + InvalidArgumentError + } = require_errors(); + var { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher + } = require_pool_base(); + var Pool = require_pool(); + var { kUrl } = require_symbols(); + var util = require_util(); + var kFactory = /* @__PURE__ */ Symbol("factory"); + var kOptions = /* @__PURE__ */ Symbol("options"); + var kGreatestCommonDivisor = /* @__PURE__ */ Symbol("kGreatestCommonDivisor"); + var kCurrentWeight = /* @__PURE__ */ Symbol("kCurrentWeight"); + var kIndex = /* @__PURE__ */ Symbol("kIndex"); + var kWeight = /* @__PURE__ */ Symbol("kWeight"); + var kMaxWeightPerServer = /* @__PURE__ */ Symbol("kMaxWeightPerServer"); + var kErrorPenalty = /* @__PURE__ */ Symbol("kErrorPenalty"); + function getGreatestCommonDivisor(a2, b2) { + if (a2 === 0) return b2; + while (b2 !== 0) { + const t2 = b2; + b2 = a2 % b2; + a2 = t2; + } + return a2; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + var BalancedPool = class extends PoolBase { + constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) { + if (typeof factory !== "function") { + throw new InvalidArgumentError("factory must be a function."); } - return new Promise((resolve, reject) => { - Promise.all(promises).then(() => { - resolve(); - }, reject); + super(); + this[kOptions] = { ...util.deepClone(opts) }; + this[kOptions].interceptors = opts.interceptors ? { ...opts.interceptors } : void 0; + this[kIndex] = -1; + this[kCurrentWeight] = 0; + this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100; + this[kErrorPenalty] = this[kOptions].errorPenalty || 15; + if (!Array.isArray(upstreams)) { + upstreams = [upstreams]; + } + this[kFactory] = factory; + for (const upstream of upstreams) { + this.addUpstream(upstream); + } + this._updateBalancedPoolStats(); + } + addUpstream(upstream) { + const upstreamOrigin = util.parseOrigin(upstream).origin; + if (this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true)) { + return this; + } + const pool = this[kFactory](upstreamOrigin, this[kOptions]); + this[kAddClient](pool); + pool.on("connect", () => { + pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]); }); - } -} -exports.MultiSpanProcessor = MultiSpanProcessor; -//# sourceMappingURL=MultiSpanProcessor.js.map - -/***/ }), - -/***/ 17446: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SamplingDecision = void 0; -/** - * A sampling decision that determines how a {@link Span} will be recorded - * and collected. - */ -var SamplingDecision; -(function (SamplingDecision) { - /** - * `Span.isRecording() === false`, span will not be recorded and all events - * and attributes will be dropped. - */ - SamplingDecision[SamplingDecision["NOT_RECORD"] = 0] = "NOT_RECORD"; - /** - * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags} - * MUST NOT be set. - */ - SamplingDecision[SamplingDecision["RECORD"] = 1] = "RECORD"; - /** - * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags} - * MUST be set. - */ - SamplingDecision[SamplingDecision["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED"; -})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {})); -//# sourceMappingURL=Sampler.js.map - -/***/ }), - -/***/ 61301: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Span = void 0; -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -const semantic_conventions_1 = __nccwpck_require__(67275); -const enums_1 = __nccwpck_require__(35092); -/** - * This class represents a span. - */ -class Span { - /** - * Constructs a new Span instance. - * - * @deprecated calling Span constructor directly is not supported. Please use tracer.startSpan. - * */ - constructor(parentTracer, context, spanName, spanContext, kind, parentSpanId, links = [], startTime, _deprecatedClock, // keeping this argument even though it is unused to ensure backwards compatibility - attributes) { - this.attributes = {}; - this.links = []; - this.events = []; - this._droppedAttributesCount = 0; - this._droppedEventsCount = 0; - this._droppedLinksCount = 0; - this.status = { - code: api_1.SpanStatusCode.UNSET, - }; - this.endTime = [0, 0]; - this._ended = false; - this._duration = [-1, -1]; - this.name = spanName; - this._spanContext = spanContext; - this.parentSpanId = parentSpanId; - this.kind = kind; - this.links = links; - const now = Date.now(); - this._performanceStartTime = core_1.otperformance.now(); - this._performanceOffset = - now - (this._performanceStartTime + (0, core_1.getTimeOrigin)()); - this._startTimeProvided = startTime != null; - this.startTime = this._getTime(startTime !== null && startTime !== void 0 ? startTime : now); - this.resource = parentTracer.resource; - this.instrumentationLibrary = parentTracer.instrumentationLibrary; - this._spanLimits = parentTracer.getSpanLimits(); - this._attributeValueLengthLimit = - this._spanLimits.attributeValueLengthLimit || 0; - if (attributes != null) { - this.setAttributes(attributes); - } - this._spanProcessor = parentTracer.getActiveSpanProcessor(); - this._spanProcessor.onStart(this, context); - } - spanContext() { - return this._spanContext; - } - setAttribute(key, value) { - if (value == null || this._isSpanEnded()) - return this; - if (key.length === 0) { - api_1.diag.warn(`Invalid attribute key: ${key}`); - return this; - } - if (!(0, core_1.isAttributeValue)(value)) { - api_1.diag.warn(`Invalid attribute value set for key: ${key}`); - return this; - } - if (Object.keys(this.attributes).length >= - this._spanLimits.attributeCountLimit && - !Object.prototype.hasOwnProperty.call(this.attributes, key)) { - this._droppedAttributesCount++; - return this; - } - this.attributes[key] = this._truncateToSize(value); - return this; - } - setAttributes(attributes) { - for (const [k, v] of Object.entries(attributes)) { - this.setAttribute(k, v); + 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; - } - /** - * - * @param name Span Name - * @param [attributesOrStartTime] Span attributes or start time - * if type is {@type TimeInput} and 3rd param is undefined - * @param [timeStamp] Specified time stamp for the event - */ - addEvent(name, attributesOrStartTime, timeStamp) { - if (this._isSpanEnded()) - return this; - if (this._spanLimits.eventCountLimit === 0) { - api_1.diag.warn('No events allowed.'); - this._droppedEventsCount++; - return this; - } - if (this.events.length >= this._spanLimits.eventCountLimit) { - if (this._droppedEventsCount === 0) { - api_1.diag.debug('Dropping extra events.'); - } - this.events.shift(); - this._droppedEventsCount++; + } + _updateBalancedPoolStats() { + let result = 0; + for (let i2 = 0; i2 < this[kClients].length; i2++) { + result = getGreatestCommonDivisor(this[kClients][i2][kWeight], result); } - if ((0, core_1.isTimeInput)(attributesOrStartTime)) { - if (!(0, core_1.isTimeInput)(timeStamp)) { - timeStamp = attributesOrStartTime; - } - attributesOrStartTime = undefined; + this[kGreatestCommonDivisor] = result; + } + removeUpstream(upstream) { + const upstreamOrigin = util.parseOrigin(upstream).origin; + const pool = this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true); + if (pool) { + this[kRemoveClient](pool); } - const attributes = (0, core_1.sanitizeAttributes)(attributesOrStartTime); - this.events.push({ - name, - attributes, - time: this._getTime(timeStamp), - droppedAttributesCount: 0, - }); - return this; - } - addLink(link) { - this.links.push(link); - return this; - } - addLinks(links) { - this.links.push(...links); - return this; - } - setStatus(status) { - if (this._isSpanEnded()) - return this; - this.status = status; - return this; - } - updateName(name) { - if (this._isSpanEnded()) - return this; - this.name = name; return this; - } - end(endTime) { - if (this._isSpanEnded()) { - api_1.diag.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`); - return; - } - this._ended = true; - this.endTime = this._getTime(endTime); - this._duration = (0, core_1.hrTimeDuration)(this.startTime, this.endTime); - if (this._duration[0] < 0) { - api_1.diag.warn('Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.', this.startTime, this.endTime); - this.endTime = this.startTime.slice(); - this._duration = [0, 0]; - } - if (this._droppedEventsCount > 0) { - api_1.diag.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`); - } - this._spanProcessor.onEnd(this); - } - _getTime(inp) { - if (typeof inp === 'number' && inp < core_1.otperformance.now()) { - // must be a performance timestamp - // apply correction and convert to hrtime - return (0, core_1.hrTime)(inp + this._performanceOffset); - } - if (typeof inp === 'number') { - return (0, core_1.millisToHrTime)(inp); + } + getUpstream(upstream) { + const upstreamOrigin = util.parseOrigin(upstream).origin; + return this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true); + } + get upstreams() { + return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p2) => p2[kUrl].origin); + } + [kGetDispatcher]() { + if (this[kClients].length === 0) { + throw new BalancedPoolMissingUpstreamError(); } - if (inp instanceof Date) { - return (0, core_1.millisToHrTime)(inp.getTime()); + const dispatcher = this[kClients].find((dispatcher2) => !dispatcher2[kNeedDrain] && dispatcher2.closed !== true && dispatcher2.destroyed !== true); + if (!dispatcher) { + return; } - if ((0, core_1.isTimeInputHrTime)(inp)) { - return inp; + const allClientsBusy = this[kClients].map((pool) => pool[kNeedDrain]).reduce((a2, b2) => a2 && b2, true); + if (allClientsBusy) { + return; } - if (this._startTimeProvided) { - // if user provided a time for the start manually - // we can't use duration to calculate event/end times - return (0, core_1.millisToHrTime)(Date.now()); + 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; + } } - const msDuration = core_1.otperformance.now() - this._performanceStartTime; - return (0, core_1.addHrTimes)(this.startTime, (0, core_1.millisToHrTime)(msDuration)); - } - isRecording() { - return this._ended === false; - } - recordException(exception, time) { - const attributes = {}; - if (typeof exception === 'string') { - attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_MESSAGE] = exception; + this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]; + this[kIndex] = maxWeightIndex; + return this[kClients][maxWeightIndex]; + } + }; + module3.exports = BalancedPool; + } +}); + +// node_modules/undici/lib/dispatcher/round-robin-pool.js +var require_round_robin_pool = __commonJS({ + "node_modules/undici/lib/dispatcher/round-robin-pool.js"(exports, module3) { + "use strict"; + var { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kGetDispatcher, + kRemoveClient + } = require_pool_base(); + var Client = require_client(); + var { + InvalidArgumentError + } = require_errors(); + var util = require_util(); + var { kUrl } = require_symbols(); + var buildConnector = require_connect(); + var kOptions = /* @__PURE__ */ Symbol("options"); + var kConnections = /* @__PURE__ */ Symbol("connections"); + var kFactory = /* @__PURE__ */ Symbol("factory"); + var kIndex = /* @__PURE__ */ Symbol("index"); + function defaultFactory(origin, opts) { + return new Client(origin, opts); + } + var RoundRobinPool = class extends PoolBase { + constructor(origin, { + connections, + factory = defaultFactory, + connect, + connectTimeout, + tls, + maxCachedSessions, + socketPath, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + allowH2, + clientTtl, + ...options2 + } = {}) { + 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, + ...typeof autoSelectFamily === "boolean" ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, + ...connect + }); } - else if (exception) { - if (exception.code) { - attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_TYPE] = exception.code.toString(); - } - else if (exception.name) { - attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_TYPE] = exception.name; - } - if (exception.message) { - attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_MESSAGE] = exception.message; + super(); + this[kConnections] = connections || null; + this[kUrl] = util.parseOrigin(origin); + this[kOptions] = { ...util.deepClone(options2), connect, allowH2, clientTtl, socketPath }; + this[kOptions].interceptors = options2.interceptors ? { ...options2.interceptors } : void 0; + this[kFactory] = factory; + this[kIndex] = -1; + this.on("connect", (origin2, targets) => { + if (clientTtl != null && clientTtl > 0) { + for (const target of targets) { + Object.assign(target, { ttl: Date.now() }); } - if (exception.stack) { - attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_STACKTRACE] = exception.stack; + } + }); + this.on("connectionError", (origin2, targets, error2) => { + for (const target of targets) { + const idx = this[kClients].indexOf(target); + if (idx !== -1) { + this[kClients].splice(idx, 1); } + } + }); + } + [kGetDispatcher]() { + const clientTtlOption = this[kOptions].clientTtl; + const clientsLength = this[kClients].length; + if (clientsLength === 0) { + const dispatcher = this[kFactory](this[kUrl], this[kOptions]); + this[kAddClient](dispatcher); + return dispatcher; + } + let checked = 0; + while (checked < clientsLength) { + this[kIndex] = (this[kIndex] + 1) % clientsLength; + const client = this[kClients][this[kIndex]]; + if (clientTtlOption != null && clientTtlOption > 0 && client.ttl && Date.now() - client.ttl > clientTtlOption) { + this[kRemoveClient](client); + checked++; + continue; + } + if (!client[kNeedDrain]) { + return client; + } + checked++; } - // these are minimum requirements from spec - if (attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_TYPE] || - attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_MESSAGE]) { - this.addEvent(enums_1.ExceptionEventName, attributes, time); - } - else { - api_1.diag.warn(`Failed to record an exception ${exception}`); - } - } - get duration() { - return this._duration; - } - get ended() { - return this._ended; - } - get droppedAttributesCount() { - return this._droppedAttributesCount; - } - get droppedEventsCount() { - return this._droppedEventsCount; - } - get droppedLinksCount() { - return this._droppedLinksCount; - } - _isSpanEnded() { - if (this._ended) { - api_1.diag.warn(`Can not execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`); + if (!this[kConnections] || clientsLength < this[kConnections]) { + const dispatcher = this[kFactory](this[kUrl], this[kOptions]); + this[kAddClient](dispatcher); + return dispatcher; } - return this._ended; - } - // Utility function to truncate given value within size - // for value type of string, will truncate to given limit - // for type of non-string, will return same value - _truncateToLimitUtil(value, limit) { - if (value.length <= limit) { - return value; + } + }; + module3.exports = RoundRobinPool; + } +}); + +// node_modules/undici/lib/dispatcher/agent.js +var require_agent = __commonJS({ + "node_modules/undici/lib/dispatcher/agent.js"(exports, module3) { + "use strict"; + var { InvalidArgumentError, MaxOriginsReachedError } = require_errors(); + var { kClients, kRunning, kClose, kDestroy, kDispatch, kUrl } = require_symbols(); + var DispatcherBase = require_dispatcher_base(); + var Pool = require_pool(); + var Client = require_client(); + var util = require_util(); + var kOnConnect = /* @__PURE__ */ Symbol("onConnect"); + var kOnDisconnect = /* @__PURE__ */ Symbol("onDisconnect"); + var kOnConnectionError = /* @__PURE__ */ Symbol("onConnectionError"); + var kOnDrain = /* @__PURE__ */ Symbol("onDrain"); + var kFactory = /* @__PURE__ */ Symbol("factory"); + var kOptions = /* @__PURE__ */ Symbol("options"); + var kOrigins = /* @__PURE__ */ Symbol("origins"); + function defaultFactory(origin, opts) { + return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); + } + var Agent2 = class extends DispatcherBase { + constructor({ factory = defaultFactory, maxOrigins = Infinity, connect, ...options2 } = {}) { + 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 maxOrigins !== "number" || Number.isNaN(maxOrigins) || maxOrigins <= 0) { + throw new InvalidArgumentError("maxOrigins must be a number greater than 0"); } - return value.substr(0, limit); - } - /** - * If the given attribute value is of type string and has more characters than given {@code attributeValueLengthLimit} then - * return string with truncated to {@code attributeValueLengthLimit} characters - * - * If the given attribute value is array of strings then - * return new array of strings with each element truncated to {@code attributeValueLengthLimit} characters - * - * Otherwise return same Attribute {@code value} - * - * @param value Attribute value - * @returns truncated attribute value if required, otherwise same value - */ - _truncateToSize(value) { - const limit = this._attributeValueLengthLimit; - // Check limit - if (limit <= 0) { - // Negative values are invalid, so do not truncate - api_1.diag.warn(`Attribute value limit must be positive, got ${limit}`); - return value; + super(); + if (connect && typeof connect !== "function") { + connect = { ...connect }; + } + this[kOptions] = { ...util.deepClone(options2), maxOrigins, connect }; + this[kFactory] = factory; + this[kClients] = /* @__PURE__ */ new Map(); + this[kOrigins] = /* @__PURE__ */ new Set(); + 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 { dispatcher } of this[kClients].values()) { + ret += dispatcher[kRunning]; } - // String - if (typeof value === 'string') { - return this._truncateToLimitUtil(value, limit); + 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."); + } + if (this[kOrigins].size >= this[kOptions].maxOrigins && !this[kOrigins].has(key)) { + throw new MaxOriginsReachedError(); + } + const result = this[kClients].get(key); + let dispatcher = result && result.dispatcher; + if (!dispatcher) { + const closeClientIfUnused = (connected) => { + const result2 = this[kClients].get(key); + if (result2) { + if (connected) result2.count -= 1; + if (result2.count <= 0) { + this[kClients].delete(key); + if (!result2.dispatcher.destroyed) { + result2.dispatcher.close(); + } + } + this[kOrigins].delete(key); + } + }; + dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", (origin, targets) => { + const result2 = this[kClients].get(key); + if (result2) { + result2.count += 1; + } + this[kOnConnect](origin, targets); + }).on("disconnect", (origin, targets, err) => { + closeClientIfUnused(true); + this[kOnDisconnect](origin, targets, err); + }).on("connectionError", (origin, targets, err) => { + closeClientIfUnused(false); + this[kOnConnectionError](origin, targets, err); + }); + this[kClients].set(key, { count: 0, dispatcher }); + this[kOrigins].add(key); } - // Array of strings - if (Array.isArray(value)) { - return value.map(val => typeof val === 'string' ? this._truncateToLimitUtil(val, limit) : val); + return dispatcher.dispatch(opts, handler); + } + [kClose]() { + const closePromises = []; + for (const { dispatcher } of this[kClients].values()) { + closePromises.push(dispatcher.close()); } - // Other types, no need to apply value length limit - return value; - } -} -exports.Span = Span; -//# sourceMappingURL=Span.js.map - -/***/ }), - -/***/ 63806: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Tracer = void 0; -const api = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -const Span_1 = __nccwpck_require__(61301); -const utility_1 = __nccwpck_require__(54324); -const platform_1 = __nccwpck_require__(10262); -/** - * This class represents a basic tracer. - */ -class Tracer { - /** - * Constructs a new Tracer instance. - */ - constructor(instrumentationLibrary, config, _tracerProvider) { - this._tracerProvider = _tracerProvider; - const localConfig = (0, utility_1.mergeConfig)(config); - this._sampler = localConfig.sampler; - this._generalLimits = localConfig.generalLimits; - this._spanLimits = localConfig.spanLimits; - this._idGenerator = config.idGenerator || new platform_1.RandomIdGenerator(); - this.resource = _tracerProvider.resource; - this.instrumentationLibrary = instrumentationLibrary; - } - /** - * Starts a new Span or returns the default NoopSpan based on the sampling - * decision. - */ - startSpan(name, options = {}, context = api.context.active()) { - var _a, _b, _c; - // remove span from context in case a root span is requested via options - if (options.root) { - context = api.trace.deleteSpan(context); - } - const parentSpan = api.trace.getSpan(context); - if ((0, core_1.isTracingSuppressed)(context)) { - api.diag.debug('Instrumentation suppressed, returning Noop Span'); - const nonRecordingSpan = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT); - return nonRecordingSpan; - } - const parentSpanContext = parentSpan === null || parentSpan === void 0 ? void 0 : parentSpan.spanContext(); - const spanId = this._idGenerator.generateSpanId(); - let traceId; - let traceState; - let parentSpanId; - if (!parentSpanContext || - !api.trace.isSpanContextValid(parentSpanContext)) { - // New root span. - traceId = this._idGenerator.generateTraceId(); + this[kClients].clear(); + return Promise.all(closePromises); + } + [kDestroy](err) { + const destroyPromises = []; + for (const { dispatcher } of this[kClients].values()) { + destroyPromises.push(dispatcher.destroy(err)); } - else { - // New child span. - traceId = parentSpanContext.traceId; - traceState = parentSpanContext.traceState; - parentSpanId = parentSpanContext.spanId; + this[kClients].clear(); + return Promise.all(destroyPromises); + } + get stats() { + const allClientStats = {}; + for (const { dispatcher } of this[kClients].values()) { + if (dispatcher.stats) { + allClientStats[dispatcher[kUrl].origin] = dispatcher.stats; + } } - const spanKind = (_a = options.kind) !== null && _a !== void 0 ? _a : api.SpanKind.INTERNAL; - const links = ((_b = options.links) !== null && _b !== void 0 ? _b : []).map(link => { - return { - context: link.context, - attributes: (0, core_1.sanitizeAttributes)(link.attributes), - }; - }); - const attributes = (0, core_1.sanitizeAttributes)(options.attributes); - // make sampling decision - const samplingResult = this._sampler.shouldSample(context, traceId, name, spanKind, attributes, links); - traceState = (_c = samplingResult.traceState) !== null && _c !== void 0 ? _c : traceState; - const traceFlags = samplingResult.decision === api.SamplingDecision.RECORD_AND_SAMPLED - ? api.TraceFlags.SAMPLED - : api.TraceFlags.NONE; - const spanContext = { traceId, spanId, traceFlags, traceState }; - if (samplingResult.decision === api.SamplingDecision.NOT_RECORD) { - api.diag.debug('Recording is off, propagating context in a non-recording span'); - const nonRecordingSpan = api.trace.wrapSpanContext(spanContext); - return nonRecordingSpan; - } - // Set initial span attributes. The attributes object may have been mutated - // by the sampler, so we sanitize the merged attributes before setting them. - const initAttributes = (0, core_1.sanitizeAttributes)(Object.assign(attributes, samplingResult.attributes)); - const span = new Span_1.Span(this, context, name, spanContext, spanKind, parentSpanId, links, options.startTime, undefined, initAttributes); - return span; - } - startActiveSpan(name, arg2, arg3, arg4) { - let opts; - let ctx; - let fn; - if (arguments.length < 2) { - return; + return allClientStats; + } + }; + module3.exports = Agent2; + } +}); + +// node_modules/undici/lib/core/socks5-utils.js +var require_socks5_utils = __commonJS({ + "node_modules/undici/lib/core/socks5-utils.js"(exports, module3) { + "use strict"; + var { Buffer: Buffer2 } = __require("node:buffer"); + var net = __require("node:net"); + var { InvalidArgumentError } = require_errors(); + function parseAddress(address) { + if (net.isIPv4(address)) { + const parts = address.split(".").map(Number); + return { + type: 1, + // IPv4 + buffer: Buffer2.from(parts) + }; + } + if (net.isIPv6(address)) { + return { + type: 4, + // IPv6 + buffer: parseIPv6(address) + }; + } + const domainBuffer = Buffer2.from(address, "utf8"); + if (domainBuffer.length > 255) { + throw new InvalidArgumentError("Domain name too long (max 255 bytes)"); + } + return { + type: 3, + // Domain + buffer: Buffer2.concat([Buffer2.from([domainBuffer.length]), domainBuffer]) + }; + } + function parseIPv6(address) { + const buffer = Buffer2.alloc(16); + const parts = address.split(":"); + let partIndex = 0; + let bufferIndex = 0; + const doubleColonIndex = address.indexOf("::"); + if (doubleColonIndex !== -1) { + const nonEmptyParts = parts.filter((p2) => p2.length > 0).length; + const skipParts = 8 - nonEmptyParts; + for (let i2 = 0; i2 < parts.length; i2++) { + if (parts[i2] === "" && i2 === doubleColonIndex / 3) { + bufferIndex += skipParts * 2; + } else if (parts[i2] !== "") { + const value = parseInt(parts[i2], 16); + buffer.writeUInt16BE(value, bufferIndex); + bufferIndex += 2; + } } - else if (arguments.length === 2) { - fn = arg2; + } else { + for (const part of parts) { + if (part === "") continue; + const value = parseInt(part, 16); + buffer.writeUInt16BE(value, partIndex * 2); + partIndex++; + } + } + return buffer; + } + function buildAddressBuffer(type2, addressBuffer, port) { + const portBuffer = Buffer2.allocUnsafe(2); + portBuffer.writeUInt16BE(port, 0); + return Buffer2.concat([ + Buffer2.from([type2]), + addressBuffer, + portBuffer + ]); + } + function parseResponseAddress(buffer, offset = 0) { + if (buffer.length < offset + 1) { + throw new InvalidArgumentError("Buffer too small to contain address type"); + } + const addressType = buffer[offset]; + let address; + let currentOffset = offset + 1; + switch (addressType) { + case 1: { + if (buffer.length < currentOffset + 6) { + throw new InvalidArgumentError("Buffer too small for IPv4 address"); + } + address = Array.from(buffer.subarray(currentOffset, currentOffset + 4)).join("."); + currentOffset += 4; + break; } - else if (arguments.length === 3) { - opts = arg2; - fn = arg3; + case 3: { + if (buffer.length < currentOffset + 1) { + throw new InvalidArgumentError("Buffer too small for domain length"); + } + const domainLength = buffer[currentOffset]; + currentOffset += 1; + if (buffer.length < currentOffset + domainLength + 2) { + throw new InvalidArgumentError("Buffer too small for domain address"); + } + address = buffer.subarray(currentOffset, currentOffset + domainLength).toString("utf8"); + currentOffset += domainLength; + break; } - else { - opts = arg2; - ctx = arg3; - fn = arg4; + case 4: { + if (buffer.length < currentOffset + 18) { + throw new InvalidArgumentError("Buffer too small for IPv6 address"); + } + const parts = []; + for (let i2 = 0; i2 < 8; i2++) { + const value = buffer.readUInt16BE(currentOffset + i2 * 2); + parts.push(value.toString(16)); + } + address = parts.join(":"); + currentOffset += 16; + break; } - const parentContext = ctx !== null && ctx !== void 0 ? ctx : api.context.active(); - const span = this.startSpan(name, opts, parentContext); - const contextWithSpanSet = api.trace.setSpan(parentContext, span); - return api.context.with(contextWithSpanSet, fn, undefined, span); - } - /** Returns the active {@link GeneralLimits}. */ - getGeneralLimits() { - return this._generalLimits; - } - /** Returns the active {@link SpanLimits}. */ - getSpanLimits() { - return this._spanLimits; - } - getActiveSpanProcessor() { - return this._tracerProvider.getActiveSpanProcessor(); - } -} -exports.Tracer = Tracer; -//# sourceMappingURL=Tracer.js.map - -/***/ }), - -/***/ 91: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.buildSamplerFromEnv = exports.loadDefaultConfig = void 0; -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -const AlwaysOffSampler_1 = __nccwpck_require__(68118); -const AlwaysOnSampler_1 = __nccwpck_require__(13032); -const ParentBasedSampler_1 = __nccwpck_require__(58070); -const TraceIdRatioBasedSampler_1 = __nccwpck_require__(16712); -const env = (0, core_1.getEnv)(); -const FALLBACK_OTEL_TRACES_SAMPLER = core_1.TracesSamplerValues.AlwaysOn; -const DEFAULT_RATIO = 1; -/** - * Load default configuration. For fields with primitive values, any user-provided - * value will override the corresponding default value. For fields with - * non-primitive values (like `spanLimits`), the user-provided value will be - * used to extend the default value. - */ -// object needs to be wrapped in this function and called when needed otherwise -// envs are parsed before tests are ran - causes tests using these envs to fail -function loadDefaultConfig() { - const _env = (0, core_1.getEnv)(); - return { - sampler: buildSamplerFromEnv(env), - forceFlushTimeoutMillis: 30000, - generalLimits: { - attributeValueLengthLimit: _env.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT, - attributeCountLimit: _env.OTEL_ATTRIBUTE_COUNT_LIMIT, - }, - spanLimits: { - attributeValueLengthLimit: _env.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT, - attributeCountLimit: _env.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, - linkCountLimit: _env.OTEL_SPAN_LINK_COUNT_LIMIT, - eventCountLimit: _env.OTEL_SPAN_EVENT_COUNT_LIMIT, - attributePerEventCountLimit: _env.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT, - attributePerLinkCountLimit: _env.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT, - }, - }; -} -exports.loadDefaultConfig = loadDefaultConfig; -/** - * Based on environment, builds a sampler, complies with specification. - * @param environment optional, by default uses getEnv(), but allows passing a value to reuse parsed environment - */ -function buildSamplerFromEnv(environment = (0, core_1.getEnv)()) { - switch (environment.OTEL_TRACES_SAMPLER) { - case core_1.TracesSamplerValues.AlwaysOn: - return new AlwaysOnSampler_1.AlwaysOnSampler(); - case core_1.TracesSamplerValues.AlwaysOff: - return new AlwaysOffSampler_1.AlwaysOffSampler(); - case core_1.TracesSamplerValues.ParentBasedAlwaysOn: - return new ParentBasedSampler_1.ParentBasedSampler({ - root: new AlwaysOnSampler_1.AlwaysOnSampler(), - }); - case core_1.TracesSamplerValues.ParentBasedAlwaysOff: - return new ParentBasedSampler_1.ParentBasedSampler({ - root: new AlwaysOffSampler_1.AlwaysOffSampler(), - }); - case core_1.TracesSamplerValues.TraceIdRatio: - return new TraceIdRatioBasedSampler_1.TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv(environment)); - case core_1.TracesSamplerValues.ParentBasedTraceIdRatio: - return new ParentBasedSampler_1.ParentBasedSampler({ - root: new TraceIdRatioBasedSampler_1.TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv(environment)), - }); default: - api_1.diag.error(`OTEL_TRACES_SAMPLER value "${environment.OTEL_TRACES_SAMPLER} invalid, defaulting to ${FALLBACK_OTEL_TRACES_SAMPLER}".`); - return new AlwaysOnSampler_1.AlwaysOnSampler(); - } -} -exports.buildSamplerFromEnv = buildSamplerFromEnv; -function getSamplerProbabilityFromEnv(environment) { - if (environment.OTEL_TRACES_SAMPLER_ARG === undefined || - environment.OTEL_TRACES_SAMPLER_ARG === '') { - api_1.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${DEFAULT_RATIO}.`); - return DEFAULT_RATIO; - } - const probability = Number(environment.OTEL_TRACES_SAMPLER_ARG); - if (isNaN(probability)) { - api_1.diag.error(`OTEL_TRACES_SAMPLER_ARG=${environment.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${DEFAULT_RATIO}.`); - return DEFAULT_RATIO; - } - if (probability < 0 || probability > 1) { - api_1.diag.error(`OTEL_TRACES_SAMPLER_ARG=${environment.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${DEFAULT_RATIO}.`); - return DEFAULT_RATIO; - } - return probability; -} -//# sourceMappingURL=config.js.map - -/***/ }), - -/***/ 35092: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExceptionEventName = void 0; -// Event name definitions -exports.ExceptionEventName = 'exception'; -//# sourceMappingURL=enums.js.map - -/***/ }), - -/***/ 69727: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BatchSpanProcessorBase = void 0; -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -/** - * Implementation of the {@link SpanProcessor} that batches spans exported by - * the SDK then pushes them to the exporter pipeline. - */ -class BatchSpanProcessorBase { - constructor(_exporter, config) { - this._exporter = _exporter; - this._isExporting = false; - this._finishedSpans = []; - this._droppedSpansCount = 0; - const env = (0, core_1.getEnv)(); - this._maxExportBatchSize = - typeof (config === null || config === void 0 ? void 0 : config.maxExportBatchSize) === 'number' - ? config.maxExportBatchSize - : env.OTEL_BSP_MAX_EXPORT_BATCH_SIZE; - this._maxQueueSize = - typeof (config === null || config === void 0 ? void 0 : config.maxQueueSize) === 'number' - ? config.maxQueueSize - : env.OTEL_BSP_MAX_QUEUE_SIZE; - this._scheduledDelayMillis = - typeof (config === null || config === void 0 ? void 0 : config.scheduledDelayMillis) === 'number' - ? config.scheduledDelayMillis - : env.OTEL_BSP_SCHEDULE_DELAY; - this._exportTimeoutMillis = - typeof (config === null || config === void 0 ? void 0 : config.exportTimeoutMillis) === 'number' - ? config.exportTimeoutMillis - : env.OTEL_BSP_EXPORT_TIMEOUT; - this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this); - if (this._maxExportBatchSize > this._maxQueueSize) { - api_1.diag.warn('BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize'); - this._maxExportBatchSize = this._maxQueueSize; - } - } - forceFlush() { - if (this._shutdownOnce.isCalled) { - return this._shutdownOnce.promise; - } - return this._flushAll(); - } - // does nothing. - onStart(_span, _parentContext) { } - onEnd(span) { - if (this._shutdownOnce.isCalled) { - return; + throw new InvalidArgumentError(`Invalid address type: ${addressType}`); + } + if (buffer.length < currentOffset + 2) { + throw new InvalidArgumentError("Buffer too small for port"); + } + const port = buffer.readUInt16BE(currentOffset); + currentOffset += 2; + return { + address, + port, + bytesRead: currentOffset - offset + }; + } + function createReplyError(replyCode) { + const messages = { + 1: "General SOCKS server failure", + 2: "Connection not allowed by ruleset", + 3: "Network unreachable", + 4: "Host unreachable", + 5: "Connection refused", + 6: "TTL expired", + 7: "Command not supported", + 8: "Address type not supported" + }; + const message = messages[replyCode] || `Unknown SOCKS5 error code: ${replyCode}`; + const error2 = new Error(message); + error2.code = `SOCKS5_${replyCode}`; + return error2; + } + module3.exports = { + parseAddress, + parseIPv6, + buildAddressBuffer, + parseResponseAddress, + createReplyError + }; + } +}); + +// node_modules/undici/lib/core/socks5-client.js +var require_socks5_client = __commonJS({ + "node_modules/undici/lib/core/socks5-client.js"(exports, module3) { + "use strict"; + var { EventEmitter } = __require("node:events"); + var { Buffer: Buffer2 } = __require("node:buffer"); + var { InvalidArgumentError, Socks5ProxyError } = require_errors(); + var { debuglog } = __require("node:util"); + var { parseAddress } = require_socks5_utils(); + var debug = debuglog("undici:socks5"); + var SOCKS_VERSION = 5; + var AUTH_METHODS = { + NO_AUTH: 0, + GSSAPI: 1, + USERNAME_PASSWORD: 2, + NO_ACCEPTABLE: 255 + }; + var COMMANDS = { + CONNECT: 1, + BIND: 2, + UDP_ASSOCIATE: 3 + }; + var ADDRESS_TYPES = { + IPV4: 1, + DOMAIN: 3, + IPV6: 4 + }; + var REPLY_CODES = { + SUCCEEDED: 0, + GENERAL_FAILURE: 1, + CONNECTION_NOT_ALLOWED: 2, + NETWORK_UNREACHABLE: 3, + HOST_UNREACHABLE: 4, + CONNECTION_REFUSED: 5, + TTL_EXPIRED: 6, + COMMAND_NOT_SUPPORTED: 7, + ADDRESS_TYPE_NOT_SUPPORTED: 8 + }; + var STATES = { + INITIAL: "initial", + HANDSHAKING: "handshaking", + AUTHENTICATING: "authenticating", + CONNECTING: "connecting", + CONNECTED: "connected", + ERROR: "error", + CLOSED: "closed" + }; + var Socks5Client = class extends EventEmitter { + constructor(socket, options2 = {}) { + super(); + if (!socket) { + throw new InvalidArgumentError("socket is required"); } - if ((span.spanContext().traceFlags & api_1.TraceFlags.SAMPLED) === 0) { - return; + this.socket = socket; + this.options = options2; + this.state = STATES.INITIAL; + this.buffer = Buffer2.alloc(0); + this.authMethods = []; + if (options2.username && options2.password) { + this.authMethods.push(AUTH_METHODS.USERNAME_PASSWORD); } - this._addToBuffer(span); - } - shutdown() { - return this._shutdownOnce.call(); - } - _shutdown() { - return Promise.resolve() - .then(() => { - return this.onShutdown(); - }) - .then(() => { - return this._flushAll(); - }) - .then(() => { - return this._exporter.shutdown(); + this.authMethods.push(AUTH_METHODS.NO_AUTH); + this.socket.on("data", this.onData.bind(this)); + this.socket.on("error", this.onError.bind(this)); + this.socket.on("close", this.onClose.bind(this)); + } + /** + * Handle incoming data from the socket + */ + onData(data) { + debug("received data", data.length, "bytes in state", this.state); + this.buffer = Buffer2.concat([this.buffer, data]); + try { + switch (this.state) { + case STATES.HANDSHAKING: + this.handleHandshakeResponse(); + break; + case STATES.AUTHENTICATING: + this.handleAuthResponse(); + break; + case STATES.CONNECTING: + this.handleConnectResponse(); + break; + } + } catch (err) { + this.onError(err); + } + } + /** + * Handle socket errors + */ + onError(err) { + debug("socket error", err); + this.state = STATES.ERROR; + this.emit("error", err); + this.destroy(); + } + /** + * Handle socket close + */ + onClose() { + debug("socket closed"); + this.state = STATES.CLOSED; + this.emit("close"); + } + /** + * Destroy the client and underlying socket + */ + destroy() { + if (this.socket && !this.socket.destroyed) { + this.socket.destroy(); + } + } + /** + * Start the SOCKS5 handshake + */ + handshake() { + if (this.state !== STATES.INITIAL) { + throw new InvalidArgumentError("Handshake already started"); + } + debug("starting handshake with", this.authMethods.length, "auth methods"); + this.state = STATES.HANDSHAKING; + const request = Buffer2.alloc(2 + this.authMethods.length); + request[0] = SOCKS_VERSION; + request[1] = this.authMethods.length; + this.authMethods.forEach((method, i2) => { + request[2 + i2] = method; }); - } - /** Add a span in the buffer. */ - _addToBuffer(span) { - if (this._finishedSpans.length >= this._maxQueueSize) { - // limit reached, drop span - if (this._droppedSpansCount === 0) { - api_1.diag.debug('maxQueueSize reached, dropping spans'); - } - this._droppedSpansCount++; + this.socket.write(request); + } + /** + * Handle handshake response from server + */ + handleHandshakeResponse() { + if (this.buffer.length < 2) { + return; + } + const version2 = this.buffer[0]; + const method = this.buffer[1]; + if (version2 !== SOCKS_VERSION) { + throw new Socks5ProxyError(`Invalid SOCKS version: ${version2}`, "UND_ERR_SOCKS5_VERSION"); + } + if (method === AUTH_METHODS.NO_ACCEPTABLE) { + throw new Socks5ProxyError("No acceptable authentication method", "UND_ERR_SOCKS5_AUTH_REJECTED"); + } + this.buffer = this.buffer.subarray(2); + debug("server selected auth method", method); + if (method === AUTH_METHODS.NO_AUTH) { + this.emit("authenticated"); + } else if (method === AUTH_METHODS.USERNAME_PASSWORD) { + this.state = STATES.AUTHENTICATING; + this.sendAuthRequest(); + } else { + throw new Socks5ProxyError(`Unsupported authentication method: ${method}`, "UND_ERR_SOCKS5_AUTH_METHOD"); + } + } + /** + * Send username/password authentication request + */ + sendAuthRequest() { + const { username, password } = this.options; + if (!username || !password) { + throw new InvalidArgumentError("Username and password required for authentication"); + } + debug("sending username/password auth"); + const usernameBuffer = Buffer2.from(username); + const passwordBuffer = Buffer2.from(password); + if (usernameBuffer.length > 255 || passwordBuffer.length > 255) { + throw new InvalidArgumentError("Username or password too long"); + } + const request = Buffer2.alloc(3 + usernameBuffer.length + passwordBuffer.length); + request[0] = 1; + request[1] = usernameBuffer.length; + usernameBuffer.copy(request, 2); + request[2 + usernameBuffer.length] = passwordBuffer.length; + passwordBuffer.copy(request, 3 + usernameBuffer.length); + this.socket.write(request); + } + /** + * Handle authentication response + */ + handleAuthResponse() { + if (this.buffer.length < 2) { + return; + } + const version2 = this.buffer[0]; + const status = this.buffer[1]; + if (version2 !== 1) { + throw new Socks5ProxyError(`Invalid auth sub-negotiation version: ${version2}`, "UND_ERR_SOCKS5_AUTH_VERSION"); + } + if (status !== 0) { + throw new Socks5ProxyError("Authentication failed", "UND_ERR_SOCKS5_AUTH_FAILED"); + } + this.buffer = this.buffer.subarray(2); + debug("authentication successful"); + this.emit("authenticated"); + } + /** + * Send CONNECT command + * @param {string} address - Target address (IP or domain) + * @param {number} port - Target port + */ + connect(address, port) { + if (this.state === STATES.CONNECTED) { + throw new InvalidArgumentError("Already connected"); + } + debug("connecting to", address, port); + this.state = STATES.CONNECTING; + const request = this.buildConnectRequest(COMMANDS.CONNECT, address, port); + this.socket.write(request); + } + /** + * Build a SOCKS5 request + */ + buildConnectRequest(command, address, port) { + const { type: addressType, buffer: addressBuffer } = parseAddress(address); + const request = Buffer2.alloc(4 + addressBuffer.length + 2); + request[0] = SOCKS_VERSION; + request[1] = command; + request[2] = 0; + request[3] = addressType; + addressBuffer.copy(request, 4); + request.writeUInt16BE(port, 4 + addressBuffer.length); + return request; + } + /** + * Handle CONNECT response + */ + handleConnectResponse() { + if (this.buffer.length < 4) { + return; + } + const version2 = this.buffer[0]; + const reply = this.buffer[1]; + const addressType = this.buffer[3]; + if (version2 !== SOCKS_VERSION) { + throw new Socks5ProxyError(`Invalid SOCKS version in reply: ${version2}`, "UND_ERR_SOCKS5_REPLY_VERSION"); + } + let responseLength = 4; + if (addressType === ADDRESS_TYPES.IPV4) { + responseLength += 4 + 2; + } else if (addressType === ADDRESS_TYPES.DOMAIN) { + if (this.buffer.length < 5) { return; + } + responseLength += 1 + this.buffer[4] + 2; + } else if (addressType === ADDRESS_TYPES.IPV6) { + responseLength += 16 + 2; + } else { + throw new Socks5ProxyError(`Invalid address type in reply: ${addressType}`, "UND_ERR_SOCKS5_ADDR_TYPE"); } - if (this._droppedSpansCount > 0) { - // some spans were dropped, log once with count of spans dropped - api_1.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`); - this._droppedSpansCount = 0; - } - this._finishedSpans.push(span); - this._maybeStartTimer(); - } - /** - * Send all spans to the exporter respecting the batch size limit - * This function is used only on forceFlush or shutdown, - * for all other cases _flush should be used - * */ - _flushAll() { - return new Promise((resolve, reject) => { - const promises = []; - // calculate number of batches - const count = Math.ceil(this._finishedSpans.length / this._maxExportBatchSize); - for (let i = 0, j = count; i < j; i++) { - promises.push(this._flushOneBatch()); - } - Promise.all(promises) - .then(() => { - resolve(); - }) - .catch(reject); + if (this.buffer.length < responseLength) { + return; + } + if (reply !== REPLY_CODES.SUCCEEDED) { + const errorMessage = this.getReplyErrorMessage(reply); + throw new Socks5ProxyError(`SOCKS5 connection failed: ${errorMessage}`, `UND_ERR_SOCKS5_REPLY_${reply}`); + } + let boundAddress; + let offset = 4; + if (addressType === ADDRESS_TYPES.IPV4) { + boundAddress = Array.from(this.buffer.subarray(offset, offset + 4)).join("."); + offset += 4; + } else if (addressType === ADDRESS_TYPES.DOMAIN) { + const domainLength = this.buffer[offset]; + offset += 1; + boundAddress = this.buffer.subarray(offset, offset + domainLength).toString(); + offset += domainLength; + } else if (addressType === ADDRESS_TYPES.IPV6) { + const parts = []; + for (let i2 = 0; i2 < 8; i2++) { + const value = this.buffer.readUInt16BE(offset + i2 * 2); + parts.push(value.toString(16)); + } + boundAddress = parts.join(":"); + offset += 16; + } + const boundPort = this.buffer.readUInt16BE(offset); + this.buffer = this.buffer.subarray(responseLength); + this.state = STATES.CONNECTED; + debug("connected, bound address:", boundAddress, "port:", boundPort); + this.emit("connected", { address: boundAddress, port: boundPort }); + } + /** + * Get human-readable error message for reply code + */ + getReplyErrorMessage(reply) { + switch (reply) { + case REPLY_CODES.GENERAL_FAILURE: + return "General SOCKS server failure"; + case REPLY_CODES.CONNECTION_NOT_ALLOWED: + return "Connection not allowed by ruleset"; + case REPLY_CODES.NETWORK_UNREACHABLE: + return "Network unreachable"; + case REPLY_CODES.HOST_UNREACHABLE: + return "Host unreachable"; + case REPLY_CODES.CONNECTION_REFUSED: + return "Connection refused"; + case REPLY_CODES.TTL_EXPIRED: + return "TTL expired"; + case REPLY_CODES.COMMAND_NOT_SUPPORTED: + return "Command not supported"; + case REPLY_CODES.ADDRESS_TYPE_NOT_SUPPORTED: + return "Address type not supported"; + default: + return `Unknown error code: ${reply}`; + } + } + }; + module3.exports = { + Socks5Client, + AUTH_METHODS, + COMMANDS, + ADDRESS_TYPES, + REPLY_CODES, + STATES + }; + } +}); + +// node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +var require_socks5_proxy_agent = __commonJS({ + "node_modules/undici/lib/dispatcher/socks5-proxy-agent.js"(exports, module3) { + "use strict"; + var net = __require("node:net"); + var { URL: URL2 } = __require("node:url"); + var tls; + var DispatcherBase = require_dispatcher_base(); + var { InvalidArgumentError } = require_errors(); + var { Socks5Client } = require_socks5_client(); + var { kDispatch, kClose, kDestroy } = require_symbols(); + var Pool = require_pool(); + var buildConnector = require_connect(); + var { debuglog } = __require("node:util"); + var debug = debuglog("undici:socks5-proxy"); + var kProxyUrl = /* @__PURE__ */ Symbol("proxy url"); + var kProxyHeaders = /* @__PURE__ */ Symbol("proxy headers"); + var kProxyAuth = /* @__PURE__ */ Symbol("proxy auth"); + var kPool = /* @__PURE__ */ Symbol("pool"); + var kConnector = /* @__PURE__ */ Symbol("connector"); + var experimentalWarningEmitted = false; + var Socks5ProxyAgent = class extends DispatcherBase { + constructor(proxyUrl, options2 = {}) { + super(); + if (!experimentalWarningEmitted) { + process.emitWarning( + "SOCKS5 proxy support is experimental and subject to change", + "ExperimentalWarning" + ); + experimentalWarningEmitted = true; + } + if (!proxyUrl) { + throw new InvalidArgumentError("Proxy URL is mandatory"); + } + const url3 = typeof proxyUrl === "string" ? new URL2(proxyUrl) : proxyUrl; + if (url3.protocol !== "socks5:" && url3.protocol !== "socks:") { + throw new InvalidArgumentError("Proxy URL must use socks5:// or socks:// protocol"); + } + this[kProxyUrl] = url3; + this[kProxyHeaders] = options2.headers || {}; + this[kProxyAuth] = { + username: options2.username || (url3.username ? decodeURIComponent(url3.username) : null), + password: options2.password || (url3.password ? decodeURIComponent(url3.password) : null) + }; + this[kConnector] = options2.connect || buildConnector({ + ...options2.proxyTls, + servername: options2.proxyTls?.servername || url3.hostname }); - } - _flushOneBatch() { - this._clearTimer(); - if (this._finishedSpans.length === 0) { - return Promise.resolve(); - } - return new Promise((resolve, reject) => { - const timer = setTimeout(() => { - // don't wait anymore for export, this way the next batch can start - reject(new Error('Timeout')); - }, this._exportTimeoutMillis); - // prevent downstream exporter calls from generating spans - api_1.context.with((0, core_1.suppressTracing)(api_1.context.active()), () => { - // Reset the finished spans buffer here because the next invocations of the _flush method - // could pass the same finished spans to the exporter if the buffer is cleared - // outside the execution of this callback. - let spans; - if (this._finishedSpans.length <= this._maxExportBatchSize) { - spans = this._finishedSpans; - this._finishedSpans = []; - } - else { - spans = this._finishedSpans.splice(0, this._maxExportBatchSize); - } - const doExport = () => this._exporter.export(spans, result => { - var _a; - clearTimeout(timer); - if (result.code === core_1.ExportResultCode.SUCCESS) { - resolve(); - } - else { - reject((_a = result.error) !== null && _a !== void 0 ? _a : new Error('BatchSpanProcessor: span export failed')); - } - }); - let pendingResources = null; - for (let i = 0, len = spans.length; i < len; i++) { - const span = spans[i]; - if (span.resource.asyncAttributesPending && - span.resource.waitForAsyncAttributes) { - pendingResources !== null && pendingResources !== void 0 ? pendingResources : (pendingResources = []); - pendingResources.push(span.resource.waitForAsyncAttributes()); + this[kPool] = null; + } + /** + * Create a SOCKS5 connection to the proxy + */ + async createSocks5Connection(targetHost, targetPort) { + const proxyHost = this[kProxyUrl].hostname; + const proxyPort = parseInt(this[kProxyUrl].port) || 1080; + debug("creating SOCKS5 connection to", proxyHost, proxyPort); + const socket = await new Promise((resolve8, reject) => { + const onConnect = () => { + socket2.removeListener("error", onError); + resolve8(socket2); + }; + const onError = (err) => { + socket2.removeListener("connect", onConnect); + reject(err); + }; + const socket2 = net.connect({ + host: proxyHost, + port: proxyPort + }); + socket2.once("connect", onConnect); + socket2.once("error", onError); + }); + const socks5Client = new Socks5Client(socket, this[kProxyAuth]); + socks5Client.on("error", (err) => { + debug("SOCKS5 error:", err); + socket.destroy(); + }); + await socks5Client.handshake(); + await new Promise((resolve8, reject) => { + const timeout = setTimeout(() => { + reject(new Error("SOCKS5 authentication timeout")); + }, 5e3); + const onAuthenticated = () => { + clearTimeout(timeout); + socks5Client.removeListener("error", onError); + resolve8(); + }; + const onError = (err) => { + clearTimeout(timeout); + socks5Client.removeListener("authenticated", onAuthenticated); + reject(err); + }; + if (socks5Client.state === "authenticated") { + clearTimeout(timeout); + resolve8(); + } else { + socks5Client.once("authenticated", onAuthenticated); + socks5Client.once("error", onError); + } + }); + await socks5Client.connect(targetHost, targetPort); + await new Promise((resolve8, reject) => { + const timeout = setTimeout(() => { + reject(new Error("SOCKS5 connection timeout")); + }, 5e3); + const onConnected = (info) => { + debug("SOCKS5 tunnel established to", targetHost, targetPort, "via", info); + clearTimeout(timeout); + socks5Client.removeListener("error", onError); + resolve8(); + }; + const onError = (err) => { + clearTimeout(timeout); + socks5Client.removeListener("connected", onConnected); + reject(err); + }; + socks5Client.once("connected", onConnected); + socks5Client.once("error", onError); + }); + return socket; + } + /** + * Dispatch a request through the SOCKS5 proxy + */ + async [kDispatch](opts, handler) { + const { origin } = opts; + debug("dispatching request to", origin, "via SOCKS5"); + try { + if (!this[kPool] || this[kPool].destroyed || this[kPool].closed) { + this[kPool] = new Pool(origin, { + pipelining: opts.pipelining, + connections: opts.connections, + connect: async (connectOpts, callback) => { + try { + const url3 = new URL2(origin); + const targetHost = url3.hostname; + const targetPort = parseInt(url3.port) || (url3.protocol === "https:" ? 443 : 80); + debug("establishing SOCKS5 connection to", targetHost, targetPort); + const socket = await this.createSocks5Connection(targetHost, targetPort); + let finalSocket = socket; + if (url3.protocol === "https:") { + if (!tls) { + tls = __require("node:tls"); } - } - // Avoid scheduling a promise to make the behavior more predictable and easier to test - if (pendingResources === null) { - doExport(); - } - else { - Promise.all(pendingResources).then(doExport, err => { - (0, core_1.globalErrorHandler)(err); - reject(err); + debug("upgrading to TLS"); + finalSocket = tls.connect({ + socket, + servername: targetHost, + ...connectOpts.tls || {} }); + await new Promise((resolve8, reject) => { + finalSocket.once("secureConnect", resolve8); + finalSocket.once("error", reject); + }); + } + callback(null, finalSocket); + } catch (err) { + debug("SOCKS5 connection error:", err); + callback(err); } + } }); - }); - } - _maybeStartTimer() { - if (this._isExporting) - return; - const flush = () => { - this._isExporting = true; - this._flushOneBatch() - .finally(() => { - this._isExporting = false; - if (this._finishedSpans.length > 0) { - this._clearTimer(); - this._maybeStartTimer(); - } - }) - .catch(e => { - this._isExporting = false; - (0, core_1.globalErrorHandler)(e); - }); - }; - // we only wait if the queue doesn't have enough elements yet - if (this._finishedSpans.length >= this._maxExportBatchSize) { - return flush(); + } + return this[kPool][kDispatch](opts, handler); + } catch (err) { + debug("dispatch error:", err); + if (typeof handler.onError === "function") { + handler.onError(err); + } else { + throw err; + } } - if (this._timer !== undefined) - return; - this._timer = setTimeout(() => flush(), this._scheduledDelayMillis); - (0, core_1.unrefTimer)(this._timer); - } - _clearTimer() { - if (this._timer !== undefined) { - clearTimeout(this._timer); - this._timer = undefined; + } + async [kClose]() { + if (this[kPool]) { + await this[kPool].close(); } + } + async [kDestroy](err) { + if (this[kPool]) { + await this[kPool].destroy(err); + } + } + }; + module3.exports = Socks5ProxyAgent; + } +}); + +// node_modules/undici/lib/dispatcher/proxy-agent.js +var require_proxy_agent = __commonJS({ + "node_modules/undici/lib/dispatcher/proxy-agent.js"(exports, module3) { + "use strict"; + var { kProxy, kClose, kDestroy, kDispatch } = require_symbols(); + var Agent2 = require_agent(); + var Pool = require_pool(); + var DispatcherBase = require_dispatcher_base(); + var { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors(); + var buildConnector = require_connect(); + var Client = require_client(); + var { channels } = require_diagnostics(); + var Socks5ProxyAgent = require_socks5_proxy_agent(); + var kAgent = /* @__PURE__ */ Symbol("proxy agent"); + var kClient = /* @__PURE__ */ Symbol("proxy client"); + var kProxyHeaders = /* @__PURE__ */ Symbol("proxy headers"); + var kRequestTls = /* @__PURE__ */ Symbol("request tls settings"); + var kProxyTls = /* @__PURE__ */ Symbol("proxy tls settings"); + var kConnectEndpoint = /* @__PURE__ */ Symbol("connect endpoint function"); + var kTunnelProxy = /* @__PURE__ */ Symbol("tunnel proxy"); + function defaultProtocolPort(protocol) { + return protocol === "https:" ? 443 : 80; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + var noop = () => { + }; + function defaultAgentFactory(origin, opts) { + if (opts.connections === 1) { + return new Client(origin, opts); + } + return new Pool(origin, opts); } -} -exports.BatchSpanProcessorBase = BatchSpanProcessorBase; -//# sourceMappingURL=BatchSpanProcessorBase.js.map - -/***/ }), - -/***/ 36784: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ConsoleSpanExporter = void 0; -const core_1 = __nccwpck_require__(89736); -/** - * This is implementation of {@link SpanExporter} that prints spans to the - * console. This class can be used for diagnostic purposes. - * - * NOTE: This {@link SpanExporter} is intended for diagnostics use only, output rendered to the console may change at any time. - */ -/* eslint-disable no-console */ -class ConsoleSpanExporter { - /** - * Export spans. - * @param spans - * @param resultCallback - */ - export(spans, resultCallback) { - return this._sendSpans(spans, resultCallback); - } - /** - * Shutdown the exporter. - */ - shutdown() { - this._sendSpans([]); - return this.forceFlush(); - } - /** - * Exports any pending spans in exporter - */ - forceFlush() { - return Promise.resolve(); - } - /** - * converts span info into more readable format - * @param span - */ - _exportInfo(span) { - var _a; - return { - resource: { - attributes: span.resource.attributes, - }, - instrumentationScope: span.instrumentationLibrary, - traceId: span.spanContext().traceId, - parentId: span.parentSpanId, - traceState: (_a = span.spanContext().traceState) === null || _a === void 0 ? void 0 : _a.serialize(), - name: span.name, - id: span.spanContext().spanId, - kind: span.kind, - timestamp: (0, core_1.hrTimeToMicroseconds)(span.startTime), - duration: (0, core_1.hrTimeToMicroseconds)(span.duration), - attributes: span.attributes, - status: span.status, - events: span.events, - links: span.links, - }; - } - /** - * Showing spans in console - * @param spans - * @param done - */ - _sendSpans(spans, done) { - for (const span of spans) { - console.dir(this._exportInfo(span), { depth: 3 }); + var Http1ProxyWrapper = class extends DispatcherBase { + #client; + constructor(proxyUrl, { headers = {}, connect, factory }) { + if (!proxyUrl) { + throw new InvalidArgumentError("Proxy URL is mandatory"); } - if (done) { - return done({ code: core_1.ExportResultCode.SUCCESS }); + super(); + this[kProxyHeaders] = headers; + if (factory) { + this.#client = factory(proxyUrl, { connect }); + } else { + this.#client = new Client(proxyUrl, { connect }); } - } -} -exports.ConsoleSpanExporter = ConsoleSpanExporter; -//# sourceMappingURL=ConsoleSpanExporter.js.map - -/***/ }), - -/***/ 24093: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.InMemorySpanExporter = void 0; -const core_1 = __nccwpck_require__(89736); -/** - * This class can be used for testing purposes. It stores the exported spans - * in a list in memory that can be retrieved using the `getFinishedSpans()` - * method. - */ -class InMemorySpanExporter { - constructor() { - this._finishedSpans = []; - /** - * Indicates if the exporter has been "shutdown." - * When false, exported spans will not be stored in-memory. - */ - this._stopped = false; - } - export(spans, resultCallback) { - if (this._stopped) - return resultCallback({ - code: core_1.ExportResultCode.FAILED, - error: new Error('Exporter has been stopped'), - }); - this._finishedSpans.push(...spans); - setTimeout(() => resultCallback({ code: core_1.ExportResultCode.SUCCESS }), 0); - } - shutdown() { - this._stopped = true; - this._finishedSpans = []; - return this.forceFlush(); - } - /** - * Exports any pending spans in the exporter - */ - forceFlush() { - return Promise.resolve(); - } - reset() { - this._finishedSpans = []; - } - getFinishedSpans() { - return this._finishedSpans; - } -} -exports.InMemorySpanExporter = InMemorySpanExporter; -//# sourceMappingURL=InMemorySpanExporter.js.map - -/***/ }), - -/***/ 69252: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoopSpanProcessor = void 0; -/** No-op implementation of SpanProcessor */ -class NoopSpanProcessor { - onStart(_span, _context) { } - onEnd(_span) { } - shutdown() { - return Promise.resolve(); - } - forceFlush() { - return Promise.resolve(); - } -} -exports.NoopSpanProcessor = NoopSpanProcessor; -//# sourceMappingURL=NoopSpanProcessor.js.map - -/***/ }), - -/***/ 89802: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SimpleSpanProcessor = void 0; -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -/** - * An implementation of the {@link SpanProcessor} that converts the {@link Span} - * to {@link ReadableSpan} and passes it to the configured exporter. - * - * Only spans that are sampled are converted. - * - * NOTE: This {@link SpanProcessor} exports every ended span individually instead of batching spans together, which causes significant performance overhead with most exporters. For production use, please consider using the {@link BatchSpanProcessor} instead. - */ -class SimpleSpanProcessor { - constructor(_exporter) { - this._exporter = _exporter; - this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this); - this._unresolvedExports = new Set(); - } - async forceFlush() { - // await unresolved resources before resolving - await Promise.all(Array.from(this._unresolvedExports)); - if (this._exporter.forceFlush) { - await this._exporter.forceFlush(); - } - } - onStart(_span, _parentContext) { } - onEnd(span) { - var _a, _b; - if (this._shutdownOnce.isCalled) { + } + [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: path13 = "/", + headers = {} + } = opts; + opts.path = origin + path13; + if (!("host" in headers) && !("Host" in headers)) { + const { host } = new URL(origin); + headers.host = host; } - if ((span.spanContext().traceFlags & api_1.TraceFlags.SAMPLED) === 0) { - return; + opts.headers = { ...this[kProxyHeaders], ...headers }; + return this.#client[kDispatch](opts, handler); + } + [kClose]() { + return this.#client.close(); + } + [kDestroy](err) { + return this.#client.destroy(err); + } + }; + var ProxyAgent2 = class extends DispatcherBase { + constructor(opts) { + 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; + super(); + const url3 = this.#getUrl(opts); + const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url3; + this[kProxy] = { uri: href, protocol }; + 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 = (origin2, options2) => { + const { protocol: protocol2 } = new URL(origin2); + if (this[kProxy].protocol === "socks5:" || this[kProxy].protocol === "socks:") { + return new Socks5ProxyAgent(this[kProxy].uri, { + headers: this[kProxyHeaders], + connect, + factory: agentFactory, + username: opts.username || username, + password: opts.password || password, + proxyTls: opts.proxyTls + }); + } + if (!this[kTunnelProxy] && protocol2 === "http:" && this[kProxy].protocol === "http:") { + return new Http1ProxyWrapper(this[kProxy].uri, { + headers: this[kProxyHeaders], + connect, + factory: agentFactory + }); + } + return agentFactory(origin2, options2); + }; + if (protocol === "socks5:" || protocol === "socks:") { + this[kClient] = null; + } else { + this[kClient] = clientFactory(url3, { connect }); } - const doExport = () => core_1.internal - ._export(this._exporter, [span]) - .then((result) => { - var _a; - if (result.code !== core_1.ExportResultCode.SUCCESS) { - (0, core_1.globalErrorHandler)((_a = result.error) !== null && _a !== void 0 ? _a : new Error(`SimpleSpanProcessor: span export failed (status ${result})`)); + this[kAgent] = new Agent2({ + ...opts, + factory, + connect: async (opts2, callback) => { + if (!this[kClient]) { + callback(new InvalidArgumentError("Cannot establish tunnel connection without a proxy client")); + return; } - }) - .catch(error => { - (0, core_1.globalErrorHandler)(error); - }); - // Avoid scheduling a promise to make the behavior more predictable and easier to test - if (span.resource.asyncAttributesPending) { - const exportPromise = (_b = (_a = span.resource).waitForAsyncAttributes) === null || _b === void 0 ? void 0 : _b.call(_a).then(() => { - if (exportPromise != null) { - this._unresolvedExports.delete(exportPromise); - } - return doExport(); - }, err => (0, core_1.globalErrorHandler)(err)); - // store the unresolved exports - if (exportPromise != null) { - this._unresolvedExports.add(exportPromise); + let requestedPath = opts2.host; + if (!opts2.port) { + requestedPath += `:${defaultProtocolPort(opts2.protocol)}`; + } + try { + const connectParams = { + origin, + port, + path: requestedPath, + signal: opts2.signal, + headers: { + ...this[kProxyHeaders], + host: opts2.host, + ...opts2.connections == null || opts2.connections > 0 ? { "proxy-connection": "keep-alive" } : {} + }, + servername: this[kProxyTls]?.servername || proxyHostname + }; + const { socket, statusCode } = await this[kClient].connect(connectParams); + if (statusCode !== 200) { + socket.on("error", noop).destroy(); + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); + return; + } + if (channels.proxyConnected.hasSubscribers) { + channels.proxyConnected.publish({ + socket, + connectParams + }); + } + if (opts2.protocol !== "https:") { + callback(null, socket); + return; + } + let servername; + if (this[kRequestTls]) { + servername = this[kRequestTls].servername; + } else { + servername = opts2.servername; + } + this[kConnectEndpoint]({ ...opts2, 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(opts.origin); + headers.host = host; } - else { - void doExport(); + 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); } + } + [kClose]() { + const promises3 = [this[kAgent].close()]; + if (this[kClient]) { + promises3.push(this[kClient].close()); + } + return Promise.all(promises3); + } + [kDestroy]() { + const promises3 = [this[kAgent].destroy()]; + if (this[kClient]) { + promises3.push(this[kClient].destroy()); + } + return Promise.all(promises3); + } + }; + function buildHeaders(headers) { + if (Array.isArray(headers)) { + const headersPair = {}; + for (let i2 = 0; i2 < headers.length; i2 += 2) { + headersPair[headers[i2]] = headers[i2 + 1]; + } + return headersPair; + } + return headers; } - shutdown() { - return this._shutdownOnce.call(); - } - _shutdown() { - return this._exporter.shutdown(); + 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"); + } } -} -exports.SimpleSpanProcessor = SimpleSpanProcessor; -//# sourceMappingURL=SimpleSpanProcessor.js.map - -/***/ }), - -/***/ 29253: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Span = exports.SamplingDecision = exports.TraceIdRatioBasedSampler = exports.ParentBasedSampler = exports.AlwaysOnSampler = exports.AlwaysOffSampler = exports.NoopSpanProcessor = exports.SimpleSpanProcessor = exports.InMemorySpanExporter = exports.ConsoleSpanExporter = exports.RandomIdGenerator = exports.BatchSpanProcessor = exports.ForceFlushState = exports.BasicTracerProvider = exports.Tracer = void 0; -var Tracer_1 = __nccwpck_require__(63806); -Object.defineProperty(exports, "Tracer", ({ enumerable: true, get: function () { return Tracer_1.Tracer; } })); -var BasicTracerProvider_1 = __nccwpck_require__(78920); -Object.defineProperty(exports, "BasicTracerProvider", ({ enumerable: true, get: function () { return BasicTracerProvider_1.BasicTracerProvider; } })); -Object.defineProperty(exports, "ForceFlushState", ({ enumerable: true, get: function () { return BasicTracerProvider_1.ForceFlushState; } })); -var platform_1 = __nccwpck_require__(10262); -Object.defineProperty(exports, "BatchSpanProcessor", ({ enumerable: true, get: function () { return platform_1.BatchSpanProcessor; } })); -Object.defineProperty(exports, "RandomIdGenerator", ({ enumerable: true, get: function () { return platform_1.RandomIdGenerator; } })); -var ConsoleSpanExporter_1 = __nccwpck_require__(36784); -Object.defineProperty(exports, "ConsoleSpanExporter", ({ enumerable: true, get: function () { return ConsoleSpanExporter_1.ConsoleSpanExporter; } })); -var InMemorySpanExporter_1 = __nccwpck_require__(24093); -Object.defineProperty(exports, "InMemorySpanExporter", ({ enumerable: true, get: function () { return InMemorySpanExporter_1.InMemorySpanExporter; } })); -var SimpleSpanProcessor_1 = __nccwpck_require__(89802); -Object.defineProperty(exports, "SimpleSpanProcessor", ({ enumerable: true, get: function () { return SimpleSpanProcessor_1.SimpleSpanProcessor; } })); -var NoopSpanProcessor_1 = __nccwpck_require__(69252); -Object.defineProperty(exports, "NoopSpanProcessor", ({ enumerable: true, get: function () { return NoopSpanProcessor_1.NoopSpanProcessor; } })); -var AlwaysOffSampler_1 = __nccwpck_require__(68118); -Object.defineProperty(exports, "AlwaysOffSampler", ({ enumerable: true, get: function () { return AlwaysOffSampler_1.AlwaysOffSampler; } })); -var AlwaysOnSampler_1 = __nccwpck_require__(13032); -Object.defineProperty(exports, "AlwaysOnSampler", ({ enumerable: true, get: function () { return AlwaysOnSampler_1.AlwaysOnSampler; } })); -var ParentBasedSampler_1 = __nccwpck_require__(58070); -Object.defineProperty(exports, "ParentBasedSampler", ({ enumerable: true, get: function () { return ParentBasedSampler_1.ParentBasedSampler; } })); -var TraceIdRatioBasedSampler_1 = __nccwpck_require__(16712); -Object.defineProperty(exports, "TraceIdRatioBasedSampler", ({ enumerable: true, get: function () { return TraceIdRatioBasedSampler_1.TraceIdRatioBasedSampler; } })); -var Sampler_1 = __nccwpck_require__(17446); -Object.defineProperty(exports, "SamplingDecision", ({ enumerable: true, get: function () { return Sampler_1.SamplingDecision; } })); -var Span_1 = __nccwpck_require__(61301); -Object.defineProperty(exports, "Span", ({ enumerable: true, get: function () { return Span_1.Span; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 10262: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RandomIdGenerator = exports.BatchSpanProcessor = void 0; -var node_1 = __nccwpck_require__(36573); -Object.defineProperty(exports, "BatchSpanProcessor", ({ enumerable: true, get: function () { return node_1.BatchSpanProcessor; } })); -Object.defineProperty(exports, "RandomIdGenerator", ({ enumerable: true, get: function () { return node_1.RandomIdGenerator; } })); -//# sourceMappingURL=index.js.map + module3.exports = ProxyAgent2; + } +}); -/***/ }), - -/***/ 97670: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RandomIdGenerator = void 0; -const SPAN_ID_BYTES = 8; -const TRACE_ID_BYTES = 16; -class RandomIdGenerator { - constructor() { - /** - * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex - * characters corresponding to 128 bits. - */ - this.generateTraceId = getIdGenerator(TRACE_ID_BYTES); - /** - * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex - * characters corresponding to 64 bits. - */ - this.generateSpanId = getIdGenerator(SPAN_ID_BYTES); - } -} -exports.RandomIdGenerator = RandomIdGenerator; -const SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES); -function getIdGenerator(bytes) { - return function generateId() { - for (let i = 0; i < bytes / 4; i++) { - // unsigned right shift drops decimal part of the number - // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE - SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4); - } - // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated - for (let i = 0; i < bytes; i++) { - if (SHARED_BUFFER[i] > 0) { - break; - } - else if (i === bytes - 1) { - SHARED_BUFFER[bytes - 1] = 1; - } +// node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +var require_env_http_proxy_agent = __commonJS({ + "node_modules/undici/lib/dispatcher/env-http-proxy-agent.js"(exports, module3) { + "use strict"; + var DispatcherBase = require_dispatcher_base(); + var { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols(); + var ProxyAgent2 = require_proxy_agent(); + var Agent2 = require_agent(); + var DEFAULT_PORTS = { + "http:": 80, + "https:": 443 + }; + var EnvHttpProxyAgent = class extends DispatcherBase { + #noProxyValue = null; + #noProxyEntries = null; + #opts = null; + constructor(opts = {}) { + super(); + this.#opts = opts; + const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts; + this[kNoProxyAgent] = new Agent2(agentOpts); + const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; + if (HTTP_PROXY) { + this[kHttpProxyAgent] = new ProxyAgent2({ ...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 ProxyAgent2({ ...agentOpts, uri: HTTPS_PROXY }); + } else { + this[kHttpsProxyAgent] = this[kHttpProxyAgent]; + } + this.#parseNoProxy(); + } + [kDispatch](opts, handler) { + const url3 = new URL(opts.origin); + const agent = this.#getProxyAgentForUrl(url3); + return agent.dispatch(opts, handler); + } + [kClose]() { + return Promise.all([ + this[kNoProxyAgent].close(), + !this[kHttpProxyAgent][kClosed] && this[kHttpProxyAgent].close(), + !this[kHttpsProxyAgent][kClosed] && this[kHttpsProxyAgent].close() + ]); + } + [kDestroy](err) { + return Promise.all([ + this[kNoProxyAgent].destroy(err), + !this[kHttpProxyAgent][kDestroyed] && this[kHttpProxyAgent].destroy(err), + !this[kHttpsProxyAgent][kDestroyed] && this[kHttpsProxyAgent].destroy(err) + ]); + } + #getProxyAgentForUrl(url3) { + let { protocol, host: hostname, port } = url3; + 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 i2 = 0; i2 < this.#noProxyEntries.length; i2++) { + const entry = this.#noProxyEntries[i2]; + if (entry.port && entry.port !== port) { + continue; + } + if (hostname === entry.hostname) { + return false; + } + if (hostname.slice(-(entry.hostname.length + 1)) === `.${entry.hostname}`) { + return false; + } + } + return true; + } + #parseNoProxy() { + const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv; + const noProxySplit = noProxyValue.split(/[,\s]/); + const noProxyEntries = []; + for (let i2 = 0; i2 < noProxySplit.length; i2++) { + const entry = noProxySplit[i2]; + if (!entry) { + continue; + } + const parsed = entry.match(/^(.+):(\d+)$/); + noProxyEntries.push({ + // strip leading dot or asterisk with dot + hostname: (parsed ? parsed[1] : entry).replace(/^\*?\./, "").toLowerCase(), + port: parsed ? Number.parseInt(parsed[2], 10) : 0 + }); } - return SHARED_BUFFER.toString('hex', 0, bytes); + 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 ?? ""; + } }; -} -//# sourceMappingURL=RandomIdGenerator.js.map - -/***/ }), - -/***/ 97913: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BatchSpanProcessor = void 0; -const BatchSpanProcessorBase_1 = __nccwpck_require__(69727); -class BatchSpanProcessor extends BatchSpanProcessorBase_1.BatchSpanProcessorBase { - onShutdown() { } -} -exports.BatchSpanProcessor = BatchSpanProcessor; -//# sourceMappingURL=BatchSpanProcessor.js.map - -/***/ }), - -/***/ 36573: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RandomIdGenerator = exports.BatchSpanProcessor = void 0; -var BatchSpanProcessor_1 = __nccwpck_require__(97913); -Object.defineProperty(exports, "BatchSpanProcessor", ({ enumerable: true, get: function () { return BatchSpanProcessor_1.BatchSpanProcessor; } })); -var RandomIdGenerator_1 = __nccwpck_require__(97670); -Object.defineProperty(exports, "RandomIdGenerator", ({ enumerable: true, get: function () { return RandomIdGenerator_1.RandomIdGenerator; } })); -//# sourceMappingURL=index.js.map + module3.exports = EnvHttpProxyAgent; + } +}); -/***/ }), - -/***/ 68118: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AlwaysOffSampler = void 0; -const Sampler_1 = __nccwpck_require__(17446); -/** Sampler that samples no traces. */ -class AlwaysOffSampler { - shouldSample() { - return { - decision: Sampler_1.SamplingDecision.NOT_RECORD, - }; - } - toString() { - return 'AlwaysOffSampler'; - } -} -exports.AlwaysOffSampler = AlwaysOffSampler; -//# sourceMappingURL=AlwaysOffSampler.js.map - -/***/ }), - -/***/ 13032: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AlwaysOnSampler = void 0; -const Sampler_1 = __nccwpck_require__(17446); -/** Sampler that samples all traces. */ -class AlwaysOnSampler { - shouldSample() { - return { - decision: Sampler_1.SamplingDecision.RECORD_AND_SAMPLED, - }; - } - toString() { - return 'AlwaysOnSampler'; - } -} -exports.AlwaysOnSampler = AlwaysOnSampler; -//# sourceMappingURL=AlwaysOnSampler.js.map - -/***/ }), - -/***/ 58070: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ParentBasedSampler = void 0; -const api_1 = __nccwpck_require__(65163); -const core_1 = __nccwpck_require__(89736); -const AlwaysOffSampler_1 = __nccwpck_require__(68118); -const AlwaysOnSampler_1 = __nccwpck_require__(13032); -/** - * A composite sampler that either respects the parent span's sampling decision - * or delegates to `delegateSampler` for root spans. - */ -class ParentBasedSampler { - constructor(config) { - var _a, _b, _c, _d; - this._root = config.root; - if (!this._root) { - (0, core_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured')); - this._root = new AlwaysOnSampler_1.AlwaysOnSampler(); - } - this._remoteParentSampled = - (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler(); - this._remoteParentNotSampled = - (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler(); - this._localParentSampled = - (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler(); - this._localParentNotSampled = - (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler(); - } - shouldSample(context, traceId, spanName, spanKind, attributes, links) { - const parentContext = api_1.trace.getSpanContext(context); - if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) { - return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.isRemote) { - if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { - return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) { - return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links); - } - toString() { - return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`; - } -} -exports.ParentBasedSampler = ParentBasedSampler; -//# sourceMappingURL=ParentBasedSampler.js.map - -/***/ }), - -/***/ 16712: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TraceIdRatioBasedSampler = void 0; -const api_1 = __nccwpck_require__(65163); -const Sampler_1 = __nccwpck_require__(17446); -/** Sampler that samples a given fraction of traces based of trace id deterministically. */ -class TraceIdRatioBasedSampler { - constructor(_ratio = 0) { - this._ratio = _ratio; - this._ratio = this._normalize(_ratio); - this._upperBound = Math.floor(this._ratio * 0xffffffff); - } - shouldSample(context, traceId) { - return { - decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound - ? Sampler_1.SamplingDecision.RECORD_AND_SAMPLED - : Sampler_1.SamplingDecision.NOT_RECORD, +// node_modules/undici/lib/handler/retry-handler.js +var require_retry_handler = __commonJS({ + "node_modules/undici/lib/handler/retry-handler.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var { kRetryHandlerDefaultRetry } = require_symbols(); + var { RequestRetryError } = require_errors(); + var WrapHandler = require_wrap_handler(); + var { + isDisturbed, + parseRangeHeader, + wrapRequestBody + } = require_util(); + function calculateRetryAfterHeader(retryAfter) { + const retryTime = new Date(retryAfter).getTime(); + return isNaN(retryTime) ? 0 : retryTime - Date.now(); + } + var RetryHandler = class _RetryHandler { + constructor(opts, { dispatch, handler }) { + const { retryOptions, ...dispatchOpts } = opts; + const { + // Retry scoped + retry: retryFn, + maxRetries, + maxTimeout, + minTimeout, + timeoutFactor, + // Response scoped + methods, + errorCodes, + retryAfter, + statusCodes, + throwOnError + } = retryOptions ?? {}; + this.error = null; + this.dispatch = dispatch; + this.handler = WrapHandler.wrap(handler); + this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) }; + this.retryOpts = { + throwOnError: throwOnError ?? true, + retry: retryFn ?? _RetryHandler[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1e3, + // 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" + ] }; - } - toString() { - return `TraceIdRatioBased{${this._ratio}}`; - } - _normalize(ratio) { - if (typeof ratio !== 'number' || isNaN(ratio)) - return 0; - return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio; - } - _accumulate(traceId) { - let accumulation = 0; - for (let i = 0; i < traceId.length / 8; i++) { - const pos = i * 8; - const part = parseInt(traceId.slice(pos, pos + 8), 16); - accumulation = (accumulation ^ part) >>> 0; + this.retryCount = 0; + this.retryCountCheckpoint = 0; + this.headersSent = false; + this.start = 0; + this.end = null; + this.etag = null; + } + onResponseStartWithRetry(controller, statusCode, headers, statusMessage, err) { + if (this.retryOpts.throwOnError) { + if (this.retryOpts.statusCodes.includes(statusCode) === false) { + this.headersSent = true; + this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage); + } else { + this.error = err; + } + return; } - return accumulation; - } -} -exports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler; -//# sourceMappingURL=TraceIdRatioBasedSampler.js.map - -/***/ }), - -/***/ 54324: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.reconfigureLimits = exports.mergeConfig = void 0; -const config_1 = __nccwpck_require__(91); -const core_1 = __nccwpck_require__(89736); -/** - * Function to merge Default configuration (as specified in './config') with - * user provided configurations. - */ -function mergeConfig(userConfig) { - const perInstanceDefaults = { - sampler: (0, config_1.buildSamplerFromEnv)(), - }; - const DEFAULT_CONFIG = (0, config_1.loadDefaultConfig)(); - const target = Object.assign({}, DEFAULT_CONFIG, perInstanceDefaults, userConfig); - target.generalLimits = Object.assign({}, DEFAULT_CONFIG.generalLimits, userConfig.generalLimits || {}); - target.spanLimits = Object.assign({}, DEFAULT_CONFIG.spanLimits, userConfig.spanLimits || {}); - return target; -} -exports.mergeConfig = mergeConfig; -/** - * When general limits are provided and model specific limits are not, - * configures the model specific limits by using the values from the general ones. - * @param userConfig User provided tracer configuration - */ -function reconfigureLimits(userConfig) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; - const spanLimits = Object.assign({}, userConfig.spanLimits); - const parsedEnvConfig = (0, core_1.getEnvWithoutDefaults)(); - /** - * Reassign span attribute count limit to use first non null value defined by user or use default value - */ - spanLimits.attributeCountLimit = - (_f = (_e = (_d = (_b = (_a = userConfig.spanLimits) === null || _a === void 0 ? void 0 : _a.attributeCountLimit) !== null && _b !== void 0 ? _b : (_c = userConfig.generalLimits) === null || _c === void 0 ? void 0 : _c.attributeCountLimit) !== null && _d !== void 0 ? _d : parsedEnvConfig.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT) !== null && _e !== void 0 ? _e : parsedEnvConfig.OTEL_ATTRIBUTE_COUNT_LIMIT) !== null && _f !== void 0 ? _f : core_1.DEFAULT_ATTRIBUTE_COUNT_LIMIT; - /** - * Reassign span attribute value length limit to use first non null value defined by user or use default value - */ - spanLimits.attributeValueLengthLimit = - (_m = (_l = (_k = (_h = (_g = userConfig.spanLimits) === null || _g === void 0 ? void 0 : _g.attributeValueLengthLimit) !== null && _h !== void 0 ? _h : (_j = userConfig.generalLimits) === null || _j === void 0 ? void 0 : _j.attributeValueLengthLimit) !== null && _k !== void 0 ? _k : parsedEnvConfig.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT) !== null && _l !== void 0 ? _l : parsedEnvConfig.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT) !== null && _m !== void 0 ? _m : core_1.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT; - return Object.assign({}, userConfig, { spanLimits }); -} -exports.reconfigureLimits = reconfigureLimits; -//# sourceMappingURL=utility.js.map - -/***/ }), - -/***/ 98087: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NodeTracerProvider = void 0; -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const context_async_hooks_1 = __nccwpck_require__(81616); -const propagator_b3_1 = __nccwpck_require__(62650); -const sdk_trace_base_1 = __nccwpck_require__(29253); -const semver = __nccwpck_require__(11383); -const propagator_jaeger_1 = __nccwpck_require__(73534); -/** - * Register this TracerProvider for use with the OpenTelemetry API. - * Undefined values may be replaced with defaults, and - * null values will be skipped. - * - * @param config Configuration object for SDK registration - */ -class NodeTracerProvider extends sdk_trace_base_1.BasicTracerProvider { - constructor(config = {}) { - super(config); - } - register(config = {}) { - if (config.contextManager === undefined) { - const ContextManager = semver.gte(process.version, '14.8.0') - ? context_async_hooks_1.AsyncLocalStorageContextManager - : context_async_hooks_1.AsyncHooksContextManager; - config.contextManager = new ContextManager(); - config.contextManager.enable(); - } - super.register(config); - } -} -exports.NodeTracerProvider = NodeTracerProvider; -NodeTracerProvider._registeredPropagators = new Map([ - ...sdk_trace_base_1.BasicTracerProvider._registeredPropagators, - [ - 'b3', - () => new propagator_b3_1.B3Propagator({ injectEncoding: propagator_b3_1.B3InjectEncoding.SINGLE_HEADER }), - ], - [ - 'b3multi', - () => new propagator_b3_1.B3Propagator({ injectEncoding: propagator_b3_1.B3InjectEncoding.MULTI_HEADER }), - ], - ['jaeger', () => new propagator_jaeger_1.JaegerPropagator()], -]); -//# sourceMappingURL=NodeTracerProvider.js.map - -/***/ }), - -/***/ 10195: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Tracer = exports.TraceIdRatioBasedSampler = exports.Span = exports.SimpleSpanProcessor = exports.SamplingDecision = exports.RandomIdGenerator = exports.ParentBasedSampler = exports.NoopSpanProcessor = exports.InMemorySpanExporter = exports.ForceFlushState = exports.ConsoleSpanExporter = exports.BatchSpanProcessor = exports.BasicTracerProvider = exports.AlwaysOnSampler = exports.AlwaysOffSampler = exports.NodeTracerProvider = void 0; -var NodeTracerProvider_1 = __nccwpck_require__(98087); -Object.defineProperty(exports, "NodeTracerProvider", ({ enumerable: true, get: function () { return NodeTracerProvider_1.NodeTracerProvider; } })); -var sdk_trace_base_1 = __nccwpck_require__(29253); -Object.defineProperty(exports, "AlwaysOffSampler", ({ enumerable: true, get: function () { return sdk_trace_base_1.AlwaysOffSampler; } })); -Object.defineProperty(exports, "AlwaysOnSampler", ({ enumerable: true, get: function () { return sdk_trace_base_1.AlwaysOnSampler; } })); -Object.defineProperty(exports, "BasicTracerProvider", ({ enumerable: true, get: function () { return sdk_trace_base_1.BasicTracerProvider; } })); -Object.defineProperty(exports, "BatchSpanProcessor", ({ enumerable: true, get: function () { return sdk_trace_base_1.BatchSpanProcessor; } })); -Object.defineProperty(exports, "ConsoleSpanExporter", ({ enumerable: true, get: function () { return sdk_trace_base_1.ConsoleSpanExporter; } })); -Object.defineProperty(exports, "ForceFlushState", ({ enumerable: true, get: function () { return sdk_trace_base_1.ForceFlushState; } })); -Object.defineProperty(exports, "InMemorySpanExporter", ({ enumerable: true, get: function () { return sdk_trace_base_1.InMemorySpanExporter; } })); -Object.defineProperty(exports, "NoopSpanProcessor", ({ enumerable: true, get: function () { return sdk_trace_base_1.NoopSpanProcessor; } })); -Object.defineProperty(exports, "ParentBasedSampler", ({ enumerable: true, get: function () { return sdk_trace_base_1.ParentBasedSampler; } })); -Object.defineProperty(exports, "RandomIdGenerator", ({ enumerable: true, get: function () { return sdk_trace_base_1.RandomIdGenerator; } })); -Object.defineProperty(exports, "SamplingDecision", ({ enumerable: true, get: function () { return sdk_trace_base_1.SamplingDecision; } })); -Object.defineProperty(exports, "SimpleSpanProcessor", ({ enumerable: true, get: function () { return sdk_trace_base_1.SimpleSpanProcessor; } })); -Object.defineProperty(exports, "Span", ({ enumerable: true, get: function () { return sdk_trace_base_1.Span; } })); -Object.defineProperty(exports, "TraceIdRatioBasedSampler", ({ enumerable: true, get: function () { return sdk_trace_base_1.TraceIdRatioBasedSampler; } })); -Object.defineProperty(exports, "Tracer", ({ enumerable: true, get: function () { return sdk_trace_base_1.Tracer; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 67275: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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 })); -/* eslint-disable no-restricted-syntax -- - * These re-exports are only of constants, only two-levels deep, and - * should not cause problems for tree-shakers. - */ -// Deprecated. These are kept around for compatibility purposes -__exportStar(__nccwpck_require__(45836), exports); -__exportStar(__nccwpck_require__(2834), exports); -// Use these instead -__exportStar(__nccwpck_require__(69301), exports); -__exportStar(__nccwpck_require__(46152), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 749: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createConstMap = void 0; -/** - * Creates a const map from the given values - * @param values - An array of values to be used as keys and values in the map. - * @returns A populated version of the map with the values and keys derived from the values. - */ -/*#__NO_SIDE_EFFECTS__*/ -function createConstMap(values) { - // eslint-disable-next-line prefer-const, @typescript-eslint/no-explicit-any - let res = {}; - const len = values.length; - for (let lp = 0; lp < len; lp++) { - const val = values[lp]; - if (val) { - res[String(val).toUpperCase().replace(/[-.]/g, '_')] = val; - } - } - return res; -} -exports.createConstMap = createConstMap; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 85003: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SEMRESATTRS_K8S_STATEFULSET_NAME = exports.SEMRESATTRS_K8S_STATEFULSET_UID = exports.SEMRESATTRS_K8S_DEPLOYMENT_NAME = exports.SEMRESATTRS_K8S_DEPLOYMENT_UID = exports.SEMRESATTRS_K8S_REPLICASET_NAME = exports.SEMRESATTRS_K8S_REPLICASET_UID = exports.SEMRESATTRS_K8S_CONTAINER_NAME = exports.SEMRESATTRS_K8S_POD_NAME = exports.SEMRESATTRS_K8S_POD_UID = exports.SEMRESATTRS_K8S_NAMESPACE_NAME = exports.SEMRESATTRS_K8S_NODE_UID = exports.SEMRESATTRS_K8S_NODE_NAME = exports.SEMRESATTRS_K8S_CLUSTER_NAME = exports.SEMRESATTRS_HOST_IMAGE_VERSION = exports.SEMRESATTRS_HOST_IMAGE_ID = exports.SEMRESATTRS_HOST_IMAGE_NAME = exports.SEMRESATTRS_HOST_ARCH = exports.SEMRESATTRS_HOST_TYPE = exports.SEMRESATTRS_HOST_NAME = exports.SEMRESATTRS_HOST_ID = exports.SEMRESATTRS_FAAS_MAX_MEMORY = exports.SEMRESATTRS_FAAS_INSTANCE = exports.SEMRESATTRS_FAAS_VERSION = exports.SEMRESATTRS_FAAS_ID = exports.SEMRESATTRS_FAAS_NAME = exports.SEMRESATTRS_DEVICE_MODEL_NAME = exports.SEMRESATTRS_DEVICE_MODEL_IDENTIFIER = exports.SEMRESATTRS_DEVICE_ID = exports.SEMRESATTRS_DEPLOYMENT_ENVIRONMENT = exports.SEMRESATTRS_CONTAINER_IMAGE_TAG = exports.SEMRESATTRS_CONTAINER_IMAGE_NAME = exports.SEMRESATTRS_CONTAINER_RUNTIME = exports.SEMRESATTRS_CONTAINER_ID = exports.SEMRESATTRS_CONTAINER_NAME = exports.SEMRESATTRS_AWS_LOG_STREAM_ARNS = exports.SEMRESATTRS_AWS_LOG_STREAM_NAMES = exports.SEMRESATTRS_AWS_LOG_GROUP_ARNS = exports.SEMRESATTRS_AWS_LOG_GROUP_NAMES = exports.SEMRESATTRS_AWS_EKS_CLUSTER_ARN = exports.SEMRESATTRS_AWS_ECS_TASK_REVISION = exports.SEMRESATTRS_AWS_ECS_TASK_FAMILY = exports.SEMRESATTRS_AWS_ECS_TASK_ARN = exports.SEMRESATTRS_AWS_ECS_LAUNCHTYPE = exports.SEMRESATTRS_AWS_ECS_CLUSTER_ARN = exports.SEMRESATTRS_AWS_ECS_CONTAINER_ARN = exports.SEMRESATTRS_CLOUD_PLATFORM = exports.SEMRESATTRS_CLOUD_AVAILABILITY_ZONE = exports.SEMRESATTRS_CLOUD_REGION = exports.SEMRESATTRS_CLOUD_ACCOUNT_ID = exports.SEMRESATTRS_CLOUD_PROVIDER = void 0; -exports.CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = exports.CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = exports.CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = exports.CLOUDPLATFORMVALUES_AZURE_AKS = exports.CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = exports.CLOUDPLATFORMVALUES_AZURE_VM = exports.CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = exports.CLOUDPLATFORMVALUES_AWS_LAMBDA = exports.CLOUDPLATFORMVALUES_AWS_EKS = exports.CLOUDPLATFORMVALUES_AWS_ECS = exports.CLOUDPLATFORMVALUES_AWS_EC2 = exports.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = exports.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = exports.CloudProviderValues = exports.CLOUDPROVIDERVALUES_GCP = exports.CLOUDPROVIDERVALUES_AZURE = exports.CLOUDPROVIDERVALUES_AWS = exports.CLOUDPROVIDERVALUES_ALIBABA_CLOUD = exports.SemanticResourceAttributes = exports.SEMRESATTRS_WEBENGINE_DESCRIPTION = exports.SEMRESATTRS_WEBENGINE_VERSION = exports.SEMRESATTRS_WEBENGINE_NAME = exports.SEMRESATTRS_TELEMETRY_AUTO_VERSION = exports.SEMRESATTRS_TELEMETRY_SDK_VERSION = exports.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE = exports.SEMRESATTRS_TELEMETRY_SDK_NAME = exports.SEMRESATTRS_SERVICE_VERSION = exports.SEMRESATTRS_SERVICE_INSTANCE_ID = exports.SEMRESATTRS_SERVICE_NAMESPACE = exports.SEMRESATTRS_SERVICE_NAME = exports.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION = exports.SEMRESATTRS_PROCESS_RUNTIME_VERSION = exports.SEMRESATTRS_PROCESS_RUNTIME_NAME = exports.SEMRESATTRS_PROCESS_OWNER = exports.SEMRESATTRS_PROCESS_COMMAND_ARGS = exports.SEMRESATTRS_PROCESS_COMMAND_LINE = exports.SEMRESATTRS_PROCESS_COMMAND = exports.SEMRESATTRS_PROCESS_EXECUTABLE_PATH = exports.SEMRESATTRS_PROCESS_EXECUTABLE_NAME = exports.SEMRESATTRS_PROCESS_PID = exports.SEMRESATTRS_OS_VERSION = exports.SEMRESATTRS_OS_NAME = exports.SEMRESATTRS_OS_DESCRIPTION = exports.SEMRESATTRS_OS_TYPE = exports.SEMRESATTRS_K8S_CRONJOB_NAME = exports.SEMRESATTRS_K8S_CRONJOB_UID = exports.SEMRESATTRS_K8S_JOB_NAME = exports.SEMRESATTRS_K8S_JOB_UID = exports.SEMRESATTRS_K8S_DAEMONSET_NAME = exports.SEMRESATTRS_K8S_DAEMONSET_UID = void 0; -exports.TelemetrySdkLanguageValues = exports.TELEMETRYSDKLANGUAGEVALUES_WEBJS = exports.TELEMETRYSDKLANGUAGEVALUES_RUBY = exports.TELEMETRYSDKLANGUAGEVALUES_PYTHON = exports.TELEMETRYSDKLANGUAGEVALUES_PHP = exports.TELEMETRYSDKLANGUAGEVALUES_NODEJS = exports.TELEMETRYSDKLANGUAGEVALUES_JAVA = exports.TELEMETRYSDKLANGUAGEVALUES_GO = exports.TELEMETRYSDKLANGUAGEVALUES_ERLANG = exports.TELEMETRYSDKLANGUAGEVALUES_DOTNET = exports.TELEMETRYSDKLANGUAGEVALUES_CPP = exports.OsTypeValues = exports.OSTYPEVALUES_Z_OS = exports.OSTYPEVALUES_SOLARIS = exports.OSTYPEVALUES_AIX = exports.OSTYPEVALUES_HPUX = exports.OSTYPEVALUES_DRAGONFLYBSD = exports.OSTYPEVALUES_OPENBSD = exports.OSTYPEVALUES_NETBSD = exports.OSTYPEVALUES_FREEBSD = exports.OSTYPEVALUES_DARWIN = exports.OSTYPEVALUES_LINUX = exports.OSTYPEVALUES_WINDOWS = exports.HostArchValues = exports.HOSTARCHVALUES_X86 = exports.HOSTARCHVALUES_PPC64 = exports.HOSTARCHVALUES_PPC32 = exports.HOSTARCHVALUES_IA64 = exports.HOSTARCHVALUES_ARM64 = exports.HOSTARCHVALUES_ARM32 = exports.HOSTARCHVALUES_AMD64 = exports.AwsEcsLaunchtypeValues = exports.AWSECSLAUNCHTYPEVALUES_FARGATE = exports.AWSECSLAUNCHTYPEVALUES_EC2 = exports.CloudPlatformValues = exports.CLOUDPLATFORMVALUES_GCP_APP_ENGINE = exports.CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = exports.CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = exports.CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = void 0; -const utils_1 = __nccwpck_require__(749); -//---------------------------------------------------------------------------------------------------------- -// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 -//---------------------------------------------------------------------------------------------------------- -//---------------------------------------------------------------------------------------------------------- -// Constant values for SemanticResourceAttributes -//---------------------------------------------------------------------------------------------------------- -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_CLOUD_PROVIDER = 'cloud.provider'; -const TMP_CLOUD_ACCOUNT_ID = 'cloud.account.id'; -const TMP_CLOUD_REGION = 'cloud.region'; -const TMP_CLOUD_AVAILABILITY_ZONE = 'cloud.availability_zone'; -const TMP_CLOUD_PLATFORM = 'cloud.platform'; -const TMP_AWS_ECS_CONTAINER_ARN = 'aws.ecs.container.arn'; -const TMP_AWS_ECS_CLUSTER_ARN = 'aws.ecs.cluster.arn'; -const TMP_AWS_ECS_LAUNCHTYPE = 'aws.ecs.launchtype'; -const TMP_AWS_ECS_TASK_ARN = 'aws.ecs.task.arn'; -const TMP_AWS_ECS_TASK_FAMILY = 'aws.ecs.task.family'; -const TMP_AWS_ECS_TASK_REVISION = 'aws.ecs.task.revision'; -const TMP_AWS_EKS_CLUSTER_ARN = 'aws.eks.cluster.arn'; -const TMP_AWS_LOG_GROUP_NAMES = 'aws.log.group.names'; -const TMP_AWS_LOG_GROUP_ARNS = 'aws.log.group.arns'; -const TMP_AWS_LOG_STREAM_NAMES = 'aws.log.stream.names'; -const TMP_AWS_LOG_STREAM_ARNS = 'aws.log.stream.arns'; -const TMP_CONTAINER_NAME = 'container.name'; -const TMP_CONTAINER_ID = 'container.id'; -const TMP_CONTAINER_RUNTIME = 'container.runtime'; -const TMP_CONTAINER_IMAGE_NAME = 'container.image.name'; -const TMP_CONTAINER_IMAGE_TAG = 'container.image.tag'; -const TMP_DEPLOYMENT_ENVIRONMENT = 'deployment.environment'; -const TMP_DEVICE_ID = 'device.id'; -const TMP_DEVICE_MODEL_IDENTIFIER = 'device.model.identifier'; -const TMP_DEVICE_MODEL_NAME = 'device.model.name'; -const TMP_FAAS_NAME = 'faas.name'; -const TMP_FAAS_ID = 'faas.id'; -const TMP_FAAS_VERSION = 'faas.version'; -const TMP_FAAS_INSTANCE = 'faas.instance'; -const TMP_FAAS_MAX_MEMORY = 'faas.max_memory'; -const TMP_HOST_ID = 'host.id'; -const TMP_HOST_NAME = 'host.name'; -const TMP_HOST_TYPE = 'host.type'; -const TMP_HOST_ARCH = 'host.arch'; -const TMP_HOST_IMAGE_NAME = 'host.image.name'; -const TMP_HOST_IMAGE_ID = 'host.image.id'; -const TMP_HOST_IMAGE_VERSION = 'host.image.version'; -const TMP_K8S_CLUSTER_NAME = 'k8s.cluster.name'; -const TMP_K8S_NODE_NAME = 'k8s.node.name'; -const TMP_K8S_NODE_UID = 'k8s.node.uid'; -const TMP_K8S_NAMESPACE_NAME = 'k8s.namespace.name'; -const TMP_K8S_POD_UID = 'k8s.pod.uid'; -const TMP_K8S_POD_NAME = 'k8s.pod.name'; -const TMP_K8S_CONTAINER_NAME = 'k8s.container.name'; -const TMP_K8S_REPLICASET_UID = 'k8s.replicaset.uid'; -const TMP_K8S_REPLICASET_NAME = 'k8s.replicaset.name'; -const TMP_K8S_DEPLOYMENT_UID = 'k8s.deployment.uid'; -const TMP_K8S_DEPLOYMENT_NAME = 'k8s.deployment.name'; -const TMP_K8S_STATEFULSET_UID = 'k8s.statefulset.uid'; -const TMP_K8S_STATEFULSET_NAME = 'k8s.statefulset.name'; -const TMP_K8S_DAEMONSET_UID = 'k8s.daemonset.uid'; -const TMP_K8S_DAEMONSET_NAME = 'k8s.daemonset.name'; -const TMP_K8S_JOB_UID = 'k8s.job.uid'; -const TMP_K8S_JOB_NAME = 'k8s.job.name'; -const TMP_K8S_CRONJOB_UID = 'k8s.cronjob.uid'; -const TMP_K8S_CRONJOB_NAME = 'k8s.cronjob.name'; -const TMP_OS_TYPE = 'os.type'; -const TMP_OS_DESCRIPTION = 'os.description'; -const TMP_OS_NAME = 'os.name'; -const TMP_OS_VERSION = 'os.version'; -const TMP_PROCESS_PID = 'process.pid'; -const TMP_PROCESS_EXECUTABLE_NAME = 'process.executable.name'; -const TMP_PROCESS_EXECUTABLE_PATH = 'process.executable.path'; -const TMP_PROCESS_COMMAND = 'process.command'; -const TMP_PROCESS_COMMAND_LINE = 'process.command_line'; -const TMP_PROCESS_COMMAND_ARGS = 'process.command_args'; -const TMP_PROCESS_OWNER = 'process.owner'; -const TMP_PROCESS_RUNTIME_NAME = 'process.runtime.name'; -const TMP_PROCESS_RUNTIME_VERSION = 'process.runtime.version'; -const TMP_PROCESS_RUNTIME_DESCRIPTION = 'process.runtime.description'; -const TMP_SERVICE_NAME = 'service.name'; -const TMP_SERVICE_NAMESPACE = 'service.namespace'; -const TMP_SERVICE_INSTANCE_ID = 'service.instance.id'; -const TMP_SERVICE_VERSION = 'service.version'; -const TMP_TELEMETRY_SDK_NAME = 'telemetry.sdk.name'; -const TMP_TELEMETRY_SDK_LANGUAGE = 'telemetry.sdk.language'; -const TMP_TELEMETRY_SDK_VERSION = 'telemetry.sdk.version'; -const TMP_TELEMETRY_AUTO_VERSION = 'telemetry.auto.version'; -const TMP_WEBENGINE_NAME = 'webengine.name'; -const TMP_WEBENGINE_VERSION = 'webengine.version'; -const TMP_WEBENGINE_DESCRIPTION = 'webengine.description'; -/** - * Name of the cloud provider. - * - * @deprecated use ATTR_CLOUD_PROVIDER - */ -exports.SEMRESATTRS_CLOUD_PROVIDER = TMP_CLOUD_PROVIDER; -/** - * The cloud account ID the resource is assigned to. - * - * @deprecated use ATTR_CLOUD_ACCOUNT_ID - */ -exports.SEMRESATTRS_CLOUD_ACCOUNT_ID = TMP_CLOUD_ACCOUNT_ID; -/** - * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations). - * - * @deprecated use ATTR_CLOUD_REGION - */ -exports.SEMRESATTRS_CLOUD_REGION = TMP_CLOUD_REGION; -/** - * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running. - * - * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud. - * - * @deprecated use ATTR_CLOUD_AVAILABILITY_ZONE - */ -exports.SEMRESATTRS_CLOUD_AVAILABILITY_ZONE = TMP_CLOUD_AVAILABILITY_ZONE; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated use ATTR_CLOUD_PLATFORM - */ -exports.SEMRESATTRS_CLOUD_PLATFORM = TMP_CLOUD_PLATFORM; -/** - * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). - * - * @deprecated use ATTR_AWS_ECS_CONTAINER_ARN - */ -exports.SEMRESATTRS_AWS_ECS_CONTAINER_ARN = TMP_AWS_ECS_CONTAINER_ARN; -/** - * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). - * - * @deprecated use ATTR_AWS_ECS_CLUSTER_ARN - */ -exports.SEMRESATTRS_AWS_ECS_CLUSTER_ARN = TMP_AWS_ECS_CLUSTER_ARN; -/** - * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. - * - * @deprecated use ATTR_AWS_ECS_LAUNCHTYPE - */ -exports.SEMRESATTRS_AWS_ECS_LAUNCHTYPE = TMP_AWS_ECS_LAUNCHTYPE; -/** - * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). - * - * @deprecated use ATTR_AWS_ECS_TASK_ARN - */ -exports.SEMRESATTRS_AWS_ECS_TASK_ARN = TMP_AWS_ECS_TASK_ARN; -/** - * The task definition family this task definition is a member of. - * - * @deprecated use ATTR_AWS_ECS_TASK_FAMILY - */ -exports.SEMRESATTRS_AWS_ECS_TASK_FAMILY = TMP_AWS_ECS_TASK_FAMILY; -/** - * The revision for this task definition. - * - * @deprecated use ATTR_AWS_ECS_TASK_REVISION - */ -exports.SEMRESATTRS_AWS_ECS_TASK_REVISION = TMP_AWS_ECS_TASK_REVISION; -/** - * The ARN of an EKS cluster. - * - * @deprecated use ATTR_AWS_EKS_CLUSTER_ARN - */ -exports.SEMRESATTRS_AWS_EKS_CLUSTER_ARN = TMP_AWS_EKS_CLUSTER_ARN; -/** - * The name(s) of the AWS log group(s) an application is writing to. - * - * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group. - * - * @deprecated use ATTR_AWS_LOG_GROUP_NAMES - */ -exports.SEMRESATTRS_AWS_LOG_GROUP_NAMES = TMP_AWS_LOG_GROUP_NAMES; -/** - * The Amazon Resource Name(s) (ARN) of the AWS log group(s). - * - * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - * - * @deprecated use ATTR_AWS_LOG_GROUP_ARNS - */ -exports.SEMRESATTRS_AWS_LOG_GROUP_ARNS = TMP_AWS_LOG_GROUP_ARNS; -/** - * The name(s) of the AWS log stream(s) an application is writing to. - * - * @deprecated use ATTR_AWS_LOG_STREAM_NAMES - */ -exports.SEMRESATTRS_AWS_LOG_STREAM_NAMES = TMP_AWS_LOG_STREAM_NAMES; -/** - * The ARN(s) of the AWS log stream(s). - * - * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream. - * - * @deprecated use ATTR_AWS_LOG_STREAM_ARNS - */ -exports.SEMRESATTRS_AWS_LOG_STREAM_ARNS = TMP_AWS_LOG_STREAM_ARNS; -/** - * Container name. - * - * @deprecated use ATTR_CONTAINER_NAME - */ -exports.SEMRESATTRS_CONTAINER_NAME = TMP_CONTAINER_NAME; -/** - * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated. - * - * @deprecated use ATTR_CONTAINER_ID - */ -exports.SEMRESATTRS_CONTAINER_ID = TMP_CONTAINER_ID; -/** - * The container runtime managing this container. - * - * @deprecated use ATTR_CONTAINER_RUNTIME - */ -exports.SEMRESATTRS_CONTAINER_RUNTIME = TMP_CONTAINER_RUNTIME; -/** - * Name of the image the container was built on. - * - * @deprecated use ATTR_CONTAINER_IMAGE_NAME - */ -exports.SEMRESATTRS_CONTAINER_IMAGE_NAME = TMP_CONTAINER_IMAGE_NAME; -/** - * Container image tag. - * - * @deprecated use ATTR_CONTAINER_IMAGE_TAG - */ -exports.SEMRESATTRS_CONTAINER_IMAGE_TAG = TMP_CONTAINER_IMAGE_TAG; -/** - * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier). - * - * @deprecated use ATTR_DEPLOYMENT_ENVIRONMENT - */ -exports.SEMRESATTRS_DEPLOYMENT_ENVIRONMENT = TMP_DEPLOYMENT_ENVIRONMENT; -/** - * A unique identifier representing the device. - * - * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence. - * - * @deprecated use ATTR_DEVICE_ID - */ -exports.SEMRESATTRS_DEVICE_ID = TMP_DEVICE_ID; -/** - * The model identifier for the device. - * - * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device. - * - * @deprecated use ATTR_DEVICE_MODEL_IDENTIFIER - */ -exports.SEMRESATTRS_DEVICE_MODEL_IDENTIFIER = TMP_DEVICE_MODEL_IDENTIFIER; -/** - * The marketing name for the device model. - * - * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative. - * - * @deprecated use ATTR_DEVICE_MODEL_NAME - */ -exports.SEMRESATTRS_DEVICE_MODEL_NAME = TMP_DEVICE_MODEL_NAME; -/** - * The name of the single function that this runtime instance executes. - * - * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes). - * - * @deprecated use ATTR_FAAS_NAME - */ -exports.SEMRESATTRS_FAAS_NAME = TMP_FAAS_NAME; -/** -* The unique ID of the single function that this runtime instance executes. -* -* Note: Depending on the cloud provider, use: - -* **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). -Take care not to use the "invoked ARN" directly but replace any -[alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple -different aliases. -* **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names) -* **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id). - -On some providers, it may not be possible to determine the full ID at startup, -which is why this field cannot be made required. For example, on AWS the account ID -part of the ARN is not available without calling another AWS API -which may be deemed too slow for a short-running lambda function. -As an alternative, consider setting `faas.id` as a span attribute instead. -* -* @deprecated use ATTR_FAAS_ID -*/ -exports.SEMRESATTRS_FAAS_ID = TMP_FAAS_ID; -/** -* The immutable version of the function being executed. -* -* Note: Depending on the cloud provider and platform, use: - -* **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) - (an integer represented as a decimal string). -* **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions) - (i.e., the function name plus the revision suffix). -* **Google Cloud Functions:** The value of the - [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). -* **Azure Functions:** Not applicable. Do not set this attribute. -* -* @deprecated use ATTR_FAAS_VERSION -*/ -exports.SEMRESATTRS_FAAS_VERSION = TMP_FAAS_VERSION; -/** - * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version. - * - * Note: * **AWS Lambda:** Use the (full) log stream name. - * - * @deprecated use ATTR_FAAS_INSTANCE - */ -exports.SEMRESATTRS_FAAS_INSTANCE = TMP_FAAS_INSTANCE; -/** - * The amount of memory available to the serverless function in MiB. - * - * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information. - * - * @deprecated use ATTR_FAAS_MAX_MEMORY - */ -exports.SEMRESATTRS_FAAS_MAX_MEMORY = TMP_FAAS_MAX_MEMORY; -/** - * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. - * - * @deprecated use ATTR_HOST_ID - */ -exports.SEMRESATTRS_HOST_ID = TMP_HOST_ID; -/** - * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user. - * - * @deprecated use ATTR_HOST_NAME - */ -exports.SEMRESATTRS_HOST_NAME = TMP_HOST_NAME; -/** - * Type of host. For Cloud, this must be the machine type. - * - * @deprecated use ATTR_HOST_TYPE - */ -exports.SEMRESATTRS_HOST_TYPE = TMP_HOST_TYPE; -/** - * The CPU architecture the host system is running on. - * - * @deprecated use ATTR_HOST_ARCH - */ -exports.SEMRESATTRS_HOST_ARCH = TMP_HOST_ARCH; -/** - * Name of the VM image or OS install the host was instantiated from. - * - * @deprecated use ATTR_HOST_IMAGE_NAME - */ -exports.SEMRESATTRS_HOST_IMAGE_NAME = TMP_HOST_IMAGE_NAME; -/** - * VM image ID. For Cloud, this value is from the provider. - * - * @deprecated use ATTR_HOST_IMAGE_ID - */ -exports.SEMRESATTRS_HOST_IMAGE_ID = TMP_HOST_IMAGE_ID; -/** - * The version string of the VM image as defined in [Version Attributes](README.md#version-attributes). - * - * @deprecated use ATTR_HOST_IMAGE_VERSION - */ -exports.SEMRESATTRS_HOST_IMAGE_VERSION = TMP_HOST_IMAGE_VERSION; -/** - * The name of the cluster. - * - * @deprecated use ATTR_K8S_CLUSTER_NAME - */ -exports.SEMRESATTRS_K8S_CLUSTER_NAME = TMP_K8S_CLUSTER_NAME; -/** - * The name of the Node. - * - * @deprecated use ATTR_K8S_NODE_NAME - */ -exports.SEMRESATTRS_K8S_NODE_NAME = TMP_K8S_NODE_NAME; -/** - * The UID of the Node. - * - * @deprecated use ATTR_K8S_NODE_UID - */ -exports.SEMRESATTRS_K8S_NODE_UID = TMP_K8S_NODE_UID; -/** - * The name of the namespace that the pod is running in. - * - * @deprecated use ATTR_K8S_NAMESPACE_NAME - */ -exports.SEMRESATTRS_K8S_NAMESPACE_NAME = TMP_K8S_NAMESPACE_NAME; -/** - * The UID of the Pod. - * - * @deprecated use ATTR_K8S_POD_UID - */ -exports.SEMRESATTRS_K8S_POD_UID = TMP_K8S_POD_UID; -/** - * The name of the Pod. - * - * @deprecated use ATTR_K8S_POD_NAME - */ -exports.SEMRESATTRS_K8S_POD_NAME = TMP_K8S_POD_NAME; -/** - * The name of the Container in a Pod template. - * - * @deprecated use ATTR_K8S_CONTAINER_NAME - */ -exports.SEMRESATTRS_K8S_CONTAINER_NAME = TMP_K8S_CONTAINER_NAME; -/** - * The UID of the ReplicaSet. - * - * @deprecated use ATTR_K8S_REPLICASET_UID - */ -exports.SEMRESATTRS_K8S_REPLICASET_UID = TMP_K8S_REPLICASET_UID; -/** - * The name of the ReplicaSet. - * - * @deprecated use ATTR_K8S_REPLICASET_NAME - */ -exports.SEMRESATTRS_K8S_REPLICASET_NAME = TMP_K8S_REPLICASET_NAME; -/** - * The UID of the Deployment. - * - * @deprecated use ATTR_K8S_DEPLOYMENT_UID - */ -exports.SEMRESATTRS_K8S_DEPLOYMENT_UID = TMP_K8S_DEPLOYMENT_UID; -/** - * The name of the Deployment. - * - * @deprecated use ATTR_K8S_DEPLOYMENT_NAME - */ -exports.SEMRESATTRS_K8S_DEPLOYMENT_NAME = TMP_K8S_DEPLOYMENT_NAME; -/** - * The UID of the StatefulSet. - * - * @deprecated use ATTR_K8S_STATEFULSET_UID - */ -exports.SEMRESATTRS_K8S_STATEFULSET_UID = TMP_K8S_STATEFULSET_UID; -/** - * The name of the StatefulSet. - * - * @deprecated use ATTR_K8S_STATEFULSET_NAME - */ -exports.SEMRESATTRS_K8S_STATEFULSET_NAME = TMP_K8S_STATEFULSET_NAME; -/** - * The UID of the DaemonSet. - * - * @deprecated use ATTR_K8S_DAEMONSET_UID - */ -exports.SEMRESATTRS_K8S_DAEMONSET_UID = TMP_K8S_DAEMONSET_UID; -/** - * The name of the DaemonSet. - * - * @deprecated use ATTR_K8S_DAEMONSET_NAME - */ -exports.SEMRESATTRS_K8S_DAEMONSET_NAME = TMP_K8S_DAEMONSET_NAME; -/** - * The UID of the Job. - * - * @deprecated use ATTR_K8S_JOB_UID - */ -exports.SEMRESATTRS_K8S_JOB_UID = TMP_K8S_JOB_UID; -/** - * The name of the Job. - * - * @deprecated use ATTR_K8S_JOB_NAME - */ -exports.SEMRESATTRS_K8S_JOB_NAME = TMP_K8S_JOB_NAME; -/** - * The UID of the CronJob. - * - * @deprecated use ATTR_K8S_CRONJOB_UID - */ -exports.SEMRESATTRS_K8S_CRONJOB_UID = TMP_K8S_CRONJOB_UID; -/** - * The name of the CronJob. - * - * @deprecated use ATTR_K8S_CRONJOB_NAME - */ -exports.SEMRESATTRS_K8S_CRONJOB_NAME = TMP_K8S_CRONJOB_NAME; -/** - * The operating system type. - * - * @deprecated use ATTR_OS_TYPE - */ -exports.SEMRESATTRS_OS_TYPE = TMP_OS_TYPE; -/** - * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands. - * - * @deprecated use ATTR_OS_DESCRIPTION - */ -exports.SEMRESATTRS_OS_DESCRIPTION = TMP_OS_DESCRIPTION; -/** - * Human readable operating system name. - * - * @deprecated use ATTR_OS_NAME - */ -exports.SEMRESATTRS_OS_NAME = TMP_OS_NAME; -/** - * The version string of the operating system as defined in [Version Attributes](../../resource/semantic_conventions/README.md#version-attributes). - * - * @deprecated use ATTR_OS_VERSION - */ -exports.SEMRESATTRS_OS_VERSION = TMP_OS_VERSION; -/** - * Process identifier (PID). - * - * @deprecated use ATTR_PROCESS_PID - */ -exports.SEMRESATTRS_PROCESS_PID = TMP_PROCESS_PID; -/** - * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`. - * - * @deprecated use ATTR_PROCESS_EXECUTABLE_NAME - */ -exports.SEMRESATTRS_PROCESS_EXECUTABLE_NAME = TMP_PROCESS_EXECUTABLE_NAME; -/** - * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`. - * - * @deprecated use ATTR_PROCESS_EXECUTABLE_PATH - */ -exports.SEMRESATTRS_PROCESS_EXECUTABLE_PATH = TMP_PROCESS_EXECUTABLE_PATH; -/** - * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`. - * - * @deprecated use ATTR_PROCESS_COMMAND - */ -exports.SEMRESATTRS_PROCESS_COMMAND = TMP_PROCESS_COMMAND; -/** - * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead. - * - * @deprecated use ATTR_PROCESS_COMMAND_LINE - */ -exports.SEMRESATTRS_PROCESS_COMMAND_LINE = TMP_PROCESS_COMMAND_LINE; -/** - * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`. - * - * @deprecated use ATTR_PROCESS_COMMAND_ARGS - */ -exports.SEMRESATTRS_PROCESS_COMMAND_ARGS = TMP_PROCESS_COMMAND_ARGS; -/** - * The username of the user that owns the process. - * - * @deprecated use ATTR_PROCESS_OWNER - */ -exports.SEMRESATTRS_PROCESS_OWNER = TMP_PROCESS_OWNER; -/** - * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler. - * - * @deprecated use ATTR_PROCESS_RUNTIME_NAME - */ -exports.SEMRESATTRS_PROCESS_RUNTIME_NAME = TMP_PROCESS_RUNTIME_NAME; -/** - * The version of the runtime of this process, as returned by the runtime without modification. - * - * @deprecated use ATTR_PROCESS_RUNTIME_VERSION - */ -exports.SEMRESATTRS_PROCESS_RUNTIME_VERSION = TMP_PROCESS_RUNTIME_VERSION; -/** - * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment. - * - * @deprecated use ATTR_PROCESS_RUNTIME_DESCRIPTION - */ -exports.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION = TMP_PROCESS_RUNTIME_DESCRIPTION; -/** - * Logical name of the service. - * - * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`. - * - * @deprecated use ATTR_SERVICE_NAME - */ -exports.SEMRESATTRS_SERVICE_NAME = TMP_SERVICE_NAME; -/** - * A namespace for `service.name`. - * - * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace. - * - * @deprecated use ATTR_SERVICE_NAMESPACE - */ -exports.SEMRESATTRS_SERVICE_NAMESPACE = TMP_SERVICE_NAMESPACE; -/** - * The string ID of the service instance. - * - * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations). - * - * @deprecated use ATTR_SERVICE_INSTANCE_ID - */ -exports.SEMRESATTRS_SERVICE_INSTANCE_ID = TMP_SERVICE_INSTANCE_ID; -/** - * The version string of the service API or implementation. - * - * @deprecated use ATTR_SERVICE_VERSION - */ -exports.SEMRESATTRS_SERVICE_VERSION = TMP_SERVICE_VERSION; -/** - * The name of the telemetry SDK as defined above. - * - * @deprecated use ATTR_TELEMETRY_SDK_NAME - */ -exports.SEMRESATTRS_TELEMETRY_SDK_NAME = TMP_TELEMETRY_SDK_NAME; -/** - * The language of the telemetry SDK. - * - * @deprecated use ATTR_TELEMETRY_SDK_LANGUAGE - */ -exports.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE = TMP_TELEMETRY_SDK_LANGUAGE; -/** - * The version string of the telemetry SDK. - * - * @deprecated use ATTR_TELEMETRY_SDK_VERSION - */ -exports.SEMRESATTRS_TELEMETRY_SDK_VERSION = TMP_TELEMETRY_SDK_VERSION; -/** - * The version string of the auto instrumentation agent, if used. - * - * @deprecated use ATTR_TELEMETRY_AUTO_VERSION - */ -exports.SEMRESATTRS_TELEMETRY_AUTO_VERSION = TMP_TELEMETRY_AUTO_VERSION; -/** - * The name of the web engine. - * - * @deprecated use ATTR_WEBENGINE_NAME - */ -exports.SEMRESATTRS_WEBENGINE_NAME = TMP_WEBENGINE_NAME; -/** - * The version of the web engine. - * - * @deprecated use ATTR_WEBENGINE_VERSION - */ -exports.SEMRESATTRS_WEBENGINE_VERSION = TMP_WEBENGINE_VERSION; -/** - * Additional description of the web engine (e.g. detailed version and edition information). - * - * @deprecated use ATTR_WEBENGINE_DESCRIPTION - */ -exports.SEMRESATTRS_WEBENGINE_DESCRIPTION = TMP_WEBENGINE_DESCRIPTION; -/** - * Create exported Value Map for SemanticResourceAttributes values - * @deprecated Use the SEMRESATTRS_XXXXX constants rather than the SemanticResourceAttributes.XXXXX for bundle minification - */ -exports.SemanticResourceAttributes = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_CLOUD_PROVIDER, - TMP_CLOUD_ACCOUNT_ID, - TMP_CLOUD_REGION, - TMP_CLOUD_AVAILABILITY_ZONE, - TMP_CLOUD_PLATFORM, - TMP_AWS_ECS_CONTAINER_ARN, - TMP_AWS_ECS_CLUSTER_ARN, - TMP_AWS_ECS_LAUNCHTYPE, - TMP_AWS_ECS_TASK_ARN, - TMP_AWS_ECS_TASK_FAMILY, - TMP_AWS_ECS_TASK_REVISION, - TMP_AWS_EKS_CLUSTER_ARN, - TMP_AWS_LOG_GROUP_NAMES, - TMP_AWS_LOG_GROUP_ARNS, - TMP_AWS_LOG_STREAM_NAMES, - TMP_AWS_LOG_STREAM_ARNS, - TMP_CONTAINER_NAME, - TMP_CONTAINER_ID, - TMP_CONTAINER_RUNTIME, - TMP_CONTAINER_IMAGE_NAME, - TMP_CONTAINER_IMAGE_TAG, - TMP_DEPLOYMENT_ENVIRONMENT, - TMP_DEVICE_ID, - TMP_DEVICE_MODEL_IDENTIFIER, - TMP_DEVICE_MODEL_NAME, - TMP_FAAS_NAME, - TMP_FAAS_ID, - TMP_FAAS_VERSION, - TMP_FAAS_INSTANCE, - TMP_FAAS_MAX_MEMORY, - TMP_HOST_ID, - TMP_HOST_NAME, - TMP_HOST_TYPE, - TMP_HOST_ARCH, - TMP_HOST_IMAGE_NAME, - TMP_HOST_IMAGE_ID, - TMP_HOST_IMAGE_VERSION, - TMP_K8S_CLUSTER_NAME, - TMP_K8S_NODE_NAME, - TMP_K8S_NODE_UID, - TMP_K8S_NAMESPACE_NAME, - TMP_K8S_POD_UID, - TMP_K8S_POD_NAME, - TMP_K8S_CONTAINER_NAME, - TMP_K8S_REPLICASET_UID, - TMP_K8S_REPLICASET_NAME, - TMP_K8S_DEPLOYMENT_UID, - TMP_K8S_DEPLOYMENT_NAME, - TMP_K8S_STATEFULSET_UID, - TMP_K8S_STATEFULSET_NAME, - TMP_K8S_DAEMONSET_UID, - TMP_K8S_DAEMONSET_NAME, - TMP_K8S_JOB_UID, - TMP_K8S_JOB_NAME, - TMP_K8S_CRONJOB_UID, - TMP_K8S_CRONJOB_NAME, - TMP_OS_TYPE, - TMP_OS_DESCRIPTION, - TMP_OS_NAME, - TMP_OS_VERSION, - TMP_PROCESS_PID, - TMP_PROCESS_EXECUTABLE_NAME, - TMP_PROCESS_EXECUTABLE_PATH, - TMP_PROCESS_COMMAND, - TMP_PROCESS_COMMAND_LINE, - TMP_PROCESS_COMMAND_ARGS, - TMP_PROCESS_OWNER, - TMP_PROCESS_RUNTIME_NAME, - TMP_PROCESS_RUNTIME_VERSION, - TMP_PROCESS_RUNTIME_DESCRIPTION, - TMP_SERVICE_NAME, - TMP_SERVICE_NAMESPACE, - TMP_SERVICE_INSTANCE_ID, - TMP_SERVICE_VERSION, - TMP_TELEMETRY_SDK_NAME, - TMP_TELEMETRY_SDK_LANGUAGE, - TMP_TELEMETRY_SDK_VERSION, - TMP_TELEMETRY_AUTO_VERSION, - TMP_WEBENGINE_NAME, - TMP_WEBENGINE_VERSION, - TMP_WEBENGINE_DESCRIPTION, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for CloudProviderValues enum definition - * - * Name of the cloud provider. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD = 'alibaba_cloud'; -const TMP_CLOUDPROVIDERVALUES_AWS = 'aws'; -const TMP_CLOUDPROVIDERVALUES_AZURE = 'azure'; -const TMP_CLOUDPROVIDERVALUES_GCP = 'gcp'; -/** - * Name of the cloud provider. - * - * @deprecated Use CLOUD_PROVIDER_VALUE_ALIBABA_CLOUD. - */ -exports.CLOUDPROVIDERVALUES_ALIBABA_CLOUD = TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD; -/** - * Name of the cloud provider. - * - * @deprecated Use CLOUD_PROVIDER_VALUE_AWS. - */ -exports.CLOUDPROVIDERVALUES_AWS = TMP_CLOUDPROVIDERVALUES_AWS; -/** - * Name of the cloud provider. - * - * @deprecated Use CLOUD_PROVIDER_VALUE_AZURE. - */ -exports.CLOUDPROVIDERVALUES_AZURE = TMP_CLOUDPROVIDERVALUES_AZURE; -/** - * Name of the cloud provider. - * - * @deprecated Use CLOUD_PROVIDER_VALUE_GCP. - */ -exports.CLOUDPROVIDERVALUES_GCP = TMP_CLOUDPROVIDERVALUES_GCP; -/** - * The constant map of values for CloudProviderValues. - * @deprecated Use the CLOUDPROVIDERVALUES_XXXXX constants rather than the CloudProviderValues.XXXXX for bundle minification. - */ -exports.CloudProviderValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD, - TMP_CLOUDPROVIDERVALUES_AWS, - TMP_CLOUDPROVIDERVALUES_AZURE, - TMP_CLOUDPROVIDERVALUES_GCP, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for CloudPlatformValues enum definition - * - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = 'alibaba_cloud_ecs'; -const TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = 'alibaba_cloud_fc'; -const TMP_CLOUDPLATFORMVALUES_AWS_EC2 = 'aws_ec2'; -const TMP_CLOUDPLATFORMVALUES_AWS_ECS = 'aws_ecs'; -const TMP_CLOUDPLATFORMVALUES_AWS_EKS = 'aws_eks'; -const TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA = 'aws_lambda'; -const TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = 'aws_elastic_beanstalk'; -const TMP_CLOUDPLATFORMVALUES_AZURE_VM = 'azure_vm'; -const TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = 'azure_container_instances'; -const TMP_CLOUDPLATFORMVALUES_AZURE_AKS = 'azure_aks'; -const TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = 'azure_functions'; -const TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = 'azure_app_service'; -const TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = 'gcp_compute_engine'; -const TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = 'gcp_cloud_run'; -const TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = 'gcp_kubernetes_engine'; -const TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = 'gcp_cloud_functions'; -const TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE = 'gcp_app_engine'; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_ALIBABA_CLOUD_ECS. - */ -exports.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_ALIBABA_CLOUD_FC. - */ -exports.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_AWS_EC2. - */ -exports.CLOUDPLATFORMVALUES_AWS_EC2 = TMP_CLOUDPLATFORMVALUES_AWS_EC2; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_AWS_ECS. - */ -exports.CLOUDPLATFORMVALUES_AWS_ECS = TMP_CLOUDPLATFORMVALUES_AWS_ECS; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_AWS_EKS. - */ -exports.CLOUDPLATFORMVALUES_AWS_EKS = TMP_CLOUDPLATFORMVALUES_AWS_EKS; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_AWS_LAMBDA. - */ -exports.CLOUDPLATFORMVALUES_AWS_LAMBDA = TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_AWS_ELASTIC_BEANSTALK. - */ -exports.CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_AZURE_VM. - */ -exports.CLOUDPLATFORMVALUES_AZURE_VM = TMP_CLOUDPLATFORMVALUES_AZURE_VM; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_AZURE_CONTAINER_INSTANCES. - */ -exports.CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_AZURE_AKS. - */ -exports.CLOUDPLATFORMVALUES_AZURE_AKS = TMP_CLOUDPLATFORMVALUES_AZURE_AKS; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_AZURE_FUNCTIONS. - */ -exports.CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_AZURE_APP_SERVICE. - */ -exports.CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_GCP_COMPUTE_ENGINE. - */ -exports.CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_GCP_CLOUD_RUN. - */ -exports.CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_GCP_KUBERNETES_ENGINE. - */ -exports.CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_GCP_CLOUD_FUNCTIONS. - */ -exports.CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS; -/** - * The cloud platform in use. - * - * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`. - * - * @deprecated Use CLOUD_PLATFORM_VALUE_GCP_APP_ENGINE. - */ -exports.CLOUDPLATFORMVALUES_GCP_APP_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE; -/** - * The constant map of values for CloudPlatformValues. - * @deprecated Use the CLOUDPLATFORMVALUES_XXXXX constants rather than the CloudPlatformValues.XXXXX for bundle minification. - */ -exports.CloudPlatformValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS, - TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC, - TMP_CLOUDPLATFORMVALUES_AWS_EC2, - TMP_CLOUDPLATFORMVALUES_AWS_ECS, - TMP_CLOUDPLATFORMVALUES_AWS_EKS, - TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA, - TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK, - TMP_CLOUDPLATFORMVALUES_AZURE_VM, - TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES, - TMP_CLOUDPLATFORMVALUES_AZURE_AKS, - TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS, - TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE, - TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE, - TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN, - TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE, - TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS, - TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for AwsEcsLaunchtypeValues enum definition - * - * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_AWSECSLAUNCHTYPEVALUES_EC2 = 'ec2'; -const TMP_AWSECSLAUNCHTYPEVALUES_FARGATE = 'fargate'; -/** - * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. - * - * @deprecated Use AWS_ECS_LAUNCHTYPE_VALUE_EC2. - */ -exports.AWSECSLAUNCHTYPEVALUES_EC2 = TMP_AWSECSLAUNCHTYPEVALUES_EC2; -/** - * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task. - * - * @deprecated Use AWS_ECS_LAUNCHTYPE_VALUE_FARGATE. - */ -exports.AWSECSLAUNCHTYPEVALUES_FARGATE = TMP_AWSECSLAUNCHTYPEVALUES_FARGATE; -/** - * The constant map of values for AwsEcsLaunchtypeValues. - * @deprecated Use the AWSECSLAUNCHTYPEVALUES_XXXXX constants rather than the AwsEcsLaunchtypeValues.XXXXX for bundle minification. - */ -exports.AwsEcsLaunchtypeValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_AWSECSLAUNCHTYPEVALUES_EC2, - TMP_AWSECSLAUNCHTYPEVALUES_FARGATE, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for HostArchValues enum definition - * - * The CPU architecture the host system is running on. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_HOSTARCHVALUES_AMD64 = 'amd64'; -const TMP_HOSTARCHVALUES_ARM32 = 'arm32'; -const TMP_HOSTARCHVALUES_ARM64 = 'arm64'; -const TMP_HOSTARCHVALUES_IA64 = 'ia64'; -const TMP_HOSTARCHVALUES_PPC32 = 'ppc32'; -const TMP_HOSTARCHVALUES_PPC64 = 'ppc64'; -const TMP_HOSTARCHVALUES_X86 = 'x86'; -/** - * The CPU architecture the host system is running on. - * - * @deprecated Use HOST_ARCH_VALUE_AMD64. - */ -exports.HOSTARCHVALUES_AMD64 = TMP_HOSTARCHVALUES_AMD64; -/** - * The CPU architecture the host system is running on. - * - * @deprecated Use HOST_ARCH_VALUE_ARM32. - */ -exports.HOSTARCHVALUES_ARM32 = TMP_HOSTARCHVALUES_ARM32; -/** - * The CPU architecture the host system is running on. - * - * @deprecated Use HOST_ARCH_VALUE_ARM64. - */ -exports.HOSTARCHVALUES_ARM64 = TMP_HOSTARCHVALUES_ARM64; -/** - * The CPU architecture the host system is running on. - * - * @deprecated Use HOST_ARCH_VALUE_IA64. - */ -exports.HOSTARCHVALUES_IA64 = TMP_HOSTARCHVALUES_IA64; -/** - * The CPU architecture the host system is running on. - * - * @deprecated Use HOST_ARCH_VALUE_PPC32. - */ -exports.HOSTARCHVALUES_PPC32 = TMP_HOSTARCHVALUES_PPC32; -/** - * The CPU architecture the host system is running on. - * - * @deprecated Use HOST_ARCH_VALUE_PPC64. - */ -exports.HOSTARCHVALUES_PPC64 = TMP_HOSTARCHVALUES_PPC64; -/** - * The CPU architecture the host system is running on. - * - * @deprecated Use HOST_ARCH_VALUE_X86. - */ -exports.HOSTARCHVALUES_X86 = TMP_HOSTARCHVALUES_X86; -/** - * The constant map of values for HostArchValues. - * @deprecated Use the HOSTARCHVALUES_XXXXX constants rather than the HostArchValues.XXXXX for bundle minification. - */ -exports.HostArchValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_HOSTARCHVALUES_AMD64, - TMP_HOSTARCHVALUES_ARM32, - TMP_HOSTARCHVALUES_ARM64, - TMP_HOSTARCHVALUES_IA64, - TMP_HOSTARCHVALUES_PPC32, - TMP_HOSTARCHVALUES_PPC64, - TMP_HOSTARCHVALUES_X86, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for OsTypeValues enum definition - * - * The operating system type. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_OSTYPEVALUES_WINDOWS = 'windows'; -const TMP_OSTYPEVALUES_LINUX = 'linux'; -const TMP_OSTYPEVALUES_DARWIN = 'darwin'; -const TMP_OSTYPEVALUES_FREEBSD = 'freebsd'; -const TMP_OSTYPEVALUES_NETBSD = 'netbsd'; -const TMP_OSTYPEVALUES_OPENBSD = 'openbsd'; -const TMP_OSTYPEVALUES_DRAGONFLYBSD = 'dragonflybsd'; -const TMP_OSTYPEVALUES_HPUX = 'hpux'; -const TMP_OSTYPEVALUES_AIX = 'aix'; -const TMP_OSTYPEVALUES_SOLARIS = 'solaris'; -const TMP_OSTYPEVALUES_Z_OS = 'z_os'; -/** - * The operating system type. - * - * @deprecated Use OS_TYPE_VALUE_WINDOWS. - */ -exports.OSTYPEVALUES_WINDOWS = TMP_OSTYPEVALUES_WINDOWS; -/** - * The operating system type. - * - * @deprecated Use OS_TYPE_VALUE_LINUX. - */ -exports.OSTYPEVALUES_LINUX = TMP_OSTYPEVALUES_LINUX; -/** - * The operating system type. - * - * @deprecated Use OS_TYPE_VALUE_DARWIN. - */ -exports.OSTYPEVALUES_DARWIN = TMP_OSTYPEVALUES_DARWIN; -/** - * The operating system type. - * - * @deprecated Use OS_TYPE_VALUE_FREEBSD. - */ -exports.OSTYPEVALUES_FREEBSD = TMP_OSTYPEVALUES_FREEBSD; -/** - * The operating system type. - * - * @deprecated Use OS_TYPE_VALUE_NETBSD. - */ -exports.OSTYPEVALUES_NETBSD = TMP_OSTYPEVALUES_NETBSD; -/** - * The operating system type. - * - * @deprecated Use OS_TYPE_VALUE_OPENBSD. - */ -exports.OSTYPEVALUES_OPENBSD = TMP_OSTYPEVALUES_OPENBSD; -/** - * The operating system type. - * - * @deprecated Use OS_TYPE_VALUE_DRAGONFLYBSD. - */ -exports.OSTYPEVALUES_DRAGONFLYBSD = TMP_OSTYPEVALUES_DRAGONFLYBSD; -/** - * The operating system type. - * - * @deprecated Use OS_TYPE_VALUE_HPUX. - */ -exports.OSTYPEVALUES_HPUX = TMP_OSTYPEVALUES_HPUX; -/** - * The operating system type. - * - * @deprecated Use OS_TYPE_VALUE_AIX. - */ -exports.OSTYPEVALUES_AIX = TMP_OSTYPEVALUES_AIX; -/** - * The operating system type. - * - * @deprecated Use OS_TYPE_VALUE_SOLARIS. - */ -exports.OSTYPEVALUES_SOLARIS = TMP_OSTYPEVALUES_SOLARIS; -/** - * The operating system type. - * - * @deprecated Use OS_TYPE_VALUE_Z_OS. - */ -exports.OSTYPEVALUES_Z_OS = TMP_OSTYPEVALUES_Z_OS; -/** - * The constant map of values for OsTypeValues. - * @deprecated Use the OSTYPEVALUES_XXXXX constants rather than the OsTypeValues.XXXXX for bundle minification. - */ -exports.OsTypeValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_OSTYPEVALUES_WINDOWS, - TMP_OSTYPEVALUES_LINUX, - TMP_OSTYPEVALUES_DARWIN, - TMP_OSTYPEVALUES_FREEBSD, - TMP_OSTYPEVALUES_NETBSD, - TMP_OSTYPEVALUES_OPENBSD, - TMP_OSTYPEVALUES_DRAGONFLYBSD, - TMP_OSTYPEVALUES_HPUX, - TMP_OSTYPEVALUES_AIX, - TMP_OSTYPEVALUES_SOLARIS, - TMP_OSTYPEVALUES_Z_OS, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for TelemetrySdkLanguageValues enum definition - * - * The language of the telemetry SDK. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_TELEMETRYSDKLANGUAGEVALUES_CPP = 'cpp'; -const TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET = 'dotnet'; -const TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG = 'erlang'; -const TMP_TELEMETRYSDKLANGUAGEVALUES_GO = 'go'; -const TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA = 'java'; -const TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS = 'nodejs'; -const TMP_TELEMETRYSDKLANGUAGEVALUES_PHP = 'php'; -const TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON = 'python'; -const TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY = 'ruby'; -const TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS = 'webjs'; -/** - * The language of the telemetry SDK. - * - * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_CPP. - */ -exports.TELEMETRYSDKLANGUAGEVALUES_CPP = TMP_TELEMETRYSDKLANGUAGEVALUES_CPP; -/** - * The language of the telemetry SDK. - * - * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET. - */ -exports.TELEMETRYSDKLANGUAGEVALUES_DOTNET = TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET; -/** - * The language of the telemetry SDK. - * - * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG. - */ -exports.TELEMETRYSDKLANGUAGEVALUES_ERLANG = TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG; -/** - * The language of the telemetry SDK. - * - * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_GO. - */ -exports.TELEMETRYSDKLANGUAGEVALUES_GO = TMP_TELEMETRYSDKLANGUAGEVALUES_GO; -/** - * The language of the telemetry SDK. - * - * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_JAVA. - */ -exports.TELEMETRYSDKLANGUAGEVALUES_JAVA = TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA; -/** - * The language of the telemetry SDK. - * - * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS. - */ -exports.TELEMETRYSDKLANGUAGEVALUES_NODEJS = TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS; -/** - * The language of the telemetry SDK. - * - * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_PHP. - */ -exports.TELEMETRYSDKLANGUAGEVALUES_PHP = TMP_TELEMETRYSDKLANGUAGEVALUES_PHP; -/** - * The language of the telemetry SDK. - * - * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON. - */ -exports.TELEMETRYSDKLANGUAGEVALUES_PYTHON = TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON; -/** - * The language of the telemetry SDK. - * - * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_RUBY. - */ -exports.TELEMETRYSDKLANGUAGEVALUES_RUBY = TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY; -/** - * The language of the telemetry SDK. - * - * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS. - */ -exports.TELEMETRYSDKLANGUAGEVALUES_WEBJS = TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS; -/** - * The constant map of values for TelemetrySdkLanguageValues. - * @deprecated Use the TELEMETRYSDKLANGUAGEVALUES_XXXXX constants rather than the TelemetrySdkLanguageValues.XXXXX for bundle minification. - */ -exports.TelemetrySdkLanguageValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_TELEMETRYSDKLANGUAGEVALUES_CPP, - TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET, - TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG, - TMP_TELEMETRYSDKLANGUAGEVALUES_GO, - TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA, - TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS, - TMP_TELEMETRYSDKLANGUAGEVALUES_PHP, - TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON, - TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY, - TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS, -]); -//# sourceMappingURL=SemanticResourceAttributes.js.map - -/***/ }), - -/***/ 2834: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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 })); -/* eslint-disable no-restricted-syntax -- - * These re-exports are only of constants, only one-level deep at this point, - * and should not cause problems for tree-shakers. - */ -__exportStar(__nccwpck_require__(85003), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 69301: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HTTP_REQUEST_METHOD_VALUE_POST = exports.HTTP_REQUEST_METHOD_VALUE_PATCH = exports.HTTP_REQUEST_METHOD_VALUE_OPTIONS = exports.HTTP_REQUEST_METHOD_VALUE_HEAD = exports.HTTP_REQUEST_METHOD_VALUE_GET = exports.HTTP_REQUEST_METHOD_VALUE_DELETE = exports.HTTP_REQUEST_METHOD_VALUE_CONNECT = exports.HTTP_REQUEST_METHOD_VALUE_OTHER = exports.ATTR_HTTP_REQUEST_METHOD = exports.ATTR_HTTP_REQUEST_HEADER = exports.ATTR_EXCEPTION_TYPE = exports.ATTR_EXCEPTION_STACKTRACE = exports.ATTR_EXCEPTION_MESSAGE = exports.ATTR_EXCEPTION_ESCAPED = exports.ERROR_TYPE_VALUE_OTHER = exports.ATTR_ERROR_TYPE = exports.ATTR_CLIENT_PORT = exports.ATTR_CLIENT_ADDRESS = exports.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS = exports.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE = exports.ATTR_ASPNETCORE_ROUTING_MATCH_STATUS = exports.ATTR_ASPNETCORE_ROUTING_IS_FALLBACK = exports.ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED = exports.ATTR_ASPNETCORE_RATE_LIMITING_POLICY = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED = exports.ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT = exports.ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE = exports.ATTR_TELEMETRY_SDK_VERSION = exports.ATTR_TELEMETRY_SDK_NAME = exports.TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS = exports.TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT = exports.TELEMETRY_SDK_LANGUAGE_VALUE_RUST = exports.TELEMETRY_SDK_LANGUAGE_VALUE_RUBY = exports.TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON = exports.TELEMETRY_SDK_LANGUAGE_VALUE_PHP = exports.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS = exports.TELEMETRY_SDK_LANGUAGE_VALUE_JAVA = exports.TELEMETRY_SDK_LANGUAGE_VALUE_GO = exports.TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG = exports.TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET = exports.TELEMETRY_SDK_LANGUAGE_VALUE_CPP = exports.ATTR_TELEMETRY_SDK_LANGUAGE = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED = exports.ATTR_ASPNETCORE_RATE_LIMITING_RESULT = void 0; -exports.SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT = exports.SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE = exports.SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN = exports.ATTR_SIGNALR_CONNECTION_STATUS = exports.ATTR_SERVICE_VERSION = exports.ATTR_SERVICE_NAME = exports.ATTR_SERVER_PORT = exports.ATTR_SERVER_ADDRESS = exports.ATTR_OTEL_STATUS_DESCRIPTION = exports.OTEL_STATUS_CODE_VALUE_OK = exports.OTEL_STATUS_CODE_VALUE_ERROR = exports.ATTR_OTEL_STATUS_CODE = exports.ATTR_OTEL_SCOPE_VERSION = exports.ATTR_OTEL_SCOPE_NAME = exports.NETWORK_TYPE_VALUE_IPV6 = exports.NETWORK_TYPE_VALUE_IPV4 = exports.ATTR_NETWORK_TYPE = exports.NETWORK_TRANSPORT_VALUE_UNIX = exports.NETWORK_TRANSPORT_VALUE_UDP = exports.NETWORK_TRANSPORT_VALUE_TCP = exports.NETWORK_TRANSPORT_VALUE_QUIC = exports.NETWORK_TRANSPORT_VALUE_PIPE = exports.ATTR_NETWORK_TRANSPORT = exports.ATTR_NETWORK_PROTOCOL_VERSION = exports.ATTR_NETWORK_PROTOCOL_NAME = exports.ATTR_NETWORK_PEER_PORT = exports.ATTR_NETWORK_PEER_ADDRESS = exports.ATTR_NETWORK_LOCAL_PORT = exports.ATTR_NETWORK_LOCAL_ADDRESS = exports.JVM_THREAD_STATE_VALUE_WAITING = exports.JVM_THREAD_STATE_VALUE_TIMED_WAITING = exports.JVM_THREAD_STATE_VALUE_TERMINATED = exports.JVM_THREAD_STATE_VALUE_RUNNABLE = exports.JVM_THREAD_STATE_VALUE_NEW = exports.JVM_THREAD_STATE_VALUE_BLOCKED = exports.ATTR_JVM_THREAD_STATE = exports.ATTR_JVM_THREAD_DAEMON = exports.JVM_MEMORY_TYPE_VALUE_NON_HEAP = exports.JVM_MEMORY_TYPE_VALUE_HEAP = exports.ATTR_JVM_MEMORY_TYPE = exports.ATTR_JVM_MEMORY_POOL_NAME = exports.ATTR_JVM_GC_NAME = exports.ATTR_JVM_GC_ACTION = exports.ATTR_HTTP_ROUTE = exports.ATTR_HTTP_RESPONSE_STATUS_CODE = exports.ATTR_HTTP_RESPONSE_HEADER = exports.ATTR_HTTP_REQUEST_RESEND_COUNT = exports.ATTR_HTTP_REQUEST_METHOD_ORIGINAL = exports.HTTP_REQUEST_METHOD_VALUE_TRACE = exports.HTTP_REQUEST_METHOD_VALUE_PUT = void 0; -exports.ATTR_USER_AGENT_ORIGINAL = exports.ATTR_URL_SCHEME = exports.ATTR_URL_QUERY = exports.ATTR_URL_PATH = exports.ATTR_URL_FULL = exports.ATTR_URL_FRAGMENT = exports.SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS = exports.SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS = exports.SIGNALR_TRANSPORT_VALUE_LONG_POLLING = exports.ATTR_SIGNALR_TRANSPORT = void 0; -//---------------------------------------------------------------------------------------------------------- -// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates/registry/stable/attributes.ts.j2 -//---------------------------------------------------------------------------------------------------------- -/** - * Rate-limiting result, shows whether the lease was acquired or contains a rejection reason - * - * @example acquired - * - * @example request_canceled - */ -exports.ATTR_ASPNETCORE_RATE_LIMITING_RESULT = 'aspnetcore.rate_limiting.result'; -/** - * Enum value "acquired" for attribute {@link ATTR_ASPNETCORE_RATE_LIMITING_RESULT}. - */ -exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED = "acquired"; -/** - * Enum value "endpoint_limiter" for attribute {@link ATTR_ASPNETCORE_RATE_LIMITING_RESULT}. - */ -exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER = "endpoint_limiter"; -/** - * Enum value "global_limiter" for attribute {@link ATTR_ASPNETCORE_RATE_LIMITING_RESULT}. - */ -exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER = "global_limiter"; -/** - * Enum value "request_canceled" for attribute {@link ATTR_ASPNETCORE_RATE_LIMITING_RESULT}. - */ -exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED = "request_canceled"; -/** - * The language of the telemetry SDK. - */ -exports.ATTR_TELEMETRY_SDK_LANGUAGE = 'telemetry.sdk.language'; -/** - * Enum value "cpp" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}. - */ -exports.TELEMETRY_SDK_LANGUAGE_VALUE_CPP = "cpp"; -/** - * Enum value "dotnet" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}. - */ -exports.TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET = "dotnet"; -/** - * Enum value "erlang" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}. - */ -exports.TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG = "erlang"; -/** - * Enum value "go" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}. - */ -exports.TELEMETRY_SDK_LANGUAGE_VALUE_GO = "go"; -/** - * Enum value "java" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}. - */ -exports.TELEMETRY_SDK_LANGUAGE_VALUE_JAVA = "java"; -/** - * Enum value "nodejs" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}. - */ -exports.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS = "nodejs"; -/** - * Enum value "php" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}. - */ -exports.TELEMETRY_SDK_LANGUAGE_VALUE_PHP = "php"; -/** - * Enum value "python" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}. - */ -exports.TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON = "python"; -/** - * Enum value "ruby" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}. - */ -exports.TELEMETRY_SDK_LANGUAGE_VALUE_RUBY = "ruby"; -/** - * Enum value "rust" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}. - */ -exports.TELEMETRY_SDK_LANGUAGE_VALUE_RUST = "rust"; -/** - * Enum value "swift" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}. - */ -exports.TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT = "swift"; -/** - * Enum value "webjs" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}. - */ -exports.TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS = "webjs"; -/** - * The name of the telemetry SDK as defined above. - * - * @example opentelemetry - * - * @note The OpenTelemetry SDK **MUST** set the `telemetry.sdk.name` attribute to `opentelemetry`. - * If another SDK, like a fork or a vendor-provided implementation, is used, this SDK **MUST** set the - * `telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point - * or another suitable identifier depending on the language. - * The identifier `opentelemetry` is reserved and **MUST** **NOT** be used in this case. - * All custom identifiers **SHOULD** be stable across different versions of an implementation. - */ -exports.ATTR_TELEMETRY_SDK_NAME = 'telemetry.sdk.name'; -/** - * The version string of the telemetry SDK. - * - * @example 1.2.3 - */ -exports.ATTR_TELEMETRY_SDK_VERSION = 'telemetry.sdk.version'; -/** - * Full type name of the [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) implementation that handled the exception. - * - * @example Contoso.MyHandler - */ -exports.ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE = 'aspnetcore.diagnostics.handler.type'; -/** - * ASP.NET Core exception middleware handling result - * - * @example handled - * - * @example unhandled - */ -exports.ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT = 'aspnetcore.diagnostics.exception.result'; -/** - * Enum value "aborted" for attribute {@link ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT}. - */ -exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED = "aborted"; -/** - * Enum value "handled" for attribute {@link ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT}. - */ -exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED = "handled"; -/** - * Enum value "skipped" for attribute {@link ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT}. - */ -exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED = "skipped"; -/** - * Enum value "unhandled" for attribute {@link ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT}. - */ -exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED = "unhandled"; -/** - * Rate limiting policy name. - * - * @example fixed - * - * @example sliding - * - * @example token - */ -exports.ATTR_ASPNETCORE_RATE_LIMITING_POLICY = 'aspnetcore.rate_limiting.policy'; -/** - * Flag indicating if request was handled by the application pipeline. - * - * @example true - */ -exports.ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED = 'aspnetcore.request.is_unhandled'; -/** - * A value that indicates whether the matched route is a fallback route. - * - * @example true - */ -exports.ATTR_ASPNETCORE_ROUTING_IS_FALLBACK = 'aspnetcore.routing.is_fallback'; -/** - * Match result - success or failure - * - * @example success - * - * @example failure - */ -exports.ATTR_ASPNETCORE_ROUTING_MATCH_STATUS = 'aspnetcore.routing.match_status'; -/** - * Enum value "failure" for attribute {@link ATTR_ASPNETCORE_ROUTING_MATCH_STATUS}. - */ -exports.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE = "failure"; -/** - * Enum value "success" for attribute {@link ATTR_ASPNETCORE_ROUTING_MATCH_STATUS}. - */ -exports.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS = "success"; -/** - * Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. - * - * @example client.example.com - * - * @example 10.1.2.80 - * - * @example /tmp/my.sock - * - * @note When observed from the server side, and when communicating through an intermediary, `client.address` **SHOULD** represent the client address behind any intermediaries, for example proxies, if it's available. - */ -exports.ATTR_CLIENT_ADDRESS = 'client.address'; -/** - * Client port number. - * - * @example 65123 - * - * @note When observed from the server side, and when communicating through an intermediary, `client.port` **SHOULD** represent the client port behind any intermediaries, for example proxies, if it's available. - */ -exports.ATTR_CLIENT_PORT = 'client.port'; -/** - * Describes a class of error the operation ended with. - * - * @example timeout - * - * @example java.net.UnknownHostException - * - * @example server_certificate_invalid - * - * @example 500 - * - * @note The `error.type` **SHOULD** be predictable, and **SHOULD** have low cardinality. - * - * When `error.type` is set to a type (e.g., an exception type), its - * canonical class name identifying the type within the artifact **SHOULD** be used. - * - * Instrumentations **SHOULD** document the list of errors they report. - * - * The cardinality of `error.type` within one instrumentation library **SHOULD** be low. - * Telemetry consumers that aggregate data from multiple instrumentation libraries and applications - * should be prepared for `error.type` to have high cardinality at query time when no - * additional filters are applied. - * - * If the operation has completed successfully, instrumentations **SHOULD** **NOT** set `error.type`. - * - * If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes), - * it's RECOMMENDED to: - * - * * Use a domain-specific attribute - * * Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not. - */ -exports.ATTR_ERROR_TYPE = 'error.type'; -/** - * Enum value "_OTHER" for attribute {@link ATTR_ERROR_TYPE}. - */ -exports.ERROR_TYPE_VALUE_OTHER = "_OTHER"; -/** - * **SHOULD** be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. - * - * @note An exception is considered to have escaped (or left) the scope of a span, - * if that span is ended while the exception is still logically "in flight". - * This may be actually "in flight" in some languages (e.g. if the exception - * is passed to a Context manager's `__exit__` method in Python) but will - * usually be caught at the point of recording the exception in most languages. - * - * It is usually not possible to determine at the point where an exception is thrown - * whether it will escape the scope of a span. - * However, it is trivial to know that an exception - * will escape, if one checks for an active exception just before ending the span, - * as done in the [example for recording span exceptions](https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans/#recording-an-exception). - * - * It follows that an exception may still escape the scope of the span - * even if the `exception.escaped` attribute was not set or set to false, - * since the event might have been recorded at a time where it was not - * clear whether the exception will escape. - */ -exports.ATTR_EXCEPTION_ESCAPED = 'exception.escaped'; -/** - * The exception message. - * - * @example Division by zero - * - * @example Can't convert 'int' object to str implicitly - */ -exports.ATTR_EXCEPTION_MESSAGE = 'exception.message'; -/** - * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. - * - * @example "Exception in thread \"main\" java.lang.RuntimeException: Test exception\\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at com.example.GenerateTrace.main(GenerateTrace.java:5)" - */ -exports.ATTR_EXCEPTION_STACKTRACE = 'exception.stacktrace'; -/** - * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. - * - * @example java.net.ConnectException - * - * @example OSError - */ -exports.ATTR_EXCEPTION_TYPE = 'exception.type'; -/** - * HTTP request headers, `` being the normalized HTTP Header name (lowercase), the value being the header values. - * - * @example http.request.header.content-type=["application/json"] - * - * @example http.request.header.x-forwarded-for=["1.2.3.4", "1.2.3.5"] - * - * @note Instrumentations **SHOULD** require an explicit configuration of which headers are to be captured. Including all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information. - * The `User-Agent` header is already captured in the `user_agent.original` attribute. Users **MAY** explicitly configure instrumentations to capture them even though it is not recommended. - * The attribute value **MUST** consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers. - */ -const ATTR_HTTP_REQUEST_HEADER = (key) => `http.request.header.${key}`; -exports.ATTR_HTTP_REQUEST_HEADER = ATTR_HTTP_REQUEST_HEADER; -/** - * HTTP request method. - * - * @example GET - * - * @example POST - * - * @example HEAD - * - * @note HTTP request method value **SHOULD** be "known" to the instrumentation. - * By default, this convention defines "known" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods) - * and the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html). - * - * If the HTTP request method is not known to instrumentation, it **MUST** set the `http.request.method` attribute to `_OTHER`. - * - * If the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, then it **MUST** provide a way to override - * the list of known HTTP methods. If this override is done via environment variable, then the environment variable **MUST** be named - * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods - * (this list **MUST** be a full override of the default known method, it is not a list of known methods in addition to the defaults). - * - * HTTP method names are case-sensitive and `http.request.method` attribute value **MUST** match a known HTTP method name exactly. - * Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, **SHOULD** populate a canonical equivalent. - * Tracing instrumentations that do so, **MUST** also set `http.request.method_original` to the original value. - */ -exports.ATTR_HTTP_REQUEST_METHOD = 'http.request.method'; -/** - * Enum value "_OTHER" for attribute {@link ATTR_HTTP_REQUEST_METHOD}. - */ -exports.HTTP_REQUEST_METHOD_VALUE_OTHER = "_OTHER"; -/** - * Enum value "CONNECT" for attribute {@link ATTR_HTTP_REQUEST_METHOD}. - */ -exports.HTTP_REQUEST_METHOD_VALUE_CONNECT = "CONNECT"; -/** - * Enum value "DELETE" for attribute {@link ATTR_HTTP_REQUEST_METHOD}. - */ -exports.HTTP_REQUEST_METHOD_VALUE_DELETE = "DELETE"; -/** - * Enum value "GET" for attribute {@link ATTR_HTTP_REQUEST_METHOD}. - */ -exports.HTTP_REQUEST_METHOD_VALUE_GET = "GET"; -/** - * Enum value "HEAD" for attribute {@link ATTR_HTTP_REQUEST_METHOD}. - */ -exports.HTTP_REQUEST_METHOD_VALUE_HEAD = "HEAD"; -/** - * Enum value "OPTIONS" for attribute {@link ATTR_HTTP_REQUEST_METHOD}. - */ -exports.HTTP_REQUEST_METHOD_VALUE_OPTIONS = "OPTIONS"; -/** - * Enum value "PATCH" for attribute {@link ATTR_HTTP_REQUEST_METHOD}. - */ -exports.HTTP_REQUEST_METHOD_VALUE_PATCH = "PATCH"; -/** - * Enum value "POST" for attribute {@link ATTR_HTTP_REQUEST_METHOD}. - */ -exports.HTTP_REQUEST_METHOD_VALUE_POST = "POST"; -/** - * Enum value "PUT" for attribute {@link ATTR_HTTP_REQUEST_METHOD}. - */ -exports.HTTP_REQUEST_METHOD_VALUE_PUT = "PUT"; -/** - * Enum value "TRACE" for attribute {@link ATTR_HTTP_REQUEST_METHOD}. - */ -exports.HTTP_REQUEST_METHOD_VALUE_TRACE = "TRACE"; -/** - * Original HTTP method sent by the client in the request line. - * - * @example GeT - * - * @example ACL - * - * @example foo - */ -exports.ATTR_HTTP_REQUEST_METHOD_ORIGINAL = 'http.request.method_original'; -/** - * The ordinal number of request resending attempt (for any reason, including redirects). - * - * @example 3 - * - * @note The resend count **SHOULD** be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other). - */ -exports.ATTR_HTTP_REQUEST_RESEND_COUNT = 'http.request.resend_count'; -/** - * HTTP response headers, `` being the normalized HTTP Header name (lowercase), the value being the header values. - * - * @example http.response.header.content-type=["application/json"] - * - * @example http.response.header.my-custom-header=["abc", "def"] - * - * @note Instrumentations **SHOULD** require an explicit configuration of which headers are to be captured. Including all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information. - * Users **MAY** explicitly configure instrumentations to capture them even though it is not recommended. - * The attribute value **MUST** consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers. - */ -const ATTR_HTTP_RESPONSE_HEADER = (key) => `http.response.header.${key}`; -exports.ATTR_HTTP_RESPONSE_HEADER = ATTR_HTTP_RESPONSE_HEADER; -/** - * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). - * - * @example 200 - */ -exports.ATTR_HTTP_RESPONSE_STATUS_CODE = 'http.response.status_code'; -/** - * The matched route, that is, the path template in the format used by the respective server framework. - * - * @example /users/:userID? - * - * @example {controller}/{action}/{id?} - * - * @note MUST **NOT** be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can **NOT** substitute it. - * SHOULD include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one. - */ -exports.ATTR_HTTP_ROUTE = 'http.route'; -/** - * Name of the garbage collector action. - * - * @example end of minor GC - * - * @example end of major GC - * - * @note Garbage collector action is generally obtained via [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()). - */ -exports.ATTR_JVM_GC_ACTION = 'jvm.gc.action'; -/** - * Name of the garbage collector. - * - * @example G1 Young Generation - * - * @example G1 Old Generation - * - * @note Garbage collector name is generally obtained via [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()). - */ -exports.ATTR_JVM_GC_NAME = 'jvm.gc.name'; -/** - * Name of the memory pool. - * - * @example G1 Old Gen - * - * @example G1 Eden space - * - * @example G1 Survivor Space - * - * @note Pool names are generally obtained via [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()). - */ -exports.ATTR_JVM_MEMORY_POOL_NAME = 'jvm.memory.pool.name'; -/** - * The type of memory. - * - * @example heap - * - * @example non_heap - */ -exports.ATTR_JVM_MEMORY_TYPE = 'jvm.memory.type'; -/** - * Enum value "heap" for attribute {@link ATTR_JVM_MEMORY_TYPE}. - */ -exports.JVM_MEMORY_TYPE_VALUE_HEAP = "heap"; -/** - * Enum value "non_heap" for attribute {@link ATTR_JVM_MEMORY_TYPE}. - */ -exports.JVM_MEMORY_TYPE_VALUE_NON_HEAP = "non_heap"; -/** - * Whether the thread is daemon or not. - */ -exports.ATTR_JVM_THREAD_DAEMON = 'jvm.thread.daemon'; -/** - * State of the thread. - * - * @example runnable - * - * @example blocked - */ -exports.ATTR_JVM_THREAD_STATE = 'jvm.thread.state'; -/** - * Enum value "blocked" for attribute {@link ATTR_JVM_THREAD_STATE}. - */ -exports.JVM_THREAD_STATE_VALUE_BLOCKED = "blocked"; -/** - * Enum value "new" for attribute {@link ATTR_JVM_THREAD_STATE}. - */ -exports.JVM_THREAD_STATE_VALUE_NEW = "new"; -/** - * Enum value "runnable" for attribute {@link ATTR_JVM_THREAD_STATE}. - */ -exports.JVM_THREAD_STATE_VALUE_RUNNABLE = "runnable"; -/** - * Enum value "terminated" for attribute {@link ATTR_JVM_THREAD_STATE}. - */ -exports.JVM_THREAD_STATE_VALUE_TERMINATED = "terminated"; -/** - * Enum value "timed_waiting" for attribute {@link ATTR_JVM_THREAD_STATE}. - */ -exports.JVM_THREAD_STATE_VALUE_TIMED_WAITING = "timed_waiting"; -/** - * Enum value "waiting" for attribute {@link ATTR_JVM_THREAD_STATE}. - */ -exports.JVM_THREAD_STATE_VALUE_WAITING = "waiting"; -/** - * Local address of the network connection - IP address or Unix domain socket name. - * - * @example 10.1.2.80 - * - * @example /tmp/my.sock - */ -exports.ATTR_NETWORK_LOCAL_ADDRESS = 'network.local.address'; -/** - * Local port number of the network connection. - * - * @example 65123 - */ -exports.ATTR_NETWORK_LOCAL_PORT = 'network.local.port'; -/** - * Peer address of the network connection - IP address or Unix domain socket name. - * - * @example 10.1.2.80 - * - * @example /tmp/my.sock - */ -exports.ATTR_NETWORK_PEER_ADDRESS = 'network.peer.address'; -/** - * Peer port number of the network connection. - * - * @example 65123 - */ -exports.ATTR_NETWORK_PEER_PORT = 'network.peer.port'; -/** - * [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. - * - * @example amqp - * - * @example http - * - * @example mqtt - * - * @note The value **SHOULD** be normalized to lowercase. - */ -exports.ATTR_NETWORK_PROTOCOL_NAME = 'network.protocol.name'; -/** - * The actual version of the protocol used for network communication. - * - * @example 1.1 - * - * @example 2 - * - * @note If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute **SHOULD** be set to the negotiated version. If the actual protocol version is not known, this attribute **SHOULD** **NOT** be set. - */ -exports.ATTR_NETWORK_PROTOCOL_VERSION = 'network.protocol.version'; -/** - * [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). - * - * @example tcp - * - * @example udp - * - * @note The value **SHOULD** be normalized to lowercase. - * - * Consider always setting the transport when setting a port number, since - * a port number is ambiguous without knowing the transport. For example - * different processes could be listening on TCP port 12345 and UDP port 12345. - */ -exports.ATTR_NETWORK_TRANSPORT = 'network.transport'; -/** - * Enum value "pipe" for attribute {@link ATTR_NETWORK_TRANSPORT}. - */ -exports.NETWORK_TRANSPORT_VALUE_PIPE = "pipe"; -/** - * Enum value "quic" for attribute {@link ATTR_NETWORK_TRANSPORT}. - */ -exports.NETWORK_TRANSPORT_VALUE_QUIC = "quic"; -/** - * Enum value "tcp" for attribute {@link ATTR_NETWORK_TRANSPORT}. - */ -exports.NETWORK_TRANSPORT_VALUE_TCP = "tcp"; -/** - * Enum value "udp" for attribute {@link ATTR_NETWORK_TRANSPORT}. - */ -exports.NETWORK_TRANSPORT_VALUE_UDP = "udp"; -/** - * Enum value "unix" for attribute {@link ATTR_NETWORK_TRANSPORT}. - */ -exports.NETWORK_TRANSPORT_VALUE_UNIX = "unix"; -/** - * [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. - * - * @example ipv4 - * - * @example ipv6 - * - * @note The value **SHOULD** be normalized to lowercase. - */ -exports.ATTR_NETWORK_TYPE = 'network.type'; -/** - * Enum value "ipv4" for attribute {@link ATTR_NETWORK_TYPE}. - */ -exports.NETWORK_TYPE_VALUE_IPV4 = "ipv4"; -/** - * Enum value "ipv6" for attribute {@link ATTR_NETWORK_TYPE}. - */ -exports.NETWORK_TYPE_VALUE_IPV6 = "ipv6"; -/** - * The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP). - * - * @example io.opentelemetry.contrib.mongodb - */ -exports.ATTR_OTEL_SCOPE_NAME = 'otel.scope.name'; -/** - * The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP). - * - * @example 1.0.0 - */ -exports.ATTR_OTEL_SCOPE_VERSION = 'otel.scope.version'; -/** - * Name of the code, either "OK" or "ERROR". **MUST** **NOT** be set if the status code is UNSET. - */ -exports.ATTR_OTEL_STATUS_CODE = 'otel.status_code'; -/** - * Enum value "ERROR" for attribute {@link ATTR_OTEL_STATUS_CODE}. - */ -exports.OTEL_STATUS_CODE_VALUE_ERROR = "ERROR"; -/** - * Enum value "OK" for attribute {@link ATTR_OTEL_STATUS_CODE}. - */ -exports.OTEL_STATUS_CODE_VALUE_OK = "OK"; -/** - * Description of the Status if it has a value, otherwise not set. - * - * @example resource not found - */ -exports.ATTR_OTEL_STATUS_DESCRIPTION = 'otel.status_description'; -/** - * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. - * - * @example example.com - * - * @example 10.1.2.80 - * - * @example /tmp/my.sock - * - * @note When observed from the client side, and when communicating through an intermediary, `server.address` **SHOULD** represent the server address behind any intermediaries, for example proxies, if it's available. - */ -exports.ATTR_SERVER_ADDRESS = 'server.address'; -/** - * Server port number. - * - * @example 80 - * - * @example 8080 - * - * @example 443 - * - * @note When observed from the client side, and when communicating through an intermediary, `server.port` **SHOULD** represent the server port behind any intermediaries, for example proxies, if it's available. - */ -exports.ATTR_SERVER_PORT = 'server.port'; -/** - * Logical name of the service. - * - * @example shoppingcart - * - * @note MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs **MUST** fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value **MUST** be set to `unknown_service`. - */ -exports.ATTR_SERVICE_NAME = 'service.name'; -/** - * The version string of the service API or implementation. The format is not defined by these conventions. - * - * @example 2.0.0 - * - * @example a01dbef8a - */ -exports.ATTR_SERVICE_VERSION = 'service.version'; -/** - * SignalR HTTP connection closure status. - * - * @example app_shutdown - * - * @example timeout - */ -exports.ATTR_SIGNALR_CONNECTION_STATUS = 'signalr.connection.status'; -/** - * Enum value "app_shutdown" for attribute {@link ATTR_SIGNALR_CONNECTION_STATUS}. - */ -exports.SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN = "app_shutdown"; -/** - * Enum value "normal_closure" for attribute {@link ATTR_SIGNALR_CONNECTION_STATUS}. - */ -exports.SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE = "normal_closure"; -/** - * Enum value "timeout" for attribute {@link ATTR_SIGNALR_CONNECTION_STATUS}. - */ -exports.SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT = "timeout"; -/** - * [SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md) - * - * @example web_sockets - * - * @example long_polling - */ -exports.ATTR_SIGNALR_TRANSPORT = 'signalr.transport'; -/** - * Enum value "long_polling" for attribute {@link ATTR_SIGNALR_TRANSPORT}. - */ -exports.SIGNALR_TRANSPORT_VALUE_LONG_POLLING = "long_polling"; -/** - * Enum value "server_sent_events" for attribute {@link ATTR_SIGNALR_TRANSPORT}. - */ -exports.SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS = "server_sent_events"; -/** - * Enum value "web_sockets" for attribute {@link ATTR_SIGNALR_TRANSPORT}. - */ -exports.SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS = "web_sockets"; -/** - * The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component - * - * @example SemConv - */ -exports.ATTR_URL_FRAGMENT = 'url.fragment'; -/** - * Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) - * - * @example https://www.foo.bar/search?q=OpenTelemetry#SemConv - * - * @example //localhost - * - * @note For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment is not transmitted over HTTP, but if it is known, it **SHOULD** be included nevertheless. - * `url.full` **MUST** **NOT** contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case username and password **SHOULD** be redacted and attribute's value **SHOULD** be `https://REDACTED:REDACTED@www.example.com/`. - * `url.full` **SHOULD** capture the absolute URL when it is available (or can be reconstructed). Sensitive content provided in `url.full` **SHOULD** be scrubbed when instrumentations can identify it. - */ -exports.ATTR_URL_FULL = 'url.full'; -/** - * The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component - * - * @example /search - * - * @note Sensitive content provided in `url.path` **SHOULD** be scrubbed when instrumentations can identify it. - */ -exports.ATTR_URL_PATH = 'url.path'; -/** - * The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component - * - * @example q=OpenTelemetry - * - * @note Sensitive content provided in `url.query` **SHOULD** be scrubbed when instrumentations can identify it. - */ -exports.ATTR_URL_QUERY = 'url.query'; -/** - * The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. - * - * @example https - * - * @example ftp - * - * @example telnet - */ -exports.ATTR_URL_SCHEME = 'url.scheme'; -/** - * Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. - * - * @example CERN-LineMode/2.15 libwww/2.17b3 - * - * @example Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1 - * - * @example YourApp/1.0.0 grpc-java-okhttp/1.27.2 - */ -exports.ATTR_USER_AGENT_ORIGINAL = 'user_agent.original'; -//# sourceMappingURL=stable_attributes.js.map - -/***/ }), - -/***/ 46152: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.METRIC_SIGNALR_SERVER_CONNECTION_DURATION = exports.METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS = exports.METRIC_KESTREL_UPGRADED_CONNECTIONS = exports.METRIC_KESTREL_TLS_HANDSHAKE_DURATION = exports.METRIC_KESTREL_REJECTED_CONNECTIONS = exports.METRIC_KESTREL_QUEUED_REQUESTS = exports.METRIC_KESTREL_QUEUED_CONNECTIONS = exports.METRIC_KESTREL_CONNECTION_DURATION = exports.METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES = exports.METRIC_KESTREL_ACTIVE_CONNECTIONS = exports.METRIC_JVM_THREAD_COUNT = exports.METRIC_JVM_MEMORY_USED_AFTER_LAST_GC = exports.METRIC_JVM_MEMORY_USED = exports.METRIC_JVM_MEMORY_LIMIT = exports.METRIC_JVM_MEMORY_COMMITTED = exports.METRIC_JVM_GC_DURATION = exports.METRIC_JVM_CPU_TIME = exports.METRIC_JVM_CPU_RECENT_UTILIZATION = exports.METRIC_JVM_CPU_COUNT = exports.METRIC_JVM_CLASS_UNLOADED = exports.METRIC_JVM_CLASS_LOADED = exports.METRIC_JVM_CLASS_COUNT = exports.METRIC_HTTP_SERVER_REQUEST_DURATION = exports.METRIC_HTTP_CLIENT_REQUEST_DURATION = exports.METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS = exports.METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS = exports.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION = exports.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE = exports.METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS = exports.METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES = exports.METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS = void 0; -//---------------------------------------------------------------------------------------------------------- -// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates/register/stable/metrics.ts.j2 -//---------------------------------------------------------------------------------------------------------- -/** - * Number of exceptions caught by exception handling middleware. - * - * @note Meter name: `Microsoft.AspNetCore.Diagnostics`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS = 'aspnetcore.diagnostics.exceptions'; -/** - * Number of requests that are currently active on the server that hold a rate limiting lease. - * - * @note Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES = 'aspnetcore.rate_limiting.active_request_leases'; -/** - * Number of requests that are currently queued, waiting to acquire a rate limiting lease. - * - * @note Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS = 'aspnetcore.rate_limiting.queued_requests'; -/** - * The time the request spent in a queue waiting to acquire a rate limiting lease. - * - * @note Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE = 'aspnetcore.rate_limiting.request.time_in_queue'; -/** - * The duration of rate limiting lease held by requests on the server. - * - * @note Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION = 'aspnetcore.rate_limiting.request_lease.duration'; -/** - * Number of requests that tried to acquire a rate limiting lease. - * - * @note Requests could be: - * - * * Rejected by global or endpoint rate limiting policies - * * Canceled while waiting for the lease. - * - * Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS = 'aspnetcore.rate_limiting.requests'; -/** - * Number of requests that were attempted to be matched to an endpoint. - * - * @note Meter name: `Microsoft.AspNetCore.Routing`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS = 'aspnetcore.routing.match_attempts'; -/** - * Duration of HTTP client requests. - */ -exports.METRIC_HTTP_CLIENT_REQUEST_DURATION = 'http.client.request.duration'; -/** - * Duration of HTTP server requests. - */ -exports.METRIC_HTTP_SERVER_REQUEST_DURATION = 'http.server.request.duration'; -/** - * Number of classes currently loaded. - */ -exports.METRIC_JVM_CLASS_COUNT = 'jvm.class.count'; -/** - * Number of classes loaded since JVM start. - */ -exports.METRIC_JVM_CLASS_LOADED = 'jvm.class.loaded'; -/** - * Number of classes unloaded since JVM start. - */ -exports.METRIC_JVM_CLASS_UNLOADED = 'jvm.class.unloaded'; -/** - * Number of processors available to the Java virtual machine. - */ -exports.METRIC_JVM_CPU_COUNT = 'jvm.cpu.count'; -/** - * Recent CPU utilization for the process as reported by the JVM. - * - * @note The value range is [0.0,1.0]. This utilization is not defined as being for the specific interval since last measurement (unlike `system.cpu.utilization`). [Reference](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getProcessCpuLoad()). - */ -exports.METRIC_JVM_CPU_RECENT_UTILIZATION = 'jvm.cpu.recent_utilization'; -/** - * CPU time used by the process as reported by the JVM. - */ -exports.METRIC_JVM_CPU_TIME = 'jvm.cpu.time'; -/** - * Duration of JVM garbage collection actions. - */ -exports.METRIC_JVM_GC_DURATION = 'jvm.gc.duration'; -/** - * Measure of memory committed. - */ -exports.METRIC_JVM_MEMORY_COMMITTED = 'jvm.memory.committed'; -/** - * Measure of max obtainable memory. - */ -exports.METRIC_JVM_MEMORY_LIMIT = 'jvm.memory.limit'; -/** - * Measure of memory used. - */ -exports.METRIC_JVM_MEMORY_USED = 'jvm.memory.used'; -/** - * Measure of memory used, as measured after the most recent garbage collection event on this pool. - */ -exports.METRIC_JVM_MEMORY_USED_AFTER_LAST_GC = 'jvm.memory.used_after_last_gc'; -/** - * Number of executing platform threads. - */ -exports.METRIC_JVM_THREAD_COUNT = 'jvm.thread.count'; -/** - * Number of connections that are currently active on the server. - * - * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_KESTREL_ACTIVE_CONNECTIONS = 'kestrel.active_connections'; -/** - * Number of TLS handshakes that are currently in progress on the server. - * - * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES = 'kestrel.active_tls_handshakes'; -/** - * The duration of connections on the server. - * - * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_KESTREL_CONNECTION_DURATION = 'kestrel.connection.duration'; -/** - * Number of connections that are currently queued and are waiting to start. - * - * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_KESTREL_QUEUED_CONNECTIONS = 'kestrel.queued_connections'; -/** - * Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start. - * - * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_KESTREL_QUEUED_REQUESTS = 'kestrel.queued_requests'; -/** - * Number of connections rejected by the server. - * - * @note Connections are rejected when the currently active count exceeds the value configured with `MaxConcurrentConnections`. - * Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_KESTREL_REJECTED_CONNECTIONS = 'kestrel.rejected_connections'; -/** - * The duration of TLS handshakes on the server. - * - * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_KESTREL_TLS_HANDSHAKE_DURATION = 'kestrel.tls_handshake.duration'; -/** - * Number of connections that are currently upgraded (WebSockets). . - * - * @note The counter only tracks HTTP/1.1 connections. - * - * Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_KESTREL_UPGRADED_CONNECTIONS = 'kestrel.upgraded_connections'; -/** - * Number of connections that are currently active on the server. - * - * @note Meter name: `Microsoft.AspNetCore.Http.Connections`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS = 'signalr.server.active_connections'; -/** - * The duration of connections on the server. - * - * @note Meter name: `Microsoft.AspNetCore.Http.Connections`; Added in: ASP.NET Core 8.0 - */ -exports.METRIC_SIGNALR_SERVER_CONNECTION_DURATION = 'signalr.server.connection.duration'; -//# sourceMappingURL=stable_metrics.js.map - -/***/ }), - -/***/ 89943: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SEMATTRS_NET_HOST_CARRIER_ICC = exports.SEMATTRS_NET_HOST_CARRIER_MNC = exports.SEMATTRS_NET_HOST_CARRIER_MCC = exports.SEMATTRS_NET_HOST_CARRIER_NAME = exports.SEMATTRS_NET_HOST_CONNECTION_SUBTYPE = exports.SEMATTRS_NET_HOST_CONNECTION_TYPE = exports.SEMATTRS_NET_HOST_NAME = exports.SEMATTRS_NET_HOST_PORT = exports.SEMATTRS_NET_HOST_IP = exports.SEMATTRS_NET_PEER_NAME = exports.SEMATTRS_NET_PEER_PORT = exports.SEMATTRS_NET_PEER_IP = exports.SEMATTRS_NET_TRANSPORT = exports.SEMATTRS_FAAS_INVOKED_REGION = exports.SEMATTRS_FAAS_INVOKED_PROVIDER = exports.SEMATTRS_FAAS_INVOKED_NAME = exports.SEMATTRS_FAAS_COLDSTART = exports.SEMATTRS_FAAS_CRON = exports.SEMATTRS_FAAS_TIME = exports.SEMATTRS_FAAS_DOCUMENT_NAME = exports.SEMATTRS_FAAS_DOCUMENT_TIME = exports.SEMATTRS_FAAS_DOCUMENT_OPERATION = exports.SEMATTRS_FAAS_DOCUMENT_COLLECTION = exports.SEMATTRS_FAAS_EXECUTION = exports.SEMATTRS_FAAS_TRIGGER = exports.SEMATTRS_EXCEPTION_ESCAPED = exports.SEMATTRS_EXCEPTION_STACKTRACE = exports.SEMATTRS_EXCEPTION_MESSAGE = exports.SEMATTRS_EXCEPTION_TYPE = exports.SEMATTRS_DB_SQL_TABLE = exports.SEMATTRS_DB_MONGODB_COLLECTION = exports.SEMATTRS_DB_REDIS_DATABASE_INDEX = exports.SEMATTRS_DB_HBASE_NAMESPACE = exports.SEMATTRS_DB_CASSANDRA_COORDINATOR_DC = exports.SEMATTRS_DB_CASSANDRA_COORDINATOR_ID = exports.SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = exports.SEMATTRS_DB_CASSANDRA_IDEMPOTENCE = exports.SEMATTRS_DB_CASSANDRA_TABLE = exports.SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL = exports.SEMATTRS_DB_CASSANDRA_PAGE_SIZE = exports.SEMATTRS_DB_CASSANDRA_KEYSPACE = exports.SEMATTRS_DB_MSSQL_INSTANCE_NAME = exports.SEMATTRS_DB_OPERATION = exports.SEMATTRS_DB_STATEMENT = exports.SEMATTRS_DB_NAME = exports.SEMATTRS_DB_JDBC_DRIVER_CLASSNAME = exports.SEMATTRS_DB_USER = exports.SEMATTRS_DB_CONNECTION_STRING = exports.SEMATTRS_DB_SYSTEM = exports.SEMATTRS_AWS_LAMBDA_INVOKED_ARN = void 0; -exports.SEMATTRS_MESSAGING_DESTINATION_KIND = exports.SEMATTRS_MESSAGING_DESTINATION = exports.SEMATTRS_MESSAGING_SYSTEM = exports.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = exports.SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = exports.SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT = exports.SEMATTRS_AWS_DYNAMODB_COUNT = exports.SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS = exports.SEMATTRS_AWS_DYNAMODB_SEGMENT = exports.SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD = exports.SEMATTRS_AWS_DYNAMODB_TABLE_COUNT = exports.SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = exports.SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = exports.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = exports.SEMATTRS_AWS_DYNAMODB_SELECT = exports.SEMATTRS_AWS_DYNAMODB_INDEX_NAME = exports.SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET = exports.SEMATTRS_AWS_DYNAMODB_LIMIT = exports.SEMATTRS_AWS_DYNAMODB_PROJECTION = exports.SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ = exports.SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = exports.SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = exports.SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = exports.SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY = exports.SEMATTRS_AWS_DYNAMODB_TABLE_NAMES = exports.SEMATTRS_HTTP_CLIENT_IP = exports.SEMATTRS_HTTP_ROUTE = exports.SEMATTRS_HTTP_SERVER_NAME = exports.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = exports.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH = exports.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = exports.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH = exports.SEMATTRS_HTTP_USER_AGENT = exports.SEMATTRS_HTTP_FLAVOR = exports.SEMATTRS_HTTP_STATUS_CODE = exports.SEMATTRS_HTTP_SCHEME = exports.SEMATTRS_HTTP_HOST = exports.SEMATTRS_HTTP_TARGET = exports.SEMATTRS_HTTP_URL = exports.SEMATTRS_HTTP_METHOD = exports.SEMATTRS_CODE_LINENO = exports.SEMATTRS_CODE_FILEPATH = exports.SEMATTRS_CODE_NAMESPACE = exports.SEMATTRS_CODE_FUNCTION = exports.SEMATTRS_THREAD_NAME = exports.SEMATTRS_THREAD_ID = exports.SEMATTRS_ENDUSER_SCOPE = exports.SEMATTRS_ENDUSER_ROLE = exports.SEMATTRS_ENDUSER_ID = exports.SEMATTRS_PEER_SERVICE = void 0; -exports.DBSYSTEMVALUES_FILEMAKER = exports.DBSYSTEMVALUES_DERBY = exports.DBSYSTEMVALUES_FIREBIRD = exports.DBSYSTEMVALUES_ADABAS = exports.DBSYSTEMVALUES_CACHE = exports.DBSYSTEMVALUES_EDB = exports.DBSYSTEMVALUES_FIRSTSQL = exports.DBSYSTEMVALUES_INGRES = exports.DBSYSTEMVALUES_HANADB = exports.DBSYSTEMVALUES_MAXDB = exports.DBSYSTEMVALUES_PROGRESS = exports.DBSYSTEMVALUES_HSQLDB = exports.DBSYSTEMVALUES_CLOUDSCAPE = exports.DBSYSTEMVALUES_HIVE = exports.DBSYSTEMVALUES_REDSHIFT = exports.DBSYSTEMVALUES_POSTGRESQL = exports.DBSYSTEMVALUES_DB2 = exports.DBSYSTEMVALUES_ORACLE = exports.DBSYSTEMVALUES_MYSQL = exports.DBSYSTEMVALUES_MSSQL = exports.DBSYSTEMVALUES_OTHER_SQL = exports.SemanticAttributes = exports.SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE = exports.SEMATTRS_MESSAGE_COMPRESSED_SIZE = exports.SEMATTRS_MESSAGE_ID = exports.SEMATTRS_MESSAGE_TYPE = exports.SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE = exports.SEMATTRS_RPC_JSONRPC_ERROR_CODE = exports.SEMATTRS_RPC_JSONRPC_REQUEST_ID = exports.SEMATTRS_RPC_JSONRPC_VERSION = exports.SEMATTRS_RPC_GRPC_STATUS_CODE = exports.SEMATTRS_RPC_METHOD = exports.SEMATTRS_RPC_SERVICE = exports.SEMATTRS_RPC_SYSTEM = exports.SEMATTRS_MESSAGING_KAFKA_TOMBSTONE = exports.SEMATTRS_MESSAGING_KAFKA_PARTITION = exports.SEMATTRS_MESSAGING_KAFKA_CLIENT_ID = exports.SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP = exports.SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY = exports.SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY = exports.SEMATTRS_MESSAGING_CONSUMER_ID = exports.SEMATTRS_MESSAGING_OPERATION = exports.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = exports.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = exports.SEMATTRS_MESSAGING_CONVERSATION_ID = exports.SEMATTRS_MESSAGING_MESSAGE_ID = exports.SEMATTRS_MESSAGING_URL = exports.SEMATTRS_MESSAGING_PROTOCOL_VERSION = exports.SEMATTRS_MESSAGING_PROTOCOL = exports.SEMATTRS_MESSAGING_TEMP_DESTINATION = void 0; -exports.FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = exports.FaasDocumentOperationValues = exports.FAASDOCUMENTOPERATIONVALUES_DELETE = exports.FAASDOCUMENTOPERATIONVALUES_EDIT = exports.FAASDOCUMENTOPERATIONVALUES_INSERT = exports.FaasTriggerValues = exports.FAASTRIGGERVALUES_OTHER = exports.FAASTRIGGERVALUES_TIMER = exports.FAASTRIGGERVALUES_PUBSUB = exports.FAASTRIGGERVALUES_HTTP = exports.FAASTRIGGERVALUES_DATASOURCE = exports.DbCassandraConsistencyLevelValues = exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = exports.DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = exports.DBCASSANDRACONSISTENCYLEVELVALUES_ANY = exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = exports.DBCASSANDRACONSISTENCYLEVELVALUES_THREE = exports.DBCASSANDRACONSISTENCYLEVELVALUES_TWO = exports.DBCASSANDRACONSISTENCYLEVELVALUES_ONE = exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = exports.DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = exports.DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = exports.DBCASSANDRACONSISTENCYLEVELVALUES_ALL = exports.DbSystemValues = exports.DBSYSTEMVALUES_COCKROACHDB = exports.DBSYSTEMVALUES_MEMCACHED = exports.DBSYSTEMVALUES_ELASTICSEARCH = exports.DBSYSTEMVALUES_GEODE = exports.DBSYSTEMVALUES_NEO4J = exports.DBSYSTEMVALUES_DYNAMODB = exports.DBSYSTEMVALUES_COSMOSDB = exports.DBSYSTEMVALUES_COUCHDB = exports.DBSYSTEMVALUES_COUCHBASE = exports.DBSYSTEMVALUES_REDIS = exports.DBSYSTEMVALUES_MONGODB = exports.DBSYSTEMVALUES_HBASE = exports.DBSYSTEMVALUES_CASSANDRA = exports.DBSYSTEMVALUES_COLDFUSION = exports.DBSYSTEMVALUES_H2 = exports.DBSYSTEMVALUES_VERTICA = exports.DBSYSTEMVALUES_TERADATA = exports.DBSYSTEMVALUES_SYBASE = exports.DBSYSTEMVALUES_SQLITE = exports.DBSYSTEMVALUES_POINTBASE = exports.DBSYSTEMVALUES_PERVASIVE = exports.DBSYSTEMVALUES_NETEZZA = exports.DBSYSTEMVALUES_MARIADB = exports.DBSYSTEMVALUES_INTERBASE = exports.DBSYSTEMVALUES_INSTANTDB = exports.DBSYSTEMVALUES_INFORMIX = void 0; -exports.MESSAGINGOPERATIONVALUES_RECEIVE = exports.MessagingDestinationKindValues = exports.MESSAGINGDESTINATIONKINDVALUES_TOPIC = exports.MESSAGINGDESTINATIONKINDVALUES_QUEUE = exports.HttpFlavorValues = exports.HTTPFLAVORVALUES_QUIC = exports.HTTPFLAVORVALUES_SPDY = exports.HTTPFLAVORVALUES_HTTP_2_0 = exports.HTTPFLAVORVALUES_HTTP_1_1 = exports.HTTPFLAVORVALUES_HTTP_1_0 = exports.NetHostConnectionSubtypeValues = exports.NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_NR = exports.NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = exports.NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_GSM = exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = exports.NETHOSTCONNECTIONSUBTYPEVALUES_LTE = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = exports.NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = exports.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = exports.NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = exports.NetHostConnectionTypeValues = exports.NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = exports.NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = exports.NETHOSTCONNECTIONTYPEVALUES_CELL = exports.NETHOSTCONNECTIONTYPEVALUES_WIRED = exports.NETHOSTCONNECTIONTYPEVALUES_WIFI = exports.NetTransportValues = exports.NETTRANSPORTVALUES_OTHER = exports.NETTRANSPORTVALUES_INPROC = exports.NETTRANSPORTVALUES_PIPE = exports.NETTRANSPORTVALUES_UNIX = exports.NETTRANSPORTVALUES_IP = exports.NETTRANSPORTVALUES_IP_UDP = exports.NETTRANSPORTVALUES_IP_TCP = exports.FaasInvokedProviderValues = exports.FAASINVOKEDPROVIDERVALUES_GCP = exports.FAASINVOKEDPROVIDERVALUES_AZURE = exports.FAASINVOKEDPROVIDERVALUES_AWS = void 0; -exports.MessageTypeValues = exports.MESSAGETYPEVALUES_RECEIVED = exports.MESSAGETYPEVALUES_SENT = exports.RpcGrpcStatusCodeValues = exports.RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = exports.RPCGRPCSTATUSCODEVALUES_DATA_LOSS = exports.RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = exports.RPCGRPCSTATUSCODEVALUES_INTERNAL = exports.RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = exports.RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = exports.RPCGRPCSTATUSCODEVALUES_ABORTED = exports.RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = exports.RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = exports.RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = exports.RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = exports.RPCGRPCSTATUSCODEVALUES_NOT_FOUND = exports.RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = exports.RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = exports.RPCGRPCSTATUSCODEVALUES_UNKNOWN = exports.RPCGRPCSTATUSCODEVALUES_CANCELLED = exports.RPCGRPCSTATUSCODEVALUES_OK = exports.MessagingOperationValues = exports.MESSAGINGOPERATIONVALUES_PROCESS = void 0; -const utils_1 = __nccwpck_require__(749); -//---------------------------------------------------------------------------------------------------------- -// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2 -//---------------------------------------------------------------------------------------------------------- -//---------------------------------------------------------------------------------------------------------- -// Constant values for SemanticAttributes -//---------------------------------------------------------------------------------------------------------- -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_AWS_LAMBDA_INVOKED_ARN = 'aws.lambda.invoked_arn'; -const TMP_DB_SYSTEM = 'db.system'; -const TMP_DB_CONNECTION_STRING = 'db.connection_string'; -const TMP_DB_USER = 'db.user'; -const TMP_DB_JDBC_DRIVER_CLASSNAME = 'db.jdbc.driver_classname'; -const TMP_DB_NAME = 'db.name'; -const TMP_DB_STATEMENT = 'db.statement'; -const TMP_DB_OPERATION = 'db.operation'; -const TMP_DB_MSSQL_INSTANCE_NAME = 'db.mssql.instance_name'; -const TMP_DB_CASSANDRA_KEYSPACE = 'db.cassandra.keyspace'; -const TMP_DB_CASSANDRA_PAGE_SIZE = 'db.cassandra.page_size'; -const TMP_DB_CASSANDRA_CONSISTENCY_LEVEL = 'db.cassandra.consistency_level'; -const TMP_DB_CASSANDRA_TABLE = 'db.cassandra.table'; -const TMP_DB_CASSANDRA_IDEMPOTENCE = 'db.cassandra.idempotence'; -const TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = 'db.cassandra.speculative_execution_count'; -const TMP_DB_CASSANDRA_COORDINATOR_ID = 'db.cassandra.coordinator.id'; -const TMP_DB_CASSANDRA_COORDINATOR_DC = 'db.cassandra.coordinator.dc'; -const TMP_DB_HBASE_NAMESPACE = 'db.hbase.namespace'; -const TMP_DB_REDIS_DATABASE_INDEX = 'db.redis.database_index'; -const TMP_DB_MONGODB_COLLECTION = 'db.mongodb.collection'; -const TMP_DB_SQL_TABLE = 'db.sql.table'; -const TMP_EXCEPTION_TYPE = 'exception.type'; -const TMP_EXCEPTION_MESSAGE = 'exception.message'; -const TMP_EXCEPTION_STACKTRACE = 'exception.stacktrace'; -const TMP_EXCEPTION_ESCAPED = 'exception.escaped'; -const TMP_FAAS_TRIGGER = 'faas.trigger'; -const TMP_FAAS_EXECUTION = 'faas.execution'; -const TMP_FAAS_DOCUMENT_COLLECTION = 'faas.document.collection'; -const TMP_FAAS_DOCUMENT_OPERATION = 'faas.document.operation'; -const TMP_FAAS_DOCUMENT_TIME = 'faas.document.time'; -const TMP_FAAS_DOCUMENT_NAME = 'faas.document.name'; -const TMP_FAAS_TIME = 'faas.time'; -const TMP_FAAS_CRON = 'faas.cron'; -const TMP_FAAS_COLDSTART = 'faas.coldstart'; -const TMP_FAAS_INVOKED_NAME = 'faas.invoked_name'; -const TMP_FAAS_INVOKED_PROVIDER = 'faas.invoked_provider'; -const TMP_FAAS_INVOKED_REGION = 'faas.invoked_region'; -const TMP_NET_TRANSPORT = 'net.transport'; -const TMP_NET_PEER_IP = 'net.peer.ip'; -const TMP_NET_PEER_PORT = 'net.peer.port'; -const TMP_NET_PEER_NAME = 'net.peer.name'; -const TMP_NET_HOST_IP = 'net.host.ip'; -const TMP_NET_HOST_PORT = 'net.host.port'; -const TMP_NET_HOST_NAME = 'net.host.name'; -const TMP_NET_HOST_CONNECTION_TYPE = 'net.host.connection.type'; -const TMP_NET_HOST_CONNECTION_SUBTYPE = 'net.host.connection.subtype'; -const TMP_NET_HOST_CARRIER_NAME = 'net.host.carrier.name'; -const TMP_NET_HOST_CARRIER_MCC = 'net.host.carrier.mcc'; -const TMP_NET_HOST_CARRIER_MNC = 'net.host.carrier.mnc'; -const TMP_NET_HOST_CARRIER_ICC = 'net.host.carrier.icc'; -const TMP_PEER_SERVICE = 'peer.service'; -const TMP_ENDUSER_ID = 'enduser.id'; -const TMP_ENDUSER_ROLE = 'enduser.role'; -const TMP_ENDUSER_SCOPE = 'enduser.scope'; -const TMP_THREAD_ID = 'thread.id'; -const TMP_THREAD_NAME = 'thread.name'; -const TMP_CODE_FUNCTION = 'code.function'; -const TMP_CODE_NAMESPACE = 'code.namespace'; -const TMP_CODE_FILEPATH = 'code.filepath'; -const TMP_CODE_LINENO = 'code.lineno'; -const TMP_HTTP_METHOD = 'http.method'; -const TMP_HTTP_URL = 'http.url'; -const TMP_HTTP_TARGET = 'http.target'; -const TMP_HTTP_HOST = 'http.host'; -const TMP_HTTP_SCHEME = 'http.scheme'; -const TMP_HTTP_STATUS_CODE = 'http.status_code'; -const TMP_HTTP_FLAVOR = 'http.flavor'; -const TMP_HTTP_USER_AGENT = 'http.user_agent'; -const TMP_HTTP_REQUEST_CONTENT_LENGTH = 'http.request_content_length'; -const TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = 'http.request_content_length_uncompressed'; -const TMP_HTTP_RESPONSE_CONTENT_LENGTH = 'http.response_content_length'; -const TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = 'http.response_content_length_uncompressed'; -const TMP_HTTP_SERVER_NAME = 'http.server_name'; -const TMP_HTTP_ROUTE = 'http.route'; -const TMP_HTTP_CLIENT_IP = 'http.client_ip'; -const TMP_AWS_DYNAMODB_TABLE_NAMES = 'aws.dynamodb.table_names'; -const TMP_AWS_DYNAMODB_CONSUMED_CAPACITY = 'aws.dynamodb.consumed_capacity'; -const TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = 'aws.dynamodb.item_collection_metrics'; -const TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = 'aws.dynamodb.provisioned_read_capacity'; -const TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = 'aws.dynamodb.provisioned_write_capacity'; -const TMP_AWS_DYNAMODB_CONSISTENT_READ = 'aws.dynamodb.consistent_read'; -const TMP_AWS_DYNAMODB_PROJECTION = 'aws.dynamodb.projection'; -const TMP_AWS_DYNAMODB_LIMIT = 'aws.dynamodb.limit'; -const TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET = 'aws.dynamodb.attributes_to_get'; -const TMP_AWS_DYNAMODB_INDEX_NAME = 'aws.dynamodb.index_name'; -const TMP_AWS_DYNAMODB_SELECT = 'aws.dynamodb.select'; -const TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = 'aws.dynamodb.global_secondary_indexes'; -const TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = 'aws.dynamodb.local_secondary_indexes'; -const TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = 'aws.dynamodb.exclusive_start_table'; -const TMP_AWS_DYNAMODB_TABLE_COUNT = 'aws.dynamodb.table_count'; -const TMP_AWS_DYNAMODB_SCAN_FORWARD = 'aws.dynamodb.scan_forward'; -const TMP_AWS_DYNAMODB_SEGMENT = 'aws.dynamodb.segment'; -const TMP_AWS_DYNAMODB_TOTAL_SEGMENTS = 'aws.dynamodb.total_segments'; -const TMP_AWS_DYNAMODB_COUNT = 'aws.dynamodb.count'; -const TMP_AWS_DYNAMODB_SCANNED_COUNT = 'aws.dynamodb.scanned_count'; -const TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = 'aws.dynamodb.attribute_definitions'; -const TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = 'aws.dynamodb.global_secondary_index_updates'; -const TMP_MESSAGING_SYSTEM = 'messaging.system'; -const TMP_MESSAGING_DESTINATION = 'messaging.destination'; -const TMP_MESSAGING_DESTINATION_KIND = 'messaging.destination_kind'; -const TMP_MESSAGING_TEMP_DESTINATION = 'messaging.temp_destination'; -const TMP_MESSAGING_PROTOCOL = 'messaging.protocol'; -const TMP_MESSAGING_PROTOCOL_VERSION = 'messaging.protocol_version'; -const TMP_MESSAGING_URL = 'messaging.url'; -const TMP_MESSAGING_MESSAGE_ID = 'messaging.message_id'; -const TMP_MESSAGING_CONVERSATION_ID = 'messaging.conversation_id'; -const TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = 'messaging.message_payload_size_bytes'; -const TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = 'messaging.message_payload_compressed_size_bytes'; -const TMP_MESSAGING_OPERATION = 'messaging.operation'; -const TMP_MESSAGING_CONSUMER_ID = 'messaging.consumer_id'; -const TMP_MESSAGING_RABBITMQ_ROUTING_KEY = 'messaging.rabbitmq.routing_key'; -const TMP_MESSAGING_KAFKA_MESSAGE_KEY = 'messaging.kafka.message_key'; -const TMP_MESSAGING_KAFKA_CONSUMER_GROUP = 'messaging.kafka.consumer_group'; -const TMP_MESSAGING_KAFKA_CLIENT_ID = 'messaging.kafka.client_id'; -const TMP_MESSAGING_KAFKA_PARTITION = 'messaging.kafka.partition'; -const TMP_MESSAGING_KAFKA_TOMBSTONE = 'messaging.kafka.tombstone'; -const TMP_RPC_SYSTEM = 'rpc.system'; -const TMP_RPC_SERVICE = 'rpc.service'; -const TMP_RPC_METHOD = 'rpc.method'; -const TMP_RPC_GRPC_STATUS_CODE = 'rpc.grpc.status_code'; -const TMP_RPC_JSONRPC_VERSION = 'rpc.jsonrpc.version'; -const TMP_RPC_JSONRPC_REQUEST_ID = 'rpc.jsonrpc.request_id'; -const TMP_RPC_JSONRPC_ERROR_CODE = 'rpc.jsonrpc.error_code'; -const TMP_RPC_JSONRPC_ERROR_MESSAGE = 'rpc.jsonrpc.error_message'; -const TMP_MESSAGE_TYPE = 'message.type'; -const TMP_MESSAGE_ID = 'message.id'; -const TMP_MESSAGE_COMPRESSED_SIZE = 'message.compressed_size'; -const TMP_MESSAGE_UNCOMPRESSED_SIZE = 'message.uncompressed_size'; -/** - * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable). - * - * Note: This may be different from `faas.id` if an alias is involved. - * - * @deprecated use ATTR_AWS_LAMBDA_INVOKED_ARN - */ -exports.SEMATTRS_AWS_LAMBDA_INVOKED_ARN = TMP_AWS_LAMBDA_INVOKED_ARN; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated use ATTR_DB_SYSTEM - */ -exports.SEMATTRS_DB_SYSTEM = TMP_DB_SYSTEM; -/** - * The connection string used to connect to the database. It is recommended to remove embedded credentials. - * - * @deprecated use ATTR_DB_CONNECTION_STRING - */ -exports.SEMATTRS_DB_CONNECTION_STRING = TMP_DB_CONNECTION_STRING; -/** - * Username for accessing the database. - * - * @deprecated use ATTR_DB_USER - */ -exports.SEMATTRS_DB_USER = TMP_DB_USER; -/** - * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect. - * - * @deprecated use ATTR_DB_JDBC_DRIVER_CLASSNAME - */ -exports.SEMATTRS_DB_JDBC_DRIVER_CLASSNAME = TMP_DB_JDBC_DRIVER_CLASSNAME; -/** - * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails). - * - * Note: In some SQL databases, the database name to be used is called "schema name". - * - * @deprecated use ATTR_DB_NAME - */ -exports.SEMATTRS_DB_NAME = TMP_DB_NAME; -/** - * The database statement being executed. - * - * Note: The value may be sanitized to exclude sensitive information. - * - * @deprecated use ATTR_DB_STATEMENT - */ -exports.SEMATTRS_DB_STATEMENT = TMP_DB_STATEMENT; -/** - * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword. - * - * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted. - * - * @deprecated use ATTR_DB_OPERATION - */ -exports.SEMATTRS_DB_OPERATION = TMP_DB_OPERATION; -/** - * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance. - * - * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard). - * - * @deprecated use ATTR_DB_MSSQL_INSTANCE_NAME - */ -exports.SEMATTRS_DB_MSSQL_INSTANCE_NAME = TMP_DB_MSSQL_INSTANCE_NAME; -/** - * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute. - * - * @deprecated use ATTR_DB_CASSANDRA_KEYSPACE - */ -exports.SEMATTRS_DB_CASSANDRA_KEYSPACE = TMP_DB_CASSANDRA_KEYSPACE; -/** - * The fetch size used for paging, i.e. how many rows will be returned at once. - * - * @deprecated use ATTR_DB_CASSANDRA_PAGE_SIZE - */ -exports.SEMATTRS_DB_CASSANDRA_PAGE_SIZE = TMP_DB_CASSANDRA_PAGE_SIZE; -/** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - * - * @deprecated use ATTR_DB_CASSANDRA_CONSISTENCY_LEVEL - */ -exports.SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL = TMP_DB_CASSANDRA_CONSISTENCY_LEVEL; -/** - * The name of the primary table that the operation is acting upon, including the schema name (if applicable). - * - * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. - * - * @deprecated use ATTR_DB_CASSANDRA_TABLE - */ -exports.SEMATTRS_DB_CASSANDRA_TABLE = TMP_DB_CASSANDRA_TABLE; -/** - * Whether or not the query is idempotent. - * - * @deprecated use ATTR_DB_CASSANDRA_IDEMPOTENCE - */ -exports.SEMATTRS_DB_CASSANDRA_IDEMPOTENCE = TMP_DB_CASSANDRA_IDEMPOTENCE; -/** - * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. - * - * @deprecated use ATTR_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT - */ -exports.SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT; -/** - * The ID of the coordinating node for a query. - * - * @deprecated use ATTR_DB_CASSANDRA_COORDINATOR_ID - */ -exports.SEMATTRS_DB_CASSANDRA_COORDINATOR_ID = TMP_DB_CASSANDRA_COORDINATOR_ID; -/** - * The data center of the coordinating node for a query. - * - * @deprecated use ATTR_DB_CASSANDRA_COORDINATOR_DC - */ -exports.SEMATTRS_DB_CASSANDRA_COORDINATOR_DC = TMP_DB_CASSANDRA_COORDINATOR_DC; -/** - * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute. - * - * @deprecated use ATTR_DB_HBASE_NAMESPACE - */ -exports.SEMATTRS_DB_HBASE_NAMESPACE = TMP_DB_HBASE_NAMESPACE; -/** - * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute. - * - * @deprecated use ATTR_DB_REDIS_DATABASE_INDEX - */ -exports.SEMATTRS_DB_REDIS_DATABASE_INDEX = TMP_DB_REDIS_DATABASE_INDEX; -/** - * The collection being accessed within the database stated in `db.name`. - * - * @deprecated use ATTR_DB_MONGODB_COLLECTION - */ -exports.SEMATTRS_DB_MONGODB_COLLECTION = TMP_DB_MONGODB_COLLECTION; -/** - * The name of the primary table that the operation is acting upon, including the schema name (if applicable). - * - * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set. - * - * @deprecated use ATTR_DB_SQL_TABLE - */ -exports.SEMATTRS_DB_SQL_TABLE = TMP_DB_SQL_TABLE; -/** - * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. - * - * @deprecated use ATTR_EXCEPTION_TYPE - */ -exports.SEMATTRS_EXCEPTION_TYPE = TMP_EXCEPTION_TYPE; -/** - * The exception message. - * - * @deprecated use ATTR_EXCEPTION_MESSAGE - */ -exports.SEMATTRS_EXCEPTION_MESSAGE = TMP_EXCEPTION_MESSAGE; -/** - * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG. - * - * @deprecated use ATTR_EXCEPTION_STACKTRACE - */ -exports.SEMATTRS_EXCEPTION_STACKTRACE = TMP_EXCEPTION_STACKTRACE; -/** -* SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span. -* -* Note: An exception is considered to have escaped (or left) the scope of a span, -if that span is ended while the exception is still logically "in flight". -This may be actually "in flight" in some languages (e.g. if the exception -is passed to a Context manager's `__exit__` method in Python) but will -usually be caught at the point of recording the exception in most languages. - -It is usually not possible to determine at the point where an exception is thrown -whether it will escape the scope of a span. -However, it is trivial to know that an exception -will escape, if one checks for an active exception just before ending the span, -as done in the [example above](#exception-end-example). - -It follows that an exception may still escape the scope of the span -even if the `exception.escaped` attribute was not set or set to false, -since the event might have been recorded at a time where it was not -clear whether the exception will escape. -* -* @deprecated use ATTR_EXCEPTION_ESCAPED -*/ -exports.SEMATTRS_EXCEPTION_ESCAPED = TMP_EXCEPTION_ESCAPED; -/** - * Type of the trigger on which the function is executed. - * - * @deprecated use ATTR_FAAS_TRIGGER - */ -exports.SEMATTRS_FAAS_TRIGGER = TMP_FAAS_TRIGGER; -/** - * The execution ID of the current function execution. - * - * @deprecated use ATTR_FAAS_EXECUTION - */ -exports.SEMATTRS_FAAS_EXECUTION = TMP_FAAS_EXECUTION; -/** - * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name. - * - * @deprecated use ATTR_FAAS_DOCUMENT_COLLECTION - */ -exports.SEMATTRS_FAAS_DOCUMENT_COLLECTION = TMP_FAAS_DOCUMENT_COLLECTION; -/** - * Describes the type of the operation that was performed on the data. - * - * @deprecated use ATTR_FAAS_DOCUMENT_OPERATION - */ -exports.SEMATTRS_FAAS_DOCUMENT_OPERATION = TMP_FAAS_DOCUMENT_OPERATION; -/** - * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - * - * @deprecated use ATTR_FAAS_DOCUMENT_TIME - */ -exports.SEMATTRS_FAAS_DOCUMENT_TIME = TMP_FAAS_DOCUMENT_TIME; -/** - * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name. - * - * @deprecated use ATTR_FAAS_DOCUMENT_NAME - */ -exports.SEMATTRS_FAAS_DOCUMENT_NAME = TMP_FAAS_DOCUMENT_NAME; -/** - * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - * - * @deprecated use ATTR_FAAS_TIME - */ -exports.SEMATTRS_FAAS_TIME = TMP_FAAS_TIME; -/** - * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). - * - * @deprecated use ATTR_FAAS_CRON - */ -exports.SEMATTRS_FAAS_CRON = TMP_FAAS_CRON; -/** - * A boolean that is true if the serverless function is executed for the first time (aka cold-start). - * - * @deprecated use ATTR_FAAS_COLDSTART - */ -exports.SEMATTRS_FAAS_COLDSTART = TMP_FAAS_COLDSTART; -/** - * The name of the invoked function. - * - * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function. - * - * @deprecated use ATTR_FAAS_INVOKED_NAME - */ -exports.SEMATTRS_FAAS_INVOKED_NAME = TMP_FAAS_INVOKED_NAME; -/** - * The cloud provider of the invoked function. - * - * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. - * - * @deprecated use ATTR_FAAS_INVOKED_PROVIDER - */ -exports.SEMATTRS_FAAS_INVOKED_PROVIDER = TMP_FAAS_INVOKED_PROVIDER; -/** - * The cloud region of the invoked function. - * - * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function. - * - * @deprecated use ATTR_FAAS_INVOKED_REGION - */ -exports.SEMATTRS_FAAS_INVOKED_REGION = TMP_FAAS_INVOKED_REGION; -/** - * Transport protocol used. See note below. - * - * @deprecated use ATTR_NET_TRANSPORT - */ -exports.SEMATTRS_NET_TRANSPORT = TMP_NET_TRANSPORT; -/** - * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6). - * - * @deprecated use ATTR_NET_PEER_IP - */ -exports.SEMATTRS_NET_PEER_IP = TMP_NET_PEER_IP; -/** - * Remote port number. - * - * @deprecated use ATTR_NET_PEER_PORT - */ -exports.SEMATTRS_NET_PEER_PORT = TMP_NET_PEER_PORT; -/** - * Remote hostname or similar, see note below. - * - * @deprecated use ATTR_NET_PEER_NAME - */ -exports.SEMATTRS_NET_PEER_NAME = TMP_NET_PEER_NAME; -/** - * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host. - * - * @deprecated use ATTR_NET_HOST_IP - */ -exports.SEMATTRS_NET_HOST_IP = TMP_NET_HOST_IP; -/** - * Like `net.peer.port` but for the host port. - * - * @deprecated use ATTR_NET_HOST_PORT - */ -exports.SEMATTRS_NET_HOST_PORT = TMP_NET_HOST_PORT; -/** - * Local hostname or similar, see note below. - * - * @deprecated use ATTR_NET_HOST_NAME - */ -exports.SEMATTRS_NET_HOST_NAME = TMP_NET_HOST_NAME; -/** - * The internet connection type currently being used by the host. - * - * @deprecated use ATTR_NET_HOST_CONNECTION_TYPE - */ -exports.SEMATTRS_NET_HOST_CONNECTION_TYPE = TMP_NET_HOST_CONNECTION_TYPE; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated use ATTR_NET_HOST_CONNECTION_SUBTYPE - */ -exports.SEMATTRS_NET_HOST_CONNECTION_SUBTYPE = TMP_NET_HOST_CONNECTION_SUBTYPE; -/** - * The name of the mobile carrier. - * - * @deprecated use ATTR_NET_HOST_CARRIER_NAME - */ -exports.SEMATTRS_NET_HOST_CARRIER_NAME = TMP_NET_HOST_CARRIER_NAME; -/** - * The mobile carrier country code. - * - * @deprecated use ATTR_NET_HOST_CARRIER_MCC - */ -exports.SEMATTRS_NET_HOST_CARRIER_MCC = TMP_NET_HOST_CARRIER_MCC; -/** - * The mobile carrier network code. - * - * @deprecated use ATTR_NET_HOST_CARRIER_MNC - */ -exports.SEMATTRS_NET_HOST_CARRIER_MNC = TMP_NET_HOST_CARRIER_MNC; -/** - * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network. - * - * @deprecated use ATTR_NET_HOST_CARRIER_ICC - */ -exports.SEMATTRS_NET_HOST_CARRIER_ICC = TMP_NET_HOST_CARRIER_ICC; -/** - * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any. - * - * @deprecated use ATTR_PEER_SERVICE - */ -exports.SEMATTRS_PEER_SERVICE = TMP_PEER_SERVICE; -/** - * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system. - * - * @deprecated use ATTR_ENDUSER_ID - */ -exports.SEMATTRS_ENDUSER_ID = TMP_ENDUSER_ID; -/** - * Actual/assumed role the client is making the request under extracted from token or application security context. - * - * @deprecated use ATTR_ENDUSER_ROLE - */ -exports.SEMATTRS_ENDUSER_ROLE = TMP_ENDUSER_ROLE; -/** - * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). - * - * @deprecated use ATTR_ENDUSER_SCOPE - */ -exports.SEMATTRS_ENDUSER_SCOPE = TMP_ENDUSER_SCOPE; -/** - * Current "managed" thread ID (as opposed to OS thread ID). - * - * @deprecated use ATTR_THREAD_ID - */ -exports.SEMATTRS_THREAD_ID = TMP_THREAD_ID; -/** - * Current thread name. - * - * @deprecated use ATTR_THREAD_NAME - */ -exports.SEMATTRS_THREAD_NAME = TMP_THREAD_NAME; -/** - * The method or function name, or equivalent (usually rightmost part of the code unit's name). - * - * @deprecated use ATTR_CODE_FUNCTION - */ -exports.SEMATTRS_CODE_FUNCTION = TMP_CODE_FUNCTION; -/** - * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit. - * - * @deprecated use ATTR_CODE_NAMESPACE - */ -exports.SEMATTRS_CODE_NAMESPACE = TMP_CODE_NAMESPACE; -/** - * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). - * - * @deprecated use ATTR_CODE_FILEPATH - */ -exports.SEMATTRS_CODE_FILEPATH = TMP_CODE_FILEPATH; -/** - * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`. - * - * @deprecated use ATTR_CODE_LINENO - */ -exports.SEMATTRS_CODE_LINENO = TMP_CODE_LINENO; -/** - * HTTP request method. - * - * @deprecated use ATTR_HTTP_METHOD - */ -exports.SEMATTRS_HTTP_METHOD = TMP_HTTP_METHOD; -/** - * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless. - * - * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`. - * - * @deprecated use ATTR_HTTP_URL - */ -exports.SEMATTRS_HTTP_URL = TMP_HTTP_URL; -/** - * The full request target as passed in a HTTP request line or equivalent. - * - * @deprecated use ATTR_HTTP_TARGET - */ -exports.SEMATTRS_HTTP_TARGET = TMP_HTTP_TARGET; -/** - * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note. - * - * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set. - * - * @deprecated use ATTR_HTTP_HOST - */ -exports.SEMATTRS_HTTP_HOST = TMP_HTTP_HOST; -/** - * The URI scheme identifying the used protocol. - * - * @deprecated use ATTR_HTTP_SCHEME - */ -exports.SEMATTRS_HTTP_SCHEME = TMP_HTTP_SCHEME; -/** - * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). - * - * @deprecated use ATTR_HTTP_STATUS_CODE - */ -exports.SEMATTRS_HTTP_STATUS_CODE = TMP_HTTP_STATUS_CODE; -/** - * Kind of HTTP protocol used. - * - * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. - * - * @deprecated use ATTR_HTTP_FLAVOR - */ -exports.SEMATTRS_HTTP_FLAVOR = TMP_HTTP_FLAVOR; -/** - * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client. - * - * @deprecated use ATTR_HTTP_USER_AGENT - */ -exports.SEMATTRS_HTTP_USER_AGENT = TMP_HTTP_USER_AGENT; -/** - * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. - * - * @deprecated use ATTR_HTTP_REQUEST_CONTENT_LENGTH - */ -exports.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH = TMP_HTTP_REQUEST_CONTENT_LENGTH; -/** - * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used. - * - * @deprecated use ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED - */ -exports.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED; -/** - * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. - * - * @deprecated use ATTR_HTTP_RESPONSE_CONTENT_LENGTH - */ -exports.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH = TMP_HTTP_RESPONSE_CONTENT_LENGTH; -/** - * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used. - * - * @deprecated use ATTR_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED - */ -exports.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED; -/** - * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead). - * - * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available. - * - * @deprecated use ATTR_HTTP_SERVER_NAME - */ -exports.SEMATTRS_HTTP_SERVER_NAME = TMP_HTTP_SERVER_NAME; -/** - * The matched route (path template). - * - * @deprecated use ATTR_HTTP_ROUTE - */ -exports.SEMATTRS_HTTP_ROUTE = TMP_HTTP_ROUTE; -/** -* The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). -* -* Note: This is not necessarily the same as `net.peer.ip`, which would -identify the network-level peer, which may be a proxy. - -This attribute should be set when a source of information different -from the one used for `net.peer.ip`, is available even if that other -source just confirms the same value as `net.peer.ip`. -Rationale: For `net.peer.ip`, one typically does not know if it -comes from a proxy, reverse proxy, or the actual client. Setting -`http.client_ip` when it's the same as `net.peer.ip` means that -one is at least somewhat confident that the address is not that of -the closest proxy. -* -* @deprecated use ATTR_HTTP_CLIENT_IP -*/ -exports.SEMATTRS_HTTP_CLIENT_IP = TMP_HTTP_CLIENT_IP; -/** - * The keys in the `RequestItems` object field. - * - * @deprecated use ATTR_AWS_DYNAMODB_TABLE_NAMES - */ -exports.SEMATTRS_AWS_DYNAMODB_TABLE_NAMES = TMP_AWS_DYNAMODB_TABLE_NAMES; -/** - * The JSON-serialized value of each item in the `ConsumedCapacity` response field. - * - * @deprecated use ATTR_AWS_DYNAMODB_CONSUMED_CAPACITY - */ -exports.SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY = TMP_AWS_DYNAMODB_CONSUMED_CAPACITY; -/** - * The JSON-serialized value of the `ItemCollectionMetrics` response field. - * - * @deprecated use ATTR_AWS_DYNAMODB_ITEM_COLLECTION_METRICS - */ -exports.SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS; -/** - * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. - * - * @deprecated use ATTR_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY - */ -exports.SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY; -/** - * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. - * - * @deprecated use ATTR_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY - */ -exports.SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY; -/** - * The value of the `ConsistentRead` request parameter. - * - * @deprecated use ATTR_AWS_DYNAMODB_CONSISTENT_READ - */ -exports.SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ = TMP_AWS_DYNAMODB_CONSISTENT_READ; -/** - * The value of the `ProjectionExpression` request parameter. - * - * @deprecated use ATTR_AWS_DYNAMODB_PROJECTION - */ -exports.SEMATTRS_AWS_DYNAMODB_PROJECTION = TMP_AWS_DYNAMODB_PROJECTION; -/** - * The value of the `Limit` request parameter. - * - * @deprecated use ATTR_AWS_DYNAMODB_LIMIT - */ -exports.SEMATTRS_AWS_DYNAMODB_LIMIT = TMP_AWS_DYNAMODB_LIMIT; -/** - * The value of the `AttributesToGet` request parameter. - * - * @deprecated use ATTR_AWS_DYNAMODB_ATTRIBUTES_TO_GET - */ -exports.SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET = TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET; -/** - * The value of the `IndexName` request parameter. - * - * @deprecated use ATTR_AWS_DYNAMODB_INDEX_NAME - */ -exports.SEMATTRS_AWS_DYNAMODB_INDEX_NAME = TMP_AWS_DYNAMODB_INDEX_NAME; -/** - * The value of the `Select` request parameter. - * - * @deprecated use ATTR_AWS_DYNAMODB_SELECT - */ -exports.SEMATTRS_AWS_DYNAMODB_SELECT = TMP_AWS_DYNAMODB_SELECT; -/** - * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. - * - * @deprecated use ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES - */ -exports.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES; -/** - * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. - * - * @deprecated use ATTR_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES - */ -exports.SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES; -/** - * The value of the `ExclusiveStartTableName` request parameter. - * - * @deprecated use ATTR_AWS_DYNAMODB_EXCLUSIVE_START_TABLE - */ -exports.SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE; -/** - * The the number of items in the `TableNames` response parameter. - * - * @deprecated use ATTR_AWS_DYNAMODB_TABLE_COUNT - */ -exports.SEMATTRS_AWS_DYNAMODB_TABLE_COUNT = TMP_AWS_DYNAMODB_TABLE_COUNT; -/** - * The value of the `ScanIndexForward` request parameter. - * - * @deprecated use ATTR_AWS_DYNAMODB_SCAN_FORWARD - */ -exports.SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD = TMP_AWS_DYNAMODB_SCAN_FORWARD; -/** - * The value of the `Segment` request parameter. - * - * @deprecated use ATTR_AWS_DYNAMODB_SEGMENT - */ -exports.SEMATTRS_AWS_DYNAMODB_SEGMENT = TMP_AWS_DYNAMODB_SEGMENT; -/** - * The value of the `TotalSegments` request parameter. - * - * @deprecated use ATTR_AWS_DYNAMODB_TOTAL_SEGMENTS - */ -exports.SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS = TMP_AWS_DYNAMODB_TOTAL_SEGMENTS; -/** - * The value of the `Count` response parameter. - * - * @deprecated use ATTR_AWS_DYNAMODB_COUNT - */ -exports.SEMATTRS_AWS_DYNAMODB_COUNT = TMP_AWS_DYNAMODB_COUNT; -/** - * The value of the `ScannedCount` response parameter. - * - * @deprecated use ATTR_AWS_DYNAMODB_SCANNED_COUNT - */ -exports.SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT = TMP_AWS_DYNAMODB_SCANNED_COUNT; -/** - * The JSON-serialized value of each item in the `AttributeDefinitions` request field. - * - * @deprecated use ATTR_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS - */ -exports.SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS; -/** - * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field. - * - * @deprecated use ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES - */ -exports.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES; -/** - * A string identifying the messaging system. - * - * @deprecated use ATTR_MESSAGING_SYSTEM - */ -exports.SEMATTRS_MESSAGING_SYSTEM = TMP_MESSAGING_SYSTEM; -/** - * The message destination name. This might be equal to the span name but is required nevertheless. - * - * @deprecated use ATTR_MESSAGING_DESTINATION - */ -exports.SEMATTRS_MESSAGING_DESTINATION = TMP_MESSAGING_DESTINATION; -/** - * The kind of message destination. - * - * @deprecated use ATTR_MESSAGING_DESTINATION_KIND - */ -exports.SEMATTRS_MESSAGING_DESTINATION_KIND = TMP_MESSAGING_DESTINATION_KIND; -/** - * A boolean that is true if the message destination is temporary. - * - * @deprecated use ATTR_MESSAGING_TEMP_DESTINATION - */ -exports.SEMATTRS_MESSAGING_TEMP_DESTINATION = TMP_MESSAGING_TEMP_DESTINATION; -/** - * The name of the transport protocol. - * - * @deprecated use ATTR_MESSAGING_PROTOCOL - */ -exports.SEMATTRS_MESSAGING_PROTOCOL = TMP_MESSAGING_PROTOCOL; -/** - * The version of the transport protocol. - * - * @deprecated use ATTR_MESSAGING_PROTOCOL_VERSION - */ -exports.SEMATTRS_MESSAGING_PROTOCOL_VERSION = TMP_MESSAGING_PROTOCOL_VERSION; -/** - * Connection string. - * - * @deprecated use ATTR_MESSAGING_URL - */ -exports.SEMATTRS_MESSAGING_URL = TMP_MESSAGING_URL; -/** - * A value used by the messaging system as an identifier for the message, represented as a string. - * - * @deprecated use ATTR_MESSAGING_MESSAGE_ID - */ -exports.SEMATTRS_MESSAGING_MESSAGE_ID = TMP_MESSAGING_MESSAGE_ID; -/** - * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". - * - * @deprecated use ATTR_MESSAGING_CONVERSATION_ID - */ -exports.SEMATTRS_MESSAGING_CONVERSATION_ID = TMP_MESSAGING_CONVERSATION_ID; -/** - * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. - * - * @deprecated use ATTR_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES - */ -exports.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES; -/** - * The compressed size of the message payload in bytes. - * - * @deprecated use ATTR_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES - */ -exports.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES; -/** - * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. - * - * @deprecated use ATTR_MESSAGING_OPERATION - */ -exports.SEMATTRS_MESSAGING_OPERATION = TMP_MESSAGING_OPERATION; -/** - * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message. - * - * @deprecated use ATTR_MESSAGING_CONSUMER_ID - */ -exports.SEMATTRS_MESSAGING_CONSUMER_ID = TMP_MESSAGING_CONSUMER_ID; -/** - * RabbitMQ message routing key. - * - * @deprecated use ATTR_MESSAGING_RABBITMQ_ROUTING_KEY - */ -exports.SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY = TMP_MESSAGING_RABBITMQ_ROUTING_KEY; -/** - * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set. - * - * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value. - * - * @deprecated use ATTR_MESSAGING_KAFKA_MESSAGE_KEY - */ -exports.SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY = TMP_MESSAGING_KAFKA_MESSAGE_KEY; -/** - * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. - * - * @deprecated use ATTR_MESSAGING_KAFKA_CONSUMER_GROUP - */ -exports.SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP = TMP_MESSAGING_KAFKA_CONSUMER_GROUP; -/** - * Client Id for the Consumer or Producer that is handling the message. - * - * @deprecated use ATTR_MESSAGING_KAFKA_CLIENT_ID - */ -exports.SEMATTRS_MESSAGING_KAFKA_CLIENT_ID = TMP_MESSAGING_KAFKA_CLIENT_ID; -/** - * Partition the message is sent to. - * - * @deprecated use ATTR_MESSAGING_KAFKA_PARTITION - */ -exports.SEMATTRS_MESSAGING_KAFKA_PARTITION = TMP_MESSAGING_KAFKA_PARTITION; -/** - * A boolean that is true if the message is a tombstone. - * - * @deprecated use ATTR_MESSAGING_KAFKA_TOMBSTONE - */ -exports.SEMATTRS_MESSAGING_KAFKA_TOMBSTONE = TMP_MESSAGING_KAFKA_TOMBSTONE; -/** - * A string identifying the remoting system. - * - * @deprecated use ATTR_RPC_SYSTEM - */ -exports.SEMATTRS_RPC_SYSTEM = TMP_RPC_SYSTEM; -/** - * The full (logical) name of the service being called, including its package name, if applicable. - * - * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side). - * - * @deprecated use ATTR_RPC_SERVICE - */ -exports.SEMATTRS_RPC_SERVICE = TMP_RPC_SERVICE; -/** - * The name of the (logical) method being called, must be equal to the $method part in the span name. - * - * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side). - * - * @deprecated use ATTR_RPC_METHOD - */ -exports.SEMATTRS_RPC_METHOD = TMP_RPC_METHOD; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated use ATTR_RPC_GRPC_STATUS_CODE - */ -exports.SEMATTRS_RPC_GRPC_STATUS_CODE = TMP_RPC_GRPC_STATUS_CODE; -/** - * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted. - * - * @deprecated use ATTR_RPC_JSONRPC_VERSION - */ -exports.SEMATTRS_RPC_JSONRPC_VERSION = TMP_RPC_JSONRPC_VERSION; -/** - * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification. - * - * @deprecated use ATTR_RPC_JSONRPC_REQUEST_ID - */ -exports.SEMATTRS_RPC_JSONRPC_REQUEST_ID = TMP_RPC_JSONRPC_REQUEST_ID; -/** - * `error.code` property of response if it is an error response. - * - * @deprecated use ATTR_RPC_JSONRPC_ERROR_CODE - */ -exports.SEMATTRS_RPC_JSONRPC_ERROR_CODE = TMP_RPC_JSONRPC_ERROR_CODE; -/** - * `error.message` property of response if it is an error response. - * - * @deprecated use ATTR_RPC_JSONRPC_ERROR_MESSAGE - */ -exports.SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE = TMP_RPC_JSONRPC_ERROR_MESSAGE; -/** - * Whether this is a received or sent message. - * - * @deprecated use ATTR_MESSAGE_TYPE - */ -exports.SEMATTRS_MESSAGE_TYPE = TMP_MESSAGE_TYPE; -/** - * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message. - * - * Note: This way we guarantee that the values will be consistent between different implementations. - * - * @deprecated use ATTR_MESSAGE_ID - */ -exports.SEMATTRS_MESSAGE_ID = TMP_MESSAGE_ID; -/** - * Compressed size of the message in bytes. - * - * @deprecated use ATTR_MESSAGE_COMPRESSED_SIZE - */ -exports.SEMATTRS_MESSAGE_COMPRESSED_SIZE = TMP_MESSAGE_COMPRESSED_SIZE; -/** - * Uncompressed size of the message in bytes. - * - * @deprecated use ATTR_MESSAGE_UNCOMPRESSED_SIZE - */ -exports.SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE = TMP_MESSAGE_UNCOMPRESSED_SIZE; -/** - * Create exported Value Map for SemanticAttributes values - * @deprecated Use the SEMATTRS_XXXXX constants rather than the SemanticAttributes.XXXXX for bundle minification - */ -exports.SemanticAttributes = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_AWS_LAMBDA_INVOKED_ARN, - TMP_DB_SYSTEM, - TMP_DB_CONNECTION_STRING, - TMP_DB_USER, - TMP_DB_JDBC_DRIVER_CLASSNAME, - TMP_DB_NAME, - TMP_DB_STATEMENT, - TMP_DB_OPERATION, - TMP_DB_MSSQL_INSTANCE_NAME, - TMP_DB_CASSANDRA_KEYSPACE, - TMP_DB_CASSANDRA_PAGE_SIZE, - TMP_DB_CASSANDRA_CONSISTENCY_LEVEL, - TMP_DB_CASSANDRA_TABLE, - TMP_DB_CASSANDRA_IDEMPOTENCE, - TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT, - TMP_DB_CASSANDRA_COORDINATOR_ID, - TMP_DB_CASSANDRA_COORDINATOR_DC, - TMP_DB_HBASE_NAMESPACE, - TMP_DB_REDIS_DATABASE_INDEX, - TMP_DB_MONGODB_COLLECTION, - TMP_DB_SQL_TABLE, - TMP_EXCEPTION_TYPE, - TMP_EXCEPTION_MESSAGE, - TMP_EXCEPTION_STACKTRACE, - TMP_EXCEPTION_ESCAPED, - TMP_FAAS_TRIGGER, - TMP_FAAS_EXECUTION, - TMP_FAAS_DOCUMENT_COLLECTION, - TMP_FAAS_DOCUMENT_OPERATION, - TMP_FAAS_DOCUMENT_TIME, - TMP_FAAS_DOCUMENT_NAME, - TMP_FAAS_TIME, - TMP_FAAS_CRON, - TMP_FAAS_COLDSTART, - TMP_FAAS_INVOKED_NAME, - TMP_FAAS_INVOKED_PROVIDER, - TMP_FAAS_INVOKED_REGION, - TMP_NET_TRANSPORT, - TMP_NET_PEER_IP, - TMP_NET_PEER_PORT, - TMP_NET_PEER_NAME, - TMP_NET_HOST_IP, - TMP_NET_HOST_PORT, - TMP_NET_HOST_NAME, - TMP_NET_HOST_CONNECTION_TYPE, - TMP_NET_HOST_CONNECTION_SUBTYPE, - TMP_NET_HOST_CARRIER_NAME, - TMP_NET_HOST_CARRIER_MCC, - TMP_NET_HOST_CARRIER_MNC, - TMP_NET_HOST_CARRIER_ICC, - TMP_PEER_SERVICE, - TMP_ENDUSER_ID, - TMP_ENDUSER_ROLE, - TMP_ENDUSER_SCOPE, - TMP_THREAD_ID, - TMP_THREAD_NAME, - TMP_CODE_FUNCTION, - TMP_CODE_NAMESPACE, - TMP_CODE_FILEPATH, - TMP_CODE_LINENO, - TMP_HTTP_METHOD, - TMP_HTTP_URL, - TMP_HTTP_TARGET, - TMP_HTTP_HOST, - TMP_HTTP_SCHEME, - TMP_HTTP_STATUS_CODE, - TMP_HTTP_FLAVOR, - TMP_HTTP_USER_AGENT, - TMP_HTTP_REQUEST_CONTENT_LENGTH, - TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED, - TMP_HTTP_RESPONSE_CONTENT_LENGTH, - TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED, - TMP_HTTP_SERVER_NAME, - TMP_HTTP_ROUTE, - TMP_HTTP_CLIENT_IP, - TMP_AWS_DYNAMODB_TABLE_NAMES, - TMP_AWS_DYNAMODB_CONSUMED_CAPACITY, - TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS, - TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY, - TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY, - TMP_AWS_DYNAMODB_CONSISTENT_READ, - TMP_AWS_DYNAMODB_PROJECTION, - TMP_AWS_DYNAMODB_LIMIT, - TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET, - TMP_AWS_DYNAMODB_INDEX_NAME, - TMP_AWS_DYNAMODB_SELECT, - TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES, - TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES, - TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE, - TMP_AWS_DYNAMODB_TABLE_COUNT, - TMP_AWS_DYNAMODB_SCAN_FORWARD, - TMP_AWS_DYNAMODB_SEGMENT, - TMP_AWS_DYNAMODB_TOTAL_SEGMENTS, - TMP_AWS_DYNAMODB_COUNT, - TMP_AWS_DYNAMODB_SCANNED_COUNT, - TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS, - TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES, - TMP_MESSAGING_SYSTEM, - TMP_MESSAGING_DESTINATION, - TMP_MESSAGING_DESTINATION_KIND, - TMP_MESSAGING_TEMP_DESTINATION, - TMP_MESSAGING_PROTOCOL, - TMP_MESSAGING_PROTOCOL_VERSION, - TMP_MESSAGING_URL, - TMP_MESSAGING_MESSAGE_ID, - TMP_MESSAGING_CONVERSATION_ID, - TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES, - TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES, - TMP_MESSAGING_OPERATION, - TMP_MESSAGING_CONSUMER_ID, - TMP_MESSAGING_RABBITMQ_ROUTING_KEY, - TMP_MESSAGING_KAFKA_MESSAGE_KEY, - TMP_MESSAGING_KAFKA_CONSUMER_GROUP, - TMP_MESSAGING_KAFKA_CLIENT_ID, - TMP_MESSAGING_KAFKA_PARTITION, - TMP_MESSAGING_KAFKA_TOMBSTONE, - TMP_RPC_SYSTEM, - TMP_RPC_SERVICE, - TMP_RPC_METHOD, - TMP_RPC_GRPC_STATUS_CODE, - TMP_RPC_JSONRPC_VERSION, - TMP_RPC_JSONRPC_REQUEST_ID, - TMP_RPC_JSONRPC_ERROR_CODE, - TMP_RPC_JSONRPC_ERROR_MESSAGE, - TMP_MESSAGE_TYPE, - TMP_MESSAGE_ID, - TMP_MESSAGE_COMPRESSED_SIZE, - TMP_MESSAGE_UNCOMPRESSED_SIZE, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for DbSystemValues enum definition - * - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_DBSYSTEMVALUES_OTHER_SQL = 'other_sql'; -const TMP_DBSYSTEMVALUES_MSSQL = 'mssql'; -const TMP_DBSYSTEMVALUES_MYSQL = 'mysql'; -const TMP_DBSYSTEMVALUES_ORACLE = 'oracle'; -const TMP_DBSYSTEMVALUES_DB2 = 'db2'; -const TMP_DBSYSTEMVALUES_POSTGRESQL = 'postgresql'; -const TMP_DBSYSTEMVALUES_REDSHIFT = 'redshift'; -const TMP_DBSYSTEMVALUES_HIVE = 'hive'; -const TMP_DBSYSTEMVALUES_CLOUDSCAPE = 'cloudscape'; -const TMP_DBSYSTEMVALUES_HSQLDB = 'hsqldb'; -const TMP_DBSYSTEMVALUES_PROGRESS = 'progress'; -const TMP_DBSYSTEMVALUES_MAXDB = 'maxdb'; -const TMP_DBSYSTEMVALUES_HANADB = 'hanadb'; -const TMP_DBSYSTEMVALUES_INGRES = 'ingres'; -const TMP_DBSYSTEMVALUES_FIRSTSQL = 'firstsql'; -const TMP_DBSYSTEMVALUES_EDB = 'edb'; -const TMP_DBSYSTEMVALUES_CACHE = 'cache'; -const TMP_DBSYSTEMVALUES_ADABAS = 'adabas'; -const TMP_DBSYSTEMVALUES_FIREBIRD = 'firebird'; -const TMP_DBSYSTEMVALUES_DERBY = 'derby'; -const TMP_DBSYSTEMVALUES_FILEMAKER = 'filemaker'; -const TMP_DBSYSTEMVALUES_INFORMIX = 'informix'; -const TMP_DBSYSTEMVALUES_INSTANTDB = 'instantdb'; -const TMP_DBSYSTEMVALUES_INTERBASE = 'interbase'; -const TMP_DBSYSTEMVALUES_MARIADB = 'mariadb'; -const TMP_DBSYSTEMVALUES_NETEZZA = 'netezza'; -const TMP_DBSYSTEMVALUES_PERVASIVE = 'pervasive'; -const TMP_DBSYSTEMVALUES_POINTBASE = 'pointbase'; -const TMP_DBSYSTEMVALUES_SQLITE = 'sqlite'; -const TMP_DBSYSTEMVALUES_SYBASE = 'sybase'; -const TMP_DBSYSTEMVALUES_TERADATA = 'teradata'; -const TMP_DBSYSTEMVALUES_VERTICA = 'vertica'; -const TMP_DBSYSTEMVALUES_H2 = 'h2'; -const TMP_DBSYSTEMVALUES_COLDFUSION = 'coldfusion'; -const TMP_DBSYSTEMVALUES_CASSANDRA = 'cassandra'; -const TMP_DBSYSTEMVALUES_HBASE = 'hbase'; -const TMP_DBSYSTEMVALUES_MONGODB = 'mongodb'; -const TMP_DBSYSTEMVALUES_REDIS = 'redis'; -const TMP_DBSYSTEMVALUES_COUCHBASE = 'couchbase'; -const TMP_DBSYSTEMVALUES_COUCHDB = 'couchdb'; -const TMP_DBSYSTEMVALUES_COSMOSDB = 'cosmosdb'; -const TMP_DBSYSTEMVALUES_DYNAMODB = 'dynamodb'; -const TMP_DBSYSTEMVALUES_NEO4J = 'neo4j'; -const TMP_DBSYSTEMVALUES_GEODE = 'geode'; -const TMP_DBSYSTEMVALUES_ELASTICSEARCH = 'elasticsearch'; -const TMP_DBSYSTEMVALUES_MEMCACHED = 'memcached'; -const TMP_DBSYSTEMVALUES_COCKROACHDB = 'cockroachdb'; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_OTHER_SQL. - */ -exports.DBSYSTEMVALUES_OTHER_SQL = TMP_DBSYSTEMVALUES_OTHER_SQL; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_MSSQL. - */ -exports.DBSYSTEMVALUES_MSSQL = TMP_DBSYSTEMVALUES_MSSQL; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_MYSQL. - */ -exports.DBSYSTEMVALUES_MYSQL = TMP_DBSYSTEMVALUES_MYSQL; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_ORACLE. - */ -exports.DBSYSTEMVALUES_ORACLE = TMP_DBSYSTEMVALUES_ORACLE; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_DB2. - */ -exports.DBSYSTEMVALUES_DB2 = TMP_DBSYSTEMVALUES_DB2; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_POSTGRESQL. - */ -exports.DBSYSTEMVALUES_POSTGRESQL = TMP_DBSYSTEMVALUES_POSTGRESQL; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_REDSHIFT. - */ -exports.DBSYSTEMVALUES_REDSHIFT = TMP_DBSYSTEMVALUES_REDSHIFT; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_HIVE. - */ -exports.DBSYSTEMVALUES_HIVE = TMP_DBSYSTEMVALUES_HIVE; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_CLOUDSCAPE. - */ -exports.DBSYSTEMVALUES_CLOUDSCAPE = TMP_DBSYSTEMVALUES_CLOUDSCAPE; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_HSQLDB. - */ -exports.DBSYSTEMVALUES_HSQLDB = TMP_DBSYSTEMVALUES_HSQLDB; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_PROGRESS. - */ -exports.DBSYSTEMVALUES_PROGRESS = TMP_DBSYSTEMVALUES_PROGRESS; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_MAXDB. - */ -exports.DBSYSTEMVALUES_MAXDB = TMP_DBSYSTEMVALUES_MAXDB; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_HANADB. - */ -exports.DBSYSTEMVALUES_HANADB = TMP_DBSYSTEMVALUES_HANADB; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_INGRES. - */ -exports.DBSYSTEMVALUES_INGRES = TMP_DBSYSTEMVALUES_INGRES; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_FIRSTSQL. - */ -exports.DBSYSTEMVALUES_FIRSTSQL = TMP_DBSYSTEMVALUES_FIRSTSQL; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_EDB. - */ -exports.DBSYSTEMVALUES_EDB = TMP_DBSYSTEMVALUES_EDB; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_CACHE. - */ -exports.DBSYSTEMVALUES_CACHE = TMP_DBSYSTEMVALUES_CACHE; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_ADABAS. - */ -exports.DBSYSTEMVALUES_ADABAS = TMP_DBSYSTEMVALUES_ADABAS; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_FIREBIRD. - */ -exports.DBSYSTEMVALUES_FIREBIRD = TMP_DBSYSTEMVALUES_FIREBIRD; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_DERBY. - */ -exports.DBSYSTEMVALUES_DERBY = TMP_DBSYSTEMVALUES_DERBY; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_FILEMAKER. - */ -exports.DBSYSTEMVALUES_FILEMAKER = TMP_DBSYSTEMVALUES_FILEMAKER; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_INFORMIX. - */ -exports.DBSYSTEMVALUES_INFORMIX = TMP_DBSYSTEMVALUES_INFORMIX; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_INSTANTDB. - */ -exports.DBSYSTEMVALUES_INSTANTDB = TMP_DBSYSTEMVALUES_INSTANTDB; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_INTERBASE. - */ -exports.DBSYSTEMVALUES_INTERBASE = TMP_DBSYSTEMVALUES_INTERBASE; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_MARIADB. - */ -exports.DBSYSTEMVALUES_MARIADB = TMP_DBSYSTEMVALUES_MARIADB; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_NETEZZA. - */ -exports.DBSYSTEMVALUES_NETEZZA = TMP_DBSYSTEMVALUES_NETEZZA; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_PERVASIVE. - */ -exports.DBSYSTEMVALUES_PERVASIVE = TMP_DBSYSTEMVALUES_PERVASIVE; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_POINTBASE. - */ -exports.DBSYSTEMVALUES_POINTBASE = TMP_DBSYSTEMVALUES_POINTBASE; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_SQLITE. - */ -exports.DBSYSTEMVALUES_SQLITE = TMP_DBSYSTEMVALUES_SQLITE; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_SYBASE. - */ -exports.DBSYSTEMVALUES_SYBASE = TMP_DBSYSTEMVALUES_SYBASE; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_TERADATA. - */ -exports.DBSYSTEMVALUES_TERADATA = TMP_DBSYSTEMVALUES_TERADATA; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_VERTICA. - */ -exports.DBSYSTEMVALUES_VERTICA = TMP_DBSYSTEMVALUES_VERTICA; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_H2. - */ -exports.DBSYSTEMVALUES_H2 = TMP_DBSYSTEMVALUES_H2; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_COLDFUSION. - */ -exports.DBSYSTEMVALUES_COLDFUSION = TMP_DBSYSTEMVALUES_COLDFUSION; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_CASSANDRA. - */ -exports.DBSYSTEMVALUES_CASSANDRA = TMP_DBSYSTEMVALUES_CASSANDRA; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_HBASE. - */ -exports.DBSYSTEMVALUES_HBASE = TMP_DBSYSTEMVALUES_HBASE; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_MONGODB. - */ -exports.DBSYSTEMVALUES_MONGODB = TMP_DBSYSTEMVALUES_MONGODB; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_REDIS. - */ -exports.DBSYSTEMVALUES_REDIS = TMP_DBSYSTEMVALUES_REDIS; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_COUCHBASE. - */ -exports.DBSYSTEMVALUES_COUCHBASE = TMP_DBSYSTEMVALUES_COUCHBASE; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_COUCHDB. - */ -exports.DBSYSTEMVALUES_COUCHDB = TMP_DBSYSTEMVALUES_COUCHDB; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_COSMOSDB. - */ -exports.DBSYSTEMVALUES_COSMOSDB = TMP_DBSYSTEMVALUES_COSMOSDB; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_DYNAMODB. - */ -exports.DBSYSTEMVALUES_DYNAMODB = TMP_DBSYSTEMVALUES_DYNAMODB; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_NEO4J. - */ -exports.DBSYSTEMVALUES_NEO4J = TMP_DBSYSTEMVALUES_NEO4J; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_GEODE. - */ -exports.DBSYSTEMVALUES_GEODE = TMP_DBSYSTEMVALUES_GEODE; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_ELASTICSEARCH. - */ -exports.DBSYSTEMVALUES_ELASTICSEARCH = TMP_DBSYSTEMVALUES_ELASTICSEARCH; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_MEMCACHED. - */ -exports.DBSYSTEMVALUES_MEMCACHED = TMP_DBSYSTEMVALUES_MEMCACHED; -/** - * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers. - * - * @deprecated Use DB_SYSTEM_VALUE_COCKROACHDB. - */ -exports.DBSYSTEMVALUES_COCKROACHDB = TMP_DBSYSTEMVALUES_COCKROACHDB; -/** - * The constant map of values for DbSystemValues. - * @deprecated Use the DBSYSTEMVALUES_XXXXX constants rather than the DbSystemValues.XXXXX for bundle minification. - */ -exports.DbSystemValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_DBSYSTEMVALUES_OTHER_SQL, - TMP_DBSYSTEMVALUES_MSSQL, - TMP_DBSYSTEMVALUES_MYSQL, - TMP_DBSYSTEMVALUES_ORACLE, - TMP_DBSYSTEMVALUES_DB2, - TMP_DBSYSTEMVALUES_POSTGRESQL, - TMP_DBSYSTEMVALUES_REDSHIFT, - TMP_DBSYSTEMVALUES_HIVE, - TMP_DBSYSTEMVALUES_CLOUDSCAPE, - TMP_DBSYSTEMVALUES_HSQLDB, - TMP_DBSYSTEMVALUES_PROGRESS, - TMP_DBSYSTEMVALUES_MAXDB, - TMP_DBSYSTEMVALUES_HANADB, - TMP_DBSYSTEMVALUES_INGRES, - TMP_DBSYSTEMVALUES_FIRSTSQL, - TMP_DBSYSTEMVALUES_EDB, - TMP_DBSYSTEMVALUES_CACHE, - TMP_DBSYSTEMVALUES_ADABAS, - TMP_DBSYSTEMVALUES_FIREBIRD, - TMP_DBSYSTEMVALUES_DERBY, - TMP_DBSYSTEMVALUES_FILEMAKER, - TMP_DBSYSTEMVALUES_INFORMIX, - TMP_DBSYSTEMVALUES_INSTANTDB, - TMP_DBSYSTEMVALUES_INTERBASE, - TMP_DBSYSTEMVALUES_MARIADB, - TMP_DBSYSTEMVALUES_NETEZZA, - TMP_DBSYSTEMVALUES_PERVASIVE, - TMP_DBSYSTEMVALUES_POINTBASE, - TMP_DBSYSTEMVALUES_SQLITE, - TMP_DBSYSTEMVALUES_SYBASE, - TMP_DBSYSTEMVALUES_TERADATA, - TMP_DBSYSTEMVALUES_VERTICA, - TMP_DBSYSTEMVALUES_H2, - TMP_DBSYSTEMVALUES_COLDFUSION, - TMP_DBSYSTEMVALUES_CASSANDRA, - TMP_DBSYSTEMVALUES_HBASE, - TMP_DBSYSTEMVALUES_MONGODB, - TMP_DBSYSTEMVALUES_REDIS, - TMP_DBSYSTEMVALUES_COUCHBASE, - TMP_DBSYSTEMVALUES_COUCHDB, - TMP_DBSYSTEMVALUES_COSMOSDB, - TMP_DBSYSTEMVALUES_DYNAMODB, - TMP_DBSYSTEMVALUES_NEO4J, - TMP_DBSYSTEMVALUES_GEODE, - TMP_DBSYSTEMVALUES_ELASTICSEARCH, - TMP_DBSYSTEMVALUES_MEMCACHED, - TMP_DBSYSTEMVALUES_COCKROACHDB, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for DbCassandraConsistencyLevelValues enum definition - * - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL = 'all'; -const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = 'each_quorum'; -const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = 'quorum'; -const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = 'local_quorum'; -const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE = 'one'; -const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO = 'two'; -const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE = 'three'; -const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = 'local_one'; -const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY = 'any'; -const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = 'serial'; -const TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = 'local_serial'; -/** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - * - * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_ALL. - */ -exports.DBCASSANDRACONSISTENCYLEVELVALUES_ALL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL; -/** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - * - * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_EACH_QUORUM. - */ -exports.DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM; -/** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - * - * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_QUORUM. - */ -exports.DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM; -/** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - * - * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_LOCAL_QUORUM. - */ -exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM; -/** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - * - * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_ONE. - */ -exports.DBCASSANDRACONSISTENCYLEVELVALUES_ONE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE; -/** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - * - * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_TWO. - */ -exports.DBCASSANDRACONSISTENCYLEVELVALUES_TWO = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO; -/** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - * - * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_THREE. - */ -exports.DBCASSANDRACONSISTENCYLEVELVALUES_THREE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE; -/** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - * - * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_LOCAL_ONE. - */ -exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE; -/** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - * - * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_ANY. - */ -exports.DBCASSANDRACONSISTENCYLEVELVALUES_ANY = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY; -/** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - * - * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_SERIAL. - */ -exports.DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL; -/** - * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - * - * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_LOCAL_SERIAL. - */ -exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL; -/** - * The constant map of values for DbCassandraConsistencyLevelValues. - * @deprecated Use the DBCASSANDRACONSISTENCYLEVELVALUES_XXXXX constants rather than the DbCassandraConsistencyLevelValues.XXXXX for bundle minification. - */ -exports.DbCassandraConsistencyLevelValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL, - TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM, - TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM, - TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM, - TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE, - TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO, - TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE, - TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE, - TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY, - TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL, - TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for FaasTriggerValues enum definition - * - * Type of the trigger on which the function is executed. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_FAASTRIGGERVALUES_DATASOURCE = 'datasource'; -const TMP_FAASTRIGGERVALUES_HTTP = 'http'; -const TMP_FAASTRIGGERVALUES_PUBSUB = 'pubsub'; -const TMP_FAASTRIGGERVALUES_TIMER = 'timer'; -const TMP_FAASTRIGGERVALUES_OTHER = 'other'; -/** - * Type of the trigger on which the function is executed. - * - * @deprecated Use FAAS_TRIGGER_VALUE_DATASOURCE. - */ -exports.FAASTRIGGERVALUES_DATASOURCE = TMP_FAASTRIGGERVALUES_DATASOURCE; -/** - * Type of the trigger on which the function is executed. - * - * @deprecated Use FAAS_TRIGGER_VALUE_HTTP. - */ -exports.FAASTRIGGERVALUES_HTTP = TMP_FAASTRIGGERVALUES_HTTP; -/** - * Type of the trigger on which the function is executed. - * - * @deprecated Use FAAS_TRIGGER_VALUE_PUBSUB. - */ -exports.FAASTRIGGERVALUES_PUBSUB = TMP_FAASTRIGGERVALUES_PUBSUB; -/** - * Type of the trigger on which the function is executed. - * - * @deprecated Use FAAS_TRIGGER_VALUE_TIMER. - */ -exports.FAASTRIGGERVALUES_TIMER = TMP_FAASTRIGGERVALUES_TIMER; -/** - * Type of the trigger on which the function is executed. - * - * @deprecated Use FAAS_TRIGGER_VALUE_OTHER. - */ -exports.FAASTRIGGERVALUES_OTHER = TMP_FAASTRIGGERVALUES_OTHER; -/** - * The constant map of values for FaasTriggerValues. - * @deprecated Use the FAASTRIGGERVALUES_XXXXX constants rather than the FaasTriggerValues.XXXXX for bundle minification. - */ -exports.FaasTriggerValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_FAASTRIGGERVALUES_DATASOURCE, - TMP_FAASTRIGGERVALUES_HTTP, - TMP_FAASTRIGGERVALUES_PUBSUB, - TMP_FAASTRIGGERVALUES_TIMER, - TMP_FAASTRIGGERVALUES_OTHER, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for FaasDocumentOperationValues enum definition - * - * Describes the type of the operation that was performed on the data. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_FAASDOCUMENTOPERATIONVALUES_INSERT = 'insert'; -const TMP_FAASDOCUMENTOPERATIONVALUES_EDIT = 'edit'; -const TMP_FAASDOCUMENTOPERATIONVALUES_DELETE = 'delete'; -/** - * Describes the type of the operation that was performed on the data. - * - * @deprecated Use FAAS_DOCUMENT_OPERATION_VALUE_INSERT. - */ -exports.FAASDOCUMENTOPERATIONVALUES_INSERT = TMP_FAASDOCUMENTOPERATIONVALUES_INSERT; -/** - * Describes the type of the operation that was performed on the data. - * - * @deprecated Use FAAS_DOCUMENT_OPERATION_VALUE_EDIT. - */ -exports.FAASDOCUMENTOPERATIONVALUES_EDIT = TMP_FAASDOCUMENTOPERATIONVALUES_EDIT; -/** - * Describes the type of the operation that was performed on the data. - * - * @deprecated Use FAAS_DOCUMENT_OPERATION_VALUE_DELETE. - */ -exports.FAASDOCUMENTOPERATIONVALUES_DELETE = TMP_FAASDOCUMENTOPERATIONVALUES_DELETE; -/** - * The constant map of values for FaasDocumentOperationValues. - * @deprecated Use the FAASDOCUMENTOPERATIONVALUES_XXXXX constants rather than the FaasDocumentOperationValues.XXXXX for bundle minification. - */ -exports.FaasDocumentOperationValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_FAASDOCUMENTOPERATIONVALUES_INSERT, - TMP_FAASDOCUMENTOPERATIONVALUES_EDIT, - TMP_FAASDOCUMENTOPERATIONVALUES_DELETE, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for FaasInvokedProviderValues enum definition - * - * The cloud provider of the invoked function. - * - * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = 'alibaba_cloud'; -const TMP_FAASINVOKEDPROVIDERVALUES_AWS = 'aws'; -const TMP_FAASINVOKEDPROVIDERVALUES_AZURE = 'azure'; -const TMP_FAASINVOKEDPROVIDERVALUES_GCP = 'gcp'; -/** - * The cloud provider of the invoked function. - * - * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. - * - * @deprecated Use FAAS_INVOKED_PROVIDER_VALUE_ALIBABA_CLOUD. - */ -exports.FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD; -/** - * The cloud provider of the invoked function. - * - * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. - * - * @deprecated Use FAAS_INVOKED_PROVIDER_VALUE_AWS. - */ -exports.FAASINVOKEDPROVIDERVALUES_AWS = TMP_FAASINVOKEDPROVIDERVALUES_AWS; -/** - * The cloud provider of the invoked function. - * - * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. - * - * @deprecated Use FAAS_INVOKED_PROVIDER_VALUE_AZURE. - */ -exports.FAASINVOKEDPROVIDERVALUES_AZURE = TMP_FAASINVOKEDPROVIDERVALUES_AZURE; -/** - * The cloud provider of the invoked function. - * - * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function. - * - * @deprecated Use FAAS_INVOKED_PROVIDER_VALUE_GCP. - */ -exports.FAASINVOKEDPROVIDERVALUES_GCP = TMP_FAASINVOKEDPROVIDERVALUES_GCP; -/** - * The constant map of values for FaasInvokedProviderValues. - * @deprecated Use the FAASINVOKEDPROVIDERVALUES_XXXXX constants rather than the FaasInvokedProviderValues.XXXXX for bundle minification. - */ -exports.FaasInvokedProviderValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD, - TMP_FAASINVOKEDPROVIDERVALUES_AWS, - TMP_FAASINVOKEDPROVIDERVALUES_AZURE, - TMP_FAASINVOKEDPROVIDERVALUES_GCP, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for NetTransportValues enum definition - * - * Transport protocol used. See note below. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_NETTRANSPORTVALUES_IP_TCP = 'ip_tcp'; -const TMP_NETTRANSPORTVALUES_IP_UDP = 'ip_udp'; -const TMP_NETTRANSPORTVALUES_IP = 'ip'; -const TMP_NETTRANSPORTVALUES_UNIX = 'unix'; -const TMP_NETTRANSPORTVALUES_PIPE = 'pipe'; -const TMP_NETTRANSPORTVALUES_INPROC = 'inproc'; -const TMP_NETTRANSPORTVALUES_OTHER = 'other'; -/** - * Transport protocol used. See note below. - * - * @deprecated Use NET_TRANSPORT_VALUE_IP_TCP. - */ -exports.NETTRANSPORTVALUES_IP_TCP = TMP_NETTRANSPORTVALUES_IP_TCP; -/** - * Transport protocol used. See note below. - * - * @deprecated Use NET_TRANSPORT_VALUE_IP_UDP. - */ -exports.NETTRANSPORTVALUES_IP_UDP = TMP_NETTRANSPORTVALUES_IP_UDP; -/** - * Transport protocol used. See note below. - * - * @deprecated Use NET_TRANSPORT_VALUE_IP. - */ -exports.NETTRANSPORTVALUES_IP = TMP_NETTRANSPORTVALUES_IP; -/** - * Transport protocol used. See note below. - * - * @deprecated Use NET_TRANSPORT_VALUE_UNIX. - */ -exports.NETTRANSPORTVALUES_UNIX = TMP_NETTRANSPORTVALUES_UNIX; -/** - * Transport protocol used. See note below. - * - * @deprecated Use NET_TRANSPORT_VALUE_PIPE. - */ -exports.NETTRANSPORTVALUES_PIPE = TMP_NETTRANSPORTVALUES_PIPE; -/** - * Transport protocol used. See note below. - * - * @deprecated Use NET_TRANSPORT_VALUE_INPROC. - */ -exports.NETTRANSPORTVALUES_INPROC = TMP_NETTRANSPORTVALUES_INPROC; -/** - * Transport protocol used. See note below. - * - * @deprecated Use NET_TRANSPORT_VALUE_OTHER. - */ -exports.NETTRANSPORTVALUES_OTHER = TMP_NETTRANSPORTVALUES_OTHER; -/** - * The constant map of values for NetTransportValues. - * @deprecated Use the NETTRANSPORTVALUES_XXXXX constants rather than the NetTransportValues.XXXXX for bundle minification. - */ -exports.NetTransportValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_NETTRANSPORTVALUES_IP_TCP, - TMP_NETTRANSPORTVALUES_IP_UDP, - TMP_NETTRANSPORTVALUES_IP, - TMP_NETTRANSPORTVALUES_UNIX, - TMP_NETTRANSPORTVALUES_PIPE, - TMP_NETTRANSPORTVALUES_INPROC, - TMP_NETTRANSPORTVALUES_OTHER, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for NetHostConnectionTypeValues enum definition - * - * The internet connection type currently being used by the host. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI = 'wifi'; -const TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED = 'wired'; -const TMP_NETHOSTCONNECTIONTYPEVALUES_CELL = 'cell'; -const TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = 'unavailable'; -const TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = 'unknown'; -/** - * The internet connection type currently being used by the host. - * - * @deprecated Use NET_HOST_CONNECTION_TYPE_VALUE_WIFI. - */ -exports.NETHOSTCONNECTIONTYPEVALUES_WIFI = TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI; -/** - * The internet connection type currently being used by the host. - * - * @deprecated Use NET_HOST_CONNECTION_TYPE_VALUE_WIRED. - */ -exports.NETHOSTCONNECTIONTYPEVALUES_WIRED = TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED; -/** - * The internet connection type currently being used by the host. - * - * @deprecated Use NET_HOST_CONNECTION_TYPE_VALUE_CELL. - */ -exports.NETHOSTCONNECTIONTYPEVALUES_CELL = TMP_NETHOSTCONNECTIONTYPEVALUES_CELL; -/** - * The internet connection type currently being used by the host. - * - * @deprecated Use NET_HOST_CONNECTION_TYPE_VALUE_UNAVAILABLE. - */ -exports.NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE; -/** - * The internet connection type currently being used by the host. - * - * @deprecated Use NET_HOST_CONNECTION_TYPE_VALUE_UNKNOWN. - */ -exports.NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN; -/** - * The constant map of values for NetHostConnectionTypeValues. - * @deprecated Use the NETHOSTCONNECTIONTYPEVALUES_XXXXX constants rather than the NetHostConnectionTypeValues.XXXXX for bundle minification. - */ -exports.NetHostConnectionTypeValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI, - TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED, - TMP_NETHOSTCONNECTIONTYPEVALUES_CELL, - TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE, - TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for NetHostConnectionSubtypeValues enum definition - * - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = 'gprs'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = 'edge'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = 'umts'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = 'cdma'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = 'evdo_0'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = 'evdo_a'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = 'cdma2000_1xrtt'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = 'hsdpa'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = 'hsupa'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = 'hspa'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = 'iden'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = 'evdo_b'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE = 'lte'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = 'ehrpd'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = 'hspap'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM = 'gsm'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = 'td_scdma'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = 'iwlan'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR = 'nr'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = 'nrnsa'; -const TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = 'lte_ca'; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_GPRS. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_EDGE. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_UMTS. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_CDMA. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_EVDO_0. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_EVDO_A. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_CDMA2000_1XRTT. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_HSDPA. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_HSUPA. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_HSPA. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_IDEN. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_EVDO_B. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_LTE. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_LTE = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_EHRPD. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_HSPAP. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_GSM. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_GSM = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_TD_SCDMA. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_IWLAN. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_NR. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_NR = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_NRNSA. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA; -/** - * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection. - * - * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_LTE_CA. - */ -exports.NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA; -/** - * The constant map of values for NetHostConnectionSubtypeValues. - * @deprecated Use the NETHOSTCONNECTIONSUBTYPEVALUES_XXXXX constants rather than the NetHostConnectionSubtypeValues.XXXXX for bundle minification. - */ -exports.NetHostConnectionSubtypeValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA, - TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for HttpFlavorValues enum definition - * - * Kind of HTTP protocol used. - * - * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_HTTPFLAVORVALUES_HTTP_1_0 = '1.0'; -const TMP_HTTPFLAVORVALUES_HTTP_1_1 = '1.1'; -const TMP_HTTPFLAVORVALUES_HTTP_2_0 = '2.0'; -const TMP_HTTPFLAVORVALUES_SPDY = 'SPDY'; -const TMP_HTTPFLAVORVALUES_QUIC = 'QUIC'; -/** - * Kind of HTTP protocol used. - * - * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. - * - * @deprecated Use HTTP_FLAVOR_VALUE_HTTP_1_0. - */ -exports.HTTPFLAVORVALUES_HTTP_1_0 = TMP_HTTPFLAVORVALUES_HTTP_1_0; -/** - * Kind of HTTP protocol used. - * - * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. - * - * @deprecated Use HTTP_FLAVOR_VALUE_HTTP_1_1. - */ -exports.HTTPFLAVORVALUES_HTTP_1_1 = TMP_HTTPFLAVORVALUES_HTTP_1_1; -/** - * Kind of HTTP protocol used. - * - * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. - * - * @deprecated Use HTTP_FLAVOR_VALUE_HTTP_2_0. - */ -exports.HTTPFLAVORVALUES_HTTP_2_0 = TMP_HTTPFLAVORVALUES_HTTP_2_0; -/** - * Kind of HTTP protocol used. - * - * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. - * - * @deprecated Use HTTP_FLAVOR_VALUE_SPDY. - */ -exports.HTTPFLAVORVALUES_SPDY = TMP_HTTPFLAVORVALUES_SPDY; -/** - * Kind of HTTP protocol used. - * - * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. - * - * @deprecated Use HTTP_FLAVOR_VALUE_QUIC. - */ -exports.HTTPFLAVORVALUES_QUIC = TMP_HTTPFLAVORVALUES_QUIC; -/** - * The constant map of values for HttpFlavorValues. - * @deprecated Use the HTTPFLAVORVALUES_XXXXX constants rather than the HttpFlavorValues.XXXXX for bundle minification. - */ -exports.HttpFlavorValues = { - HTTP_1_0: TMP_HTTPFLAVORVALUES_HTTP_1_0, - HTTP_1_1: TMP_HTTPFLAVORVALUES_HTTP_1_1, - HTTP_2_0: TMP_HTTPFLAVORVALUES_HTTP_2_0, - SPDY: TMP_HTTPFLAVORVALUES_SPDY, - QUIC: TMP_HTTPFLAVORVALUES_QUIC, -}; -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for MessagingDestinationKindValues enum definition - * - * The kind of message destination. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE = 'queue'; -const TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC = 'topic'; -/** - * The kind of message destination. - * - * @deprecated Use MESSAGING_DESTINATION_KIND_VALUE_QUEUE. - */ -exports.MESSAGINGDESTINATIONKINDVALUES_QUEUE = TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE; -/** - * The kind of message destination. - * - * @deprecated Use MESSAGING_DESTINATION_KIND_VALUE_TOPIC. - */ -exports.MESSAGINGDESTINATIONKINDVALUES_TOPIC = TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC; -/** - * The constant map of values for MessagingDestinationKindValues. - * @deprecated Use the MESSAGINGDESTINATIONKINDVALUES_XXXXX constants rather than the MessagingDestinationKindValues.XXXXX for bundle minification. - */ -exports.MessagingDestinationKindValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE, - TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for MessagingOperationValues enum definition - * - * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_MESSAGINGOPERATIONVALUES_RECEIVE = 'receive'; -const TMP_MESSAGINGOPERATIONVALUES_PROCESS = 'process'; -/** - * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. - * - * @deprecated Use MESSAGING_OPERATION_VALUE_RECEIVE. - */ -exports.MESSAGINGOPERATIONVALUES_RECEIVE = TMP_MESSAGINGOPERATIONVALUES_RECEIVE; -/** - * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case. - * - * @deprecated Use MESSAGING_OPERATION_VALUE_PROCESS. - */ -exports.MESSAGINGOPERATIONVALUES_PROCESS = TMP_MESSAGINGOPERATIONVALUES_PROCESS; -/** - * The constant map of values for MessagingOperationValues. - * @deprecated Use the MESSAGINGOPERATIONVALUES_XXXXX constants rather than the MessagingOperationValues.XXXXX for bundle minification. - */ -exports.MessagingOperationValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_MESSAGINGOPERATIONVALUES_RECEIVE, - TMP_MESSAGINGOPERATIONVALUES_PROCESS, -]); -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for RpcGrpcStatusCodeValues enum definition - * - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_RPCGRPCSTATUSCODEVALUES_OK = 0; -const TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED = 1; -const TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN = 2; -const TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = 3; -const TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = 4; -const TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND = 5; -const TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = 6; -const TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = 7; -const TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = 8; -const TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = 9; -const TMP_RPCGRPCSTATUSCODEVALUES_ABORTED = 10; -const TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = 11; -const TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = 12; -const TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL = 13; -const TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = 14; -const TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS = 15; -const TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = 16; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_OK. - */ -exports.RPCGRPCSTATUSCODEVALUES_OK = TMP_RPCGRPCSTATUSCODEVALUES_OK; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_CANCELLED. - */ -exports.RPCGRPCSTATUSCODEVALUES_CANCELLED = TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_UNKNOWN. - */ -exports.RPCGRPCSTATUSCODEVALUES_UNKNOWN = TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_INVALID_ARGUMENT. - */ -exports.RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_DEADLINE_EXCEEDED. - */ -exports.RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_NOT_FOUND. - */ -exports.RPCGRPCSTATUSCODEVALUES_NOT_FOUND = TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_ALREADY_EXISTS. - */ -exports.RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_PERMISSION_DENIED. - */ -exports.RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_RESOURCE_EXHAUSTED. - */ -exports.RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_FAILED_PRECONDITION. - */ -exports.RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_ABORTED. - */ -exports.RPCGRPCSTATUSCODEVALUES_ABORTED = TMP_RPCGRPCSTATUSCODEVALUES_ABORTED; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_OUT_OF_RANGE. - */ -exports.RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_UNIMPLEMENTED. - */ -exports.RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_INTERNAL. - */ -exports.RPCGRPCSTATUSCODEVALUES_INTERNAL = TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_UNAVAILABLE. - */ -exports.RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_DATA_LOSS. - */ -exports.RPCGRPCSTATUSCODEVALUES_DATA_LOSS = TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS; -/** - * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request. - * - * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_UNAUTHENTICATED. - */ -exports.RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED; -/** - * The constant map of values for RpcGrpcStatusCodeValues. - * @deprecated Use the RPCGRPCSTATUSCODEVALUES_XXXXX constants rather than the RpcGrpcStatusCodeValues.XXXXX for bundle minification. - */ -exports.RpcGrpcStatusCodeValues = { - OK: TMP_RPCGRPCSTATUSCODEVALUES_OK, - CANCELLED: TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED, - UNKNOWN: TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN, - INVALID_ARGUMENT: TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT, - DEADLINE_EXCEEDED: TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED, - NOT_FOUND: TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND, - ALREADY_EXISTS: TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS, - PERMISSION_DENIED: TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED, - RESOURCE_EXHAUSTED: TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED, - FAILED_PRECONDITION: TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION, - ABORTED: TMP_RPCGRPCSTATUSCODEVALUES_ABORTED, - OUT_OF_RANGE: TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE, - UNIMPLEMENTED: TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED, - INTERNAL: TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL, - UNAVAILABLE: TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE, - DATA_LOSS: TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS, - UNAUTHENTICATED: TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED, -}; -/* ---------------------------------------------------------------------------------------------------------- - * Constant values for MessageTypeValues enum definition - * - * Whether this is a received or sent message. - * ---------------------------------------------------------------------------------------------------------- */ -// Temporary local constants to assign to the individual exports and the namespaced version -// Required to avoid the namespace exports using the unminifiable export names for some package types -const TMP_MESSAGETYPEVALUES_SENT = 'SENT'; -const TMP_MESSAGETYPEVALUES_RECEIVED = 'RECEIVED'; -/** - * Whether this is a received or sent message. - * - * @deprecated Use MESSAGE_TYPE_VALUE_SENT. - */ -exports.MESSAGETYPEVALUES_SENT = TMP_MESSAGETYPEVALUES_SENT; -/** - * Whether this is a received or sent message. - * - * @deprecated Use MESSAGE_TYPE_VALUE_RECEIVED. - */ -exports.MESSAGETYPEVALUES_RECEIVED = TMP_MESSAGETYPEVALUES_RECEIVED; -/** - * The constant map of values for MessageTypeValues. - * @deprecated Use the MESSAGETYPEVALUES_XXXXX constants rather than the MessageTypeValues.XXXXX for bundle minification. - */ -exports.MessageTypeValues = -/*#__PURE__*/ (0, utils_1.createConstMap)([ - TMP_MESSAGETYPEVALUES_SENT, - TMP_MESSAGETYPEVALUES_RECEIVED, -]); -//# sourceMappingURL=SemanticAttributes.js.map - -/***/ }), - -/***/ 45836: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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 })); -/* eslint-disable no-restricted-syntax -- - * These re-exports are only of constants, only one-level deep at this point, - * and should not cause problems for tree-shakers. - */ -__exportStar(__nccwpck_require__(89943), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 252: -/***/ ((module) => { - -"use strict"; - -module.exports = asPromise; - -/** - * Callback as used by {@link util.asPromise}. - * @typedef asPromiseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {...*} params Additional arguments - * @returns {undefined} - */ - -/** - * Returns a promise from a node-style callback function. - * @memberof util - * @param {asPromiseCallback} fn Function to call - * @param {*} ctx Function context - * @param {...*} params Function arguments - * @returns {Promise<*>} Promisified function - */ -function asPromise(fn, ctx/*, varargs */) { - var params = new Array(arguments.length - 1), - offset = 0, - index = 2, - pending = true; - while (index < arguments.length) - params[offset++] = arguments[index++]; - return new Promise(function executor(resolve, reject) { - params[offset] = function callback(err/*, varargs */) { - if (pending) { - pending = false; - if (err) - reject(err); - else { - var params = new Array(arguments.length - 1), - offset = 0; - while (offset < params.length) - params[offset++] = arguments[offset]; - resolve.apply(null, params); - } - } - }; - try { - fn.apply(ctx || null, params); - } catch (err) { - if (pending) { - pending = false; - reject(err); - } + if (isDisturbed(this.opts.body)) { + this.headersSent = true; + this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage); + return; } - }); -} - - -/***/ }), - -/***/ 26718: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -/** - * A minimal base64 implementation for number arrays. - * @memberof util - * @namespace - */ -var base64 = exports; - -/** - * Calculates the byte length of a base64 encoded string. - * @param {string} string Base64 encoded string - * @returns {number} Byte length - */ -base64.length = function length(string) { - var p = string.length; - if (!p) - return 0; - var n = 0; - while (--p % 4 > 1 && string.charAt(p) === "=") - ++n; - return Math.ceil(string.length * 3) / 4 - n; -}; - -// Base64 encoding table -var b64 = new Array(64); - -// Base64 decoding table -var s64 = new Array(123); - -// 65..90, 97..122, 48..57, 43, 47 -for (var i = 0; i < 64;) - s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; - -/** - * Encodes a buffer to a base64 encoded string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} Base64 encoded string - */ -base64.encode = function encode(buffer, start, end) { - var parts = null, - chunk = []; - var i = 0, // output index - j = 0, // goto index - t; // temporary - while (start < end) { - var b = buffer[start++]; - switch (j) { - case 0: - chunk[i++] = b64[b >> 2]; - t = (b & 3) << 4; - j = 1; - break; - case 1: - chunk[i++] = b64[t | b >> 4]; - t = (b & 15) << 2; - j = 2; - break; - case 2: - chunk[i++] = b64[t | b >> 6]; - chunk[i++] = b64[b & 63]; - j = 0; - break; + function shouldRetry(passedErr) { + if (passedErr) { + this.headersSent = true; + this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage); + controller.resume(); + return; + } + this.error = err; + controller.resume(); + } + controller.pause(); + this.retryOpts.retry( + err, + { + state: { counter: this.retryCount }, + opts: { retryOptions: this.retryOpts, ...this.opts } + }, + shouldRetry.bind(this) + ); + } + onRequestStart(controller, context2) { + if (!this.headersSent) { + this.handler.onRequestStart?.(controller, context2); + } + } + onRequestUpgrade(controller, statusCode, headers, socket) { + this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket); + } + 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 (i > 8191) { - (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); - i = 0; + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err); + return; } - } - if (j) { - chunk[i++] = b64[t]; - chunk[i++] = 61; - if (j === 1) - chunk[i++] = 61; - } - if (parts) { - if (i) - parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); - return parts.join(""); - } - return String.fromCharCode.apply(String, chunk.slice(0, i)); -}; - -var invalidEncoding = "invalid encoding"; - -/** - * Decodes a base64 encoded string to a buffer. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Number of bytes written - * @throws {Error} If encoding is invalid - */ -base64.decode = function decode(string, buffer, offset) { - var start = offset; - var j = 0, // goto index - t; // temporary - for (var i = 0; i < string.length;) { - var c = string.charCodeAt(i++); - if (c === 61 && j > 1) - break; - if ((c = s64[c]) === undefined) - throw Error(invalidEncoding); - switch (j) { - case 0: - t = c; - j = 1; - break; - case 1: - buffer[offset++] = t << 2 | (c & 48) >> 4; - t = c; - j = 2; - break; - case 2: - buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; - t = c; - j = 3; - break; - case 3: - buffer[offset++] = (t & 3) << 6 | c; - j = 0; - break; + if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { + cb(err); + return; } - } - if (j === 1) - throw Error(invalidEncoding); - return offset - start; -}; - -/** - * Tests if the specified string appears to be base64 encoded. - * @param {string} string String to test - * @returns {boolean} `true` if probably base64 encoded, otherwise false - */ -base64.test = function test(string) { - return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); -}; - - -/***/ }), - -/***/ 86850: -/***/ ((module) => { - -"use strict"; - -module.exports = EventEmitter; - -/** - * Constructs a new event emitter instance. - * @classdesc A minimal event emitter. - * @memberof util - * @constructor - */ -function EventEmitter() { - - /** - * Registered listeners. - * @type {Object.} - * @private - */ - this._listeners = {}; -} - -/** - * Registers an event listener. - * @param {string} evt Event name - * @param {function} fn Listener - * @param {*} [ctx] Listener context - * @returns {util.EventEmitter} `this` - */ -EventEmitter.prototype.on = function on(evt, fn, ctx) { - (this._listeners[evt] || (this._listeners[evt] = [])).push({ - fn : fn, - ctx : ctx || this - }); - return this; -}; - -/** - * Removes an event listener or any matching listeners if arguments are omitted. - * @param {string} [evt] Event name. Removes all listeners if omitted. - * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted. - * @returns {util.EventEmitter} `this` - */ -EventEmitter.prototype.off = function off(evt, fn) { - if (evt === undefined) - this._listeners = {}; - else { - if (fn === undefined) - this._listeners[evt] = []; - else { - var listeners = this._listeners[evt]; - for (var i = 0; i < listeners.length;) - if (listeners[i].fn === fn) - listeners.splice(i, 1); - else - ++i; + if (counter > maxRetries) { + cb(err); + return; } - } - return this; -}; - -/** - * Emits an event by calling its listeners with the specified arguments. - * @param {string} evt Event name - * @param {...*} args Arguments - * @returns {util.EventEmitter} `this` - */ -EventEmitter.prototype.emit = function emit(evt) { - var listeners = this._listeners[evt]; - if (listeners) { - var args = [], - i = 1; - for (; i < arguments.length;) - args.push(arguments[i++]); - for (i = 0; i < listeners.length;) - listeners[i].fn.apply(listeners[i++].ctx, args); - } - return this; -}; - - -/***/ }), - -/***/ 21843: -/***/ ((module) => { - -"use strict"; - - -module.exports = factory(factory); - -/** - * Reads / writes floats / doubles from / to buffers. - * @name util.float - * @namespace - */ - -/** - * Writes a 32 bit float to a buffer using little endian byte order. - * @name util.float.writeFloatLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Writes a 32 bit float to a buffer using big endian byte order. - * @name util.float.writeFloatBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Reads a 32 bit float from a buffer using little endian byte order. - * @name util.float.readFloatLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Reads a 32 bit float from a buffer using big endian byte order. - * @name util.float.readFloatBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Writes a 64 bit double to a buffer using little endian byte order. - * @name util.float.writeDoubleLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Writes a 64 bit double to a buffer using big endian byte order. - * @name util.float.writeDoubleBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Reads a 64 bit double from a buffer using little endian byte order. - * @name util.float.readDoubleLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Reads a 64 bit double from a buffer using big endian byte order. - * @name util.float.readDoubleBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -// Factory function for the purpose of node-based testing in modified global environments -function factory(exports) { - - // float: typed array - if (typeof Float32Array !== "undefined") (function() { - - var f32 = new Float32Array([ -0 ]), - f8b = new Uint8Array(f32.buffer), - le = f8b[3] === 128; - - function writeFloat_f32_cpy(val, buf, pos) { - f32[0] = val; - buf[pos ] = f8b[0]; - buf[pos + 1] = f8b[1]; - buf[pos + 2] = f8b[2]; - buf[pos + 3] = f8b[3]; - } - - function writeFloat_f32_rev(val, buf, pos) { - f32[0] = val; - buf[pos ] = f8b[3]; - buf[pos + 1] = f8b[2]; - buf[pos + 2] = f8b[1]; - buf[pos + 3] = f8b[0]; - } - - /* istanbul ignore next */ - exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev; - /* istanbul ignore next */ - exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy; - - function readFloat_f32_cpy(buf, pos) { - f8b[0] = buf[pos ]; - f8b[1] = buf[pos + 1]; - f8b[2] = buf[pos + 2]; - f8b[3] = buf[pos + 3]; - return f32[0]; - } - - function readFloat_f32_rev(buf, pos) { - f8b[3] = buf[pos ]; - f8b[2] = buf[pos + 1]; - f8b[1] = buf[pos + 2]; - f8b[0] = buf[pos + 3]; - return f32[0]; - } - - /* istanbul ignore next */ - exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev; - /* istanbul ignore next */ - exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy; - - // float: ieee754 - })(); else (function() { - - function writeFloat_ieee754(writeUint, val, buf, pos) { - var sign = val < 0 ? 1 : 0; - if (sign) - val = -val; - if (val === 0) - writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos); - else if (isNaN(val)) - writeUint(2143289344, buf, pos); - else if (val > 3.4028234663852886e+38) // +-Infinity - writeUint((sign << 31 | 2139095040) >>> 0, buf, pos); - else if (val < 1.1754943508222875e-38) // denormal - writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos); - else { - var exponent = Math.floor(Math.log(val) / Math.LN2), - mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607; - writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos); + let retryAfterHeader = headers?.["retry-after"]; + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader); + retryAfterHeader = Number.isNaN(retryAfterHeader) ? calculateRetryAfterHeader(headers["retry-after"]) : retryAfterHeader * 1e3; + } + const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout); + setTimeout(() => cb(null), retryTimeout); + } + onResponseStart(controller, statusCode, headers, statusMessage) { + this.error = null; + this.retryCount += 1; + if (statusCode >= 300) { + const err = new RequestRetryError("Request failed", statusCode, { + headers, + data: { + count: this.retryCount } + }); + this.onResponseStartWithRetry(controller, statusCode, headers, statusMessage, err); + return; } - - exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE); - exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE); - - function readFloat_ieee754(readUint, buf, pos) { - var uint = readUint(buf, pos), - sign = (uint >> 31) * 2 + 1, - exponent = uint >>> 23 & 255, - mantissa = uint & 8388607; - return exponent === 255 - ? mantissa - ? NaN - : sign * Infinity - : exponent === 0 // denormal - ? sign * 1.401298464324817e-45 * mantissa - : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608); + if (this.headersSent) { + if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { + throw new RequestRetryError("server does not support the range header and the payload was partially consumed", statusCode, { + headers, + data: { count: this.retryCount } + }); + } + const contentRange = parseRangeHeader(headers["content-range"]); + if (!contentRange) { + throw new RequestRetryError("Content-Range mismatch", statusCode, { + headers, + data: { count: this.retryCount } + }); + } + if (this.etag != null && this.etag !== headers.etag) { + throw new RequestRetryError("ETag mismatch", statusCode, { + headers, + data: { count: this.retryCount } + }); + } + const { start, size, end = size ? size - 1 : null } = contentRange; + assert(this.start === start, "content-range mismatch"); + assert(this.end == null || this.end === end, "content-range mismatch"); + return; } - - exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE); - exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE); - - })(); - - // double: typed array - if (typeof Float64Array !== "undefined") (function() { - - var f64 = new Float64Array([-0]), - f8b = new Uint8Array(f64.buffer), - le = f8b[7] === 128; - - function writeDouble_f64_cpy(val, buf, pos) { - f64[0] = val; - buf[pos ] = f8b[0]; - buf[pos + 1] = f8b[1]; - buf[pos + 2] = f8b[2]; - buf[pos + 3] = f8b[3]; - buf[pos + 4] = f8b[4]; - buf[pos + 5] = f8b[5]; - buf[pos + 6] = f8b[6]; - buf[pos + 7] = f8b[7]; - } - - function writeDouble_f64_rev(val, buf, pos) { - f64[0] = val; - buf[pos ] = f8b[7]; - buf[pos + 1] = f8b[6]; - buf[pos + 2] = f8b[5]; - buf[pos + 3] = f8b[4]; - buf[pos + 4] = f8b[3]; - buf[pos + 5] = f8b[2]; - buf[pos + 6] = f8b[1]; - buf[pos + 7] = f8b[0]; - } - - /* istanbul ignore next */ - exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev; - /* istanbul ignore next */ - exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy; - - function readDouble_f64_cpy(buf, pos) { - f8b[0] = buf[pos ]; - f8b[1] = buf[pos + 1]; - f8b[2] = buf[pos + 2]; - f8b[3] = buf[pos + 3]; - f8b[4] = buf[pos + 4]; - f8b[5] = buf[pos + 5]; - f8b[6] = buf[pos + 6]; - f8b[7] = buf[pos + 7]; - return f64[0]; - } - - function readDouble_f64_rev(buf, pos) { - f8b[7] = buf[pos ]; - f8b[6] = buf[pos + 1]; - f8b[5] = buf[pos + 2]; - f8b[4] = buf[pos + 3]; - f8b[3] = buf[pos + 4]; - f8b[2] = buf[pos + 5]; - f8b[1] = buf[pos + 6]; - f8b[0] = buf[pos + 7]; - return f64[0]; - } - - /* istanbul ignore next */ - exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev; - /* istanbul ignore next */ - exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy; - - // double: ieee754 - })(); else (function() { - - function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) { - var sign = val < 0 ? 1 : 0; - if (sign) - val = -val; - if (val === 0) { - writeUint(0, buf, pos + off0); - writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1); - } else if (isNaN(val)) { - writeUint(0, buf, pos + off0); - writeUint(2146959360, buf, pos + off1); - } else if (val > 1.7976931348623157e+308) { // +-Infinity - writeUint(0, buf, pos + off0); - writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1); - } else { - var mantissa; - if (val < 2.2250738585072014e-308) { // denormal - mantissa = val / 5e-324; - writeUint(mantissa >>> 0, buf, pos + off0); - writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1); - } else { - var exponent = Math.floor(Math.log(val) / Math.LN2); - if (exponent === 1024) - exponent = 1023; - mantissa = val * Math.pow(2, -exponent); - writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0); - writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1); - } + if (this.end == null) { + if (statusCode === 206) { + const range = parseRangeHeader(headers["content-range"]); + if (range == null) { + this.headersSent = true; + this.handler.onResponseStart?.( + controller, + statusCode, + headers, + statusMessage + ); + return; + } + const { start, size, end = size ? size - 1 : null } = 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; + } + 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 = true; + this.etag = headers.etag != null ? headers.etag : null; + if (this.etag != null && this.etag[0] === "W" && this.etag[1] === "/") { + this.etag = null; + } + this.headersSent = true; + this.handler.onResponseStart?.( + controller, + statusCode, + headers, + statusMessage + ); + } else { + throw new RequestRetryError("Request failed", statusCode, { + headers, + data: { count: this.retryCount } + }); + } + } + onResponseData(controller, chunk) { + if (this.error) { + return; + } + this.start += chunk.length; + this.handler.onResponseData?.(controller, chunk); + } + onResponseEnd(controller, trailers) { + if (this.error && this.retryOpts.throwOnError) { + throw this.error; + } + if (!this.error) { + this.retryCount = 0; + return this.handler.onResponseEnd?.(controller, trailers); + } + this.retry(controller); + } + retry(controller) { + 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 } + }; } - - exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4); - exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0); - - function readDouble_ieee754(readUint, off0, off1, buf, pos) { - var lo = readUint(buf, pos + off0), - hi = readUint(buf, pos + off1); - var sign = (hi >> 31) * 2 + 1, - exponent = hi >>> 20 & 2047, - mantissa = 4294967296 * (hi & 1048575) + lo; - return exponent === 2047 - ? mantissa - ? NaN - : sign * Infinity - : exponent === 0 // denormal - ? sign * 5e-324 * mantissa - : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496); + try { + this.retryCountCheckpoint = this.retryCount; + this.dispatch(this.opts, this); + } catch (err) { + this.handler.onResponseError?.(controller, err); } + } + onResponseError(controller, err) { + if (controller?.aborted || isDisturbed(this.opts.body)) { + this.handler.onResponseError?.(controller, err); + return; + } + function shouldRetry(returnedErr) { + if (!returnedErr) { + this.retry(controller); + return; + } + this.handler?.onResponseError?.(controller, returnedErr); + } + 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 } + }, + shouldRetry.bind(this) + ); + } + }; + module3.exports = RetryHandler; + } +}); - exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4); - exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0); - - })(); +// node_modules/undici/lib/dispatcher/retry-agent.js +var require_retry_agent = __commonJS({ + "node_modules/undici/lib/dispatcher/retry-agent.js"(exports, module3) { + "use strict"; + var Dispatcher = require_dispatcher(); + var RetryHandler = require_retry_handler(); + var RetryAgent = class extends Dispatcher { + #agent = null; + #options = null; + constructor(agent, options2 = {}) { + super(options2); + this.#agent = agent; + this.#options = options2; + } + 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(); + } + }; + module3.exports = RetryAgent; + } +}); - return exports; -} +// node_modules/undici/lib/dispatcher/h2c-client.js +var require_h2c_client = __commonJS({ + "node_modules/undici/lib/dispatcher/h2c-client.js"(exports, module3) { + "use strict"; + var { InvalidArgumentError } = require_errors(); + var Client = require_client(); + var H2CClient = class extends Client { + constructor(origin, clientOpts) { + if (typeof origin === "string") { + origin = new URL(origin); + } + if (origin.protocol !== "http:") { + throw new InvalidArgumentError( + "h2c-client: Only h2c protocol is supported" + ); + } + const { connect, maxConcurrentStreams, pipelining, ...opts } = clientOpts ?? {}; + let defaultMaxConcurrentStreams = 100; + let defaultPipelining = 100; + if (maxConcurrentStreams != null && Number.isInteger(maxConcurrentStreams) && maxConcurrentStreams > 0) { + defaultMaxConcurrentStreams = maxConcurrentStreams; + } + if (pipelining != null && Number.isInteger(pipelining) && pipelining > 0) { + defaultPipelining = pipelining; + } + if (defaultPipelining > defaultMaxConcurrentStreams) { + throw new InvalidArgumentError( + "h2c-client: pipelining cannot be greater than maxConcurrentStreams" + ); + } + super(origin, { + ...opts, + maxConcurrentStreams: defaultMaxConcurrentStreams, + pipelining: defaultPipelining, + allowH2: true, + useH2c: true + }); + } + }; + module3.exports = H2CClient; + } +}); -// uint helpers - -function writeUintLE(val, buf, pos) { - buf[pos ] = val & 255; - buf[pos + 1] = val >>> 8 & 255; - buf[pos + 2] = val >>> 16 & 255; - buf[pos + 3] = val >>> 24; -} - -function writeUintBE(val, buf, pos) { - buf[pos ] = val >>> 24; - buf[pos + 1] = val >>> 16 & 255; - buf[pos + 2] = val >>> 8 & 255; - buf[pos + 3] = val & 255; -} - -function readUintLE(buf, pos) { - return (buf[pos ] - | buf[pos + 1] << 8 - | buf[pos + 2] << 16 - | buf[pos + 3] << 24) >>> 0; -} - -function readUintBE(buf, pos) { - return (buf[pos ] << 24 - | buf[pos + 1] << 16 - | buf[pos + 2] << 8 - | buf[pos + 3]) >>> 0; -} - - -/***/ }), - -/***/ 60094: -/***/ ((module) => { - -"use strict"; - -module.exports = inquire; - -/** - * Requires a module only if available. - * @memberof util - * @param {string} moduleName Module to require - * @returns {?Object} Required module if available and not empty, otherwise `null` - */ -function inquire(moduleName) { - try { - var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval - if (mod && (mod.length || Object.keys(mod).length)) - return mod; - } catch (e) {} // eslint-disable-line no-empty - return null; -} - - -/***/ }), - -/***/ 47743: -/***/ ((module) => { - -"use strict"; - -module.exports = pool; - -/** - * An allocator as used by {@link util.pool}. - * @typedef PoolAllocator - * @type {function} - * @param {number} size Buffer size - * @returns {Uint8Array} Buffer - */ - -/** - * A slicer as used by {@link util.pool}. - * @typedef PoolSlicer - * @type {function} - * @param {number} start Start offset - * @param {number} end End offset - * @returns {Uint8Array} Buffer slice - * @this {Uint8Array} - */ - -/** - * A general purpose buffer pool. - * @memberof util - * @function - * @param {PoolAllocator} alloc Allocator - * @param {PoolSlicer} slice Slicer - * @param {number} [size=8192] Slab size - * @returns {PoolAllocator} Pooled allocator - */ -function pool(alloc, slice, size) { - var SIZE = size || 8192; - var MAX = SIZE >>> 1; - var slab = null; - var offset = SIZE; - return function pool_alloc(size) { - if (size < 1 || size > MAX) - return alloc(size); - if (offset + size > SIZE) { - slab = alloc(SIZE); - offset = 0; - } - var buf = slice.call(slab, offset, offset += size); - if (offset & 7) // align to 32 bit - offset = (offset | 7) + 1; - return buf; +// node_modules/undici/lib/api/readable.js +var require_readable = __commonJS({ + "node_modules/undici/lib/api/readable.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var { Readable } = __require("node:stream"); + var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors(); + var util = require_util(); + var { ReadableStreamFrom } = require_util(); + var kConsume = /* @__PURE__ */ Symbol("kConsume"); + var kReading = /* @__PURE__ */ Symbol("kReading"); + var kBody = /* @__PURE__ */ Symbol("kBody"); + var kAbort = /* @__PURE__ */ Symbol("kAbort"); + var kContentType = /* @__PURE__ */ Symbol("kContentType"); + var kContentLength = /* @__PURE__ */ Symbol("kContentLength"); + var kUsed = /* @__PURE__ */ Symbol("kUsed"); + var kBytesRead = /* @__PURE__ */ Symbol("kBytesRead"); + var noop = () => { }; -} - - -/***/ }), - -/***/ 99049: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -/** - * A minimal UTF8 implementation for number arrays. - * @memberof util - * @namespace - */ -var utf8 = exports; - -/** - * Calculates the UTF8 byte length of a string. - * @param {string} string String - * @returns {number} Byte length - */ -utf8.length = function utf8_length(string) { - var len = 0, - c = 0; - for (var i = 0; i < string.length; ++i) { - c = string.charCodeAt(i); - if (c < 128) - len += 1; - else if (c < 2048) - len += 2; - else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { - ++i; - len += 4; - } else - len += 3; - } - return len; -}; - -/** - * Reads UTF8 bytes as a string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} String read - */ -utf8.read = function utf8_read(buffer, start, end) { - var len = end - start; - if (len < 1) - return ""; - var parts = null, - chunk = [], - i = 0, // char offset - t; // temporary - while (start < end) { - t = buffer[start++]; - if (t < 128) - chunk[i++] = t; - else if (t > 191 && t < 224) - chunk[i++] = (t & 31) << 6 | buffer[start++] & 63; - else if (t > 239 && t < 365) { - t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000; - chunk[i++] = 0xD800 + (t >> 10); - chunk[i++] = 0xDC00 + (t & 1023); - } else - chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63; - if (i > 8191) { - (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); - i = 0; - } - } - if (parts) { - if (i) - parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); - return parts.join(""); - } - return String.fromCharCode.apply(String, chunk.slice(0, i)); -}; - -/** - * Writes a string as UTF8 bytes. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Bytes written - */ -utf8.write = function utf8_write(string, buffer, offset) { - var start = offset, - c1, // character 1 - c2; // character 2 - for (var i = 0; i < string.length; ++i) { - c1 = string.charCodeAt(i); - if (c1 < 128) { - buffer[offset++] = c1; - } else if (c1 < 2048) { - buffer[offset++] = c1 >> 6 | 192; - buffer[offset++] = c1 & 63 | 128; - } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { - c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); - ++i; - buffer[offset++] = c1 >> 18 | 240; - buffer[offset++] = c1 >> 12 & 63 | 128; - buffer[offset++] = c1 >> 6 & 63 | 128; - buffer[offset++] = c1 & 63 | 128; + var BodyReadable = class extends Readable { + /** + * @param {object} opts + * @param {(this: Readable, size: number) => void} opts.resume + * @param {() => (void | null)} opts.abort + * @param {string} [opts.contentType = ''] + * @param {number} [opts.contentLength] + * @param {number} [opts.highWaterMark = 64 * 1024] + */ + 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[kBytesRead] = 0; + this[kBody] = null; + this[kUsed] = false; + this[kContentType] = contentType; + this[kContentLength] = Number.isFinite(contentLength) ? contentLength : null; + this[kReading] = false; + } + /** + * @param {Error|null} err + * @param {(error:(Error|null)) => void} callback + * @returns {void} + */ + _destroy(err, callback) { + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError(); + } + if (err) { + this[kAbort](); + } + if (!this[kUsed]) { + setImmediate(callback, err); } else { - buffer[offset++] = c1 >> 12 | 224; - buffer[offset++] = c1 >> 6 & 63 | 128; - buffer[offset++] = c1 & 63 | 128; + callback(err); } - } - return offset - start; -}; - - -/***/ }), - -/***/ 63835: -/***/ ((module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0; -const core_1 = __nccwpck_require__(22589); -const draft2020_1 = __nccwpck_require__(77301); -const discriminator_1 = __nccwpck_require__(88492); -const json_schema_2020_12_1 = __nccwpck_require__(38517); -const META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema"; -class Ajv2020 extends core_1.default { - constructor(opts = {}) { - super({ - ...opts, - dynamicRef: true, - next: true, - unevaluated: true, + } + /** + * @param {string|symbol} event + * @param {(...args: any[]) => void} listener + * @returns {this} + */ + on(event, listener) { + if (event === "data" || event === "readable") { + this[kReading] = true; + this[kUsed] = true; + } + return super.on(event, listener); + } + /** + * @param {string|symbol} event + * @param {(...args: any[]) => void} listener + * @returns {this} + */ + addListener(event, listener) { + return this.on(event, listener); + } + /** + * @param {string|symbol} event + * @param {(...args: any[]) => void} listener + * @returns {this} + */ + off(event, listener) { + const ret = super.off(event, listener); + if (event === "data" || event === "readable") { + this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; + } + return ret; + } + /** + * @param {string|symbol} event + * @param {(...args: any[]) => void} listener + * @returns {this} + */ + removeListener(event, listener) { + return this.off(event, listener); + } + /** + * @param {Buffer|null} chunk + * @returns {boolean} + */ + push(chunk) { + if (chunk) { + this[kBytesRead] += chunk.length; + if (this[kConsume]) { + consumePush(this[kConsume], chunk); + return this[kReading] ? super.push(chunk) : true; + } + } + return super.push(chunk); + } + /** + * Consumes and returns the body as a string. + * + * @see https://fetch.spec.whatwg.org/#dom-body-text + * @returns {Promise} + */ + text() { + return consume(this, "text"); + } + /** + * Consumes and returns the body as a JavaScript Object. + * + * @see https://fetch.spec.whatwg.org/#dom-body-json + * @returns {Promise} + */ + json() { + return consume(this, "json"); + } + /** + * Consumes and returns the body as a Blob + * + * @see https://fetch.spec.whatwg.org/#dom-body-blob + * @returns {Promise} + */ + blob() { + return consume(this, "blob"); + } + /** + * Consumes and returns the body as an Uint8Array. + * + * @see https://fetch.spec.whatwg.org/#dom-body-bytes + * @returns {Promise} + */ + bytes() { + return consume(this, "bytes"); + } + /** + * Consumes and returns the body as an ArrayBuffer. + * + * @see https://fetch.spec.whatwg.org/#dom-body-arraybuffer + * @returns {Promise} + */ + arrayBuffer() { + return consume(this, "arrayBuffer"); + } + /** + * Not implemented + * + * @see https://fetch.spec.whatwg.org/#dom-body-formdata + * @throws {NotSupportedError} + */ + async formData() { + throw new NotSupportedError(); + } + /** + * Returns true if the body is not null and the body has been consumed. + * Otherwise, returns false. + * + * @see https://fetch.spec.whatwg.org/#dom-body-bodyused + * @readonly + * @returns {boolean} + */ + get bodyUsed() { + return util.isDisturbed(this); + } + /** + * @see https://fetch.spec.whatwg.org/#dom-body-body + * @readonly + * @returns {ReadableStream} + */ + get body() { + if (!this[kBody]) { + this[kBody] = ReadableStreamFrom(this); + if (this[kConsume]) { + this[kBody].getReader(); + assert(this[kBody].locked); + } + } + return this[kBody]; + } + /** + * Dumps the response body by reading `limit` number of bytes. + * @param {object} opts + * @param {number} [opts.limit = 131072] Number of bytes to read. + * @param {AbortSignal} [opts.signal] An AbortSignal to cancel the dump. + * @returns {Promise} + */ + dump(opts) { + const signal = opts?.signal; + if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) { + return Promise.reject(new InvalidArgumentError("signal must be an AbortSignal")); + } + const limit = opts?.limit && Number.isFinite(opts.limit) ? opts.limit : 128 * 1024; + if (signal?.aborted) { + return Promise.reject(signal.reason ?? new AbortError()); + } + if (this._readableState.closeEmitted) { + return Promise.resolve(null); + } + return new Promise((resolve8, reject) => { + if (this[kContentLength] && this[kContentLength] > limit || this[kBytesRead] > limit) { + this.destroy(new AbortError()); + } + if (signal) { + 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 { + resolve8(null); + } + }); + } else { + this.on("close", resolve8); + } + this.on("error", noop).on("data", () => { + if (this[kBytesRead] > limit) { + this.destroy(); + } + }).resume(); }); + } + /** + * @param {BufferEncoding} encoding + * @returns {this} + */ + setEncoding(encoding) { + if (Buffer.isEncoding(encoding)) { + this._readableState.encoding = encoding; + } + return this; + } + }; + function isLocked(bodyReadable) { + return bodyReadable[kBody]?.locked === true || bodyReadable[kConsume] !== null; + } + function isUnusable(bodyReadable) { + return util.isDisturbed(bodyReadable) || isLocked(bodyReadable); + } + function consume(stream, type2) { + assert(!stream[kConsume]); + return new Promise((resolve8, reject) => { + if (isUnusable(stream)) { + const rState = stream._readableState; + if (rState.destroyed && rState.closeEmitted === false) { + stream.on("error", reject).on("close", () => { + reject(new TypeError("unusable")); + }); + } else { + reject(rState.errored ?? new TypeError("unusable")); + } + } else { + queueMicrotask(() => { + stream[kConsume] = { + type: type2, + stream, + resolve: resolve8, + 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]); + }); + } + }); } - _addVocabularies() { - super._addVocabularies(); - draft2020_1.default.forEach((v) => this.addVocabulary(v)); - if (this.opts.discriminator) - this.addKeyword(discriminator_1.default); - } - _addDefaultMetaSchema() { - super._addDefaultMetaSchema(); - const { $data, meta } = this.opts; - if (!meta) - return; - json_schema_2020_12_1.default.call(this, $data); - this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; - } - defaultMeta() { - return (this.opts.defaultMeta = - super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined)); - } -} -module.exports = exports = Ajv2020; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports["default"] = Ajv2020; -var validate_1 = __nccwpck_require__(40857); -Object.defineProperty(exports, "KeywordCxt", ({ enumerable: true, get: function () { return validate_1.KeywordCxt; } })); -var codegen_1 = __nccwpck_require__(34938); -Object.defineProperty(exports, "_", ({ enumerable: true, get: function () { return codegen_1._; } })); -Object.defineProperty(exports, "str", ({ enumerable: true, get: function () { return codegen_1.str; } })); -Object.defineProperty(exports, "stringify", ({ enumerable: true, get: function () { return codegen_1.stringify; } })); -Object.defineProperty(exports, "nil", ({ enumerable: true, get: function () { return codegen_1.nil; } })); -Object.defineProperty(exports, "Name", ({ enumerable: true, get: function () { return codegen_1.Name; } })); -Object.defineProperty(exports, "CodeGen", ({ enumerable: true, get: function () { return codegen_1.CodeGen; } })); -//# sourceMappingURL=2020.js.map - -/***/ }), - -/***/ 1979: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0; -exports._ = _; -exports.str = str; -exports.addCodeArg = addCodeArg; -exports.strConcat = strConcat; -exports.stringify = stringify; -exports.safeStringify = safeStringify; -exports.getProperty = getProperty; -exports.getEsmExportName = getEsmExportName; -exports.regexpCode = regexpCode; -class _CodeOrName { -} -exports._CodeOrName = _CodeOrName; -exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; -class Name extends _CodeOrName { - constructor(s) { - super(); - if (!exports.IDENTIFIER.test(s)) - throw new Error("CodeGen: name must be a valid identifier"); - this.str = s; - } - toString() { - return this.str; - } - emptyStr() { - return false; - } - get names() { - return { [this.str]: 1 }; - } -} -exports.Name = Name; -class _Code extends _CodeOrName { - constructor(code) { - super(); - this._items = typeof code === "string" ? [code] : code; - } - toString() { - return this.str; + function consumeStart(consume2) { + if (consume2.body === null) { + return; + } + const { _readableState: state } = consume2.stream; + if (state.bufferIndex) { + const start = state.bufferIndex; + const end = state.buffer.length; + for (let n8 = start; n8 < end; n8++) { + consumePush(consume2, state.buffer[n8]); + } + } else { + for (const chunk of state.buffer) { + consumePush(consume2, chunk); + } + } + if (state.endEmitted) { + consumeEnd(this[kConsume], this._readableState.encoding); + } else { + consume2.stream.on("end", function() { + consumeEnd(this[kConsume], this._readableState.encoding); + }); + } + consume2.stream.resume(); + while (consume2.stream.read() != null) { + } } - emptyStr() { - if (this._items.length > 1) - return false; - const item = this._items[0]; - return item === "" || item === '""'; + function chunksDecode(chunks, length, encoding) { + 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; + if (!encoding || encoding === "utf8" || encoding === "utf-8") { + return buffer.utf8Slice(start, bufferLength); + } else { + return buffer.subarray(start, bufferLength).toString(encoding); + } } - get str() { - var _a; - return ((_a = this._str) !== null && _a !== void 0 ? _a : (this._str = this._items.reduce((s, c) => `${s}${c}`, ""))); + function chunksConcat(chunks, length) { + if (chunks.length === 0 || length === 0) { + return 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 i2 = 0; i2 < chunks.length; ++i2) { + const chunk = chunks[i2]; + buffer.set(chunk, offset); + offset += chunk.length; + } + return buffer; } - get names() { - var _a; - return ((_a = this._names) !== null && _a !== void 0 ? _a : (this._names = this._items.reduce((names, c) => { - if (c instanceof Name) - names[c.str] = (names[c.str] || 0) + 1; - return names; - }, {}))); + function consumeEnd(consume2, encoding) { + const { type: type2, body, resolve: resolve8, stream, length } = consume2; + try { + if (type2 === "text") { + resolve8(chunksDecode(body, length, encoding)); + } else if (type2 === "json") { + resolve8(JSON.parse(chunksDecode(body, length, encoding))); + } else if (type2 === "arrayBuffer") { + resolve8(chunksConcat(body, length).buffer); + } else if (type2 === "blob") { + resolve8(new Blob(body, { type: stream[kContentType] })); + } else if (type2 === "bytes") { + resolve8(chunksConcat(body, length)); + } + consumeFinish(consume2); + } catch (err) { + stream.destroy(err); + } } -} -exports._Code = _Code; -exports.nil = new _Code(""); -function _(strs, ...args) { - const code = [strs[0]]; - let i = 0; - while (i < args.length) { - addCodeArg(code, args[i]); - code.push(strs[++i]); - } - return new _Code(code); -} -const plus = new _Code("+"); -function str(strs, ...args) { - const expr = [safeStringify(strs[0])]; - let i = 0; - while (i < args.length) { - expr.push(plus); - addCodeArg(expr, args[i]); - expr.push(plus, safeStringify(strs[++i])); + function consumePush(consume2, chunk) { + consume2.length += chunk.length; + consume2.body.push(chunk); } - optimize(expr); - return new _Code(expr); -} -function addCodeArg(code, arg) { - if (arg instanceof _Code) - code.push(...arg._items); - else if (arg instanceof Name) - code.push(arg); - else - code.push(interpolate(arg)); -} -function optimize(expr) { - let i = 1; - while (i < expr.length - 1) { - if (expr[i] === plus) { - const res = mergeExprItems(expr[i - 1], expr[i + 1]); - if (res !== undefined) { - expr.splice(i - 1, 3, res); - continue; + function consumeFinish(consume2, err) { + if (consume2.body === null) { + return; + } + if (err) { + consume2.reject(err); + } else { + consume2.resolve(); + } + consume2.type = null; + consume2.stream = null; + consume2.resolve = null; + consume2.reject = null; + consume2.length = 0; + consume2.body = null; + } + module3.exports = { + Readable: BodyReadable, + chunksDecode + }; + } +}); + +// node_modules/undici/lib/api/api-request.js +var require_api_request = __commonJS({ + "node_modules/undici/lib/api/api-request.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var { AsyncResource } = __require("node:async_hooks"); + var { Readable } = require_readable(); + var { InvalidArgumentError, RequestAbortedError } = require_errors(); + var util = require_util(); + function noop() { + } + var RequestHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + const { signal, method, opaque, body, onInfo, responseHeaders, 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", noop), 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.highWaterMark = highWaterMark; + this.reason = null; + this.removeAbortListener = null; + if (signal?.aborted) { + this.reason = signal.reason ?? new RequestAbortedError(); + } else if (signal) { + this.removeAbortListener = util.addAbortListener(signal, () => { + this.reason = signal.reason ?? new RequestAbortedError(); + if (this.res) { + util.destroy(this.res.on("error", noop), this.reason); + } else if (this.abort) { + this.abort(this.reason); } - expr[i++] = "+"; + }); + } + } + onConnect(abort, context2) { + if (this.reason) { + abort(this.reason); + return; + } + assert(this.callback); + this.abort = abort; + this.context = context2; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { callback, opaque, abort, context: context2, 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.removeAbortListener = null; + } + this.callback = null; + this.res = res; + if (callback !== null) { + try { + this.runInAsyncScope(callback, null, null, { + statusCode, + statusText: statusMessage, + headers, + trailers: this.trailers, + opaque, + body: res, + context: context2 + }); + } catch (err) { + this.res = null; + util.destroy(res.on("error", noop), err); + queueMicrotask(() => { + throw err; + }); + } + } + } + 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 }); + }); } - i++; + if (res) { + this.res = null; + queueMicrotask(() => { + util.destroy(res.on("error", noop), err); + }); + } + if (body) { + this.body = null; + if (util.isStream(body)) { + body.on("error", noop); + util.destroy(body, err); + } + } + if (this.removeAbortListener) { + this.removeAbortListener(); + this.removeAbortListener = null; + } + } + }; + function request(opts, callback) { + if (callback === void 0) { + return new Promise((resolve8, reject) => { + request.call(this, opts, (err, data) => { + return err ? reject(err) : resolve8(data); + }); + }); + } + try { + const handler = new RequestHandler(opts, callback); + this.dispatch(opts, handler); + } catch (err) { + if (typeof callback !== "function") { + throw err; + } + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } } -} -function mergeExprItems(a, b) { - if (b === '""') - return a; - if (a === '""') - return b; - if (typeof a == "string") { - if (b instanceof Name || a[a.length - 1] !== '"') - return; - if (typeof b != "string") - return `${a.slice(0, -1)}${b}"`; - if (b[0] === '"') - return a.slice(0, -1) + b.slice(1); + module3.exports = request; + module3.exports.RequestHandler = RequestHandler; + } +}); + +// node_modules/undici/lib/api/abort-signal.js +var require_abort_signal = __commonJS({ + "node_modules/undici/lib/api/abort-signal.js"(exports, module3) { + "use strict"; + var { addAbortListener } = require_util(); + var { RequestAbortedError } = require_errors(); + var kListener = /* @__PURE__ */ Symbol("kListener"); + var kSignal = /* @__PURE__ */ 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]); } - if (typeof b == "string" && b[0] === '"' && !(a instanceof Name)) - return `"${a}${b.slice(1)}`; - return; -} -function strConcat(c1, c2) { - return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str `${c1}${c2}`; -} -// TODO do not allow arrays here -function interpolate(x) { - return typeof x == "number" || typeof x == "boolean" || x === null - ? x - : safeStringify(Array.isArray(x) ? x.join(",") : x); -} -function stringify(x) { - return new _Code(safeStringify(x)); -} -function safeStringify(x) { - return JSON.stringify(x) - .replace(/\u2028/g, "\\u2028") - .replace(/\u2029/g, "\\u2029"); -} -function getProperty(key) { - return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`; -} -//Does best effort to format the name properly -function getEsmExportName(key) { - if (typeof key == "string" && exports.IDENTIFIER.test(key)) { - return new _Code(`${key}`); - } - throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`); -} -function regexpCode(rx) { - return new _Code(rx.toString()); -} -//# sourceMappingURL=code.js.map - -/***/ }), - -/***/ 34938: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0; -exports.not = not; -exports.and = and; -exports.or = or; -const code_1 = __nccwpck_require__(1979); -const scope_1 = __nccwpck_require__(7907); -var code_2 = __nccwpck_require__(1979); -Object.defineProperty(exports, "_", ({ enumerable: true, get: function () { return code_2._; } })); -Object.defineProperty(exports, "str", ({ enumerable: true, get: function () { return code_2.str; } })); -Object.defineProperty(exports, "strConcat", ({ enumerable: true, get: function () { return code_2.strConcat; } })); -Object.defineProperty(exports, "nil", ({ enumerable: true, get: function () { return code_2.nil; } })); -Object.defineProperty(exports, "getProperty", ({ enumerable: true, get: function () { return code_2.getProperty; } })); -Object.defineProperty(exports, "stringify", ({ enumerable: true, get: function () { return code_2.stringify; } })); -Object.defineProperty(exports, "regexpCode", ({ enumerable: true, get: function () { return code_2.regexpCode; } })); -Object.defineProperty(exports, "Name", ({ enumerable: true, get: function () { return code_2.Name; } })); -var scope_2 = __nccwpck_require__(7907); -Object.defineProperty(exports, "Scope", ({ enumerable: true, get: function () { return scope_2.Scope; } })); -Object.defineProperty(exports, "ValueScope", ({ enumerable: true, get: function () { return scope_2.ValueScope; } })); -Object.defineProperty(exports, "ValueScopeName", ({ enumerable: true, get: function () { return scope_2.ValueScopeName; } })); -Object.defineProperty(exports, "varKinds", ({ enumerable: true, get: function () { return scope_2.varKinds; } })); -exports.operators = { - GT: new code_1._Code(">"), - GTE: new code_1._Code(">="), - LT: new code_1._Code("<"), - LTE: new code_1._Code("<="), - EQ: new code_1._Code("==="), - NEQ: new code_1._Code("!=="), - NOT: new code_1._Code("!"), - OR: new code_1._Code("||"), - AND: new code_1._Code("&&"), - ADD: new code_1._Code("+"), -}; -class Node { - optimizeNodes() { - return this; - } - optimizeNames(_names, _constants) { - return this; - } -} -class Def extends Node { - constructor(varKind, name, rhs) { - super(); - this.varKind = varKind; - this.name = name; - this.rhs = rhs; - } - render({ es5, _n }) { - const varKind = es5 ? scope_1.varKinds.var : this.varKind; - const rhs = this.rhs === undefined ? "" : ` = ${this.rhs}`; - return `${varKind} ${this.name}${rhs};` + _n; - } - optimizeNames(names, constants) { - if (!names[this.name.str]) - return; - if (this.rhs) - this.rhs = optimizeExpr(this.rhs, names, constants); - return this; - } - get names() { - return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {}; + 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; } -} -class Assign extends Node { - constructor(lhs, rhs, sideEffects) { - super(); - this.lhs = lhs; - this.rhs = rhs; - this.sideEffects = sideEffects; + module3.exports = { + addSignal, + removeSignal + }; + } +}); + +// node_modules/undici/lib/api/api-stream.js +var require_api_stream = __commonJS({ + "node_modules/undici/lib/api/api-stream.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var { finished } = __require("node:stream"); + var { AsyncResource } = __require("node:async_hooks"); + var { InvalidArgumentError, InvalidReturnValueError } = require_errors(); + var util = require_util(); + var { addSignal, removeSignal } = require_abort_signal(); + function noop() { + } + var StreamHandler = class extends AsyncResource { + constructor(opts, factory, callback) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + const { signal, method, opaque, body, onInfo, responseHeaders } = 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", noop), 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; + if (util.isStream(body)) { + body.on("error", (err) => { + this.onError(err); + }); + } + addSignal(this, signal); + } + onConnect(abort, context2) { + if (this.reason) { + abort(this.reason); + return; + } + assert(this.callback); + this.abort = abort; + this.context = context2; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { factory, opaque, context: context2, 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; + if (factory === null) { + return; + } + const res = this.runInAsyncScope(factory, null, { + statusCode, + headers, + opaque, + context: context2 + }); + if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") { + throw new InvalidReturnValueError("expected Writable"); + } + finished(res, { readable: false }, (err) => { + const { callback, res: res2, opaque: opaque2, trailers, abort } = this; + this.res = null; + if (err || !res2?.readable) { + util.destroy(res2, err); + } + this.callback = null; + this.runInAsyncScope(callback, null, err || null, { opaque: opaque2, trailers }); + if (err) { + abort(); + } + }); + res.on("drain", resume); + this.res = res; + const needDrain = res.writableNeedDrain !== void 0 ? 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 === void 0) { + return new Promise((resolve8, reject) => { + stream.call(this, opts, factory, (err, data) => { + return err ? reject(err) : resolve8(data); + }); + }); + } + try { + const handler = new StreamHandler(opts, factory, callback); + this.dispatch(opts, handler); + } catch (err) { + if (typeof callback !== "function") { + throw err; + } + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } } - render({ _n }) { - return `${this.lhs} = ${this.rhs};` + _n; + module3.exports = stream; + } +}); + +// node_modules/undici/lib/api/api-pipeline.js +var require_api_pipeline = __commonJS({ + "node_modules/undici/lib/api/api-pipeline.js"(exports, module3) { + "use strict"; + var { + Readable, + Duplex, + PassThrough + } = __require("node:stream"); + var assert = __require("node:assert"); + var { AsyncResource } = __require("node:async_hooks"); + var { + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError + } = require_errors(); + var util = require_util(); + var { addSignal, removeSignal } = require_abort_signal(); + function noop() { + } + var kResume = /* @__PURE__ */ Symbol("resume"); + var PipelineRequest = class 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); + } + }; + var PipelineResponse = class 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); + } + }; + var PipelineHandler = class 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", noop); + 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, context2) { + const { res } = this; + if (this.reason) { + abort(this.reason); + return; + } + assert(!res, "pipeline cannot be retried"); + this.abort = abort; + this.context = context2; + } + onHeaders(statusCode, rawHeaders, resume) { + const { opaque, handler, context: context2 } = 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: context2 + }); + } catch (err) { + this.res.on("error", noop); + throw err; + } + if (!body || typeof body.on !== "function") { + throw new InvalidReturnValueError("expected Readable"); + } + body.on("data", (chunk) => { + const { ret, body: body2 } = this; + if (!ret.push(chunk) && body2.pause) { + body2.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); + } } - optimizeNames(names, constants) { - if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects) - return; - this.rhs = optimizeExpr(this.rhs, names, constants); - return this; + module3.exports = pipeline; + } +}); + +// node_modules/undici/lib/api/api-upgrade.js +var require_api_upgrade = __commonJS({ + "node_modules/undici/lib/api/api-upgrade.js"(exports, module3) { + "use strict"; + var { InvalidArgumentError, SocketError } = require_errors(); + var { AsyncResource } = __require("node:async_hooks"); + var assert = __require("node:assert"); + var util = require_util(); + var { kHTTP2Stream } = require_symbols(); + var { addSignal, removeSignal } = require_abort_signal(); + var UpgradeHandler = 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_UPGRADE"); + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.abort = null; + this.context = null; + addSignal(this, signal); + } + onConnect(abort, context2) { + 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(socket[kHTTP2Stream] === true ? statusCode === 200 : statusCode === 101); + const { callback, opaque, context: context2 } = 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: context2 + }); + } + 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((resolve8, reject) => { + upgrade.call(this, opts, (err, data) => { + return err ? reject(err) : resolve8(data); + }); + }); + } + try { + const upgradeHandler = new UpgradeHandler(opts, callback); + const upgradeOpts = { + ...opts, + method: opts.method || "GET", + upgrade: opts.protocol || "Websocket" + }; + this.dispatch(upgradeOpts, upgradeHandler); + } catch (err) { + if (typeof callback !== "function") { + throw err; + } + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } } - get names() { - const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names }; - return addExprNames(names, this.rhs); + module3.exports = upgrade; + } +}); + +// node_modules/undici/lib/api/api-connect.js +var require_api_connect = __commonJS({ + "node_modules/undici/lib/api/api-connect.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var { AsyncResource } = __require("node:async_hooks"); + var { InvalidArgumentError, SocketError } = require_errors(); + var util = require_util(); + var { 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, context2) { + if (this.reason) { + abort(this.reason); + return; + } + assert(this.callback); + this.abort = abort; + this.context = context2; + } + onHeaders() { + throw new SocketError("bad connect", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + const { callback, opaque, context: context2 } = 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: context2 + }); + } + 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((resolve8, reject) => { + connect.call(this, opts, (err, data) => { + return err ? reject(err) : resolve8(data); + }); + }); + } + try { + const connectHandler = new ConnectHandler(opts, callback); + const connectOptions = { ...opts, method: "CONNECT" }; + this.dispatch(connectOptions, connectHandler); + } catch (err) { + if (typeof callback !== "function") { + throw err; + } + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } } -} -class AssignOp extends Assign { - constructor(lhs, op, rhs, sideEffects) { - super(lhs, rhs, sideEffects); - this.op = op; + module3.exports = connect; + } +}); + +// node_modules/undici/lib/api/index.js +var require_api = __commonJS({ + "node_modules/undici/lib/api/index.js"(exports, module3) { + "use strict"; + module3.exports.request = require_api_request(); + module3.exports.stream = require_api_stream(); + module3.exports.pipeline = require_api_pipeline(); + module3.exports.upgrade = require_api_upgrade(); + module3.exports.connect = require_api_connect(); + } +}); + +// node_modules/undici/lib/mock/mock-errors.js +var require_mock_errors = __commonJS({ + "node_modules/undici/lib/mock/mock-errors.js"(exports, module3) { + "use strict"; + var { UndiciError } = require_errors(); + var kMockNotMatchedError = /* @__PURE__ */ Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED"); + var MockNotMatchedError = class extends UndiciError { + constructor(message) { + super(message); + 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; + } + get [kMockNotMatchedError]() { + return true; + } + }; + module3.exports = { + MockNotMatchedError + }; + } +}); + +// node_modules/undici/lib/mock/mock-symbols.js +var require_mock_symbols = __commonJS({ + "node_modules/undici/lib/mock/mock-symbols.js"(exports, module3) { + "use strict"; + module3.exports = { + kAgent: /* @__PURE__ */ Symbol("agent"), + kOptions: /* @__PURE__ */ Symbol("options"), + kFactory: /* @__PURE__ */ Symbol("factory"), + kDispatches: /* @__PURE__ */ Symbol("dispatches"), + kDispatchKey: /* @__PURE__ */ Symbol("dispatch key"), + kDefaultHeaders: /* @__PURE__ */ Symbol("default headers"), + kDefaultTrailers: /* @__PURE__ */ Symbol("default trailers"), + kContentLength: /* @__PURE__ */ Symbol("content length"), + kMockAgent: /* @__PURE__ */ Symbol("mock agent"), + kMockAgentSet: /* @__PURE__ */ Symbol("mock agent set"), + kMockAgentGet: /* @__PURE__ */ Symbol("mock agent get"), + kMockDispatch: /* @__PURE__ */ Symbol("mock dispatch"), + kClose: /* @__PURE__ */ Symbol("close"), + kOriginalClose: /* @__PURE__ */ Symbol("original agent close"), + kOriginalDispatch: /* @__PURE__ */ Symbol("original dispatch"), + kOrigin: /* @__PURE__ */ Symbol("origin"), + kIsMockActive: /* @__PURE__ */ Symbol("is mock active"), + kNetConnect: /* @__PURE__ */ Symbol("net connect"), + kGetNetConnect: /* @__PURE__ */ Symbol("get net connect"), + kConnected: /* @__PURE__ */ Symbol("connected"), + kIgnoreTrailingSlash: /* @__PURE__ */ Symbol("ignore trailing slash"), + kMockAgentMockCallHistoryInstance: /* @__PURE__ */ Symbol("mock agent mock call history name"), + kMockAgentRegisterCallHistory: /* @__PURE__ */ Symbol("mock agent register mock call history"), + kMockAgentAddCallHistoryLog: /* @__PURE__ */ Symbol("mock agent add call history log"), + kMockAgentIsCallHistoryEnabled: /* @__PURE__ */ Symbol("mock agent is call history enabled"), + kMockAgentAcceptsNonStandardSearchParameters: /* @__PURE__ */ Symbol("mock agent accepts non standard search parameters"), + kMockCallHistoryAddLog: /* @__PURE__ */ Symbol("mock call history add log"), + kTotalDispatchCount: /* @__PURE__ */ Symbol("total dispatch count") + }; + } +}); + +// node_modules/undici/lib/mock/mock-utils.js +var require_mock_utils = __commonJS({ + "node_modules/undici/lib/mock/mock-utils.js"(exports, module3) { + "use strict"; + var { MockNotMatchedError } = require_mock_errors(); + var { + kDispatches, + kMockAgent, + kOriginalDispatch, + kOrigin, + kGetNetConnect, + kTotalDispatchCount + } = require_mock_symbols(); + var { serializePathWithQuery } = require_util(); + var { STATUS_CODES } = __require("node:http"); + var { + types: { + isPromise + } + } = __require("node:util"); + var { InvalidArgumentError } = require_errors(); + function matchValue(match2, value) { + if (typeof match2 === "string") { + return match2 === value; + } + if (match2 instanceof RegExp) { + return match2.test(value); + } + if (typeof match2 === "function") { + return match2(value) === true; + } + return false; } - render({ _n }) { - return `${this.lhs} ${this.op}= ${this.rhs};` + _n; + function lowerCaseEntries(headers) { + return Object.fromEntries( + Object.entries(headers).map(([headerName, headerValue]) => { + return [headerName.toLocaleLowerCase(), headerValue]; + }) + ); } -} -class Label extends Node { - constructor(label) { - super(); - this.label = label; - this.names = {}; + function getHeaderByName(headers, key) { + if (Array.isArray(headers)) { + for (let i2 = 0; i2 < headers.length; i2 += 2) { + if (headers[i2].toLocaleLowerCase() === key.toLocaleLowerCase()) { + return headers[i2 + 1]; + } + } + return void 0; + } else if (typeof headers.get === "function") { + return headers.get(key); + } else { + return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; + } } - render({ _n }) { - return `${this.label}:` + _n; + 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); } -} -class Break extends Node { - constructor(label) { - super(); - this.label = label; - this.names = {}; + function matchHeaders(mockDispatch2, headers) { + if (typeof mockDispatch2.headers === "function") { + if (Array.isArray(headers)) { + headers = buildHeadersFromArray(headers); + } + return mockDispatch2.headers(headers ? lowerCaseEntries(headers) : {}); + } + if (typeof mockDispatch2.headers === "undefined") { + return true; + } + if (typeof headers !== "object" || typeof mockDispatch2.headers !== "object") { + return false; + } + for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch2.headers)) { + const headerValue = getHeaderByName(headers, matchHeaderName); + if (!matchValue(matchHeaderValue, headerValue)) { + return false; + } + } + return true; } - render({ _n }) { - const label = this.label ? ` ${this.label}` : ""; - return `break${label};` + _n; + function normalizeSearchParams(query) { + if (typeof query !== "string") { + return query; + } + const originalQp = new URLSearchParams(query); + const normalizedQp = new URLSearchParams(); + for (let [key, value] of originalQp.entries()) { + key = key.replace("[]", ""); + const valueRepresentsString = /^(['"]).*\1$/.test(value); + if (valueRepresentsString) { + normalizedQp.append(key, value); + continue; + } + if (value.includes(",")) { + const values = value.split(","); + for (const v3 of values) { + normalizedQp.append(key, v3); + } + continue; + } + normalizedQp.append(key, value); + } + return normalizedQp; + } + function safeUrl(path13) { + if (typeof path13 !== "string") { + return path13; + } + const pathSegments = path13.split("?", 3); + if (pathSegments.length !== 2) { + return path13; + } + const qp = new URLSearchParams(pathSegments.pop()); + qp.sort(); + return [...pathSegments, qp.toString()].join("?"); + } + function matchKey(mockDispatch2, { path: path13, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path13); + const methodMatch = matchValue(mockDispatch2.method, method); + const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; + const headersMatch = matchHeaders(mockDispatch2, 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 if (data) { + return data.toString(); + } else { + return ""; + } } -} -class Throw extends Node { - constructor(error) { - super(); - this.error = error; + function getMockDispatch(mockDispatches, key) { + const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path; + const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; + const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path13, ignoreTrailingSlash }) => { + return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(path13)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path13), 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((mockDispatch2) => matchHeaders(mockDispatch2, 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, opts) { + const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false, ...opts }; + const replyData = typeof data === "function" ? { callback: data } : { ...data }; + const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } }; + mockDispatches.push(newMockDispatch); + mockDispatches[kTotalDispatchCount] = (mockDispatches[kTotalDispatchCount] || 0) + 1; + 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); + } } - render({ _n }) { - return `throw ${this.error};` + _n; + function removeTrailingSlash(path13) { + while (path13.endsWith("/")) { + path13 = path13.slice(0, -1); + } + if (path13.length === 0) { + path13 = "/"; + } + return path13; } - get names() { - return this.error.names; + function buildKey(opts) { + const { path: path13, method, body, headers, query } = opts; + return { + path: path13, + method, + body, + headers, + query + }; + } + function generateKeyValues(data) { + const keys = Object.keys(data); + const result = []; + for (let i2 = 0; i2 < keys.length; ++i2) { + const key = keys[i2]; + const value = data[key]; + const name = Buffer.from(`${key}`); + if (Array.isArray(value)) { + for (let j3 = 0; j3 < value.length; ++j3) { + result.push(name, Buffer.from(`${value[j3]}`)); + } + } else { + result.push(name, Buffer.from(`${value}`)); + } + } + return result; } -} -class AnyCode extends Node { - constructor(code) { - super(); - this.code = code; - } - render({ _n }) { - return `${this.code};` + _n; - } - optimizeNodes() { - return `${this.code}` ? this : undefined; - } - optimizeNames(names, constants) { - this.code = optimizeExpr(this.code, names, constants); - return this; - } - get names() { - return this.code instanceof code_1._CodeOrName ? this.code.names : {}; - } -} -class ParentNode extends Node { - constructor(nodes = []) { - super(); - this.nodes = nodes; - } - render(opts) { - return this.nodes.reduce((code, n) => code + n.render(opts), ""); - } - optimizeNodes() { - const { nodes } = this; - let i = nodes.length; - while (i--) { - const n = nodes[i].optimizeNodes(); - if (Array.isArray(n)) - nodes.splice(i, 1, ...n); - else if (n) - nodes[i] = n; - else - nodes.splice(i, 1); + 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"); + } + function mockDispatch(opts, handler) { + const key = buildKey(opts); + const mockDispatch2 = getMockDispatch(this[kDispatches], key); + mockDispatch2.timesInvoked++; + if (mockDispatch2.data.callback) { + mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; + } + const { data: { statusCode, data, headers, trailers, error: error2 }, delay, persist } = mockDispatch2; + const { timesInvoked, times } = mockDispatch2; + mockDispatch2.consumed = !persist && timesInvoked >= times; + mockDispatch2.pending = timesInvoked < times; + if (error2 !== null) { + deleteMockDispatch(this[kDispatches], key); + handler.onError(error2); + return true; + } + let aborted = false; + let timer = null; + function abort(err) { + if (aborted) { + return; } - return nodes.length > 0 ? this : undefined; - } - optimizeNames(names, constants) { - const { nodes } = this; - let i = nodes.length; - while (i--) { - // iterating backwards improves 1-pass optimization - const n = nodes[i]; - if (n.optimizeNames(names, constants)) - continue; - subtractNames(names, n.names); - nodes.splice(i, 1); + aborted = true; + if (timer !== null) { + clearTimeout(timer); + timer = null; } - return nodes.length > 0 ? this : undefined; - } - get names() { - return this.nodes.reduce((names, n) => addNames(names, n.names), {}); - } -} -class BlockNode extends ParentNode { - render(opts) { - return "{" + opts._n + super.render(opts) + "}" + opts._n; - } -} -class Root extends ParentNode { -} -class Else extends BlockNode { -} -Else.kind = "else"; -class If extends BlockNode { - constructor(condition, nodes) { - super(nodes); - this.condition = condition; - } - render(opts) { - let code = `if(${this.condition})` + super.render(opts); - if (this.else) - code += "else " + this.else.render(opts); - return code; - } - optimizeNodes() { - super.optimizeNodes(); - const cond = this.condition; - if (cond === true) - return this.nodes; // else is ignored here - let e = this.else; - if (e) { - const ns = e.optimizeNodes(); - e = this.else = Array.isArray(ns) ? new Else(ns) : ns; - } - if (e) { - if (cond === false) - return e instanceof If ? e : e.nodes; - if (this.nodes.length) - return this; - return new If(not(cond), e instanceof If ? [e] : e.nodes); + handler.onError(err); + } + handler.onConnect?.(abort, null); + if (typeof delay === "number" && delay > 0) { + timer = setTimeout(() => { + timer = null; + handleReply(this[kDispatches]); + }, delay); + } else { + handleReply(this[kDispatches]); + } + function handleReply(mockDispatches, _data = data) { + if (aborted) { + return; } - if (cond === false || !this.nodes.length) - return undefined; - return this; - } - optimizeNames(names, constants) { - var _a; - this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants); - if (!(super.optimizeNames(names, constants) || this.else)) - return; - this.condition = optimizeExpr(this.condition, names, constants); - return this; - } - get names() { - const names = super.names; - addExprNames(names, this.condition); - if (this.else) - addNames(names, this.else.names); - return names; - } -} -If.kind = "if"; -class For extends BlockNode { -} -For.kind = "for"; -class ForLoop extends For { - constructor(iteration) { - super(); - this.iteration = iteration; - } - render(opts) { - return `for(${this.iteration})` + super.render(opts); - } - optimizeNames(names, constants) { - if (!super.optimizeNames(names, constants)) - return; - this.iteration = optimizeExpr(this.iteration, names, constants); - return this; - } - get names() { - return addNames(super.names, this.iteration.names); - } -} -class ForRange extends For { - constructor(varKind, name, from, to) { - super(); - this.varKind = varKind; - this.name = name; - this.from = from; - this.to = to; - } - render(opts) { - const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind; - const { name, from, to } = this; - return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts); - } - get names() { - const names = addExprNames(super.names, this.from); - return addExprNames(names, this.to); - } -} -class ForIter extends For { - constructor(loop, varKind, name, iterable) { - super(); - this.loop = loop; - this.varKind = varKind; - this.name = name; - this.iterable = iterable; - } - render(opts) { - return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts); - } - optimizeNames(names, constants) { - if (!super.optimizeNames(names, constants)) - return; - this.iterable = optimizeExpr(this.iterable, names, constants); - return this; - } - get names() { - return addNames(super.names, this.iterable.names); - } -} -class Func extends BlockNode { - constructor(name, args, async) { - super(); - this.name = name; - this.args = args; - this.async = async; - } - render(opts) { - const _async = this.async ? "async " : ""; - return `${_async}function ${this.name}(${this.args})` + super.render(opts); + const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; + const body = typeof _data === "function" ? _data({ ...opts, headers: optsHeaders }) : _data; + if (isPromise(body)) { + return body.then((newData) => handleReply(mockDispatches, newData)); + } + if (aborted) { + return; + } + const responseData = getResponseData(body); + const responseHeaders = generateKeyValues(headers); + const responseTrailers = generateKeyValues(trailers); + handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode)); + handler.onData?.(Buffer.from(responseData)); + handler.onComplete?.(responseTrailers); + deleteMockDispatch(mockDispatches, key); + } + function resume() { + } + return true; } -} -Func.kind = "func"; -class Return extends ParentNode { - render(opts) { - return "return " + super.render(opts); + 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 (error2) { + if (error2.code === "UND_MOCK_ERR_MOCK_NOT_MATCHED") { + const netConnect = agent[kGetNetConnect](); + const totalInterceptsCount = this[kDispatches][kTotalDispatchCount] || this[kDispatches].length; + const pendingInterceptsCount = this[kDispatches].filter(({ consumed }) => !consumed).length; + const interceptsMessage = `, ${pendingInterceptsCount} interceptor(s) remaining out of ${totalInterceptsCount} defined`; + if (netConnect === false) { + throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)${interceptsMessage}`); + } + if (checkNetConnect(netConnect, origin)) { + originalDispatch.call(this, opts, handler); + } else { + throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)${interceptsMessage}`); + } + } else { + throw error2; + } + } + } else { + originalDispatch.call(this, opts, handler); + } + }; } -} -Return.kind = "return"; -class Try extends BlockNode { - render(opts) { - let code = "try" + super.render(opts); - if (this.catch) - code += this.catch.render(opts); - if (this.finally) - code += this.finally.render(opts); - return code; + function checkNetConnect(netConnect, origin) { + const url3 = new URL(origin); + if (netConnect === true) { + return true; + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url3.host))) { + return true; + } + return false; } - optimizeNodes() { - var _a, _b; - super.optimizeNodes(); - (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes(); - (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes(); + function normalizeOrigin(origin) { + if (typeof origin !== "string" && !(origin instanceof URL)) { + return origin; + } + if (origin instanceof URL) { + return origin.origin; + } + return origin.toLowerCase(); + } + function buildAndValidateMockOptions(opts) { + const { agent, ...mockOptions } = opts; + if ("enableCallHistory" in mockOptions && typeof mockOptions.enableCallHistory !== "boolean") { + throw new InvalidArgumentError("options.enableCallHistory must to be a boolean"); + } + if ("acceptNonStandardSearchParameters" in mockOptions && typeof mockOptions.acceptNonStandardSearchParameters !== "boolean") { + throw new InvalidArgumentError("options.acceptNonStandardSearchParameters must to be a boolean"); + } + if ("ignoreTrailingSlash" in mockOptions && typeof mockOptions.ignoreTrailingSlash !== "boolean") { + throw new InvalidArgumentError("options.ignoreTrailingSlash must to be a boolean"); + } + return mockOptions; + } + module3.exports = { + getResponseData, + getMockDispatch, + addMockDispatch, + deleteMockDispatch, + buildKey, + generateKeyValues, + matchValue, + getResponse, + getStatusText, + mockDispatch, + buildMockDispatch, + checkNetConnect, + buildAndValidateMockOptions, + getHeaderByName, + buildHeadersFromArray, + normalizeSearchParams, + normalizeOrigin + }; + } +}); + +// node_modules/undici/lib/mock/mock-interceptor.js +var require_mock_interceptor = __commonJS({ + "node_modules/undici/lib/mock/mock-interceptor.js"(exports, module3) { + "use strict"; + var { getResponseData, buildKey, addMockDispatch } = require_mock_utils(); + var { + kDispatches, + kDispatchKey, + kDefaultHeaders, + kDefaultTrailers, + kContentLength, + kMockDispatch, + kIgnoreTrailingSlash + } = require_mock_symbols(); + var { InvalidArgumentError } = require_errors(); + var { serializePathWithQuery } = require_util(); + 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; - } - optimizeNames(names, constants) { - var _a, _b; - super.optimizeNames(names, constants); - (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants); - (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants); + } + /** + * For a defined reply, never mark as consumed. + */ + persist() { + this[kMockDispatch].persist = true; return this; - } - get names() { - const names = super.names; - if (this.catch) - addNames(names, this.catch.names); - if (this.finally) - addNames(names, this.finally.names); - return names; - } -} -class Catch extends BlockNode { - constructor(error) { - super(); - this.error = error; - } - render(opts) { - return `catch(${this.error})` + super.render(opts); - } -} -Catch.kind = "catch"; -class Finally extends BlockNode { - render(opts) { - return "finally" + super.render(opts); - } -} -Finally.kind = "finally"; -class CodeGen { - constructor(extScope, opts = {}) { - this._values = {}; - this._blockStarts = []; - this._constants = {}; - this.opts = { ...opts, _n: opts.lines ? "\n" : "" }; - this._extScope = extScope; - this._scope = new scope_1.Scope({ parent: extScope }); - this._nodes = [new Root()]; - } - toString() { - return this._root.render(this.opts); - } - // returns unique name in the internal scope - name(prefix) { - return this._scope.name(prefix); - } - // reserves unique name in the external scope - scopeName(prefix) { - return this._extScope.name(prefix); - } - // reserves unique name in the external scope and assigns value to it - scopeValue(prefixOrName, value) { - const name = this._extScope.value(prefixOrName, value); - const vs = this._values[name.prefix] || (this._values[name.prefix] = new Set()); - vs.add(name); - return name; - } - getScopeValue(prefix, keyOrRef) { - return this._extScope.getValue(prefix, keyOrRef); - } - // return code that assigns values in the external scope to the names that are used internally - // (same names that were returned by gen.scopeName or gen.scopeValue) - scopeRefs(scopeName) { - return this._extScope.scopeRefs(scopeName, this._values); - } - scopeCode() { - return this._extScope.scopeCode(this._values); - } - _def(varKind, nameOrPrefix, rhs, constant) { - const name = this._scope.toName(nameOrPrefix); - if (rhs !== undefined && constant) - this._constants[name.str] = rhs; - this._leafNode(new Def(varKind, name, rhs)); - return name; - } - // `const` declaration (`var` in es5 mode) - const(nameOrPrefix, rhs, _constant) { - return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant); - } - // `let` declaration with optional assignment (`var` in es5 mode) - let(nameOrPrefix, rhs, _constant) { - return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant); - } - // `var` declaration with optional assignment - var(nameOrPrefix, rhs, _constant) { - return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant); - } - // assignment code - assign(lhs, rhs, sideEffects) { - return this._leafNode(new Assign(lhs, rhs, sideEffects)); - } - // `+=` code - add(lhs, rhs) { - return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs)); - } - // appends passed SafeExpr to code or executes Block - code(c) { - if (typeof c == "function") - c(); - else if (c !== code_1.nil) - this._leafNode(new AnyCode(c)); + } + /** + * 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; - } - // returns code for object literal for the passed argument list of key-value pairs - object(...keyValues) { - const code = ["{"]; - for (const [key, value] of keyValues) { - if (code.length > 1) - code.push(","); - code.push(key); - if (key !== value || this.opts.es5) { - code.push(":"); - (0, code_1.addCodeArg)(code, value); - } + } + }; + var MockInterceptor = class { + constructor(opts, mockDispatches) { + if (typeof opts !== "object") { + throw new InvalidArgumentError("opts must be an object"); } - code.push("}"); - return new code_1._Code(code); - } - // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed) - if(condition, thenBody, elseBody) { - this._blockNode(new If(condition)); - if (thenBody && elseBody) { - this.code(thenBody).else().code(elseBody).endIf(); + if (typeof opts.path === "undefined") { + throw new InvalidArgumentError("opts.path must be defined"); } - else if (thenBody) { - this.code(thenBody).endIf(); + if (typeof opts.method === "undefined") { + opts.method = "GET"; } - else if (elseBody) { - throw new Error('CodeGen: "else" body without "then" body'); + if (typeof opts.path === "string") { + if (opts.query) { + opts.path = serializePathWithQuery(opts.path, opts.query); + } else { + const parsedURL = new URL(opts.path, "data://"); + opts.path = parsedURL.pathname + parsedURL.search; + } } - return this; - } - // `else if` clause - invalid without `if` or after `else` clauses - elseIf(condition) { - return this._elseNode(new If(condition)); - } - // `else` clause - only valid after `if` or `else if` clauses - else() { - return this._elseNode(new Else()); - } - // end `if` statement (needed if gen.if was used only with condition) - endIf() { - return this._endBlockNode(If, Else); - } - _for(node, forBody) { - this._blockNode(node); - if (forBody) - this.code(forBody).endFor(); - return this; - } - // a generic `for` clause (or statement if `forBody` is passed) - for(iteration, forBody) { - return this._for(new ForLoop(iteration), forBody); - } - // `for` statement for a range of values - forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) { - const name = this._scope.toName(nameOrPrefix); - return this._for(new ForRange(varKind, name, from, to), () => forBody(name)); - } - // `for-of` statement (in es5 mode replace with a normal for loop) - forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) { - const name = this._scope.toName(nameOrPrefix); - if (this.opts.es5) { - const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable); - return this.forRange("_i", 0, (0, code_1._) `${arr}.length`, (i) => { - this.var(name, (0, code_1._) `${arr}[${i}]`); - forBody(name); - }); + if (typeof opts.method === "string") { + opts.method = opts.method.toUpperCase(); } - return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name)); - } - // `for-in` statement. - // With option `ownProperties` replaced with a `for-of` loop for object keys - forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) { - if (this.opts.ownProperties) { - return this.forOf(nameOrPrefix, (0, code_1._) `Object.keys(${obj})`, forBody); + this[kDispatchKey] = buildKey(opts); + this[kDispatches] = mockDispatches; + this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false; + 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"); } - const name = this._scope.toName(nameOrPrefix); - return this._for(new ForIter("in", varKind, name, obj), () => forBody(name)); - } - // end `for` loop - endFor() { - return this._endBlockNode(For); - } - // `label` statement - label(label) { - return this._leafNode(new Label(label)); - } - // `break` statement - break(label) { - return this._leafNode(new Break(label)); - } - // `return` statement - return(value) { - const node = new Return(); - this._blockNode(node); - this.code(value); - if (node.nodes.length !== 1) - throw new Error('CodeGen: "return" should have one node'); - return this._endBlockNode(Return); - } - // `try` statement - try(tryBody, catchCode, finallyCode) { - if (!catchCode && !finallyCode) - throw new Error('CodeGen: "try" without "catch" and "finally"'); - const node = new Try(); - this._blockNode(node); - this.code(tryBody); - if (catchCode) { - const error = this.name("e"); - this._currNode = node.catch = new Catch(error); - catchCode(error); + if (typeof replyParameters.responseOptions !== "object" || replyParameters.responseOptions === null) { + throw new InvalidArgumentError("responseOptions must be an object"); } - if (finallyCode) { - this._currNode = node.finally = new Finally(); - this.code(finallyCode); + } + /** + * 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 replyParameters2 = { data: "", responseOptions: {}, ...resolvedData }; + this.validateReplyParameters(replyParameters2); + return { + ...this.createMockScopeDispatchData(replyParameters2) + }; + }; + const newMockDispatch2 = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }); + return new MockScope(newMockDispatch2); } - return this._endBlockNode(Catch, Finally); - } - // `throw` statement - throw(error) { - return this._leafNode(new Throw(error)); - } - // start self-balancing block - block(body, nodeCount) { - this._blockStarts.push(this._nodes.length); - if (body) - this.code(body).endBlock(nodeCount); - return this; - } - // end the current self-balancing block - endBlock(nodeCount) { - const len = this._blockStarts.pop(); - if (len === undefined) - throw new Error("CodeGen: not in self-balancing block"); - const toClose = this._nodes.length - len; - if (toClose < 0 || (nodeCount !== undefined && toClose !== nodeCount)) { - throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`); + 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); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }); + return new MockScope(newMockDispatch); + } + /** + * Mock an undici request with a defined error. + */ + replyWithError(error2) { + if (typeof error2 === "undefined") { + throw new InvalidArgumentError("error must be defined"); } - this._nodes.length = len; - return this; - } - // `function` heading (or definition if funcBody is passed) - func(name, args = code_1.nil, async, funcBody) { - this._blockNode(new Func(name, args, async)); - if (funcBody) - this.code(funcBody).endFunc(); - return this; - } - // end function definition - endFunc() { - return this._endBlockNode(Func); - } - optimize(n = 1) { - while (n-- > 0) { - this._root.optimizeNodes(); - this._root.optimizeNames(this._root.names, this._constants); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error2 }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }); + 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"); } - } - _leafNode(node) { - this._currNode.nodes.push(node); + this[kDefaultHeaders] = headers; return this; - } - _blockNode(node) { - this._currNode.nodes.push(node); - this._nodes.push(node); - } - _endBlockNode(N1, N2) { - const n = this._currNode; - if (n instanceof N1 || (N2 && n instanceof N2)) { - this._nodes.pop(); - return this; - } - throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`); - } - _elseNode(node) { - const n = this._currNode; - if (!(n instanceof If)) { - throw new Error('CodeGen: "else" without "if"'); + } + /** + * Set default reply trailers on the interceptor for subsequent replies + */ + defaultReplyTrailers(trailers) { + if (typeof trailers === "undefined") { + throw new InvalidArgumentError("trailers must be defined"); } - this._currNode = n.else = node; + this[kDefaultTrailers] = trailers; return this; - } - get _root() { - return this._nodes[0]; - } - get _currNode() { - const ns = this._nodes; - return ns[ns.length - 1]; - } - set _currNode(node) { - const ns = this._nodes; - ns[ns.length - 1] = node; - } -} -exports.CodeGen = CodeGen; -function addNames(names, from) { - for (const n in from) - names[n] = (names[n] || 0) + (from[n] || 0); - return names; -} -function addExprNames(names, from) { - return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names; -} -function optimizeExpr(expr, names, constants) { - if (expr instanceof code_1.Name) - return replaceName(expr); - if (!canOptimize(expr)) - return expr; - return new code_1._Code(expr._items.reduce((items, c) => { - if (c instanceof code_1.Name) - c = replaceName(c); - if (c instanceof code_1._Code) - items.push(...c._items); - else - items.push(c); - return items; - }, [])); - function replaceName(n) { - const c = constants[n.str]; - if (c === undefined || names[n.str] !== 1) - return n; - delete names[n.str]; - return c; - } - function canOptimize(e) { - return (e instanceof code_1._Code && - e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== undefined)); - } -} -function subtractNames(names, from) { - for (const n in from) - names[n] = (names[n] || 0) - (from[n] || 0); -} -function not(x) { - return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._) `!${par(x)}`; -} -const andCode = mappend(exports.operators.AND); -// boolean AND (&&) expression with the passed arguments -function and(...args) { - return args.reduce(andCode); -} -const orCode = mappend(exports.operators.OR); -// boolean OR (||) expression with the passed arguments -function or(...args) { - return args.reduce(orCode); -} -function mappend(op) { - return (x, y) => (x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._) `${par(x)} ${op} ${par(y)}`); -} -function par(x) { - return x instanceof code_1.Name ? x : (0, code_1._) `(${x})`; -} -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 7907: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + } + /** + * Set reply content length header for replies on the interceptor + */ + replyContentLength() { + this[kContentLength] = true; + return this; + } + }; + module3.exports.MockInterceptor = MockInterceptor; + module3.exports.MockScope = MockScope; + } +}); -"use strict"; +// node_modules/undici/lib/mock/mock-client.js +var require_mock_client = __commonJS({ + "node_modules/undici/lib/mock/mock-client.js"(exports, module3) { + "use strict"; + var { promisify } = __require("node:util"); + var Client = require_client(); + var { buildMockDispatch } = require_mock_utils(); + var { + kDispatches, + kMockAgent, + kClose, + kOriginalClose, + kOrigin, + kOriginalDispatch, + kConnected, + kIgnoreTrailingSlash + } = require_mock_symbols(); + var { MockInterceptor } = require_mock_interceptor(); + var Symbols = require_symbols(); + var { InvalidArgumentError } = require_errors(); + var MockClient = class extends Client { + constructor(origin, opts) { + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { + throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + } + super(origin, opts); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false; + 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 && { ignoreTrailingSlash: this[kIgnoreTrailingSlash], ...opts }, + this[kDispatches] + ); + } + cleanMocks() { + this[kDispatches] = []; + } + async [kClose]() { + await promisify(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module3.exports = MockClient; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0; -const code_1 = __nccwpck_require__(1979); -class ValueError extends Error { - constructor(name) { - super(`CodeGen: "code" for ${name} not defined`); - this.value = name.value; - } -} -var UsedValueState; -(function (UsedValueState) { - UsedValueState[UsedValueState["Started"] = 0] = "Started"; - UsedValueState[UsedValueState["Completed"] = 1] = "Completed"; -})(UsedValueState || (exports.UsedValueState = UsedValueState = {})); -exports.varKinds = { - const: new code_1.Name("const"), - let: new code_1.Name("let"), - var: new code_1.Name("var"), -}; -class Scope { - constructor({ prefixes, parent } = {}) { - this._names = {}; - this._prefixes = prefixes; - this._parent = parent; - } - toName(nameOrPrefix) { - return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix); - } - name(prefix) { - return new code_1.Name(this._newName(prefix)); - } - _newName(prefix) { - const ng = this._names[prefix] || this._nameGroup(prefix); - return `${prefix}${ng.index++}`; +// node_modules/undici/lib/mock/mock-call-history.js +var require_mock_call_history = __commonJS({ + "node_modules/undici/lib/mock/mock-call-history.js"(exports, module3) { + "use strict"; + var { kMockCallHistoryAddLog } = require_mock_symbols(); + var { InvalidArgumentError } = require_errors(); + function handleFilterCallsWithOptions(criteria, options2, handler, store) { + switch (options2.operator) { + case "OR": + store.push(...handler(criteria)); + return store; + case "AND": + return handler.call({ logs: store }, criteria); + default: + throw new InvalidArgumentError("options.operator must to be a case insensitive string equal to 'OR' or 'AND'"); + } } - _nameGroup(prefix) { - var _a, _b; - if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || (this._prefixes && !this._prefixes.has(prefix))) { - throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`); + function buildAndValidateFilterCallsOptions(options2 = {}) { + const finalOptions = {}; + if ("operator" in options2) { + if (typeof options2.operator !== "string" || options2.operator.toUpperCase() !== "OR" && options2.operator.toUpperCase() !== "AND") { + throw new InvalidArgumentError("options.operator must to be a case insensitive string equal to 'OR' or 'AND'"); } - return (this._names[prefix] = { prefix, index: 0 }); - } -} -exports.Scope = Scope; -class ValueScopeName extends code_1.Name { - constructor(prefix, nameStr) { - super(nameStr); - this.prefix = prefix; - } - setValue(value, { property, itemIndex }) { - this.value = value; - this.scopePath = (0, code_1._) `.${new code_1.Name(property)}[${itemIndex}]`; - } -} -exports.ValueScopeName = ValueScopeName; -const line = (0, code_1._) `\n`; -class ValueScope extends Scope { - constructor(opts) { - super(opts); - this._values = {}; - this._scope = opts.scope; - this.opts = { ...opts, _n: opts.lines ? line : code_1.nil }; - } - get() { - return this._scope; - } - name(prefix) { - return new ValueScopeName(prefix, this._newName(prefix)); + return { + ...finalOptions, + operator: options2.operator.toUpperCase() + }; + } + return finalOptions; } - value(nameOrPrefix, value) { - var _a; - if (value.ref === undefined) - throw new Error("CodeGen: ref must be passed in value"); - const name = this.toName(nameOrPrefix); - const { prefix } = name; - const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref; - let vs = this._values[prefix]; - if (vs) { - const _name = vs.get(valueKey); - if (_name) - return _name; + function makeFilterCalls(parameterName) { + return (parameterValue) => { + if (typeof parameterValue === "string" || parameterValue == null) { + return this.logs.filter((log) => { + return log[parameterName] === parameterValue; + }); } - else { - vs = this._values[prefix] = new Map(); + if (parameterValue instanceof RegExp) { + return this.logs.filter((log) => { + return parameterValue.test(log[parameterName]); + }); } - vs.set(valueKey, name); - const s = this._scope[prefix] || (this._scope[prefix] = []); - const itemIndex = s.length; - s[itemIndex] = value.ref; - name.setValue(value, { property: prefix, itemIndex }); - return name; - } - getValue(prefix, keyOrRef) { - const vs = this._values[prefix]; - if (!vs) - return; - return vs.get(keyOrRef); + throw new InvalidArgumentError(`${parameterName} parameter should be one of string, regexp, undefined or null`); + }; } - scopeRefs(scopeName, values = this._values) { - return this._reduceValues(values, (name) => { - if (name.scopePath === undefined) - throw new Error(`CodeGen: name "${name}" has no value`); - return (0, code_1._) `${scopeName}${name.scopePath}`; + function computeUrlWithMaybeSearchParameters(requestInit) { + try { + const url3 = new URL(requestInit.path, requestInit.origin); + if (url3.search.length !== 0) { + return url3; + } + url3.search = new URLSearchParams(requestInit.query).toString(); + return url3; + } catch (error2) { + throw new InvalidArgumentError("An error occurred when computing MockCallHistoryLog.url", { cause: error2 }); + } + } + var MockCallHistoryLog = class { + constructor(requestInit = {}) { + this.body = requestInit.body; + this.headers = requestInit.headers; + this.method = requestInit.method; + const url3 = computeUrlWithMaybeSearchParameters(requestInit); + this.fullUrl = url3.toString(); + this.origin = url3.origin; + this.path = url3.pathname; + this.searchParams = Object.fromEntries(url3.searchParams); + this.protocol = url3.protocol; + this.host = url3.host; + this.port = url3.port; + this.hash = url3.hash; + } + toMap() { + return /* @__PURE__ */ new Map( + [ + ["protocol", this.protocol], + ["host", this.host], + ["port", this.port], + ["origin", this.origin], + ["path", this.path], + ["hash", this.hash], + ["searchParams", this.searchParams], + ["fullUrl", this.fullUrl], + ["method", this.method], + ["body", this.body], + ["headers", this.headers] + ] + ); + } + toString() { + const options2 = { betweenKeyValueSeparator: "->", betweenPairSeparator: "|" }; + let result = ""; + this.toMap().forEach((value, key) => { + if (typeof value === "string" || value === void 0 || value === null) { + result = `${result}${key}${options2.betweenKeyValueSeparator}${value}${options2.betweenPairSeparator}`; + } + if (typeof value === "object" && value !== null || Array.isArray(value)) { + result = `${result}${key}${options2.betweenKeyValueSeparator}${JSON.stringify(value)}${options2.betweenPairSeparator}`; + } }); - } - scopeCode(values = this._values, usedValues, getCode) { - return this._reduceValues(values, (name) => { - if (name.value === undefined) - throw new Error(`CodeGen: name "${name}" has no value`); - return name.value.code; - }, usedValues, getCode); - } - _reduceValues(values, valueCode, usedValues = {}, getCode) { - let code = code_1.nil; - for (const prefix in values) { - const vs = values[prefix]; - if (!vs) - continue; - const nameSet = (usedValues[prefix] = usedValues[prefix] || new Map()); - vs.forEach((name) => { - if (nameSet.has(name)) - return; - nameSet.set(name, UsedValueState.Started); - let c = valueCode(name); - if (c) { - const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const; - code = (0, code_1._) `${code}${def} ${name} = ${c};${this.opts._n}`; - } - else if ((c = getCode === null || getCode === void 0 ? void 0 : getCode(name))) { - code = (0, code_1._) `${code}${c}${this.opts._n}`; - } - else { - throw new ValueError(name); - } - nameSet.set(name, UsedValueState.Completed); - }); + return result.slice(0, -1); + } + }; + var MockCallHistory = class { + logs = []; + calls() { + return this.logs; + } + firstCall() { + return this.logs.at(0); + } + lastCall() { + return this.logs.at(-1); + } + nthCall(number) { + if (typeof number !== "number") { + throw new InvalidArgumentError("nthCall must be called with a number"); } - return code; - } -} -exports.ValueScope = ValueScope; -//# sourceMappingURL=scope.js.map - -/***/ }), - -/***/ 15384: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.keyword$DataError = exports.keywordError = void 0; -exports.reportError = reportError; -exports.reportExtraError = reportExtraError; -exports.resetErrorsCount = resetErrorsCount; -exports.extendErrors = extendErrors; -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const names_1 = __nccwpck_require__(34855); -exports.keywordError = { - message: ({ keyword }) => (0, codegen_1.str) `must pass "${keyword}" keyword validation`, -}; -exports.keyword$DataError = { - message: ({ keyword, schemaType }) => schemaType - ? (0, codegen_1.str) `"${keyword}" keyword must be ${schemaType} ($data)` - : (0, codegen_1.str) `"${keyword}" keyword is invalid ($data)`, -}; -function reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) { - const { it } = cxt; - const { gen, compositeRule, allErrors } = it; - const errObj = errorObjectCode(cxt, error, errorPaths); - if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : (compositeRule || allErrors)) { - addError(gen, errObj); - } - else { - returnErrors(it, (0, codegen_1._) `[${errObj}]`); - } -} -function reportExtraError(cxt, error = exports.keywordError, errorPaths) { - const { it } = cxt; - const { gen, compositeRule, allErrors } = it; - const errObj = errorObjectCode(cxt, error, errorPaths); - addError(gen, errObj); - if (!(compositeRule || allErrors)) { - returnErrors(it, names_1.default.vErrors); - } -} -function resetErrorsCount(gen, errsCount) { - gen.assign(names_1.default.errors, errsCount); - gen.if((0, codegen_1._) `${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._) `${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null))); -} -function extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }) { - /* istanbul ignore if */ - if (errsCount === undefined) - throw new Error("ajv implementation error"); - const err = gen.name("err"); - gen.forRange("i", errsCount, names_1.default.errors, (i) => { - gen.const(err, (0, codegen_1._) `${names_1.default.vErrors}[${i}]`); - gen.if((0, codegen_1._) `${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._) `${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath))); - gen.assign((0, codegen_1._) `${err}.schemaPath`, (0, codegen_1.str) `${it.errSchemaPath}/${keyword}`); - if (it.opts.verbose) { - gen.assign((0, codegen_1._) `${err}.schema`, schemaValue); - gen.assign((0, codegen_1._) `${err}.data`, data); + if (!Number.isInteger(number)) { + throw new InvalidArgumentError("nthCall must be called with an integer"); } - }); -} -function addError(gen, errObj) { - const err = gen.const("err", errObj); - gen.if((0, codegen_1._) `${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._) `[${err}]`), (0, codegen_1._) `${names_1.default.vErrors}.push(${err})`); - gen.code((0, codegen_1._) `${names_1.default.errors}++`); -} -function returnErrors(it, errs) { - const { gen, validateName, schemaEnv } = it; - if (schemaEnv.$async) { - gen.throw((0, codegen_1._) `new ${it.ValidationError}(${errs})`); - } - else { - gen.assign((0, codegen_1._) `${validateName}.errors`, errs); - gen.return(false); - } -} -const E = { - keyword: new codegen_1.Name("keyword"), - schemaPath: new codegen_1.Name("schemaPath"), // also used in JTD errors - params: new codegen_1.Name("params"), - propertyName: new codegen_1.Name("propertyName"), - message: new codegen_1.Name("message"), - schema: new codegen_1.Name("schema"), - parentSchema: new codegen_1.Name("parentSchema"), -}; -function errorObjectCode(cxt, error, errorPaths) { - const { createErrors } = cxt.it; - if (createErrors === false) - return (0, codegen_1._) `{}`; - return errorObject(cxt, error, errorPaths); -} -function errorObject(cxt, error, errorPaths = {}) { - const { gen, it } = cxt; - const keyValues = [ - errorInstancePath(it, errorPaths), - errorSchemaPath(cxt, errorPaths), - ]; - extraErrorProps(cxt, error, keyValues); - return gen.object(...keyValues); -} -function errorInstancePath({ errorPath }, { instancePath }) { - const instPath = instancePath - ? (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` - : errorPath; - return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)]; -} -function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) { - let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str) `${errSchemaPath}/${keyword}`; - if (schemaPath) { - schPath = (0, codegen_1.str) `${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`; - } - return [E.schemaPath, schPath]; -} -function extraErrorProps(cxt, { params, message }, keyValues) { - const { keyword, data, schemaValue, it } = cxt; - const { opts, propertyName, topSchemaRef, schemaPath } = it; - keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._) `{}`]); - if (opts.messages) { - keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]); - } - if (opts.verbose) { - keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._) `${topSchemaRef}${schemaPath}`], [names_1.default.data, data]); - } - if (propertyName) - keyValues.push([E.propertyName, propertyName]); -} -//# sourceMappingURL=errors.js.map - -/***/ }), - -/***/ 5831: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SchemaEnv = void 0; -exports.compileSchema = compileSchema; -exports.resolveRef = resolveRef; -exports.getCompilingSchema = getCompilingSchema; -exports.resolveSchema = resolveSchema; -const codegen_1 = __nccwpck_require__(34938); -const validation_error_1 = __nccwpck_require__(8324); -const names_1 = __nccwpck_require__(34855); -const resolve_1 = __nccwpck_require__(95182); -const util_1 = __nccwpck_require__(54313); -const validate_1 = __nccwpck_require__(40857); -class SchemaEnv { - constructor(env) { - var _a; - this.refs = {}; - this.dynamicAnchors = {}; - let schema; - if (typeof env.schema == "object") - schema = env.schema; - this.schema = env.schema; - this.schemaId = env.schemaId; - this.root = env.root || this; - this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]); - this.schemaPath = env.schemaPath; - this.localRefs = env.localRefs; - this.meta = env.meta; - this.$async = schema === null || schema === void 0 ? void 0 : schema.$async; - this.refs = {}; - } -} -exports.SchemaEnv = SchemaEnv; -// let codeSize = 0 -// let nodeCount = 0 -// Compiles schema in SchemaEnv -function compileSchema(sch) { - // TODO refactor - remove compilations - const _sch = getCompilingSchema.call(this, sch); - if (_sch) - return _sch; - const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); // TODO if getFullPath removed 1 tests fails - const { es5, lines } = this.opts.code; - const { ownProperties } = this.opts; - const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); - let _ValidationError; - if (sch.$async) { - _ValidationError = gen.scopeValue("Error", { - ref: validation_error_1.default, - code: (0, codegen_1._) `require("ajv/dist/runtime/validation_error").default`, - }); - } - const validateName = gen.scopeName("validate"); - sch.validateName = validateName; - const schemaCxt = { - gen, - allErrors: this.opts.allErrors, - data: names_1.default.data, - parentData: names_1.default.parentData, - parentDataProperty: names_1.default.parentDataProperty, - dataNames: [names_1.default.data], - dataPathArr: [codegen_1.nil], // TODO can its length be used as dataLevel if nil is removed? - dataLevel: 0, - dataTypes: [], - definedProperties: new Set(), - topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true - ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } - : { ref: sch.schema }), - validateName, - ValidationError: _ValidationError, - schema: sch.schema, - schemaEnv: sch, - rootId, - baseId: sch.baseId || rootId, - schemaPath: codegen_1.nil, - errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"), - errorPath: (0, codegen_1._) `""`, - opts: this.opts, - self: this, - }; - let sourceCode; - try { - this._compilations.add(sch); - (0, validate_1.validateFunctionCode)(schemaCxt); - gen.optimize(this.opts.code.optimize); - // gen.optimize(1) - const validateCode = gen.toString(); - sourceCode = `const visitedNodesForRef = new WeakMap(); ${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`; - // console.log((codeSize += sourceCode.length), (nodeCount += gen.nodeCount)) - if (this.opts.code.process) - sourceCode = this.opts.code.process(sourceCode, sch); - // console.log("\n\n\n *** \n", sourceCode) - const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode); - const validate = makeValidate(this, this.scope.get()); - this.scope.value(validateName, { ref: validate }); - validate.errors = null; - validate.schema = sch.schema; - validate.schemaEnv = sch; - if (sch.$async) - validate.$async = true; - if (this.opts.code.source === true) { - validate.source = { validateName, validateCode, scopeValues: gen._values }; + if (Math.sign(number) !== 1) { + throw new InvalidArgumentError("nthCall must be called with a positive value. use firstCall or lastCall instead"); } - if (this.opts.unevaluated) { - const { props, items } = schemaCxt; - validate.evaluated = { - props: props instanceof codegen_1.Name ? undefined : props, - items: items instanceof codegen_1.Name ? undefined : items, - dynamicProps: props instanceof codegen_1.Name, - dynamicItems: items instanceof codegen_1.Name, - }; - if (validate.source) - validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated); + return this.logs.at(number - 1); + } + filterCalls(criteria, options2) { + if (this.logs.length === 0) { + return this.logs; } - sch.validate = validate; - return sch; - } - catch (e) { - delete sch.validate; - delete sch.validateName; - if (sourceCode) - this.logger.error("Error compiling schema, function code:", sourceCode); - // console.log("\n\n\n *** \n", sourceCode, this.opts) - throw e; - } - finally { - this._compilations.delete(sch); - } -} -function resolveRef(root, baseId, origRef) { - var _a; - const ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, origRef); - const schOrFunc = root.refs[ref]; - if (schOrFunc) - return schOrFunc; - let _sch = resolve.call(this, root, ref); - if (_sch === undefined) { - const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; // TODO maybe localRefs should hold SchemaEnv - const { schemaId } = this.opts; - if (schema) - _sch = new SchemaEnv({ schema, schemaId, root, baseId }); - } - if (_sch === undefined && this.opts.loadSchemaSync) { - const remoteSchema = this.opts.loadSchemaSync(baseId, origRef, ref); - if (remoteSchema && !(this.refs[ref] || this.schemas[ref])) { - this.addSchema(remoteSchema, ref, undefined); - _sch = resolve.call(this, root, ref); + if (typeof criteria === "function") { + return this.logs.filter(criteria); } - } - if (_sch === undefined) - return; - return (root.refs[ref] = inlineOrCompile.call(this, _sch)); -} -function inlineOrCompile(sch) { - if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs)) - return sch.schema; - return sch.validate ? sch : compileSchema.call(this, sch); -} -// Index of schema compilation in the currently compiled list -function getCompilingSchema(schEnv) { - for (const sch of this._compilations) { - if (sameSchemaEnv(sch, schEnv)) - return sch; - } -} -function sameSchemaEnv(s1, s2) { - return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId; -} -// resolve and compile the references ($ref) -// TODO returns AnySchemaObject (if the schema can be inlined) or validation function -function resolve(root, // information about the root schema for the current schema -ref // reference to resolve -) { - let sch; - while (typeof (sch = this.refs[ref]) == "string") - ref = sch; - return sch || this.schemas[ref] || resolveSchema.call(this, root, ref); -} -// Resolve schema, its root and baseId -function resolveSchema(root, // root object with properties schema, refs TODO below SchemaEnv is assigned to it -ref // reference to resolve -) { - const p = this.opts.uriResolver.parse(ref); - const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p); - let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, undefined); - // TODO `Object.keys(root.schema).length > 0` should not be needed - but removing breaks 2 tests - if (Object.keys(root.schema).length > 0 && refPath === baseId) { - return getJsonPointer.call(this, p, root); - } - const id = (0, resolve_1.normalizeId)(refPath); - const schOrRef = this.refs[id] || this.schemas[id]; - if (typeof schOrRef == "string") { - const sch = resolveSchema.call(this, root, schOrRef); - if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object") - return; - return getJsonPointer.call(this, p, sch); - } - if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object") - return; - if (!schOrRef.validate) - compileSchema.call(this, schOrRef); - if (id === (0, resolve_1.normalizeId)(ref)) { - const { schema } = schOrRef; - const { schemaId } = this.opts; - const schId = schema[schemaId]; - if (schId) - baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); - return new SchemaEnv({ schema, schemaId, root, baseId }); - } - return getJsonPointer.call(this, p, schOrRef); -} -const PREVENT_SCOPE_CHANGE = new Set([ - "properties", - "patternProperties", - "enum", - "dependencies", - "definitions", -]); -function getJsonPointer(parsedRef, { baseId, schema, root }) { - var _a; - if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== "/") - return; - for (const part of parsedRef.fragment.slice(1).split("/")) { - if (typeof schema === "boolean") - return; - const partSchema = schema[(0, util_1.unescapeFragment)(part)]; - if (partSchema === undefined) - return; - schema = partSchema; - // TODO PREVENT_SCOPE_CHANGE could be defined in keyword def? - const schId = typeof schema === "object" && schema[this.opts.schemaId]; - if (!PREVENT_SCOPE_CHANGE.has(part) && schId) { - baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); + if (criteria instanceof RegExp) { + return this.logs.filter((log) => { + return criteria.test(log.toString()); + }); } - } - let env; - if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) { - const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref); - env = resolveSchema.call(this, root, $ref); - } - // even though resolution failed we need to return SchemaEnv to throw exception - // so that compileAsync loads missing schema. - const { schemaId } = this.opts; - env = env || new SchemaEnv({ schema, schemaId, root, baseId }); - if (env.schema !== env.root.schema) - return env; - return undefined; -} -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 34855: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const names = { - // validation function arguments - data: new codegen_1.Name("data"), // data passed to validation function - // args passed from referencing schema - valCxt: new codegen_1.Name("valCxt"), // validation/data context - should not be used directly, it is destructured to the names below - instancePath: new codegen_1.Name("instancePath"), - parentData: new codegen_1.Name("parentData"), - parentDataProperty: new codegen_1.Name("parentDataProperty"), - rootData: new codegen_1.Name("rootData"), // root data - same as the data passed to the first/top validation function - dynamicAnchors: new codegen_1.Name("dynamicAnchors"), // used to support recursiveRef and dynamicRef - isAllOfVariant: new codegen_1.Name("isAllOfVariant"), // used to check in runtime if the current function (ref) is called from allOf - // function scoped variables - vErrors: new codegen_1.Name("vErrors"), // null or array of validation errors - errors: new codegen_1.Name("errors"), // counter of validation errors - this: new codegen_1.Name("this"), - // "globals" - self: new codegen_1.Name("self"), - scope: new codegen_1.Name("scope"), - // JTD serialize/parse name for JSON string and position - json: new codegen_1.Name("json"), - jsonPos: new codegen_1.Name("jsonPos"), - jsonLen: new codegen_1.Name("jsonLen"), - jsonPart: new codegen_1.Name("jsonPart"), -}; -exports["default"] = names; -//# sourceMappingURL=names.js.map - -/***/ }), + if (typeof criteria === "object" && criteria !== null) { + if (Object.keys(criteria).length === 0) { + return this.logs; + } + const finalOptions = { operator: "OR", ...buildAndValidateFilterCallsOptions(options2) }; + let maybeDuplicatedLogsFiltered = []; + if ("protocol" in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.protocol, finalOptions, this.filterCallsByProtocol, maybeDuplicatedLogsFiltered); + } + if ("host" in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.host, finalOptions, this.filterCallsByHost, maybeDuplicatedLogsFiltered); + } + if ("port" in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.port, finalOptions, this.filterCallsByPort, maybeDuplicatedLogsFiltered); + } + if ("origin" in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.origin, finalOptions, this.filterCallsByOrigin, maybeDuplicatedLogsFiltered); + } + if ("path" in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.path, finalOptions, this.filterCallsByPath, maybeDuplicatedLogsFiltered); + } + if ("hash" in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.hash, finalOptions, this.filterCallsByHash, maybeDuplicatedLogsFiltered); + } + if ("fullUrl" in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.fullUrl, finalOptions, this.filterCallsByFullUrl, maybeDuplicatedLogsFiltered); + } + if ("method" in criteria) { + maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.method, finalOptions, this.filterCallsByMethod, maybeDuplicatedLogsFiltered); + } + const uniqLogsFiltered = [...new Set(maybeDuplicatedLogsFiltered)]; + return uniqLogsFiltered; + } + throw new InvalidArgumentError("criteria parameter should be one of function, regexp, or object"); + } + filterCallsByProtocol = makeFilterCalls.call(this, "protocol"); + filterCallsByHost = makeFilterCalls.call(this, "host"); + filterCallsByPort = makeFilterCalls.call(this, "port"); + filterCallsByOrigin = makeFilterCalls.call(this, "origin"); + filterCallsByPath = makeFilterCalls.call(this, "path"); + filterCallsByHash = makeFilterCalls.call(this, "hash"); + filterCallsByFullUrl = makeFilterCalls.call(this, "fullUrl"); + filterCallsByMethod = makeFilterCalls.call(this, "method"); + clear() { + this.logs = []; + } + [kMockCallHistoryAddLog](requestInit) { + const log = new MockCallHistoryLog(requestInit); + this.logs.push(log); + return log; + } + *[Symbol.iterator]() { + for (const log of this.calls()) { + yield log; + } + } + }; + module3.exports.MockCallHistory = MockCallHistory; + module3.exports.MockCallHistoryLog = MockCallHistoryLog; + } +}); -/***/ 33397: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +// node_modules/undici/lib/mock/mock-pool.js +var require_mock_pool = __commonJS({ + "node_modules/undici/lib/mock/mock-pool.js"(exports, module3) { + "use strict"; + var { promisify } = __require("node:util"); + var Pool = require_pool(); + var { buildMockDispatch } = require_mock_utils(); + var { + kDispatches, + kMockAgent, + kClose, + kOriginalClose, + kOrigin, + kOriginalDispatch, + kConnected, + kIgnoreTrailingSlash + } = require_mock_symbols(); + var { MockInterceptor } = require_mock_interceptor(); + var Symbols = require_symbols(); + var { InvalidArgumentError } = require_errors(); + var MockPool = class extends Pool { + constructor(origin, opts) { + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { + throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + } + super(origin, opts); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false; + 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 && { ignoreTrailingSlash: this[kIgnoreTrailingSlash], ...opts }, + this[kDispatches] + ); + } + cleanMocks() { + this[kDispatches] = []; + } + async [kClose]() { + await promisify(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module3.exports = MockPool; + } +}); -"use strict"; +// node_modules/undici/lib/mock/pending-interceptors-formatter.js +var require_pending_interceptors_formatter = __commonJS({ + "node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports, module3) { + "use strict"; + var { Transform } = __require("node:stream"); + var { Console } = __require("node:console"); + var PERSISTENT = process.versions.icu ? "\u2705" : "Y "; + var NOT_PERSISTENT = process.versions.icu ? "\u274C" : "N "; + module3.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: path13, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + Method: method, + Origin: origin, + Path: path13, + "Status code": statusCode, + Persistent: persist ? PERSISTENT : NOT_PERSISTENT, + Invocations: timesInvoked, + Remaining: persist ? Infinity : times - timesInvoked + }) + ); + this.logger.table(withPrettyHeaders); + return this.transform.read().toString(); + } + }; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -const resolve_1 = __nccwpck_require__(95182); -class MissingRefError extends Error { - constructor(resolver, baseId, ref, msg) { - super(msg || `can't resolve reference ${ref} from id ${baseId}`); - this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref); - this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef)); - } -} -exports["default"] = MissingRefError; -//# sourceMappingURL=ref_error.js.map - -/***/ }), - -/***/ 95182: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.inlineRef = inlineRef; -exports.getFullPath = getFullPath; -exports._getFullPath = _getFullPath; -exports.normalizeId = normalizeId; -exports.resolveUrl = resolveUrl; -exports.getSchemaRefs = getSchemaRefs; -const util_1 = __nccwpck_require__(54313); -const equal = __nccwpck_require__(28206); -const traverse = __nccwpck_require__(55524); -// TODO refactor to use keyword definitions -const SIMPLE_INLINED = new Set([ - "type", - "format", - "pattern", - "maxLength", - "minLength", - "maxProperties", - "minProperties", - "maxItems", - "minItems", - "maximum", - "minimum", - "uniqueItems", - "multipleOf", - "required", - "enum", - "const", -]); -function inlineRef(schema, limit = true) { - if (typeof schema == "boolean") - return true; - if (limit === true) - return !hasRef(schema); - if (!limit) - return false; - return countKeys(schema) <= limit; -} -const REF_KEYWORDS = new Set([ - "$ref", - "$recursiveRef", - "$recursiveAnchor", - "$dynamicRef", - "$dynamicAnchor", -]); -function hasRef(schema) { - for (const key in schema) { - if (REF_KEYWORDS.has(key)) - return true; - const sch = schema[key]; - if (Array.isArray(sch) && sch.some(hasRef)) - return true; - if (typeof sch == "object" && hasRef(sch)) - return true; - } - return false; -} -function countKeys(schema) { - let count = 0; - for (const key in schema) { - if (key === "$ref") - return Infinity; - count++; - if (SIMPLE_INLINED.has(key)) - continue; - if (typeof schema[key] == "object") { - (0, util_1.eachItem)(schema[key], (sch) => (count += countKeys(sch))); +// node_modules/undici/lib/mock/mock-agent.js +var require_mock_agent = __commonJS({ + "node_modules/undici/lib/mock/mock-agent.js"(exports, module3) { + "use strict"; + var { kClients } = require_symbols(); + var Agent2 = require_agent(); + var { + kAgent, + kMockAgentSet, + kMockAgentGet, + kDispatches, + kIsMockActive, + kNetConnect, + kGetNetConnect, + kOptions, + kFactory, + kMockAgentRegisterCallHistory, + kMockAgentIsCallHistoryEnabled, + kMockAgentAddCallHistoryLog, + kMockAgentMockCallHistoryInstance, + kMockAgentAcceptsNonStandardSearchParameters, + kMockCallHistoryAddLog, + kIgnoreTrailingSlash + } = require_mock_symbols(); + var MockClient = require_mock_client(); + var MockPool = require_mock_pool(); + var { matchValue, normalizeSearchParams, buildAndValidateMockOptions, normalizeOrigin } = require_mock_utils(); + var { InvalidArgumentError, UndiciError } = require_errors(); + var Dispatcher = require_dispatcher(); + var PendingInterceptorsFormatter = require_pending_interceptors_formatter(); + var { MockCallHistory } = require_mock_call_history(); + var MockAgent = class extends Dispatcher { + constructor(opts = {}) { + super(opts); + const mockOptions = buildAndValidateMockOptions(opts); + this[kNetConnect] = true; + this[kIsMockActive] = true; + this[kMockAgentIsCallHistoryEnabled] = mockOptions.enableCallHistory ?? false; + this[kMockAgentAcceptsNonStandardSearchParameters] = mockOptions.acceptNonStandardSearchParameters ?? false; + this[kIgnoreTrailingSlash] = mockOptions.ignoreTrailingSlash ?? false; + if (opts?.agent && typeof opts.agent.dispatch !== "function") { + throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + } + const agent = opts?.agent ? opts.agent : new Agent2(opts); + this[kAgent] = agent; + this[kClients] = agent[kClients]; + this[kOptions] = mockOptions; + if (this[kMockAgentIsCallHistoryEnabled]) { + this[kMockAgentRegisterCallHistory](); + } + } + get(origin) { + const normalizedOrigin = normalizeOrigin(origin); + const originKey = this[kIgnoreTrailingSlash] ? normalizedOrigin.replace(/\/$/, "") : normalizedOrigin; + let dispatcher = this[kMockAgentGet](originKey); + if (!dispatcher) { + dispatcher = this[kFactory](originKey); + this[kMockAgentSet](originKey, dispatcher); + } + return dispatcher; + } + dispatch(opts, handler) { + opts.origin = normalizeOrigin(opts.origin); + this.get(opts.origin); + this[kMockAgentAddCallHistoryLog](opts); + const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters]; + const dispatchOpts = { ...opts }; + if (acceptNonStandardSearchParameters && dispatchOpts.path) { + const [path13, searchParams] = dispatchOpts.path.split("?"); + const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters); + dispatchOpts.path = `${path13}?${normalizedSearchParams}`; + } + return this[kAgent].dispatch(dispatchOpts, handler); + } + async close() { + this.clearCallHistory(); + 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."); } - if (count === Infinity) - return Infinity; - } - return count; -} -function getFullPath(resolver, id = "", normalize) { - if (normalize !== false) - id = normalizeId(id); - const p = resolver.parse(id); - return _getFullPath(resolver, p); -} -function _getFullPath(resolver, p) { - const serialized = resolver.serialize(p); - return serialized.split("#")[0] + "#"; -} -const TRAILING_SLASH_HASH = /#\/?$/; -function normalizeId(id) { - return id ? id.replace(TRAILING_SLASH_HASH, "") : ""; -} -function resolveUrl(resolver, baseId, id) { - id = normalizeId(id); - return resolver.resolve(baseId, id); -} -const ANCHOR = /^[a-z_][-a-z0-9._]*$/i; -function getSchemaRefs(schema, baseId) { - if (typeof schema == "boolean") - return {}; - const { schemaId, uriResolver } = this.opts; - const schId = normalizeId(schema[schemaId] || baseId); - const baseIds = { "": schId }; - const pathPrefix = getFullPath(uriResolver, schId, false); - const localRefs = {}; - const schemaRefs = new Set(); - traverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => { - if (parentJsonPtr === undefined) - return; - const fullPath = pathPrefix + jsonPtr; - let baseId = baseIds[parentJsonPtr]; - if (typeof sch[schemaId] == "string") - baseId = addRef.call(this, sch[schemaId]); - addAnchor.call(this, sch.$anchor); - addAnchor.call(this, sch.$dynamicAnchor); - baseIds[jsonPtr] = baseId; - function addRef(ref) { - // eslint-disable-next-line @typescript-eslint/unbound-method - const _resolve = this.opts.uriResolver.resolve; - ref = normalizeId(baseId ? _resolve(baseId, ref) : ref); - if (schemaRefs.has(ref)) - throw ambiguos(ref); - schemaRefs.add(ref); - let schOrRef = this.refs[ref]; - if (typeof schOrRef == "string") - schOrRef = this.refs[schOrRef]; - if (typeof schOrRef == "object") { - checkAmbiguosRef(sch, schOrRef.schema, ref); - } - else if (ref !== normalizeId(fullPath)) { - if (ref[0] === "#") { - checkAmbiguosRef(sch, localRefs[ref], ref); - localRefs[ref] = sch; - } - else { - this.refs[ref] = fullPath; - } - } - return ref; + } + disableNetConnect() { + this[kNetConnect] = false; + } + enableCallHistory() { + this[kMockAgentIsCallHistoryEnabled] = true; + return this; + } + disableCallHistory() { + this[kMockAgentIsCallHistoryEnabled] = false; + return this; + } + getCallHistory() { + return this[kMockAgentMockCallHistoryInstance]; + } + clearCallHistory() { + if (this[kMockAgentMockCallHistoryInstance] !== void 0) { + this[kMockAgentMockCallHistoryInstance].clear(); } - function addAnchor(anchor) { - if (typeof anchor == "string") { - if (!ANCHOR.test(anchor)) - throw new Error(`invalid anchor "${anchor}"`); - addRef.call(this, `#${anchor}`); - } + } + // This is required to bypass issues caused by using global symbols - see: + // https://github.com/nodejs/undici/issues/1447 + get isMockActive() { + return this[kIsMockActive]; + } + [kMockAgentRegisterCallHistory]() { + if (this[kMockAgentMockCallHistoryInstance] === void 0) { + this[kMockAgentMockCallHistoryInstance] = new MockCallHistory(); } - }); - return localRefs; - function checkAmbiguosRef(sch1, sch2, ref) { - if (sch2 !== undefined && !equal(sch1, sch2)) - throw ambiguos(ref); - } - function ambiguos(ref) { - return new Error(`reference "${ref}" resolves to more than one schema`); - } -} -//# sourceMappingURL=resolve.js.map - -/***/ }), - -/***/ 90450: -/***/ ((__unused_webpack_module, exports) => { + } + [kMockAgentAddCallHistoryLog](opts) { + if (this[kMockAgentIsCallHistoryEnabled]) { + this[kMockAgentRegisterCallHistory](); + this[kMockAgentMockCallHistoryInstance][kMockCallHistoryAddLog](opts); + } + } + [kMockAgentSet](origin, dispatcher) { + this[kClients].set(origin, { count: 0, 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 result = this[kClients].get(origin); + if (result?.dispatcher) { + return result.dispatcher; + } + if (typeof origin !== "string") { + const dispatcher = this[kFactory]("http://localhost:9999"); + this[kMockAgentSet](origin, dispatcher); + return dispatcher; + } + for (const [keyMatcher, result2] of Array.from(this[kClients])) { + if (result2 && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) { + const dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + dispatcher[kDispatches] = result2.dispatcher[kDispatches]; + return dispatcher; + } + } + } + [kGetNetConnect]() { + return this[kNetConnect]; + } + pendingInterceptors() { + const mockAgentClients = this[kClients]; + return Array.from(mockAgentClients.entries()).flatMap(([origin, result]) => result.dispatcher[kDispatches].map((dispatch) => ({ ...dispatch, origin }))).filter(({ pending }) => pending); + } + assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { + const pending = this.pendingInterceptors(); + if (pending.length === 0) { + return; + } + throw new UndiciError( + pending.length === 1 ? `1 interceptor is pending: -"use strict"; +${pendingInterceptorsFormatter.format(pending)}`.trim() : `${pending.length} interceptors are pending: -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isJSONType = isJSONType; -exports.getRules = getRules; -const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"]; -const jsonTypes = new Set(_jsonTypes); -function isJSONType(x) { - return typeof x == "string" && jsonTypes.has(x); -} -function getRules() { - const groups = { - number: { type: "number", rules: [] }, - string: { type: "string", rules: [] }, - array: { type: "array", rules: [] }, - object: { type: "object", rules: [] }, - }; - return { - types: { ...groups, integer: true, boolean: true, null: true }, - rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object], - post: { rules: [] }, - all: {}, - keywords: {}, - }; -} -//# sourceMappingURL=rules.js.map - -/***/ }), - -/***/ 54313: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Type = exports.mergeEvaluated = void 0; -exports.toHash = toHash; -exports.alwaysValidSchema = alwaysValidSchema; -exports.checkUnknownRules = checkUnknownRules; -exports.schemaHasRules = schemaHasRules; -exports.schemaHasRulesButRef = schemaHasRulesButRef; -exports.schemaRefOrVal = schemaRefOrVal; -exports.unescapeFragment = unescapeFragment; -exports.escapeFragment = escapeFragment; -exports.escapeJsonPointer = escapeJsonPointer; -exports.unescapeJsonPointer = unescapeJsonPointer; -exports.eachItem = eachItem; -exports.evaluatedPropsToName = evaluatedPropsToName; -exports.setEvaluated = setEvaluated; -exports.useFunc = useFunc; -exports.getErrorPath = getErrorPath; -exports.checkStrictMode = checkStrictMode; -const codegen_1 = __nccwpck_require__(34938); -const code_1 = __nccwpck_require__(1979); -// TODO refactor to use Set -function toHash(arr) { - const hash = {}; - for (const item of arr) - hash[item] = true; - return hash; -} -function alwaysValidSchema(it, schema) { - if (typeof schema == "boolean") - return schema; - if (Object.keys(schema).length === 0) - return true; - checkUnknownRules(it, schema); - return !schemaHasRules(schema, it.self.RULES.all); -} -function checkUnknownRules(it, schema = it.schema) { - const { opts, self } = it; - if (!opts.strictSchema) - return; - if (typeof schema === "boolean") - return; - const rules = self.RULES.keywords; - for (const key in schema) { - if (!rules[key]) - checkStrictMode(it, `unknown keyword: "${key}"`); - } -} -function schemaHasRules(schema, rules) { - if (typeof schema == "boolean") - return !schema; - for (const key in schema) - if (rules[key]) - return true; - return false; -} -function schemaHasRulesButRef(schema, RULES) { - if (typeof schema == "boolean") - return !schema; - for (const key in schema) - if (key !== "$ref" && RULES.all[key]) - return true; - return false; -} -function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) { - if (!$data) { - if (typeof schema == "number" || typeof schema == "boolean") - return schema; - if (typeof schema == "string") - return (0, codegen_1._) `${schema}`; - } - return (0, codegen_1._) `${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`; -} -function unescapeFragment(str) { - return unescapeJsonPointer(decodeURIComponent(str)); -} -function escapeFragment(str) { - return encodeURIComponent(escapeJsonPointer(str)); -} -function escapeJsonPointer(str) { - if (typeof str == "number") - return `${str}`; - return str.replace(/~/g, "~0").replace(/\//g, "~1"); -} -function unescapeJsonPointer(str) { - return str.replace(/~1/g, "/").replace(/~0/g, "~"); -} -function eachItem(xs, f) { - if (Array.isArray(xs)) { - for (const x of xs) - f(x); - } - else { - f(xs); - } -} -function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName, }) { - return (gen, from, to, toName) => { - const res = to === undefined - ? from - : to instanceof codegen_1.Name - ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) - : from instanceof codegen_1.Name - ? (mergeToName(gen, to, from), from) - : mergeValues(from, to); - return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res; +${pendingInterceptorsFormatter.format(pending)}`.trim() + ); + } }; -} -exports.mergeEvaluated = { - props: makeMergeEvaluated({ - mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => { - gen.if((0, codegen_1._) `${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._) `${to} || {}`).code((0, codegen_1._) `Object.assign(${to}, ${from})`)); - }), - mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => { - if (from === true) { - gen.assign(to, true); + module3.exports = MockAgent; + } +}); + +// node_modules/undici/lib/mock/snapshot-utils.js +var require_snapshot_utils = __commonJS({ + "node_modules/undici/lib/mock/snapshot-utils.js"(exports, module3) { + "use strict"; + var { InvalidArgumentError } = require_errors(); + var { runtimeFeatures } = require_runtime_features(); + function createHeaderFilters(matchOptions = {}) { + const { ignoreHeaders = [], excludeHeaders = [], matchHeaders = [], caseSensitive = false } = matchOptions; + return { + ignore: new Set(ignoreHeaders.map((header) => caseSensitive ? header : header.toLowerCase())), + exclude: new Set(excludeHeaders.map((header) => caseSensitive ? header : header.toLowerCase())), + match: new Set(matchHeaders.map((header) => caseSensitive ? header : header.toLowerCase())) + }; + } + var crypto = runtimeFeatures.has("crypto") ? __require("node:crypto") : null; + var hashId = crypto?.hash ? (value) => crypto.hash("sha256", value, "base64url") : (value) => Buffer.from(value).toString("base64url"); + function isUndiciHeaders(headers) { + return Array.isArray(headers) && (headers.length & 1) === 0; + } + function isUrlExcludedFactory(excludePatterns = []) { + if (excludePatterns.length === 0) { + return () => false; + } + return function isUrlExcluded(url3) { + let urlLowerCased; + for (const pattern of excludePatterns) { + if (typeof pattern === "string") { + if (!urlLowerCased) { + urlLowerCased = url3.toLowerCase(); } - else { - gen.assign(to, (0, codegen_1._) `${to} || {}`); - setEvaluated(gen, to, from); + if (urlLowerCased.includes(pattern.toLowerCase())) { + return true; } - }), - mergeValues: (from, to) => (from === true ? true : { ...from, ...to }), - resultToName: evaluatedPropsToName, - }), - items: makeMergeEvaluated({ - mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._) `${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)), - mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._) `${to} > ${from} ? ${to} : ${from}`)), - mergeValues: (from, to) => (from === true ? true : Math.max(from, to)), - resultToName: (gen, items) => gen.var("items", items), - }), -}; -function evaluatedPropsToName(gen, ps) { - if (ps === true) - return gen.var("props", true); - const props = gen.var("props", (0, codegen_1._) `{}`); - if (ps !== undefined) - setEvaluated(gen, props, ps); - return props; -} -function setEvaluated(gen, props, ps) { - Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._) `${props}${(0, codegen_1.getProperty)(p)}`, true)); -} -const snippets = {}; -function useFunc(gen, f) { - return gen.scopeValue("func", { - ref: f, - code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code)), - }); -} -var Type; -(function (Type) { - Type[Type["Num"] = 0] = "Num"; - Type[Type["Str"] = 1] = "Str"; -})(Type || (exports.Type = Type = {})); -function getErrorPath(dataProp, dataPropType, jsPropertySyntax) { - // let path - if (dataProp instanceof codegen_1.Name) { - const isNumber = dataPropType === Type.Num; - return jsPropertySyntax - ? isNumber - ? (0, codegen_1._) `"[" + ${dataProp} + "]"` - : (0, codegen_1._) `"['" + ${dataProp} + "']"` - : isNumber - ? (0, codegen_1._) `"/" + ${dataProp}` - : (0, codegen_1._) `"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`; // TODO maybe use global escapePointer - } - return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp); -} -function checkStrictMode(it, msg, mode = it.opts.strictSchema) { - if (!mode) - return; - msg = `strict mode: ${msg}`; - if (mode === true) - throw new Error(msg); - it.self.logger.warn(msg); -} -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ 85467: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.schemaHasRulesForType = schemaHasRulesForType; -exports.shouldUseGroup = shouldUseGroup; -exports.shouldUseRule = shouldUseRule; -function schemaHasRulesForType({ schema, self }, type) { - const group = self.RULES.types[type]; - return group && group !== true && shouldUseGroup(schema, group); -} -function shouldUseGroup(schema, group) { - return group.rules.some((rule) => shouldUseRule(schema, rule)); -} -function shouldUseRule(schema, rule) { - var _a; - return (schema[rule.keyword] !== undefined || - ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== undefined))); -} -//# sourceMappingURL=applicability.js.map - -/***/ }), - -/***/ 51941: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.topBoolOrEmptySchema = topBoolOrEmptySchema; -exports.boolOrEmptySchema = boolOrEmptySchema; -const errors_1 = __nccwpck_require__(15384); -const codegen_1 = __nccwpck_require__(34938); -const names_1 = __nccwpck_require__(34855); -const boolError = { - message: "boolean schema is false", -}; -function topBoolOrEmptySchema(it) { - const { gen, schema, validateName } = it; - if (schema === false) { - falseSchemaError(it, false); - } - else if (typeof schema == "object" && schema.$async === true) { - gen.return(names_1.default.data); - } - else { - gen.assign((0, codegen_1._) `${validateName}.errors`, null); - gen.return(true); - } -} -function boolOrEmptySchema(it, valid) { - const { gen, schema } = it; - if (schema === false) { - gen.var(valid, false); // TODO var - falseSchemaError(it); - } - else { - gen.var(valid, true); // TODO var + } else if (pattern instanceof RegExp) { + if (pattern.test(url3)) { + return true; + } + } + } + return false; + }; + } + function normalizeHeaders(headers) { + const normalizedHeaders = {}; + if (!headers) return normalizedHeaders; + if (isUndiciHeaders(headers)) { + for (let i2 = 0; i2 < headers.length; i2 += 2) { + const key = headers[i2]; + const value = headers[i2 + 1]; + if (key && value !== void 0) { + const keyStr = Buffer.isBuffer(key) ? key.toString() : key; + const valueStr = Buffer.isBuffer(value) ? value.toString() : value; + normalizedHeaders[keyStr.toLowerCase()] = valueStr; + } + } + return normalizedHeaders; + } + if (headers && typeof headers === "object") { + for (const [key, value] of Object.entries(headers)) { + if (key && typeof key === "string") { + normalizedHeaders[key.toLowerCase()] = Array.isArray(value) ? value.join(", ") : String(value); + } + } + } + return normalizedHeaders; } -} -function falseSchemaError(it, overrideAllErrors) { - const { gen, data } = it; - // TODO maybe some other interface should be used for non-keyword validation errors... - const cxt = { - gen, - keyword: "false schema", - data, - schema: false, - schemaCode: false, - schemaValue: false, - params: {}, - it, + var validSnapshotModes = ( + /** @type {const} */ + ["record", "playback", "update"] + ); + function validateSnapshotMode(mode) { + if (!validSnapshotModes.includes(mode)) { + throw new InvalidArgumentError(`Invalid snapshot mode: ${mode}. Must be one of: ${validSnapshotModes.join(", ")}`); + } + } + module3.exports = { + createHeaderFilters, + hashId, + isUndiciHeaders, + normalizeHeaders, + isUrlExcludedFactory, + validateSnapshotMode }; - (0, errors_1.reportError)(cxt, boolError, undefined, overrideAllErrors); -} -//# sourceMappingURL=boolSchema.js.map - -/***/ }), - -/***/ 37857: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DataType = void 0; -exports.getSchemaTypes = getSchemaTypes; -exports.getJSONTypes = getJSONTypes; -exports.coerceAndCheckDataType = coerceAndCheckDataType; -exports.checkDataType = checkDataType; -exports.checkDataTypes = checkDataTypes; -exports.reportTypeError = reportTypeError; -const rules_1 = __nccwpck_require__(90450); -const applicability_1 = __nccwpck_require__(85467); -const errors_1 = __nccwpck_require__(15384); -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -var DataType; -(function (DataType) { - DataType[DataType["Correct"] = 0] = "Correct"; - DataType[DataType["Wrong"] = 1] = "Wrong"; -})(DataType || (exports.DataType = DataType = {})); -function getSchemaTypes(schema) { - const types = getJSONTypes(schema.type); - const hasNull = types.includes("null"); - if (hasNull) { - if (schema.nullable === false) - throw new Error("type: null contradicts nullable: false"); - } - else { - if (!types.length && schema.nullable !== undefined) { - throw new Error('"nullable" cannot be used without "type"'); - } - if (schema.nullable === true) - types.push("null"); - } - return types; -} -function getJSONTypes(ts) { - const types = Array.isArray(ts) ? ts : ts ? [ts] : []; - if (types.every(rules_1.isJSONType)) - return types; - throw new Error("type must be JSONType or JSONType[]: " + types.join(",")); -} -function coerceAndCheckDataType(it, types) { - const { gen, data, opts } = it; - const coerceTo = coerceToTypes(types, opts.coerceTypes); - const checkTypes = types.length > 0 && - !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0])); - if (checkTypes) { - const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong); - gen.if(wrongType, () => { - if (coerceTo.length) - coerceData(it, types, coerceTo); - else - reportTypeError(it); - }); - } - return checkTypes; -} -const COERCIBLE = new Set(["string", "number", "integer", "boolean", "null"]); -function coerceToTypes(types, coerceTypes) { - return coerceTypes - ? types.filter((t) => COERCIBLE.has(t) || (coerceTypes === "array" && t === "array")) - : []; -} -function coerceData(it, types, coerceTo) { - const { gen, data, opts } = it; - const dataType = gen.let("dataType", (0, codegen_1._) `typeof ${data}`); - const coerced = gen.let("coerced", (0, codegen_1._) `undefined`); - if (opts.coerceTypes === "array") { - gen.if((0, codegen_1._) `${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen - .assign(data, (0, codegen_1._) `${data}[0]`) - .assign(dataType, (0, codegen_1._) `typeof ${data}`) - .if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data))); - } - gen.if((0, codegen_1._) `${coerced} !== undefined`); - for (const t of coerceTo) { - if (COERCIBLE.has(t) || (t === "array" && opts.coerceTypes === "array")) { - coerceSpecificType(t); - } - } - gen.else(); - reportTypeError(it); - gen.endIf(); - gen.if((0, codegen_1._) `${coerced} !== undefined`, () => { - gen.assign(data, coerced); - assignParentData(it, coerced); - }); - function coerceSpecificType(t) { - switch (t) { - case "string": - gen - .elseIf((0, codegen_1._) `${dataType} == "number" || ${dataType} == "boolean"`) - .assign(coerced, (0, codegen_1._) `"" + ${data}`) - .elseIf((0, codegen_1._) `${data} === null`) - .assign(coerced, (0, codegen_1._) `""`); - return; - case "number": - gen - .elseIf((0, codegen_1._) `${dataType} == "boolean" || ${data} === null - || (${dataType} == "string" && ${data} && ${data} == +${data})`) - .assign(coerced, (0, codegen_1._) `+${data}`); - return; - case "integer": - gen - .elseIf((0, codegen_1._) `${dataType} === "boolean" || ${data} === null - || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`) - .assign(coerced, (0, codegen_1._) `+${data}`); - return; - case "boolean": - gen - .elseIf((0, codegen_1._) `${data} === "false" || ${data} === 0 || ${data} === null`) - .assign(coerced, false) - .elseIf((0, codegen_1._) `${data} === "true" || ${data} === 1`) - .assign(coerced, true); - return; - case "null": - gen.elseIf((0, codegen_1._) `${data} === "" || ${data} === 0 || ${data} === false`); - gen.assign(coerced, null); - return; - case "array": - gen - .elseIf((0, codegen_1._) `${dataType} === "string" || ${dataType} === "number" - || ${dataType} === "boolean" || ${data} === null`) - .assign(coerced, (0, codegen_1._) `[${data}]`); - } - } -} -function assignParentData({ gen, parentData, parentDataProperty }, expr) { - // TODO use gen.property - gen.if((0, codegen_1._) `${parentData} !== undefined`, () => gen.assign((0, codegen_1._) `${parentData}[${parentDataProperty}]`, expr)); -} -function checkDataType(dataType, data, strictNums, correct = DataType.Correct) { - const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ; - let cond; - switch (dataType) { - case "null": - return (0, codegen_1._) `${data} ${EQ} null`; - case "array": - cond = (0, codegen_1._) `Array.isArray(${data})`; - break; - case "object": - cond = (0, codegen_1._) `${data} && typeof ${data} == "object" && !Array.isArray(${data})`; - break; - case "integer": - cond = numCond((0, codegen_1._) `!(${data} % 1) && !isNaN(${data})`); - break; - case "number": - cond = numCond(); - break; - default: - return (0, codegen_1._) `typeof ${data} ${EQ} ${dataType}`; - } - return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond); - function numCond(_cond = codegen_1.nil) { - return (0, codegen_1.and)((0, codegen_1._) `typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._) `isFinite(${data})` : codegen_1.nil); - } -} -function checkDataTypes(dataTypes, data, strictNums, correct) { - if (dataTypes.length === 1) { - return checkDataType(dataTypes[0], data, strictNums, correct); - } - let cond; - const types = (0, util_1.toHash)(dataTypes); - if (types.array && types.object) { - const notObj = (0, codegen_1._) `typeof ${data} != "object"`; - cond = types.null ? notObj : (0, codegen_1._) `!${data} || ${notObj}`; - delete types.null; - delete types.array; - delete types.object; - } - else { - cond = codegen_1.nil; - } - if (types.number) - delete types.integer; - for (const t in types) - cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct)); - return cond; -} -const typeError = { - message: ({ schema }) => `must be ${schema}`, - params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._) `{type: ${schema}}` : (0, codegen_1._) `{type: ${schemaValue}}`, -}; -function reportTypeError(it) { - const cxt = getTypeErrorContext(it); - (0, errors_1.reportError)(cxt, typeError); -} -function getTypeErrorContext(it) { - const { gen, data, schema } = it; - const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, "type"); - return { - gen, - keyword: "type", - data, - schema: schema.type, - schemaCode, - schemaValue: schemaCode, - parentSchema: schema, - params: {}, - it, - }; -} -//# sourceMappingURL=dataType.js.map - -/***/ }), - -/***/ 86976: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.assignDefaults = assignDefaults; -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -function assignDefaults(it, ty) { - const { properties, items } = it.schema; - if (ty === "object" && properties) { - for (const key in properties) { - assignDefault(it, key, properties[key].default); +// node_modules/undici/lib/mock/snapshot-recorder.js +var require_snapshot_recorder = __commonJS({ + "node_modules/undici/lib/mock/snapshot-recorder.js"(exports, module3) { + "use strict"; + var { writeFile, readFile, mkdir } = __require("node:fs/promises"); + var { dirname: dirname7, resolve: resolve8 } = __require("node:path"); + var { setTimeout: setTimeout2, clearTimeout: clearTimeout2 } = __require("node:timers"); + var { InvalidArgumentError, UndiciError } = require_errors(); + var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils(); + function formatRequestKey(opts, headerFilters, matchOptions = {}) { + const url3 = new URL(opts.path, opts.origin); + const normalized = opts._normalizedHeaders || normalizeHeaders(opts.headers); + if (!opts._normalizedHeaders) { + opts._normalizedHeaders = normalized; + } + return { + method: opts.method || "GET", + url: matchOptions.matchQuery !== false ? url3.toString() : `${url3.origin}${url3.pathname}`, + headers: filterHeadersForMatching(normalized, headerFilters, matchOptions), + body: matchOptions.matchBody !== false && opts.body ? String(opts.body) : "" + }; + } + function filterHeadersForMatching(headers, headerFilters, matchOptions = {}) { + if (!headers || typeof headers !== "object") return {}; + const { + caseSensitive = false + } = matchOptions; + const filtered = {}; + const { ignore, exclude, match: match2 } = headerFilters; + for (const [key, value] of Object.entries(headers)) { + const headerKey = caseSensitive ? key : key.toLowerCase(); + if (exclude.has(headerKey)) continue; + if (ignore.has(headerKey)) continue; + if (match2.size !== 0) { + if (!match2.has(headerKey)) continue; + } + filtered[headerKey] = value; + } + return filtered; + } + function filterHeadersForStorage(headers, headerFilters, matchOptions = {}) { + if (!headers || typeof headers !== "object") return {}; + const { + caseSensitive = false + } = matchOptions; + const filtered = {}; + const { exclude: excludeSet } = headerFilters; + for (const [key, value] of Object.entries(headers)) { + const headerKey = caseSensitive ? key : key.toLowerCase(); + if (excludeSet.has(headerKey)) continue; + filtered[headerKey] = value; + } + return filtered; + } + function createRequestHash(formattedRequest) { + const parts = [ + formattedRequest.method, + formattedRequest.url + ]; + if (formattedRequest.headers && typeof formattedRequest.headers === "object") { + const headerKeys = Object.keys(formattedRequest.headers).sort(); + for (const key of headerKeys) { + const values = Array.isArray(formattedRequest.headers[key]) ? formattedRequest.headers[key] : [formattedRequest.headers[key]]; + parts.push(key); + for (const value of values.sort()) { + parts.push(String(value)); + } } - } - else if (ty === "array" && Array.isArray(items)) { - items.forEach((sch, i) => assignDefault(it, i, sch.default)); - } -} -function assignDefault(it, prop, defaultValue) { - const { gen, compositeRule, data, opts } = it; - if (defaultValue === undefined) - return; - const childData = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(prop)}`; - if (compositeRule) { - (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`); - return; - } - let condition = (0, codegen_1._) `${childData} === undefined`; - if (opts.useDefaults === "empty") { - condition = (0, codegen_1._) `${condition} || ${childData} === null || ${childData} === ""`; - } - // `${childData} === undefined` + - // (opts.useDefaults === "empty" ? ` || ${childData} === null || ${childData} === ""` : "") - gen.if(condition, (0, codegen_1._) `${childData} = ${(0, codegen_1.stringify)(defaultValue)}`); -} -//# sourceMappingURL=defaults.js.map - -/***/ }), - -/***/ 40857: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.KeywordCxt = void 0; -exports.validateFunctionCode = validateFunctionCode; -exports.getData = getData; -const boolSchema_1 = __nccwpck_require__(51941); -const dataType_1 = __nccwpck_require__(37857); -const applicability_1 = __nccwpck_require__(85467); -const dataType_2 = __nccwpck_require__(37857); -const defaults_1 = __nccwpck_require__(86976); -const keyword_1 = __nccwpck_require__(51896); -const subschema_1 = __nccwpck_require__(15432); -const codegen_1 = __nccwpck_require__(34938); -const names_1 = __nccwpck_require__(34855); -const resolve_1 = __nccwpck_require__(95182); -const util_1 = __nccwpck_require__(54313); -const errors_1 = __nccwpck_require__(15384); -// schema compilation - generates validation function, subschemaCode (below) is used for subschemas -function validateFunctionCode(it) { - if (isSchemaObj(it)) { - checkKeywords(it); - if (schemaCxtHasRules(it)) { - topSchemaObjCode(it); - return; + } + parts.push(formattedRequest.body); + const content = parts.join("|"); + return hashId(content); + } + var SnapshotRecorder = class { + /** @type {NodeJS.Timeout | null} */ + #flushTimeout; + /** @type {import('./snapshot-utils').IsUrlExcluded} */ + #isUrlExcluded; + /** @type {Map} */ + #snapshots = /* @__PURE__ */ new Map(); + /** @type {string|undefined} */ + #snapshotPath; + /** @type {number} */ + #maxSnapshots = Infinity; + /** @type {boolean} */ + #autoFlush = false; + /** @type {import('./snapshot-utils').HeaderFilters} */ + #headerFilters; + /** + * Creates a new SnapshotRecorder instance + * @param {SnapshotRecorderOptions&SnapshotRecorderMatchOptions} [options={}] - Configuration options for the recorder + */ + constructor(options2 = {}) { + this.#snapshotPath = options2.snapshotPath; + this.#maxSnapshots = options2.maxSnapshots || Infinity; + this.#autoFlush = options2.autoFlush || false; + this.flushInterval = options2.flushInterval || 3e4; + this._flushTimer = null; + this.matchOptions = { + matchHeaders: options2.matchHeaders || [], + // empty means match all headers + ignoreHeaders: options2.ignoreHeaders || [], + excludeHeaders: options2.excludeHeaders || [], + matchBody: options2.matchBody !== false, + // default: true + matchQuery: options2.matchQuery !== false, + // default: true + caseSensitive: options2.caseSensitive || false + }; + this.#headerFilters = createHeaderFilters(this.matchOptions); + this.shouldRecord = options2.shouldRecord || (() => true); + this.shouldPlayback = options2.shouldPlayback || (() => true); + this.#isUrlExcluded = isUrlExcludedFactory(options2.excludeUrls); + if (this.#autoFlush && this.#snapshotPath) { + this.#startAutoFlush(); } - } - validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it)); -} -function validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) { - if (opts.code.es5) { - gen.func(validateName, (0, codegen_1._) `${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => { - gen.code((0, codegen_1._) `"use strict"; ${funcSourceUrl(schema, opts)}`); - destructureValCxtES5(gen, opts); - gen.code(body); - }); - } - else { - gen.func(validateName, (0, codegen_1._) `${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body)); - } -} -function destructureValCxt(opts) { - return (0, codegen_1._) `{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._) `, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}, ${names_1.default.isAllOfVariant} = 0}={}`; -} -function destructureValCxtES5(gen, opts) { - gen.if(names_1.default.valCxt, () => { - gen.var(names_1.default.instancePath, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.instancePath}`); - gen.var(names_1.default.parentData, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.parentData}`); - gen.var(names_1.default.parentDataProperty, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.parentDataProperty}`); - gen.var(names_1.default.rootData, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.rootData}`); - gen.var(names_1.default.isAllOfVariant, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.isAllOfVariant}`); - if (opts.dynamicRef) - gen.var(names_1.default.dynamicAnchors, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`); - }, () => { - gen.var(names_1.default.instancePath, (0, codegen_1._) `""`); - gen.var(names_1.default.parentData, (0, codegen_1._) `undefined`); - gen.var(names_1.default.parentDataProperty, (0, codegen_1._) `undefined`); - gen.var(names_1.default.rootData, names_1.default.data); - gen.var(names_1.default.isAllOfVariant, (0, codegen_1._) `0`); - if (opts.dynamicRef) - gen.var(names_1.default.dynamicAnchors, (0, codegen_1._) `{}`); - }); -} -function topSchemaObjCode(it) { - const { schema, opts, gen } = it; - validateFunction(it, () => { - if (opts.$comment && schema.$comment) - commentKeyword(it); - checkNoDefault(it); - gen.let(names_1.default.vErrors, null); - gen.let(names_1.default.errors, 0); - if (opts.unevaluated) - resetEvaluated(it); - typeAndKeywords(it); - returnResults(it); - }); - return; -} -function resetEvaluated(it) { - // TODO maybe some hook to execute it in the end to check whether props/items are Name, as in assignEvaluated - const { gen, validateName } = it; - it.evaluated = gen.const("evaluated", (0, codegen_1._) `${validateName}.evaluated`); - gen.if((0, codegen_1._) `${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._) `${it.evaluated}.props`, (0, codegen_1._) `undefined`)); - gen.if((0, codegen_1._) `${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._) `${it.evaluated}.items`, (0, codegen_1._) `undefined`)); -} -function funcSourceUrl(schema, opts) { - const schId = typeof schema == "object" && schema[opts.schemaId]; - return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._) `/*# sourceURL=${schId} */` : codegen_1.nil; -} -// schema compilation - this function is used recursively to generate code for sub-schemas -function subschemaCode(it, valid) { - if (isSchemaObj(it)) { - checkKeywords(it); - if (schemaCxtHasRules(it)) { - subSchemaObjCode(it, valid); - return; + } + /** + * Records a request-response interaction + * @param {SnapshotRequestOptions} requestOpts - Request options + * @param {SnapshotEntryResponse} response - Response data to record + * @return {Promise} - Resolves when the recording is complete + */ + async record(requestOpts, response) { + if (!this.shouldRecord(requestOpts)) { + return; } - } - (0, boolSchema_1.boolOrEmptySchema)(it, valid); -} -function schemaCxtHasRules({ schema, self }) { - if (typeof schema == "boolean") - return !schema; - for (const key in schema) - if (self.RULES.all[key]) - return true; - return false; -} -function isSchemaObj(it) { - return typeof it.schema != "boolean"; -} -function subSchemaObjCode(it, valid) { - const { schema, gen, opts } = it; - if (opts.$comment && schema.$comment) - commentKeyword(it); - updateContext(it); - checkAsyncSchema(it); - const errsCount = gen.const("_errs", names_1.default.errors); - typeAndKeywords(it, errsCount); - // TODO var - gen.var(valid, (0, codegen_1._) `${errsCount} === ${names_1.default.errors}`); -} -function checkKeywords(it) { - (0, util_1.checkUnknownRules)(it); - checkRefsAndKeywords(it); -} -function typeAndKeywords(it, errsCount) { - if (it.opts.jtd) - return schemaKeywords(it, [], false, errsCount); - const types = (0, dataType_1.getSchemaTypes)(it.schema); - const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types); - schemaKeywords(it, types, !checkedTypes, errsCount); -} -function checkRefsAndKeywords(it) { - const { schema, errSchemaPath, opts, self } = it; - if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self.RULES)) { - self.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`); - } -} -function checkNoDefault(it) { - const { schema, opts } = it; - if (schema.default !== undefined && opts.useDefaults && opts.strictSchema) { - (0, util_1.checkStrictMode)(it, "default is ignored in the schema root"); - } -} -function updateContext(it) { - const schId = it.schema[it.opts.schemaId]; - if (schId) - it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId); -} -function checkAsyncSchema(it) { - if (it.schema.$async && !it.schemaEnv.$async) - throw new Error("async schema in sync schema"); -} -function commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) { - const msg = schema.$comment; - if (opts.$comment === true) { - gen.code((0, codegen_1._) `${names_1.default.self}.logger.log(${msg})`); - } - else if (typeof opts.$comment == "function") { - const schemaPath = (0, codegen_1.str) `${errSchemaPath}/$comment`; - const rootName = gen.scopeValue("root", { ref: schemaEnv.root }); - gen.code((0, codegen_1._) `${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`); - } -} -function returnResults(it) { - const { gen, schemaEnv, validateName, ValidationError, opts } = it; - if (schemaEnv.$async) { - // TODO assign unevaluated - gen.if((0, codegen_1._) `${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._) `new ${ValidationError}(${names_1.default.vErrors})`)); - } - else { - gen.assign((0, codegen_1._) `${validateName}.errors`, names_1.default.vErrors); - if (opts.unevaluated) - assignEvaluated(it); - gen.return((0, codegen_1._) `${names_1.default.errors} === 0`); - } -} -function assignEvaluated({ gen, evaluated, props, items }) { - if (props instanceof codegen_1.Name) - gen.assign((0, codegen_1._) `${evaluated}.props`, props); - if (items instanceof codegen_1.Name) - gen.assign((0, codegen_1._) `${evaluated}.items`, items); -} -function schemaKeywords(it, types, typeErrors, errsCount) { - const { gen, schema, data, allErrors, opts, self } = it; - const { RULES } = self; - if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) { - gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition)); // TODO typecast - return; - } - if (!opts.jtd) - checkStrictTypes(it, types); - gen.block(() => { - for (const group of RULES.rules) - groupKeywords(group); - groupKeywords(RULES.post); - }); - function groupKeywords(group) { - if (!(0, applicability_1.shouldUseGroup)(schema, group)) - return; - if (group.type) { - gen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers)); - iterateKeywords(it, group); - if (types.length === 1 && types[0] === group.type && typeErrors) { - gen.else(); - (0, dataType_2.reportTypeError)(it); - } - gen.endIf(); + if (this.isUrlExcluded(requestOpts)) { + return; } - else { - iterateKeywords(it, group); + const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions); + const hash = createRequestHash(request); + const normalizedHeaders = normalizeHeaders(response.headers); + const responseData = { + statusCode: response.statusCode, + headers: filterHeadersForStorage(normalizedHeaders, this.#headerFilters, this.matchOptions), + body: Buffer.isBuffer(response.body) ? response.body.toString("base64") : Buffer.from(String(response.body || "")).toString("base64"), + trailers: response.trailers + }; + if (this.#snapshots.size >= this.#maxSnapshots && !this.#snapshots.has(hash)) { + const oldestKey = this.#snapshots.keys().next().value; + this.#snapshots.delete(oldestKey); + } + const existingSnapshot = this.#snapshots.get(hash); + if (existingSnapshot && existingSnapshot.responses) { + existingSnapshot.responses.push(responseData); + existingSnapshot.timestamp = (/* @__PURE__ */ new Date()).toISOString(); + } else { + this.#snapshots.set(hash, { + request, + responses: [responseData], + // Always store as array for consistency + callCount: 0, + timestamp: (/* @__PURE__ */ new Date()).toISOString() + }); } - // TODO make it "ok" call? - if (!allErrors) - gen.if((0, codegen_1._) `${names_1.default.errors} === ${errsCount || 0}`); - } -} -function iterateKeywords(it, group) { - const { gen, schema, opts: { useDefaults }, } = it; - if (useDefaults) - (0, defaults_1.assignDefaults)(it, group.type); - gen.block(() => { - for (const rule of group.rules) { - if ((0, applicability_1.shouldUseRule)(schema, rule) || shouldForceUnevaluatedProperties(schema, rule)) { - keywordCode(it, rule.keyword, rule.definition, group.type); - } + if (this.#autoFlush && this.#snapshotPath) { + this.#scheduleFlush(); } - }); - function shouldForceUnevaluatedProperties(schema, rule) { - return !!(rule.keyword === "unevaluatedProperties" && - (schema.properties || schema.patternProperties) && - !it.isAllOfVariant && - it.opts.defaultUnevaluatedProperties === false); - } -} -function checkStrictTypes(it, types) { - if (it.schemaEnv.meta || !it.opts.strictTypes) - return; - checkContextTypes(it, types); - if (!it.opts.allowUnionTypes) - checkMultipleTypes(it, types); - checkKeywordTypes(it, it.dataTypes); -} -function checkContextTypes(it, types) { - if (!types.length) - return; - if (!it.dataTypes.length) { - it.dataTypes = types; - return; - } - types.forEach((t) => { - if (!includesType(it.dataTypes, t)) { - strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`); + } + /** + * Checks if a URL should be excluded from recording/playback + * @param {SnapshotRequestOptions} requestOpts - Request options to check + * @returns {boolean} - True if URL is excluded + */ + isUrlExcluded(requestOpts) { + const url3 = new URL(requestOpts.path, requestOpts.origin).toString(); + return this.#isUrlExcluded(url3); + } + /** + * Finds a matching snapshot for the given request + * Returns the appropriate response based on call count for sequential responses + * + * @param {SnapshotRequestOptions} requestOpts - Request options to match + * @returns {SnapshotEntry&Record<'response', SnapshotEntryResponse>|undefined} - Matching snapshot response or undefined if not found + */ + findSnapshot(requestOpts) { + if (!this.shouldPlayback(requestOpts)) { + return void 0; + } + if (this.isUrlExcluded(requestOpts)) { + return void 0; + } + const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions); + const hash = createRequestHash(request); + const snapshot = this.#snapshots.get(hash); + if (!snapshot) return void 0; + const currentCallCount = snapshot.callCount || 0; + const responseIndex = Math.min(currentCallCount, snapshot.responses.length - 1); + snapshot.callCount = currentCallCount + 1; + return { + ...snapshot, + response: snapshot.responses[responseIndex] + }; + } + /** + * Loads snapshots from file + * @param {string} [filePath] - Optional file path to load snapshots from + * @return {Promise} - Resolves when snapshots are loaded + */ + async loadSnapshots(filePath) { + const path13 = filePath || this.#snapshotPath; + if (!path13) { + throw new InvalidArgumentError("Snapshot path is required"); } - }); - it.dataTypes = it.dataTypes.filter((t) => includesType(types, t)); -} -function checkMultipleTypes(it, ts) { - if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) { - strictTypesError(it, "use allowUnionTypes to allow union type keyword"); - } -} -function checkKeywordTypes(it, ts) { - const rules = it.self.RULES.all; - for (const keyword in rules) { - const rule = rules[keyword]; - if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) { - const { type } = rule.definition; - if (type.length && !type.some((t) => hasApplicableType(ts, t))) { - strictTypesError(it, `missing type "${type.join(",")}" for keyword "${keyword}"`); + try { + const data = await readFile(resolve8(path13), "utf8"); + const parsed = JSON.parse(data); + if (Array.isArray(parsed)) { + this.#snapshots.clear(); + for (const { hash, snapshot } of parsed) { + this.#snapshots.set(hash, snapshot); } + } else { + this.#snapshots = new Map(Object.entries(parsed)); + } + } catch (error2) { + if (error2.code === "ENOENT") { + this.#snapshots.clear(); + } else { + throw new UndiciError(`Failed to load snapshots from ${path13}`, { cause: error2 }); + } } - } -} -function hasApplicableType(schTs, kwdT) { - return schTs.includes(kwdT) || (kwdT === "number" && schTs.includes("integer")); -} -function includesType(ts, t) { - return ts.includes(t) || (t === "integer" && ts.includes("number")); -} -function strictTypesError(it, msg) { - const schemaPath = it.schemaEnv.baseId + it.errSchemaPath; - msg += ` at "${schemaPath}" (strictTypes)`; - (0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes); -} -class KeywordCxt { - constructor(it, def, keyword) { - (0, keyword_1.validateKeywordUsage)(it, def, keyword); - this.gen = it.gen; - this.allErrors = it.allErrors; - this.keyword = keyword; - this.data = it.data; - this.schema = it.schema[keyword]; - this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data; - this.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword, this.$data); - this.schemaType = def.schemaType; - this.parentSchema = it.schema; - this.params = {}; - this.it = it; - this.def = def; - if (this.$data) { - this.schemaCode = it.gen.const("vSchema", getData(this.$data, it)); + } + /** + * Saves snapshots to file + * + * @param {string} [filePath] - Optional file path to save snapshots + * @returns {Promise} - Resolves when snapshots are saved + */ + async saveSnapshots(filePath) { + const path13 = filePath || this.#snapshotPath; + if (!path13) { + throw new InvalidArgumentError("Snapshot path is required"); + } + const resolvedPath = resolve8(path13); + await mkdir(dirname7(resolvedPath), { recursive: true }); + const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({ + hash, + snapshot + })); + await writeFile(resolvedPath, JSON.stringify(data, null, 2), { flush: true }); + } + /** + * Clears all recorded snapshots + * @returns {void} + */ + clear() { + this.#snapshots.clear(); + } + /** + * Gets all recorded snapshots + * @return {Array} - Array of all recorded snapshots + */ + getSnapshots() { + return Array.from(this.#snapshots.values()); + } + /** + * Gets snapshot count + * @return {number} - Number of recorded snapshots + */ + size() { + return this.#snapshots.size; + } + /** + * Resets call counts for all snapshots (useful for test cleanup) + * @returns {void} + */ + resetCallCounts() { + for (const snapshot of this.#snapshots.values()) { + snapshot.callCount = 0; } - else { - this.schemaCode = this.schemaValue; - if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) { - throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`); - } + } + /** + * Deletes a specific snapshot by request options + * @param {SnapshotRequestOptions} requestOpts - Request options to match + * @returns {boolean} - True if snapshot was deleted, false if not found + */ + deleteSnapshot(requestOpts) { + const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions); + const hash = createRequestHash(request); + return this.#snapshots.delete(hash); + } + /** + * Gets information about a specific snapshot + * @param {SnapshotRequestOptions} requestOpts - Request options to match + * @returns {SnapshotInfo|null} - Snapshot information or null if not found + */ + getSnapshotInfo(requestOpts) { + const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions); + const hash = createRequestHash(request); + const snapshot = this.#snapshots.get(hash); + if (!snapshot) return null; + return { + hash, + request: snapshot.request, + responseCount: snapshot.responses ? snapshot.responses.length : snapshot.response ? 1 : 0, + // .response for legacy snapshots + callCount: snapshot.callCount || 0, + timestamp: snapshot.timestamp + }; + } + /** + * Replaces all snapshots with new data (full replacement) + * @param {Array<{hash: string; snapshot: SnapshotEntry}>|Record} snapshotData - New snapshot data to replace existing ones + * @returns {void} + */ + replaceSnapshots(snapshotData) { + this.#snapshots.clear(); + if (Array.isArray(snapshotData)) { + for (const { hash, snapshot } of snapshotData) { + this.#snapshots.set(hash, snapshot); + } + } else if (snapshotData && typeof snapshotData === "object") { + this.#snapshots = new Map(Object.entries(snapshotData)); } - if ("code" in def ? def.trackErrors : def.errors !== false) { - this.errsCount = it.gen.const("_errs", names_1.default.errors); + } + /** + * Starts the auto-flush timer + * @returns {void} + */ + #startAutoFlush() { + return this.#scheduleFlush(); + } + /** + * Stops the auto-flush timer + * @returns {void} + */ + #stopAutoFlush() { + if (this.#flushTimeout) { + clearTimeout2(this.#flushTimeout); + this.saveSnapshots().catch(() => { + }); + this.#flushTimeout = null; } - } - result(condition, successAction, failAction) { - this.failResult((0, codegen_1.not)(condition), successAction, failAction); - } - failResult(condition, successAction, failAction) { - this.gen.if(condition); - if (failAction) - failAction(); - else - this.error(); - if (successAction) { - this.gen.else(); - successAction(); - if (this.allErrors) - this.gen.endIf(); + } + /** + * Schedules a flush (debounced to avoid excessive writes) + */ + #scheduleFlush() { + this.#flushTimeout = setTimeout2(() => { + this.saveSnapshots().catch(() => { + }); + if (this.#autoFlush) { + this.#flushTimeout?.refresh(); + } else { + this.#flushTimeout = null; + } + }, 1e3); + } + /** + * Cleanup method to stop timers + * @returns {void} + */ + destroy() { + this.#stopAutoFlush(); + if (this.#flushTimeout) { + clearTimeout2(this.#flushTimeout); + this.#flushTimeout = null; } - else { - if (this.allErrors) - this.gen.endIf(); - else - this.gen.else(); + } + /** + * Async close method that saves all recordings and performs cleanup + * @returns {Promise} + */ + async close() { + if (this.#snapshotPath && this.#snapshots.size !== 0) { + await this.saveSnapshots(); } - } - pass(condition, failAction) { - this.failResult((0, codegen_1.not)(condition), undefined, failAction); - } - fail(condition) { - if (condition === undefined) { - this.error(); - if (!this.allErrors) - this.gen.if(false); // this branch will be removed by gen.optimize - return; + this.destroy(); + } + }; + module3.exports = { SnapshotRecorder, formatRequestKey, createRequestHash, filterHeadersForMatching, filterHeadersForStorage, createHeaderFilters }; + } +}); + +// node_modules/undici/lib/mock/snapshot-agent.js +var require_snapshot_agent = __commonJS({ + "node_modules/undici/lib/mock/snapshot-agent.js"(exports, module3) { + "use strict"; + var Agent2 = require_agent(); + var MockAgent = require_mock_agent(); + var { SnapshotRecorder } = require_snapshot_recorder(); + var WrapHandler = require_wrap_handler(); + var { InvalidArgumentError, UndiciError } = require_errors(); + var { validateSnapshotMode } = require_snapshot_utils(); + var kSnapshotRecorder = /* @__PURE__ */ Symbol("kSnapshotRecorder"); + var kSnapshotMode = /* @__PURE__ */ Symbol("kSnapshotMode"); + var kSnapshotPath = /* @__PURE__ */ Symbol("kSnapshotPath"); + var kSnapshotLoaded = /* @__PURE__ */ Symbol("kSnapshotLoaded"); + var kRealAgent = /* @__PURE__ */ Symbol("kRealAgent"); + var warningEmitted = false; + var SnapshotAgent = class extends MockAgent { + constructor(opts = {}) { + if (!warningEmitted) { + process.emitWarning( + "SnapshotAgent is experimental and subject to change", + "ExperimentalWarning" + ); + warningEmitted = true; + } + const { + mode = "record", + snapshotPath = null, + ...mockAgentOpts + } = opts; + super(mockAgentOpts); + validateSnapshotMode(mode); + if ((mode === "playback" || mode === "update") && !snapshotPath) { + throw new InvalidArgumentError(`snapshotPath is required when mode is '${mode}'`); + } + this[kSnapshotMode] = mode; + this[kSnapshotPath] = snapshotPath; + this[kSnapshotRecorder] = new SnapshotRecorder({ + snapshotPath: this[kSnapshotPath], + mode: this[kSnapshotMode], + maxSnapshots: opts.maxSnapshots, + autoFlush: opts.autoFlush, + flushInterval: opts.flushInterval, + matchHeaders: opts.matchHeaders, + ignoreHeaders: opts.ignoreHeaders, + excludeHeaders: opts.excludeHeaders, + matchBody: opts.matchBody, + matchQuery: opts.matchQuery, + caseSensitive: opts.caseSensitive, + shouldRecord: opts.shouldRecord, + shouldPlayback: opts.shouldPlayback, + excludeUrls: opts.excludeUrls + }); + this[kSnapshotLoaded] = false; + if (this[kSnapshotMode] === "record" || this[kSnapshotMode] === "update" || this[kSnapshotMode] === "playback" && opts.excludeUrls && opts.excludeUrls.length > 0) { + this[kRealAgent] = new Agent2(opts); } - this.gen.if(condition); - this.error(); - if (this.allErrors) - this.gen.endIf(); - else - this.gen.else(); - } - fail$data(condition) { - if (!this.$data) - return this.fail(condition); - const { schemaCode } = this; - this.fail((0, codegen_1._) `${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`); - } - error(append, errorParams, errorPaths) { - if (errorParams) { - this.setParams(errorParams); - this._error(append, errorPaths); - this.setParams({}); - return; - } - this._error(append, errorPaths); - } - _error(append, errorPaths) { - ; - (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths); - } - $dataError() { - (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError); - } - reset() { - if (this.errsCount === undefined) - throw new Error('add "trackErrors" to keyword definition'); - (0, errors_1.resetErrorsCount)(this.gen, this.errsCount); - } - ok(cond) { - if (!this.allErrors) - this.gen.if(cond); - } - setParams(obj, assign) { - if (assign) - Object.assign(this.params, obj); - else - this.params = obj; - } - block$data(valid, codeBlock, $dataValid = codegen_1.nil) { - this.gen.block(() => { - this.check$data(valid, $dataValid); - codeBlock(); - }); - } - check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) { - if (!this.$data) - return; - const { gen, schemaCode, schemaType, def } = this; - gen.if((0, codegen_1.or)((0, codegen_1._) `${schemaCode} === undefined`, $dataValid)); - if (valid !== codegen_1.nil) - gen.assign(valid, true); - if (schemaType.length || def.validateSchema) { - gen.elseIf(this.invalid$data()); - this.$dataError(); - if (valid !== codegen_1.nil) - gen.assign(valid, false); + if ((this[kSnapshotMode] === "playback" || this[kSnapshotMode] === "update") && this[kSnapshotPath]) { + this.loadSnapshots().catch(() => { + }); } - gen.else(); - } - invalid$data() { - const { gen, schemaCode, schemaType, def, it } = this; - return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema()); - function wrong$DataType() { - if (schemaType.length) { - /* istanbul ignore if */ - if (!(schemaCode instanceof codegen_1.Name)) - throw new Error("ajv implementation error"); - const st = Array.isArray(schemaType) ? schemaType : [schemaType]; - return (0, codegen_1._) `${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`; - } - return codegen_1.nil; + } + dispatch(opts, handler) { + handler = WrapHandler.wrap(handler); + const mode = this[kSnapshotMode]; + if (this[kSnapshotRecorder].isUrlExcluded(opts)) { + return this[kRealAgent].dispatch(opts, handler); } - function invalid$DataSchema() { - if (def.validateSchema) { - const validateSchemaRef = gen.scopeValue("validate$data", { ref: def.validateSchema }); // TODO value.code for standalone - return (0, codegen_1._) `!${validateSchemaRef}(${schemaCode})`; + if (mode === "playback" || mode === "update") { + if (!this[kSnapshotLoaded]) { + return this.#asyncDispatch(opts, handler); + } + const snapshot = this[kSnapshotRecorder].findSnapshot(opts); + if (snapshot) { + return this.#replaySnapshot(snapshot, handler); + } else if (mode === "update") { + return this.#recordAndReplay(opts, handler); + } else { + const error2 = new UndiciError(`No snapshot found for ${opts.method || "GET"} ${opts.path}`); + if (handler.onError) { + handler.onError(error2); + return; } - return codegen_1.nil; + throw error2; + } + } else if (mode === "record") { + return this.#recordAndReplay(opts, handler); } - } - subschema(appl, valid, isAllOfVariant) { - const subschema = (0, subschema_1.getSubschema)(this.it, appl); - (0, subschema_1.extendSubschemaData)(subschema, this.it, appl); - (0, subschema_1.extendSubschemaMode)(subschema, appl); - const nextContext = { - ...this.it, - ...subschema, - items: undefined, - props: undefined, - isAllOfVariant, + } + /** + * Async version of dispatch for when we need to load snapshots first + */ + async #asyncDispatch(opts, handler) { + await this.loadSnapshots(); + return this.dispatch(opts, handler); + } + /** + * Records a real request and replays the response + */ + #recordAndReplay(opts, handler) { + const responseData = { + statusCode: null, + headers: {}, + trailers: {}, + body: [] }; - subschemaCode(nextContext, valid); - return nextContext; - } - mergeEvaluated(schemaCxt, toName) { - const { it, gen } = this; - if (!it.opts.unevaluated) - return; - if (it.props !== true && schemaCxt.props !== undefined) { - it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName); + const self = this; + const recordingHandler = { + onRequestStart(controller, context2) { + return handler.onRequestStart(controller, { ...context2, history: this.history }); + }, + onRequestUpgrade(controller, statusCode, headers, socket) { + return handler.onRequestUpgrade(controller, statusCode, headers, socket); + }, + onResponseStart(controller, statusCode, headers, statusMessage) { + responseData.statusCode = statusCode; + responseData.headers = headers; + return handler.onResponseStart(controller, statusCode, headers, statusMessage); + }, + onResponseData(controller, chunk) { + responseData.body.push(chunk); + return handler.onResponseData(controller, chunk); + }, + onResponseEnd(controller, trailers) { + responseData.trailers = trailers; + const responseBody = Buffer.concat(responseData.body); + self[kSnapshotRecorder].record(opts, { + statusCode: responseData.statusCode, + headers: responseData.headers, + body: responseBody, + trailers: responseData.trailers + }).then(() => handler.onResponseEnd(controller, trailers)).catch((error2) => handler.onResponseError(controller, error2)); + } + }; + const agent = this[kRealAgent]; + return agent.dispatch(opts, recordingHandler); + } + /** + * Replays a recorded response + * + * @param {Object} snapshot - The recorded snapshot to replay. + * @param {Object} handler - The handler to call with the response data. + * @returns {void} + */ + #replaySnapshot(snapshot, handler) { + try { + const { response } = snapshot; + const controller = { + pause() { + }, + resume() { + }, + abort(reason) { + this.aborted = true; + this.reason = reason; + }, + aborted: false, + paused: false + }; + handler.onRequestStart(controller); + handler.onResponseStart(controller, response.statusCode, response.headers); + const body = Buffer.from(response.body, "base64"); + handler.onResponseData(controller, body); + handler.onResponseEnd(controller, response.trailers); + } catch (error2) { + handler.onError?.(error2); } - if (it.items !== true && schemaCxt.items !== undefined) { - it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName); + } + /** + * Loads snapshots from file + * + * @param {string} [filePath] - Optional file path to load snapshots from. + * @returns {Promise} - Resolves when snapshots are loaded. + */ + async loadSnapshots(filePath) { + await this[kSnapshotRecorder].loadSnapshots(filePath || this[kSnapshotPath]); + this[kSnapshotLoaded] = true; + if (this[kSnapshotMode] === "playback") { + this.#setupMockInterceptors(); } - } - mergeValidEvaluated(schemaCxt, valid) { - const { it, gen } = this; - if (it.opts.unevaluated && (it.props !== true || it.items !== true)) { - gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name)); - return true; + } + /** + * Saves snapshots to file + * + * @param {string} [filePath] - Optional file path to save snapshots to. + * @returns {Promise} - Resolves when snapshots are saved. + */ + async saveSnapshots(filePath) { + return this[kSnapshotRecorder].saveSnapshots(filePath || this[kSnapshotPath]); + } + /** + * Sets up MockAgent interceptors based on recorded snapshots. + * + * This method creates MockAgent interceptors for each recorded snapshot, + * allowing the SnapshotAgent to fall back to MockAgent's standard intercept + * mechanism in playback mode. Each interceptor is configured to persist + * (remain active for multiple requests) and responds with the recorded + * response data. + * + * Called automatically when loading snapshots in playback mode. + * + * @returns {void} + */ + #setupMockInterceptors() { + for (const snapshot of this[kSnapshotRecorder].getSnapshots()) { + const { request, responses, response } = snapshot; + const url3 = new URL(request.url); + const mockPool = this.get(url3.origin); + const responseData = responses ? responses[0] : response; + if (!responseData) continue; + mockPool.intercept({ + path: url3.pathname + url3.search, + method: request.method, + headers: request.headers, + body: request.body + }).reply(responseData.statusCode, responseData.body, { + headers: responseData.headers, + trailers: responseData.trailers + }).persist(); } + } + /** + * Gets the snapshot recorder + * @return {SnapshotRecorder} - The snapshot recorder instance + */ + getRecorder() { + return this[kSnapshotRecorder]; + } + /** + * Gets the current mode + * @return {import('./snapshot-utils').SnapshotMode} - The current snapshot mode + */ + getMode() { + return this[kSnapshotMode]; + } + /** + * Clears all snapshots + * @returns {void} + */ + clearSnapshots() { + this[kSnapshotRecorder].clear(); + } + /** + * Resets call counts for all snapshots (useful for test cleanup) + * @returns {void} + */ + resetCallCounts() { + this[kSnapshotRecorder].resetCallCounts(); + } + /** + * Deletes a specific snapshot by request options + * @param {import('./snapshot-recorder').SnapshotRequestOptions} requestOpts - Request options to identify the snapshot + * @return {Promise} - Returns true if the snapshot was deleted, false if not found + */ + deleteSnapshot(requestOpts) { + return this[kSnapshotRecorder].deleteSnapshot(requestOpts); + } + /** + * Gets information about a specific snapshot + * @returns {import('./snapshot-recorder').SnapshotInfo|null} - Snapshot information or null if not found + */ + getSnapshotInfo(requestOpts) { + return this[kSnapshotRecorder].getSnapshotInfo(requestOpts); + } + /** + * Replaces all snapshots with new data (full replacement) + * @param {Array<{hash: string; snapshot: import('./snapshot-recorder').SnapshotEntryshotEntry}>|Record} snapshotData - New snapshot data to replace existing snapshots + * @returns {void} + */ + replaceSnapshots(snapshotData) { + this[kSnapshotRecorder].replaceSnapshots(snapshotData); + } + /** + * Closes the agent, saving snapshots and cleaning up resources. + * + * @returns {Promise} + */ + async close() { + await this[kSnapshotRecorder].close(); + await this[kRealAgent]?.close(); + await super.close(); + } + }; + module3.exports = SnapshotAgent; + } +}); + +// node_modules/undici/lib/global.js +var require_global2 = __commonJS({ + "node_modules/undici/lib/global.js"(exports, module3) { + "use strict"; + var globalDispatcher = /* @__PURE__ */ Symbol.for("undici.globalDispatcher.1"); + var { InvalidArgumentError } = require_errors(); + var Agent2 = require_agent(); + if (getGlobalDispatcher() === void 0) { + setGlobalDispatcher(new Agent2()); + } + 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 + }); } -} -exports.KeywordCxt = KeywordCxt; -function keywordCode(it, keyword, def, ruleType) { - const cxt = new KeywordCxt(it, def, keyword); - if ("code" in def) { - def.code(cxt, ruleType); - } - else if (cxt.$data && def.validate) { - (0, keyword_1.funcKeywordCode)(cxt, def); - } - else if ("macro" in def) { - (0, keyword_1.macroKeywordCode)(cxt, def); - } - else if (def.compile || def.validate) { - (0, keyword_1.funcKeywordCode)(cxt, def); - } -} -const JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; -const RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; -function getData($data, { dataLevel, dataNames, dataPathArr }) { - let jsonPointer; - let data; - if ($data === "") - return names_1.default.rootData; - if ($data[0] === "/") { - if (!JSON_POINTER.test($data)) - throw new Error(`Invalid JSON-pointer: ${$data}`); - jsonPointer = $data; - data = names_1.default.rootData; - } - else { - const matches = RELATIVE_JSON_POINTER.exec($data); - if (!matches) - throw new Error(`Invalid JSON-pointer: ${$data}`); - const up = +matches[1]; - jsonPointer = matches[2]; - if (jsonPointer === "#") { - if (up >= dataLevel) - throw new Error(errorMsg("property/index", up)); - return dataPathArr[dataLevel - up]; + function getGlobalDispatcher() { + return globalThis[globalDispatcher]; + } + var installedExports = ( + /** @type {const} */ + [ + "fetch", + "Headers", + "Response", + "Request", + "FormData", + "WebSocket", + "CloseEvent", + "ErrorEvent", + "MessageEvent", + "EventSource" + ] + ); + module3.exports = { + setGlobalDispatcher, + getGlobalDispatcher, + installedExports + }; + } +}); + +// node_modules/undici/lib/handler/decorator-handler.js +var require_decorator_handler = __commonJS({ + "node_modules/undici/lib/handler/decorator-handler.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var WrapHandler = require_wrap_handler(); + module3.exports = class DecoratorHandler { + #handler; + #onCompleteCalled = false; + #onErrorCalled = false; + #onResponseStartCalled = false; + constructor(handler) { + if (typeof handler !== "object" || handler === null) { + throw new TypeError("handler must be an object"); + } + this.#handler = WrapHandler.wrap(handler); + } + onRequestStart(...args) { + this.#handler.onRequestStart?.(...args); + } + onRequestUpgrade(...args) { + assert(!this.#onCompleteCalled); + assert(!this.#onErrorCalled); + return this.#handler.onRequestUpgrade?.(...args); + } + onResponseStart(...args) { + assert(!this.#onCompleteCalled); + assert(!this.#onErrorCalled); + assert(!this.#onResponseStartCalled); + this.#onResponseStartCalled = true; + return this.#handler.onResponseStart?.(...args); + } + onResponseData(...args) { + assert(!this.#onCompleteCalled); + assert(!this.#onErrorCalled); + return this.#handler.onResponseData?.(...args); + } + onResponseEnd(...args) { + assert(!this.#onCompleteCalled); + assert(!this.#onErrorCalled); + this.#onCompleteCalled = true; + return this.#handler.onResponseEnd?.(...args); + } + onResponseError(...args) { + this.#onErrorCalled = true; + return this.#handler.onResponseError?.(...args); + } + /** + * @deprecated + */ + onBodySent() { + } + }; + } +}); + +// node_modules/undici/lib/handler/redirect-handler.js +var require_redirect_handler = __commonJS({ + "node_modules/undici/lib/handler/redirect-handler.js"(exports, module3) { + "use strict"; + var util = require_util(); + var { kBodyUsed } = require_symbols(); + var assert = __require("node:assert"); + var { InvalidArgumentError } = require_errors(); + var EE = __require("node:events"); + var redirectableStatusCodes = [300, 301, 302, 303, 307, 308]; + var kBody = /* @__PURE__ */ Symbol("body"); + var noop = () => { + }; + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + var RedirectHandler = class _RedirectHandler { + static buildDispatch(dispatcher, maxRedirections) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError("maxRedirections must be a positive number"); + } + const dispatch = dispatcher.dispatch.bind(dispatcher); + return (opts, originalHandler) => dispatch(opts, new _RedirectHandler(dispatch, maxRedirections, opts, originalHandler)); + } + constructor(dispatch, maxRedirections, opts, handler) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError("maxRedirections must be a positive number"); + } + this.dispatch = dispatch; + this.location = null; + const { maxRedirections: _5, ...cleanOpts } = opts; + this.opts = cleanOpts; + this.maxRedirections = maxRedirections; + this.handler = handler; + this.history = []; + if (util.isStream(this.opts.body)) { + 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") { + 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) && !util.isFormDataLike(this.opts.body)) { + this.opts.body = new BodyAsyncIterable(this.opts.body); } - if (up > dataLevel) - throw new Error(errorMsg("data", up)); - data = dataNames[dataLevel - up]; - if (!jsonPointer) - return data; - } - let expr = data; - const segments = jsonPointer.split("/"); - for (const segment of segments) { - if (segment) { - data = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`; - expr = (0, codegen_1._) `${expr} && ${data}`; + } + onRequestStart(controller, context2) { + this.handler.onRequestStart?.(controller, { ...context2, history: this.history }); + } + onRequestUpgrade(controller, statusCode, headers, socket) { + this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket); + } + onResponseStart(controller, statusCode, headers, statusMessage) { + if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { + throw new Error("max redirects"); } - } - return expr; - function errorMsg(pointerType, up) { - return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`; - } -} -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 51896: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.macroKeywordCode = macroKeywordCode; -exports.funcKeywordCode = funcKeywordCode; -exports.validSchemaType = validSchemaType; -exports.validateKeywordUsage = validateKeywordUsage; -const codegen_1 = __nccwpck_require__(34938); -const names_1 = __nccwpck_require__(34855); -const code_1 = __nccwpck_require__(9162); -const errors_1 = __nccwpck_require__(15384); -function macroKeywordCode(cxt, def) { - const { gen, keyword, schema, parentSchema, it } = cxt; - const macroSchema = def.macro.call(it.self, schema, parentSchema, it); - const schemaRef = useKeyword(gen, keyword, macroSchema); - if (it.opts.validateSchema !== false) - it.self.validateSchema(macroSchema, true); - const valid = gen.name("valid"); - cxt.subschema({ - schema: macroSchema, - schemaPath: codegen_1.nil, - errSchemaPath: `${it.errSchemaPath}/${keyword}`, - topSchemaRef: schemaRef, - compositeRule: true, - }, valid); - cxt.pass(valid, () => cxt.error(true)); -} -function funcKeywordCode(cxt, def) { - var _a; - const { gen, keyword, schema, parentSchema, $data, it } = cxt; - checkAsyncKeyword(it, def); - const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate; - const validateRef = useKeyword(gen, keyword, validate); - const valid = gen.let("valid"); - cxt.block$data(valid, validateKeyword); - cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid); - function validateKeyword() { - if (def.errors === false) { - assignValid(); - if (def.modifying) - modifyData(cxt); - reportErrs(() => cxt.error()); + if ((statusCode === 301 || statusCode === 302) && this.opts.method === "POST") { + this.opts.method = "GET"; + if (util.isStream(this.opts.body)) { + util.destroy(this.opts.body.on("error", noop)); + } + this.opts.body = null; } - else { - const ruleErrs = def.async ? validateAsync() : validateSync(); - if (def.modifying) - modifyData(cxt); - reportErrs(() => addErrs(cxt, ruleErrs)); + if (statusCode === 303 && this.opts.method !== "HEAD") { + this.opts.method = "GET"; + if (util.isStream(this.opts.body)) { + util.destroy(this.opts.body.on("error", noop)); + } + this.opts.body = null; } + this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) || redirectableStatusCodes.indexOf(statusCode) === -1 ? null : headers.location; + if (this.opts.origin) { + this.history.push(new URL(this.opts.path, this.opts.origin)); + } + if (!this.location) { + this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage); + return; + } + const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); + const path13 = search ? `${pathname}${search}` : pathname; + const redirectUrlString = `${origin}${path13}`; + for (const historyUrl of this.history) { + if (historyUrl.toString() === redirectUrlString) { + throw new InvalidArgumentError(`Redirect loop detected. Cannot redirect to ${origin}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`); + } + } + this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); + this.opts.path = path13; + this.opts.origin = origin; + this.opts.query = null; + } + onResponseData(controller, chunk) { + if (this.location) { + } else { + this.handler.onResponseData?.(controller, chunk); + } + } + onResponseEnd(controller, trailers) { + if (this.location) { + this.dispatch(this.opts, this); + } else { + this.handler.onResponseEnd(controller, trailers); + } + } + onResponseError(controller, error2) { + this.handler.onResponseError?.(controller, error2); + } + }; + 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 validateAsync() { - const ruleErrs = gen.let("ruleErrs", null); - gen.try(() => assignValid((0, codegen_1._) `await `), (e) => gen.assign(valid, false).if((0, codegen_1._) `${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._) `${e}.errors`), () => gen.throw(e))); - return ruleErrs; - } - function validateSync() { - const validateErrs = (0, codegen_1._) `${validateRef}.errors`; - gen.assign(validateErrs, null); - assignValid(codegen_1.nil); - return validateErrs; - } - function assignValid(_await = def.async ? (0, codegen_1._) `await ` : codegen_1.nil) { - const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self; - const passSchema = !(("compile" in def && !$data) || def.schema === false); - gen.assign(valid, (0, codegen_1._) `${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying); - } - function reportErrs(errors) { - var _a; - gen.if((0, codegen_1.not)((_a = def.valid) !== null && _a !== void 0 ? _a : valid), errors); - } -} -function modifyData(cxt) { - const { gen, data, it } = cxt; - gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._) `${it.parentData}[${it.parentDataProperty}]`)); -} -function addErrs(cxt, errs) { - const { gen } = cxt; - gen.if((0, codegen_1._) `Array.isArray(${errs})`, () => { - gen - .assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`) - .assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`); - (0, errors_1.extendErrors)(cxt); - }, () => cxt.error()); -} -function checkAsyncKeyword({ schemaEnv }, def) { - if (def.async && !schemaEnv.$async) - throw new Error("async keyword in sync schema"); -} -function useKeyword(gen, keyword, result) { - if (result === undefined) - throw new Error(`keyword "${keyword}" failed to compile`); - return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) }); -} -function validSchemaType(schema, schemaType, allowUndefined = false) { - // TODO add tests - return (!schemaType.length || - schemaType.some((st) => st === "array" - ? Array.isArray(schema) - : st === "object" - ? schema && typeof schema == "object" && !Array.isArray(schema) - : typeof schema == st || (allowUndefined && typeof schema == "undefined"))); -} -function validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword) { - /* istanbul ignore if */ - if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) { - throw new Error("ajv implementation error"); - } - const deps = def.dependencies; - if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) { - throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`); - } - if (def.validateSchema) { - const valid = def.validateSchema(schema[keyword]); - if (!valid) { - const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` + - self.errorsText(def.validateSchema.errors); - if (opts.validateSchema === "log") - self.logger.error(msg); - else - throw new Error(msg); + function cleanRequestHeaders(headers, removeContent, unknownOrigin) { + const ret = []; + if (Array.isArray(headers)) { + for (let i2 = 0; i2 < headers.length; i2 += 2) { + if (!shouldRemoveHeader(headers[i2], removeContent, unknownOrigin)) { + ret.push(headers[i2], headers[i2 + 1]); + } } + } else if (headers && typeof headers === "object") { + const entries = util.hasSafeIterator(headers) ? headers : Object.entries(headers); + for (const [key, value] of entries) { + if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { + ret.push(key, value); + } + } + } else { + assert(headers == null, "headers must be an object or an array"); + } + return ret; } -} -//# sourceMappingURL=keyword.js.map - -/***/ }), - -/***/ 15432: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + module3.exports = RedirectHandler; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSubschema = getSubschema; -exports.extendSubschemaData = extendSubschemaData; -exports.extendSubschemaMode = extendSubschemaMode; -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) { - if (keyword !== undefined && schema !== undefined) { - throw new Error('both "keyword" and "schema" passed, only one allowed'); - } - if (keyword !== undefined) { - const sch = it.schema[keyword]; - return schemaProp === undefined - ? { - schema: sch, - schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`, - errSchemaPath: `${it.errSchemaPath}/${keyword}`, - } - : { - schema: sch[schemaProp], - schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`, - errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`, - }; +// node_modules/undici/lib/interceptor/redirect.js +var require_redirect = __commonJS({ + "node_modules/undici/lib/interceptor/redirect.js"(exports, module3) { + "use strict"; + var RedirectHandler = require_redirect_handler(); + function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections } = {}) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { maxRedirections = defaultMaxRedirections, ...rest } = opts; + if (maxRedirections == null || maxRedirections === 0) { + return dispatch(opts, handler); + } + const dispatchOpts = { ...rest }; + const redirectHandler = new RedirectHandler(dispatch, maxRedirections, dispatchOpts, handler); + return dispatch(dispatchOpts, redirectHandler); + }; + }; } - if (schema !== undefined) { - if (schemaPath === undefined || errSchemaPath === undefined || topSchemaRef === undefined) { - throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"'); + module3.exports = createRedirectInterceptor; + } +}); + +// node_modules/undici/lib/interceptor/response-error.js +var require_response_error = __commonJS({ + "node_modules/undici/lib/interceptor/response-error.js"(exports, module3) { + "use strict"; + var DecoratorHandler = require_decorator_handler(); + var { ResponseError } = require_errors(); + var ResponseErrorHandler = class extends DecoratorHandler { + #statusCode; + #contentType; + #decoder; + #headers; + #body; + constructor(_opts, { handler }) { + super(handler); + } + #checkContentType(contentType) { + return (this.#contentType ?? "").indexOf(contentType) === 0; + } + onRequestStart(controller, context2) { + this.#statusCode = 0; + this.#contentType = null; + this.#decoder = null; + this.#headers = null; + this.#body = ""; + return super.onRequestStart(controller, context2); + } + onResponseStart(controller, statusCode, headers, statusMessage) { + this.#statusCode = statusCode; + this.#headers = headers; + this.#contentType = headers["content-type"]; + if (this.#statusCode < 400) { + return super.onResponseStart(controller, statusCode, headers, statusMessage); + } + if (this.#checkContentType("application/json") || this.#checkContentType("text/plain")) { + this.#decoder = new TextDecoder("utf-8"); + } + } + onResponseData(controller, chunk) { + if (this.#statusCode < 400) { + return super.onResponseData(controller, chunk); + } + this.#body += this.#decoder?.decode(chunk, { stream: true }) ?? ""; + } + onResponseEnd(controller, trailers) { + if (this.#statusCode >= 400) { + this.#body += this.#decoder?.decode(void 0, { stream: false }) ?? ""; + if (this.#checkContentType("application/json")) { + try { + this.#body = JSON.parse(this.#body); + } catch { + } + } + let err; + const stackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + try { + err = new ResponseError("Response Error", this.#statusCode, { + body: this.#body, + headers: this.#headers + }); + } finally { + Error.stackTraceLimit = stackTraceLimit; + } + super.onResponseError(controller, err); + } else { + super.onResponseEnd(controller, trailers); } - return { - schema, - schemaPath, - topSchemaRef, - errSchemaPath, + } + onResponseError(controller, err) { + super.onResponseError(controller, err); + } + }; + module3.exports = () => { + return (dispatch) => { + return function Intercept(opts, handler) { + return dispatch(opts, new ResponseErrorHandler(opts, { handler })); }; - } - throw new Error('either "keyword" or "schema" must be passed'); -} -function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) { - if (data !== undefined && dataProp !== undefined) { - throw new Error('both "data" and "dataProp" passed, only one allowed'); - } - const { gen } = it; - if (dataProp !== undefined) { - const { errorPath, dataPathArr, opts } = it; - const nextData = gen.let("data", (0, codegen_1._) `${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true); - dataContextProps(nextData); - subschema.errorPath = (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`; - subschema.parentDataProperty = (0, codegen_1._) `${dataProp}`; - subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty]; - } - if (data !== undefined) { - const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true); // replaceable if used once? - dataContextProps(nextData); - if (propertyName !== undefined) - subschema.propertyName = propertyName; - // TODO something is possibly wrong here with not changing parentDataProperty and not appending dataPathArr - } - if (dataTypes) - subschema.dataTypes = dataTypes; - function dataContextProps(_nextData) { - subschema.data = _nextData; - subschema.dataLevel = it.dataLevel + 1; - subschema.dataTypes = []; - it.definedProperties = new Set(); - subschema.parentData = it.data; - subschema.dataNames = [...it.dataNames, _nextData]; - } -} -function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) { - if (compositeRule !== undefined) - subschema.compositeRule = compositeRule; - if (createErrors !== undefined) - subschema.createErrors = createErrors; - if (allErrors !== undefined) - subschema.allErrors = allErrors; - subschema.jtdDiscriminator = jtdDiscriminator; // not inherited - subschema.jtdMetadata = jtdMetadata; // not inherited -} -//# sourceMappingURL=subschema.js.map - -/***/ }), - -/***/ 22589: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0; -var validate_1 = __nccwpck_require__(40857); -Object.defineProperty(exports, "KeywordCxt", ({ enumerable: true, get: function () { return validate_1.KeywordCxt; } })); -var codegen_1 = __nccwpck_require__(34938); -Object.defineProperty(exports, "_", ({ enumerable: true, get: function () { return codegen_1._; } })); -Object.defineProperty(exports, "str", ({ enumerable: true, get: function () { return codegen_1.str; } })); -Object.defineProperty(exports, "stringify", ({ enumerable: true, get: function () { return codegen_1.stringify; } })); -Object.defineProperty(exports, "nil", ({ enumerable: true, get: function () { return codegen_1.nil; } })); -Object.defineProperty(exports, "Name", ({ enumerable: true, get: function () { return codegen_1.Name; } })); -Object.defineProperty(exports, "CodeGen", ({ enumerable: true, get: function () { return codegen_1.CodeGen; } })); -const validation_error_1 = __nccwpck_require__(8324); -const ref_error_1 = __nccwpck_require__(33397); -const rules_1 = __nccwpck_require__(90450); -const compile_1 = __nccwpck_require__(5831); -const codegen_2 = __nccwpck_require__(34938); -const resolve_1 = __nccwpck_require__(95182); -const dataType_1 = __nccwpck_require__(37857); -const util_1 = __nccwpck_require__(54313); -const $dataRefSchema = __nccwpck_require__(30425); -const uri_1 = __nccwpck_require__(62070); -const defaultRegExp = (str, flags) => new RegExp(str, flags); -defaultRegExp.code = "new RegExp"; -const META_IGNORE_OPTIONS = [ - "removeAdditional", - "useDefaults", - "coerceTypes", - "defaultUnevaluatedProperties", - "defaultAdditionalProperties", -]; -const EXT_SCOPE_NAMES = new Set([ - "validate", - "serialize", - "parse", - "wrapper", - "root", - "schema", - "keyword", - "pattern", - "formats", - "validate$data", - "func", - "obj", - "Error", -]); -const removedOptions = { - errorDataPath: "", - format: "`validateFormats: false` can be used instead.", - nullable: '"nullable" keyword is supported by default.', - jsonPointers: "Deprecated jsPropertySyntax can be used instead.", - extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.", - missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.", - processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`", - sourceCode: "Use option `code: {source: true}`", - strictDefaults: "It is default now, see option `strict`.", - strictKeywords: "It is default now, see option `strict`.", - uniqueItems: '"uniqueItems" keyword is always validated.', - unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).", - cache: "Map is used as cache, schema object as key.", - serialize: "Map is used as cache, schema object as key.", - ajvErrors: "It is default now.", -}; -const deprecatedOptions = { - ignoreKeywordsWithRef: "", - jsPropertySyntax: "", - unicode: '"minLength"/"maxLength" account for unicode characters by default.', -}; -const MAX_EXPRESSION = 200; -// eslint-disable-next-line complexity -function requiredOptions(o) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0; - const s = o.strict; - const _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize; - const optimize = _optz === true || _optz === undefined ? 1 : _optz || 0; - const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp; - const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default; - return { - strictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true, - strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true, - strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : "log", - strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : "log", - strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false, - code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp }, - loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION, - loopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION, - meta: (_s = o.meta) !== null && _s !== void 0 ? _s : true, - messages: (_t = o.messages) !== null && _t !== void 0 ? _t : true, - inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true, - schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : "$id", - addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true, - validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true, - validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true, - unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true, - int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true, - uriResolver: uriResolver, + }; }; -} -class Ajv { - constructor(opts = {}) { - this.schemas = {}; - this.refs = {}; - this.formats = {}; - this._compilations = new Set(); - this._loading = {}; - this._cache = new Map(); - opts = this.opts = { ...opts, ...requiredOptions(opts) }; - const { es5, lines } = this.opts.code; - this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines }); - this.logger = getLogger(opts.logger); - const formatOpt = opts.validateFormats; - opts.validateFormats = false; - this.RULES = (0, rules_1.getRules)(); - checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED"); - checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn"); - this._metaOpts = getMetaSchemaOptions.call(this); - if (opts.formats) - addInitialFormats.call(this); - this._addVocabularies(); - this._addDefaultMetaSchema(); - if (opts.keywords) - addInitialKeywords.call(this, opts.keywords); - if (typeof opts.meta == "object") - this.addMetaSchema(opts.meta); - addInitialSchemas.call(this); - opts.validateFormats = formatOpt; - } - _addVocabularies() { - this.addKeyword("$async"); - } - _addDefaultMetaSchema() { - const { $data, meta, schemaId } = this.opts; - let _dataRefSchema = $dataRefSchema; - if (schemaId === "id") { - _dataRefSchema = { ...$dataRefSchema }; - _dataRefSchema.id = _dataRefSchema.$id; - delete _dataRefSchema.$id; - } - if (meta && $data) - this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false); - } - defaultMeta() { - const { meta, schemaId } = this.opts; - return (this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : undefined); - } - validate(schemaKeyRef, // key, ref or schema object - data // to be validated - ) { - let v; - if (typeof schemaKeyRef == "string") { - v = this.getSchema(schemaKeyRef); - if (!v) - throw new Error(`no schema with key or ref "${schemaKeyRef}"`); + } +}); + +// node_modules/undici/lib/interceptor/retry.js +var require_retry = __commonJS({ + "node_modules/undici/lib/interceptor/retry.js"(exports, module3) { + "use strict"; + var RetryHandler = require_retry_handler(); + module3.exports = (globalOpts) => { + return (dispatch) => { + return function retryInterceptor(opts, handler) { + return dispatch( + opts, + new RetryHandler( + { ...opts, retryOptions: { ...globalOpts, ...opts.retryOptions } }, + { + handler, + dispatch + } + ) + ); + }; + }; + }; + } +}); + +// node_modules/undici/lib/interceptor/dump.js +var require_dump = __commonJS({ + "node_modules/undici/lib/interceptor/dump.js"(exports, module3) { + "use strict"; + var { InvalidArgumentError, RequestAbortedError } = require_errors(); + var DecoratorHandler = require_decorator_handler(); + var DumpHandler = class extends DecoratorHandler { + #maxSize = 1024 * 1024; + #dumped = false; + #size = 0; + #controller = null; + aborted = false; + reason = false; + constructor({ maxSize, signal }, handler) { + if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) { + throw new InvalidArgumentError("maxSize must be a number greater than 0"); + } + super(handler); + this.#maxSize = maxSize ?? this.#maxSize; + } + #abort(reason) { + this.aborted = true; + this.reason = reason; + } + onRequestStart(controller, context2) { + controller.abort = this.#abort.bind(this); + this.#controller = controller; + return super.onRequestStart(controller, context2); + } + onResponseStart(controller, statusCode, headers, statusMessage) { + const contentLength = headers["content-length"]; + if (contentLength != null && contentLength > this.#maxSize) { + throw new RequestAbortedError( + `Response size (${contentLength}) larger than maxSize (${this.#maxSize})` + ); } - else { - v = this.compile(schemaKeyRef); + if (this.aborted === true) { + return true; } - const valid = v(data); - if (!("$async" in v)) - this.errors = v.errors; - return valid; - } - compile(schema, _meta) { - const sch = this._addSchema(schema, _meta); - return (sch.validate || this._compileSchemaEnv(sch)); - } - compileAsync(schema, meta) { - if (typeof this.opts.loadSchema != "function") { - throw new Error("options.loadSchema should be a function"); + return super.onResponseStart(controller, statusCode, headers, statusMessage); + } + onResponseError(controller, err) { + if (this.#dumped) { + return; } - const { loadSchema } = this.opts; - return runCompileAsync.call(this, schema, meta); - async function runCompileAsync(_schema, _meta) { - await loadMetaSchema.call(this, _schema.$schema); - const sch = this._addSchema(_schema, _meta); - return sch.validate || _compileAsync.call(this, sch); + err = this.#controller?.reason ?? err; + super.onResponseError(controller, err); + } + onResponseData(controller, chunk) { + this.#size = this.#size + chunk.length; + if (this.#size >= this.#maxSize) { + this.#dumped = true; + if (this.aborted === true) { + super.onResponseError(controller, this.reason); + } else { + super.onResponseEnd(controller, {}); + } } - async function loadMetaSchema($ref) { - if ($ref && !this.getSchema($ref)) { - await runCompileAsync.call(this, { $ref }, true); - } + return true; + } + onResponseEnd(controller, trailers) { + if (this.#dumped) { + return; } - async function _compileAsync(sch) { - try { - return this._compileSchemaEnv(sch); - } - catch (e) { - if (!(e instanceof ref_error_1.default)) - throw e; - checkLoaded.call(this, e); - await loadMissingSchema.call(this, e.missingSchema); - return _compileAsync.call(this, sch); - } + if (this.#controller.aborted === true) { + super.onResponseError(controller, this.reason); + return; } - function checkLoaded({ missingSchema: ref, missingRef }) { - if (this.refs[ref]) { - throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`); - } + super.onResponseEnd(controller, 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, signal: opts.signal }, handler); + return dispatch(opts, dumpHandler); + }; + }; + } + module3.exports = createDumpInterceptor; + } +}); + +// node_modules/undici/lib/interceptor/dns.js +var require_dns = __commonJS({ + "node_modules/undici/lib/interceptor/dns.js"(exports, module3) { + "use strict"; + var { isIP } = __require("node:net"); + var { lookup } = __require("node:dns"); + var DecoratorHandler = require_decorator_handler(); + var { InvalidArgumentError, InformationalError } = require_errors(); + var maxInt = Math.pow(2, 31) - 1; + function hasSafeIterator(headers) { + const prototype = Object.getPrototypeOf(headers); + const ownIterator = Object.prototype.hasOwnProperty.call(headers, Symbol.iterator); + return ownIterator || prototype != null && prototype !== Object.prototype && typeof headers[Symbol.iterator] === "function"; + } + function isHostHeader(key) { + return typeof key === "string" && key.toLowerCase() === "host"; + } + function normalizeHeaders(headers) { + if (headers == null) { + return null; + } + if (Array.isArray(headers)) { + if (headers.length === 0 || !Array.isArray(headers[0])) { + return headers; } - async function loadMissingSchema(ref) { - const _schema = await _loadSchema.call(this, ref); - if (!this.refs[ref]) - await loadMetaSchema.call(this, _schema.$schema); - if (!this.refs[ref]) - this.addSchema(_schema, ref, meta); + const normalized = []; + for (const header of headers) { + if (Array.isArray(header) && header.length === 2) { + normalized.push(header[0], header[1]); + } else { + normalized.push(header); + } } - async function _loadSchema(ref) { - const p = this._loading[ref]; - if (p) - return p; - try { - return await (this._loading[ref] = loadSchema(ref)); - } - finally { - delete this._loading[ref]; - } + return normalized; + } + if (typeof headers === "object" && hasSafeIterator(headers)) { + const normalized = []; + for (const header of headers) { + if (Array.isArray(header) && header.length === 2) { + normalized.push(header[0], header[1]); + } else { + normalized.push(header); + } } + return normalized; + } + return headers; } - // Adds schema to the instance - addSchema(schema, // If array is passed, `key` will be ignored - key, // Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. - _meta, // true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. - _validateSchema = this.opts.validateSchema // false to skip schema validation. Used internally, option validateSchema should be used instead. - ) { - if (Array.isArray(schema)) { - for (const sch of schema) - this.addSchema(sch, undefined, _meta, _validateSchema); - return this; - } - let id; - if (typeof schema === "object") { - const { schemaId } = this.opts; - id = schema[schemaId]; - if (id !== undefined && typeof id != "string") { - throw new Error(`schema ${schemaId} must be string`); - } + function hasHostHeader(headers) { + if (headers == null) { + return false; + } + if (Array.isArray(headers)) { + if (headers.length === 0) { + return false; } - key = (0, resolve_1.normalizeId)(key || id); - this._checkUnique(key); - this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true); - return this; - } - // Add schema that will be used to validate other schemas - // options in META_IGNORE_OPTIONS are alway set to false - addMetaSchema(schema, key, // schema key - _validateSchema = this.opts.validateSchema // false to skip schema validation, can be used to override validateSchema option for meta-schema - ) { - this.addSchema(schema, key, true, _validateSchema); - return this; - } - // Validate schema against its meta-schema - validateSchema(schema, throwOrLogError) { - if (typeof schema == "boolean") + for (let i2 = 0; i2 < headers.length; i2 += 2) { + if (isHostHeader(headers[i2])) { return true; - let $schema; - $schema = schema.$schema; - if ($schema !== undefined && typeof $schema != "string") { - throw new Error("$schema must be a string"); + } } - $schema = $schema || this.opts.defaultMeta || this.defaultMeta(); - if (!$schema) { - this.logger.warn("meta-schema not available"); - this.errors = null; + return false; + } + if (typeof headers === "object") { + for (const key in headers) { + if (isHostHeader(key)) { return true; + } } - const valid = this.validate($schema, schema); - if (!valid && throwOrLogError) { - const message = "schema is invalid: " + this.errorsText(); - if (this.opts.validateSchema === "log") - this.logger.error(message); - else - throw new Error(message); - } - return valid; + } + return false; } - // Get compiled schema by `key` or `ref`. - // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id) - getSchema(keyRef) { - let sch; - while (typeof (sch = getSchEnv.call(this, keyRef)) == "string") - keyRef = sch; - if (sch === undefined) { - const { schemaId } = this.opts; - const root = new compile_1.SchemaEnv({ schema: {}, schemaId }); - sch = compile_1.resolveSchema.call(this, root, keyRef); - if (!sch) - return; - this.refs[keyRef] = sch; - } - return (sch.validate || this._compileSchemaEnv(sch)); + function withHostHeader(host, headers) { + const normalizedHeaders = normalizeHeaders(headers); + if (hasHostHeader(normalizedHeaders)) { + return normalizedHeaders; + } + if (Array.isArray(normalizedHeaders)) { + return ["host", host, ...normalizedHeaders]; + } + if (normalizedHeaders && typeof normalizedHeaders === "object") { + return { + host, + ...normalizedHeaders + }; + } + return { host }; } - // Remove cached schema(s). - // If no parameter is passed all schemas but meta-schemas are removed. - // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. - // Even if schema is referenced by other schemas it still can be removed as other schemas have local references. - removeSchema(schemaKeyRef) { - if (schemaKeyRef instanceof RegExp) { - this._removeAllSchemas(this.schemas, schemaKeyRef); - this._removeAllSchemas(this.refs, schemaKeyRef); - return this; + var DNSStorage = class { + #maxItems = 0; + #records = /* @__PURE__ */ new Map(); + constructor(opts) { + this.#maxItems = opts.maxItems; + } + get size() { + return this.#records.size; + } + get(hostname) { + return this.#records.get(hostname) ?? null; + } + set(hostname, records) { + this.#records.set(hostname, records); + } + delete(hostname) { + this.#records.delete(hostname); + } + // Delegate to storage decide can we do more lookups or not + full() { + return this.size >= this.#maxItems; + } + }; + var DNSInstance = class { + #maxTTL = 0; + #maxItems = 0; + dualStack = true; + affinity = null; + lookup = null; + pick = null; + storage = 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; + this.storage = opts.storage ?? new DNSStorage(opts); + } + runLookup(origin, opts, cb) { + const ips = this.storage.get(origin.hostname); + if (ips == null && this.storage.full()) { + cb(null, origin); + return; } - switch (typeof schemaKeyRef) { - case "undefined": - this._removeAllSchemas(this.schemas); - this._removeAllSchemas(this.refs); - this._cache.clear(); - return this; - case "string": { - const sch = getSchEnv.call(this, schemaKeyRef); - if (typeof sch == "object") - this._cache.delete(sch.schema); - delete this.schemas[schemaKeyRef]; - delete this.refs[schemaKeyRef]; - return this; - } - case "object": { - const cacheKey = schemaKeyRef; - this._cache.delete(cacheKey); - let id = schemaKeyRef[this.opts.schemaId]; - if (id) { - id = (0, resolve_1.normalizeId)(id); - delete this.schemas[id]; - delete this.refs[id]; - } - return this; + 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.storage.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 = ""; } - default: - throw new Error("ajv.removeSchema: invalid parameter"); + cb( + null, + new URL(`${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`) + ); + }); + } else { + const ip = this.pick( + origin, + ips, + newOpts.affinity + ); + if (ip == null) { + this.storage.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, + new URL(`${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`) + ); } - } - // add "vocabulary" - a collection of keywords - addVocabulary(definitions) { - for (const def of definitions) - this.addKeyword(def); - return this; - } - addKeyword(kwdOrDef, def // deprecated - ) { - let keyword; - if (typeof kwdOrDef == "string") { - keyword = kwdOrDef; - if (typeof def == "object") { - this.logger.warn("these parameters are deprecated, see docs for addKeyword"); - def.keyword = keyword; + } + #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); } - } - else if (typeof kwdOrDef == "object" && def === undefined) { - def = kwdOrDef; - keyword = def.keyword; - if (Array.isArray(keyword) && !keyword.length) { - throw new Error("addKeywords: keyword must be string or non-empty array"); + 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]; } - else { - throw new Error("invalid addKeywords parameters"); - } - checkKeyword.call(this, keyword, def); - if (!def) { - (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd)); - return this; + if (family == null || family.ips.length === 0) { + return ip; } - keywordMetaschema.call(this, def); - const definition = { - ...def, - type: (0, dataType_1.getJSONTypes)(def.type), - schemaType: (0, dataType_1.getJSONTypes)(def.schemaType), - }; - (0, util_1.eachItem)(keyword, definition.type.length === 0 - ? (k) => addRule.call(this, k, definition) - : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t))); - return this; - } - getKeyword(keyword) { - const rule = this.RULES.all[keyword]; - return typeof rule == "object" ? rule.definition : !!rule; - } - // Remove keyword - removeKeyword(keyword) { - // TODO return type should be Ajv - const { RULES } = this; - delete RULES.keywords[keyword]; - delete RULES.all[keyword]; - for (const group of RULES.rules) { - const i = group.rules.findIndex((rule) => rule.keyword === keyword); - if (i >= 0) - group.rules.splice(i, 1); + if (family.offset == null || family.offset === maxInt) { + family.offset = 0; + } else { + family.offset++; } - return this; - } - // Add format - addFormat(name, format) { - if (typeof format == "string") - format = new RegExp(format); - this.formats[name] = format; - return this; - } - errorsText(errors = this.errors, // optional array of validation errors - { separator = ", ", dataVar = "data" } = {} // optional options with properties `separator` and `dataVar` - ) { - if (!errors || errors.length === 0) - return "No errors"; - return errors - .map((e) => `${dataVar}${e.instancePath} ${e.message}`) - .reduce((text, msg) => text + separator + msg); - } - $dataMetaSchema(metaSchema, keywordsJsonPointers) { - const rules = this.RULES.all; - metaSchema = JSON.parse(JSON.stringify(metaSchema)); - for (const jsonPointer of keywordsJsonPointers) { - const segments = jsonPointer.split("/").slice(1); // first segment is an empty string - let keywords = metaSchema; - for (const seg of segments) - keywords = keywords[seg]; - for (const key in rules) { - const rule = rules[key]; - if (typeof rule != "object") - continue; - const { $data } = rule.definition; - const schema = keywords[key]; - if ($data && schema) - keywords[key] = schemaOrData(schema); - } + const position = family.offset % family.ips.length; + ip = family.ips[position] ?? null; + if (ip == null) { + return ip; } - return metaSchema; - } - _removeAllSchemas(schemas, regex) { - for (const keyRef in schemas) { - const sch = schemas[keyRef]; - if (!regex || regex.test(keyRef)) { - if (typeof sch == "string") { - delete schemas[keyRef]; - } - else if (sch && !sch.meta) { - this._cache.delete(sch.schema); - delete schemas[keyRef]; - } - } + if (Date.now() - ip.timestamp > ip.ttl) { + family.ips.splice(position, 1); + return this.pick(origin, hostnameRecords, affinity); } - } - _addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) { - let id; - const { schemaId } = this.opts; - if (typeof schema == "object") { - id = schema[schemaId]; + return ip; + } + pickFamily(origin, ipFamily) { + const records = this.storage.get(origin.hostname)?.records; + if (!records) { + return null; } - else { - if (this.opts.jtd) - throw new Error("schema must be object"); - else if (typeof schema != "boolean") - throw new Error("schema must be object or boolean"); - } - let sch = this._cache.get(schema); - if (sch !== undefined) - return sch; - baseId = (0, resolve_1.normalizeId)(id || baseId); - const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId); - sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs }); - this._cache.set(sch.schema, sch); - if (addSchema && !baseId.startsWith("#")) { - // TODO atm it is allowed to overwrite schemas without id (instead of not adding them) - if (baseId) - this._checkUnique(baseId); - this.refs[baseId] = sch; + const family = records[ipFamily]; + if (!family) { + return null; } - if (validateSchema) - this.validateSchema(schema, true); - return sch; - } - _checkUnique(id) { - if (this.schemas[id] || this.refs[id]) { - throw new Error(`schema with key or id "${id}" already exists`); + if (family.offset == null || family.offset === maxInt) { + family.offset = 0; + } else { + family.offset++; + } + const position = family.offset % family.ips.length; + const ip = family.ips[position] ?? null; + if (ip == null) { + return ip; + } + if (Date.now() - ip.timestamp > ip.ttl) { + family.ips.splice(position, 1); + } + return ip; + } + setRecords(origin, addresses) { + const timestamp2 = Date.now(); + const records = { records: { 4: null, 6: null } }; + let minTTL = this.#maxTTL; + for (const record of addresses) { + record.timestamp = timestamp2; + if (typeof record.ttl === "number") { + record.ttl = Math.min(record.ttl, this.#maxTTL); + minTTL = Math.min(minTTL, record.ttl); + } else { + record.ttl = this.#maxTTL; + } + const familyRecords = records.records[record.family] ?? { ips: [] }; + familyRecords.ips.push(record); + records.records[record.family] = familyRecords; } - } - _compileSchemaEnv(sch) { - if (sch.meta) - this._compileMetaSchema(sch); - else - compile_1.compileSchema.call(this, sch); - /* istanbul ignore if */ - if (!sch.validate) - throw new Error("ajv implementation error"); - return sch.validate; - } - _compileMetaSchema(sch) { - const currentOpts = this.opts; - this.opts = this._metaOpts; - try { - compile_1.compileSchema.call(this, sch); + this.storage.set(origin.hostname, records, { ttl: minTTL }); + } + deleteRecords(origin) { + this.storage.delete(origin.hostname); + } + getHandler(meta, opts) { + return new DNSDispatchHandler(this, meta, opts); + } + }; + var DNSDispatchHandler = class extends DecoratorHandler { + #state = null; + #opts = null; + #dispatch = null; + #origin = null; + #controller = null; + #newOrigin = null; + #firstTry = true; + constructor(state, { origin, handler, dispatch, newOrigin }, opts) { + super(handler); + this.#origin = origin; + this.#newOrigin = newOrigin; + this.#opts = { ...opts }; + this.#state = state; + this.#dispatch = dispatch; + } + onResponseError(controller, err) { + switch (err.code) { + case "ETIMEDOUT": + case "ECONNREFUSED": { + if (this.#state.dualStack) { + if (!this.#firstTry) { + super.onResponseError(controller, err); + return; + } + this.#firstTry = false; + const otherFamily = this.#newOrigin.hostname[0] === "[" ? 4 : 6; + const ip = this.#state.pickFamily(this.#origin, otherFamily); + if (ip == null) { + super.onResponseError(controller, err); + return; + } + let port; + if (typeof ip.port === "number") { + port = `:${ip.port}`; + } else if (this.#origin.port !== "") { + port = `:${this.#origin.port}`; + } else { + port = ""; + } + const dispatchOpts = { + ...this.#opts, + origin: `${this.#origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`, + headers: withHostHeader(this.#origin.host, this.#opts.headers) + }; + this.#dispatch(dispatchOpts, this); + return; + } + super.onResponseError(controller, err); + break; + } + case "ENOTFOUND": + this.#state.deleteRecords(this.#origin); + super.onResponseError(controller, err); + break; + default: + super.onResponseError(controller, err); + break; } - finally { - this.opts = currentOpts; + } + }; + module3.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"); + } + if (interceptorOpts?.storage != null && (typeof interceptorOpts?.storage?.get !== "function" || typeof interceptorOpts?.storage?.set !== "function" || typeof interceptorOpts?.storage?.full !== "function" || typeof interceptorOpts?.storage?.delete !== "function")) { + throw new InvalidArgumentError("Invalid storage. Must be a object with methods: { get, set, full, delete }"); + } + const dualStack = interceptorOpts?.dualStack ?? true; + let affinity; + if (dualStack) { + affinity = interceptorOpts?.affinity ?? null; + } else { + affinity = interceptorOpts?.affinity ?? 4; + } + const opts = { + maxTTL: interceptorOpts?.maxTTL ?? 1e4, + // Expressed in ms + lookup: interceptorOpts?.lookup ?? null, + pick: interceptorOpts?.pick ?? null, + dualStack, + affinity, + maxItems: interceptorOpts?.maxItems ?? Infinity, + storage: interceptorOpts?.storage + }; + 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.onResponseError(null, err); + } + const dispatchOpts = { + ...origDispatchOpts, + servername: origin.hostname, + // For SNI on TLS + origin: newOrigin.origin, + headers: withHostHeader(origin.host, origDispatchOpts.headers) + }; + dispatch( + dispatchOpts, + instance.getHandler( + { origin, dispatch, handler, newOrigin }, + origDispatchOpts + ) + ); + }); + return true; + }; + }; + }; + } +}); + +// node_modules/undici/lib/util/cache.js +var require_cache = __commonJS({ + "node_modules/undici/lib/util/cache.js"(exports, module3) { + "use strict"; + var { + safeHTTPMethods, + pathHasQueryOrFragment, + hasSafeIterator + } = require_util(); + var { serializePathWithQuery } = require_util(); + function makeCacheKey(opts) { + if (!opts.origin) { + throw new Error("opts.origin is undefined"); + } + let fullPath = opts.path || "/"; + if (opts.query && !pathHasQueryOrFragment(opts.path)) { + fullPath = serializePathWithQuery(fullPath, opts.query); + } + return { + origin: opts.origin.toString(), + method: opts.method, + path: fullPath, + headers: opts.headers + }; + } + function normalizeHeaders(opts) { + let headers; + if (opts.headers == null) { + headers = {}; + } else if (typeof opts.headers === "object") { + headers = {}; + if (hasSafeIterator(opts.headers)) { + for (const x3 of opts.headers) { + if (!Array.isArray(x3)) { + throw new Error("opts.headers is not a valid header map"); + } + const [key, val] = x3; + if (typeof key !== "string" || typeof val !== "string") { + throw new Error("opts.headers is not a valid header map"); + } + headers[key.toLowerCase()] = val; + } + } else { + for (const key of Object.keys(opts.headers)) { + headers[key.toLowerCase()] = opts.headers[key]; + } } + } else { + throw new Error("opts.headers is not an object"); + } + return headers; } -} -Ajv.ValidationError = validation_error_1.default; -Ajv.MissingRefError = ref_error_1.default; -exports["default"] = Ajv; -function checkOptions(checkOpts, options, msg, log = "error") { - for (const key in checkOpts) { - const opt = key; - if (opt in options) - this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`); - } -} -function getSchEnv(keyRef) { - keyRef = (0, resolve_1.normalizeId)(keyRef); // TODO tests fail without this line - return this.schemas[keyRef] || this.refs[keyRef]; -} -function addInitialSchemas() { - const optsSchemas = this.opts.schemas; - if (!optsSchemas) - return; - if (Array.isArray(optsSchemas)) - this.addSchema(optsSchemas); - else - for (const key in optsSchemas) - this.addSchema(optsSchemas[key], key); -} -function addInitialFormats() { - for (const name in this.opts.formats) { - const format = this.opts.formats[name]; - if (format) - this.addFormat(name, format); - } -} -function addInitialKeywords(defs) { - if (Array.isArray(defs)) { - this.addVocabulary(defs); - return; - } - this.logger.warn("keywords option as map is deprecated, pass array"); - for (const keyword in defs) { - const def = defs[keyword]; - if (!def.keyword) - def.keyword = keyword; - this.addKeyword(def); - } -} -function getMetaSchemaOptions() { - const metaOpts = { ...this.opts }; - for (const opt of META_IGNORE_OPTIONS) - delete metaOpts[opt]; - return metaOpts; -} -const noLogs = { log() { }, warn() { }, error() { } }; -function getLogger(logger) { - if (logger === false) - return noLogs; - if (logger === undefined) - return console; - if (logger.log && logger.warn && logger.error) - return logger; - throw new Error("logger must implement log, warn and error methods"); -} -const KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i; -function checkKeyword(keyword, def) { - const { RULES } = this; - (0, util_1.eachItem)(keyword, (kwd) => { - if (RULES.keywords[kwd]) - throw new Error(`Keyword ${kwd} is already defined`); - if (!KEYWORD_NAME.test(kwd)) - throw new Error(`Keyword ${kwd} has invalid name`); - }); - if (!def) - return; - if (def.$data && !("code" in def || "validate" in def)) { - throw new Error('$data keyword must have "code" or "validate" function'); + function assertCacheKey(key) { + if (typeof key !== "object") { + throw new TypeError(`expected key to be object, got ${typeof key}`); + } + for (const property of ["origin", "method", "path"]) { + if (typeof key[property] !== "string") { + throw new TypeError(`expected key.${property} to be string, got ${typeof key[property]}`); + } + } + if (key.headers !== void 0 && typeof key.headers !== "object") { + throw new TypeError(`expected headers to be object, got ${typeof key}`); + } } -} -function addRule(keyword, definition, dataType) { - var _a; - const post = definition === null || definition === void 0 ? void 0 : definition.post; - if (dataType && post) - throw new Error('keyword with "post" flag cannot have "type"'); - const { RULES } = this; - let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType); - if (!ruleGroup) { - ruleGroup = { type: dataType, rules: [] }; - RULES.rules.push(ruleGroup); + function assertCacheValue(value) { + if (typeof value !== "object") { + throw new TypeError(`expected value to be object, got ${typeof value}`); + } + for (const property of ["statusCode", "cachedAt", "staleAt", "deleteAt"]) { + if (typeof value[property] !== "number") { + throw new TypeError(`expected value.${property} to be number, got ${typeof value[property]}`); + } + } + if (typeof value.statusMessage !== "string") { + throw new TypeError(`expected value.statusMessage to be string, got ${typeof value.statusMessage}`); + } + if (value.headers != null && typeof value.headers !== "object") { + throw new TypeError(`expected value.rawHeaders to be object, got ${typeof value.headers}`); + } + if (value.vary !== void 0 && typeof value.vary !== "object") { + throw new TypeError(`expected value.vary to be object, got ${typeof value.vary}`); + } + if (value.etag !== void 0 && typeof value.etag !== "string") { + throw new TypeError(`expected value.etag to be string, got ${typeof value.etag}`); + } } - RULES.keywords[keyword] = true; - if (!definition) - return; - const rule = { - keyword, - definition: { - ...definition, - type: (0, dataType_1.getJSONTypes)(definition.type), - schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType), - }, - }; - if (definition.before) - addBeforeRule.call(this, ruleGroup, rule, definition.before); - else - ruleGroup.rules.push(rule); - RULES.all[keyword] = rule; - (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd)); -} -function addBeforeRule(ruleGroup, rule, before) { - const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before); - if (i >= 0) { - ruleGroup.rules.splice(i, 0, rule); + function parseCacheControlHeader(header) { + const output = {}; + let directives; + if (Array.isArray(header)) { + directives = []; + for (const directive of header) { + directives.push(...directive.split(",")); + } + } else { + directives = header.split(","); + } + for (let i2 = 0; i2 < directives.length; i2++) { + const directive = directives[i2].toLowerCase(); + const keyValueDelimiter = directive.indexOf("="); + let key; + let value; + if (keyValueDelimiter !== -1) { + key = directive.substring(0, keyValueDelimiter).trimStart(); + value = directive.substring(keyValueDelimiter + 1); + } else { + key = directive.trim(); + } + switch (key) { + case "min-fresh": + case "max-stale": + case "max-age": + case "s-maxage": + case "stale-while-revalidate": + case "stale-if-error": { + if (value === void 0 || value[0] === " ") { + continue; + } + if (value.length >= 2 && value[0] === '"' && value[value.length - 1] === '"') { + value = value.substring(1, value.length - 1); + } + const parsedValue = parseInt(value, 10); + if (parsedValue !== parsedValue) { + continue; + } + if (key === "max-age" && key in output && output[key] >= parsedValue) { + continue; + } + output[key] = parsedValue; + break; + } + case "private": + case "no-cache": { + if (value) { + if (value[0] === '"') { + const headers = [value.substring(1)]; + let foundEndingQuote = value[value.length - 1] === '"'; + if (!foundEndingQuote) { + for (let j3 = i2 + 1; j3 < directives.length; j3++) { + const nextPart = directives[j3]; + const nextPartLength = nextPart.length; + headers.push(nextPart.trim()); + if (nextPartLength !== 0 && nextPart[nextPartLength - 1] === '"') { + foundEndingQuote = true; + break; + } + } + } + if (foundEndingQuote) { + let lastHeader = headers[headers.length - 1]; + if (lastHeader[lastHeader.length - 1] === '"') { + lastHeader = lastHeader.substring(0, lastHeader.length - 1); + headers[headers.length - 1] = lastHeader; + } + if (key in output) { + output[key] = output[key].concat(headers); + } else { + output[key] = headers; + } + } + } else { + if (key in output) { + output[key] = output[key].concat(value); + } else { + output[key] = [value]; + } + } + break; + } + } + // eslint-disable-next-line no-fallthrough + case "public": + case "no-store": + case "must-revalidate": + case "proxy-revalidate": + case "immutable": + case "no-transform": + case "must-understand": + case "only-if-cached": + if (value) { + continue; + } + output[key] = true; + break; + default: + continue; + } + } + return output; } - else { - ruleGroup.rules.push(rule); - this.logger.warn(`rule ${before} is not defined`); + function parseVaryHeader(varyHeader, headers) { + if (typeof varyHeader === "string" && varyHeader.includes("*")) { + return headers; + } + const output = ( + /** @type {Record} */ + {} + ); + const varyingHeaders = typeof varyHeader === "string" ? varyHeader.split(",") : varyHeader; + for (const header of varyingHeaders) { + const trimmedHeader = header.trim().toLowerCase(); + output[trimmedHeader] = headers[trimmedHeader] ?? null; + } + return output; } -} -function keywordMetaschema(def) { - let { metaSchema } = def; - if (metaSchema === undefined) - return; - if (def.$data && this.opts.$data) - metaSchema = schemaOrData(metaSchema); - def.validateSchema = this.compile(metaSchema, true); -} -const $dataRef = { - $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", -}; -function schemaOrData(schema) { - return { anyOf: [schema, $dataRef] }; -} -//# sourceMappingURL=core.js.map - -/***/ }), - -/***/ 38517: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports["default"] = addMetaSchema2020; -const metaSchema = __nccwpck_require__(78691); -const applicator = __nccwpck_require__(3257); -const unevaluated = __nccwpck_require__(70392); -const content = __nccwpck_require__(3002); -const core = __nccwpck_require__(24630); -const format = __nccwpck_require__(5947); -const metadata = __nccwpck_require__(96970); -const validation = __nccwpck_require__(71526); -const META_SUPPORT_DATA = ["/properties"]; -function addMetaSchema2020($data) { - ; - [ - metaSchema, - applicator, - unevaluated, - content, - core, - with$data(this, format), - metadata, - with$data(this, validation), - ].forEach((sch) => this.addMetaSchema(sch, undefined, false)); - return this; - function with$data(ajv, sch) { - return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch; + function isEtagUsable(etag) { + if (etag.length <= 2) { + return false; + } + if (etag[0] === '"' && etag[etag.length - 1] === '"') { + return !(etag[1] === '"' || etag.startsWith('"W/')); + } + if (etag.startsWith('W/"') && etag[etag.length - 1] === '"') { + return etag.length !== 4; + } + return false; } -} -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 23903: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -// https://github.com/ajv-validator/ajv/issues/889 -const equal = __nccwpck_require__(28206); -equal.code = 'require("ajv/dist/runtime/equal").default'; -exports["default"] = equal; -//# sourceMappingURL=equal.js.map - -/***/ }), - -/***/ 32862: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports["default"] = ucs2length; -// https://mathiasbynens.be/notes/javascript-encoding -// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode -function ucs2length(str) { - const len = str.length; - let length = 0; - let pos = 0; - let value; - while (pos < len) { - length++; - value = str.charCodeAt(pos++); - if (value >= 0xd800 && value <= 0xdbff && pos < len) { - // high surrogate, and there is a next character - value = str.charCodeAt(pos); - if ((value & 0xfc00) === 0xdc00) - pos++; // low surrogate + function assertCacheStore(store, name = "CacheStore") { + if (typeof store !== "object" || store === null) { + throw new TypeError(`expected type of ${name} to be a CacheStore, got ${store === null ? "null" : typeof store}`); + } + for (const fn of ["get", "createWriteStream", "delete"]) { + if (typeof store[fn] !== "function") { + throw new TypeError(`${name} needs to have a \`${fn}()\` function`); } + } } - return length; -} -ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default'; -//# sourceMappingURL=ucs2length.js.map - -/***/ }), - -/***/ 62070: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const uri = __nccwpck_require__(99723); -uri.code = 'require("ajv/dist/runtime/uri").default'; -exports["default"] = uri; -//# sourceMappingURL=uri.js.map - -/***/ }), - -/***/ 8324: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -class ValidationError extends Error { - constructor(errors) { - super("validation failed"); - this.errors = errors; - this.ajv = this.validation = true; - } -} -exports["default"] = ValidationError; -//# sourceMappingURL=validation_error.js.map - -/***/ }), - -/***/ 36567: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.validateAdditionalItems = validateAdditionalItems; -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const error = { - message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`, - params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`, -}; -const def = { - keyword: "additionalItems", - type: "array", - schemaType: ["boolean", "object"], - before: "uniqueItems", - error, - code(cxt) { - const { parentSchema, it } = cxt; - const { items } = parentSchema; - if (!Array.isArray(items)) { - (0, util_1.checkStrictMode)(it, '"additionalItems" is ignored when "items" is not an array of schemas'); - return; + function assertCacheMethods(methods, name = "CacheMethods") { + if (!Array.isArray(methods)) { + throw new TypeError(`expected type of ${name} needs to be an array, got ${methods === null ? "null" : typeof methods}`); + } + if (methods.length === 0) { + throw new TypeError(`${name} needs to have at least one method`); + } + for (const method of methods) { + if (!safeHTTPMethods.includes(method)) { + throw new TypeError(`element of ${name}-array needs to be one of following values: ${safeHTTPMethods.join(", ")}, got ${method}`); } - validateAdditionalItems(cxt, items); - }, -}; -function validateAdditionalItems(cxt, items) { - const { gen, schema, data, keyword, it } = cxt; - it.items = true; - const len = gen.const("len", (0, codegen_1._) `${data}.length`); - if (schema === false) { - cxt.setParams({ len: items.length }); - cxt.pass((0, codegen_1._) `${len} <= ${items.length}`); - } - else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) { - const valid = gen.var("valid", (0, codegen_1._) `${len} <= ${items.length}`); // TODO var - gen.if((0, codegen_1.not)(valid), () => validateItems(valid)); - cxt.ok(valid); - } - function validateItems(valid) { - gen.forRange("i", items.length, len, (i) => { - cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid); - if (!it.allErrors) - gen.if((0, codegen_1.not)(valid), () => gen.break()); - }); + } } -} -exports["default"] = def; -//# sourceMappingURL=additionalItems.js.map - -/***/ }), - -/***/ 39208: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + function makeDeduplicationKey(cacheKey, excludeHeaders) { + let key = `${cacheKey.origin}:${cacheKey.method}:${cacheKey.path}`; + if (cacheKey.headers) { + const sortedHeaders = Object.keys(cacheKey.headers).sort(); + for (const header of sortedHeaders) { + if (excludeHeaders?.has(header.toLowerCase())) { + continue; + } + const value = cacheKey.headers[header]; + key += `:${header}=${Array.isArray(value) ? value.join(",") : value}`; + } + } + return key; + } + module3.exports = { + makeCacheKey, + normalizeHeaders, + assertCacheKey, + assertCacheValue, + parseCacheControlHeader, + parseVaryHeader, + isEtagUsable, + assertCacheMethods, + assertCacheStore, + makeDeduplicationKey + }; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -const code_1 = __nccwpck_require__(9162); -const codegen_1 = __nccwpck_require__(34938); -const names_1 = __nccwpck_require__(34855); -const util_1 = __nccwpck_require__(54313); -const error = { - message: "must NOT have additional properties", - params: ({ params }) => (0, codegen_1._) `{additionalProperty: ${params.additionalProperty}}`, -}; -const def = { - keyword: "additionalProperties", - type: ["object"], - schemaType: ["boolean", "object"], - allowUndefined: true, - trackErrors: true, - error, - code(cxt) { - const { gen, parentSchema, data, errsCount, it } = cxt; - const { schema = it.opts.defaultAdditionalProperties } = cxt; - /* istanbul ignore if */ - if (!errsCount) - throw new Error("ajv implementation error"); - const { allErrors, opts } = it; - it.props = true; - if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it, schema)) - return; - const props = (0, code_1.allSchemaProperties)(parentSchema.properties); - const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties); - checkAdditionalProperties(); - cxt.ok((0, codegen_1._) `${errsCount} === ${names_1.default.errors}`); - function checkAdditionalProperties() { - gen.forIn("key", data, (key) => { - if (!props.length && !patProps.length) - additionalPropertyCode(key); - else - gen.if(isAdditional(key), () => additionalPropertyCode(key)); - }); +// node_modules/undici/lib/util/date.js +var require_date = __commonJS({ + "node_modules/undici/lib/util/date.js"(exports, module3) { + "use strict"; + function parseHttpDate(date) { + switch (date[3]) { + case ",": + return parseImfDate(date); + case " ": + return parseAscTimeDate(date); + default: + return parseRfc850Date(date); + } + } + function parseImfDate(date) { + if (date.length !== 29 || date[4] !== " " || date[7] !== " " || date[11] !== " " || date[16] !== " " || date[19] !== ":" || date[22] !== ":" || date[25] !== " " || date[26] !== "G" || date[27] !== "M" || date[28] !== "T") { + return void 0; + } + let weekday = -1; + if (date[0] === "S" && date[1] === "u" && date[2] === "n") { + weekday = 0; + } else if (date[0] === "M" && date[1] === "o" && date[2] === "n") { + weekday = 1; + } else if (date[0] === "T" && date[1] === "u" && date[2] === "e") { + weekday = 2; + } else if (date[0] === "W" && date[1] === "e" && date[2] === "d") { + weekday = 3; + } else if (date[0] === "T" && date[1] === "h" && date[2] === "u") { + weekday = 4; + } else if (date[0] === "F" && date[1] === "r" && date[2] === "i") { + weekday = 5; + } else if (date[0] === "S" && date[1] === "a" && date[2] === "t") { + weekday = 6; + } else { + return void 0; + } + let day = 0; + if (date[5] === "0") { + const code = date.charCodeAt(6); + if (code < 49 || code > 57) { + return void 0; } - function isAdditional(key) { - let definedProp; - if (props.length > 8) { - // TODO maybe an option instead of hard-coded 8? - const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, "properties"); - definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key); - } - else if (props.length) { - definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._) `${key} === ${p}`)); - } - else { - definedProp = codegen_1.nil; - } - if (patProps.length) { - definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._) `${(0, code_1.usePattern)(cxt, p)}.test(${key})`)); - } - return (0, codegen_1.not)(definedProp); + day = code - 48; + } else { + const code1 = date.charCodeAt(5); + if (code1 < 49 || code1 > 51) { + return void 0; + } + const code2 = date.charCodeAt(6); + if (code2 < 48 || code2 > 57) { + return void 0; + } + day = (code1 - 48) * 10 + (code2 - 48); + } + let monthIdx = -1; + if (date[8] === "J" && date[9] === "a" && date[10] === "n") { + monthIdx = 0; + } else if (date[8] === "F" && date[9] === "e" && date[10] === "b") { + monthIdx = 1; + } else if (date[8] === "M" && date[9] === "a") { + if (date[10] === "r") { + monthIdx = 2; + } else if (date[10] === "y") { + monthIdx = 4; + } else { + return void 0; + } + } else if (date[8] === "J") { + if (date[9] === "a" && date[10] === "n") { + monthIdx = 0; + } else if (date[9] === "u") { + if (date[10] === "n") { + monthIdx = 5; + } else if (date[10] === "l") { + monthIdx = 6; + } else { + return void 0; + } + } else { + return void 0; } - function deleteAdditional(key) { - gen.code((0, codegen_1._) `delete ${data}[${key}]`); + } else if (date[8] === "A") { + if (date[9] === "p" && date[10] === "r") { + monthIdx = 3; + } else if (date[9] === "u" && date[10] === "g") { + monthIdx = 7; + } else { + return void 0; + } + } else if (date[8] === "S" && date[9] === "e" && date[10] === "p") { + monthIdx = 8; + } else if (date[8] === "O" && date[9] === "c" && date[10] === "t") { + monthIdx = 9; + } else if (date[8] === "N" && date[9] === "o" && date[10] === "v") { + monthIdx = 10; + } else if (date[8] === "D" && date[9] === "e" && date[10] === "c") { + monthIdx = 11; + } else { + return void 0; + } + const yearDigit1 = date.charCodeAt(12); + if (yearDigit1 < 48 || yearDigit1 > 57) { + return void 0; + } + const yearDigit2 = date.charCodeAt(13); + if (yearDigit2 < 48 || yearDigit2 > 57) { + return void 0; + } + const yearDigit3 = date.charCodeAt(14); + if (yearDigit3 < 48 || yearDigit3 > 57) { + return void 0; + } + const yearDigit4 = date.charCodeAt(15); + if (yearDigit4 < 48 || yearDigit4 > 57) { + return void 0; + } + const year = (yearDigit1 - 48) * 1e3 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48); + let hour = 0; + if (date[17] === "0") { + const code = date.charCodeAt(18); + if (code < 48 || code > 57) { + return void 0; } - function additionalPropertyCode(key) { - if (opts.removeAdditional === "all" || (opts.removeAdditional && schema === false)) { - deleteAdditional(key); - return; - } - if (schema === false) { - cxt.setParams({ additionalProperty: key }); - cxt.error(); - if (!allErrors) - gen.break(); - return; - } - if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) { - const valid = gen.name("valid"); - if (opts.removeAdditional === "failing") { - applyAdditionalSchema(key, valid, false); - gen.if((0, codegen_1.not)(valid), () => { - cxt.reset(); - deleteAdditional(key); - }); - } - else { - applyAdditionalSchema(key, valid); - if (!allErrors) - gen.if((0, codegen_1.not)(valid), () => gen.break()); - } - } + hour = code - 48; + } else { + const code1 = date.charCodeAt(17); + if (code1 < 48 || code1 > 50) { + return void 0; } - function applyAdditionalSchema(key, valid, errors) { - const subschema = { - keyword: "additionalProperties", - dataProp: key, - dataPropType: util_1.Type.Str, - }; - if (errors === false) { - Object.assign(subschema, { - compositeRule: true, - createErrors: false, - allErrors: false, - }); - } - cxt.subschema(subschema, valid); + const code2 = date.charCodeAt(18); + if (code2 < 48 || code2 > 57) { + return void 0; } - }, -}; -exports["default"] = def; -//# sourceMappingURL=additionalProperties.js.map - -/***/ }), - -/***/ 20981: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const util_1 = __nccwpck_require__(54313); -const def = { - keyword: "allOf", - schemaType: "array", - code(cxt) { - const { gen, schema, it } = cxt; - /* istanbul ignore if */ - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - const valid = gen.name("valid"); - schema.forEach((sch, i) => { - if ((0, util_1.alwaysValidSchema)(it, sch)) - return; - const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid, true); - cxt.ok(valid); - cxt.mergeEvaluated(schCxt); - }); - }, -}; -exports["default"] = def; -//# sourceMappingURL=allOf.js.map - -/***/ }), - -/***/ 44080: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const code_1 = __nccwpck_require__(9162); -const def = { - keyword: "anyOf", - schemaType: "array", - trackErrors: true, - code: code_1.validateUnion, - error: { message: "must match a schema in anyOf" }, -}; -exports["default"] = def; -//# sourceMappingURL=anyOf.js.map - -/***/ }), - -/***/ 60527: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const error = { - message: ({ params: { min, max } }) => max === undefined - ? (0, codegen_1.str) `must contain at least ${min} valid item(s)` - : (0, codegen_1.str) `must contain at least ${min} and no more than ${max} valid item(s)`, - params: ({ params: { min, max } }) => max === undefined ? (0, codegen_1._) `{minContains: ${min}}` : (0, codegen_1._) `{minContains: ${min}, maxContains: ${max}}`, -}; -const def = { - keyword: "contains", - type: "array", - schemaType: ["object", "boolean"], - before: "uniqueItems", - trackErrors: true, - error, - code(cxt) { - const { gen, schema, parentSchema, data, it } = cxt; - let min; - let max; - const { minContains, maxContains } = parentSchema; - if (it.opts.next) { - min = minContains === undefined ? 1 : minContains; - max = maxContains; - } - else { - min = 1; + if (code1 === 50 && code2 > 51) { + return void 0; } - const len = gen.const("len", (0, codegen_1._) `${data}.length`); - cxt.setParams({ min, max }); - if (max === undefined && min === 0) { - (0, util_1.checkStrictMode)(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`); - return; - } - if (max !== undefined && min > max) { - (0, util_1.checkStrictMode)(it, `"minContains" > "maxContains" is always invalid`); - cxt.fail(); - return; - } - if ((0, util_1.alwaysValidSchema)(it, schema)) { - let cond = (0, codegen_1._) `${len} >= ${min}`; - if (max !== undefined) - cond = (0, codegen_1._) `${cond} && ${len} <= ${max}`; - cxt.pass(cond); - return; + hour = (code1 - 48) * 10 + (code2 - 48); + } + let minute = 0; + if (date[20] === "0") { + const code = date.charCodeAt(21); + if (code < 48 || code > 57) { + return void 0; } - it.items = true; - const valid = gen.name("valid"); - if (max === undefined && min === 1) { - validateItems(valid, () => gen.if(valid, () => gen.break())); + minute = code - 48; + } else { + const code1 = date.charCodeAt(20); + if (code1 < 48 || code1 > 53) { + return void 0; } - else if (min === 0) { - gen.let(valid, true); - if (max !== undefined) - gen.if((0, codegen_1._) `${data}.length > 0`, validateItemsWithCount); + const code2 = date.charCodeAt(21); + if (code2 < 48 || code2 > 57) { + return void 0; } - else { - gen.let(valid, false); - validateItemsWithCount(); + minute = (code1 - 48) * 10 + (code2 - 48); + } + let second = 0; + if (date[23] === "0") { + const code = date.charCodeAt(24); + if (code < 48 || code > 57) { + return void 0; } - cxt.result(valid, () => cxt.reset()); - function validateItemsWithCount() { - const schValid = gen.name("_valid"); - const count = gen.let("count", 0); - validateItems(schValid, () => gen.if(schValid, () => checkLimits(count))); + second = code - 48; + } else { + const code1 = date.charCodeAt(23); + if (code1 < 48 || code1 > 53) { + return void 0; + } + const code2 = date.charCodeAt(24); + if (code2 < 48 || code2 > 57) { + return void 0; + } + second = (code1 - 48) * 10 + (code2 - 48); + } + const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); + return result.getUTCDay() === weekday ? result : void 0; + } + function parseAscTimeDate(date) { + if (date.length !== 24 || date[7] !== " " || date[10] !== " " || date[19] !== " ") { + return void 0; + } + let weekday = -1; + if (date[0] === "S" && date[1] === "u" && date[2] === "n") { + weekday = 0; + } else if (date[0] === "M" && date[1] === "o" && date[2] === "n") { + weekday = 1; + } else if (date[0] === "T" && date[1] === "u" && date[2] === "e") { + weekday = 2; + } else if (date[0] === "W" && date[1] === "e" && date[2] === "d") { + weekday = 3; + } else if (date[0] === "T" && date[1] === "h" && date[2] === "u") { + weekday = 4; + } else if (date[0] === "F" && date[1] === "r" && date[2] === "i") { + weekday = 5; + } else if (date[0] === "S" && date[1] === "a" && date[2] === "t") { + weekday = 6; + } else { + return void 0; + } + let monthIdx = -1; + if (date[4] === "J" && date[5] === "a" && date[6] === "n") { + monthIdx = 0; + } else if (date[4] === "F" && date[5] === "e" && date[6] === "b") { + monthIdx = 1; + } else if (date[4] === "M" && date[5] === "a") { + if (date[6] === "r") { + monthIdx = 2; + } else if (date[6] === "y") { + monthIdx = 4; + } else { + return void 0; + } + } else if (date[4] === "J") { + if (date[5] === "a" && date[6] === "n") { + monthIdx = 0; + } else if (date[5] === "u") { + if (date[6] === "n") { + monthIdx = 5; + } else if (date[6] === "l") { + monthIdx = 6; + } else { + return void 0; + } + } else { + return void 0; } - function validateItems(_valid, block) { - gen.forRange("i", 0, len, (i) => { - cxt.subschema({ - keyword: "contains", - dataProp: i, - dataPropType: util_1.Type.Num, - compositeRule: true, - }, _valid); - block(); - }); + } else if (date[4] === "A") { + if (date[5] === "p" && date[6] === "r") { + monthIdx = 3; + } else if (date[5] === "u" && date[6] === "g") { + monthIdx = 7; + } else { + return void 0; + } + } else if (date[4] === "S" && date[5] === "e" && date[6] === "p") { + monthIdx = 8; + } else if (date[4] === "O" && date[5] === "c" && date[6] === "t") { + monthIdx = 9; + } else if (date[4] === "N" && date[5] === "o" && date[6] === "v") { + monthIdx = 10; + } else if (date[4] === "D" && date[5] === "e" && date[6] === "c") { + monthIdx = 11; + } else { + return void 0; + } + let day = 0; + if (date[8] === " ") { + const code = date.charCodeAt(9); + if (code < 49 || code > 57) { + return void 0; } - function checkLimits(count) { - gen.code((0, codegen_1._) `${count}++`); - if (max === undefined) { - gen.if((0, codegen_1._) `${count} >= ${min}`, () => gen.assign(valid, true).break()); - } - else { - gen.if((0, codegen_1._) `${count} > ${max}`, () => gen.assign(valid, false).break()); - if (min === 1) - gen.assign(valid, true); - else - gen.if((0, codegen_1._) `${count} >= ${min}`, () => gen.assign(valid, true)); - } + day = code - 48; + } else { + const code1 = date.charCodeAt(8); + if (code1 < 49 || code1 > 51) { + return void 0; } - }, -}; -exports["default"] = def; -//# sourceMappingURL=contains.js.map - -/***/ }), - -/***/ 95577: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.error = void 0; -exports.validatePropertyDeps = validatePropertyDeps; -exports.validateSchemaDeps = validateSchemaDeps; -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const code_1 = __nccwpck_require__(9162); -exports.error = { - message: ({ params: { property, depsCount, deps } }) => { - const property_ies = depsCount === 1 ? "property" : "properties"; - return (0, codegen_1.str) `must have ${property_ies} ${deps} when property ${property} is present`; - }, - params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._) `{property: ${property}, - missingProperty: ${missingProperty}, - depsCount: ${depsCount}, - deps: ${deps}}`, // TODO change to reference -}; -const def = { - keyword: "dependencies", - type: "object", - schemaType: "object", - error: exports.error, - code(cxt) { - const [propDeps, schDeps] = splitDependencies(cxt); - validatePropertyDeps(cxt, propDeps); - validateSchemaDeps(cxt, schDeps); - }, -}; -function splitDependencies({ schema }) { - const propertyDeps = {}; - const schemaDeps = {}; - for (const key in schema) { - if (key === "__proto__") - continue; - const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps; - deps[key] = schema[key]; - } - return [propertyDeps, schemaDeps]; -} -function validatePropertyDeps(cxt, propertyDeps = cxt.schema) { - const { gen, data, it } = cxt; - if (Object.keys(propertyDeps).length === 0) - return; - const missing = gen.let("missing"); - for (const prop in propertyDeps) { - const deps = propertyDeps[prop]; - if (deps.length === 0) - continue; - const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties); - cxt.setParams({ - property: prop, - depsCount: deps.length, - deps: deps.join(", "), - }); - if (it.allErrors) { - gen.if(hasProperty, () => { - for (const depProp of deps) { - (0, code_1.checkReportMissingProp)(cxt, depProp); - } - }); + const code2 = date.charCodeAt(9); + if (code2 < 48 || code2 > 57) { + return void 0; } - else { - gen.if((0, codegen_1._) `${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`); - (0, code_1.reportMissingProp)(cxt, missing); - gen.else(); + day = (code1 - 48) * 10 + (code2 - 48); + } + let hour = 0; + if (date[11] === "0") { + const code = date.charCodeAt(12); + if (code < 48 || code > 57) { + return void 0; } - } -} -function validateSchemaDeps(cxt, schemaDeps = cxt.schema) { - const { gen, data, keyword, it } = cxt; - const valid = gen.name("valid"); - for (const prop in schemaDeps) { - if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop])) - continue; - gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties), () => { - const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid); - cxt.mergeValidEvaluated(schCxt, valid); - }, () => gen.var(valid, true) // TODO var - ); - cxt.ok(valid); - } -} -exports["default"] = def; -//# sourceMappingURL=dependencies.js.map - -/***/ }), - -/***/ 30314: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const dependencies_1 = __nccwpck_require__(95577); -const def = { - keyword: "dependentSchemas", - type: "object", - schemaType: "object", - code: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt), -}; -exports["default"] = def; -//# sourceMappingURL=dependentSchemas.js.map - -/***/ }), - -/***/ 75850: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const error = { - message: ({ params }) => (0, codegen_1.str) `must match "${params.ifClause}" schema`, - params: ({ params }) => (0, codegen_1._) `{failingKeyword: ${params.ifClause}}`, -}; -const def = { - keyword: "if", - schemaType: ["object", "boolean"], - trackErrors: true, - error, - code(cxt) { - const { gen, parentSchema, it } = cxt; - if (parentSchema.then === undefined && parentSchema.else === undefined) { - (0, util_1.checkStrictMode)(it, '"if" without "then" and "else" is ignored'); - } - const hasThen = hasSchema(it, "then"); - const hasElse = hasSchema(it, "else"); - if (!hasThen && !hasElse) - return; - const valid = gen.let("valid", true); - const schValid = gen.name("_valid"); - validateIf(); - cxt.reset(); - if (hasThen && hasElse) { - const ifClause = gen.let("ifClause"); - cxt.setParams({ ifClause }); - gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause)); + hour = code - 48; + } else { + const code1 = date.charCodeAt(11); + if (code1 < 48 || code1 > 50) { + return void 0; } - else if (hasThen) { - gen.if(schValid, validateClause("then")); + const code2 = date.charCodeAt(12); + if (code2 < 48 || code2 > 57) { + return void 0; } - else { - gen.if((0, codegen_1.not)(schValid), validateClause("else")); + if (code1 === 50 && code2 > 51) { + return void 0; } - cxt.pass(valid, () => cxt.error(true)); - function validateIf() { - const schCxt = cxt.subschema({ - keyword: "if", - compositeRule: true, - createErrors: false, - allErrors: false, - }, schValid); - cxt.mergeEvaluated(schCxt); + hour = (code1 - 48) * 10 + (code2 - 48); + } + let minute = 0; + if (date[14] === "0") { + const code = date.charCodeAt(15); + if (code < 48 || code > 57) { + return void 0; } - function validateClause(keyword, ifClause) { - return () => { - const schCxt = cxt.subschema({ keyword }, schValid); - gen.assign(valid, schValid); - cxt.mergeValidEvaluated(schCxt, valid); - if (ifClause) - gen.assign(ifClause, (0, codegen_1._) `${keyword}`); - else - cxt.setParams({ ifClause: keyword }); - }; + minute = code - 48; + } else { + const code1 = date.charCodeAt(14); + if (code1 < 48 || code1 > 53) { + return void 0; } - }, -}; -function hasSchema(it, keyword) { - const schema = it.schema[keyword]; - return schema !== undefined && !(0, util_1.alwaysValidSchema)(it, schema); -} -exports["default"] = def; -//# sourceMappingURL=if.js.map - -/***/ }), - -/***/ 7920: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports["default"] = getApplicator; -const additionalItems_1 = __nccwpck_require__(36567); -const prefixItems_1 = __nccwpck_require__(16864); -const items_1 = __nccwpck_require__(4979); -const items2020_1 = __nccwpck_require__(33345); -const contains_1 = __nccwpck_require__(60527); -const dependencies_1 = __nccwpck_require__(95577); -const propertyNames_1 = __nccwpck_require__(37124); -const additionalProperties_1 = __nccwpck_require__(39208); -const properties_1 = __nccwpck_require__(45194); -const patternProperties_1 = __nccwpck_require__(92400); -const not_1 = __nccwpck_require__(28736); -const anyOf_1 = __nccwpck_require__(44080); -const oneOf_1 = __nccwpck_require__(22103); -const allOf_1 = __nccwpck_require__(20981); -const if_1 = __nccwpck_require__(75850); -const thenElse_1 = __nccwpck_require__(74115); -function getApplicator(draft2020 = false) { - const applicator = [ - // any - not_1.default, - anyOf_1.default, - oneOf_1.default, - allOf_1.default, - if_1.default, - thenElse_1.default, - // object - propertyNames_1.default, - additionalProperties_1.default, - dependencies_1.default, - properties_1.default, - patternProperties_1.default, - ]; - // array - if (draft2020) - applicator.push(prefixItems_1.default, items2020_1.default); - else - applicator.push(additionalItems_1.default, items_1.default); - applicator.push(contains_1.default); - return applicator; -} -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 4979: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.validateTuple = validateTuple; -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const code_1 = __nccwpck_require__(9162); -const def = { - keyword: "items", - type: "array", - schemaType: ["object", "array", "boolean"], - before: "uniqueItems", - code(cxt) { - const { schema, it } = cxt; - if (Array.isArray(schema)) - return validateTuple(cxt, "additionalItems", schema); - it.items = true; - if ((0, util_1.alwaysValidSchema)(it, schema)) - return; - cxt.ok((0, code_1.validateArray)(cxt)); - }, -}; -function validateTuple(cxt, extraItems, schArr = cxt.schema) { - const { gen, parentSchema, data, keyword, it } = cxt; - checkStrictTuple(parentSchema); - if (it.opts.unevaluated && schArr.length && it.items !== true) { - it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items); - } - const valid = gen.name("valid"); - const len = gen.const("len", (0, codegen_1._) `${data}.length`); - schArr.forEach((sch, i) => { - if ((0, util_1.alwaysValidSchema)(it, sch)) - return; - gen.if((0, codegen_1._) `${len} > ${i}`, () => cxt.subschema({ - keyword, - schemaProp: i, - dataProp: i, - }, valid)); - cxt.ok(valid); - }); - function checkStrictTuple(sch) { - const { opts, errSchemaPath } = it; - const l = schArr.length; - const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false); - if (opts.strictTuples && !fullTuple) { - const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`; - (0, util_1.checkStrictMode)(it, msg, opts.strictTuples); + const code2 = date.charCodeAt(15); + if (code2 < 48 || code2 > 57) { + return void 0; } - } -} -exports["default"] = def; -//# sourceMappingURL=items.js.map - -/***/ }), - -/***/ 33345: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const code_1 = __nccwpck_require__(9162); -const additionalItems_1 = __nccwpck_require__(36567); -const error = { - message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`, - params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`, -}; -const def = { - keyword: "items", - type: "array", - schemaType: ["object", "boolean"], - before: "uniqueItems", - error, - code(cxt) { - const { schema, parentSchema, it } = cxt; - const { prefixItems } = parentSchema; - it.items = true; - if ((0, util_1.alwaysValidSchema)(it, schema)) - return; - if (prefixItems) - (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems); - else - cxt.ok((0, code_1.validateArray)(cxt)); - }, -}; -exports["default"] = def; -//# sourceMappingURL=items2020.js.map - -/***/ }), - -/***/ 28736: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const util_1 = __nccwpck_require__(54313); -const def = { - keyword: "not", - schemaType: ["object", "boolean"], - trackErrors: true, - code(cxt) { - const { gen, schema, it } = cxt; - if ((0, util_1.alwaysValidSchema)(it, schema)) { - cxt.fail(); - return; + minute = (code1 - 48) * 10 + (code2 - 48); + } + let second = 0; + if (date[17] === "0") { + const code = date.charCodeAt(18); + if (code < 48 || code > 57) { + return void 0; } - const valid = gen.name("valid"); - cxt.subschema({ - keyword: "not", - compositeRule: true, - createErrors: false, - allErrors: false, - }, valid); - cxt.failResult(valid, () => cxt.reset(), () => cxt.error()); - }, - error: { message: "must NOT be valid" }, -}; -exports["default"] = def; -//# sourceMappingURL=not.js.map - -/***/ }), - -/***/ 22103: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const error = { - message: "must match exactly one schema in oneOf", - params: ({ params }) => (0, codegen_1._) `{passingSchemas: ${params.passing}}`, -}; -const def = { - keyword: "oneOf", - schemaType: "array", - trackErrors: true, - error, - code(cxt) { - const { gen, schema, parentSchema, it } = cxt; - /* istanbul ignore if */ - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - if (it.opts.discriminator && parentSchema.discriminator) - return; - const schArr = schema; - const valid = gen.let("valid", false); - const passing = gen.let("passing", null); - const schValid = gen.name("_valid"); - cxt.setParams({ passing }); - // TODO possibly fail straight away (with warning or exception) if there are two empty always valid schemas - gen.block(validateOneOf); - cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); - function validateOneOf() { - schArr.forEach((sch, i) => { - let schCxt; - if ((0, util_1.alwaysValidSchema)(it, sch)) { - gen.var(schValid, true); - } - else { - schCxt = cxt.subschema({ - keyword: "oneOf", - schemaProp: i, - compositeRule: true, - }, schValid); - } - if (i > 0) { - gen - .if((0, codegen_1._) `${schValid} && ${valid}`) - .assign(valid, false) - .assign(passing, (0, codegen_1._) `[${passing}, ${i}]`) - .else(); - } - gen.if(schValid, () => { - gen.assign(valid, true); - gen.assign(passing, i); - if (schCxt) - cxt.mergeEvaluated(schCxt, codegen_1.Name); - }); - }); + second = code - 48; + } else { + const code1 = date.charCodeAt(17); + if (code1 < 48 || code1 > 53) { + return void 0; + } + const code2 = date.charCodeAt(18); + if (code2 < 48 || code2 > 57) { + return void 0; + } + second = (code1 - 48) * 10 + (code2 - 48); + } + const yearDigit1 = date.charCodeAt(20); + if (yearDigit1 < 48 || yearDigit1 > 57) { + return void 0; + } + const yearDigit2 = date.charCodeAt(21); + if (yearDigit2 < 48 || yearDigit2 > 57) { + return void 0; + } + const yearDigit3 = date.charCodeAt(22); + if (yearDigit3 < 48 || yearDigit3 > 57) { + return void 0; + } + const yearDigit4 = date.charCodeAt(23); + if (yearDigit4 < 48 || yearDigit4 > 57) { + return void 0; + } + const year = (yearDigit1 - 48) * 1e3 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48); + const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); + return result.getUTCDay() === weekday ? result : void 0; + } + function parseRfc850Date(date) { + let commaIndex = -1; + let weekday = -1; + if (date[0] === "S") { + if (date[1] === "u" && date[2] === "n" && date[3] === "d" && date[4] === "a" && date[5] === "y") { + weekday = 0; + commaIndex = 6; + } else if (date[1] === "a" && date[2] === "t" && date[3] === "u" && date[4] === "r" && date[5] === "d" && date[6] === "a" && date[7] === "y") { + weekday = 6; + commaIndex = 8; + } + } else if (date[0] === "M" && date[1] === "o" && date[2] === "n" && date[3] === "d" && date[4] === "a" && date[5] === "y") { + weekday = 1; + commaIndex = 6; + } else if (date[0] === "T") { + if (date[1] === "u" && date[2] === "e" && date[3] === "s" && date[4] === "d" && date[5] === "a" && date[6] === "y") { + weekday = 2; + commaIndex = 7; + } else if (date[1] === "h" && date[2] === "u" && date[3] === "r" && date[4] === "s" && date[5] === "d" && date[6] === "a" && date[7] === "y") { + weekday = 4; + commaIndex = 8; + } + } else if (date[0] === "W" && date[1] === "e" && date[2] === "d" && date[3] === "n" && date[4] === "e" && date[5] === "s" && date[6] === "d" && date[7] === "a" && date[8] === "y") { + weekday = 3; + commaIndex = 9; + } else if (date[0] === "F" && date[1] === "r" && date[2] === "i" && date[3] === "d" && date[4] === "a" && date[5] === "y") { + weekday = 5; + commaIndex = 6; + } else { + return void 0; + } + if (date[commaIndex] !== "," || date.length - commaIndex - 1 !== 23 || date[commaIndex + 1] !== " " || date[commaIndex + 4] !== "-" || date[commaIndex + 8] !== "-" || date[commaIndex + 11] !== " " || date[commaIndex + 14] !== ":" || date[commaIndex + 17] !== ":" || date[commaIndex + 20] !== " " || date[commaIndex + 21] !== "G" || date[commaIndex + 22] !== "M" || date[commaIndex + 23] !== "T") { + return void 0; + } + let day = 0; + if (date[commaIndex + 2] === "0") { + const code = date.charCodeAt(commaIndex + 3); + if (code < 49 || code > 57) { + return void 0; } - }, -}; -exports["default"] = def; -//# sourceMappingURL=oneOf.js.map - -/***/ }), - -/***/ 92400: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const code_1 = __nccwpck_require__(9162); -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const util_2 = __nccwpck_require__(54313); -const def = { - keyword: "patternProperties", - type: "object", - schemaType: "object", - code(cxt) { - const { gen, schema, data, parentSchema, it } = cxt; - const { opts } = it; - const patterns = (0, code_1.allSchemaProperties)(schema); - const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p])); - if (patterns.length === 0 || - (alwaysValidPatterns.length === patterns.length && - (!it.opts.unevaluated || it.props === true))) { - return; + day = code - 48; + } else { + const code1 = date.charCodeAt(commaIndex + 2); + if (code1 < 49 || code1 > 51) { + return void 0; + } + const code2 = date.charCodeAt(commaIndex + 3); + if (code2 < 48 || code2 > 57) { + return void 0; + } + day = (code1 - 48) * 10 + (code2 - 48); + } + let monthIdx = -1; + if (date[commaIndex + 5] === "J" && date[commaIndex + 6] === "a" && date[commaIndex + 7] === "n") { + monthIdx = 0; + } else if (date[commaIndex + 5] === "F" && date[commaIndex + 6] === "e" && date[commaIndex + 7] === "b") { + monthIdx = 1; + } else if (date[commaIndex + 5] === "M" && date[commaIndex + 6] === "a" && date[commaIndex + 7] === "r") { + monthIdx = 2; + } else if (date[commaIndex + 5] === "A" && date[commaIndex + 6] === "p" && date[commaIndex + 7] === "r") { + monthIdx = 3; + } else if (date[commaIndex + 5] === "M" && date[commaIndex + 6] === "a" && date[commaIndex + 7] === "y") { + monthIdx = 4; + } else if (date[commaIndex + 5] === "J" && date[commaIndex + 6] === "u" && date[commaIndex + 7] === "n") { + monthIdx = 5; + } else if (date[commaIndex + 5] === "J" && date[commaIndex + 6] === "u" && date[commaIndex + 7] === "l") { + monthIdx = 6; + } else if (date[commaIndex + 5] === "A" && date[commaIndex + 6] === "u" && date[commaIndex + 7] === "g") { + monthIdx = 7; + } else if (date[commaIndex + 5] === "S" && date[commaIndex + 6] === "e" && date[commaIndex + 7] === "p") { + monthIdx = 8; + } else if (date[commaIndex + 5] === "O" && date[commaIndex + 6] === "c" && date[commaIndex + 7] === "t") { + monthIdx = 9; + } else if (date[commaIndex + 5] === "N" && date[commaIndex + 6] === "o" && date[commaIndex + 7] === "v") { + monthIdx = 10; + } else if (date[commaIndex + 5] === "D" && date[commaIndex + 6] === "e" && date[commaIndex + 7] === "c") { + monthIdx = 11; + } else { + return void 0; + } + const yearDigit1 = date.charCodeAt(commaIndex + 9); + if (yearDigit1 < 48 || yearDigit1 > 57) { + return void 0; + } + const yearDigit2 = date.charCodeAt(commaIndex + 10); + if (yearDigit2 < 48 || yearDigit2 > 57) { + return void 0; + } + let year = (yearDigit1 - 48) * 10 + (yearDigit2 - 48); + year += year < 70 ? 2e3 : 1900; + let hour = 0; + if (date[commaIndex + 12] === "0") { + const code = date.charCodeAt(commaIndex + 13); + if (code < 48 || code > 57) { + return void 0; } - const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties; - const valid = gen.name("valid"); - if (it.props !== true && !(it.props instanceof codegen_1.Name)) { - it.props = (0, util_2.evaluatedPropsToName)(gen, it.props); + hour = code - 48; + } else { + const code1 = date.charCodeAt(commaIndex + 12); + if (code1 < 48 || code1 > 50) { + return void 0; } - const { props } = it; - validatePatternProperties(); - function validatePatternProperties() { - for (const pat of patterns) { - if (checkProperties) - checkMatchingProperties(pat); - if (it.allErrors) { - validateProperties(pat); - } - else { - gen.var(valid, true); // TODO var - validateProperties(pat); - gen.if(valid); - } - } + const code2 = date.charCodeAt(commaIndex + 13); + if (code2 < 48 || code2 > 57) { + return void 0; } - function checkMatchingProperties(pat) { - for (const prop in checkProperties) { - if (new RegExp(pat).test(prop)) { - (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`); - } - } + if (code1 === 50 && code2 > 51) { + return void 0; } - function validateProperties(pat) { - gen.forIn("key", data, (key) => { - gen.if((0, codegen_1._) `${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => { - const alwaysValid = alwaysValidPatterns.includes(pat); - if (!alwaysValid) { - cxt.subschema({ - keyword: "patternProperties", - schemaProp: pat, - dataProp: key, - dataPropType: util_2.Type.Str, - }, valid); - } - if (it.opts.unevaluated && props !== true) { - gen.assign((0, codegen_1._) `${props}[${key}]`, true); - } - else if (!alwaysValid && !it.allErrors) { - // can short-circuit if `unevaluatedProperties` is not supported (opts.next === false) - // or if all properties were evaluated (props === true) - gen.if((0, codegen_1.not)(valid), () => gen.break()); - } - }); - }); + hour = (code1 - 48) * 10 + (code2 - 48); + } + let minute = 0; + if (date[commaIndex + 15] === "0") { + const code = date.charCodeAt(commaIndex + 16); + if (code < 48 || code > 57) { + return void 0; } - }, -}; -exports["default"] = def; -//# sourceMappingURL=patternProperties.js.map - -/***/ }), - -/***/ 16864: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const items_1 = __nccwpck_require__(4979); -const def = { - keyword: "prefixItems", - type: "array", - schemaType: ["array"], - before: "uniqueItems", - code: (cxt) => (0, items_1.validateTuple)(cxt, "items"), -}; -exports["default"] = def; -//# sourceMappingURL=prefixItems.js.map - -/***/ }), - -/***/ 45194: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const validate_1 = __nccwpck_require__(40857); -const code_1 = __nccwpck_require__(9162); -const util_1 = __nccwpck_require__(54313); -const additionalProperties_1 = __nccwpck_require__(39208); -const def = { - keyword: "properties", - type: "object", - schemaType: "object", - code(cxt) { - const { gen, schema, parentSchema, data, it } = cxt; - if ((it.opts.removeAdditional === "all" && parentSchema.additionalProperties === undefined) || - it.opts.defaultAdditionalProperties === false) { - additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, "additionalProperties")); - } - const allProps = (0, code_1.allSchemaProperties)(schema); - for (const prop of allProps) { - it.definedProperties.add(prop); + minute = code - 48; + } else { + const code1 = date.charCodeAt(commaIndex + 15); + if (code1 < 48 || code1 > 53) { + return void 0; } - if (it.opts.unevaluated && allProps.length && it.props !== true) { - it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props); + const code2 = date.charCodeAt(commaIndex + 16); + if (code2 < 48 || code2 > 57) { + return void 0; } - const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p])); - if (properties.length === 0) - return; - const valid = gen.name("valid"); - for (const prop of properties) { - if (hasDefault(prop)) { - applyPropertySchema(prop); - } - else { - gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties)); - applyPropertySchema(prop); - if (!it.allErrors) - gen.else().var(valid, true); - gen.endIf(); - } - cxt.it.definedProperties.add(prop); - cxt.ok(valid); + minute = (code1 - 48) * 10 + (code2 - 48); + } + let second = 0; + if (date[commaIndex + 18] === "0") { + const code = date.charCodeAt(commaIndex + 19); + if (code < 48 || code > 57) { + return void 0; } - function hasDefault(prop) { - return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== undefined; + second = code - 48; + } else { + const code1 = date.charCodeAt(commaIndex + 18); + if (code1 < 48 || code1 > 53) { + return void 0; } - function applyPropertySchema(prop) { - cxt.subschema({ - keyword: "properties", - schemaProp: prop, - dataProp: prop, - }, valid); + const code2 = date.charCodeAt(commaIndex + 19); + if (code2 < 48 || code2 > 57) { + return void 0; } - }, -}; -exports["default"] = def; -//# sourceMappingURL=properties.js.map - -/***/ }), - -/***/ 37124: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + second = (code1 - 48) * 10 + (code2 - 48); + } + const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); + return result.getUTCDay() === weekday ? result : void 0; + } + module3.exports = { + parseHttpDate + }; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const error = { - message: "property name must be valid", - params: ({ params }) => (0, codegen_1._) `{propertyName: ${params.propertyName}}`, -}; -const def = { - keyword: "propertyNames", - type: "object", - schemaType: ["object", "boolean"], - error, - code(cxt) { - const { gen, schema, data, it } = cxt; - if ((0, util_1.alwaysValidSchema)(it, schema)) - return; - const valid = gen.name("valid"); - gen.forIn("key", data, (key) => { - cxt.setParams({ propertyName: key }); - cxt.subschema({ - keyword: "propertyNames", - data: key, - dataTypes: ["string"], - propertyName: key, - compositeRule: true, - }, valid); - gen.if((0, codegen_1.not)(valid), () => { - cxt.error(true); - if (!it.allErrors) - gen.break(); - }); - }); - cxt.ok(valid); - }, -}; -exports["default"] = def; -//# sourceMappingURL=propertyNames.js.map - -/***/ }), - -/***/ 74115: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const util_1 = __nccwpck_require__(54313); -const def = { - keyword: ["then", "else"], - schemaType: ["object", "boolean"], - code({ keyword, parentSchema, it }) { - if (parentSchema.if === undefined) - (0, util_1.checkStrictMode)(it, `"${keyword}" without "if" is ignored`); - }, -}; -exports["default"] = def; -//# sourceMappingURL=thenElse.js.map - -/***/ }), - -/***/ 9162: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.checkReportMissingProp = checkReportMissingProp; -exports.checkMissingProp = checkMissingProp; -exports.reportMissingProp = reportMissingProp; -exports.hasPropFunc = hasPropFunc; -exports.isOwnProperty = isOwnProperty; -exports.propertyInData = propertyInData; -exports.noPropertyInData = noPropertyInData; -exports.allSchemaProperties = allSchemaProperties; -exports.schemaProperties = schemaProperties; -exports.callValidateCode = callValidateCode; -exports.usePattern = usePattern; -exports.validateArray = validateArray; -exports.validateUnion = validateUnion; -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const names_1 = __nccwpck_require__(34855); -const util_2 = __nccwpck_require__(54313); -function checkReportMissingProp(cxt, prop) { - const { gen, data, it } = cxt; - gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => { - cxt.setParams({ missingProperty: (0, codegen_1._) `${prop}` }, true); - cxt.error(); - }); -} -function checkMissingProp({ gen, data, it: { opts } }, properties, missing) { - return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._) `${missing} = ${prop}`))); -} -function reportMissingProp(cxt, missing) { - cxt.setParams({ missingProperty: missing }, true); - cxt.error(); -} -function hasPropFunc(gen) { - return gen.scopeValue("func", { - // eslint-disable-next-line @typescript-eslint/unbound-method - ref: Object.prototype.hasOwnProperty, - code: (0, codegen_1._) `Object.prototype.hasOwnProperty`, - }); -} -function isOwnProperty(gen, data, property) { - return (0, codegen_1._) `${hasPropFunc(gen)}.call(${data}, ${property})`; -} -function propertyInData(gen, data, property, ownProperties) { - const cond = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(property)} !== undefined`; - return ownProperties ? (0, codegen_1._) `${cond} && ${isOwnProperty(gen, data, property)}` : cond; -} -function noPropertyInData(gen, data, property, ownProperties) { - const cond = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(property)} === undefined`; - return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond; -} -function allSchemaProperties(schemaMap) { - return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : []; -} -function schemaProperties(it, schemaMap) { - return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p])); -} -function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) { - const dataAndSchema = passSchema ? (0, codegen_1._) `${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data; - const valCxt = [ - [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)], - [names_1.default.parentData, it.parentData], - [names_1.default.parentDataProperty, it.parentDataProperty], - [names_1.default.rootData, names_1.default.rootData], - [names_1.default.isAllOfVariant, it.isAllOfVariant ? 1 : 0], +// node_modules/undici/lib/handler/cache-handler.js +var require_cache_handler = __commonJS({ + "node_modules/undici/lib/handler/cache-handler.js"(exports, module3) { + "use strict"; + var util = require_util(); + var { + parseCacheControlHeader, + parseVaryHeader, + isEtagUsable + } = require_cache(); + var { parseHttpDate } = require_date(); + function noop() { + } + var HEURISTICALLY_CACHEABLE_STATUS_CODES = [ + 200, + 203, + 204, + 206, + 300, + 301, + 308, + 404, + 405, + 410, + 414, + 501 ]; - if (it.opts.dynamicRef) - valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]); - const args = (0, codegen_1._) `${dataAndSchema}, ${gen.object(...valCxt)}`; - return context !== codegen_1.nil ? (0, codegen_1._) `${func}.call(${context}, ${args})` : (0, codegen_1._) `${func}(${args})`; -} -const newRegExp = (0, codegen_1._) `new RegExp`; -function usePattern({ gen, it: { opts } }, pattern) { - const u = opts.unicodeRegExp ? "u" : ""; - const { regExp } = opts.code; - const rx = regExp(pattern, u); - return gen.scopeValue("pattern", { - key: rx.toString(), - ref: rx, - code: (0, codegen_1._) `${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`, - }); -} -function validateArray(cxt) { - const { gen, data, keyword, it } = cxt; - const valid = gen.name("valid"); - if (it.allErrors) { - const validArr = gen.let("valid", true); - validateItems(() => gen.assign(validArr, false)); - return validArr; - } - gen.var(valid, true); - validateItems(() => gen.break()); - return valid; - function validateItems(notValid) { - const len = gen.const("len", (0, codegen_1._) `${data}.length`); - gen.forRange("i", 0, len, (i) => { - cxt.subschema({ - keyword, - dataProp: i, - dataPropType: util_1.Type.Num, - }, valid); - gen.if((0, codegen_1.not)(valid), notValid); - }); - } -} -function validateUnion(cxt) { - const { gen, schema, keyword, parentSchema, it } = cxt; - /* istanbul ignore if */ - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - if (it.opts.discriminator && parentSchema.discriminator) - return; - const alwaysValid = schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch)); - if (alwaysValid && !it.opts.unevaluated) - return; - const valid = gen.let("valid", false); - const schValid = gen.name("_valid"); - gen.block(() => schema.forEach((_sch, i) => { - const schCxt = cxt.subschema({ - keyword, - schemaProp: i, - compositeRule: true, - }, schValid); - gen.assign(valid, (0, codegen_1._) `${valid} || ${schValid}`); - const merged = cxt.mergeValidEvaluated(schCxt, schValid); - // can short-circuit if `unevaluatedProperties/Items` not supported (opts.unevaluated !== true) - // or if all properties and items were evaluated (it.props === true && it.items === true) - if (!merged) - gen.if((0, codegen_1.not)(valid)); - })); - cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); -} -//# sourceMappingURL=code.js.map - -/***/ }), - -/***/ 23663: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const def = { - keyword: "id", - code() { - throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID'); - }, -}; -exports["default"] = def; -//# sourceMappingURL=id.js.map - -/***/ }), - -/***/ 2168: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const id_1 = __nccwpck_require__(23663); -const ref_1 = __nccwpck_require__(24401); -const core = [ - "$schema", - "$id", - "$defs", - "$vocabulary", - { keyword: "$comment" }, - "definitions", - id_1.default, - ref_1.default, -]; -exports["default"] = core; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 24401: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getValidate = getValidate; -exports.callRef = callRef; -const ref_error_1 = __nccwpck_require__(33397); -const code_1 = __nccwpck_require__(9162); -const codegen_1 = __nccwpck_require__(34938); -const names_1 = __nccwpck_require__(34855); -const compile_1 = __nccwpck_require__(5831); -const util_1 = __nccwpck_require__(54313); -const def = { - keyword: "$ref", - schemaType: "string", - code(cxt) { - const { gen, schema: $ref, it } = cxt; - const { baseId, schemaEnv: env, validateName, opts, self } = it; - const { root } = env; - if (($ref === "#" || $ref === "#/") && baseId === root.baseId) - return callRootRef(); - const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref); - if (schOrEnv === undefined) - throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref); - if (schOrEnv instanceof compile_1.SchemaEnv) - return callValidate(schOrEnv); - return inlineRefSchema(schOrEnv); - function callRootRef() { - if (env === root) - return callRef(cxt, validateName, env, env.$async); - const rootName = gen.scopeValue("root", { ref: root }); - return callRef(cxt, (0, codegen_1._) `${rootName}.validate`, root, root.$async); + var NOT_UNDERSTOOD_STATUS_CODES = [ + 206 + ]; + var MAX_RESPONSE_AGE = 2147483647e3; + var CacheHandler = class { + /** + * @type {import('../../types/cache-interceptor.d.ts').default.CacheKey} + */ + #cacheKey; + /** + * @type {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions['type']} + */ + #cacheType; + /** + * @type {number | undefined} + */ + #cacheByDefault; + /** + * @type {import('../../types/cache-interceptor.d.ts').default.CacheStore} + */ + #store; + /** + * @type {import('../../types/dispatcher.d.ts').default.DispatchHandler} + */ + #handler; + /** + * @type {import('node:stream').Writable | undefined} + */ + #writeStream; + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} opts + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey + * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler + */ + constructor({ store, type: type2, cacheByDefault }, cacheKey, handler) { + this.#store = store; + this.#cacheType = type2; + this.#cacheByDefault = cacheByDefault; + this.#cacheKey = cacheKey; + this.#handler = handler; + } + onRequestStart(controller, context2) { + this.#writeStream?.destroy(); + this.#writeStream = void 0; + this.#handler.onRequestStart?.(controller, context2); + } + onRequestUpgrade(controller, statusCode, headers, socket) { + this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket); + } + /** + * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller + * @param {number} statusCode + * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders + * @param {string} statusMessage + */ + onResponseStart(controller, statusCode, resHeaders, statusMessage) { + const downstreamOnHeaders = () => this.#handler.onResponseStart?.( + controller, + statusCode, + resHeaders, + statusMessage + ); + const handler = this; + if (!util.safeHTTPMethods.includes(this.#cacheKey.method) && statusCode >= 200 && statusCode <= 399) { + try { + this.#store.delete(this.#cacheKey)?.catch?.(noop); + } catch { + } + return downstreamOnHeaders(); } - function callValidate(sch) { - const v = getValidate(cxt, sch); - callRef(cxt, v, sch, sch.$async); + const cacheControlHeader = resHeaders["cache-control"]; + const heuristicallyCacheable = resHeaders["last-modified"] && HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode); + if (!cacheControlHeader && !resHeaders["expires"] && !heuristicallyCacheable && !this.#cacheByDefault) { + return downstreamOnHeaders(); } - function inlineRefSchema(sch) { - const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch }); - const valid = gen.name("valid"); - const schCxt = cxt.subschema({ - schema: sch, - dataTypes: [], - schemaPath: codegen_1.nil, - topSchemaRef: schName, - errSchemaPath: $ref, - }, valid, it.isAllOfVariant // pass isAllOfVariant into inlined $ref - ); - cxt.mergeEvaluated(schCxt); - cxt.ok(valid); + const cacheControlDirectives = cacheControlHeader ? parseCacheControlHeader(cacheControlHeader) : {}; + if (!canCacheResponse(this.#cacheType, statusCode, resHeaders, cacheControlDirectives, this.#cacheKey.headers)) { + return downstreamOnHeaders(); } - }, -}; -function getValidate(cxt, sch) { - const { gen } = cxt; - return sch.validate - ? gen.scopeValue("validate", { ref: sch.validate }) - : (0, codegen_1._) `${gen.scopeValue("wrapper", { ref: sch })}.validate`; -} -function callRef(cxt, v, sch, $async) { - const { gen, it } = cxt; - const { allErrors, schemaEnv: env, opts } = it; - const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil; - if ($async) - callAsyncRef(); - else - callSyncRef(); - function callAsyncRef() { - if (!env.$async) - throw new Error("async schema referenced by sync schema"); - const valid = gen.let("valid"); - gen.try(() => { - gen.code((0, codegen_1._) `await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`); - addEvaluatedFrom(v); // TODO will not work with async, it has to be returned with the result - if (!allErrors) - gen.assign(valid, true); - }, (e) => { - gen.if((0, codegen_1._) `!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e)); - addErrorsFrom(e); - if (!allErrors) - gen.assign(valid, false); - }); - cxt.ok(valid); - } - function callSyncRef() { - const visitedNodes = gen.name("visitedNodes"); - gen.code((0, codegen_1._) `const ${visitedNodes} = (typeof visitedNodesForRef !== 'undefined') && visitedNodesForRef.get(${v}) || new Set()`); - gen.if((0, codegen_1._) `!${visitedNodes}.has(${cxt.data})`, () => { - gen.code((0, codegen_1._) `if (typeof visitedNodesForRef !== 'undefined') visitedNodesForRef.set(${v}, ${visitedNodes})`); - gen.code((0, codegen_1._) `const dataNode = ${cxt.data}`); - gen.code((0, codegen_1._) `if (typeof dataNode === "object" && dataNode !== null) ${visitedNodes}.add(dataNode)`); - const res = cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v)); - gen.code((0, codegen_1._) `${visitedNodes}.delete(dataNode)`); - return res; - }); - } - function addErrorsFrom(source) { - const errs = (0, codegen_1._) `${source}.errors`; - gen.assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); // TODO tagged - gen.assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`); - } - function addEvaluatedFrom(source) { - var _a; - if (!it.opts.unevaluated) - return; - const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated; - // TODO refactor - if (it.props !== true) { - if (schEvaluated && !schEvaluated.dynamicProps) { - if (schEvaluated.props !== undefined) { - it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props); - } - } - else { - const props = gen.var("props", (0, codegen_1._) `${source}.evaluated.props`); - it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name); - } + const now = Date.now(); + const resAge = resHeaders.age ? getAge(resHeaders.age) : void 0; + if (resAge && resAge >= MAX_RESPONSE_AGE) { + return downstreamOnHeaders(); + } + const resDate = typeof resHeaders.date === "string" ? parseHttpDate(resHeaders.date) : void 0; + const staleAt = determineStaleAt(this.#cacheType, now, resAge, resHeaders, resDate, cacheControlDirectives) ?? this.#cacheByDefault; + if (staleAt === void 0 || resAge && resAge > staleAt) { + return downstreamOnHeaders(); + } + const baseTime = resDate ? resDate.getTime() : now; + const absoluteStaleAt = staleAt + baseTime; + if (now >= absoluteStaleAt) { + return downstreamOnHeaders(); + } + let varyDirectives; + if (this.#cacheKey.headers && resHeaders.vary) { + varyDirectives = parseVaryHeader(resHeaders.vary, this.#cacheKey.headers); + if (!varyDirectives) { + return downstreamOnHeaders(); + } } - if (it.items !== true) { - if (schEvaluated && !schEvaluated.dynamicItems) { - if (schEvaluated.items !== undefined) { - it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items); + const deleteAt = determineDeleteAt(baseTime, cacheControlDirectives, absoluteStaleAt); + const strippedHeaders = stripNecessaryHeaders(resHeaders, cacheControlDirectives); + const value = { + statusCode, + statusMessage, + headers: strippedHeaders, + vary: varyDirectives, + cacheControlDirectives, + cachedAt: resAge ? now - resAge : now, + staleAt: absoluteStaleAt, + deleteAt + }; + if (statusCode === 304) { + const handle304 = (cachedValue) => { + if (!cachedValue) { + return downstreamOnHeaders(); + } + value.statusCode = cachedValue.statusCode; + value.statusMessage = cachedValue.statusMessage; + value.etag = cachedValue.etag; + value.headers = { ...cachedValue.headers, ...strippedHeaders }; + downstreamOnHeaders(); + this.#writeStream = this.#store.createWriteStream(this.#cacheKey, value); + if (!this.#writeStream || !cachedValue?.body) { + return; + } + if (typeof cachedValue.body.values === "function") { + const bodyIterator = cachedValue.body.values(); + const streamCachedBody = () => { + for (const chunk of bodyIterator) { + const full = this.#writeStream.write(chunk) === false; + this.#handler.onResponseData?.(controller, chunk); + if (full) { + break; + } } + }; + this.#writeStream.on("error", function() { + handler.#writeStream = void 0; + handler.#store.delete(handler.#cacheKey); + }).on("drain", () => { + streamCachedBody(); + }).on("close", function() { + if (handler.#writeStream === this) { + handler.#writeStream = void 0; + } + }); + streamCachedBody(); + } else if (typeof cachedValue.body.on === "function") { + cachedValue.body.on("data", (chunk) => { + this.#writeStream.write(chunk); + this.#handler.onResponseData?.(controller, chunk); + }).on("end", () => { + this.#writeStream.end(); + }).on("error", () => { + this.#writeStream = void 0; + this.#store.delete(this.#cacheKey); + }); + this.#writeStream.on("error", function() { + handler.#writeStream = void 0; + handler.#store.delete(handler.#cacheKey); + }).on("close", function() { + if (handler.#writeStream === this) { + handler.#writeStream = void 0; + } + }); } - else { - const items = gen.var("items", (0, codegen_1._) `${source}.evaluated.items`); - it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name); - } + }; + const result = this.#store.get(this.#cacheKey); + if (result && typeof result.then === "function") { + result.then(handle304); + } else { + handle304(result); + } + } else { + if (typeof resHeaders.etag === "string" && isEtagUsable(resHeaders.etag)) { + value.etag = resHeaders.etag; + } + this.#writeStream = this.#store.createWriteStream(this.#cacheKey, value); + if (!this.#writeStream) { + return downstreamOnHeaders(); + } + this.#writeStream.on("drain", () => controller.resume()).on("error", function() { + handler.#writeStream = void 0; + handler.#store.delete(handler.#cacheKey); + }).on("close", function() { + if (handler.#writeStream === this) { + handler.#writeStream = void 0; + } + controller.resume(); + }); + downstreamOnHeaders(); } - } -} -exports["default"] = def; -//# sourceMappingURL=ref.js.map - -/***/ }), - -/***/ 88492: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const types_1 = __nccwpck_require__(15336); -const compile_1 = __nccwpck_require__(5831); -const util_1 = __nccwpck_require__(54313); -const error = { - message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag - ? `tag "${tagName}" must be string` - : `value of tag "${tagName}" must be in oneOf or anyOf`, - params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._) `{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`, -}; -const def = { - keyword: "discriminator", - type: "object", - schemaType: "object", - error, - code(cxt) { - const { gen, data, schema, parentSchema, it } = cxt; - const keyword = parentSchema.oneOf ? "oneOf" : parentSchema.anyOf ? "anyOf" : undefined; - if (!it.opts.discriminator) { - throw new Error("discriminator: requires discriminator option"); - } - const tagName = schema.propertyName; - if (typeof tagName != "string") - throw new Error("discriminator: requires propertyName"); - if (!keyword) - throw new Error("discriminator: requires oneOf or anyOf composite keyword"); - const parentSchemaVariants = parentSchema[keyword]; - const valid = gen.let("valid", false); - const tag = gen.const("tag", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(tagName)}`); - gen.if((0, codegen_1._) `typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName })); - cxt.ok(valid); - function validateMapping() { - const mapping = getMapping(); - gen.if(false); - for (const tagValue in mapping) { - gen.elseIf((0, codegen_1._) `${tag} === ${tagValue}`); - gen.assign(valid, applyTagSchema(mapping[tagValue])); - } - gen.else(); - cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName }); - gen.endIf(); + } + onResponseData(controller, chunk) { + if (this.#writeStream?.write(chunk) === false) { + controller.pause(); } - function applyTagSchema(schemaProp) { - const _valid = gen.name("valid"); - const schCxt = cxt.subschema({ keyword, schemaProp }, _valid); - cxt.mergeEvaluated(schCxt, codegen_1.Name); - return _valid; + this.#handler.onResponseData?.(controller, chunk); + } + onResponseEnd(controller, trailers) { + this.#writeStream?.end(); + this.#handler.onResponseEnd?.(controller, trailers); + } + onResponseError(controller, err) { + this.#writeStream?.destroy(err); + this.#writeStream = void 0; + this.#handler.onResponseError?.(controller, err); + } + }; + function canCacheResponse(cacheType, statusCode, resHeaders, cacheControlDirectives, reqHeaders) { + if (statusCode < 200 || NOT_UNDERSTOOD_STATUS_CODES.includes(statusCode)) { + return false; + } + if (!HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode) && !resHeaders["expires"] && !cacheControlDirectives.public && cacheControlDirectives["max-age"] === void 0 && // RFC 9111: a private response directive, if the cache is not shared + !(cacheControlDirectives.private && cacheType === "private") && !(cacheControlDirectives["s-maxage"] !== void 0 && cacheType === "shared")) { + return false; + } + if (cacheControlDirectives["no-store"]) { + return false; + } + if (cacheType === "shared" && cacheControlDirectives.private === true) { + return false; + } + if (resHeaders.vary?.includes("*")) { + return false; + } + if (reqHeaders?.authorization) { + if (!cacheControlDirectives.public && !cacheControlDirectives["s-maxage"] && !cacheControlDirectives["must-revalidate"]) { + return false; } - function getMapping() { - var _a; - const discriminatorMapping = {}; - const topRequired = hasRequired(parentSchema); - let tagRequired = true; - for (let i = 0; i < parentSchemaVariants.length; i++) { - let sch = parentSchemaVariants[i]; - const schRef = sch === null || sch === void 0 ? void 0 : sch.$ref; - if (schRef && schema.mapping) { - const { mapping } = schema; - const matchedKeys = Object.keys(mapping).filter((key) => mapping[key] === sch.$ref); - if (matchedKeys.length) { - for (const key of matchedKeys) { - addMapping(key, i); - } - continue; - } - } - if (schRef && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) { - sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, schRef); - if (sch instanceof compile_1.SchemaEnv) - sch = sch.schema; - } - const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName]; - if (typeof propSch != "object") { - throw new Error(`discriminator: ${keyword} subschemas (or referenced schemas) must have "properties/${tagName}" or match mapping`); - } - tagRequired = tagRequired && (topRequired || hasRequired(sch)); - addMappings(propSch, i); - } - if (!tagRequired) - throw new Error(`discriminator: "${tagName}" must be required`); - return discriminatorMapping; - function hasRequired({ required }) { - return Array.isArray(required) && required.includes(tagName); - } - function addMappings(sch, i) { - if (sch.const) { - addMapping(sch.const, i); - } - else if (sch.enum) { - for (const tagValue of sch.enum) { - addMapping(tagValue, i); - } - } - else { - throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`); - } - } - function addMapping(tagValue, i) { - if (typeof tagValue != "string" || tagValue in discriminatorMapping) { - throw new Error(`discriminator: "${tagName}" values must be unique strings`); - } - discriminatorMapping[tagValue] = i; - } + if (typeof reqHeaders.authorization !== "string") { + return false; } - }, -}; -exports["default"] = def; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 15336: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DiscrError = void 0; -var DiscrError; -(function (DiscrError) { - DiscrError["Tag"] = "tag"; - DiscrError["Mapping"] = "mapping"; -})(DiscrError || (exports.DiscrError = DiscrError = {})); -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 77301: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const core_1 = __nccwpck_require__(2168); -const validation_1 = __nccwpck_require__(87333); -const applicator_1 = __nccwpck_require__(7920); -const dynamic_1 = __nccwpck_require__(21303); -const next_1 = __nccwpck_require__(75128); -const unevaluated_1 = __nccwpck_require__(34454); -const format_1 = __nccwpck_require__(35068); -const metadata_1 = __nccwpck_require__(89406); -const draft2020Vocabularies = [ - dynamic_1.default, - core_1.default, - validation_1.default, - (0, applicator_1.default)(true), - format_1.default, - metadata_1.metadataVocabulary, - metadata_1.contentVocabulary, - next_1.default, - unevaluated_1.default, -]; -exports["default"] = draft2020Vocabularies; -//# sourceMappingURL=draft2020.js.map - -/***/ }), - -/***/ 73262: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.dynamicAnchor = dynamicAnchor; -const codegen_1 = __nccwpck_require__(34938); -const names_1 = __nccwpck_require__(34855); -const compile_1 = __nccwpck_require__(5831); -const ref_1 = __nccwpck_require__(24401); -const def = { - keyword: "$dynamicAnchor", - schemaType: "string", - code: (cxt) => dynamicAnchor(cxt, cxt.schema), -}; -function dynamicAnchor(cxt, anchor) { - const { gen, it } = cxt; - it.schemaEnv.root.dynamicAnchors[anchor] = true; - const v = (0, codegen_1._) `${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`; - const validate = it.errSchemaPath === "#" ? it.validateName : _getValidate(cxt); - gen.if((0, codegen_1._) `!${v}`, () => gen.assign(v, validate)); -} -function _getValidate(cxt) { - const { schemaEnv, schema, self } = cxt.it; - const { root, baseId, localRefs, meta } = schemaEnv.root; - const { schemaId } = self.opts; - const sch = new compile_1.SchemaEnv({ schema, schemaId, root, baseId, localRefs, meta }); - compile_1.compileSchema.call(self, sch); - return (0, ref_1.getValidate)(cxt, sch); -} -exports["default"] = def; -//# sourceMappingURL=dynamicAnchor.js.map - -/***/ }), - -/***/ 70265: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.dynamicRef = dynamicRef; -const codegen_1 = __nccwpck_require__(34938); -const names_1 = __nccwpck_require__(34855); -const ref_1 = __nccwpck_require__(24401); -const def = { - keyword: "$dynamicRef", - schemaType: "string", - code: (cxt) => dynamicRef(cxt, cxt.schema), -}; -function dynamicRef(cxt, ref) { - const { gen, keyword, it } = cxt; - if (ref[0] !== "#") - throw new Error(`"${keyword}" only supports hash fragment reference`); - const anchor = ref.slice(1); - if (it.allErrors) { - _dynamicRef(); - } - else { - const valid = gen.let("valid", false); - _dynamicRef(valid); - cxt.ok(valid); - } - function _dynamicRef(valid) { - // TODO the assumption here is that `recursiveRef: #` always points to the root - // of the schema object, which is not correct, because there may be $id that - // makes # point to it, and the target schema may not contain dynamic/recursiveAnchor. - // Because of that 2 tests in recursiveRef.json fail. - // This is a similar problem to #815 (`$id` doesn't alter resolution scope for `{ "$ref": "#" }`). - // (This problem is not tested in JSON-Schema-Test-Suite) - if (it.schemaEnv.root.dynamicAnchors[anchor]) { - const v = gen.let("_v", (0, codegen_1._) `${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`); - gen.if(v, _callRef(v, valid), _callRef(it.validateName, valid)); + if (Array.isArray(cacheControlDirectives["no-cache"]) && cacheControlDirectives["no-cache"].includes("authorization")) { + return false; } - else { - _callRef(it.validateName, valid)(); + if (Array.isArray(cacheControlDirectives["private"]) && cacheControlDirectives["private"].includes("authorization")) { + return false; } + } + return true; } - function _callRef(validate, valid) { - return valid - ? () => gen.block(() => { - (0, ref_1.callRef)(cxt, validate); - gen.let(valid, true); - }) - : () => (0, ref_1.callRef)(cxt, validate); + function getAge(ageHeader) { + const age = parseInt(Array.isArray(ageHeader) ? ageHeader[0] : ageHeader); + return isNaN(age) ? void 0 : age * 1e3; } -} -exports["default"] = def; -//# sourceMappingURL=dynamicRef.js.map - -/***/ }), - -/***/ 21303: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const dynamicAnchor_1 = __nccwpck_require__(73262); -const dynamicRef_1 = __nccwpck_require__(70265); -const recursiveAnchor_1 = __nccwpck_require__(35445); -const recursiveRef_1 = __nccwpck_require__(87606); -const dynamic = [dynamicAnchor_1.default, dynamicRef_1.default, recursiveAnchor_1.default, recursiveRef_1.default]; -exports["default"] = dynamic; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 35445: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const dynamicAnchor_1 = __nccwpck_require__(73262); -const util_1 = __nccwpck_require__(54313); -const def = { - keyword: "$recursiveAnchor", - schemaType: "boolean", - code(cxt) { - if (cxt.schema) - (0, dynamicAnchor_1.dynamicAnchor)(cxt, ""); - else - (0, util_1.checkStrictMode)(cxt.it, "$recursiveAnchor: false is ignored"); - }, -}; -exports["default"] = def; -//# sourceMappingURL=recursiveAnchor.js.map - -/***/ }), - -/***/ 87606: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const dynamicRef_1 = __nccwpck_require__(70265); -const def = { - keyword: "$recursiveRef", - schemaType: "string", - code: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema), -}; -exports["default"] = def; -//# sourceMappingURL=recursiveRef.js.map - -/***/ }), - -/***/ 30975: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const error = { - message: ({ schemaCode }) => (0, codegen_1.str) `must match format "${schemaCode}"`, - params: ({ schemaCode }) => (0, codegen_1._) `{format: ${schemaCode}}`, -}; -const def = { - keyword: "format", - type: ["number", "string"], - schemaType: "string", - $data: true, - error, - code(cxt, ruleType) { - const { gen, data, $data, schema, schemaCode, it } = cxt; - const { opts, errSchemaPath, schemaEnv, self } = it; - if (!opts.validateFormats) - return; - if ($data) - validate$DataFormat(); - else - validateFormat(); - function validate$DataFormat() { - const fmts = gen.scopeValue("formats", { - ref: self.formats, - code: opts.code.formats, - }); - const fDef = gen.const("fDef", (0, codegen_1._) `${fmts}[${schemaCode}]`); - const fType = gen.let("fType"); - const format = gen.let("format"); - // TODO simplify - gen.if((0, codegen_1._) `typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._) `${fDef}.type || "string"`).assign(format, (0, codegen_1._) `${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._) `"string"`).assign(format, fDef)); - cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt())); - function unknownFmt() { - if (opts.strictSchema === false) - return codegen_1.nil; - return (0, codegen_1._) `${schemaCode} && !${format}`; - } - function invalidFmt() { - const callFormat = schemaEnv.$async - ? (0, codegen_1._) `(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` - : (0, codegen_1._) `${format}(${data})`; - const validData = (0, codegen_1._) `(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))`; - return (0, codegen_1._) `${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`; - } + function determineStaleAt(cacheType, now, age, resHeaders, responseDate, cacheControlDirectives) { + if (cacheType === "shared") { + const sMaxAge = cacheControlDirectives["s-maxage"]; + if (sMaxAge !== void 0) { + return sMaxAge > 0 ? sMaxAge * 1e3 : void 0; } - function validateFormat() { - const formatDef = self.formats[schema]; - if (!formatDef) { - unknownFormat(); - return; - } - if (formatDef === true) - return; - const [fmtType, format, fmtRef] = getFormat(formatDef); - if (fmtType === ruleType) - cxt.pass(validCondition()); - function unknownFormat() { - if (opts.strictSchema === false) { - self.logger.warn(unknownMsg()); - return; - } - throw new Error(unknownMsg()); - function unknownMsg() { - return `unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`; - } - } - function getFormat(fmtDef) { - const code = fmtDef instanceof RegExp - ? (0, codegen_1.regexpCode)(fmtDef) - : opts.code.formats - ? (0, codegen_1._) `${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` - : undefined; - const fmt = gen.scopeValue("formats", { key: schema, ref: fmtDef, code }); - if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) { - return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._) `${fmt}.validate`]; - } - return ["string", fmtDef, fmt]; + } + const maxAge = cacheControlDirectives["max-age"]; + if (maxAge !== void 0) { + return maxAge > 0 ? maxAge * 1e3 : void 0; + } + if (typeof resHeaders.expires === "string") { + const expiresDate = parseHttpDate(resHeaders.expires); + if (expiresDate) { + if (now >= expiresDate.getTime()) { + return void 0; + } + if (responseDate) { + if (responseDate >= expiresDate) { + return void 0; } - function validCondition() { - if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) { - if (!schemaEnv.$async) - throw new Error("async format in sync schema"); - return (0, codegen_1._) `await ${fmtRef}(${data})`; - } - return typeof format == "function" ? (0, codegen_1._) `${fmtRef}(${data})` : (0, codegen_1._) `${fmtRef}.test(${data})`; + if (age !== void 0 && age > expiresDate - responseDate) { + return void 0; } + } + return expiresDate.getTime() - now; } - }, -}; -exports["default"] = def; -//# sourceMappingURL=format.js.map - -/***/ }), - -/***/ 35068: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const format_1 = __nccwpck_require__(30975); -const format = [format_1.default]; -exports["default"] = format; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 89406: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.contentVocabulary = exports.metadataVocabulary = void 0; -exports.metadataVocabulary = [ - "title", - "description", - "default", - "deprecated", - "readOnly", - "writeOnly", - "examples", -]; -exports.contentVocabulary = [ - "contentMediaType", - "contentEncoding", - "contentSchema", -]; -//# sourceMappingURL=metadata.js.map - -/***/ }), - -/***/ 75128: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const dependentRequired_1 = __nccwpck_require__(80979); -const dependentSchemas_1 = __nccwpck_require__(30314); -const limitContains_1 = __nccwpck_require__(55774); -const next = [dependentRequired_1.default, dependentSchemas_1.default, limitContains_1.default]; -exports["default"] = next; -//# sourceMappingURL=next.js.map - -/***/ }), - -/***/ 34454: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const unevaluatedProperties_1 = __nccwpck_require__(85742); -const unevaluatedItems_1 = __nccwpck_require__(72202); -const unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default]; -exports["default"] = unevaluated; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 72202: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const error = { - message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`, - params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`, -}; -const def = { - keyword: "unevaluatedItems", - type: "array", - schemaType: ["boolean", "object"], - error, - code(cxt) { - const { gen, schema, data, it } = cxt; - const items = it.items || 0; - if (items === true) - return; - const len = gen.const("len", (0, codegen_1._) `${data}.length`); - if (schema === false) { - cxt.setParams({ len: items }); - cxt.fail((0, codegen_1._) `${len} > ${items}`); - } - else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) { - const valid = gen.var("valid", (0, codegen_1._) `${len} <= ${items}`); - gen.if((0, codegen_1.not)(valid), () => validateItems(valid, items)); - cxt.ok(valid); + } + if (typeof resHeaders["last-modified"] === "string") { + const lastModified = new Date(resHeaders["last-modified"]); + if (isValidDate(lastModified)) { + if (lastModified.getTime() >= now) { + return void 0; + } + const responseAge = now - lastModified.getTime(); + return responseAge * 0.1; } - it.items = true; - function validateItems(valid, from) { - gen.forRange("i", from, len, (i) => { - cxt.subschema({ keyword: "unevaluatedItems", dataProp: i, dataPropType: util_1.Type.Num }, valid); - if (!it.allErrors) - gen.if((0, codegen_1.not)(valid), () => gen.break()); - }); + } + if (cacheControlDirectives.immutable) { + return 31536e3; + } + return void 0; + } + function determineDeleteAt(now, cacheControlDirectives, staleAt) { + let staleWhileRevalidate = -Infinity; + let staleIfError = -Infinity; + let immutable = -Infinity; + if (cacheControlDirectives["stale-while-revalidate"]) { + staleWhileRevalidate = staleAt + cacheControlDirectives["stale-while-revalidate"] * 1e3; + } + if (cacheControlDirectives["stale-if-error"]) { + staleIfError = staleAt + cacheControlDirectives["stale-if-error"] * 1e3; + } + if (cacheControlDirectives.immutable && staleWhileRevalidate === -Infinity && staleIfError === -Infinity) { + immutable = now + 31536e6; + } + if (staleWhileRevalidate === -Infinity && staleIfError === -Infinity && immutable === -Infinity) { + const freshnessLifetime = staleAt - now; + return staleAt + freshnessLifetime; + } + return Math.max(staleAt, staleWhileRevalidate, staleIfError, immutable); + } + function stripNecessaryHeaders(resHeaders, cacheControlDirectives) { + const headersToRemove = [ + "connection", + "proxy-authenticate", + "proxy-authentication-info", + "proxy-authorization", + "proxy-connection", + "te", + "transfer-encoding", + "upgrade", + // We'll add age back when serving it + "age" + ]; + if (resHeaders["connection"]) { + if (Array.isArray(resHeaders["connection"])) { + headersToRemove.push(...resHeaders["connection"].map((header) => header.trim())); + } else { + headersToRemove.push(...resHeaders["connection"].split(",").map((header) => header.trim())); } - }, -}; -exports["default"] = def; -//# sourceMappingURL=unevaluatedItems.js.map - -/***/ }), - -/***/ 85742: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + } + if (Array.isArray(cacheControlDirectives["no-cache"])) { + headersToRemove.push(...cacheControlDirectives["no-cache"]); + } + if (Array.isArray(cacheControlDirectives["private"])) { + headersToRemove.push(...cacheControlDirectives["private"]); + } + let strippedHeaders; + for (const headerName of headersToRemove) { + if (resHeaders[headerName]) { + strippedHeaders ??= { ...resHeaders }; + delete strippedHeaders[headerName]; + } + } + return strippedHeaders ?? resHeaders; + } + function isValidDate(date) { + return date instanceof Date && Number.isFinite(date.valueOf()); + } + module3.exports = CacheHandler; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const names_1 = __nccwpck_require__(34855); -const error = { - message: "must NOT have unevaluated properties", - params: ({ params }) => (0, codegen_1._) `{unevaluatedProperty: ${params.unevaluatedProperty}}`, -}; -const def = { - keyword: "unevaluatedProperties", - type: "object", - schemaType: ["boolean", "object"], - allowUndefined: true, - trackErrors: true, - error, - code(cxt) { - const { gen, schema = cxt.it.opts.defaultUnevaluatedProperties, data, errsCount, it } = cxt; - const isForced = cxt.schema === undefined && cxt.it.opts.defaultUnevaluatedProperties === false; - /* istanbul ignore if */ - if (!errsCount) - throw new Error("ajv implementation error"); - const { allErrors, props } = it; - if (props instanceof codegen_1.Name) { - gen.if((0, codegen_1._) `${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key)))); - } - else if (props !== true) { - // eslint-disable-next-line @typescript-eslint/explicit-function-return-type - const staticCheck = () => gen.forIn("key", data, (key) => props === undefined - ? unevaluatedPropCode(key) - : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key))); - if (isForced && it.errorPath.emptyStr()) { - // $refs are compiled into functions - // We need to check in runtime if function was called from allOf. - // We need to check only on the top level of the function: - // it is ensured with `it.errorPath.emptyStr()` check - gen.if((0, codegen_1._) `${names_1.default.isAllOfVariant} === 0`, staticCheck); - } - else { - staticCheck(); +// node_modules/undici/lib/cache/memory-cache-store.js +var require_memory_cache_store = __commonJS({ + "node_modules/undici/lib/cache/memory-cache-store.js"(exports, module3) { + "use strict"; + var { Writable } = __require("node:stream"); + var { EventEmitter } = __require("node:events"); + var { assertCacheKey, assertCacheValue } = require_cache(); + var MemoryCacheStore = class extends EventEmitter { + #maxCount = 1024; + #maxSize = 104857600; + // 100MB + #maxEntrySize = 5242880; + // 5MB + #size = 0; + #count = 0; + #entries = /* @__PURE__ */ new Map(); + #hasEmittedMaxSizeEvent = false; + /** + * @param {import('../../types/cache-interceptor.d.ts').default.MemoryCacheStoreOpts | undefined} [opts] + */ + constructor(opts) { + super(); + if (opts) { + if (typeof opts !== "object") { + throw new TypeError("MemoryCacheStore options must be an object"); + } + if (opts.maxCount !== void 0) { + if (typeof opts.maxCount !== "number" || !Number.isInteger(opts.maxCount) || opts.maxCount < 0) { + throw new TypeError("MemoryCacheStore options.maxCount must be a non-negative integer"); } - } - if (!isForced) { - // disable shot-circut for forced unevaluatedProperties=false - // we may run or not the check in runtime so we can't short-circuit in compile-time - it.props = true; - } - cxt.ok((0, codegen_1._) `${errsCount} === ${names_1.default.errors}`); - function unevaluatedPropCode(key) { - if (schema === false) { - cxt.setParams({ unevaluatedProperty: key }); - cxt.error(); - if (!allErrors) - gen.break(); - return; + this.#maxCount = opts.maxCount; + } + if (opts.maxSize !== void 0) { + if (typeof opts.maxSize !== "number" || !Number.isInteger(opts.maxSize) || opts.maxSize < 0) { + throw new TypeError("MemoryCacheStore options.maxSize must be a non-negative integer"); } - if (!(0, util_1.alwaysValidSchema)(it, schema)) { - const valid = gen.name("valid"); - cxt.subschema({ - keyword: "unevaluatedProperties", - dataProp: key, - dataPropType: util_1.Type.Str, - }, valid); - if (!allErrors) - gen.if((0, codegen_1.not)(valid), () => gen.break()); + this.#maxSize = opts.maxSize; + } + if (opts.maxEntrySize !== void 0) { + if (typeof opts.maxEntrySize !== "number" || !Number.isInteger(opts.maxEntrySize) || opts.maxEntrySize < 0) { + throw new TypeError("MemoryCacheStore options.maxEntrySize must be a non-negative integer"); } + this.#maxEntrySize = opts.maxEntrySize; + } } - function unevaluatedDynamic(evaluatedProps, key) { - return (0, codegen_1._) `!${evaluatedProps} || !${evaluatedProps}[${key}]`; - } - function unevaluatedStatic(evaluatedProps, key) { - const ps = []; - for (const p in evaluatedProps) { - if (evaluatedProps[p] === true) - ps.push((0, codegen_1._) `${key} !== ${p}`); + } + /** + * Get the current size of the cache in bytes + * @returns {number} The current size of the cache in bytes + */ + get size() { + return this.#size; + } + /** + * Check if the cache is full (either max size or max count reached) + * @returns {boolean} True if the cache is full, false otherwise + */ + isFull() { + return this.#size >= this.#maxSize || this.#count >= this.#maxCount; + } + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} req + * @returns {import('../../types/cache-interceptor.d.ts').default.GetResult | undefined} + */ + get(key) { + assertCacheKey(key); + const topLevelKey = `${key.origin}:${key.path}`; + const now = Date.now(); + const entries = this.#entries.get(topLevelKey); + const entry = entries ? findEntry(key, entries, now) : null; + return entry == null ? void 0 : { + statusMessage: entry.statusMessage, + statusCode: entry.statusCode, + headers: entry.headers, + body: entry.body, + vary: entry.vary ? entry.vary : void 0, + etag: entry.etag, + cacheControlDirectives: entry.cacheControlDirectives, + cachedAt: entry.cachedAt, + staleAt: entry.staleAt, + deleteAt: entry.deleteAt + }; + } + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue} val + * @returns {Writable | undefined} + */ + createWriteStream(key, val) { + assertCacheKey(key); + assertCacheValue(val); + const topLevelKey = `${key.origin}:${key.path}`; + const store = this; + const entry = { ...key, ...val, body: [], size: 0 }; + return new Writable({ + write(chunk, encoding, callback) { + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, encoding); + } + entry.size += chunk.byteLength; + if (entry.size >= store.#maxEntrySize) { + this.destroy(); + } else { + entry.body.push(chunk); + } + callback(null); + }, + final(callback) { + let entries = store.#entries.get(topLevelKey); + if (!entries) { + entries = []; + store.#entries.set(topLevelKey, entries); + } + const previousEntry = findEntry(key, entries, Date.now()); + if (previousEntry) { + const index = entries.indexOf(previousEntry); + entries.splice(index, 1, entry); + store.#size -= previousEntry.size; + } else { + entries.push(entry); + store.#count += 1; + } + store.#size += entry.size; + if (store.#size > store.#maxSize || store.#count > store.#maxCount) { + if (!store.#hasEmittedMaxSizeEvent) { + store.emit("maxSizeExceeded", { + size: store.#size, + maxSize: store.#maxSize, + count: store.#count, + maxCount: store.#maxCount + }); + store.#hasEmittedMaxSizeEvent = true; + } + for (const [key2, entries2] of store.#entries) { + for (const entry2 of entries2.splice(0, entries2.length / 2)) { + store.#size -= entry2.size; + store.#count -= 1; + } + if (entries2.length === 0) { + store.#entries.delete(key2); + } + } + if (store.#size < store.#maxSize && store.#count < store.#maxCount) { + store.#hasEmittedMaxSizeEvent = false; + } } - return (0, codegen_1.and)(...ps); + callback(null); + } + }); + } + /** + * @param {CacheKey} key + */ + delete(key) { + if (typeof key !== "object") { + throw new TypeError(`expected key to be object, got ${typeof key}`); } - }, -}; -exports["default"] = def; -//# sourceMappingURL=unevaluatedProperties.js.map - -/***/ }), - -/***/ 49694: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const equal_1 = __nccwpck_require__(23903); -const error = { - message: "must be equal to constant", - params: ({ schemaCode }) => (0, codegen_1._) `{allowedValue: ${schemaCode}}`, -}; -const def = { - keyword: "const", - $data: true, - error, - code(cxt) { - const { gen, data, $data, schemaCode, schema } = cxt; - if ($data || (schema && typeof schema == "object")) { - cxt.fail$data((0, codegen_1._) `!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`); + const topLevelKey = `${key.origin}:${key.path}`; + for (const entry of this.#entries.get(topLevelKey) ?? []) { + this.#size -= entry.size; + this.#count -= 1; } - else { - cxt.fail((0, codegen_1._) `${schema} !== ${data}`); + this.#entries.delete(topLevelKey); + } + }; + function findEntry(key, entries, now) { + return entries.find((entry) => entry.deleteAt > now && entry.method === key.method && (entry.vary == null || Object.keys(entry.vary).every((headerName) => { + if (entry.vary[headerName] === null) { + return key.headers[headerName] === void 0; } - }, -}; -exports["default"] = def; -//# sourceMappingURL=const.js.map - -/***/ }), - -/***/ 80979: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const dependencies_1 = __nccwpck_require__(95577); -const def = { - keyword: "dependentRequired", - type: "object", - schemaType: "object", - error: dependencies_1.error, - code: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt), -}; -exports["default"] = def; -//# sourceMappingURL=dependentRequired.js.map - -/***/ }), - -/***/ 62507: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + return entry.vary[headerName] === key.headers[headerName]; + }))); + } + module3.exports = MemoryCacheStore; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const equal_1 = __nccwpck_require__(23903); -const error = { - message: "must be equal to one of the allowed values", - params: ({ schemaCode }) => (0, codegen_1._) `{allowedValues: ${schemaCode}}`, -}; -const def = { - keyword: "enum", - schemaType: "array", - $data: true, - error, - code(cxt) { - const { gen, data, $data, schema, schemaCode, it } = cxt; - if (!$data && schema.length === 0) - throw new Error("enum must have non-empty array"); - const useLoop = schema.length >= it.opts.loopEnum; - let eql; - const getEql = () => (eql !== null && eql !== void 0 ? eql : (eql = (0, util_1.useFunc)(gen, equal_1.default))); - let valid; - if (useLoop || $data) { - valid = gen.let("valid"); - cxt.block$data(valid, loopEnum); +// node_modules/undici/lib/handler/cache-revalidation-handler.js +var require_cache_revalidation_handler = __commonJS({ + "node_modules/undici/lib/handler/cache-revalidation-handler.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var CacheRevalidationHandler = class { + #successful = false; + /** + * @type {((boolean, any) => void) | null} + */ + #callback; + /** + * @type {(import('../../types/dispatcher.d.ts').default.DispatchHandler)} + */ + #handler; + #context; + /** + * @type {boolean} + */ + #allowErrorStatusCodes; + /** + * @param {(boolean) => void} callback Function to call if the cached value is valid + * @param {import('../../types/dispatcher.d.ts').default.DispatchHandlers} handler + * @param {boolean} allowErrorStatusCodes + */ + constructor(callback, handler, allowErrorStatusCodes) { + if (typeof callback !== "function") { + throw new TypeError("callback must be a function"); + } + this.#callback = callback; + this.#handler = handler; + this.#allowErrorStatusCodes = allowErrorStatusCodes; + } + onRequestStart(_5, context2) { + this.#successful = false; + this.#context = context2; + } + onRequestUpgrade(controller, statusCode, headers, socket) { + this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket); + } + onResponseStart(controller, statusCode, headers, statusMessage) { + assert(this.#callback != null); + this.#successful = statusCode === 304 || this.#allowErrorStatusCodes && statusCode >= 500 && statusCode <= 504; + this.#callback(this.#successful, this.#context); + this.#callback = null; + if (this.#successful) { + return true; + } + this.#handler.onRequestStart?.(controller, this.#context); + this.#handler.onResponseStart?.( + controller, + statusCode, + headers, + statusMessage + ); + } + onResponseData(controller, chunk) { + if (this.#successful) { + return; } - else { - /* istanbul ignore if */ - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - const vSchema = gen.const("vSchema", schemaCode); - valid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i))); + return this.#handler.onResponseData?.(controller, chunk); + } + onResponseEnd(controller, trailers) { + if (this.#successful) { + return; } - cxt.pass(valid); - function loopEnum() { - gen.assign(valid, false); - gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._) `${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break())); + this.#handler.onResponseEnd?.(controller, trailers); + } + onResponseError(controller, err) { + if (this.#successful) { + return; } - function equalCode(vSchema, i) { - const sch = schema[i]; - return typeof sch === "object" && sch !== null - ? (0, codegen_1._) `${getEql()}(${data}, ${vSchema}[${i}])` - : (0, codegen_1._) `${data} === ${sch}`; + if (this.#callback) { + this.#callback(false); + this.#callback = null; } - }, -}; -exports["default"] = def; -//# sourceMappingURL=enum.js.map - -/***/ }), - -/***/ 87333: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const limitNumber_1 = __nccwpck_require__(19215); -const multipleOf_1 = __nccwpck_require__(99378); -const limitLength_1 = __nccwpck_require__(5167); -const pattern_1 = __nccwpck_require__(36448); -const limitProperties_1 = __nccwpck_require__(52016); -const required_1 = __nccwpck_require__(94279); -const limitItems_1 = __nccwpck_require__(30850); -const uniqueItems_1 = __nccwpck_require__(19136); -const const_1 = __nccwpck_require__(49694); -const enum_1 = __nccwpck_require__(62507); -const validation = [ - // number - limitNumber_1.default, - multipleOf_1.default, - // string - limitLength_1.default, - pattern_1.default, - // object - limitProperties_1.default, - required_1.default, - // array - limitItems_1.default, - uniqueItems_1.default, - // any - { keyword: "type", schemaType: ["string", "array"] }, - { keyword: "nullable", schemaType: "boolean" }, - const_1.default, - enum_1.default, -]; -exports["default"] = validation; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 55774: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const util_1 = __nccwpck_require__(54313); -const def = { - keyword: ["maxContains", "minContains"], - type: "array", - schemaType: "number", - code({ keyword, parentSchema, it }) { - if (parentSchema.contains === undefined) { - (0, util_1.checkStrictMode)(it, `"${keyword}" without "contains" is ignored`); + if (typeof this.#handler.onResponseError === "function") { + this.#handler.onResponseError(controller, err); + } else { + throw err; } - }, -}; -exports["default"] = def; -//# sourceMappingURL=limitContains.js.map - -/***/ }), - -/***/ 30850: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const error = { - message({ keyword, schemaCode }) { - const comp = keyword === "maxItems" ? "more" : "fewer"; - return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} items`; - }, - params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`, -}; -const def = { - keyword: ["maxItems", "minItems"], - type: "array", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { keyword, data, schemaCode } = cxt; - const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT; - cxt.fail$data((0, codegen_1._) `${data}.length ${op} ${schemaCode}`); - }, -}; -exports["default"] = def; -//# sourceMappingURL=limitItems.js.map - -/***/ }), - -/***/ 5167: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const ucs2length_1 = __nccwpck_require__(32862); -const error = { - message({ keyword, schemaCode }) { - const comp = keyword === "maxLength" ? "more" : "fewer"; - return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} characters`; - }, - params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`, -}; -const def = { - keyword: ["maxLength", "minLength"], - type: "string", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { keyword, data, schemaCode, it } = cxt; - const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT; - const len = it.opts.unicode === false ? (0, codegen_1._) `${data}.length` : (0, codegen_1._) `${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`; - cxt.fail$data((0, codegen_1._) `${len} ${op} ${schemaCode}`); - }, -}; -exports["default"] = def; -//# sourceMappingURL=limitLength.js.map - -/***/ }), - -/***/ 19215: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const ops = codegen_1.operators; -const KWDs = { - maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT }, - minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT }, - exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE }, - exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }, -}; -const error = { - message: ({ keyword, schemaCode }) => (0, codegen_1.str) `must be ${KWDs[keyword].okStr} ${schemaCode}`, - params: ({ keyword, schemaCode }) => (0, codegen_1._) `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`, -}; -const def = { - keyword: Object.keys(KWDs), - type: "number", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { keyword, data, schemaCode } = cxt; - cxt.fail$data((0, codegen_1._) `${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`); - }, -}; -exports["default"] = def; -//# sourceMappingURL=limitNumber.js.map - -/***/ }), - -/***/ 52016: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const error = { - message({ keyword, schemaCode }) { - const comp = keyword === "maxProperties" ? "more" : "fewer"; - return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} properties`; - }, - params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`, -}; -const def = { - keyword: ["maxProperties", "minProperties"], - type: "object", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { keyword, data, schemaCode } = cxt; - const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT; - cxt.fail$data((0, codegen_1._) `Object.keys(${data}).length ${op} ${schemaCode}`); - }, -}; -exports["default"] = def; -//# sourceMappingURL=limitProperties.js.map - -/***/ }), - -/***/ 99378: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const codegen_1 = __nccwpck_require__(34938); -const error = { - message: ({ schemaCode }) => (0, codegen_1.str) `must be multiple of ${schemaCode}`, - params: ({ schemaCode }) => (0, codegen_1._) `{multipleOf: ${schemaCode}}`, -}; -const def = { - keyword: "multipleOf", - type: "number", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { gen, data, schemaCode, it } = cxt; - // const bdt = bad$DataType(schemaCode, def.schemaType, $data) - const prec = it.opts.multipleOfPrecision; - const res = gen.let("res"); - const invalid = prec - ? (0, codegen_1._) `Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` - : (0, codegen_1._) `${res} !== parseInt(${res})`; - cxt.fail$data((0, codegen_1._) `(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`); - }, -}; -exports["default"] = def; -//# sourceMappingURL=multipleOf.js.map - -/***/ }), - -/***/ 36448: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const code_1 = __nccwpck_require__(9162); -const codegen_1 = __nccwpck_require__(34938); -const error = { - message: ({ schemaCode }) => (0, codegen_1.str) `must match pattern "${schemaCode}"`, - params: ({ schemaCode }) => (0, codegen_1._) `{pattern: ${schemaCode}}`, -}; -const def = { - keyword: "pattern", - type: "string", - schemaType: "string", - $data: true, - error, - code(cxt) { - const { data, $data, schema, schemaCode, it } = cxt; - // TODO regexp should be wrapped in try/catchs - const u = it.opts.unicodeRegExp ? "u" : ""; - const regExp = $data ? (0, codegen_1._) `(new RegExp(${schemaCode}, ${u}))` : (0, code_1.usePattern)(cxt, schema); - cxt.fail$data((0, codegen_1._) `!${regExp}.test(${data})`); - }, -}; -exports["default"] = def; -//# sourceMappingURL=pattern.js.map - -/***/ }), - -/***/ 94279: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + } + }; + module3.exports = CacheRevalidationHandler; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -const code_1 = __nccwpck_require__(9162); -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const error = { - message: ({ params: { missingProperty } }) => (0, codegen_1.str) `must have required property '${missingProperty}'`, - params: ({ params: { missingProperty } }) => (0, codegen_1._) `{missingProperty: ${missingProperty}}`, -}; -const def = { - keyword: "required", - type: "object", - schemaType: "array", - $data: true, - error, - code(cxt) { - const { gen, schema, schemaCode, data, $data, it } = cxt; - const { opts } = it; - if (!$data && schema.length === 0) - return; - const useLoop = schema.length >= opts.loopRequired; - if (it.allErrors) - allErrorsMode(); - else - exitOnErrorMode(); - if (opts.strictRequired) { - const props = cxt.parentSchema.properties; - const { definedProperties } = cxt.it; - for (const requiredKey of schema) { - if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === undefined && !definedProperties.has(requiredKey)) { - const schemaPath = it.schemaEnv.baseId + it.errSchemaPath; - const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`; - (0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired); - } - } +// node_modules/undici/lib/interceptor/cache.js +var require_cache2 = __commonJS({ + "node_modules/undici/lib/interceptor/cache.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var { Readable } = __require("node:stream"); + var util = require_util(); + var CacheHandler = require_cache_handler(); + var MemoryCacheStore = require_memory_cache_store(); + var CacheRevalidationHandler = require_cache_revalidation_handler(); + var { assertCacheStore, assertCacheMethods, makeCacheKey, normalizeHeaders, parseCacheControlHeader } = require_cache(); + var { AbortError } = require_errors(); + function assertCacheOrigins(origins, name) { + if (origins === void 0) return; + if (!Array.isArray(origins)) { + throw new TypeError(`expected ${name} to be an array or undefined, got ${typeof origins}`); + } + for (let i2 = 0; i2 < origins.length; i2++) { + const origin = origins[i2]; + if (typeof origin !== "string" && !(origin instanceof RegExp)) { + throw new TypeError(`expected ${name}[${i2}] to be a string or RegExp, got ${typeof origin}`); + } + } + } + var nop = () => { + }; + function needsRevalidation(result, cacheControlDirectives, { headers = {} }) { + if (cacheControlDirectives?.["no-cache"]) { + return true; + } + if (result.cacheControlDirectives?.["no-cache"] && !Array.isArray(result.cacheControlDirectives["no-cache"])) { + return true; + } + if (headers["if-modified-since"] || headers["if-none-match"]) { + return true; + } + return false; + } + function isStale(result, cacheControlDirectives) { + const now = Date.now(); + if (now > result.staleAt) { + if (cacheControlDirectives?.["max-stale"]) { + const gracePeriod = result.staleAt + cacheControlDirectives["max-stale"] * 1e3; + return now > gracePeriod; } - function allErrorsMode() { - if (useLoop || $data) { - cxt.block$data(codegen_1.nil, loopAllRequired); + return true; + } + if (cacheControlDirectives?.["min-fresh"]) { + const timeLeftTillStale = result.staleAt - now; + const threshold = cacheControlDirectives["min-fresh"] * 1e3; + return timeLeftTillStale <= threshold; + } + return false; + } + function withinStaleWhileRevalidateWindow(result) { + const staleWhileRevalidate = result.cacheControlDirectives?.["stale-while-revalidate"]; + if (!staleWhileRevalidate) { + return false; + } + const now = Date.now(); + const staleWhileRevalidateExpiry = result.staleAt + staleWhileRevalidate * 1e3; + return now <= staleWhileRevalidateExpiry; + } + function handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl) { + if (reqCacheControl?.["only-if-cached"]) { + let aborted = false; + try { + if (typeof handler.onConnect === "function") { + handler.onConnect(() => { + aborted = true; + }); + if (aborted) { + return; } - else { - for (const prop of schema) { - (0, code_1.checkReportMissingProp)(cxt, prop); - } + } + if (typeof handler.onHeaders === "function") { + handler.onHeaders(504, [], nop, "Gateway Timeout"); + if (aborted) { + return; } + } + if (typeof handler.onComplete === "function") { + handler.onComplete([]); + } + } catch (err) { + if (typeof handler.onError === "function") { + handler.onError(err); + } } - function exitOnErrorMode() { - const missing = gen.let("missing"); - if (useLoop || $data) { - const valid = gen.let("valid", true); - cxt.block$data(valid, () => loopUntilMissing(missing, valid)); - cxt.ok(valid); - } - else { - gen.if((0, code_1.checkMissingProp)(cxt, schema, missing)); - (0, code_1.reportMissingProp)(cxt, missing); - gen.else(); - } - } - function loopAllRequired() { - gen.forOf("prop", schemaCode, (prop) => { - cxt.setParams({ missingProperty: prop }); - gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error()); - }); - } - function loopUntilMissing(missing, valid) { - cxt.setParams({ missingProperty: missing }); - gen.forOf(missing, schemaCode, () => { - gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties)); - gen.if((0, codegen_1.not)(valid), () => { - cxt.error(); - gen.break(); - }); - }, codegen_1.nil); - } - }, -}; -exports["default"] = def; -//# sourceMappingURL=required.js.map - -/***/ }), - -/***/ 19136: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const dataType_1 = __nccwpck_require__(37857); -const codegen_1 = __nccwpck_require__(34938); -const util_1 = __nccwpck_require__(54313); -const equal_1 = __nccwpck_require__(23903); -const error = { - message: ({ params: { i, j } }) => (0, codegen_1.str) `must NOT have duplicate items (items ## ${j} and ${i} are identical)`, - params: ({ params: { i, j } }) => (0, codegen_1._) `{i: ${i}, j: ${j}}`, -}; -const def = { - keyword: "uniqueItems", - type: "array", - schemaType: "boolean", - $data: true, - error, - code(cxt) { - const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt; - if (!$data && !schema) - return; - const valid = gen.let("valid"); - const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : []; - cxt.block$data(valid, validateUniqueItems, (0, codegen_1._) `${schemaCode} === false`); - cxt.ok(valid); - function validateUniqueItems() { - const i = gen.let("i", (0, codegen_1._) `${data}.length`); - const j = gen.let("j"); - cxt.setParams({ i, j }); - gen.assign(valid, true); - gen.if((0, codegen_1._) `${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j)); - } - function canOptimize() { - return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array"); - } - function loopN(i, j) { - const item = gen.name("item"); - const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong); - const indices = gen.const("indices", (0, codegen_1._) `{}`); - gen.for((0, codegen_1._) `;${i}--;`, () => { - gen.let(item, (0, codegen_1._) `${data}[${i}]`); - gen.if(wrongType, (0, codegen_1._) `continue`); - if (itemTypes.length > 1) - gen.if((0, codegen_1._) `typeof ${item} == "string"`, (0, codegen_1._) `${item} += "_"`); - gen - .if((0, codegen_1._) `typeof ${indices}[${item}] == "number"`, () => { - gen.assign(j, (0, codegen_1._) `${indices}[${item}]`); - cxt.error(); - gen.assign(valid, false).break(); - }) - .code((0, codegen_1._) `${indices}[${item}] = ${i}`); - }); - } - function loopN2(i, j) { - const eql = (0, util_1.useFunc)(gen, equal_1.default); - const outer = gen.name("outer"); - gen.label(outer).for((0, codegen_1._) `;${i}--;`, () => gen.for((0, codegen_1._) `${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._) `${eql}(${data}[${i}], ${data}[${j}])`, () => { - cxt.error(); - gen.assign(valid, false).break(outer); - }))); - } - }, -}; -exports["default"] = def; -//# sourceMappingURL=uniqueItems.js.map - -/***/ }), - -/***/ 55524: -/***/ ((module) => { - -"use strict"; - - -var traverse = module.exports = function (schema, opts, cb) { - // Legacy support for v0.3.1 and earlier. - if (typeof opts == 'function') { - cb = opts; - opts = {}; - } - - cb = opts.cb || cb; - var pre = (typeof cb == 'function') ? cb : cb.pre || function() {}; - var post = cb.post || function() {}; - - _traverse(opts, pre, post, schema, '', schema); -}; - - -traverse.keywords = { - additionalItems: true, - items: true, - contains: true, - additionalProperties: true, - propertyNames: true, - not: true, - if: true, - then: true, - else: true -}; - -traverse.arrayKeywords = { - items: true, - allOf: true, - anyOf: true, - oneOf: true -}; - -traverse.propsKeywords = { - $defs: true, - definitions: true, - properties: true, - patternProperties: true, - dependencies: true -}; - -traverse.skipKeywords = { - default: true, - enum: true, - const: true, - required: true, - maximum: true, - minimum: true, - exclusiveMaximum: true, - exclusiveMinimum: true, - multipleOf: true, - maxLength: true, - minLength: true, - pattern: true, - format: true, - maxItems: true, - minItems: true, - uniqueItems: true, - maxProperties: true, - minProperties: true -}; - - -function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { - if (schema && typeof schema == 'object' && !Array.isArray(schema)) { - pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); - for (var key in schema) { - var sch = schema[key]; - if (Array.isArray(sch)) { - if (key in traverse.arrayKeywords) { - for (var i=0; i { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RedoclyOAuthDeviceFlow = void 0; -const colorette_1 = __nccwpck_require__(53278); -const childProcess = __nccwpck_require__(32081); -const api_client_1 = __nccwpck_require__(67742); -class RedoclyOAuthDeviceFlow { - constructor(baseUrl, clientName, version) { - this.baseUrl = baseUrl; - this.clientName = clientName; - this.version = version; - this.apiClient = new api_client_1.ReuniteApiClient(this.version, 'login'); - } - async run() { - const code = await this.getDeviceCode(); - process.stdout.write('Attempting to automatically open the SSO authorization page in your default browser.\n'); - process.stdout.write('If the browser does not open or you wish to use a different device to authorize this request, open the following URL:\n\n'); - process.stdout.write((0, colorette_1.blue)(code.verificationUri)); - process.stdout.write(`\n\n`); - process.stdout.write(`Then enter the code:\n\n`); - process.stdout.write((0, colorette_1.blue)(code.userCode)); - process.stdout.write(`\n\n`); - this.openBrowser(code.verificationUriComplete); - const accessToken = await this.pollingAccessToken(code.deviceCode, code.interval, code.expiresIn); - process.stdout.write((0, colorette_1.green)('✅ Logged in\n\n')); - return accessToken; - } - openBrowser(url) { - try { - const cmd = process.platform === 'win32' - ? `start ${url}` - : process.platform === 'darwin' - ? `open ${url}` - : `xdg-open ${url}`; - childProcess.execSync(cmd); + function sendCachedValue(handler, opts, result, age, context2, isStale2) { + const stream = util.isStream(result.body) ? result.body : Readable.from(result.body ?? []); + assert(!stream.destroyed, "stream should not be destroyed"); + assert(!stream.readableDidRead, "stream should not be readableDidRead"); + const controller = { + resume() { + stream.resume(); + }, + pause() { + stream.pause(); + }, + get paused() { + return stream.isPaused(); + }, + get aborted() { + return stream.destroyed; + }, + get reason() { + return stream.errored; + }, + abort(reason) { + stream.destroy(reason ?? new AbortError()); + } + }; + stream.on("error", function(err) { + if (!this.readableEnded) { + if (typeof handler.onResponseError === "function") { + handler.onResponseError(controller, err); + } else { + throw err; + } } - catch { - // silently fail if browser cannot be opened + }).on("close", function() { + if (!this.errored) { + handler.onResponseEnd?.(controller, {}); } + }); + handler.onRequestStart?.(controller, context2); + if (stream.destroyed) { + return; + } + const headers = { ...result.headers, age: String(age) }; + if (isStale2) { + headers.warning = '110 - "response is stale"'; + } + handler.onResponseStart?.(controller, result.statusCode, headers, result.statusMessage); + if (opts.method === "HEAD") { + stream.destroy(); + } else { + stream.on("data", function(chunk) { + handler.onResponseData?.(controller, chunk); + }); + } } - async verifyToken(accessToken) { - try { - const response = await this.sendRequest('/session', 'GET', undefined, { - Cookie: `accessToken=${accessToken};`, - }); - return !!response.user; + function handleResult(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl, result) { + if (!result) { + return handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl); + } + const now = Date.now(); + if (now > result.deleteAt) { + return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)); + } + const age = Math.round((now - result.cachedAt) / 1e3); + if (reqCacheControl?.["max-age"] && age >= reqCacheControl["max-age"]) { + return dispatch(opts, handler); + } + const stale = isStale(result, reqCacheControl); + const revalidate = needsRevalidation(result, reqCacheControl, opts); + if (stale || revalidate) { + if (util.isStream(opts.body) && util.bodyLength(opts.body) !== 0) { + return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)); } - catch { - return false; + if (!revalidate && withinStaleWhileRevalidateWindow(result)) { + sendCachedValue(handler, opts, result, age, null, true); + queueMicrotask(() => { + const headers2 = { + ...opts.headers, + "if-modified-since": new Date(result.cachedAt).toUTCString() + }; + if (result.etag) { + headers2["if-none-match"] = result.etag; + } + if (result.vary) { + for (const key in result.vary) { + if (result.vary[key] != null) { + headers2[key] = result.vary[key]; + } + } + } + dispatch( + { + ...opts, + headers: headers2 + }, + new CacheHandler(globalOpts, cacheKey, { + // Silent handler that just updates the cache + onRequestStart() { + }, + onRequestUpgrade() { + }, + onResponseStart() { + }, + onResponseData() { + }, + onResponseEnd() { + }, + onResponseError() { + } + }) + ); + }); + return true; } - } - async verifyApiKey(apiKey) { - try { - const response = await this.sendRequest('/api-keys-verify', 'POST', { - apiKey, - }); - return !!response.success; + let withinStaleIfErrorThreshold = false; + const staleIfErrorExpiry = result.cacheControlDirectives["stale-if-error"] ?? reqCacheControl?.["stale-if-error"]; + if (staleIfErrorExpiry) { + withinStaleIfErrorThreshold = now < result.staleAt + staleIfErrorExpiry * 1e3; } - catch { - return false; + const headers = { + ...opts.headers, + "if-modified-since": new Date(result.cachedAt).toUTCString() + }; + if (result.etag) { + headers["if-none-match"] = result.etag; } - } - async refreshToken(refreshToken) { - const response = await this.sendRequest(`/device-rotate-token`, 'POST', { - grant_type: 'refresh_token', - client_name: this.clientName, - refresh_token: refreshToken, - }); - if (!response.access_token) { - throw new Error('Failed to refresh token'); + if (result.vary) { + for (const key in result.vary) { + if (result.vary[key] != null) { + headers[key] = result.vary[key]; + } + } } - return { - access_token: response.access_token, - refresh_token: response.refresh_token, - expires_in: response.expires_in, - }; + return dispatch( + { + ...opts, + headers + }, + new CacheRevalidationHandler( + (success, context2) => { + if (success) { + sendCachedValue(handler, opts, result, age, context2, stale); + } else if (util.isStream(result.body)) { + result.body.on("error", nop).destroy(); + } + }, + new CacheHandler(globalOpts, cacheKey, handler), + withinStaleIfErrorThreshold + ) + ); + } + if (util.isStream(opts.body)) { + opts.body.on("error", nop).destroy(); + } + sendCachedValue(handler, opts, result, age, null, false); } - async pollingAccessToken(deviceCode, interval, expiresIn) { - return new Promise((resolve, reject) => { - const intervalId = setInterval(async () => { - const response = await this.getAccessToken(deviceCode); - if (response.access_token) { - clearInterval(intervalId); - clearTimeout(timeoutId); - resolve(response); - } - if (response.error && response.error !== 'authorization_pending') { - clearInterval(intervalId); - clearTimeout(timeoutId); - reject(response.error_description); + module3.exports = (opts = {}) => { + const { + store = new MemoryCacheStore(), + methods = ["GET"], + cacheByDefault = void 0, + type: type2 = "shared", + origins = void 0 + } = opts; + if (typeof opts !== "object" || opts === null) { + throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? "null" : typeof opts}`); + } + assertCacheStore(store, "opts.store"); + assertCacheMethods(methods, "opts.methods"); + assertCacheOrigins(origins, "opts.origins"); + if (typeof cacheByDefault !== "undefined" && typeof cacheByDefault !== "number") { + throw new TypeError(`expected opts.cacheByDefault to be number or undefined, got ${typeof cacheByDefault}`); + } + if (typeof type2 !== "undefined" && type2 !== "shared" && type2 !== "private") { + throw new TypeError(`expected opts.type to be shared, private, or undefined, got ${typeof type2}`); + } + const globalOpts = { + store, + methods, + cacheByDefault, + type: type2 + }; + const safeMethodsToNotCache = util.safeHTTPMethods.filter((method) => methods.includes(method) === false); + return (dispatch) => { + return (opts2, handler) => { + if (!opts2.origin || safeMethodsToNotCache.includes(opts2.method)) { + return dispatch(opts2, handler); + } + if (origins !== void 0) { + const requestOrigin = opts2.origin.toString().toLowerCase(); + let isAllowed = false; + for (let i2 = 0; i2 < origins.length; i2++) { + const allowed = origins[i2]; + if (typeof allowed === "string") { + if (allowed.toLowerCase() === requestOrigin) { + isAllowed = true; + break; } - }, interval * 1000); - const timeoutId = setTimeout(async () => { - clearInterval(intervalId); - clearTimeout(timeoutId); - reject('Authorization has expired. Please try again.'); - }, expiresIn * 1000); + } else if (allowed.test(requestOrigin)) { + isAllowed = true; + break; + } + } + if (!isAllowed) { + return dispatch(opts2, handler); + } + } + opts2 = { + ...opts2, + headers: normalizeHeaders(opts2) + }; + const reqCacheControl = opts2.headers?.["cache-control"] ? parseCacheControlHeader(opts2.headers["cache-control"]) : void 0; + if (reqCacheControl?.["no-store"]) { + return dispatch(opts2, handler); + } + const cacheKey = makeCacheKey(opts2); + const result = store.get(cacheKey); + if (result && typeof result.then === "function") { + return result.then((result2) => handleResult( + dispatch, + globalOpts, + cacheKey, + handler, + opts2, + reqCacheControl, + result2 + )); + } else { + return handleResult( + dispatch, + globalOpts, + cacheKey, + handler, + opts2, + reqCacheControl, + result + ); + } + }; + }; + }; + } +}); + +// node_modules/undici/lib/interceptor/decompress.js +var require_decompress = __commonJS({ + "node_modules/undici/lib/interceptor/decompress.js"(exports, module3) { + "use strict"; + var { createInflate, createGunzip, createBrotliDecompress, createZstdDecompress } = __require("node:zlib"); + var { pipeline } = __require("node:stream"); + var DecoratorHandler = require_decorator_handler(); + var { runtimeFeatures } = require_runtime_features(); + var supportedEncodings = { + gzip: createGunzip, + "x-gzip": createGunzip, + br: createBrotliDecompress, + deflate: createInflate, + compress: createInflate, + "x-compress": createInflate, + ...runtimeFeatures.has("zstd") ? { zstd: createZstdDecompress } : {} + }; + var defaultSkipStatusCodes = ( + /** @type {const} */ + [204, 304] + ); + var warningEmitted = ( + /** @type {boolean} */ + false + ); + var DecompressHandler = class extends DecoratorHandler { + /** @type {Transform[]} */ + #decompressors = []; + /** @type {Readonly} */ + #skipStatusCodes; + /** @type {boolean} */ + #skipErrorResponses; + constructor(handler, { skipStatusCodes = defaultSkipStatusCodes, skipErrorResponses = true } = {}) { + super(handler); + this.#skipStatusCodes = skipStatusCodes; + this.#skipErrorResponses = skipErrorResponses; + } + /** + * Determines if decompression should be skipped based on encoding and status code + * @param {string} contentEncoding - Content-Encoding header value + * @param {number} statusCode - HTTP status code of the response + * @returns {boolean} - True if decompression should be skipped + */ + #shouldSkipDecompression(contentEncoding, statusCode) { + if (!contentEncoding || statusCode < 200) return true; + if (this.#skipStatusCodes.includes(statusCode)) return true; + if (this.#skipErrorResponses && statusCode >= 400) return true; + return false; + } + /** + * Creates a chain of decompressors for multiple content encodings + * + * @param {string} encodings - Comma-separated list of content encodings + * @returns {Array} - Array of decompressor streams + * @throws {Error} - If the number of content-encodings exceeds the maximum allowed + */ + #createDecompressionChain(encodings) { + const parts = encodings.split(","); + const maxContentEncodings = 5; + if (parts.length > maxContentEncodings) { + throw new Error(`too many content-encodings in response: ${parts.length}, maximum allowed is ${maxContentEncodings}`); + } + const decompressors = []; + for (let i2 = parts.length - 1; i2 >= 0; i2--) { + const encoding = parts[i2].trim(); + if (!encoding) continue; + if (!supportedEncodings[encoding]) { + decompressors.length = 0; + return decompressors; + } + decompressors.push(supportedEncodings[encoding]()); + } + return decompressors; + } + /** + * Sets up event handlers for a decompressor stream using readable events + * @param {DecompressorStream} decompressor - The decompressor stream + * @param {Controller} controller - The controller to coordinate with + * @returns {void} + */ + #setupDecompressorEvents(decompressor, controller) { + decompressor.on("readable", () => { + let chunk; + while ((chunk = decompressor.read()) !== null) { + const result = super.onResponseData(controller, chunk); + if (result === false) { + break; + } + } }); - } - async getAccessToken(deviceCode) { - return await this.sendRequest('/device-token', 'POST', { - client_name: this.clientName, - device_code: deviceCode, - grant_type: 'urn:ietf:params:oauth:grant-type:device_code', + decompressor.on("error", (error2) => { + super.onResponseError(controller, error2); }); - } - async getDeviceCode() { - const { device_code: deviceCode, user_code: userCode, verification_uri: verificationUri, verification_uri_complete: verificationUriComplete, interval = 10, expires_in: expiresIn = 300, } = await this.sendRequest('/device-authorize', 'POST', { - client_name: this.clientName, + } + /** + * Sets up event handling for a single decompressor + * @param {Controller} controller - The controller to handle events + * @returns {void} + */ + #setupSingleDecompressor(controller) { + const decompressor = this.#decompressors[0]; + this.#setupDecompressorEvents(decompressor, controller); + decompressor.on("end", () => { + super.onResponseEnd(controller, {}); }); - return { - deviceCode, - userCode, - verificationUri, - verificationUriComplete, - interval, - expiresIn, - }; - } - async sendRequest(url, method = 'GET', body = undefined, headers = {}) { - url = `${this.baseUrl}${url}`; - const response = await this.apiClient.request(url, { - body: body ? JSON.stringify(body) : body, - method, - headers: { 'Content-Type': 'application/json', ...headers }, + } + /** + * Sets up event handling for multiple chained decompressors using pipeline + * @param {Controller} controller - The controller to handle events + * @returns {void} + */ + #setupMultipleDecompressors(controller) { + const lastDecompressor = this.#decompressors[this.#decompressors.length - 1]; + this.#setupDecompressorEvents(lastDecompressor, controller); + pipeline(this.#decompressors, (err) => { + if (err) { + super.onResponseError(controller, err); + return; + } + super.onResponseEnd(controller, {}); }); - if (response.status === 204) { - return { success: true }; + } + /** + * Cleans up decompressor references to prevent memory leaks + * @returns {void} + */ + #cleanupDecompressors() { + this.#decompressors.length = 0; + } + /** + * @param {Controller} controller + * @param {number} statusCode + * @param {Record} headers + * @param {string} statusMessage + * @returns {void} + */ + onResponseStart(controller, statusCode, headers, statusMessage) { + const contentEncoding = headers["content-encoding"]; + if (this.#shouldSkipDecompression(contentEncoding, statusCode)) { + return super.onResponseStart(controller, statusCode, headers, statusMessage); + } + const decompressors = this.#createDecompressionChain(contentEncoding.toLowerCase()); + if (decompressors.length === 0) { + this.#cleanupDecompressors(); + return super.onResponseStart(controller, statusCode, headers, statusMessage); + } + this.#decompressors = decompressors; + const { "content-encoding": _5, "content-length": __, ...newHeaders } = headers; + if (this.#decompressors.length === 1) { + this.#setupSingleDecompressor(controller); + } else { + this.#setupMultipleDecompressors(controller); } - return await response.json(); - } -} -exports.RedoclyOAuthDeviceFlow = RedoclyOAuthDeviceFlow; - - -/***/ }), - -/***/ 43964: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RedoclyOAuthClient = void 0; -const node_os_1 = __nccwpck_require__(70612); -const path = __nccwpck_require__(49411); -const node_fs_1 = __nccwpck_require__(87561); -const crypto = __nccwpck_require__(6005); -const node_buffer_1 = __nccwpck_require__(72254); -const device_flow_1 = __nccwpck_require__(98832); -const SALT = '4618dbc9-8aed-4e27-aaf0-225f4603e5a4'; -const CRYPTO_ALGORITHM = 'aes-256-cbc'; -class RedoclyOAuthClient { - constructor(clientName, version) { - this.clientName = clientName; - this.version = version; - this.dir = path.join((0, node_os_1.homedir)(), '.redocly'); - if (!(0, node_fs_1.existsSync)(this.dir)) { - (0, node_fs_1.mkdirSync)(this.dir); - } - const homeDirPath = process.env.HOME; - const hash = crypto.createHash('sha256'); - hash.update(`${homeDirPath}${SALT}`); - const hashHex = hash.digest('hex'); - const key = node_buffer_1.Buffer.alloc(32, node_buffer_1.Buffer.from(hashHex).toString('base64')).toString(); - const iv = node_buffer_1.Buffer.alloc(16, node_buffer_1.Buffer.from(process.env.HOME).toString('base64')).toString(); - this.cipher = crypto.createCipheriv(CRYPTO_ALGORITHM, key, iv); - this.decipher = crypto.createDecipheriv(CRYPTO_ALGORITHM, key, iv); - } - async login(baseUrl) { - const deviceFlow = new device_flow_1.RedoclyOAuthDeviceFlow(baseUrl, this.clientName, this.version); - const token = await deviceFlow.run(); - if (!token) { - throw new Error('Failed to login'); + return super.onResponseStart(controller, statusCode, newHeaders, statusMessage); + } + /** + * @param {Controller} controller + * @param {Buffer} chunk + * @returns {void} + */ + onResponseData(controller, chunk) { + if (this.#decompressors.length > 0) { + this.#decompressors[0].write(chunk); + return; } - this.saveToken(token); - } - async logout() { - try { - this.removeToken(); + super.onResponseData(controller, chunk); + } + /** + * @param {Controller} controller + * @param {Record | undefined} trailers + * @returns {void} + */ + onResponseEnd(controller, trailers) { + if (this.#decompressors.length > 0) { + this.#decompressors[0].end(); + this.#cleanupDecompressors(); + return; } - catch (err) { - // do nothing + super.onResponseEnd(controller, trailers); + } + /** + * @param {Controller} controller + * @param {Error} err + * @returns {void} + */ + onResponseError(controller, err) { + if (this.#decompressors.length > 0) { + for (const decompressor of this.#decompressors) { + decompressor.destroy(err); + } + this.#cleanupDecompressors(); } + super.onResponseError(controller, err); + } + }; + function createDecompressInterceptor(options2 = {}) { + if (!warningEmitted) { + process.emitWarning( + "DecompressInterceptor is experimental and subject to change", + "ExperimentalWarning" + ); + warningEmitted = true; + } + return (dispatch) => { + return (opts, handler) => { + const decompressHandler = new DecompressHandler(handler, options2); + return dispatch(opts, decompressHandler); + }; + }; } - async isAuthorized(baseUrl, apiKey) { - const deviceFlow = new device_flow_1.RedoclyOAuthDeviceFlow(baseUrl, this.clientName, this.version); - if (apiKey) { - return await deviceFlow.verifyApiKey(apiKey); - } - const token = await this.readToken(); - if (!token) { - return false; - } - const isValidAccessToken = await deviceFlow.verifyToken(token.access_token); - if (isValidAccessToken) { - return true; + module3.exports = createDecompressInterceptor; + } +}); + +// node_modules/undici/lib/handler/deduplication-handler.js +var require_deduplication_handler = __commonJS({ + "node_modules/undici/lib/handler/deduplication-handler.js"(exports, module3) { + "use strict"; + var { RequestAbortedError } = require_errors(); + var DEFAULT_MAX_BUFFER_SIZE = 5 * 1024 * 1024; + var DeduplicationHandler = class { + /** + * @type {DispatchHandler} + */ + #primaryHandler; + /** + * @type {WaitingHandler[]} + */ + #waitingHandlers = []; + /** + * @type {number} + */ + #maxBufferSize = DEFAULT_MAX_BUFFER_SIZE; + /** + * @type {number} + */ + #statusCode = 0; + /** + * @type {Record} + */ + #headers = {}; + /** + * @type {string} + */ + #statusMessage = ""; + /** + * @type {boolean} + */ + #aborted = false; + /** + * @type {boolean} + */ + #responseStarted = false; + /** + * @type {boolean} + */ + #responseDataStarted = false; + /** + * @type {boolean} + */ + #completed = false; + /** + * @type {import('../../types/dispatcher.d.ts').default.DispatchController | null} + */ + #controller = null; + /** + * @type {(() => void) | null} + */ + #onComplete = null; + /** + * @param {DispatchHandler} primaryHandler The primary handler + * @param {() => void} onComplete Callback when request completes + * @param {number} [maxBufferSize] Maximum paused buffer size per waiting handler + */ + constructor(primaryHandler, onComplete, maxBufferSize = DEFAULT_MAX_BUFFER_SIZE) { + this.#primaryHandler = primaryHandler; + this.#onComplete = onComplete; + this.#maxBufferSize = maxBufferSize; + } + /** + * Add a waiting handler that will receive response events. + * Returns false if deduplication can no longer safely attach this handler. + * + * @param {DispatchHandler} handler + * @returns {boolean} + */ + addWaitingHandler(handler) { + if (this.#completed || this.#responseDataStarted) { + return false; } + const waitingHandler = this.#createWaitingHandler(handler); + const waitingController = waitingHandler.controller; try { - const newToken = await deviceFlow.refreshToken(token.refresh_token); - await this.saveToken(newToken); + handler.onRequestStart?.(waitingController, null); + if (waitingController.aborted) { + waitingHandler.done = true; + return true; + } + if (this.#responseStarted) { + handler.onResponseStart?.( + waitingController, + this.#statusCode, + this.#headers, + this.#statusMessage + ); + } + } catch { + waitingHandler.done = true; + return true; } - catch { - return false; + if (!waitingController.aborted) { + this.#waitingHandlers.push(waitingHandler); } return true; - } - async saveToken(token) { - try { - const encrypted = this.cipher.update(JSON.stringify(token), 'utf8', 'hex') + this.cipher.final('hex'); - (0, node_fs_1.writeFileSync)(path.join(this.dir, 'auth.json'), encrypted); - } - catch (error) { - process.stderr.write('Error saving tokens:', error); - } - } - async readToken() { - try { - const token = (0, node_fs_1.readFileSync)(path.join(this.dir, 'auth.json'), 'utf8'); - const decrypted = this.decipher.update(token, 'hex', 'utf8') + this.decipher.final('utf8'); - return decrypted ? JSON.parse(decrypted) : null; - } - catch { - return null; - } - } - async removeToken() { - const tokenPath = path.join(this.dir, 'auth.json'); - if ((0, node_fs_1.existsSync)(tokenPath)) { - (0, node_fs_1.rmSync)(tokenPath); - } - } -} -exports.RedoclyOAuthClient = RedoclyOAuthClient; - - -/***/ }), - -/***/ 6084: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.promptClientToken = promptClientToken; -exports.handleLogin = handleLogin; -exports.handleLogout = handleLogout; -const colorette_1 = __nccwpck_require__(53278); -const openapi_core_1 = __nccwpck_require__(59307); -const miscellaneous_1 = __nccwpck_require__(82531); -const oauth_client_1 = __nccwpck_require__(43964); -const api_1 = __nccwpck_require__(57919); -function promptClientToken(domain) { - return (0, miscellaneous_1.promptUser)((0, colorette_1.green)(`\n 🔑 Copy your API key from ${(0, colorette_1.blue)(`https://app.${domain}/profile`)} and paste it below`) + (0, colorette_1.yellow)(' (if you want to log in with Reunite, please run `redocly login --next` instead)'), true); -} -async function handleLogin({ argv, config, version }) { - if (argv.next) { - try { - const reuniteUrl = (0, api_1.getReuniteUrl)(argv.residency); - const oauthClient = new oauth_client_1.RedoclyOAuthClient('redocly-cli', version); - await oauthClient.login(reuniteUrl); + } + /** + * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller + * @param {any} context + */ + onRequestStart(controller, context2) { + this.#controller = controller; + this.#primaryHandler.onRequestStart?.(controller, context2); + } + /** + * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller + * @param {number} statusCode + * @param {import('../../types/header.d.ts').IncomingHttpHeaders} headers + * @param {Socket} socket + */ + onRequestUpgrade(controller, statusCode, headers, socket) { + this.#primaryHandler.onRequestUpgrade?.(controller, statusCode, headers, socket); + } + /** + * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller + * @param {number} statusCode + * @param {Record} headers + * @param {string} statusMessage + */ + onResponseStart(controller, statusCode, headers, statusMessage) { + this.#responseStarted = true; + this.#statusCode = statusCode; + this.#headers = headers; + this.#statusMessage = statusMessage; + this.#primaryHandler.onResponseStart?.(controller, statusCode, headers, statusMessage); + for (const waitingHandler of this.#waitingHandlers) { + const { handler, controller: waitingController } = waitingHandler; + if (waitingHandler.done || waitingController.aborted) { + waitingHandler.done = true; + continue; + } + try { + handler.onResponseStart?.( + waitingController, + statusCode, + headers, + statusMessage + ); + } catch { + } + if (waitingController.aborted) { + waitingHandler.done = true; + } } - catch { - if (argv.residency) { - const reuniteUrl = (0, api_1.getReuniteUrl)(argv.residency); - (0, miscellaneous_1.exitWithError)(`❌ Connection to ${reuniteUrl} failed.`); - } - else { - (0, miscellaneous_1.exitWithError)(`❌ Login failed. Please check your credentials and try again.`); - } + this.#pruneDoneWaitingHandlers(); + } + /** + * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller + * @param {Buffer} chunk + */ + onResponseData(controller, chunk) { + if (this.#aborted || this.#completed) { + return; } - } - else { - try { - const region = argv.residency || config.region; - const client = new openapi_core_1.RedoclyClient(region); - const clientToken = await promptClientToken(client.domain); - process.stdout.write((0, colorette_1.gray)('\n Logging in...\n')); - await client.login(clientToken, argv.verbose); - process.stdout.write((0, colorette_1.green)(' Authorization confirmed. ✅\n\n')); + this.#responseDataStarted = true; + this.#primaryHandler.onResponseData?.(controller, chunk); + for (const waitingHandler of this.#waitingHandlers) { + const { handler, controller: waitingController } = waitingHandler; + if (waitingHandler.done || waitingController.aborted) { + waitingHandler.done = true; + continue; + } + if (waitingController.paused) { + this.#bufferWaitingChunk(waitingHandler, chunk); + continue; + } + try { + handler.onResponseData?.(waitingController, chunk); + } catch { + } + if (waitingController.aborted) { + waitingHandler.done = true; + waitingHandler.bufferedChunks = []; + waitingHandler.bufferedBytes = 0; + } } - catch (err) { - (0, miscellaneous_1.exitWithError)(' ' + err?.message); + this.#pruneDoneWaitingHandlers(); + } + /** + * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller + * @param {object} trailers + */ + onResponseEnd(controller, trailers) { + if (this.#aborted || this.#completed) { + return; } - } -} -async function handleLogout({ version }) { - const client = new openapi_core_1.RedoclyClient(); - client.logout(); - const oauthClient = new oauth_client_1.RedoclyOAuthClient('redocly-cli', version); - oauthClient.logout(); - process.stdout.write('Logged out from the Redocly account. ✋ \n'); -} - - -/***/ }), - -/***/ 13354: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.transformPush = exports.DESTINATION_REGEX = void 0; -exports.commonPushHandler = commonPushHandler; -exports.handlePush = handlePush; -exports.getDestinationProps = getDestinationProps; -exports.getApiRoot = getApiRoot; -const fs = __nccwpck_require__(57147); -const path = __nccwpck_require__(71017); -const perf_hooks_1 = __nccwpck_require__(4074); -const colorette_1 = __nccwpck_require__(53278); -const crypto_1 = __nccwpck_require__(6113); -const openapi_core_1 = __nccwpck_require__(59307); -const utils_1 = __nccwpck_require__(75450); -const miscellaneous_1 = __nccwpck_require__(82531); -const auth_1 = __nccwpck_require__(6084); -const push_1 = __nccwpck_require__(72775); -const api_client_1 = __nccwpck_require__(67742); -const DEFAULT_VERSION = 'latest'; -exports.DESTINATION_REGEX = -// eslint-disable-next-line no-useless-escape -/^(@(?[\w\-\s]+)\/)?(?[^@]*)@(?[\w\.\-]+)$/; -function commonPushHandler({ project, 'mount-path': mountPath, }) { - if (project && mountPath) { - return push_1.handlePush; - } - return (0, exports.transformPush)(handlePush); -} -async function handlePush({ argv, config }) { - const client = new openapi_core_1.RedoclyClient(config.region); - const isAuthorized = await client.isAuthorizedWithRedoclyByRegion(); - if (!isAuthorized) { - try { - const clientToken = await (0, auth_1.promptClientToken)(client.domain); - await client.login(clientToken); + this.#completed = true; + this.#primaryHandler.onResponseEnd?.(controller, trailers); + for (const waitingHandler of this.#waitingHandlers) { + if (waitingHandler.done || waitingHandler.controller.aborted) { + waitingHandler.done = true; + continue; + } + this.#flushWaitingHandler(waitingHandler); + if (waitingHandler.done || waitingHandler.controller.aborted) { + waitingHandler.done = true; + continue; + } + if (waitingHandler.controller.paused && waitingHandler.bufferedChunks.length > 0) { + waitingHandler.pendingTrailers = trailers; + continue; + } + try { + waitingHandler.handler.onResponseEnd?.(waitingHandler.controller, trailers); + } catch { + } + waitingHandler.done = true; } - catch (e) { - (0, miscellaneous_1.exitWithError)(e); + this.#pruneDoneWaitingHandlers(); + this.#onComplete?.(); + } + /** + * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller + * @param {Error} err + */ + onResponseError(controller, err) { + if (this.#completed) { + return; } - } - const startedAt = perf_hooks_1.performance.now(); - const { destination, branchName, upsert } = argv; - const jobId = argv['job-id']; - const batchSize = argv['batch-size']; - if (destination && !exports.DESTINATION_REGEX.test(destination)) { - (0, miscellaneous_1.exitWithError)(`Destination argument value is not valid, please use the right format: ${(0, colorette_1.yellow)('')}.`); - } - const destinationProps = getDestinationProps(destination, config.organization); - const organizationId = argv.organization || destinationProps.organizationId; - const { name, version } = destinationProps; - if (!organizationId) { - return (0, miscellaneous_1.exitWithError)(`No organization provided, please use --organization option or specify the 'organization' field in the config file.`); - } - const api = argv.api || (name && version && getApiRoot({ name, version, config })); - if (name && version && !api) { - (0, miscellaneous_1.exitWithError)(`No api found that matches ${(0, colorette_1.blue)(`${name}@${version}`)}. Please make sure you have provided the correct data in the config file.`); - } - // Ensure that a destination for the api is provided. - if (!name && api) { - return (0, miscellaneous_1.exitWithError)(`No destination provided, please use --destination option to provide destination.`); - } - if (jobId && !jobId.trim()) { - (0, miscellaneous_1.exitWithError)(`The ${(0, colorette_1.blue)(`job-id`)} option value is not valid, please avoid using an empty string.`); - } - if (batchSize && batchSize < 2) { - (0, miscellaneous_1.exitWithError)(`The ${(0, colorette_1.blue)(`batch-size`)} option value is not valid, please use the integer bigger than 1.`); - } - const apis = api ? { [`${name}@${version}`]: { root: api } } : config.apis; - if (!Object.keys(apis).length) { - (0, miscellaneous_1.exitWithError)(`Api not found. Please make sure you have provided the correct data in the config file.`); - } - for (const [apiNameAndVersion, { root: api }] of Object.entries(apis)) { - const resolvedConfig = (0, openapi_core_1.getMergedConfig)(config, apiNameAndVersion); - resolvedConfig.styleguide.skipDecorators(argv['skip-decorator']); - const [name, version = DEFAULT_VERSION] = apiNameAndVersion.split('@'); - const encodedName = encodeURIComponent(name); - try { - let rootFilePath = ''; - const filePaths = []; - const filesToUpload = await collectFilesToUpload(api, resolvedConfig); - const filesHash = hashFiles(filesToUpload.files); - process.stdout.write(`Uploading ${filesToUpload.files.length} ${(0, utils_1.pluralize)('file', filesToUpload.files.length)}:\n`); - let uploaded = 0; - for (const file of filesToUpload.files) { - const { signedUploadUrl, filePath } = await client.registryApi.prepareFileUpload({ - organizationId, - name: encodedName, - version, - filesHash, - filename: file.keyOnS3, - isUpsert: upsert, - }); - if (file.filePath === filesToUpload.root) { - rootFilePath = filePath; - } - filePaths.push(filePath); - process.stdout.write(`Uploading ${file.contents ? 'bundle for ' : ''}${(0, colorette_1.blue)(file.filePath)}...`); - const uploadResponse = await uploadFileToS3(signedUploadUrl, file.contents || file.filePath); - const fileCounter = `(${++uploaded}/${filesToUpload.files.length})`; - if (!uploadResponse.ok) { - (0, miscellaneous_1.exitWithError)(`✗ ${fileCounter}\nFile upload failed.`); - } - process.stdout.write((0, colorette_1.green)(`✓ ${fileCounter}\n`)); - } - process.stdout.write('\n'); - await client.registryApi.pushApi({ - organizationId, - name: encodedName, - version, - rootFilePath, - filePaths, - branch: branchName, - isUpsert: upsert, - isPublic: argv['public'], - batchId: jobId, - batchSize: batchSize, - }); + this.#aborted = true; + this.#completed = true; + this.#primaryHandler.onResponseError?.(controller, err); + for (const waitingHandler of this.#waitingHandlers) { + this.#errorWaitingHandler(waitingHandler, err); } - catch (error) { - if (error.message === 'ORGANIZATION_NOT_FOUND') { - (0, miscellaneous_1.exitWithError)(`Organization ${(0, colorette_1.blue)(organizationId)} not found.`); + this.#waitingHandlers = []; + this.#onComplete?.(); + } + /** + * @param {DispatchHandler} handler + * @returns {WaitingHandler} + */ + #createWaitingHandler(handler) { + const waitingHandler = { + handler, + controller: null, + bufferedChunks: [], + bufferedBytes: 0, + pendingTrailers: null, + done: false + }; + const state = { + aborted: false, + paused: false, + reason: null + }; + waitingHandler.controller = { + resume: () => { + if (state.aborted) { + return; + } + state.paused = false; + this.#flushWaitingHandler(waitingHandler); + if (this.#completed && waitingHandler.pendingTrailers && waitingHandler.bufferedChunks.length === 0 && !state.paused && !state.aborted) { + try { + waitingHandler.handler.onResponseEnd?.(waitingHandler.controller, waitingHandler.pendingTrailers); + } catch { + } + waitingHandler.pendingTrailers = null; + waitingHandler.done = true; } - if (error.message === 'API_VERSION_NOT_FOUND') { - (0, miscellaneous_1.exitWithError)(`The definition version ${(0, colorette_1.blue)(`${name}@${version}`)} does not exist in organization ${(0, colorette_1.blue)(organizationId)}!\n${(0, colorette_1.yellow)('Suggestion:')} please use ${(0, colorette_1.blue)('-u')} or ${(0, colorette_1.blue)('--upsert')} to create definition.`); + this.#pruneDoneWaitingHandlers(); + }, + pause: () => { + if (!state.aborted) { + state.paused = true; } - throw error; + }, + get paused() { + return state.paused; + }, + get aborted() { + return state.aborted; + }, + get reason() { + return state.reason; + }, + abort: (reason) => { + state.aborted = true; + state.reason = reason ?? null; + waitingHandler.done = true; + waitingHandler.pendingTrailers = null; + waitingHandler.bufferedChunks = []; + waitingHandler.bufferedBytes = 0; + } + }; + return waitingHandler; + } + /** + * @param {WaitingHandler} waitingHandler + * @param {Buffer} chunk + */ + #bufferWaitingChunk(waitingHandler, chunk) { + if (waitingHandler.done || waitingHandler.controller.aborted) { + waitingHandler.done = true; + waitingHandler.bufferedChunks = []; + waitingHandler.bufferedBytes = 0; + return; } - process.stdout.write(`Definition: ${(0, colorette_1.blue)(api)} is successfully pushed to Redocly API Registry.\n`); - } - (0, miscellaneous_1.printExecutionTime)('push', startedAt, api || `apis in organization ${organizationId}`); -} -function getFilesList(dir, files) { - files = files || []; - const filesAndDirs = fs.readdirSync(dir); - for (const name of filesAndDirs) { - if (fs.statSync(path.join(dir, name)).isDirectory()) { - files = getFilesList(path.join(dir, name), files); + const bufferedChunk = Buffer.from(chunk); + waitingHandler.bufferedChunks.push(bufferedChunk); + waitingHandler.bufferedBytes += bufferedChunk.length; + if (waitingHandler.bufferedBytes > this.#maxBufferSize) { + const err = new RequestAbortedError(`Deduplicated waiting handler exceeded maxBufferSize (${this.#maxBufferSize} bytes) while paused`); + this.#errorWaitingHandler(waitingHandler, err); } - else { - const currentPath = dir + '/' + name; - files.push(currentPath); + } + /** + * @param {WaitingHandler} waitingHandler + */ + #flushWaitingHandler(waitingHandler) { + const { handler, controller } = waitingHandler; + while (!waitingHandler.done && !controller.aborted && !controller.paused && waitingHandler.bufferedChunks.length > 0) { + const bufferedChunk = waitingHandler.bufferedChunks.shift(); + waitingHandler.bufferedBytes -= bufferedChunk.length; + try { + handler.onResponseData?.(controller, bufferedChunk); + } catch { + } + if (controller.aborted) { + waitingHandler.done = true; + waitingHandler.pendingTrailers = null; + waitingHandler.bufferedChunks = []; + waitingHandler.bufferedBytes = 0; + break; + } } - } - return files; -} -async function collectFilesToUpload(api, config) { - const files = []; - const [{ path: apiPath }] = await (0, miscellaneous_1.getFallbackApisOrExit)([api], config); - process.stdout.write('Bundling definition\n'); - const { bundle: openapiBundle, problems } = await (0, openapi_core_1.bundle)({ - config, - ref: apiPath, - skipRedoclyRegistryRefs: true, - }); - const fileTotals = (0, openapi_core_1.getTotals)(problems); - if (fileTotals.errors === 0) { - process.stdout.write(`Created a bundle for ${(0, colorette_1.blue)(api)} ${fileTotals.warnings > 0 ? 'with warnings' : ''}\n`); - } - else { - (0, miscellaneous_1.exitWithError)(`Failed to create a bundle for ${(0, colorette_1.blue)(api)}.`); - } - const fileExt = path.extname(apiPath).split('.').pop(); - files.push(getFileEntry(apiPath, (0, miscellaneous_1.dumpBundle)(openapiBundle.parsed, fileExt))); - if (fs.existsSync('package.json')) { - files.push(getFileEntry('package.json')); - } - if (fs.existsSync(openapi_core_1.IGNORE_FILE)) { - files.push(getFileEntry(openapi_core_1.IGNORE_FILE)); - } - if (config.configFile) { - // All config file paths including the root one - files.push(...[...new Set(config.styleguide.extendPaths)].map((f) => getFileEntry(f))); - if (config.theme?.openapi?.htmlTemplate) { - const dir = getFolder(config.theme.openapi.htmlTemplate); - const fileList = getFilesList(dir, []); - files.push(...fileList.map((f) => getFileEntry(f))); - } - const pluginFiles = new Set(); - for (const plugin of config.styleguide.pluginPaths) { - if (typeof plugin !== 'string') - continue; - const fileList = getFilesList(getFolder(plugin), []); - fileList.forEach((f) => pluginFiles.add(f)); + } + /** + * @param {WaitingHandler} waitingHandler + * @param {Error} err + */ + #errorWaitingHandler(waitingHandler, err) { + if (waitingHandler.done) { + return; } - files.push(...filterPluginFilesByExt(Array.from(pluginFiles)).map((f) => getFileEntry(f))); - } - if (config.files) { - const otherFiles = new Set(); - for (const file of config.files) { - if (fs.statSync(file).isDirectory()) { - const fileList = getFilesList(file, []); - fileList.forEach((f) => otherFiles.add(f)); - } - else { - otherFiles.add(file); - } + waitingHandler.done = true; + waitingHandler.pendingTrailers = null; + waitingHandler.bufferedChunks = []; + waitingHandler.bufferedBytes = 0; + try { + waitingHandler.controller.abort(err); + waitingHandler.handler.onResponseError?.(waitingHandler.controller, err); + } catch { } - files.push(...Array.from(otherFiles).map((f) => getFileEntry(f))); - } - return { - files, - root: path.resolve(apiPath), + } + #pruneDoneWaitingHandlers() { + this.#waitingHandlers = this.#waitingHandlers.filter((waitingHandler) => waitingHandler.done === false); + } }; - function filterPluginFilesByExt(files) { - return files.filter((file) => { - const fileExt = path.extname(file).toLowerCase(); - return fileExt === '.js' || fileExt === '.ts' || fileExt === '.mjs' || fileExt === 'json'; - }); - } - function getFileEntry(filename, contents) { - return { - filePath: path.resolve(filename), - keyOnS3: config.configFile - ? (0, openapi_core_1.slash)(path.relative(path.dirname(config.configFile), filename)) - : (0, openapi_core_1.slash)(path.basename(filename)), - contents: (contents && Buffer.from(contents, 'utf-8')) || undefined, - }; - } -} -function getFolder(filePath) { - return path.resolve(path.dirname(filePath)); -} -function hashFiles(filePaths) { - const sum = (0, crypto_1.createHash)('sha256'); - filePaths.forEach((file) => sum.update(fs.readFileSync(file.filePath))); - return sum.digest('hex'); -} -function parseDestination(destination) { - return destination?.match(exports.DESTINATION_REGEX)?.groups; -} -function getDestinationProps(destination, organization) { - const groups = destination && parseDestination(destination); - if (groups) { - return { - organizationId: groups.organizationId || organization, - name: groups.name, - version: groups.version, + module3.exports = DeduplicationHandler; + } +}); + +// node_modules/undici/lib/interceptor/deduplicate.js +var require_deduplicate = __commonJS({ + "node_modules/undici/lib/interceptor/deduplicate.js"(exports, module3) { + "use strict"; + var diagnosticsChannel = __require("node:diagnostics_channel"); + var util = require_util(); + var DeduplicationHandler = require_deduplication_handler(); + var { normalizeHeaders, makeCacheKey, makeDeduplicationKey } = require_cache(); + var pendingRequestsChannel = diagnosticsChannel.channel("undici:request:pending-requests"); + module3.exports = (opts = {}) => { + const { + methods = ["GET"], + skipHeaderNames = [], + excludeHeaderNames = [], + maxBufferSize = 5 * 1024 * 1024 + } = opts; + if (typeof opts !== "object" || opts === null) { + throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? "null" : typeof opts}`); + } + if (!Array.isArray(methods)) { + throw new TypeError(`expected opts.methods to be an array, got ${typeof methods}`); + } + for (const method of methods) { + if (!util.safeHTTPMethods.includes(method)) { + throw new TypeError(`expected opts.methods to only contain safe HTTP methods, got ${method}`); + } + } + if (!Array.isArray(skipHeaderNames)) { + throw new TypeError(`expected opts.skipHeaderNames to be an array, got ${typeof skipHeaderNames}`); + } + if (!Array.isArray(excludeHeaderNames)) { + throw new TypeError(`expected opts.excludeHeaderNames to be an array, got ${typeof excludeHeaderNames}`); + } + if (!Number.isFinite(maxBufferSize) || maxBufferSize <= 0) { + throw new TypeError(`expected opts.maxBufferSize to be a positive finite number, got ${maxBufferSize}`); + } + const skipHeaderNamesSet = new Set(skipHeaderNames.map((name) => name.toLowerCase())); + const excludeHeaderNamesSet = new Set(excludeHeaderNames.map((name) => name.toLowerCase())); + const pendingRequests = /* @__PURE__ */ new Map(); + return (dispatch) => { + return (opts2, handler) => { + if (!opts2.origin || methods.includes(opts2.method) === false) { + return dispatch(opts2, handler); + } + opts2 = { + ...opts2, + headers: normalizeHeaders(opts2) + }; + if (skipHeaderNamesSet.size > 0) { + for (const headerName of Object.keys(opts2.headers)) { + if (skipHeaderNamesSet.has(headerName.toLowerCase())) { + return dispatch(opts2, handler); + } + } + } + const cacheKey = makeCacheKey(opts2); + const dedupeKey = makeDeduplicationKey(cacheKey, excludeHeaderNamesSet); + const pendingHandler = pendingRequests.get(dedupeKey); + if (pendingHandler) { + if (pendingHandler.addWaitingHandler(handler)) { + return true; + } + return dispatch(opts2, handler); + } + const deduplicationHandler = new DeduplicationHandler( + handler, + () => { + pendingRequests.delete(dedupeKey); + if (pendingRequestsChannel.hasSubscribers) { + pendingRequestsChannel.publish({ size: pendingRequests.size, key: dedupeKey, type: "removed" }); + } + }, + maxBufferSize + ); + pendingRequests.set(dedupeKey, deduplicationHandler); + if (pendingRequestsChannel.hasSubscribers) { + pendingRequestsChannel.publish({ size: pendingRequests.size, key: dedupeKey, type: "added" }); + } + return dispatch(opts2, deduplicationHandler); }; - } - else { - return { organizationId: organization, name: undefined, version: undefined }; - } -} -const transformPush = (callback) => ({ argv: { apis, branch, 'batch-id': batchId, 'job-id': jobId, ...rest }, config, version, }) => { - const [maybeApiOrDestination, maybeDestination, maybeBranchName] = apis || []; - if (batchId) { - process.stderr.write((0, colorette_1.yellow)(`The ${(0, colorette_1.red)('batch-id')} option is deprecated. Please use ${(0, colorette_1.green)('job-id')} instead.\n\n`)); - } - if (maybeBranchName) { - process.stderr.write((0, colorette_1.yellow)('Deprecation warning: Do not use the third parameter as a branch name. Please use a separate --branch option instead.\n\n')); - } - let apiFile, destination; - if (maybeDestination) { - process.stderr.write((0, colorette_1.yellow)('Deprecation warning: Do not use the second parameter as a destination. Please use a separate --destination and --organization instead.\n\n')); - apiFile = maybeApiOrDestination; - destination = maybeDestination; - } - else if (maybeApiOrDestination && exports.DESTINATION_REGEX.test(maybeApiOrDestination)) { - process.stderr.write((0, colorette_1.yellow)('Deprecation warning: Do not use the first parameter as a destination. Please use a separate --destination and --organization options instead.\n\n')); - destination = maybeApiOrDestination; - } - else if (maybeApiOrDestination && !exports.DESTINATION_REGEX.test(maybeApiOrDestination)) { - apiFile = maybeApiOrDestination; - } - return callback({ - argv: { - ...rest, - destination: rest.destination ?? destination, - api: apiFile, - branchName: branch ?? maybeBranchName, - 'job-id': jobId || batchId, - }, - config, - version, - }); -}; -exports.transformPush = transformPush; -function getApiRoot({ name, version, config: { apis }, }) { - const api = apis?.[`${name}@${version}`] || (version === DEFAULT_VERSION && apis?.[name]); - return api?.root; -} -async function uploadFileToS3(url, filePathOrBuffer) { - const fileSizeInBytes = typeof filePathOrBuffer === 'string' - ? fs.statSync(filePathOrBuffer).size - : filePathOrBuffer.byteLength; - const readStream = typeof filePathOrBuffer === 'string' ? fs.createReadStream(filePathOrBuffer) : filePathOrBuffer; - const requestOptions = { - method: 'PUT', - headers: { - 'Content-Length': fileSizeInBytes.toString(), - }, - body: Buffer.isBuffer(readStream) - ? new Blob([readStream]) - : new Blob([await (0, api_client_1.streamToBuffer)(readStream)]), + }; }; - const proxyAgent = (0, openapi_core_1.getProxyAgent)(); - if (proxyAgent) { - requestOptions.dispatcher = proxyAgent; - } - return fetch(url, requestOptions); -} - + } +}); -/***/ }), - -/***/ 14093: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.otelTelemetry = exports.OtelServerTelemetry = void 0; -const api_1 = __nccwpck_require__(65163); -const resources_1 = __nccwpck_require__(3871); -const sdk_trace_node_1 = __nccwpck_require__(10195); -const exporter_trace_otlp_http_1 = __nccwpck_require__(35401); -const semantic_conventions_1 = __nccwpck_require__(67275); -const update_version_notifier_1 = __nccwpck_require__(56616); -const fetch_with_timeout_1 = __nccwpck_require__(14437); -const OTEL_TRACES_URL = process.env.OTEL_TRACES_URL || 'https://otel.cloud.redocly.com/v1/traces'; -class OtelServerTelemetry { - init() { - const nodeTracerProvider = new sdk_trace_node_1.NodeTracerProvider({ - resource: new resources_1.Resource({ - [semantic_conventions_1.ATTR_SERVICE_NAME]: `redocly-cli`, - [semantic_conventions_1.ATTR_SERVICE_VERSION]: `@redocly/cli@${update_version_notifier_1.version}`, - }), - }); - nodeTracerProvider.addSpanProcessor(new sdk_trace_node_1.SimpleSpanProcessor(new exporter_trace_otlp_http_1.OTLPTraceExporter({ - url: OTEL_TRACES_URL, - headers: {}, - timeoutMillis: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT, - }))); - nodeTracerProvider.register(); - } - send(event, data) { - const time = new Date(); - const eventId = crypto.randomUUID(); - const span = api_1.trace.getTracer('CliTelemetry').startSpan(`event.${event}`, { - attributes: { - 'cloudevents.event_client.id': eventId, - 'cloudevents.event_client.type': event, - }, - startTime: time, - }); - for (const [key, value] of Object.entries(data)) { - const keySnakeCase = key.replace(/([A-Z])/g, '_$1').toLowerCase(); - if (value !== undefined) { - span.setAttribute(`cloudevents.event_data.${keySnakeCase}`, value); +// node_modules/undici/lib/cache/sqlite-cache-store.js +var require_sqlite_cache_store = __commonJS({ + "node_modules/undici/lib/cache/sqlite-cache-store.js"(exports, module3) { + "use strict"; + var { Writable } = __require("node:stream"); + var { assertCacheKey, assertCacheValue } = require_cache(); + var DatabaseSync; + var VERSION = 3; + var MAX_ENTRY_SIZE = 2 * 1e3 * 1e3 * 1e3; + module3.exports = class SqliteCacheStore { + #maxEntrySize = MAX_ENTRY_SIZE; + #maxCount = Infinity; + /** + * @type {import('node:sqlite').DatabaseSync} + */ + #db; + /** + * @type {import('node:sqlite').StatementSync} + */ + #getValuesQuery; + /** + * @type {import('node:sqlite').StatementSync} + */ + #updateValueQuery; + /** + * @type {import('node:sqlite').StatementSync} + */ + #insertValueQuery; + /** + * @type {import('node:sqlite').StatementSync} + */ + #deleteExpiredValuesQuery; + /** + * @type {import('node:sqlite').StatementSync} + */ + #deleteByUrlQuery; + /** + * @type {import('node:sqlite').StatementSync} + */ + #countEntriesQuery; + /** + * @type {import('node:sqlite').StatementSync | null} + */ + #deleteOldValuesQuery; + /** + * @param {import('../../types/cache-interceptor.d.ts').default.SqliteCacheStoreOpts | undefined} opts + */ + constructor(opts) { + if (opts) { + if (typeof opts !== "object") { + throw new TypeError("SqliteCacheStore options must be an object"); + } + if (opts.maxEntrySize !== void 0) { + if (typeof opts.maxEntrySize !== "number" || !Number.isInteger(opts.maxEntrySize) || opts.maxEntrySize < 0) { + throw new TypeError("SqliteCacheStore options.maxEntrySize must be a non-negative integer"); + } + if (opts.maxEntrySize > MAX_ENTRY_SIZE) { + throw new TypeError("SqliteCacheStore options.maxEntrySize must be less than 2gb"); + } + this.#maxEntrySize = opts.maxEntrySize; + } + if (opts.maxCount !== void 0) { + if (typeof opts.maxCount !== "number" || !Number.isInteger(opts.maxCount) || opts.maxCount < 0) { + throw new TypeError("SqliteCacheStore options.maxCount must be a non-negative integer"); } + this.#maxCount = opts.maxCount; + } } - span.end(time); - } -} -exports.OtelServerTelemetry = OtelServerTelemetry; -exports.otelTelemetry = new OtelServerTelemetry(); - - -/***/ }), + if (!DatabaseSync) { + DatabaseSync = __require("node:sqlite").DatabaseSync; + } + this.#db = new DatabaseSync(opts?.location ?? ":memory:"); + this.#db.exec(` + PRAGMA journal_mode = WAL; + PRAGMA synchronous = NORMAL; + PRAGMA temp_store = memory; + PRAGMA optimize; -/***/ 67742: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION} ( + -- Data specific to us + id INTEGER PRIMARY KEY AUTOINCREMENT, + url TEXT NOT NULL, + method TEXT NOT NULL, -"use strict"; + -- Data returned to the interceptor + body BUF NULL, + deleteAt INTEGER NOT NULL, + statusCode INTEGER NOT NULL, + statusMessage TEXT NOT NULL, + headers TEXT NULL, + cacheControlDirectives TEXT NULL, + etag TEXT NULL, + vary TEXT NULL, + cachedAt INTEGER NOT NULL, + staleAt INTEGER NOT NULL + ); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ReuniteApi = exports.ReuniteApiClient = exports.ReuniteApiError = void 0; -exports.streamToBuffer = streamToBuffer; -const colorette_1 = __nccwpck_require__(53278); -const fetch_with_timeout_1 = __nccwpck_require__(14437); -class ReuniteApiError extends Error { - constructor(message, status) { - super(message); - this.status = status; - } -} -exports.ReuniteApiError = ReuniteApiError; -class ReuniteApiClient { - constructor(version, command) { - this.version = version; - this.command = command; - this.sunsetWarnings = []; - } - async request(url, options) { - const headers = { - ...options.headers, - 'user-agent': `redocly-cli/${this.version.trim()} ${this.command}`, - }; - const response = await (0, fetch_with_timeout_1.default)(url, { - ...options, - headers, - }); - this.collectSunsetWarning(response); - return response; - } - collectSunsetWarning(response) { - const sunsetTime = this.getSunsetDate(response); - if (!sunsetTime) - return; - const sunsetDate = new Date(sunsetTime); - if (sunsetTime > Date.now()) { - this.sunsetWarnings.push({ - sunsetDate, - isSunsetExpired: false, - }); - } - else { - this.sunsetWarnings.push({ - sunsetDate, - isSunsetExpired: true, - }); - } - } - getSunsetDate(response) { - const { headers } = response; - if (!headers) { - return; - } - const sunsetDate = headers.get('sunset') || headers.get('Sunset'); - if (!sunsetDate) { - return; - } - return Date.parse(sunsetDate); - } -} -exports.ReuniteApiClient = ReuniteApiClient; -class RemotesApi { - constructor(client, domain, apiKey) { - this.client = client; - this.domain = domain; - this.apiKey = apiKey; - } - async getParsedResponse(response) { - const responseBody = await response.json(); - if (response.ok) { - return responseBody; + CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_getValuesQuery ON cacheInterceptorV${VERSION}(url, method, deleteAt); + CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_deleteByUrlQuery ON cacheInterceptorV${VERSION}(deleteAt); + `); + this.#getValuesQuery = this.#db.prepare(` + SELECT + id, + body, + deleteAt, + statusCode, + statusMessage, + headers, + etag, + cacheControlDirectives, + vary, + cachedAt, + staleAt + FROM cacheInterceptorV${VERSION} + WHERE + url = ? + AND method = ? + ORDER BY + deleteAt ASC + `); + this.#updateValueQuery = this.#db.prepare(` + UPDATE cacheInterceptorV${VERSION} SET + body = ?, + deleteAt = ?, + statusCode = ?, + statusMessage = ?, + headers = ?, + etag = ?, + cacheControlDirectives = ?, + cachedAt = ?, + staleAt = ? + WHERE + id = ? + `); + this.#insertValueQuery = this.#db.prepare(` + INSERT INTO cacheInterceptorV${VERSION} ( + url, + method, + body, + deleteAt, + statusCode, + statusMessage, + headers, + etag, + cacheControlDirectives, + vary, + cachedAt, + staleAt + ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + `); + this.#deleteByUrlQuery = this.#db.prepare( + `DELETE FROM cacheInterceptorV${VERSION} WHERE url = ?` + ); + this.#countEntriesQuery = this.#db.prepare( + `SELECT COUNT(*) AS total FROM cacheInterceptorV${VERSION}` + ); + this.#deleteExpiredValuesQuery = this.#db.prepare( + `DELETE FROM cacheInterceptorV${VERSION} WHERE deleteAt <= ?` + ); + this.#deleteOldValuesQuery = this.#maxCount === Infinity ? null : this.#db.prepare(` + DELETE FROM cacheInterceptorV${VERSION} + WHERE id IN ( + SELECT + id + FROM cacheInterceptorV${VERSION} + ORDER BY cachedAt DESC + LIMIT ? + ) + `); + } + close() { + this.#db.close(); + } + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @returns {(import('../../types/cache-interceptor.d.ts').default.GetResult & { body?: Buffer }) | undefined} + */ + get(key) { + assertCacheKey(key); + const value = this.#findValue(key); + return value ? { + body: value.body ? Buffer.from(value.body.buffer, value.body.byteOffset, value.body.byteLength) : void 0, + statusCode: value.statusCode, + statusMessage: value.statusMessage, + headers: value.headers ? JSON.parse(value.headers) : void 0, + etag: value.etag ? value.etag : void 0, + vary: value.vary ? JSON.parse(value.vary) : void 0, + cacheControlDirectives: value.cacheControlDirectives ? JSON.parse(value.cacheControlDirectives) : void 0, + cachedAt: value.cachedAt, + staleAt: value.staleAt, + deleteAt: value.deleteAt + } : void 0; + } + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue & { body: null | Buffer | Array}} value + */ + set(key, value) { + assertCacheKey(key); + const url3 = this.#makeValueUrl(key); + const body = Array.isArray(value.body) ? Buffer.concat(value.body) : value.body; + const size = body?.byteLength; + if (size && size > this.#maxEntrySize) { + return; } - throw new ReuniteApiError(`${responseBody.title || response.statusText || 'Unknown error'}.`, response.status); - } - async getDefaultBranch(organizationId, projectId) { - try { - const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/source`, { - timeout: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT, - method: 'GET', - headers: { - 'Content-Type': 'application/json', - Authorization: `Bearer ${this.apiKey}`, - }, - }); - const source = await this.getParsedResponse(response); - return source.branchName; + const existingValue = this.#findValue(key, true); + if (existingValue) { + this.#updateValueQuery.run( + body, + value.deleteAt, + value.statusCode, + value.statusMessage, + value.headers ? JSON.stringify(value.headers) : null, + value.etag ? value.etag : null, + value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null, + value.cachedAt, + value.staleAt, + existingValue.id + ); + } else { + this.#prune(); + this.#insertValueQuery.run( + url3, + key.method, + body, + value.deleteAt, + value.statusCode, + value.statusMessage, + value.headers ? JSON.stringify(value.headers) : null, + value.etag ? value.etag : null, + value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null, + value.vary ? JSON.stringify(value.vary) : null, + value.cachedAt, + value.staleAt + ); } - catch (err) { - const message = `Failed to fetch default branch. ${err.message}`; - if (err instanceof ReuniteApiError) { - throw new ReuniteApiError(message, err.status); + } + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue} value + * @returns {Writable | undefined} + */ + createWriteStream(key, value) { + assertCacheKey(key); + assertCacheValue(value); + let size = 0; + const body = []; + const store = this; + return new Writable({ + decodeStrings: true, + write(chunk, encoding, callback) { + size += chunk.byteLength; + if (size < store.#maxEntrySize) { + body.push(chunk); + } else { + this.destroy(); } - throw new Error(message); + callback(); + }, + final(callback) { + store.set(key, { ...value, body }); + callback(); + } + }); + } + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + */ + delete(key) { + if (typeof key !== "object") { + throw new TypeError(`expected key to be object, got ${typeof key}`); } - } - async upsert(organizationId, projectId, remote) { - try { - const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/remotes`, { - timeout: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT, - method: 'POST', - headers: { - 'Content-Type': 'application/json', - Authorization: `Bearer ${this.apiKey}`, - }, - body: JSON.stringify({ - mountPath: remote.mountPath, - mountBranchName: remote.mountBranchName, - type: 'CICD', - autoMerge: true, - }), - }); - return await this.getParsedResponse(response); + this.#deleteByUrlQuery.run(this.#makeValueUrl(key)); + } + #prune() { + if (Number.isFinite(this.#maxCount) && this.size <= this.#maxCount) { + return 0; } - catch (err) { - const message = `Failed to upsert remote. ${err.message}`; - if (err instanceof ReuniteApiError) { - throw new ReuniteApiError(message, err.status); - } - throw new Error(message); + { + const removed = this.#deleteExpiredValuesQuery.run(Date.now()).changes; + if (removed) { + return removed; + } } - } - async push(organizationId, projectId, payload, files) { - const formData = new globalThis.FormData(); - formData.append('remoteId', payload.remoteId); - formData.append('commit[message]', payload.commit.message); - formData.append('commit[author][name]', payload.commit.author.name); - formData.append('commit[author][email]', payload.commit.author.email); - formData.append('commit[branchName]', payload.commit.branchName); - payload.commit.url && formData.append('commit[url]', payload.commit.url); - payload.commit.namespace && formData.append('commit[namespaceId]', payload.commit.namespace); - payload.commit.sha && formData.append('commit[sha]', payload.commit.sha); - payload.commit.repository && formData.append('commit[repositoryId]', payload.commit.repository); - payload.commit.createdAt && formData.append('commit[createdAt]', payload.commit.createdAt); - for (const file of files) { - const blob = Buffer.isBuffer(file.stream) - ? new Blob([file.stream]) - : new Blob([await streamToBuffer(file.stream)]); - formData.append(`files[${file.path}]`, blob, file.path); + { + const removed = this.#deleteOldValuesQuery?.run(Math.max(Math.floor(this.#maxCount * 0.1), 1)).changes; + if (removed) { + return removed; + } } - payload.isMainBranch && formData.append('isMainBranch', 'true'); - try { - const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/pushes`, { - method: 'POST', - headers: { - Authorization: `Bearer ${this.apiKey}`, - }, - body: formData, - }); - return await this.getParsedResponse(response); + return 0; + } + /** + * Counts the number of rows in the cache + * @returns {Number} + */ + get size() { + const { total } = this.#countEntriesQuery.get(); + return total; + } + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @returns {string} + */ + #makeValueUrl(key) { + return `${key.origin}/${key.path}`; + } + /** + * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key + * @param {boolean} [canBeExpired=false] + * @returns {SqliteStoreValue | undefined} + */ + #findValue(key, canBeExpired = false) { + const url3 = this.#makeValueUrl(key); + const { headers, method } = key; + const values = this.#getValuesQuery.all(url3, method); + if (values.length === 0) { + return void 0; } - catch (err) { - const message = `Failed to push. ${err.message}`; - if (err instanceof ReuniteApiError) { - throw new ReuniteApiError(message, err.status); + const now = Date.now(); + for (const value of values) { + if (now >= value.deleteAt && !canBeExpired) { + return void 0; + } + let matches = true; + if (value.vary) { + const vary = JSON.parse(value.vary); + for (const header in vary) { + if (!headerValueEquals(headers[header], vary[header])) { + matches = false; + break; + } } - throw new Error(message); - } - } - async getRemotesList({ organizationId, projectId, mountPath, }) { - try { - const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/remotes?filter=mountPath:/${mountPath}/`, { - timeout: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT, - method: 'GET', - headers: { - 'Content-Type': 'application/json', - Authorization: `Bearer ${this.apiKey}`, - }, - }); - return await this.getParsedResponse(response); + } + if (matches) { + return value; + } } - catch (err) { - const message = `Failed to get remote list. ${err.message}`; - if (err instanceof ReuniteApiError) { - throw new ReuniteApiError(message, err.status); - } - throw new Error(message); + return void 0; + } + }; + function headerValueEquals(lhs, rhs) { + if (lhs == null && rhs == null) { + return true; + } + if (lhs == null && rhs != null || lhs != null && rhs == null) { + return false; + } + if (Array.isArray(lhs) && Array.isArray(rhs)) { + if (lhs.length !== rhs.length) { + return false; } + return lhs.every((x3, i2) => x3 === rhs[i2]); + } + return lhs === rhs; } - async getPush({ organizationId, projectId, pushId, }) { - try { - const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/pushes/${pushId}`, { - timeout: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT, - method: 'GET', - headers: { - 'Content-Type': 'application/json', - Authorization: `Bearer ${this.apiKey}`, - }, + } +}); + +// node_modules/undici/lib/web/fetch/headers.js +var require_headers = __commonJS({ + "node_modules/undici/lib/web/fetch/headers.js"(exports, module3) { + "use strict"; + var { kConstruct } = require_symbols(); + var { kEnumerableProperty } = require_util(); + var { + iteratorMixin, + isValidHeaderName, + isValidHeaderValue + } = require_util2(); + var { webidl } = require_webidl(); + var assert = __require("node:assert"); + var util = __require("node:util"); + function isHTTPWhiteSpaceCharCode(code) { + return code === 10 || code === 13 || code === 9 || code === 32; + } + function headerValueNormalize(potentialValue) { + let i2 = 0; + let j3 = potentialValue.length; + while (j3 > i2 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j3 - 1))) --j3; + while (j3 > i2 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i2))) ++i2; + return i2 === 0 && j3 === potentialValue.length ? potentialValue : potentialValue.substring(i2, j3); + } + function fill(headers, object) { + if (Array.isArray(object)) { + for (let i2 = 0; i2 < object.length; ++i2) { + const header = object[i2]; + if (header.length !== 2) { + throw webidl.errors.exception({ + header: "Headers constructor", + message: `expected name/value pair to be length 2, found ${header.length}.` }); - return await this.getParsedResponse(response); - } - catch (err) { - const message = `Failed to get push status. ${err.message}`; - if (err instanceof ReuniteApiError) { - throw new ReuniteApiError(message, err.status); - } - throw new Error(message); + } + appendHeader(headers, header[0], header[1]); } - } -} -class ReuniteApi { - constructor({ domain, apiKey, version, command, }) { - this.command = command; - this.version = version; - this.apiClient = new ReuniteApiClient(this.version, this.command); - this.remotes = new RemotesApi(this.apiClient, domain, apiKey); - } - reportSunsetWarnings() { - const sunsetWarnings = this.apiClient.sunsetWarnings; - if (sunsetWarnings.length) { - const [{ isSunsetExpired, sunsetDate }] = sunsetWarnings.sort((a, b) => { - // First, prioritize by expiration status - if (a.isSunsetExpired !== b.isSunsetExpired) { - return a.isSunsetExpired ? -1 : 1; - } - // If both are either expired or not, sort by sunset date - return a.sunsetDate > b.sunsetDate ? 1 : -1; - }); - const updateVersionMessage = `Update to the latest version by running "npm install @redocly/cli@latest".`; - if (isSunsetExpired) { - process.stdout.write((0, colorette_1.red)(`The "${this.command}" command is not compatible with your version of Redocly CLI. ${updateVersionMessage}\n\n`)); - } - else { - process.stdout.write((0, colorette_1.yellow)(`The "${this.command}" command will be incompatible with your version of Redocly CLI after ${sunsetDate.toLocaleString()}. ${updateVersionMessage}\n\n`)); - } + } else if (typeof object === "object" && object !== null) { + const keys = Object.keys(object); + for (let i2 = 0; i2 < keys.length; ++i2) { + appendHeader(headers, keys[i2], object[keys[i2]]); } + } else { + throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + } } -} -exports.ReuniteApi = ReuniteApi; -async function streamToBuffer(stream) { - const chunks = []; - for await (const chunk of stream) { - chunks.push(chunk); - } - return Buffer.concat(chunks); -} - - -/***/ }), - -/***/ 47047: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getApiKeys = getApiKeys; -const path_1 = __nccwpck_require__(71017); -const os_1 = __nccwpck_require__(22037); -const fs_1 = __nccwpck_require__(57147); -const utils_1 = __nccwpck_require__(75450); -const redocly_1 = __nccwpck_require__(60357); -function readCredentialsFile(credentialsPath) { - return (0, fs_1.existsSync)(credentialsPath) ? JSON.parse((0, fs_1.readFileSync)(credentialsPath, 'utf-8')) : {}; -} -function getApiKeys(domain) { - const apiKey = process.env.REDOCLY_AUTHORIZATION; - if (apiKey) { - return apiKey; - } - const credentialsPath = (0, path_1.resolve)((0, os_1.homedir)(), redocly_1.TOKEN_FILENAME); - const credentials = readCredentialsFile(credentialsPath); - if ((0, utils_1.isNotEmptyObject)(credentials) && credentials[domain]) { - return credentials[domain]; - } - throw new Error('No api key provided, please use environment variable REDOCLY_AUTHORIZATION.'); -} - - -/***/ }), - -/***/ 43657: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.REUNITE_URLS = void 0; -exports.getDomain = getDomain; -exports.getReuniteUrl = getReuniteUrl; -exports.REUNITE_URLS = { - us: 'https://app.cloud.redocly.com', - eu: 'https://app.cloud.eu.redocly.com', -}; -function getDomain() { - return process.env.REDOCLY_DOMAIN || exports.REUNITE_URLS.us; -} -function getReuniteUrl(residency) { - if (!residency) - residency = 'us'; - let reuniteUrl = exports.REUNITE_URLS[residency]; - if (!reuniteUrl) { - reuniteUrl = residency; - } - const url = new URL('/api', reuniteUrl).toString(); - return url; -} - - -/***/ }), - -/***/ 57919: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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__(67742), exports); -__exportStar(__nccwpck_require__(43657), exports); -__exportStar(__nccwpck_require__(47047), exports); - - -/***/ }), - -/***/ 39547: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.handlePushStatus = handlePushStatus; -const colors = __nccwpck_require__(53278); -const miscellaneous_1 = __nccwpck_require__(82531); -const spinner_1 = __nccwpck_require__(96439); -const utils_1 = __nccwpck_require__(25114); -const api_1 = __nccwpck_require__(57919); -const js_utils_1 = __nccwpck_require__(19265); -const utils_2 = __nccwpck_require__(83763); -const RETRY_INTERVAL_MS = 5000; // 5 sec -async function handlePushStatus({ argv, config, version, }) { - const startedAt = performance.now(); - const spinner = new spinner_1.Spinner(); - const { organization, project: projectId, pushId, wait } = argv; - const orgId = organization || config.organization; - if (!orgId) { - (0, miscellaneous_1.exitWithError)(`No organization provided, please use --organization option or specify the 'organization' field in the config file.`); - return; - } - const domain = argv.domain || (0, api_1.getDomain)(); - const maxExecutionTime = argv['max-execution-time'] || 1200; // 20 min - const retryIntervalMs = argv['retry-interval'] - ? argv['retry-interval'] * 1000 - : RETRY_INTERVAL_MS; - const startTime = argv['start-time'] || Date.now(); - const retryTimeoutMs = maxExecutionTime * 1000; - const continueOnDeployFailures = argv['continue-on-deploy-failures'] || false; - try { - const apiKey = (0, api_1.getApiKeys)(domain); - const client = new api_1.ReuniteApi({ domain, apiKey, version, command: 'push-status' }); - let pushResponse; - pushResponse = await (0, utils_2.retryUntilConditionMet)({ - operation: () => client.remotes.getPush({ - organizationId: orgId, - projectId, - pushId, - }), - condition: wait - ? // Keep retrying if status is "pending" or "running" (returning false, so the operation will be retried) - (result) => !['pending', 'running'].includes(result.status['preview'].deploy.status) - : null, - onConditionNotMet: (lastResult) => { - displayDeploymentAndBuildStatus({ - status: lastResult.status['preview'].deploy.status, - url: lastResult.status['preview'].deploy.url, - spinner, - buildType: 'preview', - continueOnDeployFailures, - wait, - }); - }, - onRetry: (lastResult) => { - if (argv.onRetry) { - argv.onRetry({ - preview: lastResult.status.preview, - production: lastResult.isMainBranch ? lastResult.status.production : null, - commit: lastResult.commit, - }); - } - }, - startTime, - retryTimeoutMs, - retryIntervalMs, + function appendHeader(headers, name, value) { + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value: name, + type: "header name" }); - printPushStatus({ - buildType: 'preview', - spinner, - wait, - push: pushResponse, - continueOnDeployFailures, + } else if (!isValidHeaderValue(value)) { + throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value, + type: "header value" }); - printScorecard(pushResponse.status.preview.scorecard); - const shouldWaitForProdDeployment = pushResponse.isMainBranch && - (wait ? pushResponse.status.preview.deploy.status === 'success' : true); - if (shouldWaitForProdDeployment) { - pushResponse = await (0, utils_2.retryUntilConditionMet)({ - operation: () => client.remotes.getPush({ - organizationId: orgId, - projectId, - pushId, - }), - condition: wait - ? // Keep retrying if status is "pending" or "running" (returning false, so the operation will be retried) - (result) => !['pending', 'running'].includes(result.status['production'].deploy.status) - : null, - onConditionNotMet: (lastResult) => { - displayDeploymentAndBuildStatus({ - status: lastResult.status['production'].deploy.status, - url: lastResult.status['production'].deploy.url, - spinner, - buildType: 'production', - continueOnDeployFailures, - wait, - }); - }, - onRetry: (lastResult) => { - if (argv.onRetry) { - argv.onRetry({ - preview: lastResult.status.preview, - production: lastResult.isMainBranch ? lastResult.status.production : null, - commit: lastResult.commit, - }); - } - }, - startTime, - retryTimeoutMs, - retryIntervalMs, - }); - } - if (pushResponse.isMainBranch) { - printPushStatus({ - buildType: 'production', - spinner, - wait, - push: pushResponse, - continueOnDeployFailures, - }); - printScorecard(pushResponse.status.production.scorecard); - } - printPushStatusInfo({ orgId, projectId, pushId, startedAt }); - client.reportSunsetWarnings(); - const summary = { - preview: pushResponse.status.preview, - production: pushResponse.isMainBranch ? pushResponse.status.production : null, - commit: pushResponse.commit, - }; - return summary; - } - catch (err) { - spinner.stop(); // Spinner can block process exit, so we need to stop it explicitly. - (0, utils_2.handleReuniteError)('✗ Failed to get push status.', err); - } - finally { - spinner.stop(); // Spinner can block process exit, so we need to stop it explicitly. - } -} -function printPushStatusInfo({ orgId, projectId, pushId, startedAt, }) { - process.stderr.write(`\nProcessed push-status for ${colors.yellow(orgId)}, ${colors.yellow(projectId)} and pushID ${colors.yellow(pushId)}.\n`); - (0, miscellaneous_1.printExecutionTime)('push-status', startedAt, 'Finished'); -} -function printPushStatus({ buildType, spinner, push, continueOnDeployFailures, }) { - if (!push) { - return; - } - if (push.isOutdated || !push.hasChanges) { - process.stderr.write(colors.yellow(`Files not added to your project. Reason: ${push.isOutdated ? 'outdated' : 'no changes'}.\n`)); + } + if (getHeadersGuard(headers) === "immutable") { + throw new TypeError("immutable"); + } + return getHeadersList(headers).append(name, value, false); } - else { - displayDeploymentAndBuildStatus({ - status: push.status[buildType].deploy.status, - url: push.status[buildType].deploy.url, - buildType, - spinner, - continueOnDeployFailures, - }); + function headersListSortAndCombine(target) { + const headersList = getHeadersList(target); + if (!headersList) { + return []; + } + if (headersList.sortedMap) { + return headersList.sortedMap; + } + const headers = []; + const names = headersList.toSortedArray(); + const cookies = headersList.cookies; + if (cookies === null || cookies.length === 1) { + return headersList.sortedMap = names; + } + for (let i2 = 0; i2 < names.length; ++i2) { + const { 0: name, 1: value } = names[i2]; + if (name === "set-cookie") { + for (let j3 = 0; j3 < cookies.length; ++j3) { + headers.push([name, cookies[j3]]); + } + } else { + headers.push([name, value]); + } + } + return headersList.sortedMap = headers; } -} -function printScorecard(scorecard) { - if (!scorecard || scorecard.length === 0) { - return; + function compareHeaderName(a2, b2) { + return a2[0] < b2[0] ? -1 : 1; } - process.stdout.write(`\n${colors.magenta('Scorecard')}:`); - for (const scorecardItem of scorecard) { - process.stdout.write(` - ${colors.magenta('Name')}: ${scorecardItem.name} - ${colors.magenta('Status')}: ${scorecardItem.status} - ${colors.magenta('URL')}: ${colors.cyan(scorecardItem.url)} - ${colors.magenta('Description')}: ${scorecardItem.description}\n`); - } - process.stdout.write(`\n`); -} -function displayDeploymentAndBuildStatus({ status, url, spinner, buildType, continueOnDeployFailures, wait, }) { - const message = getMessage({ status, url, buildType, wait }); - if (status === 'failed' && !continueOnDeployFailures) { - spinner.stop(); - throw new utils_1.DeploymentError(message); - } - if (wait && (status === 'pending' || status === 'running')) { - return spinner.start(message); - } - spinner.stop(); - return process.stdout.write(message); -} -function getMessage({ status, url, buildType, wait, }) { - switch (status) { - case 'skipped': - return `${colors.yellow(`Skipped ${buildType}`)}\n`; - case 'pending': { - const message = `${colors.yellow(`Pending ${buildType}`)}`; - return wait ? message : `Status: ${message}\n`; - } - case 'running': { - const message = `${colors.yellow(`Running ${buildType}`)}`; - return wait ? message : `Status: ${message}\n`; - } - case 'success': - return `${colors.green(`🚀 ${(0, js_utils_1.capitalize)(buildType)} deploy success.`)}\n${colors.magenta(`${(0, js_utils_1.capitalize)(buildType)} URL`)}: ${colors.cyan(url || 'No URL yet.')}\n`; - case 'failed': - return `${colors.red(`❌ ${(0, js_utils_1.capitalize)(buildType)} deploy fail.`)}\n${colors.magenta(`${(0, js_utils_1.capitalize)(buildType)} URL`)}: ${colors.cyan(url || 'No URL yet.')}`; - default: { - const message = `${colors.yellow(`No status yet for ${buildType} deploy`)}`; - return wait ? message : `Status: ${message}\n`; + var HeadersList = class _HeadersList { + /** @type {[string, string][]|null} */ + cookies = null; + sortedMap; + headersMap; + constructor(init2) { + if (init2 instanceof _HeadersList) { + this.headersMap = new Map(init2.headersMap); + this.sortedMap = init2.sortedMap; + this.cookies = init2.cookies === null ? null : [...init2.cookies]; + } else { + this.headersMap = new Map(init2); + this.sortedMap = null; } - } -} - - -/***/ }), - -/***/ 72775: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.handlePush = handlePush; -const fs = __nccwpck_require__(57147); -const path = __nccwpck_require__(71017); -const openapi_core_1 = __nccwpck_require__(59307); -const utils_1 = __nccwpck_require__(75450); -const colorette_1 = __nccwpck_require__(53278); -const miscellaneous_1 = __nccwpck_require__(82531); -const push_status_1 = __nccwpck_require__(39547); -const api_1 = __nccwpck_require__(57919); -const utils_2 = __nccwpck_require__(83763); -async function handlePush({ argv, config, version, }) { - const startedAt = performance.now(); // for printing execution time - const startTime = Date.now(); // for push-status command - const { organization, project: projectId, 'mount-path': mountPath, verbose } = argv; - const orgId = organization || config.organization; - if (!argv.message || !argv.author || !argv.branch) { - (0, miscellaneous_1.exitWithError)('Error: message, author and branch are required for push to the Reunite.'); - } - if (!orgId) { - return (0, miscellaneous_1.exitWithError)(`No organization provided, please use --organization option or specify the 'organization' field in the config file.`); - } - const domain = argv.domain || (0, api_1.getDomain)(); - if (!domain) { - return (0, miscellaneous_1.exitWithError)(`No domain provided, please use --domain option or environment variable REDOCLY_AUTHORIZATION.`); - } - try { - const { 'commit-sha': commitSha, 'commit-url': commitUrl, 'default-branch': defaultBranch, 'wait-for-deployment': waitForDeployment, 'max-execution-time': maxExecutionTime, } = argv; - const author = parseCommitAuthor(argv.author); - const apiKey = (0, api_1.getApiKeys)(domain); - const filesToUpload = collectFilesToPush(argv.files || argv.apis); - const commandName = 'push'; - if (!filesToUpload.length) { - return (0, miscellaneous_1.printExecutionTime)(commandName, startedAt, `No files to upload`); - } - const client = new api_1.ReuniteApi({ domain, apiKey, version, command: commandName }); - const projectDefaultBranch = await client.remotes.getDefaultBranch(orgId, projectId); - const remote = await client.remotes.upsert(orgId, projectId, { - mountBranchName: projectDefaultBranch, - mountPath, - }); - process.stderr.write(`Uploading to ${remote.mountPath} ${filesToUpload.length} ${(0, utils_1.pluralize)('file', filesToUpload.length)}:\n`); - const { id } = await client.remotes.push(orgId, projectId, { - remoteId: remote.id, - commit: { - message: argv.message, - branchName: argv.branch, - sha: commitSha, - url: commitUrl, - createdAt: argv['created-at'], - namespace: argv.namespace, - repository: argv.repository, - author, - }, - isMainBranch: defaultBranch === argv.branch, - }, filesToUpload.map((f) => ({ path: (0, openapi_core_1.slash)(f.name), stream: fs.createReadStream(f.path) }))); - filesToUpload.forEach((f) => { - process.stderr.write((0, colorette_1.green)(`✓ ${f.name}\n`)); - }); - process.stdout.write('\n'); - process.stdout.write(`Push ID: ${id}\n`); - if (waitForDeployment) { - process.stdout.write('\n'); - await (0, push_status_1.handlePushStatus)({ - argv: { - organization: orgId, - project: projectId, - pushId: id, - wait: true, - domain, - 'max-execution-time': maxExecutionTime, - 'start-time': startTime, - 'continue-on-deploy-failures': argv['continue-on-deploy-failures'], - }, - config, - version, - }); + } + /** + * @see https://fetch.spec.whatwg.org/#header-list-contains + * @param {string} name + * @param {boolean} isLowerCase + */ + contains(name, isLowerCase) { + return this.headersMap.has(isLowerCase ? name : name.toLowerCase()); + } + clear() { + this.headersMap.clear(); + this.sortedMap = 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.sortedMap = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + const exists = this.headersMap.get(lowercaseName); + if (exists) { + const delimiter = lowercaseName === "cookie" ? "; " : ", "; + this.headersMap.set(lowercaseName, { + name: exists.name, + value: `${exists.value}${delimiter}${value}` + }); + } else { + this.headersMap.set(lowercaseName, { name, value }); } - verbose && - (0, miscellaneous_1.printExecutionTime)(commandName, startedAt, `${(0, utils_1.pluralize)('file', filesToUpload.length)} uploaded to organization ${orgId}, project ${projectId}. Push ID: ${id}.`); - client.reportSunsetWarnings(); - return { - pushId: id, - }; - } - catch (err) { - (0, utils_2.handleReuniteError)('✗ File upload failed.', err); - } -} -function parseCommitAuthor(author) { - // Author Name - const reg = /^.+\s<[^<>]+>$/; - if (!reg.test(author)) { - throw new Error('Invalid author format. Use "Author Name "'); - } - const [name, email] = author.split('<'); - return { - name: name.trim(), - email: email.replace('>', '').trim(), + 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.sortedMap = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + if (lowercaseName === "set-cookie") { + this.cookies = [value]; + } + this.headersMap.set(lowercaseName, { name, value }); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-delete + * @param {string} name + * @param {boolean} isLowerCase + */ + delete(name, isLowerCase) { + this.sortedMap = null; + if (!isLowerCase) name = name.toLowerCase(); + if (name === "set-cookie") { + this.cookies = null; + } + this.headersMap.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.headersMap.get(isLowerCase ? name : name.toLowerCase())?.value ?? null; + } + *[Symbol.iterator]() { + for (const { 0: name, 1: { value } } of this.headersMap) { + yield [name, value]; + } + } + get entries() { + const headers = {}; + if (this.headersMap.size !== 0) { + for (const { name, value } of this.headersMap.values()) { + headers[name] = value; + } + } + return headers; + } + rawValues() { + return this.headersMap.values(); + } + get entriesList() { + const headers = []; + if (this.headersMap.size !== 0) { + for (const { 0: lowerName, 1: { name, value } } of this.headersMap) { + 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.headersMap.size; + const array = new Array(size); + if (size <= 32) { + if (size === 0) { + return array; + } + const iterator = this.headersMap[Symbol.iterator](); + const firstValue = iterator.next().value; + array[0] = [firstValue[0], firstValue[1].value]; + assert(firstValue[1].value !== null); + for (let i2 = 1, j3 = 0, right = 0, left = 0, pivot = 0, x3, value; i2 < size; ++i2) { + value = iterator.next().value; + x3 = array[i2] = [value[0], value[1].value]; + assert(x3[1] !== null); + left = 0; + right = i2; + while (left < right) { + pivot = left + (right - left >> 1); + if (array[pivot][0] <= x3[0]) { + left = pivot + 1; + } else { + right = pivot; + } + } + if (i2 !== pivot) { + j3 = i2; + while (j3 > left) { + array[j3] = array[--j3]; + } + array[left] = x3; + } + } + if (!iterator.next().done) { + throw new TypeError("Unreachable"); + } + return array; + } else { + let i2 = 0; + for (const { 0: name, 1: { value } } of this.headersMap) { + array[i2++] = [name, value]; + assert(value !== null); + } + return array.sort(compareHeaderName); + } + } }; -} -function collectFilesToPush(files) { - const collectedFiles = {}; - for (const file of files) { - if (fs.statSync(file).isDirectory()) { - const dir = file; - const fileList = getFilesList(dir, []); - fileList.forEach((f) => addFile(f, dir)); + var Headers = class _Headers { + #guard; + /** + * @type {HeadersList} + */ + #headersList; + /** + * @param {HeadersInit|Symbol} [init] + * @returns + */ + constructor(init2 = void 0) { + webidl.util.markAsUncloneable(this); + if (init2 === kConstruct) { + return; } - else { - addFile(file, path.dirname(file)); + this.#headersList = new HeadersList(); + this.#guard = "none"; + if (init2 !== void 0) { + init2 = webidl.converters.HeadersInit(init2, "Headers constructor", "init"); + fill(this, init2); + } + } + // 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"); + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: "Headers.delete", + value: name, + type: "header name" + }); } - } - function addFile(filePath, fileDir) { - const fileName = path.relative(fileDir, filePath); - if (collectedFiles[fileName]) { - process.stdout.write((0, colorette_1.yellow)(`File ${collectedFiles[fileName]} is overwritten by ${filePath}\n`)); + if (this.#guard === "immutable") { + throw new TypeError("immutable"); } - collectedFiles[fileName] = filePath; - } - return Object.entries(collectedFiles).map(([name, filePath]) => getFileEntry(name, filePath)); -} -function getFileEntry(name, filePath) { - return { - name, - path: path.resolve(filePath), + if (!this.#headersList.contains(name, false)) { + return; + } + 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"); + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + } + 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"); + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + } + 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"); + 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); + } + // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie + getSetCookie() { + webidl.brandCheck(this, _Headers); + const list = this.#headersList.cookies; + if (list) { + return [...list]; + } + return []; + } + [util.inspect.custom](depth, options2) { + options2.depth ??= depth; + return `Headers ${util.formatWithOptions(options2, this.#headersList.entries)}`; + } + static getHeadersGuard(o) { + return o.#guard; + } + static setHeadersGuard(o, guard) { + o.#guard = guard; + } + /** + * @param {Headers} o + */ + static getHeadersList(o) { + return o.#headersList; + } + /** + * @param {Headers} target + * @param {HeadersList} list + */ + static setHeadersList(target, list) { + target.#headersList = list; + } }; -} -function getFilesList(dir, files) { - const filesAndDirs = fs.readdirSync(dir); - for (const name of filesAndDirs) { - const currentPath = path.join(dir, name); - if (fs.statSync(currentPath).isDirectory()) { - files = getFilesList(currentPath, files); + var { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers; + Reflect.deleteProperty(Headers, "getHeadersGuard"); + Reflect.deleteProperty(Headers, "setHeadersGuard"); + Reflect.deleteProperty(Headers, "getHeadersList"); + Reflect.deleteProperty(Headers, "setHeadersList"); + iteratorMixin("Headers", Headers, headersListSortAndCombine, 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(V3, prefix, argument) { + if (webidl.util.Type(V3) === webidl.util.Types.OBJECT) { + const iterator = Reflect.get(V3, Symbol.iterator); + if (!util.types.isProxy(V3) && iterator === Headers.prototype.entries) { + try { + return getHeadersList(V3).entriesList; + } catch { + } } - else { - files.push(currentPath); + if (typeof iterator === "function") { + return webidl.converters["sequence>"](V3, prefix, argument, iterator.bind(V3)); } - } - return files; -} - + return webidl.converters["record"](V3, prefix, argument); + } + throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + }; + module3.exports = { + fill, + // for test. + compareHeaderName, + Headers, + HeadersList, + getHeadersGuard, + setHeadersGuard, + setHeadersList, + getHeadersList + }; + } +}); -/***/ }), - -/***/ 83763: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.retryUntilConditionMet = retryUntilConditionMet; -exports.handleReuniteError = handleReuniteError; -const openapi_core_1 = __nccwpck_require__(59307); -const utils_1 = __nccwpck_require__(25114); -const miscellaneous_1 = __nccwpck_require__(82531); -/** - * This function retries an operation until a condition is met or a timeout is exceeded. - * If the condition is not met within the timeout, an error is thrown. - * @operation The operation to retry. - * @condition The condition to check after each operation result. Return false to continue retrying. Return true to stop retrying. - * If not provided, the first result will be returned. - * @param onConditionNotMet Will be called with the last result right after checking condition and before timeout and retrying. - * @param onRetry Will be called right before retrying operation with the last result before retrying. - * @param startTime The start time of the operation. Default is the current time. - * @param retryTimeoutMs The maximum time to retry the operation. Default is 10 minutes. - * @param retryIntervalMs The interval between retries. Default is 5 seconds. - */ -async function retryUntilConditionMet({ operation, condition, onConditionNotMet, onRetry, startTime = Date.now(), retryTimeoutMs = 600000, // 10 min -retryIntervalMs = 5000, // 5 sec - }) { - async function attempt() { - const result = await operation(); - if (!condition) { - return result; +// node_modules/undici/lib/web/fetch/response.js +var require_response = __commonJS({ + "node_modules/undici/lib/web/fetch/response.js"(exports, module3) { + "use strict"; + var { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers(); + var { extractBody, cloneBody, mixinBody, streamRegistry, bodyUnusable } = require_body(); + var util = require_util(); + var nodeUtil = __require("node:util"); + var { kEnumerableProperty } = util; + var { + isValidReasonPhrase, + isCancelled, + isAborted, + isErrorLike, + environmentSettingsObject: relevantRealm + } = require_util2(); + var { + redirectStatusSet, + nullBodyStatus + } = require_constants3(); + var { webidl } = require_webidl(); + var { URLSerializer } = require_data_url(); + var { kConstruct } = require_symbols(); + var assert = __require("node:assert"); + var { isomorphicEncode, serializeJavascriptValueToJSONString } = require_infra(); + var textEncoder = new TextEncoder("utf-8"); + var Response4 = class _Response { + /** @type {Headers} */ + #headers; + #state; + // Creates network error Response. + static error() { + const responseObject = fromInnerResponse(makeNetworkError(), "immutable"); + return responseObject; + } + // https://fetch.spec.whatwg.org/#dom-response-json + static json(data, init2 = void 0) { + webidl.argumentLengthCheck(arguments, 1, "Response.json"); + if (init2 !== null) { + init2 = webidl.converters.ResponseInit(init2); + } + const bytes = textEncoder.encode( + serializeJavascriptValueToJSONString(data) + ); + const body = extractBody(bytes); + const responseObject = fromInnerResponse(makeResponse({}), "response"); + initializeResponse(responseObject, init2, { body: body[0], type: "application/json" }); + return responseObject; + } + // Creates a redirect Response that redirects to url with status status. + static redirect(url3, status = 302) { + webidl.argumentLengthCheck(arguments, 1, "Response.redirect"); + url3 = webidl.converters.USVString(url3); + status = webidl.converters["unsigned short"](status); + let parsedURL; + try { + parsedURL = new URL(url3, relevantRealm.settingsObject.baseUrl); + } catch (err) { + throw new TypeError(`Failed to parse URL from ${url3}`, { cause: err }); } - if (condition(result)) { - return result; + if (!redirectStatusSet.has(status)) { + throw new RangeError(`Invalid status code ${status}`); } - else if (Date.now() - startTime > retryTimeoutMs) { - throw new Error('Timeout exceeded.'); + const responseObject = fromInnerResponse(makeResponse({}), "immutable"); + responseObject.#state.status = status; + const value = isomorphicEncode(URLSerializer(parsedURL)); + responseObject.#state.headersList.append("location", value, true); + return responseObject; + } + // https://fetch.spec.whatwg.org/#dom-response + constructor(body = null, init2 = void 0) { + webidl.util.markAsUncloneable(this); + if (body === kConstruct) { + return; } - else { - onConditionNotMet?.(result); - await (0, openapi_core_1.pause)(retryIntervalMs); - await onRetry?.(result); - return attempt(); + if (body !== null) { + body = webidl.converters.BodyInit(body, "Response", "body"); + } + init2 = webidl.converters.ResponseInit(init2); + this.#state = makeResponse({}); + this.#headers = new Headers(kConstruct); + setHeadersGuard(this.#headers, "response"); + setHeadersList(this.#headers, this.#state.headersList); + let bodyWithType = null; + if (body != null) { + const [extractedBody, type2] = extractBody(body); + bodyWithType = { body: extractedBody, type: type2 }; + } + initializeResponse(this, init2, bodyWithType); + } + // Returns response’s type, e.g., "cors". + get type() { + webidl.brandCheck(this, _Response); + return this.#state.type; + } + // Returns response’s URL, if it has one; otherwise the empty string. + get url() { + webidl.brandCheck(this, _Response); + const urlList = this.#state.urlList; + const url3 = urlList[urlList.length - 1] ?? null; + if (url3 === null) { + return ""; + } + return URLSerializer(url3, true); + } + // Returns whether response was obtained through a redirect. + get redirected() { + webidl.brandCheck(this, _Response); + return this.#state.urlList.length > 1; + } + // Returns response’s status. + get status() { + webidl.brandCheck(this, _Response); + return this.#state.status; + } + // Returns whether response’s status is an ok status. + get ok() { + webidl.brandCheck(this, _Response); + return this.#state.status >= 200 && this.#state.status <= 299; + } + // Returns response’s status message. + get statusText() { + webidl.brandCheck(this, _Response); + return this.#state.statusText; + } + // Returns response’s headers as Headers. + get headers() { + webidl.brandCheck(this, _Response); + return this.#headers; + } + get body() { + webidl.brandCheck(this, _Response); + return this.#state.body ? this.#state.body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, _Response); + return !!this.#state.body && util.isDisturbed(this.#state.body.stream); + } + // Returns a clone of response. + clone() { + webidl.brandCheck(this, _Response); + if (bodyUnusable(this.#state)) { + throw webidl.errors.exception({ + header: "Response.clone", + message: "Body has already been consumed." + }); } - } - return attempt(); -} -function handleReuniteError(message, error) { - const errorMessage = error instanceof utils_1.DeploymentError ? error.message : `${message} Reason: ${error.message}\n`; - return (0, miscellaneous_1.exitWithError)(errorMessage); -} - - -/***/ }), - -/***/ 25114: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DeploymentError = void 0; -class DeploymentError extends Error { -} -exports.DeploymentError = DeploymentError; - - -/***/ }), - -/***/ 78552: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.regionChoices = exports.outputExtensions = void 0; -exports.outputExtensions = ['json', 'yaml', 'yml']; -exports.regionChoices = ['us', 'eu']; - - -/***/ }), - -/***/ 14437: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DEFAULT_FETCH_TIMEOUT = void 0; -const openapi_core_1 = __nccwpck_require__(59307); -exports.DEFAULT_FETCH_TIMEOUT = 6000; -exports["default"] = async (url, { timeout, ...options } = {}) => { - if (!timeout) { - return fetch(url, { - ...options, - dispatcher: (0, openapi_core_1.getProxyAgent)(), - }); - } - const controller = new globalThis.AbortController(); - const timeoutId = setTimeout(() => { - controller.abort(); - }, timeout); - const res = await fetch(url, { - signal: controller.signal, - ...options, - dispatcher: (0, openapi_core_1.getProxyAgent)(), + const clonedResponse = cloneResponse(this.#state); + if (this.#state.urlList.length !== 0 && this.#state.body?.stream) { + streamRegistry.register(this, new WeakRef(this.#state.body.stream)); + } + return fromInnerResponse(clonedResponse, getHeadersGuard(this.#headers)); + } + [nodeUtil.inspect.custom](depth, options2) { + if (options2.depth === null) { + options2.depth = 2; + } + options2.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(options2, properties)}`; + } + /** + * @param {Response} response + */ + static getResponseHeaders(response) { + return response.#headers; + } + /** + * @param {Response} response + * @param {Headers} newHeaders + */ + static setResponseHeaders(response, newHeaders) { + response.#headers = newHeaders; + } + /** + * @param {Response} response + */ + static getResponseState(response) { + return response.#state; + } + /** + * @param {Response} response + * @param {any} newState + */ + static setResponseState(response, newState) { + response.#state = newState; + } + }; + var { getResponseHeaders, setResponseHeaders, getResponseState, setResponseState } = Response4; + Reflect.deleteProperty(Response4, "getResponseHeaders"); + Reflect.deleteProperty(Response4, "setResponseHeaders"); + Reflect.deleteProperty(Response4, "getResponseState"); + Reflect.deleteProperty(Response4, "setResponseState"); + mixinBody(Response4, getResponseState); + Object.defineProperties(Response4.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 + } }); - clearTimeout(timeoutId); - return res; -}; - - -/***/ }), - -/***/ 19265: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isObject = isObject; -exports.isEmptyObject = isEmptyObject; -exports.isString = isString; -exports.keysOf = keysOf; -exports.capitalize = capitalize; -function isObject(obj) { - const type = typeof obj; - return type === 'function' || (type === 'object' && !!obj); -} -function isEmptyObject(obj) { - return !!obj && Object.keys(obj).length === 0; -} -function isString(str) { - return Object.prototype.toString.call(str) === '[object String]'; -} -function keysOf(obj) { - if (!obj) - return []; - return Object.keys(obj); -} -function capitalize(s) { - if (s?.length > 0) { - return s[0].toUpperCase() + s.slice(1); + Object.defineProperties(Response4, { + 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(response.body); + } + return newResponse; } - return s; -} - - -/***/ }), - -/***/ 82531: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HandledError = exports.CircularJSONNotSupportedError = void 0; -exports.getFallbackApisOrExit = getFallbackApisOrExit; -exports.getExecutionTime = getExecutionTime; -exports.printExecutionTime = printExecutionTime; -exports.pathToFilename = pathToFilename; -exports.escapeLanguageName = escapeLanguageName; -exports.langToExt = langToExt; -exports.dumpBundle = dumpBundle; -exports.saveBundle = saveBundle; -exports.promptUser = promptUser; -exports.readYaml = readYaml; -exports.writeToFileByExtension = writeToFileByExtension; -exports.writeYaml = writeYaml; -exports.writeJson = writeJson; -exports.getAndValidateFileExtension = getAndValidateFileExtension; -exports.handleError = handleError; -exports.printLintTotals = printLintTotals; -exports.printConfigLintTotals = printConfigLintTotals; -exports.getOutputFileName = getOutputFileName; -exports.printUnusedWarnings = printUnusedWarnings; -exports.exitWithError = exitWithError; -exports.isSubdir = isSubdir; -exports.loadConfigAndHandleErrors = loadConfigAndHandleErrors; -exports.sortTopLevelKeysForOas = sortTopLevelKeysForOas; -exports.checkIfRulesetExist = checkIfRulesetExist; -exports.cleanColors = cleanColors; -exports.sendTelemetry = sendTelemetry; -exports.cleanArgs = cleanArgs; -exports.checkForDeprecatedOptions = checkForDeprecatedOptions; -exports.notifyAboutIncompatibleConfigOptions = notifyAboutIncompatibleConfigOptions; -exports.formatPath = formatPath; -const path_1 = __nccwpck_require__(71017); -const colorette_1 = __nccwpck_require__(53278); -const perf_hooks_1 = __nccwpck_require__(4074); -const glob = __nccwpck_require__(91957); -const fs = __nccwpck_require__(57147); -const os = __nccwpck_require__(22037); -const readline = __nccwpck_require__(14521); -const stream_1 = __nccwpck_require__(12781); -const child_process_1 = __nccwpck_require__(32081); -const util_1 = __nccwpck_require__(73837); -const openapi_core_1 = __nccwpck_require__(59307); -const utils_1 = __nccwpck_require__(75450); -const config_1 = __nccwpck_require__(50627); -const reference_docs_config_schema_1 = __nccwpck_require__(99417); -const types_1 = __nccwpck_require__(78552); -const update_version_notifier_1 = __nccwpck_require__(56616); -const push_1 = __nccwpck_require__(13354); -const api_1 = __nccwpck_require__(57919); -async function getFallbackApisOrExit(argsApis, config) { - const { apis } = config; - const shouldFallbackToAllDefinitions = !(0, utils_1.isNotEmptyArray)(argsApis) && (0, utils_1.isNotEmptyObject)(apis); - const res = shouldFallbackToAllDefinitions - ? fallbackToAllDefinitions(apis, config) - : await expandGlobsInEntrypoints(argsApis, config); - const filteredInvalidEntrypoints = res.filter(({ path }) => !isApiPathValid(path)); - if ((0, utils_1.isNotEmptyArray)(filteredInvalidEntrypoints)) { - for (const { path } of filteredInvalidEntrypoints) { - process.stderr.write((0, colorette_1.yellow)(`\n${formatPath(path)} ${(0, colorette_1.red)(`does not exist or is invalid.\n\n`)}`)); - } - exitWithError('Please provide a valid path.'); - } - return res; -} -function getConfigDirectory(config) { - return config.configFile ? (0, path_1.dirname)(config.configFile) : process.cwd(); -} -function isApiPathValid(apiPath) { - if (!apiPath.trim()) { - exitWithError('Path cannot be empty.'); - return; + function makeResponse(init2) { + return { + aborted: false, + rangeRequested: false, + timingAllowPassed: false, + requestIncludesCredentials: false, + type: "default", + status: 200, + timingInfo: null, + cacheState: "", + statusText: "", + ...init2, + headersList: init2?.headersList ? new HeadersList(init2?.headersList) : new HeadersList(), + urlList: init2?.urlList ? [...init2.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" + }); } - return fs.existsSync(apiPath) || (0, openapi_core_1.isAbsoluteUrl)(apiPath) ? apiPath : undefined; -} -function fallbackToAllDefinitions(apis, config) { - return Object.entries(apis).map(([alias, { root, output }]) => ({ - path: (0, openapi_core_1.isAbsoluteUrl)(root) ? root : (0, path_1.resolve)(getConfigDirectory(config), root), - alias, - output: output && (0, path_1.resolve)(getConfigDirectory(config), output), - })); -} -function getAliasOrPath(config, aliasOrPath) { - const aliasApi = config.apis[aliasOrPath]; - return aliasApi - ? { - path: (0, openapi_core_1.isAbsoluteUrl)(aliasApi.root) - ? aliasApi.root - : (0, path_1.resolve)(getConfigDirectory(config), aliasApi.root), - alias: aliasOrPath, - output: aliasApi.output && (0, path_1.resolve)(getConfigDirectory(config), aliasApi.output), - } - : { - path: aliasOrPath, - // find alias by path, take the first match - alias: Object.entries(config.apis).find(([_alias, api]) => { - return (0, path_1.resolve)(api.root) === (0, path_1.resolve)(aliasOrPath); - })?.[0] ?? undefined, - }; -} -async function expandGlobsInEntrypoints(argApis, config) { - return (await Promise.all(argApis.map(async (aliasOrPath) => { - return glob.hasMagic(aliasOrPath) && !(0, openapi_core_1.isAbsoluteUrl)(aliasOrPath) - ? (await (0, util_1.promisify)(glob)(aliasOrPath)).map((g) => getAliasOrPath(config, g)) - : getAliasOrPath(config, aliasOrPath); - }))).flat(); -} -function getExecutionTime(startedAt) { - return process.env.NODE_ENV === 'test' - ? 'ms' - : `${Math.ceil(perf_hooks_1.performance.now() - startedAt)}ms`; -} -function printExecutionTime(commandName, startedAt, api) { - const elapsed = getExecutionTime(startedAt); - process.stderr.write((0, colorette_1.gray)(`\n${api}: ${commandName} processed in ${elapsed}\n\n`)); -} -function pathToFilename(path, pathSeparator) { - return path - .replace(/~1/g, '/') - .replace(/~0/g, '~') - .replace(/^\//, '') - .replace(/\//g, pathSeparator); -} -function escapeLanguageName(lang) { - return lang.replace(/#/g, '_sharp').replace(/\//, '_').replace(/\s/g, ''); -} -function langToExt(lang) { - const langObj = { - php: '.php', - 'c#': '.cs', - shell: '.sh', - curl: '.sh', - bash: '.sh', - javascript: '.js', - js: '.js', - python: '.py', - c: '.c', - 'c++': '.cpp', - coffeescript: '.litcoffee', - dart: '.dart', - elixir: '.ex', - go: '.go', - groovy: '.groovy', - java: '.java', - kotlin: '.kt', - 'objective-c': '.m', - perl: '.pl', - powershell: '.ps1', - ruby: '.rb', - rust: '.rs', - scala: '.sc', - swift: '.swift', - typescript: '.ts', - tsx: '.tsx', - }; - return langObj[lang.toLowerCase()]; -} -class CircularJSONNotSupportedError extends Error { - constructor(originalError) { - super(originalError.message); - this.originalError = originalError; - // Set the prototype explicitly. - Object.setPrototypeOf(this, CircularJSONNotSupportedError.prototype); + function isNetworkError(response) { + return ( + // A network error is a response whose type is "error", + response.type === "error" && // status is 0 + response.status === 0 + ); } -} -exports.CircularJSONNotSupportedError = CircularJSONNotSupportedError; -function dumpBundle(obj, format, dereference) { - if (format === 'json') { - try { - return JSON.stringify(obj, null, 2); - } - catch (e) { - if (e.message.indexOf('circular') > -1) { - throw new CircularJSONNotSupportedError(e); - } - throw e; + function makeFilteredResponse(response, state) { + state = { + internalResponse: response, + ...state + }; + return new Proxy(response, { + get(target, p2) { + return p2 in state ? state[p2] : target[p2]; + }, + set(target, p2, value) { + assert(!(p2 in state)); + target[p2] = value; + return true; } + }); } - else { - return (0, openapi_core_1.stringifyYaml)(obj, { - noRefs: !dereference, - lineWidth: -1, + function filterResponse(response, type2) { + if (type2 === "basic") { + return makeFilteredResponse(response, { + type: "basic", + headersList: response.headersList }); - } -} -function saveBundle(filename, output) { - fs.mkdirSync((0, path_1.dirname)(filename), { recursive: true }); - fs.writeFileSync(filename, output); -} -async function promptUser(query, hideUserInput = false) { - return new Promise((resolve) => { - let output = process.stdout; - let isOutputMuted = false; - if (hideUserInput) { - output = new stream_1.Writable({ - write: (chunk, encoding, callback) => { - if (!isOutputMuted) { - process.stdout.write(chunk, encoding); - } - callback(); - }, - }); - } - const rl = readline.createInterface({ - input: process.stdin, - output, - terminal: true, - historySize: hideUserInput ? 0 : 30, + } else if (type2 === "cors") { + return makeFilteredResponse(response, { + type: "cors", + headersList: response.headersList }); - rl.question(`${query}:\n\n `, (answer) => { - rl.close(); - resolve(answer); + } else if (type2 === "opaque") { + return makeFilteredResponse(response, { + type: "opaque", + urlList: [], + status: 0, + statusText: "", + body: null }); - isOutputMuted = hideUserInput; - }); -} -function readYaml(filename) { - return (0, openapi_core_1.parseYaml)(fs.readFileSync(filename, 'utf-8'), { filename }); -} -function writeToFileByExtension(data, filePath, noRefs) { - const ext = getAndValidateFileExtension(filePath); - if (ext === 'json') { - writeJson(data, filePath); - return; - } - writeYaml(data, filePath, noRefs); -} -function writeYaml(data, filename, noRefs = false) { - const content = (0, openapi_core_1.stringifyYaml)(data, { noRefs }); - if (process.env.NODE_ENV === 'test') { - process.stderr.write(content); - return; - } - fs.mkdirSync((0, path_1.dirname)(filename), { recursive: true }); - fs.writeFileSync(filename, content); -} -function writeJson(data, filename) { - const content = JSON.stringify(data, null, 2); - if (process.env.NODE_ENV === 'test') { - process.stderr.write(content); - return; + } else if (type2 === "opaqueredirect") { + return makeFilteredResponse(response, { + type: "opaqueredirect", + status: 0, + statusText: "", + headersList: [], + body: null + }); + } else { + assert(false); + } } - fs.mkdirSync((0, path_1.dirname)(filename), { recursive: true }); - fs.writeFileSync(filename, content); -} -function getAndValidateFileExtension(fileName) { - const ext = fileName.split('.').pop(); - if (['yaml', 'yml', 'json'].includes(ext)) { - return ext; + function makeAppropriateNetworkError(fetchParams, err = null) { + assert(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 })); } - process.stderr.write((0, colorette_1.yellow)(`Unsupported file extension: ${ext}. Using yaml.\n`)); - return 'yaml'; -} -function handleError(e, ref) { - switch (e.constructor) { - case HandledError: { - throw e; - } - case openapi_core_1.ResolveError: - return exitWithError(`Failed to resolve API description at ${ref}:\n\n - ${e.message}`); - case openapi_core_1.YamlParseError: - return exitWithError(`Failed to parse API description at ${ref}:\n\n - ${e.message}`); - case CircularJSONNotSupportedError: { - return exitWithError(`Detected circular reference which can't be converted to JSON.\n` + - `Try to use ${(0, colorette_1.blue)('yaml')} output or remove ${(0, colorette_1.blue)('--dereferenced')}.`); - } - case SyntaxError: - return exitWithError(`Syntax error: ${e.message} ${e.stack?.split('\n\n')?.[0]}`); - case config_1.ConfigValidationError: - return exitWithError(e.message); - default: { - exitWithError(`Something went wrong when processing ${ref}:\n\n - ${e.message}`); + function initializeResponse(response, init2, body) { + if (init2.status !== null && (init2.status < 200 || init2.status > 599)) { + throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.'); + } + if ("statusText" in init2 && init2.statusText != null) { + if (!isValidReasonPhrase(String(init2.statusText))) { + throw new TypeError("Invalid statusText"); } - } -} -class HandledError extends Error { -} -exports.HandledError = HandledError; -function printLintTotals(totals, definitionsCount) { - const ignored = totals.ignored - ? (0, colorette_1.yellow)(`${totals.ignored} ${(0, utils_1.pluralize)('problem is', totals.ignored)} explicitly ignored.\n\n`) - : ''; - if (totals.errors > 0) { - process.stderr.write((0, colorette_1.red)(`❌ Validation failed with ${totals.errors} ${(0, utils_1.pluralize)('error', totals.errors)}${totals.warnings > 0 - ? ` and ${totals.warnings} ${(0, utils_1.pluralize)('warning', totals.warnings)}` - : ''}.\n${ignored}`)); - } - else if (totals.warnings > 0) { - process.stderr.write((0, colorette_1.green)(`Woohoo! Your API ${(0, utils_1.pluralize)('description is', definitionsCount)} valid. 🎉\n`)); - process.stderr.write((0, colorette_1.yellow)(`You have ${totals.warnings} ${(0, utils_1.pluralize)('warning', totals.warnings)}.\n${ignored}`)); - } - else { - process.stderr.write((0, colorette_1.green)(`Woohoo! Your API ${(0, utils_1.pluralize)('description is', definitionsCount)} valid. 🎉\n${ignored}`)); - } - if (totals.errors > 0) { - process.stderr.write((0, colorette_1.gray)(`run \`redocly lint --generate-ignore-file\` to add all problems to the ignore file.\n`)); - } - process.stderr.write('\n'); -} -function printConfigLintTotals(totals, command) { - if (totals.errors > 0) { - process.stderr.write((0, colorette_1.red)(`❌ Your config has ${totals.errors} ${(0, utils_1.pluralize)('error', totals.errors)}.`)); - } - else if (totals.warnings > 0) { - process.stderr.write((0, colorette_1.yellow)(`⚠️ Your config has ${totals.warnings} ${(0, utils_1.pluralize)('warning', totals.warnings)}.\n`)); - } - else if (command === 'check-config') { - process.stderr.write((0, colorette_1.green)('✅ Your config is valid.\n')); - } -} -function getOutputFileName({ entrypoint, output, argvOutput, ext, entries, }) { - let outputFile = output || argvOutput; - if (!outputFile) { - return { ext: ext || 'yaml' }; - } - if (entries > 1 && argvOutput) { - ext = ext || (0, path_1.extname)(entrypoint).substring(1); - if (!types_1.outputExtensions.includes(ext)) { - throw new Error(`Invalid file extension: ${ext}.`); + } + if ("status" in init2 && init2.status != null) { + getResponseState(response).status = init2.status; + } + if ("statusText" in init2 && init2.statusText != null) { + getResponseState(response).statusText = init2.statusText; + } + if ("headers" in init2 && init2.headers != null) { + fill(getResponseHeaders(response), init2.headers); + } + if (body) { + if (nullBodyStatus.includes(response.status)) { + throw webidl.errors.exception({ + header: "Response constructor", + message: `Invalid response status code ${response.status}` + }); } - outputFile = (0, path_1.join)(argvOutput, (0, path_1.basename)(entrypoint, (0, path_1.extname)(entrypoint))) + '.' + ext; - } - else { - ext = - ext || - (0, path_1.extname)(outputFile).substring(1) || - (0, path_1.extname)(entrypoint).substring(1); - if (!types_1.outputExtensions.includes(ext)) { - throw new Error(`Invalid file extension: ${ext}.`); + getResponseState(response).body = body.body; + if (body.type != null && !getResponseState(response).headersList.contains("content-type", true)) { + getResponseState(response).headersList.append("content-type", body.type, true); } - outputFile = (0, path_1.join)((0, path_1.dirname)(outputFile), (0, path_1.basename)(outputFile, (0, path_1.extname)(outputFile))) + '.' + ext; - } - return { outputFile, ext }; -} -function printUnusedWarnings(config) { - const { preprocessors, rules, decorators } = config.getUnusedRules(); - if (rules.length) { - process.stderr.write((0, colorette_1.yellow)(`[WARNING] Unused rules found in ${(0, colorette_1.blue)(config.configFile || '')}: ${rules.join(', ')}.\n`)); - } - if (preprocessors.length) { - process.stderr.write((0, colorette_1.yellow)(`[WARNING] Unused preprocessors found in ${(0, colorette_1.blue)(config.configFile || '')}: ${preprocessors.join(', ')}.\n`)); - } - if (decorators.length) { - process.stderr.write((0, colorette_1.yellow)(`[WARNING] Unused decorators found in ${(0, colorette_1.blue)(config.configFile || '')}: ${decorators.join(', ')}.\n`)); + } } - if (rules.length || preprocessors.length) { - process.stderr.write(`Check the spelling and verify the added plugin prefix.\n`); + function fromInnerResponse(innerResponse, guard) { + const response = new Response4(kConstruct); + setResponseState(response, innerResponse); + const headers = new Headers(kConstruct); + setResponseHeaders(response, headers); + setHeadersList(headers, innerResponse.headersList); + setHeadersGuard(headers, guard); + if (innerResponse.urlList.length !== 0 && innerResponse.body?.stream) { + streamRegistry.register(response, new WeakRef(innerResponse.body.stream)); + } + return response; } -} -function exitWithError(message) { - process.stderr.write((0, colorette_1.red)(message) + '\n\n'); - throw new HandledError(message); -} -/** - * Checks if dir is subdir of parent - */ -function isSubdir(parent, dir) { - const relativePath = (0, path_1.relative)(parent, dir); - return !!relativePath && !/^..($|\/)/.test(relativePath) && !(0, path_1.isAbsolute)(relativePath); -} -async function loadConfigAndHandleErrors(options = {}) { + webidl.converters.XMLHttpRequestBodyInit = function(V3, prefix, name) { + if (typeof V3 === "string") { + return webidl.converters.USVString(V3, prefix, name); + } + if (webidl.is.Blob(V3)) { + return V3; + } + if (webidl.is.BufferSource(V3)) { + return V3; + } + if (webidl.is.FormData(V3)) { + return V3; + } + if (webidl.is.URLSearchParams(V3)) { + return V3; + } + return webidl.converters.DOMString(V3, prefix, name); + }; + webidl.converters.BodyInit = function(V3, prefix, argument) { + if (webidl.is.ReadableStream(V3)) { + return V3; + } + if (V3?.[Symbol.asyncIterator]) { + return V3; + } + return webidl.converters.XMLHttpRequestBodyInit(V3, 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 + } + ]); + webidl.is.Response = webidl.util.MakeTypeAssertion(Response4); + module3.exports = { + isNetworkError, + makeNetworkError, + makeResponse, + makeAppropriateNetworkError, + filterResponse, + Response: Response4, + cloneResponse, + fromInnerResponse, + getResponseState + }; + } +}); + +// node_modules/undici/lib/web/fetch/request.js +var require_request2 = __commonJS({ + "node_modules/undici/lib/web/fetch/request.js"(exports, module3) { + "use strict"; + var { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body(); + var { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers(); + var util = require_util(); + var nodeUtil = __require("node:util"); + var { + isValidHTTPToken, + sameOrigin, + environmentSettingsObject + } = require_util2(); + var { + forbiddenMethodsSet, + corsSafeListedMethodsSet, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + requestDuplex + } = require_constants3(); + var { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util; + var { webidl } = require_webidl(); + var { URLSerializer } = require_data_url(); + var { kConstruct } = require_symbols(); + var assert = __require("node:assert"); + var { getMaxListeners, setMaxListeners, defaultMaxListeners } = __require("node:events"); + var kAbortController = /* @__PURE__ */ Symbol("abortController"); + var requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { + signal.removeEventListener("abort", abort); + }); + var dependentControllerMap = /* @__PURE__ */ new WeakMap(); + var abortSignalHasEventHandlerLeakWarning; try { - return await (0, openapi_core_1.loadConfig)(options); - } - catch (e) { - handleError(e, ''); - } -} -function sortTopLevelKeysForOas(document) { - if ('swagger' in document) { - return sortOas2Keys(document); - } - return sortOas3Keys(document); -} -function sortOas2Keys(document) { - const orderedKeys = [ - 'swagger', - 'info', - 'host', - 'basePath', - 'schemes', - 'consumes', - 'produces', - 'security', - 'tags', - 'externalDocs', - 'paths', - 'definitions', - 'parameters', - 'responses', - 'securityDefinitions', - ]; - const result = {}; - for (const key of orderedKeys) { - if (document.hasOwnProperty(key)) { - result[key] = document[key]; - } - } - // merge any other top-level keys (e.g. vendor extensions) - return Object.assign(result, document); -} -function sortOas3Keys(document) { - const orderedKeys = [ - 'openapi', - 'info', - 'jsonSchemaDialect', - 'servers', - 'security', - 'tags', - 'externalDocs', - 'paths', - 'webhooks', - 'x-webhooks', - 'components', - ]; - const result = {}; - for (const key of orderedKeys) { - if (document.hasOwnProperty(key)) { - result[key] = document[key]; + abortSignalHasEventHandlerLeakWarning = getMaxListeners(new AbortController().signal) > 0; + } catch { + abortSignalHasEventHandlerLeakWarning = false; + } + 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); + } } + } } - // merge any other top-level keys (e.g. vendor extensions) - return Object.assign(result, document); -} -function checkIfRulesetExist(rules) { - const ruleset = { - ...rules.oas2, - ...rules.oas3_0, - ...rules.oas3_1, - ...rules.async2, - ...rules.async3, - ...rules.arazzo1, - }; - if ((0, utils_1.isEmptyObject)(ruleset)) { - exitWithError('⚠️ No rules were configured. Learn how to configure rules: https://redocly.com/docs/cli/rules/'); - } -} -function cleanColors(input) { - // eslint-disable-next-line no-control-regex - return input.replace(/\x1b\[\d+m/g, ''); -} -async function sendTelemetry(argv, exit_code, has_config, spec_version, spec_keyword, spec_full_version) { - try { - if (!argv) { - return; + var patchMethodWarning = false; + var Request = class _Request { + /** @type {AbortSignal} */ + #signal; + /** @type {import('../../dispatcher/dispatcher')} */ + #dispatcher; + /** @type {Headers} */ + #headers; + #state; + // https://fetch.spec.whatwg.org/#dom-request + constructor(input, init2 = void 0) { + webidl.util.markAsUncloneable(this); + if (input === kConstruct) { + return; } - const { _: [command], $0: _, ...args } = argv; - const event_time = new Date().toISOString(); - const redoclyClient = new openapi_core_1.RedoclyClient(); - const { RedoclyOAuthClient } = await Promise.resolve().then(() => __nccwpck_require__(43964)); - const oauthClient = new RedoclyOAuthClient('redocly-cli', update_version_notifier_1.version); - const reuniteUrl = (0, api_1.getReuniteUrl)(argv.residency); - const logged_in = redoclyClient.hasTokens() || (await oauthClient.isAuthorized(reuniteUrl)); - const data = { - event: 'cli_command', - event_time, - logged_in: logged_in ? 'yes' : 'no', - command: `${command}`, - ...cleanArgs(args, process.argv.slice(2)), - node_version: process.version, - npm_version: (0, child_process_1.execSync)('npm -v').toString().replace('\n', ''), - os_platform: os.platform(), - version: update_version_notifier_1.version, - exit_code, - environment: process.env.REDOCLY_ENVIRONMENT, - environment_ci: process.env.CI, - has_config: has_config ? 'yes' : 'no', - spec_version, - spec_keyword, - spec_full_version, - }; - const { otelTelemetry } = await Promise.resolve().then(() => __nccwpck_require__(14093)); - otelTelemetry.init(); - otelTelemetry.send(data.command, data); - } - catch (err) { - // Do nothing. - } -} -function isFile(value) { - return fs.existsSync(value) && fs.statSync(value).isFile(); -} -function isDirectory(value) { - return fs.existsSync(value) && fs.statSync(value).isDirectory(); -} -function cleanString(value) { - if (!value) { - return value; - } - if ((0, openapi_core_1.isAbsoluteUrl)(value)) { - return value.split('://')[0] + '://url'; - } - if (isFile(value)) { - return value.replace(/.+\.([^.]+)$/, (_, ext) => 'file-' + ext); - } - if (isDirectory(value)) { - return 'folder'; - } - if (push_1.DESTINATION_REGEX.test(value)) { - return value.startsWith('@') ? '@organization/api-name@api-version' : 'api-name@api-version'; - } - return value; -} -function replaceArgs(commandInput, targets, replacement) { - const targetValues = Array.isArray(targets) ? targets : [targets]; - for (const target of targetValues) { - commandInput = commandInput.replaceAll(target, replacement); - } - return commandInput; -} -function cleanArgs(parsedArgs, rawArgv) { - const KEYS_TO_CLEAN = ['organization', 'o', 'input', 'i', 'client-cert', 'client-key', 'ca-cert']; - let commandInput = rawArgv.join(' '); - const commandArguments = {}; - for (const [key, value] of Object.entries(parsedArgs)) { - if (KEYS_TO_CLEAN.includes(key)) { - commandArguments[key] = '***'; - commandInput = replaceArgs(commandInput, value, '***'); - } - else if (typeof value === 'string') { - const cleanedValue = cleanString(value); - commandArguments[key] = cleanedValue; - commandInput = replaceArgs(commandInput, value, cleanedValue); - } - else if (Array.isArray(value)) { - commandArguments[key] = value.map(cleanString); - for (const replacedValue of value) { - const newValue = cleanString(replacedValue); - if (commandInput.includes(replacedValue)) { - commandInput = commandInput.replaceAll(replacedValue, newValue); - } + const prefix = "Request constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + input = webidl.converters.RequestInfo(input); + init2 = webidl.converters.RequestInit(init2); + let request = null; + let fallbackMode = null; + const baseUrl = environmentSettingsObject.settingsObject.baseUrl; + let signal = null; + if (typeof input === "string") { + this.#dispatcher = init2.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 { + assert(webidl.is.Request(input)); + request = input.#state; + signal = input.#signal; + this.#dispatcher = init2.dispatcher || input.#dispatcher; + } + const origin = environmentSettingsObject.settingsObject.origin; + let window2 = "client"; + if (request.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request.window, origin)) { + window2 = request.window; + } + if (init2.window != null) { + throw new TypeError(`'window' option '${window2}' must be null`); + } + if ("window" in init2) { + window2 = "no-window"; + } + 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: window2, + // 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(init2).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 (init2.referrer !== void 0) { + const referrer = init2.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; } + } } - else { - commandArguments[key] = value; + if (init2.referrerPolicy !== void 0) { + request.referrerPolicy = init2.referrerPolicy; } - } - return { arguments: JSON.stringify(commandArguments), raw_input: commandInput }; -} -function checkForDeprecatedOptions(argv, deprecatedOptions) { - for (const option of deprecatedOptions) { - if (argv[option]) { - process.stderr.write((0, colorette_1.yellow)(`[WARNING] "${String(option)}" option is deprecated and will be removed in a future release. \n\n`)); + let mode; + if (init2.mode !== void 0) { + mode = init2.mode; + } else { + mode = fallbackMode; } - } -} -function notifyAboutIncompatibleConfigOptions(themeOpenapiOptions) { - if ((0, utils_1.isPlainObject)(themeOpenapiOptions)) { - const propertiesSet = Object.keys(themeOpenapiOptions); - const deprecatedSet = Object.keys(reference_docs_config_schema_1.deprecatedRefDocsSchema.properties); - const intersection = propertiesSet.filter((prop) => deprecatedSet.includes(prop)); - if (intersection.length > 0) { - process.stderr.write((0, colorette_1.yellow)(`\n${(0, utils_1.pluralize)('Property', intersection.length)} ${(0, colorette_1.gray)(intersection.map((prop) => `'${prop}'`).join(', '))} ${(0, utils_1.pluralize)('is', intersection.length)} only used in API Reference Docs and Redoc version 2.x or earlier.\n\n`)); + if (mode === "navigate") { + throw webidl.errors.exception({ + header: "Request constructor", + message: "invalid request mode navigate." + }); } - } -} -function formatPath(path) { - if ((0, openapi_core_1.isAbsoluteUrl)(path)) { - return path; - } - return (0, path_1.relative)(process.cwd(), path); -} - - -/***/ }), - -/***/ 96439: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Spinner = void 0; -const process = __nccwpck_require__(77282); -const SPINNER_FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']; -class Spinner { - constructor() { - this.frames = SPINNER_FRAMES; - this.currentFrame = 0; - this.intervalId = null; - this.message = ''; - } - showFrame() { - process.stdout.write('\r' + this.frames[this.currentFrame] + ' ' + this.message); - this.currentFrame = (this.currentFrame + 1) % this.frames.length; - } - start(message) { - if (this.message === message) { - return; + if (mode != null) { + request.mode = mode; } - this.message = message; - // If we're not in a TTY, don't display the spinner. - if (!process.stdout.isTTY) { - process.stdout.write(`${message}...\n`); - return; + if (init2.credentials !== void 0) { + request.credentials = init2.credentials; } - if (this.intervalId === null) { - this.intervalId = setInterval(() => { - this.showFrame(); - }, 100); + if (init2.cache !== void 0) { + request.cache = init2.cache; } - } - stop() { - if (this.intervalId !== null) { - clearInterval(this.intervalId); - this.intervalId = null; - process.stdout.write('\r'); + if (request.cache === "only-if-cached" && request.mode !== "same-origin") { + throw new TypeError( + "'only-if-cached' can be set only with 'same-origin' mode" + ); } - this.message = ''; - } -} -exports.Spinner = Spinner; - - -/***/ }), - -/***/ 56616: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -var _a; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.cacheLatestVersion = exports.notifyUpdateCliVersion = exports.name = exports.version = void 0; -const os_1 = __nccwpck_require__(22037); -const path_1 = __nccwpck_require__(71017); -const fs_1 = __nccwpck_require__(57147); -const semver_1 = __nccwpck_require__(67319); -const fetch_with_timeout_1 = __nccwpck_require__(14437); -const colorette_1 = __nccwpck_require__(53278); -const miscellaneous_1 = __nccwpck_require__(82531); -_a = __nccwpck_require__(67218), exports.version = _a.version, exports.name = _a.name; -const VERSION_CACHE_FILE = 'redocly-cli-version'; -const SPACE_TO_BORDER = 4; -const INTERVAL_TO_CHECK = 1000 * 60 * 60 * 12; -const SHOULD_NOT_NOTIFY = process.env.NODE_ENV === 'test' || - process.env.CI || - !!process.env.LAMBDA_TASK_ROOT || - process.env.REDOCLY_SUPPRESS_UPDATE_NOTICE === 'true'; -const notifyUpdateCliVersion = () => { - if (SHOULD_NOT_NOTIFY) { - return; - } - try { - const latestVersion = (0, fs_1.readFileSync)((0, path_1.join)((0, os_1.tmpdir)(), VERSION_CACHE_FILE)).toString(); - if (isNewVersionAvailable(exports.version, latestVersion)) { - renderUpdateBanner(exports.version, latestVersion); + if (init2.redirect !== void 0) { + request.redirect = init2.redirect; } - } - catch (e) { - return; - } -}; -exports.notifyUpdateCliVersion = notifyUpdateCliVersion; -const isNewVersionAvailable = (current, latest) => (0, semver_1.compare)(current, latest) < 0; -const getLatestVersion = async (packageName) => { - const latestUrl = `http://registry.npmjs.org/${packageName}/latest`; - try { - const response = await (0, fetch_with_timeout_1.default)(latestUrl, { timeout: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT }); - const info = await response.json(); - return info.version; - } - catch { - // Do nothing - return; - } -}; -const cacheLatestVersion = () => { - if (!isNeedToBeCached() || SHOULD_NOT_NOTIFY) { - return; - } - getLatestVersion(exports.name) - .then((version) => { - if (version) { - const lastCheckFile = (0, path_1.join)((0, os_1.tmpdir)(), VERSION_CACHE_FILE); - (0, fs_1.writeFileSync)(lastCheckFile, version); + if (init2.integrity != null) { + request.integrity = String(init2.integrity); } - }) - .catch(() => { }); -}; -exports.cacheLatestVersion = cacheLatestVersion; -const renderUpdateBanner = (current, latest) => { - const messageLines = [ - `A new version of ${(0, colorette_1.cyan)('Redocly CLI')} (${(0, colorette_1.green)(latest)}) is available.`, - `Update now: \`${(0, colorette_1.cyan)('npm i -g @redocly/cli@latest')}\`.`, - `Changelog: https://redocly.com/docs/cli/changelog/`, - ]; - const maxLength = Math.max(...messageLines.map((line) => (0, miscellaneous_1.cleanColors)(line).length)); - const border = (0, colorette_1.yellow)('═'.repeat(maxLength + SPACE_TO_BORDER)); - const extraSpaces = ' '.repeat(SPACE_TO_BORDER); - const banner = [ - '', - extraSpaces + (0, colorette_1.yellow)('╔' + border + '╗'), - extraSpaces + (0, colorette_1.yellow)('║' + ' '.repeat(maxLength + SPACE_TO_BORDER) + '║'), - messageLines.map(getLineWithPadding(maxLength, extraSpaces)).join('\n'), - extraSpaces + (0, colorette_1.yellow)('║' + ' '.repeat(maxLength + SPACE_TO_BORDER) + '║'), - extraSpaces + (0, colorette_1.yellow)('╚' + border + '╝'), - '', - '', - ].join('\n'); - process.stderr.write(banner); -}; -const getLineWithPadding = (maxLength, extraSpaces) => (line) => { - const padding = ' '.repeat(maxLength - (0, miscellaneous_1.cleanColors)(line).length); - return `${extraSpaces}${(0, colorette_1.yellow)('║')} ${line}${padding} ${(0, colorette_1.yellow)('║')}`; -}; -const isNeedToBeCached = () => { - try { - // Last version from npm is stored in a file in the OS temp folder - const versionFile = (0, path_1.join)((0, os_1.tmpdir)(), VERSION_CACHE_FILE); - if (!(0, fs_1.existsSync)(versionFile)) { - return true; + if (init2.keepalive !== void 0) { + request.keepalive = Boolean(init2.keepalive); } - const now = new Date().getTime(); - const stats = (0, fs_1.statSync)(versionFile); - const lastCheck = stats.mtime.getTime(); - return now - lastCheck >= INTERVAL_TO_CHECK; - } - catch (e) { - return false; - } -}; - - -/***/ }), - -/***/ 40798: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -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__(12808) -const { safeRe: re, t } = __nccwpck_require__(35984) -const cmp = __nccwpck_require__(47555) -const debug = __nccwpck_require__(76858) -const SemVer = __nccwpck_require__(88912) -const Range = __nccwpck_require__(38143) - - -/***/ }), - -/***/ 38143: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -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 + if (init2.method !== void 0) { + let method = init2.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; } } - } - } - - 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 += '||' + if (init2.signal !== void 0) { + signal = init2.signal; } - const comps = this.set[i] - for (let k = 0; k < comps.length; k++) { - if (k > 0) { - this.formatted += ' ' + this.#state = request; + const ac = new AbortController(); + this.#signal = ac.signal; + if (signal != null) { + if (signal.aborted) { + ac.abort(signal.reason); + } else { + this[kAbortController] = ac; + const acRef = new WeakRef(ac); + const abort = buildAbort(acRef); + if (abortSignalHasEventHandlerLeakWarning && getMaxListeners(signal) === defaultMaxListeners) { + setMaxListeners(1500, signal); + } + util.addAbortListener(signal, abort); + requestFinalizer.register(ac, { signal, abort }, abort); } - this.formatted += comps[k].toString().trim() } + this.#headers = new Headers(kConstruct); + setHeadersList(this.#headers, request.headersList); + setHeadersGuard(this.#headers, "request"); + if (mode === "no-cors") { + if (!corsSafeListedMethodsSet.has(request.method)) { + throw new TypeError( + `'${request.method} is unsupported in no-cors mode.` + ); + } + setHeadersGuard(this.#headers, "request-no-cors"); + } + if (initHasKey) { + const headersList = getHeadersList(this.#headers); + const headers = init2.headers !== void 0 ? init2.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.#headers, headers); + } + } + const inputBody = webidl.is.Request(input) ? input.#state.body : null; + if ((init2.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 (init2.body != null) { + const [extractedBody, contentType] = extractBody( + init2.body, + request.keepalive + ); + initBody = extractedBody; + if (contentType && !getHeadersList(this.#headers).contains("content-type", true)) { + this.#headers.append("content-type", contentType, true); + } + } + const inputOrInitBody = initBody ?? inputBody; + if (inputOrInitBody != null && inputOrInitBody.source == null) { + if (initBody != null && init2.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.#state)) { + 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.#state.body = finalBody; + } + // Returns request’s HTTP method, which is "GET" by default. + get method() { + webidl.brandCheck(this, _Request); + return this.#state.method; + } + // Returns the URL of request as a string. + get url() { + webidl.brandCheck(this, _Request); + return URLSerializer(this.#state.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); + return this.#headers; + } + // Returns the kind of resource requested by request, e.g., "document" + // or "script". + get destination() { + webidl.brandCheck(this, _Request); + return this.#state.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); + if (this.#state.referrer === "no-referrer") { + return ""; + } + if (this.#state.referrer === "client") { + return "about:client"; + } + return this.#state.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); + return this.#state.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); + return this.#state.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() { + webidl.brandCheck(this, _Request); + return this.#state.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); + return this.#state.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); + return this.#state.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); + return this.#state.integrity; + } + // Returns a boolean indicating whether or not request can outlive the + // global in which it was created. + get keepalive() { + webidl.brandCheck(this, _Request); + return this.#state.keepalive; + } + // Returns a boolean indicating whether or not request is for a reload + // navigation. + get isReloadNavigation() { + webidl.brandCheck(this, _Request); + return this.#state.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); + return this.#state.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); + return this.#signal; + } + get body() { + webidl.brandCheck(this, _Request); + return this.#state.body ? this.#state.body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, _Request); + return !!this.#state.body && util.isDisturbed(this.#state.body.stream); + } + get duplex() { + webidl.brandCheck(this, _Request); + return "half"; + } + // Returns a clone of request. + clone() { + webidl.brandCheck(this, _Request); + if (bodyUnusable(this.#state)) { + throw new TypeError("unusable"); + } + const clonedRequest = cloneRequest(this.#state); + 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, this.#dispatcher, ac.signal, getHeadersGuard(this.#headers)); + } + [nodeUtil.inspect.custom](depth, options2) { + if (options2.depth === null) { + options2.depth = 2; + } + options2.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(options2, properties)}`; } - } - return this.formatted - } - - format () { - return this.range - } - - toString () { - return this.range - } - - parseRange (range) { - // 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 + /** + * @param {Request} request + * @param {AbortSignal} newSignal + */ + static setRequestSignal(request, newSignal) { + request.#signal = newSignal; + return request; } - } - - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true + /** + * @param {Request} request + */ + static getRequestDispatcher(request) { + return request.#dispatcher; } - } - return false - } -} - -module.exports = Range - -const LRU = __nccwpck_require__(9832) -const cache = new LRU() - -const parseOptions = __nccwpck_require__(12808) -const Comparator = __nccwpck_require__(40798) -const debug = __nccwpck_require__(76858) -const SemVer = __nccwpck_require__(88912) -const { - safeRe: re, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace, -} = __nccwpck_require__(35984) -const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __nccwpck_require__(63144) - -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() + /** + * @param {Request} request + * @param {import('../../dispatcher/dispatcher')} newDispatcher + */ + static setRequestDispatcher(request, newDispatcher) { + request.#dispatcher = newDispatcher; + } + /** + * @param {Request} request + * @param {Headers} newHeaders + */ + static setRequestHeaders(request, newHeaders) { + request.#headers = newHeaders; + } + /** + * @param {Request} request + */ + static getRequestState(request) { + return request.#state; + } + /** + * @param {Request} request + * @param {any} newState + */ + static setRequestState(request, newState) { + request.#state = newState; + } + }; + var { setRequestSignal, getRequestDispatcher, setRequestDispatcher, setRequestHeaders, getRequestState, setRequestState } = Request; + Reflect.deleteProperty(Request, "setRequestSignal"); + Reflect.deleteProperty(Request, "getRequestDispatcher"); + Reflect.deleteProperty(Request, "setRequestDispatcher"); + Reflect.deleteProperty(Request, "setRequestHeaders"); + Reflect.deleteProperty(Request, "getRequestState"); + Reflect.deleteProperty(Request, "setRequestState"); + mixinBody(Request, getRequestState); + function makeRequest(init2) { + return { + method: init2.method ?? "GET", + localURLsOnly: init2.localURLsOnly ?? false, + unsafeRequest: init2.unsafeRequest ?? false, + body: init2.body ?? null, + client: init2.client ?? null, + reservedClient: init2.reservedClient ?? null, + replacesClientId: init2.replacesClientId ?? "", + window: init2.window ?? "client", + keepalive: init2.keepalive ?? false, + serviceWorkers: init2.serviceWorkers ?? "all", + initiator: init2.initiator ?? "", + destination: init2.destination ?? "", + priority: init2.priority ?? null, + origin: init2.origin ?? "client", + policyContainer: init2.policyContainer ?? "client", + referrer: init2.referrer ?? "client", + referrerPolicy: init2.referrerPolicy ?? "", + mode: init2.mode ?? "no-cors", + useCORSPreflightFlag: init2.useCORSPreflightFlag ?? false, + credentials: init2.credentials ?? "same-origin", + useCredentials: init2.useCredentials ?? false, + cache: init2.cache ?? "default", + redirect: init2.redirect ?? "follow", + integrity: init2.integrity ?? "", + cryptoGraphicsNonceMetadata: init2.cryptoGraphicsNonceMetadata ?? "", + parserMetadata: init2.parserMetadata ?? "", + reloadNavigation: init2.reloadNavigation ?? false, + historyNavigation: init2.historyNavigation ?? false, + userActivation: init2.userActivation ?? false, + taintedOrigin: init2.taintedOrigin ?? false, + redirectCount: init2.redirectCount ?? 0, + responseTainting: init2.responseTainting ?? "basic", + preventNoCacheCacheControlHeaderModification: init2.preventNoCacheCacheControlHeaderModification ?? false, + done: init2.done ?? false, + timingAllowFailed: init2.timingAllowFailed ?? false, + useURLCredentials: init2.useURLCredentials ?? void 0, + traversableForUserPrompts: init2.traversableForUserPrompts ?? "client", + urlList: init2.urlList, + url: init2.urlList[0], + headersList: init2.headersList ? new HeadersList(init2.headersList) : new HeadersList() + }; + } + function cloneRequest(request) { + const newRequest = makeRequest({ ...request, body: null }); + if (request.body != null) { + newRequest.body = cloneBody(request.body); + } + return newRequest; + } + function fromInnerRequest(innerRequest, dispatcher, signal, guard) { + const request = new Request(kConstruct); + setRequestState(request, innerRequest); + setRequestDispatcher(request, dispatcher); + setRequestSignal(request, signal); + const headers = new Headers(kConstruct); + setRequestHeaders(request, headers); + setHeadersList(headers, innerRequest.headersList); + setHeadersGuard(headers, 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.is.Request = webidl.util.MakeTypeAssertion(Request); + webidl.converters.RequestInfo = function(V3) { + if (typeof V3 === "string") { + return webidl.converters.USVString(V3); + } + if (webidl.is.Request(V3)) { + return V3; + } + return webidl.converters.USVString(V3); + }; + 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" + ) + ) + }, + { + key: "window", + converter: webidl.converters.any + }, + { + key: "duplex", + converter: webidl.converters.DOMString, + allowedValues: requestDuplex + }, + { + key: "dispatcher", + // undici specific option + converter: webidl.converters.any + }, + { + key: "priority", + converter: webidl.converters.DOMString, + allowedValues: ["high", "low", "auto"], + defaultValue: () => "auto" + } + ]); + module3.exports = { + Request, + makeRequest, + fromInnerRequest, + cloneRequest, + getRequestDispatcher, + getRequestState + }; } +}); - 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 === '*' - -// ~, ~> --> * (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] - 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 <${+M + 1}.0.0-0` - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0-0 - ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` - } else if (pr) { - debug('replaceTilde pr', pr) - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` +// node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +var require_subresource_integrity = __commonJS({ + "node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var { runtimeFeatures } = require_runtime_features(); + var validSRIHashAlgorithmTokenSet = /* @__PURE__ */ new Map([["sha256", 0], ["sha384", 1], ["sha512", 2]]); + var crypto; + if (runtimeFeatures.has("crypto")) { + crypto = __require("node:crypto"); + const cryptoHashes = crypto.getHashes(); + if (cryptoHashes.length === 0) { + validSRIHashAlgorithmTokenSet.clear(); + } + for (const algorithm of validSRIHashAlgorithmTokenSet.keys()) { + if (cryptoHashes.includes(algorithm) === false) { + validSRIHashAlgorithmTokenSet.delete(algorithm); + } + } } else { - // ~1.2.3 == >=1.2.3 <1.3.0-0 - ret = `>=${M}.${m}.${p - } <${M}.${+m + 1}.0-0` + validSRIHashAlgorithmTokenSet.clear(); } - - 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` + var getSRIHashAlgorithmIndex = ( + /** @type {GetSRIHashAlgorithmIndex} */ + Map.prototype.get.bind( + validSRIHashAlgorithmTokenSet + ) + ); + var isValidSRIHashAlgorithm = ( + /** @type {IsValidSRIHashAlgorithm} */ + Map.prototype.has.bind(validSRIHashAlgorithmTokenSet) + ); + var bytesMatch = runtimeFeatures.has("crypto") === false || validSRIHashAlgorithmTokenSet.size === 0 ? () => true : (bytes, metadataList) => { + const parsedMetadata = parseMetadata(metadataList); + if (parsedMetadata.length === 0) { + return true; + } + const metadata = getStrongestMetadata(parsedMetadata); + for (const item of metadata) { + const algorithm = item.alg; + const expectedValue = item.val; + const actualValue = applyAlgorithmToBytes(algorithm, bytes); + if (caseSensitiveMatch(actualValue, expectedValue)) { + return true; } - } 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 - }${z} <${M}.${m}.${+p + 1}-0` + return false; + }; + function getStrongestMetadata(metadataList) { + const result = []; + let strongest = null; + for (const item of metadataList) { + assert(isValidSRIHashAlgorithm(item.alg), "Invalid SRI hash algorithm token"); + if (result.length === 0) { + result.push(item); + strongest = item; + continue; + } + const currentAlgorithm = ( + /** @type {Metadata} */ + strongest.alg + ); + const currentAlgorithmIndex = getSRIHashAlgorithmIndex(currentAlgorithm); + const newAlgorithm = item.alg; + const newAlgorithmIndex = getSRIHashAlgorithmIndex(newAlgorithm); + if (newAlgorithmIndex < currentAlgorithmIndex) { + continue; + } else if (newAlgorithmIndex > currentAlgorithmIndex) { + strongest = item; + result[0] = item; + result.length = 1; } else { - ret = `>=${M}.${m}.${p - }${z} <${M}.${+m + 1}.0-0` + result.push(item); } - } else { - ret = `>=${M}.${m}.${p - } <${+M + 1}.0.0-0` } + return result; } - - 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) - const xM = isX(M) - const xm = xM || isX(m) - const xp = xm || isX(p) - const anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' + function parseMetadata(metadata) { + const result = []; + for (const item of metadata.split(" ")) { + const expressionAndOptions = item.split("?", 1); + const algorithmExpression = expressionAndOptions[0]; + let base64Value = ""; + const algorithmAndValue = [algorithmExpression.slice(0, 6), algorithmExpression.slice(7)]; + const algorithm = algorithmAndValue[0]; + if (!isValidSRIHashAlgorithm(algorithm)) { + continue; + } + if (algorithmAndValue[1]) { + base64Value = algorithmAndValue[1]; + } + const metadata2 = { + alg: algorithm, + val: base64Value + }; + result.push(metadata2); + } + return result; } - - // 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 - } + var applyAlgorithmToBytes = (algorithm, bytes) => { + return crypto.hash(algorithm, bytes, "base64"); + }; + function caseSensitiveMatch(actualValue, expectedValue) { + let actualValueLength = actualValue.length; + if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === "=") { + actualValueLength -= 1; } - - if (gtlt === '<') { - pr = '-0' + if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === "=") { + actualValueLength -= 1; } - - 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 + let expectedValueLength = expectedValue.length; + if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === "=") { + expectedValueLength -= 1; } - - 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 + if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === "=") { + expectedValueLength -= 1; + } + if (actualValueLength !== expectedValueLength) { + return false; + } + for (let i2 = 0; i2 < actualValueLength; ++i2) { + if (actualValue[i2] === expectedValue[i2] || actualValue[i2] === "+" && expectedValue[i2] === "-" || actualValue[i2] === "/" && expectedValue[i2] === "_") { + continue; } + return false; } + return true; } - - // Version has a -pre, but it's not one of the ones we like. - return false + module3.exports = { + applyAlgorithmToBytes, + bytesMatch, + caseSensitiveMatch, + isValidSRIHashAlgorithm, + getStrongestMetadata, + parseMetadata + }; } +}); - return true -} - - -/***/ }), - -/***/ 88912: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const debug = __nccwpck_require__(76858) -const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(63144) -const { safeRe: re, t } = __nccwpck_require__(35984) - -const parseOptions = __nccwpck_require__(12808) -const { compareIdentifiers } = __nccwpck_require__(53421) -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 +// node_modules/undici/lib/web/fetch/index.js +var require_fetch = __commonJS({ + "node_modules/undici/lib/web/fetch/index.js"(exports, module3) { + "use strict"; + var { + makeNetworkError, + makeAppropriateNetworkError, + filterResponse, + makeResponse, + fromInnerResponse, + getResponseState + } = require_response(); + var { HeadersList } = require_headers(); + var { Request, cloneRequest, getRequestDispatcher, getRequestState } = require_request2(); + var zlib = __require("node:zlib"); + var { + makePolicyContainer, + clonePolicyContainer, + requestBadPort, + TAOCheck, + appendRequestOriginHeader, + responseLocationURL, + requestCurrentURL, + setRequestReferrerPolicyOnRedirect, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + createOpaqueTimingInfo, + appendFetchMetadata, + corsCheck, + crossOriginResourcePolicyCheck, + determineRequestsReferrer, + coarsenedSharedCurrentTime, + sameOrigin, + isCancelled, + isAborted, + isErrorLike, + fullyReadBody, + readableStreamClose, + urlIsLocal, + urlIsHttpHttpsScheme, + urlHasHttpsScheme, + clampAndCoarsenConnectionTimingInfo, + simpleRangeHeaderValue, + buildContentRange, + createInflate, + extractMimeType, + hasAuthenticationEntry, + includesCredentials, + isTraversableNavigable + } = require_util2(); + var assert = __require("node:assert"); + var { safelyExtractBody, extractBody } = require_body(); + var { + redirectStatusSet, + nullBodyStatus, + safeMethodsSet, + requestBodyHeader, + subresourceSet + } = require_constants3(); + var EE = __require("node:events"); + var { Readable, pipeline, finished, isErrored, isReadable } = __require("node:stream"); + var { addAbortListener, bufferToLowerCasedHeaderName } = require_util(); + var { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require_data_url(); + var { getGlobalDispatcher } = require_global2(); + var { webidl } = require_webidl(); + var { STATUS_CODES } = __require("node:http"); + var { bytesMatch } = require_subresource_integrity(); + var { createDeferredPromise } = require_promise(); + var { isomorphicEncode } = require_infra(); + var { runtimeFeatures } = require_runtime_features(); + var hasZstd = runtimeFeatures.has("zstd"); + var GET_OR_HEAD = ["GET", "HEAD"]; + var defaultUserAgent = typeof __UNDICI_IS_NODE__ !== "undefined" || typeof esbuildDetection !== "undefined" ? "node" : "undici"; + var resolveObjectURL; + var Fetch = class extends EE { + constructor(dispatcher) { + super(); + this.dispatcher = dispatcher; + this.connection = null; + this.dump = false; + this.state = "ongoing"; } - } 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 - } + terminate(reason) { + if (this.state !== "ongoing") { + return; } - 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 + this.state = "terminated"; + this.connection?.destroy(reason); + this.emit("terminated", reason); } - 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) + // https://fetch.spec.whatwg.org/#fetch-controller-abort + abort(error2) { + if (this.state !== "ongoing") { + return; + } + this.state = "aborted"; + if (!error2) { + error2 = new DOMException("The operation was aborted.", "AbortError"); + } + this.serializedAbortReason = error2; + this.connection?.destroy(error2); + this.emit("terminated", error2); + } + }; + function handleFetchDone(response) { + finalizeAndReportTiming(response, "fetch"); } - - 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 + function fetch2(input, init2 = void 0) { + webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch"); + let p2 = createDeferredPromise(); + let requestObject; + try { + requestObject = new Request(input, init2); + } catch (e2) { + p2.reject(e2); + return p2.promise; + } + const request = getRequestState(requestObject); + if (requestObject.signal.aborted) { + abortFetch(p2, request, null, requestObject.signal.reason, null); + return p2.promise; + } + const globalObject = request.client.globalObject; + if (globalObject?.constructor?.name === "ServiceWorkerGlobalScope") { + request.serviceWorkers = "none"; + } + let responseObject = null; + let locallyAborted = false; + let controller = null; + addAbortListener( + requestObject.signal, + () => { + locallyAborted = true; + assert(controller != null); + controller.abort(requestObject.signal.reason); + const realResponse = responseObject?.deref(); + abortFetch(p2, request, realResponse, requestObject.signal.reason, controller.controller); + } + ); + const processResponse = (response) => { + if (locallyAborted) { + return; + } + if (response.aborted) { + abortFetch(p2, request, responseObject, controller.serializedAbortReason, controller.controller); + return; + } + if (response.type === "error") { + p2.reject(new TypeError("fetch failed", { cause: response.error })); + return; + } + responseObject = new WeakRef(fromInnerResponse(response, "immutable")); + p2.resolve(responseObject.deref()); + p2 = null; + }; + controller = fetching({ + request, + processResponseEndOfBody: handleFetchDone, + processResponse, + dispatcher: getRequestDispatcher(requestObject), + // undici + // Keep requestObject alive to prevent its AbortController from being GC'd + // See https://github.com/nodejs/undici/issues/4627 + requestObject + }); + return p2.promise; } - - 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) + function finalizeAndReportTiming(response, initiatorType = "other") { + if (response.type === "error" && response.aborted) { + return; } - } while (++i) - } - - compareBuild (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) + 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, + "", + // bodyType + response.status + ); } - - 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] + var markResourceTiming = performance.markResourceTiming; + function abortFetch(p2, request, responseObject, error2, controller) { + if (p2) { + p2.reject(error2); + } + if (request.body?.stream != null && isReadable(request.body.stream)) { + request.body.stream.cancel(error2).catch((err) => { + if (err.code === "ERR_INVALID_STATE") { + return; + } + throw err; + }); + } + if (responseObject == null) { + return; + } + const response = getResponseState(responseObject); + if (response.body?.stream != null && isReadable(response.body.stream)) { + controller.error(error2); + } + } + function fetching({ + request, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseEndOfBody, + processResponseConsumeBody, + useParallelQueue = false, + dispatcher = getGlobalDispatcher(), + // undici + requestObject = null + // Keep alive to prevent AbortController GC, see #4627 + }) { + assert(dispatcher); + let taskDestination = null; + let crossOriginIsolatedCapability = false; + if (request.client != null) { + taskDestination = request.client.globalObject; + crossOriginIsolatedCapability = request.client.crossOriginIsolatedCapability; + } + const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability); + const timingInfo = createOpaqueTimingInfo({ + startTime: currentTime + }); + const fetchParams = { + controller: new Fetch(dispatcher), + request, + timingInfo, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseConsumeBody, + processResponseEndOfBody, + taskDestination, + crossOriginIsolatedCapability, + // Keep requestObject alive to prevent its AbortController from being GC'd + requestObject + }; + assert(!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 { - let i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 + request.policyContainer = makePolicyContainer(); + } + } + if (!request.headersList.contains("accept", true)) { + const value = "*/*"; + request.headersList.append("accept", value, 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, false); + return fetchParams.controller; + } + async function mainFetch(fetchParams, recursive) { + try { + 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) { + 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") + ) { + request.responseTainting = "basic"; + response = await schemeFetch(fetchParams); + } else if (request.mode === "same-origin") { + response = makeNetworkError('request mode cannot be "same-origin"'); + } else if (request.mode === "no-cors") { + if (request.redirect !== "follow") { + response = makeNetworkError( + 'redirect mode cannot be "follow" for "no-cors" request' + ); + } else { + request.responseTainting = "opaque"; + response = await schemeFetch(fetchParams); } + } else if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { + response = makeNetworkError("URL scheme must be a HTTP(S) scheme"); + } else { + request.responseTainting = "cors"; + response = await httpFetch(fetchParams); } - 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 (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(false); } } - 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] + 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; } - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { - this.prerelease = prerelease + const processBody = (bytes) => { + if (!bytesMatch(bytes, request.integrity)) { + processBodyError("integrity mismatch"); + return; } + response.body = safelyExtractBody(bytes)[0]; + fetchFinale(fetchParams, response); + }; + fullyReadBody(response.body, processBody, processBodyError); + } else { + fetchFinale(fetchParams, response); + } + } catch (err) { + fetchParams.controller.terminate(err); + } + } + 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" || !webidl.is.Blob(blob)) { + return Promise.resolve(makeNetworkError("invalid method")); + } + const response = makeResponse(); + const fullLength = blob.size; + const serializedFullLength = isomorphicEncode(`${fullLength}`); + const type2 = 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", type2, true); } else { - this.prerelease = prerelease + response.rangeRequested = true; + const rangeHeader = request.headersList.get("range", true); + const rangeValue = simpleRangeHeaderValue(rangeHeader, 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 + 1, type2); + const slicedBodyWithType = extractBody(slicedBlob); + response.body = slicedBodyWithType[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", type2, true); + response.headersList.set("content-range", contentRange, true); } + return Promise.resolve(response); + } + case "data:": { + const currentURL = requestCurrentURL(request); + const dataURLStruct = dataURLProcessor(currentURL); + 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")); } - break } - default: - throw new Error(`invalid increment argument: ${release}`) } - this.raw = this.format() - if (this.build.length) { - this.raw += `+${this.build.join('.')}` + function finalizeResponse(fetchParams, response) { + fetchParams.request.done = true; + if (fetchParams.processResponseDone != null) { + queueMicrotask(() => fetchParams.processResponseDone(response)); + } } - return this - } -} - -module.exports = SemVer - - -/***/ }), - -/***/ 85138: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const parse = __nccwpck_require__(78940) -const clean = (version, options) => { - const s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} -module.exports = clean - - -/***/ }), - -/***/ 47555: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const eq = __nccwpck_require__(17390) -const neq = __nccwpck_require__(68774) -const gt = __nccwpck_require__(46762) -const gte = __nccwpck_require__(66185) -const lt = __nccwpck_require__(9424) -const lte = __nccwpck_require__(49443) - -const cmp = (a, op, b, loose) => { - switch (op) { - case '===': - if (typeof a === 'object') { - a = a.version + 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 (!urlIsHttpHttpsScheme(fetchParams.request.url)) { + 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; + }); } - if (typeof b === 'object') { - b = b.version + const internalResponse = response.type === "error" ? response : response.internalResponse ?? response; + if (internalResponse.body == null) { + processResponseEndOfBody(); + } else { + finished(internalResponse.body.stream, () => { + processResponseEndOfBody(); + }); } - return a === b - - case '!==': - if (typeof a === 'object') { - a = a.version + } + async function httpFetch(fetchParams) { + const request = fetchParams.request; + let response = null; + let actualResponse = null; + const timingInfo = fetchParams.timingInfo; + if (request.serviceWorkers === "all") { } - if (typeof b === 'object') { - b = b.version + 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; + } } - 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 - - -/***/ }), - -/***/ 87619: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(88912) -const parse = __nccwpck_require__(78940) -const { safeRe: re, t } = __nccwpck_require__(35984) - -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 - - -/***/ }), - -/***/ 62745: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(88912) -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 - - -/***/ }), - -/***/ 50310: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compare = __nccwpck_require__(67511) -const compareLoose = (a, b) => compare(a, b, true) -module.exports = compareLoose - - -/***/ }), - -/***/ 67511: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(88912) -const compare = (a, b, loose) => - new SemVer(a, loose).compare(new SemVer(b, loose)) - -module.exports = compare - - -/***/ }), - -/***/ 38618: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const parse = __nccwpck_require__(78940) - -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 ((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(false); + } + } + response.timingInfo = timingInfo; + return response; } - - // If the main part has no difference - if (lowVersion.compareMain(highVersion) === 0) { - if (lowVersion.minor && !lowVersion.patch) { - return 'minor' + 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(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; + const httpCache = null; + const revalidatingFlag = false; + 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 (webidl.is.URL(httpRequest.referrer)) { + 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, true); + } + 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) { + if (!httpRequest.headersList.contains("authorization", true)) { + let authorizationValue = null; + if (hasAuthenticationEntry(httpRequest) && (httpRequest.useURLCredentials === void 0 || !includesCredentials(requestCurrentURL(httpRequest)))) { + } else if (includesCredentials(requestCurrentURL(httpRequest)) && isAuthenticationFetch) { + const { username, password } = requestCurrentURL(httpRequest); + authorizationValue = `Basic ${Buffer.from(`${username}:${password}`).toString("base64")}`; + } + if (authorizationValue !== null) { + httpRequest.headersList.append("Authorization", authorizationValue, false); + } + } + } + if (httpCache == null) { + 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 (revalidatingFlag && forwardResponse.status === 304) { + } + if (response == null) { + response = forwardResponse; + } + } + response.urlList = [...httpRequest.urlList]; + if (httpRequest.headersList.contains("range", true)) { + response.rangeRequested = true; + } + response.requestIncludesCredentials = includeCredentials; + if (response.status === 401 && httpRequest.responseTainting !== "cors" && includeCredentials && (request.useURLCredentials !== void 0 || isTraversableNavigable(request.traversableForUserPrompts))) { + if (request.body != null) { + if (request.body.source == null) { + return response; + } + request.body = safelyExtractBody(request.body.source)[0]; + } + if (request.useURLCredentials === void 0 || isAuthenticationFetch) { + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams); + } + return response; + } + fetchParams.controller.connection.destroy(); + response = await httpNetworkOrCacheFetch(fetchParams, true); + } + if (response.status === 407) { + if (request.window === "no-window") { + return makeNetworkError(); + } + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams); + } + return makeNetworkError("proxy authentication required"); + } + 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) + ) { + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams); + } + fetchParams.controller.connection.destroy(); + response = await httpNetworkOrCacheFetch( + fetchParams, + isAuthenticationFetch, + true + ); } - return 'patch' + if (isAuthenticationFetch) { + } + return response; } - } - - // 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 - - -/***/ }), - -/***/ 17390: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compare = __nccwpck_require__(67511) -const eq = (a, b, loose) => compare(a, b, loose) === 0 -module.exports = eq - - -/***/ }), - -/***/ 46762: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compare = __nccwpck_require__(67511) -const gt = (a, b, loose) => compare(a, b, loose) > 0 -module.exports = gt - - -/***/ }), - -/***/ 66185: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compare = __nccwpck_require__(67511) -const gte = (a, b, loose) => compare(a, b, loose) >= 0 -module.exports = gte - - -/***/ }), - -/***/ 63174: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(88912) - -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 - - -/***/ }), - -/***/ 9424: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compare = __nccwpck_require__(67511) -const lt = (a, b, loose) => compare(a, b, loose) < 0 -module.exports = lt - - -/***/ }), - -/***/ 49443: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compare = __nccwpck_require__(67511) -const lte = (a, b, loose) => compare(a, b, loose) <= 0 -module.exports = lte - - -/***/ }), - -/***/ 62764: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(88912) -const major = (a, loose) => new SemVer(a, loose).major -module.exports = major - - -/***/ }), - -/***/ 32109: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(88912) -const minor = (a, loose) => new SemVer(a, loose).minor -module.exports = minor - - -/***/ }), - -/***/ 68774: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compare = __nccwpck_require__(67511) -const neq = (a, b, loose) => compare(a, b, loose) !== 0 -module.exports = neq - - -/***/ }), - -/***/ 78940: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(88912) -const parse = (version, options, throwErrors = false) => { - if (version instanceof SemVer) { - return version - } - try { - return new SemVer(version, options) - } catch (er) { - if (!throwErrors) { - return null + 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")); + } + } + } + }; + const request = fetchParams.request; + let response = null; + const timingInfo = fetchParams.timingInfo; + const httpCache = null; + if (httpCache == null) { + request.cache = "no-store"; + } + const newConnection = forceNewConnection ? "yes" : "no"; + if (request.mode === "websocket") { + } else { + } + 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 = (e2) => { + if (isCancelled(fetchParams)) { + return; + } + if (e2.name === "AbortError") { + fetchParams.controller.abort(); + } else { + fetchParams.controller.terminate(e2); + } + }; + 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 = () => { + return fetchParams.controller.resume(); + }; + const cancelAlgorithm = (reason) => { + if (!isCancelled(fetchParams)) { + fetchParams.controller.abort(reason); + } + }; + const stream = new ReadableStream( + { + start(controller) { + fetchParams.controller.controller = controller; + }, + pull: pullAlgorithm, + cancel: cancelAlgorithm, + type: "bytes" + } + ); + response.body = { stream, source: null, length: null }; + if (!fetchParams.controller.resume) { + 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 url3 = requestCurrentURL(request); + const agent = fetchParams.controller.dispatcher; + const path13 = url3.pathname + url3.search; + const hasTrailingQuestionMark = url3.search.length === 0 && url3.href[url3.href.length - url3.hash.length - 1] === "?"; + return new Promise((resolve8, reject) => agent.dispatch( + { + path: hasTrailingQuestionMark ? `${path13}?` : path13, + origin: url3.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 false; + } + const headersList = new HeadersList(); + for (let i2 = 0; i2 < rawHeaders.length; i2 += 2) { + const nameStr = bufferToLowerCasedHeaderName(rawHeaders[i2]); + const value = rawHeaders[i2 + 1]; + if (Array.isArray(value) && !Buffer.isBuffer(rawHeaders[i2 + 1])) { + for (const val of value) { + headersList.append(nameStr, val.toString("latin1"), true); + } + } else { + headersList.append(nameStr, value.toString("latin1"), true); + } + } + const location = headersList.get("location", true); + this.body = new Readable({ read: resume }); + const willFollow = location && request.redirect === "follow" && redirectStatusSet.has(status); + const decoders = []; + if (request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { + const contentEncoding = headersList.get("content-encoding", true); + const codings = contentEncoding ? contentEncoding.toLowerCase().split(",") : []; + 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 i2 = codings.length - 1; i2 >= 0; --i2) { + const coding = codings[i2].trim(); + 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 if (coding === "zstd" && hasZstd) { + decoders.push(zlib.createZstdDecompress({ + flush: zlib.constants.ZSTD_e_continue, + finishFlush: zlib.constants.ZSTD_e_end + })); + } else { + decoders.length = 0; + break; + } + } + } + const onError = this.onError.bind(this); + resolve8({ + 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; + } + const bytes = chunk; + timingInfo.encodedBodySize += bytes.byteLength; + return this.body.push(bytes); + }, + onComplete() { + if (this.abort) { + fetchParams.controller.off("terminated", this.abort); + } + fetchParams.controller.ended = true; + this.body.push(null); + }, + onError(error2) { + if (this.abort) { + fetchParams.controller.off("terminated", this.abort); + } + this.body?.destroy(error2); + fetchParams.controller.terminate(error2); + reject(error2); + }, + onRequestUpgrade(_controller, status, headers, socket) { + if (socket.session != null && status !== 200 || socket.session == null && status !== 101) { + return false; + } + const headersList = new HeadersList(); + for (const [name, value] of Object.entries(headers)) { + if (value == null) { + continue; + } + const headerName = name.toLowerCase(); + if (Array.isArray(value)) { + for (const entry of value) { + headersList.append(headerName, String(entry), true); + } + } else { + headersList.append(headerName, String(value), true); + } + } + resolve8({ + status, + statusText: STATUS_CODES[status], + headersList, + socket + }); + return true; + }, + onUpgrade(status, rawHeaders, socket) { + if (socket.session != null && status !== 200 || socket.session == null && status !== 101) { + return false; + } + const headersList = new HeadersList(); + for (let i2 = 0; i2 < rawHeaders.length; i2 += 2) { + const nameStr = bufferToLowerCasedHeaderName(rawHeaders[i2]); + const value = rawHeaders[i2 + 1]; + if (Array.isArray(value) && !Buffer.isBuffer(rawHeaders[i2 + 1])) { + for (const val of value) { + headersList.append(nameStr, val.toString("latin1"), true); + } + } else { + headersList.append(nameStr, value.toString("latin1"), true); + } + } + resolve8({ + status, + statusText: STATUS_CODES[status], + headersList, + socket + }); + return true; + } + } + )); + } } - throw er - } -} - -module.exports = parse - - -/***/ }), - -/***/ 47495: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(88912) -const patch = (a, loose) => new SemVer(a, loose).patch -module.exports = patch - - -/***/ }), - -/***/ 8412: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const parse = __nccwpck_require__(78940) -const prerelease = (version, options) => { - const parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} -module.exports = prerelease - - -/***/ }), - -/***/ 9172: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compare = __nccwpck_require__(67511) -const rcompare = (a, b, loose) => compare(b, a, loose) -module.exports = rcompare - - -/***/ }), - -/***/ 60608: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compareBuild = __nccwpck_require__(62745) -const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) -module.exports = rsort - - -/***/ }), - -/***/ 79609: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Range = __nccwpck_require__(38143) -const satisfies = (version, range, options) => { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} -module.exports = satisfies - - -/***/ }), - -/***/ 91848: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compareBuild = __nccwpck_require__(62745) -const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) -module.exports = sort - - -/***/ }), - -/***/ 99910: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const parse = __nccwpck_require__(78940) -const valid = (version, options) => { - const v = parse(version, options) - return v ? v.version : null -} -module.exports = valid - - -/***/ }), - -/***/ 67319: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -// just pre-load all the stuff that index.js lazily exports -const internalRe = __nccwpck_require__(35984) -const constants = __nccwpck_require__(63144) -const SemVer = __nccwpck_require__(88912) -const identifiers = __nccwpck_require__(53421) -const parse = __nccwpck_require__(78940) -const valid = __nccwpck_require__(99910) -const clean = __nccwpck_require__(85138) -const inc = __nccwpck_require__(63174) -const diff = __nccwpck_require__(38618) -const major = __nccwpck_require__(62764) -const minor = __nccwpck_require__(32109) -const patch = __nccwpck_require__(47495) -const prerelease = __nccwpck_require__(8412) -const compare = __nccwpck_require__(67511) -const rcompare = __nccwpck_require__(9172) -const compareLoose = __nccwpck_require__(50310) -const compareBuild = __nccwpck_require__(62745) -const sort = __nccwpck_require__(91848) -const rsort = __nccwpck_require__(60608) -const gt = __nccwpck_require__(46762) -const lt = __nccwpck_require__(9424) -const eq = __nccwpck_require__(17390) -const neq = __nccwpck_require__(68774) -const gte = __nccwpck_require__(66185) -const lte = __nccwpck_require__(49443) -const cmp = __nccwpck_require__(47555) -const coerce = __nccwpck_require__(87619) -const Comparator = __nccwpck_require__(40798) -const Range = __nccwpck_require__(38143) -const satisfies = __nccwpck_require__(79609) -const toComparators = __nccwpck_require__(6606) -const maxSatisfying = __nccwpck_require__(72066) -const minSatisfying = __nccwpck_require__(76732) -const minVersion = __nccwpck_require__(8746) -const validRange = __nccwpck_require__(43353) -const outside = __nccwpck_require__(63346) -const gtr = __nccwpck_require__(81744) -const ltr = __nccwpck_require__(11587) -const intersects = __nccwpck_require__(27177) -const simplifyRange = __nccwpck_require__(1847) -const subset = __nccwpck_require__(46087) -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, - 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, -} - - -/***/ }), - -/***/ 63144: -/***/ ((module) => { - -"use strict"; - - -// 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, -} - - -/***/ }), - -/***/ 76858: -/***/ ((module) => { - -"use strict"; - - -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 - - -/***/ }), - -/***/ 53421: -/***/ ((module) => { - -"use strict"; - - -const numeric = /^[0-9]+$/ -const compareIdentifiers = (a, b) => { - if (typeof a === 'number' && typeof b === 'number') { - return a === b ? 0 : a < b ? -1 : 1 + module3.exports = { + fetch: fetch2, + Fetch, + fetching, + finalizeAndReportTiming + }; } +}); - const anum = numeric.test(a) - const bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b +// node_modules/undici/lib/web/cache/util.js +var require_util3 = __commonJS({ + "node_modules/undici/lib/web/cache/util.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var { URLSerializer } = require_data_url(); + var { isValidHeaderName } = require_util2(); + function urlEquals(A3, B3, excludeFragment = false) { + const serializedA = URLSerializer(A3, excludeFragment); + const serializedB = URLSerializer(B3, excludeFragment); + return serializedA === serializedB; + } + 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; + } + module3.exports = { + urlEquals, + getFieldValues + }; } +}); - 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, -} - - -/***/ }), - -/***/ 9832: -/***/ ((module) => { - -"use strict"; - - -class LRUCache { - constructor () { - this.max = 1000 - this.map = new Map() +// node_modules/undici/lib/web/cache/cache.js +var require_cache3 = __commonJS({ + "node_modules/undici/lib/web/cache/cache.js"(exports, module3) { + "use strict"; + var assert = __require("node:assert"); + var { kConstruct } = require_symbols(); + var { urlEquals, getFieldValues } = require_util3(); + var { kEnumerableProperty, isDisturbed } = require_util(); + var { webidl } = require_webidl(); + var { cloneResponse, fromInnerResponse, getResponseState } = require_response(); + var { Request, fromInnerRequest, getRequestState } = require_request2(); + var { fetching } = require_fetch(); + var { urlIsHttpHttpsScheme, readAllBytes } = require_util2(); + var { createDeferredPromise } = require_promise(); + 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, options2 = {}) { + webidl.brandCheck(this, _Cache); + const prefix = "Cache.match"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request); + options2 = webidl.converters.CacheQueryOptions(options2, prefix, "options"); + const p2 = this.#internalMatchAll(request, options2, 1); + if (p2.length === 0) { + return; + } + return p2[0]; + } + async matchAll(request = void 0, options2 = {}) { + webidl.brandCheck(this, _Cache); + const prefix = "Cache.matchAll"; + if (request !== void 0) request = webidl.converters.RequestInfo(request); + options2 = webidl.converters.CacheQueryOptions(options2, prefix, "options"); + return this.#internalMatchAll(request, options2); + } + async add(request) { + webidl.brandCheck(this, _Cache); + const prefix = "Cache.add"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request); + const requests = [request]; + const responseArrayPromise = this.addAll(requests); + return await responseArrayPromise; + } + 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 r2 = getRequestState(request); + if (!urlIsHttpHttpsScheme(r2.url) || r2.method !== "GET") { + throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme when method is not GET." + }); + } + } + const fetchControllers = []; + for (const request of requests) { + const r2 = getRequestState(new Request(request)); + if (!urlIsHttpHttpsScheme(r2.url)) { + throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme." + }); + } + r2.initiator = "fetch"; + r2.destination = "subresource"; + requestList.push(r2); + const responsePromise = createDeferredPromise(); + fetchControllers.push(fetching({ + request: r2, + 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 p2 = Promise.all(responsePromises); + const responses = await p2; + const operations = []; + let index = 0; + for (const response of responses) { + const operation = { + type: "put", + // 7.3.2 + request: requestList[index], + // 7.3.3 + response + // 7.3.4 + }; + operations.push(operation); + index++; + } + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e2) { + errorData = e2; + } + 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); + response = webidl.converters.Response(response, prefix, "response"); + let innerRequest = null; + if (webidl.is.Request(request)) { + innerRequest = getRequestState(request); + } else { + innerRequest = getRequestState(new Request(request)); + } + 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 = getResponseState(response); + 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) { + const stream = innerResponse.body.stream; + const reader = stream.getReader(); + readAllBytes(reader, bodyReadPromise.resolve, bodyReadPromise.reject); + } else { + bodyReadPromise.resolve(void 0); + } + const operations = []; + const operation = { + type: "put", + // 14. + request: innerRequest, + // 15. + response: clonedResponse + // 16. + }; + 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 (e2) { + errorData = e2; + } + queueMicrotask(() => { + if (errorData === null) { + cacheJobPromise.resolve(); + } else { + cacheJobPromise.reject(errorData); + } + }); + return cacheJobPromise.promise; + } + async delete(request, options2 = {}) { + webidl.brandCheck(this, _Cache); + const prefix = "Cache.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request); + options2 = webidl.converters.CacheQueryOptions(options2, prefix, "options"); + let r2 = null; + if (webidl.is.Request(request)) { + r2 = getRequestState(request); + if (r2.method !== "GET" && !options2.ignoreMethod) { + return false; + } + } else { + assert(typeof request === "string"); + r2 = getRequestState(new Request(request)); + } + const operations = []; + const operation = { + type: "delete", + request: r2, + options: options2 + }; + operations.push(operation); + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + let requestResponses; + try { + requestResponses = this.#batchCacheOperations(operations); + } catch (e2) { + errorData = e2; + } + 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, options2 = {}) { + webidl.brandCheck(this, _Cache); + const prefix = "Cache.keys"; + if (request !== void 0) request = webidl.converters.RequestInfo(request); + options2 = webidl.converters.CacheQueryOptions(options2, prefix, "options"); + let r2 = null; + if (request !== void 0) { + if (webidl.is.Request(request)) { + r2 = getRequestState(request); + if (r2.method !== "GET" && !options2.ignoreMethod) { + return []; + } + } else if (typeof request === "string") { + r2 = getRequestState(new Request(request)); + } + } + const promise = createDeferredPromise(); + const requests = []; + if (request === void 0) { + for (const requestResponse of this.#relevantRequestResponseList) { + requests.push(requestResponse[0]); + } + } else { + const requestResponses = this.#queryCache(r2, options2); + for (const requestResponse of requestResponses) { + requests.push(requestResponse[0]); + } + } + queueMicrotask(() => { + const requestList = []; + for (const request2 of requests) { + const requestObject = fromInnerRequest( + request2, + void 0, + 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(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 r2 = operation.request; + if (!urlIsHttpHttpsScheme(r2.url)) { + throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "expected http or https scheme" + }); + } + if (r2.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(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 (e2) { + this.#relevantRequestResponseList.length = 0; + this.#relevantRequestResponseList = backupCache; + throw e2; + } + } + /** + * @see https://w3c.github.io/ServiceWorker/#query-cache + * @param {any} requestQuery + * @param {import('../../../types/cache').CacheQueryOptions} options + * @param {requestResponseList} targetStorage + * @returns {requestResponseList} + */ + #queryCache(requestQuery, options2, targetStorage) { + const resultList = []; + const storage = targetStorage ?? this.#relevantRequestResponseList; + for (const requestResponse of storage) { + const [cachedRequest, cachedResponse] = requestResponse; + if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options2)) { + 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, options2) { + const queryURL = new URL(requestQuery.url); + const cachedURL = new URL(request.url); + if (options2?.ignoreSearch) { + cachedURL.search = ""; + queryURL.search = ""; + } + if (!urlEquals(queryURL, cachedURL, true)) { + return false; + } + if (response == null || options2?.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 (requestValue !== queryValue) { + return false; + } + } + return true; + } + #internalMatchAll(request, options2, maxResponses = Infinity) { + let r2 = null; + if (request !== void 0) { + if (webidl.is.Request(request)) { + r2 = getRequestState(request); + if (r2.method !== "GET" && !options2.ignoreMethod) { + return []; + } + } else if (typeof request === "string") { + r2 = getRequestState(new Request(request)); + } + } + const responses = []; + if (request === void 0) { + for (const requestResponse of this.#relevantRequestResponseList) { + responses.push(requestResponse[1]); + } + } else { + const requestResponses = this.#queryCache(r2, options2); + for (const requestResponse of requestResponses) { + responses.push(requestResponse[1]); + } + } + const responseList = []; + for (const response of responses) { + const responseObject = fromInnerResponse(cloneResponse(response), "immutable"); + responseList.push(responseObject); + 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 + }); + var 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( + webidl.is.Response, + "Response" + ); + webidl.converters["sequence"] = webidl.sequenceConverter( + webidl.converters.RequestInfo + ); + module3.exports = { + Cache + }; } +}); - 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 - } +// node_modules/undici/lib/web/cache/cachestorage.js +var require_cachestorage = __commonJS({ + "node_modules/undici/lib/web/cache/cachestorage.js"(exports, module3) { + "use strict"; + var { Cache } = require_cache3(); + var { webidl } = require_webidl(); + var { kEnumerableProperty } = require_util(); + var { kConstruct } = require_symbols(); + 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)) { + const cache2 = this.#caches.get(cacheName); + return new Cache(kConstruct, cache2); + } + 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); + const keys = this.#caches.keys(); + return [...keys]; + } + }; + Object.defineProperties(CacheStorage.prototype, { + [Symbol.toStringTag]: { + value: "CacheStorage", + configurable: true + }, + match: kEnumerableProperty, + has: kEnumerableProperty, + open: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + module3.exports = { + CacheStorage + }; } +}); - delete (key) { - return this.map.delete(key) +// node_modules/undici/lib/web/cookies/constants.js +var require_constants4 = __commonJS({ + "node_modules/undici/lib/web/cookies/constants.js"(exports, module3) { + "use strict"; + var maxAttributeValueSize = 1024; + var maxNameValuePairSize = 4096; + module3.exports = { + maxAttributeValueSize, + maxNameValuePairSize + }; } +}); - 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) +// node_modules/undici/lib/web/cookies/util.js +var require_util4 = __commonJS({ + "node_modules/undici/lib/web/cookies/util.js"(exports, module3) { + "use strict"; + function isCTLExcludingHtab(value) { + for (let i2 = 0; i2 < value.length; ++i2) { + const code = value.charCodeAt(i2); + if (code >= 0 && code <= 8 || code >= 10 && code <= 31 || code === 127) { + return true; + } } - - this.map.set(key, value) + return false; } - - return this - } -} - -module.exports = LRUCache - - -/***/ }), - -/***/ 12808: -/***/ ((module) => { - -"use strict"; - - -// 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 + function validateCookieName(name) { + for (let i2 = 0; i2 < name.length; ++i2) { + const code = name.charCodeAt(i2); + if (code < 33 || // exclude CTLs (0-31), SP and HT + code > 126 || // exclude non-ascii and DEL + 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"); + } + } + } + function validateCookieValue(value) { + let len = value.length; + let i2 = 0; + if (value[0] === '"') { + if (len === 1 || value[len - 1] !== '"') { + throw new Error("Invalid cookie value"); + } + --len; + ++i2; + } + while (i2 < len) { + const code = value.charCodeAt(i2++); + if (code < 33 || // exclude CTLs (0-31) + code > 126 || // non-ascii and DEL (127) + code === 34 || // " + code === 44 || // , + code === 59 || // ; + code === 92) { + throw new Error("Invalid cookie value"); + } + } + } + function validateCookiePath(path13) { + for (let i2 = 0; i2 < path13.length; ++i2) { + const code = path13.charCodeAt(i2); + if (code < 32 || // exclude CTLs (0-31) + code === 127 || // DEL + code === 59) { + throw new Error("Invalid cookie path"); + } + } + } + function validateCookieDomain(domain) { + if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) { + throw new Error("Invalid cookie domain"); + } + } + var IMFDays = [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ]; + var IMFMonths = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ]; + var IMFPaddedNumbers = Array(61).fill(0).map((_5, i2) => i2.toString().padStart(2, "0")); + 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`; + } + function validateCookieMaxAge(maxAge) { + if (maxAge < 0) { + throw new Error("Invalid cookie max-age"); + } + } + 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("; "); + } + module3.exports = { + isCTLExcludingHtab, + validateCookieName, + validateCookiePath, + validateCookieValue, + toIMFDate, + stringify + }; } +}); - if (typeof options !== 'object') { - return looseOption +// node_modules/undici/lib/web/cookies/parse.js +var require_parse = __commonJS({ + "node_modules/undici/lib/web/cookies/parse.js"(exports, module3) { + "use strict"; + var { collectASequenceOfCodePointsFast } = require_infra(); + var { maxNameValuePairSize, maxAttributeValueSize } = require_constants4(); + var { isCTLExcludingHtab } = require_util4(); + var assert = __require("node:assert"); + var { unescape: qsUnescape } = __require("node:querystring"); + 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: qsUnescape(value), + ...parseUnparsedAttributes(unparsedAttributes) + }; + } + function parseUnparsedAttributes(unparsedAttributes, cookieAttributeList = {}) { + if (unparsedAttributes.length === 0) { + return cookieAttributeList; + } + assert(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") { + const expiryTime = new Date(attributeValue); + cookieAttributeList.expires = expiryTime; + } 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); + } + const deltaSeconds = Number(attributeValue); + cookieAttributeList.maxAge = deltaSeconds; + } 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); + } + module3.exports = { + parseSetCookie, + parseUnparsedAttributes + }; } +}); - return options -} -module.exports = parseOptions - - -/***/ }), - -/***/ 35984: -/***/ ((module, exports, __nccwpck_require__) => { - -"use strict"; - - -const { - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_LENGTH, -} = __nccwpck_require__(63144) -const debug = __nccwpck_require__(76858) -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 identifer, 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*$') - - -/***/ }), - -/***/ 81744: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -// Determine if version is greater than all the versions possible in the range. -const outside = __nccwpck_require__(63346) -const gtr = (version, range, options) => outside(version, range, '>', options) -module.exports = gtr - - -/***/ }), - -/***/ 27177: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Range = __nccwpck_require__(38143) -const intersects = (r1, r2, options) => { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2, options) -} -module.exports = intersects - - -/***/ }), - -/***/ 11587: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const outside = __nccwpck_require__(63346) -// 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 - - -/***/ }), - -/***/ 72066: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(88912) -const Range = __nccwpck_require__(38143) - -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) +// node_modules/undici/lib/web/cookies/index.js +var require_cookies = __commonJS({ + "node_modules/undici/lib/web/cookies/index.js"(exports, module3) { + "use strict"; + var { parseSetCookie } = require_parse(); + var { stringify } = require_util4(); + var { webidl } = require_webidl(); + var { Headers } = require_headers(); + var brandChecks = webidl.brandCheckMultiple([Headers, globalThis.Headers].filter(Boolean)); + function getCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, "getCookies"); + brandChecks(headers); + 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; } - }) - return max -} -module.exports = maxSatisfying - - -/***/ }), - -/***/ 76732: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(88912) -const Range = __nccwpck_require__(38143) -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) + function deleteCookie(headers, name, attributes) { + brandChecks(headers); + 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 + }); + } + function getSetCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, "getSetCookies"); + brandChecks(headers); + const cookies = headers.getSetCookie(); + if (!cookies) { + return []; } + return cookies.map((pair) => parseSetCookie(pair)); } - }) - return min -} -module.exports = minSatisfying - - -/***/ }), - -/***/ 8746: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(88912) -const Range = __nccwpck_require__(38143) -const gt = __nccwpck_require__(46762) - -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}`) + function parseCookie(cookie) { + cookie = webidl.converters.DOMString(cookie); + return parseSetCookie(cookie); + } + function setCookie(headers, cookie) { + webidl.argumentLengthCheck(arguments, 2, "setCookie"); + brandChecks(headers); + cookie = webidl.converters.Cookie(cookie); + const str2 = stringify(cookie); + if (str2) { + headers.append("set-cookie", str2, true); } - }) - if (setMin && (!minver || gt(minver, setMin))) { - minver = setMin } - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} -module.exports = minVersion - - -/***/ }), - -/***/ 63346: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(88912) -const Comparator = __nccwpck_require__(40798) -const { ANY } = Comparator -const Range = __nccwpck_require__(38143) -const satisfies = __nccwpck_require__(79609) -const gt = __nccwpck_require__(46762) -const lt = __nccwpck_require__(9424) -const lte = __nccwpck_require__(49443) -const gte = __nccwpck_require__(66185) - -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') + 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 } - 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 + ]); + 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: () => [] } - }) - - // 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 - } + ]); + module3.exports = { + getCookies, + deleteCookie, + getSetCookies, + setCookie, + parseCookie + }; } - return true -} - -module.exports = outside - - -/***/ }), - -/***/ 1847: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - +}); -// 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__(79609) -const compare = __nccwpck_require__(67511) -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 +// node_modules/undici/lib/web/websocket/events.js +var require_events = __commonJS({ + "node_modules/undici/lib/web/websocket/events.js"(exports, module3) { + "use strict"; + var { webidl } = require_webidl(); + var { kEnumerableProperty } = require_util(); + var { kConstruct } = require_symbols(); + var MessageEvent = class _MessageEvent extends Event { + #eventInit; + constructor(type2, eventInitDict = {}) { + if (type2 === kConstruct) { + super(arguments[1], arguments[2]); + webidl.util.markAsUncloneable(this); + return; + } + const prefix = "MessageEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + type2 = webidl.converters.DOMString(type2, prefix, "type"); + eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, "eventInitDict"); + super(type2, 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(type2, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { + webidl.brandCheck(this, _MessageEvent); + webidl.argumentLengthCheck(arguments, 1, "MessageEvent.initMessageEvent"); + return new _MessageEvent(type2, { + bubbles, + cancelable, + data, + origin, + lastEventId, + source, + ports + }); } - } else { - if (prev) { - set.push([first, prev]) + static createFastMessageEvent(type2, init2) { + const messageEvent = new _MessageEvent(kConstruct, type2, init2); + messageEvent.#eventInit = init2; + messageEvent.#eventInit.data ??= null; + messageEvent.#eventInit.origin ??= ""; + messageEvent.#eventInit.lastEventId ??= ""; + messageEvent.#eventInit.source ??= null; + messageEvent.#eventInit.ports ??= []; + return messageEvent; } - 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}`) - } + }; + var { createFastMessageEvent } = MessageEvent; + delete MessageEvent.createFastMessageEvent; + var CloseEvent = class _CloseEvent extends Event { + #eventInit; + constructor(type2, eventInitDict = {}) { + const prefix = "CloseEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + type2 = webidl.converters.DOMString(type2, prefix, "type"); + eventInitDict = webidl.converters.CloseEventInit(eventInitDict); + super(type2, 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(type2, eventInitDict) { + const prefix = "ErrorEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + super(type2, eventInitDict); + webidl.util.markAsUncloneable(this); + type2 = webidl.converters.DOMString(type2, 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( + webidl.is.MessagePort, + "MessagePort" + ); + webidl.converters["sequence"] = webidl.sequenceConverter( + webidl.converters.MessagePort + ); + var 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: () => [] + } + ]); + 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 + } + ]); + module3.exports = { + MessageEvent, + CloseEvent, + ErrorEvent, + createFastMessageEvent + }; } - const simplified = ranges.join(' || ') - const original = typeof range.raw === 'string' ? range.raw : String(range) - return simplified.length < original.length ? simplified : range -} - - -/***/ }), - -/***/ 46087: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Range = __nccwpck_require__(38143) -const Comparator = __nccwpck_require__(40798) -const { ANY } = Comparator -const satisfies = __nccwpck_require__(79609) -const compare = __nccwpck_require__(67511) - -// 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 +// node_modules/undici/lib/web/websocket/constants.js +var require_constants5 = __commonJS({ + "node_modules/undici/lib/web/websocket/constants.js"(exports, module3) { + "use strict"; + var uid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; + var staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false + }; + var states = { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 + }; + var sentCloseFrameState = { + SENT: 1, + RECEIVED: 2 + }; + var opcodes = { + CONTINUATION: 0, + TEXT: 1, + BINARY: 2, + CLOSE: 8, + PING: 9, + PONG: 10 + }; + var maxUnsigned16Bit = 65535; + var parserStates = { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 + }; + var emptyBuffer = Buffer.allocUnsafe(0); + var sendHints = { + text: 1, + typedArray: 2, + arrayBuffer: 3, + blob: 4 + }; + module3.exports = { + uid, + sentCloseFrameState, + staticPropertyDescriptors, + states, + opcodes, + maxUnsigned16Bit, + parserStates, + emptyBuffer, + sendHints + }; } +}); - 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 +// node_modules/undici/lib/web/websocket/util.js +var require_util5 = __commonJS({ + "node_modules/undici/lib/web/websocket/util.js"(exports, module3) { + "use strict"; + var { states, opcodes } = require_constants5(); + var { isUtf8 } = __require("node:buffer"); + var { removeHTTPWhitespace } = require_data_url(); + var { collectASequenceOfCodePointsFast } = require_infra(); + function isConnecting(readyState) { + return readyState === states.CONNECTING; } - } - - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) { - return true - } else { - dom = minimumVersion + function isEstablished(readyState) { + return readyState === states.OPEN; } - } - - 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) + function isClosing(readyState) { + return readyState === states.CLOSING; } - } - - 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 + function isClosed(readyState) { + return readyState === states.CLOSED; } - } - - // will iterate one or zero times - for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) { - return null + function fireEvent(e2, target, eventFactory = (type2, init2) => new Event(type2, init2), eventInitDict = {}) { + const event = eventFactory(e2, eventInitDict); + target.dispatchEvent(event); } - - if (lt && !satisfies(eq, String(lt), options)) { - return null + function websocketMessageReceived(handler, type2, data) { + handler.onMessage(type2, data); } - - for (const c of dom) { - if (!satisfies(eq, String(c), options)) { - return false + function toArrayBuffer(buffer) { + if (buffer.byteLength === buffer.buffer.byteLength) { + return buffer.buffer; } + return new Uint8Array(buffer).buffer; } - - 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 + function isValidSubprotocol(protocol) { + if (protocol.length === 0) { + return false; + } + for (let i2 = 0; i2 < protocol.length; ++i2) { + const code = protocol.charCodeAt(i2); + if (code < 33 || // CTL, contains SP (0x20) and HT (0x09) + 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; } } - if (c.operator === '>' || c.operator === '>=') { - higher = higherGT(gt, c, options) - if (higher === c && higher !== gt) { - return false + return true; + } + function isValidStatusCode(code) { + if (code >= 1e3 && code < 1015) { + return code !== 1004 && // reserved + code !== 1005 && // "MUST NOT be set as a status code" + code !== 1006; + } + return code >= 3e3 && code <= 4999; + } + 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); + } + function parseExtensions(extensions) { + const position = { position: 0 }; + const extensionList = /* @__PURE__ */ new Map(); + while (position.position < extensions.length) { + const pair = collectASequenceOfCodePointsFast(";", extensions, position); + const [name, value = ""] = pair.split("=", 2); + extensionList.set( + removeHTTPWhitespace(name, true, false), + removeHTTPWhitespace(value, false, true) + ); + position.position++; + } + return extensionList; + } + function isValidClientWindowBits(value) { + if (value.length === 0) { + return false; + } + for (let i2 = 0; i2 < value.length; i2++) { + const byte = value.charCodeAt(i2); + if (byte < 48 || byte > 57) { + return false; } - } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { - return false } + const num = Number.parseInt(value, 10); + return num >= 8 && num <= 15; } - 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 + function getURLRecord(url3, baseURL) { + let urlRecord; + try { + urlRecord = new URL(url3, baseURL); + } catch (e2) { + throw new DOMException(e2, "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: url", "SyntaxError"); + } + if (urlRecord.hash.length || urlRecord.href.endsWith("#")) { + throw new DOMException("hash", "SyntaxError"); + } + return urlRecord; + } + function validateCloseCodeAndReason(code, reason) { + if (code !== null) { + if (code !== 1e3 && (code < 3e3 || code > 4999)) { + throw new DOMException("invalid code", "InvalidAccessError"); } } - if (c.operator === '<' || c.operator === '<=') { - lower = lowerLT(lt, c, options) - if (lower === c && lower !== lt) { - return false + if (reason !== null) { + const reasonBytesLength = Buffer.byteLength(reason); + if (reasonBytesLength > 123) { + throw new DOMException(`Reason must be less than 123 bytes; received ${reasonBytesLength}`, "SyntaxError"); } - } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) { - 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 + var utf8Decode = (() => { + if (typeof process.versions.icu === "string") { + const fatalDecoder = new TextDecoder("utf-8", { fatal: true }); + return fatalDecoder.decode.bind(fatalDecoder); + } + return function(buffer) { + if (isUtf8(buffer)) { + return buffer.toString("utf-8"); + } + throw new TypeError("Invalid utf-8 received."); + }; + })(); + module3.exports = { + isConnecting, + isEstablished, + isClosing, + isClosed, + fireEvent, + isValidSubprotocol, + isValidStatusCode, + websocketMessageReceived, + utf8Decode, + isControlFrame, + isContinuationFrame, + isTextBinaryFrame, + isValidOpcode, + parseExtensions, + isValidClientWindowBits, + toArrayBuffer, + getURLRecord, + validateCloseCodeAndReason + }; } +}); - // 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 +// node_modules/undici/lib/web/websocket/frame.js +var require_frame = __commonJS({ + "node_modules/undici/lib/web/websocket/frame.js"(exports, module3) { + "use strict"; + var { runtimeFeatures } = require_runtime_features(); + var { maxUnsigned16Bit, opcodes } = require_constants5(); + var BUFFER_SIZE = 8 * 1024; + var buffer = null; + var bufIdx = BUFFER_SIZE; + var randomFillSync = runtimeFeatures.has("crypto") ? __require("node:crypto").randomFillSync : function randomFillSync2(buffer2, _offset, _size) { + for (let i2 = 0; i2 < buffer2.length; ++i2) { + buffer2[i2] = Math.random() * 255 | 0; + } + return buffer2; + }; + function generateMask() { + if (bufIdx === BUFFER_SIZE) { + bufIdx = 0; + randomFillSync(buffer ??= Buffer.allocUnsafeSlow(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; + let payloadLength = bodyLength; + let offset = 6; + if (bodyLength > maxUnsigned16Bit) { + offset += 8; + payloadLength = 127; + } else if (bodyLength > 125) { + offset += 2; + payloadLength = 126; + } + const buffer2 = Buffer.allocUnsafe(bodyLength + offset); + buffer2[0] = buffer2[1] = 0; + buffer2[0] |= 128; + buffer2[0] = (buffer2[0] & 240) + opcode; + buffer2[offset - 4] = maskKey[0]; + buffer2[offset - 3] = maskKey[1]; + buffer2[offset - 2] = maskKey[2]; + buffer2[offset - 1] = maskKey[3]; + buffer2[1] = payloadLength; + if (payloadLength === 126) { + buffer2.writeUInt16BE(bodyLength, 2); + } else if (payloadLength === 127) { + buffer2[2] = buffer2[3] = 0; + buffer2.writeUIntBE(bodyLength, 4, 6); + } + buffer2[1] |= 128; + for (let i2 = 0; i2 < bodyLength; ++i2) { + buffer2[offset + i2] = frameData[i2] ^ maskKey[i2 & 3]; + } + return buffer2; + } + /** + * @param {Uint8Array} buffer + */ + static createFastTextFrame(buffer2) { + const maskKey = generateMask(); + const bodyLength = buffer2.length; + for (let i2 = 0; i2 < bodyLength; ++i2) { + buffer2[i2] ^= maskKey[i2 & 3]; + } + let payloadLength = bodyLength; + let offset = 6; + if (bodyLength > maxUnsigned16Bit) { + offset += 8; + payloadLength = 127; + } else if (bodyLength > 125) { + offset += 2; + payloadLength = 126; + } + const head = Buffer.allocUnsafeSlow(offset); + head[0] = 128 | opcodes.TEXT; + head[1] = payloadLength | 128; + head[offset - 4] = maskKey[0]; + head[offset - 3] = maskKey[1]; + head[offset - 2] = maskKey[2]; + head[offset - 1] = maskKey[3]; + if (payloadLength === 126) { + head.writeUInt16BE(bodyLength, 2); + } else if (payloadLength === 127) { + head[2] = head[3] = 0; + head.writeUIntBE(bodyLength, 4, 6); + } + return [head, buffer2]; + } + }; + module3.exports = { + WebsocketFrameSend, + generateMask + // for benchmark + }; } +}); - return true -} - -// >=1.2.3 is lower than >1.2.3 -const higherGT = (a, b, options) => { - if (!a) { - return b +// node_modules/undici/lib/web/websocket/connection.js +var require_connection = __commonJS({ + "node_modules/undici/lib/web/websocket/connection.js"(exports, module3) { + "use strict"; + var { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require_constants5(); + var { parseExtensions, isClosed, isClosing, isEstablished, isConnecting, validateCloseCodeAndReason } = require_util5(); + var { makeRequest } = require_request2(); + var { fetching } = require_fetch(); + var { Headers, getHeadersList } = require_headers(); + var { getDecodeSplit } = require_util2(); + var { WebsocketFrameSend } = require_frame(); + var assert = __require("node:assert"); + var { runtimeFeatures } = require_runtime_features(); + var crypto = runtimeFeatures.has("crypto") ? __require("node:crypto") : null; + var warningEmitted = false; + function establishWebSocketConnection(url3, protocols, client, handler, options2) { + const requestURL = url3; + requestURL.protocol = url3.protocol === "ws:" ? "http:" : "https:"; + const request = makeRequest({ + urlList: [requestURL], + client, + serviceWorkers: "none", + referrer: "no-referrer", + mode: "websocket", + credentials: "include", + cache: "no-store", + redirect: "error", + useURLCredentials: true + }); + if (options2.headers) { + const headersList = getHeadersList(new Headers(options2.headers)); + request.headersList = headersList; + } + const keyValue = crypto.randomBytes(16).toString("base64"); + request.headersList.append("sec-websocket-key", keyValue, true); + request.headersList.append("sec-websocket-version", "13", true); + for (const protocol of protocols) { + request.headersList.append("sec-websocket-protocol", protocol, true); + } + const permessageDeflate = "permessage-deflate; client_max_window_bits"; + request.headersList.append("sec-websocket-extensions", permessageDeflate, true); + const controller = fetching({ + request, + useParallelQueue: true, + dispatcher: options2.dispatcher, + processResponse(response) { + if (response.type === "error" || response.status !== 101) { + if (response.socket?.session == null) { + failWebsocketConnection(handler, 1002, "Received network error or non-101 status code.", response.error); + return; + } + if (response.status !== 200) { + failWebsocketConnection(handler, 1002, "Received network error or non-200 status code.", response.error); + return; + } + } + if (warningEmitted === false && response.socket?.session != null) { + process.emitWarning("WebSocket over HTTP2 is experimental, and subject to change.", "ExperimentalWarning"); + warningEmitted = true; + } + if (protocols.length !== 0 && !response.headersList.get("Sec-WebSocket-Protocol")) { + failWebsocketConnection(handler, 1002, "Server did not respond with sent protocols."); + return; + } + if (response.socket.session == null && response.headersList.get("Upgrade")?.toLowerCase() !== "websocket") { + failWebsocketConnection(handler, 1002, 'Server did not set Upgrade header to "websocket".'); + return; + } + if (response.socket.session == null && response.headersList.get("Connection")?.toLowerCase() !== "upgrade") { + failWebsocketConnection(handler, 1002, 'Server did not set Connection header to "upgrade".'); + return; + } + const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); + const digest = crypto.hash("sha1", keyValue + uid, "base64"); + if (secWSAccept !== digest) { + failWebsocketConnection(handler, 1002, "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(handler, 1002, "Sec-WebSocket-Extensions header does not match."); + return; + } + } + const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); + if (secProtocol !== null) { + const requestProtocols = getDecodeSplit("sec-websocket-protocol", request.headersList); + if (!requestProtocols.includes(secProtocol)) { + failWebsocketConnection(handler, 1002, "Protocol was not set in the opening handshake."); + return; + } + } + response.socket.on("data", handler.onSocketData); + response.socket.on("close", handler.onSocketClose); + response.socket.on("error", handler.onSocketError); + handler.wasEverConnected = true; + handler.onConnectionEstablished(response, extensions); + } + }); + return controller; + } + function closeWebSocketConnection(object, code, reason, validate = false) { + code ??= null; + reason ??= ""; + if (validate) validateCloseCodeAndReason(code, reason); + if (isClosed(object.readyState) || isClosing(object.readyState)) { + } else if (!isEstablished(object.readyState)) { + failWebsocketConnection(object); + object.readyState = states.CLOSING; + } else if (!object.closeState.has(sentCloseFrameState.SENT) && !object.closeState.has(sentCloseFrameState.RECEIVED)) { + const frame = new WebsocketFrameSend(); + if (reason.length !== 0 && code === null) { + code = 1e3; + } + assert(code === null || Number.isInteger(code)); + if (code === null && reason.length === 0) { + frame.frameData = emptyBuffer; + } else if (code !== null && reason === null) { + frame.frameData = Buffer.allocUnsafe(2); + frame.frameData.writeUInt16BE(code, 0); + } else if (code !== null && reason !== null) { + frame.frameData = Buffer.allocUnsafe(2 + Buffer.byteLength(reason)); + frame.frameData.writeUInt16BE(code, 0); + frame.frameData.write(reason, 2, "utf-8"); + } else { + frame.frameData = emptyBuffer; + } + object.socket.write(frame.createFrame(opcodes.CLOSE)); + object.closeState.add(sentCloseFrameState.SENT); + object.readyState = states.CLOSING; + } else { + object.readyState = states.CLOSING; + } + } + function failWebsocketConnection(handler, code, reason, cause) { + if (isEstablished(handler.readyState)) { + closeWebSocketConnection(handler, code, reason, false); + } + handler.controller.abort(); + if (isConnecting(handler.readyState)) { + handler.onSocketClose(); + } else if (handler.socket?.destroyed === false) { + handler.socket.destroy(); + } + } + module3.exports = { + establishWebSocketConnection, + failWebsocketConnection, + closeWebSocketConnection + }; } - 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 +// node_modules/undici/lib/web/websocket/permessage-deflate.js +var require_permessage_deflate = __commonJS({ + "node_modules/undici/lib/web/websocket/permessage-deflate.js"(exports, module3) { + "use strict"; + var { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __require("node:zlib"); + var { isValidClientWindowBits } = require_util5(); + var { MessageSizeExceededError } = require_errors(); + var tail = Buffer.from([0, 0, 255, 255]); + var kBuffer = /* @__PURE__ */ Symbol("kBuffer"); + var kLength = /* @__PURE__ */ Symbol("kLength"); + var kDefaultMaxDecompressedSize = 4 * 1024 * 1024; + var PerMessageDeflate = class { + /** @type {import('node:zlib').InflateRaw} */ + #inflate; + #options = {}; + /** @type {boolean} */ + #aborted = false; + /** @type {Function|null} */ + #currentCallback = null; + /** + * @param {Map} extensions + */ + constructor(extensions) { + this.#options.serverNoContextTakeover = extensions.has("server_no_context_takeover"); + this.#options.serverMaxWindowBits = extensions.get("server_max_window_bits"); + } + decompress(chunk, fin, callback) { + if (this.#aborted) { + callback(new MessageSizeExceededError()); + return; + } + if (!this.#inflate) { + let windowBits = Z_DEFAULT_WINDOWBITS; + if (this.#options.serverMaxWindowBits) { + 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) => { + if (this.#aborted) { + return; + } + this.#inflate[kLength] += data.length; + if (this.#inflate[kLength] > kDefaultMaxDecompressedSize) { + this.#aborted = true; + this.#inflate.removeAllListeners(); + this.#inflate.destroy(); + this.#inflate = null; + if (this.#currentCallback) { + const cb = this.#currentCallback; + this.#currentCallback = null; + cb(new MessageSizeExceededError()); + } + return; + } + this.#inflate[kBuffer].push(data); + }); + this.#inflate.on("error", (err) => { + this.#inflate = null; + callback(err); + }); + } + this.#currentCallback = callback; + this.#inflate.write(chunk); + if (fin) { + this.#inflate.write(tail); + } + this.#inflate.flush(() => { + if (this.#aborted || !this.#inflate) { + return; + } + const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]); + this.#inflate[kBuffer].length = 0; + this.#inflate[kLength] = 0; + this.#currentCallback = null; + callback(null, full); + }); + } + }; + module3.exports = { PerMessageDeflate }; } - const comp = compare(a.semver, b.semver, options) - return comp < 0 ? a - : comp > 0 ? b - : b.operator === '<' && a.operator === '<=' ? b - : a -} - -module.exports = subset - - -/***/ }), - -/***/ 6606: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Range = __nccwpck_require__(38143) - -// 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 - - -/***/ }), - -/***/ 43353: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - +}); -const Range = __nccwpck_require__(38143) -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 +// node_modules/undici/lib/web/websocket/receiver.js +var require_receiver = __commonJS({ + "node_modules/undici/lib/web/websocket/receiver.js"(exports, module3) { + "use strict"; + var { Writable } = __require("node:stream"); + var assert = __require("node:assert"); + var { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants5(); + var { + isValidStatusCode, + isValidOpcode, + websocketMessageReceived, + utf8Decode, + isControlFrame, + isTextBinaryFrame, + isContinuationFrame + } = require_util5(); + var { failWebsocketConnection } = require_connection(); + var { WebsocketFrameSend } = require_frame(); + var { PerMessageDeflate } = require_permessage_deflate(); + var { MessageSizeExceededError } = require_errors(); + var ByteParser = class extends Writable { + #buffers = []; + #fragmentsBytes = 0; + #byteOffset = 0; + #loop = false; + #state = parserStates.INFO; + #info = {}; + #fragments = []; + /** @type {Map} */ + #extensions; + /** @type {import('./websocket').Handler} */ + #handler; + /** + * @param {import('./websocket').Handler} handler + * @param {Map|null} extensions + */ + constructor(handler, extensions) { + super(); + this.#handler = handler; + this.#extensions = extensions == null ? /* @__PURE__ */ new Map() : extensions; + if (this.#extensions.has("permessage-deflate")) { + this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions)); + } + } + /** + * @param {Buffer} chunk + * @param {() => void} callback + */ + _write(chunk, _5, callback) { + this.#buffers.push(chunk); + this.#byteOffset += chunk.length; + this.#loop = true; + this.run(callback); + } + /** + * 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.#handler, 1002, "Invalid opcode received"); + return callback(); + } + if (masked) { + failWebsocketConnection(this.#handler, 1002, "Frame cannot be masked"); + return callback(); + } + if (rsv1 !== 0 && !this.#extensions.has("permessage-deflate")) { + failWebsocketConnection(this.#handler, 1002, "Expected RSV1 to be clear."); + return; + } + if (rsv2 !== 0 || rsv3 !== 0) { + failWebsocketConnection(this.#handler, 1002, "RSV1, RSV2, RSV3 must be clear"); + return; + } + if (fragmented && !isTextBinaryFrame(opcode)) { + failWebsocketConnection(this.#handler, 1002, "Invalid frame type was fragmented."); + return; + } + if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { + failWebsocketConnection(this.#handler, 1002, "Expected continuation frame"); + return; + } + if (this.#info.fragmented && fragmented) { + failWebsocketConnection(this.#handler, 1002, "Fragmented frame exceeded 125 bytes."); + return; + } + if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { + failWebsocketConnection(this.#handler, 1002, "Control frame either too large or fragmented"); + return; + } + if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { + failWebsocketConnection(this.#handler, 1002, "Unexpected continuation frame"); + return; + } + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength; + this.#state = parserStates.READ_DATA; + } 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; + } 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.#handler, 1009, "Received payload length > 2^31 bytes."); + return; + } + this.#info.payloadLength = lower; + this.#state = parserStates.READ_DATA; + } 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.#info.fragmented && this.#info.fin) { + websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments()); + } + this.#state = parserStates.INFO; + } else { + this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error2, data) => { + if (error2) { + const code = error2 instanceof MessageSizeExceededError ? 1009 : 1007; + failWebsocketConnection(this.#handler, code, error2.message); + return; + } + this.writeFragments(data); + if (!this.#info.fin) { + this.#state = parserStates.INFO; + this.#loop = true; + this.run(callback); + return; + } + websocketMessageReceived(this.#handler, 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(n8) { + if (n8 > this.#byteOffset) { + throw new Error("Called consume() before buffers satiated."); + } else if (n8 === 0) { + return emptyBuffer; + } + this.#byteOffset -= n8; + const first = this.#buffers[0]; + if (first.length > n8) { + this.#buffers[0] = first.subarray(n8, first.length); + return first.subarray(0, n8); + } else if (first.length === n8) { + return this.#buffers.shift(); + } else { + let offset = 0; + const buffer = Buffer.allocUnsafeSlow(n8); + while (offset !== n8) { + const next = this.#buffers[0]; + const length = next.length; + if (length + offset === n8) { + buffer.set(this.#buffers.shift(), offset); + break; + } else if (length + offset > n8) { + buffer.set(next.subarray(0, n8 - offset), offset); + this.#buffers[0] = next.subarray(n8 - offset); + break; + } else { + buffer.set(this.#buffers.shift(), offset); + offset += length; + } + } + 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(); + } + let offset = 0; + const output = Buffer.allocUnsafeSlow(this.#fragmentsBytes); + for (let i2 = 0; i2 < fragments.length; ++i2) { + const buffer = fragments[i2]; + output.set(buffer, offset); + offset += buffer.length; + } + this.#fragments = []; + this.#fragmentsBytes = 0; + return output; + } + parseCloseBody(data) { + assert(data.length !== 1); + 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 }; + } + 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.#handler, 1002, "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; + failWebsocketConnection(this.#handler, code, reason); + return false; + } + if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { + let body2 = emptyBuffer; + if (this.#info.closeInfo.code) { + body2 = Buffer.allocUnsafe(2); + body2.writeUInt16BE(this.#info.closeInfo.code, 0); + } + const closeFrame = new WebsocketFrameSend(body2); + this.#handler.socket.write(closeFrame.createFrame(opcodes.CLOSE)); + this.#handler.closeState.add(sentCloseFrameState.SENT); + } + this.#handler.readyState = states.CLOSING; + this.#handler.closeState.add(sentCloseFrameState.RECEIVED); + return false; + } else if (opcode === opcodes.PING) { + if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { + const frame = new WebsocketFrameSend(body); + this.#handler.socket.write(frame.createFrame(opcodes.PONG)); + this.#handler.onPing(body); + } + } else if (opcode === opcodes.PONG) { + this.#handler.onPong(body); + } + return true; + } + get closingInfo() { + return this.#info.closeInfo; + } + }; + module3.exports = { + ByteParser + }; } -} -module.exports = validRange - - -/***/ }), - -/***/ 71643: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LayoutVariant = exports.REDOCLY_ROUTE_RBAC = exports.REDOCLY_TEAMS_RBAC = exports.ApigeeDevOnboardingIntegrationAuthType = exports.AuthProviderType = exports.DEFAULT_TEAM_CLAIM_NAME = void 0; -exports.DEFAULT_TEAM_CLAIM_NAME = 'https://redocly.com/sso/teams'; -var AuthProviderType; -(function (AuthProviderType) { - AuthProviderType["OIDC"] = "OIDC"; - AuthProviderType["SAML2"] = "SAML2"; -})(AuthProviderType || (exports.AuthProviderType = AuthProviderType = {})); -var ApigeeDevOnboardingIntegrationAuthType; -(function (ApigeeDevOnboardingIntegrationAuthType) { - ApigeeDevOnboardingIntegrationAuthType["SERVICE_ACCOUNT"] = "SERVICE_ACCOUNT"; - ApigeeDevOnboardingIntegrationAuthType["OAUTH2"] = "OAUTH2"; -})(ApigeeDevOnboardingIntegrationAuthType || (exports.ApigeeDevOnboardingIntegrationAuthType = ApigeeDevOnboardingIntegrationAuthType = {})); -exports.REDOCLY_TEAMS_RBAC = 'redocly::teams-rbac'; -exports.REDOCLY_ROUTE_RBAC = 'redocly::route-rbac'; -var LayoutVariant; -(function (LayoutVariant) { - LayoutVariant["STACKED"] = "stacked"; - LayoutVariant["THREE_PANEL"] = "three-panel"; -})(LayoutVariant || (exports.LayoutVariant = LayoutVariant = {})); -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 66656: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.closedThemeConfigSchema = exports.themeConfigSchema = void 0; -const graphql_config_schema_1 = __nccwpck_require__(29575); -const feedback_config_schema_1 = __nccwpck_require__(88462); -const ex_theme_config_schemas_1 = __nccwpck_require__(11031); -exports.themeConfigSchema = { - type: 'object', - properties: { - /** - * @deprecated Should use `plugins` instead - */ - imports: { - type: 'array', - items: { type: 'string' }, - }, - logo: ex_theme_config_schemas_1.logoConfigSchema, - navbar: ex_theme_config_schemas_1.navbarConfigSchema, - products: ex_theme_config_schemas_1.productsConfigSchema, - footer: ex_theme_config_schemas_1.footerConfigSchema, - sidebar: ex_theme_config_schemas_1.sidebarConfigSchema, - scripts: ex_theme_config_schemas_1.scriptsConfigSchema, - links: ex_theme_config_schemas_1.linksConfigSchema, - feedback: feedback_config_schema_1.feedbackConfigSchema, - search: ex_theme_config_schemas_1.searchConfigSchema, - colorMode: ex_theme_config_schemas_1.colorModeConfigSchema, - navigation: ex_theme_config_schemas_1.navigationConfigSchema, - codeSnippet: ex_theme_config_schemas_1.codeSnippetConfigSchema, - markdown: ex_theme_config_schemas_1.markdownConfigSchema, - openapi: ex_theme_config_schemas_1.openapiConfigSchema, - graphql: graphql_config_schema_1.graphqlConfigSchema, - analytics: ex_theme_config_schemas_1.analyticsConfigSchema, - userMenu: ex_theme_config_schemas_1.userMenuConfigSchema, - versionPicker: ex_theme_config_schemas_1.versionPickerConfigSchema, - breadcrumbs: ex_theme_config_schemas_1.breadcrumbsConfigSchema, - catalog: ex_theme_config_schemas_1.catalogsConfigSchema, - scorecard: ex_theme_config_schemas_1.scorecardConfigSchema, - }, - additionalProperties: true, -}; -exports.closedThemeConfigSchema = Object.assign(Object.assign({}, exports.themeConfigSchema), { additionalProperties: false }); -//# sourceMappingURL=default-theme-config-schema.js.map - -/***/ }), - -/***/ 11031: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +}); -"use strict"; +// node_modules/undici/lib/web/websocket/sender.js +var require_sender = __commonJS({ + "node_modules/undici/lib/web/websocket/sender.js"(exports, module3) { + "use strict"; + var { WebsocketFrameSend } = require_frame(); + var { opcodes, sendHints } = require_constants5(); + var FixedQueue = require_fixed_queue(); + 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) { + if (!this.#running) { + if (hint === sendHints.text) { + const { 0: head, 1: body } = WebsocketFrameSend.createFastTextFrame(item); + this.#socket.cork(); + this.#socket.write(head); + this.#socket.write(body, cb); + this.#socket.uncork(); + } else { + this.#socket.write(createFrame(item, hint), cb); + } + } else { + const node2 = { + promise: null, + callback: cb, + frame: createFrame(item, hint) + }; + this.#queue.push(node2); + } + return; + } + 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.text ? opcodes.TEXT : opcodes.BINARY); + } + function toBuffer(data, hint) { + switch (hint) { + case sendHints.text: + case sendHints.typedArray: + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength); + case sendHints.arrayBuffer: + case sendHints.blob: + return new Uint8Array(data); + } + } + module3.exports = { SendQueue }; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.scorecardConfigSchema = exports.catalogsConfigSchema = exports.catalogSchema = exports.catalogFilterSchema = exports.breadcrumbsConfigSchema = exports.versionPickerConfigSchema = exports.userMenuConfigSchema = exports.analyticsConfigSchema = exports.googleAnalyticsConfigSchema = exports.productGoogleAnalyticsConfigSchema = exports.gtmAnalyticsConfigSchema = exports.segmentAnalyticsConfigSchema = exports.rudderstackAnalyticsConfigSchema = exports.heapAnalyticsConfigSchema = exports.fullstoryAnalyticsConfigSchema = exports.amplitudeAnalyticsConfigSchema = exports.openapiConfigSchema = exports.markdownConfigSchema = exports.codeSnippetConfigSchema = exports.navigationConfigSchema = exports.colorModeConfigSchema = exports.searchConfigSchema = exports.linksConfigSchema = exports.scriptsConfigSchema = exports.sidebarConfigSchema = exports.footerConfigSchema = exports.productsConfigSchema = exports.navbarConfigSchema = exports.logoConfigSchema = exports.searchFiltersConfigSchema = exports.searchFacetsConfigSchema = exports.aiSearchConfigSchema = exports.productConfigSchema = exports.navItemsSchema = void 0; -const redoc_config_schema_1 = __nccwpck_require__(54043); -const reference_docs_config_schema_1 = __nccwpck_require__(99417); -const hideConfigSchema = { - type: 'object', - properties: { - hide: { type: 'boolean' }, - }, - additionalProperties: false, -}; -const scriptConfigSchema = { - type: 'object', - properties: { - src: { type: 'string' }, - async: { type: 'boolean' }, - crossorigin: { type: 'string' }, - defer: { type: 'boolean' }, - fetchpriority: { type: 'string' }, - integrity: { type: 'string' }, - module: { type: 'boolean' }, - nomodule: { type: 'boolean' }, - nonce: { type: 'string' }, - referrerpolicy: { type: 'string' }, - type: { type: 'string' }, - }, - required: ['src'], - additionalProperties: true, -}; -const navItemSchema = { - type: 'object', - properties: { - page: { type: 'string' }, - directory: { type: 'string' }, - disconnect: { type: 'boolean', default: false }, - group: { type: 'string' }, - label: { type: 'string' }, - href: { type: 'string' }, - external: { type: 'boolean' }, - labelTranslationKey: { type: 'string' }, - groupTranslationKey: { type: 'string' }, - icon: { - oneOf: [ - { type: 'string' }, - { type: 'object', properties: { srcSet: { type: 'string' } }, required: ['srcSet'] }, - ], - }, - separator: { type: 'string' }, - separatorLine: { type: 'boolean' }, - linePosition: { - type: 'string', - enum: ['top', 'bottom'], - default: 'top', - }, - version: { type: 'string' }, - menuStyle: { type: 'string', enum: ['drilldown'] }, - expanded: { type: 'string', const: 'always' }, - selectFirstItemOnExpand: { type: 'boolean' }, - flatten: { type: 'boolean' }, - linkedSidebars: { - type: 'array', - items: { type: 'string' }, - }, - // Allow users to eject the navbar and implement additional levels of nesting - items: { type: 'array', items: { type: 'object', additionalProperties: true } }, - }, -}; -exports.navItemsSchema = { - type: 'array', - items: Object.assign(Object.assign({}, navItemSchema), { properties: Object.assign(Object.assign({}, navItemSchema.properties), { items: { type: 'array', items: navItemSchema } }) }), -}; -exports.productConfigSchema = { - type: 'object', - properties: { - name: { type: 'string' }, - icon: { type: 'string' }, - folder: { type: 'string' }, - }, - additionalProperties: false, - required: ['name', 'folder'], -}; -exports.aiSearchConfigSchema = { - type: 'object', - properties: { - hide: { - type: 'boolean', - default: false, - }, - suggestions: { - default: [], - type: 'array', - items: { - type: 'string', - }, - }, - prompt: { - type: 'string', - }, - }, - additionalProperties: false, -}; -exports.searchFacetsConfigSchema = { - type: 'array', - items: { - type: 'object', - required: ['name', 'field', 'type'], - properties: { - name: { type: 'string' }, - field: { type: 'string' }, - type: { - type: 'string', - enum: ['multi-select', 'select', 'tags'], - }, +// node_modules/undici/lib/web/websocket/websocket.js +var require_websocket = __commonJS({ + "node_modules/undici/lib/web/websocket/websocket.js"(exports, module3) { + "use strict"; + var { isArrayBuffer } = __require("node:util/types"); + var { webidl } = require_webidl(); + var { URLSerializer } = require_data_url(); + var { environmentSettingsObject } = require_util2(); + var { staticPropertyDescriptors, states, sentCloseFrameState, sendHints, opcodes } = require_constants5(); + var { + isConnecting, + isEstablished, + isClosing, + isClosed, + isValidSubprotocol, + fireEvent, + utf8Decode, + toArrayBuffer, + getURLRecord + } = require_util5(); + var { establishWebSocketConnection, closeWebSocketConnection, failWebsocketConnection } = require_connection(); + var { ByteParser } = require_receiver(); + var { kEnumerableProperty } = require_util(); + var { getGlobalDispatcher } = require_global2(); + var { ErrorEvent, CloseEvent, createFastMessageEvent } = require_events(); + var { SendQueue } = require_sender(); + var { WebsocketFrameSend } = require_frame(); + var { channels } = require_diagnostics(); + function getSocketAddress(socket) { + if (typeof socket?.address === "function") { + return socket.address(); + } + if (typeof socket?.session?.socket?.address === "function") { + return socket.session.socket.address(); + } + return null; + } + var WebSocket = class _WebSocket extends EventTarget { + #events = { + open: null, + error: null, + close: null, + message: null + }; + #bufferedAmount = 0; + #protocol = ""; + #extensions = ""; + /** @type {SendQueue} */ + #sendQueue; + /** @type {Handler} */ + #handler = { + onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions), + onMessage: (opcode, data) => this.#onMessage(opcode, data), + onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message), + onParserDrain: () => this.#onParserDrain(), + onSocketData: (chunk) => { + if (!this.#parser.write(chunk)) { + this.#handler.socket.pause(); + } }, - additionalProperties: false, - }, -}; -exports.searchFiltersConfigSchema = { - type: 'object', - properties: Object.assign({ facets: exports.searchFacetsConfigSchema }, hideConfigSchema.properties), - additionalProperties: false, -}; -const searchSuggestedPageSchema = { - type: 'object', - properties: { - page: { type: 'string' }, - label: { type: 'string' }, - labelTranslationKey: { type: 'string' }, - }, - required: ['page'], -}; -exports.logoConfigSchema = { - type: 'object', - properties: { - image: { type: 'string' }, - srcSet: { type: 'string' }, - altText: { type: 'string' }, - link: { type: 'string' }, - favicon: { type: 'string' }, - }, - additionalProperties: false, -}; -exports.navbarConfigSchema = { - type: 'object', - properties: Object.assign({ items: exports.navItemsSchema }, hideConfigSchema.properties), - additionalProperties: false, -}; -exports.productsConfigSchema = { - type: 'object', - additionalProperties: exports.productConfigSchema, -}; -exports.footerConfigSchema = { - type: 'object', - properties: Object.assign({ items: exports.navItemsSchema, copyrightText: { type: 'string' }, logo: hideConfigSchema }, hideConfigSchema.properties), - additionalProperties: false, -}; -exports.sidebarConfigSchema = { - type: 'object', - properties: Object.assign({ separatorLine: { type: 'boolean' }, linePosition: { - type: 'string', - enum: ['top', 'bottom'], - default: 'bottom', - } }, hideConfigSchema.properties), - additionalProperties: false, -}; -exports.scriptsConfigSchema = { - type: 'object', - properties: { - head: { type: 'array', items: scriptConfigSchema }, - body: { type: 'array', items: scriptConfigSchema }, - }, - additionalProperties: false, -}; -exports.linksConfigSchema = { - type: 'array', - items: { - type: 'object', - properties: { - href: { type: 'string' }, - as: { type: 'string' }, - crossorigin: { type: 'string' }, - fetchpriority: { type: 'string' }, - hreflang: { type: 'string' }, - imagesizes: { type: 'string' }, - imagesrcset: { type: 'string' }, - integrity: { type: 'string' }, - media: { type: 'string' }, - prefetch: { type: 'string' }, - referrerpolicy: { type: 'string' }, - rel: { type: 'string' }, - sizes: { type: 'string' }, - title: { type: 'string' }, - type: { type: 'string' }, - }, - required: ['href'], - additionalProperties: true, - }, -}; -exports.searchConfigSchema = { - type: 'object', - properties: Object.assign({ engine: { - type: 'string', - enum: ['flexsearch', 'typesense'], - default: 'flexsearch', - }, ai: exports.aiSearchConfigSchema, filters: exports.searchFiltersConfigSchema, placement: { - type: 'string', - default: 'navbar', - }, shortcuts: { - type: 'array', - items: { type: 'string' }, - default: ['/'], - }, suggestedPages: { - type: 'array', - items: searchSuggestedPageSchema, - } }, hideConfigSchema.properties), - additionalProperties: false, -}; -exports.colorModeConfigSchema = { - type: 'object', - properties: Object.assign({ ignoreDetection: { type: 'boolean' }, modes: { - type: 'array', - items: { type: 'string' }, - default: ['light', 'dark'], - } }, hideConfigSchema.properties), - additionalProperties: false, -}; -exports.navigationConfigSchema = { - type: 'object', - properties: { - nextButton: { - type: 'object', - properties: Object.assign({ text: { type: 'string', default: 'Next page' } }, hideConfigSchema.properties), - additionalProperties: false, - default: {}, - }, - previousButton: { - type: 'object', - properties: Object.assign({ text: { type: 'string', default: 'Previous page' } }, hideConfigSchema.properties), - additionalProperties: false, - default: {}, + onSocketError: (err) => { + this.#handler.readyState = states.CLOSING; + if (channels.socketError.hasSubscribers) { + channels.socketError.publish(err); + } + this.#handler.socket.destroy(); }, - }, - additionalProperties: false, -}; -exports.codeSnippetConfigSchema = { - type: 'object', - properties: { - elementFormat: { type: 'string', default: 'icon' }, - copy: { - type: 'object', - properties: Object.assign({}, hideConfigSchema.properties), - additionalProperties: false, - default: { hide: false }, - }, - report: { - type: 'object', - properties: Object.assign({ tooltipText: { type: 'string' }, buttonText: { type: 'string' }, label: { type: 'string' } }, hideConfigSchema.properties), - additionalProperties: false, - default: { hide: false }, - }, - expand: { - type: 'object', - properties: Object.assign({}, hideConfigSchema.properties), - additionalProperties: false, - default: { hide: false }, - }, - collapse: { - type: 'object', - properties: Object.assign({}, hideConfigSchema.properties), - additionalProperties: false, - default: { hide: false }, + onSocketClose: () => this.#onSocketClose(), + onPing: (body) => { + if (channels.ping.hasSubscribers) { + channels.ping.publish({ + payload: body, + websocket: this + }); + } }, - }, - additionalProperties: false, -}; -exports.markdownConfigSchema = { - type: 'object', - properties: { - frontMatterKeysToResolve: { - type: 'array', - items: { type: 'string' }, - default: ['image', 'links'], - }, - partialsFolders: { - type: 'array', - items: { type: 'string' }, - default: ['_partials'], - }, - lastUpdatedBlock: { - type: 'object', - properties: Object.assign({ format: { - type: 'string', - enum: ['timeago', 'iso', 'long', 'short'], - default: 'timeago', - }, locale: { type: 'string' } }, hideConfigSchema.properties), - additionalProperties: false, - default: {}, - }, - toc: { - type: 'object', - properties: Object.assign({ header: { type: 'string', default: 'On this page' }, depth: { type: 'integer', default: 3, minimum: 1 } }, hideConfigSchema.properties), - additionalProperties: false, - default: {}, - }, - editPage: { - type: 'object', - properties: Object.assign({ baseUrl: { type: 'string' } }, hideConfigSchema.properties), - additionalProperties: false, - default: {}, + onPong: (body) => { + if (channels.pong.hasSubscribers) { + channels.pong.publish({ + payload: body, + websocket: this + }); + } }, - }, - additionalProperties: false, - default: {}, -}; -exports.openapiConfigSchema = Object.assign(Object.assign({}, redoc_config_schema_1.redocConfigSchema), { properties: Object.assign(Object.assign({}, redoc_config_schema_1.redocConfigSchema.properties), reference_docs_config_schema_1.deprecatedRefDocsSchema.properties) }); -const adobeAnalyticsConfigSchema = { - type: 'object', - properties: { - includeInDevelopment: { type: 'boolean' }, - scriptUrl: { type: 'string' }, - pageViewEventName: { type: 'string' }, - }, - additionalProperties: false, - required: ['scriptUrl'], -}; -exports.amplitudeAnalyticsConfigSchema = { - type: 'object', - properties: { - includeInDevelopment: { type: 'boolean' }, - apiKey: { type: 'string' }, - head: { type: 'boolean' }, - respectDNT: { type: 'boolean' }, - exclude: { type: 'array', items: { type: 'string' } }, - outboundClickEventName: { type: 'string' }, - pageViewEventName: { type: 'string' }, - amplitudeConfig: { type: 'object', additionalProperties: true }, - }, - additionalProperties: false, - required: ['apiKey'], -}; -exports.fullstoryAnalyticsConfigSchema = { - type: 'object', - properties: { - includeInDevelopment: { type: 'boolean' }, - orgId: { type: 'string' }, - }, - additionalProperties: false, - required: ['orgId'], -}; -exports.heapAnalyticsConfigSchema = { - type: 'object', - properties: { - includeInDevelopment: { type: 'boolean' }, - appId: { type: 'string' }, - }, - additionalProperties: false, - required: ['appId'], -}; -exports.rudderstackAnalyticsConfigSchema = { - type: 'object', - properties: { - includeInDevelopment: { type: 'boolean' }, - writeKey: { type: 'string', minLength: 10 }, - trackPage: { type: 'boolean' }, - dataPlaneUrl: { type: 'string' }, - controlPlaneUrl: { type: 'string' }, - sdkUrl: { type: 'string' }, - loadOptions: { type: 'object', additionalProperties: true }, - }, - additionalProperties: false, - required: ['writeKey'], -}; -exports.segmentAnalyticsConfigSchema = { - type: 'object', - properties: { - includeInDevelopment: { type: 'boolean' }, - writeKey: { type: 'string', minLength: 10 }, - trackPage: { type: 'boolean' }, - includeTitleInPageCall: { type: 'boolean' }, - host: { type: 'string' }, - }, - additionalProperties: false, - required: ['writeKey'], -}; -exports.gtmAnalyticsConfigSchema = { - type: 'object', - properties: { - includeInDevelopment: { type: 'boolean' }, - trackingId: { type: 'string' }, - gtmAuth: { type: 'string' }, - gtmPreview: { type: 'string' }, - defaultDataLayer: {}, - dataLayerName: { type: 'string' }, - enableWebVitalsTracking: { type: 'boolean' }, - selfHostedOrigin: { type: 'string' }, - pageViewEventName: { type: 'string' }, - }, - additionalProperties: false, - required: ['trackingId'], -}; -exports.productGoogleAnalyticsConfigSchema = { - type: 'object', - properties: { - includeInDevelopment: { type: 'boolean' }, - trackingId: { type: 'string' }, - conversionId: { type: 'string' }, - floodlightId: { type: 'string' }, - optimizeId: { type: 'string' }, - exclude: { type: 'array', items: { type: 'string' } }, - }, - additionalProperties: false, - required: ['trackingId'], -}; -exports.googleAnalyticsConfigSchema = { - type: 'object', - properties: { - includeInDevelopment: { type: 'boolean' }, - trackingId: { type: 'string' }, - conversionId: { type: 'string' }, - floodlightId: { type: 'string' }, - head: { type: 'boolean' }, - respectDNT: { type: 'boolean' }, - exclude: { type: 'array', items: { type: 'string' } }, - optimizeId: { type: 'string' }, - anonymizeIp: { type: 'boolean' }, - cookieExpires: { type: 'number' }, - // All enabled tracking configs - trackers: { - type: 'object', - additionalProperties: exports.productGoogleAnalyticsConfigSchema, - }, - }, - additionalProperties: false, - required: ['trackingId'], -}; -exports.analyticsConfigSchema = { - type: 'object', - properties: { - adobe: adobeAnalyticsConfigSchema, - amplitude: exports.amplitudeAnalyticsConfigSchema, - fullstory: exports.fullstoryAnalyticsConfigSchema, - heap: exports.heapAnalyticsConfigSchema, - rudderstack: exports.rudderstackAnalyticsConfigSchema, - segment: exports.segmentAnalyticsConfigSchema, - gtm: exports.gtmAnalyticsConfigSchema, - ga: exports.googleAnalyticsConfigSchema, - }, -}; -exports.userMenuConfigSchema = { - type: 'object', - properties: Object.assign({ items: { - type: 'array', - items: { - type: 'object', - properties: { - label: { type: 'string' }, - external: { type: 'boolean' }, - link: { type: 'string' }, - separatorLine: { type: 'boolean' }, - }, - additionalProperties: true, - }, - default: [], - }, hideLoginButton: { type: 'boolean' } }, hideConfigSchema.properties), - additionalProperties: false, -}; -exports.versionPickerConfigSchema = { - type: 'object', - properties: { - hide: { type: 'boolean' }, - showForUnversioned: { - type: 'boolean', - }, - }, -}; -exports.breadcrumbsConfigSchema = { - type: 'object', - properties: { - hide: { type: 'boolean' }, - prefixItems: { - type: 'array', - items: { - type: 'object', - properties: { - label: { type: 'string' }, - labelTranslationKey: { type: 'string' }, - page: { type: 'string' }, - }, - additionalProperties: false, - default: {}, - }, - }, - }, - additionalProperties: false, -}; -exports.catalogFilterSchema = { - type: 'object', - additionalProperties: false, - required: ['title', 'property'], - properties: { - type: { - type: 'string', - enum: ['select', 'checkboxes', 'date-range'], - default: 'checkboxes', - }, - title: { type: 'string' }, - titleTranslationKey: { type: 'string' }, - property: { type: 'string' }, - parentFilter: { type: 'string' }, - valuesMapping: { type: 'object', additionalProperties: { type: 'string' } }, - missingCategoryName: { type: 'string' }, - missingCategoryNameTranslationKey: { type: 'string' }, - options: { type: 'array', items: { type: 'string' } }, - }, -}; -exports.catalogSchema = { - type: 'object', - additionalProperties: true, - required: ['slug', 'items'], - properties: { - slug: { type: 'string' }, - filters: { type: 'array', items: exports.catalogFilterSchema }, - groupByFirstFilter: { type: 'boolean' }, - filterValuesCasing: { - type: 'string', - enum: ['sentence', 'original', 'lowercase', 'uppercase'], - }, - items: exports.navItemsSchema, - requiredPermission: { type: 'string' }, - separateVersions: { type: 'boolean' }, - title: { type: 'string' }, - titleTranslationKey: { type: 'string' }, - description: { type: 'string' }, - descriptionTranslationKey: { type: 'string' }, - }, -}; -exports.catalogsConfigSchema = { - type: 'object', - patternProperties: { - '.*': exports.catalogSchema, - }, -}; -exports.scorecardConfigSchema = { - type: 'object', - additionalProperties: true, - required: [], - properties: { - /** - * @deprecated Should use `reunite.ignoreLint` instead - */ - ignoreNonCompliant: { type: 'boolean', default: false }, - teamMetadataProperty: { - type: 'object', - properties: { - property: { type: 'string' }, - label: { type: 'string' }, - default: { type: 'string' }, - }, - }, - levels: { - type: 'array', - items: { - type: 'object', - required: ['name'], - properties: { - name: { type: 'string' }, - color: { type: 'string' }, - extends: { type: 'array', items: { type: 'string' } }, - rules: { - type: 'object', - additionalProperties: { - oneOf: [{ type: 'string' }, { type: 'object' }], - }, - }, - }, - additionalProperties: false, - }, - }, - targets: { - type: 'array', - items: { - type: 'object', - required: ['where'], - properties: { - minimumLevel: { type: 'string' }, - rules: { type: 'object', additionalProperties: true }, - where: { - type: 'object', - required: ['metadata'], - properties: { - metadata: { type: 'object', additionalProperties: { type: 'string' } }, - }, - additionalProperties: false, - }, - }, - additionalProperties: false, - }, - }, - ignore: { - type: 'array', - items: { type: 'string' }, - }, - }, -}; -//# sourceMappingURL=ex-theme-config-schemas.js.map - -/***/ }), - -/***/ 88462: -/***/ ((__unused_webpack_module, exports) => { + readyState: states.CONNECTING, + socket: null, + closeState: /* @__PURE__ */ new Set(), + controller: null, + wasEverConnected: false + }; + #url; + #binaryType; + /** @type {import('./receiver').ByteParser} */ + #parser; + /** + * @param {string} url + * @param {string|string[]} protocols + */ + constructor(url3, protocols = []) { + super(); + webidl.util.markAsUncloneable(this); + const prefix = "WebSocket constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + const options2 = webidl.converters["DOMString or sequence or WebSocketInit"](protocols, prefix, "options"); + url3 = webidl.converters.USVString(url3); + protocols = options2.protocols; + const baseURL = environmentSettingsObject.settingsObject.baseUrl; + const urlRecord = getURLRecord(url3, baseURL); + if (typeof protocols === "string") { + protocols = [protocols]; + } + if (protocols.length !== new Set(protocols.map((p2) => p2.toLowerCase())).size) { + throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + } + if (protocols.length > 0 && !protocols.every((p2) => isValidSubprotocol(p2))) { + throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + } + this.#url = new URL(urlRecord.href); + const client = environmentSettingsObject.settingsObject; + this.#handler.controller = establishWebSocketConnection( + urlRecord, + protocols, + client, + this.#handler, + options2 + ); + this.#handler.readyState = _WebSocket.CONNECTING; + this.#binaryType = "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", webidl.attributes.Clamp); + } + if (reason !== void 0) { + reason = webidl.converters.USVString(reason); + } + code ??= null; + reason ??= ""; + closeWebSocketConnection(this.#handler, code, reason, true); + } + /** + * @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.#handler.readyState)) { + throw new DOMException("Sent before connected.", "InvalidStateError"); + } + if (!isEstablished(this.#handler.readyState) || isClosing(this.#handler.readyState)) { + return; + } + if (typeof data === "string") { + const buffer = Buffer.from(data); + this.#bufferedAmount += buffer.byteLength; + this.#sendQueue.add(buffer, () => { + this.#bufferedAmount -= buffer.byteLength; + }, sendHints.text); + } else if (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 (webidl.is.Blob(data)) { + this.#bufferedAmount += data.size; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.size; + }, sendHints.blob); + } + } + get readyState() { + webidl.brandCheck(this, _WebSocket); + return this.#handler.readyState; + } + get bufferedAmount() { + webidl.brandCheck(this, _WebSocket); + return this.#bufferedAmount; + } + get url() { + webidl.brandCheck(this, _WebSocket); + return URLSerializer(this.#url); + } + 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); + } + const listener = webidl.converters.EventHandlerNonNull(fn); + if (listener !== null) { + this.addEventListener("open", listener); + this.#events.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); + } + const listener = webidl.converters.EventHandlerNonNull(fn); + if (listener !== null) { + this.addEventListener("error", listener); + this.#events.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); + } + const listener = webidl.converters.EventHandlerNonNull(fn); + if (listener !== null) { + this.addEventListener("close", listener); + this.#events.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); + } + const listener = webidl.converters.EventHandlerNonNull(fn); + if (listener !== null) { + this.addEventListener("message", listener); + this.#events.message = fn; + } else { + this.#events.message = null; + } + } + get binaryType() { + webidl.brandCheck(this, _WebSocket); + return this.#binaryType; + } + set binaryType(type2) { + webidl.brandCheck(this, _WebSocket); + if (type2 !== "blob" && type2 !== "arraybuffer") { + this.#binaryType = "blob"; + } else { + this.#binaryType = type2; + } + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + */ + #onConnectionEstablished(response, parsedExtensions) { + this.#handler.socket = response.socket; + const parser = new ByteParser(this.#handler, parsedExtensions); + parser.on("drain", () => this.#handler.onParserDrain()); + parser.on("error", (err) => this.#handler.onParserError(err)); + this.#parser = parser; + this.#sendQueue = new SendQueue(response.socket); + this.#handler.readyState = 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); + if (channels.open.hasSubscribers) { + const headers = response.headersList.entries; + channels.open.publish({ + address: getSocketAddress(response.socket), + protocol: this.#protocol, + extensions: this.#extensions, + websocket: this, + handshakeResponse: { + status: response.status, + statusText: response.statusText, + headers + } + }); + } + } + #onMessage(type2, data) { + if (this.#handler.readyState !== states.OPEN) { + return; + } + let dataForEvent; + if (type2 === opcodes.TEXT) { + try { + dataForEvent = utf8Decode(data); + } catch { + failWebsocketConnection(this.#handler, 1007, "Received invalid UTF-8 in text frame."); + return; + } + } else if (type2 === opcodes.BINARY) { + if (this.#binaryType === "blob") { + dataForEvent = new Blob([data]); + } else { + dataForEvent = toArrayBuffer(data); + } + } + fireEvent("message", this, createFastMessageEvent, { + origin: this.#url.origin, + data: dataForEvent + }); + } + #onParserDrain() { + this.#handler.socket.resume(); + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 + */ + #onSocketClose() { + const wasClean = this.#handler.closeState.has(sentCloseFrameState.SENT) && this.#handler.closeState.has(sentCloseFrameState.RECEIVED); + let code = 1005; + let reason = ""; + const result = this.#parser?.closingInfo; + if (result && !result.error) { + code = result.code ?? 1005; + reason = result.reason; + } + this.#handler.readyState = states.CLOSED; + if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { + code = 1006; + fireEvent("error", this, (type2, init2) => new ErrorEvent(type2, init2), { + error: new TypeError(reason) + }); + } + fireEvent("close", this, (type2, init2) => new CloseEvent(type2, init2), { + wasClean, + code, + reason + }); + if (channels.close.hasSubscribers) { + channels.close.publish({ + websocket: this, + code, + reason + }); + } + } + /** + * @param {WebSocket} ws + * @param {Buffer|undefined} buffer + */ + static ping(ws2, buffer) { + if (Buffer.isBuffer(buffer)) { + if (buffer.length > 125) { + throw new TypeError("A PING frame cannot have a body larger than 125 bytes."); + } + } else if (buffer !== void 0) { + throw new TypeError("Expected buffer payload"); + } + const readyState = ws2.#handler.readyState; + if (isEstablished(readyState) && !isClosing(readyState) && !isClosed(readyState)) { + const frame = new WebsocketFrameSend(buffer); + ws2.#handler.socket.write(frame.createFrame(opcodes.PING)); + } + } + }; + var { ping } = WebSocket; + Reflect.deleteProperty(WebSocket, "ping"); + 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(V3, prefix, argument) { + if (webidl.util.Type(V3) === webidl.util.Types.OBJECT && Symbol.iterator in V3) { + return webidl.converters["sequence"](V3); + } + return webidl.converters.DOMString(V3, prefix, argument); + }; + webidl.converters.WebSocketInit = webidl.dictionaryConverter([ + { + key: "protocols", + converter: webidl.converters["DOMString or sequence"], + defaultValue: () => [] + }, + { + key: "dispatcher", + converter: webidl.converters.any, + defaultValue: () => getGlobalDispatcher() + }, + { + key: "headers", + converter: webidl.nullableConverter(webidl.converters.HeadersInit) + } + ]); + webidl.converters["DOMString or sequence or WebSocketInit"] = function(V3) { + if (webidl.util.Type(V3) === webidl.util.Types.OBJECT && !(Symbol.iterator in V3)) { + return webidl.converters.WebSocketInit(V3); + } + return { protocols: webidl.converters["DOMString or sequence"](V3) }; + }; + webidl.converters.WebSocketSendData = function(V3) { + if (webidl.util.Type(V3) === webidl.util.Types.OBJECT) { + if (webidl.is.Blob(V3)) { + return V3; + } + if (webidl.is.BufferSource(V3)) { + return V3; + } + } + return webidl.converters.USVString(V3); + }; + module3.exports = { + WebSocket, + ping + }; + } +}); -"use strict"; +// node_modules/undici/lib/web/websocket/stream/websocketerror.js +var require_websocketerror = __commonJS({ + "node_modules/undici/lib/web/websocket/stream/websocketerror.js"(exports, module3) { + "use strict"; + var { webidl } = require_webidl(); + var { validateCloseCodeAndReason } = require_util5(); + var { kConstruct } = require_symbols(); + var { kEnumerableProperty } = require_util(); + function createInheritableDOMException() { + class Test extends DOMException { + get reason() { + return ""; + } + } + if (new Test().reason !== void 0) { + return DOMException; + } + return new Proxy(DOMException, { + construct(target, args, newTarget) { + const instance = Reflect.construct(target, args, target); + Object.setPrototypeOf(instance, newTarget.prototype); + return instance; + } + }); + } + var WebSocketError = class _WebSocketError extends createInheritableDOMException() { + #closeCode; + #reason; + constructor(message = "", init2 = void 0) { + message = webidl.converters.DOMString(message, "WebSocketError", "message"); + super(message, "WebSocketError"); + if (init2 === kConstruct) { + return; + } else if (init2 !== null) { + init2 = webidl.converters.WebSocketCloseInfo(init2); + } + let code = init2.closeCode ?? null; + const reason = init2.reason ?? ""; + validateCloseCodeAndReason(code, reason); + if (reason.length !== 0 && code === null) { + code = 1e3; + } + this.#closeCode = code; + this.#reason = reason; + } + get closeCode() { + return this.#closeCode; + } + get reason() { + return this.#reason; + } + /** + * @param {string} message + * @param {number|null} code + * @param {string} reason + */ + static createUnvalidatedWebSocketError(message, code, reason) { + const error2 = new _WebSocketError(message, kConstruct); + error2.#closeCode = code; + error2.#reason = reason; + return error2; + } + }; + var { createUnvalidatedWebSocketError } = WebSocketError; + delete WebSocketError.createUnvalidatedWebSocketError; + Object.defineProperties(WebSocketError.prototype, { + closeCode: kEnumerableProperty, + reason: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "WebSocketError", + writable: false, + enumerable: false, + configurable: true + } + }); + webidl.is.WebSocketError = webidl.util.MakeTypeAssertion(WebSocketError); + module3.exports = { WebSocketError, createUnvalidatedWebSocketError }; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.feedbackConfigSchema = exports.optionalEmailSettings = exports.reasonsSettings = void 0; -const reasonsBaseProperties = { - hide: { - type: 'boolean', - default: false, - }, - component: { - type: 'string', - enum: ['radio', 'checkbox'], - default: 'checkbox', - }, - label: { type: 'string' }, - items: { type: 'array', items: { type: 'string' } }, -}; -exports.reasonsSettings = { - type: 'object', - properties: reasonsBaseProperties, - additionalProperties: false, -}; -exports.optionalEmailSettings = { - type: 'object', - properties: { - hide: { - type: 'boolean', - default: false, +// node_modules/undici/lib/web/websocket/stream/websocketstream.js +var require_websocketstream = __commonJS({ + "node_modules/undici/lib/web/websocket/stream/websocketstream.js"(exports, module3) { + "use strict"; + var { createDeferredPromise } = require_promise(); + var { environmentSettingsObject } = require_util2(); + var { states, opcodes, sentCloseFrameState } = require_constants5(); + var { webidl } = require_webidl(); + var { getURLRecord, isValidSubprotocol, isEstablished, utf8Decode } = require_util5(); + var { establishWebSocketConnection, failWebsocketConnection, closeWebSocketConnection } = require_connection(); + var { channels } = require_diagnostics(); + var { WebsocketFrameSend } = require_frame(); + var { ByteParser } = require_receiver(); + var { WebSocketError, createUnvalidatedWebSocketError } = require_websocketerror(); + var { kEnumerableProperty } = require_util(); + var { utf8DecodeBytes } = require_encoding(); + var emittedExperimentalWarning = false; + var WebSocketStream = class { + // Each WebSocketStream object has an associated url , which is a URL record . + /** @type {URL} */ + #url; + // Each WebSocketStream object has an associated opened promise , which is a promise. + /** @type {import('../../../util/promise').DeferredPromise} */ + #openedPromise; + // Each WebSocketStream object has an associated closed promise , which is a promise. + /** @type {import('../../../util/promise').DeferredPromise} */ + #closedPromise; + // Each WebSocketStream object has an associated readable stream , which is a ReadableStream . + /** @type {ReadableStream} */ + #readableStream; + /** @type {ReadableStreamDefaultController} */ + #readableStreamController; + // Each WebSocketStream object has an associated writable stream , which is a WritableStream . + /** @type {WritableStream} */ + #writableStream; + // Each WebSocketStream object has an associated boolean handshake aborted , which is initially false. + #handshakeAborted = false; + /** @type {import('../websocket').Handler} */ + #handler = { + // https://whatpr.org/websockets/48/7b748d3...d5570f3.html#feedback-to-websocket-stream-from-the-protocol + onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions), + onMessage: (opcode, data) => this.#onMessage(opcode, data), + onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message), + onParserDrain: () => this.#handler.socket.resume(), + onSocketData: (chunk) => { + if (!this.#parser.write(chunk)) { + this.#handler.socket.pause(); + } }, - label: { type: 'string' }, - placeholder: { type: 'string' }, - }, - additionalProperties: false, -}; -exports.feedbackConfigSchema = { - type: 'object', - properties: { - hide: { - type: 'boolean', - default: false, + onSocketError: (err) => { + this.#handler.readyState = states.CLOSING; + if (channels.socketError.hasSubscribers) { + channels.socketError.publish(err); + } + this.#handler.socket.destroy(); }, - type: { - type: 'string', - enum: ['rating', 'sentiment', 'comment', 'reasons', 'mood', 'scale'], - default: 'sentiment', + onSocketClose: () => this.#onSocketClose(), + onPing: () => { }, - settings: { - type: 'object', - properties: { - label: { type: 'string' }, - submitText: { type: 'string' }, - buttonText: { type: 'string' }, - component: { - type: 'string', - enum: ['radio', 'checkbox'], - default: 'checkbox', - }, - items: { type: 'array', items: { type: 'string' }, minItems: 1 }, - leftScaleLabel: { type: 'string' }, - rightScaleLabel: { type: 'string' }, - reasons: { - type: 'object', - properties: Object.assign(Object.assign({}, reasonsBaseProperties), { like: exports.reasonsSettings, dislike: exports.reasonsSettings, satisfied: exports.reasonsSettings, neutral: exports.reasonsSettings, dissatisfied: exports.reasonsSettings }), - additionalProperties: false, - }, - comment: { - type: 'object', - properties: { - hide: { - type: 'boolean', - default: false, - }, - label: { type: 'string' }, - likeLabel: { type: 'string' }, - dislikeLabel: { type: 'string' }, - satisfiedLabel: { type: 'string' }, - neutralLabel: { type: 'string' }, - dissatisfiedLabel: { type: 'string' }, - }, - additionalProperties: false, - }, - optionalEmail: exports.optionalEmailSettings, - }, - additionalProperties: false, + onPong: () => { }, - }, - additionalProperties: false, -}; -//# sourceMappingURL=feedback-config-schema.js.map - -/***/ }), - -/***/ 29575: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + readyState: states.CONNECTING, + socket: null, + closeState: /* @__PURE__ */ new Set(), + controller: null, + wasEverConnected: false + }; + /** @type {import('../receiver').ByteParser} */ + #parser; + constructor(url3, options2 = void 0) { + if (!emittedExperimentalWarning) { + process.emitWarning("WebSocketStream is experimental! Expect it to change at any time.", { + code: "UNDICI-WSS" + }); + emittedExperimentalWarning = true; + } + webidl.argumentLengthCheck(arguments, 1, "WebSocket"); + url3 = webidl.converters.USVString(url3); + if (options2 !== null) { + options2 = webidl.converters.WebSocketStreamOptions(options2); + } + const baseURL = environmentSettingsObject.settingsObject.baseUrl; + const urlRecord = getURLRecord(url3, baseURL); + const protocols = options2.protocols; + if (protocols.length !== new Set(protocols.map((p2) => p2.toLowerCase())).size) { + throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + } + if (protocols.length > 0 && !protocols.every((p2) => isValidSubprotocol(p2))) { + throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + } + this.#url = urlRecord.toString(); + this.#openedPromise = createDeferredPromise(); + this.#closedPromise = createDeferredPromise(); + if (options2.signal != null) { + const signal = options2.signal; + if (signal.aborted) { + this.#openedPromise.reject(signal.reason); + this.#closedPromise.reject(signal.reason); + return; + } + signal.addEventListener("abort", () => { + if (!isEstablished(this.#handler.readyState)) { + failWebsocketConnection(this.#handler); + this.#handler.readyState = states.CLOSING; + this.#openedPromise.reject(signal.reason); + this.#closedPromise.reject(signal.reason); + this.#handshakeAborted = true; + } + }, { once: true }); + } + const client = environmentSettingsObject.settingsObject; + this.#handler.controller = establishWebSocketConnection( + urlRecord, + protocols, + client, + this.#handler, + options2 + ); + } + // The url getter steps are to return this 's url , serialized . + get url() { + return this.#url.toString(); + } + // The opened getter steps are to return this 's opened promise . + get opened() { + return this.#openedPromise.promise; + } + // The closed getter steps are to return this 's closed promise . + get closed() { + return this.#closedPromise.promise; + } + // The close( closeInfo ) method steps are: + close(closeInfo = void 0) { + if (closeInfo !== null) { + closeInfo = webidl.converters.WebSocketCloseInfo(closeInfo); + } + const code = closeInfo.closeCode ?? null; + const reason = closeInfo.reason; + closeWebSocketConnection(this.#handler, code, reason, true); + } + #write(chunk) { + chunk = webidl.converters.WebSocketStreamWrite(chunk); + const promise = createDeferredPromise(); + let data = null; + let opcode = null; + if (webidl.is.BufferSource(chunk)) { + data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk.slice()); + opcode = opcodes.BINARY; + } else { + let string; + try { + string = webidl.converters.DOMString(chunk); + } catch (e2) { + promise.reject(e2); + return promise.promise; + } + data = new TextEncoder().encode(string); + opcode = opcodes.TEXT; + } + if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { + const frame = new WebsocketFrameSend(data); + this.#handler.socket.write(frame.createFrame(opcode), () => { + promise.resolve(void 0); + }); + } + return promise.promise; + } + /** @type {import('../websocket').Handler['onConnectionEstablished']} */ + #onConnectionEstablished(response, parsedExtensions) { + this.#handler.socket = response.socket; + const parser = new ByteParser(this.#handler, parsedExtensions); + parser.on("drain", () => this.#handler.onParserDrain()); + parser.on("error", (err) => this.#handler.onParserError(err)); + this.#parser = parser; + this.#handler.readyState = states.OPEN; + const extensions = parsedExtensions ?? ""; + const protocol = response.headersList.get("sec-websocket-protocol") ?? ""; + const readable = new ReadableStream({ + start: (controller) => { + this.#readableStreamController = controller; + }, + pull(controller) { + let chunk; + while (controller.desiredSize > 0 && (chunk = response.socket.read()) !== null) { + controller.enqueue(chunk); + } + }, + cancel: (reason) => this.#cancel(reason) + }); + const writable = new WritableStream({ + write: (chunk) => this.#write(chunk), + close: () => closeWebSocketConnection(this.#handler, null, null), + abort: (reason) => this.#closeUsingReason(reason) + }); + this.#readableStream = readable; + this.#writableStream = writable; + this.#openedPromise.resolve({ + extensions, + protocol, + readable, + writable + }); + } + /** @type {import('../websocket').Handler['onMessage']} */ + #onMessage(type2, data) { + if (this.#handler.readyState !== states.OPEN) { + return; + } + let chunk; + if (type2 === opcodes.TEXT) { + try { + chunk = utf8Decode(data); + } catch { + failWebsocketConnection(this.#handler, "Received invalid UTF-8 in text frame."); + return; + } + } else if (type2 === opcodes.BINARY) { + chunk = new Uint8Array(data.buffer, data.byteOffset, data.byteLength); + } + this.#readableStreamController.enqueue(chunk); + } + /** @type {import('../websocket').Handler['onSocketClose']} */ + #onSocketClose() { + const wasClean = this.#handler.closeState.has(sentCloseFrameState.SENT) && this.#handler.closeState.has(sentCloseFrameState.RECEIVED); + this.#handler.readyState = states.CLOSED; + if (this.#handshakeAborted) { + return; + } + if (!this.#handler.wasEverConnected) { + this.#openedPromise.reject(new WebSocketError("Socket never opened")); + } + const result = this.#parser?.closingInfo; + let code = result?.code ?? 1005; + if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { + code = 1006; + } + const reason = result?.reason == null ? "" : utf8DecodeBytes(Buffer.from(result.reason)); + if (wasClean) { + this.#readableStreamController.close(); + if (!this.#writableStream.locked) { + this.#writableStream.abort(new DOMException("A closed WebSocketStream cannot be written to", "InvalidStateError")); + } + this.#closedPromise.resolve({ + closeCode: code, + reason + }); + } else { + const error2 = createUnvalidatedWebSocketError("unclean close", code, reason); + this.#readableStreamController?.error(error2); + this.#writableStream?.abort(error2); + this.#closedPromise.reject(error2); + } + } + #closeUsingReason(reason) { + let code = null; + let reasonString = ""; + if (webidl.is.WebSocketError(reason)) { + code = reason.closeCode; + reasonString = reason.reason; + } + closeWebSocketConnection(this.#handler, code, reasonString); + } + // To cancel a WebSocketStream stream given reason , close using reason giving stream and reason . + #cancel(reason) { + this.#closeUsingReason(reason); + } + }; + Object.defineProperties(WebSocketStream.prototype, { + url: kEnumerableProperty, + opened: kEnumerableProperty, + closed: kEnumerableProperty, + close: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "WebSocketStream", + writable: false, + enumerable: false, + configurable: true + } + }); + webidl.converters.WebSocketStreamOptions = webidl.dictionaryConverter([ + { + key: "protocols", + converter: webidl.sequenceConverter(webidl.converters.USVString), + defaultValue: () => [] + }, + { + key: "signal", + converter: webidl.nullableConverter(webidl.converters.AbortSignal), + defaultValue: () => null + } + ]); + webidl.converters.WebSocketCloseInfo = webidl.dictionaryConverter([ + { + key: "closeCode", + converter: (V3) => webidl.converters["unsigned short"](V3, webidl.attributes.EnforceRange) + }, + { + key: "reason", + converter: webidl.converters.USVString, + defaultValue: () => "" + } + ]); + webidl.converters.WebSocketStreamWrite = function(V3) { + if (typeof V3 === "string") { + return webidl.converters.USVString(V3); + } + return webidl.converters.BufferSource(V3); + }; + module3.exports = { WebSocketStream }; + } +}); -"use strict"; +// node_modules/undici/lib/web/eventsource/util.js +var require_util6 = __commonJS({ + "node_modules/undici/lib/web/eventsource/util.js"(exports, module3) { + "use strict"; + function isValidLastEventId(value) { + return value.indexOf("\0") === -1; + } + function isASCIINumber(value) { + if (value.length === 0) return false; + for (let i2 = 0; i2 < value.length; i2++) { + if (value.charCodeAt(i2) < 48 || value.charCodeAt(i2) > 57) return false; + } + return true; + } + module3.exports = { + isValidLastEventId, + isASCIINumber + }; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.graphqlConfigSchema = void 0; -const feedback_config_schema_1 = __nccwpck_require__(88462); -const typeGroupConfig = { - type: 'object', - properties: { - includeByName: { - type: 'array', - items: { - type: 'string', - }, - }, - excludeByName: { - type: 'array', - items: { - type: 'string', - }, - }, - }, - additionalProperties: false, -}; -const menuGroupConfig = { - type: 'object', - properties: { - name: { - type: 'string', - }, - items: typeGroupConfig, - queries: typeGroupConfig, - mutations: typeGroupConfig, - subscriptions: typeGroupConfig, - types: typeGroupConfig, - directives: typeGroupConfig, - }, - required: ['name'], - additionalProperties: false, -}; -const menuGroupingConfig = { - type: 'object', - properties: { - requireExactGroups: { - type: 'boolean', - }, - groups: { - type: 'array', - items: menuGroupConfig, - }, - otherItemsGroupName: { - type: 'string', - }, - }, - required: ['requireExactGroups', 'groups', 'otherItemsGroupName'], - additionalProperties: false, -}; -exports.graphqlConfigSchema = { - type: 'object', - properties: { - hidePaginationButtons: { - type: 'boolean', - }, - menu: { - type: 'object', - properties: Object.assign({}, menuGroupingConfig.properties), - additionalProperties: false, - }, - sidebar: { - type: 'object', - properties: { - hide: { - type: 'boolean', - }, - }, - }, - apiLogo: { - type: 'object', - properties: { - imageUrl: { - type: 'string', - }, - href: { - type: 'string', - }, - altText: { - type: 'string', - }, - backgroundColor: { - type: 'string', - }, - }, - }, - jsonSamplesDepth: { - type: 'number', - }, - samplesMaxInlineArgs: { - type: 'number', - }, - licenseKey: { - type: 'string', - }, - fieldExpandLevel: { - type: 'number', - }, - baseUrlPath: { - type: 'string', - }, - feedback: feedback_config_schema_1.feedbackConfigSchema, - }, - additionalProperties: false, -}; -//# sourceMappingURL=graphql-config-schema.js.map - -/***/ }), - -/***/ 20223: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +// node_modules/undici/lib/web/eventsource/eventsource-stream.js +var require_eventsource_stream = __commonJS({ + "node_modules/undici/lib/web/eventsource/eventsource-stream.js"(exports, module3) { + "use strict"; + var { Transform } = __require("node:stream"); + var { isASCIINumber, isValidLastEventId } = require_util6(); + var BOM = [239, 187, 191]; + var LF = 10; + var CR = 13; + var COLON = 58; + var SPACE = 32; + var EventSourceStream = class extends Transform { + /** + * @type {eventSourceSettings} + */ + state; + /** + * Leading byte-order-mark check. + * @type {boolean} + */ + checkBOM = true; + /** + * @type {boolean} + */ + crlfCheck = false; + /** + * @type {boolean} + */ + eventEndCheck = false; + /** + * @type {Buffer|null} + */ + buffer = null; + pos = 0; + event = { + data: void 0, + event: void 0, + id: void 0, + retry: void 0 + }; + /** + * @param {object} options + * @param {boolean} [options.readableObjectMode] + * @param {eventSourceSettings} [options.eventSourceSettings] + * @param {(chunk: any, encoding?: BufferEncoding | undefined) => boolean} [options.push] + */ + constructor(options2 = {}) { + options2.readableObjectMode = true; + super(options2); + this.state = options2.eventSourceSettings || {}; + if (options2.push) { + this.push = options2.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 !== void 0 || 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 {EventSourceStreamEvent} 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] += ` +${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 !== void 0 && 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 + }; + } + }; + module3.exports = { + EventSourceStream + }; + } +}); -"use strict"; +// node_modules/undici/lib/web/eventsource/eventsource.js +var require_eventsource = __commonJS({ + "node_modules/undici/lib/web/eventsource/eventsource.js"(exports, module3) { + "use strict"; + var { pipeline } = __require("node:stream"); + var { fetching } = require_fetch(); + var { makeRequest } = require_request2(); + var { webidl } = require_webidl(); + var { EventSourceStream } = require_eventsource_stream(); + var { parseMIMEType } = require_data_url(); + var { createFastMessageEvent } = require_events(); + var { isNetworkError } = require_response(); + var { kEnumerableProperty } = require_util(); + var { environmentSettingsObject } = require_util2(); + var experimentalWarned = false; + var defaultReconnectionTime = 3e3; + var CONNECTING = 0; + var OPEN = 1; + var CLOSED = 2; + var ANONYMOUS = "anonymous"; + var USE_CREDENTIALS = "use-credentials"; + var EventSource = class _EventSource extends EventTarget { + #events = { + open: null, + error: null, + message: null + }; + #url; + #withCredentials = false; + /** + * @type {ReadyState} + */ + #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(url3, 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" + }); + } + url3 = webidl.converters.USVString(url3); + eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, "eventSourceInitDict"); + this.#dispatcher = eventSourceInitDict.node.dispatcher || eventSourceInitDict.dispatcher; + this.#state = { + lastEventId: "", + reconnectionTime: eventSourceInitDict.node.reconnectionTime + }; + const settings = environmentSettingsObject; + let urlRecord; + try { + urlRecord = new URL(url3, settings.settingsObject.baseUrl); + this.#state.origin = urlRecord.origin; + } catch (e2) { + throw new DOMException(e2, "SyntaxError"); + } + this.#url = urlRecord.href; + let corsAttributeState = ANONYMOUS; + if (eventSourceInitDict.withCredentials === true) { + corsAttributeState = USE_CREDENTIALS; + this.#withCredentials = true; + } + 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" + }; + 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 {ReadyState} + * @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)) { + return 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, + (error2) => { + if (error2?.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 {void} + */ + #reconnect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + this.dispatchEvent(new Event("error")); + setTimeout(() => { + if (this.#readyState !== CONNECTING) return; + if (this.#state.lastEventId.length) { + this.#request.headersList.set("last-event-id", this.#state.lastEventId, true); + } + this.#connect(); + }, this.#state.reconnectionTime)?.unref(); + } + /** + * 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); + } + const listener = webidl.converters.EventHandlerNonNull(fn); + if (listener !== null) { + this.addEventListener("open", listener); + this.#events.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); + } + const listener = webidl.converters.EventHandlerNonNull(fn); + if (listener !== null) { + this.addEventListener("message", listener); + this.#events.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); + } + const listener = webidl.converters.EventHandlerNonNull(fn); + if (listener !== null) { + this.addEventListener("error", listener); + this.#events.error = fn; + } else { + this.#events.error = null; + } + } + }; + var 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 + }, + { + key: "node", + // undici only + converter: webidl.dictionaryConverter([ + { + key: "reconnectionTime", + converter: webidl.converters["unsigned long"], + defaultValue: () => defaultReconnectionTime + }, + { + key: "dispatcher", + converter: webidl.converters.any + } + ]), + defaultValue: () => ({}) + } + ]); + module3.exports = { + EventSource, + defaultReconnectionTime + }; + } +}); -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]; } }; +// node_modules/undici/index.js +var require_undici = __commonJS({ + "node_modules/undici/index.js"(exports, module3) { + "use strict"; + var Client = require_client(); + var Dispatcher = require_dispatcher(); + var Pool = require_pool(); + var BalancedPool = require_balanced_pool(); + var RoundRobinPool = require_round_robin_pool(); + var Agent2 = require_agent(); + var ProxyAgent2 = require_proxy_agent(); + var Socks5ProxyAgent = require_socks5_proxy_agent(); + var EnvHttpProxyAgent = require_env_http_proxy_agent(); + var RetryAgent = require_retry_agent(); + var H2CClient = require_h2c_client(); + var errors = require_errors(); + var util = require_util(); + var { InvalidArgumentError } = errors; + var api = require_api(); + var buildConnector = require_connect(); + var MockClient = require_mock_client(); + var { MockCallHistory, MockCallHistoryLog } = require_mock_call_history(); + var MockAgent = require_mock_agent(); + var MockPool = require_mock_pool(); + var SnapshotAgent = require_snapshot_agent(); + var mockErrors = require_mock_errors(); + var RetryHandler = require_retry_handler(); + var { getGlobalDispatcher, setGlobalDispatcher } = require_global2(); + var DecoratorHandler = require_decorator_handler(); + var RedirectHandler = require_redirect_handler(); + Object.assign(Dispatcher.prototype, api); + module3.exports.Dispatcher = Dispatcher; + module3.exports.Client = Client; + module3.exports.Pool = Pool; + module3.exports.BalancedPool = BalancedPool; + module3.exports.RoundRobinPool = RoundRobinPool; + module3.exports.Agent = Agent2; + module3.exports.ProxyAgent = ProxyAgent2; + module3.exports.Socks5ProxyAgent = Socks5ProxyAgent; + module3.exports.EnvHttpProxyAgent = EnvHttpProxyAgent; + module3.exports.RetryAgent = RetryAgent; + module3.exports.H2CClient = H2CClient; + module3.exports.RetryHandler = RetryHandler; + module3.exports.DecoratorHandler = DecoratorHandler; + module3.exports.RedirectHandler = RedirectHandler; + module3.exports.interceptors = { + redirect: require_redirect(), + responseError: require_response_error(), + retry: require_retry(), + dump: require_dump(), + dns: require_dns(), + cache: require_cache2(), + decompress: require_decompress(), + deduplicate: require_deduplicate() + }; + module3.exports.cacheStores = { + MemoryCacheStore: require_memory_cache_store() + }; + var SqliteCacheStore = require_sqlite_cache_store(); + module3.exports.cacheStores.SqliteCacheStore = SqliteCacheStore; + module3.exports.buildConnector = buildConnector; + module3.exports.errors = errors; + module3.exports.util = { + parseHeaders: util.parseHeaders, + headerNameToString: util.headerNameToString + }; + function makeDispatcher(fn) { + return (url3, opts, handler) => { + if (typeof opts === "function") { + handler = opts; + opts = null; + } + if (!url3 || typeof url3 !== "string" && typeof url3 !== "object" && !(url3 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 path13 = opts.path; + if (!opts.path.startsWith("/")) { + path13 = `/${path13}`; + } + url3 = new URL(util.parseOrigin(url3).origin + path13); + } else { + if (!opts) { + opts = typeof url3 === "object" ? url3 : {}; + } + url3 = util.parseURL(url3); + } + const { agent, dispatcher = getGlobalDispatcher() } = opts; + if (agent) { + throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); + } + return fn.call(dispatcher, { + ...opts, + origin: url3.origin, + path: url3.search ? `${url3.pathname}${url3.search}` : url3.pathname, + method: opts.method || (opts.body ? "PUT" : "GET") + }, handler); + }; + } + module3.exports.setGlobalDispatcher = setGlobalDispatcher; + module3.exports.getGlobalDispatcher = getGlobalDispatcher; + var fetchImpl = require_fetch().fetch; + var currentFilename = typeof __filename !== "undefined" ? __filename : void 0; + function appendFetchStackTrace(err, filename) { + if (!err || typeof err !== "object") { + return; + } + const stack = typeof err.stack === "string" ? err.stack : ""; + const normalizedFilename = filename.replace(/\\/g, "/"); + if (stack && (stack.includes(filename) || stack.includes(normalizedFilename))) { + return; + } + const capture = {}; + Error.captureStackTrace(capture, appendFetchStackTrace); + if (!capture.stack) { + return; + } + const captureLines = capture.stack.split("\n").slice(1).join("\n"); + err.stack = stack ? `${stack} +${captureLines}` : capture.stack; } - 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 })); -exports.REDOCLY_ROUTE_RBAC = exports.REDOCLY_TEAMS_RBAC = exports.LayoutVariant = exports.DEFAULT_TEAM_CLAIM_NAME = exports.AuthProviderType = exports.ApigeeDevOnboardingIntegrationAuthType = exports.redocConfigSchema = exports.rootRedoclyConfigSchema = exports.rbacConfigSchema = exports.productConfigOverrideSchema = exports.productThemeOverrideSchema = void 0; -var product_override_schema_1 = __nccwpck_require__(16551); -Object.defineProperty(exports, "productThemeOverrideSchema", ({ enumerable: true, get: function () { return product_override_schema_1.productThemeOverrideSchema; } })); -Object.defineProperty(exports, "productConfigOverrideSchema", ({ enumerable: true, get: function () { return product_override_schema_1.productConfigOverrideSchema; } })); -var root_config_schema_1 = __nccwpck_require__(63375); -Object.defineProperty(exports, "rbacConfigSchema", ({ enumerable: true, get: function () { return root_config_schema_1.rbacConfigSchema; } })); -Object.defineProperty(exports, "rootRedoclyConfigSchema", ({ enumerable: true, get: function () { return root_config_schema_1.rootRedoclyConfigSchema; } })); -var redoc_config_schema_1 = __nccwpck_require__(54043); -Object.defineProperty(exports, "redocConfigSchema", ({ enumerable: true, get: function () { return redoc_config_schema_1.redocConfigSchema; } })); -__exportStar(__nccwpck_require__(71058), exports); -var constants_1 = __nccwpck_require__(71643); -Object.defineProperty(exports, "ApigeeDevOnboardingIntegrationAuthType", ({ enumerable: true, get: function () { return constants_1.ApigeeDevOnboardingIntegrationAuthType; } })); -Object.defineProperty(exports, "AuthProviderType", ({ enumerable: true, get: function () { return constants_1.AuthProviderType; } })); -Object.defineProperty(exports, "DEFAULT_TEAM_CLAIM_NAME", ({ enumerable: true, get: function () { return constants_1.DEFAULT_TEAM_CLAIM_NAME; } })); -Object.defineProperty(exports, "LayoutVariant", ({ enumerable: true, get: function () { return constants_1.LayoutVariant; } })); -Object.defineProperty(exports, "REDOCLY_TEAMS_RBAC", ({ enumerable: true, get: function () { return constants_1.REDOCLY_TEAMS_RBAC; } })); -Object.defineProperty(exports, "REDOCLY_ROUTE_RBAC", ({ enumerable: true, get: function () { return constants_1.REDOCLY_ROUTE_RBAC; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 16551: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.productConfigOverrideSchema = exports.productThemeOverrideSchema = void 0; -const default_theme_config_schema_1 = __nccwpck_require__(66656); -const ex_theme_config_schemas_1 = __nccwpck_require__(11031); -const root_config_schema_1 = __nccwpck_require__(63375); -exports.productThemeOverrideSchema = { - type: 'object', - properties: { - logo: default_theme_config_schema_1.themeConfigSchema.properties.logo, - navbar: default_theme_config_schema_1.themeConfigSchema.properties.navbar, - footer: default_theme_config_schema_1.themeConfigSchema.properties.footer, - sidebar: default_theme_config_schema_1.themeConfigSchema.properties.sidebar, - search: default_theme_config_schema_1.themeConfigSchema.properties.search, - codeSnippet: default_theme_config_schema_1.themeConfigSchema.properties.codeSnippet, - breadcrumbs: default_theme_config_schema_1.themeConfigSchema.properties.breadcrumbs, - openapi: default_theme_config_schema_1.themeConfigSchema.properties.openapi, - feedback: default_theme_config_schema_1.themeConfigSchema.properties.feedback, - analytics: { - type: 'object', - properties: { - ga: ex_theme_config_schemas_1.productGoogleAnalyticsConfigSchema, - }, - }, - }, - additionalProperties: true, - default: {}, -}; -exports.productConfigOverrideSchema = { - $id: 'product-config-override', - type: 'object', - properties: Object.assign(Object.assign({}, exports.productThemeOverrideSchema.properties), { apis: { - type: 'object', - additionalProperties: root_config_schema_1.apiConfigSchema, - }, - /** - * @deprecated left for backwards compatibility - */ - theme: exports.productThemeOverrideSchema }), - additionalProperties: false, -}; -//# sourceMappingURL=product-override-schema.js.map - -/***/ }), - -/***/ 54043: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.redocConfigSchema = void 0; -const feedback_config_schema_1 = __nccwpck_require__(88462); -const codeSamplesConfigSchema = { - type: 'object', - properties: { - languages: { - type: 'array', - items: { - type: 'object', - properties: { - lang: { - type: 'string', - enum: [ - 'curl', - 'JavaScript', - 'Node.js', - 'Python', - 'Java8+Apache', - 'Java', - 'C#', - 'C#+Newtonsoft', - 'PHP', - 'Go', - 'Ruby', - 'R', - 'Payload', - ], - }, - label: { type: 'string' }, - options: { - type: 'object', - properties: { - indent: { type: 'string' }, - withImports: { type: 'boolean' }, - withComments: { type: 'boolean' }, - binary: { type: 'boolean' }, - credentials: { - type: 'string', - enum: ['omit', 'same-origin', 'include'], - }, - }, - additionalProperties: false, - }, - }, - required: ['lang'], - additionalProperties: false, - }, - }, - skipOptionalParameters: { type: 'boolean' }, - withOAuth2Call: { type: 'boolean' }, - }, - required: ['languages'], - additionalProperties: false, -}; -const downloadUrlsSchema = { - type: 'array', - items: { - type: 'object', - properties: { - title: { type: 'string' }, - url: { type: 'string' }, - }, - required: ['url'], - additionalProperties: false, - }, -}; -exports.redocConfigSchema = { - type: 'object', - properties: { - licenseKey: { type: 'string' }, - hideLoading: { type: 'boolean' }, - disableRouter: { type: 'boolean' }, - hideSidebar: { type: 'boolean' }, - feedback: feedback_config_schema_1.feedbackConfigSchema, - hideReplay: { type: 'boolean' }, - oAuth2RedirectURI: { type: 'string', nullable: true }, - corsProxyUrl: { type: 'string' }, - sortRequiredPropsFirst: { type: 'boolean' }, - sanitize: { type: 'boolean' }, - hideDownloadButtons: { type: 'boolean' }, - downloadUrls: downloadUrlsSchema, - onlyRequiredInSamples: { type: 'boolean' }, - generatedSamplesMaxDepth: { oneOf: [{ type: 'number' }, { type: 'string' }] }, - showExtensions: { - oneOf: [ - { type: 'boolean' }, - { type: 'string' }, - { type: 'array', items: { type: 'string' } }, - ], - }, - hideSchemaTitles: { type: 'boolean' }, - jsonSamplesExpandLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] }, - schemasExpansionLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] }, - mockServer: { - type: 'object', - properties: { - url: { type: 'string' }, - position: { type: 'string', enum: ['first', 'last', 'replace', 'off'] }, - description: { type: 'string' }, - }, - }, - maxDisplayedEnumValues: { type: 'number' }, - schemaDefinitionsTagName: { type: 'string' }, - layout: { type: 'string', enum: ['stacked', 'three-panel'] }, - hideInfoMetadata: { type: 'boolean' }, - events: { type: 'object' }, - skipBundle: { type: 'boolean' }, - routingBasePath: { type: 'string' }, - codeSamples: codeSamplesConfigSchema, - ignoreNamedSchemas: { - oneOf: [{ type: 'array', items: { type: 'string' } }, { type: 'string' }], - }, - hidePropertiesPrefix: { type: 'boolean' }, - excludeFromSearch: { type: 'boolean' }, - }, - additionalProperties: false, -}; -//# sourceMappingURL=redoc-config-schema.js.map - -/***/ }), - -/***/ 99417: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; + module3.exports.fetch = function fetch2(init2, options2 = void 0) { + return fetchImpl(init2, options2).catch((err) => { + if (currentFilename) { + appendFetchStackTrace(err, currentFilename); + } else if (err && typeof err === "object") { + Error.captureStackTrace(err, module3.exports.fetch); + } + throw err; + }); + }; + module3.exports.Headers = require_headers().Headers; + module3.exports.Response = require_response().Response; + module3.exports.Request = require_request2().Request; + module3.exports.FormData = require_formdata().FormData; + var { setGlobalOrigin, getGlobalOrigin } = require_global(); + module3.exports.setGlobalOrigin = setGlobalOrigin; + module3.exports.getGlobalOrigin = getGlobalOrigin; + var { CacheStorage } = require_cachestorage(); + var { kConstruct } = require_symbols(); + module3.exports.caches = new CacheStorage(kConstruct); + var { deleteCookie, getCookies, getSetCookies, setCookie, parseCookie } = require_cookies(); + module3.exports.deleteCookie = deleteCookie; + module3.exports.getCookies = getCookies; + module3.exports.getSetCookies = getSetCookies; + module3.exports.setCookie = setCookie; + module3.exports.parseCookie = parseCookie; + var { parseMIMEType, serializeAMimeType } = require_data_url(); + module3.exports.parseMIMEType = parseMIMEType; + module3.exports.serializeAMimeType = serializeAMimeType; + var { CloseEvent, ErrorEvent, MessageEvent } = require_events(); + var { WebSocket, ping } = require_websocket(); + module3.exports.WebSocket = WebSocket; + module3.exports.CloseEvent = CloseEvent; + module3.exports.ErrorEvent = ErrorEvent; + module3.exports.MessageEvent = MessageEvent; + module3.exports.ping = ping; + module3.exports.WebSocketStream = require_websocketstream().WebSocketStream; + module3.exports.WebSocketError = require_websocketerror().WebSocketError; + module3.exports.request = makeDispatcher(api.request); + module3.exports.stream = makeDispatcher(api.stream); + module3.exports.pipeline = makeDispatcher(api.pipeline); + module3.exports.connect = makeDispatcher(api.connect); + module3.exports.upgrade = makeDispatcher(api.upgrade); + module3.exports.MockClient = MockClient; + module3.exports.MockCallHistory = MockCallHistory; + module3.exports.MockCallHistoryLog = MockCallHistoryLog; + module3.exports.MockPool = MockPool; + module3.exports.MockAgent = MockAgent; + module3.exports.SnapshotAgent = SnapshotAgent; + module3.exports.mockErrors = mockErrors; + var { EventSource } = require_eventsource(); + module3.exports.EventSource = EventSource; + function install() { + globalThis.fetch = module3.exports.fetch; + globalThis.Headers = module3.exports.Headers; + globalThis.Response = module3.exports.Response; + globalThis.Request = module3.exports.Request; + globalThis.FormData = module3.exports.FormData; + globalThis.WebSocket = module3.exports.WebSocket; + globalThis.CloseEvent = module3.exports.CloseEvent; + globalThis.ErrorEvent = module3.exports.ErrorEvent; + globalThis.MessageEvent = module3.exports.MessageEvent; + globalThis.EventSource = module3.exports.EventSource; + } + module3.exports.install = install; + } +}); -// Needed for supporting deprecated Reference Docs config options -// Transferred from https://github.com/Redocly/redocly-cli/blob/main/packages/core/src/types/redocly-yaml.ts -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.deprecatedRefDocsSchema = void 0; -const ConfigLanguage = { - type: 'object', - properties: { - label: { type: 'string' }, - lang: { - enum: [ - 'curl', - 'C#', - 'Go', - 'Java', - 'Java8+Apache', - 'JavaScript', - 'Node.js', - 'PHP', - 'Python', - 'R', - 'Ruby', - ], - }, - }, - required: ['lang'], -}; -const ConfigLabels = { - type: 'object', - properties: { - enum: { type: 'string' }, - enumSingleValue: { type: 'string' }, - enumArray: { type: 'string' }, - default: { type: 'string' }, - deprecated: { type: 'string' }, - example: { type: 'string' }, - examples: { type: 'string' }, - nullable: { type: 'string' }, - recursive: { type: 'string' }, - arrayOf: { type: 'string' }, - webhook: { type: 'string' }, - authorizations: { type: 'string' }, - tryItAuthBasicUsername: { type: 'string' }, - tryItAuthBasicPassword: { type: 'string' }, - }, -}; -const CommonConfigSidebarLinks = { - type: 'object', - properties: { - label: { type: 'string' }, - link: { type: 'string' }, - target: { type: 'string' }, - }, - required: ['label', 'link'], -}; -const ConfigSidebarLinks = { - type: 'object', - properties: { - beforeInfo: { type: 'array', items: CommonConfigSidebarLinks }, - end: { type: 'array', items: CommonConfigSidebarLinks }, - }, -}; -const CommonThemeColors = { - type: 'object', - properties: { - main: { type: 'string' }, - light: { type: 'string' }, - dark: { type: 'string' }, - contrastText: { type: 'string' }, - }, -}; -const CommonColorProps = { - type: 'object', - properties: { - backgroundColor: { type: 'string' }, - borderColor: { type: 'string' }, - color: { type: 'string' }, - tabTextColor: { type: 'string' }, - }, -}; -const BorderThemeColors = { - type: 'object', - properties: pickObjectProps(CommonThemeColors.properties, ['light', 'dark']), -}; -const HttpColors = { - type: 'object', - properties: { - basic: { type: 'string' }, - delete: { type: 'string' }, - get: { type: 'string' }, - head: { type: 'string' }, - link: { type: 'string' }, - options: { type: 'string' }, - patch: { type: 'string' }, - post: { type: 'string' }, - put: { type: 'string' }, - }, -}; -const ResponseColors = { - type: 'object', - properties: { - error: CommonColorProps, - info: CommonColorProps, - redirect: CommonColorProps, - success: CommonColorProps, - }, -}; -const SecondaryColors = { - type: 'object', - properties: omitObjectProps(CommonThemeColors.properties, ['dark']), -}; -const TextThemeColors = { - type: 'object', - properties: { - primary: { type: 'string' }, - secondary: { type: 'string' }, - light: { type: 'string' }, - }, -}; -const ThemeColors = { - type: 'object', - properties: { - accent: CommonThemeColors, - border: BorderThemeColors, - error: CommonThemeColors, - http: HttpColors, - primary: CommonThemeColors, - responses: ResponseColors, - secondary: SecondaryColors, - success: CommonThemeColors, - text: TextThemeColors, - tonalOffset: { type: 'number' }, - warning: CommonThemeColors, - }, -}; -const SizeProps = { - type: 'object', - properties: { - fontSize: { type: 'string' }, - padding: { type: 'string' }, - minWidth: { type: 'string' }, - }, -}; -const Sizes = { - type: 'object', - properties: { - small: SizeProps, - medium: SizeProps, - large: SizeProps, - xlarge: SizeProps, - }, -}; -const FontConfig = { - type: 'object', - properties: { - fontFamily: { type: 'string' }, - fontSize: { type: 'string' }, - fontWeight: { type: 'string' }, - lineHeight: { type: 'string' }, - }, -}; -const ButtonsConfig = { - type: 'object', - properties: Object.assign(Object.assign({}, omitObjectProps(FontConfig.properties, ['fontSize', 'lineHeight'])), { borderRadius: { type: 'string' }, hoverStyle: { type: 'string' }, boxShadow: { type: 'string' }, hoverBoxShadow: { type: 'string' }, sizes: Sizes }), -}; -const BadgeFontConfig = { - type: 'object', - properties: pickObjectProps(FontConfig.properties, ['fontSize', 'lineHeight']), -}; -const BadgeSizes = { - type: 'object', - properties: { - medium: BadgeFontConfig, - small: BadgeFontConfig, - }, -}; -const HttpBadgesConfig = { - type: 'object', - properties: Object.assign(Object.assign({}, omitObjectProps(FontConfig.properties, ['fontSize', 'lineHeight'])), { borderRadius: { type: 'string' }, color: { type: 'string' }, sizes: BadgeSizes }), -}; -const LabelControls = { - type: 'object', - properties: { - top: { type: 'string' }, - width: { type: 'string' }, - height: { type: 'string' }, - }, -}; -const Panels = { - type: 'object', - properties: { - borderRadius: { type: 'string' }, - backgroundColor: { type: 'string' }, - }, -}; -const TryItButton = { - type: 'object', - properties: { - fullWidth: { type: 'boolean' }, - }, -}; -const ConfigThemeComponents = { - type: 'object', - properties: { - buttons: ButtonsConfig, - httpBadges: HttpBadgesConfig, - layoutControls: LabelControls, - panels: Panels, - tryItButton: TryItButton, - tryItSendButton: TryItButton, - }, -}; -const Breakpoints = { - type: 'object', - properties: { - small: { type: 'string' }, - medium: { type: 'string' }, - large: { type: 'string' }, - }, -}; -const StackedConfig = { - type: 'object', - properties: { - maxWidth: Breakpoints, - }, -}; -const ThreePanelConfig = { - type: 'object', - properties: { - maxWidth: Breakpoints, - middlePanelMaxWidth: Breakpoints, - }, -}; -const Layout = { - type: 'object', - properties: { - showDarkRightPanel: { type: 'boolean' }, - stacked: StackedConfig, - 'three-panel': ThreePanelConfig, - }, -}; -const SchemaColorsConfig = { - type: 'object', - properties: { - backgroundColor: { type: 'string' }, - border: { type: 'string' }, - }, -}; -const ConfigThemeSchema = { - type: 'object', - properties: { - breakFieldNames: { type: 'boolean' }, - caretColor: { type: 'string' }, - caretSize: { type: 'string' }, - constraints: SchemaColorsConfig, - defaultDetailsWidth: { type: 'string' }, - examples: SchemaColorsConfig, - labelsTextSize: { type: 'string' }, - linesColor: { type: 'string' }, - nestedBackground: { type: 'string' }, - nestingSpacing: { type: 'string' }, - requireLabelColor: { type: 'string' }, - typeNameColor: { type: 'string' }, - typeTitleColor: { type: 'string' }, - }, -}; -const GroupItemsConfig = { - type: 'object', - properties: { - subItemsColor: { type: 'string' }, - textTransform: { type: 'string' }, - fontWeight: { type: 'string' }, - }, -}; -const Level1Items = { - type: 'object', - properties: pickObjectProps(GroupItemsConfig.properties, ['textTransform']), -}; -const SpacingConfig = { - type: 'object', - properties: { - unit: { type: 'number' }, - paddingHorizontal: { type: 'string' }, - paddingVertical: { type: 'string' }, - offsetTop: { type: 'string' }, - offsetLeft: { type: 'string' }, - offsetNesting: { type: 'string' }, - }, -}; -const Sidebar = { - type: 'object', - properties: Object.assign(Object.assign({}, omitObjectProps(FontConfig.properties, ['fontWeight', 'lineHeight'])), { activeBgColor: { type: 'string' }, activeTextColor: { type: 'string' }, backgroundColor: { type: 'string' }, borderRadius: { type: 'string' }, breakPath: { type: 'boolean' }, caretColor: { type: 'string' }, caretSize: { type: 'string' }, groupItems: GroupItemsConfig, level1items: Level1Items, rightLineColor: { type: 'string' }, separatorLabelColor: { type: 'string' }, showAtBreakpoint: { type: 'string' }, spacing: SpacingConfig, textColor: { type: 'string' }, width: { type: 'string' } }), -}; -const Heading = { - type: 'object', - properties: Object.assign(Object.assign({}, FontConfig.properties), { color: { type: 'string' }, transform: { type: 'string' } }), -}; -const CodeConfig = { - type: 'object', - properties: Object.assign(Object.assign({}, FontConfig.properties), { backgroundColor: { type: 'string' }, color: { type: 'string' }, wordBreak: { - type: 'string', - enum: [ - 'break-all', - 'break-word', - 'keep-all', - 'normal', - 'revert', - 'unset', - 'inherit', - 'initial', - ], - }, wrap: { type: 'boolean' } }), -}; -const HeadingsConfig = { - type: 'object', - properties: omitObjectProps(FontConfig.properties, ['fontSize']), -}; -const LinksConfig = { - type: 'object', - properties: { - color: { type: 'string' }, - hover: { type: 'string' }, - textDecoration: { type: 'string' }, - hoverTextDecoration: { type: 'string' }, - visited: { type: 'string' }, - }, -}; -const Typography = { - type: 'object', - properties: Object.assign(Object.assign({ code: CodeConfig, fieldName: FontConfig }, pickObjectProps(FontConfig.properties, ['fontSize', 'fontFamily'])), { fontWeightBold: { type: 'string' }, fontWeightLight: { type: 'string' }, fontWeightRegular: { type: 'string' }, heading1: Heading, heading2: Heading, heading3: Heading, headings: HeadingsConfig, lineHeight: { type: 'string' }, links: LinksConfig, optimizeSpeed: { type: 'boolean' }, rightPanelHeading: Heading, smoothing: { - type: 'string', - enum: ['auto', 'none', 'antialiased', 'subpixel-antialiased', 'grayscale'], - } }), -}; -const TokenProps = { - type: 'object', - properties: Object.assign({ color: { type: 'string' } }, omitObjectProps(FontConfig.properties, ['fontWeight'])), -}; -const CodeBlock = { - type: 'object', - properties: { - backgroundColor: { type: 'string' }, - borderRadius: { type: 'string' }, - tokens: TokenProps, - }, -}; -const ConfigThemeLogo = { - type: 'object', - properties: { - gutter: { type: 'string' }, - maxHeight: { type: 'string' }, - maxWidth: { type: 'string' }, - }, -}; -const Fab = { - type: 'object', - properties: { - backgroundColor: { type: 'string' }, - color: { type: 'string' }, - }, -}; -const ButtonOverrides = { - type: 'object', - properties: { - custom: { type: 'string' }, - }, -}; -const Overrides = { - type: 'object', - properties: { - DownloadButton: ButtonOverrides, - NextSectionButton: ButtonOverrides, - }, -}; -const RightPanel = { - type: 'object', - properties: { - backgroundColor: { type: 'string' }, - panelBackgroundColor: { type: 'string' }, - panelControlsBackgroundColor: { type: 'string' }, - showAtBreakpoint: { type: 'string' }, - textColor: { type: 'string' }, - width: { type: 'string' }, - }, -}; -const Shape = { - type: 'object', - properties: { borderRadius: { type: 'string' } }, -}; -const ThemeSpacing = { - type: 'object', - properties: { - sectionHorizontal: { type: 'number' }, - sectionVertical: { type: 'number' }, - unit: { type: 'number' }, - }, -}; -const ConfigTheme = { - type: 'object', - properties: { - breakpoints: Breakpoints, - codeBlock: CodeBlock, - colors: ThemeColors, - components: ConfigThemeComponents, - layout: Layout, - logo: ConfigThemeLogo, - fab: Fab, - overrides: Overrides, - rightPanel: RightPanel, - schema: ConfigThemeSchema, - shape: Shape, - sidebar: Sidebar, - spacing: ThemeSpacing, - typography: Typography, - links: { properties: { color: { type: 'string' } } }, - codeSample: { properties: { backgroundColor: { type: 'string' } } }, - }, -}; -const GenerateCodeSamples = { - type: 'object', - properties: { - skipOptionalParameters: { type: 'boolean' }, - languages: { type: 'array', items: ConfigLanguage }, - }, - required: ['languages'], -}; -exports.deprecatedRefDocsSchema = { - type: 'object', - properties: { - theme: ConfigTheme, - ctrlFHijack: { type: 'boolean' }, - defaultSampleLanguage: { type: 'string' }, - disableDeepLinks: { type: 'boolean' }, - disableSearch: { type: 'boolean' }, - disableSidebar: { type: 'boolean' }, - downloadDefinitionUrl: { type: 'string' }, - expandDefaultServerVariables: { type: 'boolean' }, - enumSkipQuotes: { type: 'boolean' }, - expandDefaultRequest: { type: 'boolean' }, - expandDefaultResponse: { type: 'boolean' }, - expandResponses: { type: 'string' }, - expandSingleSchemaField: { type: 'boolean' }, - generateCodeSamples: GenerateCodeSamples, - generatedPayloadSamplesMaxDepth: { type: 'number' }, - hideDownloadButton: { type: 'boolean' }, - hideHostname: { type: 'boolean' }, - hideInfoSection: { type: 'boolean' }, - hideLogo: { type: 'boolean' }, - hideRequestPayloadSample: { type: 'boolean' }, - hideRightPanel: { type: 'boolean' }, - hideSchemaPattern: { type: 'boolean' }, - hideSingleRequestSampleTab: { type: 'boolean' }, - hideSecuritySection: { type: 'boolean' }, - hideTryItPanel: { type: 'boolean' }, - hideFab: { type: 'boolean' }, - hideOneOfDescription: { type: 'boolean' }, - htmlTemplate: { type: 'string' }, - jsonSampleExpandLevel: { - oneOf: [{ type: 'number', minimum: 1 }, { type: 'string' }], - }, - labels: ConfigLabels, - menuToggle: { type: 'boolean' }, - nativeScrollbars: { type: 'boolean' }, - noAutoAuth: { type: 'boolean' }, - onDeepLinkClick: { type: 'object' }, - pagination: { enum: ['none', 'section', 'item'] }, - pathInMiddlePanel: { type: 'boolean' }, - payloadSampleIdx: { type: 'number', minimum: 0 }, - requestInterceptor: { type: 'object' }, - requiredPropsFirst: { type: 'boolean' }, - routingStrategy: { type: 'string' }, - samplesTabsMaxCount: { type: 'number' }, - schemaExpansionLevel: { - oneOf: [{ type: 'number', minimum: 0 }, { type: 'string' }], - }, - minCharacterLengthToInitSearch: { type: 'number', minimum: 1 }, - maxResponseHeadersToShowInTryIt: { type: 'number', minimum: 0 }, - scrollYOffset: { - oneOf: [{ type: 'number' }, { type: 'string' }], - }, - searchAutoExpand: { type: 'boolean' }, - searchFieldLevelBoost: { type: 'number', minimum: 0 }, - searchMaxDepth: { type: 'number', minimum: 1 }, - searchMode: { type: 'string', enum: ['default', 'path-only'] }, - searchOperationTitleBoost: { type: 'number' }, - searchTagTitleBoost: { type: 'number' }, - sendXUserAgentInTryIt: { type: 'boolean' }, - showChangeLayoutButton: { type: 'boolean' }, - showConsole: { type: 'boolean' }, - showNextButton: { type: 'boolean' }, - showRightPanelToggle: { type: 'boolean' }, - showSecuritySchemeType: { type: 'boolean' }, - showWebhookVerb: { type: 'boolean' }, - showObjectSchemaExamples: { type: 'boolean' }, - disableTryItRequestUrlEncoding: { type: 'boolean' }, - sidebarLinks: ConfigSidebarLinks, - sideNavStyle: { type: 'string', enum: ['summary-only', 'path-first', 'id-only', 'path-only'] }, - simpleOneOfTypeLabel: { type: 'boolean' }, - sortEnumValuesAlphabetically: { type: 'boolean' }, - sortOperationsAlphabetically: { type: 'boolean' }, - sortPropsAlphabetically: { type: 'boolean' }, - sortTagsAlphabetically: { type: 'boolean' }, - suppressWarnings: { type: 'boolean' }, - unstable_externalDescription: { type: 'boolean' }, - unstable_ignoreMimeParameters: { type: 'boolean' }, - untrustedDefinition: { type: 'boolean' }, - showAccessMode: { type: 'boolean' }, - preserveOriginalExtensionsName: { type: 'boolean' }, - markdownHeadingsAnchorLevel: { type: 'number' }, - }, - additionalProperties: false, -}; -function pickObjectProps(object, keys) { - return Object.fromEntries(keys.filter((key) => key in object).map((key) => [key, object[key]])); -} -function omitObjectProps(object, keys) { - return Object.fromEntries(Object.entries(object).filter(([key]) => !keys.includes(key))); -} -//# sourceMappingURL=reference-docs-config-schema.js.map - -/***/ }), - -/***/ 98162: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.removePropertyRecursively = removePropertyRecursively; -function removePropertyRecursively(object, propToRemove) { - return Object.fromEntries(Object.entries(object) - .map(([key, value]) => { - if (key === propToRemove) { - return undefined; +// node_modules/@actions/http-client/lib/index.js +var require_lib = __commonJS({ + "node_modules/@actions/http-client/lib/index.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + var desc = Object.getOwnPropertyDescriptor(m, k3); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k3]; + } }; + } + Object.defineProperty(o, k22, desc); + }) : (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + o[k22] = m[k3]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v3) { + Object.defineProperty(o, "default", { enumerable: true, value: v3 }); + }) : function(o, v3) { + o["default"] = v3; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; + }; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P3, generator) { + function adopt(value) { + return value instanceof P3 ? value : new P3(function(resolve8) { + resolve8(value); + }); + } + return new (P3 || (P3 = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e2) { + reject(e2); + } } - if (typeof value !== 'object' || !value) { - return [key, value]; + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e2) { + reject(e2); + } } - if (Array.isArray(value)) { - return [ - key, - value.map((arrayItem) => typeof arrayItem === 'object' - ? removePropertyRecursively(arrayItem, propToRemove) - : arrayItem), - ]; + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); } - return [key, removePropertyRecursively(value, propToRemove)]; - }) - .filter(Boolean)); -} -//# sourceMappingURL=remove-property-recursively.js.map - -/***/ }), - -/***/ 95074: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.reuniteConfigSchema = void 0; -const jobInputsSchema = { - type: 'object', - additionalProperties: { type: 'string' }, -}; -const jobServersSchema = { - type: 'object', - additionalProperties: false, - patternProperties: { - '^[a-zA-Z0-9_-]+$': { - type: 'string', - pattern: '^https?://[^\\s/$.?#].[^\\s]*$', - }, - }, -}; -const severitySchema = { - type: 'string', - enum: ['error', 'warn', 'off'], -}; -const jobSeveritySchema = { - type: 'object', - additionalProperties: false, - properties: { - schemaCheck: severitySchema, - statusCodeCheck: severitySchema, - contentTypeCheck: severitySchema, - successCriteriaCheck: severitySchema, - }, -}; -const jobTriggerSchema = { - type: 'object', - additionalProperties: false, - properties: { - event: { - type: 'string', - enum: ['schedule'], - }, - interval: { type: 'string', pattern: '^[1-9]\\d*[mhdw]$' }, - }, - required: ['event'], -}; -exports.reuniteConfigSchema = { - type: 'object', - properties: { - ignoreLint: { - oneOf: [ - { type: 'boolean', default: false }, - { - type: 'object', - additionalProperties: { type: 'boolean' }, - }, - ], - }, - ignoreLinkChecker: { type: 'boolean' }, - ignoreMarkdocErrors: { type: 'boolean' }, - jobs: { - type: 'array', - items: { - type: 'object', - properties: { - path: { - type: 'string', - pattern: '^(?!\\.\\./)(/[a-zA-Z0-9_\\-\\./]+|./[a-zA-Z0-9_\\-\\./]+|[a-zA-Z0-9_\\-\\./]+)$', - }, - agent: { - type: 'string', - enum: ['respect'], - }, - trigger: jobTriggerSchema, - inputs: jobInputsSchema, - servers: jobServersSchema, - severity: jobSeveritySchema, - }, - required: ['path', 'trigger', 'agent'], - additionalProperties: false, - }, - }, - }, - additionalProperties: false, -}; -//# sourceMappingURL=reunite-config-schema.js.map - -/***/ }), - -/***/ 63375: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.rootRedoclyConfigSchema = exports.redoclyConfigSchema = exports.l10nConfigSchema = exports.devOnboardingAdapterConfigSchema = exports.apigeeEdgeAdapterConfigSchema = exports.apigeeXAdapterConfigSchema = exports.apigeeAdapterAuthServiceAccountSchema = exports.apigeeAdapterAuthOauth2Schema = exports.graviteeAdapterConfigSchema = exports.graviteeAdapterAuthIdpSchema = exports.graviteeAdapterAuthStaticSchema = exports.rbacConfigSchema = exports.rbacScopeItemsSchema = exports.apiFunctionsConfigSchema = exports.seoConfigSchema = exports.apiConfigSchema = exports.redirectsConfigSchema = exports.redirectConfigSchema = exports.ssoConfigSchema = exports.ssoDirectConfigSchema = exports.authProviderConfigSchema = exports.saml2ProviderConfigSchema = exports.oidcProviderConfigSchema = exports.oidcIssuerMetadataSchema = void 0; -const constants_1 = __nccwpck_require__(71643); -const default_theme_config_schema_1 = __nccwpck_require__(66656); -const feedback_config_schema_1 = __nccwpck_require__(88462); -const graphql_config_schema_1 = __nccwpck_require__(29575); -const remove_property_recursively_1 = __nccwpck_require__(98162); -const reunite_config_schema_1 = __nccwpck_require__(95074); -const ex_theme_config_schemas_1 = __nccwpck_require__(11031); -exports.oidcIssuerMetadataSchema = { - type: 'object', - properties: { - end_session_endpoint: { type: 'string' }, - token_endpoint: { type: 'string' }, - authorization_endpoint: { type: 'string' }, - jwks_uri: { type: 'string' }, - }, - required: ['token_endpoint', 'authorization_endpoint'], - additionalProperties: true, -}; -exports.oidcProviderConfigSchema = { - type: 'object', - properties: { - type: { type: 'string', const: constants_1.AuthProviderType.OIDC }, - title: { type: 'string' }, - pkce: { type: 'boolean', default: false }, - configurationUrl: { type: 'string', minLength: 1 }, - configuration: exports.oidcIssuerMetadataSchema, - clientId: { type: 'string', minLength: 1 }, - clientSecret: { type: 'string', minLength: 0 }, - teamsClaimName: { type: 'string' }, - teamsClaimMap: { type: 'object', additionalProperties: { type: 'string' } }, - defaultTeams: { type: 'array', items: { type: 'string' } }, - scopes: { type: 'array', items: { type: 'string' } }, - tokenExpirationTime: { type: 'number' }, - authorizationRequestCustomParams: { type: 'object', additionalProperties: { type: 'string' } }, - tokenRequestCustomParams: { type: 'object', additionalProperties: { type: 'string' } }, - audience: { type: 'array', items: { type: 'string' } }, - }, - required: ['type', 'clientId'], - oneOf: [{ required: ['configurationUrl'] }, { required: ['configuration'] }], - additionalProperties: false, -}; -exports.saml2ProviderConfigSchema = { - type: 'object', - properties: { - type: { type: 'string', const: constants_1.AuthProviderType.SAML2 }, - title: { type: 'string' }, - issuerId: { type: 'string' }, - entityId: { type: 'string' }, - ssoUrl: { type: 'string' }, - x509PublicCert: { type: 'string' }, - teamsAttributeName: { type: 'string', default: constants_1.DEFAULT_TEAM_CLAIM_NAME }, - teamsAttributeMap: { type: 'object', additionalProperties: { type: 'string' } }, - defaultTeams: { type: 'array', items: { type: 'string' } }, - }, - additionalProperties: false, - required: ['type', 'issuerId', 'ssoUrl', 'x509PublicCert'], -}; -exports.authProviderConfigSchema = { - oneOf: [exports.oidcProviderConfigSchema, exports.saml2ProviderConfigSchema], - discriminator: { propertyName: 'type' }, -}; -exports.ssoDirectConfigSchema = { - type: 'object', - additionalProperties: exports.authProviderConfigSchema, -}; -exports.ssoConfigSchema = { - oneOf: [ - { - type: 'array', - items: { - type: 'string', - enum: ['REDOCLY', 'CORPORATE', 'GUEST'], - }, - uniqueItems: true, - }, - { - type: 'string', - enum: ['REDOCLY', 'CORPORATE', 'GUEST'], - }, - ], -}; -exports.redirectConfigSchema = { - type: 'object', - properties: { - to: { type: 'string' }, - type: { type: 'number', default: 301 }, - }, - additionalProperties: false, -}; -exports.redirectsConfigSchema = { - type: 'object', - additionalProperties: exports.redirectConfigSchema, - default: {}, -}; -const rulesSchema = { - type: 'object', - additionalProperties: { - oneOf: [{ type: 'string' }, { type: 'object' }], - }, -}; -exports.apiConfigSchema = { - type: 'object', - properties: { - root: { type: 'string' }, - output: { type: 'string', pattern: '(.ya?ml|.json)$' }, - rbac: { type: 'object', additionalProperties: true }, - openapi: ex_theme_config_schemas_1.openapiConfigSchema, - graphql: graphql_config_schema_1.graphqlConfigSchema, - /** - * @deprecated left for backwards compatibility - */ - theme: { - type: 'object', - properties: { - openapi: ex_theme_config_schemas_1.openapiConfigSchema, - graphql: graphql_config_schema_1.graphqlConfigSchema, - }, - additionalProperties: false, - }, - title: { type: 'string' }, - metadata: { type: 'object', additionalProperties: true }, - rules: rulesSchema, - decorators: { type: 'object', additionalProperties: true }, - preprocessors: { type: 'object', additionalProperties: true }, - }, - required: ['root'], -}; -const metadataConfigSchema = { - type: 'object', - additionalProperties: true, -}; -const metadataGlobsConfigSchema = { - type: 'object', - additionalProperties: { - type: 'object', - additionalProperties: true, - }, -}; -exports.seoConfigSchema = { - type: 'object', - properties: { - title: { type: 'string' }, - description: { type: 'string' }, - siteUrl: { type: 'string' }, - image: { type: 'string' }, - keywords: { - oneOf: [{ type: 'array', items: { type: 'string' } }, { type: 'string' }], - }, - lang: { type: 'string' }, - jsonLd: { type: 'object' }, - meta: { - type: 'array', - items: { - type: 'object', - properties: { - name: { type: 'string' }, - content: { type: 'string' }, - }, - required: ['name', 'content'], - additionalProperties: false, - }, - }, - }, - additionalProperties: false, -}; -exports.apiFunctionsConfigSchema = { - type: 'object', - properties: { - folders: { type: 'array', items: { type: 'string' } }, - }, - additionalProperties: false, -}; -exports.rbacScopeItemsSchema = { - type: 'object', - additionalProperties: { type: 'string' }, -}; -exports.rbacConfigSchema = { - type: 'object', - properties: { - teamNamePatterns: { type: 'array', items: { type: 'string' } }, - teamFolders: { type: 'array', items: { type: 'string' } }, - teamFoldersBaseRoles: exports.rbacScopeItemsSchema, - cms: exports.rbacScopeItemsSchema, // deprecated in favor of reunite - reunite: exports.rbacScopeItemsSchema, - features: { - type: 'object', - properties: { - aiSearch: exports.rbacScopeItemsSchema, - }, - additionalProperties: false, - }, - content: { - type: 'object', - properties: { - '**': exports.rbacScopeItemsSchema, - }, - additionalProperties: exports.rbacScopeItemsSchema, - }, - }, - additionalProperties: exports.rbacScopeItemsSchema, -}; -exports.graviteeAdapterAuthStaticSchema = { - type: 'object', - properties: { static: { type: 'string' } }, - additionalProperties: false, - required: ['static'], -}; -exports.graviteeAdapterAuthIdpSchema = { - type: 'object', - properties: { idp: { type: 'string' } }, - additionalProperties: false, - required: ['idp'], -}; -exports.graviteeAdapterConfigSchema = { - type: 'object', - properties: { - type: { type: 'string', const: 'GRAVITEE' }, - apiBaseUrl: { type: 'string' }, - env: { type: 'string' }, - allowApiProductsOutsideCatalog: { type: 'boolean', default: false }, - stage: { type: 'string', default: 'non-production' }, - auth: { - oneOf: [exports.graviteeAdapterAuthStaticSchema, exports.graviteeAdapterAuthIdpSchema], - }, - }, - additionalProperties: false, - required: ['type', 'apiBaseUrl'], -}; -exports.apigeeAdapterAuthOauth2Schema = { - type: 'object', - properties: { - type: { type: 'string', const: constants_1.ApigeeDevOnboardingIntegrationAuthType.OAUTH2 }, - tokenEndpoint: { type: 'string' }, - clientId: { type: 'string' }, - clientSecret: { type: 'string' }, - }, - additionalProperties: false, - required: ['type', 'tokenEndpoint', 'clientId', 'clientSecret'], -}; -exports.apigeeAdapterAuthServiceAccountSchema = { - type: 'object', - properties: { - type: { type: 'string', const: constants_1.ApigeeDevOnboardingIntegrationAuthType.SERVICE_ACCOUNT }, - serviceAccountEmail: { type: 'string' }, - serviceAccountPrivateKey: { type: 'string' }, - }, - additionalProperties: false, - required: ['type', 'serviceAccountEmail', 'serviceAccountPrivateKey'], -}; -exports.apigeeXAdapterConfigSchema = { - type: 'object', - properties: { - type: { type: 'string', const: 'APIGEE_X' }, - apiUrl: { type: 'string' }, - stage: { type: 'string', default: 'non-production' }, - organizationName: { type: 'string' }, - ignoreApiProducts: { type: 'array', items: { type: 'string' } }, - allowApiProductsOutsideCatalog: { type: 'boolean', default: false }, - auth: { - type: 'object', - oneOf: [exports.apigeeAdapterAuthOauth2Schema, exports.apigeeAdapterAuthServiceAccountSchema], - discriminator: { propertyName: 'type' }, - }, - }, - additionalProperties: false, - required: ['type', 'organizationName', 'auth'], -}; -exports.apigeeEdgeAdapterConfigSchema = Object.assign(Object.assign({}, exports.apigeeXAdapterConfigSchema), { properties: Object.assign(Object.assign({}, exports.apigeeXAdapterConfigSchema.properties), { type: { type: 'string', const: 'APIGEE_EDGE' } }) }); -exports.devOnboardingAdapterConfigSchema = { - type: 'object', - oneOf: [exports.apigeeXAdapterConfigSchema, exports.apigeeEdgeAdapterConfigSchema, exports.graviteeAdapterConfigSchema], - discriminator: { propertyName: 'type' }, -}; -const devOnboardingConfigSchema = { - type: 'object', - required: ['adapters'], - additionalProperties: false, - properties: { - adapters: { - type: 'array', - items: exports.devOnboardingAdapterConfigSchema, - }, - }, -}; -exports.l10nConfigSchema = { - type: 'object', - properties: { - defaultLocale: { - type: 'string', - }, - locales: { - type: 'array', - items: { - type: 'object', - properties: { - code: { - type: 'string', - }, - name: { - type: 'string', - }, - }, - required: ['code'], - }, - }, - }, - additionalProperties: false, - required: ['defaultLocale'], -}; -const responseHeaderSchema = { - type: 'object', - properties: { - name: { type: 'string' }, - value: { type: 'string' }, - }, - additionalProperties: false, - required: ['name', 'value'], -}; -exports.redoclyConfigSchema = { - type: 'object', - properties: { - /** - * @deprecated Should use `plugins` instead - */ - imports: { - type: 'array', - items: { type: 'string' }, - }, - licenseKey: { type: 'string' }, - redirects: exports.redirectsConfigSchema, - seo: exports.seoConfigSchema, - rbac: exports.rbacConfigSchema, - apiFunctions: exports.apiFunctionsConfigSchema, - requiresLogin: { type: 'boolean' }, - responseHeaders: { - type: 'object', - additionalProperties: { - type: 'array', - items: responseHeaderSchema, - }, - }, - mockServer: { - type: 'object', - properties: { - off: { type: 'boolean', default: false }, - position: { type: 'string', enum: ['first', 'last', 'replace', 'off'], default: 'first' }, - strictExamples: { type: 'boolean', default: false }, - errorIfForcedExampleNotFound: { type: 'boolean', default: false }, - description: { type: 'string' }, - }, - }, - apis: { - type: 'object', - additionalProperties: exports.apiConfigSchema, - }, - rules: rulesSchema, - decorators: { type: 'object', additionalProperties: true }, - preprocessors: { type: 'object', additionalProperties: true }, - ssoDirect: exports.ssoDirectConfigSchema, - sso: exports.ssoConfigSchema, - residency: { type: 'string' }, - developerOnboarding: devOnboardingConfigSchema, - removeAttribution: { type: 'boolean' }, - i18n: exports.l10nConfigSchema, // deprecated - l10n: exports.l10nConfigSchema, - metadata: metadataConfigSchema, - metadataGlobs: metadataGlobsConfigSchema, - ignore: { - type: 'array', - items: { - type: 'string', - }, - }, - /** - * @deprecated properties moved to the root of the config - */ - theme: default_theme_config_schema_1.themeConfigSchema, - reunite: reunite_config_schema_1.reuniteConfigSchema, - // Ex theme properties - logo: ex_theme_config_schemas_1.logoConfigSchema, - navbar: ex_theme_config_schemas_1.navbarConfigSchema, - products: ex_theme_config_schemas_1.productsConfigSchema, - footer: ex_theme_config_schemas_1.footerConfigSchema, - sidebar: ex_theme_config_schemas_1.sidebarConfigSchema, - scripts: ex_theme_config_schemas_1.scriptsConfigSchema, - links: ex_theme_config_schemas_1.linksConfigSchema, - feedback: feedback_config_schema_1.feedbackConfigSchema, - search: ex_theme_config_schemas_1.searchConfigSchema, - colorMode: ex_theme_config_schemas_1.colorModeConfigSchema, - navigation: ex_theme_config_schemas_1.navigationConfigSchema, - codeSnippet: ex_theme_config_schemas_1.codeSnippetConfigSchema, - markdown: ex_theme_config_schemas_1.markdownConfigSchema, - openapi: ex_theme_config_schemas_1.openapiConfigSchema, - graphql: graphql_config_schema_1.graphqlConfigSchema, - analytics: ex_theme_config_schemas_1.analyticsConfigSchema, - userMenu: ex_theme_config_schemas_1.userMenuConfigSchema, - versionPicker: ex_theme_config_schemas_1.versionPickerConfigSchema, - breadcrumbs: ex_theme_config_schemas_1.breadcrumbsConfigSchema, - catalog: ex_theme_config_schemas_1.catalogsConfigSchema, - scorecard: ex_theme_config_schemas_1.scorecardConfigSchema, - }, - default: { redirects: {} }, - additionalProperties: true, -}; -const environmentSchema = Object.assign(Object.assign({}, (0, remove_property_recursively_1.removePropertyRecursively)(exports.redoclyConfigSchema, 'default')), { additionalProperties: false }); -exports.rootRedoclyConfigSchema = Object.assign(Object.assign({ $id: 'root-redocly-config' }, exports.redoclyConfigSchema), { properties: Object.assign(Object.assign({ plugins: { - type: 'array', - items: { type: 'string' }, - } }, exports.redoclyConfigSchema.properties), { env: { - type: 'object', - additionalProperties: environmentSchema, // TODO: if we want full validation we need to override apis, theme and the root - } }), default: {}, additionalProperties: false }); -//# sourceMappingURL=root-config-schema.js.map - -/***/ }), - -/***/ 45269: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=api-functions-types.js.map - -/***/ }), - -/***/ 57881: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=code-walkthrough-types.js.map - -/***/ }), - -/***/ 55559: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=config-types.js.map - -/***/ }), - -/***/ 71058: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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__(45269), exports); -__exportStar(__nccwpck_require__(55559), exports); -__exportStar(__nccwpck_require__(31675), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 31675: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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__(57881), exports); -//# sourceMappingURL=portal-shared-types.js.map - -/***/ }), - -/***/ 8043: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OasVersion = void 0; -exports.bundleConfig = bundleConfig; -exports.bundle = bundle; -exports.bundleFromString = bundleFromString; -exports.bundleDocument = bundleDocument; -exports.mapTypeToComponent = mapTypeToComponent; -const resolve_1 = __nccwpck_require__(27098); -const visitors_1 = __nccwpck_require__(23555); -const types_1 = __nccwpck_require__(14143); -const walk_1 = __nccwpck_require__(57523); -const oas_types_1 = __nccwpck_require__(46707); -const ref_utils_1 = __nccwpck_require__(97977); -const rules_1 = __nccwpck_require__(19802); -const no_unresolved_refs_1 = __nccwpck_require__(34440); -const utils_1 = __nccwpck_require__(75450); -const domains_1 = __nccwpck_require__(2875); -const remove_unused_components_1 = __nccwpck_require__(43187); -const remove_unused_components_2 = __nccwpck_require__(62463); -const redocly_yaml_1 = __nccwpck_require__(74781); -var OasVersion; -(function (OasVersion) { - OasVersion["Version2"] = "oas2"; - OasVersion["Version3_0"] = "oas3_0"; - OasVersion["Version3_1"] = "oas3_1"; -})(OasVersion || (exports.OasVersion = OasVersion = {})); -const bundleVisitor = (0, visitors_1.normalizeVisitors)([ - { - severity: 'error', - ruleId: 'configBundler', - visitor: { - ref: { - leave(node, ctx, resolved) { - replaceRef(node, resolved, ctx); - }, - }, - }, - }, -], redocly_yaml_1.NormalizedConfigTypes); -async function bundleConfig(document, resolvedRefMap) { - const ctx = { - problems: [], - oasVersion: oas_types_1.SpecVersion.OAS3_0, - refTypes: new Map(), - visitorsData: {}, - }; - (0, walk_1.walkDocument)({ - document, - rootType: redocly_yaml_1.NormalizedConfigTypes.ConfigRoot, - normalizedVisitors: bundleVisitor, - resolvedRefMap, - ctx, - }); - return document.parsed ?? {}; -} -async function bundle(opts) { - const { ref, doc, externalRefResolver = new resolve_1.BaseResolver(opts.config.resolve), base = null, } = opts; - if (!(ref || doc)) { - throw new Error('Document or reference is required.\n'); - } - const document = doc === undefined ? await externalRefResolver.resolveDocument(base, ref, true) : doc; - if (document instanceof Error) { - throw document; - } - opts.collectSpecData?.(document.parsed); - return bundleDocument({ - document, - ...opts, - config: opts.config.styleguide, - externalRefResolver, - }); -} -async function bundleFromString(opts) { - const { source, absoluteRef, externalRefResolver = new resolve_1.BaseResolver(opts.config.resolve) } = opts; - const document = (0, resolve_1.makeDocumentFromString)(source, absoluteRef || '/'); - return bundleDocument({ - document, - ...opts, - externalRefResolver, - config: opts.config.styleguide, - }); -} -async function bundleDocument(opts) { - const { document, config, customTypes, externalRefResolver, dereference = false, skipRedoclyRegistryRefs = false, removeUnusedComponents = false, keepUrlRefs = false, } = opts; - const specVersion = (0, oas_types_1.detectSpec)(document.parsed); - const specMajorVersion = (0, oas_types_1.getMajorSpecVersion)(specVersion); - const rules = config.getRulesForSpecVersion(specMajorVersion); - const types = (0, types_1.normalizeTypes)(config.extendTypes(customTypes ?? (0, oas_types_1.getTypes)(specVersion), specVersion), config); - const preprocessors = (0, rules_1.initRules)(rules, config, 'preprocessors', specVersion); - const decorators = (0, rules_1.initRules)(rules, config, 'decorators', specVersion); - const ctx = { - problems: [], - oasVersion: specVersion, - refTypes: new Map(), - visitorsData: {}, - }; - if (removeUnusedComponents) { - decorators.push({ - severity: 'error', - ruleId: 'remove-unused-components', - visitor: specMajorVersion === oas_types_1.SpecMajorVersion.OAS2 - ? (0, remove_unused_components_1.RemoveUnusedComponents)({}) - : (0, remove_unused_components_2.RemoveUnusedComponents)({}), - }); - } - let resolvedRefMap = await (0, resolve_1.resolveDocument)({ - rootDocument: document, - rootType: types.Root, - externalRefResolver, - }); - if (preprocessors.length > 0) { - // Make additional pass to resolve refs defined in preprocessors. - (0, walk_1.walkDocument)({ - document, - rootType: types.Root, - normalizedVisitors: (0, visitors_1.normalizeVisitors)(preprocessors, types), - resolvedRefMap, - ctx, - }); - resolvedRefMap = await (0, resolve_1.resolveDocument)({ - rootDocument: document, - rootType: types.Root, - externalRefResolver, - }); - } - const bundleVisitor = (0, visitors_1.normalizeVisitors)([ - { - severity: 'error', - ruleId: 'bundler', - visitor: makeBundleVisitor(specMajorVersion, dereference, skipRedoclyRegistryRefs, document, resolvedRefMap, keepUrlRefs), - }, - ...decorators, - ], types); - (0, walk_1.walkDocument)({ - document, - rootType: types.Root, - normalizedVisitors: bundleVisitor, - resolvedRefMap, - ctx, - }); - return { - bundle: document, - problems: ctx.problems.map((problem) => config.addProblemToIgnore(problem)), - fileDependencies: externalRefResolver.getFiles(), - rootType: types.Root, - refTypes: ctx.refTypes, - visitorsData: ctx.visitorsData, + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; -} -function mapTypeToComponent(typeName, version) { - switch (version) { - case oas_types_1.SpecMajorVersion.OAS3: - switch (typeName) { - case 'Schema': - return 'schemas'; - case 'Parameter': - return 'parameters'; - case 'Response': - return 'responses'; - case 'Example': - return 'examples'; - case 'RequestBody': - return 'requestBodies'; - case 'Header': - return 'headers'; - case 'SecuritySchema': - return 'securitySchemes'; - case 'Link': - return 'links'; - case 'Callback': - return 'callbacks'; - default: - return null; - } - case oas_types_1.SpecMajorVersion.OAS2: - switch (typeName) { - case 'Schema': - return 'definitions'; - case 'Parameter': - return 'parameters'; - case 'Response': - return 'responses'; - default: - return null; - } - case oas_types_1.SpecMajorVersion.Async2: - switch (typeName) { - case 'Schema': - return 'schemas'; - case 'Parameter': - return 'parameters'; - default: - return null; - } - case oas_types_1.SpecMajorVersion.Async3: - switch (typeName) { - case 'Schema': - return 'schemas'; - case 'Parameter': - return 'parameters'; - default: - return null; - } - case oas_types_1.SpecMajorVersion.Arazzo1: - switch (typeName) { - case 'Root.workflows_items.parameters_items': - case 'Root.workflows_items.steps_items.parameters_items': - return 'parameters'; - default: - return null; - } - case oas_types_1.SpecMajorVersion.Overlay1: - switch (typeName) { - default: - return null; - } - } -} -function replaceRef(ref, resolved, ctx) { - if (!(0, utils_1.isPlainObject)(resolved.node)) { - ctx.parent[ctx.key] = resolved.node; - } - else { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - delete ref.$ref; - const obj = Object.assign({}, resolved.node, ref); - Object.assign(ref, obj); // assign ref itself again so ref fields take precedence - } -} -// function oas3Move -function makeBundleVisitor(version, dereference, skipRedoclyRegistryRefs, rootDocument, resolvedRefMap, keepUrlRefs) { - let components; - let rootLocation; - const visitor = { - ref: { - leave(node, ctx, resolved) { - if (!resolved.location || resolved.node === undefined) { - (0, no_unresolved_refs_1.reportUnresolvedRef)(resolved, ctx.report, ctx.location); - return; - } - if (resolved.location.source === rootDocument.source && - resolved.location.source === ctx.location.source && - ctx.type.name !== 'scalar' && - !dereference) { - return; - } - // do not bundle registry URL before push, otherwise we can't record dependencies - if (skipRedoclyRegistryRefs && (0, domains_1.isRedoclyRegistryURL)(node.$ref)) { - return; - } - if (keepUrlRefs && (0, ref_utils_1.isAbsoluteUrl)(node.$ref)) { - return; - } - const componentType = mapTypeToComponent(ctx.type.name, version); - if (!componentType) { - replaceRef(node, resolved, ctx); - } - else { - if (dereference) { - saveComponent(componentType, resolved, ctx); - replaceRef(node, resolved, ctx); - } - else { - node.$ref = saveComponent(componentType, resolved, ctx); - resolveBundledComponent(node, resolved, ctx); - } - } - }, - }, - Example: { - leave(node, ctx) { - if ((0, ref_utils_1.isExternalValue)(node) && node.value === undefined) { - const resolved = ctx.resolve({ $ref: node.externalValue }); - if (!resolved.location || resolved.node === undefined) { - (0, no_unresolved_refs_1.reportUnresolvedRef)(resolved, ctx.report, ctx.location); - return; - } - if (keepUrlRefs && (0, ref_utils_1.isAbsoluteUrl)(node.externalValue)) { - return; - } - node.value = ctx.resolve({ $ref: node.externalValue }).node; - delete node.externalValue; - } - }, - }, - Root: { - enter(root, ctx) { - rootLocation = ctx.location; - if (version === oas_types_1.SpecMajorVersion.OAS3) { - components = root.components = root.components || {}; - } - else if (version === oas_types_1.SpecMajorVersion.OAS2) { - components = root; - } - else if (version === oas_types_1.SpecMajorVersion.Async2) { - components = root.components = root.components || {}; - } - else if (version === oas_types_1.SpecMajorVersion.Async3) { - components = root.components = root.components || {}; - } - else if (version === oas_types_1.SpecMajorVersion.Arazzo1) { - components = root.components = root.components || {}; - } - }, - }, + Object.defineProperty(exports, "__esModule", { value: true }); + exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; + var http = __importStar(__require("http")); + var https = __importStar(__require("https")); + var pm = __importStar(require_proxy()); + var tunnel = __importStar(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports.MediaTypes = MediaTypes = {})); + function getProxyUrl2(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports.getProxyUrl = getProxyUrl2; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } }; - if (version === oas_types_1.SpecMajorVersion.OAS3) { - visitor.DiscriminatorMapping = { - leave(mapping, ctx) { - for (const name of Object.keys(mapping)) { - const $ref = mapping[name]; - const resolved = ctx.resolve({ $ref }); - if (!resolved.location || resolved.node === undefined) { - (0, no_unresolved_refs_1.reportUnresolvedRef)(resolved, ctx.report, ctx.location.child(name)); - return; - } - const componentType = mapTypeToComponent('Schema', version); - mapping[name] = saveComponent(componentType, resolved, ctx); - } - }, - }; - } - function resolveBundledComponent(node, resolved, ctx) { - const newRefId = (0, resolve_1.makeRefId)(ctx.location.source.absoluteRef, node.$ref); - resolvedRefMap.set(newRefId, { - document: rootDocument, - isRemote: false, - node: resolved.node, - nodePointer: node.$ref, - resolved: true, + exports.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve8) => __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", () => { + resolve8(output.toString()); + }); + })); }); - } - function saveComponent(componentType, target, ctx) { - components[componentType] = components[componentType] || {}; - const name = getComponentName(target, componentType, ctx); - components[componentType][name] = target.node; - if (version === oas_types_1.SpecMajorVersion.OAS3 || - version === oas_types_1.SpecMajorVersion.Async2 || - version === oas_types_1.SpecMajorVersion.Async3) { - return `#/components/${componentType}/${name}`; - } - else { - return `#/${componentType}/${name}`; - } - } - function isEqualOrEqualRef(node, target, ctx) { - if ((0, ref_utils_1.isRef)(node) && - ctx.resolve(node, rootLocation.absolutePointer).location?.absolutePointer === - target.location.absolutePointer) { - return true; - } - return (0, utils_1.dequal)(node, target.node); - } - function getComponentName(target, componentType, ctx) { - const [fileRef, pointer] = [target.location.source.absoluteRef, target.location.pointer]; - const componentsGroup = components[componentType]; - let name = ''; - const refParts = pointer.slice(2).split('/').filter(utils_1.isTruthy); // slice(2) removes "#/" - while (refParts.length > 0) { - name = refParts.pop() + (name ? `-${name}` : ''); - if (!componentsGroup || - !componentsGroup[name] || - isEqualOrEqualRef(componentsGroup[name], target, ctx)) { - return name; - } - } - name = (0, ref_utils_1.refBaseName)(fileRef) + (name ? `_${name}` : ''); - if (!componentsGroup[name] || isEqualOrEqualRef(componentsGroup[name], target, ctx)) { - return name; - } - const prevName = name; - let serialId = 2; - while (componentsGroup[name] && !isEqualOrEqualRef(componentsGroup[name], target, ctx)) { - name = `${prevName}-${serialId}`; - serialId++; - } - if (!componentsGroup[name]) { - ctx.report({ - message: `Two schemas are referenced with the same name but different content. Renamed ${prevName} to ${name}.`, - location: ctx.location, - forceSeverity: 'warn', + } + readBodyBuffer() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); }); + this.message.on("end", () => { + resolve8(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports.isHttps = isHttps; + 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 = 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; + } } - return name; - } - return visitor; -} - - -/***/ }), - -/***/ 81855: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const all = { - rules: { - struct: 'error', - }, - oas2Rules: { - 'boolean-parameter-prefixes': 'error', - 'info-contact': 'error', - 'info-license': 'error', - 'info-license-url': 'error', - 'info-license-strict': 'error', - 'no-path-trailing-slash': 'error', - 'no-identical-paths': 'error', - 'no-ambiguous-paths': 'error', - 'no-invalid-schema-examples': 'error', - 'no-invalid-parameter-examples': 'error', - 'no-http-verbs-in-paths': 'error', - 'no-enum-type-mismatch': 'error', - 'no-unresolved-refs': 'error', - 'no-required-schema-properties-undefined': 'error', - 'no-schema-type-mismatch': 'error', - 'operation-summary': 'error', - 'operation-operationId': 'error', - 'operation-operationId-unique': 'error', - 'operation-operationId-url-safe': 'error', - 'operation-description': 'error', - 'operation-2xx-response': 'error', - 'operation-4xx-response': 'error', - 'operation-parameters-unique': 'error', - 'operation-tag-defined': 'error', - 'operation-singular-tag': 'error', - 'parameter-description': 'error', - 'path-declaration-must-exist': 'error', - 'path-not-include-query': 'error', - 'path-parameters-defined': 'error', - 'paths-kebab-case': 'error', - 'path-excludes-patterns': { - severity: 'error', - patterns: [], - }, - 'path-http-verbs-order': 'error', - 'path-params-defined': 'error', - 'path-segment-plural': 'error', - 'required-string-property-missing-min-length': 'error', - 'response-contains-header': 'error', - 'request-mime-type': { - severity: 'error', - allowedValues: ['application/json'], - }, - 'response-mime-type': { - severity: 'error', - allowedValues: ['application/json'], - }, - 'response-contains-property': 'error', - 'security-defined': 'error', - 'spec-strict-refs': 'error', - 'scalar-property-missing-example': 'error', - 'tag-description': 'error', - 'tags-alphabetical': 'error', - }, - oas3_0Rules: { - 'array-parameter-serialization': 'error', - 'boolean-parameter-prefixes': 'error', - 'component-name-unique': 'error', - 'info-contact': 'error', - 'info-license': 'error', - 'info-license-url': 'error', - 'info-license-strict': 'error', - 'no-path-trailing-slash': 'error', - 'no-identical-paths': 'error', - 'no-ambiguous-paths': 'error', - 'no-invalid-schema-examples': 'error', - 'no-invalid-parameter-examples': 'error', - 'no-http-verbs-in-paths': 'error', - 'no-enum-type-mismatch': 'error', - 'no-unresolved-refs': 'error', - 'no-required-schema-properties-undefined': 'error', - 'no-schema-type-mismatch': 'error', - 'no-invalid-media-type-examples': 'error', - 'no-server-example.com': 'error', - 'no-server-trailing-slash': 'error', - 'no-empty-servers': 'error', - 'no-example-value-and-externalValue': 'error', - 'no-unused-components': 'error', - 'no-undefined-server-variable': 'error', - 'no-server-variables-empty-enum': 'error', - 'operation-summary': 'error', - 'operation-operationId': 'error', - 'operation-operationId-unique': 'error', - 'operation-operationId-url-safe': 'error', - 'operation-description': 'error', - 'operation-2xx-response': 'error', - 'operation-4xx-response': 'error', - 'operation-4xx-problem-details-rfc7807': 'error', - 'operation-parameters-unique': 'error', - 'operation-tag-defined': 'error', - 'operation-singular-tag': 'error', - 'parameter-description': 'error', - 'path-declaration-must-exist': 'error', - 'path-not-include-query': 'error', - 'path-parameters-defined': 'error', - 'paths-kebab-case': 'error', - 'path-excludes-patterns': { - severity: 'error', - patterns: [], - }, - 'path-http-verbs-order': 'error', - 'path-params-defined': 'error', - 'path-segment-plural': 'error', - 'required-string-property-missing-min-length': 'error', - 'response-contains-header': 'error', - 'request-mime-type': { - severity: 'error', - allowedValues: ['application/json'], - }, - 'response-mime-type': { - severity: 'error', - allowedValues: ['application/json'], - }, - 'response-contains-property': 'error', - 'security-defined': 'error', - 'spec-strict-refs': 'error', - 'scalar-property-missing-example': 'error', - 'spec-components-invalid-map-name': 'error', - 'tag-description': 'error', - 'tags-alphabetical': 'error', - }, - oas3_1Rules: { - 'array-parameter-serialization': 'error', - 'boolean-parameter-prefixes': 'error', - 'component-name-unique': 'error', - 'info-contact': 'error', - 'info-license': 'error', - 'info-license-url': 'error', - 'info-license-strict': 'error', - 'no-path-trailing-slash': 'error', - 'no-identical-paths': 'error', - 'no-ambiguous-paths': 'error', - 'no-invalid-schema-examples': 'error', - 'no-invalid-parameter-examples': 'error', - 'no-http-verbs-in-paths': 'error', - 'no-enum-type-mismatch': 'error', - 'no-unresolved-refs': 'error', - 'no-required-schema-properties-undefined': 'error', - 'no-schema-type-mismatch': 'error', - 'no-invalid-media-type-examples': 'error', - 'no-server-example.com': 'error', - 'no-server-trailing-slash': 'error', - 'no-empty-servers': 'error', - 'no-example-value-and-externalValue': 'error', - 'no-unused-components': 'error', - 'no-undefined-server-variable': 'error', - 'no-server-variables-empty-enum': 'error', - 'parameter-description': 'error', - 'path-declaration-must-exist': 'error', - 'path-not-include-query': 'error', - 'path-parameters-defined': 'error', - 'paths-kebab-case': 'error', - 'path-excludes-patterns': { - severity: 'error', - patterns: [], - }, - 'path-http-verbs-order': 'error', - 'path-params-defined': 'error', - 'path-segment-plural': 'error', - 'operation-summary': 'error', - 'operation-operationId': 'error', - 'operation-operationId-unique': 'error', - 'operation-operationId-url-safe': 'error', - 'operation-description': 'error', - 'operation-2xx-response': 'error', - 'operation-4xx-response': 'error', - 'operation-4xx-problem-details-rfc7807': 'error', - 'operation-parameters-unique': 'error', - 'operation-tag-defined': 'error', - 'operation-singular-tag': 'error', - 'required-string-property-missing-min-length': 'error', - 'response-contains-header': 'error', - 'request-mime-type': { - severity: 'error', - allowedValues: ['application/json'], - }, - 'response-mime-type': { - severity: 'error', - allowedValues: ['application/json'], - }, - 'response-contains-property': 'error', - 'security-defined': 'error', - 'spec-strict-refs': 'error', - 'scalar-property-missing-example': 'error', - 'spec-components-invalid-map-name': 'error', - 'tag-description': 'error', - 'tags-alphabetical': 'error', - }, - async2Rules: { - 'channels-kebab-case': 'error', - 'info-contact': 'error', - 'info-license-strict': 'error', - 'no-channel-trailing-slash': 'error', - 'operation-operationId': 'error', - 'tag-description': 'error', - 'tags-alphabetical': 'error', - }, - async3Rules: { - 'channels-kebab-case': 'error', - 'info-contact': 'error', - 'info-license-strict': 'error', - 'no-channel-trailing-slash': 'error', - 'operation-operationId': 'error', - 'tag-description': 'error', - 'tags-alphabetical': 'error', - }, - arazzo1Rules: { - 'criteria-unique': 'error', - 'no-criteria-xpath': 'off', - 'parameters-unique': 'error', - 'requestBody-replacements-unique': 'error', - 'sourceDescription-type': 'error', - 'step-onSuccess-unique': 'error', - 'step-onFailure-unique': 'error', - 'stepId-unique': 'error', - 'sourceDescription-name-unique': 'error', - 'sourceDescriptions-not-empty': 'error', - 'respect-supported-versions': 'off', - 'workflowId-unique': 'error', - 'workflow-dependsOn': 'error', - }, - overlay1Rules: { - 'info-contact': 'error', - }, -}; -exports["default"] = all; - - -/***/ }), - -/***/ 96136: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultPlugin = exports.builtInConfigs = void 0; -const recommended_1 = __nccwpck_require__(77173); -const recommended_strict_1 = __nccwpck_require__(53694); -const all_1 = __nccwpck_require__(81855); -const minimal_1 = __nccwpck_require__(37906); -const spec_1 = __nccwpck_require__(71447); -const oas3_1 = __nccwpck_require__(34605); -const oas2_1 = __nccwpck_require__(48934); -const async2_1 = __nccwpck_require__(71737); -const async3_1 = __nccwpck_require__(2366); -const arazzo_1 = __nccwpck_require__(82031); -const overlay1_1 = __nccwpck_require__(6422); -const oas3_2 = __nccwpck_require__(42391); -const oas2_2 = __nccwpck_require__(55390); -const async2_2 = __nccwpck_require__(38338); -const async3_2 = __nccwpck_require__(4144); -const arazzo_2 = __nccwpck_require__(91246); -const overlay1_2 = __nccwpck_require__(56344); -exports.builtInConfigs = { - recommended: recommended_1.default, - 'recommended-strict': recommended_strict_1.default, - minimal: minimal_1.default, - all: all_1.default, - spec: spec_1.default, - 'redocly-registry': { - decorators: { 'registry-dependencies': 'on' }, - }, -}; -exports.defaultPlugin = { - id: '', // default plugin doesn't have id - rules: { - oas3: oas3_1.rules, - oas2: oas2_1.rules, - async2: async2_1.rules, - async3: async3_1.rules, - arazzo1: arazzo_1.rules, - overlay1: overlay1_1.rules, - }, - preprocessors: { - oas3: oas3_1.preprocessors, - oas2: oas2_1.preprocessors, - async2: async2_1.preprocessors, - async3: async3_1.preprocessors, - arazzo1: arazzo_1.preprocessors, - overlay1: overlay1_1.preprocessors, - }, - decorators: { - oas3: oas3_2.decorators, - oas2: oas2_2.decorators, - async2: async2_2.decorators, - async3: async3_2.decorators, - arazzo1: arazzo_2.decorators, - overlay1: overlay1_2.decorators, - }, - configs: exports.builtInConfigs, -}; - - -/***/ }), - -/***/ 26135: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveConfigFileAndRefs = resolveConfigFileAndRefs; -exports.resolveConfig = resolveConfig; -exports.resolvePlugins = resolvePlugins; -exports.resolveApis = resolveApis; -exports.resolveStyleguideConfig = resolveStyleguideConfig; -exports.resolvePreset = resolvePreset; -const path = __nccwpck_require__(71017); -const url_1 = __nccwpck_require__(57310); -const fs_1 = __nccwpck_require__(57147); -const ref_utils_1 = __nccwpck_require__(97977); -const utils_1 = __nccwpck_require__(75450); -const resolve_1 = __nccwpck_require__(27098); -const builtIn_1 = __nccwpck_require__(96136); -const utils_2 = __nccwpck_require__(4206); -const env_1 = __nccwpck_require__(10876); -const config_1 = __nccwpck_require__(16556); -const logger_1 = __nccwpck_require__(11339); -const asserts_1 = __nccwpck_require__(16533); -const redocly_yaml_1 = __nccwpck_require__(74781); -const DEFAULT_PROJECT_PLUGIN_PATHS = ['@theme/plugin.js', '@theme/plugin.cjs', '@theme/plugin.mjs']; -// Cache instantiated plugins during a single execution -const pluginsCache = new Map(); -async function resolveConfigFileAndRefs({ configPath, externalRefResolver = new resolve_1.BaseResolver(), base = null, }) { - if (!configPath) { - throw new Error('Reference to a config is required.\n'); - } - const document = await externalRefResolver.resolveDocument(base, configPath, true); - if (document instanceof Error) { - throw document; - } - const resolvedRefMap = await (0, resolve_1.resolveDocument)({ - rootDocument: document, - rootType: redocly_yaml_1.NormalizedConfigTypes.ConfigRoot, - externalRefResolver, - }); - return { document, resolvedRefMap }; -} -async function resolveConfig({ rawConfig, configPath, externalRefResolver, }) { - if (rawConfig.styleguide?.extends?.some(utils_1.isNotString)) { - throw new Error(`Error configuration format not detected in extends value must contain strings`); - } - const resolver = externalRefResolver ?? new resolve_1.BaseResolver((0, utils_2.getResolveConfig)(rawConfig.resolve)); - const apis = await resolveApis({ - rawConfig, - configPath, - resolver, - }); - const styleguide = await resolveStyleguideConfig({ - styleguideConfig: rawConfig.styleguide, - configPath, - resolver, - }); - return new config_1.Config({ - ...rawConfig, - apis, - styleguide, - }, configPath); -} -function getDefaultPluginPath(configDir) { - for (const pluginPath of DEFAULT_PROJECT_PLUGIN_PATHS) { - const absolutePluginPath = path.resolve(configDir, pluginPath); - if ((0, fs_1.existsSync)(absolutePluginPath)) { - return pluginPath; - } - } - return; -} -async function resolvePlugins(plugins, configDir = '') { - if (!plugins) - return []; - // TODO: implement or reuse Resolver approach so it will work in node and browser envs - const requireFunc = async (plugin) => { - if ((0, utils_1.isString)(plugin)) { - try { - const maybeAbsolutePluginPath = path.resolve(configDir, plugin); - const absolutePluginPath = (0, fs_1.existsSync)(maybeAbsolutePluginPath) - ? maybeAbsolutePluginPath - : // For plugins imported from packages specifically - require.resolve(plugin, { - paths: [ - // Plugins imported from the node_modules in the project directory - configDir, - // Plugins imported from the node_modules in the package install directory (for example, npx cache directory) - __dirname, - ], - }); - if (!pluginsCache.has(absolutePluginPath)) { - let requiredPlugin; - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - if (true) { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - requiredPlugin = eval("require")(absolutePluginPath); - } - else {} - const pluginCreatorOptions = { contentDir: configDir }; - const pluginModule = (0, utils_2.isDeprecatedPluginFormat)(requiredPlugin) - ? requiredPlugin - : (0, utils_2.isCommonJsPlugin)(requiredPlugin) - ? await requiredPlugin(pluginCreatorOptions) - : await requiredPlugin?.default?.(pluginCreatorOptions); - if (pluginModule?.id && (0, utils_2.isDeprecatedPluginFormat)(requiredPlugin)) { - logger_1.logger.info(`Deprecated plugin format detected: ${pluginModule.id}\n`); - } - if (pluginModule) { - pluginsCache.set(absolutePluginPath, { - ...pluginModule, - path: plugin, - absolutePath: absolutePluginPath, - }); - } + } + 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, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + 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, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, 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]; + } } - return pluginsCache.get(absolutePluginPath); + } + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; } - catch (e) { - throw new Error(`Failed to load plugin "${plugin}": ${e.message}\n\n${e.stack}`); + 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(); } - return plugin; - }; - const seenPluginIds = new Map(); - /** - * Include the default plugin automatically if it's not in configuration - */ - const defaultPluginPath = getDefaultPluginPath(configDir); - if (defaultPluginPath) { - plugins.push(defaultPluginPath); - } - const resolvedPlugins = new Set(); - const instances = await Promise.all(plugins.map(async (p) => { - if ((0, utils_1.isString)(p)) { - if ((0, ref_utils_1.isAbsoluteUrl)(p)) { - throw new Error(logger_1.colorize.red(`We don't support remote plugins yet.`)); - } - if (resolvedPlugins.has(p)) { - return; + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve8, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve8(res); + } } - resolvedPlugins.add(p); + 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"); } - const pluginModule = await requireFunc(p); - if (!pluginModule) { - return; + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } } - const id = pluginModule.id; - if (typeof id !== 'string') { - throw new Error(logger_1.colorize.red(`Plugin must define \`id\` property in ${logger_1.colorize.blue(p.toString())}.`)); + const req = info.httpModule.request(info.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); } - if (seenPluginIds.has(id)) { - const pluginPath = seenPluginIds.get(id); - throw new Error(logger_1.colorize.red(`Plugin "id" must be unique. Plugin ${logger_1.colorize.blue(p.toString())} uses id "${logger_1.colorize.blue(id)}" already seen in ${logger_1.colorize.blue(pluginPath)}`)); - } - seenPluginIds.set(id, p.toString()); - const plugin = { - id, - ...(pluginModule.configs ? { configs: pluginModule.configs } : {}), - ...(pluginModule.typeExtension ? { typeExtension: pluginModule.typeExtension } : {}), - }; - if (pluginModule.rules) { - if (!pluginModule.rules.oas3 && - !pluginModule.rules.oas2 && - !pluginModule.rules.async2 && - !pluginModule.rules.async3 && - !pluginModule.rules.arazzo1 && - !pluginModule.rules.overlay1) { - throw new Error(`Plugin rules must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo\`, or \`overlay1\` rules "${p}.`); - } - plugin.rules = {}; - if (pluginModule.rules.oas3) { - plugin.rules.oas3 = (0, utils_2.prefixRules)(pluginModule.rules.oas3, id); - } - if (pluginModule.rules.oas2) { - plugin.rules.oas2 = (0, utils_2.prefixRules)(pluginModule.rules.oas2, id); - } - if (pluginModule.rules.async2) { - plugin.rules.async2 = (0, utils_2.prefixRules)(pluginModule.rules.async2, id); - } - if (pluginModule.rules.async3) { - plugin.rules.async3 = (0, utils_2.prefixRules)(pluginModule.rules.async3, id); - } - if (pluginModule.rules.arazzo1) { - plugin.rules.arazzo1 = (0, utils_2.prefixRules)(pluginModule.rules.arazzo1, id); - } - if (pluginModule.rules.overlay1) { - plugin.rules.overlay1 = (0, utils_2.prefixRules)(pluginModule.rules.overlay1, id); - } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); } - if (pluginModule.preprocessors) { - if (!pluginModule.preprocessors.oas3 && - !pluginModule.preprocessors.oas2 && - !pluginModule.preprocessors.async2 && - !pluginModule.preprocessors.async3 && - !pluginModule.preprocessors.arazzo1 && - !pluginModule.preprocessors.overlay1) { - throw new Error(`Plugin \`preprocessors\` must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo1\`, or \`overlay1\` preprocessors "${p}.`); - } - plugin.preprocessors = {}; - if (pluginModule.preprocessors.oas3) { - plugin.preprocessors.oas3 = (0, utils_2.prefixRules)(pluginModule.preprocessors.oas3, id); - } - if (pluginModule.preprocessors.oas2) { - plugin.preprocessors.oas2 = (0, utils_2.prefixRules)(pluginModule.preprocessors.oas2, id); - } - if (pluginModule.preprocessors.async2) { - plugin.preprocessors.async2 = (0, utils_2.prefixRules)(pluginModule.preprocessors.async2, id); - } - if (pluginModule.preprocessors.async3) { - plugin.preprocessors.async3 = (0, utils_2.prefixRules)(pluginModule.preprocessors.async3, id); - } - if (pluginModule.preprocessors.arazzo1) { - plugin.preprocessors.arazzo1 = (0, utils_2.prefixRules)(pluginModule.preprocessors.arazzo1, id); - } - if (pluginModule.preprocessors.overlay1) { - plugin.preprocessors.overlay1 = (0, utils_2.prefixRules)(pluginModule.preprocessors.overlay1, id); - } + } + /** + * 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; } - if (pluginModule.decorators) { - if (!pluginModule.decorators.oas3 && - !pluginModule.decorators.oas2 && - !pluginModule.decorators.async2 && - !pluginModule.decorators.async3 && - !pluginModule.decorators.arazzo1 && - !pluginModule.decorators.overlay1) { - throw new Error(`Plugin \`decorators\` must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo1\`, or \`overlay1\` decorators "${p}.`); - } - plugin.decorators = {}; - if (pluginModule.decorators.oas3) { - plugin.decorators.oas3 = (0, utils_2.prefixRules)(pluginModule.decorators.oas3, id); - } - if (pluginModule.decorators.oas2) { - plugin.decorators.oas2 = (0, utils_2.prefixRules)(pluginModule.decorators.oas2, id); - } - if (pluginModule.decorators.async2) { - plugin.decorators.async2 = (0, utils_2.prefixRules)(pluginModule.decorators.async2, id); - } - if (pluginModule.decorators.async3) { - plugin.decorators.async3 = (0, utils_2.prefixRules)(pluginModule.decorators.async3, id); - } - if (pluginModule.decorators.arazzo1) { - plugin.decorators.arazzo1 = (0, utils_2.prefixRules)(pluginModule.decorators.arazzo1, id); - } - if (pluginModule.decorators.overlay1) { - plugin.decorators.overlay1 = (0, utils_2.prefixRules)(pluginModule.decorators.overlay1, id); - } + 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; } - if (pluginModule.assertions) { - plugin.assertions = pluginModule.assertions; + info.options.agent = this._getAgent(info.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info.options); + } } - return { - ...pluginModule, - ...plugin, - }; - })); - return instances.filter(utils_1.isDefined); -} -async function resolveApis({ rawConfig, configPath = '', resolver, }) { - const { apis = {}, styleguide: styleguideConfig = {} } = rawConfig; - const resolvedApis = {}; - for (const [apiName, apiContent] of Object.entries(apis || {})) { - if (apiContent.styleguide?.extends?.some(utils_1.isNotString)) { - throw new Error(`Error configuration format not detected in extends value must contain strings`); - } - const rawStyleguideConfig = getMergedRawStyleguideConfig(styleguideConfig, apiContent.styleguide); - const resolvedApiConfig = await resolveStyleguideConfig({ - styleguideConfig: rawStyleguideConfig, - configPath, - resolver, - }); - resolvedApis[apiName] = { ...apiContent, styleguide: resolvedApiConfig }; - } - return resolvedApis; -} -async function resolveAndMergeNestedStyleguideConfig({ styleguideConfig, configPath = '', resolver = new resolve_1.BaseResolver(), parentConfigPaths = [], extendPaths = [], }) { - if (parentConfigPaths.includes(configPath)) { - throw new Error(`Circular dependency in config file: "${configPath}"`); - } - const plugins = env_1.isBrowser - ? // In browser, we don't support plugins from config file yet - [builtIn_1.defaultPlugin] - : (0, utils_2.getUniquePlugins)(await resolvePlugins([...(styleguideConfig?.plugins || []), builtIn_1.defaultPlugin], path.dirname(configPath))); - const pluginPaths = styleguideConfig?.plugins - ?.filter(utils_1.isString) - .map((p) => path.resolve(path.dirname(configPath), p)); - const resolvedConfigPath = (0, ref_utils_1.isAbsoluteUrl)(configPath) - ? configPath - : configPath && path.resolve(configPath); - const extendConfigs = await Promise.all(styleguideConfig?.extends?.map(async (presetItem) => { - if (!(0, ref_utils_1.isAbsoluteUrl)(presetItem) && !path.extname(presetItem)) { - return resolvePreset(presetItem, plugins); - } - const pathItem = (0, ref_utils_1.isAbsoluteUrl)(presetItem) - ? presetItem - : (0, ref_utils_1.isAbsoluteUrl)(configPath) - ? new URL(presetItem, configPath).href - : path.resolve(path.dirname(configPath), presetItem); - const extendedStyleguideConfig = await loadExtendStyleguideConfig(pathItem, resolver); - return await resolveAndMergeNestedStyleguideConfig({ - styleguideConfig: extendedStyleguideConfig, - configPath: pathItem, - resolver, - parentConfigPaths: [...parentConfigPaths, resolvedConfigPath], - extendPaths, - }); - }) || []); - const { plugins: mergedPlugins = [], ...styleguide } = (0, utils_2.mergeExtends)([ - ...extendConfigs, - { - ...styleguideConfig, - plugins, - extends: undefined, - extendPaths: [...parentConfigPaths, resolvedConfigPath], - pluginPaths, - }, - ]); - return { - ...styleguide, - extendPaths: styleguide.extendPaths?.filter((path) => path && !(0, ref_utils_1.isAbsoluteUrl)(path)), - plugins: (0, utils_2.getUniquePlugins)(mergedPlugins), - recommendedFallback: styleguideConfig?.recommendedFallback, - doNotResolveExamples: styleguideConfig?.doNotResolveExamples, - }; -} -async function resolveStyleguideConfig(opts) { - const resolvedStyleguideConfig = await resolveAndMergeNestedStyleguideConfig(opts); - return { - ...resolvedStyleguideConfig, - rules: resolvedStyleguideConfig.rules && groupStyleguideAssertionRules(resolvedStyleguideConfig), - }; -} -function resolvePreset(presetName, plugins) { - const { pluginId, configName } = (0, utils_2.parsePresetName)(presetName); - const plugin = plugins.find((p) => p.id === pluginId); - if (!plugin) { - throw new Error(`Invalid config ${logger_1.colorize.red(presetName)}: plugin ${pluginId} is not included.`); - } - const preset = plugin.configs?.[configName]; - if (!preset) { - throw new Error(pluginId - ? `Invalid config ${logger_1.colorize.red(presetName)}: plugin ${pluginId} doesn't export config with name ${configName}.` - : `Invalid config ${logger_1.colorize.red(presetName)}: there is no such built-in config.`); - } - return preset; -} -async function loadExtendStyleguideConfig(filePath, resolver) { - try { - const { parsed } = (await resolver.resolveDocument(null, filePath)); - const rawConfig = (0, utils_2.transformConfig)(parsed); - if (!rawConfig.styleguide) { - throw new Error(`Styleguide configuration format not detected: "${filePath}"`); + return info; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); } - return rawConfig.styleguide; - } - catch (error) { - throw new Error(`Failed to load "${filePath}": ${error.message}`); - } -} -function getMergedRawStyleguideConfig(rootStyleguideConfig, apiStyleguideConfig) { - const resultLint = { - ...rootStyleguideConfig, - ...(0, utils_1.pickDefined)(apiStyleguideConfig), - rules: { ...rootStyleguideConfig?.rules, ...apiStyleguideConfig?.rules }, - oas2Rules: { ...rootStyleguideConfig?.oas2Rules, ...apiStyleguideConfig?.oas2Rules }, - oas3_0Rules: { ...rootStyleguideConfig?.oas3_0Rules, ...apiStyleguideConfig?.oas3_0Rules }, - oas3_1Rules: { ...rootStyleguideConfig?.oas3_1Rules, ...apiStyleguideConfig?.oas3_1Rules }, - async2Rules: { ...rootStyleguideConfig?.async2Rules, ...apiStyleguideConfig?.async2Rules }, - async3Rules: { ...rootStyleguideConfig?.async3Rules, ...apiStyleguideConfig?.async3Rules }, - arazzo1Rules: { ...rootStyleguideConfig?.arazzo1Rules, ...apiStyleguideConfig?.arazzo1Rules }, - overlay1Rules: { - ...rootStyleguideConfig?.overlay1Rules, - ...apiStyleguideConfig?.overlay1Rules, - }, - preprocessors: { - ...rootStyleguideConfig?.preprocessors, - ...apiStyleguideConfig?.preprocessors, - }, - oas2Preprocessors: { - ...rootStyleguideConfig?.oas2Preprocessors, - ...apiStyleguideConfig?.oas2Preprocessors, - }, - oas3_0Preprocessors: { - ...rootStyleguideConfig?.oas3_0Preprocessors, - ...apiStyleguideConfig?.oas3_0Preprocessors, - }, - oas3_1Preprocessors: { - ...rootStyleguideConfig?.oas3_1Preprocessors, - ...apiStyleguideConfig?.oas3_1Preprocessors, - }, - overlay1Preprocessors: { - ...rootStyleguideConfig?.overlay1Preprocessors, - ...apiStyleguideConfig?.overlay1Preprocessors, - }, - decorators: { ...rootStyleguideConfig?.decorators, ...apiStyleguideConfig?.decorators }, - oas2Decorators: { - ...rootStyleguideConfig?.oas2Decorators, - ...apiStyleguideConfig?.oas2Decorators, - }, - oas3_0Decorators: { - ...rootStyleguideConfig?.oas3_0Decorators, - ...apiStyleguideConfig?.oas3_0Decorators, - }, - oas3_1Decorators: { - ...rootStyleguideConfig?.oas3_1Decorators, - ...apiStyleguideConfig?.oas3_1Decorators, - }, - overlay1Decorators: { - ...rootStyleguideConfig?.overlay1Decorators, - ...apiStyleguideConfig?.overlay1Decorators, - }, - recommendedFallback: apiStyleguideConfig?.extends - ? false - : rootStyleguideConfig.recommendedFallback, - }; - return resultLint; -} -function groupStyleguideAssertionRules({ rules, plugins, }) { - if (!rules) { - return rules; - } - // Create a new record to avoid mutating original - const transformedRules = {}; - // Collect assertion rules - const assertions = []; - for (const [ruleKey, rule] of Object.entries(rules)) { - // keep the old assert/ syntax as an alias - if ((ruleKey.startsWith('rule/') || ruleKey.startsWith('assert/')) && - typeof rule === 'object' && - rule !== null) { - const assertion = rule; - if (plugins) { - registerCustomAssertions(plugins, assertion); - // We may have custom assertion inside where block - for (const context of assertion.where || []) { - registerCustomAssertions(plugins, context); - } - } - assertions.push({ - ...assertion, - assertionId: ruleKey, - }); + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; } - else { - // If it's not an assertion, keep it as is - transformedRules[ruleKey] = rule; + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; } - } - if (assertions.length > 0) { - transformedRules.assertions = assertions; - } - return transformedRules; -} -function registerCustomAssertions(plugins, assertion) { - for (const field of (0, utils_1.keysOf)(assertion.assertions)) { - const [pluginId, fn] = field.split('/'); - if (!pluginId || !fn) - continue; - const plugin = plugins.find((plugin) => plugin.id === pluginId); - if (!plugin) { - throw Error(logger_1.colorize.red(`Plugin ${logger_1.colorize.blue(pluginId)} isn't found.`)); + if (!useProxy) { + agent = this._agent; } - if (!plugin.assertions || !plugin.assertions[fn]) { - throw Error(`Plugin ${logger_1.colorize.red(pluginId)} doesn't export assertions function with name ${logger_1.colorize.red(fn)}.`); + if (agent) { + return agent; } - asserts_1.asserts[field] = (0, asserts_1.buildAssertCustomFunction)(plugin.assertions[fn]); - } -} - - -/***/ }), - -/***/ 16556: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Config = exports.StyleguideConfig = exports.IGNORE_FILE = void 0; -const fs = __nccwpck_require__(57147); -const path = __nccwpck_require__(71017); -const js_yaml_1 = __nccwpck_require__(97268); -const utils_1 = __nccwpck_require__(75450); -const oas_types_1 = __nccwpck_require__(46707); -const env_1 = __nccwpck_require__(10876); -const utils_2 = __nccwpck_require__(4206); -const ref_utils_1 = __nccwpck_require__(97977); -exports.IGNORE_FILE = '.redocly.lint-ignore.yaml'; -const IGNORE_BANNER = `# This file instructs Redocly's linter to ignore the rules contained for specific parts of your API.\n` + - `# See https://redocly.com/docs/cli/ for more information.\n`; -function getIgnoreFilePath(configFile) { - if (configFile) { - return (0, utils_1.doesYamlFileExist)(configFile) - ? path.join(path.dirname(configFile), exports.IGNORE_FILE) - : path.join(configFile, exports.IGNORE_FILE); - } - else { - return env_1.isBrowser ? undefined : path.join(process.cwd(), exports.IGNORE_FILE); - } -} -class StyleguideConfig { - constructor(rawConfig, configFile) { - this.rawConfig = rawConfig; - this.configFile = configFile; - this.ignore = {}; - this._usedRules = new Set(); - this._usedVersions = new Set(); - this.plugins = rawConfig.plugins || []; - this.doNotResolveExamples = !!rawConfig.doNotResolveExamples; - this.recommendedFallback = rawConfig.recommendedFallback || false; - const ruleGroups = [ - 'rules', - 'oas2Rules', - 'oas3_0Rules', - 'oas3_1Rules', - 'async2Rules', - 'async3Rules', - 'arazzo1Rules', - 'overlay1Rules', - ]; - replaceSpecWithStruct(ruleGroups, rawConfig); - this.rules = { - [oas_types_1.SpecVersion.OAS2]: { ...rawConfig.rules, ...rawConfig.oas2Rules }, - [oas_types_1.SpecVersion.OAS3_0]: { ...rawConfig.rules, ...rawConfig.oas3_0Rules }, - [oas_types_1.SpecVersion.OAS3_1]: { ...rawConfig.rules, ...rawConfig.oas3_1Rules }, - [oas_types_1.SpecVersion.Async2]: { ...rawConfig.rules, ...rawConfig.async2Rules }, - [oas_types_1.SpecVersion.Async3]: { ...rawConfig.rules, ...rawConfig.async3Rules }, - [oas_types_1.SpecVersion.Arazzo1]: { ...rawConfig.rules, ...rawConfig.arazzo1Rules }, - [oas_types_1.SpecVersion.Overlay1]: { ...rawConfig.rules, ...rawConfig.overlay1Rules }, - }; - this.preprocessors = { - [oas_types_1.SpecVersion.OAS2]: { ...rawConfig.preprocessors, ...rawConfig.oas2Preprocessors }, - [oas_types_1.SpecVersion.OAS3_0]: { ...rawConfig.preprocessors, ...rawConfig.oas3_0Preprocessors }, - [oas_types_1.SpecVersion.OAS3_1]: { ...rawConfig.preprocessors, ...rawConfig.oas3_1Preprocessors }, - [oas_types_1.SpecVersion.Async2]: { ...rawConfig.preprocessors, ...rawConfig.async2Preprocessors }, - [oas_types_1.SpecVersion.Async3]: { ...rawConfig.preprocessors, ...rawConfig.async3Preprocessors }, - [oas_types_1.SpecVersion.Arazzo1]: { ...rawConfig.arazzo1Preprocessors }, - [oas_types_1.SpecVersion.Overlay1]: { ...rawConfig.preprocessors, ...rawConfig.overlay1Preprocessors }, - }; - this.decorators = { - [oas_types_1.SpecVersion.OAS2]: { ...rawConfig.decorators, ...rawConfig.oas2Decorators }, - [oas_types_1.SpecVersion.OAS3_0]: { ...rawConfig.decorators, ...rawConfig.oas3_0Decorators }, - [oas_types_1.SpecVersion.OAS3_1]: { ...rawConfig.decorators, ...rawConfig.oas3_1Decorators }, - [oas_types_1.SpecVersion.Async2]: { ...rawConfig.decorators, ...rawConfig.async2Decorators }, - [oas_types_1.SpecVersion.Async3]: { ...rawConfig.decorators, ...rawConfig.async3Decorators }, - [oas_types_1.SpecVersion.Arazzo1]: { ...rawConfig.arazzo1Decorators }, - [oas_types_1.SpecVersion.Overlay1]: { ...rawConfig.decorators, ...rawConfig.overlay1Decorators }, - }; - this.extendPaths = rawConfig.extendPaths || []; - this.pluginPaths = rawConfig.pluginPaths || []; - this.resolveIgnore(getIgnoreFilePath(configFile)); - } - resolveIgnore(ignoreFile) { - if (!ignoreFile || !(0, utils_1.doesYamlFileExist)(ignoreFile)) - return; - this.ignore = - (0, js_yaml_1.parseYaml)(fs.readFileSync(ignoreFile, 'utf-8')) || {}; - replaceSpecWithStruct(Object.keys(this.ignore), this.ignore); - // resolve ignore paths - for (const fileName of Object.keys(this.ignore)) { - this.ignore[(0, ref_utils_1.isAbsoluteUrl)(fileName) ? fileName : path.resolve(path.dirname(ignoreFile), fileName)] = this.ignore[fileName]; - for (const ruleId of Object.keys(this.ignore[fileName])) { - this.ignore[fileName][ruleId] = new Set(this.ignore[fileName][ruleId]); - } - if (!(0, ref_utils_1.isAbsoluteUrl)(fileName)) { - delete this.ignore[fileName]; - } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; } - } - saveIgnore() { - const dir = this.configFile ? path.dirname(this.configFile) : process.cwd(); - const ignoreFile = path.join(dir, exports.IGNORE_FILE); - const mapped = {}; - for (const absFileName of Object.keys(this.ignore)) { - const mappedDefinitionName = (0, ref_utils_1.isAbsoluteUrl)(absFileName) - ? absFileName - : (0, utils_1.slash)(path.relative(dir, absFileName)); - const ignoredRules = (mapped[mappedDefinitionName] = this.ignore[absFileName]); - for (const ruleId of Object.keys(ignoredRules)) { - ignoredRules[ruleId] = Array.from(ignoredRules[ruleId]); - } + 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; } - fs.writeFileSync(ignoreFile, IGNORE_BANNER + (0, js_yaml_1.stringifyYaml)(mapped)); - } - addIgnore(problem) { - const ignore = this.ignore; - const loc = problem.location[0]; - if (loc.pointer === undefined) - return; - const fileIgnore = (ignore[loc.source.absoluteRef] = ignore[loc.source.absoluteRef] || {}); - const ruleIgnore = (fileIgnore[problem.ruleId] = fileIgnore[problem.ruleId] || new Set()); - ruleIgnore.add(loc.pointer); - } - addProblemToIgnore(problem) { - const loc = problem.location[0]; - if (loc.pointer === undefined) - return problem; - const fileIgnore = this.ignore[loc.source.absoluteRef] || {}; - const ruleIgnore = fileIgnore[problem.ruleId]; - const ignored = ruleIgnore && ruleIgnore.has(loc.pointer); - return ignored - ? { - ...problem, - ignored, - } - : problem; - } - extendTypes(types, version) { - let extendedTypes = types; - for (const plugin of this.plugins) { - if (plugin.typeExtension !== undefined) { - switch (version) { - case oas_types_1.SpecVersion.OAS3_0: - case oas_types_1.SpecVersion.OAS3_1: - if (!plugin.typeExtension.oas3) - continue; - extendedTypes = plugin.typeExtension.oas3(extendedTypes, version); - break; - case oas_types_1.SpecVersion.OAS2: - if (!plugin.typeExtension.oas2) - continue; - extendedTypes = plugin.typeExtension.oas2(extendedTypes, version); - break; - case oas_types_1.SpecVersion.Async2: - if (!plugin.typeExtension.async2) - continue; - extendedTypes = plugin.typeExtension.async2(extendedTypes, version); - break; - case oas_types_1.SpecVersion.Async3: - if (!plugin.typeExtension.async3) - continue; - extendedTypes = plugin.typeExtension.async3(extendedTypes, version); - break; - case oas_types_1.SpecVersion.Arazzo1: - if (!plugin.typeExtension.arazzo1) - continue; - extendedTypes = plugin.typeExtension.arazzo1(extendedTypes, version); - break; - case oas_types_1.SpecVersion.Overlay1: - if (!plugin.typeExtension.overlay1) - continue; - extendedTypes = plugin.typeExtension.overlay1(extendedTypes, version); - break; - default: - throw new Error('Not implemented'); - } - } + if (!agent) { + const options2 = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https.Agent(options2) : new http.Agent(options2); + this._agent = agent; } - return extendedTypes; - } - getRuleSettings(ruleId, oasVersion) { - this._usedRules.add(ruleId); - this._usedVersions.add(oasVersion); - const settings = this.rules[oasVersion][ruleId] || 'off'; - if (typeof settings === 'string') { - return { - severity: settings, - }; + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); } - else { - return { severity: 'error', ...settings }; + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; } - } - getPreprocessorSettings(ruleId, oasVersion) { - this._usedRules.add(ruleId); - this._usedVersions.add(oasVersion); - const settings = this.preprocessors[oasVersion][ruleId] || 'off'; - if (typeof settings === 'string') { - return { - severity: settings === 'on' ? 'error' : settings, - }; + if (proxyAgent) { + return proxyAgent; } - else { - return { severity: 'error', ...settings }; + 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 + }); } - } - getDecoratorSettings(ruleId, oasVersion) { - this._usedRules.add(ruleId); - this._usedVersions.add(oasVersion); - const settings = this.decorators[oasVersion][ruleId] || 'off'; - if (typeof settings === 'string') { - return { - severity: settings === 'on' ? 'error' : settings, + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms2 = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve8) => setTimeout(() => resolve8(), ms2)); + }); + } + _processResponse(res, options2) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve8, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} }; - } - else { - return { severity: 'error', ...settings }; - } - } - getUnusedRules() { - const rules = []; - const decorators = []; - const preprocessors = []; - for (const usedVersion of Array.from(this._usedVersions)) { - rules.push(...Object.keys(this.rules[usedVersion]).filter((name) => !this._usedRules.has(name))); - decorators.push(...Object.keys(this.decorators[usedVersion]).filter((name) => !this._usedRules.has(name))); - preprocessors.push(...Object.keys(this.preprocessors[usedVersion]).filter((name) => !this._usedRules.has(name))); - } - return { - rules, - preprocessors, - decorators, - }; - } - getRulesForSpecVersion(version) { - switch (version) { - case oas_types_1.SpecMajorVersion.OAS3: - // eslint-disable-next-line no-case-declarations - const oas3Rules = []; - this.plugins.forEach((p) => p.preprocessors?.oas3 && oas3Rules.push(p.preprocessors.oas3)); - this.plugins.forEach((p) => p.rules?.oas3 && oas3Rules.push(p.rules.oas3)); - this.plugins.forEach((p) => p.decorators?.oas3 && oas3Rules.push(p.decorators.oas3)); - return oas3Rules; - case oas_types_1.SpecMajorVersion.OAS2: - // eslint-disable-next-line no-case-declarations - const oas2Rules = []; - this.plugins.forEach((p) => p.preprocessors?.oas2 && oas2Rules.push(p.preprocessors.oas2)); - this.plugins.forEach((p) => p.rules?.oas2 && oas2Rules.push(p.rules.oas2)); - this.plugins.forEach((p) => p.decorators?.oas2 && oas2Rules.push(p.decorators.oas2)); - return oas2Rules; - case oas_types_1.SpecMajorVersion.Async2: - // eslint-disable-next-line no-case-declarations - const asyncApi2Rules = []; - this.plugins.forEach((p) => p.preprocessors?.async2 && asyncApi2Rules.push(p.preprocessors.async2)); - this.plugins.forEach((p) => p.rules?.async2 && asyncApi2Rules.push(p.rules.async2)); - this.plugins.forEach((p) => p.decorators?.async2 && asyncApi2Rules.push(p.decorators.async2)); - return asyncApi2Rules; - case oas_types_1.SpecMajorVersion.Async3: - // eslint-disable-next-line no-case-declarations - const asyncApi3Rules = []; - this.plugins.forEach((p) => p.preprocessors?.async3 && asyncApi3Rules.push(p.preprocessors.async3)); - this.plugins.forEach((p) => p.rules?.async3 && asyncApi3Rules.push(p.rules.async3)); - this.plugins.forEach((p) => p.decorators?.async3 && asyncApi3Rules.push(p.decorators.async3)); - return asyncApi3Rules; - case oas_types_1.SpecMajorVersion.Arazzo1: - // eslint-disable-next-line no-case-declarations - const arazzo1Rules = []; - this.plugins.forEach((p) => p.preprocessors?.arazzo1 && arazzo1Rules.push(p.preprocessors.arazzo1)); - this.plugins.forEach((p) => p.rules?.arazzo1 && arazzo1Rules.push(p.rules.arazzo1)); - this.plugins.forEach((p) => p.decorators?.arazzo1 && arazzo1Rules.push(p.decorators.arazzo1)); - return arazzo1Rules; - case oas_types_1.SpecMajorVersion.Overlay1: - // eslint-disable-next-line no-case-declarations - const overlay1Rules = []; - this.plugins.forEach((p) => p.preprocessors?.overlay1 && overlay1Rules.push(p.preprocessors.overlay1)); - this.plugins.forEach((p) => p.rules?.overlay1 && overlay1Rules.push(p.rules.overlay1)); - this.plugins.forEach((p) => p.decorators?.overlay1 && overlay1Rules.push(p.decorators.overlay1)); - return overlay1Rules; - } - } - skipRules(rules) { - for (const ruleId of rules || []) { - for (const version of Object.values(oas_types_1.SpecVersion)) { - if (this.rules[version][ruleId]) { - this.rules[version][ruleId] = 'off'; - } - else if (Array.isArray(this.rules[version].assertions)) { - // skip assertions - for (const configurableRule of this.rules[version].assertions) { - if (configurableRule.assertionId === ruleId) { - configurableRule.severity = 'off'; - } - } + if (statusCode === HttpCodes.NotFound) { + resolve8(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a2 = new Date(value); + if (!isNaN(a2.valueOf())) { + return a2; } + } + return value; } - } - } - skipPreprocessors(preprocessors) { - for (const preprocessorId of preprocessors || []) { - for (const version of Object.values(oas_types_1.SpecVersion)) { - if (this.preprocessors[version][preprocessorId]) { - this.preprocessors[version][preprocessorId] = 'off'; + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options2 && options2.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { } - } - } - skipDecorators(decorators) { - for (const decoratorId of decorators || []) { - for (const version of Object.values(oas_types_1.SpecVersion)) { - if (this.decorators[version][decoratorId]) { - this.decorators[version][decoratorId] = 'off'; - } + 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 { + resolve8(response); } + })); + }); + } + }; + exports.HttpClient = HttpClient; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c2, k3) => (c2[k3.toLowerCase()] = obj[k3], c2), {}); + } +}); + +// node_modules/@actions/http-client/lib/auth.js +var require_auth = __commonJS({ + "node_modules/@actions/http-client/lib/auth.js"(exports) { + "use strict"; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P3, generator) { + function adopt(value) { + return value instanceof P3 ? value : new P3(function(resolve8) { + resolve8(value); + }); + } + return new (P3 || (P3 = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e2) { + reject(e2); + } } - } -} -exports.StyleguideConfig = StyleguideConfig; -// To support backwards compatibility with the old `spec` key we rename it to `struct`. -function replaceSpecWithStruct(ruleGroups, config) { - for (const ruleGroup of ruleGroups) { - if (config[ruleGroup] && (0, utils_1.isPlainObject)(config[ruleGroup]) && 'spec' in config[ruleGroup]) { - (0, utils_1.showWarningForDeprecatedField)('spec', 'struct'); - config[ruleGroup].struct = config[ruleGroup].spec; - delete config[ruleGroup].spec; + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e2) { + reject(e2); + } } - } -} -class Config { - constructor(rawConfig, configFile) { - this.rawConfig = rawConfig; - this.configFile = configFile; - this.apis = rawConfig.apis || {}; - this.styleguide = new StyleguideConfig(rawConfig.styleguide || {}, configFile); - this.theme = rawConfig.theme || {}; - this.resolve = (0, utils_2.getResolveConfig)(rawConfig?.resolve); - this.region = rawConfig.region; - this.organization = rawConfig.organization; - this.files = rawConfig.files || []; - this.telemetry = rawConfig.telemetry; - } -} -exports.Config = Config; - - -/***/ }), - -/***/ 50627: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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__(16556), exports); -__exportStar(__nccwpck_require__(35826), exports); -__exportStar(__nccwpck_require__(19802), exports); -__exportStar(__nccwpck_require__(96136), exports); -__exportStar(__nccwpck_require__(92098), exports); -__exportStar(__nccwpck_require__(4206), exports); -__exportStar(__nccwpck_require__(26135), exports); - - -/***/ }), - -/***/ 92098: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CONFIG_FILE_NAMES = void 0; -exports.loadConfig = loadConfig; -exports.findConfig = findConfig; -exports.getConfig = getConfig; -exports.createConfig = createConfig; -const fs = __nccwpck_require__(57147); -const path = __nccwpck_require__(71017); -const redocly_1 = __nccwpck_require__(60357); -const utils_1 = __nccwpck_require__(75450); -const js_yaml_1 = __nccwpck_require__(97268); -const utils_2 = __nccwpck_require__(4206); -const config_resolvers_1 = __nccwpck_require__(26135); -const bundle_1 = __nccwpck_require__(8043); -const resolve_1 = __nccwpck_require__(27098); -const env_1 = __nccwpck_require__(10876); -const domains_1 = __nccwpck_require__(2875); -async function addConfigMetadata({ rawConfig, customExtends, configPath, tokens, files, region, externalRefResolver, }) { - if (customExtends !== undefined) { - rawConfig.styleguide = rawConfig.styleguide || {}; - rawConfig.styleguide.extends = customExtends; - } - else if ((0, utils_1.isEmptyObject)(rawConfig)) { - rawConfig.styleguide = { extends: ['recommended'], recommendedFallback: true }; - } - if (tokens?.length) { - if (!rawConfig.resolve) - rawConfig.resolve = {}; - if (!rawConfig.resolve.http) - rawConfig.resolve.http = {}; - rawConfig.resolve.http.headers = [...(rawConfig.resolve.http.headers ?? [])]; - for (const item of tokens) { - const domain = domains_1.DOMAINS[item.region]; - rawConfig.resolve.http.headers.push({ - matches: `https://api.${domain}/registry/**`, - name: 'Authorization', - envVariable: undefined, - value: item.token, - }, - //support redocly.com domain for future compatibility - ...(item.region === 'us' - ? [ - { - matches: `https://api.redoc.ly/registry/**`, - name: 'Authorization', - envVariable: undefined, - value: item.token, - }, - ] - : [])); - } - } - return (0, config_resolvers_1.resolveConfig)({ - rawConfig: { - ...rawConfig, - files: files ?? rawConfig.files, - region: region ?? rawConfig.region, - }, - configPath, - externalRefResolver, - }); -} -async function loadConfig(options = {}) { - const { configPath = findConfig(), customExtends, processRawConfig, files, region, externalRefResolver, } = options; - const { rawConfig, document, parsed, resolvedRefMap } = await getConfig({ - configPath, - externalRefResolver, - }); - const redoclyClient = env_1.isBrowser ? undefined : new redocly_1.RedoclyClient(); - const tokens = redoclyClient && redoclyClient.hasTokens() ? redoclyClient.getAllTokens() : []; - const config = await addConfigMetadata({ - rawConfig, - customExtends, - configPath, - tokens, - files, - region, - externalRefResolver, - }); - if (document && parsed && resolvedRefMap && typeof processRawConfig === 'function') { - try { - await processRawConfig({ - document, - resolvedRefMap, - config, - parsed, - }); + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); } - catch (e) { - if (e instanceof utils_2.ConfigValidationError) { - throw e; - } - throw new Error(`Error parsing config file at '${configPath}': ${e.message}`); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options2) { + if (!options2.headers) { + throw Error("The request has no headers"); } - } - return config; -} -exports.CONFIG_FILE_NAMES = ['redocly.yaml', 'redocly.yml', '.redocly.yaml', '.redocly.yml']; -function findConfig(dir) { - if (!fs?.hasOwnProperty?.('existsSync')) - return; - const existingConfigFiles = exports.CONFIG_FILE_NAMES.map((name) => dir ? path.resolve(dir, name) : name).filter(fs.existsSync); - if (existingConfigFiles.length > 1) { - throw new Error(` - Multiple configuration files are not allowed. - Found the following files: ${existingConfigFiles.join(', ')}. - Please use 'redocly.yaml' instead. - `); - } - return existingConfigFiles[0]; -} -async function getConfig(options = {}) { - const { configPath = findConfig(), externalRefResolver = new resolve_1.BaseResolver() } = options; - if (!configPath) - return { rawConfig: {} }; - try { - const { document, resolvedRefMap } = await (0, config_resolvers_1.resolveConfigFileAndRefs)({ - configPath, - externalRefResolver, + options2.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); }); - const bundledRefMap = (0, utils_2.deepCloneMapWithJSON)(resolvedRefMap); - const parsed = await (0, bundle_1.bundleConfig)(JSON.parse(JSON.stringify(document)), bundledRefMap); - return { - rawConfig: (0, utils_2.transformConfig)(parsed), - document, - parsed, - resolvedRefMap, - }; - } - catch (e) { - throw new Error(`Error parsing config file at '${configPath}': ${e.message}`); - } -} -async function createConfig(config, options) { - return addConfigMetadata({ - rawConfig: (0, utils_2.transformConfig)(typeof config === 'string' ? (0, js_yaml_1.parseYaml)(config) : config), - ...options, - }); -} - - -/***/ }), - -/***/ 37906: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const minimal = { - rules: { - struct: 'error', - }, - oas2Rules: { - 'boolean-parameter-prefixes': 'off', - 'info-contact': 'off', - 'info-license': 'off', - 'info-license-url': 'off', - 'info-license-strict': 'off', - 'no-path-trailing-slash': 'warn', - 'no-identical-paths': 'warn', - 'no-ambiguous-paths': 'warn', - 'no-invalid-schema-examples': 'off', - 'no-invalid-parameter-examples': 'off', - 'no-http-verbs-in-paths': 'off', - 'no-enum-type-mismatch': 'warn', - 'no-unresolved-refs': 'error', - 'no-required-schema-properties-undefined': 'off', - 'no-schema-type-mismatch': 'off', - 'operation-summary': 'warn', - 'operation-operationId': 'warn', - 'operation-operationId-unique': 'warn', - 'operation-operationId-url-safe': 'warn', - 'operation-description': 'off', - 'operation-2xx-response': 'warn', - 'operation-4xx-response': 'off', - 'operation-parameters-unique': 'warn', - 'operation-tag-defined': 'off', - 'operation-singular-tag': 'off', - 'parameter-description': 'off', - 'path-declaration-must-exist': 'warn', - 'path-not-include-query': 'warn', - 'path-parameters-defined': 'warn', - 'paths-kebab-case': 'off', - 'path-excludes-patterns': 'off', - 'path-http-verbs-order': 'off', - 'path-params-defined': 'off', - 'path-segment-plural': 'off', - 'required-string-property-missing-min-length': 'off', - 'response-contains-header': 'off', - 'request-mime-type': 'off', - 'response-contains-property': 'off', - 'response-mime-type': 'off', - 'security-defined': 'warn', - 'spec-strict-refs': 'off', - 'scalar-property-missing-example': 'off', - 'tag-description': 'warn', - 'tags-alphabetical': 'off', - }, - oas3_0Rules: { - 'array-parameter-serialization': 'off', - 'boolean-parameter-prefixes': 'off', - 'component-name-unique': 'off', - 'info-contact': 'off', - 'info-license': 'off', - 'info-license-url': 'off', - 'info-license-strict': 'off', - 'no-ambiguous-paths': 'warn', - 'no-path-trailing-slash': 'warn', - 'no-identical-paths': 'warn', - 'no-invalid-schema-examples': 'off', - 'no-invalid-parameter-examples': 'off', - 'no-http-verbs-in-paths': 'off', - 'no-enum-type-mismatch': 'warn', - 'no-unresolved-refs': 'error', - 'no-required-schema-properties-undefined': 'off', - 'no-schema-type-mismatch': 'off', - 'no-invalid-media-type-examples': { - severity: 'warn', - allowAdditionalProperties: false, - }, - 'no-server-example.com': 'warn', - 'no-server-trailing-slash': 'error', - 'no-empty-servers': 'warn', - 'no-example-value-and-externalValue': 'warn', - 'no-unused-components': 'warn', - 'no-undefined-server-variable': 'warn', - 'no-server-variables-empty-enum': 'error', - 'operation-summary': 'warn', - 'operation-operationId': 'warn', - 'operation-operationId-unique': 'warn', - 'operation-operationId-url-safe': 'warn', - 'operation-description': 'off', - 'operation-2xx-response': 'warn', - 'operation-4xx-response': 'off', - 'operation-4xx-problem-details-rfc7807': 'off', - 'operation-parameters-unique': 'warn', - 'operation-tag-defined': 'off', - 'operation-singular-tag': 'off', - 'parameter-description': 'off', - 'path-declaration-must-exist': 'warn', - 'path-not-include-query': 'warn', - 'path-parameters-defined': 'warn', - 'paths-kebab-case': 'off', - 'path-excludes-patterns': 'off', - 'path-http-verbs-order': 'off', - 'path-params-defined': 'off', - 'path-segment-plural': 'off', - 'required-string-property-missing-min-length': 'off', - 'response-contains-header': 'off', - 'request-mime-type': 'off', - 'response-contains-property': 'off', - 'response-mime-type': 'off', - 'security-defined': 'warn', - 'spec-strict-refs': 'off', - 'scalar-property-missing-example': 'off', - 'spec-components-invalid-map-name': 'warn', - 'tag-description': 'warn', - 'tags-alphabetical': 'off', - }, - oas3_1Rules: { - 'array-parameter-serialization': 'off', - 'boolean-parameter-prefixes': 'off', - 'component-name-unique': 'off', - 'info-contact': 'off', - 'info-license': 'off', - 'info-license-url': 'off', - 'info-license-strict': 'off', - 'no-path-trailing-slash': 'warn', - 'no-identical-paths': 'warn', - 'no-ambiguous-paths': 'warn', - 'no-invalid-schema-examples': 'off', - 'no-invalid-parameter-examples': 'off', - 'no-http-verbs-in-paths': 'off', - 'no-enum-type-mismatch': 'warn', - 'no-unresolved-refs': 'error', - 'no-required-schema-properties-undefined': 'off', - 'no-schema-type-mismatch': 'off', - 'no-invalid-media-type-examples': 'warn', - 'no-server-example.com': 'warn', - 'no-server-trailing-slash': 'error', - 'no-empty-servers': 'warn', - 'no-example-value-and-externalValue': 'warn', - 'no-unused-components': 'warn', - 'no-undefined-server-variable': 'warn', - 'no-server-variables-empty-enum': 'error', - 'operation-summary': 'warn', - 'operation-operationId': 'warn', - 'operation-operationId-unique': 'warn', - 'operation-operationId-url-safe': 'warn', - 'operation-description': 'off', - 'operation-2xx-response': 'warn', - 'operation-4xx-response': 'off', - 'operation-4xx-problem-details-rfc7807': 'off', - 'operation-parameters-unique': 'warn', - 'operation-tag-defined': 'off', - 'operation-singular-tag': 'off', - 'parameter-description': 'off', - 'path-declaration-must-exist': 'warn', - 'path-not-include-query': 'warn', - 'path-parameters-defined': 'warn', - 'paths-kebab-case': 'off', - 'path-excludes-patterns': 'off', - 'path-http-verbs-order': 'off', - 'path-params-defined': 'off', - 'path-segment-plural': 'off', - 'required-string-property-missing-min-length': 'off', - 'response-contains-header': 'off', - 'request-mime-type': 'off', - 'response-contains-property': 'off', - 'response-mime-type': 'off', - 'security-defined': 'warn', - 'spec-strict-refs': 'off', - 'scalar-property-missing-example': 'off', - 'spec-components-invalid-map-name': 'warn', - 'tag-description': 'warn', - 'tags-alphabetical': 'off', - }, - async2Rules: { - 'channels-kebab-case': 'off', - 'info-contact': 'off', - 'info-license-strict': 'off', - 'no-channel-trailing-slash': 'off', - 'operation-operationId': 'warn', - 'tag-description': 'warn', - 'tags-alphabetical': 'off', - }, - async3Rules: { - 'channels-kebab-case': 'off', - 'info-contact': 'off', - 'info-license-strict': 'off', - 'no-channel-trailing-slash': 'off', - 'operation-operationId': 'warn', - 'tag-description': 'warn', - 'tags-alphabetical': 'off', - }, - arazzo1Rules: { - 'criteria-unique': 'off', - 'no-criteria-xpath': 'off', - 'parameters-unique': 'off', - 'requestBody-replacements-unique': 'off', - 'sourceDescription-type': 'off', - 'sourceDescriptions-not-empty': 'off', - 'step-onSuccess-unique': 'off', - 'step-onFailure-unique': 'off', - 'stepId-unique': 'error', - 'sourceDescription-name-unique': 'off', - 'respect-supported-versions': 'off', - 'workflowId-unique': 'error', - 'workflow-dependsOn': 'off', - }, - overlay1Rules: { - 'info-contact': 'off', - }, -}; -exports["default"] = minimal; - - -/***/ }), - -/***/ 53694: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const recommendedStrict = { - rules: { - struct: 'error', - }, - oas2Rules: { - 'boolean-parameter-prefixes': 'off', - 'info-contact': 'off', - 'info-license': 'error', - 'info-license-url': 'off', - 'info-license-strict': 'error', - 'no-path-trailing-slash': 'error', - 'no-identical-paths': 'error', - 'no-ambiguous-paths': 'error', - 'no-invalid-schema-examples': 'off', - 'no-invalid-parameter-examples': 'off', - 'no-http-verbs-in-paths': 'off', - 'no-enum-type-mismatch': 'error', - 'no-unresolved-refs': 'error', - 'no-required-schema-properties-undefined': 'off', - 'no-schema-type-mismatch': 'error', - 'operation-summary': 'error', - 'operation-operationId': 'error', - 'operation-operationId-unique': 'error', - 'operation-operationId-url-safe': 'error', - 'operation-description': 'off', - 'operation-2xx-response': 'error', - 'operation-4xx-response': 'error', - 'operation-parameters-unique': 'error', - 'operation-tag-defined': 'off', - 'operation-singular-tag': 'off', - 'parameter-description': 'off', - 'path-declaration-must-exist': 'error', - 'path-not-include-query': 'error', - 'path-parameters-defined': 'error', - 'paths-kebab-case': 'off', - 'path-excludes-patterns': 'off', - 'path-http-verbs-order': 'off', - 'path-params-defined': 'off', - 'path-segment-plural': 'off', - 'required-string-property-missing-min-length': 'off', - 'response-contains-header': 'off', - 'request-mime-type': 'off', - 'response-contains-property': 'off', - 'response-mime-type': 'off', - 'security-defined': 'error', - 'spec-strict-refs': 'off', - 'scalar-property-missing-example': 'off', - 'tag-description': 'error', - 'tags-alphabetical': 'off', - }, - oas3_0Rules: { - 'array-parameter-serialization': 'off', - 'boolean-parameter-prefixes': 'off', - 'component-name-unique': 'off', - 'info-contact': 'off', - 'info-license': 'error', - 'info-license-url': 'off', - 'info-license-strict': 'error', - 'no-path-trailing-slash': 'error', - 'no-identical-paths': 'error', - 'no-ambiguous-paths': 'error', - 'no-invalid-schema-examples': 'off', - 'no-invalid-parameter-examples': 'off', - 'no-http-verbs-in-paths': 'off', - 'no-enum-type-mismatch': 'error', - 'no-unresolved-refs': 'error', - 'no-required-schema-properties-undefined': 'off', - 'no-schema-type-mismatch': 'error', - 'no-invalid-media-type-examples': { - severity: 'error', - allowAdditionalProperties: false, - }, - 'no-server-example.com': 'error', - 'no-server-trailing-slash': 'error', - 'no-empty-servers': 'error', - 'no-example-value-and-externalValue': 'error', - 'no-unused-components': 'error', - 'no-undefined-server-variable': 'error', - 'no-server-variables-empty-enum': 'error', - 'operation-summary': 'error', - 'operation-operationId': 'error', - 'operation-operationId-unique': 'error', - 'operation-operationId-url-safe': 'error', - 'operation-description': 'off', - 'operation-2xx-response': 'error', - 'operation-4xx-response': 'error', - 'operation-4xx-problem-details-rfc7807': 'off', - 'operation-parameters-unique': 'error', - 'operation-tag-defined': 'off', - 'operation-singular-tag': 'off', - 'parameter-description': 'off', - 'path-declaration-must-exist': 'error', - 'path-not-include-query': 'error', - 'path-parameters-defined': 'error', - 'paths-kebab-case': 'off', - 'path-excludes-patterns': 'off', - 'path-http-verbs-order': 'off', - 'path-params-defined': 'off', - 'path-segment-plural': 'off', - 'required-string-property-missing-min-length': 'off', - 'response-contains-header': 'off', - 'request-mime-type': 'off', - 'response-contains-property': 'off', - 'response-mime-type': 'off', - 'security-defined': 'error', - 'spec-strict-refs': 'off', - 'scalar-property-missing-example': 'off', - 'spec-components-invalid-map-name': 'error', - 'tag-description': 'error', - 'tags-alphabetical': 'off', - }, - oas3_1Rules: { - 'array-parameter-serialization': 'off', - 'boolean-parameter-prefixes': 'off', - 'component-name-unique': 'off', - 'info-contact': 'off', - 'info-license': 'error', - 'info-license-url': 'off', - 'info-license-strict': 'error', - 'no-path-trailing-slash': 'error', - 'no-identical-paths': 'error', - 'no-ambiguous-paths': 'error', - 'no-invalid-schema-examples': 'off', - 'no-invalid-parameter-examples': 'off', - 'no-http-verbs-in-paths': 'off', - 'no-enum-type-mismatch': 'error', - 'no-unresolved-refs': 'error', - 'no-required-schema-properties-undefined': 'off', - 'no-schema-type-mismatch': 'error', - 'no-invalid-media-type-examples': 'error', - 'no-server-example.com': 'error', - 'no-server-trailing-slash': 'error', - 'no-empty-servers': 'error', - 'no-example-value-and-externalValue': 'error', - 'no-unused-components': 'error', - 'no-undefined-server-variable': 'error', - 'no-server-variables-empty-enum': 'error', - 'operation-summary': 'error', - 'operation-operationId': 'error', - 'operation-operationId-unique': 'error', - 'operation-operationId-url-safe': 'error', - 'operation-description': 'off', - 'operation-2xx-response': 'error', - 'operation-4xx-response': 'error', - 'operation-4xx-problem-details-rfc7807': 'off', - 'operation-parameters-unique': 'error', - 'operation-tag-defined': 'off', - 'operation-singular-tag': 'off', - 'parameter-description': 'off', - 'path-declaration-must-exist': 'error', - 'path-not-include-query': 'error', - 'path-parameters-defined': 'error', - 'paths-kebab-case': 'off', - 'path-excludes-patterns': 'off', - 'path-http-verbs-order': 'off', - 'path-params-defined': 'off', - 'path-segment-plural': 'off', - 'required-string-property-missing-min-length': 'off', - 'response-contains-header': 'off', - 'request-mime-type': 'off', - 'response-contains-property': 'off', - 'response-mime-type': 'off', - 'security-defined': 'error', - 'spec-strict-refs': 'off', - 'scalar-property-missing-example': 'off', - 'spec-components-invalid-map-name': 'error', - 'tag-description': 'error', - 'tags-alphabetical': 'off', - }, - async2Rules: { - 'channels-kebab-case': 'off', - 'info-contact': 'off', - 'info-license-strict': 'error', - 'no-channel-trailing-slash': 'off', - 'operation-operationId': 'error', - 'tag-description': 'error', - 'tags-alphabetical': 'off', - }, - async3Rules: { - 'channels-kebab-case': 'off', - 'info-contact': 'off', - 'info-license-strict': 'error', - 'no-channel-trailing-slash': 'off', - 'operation-operationId': 'error', - 'tag-description': 'error', - 'tags-alphabetical': 'off', - }, - arazzo1Rules: { - 'criteria-unique': 'error', - 'no-criteria-xpath': 'off', - 'parameters-unique': 'error', - 'requestBody-replacements-unique': 'error', - 'sourceDescription-type': 'error', - 'step-onSuccess-unique': 'error', - 'step-onFailure-unique': 'error', - 'stepId-unique': 'error', - 'sourceDescription-name-unique': 'error', - 'sourceDescriptions-not-empty': 'error', - 'respect-supported-versions': 'off', - 'workflowId-unique': 'error', - 'workflow-dependsOn': 'error', - }, - overlay1Rules: { - 'info-contact': 'off', - }, -}; -exports["default"] = recommendedStrict; - - -/***/ }), - -/***/ 77173: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const recommended = { - rules: { - struct: 'error', - }, - oas2Rules: { - 'boolean-parameter-prefixes': 'off', - 'info-contact': 'off', - 'info-license': 'warn', - 'info-license-url': 'off', - 'info-license-strict': 'warn', - 'no-path-trailing-slash': 'error', - 'no-identical-paths': 'error', - 'no-ambiguous-paths': 'warn', - 'no-invalid-schema-examples': 'off', - 'no-invalid-parameter-examples': 'off', - 'no-http-verbs-in-paths': 'off', - 'no-enum-type-mismatch': 'error', - 'no-unresolved-refs': 'error', - 'no-required-schema-properties-undefined': 'off', - 'no-schema-type-mismatch': 'warn', - 'operation-summary': 'error', - 'operation-description': 'off', - 'operation-operationId': 'warn', - 'operation-operationId-unique': 'error', - 'operation-operationId-url-safe': 'error', - 'operation-2xx-response': 'warn', - 'operation-4xx-response': 'warn', - 'operation-parameters-unique': 'error', - 'operation-tag-defined': 'off', - 'operation-singular-tag': 'off', - 'parameter-description': 'off', - 'path-declaration-must-exist': 'error', - 'path-not-include-query': 'error', - 'path-parameters-defined': 'error', - 'paths-kebab-case': 'off', - 'path-excludes-patterns': 'off', - 'path-http-verbs-order': 'off', - 'path-params-defined': 'off', - 'path-segment-plural': 'off', - 'required-string-property-missing-min-length': 'off', - 'response-contains-header': 'off', - 'request-mime-type': 'off', - 'response-contains-property': 'off', - 'response-mime-type': 'off', - 'security-defined': 'error', - 'spec-strict-refs': 'off', - 'scalar-property-missing-example': 'off', - 'tag-description': 'warn', - 'tags-alphabetical': 'off', - }, - oas3_0Rules: { - 'array-parameter-serialization': 'off', - 'boolean-parameter-prefixes': 'off', - 'component-name-unique': 'off', - 'info-contact': 'off', - 'info-license': 'warn', - 'info-license-url': 'off', - 'info-license-strict': 'warn', - 'no-path-trailing-slash': 'error', - 'no-identical-paths': 'error', - 'no-ambiguous-paths': 'warn', - 'no-invalid-schema-examples': 'off', - 'no-invalid-parameter-examples': 'off', - 'no-http-verbs-in-paths': 'off', - 'no-enum-type-mismatch': 'error', - 'no-unresolved-refs': 'error', - 'no-required-schema-properties-undefined': 'off', - 'no-schema-type-mismatch': 'warn', - 'no-invalid-media-type-examples': { - severity: 'warn', - allowAdditionalProperties: false, - }, - 'no-server-example.com': 'warn', - 'no-server-trailing-slash': 'error', - 'no-empty-servers': 'error', - 'no-example-value-and-externalValue': 'error', - 'no-unused-components': 'warn', - 'no-undefined-server-variable': 'error', - 'no-server-variables-empty-enum': 'error', - 'operation-summary': 'error', - 'operation-operationId': 'warn', - 'operation-operationId-unique': 'error', - 'operation-operationId-url-safe': 'error', - 'operation-description': 'off', - 'operation-2xx-response': 'warn', - 'operation-4xx-response': 'warn', - 'operation-4xx-problem-details-rfc7807': 'off', - 'operation-parameters-unique': 'error', - 'operation-tag-defined': 'off', - 'operation-singular-tag': 'off', - 'parameter-description': 'off', - 'path-declaration-must-exist': 'error', - 'path-not-include-query': 'error', - 'path-parameters-defined': 'error', - 'paths-kebab-case': 'off', - 'path-excludes-patterns': 'off', - 'path-http-verbs-order': 'off', - 'path-params-defined': 'off', - 'path-segment-plural': 'off', - 'required-string-property-missing-min-length': 'off', - 'response-contains-header': 'off', - 'request-mime-type': 'off', - 'response-contains-property': 'off', - 'response-mime-type': 'off', - 'security-defined': 'error', - 'spec-strict-refs': 'off', - 'scalar-property-missing-example': 'off', - 'spec-components-invalid-map-name': 'error', - 'tag-description': 'warn', - 'tags-alphabetical': 'off', - }, - oas3_1Rules: { - 'array-parameter-serialization': 'off', - 'boolean-parameter-prefixes': 'off', - 'component-name-unique': 'off', - 'info-contact': 'off', - 'info-license': 'warn', - 'info-license-url': 'off', - 'info-license-strict': 'warn', - 'no-path-trailing-slash': 'error', - 'no-identical-paths': 'error', - 'no-ambiguous-paths': 'warn', - 'no-invalid-schema-examples': 'off', - 'no-invalid-parameter-examples': 'off', - 'no-http-verbs-in-paths': 'off', - 'no-enum-type-mismatch': 'error', - 'no-unresolved-refs': 'error', - 'no-required-schema-properties-undefined': 'off', - 'no-schema-type-mismatch': 'warn', - 'no-invalid-media-type-examples': 'warn', - 'no-server-example.com': 'warn', - 'no-server-trailing-slash': 'error', - 'no-empty-servers': 'error', - 'no-example-value-and-externalValue': 'error', - 'no-unused-components': 'warn', - 'no-undefined-server-variable': 'error', - 'no-server-variables-empty-enum': 'error', - 'operation-summary': 'error', - 'operation-operationId': 'warn', - 'operation-operationId-unique': 'error', - 'operation-operationId-url-safe': 'error', - 'operation-description': 'off', - 'operation-2xx-response': 'warn', - 'operation-4xx-response': 'warn', - 'operation-4xx-problem-details-rfc7807': 'off', - 'operation-parameters-unique': 'error', - 'operation-tag-defined': 'off', - 'operation-singular-tag': 'off', - 'parameter-description': 'off', - 'path-declaration-must-exist': 'error', - 'path-not-include-query': 'error', - 'path-parameters-defined': 'error', - 'paths-kebab-case': 'off', - 'path-excludes-patterns': 'off', - 'path-http-verbs-order': 'off', - 'path-params-defined': 'off', - 'path-segment-plural': 'off', - 'required-string-property-missing-min-length': 'off', - 'response-contains-header': 'off', - 'request-mime-type': 'off', - 'response-contains-property': 'off', - 'response-mime-type': 'off', - 'security-defined': 'error', - 'spec-strict-refs': 'off', - 'scalar-property-missing-example': 'off', - 'spec-components-invalid-map-name': 'error', - 'tag-description': 'warn', - 'tags-alphabetical': 'off', - }, - async2Rules: { - 'channels-kebab-case': 'off', - 'info-contact': 'off', - 'info-license-strict': 'warn', - 'no-channel-trailing-slash': 'off', - 'operation-operationId': 'warn', - 'tag-description': 'warn', - 'tags-alphabetical': 'off', - }, - async3Rules: { - 'channels-kebab-case': 'off', - 'info-contact': 'off', - 'info-license-strict': 'warn', - 'no-channel-trailing-slash': 'off', - 'operation-operationId': 'warn', - 'tag-description': 'warn', - 'tags-alphabetical': 'off', - }, - arazzo1Rules: { - 'criteria-unique': 'warn', - 'no-criteria-xpath': 'off', - 'parameters-unique': 'error', - 'requestBody-replacements-unique': 'warn', - 'sourceDescription-type': 'error', - 'step-onSuccess-unique': 'warn', - 'step-onFailure-unique': 'warn', - 'stepId-unique': 'error', - 'sourceDescription-name-unique': 'error', - 'sourceDescriptions-not-empty': 'error', - 'respect-supported-versions': 'off', - 'workflowId-unique': 'error', - 'workflow-dependsOn': 'error', - }, - overlay1Rules: { - 'info-contact': 'off', - }, -}; -exports["default"] = recommended; - - -/***/ }), - -/***/ 19802: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.initRules = initRules; -const utils_1 = __nccwpck_require__(75450); -function initRules(rules, config, type, oasVersion) { - return rules - .flatMap((ruleset) => Object.keys(ruleset).map((ruleId) => { - const rule = ruleset[ruleId]; - const ruleSettings = type === 'rules' - ? config.getRuleSettings(ruleId, oasVersion) - : type === 'preprocessors' - ? config.getPreprocessorSettings(ruleId, oasVersion) - : config.getDecoratorSettings(ruleId, oasVersion); - if (ruleSettings.severity === 'off') { - return undefined; - } - const severity = ruleSettings.severity; - const message = ruleSettings.message; - const visitors = rule(ruleSettings); - if (Array.isArray(visitors)) { - return visitors.map((visitor) => ({ - severity, - ruleId, - message, - visitor: visitor, - })); - } - return { - severity, - message, - ruleId, - visitor: visitors, // note: actually it is only one visitor object - }; - })) - .flatMap((visitor) => visitor) - .filter(utils_1.isDefined); -} - - -/***/ }), - -/***/ 71447: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const spec = { - rules: { - struct: 'error', - }, - // TODO: populate with spec-related rules similar to `arazzo1Rules` - oas2Rules: {}, - oas3_0Rules: {}, - oas3_1Rules: {}, - async2Rules: {}, - async3Rules: {}, - arazzo1Rules: { - 'sourceDescription-type': 'error', - 'respect-supported-versions': 'off', - 'workflowId-unique': 'error', - 'stepId-unique': 'error', - 'sourceDescription-name-unique': 'error', - 'sourceDescriptions-not-empty': 'error', - 'workflow-dependsOn': 'error', - 'parameters-unique': 'error', - 'step-onSuccess-unique': 'error', - 'step-onFailure-unique': 'error', - 'requestBody-replacements-unique': 'error', - 'no-criteria-xpath': 'off', - 'criteria-unique': 'error', - }, - overlay1Rules: { - 'info-contact': 'warn', - }, -}; -exports["default"] = spec; - - -/***/ }), - -/***/ 35826: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); - - -/***/ }), - -/***/ 4206: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ConfigValidationError = void 0; -exports.parsePresetName = parsePresetName; -exports.transformApiDefinitionsToApis = transformApiDefinitionsToApis; -exports.prefixRules = prefixRules; -exports.mergeExtends = mergeExtends; -exports.getMergedConfig = getMergedConfig; -exports.checkForDeprecatedFields = checkForDeprecatedFields; -exports.transformConfig = transformConfig; -exports.getResolveConfig = getResolveConfig; -exports.getUniquePlugins = getUniquePlugins; -exports.deepCloneMapWithJSON = deepCloneMapWithJSON; -exports.isDeprecatedPluginFormat = isDeprecatedPluginFormat; -exports.isCommonJsPlugin = isCommonJsPlugin; -const utils_1 = __nccwpck_require__(75450); -const config_1 = __nccwpck_require__(16556); -const logger_1 = __nccwpck_require__(11339); -function parsePresetName(presetName) { - if (presetName.indexOf('/') > -1) { - const [pluginId, configName] = presetName.split('/'); - return { pluginId, configName }; - } - else { - return { pluginId: '', configName: presetName }; - } -} -function transformApiDefinitionsToApis(apiDefinitions) { - if (!apiDefinitions) - return undefined; - const apis = {}; - for (const [apiName, apiPath] of Object.entries(apiDefinitions)) { - apis[apiName] = { root: apiPath }; - } - return apis; -} -function extractFlatConfig({ plugins, extends: _extends, rules, oas2Rules, oas3_0Rules, oas3_1Rules, async2Rules, async3Rules, arazzo1Rules, overlay1Rules, preprocessors, oas2Preprocessors, oas3_0Preprocessors, oas3_1Preprocessors, async2Preprocessors, async3Preprocessors, arazzo1Preprocessors, overlay1Preprocessors, decorators, oas2Decorators, oas3_0Decorators, oas3_1Decorators, async2Decorators, async3Decorators, arazzo1Decorators, overlay1Decorators, ...rawConfigRest }) { - const styleguideConfig = { - plugins, - extends: _extends, - rules, - oas2Rules, - oas3_0Rules, - oas3_1Rules, - async2Rules, - async3Rules, - arazzo1Rules, - overlay1Rules, - preprocessors, - oas2Preprocessors, - oas3_0Preprocessors, - oas3_1Preprocessors, - async2Preprocessors, - async3Preprocessors, - arazzo1Preprocessors, - overlay1Preprocessors, - decorators, - oas2Decorators, - oas3_0Decorators, - oas3_1Decorators, - async2Decorators, - async3Decorators, - arazzo1Decorators, - overlay1Decorators, - doNotResolveExamples: rawConfigRest.resolve?.doNotResolveExamples, - }; - if ((rawConfigRest.lint && rawConfigRest.styleguide) || - (Object.values(styleguideConfig).some(utils_1.isDefined) && - (rawConfigRest.lint || rawConfigRest.styleguide))) { - throw new Error(`Do not use 'lint', 'styleguide' and flat syntax together. \nSee more about the configuration in the docs: https://redocly.com/docs/cli/configuration/ \n`); - } - return { - styleguideConfig: Object.values(styleguideConfig).some(utils_1.isDefined) - ? styleguideConfig - : undefined, - rawConfigRest, + } }; -} -function transformApis(legacyApis) { - if (!legacyApis) - return undefined; - const apis = {}; - for (const [apiName, { lint, ...apiContent }] of Object.entries(legacyApis)) { - const { styleguideConfig, rawConfigRest } = extractFlatConfig(apiContent); - apis[apiName] = { - styleguide: styleguideConfig || lint, - ...rawConfigRest, - }; - } - return apis; -} -function prefixRules(rules, prefix) { - if (!prefix) - return rules; - const res = {}; - for (const name of Object.keys(rules)) { - res[`${prefix}/${name}`] = rules[name]; - } - return res; -} -function mergeExtends(rulesConfList) { - const result = { - rules: {}, - oas2Rules: {}, - oas3_0Rules: {}, - oas3_1Rules: {}, - async2Rules: {}, - async3Rules: {}, - arazzo1Rules: {}, - overlay1Rules: {}, - preprocessors: {}, - oas2Preprocessors: {}, - oas3_0Preprocessors: {}, - oas3_1Preprocessors: {}, - async2Preprocessors: {}, - async3Preprocessors: {}, - arazzo1Preprocessors: {}, - overlay1Preprocessors: {}, - decorators: {}, - oas2Decorators: {}, - oas3_0Decorators: {}, - oas3_1Decorators: {}, - async2Decorators: {}, - async3Decorators: {}, - arazzo1Decorators: {}, - overlay1Decorators: {}, - plugins: [], - pluginPaths: [], - extendPaths: [], - }; - for (const rulesConf of rulesConfList) { - if (rulesConf.extends) { - throw new Error(`'extends' is not supported in shared configs yet:\n${JSON.stringify(rulesConf, null, 2)}`); - } - (0, utils_1.assignConfig)(result.rules, rulesConf.rules); - (0, utils_1.assignConfig)(result.oas2Rules, rulesConf.oas2Rules); - (0, utils_1.assignOnlyExistingConfig)(result.oas2Rules, rulesConf.rules); - (0, utils_1.assignConfig)(result.oas3_0Rules, rulesConf.oas3_0Rules); - (0, utils_1.assignOnlyExistingConfig)(result.oas3_0Rules, rulesConf.rules); - (0, utils_1.assignConfig)(result.oas3_1Rules, rulesConf.oas3_1Rules); - (0, utils_1.assignOnlyExistingConfig)(result.oas3_1Rules, rulesConf.rules); - (0, utils_1.assignConfig)(result.async2Rules, rulesConf.async2Rules); - (0, utils_1.assignOnlyExistingConfig)(result.async2Rules, rulesConf.rules); - (0, utils_1.assignConfig)(result.async3Rules, rulesConf.async3Rules); - (0, utils_1.assignOnlyExistingConfig)(result.async3Rules, rulesConf.rules); - (0, utils_1.assignConfig)(result.arazzo1Rules, rulesConf.arazzo1Rules); - (0, utils_1.assignOnlyExistingConfig)(result.arazzo1Rules, rulesConf.rules); - (0, utils_1.assignConfig)(result.overlay1Rules, rulesConf.overlay1Rules); - (0, utils_1.assignOnlyExistingConfig)(result.overlay1Rules, rulesConf.rules); - (0, utils_1.assignConfig)(result.preprocessors, rulesConf.preprocessors); - (0, utils_1.assignConfig)(result.oas2Preprocessors, rulesConf.oas2Preprocessors); - (0, utils_1.assignOnlyExistingConfig)(result.oas2Preprocessors, rulesConf.preprocessors); - (0, utils_1.assignConfig)(result.oas3_0Preprocessors, rulesConf.oas3_0Preprocessors); - (0, utils_1.assignOnlyExistingConfig)(result.oas3_0Preprocessors, rulesConf.preprocessors); - (0, utils_1.assignConfig)(result.oas3_1Preprocessors, rulesConf.oas3_1Preprocessors); - (0, utils_1.assignOnlyExistingConfig)(result.oas3_1Preprocessors, rulesConf.preprocessors); - (0, utils_1.assignConfig)(result.async2Preprocessors, rulesConf.async2Preprocessors); - (0, utils_1.assignOnlyExistingConfig)(result.async2Preprocessors, rulesConf.preprocessors); - (0, utils_1.assignConfig)(result.async3Preprocessors, rulesConf.async3Preprocessors); - (0, utils_1.assignOnlyExistingConfig)(result.async3Preprocessors, rulesConf.preprocessors); - (0, utils_1.assignConfig)(result.arazzo1Preprocessors, rulesConf.arazzo1Preprocessors); - (0, utils_1.assignOnlyExistingConfig)(result.arazzo1Preprocessors, rulesConf.preprocessors); - (0, utils_1.assignConfig)(result.overlay1Preprocessors, rulesConf.overlay1Preprocessors); - (0, utils_1.assignOnlyExistingConfig)(result.overlay1Preprocessors, rulesConf.preprocessors); - (0, utils_1.assignConfig)(result.decorators, rulesConf.decorators); - (0, utils_1.assignConfig)(result.oas2Decorators, rulesConf.oas2Decorators); - (0, utils_1.assignOnlyExistingConfig)(result.oas2Decorators, rulesConf.decorators); - (0, utils_1.assignConfig)(result.oas3_0Decorators, rulesConf.oas3_0Decorators); - (0, utils_1.assignOnlyExistingConfig)(result.oas3_0Decorators, rulesConf.decorators); - (0, utils_1.assignConfig)(result.oas3_1Decorators, rulesConf.oas3_1Decorators); - (0, utils_1.assignOnlyExistingConfig)(result.oas3_1Decorators, rulesConf.decorators); - (0, utils_1.assignConfig)(result.async2Decorators, rulesConf.async2Decorators); - (0, utils_1.assignOnlyExistingConfig)(result.async2Decorators, rulesConf.decorators); - (0, utils_1.assignConfig)(result.async3Decorators, rulesConf.async3Decorators); - (0, utils_1.assignOnlyExistingConfig)(result.async3Decorators, rulesConf.decorators); - (0, utils_1.assignConfig)(result.arazzo1Decorators, rulesConf.arazzo1Decorators); - (0, utils_1.assignOnlyExistingConfig)(result.arazzo1Decorators, rulesConf.decorators); - (0, utils_1.assignConfig)(result.overlay1Decorators, rulesConf.overlay1Decorators); - (0, utils_1.assignOnlyExistingConfig)(result.overlay1Decorators, rulesConf.decorators); - result.plugins.push(...(rulesConf.plugins || [])); - result.pluginPaths.push(...(rulesConf.pluginPaths || [])); - result.extendPaths.push(...new Set(rulesConf.extendPaths)); - } - return result; -} -function getMergedConfig(config, apiName) { - const extendPaths = [ - ...Object.values(config.apis).map((api) => api?.styleguide?.extendPaths), - config.rawConfig?.styleguide?.extendPaths, - ] - .flat() - .filter(utils_1.isTruthy); - const pluginPaths = [ - ...Object.values(config.apis).map((api) => api?.styleguide?.pluginPaths), - config.rawConfig?.styleguide?.pluginPaths, - ] - .flat() - .filter(utils_1.isTruthy); - return apiName - ? new config_1.Config({ - ...config.rawConfig, - styleguide: { - ...(config.apis[apiName] - ? config.apis[apiName].styleguide - : config.rawConfig.styleguide), - extendPaths, - pluginPaths, - }, - theme: { - ...config.rawConfig.theme, - ...config.apis[apiName]?.theme, - }, - files: [...config.files, ...(config.apis?.[apiName]?.files ?? [])], - // TODO: merge everything else here - }, config.configFile) - : config; -} -function checkForDeprecatedFields(deprecatedField, updatedField, rawConfig, updatedObject, link) { - const isDeprecatedFieldInApis = rawConfig.apis && - Object.values(rawConfig.apis).some((api) => api[deprecatedField]); - if (rawConfig[deprecatedField] && updatedField === null) { - (0, utils_1.showWarningForDeprecatedField)(deprecatedField, undefined, updatedObject, link); - } - if (rawConfig[deprecatedField] && updatedField && rawConfig[updatedField]) { - (0, utils_1.showErrorForDeprecatedField)(deprecatedField, updatedField); - } - if (rawConfig[deprecatedField] && updatedObject && rawConfig[updatedObject]) { - (0, utils_1.showErrorForDeprecatedField)(deprecatedField, updatedField, updatedObject); - } - if (rawConfig[deprecatedField] || isDeprecatedFieldInApis) { - (0, utils_1.showWarningForDeprecatedField)(deprecatedField, updatedField, updatedObject, link); - } -} -function transformConfig(rawConfig) { - const migratedFields = [ - ['apiDefinitions', 'apis', undefined, undefined], - ['referenceDocs', 'openapi', 'theme', undefined], - [ - 'lint', - undefined, - undefined, - 'https://redocly.com/docs/api-registry/guides/migration-guide-config-file/#changed-properties', - ], - [ - 'styleguide', - undefined, - undefined, - 'https://redocly.com/docs/api-registry/guides/migration-guide-config-file/#changed-properties', - ], - ['features.openapi', 'openapi', 'theme', undefined], - ]; - for (const [deprecatedField, updatedField, updatedObject, link] of migratedFields) { - checkForDeprecatedFields(deprecatedField, updatedField, rawConfig, updatedObject, link); - } - const { apis, apiDefinitions, referenceDocs, lint, ...rest } = rawConfig; - const { styleguideConfig, rawConfigRest } = extractFlatConfig(rest); - const transformedConfig = { - theme: { - openapi: { - ...referenceDocs, - ...rawConfig['features.openapi'], - ...rawConfig.theme?.openapi, - }, - mockServer: { - ...rawConfig['features.mockServer'], - ...rawConfig.theme?.mockServer, - }, - }, - apis: transformApis(apis) || transformApiDefinitionsToApis(apiDefinitions), - styleguide: styleguideConfig || lint, - ...rawConfigRest, + exports.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options2) { + if (!options2.headers) { + throw Error("The request has no headers"); + } + options2.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } }; - showDeprecationMessages(transformedConfig); - return transformedConfig; -} -function showDeprecationMessages(config) { - let allRules = { ...config.styleguide?.rules }; - for (const api of Object.values(config.apis || {})) { - allRules = { ...allRules, ...api?.styleguide?.rules }; - } - for (const ruleKey of Object.keys(allRules)) { - if (ruleKey.startsWith('assert/')) { - logger_1.logger.warn(`\nThe 'assert/' syntax in ${ruleKey} is deprecated. Update your configuration to use 'rule/' instead. Examples and more information: https://redocly.com/docs/cli/rules/configurable-rules/\n`); + exports.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options2) { + if (!options2.headers) { + throw Error("The request has no headers"); } - } -} -function getResolveConfig(resolve) { - return { - http: { - headers: resolve?.http?.headers ?? [], - customFetch: undefined, - }, + options2.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } }; -} -function getUniquePlugins(plugins) { - const seen = new Set(); - const results = []; - for (const p of plugins) { - if (!seen.has(p.id)) { - results.push(p); - seen.add(p.id); + exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils = __commonJS({ + "node_modules/@actions/core/lib/oidc-utils.js"(exports) { + "use strict"; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P3, generator) { + function adopt(value) { + return value instanceof P3 ? value : new P3(function(resolve8) { + resolve8(value); + }); + } + return new (P3 || (P3 = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e2) { + reject(e2); + } } - else if (p.id) { - logger_1.logger.warn(`Duplicate plugin id "${logger_1.colorize.red(p.id)}".\n`); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e2) { + reject(e2); + } } - } - return results; -} -class ConfigValidationError extends Error { -} -exports.ConfigValidationError = ConfigValidationError; -function deepCloneMapWithJSON(originalMap) { - return new Map(JSON.parse(JSON.stringify([...originalMap]))); -} -function isDeprecatedPluginFormat(plugin) { - return plugin !== undefined && typeof plugin === 'object' && 'id' in plugin; -} -function isCommonJsPlugin(plugin) { - return typeof plugin === 'function'; -} - - -/***/ }), - -/***/ 91246: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.decorators = void 0; -exports.decorators = {}; - - -/***/ }), - -/***/ 38338: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.decorators = void 0; -exports.decorators = {}; - - -/***/ }), - -/***/ 4144: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.decorators = void 0; -exports.decorators = {}; - - -/***/ }), - -/***/ 5752: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.filter = filter; -exports.checkIfMatchByStrategy = checkIfMatchByStrategy; -const ref_utils_1 = __nccwpck_require__(97977); -const utils_1 = __nccwpck_require__(75450); -function filter(node, ctx, criteria) { - const { parent, key } = ctx; - let didDelete = false; - if (Array.isArray(node)) { - for (let i = 0; i < node.length; i++) { - if ((0, ref_utils_1.isRef)(node[i])) { - const resolved = ctx.resolve(node[i]); - if (criteria(resolved.node)) { - node.splice(i, 1); - didDelete = true; - i--; - } - } - if (criteria(node[i])) { - node.splice(i, 1); - didDelete = true; - i--; - } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); } - } - else if ((0, utils_1.isPlainObject)(node)) { - for (const key of Object.keys(node)) { - node = node; - if ((0, ref_utils_1.isRef)(node[key])) { - const resolved = ctx.resolve(node[key]); - if (criteria(resolved.node)) { - delete node[key]; - didDelete = true; - } - } - if (criteria(node[key])) { - delete node[key]; - didDelete = true; - } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.OidcClient = void 0; + var http_client_1 = require_lib(); + var auth_1 = require_auth(); + var core_1 = require_core(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_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"); } - } - if (didDelete && ((0, utils_1.isEmptyObject)(node) || (0, utils_1.isEmptyArray)(node))) { - delete parent[key]; - } -} -function checkIfMatchByStrategy(nodeValue, decoratorValue, strategy) { - if (nodeValue === undefined || decoratorValue === undefined) { - return false; - } - if (!Array.isArray(decoratorValue) && !Array.isArray(nodeValue)) { - return nodeValue === decoratorValue; - } - decoratorValue = toArrayIfNeeded(decoratorValue); - nodeValue = toArrayIfNeeded(nodeValue); - if (strategy === 'any') { - return decoratorValue.some((item) => nodeValue.includes(item)); - } - if (strategy === 'all') { - return decoratorValue.every((item) => nodeValue.includes(item)); - } - return false; -} -function toArrayIfNeeded(value) { - return Array.isArray(value) ? value : [value]; -} - - -/***/ }), - -/***/ 6677: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FilterIn = void 0; -const filter_helper_1 = __nccwpck_require__(5752); -const DEFAULT_STRATEGY = 'any'; -const FilterIn = ({ property, value, matchStrategy }) => { - const strategy = matchStrategy || DEFAULT_STRATEGY; - const filterInCriteria = (item) => item?.[property] && !(0, filter_helper_1.checkIfMatchByStrategy)(item?.[property], value, strategy); - return { - any: { - enter: (node, ctx) => { - (0, filter_helper_1.filter)(node, ctx, filterInCriteria); - }, - }, + 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) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error2) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error2.statusCode} + + Error Message: ${error2.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 __awaiter(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error2) { + throw new Error(`Error message: ${error2.message}`); + } + }); + } }; -}; -exports.FilterIn = FilterIn; - - -/***/ }), - -/***/ 23907: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + exports.OidcClient = OidcClient; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FilterOut = void 0; -const filter_helper_1 = __nccwpck_require__(5752); -const DEFAULT_STRATEGY = 'any'; -const FilterOut = ({ property, value, matchStrategy }) => { - const strategy = matchStrategy || DEFAULT_STRATEGY; - const filterOutCriteria = (item) => (0, filter_helper_1.checkIfMatchByStrategy)(item?.[property], value, strategy); - return { - any: { - enter: (node, ctx) => { - (0, filter_helper_1.filter)(node, ctx, filterOutCriteria); - }, - }, +// node_modules/@actions/core/lib/summary.js +var require_summary = __commonJS({ + "node_modules/@actions/core/lib/summary.js"(exports) { + "use strict"; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P3, generator) { + function adopt(value) { + return value instanceof P3 ? value : new P3(function(resolve8) { + resolve8(value); + }); + } + return new (P3 || (P3 = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e2) { + reject(e2); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e2) { + reject(e2); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; -}; -exports.FilterOut = FilterOut; - - -/***/ }), - -/***/ 28988: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.InfoDescriptionOverride = void 0; -const utils_1 = __nccwpck_require__(75450); -const InfoDescriptionOverride = ({ filePath }) => { - return { - Info: { - leave(info, { report, location }) { - if (!filePath) - throw new Error(`Parameter "filePath" is not provided for "info-description-override" rule`); - try { - info.description = (0, utils_1.readFileAsStringSync)(filePath); - } - catch (e) { - report({ - message: `Failed to read markdown override file for "info.description".\n${e.message}`, - location: location.child('description'), - }); - } - }, - }, - }; -}; -exports.InfoDescriptionOverride = InfoDescriptionOverride; - - -/***/ }), - -/***/ 6615: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.InfoOverride = void 0; -const InfoOverride = (newInfo) => { - return { - Info: { - leave(info) { - if (typeof newInfo !== 'object' || Array.isArray(newInfo) || newInfo === null) { - throw new Error(`"info-override" decorator should be called with an object`); - } - const { severity: _, ...rest } = newInfo; - Object.assign(info, rest); - }, - }, + Object.defineProperty(exports, "__esModule", { value: true }); + exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; + var os_1 = __require("os"); + var fs_1 = __require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-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(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.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(options2) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options2 === null || options2 === void 0 ? void 0 : options2.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 __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(os_1.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, options2) { + const { width, height } = options2 || {}; + 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(); + } }; -}; -exports.InfoOverride = InfoOverride; - - -/***/ }), - -/***/ 11986: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + var _summary = new Summary(); + exports.markdownSummary = _summary; + exports.summary = _summary; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MediaTypeExamplesOverride = void 0; -const utils_1 = __nccwpck_require__(75450); -const ref_utils_1 = __nccwpck_require__(97977); -const MediaTypeExamplesOverride = ({ operationIds }) => { - return { - Operation: { - enter(operation, ctx) { - const operationId = operation.operationId; - if (!operationId) { - return; - } - const properties = operationIds[operationId]; - if (!properties) { - return; - } - if (properties.responses && operation.responses) { - for (const responseCode of Object.keys(properties.responses)) { - const resolvedResponse = checkAndResolveRef(operation.responses[responseCode], ctx.resolve); - if (!resolvedResponse) { - continue; - } - resolvedResponse.content = resolvedResponse.content ? resolvedResponse.content : {}; - Object.keys(properties.responses[responseCode]).forEach((mimeType) => { - resolvedResponse.content[mimeType] = { - ...resolvedResponse.content[mimeType], - examples: (0, utils_1.yamlAndJsonSyncReader)(properties.responses[responseCode][mimeType]), - }; - }); - operation.responses[responseCode] = resolvedResponse; - } - } - if (properties.request && operation.requestBody) { - const resolvedRequest = checkAndResolveRef(operation.requestBody, ctx.resolve); - if (!resolvedRequest) { - return; - } - resolvedRequest.content = resolvedRequest.content ? resolvedRequest.content : {}; - Object.keys(properties.request).forEach((mimeType) => { - resolvedRequest.content[mimeType] = { - ...resolvedRequest.content[mimeType], - examples: (0, utils_1.yamlAndJsonSyncReader)(properties.request[mimeType]), - }; - }); - operation.requestBody = resolvedRequest; - } - }, - }, +// node_modules/@actions/core/lib/path-utils.js +var require_path_utils = __commonJS({ + "node_modules/@actions/core/lib/path-utils.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + var desc = Object.getOwnPropertyDescriptor(m, k3); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k3]; + } }; + } + Object.defineProperty(o, k22, desc); + }) : (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + o[k22] = m[k3]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v3) { + Object.defineProperty(o, "default", { enumerable: true, value: v3 }); + }) : function(o, v3) { + o["default"] = v3; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; }; -}; -exports.MediaTypeExamplesOverride = MediaTypeExamplesOverride; -function checkAndResolveRef(node, resolver) { - if (!(0, ref_utils_1.isRef)(node)) { - return node; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; + var path13 = __importStar(__require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); } - const resolved = resolver(node); - return resolved.error ? undefined : JSON.parse(JSON.stringify(resolved.node)); -} - - -/***/ }), - -/***/ 50859: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + exports.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path13.sep); + } + exports.toPlatformPath = toPlatformPath; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OperationDescriptionOverride = void 0; -const utils_1 = __nccwpck_require__(75450); -const OperationDescriptionOverride = ({ operationIds }) => { - return { - Operation: { - leave(operation, { report, location }) { - if (!operation.operationId) - return; - if (!operationIds) - throw new Error(`Parameter "operationIds" is not provided for "operation-description-override" rule`); - const operationId = operation.operationId; - if (operationIds[operationId]) { - try { - operation.description = (0, utils_1.readFileAsStringSync)(operationIds[operationId]); - } - catch (e) { - report({ - message: `Failed to read markdown override file for operation "${operationId}".\n${e.message}`, - location: location.child('operationId').key(), - }); - } - } - }, - }, +// node_modules/@actions/io/lib/io-util.js +var require_io_util = __commonJS({ + "node_modules/@actions/io/lib/io-util.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + Object.defineProperty(o, k22, { enumerable: true, get: function() { + return m[k3]; + } }); + }) : (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + o[k22] = m[k3]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v3) { + Object.defineProperty(o, "default", { enumerable: true, value: v3 }); + }) : function(o, v3) { + o["default"] = v3; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) if (k3 !== "default" && Object.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; }; -}; -exports.OperationDescriptionOverride = OperationDescriptionOverride; - - -/***/ }), - -/***/ 16781: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RegistryDependencies = void 0; -const domains_1 = __nccwpck_require__(2875); -const RegistryDependencies = () => { - const registryDependencies = new Set(); - return { - Root: { - leave(_, ctx) { - const data = ctx.getVisitorData(); - data.links = Array.from(registryDependencies); - }, - }, - ref(node) { - if (node.$ref) { - const link = node.$ref.split('#/')[0]; - if ((0, domains_1.isRedoclyRegistryURL)(link)) { - registryDependencies.add(link); - } - } - }, + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P3, generator) { + function adopt(value) { + return value instanceof P3 ? value : new P3(function(resolve8) { + resolve8(value); + }); + } + return new (P3 || (P3 = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e2) { + reject(e2); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e2) { + reject(e2); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; -}; -exports.RegistryDependencies = RegistryDependencies; - - -/***/ }), - -/***/ 13245: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RemoveXInternal = void 0; -const utils_1 = __nccwpck_require__(75450); -const ref_utils_1 = __nccwpck_require__(97977); -const DEFAULT_INTERNAL_PROPERTY_NAME = 'x-internal'; -const RemoveXInternal = ({ internalFlagProperty = DEFAULT_INTERNAL_PROPERTY_NAME, }) => { - function removeInternal(node, ctx, originalMapping) { - const { parent, key } = ctx; - let didDelete = false; - if (Array.isArray(node)) { - for (let i = 0; i < node.length; i++) { - if ((0, ref_utils_1.isRef)(node[i])) { - const resolved = ctx.resolve(node[i]); - if (resolved.node?.[internalFlagProperty]) { - // First, remove the reference in the discriminator mapping, if it exists: - if ((0, utils_1.isPlainObject)(parent.discriminator?.mapping)) { - for (const mapping in parent.discriminator.mapping) { - if (originalMapping?.[mapping] === node[i].$ref) { - delete parent.discriminator.mapping[mapping]; - } - } - } - node.splice(i, 1); - didDelete = true; - i--; - } - } - if (node[i]?.[internalFlagProperty]) { - node.splice(i, 1); - didDelete = true; - i--; - } + var _a; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; + var fs9 = __importStar(__require("fs")); + var path13 = __importStar(__require("path")); + _a = fs9.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; + exports.IS_WINDOWS = process.platform === "win32"; + exports.UV_FS_O_EXLOCK = 268435456; + exports.READONLY = fs9.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter(this, void 0, void 0, function* () { + try { + yield exports.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter(this, void 0, void 0, function* () { + const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports.isDirectory = isDirectory; + function isRooted(p2) { + p2 = normalizeSeparators(p2); + if (!p2) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports.IS_WINDOWS) { + return p2.startsWith("\\") || /^[A-Z]:/i.test(p2); + } + return p2.startsWith("/"); + } + exports.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports.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 (exports.IS_WINDOWS) { + const upperExt = path13.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } } - else if ((0, utils_1.isPlainObject)(node)) { - for (const key of Object.keys(node)) { - if ((0, ref_utils_1.isRef)(node[key])) { - const resolved = ctx.resolve(node[key]); - if ((0, utils_1.isPlainObject)(resolved.node) && resolved.node?.[internalFlagProperty]) { - delete node[key]; - didDelete = true; - } - } - if ((0, utils_1.isPlainObject)(node[key]) && node[key]?.[internalFlagProperty]) { - delete node[key]; - didDelete = true; + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports.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 (exports.IS_WINDOWS) { + try { + const directory = path13.dirname(filePath); + const upperName = path13.basename(filePath).toUpperCase(); + for (const actualName of yield exports.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path13.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; + } } + } } - if (didDelete && ((0, utils_1.isEmptyObject)(node) || (0, utils_1.isEmptyArray)(node))) { - delete parent[key]; - } + return ""; + }); } - let originalMapping = {}; - return { - DiscriminatorMapping: { - enter: (mapping) => { - originalMapping = JSON.parse(JSON.stringify(mapping)); - }, - }, - any: { - enter: (node, ctx) => { - removeInternal(node, ctx, originalMapping); - }, - }, - }; -}; -exports.RemoveXInternal = RemoveXInternal; - - -/***/ }), - -/***/ 51351: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + exports.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p2) { + p2 = p2 || ""; + if (exports.IS_WINDOWS) { + p2 = p2.replace(/\//g, "\\"); + return p2.replace(/\\\\+/g, "\\"); + } + return p2.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports.getCmdPath = getCmdPath; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TagDescriptionOverride = void 0; -const utils_1 = __nccwpck_require__(75450); -const TagDescriptionOverride = ({ tagNames }) => { - return { - Tag: { - leave(tag, { report }) { - if (!tagNames) - throw new Error(`Parameter "tagNames" is not provided for "tag-description-override" rule`); - if (tagNames[tag.name]) { - try { - tag.description = (0, utils_1.readFileAsStringSync)(tagNames[tag.name]); - } - catch (e) { - report({ - message: `Failed to read markdown override file for tag "${tag.name}".\n${e.message}`, - }); - } - } - }, - }, +// node_modules/@actions/io/lib/io.js +var require_io = __commonJS({ + "node_modules/@actions/io/lib/io.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + Object.defineProperty(o, k22, { enumerable: true, get: function() { + return m[k3]; + } }); + }) : (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + o[k22] = m[k3]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v3) { + Object.defineProperty(o, "default", { enumerable: true, value: v3 }); + }) : function(o, v3) { + o["default"] = v3; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) if (k3 !== "default" && Object.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; }; -}; -exports.TagDescriptionOverride = TagDescriptionOverride; - - -/***/ }), - -/***/ 55390: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.decorators = void 0; -const registry_dependencies_1 = __nccwpck_require__(16781); -const operation_description_override_1 = __nccwpck_require__(50859); -const tag_description_override_1 = __nccwpck_require__(51351); -const info_description_override_1 = __nccwpck_require__(28988); -const info_override_1 = __nccwpck_require__(6615); -const remove_x_internal_1 = __nccwpck_require__(13245); -const filter_in_1 = __nccwpck_require__(6677); -const filter_out_1 = __nccwpck_require__(23907); -exports.decorators = { - 'registry-dependencies': registry_dependencies_1.RegistryDependencies, - 'operation-description-override': operation_description_override_1.OperationDescriptionOverride, - 'tag-description-override': tag_description_override_1.TagDescriptionOverride, - 'info-description-override': info_description_override_1.InfoDescriptionOverride, - 'info-override': info_override_1.InfoOverride, - 'remove-x-internal': remove_x_internal_1.RemoveXInternal, - 'filter-in': filter_in_1.FilterIn, - 'filter-out': filter_out_1.FilterOut, -}; - - -/***/ }), - -/***/ 43187: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RemoveUnusedComponents = void 0; -const utils_1 = __nccwpck_require__(75450); -const RemoveUnusedComponents = () => { - const components = new Map(); - function registerComponent(location, componentType, name) { - components.set(location.absolutePointer, { - usedIn: components.get(location.absolutePointer)?.usedIn ?? [], - componentType, - name, + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P3, generator) { + function adopt(value) { + return value instanceof P3 ? value : new P3(function(resolve8) { + resolve8(value); }); - } - function removeUnusedComponents(root, removedPaths) { - const removedLengthStart = removedPaths.length; - for (const [path, { usedIn, name, componentType }] of components) { - const used = usedIn.some((location) => !removedPaths.some((removed) => - // Check if the current location's absolute pointer starts with the 'removed' path - // and either its length matches exactly with 'removed' or the character after the 'removed' path is a '/' - location.absolutePointer.startsWith(removed) && - (location.absolutePointer.length === removed.length || - location.absolutePointer[removed.length] === '/'))); - if (!used && componentType) { - removedPaths.push(path); - delete root[componentType][name]; - components.delete(path); - if ((0, utils_1.isEmptyObject)(root[componentType])) { - delete root[componentType]; - } - } + } + return new (P3 || (P3 = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e2) { + reject(e2); + } } - return removedPaths.length > removedLengthStart - ? removeUnusedComponents(root, removedPaths) - : removedPaths.length; - } - return { - ref: { - leave(ref, { location, type, resolve, key }) { - if (['Schema', 'Parameter', 'Response', 'SecurityScheme'].includes(type.name)) { - const resolvedRef = resolve(ref); - if (!resolvedRef.location) - return; - const [fileLocation, localPointer] = resolvedRef.location.absolutePointer.split('#', 2); - const componentLevelLocalPointer = localPointer.split('/').slice(0, 3).join('/'); - const pointer = `${fileLocation}#${componentLevelLocalPointer}`; - const registered = components.get(pointer); - if (registered) { - registered.usedIn.push(location); - } - else { - components.set(pointer, { - usedIn: [location], - name: key.toString(), - }); - } - } - }, - }, - Root: { - leave(root, ctx) { - const data = ctx.getVisitorData(); - data.removedCount = removeUnusedComponents(root, []); - }, - }, - NamedSchemas: { - Schema(schema, { location, key }) { - if (!schema.allOf) { - registerComponent(location, 'definitions', key.toString()); - } - }, - }, - NamedParameters: { - Parameter(_parameter, { location, key }) { - registerComponent(location, 'parameters', key.toString()); - }, - }, - NamedResponses: { - Response(_response, { location, key }) { - registerComponent(location, 'responses', key.toString()); - }, - }, - NamedSecuritySchemes: { - SecurityScheme(_securityScheme, { location, key }) { - registerComponent(location, 'securityDefinitions', key.toString()); - }, - }, - }; -}; -exports.RemoveUnusedComponents = RemoveUnusedComponents; - - -/***/ }), - -/***/ 42391: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.decorators = void 0; -const registry_dependencies_1 = __nccwpck_require__(16781); -const operation_description_override_1 = __nccwpck_require__(50859); -const tag_description_override_1 = __nccwpck_require__(51351); -const info_description_override_1 = __nccwpck_require__(28988); -const info_override_1 = __nccwpck_require__(6615); -const remove_x_internal_1 = __nccwpck_require__(13245); -const filter_in_1 = __nccwpck_require__(6677); -const filter_out_1 = __nccwpck_require__(23907); -const media_type_examples_override_1 = __nccwpck_require__(11986); -exports.decorators = { - 'registry-dependencies': registry_dependencies_1.RegistryDependencies, - 'operation-description-override': operation_description_override_1.OperationDescriptionOverride, - 'tag-description-override': tag_description_override_1.TagDescriptionOverride, - 'info-description-override': info_description_override_1.InfoDescriptionOverride, - 'info-override': info_override_1.InfoOverride, - 'remove-x-internal': remove_x_internal_1.RemoveXInternal, - 'filter-in': filter_in_1.FilterIn, - 'filter-out': filter_out_1.FilterOut, - 'media-type-examples-override': media_type_examples_override_1.MediaTypeExamplesOverride, -}; - - -/***/ }), - -/***/ 62463: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RemoveUnusedComponents = void 0; -const utils_1 = __nccwpck_require__(75450); -const RemoveUnusedComponents = () => { - const components = new Map(); - function registerComponent(location, componentType, name) { - components.set(location.absolutePointer, { - usedIn: components.get(location.absolutePointer)?.usedIn ?? [], - componentType, - name, - }); - } - function removeUnusedComponents(root, removedPaths) { - const removedLengthStart = removedPaths.length; - for (const [path, { usedIn, name, componentType }] of components) { - const used = usedIn.some((location) => !removedPaths.some((removed) => location.absolutePointer.startsWith(removed) && - (location.absolutePointer.length === removed.length || - location.absolutePointer[removed.length] === '/'))); - if (!used && componentType && root.components) { - removedPaths.push(path); - const componentChild = root.components[componentType]; - delete componentChild[name]; - components.delete(path); - if ((0, utils_1.isEmptyObject)(componentChild)) { - delete root.components[componentType]; - } - } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e2) { + reject(e2); + } } - return removedPaths.length > removedLengthStart - ? removeUnusedComponents(root, removedPaths) - : removedPaths.length; - } - return { - ref: { - leave(ref, { location, type, resolve, key }) { - if (['Schema', 'Header', 'Parameter', 'Response', 'Example', 'RequestBody'].includes(type.name)) { - const resolvedRef = resolve(ref); - if (!resolvedRef.location) - return; - const [fileLocation, localPointer] = resolvedRef.location.absolutePointer.split('#', 2); - const componentLevelLocalPointer = localPointer.split('/').slice(0, 4).join('/'); - const pointer = `${fileLocation}#${componentLevelLocalPointer}`; - const registered = components.get(pointer); - if (registered) { - registered.usedIn.push(location); - } - else { - components.set(pointer, { - usedIn: [location], - name: key.toString(), - }); - } - } - }, - }, - Root: { - leave(root, ctx) { - const data = ctx.getVisitorData(); - data.removedCount = removeUnusedComponents(root, []); - if ((0, utils_1.isEmptyObject)(root.components)) { - delete root.components; - } - }, - }, - NamedSchemas: { - Schema(schema, { location, key }) { - if (!schema.allOf) { - registerComponent(location, 'schemas', key.toString()); - } - }, - }, - NamedParameters: { - Parameter(_parameter, { location, key }) { - registerComponent(location, 'parameters', key.toString()); - }, - }, - NamedResponses: { - Response(_response, { location, key }) { - registerComponent(location, 'responses', key.toString()); - }, - }, - NamedExamples: { - Example(_example, { location, key }) { - registerComponent(location, 'examples', key.toString()); - }, - }, - NamedRequestBodies: { - RequestBody(_requestBody, { location, key }) { - registerComponent(location, 'requestBodies', key.toString()); - }, - }, - NamedHeaders: { - Header(_header, { location, key }) { - registerComponent(location, 'headers', key.toString()); - }, - }, + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; -}; -exports.RemoveUnusedComponents = RemoveUnusedComponents; - - -/***/ }), - -/***/ 56344: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.decorators = void 0; -exports.decorators = {}; - - -/***/ }), - -/***/ 10876: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.env = exports.isBrowser = void 0; -exports.isBrowser = typeof window !== 'undefined' || - typeof process === 'undefined' || - process?.platform === 'browser'; // main and worker thread -exports.env = exports.isBrowser ? {} : process.env || {}; - - -/***/ }), - -/***/ 45660: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getCodeframe = getCodeframe; -exports.getLineColLocation = getLineColLocation; -exports.getAstNodeByPointer = getAstNodeByPointer; -const yamlAst = __nccwpck_require__(68342); -const ref_utils_1 = __nccwpck_require__(97977); -const logger_1 = __nccwpck_require__(11339); -const MAX_LINE_LENGTH = 150; -const MAX_CODEFRAME_LINES = 3; -// TODO: temporary -function parsePointer(pointer) { - return pointer.substr(2).split('/').map(ref_utils_1.unescapePointer); -} -function getCodeframe(location, color) { - logger_1.colorOptions.enabled = color; - const { start, end = { line: start.line, col: start.col + 1 }, source } = location; - const lines = source.getLines(); - const startLineNum = start.line; - const endLineNum = Math.max(Math.min(end.line, lines.length), start.line); - let skipLines = Math.max(endLineNum - startLineNum - MAX_CODEFRAME_LINES + 1, 0); - if (skipLines < 2) - skipLines = 0; // do not skip one line - // Lines specified like this: ["prefix", "string"], - const prefixedLines = []; - let currentPad = 0; - for (let i = startLineNum; i <= endLineNum; i++) { - if (skipLines > 0 && i >= endLineNum - skipLines) - break; - const line = lines[i - 1] || ''; - if (line !== '') - currentPad = padSize(line); - const startIdx = i === startLineNum ? start.col - 1 : currentPad; - const endIdx = i === endLineNum ? end.col - 1 : line.length; - prefixedLines.push([`${i}`, markLine(line, startIdx, endIdx, logger_1.colorize.red)]); - if (!color) - prefixedLines.push(['', underlineLine(line, startIdx, endIdx)]); - } - if (skipLines > 0) { - prefixedLines.push([ - `…`, - `${whitespace(currentPad)}${logger_1.colorize.gray(`< ${skipLines} more lines >`)}`, - ]); - // print last line - prefixedLines.push([ - `${endLineNum}`, - markLine(lines[endLineNum - 1], -1, end.col - 1, logger_1.colorize.red), - ]); - if (!color) - prefixedLines.push(['', underlineLine(lines[endLineNum - 1], -1, end.col - 1)]); - } - return printPrefixedLines([ - [`${startLineNum - 2}`, markLine(lines[startLineNum - 1 - 2])], - [`${startLineNum - 1}`, markLine(lines[startLineNum - 1 - 1])], - ...prefixedLines, - [`${endLineNum + 1}`, markLine(lines[endLineNum - 1 + 1])], - [`${endLineNum + 2}`, markLine(lines[endLineNum - 1 + 2])], - ]); - function markLine(line, startIdx = -1, endIdx = +Infinity, variant = logger_1.colorize.gray) { - if (!color) - return line; - if (!line) - return line; - if (startIdx === -1) { - startIdx = padSize(line); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; + var assert_1 = __require("assert"); + var path13 = __importStar(__require("path")); + var ioUtil = __importStar(require_io_util()); + function cp(source, dest, options2 = {}) { + return __awaiter(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options2); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; } - endIdx = Math.min(endIdx, line.length); - return (line.substr(0, startIdx) + variant(line.substring(startIdx, endIdx)) + line.substr(endIdx)); - } -} -function printPrefixedLines(lines) { - const existingLines = lines.filter(([_, line]) => line !== undefined); - const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length)); - const dedentLen = Math.min(...existingLines.map(([_, line]) => (line === '' ? Infinity : padSize(line)))); - return existingLines - .map(([prefix, line]) => logger_1.colorize.gray(leftPad(padLen, prefix) + ' |') + - (line ? ' ' + limitLineLength(line.substring(dedentLen)) : '')) - .join('\n'); -} -function limitLineLength(line, maxLen = MAX_LINE_LENGTH) { - const overflowLen = line.length - maxLen; - if (overflowLen > 0) { - const charsMoreText = logger_1.colorize.gray(`...<${overflowLen} chars>`); - return line.substring(0, maxLen - charsMoreText.length) + charsMoreText; - } - else { - return line; - } -} -function underlineLine(line, startIdx = -1, endIdx = +Infinity) { - if (startIdx === -1) { - startIdx = padSize(line); - } - endIdx = Math.min(endIdx, line.length); - return whitespace(startIdx) + '^'.repeat(Math.max(endIdx - startIdx, 1)); -} -function whitespace(len) { - return ' '.repeat(len); -} -function leftPad(len, str) { - return whitespace(len - str.length) + str; -} -function padSize(line) { - for (let i = 0; i < line.length; i++) { - if (line[i] !== ' ') - return i; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path13.join(dest, path13.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 (path13.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); } - return line.length; -} -function getLineColLocation(location) { - if (location.pointer === undefined) - return location; - const { source, pointer, reportOnKey } = location; - const ast = source.getAst(yamlAst.safeLoad); - const astNode = getAstNodeByPointer(ast, pointer, !!reportOnKey); - return { - ...location, - pointer: undefined, - ...positionsToLoc(source.body, astNode?.startPosition ?? 1, astNode?.endPosition ?? 1), - }; -} -function positionsToLoc(source, startPos, endPos) { - let currentLine = 1; - let currentCol = 1; - let start = { line: 1, col: 1 }; - for (let i = 0; i < endPos - 1; i++) { - if (i === startPos - 1) { - start = { line: currentLine, col: currentCol + 1 }; - } - if (source[i] === '\n') { - currentLine++; - currentCol = 1; - if (i === startPos - 1) { - start = { line: currentLine, col: currentCol }; - } - if (source[i + 1] === '\r') - i++; // TODO: test it - continue; + exports.cp = cp; + function mv(source, dest, options2 = {}) { + return __awaiter(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path13.join(dest, path13.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options2.force == null || options2.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } } - currentCol++; + yield mkdirP(path13.dirname(dest)); + yield ioUtil.rename(source, dest); + }); } - const end = startPos === endPos ? { ...start } : { line: currentLine, col: currentCol + 1 }; - return { start, end }; -} -function getAstNodeByPointer(root, pointer, reportOnKey) { - const pointerSegments = parsePointer(pointer); - if (root === undefined) { - return undefined; - } - let currentNode = root; - for (const key of pointerSegments) { - if (currentNode.kind === yamlAst.Kind.MAP) { - const mapping = currentNode.mappings.find((m) => m.key.value === key); - if (!mapping) - break; - currentNode = mapping; - if (!mapping?.value) - break; // If node has value - return value, if not - return node itself - currentNode = mapping.value; - } - else if (currentNode.kind === yamlAst.Kind.SEQ) { - const elem = currentNode.items[parseInt(key, 10)]; - if (!elem) - break; - currentNode = elem; + exports.mv = mv; + function rmRF(inputPath) { + return __awaiter(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); } + }); } - if (!reportOnKey) { - return currentNode; + exports.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); } - else { - const parent = currentNode.parent; - if (!parent) - return currentNode; - if (parent.kind === yamlAst.Kind.SEQ) { - return currentNode; + exports.mkdirP = mkdirP; + function which(tool, check) { + return __awaiter(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); } - else if (parent.kind === yamlAst.Kind.MAPPING) { - return parent.key; + if (check) { + const result = yield which(tool, false); + if (!result) { + if (ioUtil.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; } - else { - return currentNode; + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; } + return ""; + }); } -} - - -/***/ }), - -/***/ 61105: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getTotals = getTotals; -exports.formatProblems = formatProblems; -const path = __nccwpck_require__(71017); -const logger_1 = __nccwpck_require__(11339); -const output_1 = __nccwpck_require__(3052); -const codeframes_1 = __nccwpck_require__(45660); -const env_1 = __nccwpck_require__(10876); -const ref_utils_1 = __nccwpck_require__(97977); -const coreVersion = (__nccwpck_require__(43244)/* .version */ .i8); -const ERROR_MESSAGE = { - INVALID_SEVERITY_LEVEL: 'Invalid severity level; accepted values: error or warn', -}; -const BG_COLORS = { - warn: (str) => logger_1.colorize.bgYellow(logger_1.colorize.black(str)), - error: logger_1.colorize.bgRed, -}; -const COLORS = { - warn: logger_1.colorize.yellow, - error: logger_1.colorize.red, -}; -const SEVERITY_NAMES = { - warn: 'Warning', - error: 'Error', -}; -const CODECLIMATE_SEVERITY_MAPPING = { - error: 'critical', - warn: 'minor', -}; -const MAX_SUGGEST = 5; -function severityToNumber(severity) { - return severity === 'error' ? 1 : 2; -} -function getTotals(problems) { - let errors = 0; - let warnings = 0; - let ignored = 0; - for (const m of problems) { - if (m.ignored) { - ignored++; - continue; + exports.which = which; + function findInPath(tool) { + return __awaiter(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); } - if (m.severity === 'error') - errors++; - if (m.severity === 'warn') - warnings++; - } - return { - errors, - warnings, - ignored, - }; -} -function formatProblems(problems, opts) { - const { maxProblems = 100, cwd = env_1.isBrowser ? '' : process.cwd(), format = 'codeframe', color = logger_1.colorOptions.enabled, totals = getTotals(problems), version = coreVersion, } = opts; - logger_1.colorOptions.enabled = color; // force colors if specified - const totalProblems = problems.length; - problems = problems.filter((m) => !m.ignored); - const ignoredProblems = totalProblems - problems.length; - problems = problems - .sort((a, b) => severityToNumber(a.severity) - severityToNumber(b.severity)) - .slice(0, maxProblems); - if (!totalProblems && format !== 'json') - return; - switch (format) { - case 'json': - outputJSON(); - break; - case 'codeframe': - for (let i = 0; i < problems.length; i++) { - const problem = problems[i]; - logger_1.logger.info(`${formatCodeframe(problem, i)}\n`); - } - break; - case 'stylish': { - const groupedByFile = groupByFiles(problems); - for (const [file, { ruleIdPad, locationPad: positionPad, fileProblems }] of Object.entries(groupedByFile)) { - logger_1.logger.info(`${logger_1.colorize.blue((0, ref_utils_1.isAbsoluteUrl)(file) ? file : path.relative(cwd, file))}:\n`); - for (let i = 0; i < fileProblems.length; i++) { - const problem = fileProblems[i]; - logger_1.logger.info(`${formatStylish(problem, positionPad, ruleIdPad)}\n`); - } - logger_1.logger.info('\n'); + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path13.delimiter)) { + if (extension) { + extensions.push(extension); } - break; + } } - case 'markdown': { - const groupedByFile = groupByFiles(problems); - for (const [file, { fileProblems }] of Object.entries(groupedByFile)) { - output_1.output.write(`## Lint: ${(0, ref_utils_1.isAbsoluteUrl)(file) ? file : path.relative(cwd, file)}\n\n`); - output_1.output.write(`| Severity | Location | Problem | Message |\n`); - output_1.output.write(`|---|---|---|---|\n`); - for (let i = 0; i < fileProblems.length; i++) { - const problem = fileProblems[i]; - output_1.output.write(`${formatMarkdown(problem)}\n`); - } - output_1.output.write('\n'); - if (totals.errors > 0) { - output_1.output.write(`Validation failed\nErrors: ${totals.errors}\n`); - } - else { - output_1.output.write('Validation successful\n'); - } - if (totals.warnings > 0) { - output_1.output.write(`Warnings: ${totals.warnings}\n`); - } - output_1.output.write('\n'); - } - break; + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path13.sep)) { + return []; } - case 'checkstyle': { - const groupedByFile = groupByFiles(problems); - output_1.output.write('\n'); - output_1.output.write('\n'); - for (const [file, { fileProblems }] of Object.entries(groupedByFile)) { - output_1.output.write(`\n`); - fileProblems.forEach(formatCheckstyle); - output_1.output.write(`\n`); + const directories = []; + if (process.env.PATH) { + for (const p2 of process.env.PATH.split(path13.delimiter)) { + if (p2) { + directories.push(p2); } - output_1.output.write(`\n`); - break; + } } - case 'codeclimate': - outputForCodeClimate(); - break; - case 'summary': - formatSummary(problems); - break; - case 'github-actions': - outputForGithubActions(problems, cwd); + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path13.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); } - if (totalProblems - ignoredProblems > maxProblems) { - logger_1.logger.info(`< ... ${totalProblems - maxProblems} more problems hidden > ${logger_1.colorize.gray('increase with `--max-problems N`')}\n`); + exports.findInPath = findInPath; + function readCopyOptions(options2) { + const force = options2.force == null ? true : options2.force; + const recursive = Boolean(options2.recursive); + const copySourceDirectory = options2.copySourceDirectory == null ? true : Boolean(options2.copySourceDirectory); + return { force, recursive, copySourceDirectory }; } - function outputForCodeClimate() { - const issues = problems.map((p) => { - const location = p.location[0]; // TODO: support multiple location - const lineCol = (0, codeframes_1.getLineColLocation)(location); - return { - description: p.message, - location: { - path: (0, ref_utils_1.isAbsoluteUrl)(location.source.absoluteRef) - ? location.source.absoluteRef - : path.relative(cwd, location.source.absoluteRef), - lines: { - begin: lineCol.start.line, - }, - }, - severity: CODECLIMATE_SEVERITY_MAPPING[p.severity], - fingerprint: `${p.ruleId}${p.location.length > 0 ? '-' + p.location[0].pointer : ''}`, - }; - }); - output_1.output.write(JSON.stringify(issues, null, 2)); - } - function outputJSON() { - const resultObject = { - totals, - version, - problems: problems.map((p) => { - const problem = { - ...p, - location: p.location.map((location) => ({ - ...location, - source: { - ref: (0, ref_utils_1.isAbsoluteUrl)(location.source.absoluteRef) - ? location.source.absoluteRef - : path.relative(cwd, location.source.absoluteRef), - }, - })), - from: p.from - ? { - ...p.from, - source: { - ref: (0, ref_utils_1.isAbsoluteUrl)(p.from?.source.absoluteRef) - ? p.from?.source.absoluteRef - : path.relative(cwd, p.from?.source.absoluteRef || cwd), - }, - } - : undefined, - }; - if (env_1.env.FORMAT_JSON_WITH_CODEFRAMES) { - const location = p.location[0]; // TODO: support multiple locations - const loc = (0, codeframes_1.getLineColLocation)(location); - problem.codeframe = (0, codeframes_1.getCodeframe)(loc, color); - } - return problem; - }), - }; - output_1.output.write(JSON.stringify(resultObject, null, 2)); - } - function getBgColor(problem) { - const { severity } = problem; - if (!BG_COLORS[severity]) { - throw new Error(ERROR_MESSAGE.INVALID_SEVERITY_LEVEL); - } - return BG_COLORS[severity]; - } - function formatCodeframe(problem, idx) { - const bgColor = getBgColor(problem); - const location = problem.location[0]; // TODO: support multiple locations - const relativePath = (0, ref_utils_1.isAbsoluteUrl)(location.source.absoluteRef) - ? location.source.absoluteRef - : path.relative(cwd, location.source.absoluteRef); - const loc = (0, codeframes_1.getLineColLocation)(location); - const atPointer = location.pointer ? logger_1.colorize.gray(`at ${location.pointer}`) : ''; - const fileWithLoc = `${relativePath}:${loc.start.line}:${loc.start.col}`; - return (`[${idx + 1}] ${bgColor(fileWithLoc)} ${atPointer}\n\n` + - `${problem.message}\n\n` + - formatDidYouMean(problem) + - (0, codeframes_1.getCodeframe)(loc, color) + - '\n\n' + - formatFrom(cwd, problem.from) + - `${SEVERITY_NAMES[problem.severity]} was generated by the ${logger_1.colorize.blue(problem.ruleId)} rule.\n\n`); - } - function formatStylish(problem, locationPad, ruleIdPad) { - const color = COLORS[problem.severity]; - if (!SEVERITY_NAMES[problem.severity]) { - return 'Error not found severity. Please check your config file. Allowed values: `warn,error,off`'; - } - const severityName = color(SEVERITY_NAMES[problem.severity].toLowerCase().padEnd(7)); - const { start } = problem.location[0]; - return ` ${`${start.line}:${start.col}`.padEnd(locationPad)} ${severityName} ${problem.ruleId.padEnd(ruleIdPad)} ${problem.message}`; - } - function formatMarkdown(problem) { - if (!SEVERITY_NAMES[problem.severity]) { - return 'Error not found severity. Please check your config file. Allowed values: `warn,error,off`'; - } - const severityName = SEVERITY_NAMES[problem.severity].toLowerCase(); - const { start } = problem.location[0]; - return `| ${severityName} | line ${`${start.line}:${start.col}`} | [${problem.ruleId}](https://redocly.com/docs/cli/rules/${problem.ruleId}/) | ${problem.message} |`; - } - function formatCheckstyle(problem) { - const { line, col } = problem.location[0].start; - const severity = problem.severity == 'warn' ? 'warning' : 'error'; - const message = xmlEscape(problem.message); - const source = xmlEscape(problem.ruleId); - output_1.output.write(`\n`); + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter(this, void 0, void 0, function* () { + 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()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); } -} -function formatSummary(problems) { - const counts = {}; - for (const problem of problems) { - counts[problem.ruleId] = counts[problem.ruleId] || { count: 0, severity: problem.severity }; - counts[problem.ruleId].count++; - } - const sorted = Object.entries(counts).sort(([, a], [, b]) => { - const severityDiff = severityToNumber(a.severity) - severityToNumber(b.severity); - return severityDiff || b.count - a.count; - }); - for (const [ruleId, info] of sorted) { - const color = COLORS[info.severity]; - const severityName = color(SEVERITY_NAMES[info.severity].toLowerCase().padEnd(7)); - logger_1.logger.info(`${severityName} ${ruleId}: ${info.count}\n`); - } - logger_1.logger.info('\n'); -} -function formatFrom(cwd, location) { - if (!location) - return ''; - const relativePath = path.relative(cwd, location.source.absoluteRef); - const loc = (0, codeframes_1.getLineColLocation)(location); - const fileWithLoc = `${relativePath}:${loc.start.line}:${loc.start.col}`; - const atPointer = location.pointer ? logger_1.colorize.gray(`at ${location.pointer}`) : ''; - return `referenced from ${logger_1.colorize.blue(fileWithLoc)} ${atPointer} \n\n`; -} -function formatDidYouMean(problem) { - if (problem.suggest.length === 0) - return ''; - if (problem.suggest.length === 1) { - return `Did you mean: ${problem.suggest[0]} ?\n\n`; - } - else { - return `Did you mean:\n - ${problem.suggest.slice(0, MAX_SUGGEST).join('\n - ')}\n\n`; - } -} -const groupByFiles = (problems) => { - const fileGroups = {}; - for (const problem of problems) { - const absoluteRef = problem.location[0].source.absoluteRef; // TODO: multiple errors - fileGroups[absoluteRef] = fileGroups[absoluteRef] || { - fileProblems: [], - ruleIdPad: 0, - locationPad: 0, - }; - const mappedProblem = { ...problem, location: problem.location.map(codeframes_1.getLineColLocation) }; - fileGroups[absoluteRef].fileProblems.push(mappedProblem); - fileGroups[absoluteRef].ruleIdPad = Math.max(problem.ruleId.length, fileGroups[absoluteRef].ruleIdPad); - fileGroups[absoluteRef].locationPad = Math.max(Math.max(...mappedProblem.location.map((loc) => `${loc.start.line}:${loc.start.col}`.length)), fileGroups[absoluteRef].locationPad); - } - return fileGroups; -}; -function xmlEscape(s) { - // eslint-disable-next-line no-control-regex - return s.replace(/[<>&"'\x00-\x1F\x7F\u0080-\uFFFF]/gu, (char) => { - switch (char) { - case '<': - return '<'; - case '>': - return '>'; - case '&': - return '&'; - case '"': - return '"'; - case "'": - return '''; - default: - return `&#${char.charCodeAt(0)};`; - } - }); -} -function outputForGithubActions(problems, cwd) { - for (const problem of problems) { - for (const location of problem.location.map(codeframes_1.getLineColLocation)) { - let command; - switch (problem.severity) { - case 'error': - command = 'error'; - break; - case 'warn': - command = 'warning'; - break; + function copyFile(srcFile, destFile, force) { + return __awaiter(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e2) { + if (e2.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); } - const suggest = formatDidYouMean(problem); - const message = suggest !== '' ? problem.message + '\n\n' + suggest : problem.message; - const properties = { - title: problem.ruleId, - file: (0, ref_utils_1.isAbsoluteUrl)(location.source.absoluteRef) - ? location.source.absoluteRef - : path.relative(cwd, location.source.absoluteRef), - line: location.start.line, - col: location.start.col, - endLine: location.end?.line, - endColumn: location.end?.col, - }; - output_1.output.write(`::${command} ${formatProperties(properties)}::${escapeMessage(message)}\n`); - } - } - function formatProperties(props) { - return Object.entries(props) - .filter(([, v]) => v !== null && v !== undefined) - .map(([k, v]) => `${k}=${escapeProperty(v)}`) - .join(','); - } - function toString(v) { - if (v === null || v === undefined) { - return ''; - } - else if (typeof v === 'string' || v instanceof String) { - return v; + } + 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); } - return JSON.stringify(v); - } - function escapeMessage(v) { - return toString(v).replace(/%/g, '%25').replace(/\r/g, '%0D').replace(/\n/g, '%0A'); - } - function escapeProperty(v) { - return toString(v) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/:/g, '%3A') - .replace(/,/g, '%2C'); + }); } -} - - -/***/ }), - -/***/ 59307: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; + } +}); -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 })); -exports.validate = exports.lint = exports.getTotals = exports.formatProblems = exports.getLineColLocation = exports.getAstNodeByPointer = exports.walkDocument = exports.normalizeVisitors = exports.getTypes = exports.detectSpec = exports.SpecVersion = exports.getMajorSpecVersion = exports.SpecMajorVersion = exports.isAbsoluteUrl = exports.isRef = exports.unescapePointer = exports.stringifyYaml = exports.parseYaml = exports.makeDocumentFromString = exports.YamlParseError = exports.ResolveError = exports.resolveDocument = exports.BaseResolver = exports.Source = exports.RedoclyClient = exports.createConfig = exports.CONFIG_FILE_NAMES = exports.findConfig = exports.getConfig = exports.loadConfig = exports.transformConfig = exports.getMergedConfig = exports.IGNORE_FILE = exports.StyleguideConfig = exports.Config = exports.Stats = exports.normalizeTypes = exports.ConfigTypes = exports.AsyncApi3Types = exports.AsyncApi2Types = exports.Oas2Types = exports.Oas3Types = exports.Arazzo1Types = exports.Oas3_1Types = exports.pause = exports.getProxyAgent = exports.isTruthy = exports.doesYamlFileExist = exports.slash = exports.readFileFromUrl = void 0; -exports.bundleFromString = exports.mapTypeToComponent = exports.bundleDocument = exports.bundle = exports.lintConfig = exports.lintFromString = exports.lintDocument = void 0; -var utils_1 = __nccwpck_require__(75450); -Object.defineProperty(exports, "readFileFromUrl", ({ enumerable: true, get: function () { return utils_1.readFileFromUrl; } })); -Object.defineProperty(exports, "slash", ({ enumerable: true, get: function () { return utils_1.slash; } })); -Object.defineProperty(exports, "doesYamlFileExist", ({ enumerable: true, get: function () { return utils_1.doesYamlFileExist; } })); -Object.defineProperty(exports, "isTruthy", ({ enumerable: true, get: function () { return utils_1.isTruthy; } })); -Object.defineProperty(exports, "getProxyAgent", ({ enumerable: true, get: function () { return utils_1.getProxyAgent; } })); -Object.defineProperty(exports, "pause", ({ enumerable: true, get: function () { return utils_1.pause; } })); -var oas3_1_1 = __nccwpck_require__(53734); -Object.defineProperty(exports, "Oas3_1Types", ({ enumerable: true, get: function () { return oas3_1_1.Oas3_1Types; } })); -var arazzo_1 = __nccwpck_require__(54642); -Object.defineProperty(exports, "Arazzo1Types", ({ enumerable: true, get: function () { return arazzo_1.Arazzo1Types; } })); -var oas3_1 = __nccwpck_require__(67296); -Object.defineProperty(exports, "Oas3Types", ({ enumerable: true, get: function () { return oas3_1.Oas3Types; } })); -var oas2_1 = __nccwpck_require__(23289); -Object.defineProperty(exports, "Oas2Types", ({ enumerable: true, get: function () { return oas2_1.Oas2Types; } })); -var asyncapi2_1 = __nccwpck_require__(32311); -Object.defineProperty(exports, "AsyncApi2Types", ({ enumerable: true, get: function () { return asyncapi2_1.AsyncApi2Types; } })); -var asyncapi3_1 = __nccwpck_require__(4832); -Object.defineProperty(exports, "AsyncApi3Types", ({ enumerable: true, get: function () { return asyncapi3_1.AsyncApi3Types; } })); -var redocly_yaml_1 = __nccwpck_require__(74781); -Object.defineProperty(exports, "ConfigTypes", ({ enumerable: true, get: function () { return redocly_yaml_1.ConfigTypes; } })); -var types_1 = __nccwpck_require__(14143); -Object.defineProperty(exports, "normalizeTypes", ({ enumerable: true, get: function () { return types_1.normalizeTypes; } })); -var stats_1 = __nccwpck_require__(18373); -Object.defineProperty(exports, "Stats", ({ enumerable: true, get: function () { return stats_1.Stats; } })); -var config_1 = __nccwpck_require__(50627); -Object.defineProperty(exports, "Config", ({ enumerable: true, get: function () { return config_1.Config; } })); -Object.defineProperty(exports, "StyleguideConfig", ({ enumerable: true, get: function () { return config_1.StyleguideConfig; } })); -Object.defineProperty(exports, "IGNORE_FILE", ({ enumerable: true, get: function () { return config_1.IGNORE_FILE; } })); -Object.defineProperty(exports, "getMergedConfig", ({ enumerable: true, get: function () { return config_1.getMergedConfig; } })); -Object.defineProperty(exports, "transformConfig", ({ enumerable: true, get: function () { return config_1.transformConfig; } })); -Object.defineProperty(exports, "loadConfig", ({ enumerable: true, get: function () { return config_1.loadConfig; } })); -Object.defineProperty(exports, "getConfig", ({ enumerable: true, get: function () { return config_1.getConfig; } })); -Object.defineProperty(exports, "findConfig", ({ enumerable: true, get: function () { return config_1.findConfig; } })); -Object.defineProperty(exports, "CONFIG_FILE_NAMES", ({ enumerable: true, get: function () { return config_1.CONFIG_FILE_NAMES; } })); -Object.defineProperty(exports, "createConfig", ({ enumerable: true, get: function () { return config_1.createConfig; } })); -var redocly_1 = __nccwpck_require__(60357); -Object.defineProperty(exports, "RedoclyClient", ({ enumerable: true, get: function () { return redocly_1.RedoclyClient; } })); -__exportStar(__nccwpck_require__(2875), exports); -var resolve_1 = __nccwpck_require__(27098); -Object.defineProperty(exports, "Source", ({ enumerable: true, get: function () { return resolve_1.Source; } })); -Object.defineProperty(exports, "BaseResolver", ({ enumerable: true, get: function () { return resolve_1.BaseResolver; } })); -Object.defineProperty(exports, "resolveDocument", ({ enumerable: true, get: function () { return resolve_1.resolveDocument; } })); -Object.defineProperty(exports, "ResolveError", ({ enumerable: true, get: function () { return resolve_1.ResolveError; } })); -Object.defineProperty(exports, "YamlParseError", ({ enumerable: true, get: function () { return resolve_1.YamlParseError; } })); -Object.defineProperty(exports, "makeDocumentFromString", ({ enumerable: true, get: function () { return resolve_1.makeDocumentFromString; } })); -var js_yaml_1 = __nccwpck_require__(97268); -Object.defineProperty(exports, "parseYaml", ({ enumerable: true, get: function () { return js_yaml_1.parseYaml; } })); -Object.defineProperty(exports, "stringifyYaml", ({ enumerable: true, get: function () { return js_yaml_1.stringifyYaml; } })); -var ref_utils_1 = __nccwpck_require__(97977); -Object.defineProperty(exports, "unescapePointer", ({ enumerable: true, get: function () { return ref_utils_1.unescapePointer; } })); -Object.defineProperty(exports, "isRef", ({ enumerable: true, get: function () { return ref_utils_1.isRef; } })); -Object.defineProperty(exports, "isAbsoluteUrl", ({ enumerable: true, get: function () { return ref_utils_1.isAbsoluteUrl; } })); -var oas_types_1 = __nccwpck_require__(46707); -Object.defineProperty(exports, "SpecMajorVersion", ({ enumerable: true, get: function () { return oas_types_1.SpecMajorVersion; } })); -Object.defineProperty(exports, "getMajorSpecVersion", ({ enumerable: true, get: function () { return oas_types_1.getMajorSpecVersion; } })); -Object.defineProperty(exports, "SpecVersion", ({ enumerable: true, get: function () { return oas_types_1.SpecVersion; } })); -Object.defineProperty(exports, "detectSpec", ({ enumerable: true, get: function () { return oas_types_1.detectSpec; } })); -Object.defineProperty(exports, "getTypes", ({ enumerable: true, get: function () { return oas_types_1.getTypes; } })); -var visitors_1 = __nccwpck_require__(23555); -Object.defineProperty(exports, "normalizeVisitors", ({ enumerable: true, get: function () { return visitors_1.normalizeVisitors; } })); -var walk_1 = __nccwpck_require__(57523); -Object.defineProperty(exports, "walkDocument", ({ enumerable: true, get: function () { return walk_1.walkDocument; } })); -var codeframes_1 = __nccwpck_require__(45660); -Object.defineProperty(exports, "getAstNodeByPointer", ({ enumerable: true, get: function () { return codeframes_1.getAstNodeByPointer; } })); -Object.defineProperty(exports, "getLineColLocation", ({ enumerable: true, get: function () { return codeframes_1.getLineColLocation; } })); -var format_1 = __nccwpck_require__(61105); -Object.defineProperty(exports, "formatProblems", ({ enumerable: true, get: function () { return format_1.formatProblems; } })); -Object.defineProperty(exports, "getTotals", ({ enumerable: true, get: function () { return format_1.getTotals; } })); -var lint_1 = __nccwpck_require__(464); -Object.defineProperty(exports, "lint", ({ enumerable: true, get: function () { return lint_1.lint; } })); -Object.defineProperty(exports, "validate", ({ enumerable: true, get: function () { return lint_1.lint; } })); -Object.defineProperty(exports, "lintDocument", ({ enumerable: true, get: function () { return lint_1.lintDocument; } })); -Object.defineProperty(exports, "lintFromString", ({ enumerable: true, get: function () { return lint_1.lintFromString; } })); -Object.defineProperty(exports, "lintConfig", ({ enumerable: true, get: function () { return lint_1.lintConfig; } })); -var bundle_1 = __nccwpck_require__(8043); -Object.defineProperty(exports, "bundle", ({ enumerable: true, get: function () { return bundle_1.bundle; } })); -Object.defineProperty(exports, "bundleDocument", ({ enumerable: true, get: function () { return bundle_1.bundleDocument; } })); -Object.defineProperty(exports, "mapTypeToComponent", ({ enumerable: true, get: function () { return bundle_1.mapTypeToComponent; } })); -Object.defineProperty(exports, "bundleFromString", ({ enumerable: true, get: function () { return bundle_1.bundleFromString; } })); - - -/***/ }), - -/***/ 97268: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.stringifyYaml = exports.parseYaml = void 0; -// TODO: add a type for "types" https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/js-yaml/index.d.ts -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -const js_yaml_1 = __nccwpck_require__(21917); -const DEFAULT_SCHEMA_WITHOUT_TIMESTAMP = js_yaml_1.JSON_SCHEMA.extend({ - implicit: [js_yaml_1.types.merge], - explicit: [js_yaml_1.types.binary, js_yaml_1.types.omap, js_yaml_1.types.pairs, js_yaml_1.types.set], -}); -const parseYaml = (str, opts) => (0, js_yaml_1.load)(str, { schema: DEFAULT_SCHEMA_WITHOUT_TIMESTAMP, ...opts }); -exports.parseYaml = parseYaml; -const stringifyYaml = (obj, opts) => (0, js_yaml_1.dump)(obj, opts); -exports.stringifyYaml = stringifyYaml; - - -/***/ }), - -/***/ 464: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.lint = lint; -exports.lintFromString = lintFromString; -exports.lintDocument = lintDocument; -exports.lintConfig = lintConfig; -const config_1 = __nccwpck_require__(20223); -const resolve_1 = __nccwpck_require__(27098); -const visitors_1 = __nccwpck_require__(23555); -const walk_1 = __nccwpck_require__(57523); -const config_2 = __nccwpck_require__(50627); -const types_1 = __nccwpck_require__(14143); -const ajv_1 = __nccwpck_require__(75166); -const oas_types_1 = __nccwpck_require__(46707); -const redocly_yaml_1 = __nccwpck_require__(74781); -const struct_1 = __nccwpck_require__(16612); -const no_unresolved_refs_1 = __nccwpck_require__(34440); -async function lint(opts) { - const { ref, externalRefResolver = new resolve_1.BaseResolver(opts.config.resolve) } = opts; - const document = (await externalRefResolver.resolveDocument(null, ref, true)); - opts.collectSpecData?.(document.parsed); - return lintDocument({ - document, - ...opts, - externalRefResolver, - config: opts.config.styleguide, - }); -} -async function lintFromString(opts) { - const { source, absoluteRef, externalRefResolver = new resolve_1.BaseResolver(opts.config.resolve) } = opts; - const document = (0, resolve_1.makeDocumentFromString)(source, absoluteRef || '/'); - return lintDocument({ - document, - ...opts, - externalRefResolver, - config: opts.config.styleguide, - }); -} -async function lintDocument(opts) { - (0, ajv_1.releaseAjvInstance)(); // FIXME: preprocessors can modify nodes which are then cached to ajv-instance by absolute path - const { document, customTypes, externalRefResolver, config } = opts; - const specVersion = (0, oas_types_1.detectSpec)(document.parsed); - const specMajorVersion = (0, oas_types_1.getMajorSpecVersion)(specVersion); - const rules = config.getRulesForSpecVersion(specMajorVersion); - const types = (0, types_1.normalizeTypes)(config.extendTypes(customTypes ?? (0, oas_types_1.getTypes)(specVersion), specVersion), config); - const ctx = { - problems: [], - oasVersion: specVersion, - visitorsData: {}, - }; - const preprocessors = (0, config_2.initRules)(rules, config, 'preprocessors', specVersion); - const regularRules = (0, config_2.initRules)(rules, config, 'rules', specVersion); - let resolvedRefMap = await (0, resolve_1.resolveDocument)({ - rootDocument: document, - rootType: types.Root, - externalRefResolver, +// node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner = __commonJS({ + "node_modules/@actions/exec/lib/toolrunner.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + Object.defineProperty(o, k22, { enumerable: true, get: function() { + return m[k3]; + } }); + }) : (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + o[k22] = m[k3]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v3) { + Object.defineProperty(o, "default", { enumerable: true, value: v3 }); + }) : function(o, v3) { + o["default"] = v3; }); - if (preprocessors.length > 0) { - // Make additional pass to resolve refs defined in preprocessors. - (0, walk_1.walkDocument)({ - document, - rootType: types.Root, - normalizedVisitors: (0, visitors_1.normalizeVisitors)(preprocessors, types), - resolvedRefMap, - ctx, - }); - resolvedRefMap = await (0, resolve_1.resolveDocument)({ - rootDocument: document, - rootType: types.Root, - externalRefResolver, + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) if (k3 !== "default" && Object.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; + }; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P3, generator) { + function adopt(value) { + return value instanceof P3 ? value : new P3(function(resolve8) { + resolve8(value); }); - } - const normalizedVisitors = (0, visitors_1.normalizeVisitors)(regularRules, types); - (0, walk_1.walkDocument)({ - document, - rootType: types.Root, - normalizedVisitors, - resolvedRefMap, - ctx, - }); - return ctx.problems.map((problem) => config.addProblemToIgnore(problem)); -} -async function lintConfig(opts) { - const { document, severity, externalRefResolver = new resolve_1.BaseResolver(), config } = opts; - const ctx = { - problems: [], - oasVersion: oas_types_1.SpecVersion.OAS3_0, - visitorsData: {}, - }; - const types = (0, types_1.normalizeTypes)(opts.externalConfigTypes || (0, redocly_yaml_1.createConfigTypes)(config_1.rootRedoclyConfigSchema, config), { doNotResolveExamples: config.styleguide.doNotResolveExamples }); - const rules = [ - { - severity: severity || 'error', - ruleId: 'configuration spec', - visitor: (0, struct_1.Struct)({ severity: 'error' }), - }, - { - severity: severity || 'error', - ruleId: 'configuration no-unresolved-refs', - visitor: (0, no_unresolved_refs_1.NoUnresolvedRefs)({ severity: 'error' }), - }, - ]; - const normalizedVisitors = (0, visitors_1.normalizeVisitors)(rules, types); - const resolvedRefMap = opts.resolvedRefMap || - (await (0, resolve_1.resolveDocument)({ - rootDocument: document, - rootType: types.ConfigRoot, - externalRefResolver, - })); - (0, walk_1.walkDocument)({ - document, - rootType: types.ConfigRoot, - normalizedVisitors, - resolvedRefMap, - ctx, - }); - return ctx.problems; -} - - -/***/ }), - -/***/ 11339: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.logger = exports.colorize = exports.colorOptions = void 0; -const colorette = __nccwpck_require__(53278); -const env_1 = __nccwpck_require__(10876); -const utils_1 = __nccwpck_require__(75450); -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore this works but some types are not working -exports.colorOptions = colorette.options; -exports.colorize = new Proxy(colorette, { - get(target, prop) { - if (env_1.isBrowser) { - return utils_1.identity; + } + return new (P3 || (P3 = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e2) { + reject(e2); + } } - return target[prop]; - }, -}); -class Logger { - stderr(str) { - return process.stderr.write(str); - } - info(str) { - return env_1.isBrowser ? console.log(str) : this.stderr(str); - } - warn(str) { - return env_1.isBrowser ? console.warn(str) : this.stderr(exports.colorize.yellow(str)); - } - error(str) { - return env_1.isBrowser ? console.error(str) : this.stderr(exports.colorize.red(str)); - } -} -exports.logger = new Logger(); - - -/***/ }), - -/***/ 46707: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SpecMajorVersion = exports.SpecVersion = void 0; -exports.detectSpec = detectSpec; -exports.getMajorSpecVersion = getMajorSpecVersion; -exports.getTypes = getTypes; -const oas2_1 = __nccwpck_require__(23289); -const oas3_1 = __nccwpck_require__(67296); -const oas3_1_1 = __nccwpck_require__(53734); -const asyncapi2_1 = __nccwpck_require__(32311); -const asyncapi3_1 = __nccwpck_require__(4832); -const arazzo_1 = __nccwpck_require__(54642); -const overlay_1 = __nccwpck_require__(78223); -const utils_1 = __nccwpck_require__(75450); -const arazzo_2 = __nccwpck_require__(17675); -var SpecVersion; -(function (SpecVersion) { - SpecVersion["OAS2"] = "oas2"; - SpecVersion["OAS3_0"] = "oas3_0"; - SpecVersion["OAS3_1"] = "oas3_1"; - SpecVersion["Async2"] = "async2"; - SpecVersion["Async3"] = "async3"; - SpecVersion["Arazzo1"] = "arazzo1"; - SpecVersion["Overlay1"] = "overlay1"; -})(SpecVersion || (exports.SpecVersion = SpecVersion = {})); -var SpecMajorVersion; -(function (SpecMajorVersion) { - SpecMajorVersion["OAS2"] = "oas2"; - SpecMajorVersion["OAS3"] = "oas3"; - SpecMajorVersion["Async2"] = "async2"; - SpecMajorVersion["Async3"] = "async3"; - SpecMajorVersion["Arazzo1"] = "arazzo1"; - SpecMajorVersion["Overlay1"] = "overlay1"; -})(SpecMajorVersion || (exports.SpecMajorVersion = SpecMajorVersion = {})); -const typesMap = { - [SpecVersion.OAS2]: oas2_1.Oas2Types, - [SpecVersion.OAS3_0]: oas3_1.Oas3Types, - [SpecVersion.OAS3_1]: oas3_1_1.Oas3_1Types, - [SpecVersion.Async2]: asyncapi2_1.AsyncApi2Types, - [SpecVersion.Async3]: asyncapi3_1.AsyncApi3Types, - [SpecVersion.Arazzo1]: arazzo_1.Arazzo1Types, - [SpecVersion.Overlay1]: overlay_1.Overlay1Types, -}; -function detectSpec(root) { - if (!(0, utils_1.isPlainObject)(root)) { - throw new Error(`Document must be JSON object, got ${typeof root}`); - } - if (root.openapi && typeof root.openapi !== 'string') { - throw new Error(`Invalid OpenAPI version: should be a string but got "${typeof root.openapi}"`); - } - if (typeof root.openapi === 'string' && root.openapi.startsWith('3.0')) { - return SpecVersion.OAS3_0; - } - if (typeof root.openapi === 'string' && root.openapi.startsWith('3.1')) { - return SpecVersion.OAS3_1; - } - if (root.swagger && root.swagger === '2.0') { - return SpecVersion.OAS2; - } - if (root.openapi || root.swagger) { - throw new Error(`Unsupported OpenAPI version: ${root.openapi || root.swagger}`); - } - if (typeof root.asyncapi === 'string' && root.asyncapi.startsWith('2.')) { - return SpecVersion.Async2; - } - if (typeof root.asyncapi === 'string' && root.asyncapi.startsWith('3.')) { - return SpecVersion.Async3; - } - if (root.asyncapi) { - throw new Error(`Unsupported AsyncAPI version: ${root.asyncapi}`); - } - if (typeof root.arazzo === 'string' && arazzo_2.VERSION_PATTERN.test(root.arazzo)) { - return SpecVersion.Arazzo1; - } - if (typeof root.overlay === 'string' && arazzo_2.VERSION_PATTERN.test(root.overlay)) { - return SpecVersion.Overlay1; - } - throw new Error(`Unsupported specification`); -} -function getMajorSpecVersion(version) { - if (version === SpecVersion.OAS2) { - return SpecMajorVersion.OAS2; - } - else if (version === SpecVersion.Async2) { - return SpecMajorVersion.Async2; - } - else if (version === SpecVersion.Async3) { - return SpecMajorVersion.Async3; - } - else if (version === SpecVersion.Arazzo1) { - return SpecMajorVersion.Arazzo1; - } - else if (version === SpecVersion.Overlay1) { - return SpecMajorVersion.Overlay1; - } - else { - return SpecMajorVersion.OAS3; - } -} -function getTypes(spec) { - return typesMap[spec]; -} - - -/***/ }), - -/***/ 3052: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.output = void 0; -const env_1 = __nccwpck_require__(10876); -exports.output = { - write(str) { - return env_1.isBrowser ? undefined : process.stdout.write(str); - }, -}; - - -/***/ }), - -/***/ 2875: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AVAILABLE_REGIONS = exports.DOMAINS = exports.DEFAULT_REGION = void 0; -exports.getDomains = getDomains; -exports.setRedoclyDomain = setRedoclyDomain; -exports.getRedoclyDomain = getRedoclyDomain; -exports.isRedoclyRegistryURL = isRedoclyRegistryURL; -let redoclyDomain = 'redocly.com'; -exports.DEFAULT_REGION = 'us'; -exports.DOMAINS = getDomains(); -exports.AVAILABLE_REGIONS = Object.keys(exports.DOMAINS); -function getDomains() { - const domains = { - us: 'redocly.com', - eu: 'eu.redocly.com', - }; - // FIXME: temporary fix for our lab environments - const domain = redoclyDomain; - if (domain?.endsWith('.redocly.host')) { - domains[domain.split('.')[0]] = domain; - } - if (domain === 'redoc.online') { - domains[domain] = domain; - } - return domains; -} -function setRedoclyDomain(domain) { - redoclyDomain = domain; -} -function getRedoclyDomain() { - return redoclyDomain; -} -function isRedoclyRegistryURL(link) { - const domain = getRedoclyDomain() || exports.DOMAINS[exports.DEFAULT_REGION]; - const legacyDomain = domain === 'redocly.com' ? 'redoc.ly' : domain; - if (!link.startsWith(`https://api.${domain}/registry/`) && - !link.startsWith(`https://api.${legacyDomain}/registry/`)) { - return false; - } - return true; -} - - -/***/ }), - -/***/ 60357: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RedoclyClient = exports.TOKEN_FILENAME = void 0; -const fs_1 = __nccwpck_require__(57147); -const path_1 = __nccwpck_require__(71017); -const os_1 = __nccwpck_require__(22037); -const registry_api_1 = __nccwpck_require__(25129); -const env_1 = __nccwpck_require__(10876); -const utils_1 = __nccwpck_require__(75450); -const logger_1 = __nccwpck_require__(11339); -const domains_1 = __nccwpck_require__(2875); -exports.TOKEN_FILENAME = '.redocly-config.json'; -class RedoclyClient { - constructor(region) { - this.accessTokens = {}; - this.region = this.loadRegion(region); - this.loadTokens(); - this.domain = region ? domains_1.DOMAINS[region] : env_1.env.REDOCLY_DOMAIN || domains_1.DOMAINS[domains_1.DEFAULT_REGION]; - (0, domains_1.setRedoclyDomain)(this.domain); - this.registryApi = new registry_api_1.RegistryApi(this.accessTokens, this.region); - } - loadRegion(region) { - if (region && !domains_1.DOMAINS[region]) { - throw new Error(`Invalid argument: region in config file.\nGiven: ${logger_1.colorize.green(region)}, choices: "us", "eu".`); - } - if ((0, domains_1.getRedoclyDomain)()) { - return (domains_1.AVAILABLE_REGIONS.find((region) => domains_1.DOMAINS[region] === (0, domains_1.getRedoclyDomain)()) || domains_1.DEFAULT_REGION); - } - return region || domains_1.DEFAULT_REGION; - } - getRegion() { - return this.region; - } - hasTokens() { - return (0, utils_1.isNotEmptyObject)(this.accessTokens); - } - // - hasToken() { - return !!this.accessTokens[this.region]; - } - async getAuthorizationHeader() { - return this.accessTokens[this.region]; - } - // - setAccessTokens(accessTokens) { - this.accessTokens = accessTokens; - } - loadTokens() { - const credentialsPath = (0, path_1.resolve)((0, os_1.homedir)(), exports.TOKEN_FILENAME); - const credentials = this.readCredentialsFile(credentialsPath); - if ((0, utils_1.isNotEmptyObject)(credentials)) { - this.setAccessTokens({ - ...credentials, - ...(credentials.token && - !credentials[this.region] && { - [this.region]: credentials.token, - }), - }); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e2) { + reject(e2); + } } - if (env_1.env.REDOCLY_AUTHORIZATION) { - this.setAccessTokens({ - ...this.accessTokens, - [this.region]: env_1.env.REDOCLY_AUTHORIZATION, - }); + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); } - } - getAllTokens() { - return Object.entries(this.accessTokens) - .filter(([region]) => domains_1.AVAILABLE_REGIONS.includes(region)) - .map(([region, token]) => ({ region, token })); - } - async getValidTokens() { - const allTokens = this.getAllTokens(); - const verifiedTokens = await Promise.allSettled(allTokens.map(({ token }) => this.verifyToken(token))); - return allTokens - .filter((_, index) => verifiedTokens[index].status === 'fulfilled') - .map(({ token, region }) => ({ token, region, valid: true })); - } - async getTokens() { - return this.hasTokens() ? await this.getValidTokens() : []; - } - async isAuthorizedWithRedoclyByRegion() { - if (!this.hasTokens()) { - return false; + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.argStringToArray = exports.ToolRunner = void 0; + var os2 = __importStar(__require("os")); + var events = __importStar(__require("events")); + var child = __importStar(__require("child_process")); + var path13 = __importStar(__require("path")); + var io = __importStar(require_io()); + var ioUtil = __importStar(require_io_util()); + var timers_1 = __require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner = class extends events.EventEmitter { + constructor(toolPath, args, options2) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); } - const accessToken = this.accessTokens[this.region]; - if (!accessToken) { - return false; + this.toolPath = toolPath; + this.args = args || []; + this.options = options2 || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options2, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options2); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a2 of args) { + cmd += ` ${a2}`; + } + } else if (options2.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a2 of args) { + cmd += ` ${a2}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a2 of args) { + cmd += ` ${this._windowsQuoteCmdArg(a2)}`; + } + } + } else { + cmd += toolPath; + for (const a2 of args) { + cmd += ` ${a2}`; + } } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { try { - await this.verifyToken(accessToken); - return true; + let s2 = strBuffer + data.toString(); + let n8 = s2.indexOf(os2.EOL); + while (n8 > -1) { + const line = s2.substring(0, n8); + onLine(line); + s2 = s2.substring(n8 + os2.EOL.length); + n8 = s2.indexOf(os2.EOL); + } + return s2; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; } - catch (err) { - return false; + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } } - } - async isAuthorizedWithRedocly() { - return this.hasTokens() && (0, utils_1.isNotEmptyArray)(await this.getValidTokens()); - } - readCredentialsFile(credentialsPath) { - return (0, fs_1.existsSync)(credentialsPath) ? JSON.parse((0, fs_1.readFileSync)(credentialsPath, 'utf-8')) : {}; - } - async verifyToken(accessToken, verbose = false) { - return this.registryApi.authStatus(accessToken, verbose); - } - async login(accessToken, verbose = false) { - const credentialsPath = (0, path_1.resolve)((0, os_1.homedir)(), exports.TOKEN_FILENAME); - try { - await this.verifyToken(accessToken, verbose); + return this.toolPath; + } + _getSpawnArgs(options2) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a2 of this.args) { + argline += " "; + argline += options2.windowsVerbatimArguments ? a2 : this._windowsQuoteCmdArg(a2); + } + argline += '"'; + return [argline]; + } } - catch (err) { - throw new Error('Authorization failed. Please check if you entered a valid API key.'); + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); } - const credentials = { - ...this.readCredentialsFile(credentialsPath), - [this.region]: accessToken, - token: accessToken, // FIXME: backward compatibility, remove on 1.0.0 - }; - this.accessTokens = credentials; - this.registryApi.setAccessTokens(credentials); - (0, fs_1.writeFileSync)(credentialsPath, JSON.stringify(credentials, null, 2)); - } - logout() { - const credentialsPath = (0, path_1.resolve)((0, os_1.homedir)(), exports.TOKEN_FILENAME); - if ((0, fs_1.existsSync)(credentialsPath)) { - (0, fs_1.unlinkSync)(credentialsPath); + if (!arg) { + return '""'; } - } -} -exports.RedoclyClient = RedoclyClient; - - -/***/ }), - -/***/ 25129: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RegistryApi = void 0; -const utils_1 = __nccwpck_require__(75450); -const domains_1 = __nccwpck_require__(2875); -const version = (__nccwpck_require__(43244)/* .version */ .i8); -class RegistryApi { - constructor(accessTokens, region) { - this.accessTokens = accessTokens; - this.region = region; - } - get accessToken() { - return (0, utils_1.isNotEmptyObject)(this.accessTokens) && this.accessTokens[this.region]; - } - getBaseUrl() { - return `https://api.${(0, domains_1.getRedoclyDomain)()}/registry`; - } - setAccessTokens(accessTokens) { - this.accessTokens = accessTokens; - return this; - } - async request(path = '', options = {}) { - const currentCommand = typeof process !== 'undefined' ? process.env?.REDOCLY_CLI_COMMAND || '' : ''; - const redoclyEnv = typeof process !== 'undefined' ? process.env?.REDOCLY_ENVIRONMENT || '' : ''; - const headers = Object.assign({}, options.headers || {}, { - 'x-redocly-cli-version': version, - 'user-agent': `redocly-cli / ${version} ${currentCommand} ${redoclyEnv}`, - }); - if (!headers.hasOwnProperty('authorization')) { - throw new Error('Unauthorized'); + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x3) => x3 === char)) { + needsQuotes = true; + break; + } } - const requestOptions = { - ...options, - headers, - agent: (0, utils_1.getProxyAgent)(), - }; - const response = await fetch(`${this.getBaseUrl()}${path}`, requestOptions); - if (response.status === 401) { - throw new Error('Unauthorized'); + if (!needsQuotes) { + return arg; } - if (response.status === 404) { - const body = await response.json(); - throw new Error(body.code); + let reverse = '"'; + let quoteHit = true; + for (let i2 = arg.length; i2 > 0; i2--) { + reverse += arg[i2 - 1]; + if (quoteHit && arg[i2 - 1] === "\\") { + reverse += "\\"; + } else if (arg[i2 - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } } - return response; - } - async authStatus(accessToken, verbose = false) { - try { - const response = await this.request('', { headers: { authorization: accessToken } }); - return await response.json(); + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; } - catch (error) { - if (verbose) { - console.log(error); - } - throw error; + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; } - } - async prepareFileUpload({ organizationId, name, version, filesHash, filename, isUpsert, }) { - const response = await this.request(`/${organizationId}/${name}/${version}/prepare-file-upload`, { - method: 'POST', - headers: { - 'content-type': 'application/json', - authorization: this.accessToken, - }, - body: JSON.stringify({ - filesHash, - filename, - isUpsert, - }), - }); - if (response.ok) { - return response.json(); + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; } - throw new Error('Could not prepare file upload'); - } - async pushApi({ organizationId, name, version, rootFilePath, filePaths, branch, isUpsert, isPublic, batchId, batchSize, }) { - const response = await this.request(`/${organizationId}/${name}/${version}`, { - method: 'PUT', - headers: { - 'content-type': 'application/json', - authorization: this.accessToken, - }, - body: JSON.stringify({ - rootFilePath, - filePaths, - branch, - isUpsert, - isPublic, - batchId, - batchSize, - }), - }); - if (response.ok) { - return; + let reverse = '"'; + let quoteHit = true; + for (let i2 = arg.length; i2 > 0; i2--) { + reverse += arg[i2 - 1]; + if (quoteHit && arg[i2 - 1] === "\\") { + reverse += "\\"; + } else if (arg[i2 - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } } - throw new Error('Could not push api'); - } -} -exports.RegistryApi = RegistryApi; - - -/***/ }), - -/***/ 97977: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Location = void 0; -exports.joinPointer = joinPointer; -exports.isRef = isRef; -exports.isExternalValue = isExternalValue; -exports.unescapePointer = unescapePointer; -exports.escapePointer = escapePointer; -exports.parseRef = parseRef; -exports.parsePointer = parsePointer; -exports.pointerBaseName = pointerBaseName; -exports.refBaseName = refBaseName; -exports.isAbsoluteUrl = isAbsoluteUrl; -exports.isMappingRef = isMappingRef; -exports.isAnchor = isAnchor; -const utils_1 = __nccwpck_require__(75450); -function joinPointer(base, key) { - if (base === '') - base = '#/'; - return base[base.length - 1] === '/' ? base + key : base + '/' + key; -} -function isRef(node) { - return (0, utils_1.isPlainObject)(node) && typeof node.$ref === 'string'; -} -function isExternalValue(node) { - return (0, utils_1.isPlainObject)(node) && typeof node.externalValue === 'string'; -} -class Location { - constructor(source, pointer) { - this.source = source; - this.pointer = pointer; - } - child(components) { - return new Location(this.source, joinPointer(this.pointer, (Array.isArray(components) ? components : [components]).map(escapePointer).join('/'))); - } - key() { - return { ...this, reportOnKey: true }; - } - get absolutePointer() { - return this.source.absoluteRef + (this.pointer === '#/' ? '' : this.pointer); - } -} -exports.Location = Location; -function unescapePointer(fragment) { - return decodeURIComponent(fragment.replace(/~1/g, '/').replace(/~0/g, '~')); -} -function escapePointer(fragment) { - if (typeof fragment === 'number') - return fragment; - return fragment.replace(/~/g, '~0').replace(/\//g, '~1'); -} -function parseRef(ref) { - const [uri, pointer = ''] = ref.split('#/'); - return { - uri: (uri.endsWith('#') ? uri.slice(0, -1) : uri) || null, - pointer: parsePointer(pointer), - }; -} -function parsePointer(pointer) { - return pointer.split('/').map(unescapePointer).filter(utils_1.isTruthy); -} -function pointerBaseName(pointer) { - const parts = pointer.split('/'); - return parts[parts.length - 1]; -} -function refBaseName(ref) { - // eslint-disable-next-line no-useless-escape - const parts = ref.split(/[\/\\]/); // split by '\' and '/' - return parts[parts.length - 1].replace(/\.[^.]+$/, ''); // replace extension with empty string -} -function isAbsoluteUrl(ref) { - return ref.startsWith('http://') || ref.startsWith('https://'); -} -function isMappingRef(mapping) { - // TODO: proper detection of mapping refs - return (mapping.startsWith('#') || - mapping.startsWith('https://') || - mapping.startsWith('http://') || - mapping.startsWith('./') || - mapping.startsWith('../') || - mapping.indexOf('/') > -1); -} -function isAnchor(ref) { - return /^#[A-Za-z][A-Za-z0-9\-_:.]*$/.test(ref); -} - - -/***/ }), - -/***/ 27098: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BaseResolver = exports.YamlParseError = exports.ResolveError = exports.Source = void 0; -exports.makeRefId = makeRefId; -exports.makeDocumentFromString = makeDocumentFromString; -exports.resolveDocument = resolveDocument; -const fs = __nccwpck_require__(57147); -const path = __nccwpck_require__(71017); -const ref_utils_1 = __nccwpck_require__(97977); -const types_1 = __nccwpck_require__(14143); -const utils_1 = __nccwpck_require__(75450); -class Source { - constructor(absoluteRef, body, mimeType) { - this.absoluteRef = absoluteRef; - this.body = body; - this.mimeType = mimeType; - } - // pass safeLoad as argument to separate it from browser bundle - getAst(safeLoad) { - if (this._ast === undefined) { - this._ast = safeLoad(this.body, { filename: this.absoluteRef }) ?? undefined; - // fix ast representation of file with newlines only - if (this._ast && - this._ast.kind === 0 && // KIND.scalar = 0 - this._ast.value === '' && - this._ast.startPosition !== 1) { - this._ast.startPosition = 1; - this._ast.endPosition = 1; + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options2) { + options2 = options2 || {}; + const result = { + cwd: options2.cwd || process.cwd(), + env: options2.env || process.env, + silent: options2.silent || false, + windowsVerbatimArguments: options2.windowsVerbatimArguments || false, + failOnStdErr: options2.failOnStdErr || false, + ignoreReturnCode: options2.ignoreReturnCode || false, + delay: options2.delay || 1e4 + }; + result.outStream = options2.outStream || process.stdout; + result.errStream = options2.errStream || process.stderr; + return result; + } + _getSpawnOptions(options2, toolPath) { + options2 = options2 || {}; + const result = {}; + result.cwd = options2.cwd; + result.env = options2.env; + result["windowsVerbatimArguments"] = options2.windowsVerbatimArguments || this._isCmdFile(); + if (options2.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 __awaiter(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path13.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io.which(this.toolPath, true); + return new Promise((resolve8, reject) => __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) + os2.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.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 s2 = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s2.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", (error2, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error2) { + reject(error2); + } else { + resolve8(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); } + })); + }); + } + }; + exports.ToolRunner = ToolRunner; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c2) { + if (escaped && c2 !== '"') { + arg += "\\"; + } + arg += c2; + escaped = false; + } + for (let i2 = 0; i2 < argString.length; i2++) { + const c2 = argString.charAt(i2); + if (c2 === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c2); + } + continue; } - return this._ast; - } - getLines() { - if (this._lines === undefined) { - this._lines = this.body.split(/\r\n|[\n\r]/g); + if (c2 === "\\" && escaped) { + append(c2); + continue; } - return this._lines; - } -} -exports.Source = Source; -class ResolveError extends Error { - constructor(originalError) { - super(originalError.message); - this.originalError = originalError; - // Set the prototype explicitly. - Object.setPrototypeOf(this, ResolveError.prototype); - } -} -exports.ResolveError = ResolveError; -const jsYamlErrorLineColRegexp = /\((\d+):(\d+)\)$/; -class YamlParseError extends Error { - constructor(originalError, source) { - super(originalError.message.split('\n')[0]); - this.originalError = originalError; - this.source = source; - // Set the prototype explicitly. - Object.setPrototypeOf(this, YamlParseError.prototype); - const [, line, col] = this.message.match(jsYamlErrorLineColRegexp) || []; - this.line = parseInt(line, 10); - this.col = parseInt(col, 10); - } -} -exports.YamlParseError = YamlParseError; -function makeRefId(absoluteRef, pointer) { - return absoluteRef + '::' + pointer; -} -function makeDocumentFromString(sourceString, absoluteRef) { - const source = new Source(absoluteRef, sourceString); - try { - return { - source, - parsed: (0, utils_1.parseYaml)(sourceString, { filename: absoluteRef }), - }; - } - catch (e) { - throw new YamlParseError(e, source); - } -} -class BaseResolver { - constructor(config = { http: { headers: [] } }) { - this.config = config; - this.cache = new Map(); - } - getFiles() { - return new Set(Array.from(this.cache.keys())); - } - resolveExternalRef(base, ref) { - if ((0, ref_utils_1.isAbsoluteUrl)(ref)) { - return ref; + if (c2 === "\\" && inQuotes) { + escaped = true; + continue; } - if (base && (0, ref_utils_1.isAbsoluteUrl)(base)) { - return new URL(ref, base).href; + if (c2 === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; } - return path.resolve(base ? path.dirname(base) : process.cwd(), ref); + append(c2); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; } - async loadExternalRef(absoluteRef) { - try { - if ((0, ref_utils_1.isAbsoluteUrl)(absoluteRef)) { - const { body, mimeType } = await (0, utils_1.readFileFromUrl)(absoluteRef, this.config.http); - return new Source(absoluteRef, body, mimeType); - } - else { - if (fs.lstatSync(absoluteRef).isDirectory()) { - throw new Error(`Expected a file but received a folder at ${absoluteRef}.`); - } - const content = await fs.promises.readFile(absoluteRef, 'utf-8'); - // In some cases file have \r\n line delimeters like on windows, we should skip it. - return new Source(absoluteRef, content.replace(/\r\n/g, '\n')); - } + exports.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options2, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); } - catch (error) { - error.message = error.message.replace(', lstat', ''); - throw new ResolveError(error); + this.options = options2; + this.toolPath = toolPath; + if (options2.delay) { + this.delay = options2.delay; } - } - parseDocument(source, isRoot = false) { - const ext = source.absoluteRef.substr(source.absoluteRef.lastIndexOf('.')); - if (!['.json', '.json', '.yml', '.yaml'].includes(ext) && - !source.mimeType?.match(/(json|yaml|openapi)/) && - !isRoot // always parse root - ) { - return { source, parsed: source.body }; + } + CheckComplete() { + if (this.done) { + return; } - try { - return { - source, - parsed: (0, utils_1.parseYaml)(source.body, { filename: source.absoluteRef }), - }; + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); } - catch (e) { - throw new YamlParseError(e, source); + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error2; + if (this.processExited) { + if (this.processError) { + error2 = 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) { + error2 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error2 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } } - } - async resolveDocument(base, ref, isRoot = false) { - const absoluteRef = this.resolveExternalRef(base, ref); - const cachedDocument = this.cache.get(absoluteRef); - if (cachedDocument) { - return cachedDocument; + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; } - const doc = this.loadExternalRef(absoluteRef).then((source) => { - return this.parseDocument(source, isRoot); - }); - this.cache.set(absoluteRef, doc); - return doc; - } -} -exports.BaseResolver = BaseResolver; -function pushRef(head, node) { - return { - prev: head, - node, - }; -} -function hasRef(head, node) { - while (head) { - if (head.node === node) { - return true; + this.done = true; + this.emit("done", error2, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; } - head = head.prev; - } - return false; -} -const unknownType = { name: 'unknown', properties: {} }; -const resolvableScalarType = { name: 'scalar', properties: {} }; -async function resolveDocument(opts) { - const { rootDocument, externalRefResolver, rootType } = opts; - const resolvedRefMap = new Map(); - const seenNodes = new Set(); // format "${type}::${absoluteRef}${pointer}" - const resolvePromises = []; - resolveRefsInParallel(rootDocument.parsed, rootDocument, '#/', rootType); - let resolved; - do { - resolved = await Promise.all(resolvePromises); - } while (resolvePromises.length !== resolved.length); - return resolvedRefMap; - function resolveRefsInParallel(rootNode, rootNodeDocument, rootNodePointer, type) { - const rootNodeDocAbsoluteRef = rootNodeDocument.source.absoluteRef; - const anchorRefsMap = new Map(); - walk(rootNode, type, rootNodeDocAbsoluteRef + rootNodePointer); - function walk(node, type, nodeAbsoluteRef) { - if (typeof node !== 'object' || node === null) { - return; - } - const nodeId = `${type.name}::${nodeAbsoluteRef}`; - if (seenNodes.has(nodeId)) { - return; - } - seenNodes.add(nodeId); - const [_, anchor] = Object.entries(node).find(([key]) => key === '$anchor') || []; - if (anchor) { - anchorRefsMap.set(`#${anchor}`, node); - } - if (Array.isArray(node)) { - const itemsType = type.items; - // we continue resolving unknown types, but stop early on known scalars - if (itemsType === undefined && type !== unknownType && type !== types_1.SpecExtension) { - return; - } - const isTypeAFunction = typeof itemsType === 'function'; - for (let i = 0; i < node.length; i++) { - const itemType = isTypeAFunction - ? itemsType(node[i], (0, ref_utils_1.joinPointer)(nodeAbsoluteRef, i)) - : itemsType; - // we continue resolving unknown types, but stop early on known scalars - if (itemType === undefined && type !== unknownType && type !== types_1.SpecExtension) { - continue; - } - walk(node[i], (0, types_1.isNamedType)(itemType) ? itemType : unknownType, (0, ref_utils_1.joinPointer)(nodeAbsoluteRef, i)); - } - return; - } - for (const propName of Object.keys(node)) { - let propValue = node[propName]; - let propType = type.properties[propName]; - if (propType === undefined) - propType = type.additionalProperties; - if (typeof propType === 'function') - propType = propType(propValue, propName); - if (propType === undefined) - propType = unknownType; - if (type.extensionsPrefix && - propName.startsWith(type.extensionsPrefix) && - propType === unknownType) { - propType = types_1.SpecExtension; - } - if (!(0, types_1.isNamedType)(propType) && propType?.directResolveAs) { - propType = propType.directResolveAs; - propValue = { $ref: propValue }; - } - if (propType && propType.name === undefined && propType.resolvable !== false) { - propType = resolvableScalarType; - } - if (!(0, types_1.isNamedType)(propType) || typeof propValue !== 'object') { - continue; - } - walk(propValue, propType, (0, ref_utils_1.joinPointer)(nodeAbsoluteRef, (0, ref_utils_1.escapePointer)(propName))); - } - if ((0, ref_utils_1.isRef)(node)) { - const promise = followRef(rootNodeDocument, node, { - prev: null, - node, - }).then((resolvedRef) => { - if (resolvedRef.resolved) { - resolveRefsInParallel(resolvedRef.node, resolvedRef.document, resolvedRef.nodePointer, type); - } - }); - resolvePromises.push(promise); - } - // handle example.externalValue as reference - if ((0, ref_utils_1.isExternalValue)(node)) { - const promise = followRef(rootNodeDocument, { $ref: node.externalValue }, { - prev: null, - node, - }).then((resolvedRef) => { - if (resolvedRef.resolved) { - resolveRefsInParallel(resolvedRef.node, resolvedRef.document, resolvedRef.nodePointer, type); - } - }); - resolvePromises.push(promise); - } - } - async function followRef(document, ref, refStack) { - if (hasRef(refStack.prev, ref)) { - throw new Error('Self-referencing circular pointer'); - } - if ((0, ref_utils_1.isAnchor)(ref.$ref)) { - // Wait for all anchors in the document to be collected firstly. - await (0, utils_1.nextTick)(); - const resolvedRef = { - resolved: true, - isRemote: false, - node: anchorRefsMap.get(ref.$ref), - document, - nodePointer: ref.$ref, - }; - const refId = makeRefId(document.source.absoluteRef, ref.$ref); - resolvedRefMap.set(refId, resolvedRef); - return resolvedRef; - } - const { uri, pointer } = (0, ref_utils_1.parseRef)(ref.$ref); - const isRemote = uri !== null; - let targetDoc; - try { - targetDoc = isRemote - ? (await externalRefResolver.resolveDocument(document.source.absoluteRef, uri)) - : document; - } - catch (error) { - const resolvedRef = { - resolved: false, - isRemote, - document: undefined, - error: error, - }; - const refId = makeRefId(document.source.absoluteRef, ref.$ref); - resolvedRefMap.set(refId, resolvedRef); - return resolvedRef; - } - let resolvedRef = { - resolved: true, - document: targetDoc, - isRemote, - node: document.parsed, - nodePointer: '#/', - }; - let target = targetDoc.parsed; - const segments = pointer; - for (const segment of segments) { - if (typeof target !== 'object') { - target = undefined; - break; - } - else if (target[segment] !== undefined) { - target = target[segment]; - resolvedRef.nodePointer = (0, ref_utils_1.joinPointer)(resolvedRef.nodePointer, (0, ref_utils_1.escapePointer)(segment)); - } - else if ((0, ref_utils_1.isRef)(target)) { - resolvedRef = await followRef(targetDoc, target, pushRef(refStack, target)); - targetDoc = resolvedRef.document || targetDoc; - if (typeof resolvedRef.node !== 'object') { - target = undefined; - break; - } - target = resolvedRef.node[segment]; - resolvedRef.nodePointer = (0, ref_utils_1.joinPointer)(resolvedRef.nodePointer, (0, ref_utils_1.escapePointer)(segment)); - } - else { - target = undefined; - break; - } - } - resolvedRef.node = target; - resolvedRef.document = targetDoc; - const refId = makeRefId(document.source.absoluteRef, ref.$ref); - if (resolvedRef.document && (0, ref_utils_1.isRef)(target)) { - resolvedRef = await followRef(resolvedRef.document, target, pushRef(refStack, target)); - } - resolvedRefMap.set(refId, resolvedRef); - return { ...resolvedRef }; + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} 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); } - } -} - - -/***/ }), - -/***/ 75166: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + state._setResult(); + } + }; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.releaseAjvInstance = releaseAjvInstance; -exports.validateJsonSchema = validateJsonSchema; -const _2020_1 = __nccwpck_require__(63835); -const ref_utils_1 = __nccwpck_require__(97977); -let ajvInstance = null; -function releaseAjvInstance() { - ajvInstance = null; -} -function getAjv(resolve, allowAdditionalProperties) { - if (!ajvInstance) { - ajvInstance = new _2020_1.default({ - schemaId: '$id', - meta: true, - allErrors: true, - strictSchema: false, - inlineRefs: false, - validateSchema: false, - discriminator: true, - allowUnionTypes: true, - validateFormats: false, // TODO: fix it - defaultUnevaluatedProperties: allowAdditionalProperties, - loadSchemaSync(base, $ref, $id) { - const resolvedRef = resolve({ $ref }, base.split('#')[0]); - if (!resolvedRef || !resolvedRef.location) - return false; - return { $id: resolvedRef.location.source.absoluteRef + '#' + $id, ...resolvedRef.node }; - }, - logger: false, - }); - } - return ajvInstance; -} -function getAjvValidator(schema, loc, resolve, allowAdditionalProperties) { - const ajv = getAjv(resolve, allowAdditionalProperties); - if (!ajv.getSchema(loc.absolutePointer)) { - ajv.addSchema({ $id: loc.absolutePointer, ...schema }, loc.absolutePointer); - } - return ajv.getSchema(loc.absolutePointer); -} -function validateJsonSchema(data, schema, schemaLoc, instancePath, resolve, allowAdditionalProperties) { - const validate = getAjvValidator(schema, schemaLoc, resolve, allowAdditionalProperties); - if (!validate) - return { valid: true, errors: [] }; // unresolved refs are reported - const valid = validate(data, { - instancePath, - parentData: { fake: {} }, - parentDataProperty: 'fake', - rootData: {}, - dynamicAnchors: {}, +// node_modules/@actions/exec/lib/exec.js +var require_exec = __commonJS({ + "node_modules/@actions/exec/lib/exec.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + Object.defineProperty(o, k22, { enumerable: true, get: function() { + return m[k3]; + } }); + }) : (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + o[k22] = m[k3]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v3) { + Object.defineProperty(o, "default", { enumerable: true, value: v3 }); + }) : function(o, v3) { + o["default"] = v3; }); - return { - valid: !!valid, - errors: (validate.errors || []).map(beatifyErrorMessage), + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) if (k3 !== "default" && Object.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; }; - function beatifyErrorMessage(error) { - let message = error.message; - const suggest = error.keyword === 'enum' ? error.params.allowedValues : undefined; - if (suggest) { - message += ` ${suggest.map((e) => `"${e}"`).join(', ')}`; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P3, generator) { + function adopt(value) { + return value instanceof P3 ? value : new P3(function(resolve8) { + resolve8(value); + }); + } + return new (P3 || (P3 = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e2) { + reject(e2); + } } - if (error.keyword === 'type') { - message = `type ${message}`; + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e2) { + reject(e2); + } } - const relativePath = error.instancePath.substring(instancePath.length + 1); - const propName = relativePath.substring(relativePath.lastIndexOf('/') + 1); - if (propName) { - message = `\`${propName}\` property ${message}`; + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); } - if (error.keyword === 'additionalProperties' || error.keyword === 'unevaluatedProperties') { - const property = error.params.additionalProperty || error.params.unevaluatedProperty; - message = `${message} \`${property}\``; - error.instancePath += '/' + (0, ref_utils_1.escapePointer)(property); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getExecOutput = exports.exec = void 0; + var string_decoder_1 = __require("string_decoder"); + var tr2 = __importStar(require_toolrunner()); + function exec(commandLine, args, options2) { + return __awaiter(this, void 0, void 0, function* () { + const commandArgs = tr2.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr2.ToolRunner(toolPath, args, options2); + return runner.exec(); + }); + } + exports.exec = exec; + function getExecOutput(commandLine, args, options2) { + var _a, _b; + return __awaiter(this, void 0, void 0, function* () { + let stdout2 = ""; + let stderr2 = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options2 === null || options2 === void 0 ? void 0 : options2.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options2 === null || options2 === void 0 ? void 0 : options2.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr2 += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout2 += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options2 === null || options2 === void 0 ? void 0 : options2.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options2), { listeners })); + stdout2 += stdoutDecoder.end(); + stderr2 += stderrDecoder.end(); return { - ...error, - message, - suggest, + exitCode, + stdout: stdout2, + stderr: stderr2 }; + }); } -} - - -/***/ }), - -/***/ 92004: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; + exports.getExecOutput = getExecOutput; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CriteriaUnique = void 0; -const CriteriaUnique = () => { - return { - FailureActionObject: { - enter(action, { report, location }) { - const criterias = action?.criteria; - if (!Array.isArray(criterias)) { - return; - } - const seen = new Set(); - for (const criteria of criterias) { - const key = JSON.stringify(criteria); - if (seen.has(key)) { - report({ - message: 'The FailureAction criteria items must be unique.', - location: location.child(['criteria', criterias.indexOf(criteria)]), - }); - } - else { - seen.add(key); - } - } - }, - }, - SuccessActionObject: { - enter(action, { report, location }) { - const criterias = action?.criteria; - if (!Array.isArray(criterias)) { - return; - } - const seen = new Set(); - for (const criteria of criterias) { - const key = JSON.stringify(criteria); - if (seen.has(key)) { - report({ - message: 'The SuccessAction criteria items must be unique.', - location: location.child(['criteria', criterias.indexOf(criteria)]), - }); - } - else { - seen.add(key); - } - } - }, - }, - Step: { - enter(step, { report, location }) { - const successCriterias = step?.successCriteria; - if (!Array.isArray(successCriterias)) { - return; - } - const seen = new Set(); - for (const criteria of successCriterias) { - const key = JSON.stringify(criteria); - if (seen.has(key)) { - report({ - message: 'The Step SuccessCriteria items must be unique.', - location: location.child(['successCriteria', successCriterias.indexOf(criteria)]), - }); - } - else { - seen.add(key); - } - } - }, - }, +// node_modules/@actions/core/lib/platform.js +var require_platform = __commonJS({ + "node_modules/@actions/core/lib/platform.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + var desc = Object.getOwnPropertyDescriptor(m, k3); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k3]; + } }; + } + Object.defineProperty(o, k22, desc); + }) : (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + o[k22] = m[k3]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v3) { + Object.defineProperty(o, "default", { enumerable: true, value: v3 }); + }) : function(o, v3) { + o["default"] = v3; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; }; -}; -exports.CriteriaUnique = CriteriaUnique; - - -/***/ }), - -/***/ 82031: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.preprocessors = exports.rules = void 0; -const struct_1 = __nccwpck_require__(16612); -const assertions_1 = __nccwpck_require__(11612); -const sourceDescription_type_1 = __nccwpck_require__(74726); -const sourceDescriptions_not_empty_1 = __nccwpck_require__(81340); -const respect_supported_versions_1 = __nccwpck_require__(45478); -const workflowId_unique_1 = __nccwpck_require__(3209); -const stepId_unique_1 = __nccwpck_require__(41352); -const sourceDescriptions_name_unique_1 = __nccwpck_require__(14070); -const workflow_dependsOn_1 = __nccwpck_require__(30792); -const parameters_unique_1 = __nccwpck_require__(86406); -const step_onSuccess_unique_1 = __nccwpck_require__(2820); -const step_onFailure_unique_1 = __nccwpck_require__(71378); -const requestBody_replacements_unique_1 = __nccwpck_require__(99020); -const no_criteria_xpath_1 = __nccwpck_require__(14492); -const criteria_unique_1 = __nccwpck_require__(92004); -exports.rules = { - struct: struct_1.Struct, - assertions: assertions_1.Assertions, - 'sourceDescription-type': sourceDescription_type_1.SourceDescriptionType, - 'respect-supported-versions': respect_supported_versions_1.RespectSupportedVersions, - 'workflowId-unique': workflowId_unique_1.WorkflowIdUnique, - 'stepId-unique': stepId_unique_1.StepIdUnique, - 'sourceDescription-name-unique': sourceDescriptions_name_unique_1.SourceDescriptionsNameUnique, - 'sourceDescriptions-not-empty': sourceDescriptions_not_empty_1.SourceDescriptionsNotEmpty, - 'workflow-dependsOn': workflow_dependsOn_1.WorkflowDependsOn, - 'parameters-unique': parameters_unique_1.ParametersUnique, - 'step-onSuccess-unique': step_onSuccess_unique_1.StepOnSuccessUnique, - 'step-onFailure-unique': step_onFailure_unique_1.StepOnFailureUnique, - 'requestBody-replacements-unique': requestBody_replacements_unique_1.RequestBodyReplacementsUnique, - 'no-criteria-xpath': no_criteria_xpath_1.NoCriteriaXpath, - 'criteria-unique': criteria_unique_1.CriteriaUnique, -}; -exports.preprocessors = {}; - - -/***/ }), - -/***/ 86406: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ParametersUnique = void 0; -const ParametersUnique = () => { - return { - Parameters: { - enter(parameters, { report, location }) { - if (!parameters) - return; - const seenParameters = new Set(); - for (const parameter of parameters) { - if (seenParameters.has(parameter?.name)) { - report({ - message: 'The parameter `name` must be unique amongst listed parameters.', - location: location.child([parameters.indexOf(parameter)]), - }); - } - if (seenParameters.has(parameter?.reference)) { - report({ - message: 'The parameter `reference` must be unique amongst listed parameters.', - location: location.child([parameters.indexOf(parameter)]), - }); - } - parameter?.name - ? seenParameters.add(parameter.name) - : seenParameters.add(parameter.reference); - } - }, - }, + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P3, generator) { + function adopt(value) { + return value instanceof P3 ? value : new P3(function(resolve8) { + resolve8(value); + }); + } + return new (P3 || (P3 = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e2) { + reject(e2); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e2) { + reject(e2); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; -}; -exports.ParametersUnique = ParametersUnique; - - -/***/ }), - -/***/ 99020: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RequestBodyReplacementsUnique = void 0; -const RequestBodyReplacementsUnique = () => { - const seenReplacements = new Set(); - return { - Step: { - leave() { - seenReplacements.clear(); - }, - RequestBody: { - enter(requestBody, { report, location }) { - if (!requestBody.replacements) - return; - for (const replacement of requestBody.replacements) { - if (seenReplacements.has(replacement.target)) { - report({ - message: 'Every `replacement` in `requestBody` must be unique.', - location: location.child([ - 'replacements', - requestBody.replacements.indexOf(replacement), - `target`, - ]), - }); - } - seenReplacements.add(replacement.target); - } - }, - }, - }, + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; }; -}; -exports.RequestBodyReplacementsUnique = RequestBodyReplacementsUnique; - - -/***/ }), - -/***/ 74726: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getDetails = exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0; + var os_1 = __importDefault(__require("os")); + var exec = __importStar(require_exec()); + var getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () { + const { stdout: version2 } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version2.trim() + }; + }); + var getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout: stdout2 } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version2 = (_b = (_a = stdout2.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout2.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version: version2 + }; + }); + var getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () { + const { stdout: stdout2 } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version2] = stdout2.trim().split("\n"); + return { + name, + version: version2 + }; + }); + exports.platform = os_1.default.platform(); + exports.arch = os_1.default.arch(); + exports.isWindows = exports.platform === "win32"; + exports.isMacOS = exports.platform === "darwin"; + exports.isLinux = exports.platform === "linux"; + function getDetails() { + return __awaiter(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports.isWindows ? getWindowsInfo() : exports.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports.platform, + arch: exports.arch, + isWindows: exports.isWindows, + isMacOS: exports.isMacOS, + isLinux: exports.isLinux + }); + }); + } + exports.getDetails = getDetails; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SourceDescriptionType = void 0; -const SourceDescriptionType = () => { - return { - SourceDescriptions: { - enter(sourceDescriptions, { report, location }) { - if (!sourceDescriptions.length) - return; - for (const sourceDescription of sourceDescriptions) { - if (!['openapi', 'arazzo'].includes(sourceDescription?.type)) { - report({ - message: 'The `type` property of the `sourceDescription` object must be either `openapi` or `arazzo`.', - location: location.child([sourceDescriptions.indexOf(sourceDescription)]), - }); - } - } - }, - }, +// node_modules/@actions/core/lib/core.js +var require_core = __commonJS({ + "node_modules/@actions/core/lib/core.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + var desc = Object.getOwnPropertyDescriptor(m, k3); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k3]; + } }; + } + Object.defineProperty(o, k22, desc); + }) : (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + o[k22] = m[k3]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v3) { + Object.defineProperty(o, "default", { enumerable: true, value: v3 }); + }) : function(o, v3) { + o["default"] = v3; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; }; -}; -exports.SourceDescriptionType = SourceDescriptionType; - - -/***/ }), - -/***/ 14070: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SourceDescriptionsNameUnique = void 0; -const SourceDescriptionsNameUnique = () => { - const seenSourceDescriptions = new Set(); - return { - SourceDescriptions: { - enter(sourceDescriptions, { report, location }) { - if (!sourceDescriptions.length) - return; - for (const sourceDescription of sourceDescriptions) { - if (seenSourceDescriptions.has(sourceDescription.name)) { - report({ - message: 'The `name` must be unique amongst all SourceDescriptions.', - location: location.child([sourceDescriptions.indexOf(sourceDescription)]), - }); - } - seenSourceDescriptions.add(sourceDescription.name); - } - }, - }, + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P3, generator) { + function adopt(value) { + return value instanceof P3 ? value : new P3(function(resolve8) { + resolve8(value); + }); + } + return new (P3 || (P3 = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e2) { + reject(e2); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e2) { + reject(e2); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; -}; -exports.SourceDescriptionsNameUnique = SourceDescriptionsNameUnique; - - -/***/ }), - -/***/ 81340: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; + var command_1 = require_command(); + var file_command_1 = require_file_command(); + var utils_1 = require_utils(); + var os2 = __importStar(__require("os")); + var path13 = __importStar(__require("path")); + var oidc_utils_1 = require_oidc_utils(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports.ExitCode = ExitCode = {})); + function exportVariable(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports.exportVariable = exportVariable; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path13.delimiter}${process.env["PATH"]}`; + } + exports.addPath = addPath; + function getInput3(name, options2) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options2 && options2.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options2 && options2.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports.getInput = getInput3; + function getMultilineInput(name, options2) { + const inputs = getInput3(name, options2).split("\n").filter((x3) => x3 !== ""); + if (options2 && options2.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options2) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput3(name, options2); + 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} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports.getBooleanInput = getBooleanInput; + function setOutput2(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os2.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports.setOutput = setOutput2; + function setCommandEcho(enabled2) { + (0, command_1.issue)("echo", enabled2 ? "on" : "off"); + } + exports.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error2(message); + } + exports.setFailed = setFailed2; + function isDebug() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports.isDebug = isDebug; + function debug(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports.debug = debug; + function error2(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports.error = error2; + function warning(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports.warning = warning; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports.notice = notice; + function info(message) { + process.stdout.write(message + os2.EOL); + } + exports.info = info; + function startGroup(name) { + (0, command_1.issue)("group", name); + } + exports.startGroup = startGroup; + function endGroup() { + (0, command_1.issue)("endgroup"); + } + exports.endGroup = endGroup; + function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } finally { + endGroup(); + } + return result; + }); + } + exports.group = group; + function saveState(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports.saveState = saveState; + function getState(name) { + return process.env[`STATE_${name}`] || ""; + } + exports.getState = getState; + function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports.getIDToken = getIDToken; + var summary_1 = require_summary(); + Object.defineProperty(exports, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary(); + Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils(); + Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports.platform = __importStar(require_platform()); + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SourceDescriptionsNotEmpty = void 0; -const SourceDescriptionsNotEmpty = () => { - return { - SourceDescriptions: { - enter(sourceDescriptions, { report, location }) { - if (!sourceDescriptions?.length) { - report({ - message: 'The `sourceDescriptions` list must have at least one entry.', - location, - }); - } - }, - }, +// node_modules/@actions/github/lib/context.js +var require_context = __commonJS({ + "node_modules/@actions/github/lib/context.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Context = void 0; + var fs_1 = __require("fs"); + var os_1 = __require("os"); + var Context = class { + /** + * Hydrate the context from the environment + */ + constructor() { + var _a, _b, _c; + this.payload = {}; + if (process.env.GITHUB_EVENT_PATH) { + if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { + this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); + } else { + const path13 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path13} does not exist${os_1.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'"); + } }; -}; -exports.SourceDescriptionsNotEmpty = SourceDescriptionsNotEmpty; - - -/***/ }), - -/***/ 71378: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; + exports.Context = Context; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.StepOnFailureUnique = void 0; -const StepOnFailureUnique = () => { - return { - OnFailureActionList: { - enter(onFailureActionList, { report, location }) { - if (!onFailureActionList) - return; - const seenFailureActions = new Set(); - for (const onFailureAction of onFailureActionList) { - if (seenFailureActions.has(onFailureAction?.name)) { - report({ - message: 'The action `name` must be unique amongst listed `onFailure` actions.', - location: location.child([onFailureActionList.indexOf(onFailureAction)]), - }); - } - if (seenFailureActions.has(onFailureAction?.reference)) { - report({ - message: 'The action `reference` must be unique amongst listed `onFailure` actions.', - location: location.child([onFailureActionList.indexOf(onFailureAction)]), - }); - } - onFailureAction?.name - ? seenFailureActions.add(onFailureAction.name) - : seenFailureActions.add(onFailureAction.reference); - } - }, - }, +// node_modules/@actions/github/lib/internal/utils.js +var require_utils3 = __commonJS({ + "node_modules/@actions/github/lib/internal/utils.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + var desc = Object.getOwnPropertyDescriptor(m, k3); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k3]; + } }; + } + Object.defineProperty(o, k22, desc); + }) : (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + o[k22] = m[k3]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v3) { + Object.defineProperty(o, "default", { enumerable: true, value: v3 }); + }) : function(o, v3) { + o["default"] = v3; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; }; -}; -exports.StepOnFailureUnique = StepOnFailureUnique; - - -/***/ }), - -/***/ 2820: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.StepOnSuccessUnique = void 0; -const StepOnSuccessUnique = () => { - return { - OnSuccessActionList: { - enter(onSuccessActionList, { report, location }) { - if (!onSuccessActionList) - return; - const seenSuccessActions = new Set(); - for (const onSuccessAction of onSuccessActionList) { - if (seenSuccessActions.has(onSuccessAction?.name)) { - report({ - message: 'The action `name` must be unique amongst listed `onSuccess` actions.', - location: location.child([onSuccessActionList.indexOf(onSuccessAction)]), - }); - } - if (seenSuccessActions.has(onSuccessAction?.reference)) { - report({ - message: 'The action `reference` must be unique amongst listed `onSuccess` actions.', - location: location.child([onSuccessActionList.indexOf(onSuccessAction)]), - }); - } - onSuccessAction?.name - ? seenSuccessActions.add(onSuccessAction.name) - : seenSuccessActions.add(onSuccessAction.reference); - } - }, - }, + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P3, generator) { + function adopt(value) { + return value instanceof P3 ? value : new P3(function(resolve8) { + resolve8(value); + }); + } + return new (P3 || (P3 = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e2) { + reject(e2); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e2) { + reject(e2); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; -}; -exports.StepOnSuccessUnique = StepOnSuccessUnique; - + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getApiBaseUrl = exports.getProxyFetch = exports.getProxyAgentDispatcher = exports.getProxyAgent = exports.getAuthString = void 0; + var httpClient = __importStar(require_lib()); + var undici_1 = require_undici(); + function getAuthString(token, options2) { + if (!token && !options2.auth) { + throw new Error("Parameter token or opts.auth is required"); + } else if (token && options2.auth) { + throw new Error("Parameters token and opts.auth may not both be specified"); + } + return typeof options2.auth === "string" ? options2.auth : `token ${token}`; + } + exports.getAuthString = getAuthString; + function getProxyAgent(destinationUrl) { + const hc = new httpClient.HttpClient(); + return hc.getAgent(destinationUrl); + } + exports.getProxyAgent = getProxyAgent; + function getProxyAgentDispatcher(destinationUrl) { + const hc = new httpClient.HttpClient(); + return hc.getAgentDispatcher(destinationUrl); + } + exports.getProxyAgentDispatcher = getProxyAgentDispatcher; + function getProxyFetch(destinationUrl) { + const httpDispatcher = getProxyAgentDispatcher(destinationUrl); + const proxyFetch = (url3, opts) => __awaiter(this, void 0, void 0, function* () { + return (0, undici_1.fetch)(url3, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); + }); + return proxyFetch; + } + exports.getProxyFetch = getProxyFetch; + function getApiBaseUrl() { + return process.env["GITHUB_API_URL"] || "https://api.github.com"; + } + exports.getApiBaseUrl = getApiBaseUrl; + } +}); -/***/ }), +// node_modules/universal-user-agent/dist-node/index.js +var require_dist_node = __commonJS({ + "node_modules/universal-user-agent/dist-node/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + 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 ""; + } + exports.getUserAgent = getUserAgent; + } +}); -/***/ 41352: -/***/ ((__unused_webpack_module, exports) => { +// node_modules/before-after-hook/lib/register.js +var require_register = __commonJS({ + "node_modules/before-after-hook/lib/register.js"(exports, module3) { + module3.exports = register; + function register(state, name, method, options2) { + if (typeof method !== "function") { + throw new Error("method for before hook must be a function"); + } + if (!options2) { + options2 = {}; + } + if (Array.isArray(name)) { + return name.reverse().reduce(function(callback, name2) { + return register.bind(null, state, name2, callback, options2); + }, method)(); + } + return Promise.resolve().then(function() { + if (!state.registry[name]) { + return method(options2); + } + return state.registry[name].reduce(function(method2, registered) { + return registered.hook.bind(null, method2, options2); + }, method)(); + }); + } + } +}); -"use strict"; +// node_modules/before-after-hook/lib/add.js +var require_add = __commonJS({ + "node_modules/before-after-hook/lib/add.js"(exports, module3) { + module3.exports = addHook; + function addHook(state, kind, name, hook) { + var orig = hook; + if (!state.registry[name]) { + state.registry[name] = []; + } + if (kind === "before") { + hook = function(method, options2) { + return Promise.resolve().then(orig.bind(null, options2)).then(method.bind(null, options2)); + }; + } + if (kind === "after") { + hook = function(method, options2) { + var result; + return Promise.resolve().then(method.bind(null, options2)).then(function(result_) { + result = result_; + return orig(result, options2); + }).then(function() { + return result; + }); + }; + } + if (kind === "error") { + hook = function(method, options2) { + return Promise.resolve().then(method.bind(null, options2)).catch(function(error2) { + return orig(error2, options2); + }); + }; + } + state.registry[name].push({ + hook, + orig + }); + } + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.StepIdUnique = void 0; -const StepIdUnique = () => { - return { - Workflow: { - enter(workflow, { report, location }) { - if (!workflow.steps) - return; - const seenSteps = new Set(); - for (const step of workflow.steps) { - if (!step.stepId) - return; - if (seenSteps.has(step.stepId)) { - report({ - message: 'The `stepId` must be unique amongst all steps described in the workflow.', - location: location.child(['steps', workflow.steps.indexOf(step)]), - }); - } - seenSteps.add(step.stepId); - } - }, - }, - }; -}; -exports.StepIdUnique = StepIdUnique; - - -/***/ }), - -/***/ 30792: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.WorkflowDependsOn = void 0; -const WorkflowDependsOn = () => { - const seenWorkflow = new Set(); - const existingSourceDescriptions = new Set(); - const existingWorkflowIds = new Set(); - return { - SourceDescriptions: { - enter(sourceDescriptions) { - for (const sourceDescription of sourceDescriptions) { - existingSourceDescriptions.add(sourceDescription.name); - } - }, - }, - Workflows: { - enter(workflows) { - for (const workflow of workflows) { - existingWorkflowIds.add(workflow.workflowId); - } - }, - }, - Workflow: { - leave(workflow, { report, location }) { - if (!workflow.dependsOn) - return; - for (const item of workflow.dependsOn) { - // Possible dependsOn workflow pattern: $sourceDescriptions.. - if (item.startsWith('$sourceDescriptions.')) { - const sourceDescriptionName = item.split('.')[1]; - if (!existingSourceDescriptions.has(sourceDescriptionName)) { - report({ - message: `SourceDescription ${sourceDescriptionName} must be defined in sourceDescriptions.`, - location: location.child([`dependsOn`, workflow.dependsOn.indexOf(item)]), - }); - } - } - if (!item.startsWith('$sourceDescriptions') && !existingWorkflowIds.has(item)) { - report({ - message: `Workflow ${item} must be defined in workflows.`, - location: location.child([`dependsOn`, workflow.dependsOn.indexOf(item)]), - }); - } - if (seenWorkflow.has(item)) { - report({ - message: 'Every workflow in dependsOn must be unique.', - location: location.child([`dependsOn`]), - }); - } - seenWorkflow.add(item); - } - }, - }, - }; -}; -exports.WorkflowDependsOn = WorkflowDependsOn; - - -/***/ }), - -/***/ 3209: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.WorkflowIdUnique = void 0; -const WorkflowIdUnique = () => { - const seenWorkflow = new Set(); - return { - Workflow: { - enter(workflow, { report, location }) { - if (!workflow.workflowId) - return; - if (seenWorkflow.has(workflow.workflowId)) { - report({ - message: 'Every workflow must have a unique `workflowId`.', - location: location.child([workflow.workflowId]), - }); - } - seenWorkflow.add(workflow.workflowId); - }, - }, - }; -}; -exports.WorkflowIdUnique = WorkflowIdUnique; - - -/***/ }), - -/***/ 21935: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChannelsKebabCase = void 0; -const ChannelsKebabCase = () => { - return { - Channel(_channel, { report, key }) { - const segments = key - .split(/[/.:]/) // split on / or : as likely channel namespacers - .filter((s) => s !== ''); // filter out empty segments - if (!segments.every((segment) => /^{.+}$/.test(segment) || /^[a-z0-9-.]+$/.test(segment))) { - report({ - message: `\`${key}\` does not use kebab-case.`, - location: { reportOnKey: true }, - }); - } - }, - }; -}; -exports.ChannelsKebabCase = ChannelsKebabCase; - - -/***/ }), - -/***/ 71737: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.preprocessors = exports.rules = void 0; -const assertions_1 = __nccwpck_require__(11612); -const struct_1 = __nccwpck_require__(16612); -const info_contact_1 = __nccwpck_require__(4377); -const info_license_strict_1 = __nccwpck_require__(55290); -const operation_operationId_1 = __nccwpck_require__(27623); -const tag_description_1 = __nccwpck_require__(58002); -const tags_alphabetical_1 = __nccwpck_require__(11384); -const channels_kebab_case_1 = __nccwpck_require__(21935); -const no_channel_trailing_slash_1 = __nccwpck_require__(61123); -exports.rules = { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - //@ts-ignore TODO: This is depricated property `spec` and should be removed in the future - spec: struct_1.Struct, - struct: struct_1.Struct, - assertions: assertions_1.Assertions, - 'info-contact': info_contact_1.InfoContact, - 'info-license-strict': info_license_strict_1.InfoLicenseStrict, - 'operation-operationId': operation_operationId_1.OperationOperationId, - 'channels-kebab-case': channels_kebab_case_1.ChannelsKebabCase, - 'no-channel-trailing-slash': no_channel_trailing_slash_1.NoChannelTrailingSlash, - 'tag-description': tag_description_1.TagDescription, - 'tags-alphabetical': tags_alphabetical_1.TagsAlphabetical, -}; -exports.preprocessors = {}; - - -/***/ }), - -/***/ 61123: -/***/ ((__unused_webpack_module, exports) => { +// node_modules/before-after-hook/lib/remove.js +var require_remove = __commonJS({ + "node_modules/before-after-hook/lib/remove.js"(exports, module3) { + module3.exports = removeHook; + function removeHook(state, name, method) { + if (!state.registry[name]) { + return; + } + var index = state.registry[name].map(function(registered) { + return registered.orig; + }).indexOf(method); + if (index === -1) { + return; + } + state.registry[name].splice(index, 1); + } + } +}); -"use strict"; +// node_modules/before-after-hook/index.js +var require_before_after_hook = __commonJS({ + "node_modules/before-after-hook/index.js"(exports, module3) { + var register = require_register(); + var addHook = require_add(); + var removeHook = require_remove(); + var bind = Function.bind; + var bindable = bind.bind(bind); + function bindApi(hook, state, name) { + var removeHookRef = bindable(removeHook, null).apply( + null, + name ? [state, name] : [state] + ); + hook.api = { remove: removeHookRef }; + hook.remove = removeHookRef; + ["before", "error", "after", "wrap"].forEach(function(kind) { + var args = name ? [state, kind, name] : [state, kind]; + hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); + }); + } + function HookSingular() { + var singularHookName = "h"; + var singularHookState = { + registry: {} + }; + var singularHook = register.bind(null, singularHookState, singularHookName); + bindApi(singularHook, singularHookState, singularHookName); + return singularHook; + } + function HookCollection() { + var state = { + registry: {} + }; + var hook = register.bind(null, state); + bindApi(hook, state); + return hook; + } + var collectionHookDeprecationMessageDisplayed = false; + function Hook() { + if (!collectionHookDeprecationMessageDisplayed) { + console.warn( + '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' + ); + collectionHookDeprecationMessageDisplayed = true; + } + return HookCollection(); + } + Hook.Singular = HookSingular.bind(); + Hook.Collection = HookCollection.bind(); + module3.exports = Hook; + module3.exports.Hook = Hook; + module3.exports.Singular = Hook.Singular; + module3.exports.Collection = Hook.Collection; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoChannelTrailingSlash = void 0; -const NoChannelTrailingSlash = () => { - return { - Channel(_channel, { report, key, location }) { - if (key.endsWith('/') && key !== '/') { - report({ - message: `\`${key}\` should not have a trailing slash.`, - location: location.key(), - }); - } - }, +// node_modules/@octokit/endpoint/dist-node/index.js +var require_dist_node2 = __commonJS({ + "node_modules/@octokit/endpoint/dist-node/index.js"(exports, module3) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __export2 = (target, all2) => { + for (var name in all2) + __defProp2(target, name, { get: all2[name], enumerable: true }); }; -}; -exports.NoChannelTrailingSlash = NoChannelTrailingSlash; - - -/***/ }), - -/***/ 43463: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChannelsKebabCase = void 0; -const ChannelsKebabCase = () => { - return { - Channel(channel, { report }) { - const segments = (channel.address || '') - .split(/[/.:]/) // split on / or : as likely channel namespacers - .filter((s) => s !== ''); // filter out empty segments - if (!segments.every((segment) => /^{.+}$/.test(segment) || /^[a-z0-9-.]+$/.test(segment))) { - report({ - message: `\`${channel.address}\` does not use kebab-case.`, - location: { reportOnKey: true }, - }); - } - }, + var __copyProps2 = (to2, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to2, key) && key !== except) + __defProp2(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to2; }; -}; -exports.ChannelsKebabCase = ChannelsKebabCase; - - -/***/ }), - -/***/ 2366: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.preprocessors = exports.rules = void 0; -const assertions_1 = __nccwpck_require__(11612); -const struct_1 = __nccwpck_require__(16612); -const info_contact_1 = __nccwpck_require__(4377); -const info_license_strict_1 = __nccwpck_require__(55290); -const operation_operationId_1 = __nccwpck_require__(27623); -const tag_description_1 = __nccwpck_require__(58002); -const tags_alphabetical_1 = __nccwpck_require__(11384); -const channels_kebab_case_1 = __nccwpck_require__(43463); -const no_channel_trailing_slash_1 = __nccwpck_require__(68053); -exports.rules = { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - //@ts-ignore TODO: This is depricated property `spec` and should be removed in the future - spec: struct_1.Struct, - struct: struct_1.Struct, - assertions: assertions_1.Assertions, - 'info-contact': info_contact_1.InfoContact, - 'info-license-strict': info_license_strict_1.InfoLicenseStrict, - 'operation-operationId': operation_operationId_1.OperationOperationId, - 'channels-kebab-case': channels_kebab_case_1.ChannelsKebabCase, - 'no-channel-trailing-slash': no_channel_trailing_slash_1.NoChannelTrailingSlash, - 'tag-description': tag_description_1.TagDescription, - 'tags-alphabetical': tags_alphabetical_1.TagsAlphabetical, -}; -exports.preprocessors = {}; - - -/***/ }), - -/***/ 68053: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoChannelTrailingSlash = void 0; -const NoChannelTrailingSlash = () => { - return { - Channel(channel, { report, location }) { - if (channel.address.endsWith('/') && channel.address !== '/') { - report({ - message: `\`${channel.address}\` should not have a trailing slash.`, - location: location.key(), - }); - } - }, + var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var dist_src_exports = {}; + __export2(dist_src_exports, { + endpoint: () => endpoint + }); + module3.exports = __toCommonJS(dist_src_exports); + var import_universal_user_agent = require_dist_node(); + var VERSION = "9.0.6"; + var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; + var DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "" + } }; -}; -exports.NoChannelTrailingSlash = NoChannelTrailingSlash; - - -/***/ }), - -/***/ 16533: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.asserts = exports.runOnValuesSet = exports.runOnKeysSet = void 0; -exports.buildAssertCustomFunction = buildAssertCustomFunction; -const utils_1 = __nccwpck_require__(75450); -const utils_2 = __nccwpck_require__(15310); -exports.runOnKeysSet = new Set([ - 'mutuallyExclusive', - 'mutuallyRequired', - 'enum', - 'pattern', - 'notPattern', - 'minLength', - 'maxLength', - 'casing', - 'sortOrder', - 'disallowed', - 'required', - 'requireAny', - 'ref', - 'const', - 'defined', // In case if `property` for assertions is not added -]); -exports.runOnValuesSet = new Set([ - 'pattern', - 'notPattern', - 'enum', - 'defined', - 'undefined', - 'nonEmpty', - 'minLength', - 'maxLength', - 'casing', - 'sortOrder', - 'ref', - 'const', -]); -exports.asserts = { - pattern: (value, condition, { baseLocation, rawValue }) => { - if (typeof value === 'undefined' || (0, utils_1.isPlainObject)(value)) - return []; // property doesn't exist or is an object, no need to lint it with this assert - const values = Array.isArray(value) ? value : [value]; - const regex = (0, utils_2.regexFromString)(condition); - return values - .map((_val) => !regex?.test(_val) && { - message: `"${_val}" should match a regex ${condition}`, - location: (0, utils_1.isString)(value) - ? baseLocation - : (0, utils_1.isPlainObject)(rawValue) - ? baseLocation.child(_val).key() - : baseLocation.key(), - }) - .filter(utils_1.isTruthy); - }, - notPattern: (value, condition, { baseLocation, rawValue }) => { - if (typeof value === 'undefined' || (0, utils_1.isPlainObject)(value)) - return []; // property doesn't exist or is an object, no need to lint it with this assert - const values = Array.isArray(value) ? value : [value]; - const regex = (0, utils_2.regexFromString)(condition); - return values - .map((_val) => regex?.test(_val) && { - message: `"${_val}" should not match a regex ${condition}`, - location: (0, utils_1.isString)(value) - ? baseLocation - : (0, utils_1.isPlainObject)(rawValue) - ? baseLocation.child(_val).key() - : baseLocation.key(), - }) - .filter(utils_1.isTruthy); - }, - enum: (value, condition, { baseLocation }) => { - if (typeof value === 'undefined' || (0, utils_1.isPlainObject)(value)) - return []; // property doesn't exist or is an object, no need to lint it with this assert - const values = Array.isArray(value) ? value : [value]; - return values - .map((_val) => !condition.includes(_val) && { - message: `"${_val}" should be one of the predefined values`, - location: (0, utils_1.isString)(value) ? baseLocation : baseLocation.child(_val).key(), - }) - .filter(utils_1.isTruthy); - }, - defined: (value, condition = true, { baseLocation }) => { - const isDefined = typeof value !== 'undefined'; - const isValid = condition ? isDefined : !isDefined; - return isValid - ? [] - : [ - { - message: condition ? `Should be defined` : 'Should be not defined', - location: baseLocation, - }, - ]; - }, - required: (value, keys, { baseLocation }) => { - return keys - .map((requiredKey) => !value.includes(requiredKey) && { - message: `${requiredKey} is required`, - location: baseLocation.key(), - }) - .filter(utils_1.isTruthy); - }, - disallowed: (value, condition, { baseLocation }) => { - if (typeof value === 'undefined' || (0, utils_1.isPlainObject)(value)) - return []; // property doesn't exist or is an object, no need to lint it with this assert - const values = Array.isArray(value) ? value : [value]; - return values - .map((_val) => condition.includes(_val) && { - message: `"${_val}" is disallowed`, - location: (0, utils_1.isString)(value) ? baseLocation : baseLocation.child(_val).key(), - }) - .filter(utils_1.isTruthy); - }, - const: (value, condition, { baseLocation }) => { - if (typeof value === 'undefined') - return []; - if (Array.isArray(value)) { - return value - .map((_val) => condition !== _val && { - message: `"${_val}" should be equal ${condition} `, - location: (0, utils_1.isString)(value) ? baseLocation : baseLocation.child(_val).key(), - }) - .filter(utils_1.isTruthy); - } - else { - return value !== condition - ? [ - { - message: `${value} should be equal ${condition}`, - location: baseLocation, - }, - ] - : []; + function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); + } + function isPlainObject2(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, options2) { + const result = Object.assign({}, defaults); + Object.keys(options2).forEach((key) => { + if (isPlainObject2(options2[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options2[key] }); + else + result[key] = mergeDeep(defaults[key], options2[key]); + } else { + Object.assign(result, { [key]: options2[key] }); } - }, - undefined: (value, condition = true, { baseLocation }) => { - const isUndefined = typeof value === 'undefined'; - const isValid = condition ? isUndefined : !isUndefined; - return isValid - ? [] - : [ - { - message: condition ? `Should not be defined` : 'Should be defined', - location: baseLocation, - }, - ]; - }, - nonEmpty: (value, condition = true, { baseLocation }) => { - const isEmpty = typeof value === 'undefined' || value === null || value === ''; - const isValid = condition ? !isEmpty : isEmpty; - return isValid - ? [] - : [ - { - message: condition ? `Should not be empty` : 'Should be empty', - location: baseLocation, - }, - ]; - }, - minLength: (value, condition, { baseLocation }) => { - if (typeof value === 'undefined' || value.length >= condition) - return []; // property doesn't exist, no need to lint it with this assert - return [ - { - message: `Should have at least ${condition} characters`, - location: baseLocation, - }, - ]; - }, - maxLength: (value, condition, { baseLocation }) => { - if (typeof value === 'undefined' || value.length <= condition) - return []; // property doesn't exist, no need to lint it with this assert - return [ - { - message: `Should have at most ${condition} characters`, - location: baseLocation, - }, - ]; - }, - casing: (value, condition, { baseLocation }) => { - if (typeof value === 'undefined' || (0, utils_1.isPlainObject)(value)) - return []; // property doesn't exist or is an object, no need to lint it with this assert - const values = Array.isArray(value) ? value : [value]; - const casingRegexes = { - camelCase: /^[a-z][a-zA-Z0-9]*$/g, - 'kebab-case': /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/g, - snake_case: /^([a-z][a-z0-9]*)(_[a-z0-9]+)*$/g, - PascalCase: /^[A-Z][a-zA-Z0-9]+$/g, - MACRO_CASE: /^([A-Z][A-Z0-9]*)(_[A-Z0-9]+)*$/g, - 'COBOL-CASE': /^([A-Z][A-Z0-9]*)(-[A-Z0-9]+)*$/g, - flatcase: /^[a-z][a-z0-9]+$/g, - }; - return values - .map((_val) => !_val.match(casingRegexes[condition]) && { - message: `"${_val}" should use ${condition}`, - location: (0, utils_1.isString)(value) ? baseLocation : baseLocation.child(_val).key(), - }) - .filter(utils_1.isTruthy); - }, - sortOrder: (value, condition, { baseLocation }) => { - const direction = condition.direction || condition; - const property = condition.property; - if (Array.isArray(value) && value.length > 0 && typeof value[0] === 'object' && !property) { - return [ - { - message: `Please define a property to sort objects by`, - location: baseLocation, - }, - ]; + }); + return result; + } + function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === void 0) { + delete obj[key]; } - if (typeof value === 'undefined' || (0, utils_2.isOrdered)(value, condition)) - return []; - return [ - { - message: `Should be sorted in ${direction === 'asc' ? 'an ascending' : 'a descending'} order${property ? ` by property ${property}` : ''}`, - location: baseLocation, - }, - ]; - }, - mutuallyExclusive: (value, condition, { baseLocation }) => { - if ((0, utils_2.getIntersectionLength)(value, condition) < 2) - return []; - return [ - { - message: `${condition.join(', ')} keys should be mutually exclusive`, - location: baseLocation.key(), - }, - ]; - }, - mutuallyRequired: (value, condition, { baseLocation }) => { - const isValid = (0, utils_2.getIntersectionLength)(value, condition) > 0 - ? (0, utils_2.getIntersectionLength)(value, condition) === condition.length - : true; - return isValid - ? [] - : [ - { - message: `Properties ${condition.join(', ')} are mutually required`, - location: baseLocation.key(), - }, - ]; - }, - requireAny: (value, condition, { baseLocation }) => { - return (0, utils_2.getIntersectionLength)(value, condition) >= 1 - ? [] - : [ - { - message: `Should have any of ${condition.join(', ')}`, - location: baseLocation.key(), - }, - ]; - }, - ref: (_value, condition, { baseLocation, rawValue }) => { - if (typeof rawValue === 'undefined') - return []; // property doesn't exist, no need to lint it with this assert - const hasRef = rawValue.hasOwnProperty('$ref'); - if (typeof condition === 'boolean') { - const isValid = condition ? hasRef : !hasRef; - return isValid - ? [] - : [ - { - message: condition ? `should use $ref` : 'should not use $ref', - location: hasRef ? baseLocation : baseLocation.key(), - }, - ]; + } + return obj; + } + function merge2(defaults, route, options2) { + if (typeof route === "string") { + let [method, url3] = route.split(" "); + options2 = Object.assign(url3 ? { method, url: url3 } : { url: method }, options2); + } else { + options2 = Object.assign({}, route); + } + options2.headers = lowercaseKeys(options2.headers); + removeUndefinedProperties(options2); + removeUndefinedProperties(options2.headers); + const mergedOptions = mergeDeep(defaults || {}, options2); + if (options2.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(url3, parameters) { + const separator = /\?/.test(url3) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url3; + } + return url3 + 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+)|(?:(? a2.concat(b2), []); + } + function omit2(object, keysToOmit) { + const result = { __proto__: null }; + for (const key of Object.keys(object)) { + if (keysToOmit.indexOf(key) === -1) { + result[key] = object[key]; } - const regex = (0, utils_2.regexFromString)(condition); - const isValid = hasRef && regex?.test(rawValue['$ref']); - return isValid - ? [] - : [ - { - message: `$ref value should match ${condition}`, - location: hasRef ? baseLocation : baseLocation.key(), - }, - ]; - }, -}; -function buildAssertCustomFunction(fn) { - return (value, options, ctx) => fn.call(null, value, options, ctx); -} - - -/***/ }), - -/***/ 11612: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Assertions = void 0; -const utils_1 = __nccwpck_require__(15310); -const utils_2 = __nccwpck_require__(75450); -const Assertions = (opts) => { - const visitors = []; - // As 'Assertions' has an array of asserts, - // that array spreads into an 'opts' object on init rules phase here - // https://github.com/Redocly/redocly-cli/blob/main/packages/core/src/config/config.ts#L311 - // that is why we need to iterate through 'opts' values; - // before - filter only object 'opts' values - const assertions = Object.values(opts).filter((opt) => typeof opt === 'object' && opt !== null); - for (const [_, assertion] of assertions.entries()) { - if (!(0, utils_2.isString)(assertion.subject.type)) { - throw new Error(`${assertion.assertionId}: 'type' (String) is required`); + } + return result; + } + function encodeReserved(str2) { + return str2.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, "]"); } - const subjectVisitor = (0, utils_1.buildSubjectVisitor)(assertion.assertionId, assertion); - const visitorObject = (0, utils_1.buildVisitorObject)(assertion, subjectVisitor); - visitors.push(visitorObject); + return part; + }).join(""); } - return visitors; -}; -exports.Assertions = Assertions; - - -/***/ }), - -/***/ 15310: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getAssertsToApply = getAssertsToApply; -exports.buildVisitorObject = buildVisitorObject; -exports.buildSubjectVisitor = buildSubjectVisitor; -exports.getIntersectionLength = getIntersectionLength; -exports.isOrdered = isOrdered; -exports.runAssertion = runAssertion; -exports.regexFromString = regexFromString; -const asserts_1 = __nccwpck_require__(16533); -const logger_1 = __nccwpck_require__(11339); -const ref_utils_1 = __nccwpck_require__(97977); -const utils_1 = __nccwpck_require__(75450); -const assertionMessageTemplates = { - problems: '{{problems}}', -}; -function getPredicatesFromLocators(locators) { - const { filterInParentKeys, filterOutParentKeys, matchParentKeys } = locators; - const keyMatcher = matchParentKeys && regexFromString(matchParentKeys); - const matchKeysPredicate = keyMatcher && ((key) => keyMatcher.test(key.toString())); - const filterInPredicate = Array.isArray(filterInParentKeys) && - ((key) => filterInParentKeys.includes(key.toString())); - const filterOutPredicate = Array.isArray(filterOutParentKeys) && - ((key) => !filterOutParentKeys.includes(key.toString())); - return [matchKeysPredicate, filterInPredicate, filterOutPredicate].filter(utils_1.isTruthy); -} -function getAssertsToApply(assertion) { - const assertsToApply = (0, utils_1.keysOf)(asserts_1.asserts) - .filter((assertName) => assertion.assertions[assertName] !== undefined) - .map((assertName) => { - return { - name: assertName, - conditions: assertion.assertions[assertName], - runsOnKeys: asserts_1.runOnKeysSet.has(assertName), - runsOnValues: asserts_1.runOnValuesSet.has(assertName), - }; - }); - const shouldRunOnKeys = assertsToApply.find((assert) => assert.runsOnKeys && !assert.runsOnValues); - const shouldRunOnValues = assertsToApply.find((assert) => assert.runsOnValues && !assert.runsOnKeys); - if (shouldRunOnValues && !assertion.subject.property) { - throw new Error(`The '${shouldRunOnValues.name}' assertion can't be used on all keys. Please provide a single property.`); + function encodeUnreserved(str2) { + return encodeURIComponent(str2).replace(/[!'()*]/g, function(c2) { + return "%" + c2.charCodeAt(0).toString(16).toUpperCase(); + }); } - if (shouldRunOnKeys && assertion.subject.property) { - throw new Error(`The '${shouldRunOnKeys.name}' assertion can't be used on properties. Please remove the 'property' key.`); + function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; + } } - return assertsToApply; -} -function getAssertionProperties({ subject }) { - return (Array.isArray(subject.property) ? subject.property : [subject?.property]).filter(Boolean); -} -function applyAssertions(assertionDefinition, asserts, ctx) { - const properties = getAssertionProperties(assertionDefinition); - const assertResults = []; - for (const assert of asserts) { - if (properties.length) { - for (const property of properties) { - assertResults.push(runAssertion({ - assert, - ctx, - assertionProperty: property, - })); + function isDefined2(value) { + return value !== void 0 && value !== null; + } + function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; + } + function getValues(context2, operator, key, modifier) { + var value = context2[key], result = []; + if (isDefined2(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || 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(isDefined2).forEach(function(value2) { + result.push( + encodeValue(operator, value2, isKeyOperator(operator) ? key : "") + ); + }); + } else { + Object.keys(value).forEach(function(k3) { + if (isDefined2(value[k3])) { + result.push(encodeValue(operator, value[k3], k3)); + } + }); + } + } else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined2).forEach(function(value2) { + tmp.push(encodeValue(operator, value2)); + }); + } else { + Object.keys(value).forEach(function(k3) { + if (isDefined2(value[k3])) { + tmp.push(encodeUnreserved(k3)); + tmp.push(encodeValue(operator, value[k3].toString())); + } + }); } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } } - else { - assertResults.push(runAssertion({ - assert, - ctx, - })); + } else { + if (operator === ";") { + if (isDefined2(value)) { + result.push(encodeUnreserved(key)); + } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); } + } + return result; } - return assertResults.flat(); -} -function buildVisitorObject(assertion, subjectVisitor) { - const targetVisitorLocatorPredicates = getPredicatesFromLocators(assertion.subject); - const targetVisitorSkipFunction = targetVisitorLocatorPredicates.length - ? (_, key) => !targetVisitorLocatorPredicates.every((predicate) => predicate(key)) - : undefined; - const targetVisitor = { - [assertion.subject.type]: { - enter: subjectVisitor, - ...(targetVisitorSkipFunction && { skip: targetVisitorSkipFunction }), - }, - }; - if (!Array.isArray(assertion.where)) { - return targetVisitor; - } - let currentVisitorLevel = {}; - const visitor = currentVisitorLevel; - const context = assertion.where; - for (let index = 0; index < context.length; index++) { - const assertionDefinitionNode = context[index]; - if (!(0, utils_1.isString)(assertionDefinitionNode.subject?.type)) { - throw new Error(`${assertion.assertionId} -> where -> [${index}]: 'type' (String) is required`); - } - const locatorPredicates = getPredicatesFromLocators(assertionDefinitionNode.subject); - const assertsToApply = getAssertsToApply(assertionDefinitionNode); - const skipFunction = (node, key, ctx) => !locatorPredicates.every((predicate) => predicate(key)) || - !!applyAssertions(assertionDefinitionNode, assertsToApply, { ...ctx, node }).length; - const nodeVisitor = { - ...((locatorPredicates.length || assertsToApply.length) && { skip: skipFunction }), - }; - if (assertionDefinitionNode.subject.type === assertion.subject.type && - index === context.length - 1) { - // We have to merge the visitors if the last node inside the `where` is the same as the subject. - targetVisitor[assertion.subject.type] = { - enter: subjectVisitor, - ...((nodeVisitor.skip && { skip: nodeVisitor.skip }) || - (targetVisitorSkipFunction && { - skip: (node, key, ctx // We may have locators defined on assertion level and on where level for the same node type - ) => !!(nodeVisitor.skip?.(node, key, ctx) || targetVisitorSkipFunction?.(node, key)), - })), - }; - } - else { - currentVisitorLevel = currentVisitorLevel[assertionDefinitionNode.subject?.type] = - nodeVisitor; - } - } - currentVisitorLevel[assertion.subject.type] = targetVisitor[assertion.subject.type]; - return visitor; -} -function buildSubjectVisitor(assertId, assertion) { - return (node, ctx) => { - const properties = getAssertionProperties(assertion); - const defaultMessage = `${logger_1.colorize.blue(assertId)} failed because the ${logger_1.colorize.blue(assertion.subject.type)} ${logger_1.colorize.blue(properties.join(', '))} didn't meet the assertions: ${assertionMessageTemplates.problems}`.replace(/ +/g, ' '); - const problems = applyAssertions(assertion, getAssertsToApply(assertion), { - ...ctx, - node, - }); - if (problems.length) { - for (const problemGroup of groupProblemsByPointer(problems)) { - const message = assertion.message || defaultMessage; - const problemMessage = getProblemsMessage(problemGroup); - ctx.report({ - message: message.replace(assertionMessageTemplates.problems, problemMessage), - location: getProblemsLocation(problemGroup) || ctx.location, - forceSeverity: assertion.severity || 'error', - suggest: assertion.suggest || [], - ruleId: assertId, - }); + function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; + } + function expand(template, context2) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + template = template.replace( + /\{([^\{\}]+)\}|([^\{\}]+)/g, + function(_5, 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(context2, 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); + } } - }; -} -function groupProblemsByPointer(problems) { - const groups = {}; - for (const problem of problems) { - if (!problem.location) - continue; - const pointer = problem.location.pointer; - groups[pointer] = groups[pointer] || []; - groups[pointer].push(problem); - } - return Object.values(groups); -} -function getProblemsLocation(problems) { - return problems.length ? problems[0].location : undefined; -} -function getProblemsMessage(problems) { - return problems.length === 1 - ? problems[0].message ?? '' - : problems.map((problem) => `\n- ${problem.message ?? ''}`).join(''); -} -function getIntersectionLength(keys, properties) { - const props = new Set(properties); - let count = 0; - for (const key of keys) { - if (props.has(key)) { - count++; + ); + if (template === "/") { + return template; + } else { + return template.replace(/\/$/, ""); + } + } + function parse(options2) { + let method = options2.method.toUpperCase(); + let url3 = (options2.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options2.headers); + let body; + let parameters = omit2(options2, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); + const urlVariableNames = extractUrlVariableNames(url3); + url3 = parseUrl(url3).expand(parameters); + if (!/^http/.test(url3)) { + url3 = options2.baseUrl + url3; + } + const omittedParameters = Object.keys(options2).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit2(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + if (options2.mediaType.format) { + headers.accept = headers.accept.split(/,/).map( + (format) => format.replace( + /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, + `application/vnd$1$2.${options2.mediaType.format}` + ) + ).join(","); + } + if (url3.endsWith("/graphql")) { + if (options2.mediaType.previews?.length) { + const previewsFromAcceptHeader = headers.accept.match(/(? { + const format = options2.mediaType.format ? `.${options2.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }).join(","); + } } - } - return count; -} -function isOrdered(value, options) { - const direction = options.direction || options; - const property = options.property; - for (let i = 1; i < value.length; i++) { - let currValue = value[i]; - let prevVal = value[i - 1]; - if (property) { - const currPropValue = value[i][property]; - const prevPropValue = value[i - 1][property]; - if (!currPropValue || !prevPropValue) { - return false; // property doesn't exist, so collection is not ordered - } - currValue = currPropValue; - prevVal = prevPropValue; - } - if (typeof currValue === 'string' && typeof prevVal === 'string') { - currValue = currValue.toLowerCase(); - prevVal = prevVal.toLowerCase(); - } - const result = direction === 'asc' ? currValue >= prevVal : currValue <= prevVal; - if (!result) { - return false; + } + if (["GET", "HEAD"].includes(method)) { + url3 = addQueryParameters(url3, 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: url3, headers }, + typeof body !== "undefined" ? { body } : null, + options2.request ? { request: options2.request } : null + ); } - return true; -} -function runAssertion({ assert, ctx, assertionProperty, }) { - const currentLocation = assert.name === 'ref' ? ctx.rawLocation : ctx.location; - if (assertionProperty) { - const values = (0, ref_utils_1.isRef)(ctx.node[assertionProperty]) - ? ctx.resolve(ctx.node[assertionProperty])?.node - : ctx.node[assertionProperty]; - const rawValues = ctx.rawNode[assertionProperty]; - const location = currentLocation.child(assertionProperty); - return asserts_1.asserts[assert.name](values, assert.conditions, { - ...ctx, - baseLocation: location, - rawValue: rawValues, - }); - } - else { - const value = Array.isArray(ctx.node) ? ctx.node : Object.keys(ctx.node); - return asserts_1.asserts[assert.name](value, assert.conditions, { - ...ctx, - rawValue: ctx.rawNode, - baseLocation: currentLocation, - }); + function endpointWithDefaults(defaults, route, options2) { + return parse(merge2(defaults, route, options2)); + } + function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS2 = merge2(oldDefaults, newDefaults); + const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); + return Object.assign(endpoint2, { + DEFAULTS: DEFAULTS2, + defaults: withDefaults.bind(null, DEFAULTS2), + merge: merge2.bind(null, DEFAULTS2), + parse + }); } -} -function regexFromString(input) { - const matches = input.match(/^\/(.*)\/(.*)|(.*)/); - return matches && new RegExp(matches[1] || matches[3], matches[2]); -} - - -/***/ }), - -/***/ 4377: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + var endpoint = withDefaults(null, DEFAULTS); + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.InfoContact = void 0; -const utils_1 = __nccwpck_require__(33944); -const InfoContact = () => { - return { - Info(info, { report, location }) { - if (!info.contact) { - report({ - message: (0, utils_1.missingRequiredField)('Info', 'contact'), - location: location.child('contact').key(), - }); - } - }, +// node_modules/deprecation/dist-node/index.js +var require_dist_node3 = __commonJS({ + "node_modules/deprecation/dist-node/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var Deprecation = class extends Error { + constructor(message) { + super(message); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "Deprecation"; + } }; -}; -exports.InfoContact = InfoContact; - - -/***/ }), - -/***/ 55290: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + exports.Deprecation = Deprecation; + } +}); -"use strict"; +// node_modules/wrappy/wrappy.js +var require_wrappy = __commonJS({ + "node_modules/wrappy/wrappy.js"(exports, module3) { + module3.exports = wrappy; + function wrappy(fn, cb) { + if (fn && cb) return wrappy(fn)(cb); + if (typeof fn !== "function") + throw new TypeError("need wrapper function"); + Object.keys(fn).forEach(function(k3) { + wrapper[k3] = fn[k3]; + }); + return wrapper; + function wrapper() { + var args = new Array(arguments.length); + for (var i2 = 0; i2 < args.length; i2++) { + args[i2] = arguments[i2]; + } + var ret = fn.apply(this, args); + var cb2 = args[args.length - 1]; + if (typeof ret === "function" && ret !== cb2) { + Object.keys(cb2).forEach(function(k3) { + ret[k3] = cb2[k3]; + }); + } + return ret; + } + } + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.InfoLicenseStrict = void 0; -const oas_types_1 = __nccwpck_require__(46707); -const utils_1 = __nccwpck_require__(33944); -const InfoLicenseStrict = () => { - let specVersion; - return { - Root: { - enter(root) { - specVersion = (0, oas_types_1.detectSpec)(root); - }, - License: { - leave(license, ctx) { - if (specVersion === 'oas3_1') { - (0, utils_1.validateOneOfDefinedAndNonEmpty)(['url', 'identifier'], license, ctx); - } - else { - (0, utils_1.validateDefinedAndNonEmpty)('url', license, ctx); - } - }, - }, +// node_modules/once/once.js +var require_once = __commonJS({ + "node_modules/once/once.js"(exports, module3) { + var wrappy = require_wrappy(); + module3.exports = wrappy(once); + module3.exports.strict = wrappy(onceStrict); + once.proto = once(function() { + Object.defineProperty(Function.prototype, "once", { + value: function() { + return once(this); }, - }; -}; -exports.InfoLicenseStrict = InfoLicenseStrict; - - -/***/ }), - -/***/ 37478: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.InfoLicenseUrl = void 0; -const utils_1 = __nccwpck_require__(33944); -const InfoLicenseUrl = () => { - return { - License(license, ctx) { - (0, utils_1.validateDefinedAndNonEmpty)('url', license, ctx); + configurable: true + }); + Object.defineProperty(Function.prototype, "onceStrict", { + value: function() { + return onceStrict(this); }, - }; -}; -exports.InfoLicenseUrl = InfoLicenseUrl; - - -/***/ }), - -/***/ 72816: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + configurable: true + }); + }); + function once(fn) { + var f = function() { + if (f.called) return f.value; + f.called = true; + return f.value = fn.apply(this, arguments); + }; + f.called = false; + return f; + } + function onceStrict(fn) { + var f = function() { + if (f.called) + throw new Error(f.onceError); + f.called = true; + return f.value = fn.apply(this, arguments); + }; + var name = fn.name || "Function wrapped with `once`"; + f.onceError = name + " shouldn't be called more than once"; + f.called = false; + return f; + } + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.InfoLicense = void 0; -const utils_1 = __nccwpck_require__(33944); -const InfoLicense = () => { - return { - Info(info, { report }) { - if (!info.license) { - report({ - message: (0, utils_1.missingRequiredField)('Info', 'license'), - location: { reportOnKey: true }, - }); - } - }, +// node_modules/@octokit/request-error/dist-node/index.js +var require_dist_node4 = __commonJS({ + "node_modules/@octokit/request-error/dist-node/index.js"(exports, module3) { + "use strict"; + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __export2 = (target, all2) => { + for (var name in all2) + __defProp2(target, name, { get: all2[name], enumerable: true }); }; -}; -exports.InfoLicense = InfoLicense; - - -/***/ }), - -/***/ 10977: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; + var __copyProps2 = (to2, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to2, key) && key !== except) + __defProp2(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to2; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var dist_src_exports = {}; + __export2(dist_src_exports, { + RequestError: () => RequestError + }); + module3.exports = __toCommonJS(dist_src_exports); + var import_deprecation = require_dist_node3(); + var import_once = __toESM2(require_once()); + var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); + var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); + var RequestError = class extends Error { + constructor(message, statusCode, options2) { + super(message); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "HttpError"; + this.status = statusCode; + let headers; + if ("headers" in options2 && typeof options2.headers !== "undefined") { + headers = options2.headers; + } + if ("response" in options2) { + this.response = options2.response; + headers = options2.response.headers; + } + const requestCopy = Object.assign({}, options2.request); + if (options2.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options2.request.headers, { + authorization: options2.request.headers.authorization.replace( + /(? { - return { - Paths(pathMap, { report, location }) { - const seenPaths = []; - for (const currentPath of Object.keys(pathMap)) { - const ambiguousPath = seenPaths.find((seenPath) => arePathsAmbiguous(seenPath, currentPath)); - if (ambiguousPath) { - report({ - message: `Paths should resolve unambiguously. Found two ambiguous paths: \`${ambiguousPath}\` and \`${currentPath}\`.`, - location: location.child([currentPath]).key(), - }); - } - seenPaths.push(currentPath); - } - }, +// node_modules/@octokit/request/dist-node/index.js +var require_dist_node5 = __commonJS({ + "node_modules/@octokit/request/dist-node/index.js"(exports, module3) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __export2 = (target, all2) => { + for (var name in all2) + __defProp2(target, name, { get: all2[name], enumerable: true }); }; -}; -exports.NoAmbiguousPaths = NoAmbiguousPaths; -function arePathsAmbiguous(a, b) { - const partsA = a.split('/'); - const partsB = b.split('/'); - if (partsA.length !== partsB.length) + var __copyProps2 = (to2, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to2, key) && key !== except) + __defProp2(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to2; + }; + var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var dist_src_exports = {}; + __export2(dist_src_exports, { + request: () => request + }); + module3.exports = __toCommonJS(dist_src_exports); + var import_endpoint = require_dist_node2(); + var import_universal_user_agent = require_dist_node(); + var VERSION = "8.4.1"; + function isPlainObject2(value) { + if (typeof value !== "object" || value === null) return false; - let aVars = 0; - let bVars = 0; - let ambiguous = true; - for (let i = 0; i < partsA.length; i++) { - const aIsVar = partsA[i].match(/^{.+?}$/); - const bIsVar = partsB[i].match(/^{.+?}$/); - if (aIsVar || bIsVar) { - if (aIsVar) - aVars++; - if (bIsVar) - bVars++; - continue; + 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); + } + var import_request_error = require_dist_node4(); + function getBufferResponse(response) { + return response.arrayBuffer(); + } + function fetchWrapper(requestOptions) { + var _a, _b, _c, _d; + const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; + if (isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body)) { + requestOptions.body = JSON.stringify(requestOptions.body); + } + let headers = {}; + let status; + let url3; + let { fetch: fetch2 } = globalThis; + if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { + fetch2 = requestOptions.request.fetch; + } + if (!fetch2) { + 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" + ); + } + return fetch2(requestOptions.url, { + method: requestOptions.method, + body: requestOptions.body, + redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect, + headers: requestOptions.headers, + signal: (_d = requestOptions.request) == null ? void 0 : _d.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" } + }).then(async (response) => { + url3 = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.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 ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` + ); + } + if (status === 204 || status === 205) { + return; + } + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new import_request_error.RequestError(response.statusText, status, { + response: { + url: url3, + status, + headers, + data: void 0 + }, + request: requestOptions + }); + } + if (status === 304) { + throw new import_request_error.RequestError("Not modified", status, { + response: { + url: url3, + status, + headers, + data: await getResponseData(response) + }, + request: requestOptions + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { + response: { + url: url3, + status, + headers, + data + }, + request: requestOptions + }); + throw error2; } - else if (partsA[i] !== partsB[i]) { - ambiguous = false; + return parseSuccessResponseBody ? await getResponseData(response) : response.body; + }).then((data) => { + return { + status, + url: url3, + headers, + data + }; + }).catch((error2) => { + if (error2 instanceof import_request_error.RequestError) + throw error2; + else if (error2.name === "AbortError") + throw error2; + let message = error2.message; + if (error2.name === "TypeError" && "cause" in error2) { + if (error2.cause instanceof Error) { + message = error2.cause.message; + } else if (typeof error2.cause === "string") { + message = error2.cause; + } } + throw new import_request_error.RequestError(message, 500, { + request: requestOptions + }); + }); } - return ambiguous && aVars === bVars; -} - - -/***/ }), - -/***/ 25173: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoEnumTypeMismatch = void 0; -const utils_1 = __nccwpck_require__(33944); -const NoEnumTypeMismatch = () => { - return { - Schema(schema, { report, location }) { - if (schema.enum && !Array.isArray(schema.enum)) - return; - if (schema.enum && schema.type && !Array.isArray(schema.type)) { - const typeMismatchedValues = schema.enum.filter((item) => !(0, utils_1.matchesJsonSchemaType)(item, schema.type, schema.nullable)); - for (const mismatchedValue of typeMismatchedValues) { - report({ - message: `All values of \`enum\` field must be of the same type as the \`type\` field: expected "${schema.type}" but received "${(0, utils_1.oasTypeOf)(mismatchedValue)}".`, - location: location.child(['enum', schema.enum.indexOf(mismatchedValue)]), - }); - } - } - if (schema.enum && schema.type && Array.isArray(schema.type)) { - const mismatchedResults = {}; - for (const enumValue of schema.enum) { - mismatchedResults[enumValue] = []; - for (const type of schema.type) { - const valid = (0, utils_1.matchesJsonSchemaType)(enumValue, type, schema.nullable); - if (!valid) - mismatchedResults[enumValue].push(type); - } - if (mismatchedResults[enumValue].length !== schema.type.length) - delete mismatchedResults[enumValue]; - } - for (const mismatchedKey of Object.keys(mismatchedResults)) { - report({ - message: `Enum value \`${mismatchedKey}\` must be of allowed types: \`${schema.type}\`.`, - location: location.child(['enum', schema.enum.indexOf(mismatchedKey)]), - }); - } - } - }, - }; -}; -exports.NoEnumTypeMismatch = NoEnumTypeMismatch; - - -/***/ }), - -/***/ 47232: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + if (/application\/json/.test(contentType)) { + return response.json().catch(() => response.text()).catch(() => ""); + } + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + return getBufferResponse(response); + } + function toErrorMessage(data) { + if (typeof data === "string") + return data; + let suffix; + if ("documentation_url" in data) { + suffix = ` - ${data.documentation_url}`; + } else { + suffix = ""; + } + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`; + } + return `${data.message}${suffix}`; + } + return `Unknown error: ${JSON.stringify(data)}`; + } + function 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: withDefaults.bind(null, endpoint2) + }); + return endpointOptions.request.hook(request2, endpointOptions); + }; + return Object.assign(newApi, { + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) + }); + } + var request = withDefaults(import_endpoint.endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` + } + }); + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoHttpVerbsInPaths = void 0; -const utils_1 = __nccwpck_require__(75450); -const httpMethods = ['get', 'head', 'post', 'put', 'patch', 'delete', 'options', 'trace']; -const NoHttpVerbsInPaths = ({ splitIntoWords }) => { - return { - PathItem(_path, { key, report, location }) { - const pathKey = key.toString(); - if (!pathKey.startsWith('/')) - return; - const pathSegments = pathKey.split('/'); - for (const pathSegment of pathSegments) { - if (!pathSegment || (0, utils_1.isPathParameter)(pathSegment)) - continue; - const isHttpMethodIncluded = (method) => { - return splitIntoWords - ? (0, utils_1.splitCamelCaseIntoWords)(pathSegment).has(method) - : pathSegment.toLocaleLowerCase().includes(method); - }; - for (const method of httpMethods) { - if (isHttpMethodIncluded(method)) { - report({ - message: `path \`${pathKey}\` should not contain http verb ${method}`, - location: location.key(), - }); - } - } - } - }, +// node_modules/@octokit/graphql/dist-node/index.js +var require_dist_node6 = __commonJS({ + "node_modules/@octokit/graphql/dist-node/index.js"(exports, module3) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __export2 = (target, all2) => { + for (var name in all2) + __defProp2(target, name, { get: all2[name], enumerable: true }); }; -}; -exports.NoHttpVerbsInPaths = NoHttpVerbsInPaths; - - -/***/ }), - -/***/ 75361: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoIdenticalPaths = void 0; -const NoIdenticalPaths = () => { - return { - Paths(pathMap, { report, location }) { - const Paths = new Map(); - for (const pathName of Object.keys(pathMap)) { - const id = pathName.replace(/{.+?}/g, '{VARIABLE}'); - const existingSamePath = Paths.get(id); - if (existingSamePath) { - report({ - message: `The path already exists which differs only by path parameter name(s): \`${existingSamePath}\` and \`${pathName}\`.`, - location: location.child([pathName]).key(), - }); - } - else { - Paths.set(id, pathName); - } - } - }, + var __copyProps2 = (to2, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to2, key) && key !== except) + __defProp2(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to2; }; -}; -exports.NoIdenticalPaths = NoIdenticalPaths; - - -/***/ }), - -/***/ 1844: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoInvalidParameterExamples = void 0; -const utils_1 = __nccwpck_require__(33944); -const NoInvalidParameterExamples = (opts) => { - const allowAdditionalProperties = (0, utils_1.getAdditionalPropertiesOption)(opts) ?? false; - return { - Parameter: { - leave(parameter, ctx) { - if (parameter.example !== undefined) { - (0, utils_1.validateExample)(parameter.example, parameter.schema, ctx.location.child('example'), ctx, allowAdditionalProperties); - } - if (parameter.examples) { - for (const [key, example] of Object.entries(parameter.examples)) { - if ('value' in example) { - (0, utils_1.validateExample)(example.value, parameter.schema, ctx.location.child(['examples', key]), ctx, true); - } - } - } - }, - }, + var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + GraphqlResponseError: () => GraphqlResponseError, + graphql: () => graphql2, + withCustomRequest: () => withCustomRequest + }); + module3.exports = __toCommonJS(index_exports); + var import_request3 = require_dist_node5(); + var import_universal_user_agent = require_dist_node(); + var VERSION = "7.1.1"; + var import_request2 = require_dist_node5(); + var import_request = require_dist_node5(); + function _buildMessageForResponseErrors(data) { + return `Request failed due to following response errors: +` + data.errors.map((e2) => ` - ${e2.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.name = "GraphqlResponseError"; + this.errors = response.errors; + this.data = response.data; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } }; -}; -exports.NoInvalidParameterExamples = NoInvalidParameterExamples; - - -/***/ }), - -/***/ 66705: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoInvalidSchemaExamples = void 0; -const utils_1 = __nccwpck_require__(33944); -const NoInvalidSchemaExamples = (opts) => { - const allowAdditionalProperties = (0, utils_1.getAdditionalPropertiesOption)(opts) ?? false; - return { - Schema: { - leave(schema, ctx) { - const examples = schema.examples; - if (examples) { - for (const example of examples) { - (0, utils_1.validateExample)(example, schema, ctx.location.child(['examples', examples.indexOf(example)]), ctx, allowAdditionalProperties); - } - } - if (schema.example !== undefined) { - // Handle nullable example for OAS3 - if (schema.nullable === true && - schema.example === null && - schema.type !== undefined) { - return; - } - (0, utils_1.validateExample)(schema.example, schema, ctx.location.child('example'), ctx, true); - } - }, - }, - }; -}; -exports.NoInvalidSchemaExamples = NoInvalidSchemaExamples; - - -/***/ }), - -/***/ 31596: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoPathTrailingSlash = void 0; -const NoPathTrailingSlash = () => { - return { - PathItem(_path, { report, key, rawLocation }) { - if (key.endsWith('/') && key !== '/') { - report({ - message: `\`${key}\` should not have a trailing slash.`, - location: rawLocation.key(), - }); - } - }, - }; -}; -exports.NoPathTrailingSlash = NoPathTrailingSlash; - - -/***/ }), - -/***/ 36003: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoRequiredSchemaPropertiesUndefined = void 0; -const ref_utils_1 = __nccwpck_require__(97977); -const NoRequiredSchemaPropertiesUndefined = () => { - return { - Schema: { - enter(schema, { location, report, resolve }) { - if (!schema.required) - return; - const visitedSchemas = new Set(); - const elevateProperties = (schema) => { - // Check if the schema has been visited before processing it - if (visitedSchemas.has(schema)) { - return {}; - } - visitedSchemas.add(schema); - if ((0, ref_utils_1.isRef)(schema)) { - return elevateProperties(resolve(schema).node); - } - return Object.assign({}, schema.properties, ...(schema.allOf?.map(elevateProperties) ?? []), ...(schema.anyOf?.map(elevateProperties) ?? [])); - }; - const allProperties = elevateProperties(schema); - for (const [i, requiredProperty] of schema.required.entries()) { - if (!allProperties || allProperties[requiredProperty] === undefined) { - report({ - message: `Required property '${requiredProperty}' is undefined.`, - location: location.child(['required', i]), - }); - } - } - }, - }, - }; -}; -exports.NoRequiredSchemaPropertiesUndefined = NoRequiredSchemaPropertiesUndefined; - - -/***/ }), - -/***/ 88409: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoSchemaTypeMismatch = void 0; -const NoSchemaTypeMismatch = () => { - return { - Schema(schema, { report, location }) { - if (schema.type === 'object' && schema.items) { - report({ - message: "Schema type mismatch: 'object' type should not contain 'items' field.", - location: location.child('items'), - }); - } - if (schema.type === 'array' && schema.properties) { - report({ - message: "Schema type mismatch: 'array' type should not contain 'properties' field.", - location: location.child('properties'), - }); - } - }, - }; -}; -exports.NoSchemaTypeMismatch = NoSchemaTypeMismatch; - - -/***/ }), - -/***/ 83654: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + var NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query", + "mediaType" + ]; + var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; + var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; + function graphql(request2, query, options2) { + if (options2) { + if (typeof query === "string" && "query" in options2) { + return Promise.reject( + new Error(`[@octokit/graphql] "query" cannot be used as variable name`) + ); + } + for (const key in options2) { + 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 }, options2) : 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, options2) => { + return graphql(newRequest, query, options2); + }; + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: newRequest.endpoint + }); + } + var graphql2 = withDefaults(import_request3.request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` + }, + method: "POST", + url: "/graphql" + }); + function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql" + }); + } + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Operation2xxResponse = void 0; -const utils_1 = __nccwpck_require__(33944); -const Operation2xxResponse = ({ validateWebhooks }) => { - return { - Paths: { - Responses(responses, { report }) { - const codes = Object.keys(responses || {}); - (0, utils_1.validateResponseCodes)(codes, '2XX', { report }); - }, - }, - WebhooksMap: { - Responses(responses, { report }) { - if (!validateWebhooks) - return; - const codes = Object.keys(responses || {}); - (0, utils_1.validateResponseCodes)(codes, '2XX', { report }); - }, - }, +// node_modules/@octokit/auth-token/dist-node/index.js +var require_dist_node7 = __commonJS({ + "node_modules/@octokit/auth-token/dist-node/index.js"(exports, module3) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __export2 = (target, all2) => { + for (var name in all2) + __defProp2(target, name, { get: all2[name], enumerable: true }); }; -}; -exports.Operation2xxResponse = Operation2xxResponse; - - -/***/ }), - -/***/ 58529: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Operation4xxResponse = void 0; -const utils_1 = __nccwpck_require__(33944); -const Operation4xxResponse = ({ validateWebhooks }) => { - return { - Paths: { - Responses(responses, { report }) { - const codes = Object.keys(responses || {}); - (0, utils_1.validateResponseCodes)(codes, '4XX', { report }); - }, - }, - WebhooksMap: { - Responses(responses, { report }) { - if (!validateWebhooks) - return; - const codes = Object.keys(responses || {}); - (0, utils_1.validateResponseCodes)(codes, '4XX', { report }); - }, - }, + var __copyProps2 = (to2, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to2, key) && key !== except) + __defProp2(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to2; }; -}; -exports.Operation4xxResponse = Operation4xxResponse; - - -/***/ }), - -/***/ 56982: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OperationDescription = void 0; -const utils_1 = __nccwpck_require__(33944); -const OperationDescription = () => { - return { - Operation(operation, ctx) { - (0, utils_1.validateDefinedAndNonEmpty)('description', operation, ctx); - }, + var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var dist_src_exports = {}; + __export2(dist_src_exports, { + createTokenAuth: () => createTokenAuth + }); + module3.exports = __toCommonJS(dist_src_exports); + var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; + var REGEX_IS_INSTALLATION = /^ghs_/; + var REGEX_IS_USER_TO_SERVER = /^ghu_/; + async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; + return { + type: "token", + token, + tokenType + }; + } + 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) + }); }; -}; -exports.OperationDescription = OperationDescription; - - -/***/ }), - -/***/ 79758: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OperationIdUnique = void 0; -const OperationIdUnique = () => { - const seenOperations = new Set(); - return { - Operation(operation, { report, location }) { - if (!operation.operationId) - return; - if (seenOperations.has(operation.operationId)) { - report({ - message: 'Every operation must have a unique `operationId`.', - location: location.child([operation.operationId]), - }); - } - seenOperations.add(operation.operationId); - }, +// node_modules/@octokit/core/dist-node/index.js +var require_dist_node8 = __commonJS({ + "node_modules/@octokit/core/dist-node/index.js"(exports, module3) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __export2 = (target, all2) => { + for (var name in all2) + __defProp2(target, name, { get: all2[name], enumerable: true }); }; -}; -exports.OperationIdUnique = OperationIdUnique; - - -/***/ }), - -/***/ 73976: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OperationIdUrlSafe = void 0; -// eslint-disable-next-line no-useless-escape -const validUrlSymbols = /^[A-Za-z0-9-._~:/?#\[\]@!\$&'()*+,;=]*$/; -const OperationIdUrlSafe = () => { - return { - Operation(operation, { report, location }) { - if (operation.operationId && !validUrlSymbols.test(operation.operationId)) { - report({ - message: 'Operation `operationId` should not have URL invalid characters.', - location: location.child(['operationId']), - }); - } - }, + var __copyProps2 = (to2, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to2, key) && key !== except) + __defProp2(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to2; }; -}; -exports.OperationIdUrlSafe = OperationIdUrlSafe; - - -/***/ }), - -/***/ 27623: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OperationOperationId = void 0; -const utils_1 = __nccwpck_require__(33944); -const OperationOperationId = () => { - return { - Root: { - PathItem: { - Operation(operation, ctx) { - (0, utils_1.validateDefinedAndNonEmpty)('operationId', operation, ctx); - }, - }, - }, + var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var index_exports = {}; + __export2(index_exports, { + Octokit: () => Octokit + }); + module3.exports = __toCommonJS(index_exports); + var import_universal_user_agent = require_dist_node(); + var import_before_after_hook = require_before_after_hook(); + var import_request = require_dist_node5(); + var import_graphql = require_dist_node6(); + var import_auth_token = require_dist_node7(); + var VERSION = "5.2.2"; + var noop = () => { }; -}; -exports.OperationOperationId = OperationOperationId; - - -/***/ }), - -/***/ 3037: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OperationParametersUnique = void 0; -const OperationParametersUnique = () => { - let seenPathParams; - let seenOperationParams; - return { - PathItem: { - enter() { - seenPathParams = new Set(); - }, - Parameter(parameter, { report, key, parentLocations }) { - const paramId = `${parameter.in}___${parameter.name}`; - if (seenPathParams.has(paramId)) { - report({ - message: `Paths must have unique \`name\` + \`in\` parameters.\nRepeats of \`in:${parameter.in}\` + \`name:${parameter.name}\`.`, - location: parentLocations.PathItem.child(['parameters', key]), - }); - } - seenPathParams.add(`${parameter.in}___${parameter.name}`); - }, - Operation: { - enter() { - seenOperationParams = new Set(); - }, - Parameter(parameter, { report, key, parentLocations }) { - const paramId = `${parameter.in}___${parameter.name}`; - if (seenOperationParams.has(paramId)) { - report({ - message: `Operations must have unique \`name\` + \`in\` parameters. Repeats of \`in:${parameter.in}\` + \`name:${parameter.name}\`.`, - location: parentLocations.Operation.child(['parameters', key]), - }); - } - seenOperationParams.add(paramId); - }, - }, - }, + var consoleWarn = console.warn.bind(console); + var consoleError = console.error.bind(console); + function createLogger(logger2 = {}) { + if (typeof logger2.debug !== "function") { + logger2.debug = noop; + } + if (typeof logger2.info !== "function") { + logger2.info = noop; + } + if (typeof logger2.warn !== "function") { + logger2.warn = consoleWarn; + } + if (typeof logger2.error !== "function") { + logger2.error = consoleError; + } + return logger2; + } + var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; + var Octokit = class { + static { + this.VERSION = VERSION; + } + static defaults(defaults) { + const OctokitWithDefaults = class extends this { + constructor(...args) { + const options2 = args[0] || {}; + if (typeof defaults === "function") { + super(defaults(options2)); + return; + } + super( + Object.assign( + {}, + defaults, + options2, + options2.userAgent && defaults.userAgent ? { + userAgent: `${options2.userAgent} ${defaults.userAgent}` + } : null + ) + ); + } + }; + return OctokitWithDefaults; + } + static { + this.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 { + this.plugins = currentPlugins.concat( + newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) + ); + } + }; + return NewOctokit; + } + constructor(options2 = {}) { + const hook = new import_before_after_hook.Collection(); + const requestDefaults = { + baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options2.request, { + // @ts-ignore internal usage only, no need to type + hook: hook.bind(null, "request") + }), + mediaType: { + previews: [], + format: "" + } + }; + requestDefaults.headers["user-agent"] = options2.userAgent ? `${options2.userAgent} ${userAgentTrail}` : userAgentTrail; + if (options2.baseUrl) { + requestDefaults.baseUrl = options2.baseUrl; + } + if (options2.previews) { + requestDefaults.mediaType.previews = options2.previews; + } + if (options2.timeZone) { + requestDefaults.headers["time-zone"] = options2.timeZone; + } + this.request = import_request.request.defaults(requestDefaults); + this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); + this.log = createLogger(options2.log); + this.hook = hook; + if (!options2.authStrategy) { + if (!options2.auth) { + this.auth = async () => ({ + type: "unauthenticated" + }); + } else { + const auth = (0, import_auth_token.createTokenAuth)(options2.auth); + hook.wrap("request", auth.hook); + this.auth = auth; + } + } else { + const { authStrategy, ...otherOptions } = options2; + 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 + }, + options2.auth + ) + ); + hook.wrap("request", auth.hook); + this.auth = auth; + } + const classConstructor = this.constructor; + for (let i2 = 0; i2 < classConstructor.plugins.length; ++i2) { + Object.assign(this, classConstructor.plugins[i2](this, options2)); + } + } }; -}; -exports.OperationParametersUnique = OperationParametersUnique; - - -/***/ }), - -/***/ 53087: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OperationSingularTag = void 0; -const OperationSingularTag = () => { - return { - Operation(operation, { report, location }) { - if (operation.tags && operation.tags.length > 1) { - report({ - message: 'Operation `tags` object should have only one tag.', - location: location.child(['tags']).key(), - }); - } - }, +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js +var require_dist_node9 = __commonJS({ + "node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js"(exports, module3) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __export2 = (target, all2) => { + for (var name in all2) + __defProp2(target, name, { get: all2[name], enumerable: true }); }; -}; -exports.OperationSingularTag = OperationSingularTag; - - -/***/ }), - -/***/ 12183: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OperationSummary = void 0; -const utils_1 = __nccwpck_require__(33944); -const OperationSummary = () => { - return { - Operation(operation, ctx) { - (0, utils_1.validateDefinedAndNonEmpty)('summary', operation, ctx); - }, + var __copyProps2 = (to2, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to2, key) && key !== except) + __defProp2(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to2; }; -}; -exports.OperationSummary = OperationSummary; - - -/***/ }), - -/***/ 42154: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OperationTagDefined = void 0; -const OperationTagDefined = () => { - let definedTags; - return { - Root(root) { - definedTags = new Set((root.tags ?? []).map((t) => t.name)); - }, - Operation(operation, { report, location }) { - if (operation?.tags) { - for (let i = 0; i < operation.tags.length; i++) { - if (!definedTags.has(operation.tags[i])) { - report({ - message: `Operation tags should be defined in global tags.`, - location: location.child(['tags', i]), - }); - } - } - } - else { - report({ - message: `Operation tags should be defined`, - location: location.key(), - }); - } - }, - }; -}; -exports.OperationTagDefined = OperationTagDefined; - - -/***/ }), - -/***/ 50467: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ParameterDescription = void 0; -const ParameterDescription = () => { - return { - Parameter(parameter, { report, location }) { - if (parameter.description === undefined) { - report({ - message: 'Parameter object description must be present.', - location: { reportOnKey: true }, - }); - } - else if (!parameter.description) { - report({ - message: 'Parameter object description must be non-empty string.', - location: location.child(['description']), - }); - } - }, - }; -}; -exports.ParameterDescription = ParameterDescription; - - -/***/ }), - -/***/ 98498: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PathDeclarationMustExist = void 0; -const PathDeclarationMustExist = () => { - return { - PathItem(_path, { report, key }) { - if (key.indexOf('{}') !== -1) { - report({ - message: 'Path parameter declarations must be non-empty. `{}` is invalid.', - location: { reportOnKey: true }, - }); - } - }, - }; -}; -exports.PathDeclarationMustExist = PathDeclarationMustExist; - - -/***/ }), - -/***/ 1729: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PathExcludesPatterns = void 0; -const PathExcludesPatterns = ({ patterns }) => { - return { - PathItem(_path, { report, key, location }) { - if (!patterns) - throw new Error(`Parameter "patterns" is not provided for "path-excludes-patterns" rule`); - const pathKey = key.toString(); - if (pathKey.startsWith('/')) { - const matches = patterns.filter((pattern) => pathKey.match(pattern)); - for (const match of matches) { - report({ - message: `path \`${pathKey}\` should not match regex pattern: \`${match}\``, - location: location.key(), - }); - } - } - }, - }; -}; -exports.PathExcludesPatterns = PathExcludesPatterns; - - -/***/ }), - -/***/ 72160: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PathHttpVerbsOrder = void 0; -const defaultOrder = ['get', 'head', 'post', 'put', 'patch', 'delete', 'options', 'trace']; -const PathHttpVerbsOrder = (opts) => { - const order = (opts && opts.order) || defaultOrder; - if (!Array.isArray(order)) { - throw new Error('path-http-verbs-order `order` option must be an array'); - } - return { - PathItem(path, { report, location }) { - const httpVerbs = Object.keys(path).filter((k) => order.includes(k)); - for (let i = 0; i < httpVerbs.length - 1; i++) { - const aIdx = order.indexOf(httpVerbs[i]); - const bIdx = order.indexOf(httpVerbs[i + 1]); - if (bIdx < aIdx) { - report({ - message: 'Operation http verbs must be ordered.', - location: { reportOnKey: true, ...location.child(httpVerbs[i + 1]) }, - }); - } - } - }, - }; -}; -exports.PathHttpVerbsOrder = PathHttpVerbsOrder; - - -/***/ }), - -/***/ 57443: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PathNotIncludeQuery = void 0; -const PathNotIncludeQuery = () => { - return { - Paths: { - PathItem(_operation, { report, key }) { - if (key.toString().includes('?')) { - report({ - message: `Don't put query string items in the path, they belong in parameters with \`in: query\`.`, - location: { reportOnKey: true }, - }); - } - }, - }, - }; -}; -exports.PathNotIncludeQuery = PathNotIncludeQuery; - - -/***/ }), - -/***/ 62559: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PathParamsDefined = void 0; -const pathRegex = /\{([a-zA-Z0-9_.-]+)\}+/g; -const PathParamsDefined = () => { - let pathTemplateParams; - let definedPathParams; - let currentPath; - let definedOperationParams; - return { - PathItem: { - enter(_, { key }) { - definedPathParams = new Set(); - currentPath = key; - pathTemplateParams = new Set(Array.from(key.toString().matchAll(pathRegex)).map((m) => m[1])); - }, - Parameter(parameter, { report, location }) { - if (parameter.in === 'path' && parameter.name) { - definedPathParams.add(parameter.name); - if (!pathTemplateParams.has(parameter.name)) { - report({ - message: `Path parameter \`${parameter.name}\` is not used in the path \`${currentPath}\`.`, - location: location.child(['name']), - }); - } - } - }, - Operation: { - enter() { - definedOperationParams = new Set(); - }, - leave(_op, { report, location }) { - for (const templateParam of Array.from(pathTemplateParams.keys())) { - if (!definedOperationParams.has(templateParam) && - !definedPathParams.has(templateParam)) { - report({ - message: `The operation does not define the path parameter \`{${templateParam}}\` expected by path \`${currentPath}\`.`, - location: location.child(['parameters']).key(), // report on operation - }); - } - } - }, - Parameter(parameter, { report, location }) { - if (parameter.in === 'path' && parameter.name) { - definedOperationParams.add(parameter.name); - if (!pathTemplateParams.has(parameter.name)) { - report({ - message: `Path parameter \`${parameter.name}\` is not used in the path \`${currentPath}\`.`, - location: location.child(['name']), - }); - } - } - }, - }, - }, - }; -}; -exports.PathParamsDefined = PathParamsDefined; - - -/***/ }), - -/***/ 59226: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PathSegmentPlural = void 0; -const pluralize = __nccwpck_require__(22522); -const utils_1 = __nccwpck_require__(75450); -const PathSegmentPlural = (opts) => { - const { ignoreLastPathSegment, exceptions } = opts; - return { - PathItem: { - leave(_path, { report, key, location }) { - const pathKey = key.toString(); - if (pathKey.startsWith('/')) { - const pathSegments = pathKey.split('/'); - pathSegments.shift(); - if (ignoreLastPathSegment && pathSegments.length > 1) { - pathSegments.pop(); - } - for (const pathSegment of pathSegments) { - if (exceptions && exceptions.includes(pathSegment)) - continue; - if (!(0, utils_1.isPathParameter)(pathSegment) && pluralize.isSingular(pathSegment)) { - report({ - message: `path segment \`${pathSegment}\` should be plural.`, - location: location.key(), - }); - } - } - } - }, - }, - }; -}; -exports.PathSegmentPlural = PathSegmentPlural; - - -/***/ }), - -/***/ 94512: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PathsKebabCase = void 0; -const PathsKebabCase = () => { - return { - PathItem(_path, { report, key }) { - const segments = key - .substr(1) - .split('/') - .filter((s) => s !== ''); // filter out empty segments - if (!segments.every((segment) => /^{.+}$/.test(segment) || /^[a-z0-9-.]+$/.test(segment))) { - report({ - message: `\`${key}\` does not use kebab-case.`, - location: { reportOnKey: true }, - }); - } - }, - }; -}; -exports.PathsKebabCase = PathsKebabCase; - - -/***/ }), - -/***/ 54127: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RequiredStringPropertyMissingMinLength = void 0; -const RequiredStringPropertyMissingMinLength = () => { - let skipSchemaProperties; - let requiredPropertiesSet; - return { - Schema: { - enter(schema) { - if (!schema?.required) { - skipSchemaProperties = true; - return; - } - requiredPropertiesSet = new Set(schema.required); - skipSchemaProperties = false; - }, - SchemaProperties: { - skip() { - return skipSchemaProperties; - }, - Schema: { - enter(schema, { key, location, report }) { - if (requiredPropertiesSet.has(key) && schema.type === 'string') { - if (!schema?.minLength) { - report({ - message: 'Property minLength is required.', - location: location.key(), - }); - } - } - }, - }, - }, - }, - }; -}; -exports.RequiredStringPropertyMissingMinLength = RequiredStringPropertyMissingMinLength; - - -/***/ }), - -/***/ 61754: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ResponseContainsHeader = void 0; -const utils_1 = __nccwpck_require__(75450); -const ResponseContainsHeader = (options) => { - const names = options.names || {}; - return { - Operation: { - Response: { - enter: (response, { report, location, key }) => { - const expectedHeaders = names[key] || - names[(0, utils_1.getMatchingStatusCodeRange)(key)] || - names[(0, utils_1.getMatchingStatusCodeRange)(key).toLowerCase()] || - []; - for (const expectedHeader of expectedHeaders) { - if (!response?.headers || - !Object.keys(response?.headers).some((header) => header.toLowerCase() === expectedHeader.toLowerCase())) { - report({ - message: `Response object must contain a "${expectedHeader}" header.`, - location: location.child('headers').key(), - }); - } - } - }, - }, - }, - }; -}; -exports.ResponseContainsHeader = ResponseContainsHeader; - - -/***/ }), - -/***/ 56057: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ScalarPropertyMissingExample = void 0; -const oas_types_1 = __nccwpck_require__(46707); -const SCALAR_TYPES = ['string', 'integer', 'number', 'boolean', 'null']; -const ScalarPropertyMissingExample = () => { - return { - SchemaProperties(properties, { report, location, oasVersion, resolve }) { - for (const propName of Object.keys(properties)) { - const propSchema = resolve(properties[propName]).node; - if (!propSchema || !isScalarSchema(propSchema)) { - continue; - } - if (propSchema.example === undefined && - propSchema.examples === undefined) { - report({ - message: `Scalar property should have "example"${oasVersion === oas_types_1.SpecVersion.OAS3_1 ? ' or "examples"' : ''} defined.`, - location: location.child(propName).key(), - }); - } - } - }, - }; -}; -exports.ScalarPropertyMissingExample = ScalarPropertyMissingExample; -function isScalarSchema(schema) { - if (!schema.type) { - return false; - } - if (schema.allOf || schema.anyOf || schema.oneOf) { - // Skip allOf/oneOf/anyOf as it's complicated to validate it right now. - // We need core support for checking contrstrains through those keywords. - return false; - } - if (schema.format === 'binary') { - return false; - } - if (Array.isArray(schema.type)) { - return schema.type.every((t) => SCALAR_TYPES.includes(t)); - } - return SCALAR_TYPES.includes(schema.type); -} - - -/***/ }), - -/***/ 68559: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SecurityDefined = void 0; -const SecurityDefined = (opts) => { - const referencedSchemes = new Map(); - const operationsWithoutSecurity = []; - let eachOperationHasSecurity = true; - let path; - return { - Root: { - leave(root, { report }) { - for (const [name, scheme] of referencedSchemes.entries()) { - if (scheme.defined) - continue; - for (const reportedFromLocation of scheme.from) { - report({ - message: `There is no \`${name}\` security scheme defined.`, - location: reportedFromLocation.key(), - }); - } - } - if (root.security || eachOperationHasSecurity) { - return; - } - else { - for (const operationLocation of operationsWithoutSecurity) { - report({ - message: `Every operation should have security defined on it or on the root level.`, - location: operationLocation.key(), - }); - } - } - }, - }, - SecurityScheme(_securityScheme, { key }) { - referencedSchemes.set(key.toString(), { defined: true, from: [] }); - }, - SecurityRequirement(requirements, { location }) { - for (const requirement of Object.keys(requirements)) { - const authScheme = referencedSchemes.get(requirement); - const requirementLocation = location.child([requirement]); - if (!authScheme) { - referencedSchemes.set(requirement, { from: [requirementLocation] }); - } - else { - authScheme.from.push(requirementLocation); - } - } - }, - PathItem: { - enter(pathItem, { key }) { - path = key; - }, - Operation(operation, { location, key }) { - const isException = opts.exceptions?.some((item) => item.path === path && - (!item.methods || item.methods?.some((method) => method.toLowerCase() === key))); - if (!operation?.security && !isException) { - eachOperationHasSecurity = false; - operationsWithoutSecurity.push(location); - } - }, - }, - }; -}; -exports.SecurityDefined = SecurityDefined; - - -/***/ }), - -/***/ 28717: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SpecStrictRefs = void 0; -const ref_utils_1 = __nccwpck_require__(97977); -const SpecStrictRefs = () => { - const nodesToSkip = [ - 'Schema', - 'Response', - 'Parameter', - 'RequestBody', - 'Example', - 'Header', - 'SecurityScheme', - 'Link', - 'Callback', - 'PathItem', - ]; - return { - any(_node, { report, rawNode, rawLocation, type }) { - const shouldCheck = !nodesToSkip.includes(type.name); - if (shouldCheck && (0, ref_utils_1.isRef)(rawNode)) { - report({ - message: 'Field $ref is not expected here.', - location: rawLocation.child('$ref').key(), - }); - } - }, - }; -}; -exports.SpecStrictRefs = SpecStrictRefs; - - -/***/ }), - -/***/ 16612: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Struct = void 0; -const types_1 = __nccwpck_require__(14143); -const utils_1 = __nccwpck_require__(33944); -const ref_utils_1 = __nccwpck_require__(97977); -const utils_2 = __nccwpck_require__(75450); -const Struct = () => { - return { - any(node, { report, type, location, rawLocation, key, resolve, ignoreNextVisitorsOnNode }) { - const nodeType = (0, utils_1.oasTypeOf)(node); - const refLocation = rawLocation !== location ? rawLocation : undefined; - if (type.items) { - if (nodeType !== 'array') { - report({ - message: `Expected type \`${type.name}\` (array) but got \`${nodeType}\``, - from: refLocation, - }); - ignoreNextVisitorsOnNode(); - } - return; - } - else if (nodeType !== 'object') { - if (type !== types_1.SpecExtension) { - // do not validate unknown extensions structure - report({ - message: `Expected type \`${type.name}\` (object) but got \`${nodeType}\``, - from: refLocation, - }); - } - ignoreNextVisitorsOnNode(); - return; - } - const required = typeof type.required === 'function' ? type.required(node, key) : type.required; - for (const propName of required || []) { - if (!node.hasOwnProperty(propName)) { - report({ - message: `The field \`${propName}\` must be present on this level.`, - from: refLocation, - location: [{ reportOnKey: true }], - }); - } - } - const allowed = type.allowed?.(node); - if (allowed && (0, utils_2.isPlainObject)(node)) { - for (const propName in node) { - if (allowed.includes(propName) || - (type.extensionsPrefix && propName.startsWith(type.extensionsPrefix)) || - !Object.keys(type.properties).includes(propName)) { - continue; - } - report({ - message: `The field \`${propName}\` is not allowed here.`, - from: refLocation, - location: location.child([propName]).key(), - }); - } - } - const requiredOneOf = type.requiredOneOf || null; - if (requiredOneOf) { - let hasProperty = false; - for (const propName of requiredOneOf || []) { - if (node.hasOwnProperty(propName)) { - hasProperty = true; - } - } - if (!hasProperty) - report({ - message: `Must contain at least one of the following fields: ${type.requiredOneOf?.join(', ')}.`, - from: refLocation, - location: [{ reportOnKey: true }], - }); - } - for (const propName of Object.keys(node)) { - const propLocation = location.child([propName]); - let propValue = node[propName]; - let propType = type.properties[propName]; - if (propType === undefined) - propType = type.additionalProperties; - if (typeof propType === 'function') - propType = propType(propValue, propName); - if ((0, types_1.isNamedType)(propType)) { - continue; // do nothing for named schema, it is executed with the next any call - } - const propSchema = propType; - const propValueType = (0, utils_1.oasTypeOf)(propValue); - if (propSchema === undefined) { - if (propName.startsWith('x-')) - continue; - report({ - message: `Property \`${propName}\` is not expected here.`, - suggest: (0, utils_1.getSuggest)(propName, Object.keys(type.properties)), - from: refLocation, - location: propLocation.key(), - }); - continue; - } - if (propSchema === null) { - continue; // just defined, no validation - } - if (propSchema.resolvable !== false && (0, ref_utils_1.isRef)(propValue)) { - propValue = resolve(propValue).node; - } - if (propSchema.items && propSchema.items?.enum && Array.isArray(propValue)) { - for (let i = 0; i < propValue.length; i++) { - (0, utils_1.validateSchemaEnumType)(propSchema.items?.enum, propValue[i], propName, refLocation, { - report, - location: location.child([propName, i]), - }); - } - } - if (propSchema.enum) { - (0, utils_1.validateSchemaEnumType)(propSchema.enum, propValue, propName, refLocation, { - report, - location: location.child([propName]), - }); - } - else if (propSchema.type && !(0, utils_1.matchesJsonSchemaType)(propValue, propSchema.type, false)) { - report({ - message: `Expected type \`${propSchema.type}\` but got \`${propValueType}\`.`, - from: refLocation, - location: propLocation, - }); - ignoreNextVisitorsOnNode(); - } - else if (propValueType === 'array' && propSchema.items?.type) { - const itemsType = propSchema.items?.type; - for (let i = 0; i < propValue.length; i++) { - const item = propValue[i]; - if (!(0, utils_1.matchesJsonSchemaType)(item, itemsType, false)) { - report({ - message: `Expected type \`${itemsType}\` but got \`${(0, utils_1.oasTypeOf)(item)}\`.`, - from: refLocation, - location: propLocation.child([i]), - }); - } - } - } - if (typeof propSchema.minimum === 'number') { - if (propSchema.minimum > node[propName]) { - report({ - message: `The value of the ${propName} field must be greater than or equal to ${propSchema.minimum}`, - from: refLocation, - location: location.child([propName]), - }); - } - } - if (propName === 'nullable' && !node.type) { - report({ - message: 'The `type` field must be defined when the `nullable` field is used.', - location: location.child([propName]), - }); - } - } - }, - }; -}; -exports.Struct = Struct; - - -/***/ }), - -/***/ 58002: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TagDescription = void 0; -const utils_1 = __nccwpck_require__(33944); -const TagDescription = () => { - return { - Tag(tag, ctx) { - (0, utils_1.validateDefinedAndNonEmpty)('description', tag, ctx); - }, - }; -}; -exports.TagDescription = TagDescription; - - -/***/ }), - -/***/ 11384: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TagsAlphabetical = void 0; -const TagsAlphabetical = ({ ignoreCase = false }) => { - return { - Root(root, { report, location }) { - if (!root.tags) - return; - for (let i = 0; i < root.tags.length - 1; i++) { - if (getTagName(root.tags[i], ignoreCase) > getTagName(root.tags[i + 1], ignoreCase)) { - report({ - message: 'The `tags` array should be in alphabetical order.', - location: location.child(['tags', i]), - }); - } - } - }, - }; -}; -exports.TagsAlphabetical = TagsAlphabetical; -function getTagName(tag, ignoreCase) { - return ignoreCase ? tag.name.toLowerCase() : tag.name; -} - - -/***/ }), - -/***/ 34440: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoUnresolvedRefs = void 0; -exports.reportUnresolvedRef = reportUnresolvedRef; -const resolve_1 = __nccwpck_require__(27098); -const NoUnresolvedRefs = () => { - return { - ref: { - leave(_, { report, location }, resolved) { - if (resolved.node !== undefined) - return; - reportUnresolvedRef(resolved, report, location); - }, - }, - DiscriminatorMapping(mapping, { report, resolve, location }) { - for (const mappingName of Object.keys(mapping)) { - const resolved = resolve({ $ref: mapping[mappingName] }); - if (resolved.node !== undefined) - return; - reportUnresolvedRef(resolved, report, location.child(mappingName)); - } - }, - }; -}; -exports.NoUnresolvedRefs = NoUnresolvedRefs; -function reportUnresolvedRef(resolved, report, location) { - const error = resolved.error; - if (error instanceof resolve_1.YamlParseError) { - report({ - message: 'Failed to parse: ' + error.message, - location: { - source: error.source, - pointer: undefined, - start: { - col: error.col, - line: error.line, - }, - }, - }); - } - const message = resolved.error?.message; - report({ - location, - message: `Can't resolve $ref${message ? ': ' + message : ''}`, - }); -} - - -/***/ }), - -/***/ 79242: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BooleanParameterPrefixes = void 0; -const BooleanParameterPrefixes = (options) => { - const prefixes = options.prefixes || ['is', 'has']; - const regexp = new RegExp(`^(${prefixes.join('|')})[A-Z-_]`); - const wrappedPrefixes = prefixes.map((p) => `\`${p}\``); - const prefixesString = wrappedPrefixes.length === 1 - ? wrappedPrefixes[0] - : wrappedPrefixes.slice(0, -1).join(', ') + ' or ' + wrappedPrefixes[prefixes.length - 1]; - return { - Parameter(param, { report, location }) { - if (param.type === 'boolean' && !regexp.test(param.name)) { - report({ - message: `Boolean parameter \`${param.name}\` should have ${prefixesString} prefix.`, - location: location.child('name'), - }); - } - }, - }; -}; -exports.BooleanParameterPrefixes = BooleanParameterPrefixes; - - -/***/ }), - -/***/ 48934: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.preprocessors = exports.rules = void 0; -const struct_1 = __nccwpck_require__(16612); -const no_invalid_schema_examples_1 = __nccwpck_require__(66705); -const no_invalid_parameter_examples_1 = __nccwpck_require__(1844); -const info_contact_1 = __nccwpck_require__(4377); -const info_license_1 = __nccwpck_require__(72816); -const info_license_url_1 = __nccwpck_require__(37478); -const info_license_strict_1 = __nccwpck_require__(55290); -const boolean_parameter_prefixes_1 = __nccwpck_require__(79242); -const tag_description_1 = __nccwpck_require__(58002); -const tags_alphabetical_1 = __nccwpck_require__(11384); -const paths_kebab_case_1 = __nccwpck_require__(94512); -const no_enum_type_mismatch_1 = __nccwpck_require__(25173); -const no_path_trailing_slash_1 = __nccwpck_require__(31596); -const operation_2xx_response_1 = __nccwpck_require__(83654); -const operation_4xx_response_1 = __nccwpck_require__(58529); -const assertions_1 = __nccwpck_require__(11612); -const operation_operationId_unique_1 = __nccwpck_require__(79758); -const operation_parameters_unique_1 = __nccwpck_require__(3037); -const path_params_defined_1 = __nccwpck_require__(62559); -const operation_tag_defined_1 = __nccwpck_require__(42154); -const path_declaration_must_exist_1 = __nccwpck_require__(98498); -const operation_operationId_url_safe_1 = __nccwpck_require__(73976); -const operation_description_1 = __nccwpck_require__(56982); -const path_not_include_query_1 = __nccwpck_require__(57443); -const parameter_description_1 = __nccwpck_require__(50467); -const operation_singular_tag_1 = __nccwpck_require__(53087); -const security_defined_1 = __nccwpck_require__(68559); -const no_unresolved_refs_1 = __nccwpck_require__(34440); -const path_http_verbs_order_1 = __nccwpck_require__(72160); -const no_identical_paths_1 = __nccwpck_require__(75361); -const operation_operationId_1 = __nccwpck_require__(27623); -const operation_summary_1 = __nccwpck_require__(12183); -const no_ambiguous_paths_1 = __nccwpck_require__(10977); -const no_http_verbs_in_paths_1 = __nccwpck_require__(47232); -const path_excludes_patterns_1 = __nccwpck_require__(1729); -const request_mime_type_1 = __nccwpck_require__(7354); -const response_mime_type_1 = __nccwpck_require__(1241); -const path_segment_plural_1 = __nccwpck_require__(59226); -const response_contains_header_1 = __nccwpck_require__(61754); -const response_contains_property_1 = __nccwpck_require__(66150); -const scalar_property_missing_example_1 = __nccwpck_require__(56057); -const required_string_property_missing_min_length_1 = __nccwpck_require__(54127); -const spec_strict_refs_1 = __nccwpck_require__(28717); -const no_required_schema_properties_undefined_1 = __nccwpck_require__(36003); -const no_schema_type_mismatch_1 = __nccwpck_require__(88409); -exports.rules = { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - //@ts-ignore TODO: This is depricated property `spec` and should be removed in the future - spec: struct_1.Struct, - struct: struct_1.Struct, - 'no-invalid-schema-examples': no_invalid_schema_examples_1.NoInvalidSchemaExamples, - 'no-invalid-parameter-examples': no_invalid_parameter_examples_1.NoInvalidParameterExamples, - 'info-contact': info_contact_1.InfoContact, - 'info-license': info_license_1.InfoLicense, - 'info-license-url': info_license_url_1.InfoLicenseUrl, - 'info-license-strict': info_license_strict_1.InfoLicenseStrict, - 'tag-description': tag_description_1.TagDescription, - 'tags-alphabetical': tags_alphabetical_1.TagsAlphabetical, - 'paths-kebab-case': paths_kebab_case_1.PathsKebabCase, - 'no-enum-type-mismatch': no_enum_type_mismatch_1.NoEnumTypeMismatch, - 'boolean-parameter-prefixes': boolean_parameter_prefixes_1.BooleanParameterPrefixes, - 'no-path-trailing-slash': no_path_trailing_slash_1.NoPathTrailingSlash, - 'operation-2xx-response': operation_2xx_response_1.Operation2xxResponse, - 'operation-4xx-response': operation_4xx_response_1.Operation4xxResponse, - assertions: assertions_1.Assertions, - 'operation-operationId-unique': operation_operationId_unique_1.OperationIdUnique, - 'operation-parameters-unique': operation_parameters_unique_1.OperationParametersUnique, - 'path-parameters-defined': path_params_defined_1.PathParamsDefined, - 'operation-tag-defined': operation_tag_defined_1.OperationTagDefined, - 'path-declaration-must-exist': path_declaration_must_exist_1.PathDeclarationMustExist, - 'operation-operationId-url-safe': operation_operationId_url_safe_1.OperationIdUrlSafe, - 'operation-operationId': operation_operationId_1.OperationOperationId, - 'operation-summary': operation_summary_1.OperationSummary, - 'operation-description': operation_description_1.OperationDescription, - 'path-not-include-query': path_not_include_query_1.PathNotIncludeQuery, - 'path-params-defined': path_params_defined_1.PathParamsDefined, - 'parameter-description': parameter_description_1.ParameterDescription, - 'operation-singular-tag': operation_singular_tag_1.OperationSingularTag, - 'security-defined': security_defined_1.SecurityDefined, - 'no-unresolved-refs': no_unresolved_refs_1.NoUnresolvedRefs, - 'no-identical-paths': no_identical_paths_1.NoIdenticalPaths, - 'no-ambiguous-paths': no_ambiguous_paths_1.NoAmbiguousPaths, - 'path-http-verbs-order': path_http_verbs_order_1.PathHttpVerbsOrder, - 'no-http-verbs-in-paths': no_http_verbs_in_paths_1.NoHttpVerbsInPaths, - 'path-excludes-patterns': path_excludes_patterns_1.PathExcludesPatterns, - 'request-mime-type': request_mime_type_1.RequestMimeType, - 'response-mime-type': response_mime_type_1.ResponseMimeType, - 'path-segment-plural': path_segment_plural_1.PathSegmentPlural, - 'response-contains-header': response_contains_header_1.ResponseContainsHeader, - 'response-contains-property': response_contains_property_1.ResponseContainsProperty, - 'scalar-property-missing-example': scalar_property_missing_example_1.ScalarPropertyMissingExample, - 'required-string-property-missing-min-length': required_string_property_missing_min_length_1.RequiredStringPropertyMissingMinLength, - 'spec-strict-refs': spec_strict_refs_1.SpecStrictRefs, - 'no-required-schema-properties-undefined': no_required_schema_properties_undefined_1.NoRequiredSchemaPropertiesUndefined, - 'no-schema-type-mismatch': no_schema_type_mismatch_1.NoSchemaTypeMismatch, -}; -exports.preprocessors = {}; - - -/***/ }), - -/***/ 7354: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RequestMimeType = void 0; -const utils_1 = __nccwpck_require__(75450); -const RequestMimeType = ({ allowedValues }) => { - return { - Root(root, ctx) { - (0, utils_1.validateMimeType)({ type: 'consumes', value: root }, ctx, allowedValues); - }, - Operation: { - leave(operation, ctx) { - (0, utils_1.validateMimeType)({ type: 'consumes', value: operation }, ctx, allowedValues); - }, - }, - }; -}; -exports.RequestMimeType = RequestMimeType; - - -/***/ }), - -/***/ 66150: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ResponseContainsProperty = void 0; -const utils_1 = __nccwpck_require__(75450); -const ResponseContainsProperty = (options) => { - const names = options.names || {}; - let key; - return { - Operation: { - Response: { - skip: (_response, key) => { - return `${key}` === '204'; - }, - enter: (_response, ctx) => { - key = ctx.key; - }, - Schema(schema, { report, location }) { - if (schema.type !== 'object') - return; - const expectedProperties = names[key] || - names[(0, utils_1.getMatchingStatusCodeRange)(key)] || - names[(0, utils_1.getMatchingStatusCodeRange)(key).toLowerCase()] || - []; - for (const expectedProperty of expectedProperties) { - if (!schema.properties?.[expectedProperty]) { - report({ - message: `Response object must contain a top-level "${expectedProperty}" property.`, - location: location.child('properties').key(), - }); - } - } - }, - }, - }, - }; -}; -exports.ResponseContainsProperty = ResponseContainsProperty; - - -/***/ }), - -/***/ 1241: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ResponseMimeType = void 0; -const utils_1 = __nccwpck_require__(75450); -const ResponseMimeType = ({ allowedValues }) => { - return { - Root(root, ctx) { - (0, utils_1.validateMimeType)({ type: 'produces', value: root }, ctx, allowedValues); - }, - Operation: { - leave(operation, ctx) { - (0, utils_1.validateMimeType)({ type: 'produces', value: operation }, ctx, allowedValues); - }, - }, - }; -}; -exports.ResponseMimeType = ResponseMimeType; - - -/***/ }), - -/***/ 40479: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ArrayParameterSerialization = void 0; -const ref_utils_1 = __nccwpck_require__(97977); -const ArrayParameterSerialization = (options) => { - return { - Parameter: { - leave(node, ctx) { - if (!node.schema) { - return; - } - const schema = ((0, ref_utils_1.isRef)(node.schema) ? ctx.resolve(node.schema).node : node.schema); - if (schema && - shouldReportMissingStyleAndExplode(node, schema, options)) { - ctx.report({ - message: `Parameter \`${node.name}\` should have \`style\` and \`explode \` fields`, - location: ctx.location, - }); - } - }, - }, - }; -}; -exports.ArrayParameterSerialization = ArrayParameterSerialization; -function shouldReportMissingStyleAndExplode(node, schema, options) { - return ((schema.type === 'array' || schema.items || schema.prefixItems) && - (node.style === undefined || node.explode === undefined) && - (!options.in || (node.in && options.in?.includes(node.in)))); -} - - -/***/ }), - -/***/ 17367: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BooleanParameterPrefixes = void 0; -const BooleanParameterPrefixes = (options) => { - const prefixes = options.prefixes || ['is', 'has']; - const regexp = new RegExp(`^(${prefixes.join('|')})[A-Z-_]`); - const wrappedPrefixes = prefixes.map((p) => `\`${p}\``); - const prefixesString = wrappedPrefixes.length === 1 - ? wrappedPrefixes[0] - : wrappedPrefixes.slice(0, -1).join(', ') + ' or ' + wrappedPrefixes[prefixes.length - 1]; - return { - Parameter: { - Schema(schema, { report, parentLocations }, parents) { - if (schema.type === 'boolean' && !regexp.test(parents.Parameter.name)) { - report({ - message: `Boolean parameter \`${parents.Parameter.name}\` should have ${prefixesString} prefix.`, - location: parentLocations.Parameter.child(['name']), - }); - } - }, - }, - }; -}; -exports.BooleanParameterPrefixes = BooleanParameterPrefixes; - - -/***/ }), - -/***/ 82542: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ComponentNameUnique = void 0; -const TYPE_NAME_SCHEMA = 'Schema'; -const TYPE_NAME_PARAMETER = 'Parameter'; -const TYPE_NAME_RESPONSE = 'Response'; -const TYPE_NAME_REQUEST_BODY = 'RequestBody'; -const TYPE_NAME_TO_OPTION_COMPONENT_NAME = { - [TYPE_NAME_SCHEMA]: 'schemas', - [TYPE_NAME_PARAMETER]: 'parameters', - [TYPE_NAME_RESPONSE]: 'responses', - [TYPE_NAME_REQUEST_BODY]: 'requestBodies', -}; -const ComponentNameUnique = (options) => { - const components = new Map(); - const typeNames = []; - if (options.schemas !== 'off') { - typeNames.push(TYPE_NAME_SCHEMA); - } - if (options.parameters !== 'off') { - typeNames.push(TYPE_NAME_PARAMETER); - } - if (options.responses !== 'off') { - typeNames.push(TYPE_NAME_RESPONSE); - } - if (options.requestBodies !== 'off') { - typeNames.push(TYPE_NAME_REQUEST_BODY); - } - const rule = { - ref: { - leave(ref, { type, resolve }) { - const typeName = type.name; - if (typeNames.includes(typeName)) { - const resolvedRef = resolve(ref); - if (!resolvedRef.location) - return; - addComponentFromAbsoluteLocation(typeName, resolvedRef.location); - } - }, - }, - Root: { - leave(root, ctx) { - components.forEach((value, key, _) => { - if (value.absolutePointers.size > 1) { - const component = getComponentFromKey(key); - const optionComponentName = getOptionComponentNameForTypeName(component.typeName); - const componentSeverity = optionComponentName ? options[optionComponentName] : null; - for (const location of value.locations) { - const definitions = Array.from(value.absolutePointers) - .filter((v) => v !== location.absolutePointer.toString()) - .map((v) => `- ${v}`) - .join('\n'); - const problem = { - message: `Component '${optionComponentName}/${component.componentName}' is not unique. It is also defined at:\n${definitions}`, - location: location, - }; - if (componentSeverity) { - problem.forceSeverity = componentSeverity; - } - ctx.report(problem); - } - } - }); - }, - }, - }; - if (options.schemas != 'off') { - rule.NamedSchemas = { - Schema(_, { location }) { - addComponentFromAbsoluteLocation(TYPE_NAME_SCHEMA, location); - }, - }; - } - if (options.responses != 'off') { - rule.NamedResponses = { - Response(_, { location }) { - addComponentFromAbsoluteLocation(TYPE_NAME_RESPONSE, location); - }, - }; - } - if (options.parameters != 'off') { - rule.NamedParameters = { - Parameter(_, { location }) { - addComponentFromAbsoluteLocation(TYPE_NAME_PARAMETER, location); - }, - }; - } - if (options.requestBodies != 'off') { - rule.NamedRequestBodies = { - RequestBody(_, { location }) { - addComponentFromAbsoluteLocation(TYPE_NAME_REQUEST_BODY, location); - }, - }; - } - return rule; - function getComponentNameFromAbsoluteLocation(absoluteLocation) { - const componentName = absoluteLocation.split('/').slice(-1)[0]; - if (componentName.endsWith('.yml') || - componentName.endsWith('.yaml') || - componentName.endsWith('.json')) { - return componentName.slice(0, componentName.lastIndexOf('.')); - } - return componentName; - } - function addFoundComponent(typeName, componentName, location) { - const key = getKeyForComponent(typeName, componentName); - const entry = components.get(key) ?? { - absolutePointers: new Set(), - locations: [], - }; - const absoluteLocation = location.absolutePointer.toString(); - if (!entry.absolutePointers.has(absoluteLocation)) { - entry.absolutePointers.add(absoluteLocation); - entry.locations.push(location); - } - components.set(key, entry); - } - function addComponentFromAbsoluteLocation(typeName, location) { - const componentName = getComponentNameFromAbsoluteLocation(location.absolutePointer.toString()); - addFoundComponent(typeName, componentName, location); - } -}; -exports.ComponentNameUnique = ComponentNameUnique; -function getOptionComponentNameForTypeName(typeName) { - return TYPE_NAME_TO_OPTION_COMPONENT_NAME[typeName] ?? null; -} -function getKeyForComponent(typeName, componentName) { - return `${typeName}/${componentName}`; -} -function getComponentFromKey(key) { - const [typeName, componentName] = key.split('/'); - return { typeName, componentName }; -} - - -/***/ }), - -/***/ 34605: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.preprocessors = exports.rules = void 0; -const struct_1 = __nccwpck_require__(16612); -const operation_2xx_response_1 = __nccwpck_require__(83654); -const operation_4xx_response_1 = __nccwpck_require__(58529); -const assertions_1 = __nccwpck_require__(11612); -const operation_operationId_unique_1 = __nccwpck_require__(79758); -const operation_parameters_unique_1 = __nccwpck_require__(3037); -const path_params_defined_1 = __nccwpck_require__(62559); -const operation_tag_defined_1 = __nccwpck_require__(42154); -const no_example_value_and_externalValue_1 = __nccwpck_require__(46070); -const no_enum_type_mismatch_1 = __nccwpck_require__(25173); -const no_path_trailing_slash_1 = __nccwpck_require__(31596); -const path_declaration_must_exist_1 = __nccwpck_require__(98498); -const operation_operationId_url_safe_1 = __nccwpck_require__(73976); -const tags_alphabetical_1 = __nccwpck_require__(11384); -const no_server_example_com_1 = __nccwpck_require__(80459); -const no_server_trailing_slash_1 = __nccwpck_require__(48616); -const tag_description_1 = __nccwpck_require__(58002); -const info_contact_1 = __nccwpck_require__(4377); -const info_license_1 = __nccwpck_require__(72816); -const info_license_url_1 = __nccwpck_require__(37478); -const info_license_strict_1 = __nccwpck_require__(55290); -const operation_description_1 = __nccwpck_require__(56982); -const no_unused_components_1 = __nccwpck_require__(1548); -const path_not_include_query_1 = __nccwpck_require__(57443); -const parameter_description_1 = __nccwpck_require__(50467); -const operation_singular_tag_1 = __nccwpck_require__(53087); -const security_defined_1 = __nccwpck_require__(68559); -const no_unresolved_refs_1 = __nccwpck_require__(34440); -const boolean_parameter_prefixes_1 = __nccwpck_require__(17367); -const paths_kebab_case_1 = __nccwpck_require__(94512); -const path_http_verbs_order_1 = __nccwpck_require__(72160); -const no_empty_servers_1 = __nccwpck_require__(87001); -const no_invalid_media_type_examples_1 = __nccwpck_require__(74744); -const no_identical_paths_1 = __nccwpck_require__(75361); -const no_undefined_server_variable_1 = __nccwpck_require__(36154); -const operation_operationId_1 = __nccwpck_require__(27623); -const operation_summary_1 = __nccwpck_require__(12183); -const no_ambiguous_paths_1 = __nccwpck_require__(10977); -const no_server_variables_empty_enum_1 = __nccwpck_require__(5585); -const no_http_verbs_in_paths_1 = __nccwpck_require__(47232); -const request_mime_type_1 = __nccwpck_require__(22846); -const response_mime_type_1 = __nccwpck_require__(17386); -const path_segment_plural_1 = __nccwpck_require__(59226); -const path_excludes_patterns_1 = __nccwpck_require__(1729); -const no_invalid_schema_examples_1 = __nccwpck_require__(66705); -const no_invalid_parameter_examples_1 = __nccwpck_require__(1844); -const response_contains_header_1 = __nccwpck_require__(61754); -const response_contains_property_1 = __nccwpck_require__(53185); -const scalar_property_missing_example_1 = __nccwpck_require__(56057); -const spec_components_invalid_map_name_1 = __nccwpck_require__(71679); -const operation_4xx_problem_details_rfc7807_1 = __nccwpck_require__(58315); -const required_string_property_missing_min_length_1 = __nccwpck_require__(54127); -const spec_strict_refs_1 = __nccwpck_require__(28717); -const component_name_unique_1 = __nccwpck_require__(82542); -const array_parameter_serialization_1 = __nccwpck_require__(40479); -const no_required_schema_properties_undefined_1 = __nccwpck_require__(36003); -const no_schema_type_mismatch_1 = __nccwpck_require__(88409); -exports.rules = { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - //@ts-ignore TODO: This is depricated property `spec` and should be removed in the future - spec: struct_1.Struct, - struct: struct_1.Struct, - 'info-contact': info_contact_1.InfoContact, - 'info-license': info_license_1.InfoLicense, - 'info-license-url': info_license_url_1.InfoLicenseUrl, - 'info-license-strict': info_license_strict_1.InfoLicenseStrict, - 'operation-2xx-response': operation_2xx_response_1.Operation2xxResponse, - 'operation-4xx-response': operation_4xx_response_1.Operation4xxResponse, - 'operation-4xx-problem-details-rfc7807': operation_4xx_problem_details_rfc7807_1.Operation4xxProblemDetailsRfc7807, - assertions: assertions_1.Assertions, - 'operation-operationId-unique': operation_operationId_unique_1.OperationIdUnique, - 'operation-parameters-unique': operation_parameters_unique_1.OperationParametersUnique, - 'operation-tag-defined': operation_tag_defined_1.OperationTagDefined, - 'no-example-value-and-externalValue': no_example_value_and_externalValue_1.NoExampleValueAndExternalValue, - 'no-enum-type-mismatch': no_enum_type_mismatch_1.NoEnumTypeMismatch, - 'no-path-trailing-slash': no_path_trailing_slash_1.NoPathTrailingSlash, - 'no-empty-servers': no_empty_servers_1.NoEmptyServers, - 'path-declaration-must-exist': path_declaration_must_exist_1.PathDeclarationMustExist, - 'operation-operationId-url-safe': operation_operationId_url_safe_1.OperationIdUrlSafe, - 'operation-operationId': operation_operationId_1.OperationOperationId, - 'operation-summary': operation_summary_1.OperationSummary, - 'tags-alphabetical': tags_alphabetical_1.TagsAlphabetical, - 'no-server-example.com': no_server_example_com_1.NoServerExample, - 'no-server-trailing-slash': no_server_trailing_slash_1.NoServerTrailingSlash, - 'tag-description': tag_description_1.TagDescription, - 'operation-description': operation_description_1.OperationDescription, - 'no-unused-components': no_unused_components_1.NoUnusedComponents, - 'path-not-include-query': path_not_include_query_1.PathNotIncludeQuery, - 'path-parameters-defined': path_params_defined_1.PathParamsDefined, - 'path-params-defined': path_params_defined_1.PathParamsDefined, - 'parameter-description': parameter_description_1.ParameterDescription, - 'operation-singular-tag': operation_singular_tag_1.OperationSingularTag, - 'security-defined': security_defined_1.SecurityDefined, - 'no-unresolved-refs': no_unresolved_refs_1.NoUnresolvedRefs, - 'paths-kebab-case': paths_kebab_case_1.PathsKebabCase, - 'boolean-parameter-prefixes': boolean_parameter_prefixes_1.BooleanParameterPrefixes, - 'path-http-verbs-order': path_http_verbs_order_1.PathHttpVerbsOrder, - 'no-invalid-media-type-examples': no_invalid_media_type_examples_1.ValidContentExamples, - 'no-identical-paths': no_identical_paths_1.NoIdenticalPaths, - 'no-ambiguous-paths': no_ambiguous_paths_1.NoAmbiguousPaths, - 'no-undefined-server-variable': no_undefined_server_variable_1.NoUndefinedServerVariable, - 'no-server-variables-empty-enum': no_server_variables_empty_enum_1.NoServerVariablesEmptyEnum, - 'no-http-verbs-in-paths': no_http_verbs_in_paths_1.NoHttpVerbsInPaths, - 'path-excludes-patterns': path_excludes_patterns_1.PathExcludesPatterns, - 'request-mime-type': request_mime_type_1.RequestMimeType, - 'response-mime-type': response_mime_type_1.ResponseMimeType, - 'path-segment-plural': path_segment_plural_1.PathSegmentPlural, - 'no-invalid-schema-examples': no_invalid_schema_examples_1.NoInvalidSchemaExamples, - 'no-invalid-parameter-examples': no_invalid_parameter_examples_1.NoInvalidParameterExamples, - 'response-contains-header': response_contains_header_1.ResponseContainsHeader, - 'response-contains-property': response_contains_property_1.ResponseContainsProperty, - 'scalar-property-missing-example': scalar_property_missing_example_1.ScalarPropertyMissingExample, - 'spec-components-invalid-map-name': spec_components_invalid_map_name_1.SpecComponentsInvalidMapName, - 'required-string-property-missing-min-length': required_string_property_missing_min_length_1.RequiredStringPropertyMissingMinLength, - 'spec-strict-refs': spec_strict_refs_1.SpecStrictRefs, - 'component-name-unique': component_name_unique_1.ComponentNameUnique, - 'array-parameter-serialization': array_parameter_serialization_1.ArrayParameterSerialization, - 'no-required-schema-properties-undefined': no_required_schema_properties_undefined_1.NoRequiredSchemaPropertiesUndefined, - 'no-schema-type-mismatch': no_schema_type_mismatch_1.NoSchemaTypeMismatch, -}; -exports.preprocessors = {}; - - -/***/ }), - -/***/ 87001: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoEmptyServers = void 0; -const NoEmptyServers = () => { - return { - Root(root, { report, location }) { - if (!root.hasOwnProperty('servers')) { - report({ - message: 'Servers must be present.', - location: location.child(['openapi']).key(), - }); - return; - } - if (!Array.isArray(root.servers) || root.servers.length === 0) { - report({ - message: 'Servers must be a non-empty array.', - location: location.child(['servers']).key(), - }); - } - }, - }; -}; -exports.NoEmptyServers = NoEmptyServers; - - -/***/ }), - -/***/ 46070: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoExampleValueAndExternalValue = void 0; -const NoExampleValueAndExternalValue = () => { - return { - Example(example, { report, location }) { - if (example.value && example.externalValue) { - report({ - message: 'Example object can have either `value` or `externalValue` fields.', - location: location.child(['value']).key(), - }); - } - }, - }; -}; -exports.NoExampleValueAndExternalValue = NoExampleValueAndExternalValue; - - -/***/ }), - -/***/ 74744: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ValidContentExamples = void 0; -const ref_utils_1 = __nccwpck_require__(97977); -const utils_1 = __nccwpck_require__(33944); -const ValidContentExamples = (opts) => { - const allowAdditionalProperties = (0, utils_1.getAdditionalPropertiesOption)(opts) ?? false; - return { - MediaType: { - leave(mediaType, ctx) { - const { location, resolve } = ctx; - if (!mediaType.schema) - return; - if (mediaType.example !== undefined) { - resolveAndValidateExample(mediaType.example, location.child('example')); - } - else if (mediaType.examples) { - for (const exampleName of Object.keys(mediaType.examples)) { - resolveAndValidateExample(mediaType.examples[exampleName], location.child(['examples', exampleName, 'value']), true); - } - } - function resolveAndValidateExample(example, location, isMultiple) { - if ((0, ref_utils_1.isRef)(example)) { - const resolved = resolve(example); - if (!resolved.location) - return; - location = isMultiple ? resolved.location.child('value') : resolved.location; - example = resolved.node; - } - if (isMultiple && typeof example?.value === 'undefined') { - return; - } - (0, utils_1.validateExample)(isMultiple ? example.value : example, mediaType.schema, location, ctx, allowAdditionalProperties); - } - }, - }, - }; -}; -exports.ValidContentExamples = ValidContentExamples; - - -/***/ }), - -/***/ 80459: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoServerExample = void 0; -const NoServerExample = () => { - return { - Server(server, { report, location }) { - // eslint-disable-next-line no-useless-escape - const pattern = /^(.*[\/.])?(example\.com|localhost)([\/:?].*|$)/; - if (server.url && pattern.test(server.url)) { - report({ - message: 'Server `url` should not point to example.com or localhost.', - location: location.child(['url']), - }); - } - }, - }; -}; -exports.NoServerExample = NoServerExample; - - -/***/ }), - -/***/ 48616: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoServerTrailingSlash = void 0; -const NoServerTrailingSlash = () => { - return { - Server(server, { report, location }) { - if (!server.url) - return; - if (server.url.endsWith('/') && server.url !== '/') { - report({ - message: 'Server `url` should not have a trailing slash.', - location: location.child(['url']), - }); - } - }, - }; -}; -exports.NoServerTrailingSlash = NoServerTrailingSlash; - - -/***/ }), - -/***/ 5585: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoServerVariablesEmptyEnum = void 0; -var enumError; -(function (enumError) { - enumError["empty"] = "empty"; - enumError["invalidDefaultValue"] = "invalidDefaultValue"; -})(enumError || (enumError = {})); -const NoServerVariablesEmptyEnum = () => { - return { - Root(root, { report, location }) { - if (!root.servers || root.servers.length === 0) - return; - const invalidVariables = []; - if (Array.isArray(root.servers)) { - for (const server of root.servers) { - const enumErrors = checkEnumVariables(server); - if (!enumErrors) - continue; - invalidVariables.push(...enumErrors); - } - } - else { - const enumErrors = checkEnumVariables(root.servers); - if (!enumErrors) - return; - invalidVariables.push(...enumErrors); - } - for (const invalidVariable of invalidVariables) { - if (invalidVariable === enumError.empty) { - report({ - message: 'Server variable with `enum` must be a non-empty array.', - location: location.child(['servers']).key(), - }); - } - if (invalidVariable === enumError.invalidDefaultValue) { - report({ - message: 'Server variable define `enum` and `default`. `enum` must include default value', - location: location.child(['servers']).key(), - }); - } - } - }, - }; -}; -exports.NoServerVariablesEmptyEnum = NoServerVariablesEmptyEnum; -function checkEnumVariables(server) { - if (server.variables && Object.keys(server.variables).length === 0) - return; - const errors = []; - for (const variable in server.variables) { - const serverVariable = server.variables[variable]; - if (!serverVariable.enum) - continue; - if (Array.isArray(serverVariable.enum) && serverVariable.enum?.length === 0) - errors.push(enumError.empty); - if (!serverVariable.default) - continue; - const defaultValue = server.variables[variable].default; - if (serverVariable.enum && !serverVariable.enum.includes(defaultValue)) - errors.push(enumError.invalidDefaultValue); - } - if (errors.length) - return errors; - return; -} - - -/***/ }), - -/***/ 36154: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoUndefinedServerVariable = void 0; -const NoUndefinedServerVariable = () => { - return { - Server(server, { report, location }) { - if (!server.url) - return; - const urlVariables = server.url.match(/{[^}]+}/g)?.map((e) => e.slice(1, e.length - 1)) || []; - const definedVariables = (server?.variables && Object.keys(server.variables)) || []; - for (const serverVar of urlVariables) { - if (!definedVariables.includes(serverVar)) { - report({ - message: `The \`${serverVar}\` variable is not defined in the \`variables\` objects.`, - location: location.child(['url']), - }); - } - } - for (const definedServerVar of definedVariables) { - if (!urlVariables.includes(definedServerVar)) { - report({ - message: `The \`${definedServerVar}\` variable is not used in the server's \`url\` field.`, - location: location.child(['variables', definedServerVar]).key(), - from: location.child('url'), - }); - } - } - }, - }; -}; -exports.NoUndefinedServerVariable = NoUndefinedServerVariable; - - -/***/ }), - -/***/ 1548: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoUnusedComponents = void 0; -const NoUnusedComponents = () => { - const components = new Map(); - function registerComponent(location, name) { - components.set(location.absolutePointer, { - used: components.get(location.absolutePointer)?.used || false, - location, - name, - }); - } - return { - ref(ref, { type, resolve, key, location }) { - if (['Schema', 'Header', 'Parameter', 'Response', 'Example', 'RequestBody'].includes(type.name)) { - const resolvedRef = resolve(ref); - if (!resolvedRef.location) - return; - components.set(resolvedRef.location.absolutePointer, { - used: true, - name: key.toString(), - location, - }); - } - }, - Root: { - leave(_, { report }) { - components.forEach((usageInfo) => { - if (!usageInfo.used) { - report({ - message: `Component: "${usageInfo.name}" is never used.`, - location: usageInfo.location.key(), - }); - } - }); - }, - }, - NamedSchemas: { - Schema(schema, { location, key }) { - if (!schema.allOf) { - // FIXME: find a better way to detect possible discriminator - registerComponent(location, key.toString()); - } - }, - }, - NamedParameters: { - Parameter(_parameter, { location, key }) { - registerComponent(location, key.toString()); - }, - }, - NamedResponses: { - Response(_response, { location, key }) { - registerComponent(location, key.toString()); - }, - }, - NamedExamples: { - Example(_example, { location, key }) { - registerComponent(location, key.toString()); - }, - }, - NamedRequestBodies: { - RequestBody(_requestBody, { location, key }) { - registerComponent(location, key.toString()); - }, - }, - NamedHeaders: { - Header(_header, { location, key }) { - registerComponent(location, key.toString()); - }, - }, - }; -}; -exports.NoUnusedComponents = NoUnusedComponents; - - -/***/ }), - -/***/ 58315: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Operation4xxProblemDetailsRfc7807 = void 0; -const utils_1 = __nccwpck_require__(33944); -/** - * Validation according to rfc7807 - https://datatracker.ietf.org/doc/html/rfc7807 - */ -const Operation4xxProblemDetailsRfc7807 = () => { - return { - Response: { - skip(_, key) { - return !/4[Xx0-9]{2}/.test(`${key}`); - }, - enter(response, { report, location }) { - if (!response.content || !response.content['application/problem+json']) - report({ - message: 'Response `4xx` must have content-type `application/problem+json`.', - location: location.key(), - }); - }, - MediaType: { - skip(_, key) { - return key !== 'application/problem+json'; - }, - enter(media, ctx) { - (0, utils_1.validateDefinedAndNonEmpty)('schema', media, ctx); - }, - SchemaProperties(schema, ctx) { - (0, utils_1.validateDefinedAndNonEmpty)('type', schema, ctx); - (0, utils_1.validateDefinedAndNonEmpty)('title', schema, ctx); - }, - }, - }, - }; -}; -exports.Operation4xxProblemDetailsRfc7807 = Operation4xxProblemDetailsRfc7807; - - -/***/ }), - -/***/ 22846: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RequestMimeType = void 0; -const utils_1 = __nccwpck_require__(75450); -const RequestMimeType = ({ allowedValues }) => { - return { - Paths: { - RequestBody: { - leave(requestBody, ctx) { - (0, utils_1.validateMimeTypeOAS3)({ type: 'consumes', value: requestBody }, ctx, allowedValues); - }, - }, - Callback: { - RequestBody() { }, - Response: { - leave(response, ctx) { - (0, utils_1.validateMimeTypeOAS3)({ type: 'consumes', value: response }, ctx, allowedValues); - }, - }, - }, - }, - WebhooksMap: { - Response: { - leave(response, ctx) { - (0, utils_1.validateMimeTypeOAS3)({ type: 'consumes', value: response }, ctx, allowedValues); - }, - }, - }, - }; -}; -exports.RequestMimeType = RequestMimeType; - - -/***/ }), - -/***/ 53185: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ResponseContainsProperty = void 0; -const utils_1 = __nccwpck_require__(75450); -const ResponseContainsProperty = (options) => { - const names = options.names || {}; - let key; - return { - Operation: { - Response: { - skip: (_response, key) => { - return `${key}` === '204'; - }, - enter: (_response, ctx) => { - key = ctx.key; - }, - MediaType: { - Schema(schema, { report, location }) { - if (schema.type !== 'object') - return; - const expectedProperties = names[key] || - names[(0, utils_1.getMatchingStatusCodeRange)(key)] || - names[(0, utils_1.getMatchingStatusCodeRange)(key).toLowerCase()] || - []; - for (const expectedProperty of expectedProperties) { - if (!schema.properties?.[expectedProperty]) { - report({ - message: `Response object must contain a top-level "${expectedProperty}" property.`, - location: location.child('properties').key(), - }); - } - } - }, - }, - }, - }, - }; -}; -exports.ResponseContainsProperty = ResponseContainsProperty; - - -/***/ }), - -/***/ 17386: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ResponseMimeType = void 0; -const utils_1 = __nccwpck_require__(75450); -const ResponseMimeType = ({ allowedValues }) => { - return { - Paths: { - Response: { - leave(response, ctx) { - (0, utils_1.validateMimeTypeOAS3)({ type: 'produces', value: response }, ctx, allowedValues); - }, - }, - Callback: { - Response() { }, - RequestBody: { - leave(requestBody, ctx) { - (0, utils_1.validateMimeTypeOAS3)({ type: 'produces', value: requestBody }, ctx, allowedValues); - }, - }, - }, - }, - WebhooksMap: { - RequestBody: { - leave(requestBody, ctx) { - (0, utils_1.validateMimeTypeOAS3)({ type: 'produces', value: requestBody }, ctx, allowedValues); - }, - }, - }, - }; -}; -exports.ResponseMimeType = ResponseMimeType; - - -/***/ }), - -/***/ 71679: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SpecComponentsInvalidMapName = void 0; -const SpecComponentsInvalidMapName = () => { - const KEYS_REGEX = '^[a-zA-Z0-9\\.\\-_]+$'; - function validateKey(key, report, location, component) { - if (!new RegExp(KEYS_REGEX).test(key)) { - report({ - message: `The map key in ${component} "${key}" does not match the regular expression "${KEYS_REGEX}"`, - location: location.key(), - }); - } - } - return { - NamedSchemas: { - Schema(_node, { key, report, location }) { - validateKey(key, report, location, 'schemas'); - }, - }, - NamedParameters: { - Parameter(_node, { key, report, location }) { - validateKey(key, report, location, 'parameters'); - }, - }, - NamedResponses: { - Response(_node, { key, report, location }) { - validateKey(key, report, location, 'responses'); - }, - }, - NamedExamples: { - Example(_node, { key, report, location }) { - validateKey(key, report, location, 'examples'); - }, - }, - NamedRequestBodies: { - RequestBody(_node, { key, report, location }) { - validateKey(key, report, location, 'requestBodies'); - }, - }, - NamedHeaders: { - Header(_node, { key, report, location }) { - validateKey(key, report, location, 'headers'); - }, - }, - NamedSecuritySchemes: { - SecurityScheme(_node, { key, report, location }) { - validateKey(key, report, location, 'securitySchemes'); - }, - }, - NamedLinks: { - Link(_node, { key, report, location }) { - validateKey(key, report, location, 'links'); - }, - }, - NamedCallbacks: { - Callback(_node, { key, report, location }) { - validateKey(key, report, location, 'callbacks'); - }, - }, - }; -}; -exports.SpecComponentsInvalidMapName = SpecComponentsInvalidMapName; - - -/***/ }), - -/***/ 18373: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Stats = void 0; -const Stats = (statsAccumulator) => { - return { - ExternalDocs: { - leave() { - statsAccumulator.externalDocs.total++; - }, - }, - ref: { - enter(ref) { - statsAccumulator.refs.items.add(ref['$ref']); - }, - }, - Tag: { - leave(tag) { - statsAccumulator.tags.items.add(tag.name); - }, - }, - Link: { - leave(link) { - statsAccumulator.links.items.add(link.operationId); - }, - }, - Root: { - leave() { - statsAccumulator.parameters.total = statsAccumulator.parameters.items.size; - statsAccumulator.refs.total = statsAccumulator.refs.items.size; - statsAccumulator.links.total = statsAccumulator.links.items.size; - statsAccumulator.tags.total = statsAccumulator.tags.items.size; - }, - }, - WebhooksMap: { - Operation: { - leave(operation) { - statsAccumulator.webhooks.total++; - operation.tags && - operation.tags.forEach((tag) => { - statsAccumulator.tags.items.add(tag); - }); - }, - }, - }, - Paths: { - PathItem: { - leave() { - statsAccumulator.pathItems.total++; - }, - Operation: { - leave(operation) { - statsAccumulator.operations.total++; - operation.tags && - operation.tags.forEach((tag) => { - statsAccumulator.tags.items.add(tag); - }); - }, - }, - Parameter: { - leave(parameter) { - statsAccumulator.parameters.items.add(parameter.name); - }, - }, - }, - }, - NamedSchemas: { - Schema: { - leave() { - statsAccumulator.schemas.total++; - }, - }, - }, - }; -}; -exports.Stats = Stats; - - -/***/ }), - -/***/ 6422: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.preprocessors = exports.rules = void 0; -const assertions_1 = __nccwpck_require__(11612); -const info_contact_1 = __nccwpck_require__(4377); -const struct_1 = __nccwpck_require__(16612); -exports.rules = { - 'info-contact': info_contact_1.InfoContact, - struct: struct_1.Struct, - assertions: assertions_1.Assertions, -}; -exports.preprocessors = {}; - - -/***/ }), - -/***/ 14492: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NoCriteriaXpath = void 0; -const NoCriteriaXpath = () => { - return { - CriterionObject: { - enter(criteria, { report, location }) { - if (!criteria.type) { - return; - } - if (criteria?.type?.type === 'xpath' || criteria?.type === 'xpath') { - report({ - message: 'The `xpath` type criteria is not supported by Respect.', - location: location.child(['type']), - }); - } - }, - }, - }; -}; -exports.NoCriteriaXpath = NoCriteriaXpath; - - -/***/ }), - -/***/ 45478: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RespectSupportedVersions = void 0; -const arazzo_1 = __nccwpck_require__(17675); -const utils_1 = __nccwpck_require__(75450); -const RespectSupportedVersions = () => { - const supportedVersions = arazzo_1.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.join(', '); - return { - Root: { - enter(root, { report, location }) { - if (!arazzo_1.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.includes(root.arazzo)) { - report({ - message: `Only ${supportedVersions} Arazzo ${(0, utils_1.pluralize)('version is', arazzo_1.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.length)} fully supported by Respect.`, - location: location.child('arazzo'), - }); - } - }, - }, - }; -}; -exports.RespectSupportedVersions = RespectSupportedVersions; - - -/***/ }), - -/***/ 33944: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.oasTypeOf = oasTypeOf; -exports.matchesJsonSchemaType = matchesJsonSchemaType; -exports.missingRequiredField = missingRequiredField; -exports.missingRequiredOneOfFields = missingRequiredOneOfFields; -exports.fieldNonEmpty = fieldNonEmpty; -exports.validateDefinedAndNonEmpty = validateDefinedAndNonEmpty; -exports.validateOneOfDefinedAndNonEmpty = validateOneOfDefinedAndNonEmpty; -exports.getSuggest = getSuggest; -exports.validateExample = validateExample; -exports.getAdditionalPropertiesOption = getAdditionalPropertiesOption; -exports.validateSchemaEnumType = validateSchemaEnumType; -exports.validateResponseCodes = validateResponseCodes; -const levenshtein = __nccwpck_require__(87468); -const ref_utils_1 = __nccwpck_require__(97977); -const ajv_1 = __nccwpck_require__(75166); -const utils_1 = __nccwpck_require__(75450); -function oasTypeOf(value) { - if (Array.isArray(value)) { - return 'array'; - } - else if (value === null) { - return 'null'; - } - else if (Number.isInteger(value)) { - return 'integer'; - } - else { - return typeof value; - } -} -/** - * Checks if value matches specified JSON schema type - * - * @param {*} value - value to check - * @param {JSONSchemaType} type - JSON Schema type - * @returns boolean - */ -function matchesJsonSchemaType(value, type, nullable) { - if (nullable && value === null) { - return true; - } - switch (type) { - case 'array': - return Array.isArray(value); - case 'object': - return typeof value === 'object' && value !== null && !Array.isArray(value); - case 'null': - return value === null; - case 'integer': - return Number.isInteger(value); - default: - return typeof value === type; - } -} -function missingRequiredField(type, field) { - return `${type} object should contain \`${field}\` field.`; -} -function missingRequiredOneOfFields(type, fields) { - return `${type} object should contain one of the fields: ${fields - .map((field) => `\`${field}\``) - .join(', ')}.`; -} -function fieldNonEmpty(type, field) { - return `${type} object \`${field}\` must be non-empty string.`; -} -function validateDefinedAndNonEmpty(fieldName, value, ctx) { - if (!(0, utils_1.isPlainObject)(value)) { - return; - } - if (value[fieldName] === undefined) { - ctx.report({ - message: missingRequiredField(ctx.type.name, fieldName), - location: ctx.location.child([fieldName]).key(), - }); - } - else if (!value[fieldName]) { - ctx.report({ - message: fieldNonEmpty(ctx.type.name, fieldName), - location: ctx.location.child([fieldName]).key(), - }); - } -} -function validateOneOfDefinedAndNonEmpty(fieldNames, value, ctx) { - if (!(0, utils_1.isPlainObject)(value)) { - return; - } - if (!fieldNames.some((fieldName) => value.hasOwnProperty(fieldName))) { - ctx.report({ - message: missingRequiredOneOfFields(ctx.type.name, fieldNames), - location: ctx.location.key(), - }); - } - for (const fieldName of fieldNames) { - if (value.hasOwnProperty(fieldName) && !value[fieldName]) { - ctx.report({ - message: fieldNonEmpty(ctx.type.name, fieldName), - location: ctx.location.child([fieldName]).key(), - }); - } - } -} -function getSuggest(given, variants) { - if (given === null) - return variants; - if (typeof given !== 'string' || !variants.length) - return []; - const distances = []; - for (let i = 0; i < variants.length; i++) { - const distance = levenshtein(given, variants[i]); - if (distance < 4) { - distances.push({ distance, variant: variants[i] }); - } - } - distances.sort((a, b) => a.distance - b.distance); - // if (bestMatch.distance <= 4) return bestMatch.string; - return distances.map((d) => d.variant); -} -function validateExample(example, schema, dataLoc, { resolve, location, report }, allowAdditionalProperties) { - try { - const { valid, errors } = (0, ajv_1.validateJsonSchema)(example, schema, location.child('schema'), dataLoc.pointer, resolve, allowAdditionalProperties); - if (!valid) { - for (const error of errors) { - report({ - message: `Example value must conform to the schema: ${error.message}.`, - location: { - ...new ref_utils_1.Location(dataLoc.source, error.instancePath), - reportOnKey: error.keyword === 'unevaluatedProperties' || error.keyword === 'additionalProperties', - }, - from: location, - suggest: error.suggest, - }); - } - } - } - catch (e) { - if (e.message === 'discriminator: requires oneOf or anyOf composite keyword') { - return; - } - report({ - message: `Example validation errored: ${e.message}.`, - location: location.child('schema'), - from: location, - }); - } -} -function getAdditionalPropertiesOption(opts) { - if (opts.disallowAdditionalProperties === undefined) { - return opts.allowAdditionalProperties; - } - if (opts.allowAdditionalProperties !== undefined) { - (0, utils_1.showErrorForDeprecatedField)('disallowAdditionalProperties', 'allowAdditionalProperties', undefined); - } - (0, utils_1.showWarningForDeprecatedField)('disallowAdditionalProperties', 'allowAdditionalProperties'); - return !opts.disallowAdditionalProperties; -} -function validateSchemaEnumType(schemaEnum, propertyValue, propName, refLocation, { report, location }) { - if (!schemaEnum) { - return; - } - if (!schemaEnum.includes(propertyValue)) { - report({ - location, - message: `\`${propName}\` can be one of the following only: ${schemaEnum - .map((type) => `"${type}"`) - .join(', ')}.`, - from: refLocation, - suggest: getSuggest(propertyValue, schemaEnum), - }); - } -} -function validateResponseCodes(responseCodes, codeRange, { report }) { - const responseCodeRegexp = new RegExp(`^${codeRange[0]}[0-9Xx]{2}$`); - const containsNeededCode = responseCodes.some((code) => (codeRange === '2XX' && code === 'default') || // It's OK to replace 2xx codes with the default - responseCodeRegexp.test(code)); - if (!containsNeededCode) { - report({ - message: `Operation must have at least one \`${codeRange}\` response.`, - location: { reportOnKey: true }, - }); - } -} - - -/***/ }), - -/***/ 54642: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Arazzo1Types = void 0; -const _1 = __nccwpck_require__(14143); -const oas3_1_1 = __nccwpck_require__(53734); -const oas3_1 = __nccwpck_require__(67296); -const Root = { - properties: { - arazzo: { type: 'string' }, - info: 'Info', - sourceDescriptions: 'SourceDescriptions', - workflows: 'Workflows', - components: 'Components', - }, - required: ['arazzo', 'info', 'sourceDescriptions', 'workflows'], - extensionsPrefix: 'x-', -}; -const NamedParameters = { - properties: {}, - additionalProperties: 'Parameter', -}; -const NamedSuccessActions = { - properties: {}, - additionalProperties: 'SuccessActionObject', -}; -const NamedFailureActions = { - properties: {}, - additionalProperties: 'FailureActionObject', -}; -const Components = { - properties: { - inputs: 'NamedInputs', - parameters: 'NamedParameters', - successActions: 'NamedSuccessActions', - failureActions: 'NamedFailureActions', - }, - extensionsPrefix: 'x-', -}; -const NamedInputs = (0, _1.mapOf)('Schema'); -const Info = { - properties: { - title: { type: 'string' }, - description: { type: 'string' }, - summary: { type: 'string' }, - version: { type: 'string' }, - }, - required: ['title', 'version'], - extensionsPrefix: 'x-', -}; -const SourceDescriptions = { - properties: {}, - items: (value) => { - if (value?.type === 'openapi') { - return 'OpenAPISourceDescription'; - } - else { - return 'ArazzoSourceDescription'; - } - }, -}; -const OpenAPISourceDescription = { - properties: { - name: { type: 'string' }, - type: { type: 'string', enum: ['openapi'] }, - url: { type: 'string' }, - 'x-serverUrl': { type: 'string' }, - }, - required: ['name', 'type', 'url'], - extensionsPrefix: 'x-', -}; -const ArazzoSourceDescription = { - properties: { - name: { type: 'string' }, - type: { type: 'string', enum: ['arazzo'] }, - url: { type: 'string' }, - }, - required: ['name', 'type', 'url'], - extensionsPrefix: 'x-', -}; -const ReusableObject = { - properties: { - reference: { type: 'string' }, - value: {}, // any - }, - required: ['reference'], - extensionsPrefix: 'x-', -}; -const Parameter = { - properties: { - in: { type: 'string', enum: ['header', 'query', 'path', 'cookie'] }, - name: { type: 'string' }, - value: {}, // any - }, - required: ['name', 'value'], - extensionsPrefix: 'x-', -}; -const Parameters = { - properties: {}, - items: (value) => { - if (value?.reference) { - return 'ReusableObject'; - } - else { - return 'Parameter'; - } - }, -}; -const Workflow = { - properties: { - workflowId: { type: 'string' }, - summary: { type: 'string' }, - description: { type: 'string' }, - parameters: 'Parameters', - dependsOn: { type: 'array', items: { type: 'string' } }, - inputs: 'Schema', - outputs: 'Outputs', - steps: 'Steps', - successActions: 'OnSuccessActionList', - failureActions: 'OnFailureActionList', - }, - required: ['workflowId', 'steps'], - extensionsPrefix: 'x-', -}; -const Workflows = (0, _1.listOf)('Workflow'); -const Steps = (0, _1.listOf)('Step'); -const Step = { - properties: { - stepId: { type: 'string' }, - description: { type: 'string' }, - operationId: { type: 'string' }, - operationPath: { type: 'string' }, - workflowId: { type: 'string' }, - parameters: 'Parameters', - successCriteria: (0, _1.listOf)('CriterionObject'), - onSuccess: 'OnSuccessActionList', - onFailure: 'OnFailureActionList', - outputs: 'Outputs', - 'x-operation': 'ExtendedOperation', - requestBody: 'RequestBody', - }, - required: ['stepId'], - requiredOneOf: ['x-operation', 'operationId', 'operationPath', 'workflowId'], - extensionsPrefix: 'x-', -}; -const Outputs = { - properties: {}, - additionalProperties: { - type: 'string', - }, -}; -const RequestBody = { - properties: { - contentType: { type: 'string' }, - payload: {}, - replacements: (0, _1.listOf)('Replacement'), - }, - required: ['payload'], - extensionsPrefix: 'x-', -}; -const Replacement = { - properties: { - target: { type: 'string' }, - value: {}, - }, - required: ['target', 'value'], - extensionsPrefix: 'x-', -}; -const ExtendedOperation = { - properties: { - url: { type: 'string' }, - method: { - enum: [ - 'get', - 'post', - 'put', - 'delete', - 'patch', - 'head', - 'options', - 'trace', - 'connect', - 'query', - 'GET', - 'POST', - 'PUT', - 'DELETE', - 'PATCH', - 'OPTIONS', - 'HEAD', - 'TRACE', - 'CONNECT', - 'QUERY', - ], - }, - }, - required: ['url', 'method'], -}; -const CriterionObject = { - properties: { - condition: { type: 'string' }, - context: { type: 'string' }, - type: (value) => { - if (!value) { - return undefined; - } - else if (typeof value === 'string') { - return { enum: ['regex', 'jsonpath', 'simple', 'xpath'] }; - } - else if (value?.type === 'jsonpath') { - return 'JSONPathCriterion'; - } - else { - return 'XPathCriterion'; - } - }, - }, - required: ['condition'], -}; -const JSONPathCriterion = { - properties: { - type: { type: 'string', enum: ['jsonpath'] }, - version: { type: 'string', enum: ['draft-goessner-dispatch-jsonpath-00'] }, - }, -}; -const XPathCriterion = { - properties: { - type: { type: 'string', enum: ['xpath'] }, - version: { type: 'string', enum: ['xpath-30', 'xpath-20', 'xpath-10'] }, - }, -}; -const SuccessActionObject = { - properties: { - name: { type: 'string' }, - type: { type: 'string', enum: ['goto', 'end'] }, - stepId: { type: 'string' }, - workflowId: { type: 'string' }, - criteria: (0, _1.listOf)('CriterionObject'), - }, - required: ['type', 'name'], -}; -const OnSuccessActionList = { - properties: {}, - items: (value) => { - if (value?.type && value?.name) { - return 'SuccessActionObject'; - } - else { - return 'ReusableObject'; - } - }, -}; -const FailureActionObject = { - properties: { - name: { type: 'string' }, - type: { type: 'string', enum: ['goto', 'retry', 'end'] }, - workflowId: { type: 'string' }, - stepId: { type: 'string' }, - retryAfter: { type: 'number' }, - retryLimit: { type: 'number' }, - criteria: (0, _1.listOf)('CriterionObject'), - }, - required: ['type', 'name'], -}; -const OnFailureActionList = { - properties: {}, - items: (value) => { - if (value?.type && value?.name) { - return 'FailureActionObject'; - } - else { - return 'ReusableObject'; - } - }, -}; -exports.Arazzo1Types = { - Root, - Info, - SourceDescriptions, - OpenAPISourceDescription, - ArazzoSourceDescription, - Parameters, - Parameter, - ReusableObject, - Workflows, - Workflow, - Steps, - Step, - RequestBody, - Replacement, - ExtendedOperation, - Outputs, - CriterionObject, - XPathCriterion, - JSONPathCriterion, - SuccessActionObject, - OnSuccessActionList, - FailureActionObject, - OnFailureActionList, - Schema: oas3_1_1.Schema, - NamedSchemas: (0, _1.mapOf)('Schema'), - ExternalDocs: oas3_1.ExternalDocs, - DiscriminatorMapping: oas3_1.DiscriminatorMapping, - Discriminator: oas3_1.Discriminator, - DependentRequired: oas3_1_1.DependentRequired, - SchemaProperties: oas3_1_1.SchemaProperties, - PatternProperties: oas3_1_1.SchemaProperties, - Components, - NamedInputs, - NamedParameters, - NamedSuccessActions, - NamedFailureActions, - Xml: oas3_1.Xml, -}; - - -/***/ }), - -/***/ 32311: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AsyncApi2Types = exports.AsyncApi2Bindings = exports.Dependencies = exports.SecuritySchemeFlows = exports.Discriminator = exports.DiscriminatorMapping = exports.SchemaProperties = exports.Schema = exports.MessageExample = exports.CorrelationId = exports.License = exports.Contact = exports.ServerVariable = exports.ServerMap = exports.ExternalDocs = exports.Tag = void 0; -const _1 = __nccwpck_require__(14143); -const ref_utils_1 = __nccwpck_require__(97977); -const Root = { - properties: { - asyncapi: null, // TODO: validate semver format and supported version - info: 'Info', - id: { type: 'string' }, - servers: 'ServerMap', - channels: 'ChannelMap', - components: 'Components', - tags: 'TagList', - externalDocs: 'ExternalDocs', - defaultContentType: { type: 'string' }, - }, - required: ['asyncapi', 'channels', 'info'], -}; -const Channel = { - properties: { - description: { type: 'string' }, - subscribe: 'Operation', - publish: 'Operation', - parameters: 'ParametersMap', - bindings: 'ChannelBindings', - servers: { type: 'array', items: { type: 'string' } }, - }, -}; -const ChannelMap = { - properties: {}, - additionalProperties: 'Channel', -}; -const ChannelBindings = { - properties: {}, - allowed() { - // allow all supported values, not all have deep linting - return [ - 'http', - 'ws', - 'kafka', - 'anypointmq', - 'amqp', - 'amqp1', - 'mqtt', - 'mqtt5', - 'nats', - 'jms', - 'sns', - 'solace', - 'sqs', - 'stomp', - 'redis', - 'mercure', - 'ibmmq', - 'googlepubsub', - 'pulsar', - ]; - }, - additionalProperties: { type: 'object' }, -}; -exports.Tag = { - properties: { - name: { type: 'string' }, - description: { type: 'string' }, - externalDocs: 'ExternalDocs', - }, - required: ['name'], -}; -exports.ExternalDocs = { - properties: { - description: { type: 'string' }, - url: { type: 'string' }, - }, - required: ['url'], -}; -const SecurityRequirement = { - properties: {}, - additionalProperties: { type: 'array', items: { type: 'string' } }, -}; -const ServerBindings = { - properties: {}, - allowed() { - // allow all supported values, not all have deep linting - return [ - 'http', - 'ws', - 'kafka', - 'anypointmq', - 'amqp', - 'amqp1', - 'mqtt', - 'mqtt5', - 'nats', - 'jms', - 'sns', - 'solace', - 'sqs', - 'stomp', - 'redis', - 'mercure', - 'ibmmq', - 'googlepubsub', - 'pulsar', - ]; - }, - additionalProperties: { type: 'object' }, -}; -const Server = { - properties: { - url: { type: 'string' }, - protocol: { type: 'string' }, - protocolVersion: { type: 'string' }, - description: { type: 'string' }, - variables: 'ServerVariablesMap', - security: 'SecurityRequirementList', - bindings: 'ServerBindings', - tags: 'TagList', - }, - required: ['url', 'protocol'], -}; -exports.ServerMap = { - properties: {}, - additionalProperties: (_value, key) => - // eslint-disable-next-line no-useless-escape - key.match(/^[A-Za-z0-9_\-]+$/) ? 'Server' : undefined, -}; -exports.ServerVariable = { - properties: { - enum: { - type: 'array', - items: { type: 'string' }, - }, - default: { type: 'string' }, - description: { type: 'string' }, - examples: { - type: 'array', - items: { type: 'string' }, - }, - }, - required: [], -}; -const Info = { - properties: { - title: { type: 'string' }, - version: { type: 'string' }, - description: { type: 'string' }, - termsOfService: { type: 'string' }, - contact: 'Contact', - license: 'License', - }, - required: ['title', 'version'], -}; -exports.Contact = { - properties: { - name: { type: 'string' }, - url: { type: 'string' }, - email: { type: 'string' }, - }, -}; -exports.License = { - properties: { - name: { type: 'string' }, - url: { type: 'string' }, - }, - required: ['name'], -}; -const Parameter = { - properties: { - description: { type: 'string' }, - schema: 'Schema', - location: { type: 'string' }, - }, -}; -exports.CorrelationId = { - properties: { - description: { type: 'string' }, - location: { type: 'string' }, - }, - required: ['location'], -}; -const Message = { - properties: { - messageId: { type: 'string' }, - headers: 'Schema', - payload: 'Schema', // TODO: strictly this does not cover all cases - correlationId: 'CorrelationId', - schemaFormat: { type: 'string' }, // TODO: support official list of schema formats and custom values - contentType: { type: 'string' }, - name: { type: 'string' }, - title: { type: 'string' }, - summary: { type: 'string' }, - description: { type: 'string' }, - tags: 'TagList', - externalDocs: 'ExternalDocs', - bindings: 'MessageBindings', - examples: 'MessageExampleList', - traits: 'MessageTraitList', - }, - additionalProperties: {}, -}; -const MessageBindings = { - properties: {}, - allowed() { - // allow all supported values, not all have deep linting - return [ - 'http', - 'ws', - 'kafka', - 'anypointmq', - 'amqp', - 'amqp1', - 'mqtt', - 'mqtt5', - 'nats', - 'jms', - 'sns', - 'solace', - 'sqs', - 'stomp', - 'redis', - 'mercure', - 'ibmmq', - 'googlepubsub', - 'pulsar', - ]; - }, - additionalProperties: { type: 'object' }, -}; -const OperationBindings = { - properties: {}, - allowed() { - // allow all supported values, not all have deep linting - return [ - 'http', - 'ws', - 'kafka', - 'anypointmq', - 'amqp', - 'amqp1', - 'mqtt', - 'mqtt5', - 'nats', - 'jms', - 'sns', - 'solace', - 'sqs', - 'stomp', - 'redis', - 'mercure', - 'ibmmq', - 'googlepubsub', - 'pulsar', - ]; - }, - additionalProperties: { type: 'object' }, -}; -const OperationTrait = { - properties: { - tags: 'TagList', - summary: { type: 'string' }, - description: { type: 'string' }, - externalDocs: 'ExternalDocs', - operationId: { type: 'string' }, - security: 'SecurityRequirementList', - bindings: 'OperationBindings', - }, - required: [], -}; -const MessageTrait = { - properties: { - messageId: { type: 'string' }, - headers: 'Schema', - correlationId: 'CorrelationId', - schemaFormat: { type: 'string' }, - contentType: { type: 'string' }, - name: { type: 'string' }, - title: { type: 'string' }, - summary: { type: 'string' }, - description: { type: 'string' }, - tags: 'TagList', - externalDocs: 'ExternalDocs', - bindings: 'MessageBindings', - examples: 'MessageExampleList', - }, - additionalProperties: {}, -}; -const Operation = { - properties: { - tags: 'TagList', - summary: { type: 'string' }, - description: { type: 'string' }, - externalDocs: 'ExternalDocs', - operationId: { type: 'string' }, - security: 'SecurityRequirementList', - bindings: 'OperationBindings', - traits: 'OperationTraitList', - message: 'Message', - }, - required: [], -}; -exports.MessageExample = { - properties: { - payload: { isExample: true }, - summary: { type: 'string' }, - name: { type: 'string' }, - headers: { type: 'object' }, - }, -}; -exports.Schema = { - properties: { - $id: { type: 'string' }, - $schema: { type: 'string' }, - definitions: 'NamedSchemas', - externalDocs: 'ExternalDocs', - discriminator: 'Discriminator', - myArbitraryKeyword: { type: 'boolean' }, - title: { type: 'string' }, - multipleOf: { type: 'number', minimum: 0 }, - maximum: { type: 'number' }, - minimum: { type: 'number' }, - exclusiveMaximum: { type: 'number' }, - exclusiveMinimum: { type: 'number' }, - maxLength: { type: 'integer', minimum: 0 }, - minLength: { type: 'integer', minimum: 0 }, - pattern: { type: 'string' }, - maxItems: { type: 'integer', minimum: 0 }, - minItems: { type: 'integer', minimum: 0 }, - uniqueItems: { type: 'boolean' }, - maxProperties: { type: 'integer', minimum: 0 }, - minProperties: { type: 'integer', minimum: 0 }, - required: { type: 'array', items: { type: 'string' } }, - enum: { type: 'array' }, - type: (value) => { - return Array.isArray(value) - ? { - type: 'array', - items: { enum: ['object', 'array', 'string', 'number', 'integer', 'boolean', 'null'] }, - } - : { - enum: ['object', 'array', 'string', 'number', 'integer', 'boolean', 'null'], - }; - }, - allOf: (0, _1.listOf)('Schema'), - anyOf: (0, _1.listOf)('Schema'), - oneOf: (0, _1.listOf)('Schema'), - not: 'Schema', - if: 'Schema', - then: 'Schema', - else: 'Schema', - contains: 'Schema', - patternProperties: { type: 'object' }, - propertyNames: 'Schema', - properties: 'SchemaProperties', - items: (value) => { - return Array.isArray(value) ? (0, _1.listOf)('Schema') : 'Schema'; - }, - additionalProperties: (value) => { - return typeof value === 'boolean' ? { type: 'boolean' } : 'Schema'; - }, - description: { type: 'string' }, - format: { type: 'string' }, - contentEncoding: { type: 'string' }, - contentMediaType: { type: 'string' }, - default: null, - readOnly: { type: 'boolean' }, - writeOnly: { type: 'boolean' }, - examples: { type: 'array' }, - example: { isExample: true }, - deprecated: { type: 'boolean' }, - const: null, - $comment: { type: 'string' }, - additionalItems: (value) => { - return typeof value === 'boolean' ? { type: 'boolean' } : 'Schema'; - }, - dependencies: 'Dependencies', - }, -}; -exports.SchemaProperties = { - properties: {}, - additionalProperties: (value) => { - return typeof value === 'boolean' ? { type: 'boolean' } : 'Schema'; - }, -}; -exports.DiscriminatorMapping = { - properties: {}, - additionalProperties: (value) => { - if ((0, ref_utils_1.isMappingRef)(value)) { - return { type: 'string', directResolveAs: 'Schema' }; - } - else { - return { type: 'string' }; - } - }, -}; -exports.Discriminator = { - properties: { - propertyName: { type: 'string' }, - mapping: 'DiscriminatorMapping', - }, - required: ['propertyName'], -}; -const Components = { - properties: { - messages: 'NamedMessages', - parameters: 'NamedParameters', - schemas: 'NamedSchemas', - correlationIds: 'NamedCorrelationIds', - messageTraits: 'NamedMessageTraits', - operationTraits: 'NamedOperationTraits', - securitySchemes: 'NamedSecuritySchemes', - servers: 'ServerMap', - serverVariables: 'ServerVariablesMap', - channels: 'ChannelMap', - serverBindings: 'ServerBindings', - channelBindings: 'ChannelBindings', - operationBindings: 'OperationBindings', - messageBindings: 'MessageBindings', - }, -}; -const ImplicitFlow = { - properties: { - refreshUrl: { type: 'string' }, - scopes: { type: 'object', additionalProperties: { type: 'string' } }, // TODO: validate scopes - authorizationUrl: { type: 'string' }, - }, - required: ['authorizationUrl', 'scopes'], -}; -const PasswordFlow = { - properties: { - refreshUrl: { type: 'string' }, - scopes: { type: 'object', additionalProperties: { type: 'string' } }, // TODO: validate scopes - tokenUrl: { type: 'string' }, - }, - required: ['tokenUrl', 'scopes'], -}; -const ClientCredentials = { - properties: { - refreshUrl: { type: 'string' }, - scopes: { type: 'object', additionalProperties: { type: 'string' } }, // TODO: validate scopes - tokenUrl: { type: 'string' }, - }, - required: ['tokenUrl', 'scopes'], -}; -const AuthorizationCode = { - properties: { - refreshUrl: { type: 'string' }, - authorizationUrl: { type: 'string' }, - scopes: { type: 'object', additionalProperties: { type: 'string' } }, // TODO: validate scopes - tokenUrl: { type: 'string' }, - }, - required: ['authorizationUrl', 'tokenUrl', 'scopes'], -}; -exports.SecuritySchemeFlows = { - properties: { - implicit: 'ImplicitFlow', - password: 'PasswordFlow', - clientCredentials: 'ClientCredentials', - authorizationCode: 'AuthorizationCode', - }, -}; -const SecurityScheme = { - properties: { - type: { - enum: [ - 'userPassword', - 'apiKey', - 'X509', - 'symmetricEncryption', - 'asymmetricEncryption', - 'httpApiKey', - 'http', - 'oauth2', - 'openIdConnect', - 'plain', - 'scramSha256', - 'scramSha512', - 'gssapi', - ], - }, - description: { type: 'string' }, - name: { type: 'string' }, - in: { type: 'string', enum: ['query', 'header', 'cookie', 'user', 'password'] }, - scheme: { type: 'string' }, - bearerFormat: { type: 'string' }, - flows: 'SecuritySchemeFlows', - openIdConnectUrl: { type: 'string' }, - }, - required(value) { - switch (value?.type) { - case 'apiKey': - return ['type', 'in']; - case 'httpApiKey': - return ['type', 'name', 'in']; - case 'http': - return ['type', 'scheme']; - case 'oauth2': - return ['type', 'flows']; - case 'openIdConnect': - return ['type', 'openIdConnectUrl']; - default: - return ['type']; - } - }, - allowed(value) { - switch (value?.type) { - case 'apiKey': - return ['type', 'in', 'description']; - case 'httpApiKey': - return ['type', 'name', 'in', 'description']; - case 'http': - return ['type', 'scheme', 'bearerFormat', 'description']; - case 'oauth2': - return ['type', 'flows', 'description']; - case 'openIdConnect': - return ['type', 'openIdConnectUrl', 'description']; - default: - return ['type', 'description']; - } - }, - extensionsPrefix: 'x-', -}; -exports.Dependencies = { - properties: {}, - additionalProperties: (value) => { - return Array.isArray(value) ? { type: 'array', items: { type: 'string' } } : 'Schema'; - }, -}; -// --- Per-protocol node types -// http -const HttpChannelBinding = { - properties: {}, // empty object -}; -ChannelBindings.properties.http = HttpChannelBinding; -const HttpServerBinding = { - properties: {}, // empty object -}; -ServerBindings.properties.http = HttpServerBinding; -const HttpMessageBinding = { - properties: { - headers: 'Schema', - bindingVersion: { type: 'string' }, - }, -}; -MessageBindings.properties.http = HttpMessageBinding; -const HttpOperationBinding = { - properties: { - type: { type: 'string' }, - method: { - type: 'string', - enum: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', 'TRACE'], - }, - headers: 'Schema', - bindingVersion: { type: 'string' }, - }, -}; -OperationBindings.properties.http = HttpOperationBinding; -// ws -const WsChannelBinding = { - properties: { - method: { type: 'string' }, - query: 'Schema', - headers: 'Schema', - bindingVersion: { type: 'string' }, - }, -}; -ChannelBindings.properties.ws = WsChannelBinding; -const WsServerBinding = { - properties: {}, // empty object -}; -ServerBindings.properties.ws = WsServerBinding; -const WsMessageBinding = { - properties: {}, // empty object -}; -MessageBindings.properties.ws = WsMessageBinding; -const WsOperationBinding = { - properties: {}, // empty object -}; -OperationBindings.properties.ws = WsOperationBinding; -// kafka -const KafkaTopicConfiguration = { - properties: { - 'cleanup.policy': { type: 'array', items: { enum: ['delete', 'compact'] } }, - 'retention.ms': { type: 'integer' }, - 'retention.bytes': { type: 'integer' }, - 'delete.retention.ms': { type: 'integer' }, - 'max.message.bytes': { type: 'integer' }, - }, -}; -const KafkaChannelBinding = { - properties: { - topic: { type: 'string' }, - partitions: { type: 'integer' }, - replicas: { type: 'integer' }, - topicConfiguration: 'KafkaTopicConfiguration', - bindingVersion: { type: 'string' }, - }, -}; -ChannelBindings.properties.kafka = KafkaChannelBinding; -const KafkaServerBinding = { - properties: {}, // empty object -}; -ServerBindings.properties.kafka = KafkaServerBinding; -const KafkaMessageBinding = { - properties: { - key: 'Schema', // TODO: add avro support - schemaIdLocation: { type: 'string' }, - schemaIdPayloadEncoding: { type: 'string' }, - schemaLookupStrategy: { type: 'string' }, - bindingVersion: { type: 'string' }, - }, -}; -MessageBindings.properties.kafka = KafkaMessageBinding; -const KafkaOperationBinding = { - properties: { - groupId: 'Schema', - clientId: 'Schema', - bindingVersion: { type: 'string' }, - }, -}; -OperationBindings.properties.kafka = KafkaOperationBinding; -// anypointmq -const AnypointmqChannelBinding = { - properties: { - destination: { type: 'string' }, - destinationType: { type: 'string' }, - bindingVersion: { type: 'string' }, - }, -}; -ChannelBindings.properties.anypointmq = AnypointmqChannelBinding; -const AnypointmqServerBinding = { - properties: {}, // empty object -}; -ServerBindings.properties.anypointmq = AnypointmqServerBinding; -const AnypointmqMessageBinding = { - properties: { - headers: 'Schema', - bindingVersion: { type: 'string' }, - }, -}; -MessageBindings.properties.anypointmq = AnypointmqMessageBinding; -const AnypointmqOperationBinding = { - properties: {}, // empty object -}; -OperationBindings.properties.anypointmq = AnypointmqOperationBinding; -// amqp -const AmqpChannelBinding = { - properties: {}, // empty object -}; -ChannelBindings.properties.amqp = AmqpChannelBinding; -const AmqpServerBinding = { - properties: {}, // empty object -}; -ServerBindings.properties.amqp = AmqpServerBinding; -const AmqpMessageBinding = { - properties: { - contentEncoding: { type: 'string' }, - messageType: { type: 'string' }, - bindingVersion: { type: 'string' }, - }, -}; -MessageBindings.properties.amqp = AmqpMessageBinding; -const AmqpOperationBinding = { - // TODO: some fields are subscribe only - properties: { - expiration: { type: 'integer' }, - userId: { type: 'string' }, - cc: { type: 'array', items: { type: 'string' } }, - priority: { type: 'integer' }, - deliveryMode: { type: 'integer' }, // TODO: enum: [1, 2] - mandatory: { type: 'boolean' }, - bcc: { type: 'array', items: { type: 'string' } }, - replyTo: { type: 'string' }, - timestamp: { type: 'boolean' }, - ack: { type: 'boolean' }, - bindingVersion: { type: 'string' }, - }, -}; -OperationBindings.properties.amqp = AmqpOperationBinding; -// amqp1 -const Amqp1ChannelBinding = { - properties: {}, // empty object -}; -ChannelBindings.properties.amqp1 = Amqp1ChannelBinding; -const Amqp1ServerBinding = { - properties: {}, // empty object -}; -ServerBindings.properties.amqp1 = Amqp1ServerBinding; -const Amqp1MessageBinding = { - properties: {}, // empty object -}; -MessageBindings.properties.amqp1 = Amqp1MessageBinding; -const Amqp1OperationBinding = { - properties: {}, // empty object -}; -OperationBindings.properties.amqp1 = Amqp1OperationBinding; -// mqtt -const MqttChannelBinding = { - properties: { - qos: { type: 'integer' }, - retain: { type: 'boolean' }, - bindingVersion: { type: 'string' }, - }, -}; -ChannelBindings.properties.mqtt = MqttChannelBinding; -const MqttServerBindingLastWill = { - properties: { - topic: { type: 'string' }, - qos: { type: 'integer' }, - message: { type: 'string' }, - retain: { type: 'boolean' }, - }, -}; -const MqttServerBinding = { - properties: { - clientId: { type: 'string' }, - cleanSession: { type: 'boolean' }, - lastWill: 'MqttServerBindingLastWill', - keepAlive: { type: 'integer' }, - bindingVersion: { type: 'string' }, - }, -}; -ServerBindings.properties.mqtt = MqttServerBinding; -const MqttMessageBinding = { - properties: { - bindingVersion: { type: 'string' }, - }, -}; -MessageBindings.properties.mqtt = MqttMessageBinding; -const MqttOperationBinding = { - properties: { - qos: { type: 'integer' }, - retain: { type: 'boolean' }, - bindingVersion: { type: 'string' }, - }, -}; -OperationBindings.properties.mqtt = MqttOperationBinding; -// mqtt5 -const Mqtt5ChannelBinding = { - properties: {}, // empty object -}; -ChannelBindings.properties.mqtt5 = Mqtt5ChannelBinding; -const Mqtt5ServerBinding = { - properties: {}, // empty object -}; -ServerBindings.properties.mqtt5 = Mqtt5ServerBinding; -const Mqtt5MessageBinding = { - properties: {}, // empty object -}; -MessageBindings.properties.mqtt5 = Mqtt5MessageBinding; -const Mqtt5OperationBinding = { - properties: {}, // empty object -}; -OperationBindings.properties.mqtt5 = Mqtt5OperationBinding; -// nats -const NatsChannelBinding = { - properties: {}, // empty object -}; -ChannelBindings.properties.nats = NatsChannelBinding; -const NatsServerBinding = { - properties: {}, // empty object -}; -ServerBindings.properties.nats = NatsServerBinding; -const NatsMessageBinding = { - properties: {}, // empty object -}; -MessageBindings.properties.nats = NatsMessageBinding; -const NatsOperationBinding = { - properties: { - queue: { type: 'string' }, - bindingVersion: { type: 'string' }, - }, -}; -OperationBindings.properties.nats = NatsOperationBinding; -// jms -const JmsChannelBinding = { - properties: { - destination: { type: 'string' }, - destinationType: { type: 'string' }, - bindingVersion: { type: 'string' }, - }, -}; -ChannelBindings.properties.jms = JmsChannelBinding; -const JmsServerBinding = { - properties: {}, // empty object -}; -ServerBindings.properties.jms = JmsServerBinding; -const JmsMessageBinding = { - properties: { - headers: 'Schema', - bindingVersion: { type: 'string' }, - }, -}; -MessageBindings.properties.jms = JmsMessageBinding; -const JmsOperationBinding = { - properties: { - headers: 'Schema', - bindingVersion: { type: 'string' }, - }, -}; -OperationBindings.properties.jms = JmsOperationBinding; -// sns -// solace -const SolaceChannelBinding = { - properties: {}, // empty object -}; -ChannelBindings.properties.solace = SolaceChannelBinding; -const SolaceServerBinding = { - properties: { - bindingVersion: { type: 'string' }, - msgVpn: { type: 'string' }, - }, -}; -ServerBindings.properties.solace = SolaceServerBinding; -const SolaceMessageBinding = { - properties: {}, // empty object -}; -MessageBindings.properties.solace = SolaceMessageBinding; -const SolaceDestination = { - properties: { - destinationType: { type: 'string', enum: ['queue', 'topic'] }, - deliveryMode: { type: 'string', enum: ['direct', 'persistent'] }, - 'queue.name': { type: 'string' }, - 'queue.topicSubscriptions': { type: 'array', items: { type: 'string' } }, - 'queue.accessType': { type: 'string', enum: ['exclusive', 'nonexclusive'] }, - 'queue.maxMsgSpoolSize': { type: 'string' }, - 'queue.maxTtl': { type: 'string' }, - 'topic.topicSubscriptions': { type: 'array', items: { type: 'string' } }, - }, -}; -const SolaceOperationBinding = { - properties: { - bindingVersion: { type: 'string' }, - destinations: (0, _1.listOf)('SolaceDestination'), - }, -}; -OperationBindings.properties.solace = SolaceOperationBinding; -// sqs -// stomp -const StompChannelBinding = { - properties: {}, // empty object -}; -ChannelBindings.properties.stomp = StompChannelBinding; -const StompServerBinding = { - properties: {}, // empty object -}; -ServerBindings.properties.stomp = StompServerBinding; -const StompMessageBinding = { - properties: {}, // empty object -}; -MessageBindings.properties.stomp = StompMessageBinding; -const StompOperationBinding = { - properties: {}, // empty object -}; -OperationBindings.properties.stomp = StompOperationBinding; -// redis -const RedisChannelBinding = { - properties: {}, // empty object -}; -ChannelBindings.properties.redis = RedisChannelBinding; -const RedisServerBinding = { - properties: {}, // empty object -}; -ServerBindings.properties.redis = RedisServerBinding; -const RedisMessageBinding = { - properties: {}, // empty object -}; -MessageBindings.properties.redis = RedisMessageBinding; -const RedisOperationBinding = { - properties: {}, // empty object -}; -OperationBindings.properties.redis = RedisOperationBinding; -// mercure -const MercureChannelBinding = { - properties: {}, // empty object -}; -ChannelBindings.properties.mercure = MercureChannelBinding; -const MercureServerBinding = { - properties: {}, // empty object -}; -ServerBindings.properties.mercure = MercureServerBinding; -const MercureMessageBinding = { - properties: {}, // empty object -}; -MessageBindings.properties.mercure = MercureMessageBinding; -const MercureOperationBinding = { - properties: {}, // empty object -}; -OperationBindings.properties.mercure = MercureOperationBinding; -// ibmmq -// googlepubsub -// pulsar -// --- End per-protocol node types -exports.AsyncApi2Bindings = { - HttpServerBinding, - HttpChannelBinding, - HttpMessageBinding, - HttpOperationBinding, - WsServerBinding, - WsChannelBinding, - WsMessageBinding, - WsOperationBinding, - KafkaServerBinding, - KafkaTopicConfiguration, - KafkaChannelBinding, - KafkaMessageBinding, - KafkaOperationBinding, - AnypointmqServerBinding, - AnypointmqChannelBinding, - AnypointmqMessageBinding, - AnypointmqOperationBinding, - AmqpServerBinding, - AmqpChannelBinding, - AmqpMessageBinding, - AmqpOperationBinding, - Amqp1ServerBinding, - Amqp1ChannelBinding, - Amqp1MessageBinding, - Amqp1OperationBinding, - MqttServerBindingLastWill, - MqttServerBinding, - MqttChannelBinding, - MqttMessageBinding, - MqttOperationBinding, - Mqtt5ServerBinding, - Mqtt5ChannelBinding, - Mqtt5MessageBinding, - Mqtt5OperationBinding, - NatsServerBinding, - NatsChannelBinding, - NatsMessageBinding, - NatsOperationBinding, - JmsServerBinding, - JmsChannelBinding, - JmsMessageBinding, - JmsOperationBinding, - SolaceServerBinding, - SolaceChannelBinding, - SolaceMessageBinding, - SolaceDestination, - SolaceOperationBinding, - StompServerBinding, - StompChannelBinding, - StompMessageBinding, - StompOperationBinding, - RedisServerBinding, - RedisChannelBinding, - RedisMessageBinding, - RedisOperationBinding, - MercureServerBinding, - MercureChannelBinding, - MercureMessageBinding, - MercureOperationBinding, - ServerBindings, - ChannelBindings, - MessageBindings, - OperationBindings, -}; -exports.AsyncApi2Types = { - ...exports.AsyncApi2Bindings, - Root, - Tag: exports.Tag, - TagList: (0, _1.listOf)('Tag'), - ServerMap: exports.ServerMap, - ExternalDocs: exports.ExternalDocs, - Server, - ServerVariable: exports.ServerVariable, - ServerVariablesMap: (0, _1.mapOf)('ServerVariable'), - SecurityRequirement, - SecurityRequirementList: (0, _1.listOf)('SecurityRequirement'), - Info, - Contact: exports.Contact, - License: exports.License, - ChannelMap, - Channel, - Parameter, - ParametersMap: (0, _1.mapOf)('Parameter'), - Operation, - Schema: exports.Schema, - MessageExample: exports.MessageExample, - SchemaProperties: exports.SchemaProperties, - DiscriminatorMapping: exports.DiscriminatorMapping, - Discriminator: exports.Discriminator, - Components, - NamedSchemas: (0, _1.mapOf)('Schema'), - NamedMessages: (0, _1.mapOf)('Message'), - NamedMessageTraits: (0, _1.mapOf)('MessageTrait'), - NamedOperationTraits: (0, _1.mapOf)('OperationTrait'), - NamedParameters: (0, _1.mapOf)('Parameter'), - NamedSecuritySchemes: (0, _1.mapOf)('SecurityScheme'), - NamedCorrelationIds: (0, _1.mapOf)('CorrelationId'), - ImplicitFlow, - PasswordFlow, - ClientCredentials, - AuthorizationCode, - SecuritySchemeFlows: exports.SecuritySchemeFlows, - SecurityScheme, - Message, - MessageBindings, - OperationBindings, - OperationTrait, - OperationTraitList: (0, _1.listOf)('OperationTrait'), - MessageTrait, - MessageTraitList: (0, _1.listOf)('MessageTrait'), - MessageExampleList: (0, _1.listOf)('MessageExample'), - CorrelationId: exports.CorrelationId, - Dependencies: exports.Dependencies, -}; - - -/***/ }), - -/***/ 4832: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AsyncApi3Types = void 0; -const _1 = __nccwpck_require__(14143); -const asyncapi2_1 = __nccwpck_require__(32311); -const Root = { - properties: { - asyncapi: { type: 'string', enum: ['3.0.0'] }, - info: 'Info', - id: { type: 'string' }, - servers: 'ServerMap', - channels: 'NamedChannels', - components: 'Components', - operations: 'NamedOperations', - defaultContentType: { type: 'string' }, - }, - required: ['asyncapi', 'info'], -}; -const Channel = { - properties: { - address: { type: 'string' }, - messages: 'NamedMessages', - title: { type: 'string' }, - summary: { type: 'string' }, - description: { type: 'string' }, - servers: 'ServerList', - parameters: 'ParametersMap', - bindings: 'ChannelBindings', - tags: 'TagList', - externalDocs: 'ExternalDocs', - }, -}; -const Server = { - properties: { - host: { type: 'string' }, - pathname: { type: 'string' }, - protocol: { type: 'string' }, - protocolVersion: { type: 'string' }, - description: { type: 'string' }, - variables: 'ServerVariablesMap', - security: 'SecuritySchemeList', - bindings: 'ServerBindings', - externalDocs: 'ExternalDocs', - tags: 'TagList', - }, - required: ['host', 'protocol'], -}; -const Info = { - properties: { - title: { type: 'string' }, - version: { type: 'string' }, - description: { type: 'string' }, - termsOfService: { type: 'string' }, - contact: 'Contact', - license: 'License', - tags: 'TagList', - externalDocs: 'ExternalDocs', - }, - required: ['title', 'version'], -}; -const Parameter = { - properties: { - description: { type: 'string' }, - enum: { type: 'array', items: { type: 'string' } }, - default: { type: 'string' }, - examples: { type: 'array', items: { type: 'string' } }, - location: { type: 'string' }, - }, -}; -const Message = { - properties: { - headers: 'Schema', - payload: (value) => { - if (!!value && value?.['schemaFormat']) { - return { - properties: { - schema: 'Schema', - schemaFormat: { type: 'string' }, - }, - required: ['schema', 'schemaFormat'], - }; - } - else { - return 'Schema'; - } - }, - correlationId: 'CorrelationId', - contentType: { type: 'string' }, - name: { type: 'string' }, - title: { type: 'string' }, - summary: { type: 'string' }, - description: { type: 'string' }, - tags: 'TagList', - externalDocs: 'ExternalDocs', - bindings: 'MessageBindings', - examples: 'MessageExampleList', - traits: 'MessageTraitList', - }, - additionalProperties: {}, -}; -const OperationTrait = { - properties: { - tags: 'TagList', - title: { type: 'string' }, - summary: { type: 'string' }, - description: { type: 'string' }, - externalDocs: 'ExternalDocs', - security: 'SecuritySchemeList', - bindings: 'OperationBindings', - }, - required: [], -}; -const MessageTrait = { - properties: { - headers: (value) => { - if (typeof value === 'function' || (typeof value === 'object' && !!value)) { - return { - properties: { - schema: 'Schema', - schemaFormat: { type: 'string' }, - }, - }; - } - else { - return 'Schema'; - } - }, - correlationId: 'CorrelationId', - contentType: { type: 'string' }, - name: { type: 'string' }, - title: { type: 'string' }, - summary: { type: 'string' }, - description: { type: 'string' }, - tags: 'TagList', - externalDocs: 'ExternalDocs', - bindings: 'MessageBindings', - examples: 'MessageExampleList', - }, - additionalProperties: {}, -}; -const Operation = { - properties: { - action: { type: 'string', enum: ['send', 'receive'] }, - channel: 'Channel', - title: { type: 'string' }, - tags: 'TagList', - summary: { type: 'string' }, - description: { type: 'string' }, - externalDocs: 'ExternalDocs', - operationId: { type: 'string' }, - security: 'SecuritySchemeList', - bindings: 'OperationBindings', - traits: 'OperationTraitList', - messages: 'MessageList', - reply: 'OperationReply', - }, - required: ['action', 'channel'], -}; -const OperationReply = { - properties: { - channel: 'Channel', - messages: 'MessageList', - address: 'OperationReplyAddress', - }, -}; -const OperationReplyAddress = { - properties: { - location: { type: 'string' }, - description: { type: 'string' }, - }, - required: ['location'], -}; -const Components = { - properties: { - messages: 'NamedMessages', - parameters: 'NamedParameters', - schemas: 'NamedSchemas', - replies: 'NamedOperationReplies', - replyAddresses: 'NamedOperationRelyAddresses', - correlationIds: 'NamedCorrelationIds', - messageTraits: 'NamedMessageTraits', - operationTraits: 'NamedOperationTraits', - tags: 'NamedTags', - externalDocs: 'NamedExternalDocs', - securitySchemes: 'NamedSecuritySchemes', - servers: 'ServerMap', - serverVariables: 'ServerVariablesMap', - channels: 'NamedChannels', - operations: 'NamedOperations', - serverBindings: 'ServerBindings', - channelBindings: 'ChannelBindings', - operationBindings: 'OperationBindings', - messageBindings: 'MessageBindings', - }, -}; -const ImplicitFlow = { - properties: { - refreshUrl: { type: 'string' }, - availableScopes: { type: 'object', additionalProperties: { type: 'string' } }, - authorizationUrl: { type: 'string' }, - }, - required: ['authorizationUrl', 'availableScopes'], -}; -const PasswordFlow = { - properties: { - refreshUrl: { type: 'string' }, - availableScopes: { type: 'object', additionalProperties: { type: 'string' } }, - tokenUrl: { type: 'string' }, - }, - required: ['tokenUrl', 'availableScopes'], -}; -const ClientCredentials = { - properties: { - refreshUrl: { type: 'string' }, - availableScopes: { type: 'object', additionalProperties: { type: 'string' } }, - tokenUrl: { type: 'string' }, - }, - required: ['tokenUrl', 'availableScopes'], -}; -const AuthorizationCode = { - properties: { - refreshUrl: { type: 'string' }, - authorizationUrl: { type: 'string' }, - availableScopes: { type: 'object', additionalProperties: { type: 'string' } }, - tokenUrl: { type: 'string' }, - }, - required: ['authorizationUrl', 'tokenUrl', 'availableScopes'], -}; -const SecurityScheme = { - properties: { - type: { - enum: [ - 'userPassword', - 'apiKey', - 'X509', - 'symmetricEncryption', - 'asymmetricEncryption', - 'httpApiKey', - 'http', - 'oauth2', - 'openIdConnect', - 'plain', - 'scramSha256', - 'scramSha512', - 'gssapi', - ], - }, - description: { type: 'string' }, - name: { type: 'string' }, - in: { type: 'string', enum: ['query', 'header', 'cookie', 'user', 'password'] }, - scheme: { type: 'string' }, - bearerFormat: { type: 'string' }, - flows: 'SecuritySchemeFlows', - openIdConnectUrl: { type: 'string' }, - scopes: { type: 'array', items: { type: 'string' } }, - }, - required(value) { - switch (value?.type) { - case 'apiKey': - return ['type', 'in']; - case 'httpApiKey': - return ['type', 'name', 'in']; - case 'http': - return ['type', 'scheme']; - case 'oauth2': - return ['type', 'flows']; - case 'openIdConnect': - return ['type', 'openIdConnectUrl']; - default: - return ['type']; - } - }, - allowed(value) { - switch (value?.type) { - case 'apiKey': - return ['type', 'in', 'description']; - case 'httpApiKey': - return ['type', 'name', 'in', 'description']; - case 'http': - return ['type', 'scheme', 'bearerFormat', 'description']; - case 'oauth2': - return ['type', 'flows', 'description', 'scopes']; - case 'openIdConnect': - return ['type', 'openIdConnectUrl', 'description', 'scopes']; - default: - return ['type', 'description']; - } - }, - extensionsPrefix: 'x-', -}; -exports.AsyncApi3Types = { - // from asyncapi2 - ...asyncapi2_1.AsyncApi2Bindings, - CorrelationId: asyncapi2_1.CorrelationId, - SecuritySchemeFlows: asyncapi2_1.SecuritySchemeFlows, - ServerVariable: asyncapi2_1.ServerVariable, - Contact: asyncapi2_1.Contact, - License: asyncapi2_1.License, - MessageExample: asyncapi2_1.MessageExample, - Tag: asyncapi2_1.Tag, - Dependencies: asyncapi2_1.Dependencies, - Schema: asyncapi2_1.Schema, - Discriminator: asyncapi2_1.Discriminator, - DiscriminatorMapping: asyncapi2_1.DiscriminatorMapping, - SchemaProperties: asyncapi2_1.SchemaProperties, - ServerMap: asyncapi2_1.ServerMap, - ExternalDocs: asyncapi2_1.ExternalDocs, - Root, - Channel, - Parameter, - Info, - Server, - MessageTrait, - Operation, - OperationReply, - OperationReplyAddress, - Components, - ImplicitFlow, - PasswordFlow, - ClientCredentials, - AuthorizationCode, - SecurityScheme, - Message, - OperationTrait, - ServerVariablesMap: (0, _1.mapOf)('ServerVariable'), - NamedTags: (0, _1.mapOf)('Tag'), - NamedExternalDocs: (0, _1.mapOf)('ExternalDocs'), - NamedChannels: (0, _1.mapOf)('Channel'), - ParametersMap: (0, _1.mapOf)('Parameter'), - NamedOperations: (0, _1.mapOf)('Operation'), - NamedOperationReplies: (0, _1.mapOf)('OperationReply'), - NamedOperationRelyAddresses: (0, _1.mapOf)('OperationReplyAddress'), - NamedSchemas: (0, _1.mapOf)('Schema'), - NamedMessages: (0, _1.mapOf)('Message'), - NamedMessageTraits: (0, _1.mapOf)('MessageTrait'), - NamedOperationTraits: (0, _1.mapOf)('OperationTrait'), - NamedParameters: (0, _1.mapOf)('Parameter'), - NamedSecuritySchemes: (0, _1.mapOf)('SecurityScheme'), - NamedCorrelationIds: (0, _1.mapOf)('CorrelationId'), - ServerList: (0, _1.listOf)('Server'), - SecuritySchemeList: (0, _1.listOf)('SecurityScheme'), - MessageList: (0, _1.listOf)('Message'), - OperationTraitList: (0, _1.listOf)('OperationTrait'), - MessageTraitList: (0, _1.listOf)('MessageTrait'), - MessageExampleList: (0, _1.listOf)('MessageExample'), - TagList: (0, _1.listOf)('Tag'), -}; - - -/***/ }), - -/***/ 14143: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SpecExtension = void 0; -exports.listOf = listOf; -exports.mapOf = mapOf; -exports.normalizeTypes = normalizeTypes; -exports.isNamedType = isNamedType; -function listOf(typeName) { - return { - name: `${typeName}List`, - properties: {}, - items: typeName, - }; -} -function mapOf(typeName) { - return { - name: `${typeName}Map`, - properties: {}, - additionalProperties: () => typeName, - }; -} -exports.SpecExtension = { - name: 'SpecExtension', - properties: {}, - // skip validation of additional properties for unknown extensions - additionalProperties: { resolvable: true }, -}; -function normalizeTypes(types, options = {}) { - const normalizedTypes = {}; - for (const typeName of Object.keys(types)) { - normalizedTypes[typeName] = { - ...types[typeName], - name: typeName, - }; - } - for (const type of Object.values(normalizedTypes)) { - normalizeType(type); - } - // all type trees have a SpecExtension type by default - normalizedTypes['SpecExtension'] = exports.SpecExtension; - return normalizedTypes; - function normalizeType(type) { - if (type.additionalProperties) { - type.additionalProperties = resolveType(type.additionalProperties); - } - if (type.items) { - type.items = resolveType(type.items); - } - if (type.properties) { - const mappedProps = {}; - for (const [propName, prop] of Object.entries(type.properties)) { - mappedProps[propName] = resolveType(prop); - if (options.doNotResolveExamples && prop && prop.isExample) { - mappedProps[propName] = { - ...prop, - resolvable: false, - }; - } - } - type.properties = mappedProps; - } - } - // typings are painful here... - function resolveType(type) { - if (typeof type === 'string') { - if (!normalizedTypes[type]) { - throw new Error(`Unknown type name found: ${type}`); - } - return normalizedTypes[type]; - } - else if (typeof type === 'function') { - return (value, key) => { - return resolveType(type(value, key)); - }; - } - else if (type && type.name) { - type = { ...type }; - normalizeType(type); - return type; - } - else if (type && type.directResolveAs) { - return { - ...type, - directResolveAs: resolveType(type.directResolveAs), - }; - } - else { - return type; - } - } -} -function isNamedType(t) { - return typeof t?.name === 'string'; -} - - -/***/ }), - -/***/ 85574: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// For internal usage only -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getNodeTypesFromJSONSchema = getNodeTypesFromJSONSchema; -const _2020_1 = __nccwpck_require__(63835); -const utils_1 = __nccwpck_require__(75450); -const ajv = new _2020_1.default({ - strictSchema: false, - allowUnionTypes: true, - useDefaults: true, - allErrors: true, - discriminator: true, - strictTypes: false, - verbose: true, -}); -function findOneOf(schemaOneOf, oneOfs) { - if (oneOfs.some((option) => typeof option === 'function')) { - throw new Error('Unexpected oneOf inside oneOf.'); - } - return (value) => { - let index = schemaOneOf.findIndex((option) => ajv.validate(option, value)); - if (index === -1) { - index = 0; - } - return oneOfs[index]; - }; -} -function transformJSONSchemaToNodeType(propertyName, schema, ctx) { - if (!schema || typeof schema === 'boolean') { - throw new Error(`Unexpected schema in ${propertyName}.`); - } - if (schema instanceof Array) { - throw new Error(`Unexpected array schema in ${propertyName}. Try using oneOf instead.`); - } - if (schema.type === 'null') { - throw new Error(`Unexpected null schema type in ${propertyName} schema.`); - } - if (schema.type instanceof Array) { - throw new Error(`Unexpected array schema type in ${propertyName} schema. Try using oneOf instead.`); - } - if (schema.type === 'string' || - schema.type === 'number' || - schema.type === 'integer' || - schema.type === 'boolean') { - const { default: _, format: _format, ...rest } = schema; - return rest; - } - if (schema.type === 'object' && !schema.properties && !schema.oneOf) { - if (schema.additionalProperties === undefined || schema.additionalProperties === true) { - return { type: 'object' }; - } - else if (schema.additionalProperties === false) { - return { type: 'object', properties: {} }; - } - } - if (schema.allOf) { - throw new Error(`Unexpected allOf in ${propertyName}.`); - } - if (schema.anyOf) { - throw new Error(`Unexpected anyOf in ${propertyName}.`); - } - if ((0, utils_1.isPlainObject)(schema.properties) || - (0, utils_1.isPlainObject)(schema.additionalProperties) || - ((0, utils_1.isPlainObject)(schema.items) && - ((0, utils_1.isPlainObject)(schema.items.properties) || - (0, utils_1.isPlainObject)(schema.items.additionalProperties) || - schema.items.oneOf)) // exclude scalar array types - ) { - return extractNodeToContext(propertyName, schema, ctx); - } - if (schema.oneOf) { - if (schema.discriminator) { - const discriminatedPropertyName = schema.discriminator?.propertyName; - if (!discriminatedPropertyName) { - throw new Error(`Unexpected discriminator without a propertyName in ${propertyName}.`); - } - const oneOfs = schema.oneOf.map((option, i) => { - if (typeof option === 'boolean') { - throw new Error(`Unexpected boolean schema in ${propertyName} at position ${i} in oneOf.`); - } - const discriminatedProperty = option?.properties?.[discriminatedPropertyName]; - if (!discriminatedProperty || typeof discriminatedProperty === 'boolean') { - throw new Error(`Unexpected property '${discriminatedProperty}' schema in ${propertyName} at position ${i} in oneOf.`); - } - const name = discriminatedProperty.const; - return transformJSONSchemaToNodeType(name, option, ctx); - }); - return (value, key) => { - if ((0, utils_1.isPlainObject)(value)) { - const discriminatedTypeName = value[discriminatedPropertyName]; - if (typeof discriminatedTypeName === 'string' && ctx[discriminatedTypeName]) { - return discriminatedTypeName; - } - } - return findOneOf(schema.oneOf, oneOfs)(value, key); - }; - } - else { - const oneOfs = schema.oneOf.map((option, i) => transformJSONSchemaToNodeType(propertyName + '_' + i, option, ctx)); - return findOneOf(schema.oneOf, oneOfs); - } - } - return schema; -} -function extractNodeToContext(propertyName, schema, ctx) { - if (!schema || typeof schema === 'boolean') { - throw new Error(`Unexpected schema in ${propertyName}.`); - } - if (schema instanceof Array) { - throw new Error(`Unexpected array schema in ${propertyName}. Try using oneOf instead.`); - } - if (schema.type === 'null') { - throw new Error(`Unexpected null schema type in ${propertyName} schema.`); - } - if (schema.type instanceof Array) { - throw new Error(`Unexpected array schema type in ${propertyName} schema. Try using oneOf instead.`); - } - const properties = {}; - for (const [name, property] of Object.entries(schema.properties || {})) { - properties[name] = transformJSONSchemaToNodeType(propertyName + '.' + name, property, ctx); - } - let additionalProperties; - if ((0, utils_1.isPlainObject)(schema.additionalProperties)) { - additionalProperties = transformJSONSchemaToNodeType(propertyName + '_additionalProperties', schema.additionalProperties, ctx); - } - if (schema.additionalProperties === true) { - additionalProperties = {}; - } - let items; - if ((0, utils_1.isPlainObject)(schema.items) && - ((0, utils_1.isPlainObject)(schema.items.properties) || - (0, utils_1.isPlainObject)(schema.items.additionalProperties) || - schema.items.oneOf) // exclude scalar array types - ) { - items = transformJSONSchemaToNodeType(propertyName + '_items', schema.items, ctx); - } - let required = schema.required; - // Translate required in oneOfs into a ResolveTypeFn. - if (schema.oneOf && schema.oneOf.every((option) => !!option.required)) { - required = (value) => { - const requiredList = schema.oneOf.map((option) => [ - ...(schema.required || []), - ...option.required, - ]); - let index = requiredList.findIndex((r) => r.every((requiredProp) => value[requiredProp] !== undefined)); - if (index === -1) { - index = 0; - } - return requiredList[index]; - }; - } - ctx[propertyName] = { properties, additionalProperties, items, required }; - return propertyName; -} -function getNodeTypesFromJSONSchema(schemaName, entrySchema) { - const ctx = {}; - transformJSONSchemaToNodeType(schemaName, entrySchema, ctx); - return ctx; -} - - -/***/ }), - -/***/ 23289: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Oas2Types = void 0; -const _1 = __nccwpck_require__(14143); -const responseCodeRegexp = /^[0-9][0-9Xx]{2}$/; -const Root = { - properties: { - swagger: { type: 'string' }, - info: 'Info', - host: { type: 'string' }, - basePath: { type: 'string' }, - schemes: { type: 'array', items: { type: 'string' } }, - consumes: { type: 'array', items: { type: 'string' } }, - produces: { type: 'array', items: { type: 'string' } }, - paths: 'Paths', - definitions: 'NamedSchemas', - parameters: 'NamedParameters', - responses: 'NamedResponses', - securityDefinitions: 'NamedSecuritySchemes', - security: 'SecurityRequirementList', - tags: 'TagList', - externalDocs: 'ExternalDocs', - 'x-servers': 'XServerList', - 'x-tagGroups': 'TagGroups', - 'x-ignoredHeaderParameters': { type: 'array', items: { type: 'string' } }, - }, - required: ['swagger', 'paths', 'info'], - extensionsPrefix: 'x-', -}; -const Info = { - properties: { - title: { type: 'string' }, - description: { type: 'string' }, - termsOfService: { type: 'string' }, - contact: 'Contact', - license: 'License', - version: { type: 'string' }, - 'x-logo': 'Logo', - }, - required: ['title', 'version'], - extensionsPrefix: 'x-', -}; -const Logo = { - properties: { - url: { type: 'string' }, - altText: { type: 'string' }, - backgroundColor: { type: 'string' }, - href: { type: 'string' }, - }, - extensionsPrefix: 'x-', -}; -const Contact = { - properties: { - name: { type: 'string' }, - url: { type: 'string' }, - email: { type: 'string' }, - }, - extensionsPrefix: 'x-', -}; -const License = { - properties: { - name: { type: 'string' }, - url: { type: 'string' }, - }, - required: ['name'], - extensionsPrefix: 'x-', -}; -const Paths = { - properties: {}, - additionalProperties: (_value, key) => key.startsWith('/') ? 'PathItem' : undefined, -}; -const PathItem = { - properties: { - $ref: { type: 'string' }, // TODO: verify special $ref handling for Path Item - parameters: 'ParameterList', - get: 'Operation', - put: 'Operation', - post: 'Operation', - delete: 'Operation', - options: 'Operation', - head: 'Operation', - patch: 'Operation', - }, - extensionsPrefix: 'x-', -}; -const Operation = { - properties: { - tags: { type: 'array', items: { type: 'string' } }, - summary: { type: 'string' }, - description: { type: 'string' }, - externalDocs: 'ExternalDocs', - operationId: { type: 'string' }, - consumes: { type: 'array', items: { type: 'string' } }, - produces: { type: 'array', items: { type: 'string' } }, - parameters: 'ParameterList', - responses: 'Responses', - schemes: { type: 'array', items: { type: 'string' } }, - deprecated: { type: 'boolean' }, - security: 'SecurityRequirementList', - 'x-codeSamples': 'XCodeSampleList', - 'x-code-samples': 'XCodeSampleList', // deprecated - 'x-hideTryItPanel': { type: 'boolean' }, - }, - required: ['responses'], - extensionsPrefix: 'x-', -}; -const XCodeSample = { - properties: { - lang: { type: 'string' }, - label: { type: 'string' }, - source: { type: 'string' }, - }, -}; -const XServer = { - properties: { - url: { type: 'string' }, - description: { type: 'string' }, - }, - required: ['url'], -}; -const ExternalDocs = { - properties: { - description: { type: 'string' }, - url: { type: 'string' }, - }, - required: ['url'], - extensionsPrefix: 'x-', -}; -const Parameter = { - properties: { - name: { type: 'string' }, - in: { type: 'string', enum: ['query', 'header', 'path', 'formData', 'body'] }, - description: { type: 'string' }, - required: { type: 'boolean' }, - schema: 'Schema', - type: { type: 'string', enum: ['string', 'number', 'integer', 'boolean', 'array', 'file'] }, - format: { type: 'string' }, - allowEmptyValue: { type: 'boolean' }, - items: 'ParameterItems', - collectionFormat: { type: 'string', enum: ['csv', 'ssv', 'tsv', 'pipes', 'multi'] }, - default: null, - maximum: { type: 'integer' }, - exclusiveMaximum: { type: 'boolean' }, - minimum: { type: 'integer' }, - exclusiveMinimum: { type: 'boolean' }, - maxLength: { type: 'integer' }, - minLength: { type: 'integer' }, - pattern: { type: 'string' }, - maxItems: { type: 'integer' }, - minItems: { type: 'integer' }, - uniqueItems: { type: 'boolean' }, - enum: { type: 'array' }, - multipleOf: { type: 'number' }, - 'x-example': {}, // any - 'x-examples': 'ExamplesMap', - }, - required(value) { - if (!value || !value.in) { - return ['name', 'in']; - } - if (value.in === 'body') { - return ['name', 'in', 'schema']; - } - else { - if (value.type === 'array') { - return ['name', 'in', 'type', 'items']; - } - else { - return ['name', 'in', 'type']; - } - } - }, - extensionsPrefix: 'x-', -}; -const ParameterItems = { - properties: { - type: { type: 'string', enum: ['string', 'number', 'integer', 'boolean', 'array'] }, - format: { type: 'string' }, - items: 'ParameterItems', - collectionFormat: { type: 'string', enum: ['csv', 'ssv', 'tsv', 'pipes', 'multi'] }, - default: null, - maximum: { type: 'integer' }, - exclusiveMaximum: { type: 'boolean' }, - minimum: { type: 'integer' }, - exclusiveMinimum: { type: 'boolean' }, - maxLength: { type: 'integer' }, - minLength: { type: 'integer' }, - pattern: { type: 'string' }, - maxItems: { type: 'integer' }, - minItems: { type: 'integer' }, - uniqueItems: { type: 'boolean' }, - enum: { type: 'array' }, - multipleOf: { type: 'number' }, - }, - required(value) { - if (value && value.type === 'array') { - return ['type', 'items']; - } - else { - return ['type']; - } - }, - extensionsPrefix: 'x-', -}; -const Responses = { - properties: { - default: 'Response', - }, - additionalProperties: (_v, key) => responseCodeRegexp.test(key) ? 'Response' : undefined, -}; -const Response = { - properties: { - description: { type: 'string' }, - schema: 'Schema', - headers: (0, _1.mapOf)('Header'), - examples: 'Examples', - 'x-summary': { type: 'string' }, - }, - required: ['description'], - extensionsPrefix: 'x-', -}; -const Examples = { - properties: {}, - additionalProperties: { isExample: true }, -}; -const Header = { - properties: { - description: { type: 'string' }, - type: { type: 'string', enum: ['string', 'number', 'integer', 'boolean', 'array'] }, - format: { type: 'string' }, - items: 'ParameterItems', - collectionFormat: { type: 'string', enum: ['csv', 'ssv', 'tsv', 'pipes', 'multi'] }, - default: null, - maximum: { type: 'integer' }, - exclusiveMaximum: { type: 'boolean' }, - minimum: { type: 'integer' }, - exclusiveMinimum: { type: 'boolean' }, - maxLength: { type: 'integer' }, - minLength: { type: 'integer' }, - pattern: { type: 'string' }, - maxItems: { type: 'integer' }, - minItems: { type: 'integer' }, - uniqueItems: { type: 'boolean' }, - enum: { type: 'array' }, - multipleOf: { type: 'number' }, - }, - required(value) { - if (value && value.type === 'array') { - return ['type', 'items']; - } - else { - return ['type']; - } - }, - extensionsPrefix: 'x-', -}; -const Tag = { - properties: { - name: { type: 'string' }, - description: { type: 'string' }, - externalDocs: 'ExternalDocs', - 'x-traitTag': { type: 'boolean' }, - 'x-displayName': { type: 'string' }, - }, - required: ['name'], - extensionsPrefix: 'x-', -}; -const TagGroup = { - properties: { - name: { type: 'string' }, - tags: { type: 'array', items: { type: 'string' } }, - }, -}; -const Schema = { - properties: { - format: { type: 'string' }, - title: { type: 'string' }, - description: { type: 'string' }, - default: null, - multipleOf: { type: 'number' }, - maximum: { type: 'number' }, - minimum: { type: 'number' }, - exclusiveMaximum: { type: 'boolean' }, - exclusiveMinimum: { type: 'boolean' }, - maxLength: { type: 'number' }, - minLength: { type: 'number' }, - pattern: { type: 'string' }, - maxItems: { type: 'number' }, - minItems: { type: 'number' }, - uniqueItems: { type: 'boolean' }, - maxProperties: { type: 'number' }, - minProperties: { type: 'number' }, - required: { type: 'array', items: { type: 'string' } }, - enum: { type: 'array' }, - type: { - type: 'string', - enum: ['object', 'array', 'string', 'number', 'integer', 'boolean', 'null'], - }, - items: (value) => { - if (Array.isArray(value)) { - return (0, _1.listOf)('Schema'); - } - else { - return 'Schema'; - } - }, - allOf: (0, _1.listOf)('Schema'), - properties: 'SchemaProperties', - additionalProperties: (value) => { - if (typeof value === 'boolean') { - return { type: 'boolean' }; - } - else { - return 'Schema'; - } - }, - discriminator: { type: 'string' }, - readOnly: { type: 'boolean' }, - xml: 'Xml', - externalDocs: 'ExternalDocs', - example: { isExample: true }, - 'x-tags': { type: 'array', items: { type: 'string' } }, - 'x-nullable': { type: 'boolean' }, - 'x-extendedDiscriminator': { type: 'string' }, - 'x-additionalPropertiesName': { type: 'string' }, - 'x-explicitMappingOnly': { type: 'boolean' }, - 'x-enumDescriptions': 'EnumDescriptions', - }, - extensionsPrefix: 'x-', -}; -const EnumDescriptions = { - properties: {}, - additionalProperties: { type: 'string' }, -}; -const SchemaProperties = { - properties: {}, - additionalProperties: 'Schema', -}; -const Xml = { - properties: { - name: { type: 'string' }, - namespace: { type: 'string' }, - prefix: { type: 'string' }, - attribute: { type: 'boolean' }, - wrapped: { type: 'boolean' }, - }, - extensionsPrefix: 'x-', -}; -const SecurityScheme = { - properties: { - type: { enum: ['basic', 'apiKey', 'oauth2'] }, - description: { type: 'string' }, - name: { type: 'string' }, - in: { type: 'string', enum: ['query', 'header'] }, - flow: { enum: ['implicit', 'password', 'application', 'accessCode'] }, - authorizationUrl: { type: 'string' }, - tokenUrl: { type: 'string' }, - scopes: { type: 'object', additionalProperties: { type: 'string' } }, - 'x-defaultClientId': { type: 'string' }, - }, - required(value) { - switch (value?.type) { - case 'apiKey': - return ['type', 'name', 'in']; - case 'oauth2': - switch (value?.flow) { - case 'implicit': - return ['type', 'flow', 'authorizationUrl', 'scopes']; - case 'accessCode': - return ['type', 'flow', 'authorizationUrl', 'tokenUrl', 'scopes']; - case 'application': - case 'password': - return ['type', 'flow', 'tokenUrl', 'scopes']; - default: - return ['type', 'flow', 'scopes']; - } - default: - return ['type']; - } - }, - allowed(value) { - switch (value?.type) { - case 'basic': - return ['type', 'description']; - case 'apiKey': - return ['type', 'name', 'in', 'description']; - case 'oauth2': - switch (value?.flow) { - case 'implicit': - return ['type', 'flow', 'authorizationUrl', 'description', 'scopes']; - case 'accessCode': - return ['type', 'flow', 'authorizationUrl', 'tokenUrl', 'description', 'scopes']; - case 'application': - case 'password': - return ['type', 'flow', 'tokenUrl', 'description', 'scopes']; - default: - return ['type', 'flow', 'tokenUrl', 'authorizationUrl', 'description', 'scopes']; - } - default: - return ['type', 'description']; - } - }, - extensionsPrefix: 'x-', -}; -const SecurityRequirement = { - properties: {}, - additionalProperties: { type: 'array', items: { type: 'string' } }, -}; -const Example = { - properties: { - value: { isExample: true }, - summary: { type: 'string' }, - description: { type: 'string' }, - externalValue: { type: 'string' }, - }, - extensionsPrefix: 'x-', -}; -exports.Oas2Types = { - Root, - Tag, - TagList: (0, _1.listOf)('Tag'), - TagGroups: (0, _1.listOf)('TagGroup'), - TagGroup, - ExternalDocs, - Example, - ExamplesMap: (0, _1.mapOf)('Example'), - EnumDescriptions, - SecurityRequirement, - SecurityRequirementList: (0, _1.listOf)('SecurityRequirement'), - Info, - Contact, - License, - Logo, - Paths, - PathItem, - Parameter, - ParameterItems, - ParameterList: (0, _1.listOf)('Parameter'), - Operation, - Examples, - Header, - Responses, - Response, - Schema, - Xml, - SchemaProperties, - NamedSchemas: (0, _1.mapOf)('Schema'), - NamedResponses: (0, _1.mapOf)('Response'), - NamedParameters: (0, _1.mapOf)('Parameter'), - NamedSecuritySchemes: (0, _1.mapOf)('SecurityScheme'), - SecurityScheme, - XCodeSample, - XCodeSampleList: (0, _1.listOf)('XCodeSample'), - XServerList: (0, _1.listOf)('XServer'), - XServer, -}; - - -/***/ }), - -/***/ 67296: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Oas3Types = exports.Discriminator = exports.DiscriminatorMapping = exports.Xml = exports.ExternalDocs = void 0; -const _1 = __nccwpck_require__(14143); -const ref_utils_1 = __nccwpck_require__(97977); -const responseCodeRegexp = /^[0-9][0-9Xx]{2}$/; -const Root = { - properties: { - openapi: null, - info: 'Info', - servers: 'ServerList', - security: 'SecurityRequirementList', - tags: 'TagList', - externalDocs: 'ExternalDocs', - paths: 'Paths', - components: 'Components', - 'x-webhooks': 'WebhooksMap', - 'x-tagGroups': 'TagGroups', - 'x-ignoredHeaderParameters': { type: 'array', items: { type: 'string' } }, - }, - required: ['openapi', 'paths', 'info'], - extensionsPrefix: 'x-', -}; -const Tag = { - properties: { - name: { type: 'string' }, - description: { type: 'string' }, - externalDocs: 'ExternalDocs', - 'x-traitTag': { type: 'boolean' }, - 'x-displayName': { type: 'string' }, - }, - required: ['name'], - extensionsPrefix: 'x-', -}; -const TagGroup = { - properties: { - name: { type: 'string' }, - tags: { type: 'array', items: { type: 'string' } }, - }, - extensionsPrefix: 'x-', -}; -exports.ExternalDocs = { - properties: { - description: { type: 'string' }, - url: { type: 'string' }, - }, - required: ['url'], - extensionsPrefix: 'x-', -}; -const Server = { - properties: { - url: { type: 'string' }, - description: { type: 'string' }, - variables: 'ServerVariablesMap', - }, - required: ['url'], - extensionsPrefix: 'x-', -}; -const ServerVariable = { - properties: { - enum: { - type: 'array', - items: { type: 'string' }, - }, - default: { type: 'string' }, - description: { type: 'string' }, - }, - required: ['default'], - extensionsPrefix: 'x-', -}; -const SecurityRequirement = { - properties: {}, - additionalProperties: { type: 'array', items: { type: 'string' } }, -}; -const Info = { - properties: { - title: { type: 'string' }, - version: { type: 'string' }, - description: { type: 'string' }, - termsOfService: { type: 'string' }, - contact: 'Contact', - license: 'License', - 'x-logo': 'Logo', - }, - required: ['title', 'version'], - extensionsPrefix: 'x-', -}; -const Logo = { - properties: { - url: { type: 'string' }, - altText: { type: 'string' }, - backgroundColor: { type: 'string' }, - href: { type: 'string' }, - }, -}; -const Contact = { - properties: { - name: { type: 'string' }, - url: { type: 'string' }, - email: { type: 'string' }, - }, - extensionsPrefix: 'x-', -}; -const License = { - properties: { - name: { type: 'string' }, - url: { type: 'string' }, - }, - required: ['name'], - extensionsPrefix: 'x-', -}; -const Paths = { - properties: {}, - additionalProperties: (_value, key) => key.startsWith('/') ? 'PathItem' : undefined, -}; -const WebhooksMap = { - properties: {}, - additionalProperties: () => 'PathItem', -}; -const PathItem = { - properties: { - $ref: { type: 'string' }, // TODO: verify special $ref handling for Path Item - servers: 'ServerList', - parameters: 'ParameterList', - summary: { type: 'string' }, - description: { type: 'string' }, - get: 'Operation', - put: 'Operation', - post: 'Operation', - delete: 'Operation', - options: 'Operation', - head: 'Operation', - patch: 'Operation', - trace: 'Operation', - }, - extensionsPrefix: 'x-', -}; -const Parameter = { - properties: { - name: { type: 'string' }, - in: { enum: ['query', 'header', 'path', 'cookie'] }, - description: { type: 'string' }, - required: { type: 'boolean' }, - deprecated: { type: 'boolean' }, - allowEmptyValue: { type: 'boolean' }, - style: { - enum: ['form', 'simple', 'label', 'matrix', 'spaceDelimited', 'pipeDelimited', 'deepObject'], - }, - explode: { type: 'boolean' }, - allowReserved: { type: 'boolean' }, - schema: 'Schema', - example: { isExample: true }, - examples: 'ExamplesMap', - content: 'MediaTypesMap', - }, - required: ['name', 'in'], - requiredOneOf: ['schema', 'content'], - extensionsPrefix: 'x-', -}; -const Operation = { - properties: { - tags: { - type: 'array', - items: { type: 'string' }, - }, - summary: { type: 'string' }, - description: { type: 'string' }, - externalDocs: 'ExternalDocs', - operationId: { type: 'string' }, - parameters: 'ParameterList', - security: 'SecurityRequirementList', - servers: 'ServerList', - requestBody: 'RequestBody', - responses: 'Responses', - deprecated: { type: 'boolean' }, - callbacks: 'CallbacksMap', - 'x-codeSamples': 'XCodeSampleList', - 'x-code-samples': 'XCodeSampleList', // deprecated - 'x-hideTryItPanel': { type: 'boolean' }, - }, - required: ['responses'], - extensionsPrefix: 'x-', -}; -const XCodeSample = { - properties: { - lang: { type: 'string' }, - label: { type: 'string' }, - source: { type: 'string' }, - }, -}; -const RequestBody = { - properties: { - description: { type: 'string' }, - required: { type: 'boolean' }, - content: 'MediaTypesMap', - }, - required: ['content'], - extensionsPrefix: 'x-', -}; -const MediaTypesMap = { - properties: {}, - additionalProperties: 'MediaType', -}; -const MediaType = { - properties: { - schema: 'Schema', - example: { isExample: true }, - examples: 'ExamplesMap', - encoding: 'EncodingMap', - }, - extensionsPrefix: 'x-', -}; -const Example = { - properties: { - value: { isExample: true }, - summary: { type: 'string' }, - description: { type: 'string' }, - externalValue: { type: 'string' }, - }, - extensionsPrefix: 'x-', -}; -const Encoding = { - properties: { - contentType: { type: 'string' }, - headers: 'HeadersMap', - style: { - enum: ['form', 'simple', 'label', 'matrix', 'spaceDelimited', 'pipeDelimited', 'deepObject'], - }, - explode: { type: 'boolean' }, - allowReserved: { type: 'boolean' }, - }, - extensionsPrefix: 'x-', -}; -const EnumDescriptions = { - properties: {}, - additionalProperties: { type: 'string' }, -}; -const Header = { - properties: { - description: { type: 'string' }, - required: { type: 'boolean' }, - deprecated: { type: 'boolean' }, - allowEmptyValue: { type: 'boolean' }, - style: { - enum: ['form', 'simple', 'label', 'matrix', 'spaceDelimited', 'pipeDelimited', 'deepObject'], - }, - explode: { type: 'boolean' }, - allowReserved: { type: 'boolean' }, - schema: 'Schema', - example: { isExample: true }, - examples: 'ExamplesMap', - content: 'MediaTypesMap', - }, - requiredOneOf: ['schema', 'content'], - extensionsPrefix: 'x-', -}; -const Responses = { - properties: { default: 'Response' }, - additionalProperties: (_v, key) => responseCodeRegexp.test(key) ? 'Response' : undefined, -}; -const Response = { - properties: { - description: { type: 'string' }, - headers: 'HeadersMap', - content: 'MediaTypesMap', - links: 'LinksMap', - 'x-summary': { type: 'string' }, - }, - required: ['description'], - extensionsPrefix: 'x-', -}; -const Link = { - properties: { - operationRef: { type: 'string' }, - operationId: { type: 'string' }, - parameters: null, // TODO: figure out how to describe/validate this - requestBody: null, // TODO: figure out how to describe/validate this - description: { type: 'string' }, - server: 'Server', - }, - extensionsPrefix: 'x-', -}; -const Schema = { - properties: { - externalDocs: 'ExternalDocs', - discriminator: 'Discriminator', - title: { type: 'string' }, - multipleOf: { type: 'number', minimum: 0 }, - maximum: { type: 'number' }, - minimum: { type: 'number' }, - exclusiveMaximum: { type: 'boolean' }, - exclusiveMinimum: { type: 'boolean' }, - maxLength: { type: 'integer', minimum: 0 }, - minLength: { type: 'integer', minimum: 0 }, - pattern: { type: 'string' }, - maxItems: { type: 'integer', minimum: 0 }, - minItems: { type: 'integer', minimum: 0 }, - uniqueItems: { type: 'boolean' }, - maxProperties: { type: 'integer', minimum: 0 }, - minProperties: { type: 'integer', minimum: 0 }, - required: { type: 'array', items: { type: 'string' } }, - enum: { type: 'array' }, - type: { - enum: ['object', 'array', 'string', 'number', 'integer', 'boolean'], - }, - allOf: (0, _1.listOf)('Schema'), - anyOf: (0, _1.listOf)('Schema'), - oneOf: (0, _1.listOf)('Schema'), - not: 'Schema', - properties: 'SchemaProperties', - items: (value) => { - if (Array.isArray(value)) { - return (0, _1.listOf)('Schema'); - } - else { - return 'Schema'; - } - }, - additionalProperties: (value) => { - if (typeof value === 'boolean') { - return { type: 'boolean' }; - } - else { - return 'Schema'; - } - }, - description: { type: 'string' }, - format: { type: 'string' }, - default: null, - nullable: { type: 'boolean' }, - readOnly: { type: 'boolean' }, - writeOnly: { type: 'boolean' }, - xml: 'Xml', - example: { isExample: true }, - deprecated: { type: 'boolean' }, - 'x-tags': { type: 'array', items: { type: 'string' } }, - 'x-additionalPropertiesName': { type: 'string' }, - 'x-explicitMappingOnly': { type: 'boolean' }, - }, - extensionsPrefix: 'x-', -}; -exports.Xml = { - properties: { - name: { type: 'string' }, - namespace: { type: 'string' }, - prefix: { type: 'string' }, - attribute: { type: 'boolean' }, - wrapped: { type: 'boolean' }, - }, - extensionsPrefix: 'x-', -}; -const SchemaProperties = { - properties: {}, - additionalProperties: 'Schema', -}; -exports.DiscriminatorMapping = { - properties: {}, - additionalProperties: (value) => { - if ((0, ref_utils_1.isMappingRef)(value)) { - return { type: 'string', directResolveAs: 'Schema' }; - } - else { - return { type: 'string' }; - } - }, -}; -exports.Discriminator = { - properties: { - propertyName: { type: 'string' }, - mapping: 'DiscriminatorMapping', - }, - required: ['propertyName'], - extensionsPrefix: 'x-', -}; -const Components = { - properties: { - parameters: 'NamedParameters', - schemas: 'NamedSchemas', - responses: 'NamedResponses', - examples: 'NamedExamples', - requestBodies: 'NamedRequestBodies', - headers: 'NamedHeaders', - securitySchemes: 'NamedSecuritySchemes', - links: 'NamedLinks', - callbacks: 'NamedCallbacks', - }, - extensionsPrefix: 'x-', -}; -const ImplicitFlow = { - properties: { - refreshUrl: { type: 'string' }, - scopes: { type: 'object', additionalProperties: { type: 'string' } }, // TODO: validate scopes - authorizationUrl: { type: 'string' }, - }, - required: ['authorizationUrl', 'scopes'], - extensionsPrefix: 'x-', -}; -const PasswordFlow = { - properties: { - refreshUrl: { type: 'string' }, - scopes: { type: 'object', additionalProperties: { type: 'string' } }, // TODO: validate scopes - tokenUrl: { type: 'string' }, - }, - required: ['tokenUrl', 'scopes'], - extensionsPrefix: 'x-', -}; -const ClientCredentials = { - properties: { - refreshUrl: { type: 'string' }, - scopes: { type: 'object', additionalProperties: { type: 'string' } }, // TODO: validate scopes - tokenUrl: { type: 'string' }, - }, - required: ['tokenUrl', 'scopes'], - extensionsPrefix: 'x-', -}; -const AuthorizationCode = { - properties: { - refreshUrl: { type: 'string' }, - authorizationUrl: { type: 'string' }, - scopes: { type: 'object', additionalProperties: { type: 'string' } }, // TODO: validate scopes - tokenUrl: { type: 'string' }, - 'x-usePkce': (value) => { - if (typeof value === 'boolean') { - return { type: 'boolean' }; - } - else { - return 'XUsePkce'; - } - }, - }, - required: ['authorizationUrl', 'tokenUrl', 'scopes'], - extensionsPrefix: 'x-', -}; -const OAuth2Flows = { - properties: { - implicit: 'ImplicitFlow', - password: 'PasswordFlow', - clientCredentials: 'ClientCredentials', - authorizationCode: 'AuthorizationCode', - }, - extensionsPrefix: 'x-', -}; -const SecurityScheme = { - properties: { - type: { enum: ['apiKey', 'http', 'oauth2', 'openIdConnect'] }, - description: { type: 'string' }, - name: { type: 'string' }, - in: { type: 'string', enum: ['query', 'header', 'cookie'] }, - scheme: { type: 'string' }, - bearerFormat: { type: 'string' }, - flows: 'OAuth2Flows', - openIdConnectUrl: { type: 'string' }, - 'x-defaultClientId': { type: 'string' }, - }, - required(value) { - switch (value?.type) { - case 'apiKey': - return ['type', 'name', 'in']; - case 'http': - return ['type', 'scheme']; - case 'oauth2': - return ['type', 'flows']; - case 'openIdConnect': - return ['type', 'openIdConnectUrl']; - default: - return ['type']; - } - }, - allowed(value) { - switch (value?.type) { - case 'apiKey': - return ['type', 'name', 'in', 'description']; - case 'http': - return ['type', 'scheme', 'bearerFormat', 'description']; - case 'oauth2': - return ['type', 'flows', 'description']; - case 'openIdConnect': - return ['type', 'openIdConnectUrl', 'description']; - default: - return ['type', 'description']; - } - }, - extensionsPrefix: 'x-', -}; -const XUsePkce = { - properties: { - disableManualConfiguration: { type: 'boolean' }, - hideClientSecretInput: { type: 'boolean' }, - }, -}; -exports.Oas3Types = { - Root, - Tag, - TagList: (0, _1.listOf)('Tag'), - TagGroups: (0, _1.listOf)('TagGroup'), - TagGroup, - ExternalDocs: exports.ExternalDocs, - Server, - ServerList: (0, _1.listOf)('Server'), - ServerVariable, - ServerVariablesMap: (0, _1.mapOf)('ServerVariable'), - SecurityRequirement, - SecurityRequirementList: (0, _1.listOf)('SecurityRequirement'), - Info, - Contact, - License, - Paths, - PathItem, - Parameter, - ParameterList: (0, _1.listOf)('Parameter'), - Operation, - Callback: (0, _1.mapOf)('PathItem'), - CallbacksMap: (0, _1.mapOf)('Callback'), - RequestBody, - MediaTypesMap, - MediaType, - Example, - ExamplesMap: (0, _1.mapOf)('Example'), - Encoding, - EncodingMap: (0, _1.mapOf)('Encoding'), - EnumDescriptions, - Header, - HeadersMap: (0, _1.mapOf)('Header'), - Responses, - Response, - Link, - Logo, - Schema, - Xml: exports.Xml, - SchemaProperties, - DiscriminatorMapping: exports.DiscriminatorMapping, - Discriminator: exports.Discriminator, - Components, - LinksMap: (0, _1.mapOf)('Link'), - NamedSchemas: (0, _1.mapOf)('Schema'), - NamedResponses: (0, _1.mapOf)('Response'), - NamedParameters: (0, _1.mapOf)('Parameter'), - NamedExamples: (0, _1.mapOf)('Example'), - NamedRequestBodies: (0, _1.mapOf)('RequestBody'), - NamedHeaders: (0, _1.mapOf)('Header'), - NamedSecuritySchemes: (0, _1.mapOf)('SecurityScheme'), - NamedLinks: (0, _1.mapOf)('Link'), - NamedCallbacks: (0, _1.mapOf)('Callback'), - ImplicitFlow, - PasswordFlow, - ClientCredentials, - AuthorizationCode, - OAuth2Flows, - SecurityScheme, - XCodeSample, - XCodeSampleList: (0, _1.listOf)('XCodeSample'), - XUsePkce, - WebhooksMap, -}; - - -/***/ }), - -/***/ 53734: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Oas3_1Types = exports.DependentRequired = exports.SchemaProperties = exports.Schema = void 0; -const _1 = __nccwpck_require__(14143); -const oas3_1 = __nccwpck_require__(67296); -const Root = { - properties: { - openapi: null, - info: 'Info', - servers: 'ServerList', - security: 'SecurityRequirementList', - tags: 'TagList', - externalDocs: 'ExternalDocs', - paths: 'Paths', - webhooks: 'WebhooksMap', - components: 'Components', - jsonSchemaDialect: { type: 'string' }, - }, - required: ['openapi', 'info'], - requiredOneOf: ['paths', 'components', 'webhooks'], - extensionsPrefix: 'x-', -}; -const License = { - properties: { - name: { type: 'string' }, - url: { type: 'string' }, - identifier: { type: 'string' }, - }, - required: ['name'], - extensionsPrefix: 'x-', -}; -const Info = { - properties: { - title: { type: 'string' }, - version: { type: 'string' }, - description: { type: 'string' }, - termsOfService: { type: 'string' }, - summary: { type: 'string' }, - contact: 'Contact', - license: 'License', - 'x-logo': 'Logo', - }, - required: ['title', 'version'], - extensionsPrefix: 'x-', -}; -const Components = { - properties: { - parameters: 'NamedParameters', - schemas: 'NamedSchemas', - responses: 'NamedResponses', - examples: 'NamedExamples', - requestBodies: 'NamedRequestBodies', - headers: 'NamedHeaders', - securitySchemes: 'NamedSecuritySchemes', - links: 'NamedLinks', - callbacks: 'NamedCallbacks', - pathItems: 'NamedPathItems', - }, - extensionsPrefix: 'x-', -}; -const Operation = { - properties: { - tags: { - type: 'array', - items: { type: 'string' }, - }, - summary: { type: 'string' }, - description: { type: 'string' }, - externalDocs: 'ExternalDocs', - operationId: { type: 'string' }, - parameters: 'ParameterList', - security: 'SecurityRequirementList', - servers: 'ServerList', - requestBody: 'RequestBody', - responses: 'Responses', - deprecated: { type: 'boolean' }, - callbacks: 'CallbacksMap', - 'x-codeSamples': 'XCodeSampleList', - 'x-code-samples': 'XCodeSampleList', // deprecated - 'x-hideTryItPanel': { type: 'boolean' }, - }, - extensionsPrefix: 'x-', -}; -exports.Schema = { - properties: { - $id: { type: 'string' }, - $anchor: { type: 'string' }, - id: { type: 'string' }, - $schema: { type: 'string' }, - definitions: 'NamedSchemas', - $defs: 'NamedSchemas', - $vocabulary: { type: 'string' }, - externalDocs: 'ExternalDocs', - discriminator: 'Discriminator', - title: { type: 'string' }, - multipleOf: { type: 'number', minimum: 0 }, - maximum: { type: 'number' }, - minimum: { type: 'number' }, - exclusiveMaximum: { type: 'number' }, - exclusiveMinimum: { type: 'number' }, - maxLength: { type: 'integer', minimum: 0 }, - minLength: { type: 'integer', minimum: 0 }, - pattern: { type: 'string' }, - maxItems: { type: 'integer', minimum: 0 }, - minItems: { type: 'integer', minimum: 0 }, - uniqueItems: { type: 'boolean' }, - maxProperties: { type: 'integer', minimum: 0 }, - minProperties: { type: 'integer', minimum: 0 }, - required: { type: 'array', items: { type: 'string' } }, - enum: { type: 'array' }, - type: (value) => { - if (Array.isArray(value)) { - return { - type: 'array', - items: { enum: ['object', 'array', 'string', 'number', 'integer', 'boolean', 'null'] }, - }; - } - else { - return { - enum: ['object', 'array', 'string', 'number', 'integer', 'boolean', 'null'], - }; - } - }, - allOf: (0, _1.listOf)('Schema'), - anyOf: (0, _1.listOf)('Schema'), - oneOf: (0, _1.listOf)('Schema'), - not: 'Schema', - if: 'Schema', - then: 'Schema', - else: 'Schema', - dependentSchemas: (0, _1.mapOf)('Schema'), - dependentRequired: 'DependentRequired', - prefixItems: (0, _1.listOf)('Schema'), - contains: 'Schema', - minContains: { type: 'integer', minimum: 0 }, - maxContains: { type: 'integer', minimum: 0 }, - patternProperties: 'PatternProperties', - propertyNames: 'Schema', - unevaluatedItems: (value) => { - if (typeof value === 'boolean') { - return { type: 'boolean' }; - } - else { - return 'Schema'; - } - }, - unevaluatedProperties: (value) => { - if (typeof value === 'boolean') { - return { type: 'boolean' }; - } - else { - return 'Schema'; - } - }, - summary: { type: 'string' }, - properties: 'SchemaProperties', - items: (value) => { - if (typeof value === 'boolean') { - return { type: 'boolean' }; - } - else { - return 'Schema'; - } - }, - additionalProperties: (value) => { - return typeof value === 'boolean' ? { type: 'boolean' } : 'Schema'; - }, - description: { type: 'string' }, - format: { type: 'string' }, - contentEncoding: { type: 'string' }, - contentMediaType: { type: 'string' }, - contentSchema: 'Schema', - default: null, - readOnly: { type: 'boolean' }, - writeOnly: { type: 'boolean' }, - xml: 'Xml', - examples: { type: 'array' }, - example: { isExample: true }, - deprecated: { type: 'boolean' }, - const: null, - $comment: { type: 'string' }, - 'x-tags': { type: 'array', items: { type: 'string' } }, - $dynamicAnchor: { type: 'string' }, - $dynamicRef: { type: 'string' }, - }, - extensionsPrefix: 'x-', -}; -exports.SchemaProperties = { - properties: {}, - additionalProperties: (value) => { - if (typeof value === 'boolean') { - return { type: 'boolean' }; - } - else { - return 'Schema'; - } - }, -}; -const SecurityScheme = { - properties: { - type: { enum: ['apiKey', 'http', 'oauth2', 'openIdConnect', 'mutualTLS'] }, - description: { type: 'string' }, - name: { type: 'string' }, - in: { type: 'string', enum: ['query', 'header', 'cookie'] }, - scheme: { type: 'string' }, - bearerFormat: { type: 'string' }, - flows: 'OAuth2Flows', - openIdConnectUrl: { type: 'string' }, - }, - required(value) { - switch (value?.type) { - case 'apiKey': - return ['type', 'name', 'in']; - case 'http': - return ['type', 'scheme']; - case 'oauth2': - return ['type', 'flows']; - case 'openIdConnect': - return ['type', 'openIdConnectUrl']; - default: - return ['type']; - } - }, - allowed(value) { - switch (value?.type) { - case 'apiKey': - return ['type', 'name', 'in', 'description']; - case 'http': - return ['type', 'scheme', 'bearerFormat', 'description']; - case 'oauth2': - switch (value?.flows) { - case 'implicit': - return ['type', 'flows', 'authorizationUrl', 'refreshUrl', 'description', 'scopes']; - case 'password': - case 'clientCredentials': - return ['type', 'flows', 'tokenUrl', 'refreshUrl', 'description', 'scopes']; - case 'authorizationCode': - return [ - 'type', - 'flows', - 'authorizationUrl', - 'refreshUrl', - 'tokenUrl', - 'description', - 'scopes', - ]; - default: - return [ - 'type', - 'flows', - 'authorizationUrl', - 'refreshUrl', - 'tokenUrl', - 'description', - 'scopes', - ]; - } - case 'openIdConnect': - return ['type', 'openIdConnectUrl', 'description']; - case 'mutualTLS': - return ['type', 'description']; - default: - return ['type', 'description']; - } - }, - extensionsPrefix: 'x-', -}; -exports.DependentRequired = { - properties: {}, - additionalProperties: { type: 'array', items: { type: 'string' } }, -}; -exports.Oas3_1Types = { - ...oas3_1.Oas3Types, - Info, - Root, - Schema: exports.Schema, - SchemaProperties: exports.SchemaProperties, - PatternProperties: exports.SchemaProperties, - License, - Components, - NamedPathItems: (0, _1.mapOf)('PathItem'), - SecurityScheme, - Operation, - DependentRequired: exports.DependentRequired, -}; - - -/***/ }), - -/***/ 78223: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Overlay1Types = void 0; -const _1 = __nccwpck_require__(14143); -const Root = { - properties: { - overlay: { type: 'string' }, - info: 'Info', - extends: { type: 'string' }, - actions: 'Actions', - }, - required: ['overlay', 'info', 'actions'], - extensionsPrefix: 'x-', -}; -const Info = { - properties: { - title: { type: 'string' }, - version: { type: 'string' }, - }, - required: ['title', 'version'], - extensionsPrefix: 'x-', -}; -const Actions = (0, _1.listOf)('Action'); -const Action = { - properties: { - target: { type: 'string' }, - description: { type: 'string' }, - update: {}, // any - remove: { type: 'boolean' }, - }, - required: ['target'], - extensionsPrefix: 'x-', -}; -exports.Overlay1Types = { - Root, - Info, - Actions, - Action, -}; - - -/***/ }), - -/***/ 74781: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NormalizedConfigTypes = exports.ConfigTypes = void 0; -exports.createConfigTypes = createConfigTypes; -const config_1 = __nccwpck_require__(20223); -const _1 = __nccwpck_require__(14143); -const oas_types_1 = __nccwpck_require__(46707); -const utils_1 = __nccwpck_require__(75450); -const json_schema_adapter_1 = __nccwpck_require__(85574); -const types_1 = __nccwpck_require__(14143); -const builtInOAS2Rules = [ - 'info-contact', - 'operation-operationId', - 'tag-description', - 'tags-alphabetical', - 'info-license-url', - 'info-license-strict', - 'info-license', - 'no-ambiguous-paths', - 'no-enum-type-mismatch', - 'no-http-verbs-in-paths', - 'no-identical-paths', - 'no-invalid-parameter-examples', - 'no-invalid-schema-examples', - 'no-path-trailing-slash', - 'operation-2xx-response', - 'operation-4xx-response', - 'operation-description', - 'operation-operationId-unique', - 'operation-operationId-url-safe', - 'operation-parameters-unique', - 'operation-singular-tag', - 'operation-summary', - 'operation-tag-defined', - 'parameter-description', - 'path-declaration-must-exist', - 'path-excludes-patterns', - 'path-http-verbs-order', - 'path-not-include-query', - 'path-params-defined', - 'path-parameters-defined', - 'path-segment-plural', - 'paths-kebab-case', - 'required-string-property-missing-min-length', - 'response-contains-header', - 'scalar-property-missing-example', - 'security-defined', - 'spec-strict-refs', - 'no-unresolved-refs', - 'no-required-schema-properties-undefined', - 'no-schema-type-mismatch', - 'boolean-parameter-prefixes', - 'request-mime-type', - 'response-contains-property', - 'response-mime-type', -]; -const builtInOAS3Rules = [ - 'info-contact', - 'operation-operationId', - 'tag-description', - 'tags-alphabetical', - 'info-license-url', - 'info-license-strict', - 'info-license', - 'no-ambiguous-paths', - 'no-enum-type-mismatch', - 'no-http-verbs-in-paths', - 'no-identical-paths', - 'no-invalid-parameter-examples', - 'no-invalid-schema-examples', - 'no-path-trailing-slash', - 'operation-2xx-response', - 'operation-4xx-response', - 'operation-description', - 'operation-operationId-unique', - 'operation-operationId-url-safe', - 'operation-parameters-unique', - 'operation-singular-tag', - 'operation-summary', - 'operation-tag-defined', - 'parameter-description', - 'path-declaration-must-exist', - 'path-excludes-patterns', - 'path-http-verbs-order', - 'path-not-include-query', - 'path-params-defined', - 'path-parameters-defined', - 'path-segment-plural', - 'paths-kebab-case', - 'required-string-property-missing-min-length', - 'response-contains-header', - 'scalar-property-missing-example', - 'security-defined', - 'spec-strict-refs', - 'no-unresolved-refs', - 'no-required-schema-properties-undefined', - 'no-schema-type-mismatch', - 'boolean-parameter-prefixes', - 'component-name-unique', - 'no-empty-servers', - 'no-example-value-and-externalValue', - 'no-invalid-media-type-examples', - 'no-server-example.com', - 'no-server-trailing-slash', - 'no-server-variables-empty-enum', - 'no-undefined-server-variable', - 'no-unused-components', - 'operation-4xx-problem-details-rfc7807', - 'request-mime-type', - 'response-contains-property', - 'response-mime-type', - 'spec-components-invalid-map-name', - 'array-parameter-serialization', -]; -const builtInAsync2Rules = [ - 'info-contact', - 'info-license-strict', - 'operation-operationId', - 'tag-description', - 'tags-alphabetical', - 'channels-kebab-case', - 'no-channel-trailing-slash', -]; -const builtInAsync3Rules = [ - 'info-contact', - 'info-license-strict', - 'operation-operationId', - 'tag-description', - 'tags-alphabetical', - 'channels-kebab-case', - 'no-channel-trailing-slash', -]; -const builtInArazzo1Rules = [ - 'sourceDescription-type', - 'workflowId-unique', - 'stepId-unique', - 'sourceDescription-name-unique', - 'sourceDescriptions-not-empty', - 'workflow-dependsOn', - 'parameters-unique', - 'step-onSuccess-unique', - 'step-onFailure-unique', - 'respect-supported-versions', - 'requestBody-replacements-unique', - 'no-criteria-xpath', - 'criteria-unique', -]; -const builtInOverlay1Rules = ['info-contact']; -const builtInRules = [ - ...builtInOAS2Rules, - ...builtInOAS3Rules, - ...builtInAsync2Rules, - ...builtInAsync3Rules, - ...builtInArazzo1Rules, - ...builtInOverlay1Rules, - 'spec', // TODO: depricated in favor of struct - 'struct', -]; -const oas2NodeTypesList = (/* unused pure expression or super */ null && ([ - 'Root', - 'Tag', - 'TagList', - 'ExternalDocs', - 'SecurityRequirement', - 'SecurityRequirementList', - 'Info', - 'Contact', - 'License', - 'Paths', - 'PathItem', - 'Parameter', - 'ParameterList', - 'ParameterItems', - 'Operation', - 'Example', - 'ExamplesMap', - 'Examples', - 'Header', - 'Responses', - 'Response', - 'Schema', - 'Xml', - 'SchemaProperties', - 'NamedSchemas', - 'NamedResponses', - 'NamedParameters', - 'NamedSecuritySchemes', - 'SecurityScheme', - 'TagGroup', - 'TagGroups', - 'EnumDescriptions', - 'Logo', - 'XCodeSample', - 'XCodeSampleList', - 'XServer', - 'XServerList', -])); -const oas3NodeTypesList = (/* unused pure expression or super */ null && ([ - 'Root', - 'Tag', - 'TagList', - 'ExternalDocs', - 'Server', - 'ServerList', - 'ServerVariable', - 'ServerVariablesMap', - 'SecurityRequirement', - 'SecurityRequirementList', - 'Info', - 'Contact', - 'License', - 'Paths', - 'PathItem', - 'Parameter', - 'ParameterList', - 'Operation', - 'Callback', - 'CallbacksMap', - 'RequestBody', - 'MediaTypesMap', - 'MediaType', - 'Example', - 'ExamplesMap', - 'Encoding', - 'EncodingMap', - 'Header', - 'HeadersMap', - 'Responses', - 'Response', - 'Link', - 'LinksMap', - 'Schema', - 'Xml', - 'SchemaProperties', - 'DiscriminatorMapping', - 'Discriminator', - 'Components', - 'NamedSchemas', - 'NamedResponses', - 'NamedParameters', - 'NamedExamples', - 'NamedRequestBodies', - 'NamedHeaders', - 'NamedSecuritySchemes', - 'NamedLinks', - 'NamedCallbacks', - 'ImplicitFlow', - 'PasswordFlow', - 'ClientCredentials', - 'AuthorizationCode', - 'OAuth2Flows', - 'SecurityScheme', - 'TagGroup', - 'TagGroups', - 'EnumDescriptions', - 'Logo', - 'XCodeSample', - 'XCodeSampleList', - 'XUsePkce', - 'WebhooksMap', -])); -const oas3_1NodeTypesList = (/* unused pure expression or super */ null && ([ - 'Root', - 'Schema', - 'SchemaProperties', - 'PatternProperties', - 'Info', - 'License', - 'Components', - 'NamedPathItems', - 'SecurityScheme', - 'Operation', - 'DependentRequired', -])); -const ConfigStyleguide = { - properties: { - extends: { - type: 'array', - items: { - type: 'string', - }, - }, - rules: 'Rules', - oas2Rules: 'Rules', - oas3_0Rules: 'Rules', - oas3_1Rules: 'Rules', - async2Rules: 'Rules', - arazzo1Rules: 'Rules', - preprocessors: { type: 'object' }, - oas2Preprocessors: { type: 'object' }, - oas3_0Preprocessors: { type: 'object' }, - oas3_1Preprocessors: { type: 'object' }, - async2Preprocessors: { type: 'object' }, - arazzoPreprocessors: { type: 'object' }, - decorators: { type: 'object' }, - oas2Decorators: { type: 'object' }, - oas3_0Decorators: { type: 'object' }, - oas3_1Decorators: { type: 'object' }, - async2Decorators: { type: 'object' }, - arazzo1Decorators: { type: 'object' }, - }, -}; -const createConfigRoot = (nodeTypes) => ({ - ...nodeTypes.rootRedoclyConfigSchema, - properties: { - ...nodeTypes.rootRedoclyConfigSchema.properties, - ...ConfigStyleguide.properties, - apis: 'ConfigApis', // Override apis with internal format - 'features.openapi': 'ConfigReferenceDocs', // deprecated - 'features.mockServer': 'ConfigMockServer', // deprecated - organization: { type: 'string' }, - region: { enum: ['us', 'eu'] }, - telemetry: { enum: ['on', 'off'] }, - resolve: { - properties: { - http: 'ConfigHTTP', - doNotResolveExamples: { type: 'boolean' }, - }, - }, - files: { - type: 'array', - items: { - type: 'string', - }, - }, - }, -}); -const ConfigApis = { - properties: {}, - additionalProperties: 'ConfigApisProperties', -}; -const createConfigApisProperties = (nodeTypes) => ({ - ...nodeTypes['rootRedoclyConfigSchema.apis_additionalProperties'], - properties: { - ...nodeTypes['rootRedoclyConfigSchema.apis_additionalProperties']?.properties, - labels: { - type: 'array', - items: { - type: 'string', - }, - }, - ...ConfigStyleguide.properties, - 'features.openapi': 'ConfigReferenceDocs', // deprecated - 'features.mockServer': 'ConfigMockServer', // deprecated - files: { - type: 'array', - items: { - type: 'string', - }, - }, - }, -}); -const ConfigHTTP = { - properties: { - headers: { - type: 'array', - items: { - type: 'string', - }, - }, - }, -}; -const Rules = { - properties: {}, - additionalProperties: (value, key) => { - if (key.startsWith('rule/')) { - if (typeof value === 'string') { - return { enum: ['error', 'warn', 'off'] }; - } - else { - return 'Assert'; - } - } - else if (key.startsWith('assert/')) { - // keep the old assert/ prefix as an alias - if (typeof value === 'string') { - return { enum: ['error', 'warn', 'off'] }; - } - else { - return 'Assert'; - } - } - else if (builtInRules.includes(key) || (0, utils_1.isCustomRuleId)(key)) { - if (typeof value === 'string') { - return { enum: ['error', 'warn', 'off'] }; - } - else { - return 'ObjectRule'; - } - } - else if (key === 'metadata-schema' || key === 'custom-fields-schema') { - return 'Schema'; - } - // Otherwise is considered as invalid - return; - }, -}; -const ObjectRule = { - properties: { - severity: { enum: ['error', 'warn', 'off'] }, - }, - additionalProperties: {}, - required: ['severity'], -}; -// TODO: add better type tree for this -const Schema = { - properties: {}, - additionalProperties: {}, -}; -function createAssertionDefinitionSubject(nodeNames) { - return { - properties: { - type: { - enum: [...new Set(['any', ...nodeNames, 'SpecExtension'])], - }, - property: (value) => { - if (Array.isArray(value)) { - return { type: 'array', items: { type: 'string' } }; - } - else if (value === null) { - return null; - } - else { - return { type: 'string' }; - } - }, - filterInParentKeys: { type: 'array', items: { type: 'string' } }, - filterOutParentKeys: { type: 'array', items: { type: 'string' } }, - matchParentKeys: { type: 'string' }, - }, - required: ['type'], - }; -} -const AssertionDefinitionAssertions = { - properties: { - enum: { type: 'array', items: { type: 'string' } }, - pattern: { type: 'string' }, - notPattern: { type: 'string' }, - casing: { - enum: [ - 'camelCase', - 'kebab-case', - 'snake_case', - 'PascalCase', - 'MACRO_CASE', - 'COBOL-CASE', - 'flatcase', - ], - }, - mutuallyExclusive: { type: 'array', items: { type: 'string' } }, - mutuallyRequired: { type: 'array', items: { type: 'string' } }, - required: { type: 'array', items: { type: 'string' } }, - requireAny: { type: 'array', items: { type: 'string' } }, - disallowed: { type: 'array', items: { type: 'string' } }, - defined: { type: 'boolean' }, - // undefined: { type: 'boolean' }, // TODO: Remove `undefined` assertion from codebase overall - nonEmpty: { type: 'boolean' }, - minLength: { type: 'integer' }, - maxLength: { type: 'integer' }, - ref: (value) => typeof value === 'string' ? { type: 'string' } : { type: 'boolean' }, - const: (value) => { - if (typeof value === 'string') { - return { type: 'string' }; - } - if (typeof value === 'number') { - return { type: 'number' }; - } - if (typeof value === 'boolean') { - return { type: 'boolean' }; - } - else { - return; - } - }, - }, - additionalProperties: (_value, key) => { - if (/^\w+\/\w+$/.test(key)) - return { type: 'object' }; - return; - }, -}; -const AssertDefinition = { - properties: { - subject: 'AssertionDefinitionSubject', - assertions: 'AssertionDefinitionAssertions', - }, - required: ['subject', 'assertions'], -}; -const Assert = { - properties: { - subject: 'AssertionDefinitionSubject', - assertions: 'AssertionDefinitionAssertions', - where: (0, _1.listOf)('AssertDefinition'), - message: { type: 'string' }, - suggest: { type: 'array', items: { type: 'string' } }, - severity: { enum: ['error', 'warn', 'off'] }, - }, - required: ['subject', 'assertions'], -}; -const ConfigLanguage = { - properties: { - label: { type: 'string' }, - lang: { - enum: [ - 'curl', - 'C#', - 'Go', - 'Java', - 'Java8+Apache', - 'JavaScript', - 'Node.js', - 'PHP', - 'Python', - 'R', - 'Ruby', - ], - }, - }, - required: ['lang'], -}; -const ConfigLabels = { - properties: { - enum: { type: 'string' }, - enumSingleValue: { type: 'string' }, - enumArray: { type: 'string' }, - default: { type: 'string' }, - deprecated: { type: 'string' }, - example: { type: 'string' }, - examples: { type: 'string' }, - nullable: { type: 'string' }, - recursive: { type: 'string' }, - arrayOf: { type: 'string' }, - webhook: { type: 'string' }, - authorizations: { type: 'string' }, - tryItAuthBasicUsername: { type: 'string' }, - tryItAuthBasicPassword: { type: 'string' }, - }, -}; -const ConfigSidebarLinks = { - properties: { - beforeInfo: (0, _1.listOf)('CommonConfigSidebarLinks'), - end: (0, _1.listOf)('CommonConfigSidebarLinks'), - }, -}; -const CommonConfigSidebarLinks = { - properties: { - label: { type: 'string' }, - link: { type: 'string' }, - target: { type: 'string' }, - }, - required: ['label', 'link'], -}; -const CommonThemeColors = { - properties: { - main: { type: 'string' }, - light: { type: 'string' }, - dark: { type: 'string' }, - contrastText: { type: 'string' }, - }, -}; -const CommonColorProps = { - properties: { - backgroundColor: { type: 'string' }, - borderColor: { type: 'string' }, - color: { type: 'string' }, - tabTextColor: { type: 'string' }, - }, -}; -const BorderThemeColors = { - properties: (0, utils_1.pickObjectProps)(CommonThemeColors.properties, ['light', 'dark']), -}; -const HttpColors = { - properties: { - basic: { type: 'string' }, - delete: { type: 'string' }, - get: { type: 'string' }, - head: { type: 'string' }, - link: { type: 'string' }, - options: { type: 'string' }, - patch: { type: 'string' }, - post: { type: 'string' }, - put: { type: 'string' }, - }, -}; -const ResponseColors = { - properties: { - error: 'CommonColorProps', - info: 'CommonColorProps', - redirect: 'CommonColorProps', - success: 'CommonColorProps', - }, -}; -const SecondaryColors = { - properties: (0, utils_1.omitObjectProps)(CommonThemeColors.properties, ['dark']), -}; -const TextThemeColors = { - properties: { - primary: { type: 'string' }, - secondary: { type: 'string' }, - light: { type: 'string' }, - }, -}; -const ThemeColors = { - properties: { - accent: 'CommonThemeColors', - border: 'BorderThemeColors', - error: 'CommonThemeColors', - http: 'HttpColors', - primary: 'CommonThemeColors', - responses: 'ResponseColors', - secondary: 'SecondaryColors', - success: 'CommonThemeColors', - text: 'TextThemeColors', - tonalOffset: { type: 'number' }, - warning: 'CommonThemeColors', - }, -}; -const SizeProps = { - properties: { - fontSize: { type: 'string' }, - padding: { type: 'string' }, - minWidth: { type: 'string' }, - }, -}; -const Sizes = { - properties: { - small: 'SizeProps', - medium: 'SizeProps', - large: 'SizeProps', - xlarge: 'SizeProps', - }, -}; -const FontConfig = { - properties: { - fontFamily: { type: 'string' }, - fontSize: { type: 'string' }, - fontWeight: { type: 'string' }, - lineHeight: { type: 'string' }, - }, -}; -const ButtonsConfig = { - properties: { - ...(0, utils_1.omitObjectProps)(FontConfig.properties, ['fontSize', 'lineHeight']), - borderRadius: { type: 'string' }, - hoverStyle: { type: 'string' }, - boxShadow: { type: 'string' }, - hoverBoxShadow: { type: 'string' }, - sizes: 'Sizes', - }, -}; -const BadgeFontConfig = { - properties: (0, utils_1.pickObjectProps)(FontConfig.properties, ['fontSize', 'lineHeight']), -}; -const BadgeSizes = { - properties: { - medium: 'BadgeFontConfig', - small: 'BadgeFontConfig', - }, -}; -const HttpBadgesConfig = { - properties: { - ...(0, utils_1.omitObjectProps)(FontConfig.properties, ['fontSize', 'lineHeight']), - borderRadius: { type: 'string' }, - color: { type: 'string' }, - sizes: 'BadgeSizes', - }, -}; -const LabelControls = { - properties: { - top: { type: 'string' }, - width: { type: 'string' }, - height: { type: 'string' }, - }, -}; -const Panels = { - properties: { - borderRadius: { type: 'string' }, - backgroundColor: { type: 'string' }, - }, -}; -const TryItButton = { - properties: { - fullWidth: { type: 'boolean' }, - }, -}; -const ConfigThemeComponents = { - properties: { - buttons: 'ButtonsConfig', - httpBadges: 'HttpBadgesConfig', - layoutControls: 'LabelControls', - panels: 'Panels', - tryItButton: 'TryItButton', - tryItSendButton: 'TryItButton', - }, -}; -const Breakpoints = { - properties: { - small: { type: 'string' }, - medium: { type: 'string' }, - large: { type: 'string' }, - }, -}; -const StackedConfig = { - properties: { - maxWidth: 'Breakpoints', - }, -}; -const ThreePanelConfig = { - properties: { - maxWidth: 'Breakpoints', - middlePanelMaxWidth: 'Breakpoints', - }, -}; -const Layout = { - properties: { - showDarkRightPanel: { type: 'boolean' }, - stacked: 'StackedConfig', - 'three-panel': 'ThreePanelConfig', - }, -}; -const SchemaColorsConfig = { - properties: { - backgroundColor: { type: 'string' }, - border: { type: 'string' }, - }, -}; -const ConfigThemeSchema = { - properties: { - breakFieldNames: { type: 'boolean' }, - caretColor: { type: 'string' }, - caretSize: { type: 'string' }, - constraints: 'SchemaColorsConfig', - defaultDetailsWidth: { type: 'string' }, - examples: 'SchemaColorsConfig', - labelsTextSize: { type: 'string' }, - linesColor: { type: 'string' }, - nestedBackground: { type: 'string' }, - nestingSpacing: { type: 'string' }, - requireLabelColor: { type: 'string' }, - typeNameColor: { type: 'string' }, - typeTitleColor: { type: 'string' }, - }, -}; -const GroupItemsConfig = { - properties: { - subItemsColor: { type: 'string' }, - textTransform: { type: 'string' }, - fontWeight: { type: 'string' }, - }, -}; -const Level1Items = { - properties: (0, utils_1.pickObjectProps)(GroupItemsConfig.properties, ['textTransform']), -}; -const SpacingConfig = { - properties: { - unit: { type: 'number' }, - paddingHorizontal: { type: 'string' }, - paddingVertical: { type: 'string' }, - offsetTop: { type: 'string' }, - offsetLeft: { type: 'string' }, - offsetNesting: { type: 'string' }, - }, -}; -const Sidebar = { - properties: { - ...(0, utils_1.omitObjectProps)(FontConfig.properties, ['fontWeight', 'lineHeight']), - activeBgColor: { type: 'string' }, - activeTextColor: { type: 'string' }, - backgroundColor: { type: 'string' }, - borderRadius: { type: 'string' }, - breakPath: { type: 'boolean' }, - caretColor: { type: 'string' }, - caretSize: { type: 'string' }, - groupItems: 'GroupItemsConfig', - level1items: 'Level1Items', - rightLineColor: { type: 'string' }, - separatorLabelColor: { type: 'string' }, - showAtBreakpoint: { type: 'string' }, - spacing: 'SpacingConfig', - textColor: { type: 'string' }, - width: { type: 'string' }, - }, -}; -const Heading = { - properties: { - ...FontConfig.properties, - color: { type: 'string' }, - transform: { type: 'string' }, - }, -}; -const CodeConfig = { - properties: { - ...FontConfig.properties, - backgroundColor: { type: 'string' }, - color: { type: 'string' }, - wordBreak: { - enum: [ - 'break-all', - 'break-word', - 'keep-all', - 'normal', - 'revert', - 'unset', - 'inherit', - 'initial', - ], - }, - wrap: { type: 'boolean' }, - }, -}; -const HeadingsConfig = { - properties: (0, utils_1.omitObjectProps)(FontConfig.properties, ['fontSize']), -}; -const LinksConfig = { - properties: { - color: { type: 'string' }, - hover: { type: 'string' }, - textDecoration: { type: 'string' }, - hoverTextDecoration: { type: 'string' }, - visited: { type: 'string' }, - }, -}; -const Typography = { - properties: { - code: 'CodeConfig', - fieldName: 'FontConfig', - ...(0, utils_1.pickObjectProps)(FontConfig.properties, ['fontSize', 'fontFamily']), - fontWeightBold: { type: 'string' }, - fontWeightLight: { type: 'string' }, - fontWeightRegular: { type: 'string' }, - heading1: 'Heading', - heading2: 'Heading', - heading3: 'Heading', - headings: 'HeadingsConfig', - lineHeight: { type: 'string' }, - links: 'LinksConfig', - optimizeSpeed: { type: 'boolean' }, - rightPanelHeading: 'Heading', - smoothing: { enum: ['auto', 'none', 'antialiased', 'subpixel-antialiased', 'grayscale'] }, - }, -}; -const TokenProps = { - properties: { - color: { type: 'string' }, - ...(0, utils_1.omitObjectProps)(FontConfig.properties, ['fontWeight']), - }, -}; -const CodeBlock = { - properties: { - backgroundColor: { type: 'string' }, - borderRadius: { type: 'string' }, - tokens: 'TokenProps', - }, -}; -const ConfigThemeLogo = { - properties: { - gutter: { type: 'string' }, - maxHeight: { type: 'string' }, - maxWidth: { type: 'string' }, - }, -}; -const Fab = { - properties: { - backgroundColor: { type: 'string' }, - color: { type: 'string' }, - }, -}; -const ButtonOverrides = { - properties: { - custom: { type: 'string' }, - }, -}; -const Overrides = { - properties: { - DownloadButton: 'ButtonOverrides', - NextSectionButton: 'ButtonOverrides', - }, -}; -const RightPanel = { - properties: { - backgroundColor: { type: 'string' }, - panelBackgroundColor: { type: 'string' }, - panelControlsBackgroundColor: { type: 'string' }, - showAtBreakpoint: { type: 'string' }, - textColor: { type: 'string' }, - width: { type: 'string' }, - }, -}; -const Shape = { - properties: { borderRadius: { type: 'string' } }, -}; -const ThemeSpacing = { - properties: { - sectionHorizontal: { type: 'number' }, - sectionVertical: { type: 'number' }, - unit: { type: 'number' }, - }, -}; -const ConfigTheme = { - properties: { - breakpoints: 'Breakpoints', - codeBlock: 'CodeBlock', - colors: 'ThemeColors', - components: 'ConfigThemeComponents', - layout: 'Layout', - logo: 'ConfigThemeLogo', - fab: 'Fab', - overrides: 'Overrides', - rightPanel: 'RightPanel', - schema: 'ConfigThemeSchema', - shape: 'Shape', - sidebar: 'Sidebar', - spacing: 'ThemeSpacing', - typography: 'Typography', - links: { properties: { color: { type: 'string' } } }, // deprecated - codeSample: { properties: { backgroundColor: { type: 'string' } } }, // deprecated - }, -}; -const GenerateCodeSamples = { - properties: { - skipOptionalParameters: { type: 'boolean' }, - languages: (0, _1.listOf)('ConfigLanguage'), - }, - required: ['languages'], -}; -// TODO: deprecated -const ConfigReferenceDocs = { - properties: { - theme: 'ConfigTheme', - corsProxyUrl: { type: 'string' }, - ctrlFHijack: { type: 'boolean' }, - defaultSampleLanguage: { type: 'string' }, - disableDeepLinks: { type: 'boolean' }, - disableSearch: { type: 'boolean' }, - disableSidebar: { type: 'boolean' }, - downloadDefinitionUrl: { type: 'string' }, - expandDefaultServerVariables: { type: 'boolean' }, - enumSkipQuotes: { type: 'boolean' }, - expandDefaultRequest: { type: 'boolean' }, - expandDefaultResponse: { type: 'boolean' }, - expandResponses: { type: 'string' }, - expandSingleSchemaField: { type: 'boolean' }, - generateCodeSamples: 'GenerateCodeSamples', - generatedPayloadSamplesMaxDepth: { type: 'number' }, - hideDownloadButton: { type: 'boolean' }, - hideHostname: { type: 'boolean' }, - hideInfoSection: { type: 'boolean' }, - hideLoading: { type: 'boolean' }, - hideLogo: { type: 'boolean' }, - hideRequestPayloadSample: { type: 'boolean' }, - hideRightPanel: { type: 'boolean' }, - hideSchemaPattern: { type: 'boolean' }, - hideSchemaTitles: { type: 'boolean' }, - hideSingleRequestSampleTab: { type: 'boolean' }, - hideSecuritySection: { type: 'boolean' }, - hideTryItPanel: { type: 'boolean' }, - hideFab: { type: 'boolean' }, - hideOneOfDescription: { type: 'boolean' }, - htmlTemplate: { type: 'string' }, - jsonSampleExpandLevel: (value) => { - if (typeof value === 'number') { - return { type: 'number', minimum: 1 }; - } - else { - return { type: 'string' }; - } - }, - labels: 'ConfigLabels', - layout: { enum: ['stacked', 'three-panel'] }, - maxDisplayedEnumValues: { type: 'number' }, - menuToggle: { type: 'boolean' }, - nativeScrollbars: { type: 'boolean' }, - noAutoAuth: { type: 'boolean' }, // deprecated - oAuth2RedirectURI: { type: 'string' }, - onDeepLinkClick: { type: 'object' }, - onlyRequiredInSamples: { type: 'boolean' }, - pagination: { enum: ['none', 'section', 'item'] }, - pathInMiddlePanel: { type: 'boolean' }, - payloadSampleIdx: { type: 'number', minimum: 0 }, - requestInterceptor: { type: 'object' }, - requiredPropsFirst: { type: 'boolean' }, - routingBasePath: { type: 'string' }, - routingStrategy: { type: 'string' }, // deprecated - samplesTabsMaxCount: { type: 'number' }, - schemaExpansionLevel: (value) => { - if (typeof value === 'number') { - return { type: 'number', minimum: 0 }; - } - else { - return { type: 'string' }; - } - }, - schemaDefinitionsTagName: { type: 'string' }, - minCharacterLengthToInitSearch: { type: 'number', minimum: 1 }, - maxResponseHeadersToShowInTryIt: { type: 'number', minimum: 0 }, - scrollYOffset: (value) => { - if (typeof value === 'number') { - return { type: 'number' }; - } - else { - return { type: 'string' }; - } - }, - searchAutoExpand: { type: 'boolean' }, - searchFieldLevelBoost: { type: 'number', minimum: 0 }, - searchMaxDepth: { type: 'number', minimum: 1 }, - searchMode: { enum: ['default', 'path-only'] }, - searchOperationTitleBoost: { type: 'number' }, - searchTagTitleBoost: { type: 'number' }, - sendXUserAgentInTryIt: { type: 'boolean' }, - showChangeLayoutButton: { type: 'boolean' }, - showConsole: { type: 'boolean' }, // deprecated - showExtensions: (value) => { - if (typeof value === 'boolean') { - return { type: 'boolean' }; - } - else { - return { - type: 'array', - items: { - type: 'string', - }, - }; - } - }, - showNextButton: { type: 'boolean' }, - showRightPanelToggle: { type: 'boolean' }, - showSecuritySchemeType: { type: 'boolean' }, - showWebhookVerb: { type: 'boolean' }, - showObjectSchemaExamples: { type: 'boolean' }, - disableTryItRequestUrlEncoding: { type: 'boolean' }, - sidebarLinks: 'ConfigSidebarLinks', - sideNavStyle: { enum: ['summary-only', 'path-first', 'id-only', 'path-only'] }, - simpleOneOfTypeLabel: { type: 'boolean' }, - sortEnumValuesAlphabetically: { type: 'boolean' }, - sortOperationsAlphabetically: { type: 'boolean' }, - sortPropsAlphabetically: { type: 'boolean' }, - sortTagsAlphabetically: { type: 'boolean' }, - suppressWarnings: { type: 'boolean' }, // deprecated - unstable_externalDescription: { type: 'boolean' }, // deprecated - unstable_ignoreMimeParameters: { type: 'boolean' }, - untrustedDefinition: { type: 'boolean' }, - mockServer: { - properties: { - url: { type: 'string' }, - position: { enum: ['first', 'last', 'replace', 'off'] }, - description: { type: 'string' }, - }, - }, - showAccessMode: { type: 'boolean' }, - preserveOriginalExtensionsName: { type: 'boolean' }, - markdownHeadingsAnchorLevel: { type: 'number' }, - }, - additionalProperties: {}, -}; -const ConfigMockServer = { - properties: { - strictExamples: { type: 'boolean' }, - errorIfForcedExampleNotFound: { type: 'boolean' }, - }, -}; -function createConfigTypes(extraSchemas, config) { - const nodeNames = Object.values(oas_types_1.SpecVersion).flatMap((version) => { - const types = config?.styleguide - ? config.styleguide.extendTypes((0, oas_types_1.getTypes)(version), version) - : (0, oas_types_1.getTypes)(version); - return Object.keys(types); - }); - // Create types based on external schemas - const nodeTypes = (0, json_schema_adapter_1.getNodeTypesFromJSONSchema)('rootRedoclyConfigSchema', extraSchemas); - return { - ...CoreConfigTypes, - ConfigRoot: createConfigRoot(nodeTypes), // This is the REAL config root type - ConfigApisProperties: createConfigApisProperties(nodeTypes), - AssertionDefinitionSubject: createAssertionDefinitionSubject(nodeNames), - ...nodeTypes, - }; -} -const CoreConfigTypes = { - Assert, - ConfigApis, - ConfigStyleguide, - ConfigReferenceDocs, - ConfigMockServer, - ConfigHTTP, - ConfigLanguage, - ConfigLabels, - ConfigSidebarLinks, - CommonConfigSidebarLinks, - ConfigTheme, - AssertDefinition, - ThemeColors, - CommonThemeColors, - BorderThemeColors, - HttpColors, - ResponseColors, - SecondaryColors, - TextThemeColors, - Sizes, - ButtonsConfig, - CommonColorProps, - BadgeFontConfig, - BadgeSizes, - HttpBadgesConfig, - LabelControls, - Panels, - TryItButton, - Breakpoints, - StackedConfig, - ThreePanelConfig, - SchemaColorsConfig, - SizeProps, - Level1Items, - SpacingConfig, - FontConfig, - CodeConfig, - HeadingsConfig, - LinksConfig, - TokenProps, - CodeBlock, - ConfigThemeLogo, - Fab, - ButtonOverrides, - Overrides, - ObjectRule, - Schema, - RightPanel, - Rules, - Shape, - ThemeSpacing, - GenerateCodeSamples, - GroupItemsConfig, - ConfigThemeComponents, - Layout, - ConfigThemeSchema, - Sidebar, - Heading, - Typography, - AssertionDefinitionAssertions, -}; -exports.ConfigTypes = createConfigTypes(config_1.rootRedoclyConfigSchema); -exports.NormalizedConfigTypes = (0, types_1.normalizeTypes)(exports.ConfigTypes); - - -/***/ }), - -/***/ 17675: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT = exports.VERSION_PATTERN = void 0; -exports.VERSION_PATTERN = /^1\.0\.\d+(-.+)?$/; -exports.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT = ['1.0.1']; - - -/***/ }), - -/***/ 75450: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.assignConfig = exports.stringifyYaml = exports.parseYaml = void 0; -exports.pushStack = pushStack; -exports.pluralize = pluralize; -exports.popStack = popStack; -exports.loadYaml = loadYaml; -exports.isDefined = isDefined; -exports.isPlainObject = isPlainObject; -exports.isEmptyObject = isEmptyObject; -exports.isNotEmptyObject = isNotEmptyObject; -exports.isEmptyArray = isEmptyArray; -exports.isNotEmptyArray = isNotEmptyArray; -exports.readFileFromUrl = readFileFromUrl; -exports.pickObjectProps = pickObjectProps; -exports.omitObjectProps = omitObjectProps; -exports.splitCamelCaseIntoWords = splitCamelCaseIntoWords; -exports.validateMimeType = validateMimeType; -exports.validateMimeTypeOAS3 = validateMimeTypeOAS3; -exports.readFileAsStringSync = readFileAsStringSync; -exports.yamlAndJsonSyncReader = yamlAndJsonSyncReader; -exports.isPathParameter = isPathParameter; -exports.slash = slash; -exports.isString = isString; -exports.isNotString = isNotString; -exports.assignOnlyExistingConfig = assignOnlyExistingConfig; -exports.getMatchingStatusCodeRange = getMatchingStatusCodeRange; -exports.isCustomRuleId = isCustomRuleId; -exports.doesYamlFileExist = doesYamlFileExist; -exports.showWarningForDeprecatedField = showWarningForDeprecatedField; -exports.showErrorForDeprecatedField = showErrorForDeprecatedField; -exports.isTruthy = isTruthy; -exports.identity = identity; -exports.keysOf = keysOf; -exports.pickDefined = pickDefined; -exports.nextTick = nextTick; -exports.pause = pause; -exports.getProxyAgent = getProxyAgent; -exports.dequal = dequal; -const fs = __nccwpck_require__(57147); -const path_1 = __nccwpck_require__(71017); -const minimatch = __nccwpck_require__(30934); -const js_yaml_1 = __nccwpck_require__(97268); -const env_1 = __nccwpck_require__(10876); -const logger_1 = __nccwpck_require__(11339); -const https_proxy_agent_1 = __nccwpck_require__(77219); -const pluralizeOne = __nccwpck_require__(22522); -var js_yaml_2 = __nccwpck_require__(97268); -Object.defineProperty(exports, "parseYaml", ({ enumerable: true, get: function () { return js_yaml_2.parseYaml; } })); -Object.defineProperty(exports, "stringifyYaml", ({ enumerable: true, get: function () { return js_yaml_2.stringifyYaml; } })); -function pushStack(head, value) { - return { prev: head, value }; -} -function pluralize(sentence, count, inclusive) { - return sentence - .split(' ') - .map((word) => pluralizeOne(word, count, inclusive)) - .join(' '); -} -function popStack(head) { - return head?.prev ?? null; -} -async function loadYaml(filename) { - const contents = await fs.promises.readFile(filename, 'utf-8'); - return (0, js_yaml_1.parseYaml)(contents); -} -function isDefined(x) { - return x !== undefined; -} -function isPlainObject(value) { - return value !== null && typeof value === 'object' && !Array.isArray(value); -} -function isEmptyObject(value) { - return isPlainObject(value) && Object.keys(value).length === 0; -} -function isNotEmptyObject(obj) { - return isPlainObject(obj) && !isEmptyObject(obj); -} -function isEmptyArray(value) { - return Array.isArray(value) && value.length === 0; -} -function isNotEmptyArray(args) { - return !!args && Array.isArray(args) && !!args.length; -} -async function readFileFromUrl(url, config) { - const headers = {}; - for (const header of config.headers) { - if (match(url, header.matches)) { - headers[header.name] = - header.envVariable !== undefined ? env_1.env[header.envVariable] || '' : header.value; - } - } - const req = await (config.customFetch || fetch)(url, { - headers: headers, - }); - if (!req.ok) { - throw new Error(`Failed to load ${url}: ${req.status} ${req.statusText}`); - } - return { body: await req.text(), mimeType: req.headers.get('content-type') }; -} -function match(url, pattern) { - if (!pattern.match(/^https?:\/\//)) { - // if pattern doesn't specify protocol directly, do not match against it - url = url.replace(/^https?:\/\//, ''); - } - return minimatch(url, pattern); -} -function pickObjectProps(object, keys) { - return Object.fromEntries(keys.filter((key) => key in object).map((key) => [key, object[key]])); -} -function omitObjectProps(object, keys) { - return Object.fromEntries(Object.entries(object).filter(([key]) => !keys.includes(key))); -} -function splitCamelCaseIntoWords(str) { - const camel = str - .split(/(?:[-._])|([A-Z][a-z]+)/) - .filter(isTruthy) - .map((item) => item.toLocaleLowerCase()); - const caps = str - .split(/([A-Z]{2,})/) - .filter((e) => e && e === e.toUpperCase()) - .map((item) => item.toLocaleLowerCase()); - return new Set([...camel, ...caps]); -} -function validateMimeType({ type, value }, { report, location }, allowedValues) { - const ruleType = type === 'consumes' ? 'request' : 'response'; - if (!allowedValues) - throw new Error(`Parameter "allowedValues" is not provided for "${ruleType}-mime-type" rule`); - if (!value[type]) - return; - for (const mime of value[type]) { - if (!allowedValues.includes(mime)) { - report({ - message: `Mime type "${mime}" is not allowed`, - location: location.child(value[type].indexOf(mime)).key(), - }); - } - } -} -function validateMimeTypeOAS3({ type, value }, { report, location }, allowedValues) { - const ruleType = type === 'consumes' ? 'request' : 'response'; - if (!allowedValues) - throw new Error(`Parameter "allowedValues" is not provided for "${ruleType}-mime-type" rule`); - if (!value.content) - return; - for (const mime of Object.keys(value.content)) { - if (!allowedValues.includes(mime)) { - report({ - message: `Mime type "${mime}" is not allowed`, - location: location.child('content').child(mime).key(), - }); - } - } -} -function readFileAsStringSync(filePath) { - return fs.readFileSync(filePath, 'utf-8'); -} -function yamlAndJsonSyncReader(filePath) { - const content = fs.readFileSync(filePath, 'utf-8'); - return (0, js_yaml_1.parseYaml)(content); -} -function isPathParameter(pathSegment) { - return pathSegment.startsWith('{') && pathSegment.endsWith('}'); -} -/** - * Convert Windows backslash paths to slash paths: foo\\bar ➔ foo/bar - */ -function slash(path) { - const isExtendedLengthPath = /^\\\\\?\\/.test(path); - if (isExtendedLengthPath) { - return path; - } - return path.replace(/\\/g, '/'); -} -// TODO: use it everywhere -function isString(value) { - return typeof value === 'string'; -} -function isNotString(value) { - return !isString(value); -} -const assignConfig = (target, obj) => { - if (!obj) - return; - for (const k of Object.keys(obj)) { - if (isPlainObject(target[k]) && typeof obj[k] === 'string') { - target[k].severity = obj[k]; - } - else { - target[k] = obj[k]; - } - } -}; -exports.assignConfig = assignConfig; -function assignOnlyExistingConfig(target, obj) { - if (!obj) - return; - for (const k of Object.keys(obj)) { - if (!target.hasOwnProperty(k)) - continue; - if (isPlainObject(target[k]) && typeof obj[k] === 'string') { - target[k].severity = obj[k]; - } - else { - target[k] = obj[k]; - } - } -} -function getMatchingStatusCodeRange(code) { - return `${code}`.replace(/^(\d)\d\d$/, (_, firstDigit) => `${firstDigit}XX`); -} -function isCustomRuleId(id) { - return id.includes('/'); -} -function doesYamlFileExist(filePath) { - return (((0, path_1.extname)(filePath) === '.yaml' || (0, path_1.extname)(filePath) === '.yml') && - fs?.hasOwnProperty?.('existsSync') && - fs.existsSync(filePath)); -} -function showWarningForDeprecatedField(deprecatedField, updatedField, updatedObject, link) { - const readMoreText = link ? `Read more about this change: ${link}` : ''; - logger_1.logger.warn(`The '${logger_1.colorize.red(deprecatedField)}' field is deprecated. ${updatedField - ? `Use ${logger_1.colorize.green(getUpdatedFieldName(updatedField, updatedObject))} instead. ` - : ''}${readMoreText}\n`); -} -function showErrorForDeprecatedField(deprecatedField, updatedField, updatedObject) { - throw new Error(`Do not use '${deprecatedField}' field. ${updatedField ? `Use '${getUpdatedFieldName(updatedField, updatedObject)}' instead. ` : ''}\n`); -} -function isTruthy(value) { - return !!value; -} -function identity(value) { - return value; -} -function keysOf(obj) { - if (!obj) - return []; - return Object.keys(obj); -} -function pickDefined(obj) { - if (!obj) - return undefined; - const res = {}; - for (const key in obj) { - if (obj[key] !== undefined) { - res[key] = obj[key]; - } - } - return res; -} -function nextTick() { - return new Promise((resolve) => { - setTimeout(resolve); - }); -} -async function pause(ms) { - return new Promise((resolve) => setTimeout(resolve, ms)); -} -function getUpdatedFieldName(updatedField, updatedObject) { - return `${typeof updatedObject !== 'undefined' ? `${updatedObject}.` : ''}${updatedField}`; -} -function getProxyAgent() { - const proxy = process.env.HTTPS_PROXY || process.env.HTTP_PROXY; - return proxy ? new https_proxy_agent_1.HttpsProxyAgent(proxy) : undefined; -} -/** - * Checks if two objects are deeply equal. - * Borrowed the source code from https://github.com/lukeed/dequal. - */ -function dequal(foo, bar) { - let ctor, len; - if (foo === bar) - return true; - if (foo && bar && (ctor = foo.constructor) === bar.constructor) { - if (ctor === Date) - return foo.getTime() === bar.getTime(); - if (ctor === RegExp) - return foo.toString() === bar.toString(); - if (ctor === Array) { - if ((len = foo.length) === bar.length) { - while (len-- && dequal(foo[len], bar[len])) - ; - } - return len === -1; - } - if (!ctor || typeof foo === 'object') { - len = 0; - for (ctor in foo) { - if (Object.prototype.hasOwnProperty.call(foo, ctor) && - ++len && - !Object.prototype.hasOwnProperty.call(bar, ctor)) - return false; - if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) - return false; - } - return Object.keys(bar).length === len; - } - } - return foo !== foo && bar !== bar; -} - - -/***/ }), - -/***/ 23555: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.normalizeVisitors = normalizeVisitors; -const types_1 = __nccwpck_require__(14143); -const legacyTypesMap = { - Root: 'DefinitionRoot', - ServerVariablesMap: 'ServerVariableMap', - Paths: ['PathMap', 'PathsMap'], - CallbacksMap: 'CallbackMap', - MediaTypesMap: 'MediaTypeMap', - ExamplesMap: 'ExampleMap', - EncodingMap: 'EncodingsMap', - HeadersMap: 'HeaderMap', - LinksMap: 'LinkMap', - OAuth2Flows: 'SecuritySchemeFlows', - Responses: 'ResponsesMap', -}; -function normalizeVisitors(visitorsConfig, types) { - const normalizedVisitors = {}; - normalizedVisitors.any = { - enter: [], - leave: [], - }; - for (const typeName of Object.keys(types)) { - normalizedVisitors[typeName] = { - enter: [], - leave: [], - }; - } - normalizedVisitors.ref = { - enter: [], - leave: [], - }; - for (const { ruleId, severity, message, visitor } of visitorsConfig) { - normalizeVisitorLevel({ ruleId, severity, message }, visitor, null); - } - for (const v of Object.keys(normalizedVisitors)) { - normalizedVisitors[v].enter.sort((a, b) => b.depth - a.depth); - normalizedVisitors[v].leave.sort((a, b) => a.depth - b.depth); - } - return normalizedVisitors; - function addWeakNodes(ruleConf, from, to, parentContext, stack = []) { - if (stack.includes(from)) - return; - stack = [...stack, from]; - const possibleChildren = new Set(); - for (const type of Object.values(from.properties)) { - if (type === to) { - addWeakFromStack(ruleConf, stack); - continue; - } - if (typeof type === 'object' && type !== null && type.name) { - possibleChildren.add(type); - } - } - if (from.additionalProperties && typeof from.additionalProperties !== 'function') { - if (from.additionalProperties === to) { - addWeakFromStack(ruleConf, stack); - } - else if (from.additionalProperties.name !== undefined) { - possibleChildren.add(from.additionalProperties); - } - } - if (from.items && typeof from.items !== 'function') { - if (from.items === to) { - addWeakFromStack(ruleConf, stack); - } - else if (from.items.name !== undefined) { - possibleChildren.add(from.items); - } - } - if (from.extensionsPrefix) { - possibleChildren.add(types_1.SpecExtension); - } - for (const fromType of Array.from(possibleChildren.values())) { - addWeakNodes(ruleConf, fromType, to, parentContext, stack); - } - function addWeakFromStack(ruleConf, stack) { - for (const interType of stack.slice(1)) { - normalizedVisitors[interType.name] = normalizedVisitors[interType.name] || { - enter: [], - leave: [], - }; - normalizedVisitors[interType.name].enter.push({ - ...ruleConf, - visit: () => undefined, - depth: 0, - context: { - isSkippedLevel: true, - seen: new Set(), - parent: parentContext, - }, - }); - } - } - } - function findLegacyVisitorNode(visitor, typeName) { - if (Array.isArray(typeName)) { - const name = typeName.find((name) => visitor[name]) || undefined; - return name && visitor[name]; - } - return visitor[typeName]; - } - function normalizeVisitorLevel(ruleConf, visitor, parentContext, depth = 0) { - const visitorKeys = Object.keys(types); - if (depth === 0) { - visitorKeys.push('any'); - visitorKeys.push('ref'); - } - else { - if (visitor.any) { - throw new Error('any() is allowed only on top level'); - } - if (visitor.ref) { - throw new Error('ref() is allowed only on top level'); - } - } - for (const typeName of visitorKeys) { - const typeVisitor = (visitor[typeName] || - findLegacyVisitorNode(visitor, legacyTypesMap[typeName])); - const normalizedTypeVisitor = normalizedVisitors[typeName]; - if (!typeVisitor) - continue; - let visitorEnter; - let visitorLeave; - let visitorSkip; - const isObjectVisitor = typeof typeVisitor === 'object'; - if (typeName === 'ref' && isObjectVisitor && typeVisitor.skip) { - throw new Error('ref() visitor does not support skip'); - } - if (typeof typeVisitor === 'function') { - visitorEnter = typeVisitor; - } - else if (isObjectVisitor) { - visitorEnter = typeVisitor.enter; - visitorLeave = typeVisitor.leave; - visitorSkip = typeVisitor.skip; - } - const context = { - activatedOn: null, - type: types[typeName], - parent: parentContext, - isSkippedLevel: false, - }; - if (typeof typeVisitor === 'object') { - normalizeVisitorLevel(ruleConf, typeVisitor, context, depth + 1); - } - if (parentContext) { - addWeakNodes(ruleConf, parentContext.type, types[typeName], parentContext); - } - if (visitorEnter || isObjectVisitor) { - if (visitorEnter && typeof visitorEnter !== 'function') { - throw new Error('DEV: should be function'); - } - normalizedTypeVisitor.enter.push({ - ...ruleConf, - visit: visitorEnter || (() => undefined), - skip: visitorSkip, - depth, - context, - }); - } - if (visitorLeave) { - if (typeof visitorLeave !== 'function') { - throw new Error('DEV: should be function'); - } - normalizedTypeVisitor.leave.push({ - ...ruleConf, - visit: visitorLeave, - depth, - context, - }); - } - } - } -} - - -/***/ }), - -/***/ 57523: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.walkDocument = walkDocument; -const ref_utils_1 = __nccwpck_require__(97977); -const utils_1 = __nccwpck_require__(75450); -const resolve_1 = __nccwpck_require__(27098); -const types_1 = __nccwpck_require__(14143); -function collectParents(ctx) { - const parents = {}; - while (ctx.parent) { - parents[ctx.parent.type.name] = ctx.parent.activatedOn?.value.node; - ctx = ctx.parent; - } - return parents; -} -function collectParentsLocations(ctx) { - const locations = {}; - while (ctx.parent) { - if (ctx.parent.activatedOn?.value.location) { - locations[ctx.parent.type.name] = ctx.parent.activatedOn?.value.location; - } - ctx = ctx.parent; - } - return locations; -} -function walkDocument(opts) { - const { document, rootType, normalizedVisitors, resolvedRefMap, ctx } = opts; - const seenNodesPerType = {}; - const ignoredNodes = new Set(); - walkNode(document.parsed, rootType, new ref_utils_1.Location(document.source, '#/'), undefined, ''); - function walkNode(node, type, location, parent, key) { - const resolve = (ref, from = currentLocation.source.absoluteRef) => { - if (!(0, ref_utils_1.isRef)(ref)) - return { location, node: ref }; - const refId = (0, resolve_1.makeRefId)(from, ref.$ref); - const resolvedRef = resolvedRefMap.get(refId); - if (!resolvedRef) { - return { - location: undefined, - node: undefined, - }; - } - const { resolved, node, document, nodePointer, error } = resolvedRef; - const newLocation = resolved - ? new ref_utils_1.Location(document.source, nodePointer) - : error instanceof resolve_1.YamlParseError - ? new ref_utils_1.Location(error.source, '') - : undefined; - return { location: newLocation, node, error }; - }; - const rawLocation = location; - let currentLocation = location; - const { node: resolvedNode, location: resolvedLocation, error } = resolve(node); - const enteredContexts = new Set(); - if ((0, ref_utils_1.isRef)(node)) { - const refEnterVisitors = normalizedVisitors.ref.enter; - for (const { visit: visitor, ruleId, severity, message, context } of refEnterVisitors) { - enteredContexts.add(context); - const report = reportFn.bind(undefined, ruleId, severity, message); - visitor(node, { - report, - resolve, - rawNode: node, - rawLocation, - location, - type, - parent, - key, - parentLocations: {}, - oasVersion: ctx.oasVersion, - getVisitorData: getVisitorDataFn.bind(undefined, ruleId), - }, { node: resolvedNode, location: resolvedLocation, error }); - if (resolvedLocation?.source.absoluteRef && ctx.refTypes) { - ctx.refTypes.set(resolvedLocation?.source.absoluteRef, type); - } - } - } - if (resolvedNode !== undefined && resolvedLocation && type.name !== 'scalar') { - currentLocation = resolvedLocation; - const isNodeSeen = seenNodesPerType[type.name]?.has?.(resolvedNode); - let visitedBySome = false; - const anyEnterVisitors = normalizedVisitors.any.enter; - const currentEnterVisitors = anyEnterVisitors.concat(normalizedVisitors[type.name]?.enter || []); - const activatedContexts = []; - for (const { context, visit, skip, ruleId, severity, message } of currentEnterVisitors) { - if (ignoredNodes.has(`${currentLocation.absolutePointer}${currentLocation.pointer}`)) - break; - if (context.isSkippedLevel) { - if (context.parent.activatedOn && - !context.parent.activatedOn.value.nextLevelTypeActivated && - !context.seen.has(node)) { - // TODO: test for walk through duplicated $ref-ed node - context.seen.add(node); - visitedBySome = true; - activatedContexts.push(context); - } - } - else { - if ((context.parent && // if nested - context.parent.activatedOn && - context.activatedOn?.value.withParentNode !== context.parent.activatedOn.value.node && - // do not enter if visited by parent children (it works thanks because deeper visitors are sorted before) - context.parent.activatedOn.value.nextLevelTypeActivated?.value !== type) || - (!context.parent && !isNodeSeen) // if top-level visit each node just once - ) { - activatedContexts.push(context); - const activatedOn = { - node: resolvedNode, - location: resolvedLocation, - nextLevelTypeActivated: null, - withParentNode: context.parent?.activatedOn?.value.node, - skipped: (context.parent?.activatedOn?.value.skipped || - skip?.(resolvedNode, key, { - location, - rawLocation, - resolve, - rawNode: node, - })) ?? - false, - }; - context.activatedOn = (0, utils_1.pushStack)(context.activatedOn, activatedOn); - let ctx = context.parent; - while (ctx) { - ctx.activatedOn.value.nextLevelTypeActivated = (0, utils_1.pushStack)(ctx.activatedOn.value.nextLevelTypeActivated, type); - ctx = ctx.parent; - } - if (!activatedOn.skipped) { - visitedBySome = true; - enteredContexts.add(context); - visitWithContext(visit, resolvedNode, node, context, ruleId, severity, message); - } - } - } - } - if (visitedBySome || !isNodeSeen) { - seenNodesPerType[type.name] = seenNodesPerType[type.name] || new Set(); - seenNodesPerType[type.name].add(resolvedNode); - if (Array.isArray(resolvedNode)) { - const itemsType = type.items; - if (itemsType !== undefined) { - const isTypeAFunction = typeof itemsType === 'function'; - for (let i = 0; i < resolvedNode.length; i++) { - const itemType = isTypeAFunction - ? itemsType(resolvedNode[i], resolvedLocation.child([i]).absolutePointer) - : itemsType; - if ((0, types_1.isNamedType)(itemType)) { - walkNode(resolvedNode[i], itemType, resolvedLocation.child([i]), resolvedNode, i); - } - } - } - } - else if (typeof resolvedNode === 'object' && resolvedNode !== null) { - // visit in order from type-tree first - const props = Object.keys(type.properties); - if (type.additionalProperties) { - props.push(...Object.keys(resolvedNode).filter((k) => !props.includes(k))); - } - else if (type.extensionsPrefix) { - props.push(...Object.keys(resolvedNode).filter((k) => k.startsWith(type.extensionsPrefix))); - } - if ((0, ref_utils_1.isRef)(node)) { - props.push(...Object.keys(node).filter((k) => k !== '$ref' && !props.includes(k))); // properties on the same level as $ref - } - for (const propName of props) { - let value = resolvedNode[propName]; - let loc = resolvedLocation; - if (value === undefined) { - value = node[propName]; - loc = location; // properties on the same level as $ref should resolve against original location, not target - } - let propType = type.properties[propName]; - if (propType === undefined) - propType = type.additionalProperties; - if (typeof propType === 'function') - propType = propType(value, propName); - if (propType === undefined && - type.extensionsPrefix && - propName.startsWith(type.extensionsPrefix)) { - propType = types_1.SpecExtension; - } - if (!(0, types_1.isNamedType)(propType) && propType?.directResolveAs) { - propType = propType.directResolveAs; - value = { $ref: value }; - } - if (propType && propType.name === undefined && propType.resolvable !== false) { - propType = { name: 'scalar', properties: {} }; - } - if (!(0, types_1.isNamedType)(propType) || (propType.name === 'scalar' && !(0, ref_utils_1.isRef)(value))) { - continue; - } - walkNode(value, propType, loc.child([propName]), resolvedNode, propName); - } - } - } - const anyLeaveVisitors = normalizedVisitors.any.leave; - const currentLeaveVisitors = (normalizedVisitors[type.name]?.leave || []).concat(anyLeaveVisitors); - for (const context of activatedContexts.reverse()) { - if (context.isSkippedLevel) { - context.seen.delete(resolvedNode); - } - else { - context.activatedOn = (0, utils_1.popStack)(context.activatedOn); - if (context.parent) { - let ctx = context.parent; - while (ctx) { - ctx.activatedOn.value.nextLevelTypeActivated = (0, utils_1.popStack)(ctx.activatedOn.value.nextLevelTypeActivated); - ctx = ctx.parent; - } - } - } - } - for (const { context, visit, ruleId, severity, message } of currentLeaveVisitors) { - if (!context.isSkippedLevel && enteredContexts.has(context)) { - visitWithContext(visit, resolvedNode, node, context, ruleId, severity, message); - } - } - } - currentLocation = location; - if ((0, ref_utils_1.isRef)(node)) { - const refLeaveVisitors = normalizedVisitors.ref.leave; - for (const { visit: visitor, ruleId, severity, context, message } of refLeaveVisitors) { - if (enteredContexts.has(context)) { - const report = reportFn.bind(undefined, ruleId, severity, message); - visitor(node, { - report, - resolve, - rawNode: node, - rawLocation, - location, - type, - parent, - key, - parentLocations: {}, - oasVersion: ctx.oasVersion, - getVisitorData: getVisitorDataFn.bind(undefined, ruleId), - }, { node: resolvedNode, location: resolvedLocation, error }); - } - } - } - // returns true ignores all the next visitors on the specific node - function visitWithContext(visit, resolvedNode, node, context, ruleId, severity, customMessage) { - const report = reportFn.bind(undefined, ruleId, severity, customMessage); - visit(resolvedNode, { - report, - resolve, - rawNode: node, - location: currentLocation, - rawLocation, - type, - parent, - key, - parentLocations: collectParentsLocations(context), - oasVersion: ctx.oasVersion, - ignoreNextVisitorsOnNode: () => { - ignoredNodes.add(`${currentLocation.absolutePointer}${currentLocation.pointer}`); - }, - getVisitorData: getVisitorDataFn.bind(undefined, ruleId), - }, collectParents(context), context); - } - function reportFn(ruleId, severity, customMessage, opts) { - const normalizedLocation = opts.location - ? Array.isArray(opts.location) - ? opts.location - : [opts.location] - : [{ ...currentLocation, reportOnKey: false }]; - const location = normalizedLocation.map((l) => ({ - ...currentLocation, - reportOnKey: false, - ...l, - })); - const ruleSeverity = opts.forceSeverity || severity; - if (ruleSeverity !== 'off') { - ctx.problems.push({ - ruleId: opts.ruleId || ruleId, - severity: ruleSeverity, - ...opts, - message: customMessage - ? customMessage.replace('{{message}}', opts.message) - : opts.message, - suggest: opts.suggest || [], - location, - }); - } - } - function getVisitorDataFn(ruleId) { - ctx.visitorsData[ruleId] = ctx.visitorsData[ruleId] || {}; - return ctx.visitorsData[ruleId]; - } - } -} - - -/***/ }), - -/***/ 76734: -/***/ ((module) => { - -const isWindows = typeof process === 'object' && - process && - process.platform === 'win32' -module.exports = isWindows ? { sep: '\\' } : { sep: '/' } - - -/***/ }), - -/***/ 30934: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const minimatch = module.exports = (p, pattern, options = {}) => { - assertValidPattern(pattern) - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - return new Minimatch(pattern, options).match(p) -} - -module.exports = minimatch - -const path = __nccwpck_require__(76734) -minimatch.sep = path.sep - -const GLOBSTAR = Symbol('globstar **') -minimatch.GLOBSTAR = GLOBSTAR -const expand = __nccwpck_require__(33717) - -const plTypes = { - '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, - '?': { open: '(?:', close: ')?' }, - '+': { open: '(?:', close: ')+' }, - '*': { open: '(?:', close: ')*' }, - '@': { open: '(?:', close: ')' } -} - -// any single thing other than / -// don't need to escape / when using new RegExp() -const qmark = '[^/]' - -// * => any number of characters -const star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -const twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -const twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// "abc" -> { a:true, b:true, c:true } -const charSet = s => s.split('').reduce((set, c) => { - set[c] = true - return set -}, {}) - -// characters that need to be escaped in RegExp. -const reSpecials = charSet('().*{}+?[]^$\\!') - -// characters that indicate we have to add the pattern start -const addPatternStartSet = charSet('[.(') - -// normalizes slashes. -const slashSplit = /\/+/ - -minimatch.filter = (pattern, options = {}) => - (p, i, list) => minimatch(p, pattern, options) - -const ext = (a, b = {}) => { - const t = {} - Object.keys(a).forEach(k => t[k] = a[k]) - Object.keys(b).forEach(k => t[k] = b[k]) - return t -} - -minimatch.defaults = def => { - if (!def || typeof def !== 'object' || !Object.keys(def).length) { - return minimatch - } - - const orig = minimatch - - const m = (p, pattern, options) => orig(p, pattern, ext(def, options)) - m.Minimatch = class Minimatch extends orig.Minimatch { - constructor (pattern, options) { - super(pattern, ext(def, options)) - } - } - m.Minimatch.defaults = options => orig.defaults(ext(def, options)).Minimatch - m.filter = (pattern, options) => orig.filter(pattern, ext(def, options)) - m.defaults = options => orig.defaults(ext(def, options)) - m.makeRe = (pattern, options) => orig.makeRe(pattern, ext(def, options)) - m.braceExpand = (pattern, options) => orig.braceExpand(pattern, ext(def, options)) - m.match = (list, pattern, options) => orig.match(list, pattern, ext(def, options)) - - return m -} - - - - - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = (pattern, options) => braceExpand(pattern, options) - -const braceExpand = (pattern, options = {}) => { - assertValidPattern(pattern) - - // Thanks to Yeting Li for - // improving this regexp to avoid a ReDOS vulnerability. - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -const MAX_PATTERN_LENGTH = 1024 * 64 -const assertValidPattern = pattern => { - if (typeof pattern !== 'string') { - throw new TypeError('invalid pattern') - } - - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError('pattern is too long') - } -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -const SUBPARSE = Symbol('subparse') - -minimatch.makeRe = (pattern, options) => - new Minimatch(pattern, options || {}).makeRe() - -minimatch.match = (list, pattern, options = {}) => { - const mm = new Minimatch(pattern, options) - list = list.filter(f => mm.match(f)) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -// replace stuff like \* with * -const globUnescape = s => s.replace(/\\(.)/g, '$1') -const charUnescape = s => s.replace(/\\([^-\]])/g, '$1') -const regExpEscape = s => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -const braExpEscape = s => s.replace(/[[\]\\]/g, '\\$&') - -class Minimatch { - constructor (pattern, options) { - assertValidPattern(pattern) - - if (!options) options = {} - - this.options = options - this.maxGlobstarRecursion = options.maxGlobstarRecursion !== undefined - ? options.maxGlobstarRecursion : 200 - this.set = [] - this.pattern = pattern - this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || - options.allowWindowsEscape === false - if (this.windowsPathsNoEscape) { - this.pattern = this.pattern.replace(/\\/g, '/') - } - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - this.partial = !!options.partial - - // make the set of regexps etc. - this.make() - } - - debug () {} - - make () { - const pattern = this.pattern - const options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - let set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = (...args) => console.error(...args) - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(s => s.split(slashSplit)) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map((s, si, set) => s.map(this.parse, this)) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(s => s.indexOf(false) === -1) - - this.debug(this.pattern, set) - - this.set = set - } - - parseNegate () { - if (this.options.nonegate) return - - const pattern = this.pattern - let negate = false - let negateOffset = 0 - - for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.slice(negateOffset) - this.negate = negate - } - - // set partial to true to test if, for example, - // "/a/b" matches the start of "/*/b/*/d" - // Partial means, if you run out of file before you run - // out of pattern, then that's fine, as long as all - // the parts match. - matchOne (file, pattern, partial) { - if (pattern.indexOf(GLOBSTAR) !== -1) { - return this._matchGlobstar(file, pattern, partial, 0, 0) - } - return this._matchOne(file, pattern, partial, 0, 0) - } - - _matchGlobstar (file, pattern, partial, fileIndex, patternIndex) { - // find first globstar from patternIndex - let firstgs = -1 - for (let i = patternIndex; i < pattern.length; i++) { - if (pattern[i] === GLOBSTAR) { firstgs = i; break } - } - - // find last globstar - let lastgs = -1 - for (let i = pattern.length - 1; i >= 0; i--) { - if (pattern[i] === GLOBSTAR) { lastgs = i; break } - } - - const head = pattern.slice(patternIndex, firstgs) - const body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs) - const tail = partial ? [] : pattern.slice(lastgs + 1) - - // check the head - if (head.length) { - const fileHead = file.slice(fileIndex, fileIndex + head.length) - if (!this._matchOne(fileHead, head, partial, 0, 0)) { - return false - } - fileIndex += head.length - } - - // check the tail - let fileTailMatch = 0 - if (tail.length) { - if (tail.length + fileIndex > file.length) return false - - const tailStart = file.length - tail.length - if (this._matchOne(file, tail, partial, tailStart, 0)) { - fileTailMatch = tail.length - } else { - // affordance for stuff like a/**/* matching a/b/ - if (file[file.length - 1] !== '' || - fileIndex + tail.length === file.length) { - return false - } - if (!this._matchOne(file, tail, partial, tailStart - 1, 0)) { - return false - } - fileTailMatch = tail.length + 1 - } - } - - // if body is empty (single ** between head and tail) - if (!body.length) { - let sawSome = !!fileTailMatch - for (let i = fileIndex; i < file.length - fileTailMatch; i++) { - const f = String(file[i]) - sawSome = true - if (f === '.' || f === '..' || - (!this.options.dot && f.charAt(0) === '.')) { - return false - } - } - return partial || sawSome - } - - // split body into segments at each GLOBSTAR - const bodySegments = [[[], 0]] - let currentBody = bodySegments[0] - let nonGsParts = 0 - const nonGsPartsSums = [0] - for (const b of body) { - if (b === GLOBSTAR) { - nonGsPartsSums.push(nonGsParts) - currentBody = [[], 0] - bodySegments.push(currentBody) - } else { - currentBody[0].push(b) - nonGsParts++ - } - } - - let idx = bodySegments.length - 1 - const fileLength = file.length - fileTailMatch - for (const b of bodySegments) { - b[1] = fileLength - (nonGsPartsSums[idx--] + b[0].length) - } - - return !!this._matchGlobStarBodySections( - file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch - ) - } - - // return false for "nope, not matching" - // return null for "not matching, cannot keep trying" - _matchGlobStarBodySections ( - file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail - ) { - const bs = bodySegments[bodyIndex] - if (!bs) { - // just make sure there are no bad dots - for (let i = fileIndex; i < file.length; i++) { - sawTail = true - const f = file[i] - if (f === '.' || f === '..' || - (!this.options.dot && f.charAt(0) === '.')) { - return false - } - } - return sawTail - } - - const [body, after] = bs - while (fileIndex <= after) { - const m = this._matchOne( - file.slice(0, fileIndex + body.length), - body, - partial, - fileIndex, - 0 - ) - // if limit exceeded, no match. intentional false negative, - // acceptable break in correctness for security. - if (m && globStarDepth < this.maxGlobstarRecursion) { - const sub = this._matchGlobStarBodySections( - file, bodySegments, - fileIndex + body.length, bodyIndex + 1, - partial, globStarDepth + 1, sawTail - ) - if (sub !== false) { - return sub - } - } - const f = file[fileIndex] - if (f === '.' || f === '..' || - (!this.options.dot && f.charAt(0) === '.')) { - return false - } - fileIndex++ - } - return partial || null - } - - _matchOne (file, pattern, partial, fileIndex, patternIndex) { - let fi, pi, fl, pl - for ( - fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++ - ) { - this.debug('matchOne loop') - const p = pattern[pi] - const f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - /* istanbul ignore if */ - if (p === false || p === GLOBSTAR) return false - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - let hit - if (typeof p === 'string') { - hit = f === p - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else /* istanbul ignore else */ if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - return (fi === fl - 1) && (file[fi] === '') - } - - // should be unreachable. - /* istanbul ignore next */ - throw new Error('wtf?') - } - - braceExpand () { - return braceExpand(this.pattern, this.options) - } - - parse (pattern, isSub) { - assertValidPattern(pattern) - - const options = this.options - - // shortcuts - if (pattern === '**') { - if (!options.noglobstar) - return GLOBSTAR - else - pattern = '*' - } - if (pattern === '') return '' - - let re = '' - let hasMagic = false - let escaping = false - // ? => one single character - const patternListStack = [] - const negativeLists = [] - let stateChar - let inClass = false - let reClassStart = -1 - let classStart = -1 - let cs - let pl - let sp - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. However, if the pattern - // starts with ., then traversal patterns can match. - let dotTravAllowed = pattern.charAt(0) === '.' - let dotFileAllowed = options.dot || dotTravAllowed - const patternStart = () => - dotTravAllowed - ? '' - : dotFileAllowed - ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' - : '(?!\\.)' - const subPatternStart = (p) => - p.charAt(0) === '.' - ? '' - : options.dot - ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))' - : '(?!\\.)' - - - const clearStateChar = () => { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - this.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (let i = 0, c; (i < pattern.length) && (c = pattern.charAt(i)); i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping) { - /* istanbul ignore next - completely not allowed, even escaped. */ - if (c === '/') { - return false - } - - if (reSpecials[c]) { - re += '\\' - } - re += c - escaping = false - continue - } - - switch (c) { - /* istanbul ignore next */ - case '/': { - // Should already be path-split by now. - return false - } - - case '\\': - if (inClass && pattern.charAt(i + 1) === '-') { - re += c - continue - } - - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // coalesce consecutive non-globstar * characters - if (c === '*' && stateChar === '*') continue - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - this.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': { - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - const plEntry = { - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close, - } - this.debug(this.pattern, '\t', plEntry) - patternListStack.push(plEntry) - // negation is (?:(?!(?:js)(?:))[^/]*) - re += plEntry.open - // next entry starts with a dot maybe? - if (plEntry.start === 0 && plEntry.type !== '!') { - dotTravAllowed = true - re += subPatternStart(pattern.slice(i + 1)) - } - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - } - - case ')': { - const plEntry = patternListStack[patternListStack.length - 1] - if (inClass || !plEntry) { - re += '\\)' - continue - } - patternListStack.pop() - - // closing an extglob - clearStateChar() - hasMagic = true - pl = plEntry - // negation is (?:(?!js)[^/]*) - // The others are (?:) - re += pl.close - if (pl.type === '!') { - negativeLists.push(Object.assign(pl, { reEnd: re.length })) - } - continue - } - - case '|': { - const plEntry = patternListStack[patternListStack.length - 1] - if (inClass || !plEntry) { - re += '\\|' - continue - } - - clearStateChar() - re += '|' - // next subpattern can start with a dot? - if (plEntry.start === 0 && plEntry.type !== '!') { - dotTravAllowed = true - re += subPatternStart(pattern.slice(i + 1)) - } - continue - } - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - continue - } - - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + braExpEscape(charUnescape(cs)) + ']') - // looks good, finish up the class. - re += c - } catch (er) { - // out of order ranges in JS are errors, but in glob syntax, - // they're just a range that matches nothing. - re = re.substring(0, reClassStart) + '(?:$.)' // match nothing ever - } - hasMagic = true - inClass = false - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (reSpecials[c] && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - break - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.slice(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substring(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - let tail - tail = re.slice(pl.reStart + pl.open.length) - this.debug('setting tail', re, pl) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_, $1, $2) => { - /* istanbul ignore else - should already be done */ - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail, pl, re) - const t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - const addPatternStart = addPatternStartSet[re.charAt(0)] - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (let n = negativeLists.length - 1; n > -1; n--) { - const nl = negativeLists[n] - - const nlBefore = re.slice(0, nl.reStart) - const nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - let nlAfter = re.slice(nl.reEnd) - const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - const closeParensBefore = nlBefore.split(')').length - const openParensBefore = nlBefore.split('(').length - closeParensBefore - let cleanAfter = nlAfter - for (let i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - const dollar = nlAfter === '' && isSub !== SUBPARSE ? '(?:$|\\/)' : '' - - re = nlBefore + nlFirst + nlAfter + dollar + nlLast - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart() + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // if it's nocase, and the lcase/uppercase don't match, it's magic - if (options.nocase && !hasMagic) { - hasMagic = pattern.toUpperCase() !== pattern.toLowerCase() - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - const flags = options.nocase ? 'i' : '' - try { - return Object.assign(new RegExp('^' + re + '$', flags), { - _glob: pattern, - _src: re, - }) - } catch (er) /* istanbul ignore next - should be impossible */ { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.') - } - } - - makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - const set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - const options = this.options - - const twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - const flags = options.nocase ? 'i' : '' - - // coalesce globstars and regexpify non-globstar patterns - // if it's the only item, then we just do one twoStar - // if it's the first, and there are more, prepend (\/|twoStar\/)? to next - // if it's the last, append (\/twoStar|) to previous - // if it's in the middle, append (\/|\/twoStar\/) to previous - // then filter out GLOBSTAR symbols - let re = set.map(pattern => { - pattern = pattern.map(p => - typeof p === 'string' ? regExpEscape(p) - : p === GLOBSTAR ? GLOBSTAR - : p._src - ).reduce((set, p) => { - if (!(set[set.length - 1] === GLOBSTAR && p === GLOBSTAR)) { - set.push(p) - } - return set - }, []) - pattern.forEach((p, i) => { - if (p !== GLOBSTAR || pattern[i-1] === GLOBSTAR) { - return - } - if (i === 0) { - if (pattern.length > 1) { - pattern[i+1] = '(?:\\\/|' + twoStar + '\\\/)?' + pattern[i+1] - } else { - pattern[i] = twoStar - } - } else if (i === pattern.length - 1) { - pattern[i-1] += '(?:\\\/|' + twoStar + ')?' - } else { - pattern[i-1] += '(?:\\\/|\\\/' + twoStar + '\\\/)' + pattern[i+1] - pattern[i+1] = GLOBSTAR - } - }) - return pattern.filter(p => p !== GLOBSTAR).join('/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) /* istanbul ignore next - should be impossible */ { - this.regexp = false - } - return this.regexp - } - - match (f, partial = this.partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - const options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - const set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - let filename - for (let i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (let i = 0; i < set.length; i++) { - const pattern = set[i] - let file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - const hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate - } - - static defaults (def) { - return minimatch.defaults(def).Minimatch - } -} - -minimatch.Minimatch = Minimatch - - -/***/ }), - -/***/ 8348: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.req = exports.json = exports.toBuffer = void 0; -const http = __importStar(__nccwpck_require__(13685)); -const https = __importStar(__nccwpck_require__(95687)); -async function toBuffer(stream) { - let length = 0; - const chunks = []; - for await (const chunk of stream) { - length += chunk.length; - chunks.push(chunk); - } - return Buffer.concat(chunks, length); -} -exports.toBuffer = toBuffer; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -async function json(stream) { - const buf = await toBuffer(stream); - const str = buf.toString('utf8'); - try { - return JSON.parse(str); - } - catch (_err) { - const err = _err; - err.message += ` (input: ${str})`; - throw err; - } -} -exports.json = json; -function req(url, opts = {}) { - const href = typeof url === 'string' ? url : url.href; - const req = (href.startsWith('https:') ? https : http).request(url, opts); - const promise = new Promise((resolve, reject) => { - req - .once('response', resolve) - .once('error', reject) - .end(); - }); - req.then = promise.then.bind(promise); - return req; -} -exports.req = req; -//# sourceMappingURL=helpers.js.map - -/***/ }), - -/***/ 70694: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -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 })); -exports.Agent = void 0; -const net = __importStar(__nccwpck_require__(41808)); -const http = __importStar(__nccwpck_require__(13685)); -const https_1 = __nccwpck_require__(95687); -__exportStar(__nccwpck_require__(8348), exports); -const INTERNAL = Symbol('AgentBaseInternalState'); -class Agent extends http.Agent { - constructor(opts) { - super(opts); - this[INTERNAL] = {}; - } - /** - * Determine whether this is an `http` or `https` request. - */ - isSecureEndpoint(options) { - if (options) { - // First check the `secureEndpoint` property explicitly, since this - // means that a parent `Agent` is "passing through" to this instance. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - if (typeof options.secureEndpoint === 'boolean') { - return options.secureEndpoint; - } - // If no explicit `secure` endpoint, check if `protocol` property is - // set. This will usually be the case since using a full string URL - // or `URL` instance should be the most common usage. - if (typeof options.protocol === 'string') { - return options.protocol === 'https:'; - } - } - // Finally, if no `protocol` property was set, then fall back to - // checking the stack trace of the current call stack, and try to - // detect the "https" module. - 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); - } - // In order to support async signatures in `connect()` and Node's native - // connection pooling in `http.Agent`, the array of sockets for each origin - // has to be updated synchronously. This is so the length of the array is - // accurate when `addRequest()` is next called. We achieve this by creating a - // fake socket and adding it to `sockets[origin]` and incrementing - // `totalSocketCount`. - incrementSockets(name) { - // If `maxSockets` and `maxTotalSockets` are both Infinity then there is no - // need to create a fake socket because Node.js native connection pooling - // will never be invoked. - if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) { - return null; - } - // All instances of `sockets` are expected TypeScript errors. The - // alternative is to add it as a private property of this class but that - // will break TypeScript subclassing. - if (!this.sockets[name]) { - // @ts-expect-error `sockets` is readonly in `@types/node` - this.sockets[name] = []; - } - const fakeSocket = new net.Socket({ writable: false }); - this.sockets[name].push(fakeSocket); - // @ts-expect-error `totalSocketCount` isn't defined in `@types/node` - this.totalSocketCount++; - return fakeSocket; - } - decrementSockets(name, socket) { - if (!this.sockets[name] || socket === null) { - return; - } - const sockets = this.sockets[name]; - const index = sockets.indexOf(socket); - if (index !== -1) { - sockets.splice(index, 1); - // @ts-expect-error `totalSocketCount` isn't defined in `@types/node` - this.totalSocketCount--; - if (sockets.length === 0) { - // @ts-expect-error `sockets` is readonly in `@types/node` - delete this.sockets[name]; - } - } - } - // In order to properly update the socket pool, we need to call `getName()` on - // the core `https.Agent` if it is a secureEndpoint. - getName(options) { - const secureEndpoint = typeof options.secureEndpoint === 'boolean' - ? options.secureEndpoint - : this.isSecureEndpoint(options); - if (secureEndpoint) { - // @ts-expect-error `getName()` isn't defined in `@types/node` - return https_1.Agent.prototype.getName.call(this, options); - } - // @ts-expect-error `getName()` isn't defined in `@types/node` - return super.getName(options); - } - createSocket(req, options, cb) { - const connectOpts = { - ...options, - secureEndpoint: this.isSecureEndpoint(options), - }; - const name = this.getName(connectOpts); - const fakeSocket = this.incrementSockets(name); - Promise.resolve() - .then(() => this.connect(req, connectOpts)) - .then((socket) => { - this.decrementSockets(name, fakeSocket); - if (socket instanceof http.Agent) { - try { - // @ts-expect-error `addRequest()` isn't defined in `@types/node` - return socket.addRequest(req, connectOpts); - } - catch (err) { - return cb(err); - } - } - this[INTERNAL].currentSocket = socket; - // @ts-expect-error `createSocket()` isn't defined in `@types/node` - super.createSocket(req, options, cb); - }, (err) => { - this.decrementSockets(name, fakeSocket); - cb(err); - }); - } - createConnection() { - const socket = this[INTERNAL].currentSocket; - this[INTERNAL].currentSocket = undefined; - if (!socket) { - throw new Error('No socket was returned in the `connect()` function'); - } - return socket; - } - get defaultPort() { - return (this[INTERNAL].defaultPort ?? - (this.protocol === 'https:' ? 443 : 80)); - } - set defaultPort(v) { - if (this[INTERNAL]) { - this[INTERNAL].defaultPort = v; - } - } - get protocol() { - return (this[INTERNAL].protocol ?? - (this.isSecureEndpoint() ? 'https:' : 'http:')); - } - set protocol(v) { - if (this[INTERNAL]) { - this[INTERNAL].protocol = v; - } - } -} -exports.Agent = Agent; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 9417: -/***/ ((module) => { - -"use strict"; - -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - if(a===b) { - return [ai, bi]; - } - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} - - -/***/ }), - -/***/ 83682: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var register = __nccwpck_require__(44670); -var addHook = __nccwpck_require__(5549); -var removeHook = __nccwpck_require__(6819); - -// bind with array of arguments: https://stackoverflow.com/a/21792913 -var bind = Function.bind; -var bindable = bind.bind(bind); - -function bindApi(hook, state, name) { - var removeHookRef = bindable(removeHook, null).apply( - null, - name ? [state, name] : [state] - ); - hook.api = { remove: removeHookRef }; - hook.remove = removeHookRef; - ["before", "error", "after", "wrap"].forEach(function (kind) { - var args = name ? [state, kind, name] : [state, kind]; - hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); - }); -} - -function HookSingular() { - var singularHookName = "h"; - var singularHookState = { - registry: {}, - }; - var singularHook = register.bind(null, singularHookState, singularHookName); - bindApi(singularHook, singularHookState, singularHookName); - return singularHook; -} - -function HookCollection() { - var state = { - registry: {}, - }; - - var hook = register.bind(null, state); - bindApi(hook, state); - - return hook; -} - -var collectionHookDeprecationMessageDisplayed = false; -function Hook() { - if (!collectionHookDeprecationMessageDisplayed) { - console.warn( - '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' - ); - collectionHookDeprecationMessageDisplayed = true; - } - return HookCollection(); -} - -Hook.Singular = HookSingular.bind(); -Hook.Collection = HookCollection.bind(); - -module.exports = Hook; -// expose constructors as a named property for TypeScript -module.exports.Hook = Hook; -module.exports.Singular = Hook.Singular; -module.exports.Collection = Hook.Collection; - - -/***/ }), - -/***/ 5549: -/***/ ((module) => { - -module.exports = addHook; - -function addHook(state, kind, name, hook) { - var orig = hook; - if (!state.registry[name]) { - state.registry[name] = []; - } - - if (kind === "before") { - hook = function (method, options) { - return Promise.resolve() - .then(orig.bind(null, options)) - .then(method.bind(null, options)); - }; - } - - if (kind === "after") { - hook = function (method, options) { - var result; - return Promise.resolve() - .then(method.bind(null, options)) - .then(function (result_) { - result = result_; - return orig(result, options); - }) - .then(function () { - return result; - }); - }; - } - - if (kind === "error") { - hook = function (method, options) { - return Promise.resolve() - .then(method.bind(null, options)) - .catch(function (error) { - return orig(error, options); - }); - }; - } - - state.registry[name].push({ - hook: hook, - orig: orig, - }); -} - - -/***/ }), - -/***/ 44670: -/***/ ((module) => { - -module.exports = register; - -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(function (callback, name) { - return register.bind(null, state, name, callback, options); - }, method)(); - } - - return Promise.resolve().then(function () { - if (!state.registry[name]) { - return method(options); - } - - return state.registry[name].reduce(function (method, registered) { - return registered.hook.bind(null, method, options); - }, method)(); - }); -} - - -/***/ }), - -/***/ 6819: -/***/ ((module) => { - -module.exports = removeHook; - -function removeHook(state, name, method) { - if (!state.registry[name]) { - return; - } - - var index = state.registry[name] - .map(function (registered) { - return registered.orig; - }) - .indexOf(method); - - if (index === -1) { - return; - } - - state.registry[name].splice(index, 1); -} - - -/***/ }), - -/***/ 33717: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var balanced = __nccwpck_require__(9417); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str, options) { - if (!str) - return []; - - options = options || {}; - var max = options.max == null ? Infinity : options.max; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), max, true).map(unescapeBraces); -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, max, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m) return [str]; - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, max, false) - : ['']; - - if (/\$$/.test(m.pre)) { - for (var k = 0; k < post.length && k < max; k++) { - var expansion = pre+ '{' + m.body + '}' + post[k]; - expansions.push(expansion); - } - } else { - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,(?!,).*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str, max, true); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], max, false).map(embrace); - if (n.length === 1) { - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.max(Math.abs(numeric(n[2])), 1) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = []; - - for (var j = 0; j < n.length; j++) { - N.push.apply(N, expand(n[j], max, false)); - } - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length && expansions.length < max; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - } - - return expansions; -} - - -/***/ }), - -/***/ 86891: -/***/ ((module) => { - -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - - -/***/ }), - -/***/ 28222: -/***/ ((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; - } - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - 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 && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$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'); - } 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__(46243)(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; - } -}; - - -/***/ }), - -/***/ 46243: -/***/ ((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__(80900); - 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 = []; - - let i; - const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - const len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } - - namespaces = split[i].replace(/\*/g, '.*?'); - - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).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) { - if (name[name.length - 1] === '*') { - return true; - } - - let i; - let len; - - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - - return false; - } - - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - function toNamespace(regexp) { - return regexp.toString() - .substring(2, regexp.toString().length - 2) - .replace(/\.\*\?$/, '*'); - } - - /** - * 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; - - -/***/ }), - -/***/ 38237: -/***/ ((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__(28222); -} else { - module.exports = __nccwpck_require__(35332); -} - - -/***/ }), - -/***/ 35332: -/***/ ((module, exports, __nccwpck_require__) => { - -/** - * Module dependencies. - */ - -const tty = __nccwpck_require__(76224); -const util = __nccwpck_require__(73837); - -/** - * 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__(59318); - - 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.format()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.format(...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__(46243)(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); -}; - - -/***/ }), - -/***/ 58932: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -class Deprecation extends Error { - constructor(message) { - super(message); // Maintains proper stack trace (only available on V8) - - /* istanbul ignore next */ - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - - this.name = 'Deprecation'; - } - -} - -exports.Deprecation = Deprecation; - - -/***/ }), - -/***/ 28206: -/***/ ((module) => { - -"use strict"; - - -// do not edit .js files directly - edit src/index.jst - - - -module.exports = function equal(a, b) { - if (a === b) return true; - - if (a && b && typeof a == 'object' && typeof b == 'object') { - if (a.constructor !== b.constructor) return false; - - var length, i, keys; - if (Array.isArray(a)) { - length = a.length; - if (length != b.length) return false; - for (i = length; i-- !== 0;) - if (!equal(a[i], b[i])) return false; - return true; - } - - - - if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; - if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); - if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); - - keys = Object.keys(a); - length = keys.length; - if (length !== Object.keys(b).length) return false; - - for (i = length; i-- !== 0;) - if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; - - for (i = length; i-- !== 0;) { - var key = keys[i]; - - if (!equal(a[key], b[key])) return false; - } - - return true; - } - - // true if both NaN, false otherwise - return a!==a && b!==b; -}; - - -/***/ }), - -/***/ 46863: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = realpath -realpath.realpath = realpath -realpath.sync = realpathSync -realpath.realpathSync = realpathSync -realpath.monkeypatch = monkeypatch -realpath.unmonkeypatch = unmonkeypatch - -var fs = __nccwpck_require__(57147) -var origRealpath = fs.realpath -var origRealpathSync = fs.realpathSync - -var version = process.version -var ok = /^v[0-5]\./.test(version) -var old = __nccwpck_require__(71734) - -function newError (er) { - return er && er.syscall === 'realpath' && ( - er.code === 'ELOOP' || - er.code === 'ENOMEM' || - er.code === 'ENAMETOOLONG' - ) -} - -function realpath (p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb) - } - - if (typeof cache === 'function') { - cb = cache - cache = null - } - origRealpath(p, cache, function (er, result) { - if (newError(er)) { - old.realpath(p, cache, cb) - } else { - cb(er, result) - } - }) -} - -function realpathSync (p, cache) { - if (ok) { - return origRealpathSync(p, cache) - } - - try { - return origRealpathSync(p, cache) - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache) - } else { - throw er - } - } -} - -function monkeypatch () { - fs.realpath = realpath - fs.realpathSync = realpathSync -} - -function unmonkeypatch () { - fs.realpath = origRealpath - fs.realpathSync = origRealpathSync -} - - -/***/ }), - -/***/ 71734: -/***/ ((__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 pathModule = __nccwpck_require__(71017); -var isWindows = process.platform === 'win32'; -var fs = __nccwpck_require__(57147); - -// JavaScript implementation of realpath, ported from node pre-v6 - -var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - -function rethrow() { - // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and - // is fairly slow to generate. - var callback; - if (DEBUG) { - var backtrace = new Error; - callback = debugCallback; - } else - callback = missingCallback; - - return callback; - - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs - else if (!process.noDeprecation) { - var msg = 'fs: missing callback ' + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } -} - -function maybeCallback(cb) { - return typeof cb === 'function' ? cb : rethrow(); -} - -var normalize = pathModule.normalize; - -// Regexp that finds the next partion of a (partial) path -// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] -if (isWindows) { - var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; -} else { - var nextPartRe = /(.*?)(?:[\/]+|$)/g; -} - -// Regex to find the device root, including trailing slash. E.g. 'c:\\'. -if (isWindows) { - var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; -} else { - var splitRootRe = /^[\/]*/; -} - -exports.realpathSync = function realpathSync(p, cache) { - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstatSync(base); - knownHard[base] = true; - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - // NB: p.length changes. - while (pos < p.length) { - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - continue; - } - - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // some known symbolic link. no need to stat again. - resolvedLink = cache[base]; - } else { - var stat = fs.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - - // read the link if it wasn't read before - // dev/ino always return 0 on windows, so skip the check. - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs.statSync(base); - linkTarget = fs.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - // track this, if given a cache. - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - - if (cache) cache[original] = p; - - return p; -}; - - -exports.realpath = function realpath(p, cache, cb) { - if (typeof cb !== 'function') { - cb = maybeCallback(cache); - cache = null; - } - - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - function LOOP() { - // stop if scanned past end of path - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - return process.nextTick(LOOP); - } - - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // known symbolic link. no need to stat again. - return gotResolvedLink(cache[base]); - } - - return fs.lstat(base, gotStat); - } - - function gotStat(err, stat) { - if (err) return cb(err); - - // if not a symlink, skip to the next path part - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - - // stat & read the link if not read before - // call gotTarget as soon as the link target is known - // dev/ino always return 0 on windows, so skip the check. - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs.stat(base, function(err) { - if (err) return cb(err); - - fs.readlink(base, function(err, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err, target); - }); - }); - } - - function gotTarget(err, target, base) { - if (err) return cb(err); - - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base] = resolvedLink; - gotResolvedLink(resolvedLink); - } - - function gotResolvedLink(resolvedLink) { - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } -}; - - -/***/ }), - -/***/ 47625: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var fs = __nccwpck_require__(57147) -var path = __nccwpck_require__(71017) -var minimatch = __nccwpck_require__(36453) -var isAbsolute = __nccwpck_require__(38714) -var Minimatch = minimatch.Minimatch - -function alphasort (a, b) { - return a.localeCompare(b, 'en') -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -// ignore patterns are always in dot:true mode. -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern, { dot: true }) - } - - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.silent = !!options.silent - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - self.absolute = !!options.absolute - self.fs = options.fs || fs - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = path.resolve(options.cwd) - self.changedCwd = self.cwd !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - // TODO: is an absolute `cwd` supposed to be resolved against `root`? - // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') - self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) - if (process.platform === "win32") - self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") - self.nomount = !!options.nomount - - // disable comments and negation in Minimatch. - // Note that they are not supported in Glob itself anyway. - options.nonegate = true - options.nocomment = true - // always treat \ in patterns as escapes, not path separators - options.allowWindowsEscape = false - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - var notDir = !(/\/$/.test(e)) - var c = self.cache[e] || self.cache[makeAbs(self, e)] - if (notDir && c) - notDir = c !== 'DIR' && !Array.isArray(c) - return notDir - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (isAbsolute(f) || f === '') { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else { - abs = path.resolve(f) - } - - if (process.platform === 'win32') - abs = abs.replace(/\\/g, '/') - - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - - -/***/ }), - -/***/ 91957: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var rp = __nccwpck_require__(46863) -var minimatch = __nccwpck_require__(36453) -var Minimatch = minimatch.Minimatch -var inherits = __nccwpck_require__(44124) -var EE = (__nccwpck_require__(82361).EventEmitter) -var path = __nccwpck_require__(71017) -var assert = __nccwpck_require__(39491) -var isAbsolute = __nccwpck_require__(38714) -var globSync = __nccwpck_require__(29010) -var common = __nccwpck_require__(47625) -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = __nccwpck_require__(52492) -var util = __nccwpck_require__(73837) -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -var once = __nccwpck_require__(1223) - -function glob (pattern, options, cb) { - if (typeof options === 'function') cb = options, options = {} - if (!options) options = {} - - if (options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return globSync(pattern, options) - } - - return new Glob(pattern, options, cb) -} - -glob.sync = globSync -var GlobSync = glob.GlobSync = globSync.GlobSync - -// old api surface -glob.glob = glob - -function extend (origin, add) { - if (add === null || typeof add !== 'object') { - return origin - } - - var keys = Object.keys(add) - var i = keys.length - while (i--) { - origin[keys[i]] = add[keys[i]] - } - return origin -} - -glob.hasMagic = function (pattern, options_) { - var options = extend({}, options_) - options.noprocess = true - - var g = new Glob(pattern, options) - var set = g.minimatch.set - - if (!pattern) - return false - - if (set.length > 1) - return true - - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== 'string') - return true - } - - return false -} - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - - if (options && options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return new GlobSync(pattern, options) - } - - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb) - - setopts(this, pattern, options) - this._didRealPath = false - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - if (typeof cb === 'function') { - cb = once(cb) - this.on('error', cb) - this.on('end', function (matches) { - cb(null, matches) - }) - } - - var self = this - this._processing = 0 - - this._emitQueue = [] - this._processQueue = [] - this.paused = false - - if (this.noprocess) - return this - - if (n === 0) - return done() - - var sync = true - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false, done) - } - sync = false - - function done () { - --self._processing - if (self._processing <= 0) { - if (sync) { - process.nextTick(function () { - self._finish() - }) - } else { - self._finish() - } - } - } -} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - if (this.aborted) - return - - if (this.realpath && !this._didRealpath) - return this._realpath() - - common.finish(this) - this.emit('end', this.found) -} - -Glob.prototype._realpath = function () { - if (this._didRealpath) - return - - this._didRealpath = true - - var n = this.matches.length - if (n === 0) - return this._finish() - - var self = this - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next) - - function next () { - if (--n === 0) - self._finish() - } -} - -Glob.prototype._realpathSet = function (index, cb) { - var matchset = this.matches[index] - if (!matchset) - return cb() - - var found = Object.keys(matchset) - var self = this - var n = found.length - - if (n === 0) - return cb() - - var set = this.matches[index] = Object.create(null) - found.forEach(function (p, i) { - // If there's a problem with the stat, then it means that - // one or more of the links in the realpath couldn't be - // resolved. just return the abs value in that case. - p = self._makeAbs(p) - rp.realpath(p, self.realpathCache, function (er, real) { - if (!er) - set[real] = true - else if (er.syscall === 'stat') - set[p] = true - else - self.emit('error', er) // srsly wtf right here - - if (--n === 0) { - self.matches[index] = set - cb() - } - }) - }) -} - -Glob.prototype._mark = function (p) { - return common.mark(this, p) -} - -Glob.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit('abort') -} - -Glob.prototype.pause = function () { - if (!this.paused) { - this.paused = true - this.emit('pause') - } -} - -Glob.prototype.resume = function () { - if (this.paused) { - this.emit('resume') - this.paused = false - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0) - this._emitQueue.length = 0 - for (var i = 0; i < eq.length; i ++) { - var e = eq[i] - this._emitMatch(e[0], e[1]) - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0) - this._processQueue.length = 0 - for (var i = 0; i < pq.length; i ++) { - var p = pq[i] - this._processing-- - this._process(p[0], p[1], p[2], p[3]) - } - } - } -} - -Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob) - assert(typeof cb === 'function') - - if (this.aborted) - return - - this._processing++ - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]) - return - } - - //console.error('PROCESS %d', this._processing, pattern) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index, cb) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || - isAbsolute(pattern.map(function (p) { - return typeof p === 'string' ? p : '[*]' - }).join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (isIgnored(this, e)) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = isAbsolute(e) ? e : this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) - e = abs - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - self.fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er && er.code === 'ENOENT') - return cb() - - var isSym = lstat && lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - self.fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - this.emit('error', error) - this.abort() - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) { - this.emit('error', er) - // If the error is handled, then we abort - // if not, we threw out of here - this.abort() - } - if (!this.silent) - console.error('glob error', er) - break - } - - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - self.fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return self.fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) - return cb(null, false, stat) - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return cb() - - return cb(null, c, stat) -} - - -/***/ }), - -/***/ 51046: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var concatMap = __nccwpck_require__(86891); -var balanced = __nccwpck_require__(9417); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str, options) { - if (!str) - return []; - - options = options || {}; - var max = options.max == null ? Infinity : options.max; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), max, true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, max, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,(?!,).*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str, max, true); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], max, false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, max, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, max, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.max(Math.abs(numeric(n[2])), 1) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, max, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length && expansions.length < max; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} - - -/***/ }), - -/***/ 36453: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = (function () { try { return __nccwpck_require__(71017) } catch (e) {}}()) || { - sep: '/' -} -minimatch.sep = path.sep - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = __nccwpck_require__(51046) - -var plTypes = { - '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, - '?': { open: '(?:', close: ')?' }, - '+': { open: '(?:', close: ')+' }, - '*': { open: '(?:', close: ')*' }, - '@': { open: '(?:', close: ')' } -} - -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' - -// * => any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - b = b || {} - var t = {} - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || typeof def !== 'object' || !Object.keys(def).length) { - return minimatch - } - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - m.Minimatch.defaults = function defaults (options) { - return orig.defaults(ext(def, options)).Minimatch - } - - m.filter = function filter (pattern, options) { - return orig.filter(pattern, ext(def, options)) - } - - m.defaults = function defaults (options) { - return orig.defaults(ext(def, options)) - } - - m.makeRe = function makeRe (pattern, options) { - return orig.makeRe(pattern, ext(def, options)) - } - - m.braceExpand = function braceExpand (pattern, options) { - return orig.braceExpand(pattern, ext(def, options)) - } - - m.match = function (list, pattern, options) { - return orig.match(list, pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - assertValidPattern(pattern) - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - assertValidPattern(pattern) - - if (!options) options = {} - - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (!options.allowWindowsEscape && path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.maxGlobstarRecursion = options.maxGlobstarRecursion !== undefined - ? options.maxGlobstarRecursion : 200 - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - this.partial = !!options.partial - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.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 -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - assertValidPattern(pattern) - - // Thanks to Yeting Li for - // improving this regexp to avoid a ReDOS vulnerability. - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -var MAX_PATTERN_LENGTH = 1024 * 64 -var assertValidPattern = function (pattern) { - if (typeof pattern !== 'string') { - throw new TypeError('invalid pattern') - } - - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError('pattern is too long') - } -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - assertValidPattern(pattern) - - var options = this.options - - // shortcuts - if (pattern === '**') { - if (!options.noglobstar) - return GLOBSTAR - else - pattern = '*' - } - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - /* istanbul ignore next */ - case '/': { - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - } - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // coalesce consecutive non-globstar * characters - if (c === '*' && stateChar === '*') continue - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - var pl = patternListStack.pop() - // negation is (?:(?!js)[^/]*) - // The others are (?:) - re += pl.close - if (pl.type === '!') { - negativeLists.push(pl) - } - pl.reEnd = re.length - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length) - this.debug('setting tail', re, pl) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail, pl, re) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '[': case '.': case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - try { - var regExp = new RegExp('^' + re + '$', flags) - } catch (er) /* istanbul ignore next - should be impossible */ { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.') - } - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.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('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) /* istanbul ignore next - should be impossible */ { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = function match (f, partial) { - if (typeof partial === 'undefined') partial = this.partial - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - if (pattern.indexOf(GLOBSTAR) !== -1) { - return this._matchGlobstar(file, pattern, partial, 0, 0) - } - return this._matchOne(file, pattern, partial, 0, 0) -} - -Minimatch.prototype._matchGlobstar = function (file, pattern, partial, fileIndex, patternIndex) { - var i - - // find first globstar from patternIndex - var firstgs = -1 - for (i = patternIndex; i < pattern.length; i++) { - if (pattern[i] === GLOBSTAR) { firstgs = i; break } - } - - // find last globstar - var lastgs = -1 - for (i = pattern.length - 1; i >= 0; i--) { - if (pattern[i] === GLOBSTAR) { lastgs = i; break } - } - - var head = pattern.slice(patternIndex, firstgs) - var body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs) - var tail = partial ? [] : pattern.slice(lastgs + 1) - - // check the head - if (head.length) { - var fileHead = file.slice(fileIndex, fileIndex + head.length) - if (!this._matchOne(fileHead, head, partial, 0, 0)) { - return false - } - fileIndex += head.length - } - - // check the tail - var fileTailMatch = 0 - if (tail.length) { - if (tail.length + fileIndex > file.length) return false - - var tailStart = file.length - tail.length - if (this._matchOne(file, tail, partial, tailStart, 0)) { - fileTailMatch = tail.length - } else { - // affordance for stuff like a/**/* matching a/b/ - if (file[file.length - 1] !== '' || - fileIndex + tail.length === file.length) { - return false - } - tailStart-- - if (!this._matchOne(file, tail, partial, tailStart, 0)) { - return false - } - fileTailMatch = tail.length + 1 - } - } - - // if body is empty (single ** between head and tail) - if (!body.length) { - var sawSome = !!fileTailMatch - for (i = fileIndex; i < file.length - fileTailMatch; i++) { - var f = String(file[i]) - sawSome = true - if (f === '.' || f === '..' || - (!this.options.dot && f.charAt(0) === '.')) { - return false - } - } - return partial || sawSome - } - - // split body into segments at each GLOBSTAR - var bodySegments = [[[], 0]] - var currentBody = bodySegments[0] - var nonGsParts = 0 - var nonGsPartsSums = [0] - for (var bi = 0; bi < body.length; bi++) { - var b = body[bi] - if (b === GLOBSTAR) { - nonGsPartsSums.push(nonGsParts) - currentBody = [[], 0] - bodySegments.push(currentBody) - } else { - currentBody[0].push(b) - nonGsParts++ - } - } - - var idx = bodySegments.length - 1 - var fileLength = file.length - fileTailMatch - for (var si = 0; si < bodySegments.length; si++) { - bodySegments[si][1] = fileLength - - (nonGsPartsSums[idx--] + bodySegments[si][0].length) - } - - return !!this._matchGlobStarBodySections( - file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch - ) -} - -// return false for "nope, not matching" -// return null for "not matching, cannot keep trying" -Minimatch.prototype._matchGlobStarBodySections = function ( - file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail -) { - var bs = bodySegments[bodyIndex] - if (!bs) { - // just make sure there are no bad dots - for (var i = fileIndex; i < file.length; i++) { - sawTail = true - var f = file[i] - if (f === '.' || f === '..' || - (!this.options.dot && f.charAt(0) === '.')) { - return false - } - } - return sawTail - } - - var body = bs[0] - var after = bs[1] - while (fileIndex <= after) { - var m = this._matchOne( - file.slice(0, fileIndex + body.length), - body, - partial, - fileIndex, - 0 - ) - // if limit exceeded, no match. intentional false negative, - // acceptable break in correctness for security. - if (m && globStarDepth < this.maxGlobstarRecursion) { - var sub = this._matchGlobStarBodySections( - file, bodySegments, - fileIndex + body.length, bodyIndex + 1, - partial, globStarDepth + 1, sawTail - ) - if (sub !== false) { - return sub - } - } - var f = file[fileIndex] - if (f === '.' || f === '..' || - (!this.options.dot && f.charAt(0) === '.')) { - return false - } - fileIndex++ - } - return partial || null -} - -Minimatch.prototype._matchOne = function (file, pattern, partial, fileIndex, patternIndex) { - var fi, pi, fl, pl - for ( - fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++ - ) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - /* istanbul ignore if */ - if (p === false || p === GLOBSTAR) return false - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - hit = f === p - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else /* istanbul ignore else */ if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - return (fi === fl - 1) && (file[fi] === '') - } - - // should be unreachable. - /* istanbul ignore next */ - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} - - -/***/ }), - -/***/ 29010: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = globSync -globSync.GlobSync = GlobSync - -var rp = __nccwpck_require__(46863) -var minimatch = __nccwpck_require__(36453) -var Minimatch = minimatch.Minimatch -var Glob = (__nccwpck_require__(91957).Glob) -var util = __nccwpck_require__(73837) -var path = __nccwpck_require__(71017) -var assert = __nccwpck_require__(39491) -var isAbsolute = __nccwpck_require__(38714) -var common = __nccwpck_require__(47625) -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert.ok(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = rp.realpathSync(p, self.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} - - -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert.ok(this instanceof GlobSync) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || - isAbsolute(pattern.map(function (p) { - return typeof p === 'string' ? p : '[*]' - }).join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - if (isIgnored(this, e)) - return - - var abs = this._makeAbs(e) - - if (this.mark) - e = this._mark(e) - - if (this.absolute) { - e = abs - } - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = this.fs.lstatSync(abs) - } catch (er) { - if (er.code === 'ENOENT') { - // lstat failed, doesn't exist - return null - } - } - - var isSym = lstat && lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - var abs = this._makeAbs(f) - this.cache[abs] = 'FILE' - if (abs === this.cwdAbs) { - var error = new Error(er.code + ' invalid cwd ' + this.cwd) - error.path = this.cwd - error.code = er.code - throw error - } - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) - throw er - if (!this.silent) - console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = this.fs.lstatSync(abs) - } catch (er) { - if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { - this.statCache[abs] = false - return false - } - } - - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = true - if (stat) - c = stat.isDirectory() ? 'DIR' : 'FILE' - - this.cache[abs] = this.cache[abs] || c - - if (needDir && c === 'FILE') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - - -/***/ }), - -/***/ 31621: -/***/ ((module) => { - -"use strict"; - - -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); -}; - - -/***/ }), - -/***/ 77219: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HttpsProxyAgent = void 0; -const net = __importStar(__nccwpck_require__(41808)); -const tls = __importStar(__nccwpck_require__(24404)); -const assert_1 = __importDefault(__nccwpck_require__(39491)); -const debug_1 = __importDefault(__nccwpck_require__(38237)); -const agent_base_1 = __nccwpck_require__(70694); -const url_1 = __nccwpck_require__(57310); -const parse_proxy_response_1 = __nccwpck_require__(595); -const debug = (0, debug_1.default)('https-proxy-agent'); -const setServernameFromNonIpHost = (options) => { - if (options.servername === undefined && - options.host && - !net.isIP(options.host)) { - return { - ...options, - servername: options.host, - }; - } - return options; -}; -/** - * 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. - */ -class HttpsProxyAgent extends agent_base_1.Agent { - constructor(proxy, opts) { - super(opts); - this.options = { path: undefined }; - this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy; - this.proxyHeaders = opts?.headers ?? {}; - debug('Creating new HttpsProxyAgent instance: %o', this.proxy.href); - // Trim off the brackets from IPv6 addresses - const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ''); - const port = this.proxy.port - ? parseInt(this.proxy.port, 10) - : this.proxy.protocol === 'https:' - ? 443 - : 80; - this.connectOpts = { - // Attempt to negotiate http/1.1 for proxy servers that support http/2 - ALPNProtocols: ['http/1.1'], - ...(opts ? omit(opts, 'headers') : null), - host, - port, - }; - } - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - */ - async connect(req, opts) { - const { proxy } = this; - if (!opts.host) { - throw new TypeError('No "host" provided'); - } - // Create a socket connection to the proxy server. - let socket; - if (proxy.protocol === 'https:') { - debug('Creating `tls.Socket`: %o', this.connectOpts); - socket = tls.connect(setServernameFromNonIpHost(this.connectOpts)); - } - else { - debug('Creating `net.Socket`: %o', this.connectOpts); - socket = net.connect(this.connectOpts); - } - const headers = typeof this.proxyHeaders === 'function' - ? this.proxyHeaders() - : { ...this.proxyHeaders }; - const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; - let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`; - // Inject the `Proxy-Authorization` header if necessary. - if (proxy.username || proxy.password) { - const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; - headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`; - } - headers.Host = `${host}:${opts.port}`; - if (!headers['Proxy-Connection']) { - headers['Proxy-Connection'] = this.keepAlive - ? 'Keep-Alive' - : 'close'; - } - for (const name of Object.keys(headers)) { - payload += `${name}: ${headers[name]}\r\n`; - } - const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket); - socket.write(`${payload}\r\n`); - const { connect, buffered } = await proxyResponsePromise; - req.emit('proxyConnect', connect); - this.emit('proxyConnect', connect, req); - if (connect.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'); - return tls.connect({ - ...omit(setServernameFromNonIpHost(opts), 'host', 'path', 'port'), - socket, - }); - } - 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.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'); - (0, 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; - } -} -HttpsProxyAgent.protocols = ['http', 'https']; -exports.HttpsProxyAgent = HttpsProxyAgent; -function resume(socket) { - socket.resume(); -} -function omit(obj, ...keys) { - const ret = {}; - let key; - for (key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } - } - return ret; -} -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 595: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseProxyResponse = void 0; -const debug_1 = __importDefault(__nccwpck_require__(38237)); -const debug = (0, 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('readable', read); - } - function onend() { - cleanup(); - debug('onend'); - reject(new Error('Proxy connection ended before receiving CONNECT response')); - } - 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 headerParts = buffered - .slice(0, endOfHeaders) - .toString('ascii') - .split('\r\n'); - const firstLine = headerParts.shift(); - if (!firstLine) { - socket.destroy(); - return reject(new Error('No header received from proxy CONNECT response')); - } - const firstLineParts = firstLine.split(' '); - const statusCode = +firstLineParts[1]; - const statusText = firstLineParts.slice(2).join(' '); - const headers = {}; - for (const header of headerParts) { - if (!header) - continue; - const firstColon = header.indexOf(':'); - if (firstColon === -1) { - socket.destroy(); - return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`)); - } - const key = header.slice(0, firstColon).toLowerCase(); - const value = header.slice(firstColon + 1).trimStart(); - const current = headers[key]; - if (typeof current === 'string') { - headers[key] = [current, value]; - } - else if (Array.isArray(current)) { - current.push(value); - } - else { - headers[key] = value; - } - } - debug('got proxy server response: %o %o', firstLine, headers); - cleanup(); - resolve({ - connect: { - statusCode, - statusText, - headers, - }, - buffered, - }); - } - socket.on('error', onerror); - socket.on('end', onend); - read(); - }); -} -exports.parseProxyResponse = parseProxyResponse; -//# sourceMappingURL=parse-proxy-response.js.map - -/***/ }), - -/***/ 52492: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var wrappy = __nccwpck_require__(62940) -var reqs = Object.create(null) -var once = __nccwpck_require__(1223) - -module.exports = wrappy(inflight) - -function inflight (key, cb) { - if (reqs[key]) { - reqs[key].push(cb) - return null - } else { - reqs[key] = [cb] - return makeres(key) - } -} - -function makeres (key) { - return once(function RES () { - var cbs = reqs[key] - var len = cbs.length - var args = slice(arguments) - - // XXX It's somewhat ambiguous whether a new callback added in this - // pass should be queued for later execution if something in the - // list of callbacks throws, or if it should just be discarded. - // However, it's such an edge case that it hardly matters, and either - // choice is likely as surprising as the other. - // As it happens, we do go ahead and schedule it for later execution. - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args) - } - } finally { - if (cbs.length > len) { - // added more in the interim. - // de-zalgo, just in case, but don't call again. - cbs.splice(0, len) - process.nextTick(function () { - RES.apply(null, args) - }) - } else { - delete reqs[key] - } - } - }) -} - -function slice (args) { - var length = args.length - var array = [] - - for (var i = 0; i < length; i++) array[i] = args[i] - return array -} - - -/***/ }), - -/***/ 44124: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -try { - var util = __nccwpck_require__(73837); - /* istanbul ignore next */ - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - /* istanbul ignore next */ - module.exports = __nccwpck_require__(8544); -} - - -/***/ }), - -/***/ 8544: -/***/ ((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 - } - } -} - - -/***/ }), - -/***/ 87468: -/***/ ((module) => { - -"use strict"; - -module.exports = (function() -{ - function _min(d0, d1, d2, bx, ay) - { - return d0 < d1 || d2 < d1 - ? d0 > d2 - ? d2 + 1 - : d0 + 1 - : bx === ay - ? d1 - : d1 + 1; - } - - return function(a, b) - { - if (a === b) { - return 0; - } - - if (a.length > b.length) { - var tmp = a; - a = b; - b = tmp; - } - - var la = a.length; - var lb = b.length; - - while (la > 0 && (a.charCodeAt(la - 1) === b.charCodeAt(lb - 1))) { - la--; - lb--; - } - - var offset = 0; - - while (offset < la && (a.charCodeAt(offset) === b.charCodeAt(offset))) { - offset++; - } - - la -= offset; - lb -= offset; - - if (la === 0 || lb < 3) { - return lb; - } - - var x = 0; - var y; - var d0; - var d1; - var d2; - var d3; - var dd; - var dy; - var ay; - var bx0; - var bx1; - var bx2; - var bx3; - - var vector = []; - - for (y = 0; y < la; y++) { - vector.push(y + 1); - vector.push(a.charCodeAt(offset + y)); - } - - var len = vector.length - 1; - - for (; x < lb - 3;) { - bx0 = b.charCodeAt(offset + (d0 = x)); - bx1 = b.charCodeAt(offset + (d1 = x + 1)); - bx2 = b.charCodeAt(offset + (d2 = x + 2)); - bx3 = b.charCodeAt(offset + (d3 = x + 3)); - dd = (x += 4); - for (y = 0; y < len; y += 2) { - dy = vector[y]; - ay = vector[y + 1]; - d0 = _min(dy, d0, d1, bx0, ay); - d1 = _min(d0, d1, d2, bx1, ay); - d2 = _min(d1, d2, d3, bx2, ay); - dd = _min(d2, d3, dd, bx3, ay); - vector[y] = dd; - d3 = d2; - d2 = d1; - d1 = d0; - d0 = dy; - } - } - - for (; x < lb;) { - bx0 = b.charCodeAt(offset + (d0 = x)); - dd = ++x; - for (y = 0; y < len; y += 2) { - dy = vector[y]; - vector[y] = dd = _min(dy, d0, dd, bx0, vector[y + 1]); - d0 = dy; - } - } - - return dd; - }; -})(); - - - -/***/ }), - -/***/ 21917: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - - -var loader = __nccwpck_require__(51161); -var dumper = __nccwpck_require__(68866); - - -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__(6073); -module.exports.Schema = __nccwpck_require__(21082); -module.exports.FAILSAFE_SCHEMA = __nccwpck_require__(28562); -module.exports.JSON_SCHEMA = __nccwpck_require__(1035); -module.exports.CORE_SCHEMA = __nccwpck_require__(12011); -module.exports.DEFAULT_SCHEMA = __nccwpck_require__(18759); -module.exports.load = loader.load; -module.exports.loadAll = loader.loadAll; -module.exports.dump = dumper.dump; -module.exports.YAMLException = __nccwpck_require__(68179); - -// Re-export all types in case user wants to create custom schema -module.exports.types = { - binary: __nccwpck_require__(77900), - float: __nccwpck_require__(42705), - map: __nccwpck_require__(86150), - null: __nccwpck_require__(20721), - pairs: __nccwpck_require__(96860), - set: __nccwpck_require__(79548), - timestamp: __nccwpck_require__(99212), - bool: __nccwpck_require__(64993), - int: __nccwpck_require__(11615), - merge: __nccwpck_require__(86104), - omap: __nccwpck_require__(19046), - seq: __nccwpck_require__(67283), - str: __nccwpck_require__(23619) -}; - -// 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'); - - -/***/ }), - -/***/ 26829: -/***/ ((module) => { - -"use strict"; - - - -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; - - -/***/ }), - -/***/ 68866: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/*eslint-disable no-use-before-define*/ - -var common = __nccwpck_require__(26829); -var YAMLException = __nccwpck_require__(68179); -var DEFAULT_SCHEMA = __nccwpck_require__(18759); - -var _toString = Object.prototype.toString; -var _hasOwnProperty = Object.prototype.hasOwnProperty; - -var CHAR_BOM = 0xFEFF; -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' -]; - -var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; - -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; -} - - -var QUOTING_TYPE_SINGLE = 1, - 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) { - 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 !== CHAR_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 -// 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) { - var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); - var 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) { - var first = string.charCodeAt(pos), 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) { - 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, quotingType, forceQuotes, inblock) { - - var i; - var char = 0; - var prevChar = null; - 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(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 + "'"); - } - } - - 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, 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) { - 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 = 0; - var escapeSeq; - - for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - 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) { - var _result = '', - _tag = state.tag, - index, - length, - value; - - for (index = 0, length = object.length; index < length; index += 1) { - 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) { - var _result = '', - _tag = state.tag, - index, - length, - value; - - for (index = 0, length = object.length; index < length; index += 1) { - 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) { - 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 (_result !== '') pairBuffer += ', '; - - if (state.condenseFlow) pairBuffer += '"'; - - objectKey = objectKeyList[index]; - 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) { - 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 || _result !== '') { - pairBuffer += generateNextLine(state, level); - } - - objectKey = objectKeyList[index]; - 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. - } - - 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))) { - - if (explicit) { - if (type.multi && type.representName) { - state.tag = type.representName(object); - } else { - state.tag = type.tag; - } - } else { - state.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, isblockseq) { - state.tag = null; - state.dump = object; - - if (!detectType(state, object, false)) { - detectType(state, object, true); - } - - var type = _toString.call(state.dump); - var inblock = block; - var tagStr; - - 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]') { - 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). - // - 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) { - 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); - - var 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; - - -/***/ }), - -/***/ 68179: -/***/ ((module) => { - -"use strict"; -// YAML error class. http://stackoverflow.com/questions/8458984 -// - - - -function formatError(exception, compact) { - var where = '', 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; - - -/***/ }), - -/***/ 51161: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/*eslint-disable max-len,no-use-before-define*/ - -var common = __nccwpck_require__(26829); -var YAMLException = __nccwpck_require__(68179); -var makeSnippet = __nccwpck_require__(96975); -var DEFAULT_SCHEMA = __nccwpck_require__(18759); - - -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_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.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; - - // 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.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result;*/ - -} - - -function generateError(state, message) { - var 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)); - } -} - - -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'); - } - - try { - prefix = decodeURIComponent(prefix); - } catch (err) { - throwError(state, 'tag prefix is malformed: ' + prefix); - } - - 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, startLineStart, 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.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) { - 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; - state.firstTabInLine = -1; -} - -function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - while (is_WHITE_SPACE(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 (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, - _lineStart, - _pos, - _tag = state.tag, - _result, - _anchor = state.anchor, - following, - terminator, - isPair, - isExplicitPair, - isMapping, - overridableKeys = Object.create(null), - 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'); - } 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/* ? */) { - 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; // 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) { - 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; - - // 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) { - state.anchorMap[state.anchor] = _result; - } - - 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; - } - - 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, - _keyLine, - _keyLineStart, - _keyPos, - _tag = state.tag, - _anchor = state.anchor, - _result = {}, - overridableKeys = Object.create(null), - keyTag = null, - keyNode = null, - valueNode = null, - atExplicitKey = false, - detected = false, - ch; - - // 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) { - state.anchorMap[state.anchor] = _result; - } - - 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'); - } - - following = state.input.charCodeAt(state.position + 1); - _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/* : */) && is_WS_OR_EOL(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 (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, _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) { - 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); - } - - 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) { - 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) { - if (state.anchor !== null) { - state.anchorMap[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 (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 (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; - typeList = state.typeMap.multi[state.kind || 'fallback']; - - for (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) { - state.anchorMap[state.anchor] = state.result; - } - } - } - - 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 = 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); - _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'); -} - - -module.exports.loadAll = loadAll; -module.exports.load = load; - - -/***/ }), - -/***/ 21082: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/*eslint-disable max-len*/ - -var YAMLException = __nccwpck_require__(68179); -var Type = __nccwpck_require__(6073); - - -function compileList(schema, name) { - var result = []; - - schema[name].forEach(function (currentType) { - var 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... */) { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - }, index, length; - - 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 (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) { - var implicit = []; - var 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.'); - } - }); - - var 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; - - -/***/ }), - -/***/ 12011: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// 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__(1035); - - -/***/ }), - -/***/ 18759: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// 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__(12011).extend)({ - implicit: [ - __nccwpck_require__(99212), - __nccwpck_require__(86104) - ], - explicit: [ - __nccwpck_require__(77900), - __nccwpck_require__(19046), - __nccwpck_require__(96860), - __nccwpck_require__(79548) - ] -}); - - -/***/ }), - -/***/ 28562: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// Standard YAML's Failsafe schema. -// http://www.yaml.org/spec/1.2/spec.html#id2802346 - - - - - -var Schema = __nccwpck_require__(21082); - - -module.exports = new Schema({ - explicit: [ - __nccwpck_require__(23619), - __nccwpck_require__(67283), - __nccwpck_require__(86150) - ] -}); - - -/***/ }), - -/***/ 1035: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// 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__(28562).extend)({ - implicit: [ - __nccwpck_require__(20721), - __nccwpck_require__(64993), - __nccwpck_require__(11615), - __nccwpck_require__(42705) - ] -}); - - -/***/ }), - -/***/ 96975: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - - -var common = __nccwpck_require__(26829); - - -// get snippet for a single line, respecting maxLength -function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { - var head = ''; - var tail = ''; - var 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; - - var re = /\r?\n|\r|\0/g; - var lineStarts = [ 0 ]; - var lineEnds = []; - var match; - var 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; - - var result = '', i, line; - var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; - var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); - - for (i = 1; i <= options.linesBefore; i++) { - if (foundLineNo - i < 0) break; - 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; - } - - 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 (i = 1; i <= options.linesAfter; i++) { - if (foundLineNo + i >= lineEnds.length) break; - 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; - - -/***/ }), - -/***/ 6073: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var YAMLException = __nccwpck_require__(68179); - -var TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'multi', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'representName', - '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.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; - - -/***/ }), - -/***/ 77900: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/*eslint-disable no-bitwise*/ - - -var Type = __nccwpck_require__(6073); - - -// [ 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); - } - - return new Uint8Array(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(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 -}); - - -/***/ }), - -/***/ 64993: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -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' -}); - - -/***/ }), - -/***/ 42705: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var common = __nccwpck_require__(26829); -var Type = __nccwpck_require__(6073); - -var YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - '^(?:[-+]?(?:[0-9][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))$'); - -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; - - value = data.replace(/_/g, '').toLowerCase(); - 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) { - 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' -}); - - -/***/ }), - -/***/ 11615: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var common = __nccwpck_require__(26829); -var Type = __nccwpck_require__(6073); - -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 !== '_'; - } - - - if (ch === 'o') { - // base 8 - index++; - - 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) - - // value should not start with `_`; - if (ch === '_') return false; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isDecCode(data.charCodeAt(index))) { - return false; - } - hasDigits = true; - } - - // Should have digits and should not end with `_` - if (!hasDigits || ch === '_') return false; - - return true; -} - -function constructYamlInteger(data) { - var value = data, sign = 1, ch; - - 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.slice(2), 16); - if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); - } - - 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 ? '0o' + obj.toString(8) : '-0o' + 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' ] - } -}); - - -/***/ }), - -/***/ 86150: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -module.exports = new Type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return data !== null ? data : {}; } -}); - - -/***/ }), - -/***/ 86104: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -function resolveYamlMerge(data) { - return data === '<<' || data === null; -} - -module.exports = new Type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge -}); - - -/***/ }), - -/***/ 20721: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -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'; }, - empty: function () { return ''; } - }, - defaultStyle: 'lowercase' -}); - - -/***/ }), - -/***/ 19046: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -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 -}); - - -/***/ }), - -/***/ 96860: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -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 -}); - - -/***/ }), - -/***/ 67283: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -module.exports = new Type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return data !== null ? data : []; } -}); - - -/***/ }), - -/***/ 79548: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -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 -}); - - -/***/ }), - -/***/ 23619: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -module.exports = new Type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : ''; } -}); - - -/***/ }), - -/***/ 99212: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(6073); - -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 -}); - - -/***/ }), - -/***/ 80900: -/***/ ((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' : ''); -} - - -/***/ }), - -/***/ 1223: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var wrappy = __nccwpck_require__(62940) -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) - - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} - -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} - - -/***/ }), - -/***/ 38714: -/***/ ((module) => { - -"use strict"; - - -function posix(path) { - return path.charAt(0) === '/'; -} - -function win32(path) { - // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = Boolean(device && device.charAt(1) !== ':'); - - // UNC paths are always absolute - return Boolean(result[2] || isUnc); -} - -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; - - -/***/ }), - -/***/ 22522: -/***/ (function(module) { - -/* global define */ - -(function (root, pluralize) { - /* istanbul ignore else */ - if (true) { - // Node. - module.exports = pluralize(); - } else {} -})(this, function () { - // Rule storage - pluralize and singularize need to be run sequentially, - // while other rules can be optimized using an object for instant lookups. - var pluralRules = []; - var singularRules = []; - var uncountables = {}; - var irregularPlurals = {}; - var irregularSingles = {}; - - /** - * Sanitize a pluralization rule to a usable regular expression. - * - * @param {(RegExp|string)} rule - * @return {RegExp} - */ - function sanitizeRule (rule) { - if (typeof rule === 'string') { - return new RegExp('^' + rule + '$', 'i'); - } - - return rule; - } - - /** - * Pass in a word token to produce a function that can replicate the case on - * another word. - * - * @param {string} word - * @param {string} token - * @return {Function} - */ - function restoreCase (word, token) { - // Tokens are an exact match. - if (word === token) return token; - - // Lower cased words. E.g. "hello". - if (word === word.toLowerCase()) return token.toLowerCase(); - - // Upper cased words. E.g. "WHISKY". - if (word === word.toUpperCase()) return token.toUpperCase(); - - // Title cased words. E.g. "Title". - if (word[0] === word[0].toUpperCase()) { - return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase(); - } - - // Lower cased words. E.g. "test". - return token.toLowerCase(); - } - - /** - * Interpolate a regexp string. - * - * @param {string} str - * @param {Array} args - * @return {string} - */ - function interpolate (str, args) { - return str.replace(/\$(\d{1,2})/g, function (match, index) { - return args[index] || ''; - }); - } - - /** - * Replace a word using a rule. - * - * @param {string} word - * @param {Array} rule - * @return {string} - */ - function replace (word, rule) { - return word.replace(rule[0], function (match, index) { - var result = interpolate(rule[1], arguments); - - if (match === '') { - return restoreCase(word[index - 1], result); - } - - return restoreCase(match, result); - }); - } - - /** - * Sanitize a word by passing in the word and sanitization rules. - * - * @param {string} token - * @param {string} word - * @param {Array} rules - * @return {string} - */ - function sanitizeWord (token, word, rules) { - // Empty string or doesn't need fixing. - if (!token.length || uncountables.hasOwnProperty(token)) { - return word; - } - - var len = rules.length; - - // Iterate over the sanitization rules and use the first one to match. - while (len--) { - var rule = rules[len]; - - if (rule[0].test(word)) return replace(word, rule); - } - - return word; - } - - /** - * Replace a word with the updated word. - * - * @param {Object} replaceMap - * @param {Object} keepMap - * @param {Array} rules - * @return {Function} - */ - function replaceWord (replaceMap, keepMap, rules) { - return function (word) { - // Get the correct token and case restoration functions. - var token = word.toLowerCase(); - - // Check against the keep object map. - if (keepMap.hasOwnProperty(token)) { - return restoreCase(word, token); - } - - // Check against the replacement map for a direct word replacement. - if (replaceMap.hasOwnProperty(token)) { - return restoreCase(word, replaceMap[token]); - } - - // Run all the rules against the word. - return sanitizeWord(token, word, rules); - }; - } - - /** - * Check if a word is part of the map. - */ - function checkWord (replaceMap, keepMap, rules, bool) { - return function (word) { - var token = word.toLowerCase(); - - if (keepMap.hasOwnProperty(token)) return true; - if (replaceMap.hasOwnProperty(token)) return false; - - return sanitizeWord(token, token, rules) === token; - }; - } - - /** - * Pluralize or singularize a word based on the passed in count. - * - * @param {string} word The word to pluralize - * @param {number} count How many of the word exist - * @param {boolean} inclusive Whether to prefix with the number (e.g. 3 ducks) - * @return {string} - */ - function pluralize (word, count, inclusive) { - var pluralized = count === 1 - ? pluralize.singular(word) : pluralize.plural(word); - - return (inclusive ? count + ' ' : '') + pluralized; - } - - /** - * Pluralize a word. - * - * @type {Function} - */ - pluralize.plural = replaceWord( - irregularSingles, irregularPlurals, pluralRules - ); - - /** - * Check if a word is plural. - * - * @type {Function} - */ - pluralize.isPlural = checkWord( - irregularSingles, irregularPlurals, pluralRules - ); - - /** - * Singularize a word. - * - * @type {Function} - */ - pluralize.singular = replaceWord( - irregularPlurals, irregularSingles, singularRules - ); - - /** - * Check if a word is singular. - * - * @type {Function} - */ - pluralize.isSingular = checkWord( - irregularPlurals, irregularSingles, singularRules - ); - - /** - * Add a pluralization rule to the collection. - * - * @param {(string|RegExp)} rule - * @param {string} replacement - */ - pluralize.addPluralRule = function (rule, replacement) { - pluralRules.push([sanitizeRule(rule), replacement]); - }; - - /** - * Add a singularization rule to the collection. - * - * @param {(string|RegExp)} rule - * @param {string} replacement - */ - pluralize.addSingularRule = function (rule, replacement) { - singularRules.push([sanitizeRule(rule), replacement]); - }; - - /** - * Add an uncountable word rule. - * - * @param {(string|RegExp)} word - */ - pluralize.addUncountableRule = function (word) { - if (typeof word === 'string') { - uncountables[word.toLowerCase()] = true; - return; - } - - // Set singular and plural references for the word. - pluralize.addPluralRule(word, '$0'); - pluralize.addSingularRule(word, '$0'); - }; - - /** - * Add an irregular word definition. - * - * @param {string} single - * @param {string} plural - */ - pluralize.addIrregularRule = function (single, plural) { - plural = plural.toLowerCase(); - single = single.toLowerCase(); - - irregularSingles[single] = plural; - irregularPlurals[plural] = single; - }; - - /** - * Irregular rules. - */ - [ - // Pronouns. - ['I', 'we'], - ['me', 'us'], - ['he', 'they'], - ['she', 'they'], - ['them', 'them'], - ['myself', 'ourselves'], - ['yourself', 'yourselves'], - ['itself', 'themselves'], - ['herself', 'themselves'], - ['himself', 'themselves'], - ['themself', 'themselves'], - ['is', 'are'], - ['was', 'were'], - ['has', 'have'], - ['this', 'these'], - ['that', 'those'], - // Words ending in with a consonant and `o`. - ['echo', 'echoes'], - ['dingo', 'dingoes'], - ['volcano', 'volcanoes'], - ['tornado', 'tornadoes'], - ['torpedo', 'torpedoes'], - // Ends with `us`. - ['genus', 'genera'], - ['viscus', 'viscera'], - // Ends with `ma`. - ['stigma', 'stigmata'], - ['stoma', 'stomata'], - ['dogma', 'dogmata'], - ['lemma', 'lemmata'], - ['schema', 'schemata'], - ['anathema', 'anathemata'], - // Other irregular rules. - ['ox', 'oxen'], - ['axe', 'axes'], - ['die', 'dice'], - ['yes', 'yeses'], - ['foot', 'feet'], - ['eave', 'eaves'], - ['goose', 'geese'], - ['tooth', 'teeth'], - ['quiz', 'quizzes'], - ['human', 'humans'], - ['proof', 'proofs'], - ['carve', 'carves'], - ['valve', 'valves'], - ['looey', 'looies'], - ['thief', 'thieves'], - ['groove', 'grooves'], - ['pickaxe', 'pickaxes'], - ['passerby', 'passersby'] - ].forEach(function (rule) { - return pluralize.addIrregularRule(rule[0], rule[1]); - }); - - /** - * Pluralization rules. - */ - [ - [/s?$/i, 's'], - [/[^\u0000-\u007F]$/i, '$0'], - [/([^aeiou]ese)$/i, '$1'], - [/(ax|test)is$/i, '$1es'], - [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, '$1es'], - [/(e[mn]u)s?$/i, '$1s'], - [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, '$1'], - [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1i'], - [/(alumn|alg|vertebr)(?:a|ae)$/i, '$1ae'], - [/(seraph|cherub)(?:im)?$/i, '$1im'], - [/(her|at|gr)o$/i, '$1oes'], - [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, '$1a'], - [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, '$1a'], - [/sis$/i, 'ses'], - [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, '$1$2ves'], - [/([^aeiouy]|qu)y$/i, '$1ies'], - [/([^ch][ieo][ln])ey$/i, '$1ies'], - [/(x|ch|ss|sh|zz)$/i, '$1es'], - [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, '$1ices'], - [/\b((?:tit)?m|l)(?:ice|ouse)$/i, '$1ice'], - [/(pe)(?:rson|ople)$/i, '$1ople'], - [/(child)(?:ren)?$/i, '$1ren'], - [/eaux$/i, '$0'], - [/m[ae]n$/i, 'men'], - ['thou', 'you'] - ].forEach(function (rule) { - return pluralize.addPluralRule(rule[0], rule[1]); - }); - - /** - * Singularization rules. - */ - [ - [/s$/i, ''], - [/(ss)$/i, '$1'], - [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, '$1fe'], - [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, '$1f'], - [/ies$/i, 'y'], - [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, '$1ie'], - [/\b(mon|smil)ies$/i, '$1ey'], - [/\b((?:tit)?m|l)ice$/i, '$1ouse'], - [/(seraph|cherub)im$/i, '$1'], - [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, '$1'], - [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, '$1sis'], - [/(movie|twelve|abuse|e[mn]u)s$/i, '$1'], - [/(test)(?:is|es)$/i, '$1is'], - [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1us'], - [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, '$1um'], - [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, '$1on'], - [/(alumn|alg|vertebr)ae$/i, '$1a'], - [/(cod|mur|sil|vert|ind)ices$/i, '$1ex'], - [/(matr|append)ices$/i, '$1ix'], - [/(pe)(rson|ople)$/i, '$1rson'], - [/(child)ren$/i, '$1'], - [/(eau)x?$/i, '$1'], - [/men$/i, 'man'] - ].forEach(function (rule) { - return pluralize.addSingularRule(rule[0], rule[1]); - }); - - /** - * Uncountable rules. - */ - [ - // Singular words with no plurals. - 'adulthood', - 'advice', - 'agenda', - 'aid', - 'aircraft', - 'alcohol', - 'ammo', - 'analytics', - 'anime', - 'athletics', - 'audio', - 'bison', - 'blood', - 'bream', - 'buffalo', - 'butter', - 'carp', - 'cash', - 'chassis', - 'chess', - 'clothing', - 'cod', - 'commerce', - 'cooperation', - 'corps', - 'debris', - 'diabetes', - 'digestion', - 'elk', - 'energy', - 'equipment', - 'excretion', - 'expertise', - 'firmware', - 'flounder', - 'fun', - 'gallows', - 'garbage', - 'graffiti', - 'hardware', - 'headquarters', - 'health', - 'herpes', - 'highjinks', - 'homework', - 'housework', - 'information', - 'jeans', - 'justice', - 'kudos', - 'labour', - 'literature', - 'machinery', - 'mackerel', - 'mail', - 'media', - 'mews', - 'moose', - 'music', - 'mud', - 'manga', - 'news', - 'only', - 'personnel', - 'pike', - 'plankton', - 'pliers', - 'police', - 'pollution', - 'premises', - 'rain', - 'research', - 'rice', - 'salmon', - 'scissors', - 'series', - 'sewage', - 'shambles', - 'shrimp', - 'software', - 'species', - 'staff', - 'swine', - 'tennis', - 'traffic', - 'transportation', - 'trout', - 'tuna', - 'wealth', - 'welfare', - 'whiting', - 'wildebeest', - 'wildlife', - 'you', - /pok[eé]mon$/i, - // Regexes. - /[^aeiou]ese$/i, // "chinese", "japanese" - /deer$/i, // "deer", "reindeer" - /fish$/i, // "fish", "blowfish", "angelfish" - /measles$/i, - /o[iu]s$/i, // "carnivorous" - /pox$/i, // "chickpox", "smallpox" - /sheep$/i - ].forEach(pluralize.addUncountableRule); - - return pluralize; -}); - - -/***/ }), - -/***/ 96916: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// minimal library entry point. - - -module.exports = __nccwpck_require__(73242); - - -/***/ }), - -/***/ 73242: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -var protobuf = exports; - -/** - * Build type, one of `"full"`, `"light"` or `"minimal"`. - * @name build - * @type {string} - * @const - */ -protobuf.build = "minimal"; - -// Serialization -protobuf.Writer = __nccwpck_require__(13098); -protobuf.BufferWriter = __nccwpck_require__(41863); -protobuf.Reader = __nccwpck_require__(41011); -protobuf.BufferReader = __nccwpck_require__(80339); - -// Utility -protobuf.util = __nccwpck_require__(71241); -protobuf.rpc = __nccwpck_require__(86444); -protobuf.roots = __nccwpck_require__(50073); -protobuf.configure = configure; - -/* istanbul ignore next */ -/** - * Reconfigures the library according to the environment. - * @returns {undefined} - */ -function configure() { - protobuf.util._configure(); - protobuf.Writer._configure(protobuf.BufferWriter); - protobuf.Reader._configure(protobuf.BufferReader); -} - -// Set up buffer utility according to the environment -configure(); - - -/***/ }), - -/***/ 41011: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -module.exports = Reader; - -var util = __nccwpck_require__(71241); - -var BufferReader; // cyclic - -var LongBits = util.LongBits, - utf8 = util.utf8; - -/* istanbul ignore next */ -function indexOutOfRange(reader, writeLength) { - return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len); -} - -/** - * Constructs a new reader instance using the specified buffer. - * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`. - * @constructor - * @param {Uint8Array} buffer Buffer to read from - */ -function Reader(buffer) { - - /** - * Read buffer. - * @type {Uint8Array} - */ - this.buf = buffer; - - /** - * Read buffer position. - * @type {number} - */ - this.pos = 0; - - /** - * Read buffer length. - * @type {number} - */ - this.len = buffer.length; -} - -var create_array = typeof Uint8Array !== "undefined" - ? function create_typed_array(buffer) { - if (buffer instanceof Uint8Array || Array.isArray(buffer)) - return new Reader(buffer); - throw Error("illegal buffer"); - } - /* istanbul ignore next */ - : function create_array(buffer) { - if (Array.isArray(buffer)) - return new Reader(buffer); - throw Error("illegal buffer"); - }; - -var create = function create() { - return util.Buffer - ? function create_buffer_setup(buffer) { - return (Reader.create = function create_buffer(buffer) { - return util.Buffer.isBuffer(buffer) - ? new BufferReader(buffer) - /* istanbul ignore next */ - : create_array(buffer); - })(buffer); - } - /* istanbul ignore next */ - : create_array; -}; - -/** - * Creates a new reader using the specified buffer. - * @function - * @param {Uint8Array|Buffer} buffer Buffer to read from - * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} - * @throws {Error} If `buffer` is not a valid buffer - */ -Reader.create = create(); - -Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice; - -/** - * Reads a varint as an unsigned 32 bit value. - * @function - * @returns {number} Value read - */ -Reader.prototype.uint32 = (function read_uint32_setup() { - var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!) - return function read_uint32() { - value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value; - - /* istanbul ignore if */ - if ((this.pos += 5) > this.len) { - this.pos = this.len; - throw indexOutOfRange(this, 10); - } - return value; - }; -})(); - -/** - * Reads a varint as a signed 32 bit value. - * @returns {number} Value read - */ -Reader.prototype.int32 = function read_int32() { - return this.uint32() | 0; -}; - -/** - * Reads a zig-zag encoded varint as a signed 32 bit value. - * @returns {number} Value read - */ -Reader.prototype.sint32 = function read_sint32() { - var value = this.uint32(); - return value >>> 1 ^ -(value & 1) | 0; -}; - -/* eslint-disable no-invalid-this */ - -function readLongVarint() { - // tends to deopt with local vars for octet etc. - var bits = new LongBits(0, 0); - var i = 0; - if (this.len - this.pos > 4) { // fast route (lo) - for (; i < 4; ++i) { - // 1st..4th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - // 5th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0; - bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - i = 0; - } else { - for (; i < 3; ++i) { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - // 1st..3th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - // 4th - bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0; - return bits; - } - if (this.len - this.pos > 4) { // fast route (hi) - for (; i < 5; ++i) { - // 6th..10th - bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - } else { - for (; i < 5; ++i) { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - // 6th..10th - bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - } - /* istanbul ignore next */ - throw Error("invalid varint encoding"); -} - -/* eslint-enable no-invalid-this */ - -/** - * Reads a varint as a signed 64 bit value. - * @name Reader#int64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a varint as an unsigned 64 bit value. - * @name Reader#uint64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a zig-zag encoded varint as a signed 64 bit value. - * @name Reader#sint64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a varint as a boolean. - * @returns {boolean} Value read - */ -Reader.prototype.bool = function read_bool() { - return this.uint32() !== 0; -}; - -function readFixed32_end(buf, end) { // note that this uses `end`, not `pos` - return (buf[end - 4] - | buf[end - 3] << 8 - | buf[end - 2] << 16 - | buf[end - 1] << 24) >>> 0; -} - -/** - * Reads fixed 32 bits as an unsigned 32 bit integer. - * @returns {number} Value read - */ -Reader.prototype.fixed32 = function read_fixed32() { - - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); - - return readFixed32_end(this.buf, this.pos += 4); -}; - -/** - * Reads fixed 32 bits as a signed 32 bit integer. - * @returns {number} Value read - */ -Reader.prototype.sfixed32 = function read_sfixed32() { - - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); - - return readFixed32_end(this.buf, this.pos += 4) | 0; -}; - -/* eslint-disable no-invalid-this */ - -function readFixed64(/* this: Reader */) { - - /* istanbul ignore if */ - if (this.pos + 8 > this.len) - throw indexOutOfRange(this, 8); - - return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4)); -} - -/* eslint-enable no-invalid-this */ - -/** - * Reads fixed 64 bits. - * @name Reader#fixed64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads zig-zag encoded fixed 64 bits. - * @name Reader#sfixed64 - * @function - * @returns {Long} Value read - */ - -/** - * Reads a float (32 bit) as a number. - * @function - * @returns {number} Value read - */ -Reader.prototype.float = function read_float() { - - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); - - var value = util.float.readFloatLE(this.buf, this.pos); - this.pos += 4; - return value; -}; - -/** - * Reads a double (64 bit float) as a number. - * @function - * @returns {number} Value read - */ -Reader.prototype.double = function read_double() { - - /* istanbul ignore if */ - if (this.pos + 8 > this.len) - throw indexOutOfRange(this, 4); - - var value = util.float.readDoubleLE(this.buf, this.pos); - this.pos += 8; - return value; -}; - -/** - * Reads a sequence of bytes preceeded by its length as a varint. - * @returns {Uint8Array} Value read - */ -Reader.prototype.bytes = function read_bytes() { - var length = this.uint32(), - start = this.pos, - end = this.pos + length; - - /* istanbul ignore if */ - if (end > this.len) - throw indexOutOfRange(this, length); - - this.pos += length; - if (Array.isArray(this.buf)) // plain array - return this.buf.slice(start, end); - - if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1 - var nativeBuffer = util.Buffer; - return nativeBuffer - ? nativeBuffer.alloc(0) - : new this.buf.constructor(0); - } - return this._slice.call(this.buf, start, end); -}; - -/** - * Reads a string preceeded by its byte length as a varint. - * @returns {string} Value read - */ -Reader.prototype.string = function read_string() { - var bytes = this.bytes(); - return utf8.read(bytes, 0, bytes.length); -}; - -/** - * Skips the specified number of bytes if specified, otherwise skips a varint. - * @param {number} [length] Length if known, otherwise a varint is assumed - * @returns {Reader} `this` - */ -Reader.prototype.skip = function skip(length) { - if (typeof length === "number") { - /* istanbul ignore if */ - if (this.pos + length > this.len) - throw indexOutOfRange(this, length); - this.pos += length; - } else { - do { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - } while (this.buf[this.pos++] & 128); - } - return this; -}; - -/** - * Skips the next element of the specified wire type. - * @param {number} wireType Wire type received - * @returns {Reader} `this` - */ -Reader.prototype.skipType = function(wireType) { - switch (wireType) { - case 0: - this.skip(); - break; - case 1: - this.skip(8); - break; - case 2: - this.skip(this.uint32()); - break; - case 3: - while ((wireType = this.uint32() & 7) !== 4) { - this.skipType(wireType); - } - break; - case 5: - this.skip(4); - break; - - /* istanbul ignore next */ - default: - throw Error("invalid wire type " + wireType + " at offset " + this.pos); - } - return this; -}; - -Reader._configure = function(BufferReader_) { - BufferReader = BufferReader_; - Reader.create = create(); - BufferReader._configure(); - - var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber"; - util.merge(Reader.prototype, { - - int64: function read_int64() { - return readLongVarint.call(this)[fn](false); - }, - - uint64: function read_uint64() { - return readLongVarint.call(this)[fn](true); - }, - - sint64: function read_sint64() { - return readLongVarint.call(this).zzDecode()[fn](false); - }, - - fixed64: function read_fixed64() { - return readFixed64.call(this)[fn](true); - }, - - sfixed64: function read_sfixed64() { - return readFixed64.call(this)[fn](false); - } - - }); -}; - - -/***/ }), - -/***/ 80339: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -module.exports = BufferReader; - -// extends Reader -var Reader = __nccwpck_require__(41011); -(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader; - -var util = __nccwpck_require__(71241); - -/** - * Constructs a new buffer reader instance. - * @classdesc Wire format reader using node buffers. - * @extends Reader - * @constructor - * @param {Buffer} buffer Buffer to read from - */ -function BufferReader(buffer) { - Reader.call(this, buffer); - - /** - * Read buffer. - * @name BufferReader#buf - * @type {Buffer} - */ -} - -BufferReader._configure = function () { - /* istanbul ignore else */ - if (util.Buffer) - BufferReader.prototype._slice = util.Buffer.prototype.slice; -}; - - -/** - * @override - */ -BufferReader.prototype.string = function read_string_buffer() { - var len = this.uint32(); // modifies pos - return this.buf.utf8Slice - ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) - : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len)); -}; - -/** - * Reads a sequence of bytes preceeded by its length as a varint. - * @name BufferReader#bytes - * @function - * @returns {Buffer} Value read - */ - -BufferReader._configure(); - - -/***/ }), - -/***/ 50073: -/***/ ((module) => { - -"use strict"; - -module.exports = {}; - -/** - * Named roots. - * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). - * Can also be used manually to make roots available across modules. - * @name roots - * @type {Object.} - * @example - * // pbjs -r myroot -o compiled.js ... - * - * // in another module: - * require("./compiled.js"); - * - * // in any subsequent module: - * var root = protobuf.roots["myroot"]; - */ - - -/***/ }), - -/***/ 86444: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -/** - * Streaming RPC helpers. - * @namespace - */ -var rpc = exports; - -/** - * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets. - * @typedef RPCImpl - * @type {function} - * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called - * @param {Uint8Array} requestData Request data - * @param {RPCImplCallback} callback Callback function - * @returns {undefined} - * @example - * function rpcImpl(method, requestData, callback) { - * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code - * throw Error("no such method"); - * asynchronouslyObtainAResponse(requestData, function(err, responseData) { - * callback(err, responseData); - * }); - * } - */ - -/** - * Node-style callback as used by {@link RPCImpl}. - * @typedef RPCImplCallback - * @type {function} - * @param {Error|null} error Error, if any, otherwise `null` - * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error - * @returns {undefined} - */ - -rpc.Service = __nccwpck_require__(12439); - - -/***/ }), - -/***/ 12439: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -module.exports = Service; - -var util = __nccwpck_require__(71241); - -// Extends EventEmitter -(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service; - -/** - * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}. - * - * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`. - * @typedef rpc.ServiceMethodCallback - * @template TRes extends Message - * @type {function} - * @param {Error|null} error Error, if any - * @param {TRes} [response] Response message - * @returns {undefined} - */ - -/** - * A service method part of a {@link rpc.Service} as created by {@link Service.create}. - * @typedef rpc.ServiceMethod - * @template TReq extends Message - * @template TRes extends Message - * @type {function} - * @param {TReq|Properties} request Request message or plain object - * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message - * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined` - */ - -/** - * Constructs a new RPC service instance. - * @classdesc An RPC service as returned by {@link Service#create}. - * @exports rpc.Service - * @extends util.EventEmitter - * @constructor - * @param {RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ -function Service(rpcImpl, requestDelimited, responseDelimited) { - - if (typeof rpcImpl !== "function") - throw TypeError("rpcImpl must be a function"); - - util.EventEmitter.call(this); - - /** - * RPC implementation. Becomes `null` once the service is ended. - * @type {RPCImpl|null} - */ - this.rpcImpl = rpcImpl; - - /** - * Whether requests are length-delimited. - * @type {boolean} - */ - this.requestDelimited = Boolean(requestDelimited); - - /** - * Whether responses are length-delimited. - * @type {boolean} - */ - this.responseDelimited = Boolean(responseDelimited); -} - -/** - * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. - * @param {Method|rpc.ServiceMethod} method Reflected or static method - * @param {Constructor} requestCtor Request constructor - * @param {Constructor} responseCtor Response constructor - * @param {TReq|Properties} request Request message or plain object - * @param {rpc.ServiceMethodCallback} callback Service callback - * @returns {undefined} - * @template TReq extends Message - * @template TRes extends Message - */ -Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) { - - if (!request) - throw TypeError("request must be specified"); - - var self = this; - if (!callback) - return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request); - - if (!self.rpcImpl) { - setTimeout(function() { callback(Error("already ended")); }, 0); - return undefined; - } - - try { - return self.rpcImpl( - method, - requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(), - function rpcCallback(err, response) { - - if (err) { - self.emit("error", err, method); - return callback(err); - } - - if (response === null) { - self.end(/* endedByRPC */ true); - return undefined; - } - - if (!(response instanceof responseCtor)) { - try { - response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response); - } catch (err) { - self.emit("error", err, method); - return callback(err); - } - } - - self.emit("data", response, method); - return callback(null, response); - } - ); - } catch (err) { - self.emit("error", err, method); - setTimeout(function() { callback(err); }, 0); - return undefined; - } -}; - -/** - * Ends this service and emits the `end` event. - * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. - * @returns {rpc.Service} `this` - */ -Service.prototype.end = function end(endedByRPC) { - if (this.rpcImpl) { - if (!endedByRPC) // signal end to rpcImpl - this.rpcImpl(null, null, null); - this.rpcImpl = null; - this.emit("end").off(); - } - return this; -}; - - -/***/ }), - -/***/ 8374: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -module.exports = LongBits; - -var util = __nccwpck_require__(71241); - -/** - * Constructs new long bits. - * @classdesc Helper class for working with the low and high bits of a 64 bit value. - * @memberof util - * @constructor - * @param {number} lo Low 32 bits, unsigned - * @param {number} hi High 32 bits, unsigned - */ -function LongBits(lo, hi) { - - // note that the casts below are theoretically unnecessary as of today, but older statically - // generated converter code might still call the ctor with signed 32bits. kept for compat. - - /** - * Low bits. - * @type {number} - */ - this.lo = lo >>> 0; - - /** - * High bits. - * @type {number} - */ - this.hi = hi >>> 0; -} - -/** - * Zero bits. - * @memberof util.LongBits - * @type {util.LongBits} - */ -var zero = LongBits.zero = new LongBits(0, 0); - -zero.toNumber = function() { return 0; }; -zero.zzEncode = zero.zzDecode = function() { return this; }; -zero.length = function() { return 1; }; - -/** - * Zero hash. - * @memberof util.LongBits - * @type {string} - */ -var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; - -/** - * Constructs new long bits from the specified number. - * @param {number} value Value - * @returns {util.LongBits} Instance - */ -LongBits.fromNumber = function fromNumber(value) { - if (value === 0) - return zero; - var sign = value < 0; - if (sign) - value = -value; - var lo = value >>> 0, - hi = (value - lo) / 4294967296 >>> 0; - if (sign) { - hi = ~hi >>> 0; - lo = ~lo >>> 0; - if (++lo > 4294967295) { - lo = 0; - if (++hi > 4294967295) - hi = 0; - } - } - return new LongBits(lo, hi); -}; - -/** - * Constructs new long bits from a number, long or string. - * @param {Long|number|string} value Value - * @returns {util.LongBits} Instance - */ -LongBits.from = function from(value) { - if (typeof value === "number") - return LongBits.fromNumber(value); - if (util.isString(value)) { - /* istanbul ignore else */ - if (util.Long) - value = util.Long.fromString(value); - else - return LongBits.fromNumber(parseInt(value, 10)); - } - return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero; -}; - -/** - * Converts this long bits to a possibly unsafe JavaScript number. - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {number} Possibly unsafe number - */ -LongBits.prototype.toNumber = function toNumber(unsigned) { - if (!unsigned && this.hi >>> 31) { - var lo = ~this.lo + 1 >>> 0, - hi = ~this.hi >>> 0; - if (!lo) - hi = hi + 1 >>> 0; - return -(lo + hi * 4294967296); - } - return this.lo + this.hi * 4294967296; -}; - -/** - * Converts this long bits to a long. - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {Long} Long - */ -LongBits.prototype.toLong = function toLong(unsigned) { - return util.Long - ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) - /* istanbul ignore next */ - : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; -}; - -var charCodeAt = String.prototype.charCodeAt; - -/** - * Constructs new long bits from the specified 8 characters long hash. - * @param {string} hash Hash - * @returns {util.LongBits} Bits - */ -LongBits.fromHash = function fromHash(hash) { - if (hash === zeroHash) - return zero; - return new LongBits( - ( charCodeAt.call(hash, 0) - | charCodeAt.call(hash, 1) << 8 - | charCodeAt.call(hash, 2) << 16 - | charCodeAt.call(hash, 3) << 24) >>> 0 - , - ( charCodeAt.call(hash, 4) - | charCodeAt.call(hash, 5) << 8 - | charCodeAt.call(hash, 6) << 16 - | charCodeAt.call(hash, 7) << 24) >>> 0 - ); -}; - -/** - * Converts this long bits to a 8 characters long hash. - * @returns {string} Hash - */ -LongBits.prototype.toHash = function toHash() { - return String.fromCharCode( - this.lo & 255, - this.lo >>> 8 & 255, - this.lo >>> 16 & 255, - this.lo >>> 24 , - this.hi & 255, - this.hi >>> 8 & 255, - this.hi >>> 16 & 255, - this.hi >>> 24 - ); -}; - -/** - * Zig-zag encodes this long bits. - * @returns {util.LongBits} `this` - */ -LongBits.prototype.zzEncode = function zzEncode() { - var mask = this.hi >> 31; - this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0; - this.lo = ( this.lo << 1 ^ mask) >>> 0; - return this; -}; - -/** - * Zig-zag decodes this long bits. - * @returns {util.LongBits} `this` - */ -LongBits.prototype.zzDecode = function zzDecode() { - var mask = -(this.lo & 1); - this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0; - this.hi = ( this.hi >>> 1 ^ mask) >>> 0; - return this; -}; - -/** - * Calculates the length of this longbits when encoded as a varint. - * @returns {number} Length - */ -LongBits.prototype.length = function length() { - var part0 = this.lo, - part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, - part2 = this.hi >>> 24; - return part2 === 0 - ? part1 === 0 - ? part0 < 16384 - ? part0 < 128 ? 1 : 2 - : part0 < 2097152 ? 3 : 4 - : part1 < 16384 - ? part1 < 128 ? 5 : 6 - : part1 < 2097152 ? 7 : 8 - : part2 < 128 ? 9 : 10; -}; - - -/***/ }), - -/***/ 71241: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var util = exports; - -// used to return a Promise where callback is omitted -util.asPromise = __nccwpck_require__(252); - -// converts to / from base64 encoded strings -util.base64 = __nccwpck_require__(26718); - -// base class of rpc.Service -util.EventEmitter = __nccwpck_require__(86850); - -// float handling accross browsers -util.float = __nccwpck_require__(21843); - -// requires modules optionally and hides the call from bundlers -util.inquire = __nccwpck_require__(60094); - -// converts to / from utf8 encoded strings -util.utf8 = __nccwpck_require__(99049); - -// provides a node-like buffer pool in the browser -util.pool = __nccwpck_require__(47743); - -// utility to work with the low and high bits of a 64 bit value -util.LongBits = __nccwpck_require__(8374); - -/** - * Whether running within node or not. - * @memberof util - * @type {boolean} - */ -util.isNode = Boolean(typeof global !== "undefined" - && global - && global.process - && global.process.versions - && global.process.versions.node); - -/** - * Global object reference. - * @memberof util - * @type {Object} - */ -util.global = util.isNode && global - || typeof window !== "undefined" && window - || typeof self !== "undefined" && self - || this; // eslint-disable-line no-invalid-this - -/** - * An immuable empty array. - * @memberof util - * @type {Array.<*>} - * @const - */ -util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes - -/** - * An immutable empty object. - * @type {Object} - * @const - */ -util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes - -/** - * Tests if the specified value is an integer. - * @function - * @param {*} value Value to test - * @returns {boolean} `true` if the value is an integer - */ -util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) { - return typeof value === "number" && isFinite(value) && Math.floor(value) === value; -}; - -/** - * Tests if the specified value is a string. - * @param {*} value Value to test - * @returns {boolean} `true` if the value is a string - */ -util.isString = function isString(value) { - return typeof value === "string" || value instanceof String; -}; - -/** - * Tests if the specified value is a non-null object. - * @param {*} value Value to test - * @returns {boolean} `true` if the value is a non-null object - */ -util.isObject = function isObject(value) { - return value && typeof value === "object"; -}; - -/** - * Checks if a property on a message is considered to be present. - * This is an alias of {@link util.isSet}. - * @function - * @param {Object} obj Plain object or message instance - * @param {string} prop Property name - * @returns {boolean} `true` if considered to be present, otherwise `false` - */ -util.isset = - -/** - * Checks if a property on a message is considered to be present. - * @param {Object} obj Plain object or message instance - * @param {string} prop Property name - * @returns {boolean} `true` if considered to be present, otherwise `false` - */ -util.isSet = function isSet(obj, prop) { - var value = obj[prop]; - if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins - return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0; - return false; -}; - -/** - * Any compatible Buffer instance. - * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings. - * @interface Buffer - * @extends Uint8Array - */ - -/** - * Node's Buffer class if available. - * @type {Constructor} - */ -util.Buffer = (function() { - try { - var Buffer = util.inquire("buffer").Buffer; - // refuse to use non-node buffers if not explicitly assigned (perf reasons): - return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null; - } catch (e) { - /* istanbul ignore next */ - return null; - } -})(); - -// Internal alias of or polyfull for Buffer.from. -util._Buffer_from = null; - -// Internal alias of or polyfill for Buffer.allocUnsafe. -util._Buffer_allocUnsafe = null; - -/** - * Creates a new buffer of whatever type supported by the environment. - * @param {number|number[]} [sizeOrArray=0] Buffer size or number array - * @returns {Uint8Array|Buffer} Buffer - */ -util.newBuffer = function newBuffer(sizeOrArray) { - /* istanbul ignore next */ - return typeof sizeOrArray === "number" - ? util.Buffer - ? util._Buffer_allocUnsafe(sizeOrArray) - : new util.Array(sizeOrArray) - : util.Buffer - ? util._Buffer_from(sizeOrArray) - : typeof Uint8Array === "undefined" - ? sizeOrArray - : new Uint8Array(sizeOrArray); -}; - -/** - * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. - * @type {Constructor} - */ -util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array; - -/** - * Any compatible Long instance. - * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js. - * @interface Long - * @property {number} low Low bits - * @property {number} high High bits - * @property {boolean} unsigned Whether unsigned or not - */ - -/** - * Long.js's Long class if available. - * @type {Constructor} - */ -util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long - || /* istanbul ignore next */ util.global.Long - || util.inquire("long"); - -/** - * Regular expression used to verify 2 bit (`bool`) map keys. - * @type {RegExp} - * @const - */ -util.key2Re = /^true|false|0|1$/; - -/** - * Regular expression used to verify 32 bit (`int32` etc.) map keys. - * @type {RegExp} - * @const - */ -util.key32Re = /^-?(?:0|[1-9][0-9]*)$/; - -/** - * Regular expression used to verify 64 bit (`int64` etc.) map keys. - * @type {RegExp} - * @const - */ -util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/; - -/** - * Converts a number or long to an 8 characters long hash string. - * @param {Long|number} value Value to convert - * @returns {string} Hash - */ -util.longToHash = function longToHash(value) { - return value - ? util.LongBits.from(value).toHash() - : util.LongBits.zeroHash; -}; - -/** - * Converts an 8 characters long hash string to a long or number. - * @param {string} hash Hash - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {Long|number} Original value - */ -util.longFromHash = function longFromHash(hash, unsigned) { - var bits = util.LongBits.fromHash(hash); - if (util.Long) - return util.Long.fromBits(bits.lo, bits.hi, unsigned); - return bits.toNumber(Boolean(unsigned)); -}; - -/** - * Merges the properties of the source object into the destination object. - * @memberof util - * @param {Object.} dst Destination object - * @param {Object.} src Source object - * @param {boolean} [ifNotSet=false] Merges only if the key is not already set - * @returns {Object.} Destination object - */ -function merge(dst, src, ifNotSet) { // used by converters - for (var keys = Object.keys(src), i = 0; i < keys.length; ++i) - if (dst[keys[i]] === undefined || !ifNotSet) - dst[keys[i]] = src[keys[i]]; - return dst; -} - -util.merge = merge; - -/** - * Converts the first character of a string to lower case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.lcFirst = function lcFirst(str) { - return str.charAt(0).toLowerCase() + str.substring(1); -}; - -/** - * Creates a custom error constructor. - * @memberof util - * @param {string} name Error name - * @returns {Constructor} Custom error constructor - */ -function newError(name) { - - function CustomError(message, properties) { - - if (!(this instanceof CustomError)) - return new CustomError(message, properties); - - // Error.call(this, message); - // ^ just returns a new error instance because the ctor can be called as a function - - Object.defineProperty(this, "message", { get: function() { return message; } }); - - /* istanbul ignore next */ - if (Error.captureStackTrace) // node - Error.captureStackTrace(this, CustomError); - else - Object.defineProperty(this, "stack", { value: new Error().stack || "" }); - - if (properties) - merge(this, properties); - } - - CustomError.prototype = Object.create(Error.prototype, { - constructor: { - value: CustomError, - writable: true, - enumerable: false, - configurable: true, - }, - name: { - get: function get() { return name; }, - set: undefined, - enumerable: false, - // configurable: false would accurately preserve the behavior of - // the original, but I'm guessing that was not intentional. - // For an actual error subclass, this property would - // be configurable. - configurable: true, - }, - toString: { - value: function value() { return this.name + ": " + this.message; }, - writable: true, - enumerable: false, - configurable: true, - }, - }); - - return CustomError; -} - -util.newError = newError; - -/** - * Constructs a new protocol error. - * @classdesc Error subclass indicating a protocol specifc error. - * @memberof util - * @extends Error - * @template T extends Message - * @constructor - * @param {string} message Error message - * @param {Object.} [properties] Additional properties - * @example - * try { - * MyMessage.decode(someBuffer); // throws if required fields are missing - * } catch (e) { - * if (e instanceof ProtocolError && e.instance) - * console.log("decoded so far: " + JSON.stringify(e.instance)); - * } - */ -util.ProtocolError = newError("ProtocolError"); - -/** - * So far decoded message instance. - * @name util.ProtocolError#instance - * @type {Message} - */ - -/** - * A OneOf getter as returned by {@link util.oneOfGetter}. - * @typedef OneOfGetter - * @type {function} - * @returns {string|undefined} Set field name, if any - */ - -/** - * Builds a getter for a oneof's present field name. - * @param {string[]} fieldNames Field names - * @returns {OneOfGetter} Unbound getter - */ -util.oneOfGetter = function getOneOf(fieldNames) { - var fieldMap = {}; - for (var i = 0; i < fieldNames.length; ++i) - fieldMap[fieldNames[i]] = 1; - - /** - * @returns {string|undefined} Set field name, if any - * @this Object - * @ignore - */ - return function() { // eslint-disable-line consistent-return - for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i) - if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null) - return keys[i]; - }; -}; - -/** - * A OneOf setter as returned by {@link util.oneOfSetter}. - * @typedef OneOfSetter - * @type {function} - * @param {string|undefined} value Field name - * @returns {undefined} - */ - -/** - * Builds a setter for a oneof's present field name. - * @param {string[]} fieldNames Field names - * @returns {OneOfSetter} Unbound setter - */ -util.oneOfSetter = function setOneOf(fieldNames) { - - /** - * @param {string} name Field name - * @returns {undefined} - * @this Object - * @ignore - */ - return function(name) { - for (var i = 0; i < fieldNames.length; ++i) - if (fieldNames[i] !== name) - delete this[fieldNames[i]]; - }; -}; - -/** - * Default conversion options used for {@link Message#toJSON} implementations. - * - * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely: - * - * - Longs become strings - * - Enums become string keys - * - Bytes become base64 encoded strings - * - (Sub-)Messages become plain objects - * - Maps become plain objects with all string keys - * - Repeated fields become arrays - * - NaN and Infinity for float and double fields become strings - * - * @type {IConversionOptions} - * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json - */ -util.toJSONOptions = { - longs: String, - enums: String, - bytes: String, - json: true -}; - -// Sets up buffer utility according to the environment (called in index-minimal) -util._configure = function() { - var Buffer = util.Buffer; - /* istanbul ignore if */ - if (!Buffer) { - util._Buffer_from = util._Buffer_allocUnsafe = null; - return; - } - // because node 4.x buffers are incompatible & immutable - // see: https://github.com/dcodeIO/protobuf.js/pull/665 - util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from || - /* istanbul ignore next */ - function Buffer_from(value, encoding) { - return new Buffer(value, encoding); - }; - util._Buffer_allocUnsafe = Buffer.allocUnsafe || - /* istanbul ignore next */ - function Buffer_allocUnsafe(size) { - return new Buffer(size); - }; -}; - - -/***/ }), - -/***/ 13098: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -module.exports = Writer; - -var util = __nccwpck_require__(71241); - -var BufferWriter; // cyclic - -var LongBits = util.LongBits, - base64 = util.base64, - utf8 = util.utf8; - -/** - * Constructs a new writer operation instance. - * @classdesc Scheduled writer operation. - * @constructor - * @param {function(*, Uint8Array, number)} fn Function to call - * @param {number} len Value byte length - * @param {*} val Value to write - * @ignore - */ -function Op(fn, len, val) { - - /** - * Function to call. - * @type {function(Uint8Array, number, *)} - */ - this.fn = fn; - - /** - * Value byte length. - * @type {number} - */ - this.len = len; - - /** - * Next operation. - * @type {Writer.Op|undefined} - */ - this.next = undefined; - - /** - * Value to write. - * @type {*} - */ - this.val = val; // type varies -} - -/* istanbul ignore next */ -function noop() {} // eslint-disable-line no-empty-function - -/** - * Constructs a new writer state instance. - * @classdesc Copied writer state. - * @memberof Writer - * @constructor - * @param {Writer} writer Writer to copy state from - * @ignore - */ -function State(writer) { - - /** - * Current head. - * @type {Writer.Op} - */ - this.head = writer.head; - - /** - * Current tail. - * @type {Writer.Op} - */ - this.tail = writer.tail; - - /** - * Current buffer length. - * @type {number} - */ - this.len = writer.len; - - /** - * Next state. - * @type {State|null} - */ - this.next = writer.states; -} - -/** - * Constructs a new writer instance. - * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`. - * @constructor - */ -function Writer() { - - /** - * Current length. - * @type {number} - */ - this.len = 0; - - /** - * Operations head. - * @type {Object} - */ - this.head = new Op(noop, 0, 0); - - /** - * Operations tail - * @type {Object} - */ - this.tail = this.head; - - /** - * Linked forked states. - * @type {Object|null} - */ - this.states = null; - - // When a value is written, the writer calculates its byte length and puts it into a linked - // list of operations to perform when finish() is called. This both allows us to allocate - // buffers of the exact required size and reduces the amount of work we have to do compared - // to first calculating over objects and then encoding over objects. In our case, the encoding - // part is just a linked list walk calling operations with already prepared values. -} - -var create = function create() { - return util.Buffer - ? function create_buffer_setup() { - return (Writer.create = function create_buffer() { - return new BufferWriter(); - })(); - } - /* istanbul ignore next */ - : function create_array() { - return new Writer(); - }; -}; - -/** - * Creates a new writer. - * @function - * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} - */ -Writer.create = create(); - -/** - * Allocates a buffer of the specified size. - * @param {number} size Buffer size - * @returns {Uint8Array} Buffer - */ -Writer.alloc = function alloc(size) { - return new util.Array(size); -}; - -// Use Uint8Array buffer pool in the browser, just like node does with buffers -/* istanbul ignore else */ -if (util.Array !== Array) - Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray); - -/** - * Pushes a new operation to the queue. - * @param {function(Uint8Array, number, *)} fn Function to call - * @param {number} len Value byte length - * @param {number} val Value to write - * @returns {Writer} `this` - * @private - */ -Writer.prototype._push = function push(fn, len, val) { - this.tail = this.tail.next = new Op(fn, len, val); - this.len += len; - return this; -}; - -function writeByte(val, buf, pos) { - buf[pos] = val & 255; -} - -function writeVarint32(val, buf, pos) { - while (val > 127) { - buf[pos++] = val & 127 | 128; - val >>>= 7; - } - buf[pos] = val; -} - -/** - * Constructs a new varint writer operation instance. - * @classdesc Scheduled varint writer operation. - * @extends Op - * @constructor - * @param {number} len Value byte length - * @param {number} val Value to write - * @ignore - */ -function VarintOp(len, val) { - this.len = len; - this.next = undefined; - this.val = val; -} - -VarintOp.prototype = Object.create(Op.prototype); -VarintOp.prototype.fn = writeVarint32; - -/** - * Writes an unsigned 32 bit value as a varint. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.uint32 = function write_uint32(value) { - // here, the call to this.push has been inlined and a varint specific Op subclass is used. - // uint32 is by far the most frequently used operation and benefits significantly from this. - this.len += (this.tail = this.tail.next = new VarintOp( - (value = value >>> 0) - < 128 ? 1 - : value < 16384 ? 2 - : value < 2097152 ? 3 - : value < 268435456 ? 4 - : 5, - value)).len; - return this; -}; - -/** - * Writes a signed 32 bit value as a varint. - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.int32 = function write_int32(value) { - return value < 0 - ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec - : this.uint32(value); -}; - -/** - * Writes a 32 bit value as a varint, zig-zag encoded. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.sint32 = function write_sint32(value) { - return this.uint32((value << 1 ^ value >> 31) >>> 0); -}; - -function writeVarint64(val, buf, pos) { - while (val.hi) { - buf[pos++] = val.lo & 127 | 128; - val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0; - val.hi >>>= 7; - } - while (val.lo > 127) { - buf[pos++] = val.lo & 127 | 128; - val.lo = val.lo >>> 7; - } - buf[pos++] = val.lo; -} - -/** - * Writes an unsigned 64 bit value as a varint. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.uint64 = function write_uint64(value) { - var bits = LongBits.from(value); - return this._push(writeVarint64, bits.length(), bits); -}; - -/** - * Writes a signed 64 bit value as a varint. - * @function - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.int64 = Writer.prototype.uint64; - -/** - * Writes a signed 64 bit value as a varint, zig-zag encoded. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.sint64 = function write_sint64(value) { - var bits = LongBits.from(value).zzEncode(); - return this._push(writeVarint64, bits.length(), bits); -}; - -/** - * Writes a boolish value as a varint. - * @param {boolean} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.bool = function write_bool(value) { - return this._push(writeByte, 1, value ? 1 : 0); -}; - -function writeFixed32(val, buf, pos) { - buf[pos ] = val & 255; - buf[pos + 1] = val >>> 8 & 255; - buf[pos + 2] = val >>> 16 & 255; - buf[pos + 3] = val >>> 24; -} - -/** - * Writes an unsigned 32 bit value as fixed 32 bits. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.fixed32 = function write_fixed32(value) { - return this._push(writeFixed32, 4, value >>> 0); -}; - -/** - * Writes a signed 32 bit value as fixed 32 bits. - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.sfixed32 = Writer.prototype.fixed32; - -/** - * Writes an unsigned 64 bit value as fixed 64 bits. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.fixed64 = function write_fixed64(value) { - var bits = LongBits.from(value); - return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi); -}; - -/** - * Writes a signed 64 bit value as fixed 64 bits. - * @function - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.sfixed64 = Writer.prototype.fixed64; - -/** - * Writes a float (32 bit). - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.float = function write_float(value) { - return this._push(util.float.writeFloatLE, 4, value); -}; - -/** - * Writes a double (64 bit float). - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.double = function write_double(value) { - return this._push(util.float.writeDoubleLE, 8, value); -}; - -var writeBytes = util.Array.prototype.set - ? function writeBytes_set(val, buf, pos) { - buf.set(val, pos); // also works for plain array values - } - /* istanbul ignore next */ - : function writeBytes_for(val, buf, pos) { - for (var i = 0; i < val.length; ++i) - buf[pos + i] = val[i]; - }; - -/** - * Writes a sequence of bytes. - * @param {Uint8Array|string} value Buffer or base64 encoded string to write - * @returns {Writer} `this` - */ -Writer.prototype.bytes = function write_bytes(value) { - var len = value.length >>> 0; - if (!len) - return this._push(writeByte, 1, 0); - if (util.isString(value)) { - var buf = Writer.alloc(len = base64.length(value)); - base64.decode(value, buf, 0); - value = buf; - } - return this.uint32(len)._push(writeBytes, len, value); -}; - -/** - * Writes a string. - * @param {string} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.string = function write_string(value) { - var len = utf8.length(value); - return len - ? this.uint32(len)._push(utf8.write, len, value) - : this._push(writeByte, 1, 0); -}; - -/** - * Forks this writer's state by pushing it to a stack. - * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. - * @returns {Writer} `this` - */ -Writer.prototype.fork = function fork() { - this.states = new State(this); - this.head = this.tail = new Op(noop, 0, 0); - this.len = 0; - return this; -}; - -/** - * Resets this instance to the last state. - * @returns {Writer} `this` - */ -Writer.prototype.reset = function reset() { - if (this.states) { - this.head = this.states.head; - this.tail = this.states.tail; - this.len = this.states.len; - this.states = this.states.next; - } else { - this.head = this.tail = new Op(noop, 0, 0); - this.len = 0; - } - return this; -}; - -/** - * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. - * @returns {Writer} `this` - */ -Writer.prototype.ldelim = function ldelim() { - var head = this.head, - tail = this.tail, - len = this.len; - this.reset().uint32(len); - if (len) { - this.tail.next = head.next; // skip noop - this.tail = tail; - this.len += len; - } - return this; -}; - -/** - * Finishes the write operation. - * @returns {Uint8Array} Finished buffer - */ -Writer.prototype.finish = function finish() { - var head = this.head.next, // skip noop - buf = this.constructor.alloc(this.len), - pos = 0; - while (head) { - head.fn(head.val, buf, pos); - pos += head.len; - head = head.next; - } - // this.head = this.tail = null; - return buf; -}; - -Writer._configure = function(BufferWriter_) { - BufferWriter = BufferWriter_; - Writer.create = create(); - BufferWriter._configure(); -}; - - -/***/ }), - -/***/ 41863: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -module.exports = BufferWriter; - -// extends Writer -var Writer = __nccwpck_require__(13098); -(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter; - -var util = __nccwpck_require__(71241); - -/** - * Constructs a new buffer writer instance. - * @classdesc Wire format writer using node buffers. - * @extends Writer - * @constructor - */ -function BufferWriter() { - Writer.call(this); -} - -BufferWriter._configure = function () { - /** - * Allocates a buffer of the specified size. - * @function - * @param {number} size Buffer size - * @returns {Buffer} Buffer - */ - BufferWriter.alloc = util._Buffer_allocUnsafe; - - BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" - ? function writeBytesBuffer_set(val, buf, pos) { - buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited) - // also works for plain array values - } - /* istanbul ignore next */ - : function writeBytesBuffer_copy(val, buf, pos) { - if (val.copy) // Buffer values - val.copy(buf, pos, 0, val.length); - else for (var i = 0; i < val.length;) // plain array values - buf[pos++] = val[i++]; - }; -}; - - -/** - * @override - */ -BufferWriter.prototype.bytes = function write_bytes_buffer(value) { - if (util.isString(value)) - value = util._Buffer_from(value, "base64"); - var len = value.length >>> 0; - this.uint32(len); - if (len) - this._push(BufferWriter.writeBytesBuffer, len, value); - return this; -}; - -function writeStringBuffer(val, buf, pos) { - if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions) - util.utf8.write(val, buf, pos); - else if (buf.utf8Write) - buf.utf8Write(val, pos); - else - buf.write(val, pos); -} - -/** - * @override - */ -BufferWriter.prototype.string = function write_string_buffer(value) { - var len = util.Buffer.byteLength(value); - this.uint32(len); - if (len) - this._push(writeStringBuffer, len, value); - return this; -}; - - -/** - * Finishes the write operation. - * @name BufferWriter#finish - * @function - * @returns {Buffer} Finished buffer - */ - -BufferWriter._configure(); - - -/***/ }), - -/***/ 91532: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -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__(40785) -const { safeRe: re, t } = __nccwpck_require__(9523) -const cmp = __nccwpck_require__(75098) -const debug = __nccwpck_require__(50427) -const SemVer = __nccwpck_require__(48088) -const Range = __nccwpck_require__(9828) - - -/***/ }), - -/***/ 9828: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -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) { - // 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__(15339) -const cache = new LRU() - -const parseOptions = __nccwpck_require__(40785) -const Comparator = __nccwpck_require__(91532) -const debug = __nccwpck_require__(50427) -const SemVer = __nccwpck_require__(48088) -const { - safeRe: re, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace, -} = __nccwpck_require__(9523) -const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __nccwpck_require__(42293) - -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) => { - 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 === '*' - -// ~, ~> --> * (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] - 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 <${+M + 1}.0.0-0` - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0-0 - ret = `>=${M}.${m}.0 <${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 - }${z} <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p - }${z} <${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) - 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 -} - - -/***/ }), - -/***/ 48088: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const debug = __nccwpck_require__(50427) -const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(42293) -const { safeRe: re, t } = __nccwpck_require__(9523) - -const parseOptions = __nccwpck_require__(40785) -const { compareIdentifiers } = __nccwpck_require__(92463) -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) - } - - return ( - compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) - ) - } - - 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 (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 - } -} - -module.exports = SemVer - - -/***/ }), - -/***/ 48848: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const parse = __nccwpck_require__(75925) -const clean = (version, options) => { - const s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} -module.exports = clean - - -/***/ }), - -/***/ 75098: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const eq = __nccwpck_require__(91898) -const neq = __nccwpck_require__(6017) -const gt = __nccwpck_require__(84123) -const gte = __nccwpck_require__(15522) -const lt = __nccwpck_require__(80194) -const lte = __nccwpck_require__(77520) - -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 - - -/***/ }), - -/***/ 13466: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(48088) -const parse = __nccwpck_require__(75925) -const { safeRe: re, t } = __nccwpck_require__(9523) - -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 - - -/***/ }), - -/***/ 92156: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(48088) -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 - - -/***/ }), - -/***/ 62804: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compare = __nccwpck_require__(44309) -const compareLoose = (a, b) => compare(a, b, true) -module.exports = compareLoose - - -/***/ }), - -/***/ 44309: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(48088) -const compare = (a, b, loose) => - new SemVer(a, loose).compare(new SemVer(b, loose)) - -module.exports = compare - - -/***/ }), - -/***/ 64297: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const parse = __nccwpck_require__(75925) - -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 preleases - return 'prerelease' -} - -module.exports = diff - - -/***/ }), - -/***/ 91898: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compare = __nccwpck_require__(44309) -const eq = (a, b, loose) => compare(a, b, loose) === 0 -module.exports = eq - - -/***/ }), - -/***/ 84123: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compare = __nccwpck_require__(44309) -const gt = (a, b, loose) => compare(a, b, loose) > 0 -module.exports = gt - - -/***/ }), - -/***/ 15522: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compare = __nccwpck_require__(44309) -const gte = (a, b, loose) => compare(a, b, loose) >= 0 -module.exports = gte - - -/***/ }), - -/***/ 30900: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(48088) - -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 - - -/***/ }), - -/***/ 80194: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compare = __nccwpck_require__(44309) -const lt = (a, b, loose) => compare(a, b, loose) < 0 -module.exports = lt - - -/***/ }), - -/***/ 77520: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compare = __nccwpck_require__(44309) -const lte = (a, b, loose) => compare(a, b, loose) <= 0 -module.exports = lte - - -/***/ }), - -/***/ 76688: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(48088) -const major = (a, loose) => new SemVer(a, loose).major -module.exports = major - - -/***/ }), - -/***/ 38447: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(48088) -const minor = (a, loose) => new SemVer(a, loose).minor -module.exports = minor - - -/***/ }), - -/***/ 6017: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compare = __nccwpck_require__(44309) -const neq = (a, b, loose) => compare(a, b, loose) !== 0 -module.exports = neq - - -/***/ }), - -/***/ 75925: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(48088) -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 - - -/***/ }), - -/***/ 42866: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(48088) -const patch = (a, loose) => new SemVer(a, loose).patch -module.exports = patch - - -/***/ }), - -/***/ 24016: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const parse = __nccwpck_require__(75925) -const prerelease = (version, options) => { - const parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} -module.exports = prerelease - - -/***/ }), - -/***/ 76417: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compare = __nccwpck_require__(44309) -const rcompare = (a, b, loose) => compare(b, a, loose) -module.exports = rcompare - - -/***/ }), - -/***/ 8701: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compareBuild = __nccwpck_require__(92156) -const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) -module.exports = rsort - - -/***/ }), - -/***/ 6055: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Range = __nccwpck_require__(9828) -const satisfies = (version, range, options) => { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} -module.exports = satisfies - - -/***/ }), - -/***/ 61426: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const compareBuild = __nccwpck_require__(92156) -const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) -module.exports = sort - - -/***/ }), - -/***/ 19601: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const parse = __nccwpck_require__(75925) -const valid = (version, options) => { - const v = parse(version, options) - return v ? v.version : null -} -module.exports = valid - - -/***/ }), - -/***/ 11383: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -// just pre-load all the stuff that index.js lazily exports -const internalRe = __nccwpck_require__(9523) -const constants = __nccwpck_require__(42293) -const SemVer = __nccwpck_require__(48088) -const identifiers = __nccwpck_require__(92463) -const parse = __nccwpck_require__(75925) -const valid = __nccwpck_require__(19601) -const clean = __nccwpck_require__(48848) -const inc = __nccwpck_require__(30900) -const diff = __nccwpck_require__(64297) -const major = __nccwpck_require__(76688) -const minor = __nccwpck_require__(38447) -const patch = __nccwpck_require__(42866) -const prerelease = __nccwpck_require__(24016) -const compare = __nccwpck_require__(44309) -const rcompare = __nccwpck_require__(76417) -const compareLoose = __nccwpck_require__(62804) -const compareBuild = __nccwpck_require__(92156) -const sort = __nccwpck_require__(61426) -const rsort = __nccwpck_require__(8701) -const gt = __nccwpck_require__(84123) -const lt = __nccwpck_require__(80194) -const eq = __nccwpck_require__(91898) -const neq = __nccwpck_require__(6017) -const gte = __nccwpck_require__(15522) -const lte = __nccwpck_require__(77520) -const cmp = __nccwpck_require__(75098) -const coerce = __nccwpck_require__(13466) -const Comparator = __nccwpck_require__(91532) -const Range = __nccwpck_require__(9828) -const satisfies = __nccwpck_require__(6055) -const toComparators = __nccwpck_require__(52706) -const maxSatisfying = __nccwpck_require__(20579) -const minSatisfying = __nccwpck_require__(10832) -const minVersion = __nccwpck_require__(34179) -const validRange = __nccwpck_require__(2098) -const outside = __nccwpck_require__(60420) -const gtr = __nccwpck_require__(9380) -const ltr = __nccwpck_require__(33323) -const intersects = __nccwpck_require__(27008) -const simplifyRange = __nccwpck_require__(75297) -const subset = __nccwpck_require__(7863) -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, - 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, -} - - -/***/ }), - -/***/ 42293: -/***/ ((module) => { - -"use strict"; - - -// 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, -} - - -/***/ }), - -/***/ 50427: -/***/ ((module) => { - -"use strict"; - - -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 - - -/***/ }), - -/***/ 92463: -/***/ ((module) => { - -"use strict"; - - -const numeric = /^[0-9]+$/ -const compareIdentifiers = (a, b) => { - 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, -} - - -/***/ }), - -/***/ 15339: -/***/ ((module) => { - -"use strict"; - - -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 - - -/***/ }), - -/***/ 40785: -/***/ ((module) => { - -"use strict"; - - -// 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 - - -/***/ }), - -/***/ 9523: -/***/ ((module, exports, __nccwpck_require__) => { - -"use strict"; - - -const { - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_LENGTH, -} = __nccwpck_require__(42293) -const debug = __nccwpck_require__(50427) -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-numberic identifiers include numberic identifiers but can be longer. -// Therefore non-numberic 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 identifer, 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*$') - - -/***/ }), - -/***/ 9380: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -// Determine if version is greater than all the versions possible in the range. -const outside = __nccwpck_require__(60420) -const gtr = (version, range, options) => outside(version, range, '>', options) -module.exports = gtr - - -/***/ }), - -/***/ 27008: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Range = __nccwpck_require__(9828) -const intersects = (r1, r2, options) => { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2, options) -} -module.exports = intersects - - -/***/ }), - -/***/ 33323: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const outside = __nccwpck_require__(60420) -// 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 - - -/***/ }), - -/***/ 20579: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(48088) -const Range = __nccwpck_require__(9828) - -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 - - -/***/ }), - -/***/ 10832: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(48088) -const Range = __nccwpck_require__(9828) -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 - - -/***/ }), - -/***/ 34179: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(48088) -const Range = __nccwpck_require__(9828) -const gt = __nccwpck_require__(84123) - -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 - - -/***/ }), - -/***/ 60420: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const SemVer = __nccwpck_require__(48088) -const Comparator = __nccwpck_require__(91532) -const { ANY } = Comparator -const Range = __nccwpck_require__(9828) -const satisfies = __nccwpck_require__(6055) -const gt = __nccwpck_require__(84123) -const lt = __nccwpck_require__(80194) -const lte = __nccwpck_require__(77520) -const gte = __nccwpck_require__(15522) - -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 - - -/***/ }), - -/***/ 75297: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -// 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__(6055) -const compare = __nccwpck_require__(44309) -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 -} - - -/***/ }), - -/***/ 7863: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Range = __nccwpck_require__(9828) -const Comparator = __nccwpck_require__(91532) -const { ANY } = Comparator -const satisfies = __nccwpck_require__(6055) -const compare = __nccwpck_require__(44309) - -// 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 GT.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 === '>=' && !satisfies(gt.semver, String(c), options)) { - 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 === '<=' && !satisfies(lt.semver, String(c), options)) { - 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 - - -/***/ }), - -/***/ 52706: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Range = __nccwpck_require__(9828) - -// 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 - - -/***/ }), - -/***/ 2098: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Range = __nccwpck_require__(9828) -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 - - -/***/ }), - -/***/ 59318: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const os = __nccwpck_require__(22037); -const tty = __nccwpck_require__(76224); -const hasFlag = __nccwpck_require__(31621); - -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))) -}; - - -/***/ }), - -/***/ 74294: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = __nccwpck_require__(54219); - - -/***/ }), - -/***/ 54219: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var net = __nccwpck_require__(41808); -var tls = __nccwpck_require__(24404); -var http = __nccwpck_require__(13685); -var https = __nccwpck_require__(95687); -var events = __nccwpck_require__(82361); -var assert = __nccwpck_require__(39491); -var util = __nccwpck_require__(73837); - - -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 - - -/***/ }), - -/***/ 41773: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Client = __nccwpck_require__(8176) -const Dispatcher = __nccwpck_require__(87781) -const Pool = __nccwpck_require__(20177) -const BalancedPool = __nccwpck_require__(46232) -const RoundRobinPool = __nccwpck_require__(67599) -const Agent = __nccwpck_require__(71208) -const ProxyAgent = __nccwpck_require__(15657) -const Socks5ProxyAgent = __nccwpck_require__(58924) -const EnvHttpProxyAgent = __nccwpck_require__(88374) -const RetryAgent = __nccwpck_require__(94411) -const H2CClient = __nccwpck_require__(17667) -const errors = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { InvalidArgumentError } = errors -const api = __nccwpck_require__(44059) -const buildConnector = __nccwpck_require__(82067) -const MockClient = __nccwpck_require__(58687) -const { MockCallHistory, MockCallHistoryLog } = __nccwpck_require__(42054) -const MockAgent = __nccwpck_require__(66771) -const MockPool = __nccwpck_require__(26193) -const SnapshotAgent = __nccwpck_require__(26776) -const mockErrors = __nccwpck_require__(50888) -const RetryHandler = __nccwpck_require__(86242) -const { getGlobalDispatcher, setGlobalDispatcher } = __nccwpck_require__(21892) -const DecoratorHandler = __nccwpck_require__(4117) -const RedirectHandler = __nccwpck_require__(30649) - -Object.assign(Dispatcher.prototype, api) - -module.exports.Dispatcher = Dispatcher -module.exports.Client = Client -module.exports.Pool = Pool -module.exports.BalancedPool = BalancedPool -module.exports.RoundRobinPool = RoundRobinPool -module.exports.Agent = Agent -module.exports.ProxyAgent = ProxyAgent -module.exports.Socks5ProxyAgent = Socks5ProxyAgent -module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent -module.exports.RetryAgent = RetryAgent -module.exports.H2CClient = H2CClient -module.exports.RetryHandler = RetryHandler - -module.exports.DecoratorHandler = DecoratorHandler -module.exports.RedirectHandler = RedirectHandler -module.exports.interceptors = { - redirect: __nccwpck_require__(87773), - responseError: __nccwpck_require__(55741), - retry: __nccwpck_require__(55558), - dump: __nccwpck_require__(66090), - dns: __nccwpck_require__(97334), - cache: __nccwpck_require__(89804), - decompress: __nccwpck_require__(7750), - deduplicate: __nccwpck_require__(51316) -} - -module.exports.cacheStores = { - MemoryCacheStore: __nccwpck_require__(38393) -} - -const SqliteCacheStore = __nccwpck_require__(54474) -module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore - -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__(85170).fetch) - -// Capture __filename at module load time for stack trace augmentation. -// This may be undefined when bundled in environments like Node.js internals. -const currentFilename = typeof __filename !== 'undefined' ? __filename : undefined - -function appendFetchStackTrace (err, filename) { - if (!err || typeof err !== 'object') { - return - } - - const stack = typeof err.stack === 'string' ? err.stack : '' - const normalizedFilename = filename.replace(/\\/g, '/') - - if (stack && (stack.includes(filename) || stack.includes(normalizedFilename))) { - return - } - - const capture = {} - Error.captureStackTrace(capture, appendFetchStackTrace) - - if (!capture.stack) { - return - } - - const captureLines = capture.stack.split('\n').slice(1).join('\n') - - err.stack = stack ? `${stack}\n${captureLines}` : capture.stack -} - -module.exports.fetch = function fetch (init, options = undefined) { - return fetchImpl(init, options).catch(err => { - if (currentFilename) { - appendFetchStackTrace(err, currentFilename) - } else if (err && typeof err === 'object') { - Error.captureStackTrace(err, module.exports.fetch) - } - throw err - }) -} -module.exports.Headers = __nccwpck_require__(52991).Headers -module.exports.Response = __nccwpck_require__(12583).Response -module.exports.Request = __nccwpck_require__(20610).Request -module.exports.FormData = __nccwpck_require__(73162).FormData - -const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(52850) - -module.exports.setGlobalOrigin = setGlobalOrigin -module.exports.getGlobalOrigin = getGlobalOrigin - -const { CacheStorage } = __nccwpck_require__(76847) -const { kConstruct } = __nccwpck_require__(72785) - -module.exports.caches = new CacheStorage(kConstruct) - -const { deleteCookie, getCookies, getSetCookies, setCookie, parseCookie } = __nccwpck_require__(42193) - -module.exports.deleteCookie = deleteCookie -module.exports.getCookies = getCookies -module.exports.getSetCookies = getSetCookies -module.exports.setCookie = setCookie -module.exports.parseCookie = parseCookie - -const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(17704) - -module.exports.parseMIMEType = parseMIMEType -module.exports.serializeAMimeType = serializeAMimeType - -const { CloseEvent, ErrorEvent, MessageEvent } = __nccwpck_require__(55033) -const { WebSocket, ping } = __nccwpck_require__(92846) -module.exports.WebSocket = WebSocket -module.exports.CloseEvent = CloseEvent -module.exports.ErrorEvent = ErrorEvent -module.exports.MessageEvent = MessageEvent -module.exports.ping = ping - -module.exports.WebSocketStream = __nccwpck_require__(44293).WebSocketStream -module.exports.WebSocketError = __nccwpck_require__(97501).WebSocketError - -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.MockCallHistory = MockCallHistory -module.exports.MockCallHistoryLog = MockCallHistoryLog -module.exports.MockPool = MockPool -module.exports.MockAgent = MockAgent -module.exports.SnapshotAgent = SnapshotAgent -module.exports.mockErrors = mockErrors - -const { EventSource } = __nccwpck_require__(36127) - -module.exports.EventSource = EventSource - -function install () { - globalThis.fetch = module.exports.fetch - globalThis.Headers = module.exports.Headers - globalThis.Response = module.exports.Response - globalThis.Request = module.exports.Request - globalThis.FormData = module.exports.FormData - globalThis.WebSocket = module.exports.WebSocket - globalThis.CloseEvent = module.exports.CloseEvent - globalThis.ErrorEvent = module.exports.ErrorEvent - globalThis.MessageEvent = module.exports.MessageEvent - globalThis.EventSource = module.exports.EventSource -} - -module.exports.install = install - - -/***/ }), - -/***/ 7032: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { addAbortListener } = __nccwpck_require__(83983) -const { RequestAbortedError } = __nccwpck_require__(48045) - -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 -} - - -/***/ }), - -/***/ 29744: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(98061) -const { AsyncResource } = __nccwpck_require__(92761) -const { InvalidArgumentError, SocketError } = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { addSignal, removeSignal } = __nccwpck_require__(7032) - -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) - const connectOptions = { ...opts, method: 'CONNECT' } - - this.dispatch(connectOptions, connectHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = connect - - -/***/ }), - -/***/ 28752: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - Readable, - Duplex, - PassThrough -} = __nccwpck_require__(84492) -const assert = __nccwpck_require__(98061) -const { AsyncResource } = __nccwpck_require__(92761) -const { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError -} = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { addSignal, removeSignal } = __nccwpck_require__(7032) - -function noop () {} - -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', noop) - - 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 { res } = this - - if (this.reason) { - abort(this.reason) - return - } - - assert(!res, 'pipeline cannot be retried') - - 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', noop) - 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 - - -/***/ }), - -/***/ 55448: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(98061) -const { AsyncResource } = __nccwpck_require__(92761) -const { Readable } = __nccwpck_require__(73858) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) - -function noop () {} - -class RequestHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - const { signal, method, opaque, body, onInfo, responseHeaders, 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', noop), 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.highWaterMark = highWaterMark - this.reason = null - this.removeAbortListener = null - - if (signal?.aborted) { - this.reason = signal.reason ?? new RequestAbortedError() - } else if (signal) { - this.removeAbortListener = util.addAbortListener(signal, () => { - this.reason = signal.reason ?? new RequestAbortedError() - if (this.res) { - util.destroy(this.res.on('error', noop), this.reason) - } else if (this.abort) { - this.abort(this.reason) - } - }) - } - } - - 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.removeAbortListener = null - } - - this.callback = null - this.res = res - if (callback !== null) { - try { - this.runInAsyncScope(callback, null, null, { - statusCode, - statusText: statusMessage, - headers, - trailers: this.trailers, - opaque, - body: res, - context - }) - } catch (err) { - // If the callback throws synchronously, we need to handle it - // Remove reference to res to allow res being garbage collected - this.res = null - - // Destroy the response stream - util.destroy(res.on('error', noop), err) - - // Use queueMicrotask to re-throw the error so it reaches uncaughtException - queueMicrotask(() => { - throw err - }) - } - } - } - - 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.on('error', noop), err) - }) - } - - if (body) { - this.body = null - - if (util.isStream(body)) { - body.on('error', noop) - util.destroy(body, err) - } - } - - if (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 { - const handler = new RequestHandler(opts, callback) - - this.dispatch(opts, handler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = request -module.exports.RequestHandler = RequestHandler - - -/***/ }), - -/***/ 75395: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(98061) -const { finished } = __nccwpck_require__(84492) -const { AsyncResource } = __nccwpck_require__(92761) -const { InvalidArgumentError, InvalidReturnValueError } = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { addSignal, removeSignal } = __nccwpck_require__(7032) - -function noop () {} - -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 } = 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', noop), 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 - - 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, 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 - - if (factory === null) { - return - } - - const 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 { - const handler = new StreamHandler(opts, factory, callback) - - this.dispatch(opts, handler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = stream - - -/***/ }), - -/***/ 36923: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { InvalidArgumentError, SocketError } = __nccwpck_require__(48045) -const { AsyncResource } = __nccwpck_require__(92761) -const assert = __nccwpck_require__(98061) -const util = __nccwpck_require__(83983) -const { kHTTP2Stream } = __nccwpck_require__(72785) -const { addSignal, removeSignal } = __nccwpck_require__(7032) - -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(socket[kHTTP2Stream] === true ? statusCode === 200 : 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) - const upgradeOpts = { - ...opts, - method: opts.method || 'GET', - upgrade: opts.protocol || 'Websocket' - } - - this.dispatch(upgradeOpts, upgradeHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = upgrade - - -/***/ }), - -/***/ 44059: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -module.exports.request = __nccwpck_require__(55448) -module.exports.stream = __nccwpck_require__(75395) -module.exports.pipeline = __nccwpck_require__(28752) -module.exports.upgrade = __nccwpck_require__(36923) -module.exports.connect = __nccwpck_require__(29744) - - -/***/ }), - -/***/ 73858: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(98061) -const { Readable } = __nccwpck_require__(84492) -const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { ReadableStreamFrom } = __nccwpck_require__(83983) - -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 kUsed = Symbol('kUsed') -const kBytesRead = Symbol('kBytesRead') - -const noop = () => {} - -/** - * @class - * @extends {Readable} - * @see https://fetch.spec.whatwg.org/#body - */ -class BodyReadable extends Readable { - /** - * @param {object} opts - * @param {(this: Readable, size: number) => void} opts.resume - * @param {() => (void | null)} opts.abort - * @param {string} [opts.contentType = ''] - * @param {number} [opts.contentLength] - * @param {number} [opts.highWaterMark = 64 * 1024] - */ - 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 - - /** @type {Consume | null} */ - this[kConsume] = null - - /** @type {number} */ - this[kBytesRead] = 0 - - /** @type {ReadableStream|null} */ - this[kBody] = null - - /** @type {boolean} */ - this[kUsed] = false - - /** @type {string} */ - this[kContentType] = contentType - - /** @type {number|null} */ - this[kContentLength] = Number.isFinite(contentLength) ? contentLength : null - - /** - * 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(). - * - * @type {boolean} - */ - this[kReading] = false - } - - /** - * @param {Error|null} err - * @param {(error:(Error|null)) => void} callback - * @returns {void} - */ - _destroy (err, callback) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (err) { - this[kAbort]() - } - - // 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 an 'error' listener will - // never get a chance and will always encounter an unhandled exception. - if (!this[kUsed]) { - setImmediate(callback, err) - } else { - callback(err) - } - } - - /** - * @param {string|symbol} event - * @param {(...args: any[]) => void} listener - * @returns {this} - */ - on (event, listener) { - if (event === 'data' || event === 'readable') { - this[kReading] = true - this[kUsed] = true - } - return super.on(event, listener) - } - - /** - * @param {string|symbol} event - * @param {(...args: any[]) => void} listener - * @returns {this} - */ - addListener (event, listener) { - return this.on(event, listener) - } - - /** - * @param {string|symbol} event - * @param {(...args: any[]) => void} listener - * @returns {this} - */ - off (event, listener) { - const ret = super.off(event, listener) - if (event === 'data' || event === 'readable') { - this[kReading] = ( - this.listenerCount('data') > 0 || - this.listenerCount('readable') > 0 - ) - } - return ret - } - - /** - * @param {string|symbol} event - * @param {(...args: any[]) => void} listener - * @returns {this} - */ - removeListener (event, listener) { - return this.off(event, listener) - } - - /** - * @param {Buffer|null} chunk - * @returns {boolean} - */ - push (chunk) { - if (chunk) { - this[kBytesRead] += chunk.length - if (this[kConsume]) { - consumePush(this[kConsume], chunk) - return this[kReading] ? super.push(chunk) : true - } - } - - return super.push(chunk) - } - - /** - * Consumes and returns the body as a string. - * - * @see https://fetch.spec.whatwg.org/#dom-body-text - * @returns {Promise} - */ - text () { - return consume(this, 'text') - } - - /** - * Consumes and returns the body as a JavaScript Object. - * - * @see https://fetch.spec.whatwg.org/#dom-body-json - * @returns {Promise} - */ - json () { - return consume(this, 'json') - } - - /** - * Consumes and returns the body as a Blob - * - * @see https://fetch.spec.whatwg.org/#dom-body-blob - * @returns {Promise} - */ - blob () { - return consume(this, 'blob') - } - - /** - * Consumes and returns the body as an Uint8Array. - * - * @see https://fetch.spec.whatwg.org/#dom-body-bytes - * @returns {Promise} - */ - bytes () { - return consume(this, 'bytes') - } - - /** - * Consumes and returns the body as an ArrayBuffer. - * - * @see https://fetch.spec.whatwg.org/#dom-body-arraybuffer - * @returns {Promise} - */ - arrayBuffer () { - return consume(this, 'arrayBuffer') - } - - /** - * Not implemented - * - * @see https://fetch.spec.whatwg.org/#dom-body-formdata - * @throws {NotSupportedError} - */ - async formData () { - // TODO: Implement. - throw new NotSupportedError() - } - - /** - * Returns true if the body is not null and the body has been consumed. - * Otherwise, returns false. - * - * @see https://fetch.spec.whatwg.org/#dom-body-bodyused - * @readonly - * @returns {boolean} - */ - get bodyUsed () { - return util.isDisturbed(this) - } - - /** - * @see https://fetch.spec.whatwg.org/#dom-body-body - * @readonly - * @returns {ReadableStream} - */ - 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] - } - - /** - * Dumps the response body by reading `limit` number of bytes. - * @param {object} opts - * @param {number} [opts.limit = 131072] Number of bytes to read. - * @param {AbortSignal} [opts.signal] An AbortSignal to cancel the dump. - * @returns {Promise} - */ - dump (opts) { - const signal = opts?.signal - - if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) { - return Promise.reject(new InvalidArgumentError('signal must be an AbortSignal')) - } - - const limit = opts?.limit && Number.isFinite(opts.limit) - ? opts.limit - : 128 * 1024 - - if (signal?.aborted) { - return Promise.reject(signal.reason ?? new AbortError()) - } - - if (this._readableState.closeEmitted) { - return Promise.resolve(null) - } - - return new Promise((resolve, reject) => { - if ( - (this[kContentLength] && (this[kContentLength] > limit)) || - this[kBytesRead] > limit - ) { - this.destroy(new AbortError()) - } - - if (signal) { - 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) - } - }) - } else { - this.on('close', resolve) - } - - this - .on('error', noop) - .on('data', () => { - if (this[kBytesRead] > limit) { - this.destroy() - } - }) - .resume() - }) - } - - /** - * @param {BufferEncoding} encoding - * @returns {this} - */ - setEncoding (encoding) { - if (Buffer.isEncoding(encoding)) { - this._readableState.encoding = encoding - } - return this - } -} - -/** - * @see https://streams.spec.whatwg.org/#readablestream-locked - * @param {BodyReadable} bodyReadable - * @returns {boolean} - */ -function isLocked (bodyReadable) { - // Consume is an implicit lock. - return bodyReadable[kBody]?.locked === true || bodyReadable[kConsume] !== null -} - -/** - * @see https://fetch.spec.whatwg.org/#body-unusable - * @param {BodyReadable} bodyReadable - * @returns {boolean} - */ -function isUnusable (bodyReadable) { - return util.isDisturbed(bodyReadable) || isLocked(bodyReadable) -} - -/** - * @typedef {'text' | 'json' | 'blob' | 'bytes' | 'arrayBuffer'} ConsumeType - */ - -/** - * @template {ConsumeType} T - * @typedef {T extends 'text' ? string : - * T extends 'json' ? unknown : - * T extends 'blob' ? Blob : - * T extends 'arrayBuffer' ? ArrayBuffer : - * T extends 'bytes' ? Uint8Array : - * never - * } ConsumeReturnType - */ -/** - * @typedef {object} Consume - * @property {ConsumeType} type - * @property {BodyReadable} stream - * @property {((value?: any) => void)} resolve - * @property {((err: Error) => void)} reject - * @property {number} length - * @property {Buffer[]} body - */ - -/** - * @template {ConsumeType} T - * @param {BodyReadable} stream - * @param {T} type - * @returns {Promise>} - */ -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', reject) - .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]) - }) - } - }) -} - -/** - * @param {Consume} consume - * @returns {void} - */ -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], this._readableState.encoding) - } else { - consume.stream.on('end', function () { - consumeEnd(this[kConsume], this._readableState.encoding) - }) - } - - consume.stream.resume() - - while (consume.stream.read() != null) { - // Loop - } -} - -/** - * @param {Buffer[]} chunks - * @param {number} length - * @param {BufferEncoding} [encoding='utf8'] - * @returns {string} - */ -function chunksDecode (chunks, length, encoding) { - 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 - if (!encoding || encoding === 'utf8' || encoding === 'utf-8') { - return buffer.utf8Slice(start, bufferLength) - } else { - return buffer.subarray(start, bufferLength).toString(encoding) - } -} - -/** - * @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 -} - -/** - * @param {Consume} consume - * @param {BufferEncoding} encoding - * @returns {void} - */ -function consumeEnd (consume, encoding) { - const { type, body, resolve, stream, length } = consume - - try { - if (type === 'text') { - resolve(chunksDecode(body, length, encoding)) - } else if (type === 'json') { - resolve(JSON.parse(chunksDecode(body, length, encoding))) - } 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) - } -} - -/** - * @param {Consume} consume - * @param {Buffer} chunk - * @returns {void} - */ -function consumePush (consume, chunk) { - consume.length += chunk.length - consume.body.push(chunk) -} - -/** - * @param {Consume} consume - * @param {Error} [err] - * @returns {void} - */ -function consumeFinish (consume, err) { - if (consume.body === null) { - return - } - - if (err) { - consume.reject(err) - } else { - consume.resolve() - } - - // Reset the consume object to allow for garbage collection. - consume.type = null - consume.stream = null - consume.resolve = null - consume.reject = null - consume.length = 0 - consume.body = null -} - -module.exports = { - Readable: BodyReadable, - chunksDecode -} - - -/***/ }), - -/***/ 38393: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { Writable } = __nccwpck_require__(84492) -const { EventEmitter } = __nccwpck_require__(15673) -const { assertCacheKey, assertCacheValue } = __nccwpck_require__(88047) - -/** - * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheKey} CacheKey - * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheValue} CacheValue - * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheStore} CacheStore - * @typedef {import('../../types/cache-interceptor.d.ts').default.GetResult} GetResult - */ - -/** - * @implements {CacheStore} - * @extends {EventEmitter} - */ -class MemoryCacheStore extends EventEmitter { - #maxCount = 1024 - #maxSize = 104857600 // 100MB - #maxEntrySize = 5242880 // 5MB - - #size = 0 - #count = 0 - #entries = new Map() - #hasEmittedMaxSizeEvent = false - - /** - * @param {import('../../types/cache-interceptor.d.ts').default.MemoryCacheStoreOpts | undefined} [opts] - */ - constructor (opts) { - super() - if (opts) { - if (typeof opts !== 'object') { - throw new TypeError('MemoryCacheStore options must be an object') - } - - if (opts.maxCount !== undefined) { - if ( - typeof opts.maxCount !== 'number' || - !Number.isInteger(opts.maxCount) || - opts.maxCount < 0 - ) { - throw new TypeError('MemoryCacheStore options.maxCount must be a non-negative integer') - } - this.#maxCount = opts.maxCount - } - - if (opts.maxSize !== undefined) { - if ( - typeof opts.maxSize !== 'number' || - !Number.isInteger(opts.maxSize) || - opts.maxSize < 0 - ) { - throw new TypeError('MemoryCacheStore options.maxSize must be a non-negative integer') - } - this.#maxSize = opts.maxSize - } - - if (opts.maxEntrySize !== undefined) { - if ( - typeof opts.maxEntrySize !== 'number' || - !Number.isInteger(opts.maxEntrySize) || - opts.maxEntrySize < 0 - ) { - throw new TypeError('MemoryCacheStore options.maxEntrySize must be a non-negative integer') - } - this.#maxEntrySize = opts.maxEntrySize - } - } - } - - /** - * Get the current size of the cache in bytes - * @returns {number} The current size of the cache in bytes - */ - get size () { - return this.#size - } - - /** - * Check if the cache is full (either max size or max count reached) - * @returns {boolean} True if the cache is full, false otherwise - */ - isFull () { - return this.#size >= this.#maxSize || this.#count >= this.#maxCount - } - - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} req - * @returns {import('../../types/cache-interceptor.d.ts').default.GetResult | undefined} - */ - get (key) { - assertCacheKey(key) - - const topLevelKey = `${key.origin}:${key.path}` - - const now = Date.now() - const entries = this.#entries.get(topLevelKey) - - const entry = entries ? findEntry(key, entries, now) : null - - return entry == null - ? undefined - : { - statusMessage: entry.statusMessage, - statusCode: entry.statusCode, - headers: entry.headers, - body: entry.body, - vary: entry.vary ? entry.vary : undefined, - etag: entry.etag, - cacheControlDirectives: entry.cacheControlDirectives, - cachedAt: entry.cachedAt, - staleAt: entry.staleAt, - deleteAt: entry.deleteAt - } - } - - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key - * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue} val - * @returns {Writable | undefined} - */ - createWriteStream (key, val) { - assertCacheKey(key) - assertCacheValue(val) - - const topLevelKey = `${key.origin}:${key.path}` - - const store = this - const entry = { ...key, ...val, body: [], size: 0 } - - return new Writable({ - write (chunk, encoding, callback) { - if (typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding) - } - - entry.size += chunk.byteLength - - if (entry.size >= store.#maxEntrySize) { - this.destroy() - } else { - entry.body.push(chunk) - } - - callback(null) + var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var dist_src_exports = {}; + __export2(dist_src_exports, { + legacyRestEndpointMethods: () => legacyRestEndpointMethods, + restEndpointMethods: () => restEndpointMethods + }); + module3.exports = __toCommonJS(dist_src_exports); + var VERSION = "10.4.1"; + var Endpoints = { + actions: { + addCustomLabelsToSelfHostedRunnerForOrg: [ + "POST /orgs/{org}/actions/runners/{runner_id}/labels" + ], + addCustomLabelsToSelfHostedRunnerForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + 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 /repositories/{repository_id}/environments/{environment_name}/variables" + ], + createOrUpdateEnvironmentSecret: [ + "PUT /repositories/{repository_id}/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}" + ], + deleteEnvironmentSecret: [ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" + ], + deleteEnvironmentVariable: [ + "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}" + ], + 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}"], + getCustomOidcSubClaimForRepo: [ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub" + ], + getEnvironmentPublicKey: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key" + ], + getEnvironmentSecret: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" + ], + getEnvironmentVariable: [ + "GET /repositories/{repository_id}/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" + ], + 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"], + listEnvironmentSecrets: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets" + ], + listEnvironmentVariables: [ + "GET /repositories/{repository_id}/environments/{environment_name}/variables" + ], + 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 /repositories/{repository_id}/environments/{environment_name}/variables/{name}" + ], + 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" + ], + 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" + ] + }, + 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: { + deleteAnalysis: [ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}" + ], + 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}" + ], + 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}"], + 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"] + }, + 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}"] }, - final (callback) { - let entries = store.#entries.get(topLevelKey) - if (!entries) { - entries = [] - store.#entries.set(topLevelKey, entries) - } - const previousEntry = findEntry(key, entries, Date.now()) - if (previousEntry) { - const index = entries.indexOf(previousEntry) - entries.splice(index, 1, entry) - store.#size -= previousEntry.size - } else { - entries.push(entry) - store.#count += 1 - } - - store.#size += entry.size - - // Check if cache is full and emit event if needed - if (store.#size > store.#maxSize || store.#count > store.#maxCount) { - // Emit maxSizeExceeded event if we haven't already - if (!store.#hasEmittedMaxSizeEvent) { - store.emit('maxSizeExceeded', { - size: store.#size, - maxSize: store.#maxSize, - count: store.#count, - maxCount: store.#maxCount - }) - store.#hasEmittedMaxSizeEvent = true + 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" + ], + getCopilotOrganizationDetails: ["GET /orgs/{org}/copilot/billing"], + getCopilotSeatDetailsForUser: [ + "GET /orgs/{org}/members/{username}/copilot" + ], + listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"] + }, + 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}" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories" + ], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}" + ] + }, + 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"] }, + 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}"] + }, + 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" + ], + addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"], + 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}"], + 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"], + 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"], + 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" + ], + removeLabel: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}" + ], + 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: { + cancelImport: [ + "DELETE /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import" } - - // Perform eviction - for (const [key, entries] of store.#entries) { - for (const entry of entries.splice(0, entries.length / 2)) { - store.#size -= entry.size - store.#count -= 1 - } - if (entries.length === 0) { - store.#entries.delete(key) - } + ], + 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" + ], + getCommitAuthors: [ + "GET /repos/{owner}/{repo}/import/authors", + {}, + { + deprecated: "octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors" } - - // Reset the event flag after eviction - if (store.#size < store.#maxSize && store.#count < store.#maxCount) { - store.#hasEmittedMaxSizeEvent = false + ], + getImportStatus: [ + "GET /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status" } - } - - callback(null) - } - }) - } - - /** - * @param {CacheKey} key - */ - delete (key) { - if (typeof key !== 'object') { - throw new TypeError(`expected key to be object, got ${typeof key}`) - } - - const topLevelKey = `${key.origin}:${key.path}` - - for (const entry of this.#entries.get(topLevelKey) ?? []) { - this.#size -= entry.size - this.#count -= 1 - } - this.#entries.delete(topLevelKey) - } -} - -function findEntry (key, entries, now) { - return entries.find((entry) => ( - entry.deleteAt > now && - entry.method === key.method && - (entry.vary == null || Object.keys(entry.vary).every(headerName => { - if (entry.vary[headerName] === null) { - return key.headers[headerName] === undefined - } - - return entry.vary[headerName] === key.headers[headerName] - })) - )) -} - -module.exports = MemoryCacheStore - - -/***/ }), - -/***/ 54474: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { Writable } = __nccwpck_require__(84492) -const { assertCacheKey, assertCacheValue } = __nccwpck_require__(88047) - -let DatabaseSync - -const VERSION = 3 - -// 2gb -const MAX_ENTRY_SIZE = 2 * 1000 * 1000 * 1000 - -/** - * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheStore} CacheStore - * @implements {CacheStore} - * - * @typedef {{ - * id: Readonly, - * body?: Uint8Array - * statusCode: number - * statusMessage: string - * headers?: string - * vary?: string - * etag?: string - * cacheControlDirectives?: string - * cachedAt: number - * staleAt: number - * deleteAt: number - * }} SqliteStoreValue - */ -module.exports = class SqliteCacheStore { - #maxEntrySize = MAX_ENTRY_SIZE - #maxCount = Infinity - - /** - * @type {import('node:sqlite').DatabaseSync} - */ - #db - - /** - * @type {import('node:sqlite').StatementSync} - */ - #getValuesQuery - - /** - * @type {import('node:sqlite').StatementSync} - */ - #updateValueQuery - - /** - * @type {import('node:sqlite').StatementSync} - */ - #insertValueQuery - - /** - * @type {import('node:sqlite').StatementSync} - */ - #deleteExpiredValuesQuery - - /** - * @type {import('node:sqlite').StatementSync} - */ - #deleteByUrlQuery - - /** - * @type {import('node:sqlite').StatementSync} - */ - #countEntriesQuery - - /** - * @type {import('node:sqlite').StatementSync | null} - */ - #deleteOldValuesQuery - - /** - * @param {import('../../types/cache-interceptor.d.ts').default.SqliteCacheStoreOpts | undefined} opts - */ - constructor (opts) { - if (opts) { - if (typeof opts !== 'object') { - throw new TypeError('SqliteCacheStore options must be an object') - } - - if (opts.maxEntrySize !== undefined) { - if ( - typeof opts.maxEntrySize !== 'number' || - !Number.isInteger(opts.maxEntrySize) || - opts.maxEntrySize < 0 - ) { - throw new TypeError('SqliteCacheStore options.maxEntrySize must be a non-negative integer') - } - - if (opts.maxEntrySize > MAX_ENTRY_SIZE) { - throw new TypeError('SqliteCacheStore options.maxEntrySize must be less than 2gb') - } - - this.#maxEntrySize = opts.maxEntrySize - } - - if (opts.maxCount !== undefined) { - if ( - typeof opts.maxCount !== 'number' || - !Number.isInteger(opts.maxCount) || - opts.maxCount < 0 - ) { - throw new TypeError('SqliteCacheStore options.maxCount must be a non-negative integer') - } - this.#maxCount = opts.maxCount - } - } - - if (!DatabaseSync) { - DatabaseSync = (__nccwpck_require__(55467).DatabaseSync) - } - this.#db = new DatabaseSync(opts?.location ?? ':memory:') - - this.#db.exec(` - PRAGMA journal_mode = WAL; - PRAGMA synchronous = NORMAL; - PRAGMA temp_store = memory; - PRAGMA optimize; - - CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION} ( - -- Data specific to us - id INTEGER PRIMARY KEY AUTOINCREMENT, - url TEXT NOT NULL, - method TEXT NOT NULL, - - -- Data returned to the interceptor - body BUF NULL, - deleteAt INTEGER NOT NULL, - statusCode INTEGER NOT NULL, - statusMessage TEXT NOT NULL, - headers TEXT NULL, - cacheControlDirectives TEXT NULL, - etag TEXT NULL, - vary TEXT NULL, - cachedAt INTEGER NOT NULL, - staleAt INTEGER NOT NULL - ); - - CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_getValuesQuery ON cacheInterceptorV${VERSION}(url, method, deleteAt); - CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_deleteByUrlQuery ON cacheInterceptorV${VERSION}(deleteAt); - `) - - this.#getValuesQuery = this.#db.prepare(` - SELECT - id, - body, - deleteAt, - statusCode, - statusMessage, - headers, - etag, - cacheControlDirectives, - vary, - cachedAt, - staleAt - FROM cacheInterceptorV${VERSION} - WHERE - url = ? - AND method = ? - ORDER BY - deleteAt ASC - `) - - this.#updateValueQuery = this.#db.prepare(` - UPDATE cacheInterceptorV${VERSION} SET - body = ?, - deleteAt = ?, - statusCode = ?, - statusMessage = ?, - headers = ?, - etag = ?, - cacheControlDirectives = ?, - cachedAt = ?, - staleAt = ? - WHERE - id = ? - `) - - this.#insertValueQuery = this.#db.prepare(` - INSERT INTO cacheInterceptorV${VERSION} ( - url, - method, - body, - deleteAt, - statusCode, - statusMessage, - headers, - etag, - cacheControlDirectives, - vary, - cachedAt, - staleAt - ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) - `) - - this.#deleteByUrlQuery = this.#db.prepare( - `DELETE FROM cacheInterceptorV${VERSION} WHERE url = ?` - ) - - this.#countEntriesQuery = this.#db.prepare( - `SELECT COUNT(*) AS total FROM cacheInterceptorV${VERSION}` - ) - - this.#deleteExpiredValuesQuery = this.#db.prepare( - `DELETE FROM cacheInterceptorV${VERSION} WHERE deleteAt <= ?` - ) - - this.#deleteOldValuesQuery = this.#maxCount === Infinity - ? null - : this.#db.prepare(` - DELETE FROM cacheInterceptorV${VERSION} - WHERE id IN ( - SELECT - id - FROM cacheInterceptorV${VERSION} - ORDER BY cachedAt DESC - LIMIT ? - ) - `) - } - - close () { - this.#db.close() - } - - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key - * @returns {(import('../../types/cache-interceptor.d.ts').default.GetResult & { body?: Buffer }) | undefined} - */ - get (key) { - assertCacheKey(key) - - const value = this.#findValue(key) - return value - ? { - body: value.body ? Buffer.from(value.body.buffer, value.body.byteOffset, value.body.byteLength) : undefined, - statusCode: value.statusCode, - statusMessage: value.statusMessage, - headers: value.headers ? JSON.parse(value.headers) : undefined, - etag: value.etag ? value.etag : undefined, - vary: value.vary ? JSON.parse(value.vary) : undefined, - cacheControlDirectives: value.cacheControlDirectives - ? JSON.parse(value.cacheControlDirectives) - : undefined, - cachedAt: value.cachedAt, - staleAt: value.staleAt, - deleteAt: value.deleteAt - } - : undefined - } - - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key - * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue & { body: null | Buffer | Array}} value - */ - set (key, value) { - assertCacheKey(key) - - const url = this.#makeValueUrl(key) - const body = Array.isArray(value.body) ? Buffer.concat(value.body) : value.body - const size = body?.byteLength - - if (size && size > this.#maxEntrySize) { - return - } - - const existingValue = this.#findValue(key, true) - if (existingValue) { - // Updating an existing response, let's overwrite it - this.#updateValueQuery.run( - body, - value.deleteAt, - value.statusCode, - value.statusMessage, - value.headers ? JSON.stringify(value.headers) : null, - value.etag ? value.etag : null, - value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null, - value.cachedAt, - value.staleAt, - existingValue.id - ) - } else { - this.#prune() - // New response, let's insert it - this.#insertValueQuery.run( - url, - key.method, - body, - value.deleteAt, - value.statusCode, - value.statusMessage, - value.headers ? JSON.stringify(value.headers) : null, - value.etag ? value.etag : null, - value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null, - value.vary ? JSON.stringify(value.vary) : null, - value.cachedAt, - value.staleAt - ) - } - } - - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key - * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue} value - * @returns {Writable | undefined} - */ - createWriteStream (key, value) { - assertCacheKey(key) - assertCacheValue(value) - - let size = 0 - /** - * @type {Buffer[] | null} - */ - const body = [] - const store = this - - return new Writable({ - decodeStrings: true, - write (chunk, encoding, callback) { - size += chunk.byteLength - - if (size < store.#maxEntrySize) { - body.push(chunk) - } else { - this.destroy() - } - - callback() + ], + getLargeFiles: [ + "GET /repos/{owner}/{repo}/import/large_files", + {}, + { + deprecated: "octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files" + } + ], + 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"] } + ], + mapCommitAuthor: [ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}", + {}, + { + deprecated: "octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author" + } + ], + setLfsPreference: [ + "PATCH /repos/{owner}/{repo}/import/lfs", + {}, + { + deprecated: "octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference" + } + ], + startForAuthenticatedUser: ["POST /user/migrations"], + startForOrg: ["POST /orgs/{org}/migrations"], + startImport: [ + "PUT /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import" + } + ], + unlockRepoForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock" + ], + unlockRepoForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock" + ], + updateImport: [ + "PATCH /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import" + } + ] }, - final (callback) { - store.set(key, { ...value, body }) - callback() - } - }) - } - - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key - */ - delete (key) { - if (typeof key !== 'object') { - throw new TypeError(`expected key to be object, got ${typeof key}`) - } - - this.#deleteByUrlQuery.run(this.#makeValueUrl(key)) - } - - #prune () { - if (Number.isFinite(this.#maxCount) && this.size <= this.#maxCount) { - return 0 - } - - { - const removed = this.#deleteExpiredValuesQuery.run(Date.now()).changes - if (removed) { - return removed - } - } - - { - const removed = this.#deleteOldValuesQuery?.run(Math.max(Math.floor(this.#maxCount * 0.1), 1)).changes - if (removed) { - return removed - } - } - - return 0 - } - - /** - * Counts the number of rows in the cache - * @returns {Number} - */ - get size () { - const { total } = this.#countEntriesQuery.get() - return total - } - - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key - * @returns {string} - */ - #makeValueUrl (key) { - return `${key.origin}/${key.path}` - } - - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key - * @param {boolean} [canBeExpired=false] - * @returns {SqliteStoreValue | undefined} - */ - #findValue (key, canBeExpired = false) { - const url = this.#makeValueUrl(key) - const { headers, method } = key - - /** - * @type {SqliteStoreValue[]} - */ - const values = this.#getValuesQuery.all(url, method) - - if (values.length === 0) { - return undefined - } - - const now = Date.now() - for (const value of values) { - if (now >= value.deleteAt && !canBeExpired) { - return undefined - } - - let matches = true - - if (value.vary) { - const vary = JSON.parse(value.vary) - - for (const header in vary) { - if (!headerValueEquals(headers[header], vary[header])) { - matches = false - break + 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}" + ], + 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}" + ], + createCustomOrganizationRole: ["POST /orgs/{org}/organization-roles"], + createInvitation: ["POST /orgs/{org}/invitations"], + createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"], + createOrUpdateCustomPropertiesValuesForRepos: [ + "PATCH /orgs/{org}/properties/values" + ], + createOrUpdateCustomProperty: [ + "PUT /orgs/{org}/properties/schema/{custom_property_name}" + ], + createWebhook: ["POST /orgs/{org}/hooks"], + delete: ["DELETE /orgs/{org}"], + deleteCustomOrganizationRole: [ + "DELETE /orgs/{org}/organization-roles/{role_id}" + ], + deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], + enableOrDisableSecurityProductOnAllOrgRepos: [ + "POST /orgs/{org}/{security_product}/{enablement}" + ], + get: ["GET /orgs/{org}"], + getAllCustomProperties: ["GET /orgs/{org}/properties/schema"], + getCustomProperty: [ + "GET /orgs/{org}/properties/schema/{custom_property_name}" + ], + getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], + getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], + getOrgRole: ["GET /orgs/{org}/organization-roles/{role_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"], + listBlockedUsers: ["GET /orgs/{org}/blocks"], + listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"], + listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], + listForAuthenticatedUser: ["GET /user/orgs"], + listForUser: ["GET /users/{username}/orgs"], + listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"], + 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"], + listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], + listWebhooks: ["GET /orgs/{org}/hooks"], + patchCustomOrganizationRole: [ + "PATCH /orgs/{org}/organization-roles/{role_id}" + ], + pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" + ], + removeCustomProperty: [ + "DELETE /orgs/{org}/properties/schema/{custom_property_name}" + ], + 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}" + ], + 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}" + ], + setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"], + setPublicMembershipForAuthenticatedUser: [ + "PUT /orgs/{org}/public_members/{username}" + ], + unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], + update: ["PATCH /orgs/{org}"], + 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" + ] } - } - } - - if (matches) { - return value - } - } - - return undefined - } -} - -/** - * @param {string|string[]|null|undefined} lhs - * @param {string|string[]|null|undefined} rhs - * @returns {boolean} - */ -function headerValueEquals (lhs, rhs) { - if (lhs == null && rhs == null) { - return true - } - - if ((lhs == null && rhs != null) || - (lhs != null && rhs == null)) { - return false - } - - if (Array.isArray(lhs) && Array.isArray(rhs)) { - if (lhs.length !== rhs.length) { - return false - } - - return lhs.every((x, i) => x === rhs[i]) - } - - return lhs === rhs -} - - -/***/ }), - -/***/ 82067: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const net = __nccwpck_require__(87503) -const assert = __nccwpck_require__(98061) -const util = __nccwpck_require__(83983) -const { InvalidArgumentError } = __nccwpck_require__(48045) - -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. - -const SessionCache = class WeakSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - this._sessionRegistry = new 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) - } -} - -function buildConnector ({ allowH2, useH2c, 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__(31764) + ], + 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" + ] + }, + projects: { + addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"], + createCard: ["POST /projects/columns/{column_id}/cards"], + createColumn: ["POST /projects/{project_id}/columns"], + createForAuthenticatedUser: ["POST /user/projects"], + createForOrg: ["POST /orgs/{org}/projects"], + createForRepo: ["POST /repos/{owner}/{repo}/projects"], + delete: ["DELETE /projects/{project_id}"], + deleteCard: ["DELETE /projects/columns/cards/{card_id}"], + deleteColumn: ["DELETE /projects/columns/{column_id}"], + get: ["GET /projects/{project_id}"], + getCard: ["GET /projects/columns/cards/{card_id}"], + getColumn: ["GET /projects/columns/{column_id}"], + getPermissionForUser: [ + "GET /projects/{project_id}/collaborators/{username}/permission" + ], + listCards: ["GET /projects/columns/{column_id}/cards"], + listCollaborators: ["GET /projects/{project_id}/collaborators"], + listColumns: ["GET /projects/{project_id}/columns"], + listForOrg: ["GET /orgs/{org}/projects"], + listForRepo: ["GET /repos/{owner}/{repo}/projects"], + listForUser: ["GET /users/{username}/projects"], + moveCard: ["POST /projects/columns/cards/{card_id}/moves"], + moveColumn: ["POST /projects/columns/{column_id}/moves"], + removeCollaborator: [ + "DELETE /projects/{project_id}/collaborators/{username}" + ], + update: ["PATCH /projects/{project_id}"], + updateCard: ["PATCH /projects/columns/cards/{card_id}"], + updateColumn: ["PATCH /projects/columns/{column_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}"], + 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}" + ], + 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"], + createOrUpdateCustomPropertiesValues: [ + "PATCH /repos/{owner}/{repo}/properties/values" + ], + 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"], + createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"], + createUsingTemplate: [ + "POST /repos/{template_owner}/{template_repo}/generate" + ], + createWebhook: ["POST /repos/{owner}/{repo}/hooks"], + 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}"], + deleteTagProtection: [ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_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}" + ], + 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" + ], + 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}" + ], + getCustomPropertiesValues: ["GET /repos/{owner}/{repo}/properties/values"], + 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}"], + 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"], + 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"], + listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"], + 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: { + getAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" + ], + listAlertsForEnterprise: [ + "GET /enterprises/{enterprise}/secret-scanning/alerts" + ], + 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" + ], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" + ] + }, + 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}" + ], + addOrUpdateProjectPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + addOrUpdateRepoPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + checkPermissionsForProjectInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + 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" + ], + listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"], + listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], + removeMembershipForUserInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + removeProjectInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + 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"], + 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"], + 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"], + 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"] } - 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, - 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 - }) - if (useH2c === true) { - socket.alpnProtocol = 'h2' + }; + var endpoints_default = Endpoints; + var 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, url3] = route.split(/ /); + const endpointDefaults = Object.assign( + { + method, + url: url3 + }, + defaults + ); + if (!endpointMethodsMap.has(scope)) { + endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); + } + endpointMethodsMap.get(scope).set(methodName, { + scope, + methodName, + endpointDefaults, + decorations + }); } } - - // 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 = util.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 - } -} - -module.exports = buildConnector - - -/***/ }), - -/***/ 14462: -/***/ ((module) => { - -"use strict"; - - -/** - * @see https://developer.mozilla.org/docs/Web/HTTP/Headers - */ -const wellknownHeaderNames = /** @type {const} */ ([ - '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' -]) - -/** @type {Record, string>} */ -const headerNameLowerCasedRecord = {} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(headerNameLowerCasedRecord, null) - -/** - * @type {Record, Buffer>} - */ -const wellknownHeaderNameBuffers = {} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(wellknownHeaderNameBuffers, null) - -/** - * @param {string} header Lowercased header - * @returns {Buffer} - */ -function getHeaderNameAsBuffer (header) { - let buffer = wellknownHeaderNameBuffers[header] - - if (buffer === undefined) { - buffer = Buffer.from(header) - } - - return buffer -} - -for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = wellknownHeaderNames[i] - const lowerCasedKey = key.toLowerCase() - headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = - lowerCasedKey -} - -module.exports = { - wellknownHeaderNames, - headerNameLowerCasedRecord, - getHeaderNameAsBuffer -} - - -/***/ }), - -/***/ 58438: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const diagnosticsChannel = __nccwpck_require__(65714) -const util = __nccwpck_require__(47261) - -const undiciDebugLog = util.debuglog('undici') -const fetchDebuglog = util.debuglog('fetch') -const websocketDebuglog = util.debuglog('websocket') - -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'), - bodyChunkSent: diagnosticsChannel.channel('undici:request:bodyChunkSent'), - bodyChunkReceived: diagnosticsChannel.channel('undici:request:bodyChunkReceived'), - 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'), - // ProxyAgent - proxyConnected: diagnosticsChannel.channel('undici:proxy:connected') -} - -let isTrackingClientEvents = false - -function trackClientEvents (debugLog = undiciDebugLog) { - if (isTrackingClientEvents) { - return - } - - // Check if any of the channels already have subscribers to prevent duplicate subscriptions - // This can happen when both Node.js built-in undici and undici as a dependency are present - if (channels.beforeConnect.hasSubscribers || channels.connected.hasSubscribers || - channels.connectError.hasSubscribers || channels.sendHeaders.hasSubscribers) { - isTrackingClientEvents = true - return - } - - isTrackingClientEvents = true - - diagnosticsChannel.subscribe('undici:client:beforeConnect', - evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debugLog( - 'connecting to %s%s using %s%s', - host, - port ? `:${port}` : '', - protocol, - version - ) - }) - - diagnosticsChannel.subscribe('undici:client:connected', - evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debugLog( - 'connected to %s%s using %s%s', - host, - port ? `:${port}` : '', - protocol, - version - ) - }) - - diagnosticsChannel.subscribe('undici:client:connectError', - 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.subscribe('undici:client:sendHeaders', - evt => { - const { - request: { method, path, origin } - } = evt - debugLog('sending request to %s %s%s', method, origin, path) - }) -} - -let isTrackingRequestEvents = false - -function trackRequestEvents (debugLog = undiciDebugLog) { - if (isTrackingRequestEvents) { - return - } - - // Check if any of the channels already have subscribers to prevent duplicate subscriptions - // This can happen when both Node.js built-in undici and undici as a dependency are present - if (channels.headers.hasSubscribers || channels.trailers.hasSubscribers || - channels.error.hasSubscribers) { - isTrackingRequestEvents = true - return - } - - isTrackingRequestEvents = true - - diagnosticsChannel.subscribe('undici:request:headers', - evt => { - const { - request: { method, path, origin }, - response: { statusCode } - } = evt - debugLog( - 'received response to %s %s%s - HTTP %d', - method, - origin, - path, - statusCode - ) - }) - - diagnosticsChannel.subscribe('undici:request:trailers', - evt => { - const { - request: { method, path, origin } - } = evt - debugLog('trailers received from %s %s%s', method, origin, path) - }) - - diagnosticsChannel.subscribe('undici:request:error', - evt => { - const { - request: { method, path, origin }, - error - } = evt - debugLog( - 'request to %s %s%s errored - %s', - method, - origin, - path, - error.message - ) - }) -} - -let isTrackingWebSocketEvents = false - -function trackWebSocketEvents (debugLog = websocketDebuglog) { - if (isTrackingWebSocketEvents) { - return - } - - // Check if any of the channels already have subscribers to prevent duplicate subscriptions - // This can happen when both Node.js built-in undici and undici as a dependency are present - if (channels.open.hasSubscribers || channels.close.hasSubscribers || - channels.socketError.hasSubscribers || channels.ping.hasSubscribers || - channels.pong.hasSubscribers) { - isTrackingWebSocketEvents = true - return - } - - isTrackingWebSocketEvents = true - - diagnosticsChannel.subscribe('undici:websocket:open', - evt => { - if (evt.address != null) { - const { address, port } = evt.address - debugLog('connection opened %s%s', address, port ? `:${port}` : '') - } else { - debugLog('connection opened') - } - }) - - diagnosticsChannel.subscribe('undici:websocket:close', - evt => { - const { websocket, code, reason } = evt - debugLog( - 'closed connection to %s - %s %s', - websocket.url, - code, - reason - ) - }) - - diagnosticsChannel.subscribe('undici:websocket:socket_error', - err => { - debugLog('connection errored - %s', err.message) - }) - - diagnosticsChannel.subscribe('undici:websocket:ping', - evt => { - debugLog('ping received') - }) - - diagnosticsChannel.subscribe('undici:websocket:pong', - evt => { - debugLog('pong received') - }) -} - -if (undiciDebugLog.enabled || fetchDebuglog.enabled) { - trackClientEvents(fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog) - trackRequestEvents(fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog) -} - -if (websocketDebuglog.enabled) { - trackClientEvents(undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog) - trackWebSocketEvents(websocketDebuglog) -} - -module.exports = { - channels -} - - -/***/ }), - -/***/ 48045: -/***/ ((module) => { - -"use strict"; - - -const kUndiciError = Symbol.for('undici.error.UND_ERR') -class UndiciError extends Error { - constructor (message, options) { - super(message, options) - this.name = 'UndiciError' - this.code = 'UND_ERR' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kUndiciError] === true - } - - get [kUndiciError] () { - return 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 - } - - get [kConnectTimeoutError] () { - return 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 - } - - get [kHeadersTimeoutError] () { - return 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 - } - - get [kHeadersOverflowError] () { - return 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 - } - - get [kBodyTimeoutError] () { - return 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 - } - - get [kInvalidArgumentError] () { - return 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 - } - - get [kInvalidReturnValueError] () { - return 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 - } - - get [kAbortError] () { - return 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 - } - - get [kRequestAbortedError] () { - return 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 - } - - get [kInformationalError] () { - return 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 - } - - get [kRequestContentLengthMismatchError] () { - return 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 + var 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 options2 = requestWithDefaults.endpoint.merge(...args); + if (decorations.mapToData) { + options2 = Object.assign({}, options2, { + data: options2[decorations.mapToData], + [decorations.mapToData]: void 0 + }); + return requestWithDefaults(options2); + } + 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 options22 = requestWithDefaults.endpoint.merge(...args); + for (const [name, alias] of Object.entries( + decorations.renamedParameters + )) { + if (name in options22) { + octokit.log.warn( + `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` + ); + if (!(alias in options22)) { + options22[alias] = options22[name]; + } + delete options22[name]; + } + } + return requestWithDefaults(options22); + } + return requestWithDefaults(...args); + } + return Object.assign(withDecorations, requestWithDefaults); + } + function restEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + rest: api + }; + } + restEndpointMethods.VERSION = VERSION; + function legacyRestEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + ...api, + rest: api + }; + } + legacyRestEndpointMethods.VERSION = VERSION; } +}); - get [kResponseContentLengthMismatchError] () { - return true +// node_modules/@octokit/plugin-paginate-rest/dist-node/index.js +var require_dist_node10 = __commonJS({ + "node_modules/@octokit/plugin-paginate-rest/dist-node/index.js"(exports, module3) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __export2 = (target, all2) => { + for (var name in all2) + __defProp2(target, name, { get: all2[name], enumerable: true }); + }; + var __copyProps2 = (to2, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to2, key) && key !== except) + __defProp2(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to2; + }; + var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var dist_src_exports = {}; + __export2(dist_src_exports, { + composePaginateRest: () => composePaginateRest, + isPaginatingEndpoint: () => isPaginatingEndpoint, + paginateRest: () => paginateRest, + paginatingEndpoints: () => paginatingEndpoints + }); + module3.exports = __toCommonJS(dist_src_exports); + var VERSION = "9.2.2"; + function normalizePaginatedListResponse(response) { + if (!response.data) { + return { + ...response, + data: [] + }; + } + const responseNeedsNormalization = "total_count" 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; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + 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; + return response; + } + function iterator(octokit, route, parameters) { + const options2 = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); + const requestMethod = typeof route === "function" ? route : octokit.request; + const method = options2.method; + const headers = options2.headers; + let url3 = options2.url; + return { + [Symbol.asyncIterator]: () => ({ + async next() { + if (!url3) + return { done: true }; + try { + const response = await requestMethod({ method, url: url3, headers }); + const normalizedResponse = normalizePaginatedListResponse(response); + url3 = ((normalizedResponse.headers.link || "").match( + /<([^<>]+)>;\s*rel="next"/ + ) || [])[1]; + return { value: normalizedResponse }; + } catch (error2) { + if (error2.status !== 409) + throw error2; + url3 = ""; + 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); + }); + } + var composePaginateRest = Object.assign(paginate, { + iterator + }); + var paginatingEndpoints = [ + "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}/dependabot/alerts", + "GET /enterprises/{enterprise}/secret-scanning/alerts", + "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 /orgs/{org}/actions/cache/usage-by-repository", + "GET /orgs/{org}/actions/permissions/repositories", + "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}/blocks", + "GET /orgs/{org}/code-scanning/alerts", + "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}/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}/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}/projects", + "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}/secret-scanning/alerts", + "GET /orgs/{org}/security-advisories", + "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/columns/{column_id}/cards", + "GET /projects/{project_id}/collaborators", + "GET /projects/{project_id}/columns", + "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}/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}/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}/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}/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", + "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}/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 /repositories/{repository_id}/environments/{environment_name}/secrets", + "GET /repositories/{repository_id}/environments/{environment_name}/variables", + "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}/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}/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" + ]; + function isPaginatingEndpoint(arg) { + if (typeof arg === "string") { + return paginatingEndpoints.includes(arg); + } else { + return false; + } + } + function paginateRest(octokit) { + return { + paginate: Object.assign(paginate.bind(null, octokit), { + iterator: iterator.bind(null, octokit) + }) + }; + } + paginateRest.VERSION = VERSION; } -} +}); -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' +// node_modules/@actions/github/lib/utils.js +var require_utils4 = __commonJS({ + "node_modules/@actions/github/lib/utils.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + var desc = Object.getOwnPropertyDescriptor(m, k3); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k3]; + } }; + } + Object.defineProperty(o, k22, desc); + }) : (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + o[k22] = m[k3]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v3) { + Object.defineProperty(o, "default", { enumerable: true, value: v3 }); + }) : function(o, v3) { + o["default"] = v3; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0; + var Context = __importStar(require_context()); + var Utils = __importStar(require_utils3()); + var core_1 = require_dist_node8(); + var plugin_rest_endpoint_methods_1 = require_dist_node9(); + var plugin_paginate_rest_1 = require_dist_node10(); + exports.context = new Context.Context(); + var baseUrl = Utils.getApiBaseUrl(); + exports.defaults = { + baseUrl, + request: { + agent: Utils.getProxyAgent(baseUrl), + fetch: Utils.getProxyFetch(baseUrl) + } + }; + exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.defaults); + function getOctokitOptions(token, options2) { + const opts = Object.assign({}, options2 || {}); + const auth = Utils.getAuthString(token, opts); + if (auth) { + opts.auth = auth; + } + return opts; + } + exports.getOctokitOptions = getOctokitOptions; } +}); - static [Symbol.hasInstance] (instance) { - return instance && instance[kClientDestroyedError] === true +// node_modules/@actions/github/lib/github.js +var require_github = __commonJS({ + "node_modules/@actions/github/lib/github.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + var desc = Object.getOwnPropertyDescriptor(m, k3); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k3]; + } }; + } + Object.defineProperty(o, k22, desc); + }) : (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + o[k22] = m[k3]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v3) { + Object.defineProperty(o, "default", { enumerable: true, value: v3 }); + }) : function(o, v3) { + o["default"] = v3; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getOctokit = exports.context = void 0; + var Context = __importStar(require_context()); + var utils_1 = require_utils4(); + exports.context = new Context.Context(); + function getOctokit3(token, options2, ...additionalPlugins) { + const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins); + return new GitHubWithPlugins((0, utils_1.getOctokitOptions)(token, options2)); + } + exports.getOctokit = getOctokit3; } +}); - get [kClientDestroyedError] () { - return true - } +// node_modules/@redocly/openapi-core/lib/utils/does-yaml-file-exist.js +import * as fs from "node:fs"; +import * as path from "node:path"; +function doesYamlFileExist(filePath) { + return (path.extname(filePath) === ".yaml" || path.extname(filePath) === ".yml") && !!fs?.existsSync?.(filePath); } - -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 +var init_does_yaml_file_exist = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/does-yaml-file-exist.js"() { } +}); - get [kClientClosedError] () { - return true +// node_modules/@redocly/openapi-core/lib/utils/dequal.js +function dequal(foo, bar) { + let ctor, len; + if (foo === bar) + return true; + if (foo && bar && (ctor = foo.constructor) === bar.constructor) { + if (ctor === Date) + return foo.getTime() === bar.getTime(); + if (ctor === RegExp) + return foo.toString() === bar.toString(); + if (ctor === Array) { + if ((len = foo.length) === bar.length) { + while (len-- && dequal(foo[len], bar[len])) + ; + } + return len === -1; + } + if (!ctor || typeof foo === "object") { + len = 0; + for (ctor in foo) { + if (Object.prototype.hasOwnProperty.call(foo, ctor) && ++len && !Object.prototype.hasOwnProperty.call(bar, ctor)) + return false; + if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) + return false; + } + return Object.keys(bar).length === len; + } } + return foo !== foo && bar !== bar; } - -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 +var init_dequal = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/dequal.js"() { } +}); - get [kSocketError] () { - return true - } +// node_modules/@redocly/openapi-core/lib/utils/is-plain-object.js +function isPlainObject(value) { + return value !== null && typeof value === "object" && !Array.isArray(value); } - -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 +var init_is_plain_object = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/is-plain-object.js"() { } +}); - get [kNotSupportedError] () { - return true - } +// node_modules/@redocly/openapi-core/lib/utils/is-empty-object.js +function isEmptyObject(value) { + return isPlainObject(value) && Object.keys(value).length === 0; } - -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 +var init_is_empty_object = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/is-empty-object.js"() { + init_is_plain_object(); } +}); - get [kBalancedPoolMissingUpstreamError] () { - return true - } +// node_modules/@redocly/openapi-core/lib/utils/is-not-empty-array.js +function isNotEmptyArray(args) { + return Array.isArray(args) && args.length > 0; } - -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 +var init_is_not_empty_array = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/is-not-empty-array.js"() { } +}); - get [kHTTPParserError] () { - return true - } +// node_modules/@redocly/openapi-core/lib/utils/is-not-empty-object.js +function isNotEmptyObject(obj) { + return isPlainObject(obj) && !isEmptyObject(obj); } - -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 +var init_is_not_empty_object = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/is-not-empty-object.js"() { + init_is_empty_object(); + init_is_plain_object(); } +}); - get [kResponseExceededMaxSizeError] () { - return true - } +// node_modules/@redocly/openapi-core/lib/utils/is-string.js +function isString(value) { + return typeof value === "string"; } - -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 +var init_is_string = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/is-string.js"() { } +}); - get [kRequestRetryError] () { - return true - } +// node_modules/@redocly/openapi-core/lib/utils/is-truthy.js +function isTruthy(value) { + return !!value; } - -const kResponseError = Symbol.for('undici.error.UND_ERR_RESPONSE') -class ResponseError extends UndiciError { - constructor (message, code, { headers, body }) { - super(message) - this.name = 'ResponseError' - this.message = message || 'Response error' - this.code = 'UND_ERR_RESPONSE' - this.statusCode = code - this.body = body - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseError] === true +var init_is_truthy = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/is-truthy.js"() { } +}); - get [kResponseError] () { - return true - } +// node_modules/@redocly/openapi-core/lib/utils/keys-of.js +function keysOf(obj) { + if (!obj) + return []; + return Object.keys(obj); } - -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 +var init_keys_of = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/keys-of.js"() { } +}); - get [kSecureProxyConnectionError] () { - return true - } +// node_modules/@redocly/openapi-core/lib/utils/pause.js +async function pause(ms2) { + return new Promise((resolve8) => setTimeout(resolve8, ms2)); } - -const kMaxOriginsReachedError = Symbol.for('undici.error.UND_ERR_MAX_ORIGINS_REACHED') -class MaxOriginsReachedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'MaxOriginsReachedError' - this.message = message || 'Maximum allowed origins reached' - this.code = 'UND_ERR_MAX_ORIGINS_REACHED' +var init_pause = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/pause.js"() { } +}); - static [Symbol.hasInstance] (instance) { - return instance && instance[kMaxOriginsReachedError] === true +// node_modules/pluralize/pluralize.js +var require_pluralize = __commonJS({ + "node_modules/pluralize/pluralize.js"(exports, module3) { + (function(root, pluralize3) { + if (typeof __require === "function" && typeof exports === "object" && typeof module3 === "object") { + module3.exports = pluralize3(); + } else if (typeof define === "function" && define.amd) { + define(function() { + return pluralize3(); + }); + } else { + root.pluralize = pluralize3(); + } + })(exports, function() { + var pluralRules = []; + var singularRules = []; + var uncountables = {}; + var irregularPlurals = {}; + var irregularSingles = {}; + function sanitizeRule(rule) { + if (typeof rule === "string") { + return new RegExp("^" + rule + "$", "i"); + } + return rule; + } + function restoreCase(word, token) { + if (word === token) return token; + if (word === word.toLowerCase()) return token.toLowerCase(); + if (word === word.toUpperCase()) return token.toUpperCase(); + if (word[0] === word[0].toUpperCase()) { + return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase(); + } + return token.toLowerCase(); + } + function interpolate(str2, args) { + return str2.replace(/\$(\d{1,2})/g, function(match2, index) { + return args[index] || ""; + }); + } + function replace(word, rule) { + return word.replace(rule[0], function(match2, index) { + var result = interpolate(rule[1], arguments); + if (match2 === "") { + return restoreCase(word[index - 1], result); + } + return restoreCase(match2, result); + }); + } + function sanitizeWord(token, word, rules8) { + if (!token.length || uncountables.hasOwnProperty(token)) { + return word; + } + var len = rules8.length; + while (len--) { + var rule = rules8[len]; + if (rule[0].test(word)) return replace(word, rule); + } + return word; + } + function replaceWord(replaceMap, keepMap, rules8) { + return function(word) { + var token = word.toLowerCase(); + if (keepMap.hasOwnProperty(token)) { + return restoreCase(word, token); + } + if (replaceMap.hasOwnProperty(token)) { + return restoreCase(word, replaceMap[token]); + } + return sanitizeWord(token, word, rules8); + }; + } + function checkWord(replaceMap, keepMap, rules8, bool2) { + return function(word) { + var token = word.toLowerCase(); + if (keepMap.hasOwnProperty(token)) return true; + if (replaceMap.hasOwnProperty(token)) return false; + return sanitizeWord(token, token, rules8) === token; + }; + } + function pluralize3(word, count, inclusive) { + var pluralized = count === 1 ? pluralize3.singular(word) : pluralize3.plural(word); + return (inclusive ? count + " " : "") + pluralized; + } + pluralize3.plural = replaceWord( + irregularSingles, + irregularPlurals, + pluralRules + ); + pluralize3.isPlural = checkWord( + irregularSingles, + irregularPlurals, + pluralRules + ); + pluralize3.singular = replaceWord( + irregularPlurals, + irregularSingles, + singularRules + ); + pluralize3.isSingular = checkWord( + irregularPlurals, + irregularSingles, + singularRules + ); + pluralize3.addPluralRule = function(rule, replacement) { + pluralRules.push([sanitizeRule(rule), replacement]); + }; + pluralize3.addSingularRule = function(rule, replacement) { + singularRules.push([sanitizeRule(rule), replacement]); + }; + pluralize3.addUncountableRule = function(word) { + if (typeof word === "string") { + uncountables[word.toLowerCase()] = true; + return; + } + pluralize3.addPluralRule(word, "$0"); + pluralize3.addSingularRule(word, "$0"); + }; + pluralize3.addIrregularRule = function(single, plural) { + plural = plural.toLowerCase(); + single = single.toLowerCase(); + irregularSingles[single] = plural; + irregularPlurals[plural] = single; + }; + [ + // Pronouns. + ["I", "we"], + ["me", "us"], + ["he", "they"], + ["she", "they"], + ["them", "them"], + ["myself", "ourselves"], + ["yourself", "yourselves"], + ["itself", "themselves"], + ["herself", "themselves"], + ["himself", "themselves"], + ["themself", "themselves"], + ["is", "are"], + ["was", "were"], + ["has", "have"], + ["this", "these"], + ["that", "those"], + // Words ending in with a consonant and `o`. + ["echo", "echoes"], + ["dingo", "dingoes"], + ["volcano", "volcanoes"], + ["tornado", "tornadoes"], + ["torpedo", "torpedoes"], + // Ends with `us`. + ["genus", "genera"], + ["viscus", "viscera"], + // Ends with `ma`. + ["stigma", "stigmata"], + ["stoma", "stomata"], + ["dogma", "dogmata"], + ["lemma", "lemmata"], + ["schema", "schemata"], + ["anathema", "anathemata"], + // Other irregular rules. + ["ox", "oxen"], + ["axe", "axes"], + ["die", "dice"], + ["yes", "yeses"], + ["foot", "feet"], + ["eave", "eaves"], + ["goose", "geese"], + ["tooth", "teeth"], + ["quiz", "quizzes"], + ["human", "humans"], + ["proof", "proofs"], + ["carve", "carves"], + ["valve", "valves"], + ["looey", "looies"], + ["thief", "thieves"], + ["groove", "grooves"], + ["pickaxe", "pickaxes"], + ["passerby", "passersby"] + ].forEach(function(rule) { + return pluralize3.addIrregularRule(rule[0], rule[1]); + }); + [ + [/s?$/i, "s"], + [/[^\u0000-\u007F]$/i, "$0"], + [/([^aeiou]ese)$/i, "$1"], + [/(ax|test)is$/i, "$1es"], + [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, "$1es"], + [/(e[mn]u)s?$/i, "$1s"], + [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, "$1"], + [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1i"], + [/(alumn|alg|vertebr)(?:a|ae)$/i, "$1ae"], + [/(seraph|cherub)(?:im)?$/i, "$1im"], + [/(her|at|gr)o$/i, "$1oes"], + [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, "$1a"], + [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, "$1a"], + [/sis$/i, "ses"], + [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, "$1$2ves"], + [/([^aeiouy]|qu)y$/i, "$1ies"], + [/([^ch][ieo][ln])ey$/i, "$1ies"], + [/(x|ch|ss|sh|zz)$/i, "$1es"], + [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, "$1ices"], + [/\b((?:tit)?m|l)(?:ice|ouse)$/i, "$1ice"], + [/(pe)(?:rson|ople)$/i, "$1ople"], + [/(child)(?:ren)?$/i, "$1ren"], + [/eaux$/i, "$0"], + [/m[ae]n$/i, "men"], + ["thou", "you"] + ].forEach(function(rule) { + return pluralize3.addPluralRule(rule[0], rule[1]); + }); + [ + [/s$/i, ""], + [/(ss)$/i, "$1"], + [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, "$1fe"], + [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, "$1f"], + [/ies$/i, "y"], + [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, "$1ie"], + [/\b(mon|smil)ies$/i, "$1ey"], + [/\b((?:tit)?m|l)ice$/i, "$1ouse"], + [/(seraph|cherub)im$/i, "$1"], + [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, "$1"], + [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, "$1sis"], + [/(movie|twelve|abuse|e[mn]u)s$/i, "$1"], + [/(test)(?:is|es)$/i, "$1is"], + [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, "$1us"], + [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, "$1um"], + [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, "$1on"], + [/(alumn|alg|vertebr)ae$/i, "$1a"], + [/(cod|mur|sil|vert|ind)ices$/i, "$1ex"], + [/(matr|append)ices$/i, "$1ix"], + [/(pe)(rson|ople)$/i, "$1rson"], + [/(child)ren$/i, "$1"], + [/(eau)x?$/i, "$1"], + [/men$/i, "man"] + ].forEach(function(rule) { + return pluralize3.addSingularRule(rule[0], rule[1]); + }); + [ + // Singular words with no plurals. + "adulthood", + "advice", + "agenda", + "aid", + "aircraft", + "alcohol", + "ammo", + "analytics", + "anime", + "athletics", + "audio", + "bison", + "blood", + "bream", + "buffalo", + "butter", + "carp", + "cash", + "chassis", + "chess", + "clothing", + "cod", + "commerce", + "cooperation", + "corps", + "debris", + "diabetes", + "digestion", + "elk", + "energy", + "equipment", + "excretion", + "expertise", + "firmware", + "flounder", + "fun", + "gallows", + "garbage", + "graffiti", + "hardware", + "headquarters", + "health", + "herpes", + "highjinks", + "homework", + "housework", + "information", + "jeans", + "justice", + "kudos", + "labour", + "literature", + "machinery", + "mackerel", + "mail", + "media", + "mews", + "moose", + "music", + "mud", + "manga", + "news", + "only", + "personnel", + "pike", + "plankton", + "pliers", + "police", + "pollution", + "premises", + "rain", + "research", + "rice", + "salmon", + "scissors", + "series", + "sewage", + "shambles", + "shrimp", + "software", + "species", + "staff", + "swine", + "tennis", + "traffic", + "transportation", + "trout", + "tuna", + "wealth", + "welfare", + "whiting", + "wildebeest", + "wildlife", + "you", + /pok[eé]mon$/i, + // Regexes. + /[^aeiou]ese$/i, + // "chinese", "japanese" + /deer$/i, + // "deer", "reindeer" + /fish$/i, + // "fish", "blowfish", "angelfish" + /measles$/i, + /o[iu]s$/i, + // "carnivorous" + /pox$/i, + // "chickpox", "smallpox" + /sheep$/i + ].forEach(pluralize3.addUncountableRule); + return pluralize3; + }); } +}); - get [kMaxOriginsReachedError] () { - return true - } +// node_modules/@redocly/openapi-core/lib/utils/pluralize.js +function pluralize(sentence, count, inclusive) { + return sentence.split(" ").map((word) => (0, import_pluralize.default)(word, count, inclusive)).join(" "); } - -class Socks5ProxyError extends UndiciError { - constructor (message, code) { - super(message) - this.name = 'Socks5ProxyError' - this.message = message || 'SOCKS5 proxy error' - this.code = code || 'UND_ERR_SOCKS5' +var import_pluralize; +var init_pluralize = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/pluralize.js"() { + import_pluralize = __toESM(require_pluralize(), 1); } -} +}); -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' +// node_modules/picomatch/lib/constants.js +var require_constants6 = __commonJS({ + "node_modules/picomatch/lib/constants.js"(exports, module3) { + "use strict"; + var WIN_SLASH = "\\\\/"; + var WIN_NO_SLASH = `[^${WIN_SLASH}]`; + var DEFAULT_MAX_EXTGLOB_RECURSION = 0; + 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 NO_DOT = `(?!${DOT_LITERAL})`; + var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; + var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; + var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; + var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; + var STAR = `${QMARK}*?`; + var SEP = "/"; + var 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, + SEP + }; + 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}]|$)`, + SEP: "\\" + }; + var 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" + }; + module3.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 */ + /** + * 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; + } + }; } +}); - static [Symbol.hasInstance] (instance) { - return instance && instance[kMessageSizeExceededError] === true +// node_modules/picomatch/lib/utils.js +var require_utils5 = __commonJS({ + "node_modules/picomatch/lib/utils.js"(exports) { + "use strict"; + var { + REGEX_BACKSLASH, + REGEX_REMOVE_BACKSLASH, + REGEX_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_GLOBAL + } = require_constants6(); + exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); + exports.hasRegexChars = (str2) => REGEX_SPECIAL_CHARS.test(str2); + exports.isRegexChar = (str2) => str2.length === 1 && exports.hasRegexChars(str2); + exports.escapeRegex = (str2) => str2.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); + exports.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/"); + exports.isWindows = () => { + if (typeof navigator !== "undefined" && navigator.platform) { + const platform = navigator.platform.toLowerCase(); + return platform === "win32" || platform === "windows"; + } + if (typeof process !== "undefined" && process.platform) { + return process.platform === "win32"; + } + return false; + }; + exports.removeBackslashes = (str2) => { + return str2.replace(REGEX_REMOVE_BACKSLASH, (match2) => { + return match2 === "\\" ? "" : match2; + }); + }; + 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 = {}, options2 = {}) => { + const prepend = options2.contains ? "" : "^"; + const append = options2.contains ? "" : "$"; + let output = `${prepend}(?:${input})${append}`; + if (state.negated === true) { + output = `(?:^(?!${output}).*$)`; + } + return output; + }; + exports.basename = (path13, { windows } = {}) => { + const segs = path13.split(windows ? /[\\/]/ : "/"); + const last = segs[segs.length - 1]; + if (last === "") { + return segs[segs.length - 2]; + } + return last; + }; } +}); - get [kMessageSizeExceededError] () { - return true +// node_modules/picomatch/lib/scan.js +var require_scan = __commonJS({ + "node_modules/picomatch/lib/scan.js"(exports, module3) { + "use strict"; + var utils = require_utils5(); + var { + CHAR_ASTERISK: CHAR_ASTERISK2, + /* * */ + CHAR_AT, + /* @ */ + CHAR_BACKWARD_SLASH, + /* \ */ + CHAR_COMMA: CHAR_COMMA2, + /* , */ + CHAR_DOT, + /* . */ + CHAR_EXCLAMATION_MARK, + /* ! */ + CHAR_FORWARD_SLASH, + /* / */ + CHAR_LEFT_CURLY_BRACE, + /* { */ + CHAR_LEFT_PARENTHESES, + /* ( */ + CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, + /* [ */ + CHAR_PLUS, + /* + */ + CHAR_QUESTION_MARK, + /* ? */ + CHAR_RIGHT_CURLY_BRACE, + /* } */ + CHAR_RIGHT_PARENTHESES, + /* ) */ + CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2 + /* ] */ + } = require_constants6(); + var isPathSeparator = (code) => { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; + }; + var depth = (token) => { + if (token.isPrefix !== true) { + token.depth = token.isGlobstar ? Infinity : 1; + } + }; + var scan = (input, options2) => { + const opts = options2 || {}; + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + let str2 = 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 = () => str2.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str2.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_COMMA2) { + 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_ASTERISK2 || 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_ASTERISK2) { + if (prev === CHAR_ASTERISK2) 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_BRACKET2) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + if (next === CHAR_RIGHT_SQUARE_BRACKET2) { + 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 = str2; + let prefix = ""; + let glob = ""; + if (start > 0) { + prefix = str2.slice(0, start); + str2 = str2.slice(start); + lastIndex -= start; + } + if (base && isGlob === true && lastIndex > 0) { + base = str2.slice(0, lastIndex); + glob = str2.slice(lastIndex); + } else if (isGlob === true) { + base = ""; + glob = str2; + } else { + base = str2; + } + if (base && base !== "" && base !== "/" && base !== str2) { + 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 n8 = prevIndex ? prevIndex + 1 : start; + const i2 = slashes[idx]; + const value = input.slice(n8, i2); + 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 = i2; + } + 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; + }; + module3.exports = scan; } -} - -module.exports = { - AbortError, - HTTPParserError, - UndiciError, - HeadersTimeoutError, - HeadersOverflowError, - BodyTimeoutError, - RequestContentLengthMismatchError, - ConnectTimeoutError, - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError, - ClientDestroyedError, - ClientClosedError, - InformationalError, - SocketError, - NotSupportedError, - ResponseContentLengthMismatchError, - BalancedPoolMissingUpstreamError, - ResponseExceededMaxSizeError, - RequestRetryError, - ResponseError, - SecureProxyConnectionError, - MaxOriginsReachedError, - Socks5ProxyError, - MessageSizeExceededError -} - - -/***/ }), - -/***/ 62905: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - InvalidArgumentError, - NotSupportedError -} = __nccwpck_require__(48045) -const assert = __nccwpck_require__(98061) -const { - isValidHTTPToken, - isValidHeaderValue, - isStream, - destroy, - isBuffer, - isFormDataLike, - isIterable, - hasSafeIterator, - isBlobLike, - serializePathWithQuery, - assertRequestHandler, - getServerName, - normalizedMethodRecords, - getProtocolFromUrlString -} = __nccwpck_require__(83983) -const { channels } = __nccwpck_require__(58438) -const { headerNameLowerCasedRecord } = __nccwpck_require__(14462) - -// 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, - expectContinue, - servername, - throwOnError, - maxRedirections, - typeOfService - }, 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') - } - - if (throwOnError != null) { - throw new InvalidArgumentError('invalid throwOnError') - } - - if (maxRedirections != null && maxRedirections !== 0) { - throw new InvalidArgumentError('maxRedirections is not supported, use the redirect interceptor') - } - - if (typeOfService != null && (!Number.isInteger(typeOfService) || typeOfService < 0 || typeOfService > 255)) { - throw new InvalidArgumentError('typeOfService must be an integer between 0 and 255') - } - - this.headersTimeout = headersTimeout - - this.bodyTimeout = bodyTimeout - - this.method = method - - this.typeOfService = typeOfService ?? 0 - - 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) +// node_modules/picomatch/lib/parse.js +var require_parse2 = __commonJS({ + "node_modules/picomatch/lib/parse.js"(exports, module3) { + "use strict"; + var constants = require_constants6(); + var utils = require_utils5(); + var { + MAX_LENGTH, + POSIX_REGEX_SOURCE, + REGEX_NON_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_BACKREF, + REPLACEMENTS + } = constants; + var expandRange = (args, options2) => { + if (typeof options2.expandRange === "function") { + return options2.expandRange(...args, options2); + } + args.sort(); + const value = `[${args.join("-")}]`; + try { + new RegExp(value); + } catch (ex) { + return args.map((v3) => utils.escapeRegex(v3)).join(".."); + } + return value; + }; + var syntaxError = (type2, char) => { + return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`; + }; + var 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; + }; + var 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; + }; + var 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"); + }; + var hasRepeatedCharPrefixOverlap = (branches) => { + const values = branches.map(normalizeSimpleBranch).filter(Boolean); + for (let i2 = 0; i2 < values.length; i2++) { + for (let j3 = i2 + 1; j3 < values.length; j3++) { + const a2 = values[i2]; + const b2 = values[j3]; + const char = a2[0]; + if (!char || a2 !== char.repeat(a2.length) || b2 !== char.repeat(b2.length)) { + continue; + } + if (a2 === b2 || a2.startsWith(b2) || b2.startsWith(a2)) { + return true; + } + } + } + return false; + }; + var 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 i2 = 1; i2 < pattern.length; i2++) { + const ch = pattern[i2]; + 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 && i2 !== pattern.length - 1) { + return; + } + return { + type: pattern[0], + body: pattern.slice(2, i2), + end: i2 + }; + } + } + } + }; + var getStarExtglobSequenceOutput = (pattern) => { + let index = 0; + const chars = []; + while (index < pattern.length) { + const match2 = parseRepeatedExtglob(pattern.slice(index), false); + if (!match2 || match2.type !== "*") { + return; + } + const branches = splitTopLevel(match2.body).map((branch2) => branch2.trim()); + if (branches.length !== 1) { + return; + } + const branch = normalizeSimpleBranch(branches[0]); + if (!branch || branch.length !== 1) { + return; + } + chars.push(branch); + index += match2.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}*`; + }; + var repeatedExtglobRecursion = (pattern) => { + let depth = 0; + let value = pattern.trim(); + let match2 = parseRepeatedExtglob(value); + while (match2) { + depth++; + value = match2.body.trim(); + match2 = parseRepeatedExtglob(value); + } + return depth; + }; + var analyzeRepeatedExtglob = (body, options2) => { + if (options2.maxExtglobRecursion === false) { + return { risky: false }; + } + const max = typeof options2.maxExtglobRecursion === "number" ? options2.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 }; + }; + var parse = (input, options2) => { + if (typeof input !== "string") { + throw new TypeError("Expected a string"); + } + input = REPLACEMENTS[input] || input; + const opts = { ...options2 }; + 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 PLATFORM_CHARS = constants.globChars(opts.windows); + 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 stack = []; + let prev = bos; + let value; + const eos = () => state.index === len - 1; + const peek = state.peek = (n8 = 1) => input[state.index + n8]; + 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 = (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 = (type2) => { + state[type2]++; + stack.push(type2); + }; + const decrement = (type2) => { + state[type2]--; + stack.pop(); + }; + 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.output = (prev.output || prev.value) + tok.value; + prev.value += tok.value; + return; + } + tok.prev = prev; + tokens.push(tok); + prev = tok; + }; + const extglobOpen = (type2, value2) => { + const token = { ...EXTGLOB_CHARS[value2], 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: type2, value: value2, 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) : void 0; + const open = tokens[token.tokensIndex]; + open.type = "text"; + open.value = literal; + open.output = safeOutput || utils.escapeRegex(literal); + for (let i2 = token.tokensIndex + 1; i2 < tokens.length; i2++) { + tokens[i2].value = ""; + tokens[i2].output = ""; + delete tokens[i2].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)) { + const expression = parse(rest, { ...options2, 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"); + }; + 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, options2); + return state; + } + while (!eos()) { + value = advance(); + if (value === "\0") { + continue; + } + if (value === "\\") { + const next = peek(); + if (next === "/" && opts.bash !== true) { + continue; + } + if (next === "." || next === ";") { + continue; + } + if (!next) { + value += "\\"; + push({ type: "text", value }); + continue; + } + const match2 = /^\\+/.exec(remaining()); + let slashes = 0; + if (match2 && match2[0].length > 2) { + slashes = match2[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 (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 rest2 = prev.value.slice(idx + 2); + const posix = POSIX_REGEX_SOURCE[rest2]; + 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 (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) { + push({ type: "text", value }); + } + continue; + } + 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; + } + 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; + } + 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 i2 = arr.length - 1; i2 >= 0; i2--) { + tokens.pop(); + if (arr[i2].type === "brace") { + break; + } + if (arr[i2].type !== "dots") { + range.unshift(arr[i2].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 t2 of toks) { + state.output += t2.output || t2.value; + } + } + push({ type: "brace", value, output }); + decrement("braces"); + braces.pop(); + continue; + } + if (value === "|") { + if (extglobs.length > 0) { + extglobs[extglobs.length - 1].conditions++; + } + push({ type: "text", value }); + continue; + } + 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; + } + 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; + } + 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; + } + 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 (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; + } + 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; + } + } + 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; + } + if (value === "@") { + if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + push({ type: "at", extglob: true, value, output: "" }); + continue; + } + push({ type: "text", value }); + continue; + } + if (value !== "*") { + if (value === "$" || value === "^") { + value = `\\${value}`; + } + const match2 = REGEX_NON_SPECIAL_CHARS.exec(remaining()); + if (match2) { + value += match2[0]; + state.index += match2[0].length; + } + push({ 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] !== "/")) { + 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; + } } - this.body.on('end', this.endHandler) + push(token); } - - 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 ? serializePathWithQuery(path, query) : path - - // TODO: shall we maybe standardize it to an URL object? - this.origin = origin - - this.protocol = getProtocolFromUrlString(origin) - - this.idempotent = idempotent == null - ? method === 'HEAD' || method === 'GET' - : idempotent - - this.blocking = blocking ?? this.method !== 'HEAD' - - 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') + while (state.brackets > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]")); + state.output = utils.escapeLast(state.output, "["); + decrement("brackets"); } - for (let i = 0; i < headers.length; i += 2) { - processHeader(this, headers[i], headers[i + 1]) + while (state.parens > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")")); + state.output = utils.escapeLast(state.output, "("); + decrement("parens"); } - } else if (headers && typeof headers === 'object') { - if (hasSafeIterator(headers)) { - for (const header of headers) { - if (!Array.isArray(header) || header.length !== 2) { - throw new InvalidArgumentError('headers must be in key-value pair format') + 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; } - 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]]) + } + return state; + }; + parse.fastpaths = (input, options2) => { + const opts = { ...options2 }; + 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 { + DOT_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOTS_SLASH, + STAR, + START_ANCHOR + } = constants.globChars(opts.windows); + 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 = (str2) => { + switch (str2) { + 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 match2 = /^(.*?)\.(\w+)$/.exec(str2); + if (!match2) return; + const source2 = create(match2[1]); + if (!source2) return; + return source2 + DOT_LITERAL + match2[2]; + } } + }; + const output = utils.removePrefix(input, state); + let source = create(output); + if (source && opts.strictSlashes !== true) { + source += `${SLASH_LITERAL}?`; } - } else if (headers != null) { - throw new InvalidArgumentError('headers must be an object or an array') - } - - assertRequestHandler(handler, method, upgrade) - - this.servername = servername || getServerName(this.host) || null - - this[kHandler] = handler - - if (channels.create.hasSubscribers) { - channels.create.publish({ request: this }) - } + return source; + }; + module3.exports = parse; } +}); - onBodySent (chunk) { - if (channels.bodyChunkSent.hasSubscribers) { - channels.bodyChunkSent.publish({ request: this, chunk }) - } - if (this[kHandler].onBodySent) { - try { - return this[kHandler].onBodySent(chunk) - } catch (err) { - this.abort(err) +// node_modules/picomatch/lib/picomatch.js +var require_picomatch = __commonJS({ + "node_modules/picomatch/lib/picomatch.js"(exports, module3) { + "use strict"; + var scan = require_scan(); + var parse = require_parse2(); + var utils = require_utils5(); + var constants = require_constants6(); + var isObject2 = (val) => val && typeof val === "object" && !Array.isArray(val); + var picomatch2 = (glob, options2, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map((input) => picomatch2(input, options2, returnState)); + const arrayMatcher = (str2) => { + for (const isMatch of fns) { + const state2 = isMatch(str2); + 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 = options2 || {}; + const posix = opts.windows; + const regex = isState ? picomatch2.compileRe(glob, options2) : picomatch2.makeRe(glob, options2, false, true); + const state = regex.state; + delete regex.state; + let isIgnored = () => false; + if (opts.ignore) { + const ignoreOpts = { ...options2, ignore: null, onMatch: null, onResult: null }; + isIgnored = picomatch2(opts.ignore, ignoreOpts, returnState); + } + const matcher = (input, returnObject = false) => { + const { isMatch, match: match2, output } = picomatch2.test(input, regex, options2, { glob, posix }); + const result = { glob, state, regex, posix, input, output, match: match2, 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; } - } - } - - onRequestSent () { - if (channels.bodySent.hasSubscribers) { - channels.bodySent.publish({ request: this }) - } - - if (this[kHandler].onRequestSent) { + return matcher; + }; + picomatch2.test = (input, regex, options2, { glob, posix } = {}) => { + if (typeof input !== "string") { + throw new TypeError("Expected input to be a string"); + } + if (input === "") { + return { isMatch: false, output: "" }; + } + const opts = options2 || {}; + const format = opts.format || (posix ? utils.toPosixSlashes : null); + let match2 = input === glob; + let output = match2 && format ? format(input) : input; + if (match2 === false) { + output = format ? format(input) : input; + match2 = output === glob; + } + if (match2 === false || opts.capture === true) { + if (opts.matchBase === true || opts.basename === true) { + match2 = picomatch2.matchBase(input, regex, options2, posix); + } else { + match2 = regex.exec(output); + } + } + return { isMatch: Boolean(match2), match: match2, output }; + }; + picomatch2.matchBase = (input, glob, options2) => { + const regex = glob instanceof RegExp ? glob : picomatch2.makeRe(glob, options2); + return regex.test(utils.basename(input)); + }; + picomatch2.isMatch = (str2, patterns, options2) => picomatch2(patterns, options2)(str2); + picomatch2.parse = (pattern, options2) => { + if (Array.isArray(pattern)) return pattern.map((p2) => picomatch2.parse(p2, options2)); + return parse(pattern, { ...options2, fastpaths: false }); + }; + picomatch2.scan = (input, options2) => scan(input, options2); + picomatch2.compileRe = (state, options2, returnOutput = false, returnState = false) => { + if (returnOutput === true) { + return state.output; + } + const opts = options2 || {}; + const prepend = opts.contains ? "" : "^"; + const append = opts.contains ? "" : "$"; + let source = `${prepend}(?:${state.output})${append}`; + if (state && state.negated === true) { + source = `^(?!${source}).*$`; + } + const regex = picomatch2.toRegex(source, options2); + if (returnState === true) { + regex.state = state; + } + return regex; + }; + picomatch2.makeRe = (input, options2 = {}, returnOutput = false, returnState = false) => { + if (!input || typeof input !== "string") { + throw new TypeError("Expected a non-empty string"); + } + let parsed = { negated: false, fastpaths: true }; + if (options2.fastpaths !== false && (input[0] === "." || input[0] === "*")) { + parsed.output = parse.fastpaths(input, options2); + } + if (!parsed.output) { + parsed = parse(input, options2); + } + return picomatch2.compileRe(parsed, options2, returnOutput, returnState); + }; + picomatch2.toRegex = (source, options2) => { try { - return this[kHandler].onRequestSent() + const opts = options2 || {}; + return new RegExp(source, opts.flags || (opts.nocase ? "i" : "")); } catch (err) { - this.abort(err) + if (options2 && options2.debug === true) throw err; + return /$^/; } - } + }; + picomatch2.constants = constants; + module3.exports = picomatch2; } +}); - onConnect (abort) { - assert(!this.aborted) - assert(!this.completed) - - if (this.error) { - abort(this.error) - } else { - this.abort = abort - return this[kHandler].onConnect(abort) +// node_modules/picomatch/index.js +var require_picomatch2 = __commonJS({ + "node_modules/picomatch/index.js"(exports, module3) { + "use strict"; + var pico = require_picomatch(); + var utils = require_utils5(); + function picomatch2(glob, options2, returnState = false) { + if (options2 && (options2.windows === null || options2.windows === void 0)) { + options2 = { ...options2, windows: utils.isWindows() }; + } + return pico(glob, options2, returnState); } + Object.assign(picomatch2, pico); + module3.exports = picomatch2; } +}); - onResponseStarted () { - return this[kHandler].onResponseStarted?.() +// node_modules/@redocly/openapi-core/lib/env.js +var isBrowser, env; +var init_env = __esm({ + "node_modules/@redocly/openapi-core/lib/env.js"() { + isBrowser = typeof window !== "undefined" || typeof process === "undefined" || process?.platform === "browser"; + env = isBrowser ? {} : process.env || {}; } +}); - 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) +// node_modules/@redocly/openapi-core/lib/utils/read-file-from-url.js +async function readFileFromUrl(url3, config) { + const headers = {}; + for (const header of config.headers) { + if (match(url3, header.matches)) { + headers[header.name] = header.envVariable !== void 0 ? env[header.envVariable] || "" : header.value; } } - - onData (chunk) { - assert(!this.aborted) - assert(!this.completed) - - if (channels.bodyChunkReceived.hasSubscribers) { - channels.bodyChunkReceived.publish({ request: this, chunk }) - } - try { - return this[kHandler].onData(chunk) - } catch (err) { - this.abort(err) - return false - } + const req = await (config.customFetch || fetch)(url3, { + headers + }); + if (!req.ok) { + throw new Error(`Failed to load ${url3}: ${req.status} ${req.statusText}`); } - - onUpgrade (statusCode, headers, socket) { - assert(!this.aborted) - assert(!this.completed) - - return this[kHandler].onUpgrade(statusCode, headers, socket) + return { body: await req.text(), mimeType: req.headers.get("content-type") }; +} +function match(url3, pattern) { + if (!pattern.match(/^https?:\/\//)) { + url3 = url3.replace(/^https?:\/\//, ""); } - - onComplete (trailers) { - this.onFinally() - - assert(!this.aborted) - assert(!this.completed) - - 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) - } + return import_picomatch.default.isMatch(url3, pattern); +} +var import_picomatch; +var init_read_file_from_url = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/read-file-from-url.js"() { + import_picomatch = __toESM(require_picomatch2(), 1); + init_env(); } +}); - 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) +// node_modules/@redocly/openapi-core/lib/utils/slash.js +function slash(path13) { + const isExtendedLengthPath = /^\\\\\?\\/.test(path13); + if (isExtendedLengthPath) { + return path13; } - - 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 - } + return path13.replace(/\\/g, "/"); +} +var init_slash = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/slash.js"() { } +}); - addHeader (key, value) { - processHeader(this, key, value) - return this - } +// node_modules/@redocly/openapi-core/lib/utils/regex-from-string.js +function regexFromString(input) { + const matches = input.match(/^\/(.*)\/(.*)|(.*)/); + return matches && new RegExp(matches[1] || matches[3], matches[2]); } - -function processHeader (request, key, val) { - if (val && (typeof val === 'object' && !Array.isArray(val))) { - throw new InvalidArgumentError(`invalid ${key} header`) - } else if (val === undefined) { - return +var init_regex_from_string = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/regex-from-string.js"() { } +}); - let headerName = headerNameLowerCasedRecord[key] - - if (headerName === undefined) { - headerName = key.toLowerCase() - if (headerNameLowerCasedRecord[headerName] === undefined && !isValidHTTPToken(headerName)) { - throw new InvalidArgumentError('invalid header key') - } +// node_modules/@redocly/openapi-core/lib/types/index.js +function listOf(typeName, opts = {}) { + return { + name: `${typeName}List`, + properties: {}, + items: typeName, + ...opts + }; +} +function mapOf(typeName, opts = {}) { + return { + name: `${typeName}Map`, + properties: {}, + additionalProperties: () => typeName, + ...opts + }; +} +function normalizeTypes(types2, options2 = {}) { + const normalizedTypes = {}; + for (const typeName of Object.keys(types2)) { + normalizedTypes[typeName] = { + ...types2[typeName], + name: typeName + }; } - - 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`) + for (const type2 of Object.values(normalizedTypes)) { + normalizeType(type2); + } + normalizedTypes["SpecExtension"] = SpecExtension; + return normalizedTypes; + function normalizeType(type2) { + if (type2.additionalProperties) { + type2.additionalProperties = resolveType(type2.additionalProperties); + } + if (type2.items) { + type2.items = resolveType(type2.items); + } + if (type2.properties) { + const mappedProps = {}; + for (const [propName, prop] of Object.entries(type2.properties)) { + mappedProps[propName] = resolveType(prop); + if (options2.doNotResolveExamples && prop && prop.isExample) { + mappedProps[propName] = { + ...prop, + resolvable: false + }; } - 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]}`) } + type2.properties = mappedProps; } - 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') { - // Per RFC 7230 Section 6.1, Connection header can contain - // a comma-separated list of connection option tokens (header names) - const value = typeof val === 'string' ? val : null - if (value === null) { - throw new InvalidArgumentError('invalid connection header') - } - - for (const token of value.toLowerCase().split(',')) { - const trimmed = token.trim() - if (!isValidHTTPToken(trimmed)) { - throw new InvalidArgumentError('invalid connection header') - } - if (trimmed === 'close') { - request.reset = true + function resolveType(type2) { + if (typeof type2 === "string") { + if (!normalizedTypes[type2]) { + throw new Error(`Unknown type name found: ${type2}`); } + return normalizedTypes[type2]; + } else if (typeof type2 === "function") { + return (value, key) => resolveType(type2(value, key)); + } else if (isNamedType(type2)) { + type2 = { ...type2 }; + normalizeType(type2); + return type2; + } else if (type2?.directResolveAs !== void 0) { + return { + ...type2, + directResolveAs: resolveType(type2.directResolveAs) ?? void 0 + }; + } else { + return type2; } - } else if (headerName === 'expect') { - throw new NotSupportedError('expect header not supported') - } else { - request.headers.push(key, val) } } - -module.exports = Request - - -/***/ }), - -/***/ 48725: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { EventEmitter } = __nccwpck_require__(15673) -const { Buffer } = __nccwpck_require__(72254) -const { InvalidArgumentError, Socks5ProxyError } = __nccwpck_require__(48045) -const { debuglog } = __nccwpck_require__(47261) -const { parseAddress } = __nccwpck_require__(39743) - -const debug = debuglog('undici:socks5') - -// SOCKS5 constants -const SOCKS_VERSION = 0x05 - -// Authentication methods -const AUTH_METHODS = { - NO_AUTH: 0x00, - GSSAPI: 0x01, - USERNAME_PASSWORD: 0x02, - NO_ACCEPTABLE: 0xFF -} - -// SOCKS5 commands -const COMMANDS = { - CONNECT: 0x01, - BIND: 0x02, - UDP_ASSOCIATE: 0x03 -} - -// Address types -const ADDRESS_TYPES = { - IPV4: 0x01, - DOMAIN: 0x03, - IPV6: 0x04 -} - -// Reply codes -const REPLY_CODES = { - SUCCEEDED: 0x00, - GENERAL_FAILURE: 0x01, - CONNECTION_NOT_ALLOWED: 0x02, - NETWORK_UNREACHABLE: 0x03, - HOST_UNREACHABLE: 0x04, - CONNECTION_REFUSED: 0x05, - TTL_EXPIRED: 0x06, - COMMAND_NOT_SUPPORTED: 0x07, - ADDRESS_TYPE_NOT_SUPPORTED: 0x08 -} - -// State machine states -const STATES = { - INITIAL: 'initial', - HANDSHAKING: 'handshaking', - AUTHENTICATING: 'authenticating', - CONNECTING: 'connecting', - CONNECTED: 'connected', - ERROR: 'error', - CLOSED: 'closed' +function isNamedType(t2) { + return typeof t2?.name === "string"; } - -/** - * SOCKS5 client implementation - * Handles SOCKS5 protocol negotiation and connection establishment - */ -class Socks5Client extends EventEmitter { - constructor (socket, options = {}) { - super() - - if (!socket) { - throw new InvalidArgumentError('socket is required') - } - - this.socket = socket - this.options = options - this.state = STATES.INITIAL - this.buffer = Buffer.alloc(0) - - // Authentication settings - this.authMethods = [] - if (options.username && options.password) { - this.authMethods.push(AUTH_METHODS.USERNAME_PASSWORD) - } - this.authMethods.push(AUTH_METHODS.NO_AUTH) - - // Socket event handlers - this.socket.on('data', this.onData.bind(this)) - this.socket.on('error', this.onError.bind(this)) - this.socket.on('close', this.onClose.bind(this)) +var SpecExtension; +var init_types = __esm({ + "node_modules/@redocly/openapi-core/lib/types/index.js"() { + SpecExtension = { + name: "SpecExtension", + properties: {}, + // skip validation of additional properties for unknown extensions + additionalProperties: { resolvable: true } + }; } +}); - /** - * Handle incoming data from the socket - */ - onData (data) { - debug('received data', data.length, 'bytes in state', this.state) - this.buffer = Buffer.concat([this.buffer, data]) - - try { - switch (this.state) { - case STATES.HANDSHAKING: - this.handleHandshakeResponse() - break - case STATES.AUTHENTICATING: - this.handleAuthResponse() - break - case STATES.CONNECTING: - this.handleConnectResponse() - break +// node_modules/@redocly/openapi-core/lib/types/oas2.js +var responseCodeRegexp, Root, Info, Logo, Contact, License, Paths, PathItem, Operation, XCodeSample, XServer, ExternalDocs, Parameter, ParameterItems, Responses, Response, Examples, Header, Tag, TagGroup, Schema, EnumDescriptions, SchemaProperties, Xml, SecurityScheme, SecurityRequirement, Example, Oas2Types; +var init_oas2 = __esm({ + "node_modules/@redocly/openapi-core/lib/types/oas2.js"() { + init_is_plain_object(); + init_types(); + responseCodeRegexp = /^[0-9][0-9Xx]{2}$/; + Root = { + properties: { + swagger: { type: "string" }, + info: "Info", + host: { type: "string" }, + basePath: { type: "string" }, + schemes: { type: "array", items: { type: "string" } }, + consumes: { type: "array", items: { type: "string" } }, + produces: { type: "array", items: { type: "string" } }, + paths: "Paths", + definitions: "NamedSchemas", + parameters: "NamedParameters", + responses: "NamedResponses", + securityDefinitions: "NamedSecuritySchemes", + security: "SecurityRequirementList", + tags: "TagList", + externalDocs: "ExternalDocs", + "x-servers": "XServerList", + "x-tagGroups": "TagGroups", + "x-ignoredHeaderParameters": { type: "array", items: { type: "string" } } + }, + required: ["swagger", "paths", "info"], + extensionsPrefix: "x-" + }; + Info = { + properties: { + title: { type: "string" }, + description: { type: "string" }, + termsOfService: { type: "string" }, + contact: "Contact", + license: "License", + version: { type: "string" }, + "x-logo": "Logo" + }, + required: ["title", "version"], + extensionsPrefix: "x-" + }; + Logo = { + properties: { + url: { type: "string" }, + altText: { type: "string" }, + backgroundColor: { type: "string" }, + href: { type: "string" } + }, + extensionsPrefix: "x-" + }; + Contact = { + properties: { + name: { type: "string" }, + url: { type: "string" }, + email: { type: "string" } + }, + extensionsPrefix: "x-" + }; + License = { + properties: { + name: { type: "string" }, + url: { type: "string" } + }, + required: ["name"], + extensionsPrefix: "x-" + }; + Paths = { + properties: {}, + additionalProperties: (_value, key) => key.startsWith("/") ? "PathItem" : void 0 + }; + PathItem = { + properties: { + $ref: { type: "string" }, + // TODO: verify special $ref handling for Path Item + parameters: "ParameterList", + get: "Operation", + put: "Operation", + post: "Operation", + delete: "Operation", + options: "Operation", + head: "Operation", + patch: "Operation" + }, + extensionsPrefix: "x-" + }; + Operation = { + properties: { + tags: { type: "array", items: { type: "string" } }, + summary: { type: "string" }, + description: { type: "string" }, + externalDocs: "ExternalDocs", + operationId: { type: "string" }, + consumes: { type: "array", items: { type: "string" } }, + produces: { type: "array", items: { type: "string" } }, + parameters: "ParameterList", + responses: "Responses", + schemes: { type: "array", items: { type: "string" } }, + deprecated: { type: "boolean" }, + security: "SecurityRequirementList", + "x-codeSamples": "XCodeSampleList", + "x-code-samples": "XCodeSampleList", + // deprecated + "x-hideTryItPanel": { type: "boolean" } + }, + required: ["responses"], + extensionsPrefix: "x-" + }; + XCodeSample = { + properties: { + lang: { type: "string" }, + label: { type: "string" }, + source: { type: "string" } } - } catch (err) { - this.onError(err) - } - } - - /** - * Handle socket errors - */ - onError (err) { - debug('socket error', err) - this.state = STATES.ERROR - this.emit('error', err) - this.destroy() - } - - /** - * Handle socket close - */ - onClose () { - debug('socket closed') - this.state = STATES.CLOSED - this.emit('close') - } - - /** - * Destroy the client and underlying socket - */ - destroy () { - if (this.socket && !this.socket.destroyed) { - this.socket.destroy() - } - } - - /** - * Start the SOCKS5 handshake - */ - handshake () { - if (this.state !== STATES.INITIAL) { - throw new InvalidArgumentError('Handshake already started') - } - - debug('starting handshake with', this.authMethods.length, 'auth methods') - this.state = STATES.HANDSHAKING - - // Build handshake request - // +----+----------+----------+ - // |VER | NMETHODS | METHODS | - // +----+----------+----------+ - // | 1 | 1 | 1 to 255 | - // +----+----------+----------+ - const request = Buffer.alloc(2 + this.authMethods.length) - request[0] = SOCKS_VERSION - request[1] = this.authMethods.length - this.authMethods.forEach((method, i) => { - request[2 + i] = method - }) - - this.socket.write(request) - } - - /** - * Handle handshake response from server - */ - handleHandshakeResponse () { - if (this.buffer.length < 2) { - return // Not enough data yet - } - - const version = this.buffer[0] - const method = this.buffer[1] - - if (version !== SOCKS_VERSION) { - throw new Socks5ProxyError(`Invalid SOCKS version: ${version}`, 'UND_ERR_SOCKS5_VERSION') - } - - if (method === AUTH_METHODS.NO_ACCEPTABLE) { - throw new Socks5ProxyError('No acceptable authentication method', 'UND_ERR_SOCKS5_AUTH_REJECTED') - } - - this.buffer = this.buffer.subarray(2) - debug('server selected auth method', method) - - if (method === AUTH_METHODS.NO_AUTH) { - this.emit('authenticated') - } else if (method === AUTH_METHODS.USERNAME_PASSWORD) { - this.state = STATES.AUTHENTICATING - this.sendAuthRequest() - } else { - throw new Socks5ProxyError(`Unsupported authentication method: ${method}`, 'UND_ERR_SOCKS5_AUTH_METHOD') - } - } - - /** - * Send username/password authentication request - */ - sendAuthRequest () { - const { username, password } = this.options - - if (!username || !password) { - throw new InvalidArgumentError('Username and password required for authentication') - } - - debug('sending username/password auth') - - // Username/Password authentication request (RFC 1929) - // +----+------+----------+------+----------+ - // |VER | ULEN | UNAME | PLEN | PASSWD | - // +----+------+----------+------+----------+ - // | 1 | 1 | 1 to 255 | 1 | 1 to 255 | - // +----+------+----------+------+----------+ - const usernameBuffer = Buffer.from(username) - const passwordBuffer = Buffer.from(password) - - if (usernameBuffer.length > 255 || passwordBuffer.length > 255) { - throw new InvalidArgumentError('Username or password too long') - } - - const request = Buffer.alloc(3 + usernameBuffer.length + passwordBuffer.length) - request[0] = 0x01 // Sub-negotiation version - request[1] = usernameBuffer.length - usernameBuffer.copy(request, 2) - request[2 + usernameBuffer.length] = passwordBuffer.length - passwordBuffer.copy(request, 3 + usernameBuffer.length) - - this.socket.write(request) - } - - /** - * Handle authentication response - */ - handleAuthResponse () { - if (this.buffer.length < 2) { - return // Not enough data yet - } - - const version = this.buffer[0] - const status = this.buffer[1] - - if (version !== 0x01) { - throw new Socks5ProxyError(`Invalid auth sub-negotiation version: ${version}`, 'UND_ERR_SOCKS5_AUTH_VERSION') - } - - if (status !== 0x00) { - throw new Socks5ProxyError('Authentication failed', 'UND_ERR_SOCKS5_AUTH_FAILED') - } - - this.buffer = this.buffer.subarray(2) - debug('authentication successful') - this.emit('authenticated') - } - - /** - * Send CONNECT command - * @param {string} address - Target address (IP or domain) - * @param {number} port - Target port - */ - connect (address, port) { - if (this.state === STATES.CONNECTED) { - throw new InvalidArgumentError('Already connected') - } - - debug('connecting to', address, port) - this.state = STATES.CONNECTING - - const request = this.buildConnectRequest(COMMANDS.CONNECT, address, port) - this.socket.write(request) - } - - /** - * Build a SOCKS5 request - */ - buildConnectRequest (command, address, port) { - // Parse address to determine type and buffer - const { type: addressType, buffer: addressBuffer } = parseAddress(address) - - // Build request - // +----+-----+-------+------+----------+----------+ - // |VER | CMD | RSV | ATYP | DST.ADDR | DST.PORT | - // +----+-----+-------+------+----------+----------+ - // | 1 | 1 | X'00' | 1 | Variable | 2 | - // +----+-----+-------+------+----------+----------+ - const request = Buffer.alloc(4 + addressBuffer.length + 2) - request[0] = SOCKS_VERSION - request[1] = command - request[2] = 0x00 // Reserved - request[3] = addressType - addressBuffer.copy(request, 4) - request.writeUInt16BE(port, 4 + addressBuffer.length) - - return request - } - - /** - * Handle CONNECT response - */ - handleConnectResponse () { - if (this.buffer.length < 4) { - return // Not enough data for header - } - - const version = this.buffer[0] - const reply = this.buffer[1] - const addressType = this.buffer[3] - - if (version !== SOCKS_VERSION) { - throw new Socks5ProxyError(`Invalid SOCKS version in reply: ${version}`, 'UND_ERR_SOCKS5_REPLY_VERSION') - } - - // Calculate the expected response length - let responseLength = 4 // VER + REP + RSV + ATYP - if (addressType === ADDRESS_TYPES.IPV4) { - responseLength += 4 + 2 // IPv4 + port - } else if (addressType === ADDRESS_TYPES.DOMAIN) { - if (this.buffer.length < 5) { - return // Need domain length byte + }; + XServer = { + properties: { + url: { type: "string" }, + description: { type: "string" } + }, + required: ["url"] + }; + ExternalDocs = { + properties: { + description: { type: "string" }, + url: { type: "string" } + }, + required: ["url"], + extensionsPrefix: "x-" + }; + Parameter = { + properties: { + name: { type: "string" }, + in: { type: "string", enum: ["query", "header", "path", "formData", "body"] }, + description: { type: "string" }, + required: { type: "boolean" }, + schema: "Schema", + type: { type: "string", enum: ["string", "number", "integer", "boolean", "array", "file"] }, + format: { type: "string" }, + allowEmptyValue: { type: "boolean" }, + items: "ParameterItems", + collectionFormat: { type: "string", enum: ["csv", "ssv", "tsv", "pipes", "multi"] }, + default: null, + maximum: { type: "integer" }, + exclusiveMaximum: { type: "boolean" }, + minimum: { type: "integer" }, + exclusiveMinimum: { type: "boolean" }, + maxLength: { type: "integer" }, + minLength: { type: "integer" }, + pattern: { type: "string" }, + maxItems: { type: "integer" }, + minItems: { type: "integer" }, + uniqueItems: { type: "boolean" }, + enum: { type: "array" }, + multipleOf: { type: "number" }, + "x-example": {}, + // any + "x-examples": "ExamplesMap" + }, + required(value) { + if (!value || !value.in) { + return ["name", "in"]; + } + if (value.in === "body") { + return ["name", "in", "schema"]; + } else { + if (value.type === "array") { + return ["name", "in", "type", "items"]; + } else { + return ["name", "in", "type"]; + } + } + }, + extensionsPrefix: "x-" + }; + ParameterItems = { + properties: { + type: { type: "string", enum: ["string", "number", "integer", "boolean", "array"] }, + format: { type: "string" }, + items: "ParameterItems", + collectionFormat: { type: "string", enum: ["csv", "ssv", "tsv", "pipes", "multi"] }, + default: null, + maximum: { type: "integer" }, + exclusiveMaximum: { type: "boolean" }, + minimum: { type: "integer" }, + exclusiveMinimum: { type: "boolean" }, + maxLength: { type: "integer" }, + minLength: { type: "integer" }, + pattern: { type: "string" }, + maxItems: { type: "integer" }, + minItems: { type: "integer" }, + uniqueItems: { type: "boolean" }, + enum: { type: "array" }, + multipleOf: { type: "number" } + }, + required(value) { + if (value && value.type === "array") { + return ["type", "items"]; + } else { + return ["type"]; + } + }, + extensionsPrefix: "x-" + }; + Responses = { + properties: { + default: "Response" + }, + additionalProperties: (_v, key) => responseCodeRegexp.test(key) ? "Response" : void 0 + }; + Response = { + properties: { + description: { type: "string" }, + schema: "Schema", + headers: mapOf("Header"), + examples: "Examples", + "x-summary": { type: "string" } + }, + required: ["description"], + extensionsPrefix: "x-" + }; + Examples = { + properties: {}, + additionalProperties: { isExample: true } + }; + Header = { + properties: { + description: { type: "string" }, + type: { type: "string", enum: ["string", "number", "integer", "boolean", "array"] }, + format: { type: "string" }, + items: "ParameterItems", + collectionFormat: { type: "string", enum: ["csv", "ssv", "tsv", "pipes", "multi"] }, + default: null, + maximum: { type: "integer" }, + exclusiveMaximum: { type: "boolean" }, + minimum: { type: "integer" }, + exclusiveMinimum: { type: "boolean" }, + maxLength: { type: "integer" }, + minLength: { type: "integer" }, + pattern: { type: "string" }, + maxItems: { type: "integer" }, + minItems: { type: "integer" }, + uniqueItems: { type: "boolean" }, + enum: { type: "array" }, + multipleOf: { type: "number" } + }, + required(value) { + if (isPlainObject(value) && value.type === "array") { + return ["type", "items"]; + } else { + return ["type"]; + } + }, + extensionsPrefix: "x-" + }; + Tag = { + properties: { + name: { type: "string" }, + description: { type: "string" }, + externalDocs: "ExternalDocs", + "x-traitTag": { type: "boolean" }, + "x-displayName": { type: "string" } + }, + required: ["name"], + extensionsPrefix: "x-" + }; + TagGroup = { + properties: { + name: { type: "string" }, + tags: { type: "array", items: { type: "string" } } } - responseLength += 1 + this.buffer[4] + 2 // length byte + domain + port - } else if (addressType === ADDRESS_TYPES.IPV6) { - responseLength += 16 + 2 // IPv6 + port - } else { - throw new Socks5ProxyError(`Invalid address type in reply: ${addressType}`, 'UND_ERR_SOCKS5_ADDR_TYPE') - } - - if (this.buffer.length < responseLength) { - return // Not enough data for full response - } - - if (reply !== REPLY_CODES.SUCCEEDED) { - const errorMessage = this.getReplyErrorMessage(reply) - throw new Socks5ProxyError(`SOCKS5 connection failed: ${errorMessage}`, `UND_ERR_SOCKS5_REPLY_${reply}`) - } - - // Parse bound address and port - let boundAddress - let offset = 4 - - if (addressType === ADDRESS_TYPES.IPV4) { - boundAddress = Array.from(this.buffer.subarray(offset, offset + 4)).join('.') - offset += 4 - } else if (addressType === ADDRESS_TYPES.DOMAIN) { - const domainLength = this.buffer[offset] - offset += 1 - boundAddress = this.buffer.subarray(offset, offset + domainLength).toString() - offset += domainLength - } else if (addressType === ADDRESS_TYPES.IPV6) { - // Parse IPv6 address from 16-byte buffer - const parts = [] - for (let i = 0; i < 8; i++) { - const value = this.buffer.readUInt16BE(offset + i * 2) - parts.push(value.toString(16)) - } - boundAddress = parts.join(':') - offset += 16 - } - - const boundPort = this.buffer.readUInt16BE(offset) - - this.buffer = this.buffer.subarray(responseLength) - this.state = STATES.CONNECTED - - debug('connected, bound address:', boundAddress, 'port:', boundPort) - this.emit('connected', { address: boundAddress, port: boundPort }) - } - - /** - * Get human-readable error message for reply code - */ - getReplyErrorMessage (reply) { - switch (reply) { - case REPLY_CODES.GENERAL_FAILURE: - return 'General SOCKS server failure' - case REPLY_CODES.CONNECTION_NOT_ALLOWED: - return 'Connection not allowed by ruleset' - case REPLY_CODES.NETWORK_UNREACHABLE: - return 'Network unreachable' - case REPLY_CODES.HOST_UNREACHABLE: - return 'Host unreachable' - case REPLY_CODES.CONNECTION_REFUSED: - return 'Connection refused' - case REPLY_CODES.TTL_EXPIRED: - return 'TTL expired' - case REPLY_CODES.COMMAND_NOT_SUPPORTED: - return 'Command not supported' - case REPLY_CODES.ADDRESS_TYPE_NOT_SUPPORTED: - return 'Address type not supported' - default: - return `Unknown error code: ${reply}` - } + }; + Schema = { + properties: { + format: { type: "string" }, + title: { type: "string" }, + description: { type: "string" }, + default: null, + multipleOf: { type: "number" }, + maximum: { type: "number" }, + minimum: { type: "number" }, + exclusiveMaximum: { type: "boolean" }, + exclusiveMinimum: { type: "boolean" }, + maxLength: { type: "number" }, + minLength: { type: "number" }, + pattern: { type: "string" }, + maxItems: { type: "number" }, + minItems: { type: "number" }, + uniqueItems: { type: "boolean" }, + maxProperties: { type: "number" }, + minProperties: { type: "number" }, + required: { type: "array", items: { type: "string" } }, + enum: { type: "array" }, + type: { + type: "string", + enum: ["object", "array", "string", "number", "integer", "boolean", "null"] + }, + items: (value) => { + if (Array.isArray(value)) { + return listOf("Schema"); + } else { + return "Schema"; + } + }, + allOf: listOf("Schema"), + properties: "SchemaProperties", + additionalProperties: (value) => { + if (typeof value === "boolean") { + return { type: "boolean" }; + } else { + return "Schema"; + } + }, + discriminator: { type: "string" }, + readOnly: { type: "boolean" }, + xml: "Xml", + externalDocs: "ExternalDocs", + example: { isExample: true }, + "x-tags": { type: "array", items: { type: "string" } }, + "x-nullable": { type: "boolean" }, + "x-extendedDiscriminator": { type: "string" }, + "x-additionalPropertiesName": { type: "string" }, + "x-explicitMappingOnly": { type: "boolean" }, + "x-enumDescriptions": "EnumDescriptions" + }, + extensionsPrefix: "x-" + }; + EnumDescriptions = { + properties: {}, + additionalProperties: { type: "string" } + }; + SchemaProperties = { + properties: {}, + additionalProperties: "Schema" + }; + Xml = { + properties: { + name: { type: "string" }, + namespace: { type: "string" }, + prefix: { type: "string" }, + attribute: { type: "boolean" }, + wrapped: { type: "boolean" } + }, + extensionsPrefix: "x-" + }; + SecurityScheme = { + properties: { + type: { enum: ["basic", "apiKey", "oauth2"] }, + description: { type: "string" }, + name: { type: "string" }, + in: { type: "string", enum: ["query", "header"] }, + flow: { enum: ["implicit", "password", "application", "accessCode"] }, + authorizationUrl: { type: "string" }, + tokenUrl: { type: "string" }, + scopes: { type: "object", additionalProperties: { type: "string" } }, + "x-defaultClientId": { type: "string" } + }, + required(value) { + switch (value?.type) { + case "apiKey": + return ["type", "name", "in"]; + case "oauth2": + switch (value?.flow) { + case "implicit": + return ["type", "flow", "authorizationUrl", "scopes"]; + case "accessCode": + return ["type", "flow", "authorizationUrl", "tokenUrl", "scopes"]; + case "application": + case "password": + return ["type", "flow", "tokenUrl", "scopes"]; + default: + return ["type", "flow", "scopes"]; + } + default: + return ["type"]; + } + }, + allowed(value) { + switch (value?.type) { + case "basic": + return ["type", "description"]; + case "apiKey": + return ["type", "name", "in", "description"]; + case "oauth2": + switch (value?.flow) { + case "implicit": + return ["type", "flow", "authorizationUrl", "description", "scopes"]; + case "accessCode": + return ["type", "flow", "authorizationUrl", "tokenUrl", "description", "scopes"]; + case "application": + case "password": + return ["type", "flow", "tokenUrl", "description", "scopes"]; + default: + return ["type", "flow", "tokenUrl", "authorizationUrl", "description", "scopes"]; + } + default: + return ["type", "description"]; + } + }, + extensionsPrefix: "x-" + }; + SecurityRequirement = { + properties: {}, + additionalProperties: { type: "array", items: { type: "string" } } + }; + Example = { + properties: { + value: { isExample: true }, + summary: { type: "string" }, + description: { type: "string" }, + externalValue: { type: "string" } + }, + extensionsPrefix: "x-" + }; + Oas2Types = { + Root, + Tag, + TagList: listOf("Tag"), + TagGroups: listOf("TagGroup"), + TagGroup, + ExternalDocs, + Example, + ExamplesMap: mapOf("Example"), + EnumDescriptions, + SecurityRequirement, + SecurityRequirementList: listOf("SecurityRequirement"), + Info, + Contact, + License, + Logo, + Paths, + PathItem, + Parameter, + ParameterItems, + ParameterList: listOf("Parameter"), + Operation, + Examples, + Header, + Responses, + Response, + Schema, + Xml, + SchemaProperties, + NamedSchemas: mapOf("Schema"), + NamedResponses: mapOf("Response"), + NamedParameters: mapOf("Parameter"), + NamedSecuritySchemes: mapOf("SecurityScheme"), + SecurityScheme, + XCodeSample, + XCodeSampleList: listOf("XCodeSample"), + XServerList: listOf("XServer"), + XServer + }; } -} +}); -module.exports = { - Socks5Client, - AUTH_METHODS, - COMMANDS, - ADDRESS_TYPES, - REPLY_CODES, - STATES +// node_modules/@redocly/openapi-core/lib/ref-utils.js +import * as path2 from "node:path"; +function joinPointer(base, key) { + if (base === "") + base = "#/"; + return base[base.length - 1] === "/" ? base + key : base + "/" + key; } - - -/***/ }), - -/***/ 39743: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { Buffer } = __nccwpck_require__(72254) -const net = __nccwpck_require__(87503) -const { InvalidArgumentError } = __nccwpck_require__(48045) - -/** - * Parse an address and determine its type - * @param {string} address - The address to parse - * @returns {{type: number, buffer: Buffer}} Address type and buffer - */ -function parseAddress (address) { - // Check if it's an IPv4 address - if (net.isIPv4(address)) { - const parts = address.split('.').map(Number) - return { - type: 0x01, // IPv4 - buffer: Buffer.from(parts) - } - } - - // Check if it's an IPv6 address - if (net.isIPv6(address)) { - return { - type: 0x04, // IPv6 - buffer: parseIPv6(address) - } - } - - // Otherwise, treat as domain name - const domainBuffer = Buffer.from(address, 'utf8') - if (domainBuffer.length > 255) { - throw new InvalidArgumentError('Domain name too long (max 255 bytes)') +function isRef(node) { + return isPlainObject(node) && typeof node.$ref === "string"; +} +function isExternalValue(node) { + return isPlainObject(node) && typeof node.externalValue === "string"; +} +function unescapePointerFragment(fragment) { + const unescaped = fragment.indexOf("~") === -1 ? fragment : fragment.replaceAll("~1", "/").replaceAll("~0", "~"); + try { + return decodeURIComponent(unescaped); + } catch (e2) { + return unescaped; } - +} +function escapePointerFragment(fragment) { + if (typeof fragment === "number") + return fragment; + if (fragment.indexOf("/") === -1 && fragment.indexOf("~") === -1) + return fragment; + return fragment.replaceAll("~", "~0").replaceAll("/", "~1"); +} +function parseRef(ref) { + const [uri, pointer = ""] = ref.split("#/"); return { - type: 0x03, // Domain - buffer: Buffer.concat([Buffer.from([domainBuffer.length]), domainBuffer]) + uri: (uri.endsWith("#") ? uri.slice(0, -1) : uri) || null, + pointer: parsePointer(pointer) + }; +} +function parsePointer(pointer) { + return pointer.split("/").map(unescapePointerFragment).filter(isTruthy); +} +function pointerBaseName(pointer) { + const parts = pointer.split("/"); + return parts[parts.length - 1]; +} +function refBaseName(ref) { + const parts = ref.split(/[\/\\]/); + return parts[parts.length - 1].replace(/\.[^.]+$/, ""); +} +function isAbsoluteUrl(ref) { + return ref.startsWith("http://") || ref.startsWith("https://") || ref.startsWith("file://") || ref.startsWith("data:"); +} +function getDir(filePath) { + if (!path2.extname(filePath)) { + return filePath; } + return isAbsoluteUrl(filePath) ? filePath.substring(0, filePath.lastIndexOf("/")) : path2.dirname(filePath); } - -/** - * Parse IPv6 address to buffer - * @param {string} address - IPv6 address string - * @returns {Buffer} 16-byte buffer - */ -function parseIPv6 (address) { - const buffer = Buffer.alloc(16) - const parts = address.split(':') - let partIndex = 0 - let bufferIndex = 0 - - // Handle compressed notation (::) - const doubleColonIndex = address.indexOf('::') - if (doubleColonIndex !== -1) { - // Count non-empty parts - const nonEmptyParts = parts.filter(p => p.length > 0).length - const skipParts = 8 - nonEmptyParts - - for (let i = 0; i < parts.length; i++) { - if (parts[i] === '' && i === doubleColonIndex / 3) { - // Skip empty parts for :: - bufferIndex += skipParts * 2 - } else if (parts[i] !== '') { - const value = parseInt(parts[i], 16) - buffer.writeUInt16BE(value, bufferIndex) - bufferIndex += 2 - } - } - } else { - // No compression, parse normally - for (const part of parts) { - if (part === '') continue - const value = parseInt(part, 16) - buffer.writeUInt16BE(value, partIndex * 2) - partIndex++ - } +function resolvePath(base, relative5) { + if (isAbsoluteUrl(base)) { + return new URL(relative5, base.endsWith("/") ? base : `${base}/`).href; } - - return buffer + return path2.resolve(base, relative5); } - -/** - * Build a SOCKS5 address buffer - * @param {number} type - Address type (1=IPv4, 3=Domain, 4=IPv6) - * @param {Buffer} addressBuffer - The address data - * @param {number} port - Port number - * @returns {Buffer} Complete address buffer including type, address, and port - */ -function buildAddressBuffer (type, addressBuffer, port) { - const portBuffer = Buffer.allocUnsafe(2) - portBuffer.writeUInt16BE(port, 0) - - return Buffer.concat([ - Buffer.from([type]), - addressBuffer, - portBuffer - ]) +function isMappingRef(mapping) { + return typeof mapping === "string" && (mapping.startsWith("#") || isAbsoluteUrl(mapping) || mapping.startsWith("./") || mapping.startsWith("../") || mapping.indexOf("/") > -1 || /\.(ya?ml|json)$/i.test(mapping)); } - -/** - * Parse address from SOCKS5 response - * @param {Buffer} buffer - Buffer containing the address - * @param {number} offset - Starting offset in buffer - * @returns {{address: string, port: number, bytesRead: number}} - */ -function parseResponseAddress (buffer, offset = 0) { - if (buffer.length < offset + 1) { - throw new InvalidArgumentError('Buffer too small to contain address type') - } - - const addressType = buffer[offset] - let address - let currentOffset = offset + 1 - - switch (addressType) { - case 0x01: { // IPv4 - if (buffer.length < currentOffset + 6) { - throw new InvalidArgumentError('Buffer too small for IPv4 address') - } - address = Array.from(buffer.subarray(currentOffset, currentOffset + 4)).join('.') - currentOffset += 4 - break - } - - case 0x03: { // Domain - if (buffer.length < currentOffset + 1) { - throw new InvalidArgumentError('Buffer too small for domain length') +function isAnchor(ref) { + return /^#[A-Za-z][A-Za-z0-9\-_:.]*$/.test(ref); +} +function replaceRef(ref, resolved, ctx) { + if (!isPlainObject(resolved.node)) { + ctx.parent[ctx.key] = resolved.node; + } else { + delete ref.$ref; + const obj = Object.assign({}, resolved.node, ref); + Object.assign(ref, obj); + } +} +var Location; +var init_ref_utils = __esm({ + "node_modules/@redocly/openapi-core/lib/ref-utils.js"() { + init_is_plain_object(); + init_is_truthy(); + Location = class _Location { + source; + pointer; + constructor(source, pointer) { + this.source = source; + this.pointer = pointer; } - const domainLength = buffer[currentOffset] - currentOffset += 1 - - if (buffer.length < currentOffset + domainLength + 2) { - throw new InvalidArgumentError('Buffer too small for domain address') + child(components) { + return new _Location(this.source, joinPointer(this.pointer, (Array.isArray(components) ? components : [components]).map(escapePointerFragment).join("/"))); } - address = buffer.subarray(currentOffset, currentOffset + domainLength).toString('utf8') - currentOffset += domainLength - break - } - - case 0x04: { // IPv6 - if (buffer.length < currentOffset + 18) { - throw new InvalidArgumentError('Buffer too small for IPv6 address') + key() { + return { ...this, reportOnKey: true }; } - // Convert buffer to IPv6 string - const parts = [] - for (let i = 0; i < 8; i++) { - const value = buffer.readUInt16BE(currentOffset + i * 2) - parts.push(value.toString(16)) + get absolutePointer() { + return this.source.absoluteRef + (this.pointer === "#/" ? "" : this.pointer); } - address = parts.join(':') - currentOffset += 16 - break - } - - default: - throw new InvalidArgumentError(`Invalid address type: ${addressType}`) - } - - // Parse port - if (buffer.length < currentOffset + 2) { - throw new InvalidArgumentError('Buffer too small for port') - } - const port = buffer.readUInt16BE(currentOffset) - currentOffset += 2 - - return { - address, - port, - bytesRead: currentOffset - offset + }; } -} - -/** - * Create error for SOCKS5 reply code - * @param {number} replyCode - SOCKS5 reply code - * @returns {Error} Appropriate error object - */ -function createReplyError (replyCode) { - const messages = { - 0x01: 'General SOCKS server failure', - 0x02: 'Connection not allowed by ruleset', - 0x03: 'Network unreachable', - 0x04: 'Host unreachable', - 0x05: 'Connection refused', - 0x06: 'TTL expired', - 0x07: 'Command not supported', - 0x08: 'Address type not supported' - } - - const message = messages[replyCode] || `Unknown SOCKS5 error code: ${replyCode}` - const error = new Error(message) - error.code = `SOCKS5_${replyCode}` - return error -} - -module.exports = { - parseAddress, - parseIPv6, - buildAddressBuffer, - parseResponseAddress, - createReplyError -} - - -/***/ }), - -/***/ 72785: -/***/ ((module) => { - -"use strict"; - - -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'), - 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'), - kHTTP2InitialWindowSize: Symbol('http2 initial window size'), - kHTTP2ConnectionWindowSize: Symbol('http2 connection window size'), - kEnableConnectProtocol: Symbol('http2session connect protocol'), - kRemoteSettings: Symbol('http2session remote settings'), - kHTTP2Stream: Symbol('http2session client stream'), - kPingInterval: Symbol('ping interval'), - kNoProxyAgent: Symbol('no proxy agent'), - kHttpProxyAgent: Symbol('http proxy agent'), - kHttpsProxyAgent: Symbol('https proxy agent'), - kSocks5ProxyAgent: Symbol('socks5 proxy agent') -} - +}); -/***/ }), - -/***/ 57506: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - wellknownHeaderNames, - headerNameLowerCasedRecord -} = __nccwpck_require__(14462) - -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 - * @returns {void} - */ - add (key, value) { - const length = key.length - if (length === 0) { - throw new TypeError('Unreachable') - } - let index = 0 - /** - * @type {TstNode} - */ - 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 +// node_modules/@redocly/openapi-core/lib/types/oas3.js +var responseCodeRegexp2, Root2, Tag2, TagGroup2, ExternalDocs2, Server, ServerVariable, SecurityRequirement2, Info2, Logo2, Contact2, License2, Paths2, WebhooksMap, PathItem2, Parameter2, Operation2, XCodeSample2, RequestBody, MediaTypesMap, MediaType, Example2, Encoding, EnumDescriptions2, Header2, Responses2, Response2, Link, Schema2, Xml2, SchemaProperties2, DiscriminatorMapping, Discriminator, Components, ImplicitFlow, PasswordFlow, ClientCredentials, AuthorizationCode, OAuth2Flows, SecurityScheme2, XUsePkce, Oas3Types; +var init_oas3 = __esm({ + "node_modules/@redocly/openapi-core/lib/types/oas3.js"() { + init_ref_utils(); + init_types(); + responseCodeRegexp2 = /^[0-9][0-9Xx]{2}$/; + Root2 = { + properties: { + openapi: null, + info: "Info", + servers: "ServerList", + security: "SecurityRequirementList", + tags: "TagList", + externalDocs: "ExternalDocs", + paths: "Paths", + components: "Components", + "x-webhooks": "WebhooksMap", + "x-tagGroups": "TagGroups", + "x-ignoredHeaderParameters": { type: "array", items: { type: "string" } } + }, + required: ["openapi", "paths", "info"], + extensionsPrefix: "x-", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/openapi#openapi", + description: "REQUIRED. This string MUST be the semantic version number of the OpenAPI Specification version that the OpenAPI document uses. The openapi field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is not related to the API info.version string." + }; + Tag2 = { + properties: { + name: { + type: "string", + description: "REQUIRED. The name of the tag." + }, + description: { + type: "string", + description: "A description for the tag." + }, + externalDocs: "ExternalDocs", + "x-traitTag": { type: "boolean" }, + "x-displayName": { type: "string" } + }, + required: ["name"], + extensionsPrefix: "x-", + description: `The Tag Object represents a tag used by the OAS. It is not mandatory to have a tag object per tag used by the OAS but each tag object can contain additional metadata.` + }; + TagGroup2 = { + properties: { + name: { + type: "string", + description: "The display name for the tag, used in the navigation bar and as a section heading." + }, + tags: { + type: "array", + description: "List of tags to include in this group.", + items: { type: "string" } + } + }, + extensionsPrefix: "x-", + description: "The x-tagGroups extension is used at the top level of an OpenAPI description.", + documentationLink: "https://redocly.com/docs/realm/content/api-docs/openapi-extensions/x-tag-groups#taggroup-object" + }; + ExternalDocs2 = { + properties: { + description: { + type: "string", + description: "A description of the target documentation. Used as the link anchor text in Redocly. If not provided, the url is used as the link anchor text." + }, + url: { + type: "string", + description: "REQUIRED. The URL for the target documentation." + } + }, + required: ["url"], + extensionsPrefix: "x-", + description: "Additional external documentation for this operation.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/external-docs" + }; + Server = { + properties: { + url: { + type: "string", + description: "REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions are made when a variable is named in { curly braces }." + }, + description: { + type: "string", + description: "An optional string describing the host designated by the URL." + }, + variables: "ServerVariablesMap" + }, + required: ["url"], + extensionsPrefix: "x-", + description: "A server object to be used by the target operation." + }; + ServerVariable = { + properties: { + enum: { + type: "array", + items: { type: "string" }, + description: "An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT be empty. If defined, the array MUST contain the default value." + }, + default: { + type: "string", + description: `REQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. Note this behavior is different than the Schema Object's treatment of default values, because in those cases parameter values are optional. If the enum is defined, the value MUST exist in the enum's values.` + }, + description: { + type: "string", + description: "An optional description for the server variable." + } + }, + required: ["default"], + extensionsPrefix: "x-", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/server-variables#server-variables", + description: "Server variables are used when you need to make a substitution into the server URL such as when the subdomain is unique per tenant." + }; + SecurityRequirement2 = { + properties: {}, + additionalProperties: { type: "array", items: { type: "string" } }, + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/security#security-requirement-object", + description: "A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition. To make security optional, an empty security requirement ({}) can be included in the array." + }; + Info2 = { + properties: { + title: { + type: "string", + description: "REQUIRED. The title of the API." + }, + version: { + type: "string", + description: "REQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version)." + }, + description: { + type: "string", + description: "RECOMMENDED. A description of the API (Markdown may be used)." + }, + termsOfService: { + type: "string", + description: "A URL to the Terms of Service for the API." + }, + contact: "Contact", + license: "License", + "x-logo": "Logo" + }, + required: ["title", "version"], + extensionsPrefix: "x-", + description: "REQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/info#info" + }; + Logo2 = { + properties: { + url: { type: "string" }, + altText: { type: "string" }, + backgroundColor: { type: "string" }, + href: { type: "string" } + }, + documentationLink: "https://redocly.com/docs-legacy/api-reference-docs/specification-extensions/x-logo#x-logo", + description: "A commonly used specification extension containing the information about the API logo." + }; + Contact2 = { + properties: { + name: { + type: "string", + description: "The identifying name of the contact person or organization." + }, + url: { + type: "string", + description: "The URL pointing to the contact information." + }, + email: { + type: "string", + description: "The email address of the contact person or organization." + } + }, + extensionsPrefix: "x-", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/contact", + description: "The contact information for the exposed API." + }; + License2 = { + properties: { + name: { + type: "string", + description: "REQUIRED. The license name used for the API." + }, + url: { + type: "string", + description: "The URL pointing to the contact information." + } + }, + required: ["name"], + extensionsPrefix: "x-", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/license#license", + description: "The license information for the exposed API." + }; + Paths2 = { + properties: {}, + additionalProperties: (_value, key) => key.startsWith("/") ? "PathItem" : void 0, + description: "The Paths Object is a map of a paths to the path item object. A path starts with a /.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/paths#paths-object" + }; + WebhooksMap = { + properties: {}, + additionalProperties: () => "PathItem", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/webhooks#types" + }; + PathItem2 = { + properties: { + $ref: { + type: "string", + description: "Allows for a referenced definition of this path item. The referenced structure MUST be in the form of a Path Item Object. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving Relative References.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/reference" + }, + // TODO: verify special $ref handling for Path Item + servers: "ServerList", + parameters: "ParameterList", + summary: { + type: "string", + description: "An optional, string summary, intended to apply to all operations in this path." + }, + description: { + type: "string", + description: "An optional, string description, intended to apply to all operations in this path." + }, + get: "Operation", + put: "Operation", + post: "Operation", + delete: "Operation", + options: "Operation", + head: "Operation", + patch: "Operation", + trace: "Operation", + "x-query": "Operation" + }, + extensionsPrefix: "x-", + description: "Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/path-item#path-item-object" + }; + Parameter2 = { + properties: { + name: { + type: "string", + description: "REQUIRED. The name of the parameter. Parameter names are case sensitive." + }, + in: { + enum: ["query", "header", "path", "cookie"], + description: 'REQUIRED. The location of the parameter. Possible values are "query", "header", "path", or "cookie".' + }, + description: { + type: "string", + description: "A brief description of the parameter. This could contain examples of use." + }, + required: { + type: "boolean", + description: 'Determines whether this parameter is mandatory. If the parameter location is "path", this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.' + }, + deprecated: { + type: "boolean", + description: "Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is false." + }, + allowEmptyValue: { + type: "boolean", + description: "Sets the ability to pass empty-valued parameters. This is valid only for query parameters and allows sending a parameter with an empty value. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision." + }, + style: { + enum: ["form", "simple", "label", "matrix", "spaceDelimited", "pipeDelimited", "deepObject"], + description: "Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of in): for query - form; for path - simple; for header - simple; for cookie - form." + }, + explode: { + type: "boolean", + description: "When this is true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When style is form, the default value is true. For all other styles, the default value is false." + }, + allowReserved: { + type: "boolean", + description: `Determines whether the parameter value SHOULD allow reserved characters, as defined by RFC3986 :/?#[]@!$&'()*+,;= to be included without percent-encoding. This property only applies to parameters with an in value of query. The default value is false.` + }, + schema: "Schema", + example: { isExample: true }, + examples: "ExamplesMap", + content: "MediaTypesMap" + }, + required: ["name", "in"], + requiredOneOf: ["schema", "content"], + extensionsPrefix: "x-", + description: "Describes a request parameter, which excludes the request body. A unique parameter is defined by a unique combination of the name and in values.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/parameter" + }; + Operation2 = { + properties: { + tags: { + type: "array", + items: { type: "string" }, + description: "A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier." + }, + summary: { + type: "string", + description: "A short summary of what the operation does.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/operation#summary" + }, + description: { + type: "string", + description: "A verbose explanation of the operation behavior.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/operation#description" + }, + externalDocs: "ExternalDocs", + operationId: { + type: "string", + description: "Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/operation#operationid" + }, + parameters: "ParameterList", + security: "SecurityRequirementList", + servers: "ServerList", + requestBody: "RequestBody", + responses: "Responses", + deprecated: { type: "boolean" }, + callbacks: "CallbacksMap", + "x-codeSamples": "XCodeSampleList", + "x-code-samples": "XCodeSampleList", + // deprecated + "x-hideTryItPanel": { type: "boolean" } + }, + required: ["responses"], + extensionsPrefix: "x-", + description: `The Operation Object describes a single API operation on a path, including its parameters, responses, and request body (if applicable). Each path can support more than one operation, but those operations must be unique. A unique operation is a combination of a path and an HTTP method, so two GET or two POST methods for the same path are not allowed.`, + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/operation" + }; + XCodeSample2 = { + properties: { + lang: { type: "string" }, + label: { type: "string" }, + source: { type: "string" } + }, + documentationLink: "https://redocly.com/docs/realm/content/api-docs/openapi-extensions/x-code-samples", + description: "Code samples are snippets of code shown alongside API operations in reference documentation, giving users a quick way to start to interact with an API from their own code. The x-codeSamples addition to OpenAPI allows you to add or override any existing code samples for a particular language or endpoint." + }; + RequestBody = { + properties: { + description: { + type: "string", + description: "A brief description of the request body. This could contain examples of use." + }, + required: { + type: "boolean", + description: "Determines if the request body is required in the request. Defaults to false." + }, + content: "MediaTypesMap" + }, + required: ["content"], + extensionsPrefix: "x-", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/request-body", + description: "The request body is defined inside of operations (including paths and webhooks). The request body can also be defined inside of the named requestBodies object in components." + }; + MediaTypesMap = { + properties: {}, + additionalProperties: "MediaType", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/media-type#types" + }; + MediaType = { + properties: { + schema: "Schema", + example: { + isExample: true, + description: "Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema." + }, + examples: "ExamplesMap", + encoding: "EncodingMap" + }, + extensionsPrefix: "x-", + description: "The Media Type Object is one of the important building blocks of OpenAPI.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/media-type" + }; + Example2 = { + properties: { + value: { + resolvable: false, + description: "Embedded literal example. The value field and externalValue field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary." + }, + summary: { type: "string" }, + description: { type: "string", description: "Long description for the example." }, + externalValue: { + type: "string", + description: "A URL that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The value field and externalValue field are mutually exclusive." + } + }, + extensionsPrefix: "x-", + description: "Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/example" + }; + Encoding = { + properties: { + contentType: { + type: "string", + description: `The Content-Type for encoding a specific property. Default value depends on the property type: for string with format being binary \u2013 application/octet-stream; for other primitive types \u2013 text/plain; for object - application/json; for array \u2013 the default is defined based on the inner type. The value can be a specific media type (e.g. application/json), a wildcard media type (e.g. image/*), or a comma-separated list of the two types.` + }, + headers: "HeadersMap", + style: { + enum: ["form", "simple", "label", "matrix", "spaceDelimited", "pipeDelimited", "deepObject"], + description: "Describes how a specific property value will be serialized depending on its type. See Parameter Object for details on the style property. The behavior follows the same values as query parameters, including default values. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded." + }, + explode: { + type: "boolean", + description: "When this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When style is form, the default value is true. For all other styles, the default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded." + }, + allowReserved: { + type: "boolean", + description: `Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986] Section 2.2 :/?#[]@!$&'()*+,;= to be included without percent-encoding. The default value is false. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.` + } + }, + extensionsPrefix: "x-", + description: "A single encoding definition applied to a single schema property.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/encoding#types" + }; + EnumDescriptions2 = { + properties: {}, + additionalProperties: { type: "string" }, + description: 'The enum (short for "enumeration") fields in OpenAPI allow you to restrict the value of a field to a list of allowed values. These values need to be short and machine-readable, but that can make them harder for humans to parse and work with.', + documentationLink: "https://redocly.com/docs/realm/content/api-docs/openapi-extensions/x-enum-descriptions" + }; + Header2 = { + properties: { + description: { + type: "string", + description: "A brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation." + }, + required: { + type: "boolean", + description: "Determines whether this parameter is mandatory. Its default value is false." + }, + deprecated: { type: "boolean" }, + allowEmptyValue: { + type: "boolean", + description: "Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is false." + }, + style: { + enum: ["form", "simple", "label", "matrix", "spaceDelimited", "pipeDelimited", "deepObject"] + }, + explode: { type: "boolean" }, + allowReserved: { type: "boolean" }, + schema: "Schema", + example: { + isExample: true, + description: `Example of the header's potential value. The example SHOULD match the specified schema and encoding properties if present. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema that contains an example, the example value SHALL override the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary.` + }, + examples: "ExamplesMap", + content: "MediaTypesMap" + }, + requiredOneOf: ["schema", "content"], + extensionsPrefix: "x-", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/header#header-object", + description: "The header object is used to describe a response header in the headers map." + }; + Responses2 = { + properties: { default: "Response" }, + additionalProperties: (_v, key) => responseCodeRegexp2.test(key) ? "Response" : void 0, + description: "The list of possible responses as they are returned from executing this operation.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/named-responses" + }; + Response2 = { + properties: { + description: { type: "string" }, + headers: "HeadersMap", + content: "MediaTypesMap", + links: "LinksMap", + "x-summary": { + type: "string", + documentationLink: "https://redocly.com/docs/realm/content/api-docs/openapi-extensions/x-summary#openapi-extension-x-summary", + description: "Use x-summary to add a short custom text to describe the response in the API documentation." + } + }, + required: ["description"], + extensionsPrefix: "x-", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/response", + description: "The response object describes a single response in the Responses Map." + }; + Link = { + properties: { + operationRef: { + type: "string", + description: "A relative or absolute reference to an OAS operation. This field is mutually exclusive of the operationId field, and MUST point to an Operation Object. Relative operationRef values MAY be used to locate an existing Operation Object in the OpenAPI definition." + }, + operationId: { + type: "string", + description: "The name of an existing, resolvable OAS operation, as defined with a unique operationId. This field is mutually exclusive of the operationRef field." + }, + parameters: null, + // TODO: figure out how to describe/validate this + requestBody: null, + // TODO: figure out how to describe/validate this + description: { type: "string", description: "A description of the link." }, + server: "Server" + }, + extensionsPrefix: "x-", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/links", + description: "The Link object represents a possible design-time link for a response. The presence of a link does not guarantee the caller\u2019s ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations." + }; + Schema2 = { + properties: { + externalDocs: "ExternalDocs", + discriminator: "Discriminator", + title: { + type: "string", + description: "Value MUST be a string. Multiple types via an array are not supported." + }, + multipleOf: { type: "number", minimum: 0 }, + maximum: { type: "number" }, + minimum: { type: "number" }, + exclusiveMaximum: { type: "boolean" }, + exclusiveMinimum: { type: "boolean" }, + maxLength: { type: "integer", minimum: 0 }, + minLength: { type: "integer", minimum: 0 }, + pattern: { + type: "string", + description: "(This string SHOULD be a valid regular expression, according to the Ecma-262 Edition 5.1 regular expression dialect)" + }, + maxItems: { type: "integer", minimum: 0 }, + minItems: { type: "integer", minimum: 0 }, + uniqueItems: { type: "boolean" }, + maxProperties: { type: "integer", minimum: 0 }, + minProperties: { type: "integer", minimum: 0 }, + required: { type: "array", items: { type: "string" } }, + enum: { type: "array" }, + type: { + enum: ["object", "array", "string", "number", "integer", "boolean"], + description: "Value MUST be a string. Multiple types via an array are not supported." + }, + allOf: listOf("Schema", { + description: "Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema." + }), + anyOf: listOf("Schema", { + description: "Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema." + }), + oneOf: listOf("Schema", { + description: "Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema." + }), + not: "Schema", + properties: "SchemaProperties", + items: (value) => { + if (Array.isArray(value)) { + return listOf("Schema"); + } else { + return "Schema"; + } + }, + additionalProperties: (value) => { + if (typeof value === "boolean") { + return { type: "boolean" }; + } else { + return "Schema"; + } + }, + description: { + type: "string", + description: "CommonMark syntax MAY be used for rich text representation." + }, + format: { + type: "string", + description: `See Data Type Formats for further details. While relying on JSON Schema's defined formats, the OAS offers a few additional predefined formats.` + }, + default: null, + nullable: { type: "boolean" }, + readOnly: { type: "boolean" }, + writeOnly: { type: "boolean" }, + xml: "Xml", + example: { isExample: true }, + deprecated: { type: "boolean" }, + "x-tags": { type: "array", items: { type: "string" } }, + "x-additionalPropertiesName": { type: "string" }, + "x-explicitMappingOnly": { type: "boolean" } + }, + extensionsPrefix: "x-", + description: "The schema defining the content of the request, response, or parameter.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/schemas" + }; + Xml2 = { + properties: { + name: { type: "string" }, + namespace: { type: "string" }, + prefix: { type: "string" }, + attribute: { type: "boolean" }, + wrapped: { type: "boolean" } + }, + extensionsPrefix: "x-", + description: "This MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property." + }; + SchemaProperties2 = { + properties: {}, + additionalProperties: "Schema" + }; + DiscriminatorMapping = { + properties: {}, + additionalProperties: (value) => { + if (typeof value === "string" && isMappingRef(value)) { + return { type: "string", directResolveAs: "Schema" }; } else { - node.middle = new TstNode(key, value, index) - break + return { type: "string" }; } - } else if (node.code < code) { - if (node.left !== null) { - node = node.left - } else { - node.left = new TstNode(key, value, index) - break + }, + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/discriminator#types" + }; + Discriminator = { + properties: { + propertyName: { + type: "string", + description: "REQUIRED. The name of the property in the payload that will hold the discriminator value." + }, + mapping: "DiscriminatorMapping" + }, + required: ["propertyName"], + extensionsPrefix: "x-", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/discriminator#discriminator-object", + description: "When request bodies or response payloads may be one of a number of different schemas, a discriminator object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the document of an alternative schema based on the value associated with it." + }; + Components = { + properties: { + parameters: "NamedParameters", + schemas: "NamedSchemas", + responses: "NamedResponses", + examples: "NamedExamples", + requestBodies: "NamedRequestBodies", + headers: "NamedHeaders", + securitySchemes: "NamedSecuritySchemes", + links: "NamedLinks", + callbacks: "NamedCallbacks" + }, + extensionsPrefix: "x-", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/components#components" + }; + ImplicitFlow = { + properties: { + refreshUrl: { type: "string" }, + scopes: { type: "object", additionalProperties: { type: "string" } }, + // TODO: validate scopes + authorizationUrl: { type: "string" } + }, + required: ["authorizationUrl", "scopes"], + extensionsPrefix: "x-", + description: "Configuration for the OAuth Implicit flow." + }; + PasswordFlow = { + properties: { + refreshUrl: { type: "string" }, + scopes: { type: "object", additionalProperties: { type: "string" } }, + // TODO: validate scopes + tokenUrl: { type: "string" } + }, + required: ["tokenUrl", "scopes"], + extensionsPrefix: "x-", + description: "Object Configuration for the OAuth Resource Owner Password flow." + }; + ClientCredentials = { + properties: { + refreshUrl: { type: "string" }, + scopes: { type: "object", additionalProperties: { type: "string" } }, + // TODO: validate scopes + tokenUrl: { type: "string" } + }, + required: ["tokenUrl", "scopes"], + extensionsPrefix: "x-", + description: "Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0." + }; + AuthorizationCode = { + properties: { + refreshUrl: { type: "string" }, + authorizationUrl: { type: "string" }, + scopes: { type: "object", additionalProperties: { type: "string" } }, + // TODO: validate scopes + tokenUrl: { type: "string" }, + "x-usePkce": (value) => { + if (typeof value === "boolean") { + return { type: "boolean" }; + } else { + return "XUsePkce"; + } } - } else if (node.right !== null) { - node = node.right - } else { - node.right = new TstNode(key, value, index) - break - } - } + }, + required: ["authorizationUrl", "tokenUrl", "scopes"], + extensionsPrefix: "x-", + description: "Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0." + }; + OAuth2Flows = { + properties: { + implicit: "ImplicitFlow", + password: "PasswordFlow", + clientCredentials: "ClientCredentials", + authorizationCode: "AuthorizationCode" + }, + extensionsPrefix: "x-", + description: "Configuration details for a supported OAuth Flow." + }; + SecurityScheme2 = { + properties: { + type: { + enum: ["apiKey", "http", "oauth2", "openIdConnect"], + description: 'REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "oauth2", "openIdConnect".' + }, + description: { + type: "string", + description: "A short description for security scheme." + }, + name: { + type: "string", + description: "REQUIRED. The name of the header, query or cookie parameter to be used." + }, + in: { + type: "string", + enum: ["query", "header", "cookie"], + description: 'REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie".' + }, + scheme: { + type: "string", + description: "A short description for security scheme." + }, + bearerFormat: { + type: "string", + description: "A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes." + }, + flows: "OAuth2Flows", + openIdConnectUrl: { + type: "string", + description: "REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL." + }, + "x-defaultClientId": { type: "string" } + }, + required(value) { + switch (value?.type) { + case "apiKey": + return ["type", "name", "in"]; + case "http": + return ["type", "scheme"]; + case "oauth2": + return ["type", "flows"]; + case "openIdConnect": + return ["type", "openIdConnectUrl"]; + default: + return ["type"]; + } + }, + allowed(value) { + switch (value?.type) { + case "apiKey": + return ["type", "name", "in", "description"]; + case "http": + return ["type", "scheme", "bearerFormat", "description"]; + case "oauth2": + return ["type", "flows", "description"]; + case "openIdConnect": + return ["type", "openIdConnectUrl", "description"]; + default: + return ["type", "description"]; + } + }, + extensionsPrefix: "x-" + }; + XUsePkce = { + properties: { + disableManualConfiguration: { type: "boolean" }, + hideClientSecretInput: { type: "boolean" } + }, + description: "The x-usePkce allows you to enable Proof Key for Code Exchange (PKCE) for the Oauth2 or OpenID Connect authorization code flow in the Replay.", + documentationLink: "https://redocly.com/docs/realm/content/api-docs/openapi-extensions/x-use-pkce#openapi-extension-x-usepkce" + }; + Oas3Types = { + Root: Root2, + Tag: Tag2, + TagList: listOf("Tag", { + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/tags", + description: `A list of tags used by the document with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique.` + }), + TagGroups: listOf("TagGroup"), + TagGroup: TagGroup2, + ExternalDocs: ExternalDocs2, + Server, + ServerList: listOf("Server", { + description: "A list of servers available to the API.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/servers#servers" + }), + ServerVariable, + ServerVariablesMap: mapOf("ServerVariable", { + description: `A map between a variable name and its value. The value is used for substitution in the server's URL template.` + }), + SecurityRequirement: SecurityRequirement2, + SecurityRequirementList: listOf("SecurityRequirement"), + Info: Info2, + Contact: Contact2, + License: License2, + Paths: Paths2, + PathItem: PathItem2, + Parameter: Parameter2, + ParameterList: listOf("Parameter", { + description: "A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object\u2019s components/parameters." + }), + Operation: Operation2, + Callback: mapOf("PathItem", { + description: "https://redocly.com/learn/openapi/openapi-visual-reference/callbacks#callback-object" + }), + CallbacksMap: mapOf("Callback"), + RequestBody, + MediaTypesMap, + MediaType, + Example: Example2, + ExamplesMap: mapOf("Example"), + Encoding, + EncodingMap: mapOf("Encoding"), + EnumDescriptions: EnumDescriptions2, + Header: Header2, + HeadersMap: mapOf("Header"), + Responses: Responses2, + Response: Response2, + Link, + Logo: Logo2, + Schema: Schema2, + Xml: Xml2, + SchemaProperties: SchemaProperties2, + DiscriminatorMapping, + Discriminator, + Components, + LinksMap: mapOf("Link"), + NamedSchemas: mapOf("Schema"), + NamedResponses: mapOf("Response"), + NamedParameters: mapOf("Parameter"), + NamedExamples: mapOf("Example"), + NamedRequestBodies: mapOf("RequestBody"), + NamedHeaders: mapOf("Header"), + NamedSecuritySchemes: mapOf("SecurityScheme"), + NamedLinks: mapOf("Link"), + NamedCallbacks: mapOf("Callback"), + ImplicitFlow, + PasswordFlow, + ClientCredentials, + AuthorizationCode, + OAuth2Flows, + SecurityScheme: SecurityScheme2, + XCodeSample: XCodeSample2, + XCodeSampleList: listOf("XCodeSample"), + XUsePkce, + WebhooksMap + }; } +}); - /** - * @param {Uint8Array} key - * @returns {TstNode | null} - */ - search (key) { - const keylength = key.length - let index = 0 - /** - * @type {TstNode|null} - */ - 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 +// node_modules/@redocly/openapi-core/lib/types/oas3_1.js +var Root3, License3, Info3, Components2, Operation3, Schema3, SchemaProperties3, SecurityScheme3, DependentRequired, Oas3_1Types; +var init_oas3_1 = __esm({ + "node_modules/@redocly/openapi-core/lib/types/oas3_1.js"() { + init_types(); + init_oas3(); + Root3 = { + properties: { + openapi: null, + info: "Info", + servers: "ServerList", + security: "SecurityRequirementList", + tags: "TagList", + externalDocs: "ExternalDocs", + paths: "Paths", + webhooks: "WebhooksMap", + components: "Components", + jsonSchemaDialect: { + type: "string", + description: "The default value for the $schema keyword within Schema Objects contained within this OAS document. This MUST be in the form of a URI." + } + }, + required: ["openapi", "info"], + requiredOneOf: ["paths", "components", "webhooks"], + extensionsPrefix: "x-", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/openapi#openapi", + description: "REQUIRED. This string MUST be the semantic version number of the OpenAPI Specification version that the OpenAPI document uses. The openapi field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is not related to the API info.version string." + }; + License3 = { + ...Oas3Types.License, + properties: { + ...Oas3Types.License.properties, + identifier: { + type: "string", + description: "An [SPDX-Licenses] expression for the API. The identifier field is mutually exclusive of the url field." + } } - while (node !== null) { - if (code === node.code) { - if (keylength === ++index) { - // Returns Node since it is the last key. - return node - } - node = node.middle - break + }; + Info3 = { + ...Oas3Types.Info, + properties: { + ...Oas3Types.Info.properties, + summary: { + type: "string", + description: "A short summary of the API. This field MAY be used by tooling as required." } - node = node.code < code ? node.left : node.right } - } - return null - } -} - -class TernarySearchTree { - /** @type {TstNode | null} */ - node = null - - /** - * @param {string} key - * @param {any} value - * @returns {void} - * */ - insert (key, value) { - if (this.node === null) { - this.node = new TstNode(key, value, 0) - } else { - this.node.add(key, value) - } - } - - /** - * @param {Uint8Array} key - * @returns {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 -} - - -/***/ }), - -/***/ 83983: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(98061) -const { kDestroyed, kBodyUsed, kListeners, kBody } = __nccwpck_require__(72785) -const { IncomingMessage } = __nccwpck_require__(88849) -const stream = __nccwpck_require__(84492) -const net = __nccwpck_require__(87503) -const { stringify } = __nccwpck_require__(39630) -const { EventEmitter: EE } = __nccwpck_require__(15673) -const timers = __nccwpck_require__(85194) -const { InvalidArgumentError, ConnectTimeoutError } = __nccwpck_require__(48045) -const { headerNameLowerCasedRecord } = __nccwpck_require__(14462) -const { tree } = __nccwpck_require__(57506) - -const [nodeMajor, nodeMinor] = process.versions.node.split('.', 2).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 noop () {} - -/** - * @param {*} body - * @returns {*} - */ -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 && isFormDataLike(body)) { - return 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 - } -} - -/** - * @param {*} obj - * @returns {obj is import('node:stream').Stream} - */ -function isStream (obj) { - return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function' -} - -/** - * @param {*} object - * @returns {object is Blob} - * 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') - ) - } -} - -/** - * @param {string} url The path to check for query strings or fragments. - * @returns {boolean} Returns true if the path contains a query string or fragment. - */ -function pathHasQueryOrFragment (url) { - return ( - url.includes('?') || - url.includes('#') - ) -} - -/** - * @param {string} url The URL to add the query params to - * @param {import('node:querystring').ParsedUrlQueryInput} queryParams The object to serialize into a URL query string - * @returns {string} The URL with the query params added - */ -function serializePathWithQuery (url, queryParams) { - if (pathHasQueryOrFragment(url)) { - throw new Error('Query params cannot be passed when url already contains "?" or "#".') - } - - const stringified = stringify(queryParams) - - if (stringified) { - url += '?' + stringified - } - - return url -} - -/** - * @param {number|string|undefined} port - * @returns {boolean} - */ -function isValidPort (port) { - const value = parseInt(port, 10) - return ( - value === Number(port) && - value >= 0 && - value <= 65535 - ) -} - -/** - * Check if the value is a valid http or https prefixed string. - * - * @param {string} value - * @returns {boolean} - */ -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] === ':' - ) - ) - ) -} - -/** - * @param {string|URL|Record} url - * @returns {URL} - */ -function parseURL (url) { - if (typeof url === 'string') { - /** - * @type {URL} - */ - 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 -} - -/** - * @param {string|URL|Record} url - * @returns {URL} - */ -function parseOrigin (url) { - url = parseURL(url) - - if (url.pathname !== '/' || url.search || url.hash) { - throw new InvalidArgumentError('invalid url') - } - - return url -} - -/** - * @param {string} host - * @returns {string} - */ -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 - * @param {string|null} host - * @returns {string|null} - */ -function getServerName (host) { - if (!host) { - return null - } - - assert(typeof host === 'string') - - const servername = getHostname(host) - if (net.isIP(servername)) { - return '' - } - - return servername -} - -/** - * @function - * @template T - * @param {T} obj - * @returns {T} - */ -function deepClone (obj) { - return JSON.parse(JSON.stringify(obj)) -} - -/** - * @param {*} obj - * @returns {obj is AsyncIterable} - */ -function isAsyncIterable (obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function') -} - -/** - * @param {*} obj - * @returns {obj is Iterable} - */ -function isIterable (obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function')) -} - -/** - * Checks whether an object has a safe Symbol.iterator — i.e. one that is - * either own or inherited from a non-Object.prototype chain. This prevents - * prototype-pollution attacks from injecting a fake iterator on - * Object.prototype. - * @param {object} obj - * @returns {boolean} - */ -function hasSafeIterator (obj) { - const prototype = Object.getPrototypeOf(obj) - const ownIterator = Object.prototype.hasOwnProperty.call(obj, Symbol.iterator) - return ownIterator || (prototype != null && prototype !== Object.prototype && typeof obj[Symbol.iterator] === 'function') -} - -/** - * @param {Blob|Buffer|import ('stream').Stream} body - * @returns {number|null} - */ -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 -} - -/** - * @param {import ('stream').Stream} body - * @returns {boolean} - */ -function isDestroyed (body) { - return body && !!(body.destroyed || body[kDestroyed] || (stream.isDestroyed?.(body))) -} - -/** - * @param {import ('stream').Stream} stream - * @param {Error} [err] - * @returns {void} - */ -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+)/ -/** - * @param {string} val - * @returns {number | null} - */ -function parseKeepAliveTimeout (val) { - const m = val.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 {(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 !== undefined) { - if (!Object.hasOwn(obj, key)) { - const headersValue = typeof headers[i + 1] === 'string' - ? headers[i + 1] - : Array.isArray(headers[i + 1]) - ? headers[i + 1].map(x => x.toString('latin1')) - : headers[i + 1].toString('latin1') - - if (key === '__proto__') { - Object.defineProperty(obj, key, { - value: headersValue, - enumerable: true, - configurable: true, - writable: true - }) + }; + Components2 = { + ...Oas3Types.Components, + properties: { + ...Oas3Types.Components.properties, + pathItems: "NamedPathItems" + } + }; + Operation3 = { + properties: { + tags: { + type: "array", + items: { type: "string" }, + description: "A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier." + }, + summary: { + type: "string", + description: "A short summary of what the operation does.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/operation#summary" + }, + description: { + type: "string", + description: "A verbose explanation of the operation behavior.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/operation#description" + }, + externalDocs: "ExternalDocs", + operationId: { + type: "string", + description: "Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive.", + documentationLink: "https://redocly.com/learn/openapi/openapi-visual-reference/operation#operationid" + }, + parameters: "ParameterList", + security: "SecurityRequirementList", + servers: "ServerList", + requestBody: "RequestBody", + responses: "Responses", + deprecated: { type: "boolean" }, + callbacks: "CallbacksMap", + "x-codeSamples": "XCodeSampleList", + "x-code-samples": "XCodeSampleList", + // deprecated + "x-hideTryItPanel": { type: "boolean" } + }, + extensionsPrefix: "x-", + description: `The Operation Object describes a single API operation on a path, including its parameters, responses, and request body (if applicable). Each path can support more than one operation, but those operations must be unique. A unique operation is a combination of a path and an HTTP method, so two GET or two POST methods for the same path are not allowed.` + }; + Schema3 = { + properties: { + $id: { type: "string" }, + $anchor: { type: "string" }, + id: { type: "string" }, + $schema: { type: "string" }, + definitions: "NamedSchemas", + $defs: "NamedSchemas", + $vocabulary: { type: "string" }, + externalDocs: "ExternalDocs", + discriminator: "Discriminator", + title: { type: "string" }, + multipleOf: { type: "number", minimum: 0 }, + maximum: { type: "number" }, + minimum: { type: "number" }, + exclusiveMaximum: { type: "number" }, + exclusiveMinimum: { type: "number" }, + maxLength: { type: "integer", minimum: 0 }, + minLength: { type: "integer", minimum: 0 }, + pattern: { type: "string" }, + maxItems: { type: "integer", minimum: 0 }, + minItems: { type: "integer", minimum: 0 }, + uniqueItems: { type: "boolean" }, + maxProperties: { type: "integer", minimum: 0 }, + minProperties: { type: "integer", minimum: 0 }, + required: { type: "array", items: { type: "string" } }, + enum: { type: "array" }, + type: (value) => { + if (Array.isArray(value)) { + return { + type: "array", + items: { enum: ["object", "array", "string", "number", "integer", "boolean", "null"] } + }; + } else { + return { + enum: ["object", "array", "string", "number", "integer", "boolean", "null"] + }; + } + }, + allOf: listOf("Schema"), + anyOf: listOf("Schema"), + oneOf: listOf("Schema"), + not: "Schema", + if: "Schema", + then: "Schema", + else: "Schema", + dependentSchemas: mapOf("Schema"), + dependentRequired: "DependentRequired", + prefixItems: listOf("Schema"), + contains: "Schema", + minContains: { type: "integer", minimum: 0 }, + maxContains: { type: "integer", minimum: 0 }, + patternProperties: "PatternProperties", + propertyNames: "Schema", + unevaluatedItems: (value) => { + if (typeof value === "boolean") { + return { type: "boolean" }; + } else { + return "Schema"; + } + }, + unevaluatedProperties: (value) => { + if (typeof value === "boolean") { + return { type: "boolean" }; + } else { + return "Schema"; + } + }, + summary: { type: "string" }, + properties: "SchemaProperties", + items: (value) => { + if (typeof value === "boolean") { + return { type: "boolean" }; + } else { + return "Schema"; + } + }, + additionalProperties: (value) => { + return typeof value === "boolean" ? { type: "boolean" } : "Schema"; + }, + description: { type: "string" }, + format: { type: "string" }, + contentEncoding: { type: "string" }, + contentMediaType: { type: "string" }, + contentSchema: "Schema", + default: null, + readOnly: { type: "boolean" }, + writeOnly: { type: "boolean" }, + xml: "Xml", + examples: { type: "array" }, + example: { isExample: true }, + deprecated: { type: "boolean" }, + const: null, + $comment: { type: "string" }, + "x-tags": { type: "array", items: { type: "string" } }, + $dynamicAnchor: { type: "string" }, + $dynamicRef: { type: "string" } + }, + extensionsPrefix: "x-" + }; + SchemaProperties3 = { + properties: {}, + additionalProperties: (value) => { + if (typeof value === "boolean") { + return { type: "boolean" }; } else { - obj[key] = headersValue - } - } else { - if (typeof val === 'string') { - val = [val] - obj[key] = val + return "Schema"; } - val.push(headers[i + 1].toString('latin1')) } - } else { - const headersValue = typeof headers[i + 1] === 'string' - ? headers[i + 1] - : Array.isArray(headers[i + 1]) - ? headers[i + 1].map(x => x.toString('latin1')) - : headers[i + 1].toString('latin1') - - obj[key] = headersValue - } - } - - return obj -} - -/** - * @param {Buffer[]} headers - * @returns {string[]} - */ -function parseRawHeaders (headers) { - const headersLength = headers.length - /** - * @type {string[]} - */ - const ret = new Array(headersLength) - - let key - let val - - for (let n = 0; n < headersLength; n += 2) { - key = headers[n] - val = headers[n + 1] - - typeof key !== 'string' && (key = key.toString()) - typeof val !== 'string' && (val = val.toString('latin1')) - - ret[n] = key - ret[n + 1] = val - } - - return ret -} - -/** - * @param {string[]} headers - * @param {Buffer[]} headers - */ -function encodeRawHeaders (headers) { - if (!Array.isArray(headers)) { - throw new TypeError('expected headers to be an array') - } - return headers.map(x => Buffer.from(x)) -} - -/** - * @param {*} buffer - * @returns {buffer is Buffer} - */ -function isBuffer (buffer) { - // See, https://github.com/mcollina/undici/pull/319 - return buffer instanceof Uint8Array || Buffer.isBuffer(buffer) -} - -/** - * Asserts that the handler object is a request handler. - * - * @param {object} handler - * @param {string} method - * @param {string} [upgrade] - * @returns {asserts handler is import('../api/api-request').RequestHandler} - */ -function assertRequestHandler (handler, method, upgrade) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } - - if (typeof handler.onRequestStart === 'function') { - // TODO (fix): More checks... - return - } - - 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') + }; + SecurityScheme3 = { + properties: { + type: { enum: ["apiKey", "http", "oauth2", "openIdConnect", "mutualTLS"] }, + description: { type: "string" }, + name: { type: "string" }, + in: { type: "string", enum: ["query", "header", "cookie"] }, + scheme: { type: "string" }, + bearerFormat: { type: "string" }, + flows: "OAuth2Flows", + openIdConnectUrl: { type: "string" } + }, + required(value) { + switch (value?.type) { + case "apiKey": + return ["type", "name", "in"]; + case "http": + return ["type", "scheme"]; + case "oauth2": + return ["type", "flows"]; + case "openIdConnect": + return ["type", "openIdConnectUrl"]; + default: + return ["type"]; + } + }, + allowed(value) { + switch (value?.type) { + case "apiKey": + return ["type", "name", "in", "description"]; + case "http": + return ["type", "scheme", "bearerFormat", "description"]; + case "oauth2": + switch (value?.flows) { + case "implicit": + return ["type", "flows", "authorizationUrl", "refreshUrl", "description", "scopes"]; + case "password": + case "clientCredentials": + return ["type", "flows", "tokenUrl", "refreshUrl", "description", "scopes"]; + case "authorizationCode": + return [ + "type", + "flows", + "authorizationUrl", + "refreshUrl", + "tokenUrl", + "description", + "scopes" + ]; + default: + return [ + "type", + "flows", + "authorizationUrl", + "refreshUrl", + "tokenUrl", + "description", + "scopes" + ]; + } + case "openIdConnect": + return ["type", "openIdConnectUrl", "description"]; + case "mutualTLS": + return ["type", "description"]; + default: + return ["type", "description"]; + } + }, + extensionsPrefix: "x-" + }; + DependentRequired = { + properties: {}, + additionalProperties: { type: "array", items: { type: "string" } } + }; + Oas3_1Types = { + ...Oas3Types, + Info: Info3, + Root: Root3, + Schema: Schema3, + SchemaProperties: SchemaProperties3, + PatternProperties: SchemaProperties3, + License: License3, + Components: Components2, + NamedPathItems: mapOf("PathItem"), + SecurityScheme: SecurityScheme3, + Operation: Operation3, + DependentRequired + }; } +}); - 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') - } +// node_modules/@redocly/openapi-core/lib/types/oas3_2.js +var Root4, Tag3, Server2, SecurityScheme4, OAuth2Flows2, DeviceAuthorization, PathItem3, Parameter3, Response3, MediaType2, Discriminator2, Components3, Example3, Xml3, Schema4, Oas3_2Types; +var init_oas3_2 = __esm({ + "node_modules/@redocly/openapi-core/lib/types/oas3_2.js"() { + init_ref_utils(); + init_types(); + init_oas3(); + init_oas3_1(); + Root4 = { + ...Oas3_1Types.Root, + properties: { + ...Oas3_1Types.Root.properties, + $self: { + type: "string", + description: "This string MUST be in the form of a URI reference as defined by [RFC3986] Section 4.1. The $self field provides the self-assigned URI of this document, which also serves as its base URI in accordance with [RFC3986] Section 5.1.1. Implementations MUST support identifying the targets of API description URIs using the URI defined by this field when it is present. See Establishing the Base URI for the base URI behavior when $self is absent or relative, and see Appendix F for examples of using $self to resolve references." + } + } + }; + Tag3 = { + ...Oas3_1Types.Tag, + properties: { + ...Oas3_1Types.Tag.properties, + kind: { + type: "string", + description: "A machine-readable string to categorize what sort of tag it is. Any string value can be used; common uses are nav for Navigation, badge for visible badges, audience for APIs used by different groups. A registry of the most commonly used values is available." + }, + parent: { + type: "string", + description: "The name of a tag that this tag is nested under. The named tag MUST exist in the API description, and circular references between parent and child tags MUST NOT be used." + }, + summary: { + type: "string", + description: "A short summary of the tag, used for display purposes." + } + }, + description: "Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances." + }; + Server2 = { + ...Oas3_1Types.Server, + properties: { + ...Oas3_1Types.Server.properties, + name: { + type: "string", + description: "An optional unique string to refer to the host designated by the URL." + } + }, + description: "An object representing a Server." + }; + SecurityScheme4 = { + ...Oas3_1Types.SecurityScheme, + properties: { + ...Oas3_1Types.SecurityScheme.properties, + deprecated: { + type: "boolean", + description: "Declares this security scheme to be deprecated. Consumers SHOULD refrain from usage of the declared scheme. Default value is false." + }, + // added in OAS 3.2 + oauth2MetadataUrl: { + type: "string", + description: "URL to the OAuth2 authorization server metadata [RFC8414]. TLS is required." + } + // added in OAS 3.2 + }, + allowed(value) { + switch (value?.type) { + case "apiKey": + return [ + "type", + "name", + "in", + "description", + "deprecated" + // added in OAS 3.2 + ]; + case "http": + return [ + "type", + "scheme", + "bearerFormat", + "description", + "deprecated" + // added in OAS 3.2 + ]; + case "oauth2": + switch (value?.flows) { + case "implicit": + return [ + "type", + "flows", + "authorizationUrl", + "refreshUrl", + "description", + "scopes", + "oauth2MetadataUrl", + // added in OAS 3.2 + "deprecated" + // added in OAS 3.2 + ]; + case "password": + case "clientCredentials": + return [ + "type", + "flows", + "tokenUrl", + "refreshUrl", + "description", + "scopes", + "oauth2MetadataUrl", + // added in OAS 3.2 + "deprecated" + // added in OAS 3.2 + ]; + case "authorizationCode": + return [ + "type", + "flows", + "authorizationUrl", + "refreshUrl", + "tokenUrl", + "description", + "scopes", + "oauth2MetadataUrl", + // added in OAS 3.2 + "deprecated" + // added in OAS 3.2 + ]; + case "deviceAuthorization": + return ["type", "flows", "deviceAuthorizationUrl", "tokenUrl"]; + default: + return [ + "type", + "flows", + "authorizationUrl", + "refreshUrl", + "tokenUrl", + "description", + "scopes", + "oauth2MetadataUrl", + // added in OAS 3.2 + "deprecated" + // added in OAS 3.2 + ]; + } + case "openIdConnect": + return [ + "type", + "openIdConnectUrl", + "description", + "deprecated" + // added in OAS 3.2 + ]; + case "mutualTLS": + return [ + "type", + "description", + "deprecated" + // added in OAS 3.2 + ]; + default: + return [ + "type", + "description", + "deprecated" + // added in OAS 3.2 + ]; + } + }, + description: "Defines a security scheme that can be used by the operations." + }; + OAuth2Flows2 = { + ...Oas3_1Types.OAuth2Flows, + properties: { + ...Oas3_1Types.OAuth2Flows.properties, + deviceAuthorization: "DeviceAuthorization" + } + }; + DeviceAuthorization = { + properties: { + deviceAuthorizationUrl: { + type: "string", + description: "REQUIRED. The device authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS." + }, + tokenUrl: { + type: "string", + description: "REQUIRED. The token URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS." + }, + refreshUrl: { + type: "string", + description: "The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS." + }, + scopes: mapOf("string", { + description: "REQUIRED. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. The map MAY be empty." + }) + }, + required: ["deviceAuthorizationUrl", "tokenUrl", "scopes"], + extensionsPrefix: "x-", + description: "Configuration for the OAuth Device Authorization flow." + }; + PathItem3 = { + ...Oas3Types.PathItem, + properties: { + ...Oas3Types.PathItem.properties, + query: "Operation", + additionalOperations: mapOf("Operation") + } + }; + Parameter3 = { + ...Oas3_1Types.Parameter, + properties: { + ...Oas3_1Types.Parameter.properties, + in: { + description: 'REQUIRED. The location of the parameter. Possible values are "query", "querystring", "header", "path" or "cookie".', + enum: ["query", "header", "path", "cookie", "querystring"] + } + } + }; + Response3 = { + ...Oas3_1Types.Response, + properties: { + ...Oas3_1Types.Response.properties, + summary: { + type: "string", + description: "A short summary of the meaning of the response." + } + } + }; + MediaType2 = { + ...Oas3_1Types.MediaType, + properties: { + ...Oas3_1Types.MediaType.properties, + itemSchema: "Schema", + prefixEncoding: listOf("Encoding", { + description: "A map between a property name and its encoding information, as defined under Encoding By Name. The encoding field SHALL only apply when the media type is multipart or application/x-www-form-urlencoded. If no Encoding Object is provided for a property, the behavior is determined by the default values documented for the Encoding Object. This field MUST NOT be present if prefixEncoding or itemEncoding are present." + }), + itemEncoding: "Encoding" + } + }; + Discriminator2 = { + ...Oas3_1Types.Discriminator, + properties: { + ...Oas3_1Types.Discriminator.properties, + defaultMapping: (value) => { + const description = "The schema name or URI reference to a schema that is expected to validate the structure of the model when the discriminating property is not present in the payload or contains a value for which there is no explicit or implicit mapping."; + if (isMappingRef(value)) { + return { type: "string", directResolveAs: "Schema", description }; + } else { + return { type: "string", description }; + } + } + } + }; + Components3 = { + properties: { + ...Oas3_1Types.Components.properties, + mediaTypes: "NamedMediaTypes" + } + }; + Example3 = { + ...Oas3_1Types.Example, + properties: { + ...Oas3_1Types.Example.properties, + dataValue: { + resolvable: false, + description: "An example of the data structure that MUST be valid according to the relevant Schema Object. If this field is present, value MUST be absent." + }, + serializedValue: { + type: "string", + description: "An example of the serialized form of the value, including encoding and escaping as described under Validating Examples. If dataValue is present, then this field SHOULD contain the serialization of the given data. Otherwise, it SHOULD be the valid serialization of a data value that itself MUST be valid as described for dataValue. This field SHOULD NOT be used if the serialization format is JSON, as the data form is easier to work with. If this field is present, value, and externalValue MUST be absent." + } + } + }; + Xml3 = { + properties: { + nodeType: { + type: "string", + enum: ["element", "attribute", "text", "cdata", "none"], + description: 'One of element, attribute, text, cdata, or none, as explained under XML Node Types. The default value is none if $ref, $dynamicRef, or type: "array" is present in the Schema Object containing the XML Object, and element otherwise.' + }, + name: { + type: "string", + description: "Sets the name of the element/attribute corresponding to the schema, replacing the name that was inferred as described under XML Node Names. This field SHALL be ignored if the nodeType is text, cdata, or none." + }, + namespace: { + type: "string", + description: "The IRI ([RFC3987]) of the namespace definition. Value MUST be in the form of a non-relative IRI." + }, + prefix: { + type: "string", + description: "The prefix to be used for the name." + }, + attribute: { + type: "boolean", + description: 'Declares whether the property definition translates to an attribute instead of an element. Default value is false. If nodeType is present, this field MUST NOT be present.Deprecated: Use nodeType: "attribute" instead of attribute: true.' + }, + wrapped: { + type: "boolean", + description: 'MAY be used only for an array definition. Signifies whether the array is wrapped (for example, ) or unwrapped (). Default value is false. The definition takes effect only when defined alongside type being "array" (outside the items). If nodeType is present, this field MUST NOT be present. Deprecated: Use nodeType: "element" instead of wrapped: true.' + } + // Deprecated in OAS 3.2: Use nodeType: "element" instead + }, + extensionsPrefix: "x-", + description: "A metadata object that allows for more fine-tuned XML model definitions. When using a Schema Object with XML, if no XML Object is present, the behavior is determined by the XML Object\u2019s default field values." + }; + Schema4 = { + ...Oas3_1Types.Schema, + properties: { + ...Oas3_1Types.Schema.properties, + xml: "Xml" + } + }; + Oas3_2Types = { + ...Oas3_1Types, + Root: Root4, + Tag: Tag3, + Server: Server2, + SecurityScheme: SecurityScheme4, + OAuth2Flows: OAuth2Flows2, + DeviceAuthorization, + PathItem: PathItem3, + Parameter: Parameter3, + Response: Response3, + MediaType: MediaType2, + Discriminator: Discriminator2, + Example: Example3, + Xml: Xml3, + Schema: Schema4, + Components: Components3, + NamedMediaTypes: mapOf("MediaTypesMap") + }; } -} - -/** - * A body is disturbed if it has been read from and it cannot be re-used without - * losing state or data. - * @param {import('node:stream').Readable} body - * @returns {boolean} - */ -function isDisturbed (body) { - // TODO (fix): Why is body[kBodyUsed] needed? - return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])) -} +}); -/** - * @typedef {object} SocketInfo - * @property {string} [localAddress] - * @property {number} [localPort] - * @property {string} [remoteAddress] - * @property {number} [remotePort] - * @property {string} [remoteFamily] - * @property {number} [timeout] - * @property {number} bytesWritten - * @property {number} bytesRead - */ - -/** - * @param {import('net').Socket} socket - * @returns {SocketInfo} - */ -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 +// node_modules/@redocly/openapi-core/lib/types/json-schema-draft7.shared.js +var Schema5, SchemaProperties4, Dependencies, DiscriminatorMapping2, Discriminator3; +var init_json_schema_draft7_shared = __esm({ + "node_modules/@redocly/openapi-core/lib/types/json-schema-draft7.shared.js"() { + init_ref_utils(); + init_types(); + Schema5 = { + properties: { + $id: { type: "string" }, + $schema: { type: "string" }, + definitions: "NamedSchemas", + externalDocs: "ExternalDocs", + discriminator: "Discriminator", + title: { type: "string" }, + multipleOf: { type: "number", minimum: 0 }, + maximum: { type: "number" }, + minimum: { type: "number" }, + exclusiveMaximum: { type: "number" }, + exclusiveMinimum: { type: "number" }, + maxLength: { type: "integer", minimum: 0 }, + minLength: { type: "integer", minimum: 0 }, + pattern: { type: "string" }, + maxItems: { type: "integer", minimum: 0 }, + minItems: { type: "integer", minimum: 0 }, + uniqueItems: { type: "boolean" }, + maxProperties: { type: "integer", minimum: 0 }, + minProperties: { type: "integer", minimum: 0 }, + required: { type: "array", items: { type: "string" } }, + enum: { type: "array" }, + type: (value) => { + return Array.isArray(value) ? { + type: "array", + items: { enum: ["object", "array", "string", "number", "integer", "boolean", "null"] } + } : { + enum: ["object", "array", "string", "number", "integer", "boolean", "null"] + }; + }, + allOf: listOf("Schema"), + anyOf: listOf("Schema"), + oneOf: listOf("Schema"), + not: "Schema", + if: "Schema", + then: "Schema", + else: "Schema", + contains: "Schema", + patternProperties: { type: "object" }, + propertyNames: "Schema", + properties: "SchemaProperties", + items: (value) => { + return Array.isArray(value) ? listOf("Schema") : "Schema"; + }, + additionalProperties: (value) => { + return typeof value === "boolean" ? { type: "boolean" } : "Schema"; + }, + description: { type: "string" }, + format: { type: "string" }, + contentEncoding: { type: "string" }, + contentMediaType: { type: "string" }, + default: null, + readOnly: { type: "boolean" }, + writeOnly: { type: "boolean" }, + examples: { type: "array" }, + example: { isExample: true }, + deprecated: { type: "boolean" }, + const: null, + $comment: { type: "string" }, + additionalItems: (value) => { + return typeof value === "boolean" ? { type: "boolean" } : "Schema"; + }, + dependencies: "Dependencies" + } + }; + SchemaProperties4 = { + properties: {}, + additionalProperties: (value) => { + return typeof value === "boolean" ? { type: "boolean" } : "Schema"; + } + }; + Dependencies = { + properties: {}, + additionalProperties: (value) => { + return Array.isArray(value) ? { type: "array", items: { type: "string" } } : "Schema"; + } + }; + DiscriminatorMapping2 = { + properties: {}, + additionalProperties: (value) => { + if (typeof value === "string" && isMappingRef(value)) { + return { type: "string", directResolveAs: "Schema" }; + } else { + return { type: "string" }; + } + } + }; + Discriminator3 = { + properties: { + propertyName: { type: "string" }, + mapping: "DiscriminatorMapping" + }, + required: ["propertyName"] + }; } -} - -/** - * @param {Iterable} iterable - * @returns {ReadableStream} - */ -function ReadableStreamFrom (iterable) { - // We cannot use ReadableStream.from here because it does not return a byte stream. +}); - let iterator - return new ReadableStream( - { - start () { - iterator = iterable[Symbol.asyncIterator]() +// node_modules/@redocly/openapi-core/lib/types/asyncapi2.js +var Root5, Channel, ChannelMap, ChannelBindings, Tag4, ExternalDocs3, SecurityRequirement3, ServerBindings, Server3, ServerMap, ServerVariable2, Info4, Contact3, License4, Parameter4, CorrelationId, Message, MessageBindings, OperationBindings, OperationTrait, MessageTrait, Operation4, MessageExample, Components4, ImplicitFlow2, PasswordFlow2, ClientCredentials2, AuthorizationCode2, SecuritySchemeFlows, SecurityScheme5, HttpChannelBinding, HttpServerBinding, HttpMessageBinding, HttpOperationBinding, WsChannelBinding, WsServerBinding, WsMessageBinding, WsOperationBinding, KafkaTopicConfiguration, KafkaChannelBinding, KafkaServerBinding, KafkaMessageBinding, KafkaOperationBinding, AnypointmqChannelBinding, AnypointmqServerBinding, AnypointmqMessageBinding, AnypointmqOperationBinding, AmqpChannelBinding, AmqpServerBinding, AmqpMessageBinding, AmqpOperationBinding, Amqp1ChannelBinding, Amqp1ServerBinding, Amqp1MessageBinding, Amqp1OperationBinding, MqttChannelBinding, MqttServerBindingLastWill, MqttServerBinding, MqttMessageBinding, MqttOperationBinding, Mqtt5ChannelBinding, Mqtt5ServerBinding, Mqtt5MessageBinding, Mqtt5OperationBinding, NatsChannelBinding, NatsServerBinding, NatsMessageBinding, NatsOperationBinding, JmsChannelBinding, JmsServerBinding, JmsMessageBinding, JmsOperationBinding, SolaceChannelBinding, SolaceServerBinding, SolaceMessageBinding, SolaceDestination, SolaceOperationBinding, StompChannelBinding, StompServerBinding, StompMessageBinding, StompOperationBinding, RedisChannelBinding, RedisServerBinding, RedisMessageBinding, RedisOperationBinding, MercureChannelBinding, MercureServerBinding, MercureMessageBinding, MercureOperationBinding, AsyncApi2Bindings, AsyncApi2Types; +var init_asyncapi2 = __esm({ + "node_modules/@redocly/openapi-core/lib/types/asyncapi2.js"() { + init_types(); + init_json_schema_draft7_shared(); + Root5 = { + properties: { + asyncapi: null, + // TODO: validate semver format and supported version + info: "Info", + id: { + type: "string", + description: "Identifier of the application the AsyncAPI document is defining." + }, + servers: "ServerMap", + channels: "ChannelMap", + components: "Components", + tags: "TagList", + externalDocs: "ExternalDocs", + defaultContentType: { type: "string" } + }, + required: ["asyncapi", "channels", "info"] + }; + Channel = { + properties: { + description: { + type: "string", + description: "An optional description of this channel item. CommonMark syntax can be used for rich text representation." + }, + subscribe: "Operation", + publish: "Operation", + parameters: "ParametersMap", + bindings: "ChannelBindings", + servers: { + type: "array", + items: { type: "string" }, + description: "The servers on which this channel is available, specified as an optional unordered list of names (string keys) of Server Objects defined in the Servers Object (a map)." + } + }, + description: "Describes the operations available on a single channel." + }; + ChannelMap = { + properties: {}, + additionalProperties: "Channel" + }; + ChannelBindings = { + properties: {}, + allowed() { + return [ + "http", + "ws", + "kafka", + "anypointmq", + "amqp", + "amqp1", + "mqtt", + "mqtt5", + "nats", + "jms", + "sns", + "solace", + "sqs", + "stomp", + "redis", + "mercure", + "ibmmq", + "googlepubsub", + "pulsar" + ]; + }, + additionalProperties: { type: "object" }, + description: "Map describing protocol-specific definitions for a channel." + }; + Tag4 = { + properties: { + name: { type: "string", description: "REQUIRED. The name of the tag." }, + description: { + type: "string", + description: "A short description for the tag. CommonMark syntax can be used for rich text representation." + }, + externalDocs: "ExternalDocs" + }, + required: ["name"], + description: "Allows adding meta data to a single tag." + }; + ExternalDocs3 = { + properties: { + description: { + type: "string", + description: "A short description of the target documentation. CommonMark syntax can be used for rich text representation." + }, + url: { + type: "string", + description: "REQUIRED. The URL for the target documentation. This MUST be in the form of an absolute URL." + } + }, + required: ["url"], + description: "Allows referencing an external resource for extended documentation." + }; + SecurityRequirement3 = { + properties: {}, + additionalProperties: { type: "array", items: { type: "string" } }, + description: "Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object." + }; + ServerBindings = { + properties: {}, + allowed() { + return [ + "http", + "ws", + "kafka", + "anypointmq", + "amqp", + "amqp1", + "mqtt", + "mqtt5", + "nats", + "jms", + "sns", + "solace", + "sqs", + "stomp", + "redis", + "mercure", + "ibmmq", + "googlepubsub", + "pulsar" + ]; + }, + additionalProperties: { type: "object" }, + description: "Map describing protocol-specific definitions for a server." + }; + Server3 = { + properties: { + url: { + type: "string", + description: "REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the AsyncAPI document is being served. Variable substitutions will be made when a variable is named in {braces}." + }, + protocol: { + type: "string", + description: "REQUIRED. The protocol this URL supports for connection. Supported protocol include, but are not limited to: amqp, amqps, http, https, ibmmq, jms, kafka, kafka-secure, anypointmq, mqtt, secure-mqtt, solace, stomp, stomps, ws, wss, mercure, googlepubsub, pulsar." + }, + protocolVersion: { + type: "string", + description: "The version of the protocol used for connection. For instance: AMQP 0.9.1, HTTP 2.0, Kafka 1.0.0, etc." + }, + description: { + type: "string", + description: "An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation." + }, + variables: "ServerVariablesMap", + security: "SecurityRequirementList", + bindings: "ServerBindings", + tags: "TagList" + }, + required: ["url", "protocol"], + description: "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data. This object is used to capture details such as URIs, protocols and security configuration. Variable substitution can be used so that some details, for example usernames and passwords, can be injected by code generation tools." + }; + ServerMap = { + properties: {}, + additionalProperties: (_value, key) => ( + // eslint-disable-next-line no-useless-escape + key.match(/^[A-Za-z0-9_\-]+$/) ? "Server" : void 0 + ) + }; + ServerVariable2 = { + properties: { + enum: { + type: "array", + items: { type: "string" }, + description: "An enumeration of string values to be used if the substitution options are from a limited set." + }, + default: { + type: "string", + description: "The default value to use for substitution, and to send, if an alternate value is not supplied." + }, + description: { + type: "string", + description: "An optional description for the server variable. CommonMark syntax MAY be used for rich text representation." + }, + examples: { + type: "array", + items: { type: "string" }, + description: "An array of examples of the server variable." + } + }, + required: [], + description: "An object representing a Server Variable for server URL template substitution." + }; + Info4 = { + properties: { + title: { + type: "string", + description: "REQUIRED. The title of the application." + }, + version: { + type: "string", + description: "REQUIRED Provides the version of the application API (not to be confused with the specification version)." + }, + description: { + type: "string", + description: "A short description of the application. CommonMark syntax can be used for rich text representation." + }, + termsOfService: { + type: "string", + description: "A URL to the Terms of Service for the API. This MUST be in the form of an absolute URL." + }, + contact: "Contact", + license: "License" + }, + required: ["title", "version"], + description: "The object provides metadata about the API. The metadata can be used by the clients if needed." + }; + Contact3 = { + properties: { + name: { + type: "string", + description: "The identifying name of the contact person/organization." + }, + url: { + type: "string", + description: "The URL pointing to the contact information. This MUST be in the form of an absolute URL." + }, + email: { + type: "string", + description: "The email address of the contact person/organization. MUST be in the format of an email address." + } + }, + description: "Contact information for the exposed API." + }; + License4 = { + properties: { + name: { + type: "string", + description: "REQUIRED. The license name used for the API." + }, + url: { + type: "string", + description: "A URL to the license used for the API. This MUST be in the form of an absolute URL." + } + }, + required: ["name"], + description: "License information for the exposed API." + }; + Parameter4 = { + properties: { + description: { + type: "string", + description: "A verbose explanation of the parameter. CommonMark syntax can be used for rich text representation." + }, + schema: "Schema", + location: { + type: "string", + description: "A runtime expression that specifies the location of the parameter value. Even when a definition for the target field exists, it MUST NOT be used to validate this parameter but, instead, the schema property MUST be used." + } + }, + description: "Describes a parameter included in a channel name." + }; + CorrelationId = { + properties: { + description: { + type: "string", + description: "An optional description of the identifier. CommonMark syntax can be used for rich text representation." + }, + location: { + type: "string", + description: "REQUIRED. A runtime expression that specifies the location of the correlation ID." + } + }, + required: ["location"], + description: "An object that specifies an identifier at design time that can used for message tracing and correlation." + }; + Message = { + properties: { + messageId: { + type: "string", + description: "Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is case-sensitive. Tools and libraries MAY use the messageId to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions." + }, + headers: "Schema", + payload: "Schema", + // TODO: strictly this does not cover all cases + correlationId: "CorrelationId", + schemaFormat: { + type: "string", + description: "A string containing the name of the schema format used to define the message payload. If omitted, implementations should parse the payload as a Schema object. When the payload is defined using a $ref to a remote file, it is RECOMMENDED the schema format includes the file encoding type to allow implementations to parse the file correctly." + }, + // TODO: support official list of schema formats and custom values + contentType: { + type: "string", + description: `The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field.` + }, + name: { + type: "string", + description: "A machine-friendly name for the message." + }, + title: { + type: "string", + description: "A human-friendly title for the message." + }, + summary: { + type: "string", + description: "A short summary of what the message is about." + }, + description: { + type: "string", + description: "A verbose explanation of the message. CommonMark syntax can be used for rich text representation." + }, + tags: "TagList", + externalDocs: "ExternalDocs", + bindings: "MessageBindings", + examples: "MessageExampleList", + traits: "MessageTraitList" + }, + additionalProperties: {}, + description: "Describes a message received on a given channel and operation." + }; + MessageBindings = { + properties: {}, + allowed() { + return [ + "http", + "ws", + "kafka", + "anypointmq", + "amqp", + "amqp1", + "mqtt", + "mqtt5", + "nats", + "jms", + "sns", + "solace", + "sqs", + "stomp", + "redis", + "mercure", + "ibmmq", + "googlepubsub", + "pulsar" + ]; + }, + additionalProperties: { type: "object" }, + description: "Map describing protocol-specific definitions for a message." + }; + OperationBindings = { + properties: {}, + allowed() { + return [ + "http", + "ws", + "kafka", + "anypointmq", + "amqp", + "amqp1", + "mqtt", + "mqtt5", + "nats", + "jms", + "sns", + "solace", + "sqs", + "stomp", + "redis", + "mercure", + "ibmmq", + "googlepubsub", + "pulsar" + ]; + }, + additionalProperties: { type: "object" }, + description: "Map describing protocol-specific definitions for an operation." + }; + OperationTrait = { + properties: { + tags: "TagList", + summary: { + type: "string", + description: "A short summary of what the operation is about." + }, + description: { + type: "string", + description: "A verbose explanation of the operation. CommonMark syntax can be used for rich text representation." + }, + externalDocs: "ExternalDocs", + operationId: { + type: "string", + description: "Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions." + }, + security: "SecurityRequirementList", + bindings: "OperationBindings" + }, + required: [], + description: "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except message and traits." + }; + MessageTrait = { + properties: { + messageId: { + type: "string", + description: "Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is case-sensitive. Tools and libraries MAY use the messageId to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions." + }, + headers: "Schema", + correlationId: "CorrelationId", + schemaFormat: { + type: "string", + description: "A string containing the name of the schema format/language used to define the message payload. If omitted, implementations should parse the payload as a Schema object." + }, + contentType: { + type: "string", + description: `The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field.` + }, + name: { + type: "string", + description: "A verbose explanation of the message. CommonMark syntax can be used for rich text representation." + }, + title: { + type: "string", + description: "A human-friendly title for the message." + }, + summary: { + type: "string", + description: "A short summary of what the message is about." + }, + description: { + type: "string", + description: "A verbose explanation of the message. CommonMark syntax can be used for rich text representation." + }, + tags: "TagList", + externalDocs: "ExternalDocs", + bindings: "MessageBindings", + examples: "MessageExampleList" }, - pull (controller) { - return iterator.next().then(({ done, value }) => { - if (done) { - return queueMicrotask(() => { - controller.close() - controller.byobRequest?.respond(0) - }) - } else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value) - if (buf.byteLength) { - return controller.enqueue(new Uint8Array(buf)) - } else { - return this.pull(controller) - } - } - }) + additionalProperties: {}, + description: "Describes a trait that MAY be applied to a Message Object. This object MAY contain any property from the Message Object, except payload and traits." + }; + Operation4 = { + properties: { + tags: "TagList", + summary: { + type: "string", + description: "A short summary of what the operation is about." + }, + description: { + type: "string", + description: "A verbose explanation of the operation. CommonMark syntax can be used for rich text representation." + }, + externalDocs: "ExternalDocs", + operationId: { + type: "string", + description: "Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions." + }, + security: "SecurityRequirementList", + bindings: "OperationBindings", + traits: "OperationTraitList", + message: "Message" }, - cancel () { - return iterator.return() + required: [], + description: "Describes a publish or a subscribe operation. This provides a place to document how and why messages are sent and received." + }; + MessageExample = { + properties: { + payload: { + isExample: true, + description: `The value of this field MUST validate against the Message Object's payload field.` + }, + summary: { + type: "string", + description: "A short summary of what the example is about." + }, + name: { + type: "string", + description: "A machine-friendly name." + }, + headers: { + type: "object", + description: `The value of this field MUST validate against the Message Object's headers field.` + } }, - type: 'bytes' - } - ) -} - -/** - * The object should be a FormData instance and contains all the required - * methods. - * @param {*} object - * @returns {object is FormData} - */ -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.once('abort', listener) - return () => signal.removeListener('abort', listener) -} - -const validTokenChars = new Uint8Array([ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0-15 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16-31 - 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, // 32-47 (!"#$%&'()*+,-./) - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 48-63 (0-9:;<=>?) - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 64-79 (@A-O) - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, // 80-95 (P-Z[\]^_) - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 96-111 (`a-o) - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, // 112-127 (p-z{|}~) - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 128-143 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 144-159 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 160-175 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 176-191 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 192-207 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 208-223 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 224-239 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // 240-255 -]) - -/** - * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 - * @param {number} c - * @returns {boolean} - */ -function isTokenCharCode (c) { - return (validTokenChars[c] === 1) -} - -const tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/ - -/** - * @param {string} characters - * @returns {boolean} - */ -function isValidHTTPToken (characters) { - if (characters.length >= 12) return tokenRegExp.test(characters) - if (characters.length === 0) return false - - for (let i = 0; i < characters.length; i++) { - if (validTokenChars[characters.charCodeAt(i)] !== 1) { - 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 - * @returns {boolean} - */ -function isValidHeaderValue (characters) { - return !headerCharRegex.test(characters) -} - -const rangeHeaderRegex = /^bytes (\d+)-(\d+)\/(\d+)?$/ - -/** - * @typedef {object} RangeHeader - * @property {number} start - * @property {number | null} end - * @property {number | null} size - */ - -/** - * Parse accordingly to RFC 9110 - * @see https://www.rfc-editor.org/rfc/rfc9110#field.content-range - * @param {string} [range] - * @returns {RangeHeader|null} - */ -function parseRangeHeader (range) { - if (range == null || range === '') return { start: 0, end: null, size: null } - - const m = range ? range.match(rangeHeaderRegex) : null - return m - ? { - start: parseInt(m[1]), - end: m[2] ? parseInt(m[2]) : null, - size: m[3] ? parseInt(m[3]) : null - } - : null -} - -/** - * @template {import("events").EventEmitter} T - * @param {T} obj - * @param {string} name - * @param {(...args: any[]) => void} listener - * @returns {T} - */ -function addListener (obj, name, listener) { - const listeners = (obj[kListeners] ??= []) - listeners.push([name, listener]) - obj.on(name, listener) - return obj -} - -/** - * @template {import("events").EventEmitter} T - * @param {T} obj - * @returns {T} - */ -function removeAllListeners (obj) { - if (obj[kListeners] != null) { - for (const [name, listener] of obj[kListeners]) { - obj.removeListener(name, listener) - } - obj[kListeners] = null - } - return obj -} - -/** - * @param {import ('../dispatcher/client')} client - * @param {import ('../core/request')} request - * @param {Error} err - */ -function errorRequest (client, request, err) { - try { - request.onError(err) - assert(request.aborted) - } catch (err) { - client.emit('error', err) - } -} - -/** - * @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 + description: "Message Example Object represents an example of a Message Object and MUST contain either headers and/or payload fields." + }; + Components4 = { + properties: { + messages: "NamedMessages", + parameters: "NamedParameters", + schemas: "NamedSchemas", + correlationIds: "NamedCorrelationIds", + messageTraits: "NamedMessageTraits", + operationTraits: "NamedOperationTraits", + securitySchemes: "NamedSecuritySchemes", + servers: "ServerMap", + serverVariables: "ServerVariablesMap", + channels: "ChannelMap", + serverBindings: "ServerBindings", + channelBindings: "ChannelBindings", + operationBindings: "OperationBindings", + messageBindings: "MessageBindings" } - - 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) + }; + ImplicitFlow2 = { + properties: { + refreshUrl: { type: "string" }, + scopes: { type: "object", additionalProperties: { type: "string" } }, + // TODO: validate scopes + authorizationUrl: { type: "string" } + }, + required: ["authorizationUrl", "scopes"], + description: "Configuration for the OAuth Implicit flow." + }; + PasswordFlow2 = { + properties: { + refreshUrl: { type: "string" }, + scopes: { type: "object", additionalProperties: { type: "string" } }, + // TODO: validate scopes + tokenUrl: { type: "string" } + }, + required: ["tokenUrl", "scopes"], + description: "Configuration for the OAuth Password flow." + }; + ClientCredentials2 = { + properties: { + refreshUrl: { type: "string" }, + scopes: { type: "object", additionalProperties: { type: "string" } }, + // TODO: validate scopes + tokenUrl: { type: "string" } + }, + required: ["tokenUrl", "scopes"], + description: "Configuration for the OAuth Client Credentials flow." + }; + AuthorizationCode2 = { + properties: { + refreshUrl: { type: "string" }, + authorizationUrl: { type: "string" }, + scopes: { type: "object", additionalProperties: { type: "string" } }, + // TODO: validate scopes + tokenUrl: { type: "string" } + }, + required: ["authorizationUrl", "tokenUrl", "scopes"], + description: "Configuration for the OAuth Authorization Code flow." + }; + SecuritySchemeFlows = { + properties: { + implicit: "ImplicitFlow", + password: "PasswordFlow", + clientCredentials: "ClientCredentials", + authorizationCode: "AuthorizationCode" } - } - -/** - * @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)` - - destroy(socket, new ConnectTimeoutError(message)) -} - -/** - * @param {string} urlString - * @returns {string} - */ -function getProtocolFromUrlString (urlString) { - if ( - urlString[0] === 'h' && - urlString[1] === 't' && - urlString[2] === 't' && - urlString[3] === 'p' - ) { - switch (urlString[4]) { - case ':': - return 'http:' - case 's': - if (urlString[5] === ':') { - return 'https:' - } - } - } - // fallback if none of the usual suspects - return urlString.slice(0, urlString.indexOf(':') + 1) -} - -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, - isDisturbed, - isBlobLike, - parseOrigin, - parseURL, - getServerName, - isStream, - isIterable, - hasSafeIterator, - isAsyncIterable, - isDestroyed, - headerNameToString, - bufferToLowerCasedHeaderName, - addListener, - removeAllListeners, - errorRequest, - parseRawHeaders, - encodeRawHeaders, - parseHeaders, - parseKeepAliveTimeout, - destroy, - bodyLength, - deepClone, - ReadableStreamFrom, - isBuffer, - assertRequestHandler, - getSocketInfo, - isFormDataLike, - pathHasQueryOrFragment, - serializePathWithQuery, - addAbortListener, - isValidHTTPToken, - isValidHeaderValue, - isTokenCharCode, - parseRangeHeader, - normalizedMethodRecordsBase, - normalizedMethodRecords, - isValidPort, - isHttpOrHttpsPrefixed, - nodeMajor, - nodeMinor, - safeHTTPMethods: Object.freeze(['GET', 'HEAD', 'OPTIONS', 'TRACE']), - wrapRequestBody, - setupConnectTimeout, - getProtocolFromUrlString -} - - -/***/ }), - -/***/ 71208: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { InvalidArgumentError, MaxOriginsReachedError } = __nccwpck_require__(48045) -const { kClients, kRunning, kClose, kDestroy, kDispatch, kUrl } = __nccwpck_require__(72785) -const DispatcherBase = __nccwpck_require__(61544) -const Pool = __nccwpck_require__(20177) -const Client = __nccwpck_require__(8176) -const util = __nccwpck_require__(83983) - -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kOnDrain = Symbol('onDrain') -const kFactory = Symbol('factory') -const kOptions = Symbol('options') -const kOrigins = Symbol('origins') - -function defaultFactory (origin, opts) { - return opts && opts.connections === 1 - ? new Client(origin, opts) - : new Pool(origin, opts) -} - -class Agent extends DispatcherBase { - constructor ({ factory = defaultFactory, maxOrigins = Infinity, 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 (typeof maxOrigins !== 'number' || Number.isNaN(maxOrigins) || maxOrigins <= 0) { - throw new InvalidArgumentError('maxOrigins must be a number greater than 0') - } - - super() - - if (connect && typeof connect !== 'function') { - connect = { ...connect } - } - - this[kOptions] = { ...util.deepClone(options), maxOrigins, connect } - this[kFactory] = factory - this[kClients] = new Map() - this[kOrigins] = new Set() - - 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 { dispatcher } of this[kClients].values()) { - ret += dispatcher[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.') - } - - if (this[kOrigins].size >= this[kOptions].maxOrigins && !this[kOrigins].has(key)) { - throw new MaxOriginsReachedError() - } - - const result = this[kClients].get(key) - let dispatcher = result && result.dispatcher - if (!dispatcher) { - const closeClientIfUnused = (connected) => { - const result = this[kClients].get(key) - if (result) { - if (connected) result.count -= 1 - if (result.count <= 0) { - this[kClients].delete(key) - if (!result.dispatcher.destroyed) { - result.dispatcher.close() - } - } - this[kOrigins].delete(key) + }; + SecurityScheme5 = { + properties: { + type: { + enum: [ + "userPassword", + "apiKey", + "X509", + "symmetricEncryption", + "asymmetricEncryption", + "httpApiKey", + "http", + "oauth2", + "openIdConnect", + "plain", + "scramSha256", + "scramSha512", + "gssapi" + ] + }, + description: { + type: "string", + description: "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." + }, + name: { + type: "string", + description: "REQUIRED. The name of the header, query or cookie parameter to be used." + }, + in: { + type: "string", + enum: ["query", "header", "cookie", "user", "password"], + description: 'REQUIRED. The location of the API key. Valid values are "user" and "password" for apiKey and "query", "header" or "cookie" for httpApiKey.' + }, + scheme: { + type: "string", + description: "REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235." + }, + bearerFormat: { + type: "string", + description: "A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes." + }, + flows: "SecuritySchemeFlows", + openIdConnectUrl: { + type: "string", + description: "REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of an absolute URL." + } + }, + required(value) { + switch (value?.type) { + case "apiKey": + return ["type", "in"]; + case "httpApiKey": + return ["type", "name", "in"]; + case "http": + return ["type", "scheme"]; + case "oauth2": + return ["type", "flows"]; + case "openIdConnect": + return ["type", "openIdConnectUrl"]; + default: + return ["type"]; + } + }, + allowed(value) { + switch (value?.type) { + case "apiKey": + return ["type", "in", "description"]; + case "httpApiKey": + return ["type", "name", "in", "description"]; + case "http": + return ["type", "scheme", "bearerFormat", "description"]; + case "oauth2": + return ["type", "flows", "description"]; + case "openIdConnect": + return ["type", "openIdConnectUrl", "description"]; + default: + return ["type", "description"]; } + }, + extensionsPrefix: "x-", + description: "Defines a security scheme that can be used by the operations." + }; + HttpChannelBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for an HTTP channel." + }; + ChannelBindings.properties.http = HttpChannelBinding; + HttpServerBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for an HTTP server." + }; + ServerBindings.properties.http = HttpServerBinding; + HttpMessageBinding = { + properties: { + headers: "Schema", + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for an HTTP message, i.e., a request or a response." + }; + MessageBindings.properties.http = HttpMessageBinding; + HttpOperationBinding = { + properties: { + type: { type: "string" }, + method: { + type: "string", + enum: ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS", "CONNECT", "TRACE"] + }, + headers: "Schema", + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for an HTTP operation." + }; + OperationBindings.properties.http = HttpOperationBinding; + WsChannelBinding = { + properties: { + method: { type: "string" }, + query: "Schema", + headers: "Schema", + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for a WebSockets channel." + }; + ChannelBindings.properties.ws = WsChannelBinding; + WsServerBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a WebSockets server." + }; + ServerBindings.properties.ws = WsServerBinding; + WsMessageBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a WebSockets message." + }; + MessageBindings.properties.ws = WsMessageBinding; + WsOperationBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a WebSockets operation." + }; + OperationBindings.properties.ws = WsOperationBinding; + KafkaTopicConfiguration = { + properties: { + "cleanup.policy": { type: "array", items: { enum: ["delete", "compact"] } }, + "retention.ms": { type: "integer" }, + "retention.bytes": { type: "integer" }, + "delete.retention.ms": { type: "integer" }, + "max.message.bytes": { type: "integer" } } - dispatcher = this[kFactory](opts.origin, this[kOptions]) - .on('drain', this[kOnDrain]) - .on('connect', (origin, targets) => { - const result = this[kClients].get(key) - if (result) { - result.count += 1 - } - this[kOnConnect](origin, targets) - }) - .on('disconnect', (origin, targets, err) => { - closeClientIfUnused(true) - this[kOnDisconnect](origin, targets, err) - }) - .on('connectionError', (origin, targets, err) => { - closeClientIfUnused(false) - this[kOnConnectionError](origin, targets, err) - }) - - this[kClients].set(key, { count: 0, dispatcher }) - this[kOrigins].add(key) - } - - return dispatcher.dispatch(opts, handler) - } - - [kClose] () { - const closePromises = [] - for (const { dispatcher } of this[kClients].values()) { - closePromises.push(dispatcher.close()) - } - this[kClients].clear() - - return Promise.all(closePromises) - } - - [kDestroy] (err) { - const destroyPromises = [] - for (const { dispatcher } of this[kClients].values()) { - destroyPromises.push(dispatcher.destroy(err)) - } - this[kClients].clear() - - return Promise.all(destroyPromises) - } - - get stats () { - const allClientStats = {} - for (const { dispatcher } of this[kClients].values()) { - if (dispatcher.stats) { - allClientStats[dispatcher[kUrl].origin] = dispatcher.stats + }; + KafkaChannelBinding = { + properties: { + topic: { type: "string" }, + partitions: { type: "integer" }, + replicas: { type: "integer" }, + topicConfiguration: "KafkaTopicConfiguration", + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for a Kafka channel." + }; + ChannelBindings.properties.kafka = KafkaChannelBinding; + KafkaServerBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a Kafka server." + }; + ServerBindings.properties.kafka = KafkaServerBinding; + KafkaMessageBinding = { + properties: { + key: "Schema", + // TODO: add avro support + schemaIdLocation: { type: "string" }, + schemaIdPayloadEncoding: { type: "string" }, + schemaLookupStrategy: { type: "string" }, + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for a Kafka message." + }; + MessageBindings.properties.kafka = KafkaMessageBinding; + KafkaOperationBinding = { + properties: { + groupId: "Schema", + clientId: "Schema", + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for a Kafka operation." + }; + OperationBindings.properties.kafka = KafkaOperationBinding; + AnypointmqChannelBinding = { + properties: { + destination: { type: "string" }, + destinationType: { type: "string" }, + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for an Anypoint MQ channel." + }; + ChannelBindings.properties.anypointmq = AnypointmqChannelBinding; + AnypointmqServerBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for an Anypoint MQ server." + }; + ServerBindings.properties.anypointmq = AnypointmqServerBinding; + AnypointmqMessageBinding = { + properties: { + headers: "Schema", + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for an Anypoint MQ message." + }; + MessageBindings.properties.anypointmq = AnypointmqMessageBinding; + AnypointmqOperationBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for an Anypoint MQ operation." + }; + OperationBindings.properties.anypointmq = AnypointmqOperationBinding; + AmqpChannelBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for an AMQP 0-9-1 channel." + }; + ChannelBindings.properties.amqp = AmqpChannelBinding; + AmqpServerBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for an AMQP 0-9-1 server." + }; + ServerBindings.properties.amqp = AmqpServerBinding; + AmqpMessageBinding = { + properties: { + contentEncoding: { type: "string" }, + messageType: { type: "string" }, + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for an AMQP 0-9-1 message." + }; + MessageBindings.properties.amqp = AmqpMessageBinding; + AmqpOperationBinding = { + // TODO: some fields are subscribe only + properties: { + expiration: { type: "integer" }, + userId: { type: "string" }, + cc: { type: "array", items: { type: "string" } }, + priority: { type: "integer" }, + deliveryMode: { type: "integer" }, + // TODO: enum: [1, 2] + mandatory: { type: "boolean" }, + bcc: { type: "array", items: { type: "string" } }, + replyTo: { type: "string" }, + timestamp: { type: "boolean" }, + ack: { type: "boolean" }, + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for an AMQP 0-9-1 operation." + }; + OperationBindings.properties.amqp = AmqpOperationBinding; + Amqp1ChannelBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for an AMQP 1.0 channel." + }; + ChannelBindings.properties.amqp1 = Amqp1ChannelBinding; + Amqp1ServerBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for an AMQP 1.0 server." + }; + ServerBindings.properties.amqp1 = Amqp1ServerBinding; + Amqp1MessageBinding = { + properties: {}, + // empty object + description: "Binding Protocol-specific information for an AMQP 1.0 message." + }; + MessageBindings.properties.amqp1 = Amqp1MessageBinding; + Amqp1OperationBinding = { + properties: {}, + // empty object, + description: "Protocol-specific information for an AMQP 1.0 operation." + }; + OperationBindings.properties.amqp1 = Amqp1OperationBinding; + MqttChannelBinding = { + properties: { + qos: { type: "integer" }, + retain: { type: "boolean" }, + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for an MQTT channel." + }; + ChannelBindings.properties.mqtt = MqttChannelBinding; + MqttServerBindingLastWill = { + properties: { + topic: { type: "string" }, + qos: { type: "integer" }, + message: { type: "string" }, + retain: { type: "boolean" } } - } - return allClientStats - } -} - -module.exports = Agent - - -/***/ }), - -/***/ 46232: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - BalancedPoolMissingUpstreamError, - InvalidArgumentError -} = __nccwpck_require__(48045) -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} = __nccwpck_require__(90494) -const Pool = __nccwpck_require__(20177) -const { kUrl } = __nccwpck_require__(72785) -const util = __nccwpck_require__(83983) -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 } = {}) { - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - super() - - this[kOptions] = { ...util.deepClone(opts) } - this[kOptions].interceptors = opts.interceptors - ? { ...opts.interceptors } - : undefined - this[kIndex] = -1 - this[kCurrentWeight] = 0 - - this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100 - this[kErrorPenalty] = this[kOptions].errorPenalty || 15 - - if (!Array.isArray(upstreams)) { - upstreams = [upstreams] - } - - this[kFactory] = factory - - for (const upstream of upstreams) { - this.addUpstream(upstream) - } - this._updateBalancedPoolStats() - } - - addUpstream (upstream) { - const upstreamOrigin = util.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, 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() + }; + MqttServerBinding = { + properties: { + clientId: { type: "string" }, + cleanSession: { type: "boolean" }, + lastWill: "MqttServerBindingLastWill", + keepAlive: { type: "integer" }, + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for an MQTT server." + }; + ServerBindings.properties.mqtt = MqttServerBinding; + MqttMessageBinding = { + properties: { + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for an MQTT message." + }; + MessageBindings.properties.mqtt = MqttMessageBinding; + MqttOperationBinding = { + properties: { + qos: { type: "integer" }, + retain: { type: "boolean" }, + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for an MQTT operation." + }; + OperationBindings.properties.mqtt = MqttOperationBinding; + Mqtt5ChannelBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for an MQTT 5 channel." + }; + ChannelBindings.properties.mqtt5 = Mqtt5ChannelBinding; + Mqtt5ServerBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for an MQTT 5 server." + }; + ServerBindings.properties.mqtt5 = Mqtt5ServerBinding; + Mqtt5MessageBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for an MQTT 5 message." + }; + MessageBindings.properties.mqtt5 = Mqtt5MessageBinding; + Mqtt5OperationBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for an MQTT 5 operation." + }; + OperationBindings.properties.mqtt5 = Mqtt5OperationBinding; + NatsChannelBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a NATS channel." + }; + ChannelBindings.properties.nats = NatsChannelBinding; + NatsServerBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a NATS server." + }; + ServerBindings.properties.nats = NatsServerBinding; + NatsMessageBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a NATS message." + }; + MessageBindings.properties.nats = NatsMessageBinding; + NatsOperationBinding = { + properties: { + queue: { type: "string" }, + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for a NATS operation." + }; + OperationBindings.properties.nats = NatsOperationBinding; + JmsChannelBinding = { + properties: { + destination: { type: "string" }, + destinationType: { type: "string" }, + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for a JMS channel." + }; + ChannelBindings.properties.jms = JmsChannelBinding; + JmsServerBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a JMS server." + }; + ServerBindings.properties.jms = JmsServerBinding; + JmsMessageBinding = { + properties: { + headers: "Schema", + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for a JMS message." + }; + MessageBindings.properties.jms = JmsMessageBinding; + JmsOperationBinding = { + properties: { + headers: "Schema", + bindingVersion: { type: "string" } + }, + description: "Protocol-specific information for a JMS operation." + }; + OperationBindings.properties.jms = JmsOperationBinding; + SolaceChannelBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a Solace channel." + }; + ChannelBindings.properties.solace = SolaceChannelBinding; + SolaceServerBinding = { + properties: { + bindingVersion: { type: "string" }, + msgVpn: { type: "string" } + }, + description: "Protocol-specific information for a Solace message." + }; + ServerBindings.properties.solace = SolaceServerBinding; + SolaceMessageBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a Solace message." + }; + MessageBindings.properties.solace = SolaceMessageBinding; + SolaceDestination = { + properties: { + destinationType: { type: "string", enum: ["queue", "topic"] }, + deliveryMode: { type: "string", enum: ["direct", "persistent"] }, + "queue.name": { type: "string" }, + "queue.topicSubscriptions": { type: "array", items: { type: "string" } }, + "queue.accessType": { type: "string", enum: ["exclusive", "nonexclusive"] }, + "queue.maxMsgSpoolSize": { type: "string" }, + "queue.maxTtl": { type: "string" }, + "topic.topicSubscriptions": { type: "array", items: { type: "string" } } } - }) - - 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 = util.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 - } - - getUpstream (upstream) { - const upstreamOrigin = util.parseOrigin(upstream).origin - - return this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - )) + }; + SolaceOperationBinding = { + properties: { + bindingVersion: { type: "string" }, + destinations: listOf("SolaceDestination") + }, + description: "Protocol-specific information for a Solace operation." + }; + OperationBindings.properties.solace = SolaceOperationBinding; + StompChannelBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a STOMP channel." + }; + ChannelBindings.properties.stomp = StompChannelBinding; + StompServerBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a STOMP server." + }; + ServerBindings.properties.stomp = StompServerBinding; + StompMessageBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a STOMP message." + }; + MessageBindings.properties.stomp = StompMessageBinding; + StompOperationBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a STOMP operation." + }; + OperationBindings.properties.stomp = StompOperationBinding; + RedisChannelBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a Redis channel." + }; + ChannelBindings.properties.redis = RedisChannelBinding; + RedisServerBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a Redis server." + }; + ServerBindings.properties.redis = RedisServerBinding; + RedisMessageBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a Redis message." + }; + MessageBindings.properties.redis = RedisMessageBinding; + RedisOperationBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a Redis operation." + }; + OperationBindings.properties.redis = RedisOperationBinding; + MercureChannelBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a Mercure channel." + }; + ChannelBindings.properties.mercure = MercureChannelBinding; + MercureServerBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a Mercure server." + }; + ServerBindings.properties.mercure = MercureServerBinding; + MercureMessageBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a Mercure message." + }; + MessageBindings.properties.mercure = MercureMessageBinding; + MercureOperationBinding = { + properties: {}, + // empty object + description: "Protocol-specific information for a Mercure operation." + }; + OperationBindings.properties.mercure = MercureOperationBinding; + AsyncApi2Bindings = { + HttpServerBinding, + HttpChannelBinding, + HttpMessageBinding, + HttpOperationBinding, + WsServerBinding, + WsChannelBinding, + WsMessageBinding, + WsOperationBinding, + KafkaServerBinding, + KafkaTopicConfiguration, + KafkaChannelBinding, + KafkaMessageBinding, + KafkaOperationBinding, + AnypointmqServerBinding, + AnypointmqChannelBinding, + AnypointmqMessageBinding, + AnypointmqOperationBinding, + AmqpServerBinding, + AmqpChannelBinding, + AmqpMessageBinding, + AmqpOperationBinding, + Amqp1ServerBinding, + Amqp1ChannelBinding, + Amqp1MessageBinding, + Amqp1OperationBinding, + MqttServerBindingLastWill, + MqttServerBinding, + MqttChannelBinding, + MqttMessageBinding, + MqttOperationBinding, + Mqtt5ServerBinding, + Mqtt5ChannelBinding, + Mqtt5MessageBinding, + Mqtt5OperationBinding, + NatsServerBinding, + NatsChannelBinding, + NatsMessageBinding, + NatsOperationBinding, + JmsServerBinding, + JmsChannelBinding, + JmsMessageBinding, + JmsOperationBinding, + SolaceServerBinding, + SolaceChannelBinding, + SolaceMessageBinding, + SolaceDestination, + SolaceOperationBinding, + StompServerBinding, + StompChannelBinding, + StompMessageBinding, + StompOperationBinding, + RedisServerBinding, + RedisChannelBinding, + RedisMessageBinding, + RedisOperationBinding, + MercureServerBinding, + MercureChannelBinding, + MercureMessageBinding, + MercureOperationBinding, + ServerBindings, + ChannelBindings, + MessageBindings, + OperationBindings + }; + AsyncApi2Types = { + ...AsyncApi2Bindings, + Root: Root5, + Tag: Tag4, + TagList: listOf("Tag"), + ServerMap, + ExternalDocs: ExternalDocs3, + Server: Server3, + ServerVariable: ServerVariable2, + ServerVariablesMap: mapOf("ServerVariable"), + SecurityRequirement: SecurityRequirement3, + SecurityRequirementList: listOf("SecurityRequirement"), + Info: Info4, + Contact: Contact3, + License: License4, + ChannelMap, + Channel, + Parameter: Parameter4, + ParametersMap: mapOf("Parameter"), + Operation: Operation4, + Schema: Schema5, + MessageExample, + SchemaProperties: SchemaProperties4, + DiscriminatorMapping: DiscriminatorMapping2, + Discriminator: Discriminator3, + Components: Components4, + NamedSchemas: mapOf("Schema"), + NamedMessages: mapOf("Message"), + NamedMessageTraits: mapOf("MessageTrait"), + NamedOperationTraits: mapOf("OperationTrait"), + NamedParameters: mapOf("Parameter"), + NamedSecuritySchemes: mapOf("SecurityScheme"), + NamedCorrelationIds: mapOf("CorrelationId"), + ImplicitFlow: ImplicitFlow2, + PasswordFlow: PasswordFlow2, + ClientCredentials: ClientCredentials2, + AuthorizationCode: AuthorizationCode2, + SecuritySchemeFlows, + SecurityScheme: SecurityScheme5, + Message, + MessageBindings, + OperationBindings, + OperationTrait, + OperationTraitList: listOf("OperationTrait"), + MessageTrait, + MessageTraitList: listOf("MessageTrait"), + MessageExampleList: listOf("MessageExample"), + CorrelationId, + Dependencies + }; } +}); - get upstreams () { - return this[kClients] - .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true) - .map((p) => p[kUrl].origin) +// node_modules/@redocly/openapi-core/lib/types/asyncapi3.js +var Root6, Channel2, Server4, Info5, Parameter5, Message2, OperationTrait2, MessageTrait2, Operation5, OperationReply, OperationReplyAddress, Components5, ImplicitFlow3, PasswordFlow3, ClientCredentials3, AuthorizationCode3, SecurityScheme6, AsyncApi3Types; +var init_asyncapi3 = __esm({ + "node_modules/@redocly/openapi-core/lib/types/asyncapi3.js"() { + init_is_plain_object(); + init_asyncapi2(); + init_types(); + init_json_schema_draft7_shared(); + Root6 = { + properties: { + asyncapi: { + type: "string", + enum: ["3.0.0"], + description: "REQUIRED. Specifies the AsyncAPI Specification version being used. It can be used by tooling Specifications and clients to interpret the version. The structure shall be major.minor.patch, where patch versions must be compatible with the existing major.minor tooling. Typically patch versions will be introduced to address errors in the documentation, and tooling should typically be compatible with the corresponding major.minor (1.0.*). Patch versions will correspond to patches of this document." + }, + info: "Info", + id: { + type: "string", + description: "Identifier of the application the AsyncAPI document is defining." + }, + servers: "ServerMap", + channels: "NamedChannels", + components: "Components", + operations: "NamedOperations", + defaultContentType: { + type: "string", + description: `Default content type to use when encoding/decoding a message's payload.` + } + }, + required: ["asyncapi", "info"], + description: "This is the root document object for the API specification. It combines resource listing and API declaration together into one document." + }; + Channel2 = { + properties: { + address: { + type: "string", + description: `An optional string representation of this channel's address. The address is typically the "topic name", "routing key", "event type", or "path". When null or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can't be known upfront. It MAY contain Channel Address Expressions. Query parameters and fragments SHALL NOT be used, instead use bindings to define them.` + }, + messages: "NamedMessages", + title: { + type: "string", + description: "A human-friendly title for the channel." + }, + summary: { + type: "string", + description: "A short summary of the channel." + }, + description: { + type: "string", + description: "An optional description of this channel. CommonMark syntax can be used for rich text representation." + }, + servers: "ServerList", + parameters: "ParametersMap", + bindings: "ChannelBindings", + tags: "TagList", + externalDocs: "ExternalDocs" + }, + description: "Describes a shared communication channel." + }; + Server4 = { + properties: { + host: { + type: "string", + description: "REQUIRED. The server host name. It MAY include the port. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." + }, + pathname: { + type: "string", + description: "The path to a resource in the host. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." + }, + protocol: { + type: "string", + description: "REQUIRED. The protocol this server supports for connection." + }, + protocolVersion: { + type: "string", + description: "The version of the protocol used for connection. For instance: AMQP 0.9.1, HTTP 2.0, Kafka 1.0.0, etc." + }, + description: { + type: "string", + description: "An optional string describing the server. CommonMark syntax MAY be used for rich text representation." + }, + variables: "ServerVariablesMap", + security: "SecuritySchemeList", + bindings: "ServerBindings", + externalDocs: "ExternalDocs", + tags: "TagList" + }, + required: ["host", "protocol"], + description: "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data. This object is used to capture details such as URIs, protocols and security configuration. Variable substitution can be used so that some details, for example usernames and passwords, can be injected by code generation tools." + }; + Info5 = { + properties: { + title: { + type: "string", + description: "REQUIRED. The title of the application." + }, + version: { + type: "string", + description: "REQUIRED Provides the version of the application API (not to be confused with the specification version)." + }, + description: { + type: "string", + description: "A short description of the application. CommonMark syntax can be used for rich text representation." + }, + termsOfService: { + type: "string", + description: "A URL to the Terms of Service for the API. This MUST be in the form of an absolute URL." + }, + contact: "Contact", + license: "License", + tags: "TagList", + externalDocs: "ExternalDocs" + }, + required: ["title", "version"], + description: "The object provides metadata about the API. The metadata can be used by the clients if needed." + }; + Parameter5 = { + properties: { + description: { + type: "string", + description: "An optional description for the parameter. CommonMark syntax MAY be used for rich text representation." + }, + enum: { + type: "array", + items: { type: "string" }, + description: "An enumeration of string values to be used if the substitution options are from a limited set." + }, + default: { + type: "string", + description: "The default value to use for substitution, and to send, if an alternate value is not supplied." + }, + examples: { + type: "array", + items: { type: "string" }, + description: "An array of examples of the parameter value." + }, + location: { + type: "string", + description: "A runtime expression that specifies the location of the parameter value." + } + }, + description: "Describes a parameter included in a channel address." + }; + Message2 = { + properties: { + headers: "Schema", + payload: (value) => { + if (!!value && value?.["schemaFormat"]) { + return { + properties: { + schema: "Schema", + schemaFormat: { type: "string" } + }, + required: ["schema", "schemaFormat"] + }; + } else { + return "Schema"; + } + }, + correlationId: "CorrelationId", + contentType: { + type: "string", + description: `The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field.` + }, + name: { + type: "string", + description: "A machine-friendly name for the message." + }, + title: { + type: "string", + description: "A human-friendly title for the message." + }, + summary: { + type: "string", + description: "A short summary of what the message is about." + }, + description: { + type: "string", + description: "A verbose explanation of the message. CommonMark syntax can be used for rich text representation." + }, + tags: "TagList", + externalDocs: "ExternalDocs", + bindings: "MessageBindings", + examples: "MessageExampleList", + traits: "MessageTraitList" + }, + additionalProperties: {}, + description: "Describes a message received on a given channel and operation." + }; + OperationTrait2 = { + properties: { + tags: "TagList", + title: { + type: "string", + description: "A human-friendly title for the operation." + }, + summary: { + type: "string", + description: "A short summary of what the operation is about." + }, + description: { + type: "string", + description: "A verbose explanation of the operation. CommonMark syntax can be used for rich text representation." + }, + externalDocs: "ExternalDocs", + security: "SecuritySchemeList", + bindings: "OperationBindings" + }, + required: [], + description: "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel, messages and traits ones." + }; + MessageTrait2 = { + properties: { + headers: (value) => { + if (typeof value === "function" || isPlainObject(value)) { + return { + properties: { + schema: "Schema", + schemaFormat: { type: "string" } + } + }; + } else { + return "Schema"; + } + }, + correlationId: "CorrelationId", + contentType: { + type: "string", + description: `The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field.` + }, + name: { + type: "string", + description: "A machine-friendly name for the message." + }, + title: { + type: "string", + description: "A human-friendly title for the message." + }, + summary: { + type: "string", + description: "A short summary of what the message is about." + }, + description: { + type: "string", + description: "A verbose explanation of the message. CommonMark syntax can be used for rich text representation." + }, + tags: "TagList", + externalDocs: "ExternalDocs", + bindings: "MessageBindings", + examples: "MessageExampleList" + }, + additionalProperties: {}, + description: "Describes a trait that MAY be applied to a Message Object. This object MAY contain any property from the Message Object, except payload and traits." + }; + Operation5 = { + properties: { + action: { + type: "string", + enum: ["send", "receive"], + description: `Required. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.` + }, + channel: "Channel", + title: { + type: "string", + description: "A human-friendly title for the operation." + }, + tags: "TagList", + summary: { + type: "string", + description: "A short summary of what the operation is about." + }, + description: { + type: "string", + description: "A verbose explanation of the operation. CommonMark syntax can be used for rich text representation." + }, + externalDocs: "ExternalDocs", + operationId: { type: "string" }, + security: "SecuritySchemeList", + bindings: "OperationBindings", + traits: "OperationTraitList", + messages: "MessageList", + reply: "OperationReply" + }, + required: ["action", "channel"] + }; + OperationReply = { + properties: { + channel: "Channel", + messages: "MessageList", + address: "OperationReplyAddress" + }, + description: "Describes the reply part that MAY be applied to an Operation Object. If an operation implements the request/reply pattern, the reply object represents the response message." + }; + OperationReplyAddress = { + properties: { + location: { + type: "string", + description: "REQUIRED. A runtime expression that specifies the location of the reply address." + }, + description: { + type: "string", + description: "An optional description of the address. CommonMark syntax can be used for rich text representation." + } + }, + required: ["location"], + description: "An object that specifies where an operation has to send the reply." + }; + Components5 = { + properties: { + messages: "NamedMessages", + parameters: "NamedParameters", + schemas: "NamedSchemas", + replies: "NamedOperationReplies", + replyAddresses: "NamedOperationRelyAddresses", + correlationIds: "NamedCorrelationIds", + messageTraits: "NamedMessageTraits", + operationTraits: "NamedOperationTraits", + tags: "NamedTags", + externalDocs: "NamedExternalDocs", + securitySchemes: "NamedSecuritySchemes", + servers: "ServerMap", + serverVariables: "ServerVariablesMap", + channels: "NamedChannels", + operations: "NamedOperations", + serverBindings: "ServerBindings", + channelBindings: "ChannelBindings", + operationBindings: "OperationBindings", + messageBindings: "MessageBindings" + }, + description: "Holds a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object." + }; + ImplicitFlow3 = { + properties: { + refreshUrl: { type: "string" }, + availableScopes: { type: "object", additionalProperties: { type: "string" } }, + authorizationUrl: { type: "string" } + }, + required: ["authorizationUrl", "availableScopes"], + description: "Configuration for the OAuth Implicit flow." + }; + PasswordFlow3 = { + properties: { + refreshUrl: { type: "string" }, + availableScopes: { type: "object", additionalProperties: { type: "string" } }, + tokenUrl: { type: "string" } + }, + required: ["tokenUrl", "availableScopes"], + description: "Configuration for the OAuth Resource Owner Protected Credentials flow." + }; + ClientCredentials3 = { + properties: { + refreshUrl: { type: "string" }, + availableScopes: { type: "object", additionalProperties: { type: "string" } }, + tokenUrl: { type: "string" } + }, + required: ["tokenUrl", "availableScopes"], + description: "Configuration for the OAuth Client Credentials flow." + }; + AuthorizationCode3 = { + properties: { + refreshUrl: { type: "string" }, + authorizationUrl: { type: "string" }, + availableScopes: { type: "object", additionalProperties: { type: "string" } }, + tokenUrl: { type: "string" } + }, + required: ["authorizationUrl", "tokenUrl", "availableScopes"], + description: "Configuration for the OAuth Authorization Code flow." + }; + SecurityScheme6 = { + properties: { + type: { + enum: [ + "userPassword", + "apiKey", + "X509", + "symmetricEncryption", + "asymmetricEncryption", + "httpApiKey", + "http", + "oauth2", + "openIdConnect", + "plain", + "scramSha256", + "scramSha512", + "gssapi" + ], + description: 'REQUIRED. The type of the security scheme. Valid values are "userPassword", "apiKey", "X509", "symmetricEncryption", "asymmetricEncryption", "httpApiKey", "http", "oauth2", "openIdConnect", "plain", "scramSha256", "scramSha512", and "gssapi".' + }, + description: { + type: "string", + description: "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." + }, + name: { + type: "string", + description: "REQUIRED. The name of the header, query or cookie parameter to be used." + }, + in: { + type: "string", + enum: ["query", "header", "cookie", "user", "password"], + description: 'REQUIRED. The location of the API key. Valid values are "user" and "password" for apiKey and "query", "header" or "cookie" for httpApiKey.' + }, + scheme: { + type: "string", + description: "REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235." + }, + bearerFormat: { + type: "string", + description: "A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes." + }, + flows: "SecuritySchemeFlows", + openIdConnectUrl: { + type: "string", + description: "REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of an absolute URL." + }, + scopes: { + type: "array", + items: { type: "string" }, + description: "List of the needed scope names. An empty array means no scopes are needed." + } + }, + required(value) { + switch (value?.type) { + case "apiKey": + return ["type", "in"]; + case "httpApiKey": + return ["type", "name", "in"]; + case "http": + return ["type", "scheme"]; + case "oauth2": + return ["type", "flows"]; + case "openIdConnect": + return ["type", "openIdConnectUrl"]; + default: + return ["type"]; + } + }, + allowed(value) { + switch (value?.type) { + case "apiKey": + return ["type", "in", "description"]; + case "httpApiKey": + return ["type", "name", "in", "description"]; + case "http": + return ["type", "scheme", "bearerFormat", "description"]; + case "oauth2": + return ["type", "flows", "description", "scopes"]; + case "openIdConnect": + return ["type", "openIdConnectUrl", "description", "scopes"]; + default: + return ["type", "description"]; + } + }, + extensionsPrefix: "x-", + description: "Defines a security scheme that can be used by the operations." + }; + AsyncApi3Types = { + // from asyncapi2 + ...AsyncApi2Bindings, + CorrelationId, + SecuritySchemeFlows, + ServerVariable: ServerVariable2, + Contact: Contact3, + License: License4, + MessageExample, + Tag: Tag4, + Dependencies, + Schema: Schema5, + Discriminator: Discriminator3, + DiscriminatorMapping: DiscriminatorMapping2, + SchemaProperties: SchemaProperties4, + ServerMap, + ExternalDocs: ExternalDocs3, + Root: Root6, + Channel: Channel2, + Parameter: Parameter5, + Info: Info5, + Server: Server4, + MessageTrait: MessageTrait2, + Operation: Operation5, + OperationReply, + OperationReplyAddress, + Components: Components5, + ImplicitFlow: ImplicitFlow3, + PasswordFlow: PasswordFlow3, + ClientCredentials: ClientCredentials3, + AuthorizationCode: AuthorizationCode3, + SecurityScheme: SecurityScheme6, + Message: Message2, + OperationTrait: OperationTrait2, + ServerVariablesMap: mapOf("ServerVariable"), + NamedTags: mapOf("Tag"), + NamedExternalDocs: mapOf("ExternalDocs"), + NamedChannels: mapOf("Channel"), + ParametersMap: mapOf("Parameter"), + NamedOperations: mapOf("Operation"), + NamedOperationReplies: mapOf("OperationReply"), + NamedOperationRelyAddresses: mapOf("OperationReplyAddress"), + NamedSchemas: mapOf("Schema"), + NamedMessages: mapOf("Message"), + NamedMessageTraits: mapOf("MessageTrait"), + NamedOperationTraits: mapOf("OperationTrait"), + NamedParameters: mapOf("Parameter"), + NamedSecuritySchemes: mapOf("SecurityScheme"), + NamedCorrelationIds: mapOf("CorrelationId"), + ServerList: listOf("Server"), + SecuritySchemeList: listOf("SecurityScheme"), + MessageList: listOf("Message"), + OperationTraitList: listOf("OperationTrait"), + MessageTraitList: listOf("MessageTrait"), + MessageExampleList: listOf("MessageExample"), + TagList: listOf("Tag") + }; } +}); - [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] +// node_modules/@redocly/openapi-core/lib/types/arazzo.js +var Root7, NamedParameters, NamedSuccessActions, NamedFailureActions, Components6, NamedInputs, Info6, SourceDescriptions, OpenAPISourceDescription, ArazzoSourceDescription, ReusableObject, Parameter6, Parameters, Workflow, Workflows, Steps, Step, Outputs, RequestBody2, Replacement, ExtendedSecurity, ExtendedOperation, CriterionObject, JSONPathCriterion, XPathCriterion, SuccessActionObject, OnSuccessActionList, FailureActionObject, OnFailureActionList, Arazzo1Types; +var init_arazzo = __esm({ + "node_modules/@redocly/openapi-core/lib/types/arazzo.js"() { + init_types(); + init_oas3_2(); + Root7 = { + properties: { + arazzo: { + type: "string", + description: "REQUIRED. This string MUST be the version number of the Arazzo Specification that the Arazzo Description uses. The arazzo field MUST be used by tooling to interpret the Arazzo Description." + }, + info: "Info", + sourceDescriptions: "SourceDescriptions", + workflows: "Workflows", + components: "Components" + }, + required: ["arazzo", "info", "sourceDescriptions", "workflows"], + extensionsPrefix: "x-" + }; + NamedParameters = { + properties: {}, + additionalProperties: "Parameter" + }; + NamedSuccessActions = { + properties: {}, + additionalProperties: "SuccessActionObject" + }; + NamedFailureActions = { + properties: {}, + additionalProperties: "FailureActionObject" + }; + Components6 = { + properties: { + inputs: "NamedInputs", + parameters: "NamedParameters", + successActions: "NamedSuccessActions", + failureActions: "NamedFailureActions" + }, + extensionsPrefix: "x-" + }; + NamedInputs = mapOf("Schema"); + Info6 = { + properties: { + title: { + type: "string", + description: "REQUIRED. A human readable title of the Arazzo Description." + }, + description: { + type: "string", + description: "A description of the purpose of the workflows defined. CommonMark syntax MAY be used for rich text representation." + }, + summary: { + type: "string", + description: "A short summary of the Arazzo Description." + }, + version: { + type: "string", + description: "REQUIRED. The version identifier of the Arazzo document (which is distinct from the Arazzo Specification version)." + } + }, + required: ["title", "version"], + extensionsPrefix: "x-", + description: "The object provides metadata about API workflows defined in this Arazzo document. The metadata MAY be used by the clients if needed." + }; + SourceDescriptions = { + properties: {}, + items: (value) => { + if (value?.type === "openapi") { + return "OpenAPISourceDescription"; + } else { + return "ArazzoSourceDescription"; } } - if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) { - return pool + }; + OpenAPISourceDescription = { + properties: { + name: { + type: "string", + description: `REQUIRED. A unique name for the source description. Tools and libraries MAY use the name to uniquely identify a source description, therefore, it is RECOMMENDED to follow common programming naming conventions. SHOULD conform to the regular expression [A-Za-z0-9_-]+.` + }, + type: { + type: "string", + enum: ["openapi"], + description: 'The type of source description. Possible values are "openapi".' + }, + url: { + type: "string", + description: "REQUIRED. A URL to a source description to be used by a workflow. If a relative reference is used, it MUST be in the form of a URI-reference as defined by [RFC3986] Section 4.2." + }, + "x-serverUrl": { type: "string" } + }, + required: ["name", "type", "url"], + extensionsPrefix: "x-", + description: "Describes a source description (such as an OpenAPI description) that will be referenced by one or more workflows described within an Arazzo Description." + }; + ArazzoSourceDescription = { + properties: { + name: { + type: "string", + description: `REQUIRED. A unique name for the source description. Tools and libraries MAY use the name to uniquely identify a source description, therefore, it is RECOMMENDED to follow common programming naming conventions. SHOULD conform to the regular expression [A-Za-z0-9_-]+.` + }, + type: { + type: "string", + enum: ["arazzo"], + description: 'The type of source description. Possible values are "arazzo".' + }, + url: { + type: "string", + description: "REQUIRED. A URL to a source description to be used by a workflow. If a relative reference is used, it MUST be in the form of a URI-reference as defined by [RFC3986] Section 4.2." + } + }, + required: ["name", "type", "url"], + extensionsPrefix: "x-", + description: "Describes a source description (such as an OpenAPI description) that will be referenced by one or more workflows described within an Arazzo Description." + }; + ReusableObject = { + properties: { + reference: { + type: "string", + description: "REQUIRED. A Runtime Expression used to reference the desired object." + }, + value: {} + // any + }, + required: ["reference"], + extensionsPrefix: "x-", + description: "A simple object to allow referencing of objects contained within the Components Object. It can be used from locations within steps or workflows in the Arazzo Description. Note - Input Objects MUST use standard JSON Schema referencing via the $ref keyword while all non JSON Schema objects use this object and its expression based referencing mechanism." + }; + Parameter6 = { + properties: { + in: { + type: "string", + enum: ["header", "query", "path", "cookie"], + description: 'The location of the parameter. Possible values are "path", "query", "header", or "cookie". When the step in context specifies a workflowId, then all parameters map to workflow inputs. In all other scenarios (e.g., a step specifies an operationId), the in field MUST be specified.' + }, + name: { + type: "string", + description: "REQUIRED. The name of the parameter. Parameter names are case sensitive." + }, + value: {} + // any + }, + required: ["name", "value"], + extensionsPrefix: "x-", + description: "Describes a single step parameter. A unique parameter is defined by the combination of a name and in fields." + }; + Parameters = { + properties: {}, + items: (value) => { + if (value?.reference) { + return "ReusableObject"; + } else { + return "Parameter"; + } } - } - - this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight] - this[kIndex] = maxWeightIndex - return this[kClients][maxWeightIndex] - } -} - -module.exports = BalancedPool - - -/***/ }), - -/***/ 43264: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/* global WebAssembly */ - -const assert = __nccwpck_require__(98061) -const util = __nccwpck_require__(83983) -const { channels } = __nccwpck_require__(58438) -const timers = __nccwpck_require__(85194) -const { - RequestContentLengthMismatchError, - ResponseContentLengthMismatchError, - RequestAbortedError, - HeadersTimeoutError, - HeadersOverflowError, - SocketError, - InformationalError, - BodyTimeoutError, - HTTPParserError, - ResponseExceededMaxSizeError -} = __nccwpck_require__(48045) -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, - kClosed -} = __nccwpck_require__(72785) - -const constants = __nccwpck_require__(30953) -const EMPTY_BUF = Buffer.alloc(0) -const FastBuffer = Buffer[Symbol.species] -const removeAllListeners = util.removeAllListeners - -let extractBody - -function lazyllhttp () { - const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(61145) : undefined - - let mod - - // We disable wasm SIMD on ppc64 as it seems to be broken on Power 9 architectures. - let useWasmSIMD = process.arch !== 'ppc64' - // The Env Variable UNDICI_NO_WASM_SIMD allows explicitly overriding the default behavior - if (process.env.UNDICI_NO_WASM_SIMD === '1') { - useWasmSIMD = true - } else if (process.env.UNDICI_NO_WASM_SIMD === '0') { - useWasmSIMD = false - } - - if (useWasmSIMD) { - try { - mod = new WebAssembly.Module(__nccwpck_require__(95627)) - } catch { - } - } - - if (!mod) { - // 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 = new WebAssembly.Module(llhttpWasmData || __nccwpck_require__(61145)) - } - - return new WebAssembly.Instance(mod, { - env: { - /** - * @param {number} p - * @param {number} at - * @param {number} len - * @returns {number} - */ - wasm_on_url: (p, at, len) => { - return 0 + }; + Workflow = { + properties: { + workflowId: { + type: "string", + description: "REQUIRED. The unique identifier of the workflow." + }, + summary: { + type: "string", + description: "A short summary of what the workflow does." + }, + description: { + type: "string", + description: "A verbose explanation of the workflow behavior. CommonMark syntax MAY be used for rich text representation." + }, + parameters: "Parameters", + dependsOn: { + type: "array", + items: { type: "string" }, + description: "A list of workflows that MUST be completed before this workflow can be processed. Each value provided MUST be a workflowId." + }, + inputs: "Schema", + outputs: "Outputs", + steps: "Steps", + successActions: "OnSuccessActionList", + failureActions: "OnFailureActionList", + "x-security": "ExtendedSecurityList" }, - /** - * @param {number} p - * @param {number} at - * @param {number} len - * @returns {number} - */ - 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)) + required: ["workflowId", "steps"], + extensionsPrefix: "x-", + description: "Describes the steps to be taken across one or more APIs to achieve an objective. The workflow object MAY define inputs needed in order to execute workflow steps, where the defined steps represent a call to an API operation or another workflow, and a set of outputs." + }; + Workflows = listOf("Workflow"); + Steps = listOf("Step"); + Step = { + properties: { + stepId: { + type: "string", + description: `REQUIRED. Unique string to represent the step. The stepId MUST be unique amongst all steps described in the workflow. The stepId value is case-sensitive. Tools and libraries MAY use the stepId to uniquely identify a workflow step, therefore, it is RECOMMENDED to follow common programming naming conventions. SHOULD conform to the regular expression [A-Za-z0-9_-]+.` + }, + description: { + type: "string", + description: "A description of the step. CommonMark syntax MAY be used for rich text representation." + }, + operationId: { + type: "string", + description: "The name of an existing, resolvable operation, as defined with a unique operationId and existing within one of the sourceDescriptions. The referenced operation will be invoked by this workflow step. If multiple (non arazzo type) sourceDescriptions are defined, then the operationId MUST be specified using a Runtime Expression (e.g., $sourceDescriptions..) to avoid ambiguity or potential clashes. This field is mutually exclusive of the operationPath and workflowId fields respectively." + }, + operationPath: { + type: "string", + description: "A reference to a Source Description Object combined with a JSON Pointer to reference an operation. This field is mutually exclusive of the operationId and workflowId fields respectively. The operation being referenced MUST be described within one of the sourceDescriptions descriptions. A Runtime Expression syntax MUST be used to identify the source description document. If the referenced operation has an operationId defined then the operationId SHOULD be preferred over the operationPath." + }, + workflowId: { + type: "string", + description: "The workflowId referencing an existing workflow within the Arazzo Description. If the referenced workflow is contained within an arazzo type sourceDescription, then the workflowId MUST be specified using a Runtime Expression (e.g., $sourceDescriptions..) to avoid ambiguity or potential clashes. The field is mutually exclusive of the operationId and operationPath fields respectively." + }, + parameters: "Parameters", + successCriteria: listOf("CriterionObject", { + description: "A list of assertions to determine the success of the step. Each assertion is described using a Criterion Object. All assertions MUST be satisfied for the step to be deemed successful." + }), + onSuccess: "OnSuccessActionList", + onFailure: "OnFailureActionList", + outputs: "Outputs", + "x-operation": "ExtendedOperation", + "x-security": "ExtendedSecurityList", + requestBody: "RequestBody" }, - /** - * @param {number} p - * @returns {number} - */ - wasm_on_message_begin: (p) => { - assert(currentParser.ptr === p) - return currentParser.onMessageBegin() + required: ["stepId"], + requiredOneOf: ["x-operation", "operationId", "operationPath", "workflowId"], + extensionsPrefix: "x-", + description: "Describes a single workflow step which MAY be a call to an API operation (OpenAPI Operation Object) or another Workflow Object." + }; + Outputs = { + properties: {}, + additionalProperties: { + type: "string" }, - /** - * @param {number} p - * @param {number} at - * @param {number} len - * @returns {number} - */ - 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)) + description: "A map between a friendly name and a dynamic output value defined using a Runtime Expression. The name MUST use keys that match the regular expression: ^[a-zA-Z0-9_.-]+$." + }; + RequestBody2 = { + properties: { + contentType: { + type: "string", + description: "The Content-Type for the request content. If omitted then refer to Content-Type specified at the targeted operation to understand serialization requirements." + }, + payload: {}, + replacements: listOf("Replacement", { + description: "A list of locations and values to set within a payload." + }) }, - /** - * @param {number} p - * @param {number} at - * @param {number} len - * @returns {number} - */ - 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)) + required: ["payload"], + extensionsPrefix: "x-", + description: "A single request body describing the Content-Type and request body content to be passed by a step to an operation." + }; + Replacement = { + properties: { + target: { + type: "string", + description: "REQUIRED. A JSON Pointer or XPath Expression which MUST be resolved against the request body. Used to identify the location to inject the value." + }, + value: {} }, - /** - * @param {number} p - * @param {number} statusCode - * @param {0|1} upgrade - * @param {0|1} shouldKeepAlive - * @returns {number} - */ - wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { - assert(currentParser.ptr === p) - return currentParser.onHeadersComplete(statusCode, upgrade === 1, shouldKeepAlive === 1) + required: ["target", "value"], + extensionsPrefix: "x-", + description: "Describes a location within a payload (e.g., a request body) and a value to set within the location." + }; + ExtendedSecurity = { + properties: { + schemeName: { + type: "string", + description: "REQUIRED. Name of the security scheme from your OpenAPI specification. Use with operationId or operationPath at the step level." + }, + values: {}, + scheme: "SecurityScheme" }, - /** - * @param {number} p - * @param {number} at - * @param {number} len - * @returns {number} - */ - 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)) + required: ["values"], + requiredOneOf: ["schemeName", "scheme"], + description: "Use the x-security extension to define authorization flows based on OpenAPI security schemes. Respect automatically constructs appropriate authorization headers, queries, or cookies based on your parameters." + }; + ExtendedOperation = { + properties: { + url: { + type: "string", + description: "REQUIRED. A valid url including the protocol (such as http://localhost:4000/my-api or https://example.com/api/my-api)." + }, + method: { + enum: [ + "get", + "post", + "put", + "delete", + "patch", + "head", + "options", + "trace", + "connect", + "query", + "GET", + "POST", + "PUT", + "DELETE", + "PATCH", + "OPTIONS", + "HEAD", + "TRACE", + "CONNECT", + "QUERY" + ], + description: "REQUIRED. HTTP operation method. Possible values: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, CONNECT, TRACE. You can also use their lowercase equivalents." + } }, - /** - * @param {number} p - * @returns {number} - */ - wasm_on_message_complete: (p) => { - assert(currentParser.ptr === p) - return currentParser.onMessageComplete() - } - - } - }) -} - -let llhttpInstance = null - -/** - * @type {Parser|null} - */ -let currentParser = null -let currentBufferRef = null -/** - * @type {number} - */ -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 { - /** - * @param {import('./client.js')} client - * @param {import('net').Socket} socket - * @param {*} llhttp - */ - constructor (client, socket, { exports }) { - this.llhttp = exports - this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE) - this.client = client - /** - * @type {import('net').Socket} - */ - this.socket = socket - this.timeout = null - this.timeoutValue = null - this.timeoutType = null - this.statusCode = 0 - 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() + required: ["url", "method"], + description: "x-operation enables you to specify a URL and HTTP method for an operation that is not described in the Arazzo sourceDescriptions section. The primary application of the x-operation extension is to facilitate calls to third-party APIs or other endpoints that are needed in a sequence of API calls." + }; + CriterionObject = { + properties: { + condition: { + type: "string", + description: "REQUIRED. The condition to apply. Conditions can be simple (e.g. $statusCode == 200 which applies an operator on a value obtained from a runtime expression), or a regex, or a JSONPath expression. For regex or JSONPath, the type and context MUST be specified." + }, + context: { + type: "string", + description: "A Runtime Expression used to set the context for the condition to be applied on. If type is specified, then the context MUST be provided (e.g. $response.body would set the context that a JSONPath query expression could be applied to)." + }, + type: (value) => { + if (!value) { + return void 0; + } else if (typeof value === "string") { + return { + enum: ["regex", "jsonpath", "simple", "xpath"], + description: "The type of condition to be applied." + }; + } else if (value?.type === "jsonpath") { + return "JSONPathCriterion"; + } else { + return "XPathCriterion"; + } } + }, + required: ["condition"], + description: "An object used to specify the context, conditions, and condition types that can be used to prove or satisfy assertions specified in Step Object successCriteria, Success Action Object criteria, and Failure Action Object criteria." + }; + JSONPathCriterion = { + properties: { + type: { type: "string", enum: ["jsonpath"] }, + version: { type: "string", enum: ["draft-goessner-dispatch-jsonpath-00"] } } - - this.timeoutValue = delay - } else if (this.timeout) { - 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) { - 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) - } - } - - /** - * @param {Buffer} chunk - */ - execute (chunk) { - assert(currentParser === null) - assert(this.ptr != null) - assert(!this.paused) - - const { socket, llhttp } = this - - // Allocate a new buffer if the current buffer is too small. - if (chunk.length > currentBufferSize) { - if (currentBufferPtr) { - llhttp.free(currentBufferPtr) - } - // Allocate a buffer that is a multiple of 4096 bytes. - currentBufferSize = Math.ceil(chunk.length / 4096) * 4096 - currentBufferPtr = llhttp.malloc(currentBufferSize) - } - - new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(chunk) - - // 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 = chunk - currentParser = this - ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, chunk.length) - } finally { - currentParser = null - currentBufferRef = null + }; + XPathCriterion = { + properties: { + type: { type: "string", enum: ["xpath"] }, + version: { type: "string", enum: ["xpath-30", "xpath-20", "xpath-10"] } } - - if (ret !== constants.ERROR.OK) { - const data = chunk.subarray(llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr) - - if (ret === constants.ERROR.PAUSED_UPGRADE) { - this.onUpgrade(data) - } else if (ret === constants.ERROR.PAUSED) { - this.paused = true - socket.unshift(data) + }; + SuccessActionObject = { + properties: { + name: { + type: "string", + description: "REQUIRED. The name of the success action. Names are case sensitive." + }, + type: { + type: "string", + enum: ["goto", "end"], + description: 'REQUIRED. The type of action to take. Possible values are "end" or "goto".' + }, + stepId: { + type: "string", + description: 'The stepId to transfer to upon success of the step. This field is only relevant when the type field value is "goto". The referenced stepId MUST be within the current workflow. This field is mutually exclusive to workflowId.' + }, + workflowId: { + type: "string", + description: 'The workflowId referencing an existing workflow within the Arazzo Description to transfer to upon success of the step. This field is only relevant when the type field value is "goto". If the referenced workflow is contained within an arazzo type sourceDescription, then the workflowId MUST be specified using a Runtime Expression (e.g., $sourceDescriptions..) to avoid ambiguity or potential clashes. This field is mutually exclusive to stepId.' + }, + criteria: listOf("CriterionObject", { + description: "A list of assertions to determine if this action SHALL be executed. Each assertion is described using a Criterion Object. All criteria assertions MUST be satisfied for the action to be executed." + }) + }, + required: ["type", "name"], + description: "A single success action which describes an action to take upon success of a workflow step." + }; + OnSuccessActionList = { + properties: {}, + items: (value) => { + if (value?.type && value?.name) { + return "SuccessActionObject"; } else { - const ptr = llhttp.llhttp_get_error_reason(this.ptr) - let message = '' - 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) + return "ReusableObject"; } } - } catch (err) { - util.destroy(socket, err) - } - } - - destroy () { - assert(currentParser === null) - assert(this.ptr != 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 - } - - /** - * @param {Buffer} buf - * @returns {0} - */ - onStatus (buf) { - this.statusText = buf.toString() - return 0 - } - - /** - * @returns {0|-1} - */ - onMessageBegin () { - const { socket, client } = this - - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - if (!request) { - return -1 - } - request.onResponseStarted() - - return 0 - } - - /** - * @param {Buffer} buf - * @returns {number} - */ - 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) - - return 0 - } - - /** - * @param {Buffer} buf - * @returns {number} - */ - 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) - - return 0 - } - - /** - * @param {number} len - */ - trackHeader (len) { - this.headersSize += len - if (this.headersSize >= this.headersMaxSize) { - util.destroy(this.socket, new HeadersOverflowError()) - } - } - - /** - * @param {Buffer} head - */ - 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 = 0 - this.statusText = '' - this.shouldKeepAlive = false - - 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]() - } - - /** - * @param {number} statusCode - * @param {boolean} upgrade - * @param {boolean} shouldKeepAlive - * @returns {number} - */ - onHeadersComplete (statusCode, upgrade, shouldKeepAlive) { - const { client, socket, headers, statusText } = this - - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - - 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) { - 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 + }; + FailureActionObject = { + properties: { + name: { + type: "string", + description: "REQUIRED. The name of the failure action. Names are case sensitive." + }, + type: { + type: "string", + enum: ["goto", "retry", "end"], + description: 'REQUIRED. The type of action to take. Possible values are "end", "retry", or "goto".' + }, + workflowId: { + type: "string", + description: 'The workflowId referencing an existing workflow within the Arazzo Description to transfer to upon failure of the step. This field is only relevant when the type field value is "goto" or "retry". If the referenced workflow is contained within an arazzo type sourceDescription, then the workflowId MUST be specified using a Runtime Expression (e.g., $sourceDescriptions..) to avoid ambiguity or potential clashes. This field is mutually exclusive to stepId. When used with "retry", context transfers back upon completion of the specified workflow.' + }, + stepId: { + type: "string", + description: 'The stepId to transfer to upon failure of the step. This field is only relevant when the type field value is "goto" or "retry". The referenced stepId MUST be within the current workflow. This field is mutually exclusive to workflowId. When used with "retry", context transfers back upon completion of the specified step.' + }, + retryAfter: { + type: "number", + minimum: 0, + description: 'A non-negative decimal indicating the seconds to delay after the step failure before another attempt SHALL be made. Note: if an HTTP Retry-After response header was returned to a step from a targeted operation, then it SHOULD overrule this particular field value. This field only applies when the type field value is "retry".' + }, + retryLimit: { + type: "number", + minimum: 0, + description: 'A non-negative integer indicating how many attempts to retry the step MAY be attempted before failing the overall step. If not specified then a single retry SHALL be attempted. This field only applies when the type field value is "retry". The retryLimit MUST be exhausted prior to executing subsequent failure actions.' + }, + criteria: listOf("CriterionObject", { + description: "A list of assertions to determine if this action SHALL be executed. Each assertion is described using a Criterion Object." + }) + }, + required: ["type", "name"], + description: "A single failure action which describes an action to take upon failure of a workflow step." + }; + OnFailureActionList = { + properties: {}, + items: (value) => { + if (value?.type && value?.name) { + return "FailureActionObject"; } else { - client[kKeepAliveTimeoutValue] = timeout + return "ReusableObject"; } - } 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 - } - - /** - * @param {Buffer} buf - * @returns {number} - */ - 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) { - 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 - } - - return 0 - } - - /** - * @returns {number} - */ - onMessageComplete () { - const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this - - if (socket.destroyed && (!statusCode || shouldKeepAlive)) { - return -1 - } - - if (upgrade) { - return 0 - } - - assert(statusCode >= 100) - assert((this.headers.length & 1) === 0) - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - - this.statusCode = 0 - this.statusText = '' - this.bytesRead = 0 - this.contentLength = '' - this.keepAlive = '' - this.connection = '' - - this.headers = [] - this.headersSize = 0 - - if (statusCode < 200) { - return 0 - } - - 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]() - } - - return 0 - } -} - -function onParserTimeout (parserWeakRef) { - const parser = parserWeakRef.deref() - if (!parser) { - return - } - - const { socket, timeoutType, client, paused } = parser - - 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')) - } -} - -/** - * @param {import ('./client.js')} client - * @param {import('net').Socket} socket - * @returns - */ -function connectH1 (client, socket) { - client[kSocket] = socket - - if (!llhttpInstance) { - llhttpInstance = lazyllhttp() - } - - if (socket.errored) { - throw socket.errored + }; + Arazzo1Types = { + Root: Root7, + Info: Info6, + SourceDescriptions, + OpenAPISourceDescription, + ArazzoSourceDescription, + Parameters, + Parameter: Parameter6, + ReusableObject, + Workflows, + Workflow, + Steps, + Step, + RequestBody: RequestBody2, + Replacement, + ExtendedOperation, + ExtendedSecurityList: listOf("ExtendedSecurity"), + ExtendedSecurity, + Outputs, + CriterionObject, + XPathCriterion, + JSONPathCriterion, + SuccessActionObject, + OnSuccessActionList, + FailureActionObject, + OnFailureActionList, + Schema: Oas3_2Types.Schema, + NamedSchemas: mapOf("Schema"), + ExternalDocs: Oas3_2Types.ExternalDocs, + DiscriminatorMapping: Oas3_2Types.DiscriminatorMapping, + Discriminator: Oas3_2Types.Discriminator, + DependentRequired: Oas3_2Types.DependentRequired, + SchemaProperties: Oas3_2Types.SchemaProperties, + PatternProperties: Oas3_2Types.SchemaProperties, + Components: Components6, + NamedInputs, + NamedParameters, + NamedSuccessActions, + NamedFailureActions, + Xml: Oas3_2Types.Xml, + SecurityScheme: Oas3_2Types.SecurityScheme, + OAuth2Flows: Oas3_2Types.OAuth2Flows, + ImplicitFlow: Oas3_2Types.ImplicitFlow, + PasswordFlow: Oas3_2Types.PasswordFlow, + ClientCredentials: Oas3_2Types.ClientCredentials, + AuthorizationCode: Oas3_2Types.AuthorizationCode, + DeviceAuthorization: Oas3_2Types.DeviceAuthorization + }; } +}); - if (socket.destroyed) { - throw new SocketError('destroyed') +// node_modules/@redocly/openapi-core/lib/types/overlay.js +var Root8, Info7, Actions, Action, Overlay1Types; +var init_overlay = __esm({ + "node_modules/@redocly/openapi-core/lib/types/overlay.js"() { + init_types(); + Root8 = { + properties: { + overlay: { + type: "string", + description: "REQUIRED. This string MUST be the version number of the Overlay Specification that the Overlay document uses. The overlay field SHOULD be used by tooling to interpret the Overlay document." + }, + info: "Info", + extends: { + type: "string", + description: "URI reference that identifies the target document (such as an [OpenAPI] document) this overlay applies to." + }, + actions: "Actions" + }, + required: ["overlay", "info", "actions"], + extensionsPrefix: "x-", + description: "This is the root object of the Overlay." + }; + Info7 = { + properties: { + title: { + type: "string", + description: "REQUIRED. A human readable description of the purpose of the overlay." + }, + version: { + type: "string", + description: "REQUIRED. A version identifer for indicating changes to the Overlay document." + } + }, + required: ["title", "version"], + extensionsPrefix: "x-", + description: "The object provides metadata about the Overlay. The metadata MAY be used by the clients if needed." + }; + Actions = listOf("Action"); + Action = { + properties: { + target: { + type: "string", + description: "REQUIRED A JSONPath expression selecting nodes in the target document." + }, + description: { + type: "string", + description: "A description of the action. [CommonMark] syntax MAY be used for rich text representation." + }, + update: {}, + // any + remove: { + type: "boolean", + description: "A boolean value that indicates that the target object or array MUST be removed from the the map or array it is contained in. The default value is false." + } + }, + required: ["target"], + extensionsPrefix: "x-", + description: "This object represents one or more changes to be applied to the target document at the location defined by the target JSONPath expression" + }; + Overlay1Types = { + Root: Root8, + Info: Info7, + Actions, + Action + }; } +}); - socket[kNoRef] = false - socket[kWriting] = false - socket[kReset] = false - socket[kBlocking] = false - socket[kParser] = new Parser(client, socket, llhttpInstance) - - util.addListener(socket, 'error', onHttpSocketError) - util.addListener(socket, 'readable', onHttpSocketReadable) - util.addListener(socket, 'end', onHttpSocketEnd) - util.addListener(socket, 'close', onHttpSocketClose) - - socket[kClosed] = false - socket.on('close', onSocketClose) - - return { - version: 'h1', - defaultPipelining: 1, - write (request) { - return writeH1(client, request) - }, - resume () { - resumeH1(client) - }, - /** - * @param {Error|undefined} err - * @param {() => void} callback - */ - destroy (err, callback) { - if (socket[kClosed]) { - queueMicrotask(callback) - } else { - socket.on('close', callback) - socket.destroy(err) - } - }, - /** - * @returns {boolean} - */ - get destroyed () { - return socket.destroyed - }, - /** - * @param {import('../core/request.js')} request - * @returns {boolean} - */ - 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 +// node_modules/@redocly/openapi-core/lib/types/openrpc.js +var Root9, Info8, Contact4, License5, Server5, ServerVariable3, Method, ContentDescriptor, ExamplePairing, Example4, Link2, ErrorObject, Components7, Tag5, ExternalDocs4, OpenRpcTypes; +var init_openrpc = __esm({ + "node_modules/@redocly/openapi-core/lib/types/openrpc.js"() { + init_types(); + init_json_schema_draft7_shared(); + Root9 = { + properties: { + openrpc: { + type: "string", + description: "REQUIRED. This string MUST be the semantic version number of the OpenRPC Specification version that the OpenRPC document uses. The openrpc field SHOULD be used by tooling specifications and clients to interpret the OpenRPC document. This is not related to the API info.version string." + }, + info: "Info", + servers: "ServerList", + methods: "MethodList", + components: "Components", + externalDocs: "ExternalDocs" + }, + required: ["openrpc", "info", "methods"], + extensionsPrefix: "x-", + description: "This is the root object of the OpenRPC document. The contents of this object represent a whole OpenRPC document. How this object is constructed or stored is outside the scope of the OpenRPC Specification." + }; + Info8 = { + properties: { + title: { + type: "string", + description: "REQUIRED. The title of the application." + }, + description: { + type: "string", + description: "A verbose description of the application. GitHub Flavored Markdown syntax MAY be used for rich text representation." + }, + termsOfService: { + type: "string", + description: "A URL to the Terms of Service for the API. MUST be in the format of a URL." + }, + contact: "Contact", + license: "License", + version: { + type: "string", + description: "REQUIRED. The version of the OpenRPC document (which is distinct from the OpenRPC Specification version or the API implementation version)." } - - 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 + }, + required: ["title", "version"], + extensionsPrefix: "x-", + description: "REQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required." + }; + Contact4 = { + properties: { + name: { + type: "string", + description: "The identifying name of the contact person/organization." + }, + url: { + type: "string", + description: "The URL pointing to the contact information. MUST be in the format of a URL." + }, + email: { + type: "string", + description: "The email address of the contact person/organization. MUST be in the format of an email address." } - - 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 + }, + extensionsPrefix: "x-", + description: "Contact information for the exposed API." + }; + License5 = { + properties: { + name: { + type: "string", + description: "REQUIRED. The license name used for the API." + }, + url: { + type: "string", + description: "A URL to the license used for the API. MUST be in the format of a URL." } - } - - return false - } + }, + required: ["name"], + extensionsPrefix: "x-", + description: "License information for the exposed API." + }; + Server5 = { + properties: { + url: { + type: "string", + description: "REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenRPC document is being served. Server Variables are passed into the Runtime Expression to produce a server URL." + }, + name: { + type: "string", + description: "REQUIRED. A name to be used as the canonical name for the server." + }, + description: { + type: "string", + description: "An optional string describing the host designated by the URL. GitHub Flavored Markdown syntax MAY be used for rich text representation." + }, + summary: { + type: "string", + description: "A short summary of what the server is." + }, + variables: "ServerVariablesMap" + }, + required: ["url"], + extensionsPrefix: "x-", + description: "An object representing a Server." + }; + ServerVariable3 = { + properties: { + enum: { + type: "array", + items: { type: "string" }, + description: "An enumeration of string values to be used if the substitution options are from a limited set." + }, + default: { + type: "string", + description: `REQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. Note this behavior is different than the Schema Object\u2019s treatment of default values, because in those cases parameter values are optional.` + }, + description: { + type: "string", + description: "An optional description for the server variable. GitHub Flavored Markdown syntax MAY be used for rich text representation." + } + }, + required: ["default"], + extensionsPrefix: "x-", + description: "An object representing a Server Variable for server URL template substitution." + }; + Method = { + properties: { + name: { + type: "string", + description: "REQUIRED. The cannonical name for the method. The name MUST be unique within the methods array." + }, + tags: "TagList", + summary: { + type: "string", + description: "A short summary of what the method does." + }, + description: { + type: "string", + description: "A verbose explanation of the method behavior. GitHub Flavored Markdown syntax MAY be used for rich text representation." + }, + externalDocs: "ExternalDocs", + params: "ContentDescriptorList", + result: "ContentDescriptor", + deprecated: { + type: "boolean", + description: "Declares this method to be deprecated. Consumers SHOULD refrain from usage of the declared method. Default value is false." + }, + servers: "ServerList", + errors: "ErrorList", + links: "LinkList", + paramStructure: { enum: ["by-name", "by-position", "either"] }, + examples: "ExamplePairingList" + }, + required: ["name", "params"], + extensionsPrefix: "x-", + description: "Describes the interface for the given method name. The method name is used as the method field of the JSON-RPC body. It therefore MUST be unique." + }; + ContentDescriptor = { + properties: { + name: { + type: "string", + description: "REQUIRED. Name of the content that is being described. If the content described is a method parameter assignable by-name, this field SHALL define the parameter\u2019s key (ie name)." + }, + summary: { + type: "string", + description: "A short summary of the content that is being described." + }, + description: { + type: "string", + description: `A verbose explanation of the content descriptor behavior. GitHub Flavored Markdown syntax MAY be used for rich text representation.` + }, + required: { + type: "boolean", + description: "Determines if the content is a required field. Default value is false." + }, + schema: "Schema", + deprecated: { + type: "boolean", + description: "Specifies that the content is deprecated and SHOULD be transitioned out of usage. Default value is false." + } + }, + required: ["name", "schema"], + extensionsPrefix: "x-", + description: "Content Descriptors are objects that do just as they suggest - describe content. They are reusable ways of describing either parameters or result. They MUST have a schema." + }; + ExamplePairing = { + properties: { + name: { + type: "string", + description: "REQUIRED Name for the example pairing." + }, + description: { + type: "string", + description: "A verbose explanation of the example pairing." + }, + summary: { + type: "string", + description: "Short description for the example pairing." + }, + params: "ExampleList", + result: "Example" + }, + extensionsPrefix: "x-", + description: "The Example Pairing object consists of a set of example params and result. The result is what you can expect from the JSON-RPC service given the exact params." + }; + Example4 = { + properties: { + name: { + type: "string", + description: "Cannonical name of the example." + }, + summary: { + type: "string", + description: "Short description for the example." + }, + description: { + type: "string", + description: "A verbose explanation of the example. GitHub Flavored Markdown syntax MAY be used for rich text representation." + }, + value: { + resolvable: false, + description: "Embedded literal example. The value field and externalValue field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON, use a string value to contain the example, escaping where necessary." + }, + externalValue: { + type: "string", + description: "A URL that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON documents. The value field and externalValue field are mutually exclusive." + } + }, + extensionsPrefix: "x-", + description: "The Example object is an object that defines an example that is intended to match the schema of a given Content Descriptor." + }; + Link2 = { + properties: { + name: { + type: "string", + description: "REQUIRED. Canonical name of the link." + }, + description: { + type: "string", + description: "A description of the link. GitHub Flavored Markdown syntax MAY be used for rich text representation." + }, + summary: { + type: "string", + description: "Short description for the link." + }, + method: { + type: "string", + description: "The name of an existing, resolvable OpenRPC method, as defined with a unique method. This field MUST resolve to a unique Method Object. As opposed to Open Api, Relative method values ARE NOT permitted." + }, + params: { + type: "object", + description: "A map representing parameters to pass to a method as specified with method. The key is the parameter name to be used, whereas the value can be a constant or a runtime expression to be evaluated and passed to the linked method." + }, + // Map[string, Any | Runtime Expression] + server: "Server" + }, + required: ["name"], + extensionsPrefix: "x-", + description: "The Link object represents a possible design-time link for a result. The presence of a link does not guarantee the caller\u2019s ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between results and other methods." + }; + ErrorObject = { + properties: { + code: { + type: "integer", + description: "REQUIRED. A Number that indicates the error type that occurred. This MUST be an integer. The error codes from and including -32768 to -32000 are reserved for pre-defined errors. These pre-defined errors SHOULD be assumed to be returned from any JSON-RPC api." + }, + message: { + type: "string", + description: "REQUIRED. A String providing a short description of the error. The message SHOULD be limited to a concise single sentence." + }, + data: { + resolvable: false, + description: "A Primitive or Structured value that contains additional information about the error. This may be omitted. The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.)." + } + }, + required: ["code", "message"], + extensionsPrefix: "x-", + description: "Defines an application level error." + }; + Components7 = { + properties: { + contentDescriptors: "NamedContentDescriptors", + schemas: "NamedSchemas", + examples: "NamedExamples", + links: "NamedLinks", + errors: "NamedErrors", + examplePairingObjects: "NamedExamplePairingObjects", + tags: "NamedTags" + }, + extensionsPrefix: "x-", + description: "Holds a set of reusable objects for different aspects of the OpenRPC. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object." + }; + Tag5 = { + properties: { + name: { + type: "string", + description: "REQUIRED. The name of the tag." + }, + summary: { + type: "string", + description: "A short summary of the tag." + }, + description: { + type: "string", + description: "A verbose explanation for the tag. GitHub Flavored Markdown syntax MAY be used for rich text representation." + }, + externalDocs: "ExternalDocs" + }, + required: ["name"], + extensionsPrefix: "x-", + description: "Adds metadata to a single tag that is used by the Method Object. It is not mandatory to have a Tag Object per tag defined in the Method Object instances." + }; + ExternalDocs4 = { + properties: { + description: { + type: "string", + description: "A verbose explanation of the target documentation. GitHub Flavored Markdown syntax MAY be used for rich text representation." + }, + url: { + type: "string", + description: "REQUIRED. The URL for the target documentation. Value MUST be in the format of a URL." + } + }, + required: ["url"], + extensionsPrefix: "x-", + description: "Allows referencing an external resource for extended documentation." + }; + OpenRpcTypes = { + Root: Root9, + Info: Info8, + Contact: Contact4, + License: License5, + Server: Server5, + ServerList: listOf("Server"), + ServerVariable: ServerVariable3, + ServerVariablesMap: mapOf("ServerVariable"), + Method, + MethodList: listOf("Method"), + ContentDescriptor, + ContentDescriptorList: listOf("ContentDescriptor"), + ExamplePairing, + ExamplePairingList: listOf("ExamplePairing"), + Example: Example4, + ExampleList: listOf("Example"), + Link: Link2, + LinkList: listOf("Link"), + ErrorObject, + ErrorList: listOf("ErrorObject"), + Components: Components7, + Tag: Tag5, + TagList: listOf("Tag"), + ExternalDocs: ExternalDocs4, + Schema: Schema5, + SchemaProperties: SchemaProperties4, + Dependencies, + DiscriminatorMapping: DiscriminatorMapping2, + Discriminator: Discriminator3, + NamedContentDescriptors: mapOf("ContentDescriptor"), + NamedSchemas: mapOf("Schema"), + NamedExamples: mapOf("Example"), + NamedLinks: mapOf("Link"), + NamedErrors: mapOf("ErrorObject"), + NamedExamplePairingObjects: mapOf("ExamplePairing"), + NamedTags: mapOf("Tag") + }; } -} - -function onHttpSocketError (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 +// node_modules/@redocly/config/lib-esm/index.js +function D(d, m) { + return Object.fromEntries(m.filter((o) => o in d).map((o) => [o, d[o]])); +} +function j(d, m) { + return Object.fromEntries(Object.entries(d).filter(([o]) => !m.includes(o))); +} +function te(d, m, o) { + return Object.fromEntries(Object.entries(d).map(([f, h]) => { + if (!(f === m && o !== "properties")) return typeof h != "object" || !h ? [f, h] : Array.isArray(h) ? [f, h.map((oe2) => typeof oe2 == "object" ? te(oe2, m, f) : oe2)] : [f, te(h, m, f)]; + }).filter(Boolean)); +} +var he, E, Ue, a, Fe, R, S, C, ze, Ge, Ye, Ke, He, P, Se, We, Ve, Ce, $e, u, A, Je, Xe, Qe, Ze, et, tt, L, rt, n, ot, Pe, it, st, at, nt, je, pt, N, ct, lt, yt, xe, dt, Te, gt, mt, ut, O, bt, ft, ht, St, Ct, Pt, jt, xt, ve, vt, Tt, kt, Et, Rt, It, ie, p, At, c, Lt, l, Ot, Nt, b, q, i, r, ke, se, ae, Dt, qt, wt, _t, Mt, w, _, M, B, U, F, z, G, Y, K, x, Bt, H, W, V, v, vo, Ut, Ft, zt, Gt, Yt, Kt, Ht, ne, Wt, $, J, X, Q, Vt, $t, T, k, Jt, Xt, Qt, y, Zt, er, tr, rr, Z, Ee, ce, pe, or, Re, Ae, ir, sr, ar, nr, Ie, pr, cr, ee, s, le, ye, de, Le, dr, gr, re, mr, ur, br, fr, Oe, hr, Sr, Cr, Pr, jr, we, _e, Me, Be, xr, vr, Tr, e, kr, Er, me, Rr, Ir, Ne, De, Ar, Lr, ue, Or, Nr, Dr, qr, wr, ge, _r, Mr, Br, qe, Ur, Fr, zr, I, Gr, Yr, be, Kr, fe, t, Hr, Wr, Vr, $r, Jr, Xr, Qr, Zr, eo, to, g, ci, li; +var init_lib_esm = __esm({ + "node_modules/@redocly/config/lib-esm/index.js"() { + he = { hide: { type: "boolean", default: false }, component: { type: "string", enum: ["radio", "checkbox"], default: "checkbox" }, label: { type: "string" }, items: { type: "array", items: { type: "string" } } }; + E = { type: "object", properties: he, additionalProperties: false }; + Ue = { type: "object", properties: { hide: { type: "boolean", default: false }, label: { type: "string" }, placeholder: { type: "string" } }, additionalProperties: false }; + a = { type: "object", properties: { hide: { type: "boolean", default: false }, type: { type: "string", enum: ["rating", "sentiment", "comment", "reasons", "mood", "scale"], default: "sentiment" }, settings: { type: "object", properties: { label: { type: "string" }, submitText: { type: "string" }, buttonText: { type: "string" }, component: { type: "string", enum: ["radio", "checkbox"], default: "checkbox" }, items: { type: "array", items: { type: "string" }, minItems: 1 }, leftScaleLabel: { type: "string" }, rightScaleLabel: { type: "string" }, reasons: { type: "object", properties: { ...he, like: E, dislike: E, satisfied: E, neutral: E, dissatisfied: E }, additionalProperties: false }, comment: { type: "object", properties: { hide: { type: "boolean", default: false }, label: { type: "string" }, likeLabel: { type: "string" }, dislikeLabel: { type: "string" }, satisfiedLabel: { type: "string" }, neutralLabel: { type: "string" }, dissatisfiedLabel: { type: "string" } }, additionalProperties: false }, optionalEmail: Ue }, additionalProperties: false } }, additionalProperties: false }; + Fe = { type: "object", properties: { languages: { type: "array", items: { type: "object", properties: { lang: { type: "string", examples: ["curl", "JavaScript", "Node.js", "Python", "Java8+Apache", "Java", "C#", "C#+Newtonsoft", "PHP", "Go", "Ruby", "R", "Payload"] }, label: { type: "string" }, options: { type: "object", properties: { indent: { type: "string" }, withImports: { type: "boolean" }, withComments: { type: "boolean" }, binary: { type: "boolean" }, credentials: { type: "string", enum: ["omit", "same-origin", "include"] } }, additionalProperties: false } }, required: ["lang"], additionalProperties: false } }, skipOptionalParameters: { type: "boolean" }, withOAuth2Call: { type: "boolean" } }, additionalProperties: false }; + R = { type: "array", items: { type: "object", properties: { title: { type: "string" }, url: { type: "string" } }, required: ["url"], additionalProperties: false } }; + S = { type: "object", properties: { licenseKey: { type: "string" }, hideLoading: { type: "boolean" }, disableRouter: { type: "boolean" }, hideSidebar: { type: "boolean" }, feedback: a, hideReplay: { type: "boolean" }, oAuth2RedirectURI: { type: "string", nullable: true }, corsProxyUrl: { type: "string" }, sortRequiredPropsFirst: { type: "boolean" }, sanitize: { type: "boolean" }, hideDownloadButtons: { type: "boolean" }, downloadUrls: R, onlyRequiredInSamples: { type: "boolean" }, generatedSamplesMaxDepth: { oneOf: [{ type: "number" }, { type: "string" }] }, showExtensions: { oneOf: [{ type: "boolean" }, { type: "string" }, { type: "array", items: { type: "string" } }] }, hideSchemaTitles: { type: "boolean" }, jsonSamplesExpandLevel: { oneOf: [{ type: "number" }, { type: "string" }] }, schemasExpansionLevel: { oneOf: [{ type: "number" }, { type: "string" }] }, mockServer: { type: "object", properties: { url: { type: "string" }, position: { type: "string", enum: ["first", "last", "replace", "off"] }, description: { type: "string" } } }, maxDisplayedEnumValues: { type: "number" }, schemaDefinitionsTagName: { type: "string" }, layout: { type: "string", enum: ["stacked", "three-panel"] }, hideInfoMetadata: { type: "boolean" }, events: { type: "object" }, skipBundle: { type: "boolean" }, routingBasePath: { type: "string" }, codeSamples: Fe, ignoreNamedSchemas: { oneOf: [{ type: "array", items: { type: "string" } }, { type: "string" }] }, hidePropertiesPrefix: { type: "boolean" }, excludeFromSearch: { type: "boolean" }, showSchemaCatalogLinks: { type: "boolean" } }, additionalProperties: false }; + C = { type: "object", properties: { includeByName: { type: "array", items: { type: "string" } }, excludeByName: { type: "array", items: { type: "string" } } }, additionalProperties: false }; + ze = { type: "object", properties: { name: { type: "string" }, items: C, queries: C, mutations: C, subscriptions: C, types: C, directives: C }, required: ["name"], additionalProperties: false }; + Ge = { type: "object", properties: { requireExactGroups: { type: "boolean" }, groups: { type: "array", items: ze }, otherItemsGroupName: { type: "string" } }, required: ["requireExactGroups", "groups", "otherItemsGroupName"], additionalProperties: false }; + Ye = { type: "object", properties: { name: { type: "string" }, url: { type: "string", format: "uri" }, email: { type: "string", format: "email" } }, additionalProperties: false }; + Ke = { type: "object", properties: { name: { type: "string" }, url: { type: "string", format: "uri" }, identifier: { type: "string" } }, additionalProperties: false }; + He = { type: "object", properties: { title: { type: "string" }, version: { type: "string" }, description: { type: "string" }, termsOfService: { type: "string", format: "uri" }, contact: Ye, license: Ke }, additionalProperties: false }; + P = { type: "object", properties: { menu: { type: "object", properties: { ...Ge.properties }, additionalProperties: false }, sidebar: { type: "object", properties: { hide: { type: "boolean" } } }, downloadUrls: R, apiLogo: { type: "object", properties: { imageUrl: { type: "string" }, href: { type: "string" }, altText: { type: "string" }, backgroundColor: { type: "string" } } }, jsonSamplesDepth: { type: "number" }, samplesMaxInlineArgs: { type: "number" }, licenseKey: { type: "string" }, fieldExpandLevel: { type: "number" }, baseUrlPath: { type: "string" }, metadata: { type: "object", properties: { apiId: { type: "string" } }, additionalProperties: true }, feedback: a, layout: { type: "string", enum: ["stacked", "three-panel"] }, showBuiltInScalars: { type: "boolean" }, showBuiltInDirectives: { type: "boolean" }, info: He }, additionalProperties: false }; + Se = { type: "object", properties: { downloadUrls: R, apiLogo: { type: "object", properties: { imageUrl: { type: "string" }, href: { type: "string" }, altText: { type: "string" }, backgroundColor: { type: "string" } } }, jsonSamplesDepth: { type: "number" }, samplesMaxInlineArgs: { type: "number" }, fieldExpandLevel: { type: "number" }, baseUrlPath: { type: "string" }, metadata: { type: "object", properties: { apiId: { type: "string" } }, additionalProperties: true }, feedback: a, layout: { type: "string", enum: ["stacked", "three-panel"] } }, additionalProperties: false }; + We = { type: "object", properties: { label: { type: "string" }, lang: { enum: ["curl", "C#", "Go", "Java", "Java8+Apache", "JavaScript", "Node.js", "PHP", "Python", "R", "Ruby"] } }, required: ["lang"] }; + Ve = { type: "object", properties: { enum: { type: "string" }, enumSingleValue: { type: "string" }, enumArray: { type: "string" }, default: { type: "string" }, deprecated: { type: "string" }, example: { type: "string" }, examples: { type: "string" }, nullable: { type: "string" }, recursive: { type: "string" }, arrayOf: { type: "string" }, webhook: { type: "string" }, authorizations: { type: "string" }, tryItAuthBasicUsername: { type: "string" }, tryItAuthBasicPassword: { type: "string" } } }; + Ce = { type: "object", properties: { label: { type: "string" }, link: { type: "string" }, target: { type: "string" } }, required: ["label", "link"] }; + $e = { type: "object", properties: { beforeInfo: { type: "array", items: Ce }, end: { type: "array", items: Ce } } }; + u = { type: "object", properties: { main: { type: "string" }, light: { type: "string" }, dark: { type: "string" }, contrastText: { type: "string" } } }; + A = { type: "object", properties: { backgroundColor: { type: "string" }, borderColor: { type: "string" }, color: { type: "string" }, tabTextColor: { type: "string" } } }; + Je = { type: "object", properties: D(u.properties, ["light", "dark"]) }; + Xe = { type: "object", properties: { basic: { type: "string" }, delete: { type: "string" }, get: { type: "string" }, head: { type: "string" }, link: { type: "string" }, options: { type: "string" }, patch: { type: "string" }, post: { type: "string" }, put: { type: "string" } } }; + Qe = { type: "object", properties: { error: A, info: A, redirect: A, success: A } }; + Ze = { type: "object", properties: j(u.properties, ["dark"]) }; + et = { type: "object", properties: { primary: { type: "string" }, secondary: { type: "string" }, light: { type: "string" } } }; + tt = { type: "object", properties: { accent: u, border: Je, error: u, http: Xe, primary: u, responses: Qe, secondary: Ze, success: u, text: et, tonalOffset: { type: "number" }, warning: u } }; + L = { type: "object", properties: { fontSize: { type: "string" }, padding: { type: "string" }, minWidth: { type: "string" } } }; + rt = { type: "object", properties: { small: L, medium: L, large: L, xlarge: L } }; + n = { type: "object", properties: { fontFamily: { type: "string" }, fontSize: { type: "string" }, fontWeight: { type: "string" }, lineHeight: { type: "string" } } }; + ot = { type: "object", properties: { ...j(n.properties, ["fontSize", "lineHeight"]), borderRadius: { type: "string" }, hoverStyle: { type: "string" }, boxShadow: { type: "string" }, hoverBoxShadow: { type: "string" }, sizes: rt } }; + Pe = { type: "object", properties: D(n.properties, ["fontSize", "lineHeight"]) }; + it = { type: "object", properties: { medium: Pe, small: Pe } }; + st = { type: "object", properties: { ...j(n.properties, ["fontSize", "lineHeight"]), borderRadius: { type: "string" }, color: { type: "string" }, sizes: it } }; + at = { type: "object", properties: { top: { type: "string" }, width: { type: "string" }, height: { type: "string" } } }; + nt = { type: "object", properties: { borderRadius: { type: "string" }, backgroundColor: { type: "string" } } }; + je = { type: "object", properties: { fullWidth: { type: "boolean" } } }; + pt = { type: "object", properties: { buttons: ot, httpBadges: st, layoutControls: at, panels: nt, tryItButton: je, tryItSendButton: je } }; + N = { type: "object", properties: { small: { type: "string" }, medium: { type: "string" }, large: { type: "string" } } }; + ct = { type: "object", properties: { maxWidth: N } }; + lt = { type: "object", properties: { maxWidth: N, middlePanelMaxWidth: N } }; + yt = { type: "object", properties: { showDarkRightPanel: { type: "boolean" }, stacked: ct, "three-panel": lt } }; + xe = { type: "object", properties: { backgroundColor: { type: "string" }, border: { type: "string" } } }; + dt = { type: "object", properties: { breakFieldNames: { type: "boolean" }, caretColor: { type: "string" }, caretSize: { type: "string" }, constraints: xe, defaultDetailsWidth: { type: "string" }, examples: xe, labelsTextSize: { type: "string" }, linesColor: { type: "string" }, nestedBackground: { type: "string" }, nestingSpacing: { type: "string" }, requireLabelColor: { type: "string" }, typeNameColor: { type: "string" }, typeTitleColor: { type: "string" } } }; + Te = { type: "object", properties: { subItemsColor: { type: "string" }, textTransform: { type: "string" }, fontWeight: { type: "string" } } }; + gt = { type: "object", properties: D(Te.properties, ["textTransform"]) }; + mt = { type: "object", properties: { unit: { type: "number" }, paddingHorizontal: { type: "string" }, paddingVertical: { type: "string" }, offsetTop: { type: "string" }, offsetLeft: { type: "string" }, offsetNesting: { type: "string" } } }; + ut = { type: "object", properties: { ...j(n.properties, ["fontWeight", "lineHeight"]), activeBgColor: { type: "string" }, activeTextColor: { type: "string" }, backgroundColor: { type: "string" }, borderRadius: { type: "string" }, breakPath: { type: "boolean" }, caretColor: { type: "string" }, caretSize: { type: "string" }, groupItems: Te, level1items: gt, rightLineColor: { type: "string" }, separatorLabelColor: { type: "string" }, showAtBreakpoint: { type: "string" }, spacing: mt, textColor: { type: "string" }, width: { type: "string" } } }; + O = { type: "object", properties: { ...n.properties, color: { type: "string" }, transform: { type: "string" } } }; + bt = { type: "object", properties: { ...n.properties, backgroundColor: { type: "string" }, color: { type: "string" }, wordBreak: { type: "string", enum: ["break-all", "break-word", "keep-all", "normal", "revert", "unset", "inherit", "initial"] }, wrap: { type: "boolean" } } }; + ft = { type: "object", properties: j(n.properties, ["fontSize"]) }; + ht = { type: "object", properties: { color: { type: "string" }, hover: { type: "string" }, textDecoration: { type: "string" }, hoverTextDecoration: { type: "string" }, visited: { type: "string" } } }; + St = { type: "object", properties: { code: bt, fieldName: n, ...D(n.properties, ["fontSize", "fontFamily"]), fontWeightBold: { type: "string" }, fontWeightLight: { type: "string" }, fontWeightRegular: { type: "string" }, heading1: O, heading2: O, heading3: O, headings: ft, lineHeight: { type: "string" }, links: ht, optimizeSpeed: { type: "boolean" }, rightPanelHeading: O, smoothing: { type: "string", enum: ["auto", "none", "antialiased", "subpixel-antialiased", "grayscale"] } } }; + Ct = { type: "object", properties: { color: { type: "string" }, ...j(n.properties, ["fontWeight"]) } }; + Pt = { type: "object", properties: { backgroundColor: { type: "string" }, borderRadius: { type: "string" }, tokens: Ct } }; + jt = { type: "object", properties: { gutter: { type: "string" }, maxHeight: { type: "string" }, maxWidth: { type: "string" } } }; + xt = { type: "object", properties: { backgroundColor: { type: "string" }, color: { type: "string" } } }; + ve = { type: "object", properties: { custom: { type: "string" } } }; + vt = { type: "object", properties: { DownloadButton: ve, NextSectionButton: ve } }; + Tt = { type: "object", properties: { backgroundColor: { type: "string" }, panelBackgroundColor: { type: "string" }, panelControlsBackgroundColor: { type: "string" }, showAtBreakpoint: { type: "string" }, textColor: { type: "string" }, width: { type: "string" } } }; + kt = { type: "object", properties: { borderRadius: { type: "string" } } }; + Et = { type: "object", properties: { sectionHorizontal: { type: "number" }, sectionVertical: { type: "number" }, unit: { type: "number" } } }; + Rt = { type: "object", properties: { breakpoints: N, codeBlock: Pt, colors: tt, components: pt, layout: yt, logo: jt, fab: xt, overrides: vt, rightPanel: Tt, schema: dt, shape: kt, sidebar: ut, spacing: Et, typography: St, links: { properties: { color: { type: "string" } } }, codeSample: { properties: { backgroundColor: { type: "string" } } } } }; + It = { type: "object", properties: { skipOptionalParameters: { type: "boolean" }, languages: { type: "array", items: We } }, required: ["languages"] }; + ie = { type: "object", properties: { theme: Rt, ctrlFHijack: { type: "boolean" }, defaultSampleLanguage: { type: "string" }, disableDeepLinks: { type: "boolean" }, disableSearch: { type: "boolean" }, disableSidebar: { type: "boolean" }, downloadDefinitionUrl: { type: "string" }, expandDefaultServerVariables: { type: "boolean" }, enumSkipQuotes: { type: "boolean" }, expandDefaultRequest: { type: "boolean" }, expandDefaultResponse: { type: "boolean" }, expandResponses: { type: "string" }, expandSingleSchemaField: { type: "boolean" }, generateCodeSamples: It, generatedPayloadSamplesMaxDepth: { type: "number" }, hideDownloadButton: { type: "boolean" }, hideHostname: { type: "boolean" }, hideInfoSection: { type: "boolean" }, hideLogo: { type: "boolean" }, hideRequestPayloadSample: { type: "boolean" }, hideRightPanel: { type: "boolean" }, hideSchemaPattern: { type: "boolean" }, hideSingleRequestSampleTab: { type: "boolean" }, hideSecuritySection: { type: "boolean" }, hideTryItPanel: { type: "boolean" }, hideFab: { type: "boolean" }, hideOneOfDescription: { type: "boolean" }, htmlTemplate: { type: "string" }, jsonSampleExpandLevel: { oneOf: [{ type: "number", minimum: 1 }, { type: "string" }] }, labels: Ve, menuToggle: { type: "boolean" }, nativeScrollbars: { type: "boolean" }, noAutoAuth: { type: "boolean" }, onDeepLinkClick: { type: "object" }, pagination: { enum: ["none", "section", "item"] }, pathInMiddlePanel: { type: "boolean" }, payloadSampleIdx: { type: "number", minimum: 0 }, requiredPropsFirst: { type: "boolean" }, routingStrategy: { type: "string" }, samplesTabsMaxCount: { type: "number" }, schemaExpansionLevel: { oneOf: [{ type: "number", minimum: 0 }, { type: "string" }] }, minCharacterLengthToInitSearch: { type: "number", minimum: 1 }, maxResponseHeadersToShowInTryIt: { type: "number", minimum: 0 }, scrollYOffset: { oneOf: [{ type: "number" }, { type: "string" }] }, searchAutoExpand: { type: "boolean" }, searchFieldLevelBoost: { type: "number", minimum: 0 }, searchMaxDepth: { type: "number", minimum: 1 }, searchMode: { type: "string", enum: ["default", "path-only"] }, searchOperationTitleBoost: { type: "number" }, searchTagTitleBoost: { type: "number" }, sendXUserAgentInTryIt: { type: "boolean" }, showChangeLayoutButton: { type: "boolean" }, showConsole: { type: "boolean" }, showNextButton: { type: "boolean" }, showRightPanelToggle: { type: "boolean" }, showSecuritySchemeType: { type: "boolean" }, showWebhookVerb: { type: "boolean" }, showObjectSchemaExamples: { type: "boolean" }, disableTryItRequestUrlEncoding: { type: "boolean" }, sidebarLinks: $e, sideNavStyle: { type: "string", enum: ["summary-only", "path-first", "id-only", "path-only"] }, simpleOneOfTypeLabel: { type: "boolean" }, sortEnumValuesAlphabetically: { type: "boolean" }, sortOperationsAlphabetically: { type: "boolean" }, sortPropsAlphabetically: { type: "boolean" }, sortTagsAlphabetically: { type: "boolean" }, suppressWarnings: { type: "boolean" }, unstable_externalDescription: { type: "boolean" }, unstable_ignoreMimeParameters: { type: "boolean" }, untrustedDefinition: { type: "boolean" }, showAccessMode: { type: "boolean" }, preserveOriginalExtensionsName: { type: "boolean" }, markdownHeadingsAnchorLevel: { type: "number" } }, additionalProperties: false }; + p = { nodeTypeName: void 0, type: "object", additionalProperties: { oneOf: [{ type: "string" }, { type: "object" }] }, description: "The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.", documentationLink: "https://redocly.com/docs/cli/configuration/reference/rules#rules" }; + At = { rules: p, oas2Rules: p, oas3_0Rules: p, oas3_1Rules: p, oas3_2Rules: p, async2Rules: p, async3Rules: p, arazzo1Rules: p, overlay1Rules: p, openrpc1Rules: p }; + c = { nodeTypeName: void 0, type: "object", additionalProperties: true }; + Lt = { preprocessors: c, oas2Preprocessors: c, oas3_0Preprocessors: c, oas3_1Preprocessors: c, oas3_2Preprocessors: c, async2Preprocessors: c, async3Preprocessors: c, arazzo1Preprocessors: c, overlay1Preprocessors: c, openrpc1Preprocessors: c }; + l = { nodeTypeName: void 0, type: "object", additionalProperties: true }; + Ot = { decorators: l, oas2Decorators: l, oas3_0Decorators: l, oas3_1Decorators: l, oas3_2Decorators: l, async2Decorators: l, async3Decorators: l, arazzo1Decorators: l, overlay1Decorators: l, openrpc1Decorators: l }; + Nt = { nodeTypeName: void 0, type: "array", items: { type: "string" }, description: "Use extends to inherit rules and their configurations from other rulesets.", documentationLink: "https://redocly.com/docs/cli/configuration/reference/extends" }; + b = { ...At, ...Ot, ...Lt, extends: Nt }; + q = (d) => d; + i = q({ RedirectSource: "RedirectSource", Redirects: "Redirects", ScorecardClassic: "ScorecardClassic", ScorecardClassicLevelList: "ScorecardClassicLevelList", ScorecardClassicLevel: "ScorecardClassicLevel", ScorecardClassicTargetList: "ScorecardClassicTargetList", ScorecardClassicTarget: "ScorecardClassicTarget", ScorecardClassicTargetWhere: "ScorecardClassicTargetWhere", ScorecardClassicTargetWhereMetadata: "ScorecardClassicTargetWhereMetadata", ScorecardClassicTeamMetadataProperty: "ScorecardClassicTeamMetadataProperty" }); + r = { type: "object", properties: { hide: { type: "boolean" } }, additionalProperties: false }; + ke = { type: "object", properties: { src: { type: "string" }, async: { type: "boolean" }, crossorigin: { type: "string" }, defer: { type: "boolean" }, fetchpriority: { type: "string" }, integrity: { type: "string" }, module: { type: "boolean" }, nomodule: { type: "boolean" }, nonce: { type: "string" }, referrerpolicy: { type: "string" }, type: { type: "string" } }, required: ["src"], additionalProperties: true }; + se = { type: "object", properties: { page: { type: "string" }, directory: { type: "string" }, disconnect: { type: "boolean", default: false }, group: { type: "string" }, label: { type: "string" }, href: { type: "string" }, external: { type: "boolean" }, labelTranslationKey: { type: "string" }, groupTranslationKey: { type: "string" }, icon: { oneOf: [{ type: "string" }, { type: "object", properties: { srcSet: { type: "string" } }, required: ["srcSet"] }] }, separator: { type: "string" }, separatorLine: { type: "boolean" }, linePosition: { type: "string", enum: ["top", "bottom"], default: "top" }, version: { type: "string" }, menuStyle: { type: "string", enum: ["drilldown"] }, expanded: { type: "string", const: "always" }, selectFirstItemOnExpand: { type: "boolean" }, flatten: { type: "boolean" }, linkedSidebars: { type: "array", items: { type: "string" } }, items: { type: "array", items: { type: "object", additionalProperties: true } }, rbac: { type: "object", additionalProperties: { type: "string" } }, additionalProps: { type: "object", additionalProperties: true } } }; + ae = { type: "array", items: { ...se, properties: { ...se.properties, items: { type: "array", items: se } } } }; + Dt = { type: "object", properties: { name: { type: "string" }, icon: { type: "string" }, folder: { type: "string" } }, additionalProperties: false, required: ["name", "folder"] }; + qt = { type: "object", properties: { hide: { type: "boolean", default: false }, suggestions: { default: [], type: "array", items: { type: "string" } }, prompt: { type: "string" } }, additionalProperties: false }; + wt = { type: "array", items: { type: "object", required: ["name", "field", "type"], properties: { name: { type: "string" }, field: { type: "string" }, type: { type: "string", enum: ["multi-select", "select", "tags"] } }, additionalProperties: false } }; + _t = { type: "object", properties: { facets: wt, ...r.properties }, additionalProperties: false }; + Mt = { type: "object", properties: { page: { type: "string" }, label: { type: "string" }, labelTranslationKey: { type: "string" } }, required: ["page"] }; + w = { type: "object", properties: { image: { type: "string" }, srcSet: { type: "string" }, altText: { type: "string" }, link: { type: "string" }, favicon: { type: "string" } }, additionalProperties: false }; + _ = { type: "object", properties: { items: ae, ...r.properties }, additionalProperties: false }; + M = { type: "object", additionalProperties: Dt }; + B = { type: "object", properties: { items: ae, copyrightText: { type: "string" }, logo: r, ...r.properties }, additionalProperties: false }; + U = { type: "object", properties: { separatorLine: { type: "boolean" }, linePosition: { type: "string", enum: ["top", "bottom"], default: "bottom" }, ...r.properties }, additionalProperties: false }; + F = { type: "object", properties: { head: { type: "array", items: ke }, body: { type: "array", items: ke } }, additionalProperties: false }; + z = { type: "array", items: { type: "object", properties: { href: { type: "string" }, as: { type: "string" }, crossorigin: { type: "string" }, fetchpriority: { type: "string" }, hreflang: { type: "string" }, imagesizes: { type: "string" }, imagesrcset: { type: "string" }, integrity: { type: "string" }, media: { type: "string" }, prefetch: { type: "string" }, referrerpolicy: { type: "string" }, rel: { type: "string" }, sizes: { type: "string" }, title: { type: "string" }, type: { type: "string" } }, required: ["href"], additionalProperties: true } }; + G = { type: "object", properties: { engine: { type: "string", enum: ["flexsearch", "typesense"], default: "flexsearch" }, ai: qt, filters: _t, placement: { type: "string", default: "navbar" }, shortcuts: { type: "array", items: { type: "string" }, default: ["\u2318+K,ctrl+K"] }, suggestedPages: { type: "array", items: Mt }, ...r.properties }, additionalProperties: false }; + Y = { type: "object", properties: { hide: { type: "boolean" }, suggestions: { default: [], type: "array", items: { type: "string" } }, prompt: { type: "string" }, trigger: { type: "object", properties: { hide: { type: "boolean", default: false }, inputType: { type: "string", enum: ["button", "icon"], default: "button" }, inputIcon: { type: "string", enum: ["chat", "sparkles", "redocly"], default: "sparkles" } }, additionalProperties: false } }, additionalProperties: false }; + K = { type: "object", properties: { ignoreDetection: { type: "boolean" }, modes: { type: "array", items: { type: "string" }, default: ["light", "dark"] }, ...r.properties }, additionalProperties: false }; + x = { type: "string", enum: ["slate", "pink", "coral", "amber", "jade", "cyan", "ocean", "indigo", "iris"] }; + Bt = { type: "object", properties: { ...r.properties, items: { type: "array", items: { type: "string", enum: ["copy", "view", "chatgpt", "claude", "docs-mcp-cursor", "docs-mcp-vscode"] }, default: ["copy", "view", "chatgpt", "claude", "docs-mcp-cursor", "docs-mcp-vscode"] } }, additionalProperties: false }; + H = { type: "object", properties: { nextButton: { type: "object", properties: { text: { type: "string" }, ...r.properties }, additionalProperties: false, default: {} }, previousButton: { type: "object", properties: { text: { type: "string" }, ...r.properties }, additionalProperties: false, default: {} }, actions: Bt }, additionalProperties: false }; + W = { type: "object", properties: { elementFormat: { type: "string", default: "icon" }, copy: { type: "object", properties: { ...r.properties }, additionalProperties: false, default: { hide: false } }, report: { type: "object", properties: { tooltipText: { type: "string" }, buttonText: { type: "string" }, label: { type: "string" }, ...r.properties }, additionalProperties: false, default: { hide: false } }, expand: { type: "object", properties: { ...r.properties }, additionalProperties: false, default: { hide: false } }, collapse: { type: "object", properties: { ...r.properties }, additionalProperties: false, default: { hide: false } } }, additionalProperties: false }; + V = { type: "object", properties: { frontMatterKeysToResolve: { type: "array", items: { type: "string" }, default: ["image", "links"] }, partialsFolders: { type: "array", items: { type: "string" }, default: ["**/_partials/**"] }, lastUpdatedBlock: { type: "object", properties: { format: { type: "string", enum: ["timeago", "iso", "long", "short"], default: "timeago" }, locale: { type: "string" }, ...r.properties }, additionalProperties: false, default: {} }, toc: { type: "object", properties: { header: { type: "string", default: "On this page" }, depth: { type: "integer", default: 3, minimum: 1 }, ...r.properties }, additionalProperties: false, default: {} }, editPage: { type: "object", properties: { baseUrl: { type: "string" }, ...r.properties }, additionalProperties: false, default: {} } }, additionalProperties: false, default: {} }; + v = { ...S, properties: { ...S.properties, ...ie.properties } }; + vo = { ...S, properties: { ...S.properties, ...ie.properties } }; + Ut = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, scriptUrl: { type: "string" }, pageViewEventName: { type: "string" } }, additionalProperties: false, required: ["scriptUrl"] }; + Ft = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, apiKey: { type: "string" }, head: { type: "boolean" }, respectDNT: { type: "boolean" }, exclude: { type: "array", items: { type: "string" } }, outboundClickEventName: { type: "string" }, pageViewEventName: { type: "string" }, amplitudeConfig: { type: "object", additionalProperties: true } }, additionalProperties: false, required: ["apiKey"] }; + zt = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, orgId: { type: "string" } }, additionalProperties: false, required: ["orgId"] }; + Gt = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, appId: { type: "string" } }, additionalProperties: false, required: ["appId"] }; + Yt = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, writeKey: { type: "string", minLength: 10 }, trackPage: { type: "boolean" }, dataPlaneUrl: { type: "string" }, controlPlaneUrl: { type: "string" }, sdkUrl: { type: "string" }, loadOptions: { type: "object", additionalProperties: true } }, additionalProperties: false, required: ["writeKey"] }; + Kt = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, writeKey: { type: "string", minLength: 10 }, trackPage: { type: "boolean" }, includeTitleInPageCall: { type: "boolean" }, host: { type: "string" } }, additionalProperties: false, required: ["writeKey"] }; + Ht = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, trackingId: { type: "string" }, gtmAuth: { type: "string" }, gtmPreview: { type: "string" }, defaultDataLayer: {}, dataLayerName: { type: "string" }, enableWebVitalsTracking: { type: "boolean" }, selfHostedOrigin: { type: "string" }, pageViewEventName: { type: "string" } }, additionalProperties: false, required: ["trackingId"] }; + ne = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, trackingId: { type: "string" }, conversionId: { type: "string" }, floodlightId: { type: "string" }, optimizeId: { type: "string" }, exclude: { type: "array", items: { type: "string" } } }, additionalProperties: false, required: ["trackingId"] }; + Wt = { type: "object", properties: { includeInDevelopment: { type: "boolean" }, trackingId: { type: "string" }, conversionId: { type: "string" }, floodlightId: { type: "string" }, head: { type: "boolean" }, respectDNT: { type: "boolean" }, exclude: { type: "array", items: { type: "string" } }, optimizeId: { type: "string" }, anonymizeIp: { type: "boolean" }, cookieExpires: { type: "number" }, trackers: { type: "object", additionalProperties: ne } }, additionalProperties: false, required: ["trackingId"] }; + $ = { type: "object", properties: { adobe: Ut, amplitude: Ft, fullstory: zt, heap: Gt, rudderstack: Yt, segment: Kt, gtm: Ht, ga: Wt } }; + J = { type: "object", properties: { items: { type: "array", items: { type: "object", properties: { label: { type: "string" }, external: { type: "boolean" }, link: { type: "string" }, separatorLine: { type: "boolean" } }, additionalProperties: true }, default: [] }, hideLoginButton: { type: "boolean" }, ...r.properties }, additionalProperties: false }; + X = { type: "object", properties: { hide: { type: "boolean" }, showForUnversioned: { type: "boolean" } } }; + Q = { type: "object", properties: { hide: { type: "boolean" }, prefixItems: { type: "array", items: { type: "object", properties: { label: { type: "string" }, labelTranslationKey: { type: "string" }, page: { type: "string" }, icon: { type: "string" } }, additionalProperties: false, default: {} } } }, additionalProperties: false }; + Vt = { type: "object", additionalProperties: false, required: ["title", "property"], properties: { type: { type: "string", enum: ["select", "checkboxes", "date-range"], default: "checkboxes" }, title: { type: "string" }, titleTranslationKey: { type: "string" }, property: { type: "string" }, parentFilter: { type: "string" }, valuesMapping: { type: "object", additionalProperties: { type: "string" } }, missingCategoryName: { type: "string" }, missingCategoryNameTranslationKey: { type: "string" }, options: { type: "array", items: { type: "string" } } } }; + $t = { type: "object", additionalProperties: true, required: ["slug", "items"], properties: { show: { type: "boolean" }, slug: { type: "string" }, filters: { type: "array", items: Vt }, groupByFirstFilter: { type: "boolean" }, filterValuesCasing: { type: "string", enum: ["sentence", "original", "lowercase", "uppercase"] }, items: ae, requiredPermission: { type: "string" }, separateVersions: { type: "boolean" }, title: { type: "string" }, titleTranslationKey: { type: "string" }, description: { type: "string" }, descriptionTranslationKey: { type: "string" } } }; + T = { type: "object", patternProperties: { ".*": $t } }; + k = { nodeTypeName: i.ScorecardClassic, description: "Add and create sets of rules and test your API description files against them. With these rules you can maintain quality across your existing APIs and ensure that newly-added or updated APIs match your criteria. An API scorecard can include multiple sets of rules, corresponding to different quality levels.", documentationLink: "https://redocly.com/docs/realm/config/scorecard-classic", type: "object", additionalProperties: true, required: [], properties: { ignoreNonCompliant: { type: "boolean", default: false }, teamMetadataProperty: { nodeTypeName: i.ScorecardClassicTeamMetadataProperty, description: "Provide custom team label and team metadata property.", documentationLink: "https://redocly.com/docs/realm/config/scorecard-classic#team-metadata-object", type: "object", properties: { property: { type: "string" }, label: { type: "string" }, default: { type: "string" } } }, levels: { nodeTypeName: i.ScorecardClassicLevelList, description: "List of levels to score against.", type: "array", items: { nodeTypeName: i.ScorecardClassicLevel, documentationLink: "https://redocly.com/docs/realm/config/scorecard-classic#level-object", type: "object", required: ["name"], properties: { name: { type: "string" }, color: { type: "string" }, ...b }, additionalProperties: false } }, targets: { nodeTypeName: i.ScorecardClassicTargetList, description: "Provide custom `minimumLevel` for specific targets.", type: "array", items: { nodeTypeName: i.ScorecardClassicTarget, type: "object", required: ["where"], properties: { minimumLevel: { type: "string" }, rules: { type: "object", additionalProperties: true }, where: { nodeTypeName: i.ScorecardClassicTargetWhere, description: "Specify which API descriptions to apply the `minimumLevel` to based on the metadata.", documentationLink: "https://redocly.com/docs/realm/config/scorecard-classic#where-object", type: "object", required: ["metadata"], properties: { metadata: { nodeTypeName: i.ScorecardClassicTargetWhereMetadata, type: "object", additionalProperties: { type: "string" } } }, additionalProperties: false } }, additionalProperties: false } }, ignore: { type: "array", items: { type: "string" } }, fromProjectUrl: { type: "string", format: "uri" } } }; + Jt = { type: "object", required: ["key"], properties: { key: { type: "string" } }, additionalProperties: false }; + Xt = { type: "object", required: ["type"], properties: { type: { type: "string" } }, additionalProperties: false }; + Qt = { type: "object", required: ["property", "title"], properties: { property: { type: "string" }, hide: { type: "boolean" }, label: { type: "string" }, options: { type: "array", items: { type: "string" } }, type: { type: "string", enum: ["select", "checkboxes", "date-range"], default: "checkboxes" }, title: { type: "string" }, titleTranslationKey: { type: "string" }, parentFilter: { type: "string" }, valuesMapping: { type: "object", additionalProperties: { type: "string" } } }, additionalProperties: false }; + y = { type: "object", properties: { slug: { type: "string" }, hide: { type: "boolean" }, includes: { type: "array", items: Xt }, excludes: { type: "array", items: Jt }, filters: { type: "array", items: Qt }, titleTranslationKey: { type: "string" }, descriptionTranslationKey: { type: "string" }, catalogSwitcherLabelTranslationKey: { type: "string" } }, additionalProperties: false }; + Zt = { type: "object", properties: { type: { type: "string", enum: ["string", "number", "boolean", "array", "object"] }, description: { type: "string" }, example: { oneOf: [{ type: "string" }, { type: "number" }, { type: "boolean" }, { type: "array" }, { type: "object" }] }, enum: { type: "array", items: { type: "string" } }, pattern: { type: "string" }, format: { type: "string" }, minimum: { type: "number" }, maximum: { type: "number" }, items: { type: "object" } }, additionalProperties: true }; + er = { type: "object", required: ["type", "properties"], properties: { type: { type: "string", enum: ["object"] }, description: { type: "string" }, properties: { type: "object", additionalProperties: Zt }, required: { type: "array", items: { type: "string" } }, additionalProperties: { type: "boolean" } }, additionalProperties: true }; + tr = { type: "object", required: ["name", "description", "metadataSchema"], properties: { name: { type: "string", description: "Display name of the entity type" }, description: { type: "string", description: "Description of the entity type" }, metadataSchema: er, icon: { type: "object", properties: { src: { type: "string" }, srcSet: { type: "string" } }, additionalProperties: false } }, additionalProperties: false }; + rr = { type: "object", additionalProperties: tr }; + Z = { type: "object", properties: { show: { type: "boolean", default: false }, entityTypes: rr, catalogs: { type: "object", properties: { all: y, services: y, domains: y, teams: y, users: y, apiDescriptions: y, dataSchemas: y, apiOperations: y }, additionalProperties: y } }, additionalProperties: false }; + Ee = { type: "string", enum: ["eq", "in", "gt", "gte", "lt", "lte", "contains", "startsWith", "endsWith", "exists", "isEmpty", "between", "matches", "some", "every", "none"] }; + ce = { type: "string", enum: ["and", "or"] }; + pe = { type: "object", properties: { field: { type: "string" }, operator: Ee, value: { oneOf: [{ type: "boolean" }, { type: "string" }, { type: "number" }] }, modifier: { type: "string", enum: ["not"] }, match: { type: "array", items: { type: "object", properties: { field: { type: "string" }, operator: Ee, value: { oneOf: [{ type: "boolean" }, { type: "string" }, { type: "number" }] }, modifier: { type: "string", enum: ["not"] } } } } } }; + or = { type: "object", properties: { operator: ce, conditions: { type: "array", items: pe } }, required: ["operator", "conditions"], additionalProperties: false }; + Re = { type: "array", items: { oneOf: [pe, { type: "object", properties: { operator: ce, conditions: { type: "array", items: { oneOf: [pe, or] } } }, required: ["operator", "conditions"], additionalProperties: false }] } }; + Ae = { type: "object", properties: { defined: { type: "boolean" }, nonEmpty: { type: "boolean" }, eq: {}, gt: { type: "number" }, gte: { type: "number" }, lt: { type: "number" }, lte: { type: "number" }, const: {} }, additionalProperties: false }; + ir = { type: "array", items: { type: "object", properties: { subject: { type: "object", properties: { type: { type: "string", enum: ["Entity", "EntityMetadata", "EntityRelations", "EntityRelation"] }, property: { type: "string" } }, required: ["type", "property"], additionalProperties: false }, assertions: Ae }, required: ["subject", "assertions"], additionalProperties: false } }; + sr = { type: "object", properties: { title: { type: "string" }, subject: { type: "object", properties: { type: { type: "string", enum: ["Entity", "EntityMetadata", "EntityRelations", "EntityRelation"] }, property: { type: "string" } }, required: ["type", "property"], additionalProperties: false }, severity: { type: "string", enum: ["error", "warn", "off"] }, message: { type: "string" }, assertions: Ae, where: ir, weight: { type: "number", default: 1 } }, required: ["subject", "assertions"], additionalProperties: false }; + ar = { type: "object", additionalProperties: { oneOf: [{ type: "string" }, { type: "object", properties: { severity: { type: "string", enum: ["error", "warn", "off"] }, weight: { type: "number", default: 1 } }, additionalProperties: true }, sr] } }; + nr = { type: "object", properties: { name: { type: "string" }, extends: b.extends, rules: ar }, required: ["name"], additionalProperties: false }; + Ie = { type: "object", properties: { event: { type: "string", enum: ["runtime", "manual"] } }, required: ["event"], additionalProperties: false }; + pr = { oneOf: [Ie, { type: "array", items: Ie }] }; + cr = { type: "object", properties: { name: { type: "string" }, key: { type: "string" }, description: { type: "string" }, entities: { oneOf: [Re, { type: "object", properties: { operator: ce, conditions: Re }, required: ["operator", "conditions"], additionalProperties: false }] }, levels: { type: "array", items: nr, minItems: 1 }, trigger: pr }, required: ["name", "key", "entities", "levels"], additionalProperties: false }; + ee = { type: "array", items: cr }; + s = { type: "object", properties: { imports: { type: "array", items: { type: "string" } }, logo: w, navbar: _, products: M, footer: B, sidebar: U, scripts: F, links: z, feedback: a, search: G, aiAssistant: Y, colorMode: K, palette: x, navigation: H, codeSnippet: W, markdown: V, openapi: v, asyncapi: Se, graphql: P, analytics: $, userMenu: J, versionPicker: X, breadcrumbs: Q, catalog: T, entitiesCatalog: Z, catalogClassic: T, scorecard: k, scorecardClassic: k, scorecards: ee }, additionalProperties: true }; + le = "https://redocly.com/sso/teams"; + ye = ((o) => (o.OIDC = "OIDC", o.SAML2 = "SAML2", o))(ye || {}); + de = ((o) => (o.SERVICE_ACCOUNT = "SERVICE_ACCOUNT", o.OAUTH2 = "OAUTH2", o))(de || {}); + Le = ((o) => (o.STACKED = "stacked", o.THREE_PANEL = "three-panel", o))(Le || {}); + dr = { type: "object", additionalProperties: { type: "string" } }; + gr = { type: "object", additionalProperties: false, patternProperties: { "^[a-zA-Z0-9_-]+$": { type: "string", pattern: "^https?://[^\\s/$.?#].[^\\s]*$" } } }; + re = { type: "string", enum: ["error", "warn", "off"] }; + mr = { type: "object", additionalProperties: false, properties: { schemaCheck: re, statusCodeCheck: re, contentTypeCheck: re, successCriteriaCheck: re } }; + ur = { type: "object", properties: { event: { type: "string", enum: ["schedule"] }, interval: { type: "string", enum: ["1m", "2m", "5m", "10m", "15m", "30m", "1h", "3h", "6h", "12h", "1d", "7d"] } }, required: ["event"], additionalProperties: false }; + br = { type: "object", properties: { event: { type: "string", enum: ["build"] } }, required: ["event"], additionalProperties: false }; + fr = { type: "object", properties: { warn: { type: "number" }, error: { type: "number" } }, additionalProperties: false }; + Oe = { type: "object", properties: { ignoreLint: { oneOf: [{ type: "boolean", default: false }, { type: "object", additionalProperties: { type: "boolean" } }] }, ignoreLinkChecker: { type: "boolean" }, ignoreMarkdocErrors: { type: "boolean" }, ignoreRespectMonitoring: { type: "boolean" }, jobs: { type: "array", items: { type: "object", properties: { path: { type: "string", pattern: "^(?!\\/|\\.\\./)" }, agent: { type: "string", enum: ["respect"] }, trigger: { oneOf: [ur, br] }, inputs: dr, servers: gr, severity: mr, slo: fr }, required: ["path", "trigger", "agent"], additionalProperties: false } } }, additionalProperties: false }; + hr = { type: "object", properties: { end_session_endpoint: { type: "string" }, token_endpoint: { type: "string" }, authorization_endpoint: { type: "string" }, jwks_uri: { type: "string" } }, required: ["token_endpoint", "authorization_endpoint"], additionalProperties: true }; + Sr = { type: "object", properties: { type: { type: "string", const: "OIDC" }, title: { type: "string" }, pkce: { type: "boolean", default: false }, configurationUrl: { type: "string", minLength: 1 }, configuration: hr, clientId: { type: "string", minLength: 1 }, clientSecret: { type: "string", minLength: 0 }, teamsClaimName: { type: "string" }, teamsClaimMap: { type: "object", additionalProperties: { type: "string" } }, defaultTeams: { type: "array", items: { type: "string" } }, scopes: { type: "array", items: { type: "string" } }, tokenExpirationTime: { type: "number" }, authorizationRequestCustomParams: { type: "object", additionalProperties: { type: "string" } }, introspectEndpoint: { type: "string" }, tokenRequestCustomParams: { type: "object", additionalProperties: { type: "string" } }, audience: { type: "array", items: { type: "string" } } }, required: ["type", "clientId"], oneOf: [{ required: ["configurationUrl"] }, { required: ["configuration"] }], additionalProperties: false }; + Cr = { type: "object", properties: { type: { type: "string", const: "SAML2" }, title: { type: "string" }, issuerId: { type: "string" }, entityId: { type: "string" }, ssoUrl: { type: "string" }, x509PublicCert: { type: "string" }, teamsAttributeName: { type: "string", default: le }, teamsAttributeMap: { type: "object", additionalProperties: { type: "string" } }, defaultTeams: { type: "array", items: { type: "string" } } }, additionalProperties: false, required: ["type", "issuerId", "ssoUrl", "x509PublicCert"] }; + Pr = { oneOf: [Sr, Cr], discriminator: { propertyName: "type" } }; + jr = { type: "object", additionalProperties: Pr }; + we = { oneOf: [{ type: "array", items: { type: "string", enum: ["REDOCLY", "CORPORATE", "GUEST"] }, uniqueItems: true }, { type: "string", enum: ["REDOCLY", "CORPORATE", "GUEST"] }] }; + _e = { type: "boolean" }; + Me = { type: "string", pattern: "^https?://.*" }; + Be = { type: "string", pattern: "^https?://.*" }; + xr = { type: "object", properties: { to: { type: "string" }, type: { type: "number", default: 301 } }, additionalProperties: false, nodeTypeName: i.RedirectSource, description: "Source is an absolute path that must start with a forward slash.", documentationLink: "https://redocly.com/docs/realm/config/redirects#sources-map" }; + vr = { type: "object", additionalProperties: xr, default: {}, nodeTypeName: i.Redirects, description: "Use redirects to change which resource a URL points to, maintaining working links when you move, rename, or restructure content.", documentationLink: "https://redocly.com/docs/realm/config/redirects" }; + Tr = { type: "string", enum: ["info", "success", "warning", "error"], default: "info" }; + e = { type: "object", additionalProperties: { type: "string" } }; + kr = { type: "object", properties: { trackingId: { type: "string" }, content: { type: "string" }, dismissible: { type: "boolean", default: false }, target: { type: "string" }, color: Tr, rbac: e, startAt: { type: "string", format: "date-time" }, endAt: { type: "string", format: "date-time" } }, required: ["content"], additionalProperties: false }; + Er = { type: "array", items: kr, default: [] }; + me = { type: "object", properties: { root: { type: "string" }, output: { type: "string", pattern: "(.ya?ml|.json)$" }, rbac: e, openapi: v, graphql: P, theme: { type: "object", properties: { openapi: v, graphql: P }, additionalProperties: false }, title: { type: "string" }, metadata: { type: "object", additionalProperties: true }, ...b }, required: ["root"] }; + Rr = { type: "object", additionalProperties: true }; + Ir = { type: "object", additionalProperties: { type: "object", additionalProperties: true } }; + Ne = { type: "object", properties: { hide: { type: "boolean", default: false }, title: { type: "string" }, description: { type: "string" }, details: { type: "object", properties: { path: { type: "string" }, content: { type: "string" } }, additionalProperties: false }, excludeFiles: { type: "array", items: { type: "string" }, default: [] }, sections: { type: "array", items: { type: "object", properties: { title: { type: "string" }, description: { type: "string" }, includeFiles: { type: "array", items: { type: "string" }, default: [] }, excludeFiles: { type: "array", items: { type: "string" }, default: [] } }, required: ["title"], additionalProperties: false } } }, default: { hide: false, title: void 0, description: void 0, details: void 0, sections: [{ title: "Table of contents", includeFiles: ["**/*"], excludeFiles: [] }] }, additionalProperties: false }; + De = { type: "object", properties: { title: { type: "string" }, projectTitle: { type: "string" }, description: { type: "string" }, siteUrl: { type: "string" }, image: { type: "string" }, keywords: { oneOf: [{ type: "array", items: { type: "string" } }, { type: "string" }] }, lang: { type: "string" }, jsonLd: { type: "object" }, meta: { type: "array", items: { type: "object", properties: { name: { type: "string" }, content: { type: "string" } }, required: ["name", "content"], additionalProperties: false } }, llmstxt: Ne }, default: { llmstxt: Ne.default }, additionalProperties: false }; + Ar = { type: "object", properties: { folders: { type: "array", items: { type: "string" } } }, additionalProperties: false }; + Lr = { type: "object", properties: { catalogs: { type: "object", properties: { all: e, services: e, domains: e, teams: e, users: e, apiDescriptions: e, dataSchemas: e, apiOperations: e }, additionalProperties: e }, entitiesTypes: { type: "object", properties: { service: e, domain: e, team: e, user: e, apiDescription: e, apiOperation: e, dataSchema: e }, additionalProperties: e }, entitiesGroups: { type: "array", items: { type: "object", properties: { entities: { type: "array", items: { type: "string" } }, config: e }, additionalProperties: false } }, entities: { type: "object", properties: { "**": e }, additionalProperties: e } }, additionalProperties: false }; + ue = { type: "object", properties: { teamNamePatterns: { type: "array", items: { type: "string" } }, teamFolders: { type: "array", items: { type: "string" } }, teamFoldersBaseRoles: e, cms: e, reunite: e, features: { type: "object", properties: { aiSearch: e }, additionalProperties: false }, content: { type: "object", properties: { "**": e }, additionalProperties: e }, entitiesCatalog: Lr }, additionalProperties: e }; + Or = { type: "object", properties: { static: { type: "string" } }, additionalProperties: false, required: ["static"] }; + Nr = { type: "object", properties: { idp: { type: "string" } }, additionalProperties: false, required: ["idp"] }; + Dr = { type: "object", properties: { type: { type: "string", const: "GRAVITEE" }, apiBaseUrl: { type: "string" }, env: { type: "string" }, allowApiProductsOutsideCatalog: { type: "boolean", default: false }, stage: { type: "string", default: "non-production" }, auth: { oneOf: [Or, Nr] } }, additionalProperties: false, required: ["type", "apiBaseUrl"] }; + qr = { type: "object", properties: { type: { type: "string", const: "OAUTH2" }, tokenEndpoint: { type: "string" }, clientId: { type: "string" }, clientSecret: { type: "string" } }, additionalProperties: false, required: ["type", "tokenEndpoint", "clientId", "clientSecret"] }; + wr = { type: "object", properties: { type: { type: "string", const: "SERVICE_ACCOUNT" }, serviceAccountEmail: { type: "string" }, serviceAccountPrivateKey: { type: "string" } }, additionalProperties: false, required: ["type", "serviceAccountEmail", "serviceAccountPrivateKey"] }; + ge = { type: "object", properties: { type: { type: "string", const: "APIGEE_X" }, apiUrl: { type: "string" }, stage: { type: "string", default: "non-production" }, organizationName: { type: "string" }, ignoreApiProducts: { type: "array", items: { type: "string" } }, allowApiProductsOutsideCatalog: { type: "boolean", default: false }, auth: { type: "object", oneOf: [qr, wr], discriminator: { propertyName: "type" } } }, additionalProperties: false, required: ["type", "organizationName", "auth"] }; + _r = { ...ge, properties: { ...ge.properties, type: { type: "string", const: "APIGEE_EDGE" } } }; + Mr = { type: "object", oneOf: [ge, _r, Dr], discriminator: { propertyName: "type" } }; + Br = { type: "object", required: ["adapters"], additionalProperties: false, properties: { adapters: { type: "array", items: Mr } } }; + qe = { type: "object", properties: { defaultLocale: { type: "string" }, locales: { type: "array", items: { type: "object", properties: { code: { type: "string" }, name: { type: "string" } }, required: ["code"] } } }, additionalProperties: false, required: ["defaultLocale"] }; + Ur = { type: "object", properties: { name: { type: "string" }, value: { type: "string" } }, additionalProperties: false, required: ["name", "value"] }; + Fr = { type: "object", properties: { hide: { type: "boolean", default: false }, docs: { type: "object", properties: { hide: { type: "boolean", default: false }, name: { type: "string", default: "Docs MCP server" }, ignore: { type: "array", items: { type: "string" }, default: [] } }, additionalProperties: false } }, additionalProperties: false, default: { hide: false, docs: { hide: false, name: "MCP server", ignore: [] } } }; + zr = { type: "object", properties: { requiresLogin: _e, logoutReturnUrl: Me, residency: Be, sso: we, rbac: ue }, additionalProperties: false }; + I = { type: "object", properties: { imports: { type: "array", items: { type: "string" } }, licenseKey: { type: "string" }, redirects: vr, seo: De, rbac: ue, apiFunctions: Ar, requiresLogin: _e, responseHeaders: { type: "object", additionalProperties: { type: "array", items: Ur } }, mockServer: { type: "object", properties: { off: { type: "boolean", default: false }, position: { type: "string", enum: ["first", "last", "replace", "off"], default: "first" }, strictExamples: { type: "boolean", default: false }, errorIfForcedExampleNotFound: { type: "boolean", default: false }, description: { type: "string" } } }, apis: { type: "object", additionalProperties: me }, ...b, ssoDirect: jr, sso: we, residency: Be, logoutReturnUrl: Me, access: zr, developerOnboarding: Br, removeAttribution: { type: "boolean" }, i18n: qe, l10n: qe, metadata: Rr, metadataGlobs: Ir, ignore: { type: "array", items: { type: "string" } }, theme: s, reunite: Oe, logo: w, navbar: _, products: M, footer: B, sidebar: U, scripts: F, links: z, feedback: a, search: G, aiAssistant: Y, colorMode: K, palette: x, navigation: H, codeSnippet: W, markdown: V, openapi: v, graphql: P, analytics: $, userMenu: J, versionPicker: X, breadcrumbs: Q, catalog: T, entitiesCatalog: Z, catalogClassic: T, scorecard: k, scorecardClassic: k, scorecards: ee, mcp: Fr, corsProxy: { type: "object", properties: { allowedTargets: { type: "array", items: { type: "string" } } }, additionalProperties: false }, banner: Er }, default: { redirects: {}, seo: De.default }, additionalProperties: true }; + Gr = { ...te(I, "default"), additionalProperties: false }; + Yr = { $id: "root-redocly-config", ...I, properties: { plugins: { type: "array", items: { type: "string" } }, ...I.properties, env: { type: "object", additionalProperties: Gr } }, default: {}, additionalProperties: false }; + be = { type: "object", properties: { logo: s.properties.logo, navbar: s.properties.navbar, footer: s.properties.footer, sidebar: s.properties.sidebar, search: s.properties.search, codeSnippet: s.properties.codeSnippet, breadcrumbs: s.properties.breadcrumbs, openapi: s.properties.openapi, feedback: s.properties.feedback, palette: x, mockServer: I.properties.mockServer, analytics: { type: "object", properties: { ga: ne } } }, additionalProperties: true, default: {} }; + Kr = { $id: "product-config-override", type: "object", properties: { ...be.properties, apis: { type: "object", additionalProperties: me }, theme: be }, additionalProperties: false }; + fe = ["partOf", "hasParts", "creates", "createdBy", "owns", "ownedBy", "implements", "implementedBy", "dependsOn", "dependencyOf", "uses", "usedBy", "produces", "consumes", "linksTo", "supersedes", "supersededBy", "compatibleWith", "extends", "extendedBy", "relatesTo", "hasMember", "memberOf", "triggers", "triggeredBy", "returns", "returnedBy"]; + t = q({ UserEntity: "UserEntity", UserEntityMetadata: "UserEntityMetadata", ApiDescriptionEntity: "ApiDescriptionEntity", ApiDescriptionEntityMetadata: "ApiDescriptionEntityMetadata", ApiOperationEntity: "ApiOperationEntity", ApiOperationEntityMetadata: "ApiOperationEntityMetadata", DataSchemaEntity: "DataSchemaEntity", DataSchemaEntityMetadata: "DataSchemaEntityMetadata", ServiceEntity: "ServiceEntity", DomainEntity: "DomainEntity", TeamEntity: "TeamEntity", Entity: "Entity", EntityMetadata: "EntityMetadata", EntityLinkList: "EntityLinkList", EntityLink: "EntityLink", EntityRelation: "EntityRelation", EntityRelationList: "EntityRelationList", EntityContact: "EntityContact", EntitySlackContact: "EntitySlackContact", EntitySlackChannel: "EntitySlackChannel" }); + Hr = { type: "object", nodeTypeName: t.UserEntityMetadata, properties: { email: { type: "string", description: "Email of the user" } }, required: ["email"], additionalProperties: true }; + Wr = { type: "object", nodeTypeName: t.ApiDescriptionEntityMetadata, properties: { specType: { type: "string", enum: ["jsonschema", "openapi", "asyncapi", "avro", "zod", "graphql", "protobuf", "arazzo"], description: "Type of the API description" }, descriptionFile: { type: "string", description: "Path to the file containing the API description" } }, required: ["specType", "descriptionFile"], additionalProperties: true }; + Vr = { type: "object", nodeTypeName: t.ApiOperationEntityMetadata, properties: { method: { type: "string", enum: ["GET", "POST", "PUT", "DELETE", "PATCH", "MUTATION", "QUERY", "SUBSCRIBE", "PUBLISH"], description: "HTTP method of the API operation" }, path: { type: "string", description: "Path of the API operation" }, payload: { type: "array", items: { type: "string", description: "Related dataSchema name" } }, responses: { type: "array", items: { type: "string", description: "Related dataSchema name" } } }, required: ["method", "path"], additionalProperties: true }; + $r = { type: "object", nodeTypeName: t.DataSchemaEntityMetadata, properties: { specType: { type: "string", enum: ["jsonschema", "openapi", "asyncapi", "avro", "zod", "graphql", "protobuf", "arazzo"], description: "Specification type of the data schema" }, schema: { type: "string", description: "Inline schema of the data structure" }, sdl: { type: "string", description: "SDL of the data structure" } }, required: ["specType"], additionalProperties: true }; + Jr = { type: "object", properties: {}, nodeTypeName: t.EntityMetadata, additionalProperties: true }; + Xr = { type: "object", nodeTypeName: t.EntitySlackChannel, properties: { name: { type: "string", minLength: 2, maxLength: 150 }, url: { type: "string" } }, required: ["name"], additionalProperties: false }; + Qr = { type: "object", nodeTypeName: t.EntitySlackContact, properties: { channels: { type: "array", items: Xr } }, required: ["channels"], additionalProperties: false }; + Zr = { type: "object", nodeTypeName: t.EntityContact, properties: { slack: Qr }, additionalProperties: false }; + eo = { type: "object", nodeTypeName: t.EntityLink, properties: { label: { type: "string", minLength: 2, maxLength: 150 }, url: { type: "string" } }, required: ["label", "url"], additionalProperties: false }; + to = { type: "object", nodeTypeName: t.EntityRelation, properties: { type: { type: "string", enum: fe }, key: { type: "string", minLength: 2, maxLength: 100 }, version: { type: "string" }, revision: { type: "string" } }, required: ["type", "key"], additionalProperties: false }; + g = { version: { type: "string" }, key: { type: "string", pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$", minLength: 2, maxLength: 150 }, type: { type: "string", enum: ["user", "data-schema", "api-operation", "api-description", "service", "domain", "team"] }, title: { type: "string", minLength: 2, maxLength: 200 }, summary: { type: "string", minLength: 1, maxLength: 500 }, tags: { type: "array", items: { type: "string", minLength: 1, maxLength: 50 } }, git: { type: "array", items: { type: "string" } }, contact: Zr, links: { type: "array", nodeTypeName: t.EntityLinkList, items: eo }, relations: { type: "array", nodeTypeName: t.EntityRelationList, items: to }, metadata: Jr }; + ci = { type: "object", discriminator: { propertyName: "type" }, oneOf: [{ type: "object", properties: { ...g, type: { const: "user" }, metadata: Hr }, required: ["key", "title", "type", "metadata"], additionalProperties: false, nodeTypeName: t.UserEntity }, { type: "object", nodeTypeName: t.ApiOperationEntity, properties: { ...g, type: { const: "api-operation" }, metadata: Vr }, required: ["key", "title", "type", "metadata"], additionalProperties: false }, { type: "object", nodeTypeName: t.DataSchemaEntity, properties: { ...g, type: { const: "data-schema" }, metadata: $r }, required: ["key", "title", "type", "metadata"], additionalProperties: false }, { type: "object", nodeTypeName: t.ApiDescriptionEntity, properties: { ...g, type: { const: "api-description" }, metadata: Wr }, required: ["key", "title", "type", "metadata"], additionalProperties: false }, { type: "object", nodeTypeName: t.ServiceEntity, properties: { ...g, type: { const: "service" } }, required: ["key", "title", "type"], additionalProperties: false }, { type: "object", nodeTypeName: t.DomainEntity, properties: { ...g, type: { const: "domain" } }, required: ["key", "title", "type"], additionalProperties: false }, { type: "object", nodeTypeName: t.TeamEntity, properties: { ...g, type: { const: "team" } }, required: ["key", "title", "type"], additionalProperties: false }] }; + li = { type: "object", nodeTypeName: t.Entity, properties: { ...g }, required: ["key", "title", "type"], additionalProperties: false }; } +}); - this[kError] = err - - this[kClient][kOnError](err) -} - -function onHttpSocketReadable () { - this[kParser]?.readMore() -} - -function onHttpSocketEnd () { - const parser = this[kParser] - - if (parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - return +// node_modules/@redocly/openapi-core/lib/oas-types.js +function getTypes(spec2) { + return typesMap[spec2]; +} +var specVersions, typesMap; +var init_oas_types = __esm({ + "node_modules/@redocly/openapi-core/lib/oas-types.js"() { + init_arazzo(); + init_asyncapi2(); + init_asyncapi3(); + init_oas2(); + init_oas3(); + init_oas3_1(); + init_oas3_2(); + init_openrpc(); + init_overlay(); + specVersions = [ + "oas2", + "oas3_0", + "oas3_1", + "oas3_2", + "async2", + "async3", + "arazzo1", + "overlay1", + "openrpc1" + ]; + typesMap = { + oas2: Oas2Types, + oas3_0: Oas3Types, + oas3_1: Oas3_1Types, + oas3_2: Oas3_2Types, + async2: AsyncApi2Types, + async3: AsyncApi3Types, + arazzo1: Arazzo1Types, + overlay1: Overlay1Types, + openrpc1: OpenRpcTypes + }; } +}); - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) +// node_modules/@redocly/openapi-core/lib/utils/is-custom-rule-id.js +function isCustomRuleId(id) { + return id.includes("/"); } - -function onHttpSocketClose () { - 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)) - - const client = this[kClient] - - 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) +var init_is_custom_rule_id = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/is-custom-rule-id.js"() { } +}); - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() -} - -function onSocketClose () { - this[kClosed] = true +// node_modules/@redocly/openapi-core/lib/utils/omit.js +function omit(obj, keys) { + const result = { ...obj }; + keys.forEach((key) => { + delete result[key]; + }); + return result; } +var init_omit = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/omit.js"() { + } +}); -/** - * @param {import('./client.js')} client - */ -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 +// node_modules/@redocly/ajv/dist/compile/codegen/code.js +var require_code = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/codegen/code.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0; + var _CodeOrName = class { + }; + exports._CodeOrName = _CodeOrName; + exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; + var Name = class extends _CodeOrName { + constructor(s2) { + super(); + if (!exports.IDENTIFIER.test(s2)) + throw new Error("CodeGen: name must be a valid identifier"); + this.str = s2; } - } 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) + toString() { + return this.str; } - } 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) + emptyStr() { + return false; } + get names() { + return { [this.str]: 1 }; + } + }; + exports.Name = Name; + var _Code = class extends _CodeOrName { + constructor(code) { + super(); + this._items = typeof code === "string" ? [code] : code; + } + toString() { + return this.str; + } + emptyStr() { + if (this._items.length > 1) + return false; + const item = this._items[0]; + return item === "" || item === '""'; + } + get str() { + var _a; + return (_a = this._str) !== null && _a !== void 0 ? _a : this._str = this._items.reduce((s2, c2) => `${s2}${c2}`, ""); + } + get names() { + var _a; + return (_a = this._names) !== null && _a !== void 0 ? _a : this._names = this._items.reduce((names, c2) => { + if (c2 instanceof Name) + names[c2.str] = (names[c2.str] || 0) + 1; + return names; + }, {}); + } + }; + exports._Code = _Code; + exports.nil = new _Code(""); + function _5(strs, ...args) { + const code = [strs[0]]; + let i2 = 0; + while (i2 < args.length) { + addCodeArg(code, args[i2]); + code.push(strs[++i2]); + } + return new _Code(code); + } + exports._ = _5; + var plus = new _Code("+"); + function str2(strs, ...args) { + const expr = [safeStringify(strs[0])]; + let i2 = 0; + while (i2 < args.length) { + expr.push(plus); + addCodeArg(expr, args[i2]); + expr.push(plus, safeStringify(strs[++i2])); + } + optimize(expr); + return new _Code(expr); } - } -} - -// 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' -} - -/** - * @param {import('./client.js')} client - * @param {import('../core/request.js')} request - * @returns - */ -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__(36682).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] - - /** - * @param {Error} [err] - * @returns {void} - */ - const abort = (err) => { - if (request.aborted || request.completed) { - return + exports.str = str2; + function addCodeArg(code, arg) { + if (arg instanceof _Code) + code.push(...arg._items); + else if (arg instanceof Name) + code.push(arg); + else + code.push(interpolate(arg)); } - - 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 - } - - if (socket.setTypeOfService) { - socket.setTypeOfService(request.typeOfService) - } - - 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` + exports.addCodeArg = addCodeArg; + function optimize(expr) { + let i2 = 1; + while (i2 < expr.length - 1) { + if (expr[i2] === plus) { + const res = mergeExprItems(expr[i2 - 1], expr[i2 + 1]); + if (res !== void 0) { + expr.splice(i2 - 1, 3, res); + continue; + } + expr[i2++] = "+"; } - } else { - header += `${key}: ${val}\r\n` + i2++; } } - } - - if (channels.sendHeaders.hasSubscribers) { - channels.sendHeaders.publish({ request, headers: header, socket }) - } - - 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 -} - -/** - * @param {AbortCallback} abort - * @param {import('stream').Stream} body - * @param {import('./client.js')} client - * @param {import('../core/request.js')} request - * @param {import('net').Socket} socket - * @param {number} contentLength - * @param {string} header - * @param {boolean} expectsPayload - */ -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 }) - - /** - * @param {Buffer} chunk - * @returns {void} - */ - const onData = function (chunk) { - if (finished) { - return - } - - try { - if (!writer.write(chunk) && this.pause) { - this.pause() + function mergeExprItems(a2, b2) { + if (b2 === '""') + return a2; + if (a2 === '""') + return b2; + if (typeof a2 == "string") { + if (b2 instanceof Name || a2[a2.length - 1] !== '"') + return; + if (typeof b2 != "string") + return `${a2.slice(0, -1)}${b2}"`; + if (b2[0] === '"') + return a2.slice(0, -1) + b2.slice(1); + return; } - } catch (err) { - util.destroy(this, err) + if (typeof b2 == "string" && b2[0] === '"' && !(a2 instanceof Name)) + return `"${a2}${b2.slice(1)}`; + return; } - } - - /** - * @returns {void} - */ - const onDrain = function () { - if (finished) { - return + function strConcat(c1, c2) { + return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str2`${c1}${c2}`; } - - if (body.resume) { - body.resume() + exports.strConcat = strConcat; + function interpolate(x3) { + return typeof x3 == "number" || typeof x3 == "boolean" || x3 === null ? x3 : safeStringify(Array.isArray(x3) ? x3.join(",") : x3); } - } - - /** - * @returns {void} - */ - 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)) + function stringify(x3) { + return new _Code(safeStringify(x3)); } - } - - /** - * @param {Error} [err] - * @returns - */ - const onFinished = function (err) { - if (finished) { - return + exports.stringify = stringify; + function safeStringify(x3) { + return JSON.stringify(x3).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029"); } - - 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 + exports.safeStringify = safeStringify; + function getProperty(key) { + return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _5`[${key}]`; + } + exports.getProperty = getProperty; + function getEsmExportName(key) { + if (typeof key == "string" && exports.IDENTIFIER.test(key)) { + return new _Code(`${key}`); } + throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`); } - - writer.destroy(err) - - if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) { - util.destroy(body, err) - } else { - util.destroy(body) + exports.getEsmExportName = getEsmExportName; + function regexpCode(rx) { + return new _Code(rx.toString()); } + exports.regexpCode = regexpCode; } +}); - 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) - } -} - -/** - * @typedef AbortCallback - * @type {Function} - * @param {Error} [err] - * @returns {void} - */ - -/** - * @param {AbortCallback} abort - * @param {Uint8Array|null} body - * @param {import('./client.js')} client - * @param {import('../core/request.js')} request - * @param {import('net').Socket} socket - * @param {number} contentLength - * @param {string} header - * @param {boolean} expectsPayload - * @returns {void} - */ -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') +// node_modules/@redocly/ajv/dist/compile/codegen/scope.js +var require_scope = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/codegen/scope.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0; + var code_1 = require_code(); + var ValueError = class extends Error { + constructor(name) { + super(`CodeGen: "code" for ${name} not defined`); + this.value = name.value; } - } 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 + }; + var UsedValueState; + (function(UsedValueState2) { + UsedValueState2[UsedValueState2["Started"] = 0] = "Started"; + UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed"; + })(UsedValueState || (exports.UsedValueState = UsedValueState = {})); + exports.varKinds = { + const: new code_1.Name("const"), + let: new code_1.Name("let"), + var: new code_1.Name("var") + }; + var Scope = class { + constructor({ prefixes, parent } = {}) { + this._names = {}; + this._prefixes = prefixes; + this._parent = parent; } - } - request.onRequestSent() - - client[kResume]() - } catch (err) { - abort(err) - } -} - -/** - * @param {AbortCallback} abort - * @param {Blob} body - * @param {import('./client.js')} client - * @param {import('../core/request.js')} request - * @param {import('net').Socket} socket - * @param {number} contentLength - * @param {string} header - * @param {boolean} expectsPayload - * @returns {Promise} - */ -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) - } -} - -/** - * @param {AbortCallback} abort - * @param {Iterable} body - * @param {import('./client.js')} client - * @param {import('../core/request.js')} request - * @param {import('net').Socket} socket - * @param {number} contentLength - * @param {string} header - * @param {boolean} expectsPayload - * @returns {Promise} - */ -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] + toName(nameOrPrefix) { + return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix); } - - if (!writer.write(chunk)) { - await waitForDrain() + name(prefix) { + return new code_1.Name(this._newName(prefix)); } - } - - writer.end() - } catch (err) { - writer.destroy(err) - } finally { - socket - .off('close', onDrain) - .off('drain', onDrain) - } -} - -class AsyncWriter { - /** - * - * @param {object} arg - * @param {AbortCallback} arg.abort - * @param {import('net').Socket} arg.socket - * @param {import('../core/request.js')} arg.request - * @param {number} arg.contentLength - * @param {import('./client.js')} arg.client - * @param {boolean} arg.expectsPayload - * @param {string} arg.header - */ - 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 - } - - /** - * @param {Buffer} chunk - * @returns - */ - 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() + _newName(prefix) { + const ng = this._names[prefix] || this._nameGroup(prefix); + return `${prefix}${ng.index++}`; } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - socket.cork() - - if (bytesWritten === 0) { - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true + _nameGroup(prefix) { + var _a, _b; + if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) { + throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`); + } + return this._names[prefix] = { prefix, index: 0 }; } - - if (contentLength === null) { - socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1') - } else { - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') + }; + exports.Scope = Scope; + var ValueScopeName = class extends code_1.Name { + constructor(prefix, nameStr) { + super(nameStr); + this.prefix = prefix; } - } - - 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) { - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() + setValue(value, { property, itemIndex }) { + this.value = value; + this.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`; + } + }; + exports.ValueScopeName = ValueScopeName; + var line = (0, code_1._)`\n`; + var ValueScope = class extends Scope { + constructor(opts) { + super(opts); + this._values = {}; + this._scope = opts.scope; + this.opts = { ...opts, _n: opts.lines ? line : code_1.nil }; + } + get() { + return this._scope; + } + name(prefix) { + return new ValueScopeName(prefix, this._newName(prefix)); + } + value(nameOrPrefix, value) { + var _a; + if (value.ref === void 0) + throw new Error("CodeGen: ref must be passed in value"); + const name = this.toName(nameOrPrefix); + const { prefix } = name; + const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref; + let vs2 = this._values[prefix]; + if (vs2) { + const _name = vs2.get(valueKey); + if (_name) + return _name; + } else { + vs2 = this._values[prefix] = /* @__PURE__ */ new Map(); + } + vs2.set(valueKey, name); + const s2 = this._scope[prefix] || (this._scope[prefix] = []); + const itemIndex = s2.length; + s2[itemIndex] = value.ref; + name.setValue(value, { property: prefix, itemIndex }); + return name; + } + getValue(prefix, keyOrRef) { + const vs2 = this._values[prefix]; + if (!vs2) + return; + return vs2.get(keyOrRef); + } + scopeRefs(scopeName, values = this._values) { + return this._reduceValues(values, (name) => { + if (name.scopePath === void 0) + throw new Error(`CodeGen: name "${name}" has no value`); + return (0, code_1._)`${scopeName}${name.scopePath}`; + }); + } + scopeCode(values = this._values, usedValues, getCode) { + return this._reduceValues(values, (name) => { + if (name.value === void 0) + throw new Error(`CodeGen: name "${name}" has no value`); + return name.value.code; + }, usedValues, getCode); + } + _reduceValues(values, valueCode, usedValues = {}, getCode) { + let code = code_1.nil; + for (const prefix in values) { + const vs2 = values[prefix]; + if (!vs2) + continue; + const nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map(); + vs2.forEach((name) => { + if (nameSet.has(name)) + return; + nameSet.set(name, UsedValueState.Started); + let c2 = valueCode(name); + if (c2) { + const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const; + code = (0, code_1._)`${code}${def} ${name} = ${c2};${this.opts._n}`; + } else if (c2 = getCode === null || getCode === void 0 ? void 0 : getCode(name)) { + code = (0, code_1._)`${code}${c2}${this.opts._n}`; + } else { + throw new ValueError(name); + } + nameSet.set(name, UsedValueState.Completed); + }); } + return code; } - } - - return ret + }; + exports.ValueScope = ValueScope; } +}); - /** - * @returns {void} - */ - 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') +// node_modules/@redocly/ajv/dist/compile/codegen/index.js +var require_codegen = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/codegen/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0; + var code_1 = require_code(); + var scope_1 = require_scope(); + var code_2 = require_code(); + Object.defineProperty(exports, "_", { enumerable: true, get: function() { + return code_2._; + } }); + Object.defineProperty(exports, "str", { enumerable: true, get: function() { + return code_2.str; + } }); + Object.defineProperty(exports, "strConcat", { enumerable: true, get: function() { + return code_2.strConcat; + } }); + Object.defineProperty(exports, "nil", { enumerable: true, get: function() { + return code_2.nil; + } }); + Object.defineProperty(exports, "getProperty", { enumerable: true, get: function() { + return code_2.getProperty; + } }); + Object.defineProperty(exports, "stringify", { enumerable: true, get: function() { + return code_2.stringify; + } }); + Object.defineProperty(exports, "regexpCode", { enumerable: true, get: function() { + return code_2.regexpCode; + } }); + Object.defineProperty(exports, "Name", { enumerable: true, get: function() { + return code_2.Name; + } }); + var scope_2 = require_scope(); + Object.defineProperty(exports, "Scope", { enumerable: true, get: function() { + return scope_2.Scope; + } }); + Object.defineProperty(exports, "ValueScope", { enumerable: true, get: function() { + return scope_2.ValueScope; + } }); + Object.defineProperty(exports, "ValueScopeName", { enumerable: true, get: function() { + return scope_2.ValueScopeName; + } }); + Object.defineProperty(exports, "varKinds", { enumerable: true, get: function() { + return scope_2.varKinds; + } }); + exports.operators = { + GT: new code_1._Code(">"), + GTE: new code_1._Code(">="), + LT: new code_1._Code("<"), + LTE: new code_1._Code("<="), + EQ: new code_1._Code("==="), + NEQ: new code_1._Code("!=="), + NOT: new code_1._Code("!"), + OR: new code_1._Code("||"), + AND: new code_1._Code("&&"), + ADD: new code_1._Code("+") + }; + var Node = class { + optimizeNodes() { + return this; + } + optimizeNames(_names, _constants) { + return this; + } + }; + var Def = class extends Node { + constructor(varKind, name, rhs) { + super(); + this.varKind = varKind; + this.name = name; + this.rhs = rhs; + } + render({ es5, _n }) { + const varKind = es5 ? scope_1.varKinds.var : this.varKind; + const rhs = this.rhs === void 0 ? "" : ` = ${this.rhs}`; + return `${varKind} ${this.name}${rhs};` + _n; + } + optimizeNames(names, constants) { + if (!names[this.name.str]) + return; + if (this.rhs) + this.rhs = optimizeExpr(this.rhs, names, constants); + return this; + } + get names() { + return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {}; + } + }; + var Assign = class extends Node { + constructor(lhs, rhs, sideEffects) { + super(); + this.lhs = lhs; + this.rhs = rhs; + this.sideEffects = sideEffects; + } + render({ _n }) { + return `${this.lhs} = ${this.rhs};` + _n; + } + optimizeNames(names, constants) { + if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects) + return; + this.rhs = optimizeExpr(this.rhs, names, constants); + return this; + } + get names() { + const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names }; + return addExprNames(names, this.rhs); + } + }; + var AssignOp = class extends Assign { + constructor(lhs, op, rhs, sideEffects) { + super(lhs, rhs, sideEffects); + this.op = op; + } + render({ _n }) { + return `${this.lhs} ${this.op}= ${this.rhs};` + _n; + } + }; + var Label = class extends Node { + constructor(label) { + super(); + this.label = label; + this.names = {}; + } + render({ _n }) { + return `${this.label}:` + _n; + } + }; + var Break = class extends Node { + constructor(label) { + super(); + this.label = label; + this.names = {}; + } + render({ _n }) { + const label = this.label ? ` ${this.label}` : ""; + return `break${label};` + _n; + } + }; + var Throw = class extends Node { + constructor(error2) { + super(); + this.error = error2; + } + render({ _n }) { + return `throw ${this.error};` + _n; + } + get names() { + return this.error.names; + } + }; + var AnyCode = class extends Node { + constructor(code) { + super(); + this.code = code; + } + render({ _n }) { + return `${this.code};` + _n; + } + optimizeNodes() { + return `${this.code}` ? this : void 0; + } + optimizeNames(names, constants) { + this.code = optimizeExpr(this.code, names, constants); + return this; + } + get names() { + return this.code instanceof code_1._CodeOrName ? this.code.names : {}; + } + }; + var ParentNode = class extends Node { + constructor(nodes = []) { + super(); + this.nodes = nodes; + } + render(opts) { + return this.nodes.reduce((code, n8) => code + n8.render(opts), ""); + } + optimizeNodes() { + const { nodes } = this; + let i2 = nodes.length; + while (i2--) { + const n8 = nodes[i2].optimizeNodes(); + if (Array.isArray(n8)) + nodes.splice(i2, 1, ...n8); + else if (n8) + nodes[i2] = n8; + else + nodes.splice(i2, 1); + } + return nodes.length > 0 ? this : void 0; + } + optimizeNames(names, constants) { + const { nodes } = this; + let i2 = nodes.length; + while (i2--) { + const n8 = nodes[i2]; + if (n8.optimizeNames(names, constants)) + continue; + subtractNames(names, n8.names); + nodes.splice(i2, 1); + } + return nodes.length > 0 ? this : void 0; + } + get names() { + return this.nodes.reduce((names, n8) => addNames(names, n8.names), {}); + } + }; + var BlockNode = class extends ParentNode { + render(opts) { + return "{" + opts._n + super.render(opts) + "}" + opts._n; + } + }; + var Root10 = class extends ParentNode { + }; + var Else = class extends BlockNode { + }; + Else.kind = "else"; + var If = class _If extends BlockNode { + constructor(condition, nodes) { + super(nodes); + this.condition = condition; } - } 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()) + render(opts) { + let code = `if(${this.condition})` + super.render(opts); + if (this.else) + code += "else " + this.else.render(opts); + return code; } - } - - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() + optimizeNodes() { + super.optimizeNodes(); + const cond = this.condition; + if (cond === true) + return this.nodes; + let e2 = this.else; + if (e2) { + const ns2 = e2.optimizeNodes(); + e2 = this.else = Array.isArray(ns2) ? new Else(ns2) : ns2; + } + if (e2) { + if (cond === false) + return e2 instanceof _If ? e2 : e2.nodes; + if (this.nodes.length) + return this; + return new _If(not(cond), e2 instanceof _If ? [e2] : e2.nodes); + } + if (cond === false || !this.nodes.length) + return void 0; + return this; } - } - - client[kResume]() - } - - /** - * @param {Error} [err] - * @returns {void} - */ - 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 - - -/***/ }), - -/***/ 90296: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(98061) -const { pipeline } = __nccwpck_require__(84492) -const util = __nccwpck_require__(83983) -const { - RequestContentLengthMismatchError, - RequestAbortedError, - SocketError, - InformationalError, - InvalidArgumentError -} = __nccwpck_require__(48045) -const { - kUrl, - kReset, - kClient, - kRunning, - kPending, - kQueue, - kPendingIdx, - kRunningIdx, - kError, - kSocket, - kStrictContentLength, - kOnError, - kMaxConcurrentStreams, - kPingInterval, - kHTTP2Session, - kHTTP2InitialWindowSize, - kHTTP2ConnectionWindowSize, - kResume, - kSize, - kHTTPContext, - kClosed, - kBodyTimeout, - kEnableConnectProtocol, - kRemoteSettings, - kHTTP2Stream, - kHTTP2SessionState -} = __nccwpck_require__(72785) -const { channels } = __nccwpck_require__(58438) - -const kOpenStreams = Symbol('open streams') - -let extractBody - -/** @type {import('http2')} */ -let http2 -try { - http2 = __nccwpck_require__(42725) -} 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_HEADER_PROTOCOL, - NGHTTP2_REFUSED_STREAM, - NGHTTP2_CANCEL - } -} = 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)) + optimizeNames(names, constants) { + var _a; + this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants); + if (!(super.optimizeNames(names, constants) || this.else)) + return; + this.condition = optimizeExpr(this.condition, names, constants); + return this; } - } else { - result.push(Buffer.from(name), Buffer.from(value)) - } - } - - return result -} - -function connectH2 (client, socket) { - client[kSocket] = socket - - const http2InitialWindowSize = client[kHTTP2InitialWindowSize] - const http2ConnectionWindowSize = client[kHTTP2ConnectionWindowSize] - - const session = http2.connect(client[kUrl], { - createConnection: () => socket, - peerMaxConcurrentStreams: client[kMaxConcurrentStreams], - settings: { - // TODO(metcoder95): add support for PUSH - enablePush: false, - ...(http2InitialWindowSize != null ? { initialWindowSize: http2InitialWindowSize } : null) - } - }) - - client[kSocket] = socket - session[kOpenStreams] = 0 - session[kClient] = client - session[kSocket] = socket - session[kHTTP2SessionState] = { - ping: { - interval: client[kPingInterval] === 0 ? null : setInterval(onHttp2SendPing, client[kPingInterval], session).unref() - } - } - // We set it to true by default in a best-effort; however once connected to an H2 server - // we will check if extended CONNECT protocol is supported or not - // and set this value accordingly. - session[kEnableConnectProtocol] = false - // States whether or not we have received the remote settings from the server - session[kRemoteSettings] = false - - // Apply connection-level flow control once connected (if supported). - if (http2ConnectionWindowSize) { - util.addListener(session, 'connect', applyConnectionWindowSize.bind(session, http2ConnectionWindowSize)) - } - - util.addListener(session, 'error', onHttp2SessionError) - util.addListener(session, 'frameError', onHttp2FrameError) - util.addListener(session, 'end', onHttp2SessionEnd) - util.addListener(session, 'goaway', onHttp2SessionGoAway) - util.addListener(session, 'close', onHttp2SessionClose) - util.addListener(session, 'remoteSettings', onHttp2RemoteSettings) - // TODO (@metcoder95): implement SETTINGS support - // util.addListener(session, 'localSettings', onHttp2RemoteSettings) - - session.unref() - - client[kHTTP2Session] = session - socket[kHTTP2Session] = session - - util.addListener(socket, 'error', onHttp2SocketError) - util.addListener(socket, 'end', onHttp2SocketEnd) - util.addListener(socket, 'close', onHttp2SocketClose) - - socket[kClosed] = false - socket.on('close', onSocketClose) - - return { - version: 'h2', - defaultPipelining: Infinity, - /** - * @param {import('../core/request.js')} request - * @returns {boolean} - */ - write (request) { - return writeH2(client, request) - }, - /** - * @returns {void} - */ - resume () { - resumeH2(client) - }, - /** - * @param {Error | null} err - * @param {() => void} callback - */ - destroy (err, callback) { - if (socket[kClosed]) { - queueMicrotask(callback) - } else { - socket.destroy(err).on('close', callback) + get names() { + const names = super.names; + addExprNames(names, this.condition); + if (this.else) + addNames(names, this.else.names); + return names; } - }, - /** - * @type {boolean} - */ - get destroyed () { - return socket.destroyed - }, - /** - * @param {import('../core/request.js')} request - * @returns {boolean} - */ - busy (request) { - if (request != null) { - if (client[kRunning] > 0) { - // We are already processing requests - - // Non-idempotent request cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - if (request.idempotent === false) return true - // Don't dispatch an upgrade until all preceding requests have completed. - // Possibly, we do not have remote settings confirmed yet. - if ((request.upgrade === 'websocket' || request.method === 'CONNECT') && session[kRemoteSettings] === false) return true - // 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. - if (util.bodyLength(request.body) !== 0 && - (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) return true - } else { - return (request.upgrade === 'websocket' || request.method === 'CONNECT') && session[kRemoteSettings] === false - } + }; + If.kind = "if"; + var For = class extends BlockNode { + }; + For.kind = "for"; + var ForLoop = class extends For { + constructor(iteration) { + super(); + this.iteration = iteration; } - - 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 applyConnectionWindowSize (connectionWindowSize) { - try { - if (typeof this.setLocalWindowSize === 'function') { - this.setLocalWindowSize(connectionWindowSize) - } - } catch { - // Best-effort only. - } -} - -function onHttp2RemoteSettings (settings) { - // Fallbacks are a safe bet, remote setting will always override - this[kClient][kMaxConcurrentStreams] = settings.maxConcurrentStreams ?? this[kClient][kMaxConcurrentStreams] - /** - * From RFC-8441 - * A sender MUST NOT send a SETTINGS_ENABLE_CONNECT_PROTOCOL parameter - * with the value of 0 after previously sending a value of 1. - */ - // Note: Cannot be tested in Node, it does not supports disabling the extended CONNECT protocol once enabled - if (this[kRemoteSettings] === true && this[kEnableConnectProtocol] === true && settings.enableConnectProtocol === false) { - const err = new InformationalError('HTTP/2: Server disabled extended CONNECT protocol against RFC-8441') - this[kSocket][kError] = err - this[kClient][kOnError](err) - return - } - - this[kEnableConnectProtocol] = settings.enableConnectProtocol ?? this[kEnableConnectProtocol] - this[kRemoteSettings] = true - this[kClient][kResume]() -} - -function onHttp2SendPing (session) { - const state = session[kHTTP2SessionState] - if ((session.closed || session.destroyed) && state.ping.interval != null) { - clearInterval(state.ping.interval) - state.ping.interval = null - return - } - - // If no ping sent, do nothing - session.ping(onPing.bind(session)) - - function onPing (err, duration) { - const client = this[kClient] - const socket = this[kClient] - - if (err != null) { - const error = new InformationalError(`HTTP/2: "PING" errored - type ${err.message}`) - socket[kError] = error - client[kOnError](error) - } else { - client.emit('ping', duration) - } - } -} - -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 - * - * @this {import('http2').ClientHttp2Session} - * @param {number} errorCode - */ -function onHttp2SessionGoAway (errorCode) { - // TODO(mcollina): Verify if GOAWAY implements the spec correctly: - // https://datatracker.ietf.org/doc/html/rfc7540#section-6.8 - // Specifically, we do not verify the "valid" stream id. - - const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${errorCode}`, util.getSocketInfo(this[kSocket])) - const client = this[kClient] - - client[kSocket] = null - client[kHTTPContext] = null - - // this is an HTTP2 session - this.close() - 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.emit('connectionError', client[kUrl], [client], err) - - client[kResume]() -} - -function onHttp2SessionClose () { - const { [kClient]: client, [kHTTP2SessionState]: state } = this - const { [kSocket]: socket } = client - - const err = this[kSocket][kError] || this[kError] || new SocketError('closed', util.getSocketInfo(socket)) - - client[kSocket] = null - client[kHTTPContext] = null - - if (state.ping.interval != null) { - clearInterval(state.ping.interval) - state.ping.interval = 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) - } - } -} - -function onHttp2SocketClose () { - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) - - const client = this[kHTTP2Session][kClient] - - client[kSocket] = null - client[kHTTPContext] = 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]() -} - -function onHttp2SocketError (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - this[kError] = err - - this[kClient][kOnError](err) -} - -function onHttp2SocketEnd () { - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) -} - -function onSocketClose () { - this[kClosed] = true -} - -// 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 requestTimeout = request.bodyTimeout ?? client[kBodyTimeout] - const session = client[kHTTP2Session] - const { method, path, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request - let { body } = request - - if (upgrade != null && upgrade !== 'websocket') { - util.errorRequest(client, request, new InvalidArgumentError(`Custom upgrade "${upgrade}" not supported over HTTP/2`)) - return false - } - - const headers = {} - for (let n = 0; n < reqHeaders.length; n += 2) { - const key = reqHeaders[n + 0] - const val = reqHeaders[n + 1] - - if (key === 'cookie') { - if (headers[key] != null) { - headers[key] = Array.isArray(headers[key]) ? (headers[key].push(val), headers[key]) : [headers[key], val] - } else { - headers[key] = val + render(opts) { + return `for(${this.iteration})` + super.render(opts); } - - continue - } - - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - if (headers[key]) { - headers[key] += `, ${val[i]}` - } else { - headers[key] = val[i] - } + optimizeNames(names, constants) { + if (!super.optimizeNames(names, constants)) + return; + this.iteration = optimizeExpr(this.iteration, names, constants); + return this; } - } else if (headers[key]) { - headers[key] += `, ${val}` - } else { - headers[key] = val - } - } - - /** @type {import('node:http2').ClientHttp2Stream} */ - let stream = null - - 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) { - // Some chunks might still come after abort, - // let's ignore them - stream.removeAllListeners('data') - - // On Abort, we close the stream to send RST_STREAM frame - stream.close() - - // We move the running index to the next request - client[kOnError](err) - client[kResume]() - } - - // We do not destroy the socket as we can continue using the session - // the stream gets destroyed and the session remains to create new streams - util.destroy(body, err) - } - - 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 (upgrade || method === 'CONNECT') { - session.ref() - - if (upgrade === 'websocket') { - // We cannot upgrade to websocket if extended CONNECT protocol is not supported - if (session[kEnableConnectProtocol] === false) { - util.errorRequest(client, request, new InformationalError('HTTP/2: Extended CONNECT protocol not supported by server')) - session.unref() - return false + get names() { + return addNames(super.names, this.iteration.names); } - - // We force the method to CONNECT - // as per RFC-8441 - // https://datatracker.ietf.org/doc/html/rfc8441#section-4 - headers[HTTP2_HEADER_METHOD] = 'CONNECT' - headers[HTTP2_HEADER_PROTOCOL] = 'websocket' - // :path and :scheme headers must be omitted when sending CONNECT but set if extended-CONNECT - headers[HTTP2_HEADER_PATH] = path - - if (protocol === 'ws:' || protocol === 'wss:') { - headers[HTTP2_HEADER_SCHEME] = protocol === 'ws:' ? 'http' : 'https' - } else { - headers[HTTP2_HEADER_SCHEME] = protocol === 'http:' ? 'http' : 'https' + }; + var ForRange = class extends For { + constructor(varKind, name, from, to2) { + super(); + this.varKind = varKind; + this.name = name; + this.from = from; + this.to = to2; } - - stream = session.request(headers, { endStream: false, signal }) - stream[kHTTP2Stream] = true - - stream.once('response', (headers, _flags) => { - const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers - - request.onUpgrade(statusCode, parseH2Headers(realHeaders), stream) - - ++session[kOpenStreams] - client[kQueue][client[kRunningIdx]++] = null - }) - - stream.on('error', () => { - if (stream.rstCode === NGHTTP2_REFUSED_STREAM || stream.rstCode === NGHTTP2_CANCEL) { - // NGHTTP2_REFUSED_STREAM (7) or NGHTTP2_CANCEL (8) - // We do not treat those as errors as the server might - // not support websockets and refuse the stream - abort(new InformationalError(`HTTP/2: "stream error" received - code ${stream.rstCode}`)) - } - }) - - stream.once('close', () => { - session[kOpenStreams] -= 1 - if (session[kOpenStreams] === 0) session.unref() - }) - - stream.setTimeout(requestTimeout) - return true - } - - // TODO: consolidate once we support CONNECT properly - // NOTE: 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 }) - stream[kHTTP2Stream] = true - stream.on('response', headers => { - const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers - - request.onUpgrade(statusCode, parseH2Headers(realHeaders), stream) - ++session[kOpenStreams] - client[kQueue][client[kRunningIdx]++] = null - }) - stream.once('close', () => { - session[kOpenStreams] -= 1 - if (session[kOpenStreams] === 0) session.unref() - }) - stream.setTimeout(requestTimeout) - - 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] = protocol === 'http:' ? 'http' : '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__(36682).extractBody) - - const [bodyStream, contentType] = extractBody(body) - headers['content-type'] = contentType - - body = bodyStream.stream - contentLength = bodyStream.length - } - - if (contentLength == null) { - contentLength = request.contentLength - } - - if (!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. - // And for methods that don't expect a payload, omit Content-Length. - 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 || contentLength === 0, 'no body must not have content length') - headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}` - } - - session.ref() - - if (channels.sendHeaders.hasSubscribers) { - let header = '' - for (const key in headers) { - header += `${key}: ${headers[key]}\r\n` - } - channels.sendHeaders.publish({ request, headers: header, socket: session[kSocket] }) - } - - // TODO(metcoder95): add support for sending trailers - const shouldEndStream = method === 'GET' || method === 'HEAD' || body === null - if (expectContinue) { - headers[HTTP2_HEADER_EXPECT] = '100-continue' - stream = session.request(headers, { endStream: shouldEndStream, signal }) - stream[kHTTP2Stream] = true - - stream.once('continue', writeBodyH2) - } else { - stream = session.request(headers, { - endStream: shouldEndStream, - signal - }) - stream[kHTTP2Stream] = true - - writeBodyH2() - } - - // Increment counter as we have new streams open - ++session[kOpenStreams] - stream.setTimeout(requestTimeout) - - // Track whether we received a response (headers) - let responseReceived = false - - stream.once('response', headers => { - const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers - request.onResponseStarted() - responseReceived = true - - // 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) { - stream.removeAllListeners('data') - return - } - - if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), '') === false) { - stream.pause() - } - - stream.on('data', (chunk) => { - if (request.aborted || request.completed) { - return + render(opts) { + const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind; + const { name, from, to: to2 } = this; + return `for(${varKind} ${name}=${from}; ${name}<${to2}; ${name}++)` + super.render(opts); + } + get names() { + const names = addExprNames(super.names, this.from); + return addExprNames(names, this.to); + } + }; + var ForIter = class extends For { + constructor(loop, varKind, name, iterable) { + super(); + this.loop = loop; + this.varKind = varKind; + this.name = name; + this.iterable = iterable; } - - if (request.onData(chunk) === false) { - stream.pause() + render(opts) { + return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts); } - }) - }) - - stream.once('end', () => { - stream.removeAllListeners('data') - // If we received a response, this is a normal completion - if (responseReceived) { - if (!request.aborted && !request.completed) { - request.onComplete({}) + optimizeNames(names, constants) { + if (!super.optimizeNames(names, constants)) + return; + this.iterable = optimizeExpr(this.iterable, names, constants); + return this; } - - client[kQueue][client[kRunningIdx]++] = null - client[kResume]() - } else { - // Stream ended without receiving a response - this is an error - // (e.g., server destroyed the stream before sending headers) - abort(new InformationalError('HTTP/2: stream half-closed (remote)')) - client[kQueue][client[kRunningIdx]++] = null - client[kPendingIdx] = client[kRunningIdx] - client[kResume]() - } - }) - - stream.once('close', () => { - stream.removeAllListeners('data') - session[kOpenStreams] -= 1 - if (session[kOpenStreams] === 0) { - session.unref() - } - }) - - stream.once('error', function (err) { - stream.removeAllListeners('data') - abort(err) - }) - - stream.once('frameError', (type, code) => { - stream.removeAllListeners('data') - abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)) - }) - - stream.on('aborted', () => { - stream.removeAllListeners('data') - }) - - stream.on('timeout', () => { - const err = new InformationalError(`HTTP/2: "stream timeout after ${requestTimeout}"`) - stream.removeAllListeners('data') - session[kOpenStreams] -= 1 - - if (session[kOpenStreams] === 0) { - session.unref() - } - - abort(err) - }) - - stream.once('trailers', trailers => { - if (request.aborted || request.completed) { - return - } - - stream.removeAllListeners('data') - request.onComplete(trailers) - }) - - return true - - function writeBodyH2 () { - 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 - ) + get names() { + return addNames(super.names, this.iterable.names); } - } 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]() + }; + var Func = class extends BlockNode { + constructor(name, args, async) { + super(); + this.name = name; + this.args = args; + this.async = async; } - } - ) - - 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] + render(opts) { + const _async = this.async ? "async " : ""; + return `${_async}function ${this.name}(${this.args})` + super.render(opts); } - - const res = h2stream.write(chunk) - request.onBodySent(chunk) - if (!res) { - await waitForDrain() + }; + Func.kind = "func"; + var Return = class extends ParentNode { + render(opts) { + return "return " + super.render(opts); } - } - - 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 - - -/***/ }), - -/***/ 8176: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(98061) -const net = __nccwpck_require__(87503) -const http = __nccwpck_require__(88849) -const util = __nccwpck_require__(83983) -const { ClientStats } = __nccwpck_require__(97181) -const { channels } = __nccwpck_require__(58438) -const Request = __nccwpck_require__(62905) -const DispatcherBase = __nccwpck_require__(61544) -const { - InvalidArgumentError, - InformationalError, - ClientDestroyedError -} = __nccwpck_require__(48045) -const buildConnector = __nccwpck_require__(82067) -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, - kMaxRequests, - kCounter, - kClose, - kDestroy, - kDispatch, - kLocalAddress, - kMaxResponseSize, - kOnError, - kHTTPContext, - kMaxConcurrentStreams, - kHTTP2InitialWindowSize, - kHTTP2ConnectionWindowSize, - kResume, - kPingInterval -} = __nccwpck_require__(72785) -const connectH1 = __nccwpck_require__(43264) -const connectH2 = __nccwpck_require__(90296) - -const kClosedResolve = Symbol('kClosedResolve') - -const getDefaultNodeMaxHeaderSize = http && - http.maxHeaderSize && - Number.isInteger(http.maxHeaderSize) && - http.maxHeaderSize > 0 - ? () => http.maxHeaderSize - : () => { throw new InvalidArgumentError('http module not available or http.maxHeaderSize invalid') } - -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, { - maxHeaderSize, - headersTimeout, - socketTimeout, - requestTimeout, - connectTimeout, - bodyTimeout, - idleTimeout, - keepAlive, - keepAliveTimeout, - maxKeepAliveTimeout, - keepAliveMaxTimeout, - keepAliveTimeoutThreshold, - socketPath, - pipelining, - tls, - strictContentLength, - maxCachedSessions, - connect, - maxRequestsPerClient, - localAddress, - maxResponseSize, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - // h2 - maxConcurrentStreams, - allowH2, - useH2c, - initialWindowSize, - connectionWindowSize, - pingInterval - } = {}) { - 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) { - if (!Number.isInteger(maxHeaderSize) || maxHeaderSize < 1) { - throw new InvalidArgumentError('invalid maxHeaderSize') + }; + Return.kind = "return"; + var Try = class extends BlockNode { + render(opts) { + let code = "try" + super.render(opts); + if (this.catch) + code += this.catch.render(opts); + if (this.finally) + code += this.finally.render(opts); + return code; } - } else { - // If maxHeaderSize is not provided, use the default value from the http module - // or if that is not available, throw an error. - maxHeaderSize = getDefaultNodeMaxHeaderSize() - } - - 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 (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 (useH2c != null && typeof useH2c !== 'boolean') { - throw new InvalidArgumentError('useH2c must be a valid boolean value') - } - - if (initialWindowSize != null && (!Number.isInteger(initialWindowSize) || initialWindowSize < 1)) { - throw new InvalidArgumentError('initialWindowSize must be a positive integer, greater than 0') - } - - if (connectionWindowSize != null && (!Number.isInteger(connectionWindowSize) || connectionWindowSize < 1)) { - throw new InvalidArgumentError('connectionWindowSize must be a positive integer, greater than 0') - } - - if (pingInterval != null && (typeof pingInterval !== 'number' || !Number.isInteger(pingInterval) || pingInterval < 0)) { - throw new InvalidArgumentError('pingInterval must be a positive integer, greater or equal to 0') - } - - super() - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - useH2c, - socketPath, - timeout: connectTimeout, - ...(typeof autoSelectFamily === 'boolean' ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) - } else if (socketPath != null) { - const customConnect = connect - connect = (opts, callback) => customConnect({ ...opts, socketPath }, callback) - } - - this[kUrl] = util.parseOrigin(url) - this[kConnector] = connect - this[kPipelining] = pipelining != null ? pipelining : 1 - this[kMaxHeadersSize] = 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[kMaxRequests] = maxRequestsPerClient - this[kClosedResolve] = null - this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1 - this[kHTTPContext] = null - // h2 - this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server - // HTTP/2 window sizes are set to higher defaults than Node.js core for better performance: - // - initialWindowSize: 262144 (256KB) vs Node.js default 65535 (64KB - 1) - // Allows more data to be sent before requiring acknowledgment, improving throughput - // especially on high-latency networks. This matches common production HTTP/2 servers. - // - connectionWindowSize: 524288 (512KB) vs Node.js default (none set) - // Provides better flow control for the entire connection across multiple streams. - this[kHTTP2InitialWindowSize] = initialWindowSize != null ? initialWindowSize : 262144 - this[kHTTP2ConnectionWindowSize] = connectionWindowSize != null ? connectionWindowSize : 524288 - this[kPingInterval] = pingInterval != null ? pingInterval : 60e3 // Default ping interval for h2 - 1 minute - - // 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 stats () { - return new ClientStats(this) - } - - 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 - ) - } - - [kConnect] (cb) { - connect(this) - this.once('connect', cb) - } - - [kDispatch] (opts, handler) { - const request = new Request(this[kUrl].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 - } - - [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) + optimizeNodes() { + var _a, _b; + super.optimizeNodes(); + (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes(); + (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes(); + return this; + } + optimizeNames(names, constants) { + var _a, _b; + super.optimizeNames(names, constants); + (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants); + (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants); + return this; + } + get names() { + const names = super.names; + if (this.catch) + addNames(names, this.catch.names); + if (this.finally) + addNames(names, this.finally.names); + return names; + } + }; + var Catch = class extends BlockNode { + constructor(error2) { + super(); + this.error = error2; + } + render(opts) { + return `catch(${this.error})` + super.render(opts); + } + }; + Catch.kind = "catch"; + var Finally = class extends BlockNode { + render(opts) { + return "finally" + super.render(opts); + } + }; + Finally.kind = "finally"; + var CodeGen = class { + constructor(extScope, opts = {}) { + this._values = {}; + this._blockStarts = []; + this._constants = {}; + this.opts = { ...opts, _n: opts.lines ? "\n" : "" }; + this._extScope = extScope; + this._scope = new scope_1.Scope({ parent: extScope }); + this._nodes = [new Root10()]; + } + toString() { + return this._root.render(this.opts); + } + // returns unique name in the internal scope + name(prefix) { + return this._scope.name(prefix); + } + // reserves unique name in the external scope + scopeName(prefix) { + return this._extScope.name(prefix); + } + // reserves unique name in the external scope and assigns value to it + scopeValue(prefixOrName, value) { + const name = this._extScope.value(prefixOrName, value); + const vs2 = this._values[name.prefix] || (this._values[name.prefix] = /* @__PURE__ */ new Set()); + vs2.add(name); + return name; } - }) - } - - [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) + getScopeValue(prefix, keyOrRef) { + return this._extScope.getValue(prefix, keyOrRef); } - - const callback = () => { - if (this[kClosedResolve]) { - // TODO (fix): Should we error here with ClientDestroyedError? - this[kClosedResolve]() - this[kClosedResolve] = null + // return code that assigns values in the external scope to the names that are used internally + // (same names that were returned by gen.scopeName or gen.scopeValue) + scopeRefs(scopeName) { + return this._extScope.scopeRefs(scopeName, this._values); + } + scopeCode() { + return this._extScope.scopeCode(this._values); + } + _def(varKind, nameOrPrefix, rhs, constant) { + const name = this._scope.toName(nameOrPrefix); + if (rhs !== void 0 && constant) + this._constants[name.str] = rhs; + this._leafNode(new Def(varKind, name, rhs)); + return name; + } + // `const` declaration (`var` in es5 mode) + const(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant); + } + // `let` declaration with optional assignment (`var` in es5 mode) + let(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant); + } + // `var` declaration with optional assignment + var(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant); + } + // assignment code + assign(lhs, rhs, sideEffects) { + return this._leafNode(new Assign(lhs, rhs, sideEffects)); + } + // `+=` code + add(lhs, rhs) { + return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs)); + } + // appends passed SafeExpr to code or executes Block + code(c2) { + if (typeof c2 == "function") + c2(); + else if (c2 !== code_1.nil) + this._leafNode(new AnyCode(c2)); + return this; + } + // returns code for object literal for the passed argument list of key-value pairs + object(...keyValues) { + const code = ["{"]; + for (const [key, value] of keyValues) { + if (code.length > 1) + code.push(","); + code.push(key); + if (key !== value || this.opts.es5) { + code.push(":"); + (0, code_1.addCodeArg)(code, value); + } } - resolve(null) + code.push("}"); + return new code_1._Code(code); } - - if (this[kHTTPContext]) { - this[kHTTPContext].destroy(err, callback) - this[kHTTPContext] = null - } else { - queueMicrotask(callback) + // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed) + if(condition, thenBody, elseBody) { + this._blockNode(new If(condition)); + if (thenBody && elseBody) { + this.code(thenBody).else().code(elseBody).endIf(); + } else if (thenBody) { + this.code(thenBody).endIf(); + } else if (elseBody) { + throw new Error('CodeGen: "else" body without "then" body'); + } + return this; } - - this[kResume]() - }) - } -} - -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 {void} - */ -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.isIPv6(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 { - client[kConnector]({ - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, (err, socket) => { - if (err) { - handleConnectError(client, err, { host, hostname, protocol, port }) - client[kResume]() - return + // `else if` clause - invalid without `if` or after `else` clauses + elseIf(condition) { + return this._elseNode(new If(condition)); } - - if (client.destroyed) { - util.destroy(socket.on('error', noop), new ClientDestroyedError()) - client[kResume]() - return + // `else` clause - only valid after `if` or `else if` clauses + else() { + return this._elseNode(new Else()); } - - assert(socket) - - try { - client[kHTTPContext] = socket.alpnProtocol === 'h2' - ? connectH2(client, socket) - : connectH1(client, socket) - } catch (err) { - socket.destroy().on('error', noop) - handleConnectError(client, err, { host, hostname, protocol, port }) - client[kResume]() - return + // end `if` statement (needed if gen.if was used only with condition) + endIf() { + return this._endBlockNode(If, Else); } - - 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 - }) + _for(node, forBody) { + this._blockNode(node); + if (forBody) + this.code(forBody).endFor(); + return this; } - - client.emit('connect', client[kUrl], [client]) - client[kResume]() - }) - } catch (err) { - handleConnectError(client, err, { host, hostname, protocol, port }) - client[kResume]() - } -} - -function handleConnectError (client, err, { host, hostname, protocol, port }) { - 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) -} - -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) + // a generic `for` clause (or statement if `forBody` is passed) + for(iteration, forBody) { + return this._for(new ForLoop(iteration), forBody); } - continue - } - - if (client[kPending] === 0) { - return - } - - if (client[kRunning] >= (getPipelining(client) || 1)) { - return - } - - const request = client[kQueue][client[kPendingIdx]] - - if (request === null) { - return - } - - if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) { - if (client[kRunning] > 0) { - return + // `for` statement for a range of values + forRange(nameOrPrefix, from, to2, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) { + const name = this._scope.toName(nameOrPrefix); + return this._for(new ForRange(varKind, name, from, to2), () => forBody(name)); } - - 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 - - -/***/ }), - -/***/ 61544: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Dispatcher = __nccwpck_require__(87781) -const UnwrapHandler = __nccwpck_require__(9960) -const { - ClientDestroyedError, - ClientClosedError, - InvalidArgumentError -} = __nccwpck_require__(48045) -const { kDestroy, kClose, kClosed, kDestroyed, kDispatch } = __nccwpck_require__(72785) - -const kOnDestroyed = Symbol('onDestroyed') -const kOnClosed = Symbol('onClosed') - -class DispatcherBase extends Dispatcher { - /** @type {boolean} */ - [kDestroyed] = false; - - /** @type {Array|null} */ - [kOnClosed] = null - - /** @returns {boolean} */ - get destroyed () { - return this[kDestroyed] - } - - /** @returns {boolean} */ - get closed () { - return this[kClosed] - } - - 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]) { - const err = new ClientDestroyedError() - queueMicrotask(() => callback(err, null)) - return - } - - if (this[kClosed]) { - if (this[kOnClosed]) { - this[kOnClosed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) + // `for-of` statement (in es5 mode replace with a normal for loop) + forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) { + const name = this._scope.toName(nameOrPrefix); + if (this.opts.es5) { + const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable); + return this.forRange("_i", 0, (0, code_1._)`${arr}.length`, (i2) => { + this.var(name, (0, code_1._)`${arr}[${i2}]`); + forBody(name); + }); + } + return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name)); } - return - } - - this[kClosed] = true - this[kOnClosed] ??= [] - 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) + // `for-in` statement. + // With option `ownProperties` replaced with a `for-of` loop for object keys + forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) { + if (this.opts.ownProperties) { + return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody); + } + const name = this._scope.toName(nameOrPrefix); + return this._for(new ForIter("in", varKind, name, obj), () => forBody(name)); } - } - - // 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 ? 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)) + // end `for` loop + endFor() { + return this._endBlockNode(For); } - return - } - - if (!err) { - err = new ClientDestroyedError() - } - - this[kDestroyed] = true - 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) + // `label` statement + label(label) { + return this._leafNode(new Label(label)); } - } - - // Should not error. - this[kDestroy](err) - .then(() => queueMicrotask(onDestroyed)) - } - - dispatch (opts, handler) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } - - handler = UnwrapHandler.unwrap(handler) - - try { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object.') + // `break` statement + break(label) { + return this._leafNode(new Break(label)); + } + // `return` statement + return(value) { + const node = new Return(); + this._blockNode(node); + this.code(value); + if (node.nodes.length !== 1) + throw new Error('CodeGen: "return" should have one node'); + return this._endBlockNode(Return); + } + // `try` statement + try(tryBody, catchCode, finallyCode) { + if (!catchCode && !finallyCode) + throw new Error('CodeGen: "try" without "catch" and "finally"'); + const node = new Try(); + this._blockNode(node); + this.code(tryBody); + if (catchCode) { + const error2 = this.name("e"); + this._currNode = node.catch = new Catch(error2); + catchCode(error2); + } + if (finallyCode) { + this._currNode = node.finally = new Finally(); + this.code(finallyCode); + } + return this._endBlockNode(Catch, Finally); + } + // `throw` statement + throw(error2) { + return this._leafNode(new Throw(error2)); + } + // start self-balancing block + block(body, nodeCount) { + this._blockStarts.push(this._nodes.length); + if (body) + this.code(body).endBlock(nodeCount); + return this; + } + // end the current self-balancing block + endBlock(nodeCount) { + const len = this._blockStarts.pop(); + if (len === void 0) + throw new Error("CodeGen: not in self-balancing block"); + const toClose = this._nodes.length - len; + if (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) { + throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`); + } + this._nodes.length = len; + return this; + } + // `function` heading (or definition if funcBody is passed) + func(name, args = code_1.nil, async, funcBody) { + this._blockNode(new Func(name, args, async)); + if (funcBody) + this.code(funcBody).endFunc(); + return this; + } + // end function definition + endFunc() { + return this._endBlockNode(Func); + } + optimize(n8 = 1) { + while (n8-- > 0) { + this._root.optimizeNodes(); + this._root.optimizeNames(this._root.names, this._constants); + } + } + _leafNode(node) { + this._currNode.nodes.push(node); + return this; + } + _blockNode(node) { + this._currNode.nodes.push(node); + this._nodes.push(node); + } + _endBlockNode(N1, N22) { + const n8 = this._currNode; + if (n8 instanceof N1 || N22 && n8 instanceof N22) { + this._nodes.pop(); + return this; + } + throw new Error(`CodeGen: not in block "${N22 ? `${N1.kind}/${N22.kind}` : N1.kind}"`); } - - if (this[kDestroyed] || this[kOnDestroyed]) { - throw new ClientDestroyedError() + _elseNode(node) { + const n8 = this._currNode; + if (!(n8 instanceof If)) { + throw new Error('CodeGen: "else" without "if"'); + } + this._currNode = n8.else = node; + return this; } - - if (this[kClosed]) { - throw new ClientClosedError() + get _root() { + return this._nodes[0]; } - - return this[kDispatch](opts, handler) - } catch (err) { - if (typeof handler.onError !== 'function') { - throw err + get _currNode() { + const ns2 = this._nodes; + return ns2[ns2.length - 1]; } - - handler.onError(err) - - return false - } - } -} - -module.exports = DispatcherBase - - -/***/ }), - -/***/ 87781: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const EventEmitter = __nccwpck_require__(15673) -const WrapHandler = __nccwpck_require__(81330) - -const wrapInterceptor = (dispatch) => (opts, handler) => dispatch(opts, WrapHandler.wrap(handler)) - -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 + set _currNode(node) { + const ns2 = this._nodes; + ns2[ns2.length - 1] = node; } - - if (typeof interceptor !== 'function') { - throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`) + }; + exports.CodeGen = CodeGen; + function addNames(names, from) { + for (const n8 in from) + names[n8] = (names[n8] || 0) + (from[n8] || 0); + return names; + } + function addExprNames(names, from) { + return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names; + } + function optimizeExpr(expr, names, constants) { + if (expr instanceof code_1.Name) + return replaceName(expr); + if (!canOptimize(expr)) + return expr; + return new code_1._Code(expr._items.reduce((items, c2) => { + if (c2 instanceof code_1.Name) + c2 = replaceName(c2); + if (c2 instanceof code_1._Code) + items.push(...c2._items); + else + items.push(c2); + return items; + }, [])); + function replaceName(n8) { + const c2 = constants[n8.str]; + if (c2 === void 0 || names[n8.str] !== 1) + return n8; + delete names[n8.str]; + return c2; } - - dispatch = interceptor(dispatch) - dispatch = wrapInterceptor(dispatch) - - if (dispatch == null || typeof dispatch !== 'function' || dispatch.length !== 2) { - throw new TypeError('invalid interceptor') + function canOptimize(e2) { + return e2 instanceof code_1._Code && e2._items.some((c2) => c2 instanceof code_1.Name && names[c2.str] === 1 && constants[c2.str] !== void 0); } } - - return new Proxy(this, { - get: (target, key) => key === 'dispatch' ? dispatch : target[key] - }) - } -} - -module.exports = Dispatcher - - -/***/ }), - -/***/ 88374: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const DispatcherBase = __nccwpck_require__(61544) -const { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = __nccwpck_require__(72785) -const ProxyAgent = __nccwpck_require__(15657) -const Agent = __nccwpck_require__(71208) - -const DEFAULT_PORTS = { - 'http:': 80, - 'https:': 443 -} - -class EnvHttpProxyAgent extends DispatcherBase { - #noProxyValue = null - #noProxyEntries = null - #opts = null - - constructor (opts = {}) { - super() - this.#opts = opts - - 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] + function subtractNames(names, from) { + for (const n8 in from) + names[n8] = (names[n8] || 0) - (from[n8] || 0); } - - 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] + function not(x3) { + return typeof x3 == "boolean" || typeof x3 == "number" || x3 === null ? !x3 : (0, code_1._)`!${par(x3)}`; } - - this.#parseNoProxy() - } - - [kDispatch] (opts, handler) { - const url = new URL(opts.origin) - const agent = this.#getProxyAgentForUrl(url) - return agent.dispatch(opts, handler) - } - - [kClose] () { - return Promise.all([ - this[kNoProxyAgent].close(), - !this[kHttpProxyAgent][kClosed] && this[kHttpProxyAgent].close(), - !this[kHttpsProxyAgent][kClosed] && this[kHttpsProxyAgent].close() - ]) - } - - [kDestroy] (err) { - return Promise.all([ - this[kNoProxyAgent].destroy(err), - !this[kHttpProxyAgent][kDestroyed] && this[kHttpProxyAgent].destroy(err), - !this[kHttpsProxyAgent][kDestroyed] && 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] + exports.not = not; + var andCode = mappend(exports.operators.AND); + function and(...args) { + return args.reduce(andCode); + } + exports.and = and; + var orCode = mappend(exports.operators.OR); + function or2(...args) { + return args.reduce(orCode); } - if (protocol === 'https:') { - return this[kHttpsProxyAgent] + exports.or = or2; + function mappend(op) { + return (x3, y2) => x3 === code_1.nil ? y2 : y2 === code_1.nil ? x3 : (0, code_1._)`${par(x3)} ${op} ${par(y2)}`; + } + function par(x3) { + return x3 instanceof code_1.Name ? x3 : (0, code_1._)`(${x3})`; } - return this[kHttpProxyAgent] } +}); - #shouldProxy (hostname, port) { - if (this.#noProxyChanged) { - this.#parseNoProxy() +// node_modules/@redocly/ajv/dist/compile/util.js +var require_util7 = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/util.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0; + var codegen_1 = require_codegen(); + var code_1 = require_code(); + function toHash(arr) { + const hash = {}; + for (const item of arr) + hash[item] = true; + return hash; } - - if (this.#noProxyEntries.length === 0) { - return true // Always proxy if NO_PROXY is not set or empty. + exports.toHash = toHash; + function alwaysValidSchema(it3, schema2) { + if (typeof schema2 == "boolean") + return schema2; + if (Object.keys(schema2).length === 0) + return true; + checkUnknownRules(it3, schema2); + return !schemaHasRules(schema2, it3.self.RULES.all); } - if (this.#noProxyValue === '*') { - return false // Never proxy if wildcard is set. + exports.alwaysValidSchema = alwaysValidSchema; + function checkUnknownRules(it3, schema2 = it3.schema) { + const { opts, self } = it3; + if (!opts.strictSchema) + return; + if (typeof schema2 === "boolean") + return; + const rules8 = self.RULES.keywords; + for (const key in schema2) { + if (!rules8[key]) + checkStrictMode(it3, `unknown keyword: "${key}"`); + } + } + exports.checkUnknownRules = checkUnknownRules; + function schemaHasRules(schema2, rules8) { + if (typeof schema2 == "boolean") + return !schema2; + for (const key in schema2) + if (rules8[key]) + return true; + return false; } - - 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. - } - // Don't proxy if the hostname is equal with the no_proxy host. - if (hostname === entry.hostname) { - return false - } - // Don't proxy if the hostname is the subdomain of the no_proxy host. - // Reference - https://github.com/denoland/deno/blob/6fbce91e40cc07fc6da74068e5cc56fdd40f7b4c/ext/fetch/proxy.rs#L485 - if (hostname.slice(-(entry.hostname.length + 1)) === `.${entry.hostname}`) { - return false - } + exports.schemaHasRules = schemaHasRules; + function schemaHasRulesButRef(schema2, RULES) { + if (typeof schema2 == "boolean") + return !schema2; + for (const key in schema2) + if (key !== "$ref" && RULES.all[key]) + return true; + 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 + exports.schemaHasRulesButRef = schemaHasRulesButRef; + function schemaRefOrVal({ topSchemaRef, schemaPath }, schema2, keyword, $data) { + if (!$data) { + if (typeof schema2 == "number" || typeof schema2 == "boolean") + return schema2; + if (typeof schema2 == "string") + return (0, codegen_1._)`${schema2}`; + } + return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`; + } + exports.schemaRefOrVal = schemaRefOrVal; + function unescapeFragment(str2) { + return unescapeJsonPointer(decodeURIComponent(str2)); + } + exports.unescapeFragment = unescapeFragment; + function escapeFragment(str2) { + return encodeURIComponent(escapeJsonPointer(str2)); + } + exports.escapeFragment = escapeFragment; + function escapeJsonPointer(str2) { + if (typeof str2 == "number") + return `${str2}`; + return str2.replace(/~/g, "~0").replace(/\//g, "~1"); + } + exports.escapeJsonPointer = escapeJsonPointer; + function unescapeJsonPointer(str2) { + return str2.replace(/~1/g, "/").replace(/~0/g, "~"); + } + exports.unescapeJsonPointer = unescapeJsonPointer; + function eachItem(xs2, f) { + if (Array.isArray(xs2)) { + for (const x3 of xs2) + f(x3); + } else { + f(xs2); } - const parsed = entry.match(/^(.+):(\d+)$/) - noProxyEntries.push({ - // strip leading dot or asterisk with dot - hostname: (parsed ? parsed[1] : entry).replace(/^\*?\./, '').toLowerCase(), - port: parsed ? Number.parseInt(parsed[2], 10) : 0 + } + exports.eachItem = eachItem; + function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName }) { + return (gen, from, to2, toName) => { + const res = to2 === void 0 ? from : to2 instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to2) : mergeToName(gen, from, to2), to2) : from instanceof codegen_1.Name ? (mergeToName(gen, to2, from), from) : mergeValues(from, to2); + return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res; + }; + } + exports.mergeEvaluated = { + props: makeMergeEvaluated({ + mergeNames: (gen, from, to2) => gen.if((0, codegen_1._)`${to2} !== true && ${from} !== undefined`, () => { + gen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to2, true), () => gen.assign(to2, (0, codegen_1._)`${to2} || {}`).code((0, codegen_1._)`Object.assign(${to2}, ${from})`)); + }), + mergeToName: (gen, from, to2) => gen.if((0, codegen_1._)`${to2} !== true`, () => { + if (from === true) { + gen.assign(to2, true); + } else { + gen.assign(to2, (0, codegen_1._)`${to2} || {}`); + setEvaluated(gen, to2, from); + } + }), + mergeValues: (from, to2) => from === true ? true : { ...from, ...to2 }, + resultToName: evaluatedPropsToName + }), + items: makeMergeEvaluated({ + mergeNames: (gen, from, to2) => gen.if((0, codegen_1._)`${to2} !== true && ${from} !== undefined`, () => gen.assign(to2, (0, codegen_1._)`${from} === true ? true : ${to2} > ${from} ? ${to2} : ${from}`)), + mergeToName: (gen, from, to2) => gen.if((0, codegen_1._)`${to2} !== true`, () => gen.assign(to2, from === true ? true : (0, codegen_1._)`${to2} > ${from} ? ${to2} : ${from}`)), + mergeValues: (from, to2) => from === true ? true : Math.max(from, to2), + resultToName: (gen, items) => gen.var("items", items) }) + }; + function evaluatedPropsToName(gen, ps2) { + if (ps2 === true) + return gen.var("props", true); + const props = gen.var("props", (0, codegen_1._)`{}`); + if (ps2 !== void 0) + setEvaluated(gen, props, ps2); + return props; + } + exports.evaluatedPropsToName = evaluatedPropsToName; + function setEvaluated(gen, props, ps2) { + Object.keys(ps2).forEach((p2) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p2)}`, true)); + } + exports.setEvaluated = setEvaluated; + var snippets = {}; + function useFunc(gen, f) { + return gen.scopeValue("func", { + ref: f, + code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code)) + }); } - - this.#noProxyValue = noProxyValue - this.#noProxyEntries = noProxyEntries - } - - get #noProxyChanged () { - if (this.#opts.noProxy !== undefined) { - return false + exports.useFunc = useFunc; + var Type; + (function(Type2) { + Type2[Type2["Num"] = 0] = "Num"; + Type2[Type2["Str"] = 1] = "Str"; + })(Type || (exports.Type = Type = {})); + function getErrorPath(dataProp, dataPropType, jsPropertySyntax) { + if (dataProp instanceof codegen_1.Name) { + const isNumber = dataPropType === Type.Num; + return jsPropertySyntax ? isNumber ? (0, codegen_1._)`"[" + ${dataProp} + "]"` : (0, codegen_1._)`"['" + ${dataProp} + "']"` : isNumber ? (0, codegen_1._)`"/" + ${dataProp}` : (0, codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`; + } + return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp); } - return this.#noProxyValue !== this.#noProxyEnv - } - - get #noProxyEnv () { - return process.env.no_proxy ?? process.env.NO_PROXY ?? '' - } -} - -module.exports = EnvHttpProxyAgent - - -/***/ }), - -/***/ 75158: -/***/ ((module) => { - -"use strict"; - - -// 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 | undefined | -// | item | | item | | undefined | -// | item | | item | | undefined | -// | item | | item | | undefined | -// | item | | item | bottom --> | item | -// | item | | item | | item | -// | ... | | ... | | ... | -// | item | | item | | item | -// | item | | item | | item | -// | undefined | <-- top | item | | item | -// | undefined | | item | | item | -// | undefined | | undefined | <-- top top --> | undefined | -// +-----------+ +-----------+ +-----------+ -// -// 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] | -// +-----------+ +-----------+ -// | undefined | | item | -// | undefined | | item | -// | item | <-- bottom top --> | undefined | -// | item | | undefined | -// | undefined | <-- top bottom --> | item | -// | undefined | | 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. - -/** - * @type {FixedCircularBuffer} - * @template T - */ -class FixedCircularBuffer { - /** @type {number} */ - bottom = 0 - /** @type {number} */ - top = 0 - /** @type {Array} */ - list = new Array(kSize).fill(undefined) - /** @type {T|null} */ - next = null - - /** @returns {boolean} */ - isEmpty () { - return this.top === this.bottom - } - - /** @returns {boolean} */ - isFull () { - return ((this.top + 1) & kMask) === this.bottom - } - - /** - * @param {T} data - * @returns {void} - */ - push (data) { - this.list[this.top] = data - this.top = (this.top + 1) & kMask - } - - /** @returns {T|null} */ - 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 - } -} - -/** - * @template T - */ -module.exports = class FixedQueue { - constructor () { - /** @type {FixedCircularBuffer} */ - this.head = this.tail = new FixedCircularBuffer() + exports.getErrorPath = getErrorPath; + function checkStrictMode(it3, msg, mode = it3.opts.strictSchema) { + if (!mode) + return; + msg = `strict mode: ${msg}`; + if (mode === true) + throw new Error(msg); + it3.self.logger.warn(msg); + } + exports.checkStrictMode = checkStrictMode; } +}); - /** @returns {boolean} */ - isEmpty () { - return this.head.isEmpty() +// node_modules/@redocly/ajv/dist/compile/names.js +var require_names = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/names.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var names = { + // validation function arguments + data: new codegen_1.Name("data"), + // data passed to validation function + // args passed from referencing schema + valCxt: new codegen_1.Name("valCxt"), + // validation/data context - should not be used directly, it is destructured to the names below + instancePath: new codegen_1.Name("instancePath"), + parentData: new codegen_1.Name("parentData"), + parentDataProperty: new codegen_1.Name("parentDataProperty"), + rootData: new codegen_1.Name("rootData"), + // root data - same as the data passed to the first/top validation function + dynamicAnchors: new codegen_1.Name("dynamicAnchors"), + // used to support recursiveRef and dynamicRef + isAllOfVariant: new codegen_1.Name("isAllOfVariant"), + // used to check in runtime if the current function (ref) is called from allOf + // function scoped variables + vErrors: new codegen_1.Name("vErrors"), + // null or array of validation errors + errors: new codegen_1.Name("errors"), + // counter of validation errors + this: new codegen_1.Name("this"), + // "globals" + self: new codegen_1.Name("self"), + scope: new codegen_1.Name("scope"), + // JTD serialize/parse name for JSON string and position + json: new codegen_1.Name("json"), + jsonPos: new codegen_1.Name("jsonPos"), + jsonLen: new codegen_1.Name("jsonLen"), + jsonPart: new codegen_1.Name("jsonPart") + }; + exports.default = names; } +}); - /** @param {T} data */ - 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() +// node_modules/@redocly/ajv/dist/compile/errors.js +var require_errors2 = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/errors.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var names_1 = require_names(); + exports.keywordError = { + message: ({ keyword }) => (0, codegen_1.str)`must pass "${keyword}" keyword validation` + }; + exports.keyword$DataError = { + message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword}" keyword is invalid ($data)` + }; + function reportError(cxt, error2 = exports.keywordError, errorPaths, overrideAllErrors) { + const { it: it3 } = cxt; + const { gen, compositeRule, allErrors } = it3; + const errObj = errorObjectCode(cxt, error2, errorPaths); + if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) { + addError(gen, errObj); + } else { + returnErrors(it3, (0, codegen_1._)`[${errObj}]`); + } } - this.head.push(data) - } - - /** @returns {T|null} */ - 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 - tail.next = null + exports.reportError = reportError; + function reportExtraError(cxt, error2 = exports.keywordError, errorPaths) { + const { it: it3 } = cxt; + const { gen, compositeRule, allErrors } = it3; + const errObj = errorObjectCode(cxt, error2, errorPaths); + addError(gen, errObj); + if (!(compositeRule || allErrors)) { + returnErrors(it3, names_1.default.vErrors); + } } - return next - } -} - - -/***/ }), - -/***/ 17667: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { InvalidArgumentError } = __nccwpck_require__(48045) -const Client = __nccwpck_require__(8176) - -class H2CClient extends Client { - constructor (origin, clientOpts) { - if (typeof origin === 'string') { - origin = new URL(origin) + exports.reportExtraError = reportExtraError; + function resetErrorsCount(gen, errsCount) { + gen.assign(names_1.default.errors, errsCount); + gen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null))); } - - if (origin.protocol !== 'http:') { - throw new InvalidArgumentError( - 'h2c-client: Only h2c protocol is supported' - ) + exports.resetErrorsCount = resetErrorsCount; + function extendErrors({ gen, keyword, schemaValue, data, errsCount, it: it3 }) { + if (errsCount === void 0) + throw new Error("ajv implementation error"); + const err = gen.name("err"); + gen.forRange("i", errsCount, names_1.default.errors, (i2) => { + gen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i2}]`); + gen.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it3.errorPath))); + gen.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it3.errSchemaPath}/${keyword}`); + if (it3.opts.verbose) { + gen.assign((0, codegen_1._)`${err}.schema`, schemaValue); + gen.assign((0, codegen_1._)`${err}.data`, data); + } + }); } - - const { connect, maxConcurrentStreams, pipelining, ...opts } = - clientOpts ?? {} - let defaultMaxConcurrentStreams = 100 - let defaultPipelining = 100 - - if ( - maxConcurrentStreams != null && - Number.isInteger(maxConcurrentStreams) && - maxConcurrentStreams > 0 - ) { - defaultMaxConcurrentStreams = maxConcurrentStreams + exports.extendErrors = extendErrors; + function addError(gen, errObj) { + const err = gen.const("err", errObj); + gen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`); + gen.code((0, codegen_1._)`${names_1.default.errors}++`); } - - if (pipelining != null && Number.isInteger(pipelining) && pipelining > 0) { - defaultPipelining = pipelining + function returnErrors(it3, errs) { + const { gen, validateName, schemaEnv } = it3; + if (schemaEnv.$async) { + gen.throw((0, codegen_1._)`new ${it3.ValidationError}(${errs})`); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, errs); + gen.return(false); + } } - - if (defaultPipelining > defaultMaxConcurrentStreams) { - throw new InvalidArgumentError( - 'h2c-client: pipelining cannot be greater than maxConcurrentStreams' - ) + var E2 = { + keyword: new codegen_1.Name("keyword"), + schemaPath: new codegen_1.Name("schemaPath"), + // also used in JTD errors + params: new codegen_1.Name("params"), + propertyName: new codegen_1.Name("propertyName"), + message: new codegen_1.Name("message"), + schema: new codegen_1.Name("schema"), + parentSchema: new codegen_1.Name("parentSchema") + }; + function errorObjectCode(cxt, error2, errorPaths) { + const { createErrors } = cxt.it; + if (createErrors === false) + return (0, codegen_1._)`{}`; + return errorObject(cxt, error2, errorPaths); + } + function errorObject(cxt, error2, errorPaths = {}) { + const { gen, it: it3 } = cxt; + const keyValues = [ + errorInstancePath(it3, errorPaths), + errorSchemaPath(cxt, errorPaths) + ]; + extraErrorProps(cxt, error2, keyValues); + return gen.object(...keyValues); + } + function errorInstancePath({ errorPath }, { instancePath }) { + const instPath = instancePath ? (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` : errorPath; + return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)]; + } + function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) { + let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword}`; + if (schemaPath) { + schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`; + } + return [E2.schemaPath, schPath]; + } + function extraErrorProps(cxt, { params, message }, keyValues) { + const { keyword, data, schemaValue, it: it3 } = cxt; + const { opts, propertyName, topSchemaRef, schemaPath } = it3; + keyValues.push([E2.keyword, keyword], [E2.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._)`{}`]); + if (opts.messages) { + keyValues.push([E2.message, typeof message == "function" ? message(cxt) : message]); + } + if (opts.verbose) { + keyValues.push([E2.schema, schemaValue], [E2.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]); + } + if (propertyName) + keyValues.push([E2.propertyName, propertyName]); } - - super(origin, { - ...opts, - maxConcurrentStreams: defaultMaxConcurrentStreams, - pipelining: defaultPipelining, - allowH2: true, - useH2c: true - }) } -} - -module.exports = H2CClient - - -/***/ }), - -/***/ 90494: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { PoolStats } = __nccwpck_require__(97181) -const DispatcherBase = __nccwpck_require__(61544) -const FixedQueue = __nccwpck_require__(75158) -const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = __nccwpck_require__(72785) - -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') - -class PoolBase extends DispatcherBase { - [kQueue] = new FixedQueue(); - - [kQueued] = 0; - - [kClients] = []; - - [kNeedDrain] = false; - - [kOnDrain] (client, origin, targets) { - const queue = this[kQueue] - - let needDrain = false +}); - while (!needDrain) { - const item = queue.shift() - if (!item) { - break +// node_modules/@redocly/ajv/dist/compile/validate/boolSchema.js +var require_boolSchema = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/validate/boolSchema.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0; + var errors_1 = require_errors2(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var boolError = { + message: "boolean schema is false" + }; + function topBoolOrEmptySchema(it3) { + const { gen, schema: schema2, validateName } = it3; + if (schema2 === false) { + falseSchemaError(it3, false); + } else if (typeof schema2 == "object" && schema2.$async === true) { + gen.return(names_1.default.data); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, null); + gen.return(true); } - this[kQueued]-- - needDrain = !client.dispatch(item.opts, item.handler) - } - - client[kNeedDrain] = needDrain - - if (!needDrain && this[kNeedDrain]) { - this[kNeedDrain] = false - this.emit('drain', origin, [this, ...targets]) } - - if (this[kClosedResolve] && queue.isEmpty()) { - const closeAll = [] - for (let i = 0; i < this[kClients].length; i++) { - const client = this[kClients][i] - if (!client.destroyed) { - closeAll.push(client.close()) - } + exports.topBoolOrEmptySchema = topBoolOrEmptySchema; + function boolOrEmptySchema(it3, valid) { + const { gen, schema: schema2 } = it3; + if (schema2 === false) { + gen.var(valid, false); + falseSchemaError(it3); + } else { + gen.var(valid, true); } - return Promise.all(closeAll) - .then(this[kClosedResolve]) } - } - - [kOnConnect] = (origin, targets) => { - this.emit('connect', origin, [this, ...targets]) - }; - - [kOnDisconnect] = (origin, targets, err) => { - this.emit('disconnect', origin, [this, ...targets], err) - }; - - [kOnConnectionError] = (origin, targets, err) => { - this.emit('connectionError', origin, [this, ...targets], err) - } - - get [kBusy] () { - return this[kNeedDrain] - } - - get [kConnected] () { - let ret = 0 - for (const { [kConnected]: connected } of this[kClients]) { - ret += connected + exports.boolOrEmptySchema = boolOrEmptySchema; + function falseSchemaError(it3, overrideAllErrors) { + const { gen, data } = it3; + const cxt = { + gen, + keyword: "false schema", + data, + schema: false, + schemaCode: false, + schemaValue: false, + params: {}, + it: it3 + }; + (0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors); } - return ret } +}); - get [kFree] () { - let ret = 0 - for (const { [kConnected]: connected, [kNeedDrain]: needDrain } of this[kClients]) { - ret += connected && !needDrain +// node_modules/@redocly/ajv/dist/compile/rules.js +var require_rules = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/rules.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getRules = exports.isJSONType = void 0; + var _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"]; + var jsonTypes = new Set(_jsonTypes); + function isJSONType(x3) { + return typeof x3 == "string" && jsonTypes.has(x3); + } + exports.isJSONType = isJSONType; + function getRules() { + const groups = { + number: { type: "number", rules: [] }, + string: { type: "string", rules: [] }, + array: { type: "array", rules: [] }, + object: { type: "object", rules: [] } + }; + return { + types: { ...groups, integer: true, boolean: true, null: true }, + rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object], + post: { rules: [] }, + all: {}, + keywords: {} + }; } - return ret + exports.getRules = getRules; } +}); - get [kPending] () { - let ret = this[kQueued] - for (const { [kPending]: pending } of this[kClients]) { - ret += pending +// node_modules/@redocly/ajv/dist/compile/validate/applicability.js +var require_applicability = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/validate/applicability.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0; + function schemaHasRulesForType({ schema: schema2, self }, type2) { + const group = self.RULES.types[type2]; + return group && group !== true && shouldUseGroup(schema2, group); } - return ret - } - - get [kRunning] () { - let ret = 0 - for (const { [kRunning]: running } of this[kClients]) { - ret += running + exports.schemaHasRulesForType = schemaHasRulesForType; + function shouldUseGroup(schema2, group) { + return group.rules.some((rule) => shouldUseRule(schema2, rule)); } - return ret - } - - get [kSize] () { - let ret = this[kQueued] - for (const { [kSize]: size } of this[kClients]) { - ret += size + exports.shouldUseGroup = shouldUseGroup; + function shouldUseRule(schema2, rule) { + var _a; + return schema2[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema2[kwd] !== void 0)); } - return ret + exports.shouldUseRule = shouldUseRule; } +}); - get stats () { - return new PoolStats(this) +// node_modules/@redocly/ajv/dist/compile/validate/dataType.js +var require_dataType = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/validate/dataType.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0; + var rules_1 = require_rules(); + var applicability_1 = require_applicability(); + var errors_1 = require_errors2(); + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var DataType; + (function(DataType2) { + DataType2[DataType2["Correct"] = 0] = "Correct"; + DataType2[DataType2["Wrong"] = 1] = "Wrong"; + })(DataType || (exports.DataType = DataType = {})); + function getSchemaTypes(schema2) { + const types2 = getJSONTypes(schema2.type); + const hasNull = types2.includes("null"); + if (hasNull) { + if (schema2.nullable === false) + throw new Error("type: null contradicts nullable: false"); + } else { + if (!types2.length && schema2.nullable !== void 0) { + throw new Error('"nullable" cannot be used without "type"'); + } + if (schema2.nullable === true) + types2.push("null"); + } + return types2; + } + exports.getSchemaTypes = getSchemaTypes; + function getJSONTypes(ts2) { + const types2 = Array.isArray(ts2) ? ts2 : ts2 ? [ts2] : []; + if (types2.every(rules_1.isJSONType)) + return types2; + throw new Error("type must be JSONType or JSONType[]: " + types2.join(",")); + } + exports.getJSONTypes = getJSONTypes; + function coerceAndCheckDataType(it3, types2) { + const { gen, data, opts } = it3; + const coerceTo = coerceToTypes(types2, opts.coerceTypes); + const checkTypes = types2.length > 0 && !(coerceTo.length === 0 && types2.length === 1 && (0, applicability_1.schemaHasRulesForType)(it3, types2[0])); + if (checkTypes) { + const wrongType = checkDataTypes(types2, data, opts.strictNumbers, DataType.Wrong); + gen.if(wrongType, () => { + if (coerceTo.length) + coerceData(it3, types2, coerceTo); + else + reportTypeError(it3); + }); + } + return checkTypes; + } + exports.coerceAndCheckDataType = coerceAndCheckDataType; + var COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]); + function coerceToTypes(types2, coerceTypes) { + return coerceTypes ? types2.filter((t2) => COERCIBLE.has(t2) || coerceTypes === "array" && t2 === "array") : []; + } + function coerceData(it3, types2, coerceTo) { + const { gen, data, opts } = it3; + const dataType = gen.let("dataType", (0, codegen_1._)`typeof ${data}`); + const coerced = gen.let("coerced", (0, codegen_1._)`undefined`); + if (opts.coerceTypes === "array") { + gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types2, data, opts.strictNumbers), () => gen.assign(coerced, data))); + } + gen.if((0, codegen_1._)`${coerced} !== undefined`); + for (const t2 of coerceTo) { + if (COERCIBLE.has(t2) || t2 === "array" && opts.coerceTypes === "array") { + coerceSpecificType(t2); + } + } + gen.else(); + reportTypeError(it3); + gen.endIf(); + gen.if((0, codegen_1._)`${coerced} !== undefined`, () => { + gen.assign(data, coerced); + assignParentData(it3, coerced); + }); + function coerceSpecificType(t2) { + switch (t2) { + case "string": + gen.elseIf((0, codegen_1._)`${dataType} == "number" || ${dataType} == "boolean"`).assign(coerced, (0, codegen_1._)`"" + ${data}`).elseIf((0, codegen_1._)`${data} === null`).assign(coerced, (0, codegen_1._)`""`); + return; + case "number": + gen.elseIf((0, codegen_1._)`${dataType} == "boolean" || ${data} === null + || (${dataType} == "string" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_1._)`+${data}`); + return; + case "integer": + gen.elseIf((0, codegen_1._)`${dataType} === "boolean" || ${data} === null + || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_1._)`+${data}`); + return; + case "boolean": + gen.elseIf((0, codegen_1._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_1._)`${data} === "true" || ${data} === 1`).assign(coerced, true); + return; + case "null": + gen.elseIf((0, codegen_1._)`${data} === "" || ${data} === 0 || ${data} === false`); + gen.assign(coerced, null); + return; + case "array": + gen.elseIf((0, codegen_1._)`${dataType} === "string" || ${dataType} === "number" + || ${dataType} === "boolean" || ${data} === null`).assign(coerced, (0, codegen_1._)`[${data}]`); + } + } + } + function assignParentData({ gen, parentData, parentDataProperty }, expr) { + gen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr)); + } + function checkDataType(dataType, data, strictNums, correct = DataType.Correct) { + const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ; + let cond; + switch (dataType) { + case "null": + return (0, codegen_1._)`${data} ${EQ} null`; + case "array": + cond = (0, codegen_1._)`Array.isArray(${data})`; + break; + case "object": + cond = (0, codegen_1._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`; + break; + case "integer": + cond = numCond((0, codegen_1._)`!(${data} % 1) && !isNaN(${data})`); + break; + case "number": + cond = numCond(); + break; + default: + return (0, codegen_1._)`typeof ${data} ${EQ} ${dataType}`; + } + return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond); + function numCond(_cond = codegen_1.nil) { + return (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil); + } + } + exports.checkDataType = checkDataType; + function checkDataTypes(dataTypes, data, strictNums, correct) { + if (dataTypes.length === 1) { + return checkDataType(dataTypes[0], data, strictNums, correct); + } + let cond; + const types2 = (0, util_1.toHash)(dataTypes); + if (types2.array && types2.object) { + const notObj = (0, codegen_1._)`typeof ${data} != "object"`; + cond = types2.null ? notObj : (0, codegen_1._)`!${data} || ${notObj}`; + delete types2.null; + delete types2.array; + delete types2.object; + } else { + cond = codegen_1.nil; + } + if (types2.number) + delete types2.integer; + for (const t2 in types2) + cond = (0, codegen_1.and)(cond, checkDataType(t2, data, strictNums, correct)); + return cond; + } + exports.checkDataTypes = checkDataTypes; + var typeError = { + message: ({ schema: schema2 }) => `must be ${schema2}`, + params: ({ schema: schema2, schemaValue }) => typeof schema2 == "string" ? (0, codegen_1._)`{type: ${schema2}}` : (0, codegen_1._)`{type: ${schemaValue}}` + }; + function reportTypeError(it3) { + const cxt = getTypeErrorContext(it3); + (0, errors_1.reportError)(cxt, typeError); + } + exports.reportTypeError = reportTypeError; + function getTypeErrorContext(it3) { + const { gen, data, schema: schema2 } = it3; + const schemaCode = (0, util_1.schemaRefOrVal)(it3, schema2, "type"); + return { + gen, + keyword: "type", + data, + schema: schema2.type, + schemaCode, + schemaValue: schemaCode, + parentSchema: schema2, + params: {}, + it: it3 + }; + } } +}); - [kClose] () { - if (this[kQueue].isEmpty()) { - const closeAll = [] - for (let i = 0; i < this[kClients].length; i++) { - const client = this[kClients][i] - if (!client.destroyed) { - closeAll.push(client.close()) +// node_modules/@redocly/ajv/dist/compile/validate/defaults.js +var require_defaults = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/validate/defaults.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.assignDefaults = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + function assignDefaults(it3, ty) { + const { properties, items } = it3.schema; + if (ty === "object" && properties) { + for (const key in properties) { + assignDefault(it3, key, properties[key].default); } + } else if (ty === "array" && Array.isArray(items)) { + items.forEach((sch, i2) => assignDefault(it3, i2, sch.default)); } - return Promise.all(closeAll) - } else { - return new Promise((resolve) => { - this[kClosedResolve] = resolve - }) } - } - - [kDestroy] (err) { - while (true) { - const item = this[kQueue].shift() - if (!item) { - break + exports.assignDefaults = assignDefaults; + function assignDefault(it3, prop, defaultValue) { + const { gen, compositeRule, data, opts } = it3; + if (defaultValue === void 0) + return; + const childData = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(prop)}`; + if (compositeRule) { + (0, util_1.checkStrictMode)(it3, `default is ignored for: ${childData}`); + return; } - item.handler.onError(err) - } - - const destroyAll = new Array(this[kClients].length) - for (let i = 0; i < this[kClients].length; i++) { - destroyAll[i] = this[kClients][i].destroy(err) + let condition = (0, codegen_1._)`${childData} === undefined`; + if (opts.useDefaults === "empty") { + condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`; + } + gen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`); } - return Promise.all(destroyAll) } +}); - [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] +// node_modules/@redocly/ajv/dist/vocabularies/oasContext.js +var require_oasContext = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/oasContext.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getSkipCondition = void 0; + var codegen_1 = require_codegen(); + var names_1 = require_names(); + function getSkipCondition(schema2, prop) { + var _a; + const propSchema = (_a = schema2.properties) === null || _a === void 0 ? void 0 : _a[prop]; + if (!propSchema) + return void 0; + const hasReadOnly = propSchema.readOnly === true; + const hasWriteOnly = propSchema.writeOnly === true; + if (!hasReadOnly && !hasWriteOnly) + return void 0; + const conditions = []; + const apiContext = (0, codegen_1._)`typeof ${names_1.default.this} == "object" && ${names_1.default.this} && ${names_1.default.this}.apiContext`; + if (hasReadOnly) { + conditions.push((0, codegen_1._)`${apiContext} === "request"`); + } + if (hasWriteOnly) { + conditions.push((0, codegen_1._)`${apiContext} === "response"`); + } + return (0, codegen_1.or)(...conditions); + } + exports.getSkipCondition = getSkipCondition; } +}); - [kAddClient] (client) { - client - .on('drain', this[kOnDrain].bind(this, client)) - .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, client[kUrl], [client, this]) - } - }) +// node_modules/@redocly/ajv/dist/vocabularies/code.js +var require_code2 = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/code.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var names_1 = require_names(); + var util_2 = require_util7(); + var oasContext_1 = require_oasContext(); + function checkReportMissingProp(cxt, prop) { + const { gen, data, it: it3 } = cxt; + gen.if(noPropertyInData(gen, data, prop, it3.opts.ownProperties), () => { + cxt.setParams({ missingProperty: (0, codegen_1._)`${prop}` }, true); + cxt.error(); + }); } - - 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 -} - - -/***/ }), - -/***/ 20177: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kGetDispatcher, - kRemoveClient -} = __nccwpck_require__(90494) -const Client = __nccwpck_require__(8176) -const { - InvalidArgumentError -} = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { kUrl } = __nccwpck_require__(72785) -const buildConnector = __nccwpck_require__(82067) - -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, - clientTtl, - ...options - } = {}) { - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { - throw new InvalidArgumentError('invalid connections') + exports.checkReportMissingProp = checkReportMissingProp; + function checkMissingProp({ gen, data, it: { opts }, parentSchema }, properties, missing) { + return (0, codegen_1.or)(...properties.map((prop) => { + var _a; + return (0, codegen_1.and)((0, codegen_1.not)((_a = (0, oasContext_1.getSkipCondition)(parentSchema, prop)) !== null && _a !== void 0 ? _a : (0, codegen_1._)`false`), noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`); + })); } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') + exports.checkMissingProp = checkMissingProp; + function reportMissingProp(cxt, missing) { + cxt.setParams({ missingProperty: missing }, true); + cxt.error(); } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') + exports.reportMissingProp = reportMissingProp; + function hasPropFunc(gen) { + return gen.scopeValue("func", { + // eslint-disable-next-line @typescript-eslint/unbound-method + ref: Object.prototype.hasOwnProperty, + code: (0, codegen_1._)`Object.prototype.hasOwnProperty` + }); } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(typeof autoSelectFamily === 'boolean' ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) + exports.hasPropFunc = hasPropFunc; + function isOwnProperty(gen, data, property) { + return (0, codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property})`; } - - super() - - this[kConnections] = connections || null - this[kUrl] = util.parseOrigin(origin) - this[kOptions] = { ...util.deepClone(options), connect, allowH2, clientTtl, socketPath } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kFactory] = factory - - this.on('connect', (origin, targets) => { - if (clientTtl != null && clientTtl > 0) { - for (const target of targets) { - Object.assign(target, { ttl: Date.now() }) - } + exports.isOwnProperty = isOwnProperty; + function propertyInData(gen, data, property, ownProperties) { + const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} !== undefined`; + return ownProperties ? (0, codegen_1._)`${cond} && ${isOwnProperty(gen, data, property)}` : cond; + } + exports.propertyInData = propertyInData; + function noPropertyInData(gen, data, property, ownProperties) { + const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} === undefined`; + return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond; + } + exports.noPropertyInData = noPropertyInData; + function allSchemaProperties(schemaMap) { + return schemaMap ? Object.keys(schemaMap).filter((p2) => p2 !== "__proto__") : []; + } + exports.allSchemaProperties = allSchemaProperties; + function schemaProperties(it3, schemaMap) { + return allSchemaProperties(schemaMap).filter((p2) => !(0, util_1.alwaysValidSchema)(it3, schemaMap[p2])); + } + exports.schemaProperties = schemaProperties; + function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it: it3 }, func, context2, passSchema) { + const dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data; + const valCxt = [ + [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)], + [names_1.default.parentData, it3.parentData], + [names_1.default.parentDataProperty, it3.parentDataProperty], + [names_1.default.rootData, names_1.default.rootData], + [names_1.default.isAllOfVariant, it3.isAllOfVariant ? 1 : 0] + ]; + if (it3.opts.dynamicRef) + valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]); + const args = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`; + return context2 !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context2}, ${args})` : (0, codegen_1._)`${func}(${args})`; + } + exports.callValidateCode = callValidateCode; + var newRegExp = (0, codegen_1._)`new RegExp`; + function usePattern({ gen, it: { opts } }, pattern) { + const u2 = opts.unicodeRegExp ? "u" : ""; + const { regExp } = opts.code; + const rx = regExp(pattern, u2); + return gen.scopeValue("pattern", { + key: rx.toString(), + ref: rx, + code: (0, codegen_1._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u2})` + }); + } + exports.usePattern = usePattern; + function validateArray(cxt) { + const { gen, data, keyword, it: it3 } = cxt; + const valid = gen.name("valid"); + if (it3.allErrors) { + const validArr = gen.let("valid", true); + validateItems(() => gen.assign(validArr, false)); + return validArr; } - }) - - 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) - } + gen.var(valid, true); + validateItems(() => gen.break()); + return valid; + function validateItems(notValid) { + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + gen.forRange("i", 0, len, (i2) => { + cxt.subschema({ + keyword, + dataProp: i2, + dataPropType: util_1.Type.Num + }, valid); + gen.if((0, codegen_1.not)(valid), notValid); + }); } - }) + } + exports.validateArray = validateArray; + function validateUnion(cxt) { + const { gen, schema: schema2, keyword, parentSchema, it: it3 } = cxt; + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + if (it3.opts.discriminator && parentSchema.discriminator) + return; + const alwaysValid = schema2.some((sch) => (0, util_1.alwaysValidSchema)(it3, sch)); + if (alwaysValid && !it3.opts.unevaluated) + return; + const valid = gen.let("valid", false); + const schValid = gen.name("_valid"); + gen.block(() => schema2.forEach((_sch, i2) => { + const schCxt = cxt.subschema({ + keyword, + schemaProp: i2, + compositeRule: true + }, schValid); + gen.assign(valid, (0, codegen_1._)`${valid} || ${schValid}`); + const merged = cxt.mergeValidEvaluated(schCxt, schValid); + if (!merged) + gen.if((0, codegen_1.not)(valid)); + })); + cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); + } + exports.validateUnion = validateUnion; } +}); - [kGetDispatcher] () { - const clientTtlOption = this[kOptions].clientTtl - for (const client of this[kClients]) { - // check ttl of client and if it's stale, remove it from the pool - if (clientTtlOption != null && clientTtlOption > 0 && client.ttl && ((Date.now() - client.ttl) > clientTtlOption)) { - this[kRemoveClient](client) - } else if (!client[kNeedDrain]) { - return client +// node_modules/@redocly/ajv/dist/compile/validate/keyword.js +var require_keyword = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/validate/keyword.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0; + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var code_1 = require_code2(); + var errors_1 = require_errors2(); + function macroKeywordCode(cxt, def) { + const { gen, keyword, schema: schema2, parentSchema, it: it3 } = cxt; + const macroSchema = def.macro.call(it3.self, schema2, parentSchema, it3); + const schemaRef = useKeyword(gen, keyword, macroSchema); + if (it3.opts.validateSchema !== false) + it3.self.validateSchema(macroSchema, true); + const valid = gen.name("valid"); + cxt.subschema({ + schema: macroSchema, + schemaPath: codegen_1.nil, + errSchemaPath: `${it3.errSchemaPath}/${keyword}`, + topSchemaRef: schemaRef, + compositeRule: true + }, valid); + cxt.pass(valid, () => cxt.error(true)); + } + exports.macroKeywordCode = macroKeywordCode; + function funcKeywordCode(cxt, def) { + var _a; + const { gen, keyword, schema: schema2, parentSchema, $data, it: it3 } = cxt; + checkAsyncKeyword(it3, def); + const validate = !$data && def.compile ? def.compile.call(it3.self, schema2, parentSchema, it3) : def.validate; + const validateRef = useKeyword(gen, keyword, validate); + const valid = gen.let("valid"); + cxt.block$data(valid, validateKeyword); + cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid); + function validateKeyword() { + if (def.errors === false) { + assignValid(); + if (def.modifying) + modifyData(cxt); + reportErrs(() => cxt.error()); + } else { + const ruleErrs = def.async ? validateAsync() : validateSync(); + if (def.modifying) + modifyData(cxt); + reportErrs(() => addErrs(cxt, ruleErrs)); + } + } + function validateAsync() { + const ruleErrs = gen.let("ruleErrs", null); + gen.try(() => assignValid((0, codegen_1._)`await `), (e2) => gen.assign(valid, false).if((0, codegen_1._)`${e2} instanceof ${it3.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e2}.errors`), () => gen.throw(e2))); + return ruleErrs; + } + function validateSync() { + const validateErrs = (0, codegen_1._)`${validateRef}.errors`; + gen.assign(validateErrs, null); + assignValid(codegen_1.nil); + return validateErrs; + } + function assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) { + const passCxt = it3.opts.passContext ? names_1.default.this : names_1.default.self; + const passSchema = !("compile" in def && !$data || def.schema === false); + gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying); + } + function reportErrs(errors) { + var _a2; + gen.if((0, codegen_1.not)((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid), errors); } } - - if (!this[kConnections] || this[kClients].length < this[kConnections]) { - const dispatcher = this[kFactory](this[kUrl], this[kOptions]) - this[kAddClient](dispatcher) - return dispatcher + exports.funcKeywordCode = funcKeywordCode; + function modifyData(cxt) { + const { gen, data, it: it3 } = cxt; + gen.if(it3.parentData, () => gen.assign(data, (0, codegen_1._)`${it3.parentData}[${it3.parentDataProperty}]`)); } - } -} - -module.exports = Pool - - -/***/ }), - -/***/ 15657: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { kProxy, kClose, kDestroy, kDispatch } = __nccwpck_require__(72785) -const Agent = __nccwpck_require__(71208) -const Pool = __nccwpck_require__(20177) -const DispatcherBase = __nccwpck_require__(61544) -const { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = __nccwpck_require__(48045) -const buildConnector = __nccwpck_require__(82067) -const Client = __nccwpck_require__(8176) -const { channels } = __nccwpck_require__(58438) -const Socks5ProxyAgent = __nccwpck_require__(58924) - -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 }) { - if (!proxyUrl) { - throw new InvalidArgumentError('Proxy URL is mandatory') + function addErrs(cxt, errs) { + const { gen } = cxt; + gen.if((0, codegen_1._)`Array.isArray(${errs})`, () => { + gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`); + (0, errors_1.extendErrors)(cxt); + }, () => cxt.error()); } - - super() - - this[kProxyHeaders] = headers - if (factory) { - this.#client = factory(proxyUrl, { connect }) - } else { - this.#client = new Client(proxyUrl, { connect }) + function checkAsyncKeyword({ schemaEnv }, def) { + if (def.async && !schemaEnv.$async) + throw new Error("async keyword in sync schema"); } - } - - [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)')) + function useKeyword(gen, keyword, result) { + if (result === void 0) + throw new Error(`keyword "${keyword}" failed to compile`); + return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) }); + } + function validSchemaType(schema2, schemaType, allowUndefined = false) { + return !schemaType.length || schemaType.some((st3) => st3 === "array" ? Array.isArray(schema2) : st3 === "object" ? schema2 && typeof schema2 == "object" && !Array.isArray(schema2) : typeof schema2 == st3 || allowUndefined && typeof schema2 == "undefined"); + } + exports.validSchemaType = validSchemaType; + function validateKeywordUsage({ schema: schema2, opts, self, errSchemaPath }, def, keyword) { + if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) { + throw new Error("ajv implementation error"); + } + const deps = def.dependencies; + if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema2, kwd))) { + throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`); + } + if (def.validateSchema) { + const valid = def.validateSchema(schema2[keyword]); + if (!valid) { + const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` + self.errorsText(def.validateSchema.errors); + if (opts.validateSchema === "log") + self.logger.error(msg); + else + throw new Error(msg); } - 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) + exports.validateKeywordUsage = validateKeywordUsage; } +}); - [kClose] () { - return this.#client.close() - } - - [kDestroy] (err) { - return this.#client.destroy(err) - } -} - -class ProxyAgent extends DispatcherBase { - constructor (opts) { - if (!opts || (typeof opts === 'object' && !(opts instanceof URL) && !opts.uri)) { - throw new InvalidArgumentError('Proxy uri is mandatory') +// node_modules/@redocly/ajv/dist/compile/validate/subschema.js +var require_subschema = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/validate/subschema.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + function getSubschema(it3, { keyword, schemaProp, schema: schema2, schemaPath, errSchemaPath, topSchemaRef }) { + if (keyword !== void 0 && schema2 !== void 0) { + throw new Error('both "keyword" and "schema" passed, only one allowed'); + } + if (keyword !== void 0) { + const sch = it3.schema[keyword]; + return schemaProp === void 0 ? { + schema: sch, + schemaPath: (0, codegen_1._)`${it3.schemaPath}${(0, codegen_1.getProperty)(keyword)}`, + errSchemaPath: `${it3.errSchemaPath}/${keyword}` + } : { + schema: sch[schemaProp], + schemaPath: (0, codegen_1._)`${it3.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`, + errSchemaPath: `${it3.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}` + }; + } + if (schema2 !== void 0) { + if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) { + throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"'); + } + return { + schema: schema2, + schemaPath, + topSchemaRef, + errSchemaPath + }; + } + throw new Error('either "keyword" or "schema" must be passed'); } - - const { clientFactory = defaultFactory } = opts - if (typeof clientFactory !== 'function') { - throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') + exports.getSubschema = getSubschema; + function extendSubschemaData(subschema, it3, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) { + if (data !== void 0 && dataProp !== void 0) { + throw new Error('both "data" and "dataProp" passed, only one allowed'); + } + const { gen } = it3; + if (dataProp !== void 0) { + const { errorPath, dataPathArr, opts } = it3; + const nextData = gen.let("data", (0, codegen_1._)`${it3.data}${(0, codegen_1.getProperty)(dataProp)}`, true); + dataContextProps(nextData); + subschema.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`; + subschema.parentDataProperty = (0, codegen_1._)`${dataProp}`; + subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty]; + } + if (data !== void 0) { + const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true); + dataContextProps(nextData); + if (propertyName !== void 0) + subschema.propertyName = propertyName; + } + if (dataTypes) + subschema.dataTypes = dataTypes; + function dataContextProps(_nextData) { + subschema.data = _nextData; + subschema.dataLevel = it3.dataLevel + 1; + subschema.dataTypes = []; + it3.definedProperties = /* @__PURE__ */ new Set(); + subschema.parentData = it3.data; + subschema.dataNames = [...it3.dataNames, _nextData]; + } } - - const { proxyTunnel = true } = opts - - super() - - const url = this.#getUrl(opts) - const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url - - this[kProxy] = { uri: href, protocol } - 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')}` + exports.extendSubschemaData = extendSubschemaData; + function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) { + if (compositeRule !== void 0) + subschema.compositeRule = compositeRule; + if (createErrors !== void 0) + subschema.createErrors = createErrors; + if (allErrors !== void 0) + subschema.allErrors = allErrors; + subschema.jtdDiscriminator = jtdDiscriminator; + subschema.jtdMetadata = jtdMetadata; } + exports.extendSubschemaMode = extendSubschemaMode; + } +}); - const connect = buildConnector({ ...opts.proxyTls }) - this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }) - - const agentFactory = opts.factory || defaultAgentFactory - const factory = (origin, options) => { - const { protocol } = new URL(origin) - - // Handle SOCKS5 proxy - if (this[kProxy].protocol === 'socks5:' || this[kProxy].protocol === 'socks:') { - return new Socks5ProxyAgent(this[kProxy].uri, { - headers: this[kProxyHeaders], - connect, - factory: agentFactory, - username: opts.username || username, - password: opts.password || password, - proxyTls: opts.proxyTls - }) +// node_modules/fast-deep-equal/index.js +var require_fast_deep_equal = __commonJS({ + "node_modules/fast-deep-equal/index.js"(exports, module3) { + "use strict"; + module3.exports = function equal(a2, b2) { + if (a2 === b2) return true; + if (a2 && b2 && typeof a2 == "object" && typeof b2 == "object") { + if (a2.constructor !== b2.constructor) return false; + var length, i2, keys; + if (Array.isArray(a2)) { + length = a2.length; + if (length != b2.length) return false; + for (i2 = length; i2-- !== 0; ) + if (!equal(a2[i2], b2[i2])) return false; + return true; + } + if (a2.constructor === RegExp) return a2.source === b2.source && a2.flags === b2.flags; + if (a2.valueOf !== Object.prototype.valueOf) return a2.valueOf() === b2.valueOf(); + if (a2.toString !== Object.prototype.toString) return a2.toString() === b2.toString(); + keys = Object.keys(a2); + length = keys.length; + if (length !== Object.keys(b2).length) return false; + for (i2 = length; i2-- !== 0; ) + if (!Object.prototype.hasOwnProperty.call(b2, keys[i2])) return false; + for (i2 = length; i2-- !== 0; ) { + var key = keys[i2]; + if (!equal(a2[key], b2[key])) return false; + } + return true; } + return a2 !== a2 && b2 !== b2; + }; + } +}); - if (!this[kTunnelProxy] && protocol === 'http:' && this[kProxy].protocol === 'http:') { - return new Http1ProxyWrapper(this[kProxy].uri, { - headers: this[kProxyHeaders], - connect, - factory: agentFactory - }) +// node_modules/json-schema-traverse/index.js +var require_json_schema_traverse = __commonJS({ + "node_modules/json-schema-traverse/index.js"(exports, module3) { + "use strict"; + var traverse = module3.exports = function(schema2, opts, cb) { + if (typeof opts == "function") { + cb = opts; + opts = {}; + } + cb = opts.cb || cb; + var pre = typeof cb == "function" ? cb : cb.pre || function() { + }; + var post = cb.post || function() { + }; + _traverse(opts, pre, post, schema2, "", schema2); + }; + traverse.keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true, + if: true, + then: true, + else: true + }; + traverse.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true + }; + traverse.propsKeywords = { + $defs: true, + definitions: true, + properties: true, + patternProperties: true, + dependencies: true + }; + traverse.skipKeywords = { + default: true, + enum: true, + const: true, + required: true, + maximum: true, + minimum: true, + exclusiveMaximum: true, + exclusiveMinimum: true, + multipleOf: true, + maxLength: true, + minLength: true, + pattern: true, + format: true, + maxItems: true, + minItems: true, + uniqueItems: true, + maxProperties: true, + minProperties: true + }; + function _traverse(opts, pre, post, schema2, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema2 && typeof schema2 == "object" && !Array.isArray(schema2)) { + pre(schema2, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + for (var key in schema2) { + var sch = schema2[key]; + if (Array.isArray(sch)) { + if (key in traverse.arrayKeywords) { + for (var i2 = 0; i2 < sch.length; i2++) + _traverse(opts, pre, post, sch[i2], jsonPtr + "/" + key + "/" + i2, rootSchema, jsonPtr, key, schema2, i2); + } + } else if (key in traverse.propsKeywords) { + if (sch && typeof sch == "object") { + for (var prop in sch) + _traverse(opts, pre, post, sch[prop], jsonPtr + "/" + key + "/" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema2, prop); + } + } else if (key in traverse.keywords || opts.allKeys && !(key in traverse.skipKeywords)) { + _traverse(opts, pre, post, sch, jsonPtr + "/" + key, rootSchema, jsonPtr, key, schema2); + } + } + post(schema2, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); } - return agentFactory(origin, options) } - - // For SOCKS5 proxies, we don't need a client to the proxy itself - // The SOCKS5 connection is handled within Socks5ProxyAgent - if (protocol === 'socks5:' || protocol === 'socks:') { - this[kClient] = null - } else { - this[kClient] = clientFactory(url, { connect }) + function escapeJsonPtr(str2) { + return str2.replace(/~/g, "~0").replace(/\//g, "~1"); } + } +}); - this[kAgent] = new Agent({ - ...opts, - factory, - connect: async (opts, callback) => { - // SOCKS5 proxies handle their own connections via Socks5ProxyAgent, - // so this connect function should never be called for them. - if (!this[kClient]) { - callback(new InvalidArgumentError('Cannot establish tunnel connection without a proxy client')) - return - } - - let requestedPath = opts.host - if (!opts.port) { - requestedPath += `:${defaultProtocolPort(opts.protocol)}` +// node_modules/@redocly/ajv/dist/compile/resolve.js +var require_resolve = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/resolve.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0; + var util_1 = require_util7(); + var equal = require_fast_deep_equal(); + var traverse = require_json_schema_traverse(); + var SIMPLE_INLINED = /* @__PURE__ */ new Set([ + "type", + "format", + "pattern", + "maxLength", + "minLength", + "maxProperties", + "minProperties", + "maxItems", + "minItems", + "maximum", + "minimum", + "uniqueItems", + "multipleOf", + "required", + "enum", + "const" + ]); + function inlineRef(schema2, limit = true) { + if (typeof schema2 == "boolean") + return true; + if (limit === true) + return !hasRef2(schema2); + if (!limit) + return false; + return countKeys(schema2) <= limit; + } + exports.inlineRef = inlineRef; + var REF_KEYWORDS = /* @__PURE__ */ new Set([ + "$ref", + "$recursiveRef", + "$recursiveAnchor", + "$dynamicRef", + "$dynamicAnchor" + ]); + function hasRef2(schema2) { + for (const key in schema2) { + if (REF_KEYWORDS.has(key)) + return true; + const sch = schema2[key]; + if (Array.isArray(sch) && sch.some(hasRef2)) + return true; + if (typeof sch == "object" && hasRef2(sch)) + return true; + } + return false; + } + function countKeys(schema2) { + let count = 0; + for (const key in schema2) { + if (key === "$ref") + return Infinity; + count++; + if (SIMPLE_INLINED.has(key)) + continue; + if (typeof schema2[key] == "object") { + (0, util_1.eachItem)(schema2[key], (sch) => count += countKeys(sch)); } - try { - const connectParams = { - origin, - port, - path: requestedPath, - signal: opts.signal, - headers: { - ...this[kProxyHeaders], - host: opts.host, - ...(opts.connections == null || opts.connections > 0 ? { 'proxy-connection': 'keep-alive' } : {}) - }, - servername: this[kProxyTls]?.servername || proxyHostname - } - const { socket, statusCode } = await this[kClient].connect(connectParams) - if (statusCode !== 200) { - socket.on('error', noop).destroy() - callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)) - return + if (count === Infinity) + return Infinity; + } + return count; + } + function getFullPath(resolver, id = "", normalize) { + if (normalize !== false) + id = normalizeId(id); + const p2 = resolver.parse(id); + return _getFullPath(resolver, p2); + } + exports.getFullPath = getFullPath; + function _getFullPath(resolver, p2) { + const serialized = resolver.serialize(p2); + return serialized.split("#")[0] + "#"; + } + exports._getFullPath = _getFullPath; + var TRAILING_SLASH_HASH = /#\/?$/; + function normalizeId(id) { + return id ? id.replace(TRAILING_SLASH_HASH, "") : ""; + } + exports.normalizeId = normalizeId; + function resolveUrl(resolver, baseId, id) { + id = normalizeId(id); + return resolver.resolve(baseId, id); + } + exports.resolveUrl = resolveUrl; + var ANCHOR = /^[a-z_][-a-z0-9._]*$/i; + function getSchemaRefs(schema2, baseId) { + if (typeof schema2 == "boolean") + return {}; + const { schemaId, uriResolver } = this.opts; + const schId = normalizeId(schema2[schemaId] || baseId); + const baseIds = { "": schId }; + const pathPrefix = getFullPath(uriResolver, schId, false); + const localRefs = {}; + const schemaRefs = /* @__PURE__ */ new Set(); + traverse(schema2, { allKeys: true }, (sch, jsonPtr, _5, parentJsonPtr) => { + if (parentJsonPtr === void 0) + return; + const fullPath = pathPrefix + jsonPtr; + let innerBaseId = baseIds[parentJsonPtr]; + if (typeof sch[schemaId] == "string") + innerBaseId = addRef.call(this, sch[schemaId]); + addAnchor.call(this, sch.$anchor); + addAnchor.call(this, sch.$dynamicAnchor); + baseIds[jsonPtr] = innerBaseId; + function addRef(ref) { + const _resolve = this.opts.uriResolver.resolve; + ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref); + if (schemaRefs.has(ref)) + throw ambiguos(ref); + schemaRefs.add(ref); + let schOrRef = this.refs[ref]; + if (typeof schOrRef == "string") + schOrRef = this.refs[schOrRef]; + if (typeof schOrRef == "object") { + checkAmbiguosRef(sch, schOrRef.schema, ref); + } else if (ref !== normalizeId(fullPath)) { + if (ref[0] === "#") { + checkAmbiguosRef(sch, localRefs[ref], ref); + localRefs[ref] = sch; + } else { + this.refs[ref] = fullPath; + } } - - if (channels.proxyConnected.hasSubscribers) { - channels.proxyConnected.publish({ - socket, - connectParams - }) + return ref; + } + function addAnchor(anchor) { + if (typeof anchor == "string") { + if (!ANCHOR.test(anchor)) + throw new Error(`invalid anchor "${anchor}"`); + addRef.call(this, `#${anchor}`); } + } + }); + return localRefs; + function checkAmbiguosRef(sch1, sch2, ref) { + if (sch2 !== void 0 && !equal(sch1, sch2)) + throw ambiguos(ref); + } + function ambiguos(ref) { + return new Error(`reference "${ref}" resolves to more than one schema`); + } + } + exports.getSchemaRefs = getSchemaRefs; + } +}); - 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) - } +// node_modules/@redocly/ajv/dist/compile/validate/index.js +var require_validate = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/validate/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0; + var boolSchema_1 = require_boolSchema(); + var dataType_1 = require_dataType(); + var applicability_1 = require_applicability(); + var dataType_2 = require_dataType(); + var defaults_1 = require_defaults(); + var keyword_1 = require_keyword(); + var subschema_1 = require_subschema(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var resolve_1 = require_resolve(); + var util_1 = require_util7(); + var errors_1 = require_errors2(); + function validateFunctionCode(it3) { + if (isSchemaObj(it3)) { + checkKeywords(it3); + if (schemaCxtHasRules(it3)) { + topSchemaObjCode(it3); + return; + } + } + validateFunction(it3, () => (0, boolSchema_1.topBoolOrEmptySchema)(it3)); + } + exports.validateFunctionCode = validateFunctionCode; + function validateFunction({ gen, validateName, schema: schema2, schemaEnv, opts }, body) { + if (opts.code.es5) { + gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => { + gen.code((0, codegen_1._)`"use strict"; ${funcSourceUrl(schema2, opts)}`); + destructureValCxtES5(gen, opts); + gen.code(body); + }); + } else { + gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema2, opts)).code(body)); + } + } + function destructureValCxt(opts) { + return (0, codegen_1._)`{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}, ${names_1.default.isAllOfVariant} = 0}={}`; + } + function destructureValCxtES5(gen, opts) { + gen.if(names_1.default.valCxt, () => { + gen.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`); + gen.var(names_1.default.parentData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`); + gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`); + gen.var(names_1.default.rootData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`); + gen.var(names_1.default.isAllOfVariant, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.isAllOfVariant}`); + if (opts.dynamicRef) + gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`); + }, () => { + gen.var(names_1.default.instancePath, (0, codegen_1._)`""`); + gen.var(names_1.default.parentData, (0, codegen_1._)`undefined`); + gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`undefined`); + gen.var(names_1.default.rootData, names_1.default.data); + gen.var(names_1.default.isAllOfVariant, (0, codegen_1._)`0`); + if (opts.dynamicRef) + gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`); + }); + } + function topSchemaObjCode(it3) { + const { schema: schema2, opts, gen } = it3; + validateFunction(it3, () => { + if (opts.$comment && schema2.$comment) + commentKeyword(it3); + checkNoDefault(it3); + gen.let(names_1.default.vErrors, null); + gen.let(names_1.default.errors, 0); + if (opts.unevaluated) + resetEvaluated(it3); + typeAndKeywords(it3); + returnResults(it3); + }); + return; + } + function resetEvaluated(it3) { + const { gen, validateName } = it3; + it3.evaluated = gen.const("evaluated", (0, codegen_1._)`${validateName}.evaluated`); + gen.if((0, codegen_1._)`${it3.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it3.evaluated}.props`, (0, codegen_1._)`undefined`)); + gen.if((0, codegen_1._)`${it3.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it3.evaluated}.items`, (0, codegen_1._)`undefined`)); + } + function funcSourceUrl(schema2, opts) { + const schId = typeof schema2 == "object" && schema2[opts.schemaId]; + return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil; + } + function subschemaCode(it3, valid) { + if (isSchemaObj(it3)) { + checkKeywords(it3); + if (schemaCxtHasRules(it3)) { + subSchemaObjCode(it3, valid); + return; } } - }) - } - - 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 + (0, boolSchema_1.boolOrEmptySchema)(it3, valid); } - - 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) + function schemaCxtHasRules({ schema: schema2, self }) { + if (typeof schema2 == "boolean") + return !schema2; + for (const key in schema2) + if (self.RULES.all[key]) + return true; + return false; } - } - - [kClose] () { - const promises = [this[kAgent].close()] - if (this[kClient]) { - promises.push(this[kClient].close()) + function isSchemaObj(it3) { + return typeof it3.schema != "boolean"; + } + function subSchemaObjCode(it3, valid) { + const { schema: schema2, gen, opts } = it3; + if (opts.$comment && schema2.$comment) + commentKeyword(it3); + updateContext(it3); + checkAsyncSchema(it3); + const errsCount = gen.const("_errs", names_1.default.errors); + typeAndKeywords(it3, errsCount); + gen.var(valid, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); + } + function checkKeywords(it3) { + (0, util_1.checkUnknownRules)(it3); + checkRefsAndKeywords(it3); + } + function typeAndKeywords(it3, errsCount) { + if (it3.opts.jtd) + return schemaKeywords(it3, [], false, errsCount); + const types2 = (0, dataType_1.getSchemaTypes)(it3.schema); + const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it3, types2); + schemaKeywords(it3, types2, !checkedTypes, errsCount); + } + function checkRefsAndKeywords(it3) { + const { schema: schema2, errSchemaPath, opts, self } = it3; + if (schema2.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema2, self.RULES)) { + self.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`); + } } - return Promise.all(promises) - } - - [kDestroy] () { - const promises = [this[kAgent].destroy()] - if (this[kClient]) { - promises.push(this[kClient].destroy()) + function checkNoDefault(it3) { + const { schema: schema2, opts } = it3; + if (schema2.default !== void 0 && opts.useDefaults && opts.strictSchema) { + (0, util_1.checkStrictMode)(it3, "default is ignored in the schema root"); + } } - return Promise.all(promises) - } -} - -/** - * @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] + function updateContext(it3) { + const schId = it3.schema[it3.opts.schemaId]; + if (schId) + it3.baseId = (0, resolve_1.resolveUrl)(it3.opts.uriResolver, it3.baseId, schId); } - - 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 - - -/***/ }), - -/***/ 94411: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Dispatcher = __nccwpck_require__(87781) -const RetryHandler = __nccwpck_require__(86242) - -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 - - -/***/ }), - -/***/ 67599: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kGetDispatcher, - kRemoveClient -} = __nccwpck_require__(90494) -const Client = __nccwpck_require__(8176) -const { - InvalidArgumentError -} = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { kUrl } = __nccwpck_require__(72785) -const buildConnector = __nccwpck_require__(82067) - -const kOptions = Symbol('options') -const kConnections = Symbol('connections') -const kFactory = Symbol('factory') -const kIndex = Symbol('index') - -function defaultFactory (origin, opts) { - return new Client(origin, opts) -} - -class RoundRobinPool extends PoolBase { - constructor (origin, { - connections, - factory = defaultFactory, - connect, - connectTimeout, - tls, - maxCachedSessions, - socketPath, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - allowH2, - clientTtl, - ...options - } = {}) { - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { - throw new InvalidArgumentError('invalid connections') + function checkAsyncSchema(it3) { + if (it3.schema.$async && !it3.schemaEnv.$async) + throw new Error("async schema in sync schema"); } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') + function commentKeyword({ gen, schemaEnv, schema: schema2, errSchemaPath, opts }) { + const msg = schema2.$comment; + if (opts.$comment === true) { + gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`); + } else if (typeof opts.$comment == "function") { + const schemaPath = (0, codegen_1.str)`${errSchemaPath}/$comment`; + const rootName = gen.scopeValue("root", { ref: schemaEnv.root }); + gen.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`); + } } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') + function returnResults(it3) { + const { gen, schemaEnv, validateName, ValidationError, opts } = it3; + if (schemaEnv.$async) { + gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`)); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors); + if (opts.unevaluated) + assignEvaluated(it3); + gen.return((0, codegen_1._)`${names_1.default.errors} === 0`); + } } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(typeof autoSelectFamily === 'boolean' ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) + function assignEvaluated({ gen, evaluated, props, items }) { + if (props instanceof codegen_1.Name) + gen.assign((0, codegen_1._)`${evaluated}.props`, props); + if (items instanceof codegen_1.Name) + gen.assign((0, codegen_1._)`${evaluated}.items`, items); } - - super() - - this[kConnections] = connections || null - this[kUrl] = util.parseOrigin(origin) - this[kOptions] = { ...util.deepClone(options), connect, allowH2, clientTtl, socketPath } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kFactory] = factory - this[kIndex] = -1 - - this.on('connect', (origin, targets) => { - if (clientTtl != null && clientTtl > 0) { - for (const target of targets) { - Object.assign(target, { ttl: Date.now() }) + function schemaKeywords(it3, types2, typeErrors, errsCount) { + const { gen, schema: schema2, data, allErrors, opts, self } = it3; + const { RULES } = self; + if (schema2.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema2, RULES))) { + gen.block(() => keywordCode(it3, "$ref", RULES.all.$ref.definition)); + return; + } + if (!opts.jtd) + checkStrictTypes(it3, types2); + gen.block(() => { + for (const group of RULES.rules) + groupKeywords(group); + groupKeywords(RULES.post); + }); + function groupKeywords(group) { + if (!(0, applicability_1.shouldUseGroup)(schema2, group)) + return; + if (group.type) { + gen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers)); + iterateKeywords(it3, group); + if (types2.length === 1 && types2[0] === group.type && typeErrors) { + gen.else(); + (0, dataType_2.reportTypeError)(it3); + } + gen.endIf(); + } else { + iterateKeywords(it3, group); } + if (!allErrors) + gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`); } - }) - - 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) + } + function iterateKeywords(it3, group) { + const { gen, schema: schema2, opts: { useDefaults } } = it3; + if (useDefaults) + (0, defaults_1.assignDefaults)(it3, group.type); + gen.block(() => { + for (const rule of group.rules) { + if ((0, applicability_1.shouldUseRule)(schema2, rule) || shouldForceUnevaluatedProperties(schema2, rule)) { + keywordCode(it3, rule.keyword, rule.definition, group.type); + } } + }); + function shouldForceUnevaluatedProperties(schemaObj, rule) { + return !!(rule.keyword === "unevaluatedProperties" && (schemaObj.properties || schemaObj.patternProperties) && !it3.isAllOfVariant && it3.opts.defaultUnevaluatedProperties === false); } - }) - } - - [kGetDispatcher] () { - const clientTtlOption = this[kOptions].clientTtl - const clientsLength = this[kClients].length - - // If we have no clients yet, create one - if (clientsLength === 0) { - const dispatcher = this[kFactory](this[kUrl], this[kOptions]) - this[kAddClient](dispatcher) - return dispatcher } - - // Round-robin through existing clients - let checked = 0 - while (checked < clientsLength) { - this[kIndex] = (this[kIndex] + 1) % clientsLength - const client = this[kClients][this[kIndex]] - - // Check if client is stale (TTL expired) - if (clientTtlOption != null && clientTtlOption > 0 && client.ttl && ((Date.now() - client.ttl) > clientTtlOption)) { - this[kRemoveClient](client) - checked++ - continue + function checkStrictTypes(it3, types2) { + if (it3.schemaEnv.meta || !it3.opts.strictTypes) + return; + checkContextTypes(it3, types2); + if (!it3.opts.allowUnionTypes) + checkMultipleTypes(it3, types2); + checkKeywordTypes(it3, it3.dataTypes); + } + function checkContextTypes(it3, types2) { + if (!types2.length) + return; + if (!it3.dataTypes.length) { + it3.dataTypes = types2; + return; } - - // Return client if it's not draining - if (!client[kNeedDrain]) { - return client + types2.forEach((t2) => { + if (!includesType(it3.dataTypes, t2)) { + strictTypesError(it3, `type "${t2}" not allowed by context "${it3.dataTypes.join(",")}"`); + } + }); + narrowSchemaTypes(it3, types2); + } + function checkMultipleTypes(it3, ts2) { + if (ts2.length > 1 && !(ts2.length === 2 && ts2.includes("null"))) { + strictTypesError(it3, "use allowUnionTypes to allow union type keyword"); } - - checked++ } - - // All clients are busy, create a new one if we haven't reached the limit - if (!this[kConnections] || clientsLength < this[kConnections]) { - const dispatcher = this[kFactory](this[kUrl], this[kOptions]) - this[kAddClient](dispatcher) - return dispatcher + function checkKeywordTypes(it3, ts2) { + const rules8 = it3.self.RULES.all; + for (const keyword in rules8) { + const rule = rules8[keyword]; + if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it3.schema, rule)) { + const { type: type2 } = rule.definition; + if (type2.length && !type2.some((t2) => hasApplicableType(ts2, t2))) { + strictTypesError(it3, `missing type "${type2.join(",")}" for keyword "${keyword}"`); + } + } + } } - } -} - -module.exports = RoundRobinPool - - -/***/ }), - -/***/ 58924: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const net = __nccwpck_require__(87503) -const { URL } = __nccwpck_require__(41041) - -let tls // include tls conditionally since it is not always available -const DispatcherBase = __nccwpck_require__(61544) -const { InvalidArgumentError } = __nccwpck_require__(48045) -const { Socks5Client } = __nccwpck_require__(48725) -const { kDispatch, kClose, kDestroy } = __nccwpck_require__(72785) -const Pool = __nccwpck_require__(20177) -const buildConnector = __nccwpck_require__(82067) -const { debuglog } = __nccwpck_require__(47261) - -const debug = debuglog('undici:socks5-proxy') - -const kProxyUrl = Symbol('proxy url') -const kProxyHeaders = Symbol('proxy headers') -const kProxyAuth = Symbol('proxy auth') -const kPool = Symbol('pool') -const kConnector = Symbol('connector') - -// Static flag to ensure warning is only emitted once per process -let experimentalWarningEmitted = false - -/** - * SOCKS5 proxy agent for dispatching requests through a SOCKS5 proxy - */ -class Socks5ProxyAgent extends DispatcherBase { - constructor (proxyUrl, options = {}) { - super() - - // Emit experimental warning only once - if (!experimentalWarningEmitted) { - process.emitWarning( - 'SOCKS5 proxy support is experimental and subject to change', - 'ExperimentalWarning' - ) - experimentalWarningEmitted = true + function hasApplicableType(schTs, kwdT) { + return schTs.includes(kwdT) || kwdT === "number" && schTs.includes("integer"); } - - if (!proxyUrl) { - throw new InvalidArgumentError('Proxy URL is mandatory') + function includesType(ts2, t2) { + return ts2.includes(t2) || t2 === "integer" && ts2.includes("number"); } - - // Parse proxy URL - const url = typeof proxyUrl === 'string' ? new URL(proxyUrl) : proxyUrl - - if (url.protocol !== 'socks5:' && url.protocol !== 'socks:') { - throw new InvalidArgumentError('Proxy URL must use socks5:// or socks:// protocol') + function narrowSchemaTypes(it3, withTypes) { + const ts2 = []; + for (const t2 of it3.dataTypes) { + if (includesType(withTypes, t2)) + ts2.push(t2); + else if (withTypes.includes("integer") && t2 === "number") + ts2.push("integer"); + } + it3.dataTypes = ts2; } - - this[kProxyUrl] = url - this[kProxyHeaders] = options.headers || {} - - // Extract auth from URL or options - this[kProxyAuth] = { - username: options.username || (url.username ? decodeURIComponent(url.username) : null), - password: options.password || (url.password ? decodeURIComponent(url.password) : null) + function strictTypesError(it3, msg) { + const schemaPath = it3.schemaEnv.baseId + it3.errSchemaPath; + msg += ` at "${schemaPath}" (strictTypes)`; + (0, util_1.checkStrictMode)(it3, msg, it3.opts.strictTypes); } - - // Create connector for proxy connection - this[kConnector] = options.connect || buildConnector({ - ...options.proxyTls, - servername: options.proxyTls?.servername || url.hostname - }) - - // Pool for the actual HTTP connections (with SOCKS5 tunnel connect function) - this[kPool] = null - } - - /** - * Create a SOCKS5 connection to the proxy - */ - async createSocks5Connection (targetHost, targetPort) { - const proxyHost = this[kProxyUrl].hostname - const proxyPort = parseInt(this[kProxyUrl].port) || 1080 - - debug('creating SOCKS5 connection to', proxyHost, proxyPort) - - // Connect to the SOCKS5 proxy - const socket = await new Promise((resolve, reject) => { - const onConnect = () => { - socket.removeListener('error', onError) - resolve(socket) + var KeywordCxt = class { + constructor(it3, def, keyword) { + (0, keyword_1.validateKeywordUsage)(it3, def, keyword); + this.gen = it3.gen; + this.allErrors = it3.allErrors; + this.keyword = keyword; + this.data = it3.data; + this.schema = it3.schema[keyword]; + this.$data = def.$data && it3.opts.$data && this.schema && this.schema.$data; + this.schemaValue = (0, util_1.schemaRefOrVal)(it3, this.schema, keyword, this.$data); + this.schemaType = def.schemaType; + this.parentSchema = it3.schema; + this.params = {}; + this.it = it3; + this.def = def; + if (this.$data) { + this.schemaCode = it3.gen.const("vSchema", getData(this.$data, it3)); + } else { + this.schemaCode = this.schemaValue; + if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) { + throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`); + } + } + if ("code" in def ? def.trackErrors : def.errors !== false) { + this.errsCount = it3.gen.const("_errs", names_1.default.errors); + } } - - const onError = (err) => { - socket.removeListener('connect', onConnect) - reject(err) + result(condition, successAction, failAction) { + this.failResult((0, codegen_1.not)(condition), successAction, failAction); } - - const socket = net.connect({ - host: proxyHost, - port: proxyPort - }) - - socket.once('connect', onConnect) - socket.once('error', onError) - }) - - // Create SOCKS5 client - const socks5Client = new Socks5Client(socket, this[kProxyAuth]) - - // Handle SOCKS5 errors - socks5Client.on('error', (err) => { - debug('SOCKS5 error:', err) - socket.destroy() - }) - - // Perform SOCKS5 handshake - await socks5Client.handshake() - - // Wait for authentication (if required) - await new Promise((resolve, reject) => { - const timeout = setTimeout(() => { - reject(new Error('SOCKS5 authentication timeout')) - }, 5000) - - const onAuthenticated = () => { - clearTimeout(timeout) - socks5Client.removeListener('error', onError) - resolve() + failResult(condition, successAction, failAction) { + this.gen.if(condition); + if (failAction) + failAction(); + else + this.error(); + if (successAction) { + this.gen.else(); + successAction(); + if (this.allErrors) + this.gen.endIf(); + } else { + if (this.allErrors) + this.gen.endIf(); + else + this.gen.else(); + } } - - const onError = (err) => { - clearTimeout(timeout) - socks5Client.removeListener('authenticated', onAuthenticated) - reject(err) + pass(condition, failAction) { + this.failResult((0, codegen_1.not)(condition), void 0, failAction); } - - // Check if already authenticated (for NO_AUTH method) - if (socks5Client.state === 'authenticated') { - clearTimeout(timeout) - resolve() - } else { - socks5Client.once('authenticated', onAuthenticated) - socks5Client.once('error', onError) + fail(condition) { + if (condition === void 0) { + this.error(); + if (!this.allErrors) + this.gen.if(false); + return; + } + this.gen.if(condition); + this.error(); + if (this.allErrors) + this.gen.endIf(); + else + this.gen.else(); } - }) - - // Send CONNECT command - await socks5Client.connect(targetHost, targetPort) - - // Wait for connection - await new Promise((resolve, reject) => { - const timeout = setTimeout(() => { - reject(new Error('SOCKS5 connection timeout')) - }, 5000) - - const onConnected = (info) => { - debug('SOCKS5 tunnel established to', targetHost, targetPort, 'via', info) - clearTimeout(timeout) - socks5Client.removeListener('error', onError) - resolve() + fail$data(condition) { + if (!this.$data) + return this.fail(condition); + const { schemaCode } = this; + this.fail((0, codegen_1._)`${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`); } - - const onError = (err) => { - clearTimeout(timeout) - socks5Client.removeListener('connected', onConnected) - reject(err) + error(append, errorParams, errorPaths) { + if (errorParams) { + this.setParams(errorParams); + this._error(append, errorPaths); + this.setParams({}); + return; + } + this._error(append, errorPaths); } - - socks5Client.once('connected', onConnected) - socks5Client.once('error', onError) - }) - - return socket - } - - /** - * Dispatch a request through the SOCKS5 proxy - */ - async [kDispatch] (opts, handler) { - const { origin } = opts - - debug('dispatching request to', origin, 'via SOCKS5') - - try { - // Create Pool with custom connect function if we don't have one yet - if (!this[kPool] || this[kPool].destroyed || this[kPool].closed) { - this[kPool] = new Pool(origin, { - pipelining: opts.pipelining, - connections: opts.connections, - connect: async (connectOpts, callback) => { - try { - const url = new URL(origin) - const targetHost = url.hostname - const targetPort = parseInt(url.port) || (url.protocol === 'https:' ? 443 : 80) - - debug('establishing SOCKS5 connection to', targetHost, targetPort) - - // Create SOCKS5 tunnel - const socket = await this.createSocks5Connection(targetHost, targetPort) - - // Handle TLS if needed - let finalSocket = socket - if (url.protocol === 'https:') { - if (!tls) { - tls = __nccwpck_require__(31764) - } - debug('upgrading to TLS') - finalSocket = tls.connect({ - socket, - servername: targetHost, - ...connectOpts.tls || {} - }) - - await new Promise((resolve, reject) => { - finalSocket.once('secureConnect', resolve) - finalSocket.once('error', reject) - }) - } - - callback(null, finalSocket) - } catch (err) { - debug('SOCKS5 connection error:', err) - callback(err) - } + _error(append, errorPaths) { + ; + (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths); + } + $dataError() { + (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError); + } + reset() { + if (this.errsCount === void 0) + throw new Error('add "trackErrors" to keyword definition'); + (0, errors_1.resetErrorsCount)(this.gen, this.errsCount); + } + ok(cond) { + if (!this.allErrors) + this.gen.if(cond); + } + setParams(obj, assign) { + if (assign) + Object.assign(this.params, obj); + else + this.params = obj; + } + block$data(valid, codeBlock, $dataValid = codegen_1.nil) { + this.gen.block(() => { + this.check$data(valid, $dataValid); + codeBlock(); + }); + } + check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) { + if (!this.$data) + return; + const { gen, schemaCode, schemaType, def } = this; + gen.if((0, codegen_1.or)((0, codegen_1._)`${schemaCode} === undefined`, $dataValid)); + if (valid !== codegen_1.nil) + gen.assign(valid, true); + if (schemaType.length || def.validateSchema) { + gen.elseIf(this.invalid$data()); + this.$dataError(); + if (valid !== codegen_1.nil) + gen.assign(valid, false); + } + gen.else(); + } + invalid$data() { + const { gen, schemaCode, schemaType, def, it: it3 } = this; + return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema()); + function wrong$DataType() { + if (schemaType.length) { + if (!(schemaCode instanceof codegen_1.Name)) + throw new Error("ajv implementation error"); + const st3 = Array.isArray(schemaType) ? schemaType : [schemaType]; + return (0, codegen_1._)`${(0, dataType_2.checkDataTypes)(st3, schemaCode, it3.opts.strictNumbers, dataType_2.DataType.Wrong)}`; } - }) + return codegen_1.nil; + } + function invalid$DataSchema() { + if (def.validateSchema) { + const validateSchemaRef = gen.scopeValue("validate$data", { ref: def.validateSchema }); + return (0, codegen_1._)`!${validateSchemaRef}(${schemaCode})`; + } + return codegen_1.nil; + } + } + subschema(appl, valid, isAllOfVariant) { + const subschema = (0, subschema_1.getSubschema)(this.it, appl); + (0, subschema_1.extendSubschemaData)(subschema, this.it, appl); + (0, subschema_1.extendSubschemaMode)(subschema, appl); + const nextContext = { + ...this.it, + ...subschema, + items: void 0, + props: void 0, + isAllOfVariant + }; + subschemaCode(nextContext, valid); + return nextContext; + } + mergeEvaluated(schemaCxt, toName) { + const { it: it3, gen } = this; + if (!it3.opts.unevaluated) + return; + if (it3.props !== true && schemaCxt.props !== void 0) { + it3.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it3.props, toName); + } + if (it3.items !== true && schemaCxt.items !== void 0) { + it3.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it3.items, toName); + } } - - // Dispatch the request through the pool - return this[kPool][kDispatch](opts, handler) - } catch (err) { - debug('dispatch error:', err) - if (typeof handler.onError === 'function') { - handler.onError(err) - } else { - throw err + mergeValidEvaluated(schemaCxt, valid) { + const { it: it3, gen } = this; + if (it3.opts.unevaluated && (it3.props !== true || it3.items !== true)) { + gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name)); + return true; + } + } + }; + exports.KeywordCxt = KeywordCxt; + function keywordCode(it3, keyword, def, ruleType) { + const cxt = new KeywordCxt(it3, def, keyword); + if ("code" in def) { + def.code(cxt, ruleType); + } else if (cxt.$data && def.validate) { + (0, keyword_1.funcKeywordCode)(cxt, def); + } else if ("macro" in def) { + (0, keyword_1.macroKeywordCode)(cxt, def); + } else if (def.compile || def.validate) { + (0, keyword_1.funcKeywordCode)(cxt, def); } } - } - - async [kClose] () { - if (this[kPool]) { - await this[kPool].close() - } - } - - async [kDestroy] (err) { - if (this[kPool]) { - await this[kPool].destroy(err) + var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; + var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; + function getData($data, { dataLevel, dataNames, dataPathArr }) { + let jsonPointer; + let data; + if ($data === "") + return names_1.default.rootData; + if ($data[0] === "/") { + if (!JSON_POINTER.test($data)) + throw new Error(`Invalid JSON-pointer: ${$data}`); + jsonPointer = $data; + data = names_1.default.rootData; + } else { + const matches = RELATIVE_JSON_POINTER.exec($data); + if (!matches) + throw new Error(`Invalid JSON-pointer: ${$data}`); + const up = +matches[1]; + jsonPointer = matches[2]; + if (jsonPointer === "#") { + if (up >= dataLevel) + throw new Error(errorMsg("property/index", up)); + return dataPathArr[dataLevel - up]; + } + if (up > dataLevel) + throw new Error(errorMsg("data", up)); + data = dataNames[dataLevel - up]; + if (!jsonPointer) + return data; + } + let expr = data; + const segments = jsonPointer.split("/"); + for (const segment of segments) { + if (segment) { + data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`; + expr = (0, codegen_1._)`${expr} && ${data}`; + } + } + return expr; + function errorMsg(pointerType, up) { + return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`; + } } + exports.getData = getData; } -} - -module.exports = Socks5ProxyAgent - - -/***/ }), - -/***/ 98806: -/***/ ((module) => { - -"use strict"; - - -const textDecoder = new TextDecoder() - -/** - * @see https://encoding.spec.whatwg.org/#utf-8-decode - * @param {Uint8Array} 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) +// node_modules/@redocly/ajv/dist/runtime/validation_error.js +var require_validation_error = __commonJS({ + "node_modules/@redocly/ajv/dist/runtime/validation_error.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var ValidationError = class extends Error { + constructor(errors) { + super("validation failed"); + this.errors = errors; + this.ajv = this.validation = true; + } + }; + exports.default = ValidationError; } +}); - // 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 -} - -module.exports = { - utf8DecodeBytes -} - - -/***/ }), - -/***/ 21892: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -// 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__(48045) -const Agent = __nccwpck_require__(71208) - -if (getGlobalDispatcher() === undefined) { - setGlobalDispatcher(new Agent()) -} - -function setGlobalDispatcher (agent) { - if (!agent || typeof agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument agent must implement Agent') +// node_modules/@redocly/ajv/dist/compile/ref_error.js +var require_ref_error = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/ref_error.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var resolve_1 = require_resolve(); + var MissingRefError = class extends Error { + constructor(resolver, baseId, ref, msg) { + super(msg || `can't resolve reference ${ref} from id ${baseId}`); + this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref); + this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef)); + } + }; + exports.default = MissingRefError; } - Object.defineProperty(globalThis, globalDispatcher, { - value: agent, - writable: true, - enumerable: false, - configurable: false - }) -} - -function getGlobalDispatcher () { - return globalThis[globalDispatcher] -} - -// These are the globals that can be installed by undici.install(). -// Not exported by index.js to avoid use outside of this module. -const installedExports = /** @type {const} */ ( - [ - 'fetch', - 'Headers', - 'Response', - 'Request', - 'FormData', - 'WebSocket', - 'CloseEvent', - 'ErrorEvent', - 'MessageEvent', - 'EventSource' - ] -) - -module.exports = { - setGlobalDispatcher, - getGlobalDispatcher, - installedExports -} - +}); -/***/ }), - -/***/ 97665: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const util = __nccwpck_require__(83983) -const { - parseCacheControlHeader, - parseVaryHeader, - isEtagUsable -} = __nccwpck_require__(88047) -const { parseHttpDate } = __nccwpck_require__(70817) - -function noop () {} - -// Status codes that we can use some heuristics on to cache -const HEURISTICALLY_CACHEABLE_STATUS_CODES = [ - 200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414, 501 -] - -// Status codes which semantic is not handled by the cache -// https://datatracker.ietf.org/doc/html/rfc9111#section-3 -// This list should not grow beyond 206 unless the RFC is updated -// by a newer one including more. Please introduce another list if -// implementing caching of responses with the 'must-understand' directive. -const NOT_UNDERSTOOD_STATUS_CODES = [ - 206 -] - -const MAX_RESPONSE_AGE = 2147483647000 - -/** - * @typedef {import('../../types/dispatcher.d.ts').default.DispatchHandler} DispatchHandler - * - * @implements {DispatchHandler} - */ -class CacheHandler { - /** - * @type {import('../../types/cache-interceptor.d.ts').default.CacheKey} - */ - #cacheKey - - /** - * @type {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions['type']} - */ - #cacheType - - /** - * @type {number | undefined} - */ - #cacheByDefault - - /** - * @type {import('../../types/cache-interceptor.d.ts').default.CacheStore} - */ - #store - - /** - * @type {import('../../types/dispatcher.d.ts').default.DispatchHandler} - */ - #handler - - /** - * @type {import('node:stream').Writable | undefined} - */ - #writeStream - - /** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} opts - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey - * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler - */ - constructor ({ store, type, cacheByDefault }, cacheKey, handler) { - this.#store = store - this.#cacheType = type - this.#cacheByDefault = cacheByDefault - this.#cacheKey = cacheKey - this.#handler = handler - } - - onRequestStart (controller, context) { - this.#writeStream?.destroy() - this.#writeStream = undefined - this.#handler.onRequestStart?.(controller, context) - } - - onRequestUpgrade (controller, statusCode, headers, socket) { - this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket) - } - - /** - * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller - * @param {number} statusCode - * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders - * @param {string} statusMessage - */ - onResponseStart ( - controller, - statusCode, - resHeaders, - statusMessage - ) { - const downstreamOnHeaders = () => - this.#handler.onResponseStart?.( - controller, - statusCode, - resHeaders, - statusMessage - ) - const handler = this - - if ( - !util.safeHTTPMethods.includes(this.#cacheKey.method) && - statusCode >= 200 && - statusCode <= 399 - ) { - // Successful response to an unsafe method, delete it from cache - // https://www.rfc-editor.org/rfc/rfc9111.html#name-invalidating-stored-response +// node_modules/@redocly/ajv/dist/compile/index.js +var require_compile = __commonJS({ + "node_modules/@redocly/ajv/dist/compile/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0; + var codegen_1 = require_codegen(); + var validation_error_1 = require_validation_error(); + var names_1 = require_names(); + var resolve_1 = require_resolve(); + var util_1 = require_util7(); + var validate_1 = require_validate(); + var SchemaEnv = class { + constructor(env4) { + var _a; + this.refs = {}; + this.dynamicAnchors = {}; + let schema2; + if (typeof env4.schema == "object") + schema2 = env4.schema; + this.schema = env4.schema; + this.schemaId = env4.schemaId; + this.root = env4.root || this; + this.baseId = (_a = env4.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema2 === null || schema2 === void 0 ? void 0 : schema2[env4.schemaId || "$id"]); + this.schemaPath = env4.schemaPath; + this.localRefs = env4.localRefs; + this.meta = env4.meta; + this.$async = schema2 === null || schema2 === void 0 ? void 0 : schema2.$async; + this.refs = {}; + } + }; + exports.SchemaEnv = SchemaEnv; + function compileSchema(sch) { + const _sch = getCompilingSchema.call(this, sch); + if (_sch) + return _sch; + const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); + const { es5, lines } = this.opts.code; + const { ownProperties } = this.opts; + const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); + let _ValidationError; + if (sch.$async) { + _ValidationError = gen.scopeValue("Error", { + ref: validation_error_1.default, + code: (0, codegen_1._)`require("ajv/dist/runtime/validation_error").default` + }); + } + const validateName = gen.scopeName("validate"); + sch.validateName = validateName; + const schemaCxt = { + gen, + allErrors: this.opts.allErrors, + data: names_1.default.data, + parentData: names_1.default.parentData, + parentDataProperty: names_1.default.parentDataProperty, + dataNames: [names_1.default.data], + dataPathArr: [codegen_1.nil], + // TODO can its length be used as dataLevel if nil is removed? + dataLevel: 0, + dataTypes: [], + definedProperties: /* @__PURE__ */ new Set(), + topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } : { ref: sch.schema }), + validateName, + ValidationError: _ValidationError, + schema: sch.schema, + schemaEnv: sch, + rootId, + baseId: sch.baseId || rootId, + schemaPath: codegen_1.nil, + errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"), + errorPath: (0, codegen_1._)`""`, + opts: this.opts, + self: this + }; + let sourceCode; try { - this.#store.delete(this.#cacheKey)?.catch?.(noop) - } catch { - // Fail silently + this._compilations.add(sch); + (0, validate_1.validateFunctionCode)(schemaCxt); + gen.optimize(this.opts.code.optimize); + const validateCode = gen.toString(); + sourceCode = `const visitedNodesForRef = new WeakMap(); ${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`; + if (this.opts.code.process) + sourceCode = this.opts.code.process(sourceCode, sch); + const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode); + const validate = makeValidate(this, this.scope.get()); + this.scope.value(validateName, { ref: validate }); + validate.errors = null; + validate.schema = sch.schema; + validate.schemaEnv = sch; + if (sch.$async) + validate.$async = true; + if (this.opts.code.source === true) { + validate.source = { validateName, validateCode, scopeValues: gen._values }; + } + if (this.opts.unevaluated) { + const { props, items } = schemaCxt; + validate.evaluated = { + props: props instanceof codegen_1.Name ? void 0 : props, + items: items instanceof codegen_1.Name ? void 0 : items, + dynamicProps: props instanceof codegen_1.Name, + dynamicItems: items instanceof codegen_1.Name + }; + if (validate.source) + validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated); + } + sch.validate = validate; + return sch; + } catch (e2) { + delete sch.validate; + delete sch.validateName; + if (sourceCode) + this.logger.error("Error compiling schema, function code:", sourceCode); + throw e2; + } finally { + this._compilations.delete(sch); } - return downstreamOnHeaders() - } - - const cacheControlHeader = resHeaders['cache-control'] - const heuristicallyCacheable = resHeaders['last-modified'] && HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode) - if ( - !cacheControlHeader && - !resHeaders['expires'] && - !heuristicallyCacheable && - !this.#cacheByDefault - ) { - // Don't have anything to tell us this response is cachable and we're not - // caching by default - return downstreamOnHeaders() } - - const cacheControlDirectives = cacheControlHeader ? parseCacheControlHeader(cacheControlHeader) : {} - if (!canCacheResponse(this.#cacheType, statusCode, resHeaders, cacheControlDirectives, this.#cacheKey.headers)) { - return downstreamOnHeaders() - } - - const now = Date.now() - const resAge = resHeaders.age ? getAge(resHeaders.age) : undefined - if (resAge && resAge >= MAX_RESPONSE_AGE) { - // Response considered stale - return downstreamOnHeaders() - } - - const resDate = typeof resHeaders.date === 'string' - ? parseHttpDate(resHeaders.date) - : undefined - - const staleAt = - determineStaleAt(this.#cacheType, now, resAge, resHeaders, resDate, cacheControlDirectives) ?? - this.#cacheByDefault - if (staleAt === undefined || (resAge && resAge > staleAt)) { - return downstreamOnHeaders() + exports.compileSchema = compileSchema; + function resolveRef(root, baseId, origRef) { + var _a; + const ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, origRef); + const schOrFunc = root.refs[ref]; + if (schOrFunc) + return schOrFunc; + let _sch = resolve8.call(this, root, ref); + if (_sch === void 0) { + const schema2 = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; + const { schemaId } = this.opts; + if (schema2) + _sch = new SchemaEnv({ schema: schema2, schemaId, root, baseId }); + } + if (_sch === void 0 && this.opts.loadSchemaSync) { + const remoteSchema = this.opts.loadSchemaSync(baseId, origRef, ref); + if (remoteSchema && !(this.refs[ref] || this.schemas[ref])) { + this.addSchema(remoteSchema, ref, void 0); + _sch = resolve8.call(this, root, ref); + } + } + if (_sch === void 0) + return; + return root.refs[ref] = inlineOrCompile.call(this, _sch); } - - const baseTime = resDate ? resDate.getTime() : now - const absoluteStaleAt = staleAt + baseTime - if (now >= absoluteStaleAt) { - // Response is already stale - return downstreamOnHeaders() + exports.resolveRef = resolveRef; + function inlineOrCompile(sch) { + if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs)) + return sch.schema; + return sch.validate ? sch : compileSchema.call(this, sch); } - - let varyDirectives - if (this.#cacheKey.headers && resHeaders.vary) { - varyDirectives = parseVaryHeader(resHeaders.vary, this.#cacheKey.headers) - if (!varyDirectives) { - // Parse error - return downstreamOnHeaders() + function getCompilingSchema(schEnv) { + for (const sch of this._compilations) { + if (sameSchemaEnv(sch, schEnv)) + return sch; } } - - const deleteAt = determineDeleteAt(baseTime, cacheControlDirectives, absoluteStaleAt) - const strippedHeaders = stripNecessaryHeaders(resHeaders, cacheControlDirectives) - - /** - * @type {import('../../types/cache-interceptor.d.ts').default.CacheValue} - */ - const value = { - statusCode, - statusMessage, - headers: strippedHeaders, - vary: varyDirectives, - cacheControlDirectives, - cachedAt: resAge ? now - resAge : now, - staleAt: absoluteStaleAt, - deleteAt + exports.getCompilingSchema = getCompilingSchema; + function sameSchemaEnv(s1, s2) { + return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId; } - - // Not modified, re-use the cached value - // https://www.rfc-editor.org/rfc/rfc9111.html#name-handling-304-not-modified - if (statusCode === 304) { - const handle304 = (cachedValue) => { - if (!cachedValue) { - // Do not create a new cache entry, as a 304 won't have a body - so cannot be cached. - return downstreamOnHeaders() - } - - // Re-use the cached value: statuscode, statusmessage, headers and body - value.statusCode = cachedValue.statusCode - value.statusMessage = cachedValue.statusMessage - value.etag = cachedValue.etag - value.headers = { ...cachedValue.headers, ...strippedHeaders } - - downstreamOnHeaders() - - this.#writeStream = this.#store.createWriteStream(this.#cacheKey, value) - - if (!this.#writeStream || !cachedValue?.body) { - return - } - - if (typeof cachedValue.body.values === 'function') { - const bodyIterator = cachedValue.body.values() - - const streamCachedBody = () => { - for (const chunk of bodyIterator) { - const full = this.#writeStream.write(chunk) === false - this.#handler.onResponseData?.(controller, chunk) - // when stream is full stop writing until we get a 'drain' event - if (full) { - break - } - } - } - - this.#writeStream - .on('error', function () { - handler.#writeStream = undefined - handler.#store.delete(handler.#cacheKey) - }) - .on('drain', () => { - streamCachedBody() - }) - .on('close', function () { - if (handler.#writeStream === this) { - handler.#writeStream = undefined - } - }) - - streamCachedBody() - } else if (typeof cachedValue.body.on === 'function') { - // Readable stream body (e.g. from async/remote cache stores) - cachedValue.body - .on('data', (chunk) => { - this.#writeStream.write(chunk) - this.#handler.onResponseData?.(controller, chunk) - }) - .on('end', () => { - this.#writeStream.end() - }) - .on('error', () => { - this.#writeStream = undefined - this.#store.delete(this.#cacheKey) - }) - - this.#writeStream - .on('error', function () { - handler.#writeStream = undefined - handler.#store.delete(handler.#cacheKey) - }) - .on('close', function () { - if (handler.#writeStream === this) { - handler.#writeStream = undefined - } - }) - } - } - - /** - * @type {import('../../types/cache-interceptor.d.ts').default.CacheValue} - */ - const result = this.#store.get(this.#cacheKey) - if (result && typeof result.then === 'function') { - result.then(handle304) - } else { - handle304(result) + function resolve8(root, ref) { + let sch; + while (typeof (sch = this.refs[ref]) == "string") + ref = sch; + return sch || this.schemas[ref] || resolveSchema2.call(this, root, ref); + } + function resolveSchema2(root, ref) { + const p2 = this.opts.uriResolver.parse(ref); + const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p2); + let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, void 0); + if (Object.keys(root.schema).length > 0 && refPath === baseId) { + return getJsonPointer.call(this, p2, root); + } + const id = (0, resolve_1.normalizeId)(refPath); + const schOrRef = this.refs[id] || this.schemas[id]; + if (typeof schOrRef == "string") { + const sch = resolveSchema2.call(this, root, schOrRef); + if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object") + return; + return getJsonPointer.call(this, p2, sch); } - } else { - if (typeof resHeaders.etag === 'string' && isEtagUsable(resHeaders.etag)) { - value.etag = resHeaders.etag + if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object") + return; + if (!schOrRef.validate) + compileSchema.call(this, schOrRef); + if (id === (0, resolve_1.normalizeId)(ref)) { + const { schema: schema2 } = schOrRef; + const { schemaId } = this.opts; + const schId = schema2[schemaId]; + if (schId) + baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); + return new SchemaEnv({ schema: schema2, schemaId, root, baseId }); + } + return getJsonPointer.call(this, p2, schOrRef); + } + exports.resolveSchema = resolveSchema2; + var PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([ + "properties", + "patternProperties", + "enum", + "dependencies", + "definitions" + ]); + function getJsonPointer(parsedRef, { baseId, schema: schema2, root }) { + var _a; + if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== "/") + return; + for (const part of parsedRef.fragment.slice(1).split("/")) { + if (typeof schema2 === "boolean") + return; + const partSchema = schema2[(0, util_1.unescapeFragment)(part)]; + if (partSchema === void 0) + return; + schema2 = partSchema; + const schId = typeof schema2 === "object" && schema2[this.opts.schemaId]; + if (!PREVENT_SCOPE_CHANGE.has(part) && schId) { + baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); + } } - - this.#writeStream = this.#store.createWriteStream(this.#cacheKey, value) - - if (!this.#writeStream) { - return downstreamOnHeaders() + let env4; + if (typeof schema2 != "boolean" && schema2.$ref && !(0, util_1.schemaHasRulesButRef)(schema2, this.RULES)) { + const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema2.$ref); + env4 = resolveSchema2.call(this, root, $ref); } - - this.#writeStream - .on('drain', () => controller.resume()) - .on('error', function () { - // TODO (fix): Make error somehow observable? - handler.#writeStream = undefined - - // Delete the value in case the cache store is holding onto state from - // the call to createWriteStream - handler.#store.delete(handler.#cacheKey) - }) - .on('close', function () { - if (handler.#writeStream === this) { - handler.#writeStream = undefined - } - - // TODO (fix): Should we resume even if was paused downstream? - controller.resume() - }) - - downstreamOnHeaders() - } - } - - onResponseData (controller, chunk) { - if (this.#writeStream?.write(chunk) === false) { - controller.pause() + const { schemaId } = this.opts; + env4 = env4 || new SchemaEnv({ schema: schema2, schemaId, root, baseId }); + if (env4.schema !== env4.root.schema) + return env4; + return void 0; } - - this.#handler.onResponseData?.(controller, chunk) - } - - onResponseEnd (controller, trailers) { - this.#writeStream?.end() - this.#handler.onResponseEnd?.(controller, trailers) - } - - onResponseError (controller, err) { - this.#writeStream?.destroy(err) - this.#writeStream = undefined - this.#handler.onResponseError?.(controller, err) - } -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-storing-responses-to-authen - * - * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions['type']} cacheType - * @param {number} statusCode - * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders - * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives - * @param {import('../../types/header.d.ts').IncomingHttpHeaders} [reqHeaders] - */ -function canCacheResponse (cacheType, statusCode, resHeaders, cacheControlDirectives, reqHeaders) { - // Status code must be final and understood. - if (statusCode < 200 || NOT_UNDERSTOOD_STATUS_CODES.includes(statusCode)) { - return false - } - // Responses with neither status codes that are heuristically cacheable, nor "explicit enough" caching - // directives, are not cacheable. "Explicit enough": see https://www.rfc-editor.org/rfc/rfc9111.html#section-3 - if (!HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode) && !resHeaders['expires'] && - !cacheControlDirectives.public && - cacheControlDirectives['max-age'] === undefined && - // RFC 9111: a private response directive, if the cache is not shared - !(cacheControlDirectives.private && cacheType === 'private') && - !(cacheControlDirectives['s-maxage'] !== undefined && cacheType === 'shared') - ) { - return false - } - - if (cacheControlDirectives['no-store']) { - return false - } - - if (cacheType === 'shared' && cacheControlDirectives.private === true) { - return false } +}); - // https://www.rfc-editor.org/rfc/rfc9111.html#section-4.1-5 - if (resHeaders.vary?.includes('*')) { - return false +// node_modules/@redocly/ajv/dist/refs/data.json +var require_data = __commonJS({ + "node_modules/@redocly/ajv/dist/refs/data.json"(exports, module3) { + module3.exports = { + $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", + description: "Meta-schema for $data reference (JSON AnySchema extension proposal)", + type: "object", + required: ["$data"], + properties: { + $data: { + type: "string", + anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] + } + }, + additionalProperties: false + }; } +}); - // https://www.rfc-editor.org/rfc/rfc9111.html#name-storing-responses-to-authen - if (reqHeaders?.authorization) { - if ( - !cacheControlDirectives.public && - !cacheControlDirectives['s-maxage'] && - !cacheControlDirectives['must-revalidate'] - ) { - return false - } - - if (typeof reqHeaders.authorization !== 'string') { - return false - } - - if ( - Array.isArray(cacheControlDirectives['no-cache']) && - cacheControlDirectives['no-cache'].includes('authorization') - ) { - return false - } - - if ( - Array.isArray(cacheControlDirectives['private']) && - cacheControlDirectives['private'].includes('authorization') - ) { - return false +// node_modules/fast-uri/lib/utils.js +var require_utils6 = __commonJS({ + "node_modules/fast-uri/lib/utils.js"(exports, module3) { + "use strict"; + var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu); + var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u); + var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu); + var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu); + var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu); + function stringArrayToHexStripped(input) { + let acc = ""; + let code = 0; + let i2 = 0; + for (i2 = 0; i2 < input.length; i2++) { + code = input[i2].charCodeAt(0); + if (code === 48) { + continue; + } + if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) { + return ""; + } + acc += input[i2]; + break; + } + for (i2 += 1; i2 < input.length; i2++) { + code = input[i2].charCodeAt(0); + if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) { + return ""; + } + acc += input[i2]; + } + return acc; } - } - - return true -} - -/** - * @param {string | string[]} ageHeader - * @returns {number | undefined} - */ -function getAge (ageHeader) { - const age = parseInt(Array.isArray(ageHeader) ? ageHeader[0] : ageHeader) - - return isNaN(age) ? undefined : age * 1000 -} - -/** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions['type']} cacheType - * @param {number} now - * @param {number | undefined} age - * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders - * @param {Date | undefined} responseDate - * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives - * - * @returns {number | undefined} time that the value is stale at in seconds or undefined if it shouldn't be cached - */ -function determineStaleAt (cacheType, now, age, resHeaders, responseDate, cacheControlDirectives) { - if (cacheType === 'shared') { - // Prioritize s-maxage since we're a shared cache - // s-maxage > max-age > Expire - // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.2.10-3 - const sMaxAge = cacheControlDirectives['s-maxage'] - if (sMaxAge !== undefined) { - return sMaxAge > 0 ? sMaxAge * 1000 : undefined + var nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u); + function consumeIsZone(buffer) { + buffer.length = 0; + return true; } - } - - const maxAge = cacheControlDirectives['max-age'] - if (maxAge !== undefined) { - return maxAge > 0 ? maxAge * 1000 : undefined - } - - if (typeof resHeaders.expires === 'string') { - // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.3 - const expiresDate = parseHttpDate(resHeaders.expires) - if (expiresDate) { - if (now >= expiresDate.getTime()) { - return undefined + function consumeHextets(buffer, address, output) { + if (buffer.length) { + const hex = stringArrayToHexStripped(buffer); + if (hex !== "") { + address.push(hex); + } else { + output.error = true; + return false; + } + buffer.length = 0; } - - if (responseDate) { - if (responseDate >= expiresDate) { - return undefined + return true; + } + function getIPV6(input) { + let tokenCount = 0; + const output = { error: false, address: "", zone: "" }; + const address = []; + const buffer = []; + let endipv6Encountered = false; + let endIpv6 = false; + let consume = consumeHextets; + for (let i2 = 0; i2 < input.length; i2++) { + const cursor = input[i2]; + if (cursor === "[" || cursor === "]") { + continue; + } + if (cursor === ":") { + if (endipv6Encountered === true) { + endIpv6 = true; + } + if (!consume(buffer, address, output)) { + break; + } + if (++tokenCount > 7) { + output.error = true; + break; + } + if (i2 > 0 && input[i2 - 1] === ":") { + endipv6Encountered = true; + } + address.push(":"); + continue; + } else if (cursor === "%") { + if (!consume(buffer, address, output)) { + break; + } + consume = consumeIsZone; + } else { + buffer.push(cursor); + continue; } - - if (age !== undefined && age > (expiresDate - responseDate)) { - return undefined + } + if (buffer.length) { + if (consume === consumeIsZone) { + output.zone = buffer.join(""); + } else if (endIpv6) { + address.push(buffer.join("")); + } else { + address.push(stringArrayToHexStripped(buffer)); } } - - return expiresDate.getTime() - now + output.address = address.join(""); + return output; } - } - - if (typeof resHeaders['last-modified'] === 'string') { - // https://www.rfc-editor.org/rfc/rfc9111.html#name-calculating-heuristic-fresh - const lastModified = new Date(resHeaders['last-modified']) - if (isValidDate(lastModified)) { - if (lastModified.getTime() >= now) { - return undefined + function normalizeIPv6(host) { + if (findToken(host, ":") < 2) { + return { host, isIPV6: false }; + } + const ipv6 = getIPV6(host); + if (!ipv6.error) { + let newHost = ipv6.address; + let escapedHost = ipv6.address; + if (ipv6.zone) { + newHost += "%" + ipv6.zone; + escapedHost += "%25" + ipv6.zone; + } + return { host: newHost, isIPV6: true, escapedHost }; + } else { + return { host, isIPV6: false }; } - - const responseAge = now - lastModified.getTime() - - return responseAge * 0.1 } - } - - if (cacheControlDirectives.immutable) { - // https://www.rfc-editor.org/rfc/rfc8246.html#section-2.2 - return 31536000 - } - - return undefined -} - -/** - * @param {number} now - * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives - * @param {number} staleAt - */ -function determineDeleteAt (now, cacheControlDirectives, staleAt) { - let staleWhileRevalidate = -Infinity - let staleIfError = -Infinity - let immutable = -Infinity - - if (cacheControlDirectives['stale-while-revalidate']) { - staleWhileRevalidate = staleAt + (cacheControlDirectives['stale-while-revalidate'] * 1000) - } - - if (cacheControlDirectives['stale-if-error']) { - staleIfError = staleAt + (cacheControlDirectives['stale-if-error'] * 1000) - } - - if (cacheControlDirectives.immutable && staleWhileRevalidate === -Infinity && staleIfError === -Infinity) { - immutable = now + 31536000000 - } - - // When no stale directives or immutable flag, add a revalidation buffer - // equal to the freshness lifetime so the entry survives past staleAt long - // enough to be revalidated instead of silently disappearing. - if (staleWhileRevalidate === -Infinity && staleIfError === -Infinity && immutable === -Infinity) { - const freshnessLifetime = staleAt - now - return staleAt + freshnessLifetime - } - - return Math.max(staleAt, staleWhileRevalidate, staleIfError, immutable) -} - -/** - * Strips headers required to be removed in cached responses - * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders - * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives - * @returns {Record} - */ -function stripNecessaryHeaders (resHeaders, cacheControlDirectives) { - const headersToRemove = [ - 'connection', - 'proxy-authenticate', - 'proxy-authentication-info', - 'proxy-authorization', - 'proxy-connection', - 'te', - 'transfer-encoding', - 'upgrade', - // We'll add age back when serving it - 'age' - ] - - if (resHeaders['connection']) { - if (Array.isArray(resHeaders['connection'])) { - // connection: a - // connection: b - headersToRemove.push(...resHeaders['connection'].map(header => header.trim())) - } else { - // connection: a, b - headersToRemove.push(...resHeaders['connection'].split(',').map(header => header.trim())) + function findToken(str2, token) { + let ind = 0; + for (let i2 = 0; i2 < str2.length; i2++) { + if (str2[i2] === token) ind++; + } + return ind; } - } - - if (Array.isArray(cacheControlDirectives['no-cache'])) { - headersToRemove.push(...cacheControlDirectives['no-cache']) - } - - if (Array.isArray(cacheControlDirectives['private'])) { - headersToRemove.push(...cacheControlDirectives['private']) - } - - let strippedHeaders - for (const headerName of headersToRemove) { - if (resHeaders[headerName]) { - strippedHeaders ??= { ...resHeaders } - delete strippedHeaders[headerName] + function removeDotSegments(path13) { + let input = path13; + const output = []; + let nextSlash = -1; + let len = 0; + while (len = input.length) { + if (len === 1) { + if (input === ".") { + break; + } else if (input === "/") { + output.push("/"); + break; + } else { + output.push(input); + break; + } + } else if (len === 2) { + if (input[0] === ".") { + if (input[1] === ".") { + break; + } else if (input[1] === "/") { + input = input.slice(2); + continue; + } + } else if (input[0] === "/") { + if (input[1] === "." || input[1] === "/") { + output.push("/"); + break; + } + } + } else if (len === 3) { + if (input === "/..") { + if (output.length !== 0) { + output.pop(); + } + output.push("/"); + break; + } + } + if (input[0] === ".") { + if (input[1] === ".") { + if (input[2] === "/") { + input = input.slice(3); + continue; + } + } else if (input[1] === "/") { + input = input.slice(2); + continue; + } + } else if (input[0] === "/") { + if (input[1] === ".") { + if (input[2] === "/") { + input = input.slice(2); + continue; + } else if (input[2] === ".") { + if (input[3] === "/") { + input = input.slice(3); + if (output.length !== 0) { + output.pop(); + } + continue; + } + } + } + } + if ((nextSlash = input.indexOf("/", 1)) === -1) { + output.push(input); + break; + } else { + output.push(input.slice(0, nextSlash)); + input = input.slice(nextSlash); + } + } + return output.join(""); } - } - - return strippedHeaders ?? resHeaders -} - -/** - * @param {Date} date - * @returns {boolean} - */ -function isValidDate (date) { - return date instanceof Date && Number.isFinite(date.valueOf()) -} - -module.exports = CacheHandler - - -/***/ }), - -/***/ 44976: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(98061) - -/** - * This takes care of revalidation requests we send to the origin. If we get - * a response indicating that what we have is cached (via a HTTP 304), we can - * continue using the cached value. Otherwise, we'll receive the new response - * here, which we then just pass on to the next handler (most likely a - * CacheHandler). Note that this assumes the proper headers were already - * included in the request to tell the origin that we want to revalidate the - * response (i.e. if-modified-since or if-none-match). - * - * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-validation - * - * @implements {import('../../types/dispatcher.d.ts').default.DispatchHandler} - */ -class CacheRevalidationHandler { - #successful = false - - /** - * @type {((boolean, any) => void) | null} - */ - #callback - - /** - * @type {(import('../../types/dispatcher.d.ts').default.DispatchHandler)} - */ - #handler - - #context - - /** - * @type {boolean} - */ - #allowErrorStatusCodes - - /** - * @param {(boolean) => void} callback Function to call if the cached value is valid - * @param {import('../../types/dispatcher.d.ts').default.DispatchHandlers} handler - * @param {boolean} allowErrorStatusCodes - */ - constructor (callback, handler, allowErrorStatusCodes) { - if (typeof callback !== 'function') { - throw new TypeError('callback must be a function') + var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" }; + var HOST_DELIM_RE = /[@/?#:]/g; + var HOST_DELIM_NO_COLON_RE = /[@/?#]/g; + function reescapeHostDelimiters(host, isIP) { + const re3 = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE; + re3.lastIndex = 0; + return host.replace(re3, (ch) => HOST_DELIMS[ch]); } - - this.#callback = callback - this.#handler = handler - this.#allowErrorStatusCodes = allowErrorStatusCodes - } - - onRequestStart (_, context) { - this.#successful = false - this.#context = context - } - - onRequestUpgrade (controller, statusCode, headers, socket) { - this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket) - } - - onResponseStart ( - controller, - statusCode, - headers, - statusMessage - ) { - assert(this.#callback != null) - - // https://www.rfc-editor.org/rfc/rfc9111.html#name-handling-a-validation-respo - // https://datatracker.ietf.org/doc/html/rfc5861#section-4 - this.#successful = statusCode === 304 || - (this.#allowErrorStatusCodes && statusCode >= 500 && statusCode <= 504) - this.#callback(this.#successful, this.#context) - this.#callback = null - - if (this.#successful) { - return true + function normalizePercentEncoding(input, decodeUnreserved = false) { + if (input.indexOf("%") === -1) { + return input; + } + let output = ""; + for (let i2 = 0; i2 < input.length; i2++) { + if (input[i2] === "%" && i2 + 2 < input.length) { + const hex = input.slice(i2 + 1, i2 + 3); + if (isHexPair(hex)) { + const normalizedHex = hex.toUpperCase(); + const decoded = String.fromCharCode(parseInt(normalizedHex, 16)); + if (decodeUnreserved && isUnreserved(decoded)) { + output += decoded; + } else { + output += "%" + normalizedHex; + } + i2 += 2; + continue; + } + } + output += input[i2]; + } + return output; } - - this.#handler.onRequestStart?.(controller, this.#context) - this.#handler.onResponseStart?.( - controller, - statusCode, - headers, - statusMessage - ) - } - - onResponseData (controller, chunk) { - if (this.#successful) { - return + function normalizePathEncoding(input) { + let output = ""; + for (let i2 = 0; i2 < input.length; i2++) { + if (input[i2] === "%" && i2 + 2 < input.length) { + const hex = input.slice(i2 + 1, i2 + 3); + if (isHexPair(hex)) { + const normalizedHex = hex.toUpperCase(); + const decoded = String.fromCharCode(parseInt(normalizedHex, 16)); + if (decoded !== "." && isUnreserved(decoded)) { + output += decoded; + } else { + output += "%" + normalizedHex; + } + i2 += 2; + continue; + } + } + if (isPathCharacter(input[i2])) { + output += input[i2]; + } else { + output += escape(input[i2]); + } + } + return output; } - - return this.#handler.onResponseData?.(controller, chunk) - } - - onResponseEnd (controller, trailers) { - if (this.#successful) { - return + function escapePreservingEscapes(input) { + let output = ""; + for (let i2 = 0; i2 < input.length; i2++) { + if (input[i2] === "%" && i2 + 2 < input.length) { + const hex = input.slice(i2 + 1, i2 + 3); + if (isHexPair(hex)) { + output += "%" + hex.toUpperCase(); + i2 += 2; + continue; + } + } + output += escape(input[i2]); + } + return output; } - - this.#handler.onResponseEnd?.(controller, trailers) + function recomposeAuthority(component) { + const uriTokens = []; + if (component.userinfo !== void 0) { + uriTokens.push(component.userinfo); + uriTokens.push("@"); + } + if (component.host !== void 0) { + let host = unescape(component.host); + if (!isIPv4(host)) { + const ipV6res = normalizeIPv6(host); + if (ipV6res.isIPV6 === true) { + host = `[${ipV6res.escapedHost}]`; + } else { + host = reescapeHostDelimiters(host, false); + } + } + uriTokens.push(host); + } + if (typeof component.port === "number" || typeof component.port === "string") { + uriTokens.push(":"); + uriTokens.push(String(component.port)); + } + return uriTokens.length ? uriTokens.join("") : void 0; + } + module3.exports = { + nonSimpleDomain, + recomposeAuthority, + reescapeHostDelimiters, + normalizePercentEncoding, + normalizePathEncoding, + escapePreservingEscapes, + removeDotSegments, + isIPv4, + isUUID, + normalizeIPv6, + stringArrayToHexStripped + }; } +}); - onResponseError (controller, err) { - if (this.#successful) { - return - } - - if (this.#callback) { - this.#callback(false) - this.#callback = null - } - - if (typeof this.#handler.onResponseError === 'function') { - this.#handler.onResponseError(controller, err) - } else { - throw err +// node_modules/fast-uri/lib/schemes.js +var require_schemes = __commonJS({ + "node_modules/fast-uri/lib/schemes.js"(exports, module3) { + "use strict"; + var { isUUID } = require_utils6(); + var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu; + var supportedSchemeNames = ( + /** @type {const} */ + [ + "http", + "https", + "ws", + "wss", + "urn", + "urn:uuid" + ] + ); + function isValidSchemeName(name) { + return supportedSchemeNames.indexOf( + /** @type {*} */ + name + ) !== -1; + } + function wsIsSecure(wsComponent) { + if (wsComponent.secure === true) { + return true; + } else if (wsComponent.secure === false) { + return false; + } else if (wsComponent.scheme) { + return wsComponent.scheme.length === 3 && (wsComponent.scheme[0] === "w" || wsComponent.scheme[0] === "W") && (wsComponent.scheme[1] === "s" || wsComponent.scheme[1] === "S") && (wsComponent.scheme[2] === "s" || wsComponent.scheme[2] === "S"); + } else { + return false; + } } - } -} - -module.exports = CacheRevalidationHandler - - -/***/ }), - -/***/ 4117: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(98061) -const WrapHandler = __nccwpck_require__(81330) - -/** - * @deprecated - */ -module.exports = class DecoratorHandler { - #handler - #onCompleteCalled = false - #onErrorCalled = false - #onResponseStartCalled = false - - constructor (handler) { - if (typeof handler !== 'object' || handler === null) { - throw new TypeError('handler must be an object') + function httpParse(component) { + if (!component.host) { + component.error = component.error || "HTTP URIs must have a host."; + } + return component; } - this.#handler = WrapHandler.wrap(handler) - } - - onRequestStart (...args) { - this.#handler.onRequestStart?.(...args) - } - - onRequestUpgrade (...args) { - assert(!this.#onCompleteCalled) - assert(!this.#onErrorCalled) - - return this.#handler.onRequestUpgrade?.(...args) - } - - onResponseStart (...args) { - assert(!this.#onCompleteCalled) - assert(!this.#onErrorCalled) - assert(!this.#onResponseStartCalled) - - this.#onResponseStartCalled = true - - return this.#handler.onResponseStart?.(...args) - } - - onResponseData (...args) { - assert(!this.#onCompleteCalled) - assert(!this.#onErrorCalled) - - return this.#handler.onResponseData?.(...args) - } - - onResponseEnd (...args) { - assert(!this.#onCompleteCalled) - assert(!this.#onErrorCalled) - - this.#onCompleteCalled = true - return this.#handler.onResponseEnd?.(...args) - } - - onResponseError (...args) { - this.#onErrorCalled = true - return this.#handler.onResponseError?.(...args) - } - - /** - * @deprecated - */ - onBodySent () {} -} - - -/***/ }), - -/***/ 782: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { RequestAbortedError } = __nccwpck_require__(48045) - -/** - * @typedef {import('../../types/dispatcher.d.ts').default.DispatchHandler} DispatchHandler - */ - -const DEFAULT_MAX_BUFFER_SIZE = 5 * 1024 * 1024 - -/** - * @typedef {Object} WaitingHandler - * @property {DispatchHandler} handler - * @property {import('../../types/dispatcher.d.ts').default.DispatchController} controller - * @property {Buffer[]} bufferedChunks - * @property {number} bufferedBytes - * @property {object | null} pendingTrailers - * @property {boolean} done - */ - -/** - * Handler that forwards response events to multiple waiting handlers. - * Used for request deduplication. - * - * @implements {DispatchHandler} - */ -class DeduplicationHandler { - /** - * @type {DispatchHandler} - */ - #primaryHandler - - /** - * @type {WaitingHandler[]} - */ - #waitingHandlers = [] - - /** - * @type {number} - */ - #maxBufferSize = DEFAULT_MAX_BUFFER_SIZE - - /** - * @type {number} - */ - #statusCode = 0 - - /** - * @type {Record} - */ - #headers = {} - - /** - * @type {string} - */ - #statusMessage = '' - - /** - * @type {boolean} - */ - #aborted = false - - /** - * @type {boolean} - */ - #responseStarted = false - - /** - * @type {boolean} - */ - #responseDataStarted = false - - /** - * @type {boolean} - */ - #completed = false - - /** - * @type {import('../../types/dispatcher.d.ts').default.DispatchController | null} - */ - #controller = null - - /** - * @type {(() => void) | null} - */ - #onComplete = null - - /** - * @param {DispatchHandler} primaryHandler The primary handler - * @param {() => void} onComplete Callback when request completes - * @param {number} [maxBufferSize] Maximum paused buffer size per waiting handler - */ - constructor (primaryHandler, onComplete, maxBufferSize = DEFAULT_MAX_BUFFER_SIZE) { - this.#primaryHandler = primaryHandler - this.#onComplete = onComplete - this.#maxBufferSize = maxBufferSize - } - - /** - * Add a waiting handler that will receive response events. - * Returns false if deduplication can no longer safely attach this handler. - * - * @param {DispatchHandler} handler - * @returns {boolean} - */ - addWaitingHandler (handler) { - if (this.#completed || this.#responseDataStarted) { - return false - } - - const waitingHandler = this.#createWaitingHandler(handler) - const waitingController = waitingHandler.controller - - try { - handler.onRequestStart?.(waitingController, null) - - if (waitingController.aborted) { - waitingHandler.done = true - return true + function httpSerialize(component) { + const secure = String(component.scheme).toLowerCase() === "https"; + if (component.port === (secure ? 443 : 80) || component.port === "") { + component.port = void 0; } - - if (this.#responseStarted) { - handler.onResponseStart?.( - waitingController, - this.#statusCode, - this.#headers, - this.#statusMessage - ) + if (!component.path) { + component.path = "/"; } - } catch { - // Ignore errors from waiting handlers - waitingHandler.done = true - return true + return component; } - - if (!waitingController.aborted) { - this.#waitingHandlers.push(waitingHandler) + function wsParse(wsComponent) { + wsComponent.secure = wsIsSecure(wsComponent); + wsComponent.resourceName = (wsComponent.path || "/") + (wsComponent.query ? "?" + wsComponent.query : ""); + wsComponent.path = void 0; + wsComponent.query = void 0; + return wsComponent; } - - return true - } - - /** - * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller - * @param {any} context - */ - onRequestStart (controller, context) { - this.#controller = controller - this.#primaryHandler.onRequestStart?.(controller, context) - } - - /** - * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller - * @param {number} statusCode - * @param {import('../../types/header.d.ts').IncomingHttpHeaders} headers - * @param {Socket} socket - */ - onRequestUpgrade (controller, statusCode, headers, socket) { - this.#primaryHandler.onRequestUpgrade?.(controller, statusCode, headers, socket) - } - - /** - * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller - * @param {number} statusCode - * @param {Record} headers - * @param {string} statusMessage - */ - onResponseStart (controller, statusCode, headers, statusMessage) { - this.#responseStarted = true - this.#statusCode = statusCode - this.#headers = headers - this.#statusMessage = statusMessage - - this.#primaryHandler.onResponseStart?.(controller, statusCode, headers, statusMessage) - - for (const waitingHandler of this.#waitingHandlers) { - const { handler, controller: waitingController } = waitingHandler - - if (waitingHandler.done || waitingController.aborted) { - waitingHandler.done = true - continue + function wsSerialize(wsComponent) { + if (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === "") { + wsComponent.port = void 0; } - - try { - handler.onResponseStart?.( - waitingController, - statusCode, - headers, - statusMessage - ) - } catch { - // Ignore errors from waiting handlers + if (typeof wsComponent.secure === "boolean") { + wsComponent.scheme = wsComponent.secure ? "wss" : "ws"; + wsComponent.secure = void 0; } - - if (waitingController.aborted) { - waitingHandler.done = true + if (wsComponent.resourceName) { + const [path13, query] = wsComponent.resourceName.split("?"); + wsComponent.path = path13 && path13 !== "/" ? path13 : void 0; + wsComponent.query = query; + wsComponent.resourceName = void 0; } + wsComponent.fragment = void 0; + return wsComponent; } - - this.#pruneDoneWaitingHandlers() - } - - /** - * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller - * @param {Buffer} chunk - */ - onResponseData (controller, chunk) { - if (this.#aborted || this.#completed) { - return - } - - this.#responseDataStarted = true - - this.#primaryHandler.onResponseData?.(controller, chunk) - - for (const waitingHandler of this.#waitingHandlers) { - const { handler, controller: waitingController } = waitingHandler - - if (waitingHandler.done || waitingController.aborted) { - waitingHandler.done = true - continue + function urnParse(urnComponent, options2) { + if (!urnComponent.path) { + urnComponent.error = "URN can not be parsed"; + return urnComponent; } - - if (waitingController.paused) { - this.#bufferWaitingChunk(waitingHandler, chunk) - continue + const matches = urnComponent.path.match(URN_REG); + if (matches) { + const scheme = options2.scheme || urnComponent.scheme || "urn"; + urnComponent.nid = matches[1].toLowerCase(); + urnComponent.nss = matches[2]; + const urnScheme = `${scheme}:${options2.nid || urnComponent.nid}`; + const schemeHandler = getSchemeHandler(urnScheme); + urnComponent.path = void 0; + if (schemeHandler) { + urnComponent = schemeHandler.parse(urnComponent, options2); + } + } else { + urnComponent.error = urnComponent.error || "URN can not be parsed."; + } + return urnComponent; + } + function urnSerialize(urnComponent, options2) { + if (urnComponent.nid === void 0) { + throw new Error("URN without nid cannot be serialized"); + } + const scheme = options2.scheme || urnComponent.scheme || "urn"; + const nid = urnComponent.nid.toLowerCase(); + const urnScheme = `${scheme}:${options2.nid || nid}`; + const schemeHandler = getSchemeHandler(urnScheme); + if (schemeHandler) { + urnComponent = schemeHandler.serialize(urnComponent, options2); + } + const uriComponent = urnComponent; + const nss = urnComponent.nss; + uriComponent.path = `${nid || options2.nid}:${nss}`; + options2.skipEscape = true; + return uriComponent; + } + function urnuuidParse(urnComponent, options2) { + const uuidComponent = urnComponent; + uuidComponent.uuid = uuidComponent.nss; + uuidComponent.nss = void 0; + if (!options2.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) { + uuidComponent.error = uuidComponent.error || "UUID is not valid."; + } + return uuidComponent; + } + function urnuuidSerialize(uuidComponent) { + const urnComponent = uuidComponent; + urnComponent.nss = (uuidComponent.uuid || "").toLowerCase(); + return urnComponent; + } + var http = ( + /** @type {SchemeHandler} */ + { + scheme: "http", + domainHost: true, + parse: httpParse, + serialize: httpSerialize + } + ); + var https = ( + /** @type {SchemeHandler} */ + { + scheme: "https", + domainHost: http.domainHost, + parse: httpParse, + serialize: httpSerialize + } + ); + var ws2 = ( + /** @type {SchemeHandler} */ + { + scheme: "ws", + domainHost: true, + parse: wsParse, + serialize: wsSerialize + } + ); + var wss = ( + /** @type {SchemeHandler} */ + { + scheme: "wss", + domainHost: ws2.domainHost, + parse: ws2.parse, + serialize: ws2.serialize + } + ); + var urn = ( + /** @type {SchemeHandler} */ + { + scheme: "urn", + parse: urnParse, + serialize: urnSerialize, + skipNormalize: true + } + ); + var urnuuid = ( + /** @type {SchemeHandler} */ + { + scheme: "urn:uuid", + parse: urnuuidParse, + serialize: urnuuidSerialize, + skipNormalize: true + } + ); + var SCHEMES = ( + /** @type {Record} */ + { + http, + https, + ws: ws2, + wss, + urn, + "urn:uuid": urnuuid } + ); + Object.setPrototypeOf(SCHEMES, null); + function getSchemeHandler(scheme) { + return scheme && (SCHEMES[ + /** @type {SchemeName} */ + scheme + ] || SCHEMES[ + /** @type {SchemeName} */ + scheme.toLowerCase() + ]) || void 0; + } + module3.exports = { + wsIsSecure, + SCHEMES, + isValidSchemeName, + getSchemeHandler + }; + } +}); - try { - handler.onResponseData?.(waitingController, chunk) - } catch { - // Ignore errors from waiting handlers +// node_modules/fast-uri/index.js +var require_fast_uri = __commonJS({ + "node_modules/fast-uri/index.js"(exports, module3) { + "use strict"; + var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils6(); + var { SCHEMES, getSchemeHandler } = require_schemes(); + function normalize(uri, options2) { + if (typeof uri === "string") { + uri = /** @type {T} */ + normalizeString(uri, options2); + } else if (typeof uri === "object") { + uri = /** @type {T} */ + parse(serialize(uri, options2), options2); + } + return uri; + } + function resolve8(baseURI, relativeURI, options2) { + const schemelessOptions = options2 ? Object.assign({ scheme: "null" }, options2) : { scheme: "null" }; + const resolved = resolveComponent(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true); + schemelessOptions.skipEscape = true; + return serialize(resolved, schemelessOptions); + } + function resolveComponent(base, relative5, options2, skipNormalization) { + const target = {}; + if (!skipNormalization) { + base = parse(serialize(base, options2), options2); + relative5 = parse(serialize(relative5, options2), options2); + } + options2 = options2 || {}; + if (!options2.tolerant && relative5.scheme) { + target.scheme = relative5.scheme; + target.userinfo = relative5.userinfo; + target.host = relative5.host; + target.port = relative5.port; + target.path = removeDotSegments(relative5.path || ""); + target.query = relative5.query; + } else { + if (relative5.userinfo !== void 0 || relative5.host !== void 0 || relative5.port !== void 0) { + target.userinfo = relative5.userinfo; + target.host = relative5.host; + target.port = relative5.port; + target.path = removeDotSegments(relative5.path || ""); + target.query = relative5.query; + } else { + if (!relative5.path) { + target.path = base.path; + if (relative5.query !== void 0) { + target.query = relative5.query; + } else { + target.query = base.query; + } + } else { + if (relative5.path[0] === "/") { + target.path = removeDotSegments(relative5.path); + } else { + if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) { + target.path = "/" + relative5.path; + } else if (!base.path) { + target.path = relative5.path; + } else { + target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative5.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative5.query; + } + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; + } + target.scheme = base.scheme; + } + target.fragment = relative5.fragment; + return target; + } + function equal(uriA, uriB, options2) { + const normalizedA = normalizeComparableURI(uriA, options2); + const normalizedB = normalizeComparableURI(uriB, options2); + return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase(); + } + function serialize(cmpts, opts) { + const component = { + host: cmpts.host, + scheme: cmpts.scheme, + userinfo: cmpts.userinfo, + port: cmpts.port, + path: cmpts.path, + query: cmpts.query, + nid: cmpts.nid, + nss: cmpts.nss, + uuid: cmpts.uuid, + fragment: cmpts.fragment, + reference: cmpts.reference, + resourceName: cmpts.resourceName, + secure: cmpts.secure, + error: "" + }; + const options2 = Object.assign({}, opts); + const uriTokens = []; + const schemeHandler = getSchemeHandler(options2.scheme || component.scheme); + if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options2); + if (component.path !== void 0) { + if (!options2.skipEscape) { + component.path = escapePreservingEscapes(component.path); + if (component.scheme !== void 0) { + component.path = component.path.split("%3A").join(":"); + } + } else { + component.path = normalizePercentEncoding(component.path); + } } - - if (waitingController.aborted) { - waitingHandler.done = true - waitingHandler.bufferedChunks = [] - waitingHandler.bufferedBytes = 0 + if (options2.reference !== "suffix" && component.scheme) { + uriTokens.push(component.scheme, ":"); } - } - - this.#pruneDoneWaitingHandlers() - } - - /** - * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller - * @param {object} trailers - */ - onResponseEnd (controller, trailers) { - if (this.#aborted || this.#completed) { - return - } - - this.#completed = true - this.#primaryHandler.onResponseEnd?.(controller, trailers) - - for (const waitingHandler of this.#waitingHandlers) { - if (waitingHandler.done || waitingHandler.controller.aborted) { - waitingHandler.done = true - continue + const authority = recomposeAuthority(component); + if (authority !== void 0) { + if (options2.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (component.path && component.path[0] !== "/") { + uriTokens.push("/"); + } } - - this.#flushWaitingHandler(waitingHandler) - - if (waitingHandler.done || waitingHandler.controller.aborted) { - waitingHandler.done = true - continue + if (component.path !== void 0) { + let s2 = component.path; + if (!options2.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s2 = removeDotSegments(s2); + } + if (authority === void 0 && s2[0] === "/" && s2[1] === "/") { + s2 = "/%2F" + s2.slice(2); + } + uriTokens.push(s2); } - - if (waitingHandler.controller.paused && waitingHandler.bufferedChunks.length > 0) { - waitingHandler.pendingTrailers = trailers - continue + if (component.query !== void 0) { + uriTokens.push("?", component.query); } - - try { - waitingHandler.handler.onResponseEnd?.(waitingHandler.controller, trailers) - } catch { - // Ignore errors from waiting handlers + if (component.fragment !== void 0) { + uriTokens.push("#", component.fragment); } - - waitingHandler.done = true - } - - this.#pruneDoneWaitingHandlers() - this.#onComplete?.() - } - - /** - * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller - * @param {Error} err - */ - onResponseError (controller, err) { - if (this.#completed) { - return - } - - this.#aborted = true - this.#completed = true - - this.#primaryHandler.onResponseError?.(controller, err) - - for (const waitingHandler of this.#waitingHandlers) { - this.#errorWaitingHandler(waitingHandler, err) - } - - this.#waitingHandlers = [] - this.#onComplete?.() - } - - /** - * @param {DispatchHandler} handler - * @returns {WaitingHandler} - */ - #createWaitingHandler (handler) { - /** @type {WaitingHandler} */ - const waitingHandler = { - handler, - controller: null, - bufferedChunks: [], - bufferedBytes: 0, - pendingTrailers: null, - done: false + return uriTokens.join(""); } - - const state = { - aborted: false, - paused: false, - reason: null + var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u; + function getParseError(parsed, matches) { + if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") { + return 'URI path must start with "/" when authority is present.'; + } + if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) { + return "URI port is malformed."; + } + return void 0; } - - waitingHandler.controller = { - resume: () => { - if (state.aborted) { - return + function parseWithStatus(uri, opts) { + const options2 = Object.assign({}, opts); + const parsed = { + scheme: void 0, + userinfo: void 0, + host: "", + port: void 0, + path: "", + query: void 0, + fragment: void 0 + }; + let malformedAuthorityOrPort = false; + let isIP = false; + if (options2.reference === "suffix") { + if (options2.scheme) { + uri = options2.scheme + ":" + uri; + } else { + uri = "//" + uri; } - - state.paused = false - this.#flushWaitingHandler(waitingHandler) - - if ( - this.#completed && - waitingHandler.pendingTrailers && - waitingHandler.bufferedChunks.length === 0 && - !state.paused && - !state.aborted - ) { - try { - waitingHandler.handler.onResponseEnd?.(waitingHandler.controller, waitingHandler.pendingTrailers) - } catch { - // Ignore errors from waiting handlers + } + const matches = uri.match(URI_PARSE); + if (matches) { + parsed.scheme = matches[1]; + parsed.userinfo = matches[3]; + parsed.host = matches[4]; + parsed.port = parseInt(matches[5], 10); + parsed.path = matches[6] || ""; + parsed.query = matches[7]; + parsed.fragment = matches[8]; + if (isNaN(parsed.port)) { + parsed.port = matches[5]; + } + const parseError = getParseError(parsed, matches); + if (parseError !== void 0) { + parsed.error = parsed.error || parseError; + malformedAuthorityOrPort = true; + } + if (parsed.host) { + const ipv4result = isIPv4(parsed.host); + if (ipv4result === false) { + const ipv6result = normalizeIPv6(parsed.host); + parsed.host = ipv6result.host.toLowerCase(); + isIP = ipv6result.isIPV6; + } else { + isIP = true; } - - waitingHandler.pendingTrailers = null - waitingHandler.done = true } - - this.#pruneDoneWaitingHandlers() - }, - pause: () => { - if (!state.aborted) { - state.paused = true + if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && parsed.query === void 0 && !parsed.path) { + parsed.reference = "same-document"; + } else if (parsed.scheme === void 0) { + parsed.reference = "relative"; + } else if (parsed.fragment === void 0) { + parsed.reference = "absolute"; + } else { + parsed.reference = "uri"; } - }, - get paused () { return state.paused }, - get aborted () { return state.aborted }, - get reason () { return state.reason }, - abort: (reason) => { - state.aborted = true - state.reason = reason ?? null - waitingHandler.done = true - waitingHandler.pendingTrailers = null - waitingHandler.bufferedChunks = [] - waitingHandler.bufferedBytes = 0 - } - } - - return waitingHandler - } - - /** - * @param {WaitingHandler} waitingHandler - * @param {Buffer} chunk - */ - #bufferWaitingChunk (waitingHandler, chunk) { - if (waitingHandler.done || waitingHandler.controller.aborted) { - waitingHandler.done = true - waitingHandler.bufferedChunks = [] - waitingHandler.bufferedBytes = 0 - return - } - - const bufferedChunk = Buffer.from(chunk) - waitingHandler.bufferedChunks.push(bufferedChunk) - waitingHandler.bufferedBytes += bufferedChunk.length - - if (waitingHandler.bufferedBytes > this.#maxBufferSize) { - const err = new RequestAbortedError(`Deduplicated waiting handler exceeded maxBufferSize (${this.#maxBufferSize} bytes) while paused`) - this.#errorWaitingHandler(waitingHandler, err) - } - } - - /** - * @param {WaitingHandler} waitingHandler - */ - #flushWaitingHandler (waitingHandler) { - const { handler, controller } = waitingHandler - - while ( - !waitingHandler.done && - !controller.aborted && - !controller.paused && - waitingHandler.bufferedChunks.length > 0 - ) { - const bufferedChunk = waitingHandler.bufferedChunks.shift() - waitingHandler.bufferedBytes -= bufferedChunk.length - - try { - handler.onResponseData?.(controller, bufferedChunk) - } catch { - // Ignore errors from waiting handlers - } - - if (controller.aborted) { - waitingHandler.done = true - waitingHandler.pendingTrailers = null - waitingHandler.bufferedChunks = [] - waitingHandler.bufferedBytes = 0 - break + if (options2.reference && options2.reference !== "suffix" && options2.reference !== parsed.reference) { + parsed.error = parsed.error || "URI is not a " + options2.reference + " reference."; + } + const schemeHandler = getSchemeHandler(options2.scheme || parsed.scheme); + if (!options2.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + if (parsed.host && (options2.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) { + try { + parsed.host = URL.domainToASCII(parsed.host.toLowerCase()); + } catch (e2) { + parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e2; + } + } + } + if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) { + if (uri.indexOf("%") !== -1) { + if (parsed.scheme !== void 0) { + parsed.scheme = unescape(parsed.scheme); + } + if (parsed.host !== void 0) { + parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP); + } + } + if (parsed.path) { + parsed.path = normalizePathEncoding(parsed.path); + } + if (parsed.fragment) { + try { + parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment)); + } catch { + parsed.error = parsed.error || "URI malformed"; + } + } + } + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(parsed, options2); + } + } else { + parsed.error = parsed.error || "URI can not be parsed."; } + return { parsed, malformedAuthorityOrPort }; } - } - - /** - * @param {WaitingHandler} waitingHandler - * @param {Error} err - */ - #errorWaitingHandler (waitingHandler, err) { - if (waitingHandler.done) { - return + function parse(uri, opts) { + return parseWithStatus(uri, opts).parsed; } - - waitingHandler.done = true - waitingHandler.pendingTrailers = null - waitingHandler.bufferedChunks = [] - waitingHandler.bufferedBytes = 0 - - try { - waitingHandler.controller.abort(err) - waitingHandler.handler.onResponseError?.(waitingHandler.controller, err) - } catch { - // Ignore errors from waiting handlers + function normalizeString(uri, opts) { + return normalizeStringWithStatus(uri, opts).normalized; } + function normalizeStringWithStatus(uri, opts) { + const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts); + return { + normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts), + malformedAuthorityOrPort + }; + } + function normalizeComparableURI(uri, opts) { + if (typeof uri === "string") { + const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts); + return malformedAuthorityOrPort ? void 0 : normalized; + } + if (typeof uri === "object") { + return serialize(uri, opts); + } + } + var fastUri = { + SCHEMES, + normalize, + resolve: resolve8, + resolveComponent, + equal, + serialize, + parse + }; + module3.exports = fastUri; + module3.exports.default = fastUri; + module3.exports.fastUri = fastUri; } +}); - #pruneDoneWaitingHandlers () { - this.#waitingHandlers = this.#waitingHandlers.filter(waitingHandler => waitingHandler.done === false) - } -} - -module.exports = DeduplicationHandler - - -/***/ }), - -/***/ 30649: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const util = __nccwpck_require__(83983) -const { kBodyUsed } = __nccwpck_require__(72785) -const assert = __nccwpck_require__(98061) -const { InvalidArgumentError } = __nccwpck_require__(48045) -const EE = __nccwpck_require__(15673) - -const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] - -const kBody = Symbol('body') - -const noop = () => {} - -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 { - static buildDispatch (dispatcher, maxRedirections) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - const dispatch = dispatcher.dispatch.bind(dispatcher) - return (opts, originalHandler) => dispatch(opts, new RedirectHandler(dispatch, maxRedirections, opts, originalHandler)) +// node_modules/@redocly/ajv/dist/runtime/uri.js +var require_uri = __commonJS({ + "node_modules/@redocly/ajv/dist/runtime/uri.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var uri = require_fast_uri(); + uri.code = 'require("ajv/dist/runtime/uri").default'; + exports.default = uri; } +}); - constructor (dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') +// node_modules/@redocly/ajv/dist/core.js +var require_core2 = __commonJS({ + "node_modules/@redocly/ajv/dist/core.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0; + var validate_1 = require_validate(); + Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen(); + Object.defineProperty(exports, "_", { enumerable: true, get: function() { + return codegen_1._; + } }); + Object.defineProperty(exports, "str", { enumerable: true, get: function() { + return codegen_1.str; + } }); + Object.defineProperty(exports, "stringify", { enumerable: true, get: function() { + return codegen_1.stringify; + } }); + Object.defineProperty(exports, "nil", { enumerable: true, get: function() { + return codegen_1.nil; + } }); + Object.defineProperty(exports, "Name", { enumerable: true, get: function() { + return codegen_1.Name; + } }); + Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() { + return codegen_1.CodeGen; + } }); + var validation_error_1 = require_validation_error(); + var ref_error_1 = require_ref_error(); + var rules_1 = require_rules(); + var compile_1 = require_compile(); + var codegen_2 = require_codegen(); + var resolve_1 = require_resolve(); + var dataType_1 = require_dataType(); + var util_1 = require_util7(); + var $dataRefSchema = require_data(); + var uri_1 = require_uri(); + var defaultRegExp = (str2, flags) => new RegExp(str2, flags); + defaultRegExp.code = "new RegExp"; + var META_IGNORE_OPTIONS = [ + "removeAdditional", + "useDefaults", + "coerceTypes", + "defaultUnevaluatedProperties", + "defaultAdditionalProperties" + ]; + var EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([ + "validate", + "serialize", + "parse", + "wrapper", + "root", + "schema", + "keyword", + "pattern", + "formats", + "validate$data", + "func", + "obj", + "Error" + ]); + var removedOptions = { + errorDataPath: "", + format: "`validateFormats: false` can be used instead.", + nullable: '"nullable" keyword is supported by default.', + jsonPointers: "Deprecated jsPropertySyntax can be used instead.", + extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.", + missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.", + processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`", + sourceCode: "Use option `code: {source: true}`", + strictDefaults: "It is default now, see option `strict`.", + strictKeywords: "It is default now, see option `strict`.", + uniqueItems: '"uniqueItems" keyword is always validated.', + unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).", + cache: "Map is used as cache, schema object as key.", + serialize: "Map is used as cache, schema object as key.", + ajvErrors: "It is default now." + }; + var deprecatedOptions = { + ignoreKeywordsWithRef: "", + jsPropertySyntax: "", + unicode: '"minLength"/"maxLength" account for unicode characters by default.' + }; + var MAX_EXPRESSION = 200; + function requiredOptions(o) { + var _a, _b, _c, _d, _e3, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r2, _s2, _t3, _u, _v, _w, _x, _y, _z, _0; + const s2 = o.strict; + const _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize; + const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0; + const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp; + const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default; + return { + strictSchema: (_f = (_e3 = o.strictSchema) !== null && _e3 !== void 0 ? _e3 : s2) !== null && _f !== void 0 ? _f : true, + strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s2) !== null && _h !== void 0 ? _h : true, + strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s2) !== null && _k !== void 0 ? _k : "log", + strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s2) !== null && _m !== void 0 ? _m : "log", + strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s2) !== null && _p !== void 0 ? _p : false, + code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp }, + loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION, + loopEnum: (_r2 = o.loopEnum) !== null && _r2 !== void 0 ? _r2 : MAX_EXPRESSION, + meta: (_s2 = o.meta) !== null && _s2 !== void 0 ? _s2 : true, + messages: (_t3 = o.messages) !== null && _t3 !== void 0 ? _t3 : true, + inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true, + schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : "$id", + addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true, + validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true, + validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true, + unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true, + int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true, + uriResolver + }; } - - this.dispatch = dispatch - this.location = null - const { maxRedirections: _, ...cleanOpts } = opts - this.opts = cleanOpts // opts must be a copy, exclude maxRedirections - this.maxRedirections = maxRedirections - this.handler = handler - this.history = [] - - 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 - }) + var Ajv2 = class { + constructor(opts = {}) { + this.schemas = {}; + this.refs = {}; + this.formats = {}; + this._compilations = /* @__PURE__ */ new Set(); + this._loading = {}; + this._cache = /* @__PURE__ */ new Map(); + opts = this.opts = { ...opts, ...requiredOptions(opts) }; + const { es5, lines } = this.opts.code; + this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines }); + this.logger = getLogger(opts.logger); + const formatOpt = opts.validateFormats; + opts.validateFormats = false; + this.RULES = (0, rules_1.getRules)(); + checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED"); + checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn"); + this._metaOpts = getMetaSchemaOptions.call(this); + if (opts.formats) + addInitialFormats.call(this); + this._addVocabularies(); + this._addDefaultMetaSchema(); + if (opts.keywords) + addInitialKeywords.call(this, opts.keywords); + if (typeof opts.meta == "object") + this.addMetaSchema(opts.meta); + addInitialSchemas.call(this); + opts.validateFormats = formatOpt; } - } 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) && - !util.isFormDataLike(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) - } - } - - onRequestStart (controller, context) { - this.handler.onRequestStart?.(controller, { ...context, history: this.history }) - } - - onRequestUpgrade (controller, statusCode, headers, socket) { - this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket) - } - - onResponseStart (controller, statusCode, headers, statusMessage) { - if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { - throw new Error('max redirects') - } - - // https://tools.ietf.org/html/rfc7231#section-6.4.2 - // https://fetch.spec.whatwg.org/#http-redirect-fetch - // In case of HTTP 301 or 302 with POST, change the method to GET - if ((statusCode === 301 || statusCode === 302) && this.opts.method === 'POST') { - this.opts.method = 'GET' - if (util.isStream(this.opts.body)) { - util.destroy(this.opts.body.on('error', noop)) + _addVocabularies() { + this.addKeyword("$async"); } - this.opts.body = 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' - if (util.isStream(this.opts.body)) { - util.destroy(this.opts.body.on('error', noop)) + _addDefaultMetaSchema() { + const { $data, meta, schemaId } = this.opts; + let _dataRefSchema = $dataRefSchema; + if (schemaId === "id") { + _dataRefSchema = { ...$dataRefSchema }; + _dataRefSchema.id = _dataRefSchema.$id; + delete _dataRefSchema.$id; + } + if (meta && $data) + this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false); } - this.opts.body = null - } - - this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) || redirectableStatusCodes.indexOf(statusCode) === -1 - ? null - : headers.location - - if (this.opts.origin) { - this.history.push(new URL(this.opts.path, this.opts.origin)) - } - - if (!this.location) { - this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage) - return - } - - 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 - - // Check for redirect loops by seeing if we've already visited this URL in our history - // This catches the case where Client/Pool try to handle cross-origin redirects but fail - // and keep redirecting to the same URL in an infinite loop - const redirectUrlString = `${origin}${path}` - for (const historyUrl of this.history) { - if (historyUrl.toString() === redirectUrlString) { - throw new InvalidArgumentError(`Redirect loop detected. Cannot redirect to ${origin}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`) + defaultMeta() { + const { meta, schemaId } = this.opts; + return this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : void 0; + } + // Set the defaultUnevaluatedProperties option. + // WARNING: This only affects schemas compiled AFTER this method is called. + // Already-compiled schemas in the cache will NOT be affected. + // Consider clearing the cache or creating a new Ajv instance if you need + // different behavior for the same schemas. + setDefaultUnevaluatedProperties(value) { + this.opts.defaultUnevaluatedProperties = value; + } + validate(schemaKeyRef, data) { + let v3; + if (typeof schemaKeyRef == "string") { + v3 = this.getSchema(schemaKeyRef); + if (!v3) + throw new Error(`no schema with key or ref "${schemaKeyRef}"`); + } else { + v3 = this.compile(schemaKeyRef); + } + const valid = v3(data); + if (!("$async" in v3)) + this.errors = v3.errors; + return valid; } - } - - // 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.query = null - } - - onResponseData (controller, 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 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 { - this.handler.onResponseData?.(controller, chunk) - } - } - - onResponseEnd (controller, 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.dispatch(this.opts, this) - } else { - this.handler.onResponseEnd(controller, trailers) - } - } - - onResponseError (controller, error) { - this.handler.onResponseError?.(controller, error) - } -} - -// 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]) + compile(schema2, _meta) { + const sch = this._addSchema(schema2, _meta); + return sch.validate || this._compileSchemaEnv(sch); } - } - } else if (headers && typeof headers === 'object') { - const entries = util.hasSafeIterator(headers) ? headers : Object.entries(headers) - - for (const [key, value] of entries) { - if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { - ret.push(key, value) + compileAsync(schema2, meta) { + if (typeof this.opts.loadSchema != "function") { + throw new Error("options.loadSchema should be a function"); + } + const { loadSchema } = this.opts; + return runCompileAsync.call(this, schema2, meta); + async function runCompileAsync(_schema, _meta) { + await loadMetaSchema.call(this, _schema.$schema); + const sch = this._addSchema(_schema, _meta); + return sch.validate || _compileAsync.call(this, sch); + } + async function loadMetaSchema($ref) { + if ($ref && !this.getSchema($ref)) { + await runCompileAsync.call(this, { $ref }, true); + } + } + async function _compileAsync(sch) { + try { + return this._compileSchemaEnv(sch); + } catch (e2) { + if (!(e2 instanceof ref_error_1.default)) + throw e2; + checkLoaded.call(this, e2); + await loadMissingSchema.call(this, e2.missingSchema); + return _compileAsync.call(this, sch); + } + } + function checkLoaded({ missingSchema: ref, missingRef }) { + if (this.refs[ref]) { + throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`); + } + } + async function loadMissingSchema(ref) { + const _schema = await _loadSchema.call(this, ref); + if (!this.refs[ref]) + await loadMetaSchema.call(this, _schema.$schema); + if (!this.refs[ref]) + this.addSchema(_schema, ref, meta); + } + async function _loadSchema(ref) { + const p2 = this._loading[ref]; + if (p2) + return p2; + try { + return await (this._loading[ref] = loadSchema(ref)); + } finally { + delete this._loading[ref]; + } + } } - } - } else { - assert(headers == null, 'headers must be an object or an array') - } - return ret -} - -module.exports = RedirectHandler - - -/***/ }), - -/***/ 86242: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const assert = __nccwpck_require__(98061) - -const { kRetryHandlerDefaultRetry } = __nccwpck_require__(72785) -const { RequestRetryError } = __nccwpck_require__(48045) -const WrapHandler = __nccwpck_require__(81330) -const { - isDisturbed, - parseRangeHeader, - wrapRequestBody -} = __nccwpck_require__(83983) - -function calculateRetryAfterHeader (retryAfter) { - const retryTime = new Date(retryAfter).getTime() - return isNaN(retryTime) ? 0 : retryTime - Date.now() -} - -class RetryHandler { - constructor (opts, { dispatch, handler }) { - const { retryOptions, ...dispatchOpts } = opts - const { - // Retry scoped - retry: retryFn, - maxRetries, - maxTimeout, - minTimeout, - timeoutFactor, - // Response scoped - methods, - errorCodes, - retryAfter, - statusCodes, - throwOnError - } = retryOptions ?? {} - - this.error = null - this.dispatch = dispatch - this.handler = WrapHandler.wrap(handler) - this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) } - this.retryOpts = { - throwOnError: throwOnError ?? true, - 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.headersSent = false - this.start = 0 - this.end = null - this.etag = null - } - - onResponseStartWithRetry (controller, statusCode, headers, statusMessage, err) { - if (this.retryOpts.throwOnError) { - // Preserve old behavior for status codes that are not eligible for retry - if (this.retryOpts.statusCodes.includes(statusCode) === false) { - this.headersSent = true - this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage) - } else { - this.error = err + // Adds schema to the instance + addSchema(schema2, key, _meta, _validateSchema = this.opts.validateSchema) { + if (Array.isArray(schema2)) { + for (const sch of schema2) + this.addSchema(sch, void 0, _meta, _validateSchema); + return this; + } + let id; + if (typeof schema2 === "object") { + const { schemaId } = this.opts; + id = schema2[schemaId]; + if (id !== void 0 && typeof id != "string") { + throw new Error(`schema ${schemaId} must be string`); + } + } + key = (0, resolve_1.normalizeId)(key || id); + this._checkUnique(key); + this.schemas[key] = this._addSchema(schema2, _meta, key, _validateSchema, true); + return this; } - - return - } - - if (isDisturbed(this.opts.body)) { - this.headersSent = true - this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage) - return - } - - function shouldRetry (passedErr) { - if (passedErr) { - this.headersSent = true - this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage) - controller.resume() - return + // Add schema that will be used to validate other schemas + // options in META_IGNORE_OPTIONS are alway set to false + addMetaSchema(schema2, key, _validateSchema = this.opts.validateSchema) { + this.addSchema(schema2, key, true, _validateSchema); + return this; } - - this.error = err - controller.resume() - } - - controller.pause() - this.retryOpts.retry( - err, - { - state: { counter: this.retryCount }, - opts: { retryOptions: this.retryOpts, ...this.opts } - }, - shouldRetry.bind(this) - ) - } - - onRequestStart (controller, context) { - if (!this.headersSent) { - this.handler.onRequestStart?.(controller, context) - } - } - - onRequestUpgrade (controller, statusCode, headers, socket) { - this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket) - } - - 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(headers['retry-after']) - : 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) - } - - onResponseStart (controller, statusCode, headers, statusMessage) { - this.error = null - this.retryCount += 1 - - if (statusCode >= 300) { - const err = new RequestRetryError('Request failed', statusCode, { - headers, - data: { - count: this.retryCount + // Validate schema against its meta-schema + validateSchema(schema2, throwOrLogError) { + if (typeof schema2 == "boolean") + return true; + let $schema; + $schema = schema2.$schema; + if ($schema !== void 0 && typeof $schema != "string") { + throw new Error("$schema must be a string"); } - }) - - this.onResponseStartWithRetry(controller, statusCode, headers, statusMessage, err) - return - } - - // Checkpoint for resume from where we left it - if (this.headersSent) { - // Only Partial Content 206 supposed to provide Content-Range, - // any other status code that partially consumed the payload - // should not be retried because it would result in downstream - // wrongly concatenate multiple responses. - if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { - throw new RequestRetryError('server does not support the range header and the payload was partially consumed', statusCode, { - headers, - data: { count: this.retryCount } - }) + $schema = $schema || this.opts.defaultMeta || this.defaultMeta(); + if (!$schema) { + this.logger.warn("meta-schema not available"); + this.errors = null; + return true; + } + const valid = this.validate($schema, schema2); + if (!valid && throwOrLogError) { + const message = "schema is invalid: " + this.errorsText(); + if (this.opts.validateSchema === "log") + this.logger.error(message); + else + throw new Error(message); + } + return valid; } - - const contentRange = parseRangeHeader(headers['content-range']) - // If no content range - if (!contentRange) { - // We always throw here as we want to indicate that we entred unexpected path - throw new RequestRetryError('Content-Range mismatch', statusCode, { - headers, - data: { count: this.retryCount } - }) + // Get compiled schema by `key` or `ref`. + // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id) + getSchema(keyRef) { + let sch; + while (typeof (sch = getSchEnv.call(this, keyRef)) == "string") + keyRef = sch; + if (sch === void 0) { + const { schemaId } = this.opts; + const root = new compile_1.SchemaEnv({ schema: {}, schemaId }); + sch = compile_1.resolveSchema.call(this, root, keyRef); + if (!sch) + return; + this.refs[keyRef] = sch; + } + return sch.validate || this._compileSchemaEnv(sch); } - - // Let's start with a weak etag check - if (this.etag != null && this.etag !== headers.etag) { - // We always throw here as we want to indicate that we entred unexpected path - throw new RequestRetryError('ETag mismatch', statusCode, { - headers, - data: { count: this.retryCount } - }) + // Remove cached schema(s). + // If no parameter is passed all schemas but meta-schemas are removed. + // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. + // Even if schema is referenced by other schemas it still can be removed as other schemas have local references. + removeSchema(schemaKeyRef) { + if (schemaKeyRef instanceof RegExp) { + this._removeAllSchemas(this.schemas, schemaKeyRef); + this._removeAllSchemas(this.refs, schemaKeyRef); + return this; + } + switch (typeof schemaKeyRef) { + case "undefined": + this._removeAllSchemas(this.schemas); + this._removeAllSchemas(this.refs); + this._cache.clear(); + return this; + case "string": { + const sch = getSchEnv.call(this, schemaKeyRef); + if (typeof sch == "object") + this._cache.delete(sch.schema); + delete this.schemas[schemaKeyRef]; + delete this.refs[schemaKeyRef]; + return this; + } + case "object": { + const cacheKey = schemaKeyRef; + this._cache.delete(cacheKey); + let id = schemaKeyRef[this.opts.schemaId]; + if (id) { + id = (0, resolve_1.normalizeId)(id); + delete this.schemas[id]; + delete this.refs[id]; + } + return this; + } + default: + throw new Error("ajv.removeSchema: invalid parameter"); + } } - - const { start, size, end = size ? size - 1 : null } = contentRange - - assert(this.start === start, 'content-range mismatch') - assert(this.end == null || this.end === end, 'content-range mismatch') - - return - } - - if (this.end == null) { - if (statusCode === 206) { - // First time we receive 206 - const range = parseRangeHeader(headers['content-range']) - - if (range == null) { - this.headersSent = true - this.handler.onResponseStart?.( - controller, - statusCode, - headers, - statusMessage - ) - return + // add "vocabulary" - a collection of keywords + addVocabulary(definitions) { + for (const def of definitions) + this.addKeyword(def); + return this; + } + addKeyword(kwdOrDef, def) { + let keyword; + if (typeof kwdOrDef == "string") { + keyword = kwdOrDef; + if (typeof def == "object") { + this.logger.warn("these parameters are deprecated, see docs for addKeyword"); + def.keyword = keyword; + } + } else if (typeof kwdOrDef == "object" && def === void 0) { + def = kwdOrDef; + keyword = def.keyword; + if (Array.isArray(keyword) && !keyword.length) { + throw new Error("addKeywords: keyword must be string or non-empty array"); + } + } else { + throw new Error("invalid addKeywords parameters"); } - - const { start, size, end = size ? size - 1 : null } = 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 + checkKeyword.call(this, keyword, def); + if (!def) { + (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd)); + return this; + } + keywordMetaschema.call(this, def); + const definition = { + ...def, + type: (0, dataType_1.getJSONTypes)(def.type), + schemaType: (0, dataType_1.getJSONTypes)(def.schemaType) + }; + (0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k3) => addRule.call(this, k3, definition) : (k3) => definition.type.forEach((t2) => addRule.call(this, k3, definition, t2))); + return this; } - - // 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 + getKeyword(keyword) { + const rule = this.RULES.all[keyword]; + return typeof rule == "object" ? rule.definition : !!rule; } - - assert(Number.isFinite(this.start)) - assert( - this.end == null || Number.isFinite(this.end), - 'invalid content-length' - ) - - this.resume = true - 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[0] === 'W' && - this.etag[1] === '/' - ) { - this.etag = null + // Remove keyword + removeKeyword(keyword) { + const { RULES } = this; + delete RULES.keywords[keyword]; + delete RULES.all[keyword]; + for (const group of RULES.rules) { + const i2 = group.rules.findIndex((rule) => rule.keyword === keyword); + if (i2 >= 0) + group.rules.splice(i2, 1); + } + return this; } - - this.headersSent = true - this.handler.onResponseStart?.( - controller, - statusCode, - headers, - statusMessage - ) - } else { - throw new RequestRetryError('Request failed', statusCode, { - headers, - data: { count: this.retryCount } - }) - } - } - - onResponseData (controller, chunk) { - if (this.error) { - return - } - - this.start += chunk.length - - this.handler.onResponseData?.(controller, chunk) - } - - onResponseEnd (controller, trailers) { - if (this.error && this.retryOpts.throwOnError) { - throw this.error - } - - if (!this.error) { - this.retryCount = 0 - return this.handler.onResponseEnd?.(controller, trailers) - } - - this.retry(controller) - } - - retry (controller) { - 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 + // Add format + addFormat(name, format) { + if (typeof format == "string") + format = new RegExp(format); + this.formats[name] = format; + return this; } - - this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - ...headers + errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) { + if (!errors || errors.length === 0) + return "No errors"; + return errors.map((e2) => `${dataVar}${e2.instancePath} ${e2.message}`).reduce((text, msg) => text + separator + msg); + } + $dataMetaSchema(metaSchema, keywordsJsonPointers) { + const rules8 = this.RULES.all; + metaSchema = JSON.parse(JSON.stringify(metaSchema)); + for (const jsonPointer of keywordsJsonPointers) { + const segments = jsonPointer.split("/").slice(1); + let keywords = metaSchema; + for (const seg of segments) + keywords = keywords[seg]; + for (const key in rules8) { + const rule = rules8[key]; + if (typeof rule != "object") + continue; + const { $data } = rule.definition; + const schema2 = keywords[key]; + if ($data && schema2) + keywords[key] = schemaOrData(schema2); + } } + return metaSchema; } - } - - try { - this.retryCountCheckpoint = this.retryCount - this.dispatch(this.opts, this) - } catch (err) { - this.handler.onResponseError?.(controller, err) - } - } - - onResponseError (controller, err) { - if (controller?.aborted || isDisturbed(this.opts.body)) { - this.handler.onResponseError?.(controller, err) - return - } - - function shouldRetry (returnedErr) { - if (!returnedErr) { - this.retry(controller) - return + _removeAllSchemas(schemas, regex) { + for (const keyRef in schemas) { + const sch = schemas[keyRef]; + if (!regex || regex.test(keyRef)) { + if (typeof sch == "string") { + delete schemas[keyRef]; + } else if (sch && !sch.meta) { + this._cache.delete(sch.schema); + delete schemas[keyRef]; + } + } + } + } + _addSchema(schema2, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) { + let id; + const { schemaId } = this.opts; + if (typeof schema2 == "object") { + id = schema2[schemaId]; + } else { + if (this.opts.jtd) + throw new Error("schema must be object"); + else if (typeof schema2 != "boolean") + throw new Error("schema must be object or boolean"); + } + let sch = this._cache.get(schema2); + if (sch !== void 0) + return sch; + baseId = (0, resolve_1.normalizeId)(id || baseId); + const localRefs = resolve_1.getSchemaRefs.call(this, schema2, baseId); + sch = new compile_1.SchemaEnv({ schema: schema2, schemaId, meta, baseId, localRefs }); + this._cache.set(sch.schema, sch); + if (addSchema && !baseId.startsWith("#")) { + if (baseId) + this._checkUnique(baseId); + this.refs[baseId] = sch; + } + if (validateSchema) + this.validateSchema(schema2, true); + return sch; + } + _checkUnique(id) { + if (this.schemas[id] || this.refs[id]) { + throw new Error(`schema with key or id "${id}" already exists`); + } + } + _compileSchemaEnv(sch) { + if (sch.meta) + this._compileMetaSchema(sch); + else + compile_1.compileSchema.call(this, sch); + if (!sch.validate) + throw new Error("ajv implementation error"); + return sch.validate; + } + _compileMetaSchema(sch) { + const currentOpts = this.opts; + this.opts = this._metaOpts; + try { + compile_1.compileSchema.call(this, sch); + } finally { + this.opts = currentOpts; + } + } + }; + Ajv2.ValidationError = validation_error_1.default; + Ajv2.MissingRefError = ref_error_1.default; + exports.default = Ajv2; + function checkOptions(checkOpts, options2, msg, log = "error") { + for (const key in checkOpts) { + const opt = key; + if (opt in options2) + this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`); } - - this.handler?.onResponseError?.(controller, returnedErr) - } - - // 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 } - }, - shouldRetry.bind(this) - ) - } -} - -module.exports = RetryHandler - - -/***/ }), - -/***/ 9960: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { parseHeaders } = __nccwpck_require__(83983) -const { InvalidArgumentError } = __nccwpck_require__(48045) - -const kResume = Symbol('resume') - -class UnwrapController { - #paused = false - #reason = null - #aborted = false - #abort - - [kResume] = null - - constructor (abort) { - this.#abort = abort - } - - pause () { - this.#paused = true - } - - resume () { - if (this.#paused) { - this.#paused = false - this[kResume]?.() - } - } - - abort (reason) { - if (!this.#aborted) { - this.#aborted = true - this.#reason = reason - this.#abort(reason) - } - } - - get aborted () { - return this.#aborted - } - - get reason () { - return this.#reason - } - - get paused () { - return this.#paused - } -} - -module.exports = class UnwrapHandler { - #handler - #controller - - constructor (handler) { - this.#handler = handler - } - - static unwrap (handler) { - // TODO (fix): More checks... - return !handler.onRequestStart ? handler : new UnwrapHandler(handler) - } - - onConnect (abort, context) { - this.#controller = new UnwrapController(abort) - this.#handler.onRequestStart?.(this.#controller, context) - } - - onResponseStarted () { - return this.#handler.onResponseStarted?.() - } - - onUpgrade (statusCode, rawHeaders, socket) { - this.#handler.onRequestUpgrade?.(this.#controller, statusCode, parseHeaders(rawHeaders), socket) - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - this.#controller[kResume] = resume - this.#handler.onResponseStart?.(this.#controller, statusCode, parseHeaders(rawHeaders), statusMessage) - return !this.#controller.paused - } - - onData (data) { - this.#handler.onResponseData?.(this.#controller, data) - return !this.#controller.paused - } - - onComplete (rawTrailers) { - this.#handler.onResponseEnd?.(this.#controller, parseHeaders(rawTrailers)) - } - - onError (err) { - if (!this.#handler.onResponseError) { - throw new InvalidArgumentError('invalid onError method') - } - - this.#handler.onResponseError?.(this.#controller, err) - } -} - - -/***/ }), - -/***/ 81330: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { InvalidArgumentError } = __nccwpck_require__(48045) - -module.exports = class WrapHandler { - #handler - - constructor (handler) { - this.#handler = handler - } - - static wrap (handler) { - // TODO (fix): More checks... - return handler.onRequestStart ? handler : new WrapHandler(handler) - } - - // Unwrap Interface - - onConnect (abort, context) { - return this.#handler.onConnect?.(abort, context) - } - - onResponseStarted () { - return this.#handler.onResponseStarted?.() - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - return this.#handler.onHeaders?.(statusCode, rawHeaders, resume, statusMessage) - } - - onUpgrade (statusCode, rawHeaders, socket) { - return this.#handler.onUpgrade?.(statusCode, rawHeaders, socket) - } - - onData (data) { - return this.#handler.onData?.(data) - } - - onComplete (trailers) { - return this.#handler.onComplete?.(trailers) - } - - onError (err) { - if (!this.#handler.onError) { - throw err } - - return this.#handler.onError?.(err) - } - - // Wrap Interface - - onRequestStart (controller, context) { - this.#handler.onConnect?.((reason) => controller.abort(reason), context) - } - - onRequestUpgrade (controller, statusCode, headers, socket) { - const rawHeaders = [] - for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val)) + function getSchEnv(keyRef) { + keyRef = (0, resolve_1.normalizeId)(keyRef); + return this.schemas[keyRef] || this.refs[keyRef]; } - - this.#handler.onUpgrade?.(statusCode, rawHeaders, socket) - } - - onResponseStart (controller, statusCode, headers, statusMessage) { - const rawHeaders = [] - for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val)) + function addInitialSchemas() { + const optsSchemas = this.opts.schemas; + if (!optsSchemas) + return; + if (Array.isArray(optsSchemas)) + this.addSchema(optsSchemas); + else + for (const key in optsSchemas) + this.addSchema(optsSchemas[key], key); } - - if (this.#handler.onHeaders?.(statusCode, rawHeaders, () => controller.resume(), statusMessage) === false) { - controller.pause() + function addInitialFormats() { + for (const name in this.opts.formats) { + const format = this.opts.formats[name]; + if (format) + this.addFormat(name, format); + } } - } - - onResponseData (controller, data) { - if (this.#handler.onData?.(data) === false) { - controller.pause() + function addInitialKeywords(defs) { + if (Array.isArray(defs)) { + this.addVocabulary(defs); + return; + } + this.logger.warn("keywords option as map is deprecated, pass array"); + for (const keyword in defs) { + const def = defs[keyword]; + if (!def.keyword) + def.keyword = keyword; + this.addKeyword(def); + } } - } - - onResponseEnd (controller, trailers) { - const rawTrailers = [] - for (const [key, val] of Object.entries(trailers)) { - rawTrailers.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val)) + function getMetaSchemaOptions() { + const metaOpts = { ...this.opts }; + for (const opt of META_IGNORE_OPTIONS) + delete metaOpts[opt]; + return metaOpts; + } + var noLogs = { log() { + }, warn() { + }, error() { + } }; + function getLogger(logger2) { + if (logger2 === false) + return noLogs; + if (logger2 === void 0) + return console; + if (logger2.log && logger2.warn && logger2.error) + return logger2; + throw new Error("logger must implement log, warn and error methods"); + } + var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i; + function checkKeyword(keyword, def) { + const { RULES } = this; + (0, util_1.eachItem)(keyword, (kwd) => { + if (RULES.keywords[kwd]) + throw new Error(`Keyword ${kwd} is already defined`); + if (!KEYWORD_NAME.test(kwd)) + throw new Error(`Keyword ${kwd} has invalid name`); + }); + if (!def) + return; + if (def.$data && !("code" in def || "validate" in def)) { + throw new Error('$data keyword must have "code" or "validate" function'); + } } - - this.#handler.onComplete?.(rawTrailers) - } - - onResponseError (controller, err) { - if (!this.#handler.onError) { - throw new InvalidArgumentError('invalid onError method') + function addRule(keyword, definition, dataType) { + var _a; + const post = definition === null || definition === void 0 ? void 0 : definition.post; + if (dataType && post) + throw new Error('keyword with "post" flag cannot have "type"'); + const { RULES } = this; + let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t2 }) => t2 === dataType); + if (!ruleGroup) { + ruleGroup = { type: dataType, rules: [] }; + RULES.rules.push(ruleGroup); + } + RULES.keywords[keyword] = true; + if (!definition) + return; + const rule = { + keyword, + definition: { + ...definition, + type: (0, dataType_1.getJSONTypes)(definition.type), + schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType) + } + }; + if (definition.before) + addBeforeRule.call(this, ruleGroup, rule, definition.before); + else + ruleGroup.rules.push(rule); + RULES.all[keyword] = rule; + (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd)); } - - this.#handler.onError?.(err) - } -} - -function toRawHeaderValue (value) { - return Array.isArray(value) - ? value.map((item) => Buffer.from(item, 'latin1')) - : Buffer.from(value, 'latin1') -} - - -/***/ }), - -/***/ 89804: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(98061) -const { Readable } = __nccwpck_require__(84492) -const util = __nccwpck_require__(83983) -const CacheHandler = __nccwpck_require__(97665) -const MemoryCacheStore = __nccwpck_require__(38393) -const CacheRevalidationHandler = __nccwpck_require__(44976) -const { assertCacheStore, assertCacheMethods, makeCacheKey, normalizeHeaders, parseCacheControlHeader } = __nccwpck_require__(88047) -const { AbortError } = __nccwpck_require__(48045) - -/** - * @param {(string | RegExp)[] | undefined} origins - * @param {string} name - */ -function assertCacheOrigins (origins, name) { - if (origins === undefined) return - if (!Array.isArray(origins)) { - throw new TypeError(`expected ${name} to be an array or undefined, got ${typeof origins}`) - } - for (let i = 0; i < origins.length; i++) { - const origin = origins[i] - if (typeof origin !== 'string' && !(origin instanceof RegExp)) { - throw new TypeError(`expected ${name}[${i}] to be a string or RegExp, got ${typeof origin}`) + function addBeforeRule(ruleGroup, rule, before) { + const i2 = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before); + if (i2 >= 0) { + ruleGroup.rules.splice(i2, 0, rule); + } else { + ruleGroup.rules.push(rule); + this.logger.warn(`rule ${before} is not defined`); + } + } + function keywordMetaschema(def) { + let { metaSchema } = def; + if (metaSchema === void 0) + return; + if (def.$data && this.opts.$data) + metaSchema = schemaOrData(metaSchema); + def.validateSchema = this.compile(metaSchema, true); + } + var $dataRef = { + $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" + }; + function schemaOrData(schema2) { + return { anyOf: [schema2, $dataRef] }; } } -} - -const nop = () => {} - -/** - * @typedef {(options: import('../../types/dispatcher.d.ts').default.DispatchOptions, handler: import('../../types/dispatcher.d.ts').default.DispatchHandler) => void} DispatchFn - */ - -/** - * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result - * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} cacheControlDirectives - * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts - * @returns {boolean} - */ -function needsRevalidation (result, cacheControlDirectives, { headers = {} }) { - // Always revalidate requests with the no-cache request directive. - if (cacheControlDirectives?.['no-cache']) { - return true - } - - // Always revalidate requests with unqualified no-cache response directive. - if (result.cacheControlDirectives?.['no-cache'] && !Array.isArray(result.cacheControlDirectives['no-cache'])) { - return true - } +}); - // Always revalidate requests with conditional headers. - if (headers['if-modified-since'] || headers['if-none-match']) { - return true +// node_modules/@redocly/ajv/dist/vocabularies/core/id.js +var require_id = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/core/id.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var def = { + keyword: "id", + code() { + throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID'); + } + }; + exports.default = def; } +}); - return false -} - -/** - * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result - * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} cacheControlDirectives - * @returns {boolean} - */ -function isStale (result, cacheControlDirectives) { - const now = Date.now() - if (now > result.staleAt) { - // Response is stale - if (cacheControlDirectives?.['max-stale']) { - // There's a threshold where we can serve stale responses, let's see if - // we're in it - // https://www.rfc-editor.org/rfc/rfc9111.html#name-max-stale - const gracePeriod = result.staleAt + (cacheControlDirectives['max-stale'] * 1000) - return now > gracePeriod +// node_modules/@redocly/ajv/dist/vocabularies/core/ref.js +var require_ref = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/core/ref.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.callRef = exports.getValidate = void 0; + var ref_error_1 = require_ref_error(); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var compile_1 = require_compile(); + var util_1 = require_util7(); + var def = { + keyword: "$ref", + schemaType: "string", + code(cxt) { + const { gen, schema: $ref, it: it3 } = cxt; + const { baseId, schemaEnv: env4, validateName, opts, self } = it3; + const { root } = env4; + if (($ref === "#" || $ref === "#/") && baseId === root.baseId) + return callRootRef(); + const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref); + if (schOrEnv === void 0) + throw new ref_error_1.default(it3.opts.uriResolver, baseId, $ref); + if (schOrEnv instanceof compile_1.SchemaEnv) + return callValidate(schOrEnv); + return inlineRefSchema(schOrEnv); + function callRootRef() { + if (env4 === root) + return callRef(cxt, validateName, env4, env4.$async); + const rootName = gen.scopeValue("root", { ref: root }); + return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root, root.$async); + } + function callValidate(sch) { + const v3 = getValidate(cxt, sch); + callRef(cxt, v3, sch, sch.$async); + } + function inlineRefSchema(sch) { + const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch }); + const valid = gen.name("valid"); + const schCxt = cxt.subschema( + { + schema: sch, + dataTypes: [], + schemaPath: codegen_1.nil, + topSchemaRef: schName, + errSchemaPath: $ref + }, + valid, + it3.isAllOfVariant + // pass isAllOfVariant into inlined $ref + ); + cxt.mergeEvaluated(schCxt); + cxt.ok(valid); + } + } + }; + function getValidate(cxt, sch) { + const { gen } = cxt; + return sch.validate ? gen.scopeValue("validate", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.validate`; + } + exports.getValidate = getValidate; + function callRef(cxt, v3, sch, $async) { + const { gen, it: it3 } = cxt; + const { allErrors, schemaEnv: env4, opts } = it3; + const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil; + if ($async) + callAsyncRef(); + else + callSyncRef(); + function callAsyncRef() { + if (!env4.$async) + throw new Error("async schema referenced by sync schema"); + const valid = gen.let("valid"); + gen.try(() => { + gen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v3, passCxt)}`); + addEvaluatedFrom(v3); + if (!allErrors) + gen.assign(valid, true); + }, (e2) => { + gen.if((0, codegen_1._)`!(${e2} instanceof ${it3.ValidationError})`, () => gen.throw(e2)); + addErrorsFrom(e2); + if (!allErrors) + gen.assign(valid, false); + }); + cxt.ok(valid); + } + function callSyncRef() { + const visitedNodes = gen.name("visitedNodes"); + gen.code((0, codegen_1._)`const ${visitedNodes} = (typeof visitedNodesForRef !== 'undefined') && visitedNodesForRef.get(${v3}) || new Set()`); + gen.if((0, codegen_1._)`!${visitedNodes}.has(${cxt.data})`, () => { + gen.code((0, codegen_1._)`if (typeof visitedNodesForRef !== 'undefined') visitedNodesForRef.set(${v3}, ${visitedNodes})`); + gen.code((0, codegen_1._)`const dataNode = ${cxt.data}`); + gen.code((0, codegen_1._)`if (typeof dataNode === "object" && dataNode !== null) ${visitedNodes}.add(dataNode)`); + const res = cxt.result((0, code_1.callValidateCode)(cxt, v3, passCxt), () => addEvaluatedFrom(v3), () => addErrorsFrom(v3)); + gen.code((0, codegen_1._)`${visitedNodes}.delete(dataNode)`); + return res; + }); + } + function addErrorsFrom(source) { + const errs = (0, codegen_1._)`${source}.errors`; + gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); + gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`); + } + function addEvaluatedFrom(source) { + var _a; + if (!it3.opts.unevaluated) + return; + const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated; + if (it3.props !== true) { + if (schEvaluated && !schEvaluated.dynamicProps) { + if (schEvaluated.props !== void 0) { + it3.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it3.props); + } + } else { + const props = gen.var("props", (0, codegen_1._)`${source}.evaluated.props`); + it3.props = util_1.mergeEvaluated.props(gen, props, it3.props, codegen_1.Name); + } + } + if (it3.items !== true) { + if (schEvaluated && !schEvaluated.dynamicItems) { + if (schEvaluated.items !== void 0) { + it3.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it3.items); + } + } else { + const items = gen.var("items", (0, codegen_1._)`${source}.evaluated.items`); + it3.items = util_1.mergeEvaluated.items(gen, items, it3.items, codegen_1.Name); + } + } + } } - - return true + exports.callRef = callRef; + exports.default = def; } +}); - if (cacheControlDirectives?.['min-fresh']) { - // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.1.3 - - // At this point, staleAt is always > now - const timeLeftTillStale = result.staleAt - now - const threshold = cacheControlDirectives['min-fresh'] * 1000 - - return timeLeftTillStale <= threshold +// node_modules/@redocly/ajv/dist/vocabularies/core/index.js +var require_core3 = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/core/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var id_1 = require_id(); + var ref_1 = require_ref(); + var core5 = [ + "$schema", + "$id", + "$defs", + "$vocabulary", + { keyword: "$comment" }, + "definitions", + id_1.default, + ref_1.default + ]; + exports.default = core5; } +}); - return false -} - -/** - * Check if we're within the stale-while-revalidate window for a stale response - * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result - * @returns {boolean} - */ -function withinStaleWhileRevalidateWindow (result) { - const staleWhileRevalidate = result.cacheControlDirectives?.['stale-while-revalidate'] - if (!staleWhileRevalidate) { - return false +// node_modules/@redocly/ajv/dist/vocabularies/validation/limitNumber.js +var require_limitNumber = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/limitNumber.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var ops = codegen_1.operators; + var KWDs = { + maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT }, + minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT }, + exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE }, + exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE } + }; + var error2 = { + message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`, + params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}` + }; + var def = { + keyword: Object.keys(KWDs), + type: "number", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`); + } + }; + exports.default = def; } +}); - const now = Date.now() - const staleWhileRevalidateExpiry = result.staleAt + (staleWhileRevalidate * 1000) - return now <= staleWhileRevalidateExpiry -} - -/** - * @param {DispatchFn} dispatch - * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} globalOpts - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey - * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler - * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts - * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} reqCacheControl - */ -function handleUncachedResponse ( - dispatch, - globalOpts, - cacheKey, - handler, - opts, - reqCacheControl -) { - if (reqCacheControl?.['only-if-cached']) { - let aborted = false - try { - if (typeof handler.onConnect === 'function') { - handler.onConnect(() => { - aborted = true - }) - - if (aborted) { - return - } +// node_modules/@redocly/ajv/dist/vocabularies/validation/multipleOf.js +var require_multipleOf = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/multipleOf.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error2 = { + message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`, + params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}` + }; + var def = { + keyword: "multipleOf", + type: "number", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { gen, data, schemaCode, it: it3 } = cxt; + const prec = it3.opts.multipleOfPrecision; + const res = gen.let("res"); + const invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`; + cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`); } + }; + exports.default = def; + } +}); - if (typeof handler.onHeaders === 'function') { - handler.onHeaders(504, [], nop, 'Gateway Timeout') - if (aborted) { - return +// node_modules/@redocly/ajv/dist/runtime/ucs2length.js +var require_ucs2length = __commonJS({ + "node_modules/@redocly/ajv/dist/runtime/ucs2length.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function ucs2length(str2) { + const len = str2.length; + let length = 0; + let pos = 0; + let value; + while (pos < len) { + length++; + value = str2.charCodeAt(pos++); + if (value >= 55296 && value <= 56319 && pos < len) { + value = str2.charCodeAt(pos); + if ((value & 64512) === 56320) + pos++; } } - - if (typeof handler.onComplete === 'function') { - handler.onComplete([]) - } - } catch (err) { - if (typeof handler.onError === 'function') { - handler.onError(err) - } + return length; } - - return true + exports.default = ucs2length; + ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default'; } +}); - return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)) -} - -/** - * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler - * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts - * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result - * @param {number} age - * @param {any} context - * @param {boolean} isStale - */ -function sendCachedValue (handler, opts, result, age, context, isStale) { - // TODO (perf): Readable.from path can be optimized... - const stream = util.isStream(result.body) - ? result.body - : Readable.from(result.body ?? []) - - assert(!stream.destroyed, 'stream should not be destroyed') - assert(!stream.readableDidRead, 'stream should not be readableDidRead') - - const controller = { - resume () { - stream.resume() - }, - pause () { - stream.pause() - }, - get paused () { - return stream.isPaused() - }, - get aborted () { - return stream.destroyed - }, - get reason () { - return stream.errored - }, - abort (reason) { - stream.destroy(reason ?? new AbortError()) - } +// node_modules/@redocly/ajv/dist/vocabularies/validation/limitLength.js +var require_limitLength = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/limitLength.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var ucs2length_1 = require_ucs2length(); + var error2 = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxLength" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxLength", "minLength"], + type: "string", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { keyword, data, schemaCode, it: it3 } = cxt; + const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT; + const len = it3.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`; + cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`); + } + }; + exports.default = def; } +}); - stream - .on('error', function (err) { - if (!this.readableEnded) { - if (typeof handler.onResponseError === 'function') { - handler.onResponseError(controller, err) +// node_modules/@redocly/ajv/dist/vocabularies/validation/pattern.js +var require_pattern = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/pattern.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code2(); + var util_1 = require_util7(); + var codegen_1 = require_codegen(); + var error2 = { + message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`, + params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}` + }; + var def = { + keyword: "pattern", + type: "string", + schemaType: "string", + $data: true, + error: error2, + code(cxt) { + const { gen, data, $data, schema: schema2, schemaCode, it: it3 } = cxt; + const u2 = it3.opts.unicodeRegExp ? "u" : ""; + if ($data) { + const { regExp } = it3.opts.code; + const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp); + const valid = gen.let("valid"); + gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u2}).test(${data})`), () => gen.assign(valid, false)); + cxt.fail$data((0, codegen_1._)`!${valid}`); } else { - throw err + const regExp = (0, code_1.usePattern)(cxt, schema2); + cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`); } } - }) - .on('close', function () { - if (!this.errored) { - handler.onResponseEnd?.(controller, {}) - } - }) - - handler.onRequestStart?.(controller, context) - - if (stream.destroyed) { - return - } - - // Add the age header - // https://www.rfc-editor.org/rfc/rfc9111.html#name-age - const headers = { ...result.headers, age: String(age) } - - if (isStale) { - // Add warning header - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Warning - headers.warning = '110 - "response is stale"' + }; + exports.default = def; } +}); - handler.onResponseStart?.(controller, result.statusCode, headers, result.statusMessage) - - if (opts.method === 'HEAD') { - stream.destroy() - } else { - stream.on('data', function (chunk) { - handler.onResponseData?.(controller, chunk) - }) +// node_modules/@redocly/ajv/dist/vocabularies/validation/limitProperties.js +var require_limitProperties = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/limitProperties.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error2 = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxProperties" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxProperties", "minProperties"], + type: "object", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT; + cxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`); + } + }; + exports.default = def; } -} - -/** - * @param {DispatchFn} dispatch - * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} globalOpts - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey - * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler - * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts - * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} reqCacheControl - * @param {import('../../types/cache-interceptor.d.ts').default.GetResult | undefined} result - */ -function handleResult ( - dispatch, - globalOpts, - cacheKey, - handler, - opts, - reqCacheControl, - result -) { - if (!result) { - return handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl) - } - - const now = Date.now() - if (now > result.deleteAt) { - // Response is expired, cache store shouldn't have given this to us - return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)) - } - - const age = Math.round((now - result.cachedAt) / 1000) - if (reqCacheControl?.['max-age'] && age >= reqCacheControl['max-age']) { - // Response is considered expired for this specific request - // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.1.1 - return dispatch(opts, handler) - } - - const stale = isStale(result, reqCacheControl) - const revalidate = needsRevalidation(result, reqCacheControl, opts) - - // Check if the response is stale - if (stale || revalidate) { - if (util.isStream(opts.body) && util.bodyLength(opts.body) !== 0) { - // If body is a stream we can't revalidate... - // TODO (fix): This could be less strict... - return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)) - } - - // RFC 5861: If we're within stale-while-revalidate window, serve stale immediately - // and revalidate in background, unless immediate revalidation is necessary - if (!revalidate && withinStaleWhileRevalidateWindow(result)) { - // Serve stale response immediately - sendCachedValue(handler, opts, result, age, null, true) - - // Start background revalidation (fire-and-forget) - queueMicrotask(() => { - const headers = { - ...opts.headers, - 'if-modified-since': new Date(result.cachedAt).toUTCString() - } +}); - if (result.etag) { - headers['if-none-match'] = result.etag +// node_modules/@redocly/ajv/dist/vocabularies/validation/required.js +var require_required = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/required.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code2(); + var oasContext_1 = require_oasContext(); + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var error2 = { + message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`, + params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}` + }; + var def = { + keyword: "required", + type: "object", + schemaType: "array", + $data: true, + error: error2, + code(cxt) { + const { gen, schema: schema2, schemaCode, data, $data, it: it3 } = cxt; + const { opts } = it3; + if (!$data && schema2.length === 0) + return; + const useLoop = schema2.length >= opts.loopRequired; + if (it3.allErrors) + allErrorsMode(); + else + exitOnErrorMode(); + if (opts.strictRequired) { + const props = cxt.parentSchema.properties; + const { definedProperties } = cxt.it; + for (const requiredKey of schema2) { + if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) { + const schemaPath = it3.schemaEnv.baseId + it3.errSchemaPath; + const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`; + (0, util_1.checkStrictMode)(it3, msg, it3.opts.strictRequired); + } + } } - - if (result.vary) { - for (const key in result.vary) { - if (result.vary[key] != null) { - headers[key] = result.vary[key] + function allErrorsMode() { + var _a; + if (useLoop || $data) { + cxt.block$data(codegen_1.nil, loopAllRequired); + } else { + for (const prop of schema2) { + const skip = (_a = (0, oasContext_1.getSkipCondition)(cxt.parentSchema, prop)) !== null && _a !== void 0 ? _a : (0, codegen_1._)`false`; + gen.if((0, codegen_1.not)(skip), () => (0, code_1.checkReportMissingProp)(cxt, prop)); } } } - - // Background revalidation - update cache if we get new data - dispatch( - { - ...opts, - headers - }, - new CacheHandler(globalOpts, cacheKey, { - // Silent handler that just updates the cache - onRequestStart () {}, - onRequestUpgrade () {}, - onResponseStart () {}, - onResponseData () {}, - onResponseEnd () {}, - onResponseError () {} - }) - ) - }) - - return true - } - - let withinStaleIfErrorThreshold = false - const staleIfErrorExpiry = result.cacheControlDirectives['stale-if-error'] ?? reqCacheControl?.['stale-if-error'] - if (staleIfErrorExpiry) { - withinStaleIfErrorThreshold = now < (result.staleAt + (staleIfErrorExpiry * 1000)) - } - - const headers = { - ...opts.headers, - 'if-modified-since': new Date(result.cachedAt).toUTCString() - } - - if (result.etag) { - headers['if-none-match'] = result.etag - } - - if (result.vary) { - for (const key in result.vary) { - if (result.vary[key] != null) { - headers[key] = result.vary[key] + function exitOnErrorMode() { + const missing = gen.let("missing"); + if (useLoop || $data) { + const valid = gen.let("valid", true); + cxt.block$data(valid, () => loopUntilMissing(missing, valid)); + cxt.ok(valid); + } else { + gen.if((0, code_1.checkMissingProp)(cxt, schema2, missing)); + (0, code_1.reportMissingProp)(cxt, missing); + gen.else(); + } + } + function loopAllRequired() { + gen.forOf("prop", schemaCode, (prop) => { + cxt.setParams({ missingProperty: prop }); + gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error()); + }); + } + function loopUntilMissing(missing, valid) { + cxt.setParams({ missingProperty: missing }); + gen.forOf(missing, schemaCode, () => { + gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties)); + gen.if((0, codegen_1.not)(valid), () => { + cxt.error(); + gen.break(); + }); + }, codegen_1.nil); } } - } - - // We need to revalidate the response - return dispatch( - { - ...opts, - headers - }, - new CacheRevalidationHandler( - (success, context) => { - if (success) { - // TODO: successful revalidation should be considered fresh (not give stale warning). - sendCachedValue(handler, opts, result, age, context, stale) - } else if (util.isStream(result.body)) { - result.body.on('error', nop).destroy() - } - }, - new CacheHandler(globalOpts, cacheKey, handler), - withinStaleIfErrorThreshold - ) - ) + }; + exports.default = def; } +}); - // Dump request body. - if (util.isStream(opts.body)) { - opts.body.on('error', nop).destroy() +// node_modules/@redocly/ajv/dist/vocabularies/validation/readOnly.js +var require_readOnly = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/readOnly.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var error2 = { + message: () => (0, codegen_1.str)`must NOT be present in request context` + }; + var def = { + keyword: "readOnly", + schemaType: "boolean", + error: error2, + code(cxt) { + if (cxt.schema !== true) + return; + const apiContext = (0, codegen_1._)`(${names_1.default.this} && ${names_1.default.this}.apiContext)`; + cxt.fail((0, codegen_1._)`${apiContext} === "request"`); + } + }; + exports.default = def; } +}); - sendCachedValue(handler, opts, result, age, null, false) -} - -/** - * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions} [opts] - * @returns {import('../../types/dispatcher.d.ts').default.DispatcherComposeInterceptor} - */ -module.exports = (opts = {}) => { - const { - store = new MemoryCacheStore(), - methods = ['GET'], - cacheByDefault = undefined, - type = 'shared', - origins = undefined - } = opts - - if (typeof opts !== 'object' || opts === null) { - throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? 'null' : typeof opts}`) +// node_modules/@redocly/ajv/dist/vocabularies/validation/writeOnly.js +var require_writeOnly = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/writeOnly.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var error2 = { + message: () => (0, codegen_1.str)`must NOT be present in response context` + }; + var def = { + keyword: "writeOnly", + schemaType: "boolean", + error: error2, + code(cxt) { + if (cxt.schema !== true) + return; + const apiContext = (0, codegen_1._)`(${names_1.default.this} && ${names_1.default.this}.apiContext)`; + cxt.fail((0, codegen_1._)`${apiContext} === "response"`); + } + }; + exports.default = def; } +}); - assertCacheStore(store, 'opts.store') - assertCacheMethods(methods, 'opts.methods') - assertCacheOrigins(origins, 'opts.origins') - - if (typeof cacheByDefault !== 'undefined' && typeof cacheByDefault !== 'number') { - throw new TypeError(`expected opts.cacheByDefault to be number or undefined, got ${typeof cacheByDefault}`) +// node_modules/@redocly/ajv/dist/vocabularies/validation/limitItems.js +var require_limitItems = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/limitItems.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error2 = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxItems" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxItems", "minItems"], + type: "array", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT; + cxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`); + } + }; + exports.default = def; } +}); - if (typeof type !== 'undefined' && type !== 'shared' && type !== 'private') { - throw new TypeError(`expected opts.type to be shared, private, or undefined, got ${typeof type}`) +// node_modules/@redocly/ajv/dist/runtime/equal.js +var require_equal = __commonJS({ + "node_modules/@redocly/ajv/dist/runtime/equal.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var equal = require_fast_deep_equal(); + equal.code = 'require("ajv/dist/runtime/equal").default'; + exports.default = equal; } +}); - const globalOpts = { - store, - methods, - cacheByDefault, - type +// node_modules/@redocly/ajv/dist/vocabularies/validation/uniqueItems.js +var require_uniqueItems = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var dataType_1 = require_dataType(); + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var equal_1 = require_equal(); + var error2 = { + message: ({ params: { i: i2, j: j3 } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j3} and ${i2} are identical)`, + params: ({ params: { i: i2, j: j3 } }) => (0, codegen_1._)`{i: ${i2}, j: ${j3}}` + }; + var def = { + keyword: "uniqueItems", + type: "array", + schemaType: "boolean", + $data: true, + error: error2, + code(cxt) { + const { gen, data, $data, schema: schema2, parentSchema, schemaCode, it: it3 } = cxt; + if (!$data && !schema2) + return; + const valid = gen.let("valid"); + const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : []; + cxt.block$data(valid, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`); + cxt.ok(valid); + function validateUniqueItems() { + const i2 = gen.let("i", (0, codegen_1._)`${data}.length`); + const j3 = gen.let("j"); + cxt.setParams({ i: i2, j: j3 }); + gen.assign(valid, true); + gen.if((0, codegen_1._)`${i2} > 1`, () => (canOptimize() ? loopN : loopN2)(i2, j3)); + } + function canOptimize() { + return itemTypes.length > 0 && !itemTypes.some((t2) => t2 === "object" || t2 === "array"); + } + function loopN(i2, j3) { + const item = gen.name("item"); + const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it3.opts.strictNumbers, dataType_1.DataType.Wrong); + const indices = gen.const("indices", (0, codegen_1._)`{}`); + gen.for((0, codegen_1._)`;${i2}--;`, () => { + gen.let(item, (0, codegen_1._)`${data}[${i2}]`); + gen.if(wrongType, (0, codegen_1._)`continue`); + if (itemTypes.length > 1) + gen.if((0, codegen_1._)`typeof ${item} == "string"`, (0, codegen_1._)`${item} += "_"`); + gen.if((0, codegen_1._)`typeof ${indices}[${item}] == "number"`, () => { + gen.assign(j3, (0, codegen_1._)`${indices}[${item}]`); + cxt.error(); + gen.assign(valid, false).break(); + }).code((0, codegen_1._)`${indices}[${item}] = ${i2}`); + }); + } + function loopN2(i2, j3) { + const eql = (0, util_1.useFunc)(gen, equal_1.default); + const outer = gen.name("outer"); + gen.label(outer).for((0, codegen_1._)`;${i2}--;`, () => gen.for((0, codegen_1._)`${j3} = ${i2}; ${j3}--;`, () => gen.if((0, codegen_1._)`${eql}(${data}[${i2}], ${data}[${j3}])`, () => { + cxt.error(); + gen.assign(valid, false).break(outer); + }))); + } + } + }; + exports.default = def; } +}); - const safeMethodsToNotCache = util.safeHTTPMethods.filter(method => methods.includes(method) === false) - - return dispatch => { - return (opts, handler) => { - if (!opts.origin || safeMethodsToNotCache.includes(opts.method)) { - // Not a method we want to cache or we don't have the origin, skip - return dispatch(opts, handler) +// node_modules/@redocly/ajv/dist/vocabularies/validation/const.js +var require_const = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/const.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var equal_1 = require_equal(); + var error2 = { + message: "must be equal to constant", + params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}` + }; + var def = { + keyword: "const", + $data: true, + error: error2, + code(cxt) { + const { gen, data, $data, schemaCode, schema: schema2 } = cxt; + if ($data || schema2 && typeof schema2 == "object") { + cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`); + } else { + cxt.fail((0, codegen_1._)`${schema2} !== ${data}`); + } } + }; + exports.default = def; + } +}); - // Check if origin is in whitelist - if (origins !== undefined) { - const requestOrigin = opts.origin.toString().toLowerCase() - let isAllowed = false - - for (let i = 0; i < origins.length; i++) { - const allowed = origins[i] - if (typeof allowed === 'string') { - if (allowed.toLowerCase() === requestOrigin) { - isAllowed = true - break - } - } else if (allowed.test(requestOrigin)) { - isAllowed = true - break - } +// node_modules/@redocly/ajv/dist/vocabularies/validation/enum.js +var require_enum = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/enum.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var equal_1 = require_equal(); + var error2 = { + message: "must be equal to one of the allowed values", + params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}` + }; + var def = { + keyword: "enum", + schemaType: "array", + $data: true, + error: error2, + code(cxt) { + const { gen, data, $data, schema: schema2, schemaCode, it: it3 } = cxt; + if (!$data && schema2.length === 0) + throw new Error("enum must have non-empty array"); + const useLoop = schema2.length >= it3.opts.loopEnum; + let eql; + const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default); + let valid; + if (useLoop || $data) { + valid = gen.let("valid"); + cxt.block$data(valid, loopEnum); + } else { + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + const vSchema = gen.const("vSchema", schemaCode); + valid = (0, codegen_1.or)(...schema2.map((_x, i2) => equalCode(vSchema, i2))); } - - if (!isAllowed) { - return dispatch(opts, handler) + cxt.pass(valid); + function loopEnum() { + gen.assign(valid, false); + gen.forOf("v", schemaCode, (v3) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v3})`, () => gen.assign(valid, true).break())); + } + function equalCode(vSchema, i2) { + const sch = schema2[i2]; + return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i2}])` : (0, codegen_1._)`${data} === ${sch}`; } } + }; + exports.default = def; + } +}); - opts = { - ...opts, - headers: normalizeHeaders(opts) - } - - const reqCacheControl = opts.headers?.['cache-control'] - ? parseCacheControlHeader(opts.headers['cache-control']) - : undefined +// node_modules/@redocly/ajv/dist/vocabularies/validation/index.js +var require_validation = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var limitNumber_1 = require_limitNumber(); + var multipleOf_1 = require_multipleOf(); + var limitLength_1 = require_limitLength(); + var pattern_1 = require_pattern(); + var limitProperties_1 = require_limitProperties(); + var required_1 = require_required(); + var readOnly_1 = require_readOnly(); + var writeOnly_1 = require_writeOnly(); + var limitItems_1 = require_limitItems(); + var uniqueItems_1 = require_uniqueItems(); + var const_1 = require_const(); + var enum_1 = require_enum(); + var validation = [ + // number + limitNumber_1.default, + multipleOf_1.default, + // string + limitLength_1.default, + pattern_1.default, + // object + limitProperties_1.default, + required_1.default, + readOnly_1.default, + writeOnly_1.default, + // array + limitItems_1.default, + uniqueItems_1.default, + // any + { keyword: "type", schemaType: ["string", "array"] }, + { keyword: "nullable", schemaType: "boolean" }, + const_1.default, + enum_1.default + ]; + exports.default = validation; + } +}); - if (reqCacheControl?.['no-store']) { - return dispatch(opts, handler) +// node_modules/@redocly/ajv/dist/vocabularies/applicator/additionalItems.js +var require_additionalItems = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateAdditionalItems = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var error2 = { + message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, + params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` + }; + var def = { + keyword: "additionalItems", + type: "array", + schemaType: ["boolean", "object"], + before: "uniqueItems", + error: error2, + code(cxt) { + const { parentSchema, it: it3 } = cxt; + const { items } = parentSchema; + if (!Array.isArray(items)) { + (0, util_1.checkStrictMode)(it3, '"additionalItems" is ignored when "items" is not an array of schemas'); + return; + } + validateAdditionalItems(cxt, items); } - - /** - * @type {import('../../types/cache-interceptor.d.ts').default.CacheKey} - */ - const cacheKey = makeCacheKey(opts) - const result = store.get(cacheKey) - - if (result && typeof result.then === 'function') { - return result - .then(result => handleResult(dispatch, - globalOpts, - cacheKey, - handler, - opts, - reqCacheControl, - result - )) - } else { - return handleResult( - dispatch, - globalOpts, - cacheKey, - handler, - opts, - reqCacheControl, - result - ) + }; + function validateAdditionalItems(cxt, items) { + const { gen, schema: schema2, data, keyword, it: it3 } = cxt; + it3.items = true; + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + if (schema2 === false) { + cxt.setParams({ len: items.length }); + cxt.pass((0, codegen_1._)`${len} <= ${items.length}`); + } else if (typeof schema2 == "object" && !(0, util_1.alwaysValidSchema)(it3, schema2)) { + const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items.length}`); + gen.if((0, codegen_1.not)(valid), () => validateItems(valid)); + cxt.ok(valid); + } + function validateItems(valid) { + gen.forRange("i", items.length, len, (i2) => { + cxt.subschema({ keyword, dataProp: i2, dataPropType: util_1.Type.Num }, valid); + if (!it3.allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + }); } } + exports.validateAdditionalItems = validateAdditionalItems; + exports.default = def; } -} - - -/***/ }), - -/***/ 7750: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { createInflate, createGunzip, createBrotliDecompress, createZstdDecompress } = __nccwpck_require__(65628) -const { pipeline } = __nccwpck_require__(84492) -const DecoratorHandler = __nccwpck_require__(4117) -const { runtimeFeatures } = __nccwpck_require__(15072) - -/** @typedef {import('node:stream').Transform} Transform */ -/** @typedef {import('node:stream').Transform} Controller */ -/** @typedef {Transform&import('node:zlib').Zlib} DecompressorStream */ - -/** @type {Record DecompressorStream>} */ -const supportedEncodings = { - gzip: createGunzip, - 'x-gzip': createGunzip, - br: createBrotliDecompress, - deflate: createInflate, - compress: createInflate, - 'x-compress': createInflate, - ...(runtimeFeatures.has('zstd') ? { zstd: createZstdDecompress } : {}) -} - -const defaultSkipStatusCodes = /** @type {const} */ ([204, 304]) - -let warningEmitted = /** @type {boolean} */ (false) - -/** - * @typedef {Object} DecompressHandlerOptions - * @property {number[]|Readonly} [skipStatusCodes=[204, 304]] - List of status codes to skip decompression for - * @property {boolean} [skipErrorResponses] - Whether to skip decompression for error responses (status codes >= 400) - */ +}); -class DecompressHandler extends DecoratorHandler { - /** @type {Transform[]} */ - #decompressors = [] - /** @type {Readonly} */ - #skipStatusCodes - /** @type {boolean} */ - #skipErrorResponses +// node_modules/@redocly/ajv/dist/vocabularies/applicator/items.js +var require_items = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/items.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateTuple = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var code_1 = require_code2(); + var def = { + keyword: "items", + type: "array", + schemaType: ["object", "array", "boolean"], + before: "uniqueItems", + code(cxt) { + const { schema: schema2, it: it3 } = cxt; + if (Array.isArray(schema2)) + return validateTuple(cxt, "additionalItems", schema2); + it3.items = true; + if ((0, util_1.alwaysValidSchema)(it3, schema2)) + return; + cxt.ok((0, code_1.validateArray)(cxt)); + } + }; + function validateTuple(cxt, extraItems, schArr = cxt.schema) { + const { gen, parentSchema, data, keyword, it: it3 } = cxt; + checkStrictTuple(parentSchema); + if (it3.opts.unevaluated && schArr.length && it3.items !== true) { + it3.items = util_1.mergeEvaluated.items(gen, schArr.length, it3.items); + } + const valid = gen.name("valid"); + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + schArr.forEach((sch, i2) => { + if ((0, util_1.alwaysValidSchema)(it3, sch)) + return; + gen.if((0, codegen_1._)`${len} > ${i2}`, () => cxt.subschema({ + keyword, + schemaProp: i2, + dataProp: i2 + }, valid)); + cxt.ok(valid); + }); + function checkStrictTuple(sch) { + const { opts, errSchemaPath } = it3; + const l2 = schArr.length; + const fullTuple = l2 === sch.minItems && (l2 === sch.maxItems || sch[extraItems] === false); + if (opts.strictTuples && !fullTuple) { + const msg = `"${keyword}" is ${l2}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`; + (0, util_1.checkStrictMode)(it3, msg, opts.strictTuples); + } + } + } + exports.validateTuple = validateTuple; + exports.default = def; + } +}); - constructor (handler, { skipStatusCodes = defaultSkipStatusCodes, skipErrorResponses = true } = {}) { - super(handler) - this.#skipStatusCodes = skipStatusCodes - this.#skipErrorResponses = skipErrorResponses +// node_modules/@redocly/ajv/dist/vocabularies/applicator/prefixItems.js +var require_prefixItems = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var items_1 = require_items(); + var def = { + keyword: "prefixItems", + type: "array", + schemaType: ["array"], + before: "uniqueItems", + code: (cxt) => (0, items_1.validateTuple)(cxt, "items") + }; + exports.default = def; } +}); - /** - * Determines if decompression should be skipped based on encoding and status code - * @param {string} contentEncoding - Content-Encoding header value - * @param {number} statusCode - HTTP status code of the response - * @returns {boolean} - True if decompression should be skipped - */ - #shouldSkipDecompression (contentEncoding, statusCode) { - if (!contentEncoding || statusCode < 200) return true - if (this.#skipStatusCodes.includes(statusCode)) return true - if (this.#skipErrorResponses && statusCode >= 400) return true - return false +// node_modules/@redocly/ajv/dist/vocabularies/applicator/items2020.js +var require_items2020 = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/items2020.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var code_1 = require_code2(); + var additionalItems_1 = require_additionalItems(); + var error2 = { + message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, + params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` + }; + var def = { + keyword: "items", + type: "array", + schemaType: ["object", "boolean"], + before: "uniqueItems", + error: error2, + code(cxt) { + const { schema: schema2, parentSchema, it: it3 } = cxt; + const { prefixItems } = parentSchema; + it3.items = true; + if ((0, util_1.alwaysValidSchema)(it3, schema2)) + return; + if (prefixItems) + (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems); + else + cxt.ok((0, code_1.validateArray)(cxt)); + } + }; + exports.default = def; } +}); - /** - * Creates a chain of decompressors for multiple content encodings - * - * @param {string} encodings - Comma-separated list of content encodings - * @returns {Array} - Array of decompressor streams - * @throws {Error} - If the number of content-encodings exceeds the maximum allowed - */ - #createDecompressionChain (encodings) { - const parts = encodings.split(',') +// node_modules/@redocly/ajv/dist/vocabularies/applicator/contains.js +var require_contains = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/contains.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var error2 = { + message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`, + params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}` + }; + var def = { + keyword: "contains", + type: "array", + schemaType: ["object", "boolean"], + before: "uniqueItems", + trackErrors: true, + error: error2, + code(cxt) { + const { gen, schema: schema2, parentSchema, data, it: it3 } = cxt; + let min; + let max; + const { minContains, maxContains } = parentSchema; + if (it3.opts.next) { + min = minContains === void 0 ? 1 : minContains; + max = maxContains; + } else { + min = 1; + } + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + cxt.setParams({ min, max }); + if (max === void 0 && min === 0) { + (0, util_1.checkStrictMode)(it3, `"minContains" == 0 without "maxContains": "contains" keyword ignored`); + return; + } + if (max !== void 0 && min > max) { + (0, util_1.checkStrictMode)(it3, `"minContains" > "maxContains" is always invalid`); + cxt.fail(); + return; + } + if ((0, util_1.alwaysValidSchema)(it3, schema2)) { + let cond = (0, codegen_1._)`${len} >= ${min}`; + if (max !== void 0) + cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`; + cxt.pass(cond); + return; + } + it3.items = true; + const valid = gen.name("valid"); + if (max === void 0 && min === 1) { + validateItems(valid, () => gen.if(valid, () => gen.break())); + } else if (min === 0) { + gen.let(valid, true); + if (max !== void 0) + gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount); + } else { + gen.let(valid, false); + validateItemsWithCount(); + } + cxt.result(valid, () => cxt.reset()); + function validateItemsWithCount() { + const schValid = gen.name("_valid"); + const count = gen.let("count", 0); + validateItems(schValid, () => gen.if(schValid, () => checkLimits(count))); + } + function validateItems(_valid, block) { + gen.forRange("i", 0, len, (i2) => { + cxt.subschema({ + keyword: "contains", + dataProp: i2, + dataPropType: util_1.Type.Num, + compositeRule: true + }, _valid); + block(); + }); + } + function checkLimits(count) { + gen.code((0, codegen_1._)`${count}++`); + if (max === void 0) { + gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break()); + } else { + gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid, false).break()); + if (min === 1) + gen.assign(valid, true); + else + gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true)); + } + } + } + }; + exports.default = def; + } +}); - // 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 (parts.length > maxContentEncodings) { - throw new Error(`too many content-encodings in response: ${parts.length}, maximum allowed is ${maxContentEncodings}`) +// node_modules/@redocly/ajv/dist/vocabularies/applicator/dependencies.js +var require_dependencies = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/dependencies.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var code_1 = require_code2(); + exports.error = { + message: ({ params: { property, depsCount, deps } }) => { + const property_ies = depsCount === 1 ? "property" : "properties"; + return (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`; + }, + params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._)`{property: ${property}, + missingProperty: ${missingProperty}, + depsCount: ${depsCount}, + deps: ${deps}}` + // TODO change to reference + }; + var def = { + keyword: "dependencies", + type: "object", + schemaType: "object", + error: exports.error, + code(cxt) { + const [propDeps, schDeps] = splitDependencies(cxt); + validatePropertyDeps(cxt, propDeps); + validateSchemaDeps(cxt, schDeps); + } + }; + function splitDependencies({ schema: schema2 }) { + const propertyDeps = {}; + const schemaDeps = {}; + for (const key in schema2) { + if (key === "__proto__") + continue; + const deps = Array.isArray(schema2[key]) ? propertyDeps : schemaDeps; + deps[key] = schema2[key]; + } + return [propertyDeps, schemaDeps]; } - - /** @type {DecompressorStream[]} */ - const decompressors = [] - - for (let i = parts.length - 1; i >= 0; i--) { - const encoding = parts[i].trim() - if (!encoding) continue - - if (!supportedEncodings[encoding]) { - decompressors.length = 0 // Clear if unsupported encoding - return decompressors // Unsupported encoding + function validatePropertyDeps(cxt, propertyDeps = cxt.schema) { + const { gen, data, it: it3 } = cxt; + if (Object.keys(propertyDeps).length === 0) + return; + const missing = gen.let("missing"); + for (const prop in propertyDeps) { + const deps = propertyDeps[prop]; + if (deps.length === 0) + continue; + const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it3.opts.ownProperties); + cxt.setParams({ + property: prop, + depsCount: deps.length, + deps: deps.join(", ") + }); + if (it3.allErrors) { + gen.if(hasProperty, () => { + for (const depProp of deps) { + (0, code_1.checkReportMissingProp)(cxt, depProp); + } + }); + } else { + gen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`); + (0, code_1.reportMissingProp)(cxt, missing); + gen.else(); + } + } + } + exports.validatePropertyDeps = validatePropertyDeps; + function validateSchemaDeps(cxt, schemaDeps = cxt.schema) { + const { gen, data, keyword, it: it3 } = cxt; + const valid = gen.name("valid"); + for (const prop in schemaDeps) { + if ((0, util_1.alwaysValidSchema)(it3, schemaDeps[prop])) + continue; + gen.if( + (0, code_1.propertyInData)(gen, data, prop, it3.opts.ownProperties), + () => { + const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid); + cxt.mergeValidEvaluated(schCxt, valid); + }, + () => gen.var(valid, true) + // TODO var + ); + cxt.ok(valid); } - - decompressors.push(supportedEncodings[encoding]()) } + exports.validateSchemaDeps = validateSchemaDeps; + exports.default = def; + } +}); + +// node_modules/@redocly/ajv/dist/vocabularies/applicator/propertyNames.js +var require_propertyNames = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var error2 = { + message: "property name must be valid", + params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}` + }; + var def = { + keyword: "propertyNames", + type: "object", + schemaType: ["object", "boolean"], + error: error2, + code(cxt) { + const { gen, schema: schema2, data, it: it3 } = cxt; + if ((0, util_1.alwaysValidSchema)(it3, schema2)) + return; + const valid = gen.name("valid"); + gen.forIn("key", data, (key) => { + cxt.setParams({ propertyName: key }); + cxt.subschema({ + keyword: "propertyNames", + data: key, + dataTypes: ["string"], + propertyName: key, + compositeRule: true + }, valid); + gen.if((0, codegen_1.not)(valid), () => { + cxt.error(true); + if (!it3.allErrors) + gen.break(); + }); + }); + cxt.ok(valid); + } + }; + exports.default = def; + } +}); - return decompressors +// node_modules/@redocly/ajv/dist/vocabularies/applicator/additionalProperties.js +var require_additionalProperties = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var util_1 = require_util7(); + var error2 = { + message: "must NOT have additional properties", + params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}` + }; + var def = { + keyword: "additionalProperties", + type: ["object"], + schemaType: ["boolean", "object"], + allowUndefined: true, + trackErrors: true, + error: error2, + code(cxt) { + const { gen, parentSchema, data, errsCount, it: it3 } = cxt; + const { schema: schema2 = it3.opts.defaultAdditionalProperties } = cxt; + if (!errsCount) + throw new Error("ajv implementation error"); + const { allErrors, opts } = it3; + it3.props = true; + if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it3, schema2)) + return; + const props = (0, code_1.allSchemaProperties)(parentSchema.properties); + const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties); + checkAdditionalProperties(); + cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); + function checkAdditionalProperties() { + gen.forIn("key", data, (key) => { + if (!props.length && !patProps.length) + additionalPropertyCode(key); + else + gen.if(isAdditional(key), () => additionalPropertyCode(key)); + }); + } + function isAdditional(key) { + let definedProp; + if (props.length > 8) { + const propsSchema = (0, util_1.schemaRefOrVal)(it3, parentSchema.properties, "properties"); + definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key); + } else if (props.length) { + definedProp = (0, codegen_1.or)(...props.map((p2) => (0, codegen_1._)`${key} === ${p2}`)); + } else { + definedProp = codegen_1.nil; + } + if (patProps.length) { + definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p2) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p2)}.test(${key})`)); + } + return (0, codegen_1.not)(definedProp); + } + function deleteAdditional(key) { + gen.code((0, codegen_1._)`delete ${data}[${key}]`); + } + function additionalPropertyCode(key) { + if (opts.removeAdditional === "all" || opts.removeAdditional && schema2 === false) { + deleteAdditional(key); + return; + } + if (schema2 === false) { + cxt.setParams({ additionalProperty: key }); + cxt.error(); + if (!allErrors) + gen.break(); + return; + } + if (typeof schema2 == "object" && !(0, util_1.alwaysValidSchema)(it3, schema2)) { + const valid = gen.name("valid"); + if (opts.removeAdditional === "failing") { + applyAdditionalSchema(key, valid, false); + gen.if((0, codegen_1.not)(valid), () => { + cxt.reset(); + deleteAdditional(key); + }); + } else { + applyAdditionalSchema(key, valid); + if (!allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + } + } + } + function applyAdditionalSchema(key, valid, errors) { + const subschema = { + keyword: "additionalProperties", + dataProp: key, + dataPropType: util_1.Type.Str + }; + if (errors === false) { + Object.assign(subschema, { + compositeRule: true, + createErrors: false, + allErrors: false + }); + } + cxt.subschema(subschema, valid); + } + } + }; + exports.default = def; } +}); - /** - * Sets up event handlers for a decompressor stream using readable events - * @param {DecompressorStream} decompressor - The decompressor stream - * @param {Controller} controller - The controller to coordinate with - * @returns {void} - */ - #setupDecompressorEvents (decompressor, controller) { - decompressor.on('readable', () => { - let chunk - while ((chunk = decompressor.read()) !== null) { - const result = super.onResponseData(controller, chunk) - if (result === false) { - break +// node_modules/@redocly/ajv/dist/vocabularies/applicator/properties.js +var require_properties = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/properties.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var validate_1 = require_validate(); + var code_1 = require_code2(); + var util_1 = require_util7(); + var additionalProperties_1 = require_additionalProperties(); + var def = { + keyword: "properties", + type: "object", + schemaType: "object", + code(cxt) { + const { gen, schema: schema2, parentSchema, data, it: it3 } = cxt; + if (it3.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0 || it3.opts.defaultAdditionalProperties === false) { + additionalProperties_1.default.code(new validate_1.KeywordCxt(it3, additionalProperties_1.default, "additionalProperties")); + } + const allProps = (0, code_1.allSchemaProperties)(schema2); + for (const prop of allProps) { + it3.definedProperties.add(prop); + } + if (it3.opts.unevaluated && allProps.length && it3.props !== true) { + it3.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it3.props); + } + const properties = allProps.filter((p2) => !(0, util_1.alwaysValidSchema)(it3, schema2[p2])); + if (properties.length === 0) + return; + const valid = gen.name("valid"); + for (const prop of properties) { + if (hasDefault(prop)) { + applyPropertySchema(prop); + } else { + gen.if((0, code_1.propertyInData)(gen, data, prop, it3.opts.ownProperties)); + applyPropertySchema(prop); + if (!it3.allErrors) + gen.else().var(valid, true); + gen.endIf(); + } + cxt.it.definedProperties.add(prop); + cxt.ok(valid); + } + function hasDefault(prop) { + return it3.opts.useDefaults && !it3.compositeRule && schema2[prop].default !== void 0; + } + function applyPropertySchema(prop) { + cxt.subschema({ + keyword: "properties", + schemaProp: prop, + dataProp: prop + }, valid); } } - }) - - decompressor.on('error', (error) => { - super.onResponseError(controller, error) - }) + }; + exports.default = def; } +}); - /** - * Sets up event handling for a single decompressor - * @param {Controller} controller - The controller to handle events - * @returns {void} - */ - #setupSingleDecompressor (controller) { - const decompressor = this.#decompressors[0] - this.#setupDecompressorEvents(decompressor, controller) - - decompressor.on('end', () => { - super.onResponseEnd(controller, {}) - }) - } - - /** - * Sets up event handling for multiple chained decompressors using pipeline - * @param {Controller} controller - The controller to handle events - * @returns {void} - */ - #setupMultipleDecompressors (controller) { - const lastDecompressor = this.#decompressors[this.#decompressors.length - 1] - this.#setupDecompressorEvents(lastDecompressor, controller) - - pipeline(this.#decompressors, (err) => { - if (err) { - super.onResponseError(controller, err) - return +// node_modules/@redocly/ajv/dist/vocabularies/applicator/patternProperties.js +var require_patternProperties = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var util_2 = require_util7(); + var def = { + keyword: "patternProperties", + type: "object", + schemaType: "object", + code(cxt) { + const { gen, schema: schema2, data, parentSchema, it: it3 } = cxt; + const { opts } = it3; + const patterns = (0, code_1.allSchemaProperties)(schema2); + const alwaysValidPatterns = patterns.filter((p2) => (0, util_1.alwaysValidSchema)(it3, schema2[p2])); + if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it3.opts.unevaluated || it3.props === true)) { + return; + } + const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties; + const valid = gen.name("valid"); + if (it3.props !== true && !(it3.props instanceof codegen_1.Name)) { + it3.props = (0, util_2.evaluatedPropsToName)(gen, it3.props); + } + const { props } = it3; + validatePatternProperties(); + function validatePatternProperties() { + for (const pat of patterns) { + if (checkProperties) + checkMatchingProperties(pat); + if (it3.allErrors) { + validateProperties(pat); + } else { + gen.var(valid, true); + validateProperties(pat); + gen.if(valid); + } + } + } + function checkMatchingProperties(pat) { + for (const prop in checkProperties) { + if (new RegExp(pat).test(prop)) { + (0, util_1.checkStrictMode)(it3, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`); + } + } + } + function validateProperties(pat) { + gen.forIn("key", data, (key) => { + gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => { + const alwaysValid = alwaysValidPatterns.includes(pat); + if (!alwaysValid) { + cxt.subschema({ + keyword: "patternProperties", + schemaProp: pat, + dataProp: key, + dataPropType: util_2.Type.Str + }, valid); + } + if (it3.opts.unevaluated && props !== true) { + gen.assign((0, codegen_1._)`${props}[${key}]`, true); + } else if (!alwaysValid && !it3.allErrors) { + gen.if((0, codegen_1.not)(valid), () => gen.break()); + } + }); + }); + } } - super.onResponseEnd(controller, {}) - }) - } - - /** - * Cleans up decompressor references to prevent memory leaks - * @returns {void} - */ - #cleanupDecompressors () { - this.#decompressors.length = 0 - } - - /** - * @param {Controller} controller - * @param {number} statusCode - * @param {Record} headers - * @param {string} statusMessage - * @returns {void} - */ - onResponseStart (controller, statusCode, headers, statusMessage) { - const contentEncoding = headers['content-encoding'] - - // If content encoding is not supported or status code is in skip list - if (this.#shouldSkipDecompression(contentEncoding, statusCode)) { - return super.onResponseStart(controller, statusCode, headers, statusMessage) - } - - const decompressors = this.#createDecompressionChain(contentEncoding.toLowerCase()) - - if (decompressors.length === 0) { - this.#cleanupDecompressors() - return super.onResponseStart(controller, statusCode, headers, statusMessage) - } - - this.#decompressors = decompressors - - // Remove compression headers since we're decompressing - const { 'content-encoding': _, 'content-length': __, ...newHeaders } = headers - - if (this.#decompressors.length === 1) { - this.#setupSingleDecompressor(controller) - } else { - this.#setupMultipleDecompressors(controller) - } - - return super.onResponseStart(controller, statusCode, newHeaders, statusMessage) + }; + exports.default = def; } +}); - /** - * @param {Controller} controller - * @param {Buffer} chunk - * @returns {void} - */ - onResponseData (controller, chunk) { - if (this.#decompressors.length > 0) { - this.#decompressors[0].write(chunk) - return - } - super.onResponseData(controller, chunk) +// node_modules/@redocly/ajv/dist/vocabularies/applicator/not.js +var require_not = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/not.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var util_1 = require_util7(); + var def = { + keyword: "not", + schemaType: ["object", "boolean"], + trackErrors: true, + code(cxt) { + const { gen, schema: schema2, it: it3 } = cxt; + if ((0, util_1.alwaysValidSchema)(it3, schema2)) { + cxt.fail(); + return; + } + const valid = gen.name("valid"); + cxt.subschema({ + keyword: "not", + compositeRule: true, + createErrors: false, + allErrors: false + }, valid); + cxt.failResult(valid, () => cxt.reset(), () => cxt.error()); + }, + error: { message: "must NOT be valid" } + }; + exports.default = def; } +}); - /** - * @param {Controller} controller - * @param {Record | undefined} trailers - * @returns {void} - */ - onResponseEnd (controller, trailers) { - if (this.#decompressors.length > 0) { - this.#decompressors[0].end() - this.#cleanupDecompressors() - return - } - super.onResponseEnd(controller, trailers) +// node_modules/@redocly/ajv/dist/vocabularies/applicator/anyOf.js +var require_anyOf = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/anyOf.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code2(); + var def = { + keyword: "anyOf", + schemaType: "array", + trackErrors: true, + code: code_1.validateUnion, + error: { message: "must match a schema in anyOf" } + }; + exports.default = def; } +}); - /** - * @param {Controller} controller - * @param {Error} err - * @returns {void} - */ - onResponseError (controller, err) { - if (this.#decompressors.length > 0) { - for (const decompressor of this.#decompressors) { - decompressor.destroy(err) +// node_modules/@redocly/ajv/dist/vocabularies/applicator/oneOf.js +var require_oneOf = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/oneOf.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var error2 = { + message: "must match exactly one schema in oneOf", + params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}` + }; + var def = { + keyword: "oneOf", + schemaType: "array", + trackErrors: true, + error: error2, + code(cxt) { + const { gen, schema: schema2, parentSchema, it: it3 } = cxt; + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + if (it3.opts.discriminator && parentSchema.discriminator) + return; + const schArr = schema2; + const valid = gen.let("valid", false); + const passing = gen.let("passing", null); + const schValid = gen.name("_valid"); + cxt.setParams({ passing }); + gen.block(validateOneOf); + cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); + function validateOneOf() { + schArr.forEach((sch, i2) => { + let schCxt; + if ((0, util_1.alwaysValidSchema)(it3, sch)) { + gen.var(schValid, true); + } else { + schCxt = cxt.subschema({ + keyword: "oneOf", + schemaProp: i2, + compositeRule: true + }, schValid); + } + if (i2 > 0) { + gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i2}]`).else(); + } + gen.if(schValid, () => { + gen.assign(valid, true); + gen.assign(passing, i2); + if (schCxt) + cxt.mergeEvaluated(schCxt, codegen_1.Name); + }); + }); + } } - this.#cleanupDecompressors() - } - super.onResponseError(controller, err) + }; + exports.default = def; } -} +}); -/** - * Creates a decompression interceptor for HTTP responses - * @param {DecompressHandlerOptions} [options] - Options for the interceptor - * @returns {Function} - Interceptor function - */ -function createDecompressInterceptor (options = {}) { - // Emit experimental warning only once - if (!warningEmitted) { - process.emitWarning( - 'DecompressInterceptor is experimental and subject to change', - 'ExperimentalWarning' - ) - warningEmitted = true +// node_modules/@redocly/ajv/dist/vocabularies/applicator/allOf.js +var require_allOf = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/allOf.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var util_1 = require_util7(); + var def = { + keyword: "allOf", + schemaType: "array", + code(cxt) { + const { gen, schema: schema2, it: it3 } = cxt; + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + const valid = gen.name("valid"); + schema2.forEach((sch, i2) => { + if ((0, util_1.alwaysValidSchema)(it3, sch)) + return; + const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i2 }, valid, true); + cxt.ok(valid); + cxt.mergeEvaluated(schCxt); + }); + } + }; + exports.default = def; } +}); - return (dispatch) => { - return (opts, handler) => { - const decompressHandler = new DecompressHandler(handler, options) - return dispatch(opts, decompressHandler) +// node_modules/@redocly/ajv/dist/vocabularies/applicator/if.js +var require_if = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/if.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var error2 = { + message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`, + params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}` + }; + var def = { + keyword: "if", + schemaType: ["object", "boolean"], + trackErrors: true, + error: error2, + code(cxt) { + const { gen, parentSchema, it: it3 } = cxt; + if (parentSchema.then === void 0 && parentSchema.else === void 0) { + (0, util_1.checkStrictMode)(it3, '"if" without "then" and "else" is ignored'); + } + const hasThen = hasSchema(it3, "then"); + const hasElse = hasSchema(it3, "else"); + if (!hasThen && !hasElse) + return; + const valid = gen.let("valid", true); + const schValid = gen.name("_valid"); + validateIf(); + cxt.reset(); + if (hasThen && hasElse) { + const ifClause = gen.let("ifClause"); + cxt.setParams({ ifClause }); + gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause)); + } else if (hasThen) { + gen.if(schValid, validateClause("then")); + } else { + gen.if((0, codegen_1.not)(schValid), validateClause("else")); + } + cxt.pass(valid, () => cxt.error(true)); + function validateIf() { + const schCxt = cxt.subschema({ + keyword: "if", + compositeRule: true, + createErrors: false, + allErrors: false + }, schValid); + cxt.mergeEvaluated(schCxt); + } + function validateClause(keyword, ifClause) { + return () => { + const schCxt = cxt.subschema({ keyword }, schValid); + gen.assign(valid, schValid); + cxt.mergeValidEvaluated(schCxt, valid); + if (ifClause) + gen.assign(ifClause, (0, codegen_1._)`${keyword}`); + else + cxt.setParams({ ifClause: keyword }); + }; + } + } + }; + function hasSchema(it3, keyword) { + const schema2 = it3.schema[keyword]; + return schema2 !== void 0 && !(0, util_1.alwaysValidSchema)(it3, schema2); } + exports.default = def; } -} - -module.exports = createDecompressInterceptor - - -/***/ }), - -/***/ 51316: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const diagnosticsChannel = __nccwpck_require__(65714) -const util = __nccwpck_require__(83983) -const DeduplicationHandler = __nccwpck_require__(782) -const { normalizeHeaders, makeCacheKey, makeDeduplicationKey } = __nccwpck_require__(88047) - -const pendingRequestsChannel = diagnosticsChannel.channel('undici:request:pending-requests') - -/** - * @param {import('../../types/interceptors.d.ts').default.DeduplicateInterceptorOpts} [opts] - * @returns {import('../../types/dispatcher.d.ts').default.DispatcherComposeInterceptor} - */ -module.exports = (opts = {}) => { - const { - methods = ['GET'], - skipHeaderNames = [], - excludeHeaderNames = [], - maxBufferSize = 5 * 1024 * 1024 - } = opts - - if (typeof opts !== 'object' || opts === null) { - throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? 'null' : typeof opts}`) - } +}); - if (!Array.isArray(methods)) { - throw new TypeError(`expected opts.methods to be an array, got ${typeof methods}`) +// node_modules/@redocly/ajv/dist/vocabularies/applicator/thenElse.js +var require_thenElse = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/thenElse.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var util_1 = require_util7(); + var def = { + keyword: ["then", "else"], + schemaType: ["object", "boolean"], + code({ keyword, parentSchema, it: it3 }) { + if (parentSchema.if === void 0) + (0, util_1.checkStrictMode)(it3, `"${keyword}" without "if" is ignored`); + } + }; + exports.default = def; } +}); - for (const method of methods) { - if (!util.safeHTTPMethods.includes(method)) { - throw new TypeError(`expected opts.methods to only contain safe HTTP methods, got ${method}`) +// node_modules/@redocly/ajv/dist/vocabularies/applicator/index.js +var require_applicator = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var additionalItems_1 = require_additionalItems(); + var prefixItems_1 = require_prefixItems(); + var items_1 = require_items(); + var items2020_1 = require_items2020(); + var contains_1 = require_contains(); + var dependencies_1 = require_dependencies(); + var propertyNames_1 = require_propertyNames(); + var additionalProperties_1 = require_additionalProperties(); + var properties_1 = require_properties(); + var patternProperties_1 = require_patternProperties(); + var not_1 = require_not(); + var anyOf_1 = require_anyOf(); + var oneOf_1 = require_oneOf(); + var allOf_1 = require_allOf(); + var if_1 = require_if(); + var thenElse_1 = require_thenElse(); + function getApplicator(draft2020 = false) { + const applicator = [ + // any + not_1.default, + anyOf_1.default, + oneOf_1.default, + allOf_1.default, + if_1.default, + thenElse_1.default, + // object + propertyNames_1.default, + additionalProperties_1.default, + dependencies_1.default, + properties_1.default, + patternProperties_1.default + ]; + if (draft2020) + applicator.push(prefixItems_1.default, items2020_1.default); + else + applicator.push(additionalItems_1.default, items_1.default); + applicator.push(contains_1.default); + return applicator; } + exports.default = getApplicator; } +}); - if (!Array.isArray(skipHeaderNames)) { - throw new TypeError(`expected opts.skipHeaderNames to be an array, got ${typeof skipHeaderNames}`) - } - - if (!Array.isArray(excludeHeaderNames)) { - throw new TypeError(`expected opts.excludeHeaderNames to be an array, got ${typeof excludeHeaderNames}`) - } - - if (!Number.isFinite(maxBufferSize) || maxBufferSize <= 0) { - throw new TypeError(`expected opts.maxBufferSize to be a positive finite number, got ${maxBufferSize}`) +// node_modules/@redocly/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +var require_dynamicAnchor = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.dynamicAnchor = void 0; + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var compile_1 = require_compile(); + var ref_1 = require_ref(); + var def = { + keyword: "$dynamicAnchor", + schemaType: "string", + code: (cxt) => dynamicAnchor(cxt, cxt.schema) + }; + function dynamicAnchor(cxt, anchor) { + const { gen, it: it3 } = cxt; + it3.schemaEnv.root.dynamicAnchors[anchor] = true; + const v3 = (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`; + const validate = it3.errSchemaPath === "#" ? it3.validateName : _getValidate(cxt); + gen.if((0, codegen_1._)`!${v3}`, () => gen.assign(v3, validate)); + } + exports.dynamicAnchor = dynamicAnchor; + function _getValidate(cxt) { + const { schemaEnv, schema: schema2, self } = cxt.it; + const { root, baseId, localRefs, meta } = schemaEnv.root; + const { schemaId } = self.opts; + const sch = new compile_1.SchemaEnv({ schema: schema2, schemaId, root, baseId, localRefs, meta }); + compile_1.compileSchema.call(self, sch); + return (0, ref_1.getValidate)(cxt, sch); + } + exports.default = def; } +}); - // Convert to lowercase Set for case-insensitive header matching - const skipHeaderNamesSet = new Set(skipHeaderNames.map(name => name.toLowerCase())) - - // Convert to lowercase Set for case-insensitive header exclusion from deduplication key - const excludeHeaderNamesSet = new Set(excludeHeaderNames.map(name => name.toLowerCase())) - - /** - * Map of pending requests for deduplication - * @type {Map} - */ - const pendingRequests = new Map() - - return dispatch => { - return (opts, handler) => { - if (!opts.origin || methods.includes(opts.method) === false) { - return dispatch(opts, handler) - } - - opts = { - ...opts, - headers: normalizeHeaders(opts) - } - - // Skip deduplication if request contains any of the specified headers - if (skipHeaderNamesSet.size > 0) { - for (const headerName of Object.keys(opts.headers)) { - if (skipHeaderNamesSet.has(headerName.toLowerCase())) { - return dispatch(opts, handler) - } - } +// node_modules/@redocly/ajv/dist/vocabularies/dynamic/dynamicRef.js +var require_dynamicRef = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/dynamic/dynamicRef.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.dynamicRef = void 0; + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var ref_1 = require_ref(); + var def = { + keyword: "$dynamicRef", + schemaType: "string", + code: (cxt) => dynamicRef(cxt, cxt.schema) + }; + function dynamicRef(cxt, ref) { + const { gen, keyword, it: it3 } = cxt; + if (ref[0] !== "#") + throw new Error(`"${keyword}" only supports hash fragment reference`); + const anchor = ref.slice(1); + if (it3.allErrors) { + _dynamicRef(); + } else { + const valid = gen.let("valid", false); + _dynamicRef(valid); + cxt.ok(valid); } - - const cacheKey = makeCacheKey(opts) - const dedupeKey = makeDeduplicationKey(cacheKey, excludeHeaderNamesSet) - - // Check if there's already a pending request for this key - const pendingHandler = pendingRequests.get(dedupeKey) - if (pendingHandler) { - // Add this handler to the waiting list when safe. - // If body streaming has already started, this request must be sent independently. - if (pendingHandler.addWaitingHandler(handler)) { - return true + function _dynamicRef(valid) { + if (it3.schemaEnv.root.dynamicAnchors[anchor]) { + const v3 = gen.let("_v", (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`); + gen.if(v3, _callRef(v3, valid), _callRef(it3.validateName, valid)); + } else { + _callRef(it3.validateName, valid)(); } - - return dispatch(opts, handler) } - - // Create a new deduplication handler - const deduplicationHandler = new DeduplicationHandler( - handler, - () => { - // Clean up when request completes - pendingRequests.delete(dedupeKey) - if (pendingRequestsChannel.hasSubscribers) { - pendingRequestsChannel.publish({ size: pendingRequests.size, key: dedupeKey, type: 'removed' }) - } - }, - maxBufferSize - ) - - // Register the pending request - pendingRequests.set(dedupeKey, deduplicationHandler) - if (pendingRequestsChannel.hasSubscribers) { - pendingRequestsChannel.publish({ size: pendingRequests.size, key: dedupeKey, type: 'added' }) + function _callRef(validate, valid) { + return valid ? () => gen.block(() => { + (0, ref_1.callRef)(cxt, validate); + gen.let(valid, true); + }) : () => (0, ref_1.callRef)(cxt, validate); } - - return dispatch(opts, deduplicationHandler) } + exports.dynamicRef = dynamicRef; + exports.default = def; } -} - - -/***/ }), - -/***/ 97334: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const { isIP } = __nccwpck_require__(87503) -const { lookup } = __nccwpck_require__(30604) -const DecoratorHandler = __nccwpck_require__(4117) -const { InvalidArgumentError, InformationalError } = __nccwpck_require__(48045) -const maxInt = Math.pow(2, 31) - 1 - -function hasSafeIterator (headers) { - const prototype = Object.getPrototypeOf(headers) - const ownIterator = Object.prototype.hasOwnProperty.call(headers, Symbol.iterator) - return ownIterator || (prototype != null && prototype !== Object.prototype && typeof headers[Symbol.iterator] === 'function') -} - -function isHostHeader (key) { - return typeof key === 'string' && key.toLowerCase() === 'host' -} - -function normalizeHeaders (headers) { - if (headers == null) { - return null - } - - if (Array.isArray(headers)) { - if (headers.length === 0 || !Array.isArray(headers[0])) { - return headers - } +}); - const normalized = [] - for (const header of headers) { - if (Array.isArray(header) && header.length === 2) { - normalized.push(header[0], header[1]) - } else { - normalized.push(header) +// node_modules/@redocly/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +var require_recursiveAnchor = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var dynamicAnchor_1 = require_dynamicAnchor(); + var util_1 = require_util7(); + var def = { + keyword: "$recursiveAnchor", + schemaType: "boolean", + code(cxt) { + if (cxt.schema) + (0, dynamicAnchor_1.dynamicAnchor)(cxt, ""); + else + (0, util_1.checkStrictMode)(cxt.it, "$recursiveAnchor: false is ignored"); } - } - - return normalized + }; + exports.default = def; } +}); - if (typeof headers === 'object' && hasSafeIterator(headers)) { - const normalized = [] - for (const header of headers) { - if (Array.isArray(header) && header.length === 2) { - normalized.push(header[0], header[1]) - } else { - normalized.push(header) - } - } - - return normalized +// node_modules/@redocly/ajv/dist/vocabularies/dynamic/recursiveRef.js +var require_recursiveRef = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/dynamic/recursiveRef.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var dynamicRef_1 = require_dynamicRef(); + var def = { + keyword: "$recursiveRef", + schemaType: "string", + code: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema) + }; + exports.default = def; } +}); - return headers -} - -function hasHostHeader (headers) { - if (headers == null) { - return false +// node_modules/@redocly/ajv/dist/vocabularies/dynamic/index.js +var require_dynamic = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/dynamic/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var dynamicAnchor_1 = require_dynamicAnchor(); + var dynamicRef_1 = require_dynamicRef(); + var recursiveAnchor_1 = require_recursiveAnchor(); + var recursiveRef_1 = require_recursiveRef(); + var dynamic = [dynamicAnchor_1.default, dynamicRef_1.default, recursiveAnchor_1.default, recursiveRef_1.default]; + exports.default = dynamic; } +}); - if (Array.isArray(headers)) { - if (headers.length === 0) { - return false - } - - for (let i = 0; i < headers.length; i += 2) { - if (isHostHeader(headers[i])) { - return true - } - } - - return false +// node_modules/@redocly/ajv/dist/vocabularies/validation/dependentRequired.js +var require_dependentRequired = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/dependentRequired.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var dependencies_1 = require_dependencies(); + var def = { + keyword: "dependentRequired", + type: "object", + schemaType: "object", + error: dependencies_1.error, + code: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt) + }; + exports.default = def; } +}); - if (typeof headers === 'object') { - for (const key in headers) { - if (isHostHeader(key)) { - return true - } - } +// node_modules/@redocly/ajv/dist/vocabularies/applicator/dependentSchemas.js +var require_dependentSchemas = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/applicator/dependentSchemas.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var dependencies_1 = require_dependencies(); + var def = { + keyword: "dependentSchemas", + type: "object", + schemaType: "object", + code: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt) + }; + exports.default = def; } +}); - return false -} - -function withHostHeader (host, headers) { - const normalizedHeaders = normalizeHeaders(headers) - - if (hasHostHeader(normalizedHeaders)) { - return normalizedHeaders +// node_modules/@redocly/ajv/dist/vocabularies/validation/limitContains.js +var require_limitContains = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/limitContains.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var util_1 = require_util7(); + var def = { + keyword: ["maxContains", "minContains"], + type: "array", + schemaType: "number", + code({ keyword, parentSchema, it: it3 }) { + if (parentSchema.contains === void 0) { + (0, util_1.checkStrictMode)(it3, `"${keyword}" without "contains" is ignored`); + } + } + }; + exports.default = def; } +}); - if (Array.isArray(normalizedHeaders)) { - return ['host', host, ...normalizedHeaders] +// node_modules/@redocly/ajv/dist/vocabularies/next.js +var require_next = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/next.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var dependentRequired_1 = require_dependentRequired(); + var dependentSchemas_1 = require_dependentSchemas(); + var limitContains_1 = require_limitContains(); + var next = [dependentRequired_1.default, dependentSchemas_1.default, limitContains_1.default]; + exports.default = next; } +}); - if (normalizedHeaders && typeof normalizedHeaders === 'object') { - return { - host, - ...normalizedHeaders - } +// node_modules/@redocly/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +var require_unevaluatedProperties = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var names_1 = require_names(); + var error2 = { + message: "must NOT have unevaluated properties", + params: ({ params }) => (0, codegen_1._)`{unevaluatedProperty: ${params.unevaluatedProperty}}` + }; + var def = { + keyword: "unevaluatedProperties", + type: "object", + schemaType: ["boolean", "object"], + allowUndefined: true, + trackErrors: true, + error: error2, + code(cxt) { + const { gen, schema: schema2 = cxt.it.opts.defaultUnevaluatedProperties, data, errsCount, it: it3 } = cxt; + const isForced2 = cxt.schema === void 0 && cxt.it.opts.defaultUnevaluatedProperties === false; + if (!errsCount) + throw new Error("ajv implementation error"); + const { allErrors, props } = it3; + if (props instanceof codegen_1.Name) { + gen.if((0, codegen_1._)`${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key)))); + } else if (props !== true) { + const staticCheck = () => gen.forIn("key", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key))); + if (isForced2 && it3.errorPath.emptyStr() && !it3.compositeRule) { + gen.if((0, codegen_1._)`${names_1.default.isAllOfVariant} === 0`, staticCheck); + } else { + if (!it3.compositeRule || cxt.schema !== void 0) { + staticCheck(); + } + } + } + if (!isForced2) { + it3.props = true; + } + cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); + function unevaluatedPropCode(key) { + if (schema2 === false) { + cxt.setParams({ unevaluatedProperty: key }); + cxt.error(); + if (!allErrors) + gen.break(); + return; + } + if (!(0, util_1.alwaysValidSchema)(it3, schema2)) { + const valid = gen.name("valid"); + cxt.subschema({ + keyword: "unevaluatedProperties", + dataProp: key, + dataPropType: util_1.Type.Str + }, valid); + if (!allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + } + } + function unevaluatedDynamic(evaluatedProps, key) { + return (0, codegen_1._)`!${evaluatedProps} || !${evaluatedProps}[${key}]`; + } + function unevaluatedStatic(evaluatedProps, key) { + const ps2 = []; + for (const p2 in evaluatedProps) { + if (evaluatedProps[p2] === true) + ps2.push((0, codegen_1._)`${key} !== ${p2}`); + } + return (0, codegen_1.and)(...ps2); + } + } + }; + exports.default = def; } +}); - return { host } -} - -class DNSStorage { - #maxItems = 0 - #records = new Map() - - constructor (opts) { - this.#maxItems = opts.maxItems +// node_modules/@redocly/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +var require_unevaluatedItems = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util7(); + var error2 = { + message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, + params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` + }; + var def = { + keyword: "unevaluatedItems", + type: "array", + schemaType: ["boolean", "object"], + error: error2, + code(cxt) { + const { gen, schema: schema2, data, it: it3 } = cxt; + const items = it3.items || 0; + if (items === true) + return; + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + if (schema2 === false) { + cxt.setParams({ len: items }); + cxt.fail((0, codegen_1._)`${len} > ${items}`); + } else if (typeof schema2 == "object" && !(0, util_1.alwaysValidSchema)(it3, schema2)) { + const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items}`); + gen.if((0, codegen_1.not)(valid), () => validateItems(valid, items)); + cxt.ok(valid); + } + it3.items = true; + function validateItems(valid, from) { + gen.forRange("i", from, len, (i2) => { + cxt.subschema({ keyword: "unevaluatedItems", dataProp: i2, dataPropType: util_1.Type.Num }, valid); + if (!it3.allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + }); + } + } + }; + exports.default = def; } +}); - get size () { - return this.#records.size +// node_modules/@redocly/ajv/dist/vocabularies/unevaluated/index.js +var require_unevaluated = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/unevaluated/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var unevaluatedProperties_1 = require_unevaluatedProperties(); + var unevaluatedItems_1 = require_unevaluatedItems(); + var unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default]; + exports.default = unevaluated; } +}); - get (hostname) { - return this.#records.get(hostname) ?? null +// node_modules/@redocly/ajv/dist/vocabularies/format/format.js +var require_format = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/format/format.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error2 = { + message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`, + params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}` + }; + var def = { + keyword: "format", + type: ["number", "string"], + schemaType: "string", + $data: true, + error: error2, + code(cxt, ruleType) { + const { gen, data, $data, schema: schema2, schemaCode, it: it3 } = cxt; + const { opts, errSchemaPath, schemaEnv, self } = it3; + if (!opts.validateFormats) + return; + if ($data) + validate$DataFormat(); + else + validateFormat(); + function validate$DataFormat() { + const fmts = gen.scopeValue("formats", { + ref: self.formats, + code: opts.code.formats + }); + const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`); + const fType = gen.let("fType"); + const format = gen.let("format"); + gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || "string"`).assign(format, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`"string"`).assign(format, fDef)); + cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt())); + function unknownFmt() { + if (opts.strictSchema === false) + return codegen_1.nil; + return (0, codegen_1._)`${schemaCode} && !${format}`; + } + function invalidFmt() { + const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` : (0, codegen_1._)`${format}(${data})`; + const validData = (0, codegen_1._)`(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))`; + return (0, codegen_1._)`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`; + } + } + function validateFormat() { + const formatDef = self.formats[schema2]; + if (!formatDef) { + unknownFormat(); + return; + } + if (formatDef === true) + return; + const [fmtType, format, fmtRef] = getFormat(formatDef); + if (fmtType === ruleType) + cxt.pass(validCondition()); + function unknownFormat() { + if (opts.strictSchema === false) { + self.logger.warn(unknownMsg()); + return; + } + throw new Error(unknownMsg()); + function unknownMsg() { + return `unknown format "${schema2}" ignored in schema at path "${errSchemaPath}"`; + } + } + function getFormat(fmtDef) { + const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema2)}` : void 0; + const fmt = gen.scopeValue("formats", { key: schema2, ref: fmtDef, code }); + if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) { + return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${fmt}.validate`]; + } + return ["string", fmtDef, fmt]; + } + function validCondition() { + if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) { + if (!schemaEnv.$async) + throw new Error("async format in sync schema"); + return (0, codegen_1._)`await ${fmtRef}(${data})`; + } + return typeof format == "function" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`; + } + } + } + }; + exports.default = def; } +}); - set (hostname, records) { - this.#records.set(hostname, records) +// node_modules/@redocly/ajv/dist/vocabularies/format/index.js +var require_format2 = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/format/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var format_1 = require_format(); + var format = [format_1.default]; + exports.default = format; } +}); - delete (hostname) { - this.#records.delete(hostname) +// node_modules/@redocly/ajv/dist/vocabularies/metadata.js +var require_metadata = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/metadata.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.contentVocabulary = exports.metadataVocabulary = void 0; + exports.metadataVocabulary = [ + "title", + "description", + "default", + "deprecated", + /** + * readOnly/writeOnly are handled as validation keywords when OAS context is provided. + * Keeping them here would register them as annotation-only metadata and would + * prevent the context-aware validation behavior. + * + * @see ./validation/readOnly.ts + * @see ./validation/writeOnly.ts + */ + // "readOnly", + // "writeOnly", + "examples" + ]; + exports.contentVocabulary = [ + "contentMediaType", + "contentEncoding", + "contentSchema" + ]; } +}); - // Delegate to storage decide can we do more lookups or not - full () { - return this.size >= this.#maxItems +// node_modules/@redocly/ajv/dist/vocabularies/draft2020.js +var require_draft2020 = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/draft2020.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var core_1 = require_core3(); + var validation_1 = require_validation(); + var applicator_1 = require_applicator(); + var dynamic_1 = require_dynamic(); + var next_1 = require_next(); + var unevaluated_1 = require_unevaluated(); + var format_1 = require_format2(); + var metadata_1 = require_metadata(); + var draft2020Vocabularies = [ + dynamic_1.default, + core_1.default, + validation_1.default, + (0, applicator_1.default)(true), + format_1.default, + metadata_1.metadataVocabulary, + metadata_1.contentVocabulary, + next_1.default, + unevaluated_1.default + ]; + exports.default = draft2020Vocabularies; } -} - -class DNSInstance { - #maxTTL = 0 - #maxItems = 0 - dualStack = true - affinity = null - lookup = null - pick = null - storage = 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 - this.storage = opts.storage ?? new DNSStorage(opts) +// node_modules/@redocly/ajv/dist/vocabularies/discriminator/types.js +var require_types = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/discriminator/types.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DiscrError = void 0; + var DiscrError; + (function(DiscrError2) { + DiscrError2["Tag"] = "tag"; + DiscrError2["Mapping"] = "mapping"; + })(DiscrError || (exports.DiscrError = DiscrError = {})); } +}); - runLookup (origin, opts, cb) { - const ips = this.storage.get(origin.hostname) - - // If full, we just return the origin - if (ips == null && this.storage.full()) { - cb(null, origin) - return - } - - const newOpts = { - affinity: this.affinity, - dualStack: this.dualStack, - lookup: this.lookup, - pick: this.pick, - ...opts.dns, - maxTTL: this.#maxTTL, - maxItems: this.#maxItems +// node_modules/@redocly/ajv/dist/vocabularies/discriminator/index.js +var require_discriminator = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/discriminator/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var types_1 = require_types(); + var compile_1 = require_compile(); + var ref_error_1 = require_ref_error(); + var util_1 = require_util7(); + var error2 = { + message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf or anyOf`, + params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}` + }; + function getDiscriminatorPropertyFromAllOf(sch, tagName) { + var _a; + if (!sch.allOf || !Array.isArray(sch.allOf)) { + return void 0; + } + for (const subschema of sch.allOf) { + if ((_a = subschema === null || subschema === void 0 ? void 0 : subschema.properties) === null || _a === void 0 ? void 0 : _a[tagName]) { + return subschema.properties[tagName]; + } + } + return void 0; } - - // 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 + var def = { + keyword: "discriminator", + type: "object", + schemaType: "object", + error: error2, + code(cxt) { + const { gen, data, schema: schema2, parentSchema, it: it3 } = cxt; + const keyword = parentSchema.oneOf ? "oneOf" : parentSchema.anyOf ? "anyOf" : void 0; + if (!it3.opts.discriminator) { + throw new Error("discriminator: requires discriminator option"); + } + const tagName = schema2.propertyName; + if (typeof tagName != "string") + throw new Error("discriminator: requires propertyName"); + if (!keyword) + throw new Error("discriminator: requires oneOf or anyOf composite keyword"); + const parentSchemaVariants = parentSchema[keyword]; + const valid = gen.let("valid", false); + const tag = gen.const("tag", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`); + gen.if((0, codegen_1._)`typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName })); + cxt.ok(valid); + function validateMapping() { + const mapping = getMapping(); + gen.if(false); + for (const tagValue in mapping) { + gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`); + gen.assign(valid, applyTagSchema(mapping[tagValue])); + } + gen.else(); + cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName }); + gen.endIf(); } - - this.setRecords(origin, addresses) - const records = this.storage.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 = '' + function applyTagSchema(schemaProp) { + const _valid = gen.name("valid"); + const schCxt = cxt.subschema({ keyword, schemaProp }, _valid); + cxt.mergeEvaluated(schCxt, codegen_1.Name); + return _valid; + } + function getMapping() { + var _a; + const discriminatorMapping = {}; + const topRequired = hasRequired(parentSchema); + let tagRequired = true; + for (let i2 = 0; i2 < parentSchemaVariants.length; i2++) { + let sch = parentSchemaVariants[i2]; + const schRef = sch === null || sch === void 0 ? void 0 : sch.$ref; + if (schRef && schema2.mapping) { + const { mapping } = schema2; + const matchedKeys = Object.keys(mapping).filter((key) => mapping[key] === sch.$ref); + if (matchedKeys.length) { + for (const key of matchedKeys) { + addMapping(key, i2); + } + continue; + } + } + if (schRef && !(0, util_1.schemaHasRulesButRef)(sch, it3.self.RULES)) { + sch = compile_1.resolveRef.call(it3.self, it3.schemaEnv.root, it3.baseId, schRef); + if (sch instanceof compile_1.SchemaEnv) + sch = sch.schema; + if (sch === void 0) + throw new ref_error_1.default(it3.opts.uriResolver, it3.baseId, schRef); + } + let propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName]; + if (!propSch && (sch === null || sch === void 0 ? void 0 : sch.allOf)) { + propSch = getDiscriminatorPropertyFromAllOf(sch, tagName); + } + if (typeof propSch != "object") { + throw new Error(`discriminator: ${keyword} subschemas (or referenced schemas) must have "properties/${tagName}" or match mapping`); + } + tagRequired = tagRequired && (topRequired || hasRequired(sch)); + addMappings(propSch, i2); + } + if (!tagRequired) + throw new Error(`discriminator: "${tagName}" must be required`); + return discriminatorMapping; + function hasRequired(sch) { + if (Array.isArray(sch.required) && sch.required.includes(tagName)) { + return true; + } + if (sch.allOf && Array.isArray(sch.allOf)) { + for (const subschema of sch.allOf) { + const subSch = subschema; + if (Array.isArray(subSch.required) && subSch.required.includes(tagName)) { + return true; + } + } + } + return false; + } + function addMappings(sch, i2) { + if (sch.const) { + addMapping(sch.const, i2); + } else if (sch.enum) { + for (const tagValue of sch.enum) { + addMapping(tagValue, i2); + } + } else { + throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`); + } + } + function addMapping(tagValue, i2) { + if (typeof tagValue != "string" || tagValue in discriminatorMapping) { + throw new Error(`discriminator: "${tagName}" values must be unique strings`); + } + discriminatorMapping[tagValue] = i2; + } } - - cb( - null, - new URL(`${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.storage.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, - new URL(`${origin.protocol}//${ - ip.family === 6 ? `[${ip.address}]` : ip.address - }${port}`) - ) - } + }; + exports.default = def; } +}); - #defaultLookup (origin, opts, cb) { - lookup( - origin.hostname, - { - all: true, - family: this.dualStack === false ? this.affinity : 0, - order: 'ipv4first' +// node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/schema.json +var require_schema = __commonJS({ + "node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/schema.json"(exports, module3) { + module3.exports = { + $schema: "https://json-schema.org/draft/2020-12/schema", + $id: "https://json-schema.org/draft/2020-12/schema", + $vocabulary: { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true }, - (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) + $dynamicAnchor: "meta", + title: "Core and Validation specifications meta-schema", + allOf: [ + { $ref: "meta/core" }, + { $ref: "meta/applicator" }, + { $ref: "meta/unevaluated" }, + { $ref: "meta/validation" }, + { $ref: "meta/meta-data" }, + { $ref: "meta/format-annotation" }, + { $ref: "meta/content" } + ], + type: ["object", "boolean"], + $comment: "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.", + properties: { + definitions: { + $comment: '"definitions" has been replaced by "$defs".', + type: "object", + additionalProperties: { $dynamicRef: "#meta" }, + deprecated: true, + default: {} + }, + dependencies: { + $comment: '"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.', + type: "object", + additionalProperties: { + anyOf: [{ $dynamicRef: "#meta" }, { $ref: "meta/validation#/$defs/stringArray" }] + }, + deprecated: true, + default: {} + }, + $recursiveAnchor: { + $comment: '"$recursiveAnchor" has been replaced by "$dynamicAnchor".', + $ref: "meta/core#/$defs/anchorString", + deprecated: true + }, + $recursiveRef: { + $comment: '"$recursiveRef" has been replaced by "$dynamicRef".', + $ref: "meta/core#/$defs/uriReferenceString", + deprecated: true } - - 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 +// node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +var require_applicator2 = __commonJS({ + "node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"(exports, module3) { + module3.exports = { + $schema: "https://json-schema.org/draft/2020-12/schema", + $id: "https://json-schema.org/draft/2020-12/meta/applicator", + $vocabulary: { + "https://json-schema.org/draft/2020-12/vocab/applicator": true + }, + $dynamicAnchor: "meta", + title: "Applicator vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + prefixItems: { $ref: "#/$defs/schemaArray" }, + items: { $dynamicRef: "#meta" }, + contains: { $dynamicRef: "#meta" }, + additionalProperties: { $dynamicRef: "#meta" }, + properties: { + type: "object", + additionalProperties: { $dynamicRef: "#meta" }, + default: {} + }, + patternProperties: { + type: "object", + additionalProperties: { $dynamicRef: "#meta" }, + propertyNames: { format: "regex" }, + default: {} + }, + dependentSchemas: { + type: "object", + additionalProperties: { $dynamicRef: "#meta" }, + default: {} + }, + propertyNames: { $dynamicRef: "#meta" }, + if: { $dynamicRef: "#meta" }, + then: { $dynamicRef: "#meta" }, + else: { $dynamicRef: "#meta" }, + allOf: { $ref: "#/$defs/schemaArray" }, + anyOf: { $ref: "#/$defs/schemaArray" }, + oneOf: { $ref: "#/$defs/schemaArray" }, + not: { $dynamicRef: "#meta" } + }, + $defs: { + schemaArray: { + type: "array", + minItems: 1, + items: { $dynamicRef: "#meta" } } } + }; + } +}); - if (records[affinity] != null && records[affinity].ips.length > 0) { - family = records[affinity] - } else { - family = records[affinity === 4 ? 6 : 4] +// node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +var require_unevaluated2 = __commonJS({ + "node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"(exports, module3) { + module3.exports = { + $schema: "https://json-schema.org/draft/2020-12/schema", + $id: "https://json-schema.org/draft/2020-12/meta/unevaluated", + $vocabulary: { + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true + }, + $dynamicAnchor: "meta", + title: "Unevaluated applicator vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + unevaluatedItems: { $dynamicRef: "#meta" }, + unevaluatedProperties: { $dynamicRef: "#meta" } } - } 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 + }; } +}); - pickFamily (origin, ipFamily) { - const records = this.storage.get(origin.hostname)?.records - if (!records) { - return null - } - - const family = records[ipFamily] - if (!family) { - return null - } - - if (family.offset == null || family.offset === maxInt) { - family.offset = 0 - } else { - family.offset++ - } - - const position = family.offset % family.ips.length - const 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 ip +// node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/content.json +var require_content = __commonJS({ + "node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/content.json"(exports, module3) { + module3.exports = { + $schema: "https://json-schema.org/draft/2020-12/schema", + $id: "https://json-schema.org/draft/2020-12/meta/content", + $vocabulary: { + "https://json-schema.org/draft/2020-12/vocab/content": true + }, + $dynamicAnchor: "meta", + title: "Content vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + contentEncoding: { type: "string" }, + contentMediaType: { type: "string" }, + contentSchema: { $dynamicRef: "#meta" } + } + }; } +}); - setRecords (origin, addresses) { - const timestamp = Date.now() - const records = { records: { 4: null, 6: null } } - let minTTL = this.#maxTTL - 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) - minTTL = Math.min(minTTL, record.ttl) - } else { - record.ttl = this.#maxTTL +// node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/core.json +var require_core4 = __commonJS({ + "node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/core.json"(exports, module3) { + module3.exports = { + $schema: "https://json-schema.org/draft/2020-12/schema", + $id: "https://json-schema.org/draft/2020-12/meta/core", + $vocabulary: { + "https://json-schema.org/draft/2020-12/vocab/core": true + }, + $dynamicAnchor: "meta", + title: "Core vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + $id: { + $ref: "#/$defs/uriReferenceString", + $comment: "Non-empty fragments not allowed.", + pattern: "^[^#]*#?$" + }, + $schema: { $ref: "#/$defs/uriString" }, + $ref: { $ref: "#/$defs/uriReferenceString" }, + $anchor: { $ref: "#/$defs/anchorString" }, + $dynamicRef: { $ref: "#/$defs/uriReferenceString" }, + $dynamicAnchor: { $ref: "#/$defs/anchorString" }, + $vocabulary: { + type: "object", + propertyNames: { $ref: "#/$defs/uriString" }, + additionalProperties: { + type: "boolean" + } + }, + $comment: { + type: "string" + }, + $defs: { + type: "object", + additionalProperties: { $dynamicRef: "#meta" } + } + }, + $defs: { + anchorString: { + type: "string", + pattern: "^[A-Za-z_][-A-Za-z0-9._]*$" + }, + uriString: { + type: "string", + format: "uri" + }, + uriReferenceString: { + type: "string", + format: "uri-reference" + } } - - const familyRecords = records.records[record.family] ?? { ips: [] } - - familyRecords.ips.push(record) - records.records[record.family] = familyRecords - } - - // We provide a default TTL if external storage will be used without TTL per record-level support - this.storage.set(origin.hostname, records, { ttl: minTTL }) + }; } +}); - deleteRecords (origin) { - this.storage.delete(origin.hostname) +// node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +var require_format_annotation = __commonJS({ + "node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"(exports, module3) { + module3.exports = { + $schema: "https://json-schema.org/draft/2020-12/schema", + $id: "https://json-schema.org/draft/2020-12/meta/format-annotation", + $vocabulary: { + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true + }, + $dynamicAnchor: "meta", + title: "Format vocabulary meta-schema for annotation results", + type: ["object", "boolean"], + properties: { + format: { type: "string" } + } + }; } +}); - getHandler (meta, opts) { - return new DNSDispatchHandler(this, meta, opts) +// node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +var require_meta_data = __commonJS({ + "node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"(exports, module3) { + module3.exports = { + $schema: "https://json-schema.org/draft/2020-12/schema", + $id: "https://json-schema.org/draft/2020-12/meta/meta-data", + $vocabulary: { + "https://json-schema.org/draft/2020-12/vocab/meta-data": true + }, + $dynamicAnchor: "meta", + title: "Meta-data vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + title: { + type: "string" + }, + description: { + type: "string" + }, + default: true, + deprecated: { + type: "boolean", + default: false + }, + readOnly: { + type: "boolean", + default: false + }, + writeOnly: { + type: "boolean", + default: false + }, + examples: { + type: "array", + items: true + } + } + }; } -} - -class DNSDispatchHandler extends DecoratorHandler { - #state = null - #opts = null - #dispatch = null - #origin = null - #controller = null - #newOrigin = null - #firstTry = true - - constructor (state, { origin, handler, dispatch, newOrigin }, opts) { - super(handler) - this.#origin = origin - this.#newOrigin = newOrigin - this.#opts = { ...opts } - this.#state = state - this.#dispatch = dispatch - } - - onResponseError (controller, err) { - switch (err.code) { - case 'ETIMEDOUT': - case 'ECONNREFUSED': { - if (this.#state.dualStack) { - if (!this.#firstTry) { - super.onResponseError(controller, err) - return - } - this.#firstTry = false - - // Pick an ip address from the other family - const otherFamily = this.#newOrigin.hostname[0] === '[' ? 4 : 6 - const ip = this.#state.pickFamily(this.#origin, otherFamily) - if (ip == null) { - super.onResponseError(controller, err) - return - } - - let port - if (typeof ip.port === 'number') { - port = `:${ip.port}` - } else if (this.#origin.port !== '') { - port = `:${this.#origin.port}` - } else { - port = '' - } +}); - const dispatchOpts = { - ...this.#opts, - origin: `${this.#origin.protocol}//${ - ip.family === 6 ? `[${ip.address}]` : ip.address - }${port}`, - headers: withHostHeader(this.#origin.host, this.#opts.headers) +// node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/validation.json +var require_validation2 = __commonJS({ + "node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/validation.json"(exports, module3) { + module3.exports = { + $schema: "https://json-schema.org/draft/2020-12/schema", + $id: "https://json-schema.org/draft/2020-12/meta/validation", + $vocabulary: { + "https://json-schema.org/draft/2020-12/vocab/validation": true + }, + $dynamicAnchor: "meta", + title: "Validation vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + type: { + anyOf: [ + { $ref: "#/$defs/simpleTypes" }, + { + type: "array", + items: { $ref: "#/$defs/simpleTypes" }, + minItems: 1, + uniqueItems: true + } + ] + }, + const: true, + enum: { + type: "array", + items: true + }, + multipleOf: { + type: "number", + exclusiveMinimum: 0 + }, + maximum: { + type: "number" + }, + exclusiveMaximum: { + type: "number" + }, + minimum: { + type: "number" + }, + exclusiveMinimum: { + type: "number" + }, + maxLength: { $ref: "#/$defs/nonNegativeInteger" }, + minLength: { $ref: "#/$defs/nonNegativeIntegerDefault0" }, + pattern: { + type: "string", + format: "regex" + }, + maxItems: { $ref: "#/$defs/nonNegativeInteger" }, + minItems: { $ref: "#/$defs/nonNegativeIntegerDefault0" }, + uniqueItems: { + type: "boolean", + default: false + }, + maxContains: { $ref: "#/$defs/nonNegativeInteger" }, + minContains: { + $ref: "#/$defs/nonNegativeInteger", + default: 1 + }, + maxProperties: { $ref: "#/$defs/nonNegativeInteger" }, + minProperties: { $ref: "#/$defs/nonNegativeIntegerDefault0" }, + required: { $ref: "#/$defs/stringArray" }, + dependentRequired: { + type: "object", + additionalProperties: { + $ref: "#/$defs/stringArray" } - this.#dispatch(dispatchOpts, this) - return } + }, + $defs: { + nonNegativeInteger: { + type: "integer", + minimum: 0 + }, + nonNegativeIntegerDefault0: { + $ref: "#/$defs/nonNegativeInteger", + default: 0 + }, + simpleTypes: { + enum: ["array", "boolean", "integer", "null", "number", "object", "string"] + }, + stringArray: { + type: "array", + items: { type: "string" }, + uniqueItems: true, + default: [] + } + } + }; + } +}); - // if dual-stack disabled, we error out - super.onResponseError(controller, err) - break +// node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/index.js +var require_json_schema_2020_12 = __commonJS({ + "node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var metaSchema = require_schema(); + var applicator = require_applicator2(); + var unevaluated = require_unevaluated2(); + var content = require_content(); + var core5 = require_core4(); + var format = require_format_annotation(); + var metadata = require_meta_data(); + var validation = require_validation2(); + var META_SUPPORT_DATA = ["/properties"]; + function addMetaSchema2020($data) { + ; + [ + metaSchema, + applicator, + unevaluated, + content, + core5, + with$data(this, format), + metadata, + with$data(this, validation) + ].forEach((sch) => this.addMetaSchema(sch, void 0, false)); + return this; + function with$data(ajv2, sch) { + return $data ? ajv2.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch; } - case 'ENOTFOUND': - this.#state.deleteRecords(this.#origin) - super.onResponseError(controller, err) - break - default: - super.onResponseError(controller, err) - break } + exports.default = addMetaSchema2020; + } +}); + +// node_modules/@redocly/ajv/dist/2020.js +var require__ = __commonJS({ + "node_modules/@redocly/ajv/dist/2020.js"(exports, module3) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2020 = void 0; + var core_1 = require_core2(); + var draft2020_1 = require_draft2020(); + var discriminator_1 = require_discriminator(); + var json_schema_2020_12_1 = require_json_schema_2020_12(); + var META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema"; + var Ajv20202 = class extends core_1.default { + constructor(opts = {}) { + super({ + ...opts, + dynamicRef: true, + next: true, + unevaluated: true + }); + } + _addVocabularies() { + super._addVocabularies(); + draft2020_1.default.forEach((v3) => this.addVocabulary(v3)); + if (this.opts.discriminator) + this.addKeyword(discriminator_1.default); + } + _addDefaultMetaSchema() { + super._addDefaultMetaSchema(); + const { $data, meta } = this.opts; + if (!meta) + return; + json_schema_2020_12_1.default.call(this, $data); + this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; + } + defaultMeta() { + return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0); + } + }; + exports.Ajv2020 = Ajv20202; + module3.exports = exports = Ajv20202; + module3.exports.Ajv2020 = Ajv20202; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.default = Ajv20202; + var validate_1 = require_validate(); + Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen(); + Object.defineProperty(exports, "_", { enumerable: true, get: function() { + return codegen_1._; + } }); + Object.defineProperty(exports, "str", { enumerable: true, get: function() { + return codegen_1.str; + } }); + Object.defineProperty(exports, "stringify", { enumerable: true, get: function() { + return codegen_1.stringify; + } }); + Object.defineProperty(exports, "nil", { enumerable: true, get: function() { + return codegen_1.nil; + } }); + Object.defineProperty(exports, "Name", { enumerable: true, get: function() { + return codegen_1.Name; + } }); + Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() { + return codegen_1.CodeGen; + } }); + var validation_error_1 = require_validation_error(); + Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function() { + return validation_error_1.default; + } }); + var ref_error_1 = require_ref_error(); + Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function() { + return ref_error_1.default; + } }); + } +}); + +// node_modules/@redocly/openapi-core/lib/types/json-schema-adapter.js +function findOneOf(schemaOneOf, oneOfs) { + if (oneOfs.some((option) => typeof option === "function")) { + throw new Error("Unexpected oneOf inside oneOf."); } + return (value) => { + let index = schemaOneOf.findIndex((option) => ajv.validate(option, value)); + if (index === -1) { + index = 0; + } + return oneOfs[index]; + }; } - -module.exports = interceptorOpts => { - if ( - interceptorOpts?.maxTTL != null && - (typeof interceptorOpts?.maxTTL !== 'number' || interceptorOpts?.maxTTL < 0) - ) { - throw new InvalidArgumentError('Invalid maxTTL. Must be a positive number') +function transformJSONSchemaToNodeType(propertyName, schema2, ctx) { + if (!schema2 || typeof schema2 === "boolean") { + throw new Error(`Unexpected schema in ${propertyName}.`); } - - 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 (schema2 instanceof Array) { + throw new Error(`Unexpected array schema in ${propertyName}. Try using oneOf instead.`); } - - if ( - interceptorOpts?.affinity != null && - interceptorOpts?.affinity !== 4 && - interceptorOpts?.affinity !== 6 - ) { - throw new InvalidArgumentError('Invalid affinity. Must be either 4 or 6') + if (schema2.type === "null") { + throw new Error(`Unexpected null schema type in ${propertyName} schema.`); } - - if ( - interceptorOpts?.dualStack != null && - typeof interceptorOpts?.dualStack !== 'boolean' - ) { - throw new InvalidArgumentError('Invalid dualStack. Must be a boolean') + if (schema2.type instanceof Array) { + throw new Error(`Unexpected array schema type in ${propertyName} schema. Try using oneOf instead.`); } - - if ( - interceptorOpts?.lookup != null && - typeof interceptorOpts?.lookup !== 'function' - ) { - throw new InvalidArgumentError('Invalid lookup. Must be a function') + if (schema2.type === "string" || schema2.type === "number" || schema2.type === "integer" || schema2.type === "boolean") { + const { default: _5, format: _format, ...rest } = schema2; + return rest; } - - if ( - interceptorOpts?.pick != null && - typeof interceptorOpts?.pick !== 'function' - ) { - throw new InvalidArgumentError('Invalid pick. Must be a function') + if (schema2.type === "object" && !schema2.properties && !schema2.oneOf) { + if (schema2.additionalProperties === void 0 || schema2.additionalProperties === true) { + return { type: "object" }; + } else if (schema2.additionalProperties === false) { + return { type: "object", properties: {} }; + } } - - if ( - interceptorOpts?.storage != null && - (typeof interceptorOpts?.storage?.get !== 'function' || - typeof interceptorOpts?.storage?.set !== 'function' || - typeof interceptorOpts?.storage?.full !== 'function' || - typeof interceptorOpts?.storage?.delete !== 'function' - ) - ) { - throw new InvalidArgumentError('Invalid storage. Must be a object with methods: { get, set, full, delete }') + if (schema2.allOf) { + throw new Error(`Unexpected allOf in ${propertyName}.`); } - - const dualStack = interceptorOpts?.dualStack ?? true - let affinity - if (dualStack) { - affinity = interceptorOpts?.affinity ?? null - } else { - affinity = interceptorOpts?.affinity ?? 4 + if (schema2.anyOf) { + throw new Error(`Unexpected anyOf in ${propertyName}.`); } - - const opts = { - maxTTL: interceptorOpts?.maxTTL ?? 10e3, // Expressed in ms - lookup: interceptorOpts?.lookup ?? null, - pick: interceptorOpts?.pick ?? null, - dualStack, - affinity, - maxItems: interceptorOpts?.maxItems ?? Infinity, - storage: interceptorOpts?.storage + if (isPlainObject(schema2.properties) || isPlainObject(schema2.additionalProperties) || isPlainObject(schema2.items) && (isPlainObject(schema2.items.properties) || isPlainObject(schema2.items.additionalProperties) || schema2.items.oneOf)) { + return extractNodeToContext(propertyName, schema2, ctx); } - - 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) + if (schema2.oneOf) { + if (schema2.discriminator) { + const discriminatedPropertyName = schema2.discriminator?.propertyName; + if (!discriminatedPropertyName) { + throw new Error(`Unexpected discriminator without a propertyName in ${propertyName}.`); } - - instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { - if (err) { - return handler.onResponseError(null, err) + const discriminatorMapping = {}; + const oneOfs = schema2.oneOf.map((option, i2) => { + if (typeof option === "boolean") { + throw new Error(`Unexpected boolean schema in ${propertyName} at position ${i2} in oneOf.`); } - - const dispatchOpts = { - ...origDispatchOpts, - servername: origin.hostname, // For SNI on TLS - origin: newOrigin.origin, - headers: withHostHeader(origin.host, origDispatchOpts.headers) + const discriminatedProperty = option?.properties?.[discriminatedPropertyName]; + if (!discriminatedProperty || typeof discriminatedProperty === "boolean") { + throw new Error(`Unexpected property '${discriminatedProperty}' schema in ${propertyName} at position ${i2} in oneOf.`); } - - dispatch( - dispatchOpts, - instance.getHandler( - { origin, dispatch, handler, newOrigin }, - origDispatchOpts - ) - ) - }) - - return true + const discriminatorValue = discriminatedProperty.const; + const actualTypeName = transformJSONSchemaToNodeType(discriminatorValue, option, ctx); + if (typeof actualTypeName === "string") { + discriminatorMapping[discriminatorValue] = actualTypeName; + } + return actualTypeName; + }); + return (value, key) => { + if (isPlainObject(value)) { + const discriminatedTypeName = value[discriminatedPropertyName]; + if (typeof discriminatedTypeName === "string") { + const actualTypeName = discriminatorMapping[discriminatedTypeName]; + if (actualTypeName && ctx[actualTypeName]) { + return actualTypeName; + } + } + } + return findOneOf(schema2.oneOf, oneOfs)(value, key); + }; + } else { + const oneOfs = schema2.oneOf.map((option, i2) => transformJSONSchemaToNodeType(propertyName + "_" + i2, option, ctx)); + return findOneOf(schema2.oneOf, oneOfs); } } + return schema2; } - - -/***/ }), - -/***/ 66090: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(48045) -const DecoratorHandler = __nccwpck_require__(4117) - -class DumpHandler extends DecoratorHandler { - #maxSize = 1024 * 1024 - #dumped = false - #size = 0 - #controller = null - aborted = false - reason = false - - constructor ({ maxSize, signal }, handler) { - if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) { - throw new InvalidArgumentError('maxSize must be a number greater than 0') - } - - super(handler) - - this.#maxSize = maxSize ?? this.#maxSize - // this.#handler = handler - } - - #abort (reason) { - this.aborted = true - this.reason = reason +function extractNodeToContext(propertyName, schema2, ctx) { + if (!schema2 || typeof schema2 === "boolean") { + throw new Error(`Unexpected schema in ${propertyName}.`); } - - onRequestStart (controller, context) { - controller.abort = this.#abort.bind(this) - this.#controller = controller - - return super.onRequestStart(controller, context) + if (schema2 instanceof Array) { + throw new Error(`Unexpected array schema in ${propertyName}. Try using oneOf instead.`); } - - onResponseStart (controller, statusCode, headers, statusMessage) { - 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 === true) { - return true - } - - return super.onResponseStart(controller, statusCode, headers, statusMessage) + if (schema2.type === "null") { + throw new Error(`Unexpected null schema type in ${propertyName} schema.`); } - - onResponseError (controller, err) { - if (this.#dumped) { - return - } - - // On network errors before connect, controller will be null - err = this.#controller?.reason ?? err - - super.onResponseError(controller, err) + if (schema2.type instanceof Array) { + throw new Error(`Unexpected array schema type in ${propertyName} schema. Try using oneOf instead.`); } - - onResponseData (controller, chunk) { - this.#size = this.#size + chunk.length - - if (this.#size >= this.#maxSize) { - this.#dumped = true - - if (this.aborted === true) { - super.onResponseError(controller, this.reason) - } else { - super.onResponseEnd(controller, {}) - } - } - - return true + const nodeTypeName = schema2.nodeTypeName ?? propertyName; + const properties = {}; + for (const [name, property] of Object.entries(schema2.properties || {})) { + properties[name] = transformJSONSchemaToNodeType(nodeTypeName + "." + name, property, ctx); } - - onResponseEnd (controller, trailers) { - if (this.#dumped) { - return - } - - if (this.#controller.aborted === true) { - super.onResponseError(controller, this.reason) - return - } - - super.onResponseEnd(controller, trailers) + let additionalProperties; + if (isPlainObject(schema2.additionalProperties)) { + additionalProperties = transformJSONSchemaToNodeType(propertyName + "_additionalProperties", schema2.additionalProperties, ctx); } -} - -function createDumpInterceptor ( - { maxSize: defaultMaxSize } = { - maxSize: 1024 * 1024 + if (schema2.additionalProperties === true) { + additionalProperties = {}; } -) { - return dispatch => { - return function Intercept (opts, handler) { - const { dumpMaxSize = defaultMaxSize } = opts - - const dumpHandler = new DumpHandler({ maxSize: dumpMaxSize, signal: opts.signal }, handler) - - return dispatch(opts, dumpHandler) - } + let items; + if (isPlainObject(schema2.items) && (isPlainObject(schema2.items.properties) || isPlainObject(schema2.items.additionalProperties) || schema2.items.oneOf)) { + items = transformJSONSchemaToNodeType(propertyName + "_items", schema2.items, ctx); } -} - -module.exports = createDumpInterceptor - - -/***/ }), - -/***/ 87773: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const RedirectHandler = __nccwpck_require__(30649) - -function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections } = {}) { - return (dispatch) => { - return function Intercept (opts, handler) { - const { maxRedirections = defaultMaxRedirections, ...rest } = opts - - if (maxRedirections == null || maxRedirections === 0) { - return dispatch(opts, handler) + let required = schema2.required; + if (schema2.oneOf && schema2.oneOf.every((option) => !!option.required)) { + required = (value) => { + const requiredList = schema2.oneOf.map((option) => [ + ...schema2.required || [], + ...option.required + ]); + let index = requiredList.findIndex((r2) => r2.every((requiredProp) => value[requiredProp] !== void 0)); + if (index === -1) { + index = 0; } - - const dispatchOpts = { ...rest } // Stop sub dispatcher from also redirecting. - const redirectHandler = new RedirectHandler(dispatch, maxRedirections, dispatchOpts, handler) - return dispatch(dispatchOpts, redirectHandler) - } + return requiredList[index]; + }; } + ctx[nodeTypeName] = { + properties, + additionalProperties, + items, + required, + description: schema2.description, + documentationLink: schema2.documentationLink + }; + return nodeTypeName; } - -module.exports = createRedirectInterceptor - - -/***/ }), - -/***/ 55741: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -// const { parseHeaders } = require('../core/util') -const DecoratorHandler = __nccwpck_require__(4117) -const { ResponseError } = __nccwpck_require__(48045) - -class ResponseErrorHandler extends DecoratorHandler { - #statusCode - #contentType - #decoder - #headers - #body - - constructor (_opts, { handler }) { - super(handler) - } - - #checkContentType (contentType) { - return (this.#contentType ?? '').indexOf(contentType) === 0 - } - - onRequestStart (controller, context) { - this.#statusCode = 0 - this.#contentType = null - this.#decoder = null - this.#headers = null - this.#body = '' - - return super.onRequestStart(controller, context) - } - - onResponseStart (controller, statusCode, headers, statusMessage) { - this.#statusCode = statusCode - this.#headers = headers - this.#contentType = headers['content-type'] - - if (this.#statusCode < 400) { - return super.onResponseStart(controller, statusCode, headers, statusMessage) - } - - if (this.#checkContentType('application/json') || this.#checkContentType('text/plain')) { - this.#decoder = new TextDecoder('utf-8') - } - } - - onResponseData (controller, chunk) { - if (this.#statusCode < 400) { - return super.onResponseData(controller, chunk) - } - - this.#body += this.#decoder?.decode(chunk, { stream: true }) ?? '' +function getNodeTypesFromJSONSchema(schemaName, entrySchema) { + const ctx = {}; + const discriminatorResolver = transformJSONSchemaToNodeType(schemaName, entrySchema, ctx); + return { + ctx, + discriminatorResolver: typeof discriminatorResolver === "function" ? discriminatorResolver : void 0 + }; +} +var import__, ajv; +var init_json_schema_adapter = __esm({ + "node_modules/@redocly/openapi-core/lib/types/json-schema-adapter.js"() { + import__ = __toESM(require__(), 1); + init_is_plain_object(); + ajv = new import__.default({ + strictSchema: false, + allowUnionTypes: true, + useDefaults: true, + allErrors: true, + discriminator: true, + strictTypes: false, + verbose: true + }); } +}); - onResponseEnd (controller, trailers) { - if (this.#statusCode >= 400) { - this.#body += this.#decoder?.decode(undefined, { stream: false }) ?? '' - - if (this.#checkContentType('application/json')) { - try { - this.#body = JSON.parse(this.#body) - } catch { - // Do nothing... +// node_modules/@redocly/openapi-core/lib/types/redocly-yaml.js +import path3 from "node:path"; +function createAssertionDefinitionSubject(nodeNames) { + return { + properties: { + type: { + enum: [.../* @__PURE__ */ new Set(["any", ...nodeNames, "SpecExtension"])], + description: "REQUIRED. Locates the OpenAPI node type that the lint command evaluates." + }, + property: (value) => { + if (Array.isArray(value)) { + return { + type: "array", + items: { type: "string" }, + description: "Property name corresponding to the OpenAPI node type. If a list of properties is provided, assertions evaluate against each property in the sequence. If not provided (or null), assertions evaluate against the key names for the subject node type.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#property-example" + }; + } else if (value === null) { + return null; + } else { + return { + type: "string", + description: "Property name corresponding to the OpenAPI node type. If a list of properties is provided, assertions evaluate against each property in the sequence. If not provided (or null), assertions evaluate against the key names for the subject node type.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#property-example" + }; } + }, + filterInParentKeys: { + type: "array", + items: { type: "string" }, + description: `The name of the subject's parent key that locates where assertions run. An example value given the subject Operation could be filterInParentKeys: [get, put] means that only GET and PUT operations are evaluated for the assertions.`, + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#mutuallyrequired-example" + }, + filterOutParentKeys: { + type: "array", + items: { type: "string" }, + description: `The name of the subject's parent key that excludes where assertions run. An example value given the subject Operation could be filterOutParentKeys: [delete] means that all operations except DELETE operations are evaluated for the assertions.` + }, + matchParentKeys: { + type: "string", + description: `Applies a regex pattern to the subject's parent keys to determine where assertions run. An example value given the subject Operation could be matchParentKeys: /^p/ means that POST, PUT, and PATCH operations are evaluated for the assertions.` } - - let err - const stackTraceLimit = Error.stackTraceLimit - Error.stackTraceLimit = 0 - try { - err = new ResponseError('Response Error', this.#statusCode, { - body: this.#body, - headers: this.#headers - }) - } finally { - Error.stackTraceLimit = stackTraceLimit - } - - super.onResponseError(controller, err) - } else { - super.onResponseEnd(controller, trailers) - } - } - - onResponseError (controller, err) { - super.onResponseError(controller, err) - } + }, + required: ["type"], + description: "REQUIRED. Narrows the subject further by specifying its type, and optionally property, filterParentKeys, etc.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#subject-object" + }; } - -module.exports = () => { - return (dispatch) => { - return function Intercept (opts, handler) { - return dispatch(opts, new ResponseErrorHandler(opts, { handler })) +function createScorecardLevelsItems(nodeTypes) { + return { + ...nodeTypes[i.ScorecardClassicLevel], + properties: { + ...nodeTypes[i.ScorecardClassicLevel]?.properties, + ...configGovernanceProperties } - } + }; } - - -/***/ }), - -/***/ 55558: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const RetryHandler = __nccwpck_require__(86242) - -module.exports = globalOpts => { - return dispatch => { - return function retryInterceptor (opts, handler) { - return dispatch( - opts, - new RetryHandler( - { ...opts, retryOptions: { ...globalOpts, ...opts.retryOptions } }, - { - handler, - dispatch +function createConfigTypes(extraSchemas, config) { + const nodeNames = specVersions.flatMap((version2) => { + const types2 = config ? config.extendTypes(getTypes(version2), version2) : getTypes(version2); + return Object.keys(types2); + }); + const { ctx: nodeTypes } = getNodeTypesFromJSONSchema("rootRedoclyConfigSchema", extraSchemas); + return { + ...CoreConfigTypes, + ConfigRoot: createConfigRoot(nodeTypes), + // This is the REAL config root type + ConfigApisProperties: createConfigApisProperties(nodeTypes), + Subject: createAssertionDefinitionSubject(nodeNames), + ...nodeTypes, + [i.ScorecardClassicLevel]: createScorecardLevelsItems(nodeTypes) + }; +} +var builtInOAS2Rules, builtInOAS3Rules, builtInAsync2Rules, builtInAsync3Rules, builtInArazzo1Rules, builtInOverlay1Rules, builtInOpenRpc1Rules, builtInCommonRules, builtInRules, builtInOas2Decorators, builtInOas3Decorators, builtInDecorators, configGovernanceProperties, ConfigGovernance, createConfigRoot, ConfigApis, createConfigApisProperties, ConfigHTTP, Rules, BuiltinRule, CustomRule, Decorators, BuiltinDecorator, CustomDecorator, Preprocessors, BuiltinPreprocessor, CustomPreprocessor, Schema6, Assertions, Where, ConfigurableRule, CoreConfigTypes, _2, propertiesWithoutTheme, redoclyConfigSchemaWithoutTheme, ConfigTypes, NormalizedConfigTypes; +var init_redocly_yaml = __esm({ + "node_modules/@redocly/openapi-core/lib/types/redocly-yaml.js"() { + init_lib_esm(); + init_oas_types(); + init_ref_utils(); + init_types(); + init_is_custom_rule_id(); + init_omit(); + init_types(); + init_json_schema_adapter(); + builtInOAS2Rules = [ + "info-contact", + "operation-operationId", + "tag-description", + "tags-alphabetical", + "info-license-strict", + "info-license", + "no-ambiguous-paths", + "no-enum-type-mismatch", + "no-http-verbs-in-paths", + "no-identical-paths", + "no-invalid-parameter-examples", + "no-invalid-schema-examples", + "no-path-trailing-slash", + "operation-2xx-response", + "operation-4xx-response", + "operation-description", + "operation-operationId-unique", + "operation-operationId-url-safe", + "operation-parameters-unique", + "operation-singular-tag", + "operation-summary", + "operation-tag-defined", + "parameter-description", + "path-declaration-must-exist", + "path-http-verbs-order", + "path-not-include-query", + "path-params-defined", + "path-parameters-defined", + "path-segment-plural", + "paths-kebab-case", + "required-string-property-missing-min-length", + "response-contains-header", + "scalar-property-missing-example", + "security-defined", + "spec-strict-refs", + "no-required-schema-properties-undefined", + "no-schema-type-mismatch", + "boolean-parameter-prefixes", + "request-mime-type", + "response-contains-property", + "response-mime-type", + "no-duplicated-tag-names" + ]; + builtInOAS3Rules = [ + "info-contact", + "operation-operationId", + "tag-description", + "tags-alphabetical", + "info-license-strict", + "info-license", + "no-ambiguous-paths", + "no-enum-type-mismatch", + "no-http-verbs-in-paths", + "no-identical-paths", + "no-invalid-parameter-examples", + "no-invalid-schema-examples", + "no-path-trailing-slash", + "operation-2xx-response", + "operation-4xx-response", + "operation-description", + "operation-operationId-unique", + "operation-operationId-url-safe", + "operation-parameters-unique", + "operation-singular-tag", + "operation-summary", + "operation-tag-defined", + "parameter-description", + "path-declaration-must-exist", + "path-http-verbs-order", + "path-not-include-query", + "path-params-defined", + "path-parameters-defined", + "path-segment-plural", + "paths-kebab-case", + "required-string-property-missing-min-length", + "response-contains-header", + "scalar-property-missing-example", + "security-defined", + "spec-strict-refs", + "no-required-schema-properties-undefined", + "no-schema-type-mismatch", + "boolean-parameter-prefixes", + "component-name-unique", + "no-empty-servers", + "no-example-value-and-externalValue", + "no-invalid-media-type-examples", + "no-server-example.com", + "no-server-trailing-slash", + "no-server-variables-empty-enum", + "no-undefined-server-variable", + "no-unused-components", + "no-mixed-number-range-constraints", + "operation-4xx-problem-details-rfc7807", + "request-mime-type", + "response-contains-property", + "response-mime-type", + "spec-components-invalid-map-name", + "array-parameter-serialization", + "no-duplicated-tag-names", + "nullable-type-sibling", + "spec-no-invalid-tag-parents", + "spec-no-invalid-encoding-combinations", + "spec-discriminator-defaultMapping", + "spec-example-values", + "spec-querystring-parameters" + ]; + builtInAsync2Rules = [ + "info-contact", + "info-license-strict", + "operation-operationId", + "tag-description", + "tags-alphabetical", + "channels-kebab-case", + "no-channel-trailing-slash", + "no-duplicated-tag-names", + "no-required-schema-properties-undefined", + "no-enum-type-mismatch", + "no-mixed-number-range-constraints", + "no-schema-type-mismatch" + ]; + builtInAsync3Rules = [ + "info-contact", + "info-license-strict", + "operation-operationId", + "tag-description", + "tags-alphabetical", + "channels-kebab-case", + "no-channel-trailing-slash", + "no-duplicated-tag-names", + "no-required-schema-properties-undefined", + "no-enum-type-mismatch", + "no-mixed-number-range-constraints", + "no-schema-type-mismatch" + ]; + builtInArazzo1Rules = [ + "sourceDescription-type", + "workflowId-unique", + "stepId-unique", + "sourceDescription-name-unique", + "sourceDescriptions-not-empty", + "workflow-dependsOn", + "outputs-defined", + "parameters-unique", + "step-onSuccess-unique", + "step-onFailure-unique", + "respect-supported-versions", + "requestBody-replacements-unique", + "no-criteria-xpath", + "criteria-unique", + "no-x-security-scheme-name-without-openapi", + "x-security-scheme-required-values", + "no-x-security-both-scheme-and-scheme-name", + "no-required-schema-properties-undefined", + "no-enum-type-mismatch", + "no-mixed-number-range-constraints", + "no-schema-type-mismatch", + "x-security-scheme-name-reference" + ]; + builtInOverlay1Rules = ["info-contact"]; + builtInOpenRpc1Rules = [ + "info-contact", + "info-license", + "no-unused-components", + "spec-no-duplicated-method-params", + "spec-no-required-params-after-optional" + ]; + builtInCommonRules = ["struct", "no-unresolved-refs"]; + builtInRules = [ + ...builtInOAS2Rules, + ...builtInOAS3Rules, + ...builtInAsync2Rules, + ...builtInAsync3Rules, + ...builtInArazzo1Rules, + ...builtInOverlay1Rules, + ...builtInOpenRpc1Rules, + ...builtInCommonRules + ]; + builtInOas2Decorators = [ + "operation-description-override", + "tag-description-override", + "info-description-override", + "info-override", + "remove-x-internal", + "filter-in", + "filter-out", + "remove-unused-components" + ]; + builtInOas3Decorators = [ + "operation-description-override", + "tag-description-override", + "info-description-override", + "info-override", + "remove-x-internal", + "filter-in", + "filter-out", + "media-type-examples-override", + "remove-unused-components" + ]; + builtInDecorators = [...builtInOas3Decorators, ...builtInOas2Decorators]; + configGovernanceProperties = { + extends: { + name: "Extends", + properties: {}, + items: (node) => { + if (typeof node === "string" && !isAbsoluteUrl(node) && !path3.extname(node)) { + return { type: "string" }; + } + return { + ...ConfigGovernance, + directResolveAs: { name: "ConfigGovernance", ...ConfigGovernance } + }; + }, + description: "Use extends to inherit rules and their configurations from other rulesets.", + documentationLink: "https://redocly.com/docs/cli/configuration/reference/extends#extends" + }, + plugins: { type: "array", items: { type: "string" } }, + rules: "Rules", + oas2Rules: "Rules", + oas3_0Rules: "Rules", + oas3_1Rules: "Rules", + oas3_2Rules: "Rules", + async2Rules: "Rules", + async3Rules: "Rules", + arazzo1Rules: "Rules", + overlay1Rules: "Rules", + openrpc1Rules: "Rules", + preprocessors: "Preprocessors", + oas2Preprocessors: "Preprocessors", + oas3_0Preprocessors: "Preprocessors", + oas3_1Preprocessors: "Preprocessors", + oas3_2Preprocessors: "Preprocessors", + async2Preprocessors: "Preprocessors", + async3Preprocessors: "Preprocessors", + arazzo1Preprocessors: "Preprocessors", + overlay1Preprocessors: "Preprocessors", + openrpc1Preprocessors: "Preprocessors", + decorators: "Decorators", + oas2Decorators: "Decorators", + oas3_0Decorators: "Decorators", + oas3_1Decorators: "Decorators", + oas3_2Decorators: "Decorators", + async2Decorators: "Decorators", + async3Decorators: "Decorators", + arazzo1Decorators: "Decorators", + overlay1Decorators: "Decorators", + openrpc1Decorators: "Decorators" + }; + ConfigGovernance = { + properties: configGovernanceProperties + }; + createConfigRoot = (nodeTypes) => ({ + ...nodeTypes.rootRedoclyConfigSchema, + properties: { + ...nodeTypes.rootRedoclyConfigSchema.properties, + ...ConfigGovernance.properties, + apis: "ConfigApis", + // Override apis with internal format + telemetry: { enum: ["on", "off"] }, + resolve: { + properties: { + http: "ConfigHTTP", + doNotResolveExamples: { type: "boolean" } + } + } + } + }); + ConfigApis = { + properties: {}, + additionalProperties: "ConfigApisProperties", + description: "The `apis` configuration section is used when a project contains multiple API descriptions to set up different rules and settings for individual APIs. It allows defining specific configurations for each API, which must be identified by a unique name.", + documentationLink: "https://redocly.com/docs/cli/configuration/reference/apis" + }; + createConfigApisProperties = (nodeTypes) => ({ + ...nodeTypes["rootRedoclyConfigSchema.apis_additionalProperties"], + properties: { + ...nodeTypes["rootRedoclyConfigSchema.apis_additionalProperties"]?.properties, + ...omit(ConfigGovernance.properties, ["plugins"]) + // plugins are not allowed in apis + } + }); + ConfigHTTP = { + properties: { + headers: { + type: "array", + items: { + type: "string" + } + } + } + }; + Rules = { + properties: {}, + description: "The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.", + documentationLink: "https://redocly.com/docs/cli/configuration/reference/rules#rules", + additionalProperties: (value, key) => { + if (key.startsWith("rule/")) { + if (typeof value === "string") { + return { enum: ["error", "warn", "off"] }; + } else { + return "ConfigurableRule"; + } + } else if (builtInRules.includes(key)) { + if (typeof value === "string") { + return { enum: ["error", "warn", "off"] }; + } else { + return "BuiltinRule"; + } + } else if (isCustomRuleId(key)) { + if (typeof value === "string") { + return { enum: ["error", "warn", "off"] }; + } else { + return "CustomRule"; + } + } else if (key === "metadata-schema" || key === "custom-fields-schema") { + return "Schema"; + } + return; + } + }; + BuiltinRule = { + properties: { + severity: { enum: ["error", "warn", "off"] } + }, + additionalProperties: {}, + required: ["severity"], + description: "Built-in rules are the default linting rules included with Redocly CLI. They enforce widely accepted API design standards and best practices. Each built-in rule has a default severity of error, but you can change the severity or turn off any built-in rule in your configuration file.", + documentationLink: "https://redocly.com/docs/cli/rules/built-in-rules" + }; + CustomRule = { + properties: { + severity: { enum: ["error", "warn", "off"] } + }, + additionalProperties: {}, + required: ["severity"], + description: "Custom rules are defined by users via plugins.", + documentationLink: "https://redocly.com/docs/cli/custom-plugins/custom-rules" + }; + Decorators = { + properties: {}, + description: "Decorators define transformations that can be applied to the API document during the bundle step.", + documentationLink: "https://redocly.com/docs/cli/configuration/reference/decorators", + additionalProperties: (value, key) => { + if (builtInDecorators.includes(key)) { + if (typeof value === "string") { + return { type: "string" }; + } else { + return "BuiltinDecorator"; + } + } else if (isCustomRuleId(key)) { + if (typeof value === "string") { + return { type: "string" }; + } else { + return "CustomDecorator"; + } + } + return; + } + }; + BuiltinDecorator = { + properties: {}, + additionalProperties: {}, + description: "Built-in decorators are the default decorators included with Redocly CLI.", + documentationLink: "https://redocly.com/docs/cli/decorators#list-of-decorators" + }; + CustomDecorator = { + properties: {}, + additionalProperties: {}, + description: "Custom decorators are defined by users via plugins.", + documentationLink: "https://redocly.com/docs/cli/custom-plugins/custom-decorators" + }; + Preprocessors = { + properties: {}, + description: "Preprocessors define transformations that can be applied to the API document before bundling.", + documentationLink: "https://redocly.com/docs/cli/configuration/reference/preprocessors", + additionalProperties: (value, key) => { + if (builtInDecorators.includes(key)) { + if (typeof value === "string") { + return { type: "string" }; + } else { + return "BuiltinPreprocessor"; + } + } else if (isCustomRuleId(key)) { + if (typeof value === "string") { + return { type: "string" }; + } else { + return "CustomPreprocessor"; + } + } + return; + } + }; + BuiltinPreprocessor = { + properties: {}, + additionalProperties: {}, + description: "Built-in preprocessors are the default preprocessors included with Redocly CLI. The available options are the same for decorators and preprocessors.", + documentationLink: "https://redocly.com/docs/cli/decorators#list-of-decorators" + }; + CustomPreprocessor = { + properties: {}, + additionalProperties: {}, + description: "Custom preprocessors are defined by users via plugins. The available options are the same for decorators and preprocessors.", + documentationLink: "https://redocly.com/docs/cli/custom-plugins/custom-decorators" + }; + Schema6 = { + properties: { + properties: mapOf("Schema") + }, + additionalProperties: {} + }; + Assertions = { + properties: { + enum: { + type: "array", + items: { type: "string" }, + description: "Asserts a value is within a predefined list of values. Providing a single value in a list is an equality check.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#enum-example" + }, + pattern: { + type: "string", + description: "Asserts a value matches a regex pattern.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#pattern-example" + }, + notPattern: { + type: "string", + description: `Asserts a value doesn't match a regex pattern.`, + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#notpattern-example" + }, + casing: { + enum: [ + "camelCase", + "kebab-case", + "snake_case", + "PascalCase", + "MACRO_CASE", + "COBOL-CASE", + "flatcase" + ], + description: "Asserts a casing style. Supported styles are: camelCase, kebab-case, snake_case, PascalCase, MACRO_CASE, COBOL-CASE, flatcase.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#casing-example" + }, + mutuallyExclusive: { + type: "array", + items: { type: "string" }, + description: "Asserts that listed properties (key names only) are mutually exclusive.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#mutuallyexclusive-example" + }, + mutuallyRequired: { + type: "array", + items: { type: "string" }, + description: "Asserts that listed properties (key names only) are mutually required.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#mutuallyrequired-example" + }, + required: { + type: "array", + items: { type: "string" }, + description: "Asserts all listed values are defined.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#required-example" + }, + requireAny: { + type: "array", + items: { type: "string" }, + description: "Asserts that at least one of the listed properties (key names only) is defined. ", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#requireany-example" + }, + contains: { + type: "array", + items: { type: "string" }, + description: "Asserts that all listed strings are included in the value array.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#contains-example" + }, + disallowed: { + type: "array", + items: { type: "string" }, + description: "Asserts all listed values are not defined.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#disallowed-example" + }, + defined: { + type: "boolean", + description: "Asserts a property is defined.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#defined-example" + }, + nonEmpty: { + type: "boolean", + description: "Asserts a property is not empty.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#nonempty-example" + }, + minLength: { + type: "integer", + description: "Asserts a minimum length (inclusive) of a string or list (array).", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#minlength-example" + }, + maxLength: { + type: "integer", + description: "Asserts a maximum length (inclusive) of a string or list (array).", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#maxlength-example" + }, + ref: (value) => typeof value === "string" ? { + type: "string", + description: `Asserts a reference object presence in object's property. A boolean value of true means the property has a $ref defined. A boolean value of false means the property has not defined a $ref (it has an in-place value). A string value means that the $ref is defined and the unresolved value must match the pattern (for example, '/paths/.*.yaml$/').`, + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#ref-example" + } : { + type: "boolean", + description: `Asserts a reference object presence in object's property. A boolean value of true means the property has a $ref defined. A boolean value of false means the property has not defined a $ref (it has an in-place value). A string value means that the $ref is defined and the unresolved value must match the pattern (for example, '/paths/.*.yaml$/').`, + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#ref-example" + }, + const: (value) => { + if (typeof value === "string") { + return { + type: "string", + description: "Asserts equality of a value. The behavior is the same as the enum assertion with exactly one value.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#const-example" + }; + } + if (typeof value === "number") { + return { + type: "number", + description: "Asserts equality of a value. The behavior is the same as the enum assertion with exactly one value.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#const-example" + }; + } + if (typeof value === "boolean") { + return { + type: "boolean", + description: "Asserts equality of a value. The behavior is the same as the enum assertion with exactly one value.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#const-example" + }; + } else { + return; } - ) - ) - } + } + }, + additionalProperties: (_value, key) => { + if (/^\w+\/\w+$/.test(key)) + return {}; + return; + }, + description: "A minimum of one assertion property is required to be defined.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#assertion-object" + }; + Where = { + properties: { + subject: "Subject", + assertions: "Assertions" + }, + required: ["subject", "assertions"], + description: "The where object is part of a where list which must be defined in order from the root node. Each node can only be used in one where object for each assertion. Each subsequent node must be a descendant of the previous one. Rules that use multiple where objects must target each one on a different node. However, the same node could be used in the last where object and in the root subject object. Nodes may be skipped in between the subject node types of the where list and those defined in the root subject type.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#where-object" + }; + ConfigurableRule = { + properties: { + subject: "Subject", + assertions: "Assertions", + where: listOf("Where"), + message: { type: "string" }, + suggest: { type: "array", items: { type: "string" } }, + reference: { type: "string" }, + severity: { enum: ["error", "warn", "off"] } + }, + required: ["subject", "assertions"], + description: "Configurable rule definitions enforce your custom API design standards. Add or edit your configurable rules in the configuration file. A configurable rule is a rule that starts with a rule/ prefix followed by a unique rule name. Rule names display in the lint log if the assertions fail. More than one configurable rule may be defined, and any configurable rule may have multiple assertions.", + documentationLink: "https://redocly.com/docs/cli/rules/configurable-rules#configurable-rule-object" + }; + CoreConfigTypes = { + ConfigurableRule, + ConfigApis, + ConfigGovernance, + ConfigHTTP, + Where, + BuiltinRule, + CustomRule, + BuiltinDecorator, + CustomDecorator, + BuiltinPreprocessor, + CustomPreprocessor, + Schema: Schema6, + Rules, + Decorators, + Preprocessors, + Assertions + }; + ({ theme: _2, ...propertiesWithoutTheme } = Yr.properties); + redoclyConfigSchemaWithoutTheme = { + ...Yr, + properties: propertiesWithoutTheme + }; + ConfigTypes = createConfigTypes(redoclyConfigSchemaWithoutTheme); + NormalizedConfigTypes = normalizeTypes(ConfigTypes); } -} - +}); -/***/ }), - -/***/ 30953: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SPECIAL_HEADERS = exports.MINOR = exports.MAJOR = exports.HTAB_SP_VCHAR_OBS_TEXT = exports.QUOTED_STRING = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.HEX = exports.URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.STATUSES_HTTP = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.HEADER_STATE = exports.FINISH = exports.STATUSES = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; -const utils_1 = __nccwpck_require__(41891); -// Emums -exports.ERROR = { - OK: 0, - INTERNAL: 1, - STRICT: 2, - CR_EXPECTED: 25, - LF_EXPECTED: 3, - UNEXPECTED_CONTENT_LENGTH: 4, - UNEXPECTED_SPACE: 30, - CLOSED_CONNECTION: 5, - INVALID_METHOD: 6, - INVALID_URL: 7, - INVALID_CONSTANT: 8, - INVALID_VERSION: 9, - INVALID_HEADER_TOKEN: 10, - INVALID_CONTENT_LENGTH: 11, - INVALID_CHUNK_SIZE: 12, - INVALID_STATUS: 13, - INVALID_EOF_STATE: 14, - INVALID_TRANSFER_ENCODING: 15, - CB_MESSAGE_BEGIN: 16, - CB_HEADERS_COMPLETE: 17, - CB_MESSAGE_COMPLETE: 18, - CB_CHUNK_HEADER: 19, - CB_CHUNK_COMPLETE: 20, - PAUSED: 21, - PAUSED_UPGRADE: 22, - PAUSED_H2_UPGRADE: 23, - USER: 24, - CB_URL_COMPLETE: 26, - CB_STATUS_COMPLETE: 27, - CB_METHOD_COMPLETE: 32, - CB_VERSION_COMPLETE: 33, - CB_HEADER_FIELD_COMPLETE: 28, - CB_HEADER_VALUE_COMPLETE: 29, - CB_CHUNK_EXTENSION_NAME_COMPLETE: 34, - CB_CHUNK_EXTENSION_VALUE_COMPLETE: 35, - CB_RESET: 31, - CB_PROTOCOL_COMPLETE: 38, -}; -exports.TYPE = { - BOTH: 0, // default - REQUEST: 1, - RESPONSE: 2, -}; -exports.FLAGS = { - CONNECTION_KEEP_ALIVE: 1 << 0, - CONNECTION_CLOSE: 1 << 1, - CONNECTION_UPGRADE: 1 << 2, - CHUNKED: 1 << 3, - UPGRADE: 1 << 4, - CONTENT_LENGTH: 1 << 5, - SKIPBODY: 1 << 6, - TRAILING: 1 << 7, - // 1 << 8 is unused - TRANSFER_ENCODING: 1 << 9, -}; -exports.LENIENT_FLAGS = { - HEADERS: 1 << 0, - CHUNKED_LENGTH: 1 << 1, - KEEP_ALIVE: 1 << 2, - TRANSFER_ENCODING: 1 << 3, - VERSION: 1 << 4, - DATA_AFTER_CLOSE: 1 << 5, - OPTIONAL_LF_AFTER_CR: 1 << 6, - OPTIONAL_CRLF_AFTER_CHUNK: 1 << 7, - OPTIONAL_CR_BEFORE_LF: 1 << 8, - SPACES_AFTER_CHUNK_SIZE: 1 << 9, -}; -exports.METHODS = { - 'DELETE': 0, - 'GET': 1, - 'HEAD': 2, - 'POST': 3, - 'PUT': 4, - /* pathological */ - 'CONNECT': 5, - 'OPTIONS': 6, - 'TRACE': 7, - /* WebDAV */ - 'COPY': 8, - 'LOCK': 9, - 'MKCOL': 10, - 'MOVE': 11, - 'PROPFIND': 12, - 'PROPPATCH': 13, - 'SEARCH': 14, - 'UNLOCK': 15, - 'BIND': 16, - 'REBIND': 17, - 'UNBIND': 18, - 'ACL': 19, - /* subversion */ - 'REPORT': 20, - 'MKACTIVITY': 21, - 'CHECKOUT': 22, - 'MERGE': 23, - /* upnp */ - 'M-SEARCH': 24, - 'NOTIFY': 25, - 'SUBSCRIBE': 26, - 'UNSUBSCRIBE': 27, - /* RFC-5789 */ - 'PATCH': 28, - 'PURGE': 29, - /* CalDAV */ - 'MKCALENDAR': 30, - /* RFC-2068, section 19.6.1.2 */ - 'LINK': 31, - 'UNLINK': 32, - /* icecast */ - 'SOURCE': 33, - /* RFC-7540, section 11.6 */ - 'PRI': 34, - /* RFC-2326 RTSP */ - 'DESCRIBE': 35, - 'ANNOUNCE': 36, - 'SETUP': 37, - 'PLAY': 38, - 'PAUSE': 39, - 'TEARDOWN': 40, - 'GET_PARAMETER': 41, - 'SET_PARAMETER': 42, - 'REDIRECT': 43, - 'RECORD': 44, - /* RAOP */ - 'FLUSH': 45, - /* DRAFT https://www.ietf.org/archive/id/draft-ietf-httpbis-safe-method-w-body-02.html */ - 'QUERY': 46, -}; -exports.STATUSES = { - CONTINUE: 100, - SWITCHING_PROTOCOLS: 101, - PROCESSING: 102, - EARLY_HINTS: 103, - RESPONSE_IS_STALE: 110, // Unofficial - REVALIDATION_FAILED: 111, // Unofficial - DISCONNECTED_OPERATION: 112, // Unofficial - HEURISTIC_EXPIRATION: 113, // Unofficial - MISCELLANEOUS_WARNING: 199, // Unofficial - OK: 200, - CREATED: 201, - ACCEPTED: 202, - NON_AUTHORITATIVE_INFORMATION: 203, - NO_CONTENT: 204, - RESET_CONTENT: 205, - PARTIAL_CONTENT: 206, - MULTI_STATUS: 207, - ALREADY_REPORTED: 208, - TRANSFORMATION_APPLIED: 214, // Unofficial - IM_USED: 226, - MISCELLANEOUS_PERSISTENT_WARNING: 299, // Unofficial - MULTIPLE_CHOICES: 300, - MOVED_PERMANENTLY: 301, - FOUND: 302, - SEE_OTHER: 303, - NOT_MODIFIED: 304, - USE_PROXY: 305, - SWITCH_PROXY: 306, // No longer used - TEMPORARY_REDIRECT: 307, - PERMANENT_REDIRECT: 308, - BAD_REQUEST: 400, - UNAUTHORIZED: 401, - PAYMENT_REQUIRED: 402, - FORBIDDEN: 403, - NOT_FOUND: 404, - METHOD_NOT_ALLOWED: 405, - NOT_ACCEPTABLE: 406, - PROXY_AUTHENTICATION_REQUIRED: 407, - REQUEST_TIMEOUT: 408, - CONFLICT: 409, - GONE: 410, - LENGTH_REQUIRED: 411, - PRECONDITION_FAILED: 412, - PAYLOAD_TOO_LARGE: 413, - URI_TOO_LONG: 414, - UNSUPPORTED_MEDIA_TYPE: 415, - RANGE_NOT_SATISFIABLE: 416, - EXPECTATION_FAILED: 417, - IM_A_TEAPOT: 418, - PAGE_EXPIRED: 419, // Unofficial - ENHANCE_YOUR_CALM: 420, // Unofficial - MISDIRECTED_REQUEST: 421, - UNPROCESSABLE_ENTITY: 422, - LOCKED: 423, - FAILED_DEPENDENCY: 424, - TOO_EARLY: 425, - UPGRADE_REQUIRED: 426, - PRECONDITION_REQUIRED: 428, - TOO_MANY_REQUESTS: 429, - REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL: 430, // Unofficial - REQUEST_HEADER_FIELDS_TOO_LARGE: 431, - LOGIN_TIMEOUT: 440, // Unofficial - NO_RESPONSE: 444, // Unofficial - RETRY_WITH: 449, // Unofficial - BLOCKED_BY_PARENTAL_CONTROL: 450, // Unofficial - UNAVAILABLE_FOR_LEGAL_REASONS: 451, - CLIENT_CLOSED_LOAD_BALANCED_REQUEST: 460, // Unofficial - INVALID_X_FORWARDED_FOR: 463, // Unofficial - REQUEST_HEADER_TOO_LARGE: 494, // Unofficial - SSL_CERTIFICATE_ERROR: 495, // Unofficial - SSL_CERTIFICATE_REQUIRED: 496, // Unofficial - HTTP_REQUEST_SENT_TO_HTTPS_PORT: 497, // Unofficial - INVALID_TOKEN: 498, // Unofficial - CLIENT_CLOSED_REQUEST: 499, // Unofficial - INTERNAL_SERVER_ERROR: 500, - NOT_IMPLEMENTED: 501, - BAD_GATEWAY: 502, - SERVICE_UNAVAILABLE: 503, - GATEWAY_TIMEOUT: 504, - HTTP_VERSION_NOT_SUPPORTED: 505, - VARIANT_ALSO_NEGOTIATES: 506, - INSUFFICIENT_STORAGE: 507, - LOOP_DETECTED: 508, - BANDWIDTH_LIMIT_EXCEEDED: 509, - NOT_EXTENDED: 510, - NETWORK_AUTHENTICATION_REQUIRED: 511, - WEB_SERVER_UNKNOWN_ERROR: 520, // Unofficial - WEB_SERVER_IS_DOWN: 521, // Unofficial - CONNECTION_TIMEOUT: 522, // Unofficial - ORIGIN_IS_UNREACHABLE: 523, // Unofficial - TIMEOUT_OCCURED: 524, // Unofficial - SSL_HANDSHAKE_FAILED: 525, // Unofficial - INVALID_SSL_CERTIFICATE: 526, // Unofficial - RAILGUN_ERROR: 527, // Unofficial - SITE_IS_OVERLOADED: 529, // Unofficial - SITE_IS_FROZEN: 530, // Unofficial - IDENTITY_PROVIDER_AUTHENTICATION_ERROR: 561, // Unofficial - NETWORK_READ_TIMEOUT: 598, // Unofficial - NETWORK_CONNECT_TIMEOUT: 599, // Unofficial -}; -exports.FINISH = { - SAFE: 0, - SAFE_WITH_CB: 1, - UNSAFE: 2, -}; -exports.HEADER_STATE = { - GENERAL: 0, - CONNECTION: 1, - CONTENT_LENGTH: 2, - TRANSFER_ENCODING: 3, - UPGRADE: 4, - CONNECTION_KEEP_ALIVE: 5, - CONNECTION_CLOSE: 6, - CONNECTION_UPGRADE: 7, - TRANSFER_ENCODING_CHUNKED: 8, -}; -// C headers -exports.METHODS_HTTP = [ - exports.METHODS.DELETE, - exports.METHODS.GET, - exports.METHODS.HEAD, - exports.METHODS.POST, - exports.METHODS.PUT, - exports.METHODS.CONNECT, - exports.METHODS.OPTIONS, - exports.METHODS.TRACE, - exports.METHODS.COPY, - exports.METHODS.LOCK, - exports.METHODS.MKCOL, - exports.METHODS.MOVE, - exports.METHODS.PROPFIND, - exports.METHODS.PROPPATCH, - exports.METHODS.SEARCH, - exports.METHODS.UNLOCK, - exports.METHODS.BIND, - exports.METHODS.REBIND, - exports.METHODS.UNBIND, - exports.METHODS.ACL, - exports.METHODS.REPORT, - exports.METHODS.MKACTIVITY, - exports.METHODS.CHECKOUT, - exports.METHODS.MERGE, - exports.METHODS['M-SEARCH'], - exports.METHODS.NOTIFY, - exports.METHODS.SUBSCRIBE, - exports.METHODS.UNSUBSCRIBE, - exports.METHODS.PATCH, - exports.METHODS.PURGE, - exports.METHODS.MKCALENDAR, - exports.METHODS.LINK, - exports.METHODS.UNLINK, - exports.METHODS.PRI, - // TODO(indutny): should we allow it with HTTP? - exports.METHODS.SOURCE, - exports.METHODS.QUERY, -]; -exports.METHODS_ICE = [ - exports.METHODS.SOURCE, -]; -exports.METHODS_RTSP = [ - exports.METHODS.OPTIONS, - exports.METHODS.DESCRIBE, - exports.METHODS.ANNOUNCE, - exports.METHODS.SETUP, - exports.METHODS.PLAY, - exports.METHODS.PAUSE, - exports.METHODS.TEARDOWN, - exports.METHODS.GET_PARAMETER, - exports.METHODS.SET_PARAMETER, - exports.METHODS.REDIRECT, - exports.METHODS.RECORD, - exports.METHODS.FLUSH, - // For AirPlay - exports.METHODS.GET, - exports.METHODS.POST, -]; -exports.METHOD_MAP = (0, utils_1.enumToMap)(exports.METHODS); -exports.H_METHOD_MAP = Object.fromEntries(Object.entries(exports.METHODS).filter(([k]) => k.startsWith('H'))); -exports.STATUSES_HTTP = [ - exports.STATUSES.CONTINUE, - exports.STATUSES.SWITCHING_PROTOCOLS, - exports.STATUSES.PROCESSING, - exports.STATUSES.EARLY_HINTS, - exports.STATUSES.RESPONSE_IS_STALE, - exports.STATUSES.REVALIDATION_FAILED, - exports.STATUSES.DISCONNECTED_OPERATION, - exports.STATUSES.HEURISTIC_EXPIRATION, - exports.STATUSES.MISCELLANEOUS_WARNING, - exports.STATUSES.OK, - exports.STATUSES.CREATED, - exports.STATUSES.ACCEPTED, - exports.STATUSES.NON_AUTHORITATIVE_INFORMATION, - exports.STATUSES.NO_CONTENT, - exports.STATUSES.RESET_CONTENT, - exports.STATUSES.PARTIAL_CONTENT, - exports.STATUSES.MULTI_STATUS, - exports.STATUSES.ALREADY_REPORTED, - exports.STATUSES.TRANSFORMATION_APPLIED, - exports.STATUSES.IM_USED, - exports.STATUSES.MISCELLANEOUS_PERSISTENT_WARNING, - exports.STATUSES.MULTIPLE_CHOICES, - exports.STATUSES.MOVED_PERMANENTLY, - exports.STATUSES.FOUND, - exports.STATUSES.SEE_OTHER, - exports.STATUSES.NOT_MODIFIED, - exports.STATUSES.USE_PROXY, - exports.STATUSES.SWITCH_PROXY, - exports.STATUSES.TEMPORARY_REDIRECT, - exports.STATUSES.PERMANENT_REDIRECT, - exports.STATUSES.BAD_REQUEST, - exports.STATUSES.UNAUTHORIZED, - exports.STATUSES.PAYMENT_REQUIRED, - exports.STATUSES.FORBIDDEN, - exports.STATUSES.NOT_FOUND, - exports.STATUSES.METHOD_NOT_ALLOWED, - exports.STATUSES.NOT_ACCEPTABLE, - exports.STATUSES.PROXY_AUTHENTICATION_REQUIRED, - exports.STATUSES.REQUEST_TIMEOUT, - exports.STATUSES.CONFLICT, - exports.STATUSES.GONE, - exports.STATUSES.LENGTH_REQUIRED, - exports.STATUSES.PRECONDITION_FAILED, - exports.STATUSES.PAYLOAD_TOO_LARGE, - exports.STATUSES.URI_TOO_LONG, - exports.STATUSES.UNSUPPORTED_MEDIA_TYPE, - exports.STATUSES.RANGE_NOT_SATISFIABLE, - exports.STATUSES.EXPECTATION_FAILED, - exports.STATUSES.IM_A_TEAPOT, - exports.STATUSES.PAGE_EXPIRED, - exports.STATUSES.ENHANCE_YOUR_CALM, - exports.STATUSES.MISDIRECTED_REQUEST, - exports.STATUSES.UNPROCESSABLE_ENTITY, - exports.STATUSES.LOCKED, - exports.STATUSES.FAILED_DEPENDENCY, - exports.STATUSES.TOO_EARLY, - exports.STATUSES.UPGRADE_REQUIRED, - exports.STATUSES.PRECONDITION_REQUIRED, - exports.STATUSES.TOO_MANY_REQUESTS, - exports.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL, - exports.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE, - exports.STATUSES.LOGIN_TIMEOUT, - exports.STATUSES.NO_RESPONSE, - exports.STATUSES.RETRY_WITH, - exports.STATUSES.BLOCKED_BY_PARENTAL_CONTROL, - exports.STATUSES.UNAVAILABLE_FOR_LEGAL_REASONS, - exports.STATUSES.CLIENT_CLOSED_LOAD_BALANCED_REQUEST, - exports.STATUSES.INVALID_X_FORWARDED_FOR, - exports.STATUSES.REQUEST_HEADER_TOO_LARGE, - exports.STATUSES.SSL_CERTIFICATE_ERROR, - exports.STATUSES.SSL_CERTIFICATE_REQUIRED, - exports.STATUSES.HTTP_REQUEST_SENT_TO_HTTPS_PORT, - exports.STATUSES.INVALID_TOKEN, - exports.STATUSES.CLIENT_CLOSED_REQUEST, - exports.STATUSES.INTERNAL_SERVER_ERROR, - exports.STATUSES.NOT_IMPLEMENTED, - exports.STATUSES.BAD_GATEWAY, - exports.STATUSES.SERVICE_UNAVAILABLE, - exports.STATUSES.GATEWAY_TIMEOUT, - exports.STATUSES.HTTP_VERSION_NOT_SUPPORTED, - exports.STATUSES.VARIANT_ALSO_NEGOTIATES, - exports.STATUSES.INSUFFICIENT_STORAGE, - exports.STATUSES.LOOP_DETECTED, - exports.STATUSES.BANDWIDTH_LIMIT_EXCEEDED, - exports.STATUSES.NOT_EXTENDED, - exports.STATUSES.NETWORK_AUTHENTICATION_REQUIRED, - exports.STATUSES.WEB_SERVER_UNKNOWN_ERROR, - exports.STATUSES.WEB_SERVER_IS_DOWN, - exports.STATUSES.CONNECTION_TIMEOUT, - exports.STATUSES.ORIGIN_IS_UNREACHABLE, - exports.STATUSES.TIMEOUT_OCCURED, - exports.STATUSES.SSL_HANDSHAKE_FAILED, - exports.STATUSES.INVALID_SSL_CERTIFICATE, - exports.STATUSES.RAILGUN_ERROR, - exports.STATUSES.SITE_IS_OVERLOADED, - exports.STATUSES.SITE_IS_FROZEN, - exports.STATUSES.IDENTITY_PROVIDER_AUTHENTICATION_ERROR, - exports.STATUSES.NETWORK_READ_TIMEOUT, - exports.STATUSES.NETWORK_CONNECT_TIMEOUT, -]; -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.URL_CHAR = [ - '!', '"', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - ':', ';', '<', '=', '>', - '@', '[', '\\', ']', '^', '_', - '`', - '{', '|', '}', '~', -].concat(exports.ALPHANUM); -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.TOKEN = [ - '!', '#', '$', '%', '&', '\'', - '*', '+', '-', '.', - '^', '_', '`', - '|', '~', -].concat(exports.ALPHANUM); -/* - * 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.QUOTED_STRING = ['\t', ' ']; -for (let i = 0x21; i <= 0xff; i++) { - if (i !== 0x22 && i !== 0x5c) { // All characters in ASCII except \ and " - exports.QUOTED_STRING.push(i); +// node_modules/@redocly/openapi-core/lib/types/entity.js +function createEntityTypes(entitySchema, entityDefaultSchema) { + const { ctx: defaultNodeTypes } = getNodeTypesFromJSONSchema("EntityFileDefault", entityDefaultSchema); + const { ctx: namedNodeTypes, discriminatorResolver: namedDiscriminatorResolver } = getNodeTypesFromJSONSchema("EntityFile", entitySchema); + const arrayNodeType = { + properties: {}, + items: (value) => { + if (isPlainObject(value)) { + const typeValue = value[ENTITY_DISCRIMINATOR_PROPERTY_NAME]; + if (!typeValue) + return "Entity"; + const resolvedType = namedDiscriminatorResolver?.(value, typeValue); + if (resolvedType && typeof resolvedType === "string") { + return resolvedType; + } + } + return "Entity"; } + }; + return { + entityTypes: { + ...defaultNodeTypes, + ...namedNodeTypes, + EntityFileArray: arrayNodeType + }, + discriminatorResolver: namedDiscriminatorResolver + }; } -exports.HTAB_SP_VCHAR_OBS_TEXT = ['\t', ' ']; -// VCHAR: https://tools.ietf.org/html/rfc5234#appendix-B.1 -for (let i = 0x21; i <= 0x7E; i++) { - exports.HTAB_SP_VCHAR_OBS_TEXT.push(i); -} -// OBS_TEXT: https://datatracker.ietf.org/doc/html/rfc9110#name-collected-abnf -for (let i = 0x80; i <= 0xff; i++) { - exports.HTAB_SP_VCHAR_OBS_TEXT.push(i); -} -exports.MAJOR = exports.NUM_MAP; -exports.MINOR = exports.MAJOR; -exports.SPECIAL_HEADERS = { - 'connection': exports.HEADER_STATE.CONNECTION, - 'content-length': exports.HEADER_STATE.CONTENT_LENGTH, - 'proxy-connection': exports.HEADER_STATE.CONNECTION, - 'transfer-encoding': exports.HEADER_STATE.TRANSFER_ENCODING, - 'upgrade': exports.HEADER_STATE.UPGRADE, -}; -exports["default"] = { - ERROR: exports.ERROR, - TYPE: exports.TYPE, - FLAGS: exports.FLAGS, - LENIENT_FLAGS: exports.LENIENT_FLAGS, - METHODS: exports.METHODS, - STATUSES: exports.STATUSES, - FINISH: exports.FINISH, - HEADER_STATE: exports.HEADER_STATE, - ALPHA: exports.ALPHA, - NUM_MAP: exports.NUM_MAP, - HEX_MAP: exports.HEX_MAP, - NUM: exports.NUM, - ALPHANUM: exports.ALPHANUM, - MARK: exports.MARK, - USERINFO_CHARS: exports.USERINFO_CHARS, - URL_CHAR: exports.URL_CHAR, - HEX: exports.HEX, - TOKEN: exports.TOKEN, - HEADER_CHARS: exports.HEADER_CHARS, - CONNECTION_TOKEN_CHARS: exports.CONNECTION_TOKEN_CHARS, - QUOTED_STRING: exports.QUOTED_STRING, - HTAB_SP_VCHAR_OBS_TEXT: exports.HTAB_SP_VCHAR_OBS_TEXT, - MAJOR: exports.MAJOR, - MINOR: exports.MINOR, - SPECIAL_HEADERS: exports.SPECIAL_HEADERS, - METHODS_HTTP: exports.METHODS_HTTP, - METHODS_ICE: exports.METHODS_ICE, - METHODS_RTSP: exports.METHODS_RTSP, - METHOD_MAP: exports.METHOD_MAP, - H_METHOD_MAP: exports.H_METHOD_MAP, - STATUSES_HTTP: exports.STATUSES_HTTP, -}; - - -/***/ }), - -/***/ 61145: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/* module decorator */ module = __nccwpck_require__.nmd(module); - - -const { Buffer } = __nccwpck_require__(72254) - -const wasmBase64 = 'AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEBAwAAAwAAAAQFAXABExMFAwEAAgYIAX8BQcDZBAsHxQcoBm1lbW9yeQIAC19pbml0aWFsaXplAAgZX19pbmRpcmVjdF9mdW5jdGlvbl90YWJsZQEAC2xsaHR0cF9pbml0AAkYbGxodHRwX3Nob3VsZF9rZWVwX2FsaXZlADc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gASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgL5YUCAgd/A34gASACaiEEAkAgACIDKAIMIgANACADKAIEBEAgAyABNgIECyMAQRBrIgkkAAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAygCHCICQQJrDvwBAfkBAgMEBQYHCAkKCwwNDg8QERL4ARP3ARQV9gEWF/UBGBkaGxwdHh8g/QH7ASH0ASIjJCUmJygpKivzASwtLi8wMTLyAfEBMzTwAe8BNTY3ODk6Ozw9Pj9AQUJDREVGR0hJ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HQAQwOC0HRAQwNC0HSAQwMC0HTAQwLC0HUAQwKC0HVAQwJC0HWAQwIC0HjAQwHC0HXAQwGC0HYAQwFC0HZAQwEC0HaAQwDC0HbAQwCC0HdAQwBC0HcAQshAgNAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJ/AkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAk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wMkgMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABIAynaiIBEDIiAEUNKyADQQc2AhwgAyABNgIUIAMgADYCDAyRAwsgAy0ALkHAAHFFDQELQQAhAAJAIAMoAjgiAkUNACACKAJYIgJFDQAgAyACEQAAIQALIABFDSsgAEEVRgRAIANBCjYCHCADIAE2AhQgA0HrGTYCECADQRU2AgxBACECDJADC0EAIQIgA0EANgIcIAMgATYCFCADQZMMNgIQIANBEzYCDAyPAwtBACECIANBADYCHCADIAE2AhQgA0GCFTYCECADQQI2AgwMjgMLQQAhAiADQQA2AhwgAyABNgIUIANB3RQ2AhAgA0EZNgIMDI0DC0EAIQIgA0EANgIcIAMgATYCFCADQeYdNgIQIANBGTYCDAyMAwsgAEEVRg09QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIsDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFDSggA0ENNgIcIAMgATYCFCADIAA2AgwMigMLIABBFUYNOkEAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAyJAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMyIARQRAIAFBAWohAQwoCyADQQ42AhwgAyAANgIMIAMgAUEBajYCFAyIAwsgAEEVRg03QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIcDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDCcLIANBDzYCHCADIAA2AgwgAyABQQFqNgIUDIYDC0EAIQIgA0EANgIcIAMgATYCFCADQeIXNgIQIANBGTYCDAyFAwsgAEEVRg0zQQAhAiADQQA2AhwgAyABNgIUIANB1gw2AhAgA0EjNgIMDIQDCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgBFDSUgA0ERNgIcIAMgATYCFCADIAA2AgwMgwMLIABBFUYNMEEAIQIgA0EANgIcIAMgATYCFCADQdYMNgIQIANBIzYCDAyCAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQN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gzuAgsgASAERgRAQTQhAgzuAgsCQAJAA0ACQCABLQAAQQprDgQCAAADAAsgBCABQQFqIgFHDQALQTQhAgzvAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFDZ8CIANBMjYCHCADIAE2AhQgAyAANgIMQQAhAgzuAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFBEAgAUEBaiEBDJ8CCyADQTI2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM7QILIAEgBEcEQAJAA0AgAS0AAEEwayIAQf8BcUEKTwRAQTohAgzXAgsgAykDICILQpmz5syZs+bMGVYNASADIAtCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAMgCiALfDcDICAEIAFBAWoiAUcNAAtBwAAhAgzuAgsgAygCBCEAIANBADYCBCADIAAgAUEBaiIBEDEiAA0XDOICC0HAACECDOwCCyABIARGBEBByQAhAgzsAgsCQANAAkAgAS0AAEEJaw4YAAKiAqICqQKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogIAogILIAQgAUEBaiIBRw0AC0HJACECDOwCCyABQQFqIQEgA0Evai0AAEEBcQ2lAiADQQA2AhwgAyABNgIUIANBlxA2AhAgA0EKNgIMQQAhAgzrAgsgASAERwRAA0AgAS0AAEEgRw0VIAQgAUEBaiIBRw0AC0H4ACECDOsCC0H4ACECDOoCCyADQQI6ACgMOAtBACECIANBADYCHCADQb8LNgIQIANBAjYCDCADIAFBAWo2AhQM6AILQQAhAgzOAgtBDSECDM0CC0ETIQIMzAILQRUhAgzLAgtBFiECDMoCC0EYIQIMyQILQRkhAgzIAgtBGiECDMcCC0EbIQIMxgILQRwhAgzFAgtBHSECDMQCC0EeIQIMwwILQR8hAgzCAgtBICECDMECC0EiIQIMwAILQSMhAgy/AgtBJSECDL4CC0HlACECDL0CCyADQT02AhwgAyABNgIUIAMgADYCDEEAIQIM1QILIANBGzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDNQCCyADQSA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzTAgsgA0ETNgIcIAMgATYCFCADQZgaNgIQIANBFTYCDEEAIQIM0gILIANBCzYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNECCyADQRA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzQAgsgA0EgNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIMzwILIANBCzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDM4CCyADQQw2AhwgAyABNgIUIANBpBw2AhAgA0EVNgIMQQAhAgzNAgtBACECIANBADYCHCADIAE2AhQgA0HdDjYCECADQRI2AgwMzAILAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB/QEhAgzMAgsCQAJAIAMtADZBAUcNAEEAIQACQCADKAI4IgJFDQAgAigCYCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUcNASADQfwBNgIcIAMgATYCFCADQdwZNgIQIANBFTYCDEEAIQIMzQILQdwBIQIMswILIANBADYCHCADIAE2AhQgA0H5CzYCECADQR82AgxBACECDMsCCwJAAkAgAy0AKEEBaw4CBAEAC0HbASECDLICC0HUASECDLECCyADQQI6ADFBACEAAkAgAygCOCICRQ0AIAIoAgAiAkUNACADIAIRAAAhAAsgAEUEQEHdASECDLECCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQbQMNgIQIANBEDYCDEEAIQIMygILIANB+wE2AhwgAyABNgIUIANBgRo2AhAgA0EVNgIMQQAhAgzJAgsgASAERgRAQfoBIQIMyQILIAEtAABByABGDQEgA0EBOgAoC0HAASECDK4CC0HaASECDK0CCyABIARHBEAgA0EMNgIIIAMgATYCBEHZASECDK0CC0H5ASECDMUCCyABIARGBEBB+AEhAgzFAgsgAS0AAEHIAEcNBCABQQFqIQFB2AEhAgyrAgsgASAERgRAQfcBIQIMxAILAkACQCABLQAAQcUAaw4QAAUFBQUFBQUFBQUFBQUFAQULIAFBAWohAUHWASECDKsCCyABQQFqIQFB1wEhAgyqAgtB9gEhAiABIARGDcICIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbrVAGotAABHDQMgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMMCCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIARQRAQeMBIQIMqgILIANB9QE2AhwgAyABNgIUIAMgADYCDEEAIQIMwgILQfQBIQIgASAERg3BAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEG41QBqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzCAgsgA0GBBDsBKCADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIADQMMAgsgA0EANgIAC0EAIQIgA0EANgIcIAMgATYCFCADQeUfNgIQIANBCDYCDAy/AgtB1QEhAgylAgsgA0HzATYCHCADIAE2AhQgAyAANgIMQQAhAgy9AgtBACEAAkAgAygCOCICRQ0AIAIoAkAiAkUNACADIAIRAAAhAAsgAEUNbiAAQRVHBEAgA0EANgIcIAMgATYCFCADQYIPNgIQIANBIDYCDEEAIQIMvQILIANBjwE2AhwgAyABNgIUIANB7Bs2AhAgA0EVNgIMQQAhAgy8AgsgASAERwRAIANBDTYCCCADIAE2AgRB0wEhAgyjAgtB8gEhAgy7AgsgASAERgRAQfEBIQIMuwILAkACQAJAIAEtAABByABrDgsAAQgICAgICAgIAggLIAFBAWohAUHQASECDKMCCyABQQFqIQFB0QEhAgyiAgsgAUEBaiEBQdIBIQIMoQILQfABIQIgASAERg25AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBtdUAai0AAEcNBCAAQQJGDQMgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuQILQe8BIQIgASAERg24AiADKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABBs9UAai0AAEcNAyAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuAILQe4BIQIgASAERg23AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMtwILIAMoAgQhACADQgA3AwAgAyAAIAVBAWoiARArIgBFDQIgA0HsATYCHCADIAE2AhQgAyAANgIMQQAhAgy2AgsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNnAIgA0HtATYCHCADIAE2AhQgAyAANgIMQQAhAgy0AgtBzwEhAgyaAgtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDLQCC0HOASECDJoCCyADQesBNgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMsgILIAEgBEYEQEHrASECDLICCyABLQAAQS9GBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GyODYCECADQQg2AgxBACECDLECC0HNASECDJcCCyABIARHBEAgA0EONgIIIAMgATYCBEHMASECDJcCC0HqASECDK8CCyABIARGBEBB6QEhAgyvAgsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFBywEhAgyWAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZcCIANB6AE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAEgBEYEQEHnASECDK4CCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5gE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILQcoBIQIMlAILIAEgBEYEQEHlASECDK0CC0EAIQBBASEFQQEhB0EAIQICQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQCABLQAAQTBrDgoKCQABAgMEBQYICwtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshAkEAIQVBACEHDAILQQkhAkEBIQBBACEFQQAhBwwBC0EAIQVBASECCyADIAI6ACsgAUEBaiEBAkACQCADLQAuQRBxDQACQAJAAkAgAy0AKg4DAQACBAsgB0UNAwwCCyAADQEMAgsgBUUNAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDQIgA0HiATYCHCADIAE2AhQgAyAANgIMQQAhAgyvAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZoCIANB4wE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ2YAiADQeQBNgIcIAMgATYCFCADIAA2AgwMrQILQckBIQIMkwILQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANBpA02AhAgA0EhNgIMQQAhAgytAgtByAEhAgyTAgsgA0HhATYCHCADIAE2AhQgA0HQGjYCECADQRU2AgxBACECDKsCCyABIARGBEBB4QEhAgyrAgsCQCABLQAAQSBGBEAgA0EAOwE0IAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANBmRE2AhAgA0EJNgIMQQAhAgyrAgtBxwEhAgyRAgsgASAERgRAQeABIQIMqgILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyrAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqgILQcYBIQIMkAILIAEgBEYEQEHfASECDKkCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqgILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKkCC0HFASECDI8CCyABIARGBEBB3gEhAgyoAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKkCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyoAgtBxAEhAgyOAgsgASAERgRAQd0BIQIMpwILAkACQAJAAkAgAS0AAEEKaw4XAgMDAAMDAwMDAwMDAwMDAwMDAwMDAwEDCyABQQFqDAULIAFBAWohAUHDASECDI8CCyABQQFqIQEgA0Evai0AAEEBcQ0IIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKcCCyADQQA2AhwgAyABNgIUIANBjQs2AhAgA0ENNgIMQQAhAgymAgsgASAERwRAIANBDzYCCCADIAE2AgRBASECDI0CC0HcASECDKUCCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtB2wEhAgymAgsgAygCBCEAIANBADYCBCADIAAgARAtIgBFBEAgAUEBaiEBDAQLIANB2gE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMpQILIAMoAgQhACADQQA2AgQgAyAAIAEQLSIADQEgAUEBagshAUHBASECDIoCCyADQdkBNgIcIAMgADYCDCADIAFBAWo2AhRBACECDKICC0HCASECDIgCCyADQS9qLQAAQQFxDQEgA0EANgIcIAMgATYCFCADQeQcNgIQIANBGTYCDEEAIQIMoAILIAEgBEYEQEHZASECDKACCwJAAkACQCABLQAAQQprDgQBAgIAAgsgAUEBaiEBDAILIAFBAWohAQwBCyADLQAuQcAAcUUNAQtBACEAAkAgAygCOCICRQ0AIAIoAjwiAkUNACADIAIRAAAhAAsgAEUNoAEgAEEVRgRAIANB2QA2AhwgAyABNgIUIANBtxo2AhAgA0EVNgIMQQAhAgyfAgsgA0EANgIcIAMgATYCFCADQYANNgIQIANBGzYCDEEAIQIMngILIANBADYCHCADIAE2AhQ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yABIARGBEBBuAEhAgz9AQsCQAJAIAEtAABBxgBrDgsALCwsLCwsLCwsASwLIAFBAWohAUGeASECDOQBCyABQQFqIQFBnwEhAgzjAQtBtwEhAiABIARGDfsBIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQezUAGotAABHDSggAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPwBCyADQQA2AgAgBkEBaiEBQQ0MKAtBtgEhAiABIARGDfoBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQaHVAGotAABHDScgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPsBCyADQQA2AgAgBkEBaiEBQQwMJwtBtQEhAiABIARGDfkBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQerUAGotAABHDSYgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPoBCyADQQA2AgAgBkEBaiEBQQMMJgtBtAEhAiABIARGDfgBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQejUAGotAABHDSUgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPkBCyADQQA2AgAgBkEBaiEBQSYMJQsgASAERgRAQbMBIQIM+AELAkACQCABLQAAQdQAaw4CAAEnCyABQQFqIQFBmQEhAgzfAQsgAUEBaiEBQZoBIQIM3gELQbIBIQIgASAERg32ASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHm1ABqLQAARw0jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz3AQsgA0EANgIAIAZBAWohAUEnDCMLQbEBIQIgASAERg31ASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHk1ABqLQAARw0iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz2AQsgA0EANgIAIAZBAWohAUEcDCILQbABIQIgASAERg30ASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHe1ABqLQAARw0hIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz1AQsgA0EANgIAIAZBAWohAUEGDCELQa8BIQIgASAERg3zASADKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHZ1ABqLQAARw0gIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz0AQsgA0EANgIAIAZBAWohAUEZDCALIAEgBEYEQEGuASECDPMBCwJAAkACQAJAIAEtAABBLWsOIwAkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJAEkJCQkJAIkJCQDJAsgAUEBaiEBQY4BIQIM3AELIAFBAWohAUGPASECDNsBCyABQQFqIQFBlAEhAgzaAQsgAUEBaiEBQZUBIQIM2QELQa0BIQIgASAERg3xASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHX1ABqLQAARw0eIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzyAQsgA0EANgIAIAZBAWohAUELDB4LIAEgBEYEQEGsASECDPEBCwJAAkAgAS0AAEHBAGsOAwAgASALIAFBAWohAUGQASECDNgBCyABQQFqIQFBkwEhAgzXAQsgASAERgRAQasBIQIM8AELAkACQCABLQAAQcEAaw4PAB8fHx8fHx8fHx8fHx8BHwsgAUEBaiEBQZEBIQIM1wELIAFBAWohAUGSASECDNYBCyABIARGBEBBqgEhAgzvAQsgAS0AAEHMAEcNHCABQQFqIQFBCgwbC0GpASECIAEgBEYN7QEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABB0dQAai0AAEcNGiAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7gELIANBADYCACAGQQFqIQFBHgwaC0GoASECIAEgBEYN7AEgAygCACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCABLQAAIABBytQAai0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QANAIAEtAAAgAEGs1ABqLQAARw0GIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzaAQsgA0EANgIAIAZBAWohAUEFDAYLQZUBIQIgASAERg3YASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGm1ABqLQAARw0FIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzZAQsgA0EANgIAIAZBAWohAUEWDAULQZQBIQIgASAERg3XASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGh1QBqLQAARw0EIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzYAQsgA0EANgIAIAZBAWohAUEQDAQLIAEgBEYEQEGTASECDNcBCwJAAkAgAS0AAEHDAGsODAAGBgYGBgYGBgYGAQYLIAFBAWohAUH5ACECDL4BCyABQQFqIQFB+gAhAgy9AQtBkgEhAiABIARGDdUBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQaDUAGotAABHDQIgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNYBCyADQQA2AgAgBkEBaiEBQSQMAgsgA0EANgIADAILIAEgBEYEQEGRASECDNQBCyABLQAAQcwARw0BIAFBAWohAUETCzoAKSADKAIEIQAgA0EANgIEIAMgACABEC4iAA0CDAELQQAhAiADQQA2AhwgAyABNgIUIANB/h82AhAgA0EGNgIMDNEBC0H4ACECDLcBCyADQZABNgIcIAMgATYCFCADIAA2AgxBACECDM8BC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUYNASADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgzOAQtB9wAhAgy0AQsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDMwBCyABIARGBEBBjwEhAgzMAQsCQCABLQAAQSBGBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0G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QQA2AgQgAyAAIAEQLCIARQ0IIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIANBADYCHCADIAE2AhQgA0GNFDYCECADQQc2AgxBACECDKgBCwJAAkACQAJAA0AgAS0AAEGgygBqLQAAIgBBBUcEQAJAIABBAWsOBi4DBAUGAAYLQegAIQIMlAELIAQgAUEBaiIBRw0AC0H9ACECDKsBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQdsANgIcIAMgATYCFCADIAA2AgxBACECDKoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDKkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQfoANgIcIAMgATYCFCADIAA2AgxBACECDKgBCyADQQA2AhwgAyABNgIUIANB5Ag2AhAgA0EHNgIMQQAhAgynAQsgASAERg0BIAFBAWoLIQFBBiECDIwBC0H8ACECDKQBCwJAAkACQAJAA0AgAS0AAEGgyABqLQAAIgBBBUcEQCAAQQFrDgQpAgMEBQsgBCABQQFqIgFHDQALQfsAIQIMpwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMpgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMpQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMpAELIANBADYCHCADIAE2AhQgA0G8CjYCECADQQc2AgxBACECDKMBC0HPACECDIkBC0HRACECDIgBC0HnACECDIcBCyABIARGBEBB+gAhAgygAQsCQCABLQAAQQlrDgQgAAAgAAsgAUEBaiEBQeYAIQIMhgELIAEgBEYEQEH5ACECDJ8BCwJAIAEtAABBCWsOBB8AAB8AC0EAIQACQCADKAI4IgJFDQAgAigCOCICRQ0AIAMgAhEAACEACyAARQRAQeIBIQIMhgELIABBFUcEQCADQQA2Ah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ANgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMlwELIAMtAClBIUYNBiADQQA2AhwgAyABNgIUIANBkQo2AhAgA0EINgIMQQAhAgyWAQtB7wAhAiABIARGDZUBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDVAGotAABHDQIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJYBCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQKyIARQ0CIANB7QA2AhwgAyABNgIUIAMgADYCDEEAIQIMlQELIANBADYCAAsgAygCBCEAIANBADYCBCADIAAgARArIgBFDYABIANB7gA2AhwgAyABNgIUIAMgADYCDEEAIQIMkwELQdwAIQIMeQtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJMBC0HbACECDHkLIANB7AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyRAQsgAy0AKSIAQSNJDQAgAEEuRg0AIANBADYCHCADIAE2AhQgA0HJCTYCECADQQg2AgxBACECDJABC0HaACECDHYLIAEgBEYEQEHrACECDI8BCwJAIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMjwELQdkAIQIMdQsgASAERwRAIANBDjYCCCADIAE2AgRB2AAhAgx1C0HqACECDI0BCyABIARGBEBB6QAhAgyNAQsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFB1wAhAgx0CyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeiADQegANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyABIARGBEBB5wAhAgyMAQsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ17IANB5gA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELQdYAIQIMcgsgASAERgRAQeUAIQIMiwELQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIANgIcIAMgATYCFCADIAA2AgxBACECDI0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNfSADQeMANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeyADQeQANgIcIAMgATYCFCADIAA2AgwMiwELQdQAIQIMcQsgAy0AKUEiRg2GAUHTACECDHALQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALIABFBEBB1QAhAgxwCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQaQNNgIQIANBITYCDEEAIQIMiQELIANB4QA2AhwgAyABNgIUIANB0Bo2AhAgA0EVNgIMQQAhAgyIAQsgASAERgRAQeAAIQIMiAELAkACQAJAAkACQCABLQAAQQprDgQBBAQABAsgAUEBaiEBDAELIAFBAWohASADQS9qLQAAQQFxRQ0BC0HSACECDHALIANBADYCHCADIAE2AhQgA0G2ETYCECADQQk2AgxBACECDIgBCyADQQA2AhwgAyABNgIUIANBthE2AhAgA0EJNgIMQQAhAgyHAQsgASAERgRAQd8AIQIMhwELIAEtAABBCkYEQCABQQFqIQEMCQsgAy0ALkHAAHENCCADQQA2AhwgAyABNgIUIANBthE2AhAgA0ECNgIMQQAhAgyGAQsgASAERgRAQd0AIQIMhgELIAEtAAAiAkENRgRAIAFBAWohAUHQACECDG0LIAEhACACQQlrDgQFAQEFAQsgBCABIgBGBEBB3AAhAgyFAQsgAC0AAEEKRw0AIABBAWoMAgtBACECIANBADYCHCADIAA2AhQgA0HKLTYCECADQQc2AgwMgwELIAEgBEYEQEHbACECDIMBCwJAIAEtAABBCWsOBAMAAAMACyABQQFqCyEBQc4AIQIMaAsgASAERgRAQdoAIQIMgQELIAEtAABBCWsOBAABAQABC0EAIQIgA0EANgIcIANBmhI2AhAgA0EHNgIMIAMgAUEBajYCFAx/CyADQYASOwEqQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2QA2AhwgAyABNgIUIANB6ho2AhAgA0EVNgIMQQAhAgx+C0HNACECDGQLIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDHwLIAEgBEYEQEHZACECDHwLIAEtAABBIEcNPSABQQFqIQEgAy0ALkEBcQ09IANBADYCHCADIAE2AhQgA0HCHDYCECADQR42AgxBACECDHsLIAEgBEYEQEHYACECDHsLAkACQAJAAkACQCABLQAAIgBBCmsOBAIDAwABCyABQQFqIQFBLCECDGULIABBOkcNASADQQA2AhwgAyABNgIUIANB5xE2AhAgA0EKNgIMQQAhAgx9CyABQQFqIQEgA0Evai0AAEEBcUUNcyADLQAyQYABcUUEQCADQTJqIQIgAxA1QQAhAAJAIAMoAjgiBkUNACAGKAIoIgZFDQAgAyAGEQAAIQALAkACQCAADhZNTEsBAQEBAQEBAQEBAQEBAQEBAQEAAQsgA0EpNgIcIAMgATYCFCADQawZNgIQIANBFTYCDEEAIQIMfgsgA0EANgIcIAMgATYCFCADQeULNgIQIANBETYCDEEAIQIMfQtBACEAAkAgAygCOCICRQ0AIAIoAlwiAkUNACADIAIRAAAhAAsgAEUNWSAAQRVHDQEgA0EFNgIcIAMgATYCFCADQZsbNgIQIANBFTYCDEEAIQIMfAtBywAhAgxiC0EAIQIgA0EANgIcIAMgATYCFCADQZAONgIQIANBFDYCDAx6CyADIAMvATJBgAFyOwEyDDsLIAEgBEcEQCADQRE2AgggAyABN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BQUFBQUFBQUFBQYFBQUFBQUFBQUFBQUABQAHCAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQAFAAUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEGp0AALBQEBAAEBAEHA0AALAQEAQdrQAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQanSAAsFAQEAAQEAQcDSAAsBAQBBytIACwYCAAAAAAIAQeHSAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw==' - -let wasmBuffer - -Object.defineProperty(module, 'exports', { - get: () => { - return wasmBuffer - ? wasmBuffer - : (wasmBuffer = Buffer.from(wasmBase64, 'base64')) - } -}) - - -/***/ }), - -/***/ 95627: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/* module decorator */ module = __nccwpck_require__.nmd(module); - - -const { Buffer } = __nccwpck_require__(72254) - -const wasmBase64 = 'AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnY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ABNgIIIAEgADYCDCABIAI2AggMAQtBHyECIARB////B00EQCAEQSYgBEEIdmciAGt2QQFxIABBAXRrQT5qIQILIAEgAjYCHCABQgA3AhAgAkECdEH01wBqIQACQEHI1QAoAgAiA0EBIAJ0IgdxRQRAIAAgATYCAEHI1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgLhocCAwd/A34BeyABIAJqIQQCQCAAIgMoAgwiAA0AIAMoAgQEQCADIAE2AgQLIwBBEGsiCSQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAk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BCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDBsLIANBHDYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgzzAgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDOsCCyADQR02AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM8gILIABBO0cNASABQQFqIQELQSYhAgzXAgtBACECIANBADYCHCADIAE2AhQgA0GfFTYCECADQQw2AgwM7wILIAEgBEcEQANAIAEtAABBIEcNhAIgBCABQQFqIgFHDQALQSwhAgzvAgtBLCECDO4CCyABIARGBEBBNCECDO4CCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtBNCECDO8CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNnwIgA0EyNgIcIAMgATYCFCADIAA2AgxBACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUEQCABQQFqIQEMnwILIANBMjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgztAgsgASAERwRAAkADQCABLQAAQTBrIgBB/wFxQQpPBEBBOiECDNcCCyADKQMgIgtCmbPmzJmz5swZVg0BIAMgC0IKfiIKNwMgIAogAK1C/wGDIgtCf4VWDQEgAyAKIAt8NwMgIAQgAUEBaiIBRw0AC0HAACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABQQFqIgEQMSIADRcM4gILQcAAIQIM7AILIAEgBEYEQEHJACECDOwCCwJAA0ACQCABLQAAQQlrDhgAAqICogKpAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAgCiAgsgBCABQQFqIgFHDQALQckAIQIM7AILIAFBAWohASADQS9qLQAAQQFxDaUCIANBADYCHCADIAE2AhQgA0GXEDYCECADQQo2AgxBACECDOsCCyABIARHBEADQCABLQAAQSBHDRUgBCABQQFqIgFHDQALQfgAIQIM6wILQfgAIQIM6gILIANBAjoAKAw4C0EAIQIgA0EANgIcIANBvws2AhAgA0ECNgIMIAMgAUEBajYCFAzoAgtBACECDM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E2AhQgA0GBGjYCECADQRU2AgxBACECDMkCCyABIARGBEBB+gEhAgzJAgsgAS0AAEHIAEYNASADQQE6ACgLQcABIQIMrgILQdoBIQIMrQILIAEgBEcEQCADQQw2AgggAyABNgIEQdkBIQIMrQILQfkBIQIMxQILIAEgBEYEQEH4ASECDMUCCyABLQAAQcgARw0EIAFBAWohAUHYASECDKsCCyABIARGBEBB9wEhAgzEAgsCQAJAIAEtAABBxQBrDhAABQUFBQUFBQUFBQUFBQUBBQsgAUEBaiEBQdYBIQIMqwILIAFBAWohAUHXASECDKoCC0H2ASECIAEgBEYNwgIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABButUAai0AAEcNAyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMwwILIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgBFBEBB4wEhAgyqAgsgA0H1ATYCHCADIAE2AhQgAyAANgIMQQAhAgzCAgtB9AEhAiABIARGDcECIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjVAGotAABHDQIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMICCyADQYEEOwEoIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgANAwwCCyADQQA2AgALQQAhAiADQQA2AhwgAyABNgIUIANB5R82AhAgA0EINgIMDL8CC0HVASECDKUCCyADQfMBNgIcIAMgATYCFCADIAA2AgxBACECDL0CC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ1uIABBFUcEQCADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgy9AgsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDLwCCyABIARHBEAgA0ENNgIIIAMgATYCBEHTASECDKMCC0HyASECDLsCCyABIARGBEBB8QEhAgy7AgsCQAJAAkAgAS0AAEHIAGsOCwABCAgICAgICAgCCAsgAUEBaiEBQdABIQIMowILIAFBAWohAUHRASECDKICCyABQQFqIQFB0gEhAgyhAgtB8AEhAiABIARGDbkCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEG11QBqLQAARw0EIABBAkYNAyAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy5AgtB7wEhAiABIARGDbgCIAMoAgAiACAEIAFraiEGIAEgAGtBAWohBQNAIAEtAAAgAEGz1QBqLQAARw0DIABBAUYNAiAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy4AgtB7gEhAiABIARGDbcCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEGw1QBqLQAARw0CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy3AgsgAygCBCEAIANCADcDACADIAAgBUEBaiIBECsiAEUNAiADQewBNgIcIAMgATYCFCADIAA2AgxBACECDLYCCyADQQA2AgALIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ2cAiADQe0BNgIcIAMgATYCFCADIAA2AgxBACECDLQCC0HPASECDJoCC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMtAILQc4BIQIMmgILIANB6wE2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyyAgsgASAERgRAQesBIQIMsgILIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMsQILQc0BIQIMlwILIAEgBEcEQCADQQ42AgggAyABNgIEQcwBIQIMlwILQeoBIQIMrwILIAEgBEYEQEHpASECDK8CCyABLQAAQTBrIgBB/wFxQQpJBEAgAyAAOgAqIAFBAWohAUHLASECDJYCCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNlwIgA0HoATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgASAERgRAQecBIQIMrgILAkAgAS0AAEEuRgRAIAFBAWohAQwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmAIgA0HmATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgtBygEhAgyUAgsgASAERgRAQeUBIQIMrQILQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIBNgIcIAMgATYCFCADIAA2AgxBACECDK8CCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmgIgA0HjATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5AE2AhwgAyABNgIUIAMgADYCDAytAgtByQEhAgyTAgtBACEAAkAgAygCOCICRQ0AIAIoAkQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GkDTYCECADQSE2AgxBACECDK0CC0HIASECDJMCCyADQeEBNgIcIAMgATYCFCADQdAaNgIQIANBFTYCDEEAIQIMqwILIAEgBEYEQEHhASECDKsCCwJAIAEtAABBIEYEQCADQQA7ATQgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GZETYCECADQQk2AgxBACECDKsCC0HHASECDJECCyABIARGBEBB4AEhAgyqAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKsCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyqAgtBxgEhAgyQAgsgASAERgRAQd8BIQIMqQILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyqAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqQILQcUBIQIMjwILIAEgBEYEQEHeASECDKgCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqQILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKgCC0HEASECDI4CCyABIARGBEBB3QEhAgynAgsCQAJAAkACQCABLQAAQQprDhcCAwMAAwMDAwMDAwMDAwMDAwMDAwMDAQMLIAFBAWoMBQsgAUEBaiEBQcMBIQIMjwILIAFBAWohASADQS9qLQAAQQFxDQggA0EANgIcIAMgATYCFCADQY0LNgIQIANBDTYCDEEAIQIMpwILIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKYCCyABIARHBEAgA0EPNgIIIAMgATYCBEEBIQIMjQILQdwBIQIMpQILAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0HbASECDKYCCyADKAIEIQAgA0EANgIEIAMgACABEC0iAEUEQCABQQFqIQEMBAsgA0HaATYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgylAgsgAygCBCEAIANBADYCBCADIAAgARAtIgANASABQQFqCyEBQcEBIQIMigILIANB2QE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMogILQcIBIQIMiAILIANBL2otAABBAXENASADQQA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QCABLQAAQcUAaw4RAEFBQUFBQUFBQQFBQUFBQQJBCyABQQFqIQFBsQEhAgz5AQsgAUEBaiEBQbIBIQIM+AELIAFBAWohAUGzASECDPcBC0HLASECIAEgBEYNjwIgAygCACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCABLQAAIABBkdUAai0AAEcNPCAAQQZGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkAILIANBADYCACAGQQFqIQFBGgw8C0HKASECIAEgBEYNjgIgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBjdUAai0AAEcNOyAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMjwILIANBADYCACAGQQFqIQFBIQw7CyABIARGBEBByQEhAgyOAgsCQAJAIAEtAABBwQBrDhQAPT09PT09PT09PT09PT09PT09AT0LIAFBAWohAUGtASECDPUBCyABQQFqIQFBsAEhAgz0AQsgASAERgRAQcgBIQIMjQILAkACQCABLQAAQdUAaw4LADw8PDw8PDw8PAE8CyABQQFqIQFBrgEhAgz0AQsgAUEBaiEBQa8BIQIM8wELQccBIQIgASAERg2LAiADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw04IABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyMAgsgA0EANgIAIAZBAWohAUEqDDgLIAEgBEYEQEHGASECDIsCCyABLQAAQdAARw04IAFBAWohAUElDDcLQcUBIQIgASAERg2JAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGB1QBqLQAARw02IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyKAgsgA0EANgIAIAZBAWohAUEODDYLIAEgBEYEQEHEASECDIkCCyABLQAAQcUARw02IAFBAWohAUGrASECDO8BCyABIARGBEBBwwEhAgyIAgsCQAJAAkACQCABLQAAQcIAaw4PAAECOTk5OTk5OTk5OTkDOQsgAUEBaiEB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HwEfCyABQQFqIQFBkQEhAgzXAQsgAUEBaiEBQZIBIQIM1gELIAEgBEYEQEGqASECDO8BCyABLQAAQcwARw0cIAFBAWohAUEKDBsLQakBIQIgASAERg3tASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHR1ABqLQAARw0aIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzuAQsgA0EANgIAIAZBAWohAUEeDBoLQagBIQIgASAERg3sASADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEHK1ABqLQAARw0ZIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAztAQsgA0EANgIAIAZBAWohAUEVDBkLQacBIQIgASAERg3rASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHH1ABqLQAARw0YIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzsAQsgA0EANgIAIAZBAWohAUEXDBgLQaYBIQIgASAERg3qASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHB1ABqLQAARw0XIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzrAQsgA0EANgIAIAZBAWohAUEYDBcLIAEgBEYEQEGlASECDOoBCwJAAkAgAS0AAEHJAGsOBwAZGRkZGQEZCyABQQFqIQFBiwEhAgzRAQsgAUEBaiEBQYwBIQIM0AELQaQBIQIgASAERg3oASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm1QBqLQAARw0VIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzpAQsgA0EANgIAIAZBAWohAUEJDBULQaMBIQIgASAERg3nASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk1QBqLQAARw0UIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzoAQsgA0EANgIAIAZBAWohAUEfDBQLQaIBIQIgASAERg3mASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEG+1ABqLQAARw0TIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAznAQsgA0EANgIAIAZBAWohAUECDBMLQaEBIQIgASAERg3lASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYDQCABLQAAIABBvNQAai0AAEcNESAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5QELIAEgBEYEQEGgASECDOUBC0EBIAEtAABB3wBHDREaIAFBAWohAUGHASECDMsBCyADQQA2AgAgBkEBaiEBQYgBIQIMygELQZ8BIQIgASAERg3iASADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw0PIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzjAQsgA0EANgIAIAZBAWohAUEpDA8LQZ4BIQIgASAERg3hASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEG41ABqLQAARw0OIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAziAQsgA0EANgIAIAZBAWohAUEtDA4LIAEgBEYEQEGdASECDOEBCyABLQAAQcUARw0OIAFBAWohAUGEASECDMcBCyABIARGBEBBnAEhAgzgAQsCQAJAIAEtAABBzABrDggADw8PDw8PAQ8LIAFBAWohAUGCASECDMcBCyABQQFqIQFBgwEhAgzGAQtBmwEhAiABIARGDd4BIAMoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQbPUAGotAABHDQsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADN8BCyADQQA2AgAgBkEBaiEBQSMMCwtBmgEhAiABIARGDd0BIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDUAGotAABHDQogAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADN4BCyADQQA2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zYCECADQQY2AgwM0QELQfgAIQIMtwELIANBkAE2AhwgAyABNgIUIAMgADYCDEEAIQIMzwELQQAhAAJAIAMoAjgiAkUNACACKAJAIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GCDzYCECADQSA2AgxBACECDM4BC0H3ACECDLQBCyADQY8BNgIcIAMgATYCFCADQewbNgIQIANBFTYCDEEAIQIMzAELIAEgBEYEQEGPASECDMwBCwJAIAEtAABBIEYEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQZsfNgIQIANBBjYCDEEAIQIMzAELQQIhAgyyAQsDQCABLQAAQSBHDQIgBCABQQFqIgFHDQALQY4BIQIMygELIAEgBEYEQEGNASECDMoBCwJAIAEtAABBCWsOBEoAAEoAC0H1ACECDLABCyADLQApQQVGBEBB9gAhAgywAQtB9AAhAgyvAQsgASAERgRAQYwBIQIMyAELIANBEDYCCCADIAE2AgQMCgsgASAERgRAQYsBIQIMxwELAkAgAS0AAEEJaw4ERwAARwALQfMAIQIMrQELIAEgBEcEQCADQRA2AgggAyABNgIEQfEAIQIMrQELQYoBIQIMxQELAkAgASAERwRAA0AgAS0AAEGg0ABqLQAAIgBBA0cEQAJAIABBAWsOAkkABAtB8AAhAgyvAQsgBCABQQFqIgFHDQALQYgBIQIMxgELQYgBIQIMxQELIANBADYCHCADIAE2AhQgA0HbIDYCECADQQc2AgxBACECDMQBCyABIARGBEBBiQEhAgzEAQsCQAJAAkAgAS0AAEGg0gBqLQAAQQFrDgNGAgABC0HyACECDKwBCyADQQA2AhwgAyABNgIUIANBtBI2AhAgA0EHNgIMQQAhAgzEAQtB6gAhAgyqAQsgASAERwRAIAFBAWohAUHvACECDKoBC0GHASECDMIBCyAEIAEiAEYEQEGGASECDMIBCyAALQAAIgFBL0YEQCAAQQFqIQFB7gAhAgypAQsgAUEJayICQRdLDQEgACEBQQEgAnRBm4CABHENQQwBCyAEIAEiAEYEQEGFASECDMEBCyAALQAAQS9HDQAgAEEBaiEBDAMLQQAhAiADQQA2AhwgAyAANgIUIANB2yA2AhAgA0EHNgIMDL8BCwJAAkACQAJAAkADQCABLQAAQaDOAGotAAAiAEEFRwRAAkACQCAAQQFrDghHBQYHCAAEAQgLQesAIQIMrQELIAFBAWohAUHtACECDKwBCyAEIAFBAWoiAUcNAAtBhAEhAgzDAQsgAUEBagwUCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDMEBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDMABCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDL8BCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy+AQsgASAERgRAQYMBIQIMvgELAkAgAS0AAEGgzgBqLQAAQQFrDgg+BAUGAAgCAwcLIAFBAWohAQtBAyECDKMBCyABQQFqDA0LQQAhAiADQQA2AhwgA0HREjYCECADQQc2AgwgAyABQQFqNgIUDLoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDLkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDLgBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDLcBCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy2AQtB7AAhAgycAQsgASAERgRAQYIBIQIMtQELIAFBAWoMAgsgASAERgRAQYEBIQIMtAELIAFBAWoMAQsgASAERg0BIAFBAWoLIQFBBCECDJgBC0GAASECDLABCwNAIAEtAABBoMwAai0AACIAQQJHBEAgAEEBRwRAQekAIQIMmQELDDELIAQgAUEBaiIBRw0AC0H/ACECDK8BCyABIARGBEBB/gAhAgyvAQsCQCABLQAAQQlrDjcvAwYvBAYGBgYGBgYGBgYGBgYGBgYGBgUGBgIGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYABgsgAUEBagshAUEFIQIMlAELIAFBAWoMBgsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgyrAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyqAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgypAQsgA0EANgIcIAMgATYCFCADQY0UNgIQIANBBzYCDEEAIQIMqAELAkACQAJAAkADQCABLQAAQaDKAGotAAAiAEEFRwRAAkAgAEEBaw4GLgMEBQYABgtB6AAhAgyUAQsgBCABQQFqIgFHDQALQf0AIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqAELIANBADYCHCADIAE2AhQgA0HkCDYCECADQQc2AgxBACECDKcBCyABIARGDQEgAUEBagshAUEGIQIMjAELQfwAIQIMpAELAkACQAJAAkADQCABLQAAQaDIAGotAAAiAEEFRwRAIABBAWsOBCkCAwQFCyAEIAFBAWoiAUcNAAtB+wAhAgynAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgymAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgylAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgykAQsgA0EANgIcIAMgATYCFCADQbwKNgIQIANBBzYCDEEAIQIMowELQc8AIQIMiQELQdEAIQIMiAELQecAIQIMhwELIAEgBEYEQEH6ACECDKABCwJAIAEtAABBCWsOBCAAACAACyABQQFqIQFB5gAhAgyGAQsgASAERgRAQfkAIQIMnwELAkAgAS0AAEEJaw4EHwAAHwALQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFBEBB4gEhAgyGAQsgAEEVRwRAIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDJ8BCyADQfgANgIcIAMgATYCFCADQeoaNgIQIANBFTYCDEEAIQIMngELIAEgBEcEQCADQQ02AgggAyABNgIEQeQAIQIMhQELQfcAIQIMnQELIAEgBEYEQEH2ACECDJ0BCwJAAkACQCABLQAAQcgAaw4LAAELCwsLCwsLCwILCyABQQFqIQFB3QAhAgyFAQsgAUEBaiEBQeAAIQIMhAELIAFBAWohAUHjACECDIMBC0H1ACECIAEgBEYNmwEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBtdUAai0AAEcNCCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMnAELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgAEQCADQfQANgIcIAMgATYCFCADIAA2AgxBACECDJwBC0HiACECDIIBC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMnAELQeEAIQIMggELIANB8wA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyaAQsgAy0AKSIAQSNrQQtJDQkCQCAAQQZLDQBBASAAdEHKAHFFDQAMCgtBACECIANBADYCHCADIAE2AhQgA0HtCTYCECADQQg2AgwMmQELQfIAIQIgASAERg2YASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGz1QBqLQAARw0FIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyZAQsgAygCBCEAIANCADcDACADIAAgBkEBaiIBECsiAARAIANB8QA2AhwgAyABNgIUIAMgADYCDEEAIQIMmQELQd8AIQIMfwtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJkBC0HeACECDH8LIANB8AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyXAQsgAy0AKUEhRg0GIANBADYCHCADIAE2AhQgA0GRCjYCECADQQg2AgxBACECDJYBC0HvACECIAEgBEYNlQEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMlgELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgBFDQIgA0HtADYCHCADIAE2AhQgAyAANgIMQQAhAgyVAQsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNgAEgA0HuADYCHCADIAE2AhQgAyAANgIMQQAhAgyTAQtB3AAhAgx5C0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMkwELQdsAIQIMeQsgA0HsADYCHCADIAE2AhQgA0GAGzYCECADQRU2AgxBACECDJEBCyADLQApIgBBI0kNACAAQS5GDQAgA0EANgIcIAMgATYCFCADQckJNgIQIANBCDYCDEEAIQIMkAELQdoAIQIMdgsgASAERgRAQesAIQIMjwELAkAgAS0AAEEvRgRAIAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANBsjg2AhAgA0EINgIMQQAhAgyPAQtB2QAhAgx1CyABIARHBEAgA0EONgIIIAMgATYCBEHYACECDHULQeoAIQIMjQELIAEgBEYEQEHpACECDI0BC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CADIAE2AhQgA0GmDzYCECADQRw2AgxBACECDGgLIANBygA2AhwgAyABNgIUIANBhRw2AhAgA0EVNgIMQQAhAgxnCyABIARHBEAgASECA0AgBCACIgFrQRBOBEAgAUEQaiEC/Qz/////////////////////IAH9AAAAIg1BB/1sIA39DODg4ODg4ODg4ODg4ODg4OD9bv0MX19fX19fX19fX19fX19fX/0mIA39DAkJCQkJCQkJCQkJCQkJCQn9I/1Q/VL9ZEF/c2giAEEQRg0BIAAgAWohAQwYCyABIARGBEBBxAAhAgxpCyABLQAAQcDBAGotAABBAUcNFyAEIAFBAWoiAkcNAAtBxAAhAgxnC0HEACECDGYLIAEgBEcEQANAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXEiAEEJRg0AIABBIEYNAAJAAkACQAJAIABB4wBrDhMAAwMDAwMDAwEDAwMDAwMDAwMCAwsgAUEBaiEBQTYhAgxSCyABQQFqIQFBNyECDFELIAFBAWohAUE4IQIMUAsMFQsgBCABQQFqIgFHDQALQTwhAgxmC0E8IQIMZQsgASAERgRAQcgAIQIMZQsgA0ESNgIIIAMgATYCBAJAAkACQAJAAkAgAy0ALEEBaw4EFAABAgkLIAMtADJBIHENA0HgASECDE8LAkAgAy8BMiIAQQhxRQ0AIAMtAChBAUcNACADLQAuQQhxRQ0CCyADIABB9/sDcUGABHI7ATIMCwsgAyADLwEyQRByOwEyDAQLIANBADYCBCADIAEgARAxIgAEQCADQcEANgIcIAMgADYCDCADIAFBAWo2AhRBACECDGYLIAFBAWohAQxYCyADQQA2AhwgAyABNgIUIANB9BM2AhAgA0EENgIMQQAhAgxkC0HHACECIAEgBEYNYyADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIABBwMUAai0AACABLQAAQSByRw0BIABBBkYNSiAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAxkCyADQQA2AgAMBQsCQCABIARHBEADQCABLQAAQcDDAGotAAAiAEEBRwRAIABBAkcNAyABQQFqIQEMBQsgBCABQQ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FUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw==' - -let wasmBuffer - -Object.defineProperty(module, 'exports', { - get: () => { - return wasmBuffer - ? wasmBuffer - : (wasmBuffer = Buffer.from(wasmBase64, 'base64')) - } -}) - - -/***/ }), - -/***/ 41891: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.enumToMap = enumToMap; -function enumToMap(obj, filter = [], exceptions = []) { - const emptyFilter = (filter?.length ?? 0) === 0; - const emptyExceptions = (exceptions?.length ?? 0) === 0; - return Object.fromEntries(Object.entries(obj).filter(([, value]) => { - return (typeof value === 'number' && - (emptyFilter || filter.includes(value)) && - (emptyExceptions || !exceptions.includes(value))); - })); -} - - -/***/ }), - -/***/ 66771: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { kClients } = __nccwpck_require__(72785) -const Agent = __nccwpck_require__(71208) -const { - kAgent, - kMockAgentSet, - kMockAgentGet, - kDispatches, - kIsMockActive, - kNetConnect, - kGetNetConnect, - kOptions, - kFactory, - kMockAgentRegisterCallHistory, - kMockAgentIsCallHistoryEnabled, - kMockAgentAddCallHistoryLog, - kMockAgentMockCallHistoryInstance, - kMockAgentAcceptsNonStandardSearchParameters, - kMockCallHistoryAddLog, - kIgnoreTrailingSlash -} = __nccwpck_require__(24347) -const MockClient = __nccwpck_require__(58687) -const MockPool = __nccwpck_require__(26193) -const { matchValue, normalizeSearchParams, buildAndValidateMockOptions, normalizeOrigin } = __nccwpck_require__(79323) -const { InvalidArgumentError, UndiciError } = __nccwpck_require__(48045) -const Dispatcher = __nccwpck_require__(87781) -const PendingInterceptorsFormatter = __nccwpck_require__(86823) -const { MockCallHistory } = __nccwpck_require__(42054) - -class MockAgent extends Dispatcher { - constructor (opts = {}) { - super(opts) - - const mockOptions = buildAndValidateMockOptions(opts) - - this[kNetConnect] = true - this[kIsMockActive] = true - this[kMockAgentIsCallHistoryEnabled] = mockOptions.enableCallHistory ?? false - this[kMockAgentAcceptsNonStandardSearchParameters] = mockOptions.acceptNonStandardSearchParameters ?? false - this[kIgnoreTrailingSlash] = mockOptions.ignoreTrailingSlash ?? false - - // 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] = mockOptions - - if (this[kMockAgentIsCallHistoryEnabled]) { - this[kMockAgentRegisterCallHistory]() - } - } - - get (origin) { - // Normalize origin to handle URL objects and case-insensitive hostnames - const normalizedOrigin = normalizeOrigin(origin) - const originKey = this[kIgnoreTrailingSlash] ? normalizedOrigin.replace(/\/$/, '') : normalizedOrigin - - let dispatcher = this[kMockAgentGet](originKey) - - if (!dispatcher) { - dispatcher = this[kFactory](originKey) - this[kMockAgentSet](originKey, dispatcher) - } - return dispatcher - } - - dispatch (opts, handler) { - opts.origin = normalizeOrigin(opts.origin) - - // Call MockAgent.get to perform additional setup before dispatching as normal - this.get(opts.origin) - - this[kMockAgentAddCallHistoryLog](opts) - - const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters] - - const dispatchOpts = { ...opts } - - if (acceptNonStandardSearchParameters && dispatchOpts.path) { - const [path, searchParams] = dispatchOpts.path.split('?') - const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters) - dispatchOpts.path = `${path}?${normalizedSearchParams}` - } - - return this[kAgent].dispatch(dispatchOpts, handler) - } - - async close () { - this.clearCallHistory() - await this[kAgent].close() - this[kClients].clear() - } - - deactivate () { - this[kIsMockActive] = false - } - - activate () { - this[kIsMockActive] = true +var ENTITY_DISCRIMINATOR_PROPERTY_NAME, ENTITY_TYPES_WITH_API_SUPPORT; +var init_entity = __esm({ + "node_modules/@redocly/openapi-core/lib/types/entity.js"() { + init_is_plain_object(); + init_json_schema_adapter(); + ENTITY_DISCRIMINATOR_PROPERTY_NAME = "type"; + ENTITY_TYPES_WITH_API_SUPPORT = ["api-description", "api-operation", "data-schema"]; } +}); - 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.') - } +// node_modules/@redocly/openapi-core/lib/rules/other/stats.js +var StatsOAS, StatsAsync2, StatsAsync3; +var init_stats = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/other/stats.js"() { + StatsOAS = (statsAccumulator) => { + return { + ExternalDocs: { + leave() { + statsAccumulator.externalDocs.total++; + } + }, + ref: { + enter(ref) { + statsAccumulator.refs.items.add(ref["$ref"]); + } + }, + Tag: { + leave(tag) { + statsAccumulator.tags.items.add(tag.name); + } + }, + Link: { + leave(link) { + statsAccumulator.links.items.add(link.operationId); + } + }, + WebhooksMap: { + Operation: { + leave(operation) { + statsAccumulator.webhooks.total++; + if (operation.tags) { + for (const tag of operation.tags) { + statsAccumulator.tags.items.add(tag); + } + } + } + } + }, + Paths: { + PathItem: { + leave() { + statsAccumulator.pathItems.total++; + }, + Operation: { + leave(operation) { + statsAccumulator.operations.total++; + if (operation.tags) { + for (const tag of operation.tags) { + statsAccumulator.tags.items.add(tag); + } + } + } + }, + Parameter: { + leave(parameter) { + statsAccumulator.parameters.items.add(parameter.name); + } + } + } + }, + NamedSchemas: { + Schema: { + leave() { + statsAccumulator.schemas.total++; + } + } + }, + Root: { + leave() { + statsAccumulator.parameters.total = statsAccumulator.parameters.items.size; + statsAccumulator.refs.total = statsAccumulator.refs.items.size; + statsAccumulator.links.total = statsAccumulator.links.items.size; + statsAccumulator.tags.total = statsAccumulator.tags.items.size; + } + } + }; + }; + StatsAsync2 = (statsAccumulator) => { + return { + ExternalDocs: { + leave() { + statsAccumulator.externalDocs.total++; + } + }, + ref: { + enter(ref) { + statsAccumulator.refs.items.add(ref["$ref"]); + } + }, + Tag: { + leave(tag) { + statsAccumulator.tags.items.add(tag.name); + } + }, + ChannelMap: { + Channel: { + leave() { + statsAccumulator.channels.total++; + }, + Operation: { + leave(operation) { + statsAccumulator.operations.total++; + if (operation.tags) { + for (const tag of operation.tags) { + statsAccumulator.tags.items.add(tag); + } + } + } + }, + Parameter: { + leave(parameter) { + if (parameter.name) { + statsAccumulator.parameters.items.add(parameter.name); + } + } + } + } + }, + NamedSchemas: { + Schema: { + leave() { + statsAccumulator.schemas.total++; + } + } + }, + Root: { + leave() { + statsAccumulator.parameters.total = statsAccumulator.parameters.items.size; + statsAccumulator.refs.total = statsAccumulator.refs.items.size; + statsAccumulator.tags.total = statsAccumulator.tags.items.size; + } + } + }; + }; + StatsAsync3 = (statsAccumulator) => { + return { + ExternalDocs: { + leave() { + statsAccumulator.externalDocs.total++; + } + }, + ref: { + enter(ref) { + statsAccumulator.refs.items.add(ref["$ref"]); + } + }, + Tag: { + leave(tag) { + statsAccumulator.tags.items.add(tag.name); + } + }, + NamedChannels: { + Channel: { + leave() { + statsAccumulator.channels.total++; + }, + Parameter: { + leave(parameter) { + if (parameter.name) { + statsAccumulator.parameters.items.add(parameter.name); + } + } + } + } + }, + NamedOperations: { + Operation: { + leave(operation) { + statsAccumulator.operations.total++; + if (operation.tags) { + for (const tag of operation.tags) { + statsAccumulator.tags.items.add(tag); + } + } + } + } + }, + NamedSchemas: { + Schema: { + leave() { + statsAccumulator.schemas.total++; + } + } + }, + Root: { + leave() { + statsAccumulator.parameters.total = statsAccumulator.parameters.items.size; + statsAccumulator.refs.total = statsAccumulator.refs.items.size; + statsAccumulator.tags.total = statsAccumulator.tags.items.size; + } + } + }; + }; } +}); - disableNetConnect () { - this[kNetConnect] = false +// node_modules/@redocly/openapi-core/lib/typings/arazzo.js +var VERSION_PATTERN, ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT; +var init_arazzo2 = __esm({ + "node_modules/@redocly/openapi-core/lib/typings/arazzo.js"() { + VERSION_PATTERN = /^1\.0\.\d+(-.+)?$/; + ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT = ["1.0.1"]; } +}); - enableCallHistory () { - this[kMockAgentIsCallHistoryEnabled] = true - - return this +// node_modules/@redocly/openapi-core/lib/detect-spec.js +function getMajorSpecVersion(version2) { + if (version2 === "oas2") { + return "oas2"; + } else if (version2 === "async2") { + return "async2"; + } else if (version2 === "async3") { + return "async3"; + } else if (version2 === "arazzo1") { + return "arazzo1"; + } else if (version2 === "overlay1") { + return "overlay1"; + } else if (version2 === "openrpc1") { + return "openrpc1"; + } else { + return "oas3"; } - - disableCallHistory () { - this[kMockAgentIsCallHistoryEnabled] = false - - return this +} +function detectSpec(root) { + if (!isPlainObject(root)) { + throw new Error(`Document must be JSON object, got ${typeof root}`); } - - getCallHistory () { - return this[kMockAgentMockCallHistoryInstance] + if (typeof root.openrpc === "string" && root.openrpc.startsWith("1.")) { + return "openrpc1"; } - - clearCallHistory () { - if (this[kMockAgentMockCallHistoryInstance] !== undefined) { - this[kMockAgentMockCallHistoryInstance].clear() - } + if (root.openapi && typeof root.openapi !== "string") { + throw new Error(`Invalid OpenAPI version: should be a string but got "${typeof root.openapi}"`); } - - // This is required to bypass issues caused by using global symbols - see: - // https://github.com/nodejs/undici/issues/1447 - get isMockActive () { - return this[kIsMockActive] + if (typeof root.openapi === "string" && root.openapi.startsWith("3.0.")) { + return "oas3_0"; } - - [kMockAgentRegisterCallHistory] () { - if (this[kMockAgentMockCallHistoryInstance] === undefined) { - this[kMockAgentMockCallHistoryInstance] = new MockCallHistory() - } + if (typeof root.openapi === "string" && root.openapi.startsWith("3.1.")) { + return "oas3_1"; } - - [kMockAgentAddCallHistoryLog] (opts) { - if (this[kMockAgentIsCallHistoryEnabled]) { - // additional setup when enableCallHistory class method is used after mockAgent instantiation - this[kMockAgentRegisterCallHistory]() - - // add call history log on every call (intercepted or not) - this[kMockAgentMockCallHistoryInstance][kMockCallHistoryAddLog](opts) - } + if (typeof root.openapi === "string" && root.openapi.startsWith("3.2.")) { + return "oas3_2"; } - - [kMockAgentSet] (origin, dispatcher) { - this[kClients].set(origin, { count: 0, dispatcher }) + if (root.swagger && root.swagger === "2.0") { + return "oas2"; } - - [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) + if (root.openapi || root.swagger) { + throw new Error(`Unsupported OpenAPI version: ${root.openapi || root.swagger}`); } - - [kMockAgentGet] (origin) { - // First check if we can immediately find it - const result = this[kClients].get(origin) - if (result?.dispatcher) { - return result.dispatcher - } - - // 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, result] of Array.from(this[kClients])) { - if (result && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) { - const dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) - dispatcher[kDispatches] = result.dispatcher[kDispatches] - return dispatcher - } - } + if (typeof root.asyncapi === "string" && root.asyncapi.startsWith("2.")) { + return "async2"; } - - [kGetNetConnect] () { - return this[kNetConnect] + if (typeof root.asyncapi === "string" && root.asyncapi.startsWith("3.")) { + return "async3"; } - - pendingInterceptors () { - const mockAgentClients = this[kClients] - - return Array.from(mockAgentClients.entries()) - .flatMap(([origin, result]) => result.dispatcher[kDispatches].map(dispatch => ({ ...dispatch, origin }))) - .filter(({ pending }) => pending) + if (root.asyncapi) { + throw new Error(`Unsupported AsyncAPI version: ${root.asyncapi}`); } - - assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { - const pending = this.pendingInterceptors() - - if (pending.length === 0) { - return - } - - throw new UndiciError( - pending.length === 1 - ? `1 interceptor is pending:\n\n${pendingInterceptorsFormatter.format(pending)}`.trim() - : `${pending.length} interceptors are pending:\n\n${pendingInterceptorsFormatter.format(pending)}`.trim() - ) + if (typeof root.arazzo === "string" && VERSION_PATTERN.test(root.arazzo)) { + return "arazzo1"; } -} - -module.exports = MockAgent - - -/***/ }), - -/***/ 42054: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { kMockCallHistoryAddLog } = __nccwpck_require__(24347) -const { InvalidArgumentError } = __nccwpck_require__(48045) - -function handleFilterCallsWithOptions (criteria, options, handler, store) { - switch (options.operator) { - case 'OR': - store.push(...handler(criteria)) - - return store - case 'AND': - return handler.call({ logs: store }, criteria) - default: - // guard -- should never happens because buildAndValidateFilterCallsOptions is called before - throw new InvalidArgumentError('options.operator must to be a case insensitive string equal to \'OR\' or \'AND\'') + if (typeof root.overlay === "string" && VERSION_PATTERN.test(root.overlay)) { + return "overlay1"; } + throw new Error(`Unsupported specification`); } - -function buildAndValidateFilterCallsOptions (options = {}) { - const finalOptions = {} - - if ('operator' in options) { - if (typeof options.operator !== 'string' || (options.operator.toUpperCase() !== 'OR' && options.operator.toUpperCase() !== 'AND')) { - throw new InvalidArgumentError('options.operator must to be a case insensitive string equal to \'OR\' or \'AND\'') - } - - return { - ...finalOptions, - operator: options.operator.toUpperCase() - } +var specVersions2; +var init_detect_spec = __esm({ + "node_modules/@redocly/openapi-core/lib/detect-spec.js"() { + init_arazzo2(); + init_is_plain_object(); + specVersions2 = [ + "oas2", + "oas3_0", + "oas3_1", + "oas3_2", + "async2", + "async3", + "arazzo1", + "overlay1", + "openrpc1" + ]; } +}); - return finalOptions +// node_modules/js-yaml/dist/js-yaml.mjs +function isNothing(subject) { + return typeof subject === "undefined" || subject === null; } - -function makeFilterCalls (parameterName) { - return (parameterValue) => { - if (typeof parameterValue === 'string' || parameterValue == null) { - return this.logs.filter((log) => { - return log[parameterName] === parameterValue - }) - } - if (parameterValue instanceof RegExp) { - return this.logs.filter((log) => { - return parameterValue.test(log[parameterName]) - }) +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]; } - - throw new InvalidArgumentError(`${parameterName} parameter should be one of string, regexp, undefined or null`) } + return target; } -function computeUrlWithMaybeSearchParameters (requestInit) { - // path can contains query url parameters - // or query can contains query url parameters - try { - const url = new URL(requestInit.path, requestInit.origin) - - // requestInit.path contains query url parameters - // requestInit.query is then undefined - if (url.search.length !== 0) { - return url - } - - // requestInit.query can be populated here - url.search = new URLSearchParams(requestInit.query).toString() - - return url - } catch (error) { - throw new InvalidArgumentError('An error occurred when computing MockCallHistoryLog.url', { cause: error }) +function repeat(string, count) { + var result = "", cycle; + for (cycle = 0; cycle < count; cycle += 1) { + result += string; } + return result; } - -class MockCallHistoryLog { - constructor (requestInit = {}) { - this.body = requestInit.body - this.headers = requestInit.headers - this.method = requestInit.method - - const url = computeUrlWithMaybeSearchParameters(requestInit) - - this.fullUrl = url.toString() - this.origin = url.origin - this.path = url.pathname - this.searchParams = Object.fromEntries(url.searchParams) - this.protocol = url.protocol - this.host = url.host - this.port = url.port - this.hash = url.hash - } - - toMap () { - return new Map([ - ['protocol', this.protocol], - ['host', this.host], - ['port', this.port], - ['origin', this.origin], - ['path', this.path], - ['hash', this.hash], - ['searchParams', this.searchParams], - ['fullUrl', this.fullUrl], - ['method', this.method], - ['body', this.body], - ['headers', this.headers]] - ) - } - - toString () { - const options = { betweenKeyValueSeparator: '->', betweenPairSeparator: '|' } - let result = '' - - this.toMap().forEach((value, key) => { - if (typeof value === 'string' || value === undefined || value === null) { - result = `${result}${key}${options.betweenKeyValueSeparator}${value}${options.betweenPairSeparator}` - } - if ((typeof value === 'object' && value !== null) || Array.isArray(value)) { - result = `${result}${key}${options.betweenKeyValueSeparator}${JSON.stringify(value)}${options.betweenPairSeparator}` - } - // maybe miss something for non Record / Array headers and searchParams here - }) - - // delete last betweenPairSeparator - return result.slice(0, -1) +function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; +} +function formatError(exception2, compact) { + var where = "", message = exception2.reason || "(unknown reason)"; + if (!exception2.mark) return message; + if (exception2.mark.name) { + where += 'in "' + exception2.mark.name + '" '; } + where += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")"; + if (!compact && exception2.mark.snippet) { + where += "\n\n" + exception2.mark.snippet; + } + return message + " " + where; } - -class MockCallHistory { - logs = [] - - calls () { - return this.logs +function YAMLException$1(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 = new Error().stack || ""; } - - firstCall () { - return this.logs.at(0) +} +function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + var head = ""; + var tail = ""; + var maxHalfLength = Math.floor(maxLineLength / 2) - 1; + if (position - lineStart > maxHalfLength) { + head = " ... "; + lineStart = position - maxHalfLength + head.length; } - - lastCall () { - return this.logs.at(-1) + if (lineEnd - position > maxHalfLength) { + tail = " ..."; + lineEnd = position + maxHalfLength - tail.length; } - - nthCall (number) { - if (typeof number !== 'number') { - throw new InvalidArgumentError('nthCall must be called with a number') - } - if (!Number.isInteger(number)) { - throw new InvalidArgumentError('nthCall must be called with an integer') - } - if (Math.sign(number) !== 1) { - throw new InvalidArgumentError('nthCall must be called with a positive value. use firstCall or lastCall instead') + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail, + pos: position - lineStart + head.length + // relative position + }; +} +function padStart(string, max) { + return common.repeat(" ", max - string.length) + string; +} +function makeSnippet(mark, options2) { + options2 = Object.create(options2 || null); + if (!mark.buffer) return null; + if (!options2.maxLength) options2.maxLength = 79; + if (typeof options2.indent !== "number") options2.indent = 1; + if (typeof options2.linesBefore !== "number") options2.linesBefore = 3; + if (typeof options2.linesAfter !== "number") options2.linesAfter = 2; + var re3 = /\r?\n|\r|\0/g; + var lineStarts = [0]; + var lineEnds = []; + var match2; + var foundLineNo = -1; + while (match2 = re3.exec(mark.buffer)) { + lineEnds.push(match2.index); + lineStarts.push(match2.index + match2[0].length); + if (mark.position <= match2.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; } - - // non zero based index. this is more human readable - return this.logs.at(number - 1) } - - filterCalls (criteria, options) { - // perf - if (this.logs.length === 0) { - return this.logs - } - if (typeof criteria === 'function') { - return this.logs.filter(criteria) - } - if (criteria instanceof RegExp) { - return this.logs.filter((log) => { - return criteria.test(log.toString()) - }) - } - if (typeof criteria === 'object' && criteria !== null) { - // no criteria - returning all logs - if (Object.keys(criteria).length === 0) { - return this.logs - } - - const finalOptions = { operator: 'OR', ...buildAndValidateFilterCallsOptions(options) } - - let maybeDuplicatedLogsFiltered = [] - if ('protocol' in criteria) { - maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.protocol, finalOptions, this.filterCallsByProtocol, maybeDuplicatedLogsFiltered) - } - if ('host' in criteria) { - maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.host, finalOptions, this.filterCallsByHost, maybeDuplicatedLogsFiltered) - } - if ('port' in criteria) { - maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.port, finalOptions, this.filterCallsByPort, maybeDuplicatedLogsFiltered) - } - if ('origin' in criteria) { - maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.origin, finalOptions, this.filterCallsByOrigin, maybeDuplicatedLogsFiltered) - } - if ('path' in criteria) { - maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.path, finalOptions, this.filterCallsByPath, maybeDuplicatedLogsFiltered) - } - if ('hash' in criteria) { - maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.hash, finalOptions, this.filterCallsByHash, maybeDuplicatedLogsFiltered) - } - if ('fullUrl' in criteria) { - maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.fullUrl, finalOptions, this.filterCallsByFullUrl, maybeDuplicatedLogsFiltered) - } - if ('method' in criteria) { - maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.method, finalOptions, this.filterCallsByMethod, maybeDuplicatedLogsFiltered) - } - - const uniqLogsFiltered = [...new Set(maybeDuplicatedLogsFiltered)] - - return uniqLogsFiltered - } - - throw new InvalidArgumentError('criteria parameter should be one of function, regexp, or object') + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + var result = "", i2, line; + var lineNoLength = Math.min(mark.line + options2.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options2.maxLength - (options2.indent + lineNoLength + 3); + for (i2 = 1; i2 <= options2.linesBefore; i2++) { + if (foundLineNo - i2 < 0) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo - i2], + lineEnds[foundLineNo - i2], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i2]), + maxLineLength + ); + result = common.repeat(" ", options2.indent) + padStart((mark.line - i2 + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result; } - - filterCallsByProtocol = makeFilterCalls.call(this, 'protocol') - - filterCallsByHost = makeFilterCalls.call(this, 'host') - - filterCallsByPort = makeFilterCalls.call(this, 'port') - - filterCallsByOrigin = makeFilterCalls.call(this, 'origin') - - filterCallsByPath = makeFilterCalls.call(this, 'path') - - filterCallsByHash = makeFilterCalls.call(this, 'hash') - - filterCallsByFullUrl = makeFilterCalls.call(this, 'fullUrl') - - filterCallsByMethod = makeFilterCalls.call(this, 'method') - - clear () { - this.logs = [] + line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(" ", options2.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n"; + result += common.repeat("-", options2.indent + lineNoLength + 3 + line.pos) + "^\n"; + for (i2 = 1; i2 <= options2.linesAfter; i2++) { + if (foundLineNo + i2 >= lineEnds.length) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo + i2], + lineEnds[foundLineNo + i2], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i2]), + maxLineLength + ); + result += common.repeat(" ", options2.indent) + padStart((mark.line + i2 + 1).toString(), lineNoLength) + " | " + line.str + "\n"; } - - [kMockCallHistoryAddLog] (requestInit) { - const log = new MockCallHistoryLog(requestInit) - - this.logs.push(log) - - return log + return result.replace(/\n$/, ""); +} +function compileStyleAliases(map2) { + var result = {}; + if (map2 !== null) { + Object.keys(map2).forEach(function(style) { + map2[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); } - - * [Symbol.iterator] () { - for (const log of this.calls()) { - yield log + return result; +} +function Type$1(tag, options2) { + options2 = options2 || {}; + Object.keys(options2).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); } + }); + this.options = options2; + this.tag = tag; + this.kind = options2["kind"] || null; + this.resolve = options2["resolve"] || function() { + return true; + }; + this.construct = options2["construct"] || function(data) { + return data; + }; + this.instanceOf = options2["instanceOf"] || null; + this.predicate = options2["predicate"] || null; + this.represent = options2["represent"] || null; + this.representName = options2["representName"] || null; + this.defaultStyle = options2["defaultStyle"] || null; + this.multi = options2["multi"] || false; + this.styleAliases = compileStyleAliases(options2["styleAliases"] || null); + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); } } - -module.exports.MockCallHistory = MockCallHistory -module.exports.MockCallHistoryLog = MockCallHistoryLog - - -/***/ }), - -/***/ 58687: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { promisify } = __nccwpck_require__(47261) -const Client = __nccwpck_require__(8176) -const { buildMockDispatch } = __nccwpck_require__(79323) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected, - kIgnoreTrailingSlash -} = __nccwpck_require__(24347) -const { MockInterceptor } = __nccwpck_require__(90410) -const Symbols = __nccwpck_require__(72785) -const { InvalidArgumentError } = __nccwpck_require__(48045) - -/** - * MockClient provides an API that extends the Client to influence the mockDispatches. - */ -class MockClient extends Client { - constructor (origin, opts) { - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') +function compileList(schema2, name) { + var result = []; + schema2[name].forEach(function(currentType) { + var 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() { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length; + function collectType(type2) { + if (type2.multi) { + result.multi[type2.kind].push(type2); + result.multi["fallback"].push(type2); + } else { + result[type2.kind][type2.tag] = result["fallback"][type2.tag] = type2; } - - super(origin, opts) - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false - 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] + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor( - opts && { ignoreTrailingSlash: this[kIgnoreTrailingSlash], ...opts }, - this[kDispatches] - ) + return result; +} +function Schema$1(definition) { + return this.extend(definition); +} +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; +} +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]"; +} +function isHexCode(c2) { + return 48 <= c2 && c2 <= 57 || 65 <= c2 && c2 <= 70 || 97 <= c2 && c2 <= 102; +} +function isOctCode(c2) { + return 48 <= c2 && c2 <= 55; +} +function isDecCode(c2) { + return 48 <= c2 && c2 <= 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]; } - - cleanMocks () { - this[kDispatches] = [] + 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 !== "_"; + } + if (ch === "o") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) + if (ch === "_") return false; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; } + if (!hasDigits || ch === "_") return false; + return true; } - -module.exports = MockClient - - -/***/ }), - -/***/ 50888: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { UndiciError } = __nccwpck_require__(48045) - -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) - this.name = 'MockNotMatchedError' - this.message = message || 'The request does not match any registered mock dispatches' - this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED' +function constructYamlInteger(data) { + var value = data, sign = 1, ch; + if (value.indexOf("_") !== -1) { + value = value.replace(/_/g, ""); } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kMockNotMatchedError] === true + ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") sign = -1; + value = value.slice(1); + ch = value[0]; } - - get [kMockNotMatchedError] () { - return true + 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); } - -module.exports = { - MockNotMatchedError +function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); } - - -/***/ }), - -/***/ 90410: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { getResponseData, buildKey, addMockDispatch } = __nccwpck_require__(79323) -const { - kDispatches, - kDispatchKey, - kDefaultHeaders, - kDefaultTrailers, - kContentLength, - kMockDispatch, - kIgnoreTrailingSlash -} = __nccwpck_require__(24347) -const { InvalidArgumentError } = __nccwpck_require__(48045) -const { serializePathWithQuery } = __nccwpck_require__(83983) - -/** - * 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 +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; } - -/** - * 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 = serializePathWithQuery(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[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false - this[kDefaultHeaders] = {} - this[kDefaultTrailers] = {} - this[kContentLength] = false +function constructYamlFloat(data) { + var value, sign; + value = data.replace(/_/g, "").toLowerCase(); + sign = value[0] === "-" ? -1 : 1; + if ("+-".indexOf(value[0]) >= 0) { + value = value.slice(1); } - - 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 } + if (value === ".inf") { + return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + } else if (value === ".nan") { + return NaN; } - - 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') + return sign * parseFloat(value, 10); +} +function representYamlFloat(object, style) { + var res; + if (isNaN(object)) { + switch (style) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; } - } - - /** - * 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, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }) - return new MockScope(newMockDispatch) + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; } - - // 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] + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; } - this.validateReplyParameters(replyParameters) - - // Send in-already provided data like usual - const dispatchData = this.createMockScopeDispatchData(replyParameters) - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }) - return new MockScope(newMockDispatch) + } else if (common.isNegativeZero(object)) { + return "-0.0"; } - - /** - * 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 }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }) - return new MockScope(newMockDispatch) + 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)); +} +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 match2, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match2 = YAML_DATE_REGEXP.exec(data); + if (match2 === null) match2 = YAML_TIMESTAMP_REGEXP.exec(data); + if (match2 === null) throw new Error("Date resolve error"); + year = +match2[1]; + month = +match2[2] - 1; + day = +match2[3]; + if (!match2[4]) { + return new Date(Date.UTC(year, month, day)); } - - /** - * Set default reply headers on the interceptor for subsequent replies - */ - defaultReplyHeaders (headers) { - if (typeof headers === 'undefined') { - throw new InvalidArgumentError('headers must be defined') + hour = +match2[4]; + minute = +match2[5]; + second = +match2[6]; + if (match2[7]) { + fraction = match2[7].slice(0, 3); + while (fraction.length < 3) { + fraction += "0"; } - - this[kDefaultHeaders] = headers - return this + fraction = +fraction; } - - /** - * 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 + if (match2[9]) { + tz_hour = +match2[10]; + tz_minute = +(match2[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 6e4; + if (match2[9] === "-") delta = -delta; } - - /** - * Set reply content length header for replies on the interceptor - */ - replyContentLength () { - this[kContentLength] = true - return this + 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(); +} +function resolveYamlMerge(data) { + return data === "<<" || data === null; +} +function resolveYamlBinary(data) { + if (data === null) return false; + var code, idx, bitlen = 0, max = data.length, map2 = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + code = map2.indexOf(data.charAt(idx)); + if (code > 64) continue; + if (code < 0) return false; + bitlen += 6; } + return bitlen % 8 === 0; } - -module.exports.MockInterceptor = MockInterceptor -module.exports.MockScope = MockScope - - -/***/ }), - -/***/ 26193: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { promisify } = __nccwpck_require__(47261) -const Pool = __nccwpck_require__(20177) -const { buildMockDispatch } = __nccwpck_require__(79323) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected, - kIgnoreTrailingSlash -} = __nccwpck_require__(24347) -const { MockInterceptor } = __nccwpck_require__(90410) -const Symbols = __nccwpck_require__(72785) -const { InvalidArgumentError } = __nccwpck_require__(48045) - -/** - * MockPool provides an API that extends the Pool to influence the mockDispatches. - */ -class MockPool extends Pool { - constructor (origin, opts) { - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') +function constructYamlBinary(data) { + var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map2 = 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); } - - super(origin, opts) - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false - 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 && { ignoreTrailingSlash: this[kIgnoreTrailingSlash], ...opts }, - this[kDispatches] - ) - } - - cleanMocks () { - this[kDispatches] = [] + bits = bits << 6 | map2.indexOf(input.charAt(idx)); } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) + 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); } - -module.exports = MockPool - - -/***/ }), - -/***/ 24347: -/***/ ((module) => { - -"use strict"; - - -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'), - kOriginalDispatch: Symbol('original dispatch'), - kOrigin: Symbol('origin'), - kIsMockActive: Symbol('is mock active'), - kNetConnect: Symbol('net connect'), - kGetNetConnect: Symbol('get net connect'), - kConnected: Symbol('connected'), - kIgnoreTrailingSlash: Symbol('ignore trailing slash'), - kMockAgentMockCallHistoryInstance: Symbol('mock agent mock call history name'), - kMockAgentRegisterCallHistory: Symbol('mock agent register mock call history'), - kMockAgentAddCallHistoryLog: Symbol('mock agent add call history log'), - kMockAgentIsCallHistoryEnabled: Symbol('mock agent is call history enabled'), - kMockAgentAcceptsNonStandardSearchParameters: Symbol('mock agent accepts non standard search parameters'), - kMockCallHistoryAddLog: Symbol('mock call history add log'), - kTotalDispatchCount: Symbol('total dispatch count') -} - - -/***/ }), - -/***/ 79323: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { MockNotMatchedError } = __nccwpck_require__(50888) -const { - kDispatches, - kMockAgent, - kOriginalDispatch, - kOrigin, - kGetNetConnect, - kTotalDispatchCount -} = __nccwpck_require__(24347) -const { serializePathWithQuery } = __nccwpck_require__(83983) -const { STATUS_CODES } = __nccwpck_require__(88849) -const { - types: { - isPromise - } -} = __nccwpck_require__(47261) -const { InvalidArgumentError } = __nccwpck_require__(48045) - -function matchValue (match, value) { - if (typeof match === 'string') { - return match === value - } - if (match instanceof RegExp) { - return match.test(value) +function representYamlBinary(object) { + var result = "", bits = 0, idx, tail, max = object.length, map2 = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } + bits = (bits << 8) + object[idx]; } - if (typeof match === 'function') { - return match(value) === true + tail = max % 3; + if (tail === 0) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } else if (tail === 2) { + result += map2[bits >> 10 & 63]; + result += map2[bits >> 4 & 63]; + result += map2[bits << 2 & 63]; + result += map2[64]; + } else if (tail === 1) { + result += map2[bits >> 2 & 63]; + result += map2[bits << 4 & 63]; + result += map2[64]; + result += map2[64]; } - return false + return result; } - -function lowerCaseEntries (headers) { - return Object.fromEntries( - Object.entries(headers).map(([headerName, headerValue]) => { - return [headerName.toLocaleLowerCase(), headerValue] - }) - ) +function isBinary(obj) { + return Object.prototype.toString.call(obj) === "[object Uint8Array]"; } - -/** - * @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] +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$2.call(pair) !== "[object Object]") return false; + for (pairKey in pair) { + if (_hasOwnProperty$3.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; } } - - return undefined - } else if (typeof headers.get === 'function') { - return headers.get(key) - } else { - return lowerCaseEntries(headers)[key.toLocaleLowerCase()] + if (!pairHasKey) return false; + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; } + return true; } - -/** @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 constructYamlOmap(data) { + return data !== null ? data : []; } - -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 +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$1.call(pair) !== "[object Object]") return false; + keys = Object.keys(pair); + if (keys.length !== 1) return false; + result[index] = [keys[0], pair[keys[0]]]; } - if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') { - return false + 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]]]; } - - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) { - const headerValue = getHeaderByName(headers, matchHeaderName) - - if (!matchValue(matchHeaderValue, headerValue)) { - return false + return result; +} +function resolveYamlSet(data) { + if (data === null) return true; + var key, object = data; + for (key in object) { + if (_hasOwnProperty$2.call(object, key)) { + if (object[key] !== null) return false; } } - return true + return true; } - -function normalizeSearchParams (query) { - if (typeof query !== 'string') { - return query +function constructYamlSet(data) { + return data !== null ? data : {}; +} +function _class(obj) { + return Object.prototype.toString.call(obj); +} +function is_EOL(c2) { + return c2 === 10 || c2 === 13; +} +function is_WHITE_SPACE(c2) { + return c2 === 9 || c2 === 32; +} +function is_WS_OR_EOL(c2) { + return c2 === 9 || c2 === 32 || c2 === 10 || c2 === 13; +} +function is_FLOW_INDICATOR(c2) { + return c2 === 44 || c2 === 91 || c2 === 93 || c2 === 123 || c2 === 125; +} +function fromHexCode(c2) { + var lc; + if (48 <= c2 && c2 <= 57) { + return c2 - 48; } - - const originalQp = new URLSearchParams(query) - const normalizedQp = new URLSearchParams() - - for (let [key, value] of originalQp.entries()) { - key = key.replace('[]', '') - - const valueRepresentsString = /^(['"]).*\1$/.test(value) - if (valueRepresentsString) { - normalizedQp.append(key, value) - continue - } - - if (value.includes(',')) { - const values = value.split(',') - for (const v of values) { - normalizedQp.append(key, v) - } - continue - } - - normalizedQp.append(key, value) + lc = c2 | 32; + if (97 <= lc && lc <= 102) { + return lc - 97 + 10; } - - return normalizedQp + return -1; } - -function safeUrl (path) { - if (typeof path !== 'string') { - return path +function escapedHexLen(c2) { + if (c2 === 120) { + return 2; } - const pathSegments = path.split('?', 3) - if (pathSegments.length !== 2) { - return path + if (c2 === 117) { + return 4; } - - 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 if (data) { - return data.toString() - } else { - return '' + if (c2 === 85) { + return 8; } + return 0; } - -function getMockDispatch (mockDispatches, key) { - const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path - const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath - - const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath) - - // Match path - let matchedMockDispatches = mockDispatches - .filter(({ consumed }) => !consumed) - .filter(({ path, ignoreTrailingSlash }) => { - return ignoreTrailingSlash - ? matchValue(removeTrailingSlash(safeUrl(path)), resolvedPathWithoutTrailingSlash) - : matchValue(safeUrl(path), resolvedPath) - }) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`) +function fromDecimalCode(c2) { + if (48 <= c2 && c2 <= 57) { + return c2 - 48; } - - // 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}'`) + return -1; +} +function simpleEscapeSequence(c2) { + return c2 === 48 ? "\0" : c2 === 97 ? "\x07" : c2 === 98 ? "\b" : c2 === 116 ? " " : c2 === 9 ? " " : c2 === 110 ? "\n" : c2 === 118 ? "\v" : c2 === 102 ? "\f" : c2 === 114 ? "\r" : c2 === 101 ? "\x1B" : c2 === 32 ? " " : c2 === 34 ? '"' : c2 === 47 ? "/" : c2 === 92 ? "\\" : c2 === 78 ? "\x85" : c2 === 95 ? "\xA0" : c2 === 76 ? "\u2028" : c2 === 80 ? "\u2029" : ""; +} +function charFromCodepoint(c2) { + if (c2 <= 65535) { + return String.fromCharCode(c2); } - - // 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}'`) + return String.fromCharCode( + (c2 - 65536 >> 10) + 55296, + (c2 - 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; } - - // 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}'`) +} +function State$1(input, options2) { + this.input = input; + this.filename = options2["filename"] || null; + this.schema = options2["schema"] || _default; + this.onWarning = options2["onWarning"] || null; + this.legacy = options2["legacy"] || false; + this.json = options2["json"] || false; + this.listener = options2["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.firstTabInLine = -1; + this.documents = []; +} +function generateError(state, message) { + var 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 = snippet(mark); + return new exception(message, mark); +} +function throwError(state, message) { + throw generateError(state, message); +} +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); } - - return matchedMockDispatches[0] } - -function addMockDispatch (mockDispatches, key, data, opts) { - const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false, ...opts } - const replyData = typeof data === 'function' ? { callback: data } : { ...data } - const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } } - mockDispatches.push(newMockDispatch) - // Track total number of intercepts ever registered for better error messages - mockDispatches[kTotalDispatchCount] = (mockDispatches[kTotalDispatchCount] || 0) + 1 - return newMockDispatch +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 deleteMockDispatch (mockDispatches, key) { - const index = mockDispatches.findIndex(dispatch => { - if (!dispatch.consumed) { - return false +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$1.call(destination, key)) { + setProperty(destination, key, source[key]); + overridableKeys[key] = true; } - return matchKey(dispatch, key) - }) - if (index !== -1) { - mockDispatches.splice(index, 1) } } - -/** - * @param {string} path Path to remove trailing slash from - */ -function removeTrailingSlash (path) { - while (path.endsWith('/')) { - path = path.slice(0, -1) +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, 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 (path.length === 0) { - path = '/' + if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") { + keyNode = "[object Object]"; } - - return path -} - -function buildKey (opts) { - const { path, method, body, headers, query } = opts - - return { - path, - method, - body, - headers, - query + keyNode = String(keyNode); + if (_result === null) { + _result = {}; } -} - -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]}`)) + 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 { - result.push(name, Buffer.from(`${value}`)) + mergeMappings(state, _result, valueNode, overridableKeys); } + } else { + if (!state.json && !_hasOwnProperty$1.call(overridableKeys, keyNode) && _hasOwnProperty$1.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 -} - -/** - * @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') + return _result; } - -/** - * 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 - } - - // Track whether the request has been aborted - let aborted = false - let timer = null - - function abort (err) { - if (aborted) { - return - } - aborted = true - - // Clear the pending delayed response if any - if (timer !== null) { - clearTimeout(timer) - timer = null +function readLineBreak(state) { + var ch; + 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++; } - - // Notify the handler of the abort - handler.onError(err) - } - - // Call onConnect to allow the handler to register the abort callback - handler.onConnect?.(abort, null) - - // Handle the request with a delay if necessary - if (typeof delay === 'number' && delay > 0) { - timer = setTimeout(() => { - timer = null - handleReply(this[kDispatches]) - }, delay) } else { - handleReply(this[kDispatches]) + throwError(state, "a line break is expected"); } - - function handleReply (mockDispatches, _data = data) { - // Don't send response if the request was aborted - if (aborted) { - return - } - - // 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. - return body.then((newData) => handleReply(mockDispatches, newData)) + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; +} +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + if (ch === 9 && state.firstTabInLine === -1) { + state.firstTabInLine = state.position; + } + ch = state.input.charCodeAt(++state.position); } - - // Check again if aborted after async body resolution - if (aborted) { - return + if (allowComments && ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 10 && ch !== 13 && ch !== 0); } - - const responseData = getResponseData(body) - const responseHeaders = generateKeyValues(headers) - const responseTrailers = generateKeyValues(trailers) - - 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.code === 'UND_MOCK_ERR_MOCK_NOT_MATCHED') { - const netConnect = agent[kGetNetConnect]() - const totalInterceptsCount = this[kDispatches][kTotalDispatchCount] || this[kDispatches].length - const pendingInterceptsCount = this[kDispatches].filter(({ consumed }) => !consumed).length - const interceptsMessage = `, ${pendingInterceptsCount} interceptor(s) remaining out of ${totalInterceptsCount} defined` - if (netConnect === false) { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)${interceptsMessage}`) - } - 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)${interceptsMessage}`) - } - } else { - throw error - } + 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 { - originalDispatch.call(this, opts, handler) + break; } } -} - -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 + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, "deficient indentation"); } - return false + return lineBreaks; } - -function normalizeOrigin (origin) { - if (typeof origin !== 'string' && !(origin instanceof URL)) { - return origin - } - - if (origin instanceof URL) { - return origin.origin +function testDocumentSeparator(state) { + var _position = state.position, ch; + 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 origin.toLowerCase() + return false; } - -function buildAndValidateMockOptions (opts) { - const { agent, ...mockOptions } = opts - - if ('enableCallHistory' in mockOptions && typeof mockOptions.enableCallHistory !== 'boolean') { - throw new InvalidArgumentError('options.enableCallHistory must to be a boolean') - } - - if ('acceptNonStandardSearchParameters' in mockOptions && typeof mockOptions.acceptNonStandardSearchParameters !== 'boolean') { - throw new InvalidArgumentError('options.acceptNonStandardSearchParameters must to be a boolean') - } - - if ('ignoreTrailingSlash' in mockOptions && typeof mockOptions.ignoreTrailingSlash !== 'boolean') { - throw new InvalidArgumentError('options.ignoreTrailingSlash must to be a boolean') +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += " "; + } else if (count > 1) { + state.result += common.repeat("\n", count - 1); } - - return mockOptions -} - -module.exports = { - getResponseData, - getMockDispatch, - addMockDispatch, - deleteMockDispatch, - buildKey, - generateKeyValues, - matchValue, - getResponse, - getStatusText, - mockDispatch, - buildMockDispatch, - checkNetConnect, - buildAndValidateMockOptions, - getHeaderByName, - buildHeadersFromArray, - normalizeSearchParams, - normalizeOrigin } - - -/***/ }), - -/***/ 86823: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { Transform } = __nccwpck_require__(84492) -const { Console } = __nccwpck_require__(40027) - -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() +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 === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { + return false; } -} - - -/***/ }), - -/***/ 26776: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Agent = __nccwpck_require__(71208) -const MockAgent = __nccwpck_require__(66771) -const { SnapshotRecorder } = __nccwpck_require__(31010) -const WrapHandler = __nccwpck_require__(81330) -const { InvalidArgumentError, UndiciError } = __nccwpck_require__(48045) -const { validateSnapshotMode } = __nccwpck_require__(37397) - -const kSnapshotRecorder = Symbol('kSnapshotRecorder') -const kSnapshotMode = Symbol('kSnapshotMode') -const kSnapshotPath = Symbol('kSnapshotPath') -const kSnapshotLoaded = Symbol('kSnapshotLoaded') -const kRealAgent = Symbol('kRealAgent') - -// Static flag to ensure warning is only emitted once per process -let warningEmitted = false - -class SnapshotAgent extends MockAgent { - constructor (opts = {}) { - // Emit experimental warning only once - if (!warningEmitted) { - process.emitWarning( - 'SnapshotAgent is experimental and subject to change', - 'ExperimentalWarning' - ) - warningEmitted = true - } - - const { - mode = 'record', - snapshotPath = null, - ...mockAgentOpts - } = opts - - super(mockAgentOpts) - - validateSnapshotMode(mode) - - // Validate snapshotPath is provided when required - if ((mode === 'playback' || mode === 'update') && !snapshotPath) { - throw new InvalidArgumentError(`snapshotPath is required when mode is '${mode}'`) - } - - this[kSnapshotMode] = mode - this[kSnapshotPath] = snapshotPath - - this[kSnapshotRecorder] = new SnapshotRecorder({ - snapshotPath: this[kSnapshotPath], - mode: this[kSnapshotMode], - maxSnapshots: opts.maxSnapshots, - autoFlush: opts.autoFlush, - flushInterval: opts.flushInterval, - matchHeaders: opts.matchHeaders, - ignoreHeaders: opts.ignoreHeaders, - excludeHeaders: opts.excludeHeaders, - matchBody: opts.matchBody, - matchQuery: opts.matchQuery, - caseSensitive: opts.caseSensitive, - shouldRecord: opts.shouldRecord, - shouldPlayback: opts.shouldPlayback, - excludeUrls: opts.excludeUrls - }) - this[kSnapshotLoaded] = false - - // For recording/update mode, we need a real agent to make actual requests - // For playback mode, we need a real agent if there are excluded URLs - if (this[kSnapshotMode] === 'record' || this[kSnapshotMode] === 'update' || - (this[kSnapshotMode] === 'playback' && opts.excludeUrls && opts.excludeUrls.length > 0)) { - this[kRealAgent] = new Agent(opts) - } - - // Auto-load snapshots in playback/update mode - if ((this[kSnapshotMode] === 'playback' || this[kSnapshotMode] === 'update') && this[kSnapshotPath]) { - this.loadSnapshots().catch(() => { - // Ignore load errors - file might not exist yet - }) + 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; } } - - dispatch (opts, handler) { - handler = WrapHandler.wrap(handler) - const mode = this[kSnapshotMode] - - // Check if URL should be excluded (pass through without mocking/recording) - if (this[kSnapshotRecorder].isUrlExcluded(opts)) { - // Real agent is guaranteed by constructor when excludeUrls is configured - return this[kRealAgent].dispatch(opts, handler) - } - - if (mode === 'playback' || mode === 'update') { - // Ensure snapshots are loaded - if (!this[kSnapshotLoaded]) { - // Need to load asynchronously, delegate to async version - return this.#asyncDispatch(opts, handler) + 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; } - - // Try to find existing snapshot (synchronous) - const snapshot = this[kSnapshotRecorder].findSnapshot(opts) - - if (snapshot) { - // Use recorded response (synchronous) - return this.#replaySnapshot(snapshot, handler) - } else if (mode === 'update') { - // Make real request and record it (async required) - return this.#recordAndReplay(opts, handler) + } 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 { - // Playback mode but no snapshot found - const error = new UndiciError(`No snapshot found for ${opts.method || 'GET'} ${opts.path}`) - if (handler.onError) { - handler.onError(error) - return - } - throw error + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; } - } else if (mode === 'record') { - // Record mode - make real request and save response (async required) - return this.#recordAndReplay(opts, handler) } - } - - /** - * Async version of dispatch for when we need to load snapshots first - */ - async #asyncDispatch (opts, handler) { - await this.loadSnapshots() - return this.dispatch(opts, handler) - } - - /** - * Records a real request and replays the response - */ - #recordAndReplay (opts, handler) { - const responseData = { - statusCode: null, - headers: {}, - trailers: {}, - body: [] + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; } - - const self = this // Capture 'this' context for use within nested handler callbacks - - const recordingHandler = { - onRequestStart (controller, context) { - return handler.onRequestStart(controller, { ...context, history: this.history }) - }, - - onRequestUpgrade (controller, statusCode, headers, socket) { - return handler.onRequestUpgrade(controller, statusCode, headers, socket) - }, - - onResponseStart (controller, statusCode, headers, statusMessage) { - responseData.statusCode = statusCode - responseData.headers = headers - return handler.onResponseStart(controller, statusCode, headers, statusMessage) - }, - - onResponseData (controller, chunk) { - responseData.body.push(chunk) - return handler.onResponseData(controller, chunk) - }, - - onResponseEnd (controller, trailers) { - responseData.trailers = trailers - - // Record the interaction using captured 'self' context (fire and forget) - const responseBody = Buffer.concat(responseData.body) - self[kSnapshotRecorder].record(opts, { - statusCode: responseData.statusCode, - headers: responseData.headers, - body: responseBody, - trailers: responseData.trailers - }) - .then(() => handler.onResponseEnd(controller, trailers)) - .catch((error) => handler.onResponseError(controller, error)) - } + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; } - - // Use composed agent if available (includes interceptors), otherwise use real agent - const agent = this[kRealAgent] - return agent.dispatch(opts, recordingHandler) + ch = state.input.charCodeAt(++state.position); } - - /** - * Replays a recorded response - * - * @param {Object} snapshot - The recorded snapshot to replay. - * @param {Object} handler - The handler to call with the response data. - * @returns {void} - */ - #replaySnapshot (snapshot, handler) { - try { - const { response } = snapshot - - const controller = { - pause () { }, - resume () { }, - abort (reason) { - this.aborted = true - this.reason = reason - }, - - aborted: false, - paused: false - } - - handler.onRequestStart(controller) - - handler.onResponseStart(controller, response.statusCode, response.headers) - - // Body is always stored as base64 string - const body = Buffer.from(response.body, 'base64') - handler.onResponseData(controller, body) - - handler.onResponseEnd(controller, response.trailers) - } catch (error) { - handler.onError?.(error) - } - } - - /** - * Loads snapshots from file - * - * @param {string} [filePath] - Optional file path to load snapshots from. - * @returns {Promise} - Resolves when snapshots are loaded. - */ - async loadSnapshots (filePath) { - await this[kSnapshotRecorder].loadSnapshots(filePath || this[kSnapshotPath]) - this[kSnapshotLoaded] = true - - // In playback mode, set up MockAgent interceptors for all snapshots - if (this[kSnapshotMode] === 'playback') { - this.#setupMockInterceptors() - } - } - - /** - * Saves snapshots to file - * - * @param {string} [filePath] - Optional file path to save snapshots to. - * @returns {Promise} - Resolves when snapshots are saved. - */ - async saveSnapshots (filePath) { - return this[kSnapshotRecorder].saveSnapshots(filePath || this[kSnapshotPath]) - } - - /** - * Sets up MockAgent interceptors based on recorded snapshots. - * - * This method creates MockAgent interceptors for each recorded snapshot, - * allowing the SnapshotAgent to fall back to MockAgent's standard intercept - * mechanism in playback mode. Each interceptor is configured to persist - * (remain active for multiple requests) and responds with the recorded - * response data. - * - * Called automatically when loading snapshots in playback mode. - * - * @returns {void} - */ - #setupMockInterceptors () { - for (const snapshot of this[kSnapshotRecorder].getSnapshots()) { - const { request, responses, response } = snapshot - const url = new URL(request.url) - - const mockPool = this.get(url.origin) - - // Handle both new format (responses array) and legacy format (response object) - const responseData = responses ? responses[0] : response - if (!responseData) continue - - mockPool.intercept({ - path: url.pathname + url.search, - method: request.method, - headers: request.headers, - body: request.body - }).reply(responseData.statusCode, responseData.body, { - headers: responseData.headers, - trailers: responseData.trailers - }).persist() - } - } - - /** - * Gets the snapshot recorder - * @return {SnapshotRecorder} - The snapshot recorder instance - */ - getRecorder () { - return this[kSnapshotRecorder] - } - - /** - * Gets the current mode - * @return {import('./snapshot-utils').SnapshotMode} - The current snapshot mode - */ - getMode () { - return this[kSnapshotMode] - } - - /** - * Clears all snapshots - * @returns {void} - */ - clearSnapshots () { - this[kSnapshotRecorder].clear() - } - - /** - * Resets call counts for all snapshots (useful for test cleanup) - * @returns {void} - */ - resetCallCounts () { - this[kSnapshotRecorder].resetCallCounts() - } - - /** - * Deletes a specific snapshot by request options - * @param {import('./snapshot-recorder').SnapshotRequestOptions} requestOpts - Request options to identify the snapshot - * @return {Promise} - Returns true if the snapshot was deleted, false if not found - */ - deleteSnapshot (requestOpts) { - return this[kSnapshotRecorder].deleteSnapshot(requestOpts) - } - - /** - * Gets information about a specific snapshot - * @returns {import('./snapshot-recorder').SnapshotInfo|null} - Snapshot information or null if not found - */ - getSnapshotInfo (requestOpts) { - return this[kSnapshotRecorder].getSnapshotInfo(requestOpts) - } - - /** - * Replaces all snapshots with new data (full replacement) - * @param {Array<{hash: string; snapshot: import('./snapshot-recorder').SnapshotEntryshotEntry}>|Record} snapshotData - New snapshot data to replace existing snapshots - * @returns {void} - */ - replaceSnapshots (snapshotData) { - this[kSnapshotRecorder].replaceSnapshots(snapshotData) - } - - /** - * Closes the agent, saving snapshots and cleaning up resources. - * - * @returns {Promise} - */ - async close () { - await this[kSnapshotRecorder].close() - await this[kRealAgent]?.close() - await super.close() + captureSegment(state, captureStart, captureEnd, false); + if (state.result) { + return true; } + state.kind = _kind; + state.result = _result; + return false; } - -module.exports = SnapshotAgent - - -/***/ }), - -/***/ 31010: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { writeFile, readFile, mkdir } = __nccwpck_require__(93977) -const { dirname, resolve } = __nccwpck_require__(49411) -const { setTimeout, clearTimeout } = __nccwpck_require__(92332) -const { InvalidArgumentError, UndiciError } = __nccwpck_require__(48045) -const { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = __nccwpck_require__(37397) - -/** - * @typedef {Object} SnapshotRequestOptions - * @property {string} method - HTTP method (e.g. 'GET', 'POST', etc.) - * @property {string} path - Request path - * @property {string} origin - Request origin (base URL) - * @property {import('./snapshot-utils').Headers|import('./snapshot-utils').UndiciHeaders} headers - Request headers - * @property {import('./snapshot-utils').NormalizedHeaders} _normalizedHeaders - Request headers as a lowercase object - * @property {string|Buffer} [body] - Request body (optional) - */ - -/** - * @typedef {Object} SnapshotEntryRequest - * @property {string} method - HTTP method (e.g. 'GET', 'POST', etc.) - * @property {string} url - Full URL of the request - * @property {import('./snapshot-utils').NormalizedHeaders} headers - Normalized headers as a lowercase object - * @property {string|Buffer} [body] - Request body (optional) - */ - -/** - * @typedef {Object} SnapshotEntryResponse - * @property {number} statusCode - HTTP status code of the response - * @property {import('./snapshot-utils').NormalizedHeaders} headers - Normalized response headers as a lowercase object - * @property {string} body - Response body as a base64url encoded string - * @property {Object} [trailers] - Optional response trailers - */ - -/** - * @typedef {Object} SnapshotEntry - * @property {SnapshotEntryRequest} request - The request object - * @property {Array} responses - Array of response objects - * @property {number} callCount - Number of times this snapshot has been called - * @property {string} timestamp - ISO timestamp of when the snapshot was created - */ - -/** - * @typedef {Object} SnapshotRecorderMatchOptions - * @property {Array} [matchHeaders=[]] - Headers to match (empty array means match all headers) - * @property {Array} [ignoreHeaders=[]] - Headers to ignore for matching - * @property {Array} [excludeHeaders=[]] - Headers to exclude from matching - * @property {boolean} [matchBody=true] - Whether to match request body - * @property {boolean} [matchQuery=true] - Whether to match query properties - * @property {boolean} [caseSensitive=false] - Whether header matching is case-sensitive - */ - -/** - * @typedef {Object} SnapshotRecorderOptions - * @property {string} [snapshotPath] - Path to save/load snapshots - * @property {import('./snapshot-utils').SnapshotMode} [mode='record'] - Mode: 'record' or 'playback' - * @property {number} [maxSnapshots=Infinity] - Maximum number of snapshots to keep - * @property {boolean} [autoFlush=false] - Whether to automatically flush snapshots to disk - * @property {number} [flushInterval=30000] - Auto-flush interval in milliseconds (default: 30 seconds) - * @property {Array} [excludeUrls=[]] - URLs to exclude from recording - * @property {function} [shouldRecord=null] - Function to filter requests for recording - * @property {function} [shouldPlayback=null] - Function to filter requests - */ - -/** - * @typedef {Object} SnapshotFormattedRequest - * @property {string} method - HTTP method (e.g. 'GET', 'POST', etc.) - * @property {string} url - Full URL of the request (with query parameters if matchQuery is true) - * @property {import('./snapshot-utils').NormalizedHeaders} headers - Normalized headers as a lowercase object - * @property {string} body - Request body (optional, only if matchBody is true) - */ - -/** - * @typedef {Object} SnapshotInfo - * @property {string} hash - Hash key for the snapshot - * @property {SnapshotEntryRequest} request - The request object - * @property {number} responseCount - Number of responses recorded for this request - * @property {number} callCount - Number of times this snapshot has been called - * @property {string} timestamp - ISO timestamp of when the snapshot was created - */ - -/** - * Formats a request for consistent snapshot storage - * Caches normalized headers to avoid repeated processing - * - * @param {SnapshotRequestOptions} opts - Request options - * @param {import('./snapshot-utils').HeaderFilters} headerFilters - Cached header sets for performance - * @param {SnapshotRecorderMatchOptions} [matchOptions] - Matching options for headers and body - * @returns {SnapshotFormattedRequest} - Formatted request object - */ -function formatRequestKey (opts, headerFilters, matchOptions = {}) { - const url = new URL(opts.path, opts.origin) - - // Cache normalized headers if not already done - const normalized = opts._normalizedHeaders || normalizeHeaders(opts.headers) - if (!opts._normalizedHeaders) { - opts._normalizedHeaders = normalized - } - - return { - method: opts.method || 'GET', - url: matchOptions.matchQuery !== false ? url.toString() : `${url.origin}${url.pathname}`, - headers: filterHeadersForMatching(normalized, headerFilters, matchOptions), - body: matchOptions.matchBody !== false && opts.body ? String(opts.body) : '' +function readSingleQuotedScalar(state, nodeIndent) { + var ch, captureStart, captureEnd; + ch = state.input.charCodeAt(state.position); + if (ch !== 39) { + return false; } -} - -/** - * Filters headers based on matching configuration - * - * @param {import('./snapshot-utils').Headers} headers - Headers to filter - * @param {import('./snapshot-utils').HeaderFilters} headerFilters - Cached sets for ignore, exclude, and match headers - * @param {SnapshotRecorderMatchOptions} [matchOptions] - Matching options for headers - */ -function filterHeadersForMatching (headers, headerFilters, matchOptions = {}) { - if (!headers || typeof headers !== 'object') return {} - - const { - caseSensitive = false - } = matchOptions - - const filtered = {} - const { ignore, exclude, match } = headerFilters - - for (const [key, value] of Object.entries(headers)) { - const headerKey = caseSensitive ? key : key.toLowerCase() - - // Skip if in exclude list (for security) - if (exclude.has(headerKey)) continue - - // Skip if in ignore list (for matching) - if (ignore.has(headerKey)) continue - - // If matchHeaders is specified, only include those headers - if (match.size !== 0) { - if (!match.has(headerKey)) continue + 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; } - - filtered[headerKey] = value } - - return filtered + throwError(state, "unexpected end of the stream within a single quoted scalar"); } - -/** - * Filters headers for storage (only excludes sensitive headers) - * - * @param {import('./snapshot-utils').Headers} headers - Headers to filter - * @param {import('./snapshot-utils').HeaderFilters} headerFilters - Cached sets for ignore, exclude, and match headers - * @param {SnapshotRecorderMatchOptions} [matchOptions] - Matching options for headers - */ -function filterHeadersForStorage (headers, headerFilters, matchOptions = {}) { - if (!headers || typeof headers !== 'object') return {} - - const { - caseSensitive = false - } = matchOptions - - const filtered = {} - const { exclude: excludeSet } = headerFilters - - for (const [key, value] of Object.entries(headers)) { - const headerKey = caseSensitive ? key : key.toLowerCase() - - // Skip if in exclude list (for security) - if (excludeSet.has(headerKey)) continue - - filtered[headerKey] = value +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, captureEnd, hexLength, hexResult, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 34) { + return false; } - - return filtered -} - -/** - * Creates a hash key for request matching - * Properly orders headers to avoid conflicts and uses crypto hashing when available - * - * @param {SnapshotFormattedRequest} formattedRequest - Request object - * @returns {string} - Base64url encoded hash of the request - */ -function createRequestHash (formattedRequest) { - const parts = [ - formattedRequest.method, - formattedRequest.url - ] - - // Process headers in a deterministic way to avoid conflicts - if (formattedRequest.headers && typeof formattedRequest.headers === 'object') { - const headerKeys = Object.keys(formattedRequest.headers).sort() - for (const key of headerKeys) { - const values = Array.isArray(formattedRequest.headers[key]) - ? formattedRequest.headers[key] - : [formattedRequest.headers[key]] - - // Add header name - parts.push(key) - - // Add all values for this header, sorted for consistency - for (const value of values.sort()) { - parts.push(String(value)) + 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; } } - - // Add body - parts.push(formattedRequest.body) - - const content = parts.join('|') - - return hashId(content) + throwError(state, "unexpected end of the stream within a double quoted scalar"); } - -class SnapshotRecorder { - /** @type {NodeJS.Timeout | null} */ - #flushTimeout - - /** @type {import('./snapshot-utils').IsUrlExcluded} */ - #isUrlExcluded - - /** @type {Map} */ - #snapshots = new Map() - - /** @type {string|undefined} */ - #snapshotPath - - /** @type {number} */ - #maxSnapshots = Infinity - - /** @type {boolean} */ - #autoFlush = false - - /** @type {import('./snapshot-utils').HeaderFilters} */ - #headerFilters - - /** - * Creates a new SnapshotRecorder instance - * @param {SnapshotRecorderOptions&SnapshotRecorderMatchOptions} [options={}] - Configuration options for the recorder - */ - constructor (options = {}) { - this.#snapshotPath = options.snapshotPath - this.#maxSnapshots = options.maxSnapshots || Infinity - this.#autoFlush = options.autoFlush || false - this.flushInterval = options.flushInterval || 30000 // 30 seconds default - this._flushTimer = null - - // Matching configuration - /** @type {Required} */ - this.matchOptions = { - matchHeaders: options.matchHeaders || [], // empty means match all headers - ignoreHeaders: options.ignoreHeaders || [], - excludeHeaders: options.excludeHeaders || [], - matchBody: options.matchBody !== false, // default: true - matchQuery: options.matchQuery !== false, // default: true - caseSensitive: options.caseSensitive || false - } - - // Cache processed header sets to avoid recreating them on every request - this.#headerFilters = createHeaderFilters(this.matchOptions) - - // Request filtering callbacks - this.shouldRecord = options.shouldRecord || (() => true) // function(requestOpts) -> boolean - this.shouldPlayback = options.shouldPlayback || (() => true) // function(requestOpts) -> boolean - - // URL pattern filtering - this.#isUrlExcluded = isUrlExcludedFactory(options.excludeUrls) // Array of regex patterns or strings - - // Start auto-flush timer if enabled - if (this.#autoFlush && this.#snapshotPath) { - this.#startAutoFlush() - } +function readFlowCollection(state, nodeIndent) { + var readNext = true, _line, _lineStart, _pos, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch; + 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; } - - /** - * Records a request-response interaction - * @param {SnapshotRequestOptions} requestOpts - Request options - * @param {SnapshotEntryResponse} response - Response data to record - * @return {Promise} - Resolves when the recording is complete - */ - async record (requestOpts, response) { - // Check if recording should be filtered out - if (!this.shouldRecord(requestOpts)) { - return // Skip recording - } - - // Check URL exclusion patterns - if (this.isUrlExcluded(requestOpts)) { - return // Skip recording + 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"); + } else if (ch === 44) { + throwError(state, "expected the node content, but found ','"); } - - const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions) - const hash = createRequestHash(request) - - // Extract response data - always store body as base64 - const normalizedHeaders = normalizeHeaders(response.headers) - - /** @type {SnapshotEntryResponse} */ - const responseData = { - statusCode: response.statusCode, - headers: filterHeadersForStorage(normalizedHeaders, this.#headerFilters, this.matchOptions), - body: Buffer.isBuffer(response.body) - ? response.body.toString('base64') - : Buffer.from(String(response.body || '')).toString('base64'), - trailers: response.trailers + 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); + } } - - // Remove oldest snapshot if we exceed maxSnapshots limit - if (this.#snapshots.size >= this.#maxSnapshots && !this.#snapshots.has(hash)) { - const oldestKey = this.#snapshots.keys().next().value - this.#snapshots.delete(oldestKey) + _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; } - - // Support sequential responses - if snapshot exists, add to responses array - const existingSnapshot = this.#snapshots.get(hash) - if (existingSnapshot && existingSnapshot.responses) { - existingSnapshot.responses.push(responseData) - existingSnapshot.timestamp = new Date().toISOString() + 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 { - this.#snapshots.set(hash, { - request, - responses: [responseData], // Always store as array for consistency - callCount: 0, - timestamp: new Date().toISOString() - }) + _result.push(keyNode); } - - // Auto-flush if enabled - if (this.#autoFlush && this.#snapshotPath) { - this.#scheduleFlush() + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === 44) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; } } - - /** - * Checks if a URL should be excluded from recording/playback - * @param {SnapshotRequestOptions} requestOpts - Request options to check - * @returns {boolean} - True if URL is excluded - */ - isUrlExcluded (requestOpts) { - const url = new URL(requestOpts.path, requestOpts.origin).toString() - return this.#isUrlExcluded(url) - } - - /** - * Finds a matching snapshot for the given request - * Returns the appropriate response based on call count for sequential responses - * - * @param {SnapshotRequestOptions} requestOpts - Request options to match - * @returns {SnapshotEntry&Record<'response', SnapshotEntryResponse>|undefined} - Matching snapshot response or undefined if not found - */ - findSnapshot (requestOpts) { - // Check if playback should be filtered out - if (!this.shouldPlayback(requestOpts)) { - return undefined // Skip playback - } - - // Check URL exclusion patterns - if (this.isUrlExcluded(requestOpts)) { - return undefined // Skip playback - } - - const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions) - const hash = createRequestHash(request) - const snapshot = this.#snapshots.get(hash) - - if (!snapshot) return undefined - - // Handle sequential responses - const currentCallCount = snapshot.callCount || 0 - const responseIndex = Math.min(currentCallCount, snapshot.responses.length - 1) - snapshot.callCount = currentCallCount + 1 - - return { - ...snapshot, - response: snapshot.responses[responseIndex] - } + 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 === 124) { + folding = false; + } else if (ch === 62) { + folding = true; + } else { + return false; } - - /** - * Loads snapshots from file - * @param {string} [filePath] - Optional file path to load snapshots from - * @return {Promise} - Resolves when snapshots are loaded - */ - async loadSnapshots (filePath) { - const path = filePath || this.#snapshotPath - if (!path) { - throw new InvalidArgumentError('Snapshot path is required') - } - - try { - const data = await readFile(resolve(path), 'utf8') - const parsed = JSON.parse(data) - - // Convert array format back to Map - if (Array.isArray(parsed)) { - this.#snapshots.clear() - for (const { hash, snapshot } of parsed) { - this.#snapshots.set(hash, snapshot) - } + 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 { - // Legacy object format - this.#snapshots = new Map(Object.entries(parsed)) + throwError(state, "repeat of a chomping mode identifier"); } - } catch (error) { - if (error.code === 'ENOENT') { - // File doesn't exist yet - that's ok for recording mode - this.#snapshots.clear() + } 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 { - throw new UndiciError(`Failed to load snapshots from ${path}`, { cause: error }) + throwError(state, "repeat of an indentation width identifier"); } + } else { + break; } } - - /** - * Saves snapshots to file - * - * @param {string} [filePath] - Optional file path to save snapshots - * @returns {Promise} - Resolves when snapshots are saved - */ - async saveSnapshots (filePath) { - const path = filePath || this.#snapshotPath - if (!path) { - throw new InvalidArgumentError('Snapshot path is required') - } - - const resolvedPath = resolve(path) - - // Ensure directory exists - await mkdir(dirname(resolvedPath), { recursive: true }) - - // Convert Map to serializable format - const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({ - hash, - snapshot - })) - - await writeFile(resolvedPath, JSON.stringify(data, null, 2), { flush: true }) - } - - /** - * Clears all recorded snapshots - * @returns {void} - */ - clear () { - this.#snapshots.clear() - } - - /** - * Gets all recorded snapshots - * @return {Array} - Array of all recorded snapshots - */ - getSnapshots () { - return Array.from(this.#snapshots.values()) - } - - /** - * Gets snapshot count - * @return {number} - Number of recorded snapshots - */ - size () { - return this.#snapshots.size - } - - /** - * Resets call counts for all snapshots (useful for test cleanup) - * @returns {void} - */ - resetCallCounts () { - for (const snapshot of this.#snapshots.values()) { - snapshot.callCount = 0 + 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); } } - - /** - * Deletes a specific snapshot by request options - * @param {SnapshotRequestOptions} requestOpts - Request options to match - * @returns {boolean} - True if snapshot was deleted, false if not found - */ - deleteSnapshot (requestOpts) { - const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions) - const hash = createRequestHash(request) - return this.#snapshots.delete(hash) - } - - /** - * Gets information about a specific snapshot - * @param {SnapshotRequestOptions} requestOpts - Request options to match - * @returns {SnapshotInfo|null} - Snapshot information or null if not found - */ - getSnapshotInfo (requestOpts) { - const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions) - const hash = createRequestHash(request) - const snapshot = this.#snapshots.get(hash) - - if (!snapshot) return null - - return { - hash, - request: snapshot.request, - responseCount: snapshot.responses ? snapshot.responses.length : (snapshot.response ? 1 : 0), // .response for legacy snapshots - callCount: snapshot.callCount || 0, - timestamp: snapshot.timestamp - } - } - - /** - * Replaces all snapshots with new data (full replacement) - * @param {Array<{hash: string; snapshot: SnapshotEntry}>|Record} snapshotData - New snapshot data to replace existing ones - * @returns {void} - */ - replaceSnapshots (snapshotData) { - this.#snapshots.clear() - - if (Array.isArray(snapshotData)) { - for (const { hash, snapshot } of snapshotData) { - this.#snapshots.set(hash, snapshot) - } - } else if (snapshotData && typeof snapshotData === 'object') { - // Legacy object format - this.#snapshots = new Map(Object.entries(snapshotData)) - } - } - - /** - * Starts the auto-flush timer - * @returns {void} - */ - #startAutoFlush () { - return this.#scheduleFlush() - } - - /** - * Stops the auto-flush timer - * @returns {void} - */ - #stopAutoFlush () { - if (this.#flushTimeout) { - clearTimeout(this.#flushTimeout) - // Ensure any pending flush is completed - this.saveSnapshots().catch(() => { - // Ignore flush errors - }) - this.#flushTimeout = null + 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); } - } - - /** - * Schedules a flush (debounced to avoid excessive writes) - */ - #scheduleFlush () { - this.#flushTimeout = setTimeout(() => { - this.saveSnapshots().catch(() => { - // Ignore flush errors - }) - if (this.#autoFlush) { - this.#flushTimeout?.refresh() - } else { - this.#flushTimeout = null - } - }, 1000) // 1 second debounce - } - - /** - * Cleanup method to stop timers - * @returns {void} - */ - destroy () { - this.#stopAutoFlush() - if (this.#flushTimeout) { - clearTimeout(this.#flushTimeout) - this.#flushTimeout = null + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; } - } - - /** - * Async close method that saves all recordings and performs cleanup - * @returns {Promise} - */ - async close () { - // Save any pending recordings if we have a snapshot path - if (this.#snapshotPath && this.#snapshots.size !== 0) { - await this.saveSnapshots() + if (is_EOL(ch)) { + emptyLines++; + continue; } - - // Perform cleanup - this.destroy() - } -} - -module.exports = { SnapshotRecorder, formatRequestKey, createRequestHash, filterHeadersForMatching, filterHeadersForStorage, createHeaderFilters } - - -/***/ }), - -/***/ 37397: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { InvalidArgumentError } = __nccwpck_require__(48045) -const { runtimeFeatures } = __nccwpck_require__(15072) - -/** - * @typedef {Object} HeaderFilters - * @property {Set} ignore - Set of headers to ignore for matching - * @property {Set} exclude - Set of headers to exclude from matching - * @property {Set} match - Set of headers to match (empty means match - */ - -/** - * Creates cached header sets for performance - * - * @param {import('./snapshot-recorder').SnapshotRecorderMatchOptions} matchOptions - Matching options for headers - * @returns {HeaderFilters} - Cached sets for ignore, exclude, and match headers - */ -function createHeaderFilters (matchOptions = {}) { - const { ignoreHeaders = [], excludeHeaders = [], matchHeaders = [], caseSensitive = false } = matchOptions - - return { - ignore: new Set(ignoreHeaders.map(header => caseSensitive ? header : header.toLowerCase())), - exclude: new Set(excludeHeaders.map(header => caseSensitive ? header : header.toLowerCase())), - match: new Set(matchHeaders.map(header => caseSensitive ? header : header.toLowerCase())) - } -} - -const crypto = runtimeFeatures.has('crypto') - ? __nccwpck_require__(6005) - : null - -/** - * @callback HashIdFunction - * @param {string} value - The value to hash - * @returns {string} - The base64url encoded hash of the value - */ - -/** - * Generates a hash for a given value - * @type {HashIdFunction} - */ -const hashId = crypto?.hash - ? (value) => crypto.hash('sha256', value, 'base64url') - : (value) => Buffer.from(value).toString('base64url') - -/** - * @typedef {(url: string) => boolean} IsUrlExcluded Checks if a URL matches any of the exclude patterns - */ - -/** @typedef {{[key: Lowercase]: string}} NormalizedHeaders */ -/** @typedef {Array} UndiciHeaders */ -/** @typedef {Record} Headers */ - -/** - * @param {*} headers - * @returns {headers is UndiciHeaders} - */ -function isUndiciHeaders (headers) { - return Array.isArray(headers) && (headers.length & 1) === 0 -} - -/** - * Factory function to create a URL exclusion checker - * @param {Array} [excludePatterns=[]] - Array of patterns to exclude - * @returns {IsUrlExcluded} - A function that checks if a URL matches any of the exclude patterns - */ -function isUrlExcludedFactory (excludePatterns = []) { - if (excludePatterns.length === 0) { - return () => false - } - - return function isUrlExcluded (url) { - let urlLowerCased - - for (const pattern of excludePatterns) { - if (typeof pattern === 'string') { - if (!urlLowerCased) { - // Convert URL to lowercase only once - urlLowerCased = url.toLowerCase() - } - // Simple string match (case-insensitive) - if (urlLowerCased.includes(pattern.toLowerCase())) { - return true + 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"; } - } else if (pattern instanceof RegExp) { - // Regex pattern match - if (pattern.test(url)) { - return true + } + 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); } - - return false + 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; } - -/** - * Normalizes headers for consistent comparison - * - * @param {Object|UndiciHeaders} headers - Headers to normalize - * @returns {NormalizedHeaders} - Normalized headers as a lowercase object - */ -function normalizeHeaders (headers) { - /** @type {NormalizedHeaders} */ - const normalizedHeaders = {} - - if (!headers) return normalizedHeaders - - // Handle array format (undici internal format: [name, value, name, value, ...]) - if (isUndiciHeaders(headers)) { - for (let i = 0; i < headers.length; i += 2) { - const key = headers[i] - const value = headers[i + 1] - if (key && value !== undefined) { - // Convert Buffers to strings if needed - const keyStr = Buffer.isBuffer(key) ? key.toString() : key - const valueStr = Buffer.isBuffer(value) ? value.toString() : value - normalizedHeaders[keyStr.toLowerCase()] = valueStr - } - } - return normalizedHeaders +function readBlockSequence(state, nodeIndent) { + var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch; + if (state.firstTabInLine !== -1) return false; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; } - - // Handle object format - if (headers && typeof headers === 'object') { - for (const [key, value] of Object.entries(headers)) { - if (key && typeof key === 'string') { - normalizedHeaders[key.toLowerCase()] = Array.isArray(value) ? value.join(', ') : String(value) + 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; + } + 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; + } } - - return normalizedHeaders -} - -const validSnapshotModes = /** @type {const} */ (['record', 'playback', 'update']) - -/** @typedef {typeof validSnapshotModes[number]} SnapshotMode */ - -/** - * @param {*} mode - The snapshot mode to validate - * @returns {asserts mode is SnapshotMode} - */ -function validateSnapshotMode (mode) { - if (!validSnapshotModes.includes(mode)) { - throw new InvalidArgumentError(`Invalid snapshot mode: ${mode}. Must be one of: ${validSnapshotModes.join(', ')}`) + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "sequence"; + state.result = _result; + return true; } + return false; } - -module.exports = { - createHeaderFilters, - hashId, - isUndiciHeaders, - normalizeHeaders, - isUrlExcludedFactory, - validateSnapshotMode -} - - -/***/ }), - -/***/ 88047: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - safeHTTPMethods, - pathHasQueryOrFragment, - hasSafeIterator -} = __nccwpck_require__(83983) - -const { serializePathWithQuery } = __nccwpck_require__(83983) - -/** - * @param {import('../../types/dispatcher.d.ts').default.DispatchOptions} opts - */ -function makeCacheKey (opts) { - if (!opts.origin) { - throw new Error('opts.origin is undefined') - } - - let fullPath = opts.path || '/' - - if (opts.query && !pathHasQueryOrFragment(opts.path)) { - fullPath = serializePathWithQuery(fullPath, opts.query) - } - - return { - origin: opts.origin.toString(), - method: opts.method, - path: fullPath, - headers: opts.headers +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; + if (state.firstTabInLine !== -1) return false; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; } -} - -/** - * @param {Record} - * @returns {Record} - */ -function normalizeHeaders (opts) { - let headers - if (opts.headers == null) { - headers = {} - } else if (typeof opts.headers === 'object') { - headers = {} - - if (hasSafeIterator(opts.headers)) { - for (const x of opts.headers) { - if (!Array.isArray(x)) { - throw new Error('opts.headers is not a valid header map') - } - const [key, val] = x - if (typeof key !== 'string' || typeof val !== 'string') { - throw new Error('opts.headers is not a valid header map') + 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"); + } + following = state.input.charCodeAt(state.position + 1); + _line = state.line; + if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { + if (ch === 63) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; } - headers[key.toLowerCase()] = val + 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 { - for (const key of Object.keys(opts.headers)) { - headers[key.toLowerCase()] = opts.headers[key] + _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 (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, _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; } } - } else { - throw new Error('opts.headers is not an object') - } - - return headers -} - -/** - * @param {any} key - */ -function assertCacheKey (key) { - if (typeof key !== 'object') { - throw new TypeError(`expected key to be object, got ${typeof key}`) - } - - for (const property of ['origin', 'method', 'path']) { - if (typeof key[property] !== 'string') { - throw new TypeError(`expected key.${property} to be string, got ${typeof key[property]}`) + 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 (key.headers !== undefined && typeof key.headers !== 'object') { - throw new TypeError(`expected headers to be object, got ${typeof key}`) - } -} - -/** - * @param {any} value - */ -function assertCacheValue (value) { - if (typeof value !== 'object') { - throw new TypeError(`expected value to be object, got ${typeof value}`) - } - - for (const property of ['statusCode', 'cachedAt', 'staleAt', 'deleteAt']) { - if (typeof value[property] !== 'number') { - throw new TypeError(`expected value.${property} to be number, got ${typeof value[property]}`) + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError(state, "bad indentation of a mapping entry"); + } else if (state.lineIndent < nodeIndent) { + break; } } - - if (typeof value.statusMessage !== 'string') { - throw new TypeError(`expected value.statusMessage to be string, got ${typeof value.statusMessage}`) - } - - if (value.headers != null && typeof value.headers !== 'object') { - throw new TypeError(`expected value.rawHeaders to be object, got ${typeof value.headers}`) - } - - if (value.vary !== undefined && typeof value.vary !== 'object') { - throw new TypeError(`expected value.vary to be object, got ${typeof value.vary}`) + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); } - - if (value.etag !== undefined && typeof value.etag !== 'string') { - throw new TypeError(`expected value.etag to be string, got ${typeof value.etag}`) + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "mapping"; + state.result = _result; } + return detected; } - -/** - * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-cache-control - * @see https://www.iana.org/assignments/http-cache-directives/http-cache-directives.xhtml - - * @param {string | string[]} header - * @returns {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} - */ -function parseCacheControlHeader (header) { - /** - * @type {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} - */ - const output = {} - - let directives - if (Array.isArray(header)) { - directives = [] - - for (const directive of header) { - directives.push(...directive.split(',')) - } +function readTagProperty(state) { + var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; + 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 { - directives = header.split(',') + tagHandle = "!"; } - - for (let i = 0; i < directives.length; i++) { - const directive = directives[i].toLowerCase() - const keyValueDelimiter = directive.indexOf('=') - - let key - let value - if (keyValueDelimiter !== -1) { - key = directive.substring(0, keyValueDelimiter).trimStart() - value = directive.substring(keyValueDelimiter + 1) + _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 { - key = directive.trim() - } - - switch (key) { - case 'min-fresh': - case 'max-stale': - case 'max-age': - case 's-maxage': - case 'stale-while-revalidate': - case 'stale-if-error': { - if (value === undefined || value[0] === ' ') { - continue - } - - if ( - value.length >= 2 && - value[0] === '"' && - value[value.length - 1] === '"' - ) { - value = value.substring(1, value.length - 1) - } - - const parsedValue = parseInt(value, 10) - // eslint-disable-next-line no-self-compare - if (parsedValue !== parsedValue) { - continue - } - - if (key === 'max-age' && key in output && output[key] >= parsedValue) { - continue - } - - output[key] = parsedValue - - break - } - case 'private': - case 'no-cache': { - if (value) { - // The private and no-cache directives can be unqualified (aka just - // `private` or `no-cache`) or qualified (w/ a value). When they're - // qualified, it's a list of headers like `no-cache=header1`, - // `no-cache="header1"`, or `no-cache="header1, header2"` - // If we're given multiple headers, the comma messes us up since - // we split the full header by commas. So, let's loop through the - // remaining parts in front of us until we find one that ends in a - // quote. We can then just splice all of the parts in between the - // starting quote and the ending quote out of the directives array - // and continue parsing like normal. - // https://www.rfc-editor.org/rfc/rfc9111.html#name-no-cache-2 - if (value[0] === '"') { - // Something like `no-cache="some-header"` OR `no-cache="some-header, another-header"`. - - // Add the first header on and cut off the leading quote - const headers = [value.substring(1)] - - let foundEndingQuote = value[value.length - 1] === '"' - if (!foundEndingQuote) { - // Something like `no-cache="some-header, another-header"` - // This can still be something invalid, e.g. `no-cache="some-header, ...` - for (let j = i + 1; j < directives.length; j++) { - const nextPart = directives[j] - const nextPartLength = nextPart.length - - headers.push(nextPart.trim()) - - if (nextPartLength !== 0 && nextPart[nextPartLength - 1] === '"') { - foundEndingQuote = true - break - } - } - } - - if (foundEndingQuote) { - let lastHeader = headers[headers.length - 1] - if (lastHeader[lastHeader.length - 1] === '"') { - lastHeader = lastHeader.substring(0, lastHeader.length - 1) - headers[headers.length - 1] = lastHeader - } - - if (key in output) { - output[key] = output[key].concat(headers) - } else { - output[key] = headers - } - } - } else { - // Something like `no-cache="some-header"` - if (key in output) { - output[key] = output[key].concat(value) - } else { - output[key] = [value] - } + 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"); } - - break + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, "tag suffix cannot contain exclamation marks"); } } - // eslint-disable-next-line no-fallthrough - case 'public': - case 'no-store': - case 'must-revalidate': - case 'proxy-revalidate': - case 'immutable': - case 'no-transform': - case 'must-understand': - case 'only-if-cached': - if (value) { - // These are qualified (something like `public=...`) when they aren't - // allowed to be, skip - continue - } - - output[key] = true - break - default: - // Ignore unknown directives as per https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.3-1 - continue + 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"); } } - - return output + 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$1.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; } - -/** - * @param {string | string[]} varyHeader Vary header from the server - * @param {Record} headers Request headers - * @returns {Record} - */ -function parseVaryHeader (varyHeader, headers) { - if (typeof varyHeader === 'string' && varyHeader.includes('*')) { - return headers - } - - const output = /** @type {Record} */ ({}) - - const varyingHeaders = typeof varyHeader === 'string' - ? varyHeader.split(',') - : varyHeader - - for (const header of varyingHeaders) { - const trimmedHeader = header.trim().toLowerCase() - - output[trimmedHeader] = headers[trimmedHeader] ?? null +function readAnchorProperty(state) { + var _position, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 38) return false; + if (state.anchor !== null) { + throwError(state, "duplication of an anchor property"); } - - return output -} - -/** - * Note: this deviates from the spec a little. Empty etags ("", W/"") are valid, - * however, including them in cached resposnes serves little to no purpose. - * - * @see https://www.rfc-editor.org/rfc/rfc9110.html#name-etag - * - * @param {string} etag - * @returns {boolean} - */ -function isEtagUsable (etag) { - if (etag.length <= 2) { - // Shortest an etag can be is two chars (just ""). This is where we deviate - // from the spec requiring a min of 3 chars however - return false - } - - if (etag[0] === '"' && etag[etag.length - 1] === '"') { - // ETag: ""asd123"" or ETag: "W/"asd123"", kinda undefined behavior in the - // spec. Some servers will accept these while others don't. - // ETag: "asd123" - return !(etag[1] === '"' || etag.startsWith('"W/')) - } - - if (etag.startsWith('W/"') && etag[etag.length - 1] === '"') { - // ETag: W/"", also where we deviate from the spec & require a min of 3 - // chars - // ETag: for W/"", W/"asd123" - return etag.length !== 4 - } - - // Anything else - return false -} - -/** - * @param {unknown} store - * @returns {asserts store is import('../../types/cache-interceptor.d.ts').default.CacheStore} - */ -function assertCacheStore (store, name = 'CacheStore') { - if (typeof store !== 'object' || store === null) { - throw new TypeError(`expected type of ${name} to be a CacheStore, got ${store === null ? 'null' : typeof store}`) + 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); } - - for (const fn of ['get', 'createWriteStream', 'delete']) { - if (typeof store[fn] !== 'function') { - throw new TypeError(`${name} needs to have a \`${fn}()\` function`) - } + 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; } -/** - * @param {unknown} methods - * @returns {asserts methods is import('../../types/cache-interceptor.d.ts').default.CacheMethods[]} - */ -function assertCacheMethods (methods, name = 'CacheMethods') { - if (!Array.isArray(methods)) { - throw new TypeError(`expected type of ${name} needs to be an array, got ${methods === null ? 'null' : typeof methods}`) +function readAlias(state) { + var _position, alias, ch; + 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 (methods.length === 0) { - throw new TypeError(`${name} needs to have at least one method`) + if (state.position === _position) { + throwError(state, "name of an alias node must contain at least one character"); } - - for (const method of methods) { - if (!safeHTTPMethods.includes(method)) { - throw new TypeError(`element of ${name}-array needs to be one of following values: ${safeHTTPMethods.join(', ')}, got ${method}`) - } + alias = state.input.slice(_position, state.position); + if (!_hasOwnProperty$1.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); } + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; } - -/** - * Creates a string key for request deduplication purposes. - * This key is used to identify in-flight requests that can be shared. - * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey - * @param {Set} [excludeHeaders] Set of lowercase header names to exclude from the key - * @returns {string} - */ -function makeDeduplicationKey (cacheKey, excludeHeaders) { - // Create a deterministic string key from the cache key - // Include origin, method, path, and sorted headers - let key = `${cacheKey.origin}:${cacheKey.method}:${cacheKey.path}` - - if (cacheKey.headers) { - const sortedHeaders = Object.keys(cacheKey.headers).sort() - for (const header of sortedHeaders) { - // Skip excluded headers - if (excludeHeaders?.has(header.toLowerCase())) { - continue +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type2, 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; } - const value = cacheKey.headers[header] - key += `:${header}=${Array.isArray(value) ? value.join(',') : value}` } } - - return key -} - -module.exports = { - makeCacheKey, - normalizeHeaders, - assertCacheKey, - assertCacheValue, - parseCacheControlHeader, - parseVaryHeader, - isEtagUsable, - assertCacheMethods, - assertCacheStore, - makeDeduplicationKey -} - - -/***/ }), - -/***/ 70817: -/***/ ((module) => { - -"use strict"; - - -/** - * @see https://www.rfc-editor.org/rfc/rfc9110.html#name-date-time-formats - * - * @param {string} date - * @returns {Date | undefined} - */ -function parseHttpDate (date) { - // Sun, 06 Nov 1994 08:49:37 GMT ; IMF-fixdate - // Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format - // Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format - - switch (date[3]) { - case ',': return parseImfDate(date) - case ' ': return parseAscTimeDate(date) - default: return parseRfc850Date(date) - } -} - -/** - * @see https://httpwg.org/specs/rfc9110.html#preferred.date.format - * - * @param {string} date - * @returns {Date | undefined} - */ -function parseImfDate (date) { - if ( - date.length !== 29 || - date[4] !== ' ' || - date[7] !== ' ' || - date[11] !== ' ' || - date[16] !== ' ' || - date[19] !== ':' || - date[22] !== ':' || - date[25] !== ' ' || - date[26] !== 'G' || - date[27] !== 'M' || - date[28] !== 'T' - ) { - return undefined - } - - let weekday = -1 - if (date[0] === 'S' && date[1] === 'u' && date[2] === 'n') { // Sunday - weekday = 0 - } else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n') { // Monday - weekday = 1 - } else if (date[0] === 'T' && date[1] === 'u' && date[2] === 'e') { // Tuesday - weekday = 2 - } else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd') { // Wednesday - weekday = 3 - } else if (date[0] === 'T' && date[1] === 'h' && date[2] === 'u') { // Thursday - weekday = 4 - } else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i') { // Friday - weekday = 5 - } else if (date[0] === 'S' && date[1] === 'a' && date[2] === 't') { // Saturday - weekday = 6 - } else { - return undefined // Not a valid day of the week - } - - let day = 0 - if (date[5] === '0') { - // Single digit day, e.g. "Sun Nov 6 08:49:37 1994" - const code = date.charCodeAt(6) - if (code < 49 || code > 57) { - return undefined // Not a digit - } - day = code - 48 // Convert ASCII code to number - } else { - const code1 = date.charCodeAt(5) - if (code1 < 49 || code1 > 51) { - return undefined // Not a digit between 1 and 3 - } - const code2 = date.charCodeAt(6) - if (code2 < 48 || code2 > 57) { - return undefined // Not a digit - } - day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number - } - - let monthIdx = -1 - if ( - (date[8] === 'J' && date[9] === 'a' && date[10] === 'n') - ) { - monthIdx = 0 // Jan - } else if ( - (date[8] === 'F' && date[9] === 'e' && date[10] === 'b') - ) { - monthIdx = 1 // Feb - } else if ( - (date[8] === 'M' && date[9] === 'a') - ) { - if (date[10] === 'r') { - monthIdx = 2 // Mar - } else if (date[10] === 'y') { - monthIdx = 4 // May - } else { - return undefined // Invalid month - } - } else if ( - (date[8] === 'J') - ) { - if (date[9] === 'a' && date[10] === 'n') { - monthIdx = 0 // Jan - } else if (date[9] === 'u') { - if (date[10] === 'n') { - monthIdx = 5 // Jun - } else if (date[10] === 'l') { - monthIdx = 6 // Jul + 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 { - return undefined // Invalid month + allowBlockCollections = false; } - } else { - return undefined // Invalid month - } - } else if ( - (date[8] === 'A') - ) { - if (date[9] === 'p' && date[10] === 'r') { - monthIdx = 3 // Apr - } else if (date[9] === 'u' && date[10] === 'g') { - monthIdx = 7 // Aug - } else { - return undefined // Invalid month - } - } else if ( - (date[8] === 'S' && date[9] === 'e' && date[10] === 'p') - ) { - monthIdx = 8 // Sep - } else if ( - (date[8] === 'O' && date[9] === 'c' && date[10] === 't') - ) { - monthIdx = 9 // Oct - } else if ( - (date[8] === 'N' && date[9] === 'o' && date[10] === 'v') - ) { - monthIdx = 10 // Nov - } else if ( - (date[8] === 'D' && date[9] === 'e' && date[10] === 'c') - ) { - monthIdx = 11 // Dec - } else { - // Not a valid month - return undefined - } - - const yearDigit1 = date.charCodeAt(12) - if (yearDigit1 < 48 || yearDigit1 > 57) { - return undefined // Not a digit - } - const yearDigit2 = date.charCodeAt(13) - if (yearDigit2 < 48 || yearDigit2 > 57) { - return undefined // Not a digit - } - const yearDigit3 = date.charCodeAt(14) - if (yearDigit3 < 48 || yearDigit3 > 57) { - return undefined // Not a digit + } } - const yearDigit4 = date.charCodeAt(15) - if (yearDigit4 < 48 || yearDigit4 > 57) { - return undefined // Not a digit + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; } - const year = (yearDigit1 - 48) * 1000 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48) - - let hour = 0 - if (date[17] === '0') { - const code = date.charCodeAt(18) - if (code < 48 || code > 57) { - return undefined // Not a digit - } - hour = code - 48 // Convert ASCII code to number - } else { - const code1 = date.charCodeAt(17) - if (code1 < 48 || code1 > 50) { - return undefined // Not a digit between 0 and 2 - } - const code2 = date.charCodeAt(18) - if (code2 < 48 || code2 > 57) { - return undefined // Not a digit + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; } - if (code1 === 50 && code2 > 51) { - return undefined // Hour cannot be greater than 23 + 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); } - hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number } - - let minute = 0 - if (date[20] === '0') { - const code = date.charCodeAt(21) - if (code < 48 || code > 57) { - return undefined // Not a digit + if (state.tag === null) { + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; } - minute = code - 48 // Convert ASCII code to number - } else { - const code1 = date.charCodeAt(20) - if (code1 < 48 || code1 > 53) { - return undefined // Not a digit between 0 and 5 + } 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 + '"'); } - const code2 = date.charCodeAt(21) - if (code2 < 48 || code2 > 57) { - return undefined // Not a digit + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type2 = state.implicitTypes[typeIndex]; + if (type2.resolve(state.result)) { + state.result = type2.construct(state.result); + state.tag = type2.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } } - minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number - } - - let second = 0 - if (date[23] === '0') { - const code = date.charCodeAt(24) - if (code < 48 || code > 57) { - return undefined // Not a digit + } else if (state.tag !== "!") { + if (_hasOwnProperty$1.call(state.typeMap[state.kind || "fallback"], state.tag)) { + type2 = state.typeMap[state.kind || "fallback"][state.tag]; + } else { + type2 = null; + typeList = state.typeMap.multi[state.kind || "fallback"]; + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type2 = typeList[typeIndex]; + break; + } + } } - second = code - 48 // Convert ASCII code to number - } else { - const code1 = date.charCodeAt(23) - if (code1 < 48 || code1 > 53) { - return undefined // Not a digit between 0 and 5 + if (!type2) { + throwError(state, "unknown tag !<" + state.tag + ">"); } - const code2 = date.charCodeAt(24) - if (code2 < 48 || code2 > 57) { - return undefined // Not a digit + if (state.result !== null && type2.kind !== state.kind) { + throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type2.kind + '", not "' + state.kind + '"'); } - second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number - } - - const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second)) - return result.getUTCDay() === weekday ? result : undefined -} - -/** - * @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats - * - * @param {string} date - * @returns {Date | undefined} - */ -function parseAscTimeDate (date) { - // This is assumed to be in UTC - - if ( - date.length !== 24 || - date[7] !== ' ' || - date[10] !== ' ' || - date[19] !== ' ' - ) { - return undefined - } - - let weekday = -1 - if (date[0] === 'S' && date[1] === 'u' && date[2] === 'n') { // Sunday - weekday = 0 - } else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n') { // Monday - weekday = 1 - } else if (date[0] === 'T' && date[1] === 'u' && date[2] === 'e') { // Tuesday - weekday = 2 - } else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd') { // Wednesday - weekday = 3 - } else if (date[0] === 'T' && date[1] === 'h' && date[2] === 'u') { // Thursday - weekday = 4 - } else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i') { // Friday - weekday = 5 - } else if (date[0] === 'S' && date[1] === 'a' && date[2] === 't') { // Saturday - weekday = 6 - } else { - return undefined // Not a valid day of the week - } - - let monthIdx = -1 - if ( - (date[4] === 'J' && date[5] === 'a' && date[6] === 'n') - ) { - monthIdx = 0 // Jan - } else if ( - (date[4] === 'F' && date[5] === 'e' && date[6] === 'b') - ) { - monthIdx = 1 // Feb - } else if ( - (date[4] === 'M' && date[5] === 'a') - ) { - if (date[6] === 'r') { - monthIdx = 2 // Mar - } else if (date[6] === 'y') { - monthIdx = 4 // May + if (!type2.resolve(state.result, state.tag)) { + throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); } else { - return undefined // Invalid month - } - } else if ( - (date[4] === 'J') - ) { - if (date[5] === 'a' && date[6] === 'n') { - monthIdx = 0 // Jan - } else if (date[5] === 'u') { - if (date[6] === 'n') { - monthIdx = 5 // Jun - } else if (date[6] === 'l') { - monthIdx = 6 // Jul - } else { - return undefined // Invalid month + state.result = type2.construct(state.result, state.tag); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; } - } else { - return undefined // Invalid month - } - } else if ( - (date[4] === 'A') - ) { - if (date[5] === 'p' && date[6] === 'r') { - monthIdx = 3 // Apr - } else if (date[5] === 'u' && date[6] === 'g') { - monthIdx = 7 // Aug - } else { - return undefined // Invalid month - } - } else if ( - (date[4] === 'S' && date[5] === 'e' && date[6] === 'p') - ) { - monthIdx = 8 // Sep - } else if ( - (date[4] === 'O' && date[5] === 'c' && date[6] === 't') - ) { - monthIdx = 9 // Oct - } else if ( - (date[4] === 'N' && date[5] === 'o' && date[6] === 'v') - ) { - monthIdx = 10 // Nov - } else if ( - (date[4] === 'D' && date[5] === 'e' && date[6] === 'c') - ) { - monthIdx = 11 // Dec - } else { - // Not a valid month - return undefined - } - - let day = 0 - if (date[8] === ' ') { - // Single digit day, e.g. "Sun Nov 6 08:49:37 1994" - const code = date.charCodeAt(9) - if (code < 49 || code > 57) { - return undefined // Not a digit - } - day = code - 48 // Convert ASCII code to number - } else { - const code1 = date.charCodeAt(8) - if (code1 < 49 || code1 > 51) { - return undefined // Not a digit between 1 and 3 - } - const code2 = date.charCodeAt(9) - if (code2 < 48 || code2 > 57) { - return undefined // Not a digit } - day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number } - - let hour = 0 - if (date[11] === '0') { - const code = date.charCodeAt(12) - if (code < 48 || code > 57) { - return undefined // Not a digit - } - hour = code - 48 // Convert ASCII code to number - } else { - const code1 = date.charCodeAt(11) - if (code1 < 48 || code1 > 50) { - return undefined // Not a digit between 0 and 2 - } - const code2 = date.charCodeAt(12) - if (code2 < 48 || code2 > 57) { - return undefined // Not a digit + 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 = /* @__PURE__ */ Object.create(null); + state.anchorMap = /* @__PURE__ */ 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; } - if (code1 === 50 && code2 > 51) { - return undefined // Hour cannot be greater than 23 + 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); } - hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number - } - - let minute = 0 - if (date[14] === '0') { - const code = date.charCodeAt(15) - if (code < 48 || code > 57) { - return undefined // Not a digit + 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"); } - minute = code - 48 // Convert ASCII code to number - } else { - const code1 = date.charCodeAt(14) - if (code1 < 48 || code1 > 53) { - return undefined // Not a digit between 0 and 5 + 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)); } - const code2 = date.charCodeAt(15) - if (code2 < 48 || code2 > 57) { - return undefined // Not a digit + if (ch !== 0) readLineBreak(state); + if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); } - minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number } - - let second = 0 - if (date[17] === '0') { - const code = date.charCodeAt(18) - if (code < 48 || code > 57) { - return undefined // Not a digit + 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); } - second = code - 48 // Convert ASCII code to number + return; + } + if (state.position < state.length - 1) { + throwError(state, "end of the stream or a document separator is expected"); } else { - const code1 = date.charCodeAt(17) - if (code1 < 48 || code1 > 53) { - return undefined // Not a digit between 0 and 5 + return; + } +} +function loadDocuments(input, options2) { + input = String(input); + options2 = options2 || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { + input += "\n"; } - const code2 = date.charCodeAt(18) - if (code2 < 48 || code2 > 57) { - return undefined // Not a digit + if (input.charCodeAt(0) === 65279) { + input = input.slice(1); } - second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number - } - - const yearDigit1 = date.charCodeAt(20) - if (yearDigit1 < 48 || yearDigit1 > 57) { - return undefined // Not a digit } - const yearDigit2 = date.charCodeAt(21) - if (yearDigit2 < 48 || yearDigit2 > 57) { - return undefined // Not a digit + var state = new State$1(input, options2); + var nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, "null byte is not allowed in input"); } - const yearDigit3 = date.charCodeAt(22) - if (yearDigit3 < 48 || yearDigit3 > 57) { - return undefined // Not a digit + state.input += "\0"; + while (state.input.charCodeAt(state.position) === 32) { + state.lineIndent += 1; + state.position += 1; } - const yearDigit4 = date.charCodeAt(23) - if (yearDigit4 < 48 || yearDigit4 > 57) { - return undefined // Not a digit + while (state.position < state.length - 1) { + readDocument(state); } - const year = (yearDigit1 - 48) * 1000 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48) - - const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second)) - return result.getUTCDay() === weekday ? result : undefined + return state.documents; } - -/** - * @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats - * - * @param {string} date - * @returns {Date | undefined} - */ -function parseRfc850Date (date) { - let commaIndex = -1 - - let weekday = -1 - if (date[0] === 'S') { - if (date[1] === 'u' && date[2] === 'n' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') { - weekday = 0 // Sunday - commaIndex = 6 - } else if (date[1] === 'a' && date[2] === 't' && date[3] === 'u' && date[4] === 'r' && date[5] === 'd' && date[6] === 'a' && date[7] === 'y') { - weekday = 6 // Saturday - commaIndex = 8 - } - } else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') { - weekday = 1 // Monday - commaIndex = 6 - } else if (date[0] === 'T') { - if (date[1] === 'u' && date[2] === 'e' && date[3] === 's' && date[4] === 'd' && date[5] === 'a' && date[6] === 'y') { - weekday = 2 // Tuesday - commaIndex = 7 - } else if (date[1] === 'h' && date[2] === 'u' && date[3] === 'r' && date[4] === 's' && date[5] === 'd' && date[6] === 'a' && date[7] === 'y') { - weekday = 4 // Thursday - commaIndex = 8 - } - } else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd' && date[3] === 'n' && date[4] === 'e' && date[5] === 's' && date[6] === 'd' && date[7] === 'a' && date[8] === 'y') { - weekday = 3 // Wednesday - commaIndex = 9 - } else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') { - weekday = 5 // Friday - commaIndex = 6 - } else { - // Not a valid day name - return undefined - } - - if ( - date[commaIndex] !== ',' || - (date.length - commaIndex - 1) !== 23 || - date[commaIndex + 1] !== ' ' || - date[commaIndex + 4] !== '-' || - date[commaIndex + 8] !== '-' || - date[commaIndex + 11] !== ' ' || - date[commaIndex + 14] !== ':' || - date[commaIndex + 17] !== ':' || - date[commaIndex + 20] !== ' ' || - date[commaIndex + 21] !== 'G' || - date[commaIndex + 22] !== 'M' || - date[commaIndex + 23] !== 'T' - ) { - return undefined - } - - let day = 0 - if (date[commaIndex + 2] === '0') { - // Single digit day, e.g. "Sun Nov 6 08:49:37 1994" - const code = date.charCodeAt(commaIndex + 3) - if (code < 49 || code > 57) { - return undefined // Not a digit - } - day = code - 48 // Convert ASCII code to number - } else { - const code1 = date.charCodeAt(commaIndex + 2) - if (code1 < 49 || code1 > 51) { - return undefined // Not a digit between 1 and 3 - } - const code2 = date.charCodeAt(commaIndex + 3) - if (code2 < 48 || code2 > 57) { - return undefined // Not a digit - } - day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number - } - - let monthIdx = -1 - if ( - (date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'n') - ) { - monthIdx = 0 // Jan - } else if ( - (date[commaIndex + 5] === 'F' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'b') - ) { - monthIdx = 1 // Feb - } else if ( - (date[commaIndex + 5] === 'M' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'r') - ) { - monthIdx = 2 // Mar - } else if ( - (date[commaIndex + 5] === 'A' && date[commaIndex + 6] === 'p' && date[commaIndex + 7] === 'r') - ) { - monthIdx = 3 // Apr - } else if ( - (date[commaIndex + 5] === 'M' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'y') - ) { - monthIdx = 4 // May - } else if ( - (date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'n') - ) { - monthIdx = 5 // Jun - } else if ( - (date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'l') - ) { - monthIdx = 6 // Jul - } else if ( - (date[commaIndex + 5] === 'A' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'g') - ) { - monthIdx = 7 // Aug - } else if ( - (date[commaIndex + 5] === 'S' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'p') - ) { - monthIdx = 8 // Sep - } else if ( - (date[commaIndex + 5] === 'O' && date[commaIndex + 6] === 'c' && date[commaIndex + 7] === 't') - ) { - monthIdx = 9 // Oct - } else if ( - (date[commaIndex + 5] === 'N' && date[commaIndex + 6] === 'o' && date[commaIndex + 7] === 'v') - ) { - monthIdx = 10 // Nov - } else if ( - (date[commaIndex + 5] === 'D' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'c') - ) { - monthIdx = 11 // Dec - } else { - // Not a valid month - return undefined - } - - const yearDigit1 = date.charCodeAt(commaIndex + 9) - if (yearDigit1 < 48 || yearDigit1 > 57) { - return undefined // Not a digit - } - const yearDigit2 = date.charCodeAt(commaIndex + 10) - if (yearDigit2 < 48 || yearDigit2 > 57) { - return undefined // Not a digit +function loadAll$1(input, iterator, options2) { + if (iterator !== null && typeof iterator === "object" && typeof options2 === "undefined") { + options2 = iterator; + iterator = null; } - - let year = (yearDigit1 - 48) * 10 + (yearDigit2 - 48) // Convert ASCII codes to number - - // RFC 6265 states that the year is in the range 1970-2069. - // @see https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.1 - // - // 3. If the year-value is greater than or equal to 70 and less than or - // equal to 99, increment the year-value by 1900. - // 4. If the year-value is greater than or equal to 0 and less than or - // equal to 69, increment the year-value by 2000. - year += year < 70 ? 2000 : 1900 - - let hour = 0 - if (date[commaIndex + 12] === '0') { - const code = date.charCodeAt(commaIndex + 13) - if (code < 48 || code > 57) { - return undefined // Not a digit - } - hour = code - 48 // Convert ASCII code to number - } else { - const code1 = date.charCodeAt(commaIndex + 12) - if (code1 < 48 || code1 > 50) { - return undefined // Not a digit between 0 and 2 - } - const code2 = date.charCodeAt(commaIndex + 13) - if (code2 < 48 || code2 > 57) { - return undefined // Not a digit - } - if (code1 === 50 && code2 > 51) { - return undefined // Hour cannot be greater than 23 - } - hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number + var documents = loadDocuments(input, options2); + if (typeof iterator !== "function") { + return documents; } - - let minute = 0 - if (date[commaIndex + 15] === '0') { - const code = date.charCodeAt(commaIndex + 16) - if (code < 48 || code > 57) { - return undefined // Not a digit - } - minute = code - 48 // Convert ASCII code to number - } else { - const code1 = date.charCodeAt(commaIndex + 15) - if (code1 < 48 || code1 > 53) { - return undefined // Not a digit between 0 and 5 - } - const code2 = date.charCodeAt(commaIndex + 16) - if (code2 < 48 || code2 > 57) { - return undefined // Not a digit - } - minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); } - - let second = 0 - if (date[commaIndex + 18] === '0') { - const code = date.charCodeAt(commaIndex + 19) - if (code < 48 || code > 57) { - return undefined // Not a digit - } - second = code - 48 // Convert ASCII code to number - } else { - const code1 = date.charCodeAt(commaIndex + 18) - if (code1 < 48 || code1 > 53) { - return undefined // Not a digit between 0 and 5 +} +function load$1(input, options2) { + var documents = loadDocuments(input, options2); + if (documents.length === 0) { + return void 0; + } else if (documents.length === 1) { + return documents[0]; + } + throw new exception("expected a single document in the stream, but found more"); +} +function compileStyleMap(schema2, map2) { + var result, keys, index, length, tag, style, type2; + if (map2 === null) return {}; + result = {}; + keys = Object.keys(map2); + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map2[tag]); + if (tag.slice(0, 2) === "!!") { + tag = "tag:yaml.org,2002:" + tag.slice(2); } - const code2 = date.charCodeAt(commaIndex + 19) - if (code2 < 48 || code2 > 57) { - return undefined // Not a digit + type2 = schema2.compiledTypeMap["fallback"][tag]; + if (type2 && _hasOwnProperty.call(type2.styleAliases, style)) { + style = type2.styleAliases[style]; } - second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number + result[tag] = style; } - - const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second)) - return result.getUTCDay() === weekday ? result : undefined -} - -module.exports = { - parseHttpDate + return result; } - - -/***/ }), - -/***/ 21489: -/***/ ((module) => { - -"use strict"; - - -/** - * @template {*} T - * @typedef {Object} DeferredPromise - * @property {Promise} promise - * @property {(value?: T) => void} resolve - * @property {(reason?: any) => void} reject - */ - -/** - * @template {*} T - * @returns {DeferredPromise} An object containing a promise and its resolve/reject methods. - */ -function createDeferredPromise () { - let res - let rej - const promise = new Promise((resolve, reject) => { - res = resolve - rej = reject - }) - - return { promise, resolve: res, reject: rej } +function encodeHex(character) { + var string, handle, length; + 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 exception("code point within a string may not be greater than 0xFFFFFFFF"); + } + return "\\" + handle + common.repeat("0", length - string.length) + string; +} +function State(options2) { + this.schema = options2["schema"] || _default; + this.indent = Math.max(1, options2["indent"] || 2); + this.noArrayIndent = options2["noArrayIndent"] || false; + this.skipInvalid = options2["skipInvalid"] || false; + this.flowLevel = common.isNothing(options2["flowLevel"]) ? -1 : options2["flowLevel"]; + this.styleMap = compileStyleMap(this.schema, options2["styles"] || null); + this.sortKeys = options2["sortKeys"] || false; + this.lineWidth = options2["lineWidth"] || 80; + this.noRefs = options2["noRefs"] || false; + this.noCompatMode = options2["noCompatMode"] || false; + this.condenseFlow = options2["condenseFlow"] || false; + this.quotingType = options2["quotingType"] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; + this.forceQuotes = options2["forceQuotes"] || false; + this.replacer = typeof options2["replacer"] === "function" ? options2["replacer"] : null; + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + this.tag = null; + this.result = ""; + this.duplicates = []; + this.usedDuplicates = null; } - -module.exports = { - createDeferredPromise +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; } - - -/***/ }), - -/***/ 15072: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/** @typedef {`node:${string}`} NodeModuleName */ - -/** @type {Record any>} */ -const lazyLoaders = { - __proto__: null, - 'node:crypto': () => __nccwpck_require__(6005), - 'node:sqlite': () => __nccwpck_require__(55467), - 'node:worker_threads': () => __nccwpck_require__(24086), - 'node:zlib': () => __nccwpck_require__(65628) +function generateNextLine(state, level) { + return "\n" + common.repeat(" ", state.indent * level); } - -/** - * @param {NodeModuleName} moduleName - * @returns {boolean} - */ -function detectRuntimeFeatureByNodeModule (moduleName) { - try { - lazyLoaders[moduleName]() - return true - } catch (err) { - if (err.code !== 'ERR_UNKNOWN_BUILTIN_MODULE' && err.code !== 'ERR_NO_CRYPTO') { - throw err +function testImplicitResolving(state, str2) { + var index, length, type2; + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type2 = state.implicitTypes[index]; + if (type2.resolve(str2)) { + return true; } - return false } + return false; } - -/** - * @param {NodeModuleName} moduleName - * @param {string} property - * @returns {boolean} - */ -function detectRuntimeFeatureByExportedProperty (moduleName, property) { - const module = lazyLoaders[moduleName]() - return typeof module[property] !== 'undefined' +function isWhitespace(c2) { + return c2 === CHAR_SPACE || c2 === CHAR_TAB; } - -const runtimeFeaturesByExportedProperty = /** @type {const} */ (['markAsUncloneable', 'zstd']) - -/** @type {Record} */ -const exportedPropertyLookup = { - markAsUncloneable: ['node:worker_threads', 'markAsUncloneable'], - zstd: ['node:zlib', 'createZstdDecompress'] +function isPrintable(c2) { + return 32 <= c2 && c2 <= 126 || 161 <= c2 && c2 <= 55295 && c2 !== 8232 && c2 !== 8233 || 57344 <= c2 && c2 <= 65533 && c2 !== CHAR_BOM || 65536 <= c2 && c2 <= 1114111; } - -/** @typedef {typeof runtimeFeaturesByExportedProperty[number]} RuntimeFeatureByExportedProperty */ - -const runtimeFeaturesAsNodeModule = /** @type {const} */ (['crypto', 'sqlite']) -/** @typedef {typeof runtimeFeaturesAsNodeModule[number]} RuntimeFeatureByNodeModule */ - -const features = /** @type {const} */ ([ - ...runtimeFeaturesAsNodeModule, - ...runtimeFeaturesByExportedProperty -]) - -/** @typedef {typeof features[number]} Feature */ - -/** - * @param {Feature} feature - * @returns {boolean} - */ -function detectRuntimeFeature (feature) { - if (runtimeFeaturesAsNodeModule.includes(/** @type {RuntimeFeatureByNodeModule} */ (feature))) { - return detectRuntimeFeatureByNodeModule(`node:${feature}`) - } else if (runtimeFeaturesByExportedProperty.includes(/** @type {RuntimeFeatureByExportedProperty} */ (feature))) { - const [moduleName, property] = exportedPropertyLookup[feature] - return detectRuntimeFeatureByExportedProperty(moduleName, property) - } - throw new TypeError(`unknown feature: ${feature}`) +function isNsCharOrWhitespace(c2) { + return isPrintable(c2) && c2 !== CHAR_BOM && c2 !== CHAR_CARRIAGE_RETURN && c2 !== CHAR_LINE_FEED; } - -/** - * @class - * @name RuntimeFeatures - */ -class RuntimeFeatures { - /** @type {Map} */ - #map = new Map() - - /** - * Clears all cached feature detections. - */ - clear () { - this.#map.clear() - } - - /** - * @param {Feature} feature - * @returns {boolean} - */ - has (feature) { - return ( - this.#map.get(feature) ?? this.#detectRuntimeFeature(feature) - ) - } - - /** - * @param {Feature} feature - * @param {boolean} value - */ - set (feature, value) { - if (features.includes(feature) === false) { - throw new TypeError(`unknown feature: ${feature}`) - } - this.#map.set(feature, value) - } - - /** - * @param {Feature} feature - * @returns {boolean} - */ - #detectRuntimeFeature (feature) { - const result = detectRuntimeFeature(feature) - this.#map.set(feature, result) - return result - } +function isPlainSafe(c2, prev, inblock) { + var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c2); + var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c2); + return ( + // ns-plain-safe + (inblock ? ( + // c = flow-in + cIsNsCharOrWhitespace + ) : cIsNsCharOrWhitespace && c2 !== CHAR_COMMA && c2 !== CHAR_LEFT_SQUARE_BRACKET && c2 !== CHAR_RIGHT_SQUARE_BRACKET && c2 !== CHAR_LEFT_CURLY_BRACKET && c2 !== CHAR_RIGHT_CURLY_BRACKET) && c2 !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c2 === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar + ); } - -const instance = new RuntimeFeatures() - -module.exports.runtimeFeatures = instance -module.exports["default"] = instance - - -/***/ }), - -/***/ 97181: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - kConnected, - kPending, - kRunning, - kSize, - kFree, - kQueued -} = __nccwpck_require__(72785) - -class ClientStats { - constructor (client) { - this.connected = client[kConnected] - this.pending = client[kPending] - this.running = client[kRunning] - this.size = client[kSize] - } +function isPlainSafeFirst(c2) { + return isPrintable(c2) && c2 !== CHAR_BOM && !isWhitespace(c2) && c2 !== CHAR_MINUS && c2 !== CHAR_QUESTION && c2 !== CHAR_COLON && c2 !== CHAR_COMMA && c2 !== CHAR_LEFT_SQUARE_BRACKET && c2 !== CHAR_RIGHT_SQUARE_BRACKET && c2 !== CHAR_LEFT_CURLY_BRACKET && c2 !== CHAR_RIGHT_CURLY_BRACKET && c2 !== CHAR_SHARP && c2 !== CHAR_AMPERSAND && c2 !== CHAR_ASTERISK && c2 !== CHAR_EXCLAMATION && c2 !== CHAR_VERTICAL_LINE && c2 !== CHAR_EQUALS && c2 !== CHAR_GREATER_THAN && c2 !== CHAR_SINGLE_QUOTE && c2 !== CHAR_DOUBLE_QUOTE && c2 !== CHAR_PERCENT && c2 !== CHAR_COMMERCIAL_AT && c2 !== CHAR_GRAVE_ACCENT; } - -class PoolStats { - constructor (pool) { - this.connected = pool[kConnected] - this.free = pool[kFree] - this.pending = pool[kPending] - this.queued = pool[kQueued] - this.running = pool[kRunning] - this.size = pool[kSize] - } +function isPlainSafeLast(c2) { + return !isWhitespace(c2) && c2 !== CHAR_COLON; } - -module.exports = { ClientStats, PoolStats } - - -/***/ }), - -/***/ 85194: -/***/ ((module) => { - -"use strict"; - - -/** - * 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 +function codePointAt(string, pos) { + var first = string.charCodeAt(pos), 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; } } - - // 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 and the Timer has the refresh()- - // method available, call it to refresh the timer. - // Some timer objects returned by setTimeout may not have a .refresh() - // method (e.g. mocked timers in tests). - if (fastNowTimeout?.refresh) { - fastNowTimeout.refresh() - // fastNowTimeout is not instantiated yet or refresh is not availabe, - // 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. When using fake timers or mocked - // environments (like Jest), .unref() may not be defined, - 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 - } + return first; } - -/** - * 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 +function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); } - - -/***/ }), - -/***/ 31028: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(98061) - -const { kConstruct } = __nccwpck_require__(72785) -const { urlEquals, getFieldValues } = __nccwpck_require__(38531) -const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(83983) -const { webidl } = __nccwpck_require__(81040) -const { cloneResponse, fromInnerResponse, getResponseState } = __nccwpck_require__(12583) -const { Request, fromInnerRequest, getRequestState } = __nccwpck_require__(20610) -const { fetching } = __nccwpck_require__(85170) -const { urlIsHttpHttpsScheme, readAllBytes } = __nccwpck_require__(1310) -const { createDeferredPromise } = __nccwpck_require__(21489) - -/** - * @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() +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) { + var i2; + var char = 0; + var prevChar = null; + var hasLineBreak = false; + var hasFoldableLine = false; + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; + var plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1)); + if (singleLineOnly || forceQuotes) { + for (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { + char = codePointAt(string, i2); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; } - - webidl.util.markAsUncloneable(this) - this.#relevantRequestResponseList = arguments[1] + } else { + for (i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { + char = codePointAt(string, i2); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || // Foldable line = too long, and not more-indented. + i2 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; + previousLineBreak = i2; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i2 - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "); } - - async match (request, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.match' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request) - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - const p = this.#internalMatchAll(request, options, 1) - - if (p.length === 0) { - return + if (!hasLineBreak && !hasFoldableLine) { + if (plain && !forceQuotes && !testAmbiguousType(string)) { + return STYLE_PLAIN; } - - return p[0] + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; } - - async matchAll (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.matchAll' - if (request !== undefined) request = webidl.converters.RequestInfo(request) - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - return this.#internalMatchAll(request, options) + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; } - - async add (request) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.add' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request) - - // 1. - const requests = [request] - - // 2. - const responseArrayPromise = this.addAll(requests) - - // 3. - return await responseArrayPromise + if (!forceQuotes) { + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; } - - 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 = getRequestState(request) - - // 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.' - }) - } + 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 ? '""' : "''"; } - - // 4. - /** @type {ReturnType[]} */ - const fetchControllers = [] - - // 5. - for (const request of requests) { - // 5.1 - const r = getRequestState(new Request(request)) - - // 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) + if (!state.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + 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(string2) { + return testImplicitResolving(state, string2); + } + 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) + '"'; + default: + throw new exception("impossible error: invalid scalar style"); } - - // 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 + })(); +} +function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ""; + 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"; +} +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 match2; + while (match2 = lineRe.exec(string)) { + var prefix = match2[1], line = match2[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 match2; + var start = 0, end, curr = 0, next = 0; + var result = ""; + while (match2 = breakRe.exec(line)) { + next = match2.index; + if (next - start > width) { + end = curr > start ? curr : next; + result += "\n" + line.slice(start, end); + start = end + 1; } - - // 7.5 - const cacheJobPromise = createDeferredPromise() - - // 7.6.1 - let errorData = null - - // 7.6.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e + 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 = 0; + var escapeSeq; + for (var i2 = 0; i2 < string.length; char >= 65536 ? i2 += 2 : i2++) { + char = codePointAt(string, i2); + escapeSeq = ESCAPE_SEQUENCES[char]; + if (!escapeSeq && isPrintable(char)) { + result += string[i2]; + if (char >= 65536) result += string[i2 + 1]; + } else { + result += escapeSeq || encodeHex(char); } - - // 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) - response = webidl.converters.Response(response, prefix, 'response') - - // 1. - let innerRequest = null - - // 2. - if (webidl.is.Request(request)) { - innerRequest = getRequestState(request) - } else { // 3. - innerRequest = getRequestState(new Request(request)) + return result; +} +function writeFlowSequence(state, level, object) { + var _result = "", _tag = state.tag, index, length, value; + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + if (state.replacer) { + value = state.replacer.call(object, String(index), value); } - - // 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' - }) + if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) { + if (_result !== "") _result += "," + (!state.condenseFlow ? " " : ""); + _result += state.dump; } - - // 5. - const innerResponse = getResponseState(response) - - // 6. - if (innerResponse.status === 206) { - throw webidl.errors.exception({ - header: prefix, - message: 'Got 206 status' - }) + } + state.tag = _tag; + state.dump = "[" + _result + "]"; +} +function writeBlockSequence(state, level, object, compact) { + var _result = "", _tag = state.tag, index, length, value; + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + if (state.replacer) { + value = state.replacer.call(object, String(index), value); } - - // 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' - }) - } + 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; } - - // 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, 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. + } + 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 (_result !== "") pairBuffer += ", "; + if (state.condenseFlow) pairBuffer += '"'; + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); } - - // 17. - operations.push(operation) - - // 19. - const bytes = await bodyReadPromise.promise - - if (clonedResponse.body != null) { - clonedResponse.body.source = bytes + if (!writeNode(state, level, objectKey, false, false)) { + continue; } - - // 19.1 - const cacheJobPromise = createDeferredPromise() - - // 19.2.1 - let errorData = null - - // 19.2.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e + if (state.dump.length > 1024) pairBuffer += "? "; + pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " "); + if (!writeNode(state, level, objectValue, false, false)) { + continue; } - - // 19.2.3 - queueMicrotask(() => { - // 19.2.3.1 - if (errorData === null) { - cacheJobPromise.resolve() - } else { // 19.2.3.2 - cacheJobPromise.reject(errorData) - } - }) - - return cacheJobPromise.promise + pairBuffer += state.dump; + _result += pairBuffer; } - - async delete (request, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request) - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - /** - * @type {Request} - */ - let r = null - - if (webidl.is.Request(request)) { - r = getRequestState(request) - - if (r.method !== 'GET' && !options.ignoreMethod) { - return false - } - } else { - assert(typeof request === 'string') - - r = getRequestState(new Request(request)) + 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 exception("sortKeys must be a boolean or a function"); + } + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (!compact || _result !== "") { + pairBuffer += generateNextLine(state, level); } - - /** @type {CacheBatchOperation[]} */ - const operations = [] - - /** @type {CacheBatchOperation} */ - const operation = { - type: 'delete', - request: r, - options + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); } - - operations.push(operation) - - const cacheJobPromise = createDeferredPromise() - - let errorData = null - let requestResponses - - try { - requestResponses = this.#batchCacheOperations(operations) - } catch (e) { - errorData = e + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; } - - queueMicrotask(() => { - if (errorData === null) { - cacheJobPromise.resolve(!!requestResponses?.length) + 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 { - 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) - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - // 1. - let r = null - - // 2. - if (request !== undefined) { - // 2.1 - if (webidl.is.Request(request)) { - // 2.1.1 - r = getRequestState(request) - - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { // 2.2 - r = getRequestState(new Request(request)) + pairBuffer += "? "; } } - - // 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]) - } + pairBuffer += state.dump; + if (explicitPair) { + pairBuffer += generateNextLine(state, level); } - - // 5.4 - queueMicrotask(() => { - // 5.4.1 - const requestList = [] - - // 5.4.2 - for (const request of requests) { - const requestObject = fromInnerRequest( - request, - undefined, - new AbortController().signal, - 'immutable' - ) - // 5.4.2.1 - requestList.push(requestObject) - } - - // 5.4.3 - promise.resolve(Object.freeze(requestList)) - }) - - return promise.promise + 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; } - - /** - * @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') + state.tag = _tag; + state.dump = _result || "{}"; +} +function detectType(state, object, explicit) { + var _result, typeList, index, length, type2, style; + typeList = explicit ? state.explicitTypes : state.implicitTypes; + for (index = 0, length = typeList.length; index < length; index += 1) { + type2 = typeList[index]; + if ((type2.instanceOf || type2.predicate) && (!type2.instanceOf || typeof object === "object" && object instanceof type2.instanceOf) && (!type2.predicate || type2.predicate(object))) { + if (explicit) { + if (type2.multi && type2.representName) { + state.tag = type2.representName(object); + } else { + state.tag = type2.tag; } - - // 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]) + } else { + state.tag = "?"; + } + if (type2.represent) { + style = state.styleMap[type2.tag] || type2.defaultStyle; + if (_toString.call(type2.represent) === "[object Function]") { + _result = type2.represent(object, style); + } else if (_hasOwnProperty.call(type2.represent, style)) { + _result = type2.represent[style](object, style); + } else { + throw new exception("!<" + type2.tag + '> tag resolver accepts not "' + style + '" style'); } - - // 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) + state.dump = _result; } + return true; } - - 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 + 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); } - - #internalMatchAll (request, options, maxResponses = Infinity) { - // 1. - let r = null - - // 2. - if (request !== undefined) { - if (webidl.is.Request(request)) { - // 2.1.1 - r = getRequestState(request) - - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] + var type2 = _toString.call(state.dump); + var inblock = block; + var tagStr; + if (block) { + block = state.flowLevel < 0 || state.flowLevel > level; + } + var objectOrArray = type2 === "[object Object]" || type2 === "[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 (type2 === "[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 (typeof request === 'string') { - // 2.2.1 - r = getRequestState(new Request(request)) } - } - - // 5. - // 5.1 - const responses = [] - - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - responses.push(requestResponse[1]) + } else if (type2 === "[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 { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) - - // 5.3.2 - for (const requestResponse of requestResponses) { - responses.push(requestResponse[1]) + } else if (type2 === "[object String]") { + if (state.tag !== "?") { + writeScalar(state, state.dump, level, iskey, inblock); } + } else if (type2 === "[object Undefined]") { + return false; + } else { + if (state.skipInvalid) return false; + throw new exception("unacceptable kind of an object to dump " + type2); } - - // 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(cloneResponse(response), 'immutable') - - responseList.push(responseObject) - - if (responseList.length >= maxResponses) { - break + if (state.tag !== null && state.tag !== "?") { + 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; } - - // 6. - return Object.freeze(responseList) } + return true; } - -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( - webidl.is.Response, - 'Response' -) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.RequestInfo -) - -module.exports = { - Cache -} - - -/***/ }), - -/***/ 76847: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { Cache } = __nccwpck_require__(31028) -const { webidl } = __nccwpck_require__(81040) -const { kEnumerableProperty } = __nccwpck_require__(83983) -const { kConstruct } = __nccwpck_require__(72785) - -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 -} - - -/***/ }), - -/***/ 38531: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(98061) -const { URLSerializer } = __nccwpck_require__(17704) -const { isValidHeaderName } = __nccwpck_require__(1310) - -/** - * @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 -} - - -/***/ }), - -/***/ 7762: -/***/ ((module) => { - -"use strict"; - - -// 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 -} - - -/***/ }), - -/***/ 42193: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { parseSetCookie } = __nccwpck_require__(13903) -const { stringify } = __nccwpck_require__(54806) -const { webidl } = __nccwpck_require__(81040) -const { Headers } = __nccwpck_require__(52991) - -const brandChecks = webidl.brandCheckMultiple([Headers, globalThis.Headers].filter(Boolean)) - -/** - * @typedef {Object} Cookie - * @property {string} name - * @property {string} value - * @property {Date|number} [expires] - * @property {number} [maxAge] - * @property {string} [domain] - * @property {string} [path] - * @property {boolean} [secure] - * @property {boolean} [httpOnly] - * @property {'Strict'|'Lax'|'None'} [sameSite] - * @property {string[]} [unparsed] - */ - -/** - * @param {Headers} headers - * @returns {Record} - */ -function getCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, 'getCookies') - - brandChecks(headers) - - const cookie = headers.get('cookie') - - /** @type {Record} */ - 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) { - brandChecks(headers) - - 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') - - brandChecks(headers) - - const cookies = headers.getSetCookie() - - if (!cookies) { - return [] +function dump$1(input, options2) { + options2 = options2 || {}; + var state = new State(options2); + if (!state.noRefs) getDuplicateReferences(input, state); + var value = input; + if (state.replacer) { + value = state.replacer.call({ "": value }, "", value); } - - return cookies.map((pair) => parseSetCookie(pair)) + if (writeNode(state, 0, value, true, true)) return state.dump + "\n"; + return ""; } - -/** - * Parses a cookie string - * @param {string} cookie - */ -function parseCookie (cookie) { - cookie = webidl.converters.DOMString(cookie) - - return parseSetCookie(cookie) +function renamed(from, to2) { + return function() { + throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to2 + " instead, which is now safe by default."); + }; } - -/** - * @param {Headers} headers - * @param {Cookie} cookie - * @returns {void} - */ -function setCookie (headers, cookie) { - webidl.argumentLengthCheck(arguments, 2, 'setCookie') - - brandChecks(headers) - - cookie = webidl.converters.Cookie(cookie) - - const str = stringify(cookie) - - if (str) { - headers.append('set-cookie', str, true) +var isNothing_1, isObject_1, toArray_1, repeat_1, isNegativeZero_1, extend_1, common, exception, snippet, TYPE_CONSTRUCTOR_OPTIONS, YAML_NODE_KINDS, type, schema, str, seq, map, failsafe, _null, bool, int, YAML_FLOAT_PATTERN, SCIENTIFIC_WITHOUT_DOT, float, json, core2, YAML_DATE_REGEXP, YAML_TIMESTAMP_REGEXP, timestamp, merge, BASE64_MAP, binary, _hasOwnProperty$3, _toString$2, omap, _toString$1, pairs, _hasOwnProperty$2, set, _default, _hasOwnProperty$1, CONTEXT_FLOW_IN, CONTEXT_FLOW_OUT, CONTEXT_BLOCK_IN, CONTEXT_BLOCK_OUT, CHOMPING_CLIP, CHOMPING_STRIP, CHOMPING_KEEP, PATTERN_NON_PRINTABLE, PATTERN_NON_ASCII_LINE_BREAKS, PATTERN_FLOW_INDICATORS, PATTERN_TAG_HANDLE, PATTERN_TAG_URI, simpleEscapeCheck, simpleEscapeMap, i2, directiveHandlers, loadAll_1, load_1, loader, _toString, _hasOwnProperty, CHAR_BOM, CHAR_TAB, CHAR_LINE_FEED, CHAR_CARRIAGE_RETURN, CHAR_SPACE, CHAR_EXCLAMATION, CHAR_DOUBLE_QUOTE, CHAR_SHARP, CHAR_PERCENT, CHAR_AMPERSAND, CHAR_SINGLE_QUOTE, CHAR_ASTERISK, CHAR_COMMA, CHAR_MINUS, CHAR_COLON, CHAR_EQUALS, CHAR_GREATER_THAN, CHAR_QUESTION, CHAR_COMMERCIAL_AT, CHAR_LEFT_SQUARE_BRACKET, CHAR_RIGHT_SQUARE_BRACKET, CHAR_GRAVE_ACCENT, CHAR_LEFT_CURLY_BRACKET, CHAR_VERTICAL_LINE, CHAR_RIGHT_CURLY_BRACKET, ESCAPE_SEQUENCES, DEPRECATED_BOOLEANS_SYNTAX, DEPRECATED_BASE60_SYNTAX, QUOTING_TYPE_SINGLE, QUOTING_TYPE_DOUBLE, STYLE_PLAIN, STYLE_SINGLE, STYLE_LITERAL, STYLE_FOLDED, STYLE_DOUBLE, dump_1, dumper, JSON_SCHEMA, load, loadAll, dump, types, safeLoad, safeLoadAll, safeDump; +var init_js_yaml = __esm({ + "node_modules/js-yaml/dist/js-yaml.mjs"() { + isNothing_1 = isNothing; + isObject_1 = isObject; + toArray_1 = toArray; + repeat_1 = repeat; + isNegativeZero_1 = isNegativeZero; + extend_1 = extend; + common = { + isNothing: isNothing_1, + isObject: isObject_1, + toArray: toArray_1, + repeat: repeat_1, + isNegativeZero: isNegativeZero_1, + extend: extend_1 + }; + YAMLException$1.prototype = Object.create(Error.prototype); + YAMLException$1.prototype.constructor = YAMLException$1; + YAMLException$1.prototype.toString = function toString(compact) { + return this.name + ": " + formatError(this, compact); + }; + exception = YAMLException$1; + snippet = makeSnippet; + TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" + ]; + YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + type = Type$1; + Schema$1.prototype.extend = function extend2(definition) { + var implicit = []; + var 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 exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); + } + implicit.forEach(function(type$1) { + if (!(type$1 instanceof type)) { + throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + if (type$1.loadKind && type$1.loadKind !== "scalar") { + throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + } + if (type$1.multi) { + throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); + } + }); + explicit.forEach(function(type$1) { + if (!(type$1 instanceof type)) { + throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + }); + var result = Object.create(Schema$1.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; + }; + schema = Schema$1; + str = new type("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return data !== null ? data : ""; + } + }); + seq = new type("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return data !== null ? data : []; + } + }); + map = new type("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return data !== null ? data : {}; + } + }); + failsafe = new schema({ + explicit: [ + str, + seq, + map + ] + }); + _null = 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" + }); + bool = 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" + }); + int = 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); + }, + /* 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"] + } + }); + YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" + ); + SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + float = new type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); + json = failsafe.extend({ + implicit: [ + _null, + bool, + int, + float + ] + }); + core2 = json; + YAML_DATE_REGEXP = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" + ); + YAML_TIMESTAMP_REGEXP = 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]))?))?$" + ); + timestamp = new type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); + merge = new type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); + BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + binary = new type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); + _hasOwnProperty$3 = Object.prototype.hasOwnProperty; + _toString$2 = Object.prototype.toString; + omap = new type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); + _toString$1 = Object.prototype.toString; + pairs = new type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); + _hasOwnProperty$2 = Object.prototype.hasOwnProperty; + set = new type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); + _default = core2.extend({ + implicit: [ + timestamp, + merge + ], + explicit: [ + binary, + omap, + pairs, + set + ] + }); + _hasOwnProperty$1 = Object.prototype.hasOwnProperty; + CONTEXT_FLOW_IN = 1; + CONTEXT_FLOW_OUT = 2; + CONTEXT_BLOCK_IN = 3; + CONTEXT_BLOCK_OUT = 4; + CHOMPING_CLIP = 1; + CHOMPING_STRIP = 2; + CHOMPING_KEEP = 3; + PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; + PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; + PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + simpleEscapeCheck = new Array(256); + simpleEscapeMap = new Array(256); + for (i2 = 0; i2 < 256; i2++) { + simpleEscapeCheck[i2] = simpleEscapeSequence(i2) ? 1 : 0; + simpleEscapeMap[i2] = simpleEscapeSequence(i2); + } + directiveHandlers = { + YAML: function handleYamlDirective(state, name, args) { + var match2, major, minor; + if (state.version !== null) { + throwError(state, "duplication of %YAML directive"); + } + if (args.length !== 1) { + throwError(state, "YAML directive accepts exactly one argument"); + } + match2 = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match2 === null) { + throwError(state, "ill-formed argument of the YAML directive"); + } + major = parseInt(match2[1], 10); + minor = parseInt(match2[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$1.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; + } + }; + loadAll_1 = loadAll$1; + load_1 = load$1; + loader = { + loadAll: loadAll_1, + load: load_1 + }; + _toString = Object.prototype.toString; + _hasOwnProperty = Object.prototype.hasOwnProperty; + CHAR_BOM = 65279; + CHAR_TAB = 9; + CHAR_LINE_FEED = 10; + CHAR_CARRIAGE_RETURN = 13; + CHAR_SPACE = 32; + CHAR_EXCLAMATION = 33; + CHAR_DOUBLE_QUOTE = 34; + CHAR_SHARP = 35; + CHAR_PERCENT = 37; + CHAR_AMPERSAND = 38; + CHAR_SINGLE_QUOTE = 39; + CHAR_ASTERISK = 42; + CHAR_COMMA = 44; + CHAR_MINUS = 45; + CHAR_COLON = 58; + CHAR_EQUALS = 61; + CHAR_GREATER_THAN = 62; + CHAR_QUESTION = 63; + CHAR_COMMERCIAL_AT = 64; + CHAR_LEFT_SQUARE_BRACKET = 91; + CHAR_RIGHT_SQUARE_BRACKET = 93; + CHAR_GRAVE_ACCENT = 96; + CHAR_LEFT_CURLY_BRACKET = 123; + CHAR_VERTICAL_LINE = 124; + CHAR_RIGHT_CURLY_BRACKET = 125; + 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"; + DEPRECATED_BOOLEANS_SYNTAX = [ + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" + ]; + DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; + QUOTING_TYPE_SINGLE = 1; + QUOTING_TYPE_DOUBLE = 2; + STYLE_PLAIN = 1; + STYLE_SINGLE = 2; + STYLE_LITERAL = 3; + STYLE_FOLDED = 4; + STYLE_DOUBLE = 5; + dump_1 = dump$1; + dumper = { + dump: dump_1 + }; + JSON_SCHEMA = json; + load = loader.load; + loadAll = loader.loadAll; + dump = dumper.dump; + types = { + binary, + float, + map, + null: _null, + pairs, + set, + timestamp, + bool, + int, + merge, + omap, + seq, + str + }; + safeLoad = renamed("safeLoad", "load"); + safeLoadAll = renamed("safeLoadAll", "loadAll"); + safeDump = renamed("safeDump", "dump"); } -} - -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: () => [] - } -]) - -module.exports = { - getCookies, - deleteCookie, - getSetCookies, - setCookie, - parseCookie -} - - -/***/ }), - -/***/ 13903: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { collectASequenceOfCodePointsFast } = __nccwpck_require__(93082) -const { maxNameValuePairSize, maxAttributeValueSize } = __nccwpck_require__(7762) -const { isCTLExcludingHtab } = __nccwpck_require__(54806) -const assert = __nccwpck_require__(98061) -const { unescape: qsUnescape } = __nccwpck_require__(39630) +}); -/** - * @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 {import('./index').Cookie|null} 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 +// node_modules/@redocly/openapi-core/lib/js-yaml/index.js +var DEFAULT_SCHEMA_WITHOUT_TIMESTAMP, parseYaml, stringifyYaml; +var init_js_yaml2 = __esm({ + "node_modules/@redocly/openapi-core/lib/js-yaml/index.js"() { + init_js_yaml(); + DEFAULT_SCHEMA_WITHOUT_TIMESTAMP = JSON_SCHEMA.extend({ + implicit: [types.merge], + explicit: [types.binary, types.omap, types.pairs, types.set] + }); + parseYaml = (str2, opts) => load(str2, { schema: DEFAULT_SCHEMA_WITHOUT_TIMESTAMP, ...opts }); + stringifyYaml = (obj, opts) => dump(obj, opts); } +}); - 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 +// node_modules/@redocly/openapi-core/lib/config/constants.js +var CONFIG_FILE_NAME, DEFAULT_CONFIG, IGNORE_FILE, IGNORE_BANNER, CONFIG_BUNDLER_VISITOR_ID, PLUGINS_COLLECTOR_VISITOR_ID, DEFAULT_PROJECT_PLUGIN_PATHS; +var init_constants = __esm({ + "node_modules/@redocly/openapi-core/lib/config/constants.js"() { + CONFIG_FILE_NAME = "redocly.yaml"; + DEFAULT_CONFIG = { extends: ["recommended"] }; + IGNORE_FILE = ".redocly.lint-ignore.yaml"; + IGNORE_BANNER = `# This file instructs Redocly's linter to ignore the rules contained for specific parts of your API. +# See https://redocly.com/docs/cli/ for more information. +`; + CONFIG_BUNDLER_VISITOR_ID = "configBundler"; + PLUGINS_COLLECTOR_VISITOR_ID = "pluginsCollector"; + DEFAULT_PROJECT_PLUGIN_PATHS = [ + "@theme/plugin.js", + "@theme/plugin.cjs", + "@theme/plugin.mjs" + ]; } +}); - // 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. - // https://datatracker.ietf.org/doc/html/rfc6265 - // To maximize compatibility with user agents, servers that wish to - // store arbitrary data in a cookie-value SHOULD encode that data, for - // example, using Base64 [RFC4648]. +// node_modules/@redocly/openapi-core/lib/config/get-resolve-config.js +function getResolveConfig(resolve8) { return { - name, value: qsUnescape(value), ...parseUnparsedAttributes(unparsedAttributes) - } + http: { + headers: resolve8?.http?.headers ?? [], + customFetch: void 0 + } + }; } - -/** - * 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 = '' +var init_get_resolve_config = __esm({ + "node_modules/@redocly/openapi-core/lib/config/get-resolve-config.js"() { } +}); - // 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' +// node_modules/@redocly/openapi-core/lib/utils/get-intersection-length.js +function getIntersectionLength(keys, properties) { + const props = new Set(properties); + let count = 0; + for (const key of keys) { + if (props.has(key)) { + count++; } - - // 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 + return count; } - - -/***/ }), - -/***/ 54806: -/***/ ((module) => { - -"use strict"; - - -/** - * @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 - } +var init_get_intersection_length = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/get-intersection-length.js"() { } - 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') +// node_modules/@redocly/openapi-core/lib/utils/is-ordered.js +function isOrdered(value, options2) { + const direction = options2.direction || options2; + const property = options2.property; + for (let i2 = 1; i2 < value.length; i2++) { + let currValue = value[i2]; + let prevVal = value[i2 - 1]; + if (property) { + const currPropValue = value[i2][property]; + const prevPropValue = value[i2 - 1][property]; + if (!currPropValue || !prevPropValue) { + return false; + } + currValue = currPropValue; + prevVal = prevPropValue; } - } -} - -/** - 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') + if (typeof currValue === "string" && typeof prevVal === "string") { + currValue = currValue.toLowerCase(); + prevVal = prevVal.toLowerCase(); } - } -} - -/** - * 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') + const result = direction === "asc" ? currValue >= prevVal : currValue <= prevVal; + if (!result) { + return false; } } + return true; } - -/** - * 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}`) +var init_is_ordered = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/is-ordered.js"() { } +}); - if (cookie.domain) { - validateCookieDomain(cookie.domain) - out.push(`Domain=${cookie.domain}`) +// node_modules/@redocly/openapi-core/lib/rules/common/assertions/asserts.js +function buildAssertCustomFunction(fn) { + return (value, options2, ctx) => fn.call(null, value, options2, ctx); +} +var runOnKeysSet, runOnValuesSet, asserts; +var init_asserts = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/assertions/asserts.js"() { + init_get_intersection_length(); + init_is_ordered(); + init_is_plain_object(); + init_is_string(); + init_is_truthy(); + init_regex_from_string(); + runOnKeysSet = /* @__PURE__ */ new Set([ + "mutuallyExclusive", + "mutuallyRequired", + "enum", + "pattern", + "notPattern", + "minLength", + "maxLength", + "casing", + "sortOrder", + "disallowed", + "required", + "requireAny", + "ref", + "const", + "defined" + // In case if `property` for assertions is not added + ]); + runOnValuesSet = /* @__PURE__ */ new Set([ + "pattern", + "notPattern", + "enum", + "defined", + "nonEmpty", + "minLength", + "maxLength", + "casing", + "sortOrder", + "ref", + "const", + "contains" + ]); + asserts = { + pattern: (value, condition, { baseLocation, rawValue }) => { + if (typeof value === "undefined" || isPlainObject(value)) + return []; + const values = Array.isArray(value) ? value : [value]; + const regex = regexFromString(condition); + return values.map((_val) => !regex?.test(_val) && { + message: `"${_val}" should match a regex ${condition}`, + location: isString(value) ? baseLocation : isPlainObject(rawValue) ? baseLocation.child(_val).key() : baseLocation.key() + }).filter(isTruthy); + }, + notPattern: (value, condition, { baseLocation, rawValue }) => { + if (typeof value === "undefined" || isPlainObject(value)) + return []; + const values = Array.isArray(value) ? value : [value]; + const regex = regexFromString(condition); + return values.map((_val) => regex?.test(_val) && { + message: `"${_val}" should not match a regex ${condition}`, + location: isString(value) ? baseLocation : isPlainObject(rawValue) ? baseLocation.child(_val).key() : baseLocation.key() + }).filter(isTruthy); + }, + enum: (value, condition, { baseLocation }) => { + if (typeof value === "undefined" || isPlainObject(value)) + return []; + const values = Array.isArray(value) ? value : [value]; + return values.map((_val) => !condition.includes(_val) && { + message: `"${_val}" should be one of the predefined values`, + location: isString(value) ? baseLocation : baseLocation.child(_val).key() + }).filter(isTruthy); + }, + defined: (value, condition = true, { baseLocation }) => { + const isDefined2 = typeof value !== "undefined"; + const isValid = condition ? isDefined2 : !isDefined2; + return isValid ? [] : [ + { + message: condition ? `Should be defined` : "Should be not defined", + location: baseLocation + } + ]; + }, + required: (value, keys, { baseLocation }) => { + return keys.map((requiredKey) => !value.includes(requiredKey) && { + message: `${requiredKey} is required`, + location: baseLocation.key() + }).filter(isTruthy); + }, + contains: (value, words, { baseLocation }) => { + if (typeof value === "undefined" || isPlainObject(value)) + return []; + const list = Array.isArray(value) ? value : [value]; + return words.map((word) => !list.includes(word) && { + message: `${word} should be in the list`, + location: baseLocation + }).filter(isTruthy); + }, + disallowed: (value, condition, { baseLocation }) => { + if (typeof value === "undefined" || isPlainObject(value)) + return []; + const values = Array.isArray(value) ? value : [value]; + return values.map((_val) => condition.includes(_val) && { + message: `"${_val}" is disallowed`, + location: isString(value) ? baseLocation : baseLocation.child(_val).key() + }).filter(isTruthy); + }, + const: (value, condition, { baseLocation }) => { + if (typeof value === "undefined") + return []; + if (Array.isArray(value)) { + return value.map((_val) => condition !== _val && { + message: `"${_val}" should be equal ${condition} `, + location: isString(value) ? baseLocation : baseLocation.child(_val).key() + }).filter(isTruthy); + } else { + return value !== condition ? [ + { + message: `${value} should be equal ${condition}`, + location: baseLocation + } + ] : []; + } + }, + nonEmpty: (value, condition = true, { baseLocation }) => { + const isEmpty = typeof value === "undefined" || value === null || value === "" || Array.isArray(value) && value.length === 0; + const isValid = condition ? !isEmpty : isEmpty; + return isValid ? [] : [ + { + message: condition ? `Should not be empty` : "Should be empty", + location: baseLocation + } + ]; + }, + minLength: (value, condition, { baseLocation }) => { + if (typeof value === "undefined" || value.length >= condition) + return []; + return [ + { + message: `Should have at least ${condition} characters`, + location: baseLocation + } + ]; + }, + maxLength: (value, condition, { baseLocation }) => { + if (typeof value === "undefined" || value.length <= condition) + return []; + return [ + { + message: `Should have at most ${condition} characters`, + location: baseLocation + } + ]; + }, + casing: (value, condition, { baseLocation }) => { + if (typeof value === "undefined" || isPlainObject(value)) + return []; + const values = Array.isArray(value) ? value : [value]; + const casingRegexes = { + camelCase: /^[a-z][a-zA-Z0-9]*$/g, + "kebab-case": /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/g, + snake_case: /^([a-z][a-z0-9]*)(_[a-z0-9]+)*$/g, + PascalCase: /^[A-Z][a-zA-Z0-9]+$/g, + MACRO_CASE: /^([A-Z][A-Z0-9]*)(_[A-Z0-9]+)*$/g, + "COBOL-CASE": /^([A-Z][A-Z0-9]*)(-[A-Z0-9]+)*$/g, + flatcase: /^[a-z][a-z0-9]+$/g + }; + return values.map((_val) => !_val.match(casingRegexes[condition]) && { + message: `"${_val}" should use ${condition}`, + location: isString(value) ? baseLocation : baseLocation.child(_val).key() + }).filter(isTruthy); + }, + sortOrder: (value, condition, { baseLocation }) => { + const direction = condition.direction || condition; + const property = condition.property; + if (Array.isArray(value) && value.length > 0 && isPlainObject(value[0]) && !property) { + return [ + { + message: `Please define a property to sort objects by`, + location: baseLocation + } + ]; + } + if (typeof value === "undefined" || isOrdered(value, condition)) + return []; + return [ + { + message: `Should be sorted in ${direction === "asc" ? "an ascending" : "a descending"} order${property ? ` by property ${property}` : ""}`, + location: baseLocation + } + ]; + }, + mutuallyExclusive: (value, condition, { baseLocation }) => { + if (getIntersectionLength(value, condition) < 2) + return []; + return [ + { + message: `${condition.join(", ")} keys should be mutually exclusive`, + location: baseLocation.key() + } + ]; + }, + mutuallyRequired: (value, condition, { baseLocation }) => { + const isValid = getIntersectionLength(value, condition) > 0 ? getIntersectionLength(value, condition) === condition.length : true; + return isValid ? [] : [ + { + message: `Properties ${condition.join(", ")} are mutually required`, + location: baseLocation.key() + } + ]; + }, + requireAny: (value, condition, { baseLocation }) => { + return getIntersectionLength(value, condition) >= 1 ? [] : [ + { + message: `Should have any of ${condition.join(", ")}`, + location: baseLocation.key() + } + ]; + }, + ref: (_value, condition, { baseLocation, rawValue }) => { + if (typeof rawValue === "undefined") + return []; + const hasRef2 = rawValue.hasOwnProperty("$ref"); + if (typeof condition === "boolean") { + const isValid2 = condition ? hasRef2 : !hasRef2; + return isValid2 ? [] : [ + { + message: condition ? `should use $ref` : "should not use $ref", + location: hasRef2 ? baseLocation : baseLocation.key() + } + ]; + } + const regex = regexFromString(condition); + const isValid = hasRef2 && regex?.test(rawValue["$ref"]); + return isValid ? [] : [ + { + message: `$ref value should match ${condition}`, + location: hasRef2 ? baseLocation : baseLocation.key() + } + ]; + } + }; } +}); - if (cookie.path) { - validateCookiePath(cookie.path) - out.push(`Path=${cookie.path}`) +// node_modules/@redocly/openapi-core/lib/config/group-assertion-rules.js +function groupAssertionRules(config, plugins) { + if (!config.rules) { + return {}; } - - if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') { - out.push(`Expires=${toIMFDate(cookie.expires)}`) + const transformedRules = {}; + const assertions = []; + for (const [ruleKey, rule] of Object.entries(config.rules)) { + if (ruleKey.startsWith("rule/") && isPlainObject(rule)) { + const assertion = rule; + if (plugins) { + registerCustomAssertions(plugins, assertion); + for (const context2 of assertion.where || []) { + registerCustomAssertions(plugins, context2); + } + } + assertions.push({ + ...assertion, + assertionId: ruleKey + }); + } else { + transformedRules[ruleKey] = rule; + } } - - if (cookie.sameSite) { - out.push(`SameSite=${cookie.sameSite}`) + if (assertions.length > 0) { + transformedRules.assertions = assertions; } - - for (const part of cookie.unparsed) { - if (!part.includes('=')) { - throw new Error('Invalid unparsed') + return transformedRules; +} +function registerCustomAssertions(plugins, assertion) { + for (const field of Object.keys(assertion.assertions || {})) { + const [pluginId, fn] = field.split("/"); + if (!pluginId || !fn) + continue; + const plugin = plugins.find((plugin2) => plugin2.id === pluginId); + if (!plugin) { + throw Error(`Plugin ${pluginId} isn't found.`); } - - const [key, ...value] = part.split('=') - - out.push(`${key.trim()}=${value.join('=')}`) + if (!plugin.assertions || !plugin.assertions[fn]) { + throw Error(`Plugin ${pluginId} doesn't export assertions function with name ${fn}.`); + } + asserts[field] = buildAssertCustomFunction(plugin.assertions[fn]); } - - return out.join('; ') -} - -module.exports = { - isCTLExcludingHtab, - validateCookieName, - validateCookiePath, - validateCookieValue, - toIMFDate, - stringify } +var init_group_assertion_rules = __esm({ + "node_modules/@redocly/openapi-core/lib/config/group-assertion-rules.js"() { + init_asserts(); + init_is_plain_object(); + } +}); - -/***/ }), - -/***/ 24185: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const { Transform } = __nccwpck_require__(84492) -const { isASCIINumber, isValidLastEventId } = __nccwpck_require__(8865) - -/** - * @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 - - /** - * Leading byte-order-mark check. - * @type {boolean} - */ - checkBOM = true - - /** - * @type {boolean} - */ - crlfCheck = false - - /** - * @type {boolean} - */ - eventEndCheck = false - - /** - * @type {Buffer|null} - */ - buffer = null - - pos = 0 - - event = { - data: undefined, - event: undefined, - id: undefined, - retry: undefined - } - - /** - * @param {object} options - * @param {boolean} [options.readableObjectMode] - * @param {eventSourceSettings} [options.eventSourceSettings] - * @param {(chunk: any, encoding?: BufferEncoding | undefined) => boolean} [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) +// node_modules/@redocly/openapi-core/lib/config/config.js +import * as fs2 from "node:fs"; +import * as path4 from "node:path"; +var Config; +var init_config = __esm({ + "node_modules/@redocly/openapi-core/lib/config/config.js"() { + init_detect_spec(); + init_js_yaml2(); + init_ref_utils(); + init_is_plain_object(); + init_slash(); + init_constants(); + init_get_resolve_config(); + init_group_assertion_rules(); + Config = class _Config { + resolvedConfig; + configPath; + document; + resolvedRefMap; + resolve; + _alias; + plugins; + ignore = {}; + doNotResolveExamples; + rules; + preprocessors; + decorators; + _usedRules = /* @__PURE__ */ new Set(); + _usedVersions = /* @__PURE__ */ new Set(); + constructor(resolvedConfig, opts = {}) { + this.resolvedConfig = resolvedConfig; + this.configPath = opts.configPath; + this.document = opts.document; + this.resolvedRefMap = opts.resolvedRefMap; + this.resolve = getResolveConfig(this.resolvedConfig.resolve); + this._alias = opts.alias; + this.plugins = opts.plugins || []; + this.doNotResolveExamples = !!resolvedConfig.resolve?.doNotResolveExamples; + const group = (rules8) => { + return groupAssertionRules({ rules: rules8 }, this.plugins); + }; + this.rules = { + oas2: group({ ...resolvedConfig.rules, ...resolvedConfig.oas2Rules }), + oas3_0: group({ ...resolvedConfig.rules, ...resolvedConfig.oas3_0Rules }), + oas3_1: group({ ...resolvedConfig.rules, ...resolvedConfig.oas3_1Rules }), + oas3_2: group({ ...resolvedConfig.rules, ...resolvedConfig.oas3_2Rules }), + async2: group({ ...resolvedConfig.rules, ...resolvedConfig.async2Rules }), + async3: group({ ...resolvedConfig.rules, ...resolvedConfig.async3Rules }), + arazzo1: group({ ...resolvedConfig.rules, ...resolvedConfig.arazzo1Rules }), + overlay1: group({ ...resolvedConfig.rules, ...resolvedConfig.overlay1Rules }), + openrpc1: group({ ...resolvedConfig.rules, ...resolvedConfig.openrpc1Rules }) + }; + this.preprocessors = { + oas2: { ...resolvedConfig.preprocessors, ...resolvedConfig.oas2Preprocessors }, + oas3_0: { + ...resolvedConfig.preprocessors, + ...resolvedConfig.oas3_0Preprocessors + }, + oas3_1: { + ...resolvedConfig.preprocessors, + ...resolvedConfig.oas3_1Preprocessors + }, + oas3_2: { + ...resolvedConfig.preprocessors, + ...resolvedConfig.oas3_2Preprocessors + }, + async2: { + ...resolvedConfig.preprocessors, + ...resolvedConfig.async2Preprocessors + }, + async3: { + ...resolvedConfig.preprocessors, + ...resolvedConfig.async3Preprocessors + }, + arazzo1: { + ...resolvedConfig.preprocessors, + ...resolvedConfig.arazzo1Preprocessors + }, + overlay1: { + ...resolvedConfig.preprocessors, + ...resolvedConfig.overlay1Preprocessors + }, + openrpc1: { + ...resolvedConfig.preprocessors, + ...resolvedConfig.openrpc1Preprocessors + } + }; + this.decorators = { + oas2: { ...resolvedConfig.decorators, ...resolvedConfig.oas2Decorators }, + oas3_0: { ...resolvedConfig.decorators, ...resolvedConfig.oas3_0Decorators }, + oas3_1: { ...resolvedConfig.decorators, ...resolvedConfig.oas3_1Decorators }, + oas3_2: { ...resolvedConfig.decorators, ...resolvedConfig.oas3_2Decorators }, + async2: { ...resolvedConfig.decorators, ...resolvedConfig.async2Decorators }, + async3: { ...resolvedConfig.decorators, ...resolvedConfig.async3Decorators }, + arazzo1: { ...resolvedConfig.decorators, ...resolvedConfig.arazzo1Decorators }, + overlay1: { + ...resolvedConfig.decorators, + ...resolvedConfig.overlay1Decorators + }, + openrpc1: { + ...resolvedConfig.decorators, + ...resolvedConfig.openrpc1Decorators + } + }; + this.ignore = opts.ignore ?? {}; + } + forAlias(alias) { + if (alias === void 0 || !isPlainObject(this.resolvedConfig?.apis?.[alias])) { + return this; + } + const { apis, ...rest } = this.resolvedConfig; + const { root: _root, output: _output, ...aliasConfig } = apis[alias]; + return new _Config({ ...rest, ...aliasConfig }, { + configPath: this.configPath, + document: this.document, + resolvedRefMap: this.resolvedRefMap, + alias, + plugins: this.plugins, + ignore: this.ignore + }); + } + clearIgnoreForRef(ref) { + const dir = this.configPath ? path4.dirname(this.configPath) : process.cwd(); + const absRef = isAbsoluteUrl(ref) ? ref : path4.resolve(dir, ref); + delete this.ignore[absRef]; + } + saveIgnore() { + const dir = this.configPath ? path4.dirname(this.configPath) : process.cwd(); + const ignoreFile = path4.join(dir, IGNORE_FILE); + const mapped = {}; + for (const absFileName of Object.keys(this.ignore)) { + const mappedDefinitionName = isAbsoluteUrl(absFileName) ? absFileName : slash(path4.relative(dir, absFileName)); + const ignoredRules = mapped[mappedDefinitionName] = this.ignore[absFileName]; + for (const ruleId of Object.keys(ignoredRules)) { + ignoredRules[ruleId] = Array.from(ignoredRules[ruleId]); + } + } + fs2.writeFileSync(ignoreFile, IGNORE_BANNER + stringifyYaml(mapped)); + } + addIgnore(problem) { + const ignore = this.ignore; + const loc = problem.location[0]; + if (loc.pointer === void 0) + return; + const fileIgnore = ignore[loc.source.absoluteRef] = ignore[loc.source.absoluteRef] || {}; + const ruleIgnore = fileIgnore[problem.ruleId] = fileIgnore[problem.ruleId] || /* @__PURE__ */ new Set(); + ruleIgnore.add(loc.pointer); + } + addProblemToIgnore(problem) { + const loc = problem.location[0]; + if (loc.pointer === void 0) + return problem; + const fileIgnore = this.ignore[loc.source.absoluteRef] || {}; + const ruleIgnore = fileIgnore[problem.ruleId]; + const ignored = ruleIgnore && ruleIgnore.has(loc.pointer); + return ignored ? { + ...problem, + ignored + } : problem; + } + extendTypes(types2, version2) { + let extendedTypes = types2; + for (const plugin of this.plugins) { + if (plugin.typeExtension !== void 0) { + switch (version2) { + case "oas3_0": + case "oas3_1": + case "oas3_2": + if (!plugin.typeExtension.oas3) + continue; + extendedTypes = plugin.typeExtension.oas3(extendedTypes, version2); + break; + case "oas2": + if (!plugin.typeExtension.oas2) + continue; + extendedTypes = plugin.typeExtension.oas2(extendedTypes, version2); + break; + case "async2": + if (!plugin.typeExtension.async2) + continue; + extendedTypes = plugin.typeExtension.async2(extendedTypes, version2); + break; + case "async3": + if (!plugin.typeExtension.async3) + continue; + extendedTypes = plugin.typeExtension.async3(extendedTypes, version2); + break; + case "arazzo1": + if (!plugin.typeExtension.arazzo1) + continue; + extendedTypes = plugin.typeExtension.arazzo1(extendedTypes, version2); + break; + case "overlay1": + if (!plugin.typeExtension.overlay1) + continue; + extendedTypes = plugin.typeExtension.overlay1(extendedTypes, version2); + break; + case "openrpc1": + if (!plugin.typeExtension.openrpc1) + continue; + extendedTypes = plugin.typeExtension.openrpc1(extendedTypes, version2); + break; + default: + throw new Error("Not implemented"); + } } - - // Set the checkBOM flag to false as we don't need to check for the - this.checkBOM = false - break + } + return extendedTypes; } - } - - 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 + getRuleSettings(ruleId, oasVersion) { + this._usedRules.add(ruleId); + this._usedVersions.add(oasVersion); + const settings = this.rules[oasVersion][ruleId] || "off"; + if (typeof settings === "string") { + return { + severity: settings + }; + } else { + return { severity: "error", ...settings }; } - - 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 !== undefined || 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 {EventSourceStreamEvent} 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 + } + getPreprocessorSettings(ruleId, oasVersion) { + this._usedRules.add(ruleId); + this._usedVersions.add(oasVersion); + const settings = this.preprocessors[oasVersion][ruleId] || "off"; + if (typeof settings === "string") { + return { + severity: settings === "on" ? "error" : settings + }; + } else { + return { severity: "error", ...settings }; + } + } + getDecoratorSettings(ruleId, oasVersion) { + this._usedRules.add(ruleId); + this._usedVersions.add(oasVersion); + const settings = this.decorators[oasVersion][ruleId] || "off"; + if (typeof settings === "string") { + return { + severity: settings === "on" ? "error" : settings + }; } else { - event[field] += `\n${value}` + return { severity: "error", ...settings }; } - break - case 'retry': - if (isASCIINumber(value)) { - event[field] = value + } + getUnusedRules() { + const rules8 = []; + const decorators8 = []; + const preprocessors8 = []; + for (const usedVersion of Array.from(this._usedVersions)) { + rules8.push(...Object.keys(this.rules[usedVersion]).filter((name) => !this._usedRules.has(name))); + decorators8.push(...Object.keys(this.decorators[usedVersion]).filter((name) => !this._usedRules.has(name))); + preprocessors8.push(...Object.keys(this.preprocessors[usedVersion]).filter((name) => !this._usedRules.has(name))); } - break - case 'id': - if (isValidLastEventId(value)) { - event[field] = value + return { + rules: rules8, + preprocessors: preprocessors8, + decorators: decorators8 + }; + } + // TODO: add default case for redocly.yaml + getRulesForSpecVersion(version2) { + switch (version2) { + case "oas3": + const oas3Rules = []; + this.plugins.forEach((p2) => p2.preprocessors?.oas3 && oas3Rules.push(p2.preprocessors.oas3)); + this.plugins.forEach((p2) => p2.rules?.oas3 && oas3Rules.push(p2.rules.oas3)); + this.plugins.forEach((p2) => p2.decorators?.oas3 && oas3Rules.push(p2.decorators.oas3)); + return oas3Rules; + case "oas2": + const oas2Rules = []; + this.plugins.forEach((p2) => p2.preprocessors?.oas2 && oas2Rules.push(p2.preprocessors.oas2)); + this.plugins.forEach((p2) => p2.rules?.oas2 && oas2Rules.push(p2.rules.oas2)); + this.plugins.forEach((p2) => p2.decorators?.oas2 && oas2Rules.push(p2.decorators.oas2)); + return oas2Rules; + case "async2": + const asyncApi2Rules = []; + this.plugins.forEach((p2) => p2.preprocessors?.async2 && asyncApi2Rules.push(p2.preprocessors.async2)); + this.plugins.forEach((p2) => p2.rules?.async2 && asyncApi2Rules.push(p2.rules.async2)); + this.plugins.forEach((p2) => p2.decorators?.async2 && asyncApi2Rules.push(p2.decorators.async2)); + return asyncApi2Rules; + case "async3": + const asyncApi3Rules = []; + this.plugins.forEach((p2) => p2.preprocessors?.async3 && asyncApi3Rules.push(p2.preprocessors.async3)); + this.plugins.forEach((p2) => p2.rules?.async3 && asyncApi3Rules.push(p2.rules.async3)); + this.plugins.forEach((p2) => p2.decorators?.async3 && asyncApi3Rules.push(p2.decorators.async3)); + return asyncApi3Rules; + case "arazzo1": + const arazzo1Rules = []; + this.plugins.forEach((p2) => p2.preprocessors?.arazzo1 && arazzo1Rules.push(p2.preprocessors.arazzo1)); + this.plugins.forEach((p2) => p2.rules?.arazzo1 && arazzo1Rules.push(p2.rules.arazzo1)); + this.plugins.forEach((p2) => p2.decorators?.arazzo1 && arazzo1Rules.push(p2.decorators.arazzo1)); + return arazzo1Rules; + case "overlay1": + const overlay1Rules = []; + this.plugins.forEach((p2) => p2.preprocessors?.overlay1 && overlay1Rules.push(p2.preprocessors.overlay1)); + this.plugins.forEach((p2) => p2.rules?.overlay1 && overlay1Rules.push(p2.rules.overlay1)); + this.plugins.forEach((p2) => p2.decorators?.overlay1 && overlay1Rules.push(p2.decorators.overlay1)); + return overlay1Rules; + case "openrpc1": + const openrpc1Rules = []; + this.plugins.forEach((p2) => p2.preprocessors?.openrpc1 && openrpc1Rules.push(p2.preprocessors.openrpc1)); + this.plugins.forEach((p2) => p2.rules?.openrpc1 && openrpc1Rules.push(p2.rules.openrpc1)); + this.plugins.forEach((p2) => p2.decorators?.openrpc1 && openrpc1Rules.push(p2.decorators.openrpc1)); + return openrpc1Rules; + } + } + skipRules(rules8) { + for (const ruleId of rules8 || []) { + for (const version2 of specVersions2) { + if (this.rules[version2][ruleId]) { + this.rules[version2][ruleId] = "off"; + } else if (Array.isArray(this.rules[version2].assertions)) { + for (const configurableRule of this.rules[version2].assertions) { + if (configurableRule.assertionId === ruleId) { + configurableRule.severity = "off"; + } + } + } + } } - break - case 'event': - if (value.length > 0) { - event[field] = value + } + skipPreprocessors(preprocessors8) { + for (const preprocessorId of preprocessors8 || []) { + for (const version2 of specVersions2) { + if (this.preprocessors[version2][preprocessorId]) { + this.preprocessors[version2][preprocessorId] = "off"; + } + } } - break - } - } - - /** - * @param {EventSourceStreamEvent} event - */ - processEvent (event) { - if (event.retry && isASCIINumber(event.retry)) { - this.state.reconnectionTime = parseInt(event.retry, 10) - } - - if (event.id !== undefined && 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 + } + skipDecorators(decorators8) { + for (const decoratorId of decorators8 || []) { + for (const version2 of specVersions2) { + if (this.decorators[version2][decoratorId]) { + this.decorators[version2][decoratorId] = "off"; + } + } } - }) - } + } + }; } +}); - clearEvent () { - this.event = { - data: undefined, - event: undefined, - id: undefined, - retry: undefined - } +// node_modules/@redocly/openapi-core/lib/config/types.js +var init_types2 = __esm({ + "node_modules/@redocly/openapi-core/lib/config/types.js"() { } -} +}); -module.exports = { - EventSourceStream +// node_modules/@redocly/openapi-core/lib/utils/is-defined.js +function isDefined(x3) { + return x3 !== void 0; } +var init_is_defined = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/is-defined.js"() { + } +}); - -/***/ }), - -/***/ 36127: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { pipeline } = __nccwpck_require__(84492) -const { fetching } = __nccwpck_require__(85170) -const { makeRequest } = __nccwpck_require__(20610) -const { webidl } = __nccwpck_require__(81040) -const { EventSourceStream } = __nccwpck_require__(24185) -const { parseMIMEType } = __nccwpck_require__(17704) -const { createFastMessageEvent } = __nccwpck_require__(55033) -const { isNetworkError } = __nccwpck_require__(12583) -const { kEnumerableProperty } = __nccwpck_require__(83983) -const { environmentSettingsObject } = __nccwpck_require__(1310) - -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. - * @typedef ReadyState - * @type {0|1|2} - * @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 - #withCredentials = false - - /** - * @type {ReadyState} - */ - #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) - eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, 'eventSourceInitDict') - - this.#dispatcher = eventSourceInitDict.node.dispatcher || eventSourceInitDict.dispatcher - this.#state = { - lastEventId: '', - reconnectionTime: eventSourceInitDict.node.reconnectionTime - } - - // 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 === true) { - corsAttributeState = USE_CREDENTIALS - this.#withCredentials = true +// node_modules/@redocly/openapi-core/lib/config/rules.js +function initRules(rules8, config, type2, oasVersion) { + return rules8.flatMap((ruleset) => Object.keys(ruleset).map((ruleId) => { + const rule = ruleset[ruleId]; + const ruleSettings = type2 === "rules" ? config.getRuleSettings(ruleId, oasVersion) : type2 === "preprocessors" ? config.getPreprocessorSettings(ruleId, oasVersion) : config.getDecoratorSettings(ruleId, oasVersion); + if (ruleSettings.severity === "off") { + return void 0; } - - // 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' + const severity = ruleSettings.severity; + const message = ruleSettings.message; + const visitors = rule(ruleSettings); + if (Array.isArray(visitors)) { + return visitors.map((visitor) => ({ + severity, + ruleId, + message, + visitor + })); } - - // 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() + return { + severity, + message, + ruleId, + visitor: visitors + // note: actually it is only one visitor object + }; + })).flatMap((visitor) => visitor).filter(isDefined); +} +var init_rules = __esm({ + "node_modules/@redocly/openapi-core/lib/config/rules.js"() { + init_is_defined(); } +}); - /** - * Returns the state of this EventSource object's connection. It can have the - * values described below. - * @returns {ReadyState} - * @readonly - */ - get readyState () { - return this.#readyState +// node_modules/@redocly/openapi-core/lib/decorators/arazzo/index.js +var decorators; +var init_arazzo3 = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/arazzo/index.js"() { + decorators = {}; } +}); - /** - * Returns the URL providing the event stream. - * @readonly - * @returns {string} - */ - get url () { - return this.#url +// node_modules/@redocly/openapi-core/lib/decorators/async2/index.js +var decorators2; +var init_async2 = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/async2/index.js"() { + decorators2 = {}; } +}); - /** - * 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 +// node_modules/@redocly/openapi-core/lib/decorators/async3/index.js +var decorators3; +var init_async3 = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/async3/index.js"() { + decorators3 = {}; } +}); - #connect () { - if (this.#readyState === CLOSED) return - - this.#readyState = CONNECTING - - const fetchParams = { - request: this.#request, - dispatcher: this.#dispatcher - } +// node_modules/@redocly/openapi-core/lib/utils/is-empty-array.js +function isEmptyArray(value) { + return Array.isArray(value) && value.length === 0; +} +var init_is_empty_array = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/is-empty-array.js"() { + } +}); - // 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)) { - return this.#reconnect() +// node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-helper.js +function filter(node, ctx, criteria) { + const { parent, key } = ctx; + let didDelete = false; + if (Array.isArray(node)) { + for (let i2 = 0; i2 < node.length; i2++) { + if (isRef(node[i2])) { + const resolved = ctx.resolve(node[i2]); + if (criteria(resolved.node)) { + node.splice(i2, 1); + didDelete = true; + i2--; + } + } + if (criteria(node[i2])) { + node.splice(i2, 1); + didDelete = true; + i2--; } } - - // 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 + } else if (isPlainObject(node)) { + for (const key2 of Object.keys(node)) { + if (isRef(node[key2])) { + const resolved = ctx.resolve(node[key2]); + if (criteria(resolved.node)) { + delete node[key2]; + didDelete = true; } } - - // 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 + if (criteria(node[key2])) { + delete node[key2]; + didDelete = true; } - - // 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 {void} - */ - #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. - setTimeout(() => { - // 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() - }, this.#state.reconnectionTime)?.unref() } - - /** - * 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) - } - - const listener = webidl.converters.EventHandlerNonNull(fn) - - if (listener !== null) { - this.addEventListener('open', listener) - this.#events.open = fn - } else { - this.#events.open = null - } + if (didDelete && (isEmptyObject(node) || isEmptyArray(node))) { + delete parent[key]; } - - get onmessage () { - return this.#events.message +} +function checkIfMatchByStrategy(nodeValue, decoratorValue, strategy) { + if (nodeValue === void 0 || decoratorValue === void 0) { + return false; } - - set onmessage (fn) { - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) - } - - const listener = webidl.converters.EventHandlerNonNull(fn) - - if (listener !== null) { - this.addEventListener('message', listener) - this.#events.message = fn - } else { - this.#events.message = null - } + if (!Array.isArray(decoratorValue) && !Array.isArray(nodeValue)) { + return nodeValue === decoratorValue; } - - get onerror () { - return this.#events.error + decoratorValue = toArrayIfNeeded(decoratorValue); + nodeValue = toArrayIfNeeded(nodeValue); + if (strategy === "any") { + return decoratorValue.some((item) => nodeValue.includes(item)); } - - set onerror (fn) { - if (this.#events.error) { - this.removeEventListener('error', this.#events.error) - } - - const listener = webidl.converters.EventHandlerNonNull(fn) - - if (listener !== null) { - this.addEventListener('error', listener) - this.#events.error = fn - } else { - this.#events.error = null - } + if (strategy === "all") { + return decoratorValue.every((item) => nodeValue.includes(item)); } + return false; } - -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 - } +function toArrayIfNeeded(value) { + return Array.isArray(value) ? value : [value]; } - -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 - }, - { - key: 'node', // undici only - converter: webidl.dictionaryConverter([ - { - key: 'reconnectionTime', - converter: webidl.converters['unsigned long'], - defaultValue: () => defaultReconnectionTime - }, - { - key: 'dispatcher', - converter: webidl.converters.any - } - ]), - defaultValue: () => ({}) +var init_filter_helper = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-helper.js"() { + init_ref_utils(); + init_is_empty_array(); + init_is_empty_object(); + init_is_plain_object(); } -]) - -module.exports = { - EventSource, - defaultReconnectionTime -} - - -/***/ }), - -/***/ 8865: -/***/ ((module) => { - -"use strict"; - - -/** - * 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 -} - -module.exports = { - isValidLastEventId, - isASCIINumber -} - +}); -/***/ }), - -/***/ 36682: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const util = __nccwpck_require__(83983) -const { - ReadableStreamFrom, - readableStreamClose, - fullyReadBody, - extractMimeType -} = __nccwpck_require__(1310) -const { FormData, setFormDataState } = __nccwpck_require__(73162) -const { webidl } = __nccwpck_require__(81040) -const assert = __nccwpck_require__(98061) -const { isErrored, isDisturbed } = __nccwpck_require__(84492) -const { isUint8Array } = __nccwpck_require__(93746) -const { serializeAMimeType } = __nccwpck_require__(17704) -const { multipartFormDataParser } = __nccwpck_require__(87991) -const { createDeferredPromise } = __nccwpck_require__(21489) -const { parseJSONFromBytes } = __nccwpck_require__(93082) -const { utf8DecodeBytes } = __nccwpck_require__(98806) -const { runtimeFeatures } = __nccwpck_require__(15072) - -const random = runtimeFeatures.has('crypto') - ? (__nccwpck_require__(6005).randomInt) - : (max) => Math.floor(Math.random() * max) - -const textEncoder = new TextEncoder() -function noop () {} - -const 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) - } -}) - -/** - * Extract a body with type from a byte sequence or BodyInit object - * - * @param {import('../../../types').BodyInit} object - The BodyInit object to extract from - * @param {boolean} [keepalive=false] - If true, indicates that the body - * @returns {[{stream: ReadableStream, source: any, length: number | null}, string | null]} - Returns a tuple containing the body and its type - * - * @see https://fetch.spec.whatwg.org/#concept-bodyinit-extract - */ -function extractBody (object, keepalive = false) { - // 1. Let stream be null. - let stream = null - let controller = null - - // 2. If object is a ReadableStream object, then set stream to object. - if (webidl.is.ReadableStream(object)) { - stream = object - } else if (webidl.is.Blob(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({ - pull () {}, - start (c) { - controller = c - }, - cancel () {}, - type: 'bytes' - }) - } - - // 5. Assert: stream is a ReadableStream object. - assert(webidl.is.ReadableStream(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 (webidl.is.URLSearchParams(object)) { - // 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 (webidl.is.BufferSource(object)) { - // Set source to a copy of the bytes held by object. - source = webidl.util.getCopyOfBytesHeldByBufferSource(object) - } else if (webidl.is.FormData(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 formdataEscape = (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="${formdataEscape(normalizeLinefeeds(name))}"` + - `\r\n\r\n${normalizeLinefeeds(value)}\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - } else { - const chunk = textEncoder.encode(`${prefix}; name="${formdataEscape(normalizeLinefeeds(name))}"` + - (value.name ? `; filename="${formdataEscape(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 +// node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-in.js +var DEFAULT_STRATEGY, FilterIn; +var init_filter_in = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-in.js"() { + init_ref_utils(); + init_is_plain_object(); + init_filter_helper(); + DEFAULT_STRATEGY = "any"; + FilterIn = ({ property, value, matchStrategy, applyTo: target }) => { + const strategy = matchStrategy || DEFAULT_STRATEGY; + if (target !== void 0) { + if (target === "Operation") { + const httpMethods2 = [ + "get", + "post", + "put", + "delete", + "patch", + "options", + "head", + "trace", + "query" + ]; + return { + PathItem: { + enter(pathItem, ctx) { + for (const method of httpMethods2) { + const operation = isRef(pathItem[method]) ? ctx.resolve(pathItem[method]).node : pathItem[method]; + if (isPlainObject(operation)) { + const propertyValue = operation[property]; + const shouldKeep = checkIfMatchByStrategy(propertyValue, value, strategy); + if (!shouldKeep) { + delete pathItem[method]; + } + } + } + const hasOperations = httpMethods2.some((method) => pathItem[method]) || pathItem.additionalOperations; + if (!hasOperations) { + delete ctx.parent[ctx.key]; + } + } + } + }; + } + if (target === "PathItem") { + return { + PathItem: { + enter(pathItem, ctx) { + const propertyValue = pathItem[property]; + const shouldKeep = checkIfMatchByStrategy(propertyValue, value, strategy); + if (!shouldKeep) { + delete ctx.parent[ctx.key]; + } + } + } + }; } + throw new Error(`The 'target' option must be 'Operation' or 'PathItem' when provided.`); } - } - - // 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 + const filterInCriteria = (item) => item?.[property] && !checkIfMatchByStrategy(item?.[property], value, strategy); + return { + any: { + enter: (node, ctx) => { + filter(node, ctx, filterInCriteria); + } + } + }; + }; + } +}); - action = async function * () { - for (const part of blobParts) { - if (part.stream) { - yield * part.stream() - } else { - yield part +// node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-out.js +var DEFAULT_STRATEGY2, FilterOut; +var init_filter_out = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-out.js"() { + init_ref_utils(); + init_is_plain_object(); + init_filter_helper(); + DEFAULT_STRATEGY2 = "any"; + FilterOut = ({ property, value, matchStrategy, applyTo: target }) => { + const strategy = matchStrategy || DEFAULT_STRATEGY2; + if (target !== void 0) { + if (target === "Operation") { + const httpMethods2 = [ + "get", + "post", + "put", + "delete", + "patch", + "options", + "head", + "trace", + "query" + ]; + return { + PathItem: { + enter(pathItem, ctx) { + for (const method of httpMethods2) { + const operation = isRef(pathItem[method]) ? ctx.resolve(pathItem[method]).node : pathItem[method]; + if (isPlainObject(operation)) { + const propertyValue = operation[property]; + const shouldRemove = checkIfMatchByStrategy(propertyValue, value, strategy); + if (shouldRemove) { + delete pathItem[method]; + } + } + } + const hasOperations = httpMethods2.some((method) => pathItem[method]) || pathItem.additionalOperations; + if (!hasOperations) { + delete ctx.parent[ctx.key]; + } + } + } + }; + } + if (target === "PathItem") { + return { + PathItem: { + enter(pathItem, ctx) { + const propertyValue = pathItem[property]; + const shouldRemove = checkIfMatchByStrategy(propertyValue, value, strategy); + if (shouldRemove) { + delete ctx.parent[ctx.key]; + } + } + } + }; } + throw new Error(`The 'target' option must be 'Operation' or 'PathItem' when provided.`); } - } - - // 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 (webidl.is.Blob(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' - ) - } + const filterOutCriteria = (item) => checkIfMatchByStrategy(item?.[property], value, strategy); + return { + any: { + enter: (node, ctx) => { + filter(node, ctx, filterOutCriteria); + } + } + }; + }; + } +}); - stream = - webidl.is.ReadableStream(object) ? object : ReadableStreamFrom(object) +// node_modules/@redocly/openapi-core/lib/utils/yaml-fs-helper.js +import * as fs3 from "node:fs"; +import * as path5 from "node:path"; +function yamlAndJsonSyncReader(filePath) { + const content = fs3.readFileSync(filePath, "utf-8"); + return parseYaml(content); +} +function resolveRelativePath(filePath, base) { + if (isAbsoluteUrl(filePath) || base === void 0) { + return filePath; + } + return path5.resolve(path5.dirname(base), filePath); +} +function readFileAsStringSync(filePath) { + return fs3.readFileSync(filePath, "utf-8"); +} +var init_yaml_fs_helper = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/yaml-fs-helper.js"() { + init_js_yaml2(); + init_ref_utils(); + init_js_yaml2(); } +}); - // 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' || isUint8Array(source)) { - action = () => { - length = typeof source === 'string' ? Buffer.byteLength(source) : source.length - return source - } +// node_modules/@redocly/openapi-core/lib/decorators/common/info-description-override.js +var InfoDescriptionOverride; +var init_info_description_override = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/common/info-description-override.js"() { + init_yaml_fs_helper(); + InfoDescriptionOverride = ({ filePath }) => { + return { + Info: { + leave(info, { report, location, config }) { + if (!filePath) + throw new Error(`Parameter "filePath" is not provided for "info-description-override" rule`); + try { + info.description = readFileAsStringSync(resolveRelativePath(filePath, config?.configPath)); + } catch (e2) { + report({ + message: `Failed to read markdown override file for "info.description". +${e2.message}`, + location: location.child("description") + }); + } + } + } + }; + }; } +}); - // 12. If action is non-null, then run these steps in parallel: - if (action != null) { - ;(async () => { - // 1. Run action. - const result = action() - - // 2. Whenever one or more bytes are available and stream is not errored, - // enqueue the result of creating a Uint8Array from the available bytes into stream. - const iterator = result?.[Symbol.asyncIterator]?.() - if (iterator) { - for await (const bytes of iterator) { - if (isErrored(stream)) break - if (bytes.length) { - controller.enqueue(new Uint8Array(bytes)) +// node_modules/@redocly/openapi-core/lib/decorators/common/info-override.js +var InfoOverride; +var init_info_override = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/common/info-override.js"() { + init_is_plain_object(); + InfoOverride = (newInfo) => { + return { + Info: { + leave(info) { + if (!isPlainObject(newInfo)) { + throw new Error(`"info-override" decorator should be called with an object`); + } + const { severity: _5, ...rest } = newInfo; + Object.assign(info, rest); } } - } else if (result?.length && !isErrored(stream)) { - controller.enqueue(typeof result === 'string' ? textEncoder.encode(result) : new Uint8Array(result)) - } - - // 3. When running action is done, close stream. - queueMicrotask(() => readableStreamClose(controller)) - })() + }; + }; } +}); - // 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] -} - -/** - * @typedef {object} ExtractBodyResult - * @property {ReadableStream>} stream - The ReadableStream containing the body data - * @property {any} source - The original source of the body data - * @property {number | null} length - The length of the body data, or null - */ - -/** - * Safely extract a body with type from a byte sequence or BodyInit object. - * - * @param {import('../../../types').BodyInit} object - The BodyInit object to extract from - * @param {boolean} [keepalive=false] - If true, indicates that the body - * @returns {[ExtractBodyResult, string | null]} - Returns a tuple containing the body and its type - * - * @see 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 (webidl.is.ReadableStream(object)) { - // Assert: object is neither disturbed nor locked. - assert(!util.isDisturbed(object), 'The body has already been consumed.') - assert(!object.locked, 'The stream is locked.') - } - - // 2. Return the results of extracting object. - return extractBody(object, keepalive) -} - -function cloneBody (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 { 0: out1, 1: 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 +// node_modules/@redocly/openapi-core/lib/decorators/common/operation-description-override.js +var OperationDescriptionOverride; +var init_operation_description_override = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/common/operation-description-override.js"() { + init_yaml_fs_helper(); + OperationDescriptionOverride = ({ operationIds }) => { + return { + Operation: { + leave(operation, { report, location, config }) { + if (!operation.operationId) + return; + if (!operationIds) + throw new Error(`Parameter "operationIds" is not provided for "operation-description-override" rule`); + const operationId = operation.operationId; + if (operationIds[operationId]) { + try { + const filePath = operationIds[operationId]; + operation.description = readFileAsStringSync(resolveRelativePath(filePath, config?.configPath)); + } catch (e2) { + report({ + message: `Failed to read markdown override file for operation "${operationId}". +${e2.message}`, + location: location.child("operationId").key() + }); + } + } + } + } + }; + }; } -} - -function bodyMixinMethods (instance, getInternalState) { - 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(getInternalState(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, getInternalState) - }, - - 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, getInternalState) - }, - - 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, getInternalState) - }, - - 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, getInternalState) - }, - - 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(getInternalState(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] - // 2. If that fails for some reason, then throw a TypeError. - const parsed = multipartFormDataParser(value, mimeType) - - // 3. Return a new FormData object, appending each entry, - // resulting from the parsing operation, to its entry list. - const fd = new FormData() - setFormDataState(fd, parsed) +}); - return fd +// node_modules/@redocly/openapi-core/lib/decorators/common/remove-x-internal.js +var DEFAULT_INTERNAL_PROPERTY_NAME, RemoveXInternal; +var init_remove_x_internal = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/common/remove-x-internal.js"() { + init_ref_utils(); + init_is_empty_array(); + init_is_empty_object(); + init_is_plain_object(); + DEFAULT_INTERNAL_PROPERTY_NAME = "x-internal"; + RemoveXInternal = ({ internalFlagProperty = DEFAULT_INTERNAL_PROPERTY_NAME }) => { + function removeInternal(node, ctx, originalMapping2) { + const { parent, key } = ctx; + let didDelete = false; + if (Array.isArray(node)) { + for (let i2 = 0; i2 < node.length; i2++) { + if (isRef(node[i2])) { + const resolved = ctx.resolve(node[i2]); + if (resolved.node?.[internalFlagProperty]) { + if (isPlainObject(parent.discriminator?.mapping)) { + for (const mapping in parent.discriminator.mapping) { + if (originalMapping2?.[mapping] === node[i2].$ref) { + delete parent.discriminator.mapping[mapping]; + } + } + } + node.splice(i2, 1); + didDelete = true; + i2--; + } } - 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) + if (node[i2]?.[internalFlagProperty]) { + node.splice(i2, 1); + didDelete = true; + i2--; + } + } + } else if (isPlainObject(node)) { + for (const key2 of Object.keys(node)) { + if (isRef(node[key2])) { + const resolved = ctx.resolve(node[key2]); + if (isPlainObject(resolved.node) && resolved.node?.[internalFlagProperty]) { + delete node[key2]; + didDelete = true; } - - return fd + } + if (isPlainObject(node[key2]) && node[key2]?.[internalFlagProperty]) { + delete node[key2]; + didDelete = true; } } } - - // 3. Throw a TypeError. - throw new TypeError( - 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' - ) - }, instance, getInternalState) - }, - - 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, getInternalState) - } + if (didDelete && (isEmptyObject(node) || isEmptyArray(node))) { + delete parent[key]; + } + } + let originalMapping = {}; + return { + DiscriminatorMapping: { + enter: (mapping) => { + originalMapping = JSON.parse(JSON.stringify(mapping)); + } + }, + any: { + enter: (node, ctx) => { + removeInternal(node, ctx, originalMapping); + } + } + }; + }; } +}); - return methods -} - -function mixinBody (prototype, getInternalState) { - Object.assign(prototype.prototype, bodyMixinMethods(prototype, getInternalState)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-consume-body - * @param {any} object internal state - * @param {(value: unknown) => unknown} convertBytesToJSValue - * @param {any} instance - * @param {(target: any) => any} getInternalState - */ -function consumeBody (object, convertBytesToJSValue, instance, getInternalState) { - try { - webidl.brandCheck(object, instance) - } catch (e) { - return Promise.reject(e) +// node_modules/@redocly/openapi-core/lib/decorators/common/tag-description-override.js +var TagDescriptionOverride; +var init_tag_description_override = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/common/tag-description-override.js"() { + init_yaml_fs_helper(); + TagDescriptionOverride = ({ tagNames }) => { + return { + Tag: { + leave(tag, { report, config }) { + if (!tagNames) + throw new Error(`Parameter "tagNames" is not provided for "tag-description-override" rule`); + const filePath = tagNames[tag.name]; + if (filePath) { + try { + tag.description = readFileAsStringSync(resolveRelativePath(filePath, config?.configPath)); + } catch (e2) { + report({ + message: `Failed to read markdown override file for tag "${tag.name}". +${e2.message}` + }); + } + } + } + } + }; + }; } +}); - object = getInternalState(object) - - // 1. If object is unusable, then return a promise rejected - // with a TypeError. - if (bodyUnusable(object)) { - return Promise.reject(new TypeError('Body is unusable: Body has already been read')) +// node_modules/@redocly/openapi-core/lib/decorators/oas2/remove-unused-components.js +var OAS2_COMPONENT_TYPES, RemoveUnusedComponents; +var init_remove_unused_components = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/oas2/remove-unused-components.js"() { + init_ref_utils(); + init_is_empty_object(); + OAS2_COMPONENT_TYPES = [ + "definitions", + "parameters", + "responses", + "securityDefinitions" + ]; + RemoveUnusedComponents = () => { + const components = /* @__PURE__ */ new Map(); + function registerComponent(componentType, name) { + const key = `${componentType}/${name}`; + components.set(key, { + usedIn: components.get(key)?.usedIn ?? [], + componentType, + name + }); + } + function getComponentKey2(pointer) { + if (!pointer.startsWith("#/")) + return; + const [type2, name] = parseRef(pointer).pointer; + if (!type2 || !name) + return void 0; + if (!OAS2_COMPONENT_TYPES.includes(type2)) + return void 0; + return `${type2}/${name}`; + } + function removeUnusedComponents(root, removedKeys = /* @__PURE__ */ new Set()) { + const removedCountBefore = removedKeys.size; + for (const [key, { usedIn, name, componentType }] of components) { + const used = usedIn.some((sourceKey) => sourceKey !== key && !removedKeys.has(sourceKey)); + if (!used && componentType) { + removedKeys.add(key); + delete root[componentType][name]; + components.delete(key); + if (isEmptyObject(root[componentType])) { + delete root[componentType]; + } + } + } + return removedKeys.size > removedCountBefore ? removeUnusedComponents(root, removedKeys) : removedKeys.size; + } + return { + ref: { + leave(ref, { location, type: type2, key }) { + if (["Schema", "Parameter", "Response", "SecurityScheme"].includes(type2.name)) { + const targetPointer = getComponentKey2(ref.$ref); + if (!targetPointer) + return; + const sourcePointer = getComponentKey2(location.pointer) ?? location.pointer; + const registered = components.get(targetPointer); + if (registered) { + registered.usedIn.push(sourcePointer); + } else { + components.set(targetPointer, { + usedIn: [sourcePointer], + name: key.toString() + }); + } + } + } + }, + Root: { + leave(root, ctx) { + const data = ctx.getVisitorData(); + data.removedCount = removeUnusedComponents(root); + } + }, + NamedSchemas: { + Schema(schema2, { key }) { + if (!schema2.allOf) { + registerComponent("definitions", key.toString()); + } + } + }, + NamedParameters: { + Parameter(_parameter, { key }) { + registerComponent("parameters", key.toString()); + } + }, + NamedResponses: { + Response(_response, { key }) { + registerComponent("responses", key.toString()); + } + }, + NamedSecuritySchemes: { + SecurityScheme(_securityScheme, { key }) { + registerComponent("securityDefinitions", key.toString()); + } + } + }; + }; } +}); - // 2. Let promise be a new promise. - const promise = createDeferredPromise() - - // 3. Let errorSteps given error be to reject promise with error. - const errorSteps = promise.reject - - // 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) - } +// node_modules/@redocly/openapi-core/lib/decorators/oas2/index.js +var decorators4; +var init_oas22 = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/oas2/index.js"() { + init_filter_in(); + init_filter_out(); + init_info_description_override(); + init_info_override(); + init_operation_description_override(); + init_remove_x_internal(); + init_tag_description_override(); + init_remove_unused_components(); + decorators4 = { + "operation-description-override": OperationDescriptionOverride, + "tag-description-override": TagDescriptionOverride, + "info-description-override": InfoDescriptionOverride, + "info-override": InfoOverride, + "remove-x-internal": RemoveXInternal, + "filter-in": FilterIn, + "filter-out": FilterOut, + "remove-unused-components": RemoveUnusedComponents + }; } +}); - // 5. If object’s body is null, then run successSteps with an - // empty byte sequence. - if (object.body == null) { - successSteps(Buffer.allocUnsafe(0)) - return promise.promise +// node_modules/@redocly/openapi-core/lib/decorators/oas3/media-type-examples-override.js +function checkAndResolveRef(node, resolver) { + if (!isRef(node)) { + return node; } - - // 6. Otherwise, fully read object’s body given successSteps, - // errorSteps, and object’s relevant global object. - fullyReadBody(object.body, successSteps, errorSteps) - - // 7. Return promise. - return promise.promise -} - -/** - * @see https://fetch.spec.whatwg.org/#body-unusable - * @param {any} object internal state - */ -function bodyUnusable (object) { - const body = object.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)) + const resolved = resolver(node); + return resolved.error ? void 0 : JSON.parse(JSON.stringify(resolved.node)); } - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-mime-type - * @param {any} requestOrResponse internal state - */ -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.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 +var MediaTypeExamplesOverride; +var init_media_type_examples_override = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/oas3/media-type-examples-override.js"() { + init_ref_utils(); + init_yaml_fs_helper(); + MediaTypeExamplesOverride = ({ operationIds }) => { + return { + Operation: { + enter(operation, ctx) { + const operationId = operation.operationId; + if (!operationId) { + return; + } + const properties = operationIds[operationId]; + if (!properties) { + return; + } + if (properties.responses && operation.responses) { + for (const responseCode of Object.keys(properties.responses)) { + const resolvedResponse = checkAndResolveRef(operation.responses[responseCode], ctx.resolve); + if (!resolvedResponse) { + continue; + } + resolvedResponse.content = resolvedResponse.content ? resolvedResponse.content : {}; + Object.keys(properties.responses[responseCode]).forEach((mimeType) => { + const filePath = properties.responses[responseCode][mimeType]; + resolvedResponse.content[mimeType] = { + ...resolvedResponse.content[mimeType], + examples: yamlAndJsonSyncReader(resolveRelativePath(filePath, ctx.config?.configPath)) + }; + }); + operation.responses[responseCode] = resolvedResponse; + } + } + if (properties.request && operation.requestBody) { + const resolvedRequest = checkAndResolveRef(operation.requestBody, ctx.resolve); + if (!resolvedRequest) { + return; + } + resolvedRequest.content = resolvedRequest.content ? resolvedRequest.content : {}; + Object.keys(properties.request).forEach((mimeType) => { + const filePath = properties.request[mimeType]; + resolvedRequest.content[mimeType] = { + ...resolvedRequest.content[mimeType], + examples: yamlAndJsonSyncReader(resolveRelativePath(filePath, ctx.config?.configPath)) + }; + }); + operation.requestBody = resolvedRequest; + } + } + } + }; + }; } +}); - // 6. Return mimeType. - return mimeType -} - -module.exports = { - extractBody, - safelyExtractBody, - cloneBody, - mixinBody, - streamRegistry, - bodyUnusable -} - - -/***/ }), - -/***/ 68160: -/***/ ((module) => { - -"use strict"; - - -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-policy-header - */ -const referrerPolicyTokens = /** @type {const} */ ([ - 'no-referrer', - 'no-referrer-when-downgrade', - 'same-origin', - 'origin', - 'strict-origin', - 'origin-when-cross-origin', - 'strict-origin-when-cross-origin', - 'unsafe-url' -]) - -/** - * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies - */ -const referrerPolicy = /** @type {const} */ ([ - '', - ...referrerPolicyTokens -]) -const referrerPolicyTokensSet = new Set(referrerPolicyTokens) - -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, - referrerPolicyTokens: referrerPolicyTokensSet +// node_modules/@redocly/openapi-core/lib/utils/oas-has-component.js +function hasComponent(components, key) { + return key in components; } - - -/***/ }), - -/***/ 17704: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(98061) -const { forgivingBase64, collectASequenceOfCodePoints, collectASequenceOfCodePointsFast, isomorphicDecode, removeASCIIWhitespace, removeChars } = __nccwpck_require__(93082) - -const encoder = new TextEncoder() - -/** - * @see https://mimesniff.spec.whatwg.org/#http-token-code-point - */ -const HTTP_TOKEN_CODEPOINTS = /^[-!#$%&'*+.^_|~A-Za-z0-9]+$/u -const HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/u // 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]+$/u // 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' +var init_oas_has_component = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/oas-has-component.js"() { } +}); - // 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*)base64$/ui.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) +// node_modules/@redocly/openapi-core/lib/decorators/oas3/remove-unused-components.js +function getComponentKey(pointer) { + if (!pointer.startsWith("#/components/")) + return; + const [_component, type2, name] = parseRef(pointer).pointer; + if (!type2 || !name) + return; + return `${type2}/${name}`; +} +var RemoveUnusedComponents2; +var init_remove_unused_components2 = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/oas3/remove-unused-components.js"() { + init_ref_utils(); + init_is_empty_object(); + init_oas_has_component(); + RemoveUnusedComponents2 = () => { + const components = /* @__PURE__ */ new Map(); + function registerComponent(componentType, name, referencesDiscriminator = false) { + const key = `${componentType}/${name}`; + components.set(key, { + usedIn: components.get(key)?.usedIn ?? [], + componentType, + name, + referencesDiscriminator + }); + } + function removeUnusedComponents(root, removedKeys = /* @__PURE__ */ new Set()) { + const removedCountBefore = removedKeys.size; + for (const [key, { usedIn, name, componentType, referencesDiscriminator }] of components) { + const used = usedIn.some((sourceKey) => sourceKey !== key && !removedKeys.has(sourceKey)) || referencesDiscriminator; + if (!used && componentType && root.components && hasComponent(root.components, componentType)) { + removedKeys.add(key); + const componentChild = root.components[componentType]; + delete componentChild[name]; + components.delete(key); + if (isEmptyObject(componentChild)) { + delete root.components[componentType]; + } + } + } + return removedKeys.size > removedCountBefore ? removeUnusedComponents(root, removedKeys) : removedKeys.size; + } + return { + ref: { + leave(ref, { location, type: type2, key }) { + if ([ + "Schema", + "Header", + "Parameter", + "Response", + "Example", + "RequestBody", + "MediaTypesMap" + ].includes(type2.name)) { + const targetPointer = getComponentKey(ref.$ref); + if (!targetPointer) + return; + const sourcePointer = getComponentKey(location.pointer) ?? location.pointer; + const registered = components.get(targetPointer); + if (registered) { + registered.usedIn.push(sourcePointer); + } else { + components.set(targetPointer, { + usedIn: [sourcePointer], + name: key.toString() + }); + } + } + } + }, + Root: { + leave(root, ctx) { + const data = ctx.getVisitorData(); + data.removedCount = removeUnusedComponents(root); + if (isEmptyObject(root.components)) { + delete root.components; + } + } + }, + NamedSchemas: { + Schema(schema2, ctx) { + const referencesDiscriminator = schema2.allOf?.some((ref) => isRef(ref) && ctx.resolve(ref)?.node?.discriminator); + registerComponent("schemas", ctx.key.toString(), referencesDiscriminator); + } + }, + NamedParameters: { + Parameter(_parameter, { key }) { + registerComponent("parameters", key.toString()); + } + }, + NamedResponses: { + Response(_response, { key }) { + registerComponent("responses", key.toString()); + } + }, + NamedExamples: { + Example(_example, { key }) { + registerComponent("examples", key.toString()); + } + }, + NamedRequestBodies: { + RequestBody(_requestBody, { key }) { + registerComponent("requestBodies", key.toString()); + } + }, + NamedHeaders: { + Header(_header, { key }) { + registerComponent("headers", key.toString()); + } + }, + NamedMediaTypes: { + MediaTypesMap(_mediaTypesMap, { key }) { + registerComponent("mediaTypes", key.toString()); + } + } + }; + }; + } +}); - // 5. Remove trailing U+0020 SPACE code points from mimeType, - // if any. - mimeType = mimeType.replace(/(\u0020+)$/u, '') +// node_modules/@redocly/openapi-core/lib/decorators/oas3/index.js +var decorators5; +var init_oas32 = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/oas3/index.js"() { + init_filter_in(); + init_filter_out(); + init_info_description_override(); + init_info_override(); + init_operation_description_override(); + init_remove_x_internal(); + init_tag_description_override(); + init_media_type_examples_override(); + init_remove_unused_components2(); + decorators5 = { + "operation-description-override": OperationDescriptionOverride, + "tag-description-override": TagDescriptionOverride, + "info-description-override": InfoDescriptionOverride, + "info-override": InfoOverride, + "remove-x-internal": RemoveXInternal, + "filter-in": FilterIn, + "filter-out": FilterOut, + "media-type-examples-override": MediaTypeExamplesOverride, + "remove-unused-components": RemoveUnusedComponents2 + }; + } +}); - // 6. Remove the last U+003B (;) code point from mimeType. - mimeType = mimeType.slice(0, -1) +// node_modules/@redocly/openapi-core/lib/decorators/openrpc/index.js +var decorators6; +var init_openrpc2 = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/openrpc/index.js"() { + decorators6 = {}; } +}); - // 12. If mimeType starts with U+003B (;), then prepend - // "text/plain" to mimeType. - if (mimeType.startsWith(';')) { - mimeType = 'text/plain' + mimeType +// node_modules/@redocly/openapi-core/lib/decorators/overlay1/index.js +var decorators7; +var init_overlay1 = __esm({ + "node_modules/@redocly/openapi-core/lib/decorators/overlay1/index.js"() { + decorators7 = {}; } +}); - // 13. Let mimeTypeRecord be the result of parsing - // mimeType. - let mimeTypeRecord = parseMIMEType(mimeType) +// node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescription-type.js +var SourceDescriptionType; +var init_sourceDescription_type = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescription-type.js"() { + SourceDescriptionType = () => { + return { + SourceDescriptions: { + enter(sourceDescriptions, { report, location }) { + if (!sourceDescriptions.length) + return; + for (const sourceDescription of sourceDescriptions) { + if (!["openapi", "arazzo"].includes(sourceDescription?.type)) { + report({ + message: "The `type` property of the `sourceDescription` object must be either `openapi` or `arazzo`.", + location: location.child([sourceDescriptions.indexOf(sourceDescription)]) + }); + } + } + } + } + }; + }; + } +}); - // 14. If mimeTypeRecord is failure, then set - // mimeTypeRecord to text/plain;charset=US-ASCII. - if (mimeTypeRecord === 'failure') { - mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII') +// node_modules/colorette/index.js +var colorette_exports = {}; +__export(colorette_exports, { + bgBlack: () => bgBlack, + bgBlackBright: () => bgBlackBright, + bgBlue: () => bgBlue, + bgBlueBright: () => bgBlueBright, + bgCyan: () => bgCyan, + bgCyanBright: () => bgCyanBright, + bgGreen: () => bgGreen, + bgGreenBright: () => bgGreenBright, + bgMagenta: () => bgMagenta, + bgMagentaBright: () => bgMagentaBright, + bgRed: () => bgRed, + bgRedBright: () => bgRedBright, + bgWhite: () => bgWhite, + bgWhiteBright: () => bgWhiteBright, + bgYellow: () => bgYellow, + bgYellowBright: () => bgYellowBright, + black: () => black, + blackBright: () => blackBright, + blue: () => blue, + blueBright: () => blueBright, + bold: () => bold, + cyan: () => cyan, + cyanBright: () => cyanBright, + dim: () => dim, + gray: () => gray, + green: () => green, + greenBright: () => greenBright, + hidden: () => hidden, + inverse: () => inverse, + italic: () => italic, + magenta: () => magenta, + magentaBright: () => magentaBright, + options: () => options, + red: () => red, + redBright: () => redBright, + reset: () => reset, + strikethrough: () => strikethrough, + underline: () => underline, + white: () => white, + whiteBright: () => whiteBright, + yellow: () => yellow, + yellowBright: () => yellowBright +}); +import * as tty from "tty"; +var env2, isDisabled, isForced, isWindows, isCompatibleTerminal, isCI, enabled, raw, init, options, reset, bold, dim, italic, underline, inverse, hidden, strikethrough, black, red, green, yellow, blue, magenta, cyan, white, gray, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, blackBright, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, bgBlackBright, bgRedBright, bgGreenBright, bgYellowBright, bgBlueBright, bgMagentaBright, bgCyanBright, bgWhiteBright; +var init_colorette = __esm({ + "node_modules/colorette/index.js"() { + env2 = process.env; + isDisabled = "NO_COLOR" in env2; + isForced = "FORCE_COLOR" in env2; + isWindows = process.platform === "win32"; + isCompatibleTerminal = tty && tty.isatty(1) && env2.TERM && env2.TERM !== "dumb"; + isCI = "CI" in env2 && ("GITHUB_ACTIONS" in env2 || "GITLAB_CI" in env2 || "CIRCLECI" in env2); + enabled = !isDisabled && (isForced || isWindows || isCompatibleTerminal || isCI); + raw = (open, close, searchRegex, replaceValue) => (s2) => enabled ? open + (~(s2 += "").indexOf(close, 4) ? s2.replace(searchRegex, replaceValue) : s2) + close : s2; + init = (open, close) => { + return raw( + `\x1B[${open}m`, + `\x1B[${close}m`, + new RegExp(`\\x1b\\[${close}m`, "g"), + `\x1B[${open}m` + ); + }; + options = Object.defineProperty({}, "enabled", { + get: () => enabled, + set: (value) => enabled = value + }); + reset = init(0, 0); + bold = raw("\x1B[1m", "\x1B[22m", /\x1b\[22m/g, "\x1B[22m\x1B[1m"); + dim = raw("\x1B[2m", "\x1B[22m", /\x1b\[22m/g, "\x1B[22m\x1B[2m"); + italic = init(3, 23); + underline = init(4, 24); + inverse = init(7, 27); + hidden = init(8, 28); + strikethrough = init(9, 29); + black = init(30, 39); + red = init(31, 39); + green = init(32, 39); + yellow = init(33, 39); + blue = init(34, 39); + magenta = init(35, 39); + cyan = init(36, 39); + white = init(37, 39); + gray = init(90, 39); + bgBlack = init(40, 49); + bgRed = init(41, 49); + bgGreen = init(42, 49); + bgYellow = init(43, 49); + bgBlue = init(44, 49); + bgMagenta = init(45, 49); + bgCyan = init(46, 49); + bgWhite = init(47, 49); + blackBright = init(90, 39); + redBright = init(91, 39); + greenBright = init(92, 39); + yellowBright = init(93, 39); + blueBright = init(94, 39); + magentaBright = init(95, 39); + cyanBright = init(96, 39); + whiteBright = init(97, 39); + bgBlackBright = init(100, 49); + bgRedBright = init(101, 49); + bgGreenBright = init(102, 49); + bgYellowBright = init(103, 49); + bgBlueBright = init(104, 49); + bgMagentaBright = init(105, 49); + bgCyanBright = init(106, 49); + bgWhiteBright = init(107, 49); } +}); - // 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 } +// node_modules/@redocly/openapi-core/lib/utils/identity.js +function identity(value) { + return value; } - -// https://url.spec.whatwg.org/#concept-url-serializer -/** - * @param {URL} url - * @param {boolean} excludeFragment - */ -function URLSerializer (url, excludeFragment = false) { - if (!excludeFragment) { - return url.href +var init_identity = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/identity.js"() { } +}); - 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) +// node_modules/@redocly/openapi-core/lib/logger.js +var colorOptions, colorize, Logger, logger; +var init_logger = __esm({ + "node_modules/@redocly/openapi-core/lib/logger.js"() { + init_colorette(); + init_env(); + init_identity(); + colorOptions = options; + colorize = new Proxy(colorette_exports, { + get(target, prop) { + if (isBrowser) { + return identity; + } + return target[prop]; + } + }); + Logger = class { + info(str2) { + return isBrowser ? console.info(str2) : process.stderr.write(str2); + } + warn(str2) { + return isBrowser ? console.warn(str2) : process.stderr.write(colorize.yellow(str2)); + } + error(str2) { + return isBrowser ? console.error(str2) : process.stderr.write(colorize.red(str2)); + } + output(str2) { + return isBrowser ? console.log(str2) : process.stdout.write(str2); + } + printNewLine() { + if (isBrowser) { + console.log("\n"); + } else { + process.stdout.write(" \n"); + } + } + printSeparator(separator) { + const windowWidth = process.stdout.columns || 80; + const separatorLine = separator.repeat(Math.ceil(windowWidth / separator.length)).slice(0, windowWidth); + const coloredSeparatorLine = isBrowser ? separatorLine : colorize.gray(separatorLine); + return isBrowser ? console.log(coloredSeparatorLine) : process.stdout.write(coloredSeparatorLine); + } + indent(str2, level) { + const indentChar = isBrowser ? " " : "\xA0"; + return str2.split("\n").map((line) => indentChar.repeat(level) + line).join("\n"); + } + }; + logger = new Logger(); } +}); - return serialized -} - -// 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) +// node_modules/@redocly/openapi-core/lib/rules/common/assertions/utils.js +function getPredicatesFromLocators(locators) { + const { filterInParentKeys, filterOutParentKeys, matchParentKeys } = locators; + const keyMatcher = matchParentKeys && regexFromString(matchParentKeys); + const matchKeysPredicate = keyMatcher && ((key) => keyMatcher.test(key.toString())); + const filterInPredicate = Array.isArray(filterInParentKeys) && ((key) => filterInParentKeys.includes(key.toString())); + const filterOutPredicate = Array.isArray(filterOutParentKeys) && ((key) => !filterOutParentKeys.includes(key.toString())); + return [matchKeysPredicate, filterInPredicate, filterOutPredicate].filter(isTruthy); } - -/** - * @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) - ) +function getAssertsToApply(assertion) { + const assertsToApply = keysOf(asserts).filter((assertName) => assertion.assertions[assertName] !== void 0).map((assertName) => { + return { + name: assertName, + conditions: assertion.assertions[assertName], + runsOnKeys: runOnKeysSet.has(assertName), + runsOnValues: runOnValuesSet.has(assertName) + }; + }); + const shouldRunOnKeys = assertsToApply.find((assert) => assert.runsOnKeys && !assert.runsOnValues); + const shouldRunOnValues = assertsToApply.find((assert) => assert.runsOnValues && !assert.runsOnKeys); + if (shouldRunOnValues && !assertion.subject.property) { + throw new Error(`The '${shouldRunOnValues.name}' assertion can't be used on all keys. Please provide a single property.`); + } + if (shouldRunOnKeys && assertion.subject.property) { + throw new Error(`The '${shouldRunOnKeys.name}' assertion can't be used on properties. Please remove the 'property' key.`); + } + return assertsToApply; } - -// 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 - let i = 0 - // 2. For each byte byte in input: - while (i < length) { - 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: +function getAssertionProperties({ subject }) { + return (Array.isArray(subject.property) ? subject.property : [subject?.property]).filter(Boolean); +} +function applyAssertions(assertionDefinition, asserts2, ctx) { + const properties = getAssertionProperties(assertionDefinition); + const assertResults = []; + for (const assert of asserts2) { + if (properties.length) { + for (const property of properties) { + assertResults.push(runAssertion({ + assert, + ctx, + assertionProperty: property + })); + } } 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 + assertResults.push(runAssertion({ + assert, + ctx + })); } - ++i } - - // 3. Return output. - return length === j ? output : output.subarray(0, j) + return assertResults.flat(); } - -// 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 - } +function buildVisitorObject(assertion, subjectVisitor) { + const targetVisitorLocatorPredicates = getPredicatesFromLocators(assertion.subject); + const targetVisitorSkipFunction = targetVisitorLocatorPredicates.length ? (_5, key) => !targetVisitorLocatorPredicates.every((predicate) => predicate(key)) : void 0; + const targetVisitor = { + [assertion.subject.type]: { + enter: subjectVisitor, + ...targetVisitorSkipFunction && { skip: targetVisitorSkipFunction } } - - // 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) + }; + if (!Array.isArray(assertion.where)) { + return targetVisitor; + } + let currentVisitorLevel = {}; + const visitor = currentVisitorLevel; + const context2 = assertion.where; + for (let index = 0; index < context2.length; index++) { + const assertionDefinitionNode = context2[index]; + if (!isString(assertionDefinitionNode.subject?.type)) { + throw new Error(`${assertion.assertionId} -> where -> [${index}]: 'type' (String) is required`); + } + const locatorPredicates = getPredicatesFromLocators(assertionDefinitionNode.subject); + const assertsToApply = getAssertsToApply(assertionDefinitionNode); + const skipFunction = (node, key, ctx) => !locatorPredicates.every((predicate) => predicate(key)) || !!applyAssertions(assertionDefinitionNode, assertsToApply, { ...ctx, node }).length; + const nodeVisitor = { + ...(locatorPredicates.length || assertsToApply.length) && { skip: skipFunction } + }; + if (assertionDefinitionNode.subject.type === assertion.subject.type && index === context2.length - 1) { + targetVisitor[assertion.subject.type] = { + enter: subjectVisitor, + ...nodeVisitor.skip && { skip: nodeVisitor.skip } || targetVisitorSkipFunction && { + skip: (node, key, ctx) => !!(nodeVisitor.skip?.(node, key, ctx) || targetVisitorSkipFunction?.(node, key)) + } + }; + } else { + currentVisitorLevel = currentVisitorLevel[assertionDefinitionNode.subject?.type] = nodeVisitor; } } - - // 12. Return mimeType. - return mimeType + currentVisitorLevel[assertion.subject.type] = targetVisitor[assertion.subject.type]; + return visitor; } - -// 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=false] - */ -function collectAnHTTPQuotedString (input, position, extractValue = false) { - // 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 +function buildSubjectVisitor(assertId, assertion) { + return (node, ctx) => { + const properties = getAssertionProperties(assertion); + const defaultMessage = `${colorize.blue(assertId)} failed because the ${colorize.blue(assertion.subject.type)} ${colorize.blue(properties.join(", "))} didn't meet the assertions: ${assertionMessageTemplates.problems}`.replace(/ +/g, " "); + const problems = applyAssertions(assertion, getAssertsToApply(assertion), { + ...ctx, + node + }); + if (problems.length) { + for (const problemGroup of groupProblemsByPointer(problems)) { + const message = assertion.message || defaultMessage; + const problemMessage = getProblemsMessage(problemGroup); + const placeholders = { + problems: problemMessage, + assertionName: assertId, + nodeType: assertion.subject.type, + property: properties.join(", "), + key: String(ctx.key), + pointer: ctx.location.pointer, + file: getFilenameFromPath(ctx.location.source.absoluteRef) + }; + ctx.report({ + message: interpolateMessagePlaceholders(message, placeholders), + location: getProblemsLocation(problemGroup) || ctx.location, + forceSeverity: assertion.severity || "error", + suggest: assertion.suggest || [], + ...assertion.reference && { reference: assertion.reference }, + ruleId: assertId + }); } - - // 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(/[\\"]/ug, '\\$&') - - // 2. Prepend U+0022 (") to value. - value = '"' + value - - // 3. Append U+0022 (") to value. - value += '"' - } - - // 5. Append value to serialization. - serialization += value +function groupProblemsByPointer(problems) { + const groups = {}; + for (const problem of problems) { + if (!problem.location) + continue; + const pointer = problem.location.pointer; + groups[pointer] = groups[pointer] || []; + groups[pointer].push(problem); } - - // 3. Return serialization. - return serialization + return Object.values(groups); } - -/** - * @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 +function getProblemsLocation(problems) { + return problems.length ? problems[0].location : void 0; } - -/** - * @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) +function getProblemsMessage(problems) { + return problems.length === 1 ? problems[0].message ?? "" : problems.map((problem) => ` +- ${problem.message ?? ""}`).join(""); +} +function getFilenameFromPath(absoluteRef) { + if (isAbsoluteUrl(absoluteRef)) { + const parts2 = absoluteRef.split("/"); + return parts2.at(-1) || absoluteRef; + } + const parts = absoluteRef.split(/[/\\]/); + return parts.at(-1) || absoluteRef; +} +function interpolateMessagePlaceholders(message, placeholders) { + let result = message; + for (const key of Object.keys(assertionMessageTemplates)) { + const template = assertionMessageTemplates[key]; + const value = placeholders[key]; + if (!template) + continue; + result = result.split(template).join(value); + } + 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 '' +function runAssertion({ assert, ctx, assertionProperty }) { + const currentLocation = assert.name === "ref" ? ctx.rawLocation : ctx.location; + if (assertionProperty) { + const values = isRef(ctx.node[assertionProperty]) ? ctx.resolve(ctx.node[assertionProperty])?.node : ctx.node[assertionProperty]; + const rawValues = ctx.rawNode[assertionProperty]; + const location = currentLocation.child(assertionProperty); + return asserts[assert.name](values, assert.conditions, { + ...ctx, + baseLocation: location, + rawValue: rawValues + }); + } else { + const value = Array.isArray(ctx.node) ? ctx.node : Object.keys(ctx.node); + return asserts[assert.name](value, assert.conditions, { + ...ctx, + rawValue: ctx.rawNode, + baseLocation: currentLocation + }); + } } +var assertionMessageTemplates; +var init_utils = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/assertions/utils.js"() { + init_logger(); + init_ref_utils(); + init_is_string(); + init_is_truthy(); + init_keys_of(); + init_regex_from_string(); + init_asserts(); + assertionMessageTemplates = { + problems: "{{problems}}", + assertionName: "{{assertionName}}", + nodeType: "{{nodeType}}", + key: "{{key}}", + property: "{{property}}", + file: "{{file}}", + pointer: "{{pointer}}" + }; + } +}); -module.exports = { - dataURLProcessor, - URLSerializer, - stringPercentDecode, - parseMIMEType, - collectAnHTTPQuotedString, - serializeAMimeType, - removeHTTPWhitespace, - minimizeSupportedMimeType, - HTTP_TOKEN_CODEPOINTS -} +// node_modules/@redocly/openapi-core/lib/rules/common/assertions/index.js +var Assertions2; +var init_assertions = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/assertions/index.js"() { + init_is_plain_object(); + init_is_string(); + init_utils(); + Assertions2 = (opts) => { + const visitors = []; + const assertions = Object.values(opts).filter((opt) => isPlainObject(opt)); + for (const [_5, assertion] of assertions.entries()) { + if (!isString(assertion.subject.type)) { + throw new Error(`${assertion.assertionId}: 'type' (String) is required`); + } + const subjectVisitor = buildSubjectVisitor(assertion.assertionId, assertion); + const visitorObject = buildVisitorObject(assertion, subjectVisitor); + visitors.push(visitorObject); + } + return visitors; + }; + } +}); +// node_modules/js-levenshtein/index.js +var require_js_levenshtein = __commonJS({ + "node_modules/js-levenshtein/index.js"(exports, module3) { + "use strict"; + module3.exports = /* @__PURE__ */ (function() { + function _min(d0, d1, d2, bx, ay) { + return d0 < d1 || d2 < d1 ? d0 > d2 ? d2 + 1 : d0 + 1 : bx === ay ? d1 : d1 + 1; + } + return function(a2, b2) { + if (a2 === b2) { + return 0; + } + if (a2.length > b2.length) { + var tmp = a2; + a2 = b2; + b2 = tmp; + } + var la = a2.length; + var lb = b2.length; + while (la > 0 && a2.charCodeAt(la - 1) === b2.charCodeAt(lb - 1)) { + la--; + lb--; + } + var offset = 0; + while (offset < la && a2.charCodeAt(offset) === b2.charCodeAt(offset)) { + offset++; + } + la -= offset; + lb -= offset; + if (la === 0 || lb < 3) { + return lb; + } + var x3 = 0; + var y2; + var d0; + var d1; + var d2; + var d3; + var dd; + var dy; + var ay; + var bx0; + var bx1; + var bx2; + var bx3; + var vector = []; + for (y2 = 0; y2 < la; y2++) { + vector.push(y2 + 1); + vector.push(a2.charCodeAt(offset + y2)); + } + var len = vector.length - 1; + for (; x3 < lb - 3; ) { + bx0 = b2.charCodeAt(offset + (d0 = x3)); + bx1 = b2.charCodeAt(offset + (d1 = x3 + 1)); + bx2 = b2.charCodeAt(offset + (d2 = x3 + 2)); + bx3 = b2.charCodeAt(offset + (d3 = x3 + 3)); + dd = x3 += 4; + for (y2 = 0; y2 < len; y2 += 2) { + dy = vector[y2]; + ay = vector[y2 + 1]; + d0 = _min(dy, d0, d1, bx0, ay); + d1 = _min(d0, d1, d2, bx1, ay); + d2 = _min(d1, d2, d3, bx2, ay); + dd = _min(d2, d3, dd, bx3, ay); + vector[y2] = dd; + d3 = d2; + d2 = d1; + d1 = d0; + d0 = dy; + } + } + for (; x3 < lb; ) { + bx0 = b2.charCodeAt(offset + (d0 = x3)); + dd = ++x3; + for (y2 = 0; y2 < len; y2 += 2) { + dy = vector[y2]; + vector[y2] = dd = _min(dy, d0, dd, bx0, vector[y2 + 1]); + d0 = dy; + } + } + return dd; + }; + })(); + } +}); -/***/ }), +// node_modules/@redocly/ajv/dist/vocabularies/validation/draft04/limitNumber.js +var require_limitNumber2 = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/draft04/limitNumber.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var ops = codegen_1.operators; + var KWDs = { + maximum: { + exclusive: "exclusiveMaximum", + ops: [ + { okStr: "<=", ok: ops.LTE, fail: ops.GT }, + { okStr: "<", ok: ops.LT, fail: ops.GTE } + ] + }, + minimum: { + exclusive: "exclusiveMinimum", + ops: [ + { okStr: ">=", ok: ops.GTE, fail: ops.LT }, + { okStr: ">", ok: ops.GT, fail: ops.LTE } + ] + } + }; + var error2 = { + message: (cxt) => (0, codegen_1.str)`must be ${kwdOp(cxt).okStr} ${cxt.schemaCode}`, + params: (cxt) => (0, codegen_1._)`{comparison: ${kwdOp(cxt).okStr}, limit: ${cxt.schemaCode}}` + }; + var def = { + keyword: Object.keys(KWDs), + type: "number", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { data, schemaCode } = cxt; + cxt.fail$data((0, codegen_1._)`${data} ${kwdOp(cxt).fail} ${schemaCode} || isNaN(${data})`); + } + }; + function kwdOp(cxt) { + var _a; + const keyword = cxt.keyword; + const opsIdx = ((_a = cxt.parentSchema) === null || _a === void 0 ? void 0 : _a[KWDs[keyword].exclusive]) ? 1 : 0; + return KWDs[keyword].ops[opsIdx]; + } + exports.default = def; + } +}); -/***/ 87991: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +// node_modules/@redocly/ajv/dist/vocabularies/validation/draft04/limitNumberExclusive.js +var require_limitNumberExclusive = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/validation/draft04/limitNumberExclusive.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var KWDs = { + exclusiveMaximum: "maximum", + exclusiveMinimum: "minimum" + }; + var def = { + keyword: Object.keys(KWDs), + type: "number", + schemaType: "boolean", + code({ keyword, parentSchema }) { + const limitKwd = KWDs[keyword]; + if (parentSchema[limitKwd] === void 0) { + throw new Error(`${keyword} can only be used with ${limitKwd}`); + } + } + }; + exports.default = def; + } +}); -"use strict"; +// node_modules/@redocly/ajv/dist/vocabularies/draft4.js +var require_draft4 = __commonJS({ + "node_modules/@redocly/ajv/dist/vocabularies/draft4.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var ref_1 = require_ref(); + var applicator_1 = require_applicator(); + var unevaluated_1 = require_unevaluated(); + var format_1 = require_format2(); + var validation_1 = require_validation(); + var limitNumber_1 = require_limitNumber2(); + var limitNumberExclusive_1 = require_limitNumberExclusive(); + var metadataVocabulary = ["title", "description", "default"]; + var coreVocabulary = [ + "$schema", + "id", + "$defs", + { keyword: "$comment" }, + "definitions", + ref_1.default + ]; + var validation = [...validation_1.default.slice(1), limitNumber_1.default, limitNumberExclusive_1.default]; + var draft4Vocabularies = [ + coreVocabulary, + validation, + (0, applicator_1.default)(), + format_1.default, + metadataVocabulary, + unevaluated_1.default + ]; + exports.default = draft4Vocabularies; + } +}); +// node_modules/@redocly/ajv/dist/refs/json-schema-draft-04.json +var require_json_schema_draft_04 = __commonJS({ + "node_modules/@redocly/ajv/dist/refs/json-schema-draft-04.json"(exports, module3) { + module3.exports = { + id: "http://json-schema.org/draft-04/schema#", + $schema: "http://json-schema.org/draft-04/schema#", + description: "Core schema meta-schema", + definitions: { + schemaArray: { + type: "array", + minItems: 1, + items: { $ref: "#" } + }, + positiveInteger: { + type: "integer", + minimum: 0 + }, + positiveIntegerDefault0: { + allOf: [{ $ref: "#/definitions/positiveInteger" }, { default: 0 }] + }, + simpleTypes: { + enum: ["array", "boolean", "integer", "null", "number", "object", "string"] + }, + stringArray: { + type: "array", + items: { type: "string" }, + minItems: 1, + uniqueItems: true + } + }, + type: "object", + properties: { + id: { + type: "string", + format: "uri" + }, + $schema: { + type: "string", + format: "uri" + }, + title: { + type: "string" + }, + description: { + type: "string" + }, + default: {}, + multipleOf: { + type: "number", + minimum: 0, + exclusiveMinimum: true + }, + maximum: { + type: "number" + }, + exclusiveMaximum: { + type: "boolean", + default: false + }, + minimum: { + type: "number" + }, + exclusiveMinimum: { + type: "boolean", + default: false + }, + maxLength: { $ref: "#/definitions/positiveInteger" }, + minLength: { $ref: "#/definitions/positiveIntegerDefault0" }, + pattern: { + type: "string", + format: "regex" + }, + additionalItems: { + anyOf: [{ type: "boolean" }, { $ref: "#" }], + default: {} + }, + items: { + anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }], + default: {} + }, + maxItems: { $ref: "#/definitions/positiveInteger" }, + minItems: { $ref: "#/definitions/positiveIntegerDefault0" }, + uniqueItems: { + type: "boolean", + default: false + }, + maxProperties: { $ref: "#/definitions/positiveInteger" }, + minProperties: { $ref: "#/definitions/positiveIntegerDefault0" }, + required: { $ref: "#/definitions/stringArray" }, + additionalProperties: { + anyOf: [{ type: "boolean" }, { $ref: "#" }], + default: {} + }, + definitions: { + type: "object", + additionalProperties: { $ref: "#" }, + default: {} + }, + properties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: {} + }, + patternProperties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: {} + }, + dependencies: { + type: "object", + additionalProperties: { + anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] + } + }, + enum: { + type: "array", + minItems: 1, + uniqueItems: true + }, + type: { + anyOf: [ + { $ref: "#/definitions/simpleTypes" }, + { + type: "array", + items: { $ref: "#/definitions/simpleTypes" }, + minItems: 1, + uniqueItems: true + } + ] + }, + allOf: { $ref: "#/definitions/schemaArray" }, + anyOf: { $ref: "#/definitions/schemaArray" }, + oneOf: { $ref: "#/definitions/schemaArray" }, + not: { $ref: "#" } + }, + dependencies: { + exclusiveMaximum: ["maximum"], + exclusiveMinimum: ["minimum"] + }, + default: {} + }; + } +}); -const { bufferToLowerCasedHeaderName } = __nccwpck_require__(83983) -const { HTTP_TOKEN_CODEPOINTS } = __nccwpck_require__(17704) -const { makeEntry } = __nccwpck_require__(73162) -const { webidl } = __nccwpck_require__(81040) -const assert = __nccwpck_require__(98061) -const { isomorphicDecode } = __nccwpck_require__(93082) +// node_modules/@redocly/ajv/dist/draft4.js +var require_draft42 = __commonJS({ + "node_modules/@redocly/ajv/dist/draft4.js"(exports, module3) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0; + var core_1 = require_core2(); + var draft4_1 = require_draft4(); + var discriminator_1 = require_discriminator(); + var draft4MetaSchema = require_json_schema_draft_04(); + var META_SUPPORT_DATA = ["/properties"]; + var META_SCHEMA_ID = "http://json-schema.org/draft-04/schema"; + var Ajv2 = class extends core_1.default { + constructor(opts = {}) { + super({ + ...opts, + schemaId: "id", + dynamicRef: true, + unevaluated: true + }); + } + _addVocabularies() { + super._addVocabularies(); + draft4_1.default.forEach((v3) => this.addVocabulary(v3)); + if (this.opts.discriminator) + this.addKeyword(discriminator_1.default); + } + _addDefaultMetaSchema() { + super._addDefaultMetaSchema(); + if (!this.opts.meta) + return; + const metaSchema = this.opts.$data ? this.$dataMetaSchema(draft4MetaSchema, META_SUPPORT_DATA) : draft4MetaSchema; + this.addMetaSchema(metaSchema, META_SCHEMA_ID, false); + this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; + } + defaultMeta() { + return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0); + } + }; + exports.Ajv = Ajv2; + module3.exports = exports = Ajv2; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.default = Ajv2; + var validate_1 = require_validate(); + Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen(); + Object.defineProperty(exports, "_", { enumerable: true, get: function() { + return codegen_1._; + } }); + Object.defineProperty(exports, "str", { enumerable: true, get: function() { + return codegen_1.str; + } }); + Object.defineProperty(exports, "stringify", { enumerable: true, get: function() { + return codegen_1.stringify; + } }); + Object.defineProperty(exports, "nil", { enumerable: true, get: function() { + return codegen_1.nil; + } }); + Object.defineProperty(exports, "Name", { enumerable: true, get: function() { + return codegen_1.Name; + } }); + Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() { + return codegen_1.CodeGen; + } }); + var validation_error_1 = require_validation_error(); + Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function() { + return validation_error_1.default; + } }); + var ref_error_1 = require_ref_error(); + Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function() { + return ref_error_1.default; + } }); + } +}); -const dd = Buffer.from('--') -const decoder = new TextDecoder() -const decoderIgnoreBOM = new TextDecoder('utf-8', { ignoreBOM: true }) +// node_modules/ajv-formats/dist/formats.js +var require_formats = __commonJS({ + "node_modules/ajv-formats/dist/formats.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.formatNames = exports.fastFormats = exports.fullFormats = void 0; + function fmtDef(validate, compare) { + return { validate, compare }; + } + exports.fullFormats = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: fmtDef(date, compareDate), + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: fmtDef(getTime(true), compareTime), + "date-time": fmtDef(getDateTime(true), compareDateTime), + "iso-time": fmtDef(getTime(), compareIsoTime), + "iso-date-time": fmtDef(getDateTime(), compareIsoDateTime), + // duration: https://tools.ietf.org/html/rfc3339#appendix-A + duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/, + uri, + "uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, + // uri-template: https://tools.ietf.org/html/rfc6570 + "uri-template": /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i, + // For the source: https://gist.github.com/dperini/729294 + // For test cases: https://mathiasbynens.be/demo/url-regex + url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/, + ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i, + regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + "json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/, + "json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + "relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/, + // the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types + // byte: https://github.com/miguelmota/is-base64 + byte, + // signed 32 bit integer + int32: { type: "number", validate: validateInt32 }, + // signed 64 bit integer + int64: { type: "number", validate: validateInt64 }, + // C-type float + float: { type: "number", validate: validateNumber }, + // C-type double + double: { type: "number", validate: validateNumber }, + // hint to the UI to hide input strings + password: true, + // unchecked string payload + binary: true + }; + exports.fastFormats = { + ...exports.fullFormats, + date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate), + time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime), + "date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime), + "iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime), + "iso-date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime), + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, + "uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation') + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i + }; + exports.formatNames = Object.keys(exports.fullFormats); + function isLeapYear(year) { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); + } + var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; + var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + function date(str2) { + const matches = DATE.exec(str2); + if (!matches) + return false; + const year = +matches[1]; + const month = +matches[2]; + const day = +matches[3]; + return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]); + } + function compareDate(d1, d2) { + if (!(d1 && d2)) + return void 0; + if (d1 > d2) + return 1; + if (d1 < d2) + return -1; + return 0; + } + var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i; + function getTime(strictTimeZone) { + return function time(str2) { + const matches = TIME.exec(str2); + if (!matches) + return false; + const hr2 = +matches[1]; + const min = +matches[2]; + const sec = +matches[3]; + const tz = matches[4]; + const tzSign = matches[5] === "-" ? -1 : 1; + const tzH = +(matches[6] || 0); + const tzM = +(matches[7] || 0); + if (tzH > 23 || tzM > 59 || strictTimeZone && !tz) + return false; + if (hr2 <= 23 && min <= 59 && sec < 60) + return true; + const utcMin = min - tzM * tzSign; + const utcHr = hr2 - tzH * tzSign - (utcMin < 0 ? 1 : 0); + return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61; + }; + } + function compareTime(s1, s2) { + if (!(s1 && s2)) + return void 0; + const t1 = (/* @__PURE__ */ new Date("2020-01-01T" + s1)).valueOf(); + const t2 = (/* @__PURE__ */ new Date("2020-01-01T" + s2)).valueOf(); + if (!(t1 && t2)) + return void 0; + return t1 - t2; + } + function compareIsoTime(t1, t2) { + if (!(t1 && t2)) + return void 0; + const a1 = TIME.exec(t1); + const a2 = TIME.exec(t2); + if (!(a1 && a2)) + return void 0; + t1 = a1[1] + a1[2] + a1[3]; + t2 = a2[1] + a2[2] + a2[3]; + if (t1 > t2) + return 1; + if (t1 < t2) + return -1; + return 0; + } + var DATE_TIME_SEPARATOR = /t|\s/i; + function getDateTime(strictTimeZone) { + const time = getTime(strictTimeZone); + return function date_time(str2) { + const dateTime = str2.split(DATE_TIME_SEPARATOR); + return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]); + }; + } + function compareDateTime(dt1, dt22) { + if (!(dt1 && dt22)) + return void 0; + const d1 = new Date(dt1).valueOf(); + const d2 = new Date(dt22).valueOf(); + if (!(d1 && d2)) + return void 0; + return d1 - d2; + } + function compareIsoDateTime(dt1, dt22) { + if (!(dt1 && dt22)) + return void 0; + const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR); + const [d2, t2] = dt22.split(DATE_TIME_SEPARATOR); + const res = compareDate(d1, d2); + if (res === void 0) + return void 0; + return res || compareTime(t1, t2); + } + var NOT_URI_FRAGMENT = /\/|:/; + var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; + function uri(str2) { + return NOT_URI_FRAGMENT.test(str2) && URI.test(str2); + } + var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm; + function byte(str2) { + BYTE.lastIndex = 0; + return BYTE.test(str2); + } + var MIN_INT32 = -(2 ** 31); + var MAX_INT32 = 2 ** 31 - 1; + function validateInt32(value) { + return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32; + } + function validateInt64(value) { + return Number.isInteger(value); + } + function validateNumber() { + return true; + } + var Z_ANCHOR = /[^\\]\\Z/; + function regex(str2) { + if (Z_ANCHOR.test(str2)) + return false; + try { + new RegExp(str2); + return true; + } catch (e2) { + return false; + } + } + } +}); -/** - * @param {string} chars - */ -function isAsciiString (chars) { - for (let i = 0; i < chars.length; ++i) { - if ((chars.charCodeAt(i) & ~0x7F) !== 0) { - return false +// node_modules/ajv/dist/compile/codegen/code.js +var require_code3 = __commonJS({ + "node_modules/ajv/dist/compile/codegen/code.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0; + var _CodeOrName = class { + }; + exports._CodeOrName = _CodeOrName; + exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; + var Name = class extends _CodeOrName { + constructor(s2) { + super(); + if (!exports.IDENTIFIER.test(s2)) + throw new Error("CodeGen: name must be a valid identifier"); + this.str = s2; + } + toString() { + return this.str; + } + emptyStr() { + return false; + } + get names() { + return { [this.str]: 1 }; + } + }; + exports.Name = Name; + var _Code = class extends _CodeOrName { + constructor(code) { + super(); + this._items = typeof code === "string" ? [code] : code; + } + toString() { + return this.str; + } + emptyStr() { + if (this._items.length > 1) + return false; + const item = this._items[0]; + return item === "" || item === '""'; + } + get str() { + var _a; + return (_a = this._str) !== null && _a !== void 0 ? _a : this._str = this._items.reduce((s2, c2) => `${s2}${c2}`, ""); + } + get names() { + var _a; + return (_a = this._names) !== null && _a !== void 0 ? _a : this._names = this._items.reduce((names, c2) => { + if (c2 instanceof Name) + names[c2.str] = (names[c2.str] || 0) + 1; + return names; + }, {}); + } + }; + exports._Code = _Code; + exports.nil = new _Code(""); + function _5(strs, ...args) { + const code = [strs[0]]; + let i2 = 0; + while (i2 < args.length) { + addCodeArg(code, args[i2]); + code.push(strs[++i2]); + } + return new _Code(code); + } + exports._ = _5; + var plus = new _Code("+"); + function str2(strs, ...args) { + const expr = [safeStringify(strs[0])]; + let i2 = 0; + while (i2 < args.length) { + expr.push(plus); + addCodeArg(expr, args[i2]); + expr.push(plus, safeStringify(strs[++i2])); + } + optimize(expr); + return new _Code(expr); + } + exports.str = str2; + function addCodeArg(code, arg) { + if (arg instanceof _Code) + code.push(...arg._items); + else if (arg instanceof Name) + code.push(arg); + else + code.push(interpolate(arg)); + } + exports.addCodeArg = addCodeArg; + function optimize(expr) { + let i2 = 1; + while (i2 < expr.length - 1) { + if (expr[i2] === plus) { + const res = mergeExprItems(expr[i2 - 1], expr[i2 + 1]); + if (res !== void 0) { + expr.splice(i2 - 1, 3, res); + continue; + } + expr[i2++] = "+"; + } + i2++; + } + } + function mergeExprItems(a2, b2) { + if (b2 === '""') + return a2; + if (a2 === '""') + return b2; + if (typeof a2 == "string") { + if (b2 instanceof Name || a2[a2.length - 1] !== '"') + return; + if (typeof b2 != "string") + return `${a2.slice(0, -1)}${b2}"`; + if (b2[0] === '"') + return a2.slice(0, -1) + b2.slice(1); + return; + } + if (typeof b2 == "string" && b2[0] === '"' && !(a2 instanceof Name)) + return `"${a2}${b2.slice(1)}`; + return; + } + function strConcat(c1, c2) { + return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str2`${c1}${c2}`; + } + exports.strConcat = strConcat; + function interpolate(x3) { + return typeof x3 == "number" || typeof x3 == "boolean" || x3 === null ? x3 : safeStringify(Array.isArray(x3) ? x3.join(",") : x3); + } + function stringify(x3) { + return new _Code(safeStringify(x3)); } - } - 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 + exports.stringify = stringify; + function safeStringify(x3) { + return JSON.stringify(x3).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029"); } - } - - 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) { - throw parsingError('missing boundary in content-type header') - } - - 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: Per RFC 2046 Section 5.1.1, we must ignore anything before the - // first boundary delimiter line (preamble). Search for the first boundary. - const firstBoundaryIndex = input.indexOf(boundary) - - if (firstBoundaryIndex === -1) { - throw parsingError('no boundary found in multipart body') - } - - // Start parsing from the first boundary, ignoring any preamble - position.position = firstBoundaryIndex - - // 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 { - throw parsingError('expected a value starting with -- and the boundary') + exports.safeStringify = safeStringify; + function getProperty(key) { + return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _5`[${key}]`; } - - // 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: Per RFC 2046 Section 5.1.1, we must ignore anything after the - // final boundary delimiter (epilogue). Check for -- or --CRLF and return - // regardless of what follows. - if (bufferStartsWith(input, dd, position)) { - // Found closing boundary delimiter (--), ignore any epilogue - return entryList + exports.getProperty = getProperty; + function getEsmExportName(key) { + if (typeof key == "string" && exports.IDENTIFIER.test(key)) { + return new _Code(`${key}`); + } + throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`); } - - // 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) { - throw parsingError('expected CRLF') + exports.getEsmExportName = getEsmExportName; + function regexpCode(rx) { + return new _Code(rx.toString()); } + exports.regexpCode = regexpCode; + } +}); - // 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) - - 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) +// node_modules/ajv/dist/compile/codegen/scope.js +var require_scope2 = __commonJS({ + "node_modules/ajv/dist/compile/codegen/scope.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0; + var code_1 = require_code3(); + var ValueError = class extends Error { + constructor(name) { + super(`CodeGen: "code" for ${name} not defined`); + this.value = name.value; + } + }; + var UsedValueState; + (function(UsedValueState2) { + UsedValueState2[UsedValueState2["Started"] = 0] = "Started"; + UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed"; + })(UsedValueState || (exports.UsedValueState = UsedValueState = {})); + exports.varKinds = { + const: new code_1.Name("const"), + let: new code_1.Name("let"), + var: new code_1.Name("var") + }; + var Scope = class { + constructor({ prefixes, parent } = {}) { + this._names = {}; + this._prefixes = prefixes; + this._parent = parent; + } + toName(nameOrPrefix) { + return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix); + } + name(prefix) { + return new code_1.Name(this._newName(prefix)); + } + _newName(prefix) { + const ng = this._names[prefix] || this._nameGroup(prefix); + return `${prefix}${ng.index++}`; + } + _nameGroup(prefix) { + var _a, _b; + if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) { + throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`); + } + return this._names[prefix] = { prefix, index: 0 }; + } + }; + exports.Scope = Scope; + var ValueScopeName = class extends code_1.Name { + constructor(prefix, nameStr) { + super(nameStr); + this.prefix = prefix; + } + setValue(value, { property, itemIndex }) { + this.value = value; + this.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`; + } + }; + exports.ValueScopeName = ValueScopeName; + var line = (0, code_1._)`\n`; + var ValueScope = class extends Scope { + constructor(opts) { + super(opts); + this._values = {}; + this._scope = opts.scope; + this.opts = { ...opts, _n: opts.lines ? line : code_1.nil }; + } + get() { + return this._scope; + } + name(prefix) { + return new ValueScopeName(prefix, this._newName(prefix)); + } + value(nameOrPrefix, value) { + var _a; + if (value.ref === void 0) + throw new Error("CodeGen: ref must be passed in value"); + const name = this.toName(nameOrPrefix); + const { prefix } = name; + const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref; + let vs2 = this._values[prefix]; + if (vs2) { + const _name = vs2.get(valueKey); + if (_name) + return _name; + } else { + vs2 = this._values[prefix] = /* @__PURE__ */ new Map(); + } + vs2.set(valueKey, name); + const s2 = this._scope[prefix] || (this._scope[prefix] = []); + const itemIndex = s2.length; + s2[itemIndex] = value.ref; + name.setValue(value, { property: prefix, itemIndex }); + return name; + } + getValue(prefix, keyOrRef) { + const vs2 = this._values[prefix]; + if (!vs2) + return; + return vs2.get(keyOrRef); + } + scopeRefs(scopeName, values = this._values) { + return this._reduceValues(values, (name) => { + if (name.scopePath === void 0) + throw new Error(`CodeGen: name "${name}" has no value`); + return (0, code_1._)`${scopeName}${name.scopePath}`; + }); + } + scopeCode(values = this._values, usedValues, getCode) { + return this._reduceValues(values, (name) => { + if (name.value === void 0) + throw new Error(`CodeGen: name "${name}" has no value`); + return name.value.code; + }, usedValues, getCode); + } + _reduceValues(values, valueCode, usedValues = {}, getCode) { + let code = code_1.nil; + for (const prefix in values) { + const vs2 = values[prefix]; + if (!vs2) + continue; + const nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map(); + vs2.forEach((name) => { + if (nameSet.has(name)) + return; + nameSet.set(name, UsedValueState.Started); + let c2 = valueCode(name); + if (c2) { + const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const; + code = (0, code_1._)`${code}${def} ${name} = ${c2};${this.opts._n}`; + } else if (c2 = getCode === null || getCode === void 0 ? void 0 : getCode(name)) { + code = (0, code_1._)`${code}${c2}${this.opts._n}`; + } else { + throw new ValueError(name); + } + nameSet.set(name, UsedValueState.Completed); + }); + } + return code; + } + }; + exports.ValueScope = ValueScope; + } +}); - if (boundaryIndex === -1) { - throw parsingError('expected boundary after body') +// node_modules/ajv/dist/compile/codegen/index.js +var require_codegen2 = __commonJS({ + "node_modules/ajv/dist/compile/codegen/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0; + var code_1 = require_code3(); + var scope_1 = require_scope2(); + var code_2 = require_code3(); + Object.defineProperty(exports, "_", { enumerable: true, get: function() { + return code_2._; + } }); + Object.defineProperty(exports, "str", { enumerable: true, get: function() { + return code_2.str; + } }); + Object.defineProperty(exports, "strConcat", { enumerable: true, get: function() { + return code_2.strConcat; + } }); + Object.defineProperty(exports, "nil", { enumerable: true, get: function() { + return code_2.nil; + } }); + Object.defineProperty(exports, "getProperty", { enumerable: true, get: function() { + return code_2.getProperty; + } }); + Object.defineProperty(exports, "stringify", { enumerable: true, get: function() { + return code_2.stringify; + } }); + Object.defineProperty(exports, "regexpCode", { enumerable: true, get: function() { + return code_2.regexpCode; + } }); + Object.defineProperty(exports, "Name", { enumerable: true, get: function() { + return code_2.Name; + } }); + var scope_2 = require_scope2(); + Object.defineProperty(exports, "Scope", { enumerable: true, get: function() { + return scope_2.Scope; + } }); + Object.defineProperty(exports, "ValueScope", { enumerable: true, get: function() { + return scope_2.ValueScope; + } }); + Object.defineProperty(exports, "ValueScopeName", { enumerable: true, get: function() { + return scope_2.ValueScopeName; + } }); + Object.defineProperty(exports, "varKinds", { enumerable: true, get: function() { + return scope_2.varKinds; + } }); + exports.operators = { + GT: new code_1._Code(">"), + GTE: new code_1._Code(">="), + LT: new code_1._Code("<"), + LTE: new code_1._Code("<="), + EQ: new code_1._Code("==="), + NEQ: new code_1._Code("!=="), + NOT: new code_1._Code("!"), + OR: new code_1._Code("||"), + AND: new code_1._Code("&&"), + ADD: new code_1._Code("+") + }; + var Node = class { + optimizeNodes() { + return this; + } + optimizeNames(_names, _constants) { + return this; + } + }; + var Def = class extends Node { + constructor(varKind, name, rhs) { + super(); + this.varKind = varKind; + this.name = name; + this.rhs = rhs; + } + render({ es5, _n }) { + const varKind = es5 ? scope_1.varKinds.var : this.varKind; + const rhs = this.rhs === void 0 ? "" : ` = ${this.rhs}`; + return `${varKind} ${this.name}${rhs};` + _n; + } + optimizeNames(names, constants) { + if (!names[this.name.str]) + return; + if (this.rhs) + this.rhs = optimizeExpr(this.rhs, names, constants); + return this; + } + get names() { + return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {}; + } + }; + var Assign = class extends Node { + constructor(lhs, rhs, sideEffects) { + super(); + this.lhs = lhs; + this.rhs = rhs; + this.sideEffects = sideEffects; + } + render({ _n }) { + return `${this.lhs} = ${this.rhs};` + _n; + } + optimizeNames(names, constants) { + if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects) + return; + this.rhs = optimizeExpr(this.rhs, names, constants); + return this; + } + get names() { + const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names }; + return addExprNames(names, this.rhs); + } + }; + var AssignOp = class extends Assign { + constructor(lhs, op, rhs, sideEffects) { + super(lhs, rhs, sideEffects); + this.op = op; + } + render({ _n }) { + return `${this.lhs} ${this.op}= ${this.rhs};` + _n; + } + }; + var Label = class extends Node { + constructor(label) { + super(); + this.label = label; + this.names = {}; + } + render({ _n }) { + return `${this.label}:` + _n; + } + }; + var Break = class extends Node { + constructor(label) { + super(); + this.label = label; + this.names = {}; + } + render({ _n }) { + const label = this.label ? ` ${this.label}` : ""; + return `break${label};` + _n; + } + }; + var Throw = class extends Node { + constructor(error2) { + super(); + this.error = error2; + } + render({ _n }) { + return `throw ${this.error};` + _n; + } + get names() { + return this.error.names; + } + }; + var AnyCode = class extends Node { + constructor(code) { + super(); + this.code = code; + } + render({ _n }) { + return `${this.code};` + _n; + } + optimizeNodes() { + return `${this.code}` ? this : void 0; + } + optimizeNames(names, constants) { + this.code = optimizeExpr(this.code, names, constants); + return this; + } + get names() { + return this.code instanceof code_1._CodeOrName ? this.code.names : {}; + } + }; + var ParentNode = class extends Node { + constructor(nodes = []) { + super(); + this.nodes = nodes; + } + render(opts) { + return this.nodes.reduce((code, n8) => code + n8.render(opts), ""); + } + optimizeNodes() { + const { nodes } = this; + let i2 = nodes.length; + while (i2--) { + const n8 = nodes[i2].optimizeNodes(); + if (Array.isArray(n8)) + nodes.splice(i2, 1, ...n8); + else if (n8) + nodes[i2] = n8; + else + nodes.splice(i2, 1); + } + return nodes.length > 0 ? this : void 0; + } + optimizeNames(names, constants) { + const { nodes } = this; + let i2 = nodes.length; + while (i2--) { + const n8 = nodes[i2]; + if (n8.optimizeNames(names, constants)) + continue; + subtractNames(names, n8.names); + nodes.splice(i2, 1); + } + return nodes.length > 0 ? this : void 0; + } + get names() { + return this.nodes.reduce((names, n8) => addNames(names, n8.names), {}); + } + }; + var BlockNode = class extends ParentNode { + render(opts) { + return "{" + opts._n + super.render(opts) + "}" + opts._n; + } + }; + var Root10 = class extends ParentNode { + }; + var Else = class extends BlockNode { + }; + Else.kind = "else"; + var If = class _If extends BlockNode { + constructor(condition, nodes) { + super(nodes); + this.condition = condition; + } + render(opts) { + let code = `if(${this.condition})` + super.render(opts); + if (this.else) + code += "else " + this.else.render(opts); + return code; + } + optimizeNodes() { + super.optimizeNodes(); + const cond = this.condition; + if (cond === true) + return this.nodes; + let e2 = this.else; + if (e2) { + const ns2 = e2.optimizeNodes(); + e2 = this.else = Array.isArray(ns2) ? new Else(ns2) : ns2; + } + if (e2) { + if (cond === false) + return e2 instanceof _If ? e2 : e2.nodes; + if (this.nodes.length) + return this; + return new _If(not(cond), e2 instanceof _If ? [e2] : e2.nodes); + } + if (cond === false || !this.nodes.length) + return void 0; + return this; + } + optimizeNames(names, constants) { + var _a; + this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants); + if (!(super.optimizeNames(names, constants) || this.else)) + return; + this.condition = optimizeExpr(this.condition, names, constants); + return this; + } + get names() { + const names = super.names; + addExprNames(names, this.condition); + if (this.else) + addNames(names, this.else.names); + return names; + } + }; + If.kind = "if"; + var For = class extends BlockNode { + }; + For.kind = "for"; + var ForLoop = class extends For { + constructor(iteration) { + super(); + this.iteration = iteration; + } + render(opts) { + return `for(${this.iteration})` + super.render(opts); + } + optimizeNames(names, constants) { + if (!super.optimizeNames(names, constants)) + return; + this.iteration = optimizeExpr(this.iteration, names, constants); + return this; + } + get names() { + return addNames(super.names, this.iteration.names); + } + }; + var ForRange = class extends For { + constructor(varKind, name, from, to2) { + super(); + this.varKind = varKind; + this.name = name; + this.from = from; + this.to = to2; + } + render(opts) { + const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind; + const { name, from, to: to2 } = this; + return `for(${varKind} ${name}=${from}; ${name}<${to2}; ${name}++)` + super.render(opts); + } + get names() { + const names = addExprNames(super.names, this.from); + return addExprNames(names, this.to); + } + }; + var ForIter = class extends For { + constructor(loop, varKind, name, iterable) { + super(); + this.loop = loop; + this.varKind = varKind; + this.name = name; + this.iterable = iterable; + } + render(opts) { + return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts); + } + optimizeNames(names, constants) { + if (!super.optimizeNames(names, constants)) + return; + this.iterable = optimizeExpr(this.iterable, names, constants); + return this; } - - 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') + get names() { + return addNames(super.names, this.iterable.names); } - } - - // 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) { - throw parsingError('expected CRLF') - } 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 = '' + }; + var Func = class extends BlockNode { + constructor(name, args, async) { + super(); + this.name = name; + this.args = args; + this.async = async; } - - // 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 = decoderIgnoreBOM.decode(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(webidl.is.USVString(name)) - assert((typeof value === 'string' && webidl.is.USVString(value)) || webidl.is.File(value)) - - // 5.13. Create an entry with name and value, and append it to entry list. - entryList.push(makeEntry(name, value, filename)) - } -} - -/** - * Parses content-disposition attributes (e.g., name="value" or filename*=utf-8''encoded) - * @param {Buffer} input - * @param {{ position: number }} position - * @returns {{ name: string, value: string }} - */ -function parseContentDispositionAttribute (input, position) { - // Skip leading semicolon and whitespace - if (input[position.position] === 0x3b /* ; */) { - position.position++ - } - - // Skip whitespace - collectASequenceOfBytes( - (char) => char === 0x20 || char === 0x09, - input, - position - ) - - // Collect attribute name (token characters) - const attributeName = collectASequenceOfBytes( - (char) => isToken(char) && char !== 0x3d && char !== 0x2a, // not = or * - input, - position - ) - - if (attributeName.length === 0) { - return null - } - - const attrNameStr = attributeName.toString('ascii').toLowerCase() - - // Check for extended notation (attribute*) - const isExtended = input[position.position] === 0x2a /* * */ - if (isExtended) { - position.position++ // skip * - } - - // Expect = sign - if (input[position.position] !== 0x3d /* = */) { - return null - } - position.position++ // skip = - - // Skip whitespace - collectASequenceOfBytes( - (char) => char === 0x20 || char === 0x09, - input, - position - ) - - let value - - if (isExtended) { - // Extended attribute format: charset'language'encoded-value - const headerValue = collectASequenceOfBytes( - (char) => char !== 0x20 && char !== 0x0d && char !== 0x0a && char !== 0x3b, // not space, CRLF, or ; - input, - position - ) - - // Check for utf-8'' prefix (case insensitive) - if ( - (headerValue[0] !== 0x75 && headerValue[0] !== 0x55) || // u or U - (headerValue[1] !== 0x74 && headerValue[1] !== 0x54) || // t or T - (headerValue[2] !== 0x66 && headerValue[2] !== 0x46) || // f or F - headerValue[3] !== 0x2d || // - - headerValue[4] !== 0x38 // 8 - ) { - throw parsingError('unknown encoding, expected utf-8\'\'') - } - - // Skip utf-8'' and decode the rest - value = decodeURIComponent(decoder.decode(headerValue.subarray(7))) - } else if (input[position.position] === 0x22 /* " */) { - // Quoted string - position.position++ // skip opening quote - - const quotedValue = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d && char !== 0x22, // not LF, CR, or " - input, - position - ) - - if (input[position.position] !== 0x22) { - throw parsingError('Closing quote not found') - } - position.position++ // skip closing quote - - value = decoder.decode(quotedValue) - .replace(/%0A/ig, '\n') - .replace(/%0D/ig, '\r') - .replace(/%22/g, '"') - } else { - // Token value (no quotes) - const tokenValue = collectASequenceOfBytes( - (char) => isToken(char) && char !== 0x3b, // not ; - input, - position - ) - - value = decoder.decode(tokenValue) - } - - return { name: attrNameStr, value } -} - -/** - * @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) { - throw parsingError('header name is null') - } - - // 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())) { - throw parsingError('header name does not match the field-name token production') - } - - // 2.5. If the byte at position is not 0x3A (:), return failure. - if (input[position.position] !== 0x3a) { - throw parsingError('expected :') - } - - // 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': { - name = filename = null - - // Collect the disposition type (should be "form-data") - const dispositionType = collectASequenceOfBytes( - (char) => isToken(char), - input, - position - ) - - if (dispositionType.toString('ascii').toLowerCase() !== 'form-data') { - throw parsingError('expected form-data for content-disposition header') - } - - // Parse attributes recursively until CRLF - while ( - position.position < input.length && - input[position.position] !== 0x0d && - input[position.position + 1] !== 0x0a - ) { - const attribute = parseContentDispositionAttribute(input, position) - - if (!attribute) { - break - } - - if (attribute.name === 'name') { - name = attribute.value - } else if (attribute.name === 'filename') { - filename = attribute.value - } - } - - if (name === null) { - throw parsingError('name attribute is required in content-disposition header') - } - - break + render(opts) { + const _async = this.async ? "async " : ""; + return `${_async}function ${this.name}(${this.args})` + super.render(opts); } - 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 + }; + Func.kind = "func"; + var Return = class extends ParentNode { + render(opts) { + return "return " + super.render(opts); } - 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 + }; + Return.kind = "return"; + var Try = class extends BlockNode { + render(opts) { + let code = "try" + super.render(opts); + if (this.catch) + code += this.catch.render(opts); + if (this.finally) + code += this.finally.render(opts); + return code; } - 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 - ) + optimizeNodes() { + var _a, _b; + super.optimizeNodes(); + (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes(); + (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes(); + return this; } - } - - // 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) { - throw parsingError('expected CRLF') - } else { - position.position += 2 - } - } -} - -/** - * @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 -} - -function parsingError (cause) { - return new TypeError('Failed to parse body as FormData.', { cause: new TypeError(cause) }) -} - -/** - * CTL = - * @param {number} char - */ -function isCTL (char) { - return char <= 0x1f || char === 0x7f -} - -/** - * tspecials := "(" / ")" / "<" / ">" / "@" / - * "," / ";" / ":" / "\" / <"> - * "/" / "[" / "]" / "?" / "=" - * ; Must be in quoted-string, - * ; to use within parameter values - * @param {number} char - */ -function isTSpecial (char) { - return ( - char === 0x28 || // ( - char === 0x29 || // ) - char === 0x3c || // < - char === 0x3e || // > - char === 0x40 || // @ - char === 0x2c || // , - char === 0x3b || // ; - char === 0x3a || // : - char === 0x5c || // \ - char === 0x22 || // " - char === 0x2f || // / - char === 0x5b || // [ - char === 0x5d || // ] - char === 0x3f || // ? - char === 0x3d // + - ) -} - -/** - * token := 1* - * @param {number} char - */ -function isToken (char) { - return ( - char <= 0x7f && // ascii - char !== 0x20 && // space - char !== 0x09 && - !isCTL(char) && - !isTSpecial(char) - ) -} - -module.exports = { - multipartFormDataParser, - validateBoundary -} - - -/***/ }), - -/***/ 73162: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { iteratorMixin } = __nccwpck_require__(1310) -const { kEnumerableProperty } = __nccwpck_require__(83983) -const { webidl } = __nccwpck_require__(81040) -const nodeUtil = __nccwpck_require__(47261) - -// https://xhr.spec.whatwg.org/#formdata -class FormData { - #state = [] - - constructor (form = undefined) { - webidl.util.markAsUncloneable(this) - - if (form !== undefined) { - throw webidl.errors.conversionFailed({ - prefix: 'FormData constructor', - argument: 'Argument 1', - types: ['undefined'] - }) - } - } - - append (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.append' - webidl.argumentLengthCheck(arguments, 2, prefix) - - name = webidl.converters.USVString(name) - - if (arguments.length === 3 || webidl.is.Blob(value)) { - value = webidl.converters.Blob(value, prefix, 'value') - - if (filename !== undefined) { - filename = webidl.converters.USVString(filename) + optimizeNames(names, constants) { + var _a, _b; + super.optimizeNames(names, constants); + (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants); + (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants); + return this; } - } else { - value = webidl.converters.USVString(value) - } - - // 1. Let value be value if given; otherwise blobValue. - - // 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.#state.push(entry) - } - - delete (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name) - - // The delete(name) method steps are to remove all entries whose name - // is name from this’s entry list. - this.#state = this.#state.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) - - // 1. If there is no entry whose name is name in this’s entry list, - // then return null. - const idx = this.#state.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.#state[idx].value - } - - getAll (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.getAll' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(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.#state - .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) - - // 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.#state.findIndex((entry) => entry.name === name) !== -1 - } - - set (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.set' - webidl.argumentLengthCheck(arguments, 2, prefix) - - name = webidl.converters.USVString(name) - - if (arguments.length === 3 || webidl.is.Blob(value)) { - value = webidl.converters.Blob(value, prefix, 'value') - - if (filename !== undefined) { - filename = webidl.converters.USVString(filename) + get names() { + const names = super.names; + if (this.catch) + addNames(names, this.catch.names); + if (this.finally) + addNames(names, this.finally.names); + return names; } - } else { - value = webidl.converters.USVString(value) - } - - // The set(name, value) and set(name, blobValue, filename) method steps - // are: - - // 1. Let value be value if given; otherwise blobValue. - - // 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.#state.findIndex((entry) => entry.name === name) - if (idx !== -1) { - this.#state = [ - ...this.#state.slice(0, idx), - entry, - ...this.#state.slice(idx + 1).filter((entry) => entry.name !== name) - ] - } else { - // 4. Otherwise, append entry to this’s entry list. - this.#state.push(entry) - } - } - - [nodeUtil.inspect.custom] (depth, options) { - const state = this.#state.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 + }; + var Catch = class extends BlockNode { + constructor(error2) { + super(); + this.error = error2; } - - 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)}` - } - - /** - * @param {FormData} formData - */ - static getFormDataState (formData) { - return formData.#state - } - - /** - * @param {FormData} formData - * @param {any[]} newState - */ - static setFormDataState (formData, newState) { - formData.#state = newState - } -} - -const { getFormDataState, setFormDataState } = FormData -Reflect.deleteProperty(FormData, 'getFormDataState') -Reflect.deleteProperty(FormData, 'setFormDataState') - -iteratorMixin('FormData', FormData, getFormDataState, '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 (!webidl.is.File(value)) { - value = new File([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 + render(opts) { + return `catch(${this.error})` + super.render(opts); } - - value = new File([value], filename, options) - } - } - - // 4. Return an entry whose name is name and whose value is value. - return { name, value } -} - -webidl.is.FormData = webidl.util.MakeTypeAssertion(FormData) - -module.exports = { FormData, makeEntry, setFormDataState } - - -/***/ }), - -/***/ 52850: -/***/ ((module) => { - -"use strict"; - - -// 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 -} - - -/***/ }), - -/***/ 52991: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { kConstruct } = __nccwpck_require__(72785) -const { kEnumerableProperty } = __nccwpck_require__(83983) -const { - iteratorMixin, - isValidHeaderName, - isValidHeaderValue -} = __nccwpck_require__(1310) -const { webidl } = __nccwpck_require__(81040) -const assert = __nccwpck_require__(98061) -const util = __nccwpck_require__(47261) - -/** - * @param {number} code - * @returns {code is (0x0a | 0x0d | 0x09 | 0x20)} - */ -function isHTTPWhiteSpaceCharCode (code) { - return code === 0x0a || code === 0x0d || code === 0x09 || code === 0x20 -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize - * @param {string} potentialValue - * @returns {string} - */ -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) -} - -/** - * @param {Headers} headers - * @param {Array|Object} object - */ -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}.` - }) + }; + Catch.kind = "catch"; + var Finally = class extends BlockNode { + render(opts) { + return "finally" + super.render(opts); + } + }; + Finally.kind = "finally"; + var CodeGen = class { + constructor(extScope, opts = {}) { + this._values = {}; + this._blockStarts = []; + this._constants = {}; + this.opts = { ...opts, _n: opts.lines ? "\n" : "" }; + this._extScope = extScope; + this._scope = new scope_1.Scope({ parent: extScope }); + this._nodes = [new Root10()]; } - - // 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 - * @param {Headers} headers - * @param {string} name - * @param {string} value - */ -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 -} - -// https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine -/** - * @param {Headers} target - */ -function headersListSortAndCombine (target) { - const headersList = getHeadersList(target) - - if (!headersList) { - return [] - } - - if (headersList.sortedMap) { - return headersList.sortedMap - } - - // 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 = headersList.toSortedArray() - - const cookies = 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 (headersList.sortedMap = 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]]) + toString() { + return this._root.render(this.opts); } - } 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 (headersList.sortedMap = headers) -} - -function compareHeaderName (a, b) { - return a[0] < b[0] ? -1 : 1 -} - -class HeadersList { - /** @type {[string, string][]|null} */ - cookies = null - - sortedMap - headersMap - - constructor (init) { - if (init instanceof HeadersList) { - this.headersMap = new Map(init.headersMap) - this.sortedMap = init.sortedMap - this.cookies = init.cookies === null ? null : [...init.cookies] - } else { - this.headersMap = new Map(init) - this.sortedMap = 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.headersMap.has(isLowerCase ? name : name.toLowerCase()) - } - - clear () { - this.headersMap.clear() - this.sortedMap = 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.sortedMap = 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.headersMap.get(lowercaseName) - - // 2. Append (name, value) to list. - if (exists) { - const delimiter = lowercaseName === 'cookie' ? '; ' : ', ' - this.headersMap.set(lowercaseName, { - name: exists.name, - value: `${exists.value}${delimiter}${value}` - }) - } else { - this.headersMap.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.sortedMap = 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.headersMap.set(lowercaseName, { name, value }) - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-delete - * @param {string} name - * @param {boolean} isLowerCase - */ - delete (name, isLowerCase) { - this.sortedMap = null - if (!isLowerCase) name = name.toLowerCase() - - if (name === 'set-cookie') { - this.cookies = null - } - - this.headersMap.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.headersMap.get(isLowerCase ? name : name.toLowerCase())?.value ?? null - } - - * [Symbol.iterator] () { - // use the lowercased name - for (const { 0: name, 1: { value } } of this.headersMap) { - yield [name, value] - } - } - - get entries () { - const headers = {} - - if (this.headersMap.size !== 0) { - for (const { name, value } of this.headersMap.values()) { - headers[name] = value + // returns unique name in the internal scope + name(prefix) { + return this._scope.name(prefix); } - } - - return headers - } - - rawValues () { - return this.headersMap.values() - } - - get entriesList () { - const headers = [] - - if (this.headersMap.size !== 0) { - for (const { 0: lowerName, 1: { name, value } } of this.headersMap) { - 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.headersMap.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.headersMap[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 - } + // reserves unique name in the external scope + scopeName(prefix) { + return this._extScope.name(prefix); } - /* c8 ignore next 4 */ - if (!iterator.next().done) { - // This is for debugging and will never be called. - throw new TypeError('Unreachable') + // reserves unique name in the external scope and assigns value to it + scopeValue(prefixOrName, value) { + const name = this._extScope.value(prefixOrName, value); + const vs2 = this._values[name.prefix] || (this._values[name.prefix] = /* @__PURE__ */ new Set()); + vs2.add(name); + return name; } - return array - } else { - // This case would be a rare occurrence. - // slow-path: fallback - let i = 0 - for (const { 0: name, 1: { value } } of this.headersMap) { - 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) + getScopeValue(prefix, keyOrRef) { + return this._extScope.getValue(prefix, keyOrRef); } - return array.sort(compareHeaderName) - } - } -} - -// https://fetch.spec.whatwg.org/#headers-class -class Headers { - #guard - /** - * @type {HeadersList} - */ - #headersList - - /** - * @param {HeadersInit|Symbol} [init] - * @returns - */ - 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 constructor', '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 [] - } - - [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 - } - - /** - * @param {Headers} o - */ - static getHeadersList (o) { - return o.#headersList - } - - /** - * @param {Headers} target - * @param {HeadersList} list - */ - static setHeadersList (target, list) { - target.#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, headersListSortAndCombine, 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) === webidl.util.Types.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 + // return code that assigns values in the external scope to the names that are used internally + // (same names that were returned by gen.scopeName or gen.scopeValue) + scopeRefs(scopeName) { + return this._extScope.scopeRefs(scopeName, this._values); } - } - - 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 -} - - -/***/ }), - -/***/ 85170: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { - makeNetworkError, - makeAppropriateNetworkError, - filterResponse, - makeResponse, - fromInnerResponse, - getResponseState -} = __nccwpck_require__(12583) -const { HeadersList } = __nccwpck_require__(52991) -const { Request, cloneRequest, getRequestDispatcher, getRequestState } = __nccwpck_require__(20610) -const zlib = __nccwpck_require__(65628) -const { - makePolicyContainer, - clonePolicyContainer, - requestBadPort, - TAOCheck, - appendRequestOriginHeader, - responseLocationURL, - requestCurrentURL, - setRequestReferrerPolicyOnRedirect, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - createOpaqueTimingInfo, - appendFetchMetadata, - corsCheck, - crossOriginResourcePolicyCheck, - determineRequestsReferrer, - coarsenedSharedCurrentTime, - sameOrigin, - isCancelled, - isAborted, - isErrorLike, - fullyReadBody, - readableStreamClose, - urlIsLocal, - urlIsHttpHttpsScheme, - urlHasHttpsScheme, - clampAndCoarsenConnectionTimingInfo, - simpleRangeHeaderValue, - buildContentRange, - createInflate, - extractMimeType, - hasAuthenticationEntry, - includesCredentials, - isTraversableNavigable -} = __nccwpck_require__(1310) -const assert = __nccwpck_require__(98061) -const { safelyExtractBody, extractBody } = __nccwpck_require__(36682) -const { - redirectStatusSet, - nullBodyStatus, - safeMethodsSet, - requestBodyHeader, - subresourceSet -} = __nccwpck_require__(68160) -const EE = __nccwpck_require__(15673) -const { Readable, pipeline, finished, isErrored, isReadable } = __nccwpck_require__(84492) -const { addAbortListener, bufferToLowerCasedHeaderName } = __nccwpck_require__(83983) -const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = __nccwpck_require__(17704) -const { getGlobalDispatcher } = __nccwpck_require__(21892) -const { webidl } = __nccwpck_require__(81040) -const { STATUS_CODES } = __nccwpck_require__(88849) -const { bytesMatch } = __nccwpck_require__(21800) -const { createDeferredPromise } = __nccwpck_require__(21489) -const { isomorphicEncode } = __nccwpck_require__(93082) -const { runtimeFeatures } = __nccwpck_require__(15072) - -// Node.js v23.8.0+ and v22.15.0+ supports Zstandard -const hasZstd = runtimeFeatures.has('zstd') - -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 = getRequestState(requestObject) - - // 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, null) - - // 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, controller.controller) - } - ) - - // 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, controller.controller) - 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: getRequestDispatcher(requestObject), // undici - // Keep requestObject alive to prevent its AbortController from being GC'd - // See https://github.com/nodejs/undici/issues/4627 - requestObject - }) - - // 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, - '', // bodyType - response.status - ) -} - -// 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, controller /* undici-specific */) { - // 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?.stream != null && isReadable(request.body.stream)) { - request.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return + scopeCode() { + return this._extScope.scopeCode(this._values); + } + _def(varKind, nameOrPrefix, rhs, constant) { + const name = this._scope.toName(nameOrPrefix); + if (rhs !== void 0 && constant) + this._constants[name.str] = rhs; + this._leafNode(new Def(varKind, name, rhs)); + return name; + } + // `const` declaration (`var` in es5 mode) + const(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant); + } + // `let` declaration with optional assignment (`var` in es5 mode) + let(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant); + } + // `var` declaration with optional assignment + var(nameOrPrefix, rhs, _constant) { + return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant); } - throw err - }) - } - - // 3. If responseObject is null, then return. - if (responseObject == null) { - return - } - - // 4. Let response be responseObject’s response. - const response = getResponseState(responseObject) - - // 5. If response’s body is not null and is readable, then error response’s - // body with error. - if (response.body?.stream != null && isReadable(response.body.stream)) { - controller.error(error) - } -} - -// https://fetch.spec.whatwg.org/#fetching -function fetching ({ - request, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseEndOfBody, - processResponseConsumeBody, - useParallelQueue = false, - dispatcher = getGlobalDispatcher(), // undici - requestObject = null // Keep alive to prevent AbortController GC, see #4627 -}) { - // 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, - // Keep requestObject alive to prevent its AbortController from being GC'd - requestObject - } - - // 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, false) - - // 17. Return fetchParam's controller - return fetchParams.controller -} - -// https://fetch.spec.whatwg.org/#concept-main-fetch -async function mainFetch (fetchParams, recursive) { - try { - // 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) { - 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. - response = await schemeFetch(fetchParams) - - // request’s mode is "same-origin" - } else if (request.mode === 'same-origin') { - // 1. Return a network error. - response = makeNetworkError('request mode cannot be "same-origin"') - - // request’s mode is "no-cors" - } else if (request.mode === 'no-cors') { - // 1. If request’s redirect mode is not "follow", then return a network - // error. - if (request.redirect !== 'follow') { - response = makeNetworkError( - 'redirect mode cannot be "follow" for "no-cors" request' - ) - } else { - // 2. Set request’s response tainting to "opaque". - request.responseTainting = 'opaque' - - // 3. Return the result of running scheme fetch given fetchParams. - response = await schemeFetch(fetchParams) - } - // request’s current URL’s scheme is not an HTTP(S) scheme - } else if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { - // Return a network error. - response = 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 - } else { - // 1. Set request’s response tainting to "cors". - request.responseTainting = 'cors' - - // 2. Return the result of running HTTP fetch given fetchParams. - response = 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. - fullyReadBody(response.body, processBody, processBodyError) - } else { - // 21. Otherwise, run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } - } catch (err) { - fetchParams.controller.terminate(err) - } -} - -// 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__(72254).resolveObjectURL) + // assignment code + assign(lhs, rhs, sideEffects) { + return this._leafNode(new Assign(lhs, rhs, sideEffects)); } - - // 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.')) + // `+=` code + add(lhs, rhs) { + return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs)); } - - 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' || !webidl.is.Blob(blob)) { - return Promise.resolve(makeNetworkError('invalid method')) + // appends passed SafeExpr to code or executes Block + code(c2) { + if (typeof c2 == "function") + c2(); + else if (c2 !== code_1.nil) + this._leafNode(new AnyCode(c2)); + return this; } - - // 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 + // returns code for object literal for the passed argument list of key-value pairs + object(...keyValues) { + const code = ["{"]; + for (const [key, value] of keyValues) { + if (code.length > 1) + code.push(","); + code.push(key); + if (key !== value || this.opts.es5) { + code.push(":"); + (0, code_1.addCodeArg)(code, value); } } - - // 8. Let slicedBlob be the result of invoking slice blob given blob, rangeStart, - // rangeEnd + 1, and type. - const slicedBlob = blob.slice(rangeStart, rangeEnd + 1, 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) + code.push("}"); + return new code_1._Code(code); } - - // 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')) + // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed) + if(condition, thenBody, elseBody) { + this._blockNode(new If(condition)); + if (thenBody && elseBody) { + this.code(thenBody).else().code(elseBody).endIf(); + } else if (thenBody) { + this.code(thenBody).endIf(); + } else if (elseBody) { + throw new Error('CodeGen: "else" body without "then" body'); + } + return this; } - - // 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 (!urlIsHttpHttpsScheme(fetchParams.request.url)) { - return + // `else if` clause - invalid without `if` or after `else` clauses + elseIf(condition) { + return this._elseNode(new If(condition)); } - - // 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 = '' + // `else` clause - only valid after `if` or `else if` clauses + else() { + return this._elseNode(new Else()); } - - // 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) - } + // end `if` statement (needed if gen.if was used only with condition) + endIf() { + return this._endBlockNode(If, Else); } - - // 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) { - markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus) + _for(node, forBody) { + this._blockNode(node); + if (forBody) + this.code(forBody).endFor(); + return this; } - } - - // 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)) + // a generic `for` clause (or statement if `forBody` is passed) + for(iteration, forBody) { + return this._for(new ForLoop(iteration), forBody); } - - // 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() + // `for` statement for a range of values + forRange(nameOrPrefix, from, to2, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) { + const name = this._scope.toName(nameOrPrefix); + return this._for(new ForRange(varKind, name, from, to2), () => forBody(name)); } + // `for-of` statement (in es5 mode replace with a normal for loop) + forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) { + const name = this._scope.toName(nameOrPrefix); + if (this.opts.es5) { + const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable); + return this.forRange("_i", 0, (0, code_1._)`${arr}.length`, (i2) => { + this.var(name, (0, code_1._)`${arr}[${i2}]`); + forBody(name); + }); + } + return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name)); + } + // `for-in` statement. + // With option `ownProperties` replaced with a `for-of` loop for object keys + forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) { + if (this.opts.ownProperties) { + return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody); + } + const name = this._scope.toName(nameOrPrefix); + return this._for(new ForIter("in", varKind, name, obj), () => forBody(name)); + } + // end `for` loop + endFor() { + return this._endBlockNode(For); + } + // `label` statement + label(label) { + return this._leafNode(new Label(label)); + } + // `break` statement + break(label) { + return this._leafNode(new Break(label)); + } + // `return` statement + return(value) { + const node = new Return(); + this._blockNode(node); + this.code(value); + if (node.nodes.length !== 1) + throw new Error('CodeGen: "return" should have one node'); + return this._endBlockNode(Return); + } + // `try` statement + try(tryBody, catchCode, finallyCode) { + if (!catchCode && !finallyCode) + throw new Error('CodeGen: "try" without "catch" and "finally"'); + const node = new Try(); + this._blockNode(node); + this.code(tryBody); + if (catchCode) { + const error2 = this.name("e"); + this._currNode = node.catch = new Catch(error2); + catchCode(error2); + } + if (finallyCode) { + this._currNode = node.finally = new Finally(); + this.code(finallyCode); + } + return this._endBlockNode(Catch, Finally); + } + // `throw` statement + throw(error2) { + return this._leafNode(new Throw(error2)); + } + // start self-balancing block + block(body, nodeCount) { + this._blockStarts.push(this._nodes.length); + if (body) + this.code(body).endBlock(nodeCount); + return this; + } + // end the current self-balancing block + endBlock(nodeCount) { + const len = this._blockStarts.pop(); + if (len === void 0) + throw new Error("CodeGen: not in self-balancing block"); + const toClose = this._nodes.length - len; + if (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) { + throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`); + } + this._nodes.length = len; + return this; + } + // `function` heading (or definition if funcBody is passed) + func(name, args = code_1.nil, async, funcBody) { + this._blockNode(new Func(name, args, async)); + if (funcBody) + this.code(funcBody).endFunc(); + return this; + } + // end function definition + endFunc() { + return this._endBlockNode(Func); + } + optimize(n8 = 1) { + while (n8-- > 0) { + this._root.optimizeNodes(); + this._root.optimizeNames(this._root.names, this._constants); + } + } + _leafNode(node) { + this._currNode.nodes.push(node); + return this; + } + _blockNode(node) { + this._currNode.nodes.push(node); + this._nodes.push(node); + } + _endBlockNode(N1, N22) { + const n8 = this._currNode; + if (n8 instanceof N1 || N22 && n8 instanceof N22) { + this._nodes.pop(); + return this; + } + throw new Error(`CodeGen: not in block "${N22 ? `${N1.kind}/${N22.kind}` : N1.kind}"`); + } + _elseNode(node) { + const n8 = this._currNode; + if (!(n8 instanceof If)) { + throw new Error('CodeGen: "else" without "if"'); + } + this._currNode = n8.else = node; + return this; + } + get _root() { + return this._nodes[0]; + } + get _currNode() { + const ns2 = this._nodes; + return ns2[ns2.length - 1]; + } + set _currNode(node) { + const ns2 = this._nodes; + ns2[ns2.length - 1] = node; + } + }; + exports.CodeGen = CodeGen; + function addNames(names, from) { + for (const n8 in from) + names[n8] = (names[n8] || 0) + (from[n8] || 0); + return names; } - - // 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 (webidl.is.URL(httpRequest.referrer)) { - 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, true) - } - - // 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) + function addExprNames(names, from) { + return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names; } - } - - httpRequest.headersList.delete('host', true) - - // 21. 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: - if (!httpRequest.headersList.contains('authorization', true)) { - // 1. Let authorizationValue be null. - let authorizationValue = null - - // 2. If there’s an authentication entry for httpRequest and either - // httpRequest’s use-URL-credentials flag is unset or httpRequest’s - // current URL does not include credentials, then set - // authorizationValue to authentication entry. - if (hasAuthenticationEntry(httpRequest) && ( - httpRequest.useURLCredentials === undefined || !includesCredentials(requestCurrentURL(httpRequest)) - )) { - // TODO - } else if (includesCredentials(requestCurrentURL(httpRequest)) && isAuthenticationFetch) { - // 3. Otherwise, if httpRequest’s current URL does include credentials - // and isAuthenticationFetch is true, set authorizationValue to - // httpRequest’s current URL, converted to an `Authorization` value - const { username, password } = requestCurrentURL(httpRequest) - authorizationValue = `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}` + function optimizeExpr(expr, names, constants) { + if (expr instanceof code_1.Name) + return replaceName(expr); + if (!canOptimize(expr)) + return expr; + return new code_1._Code(expr._items.reduce((items, c2) => { + if (c2 instanceof code_1.Name) + c2 = replaceName(c2); + if (c2 instanceof code_1._Code) + items.push(...c2._items); + else + items.push(c2); + return items; + }, [])); + function replaceName(n8) { + const c2 = constants[n8.str]; + if (c2 === void 0 || names[n8.str] !== 1) + return n8; + delete names[n8.str]; + return c2; } - - // 4. If authorizationValue is non-null, then append (`Authorization`, - // authorizationValue) to httpRequest’s header list. - if (authorizationValue !== null) { - httpRequest.headersList.append('Authorization', authorizationValue, false) + function canOptimize(e2) { + return e2 instanceof code_1._Code && e2._items.some((c2) => c2 instanceof code_1.Name && names[c2.str] === 1 && constants[c2.str] !== void 0); } } - } - - // 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') + function subtractNames(names, from) { + for (const n8 in from) + names[n8] = (names[n8] || 0) - (from[n8] || 0); } - - // 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 + function not(x3) { + return typeof x3 == "boolean" || typeof x3 == "number" || x3 === null ? !x3 : (0, code_1._)`!${par(x3)}`; } - - // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, - // then: - if (revalidatingFlag && forwardResponse.status === 304) { - // TODO: cache + exports.not = not; + var andCode = mappend(exports.operators.AND); + function and(...args) { + return args.reduce(andCode); } - - // 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 + exports.and = and; + var orCode = mappend(exports.operators.OR); + function or2(...args) { + return args.reduce(orCode); } - } - - // 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 traversable for user prompts is - // a traversable navigable: - // - // In Node.js there is no traversable navigable to prompt the user, but we - // still need to handle URL-embedded credentials so authentication retries - // for WebSocket handshakes continue to work. - if (response.status === 401 && httpRequest.responseTainting !== 'cors' && includeCredentials && ( - request.useURLCredentials !== undefined || - isTraversableNavigable(request.traversableForUserPrompts) - )) { - // 2. If request’s body is non-null, then: - if (request.body != null) { - // 1. If request’s body’s source is null, then return a network error. - if (request.body.source == null) { - // Note: In Node.js, this code path should not be reached because - // isTraversableNavigable() returns false for non-navigable contexts. - // However, we handle it gracefully by returning the response instead of - // a network error, as we won't actually retry the request. - // This aligns with the Fetch spec discussion in whatwg/fetch#1132, - // which allows implementations flexibility when credentials can't be obtained. - return response - } - - // 2. Set request’s body to the body of the result of safely extracting - // request’s body’s source. - request.body = safelyExtractBody(request.body.source)[0] + exports.or = or2; + function mappend(op) { + return (x3, y2) => x3 === code_1.nil ? y2 : y2 === code_1.nil ? x3 : (0, code_1._)`${par(x3)} ${op} ${par(y2)}`; } - - // 3. If request’s use-URL-credentials flag is unset or isAuthenticationFetch is - // true, then: - if (request.useURLCredentials === undefined || isAuthenticationFetch) { - // 1. If fetchParams is canceled, then return the appropriate network error - // for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) - } - - // 2. Let username and password be the result of prompting the end user for a - // username and password, respectively, in request’s traversable for user prompts. - // TODO - - // 3. Set the username given request’s current URL and username. - // requestCurrentURL(request).username = TODO - - // 4. Set the password given request’s current URL and password. - // requestCurrentURL(request).password = TODO - - // In browsers, the user will be prompted to enter a username/password before the request - // is re-sent. To prevent an infinite 401 loop, return the response for now. - // https://github.com/nodejs/undici/pull/4756 - return response + function par(x3) { + return x3 instanceof code_1.Name ? x3 : (0, code_1._)`(${x3})`; } - - // 4. Set response to the result of running HTTP-network-or-cache fetch given - // fetchParams and true. - fetchParams.controller.connection.destroy() - - response = await httpNetworkOrCacheFetch(fetchParams, true) } +}); - // 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() +// node_modules/ajv/dist/compile/util.js +var require_util8 = __commonJS({ + "node_modules/ajv/dist/compile/util.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0; + var codegen_1 = require_codegen2(); + var code_1 = require_code3(); + function toHash(arr) { + const hash = {}; + for (const item of arr) + hash[item] = true; + return hash; } - - // 2. ??? - - // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) + exports.toHash = toHash; + function alwaysValidSchema(it3, schema2) { + if (typeof schema2 == "boolean") + return schema2; + if (Object.keys(schema2).length === 0) + return true; + checkUnknownRules(it3, schema2); + return !schemaHasRules(schema2, it3.self.RULES.all); } - - // 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) + exports.alwaysValidSchema = alwaysValidSchema; + function checkUnknownRules(it3, schema2 = it3.schema) { + const { opts, self } = it3; + if (!opts.strictSchema) + return; + if (typeof schema2 === "boolean") + return; + const rules8 = self.RULES.keywords; + for (const key in schema2) { + if (!rules8[key]) + checkStrictMode(it3, `unknown keyword: "${key}"`); + } + } + exports.checkUnknownRules = checkUnknownRules; + function schemaHasRules(schema2, rules8) { + if (typeof schema2 == "boolean") + return !schema2; + for (const key in schema2) + if (rules8[key]) + return true; + return false; } - - // 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')) - } + exports.schemaHasRules = schemaHasRules; + function schemaHasRulesButRef(schema2, RULES) { + if (typeof schema2 == "boolean") + return !schema2; + for (const key in schema2) + if (key !== "$ref" && RULES.all[key]) + return true; + return false; + } + exports.schemaHasRulesButRef = schemaHasRulesButRef; + function schemaRefOrVal({ topSchemaRef, schemaPath }, schema2, keyword, $data) { + if (!$data) { + if (typeof schema2 == "number" || typeof schema2 == "boolean") + return schema2; + if (typeof schema2 == "string") + return (0, codegen_1._)`${schema2}`; + } + return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`; + } + exports.schemaRefOrVal = schemaRefOrVal; + function unescapeFragment(str2) { + return unescapeJsonPointer(decodeURIComponent(str2)); + } + exports.unescapeFragment = unescapeFragment; + function escapeFragment(str2) { + return encodeURIComponent(escapeJsonPointer(str2)); + } + exports.escapeFragment = escapeFragment; + function escapeJsonPointer(str2) { + if (typeof str2 == "number") + return `${str2}`; + return str2.replace(/~/g, "~0").replace(/\//g, "~1"); + } + exports.escapeJsonPointer = escapeJsonPointer; + function unescapeJsonPointer(str2) { + return str2.replace(/~1/g, "/").replace(/~0/g, "~"); + } + exports.unescapeJsonPointer = unescapeJsonPointer; + function eachItem(xs2, f) { + if (Array.isArray(xs2)) { + for (const x3 of xs2) + f(x3); + } else { + f(xs2); } } + exports.eachItem = eachItem; + function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName }) { + return (gen, from, to2, toName) => { + const res = to2 === void 0 ? from : to2 instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to2) : mergeToName(gen, from, to2), to2) : from instanceof codegen_1.Name ? (mergeToName(gen, to2, from), from) : mergeValues(from, to2); + return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res; + }; + } + exports.mergeEvaluated = { + props: makeMergeEvaluated({ + mergeNames: (gen, from, to2) => gen.if((0, codegen_1._)`${to2} !== true && ${from} !== undefined`, () => { + gen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to2, true), () => gen.assign(to2, (0, codegen_1._)`${to2} || {}`).code((0, codegen_1._)`Object.assign(${to2}, ${from})`)); + }), + mergeToName: (gen, from, to2) => gen.if((0, codegen_1._)`${to2} !== true`, () => { + if (from === true) { + gen.assign(to2, true); + } else { + gen.assign(to2, (0, codegen_1._)`${to2} || {}`); + setEvaluated(gen, to2, from); + } + }), + mergeValues: (from, to2) => from === true ? true : { ...from, ...to2 }, + resultToName: evaluatedPropsToName + }), + items: makeMergeEvaluated({ + mergeNames: (gen, from, to2) => gen.if((0, codegen_1._)`${to2} !== true && ${from} !== undefined`, () => gen.assign(to2, (0, codegen_1._)`${from} === true ? true : ${to2} > ${from} ? ${to2} : ${from}`)), + mergeToName: (gen, from, to2) => gen.if((0, codegen_1._)`${to2} !== true`, () => gen.assign(to2, from === true ? true : (0, codegen_1._)`${to2} > ${from} ? ${to2} : ${from}`)), + mergeValues: (from, to2) => from === true ? true : Math.max(from, to2), + resultToName: (gen, items) => gen.var("items", items) + }) + }; + function evaluatedPropsToName(gen, ps2) { + if (ps2 === true) + return gen.var("props", true); + const props = gen.var("props", (0, codegen_1._)`{}`); + if (ps2 !== void 0) + setEvaluated(gen, props, ps2); + return props; + } + exports.evaluatedPropsToName = evaluatedPropsToName; + function setEvaluated(gen, props, ps2) { + Object.keys(ps2).forEach((p2) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p2)}`, true)); + } + exports.setEvaluated = setEvaluated; + var snippets = {}; + function useFunc(gen, f) { + return gen.scopeValue("func", { + ref: f, + code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code)) + }); + } + exports.useFunc = useFunc; + var Type; + (function(Type2) { + Type2[Type2["Num"] = 0] = "Num"; + Type2[Type2["Str"] = 1] = "Str"; + })(Type || (exports.Type = Type = {})); + function getErrorPath(dataProp, dataPropType, jsPropertySyntax) { + if (dataProp instanceof codegen_1.Name) { + const isNumber = dataPropType === Type.Num; + return jsPropertySyntax ? isNumber ? (0, codegen_1._)`"[" + ${dataProp} + "]"` : (0, codegen_1._)`"['" + ${dataProp} + "']"` : isNumber ? (0, codegen_1._)`"/" + ${dataProp}` : (0, codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`; + } + return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp); + } + exports.getErrorPath = getErrorPath; + function checkStrictMode(it3, msg, mode = it3.opts.strictSchema) { + if (!mode) + return; + msg = `strict mode: ${msg}`; + if (mode === true) + throw new Error(msg); + it3.self.logger.warn(msg); + } + exports.checkStrictMode = checkStrictMode; } +}); - // 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 +// node_modules/ajv/dist/compile/names.js +var require_names2 = __commonJS({ + "node_modules/ajv/dist/compile/names.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var names = { + // validation function arguments + data: new codegen_1.Name("data"), + // data passed to validation function + // args passed from referencing schema + valCxt: new codegen_1.Name("valCxt"), + // validation/data context - should not be used directly, it is destructured to the names below + instancePath: new codegen_1.Name("instancePath"), + parentData: new codegen_1.Name("parentData"), + parentDataProperty: new codegen_1.Name("parentDataProperty"), + rootData: new codegen_1.Name("rootData"), + // root data - same as the data passed to the first/top validation function + dynamicAnchors: new codegen_1.Name("dynamicAnchors"), + // used to support recursiveRef and dynamicRef + isAllOfVariant: new codegen_1.Name("isAllOfVariant"), + // used to check in runtime if the current function (ref) is called from allOf + // function scoped variables + vErrors: new codegen_1.Name("vErrors"), + // null or array of validation errors + errors: new codegen_1.Name("errors"), + // counter of validation errors + this: new codegen_1.Name("this"), + // "globals" + self: new codegen_1.Name("self"), + scope: new codegen_1.Name("scope"), + // JTD serialize/parse name for JSON string and position + json: new codegen_1.Name("json"), + jsonPos: new codegen_1.Name("jsonPos"), + jsonLen: new codegen_1.Name("jsonLen"), + jsonPart: new codegen_1.Name("jsonPart") + }; + exports.default = names; } +}); - // 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 +// node_modules/ajv/dist/compile/errors.js +var require_errors3 = __commonJS({ + "node_modules/ajv/dist/compile/errors.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0; + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var names_1 = require_names2(); + exports.keywordError = { + message: ({ keyword }) => (0, codegen_1.str)`must pass "${keyword}" keyword validation` + }; + exports.keyword$DataError = { + message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword}" keyword is invalid ($data)` + }; + function reportError(cxt, error2 = exports.keywordError, errorPaths, overrideAllErrors) { + const { it: it3 } = cxt; + const { gen, compositeRule, allErrors } = it3; + const errObj = errorObjectCode(cxt, error2, errorPaths); + if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) { + addError(gen, errObj); + } else { + returnErrors(it3, (0, codegen_1._)`[${errObj}]`); } - - // 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() + exports.reportError = reportError; + function reportExtraError(cxt, error2 = exports.keywordError, errorPaths) { + const { it: it3 } = cxt; + const { gen, compositeRule, allErrors } = it3; + const errObj = errorObjectCode(cxt, error2, errorPaths); + addError(gen, errObj); + if (!(compositeRule || allErrors)) { + returnErrors(it3, names_1.default.vErrors); } } - - // 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) - } + exports.reportExtraError = reportExtraError; + function resetErrorsCount(gen, errsCount) { + gen.assign(names_1.default.errors, errsCount); + gen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null))); } - - // 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) + exports.resetErrorsCount = resetErrorsCount; + function extendErrors({ gen, keyword, schemaValue, data, errsCount, it: it3 }) { + if (errsCount === void 0) + throw new Error("ajv implementation error"); + const err = gen.name("err"); + gen.forRange("i", errsCount, names_1.default.errors, (i2) => { + gen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i2}]`); + gen.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it3.errorPath))); + gen.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it3.errSchemaPath}/${keyword}`); + if (it3.opts.verbose) { + gen.assign((0, codegen_1._)`${err}.schema`, schemaValue); + gen.assign((0, codegen_1._)`${err}.data`, data); } - processEndOfBody() - } catch (err) { - processBodyError(err) + }); + } + exports.extendErrors = extendErrors; + function addError(gen, errObj) { + const err = gen.const("err", errObj); + gen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`); + gen.code((0, codegen_1._)`${names_1.default.errors}++`); + } + function returnErrors(it3, errs) { + const { gen, validateName, schemaEnv } = it3; + if (schemaEnv.$async) { + gen.throw((0, codegen_1._)`new ${it3.ValidationError}(${errs})`); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, errs); + gen.return(false); } - })() - } - - 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) + var E2 = { + keyword: new codegen_1.Name("keyword"), + schemaPath: new codegen_1.Name("schemaPath"), + // also used in JTD errors + params: new codegen_1.Name("params"), + propertyName: new codegen_1.Name("propertyName"), + message: new codegen_1.Name("message"), + schema: new codegen_1.Name("schema"), + parentSchema: new codegen_1.Name("parentSchema") + }; + function errorObjectCode(cxt, error2, errorPaths) { + const { createErrors } = cxt.it; + if (createErrors === false) + return (0, codegen_1._)`{}`; + return errorObject(cxt, error2, errorPaths); + } + function errorObject(cxt, error2, errorPaths = {}) { + const { gen, it: it3 } = cxt; + const keyValues = [ + errorInstancePath(it3, errorPaths), + errorSchemaPath(cxt, errorPaths) + ]; + extraErrorProps(cxt, error2, keyValues); + return gen.object(...keyValues); + } + function errorInstancePath({ errorPath }, { instancePath }) { + const instPath = instancePath ? (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` : errorPath; + return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)]; + } + function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) { + let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword}`; + if (schemaPath) { + schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`; + } + return [E2.schemaPath, schPath]; + } + function extraErrorProps(cxt, { params, message }, keyValues) { + const { keyword, data, schemaValue, it: it3 } = cxt; + const { opts, propertyName, topSchemaRef, schemaPath } = it3; + keyValues.push([E2.keyword, keyword], [E2.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._)`{}`]); + if (opts.messages) { + keyValues.push([E2.message, typeof message == "function" ? message(cxt) : message]); + } + if (opts.verbose) { + keyValues.push([E2.schema, schemaValue], [E2.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]); + } + if (propertyName) + keyValues.push([E2.propertyName, propertyName]); } - - return makeNetworkError(err) - } - - // 11. Let pullAlgorithm be an action that resumes the ongoing fetch - // if it is suspended. - const pullAlgorithm = () => { - return 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) +// node_modules/ajv/dist/compile/validate/boolSchema.js +var require_boolSchema2 = __commonJS({ + "node_modules/ajv/dist/compile/validate/boolSchema.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0; + var errors_1 = require_errors3(); + var codegen_1 = require_codegen2(); + var names_1 = require_names2(); + var boolError = { + message: "boolean schema is false" + }; + function topBoolOrEmptySchema(it3) { + const { gen, schema: schema2, validateName } = it3; + if (schema2 === false) { + falseSchemaError(it3, false); + } else if (typeof schema2 == "object" && schema2.$async === true) { + gen.return(names_1.default.data); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, null); + gen.return(true); + } } - } - - // 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( - { - start (controller) { - fetchParams.controller.controller = controller - }, - pull: pullAlgorithm, - cancel: cancelAlgorithm, - type: 'bytes' + exports.topBoolOrEmptySchema = topBoolOrEmptySchema; + function boolOrEmptySchema(it3, valid) { + const { gen, schema: schema2 } = it3; + if (schema2 === false) { + gen.var(valid, false); + falseSchemaError(it3); + } else { + gen.var(valid, true); + } + } + exports.boolOrEmptySchema = boolOrEmptySchema; + function falseSchemaError(it3, overrideAllErrors) { + const { gen, data } = it3; + const cxt = { + gen, + keyword: "false schema", + data, + schema: false, + schemaCode: false, + schemaValue: false, + params: {}, + it: it3 + }; + (0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors); } - ) - - // 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: - if (!fetchParams.controller.resume) { - 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 - } +// node_modules/ajv/dist/compile/rules.js +var require_rules2 = __commonJS({ + "node_modules/ajv/dist/compile/rules.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getRules = exports.isJSONType = void 0; + var _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"]; + var jsonTypes = new Set(_jsonTypes); + function isJSONType(x3) { + return typeof x3 == "string" && jsonTypes.has(x3); + } + exports.isJSONType = isJSONType; + function getRules() { + const groups = { + number: { type: "number", rules: [] }, + string: { type: "string", rules: [] }, + array: { type: "array", rules: [] }, + object: { type: "object", rules: [] } + }; + return { + types: { ...groups, integer: true, boolean: true, null: true }, + rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object], + post: { rules: [] }, + all: {}, + keywords: {} + }; + } + exports.getRules = getRules; + } +}); - bytes = done ? undefined : value - } catch (err) { - if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { - // zlib doesn't like empty streams. - bytes = undefined - } else { - bytes = err +// node_modules/ajv/dist/compile/validate/applicability.js +var require_applicability2 = __commonJS({ + "node_modules/ajv/dist/compile/validate/applicability.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0; + function schemaHasRulesForType({ schema: schema2, self }, type2) { + const group = self.RULES.types[type2]; + return group && group !== true && shouldUseGroup(schema2, group); + } + exports.schemaHasRulesForType = schemaHasRulesForType; + function shouldUseGroup(schema2, group) { + return group.rules.some((rule) => shouldUseRule(schema2, rule)); + } + exports.shouldUseGroup = shouldUseGroup; + function shouldUseRule(schema2, rule) { + var _a; + return schema2[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema2[kwd] !== void 0)); + } + exports.shouldUseRule = shouldUseRule; + } +}); - // 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 - } +// node_modules/ajv/dist/compile/validate/dataType.js +var require_dataType2 = __commonJS({ + "node_modules/ajv/dist/compile/validate/dataType.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0; + var rules_1 = require_rules2(); + var applicability_1 = require_applicability2(); + var errors_1 = require_errors3(); + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var DataType; + (function(DataType2) { + DataType2[DataType2["Correct"] = 0] = "Correct"; + DataType2[DataType2["Wrong"] = 1] = "Wrong"; + })(DataType || (exports.DataType = DataType = {})); + function getSchemaTypes(schema2) { + const types2 = getJSONTypes(schema2.type); + const hasNull = types2.includes("null"); + if (hasNull) { + if (schema2.nullable === false) + throw new Error("type: null contradicts nullable: false"); + } else { + if (!types2.length && schema2.nullable !== void 0) { + throw new Error('"nullable" cannot be used without "type"'); + } + if (schema2.nullable === true) + types2.push("null"); + } + return types2; + } + exports.getSchemaTypes = getSchemaTypes; + function getJSONTypes(ts2) { + const types2 = Array.isArray(ts2) ? ts2 : ts2 ? [ts2] : []; + if (types2.every(rules_1.isJSONType)) + return types2; + throw new Error("type must be JSONType or JSONType[]: " + types2.join(",")); + } + exports.getJSONTypes = getJSONTypes; + function coerceAndCheckDataType(it3, types2) { + const { gen, data, opts } = it3; + const coerceTo = coerceToTypes(types2, opts.coerceTypes); + const checkTypes = types2.length > 0 && !(coerceTo.length === 0 && types2.length === 1 && (0, applicability_1.schemaHasRulesForType)(it3, types2[0])); + if (checkTypes) { + const wrongType = checkDataTypes(types2, data, opts.strictNumbers, DataType.Wrong); + gen.if(wrongType, () => { + if (coerceTo.length) + coerceData(it3, types2, coerceTo); + else + reportTypeError(it3); + }); } - - 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 + return checkTypes; + } + exports.coerceAndCheckDataType = coerceAndCheckDataType; + var COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]); + function coerceToTypes(types2, coerceTypes) { + return coerceTypes ? types2.filter((t2) => COERCIBLE.has(t2) || coerceTypes === "array" && t2 === "array") : []; + } + function coerceData(it3, types2, coerceTo) { + const { gen, data, opts } = it3; + const dataType = gen.let("dataType", (0, codegen_1._)`typeof ${data}`); + const coerced = gen.let("coerced", (0, codegen_1._)`undefined`); + if (opts.coerceTypes === "array") { + gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types2, data, opts.strictNumbers), () => gen.assign(coerced, data))); } - - // 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 + gen.if((0, codegen_1._)`${coerced} !== undefined`); + for (const t2 of coerceTo) { + if (COERCIBLE.has(t2) || t2 === "array" && opts.coerceTypes === "array") { + coerceSpecificType(t2); + } } - - // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes - // into stream. - const buffer = new Uint8Array(bytes) - if (buffer.byteLength) { - fetchParams.controller.controller.enqueue(buffer) + gen.else(); + reportTypeError(it3); + gen.endIf(); + gen.if((0, codegen_1._)`${coerced} !== undefined`, () => { + gen.assign(data, coerced); + assignParentData(it3, coerced); + }); + function coerceSpecificType(t2) { + switch (t2) { + case "string": + gen.elseIf((0, codegen_1._)`${dataType} == "number" || ${dataType} == "boolean"`).assign(coerced, (0, codegen_1._)`"" + ${data}`).elseIf((0, codegen_1._)`${data} === null`).assign(coerced, (0, codegen_1._)`""`); + return; + case "number": + gen.elseIf((0, codegen_1._)`${dataType} == "boolean" || ${data} === null + || (${dataType} == "string" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_1._)`+${data}`); + return; + case "integer": + gen.elseIf((0, codegen_1._)`${dataType} === "boolean" || ${data} === null + || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_1._)`+${data}`); + return; + case "boolean": + gen.elseIf((0, codegen_1._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_1._)`${data} === "true" || ${data} === 1`).assign(coerced, true); + return; + case "null": + gen.elseIf((0, codegen_1._)`${data} === "" || ${data} === 0 || ${data} === false`); + gen.assign(coerced, null); + return; + case "array": + gen.elseIf((0, codegen_1._)`${dataType} === "string" || ${dataType} === "number" + || ${dataType} === "boolean" || ${data} === null`).assign(coerced, (0, codegen_1._)`[${data}]`); + } } - - // 8. If stream is errored, then terminate the ongoing fetch. - if (isErrored(stream)) { - fetchParams.controller.terminate() - return + } + function assignParentData({ gen, parentData, parentDataProperty }, expr) { + gen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr)); + } + function checkDataType(dataType, data, strictNums, correct = DataType.Correct) { + const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ; + let cond; + switch (dataType) { + case "null": + return (0, codegen_1._)`${data} ${EQ} null`; + case "array": + cond = (0, codegen_1._)`Array.isArray(${data})`; + break; + case "object": + cond = (0, codegen_1._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`; + break; + case "integer": + cond = numCond((0, codegen_1._)`!(${data} % 1) && !isNaN(${data})`); + break; + case "number": + cond = numCond(); + break; + default: + return (0, codegen_1._)`typeof ${data} ${EQ} ${dataType}`; } - - // 9. If stream doesn’t need more data ask the user agent to suspend - // the ongoing fetch. - if (fetchParams.controller.controller.desiredSize <= 0) { - return + return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond); + function numCond(_cond = codegen_1.nil) { + return (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil); } } - } - - // 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 - ) + exports.checkDataType = checkDataType; + function checkDataTypes(dataTypes, data, strictNums, correct) { + if (dataTypes.length === 1) { + return checkDataType(dataTypes[0], data, strictNums, correct); } - } 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 - })) + let cond; + const types2 = (0, util_1.toHash)(dataTypes); + if (types2.array && types2.object) { + const notObj = (0, codegen_1._)`typeof ${data} != "object"`; + cond = types2.null ? notObj : (0, codegen_1._)`!${data} || ${notObj}`; + delete types2.null; + delete types2.array; + delete types2.object; + } else { + cond = codegen_1.nil; } + if (types2.number) + delete types2.integer; + for (const t2 in types2) + cond = (0, codegen_1.and)(cond, checkDataType(t2, data, strictNums, correct)); + return cond; + } + exports.checkDataTypes = checkDataTypes; + var typeError = { + message: ({ schema: schema2 }) => `must be ${schema2}`, + params: ({ schema: schema2, schemaValue }) => typeof schema2 == "string" ? (0, codegen_1._)`{type: ${schema2}}` : (0, codegen_1._)`{type: ${schemaValue}}` + }; + function reportTypeError(it3) { + const cxt = getTypeErrorContext(it3); + (0, errors_1.reportError)(cxt, typeError); + } + exports.reportTypeError = reportTypeError; + function getTypeErrorContext(it3) { + const { gen, data, schema: schema2 } = it3; + const schemaCode = (0, util_1.schemaRefOrVal)(it3, schema2, "type"); + return { + gen, + keyword: "type", + data, + schema: schema2.type, + schemaCode, + schemaValue: schemaCode, + parentSchema: schema2, + params: {}, + it: it3 + }; } - - // 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 - - const path = url.pathname + url.search - const hasTrailingQuestionMark = url.search.length === 0 && url.href[url.href.length - url.hash.length - 1] === '?' - - return new Promise((resolve, reject) => agent.dispatch( - { - path: hasTrailingQuestionMark ? `${path}?` : path, - 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 false - } - - const headersList = new HeadersList() - - for (let i = 0; i < rawHeaders.length; i += 2) { - const nameStr = bufferToLowerCasedHeaderName(rawHeaders[i]) - const value = rawHeaders[i + 1] - if (Array.isArray(value) && !Buffer.isBuffer(rawHeaders[i + 1])) { - for (const val of value) { - headersList.append(nameStr, val.toString('latin1'), true) - } - } else { - headersList.append(nameStr, value.toString('latin1'), true) - } - } - const location = headersList.get('location', true) - - this.body = new Readable({ read: resume }) - - const willFollow = location && request.redirect === 'follow' && - redirectStatusSet.has(status) - - const decoders = [] - - // 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 if (coding === 'zstd' && hasZstd) { - decoders.push(zlib.createZstdDecompress({ - flush: zlib.constants.ZSTD_e_continue, - finishFlush: zlib.constants.ZSTD_e_end - })) - } 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) - } - - 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) - }, - - onRequestUpgrade (_controller, status, headers, socket) { - // We need to support 200 for websocket over h2 as per RFC-8441 - // Absence of session means H1 - if ((socket.session != null && status !== 200) || (socket.session == null && status !== 101)) { - return false - } - - const headersList = new HeadersList() - - for (const [name, value] of Object.entries(headers)) { - if (value == null) { - continue - } - - const headerName = name.toLowerCase() - - if (Array.isArray(value)) { - for (const entry of value) { - headersList.append(headerName, String(entry), true) - } - } else { - headersList.append(headerName, String(value), true) - } - } - - resolve({ - status, - statusText: STATUS_CODES[status], - headersList, - socket - }) - - return true - }, - - onUpgrade (status, rawHeaders, socket) { - // We need to support 200 for websocket over h2 as per RFC-8441 - // Absence of session means H1 - if ((socket.session != null && status !== 200) || (socket.session == null && status !== 101)) { - return false - } - - const headersList = new HeadersList() - - for (let i = 0; i < rawHeaders.length; i += 2) { - const nameStr = bufferToLowerCasedHeaderName(rawHeaders[i]) - const value = rawHeaders[i + 1] - if (Array.isArray(value) && !Buffer.isBuffer(rawHeaders[i + 1])) { - for (const val of value) { - headersList.append(nameStr, val.toString('latin1'), true) - } - } else { - headersList.append(nameStr, value.toString('latin1'), true) - } - } - - resolve({ - status, - statusText: STATUS_CODES[status], - headersList, - socket - }) - - return true +// node_modules/ajv/dist/compile/validate/defaults.js +var require_defaults2 = __commonJS({ + "node_modules/ajv/dist/compile/validate/defaults.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.assignDefaults = void 0; + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + function assignDefaults(it3, ty) { + const { properties, items } = it3.schema; + if (ty === "object" && properties) { + for (const key in properties) { + assignDefault(it3, key, properties[key].default); } + } else if (ty === "array" && Array.isArray(items)) { + items.forEach((sch, i2) => assignDefault(it3, i2, sch.default)); } - )) - } -} - -module.exports = { - fetch, - Fetch, - fetching, - finalizeAndReportTiming -} - - -/***/ }), - -/***/ 20610: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/* globals AbortController */ - - - -const { extractBody, mixinBody, cloneBody, bodyUnusable } = __nccwpck_require__(36682) -const { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = __nccwpck_require__(52991) -const util = __nccwpck_require__(83983) -const nodeUtil = __nccwpck_require__(47261) -const { - isValidHTTPToken, - sameOrigin, - environmentSettingsObject -} = __nccwpck_require__(1310) -const { - forbiddenMethodsSet, - corsSafeListedMethodsSet, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - requestDuplex -} = __nccwpck_require__(68160) -const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util -const { webidl } = __nccwpck_require__(81040) -const { URLSerializer } = __nccwpck_require__(17704) -const { kConstruct } = __nccwpck_require__(72785) -const assert = __nccwpck_require__(98061) -const { getMaxListeners, setMaxListeners, defaultMaxListeners } = __nccwpck_require__(15673) - -const kAbortController = Symbol('abortController') - -const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { - signal.removeEventListener('abort', abort) -}) - -const dependentControllerMap = new WeakMap() - -let abortSignalHasEventHandlerLeakWarning - -try { - abortSignalHasEventHandlerLeakWarning = getMaxListeners(new AbortController().signal) > 0 -} catch { - abortSignalHasEventHandlerLeakWarning = false -} - -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) + } + exports.assignDefaults = assignDefaults; + function assignDefault(it3, prop, defaultValue) { + const { gen, compositeRule, data, opts } = it3; + if (defaultValue === void 0) + return; + const childData = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(prop)}`; + if (compositeRule) { + (0, util_1.checkStrictMode)(it3, `default is ignored for: ${childData}`); + return; + } + let condition = (0, codegen_1._)`${childData} === undefined`; + if (opts.useDefaults === "empty") { + condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`; } + gen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`); } } -} - -let patchMethodWarning = false - -// https://fetch.spec.whatwg.org/#request-class -class Request { - /** @type {AbortSignal} */ - #signal - - /** @type {import('../../dispatcher/dispatcher')} */ - #dispatcher - - /** @type {Headers} */ - #headers - - #state +}); - // https://fetch.spec.whatwg.org/#dom-request - constructor (input, init = undefined) { - webidl.util.markAsUncloneable(this) +// node_modules/ajv/dist/vocabularies/oasContext.js +var require_oasContext2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/oasContext.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getSkipCondition = void 0; + var codegen_1 = require_codegen2(); + var names_1 = require_names2(); + function getSkipCondition(schema2, prop) { + var _a; + const propSchema = (_a = schema2.properties) === null || _a === void 0 ? void 0 : _a[prop]; + if (!propSchema) + return void 0; + const hasReadOnly = propSchema.readOnly === true; + const hasWriteOnly = propSchema.writeOnly === true; + if (!hasReadOnly && !hasWriteOnly) + return void 0; + const conditions = []; + const apiContext = (0, codegen_1._)`typeof ${names_1.default.this} == "object" && ${names_1.default.this} && ${names_1.default.this}.apiContext`; + if (hasReadOnly) { + conditions.push((0, codegen_1._)`${apiContext} === "request"`); + } + if (hasWriteOnly) { + conditions.push((0, codegen_1._)`${apiContext} === "response"`); + } + return (0, codegen_1.or)(...conditions); + } + exports.getSkipCondition = getSkipCondition; + } +}); - if (input === kConstruct) { - return +// node_modules/ajv/dist/vocabularies/code.js +var require_code4 = __commonJS({ + "node_modules/ajv/dist/vocabularies/code.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0; + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var names_1 = require_names2(); + var util_2 = require_util8(); + var oasContext_1 = require_oasContext2(); + function checkReportMissingProp(cxt, prop) { + const { gen, data, it: it3 } = cxt; + gen.if(noPropertyInData(gen, data, prop, it3.opts.ownProperties), () => { + cxt.setParams({ missingProperty: (0, codegen_1._)`${prop}` }, true); + cxt.error(); + }); } - - const prefix = 'Request constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - input = webidl.converters.RequestInfo(input) - init = webidl.converters.RequestInit(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.#dispatcher = 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 { - // 6. Otherwise: - - // 7. Assert: input is a Request object. - assert(webidl.is.Request(input)) - - // 8. Set request to input’s request. - request = input.#state - - // 9. Set signal to input’s signal. - signal = input.#signal - - this.#dispatcher = init.dispatcher || input.#dispatcher - } - - // 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 - } - } + exports.checkReportMissingProp = checkReportMissingProp; + function checkMissingProp({ gen, data, it: { opts }, parentSchema }, properties, missing) { + return (0, codegen_1.or)(...properties.map((prop) => { + var _a; + return (0, codegen_1.and)((0, codegen_1.not)((_a = (0, oasContext_1.getSkipCondition)(parentSchema, prop)) !== null && _a !== void 0 ? _a : (0, codegen_1._)`false`), noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`); + })); } - - // 15. If init["referrerPolicy"] exists, then set request’s referrer policy - // to it. - if (init.referrerPolicy !== undefined) { - request.referrerPolicy = init.referrerPolicy + exports.checkMissingProp = checkMissingProp; + function reportMissingProp(cxt, missing) { + cxt.setParams({ missingProperty: missing }, true); + cxt.error(); } - - // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. - let mode - if (init.mode !== undefined) { - mode = init.mode - } else { - mode = fallbackMode + exports.reportMissingProp = reportMissingProp; + function hasPropFunc(gen) { + return gen.scopeValue("func", { + // eslint-disable-next-line @typescript-eslint/unbound-method + ref: Object.prototype.hasOwnProperty, + code: (0, codegen_1._)`Object.prototype.hasOwnProperty` + }); } - - // 17. If mode is "navigate", then throw a TypeError. - if (mode === 'navigate') { - throw webidl.errors.exception({ - header: 'Request constructor', - message: 'invalid request mode navigate.' - }) + exports.hasPropFunc = hasPropFunc; + function isOwnProperty(gen, data, property) { + return (0, codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property})`; } - - // 18. If mode is non-null, set request’s mode to mode. - if (mode != null) { - request.mode = mode + exports.isOwnProperty = isOwnProperty; + function propertyInData(gen, data, property, ownProperties) { + const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} !== undefined`; + return ownProperties ? (0, codegen_1._)`${cond} && ${isOwnProperty(gen, data, property)}` : cond; } - - // 19. If init["credentials"] exists, then set request’s credentials mode - // to it. - if (init.credentials !== undefined) { - request.credentials = init.credentials + exports.propertyInData = propertyInData; + function noPropertyInData(gen, data, property, ownProperties) { + const cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} === undefined`; + return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond; } - - // 18. If init["cache"] exists, then set request’s cache mode to it. - if (init.cache !== undefined) { - request.cache = init.cache + exports.noPropertyInData = noPropertyInData; + function allSchemaProperties(schemaMap) { + return schemaMap ? Object.keys(schemaMap).filter((p2) => p2 !== "__proto__") : []; + } + exports.allSchemaProperties = allSchemaProperties; + function schemaProperties(it3, schemaMap) { + return allSchemaProperties(schemaMap).filter((p2) => !(0, util_1.alwaysValidSchema)(it3, schemaMap[p2])); + } + exports.schemaProperties = schemaProperties; + function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it: it3 }, func, context2, passSchema) { + const dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data; + const valCxt = [ + [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)], + [names_1.default.parentData, it3.parentData], + [names_1.default.parentDataProperty, it3.parentDataProperty], + [names_1.default.rootData, names_1.default.rootData], + [names_1.default.isAllOfVariant, it3.isAllOfVariant ? 1 : 0] + ]; + if (it3.opts.dynamicRef) + valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]); + const args = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`; + return context2 !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context2}, ${args})` : (0, codegen_1._)`${func}(${args})`; + } + exports.callValidateCode = callValidateCode; + var newRegExp = (0, codegen_1._)`new RegExp`; + function usePattern({ gen, it: { opts } }, pattern) { + const u2 = opts.unicodeRegExp ? "u" : ""; + const { regExp } = opts.code; + const rx = regExp(pattern, u2); + return gen.scopeValue("pattern", { + key: rx.toString(), + ref: rx, + code: (0, codegen_1._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u2})` + }); + } + exports.usePattern = usePattern; + function validateArray(cxt) { + const { gen, data, keyword, it: it3 } = cxt; + const valid = gen.name("valid"); + if (it3.allErrors) { + const validArr = gen.let("valid", true); + validateItems(() => gen.assign(validArr, false)); + return validArr; + } + gen.var(valid, true); + validateItems(() => gen.break()); + return valid; + function validateItems(notValid) { + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + gen.forRange("i", 0, len, (i2) => { + cxt.subschema({ + keyword, + dataProp: i2, + dataPropType: util_1.Type.Num + }, valid); + gen.if((0, codegen_1.not)(valid), notValid); + }); + } + } + exports.validateArray = validateArray; + function validateUnion(cxt) { + const { gen, schema: schema2, keyword, parentSchema, it: it3 } = cxt; + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + if (it3.opts.discriminator && parentSchema.discriminator) + return; + const alwaysValid = schema2.some((sch) => (0, util_1.alwaysValidSchema)(it3, sch)); + if (alwaysValid && !it3.opts.unevaluated) + return; + const valid = gen.let("valid", false); + const schValid = gen.name("_valid"); + gen.block(() => schema2.forEach((_sch, i2) => { + const schCxt = cxt.subschema({ + keyword, + schemaProp: i2, + compositeRule: true + }, schValid); + gen.assign(valid, (0, codegen_1._)`${valid} || ${schValid}`); + const merged = cxt.mergeValidEvaluated(schCxt, schValid); + if (!merged) + gen.if((0, codegen_1.not)(valid)); + })); + cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); } + exports.validateUnion = validateUnion; + } +}); - // 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" - ) +// node_modules/ajv/dist/compile/validate/keyword.js +var require_keyword2 = __commonJS({ + "node_modules/ajv/dist/compile/validate/keyword.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0; + var codegen_1 = require_codegen2(); + var names_1 = require_names2(); + var code_1 = require_code4(); + var errors_1 = require_errors3(); + function macroKeywordCode(cxt, def) { + const { gen, keyword, schema: schema2, parentSchema, it: it3 } = cxt; + const macroSchema = def.macro.call(it3.self, schema2, parentSchema, it3); + const schemaRef = useKeyword(gen, keyword, macroSchema); + if (it3.opts.validateSchema !== false) + it3.self.validateSchema(macroSchema, true); + const valid = gen.name("valid"); + cxt.subschema({ + schema: macroSchema, + schemaPath: codegen_1.nil, + errSchemaPath: `${it3.errSchemaPath}/${keyword}`, + topSchemaRef: schemaRef, + compositeRule: true + }, valid); + cxt.pass(valid, () => cxt.error(true)); + } + exports.macroKeywordCode = macroKeywordCode; + function funcKeywordCode(cxt, def) { + var _a; + const { gen, keyword, schema: schema2, parentSchema, $data, it: it3 } = cxt; + checkAsyncKeyword(it3, def); + const validate = !$data && def.compile ? def.compile.call(it3.self, schema2, parentSchema, it3) : def.validate; + const validateRef = useKeyword(gen, keyword, validate); + const valid = gen.let("valid"); + cxt.block$data(valid, validateKeyword); + cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid); + function validateKeyword() { + if (def.errors === false) { + assignValid(); + if (def.modifying) + modifyData(cxt); + reportErrs(() => cxt.error()); + } else { + const ruleErrs = def.async ? validateAsync() : validateSync(); + if (def.modifying) + modifyData(cxt); + reportErrs(() => addErrs(cxt, ruleErrs)); + } + } + function validateAsync() { + const ruleErrs = gen.let("ruleErrs", null); + gen.try(() => assignValid((0, codegen_1._)`await `), (e2) => gen.assign(valid, false).if((0, codegen_1._)`${e2} instanceof ${it3.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e2}.errors`), () => gen.throw(e2))); + return ruleErrs; + } + function validateSync() { + const validateErrs = (0, codegen_1._)`${validateRef}.errors`; + gen.assign(validateErrs, null); + assignValid(codegen_1.nil); + return validateErrs; + } + function assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) { + const passCxt = it3.opts.passContext ? names_1.default.this : names_1.default.self; + const passSchema = !("compile" in def && !$data || def.schema === false); + gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying); + } + function reportErrs(errors) { + var _a2; + gen.if((0, codegen_1.not)((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid), errors); + } + } + exports.funcKeywordCode = funcKeywordCode; + function modifyData(cxt) { + const { gen, data, it: it3 } = cxt; + gen.if(it3.parentData, () => gen.assign(data, (0, codegen_1._)`${it3.parentData}[${it3.parentDataProperty}]`)); + } + function addErrs(cxt, errs) { + const { gen } = cxt; + gen.if((0, codegen_1._)`Array.isArray(${errs})`, () => { + gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`); + (0, errors_1.extendErrors)(cxt); + }, () => cxt.error()); } - - // 22. If init["redirect"] exists, then set request’s redirect mode to it. - if (init.redirect !== undefined) { - request.redirect = init.redirect + function checkAsyncKeyword({ schemaEnv }, def) { + if (def.async && !schemaEnv.$async) + throw new Error("async keyword in sync schema"); } - - // 23. If init["integrity"] exists, then set request’s integrity metadata to it. - if (init.integrity != null) { - request.integrity = String(init.integrity) + function useKeyword(gen, keyword, result) { + if (result === void 0) + throw new Error(`keyword "${keyword}" failed to compile`); + return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) }); } - - // 24. If init["keepalive"] exists, then set request’s keepalive to it. - if (init.keepalive !== undefined) { - request.keepalive = Boolean(init.keepalive) + function validSchemaType(schema2, schemaType, allowUndefined = false) { + return !schemaType.length || schemaType.some((st3) => st3 === "array" ? Array.isArray(schema2) : st3 === "object" ? schema2 && typeof schema2 == "object" && !Array.isArray(schema2) : typeof schema2 == st3 || allowUndefined && typeof schema2 == "undefined"); } - - // 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.`) + exports.validSchemaType = validSchemaType; + function validateKeywordUsage({ schema: schema2, opts, self, errSchemaPath }, def, keyword) { + if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) { + throw new Error("ajv implementation error"); + } + const deps = def.dependencies; + if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema2, kwd))) { + throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`); + } + if (def.validateSchema) { + const valid = def.validateSchema(schema2[keyword]); + if (!valid) { + const msg = `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` + self.errorsText(def.validateSchema.errors); + if (opts.validateSchema === "log") + self.logger.error(msg); + else + throw new Error(msg); } + } + } + exports.validateKeywordUsage = validateKeywordUsage; + } +}); - const upperCase = method.toUpperCase() - - if (forbiddenMethodsSet.has(upperCase)) { - throw new TypeError(`'${method}' HTTP method is unsupported.`) +// node_modules/ajv/dist/compile/validate/subschema.js +var require_subschema2 = __commonJS({ + "node_modules/ajv/dist/compile/validate/subschema.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0; + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + function getSubschema(it3, { keyword, schemaProp, schema: schema2, schemaPath, errSchemaPath, topSchemaRef }) { + if (keyword !== void 0 && schema2 !== void 0) { + throw new Error('both "keyword" and "schema" passed, only one allowed'); + } + if (keyword !== void 0) { + const sch = it3.schema[keyword]; + return schemaProp === void 0 ? { + schema: sch, + schemaPath: (0, codegen_1._)`${it3.schemaPath}${(0, codegen_1.getProperty)(keyword)}`, + errSchemaPath: `${it3.errSchemaPath}/${keyword}` + } : { + schema: sch[schemaProp], + schemaPath: (0, codegen_1._)`${it3.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`, + errSchemaPath: `${it3.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}` + }; + } + if (schema2 !== void 0) { + if (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) { + throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"'); } - - // 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 + return { + schema: schema2, + schemaPath, + topSchemaRef, + errSchemaPath + }; } - - 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 + throw new Error('either "keyword" or "schema" must be passed'); + } + exports.getSubschema = getSubschema; + function extendSubschemaData(subschema, it3, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) { + if (data !== void 0 && dataProp !== void 0) { + throw new Error('both "data" and "dataProp" passed, only one allowed'); + } + const { gen } = it3; + if (dataProp !== void 0) { + const { errorPath, dataPathArr, opts } = it3; + const nextData = gen.let("data", (0, codegen_1._)`${it3.data}${(0, codegen_1.getProperty)(dataProp)}`, true); + dataContextProps(nextData); + subschema.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`; + subschema.parentDataProperty = (0, codegen_1._)`${dataProp}`; + subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty]; + } + if (data !== void 0) { + const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true); + dataContextProps(nextData); + if (propertyName !== void 0) + subschema.propertyName = propertyName; + } + if (dataTypes) + subschema.dataTypes = dataTypes; + function dataContextProps(_nextData) { + subschema.data = _nextData; + subschema.dataLevel = it3.dataLevel + 1; + subschema.dataTypes = []; + it3.definedProperties = /* @__PURE__ */ new Set(); + subschema.parentData = it3.data; + subschema.dataNames = [...it3.dataNames, _nextData]; } } - - // 26. If init["signal"] exists, then set signal to it. - if (init.signal !== undefined) { - signal = init.signal + exports.extendSubschemaData = extendSubschemaData; + function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) { + if (compositeRule !== void 0) + subschema.compositeRule = compositeRule; + if (createErrors !== void 0) + subschema.createErrors = createErrors; + if (allErrors !== void 0) + subschema.allErrors = allErrors; + subschema.jtdDiscriminator = jtdDiscriminator; + subschema.jtdMetadata = jtdMetadata; } + exports.extendSubschemaMode = extendSubschemaMode; + } +}); - // 27. Set this’s request to request. - this.#state = 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.#signal = ac.signal - - // 29. If signal is not null, then make this’s signal follow signal. - if (signal != null) { - 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) - - // If the max amount of listeners is equal to the default, increase it - if (abortSignalHasEventHandlerLeakWarning && getMaxListeners(signal) === defaultMaxListeners) { - setMaxListeners(1500, signal) - } - - 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.#headers = new Headers(kConstruct) - setHeadersList(this.#headers, request.headersList) - setHeadersGuard(this.#headers, '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.` - ) +// node_modules/ajv/dist/compile/resolve.js +var require_resolve2 = __commonJS({ + "node_modules/ajv/dist/compile/resolve.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0; + var util_1 = require_util8(); + var equal = require_fast_deep_equal(); + var traverse = require_json_schema_traverse(); + var SIMPLE_INLINED = /* @__PURE__ */ new Set([ + "type", + "format", + "pattern", + "maxLength", + "minLength", + "maxProperties", + "minProperties", + "maxItems", + "minItems", + "maximum", + "minimum", + "uniqueItems", + "multipleOf", + "required", + "enum", + "const" + ]); + function inlineRef(schema2, limit = true) { + if (typeof schema2 == "boolean") + return true; + if (limit === true) + return !hasRef2(schema2); + if (!limit) + return false; + return countKeys(schema2) <= limit; + } + exports.inlineRef = inlineRef; + var REF_KEYWORDS = /* @__PURE__ */ new Set([ + "$ref", + "$recursiveRef", + "$recursiveAnchor", + "$dynamicRef", + "$dynamicAnchor" + ]); + function hasRef2(schema2) { + for (const key in schema2) { + if (REF_KEYWORDS.has(key)) + return true; + const sch = schema2[key]; + if (Array.isArray(sch) && sch.some(hasRef2)) + return true; + if (typeof sch == "object" && hasRef2(sch)) + return true; } - - // 2. Set this’s headers’s guard to "request-no-cors". - setHeadersGuard(this.#headers, 'request-no-cors') + return false; } - - // 32. If init is not empty, then: - if (initHasKey) { - /** @type {HeadersList} */ - const headersList = getHeadersList(this.#headers) - // 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) + function countKeys(schema2) { + let count = 0; + for (const key in schema2) { + if (key === "$ref") + return Infinity; + count++; + if (SIMPLE_INLINED.has(key)) + continue; + if (typeof schema2[key] == "object") { + (0, util_1.eachItem)(schema2[key], (sch) => count += countKeys(sch)); } - // Note: Copy the `set-cookie` meta-data. - headersList.cookies = headers.cookies - } else { - // 5. Otherwise, fill this’s headers with headers. - fillHeaders(this.#headers, headers) + if (count === Infinity) + return Infinity; } + return count; } - - // 33. Let inputBody be input’s request’s body if input is a Request - // object; otherwise null. - const inputBody = webidl.is.Request(input) ? input.#state.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.#headers).contains('content-type', true)) { - this.#headers.append('content-type', contentType, true) + function getFullPath(resolver, id = "", normalize) { + if (normalize !== false) + id = normalizeId(id); + const p2 = resolver.parse(id); + return _getFullPath(resolver, p2); + } + exports.getFullPath = getFullPath; + function _getFullPath(resolver, p2) { + const serialized = resolver.serialize(p2); + return serialized.split("#")[0] + "#"; + } + exports._getFullPath = _getFullPath; + var TRAILING_SLASH_HASH = /#\/?$/; + function normalizeId(id) { + return id ? id.replace(TRAILING_SLASH_HASH, "") : ""; + } + exports.normalizeId = normalizeId; + function resolveUrl(resolver, baseId, id) { + id = normalizeId(id); + return resolver.resolve(baseId, id); + } + exports.resolveUrl = resolveUrl; + var ANCHOR = /^[a-z_][-a-z0-9._]*$/i; + function getSchemaRefs(schema2, baseId) { + if (typeof schema2 == "boolean") + return {}; + const { schemaId, uriResolver } = this.opts; + const schId = normalizeId(schema2[schemaId] || baseId); + const baseIds = { "": schId }; + const pathPrefix = getFullPath(uriResolver, schId, false); + const localRefs = {}; + const schemaRefs = /* @__PURE__ */ new Set(); + traverse(schema2, { allKeys: true }, (sch, jsonPtr, _5, parentJsonPtr) => { + if (parentJsonPtr === void 0) + return; + const fullPath = pathPrefix + jsonPtr; + let innerBaseId = baseIds[parentJsonPtr]; + if (typeof sch[schemaId] == "string") + innerBaseId = addRef.call(this, sch[schemaId]); + addAnchor.call(this, sch.$anchor); + addAnchor.call(this, sch.$dynamicAnchor); + baseIds[jsonPtr] = innerBaseId; + function addRef(ref) { + const _resolve = this.opts.uriResolver.resolve; + ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref); + if (schemaRefs.has(ref)) + throw ambiguos(ref); + schemaRefs.add(ref); + let schOrRef = this.refs[ref]; + if (typeof schOrRef == "string") + schOrRef = this.refs[schOrRef]; + if (typeof schOrRef == "object") { + checkAmbiguosRef(sch, schOrRef.schema, ref); + } else if (ref !== normalizeId(fullPath)) { + if (ref[0] === "#") { + checkAmbiguosRef(sch, localRefs[ref], ref); + localRefs[ref] = sch; + } else { + this.refs[ref] = fullPath; + } + } + return ref; + } + function addAnchor(anchor) { + if (typeof anchor == "string") { + if (!ANCHOR.test(anchor)) + throw new Error(`invalid anchor "${anchor}"`); + addRef.call(this, `#${anchor}`); + } + } + }); + return localRefs; + function checkAmbiguosRef(sch1, sch2, ref) { + if (sch2 !== void 0 && !equal(sch1, sch2)) + throw ambiguos(ref); + } + function ambiguos(ref) { + return new Error(`reference "${ref}" resolves to more than one schema`); } } + exports.getSchemaRefs = getSchemaRefs; + } +}); - // 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.') +// node_modules/ajv/dist/compile/validate/index.js +var require_validate2 = __commonJS({ + "node_modules/ajv/dist/compile/validate/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0; + var boolSchema_1 = require_boolSchema2(); + var dataType_1 = require_dataType2(); + var applicability_1 = require_applicability2(); + var dataType_2 = require_dataType2(); + var defaults_1 = require_defaults2(); + var keyword_1 = require_keyword2(); + var subschema_1 = require_subschema2(); + var codegen_1 = require_codegen2(); + var names_1 = require_names2(); + var resolve_1 = require_resolve2(); + var util_1 = require_util8(); + var errors_1 = require_errors3(); + function validateFunctionCode(it3) { + if (isSchemaObj(it3)) { + checkKeywords(it3); + if (schemaCxtHasRules(it3)) { + topSchemaObjCode(it3); + return; + } } - - // 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"' - ) + validateFunction(it3, () => (0, boolSchema_1.topBoolOrEmptySchema)(it3)); + } + exports.validateFunctionCode = validateFunctionCode; + function validateFunction({ gen, validateName, schema: schema2, schemaEnv, opts }, body) { + if (opts.code.es5) { + gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => { + gen.code((0, codegen_1._)`"use strict"; ${funcSourceUrl(schema2, opts)}`); + destructureValCxtES5(gen, opts); + gen.code(body); + }); + } else { + gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema2, opts)).code(body)); } - - // 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.#state)) { - throw new TypeError( - 'Cannot construct a Request with a Request object that has already been used.' - ) + function destructureValCxt(opts) { + return (0, codegen_1._)`{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}, ${names_1.default.isAllOfVariant} = 0}={}`; + } + function destructureValCxtES5(gen, opts) { + gen.if(names_1.default.valCxt, () => { + gen.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`); + gen.var(names_1.default.parentData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`); + gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`); + gen.var(names_1.default.rootData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`); + gen.var(names_1.default.isAllOfVariant, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.isAllOfVariant}`); + if (opts.dynamicRef) + gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`); + }, () => { + gen.var(names_1.default.instancePath, (0, codegen_1._)`""`); + gen.var(names_1.default.parentData, (0, codegen_1._)`undefined`); + gen.var(names_1.default.parentDataProperty, (0, codegen_1._)`undefined`); + gen.var(names_1.default.rootData, names_1.default.data); + gen.var(names_1.default.isAllOfVariant, (0, codegen_1._)`0`); + if (opts.dynamicRef) + gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`); + }); + } + function topSchemaObjCode(it3) { + const { schema: schema2, opts, gen } = it3; + validateFunction(it3, () => { + if (opts.$comment && schema2.$comment) + commentKeyword(it3); + checkNoDefault(it3); + gen.let(names_1.default.vErrors, null); + gen.let(names_1.default.errors, 0); + if (opts.unevaluated) + resetEvaluated(it3); + typeAndKeywords(it3); + returnResults(it3); + }); + return; + } + function resetEvaluated(it3) { + const { gen, validateName } = it3; + it3.evaluated = gen.const("evaluated", (0, codegen_1._)`${validateName}.evaluated`); + gen.if((0, codegen_1._)`${it3.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it3.evaluated}.props`, (0, codegen_1._)`undefined`)); + gen.if((0, codegen_1._)`${it3.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it3.evaluated}.items`, (0, codegen_1._)`undefined`)); + } + function funcSourceUrl(schema2, opts) { + const schId = typeof schema2 == "object" && schema2[opts.schemaId]; + return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil; + } + function subschemaCode(it3, valid) { + if (isSchemaObj(it3)) { + checkKeywords(it3); + if (schemaCxtHasRules(it3)) { + subSchemaObjCode(it3, valid); + return; + } } - - // 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 + (0, boolSchema_1.boolOrEmptySchema)(it3, valid); + } + function schemaCxtHasRules({ schema: schema2, self }) { + if (typeof schema2 == "boolean") + return !schema2; + for (const key in schema2) + if (self.RULES.all[key]) + return true; + return false; + } + function isSchemaObj(it3) { + return typeof it3.schema != "boolean"; + } + function subSchemaObjCode(it3, valid) { + const { schema: schema2, gen, opts } = it3; + if (opts.$comment && schema2.$comment) + commentKeyword(it3); + updateContext(it3); + checkAsyncSchema(it3); + const errsCount = gen.const("_errs", names_1.default.errors); + typeAndKeywords(it3, errsCount); + gen.var(valid, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); + } + function checkKeywords(it3) { + (0, util_1.checkUnknownRules)(it3); + checkRefsAndKeywords(it3); + } + function typeAndKeywords(it3, errsCount) { + if (it3.opts.jtd) + return schemaKeywords(it3, [], false, errsCount); + const types2 = (0, dataType_1.getSchemaTypes)(it3.schema); + const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it3, types2); + schemaKeywords(it3, types2, !checkedTypes, errsCount); + } + function checkRefsAndKeywords(it3) { + const { schema: schema2, errSchemaPath, opts, self } = it3; + if (schema2.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema2, self.RULES)) { + self.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`); } } - - // 41. Set this’s request’s body to finalBody. - this.#state.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.#state.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.#state.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.#headers - } - - // 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.#state.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.#state.referrer === 'no-referrer') { - return '' + function checkNoDefault(it3) { + const { schema: schema2, opts } = it3; + if (schema2.default !== void 0 && opts.useDefaults && opts.strictSchema) { + (0, util_1.checkStrictMode)(it3, "default is ignored in the schema root"); + } } - - // 2. If this’s request’s referrer is "client", then return - // "about:client". - if (this.#state.referrer === 'client') { - return 'about:client' + function updateContext(it3) { + const schId = it3.schema[it3.opts.schemaId]; + if (schId) + it3.baseId = (0, resolve_1.resolveUrl)(it3.opts.uriResolver, it3.baseId, schId); } - - // Return this’s request’s referrer, serialized. - return this.#state.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.#state.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.#state.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 () { - webidl.brandCheck(this, Request) - - // The credentials getter steps are to return this’s request’s credentials mode. - return this.#state.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.#state.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.#state.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.#state.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.#state.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.#state.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.#state.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.#signal - } - - get body () { - webidl.brandCheck(this, Request) - - return this.#state.body ? this.#state.body.stream : null - } - - get bodyUsed () { - webidl.brandCheck(this, Request) - - return !!this.#state.body && util.isDisturbed(this.#state.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.#state)) { - throw new TypeError('unusable') + function checkAsyncSchema(it3) { + if (it3.schema.$async && !it3.schemaEnv.$async) + throw new Error("async schema in sync schema"); } - - // 2. Let clonedRequest be the result of cloning this’s request. - const clonedRequest = cloneRequest(this.#state) - - // 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) - ) + function commentKeyword({ gen, schemaEnv, schema: schema2, errSchemaPath, opts }) { + const msg = schema2.$comment; + if (opts.$comment === true) { + gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`); + } else if (typeof opts.$comment == "function") { + const schemaPath = (0, codegen_1.str)`${errSchemaPath}/$comment`; + const rootName = gen.scopeValue("root", { ref: schemaEnv.root }); + gen.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`); + } } - - // 4. Return clonedRequestObject. - return fromInnerRequest(clonedRequest, this.#dispatcher, ac.signal, getHeadersGuard(this.#headers)) - } - - [nodeUtil.inspect.custom] (depth, options) { - if (options.depth === null) { - options.depth = 2 + function returnResults(it3) { + const { gen, schemaEnv, validateName, ValidationError, opts } = it3; + if (schemaEnv.$async) { + gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`)); + } else { + gen.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors); + if (opts.unevaluated) + assignEvaluated(it3); + gen.return((0, codegen_1._)`${names_1.default.errors} === 0`); + } } - - 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 + function assignEvaluated({ gen, evaluated, props, items }) { + if (props instanceof codegen_1.Name) + gen.assign((0, codegen_1._)`${evaluated}.props`, props); + if (items instanceof codegen_1.Name) + gen.assign((0, codegen_1._)`${evaluated}.items`, items); } - - return `Request ${nodeUtil.formatWithOptions(options, properties)}` - } - - /** - * @param {Request} request - * @param {AbortSignal} newSignal - */ - static setRequestSignal (request, newSignal) { - request.#signal = newSignal - return request - } - - /** - * @param {Request} request - */ - static getRequestDispatcher (request) { - return request.#dispatcher - } - - /** - * @param {Request} request - * @param {import('../../dispatcher/dispatcher')} newDispatcher - */ - static setRequestDispatcher (request, newDispatcher) { - request.#dispatcher = newDispatcher - } - - /** - * @param {Request} request - * @param {Headers} newHeaders - */ - static setRequestHeaders (request, newHeaders) { - request.#headers = newHeaders - } - - /** - * @param {Request} request - */ - static getRequestState (request) { - return request.#state - } - - /** - * @param {Request} request - * @param {any} newState - */ - static setRequestState (request, newState) { - request.#state = newState - } -} - -const { setRequestSignal, getRequestDispatcher, setRequestDispatcher, setRequestHeaders, getRequestState, setRequestState } = Request -Reflect.deleteProperty(Request, 'setRequestSignal') -Reflect.deleteProperty(Request, 'getRequestDispatcher') -Reflect.deleteProperty(Request, 'setRequestDispatcher') -Reflect.deleteProperty(Request, 'setRequestHeaders') -Reflect.deleteProperty(Request, 'getRequestState') -Reflect.deleteProperty(Request, 'setRequestState') - -mixinBody(Request, getRequestState) - -// 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, - useURLCredentials: init.useURLCredentials ?? undefined, - traversableForUserPrompts: init.traversableForUserPrompts ?? 'client', - 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(request.body) - } - - // 3. Return newRequest. - return newRequest -} - -/** - * @see https://fetch.spec.whatwg.org/#request-create - * @param {any} innerRequest - * @param {import('../../dispatcher/agent')} dispatcher - * @param {AbortSignal} signal - * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard - * @returns {Request} - */ -function fromInnerRequest (innerRequest, dispatcher, signal, guard) { - const request = new Request(kConstruct) - setRequestState(request, innerRequest) - setRequestDispatcher(request, dispatcher) - setRequestSignal(request, signal) - const headers = new Headers(kConstruct) - setRequestHeaders(request, headers) - setHeadersList(headers, innerRequest.headersList) - setHeadersGuard(headers, 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.is.Request = webidl.util.MakeTypeAssertion(Request) - -/** - * @param {*} V - * @returns {import('../../../types/fetch').Request|string} - * - * @see https://fetch.spec.whatwg.org/#requestinfo - */ -webidl.converters.RequestInfo = function (V) { - if (typeof V === 'string') { - return webidl.converters.USVString(V) - } - - if (webidl.is.Request(V)) { - return V - } - - return webidl.converters.USVString(V) -} - -/** - * @param {*} V - * @returns {import('../../../types/fetch').RequestInit} - * @see 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' - ) - ) - }, - { - key: 'window', - converter: webidl.converters.any - }, - { - key: 'duplex', - converter: webidl.converters.DOMString, - allowedValues: requestDuplex - }, - { - key: 'dispatcher', // undici specific option - converter: webidl.converters.any - }, - { - key: 'priority', - converter: webidl.converters.DOMString, - allowedValues: ['high', 'low', 'auto'], - defaultValue: () => 'auto' - } -]) - -module.exports = { - Request, - makeRequest, - fromInnerRequest, - cloneRequest, - getRequestDispatcher, - getRequestState -} - - -/***/ }), - -/***/ 12583: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = __nccwpck_require__(52991) -const { extractBody, cloneBody, mixinBody, streamRegistry, bodyUnusable } = __nccwpck_require__(36682) -const util = __nccwpck_require__(83983) -const nodeUtil = __nccwpck_require__(47261) -const { kEnumerableProperty } = util -const { - isValidReasonPhrase, - isCancelled, - isAborted, - isErrorLike, - environmentSettingsObject: relevantRealm -} = __nccwpck_require__(1310) -const { - redirectStatusSet, - nullBodyStatus -} = __nccwpck_require__(68160) -const { webidl } = __nccwpck_require__(81040) -const { URLSerializer } = __nccwpck_require__(17704) -const { kConstruct } = __nccwpck_require__(72785) -const assert = __nccwpck_require__(98061) -const { isomorphicEncode, serializeJavascriptValueToJSONString } = __nccwpck_require__(93082) - -const textEncoder = new TextEncoder('utf-8') - -// https://fetch.spec.whatwg.org/#response-class -class Response { - /** @type {Headers} */ - #headers - - #state - - // 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 = undefined) { - webidl.argumentLengthCheck(arguments, 1, 'Response.json') - - if (init !== null) { - init = webidl.converters.ResponseInit(init) + function schemaKeywords(it3, types2, typeErrors, errsCount) { + const { gen, schema: schema2, data, allErrors, opts, self } = it3; + const { RULES } = self; + if (schema2.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema2, RULES))) { + gen.block(() => keywordCode(it3, "$ref", RULES.all.$ref.definition)); + return; + } + if (!opts.jtd) + checkStrictTypes(it3, types2); + gen.block(() => { + for (const group of RULES.rules) + groupKeywords(group); + groupKeywords(RULES.post); + }); + function groupKeywords(group) { + if (!(0, applicability_1.shouldUseGroup)(schema2, group)) + return; + if (group.type) { + gen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers)); + iterateKeywords(it3, group); + if (types2.length === 1 && types2[0] === group.type && typeErrors) { + gen.else(); + (0, dataType_2.reportTypeError)(it3); + } + gen.endIf(); + } else { + iterateKeywords(it3, group); + } + if (!allErrors) + gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`); + } } - - // 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 }) + function iterateKeywords(it3, group) { + const { gen, schema: schema2, opts: { useDefaults } } = it3; + if (useDefaults) + (0, defaults_1.assignDefaults)(it3, group.type); + gen.block(() => { + for (const rule of group.rules) { + if ((0, applicability_1.shouldUseRule)(schema2, rule) || shouldForceUnevaluatedProperties(schema2, rule)) { + keywordCode(it3, rule.keyword, rule.definition, group.type); + } + } + }); + function shouldForceUnevaluatedProperties(schemaObj, rule) { + return !!(rule.keyword === "unevaluatedProperties" && (schemaObj.properties || schemaObj.patternProperties) && !it3.isAllOfVariant && it3.opts.defaultUnevaluatedProperties === false); + } } - - // 3. If status is not a redirect status, then throw a RangeError. - if (!redirectStatusSet.has(status)) { - throw new RangeError(`Invalid status code ${status}`) + function checkStrictTypes(it3, types2) { + if (it3.schemaEnv.meta || !it3.opts.strictTypes) + return; + checkContextTypes(it3, types2); + if (!it3.opts.allowUnionTypes) + checkMultipleTypes(it3, types2); + checkKeywordTypes(it3, it3.dataTypes); } - - // 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.#state.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.#state.headersList.append('location', value, true) - - // 8. Return responseObject. - return responseObject - } - - // https://fetch.spec.whatwg.org/#dom-response - constructor (body = null, init = undefined) { - webidl.util.markAsUncloneable(this) - - if (body === kConstruct) { - return + function checkContextTypes(it3, types2) { + if (!types2.length) + return; + if (!it3.dataTypes.length) { + it3.dataTypes = types2; + return; + } + types2.forEach((t2) => { + if (!includesType(it3.dataTypes, t2)) { + strictTypesError(it3, `type "${t2}" not allowed by context "${it3.dataTypes.join(",")}"`); + } + }); + narrowSchemaTypes(it3, types2); } - - if (body !== null) { - body = webidl.converters.BodyInit(body, 'Response', 'body') + function checkMultipleTypes(it3, ts2) { + if (ts2.length > 1 && !(ts2.length === 2 && ts2.includes("null"))) { + strictTypesError(it3, "use allowUnionTypes to allow union type keyword"); + } } - - init = webidl.converters.ResponseInit(init) - - // 1. Set this’s response to a new response. - this.#state = 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.#headers = new Headers(kConstruct) - setHeadersGuard(this.#headers, 'response') - setHeadersList(this.#headers, this.#state.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 } + function checkKeywordTypes(it3, ts2) { + const rules8 = it3.self.RULES.all; + for (const keyword in rules8) { + const rule = rules8[keyword]; + if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it3.schema, rule)) { + const { type: type2 } = rule.definition; + if (type2.length && !type2.some((t2) => hasApplicableType(ts2, t2))) { + strictTypesError(it3, `missing type "${type2.join(",")}" for keyword "${keyword}"`); + } + } + } } - - // 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.#state.type - } - - // Returns response’s URL, if it has one; otherwise the empty string. - get url () { - webidl.brandCheck(this, Response) - - const urlList = this.#state.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 '' + function hasApplicableType(schTs, kwdT) { + return schTs.includes(kwdT) || kwdT === "number" && schTs.includes("integer"); } - - 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.#state.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.#state.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.#state.status >= 200 && this.#state.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.#state.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.#headers + function includesType(ts2, t2) { + return ts2.includes(t2) || t2 === "integer" && ts2.includes("number"); + } + function narrowSchemaTypes(it3, withTypes) { + const ts2 = []; + for (const t2 of it3.dataTypes) { + if (includesType(withTypes, t2)) + ts2.push(t2); + else if (withTypes.includes("integer") && t2 === "number") + ts2.push("integer"); + } + it3.dataTypes = ts2; + } + function strictTypesError(it3, msg) { + const schemaPath = it3.schemaEnv.baseId + it3.errSchemaPath; + msg += ` at "${schemaPath}" (strictTypes)`; + (0, util_1.checkStrictMode)(it3, msg, it3.opts.strictTypes); + } + var KeywordCxt = class { + constructor(it3, def, keyword) { + (0, keyword_1.validateKeywordUsage)(it3, def, keyword); + this.gen = it3.gen; + this.allErrors = it3.allErrors; + this.keyword = keyword; + this.data = it3.data; + this.schema = it3.schema[keyword]; + this.$data = def.$data && it3.opts.$data && this.schema && this.schema.$data; + this.schemaValue = (0, util_1.schemaRefOrVal)(it3, this.schema, keyword, this.$data); + this.schemaType = def.schemaType; + this.parentSchema = it3.schema; + this.params = {}; + this.it = it3; + this.def = def; + if (this.$data) { + this.schemaCode = it3.gen.const("vSchema", getData(this.$data, it3)); + } else { + this.schemaCode = this.schemaValue; + if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) { + throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`); + } + } + if ("code" in def ? def.trackErrors : def.errors !== false) { + this.errsCount = it3.gen.const("_errs", names_1.default.errors); + } + } + result(condition, successAction, failAction) { + this.failResult((0, codegen_1.not)(condition), successAction, failAction); + } + failResult(condition, successAction, failAction) { + this.gen.if(condition); + if (failAction) + failAction(); + else + this.error(); + if (successAction) { + this.gen.else(); + successAction(); + if (this.allErrors) + this.gen.endIf(); + } else { + if (this.allErrors) + this.gen.endIf(); + else + this.gen.else(); + } + } + pass(condition, failAction) { + this.failResult((0, codegen_1.not)(condition), void 0, failAction); + } + fail(condition) { + if (condition === void 0) { + this.error(); + if (!this.allErrors) + this.gen.if(false); + return; + } + this.gen.if(condition); + this.error(); + if (this.allErrors) + this.gen.endIf(); + else + this.gen.else(); + } + fail$data(condition) { + if (!this.$data) + return this.fail(condition); + const { schemaCode } = this; + this.fail((0, codegen_1._)`${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`); + } + error(append, errorParams, errorPaths) { + if (errorParams) { + this.setParams(errorParams); + this._error(append, errorPaths); + this.setParams({}); + return; + } + this._error(append, errorPaths); + } + _error(append, errorPaths) { + ; + (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths); + } + $dataError() { + (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError); + } + reset() { + if (this.errsCount === void 0) + throw new Error('add "trackErrors" to keyword definition'); + (0, errors_1.resetErrorsCount)(this.gen, this.errsCount); + } + ok(cond) { + if (!this.allErrors) + this.gen.if(cond); + } + setParams(obj, assign) { + if (assign) + Object.assign(this.params, obj); + else + this.params = obj; + } + block$data(valid, codeBlock, $dataValid = codegen_1.nil) { + this.gen.block(() => { + this.check$data(valid, $dataValid); + codeBlock(); + }); + } + check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) { + if (!this.$data) + return; + const { gen, schemaCode, schemaType, def } = this; + gen.if((0, codegen_1.or)((0, codegen_1._)`${schemaCode} === undefined`, $dataValid)); + if (valid !== codegen_1.nil) + gen.assign(valid, true); + if (schemaType.length || def.validateSchema) { + gen.elseIf(this.invalid$data()); + this.$dataError(); + if (valid !== codegen_1.nil) + gen.assign(valid, false); + } + gen.else(); + } + invalid$data() { + const { gen, schemaCode, schemaType, def, it: it3 } = this; + return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema()); + function wrong$DataType() { + if (schemaType.length) { + if (!(schemaCode instanceof codegen_1.Name)) + throw new Error("ajv implementation error"); + const st3 = Array.isArray(schemaType) ? schemaType : [schemaType]; + return (0, codegen_1._)`${(0, dataType_2.checkDataTypes)(st3, schemaCode, it3.opts.strictNumbers, dataType_2.DataType.Wrong)}`; + } + return codegen_1.nil; + } + function invalid$DataSchema() { + if (def.validateSchema) { + const validateSchemaRef = gen.scopeValue("validate$data", { ref: def.validateSchema }); + return (0, codegen_1._)`!${validateSchemaRef}(${schemaCode})`; + } + return codegen_1.nil; + } + } + subschema(appl, valid, isAllOfVariant) { + const subschema = (0, subschema_1.getSubschema)(this.it, appl); + (0, subschema_1.extendSubschemaData)(subschema, this.it, appl); + (0, subschema_1.extendSubschemaMode)(subschema, appl); + const nextContext = { + ...this.it, + ...subschema, + items: void 0, + props: void 0, + isAllOfVariant + }; + subschemaCode(nextContext, valid); + return nextContext; + } + mergeEvaluated(schemaCxt, toName) { + const { it: it3, gen } = this; + if (!it3.opts.unevaluated) + return; + if (it3.props !== true && schemaCxt.props !== void 0) { + it3.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it3.props, toName); + } + if (it3.items !== true && schemaCxt.items !== void 0) { + it3.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it3.items, toName); + } + } + mergeValidEvaluated(schemaCxt, valid) { + const { it: it3, gen } = this; + if (it3.opts.unevaluated && (it3.props !== true || it3.items !== true)) { + gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name)); + return true; + } + } + }; + exports.KeywordCxt = KeywordCxt; + function keywordCode(it3, keyword, def, ruleType) { + const cxt = new KeywordCxt(it3, def, keyword); + if ("code" in def) { + def.code(cxt, ruleType); + } else if (cxt.$data && def.validate) { + (0, keyword_1.funcKeywordCode)(cxt, def); + } else if ("macro" in def) { + (0, keyword_1.macroKeywordCode)(cxt, def); + } else if (def.compile || def.validate) { + (0, keyword_1.funcKeywordCode)(cxt, def); + } + } + var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; + var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; + function getData($data, { dataLevel, dataNames, dataPathArr }) { + let jsonPointer; + let data; + if ($data === "") + return names_1.default.rootData; + if ($data[0] === "/") { + if (!JSON_POINTER.test($data)) + throw new Error(`Invalid JSON-pointer: ${$data}`); + jsonPointer = $data; + data = names_1.default.rootData; + } else { + const matches = RELATIVE_JSON_POINTER.exec($data); + if (!matches) + throw new Error(`Invalid JSON-pointer: ${$data}`); + const up = +matches[1]; + jsonPointer = matches[2]; + if (jsonPointer === "#") { + if (up >= dataLevel) + throw new Error(errorMsg("property/index", up)); + return dataPathArr[dataLevel - up]; + } + if (up > dataLevel) + throw new Error(errorMsg("data", up)); + data = dataNames[dataLevel - up]; + if (!jsonPointer) + return data; + } + let expr = data; + const segments = jsonPointer.split("/"); + for (const segment of segments) { + if (segment) { + data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`; + expr = (0, codegen_1._)`${expr} && ${data}`; + } + } + return expr; + function errorMsg(pointerType, up) { + return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`; + } + } + exports.getData = getData; } +}); - get body () { - webidl.brandCheck(this, Response) - - return this.#state.body ? this.#state.body.stream : null +// node_modules/ajv/dist/runtime/validation_error.js +var require_validation_error2 = __commonJS({ + "node_modules/ajv/dist/runtime/validation_error.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var ValidationError = class extends Error { + constructor(errors) { + super("validation failed"); + this.errors = errors; + this.ajv = this.validation = true; + } + }; + exports.default = ValidationError; } +}); - get bodyUsed () { - webidl.brandCheck(this, Response) - - return !!this.#state.body && util.isDisturbed(this.#state.body.stream) +// node_modules/ajv/dist/compile/ref_error.js +var require_ref_error2 = __commonJS({ + "node_modules/ajv/dist/compile/ref_error.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var resolve_1 = require_resolve2(); + var MissingRefError = class extends Error { + constructor(resolver, baseId, ref, msg) { + super(msg || `can't resolve reference ${ref} from id ${baseId}`); + this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref); + this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef)); + } + }; + exports.default = MissingRefError; } +}); - // Returns a clone of response. - clone () { - webidl.brandCheck(this, Response) - - // 1. If this is unusable, then throw a TypeError. - if (bodyUnusable(this.#state)) { - throw webidl.errors.exception({ - header: 'Response.clone', - message: 'Body has already been consumed.' - }) +// node_modules/ajv/dist/compile/index.js +var require_compile2 = __commonJS({ + "node_modules/ajv/dist/compile/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0; + var codegen_1 = require_codegen2(); + var validation_error_1 = require_validation_error2(); + var names_1 = require_names2(); + var resolve_1 = require_resolve2(); + var util_1 = require_util8(); + var validate_1 = require_validate2(); + var SchemaEnv = class { + constructor(env4) { + var _a; + this.refs = {}; + this.dynamicAnchors = {}; + let schema2; + if (typeof env4.schema == "object") + schema2 = env4.schema; + this.schema = env4.schema; + this.schemaId = env4.schemaId; + this.root = env4.root || this; + this.baseId = (_a = env4.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema2 === null || schema2 === void 0 ? void 0 : schema2[env4.schemaId || "$id"]); + this.schemaPath = env4.schemaPath; + this.localRefs = env4.localRefs; + this.meta = env4.meta; + this.$async = schema2 === null || schema2 === void 0 ? void 0 : schema2.$async; + this.refs = {}; + } + }; + exports.SchemaEnv = SchemaEnv; + function compileSchema(sch) { + const _sch = getCompilingSchema.call(this, sch); + if (_sch) + return _sch; + const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); + const { es5, lines } = this.opts.code; + const { ownProperties } = this.opts; + const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); + let _ValidationError; + if (sch.$async) { + _ValidationError = gen.scopeValue("Error", { + ref: validation_error_1.default, + code: (0, codegen_1._)`require("ajv/dist/runtime/validation_error").default` + }); + } + const validateName = gen.scopeName("validate"); + sch.validateName = validateName; + const schemaCxt = { + gen, + allErrors: this.opts.allErrors, + data: names_1.default.data, + parentData: names_1.default.parentData, + parentDataProperty: names_1.default.parentDataProperty, + dataNames: [names_1.default.data], + dataPathArr: [codegen_1.nil], + // TODO can its length be used as dataLevel if nil is removed? + dataLevel: 0, + dataTypes: [], + definedProperties: /* @__PURE__ */ new Set(), + topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) } : { ref: sch.schema }), + validateName, + ValidationError: _ValidationError, + schema: sch.schema, + schemaEnv: sch, + rootId, + baseId: sch.baseId || rootId, + schemaPath: codegen_1.nil, + errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"), + errorPath: (0, codegen_1._)`""`, + opts: this.opts, + self: this + }; + let sourceCode; + try { + this._compilations.add(sch); + (0, validate_1.validateFunctionCode)(schemaCxt); + gen.optimize(this.opts.code.optimize); + const validateCode = gen.toString(); + sourceCode = `const visitedNodesForRef = new WeakMap(); ${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`; + if (this.opts.code.process) + sourceCode = this.opts.code.process(sourceCode, sch); + const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode); + const validate = makeValidate(this, this.scope.get()); + this.scope.value(validateName, { ref: validate }); + validate.errors = null; + validate.schema = sch.schema; + validate.schemaEnv = sch; + if (sch.$async) + validate.$async = true; + if (this.opts.code.source === true) { + validate.source = { validateName, validateCode, scopeValues: gen._values }; + } + if (this.opts.unevaluated) { + const { props, items } = schemaCxt; + validate.evaluated = { + props: props instanceof codegen_1.Name ? void 0 : props, + items: items instanceof codegen_1.Name ? void 0 : items, + dynamicProps: props instanceof codegen_1.Name, + dynamicItems: items instanceof codegen_1.Name + }; + if (validate.source) + validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated); + } + sch.validate = validate; + return sch; + } catch (e2) { + delete sch.validate; + delete sch.validateName; + if (sourceCode) + this.logger.error("Error compiling schema, function code:", sourceCode); + throw e2; + } finally { + this._compilations.delete(sch); + } } - - // 2. Let clonedResponse be the result of cloning this’s response. - const clonedResponse = cloneResponse(this.#state) - - // Note: To re-register because of a new stream. - // Don't set finalizers other than for fetch responses. - if (this.#state.urlList.length !== 0 && this.#state.body?.stream) { - streamRegistry.register(this, new WeakRef(this.#state.body.stream)) + exports.compileSchema = compileSchema; + function resolveRef(root, baseId, origRef) { + var _a; + const ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, origRef); + const schOrFunc = root.refs[ref]; + if (schOrFunc) + return schOrFunc; + let _sch = resolve8.call(this, root, ref); + if (_sch === void 0) { + const schema2 = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; + const { schemaId } = this.opts; + if (schema2) + _sch = new SchemaEnv({ schema: schema2, schemaId, root, baseId }); + } + if (_sch === void 0 && this.opts.loadSchemaSync) { + const remoteSchema = this.opts.loadSchemaSync(baseId, origRef, ref); + if (remoteSchema && !(this.refs[ref] || this.schemas[ref])) { + this.addSchema(remoteSchema, ref, void 0); + _sch = resolve8.call(this, root, ref); + } + } + if (_sch === void 0) + return; + return root.refs[ref] = inlineOrCompile.call(this, _sch); } - - // 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.#headers)) - } - - [nodeUtil.inspect.custom] (depth, options) { - if (options.depth === null) { - options.depth = 2 + exports.resolveRef = resolveRef; + function inlineOrCompile(sch) { + if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs)) + return sch.schema; + return sch.validate ? sch : compileSchema.call(this, sch); } - - 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 + function getCompilingSchema(schEnv) { + for (const sch of this._compilations) { + if (sameSchemaEnv(sch, schEnv)) + return sch; + } + } + exports.getCompilingSchema = getCompilingSchema; + function sameSchemaEnv(s1, s2) { + return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId; + } + function resolve8(root, ref) { + let sch; + while (typeof (sch = this.refs[ref]) == "string") + ref = sch; + return sch || this.schemas[ref] || resolveSchema2.call(this, root, ref); + } + function resolveSchema2(root, ref) { + const p2 = this.opts.uriResolver.parse(ref); + const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p2); + let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, void 0); + if (Object.keys(root.schema).length > 0 && refPath === baseId) { + return getJsonPointer.call(this, p2, root); + } + const id = (0, resolve_1.normalizeId)(refPath); + const schOrRef = this.refs[id] || this.schemas[id]; + if (typeof schOrRef == "string") { + const sch = resolveSchema2.call(this, root, schOrRef); + if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object") + return; + return getJsonPointer.call(this, p2, sch); + } + if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object") + return; + if (!schOrRef.validate) + compileSchema.call(this, schOrRef); + if (id === (0, resolve_1.normalizeId)(ref)) { + const { schema: schema2 } = schOrRef; + const { schemaId } = this.opts; + const schId = schema2[schemaId]; + if (schId) + baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); + return new SchemaEnv({ schema: schema2, schemaId, root, baseId }); + } + return getJsonPointer.call(this, p2, schOrRef); + } + exports.resolveSchema = resolveSchema2; + var PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([ + "properties", + "patternProperties", + "enum", + "dependencies", + "definitions" + ]); + function getJsonPointer(parsedRef, { baseId, schema: schema2, root }) { + var _a; + if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== "/") + return; + for (const part of parsedRef.fragment.slice(1).split("/")) { + if (typeof schema2 === "boolean") + return; + const partSchema = schema2[(0, util_1.unescapeFragment)(part)]; + if (partSchema === void 0) + return; + schema2 = partSchema; + const schId = typeof schema2 === "object" && schema2[this.opts.schemaId]; + if (!PREVENT_SCOPE_CHANGE.has(part) && schId) { + baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId); + } + } + let env4; + if (typeof schema2 != "boolean" && schema2.$ref && !(0, util_1.schemaHasRulesButRef)(schema2, this.RULES)) { + const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema2.$ref); + env4 = resolveSchema2.call(this, root, $ref); + } + const { schemaId } = this.opts; + env4 = env4 || new SchemaEnv({ schema: schema2, schemaId, root, baseId }); + if (env4.schema !== env4.root.schema) + return env4; + return void 0; } - - return `Response ${nodeUtil.formatWithOptions(options, properties)}` - } - - /** - * @param {Response} response - */ - static getResponseHeaders (response) { - return response.#headers - } - - /** - * @param {Response} response - * @param {Headers} newHeaders - */ - static setResponseHeaders (response, newHeaders) { - response.#headers = newHeaders - } - - /** - * @param {Response} response - */ - static getResponseState (response) { - return response.#state - } - - /** - * @param {Response} response - * @param {any} newState - */ - static setResponseState (response, newState) { - response.#state = newState } -} - -const { getResponseHeaders, setResponseHeaders, getResponseState, setResponseState } = Response -Reflect.deleteProperty(Response, 'getResponseHeaders') -Reflect.deleteProperty(Response, 'setResponseHeaders') -Reflect.deleteProperty(Response, 'getResponseState') -Reflect.deleteProperty(Response, 'setResponseState') - -mixinBody(Response, getResponseState) - -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(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] : [] +// node_modules/ajv/dist/refs/data.json +var require_data2 = __commonJS({ + "node_modules/ajv/dist/refs/data.json"(exports, module3) { + module3.exports = { + $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", + description: "Meta-schema for $data reference (JSON AnySchema extension proposal)", + type: "object", + required: ["$data"], + properties: { + $data: { + type: "string", + anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] + } + }, + additionalProperties: false + }; } -} - -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 +// node_modules/ajv/dist/runtime/uri.js +var require_uri2 = __commonJS({ + "node_modules/ajv/dist/runtime/uri.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var uri = require_fast_uri(); + uri.code = 'require("ajv/dist/runtime/uri").default'; + exports.default = uri; } +}); - 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 +// node_modules/ajv/dist/core.js +var require_core5 = __commonJS({ + "node_modules/ajv/dist/core.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0; + var validate_1 = require_validate2(); + Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen2(); + Object.defineProperty(exports, "_", { enumerable: true, get: function() { + return codegen_1._; + } }); + Object.defineProperty(exports, "str", { enumerable: true, get: function() { + return codegen_1.str; + } }); + Object.defineProperty(exports, "stringify", { enumerable: true, get: function() { + return codegen_1.stringify; + } }); + Object.defineProperty(exports, "nil", { enumerable: true, get: function() { + return codegen_1.nil; + } }); + Object.defineProperty(exports, "Name", { enumerable: true, get: function() { + return codegen_1.Name; + } }); + Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() { + return codegen_1.CodeGen; + } }); + var validation_error_1 = require_validation_error2(); + var ref_error_1 = require_ref_error2(); + var rules_1 = require_rules2(); + var compile_1 = require_compile2(); + var codegen_2 = require_codegen2(); + var resolve_1 = require_resolve2(); + var dataType_1 = require_dataType2(); + var util_1 = require_util8(); + var $dataRefSchema = require_data2(); + var uri_1 = require_uri2(); + var defaultRegExp = (str2, flags) => new RegExp(str2, flags); + defaultRegExp.code = "new RegExp"; + var META_IGNORE_OPTIONS = [ + "removeAdditional", + "useDefaults", + "coerceTypes", + "defaultUnevaluatedProperties", + "defaultAdditionalProperties" + ]; + var EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([ + "validate", + "serialize", + "parse", + "wrapper", + "root", + "schema", + "keyword", + "pattern", + "formats", + "validate$data", + "func", + "obj", + "Error" + ]); + var removedOptions = { + errorDataPath: "", + format: "`validateFormats: false` can be used instead.", + nullable: '"nullable" keyword is supported by default.', + jsonPointers: "Deprecated jsPropertySyntax can be used instead.", + extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.", + missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.", + processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`", + sourceCode: "Use option `code: {source: true}`", + strictDefaults: "It is default now, see option `strict`.", + strictKeywords: "It is default now, see option `strict`.", + uniqueItems: '"uniqueItems" keyword is always validated.', + unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).", + cache: "Map is used as cache, schema object as key.", + serialize: "Map is used as cache, schema object as key.", + ajvErrors: "It is default now." + }; + var deprecatedOptions = { + ignoreKeywordsWithRef: "", + jsPropertySyntax: "", + unicode: '"minLength"/"maxLength" account for unicode characters by default.' + }; + var MAX_EXPRESSION = 200; + function requiredOptions(o) { + var _a, _b, _c, _d, _e3, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r2, _s2, _t3, _u, _v, _w, _x, _y, _z, _0; + const s2 = o.strict; + const _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize; + const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0; + const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp; + const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default; + return { + strictSchema: (_f = (_e3 = o.strictSchema) !== null && _e3 !== void 0 ? _e3 : s2) !== null && _f !== void 0 ? _f : true, + strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s2) !== null && _h !== void 0 ? _h : true, + strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s2) !== null && _k !== void 0 ? _k : "log", + strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s2) !== null && _m !== void 0 ? _m : "log", + strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s2) !== null && _p !== void 0 ? _p : false, + code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp }, + loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION, + loopEnum: (_r2 = o.loopEnum) !== null && _r2 !== void 0 ? _r2 : MAX_EXPRESSION, + meta: (_s2 = o.meta) !== null && _s2 !== void 0 ? _s2 : true, + messages: (_t3 = o.messages) !== null && _t3 !== void 0 ? _t3 : true, + inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true, + schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : "$id", + addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true, + validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true, + validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true, + unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true, + int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true, + uriResolver + }; + } + var Ajv2 = class { + constructor(opts = {}) { + this.schemas = {}; + this.refs = {}; + this.formats = {}; + this._compilations = /* @__PURE__ */ new Set(); + this._loading = {}; + this._cache = /* @__PURE__ */ new Map(); + opts = this.opts = { ...opts, ...requiredOptions(opts) }; + const { es5, lines } = this.opts.code; + this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines }); + this.logger = getLogger(opts.logger); + const formatOpt = opts.validateFormats; + opts.validateFormats = false; + this.RULES = (0, rules_1.getRules)(); + checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED"); + checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn"); + this._metaOpts = getMetaSchemaOptions.call(this); + if (opts.formats) + addInitialFormats.call(this); + this._addVocabularies(); + this._addDefaultMetaSchema(); + if (opts.keywords) + addInitialKeywords.call(this, opts.keywords); + if (typeof opts.meta == "object") + this.addMetaSchema(opts.meta); + addInitialSchemas.call(this); + opts.validateFormats = formatOpt; + } + _addVocabularies() { + this.addKeyword("$async"); + } + _addDefaultMetaSchema() { + const { $data, meta, schemaId } = this.opts; + let _dataRefSchema = $dataRefSchema; + if (schemaId === "id") { + _dataRefSchema = { ...$dataRefSchema }; + _dataRefSchema.id = _dataRefSchema.$id; + delete _dataRefSchema.$id; + } + if (meta && $data) + this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false); + } + defaultMeta() { + const { meta, schemaId } = this.opts; + return this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : void 0; + } + // Set the defaultUnevaluatedProperties option. + // WARNING: This only affects schemas compiled AFTER this method is called. + // Already-compiled schemas in the cache will NOT be affected. + // Consider clearing the cache or creating a new Ajv instance if you need + // different behavior for the same schemas. + setDefaultUnevaluatedProperties(value) { + this.opts.defaultUnevaluatedProperties = value; + } + validate(schemaKeyRef, data) { + let v3; + if (typeof schemaKeyRef == "string") { + v3 = this.getSchema(schemaKeyRef); + if (!v3) + throw new Error(`no schema with key or ref "${schemaKeyRef}"`); + } else { + v3 = this.compile(schemaKeyRef); + } + const valid = v3(data); + if (!("$async" in v3)) + this.errors = v3.errors; + return valid; + } + compile(schema2, _meta) { + const sch = this._addSchema(schema2, _meta); + return sch.validate || this._compileSchemaEnv(sch); + } + compileAsync(schema2, meta) { + if (typeof this.opts.loadSchema != "function") { + throw new Error("options.loadSchema should be a function"); + } + const { loadSchema } = this.opts; + return runCompileAsync.call(this, schema2, meta); + async function runCompileAsync(_schema, _meta) { + await loadMetaSchema.call(this, _schema.$schema); + const sch = this._addSchema(_schema, _meta); + return sch.validate || _compileAsync.call(this, sch); + } + async function loadMetaSchema($ref) { + if ($ref && !this.getSchema($ref)) { + await runCompileAsync.call(this, { $ref }, true); + } + } + async function _compileAsync(sch) { + try { + return this._compileSchemaEnv(sch); + } catch (e2) { + if (!(e2 instanceof ref_error_1.default)) + throw e2; + checkLoaded.call(this, e2); + await loadMissingSchema.call(this, e2.missingSchema); + return _compileAsync.call(this, sch); + } + } + function checkLoaded({ missingSchema: ref, missingRef }) { + if (this.refs[ref]) { + throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`); + } + } + async function loadMissingSchema(ref) { + const _schema = await _loadSchema.call(this, ref); + if (!this.refs[ref]) + await loadMetaSchema.call(this, _schema.$schema); + if (!this.refs[ref]) + this.addSchema(_schema, ref, meta); + } + async function _loadSchema(ref) { + const p2 = this._loading[ref]; + if (p2) + return p2; + try { + return await (this._loading[ref] = loadSchema(ref)); + } finally { + delete this._loading[ref]; + } + } + } + // Adds schema to the instance + addSchema(schema2, key, _meta, _validateSchema = this.opts.validateSchema) { + if (Array.isArray(schema2)) { + for (const sch of schema2) + this.addSchema(sch, void 0, _meta, _validateSchema); + return this; + } + let id; + if (typeof schema2 === "object") { + const { schemaId } = this.opts; + id = schema2[schemaId]; + if (id !== void 0 && typeof id != "string") { + throw new Error(`schema ${schemaId} must be string`); + } + } + key = (0, resolve_1.normalizeId)(key || id); + this._checkUnique(key); + this.schemas[key] = this._addSchema(schema2, _meta, key, _validateSchema, true); + return this; + } + // Add schema that will be used to validate other schemas + // options in META_IGNORE_OPTIONS are alway set to false + addMetaSchema(schema2, key, _validateSchema = this.opts.validateSchema) { + this.addSchema(schema2, key, true, _validateSchema); + return this; + } + // Validate schema against its meta-schema + validateSchema(schema2, throwOrLogError) { + if (typeof schema2 == "boolean") + return true; + let $schema; + $schema = schema2.$schema; + if ($schema !== void 0 && typeof $schema != "string") { + throw new Error("$schema must be a string"); + } + $schema = $schema || this.opts.defaultMeta || this.defaultMeta(); + if (!$schema) { + this.logger.warn("meta-schema not available"); + this.errors = null; + return true; + } + const valid = this.validate($schema, schema2); + if (!valid && throwOrLogError) { + const message = "schema is invalid: " + this.errorsText(); + if (this.opts.validateSchema === "log") + this.logger.error(message); + else + throw new Error(message); + } + return valid; + } + // Get compiled schema by `key` or `ref`. + // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id) + getSchema(keyRef) { + let sch; + while (typeof (sch = getSchEnv.call(this, keyRef)) == "string") + keyRef = sch; + if (sch === void 0) { + const { schemaId } = this.opts; + const root = new compile_1.SchemaEnv({ schema: {}, schemaId }); + sch = compile_1.resolveSchema.call(this, root, keyRef); + if (!sch) + return; + this.refs[keyRef] = sch; + } + return sch.validate || this._compileSchemaEnv(sch); + } + // Remove cached schema(s). + // If no parameter is passed all schemas but meta-schemas are removed. + // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. + // Even if schema is referenced by other schemas it still can be removed as other schemas have local references. + removeSchema(schemaKeyRef) { + if (schemaKeyRef instanceof RegExp) { + this._removeAllSchemas(this.schemas, schemaKeyRef); + this._removeAllSchemas(this.refs, schemaKeyRef); + return this; + } + switch (typeof schemaKeyRef) { + case "undefined": + this._removeAllSchemas(this.schemas); + this._removeAllSchemas(this.refs); + this._cache.clear(); + return this; + case "string": { + const sch = getSchEnv.call(this, schemaKeyRef); + if (typeof sch == "object") + this._cache.delete(sch.schema); + delete this.schemas[schemaKeyRef]; + delete this.refs[schemaKeyRef]; + return this; + } + case "object": { + const cacheKey = schemaKeyRef; + this._cache.delete(cacheKey); + let id = schemaKeyRef[this.opts.schemaId]; + if (id) { + id = (0, resolve_1.normalizeId)(id); + delete this.schemas[id]; + delete this.refs[id]; + } + return this; + } + default: + throw new Error("ajv.removeSchema: invalid parameter"); + } + } + // add "vocabulary" - a collection of keywords + addVocabulary(definitions) { + for (const def of definitions) + this.addKeyword(def); + return this; + } + addKeyword(kwdOrDef, def) { + let keyword; + if (typeof kwdOrDef == "string") { + keyword = kwdOrDef; + if (typeof def == "object") { + this.logger.warn("these parameters are deprecated, see docs for addKeyword"); + def.keyword = keyword; + } + } else if (typeof kwdOrDef == "object" && def === void 0) { + def = kwdOrDef; + keyword = def.keyword; + if (Array.isArray(keyword) && !keyword.length) { + throw new Error("addKeywords: keyword must be string or non-empty array"); + } + } else { + throw new Error("invalid addKeywords parameters"); + } + checkKeyword.call(this, keyword, def); + if (!def) { + (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd)); + return this; + } + keywordMetaschema.call(this, def); + const definition = { + ...def, + type: (0, dataType_1.getJSONTypes)(def.type), + schemaType: (0, dataType_1.getJSONTypes)(def.schemaType) + }; + (0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k3) => addRule.call(this, k3, definition) : (k3) => definition.type.forEach((t2) => addRule.call(this, k3, definition, t2))); + return this; + } + getKeyword(keyword) { + const rule = this.RULES.all[keyword]; + return typeof rule == "object" ? rule.definition : !!rule; + } + // Remove keyword + removeKeyword(keyword) { + const { RULES } = this; + delete RULES.keywords[keyword]; + delete RULES.all[keyword]; + for (const group of RULES.rules) { + const i2 = group.rules.findIndex((rule) => rule.keyword === keyword); + if (i2 >= 0) + group.rules.splice(i2, 1); + } + return this; + } + // Add format + addFormat(name, format) { + if (typeof format == "string") + format = new RegExp(format); + this.formats[name] = format; + return this; + } + errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) { + if (!errors || errors.length === 0) + return "No errors"; + return errors.map((e2) => `${dataVar}${e2.instancePath} ${e2.message}`).reduce((text, msg) => text + separator + msg); + } + $dataMetaSchema(metaSchema, keywordsJsonPointers) { + const rules8 = this.RULES.all; + metaSchema = JSON.parse(JSON.stringify(metaSchema)); + for (const jsonPointer of keywordsJsonPointers) { + const segments = jsonPointer.split("/").slice(1); + let keywords = metaSchema; + for (const seg of segments) + keywords = keywords[seg]; + for (const key in rules8) { + const rule = rules8[key]; + if (typeof rule != "object") + continue; + const { $data } = rule.definition; + const schema2 = keywords[key]; + if ($data && schema2) + keywords[key] = schemaOrData(schema2); + } + } + return metaSchema; + } + _removeAllSchemas(schemas, regex) { + for (const keyRef in schemas) { + const sch = schemas[keyRef]; + if (!regex || regex.test(keyRef)) { + if (typeof sch == "string") { + delete schemas[keyRef]; + } else if (sch && !sch.meta) { + this._cache.delete(sch.schema); + delete schemas[keyRef]; + } + } + } + } + _addSchema(schema2, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) { + let id; + const { schemaId } = this.opts; + if (typeof schema2 == "object") { + id = schema2[schemaId]; + } else { + if (this.opts.jtd) + throw new Error("schema must be object"); + else if (typeof schema2 != "boolean") + throw new Error("schema must be object or boolean"); + } + let sch = this._cache.get(schema2); + if (sch !== void 0) + return sch; + baseId = (0, resolve_1.normalizeId)(id || baseId); + const localRefs = resolve_1.getSchemaRefs.call(this, schema2, baseId); + sch = new compile_1.SchemaEnv({ schema: schema2, schemaId, meta, baseId, localRefs }); + this._cache.set(sch.schema, sch); + if (addSchema && !baseId.startsWith("#")) { + if (baseId) + this._checkUnique(baseId); + this.refs[baseId] = sch; + } + if (validateSchema) + this.validateSchema(schema2, true); + return sch; + } + _checkUnique(id) { + if (this.schemas[id] || this.refs[id]) { + throw new Error(`schema with key or id "${id}" already exists`); + } + } + _compileSchemaEnv(sch) { + if (sch.meta) + this._compileMetaSchema(sch); + else + compile_1.compileSchema.call(this, sch); + if (!sch.validate) + throw new Error("ajv implementation error"); + return sch.validate; + } + _compileMetaSchema(sch) { + const currentOpts = this.opts; + this.opts = this._metaOpts; + try { + compile_1.compileSchema.call(this, sch); + } finally { + this.opts = currentOpts; + } + } + }; + Ajv2.ValidationError = validation_error_1.default; + Ajv2.MissingRefError = ref_error_1.default; + exports.default = Ajv2; + function checkOptions(checkOpts, options2, msg, log = "error") { + for (const key in checkOpts) { + const opt = key; + if (opt in options2) + this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`); + } } - }) -} - -// 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: [], - 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') + function getSchEnv(keyRef) { + keyRef = (0, resolve_1.normalizeId)(keyRef); + return this.schemas[keyRef] || this.refs[keyRef]; } - } - - // 3. Set response’s response’s status to init["status"]. - if ('status' in init && init.status != null) { - getResponseState(response).status = init.status - } - - // 4. Set response’s response’s status message to init["statusText"]. - if ('statusText' in init && init.statusText != null) { - getResponseState(response).statusText = init.statusText - } - - // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. - if ('headers' in init && init.headers != null) { - fill(getResponseHeaders(response), 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}` - }) + function addInitialSchemas() { + const optsSchemas = this.opts.schemas; + if (!optsSchemas) + return; + if (Array.isArray(optsSchemas)) + this.addSchema(optsSchemas); + else + for (const key in optsSchemas) + this.addSchema(optsSchemas[key], key); } - - // 2. Set response's body to body's body. - getResponseState(response).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 && !getResponseState(response).headersList.contains('content-type', true)) { - getResponseState(response).headersList.append('content-type', body.type, true) + function addInitialFormats() { + for (const name in this.opts.formats) { + const format = this.opts.formats[name]; + if (format) + this.addFormat(name, format); + } } - } -} - -/** - * @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) - setResponseState(response, innerResponse) - const headers = new Headers(kConstruct) - setResponseHeaders(response, headers) - setHeadersList(headers, innerResponse.headersList) - setHeadersGuard(headers, guard) - - // Note: If innerResponse's urlList contains a URL, it is a fetch response. - if (innerResponse.urlList.length !== 0 && 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 -} - -// 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 (webidl.is.Blob(V)) { - return V - } - - if (webidl.is.BufferSource(V)) { - return V - } - - if (webidl.is.FormData(V)) { - return V - } - - if (webidl.is.URLSearchParams(V)) { - return V - } - - return webidl.converters.DOMString(V, prefix, name) -} - -// https://fetch.spec.whatwg.org/#bodyinit -webidl.converters.BodyInit = function (V, prefix, argument) { - if (webidl.is.ReadableStream(V)) { - return V - } - - // 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 - } -]) - -webidl.is.Response = webidl.util.MakeTypeAssertion(Response) - -module.exports = { - isNetworkError, - makeNetworkError, - makeResponse, - makeAppropriateNetworkError, - filterResponse, - Response, - cloneResponse, - fromInnerResponse, - getResponseState -} - - -/***/ }), - -/***/ 1310: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { Transform } = __nccwpck_require__(84492) -const zlib = __nccwpck_require__(65628) -const { redirectStatusSet, referrerPolicyTokens, badPortsSet } = __nccwpck_require__(68160) -const { getGlobalOrigin } = __nccwpck_require__(52850) -const { collectAnHTTPQuotedString, parseMIMEType } = __nccwpck_require__(17704) -const { performance } = __nccwpck_require__(38846) -const { ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = __nccwpck_require__(83983) -const assert = __nccwpck_require__(98061) -const { isUint8Array } = __nccwpck_require__(93746) -const { webidl } = __nccwpck_require__(81040) -const { isomorphicEncode, collectASequenceOfCodePoints, removeChars } = __nccwpck_require__(93082) - -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) + function addInitialKeywords(defs) { + if (Array.isArray(defs)) { + this.addVocabulary(defs); + return; + } + this.logger.warn("keywords option as map is deprecated, pass array"); + for (const keyword in defs) { + const def = defs[keyword]; + if (!def.keyword) + def.keyword = keyword; + this.addKeyword(def); + } } - 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 + function getMetaSchemaOptions() { + const metaOpts = { ...this.opts }; + for (const opt of META_IGNORE_OPTIONS) + delete metaOpts[opt]; + return metaOpts; + } + var noLogs = { log() { + }, warn() { + }, error() { + } }; + function getLogger(logger2) { + if (logger2 === false) + return noLogs; + if (logger2 === void 0) + return console; + if (logger2.log && logger2.warn && logger2.error) + return logger2; + throw new Error("logger must implement log, warn and error methods"); + } + var KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i; + function checkKeyword(keyword, def) { + const { RULES } = this; + (0, util_1.eachItem)(keyword, (kwd) => { + if (RULES.keywords[kwd]) + throw new Error(`Keyword ${kwd} is already defined`); + if (!KEYWORD_NAME.test(kwd)) + throw new Error(`Keyword ${kwd} has invalid name`); + }); + if (!def) + return; + if (def.$data && !("code" in def || "validate" in def)) { + throw new Error('$data keyword must have "code" or "validate" function'); + } } - } - 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 + function addRule(keyword, definition, dataType) { + var _a; + const post = definition === null || definition === void 0 ? void 0 : definition.post; + if (dataType && post) + throw new Error('keyword with "post" flag cannot have "type"'); + const { RULES } = this; + let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t2 }) => t2 === dataType); + if (!ruleGroup) { + ruleGroup = { type: dataType, rules: [] }; + RULES.rules.push(ruleGroup); + } + RULES.keywords[keyword] = true; + if (!definition) + return; + const rule = { + keyword, + definition: { + ...definition, + type: (0, dataType_1.getJSONTypes)(definition.type), + schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType) + } + }; + if (definition.before) + addBeforeRule.call(this, ruleGroup, rule, definition.before); + else + ruleGroup.rules.push(rule); + RULES.all[keyword] = rule; + (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd)); } - } - 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 -} - -/** - * Parse a referrer policy from a Referrer-Policy header - * @see https://w3c.github.io/webappsec-referrer-policy/#parse-referrer-policy-from-header - */ -function parseReferrerPolicy (actualResponse) { - // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. - const policyHeader = (actualResponse.headersList.get('referrer-policy', true) ?? '').split(',') - - // 2. Let policy be the empty string. - let policy = '' - - // 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. - - // 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 - if (policyHeader.length) { - // 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 + function addBeforeRule(ruleGroup, rule, before) { + const i2 = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before); + if (i2 >= 0) { + ruleGroup.rules.splice(i2, 0, rule); + } else { + ruleGroup.rules.push(rule); + this.logger.warn(`rule ${before} is not defined`); } } - } - - // 4. Return policy. - return policy -} - -/** - * 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. - * @see https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect - * @param {import('./request').Request} request - * @param {import('./response').Response} actualResponse - */ -function setRequestReferrerPolicyOnRedirect (request, actualResponse) { - // 1. Let policy be the result of executing § 8.1 Parse a referrer policy - // from a Referrer-Policy header on actualResponse. - const policy = parseReferrerPolicy(actualResponse) - - // 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. + function keywordMetaschema(def) { + let { metaSchema } = def; + if (metaSchema === void 0) + return; + if (def.$data && this.opts.$data) + metaSchema = schemaOrData(metaSchema); + def.validateSchema = this.compile(metaSchema, true); } - - // 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 + var $dataRef = { + $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" + }; + function schemaOrData(schema2) { + return { anyOf: [schema2, $dataRef] }; } } +}); - 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 - } -} - -/** - * Determine request’s Referrer - * - * @see https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer - */ -function determineRequestsReferrer (request) { - // Given a request request, we can determine the correct referrer information - // to send by examining its referrer policy as detailed in the following - // steps, which return either no referrer or a URL: - - // 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: - - // "client" - 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) - // a URL - } else if (webidl.is.URL(request.referrer)) { - // 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 - } - - // 7. The user agent MAY alter referrerURL or referrerOrigin at this point - // to enforce arbitrary policy considerations in the interests of minimizing - // data leakage. For example, the user agent could strip the URL down to an - // origin, modify its host, replace it with an empty string, etc. - - // 8. Execute the switch statements corresponding to the value of policy: - switch (policy) { - case 'no-referrer': - // Return no referrer - return 'no-referrer' - case 'origin': - // Return referrerOrigin - if (referrerOrigin != null) { - return referrerOrigin - } - return stripURLForReferrer(referrerSource, true) - case 'unsafe-url': - // Return referrerURL. - return referrerURL - case 'strict-origin': { - const currentURL = requestCurrentURL(request) - - // 1. 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' +// node_modules/ajv/dist/vocabularies/core/id.js +var require_id2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/core/id.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var def = { + keyword: "id", + code() { + throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID'); } - // 2. Return referrerOrigin - return referrerOrigin - } - case 'strict-origin-when-cross-origin': { - const currentURL = requestCurrentURL(request) + }; + exports.default = def; + } +}); - // 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 +// node_modules/ajv/dist/vocabularies/core/ref.js +var require_ref2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/core/ref.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.callRef = exports.getValidate = void 0; + var ref_error_1 = require_ref_error2(); + var code_1 = require_code4(); + var codegen_1 = require_codegen2(); + var names_1 = require_names2(); + var compile_1 = require_compile2(); + var util_1 = require_util8(); + var def = { + keyword: "$ref", + schemaType: "string", + code(cxt) { + const { gen, schema: $ref, it: it3 } = cxt; + const { baseId, schemaEnv: env4, validateName, opts, self } = it3; + const { root } = env4; + if (($ref === "#" || $ref === "#/") && baseId === root.baseId) + return callRootRef(); + const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref); + if (schOrEnv === void 0) + throw new ref_error_1.default(it3.opts.uriResolver, baseId, $ref); + if (schOrEnv instanceof compile_1.SchemaEnv) + return callValidate(schOrEnv); + return inlineRefSchema(schOrEnv); + function callRootRef() { + if (env4 === root) + return callRef(cxt, validateName, env4, env4.$async); + const rootName = gen.scopeValue("root", { ref: root }); + return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root, root.$async); + } + function callValidate(sch) { + const v3 = getValidate(cxt, sch); + callRef(cxt, v3, sch, sch.$async); + } + function inlineRefSchema(sch) { + const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch }); + const valid = gen.name("valid"); + const schCxt = cxt.subschema( + { + schema: sch, + dataTypes: [], + schemaPath: codegen_1.nil, + topSchemaRef: schName, + errSchemaPath: $ref + }, + valid, + it3.isAllOfVariant + // pass isAllOfVariant into inlined $ref + ); + cxt.mergeEvaluated(schCxt); + cxt.ok(valid); + } } - - // 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' + }; + function getValidate(cxt, sch) { + const { gen } = cxt; + return sch.validate ? gen.scopeValue("validate", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.validate`; + } + exports.getValidate = getValidate; + function callRef(cxt, v3, sch, $async) { + const { gen, it: it3 } = cxt; + const { allErrors, schemaEnv: env4, opts } = it3; + const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil; + if ($async) + callAsyncRef(); + else + callSyncRef(); + function callAsyncRef() { + if (!env4.$async) + throw new Error("async schema referenced by sync schema"); + const valid = gen.let("valid"); + gen.try(() => { + gen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v3, passCxt)}`); + addEvaluatedFrom(v3); + if (!allErrors) + gen.assign(valid, true); + }, (e2) => { + gen.if((0, codegen_1._)`!(${e2} instanceof ${it3.ValidationError})`, () => gen.throw(e2)); + addErrorsFrom(e2); + if (!allErrors) + gen.assign(valid, false); + }); + cxt.ok(valid); } - - // 3. Return referrerOrigin. - return referrerOrigin - } - case 'same-origin': - // 1. If the origin of referrerURL and the origin of request’s current - // URL are the same, then return referrerURL. - if (sameOrigin(request, referrerURL)) { - return referrerURL + function callSyncRef() { + const visitedNodes = gen.name("visitedNodes"); + gen.code((0, codegen_1._)`const ${visitedNodes} = (typeof visitedNodesForRef !== 'undefined') && visitedNodesForRef.get(${v3}) || new Set()`); + gen.if((0, codegen_1._)`!${visitedNodes}.has(${cxt.data})`, () => { + gen.code((0, codegen_1._)`if (typeof visitedNodesForRef !== 'undefined') visitedNodesForRef.set(${v3}, ${visitedNodes})`); + gen.code((0, codegen_1._)`const dataNode = ${cxt.data}`); + gen.code((0, codegen_1._)`if (typeof dataNode === "object" && dataNode !== null) ${visitedNodes}.add(dataNode)`); + const res = cxt.result((0, code_1.callValidateCode)(cxt, v3, passCxt), () => addEvaluatedFrom(v3), () => addErrorsFrom(v3)); + gen.code((0, codegen_1._)`${visitedNodes}.delete(dataNode)`); + return res; + }); } - // 2. Return no referrer. - return 'no-referrer' - case 'origin-when-cross-origin': - // 1. If the origin of referrerURL and the origin of request’s current - // URL are the same, then return referrerURL. - if (sameOrigin(request, referrerURL)) { - return referrerURL + function addErrorsFrom(source) { + const errs = (0, codegen_1._)`${source}.errors`; + gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); + gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`); + } + function addEvaluatedFrom(source) { + var _a; + if (!it3.opts.unevaluated) + return; + const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated; + if (it3.props !== true) { + if (schEvaluated && !schEvaluated.dynamicProps) { + if (schEvaluated.props !== void 0) { + it3.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it3.props); + } + } else { + const props = gen.var("props", (0, codegen_1._)`${source}.evaluated.props`); + it3.props = util_1.mergeEvaluated.props(gen, props, it3.props, codegen_1.Name); + } + } + if (it3.items !== true) { + if (schEvaluated && !schEvaluated.dynamicItems) { + if (schEvaluated.items !== void 0) { + it3.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it3.items); + } + } else { + const items = gen.var("items", (0, codegen_1._)`${source}.evaluated.items`); + it3.items = util_1.mergeEvaluated.items(gen, items, it3.items, codegen_1.Name); + } + } } - // 2. Return referrerOrigin. - return referrerOrigin - case 'no-referrer-when-downgrade': { - const currentURL = requestCurrentURL(request) - - // 1. 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' - } - // 2. Return referrerURL. - return referrerURL - } - } -} - -/** - * Certain portions of URLs must not be included when sending a URL as the - * value of a `Referer` header: a URLs fragment, username, and password - * components must be stripped from the URL before it’s sent out. This - * algorithm accepts a origin-only flag, which defaults to false. If set to - * true, the algorithm will additionally remove the URL’s path and query - * components, leaving only the scheme, host, and port. - * - * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url - * @param {URL} url - * @param {boolean} [originOnly=false] - */ -function stripURLForReferrer (url, originOnly = false) { - // 1. Assert: url is a URL. - assert(webidl.is.URL(url)) - - // Note: Create a new URL instance to avoid mutating the original URL. - url = new URL(url) - - // 2. If url’s scheme is a local scheme, then return no referrer. - if (urlIsLocal(url)) { - 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 === true) { - // 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 -} - -const isPotentialleTrustworthyIPv4 = RegExp.prototype.test - .bind(/^127\.(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){2}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)$/) - -const isPotentiallyTrustworthyIPv6 = RegExp.prototype.test - .bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/) - -/** - * Check if host matches one of the CIDR notations 127.0.0.0/8 or ::1/128. - * - * @param {string} origin - * @returns {boolean} - */ -function isOriginIPPotentiallyTrustworthy (origin) { - // IPv6 - if (origin.includes(':')) { - // Remove brackets from IPv6 addresses - if (origin[0] === '[' && origin[origin.length - 1] === ']') { - origin = origin.slice(1, -1) } - return isPotentiallyTrustworthyIPv6(origin) + exports.callRef = callRef; + exports.default = def; } +}); - // IPv4 - return isPotentialleTrustworthyIPv4(origin) -} - -/** - * A potentially trustworthy origin is one which a user agent can generally - * trust as delivering data securely. - * - * Return value `true` means `Potentially Trustworthy`. - * Return value `false` means `Not Trustworthy`. - * - * @see https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy - * @param {string} origin - * @returns {boolean} - */ -function isOriginPotentiallyTrustworthy (origin) { - // 1. If origin is an opaque origin, return "Not Trustworthy". - if (origin == null || origin === 'null') { - return false +// node_modules/ajv/dist/vocabularies/core/index.js +var require_core6 = __commonJS({ + "node_modules/ajv/dist/vocabularies/core/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var id_1 = require_id2(); + var ref_1 = require_ref2(); + var core5 = [ + "$schema", + "$id", + "$defs", + "$vocabulary", + { keyword: "$comment" }, + "definitions", + id_1.default, + ref_1.default + ]; + exports.default = core5; } +}); - // 2. Assert: origin is a tuple origin. - origin = new URL(origin) - - // 3. If origin’s scheme is either "https" or "wss", - // return "Potentially Trustworthy". - if (origin.protocol === 'https:' || origin.protocol === 'wss:') { - return true +// node_modules/ajv/dist/vocabularies/validation/limitNumber.js +var require_limitNumber3 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var ops = codegen_1.operators; + var KWDs = { + maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT }, + minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT }, + exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE }, + exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE } + }; + var error2 = { + message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`, + params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}` + }; + var def = { + keyword: Object.keys(KWDs), + type: "number", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`); + } + }; + exports.default = def; } +}); - // 4. If origin’s host matches one of the CIDR notations 127.0.0.0/8 or - // ::1/128 [RFC4632], return "Potentially Trustworthy". - if (isOriginIPPotentiallyTrustworthy(origin.hostname)) { - return true +// node_modules/ajv/dist/vocabularies/validation/multipleOf.js +var require_multipleOf2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var error2 = { + message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`, + params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}` + }; + var def = { + keyword: "multipleOf", + type: "number", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { gen, data, schemaCode, it: it3 } = cxt; + const prec = it3.opts.multipleOfPrecision; + const res = gen.let("res"); + const invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`; + cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`); + } + }; + exports.default = def; } +}); - // 5. If the user agent conforms to the name resolution rules in - // [let-localhost-be-localhost] and one of the following is true: - - // origin’s host is "localhost" or "localhost." - if (origin.hostname === 'localhost' || origin.hostname === 'localhost.') { - return true +// node_modules/ajv/dist/runtime/ucs2length.js +var require_ucs2length2 = __commonJS({ + "node_modules/ajv/dist/runtime/ucs2length.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function ucs2length(str2) { + const len = str2.length; + let length = 0; + let pos = 0; + let value; + while (pos < len) { + length++; + value = str2.charCodeAt(pos++); + if (value >= 55296 && value <= 56319 && pos < len) { + value = str2.charCodeAt(pos); + if ((value & 64512) === 56320) + pos++; + } + } + return length; + } + exports.default = ucs2length; + ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default'; } +}); - // origin’s host ends with ".localhost" or ".localhost." - if (origin.hostname.endsWith('.localhost') || origin.hostname.endsWith('.localhost.')) { - return true +// node_modules/ajv/dist/vocabularies/validation/limitLength.js +var require_limitLength2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var ucs2length_1 = require_ucs2length2(); + var error2 = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxLength" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxLength", "minLength"], + type: "string", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { keyword, data, schemaCode, it: it3 } = cxt; + const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT; + const len = it3.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`; + cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`); + } + }; + exports.default = def; } +}); - // 6. If origin’s scheme is "file", return "Potentially Trustworthy". - if (origin.protocol === 'file:') { - return true +// node_modules/ajv/dist/vocabularies/validation/pattern.js +var require_pattern2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code4(); + var util_1 = require_util8(); + var codegen_1 = require_codegen2(); + var error2 = { + message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`, + params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}` + }; + var def = { + keyword: "pattern", + type: "string", + schemaType: "string", + $data: true, + error: error2, + code(cxt) { + const { gen, data, $data, schema: schema2, schemaCode, it: it3 } = cxt; + const u2 = it3.opts.unicodeRegExp ? "u" : ""; + if ($data) { + const { regExp } = it3.opts.code; + const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp); + const valid = gen.let("valid"); + gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u2}).test(${data})`), () => gen.assign(valid, false)); + cxt.fail$data((0, codegen_1._)`!${valid}`); + } else { + const regExp = (0, code_1.usePattern)(cxt, schema2); + cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`); + } + } + }; + exports.default = def; } +}); - // 7. If origin’s scheme component is one which the user agent considers to - // be authenticated, return "Potentially Trustworthy". - - // 8. If origin has been configured as a trustworthy origin, return - // "Potentially Trustworthy". - - // 9. Return "Not Trustworthy". - return false -} - -/** - * A potentially trustworthy URL is one which either inherits context from its - * creator (about:blank, about:srcdoc, data) or one whose origin is a - * potentially trustworthy origin. - * - * Return value `true` means `Potentially Trustworthy`. - * Return value `false` means `Not Trustworthy`. - * - * @see https://www.w3.org/TR/secure-contexts/#is-url-trustworthy - * @param {URL} url - * @returns {boolean} - */ -function isURLPotentiallyTrustworthy (url) { - // Given a URL record (url), the following algorithm returns "Potentially - // Trustworthy" or "Not Trustworthy" as appropriate: - if (!webidl.is.URL(url)) { - return false - } - - // 1. If url is "about:blank" or "about:srcdoc", - // return "Potentially Trustworthy". - if (url.href === 'about:blank' || url.href === 'about:srcdoc') { - return true - } - - // 2. If url’s scheme is "data", return "Potentially Trustworthy". - if (url.protocol === 'data:') return true - - // Note: The origin of blob: URLs is the origin of the context in which they - // were created. Therefore, blobs created in a trustworthy origin will - // themselves be potentially trustworthy. - if (url.protocol === 'blob:') return true - - // 3. Return the result of executing § 3.1 Is origin potentially trustworthy? - // on url’s origin. - return isOriginPotentiallyTrustworthy(url.origin) -} - -// 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 +// node_modules/ajv/dist/vocabularies/validation/limitProperties.js +var require_limitProperties2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var error2 = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxProperties" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxProperties", "minProperties"], + type: "object", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT; + cxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`); + } + }; + exports.default = def; } +}); - // 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 +// node_modules/ajv/dist/vocabularies/validation/required.js +var require_required2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/required.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code4(); + var oasContext_1 = require_oasContext2(); + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var error2 = { + message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`, + params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}` + }; + var def = { + keyword: "required", + type: "object", + schemaType: "array", + $data: true, + error: error2, + code(cxt) { + const { gen, schema: schema2, schemaCode, data, $data, it: it3 } = cxt; + const { opts } = it3; + if (!$data && schema2.length === 0) + return; + const useLoop = schema2.length >= opts.loopRequired; + if (it3.allErrors) + allErrorsMode(); + else + exitOnErrorMode(); + if (opts.strictRequired) { + const props = cxt.parentSchema.properties; + const { definedProperties } = cxt.it; + for (const requiredKey of schema2) { + if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) { + const schemaPath = it3.schemaEnv.baseId + it3.errSchemaPath; + const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`; + (0, util_1.checkStrictMode)(it3, msg, it3.opts.strictRequired); + } + } + } + function allErrorsMode() { + var _a; + if (useLoop || $data) { + cxt.block$data(codegen_1.nil, loopAllRequired); + } else { + for (const prop of schema2) { + const skip = (_a = (0, oasContext_1.getSkipCondition)(cxt.parentSchema, prop)) !== null && _a !== void 0 ? _a : (0, codegen_1._)`false`; + gen.if((0, codegen_1.not)(skip), () => (0, code_1.checkReportMissingProp)(cxt, prop)); + } + } + } + function exitOnErrorMode() { + const missing = gen.let("missing"); + if (useLoop || $data) { + const valid = gen.let("valid", true); + cxt.block$data(valid, () => loopUntilMissing(missing, valid)); + cxt.ok(valid); + } else { + gen.if((0, code_1.checkMissingProp)(cxt, schema2, missing)); + (0, code_1.reportMissingProp)(cxt, missing); + gen.else(); + } + } + function loopAllRequired() { + gen.forOf("prop", schemaCode, (prop) => { + cxt.setParams({ missingProperty: prop }); + gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error()); + }); + } + function loopUntilMissing(missing, valid) { + cxt.setParams({ missingProperty: missing }); + gen.forOf(missing, schemaCode, () => { + gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties)); + gen.if((0, codegen_1.not)(valid), () => { + cxt.error(); + gen.break(); + }); + }, codegen_1.nil); + } + } + }; + exports.default = def; } +}); - // 3. Return false. - return false -} - -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://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 {((target: any) => any)} 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.` - ) +// node_modules/ajv/dist/vocabularies/validation/readOnly.js +var require_readOnly2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/readOnly.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var names_1 = require_names2(); + var error2 = { + message: () => (0, codegen_1.str)`must NOT be present in request context` + }; + var def = { + keyword: "readOnly", + schemaType: "boolean", + error: error2, + code(cxt) { + if (cxt.schema !== true) + return; + const apiContext = (0, codegen_1._)`(${names_1.default.this} && ${names_1.default.this}.apiContext)`; + cxt.fail((0, codegen_1._)`${apiContext} === "request"`); } + }; + exports.default = def; + } +}); - // 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 = kInternalIterator(this.#target) - - // 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 +// node_modules/ajv/dist/vocabularies/validation/writeOnly.js +var require_writeOnly2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/writeOnly.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var names_1 = require_names2(); + var error2 = { + message: () => (0, codegen_1.str)`must NOT be present in response context` + }; + var def = { + keyword: "writeOnly", + schemaType: "boolean", + error: error2, + code(cxt) { + if (cxt.schema !== true) + return; + const apiContext = (0, codegen_1._)`(${names_1.default.this} && ${names_1.default.this}.apiContext)`; + cxt.fail((0, codegen_1._)`${apiContext} === "response"`); } - } + }; + exports.default = def; } +}); - // 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 } - }) +// node_modules/ajv/dist/vocabularies/validation/limitItems.js +var require_limitItems2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var error2 = { + message({ keyword, schemaCode }) { + const comp = keyword === "maxItems" ? "more" : "fewer"; + return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`; + }, + params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}` + }; + var def = { + keyword: ["maxItems", "minItems"], + type: "array", + schemaType: "number", + $data: true, + error: error2, + code(cxt) { + const { keyword, data, schemaCode } = cxt; + const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT; + cxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`); + } + }; + exports.default = def; + } +}); - /** - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - * @returns {IterableIterator} - */ - return function (target, kind) { - return new FastIterableIterator(target, kind) +// node_modules/ajv/dist/runtime/equal.js +var require_equal2 = __commonJS({ + "node_modules/ajv/dist/runtime/equal.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var equal = require_fast_deep_equal(); + equal.code = 'require("ajv/dist/runtime/equal").default'; + exports.default = equal; } -} +}); -/** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {string} name name of the instance - * @param {any} object class - * @param {(target: any) => any} 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'.` - ) +// node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +var require_uniqueItems2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var dataType_1 = require_dataType2(); + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var equal_1 = require_equal2(); + var error2 = { + message: ({ params: { i: i2, j: j3 } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j3} and ${i2} are identical)`, + params: ({ params: { i: i2, j: j3 } }) => (0, codegen_1._)`{i: ${i2}, j: ${j3}}` + }; + var def = { + keyword: "uniqueItems", + type: "array", + schemaType: "boolean", + $data: true, + error: error2, + code(cxt) { + const { gen, data, $data, schema: schema2, parentSchema, schemaCode, it: it3 } = cxt; + if (!$data && !schema2) + return; + const valid = gen.let("valid"); + const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : []; + cxt.block$data(valid, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`); + cxt.ok(valid); + function validateUniqueItems() { + const i2 = gen.let("i", (0, codegen_1._)`${data}.length`); + const j3 = gen.let("j"); + cxt.setParams({ i: i2, j: j3 }); + gen.assign(valid, true); + gen.if((0, codegen_1._)`${i2} > 1`, () => (canOptimize() ? loopN : loopN2)(i2, j3)); + } + function canOptimize() { + return itemTypes.length > 0 && !itemTypes.some((t2) => t2 === "object" || t2 === "array"); + } + function loopN(i2, j3) { + const item = gen.name("item"); + const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it3.opts.strictNumbers, dataType_1.DataType.Wrong); + const indices = gen.const("indices", (0, codegen_1._)`{}`); + gen.for((0, codegen_1._)`;${i2}--;`, () => { + gen.let(item, (0, codegen_1._)`${data}[${i2}]`); + gen.if(wrongType, (0, codegen_1._)`continue`); + if (itemTypes.length > 1) + gen.if((0, codegen_1._)`typeof ${item} == "string"`, (0, codegen_1._)`${item} += "_"`); + gen.if((0, codegen_1._)`typeof ${indices}[${item}] == "number"`, () => { + gen.assign(j3, (0, codegen_1._)`${indices}[${item}]`); + cxt.error(); + gen.assign(valid, false).break(); + }).code((0, codegen_1._)`${indices}[${item}] = ${i2}`); + }); } - for (const { 0: key, 1: value } of makeIterator(this, 'key+value')) { - callbackfn.call(thisArg, value, key, this) + function loopN2(i2, j3) { + const eql = (0, util_1.useFunc)(gen, equal_1.default); + const outer = gen.name("outer"); + gen.label(outer).for((0, codegen_1._)`;${i2}--;`, () => gen.for((0, codegen_1._)`${j3} = ${i2}; ${j3}--;`, () => gen.if((0, codegen_1._)`${eql}(${data}[${i2}], ${data}[${j3}])`, () => { + cxt.error(); + gen.assign(valid, false).break(outer); + }))); } } - } - } - - return Object.defineProperties(object.prototype, { - ...properties, - [Symbol.iterator]: { - writable: true, - enumerable: false, - configurable: true, - value: properties.entries.value - } - }) -} - -/** - * @param {import('./body').ExtractBodyResult} body - * @param {(bytes: Uint8Array) => void} processBody - * @param {(error: Error) => void} processBodyError - * @returns {void} - * - * @see https://fetch.spec.whatwg.org/#body-fully-read - */ -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 - - try { - // 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. - const reader = body.stream.getReader() - - // 5. Read all bytes from reader, given successSteps and errorSteps. - readAllBytes(reader, successSteps, errorSteps) - } catch (e) { - errorSteps(e) - } -} - -/** - * @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 - } + }; + exports.default = def; } -} - -/** - * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes - * @see https://streams.spec.whatwg.org/#read-loop - * @param {ReadableStream>} reader - * @param {(bytes: Uint8Array) => void} successSteps - * @param {(error: Error) => void} failureSteps - * @returns {Promise} - */ -async function readAllBytes (reader, successSteps, failureSteps) { - try { - const bytes = [] - let byteLength = 0 - - do { - const { done, value: chunk } = await reader.read() - - if (done) { - // 1. Call successSteps with bytes. - successSteps(Buffer.concat(bytes, byteLength)) - return - } +}); - // 1. If chunk is not a Uint8Array object, call failureSteps - // with a TypeError and abort these steps. - if (!isUint8Array(chunk)) { - failureSteps(new TypeError('Received non-Uint8Array chunk')) - return +// node_modules/ajv/dist/vocabularies/validation/const.js +var require_const2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/const.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var equal_1 = require_equal2(); + var error2 = { + message: "must be equal to constant", + params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}` + }; + var def = { + keyword: "const", + $data: true, + error: error2, + code(cxt) { + const { gen, data, $data, schemaCode, schema: schema2 } = cxt; + if ($data || schema2 && typeof schema2 == "object") { + cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`); + } else { + cxt.fail((0, codegen_1._)`${schema2} !== ${data}`); + } } - - // 2. Append the bytes represented by chunk to bytes. - bytes.push(chunk) - byteLength += chunk.length - - // 3. Read-loop given reader, bytes, successSteps, and failureSteps. - } while (true) - } catch (e) { - // 1. Call failureSteps with e. - failureSteps(e) - } -} - -/** - * @see https://fetch.spec.whatwg.org/#is-local - * @param {URL} url - * @returns {boolean} - */ -function urlIsLocal (url) { - assert('protocol' in url) // ensure it's a url object - - const protocol = url.protocol - - // A URL is local if its scheme is a local scheme. - // A local scheme is "about", "blob", or "data". - 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:' -} - -/** - * @typedef {Object} RangeHeaderValue - * @property {number|null} rangeStartValue - * @property {number|null} rangeEndValue - */ - -/** - * @see https://fetch.spec.whatwg.org/#simple-range-header-value - * @param {string} value - * @param {boolean} allowWhitespace - * @return {RangeHeaderValue|'failure'} - */ -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' + }; + exports.default = def; } +}); - // 17. If rangeEndValue and rangeStartValue are null, then return failure. - if (rangeEndValue === null && rangeStartValue === null) { - return 'failure' +// node_modules/ajv/dist/vocabularies/validation/enum.js +var require_enum2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/enum.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var equal_1 = require_equal2(); + var error2 = { + message: "must be equal to one of the allowed values", + params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}` + }; + var def = { + keyword: "enum", + schemaType: "array", + $data: true, + error: error2, + code(cxt) { + const { gen, data, $data, schema: schema2, schemaCode, it: it3 } = cxt; + if (!$data && schema2.length === 0) + throw new Error("enum must have non-empty array"); + const useLoop = schema2.length >= it3.opts.loopEnum; + let eql; + const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default); + let valid; + if (useLoop || $data) { + valid = gen.let("valid"); + cxt.block$data(valid, loopEnum); + } else { + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + const vSchema = gen.const("vSchema", schemaCode); + valid = (0, codegen_1.or)(...schema2.map((_x, i2) => equalCode(vSchema, i2))); + } + cxt.pass(valid); + function loopEnum() { + gen.assign(valid, false); + gen.forOf("v", schemaCode, (v3) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v3})`, () => gen.assign(valid, true).break())); + } + function equalCode(vSchema, i2) { + const sch = schema2[i2]; + return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i2}])` : (0, codegen_1._)`${data} === ${sch}`; + } + } + }; + exports.default = def; } +}); - // 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' +// node_modules/ajv/dist/vocabularies/validation/index.js +var require_validation3 = __commonJS({ + "node_modules/ajv/dist/vocabularies/validation/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var limitNumber_1 = require_limitNumber3(); + var multipleOf_1 = require_multipleOf2(); + var limitLength_1 = require_limitLength2(); + var pattern_1 = require_pattern2(); + var limitProperties_1 = require_limitProperties2(); + var required_1 = require_required2(); + var readOnly_1 = require_readOnly2(); + var writeOnly_1 = require_writeOnly2(); + var limitItems_1 = require_limitItems2(); + var uniqueItems_1 = require_uniqueItems2(); + var const_1 = require_const2(); + var enum_1 = require_enum2(); + var validation = [ + // number + limitNumber_1.default, + multipleOf_1.default, + // string + limitLength_1.default, + pattern_1.default, + // object + limitProperties_1.default, + required_1.default, + readOnly_1.default, + writeOnly_1.default, + // array + limitItems_1.default, + uniqueItems_1.default, + // any + { keyword: "type", schemaType: ["string", "array"] }, + { keyword: "nullable", schemaType: "boolean" }, + const_1.default, + enum_1.default + ]; + exports.default = validation; } +}); - // 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 +// node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +var require_additionalItems2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateAdditionalItems = void 0; + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var error2 = { + message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, + params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` + }; + var def = { + keyword: "additionalItems", + type: "array", + schemaType: ["boolean", "object"], + before: "uniqueItems", + error: error2, + code(cxt) { + const { parentSchema, it: it3 } = cxt; + const { items } = parentSchema; + if (!Array.isArray(items)) { + (0, util_1.checkStrictMode)(it3, '"additionalItems" is ignored when "items" is not an array of schemas'); + return; + } + validateAdditionalItems(cxt, items); + } + }; + function validateAdditionalItems(cxt, items) { + const { gen, schema: schema2, data, keyword, it: it3 } = cxt; + it3.items = true; + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + if (schema2 === false) { + cxt.setParams({ len: items.length }); + cxt.pass((0, codegen_1._)`${len} <= ${items.length}`); + } else if (typeof schema2 == "object" && !(0, util_1.alwaysValidSchema)(it3, schema2)) { + const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items.length}`); + gen.if((0, codegen_1.not)(valid), () => validateItems(valid)); + cxt.ok(valid); + } + function validateItems(valid) { + gen.forRange("i", items.length, len, (i2) => { + cxt.subschema({ keyword, dataProp: i2, dataPropType: util_1.Type.Num }, valid); + if (!it3.allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + }); + } + } + exports.validateAdditionalItems = validateAdditionalItems; + exports.default = def; } +}); - _transform (chunk, encoding, callback) { - if (!this._inflateStream) { - if (chunk.length === 0) { - callback() - return +// node_modules/ajv/dist/vocabularies/applicator/items.js +var require_items2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/items.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateTuple = void 0; + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var code_1 = require_code4(); + var def = { + keyword: "items", + type: "array", + schemaType: ["object", "array", "boolean"], + before: "uniqueItems", + code(cxt) { + const { schema: schema2, it: it3 } = cxt; + if (Array.isArray(schema2)) + return validateTuple(cxt, "additionalItems", schema2); + it3.items = true; + if ((0, util_1.alwaysValidSchema)(it3, schema2)) + return; + cxt.ok((0, code_1.validateArray)(cxt)); + } + }; + function validateTuple(cxt, extraItems, schArr = cxt.schema) { + const { gen, parentSchema, data, keyword, it: it3 } = cxt; + checkStrictTuple(parentSchema); + if (it3.opts.unevaluated && schArr.length && it3.items !== true) { + it3.items = util_1.mergeEvaluated.items(gen, schArr.length, it3.items); + } + const valid = gen.name("valid"); + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + schArr.forEach((sch, i2) => { + if ((0, util_1.alwaysValidSchema)(it3, sch)) + return; + gen.if((0, codegen_1._)`${len} > ${i2}`, () => cxt.subschema({ + keyword, + schemaProp: i2, + dataProp: i2 + }, valid)); + cxt.ok(valid); + }); + function checkStrictTuple(sch) { + const { opts, errSchemaPath } = it3; + const l2 = schArr.length; + const fullTuple = l2 === sch.minItems && (l2 === sch.maxItems || sch[extraItems] === false); + if (opts.strictTuples && !fullTuple) { + const msg = `"${keyword}" is ${l2}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`; + (0, util_1.checkStrictMode)(it3, msg, opts.strictTuples); + } } - 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) + exports.validateTuple = validateTuple; + exports.default = def; } +}); - _final (callback) { - if (this._inflateStream) { - this._inflateStream.end() - this._inflateStream = null - } - callback() +// node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +var require_prefixItems2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var items_1 = require_items2(); + var def = { + keyword: "prefixItems", + type: "array", + schemaType: ["array"], + before: "uniqueItems", + code: (cxt) => (0, items_1.validateTuple)(cxt, "items") + }; + exports.default = def; } -} - -/** - * @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' +// node_modules/ajv/dist/vocabularies/applicator/items2020.js +var require_items20202 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var code_1 = require_code4(); + var additionalItems_1 = require_additionalItems2(); + var error2 = { + message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, + params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}` + }; + var def = { + keyword: "items", + type: "array", + schemaType: ["object", "boolean"], + before: "uniqueItems", + error: error2, + code(cxt) { + const { schema: schema2, parentSchema, it: it3 } = cxt; + const { prefixItems } = parentSchema; + it3.items = true; + if ((0, util_1.alwaysValidSchema)(it3, schema2)) + return; + if (prefixItems) + (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems); + else + cxt.ok((0, code_1.validateArray)(cxt)); + } + }; + exports.default = def; } +}); - // 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) +// node_modules/ajv/dist/vocabularies/applicator/contains.js +var require_contains2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var error2 = { + message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`, + params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}` + }; + var def = { + keyword: "contains", + type: "array", + schemaType: ["object", "boolean"], + before: "uniqueItems", + trackErrors: true, + error: error2, + code(cxt) { + const { gen, schema: schema2, parentSchema, data, it: it3 } = cxt; + let min; + let max; + const { minContains, maxContains } = parentSchema; + if (it3.opts.next) { + min = minContains === void 0 ? 1 : minContains; + max = maxContains; + } else { + min = 1; + } + const len = gen.const("len", (0, codegen_1._)`${data}.length`); + cxt.setParams({ min, max }); + if (max === void 0 && min === 0) { + (0, util_1.checkStrictMode)(it3, `"minContains" == 0 without "maxContains": "contains" keyword ignored`); + return; + } + if (max !== void 0 && min > max) { + (0, util_1.checkStrictMode)(it3, `"minContains" > "maxContains" is always invalid`); + cxt.fail(); + return; + } + if ((0, util_1.alwaysValidSchema)(it3, schema2)) { + let cond = (0, codegen_1._)`${len} >= ${min}`; + if (max !== void 0) + cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`; + cxt.pass(cond); + return; + } + it3.items = true; + const valid = gen.name("valid"); + if (max === void 0 && min === 1) { + validateItems(valid, () => gen.if(valid, () => gen.break())); + } else if (min === 0) { + gen.let(valid, true); + if (max !== void 0) + gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount); + } else { + gen.let(valid, false); + validateItemsWithCount(); + } + cxt.result(valid, () => cxt.reset()); + function validateItemsWithCount() { + const schValid = gen.name("_valid"); + const count = gen.let("count", 0); + validateItems(schValid, () => gen.if(schValid, () => checkLimits(count))); + } + function validateItems(_valid, block) { + gen.forRange("i", 0, len, (i2) => { + cxt.subschema({ + keyword: "contains", + dataProp: i2, + dataPropType: util_1.Type.Num, + compositeRule: true + }, _valid); + block(); + }); + } + function checkLimits(count) { + gen.code((0, codegen_1._)`${count}++`); + if (max === void 0) { + gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break()); + } else { + gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid, false).break()); + if (min === 1) + gen.assign(valid, true); + else + gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true)); + } + } + } + }; + exports.default = def; + } +}); - // 6.2. If temporaryMimeType is failure or its essence is "*/*", then continue. - if (temporaryMimeType === 'failure' || temporaryMimeType.essence === '*/*') { - continue +// node_modules/ajv/dist/vocabularies/applicator/dependencies.js +var require_dependencies2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0; + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var code_1 = require_code4(); + exports.error = { + message: ({ params: { property, depsCount, deps } }) => { + const property_ies = depsCount === 1 ? "property" : "properties"; + return (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`; + }, + params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._)`{property: ${property}, + missingProperty: ${missingProperty}, + depsCount: ${depsCount}, + deps: ${deps}}` + // TODO change to reference + }; + var def = { + keyword: "dependencies", + type: "object", + schemaType: "object", + error: exports.error, + code(cxt) { + const [propDeps, schDeps] = splitDependencies(cxt); + validatePropertyDeps(cxt, propDeps); + validateSchemaDeps(cxt, schDeps); + } + }; + function splitDependencies({ schema: schema2 }) { + const propertyDeps = {}; + const schemaDeps = {}; + for (const key in schema2) { + if (key === "__proto__") + continue; + const deps = Array.isArray(schema2[key]) ? propertyDeps : schemaDeps; + deps[key] = schema2[key]; + } + return [propertyDeps, schemaDeps]; } - - // 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') + function validatePropertyDeps(cxt, propertyDeps = cxt.schema) { + const { gen, data, it: it3 } = cxt; + if (Object.keys(propertyDeps).length === 0) + return; + const missing = gen.let("missing"); + for (const prop in propertyDeps) { + const deps = propertyDeps[prop]; + if (deps.length === 0) + continue; + const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it3.opts.ownProperties); + cxt.setParams({ + property: prop, + depsCount: deps.length, + deps: deps.join(", ") + }); + if (it3.allErrors) { + gen.if(hasProperty, () => { + for (const depProp of deps) { + (0, code_1.checkReportMissingProp)(cxt, depProp); + } + }); + } else { + gen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`); + (0, code_1.reportMissingProp)(cxt, missing); + gen.else(); + } + } + } + exports.validatePropertyDeps = validatePropertyDeps; + function validateSchemaDeps(cxt, schemaDeps = cxt.schema) { + const { gen, data, keyword, it: it3 } = cxt; + const valid = gen.name("valid"); + for (const prop in schemaDeps) { + if ((0, util_1.alwaysValidSchema)(it3, schemaDeps[prop])) + continue; + gen.if( + (0, code_1.propertyInData)(gen, data, prop, it3.opts.ownProperties), + () => { + const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid); + cxt.mergeValidEvaluated(schCxt, valid); + }, + () => gen.var(valid, true) + // TODO var + ); + cxt.ok(valid); } - - // 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) } + exports.validateSchemaDeps = validateSchemaDeps; + exports.default = def; } +}); - // 7. If mimeType is null, then return failure. - if (mimeType == null) { - return 'failure' +// node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +var require_propertyNames2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var error2 = { + message: "property name must be valid", + params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}` + }; + var def = { + keyword: "propertyNames", + type: "object", + schemaType: ["object", "boolean"], + error: error2, + code(cxt) { + const { gen, schema: schema2, data, it: it3 } = cxt; + if ((0, util_1.alwaysValidSchema)(it3, schema2)) + return; + const valid = gen.name("valid"); + gen.forIn("key", data, (key) => { + cxt.setParams({ propertyName: key }); + cxt.subschema({ + keyword: "propertyNames", + data: key, + dataTypes: ["string"], + propertyName: key, + compositeRule: true + }, valid); + gen.if((0, codegen_1.not)(valid), () => { + cxt.error(true); + if (!it3.allErrors) + gen.break(); + }); + }); + cxt.ok(valid); + } + }; + exports.default = def; } +}); - // 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 +// node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +var require_additionalProperties2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code4(); + var codegen_1 = require_codegen2(); + var names_1 = require_names2(); + var util_1 = require_util8(); + var error2 = { + message: "must NOT have additional properties", + params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}` + }; + var def = { + keyword: "additionalProperties", + type: ["object"], + schemaType: ["boolean", "object"], + allowUndefined: true, + trackErrors: true, + error: error2, + code(cxt) { + const { gen, parentSchema, data, errsCount, it: it3 } = cxt; + const { schema: schema2 = it3.opts.defaultAdditionalProperties } = cxt; + if (!errsCount) + throw new Error("ajv implementation error"); + const { allErrors, opts } = it3; + it3.props = true; + if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it3, schema2)) + return; + const props = (0, code_1.allSchemaProperties)(parentSchema.properties); + const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties); + checkAdditionalProperties(); + cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`); + function checkAdditionalProperties() { + gen.forIn("key", data, (key) => { + if (!props.length && !patProps.length) + additionalPropertyCode(key); + else + gen.if(isAdditional(key), () => additionalPropertyCode(key)); + }); + } + function isAdditional(key) { + let definedProp; + if (props.length > 8) { + const propsSchema = (0, util_1.schemaRefOrVal)(it3, parentSchema.properties, "properties"); + definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key); + } else if (props.length) { + definedProp = (0, codegen_1.or)(...props.map((p2) => (0, codegen_1._)`${key} === ${p2}`)); + } else { + definedProp = codegen_1.nil; + } + if (patProps.length) { + definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p2) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p2)}.test(${key})`)); + } + return (0, codegen_1.not)(definedProp); + } + function deleteAdditional(key) { + gen.code((0, codegen_1._)`delete ${data}[${key}]`); + } + function additionalPropertyCode(key) { + if (opts.removeAdditional === "all" || opts.removeAdditional && schema2 === false) { + deleteAdditional(key); + return; + } + if (schema2 === false) { + cxt.setParams({ additionalProperty: key }); + cxt.error(); + if (!allErrors) + gen.break(); + return; + } + if (typeof schema2 == "object" && !(0, util_1.alwaysValidSchema)(it3, schema2)) { + const valid = gen.name("valid"); + if (opts.removeAdditional === "failing") { + applyAdditionalSchema(key, valid, false); + gen.if((0, codegen_1.not)(valid), () => { + cxt.reset(); + deleteAdditional(key); + }); + } else { + applyAdditionalSchema(key, valid); + if (!allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + } + } + } + function applyAdditionalSchema(key, valid, errors) { + const subschema = { + keyword: "additionalProperties", + dataProp: key, + dataPropType: util_1.Type.Str + }; + if (errors === false) { + Object.assign(subschema, { + compositeRule: true, + createErrors: false, + allErrors: false + }); + } + cxt.subschema(subschema, valid); } - } 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 = '' + }; + exports.default = def; } +}); - // 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 +// node_modules/ajv/dist/vocabularies/applicator/properties.js +var require_properties2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var validate_1 = require_validate2(); + var code_1 = require_code4(); + var util_1 = require_util8(); + var additionalProperties_1 = require_additionalProperties2(); + var def = { + keyword: "properties", + type: "object", + schemaType: "object", + code(cxt) { + const { gen, schema: schema2, parentSchema, data, it: it3 } = cxt; + if (it3.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0 || it3.opts.defaultAdditionalProperties === false) { + additionalProperties_1.default.code(new validate_1.KeywordCxt(it3, additionalProperties_1.default, "additionalProperties")); + } + const allProps = (0, code_1.allSchemaProperties)(schema2); + for (const prop of allProps) { + it3.definedProperties.add(prop); + } + if (it3.opts.unevaluated && allProps.length && it3.props !== true) { + it3.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it3.props); + } + const properties = allProps.filter((p2) => !(0, util_1.alwaysValidSchema)(it3, schema2[p2])); + if (properties.length === 0) + return; + const valid = gen.name("valid"); + for (const prop of properties) { + if (hasDefault(prop)) { + applyPropertySchema(prop); + } else { + gen.if((0, code_1.propertyInData)(gen, data, prop, it3.opts.ownProperties)); + applyPropertySchema(prop); + if (!it3.allErrors) + gen.else().var(valid, true); + gen.endIf(); + } + cxt.it.definedProperties.add(prop); + cxt.ok(valid); + } + function hasDefault(prop) { + return it3.opts.useDefaults && !it3.compositeRule && schema2[prop].default !== void 0; + } + function applyPropertySchema(prop) { + cxt.subschema({ + keyword: "properties", + schemaProp: prop, + dataProp: prop + }, valid); + } + } + }; + exports.default = def; } +}); - // 3. Return the result of getting, decoding, and splitting value. - return gettingDecodingSplitting(value) -} - -function hasAuthenticationEntry (request) { - return false -} - -/** - * @see https://url.spec.whatwg.org/#include-credentials - * @param {URL} url - */ -function includesCredentials (url) { - // A URL includes credentials if its username or password is not the empty string. - return !!(url.username || url.password) -} - -/** - * @see https://html.spec.whatwg.org/multipage/document-sequences.html#traversable-navigable - * @param {object|string} navigable - */ -function isTraversableNavigable (navigable) { - // Returns true only if we have an actual traversable navigable object - // that can prompt the user for credentials. In Node.js, this will always - // be false since there's no Window object or navigable. - return navigable != null && navigable !== 'client' && navigable !== 'no-traversable' -} - -class EnvironmentSettingsObjectBase { - get baseUrl () { - return getGlobalOrigin() +// node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +var require_patternProperties2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code4(); + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var util_2 = require_util8(); + var def = { + keyword: "patternProperties", + type: "object", + schemaType: "object", + code(cxt) { + const { gen, schema: schema2, data, parentSchema, it: it3 } = cxt; + const { opts } = it3; + const patterns = (0, code_1.allSchemaProperties)(schema2); + const alwaysValidPatterns = patterns.filter((p2) => (0, util_1.alwaysValidSchema)(it3, schema2[p2])); + if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it3.opts.unevaluated || it3.props === true)) { + return; + } + const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties; + const valid = gen.name("valid"); + if (it3.props !== true && !(it3.props instanceof codegen_1.Name)) { + it3.props = (0, util_2.evaluatedPropsToName)(gen, it3.props); + } + const { props } = it3; + validatePatternProperties(); + function validatePatternProperties() { + for (const pat of patterns) { + if (checkProperties) + checkMatchingProperties(pat); + if (it3.allErrors) { + validateProperties(pat); + } else { + gen.var(valid, true); + validateProperties(pat); + gen.if(valid); + } + } + } + function checkMatchingProperties(pat) { + for (const prop in checkProperties) { + if (new RegExp(pat).test(prop)) { + (0, util_1.checkStrictMode)(it3, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`); + } + } + } + function validateProperties(pat) { + gen.forIn("key", data, (key) => { + gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => { + const alwaysValid = alwaysValidPatterns.includes(pat); + if (!alwaysValid) { + cxt.subschema({ + keyword: "patternProperties", + schemaProp: pat, + dataProp: key, + dataPropType: util_2.Type.Str + }, valid); + } + if (it3.opts.unevaluated && props !== true) { + gen.assign((0, codegen_1._)`${props}[${key}]`, true); + } else if (!alwaysValid && !it3.allErrors) { + gen.if((0, codegen_1.not)(valid), () => gen.break()); + } + }); + }); + } + } + }; + exports.default = def; } +}); - get origin () { - return this.baseUrl?.origin +// node_modules/ajv/dist/vocabularies/applicator/not.js +var require_not2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/not.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var util_1 = require_util8(); + var def = { + keyword: "not", + schemaType: ["object", "boolean"], + trackErrors: true, + code(cxt) { + const { gen, schema: schema2, it: it3 } = cxt; + if ((0, util_1.alwaysValidSchema)(it3, schema2)) { + cxt.fail(); + return; + } + const valid = gen.name("valid"); + cxt.subschema({ + keyword: "not", + compositeRule: true, + createErrors: false, + allErrors: false + }, valid); + cxt.failResult(valid, () => cxt.reset(), () => cxt.error()); + }, + error: { message: "must NOT be valid" } + }; + exports.default = def; } +}); - policyContainer = makePolicyContainer() -} - -class EnvironmentSettingsObject { - settingsObject = new EnvironmentSettingsObjectBase() -} - -const environmentSettingsObject = new EnvironmentSettingsObject() - -module.exports = { - isAborted, - isCancelled, - isValidEncodedURL, - ReadableStreamFrom, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - clampAndCoarsenConnectionTimingInfo, - coarsenedSharedCurrentTime, - determineRequestsReferrer, - makePolicyContainer, - clonePolicyContainer, - appendFetchMetadata, - appendRequestOriginHeader, - TAOCheck, - corsCheck, - crossOriginResourcePolicyCheck, - createOpaqueTimingInfo, - setRequestReferrerPolicyOnRedirect, - isValidHTTPToken, - requestBadPort, - requestCurrentURL, - responseURL, - responseLocationURL, - isURLPotentiallyTrustworthy, - isValidReasonPhrase, - sameOrigin, - normalizeMethod, - iteratorMixin, - createIterator, - isValidHeaderName, - isValidHeaderValue, - isErrorLike, - fullyReadBody, - readableStreamClose, - urlIsLocal, - urlHasHttpsScheme, - urlIsHttpHttpsScheme, - readAllBytes, - simpleRangeHeaderValue, - buildContentRange, - createInflate, - extractMimeType, - getDecodeSplit, - environmentSettingsObject, - isOriginIPPotentiallyTrustworthy, - hasAuthenticationEntry, - includesCredentials, - isTraversableNavigable -} - - -/***/ }), - -/***/ 93082: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(98061) -const { utf8DecodeBytes } = __nccwpck_require__(98806) - -/** - * @param {(char: string) => boolean} condition - * @param {string} input - * @param {{ position: number }} position - * @returns {string} - * - * @see https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points - */ -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++ +// node_modules/ajv/dist/vocabularies/applicator/anyOf.js +var require_anyOf2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var code_1 = require_code4(); + var def = { + keyword: "anyOf", + schemaType: "array", + trackErrors: true, + code: code_1.validateUnion, + error: { message: "must match a schema in anyOf" } + }; + exports.default = def; } +}); - // 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 - * @returns {string} - * - * @see https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points - */ -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) -} - -const ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g // eslint-disable-line no-control-regex +// node_modules/ajv/dist/vocabularies/applicator/oneOf.js +var require_oneOf2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var error2 = { + message: "must match exactly one schema in oneOf", + params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}` + }; + var def = { + keyword: "oneOf", + schemaType: "array", + trackErrors: true, + error: error2, + code(cxt) { + const { gen, schema: schema2, parentSchema, it: it3 } = cxt; + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + if (it3.opts.discriminator && parentSchema.discriminator) + return; + const schArr = schema2; + const valid = gen.let("valid", false); + const passing = gen.let("passing", null); + const schValid = gen.name("_valid"); + cxt.setParams({ passing }); + gen.block(validateOneOf); + cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); + function validateOneOf() { + schArr.forEach((sch, i2) => { + let schCxt; + if ((0, util_1.alwaysValidSchema)(it3, sch)) { + gen.var(schValid, true); + } else { + schCxt = cxt.subschema({ + keyword: "oneOf", + schemaProp: i2, + compositeRule: true + }, schValid); + } + if (i2 > 0) { + gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i2}]`).else(); + } + gen.if(schValid, () => { + gen.assign(valid, true); + gen.assign(passing, i2); + if (schCxt) + cxt.mergeEvaluated(schCxt, codegen_1.Name); + }); + }); + } + } + }; + exports.default = def; + } +}); -/** - * @param {string} data - * @returns {Uint8Array | 'failure'} - * - * @see https://infra.spec.whatwg.org/#forgiving-base64-decode - */ -function forgivingBase64 (data) { - // 1. Remove all ASCII whitespace from data. - data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, '') +// node_modules/ajv/dist/vocabularies/applicator/allOf.js +var require_allOf2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var util_1 = require_util8(); + var def = { + keyword: "allOf", + schemaType: "array", + code(cxt) { + const { gen, schema: schema2, it: it3 } = cxt; + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + const valid = gen.name("valid"); + schema2.forEach((sch, i2) => { + if ((0, util_1.alwaysValidSchema)(it3, sch)) + return; + const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i2 }, valid, true); + cxt.ok(valid); + cxt.mergeEvaluated(schCxt); + }); + } + }; + exports.default = def; + } +}); - 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 +// node_modules/ajv/dist/vocabularies/applicator/if.js +var require_if2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/if.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var util_1 = require_util8(); + var error2 = { + message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`, + params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}` + }; + var def = { + keyword: "if", + schemaType: ["object", "boolean"], + trackErrors: true, + error: error2, + code(cxt) { + const { gen, parentSchema, it: it3 } = cxt; + if (parentSchema.then === void 0 && parentSchema.else === void 0) { + (0, util_1.checkStrictMode)(it3, '"if" without "then" and "else" is ignored'); + } + const hasThen = hasSchema(it3, "then"); + const hasElse = hasSchema(it3, "else"); + if (!hasThen && !hasElse) + return; + const valid = gen.let("valid", true); + const schValid = gen.name("_valid"); + validateIf(); + cxt.reset(); + if (hasThen && hasElse) { + const ifClause = gen.let("ifClause"); + cxt.setParams({ ifClause }); + gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause)); + } else if (hasThen) { + gen.if(schValid, validateClause("then")); + } else { + gen.if((0, codegen_1.not)(schValid), validateClause("else")); + } + cxt.pass(valid, () => cxt.error(true)); + function validateIf() { + const schCxt = cxt.subschema({ + keyword: "if", + compositeRule: true, + createErrors: false, + allErrors: false + }, schValid); + cxt.mergeEvaluated(schCxt); + } + function validateClause(keyword, ifClause) { + return () => { + const schCxt = cxt.subschema({ keyword }, schValid); + gen.assign(valid, schValid); + cxt.mergeValidEvaluated(schCxt, valid); + if (ifClause) + gen.assign(ifClause, (0, codegen_1._)`${keyword}`); + else + cxt.setParams({ ifClause: keyword }); + }; + } } + }; + function hasSchema(it3, keyword) { + const schema2 = it3.schema[keyword]; + return schema2 !== void 0 && !(0, util_1.alwaysValidSchema)(it3, schema2); } + exports.default = def; } +}); - // 3. If data’s code point length divides by 4 leaving - // a remainder of 1, then return failure. - if (dataLength % 4 === 1) { - return 'failure' +// node_modules/ajv/dist/vocabularies/applicator/thenElse.js +var require_thenElse2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var util_1 = require_util8(); + var def = { + keyword: ["then", "else"], + schemaType: ["object", "boolean"], + code({ keyword, parentSchema, it: it3 }) { + if (parentSchema.if === void 0) + (0, util_1.checkStrictMode)(it3, `"${keyword}" without "if" is ignored`); + } + }; + exports.default = def; } +}); - // 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' +// node_modules/ajv/dist/vocabularies/applicator/index.js +var require_applicator3 = __commonJS({ + "node_modules/ajv/dist/vocabularies/applicator/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var additionalItems_1 = require_additionalItems2(); + var prefixItems_1 = require_prefixItems2(); + var items_1 = require_items2(); + var items2020_1 = require_items20202(); + var contains_1 = require_contains2(); + var dependencies_1 = require_dependencies2(); + var propertyNames_1 = require_propertyNames2(); + var additionalProperties_1 = require_additionalProperties2(); + var properties_1 = require_properties2(); + var patternProperties_1 = require_patternProperties2(); + var not_1 = require_not2(); + var anyOf_1 = require_anyOf2(); + var oneOf_1 = require_oneOf2(); + var allOf_1 = require_allOf2(); + var if_1 = require_if2(); + var thenElse_1 = require_thenElse2(); + function getApplicator(draft2020 = false) { + const applicator = [ + // any + not_1.default, + anyOf_1.default, + oneOf_1.default, + allOf_1.default, + if_1.default, + thenElse_1.default, + // object + propertyNames_1.default, + additionalProperties_1.default, + dependencies_1.default, + properties_1.default, + patternProperties_1.default + ]; + if (draft2020) + applicator.push(prefixItems_1.default, items2020_1.default); + else + applicator.push(additionalItems_1.default, items_1.default); + applicator.push(contains_1.default); + return applicator; + } + exports.default = getApplicator; } +}); - const buffer = Buffer.from(data, 'base64') - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength) -} - -/** - * @param {number} char - * @returns {boolean} - * - * @see https://infra.spec.whatwg.org/#ascii-whitespace - */ -function isASCIIWhitespace (char) { - return ( - char === 0x09 || // \t - char === 0x0a || // \n - char === 0x0c || // \f - char === 0x0d || // \r - char === 0x20 // space - ) -} - -/** - * @param {Uint8Array} input - * @returns {string} - * - * @see https://infra.spec.whatwg.org/#isomorphic-decode - */ -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 -} - -const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/ // eslint-disable-line no-control-regex - -/** - * @param {string} input - * @returns {string} - * - * @see https://infra.spec.whatwg.org/#isomorphic-encode - */ -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://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value - * @param {Uint8Array} bytes - */ -function parseJSONFromBytes (bytes) { - return JSON.parse(utf8DecodeBytes(bytes)) -} - -/** - * @param {string} str - * @param {boolean} [leading=true] - * @param {boolean} [trailing=true] - * @returns {string} - * - * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace - */ -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 {string} - */ -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++ +// node_modules/ajv/dist/vocabularies/format/format.js +var require_format3 = __commonJS({ + "node_modules/ajv/dist/vocabularies/format/format.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var error2 = { + message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`, + params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}` + }; + var def = { + keyword: "format", + type: ["number", "string"], + schemaType: "string", + $data: true, + error: error2, + code(cxt, ruleType) { + const { gen, data, $data, schema: schema2, schemaCode, it: it3 } = cxt; + const { opts, errSchemaPath, schemaEnv, self } = it3; + if (!opts.validateFormats) + return; + if ($data) + validate$DataFormat(); + else + validateFormat(); + function validate$DataFormat() { + const fmts = gen.scopeValue("formats", { + ref: self.formats, + code: opts.code.formats + }); + const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`); + const fType = gen.let("fType"); + const format = gen.let("format"); + gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || "string"`).assign(format, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`"string"`).assign(format, fDef)); + cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt())); + function unknownFmt() { + if (opts.strictSchema === false) + return codegen_1.nil; + return (0, codegen_1._)`${schemaCode} && !${format}`; + } + function invalidFmt() { + const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` : (0, codegen_1._)`${format}(${data})`; + const validData = (0, codegen_1._)`(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))`; + return (0, codegen_1._)`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`; + } + } + function validateFormat() { + const formatDef = self.formats[schema2]; + if (!formatDef) { + unknownFormat(); + return; + } + if (formatDef === true) + return; + const [fmtType, format, fmtRef] = getFormat(formatDef); + if (fmtType === ruleType) + cxt.pass(validCondition()); + function unknownFormat() { + if (opts.strictSchema === false) { + self.logger.warn(unknownMsg()); + return; + } + throw new Error(unknownMsg()); + function unknownMsg() { + return `unknown format "${schema2}" ignored in schema at path "${errSchemaPath}"`; + } + } + function getFormat(fmtDef) { + const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema2)}` : void 0; + const fmt = gen.scopeValue("formats", { key: schema2, ref: fmtDef, code }); + if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) { + return [fmtDef.type || "string", fmtDef.validate, (0, codegen_1._)`${fmt}.validate`]; + } + return ["string", fmtDef, fmt]; + } + function validCondition() { + if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) { + if (!schemaEnv.$async) + throw new Error("async format in sync schema"); + return (0, codegen_1._)`await ${fmtRef}(${data})`; + } + return typeof format == "function" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`; + } + } + } + }; + exports.default = def; } +}); - if (trailing) { - while (trail > 0 && predicate(str.charCodeAt(trail))) trail-- +// node_modules/ajv/dist/vocabularies/format/index.js +var require_format4 = __commonJS({ + "node_modules/ajv/dist/vocabularies/format/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var format_1 = require_format3(); + var format = [format_1.default]; + exports.default = format; } +}); - return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1) -} - -// 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') +// node_modules/ajv/dist/vocabularies/metadata.js +var require_metadata2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/metadata.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.contentVocabulary = exports.metadataVocabulary = void 0; + exports.metadataVocabulary = [ + "title", + "description", + "default", + "deprecated", + /** + * readOnly/writeOnly are handled as validation keywords when OAS context is provided. + * Keeping them here would register them as annotation-only metadata and would + * prevent the context-aware validation behavior. + * + * @see ./validation/readOnly.ts + * @see ./validation/writeOnly.ts + */ + // "readOnly", + // "writeOnly", + "examples" + ]; + exports.contentVocabulary = [ + "contentMediaType", + "contentEncoding", + "contentSchema" + ]; } +}); - // 3. Assert: result is a string. - assert(typeof result === 'string') - - // 4. Return result. - return result -} - -module.exports = { - collectASequenceOfCodePoints, - collectASequenceOfCodePointsFast, - forgivingBase64, - isASCIIWhitespace, - isomorphicDecode, - isomorphicEncode, - parseJSONFromBytes, - removeASCIIWhitespace, - removeChars, - serializeJavascriptValueToJSONString -} - - -/***/ }), - -/***/ 21800: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(98061) -const { runtimeFeatures } = __nccwpck_require__(15072) - -/** - * @typedef {object} Metadata - * @property {SRIHashAlgorithm} alg - The algorithm used for the hash. - * @property {string} val - The base64-encoded hash value. - */ - -/** - * @typedef {Metadata[]} MetadataList - */ - -/** - * @typedef {('sha256' | 'sha384' | 'sha512')} SRIHashAlgorithm - */ - -/** - * @type {Map} - * - * The valid SRI hash algorithm token set is the ordered set « "sha256", - * "sha384", "sha512" » (corresponding to SHA-256, SHA-384, and SHA-512 - * respectively). The ordering of this set is meaningful, with stronger - * algorithms appearing later in the set. - * - * @see https://w3c.github.io/webappsec-subresource-integrity/#valid-sri-hash-algorithm-token-set - */ -const validSRIHashAlgorithmTokenSet = new Map([['sha256', 0], ['sha384', 1], ['sha512', 2]]) - -// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable -/** @type {import('node:crypto')} */ -let crypto - -if (runtimeFeatures.has('crypto')) { - crypto = __nccwpck_require__(6005) - const cryptoHashes = crypto.getHashes() - - // If no hashes are available, we cannot support SRI. - if (cryptoHashes.length === 0) { - validSRIHashAlgorithmTokenSet.clear() +// node_modules/ajv/dist/vocabularies/draft7.js +var require_draft7 = __commonJS({ + "node_modules/ajv/dist/vocabularies/draft7.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var core_1 = require_core6(); + var validation_1 = require_validation3(); + var applicator_1 = require_applicator3(); + var format_1 = require_format4(); + var metadata_1 = require_metadata2(); + var draft7Vocabularies = [ + core_1.default, + validation_1.default, + (0, applicator_1.default)(), + format_1.default, + metadata_1.metadataVocabulary, + metadata_1.contentVocabulary + ]; + exports.default = draft7Vocabularies; } +}); - for (const algorithm of validSRIHashAlgorithmTokenSet.keys()) { - // If the algorithm is not supported, remove it from the list. - if (cryptoHashes.includes(algorithm) === false) { - validSRIHashAlgorithmTokenSet.delete(algorithm) - } +// node_modules/ajv/dist/vocabularies/discriminator/types.js +var require_types2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DiscrError = void 0; + var DiscrError; + (function(DiscrError2) { + DiscrError2["Tag"] = "tag"; + DiscrError2["Mapping"] = "mapping"; + })(DiscrError || (exports.DiscrError = DiscrError = {})); } -} else { - // If crypto is not available, we cannot support SRI. - validSRIHashAlgorithmTokenSet.clear() -} +}); -/** - * @typedef GetSRIHashAlgorithmIndex - * @type {(algorithm: SRIHashAlgorithm) => number} - * @param {SRIHashAlgorithm} algorithm - * @returns {number} The index of the algorithm in the valid SRI hash algorithm - * token set. - */ - -const getSRIHashAlgorithmIndex = /** @type {GetSRIHashAlgorithmIndex} */ (Map.prototype.get.bind( - validSRIHashAlgorithmTokenSet)) - -/** - * @typedef IsValidSRIHashAlgorithm - * @type {(algorithm: string) => algorithm is SRIHashAlgorithm} - * @param {*} algorithm - * @returns {algorithm is SRIHashAlgorithm} - */ - -const isValidSRIHashAlgorithm = /** @type {IsValidSRIHashAlgorithm} */ ( - Map.prototype.has.bind(validSRIHashAlgorithmTokenSet) -) - -/** - * @param {Uint8Array} bytes - * @param {string} metadataList - * @returns {boolean} - * - * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist - */ -const bytesMatch = runtimeFeatures.has('crypto') === false || validSRIHashAlgorithmTokenSet.size === 0 - // 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). - ? () => true - : (bytes, metadataList) => { - // 1. Let parsedMetadata be the result of parsing metadataList. - const parsedMetadata = parseMetadata(metadataList) - - // 2. If parsedMetadata is empty set, return true. - if (parsedMetadata.length === 0) { - return true +// node_modules/ajv/dist/vocabularies/discriminator/index.js +var require_discriminator2 = __commonJS({ + "node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var codegen_1 = require_codegen2(); + var types_1 = require_types2(); + var compile_1 = require_compile2(); + var ref_error_1 = require_ref_error2(); + var util_1 = require_util8(); + var error2 = { + message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf or anyOf`, + params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}` + }; + function getDiscriminatorPropertyFromAllOf(sch, tagName) { + var _a; + if (!sch.allOf || !Array.isArray(sch.allOf)) { + return void 0; } - - // 3. Let metadata be the result of getting the strongest - // metadata from parsedMetadata. - const metadata = getStrongestMetadata(parsedMetadata) - - // 4. For each item in metadata: - for (const item of metadata) { - // 1. Let algorithm be the item["alg"]. - const algorithm = item.alg - - // 2. Let expectedValue be the item["val"]. - const expectedValue = item.val - - // 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 . - const actualValue = applyAlgorithmToBytes(algorithm, bytes) - - // 4. If actualValue is a case-sensitive match for expectedValue, - // return true. - if (caseSensitiveMatch(actualValue, expectedValue)) { - return true + for (const subschema of sch.allOf) { + if ((_a = subschema === null || subschema === void 0 ? void 0 : subschema.properties) === null || _a === void 0 ? void 0 : _a[tagName]) { + return subschema.properties[tagName]; } } - - // 5. Return false. - return false - } - -/** - * @param {MetadataList} metadataList - * @returns {MetadataList} The strongest hash algorithm from the metadata list. - */ -function getStrongestMetadata (metadataList) { - // 1. Let result be the empty set and strongest be the empty string. - const result = [] - /** @type {Metadata|null} */ - let strongest = null - - // 2. For each item in set: - for (const item of metadataList) { - // 1. Assert: item["alg"] is a valid SRI hash algorithm token. - assert(isValidSRIHashAlgorithm(item.alg), 'Invalid SRI hash algorithm token') - - // 2. If result is the empty set, then: - if (result.length === 0) { - // 1. Append item to result. - result.push(item) - - // 2. Set strongest to item. - strongest = item - - // 3. Continue. - continue + return void 0; } + var def = { + keyword: "discriminator", + type: "object", + schemaType: "object", + error: error2, + code(cxt) { + const { gen, data, schema: schema2, parentSchema, it: it3 } = cxt; + const keyword = parentSchema.oneOf ? "oneOf" : parentSchema.anyOf ? "anyOf" : void 0; + if (!it3.opts.discriminator) { + throw new Error("discriminator: requires discriminator option"); + } + const tagName = schema2.propertyName; + if (typeof tagName != "string") + throw new Error("discriminator: requires propertyName"); + if (!keyword) + throw new Error("discriminator: requires oneOf or anyOf composite keyword"); + const parentSchemaVariants = parentSchema[keyword]; + const valid = gen.let("valid", false); + const tag = gen.const("tag", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`); + gen.if((0, codegen_1._)`typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName })); + cxt.ok(valid); + function validateMapping() { + const mapping = getMapping(); + gen.if(false); + for (const tagValue in mapping) { + gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`); + gen.assign(valid, applyTagSchema(mapping[tagValue])); + } + gen.else(); + cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName }); + gen.endIf(); + } + function applyTagSchema(schemaProp) { + const _valid = gen.name("valid"); + const schCxt = cxt.subschema({ keyword, schemaProp }, _valid); + cxt.mergeEvaluated(schCxt, codegen_1.Name); + return _valid; + } + function getMapping() { + var _a; + const discriminatorMapping = {}; + const topRequired = hasRequired(parentSchema); + let tagRequired = true; + for (let i2 = 0; i2 < parentSchemaVariants.length; i2++) { + let sch = parentSchemaVariants[i2]; + const schRef = sch === null || sch === void 0 ? void 0 : sch.$ref; + if (schRef && schema2.mapping) { + const { mapping } = schema2; + const matchedKeys = Object.keys(mapping).filter((key) => mapping[key] === sch.$ref); + if (matchedKeys.length) { + for (const key of matchedKeys) { + addMapping(key, i2); + } + continue; + } + } + if (schRef && !(0, util_1.schemaHasRulesButRef)(sch, it3.self.RULES)) { + sch = compile_1.resolveRef.call(it3.self, it3.schemaEnv.root, it3.baseId, schRef); + if (sch instanceof compile_1.SchemaEnv) + sch = sch.schema; + if (sch === void 0) + throw new ref_error_1.default(it3.opts.uriResolver, it3.baseId, schRef); + } + let propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName]; + if (!propSch && (sch === null || sch === void 0 ? void 0 : sch.allOf)) { + propSch = getDiscriminatorPropertyFromAllOf(sch, tagName); + } + if (typeof propSch != "object") { + throw new Error(`discriminator: ${keyword} subschemas (or referenced schemas) must have "properties/${tagName}" or match mapping`); + } + tagRequired = tagRequired && (topRequired || hasRequired(sch)); + addMappings(propSch, i2); + } + if (!tagRequired) + throw new Error(`discriminator: "${tagName}" must be required`); + return discriminatorMapping; + function hasRequired(sch) { + if (Array.isArray(sch.required) && sch.required.includes(tagName)) { + return true; + } + if (sch.allOf && Array.isArray(sch.allOf)) { + for (const subschema of sch.allOf) { + const subSch = subschema; + if (Array.isArray(subSch.required) && subSch.required.includes(tagName)) { + return true; + } + } + } + return false; + } + function addMappings(sch, i2) { + if (sch.const) { + addMapping(sch.const, i2); + } else if (sch.enum) { + for (const tagValue of sch.enum) { + addMapping(tagValue, i2); + } + } else { + throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`); + } + } + function addMapping(tagValue, i2) { + if (typeof tagValue != "string" || tagValue in discriminatorMapping) { + throw new Error(`discriminator: "${tagName}" values must be unique strings`); + } + discriminatorMapping[tagValue] = i2; + } + } + } + }; + exports.default = def; + } +}); - // 3. Let currentAlgorithm be strongest["alg"], and currentAlgorithmIndex be - // the index of currentAlgorithm in the valid SRI hash algorithm token set. - const currentAlgorithm = /** @type {Metadata} */ (strongest).alg - const currentAlgorithmIndex = getSRIHashAlgorithmIndex(currentAlgorithm) - - // 4. Let newAlgorithm be the item["alg"], and newAlgorithmIndex be the - // index of newAlgorithm in the valid SRI hash algorithm token set. - const newAlgorithm = item.alg - const newAlgorithmIndex = getSRIHashAlgorithmIndex(newAlgorithm) - - // 5. If newAlgorithmIndex is less than currentAlgorithmIndex, then continue. - if (newAlgorithmIndex < currentAlgorithmIndex) { - continue +// node_modules/ajv/dist/refs/json-schema-draft-07.json +var require_json_schema_draft_07 = __commonJS({ + "node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports, module3) { + module3.exports = { + $schema: "http://json-schema.org/draft-07/schema#", + $id: "http://json-schema.org/draft-07/schema#", + title: "Core schema meta-schema", + definitions: { + schemaArray: { + type: "array", + minItems: 1, + items: { $ref: "#" } + }, + nonNegativeInteger: { + type: "integer", + minimum: 0 + }, + nonNegativeIntegerDefault0: { + allOf: [{ $ref: "#/definitions/nonNegativeInteger" }, { default: 0 }] + }, + simpleTypes: { + enum: ["array", "boolean", "integer", "null", "number", "object", "string"] + }, + stringArray: { + type: "array", + items: { type: "string" }, + uniqueItems: true, + default: [] + } + }, + type: ["object", "boolean"], + properties: { + $id: { + type: "string", + format: "uri-reference" + }, + $schema: { + type: "string", + format: "uri" + }, + $ref: { + type: "string", + format: "uri-reference" + }, + $comment: { + type: "string" + }, + title: { + type: "string" + }, + description: { + type: "string" + }, + default: true, + readOnly: { + type: "boolean", + default: false + }, + examples: { + type: "array", + items: true + }, + multipleOf: { + type: "number", + exclusiveMinimum: 0 + }, + maximum: { + type: "number" + }, + exclusiveMaximum: { + type: "number" + }, + minimum: { + type: "number" + }, + exclusiveMinimum: { + type: "number" + }, + maxLength: { $ref: "#/definitions/nonNegativeInteger" }, + minLength: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, + pattern: { + type: "string", + format: "regex" + }, + additionalItems: { $ref: "#" }, + items: { + anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }], + default: true + }, + maxItems: { $ref: "#/definitions/nonNegativeInteger" }, + minItems: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, + uniqueItems: { + type: "boolean", + default: false + }, + contains: { $ref: "#" }, + maxProperties: { $ref: "#/definitions/nonNegativeInteger" }, + minProperties: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, + required: { $ref: "#/definitions/stringArray" }, + additionalProperties: { $ref: "#" }, + definitions: { + type: "object", + additionalProperties: { $ref: "#" }, + default: {} + }, + properties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: {} + }, + patternProperties: { + type: "object", + additionalProperties: { $ref: "#" }, + propertyNames: { format: "regex" }, + default: {} + }, + dependencies: { + type: "object", + additionalProperties: { + anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] + } + }, + propertyNames: { $ref: "#" }, + const: true, + enum: { + type: "array", + items: true, + minItems: 1, + uniqueItems: true + }, + type: { + anyOf: [ + { $ref: "#/definitions/simpleTypes" }, + { + type: "array", + items: { $ref: "#/definitions/simpleTypes" }, + minItems: 1, + uniqueItems: true + } + ] + }, + format: { type: "string" }, + contentMediaType: { type: "string" }, + contentEncoding: { type: "string" }, + if: { $ref: "#" }, + then: { $ref: "#" }, + else: { $ref: "#" }, + allOf: { $ref: "#/definitions/schemaArray" }, + anyOf: { $ref: "#/definitions/schemaArray" }, + oneOf: { $ref: "#/definitions/schemaArray" }, + not: { $ref: "#" } + }, + default: true + }; + } +}); - // 6. Otherwise, if newAlgorithmIndex is greater than - // currentAlgorithmIndex: - } else if (newAlgorithmIndex > currentAlgorithmIndex) { - // 1. Set strongest to item. - strongest = item +// node_modules/ajv/dist/ajv.js +var require_ajv = __commonJS({ + "node_modules/ajv/dist/ajv.js"(exports, module3) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0; + var core_1 = require_core5(); + var draft7_1 = require_draft7(); + var discriminator_1 = require_discriminator2(); + var draft7MetaSchema = require_json_schema_draft_07(); + var META_SUPPORT_DATA = ["/properties"]; + var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema"; + var Ajv2 = class extends core_1.default { + _addVocabularies() { + super._addVocabularies(); + draft7_1.default.forEach((v3) => this.addVocabulary(v3)); + if (this.opts.discriminator) + this.addKeyword(discriminator_1.default); + } + _addDefaultMetaSchema() { + super._addDefaultMetaSchema(); + if (!this.opts.meta) + return; + const metaSchema = this.opts.$data ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) : draft7MetaSchema; + this.addMetaSchema(metaSchema, META_SCHEMA_ID, false); + this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; + } + defaultMeta() { + return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0); + } + }; + exports.Ajv = Ajv2; + module3.exports = exports = Ajv2; + module3.exports.Ajv = Ajv2; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.default = Ajv2; + var validate_1 = require_validate2(); + Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen2(); + Object.defineProperty(exports, "_", { enumerable: true, get: function() { + return codegen_1._; + } }); + Object.defineProperty(exports, "str", { enumerable: true, get: function() { + return codegen_1.str; + } }); + Object.defineProperty(exports, "stringify", { enumerable: true, get: function() { + return codegen_1.stringify; + } }); + Object.defineProperty(exports, "nil", { enumerable: true, get: function() { + return codegen_1.nil; + } }); + Object.defineProperty(exports, "Name", { enumerable: true, get: function() { + return codegen_1.Name; + } }); + Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() { + return codegen_1.CodeGen; + } }); + var validation_error_1 = require_validation_error2(); + Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function() { + return validation_error_1.default; + } }); + var ref_error_1 = require_ref_error2(); + Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function() { + return ref_error_1.default; + } }); + } +}); - // 2. Set result to « item ». - result[0] = item - result.length = 1 +// node_modules/ajv-formats/dist/limit.js +var require_limit = __commonJS({ + "node_modules/ajv-formats/dist/limit.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.formatLimitDefinition = void 0; + var ajv_1 = require_ajv(); + var codegen_1 = require_codegen2(); + var ops = codegen_1.operators; + var KWDs = { + formatMaximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT }, + formatMinimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT }, + formatExclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE }, + formatExclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE } + }; + var error2 = { + message: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`, + params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}` + }; + exports.formatLimitDefinition = { + keyword: Object.keys(KWDs), + type: "string", + schemaType: "string", + $data: true, + error: error2, + code(cxt) { + const { gen, data, schemaCode, keyword, it: it3 } = cxt; + const { opts, self } = it3; + if (!opts.validateFormats) + return; + const fCxt = new ajv_1.KeywordCxt(it3, self.RULES.all.format.definition, "format"); + if (fCxt.$data) + validate$DataFormat(); + else + validateFormat(); + function validate$DataFormat() { + const fmts = gen.scopeValue("formats", { + ref: self.formats, + code: opts.code.formats + }); + const fmt = gen.const("fmt", (0, codegen_1._)`${fmts}[${fCxt.schemaCode}]`); + cxt.fail$data((0, codegen_1.or)((0, codegen_1._)`typeof ${fmt} != "object"`, (0, codegen_1._)`${fmt} instanceof RegExp`, (0, codegen_1._)`typeof ${fmt}.compare != "function"`, compareCode(fmt))); + } + function validateFormat() { + const format = fCxt.schema; + const fmtDef = self.formats[format]; + if (!fmtDef || fmtDef === true) + return; + if (typeof fmtDef != "object" || fmtDef instanceof RegExp || typeof fmtDef.compare != "function") { + throw new Error(`"${keyword}": format "${format}" does not define "compare" function`); + } + const fmt = gen.scopeValue("formats", { + key: format, + ref: fmtDef, + code: opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(format)}` : void 0 + }); + cxt.fail$data(compareCode(fmt)); + } + function compareCode(fmt) { + return (0, codegen_1._)`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`; + } + }, + dependencies: ["format"] + }; + var formatLimitPlugin = (ajv2) => { + ajv2.addKeyword(exports.formatLimitDefinition); + return ajv2; + }; + exports.default = formatLimitPlugin; + } +}); - // 7. Otherwise, newAlgorithmIndex and currentAlgorithmIndex are the same - // value. Append item to result. - } else { - result.push(item) +// node_modules/ajv-formats/dist/index.js +var require_dist = __commonJS({ + "node_modules/ajv-formats/dist/index.js"(exports, module3) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var formats_1 = require_formats(); + var limit_1 = require_limit(); + var codegen_1 = require_codegen2(); + var fullName = new codegen_1.Name("fullFormats"); + var fastName = new codegen_1.Name("fastFormats"); + var formatsPlugin = (ajv2, opts = { keywords: true }) => { + if (Array.isArray(opts)) { + addFormats2(ajv2, opts, formats_1.fullFormats, fullName); + return ajv2; + } + const [formats, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName]; + const list = opts.formats || formats_1.formatNames; + addFormats2(ajv2, list, formats, exportName); + if (opts.keywords) + (0, limit_1.default)(ajv2); + return ajv2; + }; + formatsPlugin.get = (name, mode = "full") => { + const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats; + const f = formats[name]; + if (!f) + throw new Error(`Unknown format "${name}"`); + return f; + }; + function addFormats2(ajv2, list, fs9, exportName) { + var _a; + var _b; + (_a = (_b = ajv2.opts.code).formats) !== null && _a !== void 0 ? _a : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`; + for (const f of list) + ajv2.addFormat(f, fs9[f]); } + module3.exports = exports = formatsPlugin; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.default = formatsPlugin; } +}); - // 3. Return result. - return result -} - -/** - * @param {string} metadata - * @returns {MetadataList} - * - * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata - */ -function parseMetadata (metadata) { - // 1. Let result be the empty set. - /** @type {MetadataList} */ - const result = [] - - // 2. For each item returned by splitting metadata on spaces: - for (const item of metadata.split(' ')) { - // 1. Let expression-and-options be the result of splitting item on U+003F (?). - const expressionAndOptions = item.split('?', 1) - - // 2. Let algorithm-expression be expression-and-options[0]. - const algorithmExpression = expressionAndOptions[0] - - // 3. Let base64-value be the empty string. - let base64Value = '' - - // 4. Let algorithm-and-value be the result of splitting algorithm-expression on U+002D (-). - const algorithmAndValue = [algorithmExpression.slice(0, 6), algorithmExpression.slice(7)] - - // 5. Let algorithm be algorithm-and-value[0]. - const algorithm = algorithmAndValue[0] - - // 6. If algorithm is not a valid SRI hash algorithm token, then continue. - if (!isValidSRIHashAlgorithm(algorithm)) { - continue +// node_modules/@redocly/openapi-core/lib/rules/ajv.js +function releaseAjvInstance() { + ajvInstances["2020"] = void 0; + ajvInstances["draft4"] = void 0; +} +function getSchemaIdKey(dialect) { + return dialect === "draft4" ? "id" : "$id"; +} +function getDialectBySpecVersion(specVersion) { + if (specVersion === "oas2" || specVersion === "oas3_0") + return "draft4"; + return "2020"; +} +function getAjv(resolve8, dialect) { + if (!ajvInstances[dialect]) { + const schemaIdKey = getSchemaIdKey(dialect); + const options2 = { + schemaId: schemaIdKey, + meta: true, + allErrors: true, + strictSchema: false, + inlineRefs: false, + validateSchema: false, + discriminator: true, + allowUnionTypes: true, + validateFormats: true, + passContext: true, + loadSchemaSync(base, $ref, $id) { + const decodedBase = decodeURI(base.split("#")[0]); + const resolvedRef = resolve8({ $ref }, decodedBase); + if (!resolvedRef || !resolvedRef.location) + return false; + return { + [schemaIdKey]: encodeURI(resolvedRef.location.source.absoluteRef) + "#" + $id, + ...resolvedRef.node + }; + }, + logger: false + }; + ajvInstances[dialect] = dialect === "2020" ? new import__2.default(options2) : new import_draft4.default(options2); + (0, import_ajv_formats.default)(ajvInstances[dialect]); + } + return ajvInstances[dialect]; +} +function getAjvValidator(schema2, loc, resolve8, allowAdditionalProperties, dialect) { + const ajv2 = getAjv(resolve8, dialect); + const $id = encodeURI(loc.absolutePointer); + const schemaIdKey = getSchemaIdKey(dialect); + if (!ajv2.getSchema($id)) { + ajv2.setDefaultUnevaluatedProperties(allowAdditionalProperties); + ajv2.addSchema({ + [schemaIdKey]: $id, + ...schema2 + }, $id); + } + return ajv2.getSchema($id); +} +function validateJsonSchema(data, schema2, options2) { + const { schemaLoc, instancePath, resolve: resolve8, allowAdditionalProperties, ajvContext, specVersion } = options2; + const dialect = getDialectBySpecVersion(specVersion); + const validate = getAjvValidator(schema2, schemaLoc, resolve8, allowAdditionalProperties, dialect); + if (!validate) + return { valid: true, errors: [] }; + const dataCxt = { + instancePath, + parentData: { fake: {} }, + parentDataProperty: "fake", + rootData: {}, + dynamicAnchors: {} + }; + const valid = validate.call(ajvContext ?? {}, data, dataCxt); + return { + valid: !!valid, + errors: (validate.errors || []).map(beatifyErrorMessage) + }; + function beatifyErrorMessage(error2) { + let message = error2.message; + const suggest = error2.keyword === "enum" ? error2.params.allowedValues : void 0; + if (suggest) { + message += ` ${suggest.map((e2) => `"${e2}"`).join(", ")}`; } - - // 7. If algorithm-and-value[1] exists, set base64-value to - // algorithm-and-value[1]. - if (algorithmAndValue[1]) { - base64Value = algorithmAndValue[1] + if (error2.keyword === "type") { + message = `type ${message}`; } - - // 8. Let metadata be the ordered map - // «["alg" → algorithm, "val" → base64-value]». - const metadata = { - alg: algorithm, - val: base64Value + const relativePath = error2.instancePath.substring(instancePath.length + 1); + const propName = relativePath.substring(relativePath.lastIndexOf("/") + 1); + if (propName) { + message = `\`${propName}\` property ${message}`; } - - // 9. Append metadata to result. - result.push(metadata) + if (error2.keyword === "additionalProperties" || error2.keyword === "unevaluatedProperties") { + const property = error2.params.additionalProperty || error2.params.unevaluatedProperty; + message = `${message} \`${property}\``; + error2.instancePath += "/" + escapePointerFragment(property); + } + return { + ...error2, + message, + suggest + }; } - - // 3. Return result. - return result } +var import__2, import_draft4, import_ajv_formats, ajvInstances; +var init_ajv = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/ajv.js"() { + import__2 = __toESM(require__(), 1); + import_draft4 = __toESM(require_draft42(), 1); + import_ajv_formats = __toESM(require_dist(), 1); + init_ref_utils(); + ajvInstances = {}; + } +}); -/** - * Applies the specified hash algorithm to the given bytes - * - * @typedef {(algorithm: SRIHashAlgorithm, bytes: Uint8Array) => string} ApplyAlgorithmToBytes - * @param {SRIHashAlgorithm} algorithm - * @param {Uint8Array} bytes - * @returns {string} - */ -const applyAlgorithmToBytes = (algorithm, bytes) => { - return crypto.hash(algorithm, bytes, 'base64') +// node_modules/@redocly/openapi-core/lib/rules/utils.js +function oasTypeOf(value) { + if (Array.isArray(value)) { + return "array"; + } else if (value === null) { + return "null"; + } else if (Number.isInteger(value)) { + return "integer"; + } else { + return typeof value; + } } - -/** - * Compares two base64 strings, allowing for base64url - * in the second string. - * - * @param {string} actualValue base64 encoded string - * @param {string} expectedValue base64 or base64url encoded string - * @returns {boolean} - */ -function caseSensitiveMatch (actualValue, expectedValue) { - // Ignore padding characters from the end of the strings by - // decreasing the length by 1 or 2 if the last characters are `=`. - let actualValueLength = actualValue.length - if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === '=') { - actualValueLength -= 1 +function matchesJsonSchemaType(value, type2, nullable) { + if (nullable && value === null) { + return true; + } + switch (type2) { + case "array": + return Array.isArray(value); + case "object": + return isPlainObject(value); + case "null": + return value === null; + case "integer": + return Number.isInteger(value); + default: + return typeof value === type2; } - if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === '=') { - actualValueLength -= 1 +} +function missingRequiredField(type2, field) { + return `${type2} object should contain \`${field}\` field.`; +} +function missingRequiredOneOfFields(type2, fields) { + return `${type2} object should contain one of the fields: ${fields.map((field) => `\`${field}\``).join(", ")}.`; +} +function fieldNonEmpty(type2, field) { + return `${type2} object \`${field}\` must be non-empty string.`; +} +function validateDefinedAndNonEmpty(fieldName, value, ctx) { + if (!isPlainObject(value)) { + return; } - let expectedValueLength = expectedValue.length - if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === '=') { - expectedValueLength -= 1 + if (value[fieldName] === void 0) { + ctx.report({ + message: missingRequiredField(ctx.type.name, fieldName), + location: ctx.location.child([fieldName]).key() + }); + } else if (!value[fieldName]) { + ctx.report({ + message: fieldNonEmpty(ctx.type.name, fieldName), + location: ctx.location.child([fieldName]).key() + }); } - if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === '=') { - expectedValueLength -= 1 +} +function validateOneOfDefinedAndNonEmpty(fieldNames, value, ctx) { + if (!isPlainObject(value)) { + return; } - - if (actualValueLength !== expectedValueLength) { - return false + if (!fieldNames.some((fieldName) => value.hasOwnProperty(fieldName))) { + ctx.report({ + message: missingRequiredOneOfFields(ctx.type.name, fieldNames), + location: ctx.location.key() + }); } - - for (let i = 0; i < actualValueLength; ++i) { - if ( - actualValue[i] === expectedValue[i] || - (actualValue[i] === '+' && expectedValue[i] === '-') || - (actualValue[i] === '/' && expectedValue[i] === '_') - ) { - continue + for (const fieldName of fieldNames) { + if (value.hasOwnProperty(fieldName) && !value[fieldName]) { + ctx.report({ + message: fieldNonEmpty(ctx.type.name, fieldName), + location: ctx.location.child([fieldName]).key() + }); } - return false } - - return true -} - -module.exports = { - applyAlgorithmToBytes, - bytesMatch, - caseSensitiveMatch, - isValidSRIHashAlgorithm, - getStrongestMetadata, - parseMetadata -} - - -/***/ }), - -/***/ 81040: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(98061) -const { types, inspect } = __nccwpck_require__(47261) -const { runtimeFeatures } = __nccwpck_require__(15072) - -const UNDEFINED = 1 -const BOOLEAN = 2 -const STRING = 3 -const SYMBOL = 4 -const NUMBER = 5 -const BIGINT = 6 -const NULL = 7 -const OBJECT = 8 // function and object - -const FunctionPrototypeSymbolHasInstance = Function.call.bind(Function.prototype[Symbol.hasInstance]) - -/** @type {import('../../../types/webidl').Webidl} */ -const webidl = { - converters: {}, - util: {}, - errors: {}, - is: {} -} - -/** - * @description Instantiate an error. - * - * @param {Object} opts - * @param {string} opts.header - * @param {string} opts.message - * @returns {TypeError} - */ -webidl.errors.exception = function (message) { - return new TypeError(`${message.header}: ${message.message}`) } - -/** - * @description Instantiate an error when conversion from one type to another has failed. - * - * @param {Object} opts - * @param {string} opts.prefix - * @param {string} opts.argument - * @param {string[]} opts.types - * @returns {TypeError} - */ -webidl.errors.conversionFailed = function (opts) { - const plural = opts.types.length === 1 ? '' : ' one of' - const message = - `${opts.argument} could not be converted to` + - `${plural}: ${opts.types.join(', ')}.` - - return webidl.errors.exception({ - header: opts.prefix, - message - }) +function getSuggest(given, variants) { + if (given === null) + return variants; + if (typeof given !== "string" || !variants.length) + return []; + const distances = []; + for (let i2 = 0; i2 < variants.length; i2++) { + const distance = (0, import_js_levenshtein.default)(given, variants[i2]); + if (distance < 4) { + distances.push({ distance, variant: variants[i2] }); + } + } + distances.sort((a2, b2) => a2.distance - b2.distance); + return distances.map((d) => d.variant); } - -/** - * @description Instantiate an error when an invalid argument is provided - * - * @param {Object} context - * @param {string} context.prefix - * @param {string} context.value - * @param {string} context.type - * @returns {TypeError} - */ -webidl.errors.invalidArgument = function (context) { - return webidl.errors.exception({ - header: context.prefix, - message: `"${context.value}" is an invalid ${context.type}.` - }) +function validateExample(example, schema2, options2) { + const { location, ctx, allowAdditionalProperties, ajvContext } = options2; + const { resolve: resolve8, location: parentLocation, report, specVersion } = ctx; + try { + const { valid, errors } = validateJsonSchema(example, schema2, { + schemaLoc: parentLocation.child("schema"), + instancePath: location.pointer, + resolve: resolve8, + allowAdditionalProperties, + ajvContext, + specVersion + }); + if (!valid) { + for (const error2 of errors) { + report({ + message: `Example value must conform to the schema: ${error2.message}.`, + location: { + ...new Location(location.source, error2.instancePath), + reportOnKey: error2.keyword === "unevaluatedProperties" || error2.keyword === "additionalProperties" + }, + from: parentLocation, + suggest: error2.suggest + }); + } + } + } catch (e2) { + if (e2.message === "discriminator: requires oneOf or anyOf composite keyword") { + return; + } + report({ + message: `Example validation errored: ${e2.message}.`, + location: parentLocation.child("schema"), + from: parentLocation + }); + } } - -// https://webidl.spec.whatwg.org/#implements -webidl.brandCheck = function (V, I) { - if (!FunctionPrototypeSymbolHasInstance(I, V)) { - const err = new TypeError('Illegal invocation') - err.code = 'ERR_INVALID_THIS' // node compat. - throw err +function validateSchemaEnumType(schemaEnum, propertyValue, propName, refLocation, { report, location }) { + if (!schemaEnum) { + return; + } + if (!schemaEnum.includes(propertyValue)) { + report({ + location, + message: `\`${propName}\` can be one of the following only: ${schemaEnum.map((type2) => `"${type2}"`).join(", ")}.`, + from: refLocation, + suggest: getSuggest(propertyValue, schemaEnum) + }); } } - -webidl.brandCheckMultiple = function (List) { - const prototypes = List.map((c) => webidl.util.MakeTypeAssertion(c)) - - return (V) => { - if (prototypes.every(typeCheck => !typeCheck(V))) { - const err = new TypeError('Illegal invocation') - err.code = 'ERR_INVALID_THIS' // node compat. - throw err - } +function validateResponseCodes(responseCodes, codeRange, { report }) { + const responseCodeRegexp3 = new RegExp(`^${codeRange[0]}[0-9Xx]{2}$`); + const containsNeededCode = responseCodes.some((code) => codeRange === "2XX" && code === "default" || // It's OK to replace 2xx codes with the default + responseCodeRegexp3.test(code)); + if (!containsNeededCode) { + report({ + message: `Operation must have at least one \`${codeRange}\` response.`, + location: { reportOnKey: true } + }); } } +function getTagName(tag, ignoreCase) { + return ignoreCase ? tag.name.toLowerCase() : tag.name; +} +var import_js_levenshtein, resolveSchema; +var init_utils2 = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/utils.js"() { + import_js_levenshtein = __toESM(require_js_levenshtein(), 1); + init_ref_utils(); + init_is_plain_object(); + init_ajv(); + resolveSchema = (schemaOrRef, ctx, resolveFrom) => { + if (isRef(schemaOrRef)) { + const resolved = ctx.resolve(schemaOrRef, resolveFrom); + return resolved ? { schema: resolved.node, location: resolved.location?.source.absoluteRef } : { schema: void 0, location: resolveFrom }; + } + return { schema: schemaOrRef, location: resolveFrom }; + }; + } +}); -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 - }) +// node_modules/@redocly/openapi-core/lib/rules/common/no-enum-type-mismatch.js +var NoEnumTypeMismatch; +var init_no_enum_type_mismatch = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/no-enum-type-mismatch.js"() { + init_utils2(); + NoEnumTypeMismatch = () => { + return { + Schema(schema2, { report, location }) { + if (schema2.enum && !Array.isArray(schema2.enum)) + return; + if (schema2.enum && schema2.type && !Array.isArray(schema2.type)) { + const typeMismatchedValues = schema2.enum.filter((item) => !matchesJsonSchemaType(item, schema2.type, schema2.nullable)); + for (const mismatchedValue of typeMismatchedValues) { + report({ + message: `All values of \`enum\` field must be of the same type as the \`type\` field: expected "${schema2.type}" but received "${oasTypeOf(mismatchedValue)}".`, + location: location.child(["enum", schema2.enum.indexOf(mismatchedValue)]) + }); + } + } + if (schema2.enum && schema2.type && Array.isArray(schema2.type)) { + const mismatchedResults = {}; + for (const enumValue of schema2.enum) { + mismatchedResults[enumValue] = []; + for (const type2 of schema2.type) { + const valid = matchesJsonSchemaType(enumValue, type2, schema2.nullable); + if (!valid) + mismatchedResults[enumValue].push(type2); + } + if (mismatchedResults[enumValue].length !== schema2.type.length) + delete mismatchedResults[enumValue]; + } + for (const mismatchedKey of Object.keys(mismatchedResults)) { + report({ + message: `Enum value \`${mismatchedKey}\` must be of allowed types: \`${schema2.type}\`.`, + location: location.child(["enum", schema2.enum.indexOf(mismatchedKey)]) + }); + } + } + } + }; + }; } -} +}); -webidl.illegalConstructor = function () { - throw webidl.errors.exception({ - header: 'TypeError', - message: 'Illegal constructor' - }) -} +// node_modules/@redocly/openapi-core/lib/rules/common/no-mixed-number-range-constraints.js +var NoMixedNumberRangeConstraints; +var init_no_mixed_number_range_constraints = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/no-mixed-number-range-constraints.js"() { + NoMixedNumberRangeConstraints = () => { + return { + Schema(schema2, { report, location }) { + if (typeof schema2.maximum === "number" && typeof schema2.exclusiveMaximum === "number") { + report({ + message: "Schema should not have both `maximum` and `exclusiveMaximum`. Use one or the other.", + location: location.child(["exclusiveMaximum"]).key() + }); + } + if (typeof schema2.minimum === "number" && typeof schema2.exclusiveMinimum === "number") { + report({ + message: "Schema should not have both `minimum` and `exclusiveMinimum`. Use one or the other.", + location: location.child(["exclusiveMinimum"]).key() + }); + } + } + }; + }; + } +}); -webidl.util.MakeTypeAssertion = function (I) { - return (O) => FunctionPrototypeSymbolHasInstance(I, O) +// node_modules/@redocly/openapi-core/lib/utils/get-own.js +function getOwn(obj, key) { + return obj.hasOwnProperty(key) ? obj[key] : void 0; } +var init_get_own = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/get-own.js"() { + } +}); -// 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 - } +// node_modules/@redocly/openapi-core/lib/rules/common/no-required-schema-properties-undefined.js +var NoRequiredSchemaPropertiesUndefined; +var init_no_required_schema_properties_undefined = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/no-required-schema-properties-undefined.js"() { + init_get_own(); + init_is_not_empty_array(); + init_utils2(); + NoRequiredSchemaPropertiesUndefined = () => { + const parents = []; + return { + Schema: { + leave(_5) { + parents.pop(); + }, + enter(currentSchema, ctx) { + parents.push(currentSchema); + if (!currentSchema.required) + return; + const hasProperty = (schemaOrRef, propertyName, visited, resolveFrom) => { + const { schema: schema2, location } = resolveSchema(schemaOrRef, ctx, resolveFrom); + if (!schema2 || visited.has(schema2)) + return false; + visited.add(schema2); + if (schema2.properties && getOwn(schema2.properties, propertyName) !== void 0) { + return true; + } + if (schema2.allOf?.some((s2) => hasProperty(s2, propertyName, visited, location))) { + return true; + } + if (isNotEmptyArray(schema2.anyOf) && schema2.anyOf.every((s2) => hasProperty(s2, propertyName, new Set(visited), location))) { + return true; + } + if (isNotEmptyArray(schema2.oneOf) && schema2.oneOf.every((s2) => hasProperty(s2, propertyName, new Set(visited), location))) { + return true; + } + return false; + }; + const isCompositionChild = (parent, child) => { + const matchesChild = (s2) => resolveSchema(s2, ctx).schema === child; + return !!(parent.allOf?.some(matchesChild) || parent.anyOf?.some(matchesChild) || parent.oneOf?.some(matchesChild)); + }; + const findCompositionRoot = (i2, child) => { + if (i2 < 0) + return void 0; + const parent = parents[i2]; + return isCompositionChild(parent, child) ? findCompositionRoot(i2 - 1, parent) ?? parent : void 0; + }; + const compositionRoot = findCompositionRoot(parents.length - 2, currentSchema); + for (const [i2, requiredProperty] of currentSchema.required.entries()) { + if (!hasProperty(currentSchema, requiredProperty, /* @__PURE__ */ new Set()) && !hasProperty(compositionRoot, requiredProperty, /* @__PURE__ */ new Set())) { + ctx.report({ + message: `Required property '${requiredProperty}' is not defined.`, + location: ctx.location.child(["required", i2]) + }); + } + } + } + } + }; + }; + } +}); - return OBJECT - } +// node_modules/@redocly/openapi-core/lib/rules/common/no-schema-type-mismatch.js +var NoSchemaTypeMismatch; +var init_no_schema_type_mismatch = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/no-schema-type-mismatch.js"() { + NoSchemaTypeMismatch = () => { + return { + Schema(schema2, { report, location }) { + if (schema2.type === "object" && schema2.items) { + report({ + message: "Schema type mismatch: 'object' type should not contain 'items' field.", + location: location.child("items") + }); + } + if (schema2.type === "array" && schema2.properties) { + report({ + message: "Schema type mismatch: 'array' type should not contain 'properties' field.", + location: location.child("properties") + }); + } + } + }; + }; } -} +}); -webidl.util.Types = { - UNDEFINED, - BOOLEAN, - STRING, - SYMBOL, - NUMBER, - BIGINT, - NULL, - OBJECT -} +// node_modules/@redocly/openapi-core/lib/errors/yaml-parse-error.js +var jsYamlErrorLineColRegexp, YamlParseError; +var init_yaml_parse_error = __esm({ + "node_modules/@redocly/openapi-core/lib/errors/yaml-parse-error.js"() { + jsYamlErrorLineColRegexp = /\((\d+):(\d+)\)$/; + YamlParseError = class _YamlParseError extends Error { + originalError; + source; + col; + line; + constructor(originalError, source) { + super(originalError.message.split("\n")[0]); + this.originalError = originalError; + this.source = source; + Object.setPrototypeOf(this, _YamlParseError.prototype); + const [, line, col] = this.message.match(jsYamlErrorLineColRegexp) || []; + this.line = parseInt(line, 10); + this.col = parseInt(col, 10); + } + }; + } +}); -webidl.util.TypeValueToString = function (o) { - switch (webidl.util.Type(o)) { - 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 NULL: return 'Null' - case OBJECT: return 'Object' +// node_modules/@redocly/openapi-core/lib/rules/common/no-unresolved-refs.js +function reportUnresolvedRef(resolved, report, location) { + const error2 = resolved.error; + if (error2 instanceof YamlParseError) { + report({ + message: "Failed to parse: " + error2.message, + location: { + source: error2.source, + pointer: void 0, + start: { + col: error2.col, + line: error2.line + } + } + }); } + const message = resolved.error?.message; + report({ + location, + message: `Can't resolve $ref${message ? ": " + message : ""}` + }); } +var NoUnresolvedRefs; +var init_no_unresolved_refs = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/no-unresolved-refs.js"() { + init_yaml_parse_error(); + NoUnresolvedRefs = () => { + return { + ref: { + leave(_5, { report, location }, resolved) { + if (resolved.node !== void 0) + return; + reportUnresolvedRef(resolved, report, location); + } + }, + DiscriminatorMapping(mapping, { report, resolve: resolve8, location }) { + for (const mappingName of Object.keys(mapping)) { + const resolved = resolve8({ $ref: mapping[mappingName] }); + if (resolved.node !== void 0) + return; + reportUnresolvedRef(resolved, report, location.child(mappingName)); + } + } + }; + }; + } +}); -webidl.util.markAsUncloneable = runtimeFeatures.has('markAsUncloneable') - ? (__nccwpck_require__(24086).markAsUncloneable) - : () => {} - -// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint -webidl.util.ConvertToInt = function (V, bitLength, signedness, flags) { - 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 +// node_modules/@redocly/openapi-core/lib/rules/common/struct.js +var Struct; +var init_struct = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/struct.js"() { + init_ref_utils(); + init_types(); + init_get_own(); + init_is_plain_object(); + init_utils2(); + Struct = () => { + return { + any(node, { report, type: type2, location, rawLocation, key, resolve: resolve8, ignoreNextVisitorsOnNode }) { + const nodeType = oasTypeOf(node); + const refLocation = rawLocation !== location ? rawLocation : void 0; + if (type2.items) { + if (nodeType !== "array") { + report({ + message: `Expected type \`${type2.name}\` (array) but got \`${nodeType}\``, + from: refLocation + }); + ignoreNextVisitorsOnNode(); + } + return; + } else if (nodeType !== "object") { + if (type2 !== SpecExtension) { + report({ + message: `Expected type \`${type2.name}\` (object) but got \`${nodeType}\``, + from: refLocation + }); + } + ignoreNextVisitorsOnNode(); + return; + } + const required = typeof type2.required === "function" ? type2.required(node, key) : type2.required; + for (const propName of required || []) { + if (!node.hasOwnProperty(propName)) { + report({ + message: `The field \`${propName}\` must be present on this level.`, + from: refLocation, + location: [{ reportOnKey: true }] + }); + } + } + const allowed = type2.allowed?.(node); + if (allowed && isPlainObject(node)) { + for (const propName in node) { + if (allowed.includes(propName) || type2.extensionsPrefix && propName.startsWith(type2.extensionsPrefix) || !Object.keys(type2.properties).includes(propName)) { + continue; + } + report({ + message: `The field \`${propName}\` is not allowed here.`, + from: refLocation, + location: location.child([propName]).key() + }); + } + } + const requiredOneOf = type2.requiredOneOf || null; + if (requiredOneOf) { + let hasProperty = false; + for (const propName of requiredOneOf || []) { + if (node.hasOwnProperty(propName)) { + hasProperty = true; + } + } + if (!hasProperty) + report({ + message: `Must contain at least one of the following fields: ${type2.requiredOneOf?.join(", ")}.`, + from: refLocation, + location: [{ reportOnKey: true }] + }); + } + for (const propName of Object.keys(node)) { + const propLocation = location.child([propName]); + let propValue = node[propName]; + let propType = getOwn(type2.properties, propName); + if (propType === void 0) + propType = type2.additionalProperties; + if (typeof propType === "function") + propType = propType(propValue, propName); + if (isNamedType(propType)) { + continue; + } + const propSchema = propType; + const propValueType = oasTypeOf(propValue); + if (propSchema === void 0) { + if (propName.startsWith("x-")) + continue; + report({ + message: `Property \`${propName}\` is not expected here.`, + suggest: getSuggest(propName, Object.keys(type2.properties)), + from: refLocation, + location: propLocation.key() + }); + continue; + } + if (propSchema === null) { + continue; + } + if (propSchema.resolvable !== false && isRef(propValue)) { + propValue = resolve8(propValue).node; + } + if (propSchema.items && propSchema.items?.enum && Array.isArray(propValue)) { + for (let i2 = 0; i2 < propValue.length; i2++) { + validateSchemaEnumType(propSchema.items?.enum, propValue[i2], propName, refLocation, { + report, + location: location.child([propName, i2]) + }); + } + } + if (propSchema.enum) { + validateSchemaEnumType(propSchema.enum, propValue, propName, refLocation, { + report, + location: location.child([propName]) + }); + } else if (propSchema.type && !matchesJsonSchemaType(propValue, propSchema.type, false)) { + report({ + message: `Expected type \`${propSchema.type}\` but got \`${propValueType}\`.`, + from: refLocation, + location: propLocation + }); + ignoreNextVisitorsOnNode(); + } else if (propValueType === "array" && propSchema.items?.type) { + const itemsType = propSchema.items?.type; + for (let i2 = 0; i2 < propValue.length; i2++) { + const item = propValue[i2]; + if (!matchesJsonSchemaType(item, itemsType, false)) { + report({ + message: `Expected type \`${itemsType}\` but got \`${oasTypeOf(item)}\`.`, + from: refLocation, + location: propLocation.child([i2]) + }); + } + } + } + if (typeof propSchema.minimum === "number") { + if (propSchema.minimum > node[propName]) { + report({ + message: `The value of the ${propName} field must be greater than or equal to ${propSchema.minimum}`, + from: refLocation, + location: location.child([propName]) + }); + } + } + } + } + }; + }; + } +}); - // 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: +// node_modules/@redocly/openapi-core/lib/rules/respect/no-criteria-xpath.js +var NoCriteriaXpath; +var init_no_criteria_xpath = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/respect/no-criteria-xpath.js"() { + init_is_plain_object(); + NoCriteriaXpath = () => { + return { + CriterionObject: { + enter(criteria, { report, location }) { + if (!criteria.type) { + return; + } + if (criteria.type === "xpath" || isPlainObject(criteria.type) && criteria.type.type === "xpath") { + report({ + message: "The `xpath` type criteria is not supported by Respect.", + location: location.child(["type"]) + }); + } + } + } + }; + }; + } +}); - // 1. Let lowerBound be 0. - lowerBound = 0 +// node_modules/@redocly/openapi-core/lib/rules/respect/no-x-security-both-scheme-and-scheme-name.js +var NoXSecurityBothSchemeAndSchemeName; +var init_no_x_security_both_scheme_and_scheme_name = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/respect/no-x-security-both-scheme-and-scheme-name.js"() { + init_get_own(); + NoXSecurityBothSchemeAndSchemeName = () => { + function validate(extendedSecurity, { report, location }) { + if (!Array.isArray(extendedSecurity)) + return; + for (const security of extendedSecurity) { + const hasScheme = getOwn(security, "scheme"); + const hasSchemeName = getOwn(security, "schemeName"); + if (hasScheme && hasSchemeName) { + report({ + message: "`x-security` item must not contain both `scheme` and `schemeName`.", + location: location.child(["x-security", extendedSecurity.indexOf(security)]) + }); + } + } + } + return { + Workflow: { + enter(workflow, context2) { + validate(workflow?.["x-security"], context2); + } + }, + Step: { + enter(step, context2) { + validate(step?.["x-security"], context2); + } + } + }; + }; + } +}); - // 2. Let upperBound be 2^bitLength − 1. - upperBound = Math.pow(2, bitLength) - 1 - } else { - // 3. Otherwise: +// node_modules/@redocly/openapi-core/lib/rules/respect/no-x-security-scheme-name-without-openapi.js +var NoXSecuritySchemeNameWithoutOpenAPI; +var init_no_x_security_scheme_name_without_openapi = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/respect/no-x-security-scheme-name-without-openapi.js"() { + NoXSecuritySchemeNameWithoutOpenAPI = () => { + return { + Step: { + enter(step, { report, location }) { + const hasExtendedOperation = step?.["x-operation"]; + if (!hasExtendedOperation) { + return; + } + const extendedSecurity = step?.["x-security"]; + if (!extendedSecurity) { + return; + } + for (const security of extendedSecurity) { + if ("schemeName" in security) { + report({ + message: "The `schemeName` can be only used in Step with OpenAPI operation, please use `scheme` instead.", + location: location.child(["x-security", extendedSecurity.indexOf(security)]) + }); + } + } + } + } + }; + }; + } +}); - // 1. Let lowerBound be -2^bitLength − 1. - lowerBound = Math.pow(-2, bitLength) - 1 +// node_modules/@redocly/openapi-core/lib/rules/respect/respect-supported-versions.js +var RespectSupportedVersions; +var init_respect_supported_versions = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/respect/respect-supported-versions.js"() { + init_arazzo2(); + init_pluralize(); + RespectSupportedVersions = () => { + const supportedVersions = ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.join(", "); + return { + Root: { + enter(root, { report, location }) { + if (!ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.includes(root.arazzo)) { + report({ + message: `Only ${supportedVersions} Arazzo ${pluralize("version is", ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.length)} fully supported by Respect.`, + location: location.child("arazzo") + }); + } + } + } + }; + }; + } +}); - // 2. Let upperBound be 2^bitLength − 1 − 1. - upperBound = Math.pow(2, bitLength - 1) - 1 +// node_modules/@redocly/openapi-core/lib/rules/respect/x-security-scheme-name-reference.js +var XSecuritySchemeNameReference; +var init_x_security_scheme_name_reference = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/respect/x-security-scheme-name-reference.js"() { + XSecuritySchemeNameReference = () => { + let sourceDescriptionsCount = 0; + return { + SourceDescriptions: { + enter(sourceDescriptions) { + sourceDescriptionsCount = Array.isArray(sourceDescriptions) ? sourceDescriptions.length : 0; + } + }, + Workflow: { + leave(workflow, { report, location }) { + const extendedSecurity = workflow?.["x-security"]; + if (!extendedSecurity || sourceDescriptionsCount <= 1) { + return; + } + for (const security of extendedSecurity) { + if ("schemeName" in security) { + const schemeName = security.schemeName; + const isReference = typeof schemeName === "string" && schemeName.startsWith("$sourceDescriptions."); + if (!isReference) { + report({ + message: "When multiple `sourceDescriptions` exist, `workflow.x-security.schemeName` must be a reference to a source description (e.g. `$sourceDescriptions.{name}.{schemeName}`)", + location: location.child([ + "x-security", + extendedSecurity.indexOf(security), + "schemeName" + ]) + }); + } + } + } + } + } + }; + }; } +}); - // 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 +// node_modules/@redocly/openapi-core/lib/rules/respect/x-security-scheme-required-values.js +function validateSecuritySchemas(extendedSecurity, { report, location }) { + if (!extendedSecurity) { + return; } - - // 6. If the conversion is to an IDL type associated - // with the [EnforceRange] extended attribute, then: - if (webidl.util.HasFlag(flags, webidl.attributes.EnforceRange)) { - // 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.` - }) + for (const securitySchema of extendedSecurity) { + if ("schemeName" in securitySchema) { + continue; } - - // 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}.` - }) + const { scheme, values } = securitySchema; + const authType = scheme?.type === "http" ? scheme.scheme : scheme?.type; + if (authType === "mutualTLS") { + logger.warn("Please use CLI option to provide mutualTLS certificates for mutualTls authentication security schema."); + continue; } - - // 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) && webidl.util.HasFlag(flags, webidl.attributes.Clamp)) { - // 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) + const requiredValues = REQUIRED_VALUES_BY_AUTH_TYPE[authType]; + if (requiredValues) { + for (const requiredValue of requiredValues) { + if (!values || !(requiredValue in values)) { + report({ + message: `The \`${requiredValue}\` is required when using the ${authType} authentication security schema.`, + location: location.child(["x-security", extendedSecurity.indexOf(securitySchema)]) + }); + } + } } else { - x = Math.ceil(x) + report({ + message: `The \`${authType}\` authentication security schema is not supported.`, + location: location.child(["x-security", extendedSecurity.indexOf(securitySchema)]) + }); } - - // 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 +} +var REQUIRED_VALUES_BY_AUTH_TYPE, XSecuritySchemaRequiredValues; +var init_x_security_scheme_required_values = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/respect/x-security-scheme-required-values.js"() { + init_logger(); + REQUIRED_VALUES_BY_AUTH_TYPE = { + apiKey: ["apiKey"], + basic: ["username", "password"], + digest: ["username", "password"], + bearer: ["token"], + oauth2: ["accessToken"], + openIdConnect: ["accessToken"], + mutualTLS: [] + }; + XSecuritySchemaRequiredValues = () => { + return { + Step: { + enter(step, context2) { + validateSecuritySchemas(step?.["x-security"], context2); + } + }, + Workflow: { + enter(workflow, context2) { + validateSecuritySchemas(workflow?.["x-security"], context2); + } + } + }; + }; } +}); - // 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) +// node_modules/@redocly/openapi-core/lib/rules/arazzo/criteria-unique.js +var CriteriaUnique; +var init_criteria_unique = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/arazzo/criteria-unique.js"() { + CriteriaUnique = () => { + return { + FailureActionObject: { + enter(action, { report, location }) { + const criterias = action?.criteria; + if (!Array.isArray(criterias)) { + return; + } + const seen = /* @__PURE__ */ new Set(); + for (const criteria of criterias) { + const key = JSON.stringify(criteria); + if (seen.has(key)) { + report({ + message: "The FailureAction criteria items must be unique.", + location: location.child(["criteria", criterias.indexOf(criteria)]) + }); + } else { + seen.add(key); + } + } + } + }, + SuccessActionObject: { + enter(action, { report, location }) { + const criterias = action?.criteria; + if (!Array.isArray(criterias)) { + return; + } + const seen = /* @__PURE__ */ new Set(); + for (const criteria of criterias) { + const key = JSON.stringify(criteria); + if (seen.has(key)) { + report({ + message: "The SuccessAction criteria items must be unique.", + location: location.child(["criteria", criterias.indexOf(criteria)]) + }); + } else { + seen.add(key); + } + } + } + }, + Step: { + enter(step, { report, location }) { + const successCriterias = step?.successCriteria; + if (!Array.isArray(successCriterias)) { + return; + } + const seen = /* @__PURE__ */ new Set(); + for (const criteria of successCriterias) { + const key = JSON.stringify(criteria); + if (seen.has(key)) { + report({ + message: "The Step SuccessCriteria items must be unique.", + location: location.child(["successCriteria", successCriterias.indexOf(criteria)]) + }); + } else { + seen.add(key); + } + } + } + } + }; + }; } +}); - // 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 +// node_modules/@redocly/openapi-core/lib/rules/arazzo/outputs-defined.js +var OutputsDefined; +var init_outputs_defined = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/arazzo/outputs-defined.js"() { + init_is_plain_object(); + OutputsDefined = () => { + const definedWorkflowOutputs = /* @__PURE__ */ new Map(); + const definedStepOutputs = /* @__PURE__ */ new Map(); + const deferredValidationTasks = []; + function matchWorkflowOutput({ value, report, location, path: path13, definedWorkflowOutputs: definedWorkflowOutputs2 }) { + const workflowOutputPattern = /\$workflows\.([^.\s]+)\.outputs\.([^.\s}\]#]+)/g; + let match2; + while ((match2 = workflowOutputPattern.exec(value)) !== null) { + const [fullMatch, workflowId, outputKey] = match2; + const definedKeys = definedWorkflowOutputs2.get(workflowId); + if (!definedKeys) { + report({ + message: `Workflow "${workflowId}" referenced in runtime expression "${fullMatch}" is not defined or has no outputs.`, + location: location.child(path13) + }); + } else if (!definedKeys.includes(outputKey)) { + report({ + message: `Output key "${outputKey}" is not defined in workflow "${workflowId}". Available outputs: [ ${definedKeys.join(", ")} ].`, + location: location.child(path13) + }); + } + } + } + function matchStepOutput({ value, report, location, path: path13, definedStepOutputs: definedStepOutputs2 }) { + const stepOutputPattern = /\$steps\.([^.\s]+)\.outputs\.([^.\s}\]#]+)/g; + let match2; + while ((match2 = stepOutputPattern.exec(value)) !== null) { + const [fullMatch, stepId, outputKey] = match2; + const definedKeys = definedStepOutputs2.get(stepId); + if (!definedKeys) { + report({ + message: `Step "${stepId}" referenced in runtime expression "${fullMatch}" is not defined or has no outputs.`, + location: location.child(path13) + }); + } else if (!definedKeys.includes(outputKey)) { + report({ + message: `Output key "${outputKey}" is not defined in step "${stepId}". Available outputs: [ ${definedKeys.join(", ")} ].`, + location: location.child(path13) + }); + } + } + } + function checkRuntimeExpressions(value, ctx, path13 = []) { + if (typeof value === "string") { + matchWorkflowOutput({ + value, + report: ctx.report, + location: ctx.location, + path: path13, + definedWorkflowOutputs + }); + matchStepOutput({ + value, + report: ctx.report, + location: ctx.location, + path: path13, + definedStepOutputs + }); + } else if (isPlainObject(value) || Array.isArray(value)) { + for (const [key, val] of Object.entries(value)) { + checkRuntimeExpressions(val, ctx, [...path13, key]); + } + } + } + return { + Step: { + enter(step, { report: _report, location: _location }) { + if (!step.outputs) + return; + definedStepOutputs.set(step.stepId, Object.keys(step.outputs)); + } + }, + Workflow: { + enter(workflow, { report: _report, location: _location }) { + if (!workflow.outputs) + return; + definedWorkflowOutputs.set(workflow.workflowId, Object.keys(workflow.outputs)); + } + }, + Parameters: { + enter(parameters, ctx) { + deferredValidationTasks.push(() => { + checkRuntimeExpressions(parameters, ctx); + }); + } + }, + RequestBody: { + enter(requestBody, ctx) { + deferredValidationTasks.push(() => { + checkRuntimeExpressions(requestBody, ctx); + }); + } + }, + CriterionObject: { + enter(criteria, ctx) { + deferredValidationTasks.push(() => { + checkRuntimeExpressions(criteria.condition, ctx); + }); + } + }, + Outputs: { + enter(outputs, ctx) { + deferredValidationTasks.push(() => { + checkRuntimeExpressions(outputs, ctx); + }); + } + }, + ExtendedSecurity: { + enter(extendedSecurity, ctx) { + deferredValidationTasks.push(() => { + checkRuntimeExpressions(extendedSecurity, ctx); + }); + } + }, + ExtendedOperation: { + enter(extendedOperation, ctx) { + deferredValidationTasks.push(() => { + checkRuntimeExpressions(extendedOperation, ctx); + }); + } + }, + Root: { + leave() { + for (const task of deferredValidationTasks) { + task(); + } + } + } + }; + }; } +}); - // 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}"` - case BIGINT: - return `${V}n` - default: - return `${V}` +// node_modules/@redocly/openapi-core/lib/rules/arazzo/parameters-unique.js +var ParametersUnique; +var init_parameters_unique = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/arazzo/parameters-unique.js"() { + ParametersUnique = () => { + return { + Parameters: { + enter(parameters, { report, location }) { + if (!parameters) + return; + const seenParameters = /* @__PURE__ */ new Set(); + for (const parameter of parameters) { + if (seenParameters.has(parameter?.name)) { + report({ + message: "The parameter `name` must be unique amongst listed parameters.", + location: location.child([parameters.indexOf(parameter)]) + }); + } + if (seenParameters.has(parameter?.reference)) { + report({ + message: "The parameter `reference` must be unique amongst listed parameters.", + location: location.child([parameters.indexOf(parameter)]) + }); + } + seenParameters.add(parameter?.name ?? parameter?.reference); + } + } + } + }; + }; } -} +}); -webidl.util.IsResizableArrayBuffer = function (V) { - if (types.isArrayBuffer(V)) { - return V.resizable +// node_modules/@redocly/openapi-core/lib/rules/arazzo/requestBody-replacements-unique.js +var RequestBodyReplacementsUnique; +var init_requestBody_replacements_unique = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/arazzo/requestBody-replacements-unique.js"() { + RequestBodyReplacementsUnique = () => { + const seenReplacements = /* @__PURE__ */ new Set(); + return { + Step: { + leave() { + seenReplacements.clear(); + }, + RequestBody: { + enter(requestBody, { report, location }) { + if (!requestBody.replacements) + return; + for (const replacement of requestBody.replacements) { + if (seenReplacements.has(replacement.target)) { + report({ + message: "Every `replacement` in `requestBody` must be unique.", + location: location.child([ + "replacements", + requestBody.replacements.indexOf(replacement), + `target` + ]) + }); + } + seenReplacements.add(replacement.target); + } + } + } + } + }; + }; } +}); - if (types.isSharedArrayBuffer(V)) { - return V.growable +// node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescriptions-name-unique.js +var SourceDescriptionsNameUnique; +var init_sourceDescriptions_name_unique = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescriptions-name-unique.js"() { + SourceDescriptionsNameUnique = () => { + const seenSourceDescriptions = /* @__PURE__ */ new Set(); + return { + SourceDescriptions: { + enter(sourceDescriptions, { report, location }) { + if (!sourceDescriptions.length) + return; + for (const sourceDescription of sourceDescriptions) { + if (seenSourceDescriptions.has(sourceDescription.name)) { + report({ + message: "The `name` must be unique amongst all SourceDescriptions.", + location: location.child([sourceDescriptions.indexOf(sourceDescription)]) + }); + } + seenSourceDescriptions.add(sourceDescription.name); + } + } + } + }; + }; } +}); - throw webidl.errors.exception({ - header: 'IsResizableArrayBuffer', - message: `"${webidl.util.Stringify(V)}" is not an array buffer.` - }) -} - -webidl.util.HasFlag = function (flags, attributes) { - return typeof flags === 'number' && (flags & attributes) === attributes -} - -// 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 +// node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescriptions-not-empty.js +var SourceDescriptionsNotEmpty; +var init_sourceDescriptions_not_empty = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescriptions-not-empty.js"() { + SourceDescriptionsNotEmpty = () => { + return { + SourceDescriptions: { + enter(sourceDescriptions, { report, location }) { + if (!sourceDescriptions?.length) { + report({ + message: "The `sourceDescriptions` list must have at least one entry.", + location + }); + } + } + } + }; + }; } -} - -// 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.TypeValueToString(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) { - const keyName = webidl.util.Stringify(key) - - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key, prefix, `Key ${keyName} in ${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}[${keyName}]`) - - // 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) +// node_modules/@redocly/openapi-core/lib/rules/arazzo/step-onFailure-unique.js +var StepOnFailureUnique; +var init_step_onFailure_unique = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/arazzo/step-onFailure-unique.js"() { + StepOnFailureUnique = () => { + return { + OnFailureActionList: { + enter(onFailureActionList, { report, location }) { + if (!onFailureActionList) + return; + const seenFailureActions = /* @__PURE__ */ new Set(); + for (const onFailureAction of onFailureActionList) { + if (seenFailureActions.has(onFailureAction?.name)) { + report({ + message: "The action `name` must be unique amongst listed `onFailure` actions.", + location: location.child([onFailureActionList.indexOf(onFailureAction)]) + }); + } + if (seenFailureActions.has(onFailureAction?.reference)) { + report({ + message: "The action `reference` must be unique amongst listed `onFailure` actions.", + location: location.child([onFailureActionList.indexOf(onFailureAction)]) + }); + } + seenFailureActions.add(onFailureAction.name ?? onFailureAction.reference); + } + } + } + }; + }; + } +}); - // 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) +// node_modules/@redocly/openapi-core/lib/rules/arazzo/step-onSuccess-unique.js +var StepOnSuccessUnique; +var init_step_onSuccess_unique = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/arazzo/step-onSuccess-unique.js"() { + StepOnSuccessUnique = () => { + return { + OnSuccessActionList: { + enter(onSuccessActionList, { report, location }) { + if (!onSuccessActionList) + return; + const seenSuccessActions = /* @__PURE__ */ new Set(); + for (const onSuccessAction of onSuccessActionList) { + if (seenSuccessActions.has(onSuccessAction?.name)) { + report({ + message: "The action `name` must be unique amongst listed `onSuccess` actions.", + location: location.child([onSuccessActionList.indexOf(onSuccessAction)]) + }); + } + if (seenSuccessActions.has(onSuccessAction?.reference)) { + report({ + message: "The action `reference` must be unique amongst listed `onSuccess` actions.", + location: location.child([onSuccessActionList.indexOf(onSuccessAction)]) + }); + } + seenSuccessActions.add(onSuccessAction?.name ?? onSuccessAction?.reference); + } + } + } + }; + }; + } +}); - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } - } +// node_modules/@redocly/openapi-core/lib/rules/arazzo/stepId-unique.js +var StepIdUnique; +var init_stepId_unique = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/arazzo/stepId-unique.js"() { + StepIdUnique = () => { + return { + Workflow: { + enter(workflow, { report, location }) { + if (!workflow.steps) + return; + const seenSteps = /* @__PURE__ */ new Set(); + for (const step of workflow.steps) { + if (!step.stepId) + return; + if (seenSteps.has(step.stepId)) { + report({ + message: "The `stepId` must be unique amongst all steps described in the workflow.", + location: location.child(["steps", workflow.steps.indexOf(step)]) + }); + } + seenSteps.add(step.stepId); + } + } + } + }; + }; + } +}); - // 5. Return result. - return result +// node_modules/@redocly/openapi-core/lib/rules/arazzo/workflow-dependsOn.js +var WorkflowDependsOn; +var init_workflow_dependsOn = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/arazzo/workflow-dependsOn.js"() { + WorkflowDependsOn = () => { + const seenWorkflow = /* @__PURE__ */ new Set(); + const existingSourceDescriptions = /* @__PURE__ */ new Set(); + const existingWorkflowIds = /* @__PURE__ */ new Set(); + return { + SourceDescriptions: { + enter(sourceDescriptions) { + for (const sourceDescription of sourceDescriptions) { + existingSourceDescriptions.add(sourceDescription.name); + } + } + }, + Workflows: { + enter(workflows) { + for (const workflow of workflows) { + existingWorkflowIds.add(workflow.workflowId); + } + } + }, + Workflow: { + leave(workflow, { report, location }) { + if (!workflow.dependsOn) + return; + for (const item of workflow.dependsOn) { + if (item.startsWith("$sourceDescriptions.")) { + const sourceDescriptionName = item.split(".")[1]; + if (!existingSourceDescriptions.has(sourceDescriptionName)) { + report({ + message: `SourceDescription ${sourceDescriptionName} must be defined in sourceDescriptions.`, + location: location.child([`dependsOn`, workflow.dependsOn.indexOf(item)]) + }); + } + } + if (!item.startsWith("$sourceDescriptions") && !existingWorkflowIds.has(item)) { + report({ + message: `Workflow ${item} must be defined in workflows.`, + location: location.child([`dependsOn`, workflow.dependsOn.indexOf(item)]) + }); + } + if (seenWorkflow.has(item)) { + report({ + message: "Every workflow in dependsOn must be unique.", + location: location.child([`dependsOn`]) + }); + } + seenWorkflow.add(item); + } + } + } + }; + }; } -} - -webidl.interfaceConverter = function (TypeCheck, name) { - return (V, prefix, argument) => { - if (!TypeCheck(V)) { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${name}.` - }) - } +}); - return V +// node_modules/@redocly/openapi-core/lib/rules/arazzo/workflowId-unique.js +var WorkflowIdUnique; +var init_workflowId_unique = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/arazzo/workflowId-unique.js"() { + WorkflowIdUnique = () => { + const seenWorkflow = /* @__PURE__ */ new Set(); + return { + Workflow: { + enter(workflow, { report, location }) { + if (!workflow.workflowId) + return; + if (seenWorkflow.has(workflow.workflowId)) { + report({ + message: "Every workflow must have a unique `workflowId`.", + location: location.child([workflow.workflowId]) + }); + } + seenWorkflow.add(workflow.workflowId); + } + } + }; + }; } -} - -webidl.dictionaryConverter = function (converters) { - // "For each dictionary member member declared on dictionary, in lexicographical order:" - converters.sort((a, b) => (a.key > b.key) - (a.key < b.key)) - - return (dictionary, prefix, argument) => { - const dict = {} - - if (dictionary != null && webidl.util.Type(dictionary) !== 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 +// node_modules/@redocly/openapi-core/lib/rules/arazzo/index.js +var rules, preprocessors; +var init_arazzo4 = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/arazzo/index.js"() { + init_sourceDescription_type(); + init_assertions(); + init_no_enum_type_mismatch(); + init_no_mixed_number_range_constraints(); + init_no_required_schema_properties_undefined(); + init_no_schema_type_mismatch(); + init_no_unresolved_refs(); + init_struct(); + init_no_criteria_xpath(); + init_no_x_security_both_scheme_and_scheme_name(); + init_no_x_security_scheme_name_without_openapi(); + init_respect_supported_versions(); + init_x_security_scheme_name_reference(); + init_x_security_scheme_required_values(); + init_criteria_unique(); + init_outputs_defined(); + init_parameters_unique(); + init_requestBody_replacements_unique(); + init_sourceDescriptions_name_unique(); + init_sourceDescriptions_not_empty(); + init_step_onFailure_unique(); + init_step_onSuccess_unique(); + init_stepId_unique(); + init_workflow_dependsOn(); + init_workflowId_unique(); + rules = { + assertions: Assertions2, + "criteria-unique": CriteriaUnique, + "no-criteria-xpath": NoCriteriaXpath, + "no-enum-type-mismatch": NoEnumTypeMismatch, + "no-mixed-number-range-constraints": NoMixedNumberRangeConstraints, + "no-required-schema-properties-undefined": NoRequiredSchemaPropertiesUndefined, + "no-schema-type-mismatch": NoSchemaTypeMismatch, + "no-unresolved-refs": NoUnresolvedRefs, + "no-x-security-both-scheme-and-scheme-name": NoXSecurityBothSchemeAndSchemeName, + "no-x-security-scheme-name-without-openapi": NoXSecuritySchemeNameWithoutOpenAPI, + "outputs-defined": OutputsDefined, + "parameters-unique": ParametersUnique, + "requestBody-replacements-unique": RequestBodyReplacementsUnique, + "respect-supported-versions": RespectSupportedVersions, + "sourceDescription-name-unique": SourceDescriptionsNameUnique, + "sourceDescription-type": SourceDescriptionType, + "sourceDescriptions-not-empty": SourceDescriptionsNotEmpty, + "step-onFailure-unique": StepOnFailureUnique, + "step-onSuccess-unique": StepOnSuccessUnique, + "stepId-unique": StepIdUnique, + struct: Struct, + "workflow-dependsOn": WorkflowDependsOn, + "workflowId-unique": WorkflowIdUnique, + "x-security-scheme-name-reference": XSecuritySchemeNameReference, + "x-security-scheme-required-values": XSecuritySchemaRequiredValues + }; + preprocessors = {}; + } +}); - if (required === true) { - if (dictionary == null || !Object.hasOwn(dictionary, key)) { - throw webidl.errors.exception({ - header: prefix, - message: `Missing required key "${key}".` - }) +// node_modules/@redocly/openapi-core/lib/rules/common/info-contact.js +var InfoContact; +var init_info_contact = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/info-contact.js"() { + init_utils2(); + InfoContact = () => { + return { + Info(info, { report, location }) { + if (!info.contact) { + report({ + message: missingRequiredField("Info", "contact"), + location: location.child("contact").key() + }); + } } - } - - let value = dictionary?.[key] - const hasDefault = defaultValue !== undefined - - // Only use defaultValue if value is undefined and - // a defaultValue options was provided. - if (hasDefault && value === undefined) { - 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(', ')}.` - }) +// node_modules/@redocly/openapi-core/lib/rules/common/info-license-strict.js +var InfoLicenseStrict; +var init_info_license_strict = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/info-license-strict.js"() { + init_detect_spec(); + init_utils2(); + InfoLicenseStrict = () => { + let specVersion; + return { + Root: { + enter(root) { + specVersion = detectSpec(root); + }, + License: { + leave(license, ctx) { + if (specVersion === "oas3_1" || specVersion === "oas3_2") { + validateOneOfDefinedAndNonEmpty(["url", "identifier"], license, ctx); + } else { + validateDefinedAndNonEmpty("url", license, ctx); + } + } + } } - - dict[key] = value - } - } - - return dict + }; + }; } -} - -webidl.nullableConverter = function (converter) { - return (V, prefix, argument) => { - if (V === null) { - return V - } +}); - return converter(V, prefix, argument) +// node_modules/@redocly/openapi-core/lib/rules/common/no-duplicated-tag-names.js +var NoDuplicatedTagNames; +var init_no_duplicated_tag_names = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/no-duplicated-tag-names.js"() { + init_utils2(); + NoDuplicatedTagNames = ({ ignoreCase = false }) => { + const tagNames = /* @__PURE__ */ new Set(); + return { + Tag: { + leave(tag, ctx) { + const tagName = getTagName(tag, ignoreCase); + if (tagNames.has(tagName)) { + ctx.report({ + message: `Duplicate tag name found: '${tag.name}'.`, + location: ctx.location + }); + } else { + tagNames.add(tagName); + } + } + } + }; + }; } -} - -/** - * @param {*} value - * @returns {boolean} - */ -webidl.is.USVString = function (value) { - return ( - typeof value === 'string' && - value.isWellFormed() - ) -} - -webidl.is.ReadableStream = webidl.util.MakeTypeAssertion(ReadableStream) -webidl.is.Blob = webidl.util.MakeTypeAssertion(Blob) -webidl.is.URLSearchParams = webidl.util.MakeTypeAssertion(URLSearchParams) -webidl.is.File = webidl.util.MakeTypeAssertion(File) -webidl.is.URL = webidl.util.MakeTypeAssertion(URL) -webidl.is.AbortSignal = webidl.util.MakeTypeAssertion(AbortSignal) -webidl.is.MessagePort = webidl.util.MakeTypeAssertion(MessagePort) - -webidl.is.BufferSource = function (V) { - return types.isArrayBuffer(V) || ( - ArrayBuffer.isView(V) && - types.isArrayBuffer(V.buffer) - ) -} - -// https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy -webidl.util.getCopyOfBytesHeldByBufferSource = function (bufferSource) { - // 1. Let jsBufferSource be the result of converting bufferSource to a JavaScript value. - const jsBufferSource = bufferSource - - // 2. Let jsArrayBuffer be jsBufferSource. - let jsArrayBuffer = jsBufferSource - - // 3. Let offset be 0. - let offset = 0 - - // 4. Let length be 0. - let length = 0 - - // 5. If jsBufferSource has a [[ViewedArrayBuffer]] internal slot, then: - if (types.isTypedArray(jsBufferSource) || types.isDataView(jsBufferSource)) { - // 5.1. Set jsArrayBuffer to jsBufferSource.[[ViewedArrayBuffer]]. - jsArrayBuffer = jsBufferSource.buffer - - // 5.2. Set offset to jsBufferSource.[[ByteOffset]]. - offset = jsBufferSource.byteOffset +}); - // 5.3. Set length to jsBufferSource.[[ByteLength]]. - length = jsBufferSource.byteLength - } else { - // 6. Otherwise: +// node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId.js +var OperationOperationId; +var init_operation_operationId = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId.js"() { + init_utils2(); + OperationOperationId = () => { + return { + Root: { + PathItem: { + Operation(operation, ctx) { + validateDefinedAndNonEmpty("operationId", operation, ctx); + } + } + } + }; + }; + } +}); - // 6.1. Assert: jsBufferSource is an ArrayBuffer or SharedArrayBuffer object. - assert(types.isAnyArrayBuffer(jsBufferSource)) +// node_modules/@redocly/openapi-core/lib/rules/common/tag-description.js +var TagDescription; +var init_tag_description = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/tag-description.js"() { + init_utils2(); + TagDescription = () => { + return { + Tag(tag, ctx) { + validateDefinedAndNonEmpty("description", tag, ctx); + } + }; + }; + } +}); - // 6.2. Set length to jsBufferSource.[[ArrayBufferByteLength]]. - length = jsBufferSource.byteLength +// node_modules/@redocly/openapi-core/lib/rules/common/tags-alphabetical.js +var TagsAlphabetical; +var init_tags_alphabetical = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/tags-alphabetical.js"() { + init_utils2(); + TagsAlphabetical = ({ ignoreCase = false }) => { + return { + Root(root, { report, location }) { + if (!root.tags) + return; + for (let i2 = 0; i2 < root.tags.length - 1; i2++) { + if (getTagName(root.tags[i2], ignoreCase) > getTagName(root.tags[i2 + 1], ignoreCase)) { + report({ + message: "The `tags` array should be in alphabetical order.", + location: location.child(["tags", i2]) + }); + } + } + } + }; + }; } +}); - // 7. If IsDetachedBuffer(jsArrayBuffer) is true, then return the empty byte sequence. - if (jsArrayBuffer.detached) { - return new Uint8Array(0) +// node_modules/@redocly/openapi-core/lib/rules/async2/channels-kebab-case.js +var ChannelsKebabCase; +var init_channels_kebab_case = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/async2/channels-kebab-case.js"() { + ChannelsKebabCase = () => { + return { + Channel(_channel, { report, key }) { + const segments = key.split(/[/.:]/).filter((s2) => s2 !== ""); + if (!segments.every((segment) => /^{.+}$/.test(segment) || /^[a-z0-9-.]+$/.test(segment))) { + report({ + message: `\`${key}\` does not use kebab-case.`, + location: { reportOnKey: true } + }); + } + } + }; + }; } +}); - // 8. Let bytes be a new byte sequence of length equal to length. - const bytes = new Uint8Array(length) +// node_modules/@redocly/openapi-core/lib/rules/async2/no-channel-trailing-slash.js +var NoChannelTrailingSlash; +var init_no_channel_trailing_slash = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/async2/no-channel-trailing-slash.js"() { + NoChannelTrailingSlash = () => { + return { + Channel(_channel, { report, key, location }) { + if (key.endsWith("/") && key !== "/") { + report({ + message: `\`${key}\` should not have a trailing slash.`, + location: location.key() + }); + } + } + }; + }; + } +}); - // 9. For i in the range offset to offset + length − 1, inclusive, - // set bytes[i − offset] to GetValueFromBuffer(jsArrayBuffer, i, Uint8, true, Unordered). - const view = new Uint8Array(jsArrayBuffer, offset, length) - bytes.set(view) +// node_modules/@redocly/openapi-core/lib/rules/async2/index.js +var rules2, preprocessors2; +var init_async22 = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/async2/index.js"() { + init_assertions(); + init_info_contact(); + init_info_license_strict(); + init_no_duplicated_tag_names(); + init_no_enum_type_mismatch(); + init_no_mixed_number_range_constraints(); + init_no_required_schema_properties_undefined(); + init_no_schema_type_mismatch(); + init_no_unresolved_refs(); + init_operation_operationId(); + init_struct(); + init_tag_description(); + init_tags_alphabetical(); + init_channels_kebab_case(); + init_no_channel_trailing_slash(); + rules2 = { + struct: Struct, + "no-unresolved-refs": NoUnresolvedRefs, + assertions: Assertions2, + "info-contact": InfoContact, + "info-license-strict": InfoLicenseStrict, + "operation-operationId": OperationOperationId, + "channels-kebab-case": ChannelsKebabCase, + "no-channel-trailing-slash": NoChannelTrailingSlash, + "tag-description": TagDescription, + "tags-alphabetical": TagsAlphabetical, + "no-duplicated-tag-names": NoDuplicatedTagNames, + "no-required-schema-properties-undefined": NoRequiredSchemaPropertiesUndefined, + "no-enum-type-mismatch": NoEnumTypeMismatch, + "no-mixed-number-range-constraints": NoMixedNumberRangeConstraints, + "no-schema-type-mismatch": NoSchemaTypeMismatch + }; + preprocessors2 = {}; + } +}); - // 10. Return bytes. - return bytes -} +// node_modules/@redocly/openapi-core/lib/rules/async3/channels-kebab-case.js +var ChannelsKebabCase2; +var init_channels_kebab_case2 = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/async3/channels-kebab-case.js"() { + ChannelsKebabCase2 = () => { + return { + Channel(channel, { report }) { + const segments = (channel.address || "").split(/[/.:]/).filter((s2) => s2 !== ""); + if (!segments.every((segment) => /^{.+}$/.test(segment) || /^[a-z0-9-.]+$/.test(segment))) { + report({ + message: `\`${channel.address}\` does not use kebab-case.`, + location: { reportOnKey: true } + }); + } + } + }; + }; + } +}); -// https://webidl.spec.whatwg.org/#es-DOMString -webidl.converters.DOMString = function (V, prefix, argument, flags) { - // 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 && webidl.util.HasFlag(flags, webidl.attributes.LegacyNullToEmptyString)) { - return '' +// node_modules/@redocly/openapi-core/lib/rules/async3/no-channel-trailing-slash.js +var NoChannelTrailingSlash2; +var init_no_channel_trailing_slash2 = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/async3/no-channel-trailing-slash.js"() { + NoChannelTrailingSlash2 = () => { + return { + Channel(channel, { report, location }) { + if (channel?.address?.endsWith("/") && channel?.address !== "/") { + report({ + message: `\`${channel.address}\` should not have a trailing slash.`, + location: location.key() + }); + } + } + }; + }; } +}); - // 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.` - }) +// node_modules/@redocly/openapi-core/lib/rules/async3/index.js +var rules3, preprocessors3; +var init_async32 = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/async3/index.js"() { + init_assertions(); + init_info_contact(); + init_info_license_strict(); + init_no_duplicated_tag_names(); + init_no_enum_type_mismatch(); + init_no_mixed_number_range_constraints(); + init_no_required_schema_properties_undefined(); + init_no_schema_type_mismatch(); + init_no_unresolved_refs(); + init_operation_operationId(); + init_struct(); + init_tag_description(); + init_tags_alphabetical(); + init_channels_kebab_case2(); + init_no_channel_trailing_slash2(); + rules3 = { + struct: Struct, + "no-unresolved-refs": NoUnresolvedRefs, + assertions: Assertions2, + "info-contact": InfoContact, + "info-license-strict": InfoLicenseStrict, + "operation-operationId": OperationOperationId, + "channels-kebab-case": ChannelsKebabCase2, + "no-channel-trailing-slash": NoChannelTrailingSlash2, + "tag-description": TagDescription, + "tags-alphabetical": TagsAlphabetical, + "no-duplicated-tag-names": NoDuplicatedTagNames, + "no-required-schema-properties-undefined": NoRequiredSchemaPropertiesUndefined, + "no-enum-type-mismatch": NoEnumTypeMismatch, + "no-mixed-number-range-constraints": NoMixedNumberRangeConstraints, + "no-schema-type-mismatch": NoSchemaTypeMismatch + }; + preprocessors3 = {}; } +}); - // 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) -} +// node_modules/@redocly/openapi-core/lib/rules/common/info-license.js +var InfoLicense; +var init_info_license = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/info-license.js"() { + init_utils2(); + InfoLicense = () => { + return { + Info(info, { report }) { + if (!info.license) { + report({ + message: missingRequiredField("Info", "license"), + location: { reportOnKey: true } + }); + } + } + }; + }; + } +}); -// https://webidl.spec.whatwg.org/#es-ByteString -webidl.converters.ByteString = function (V, prefix, argument) { - // 1. 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 ByteString.` - }) - } - - const x = String(V) - - // 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.` - ) +// node_modules/@redocly/openapi-core/lib/rules/common/no-ambiguous-paths.js +function arePathsAmbiguous(a2, b2) { + const partsA = a2.split("/"); + const partsB = b2.split("/"); + if (partsA.length !== partsB.length) + return false; + let aVars = 0; + let bVars = 0; + let ambiguous = true; + for (let i2 = 0; i2 < partsA.length; i2++) { + const aIsVar = partsA[i2].match(/^{.+?}$/); + const bIsVar = partsB[i2].match(/^{.+?}$/); + if (aIsVar || bIsVar) { + if (aIsVar) + aVars++; + if (bIsVar) + bVars++; + continue; + } else if (partsA[i2] !== partsB[i2]) { + ambiguous = false; } } - - // 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 -} - -/** - * @param {unknown} value - * @returns {string} - * @see https://webidl.spec.whatwg.org/#es-USVString - */ -webidl.converters.USVString = function (value) { - // TODO: rewrite this so we can control the errors thrown - if (typeof value === 'string') { - return value.toWellFormed() - } - return `${value}`.toWellFormed() -} - -// https://webidl.spec.whatwg.org/#es-boolean -webidl.converters.boolean = function (V) { - // 1. Let x be the result of computing ToBoolean(V). - // https://262.ecma-international.org/10.0/index.html#table-10 - 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', 0, 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', 0, 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', 0, 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, flags) { - // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). - const x = webidl.util.ConvertToInt(V, 16, 'unsigned', flags, 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, flags) { - // 1. If V is not an Object, or V does not have an - // [[ArrayBufferData]] internal slot, then throw a - // TypeError. - // 2. If IsSharedArrayBuffer(V) is true, then throw a - // TypeError. - // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances - if ( - webidl.util.Type(V) !== OBJECT || - !types.isArrayBuffer(V) - ) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ['ArrayBuffer'] - }) - } - - // 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 (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a resizable ArrayBuffer.` - }) - } - - // 4. Return the IDL ArrayBuffer value that is a - // reference to the same object as V. - return V + return ambiguous && aVars === bVars; } +var NoAmbiguousPaths; +var init_no_ambiguous_paths = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/no-ambiguous-paths.js"() { + NoAmbiguousPaths = () => { + return { + Paths(pathMap, { report, location }) { + const seenPaths = []; + for (const currentPath of Object.keys(pathMap)) { + const ambiguousPath = seenPaths.find((seenPath) => arePathsAmbiguous(seenPath, currentPath)); + if (ambiguousPath) { + report({ + message: `Paths should resolve unambiguously. Found two ambiguous paths: \`${ambiguousPath}\` and \`${currentPath}\`.`, + location: location.child([currentPath]).key() + }); + } + seenPaths.push(currentPath); + } + } + }; + }; + } +}); -// https://webidl.spec.whatwg.org/#idl-SharedArrayBuffer -webidl.converters.SharedArrayBuffer = function (V, prefix, argument, flags) { - // 1. If V is not an Object, or V does not have an - // [[ArrayBufferData]] internal slot, then throw a - // TypeError. - // 2. If IsSharedArrayBuffer(V) is false, then throw a - // TypeError. - // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances - if ( - webidl.util.Type(V) !== OBJECT || - !types.isSharedArrayBuffer(V) - ) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ['SharedArrayBuffer'] - }) - } - - // 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 (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a resizable SharedArrayBuffer.` - }) - } - - // 4. Return the IDL SharedArrayBuffer value that is a - // reference to the same object as V. - return V +// node_modules/@redocly/openapi-core/lib/utils/is-path-parameter.js +function isPathParameter(pathSegment) { + return pathSegment.startsWith("{") && pathSegment.endsWith("}"); } +var init_is_path_parameter = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/is-path-parameter.js"() { + } +}); -// https://webidl.spec.whatwg.org/#dfn-typed-array-type -webidl.converters.TypedArray = function (V, T, prefix, argument, flags) { - // 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: `${argument} ("${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 (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a view on a shared array buffer.` - }) - } - - // 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 (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a view on a resizable array buffer.` - }) - } - - // 5. Return the IDL value of type T that is a reference - // to the same object as V. - return V +// node_modules/@redocly/openapi-core/lib/utils/split-camel-case-into-words.js +function splitCamelCaseIntoWords(str2) { + const camel = str2.split(/(?:[-._])|([A-Z][a-z]+)/).filter(isTruthy).map((item) => item.toLocaleLowerCase()); + const caps = str2.split(/([A-Z]{2,})/).filter((e2) => e2 && e2 === e2.toUpperCase()).map((item) => item.toLocaleLowerCase()); + return /* @__PURE__ */ new Set([...camel, ...caps]); } +var init_split_camel_case_into_words = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/split-camel-case-into-words.js"() { + init_is_truthy(); + } +}); -// https://webidl.spec.whatwg.org/#idl-DataView -webidl.converters.DataView = function (V, prefix, argument, flags) { - // 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.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ['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 (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a view on a shared array buffer.` - }) - } - - // 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 (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a view on a resizable array buffer.` - }) - } - - // 4. Return the IDL DataView value that is a reference - // to the same object as V. - return V -} +// node_modules/@redocly/openapi-core/lib/rules/common/no-http-verbs-in-paths.js +var httpMethods, NoHttpVerbsInPaths; +var init_no_http_verbs_in_paths = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/no-http-verbs-in-paths.js"() { + init_is_path_parameter(); + init_split_camel_case_into_words(); + httpMethods = ["get", "head", "post", "put", "patch", "delete", "options", "trace"]; + NoHttpVerbsInPaths = ({ splitIntoWords, excludedPaths }) => { + return { + PathItem(_path, { key, report, location }) { + const pathKey = key.toString(); + if (!pathKey.startsWith("/")) + return; + if (excludedPaths?.some((excludedPath) => pathKey === excludedPath)) + return; + const pathSegments = pathKey.split("/"); + for (const pathSegment of pathSegments) { + if (!pathSegment || isPathParameter(pathSegment)) + continue; + const isHttpMethodIncluded = (method) => { + return splitIntoWords ? splitCamelCaseIntoWords(pathSegment).has(method) : pathSegment.toLocaleLowerCase().includes(method); + }; + for (const method of httpMethods) { + if (isHttpMethodIncluded(method)) { + report({ + message: `path \`${pathKey}\` should not contain http verb ${method}`, + location: location.key() + }); + } + } + } + } + }; + }; + } +}); -// https://webidl.spec.whatwg.org/#ArrayBufferView -webidl.converters.ArrayBufferView = function (V, prefix, argument, flags) { - if ( - webidl.util.Type(V) !== OBJECT || - !types.isArrayBufferView(V) - ) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ['ArrayBufferView'] - }) +// node_modules/@redocly/openapi-core/lib/rules/common/no-identical-paths.js +var NoIdenticalPaths; +var init_no_identical_paths = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/no-identical-paths.js"() { + NoIdenticalPaths = () => { + return { + Paths(pathMap, { report, location }) { + const Paths3 = /* @__PURE__ */ new Map(); + for (const pathName of Object.keys(pathMap)) { + const id = pathName.replace(/{.+?}/g, "{VARIABLE}"); + const existingSamePath = Paths3.get(id); + if (existingSamePath) { + report({ + message: `The path already exists which differs only by path parameter name(s): \`${existingSamePath}\` and \`${pathName}\`.`, + location: location.child([pathName]).key() + }); + } else { + Paths3.set(id, pathName); + } + } + } + }; + }; } +}); - if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a view on a shared array buffer.` - }) +// node_modules/@redocly/openapi-core/lib/rules/common/no-invalid-parameter-examples.js +var NoInvalidParameterExamples; +var init_no_invalid_parameter_examples = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/no-invalid-parameter-examples.js"() { + init_is_defined(); + init_is_plain_object(); + init_utils2(); + NoInvalidParameterExamples = (opts) => { + return { + Parameter: { + leave(parameter, ctx) { + if (isDefined(parameter.example)) { + validateExample(parameter.example, parameter.schema, { + location: ctx.location.child("example"), + ctx, + allowAdditionalProperties: !!opts.allowAdditionalProperties, + ajvContext: { apiContext: "request" } + }); + } + if (isPlainObject(parameter.examples)) { + for (const [key, example] of Object.entries(parameter.examples)) { + if (isPlainObject(example) && "value" in example) { + validateExample(example.value, parameter.schema, { + location: ctx.location.child(["examples", key]), + ctx, + allowAdditionalProperties: !!opts.allowAdditionalProperties, + ajvContext: { apiContext: "request" } + }); + } + } + } + } + } + }; + }; } +}); - if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a view on a resizable array buffer.` - }) +// node_modules/@redocly/openapi-core/lib/rules/common/no-invalid-schema-examples.js +var NoInvalidSchemaExamples; +var init_no_invalid_schema_examples = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/no-invalid-schema-examples.js"() { + init_is_defined(); + init_utils2(); + NoInvalidSchemaExamples = (opts) => { + return { + Schema: { + leave(schema2, ctx) { + const examples = schema2.examples; + if (Array.isArray(examples)) { + for (const example of examples) { + validateExample(example, schema2, { + location: ctx.location.child(["examples", examples.indexOf(example)]), + ctx, + allowAdditionalProperties: !!opts.allowAdditionalProperties + }); + } + } + if (isDefined(schema2.example)) { + if (schema2.nullable === true && schema2.example === null && schema2.type !== void 0) { + return; + } + validateExample(schema2.example, schema2, { + location: ctx.location.child("example"), + ctx, + allowAdditionalProperties: !!opts.allowAdditionalProperties + }); + } + } + } + }; + }; } +}); - return V -} +// node_modules/@redocly/openapi-core/lib/rules/common/no-path-trailing-slash.js +var NoPathTrailingSlash; +var init_no_path_trailing_slash = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/no-path-trailing-slash.js"() { + NoPathTrailingSlash = () => { + return { + PathItem(_path, { report, key, rawLocation }) { + if (key.endsWith("/") && key !== "/") { + report({ + message: `\`${key}\` should not have a trailing slash.`, + location: rawLocation.key() + }); + } + } + }; + }; + } +}); -// https://webidl.spec.whatwg.org/#BufferSource -webidl.converters.BufferSource = function (V, prefix, argument, flags) { - if (types.isArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, prefix, argument, flags) +// node_modules/@redocly/openapi-core/lib/rules/common/operation-2xx-response.js +var Operation2xxResponse; +var init_operation_2xx_response = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/operation-2xx-response.js"() { + init_utils2(); + Operation2xxResponse = ({ validateWebhooks }) => { + return { + Paths: { + Responses(responses, { report }) { + const codes = Object.keys(responses || {}); + validateResponseCodes(codes, "2XX", { report }); + } + }, + WebhooksMap: { + Responses(responses, { report }) { + if (!validateWebhooks) + return; + const codes = Object.keys(responses || {}); + validateResponseCodes(codes, "2XX", { report }); + } + } + }; + }; } +}); - if (types.isArrayBufferView(V)) { - flags &= ~webidl.attributes.AllowShared - - return webidl.converters.ArrayBufferView(V, prefix, argument, flags) +// node_modules/@redocly/openapi-core/lib/rules/common/operation-4xx-response.js +var Operation4xxResponse; +var init_operation_4xx_response = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/operation-4xx-response.js"() { + init_utils2(); + Operation4xxResponse = ({ validateWebhooks }) => { + return { + Paths: { + Responses(responses, { report }) { + const codes = Object.keys(responses || {}); + validateResponseCodes(codes, "4XX", { report }); + } + }, + WebhooksMap: { + Responses(responses, { report }) { + if (!validateWebhooks) + return; + const codes = Object.keys(responses || {}); + validateResponseCodes(codes, "4XX", { report }); + } + } + }; + }; } +}); - // Make this explicit for easier debugging - if (types.isSharedArrayBuffer(V)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a SharedArrayBuffer.` - }) +// node_modules/@redocly/openapi-core/lib/rules/common/operation-description.js +var OperationDescription; +var init_operation_description = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/operation-description.js"() { + init_utils2(); + OperationDescription = () => { + return { + Operation(operation, ctx) { + validateDefinedAndNonEmpty("description", operation, ctx); + } + }; + }; } +}); - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ['ArrayBuffer', 'ArrayBufferView'] - }) -} - -// https://webidl.spec.whatwg.org/#AllowSharedBufferSource -webidl.converters.AllowSharedBufferSource = function (V, prefix, argument, flags) { - if (types.isArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, prefix, argument, flags) +// node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId-unique.js +var OperationIdUnique; +var init_operation_operationId_unique = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId-unique.js"() { + OperationIdUnique = () => { + const seenOperations = /* @__PURE__ */ new Set(); + return { + Operation(operation, { report, location }) { + if (!operation.operationId) + return; + if (seenOperations.has(operation.operationId)) { + report({ + message: "Every operation must have a unique `operationId`.", + location: location.child([operation.operationId]) + }); + } + seenOperations.add(operation.operationId); + } + }; + }; } +}); - if (types.isSharedArrayBuffer(V)) { - return webidl.converters.SharedArrayBuffer(V, prefix, argument, flags) +// node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId-url-safe.js +var validUrlSymbols, OperationIdUrlSafe; +var init_operation_operationId_url_safe = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId-url-safe.js"() { + validUrlSymbols = /^[A-Za-z0-9-._~:/?#\[\]@!\$&'()*+,;=]*$/; + OperationIdUrlSafe = () => { + return { + Operation(operation, { report, location }) { + if (operation.operationId && !validUrlSymbols.test(operation.operationId)) { + report({ + message: "Operation `operationId` should not have URL invalid characters.", + location: location.child(["operationId"]) + }); + } + } + }; + }; } +}); - if (types.isArrayBufferView(V)) { - flags |= webidl.attributes.AllowShared - return webidl.converters.ArrayBufferView(V, prefix, argument, flags) +// node_modules/@redocly/openapi-core/lib/rules/common/operation-parameters-unique.js +var OperationParametersUnique; +var init_operation_parameters_unique = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/operation-parameters-unique.js"() { + OperationParametersUnique = () => { + let seenPathParams; + let seenOperationParams; + return { + PathItem: { + enter() { + seenPathParams = /* @__PURE__ */ new Set(); + }, + Parameter(parameter, { report, key, parentLocations }) { + const paramId = `${parameter.in}___${parameter.name}`; + if (seenPathParams.has(paramId)) { + report({ + message: `Paths must have unique \`name\` + \`in\` parameters. +Repeats of \`in:${parameter.in}\` + \`name:${parameter.name}\`.`, + location: parentLocations.PathItem.child(["parameters", key]) + }); + } + seenPathParams.add(`${parameter.in}___${parameter.name}`); + }, + Operation: { + enter() { + seenOperationParams = /* @__PURE__ */ new Set(); + }, + Parameter(parameter, { report, key, parentLocations }) { + const paramId = `${parameter.in}___${parameter.name}`; + if (seenOperationParams.has(paramId)) { + report({ + message: `Operations must have unique \`name\` + \`in\` parameters. Repeats of \`in:${parameter.in}\` + \`name:${parameter.name}\`.`, + location: parentLocations.Operation.child(["parameters", key]) + }); + } + seenOperationParams.add(paramId); + } + } + } + }; + }; } +}); - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ['ArrayBuffer', 'SharedArrayBuffer', 'ArrayBufferView'] - }) -} - -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 -) - -webidl.converters.Blob = webidl.interfaceConverter(webidl.is.Blob, 'Blob') - -webidl.converters.AbortSignal = webidl.interfaceConverter( - webidl.is.AbortSignal, - 'AbortSignal' -) - -/** - * [LegacyTreatNonObjectAsNull] - * callback EventHandlerNonNull = any (Event event); - * typedef EventHandlerNonNull? EventHandler; - * @param {*} V - */ -webidl.converters.EventHandlerNonNull = function (V) { - if (webidl.util.Type(V) !== OBJECT) { - return null +// node_modules/@redocly/openapi-core/lib/rules/common/operation-singular-tag.js +var OperationSingularTag; +var init_operation_singular_tag = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/operation-singular-tag.js"() { + OperationSingularTag = () => { + return { + Operation(operation, { report, location }) { + if (operation.tags && operation.tags.length > 1) { + report({ + message: "Operation `tags` object should have only one tag.", + location: location.child(["tags"]).key() + }); + } + } + }; + }; } +}); - // [I]f the value is not an object, it will be converted to null, and if the value is not callable, - // it will be converted to a callback function value that does nothing when called. - if (typeof V === 'function') { - return V +// node_modules/@redocly/openapi-core/lib/rules/common/operation-summary.js +var OperationSummary; +var init_operation_summary = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/operation-summary.js"() { + init_utils2(); + OperationSummary = () => { + return { + Operation(operation, ctx) { + validateDefinedAndNonEmpty("summary", operation, ctx); + } + }; + }; } +}); - return () => {} -} - -webidl.attributes = { - Clamp: 1 << 0, - EnforceRange: 1 << 1, - AllowShared: 1 << 2, - AllowResizable: 1 << 3, - LegacyNullToEmptyString: 1 << 4 -} - -module.exports = { - webidl -} - - -/***/ }), - -/***/ 88380: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = __nccwpck_require__(93587) -const { parseExtensions, isClosed, isClosing, isEstablished, isConnecting, validateCloseCodeAndReason } = __nccwpck_require__(89902) -const { makeRequest } = __nccwpck_require__(20610) -const { fetching } = __nccwpck_require__(85170) -const { Headers, getHeadersList } = __nccwpck_require__(52991) -const { getDecodeSplit } = __nccwpck_require__(1310) -const { WebsocketFrameSend } = __nccwpck_require__(2391) -const assert = __nccwpck_require__(98061) -const { runtimeFeatures } = __nccwpck_require__(15072) - -const crypto = runtimeFeatures.has('crypto') - ? __nccwpck_require__(6005) - : null - -let warningEmitted = false - -/** - * @see https://websockets.spec.whatwg.org/#concept-websocket-establish - * @param {URL} url - * @param {string|string[]} protocols - * @param {import('./websocket').Handler} handler - * @param {Partial} options - */ -function establishWebSocketConnection (url, protocols, client, handler, 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" , - // redirect mode is "error", and use-URL-credentials flag is set. - const request = makeRequest({ - urlList: [requestURL], - client, - serviceWorkers: 'none', - referrer: 'no-referrer', - mode: 'websocket', - credentials: 'include', - cache: 'no-store', - redirect: 'error', - useURLCredentials: true - }) - - // 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, true) - - // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s - // header list. - request.headersList.append('sec-websocket-version', '13', true) - - // 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, true) - } - - // 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, true) - - // 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.socket?.session != null && response.status !== 200) && response.status !== 101)) { - if (response.type === 'error' || response.status !== 101) { - // The presence of a session property on the socket indicates HTTP2 - // HTTP1 - if (response.socket?.session == null) { - failWebsocketConnection(handler, 1002, 'Received network error or non-101 status code.', response.error) - return - } - - // HTTP2 - if (response.status !== 200) { - failWebsocketConnection(handler, 1002, 'Received network error or non-200 status code.', response.error) - return - } - } - - if (warningEmitted === false && response.socket?.session != null) { - process.emitWarning('WebSocket over HTTP2 is experimental, and subject to change.', 'ExperimentalWarning') - warningEmitted = true - } - - // 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(handler, 1002, '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_. - // For H2, no upgrade header is expected. - if (response.socket.session == null && response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') { - failWebsocketConnection(handler, 1002, '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_. - // For H2, no connection header is expected. - if (response.socket.session == null && response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') { - failWebsocketConnection(handler, 1002, '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.hash('sha1', keyValue + uid, 'base64') - if (secWSAccept !== digest) { - failWebsocketConnection(handler, 1002, '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(handler, 1002, '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(handler, 1002, 'Protocol was not set in the opening handshake.') - return +// node_modules/@redocly/openapi-core/lib/rules/common/operation-tag-defined.js +var OperationTagDefined; +var init_operation_tag_defined = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/operation-tag-defined.js"() { + OperationTagDefined = () => { + let definedTags; + return { + Root(root) { + definedTags = new Set((root.tags ?? []).map((t2) => t2.name)); + }, + Operation(operation, { report, location }) { + if (operation?.tags) { + for (let i2 = 0; i2 < operation.tags.length; i2++) { + if (!definedTags.has(operation.tags[i2])) { + report({ + message: `Operation tags should be defined in global tags.`, + location: location.child(["tags", i2]) + }); + } + } + } else { + report({ + message: `Operation tags should be defined`, + location: location.key() + }); + } } - } - - response.socket.on('data', handler.onSocketData) - response.socket.on('close', handler.onSocketClose) - response.socket.on('error', handler.onSocketError) - - handler.wasEverConnected = true - handler.onConnectionEstablished(response, extensions) - } - }) - - return controller -} - -/** - * @see https://whatpr.org/websockets/48.html#close-the-websocket - * @param {import('./websocket').Handler} object - * @param {number} [code=null] - * @param {string} [reason=''] - */ -function closeWebSocketConnection (object, code, reason, validate = false) { - // 1. If code was not supplied, let code be null. - code ??= null - - // 2. If reason was not supplied, let reason be the empty string. - reason ??= '' - - // 3. Validate close code and reason with code and reason. - if (validate) validateCloseCodeAndReason(code, reason) - - // 4. Run the first matching steps from the following list: - // - If object’s ready state is CLOSING (2) or CLOSED (3) - // - If the WebSocket connection is not yet established [WSP] - // - If the WebSocket closing handshake has not yet been started [WSP] - // - Otherwise - if (isClosed(object.readyState) || isClosing(object.readyState)) { - // Do nothing. - } else if (!isEstablished(object.readyState)) { - // Fail the WebSocket connection and set object’s ready state to CLOSING (2). [WSP] - failWebsocketConnection(object) - object.readyState = states.CLOSING - } else if (!object.closeState.has(sentCloseFrameState.SENT) && !object.closeState.has(sentCloseFrameState.RECEIVED)) { - // 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. - - 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 is null and reason is the empty string, the WebSocket Close frame must not have a body. - // If reason is non-empty but code is null, then set code to 1000 ("Normal Closure"). - if (reason.length !== 0 && code === null) { - code = 1000 - } - - // If code is set, then the status code to use in the WebSocket Close frame must be the integer given by code. - assert(code === null || Number.isInteger(code)) - - if (code === null && reason.length === 0) { - frame.frameData = emptyBuffer - } else if (code !== null && reason === null) { - frame.frameData = Buffer.allocUnsafe(2) - frame.frameData.writeUInt16BE(code, 0) - } else if (code !== null && reason !== null) { - // If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - frame.frameData = Buffer.allocUnsafe(2 + Buffer.byteLength(reason)) - 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 - } - - object.socket.write(frame.createFrame(opcodes.CLOSE)) - - object.closeState.add(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. - object.readyState = states.CLOSING - } else { - // Set object’s ready state to CLOSING (2). - object.readyState = states.CLOSING + }; + }; } -} +}); -/** - * @param {import('./websocket').Handler} handler - * @param {number} code - * @param {string|undefined} reason - * @param {unknown} cause - * @returns {void} - */ -function failWebsocketConnection (handler, code, reason, cause) { - // If _The WebSocket Connection is Established_ prior to the point where - // the endpoint is required to _Fail the WebSocket Connection_, the - // endpoint SHOULD send a Close frame with an appropriate status code - // (Section 7.4) before proceeding to _Close the WebSocket Connection_. - if (isEstablished(handler.readyState)) { - closeWebSocketConnection(handler, code, reason, false) - } - - handler.controller.abort() - - if (isConnecting(handler.readyState)) { - // If the connection was not established, we must still emit an 'error' and 'close' events - handler.onSocketClose() - } else if (handler.socket?.destroyed === false) { - handler.socket.destroy() +// node_modules/@redocly/openapi-core/lib/rules/common/parameter-description.js +var ParameterDescription; +var init_parameter_description = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/parameter-description.js"() { + ParameterDescription = () => { + return { + Parameter(parameter, { report, location }) { + if (parameter.description === void 0) { + report({ + message: "Parameter object description must be present.", + location: { reportOnKey: true } + }); + } else if (!parameter.description) { + report({ + message: "Parameter object description must be non-empty string.", + location: location.child(["description"]) + }); + } + } + }; + }; } -} - -module.exports = { - establishWebSocketConnection, - failWebsocketConnection, - closeWebSocketConnection -} - - -/***/ }), - -/***/ 93587: -/***/ ((module) => { - -"use strict"; - - -/** - * 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 - * @type {'258EAFA5-E914-47DA-95CA-C5AB0DC85B11'} - */ -const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' - -/** - * @type {PropertyDescriptor} - */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -/** - * The states of the WebSocket connection. - * - * @readonly - * @enum - * @property {0} CONNECTING - * @property {1} OPEN - * @property {2} CLOSING - * @property {3} CLOSED - */ -const states = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 -} - -/** - * @readonly - * @enum - * @property {0} NOT_SENT - * @property {1} PROCESSING - * @property {2} SENT - */ -const sentCloseFrameState = { - SENT: 1, - RECEIVED: 2 -} - -/** - * The WebSocket opcodes. - * - * @readonly - * @enum - * @property {0x0} CONTINUATION - * @property {0x1} TEXT - * @property {0x2} BINARY - * @property {0x8} CLOSE - * @property {0x9} PING - * @property {0xA} PONG - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 - */ -const opcodes = { - CONTINUATION: 0x0, - TEXT: 0x1, - BINARY: 0x2, - CLOSE: 0x8, - PING: 0x9, - PONG: 0xA -} - -/** - * The maximum value for an unsigned 16-bit integer. - * - * @type {65535} 2 ** 16 - 1 - */ -const maxUnsigned16Bit = 65535 - -/** - * The states of the parser. - * - * @readonly - * @enum - * @property {0} INFO - * @property {2} PAYLOADLENGTH_16 - * @property {3} PAYLOADLENGTH_64 - * @property {4} READ_DATA - */ -const parserStates = { - INFO: 0, - PAYLOADLENGTH_16: 2, - PAYLOADLENGTH_64: 3, - READ_DATA: 4 -} - -/** - * An empty buffer. - * - * @type {Buffer} - */ -const emptyBuffer = Buffer.allocUnsafe(0) - -/** - * @readonly - * @property {1} text - * @property {2} typedArray - * @property {3} arrayBuffer - * @property {4} blob - */ -const sendHints = { - text: 1, - typedArray: 2, - arrayBuffer: 3, - blob: 4 -} - -module.exports = { - uid, - sentCloseFrameState, - staticPropertyDescriptors, - states, - opcodes, - maxUnsigned16Bit, - parserStates, - emptyBuffer, - sendHints -} - - -/***/ }), - -/***/ 55033: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { webidl } = __nccwpck_require__(81040) -const { kEnumerableProperty } = __nccwpck_require__(83983) -const { kConstruct } = __nccwpck_require__(72785) - -/** - * @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) +// node_modules/@redocly/openapi-core/lib/rules/common/path-declaration-must-exist.js +var PathDeclarationMustExist; +var init_path_declaration_must_exist = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/path-declaration-must-exist.js"() { + PathDeclarationMustExist = () => { + return { + PathItem(_path, { report, key }) { + if (key.indexOf("{}") !== -1) { + report({ + message: "Path parameter declarations must be non-empty. `{}` is invalid.", + location: { reportOnKey: true } + }); + } + } + }; + }; } +}); - get data () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.data +// node_modules/@redocly/openapi-core/lib/rules/common/path-http-verbs-order.js +var defaultOrder, PathHttpVerbsOrder; +var init_path_http_verbs_order = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/path-http-verbs-order.js"() { + defaultOrder = ["get", "head", "post", "put", "patch", "delete", "options", "query", "trace"]; + PathHttpVerbsOrder = (opts) => { + const order = opts && opts.order || defaultOrder; + if (!Array.isArray(order)) { + throw new Error("path-http-verbs-order `order` option must be an array"); + } + return { + PathItem(path13, { report, location }) { + const httpVerbs = Object.keys(path13).filter((k3) => order.includes(k3)); + for (let i2 = 0; i2 < httpVerbs.length - 1; i2++) { + const aIdx = order.indexOf(httpVerbs[i2]); + const bIdx = order.indexOf(httpVerbs[i2 + 1]); + if (bIdx < aIdx) { + report({ + message: "Operation http verbs must be ordered.", + location: { reportOnKey: true, ...location.child(httpVerbs[i2 + 1]) } + }); + } + } + } + }; + }; } +}); - get origin () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.origin +// node_modules/@redocly/openapi-core/lib/rules/common/path-not-include-query.js +var PathNotIncludeQuery; +var init_path_not_include_query = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/path-not-include-query.js"() { + PathNotIncludeQuery = () => { + return { + Paths: { + PathItem(_operation, { report, key }) { + if (key.toString().includes("?")) { + report({ + message: `Don't put query string items in the path, they belong in parameters with \`in: query\`.`, + location: { reportOnKey: true } + }); + } + } + } + }; + }; } +}); - get lastEventId () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.lastEventId +// node_modules/@redocly/openapi-core/lib/rules/common/path-params-defined.js +var pathRegex, MAX_DEPTH, PathParamsDefined, pathItemEnter, pathItemLeave, createPathItemParameterHandler, createOperationHandlers, extractTemplateParams, collectPathParamsFromOperation, validatePathParameter, validateRequiredPathParams; +var init_path_params_defined = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/path-params-defined.js"() { + init_is_plain_object(); + pathRegex = /\{([a-zA-Z0-9_.-]+)\}+/g; + MAX_DEPTH = 2; + PathParamsDefined = () => { + const pathContext = { current: null }; + const currentOperationParams = /* @__PURE__ */ new Set(); + return { + PathItem: { + enter(_5, { key }) { + pathItemEnter(pathContext, key); + }, + leave() { + pathItemLeave(pathContext); + }, + Parameter(parameter, { report, location, rawLocation }) { + createPathItemParameterHandler({ parameter, pathContext, report, location, rawLocation }); + }, + Operation: createOperationHandlers(pathContext, currentOperationParams) + } + }; + }; + pathItemEnter = (pathContext, key) => { + pathContext.current = { + path: key, + templateParams: extractTemplateParams(key), + definedParams: /* @__PURE__ */ new Set() + }; + }; + pathItemLeave = (pathContext) => { + pathContext.current = null; + }; + createPathItemParameterHandler = ({ parameter, pathContext, report, location, rawLocation }) => { + if (parameter.in === "path" && parameter.name && pathContext.current) { + pathContext.current.definedParams.add(parameter.name); + validatePathParameter({ + paramName: parameter.name, + templateParams: pathContext.current.templateParams, + path: pathContext.current.path, + report, + location, + rawLocation + }); + } + }; + createOperationHandlers = (pathContext, currentOperationParams, depth = 0) => { + const reportMaxDepthWarning = (report, location, depth2) => { + report({ + message: `Maximum callback nesting depth (${depth2}) reached. Path parameter validation is limited beyond this depth to prevent infinite recursion.`, + location + }); + }; + if (depth >= MAX_DEPTH) { + return { + enter: () => { + }, + leave: (_op, { report, location }) => { + reportMaxDepthWarning(report, location, depth); + }, + Parameter: () => { + }, + Callback: void 0 + }; + } + const createCallbackPathItem = () => { + let parentPathContext = null; + return { + enter(_5, { key }) { + parentPathContext = pathContext.current; + pathItemEnter(pathContext, key); + }, + leave() { + pathContext.current = parentPathContext; + }, + Parameter(parameter, { report, location, rawLocation }) { + createPathItemParameterHandler({ parameter, pathContext, report, location, rawLocation }); + }, + get Operation() { + return createOperationHandlers(pathContext, currentOperationParams, depth + 1); + } + }; + }; + return { + enter() { + currentOperationParams = /* @__PURE__ */ new Set(); + }, + leave(_operation, { report, location }) { + if (!pathContext.current || !currentOperationParams) + return; + validateRequiredPathParams({ + templateParams: pathContext.current.templateParams, + definedOperationParams: currentOperationParams, + definedPathParams: pathContext.current.definedParams, + path: pathContext.current.path, + report, + location + }); + }, + Parameter(parameter, { report, location, rawLocation }) { + collectPathParamsFromOperation(parameter, currentOperationParams); + if (parameter.in === "path" && parameter.name && pathContext.current) { + currentOperationParams.add(parameter.name); + validatePathParameter({ + paramName: parameter.name, + templateParams: pathContext.current.templateParams, + path: pathContext.current.path, + report, + location, + rawLocation + }); + } + }, + Callback: { + get PathItem() { + return createCallbackPathItem(); + } + } + }; + }; + extractTemplateParams = (path13) => { + return new Set(Array.from(path13.matchAll(pathRegex)).map((m) => m[1])); + }; + collectPathParamsFromOperation = (parameter, targetSet) => { + if (isPlainObject(parameter) && "in" in parameter && "name" in parameter) { + if (parameter.in === "path" && parameter.name) { + targetSet.add(parameter.name); + } + } + }; + validatePathParameter = ({ paramName, templateParams, path: path13, report, location, rawLocation }) => { + if (!templateParams.has(paramName)) { + const message = `Path parameter \`${paramName}\` is not used in the path \`${path13}\`.`; + const from = rawLocation === location ? void 0 : rawLocation; + report({ message, location: location.child(["name"]), from }); + } + }; + validateRequiredPathParams = ({ templateParams, definedOperationParams, definedPathParams, path: path13, report, location }) => { + const allDefinedParams = /* @__PURE__ */ new Set([...definedOperationParams, ...definedPathParams]); + for (const templateParam of templateParams) { + if (!allDefinedParams.has(templateParam)) { + report({ + message: `The operation does not define the path parameter \`{${templateParam}}\` expected by path \`${path13}\`.`, + location: location.child(["parameters"]).key() + }); + } + } + }; } +}); - get source () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.source +// node_modules/@redocly/openapi-core/lib/rules/common/path-segment-plural.js +var import_pluralize3, PathSegmentPlural; +var init_path_segment_plural = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/path-segment-plural.js"() { + import_pluralize3 = __toESM(require_pluralize(), 1); + init_is_path_parameter(); + PathSegmentPlural = (opts) => { + const { ignoreLastPathSegment, exceptions } = opts; + return { + PathItem: { + leave(_path, { report, key, location }) { + const pathKey = key.toString(); + if (pathKey.startsWith("/")) { + const pathSegments = pathKey.split("/"); + pathSegments.shift(); + if (ignoreLastPathSegment && pathSegments.length > 0) { + pathSegments.pop(); + } + for (const pathSegment of pathSegments) { + if (exceptions && exceptions.includes(pathSegment)) + continue; + if (!isPathParameter(pathSegment) && import_pluralize3.default.isSingular(pathSegment)) { + report({ + message: `path segment \`${pathSegment}\` should be plural.`, + location: location.key() + }); + } + } + } + } + } + }; + }; } +}); - get ports () { - webidl.brandCheck(this, MessageEvent) - - if (!Object.isFrozen(this.#eventInit.ports)) { - Object.freeze(this.#eventInit.ports) - } +// node_modules/@redocly/openapi-core/lib/rules/common/paths-kebab-case.js +var PathsKebabCase; +var init_paths_kebab_case = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/paths-kebab-case.js"() { + PathsKebabCase = () => { + return { + PathItem(_path, { report, key }) { + const segments = key.substr(1).split("/").filter((s2) => s2 !== ""); + if (!segments.every((segment) => /^{.+}$/.test(segment) || /^[a-z0-9-.]+$/.test(segment))) { + report({ + message: `\`${key}\` does not use kebab-case.`, + location: { reportOnKey: true } + }); + } + } + }; + }; + } +}); - return this.#eventInit.ports +// node_modules/@redocly/openapi-core/lib/rules/common/required-string-property-missing-min-length.js +var RequiredStringPropertyMissingMinLength; +var init_required_string_property_missing_min_length = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/required-string-property-missing-min-length.js"() { + RequiredStringPropertyMissingMinLength = () => { + let skipSchemaProperties; + let requiredPropertiesSet; + return { + Schema: { + enter(schema2) { + if (!schema2?.required) { + skipSchemaProperties = true; + return; + } + requiredPropertiesSet = new Set(schema2.required); + skipSchemaProperties = false; + }, + SchemaProperties: { + skip() { + return skipSchemaProperties; + }, + Schema: { + enter(schema2, { key, location, report }) { + if (requiredPropertiesSet.has(key) && schema2.type === "string") { + if (!schema2?.minLength) { + report({ + message: "Property minLength is required.", + location: location.key() + }); + } + } + } + } + } + } + }; + }; } +}); - 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 - }) +// node_modules/@redocly/openapi-core/lib/utils/get-matching-status-code-range.js +function getMatchingStatusCodeRange(code) { + return `${code}`.replace(/^(\d)\d\d$/, (_5, firstDigit) => `${firstDigit}XX`); +} +var init_get_matching_status_code_range = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/get-matching-status-code-range.js"() { } +}); - 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 +// node_modules/@redocly/openapi-core/lib/rules/common/response-contains-header.js +var ResponseContainsHeader; +var init_response_contains_header = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/response-contains-header.js"() { + init_get_matching_status_code_range(); + ResponseContainsHeader = (options2) => { + const names = options2.names || {}; + return { + Operation: { + Response: { + enter: (response, { report, location, key }) => { + const expectedHeaders = names[key] || names[getMatchingStatusCodeRange(key)] || names[getMatchingStatusCodeRange(key).toLowerCase()] || []; + for (const expectedHeader of expectedHeaders) { + if (!response?.headers || !Object.keys(response?.headers).some((header) => header.toLowerCase() === expectedHeader.toLowerCase())) { + report({ + message: `Response object must contain a "${expectedHeader}" header.`, + location: location.child("headers").key() + }); + } + } + } + } + } + }; + }; } -} - -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) +// node_modules/@redocly/openapi-core/lib/rules/common/scalar-property-missing-example.js +function isScalarSchema(schema2) { + if (!schema2.type) { + return false; } - - get wasClean () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.wasClean + if (schema2.allOf || schema2.anyOf || schema2.oneOf) { + return false; } - - get code () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.code + if (schema2.format === "binary") { + return false; } - - get reason () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.reason + if (Array.isArray(schema2.type)) { + return schema2.type.every((t2) => SCALAR_TYPES.includes(t2)); } + return SCALAR_TYPES.includes(schema2.type); } - -// 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 +var SCALAR_TYPES, ScalarPropertyMissingExample; +var init_scalar_property_missing_example = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/scalar-property-missing-example.js"() { + init_get_own(); + SCALAR_TYPES = ["string", "integer", "number", "boolean", "null"]; + ScalarPropertyMissingExample = () => { + return { + SchemaProperties(properties, { report, location, specVersion, resolve: resolve8 }) { + for (const propName of Object.keys(properties)) { + const propSchema = resolve8(getOwn(properties, propName)).node; + if (!propSchema || !isScalarSchema(propSchema)) { + continue; + } + if (propSchema.example === void 0 && propSchema.examples === void 0) { + report({ + message: `Scalar property should have "example"${specVersion === "oas3_1" || specVersion === "oas3_2" ? ' or "examples"' : ""} defined.`, + location: location.child(propName).key() + }); + } + } + } + }; + }; } +}); - get filename () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.filename +// node_modules/@redocly/openapi-core/lib/rules/common/security-defined.js +var SecurityDefined; +var init_security_defined = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/security-defined.js"() { + SecurityDefined = (opts) => { + const referencedSchemes = /* @__PURE__ */ new Map(); + const operationsWithoutSecurity = []; + let eachOperationHasSecurity = true; + let path13; + return { + Root: { + leave(root, { report }) { + for (const [name, scheme] of referencedSchemes.entries()) { + if (scheme.defined) + continue; + for (const reportedFromLocation of scheme.from) { + report({ + message: `There is no \`${name}\` security scheme defined.`, + location: reportedFromLocation.key() + }); + } + } + if (root.security || eachOperationHasSecurity) { + return; + } else { + for (const operationLocation of operationsWithoutSecurity) { + report({ + message: `Every operation should have security defined on it or on the root level.`, + location: operationLocation.key() + }); + } + } + } + }, + SecurityScheme(_securityScheme, { key }) { + referencedSchemes.set(key.toString(), { defined: true, from: [] }); + }, + SecurityRequirement(requirements, { location }) { + for (const requirement of Object.keys(requirements)) { + const authScheme = referencedSchemes.get(requirement); + const requirementLocation = location.child([requirement]); + if (!authScheme) { + referencedSchemes.set(requirement, { from: [requirementLocation] }); + } else { + authScheme.from.push(requirementLocation); + } + } + }, + PathItem: { + enter(pathItem, { key }) { + path13 = key; + }, + Operation(operation, { location, key }) { + const isException = opts.exceptions?.some((item) => item.path === path13 && (!item.methods || item.methods?.some((method) => method.toLowerCase() === key))); + if (!operation?.security && !isException) { + eachOperationHasSecurity = false; + operationsWithoutSecurity.push(location); + } + } + } + }; + }; } +}); - get lineno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.lineno +// node_modules/@redocly/openapi-core/lib/rules/common/spec-strict-refs.js +var SpecStrictRefs; +var init_spec_strict_refs = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/common/spec-strict-refs.js"() { + init_ref_utils(); + SpecStrictRefs = () => { + const nodesToSkip = [ + "Schema", + "Response", + "Parameter", + "RequestBody", + "Example", + "Header", + "SecurityScheme", + "Link", + "Callback", + "PathItem" + ]; + return { + any(_node, { report, rawNode, rawLocation, type: type2 }) { + const shouldCheck = !nodesToSkip.includes(type2.name); + if (shouldCheck && isRef(rawNode)) { + report({ + message: "Field $ref is not expected here.", + location: rawLocation.child("$ref").key() + }); + } + } + }; + }; } +}); - get colno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.colno +// node_modules/@redocly/openapi-core/lib/rules/oas2/boolean-parameter-prefixes.js +var BooleanParameterPrefixes; +var init_boolean_parameter_prefixes = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas2/boolean-parameter-prefixes.js"() { + BooleanParameterPrefixes = (options2) => { + const prefixes = options2.prefixes || ["is", "has"]; + const regexp = new RegExp(`^(${prefixes.join("|")})[A-Z-_]`); + const wrappedPrefixes = prefixes.map((p2) => `\`${p2}\``); + const prefixesString = wrappedPrefixes.length === 1 ? wrappedPrefixes[0] : wrappedPrefixes.slice(0, -1).join(", ") + " or " + wrappedPrefixes[prefixes.length - 1]; + return { + Parameter(param, { report, location }) { + if (param.type === "boolean" && !regexp.test(param.name)) { + report({ + message: `Boolean parameter \`${param.name}\` should have ${prefixesString} prefix.`, + location: location.child("name") + }); + } + } + }; + }; } +}); - get error () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.error +// node_modules/@redocly/openapi-core/lib/utils/validate-mime-type.js +function validateMimeType({ type: type2, value }, { report, location }, allowedValues) { + const ruleType = type2 === "consumes" ? "request" : "response"; + if (!allowedValues) + throw new Error(`Parameter "allowedValues" is not provided for "${ruleType}-mime-type" rule`); + if (!value[type2]) + return; + for (const mime of value[type2]) { + if (!allowedValues.includes(mime)) { + report({ + message: `Mime type "${mime}" is not allowed`, + location: location.child(value[type2].indexOf(mime)).key() + }); + } } } - -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( - webidl.is.MessagePort, - '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: () => [] - } -]) - -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 -} - - -/***/ }), - -/***/ 2391: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { runtimeFeatures } = __nccwpck_require__(15072) -const { maxUnsigned16Bit, opcodes } = __nccwpck_require__(93587) - -const BUFFER_SIZE = 8 * 1024 - -let buffer = null -let bufIdx = BUFFER_SIZE - -const randomFillSync = runtimeFeatures.has('crypto') - ? (__nccwpck_require__(6005).randomFillSync) - // not full compatibility, but minimum. - : function randomFillSync (buffer, _offset, _size) { - for (let i = 0; i < buffer.length; ++i) { - buffer[i] = Math.random() * 255 | 0 +function validateMimeTypeOAS3({ type: type2, value }, { report, location }, allowedValues) { + const ruleType = type2 === "consumes" ? "request" : "response"; + if (!allowedValues) + throw new Error(`Parameter "allowedValues" is not provided for "${ruleType}-mime-type" rule`); + if (!value.content) + return; + for (const mime of Object.keys(value.content)) { + if (!allowedValues.includes(mime)) { + report({ + message: `Mime type "${mime}" is not allowed`, + location: location.child("content").child(mime).key() + }); } - return buffer - } - -function generateMask () { - if (bufIdx === BUFFER_SIZE) { - bufIdx = 0 - randomFillSync((buffer ??= Buffer.allocUnsafeSlow(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 +var init_validate_mime_type = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/validate-mime-type.js"() { } +}); - 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 +// node_modules/@redocly/openapi-core/lib/rules/oas2/request-mime-type.js +var RequestMimeType; +var init_request_mime_type = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas2/request-mime-type.js"() { + init_validate_mime_type(); + RequestMimeType = ({ allowedValues }) => { + return { + Root(root, ctx) { + validateMimeType({ type: "consumes", value: root }, ctx, allowedValues); + }, + Operation: { + leave(operation, ctx) { + validateMimeType({ type: "consumes", value: operation }, ctx, allowedValues); + } + } + }; + }; } +}); - /** - * @param {Uint8Array} buffer - */ - static createFastTextFrame (buffer) { - const maskKey = generateMask() - - const bodyLength = buffer.length - - // mask body - for (let i = 0; i < bodyLength; ++i) { - buffer[i] ^= maskKey[i & 3] - } - - let payloadLength = bodyLength - 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 head = Buffer.allocUnsafeSlow(offset) - - head[0] = 0x80 /* FIN */ | opcodes.TEXT /* opcode TEXT */ - head[1] = payloadLength | 0x80 /* MASK */ - head[offset - 4] = maskKey[0] - head[offset - 3] = maskKey[1] - head[offset - 2] = maskKey[2] - head[offset - 1] = maskKey[3] +// node_modules/@redocly/openapi-core/lib/rules/oas2/response-contains-property.js +var ResponseContainsProperty; +var init_response_contains_property = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas2/response-contains-property.js"() { + init_get_matching_status_code_range(); + ResponseContainsProperty = (options2) => { + const names = options2.names || {}; + let key; + return { + Operation: { + Response: { + skip: (_response, key2) => { + return `${key2}` === "204"; + }, + enter: (_response, ctx) => { + key = ctx.key; + }, + Schema(schema2, { report, location }) { + if (schema2.type !== "object") + return; + const expectedProperties = names[key] || names[getMatchingStatusCodeRange(key)] || names[getMatchingStatusCodeRange(key).toLowerCase()] || []; + for (const expectedProperty of expectedProperties) { + if (!schema2.properties?.[expectedProperty]) { + report({ + message: `Response object must contain a top-level "${expectedProperty}" property.`, + location: location.child("properties").key() + }); + } + } + } + } + } + }; + }; + } +}); - if (payloadLength === 126) { - head.writeUInt16BE(bodyLength, 2) - } else if (payloadLength === 127) { - head[2] = head[3] = 0 - head.writeUIntBE(bodyLength, 4, 6) - } +// node_modules/@redocly/openapi-core/lib/rules/oas2/response-mime-type.js +var ResponseMimeType; +var init_response_mime_type = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas2/response-mime-type.js"() { + init_validate_mime_type(); + ResponseMimeType = ({ allowedValues }) => { + return { + Root(root, ctx) { + validateMimeType({ type: "produces", value: root }, ctx, allowedValues); + }, + Operation: { + leave(operation, ctx) { + validateMimeType({ type: "produces", value: operation }, ctx, allowedValues); + } + } + }; + }; + } +}); - return [head, buffer] +// node_modules/@redocly/openapi-core/lib/rules/oas2/index.js +var rules4, preprocessors4; +var init_oas23 = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas2/index.js"() { + init_assertions(); + init_info_contact(); + init_info_license_strict(); + init_info_license(); + init_no_ambiguous_paths(); + init_no_duplicated_tag_names(); + init_no_enum_type_mismatch(); + init_no_http_verbs_in_paths(); + init_no_identical_paths(); + init_no_invalid_parameter_examples(); + init_no_invalid_schema_examples(); + init_no_path_trailing_slash(); + init_no_required_schema_properties_undefined(); + init_no_schema_type_mismatch(); + init_no_unresolved_refs(); + init_operation_2xx_response(); + init_operation_4xx_response(); + init_operation_description(); + init_operation_operationId_unique(); + init_operation_operationId_url_safe(); + init_operation_operationId(); + init_operation_parameters_unique(); + init_operation_singular_tag(); + init_operation_summary(); + init_operation_tag_defined(); + init_parameter_description(); + init_path_declaration_must_exist(); + init_path_http_verbs_order(); + init_path_not_include_query(); + init_path_params_defined(); + init_path_segment_plural(); + init_paths_kebab_case(); + init_required_string_property_missing_min_length(); + init_response_contains_header(); + init_scalar_property_missing_example(); + init_security_defined(); + init_spec_strict_refs(); + init_struct(); + init_tag_description(); + init_tags_alphabetical(); + init_boolean_parameter_prefixes(); + init_request_mime_type(); + init_response_contains_property(); + init_response_mime_type(); + rules4 = { + struct: Struct, + "no-invalid-schema-examples": NoInvalidSchemaExamples, + "no-invalid-parameter-examples": NoInvalidParameterExamples, + "info-contact": InfoContact, + "info-license": InfoLicense, + "info-license-strict": InfoLicenseStrict, + "tag-description": TagDescription, + "tags-alphabetical": TagsAlphabetical, + "paths-kebab-case": PathsKebabCase, + "no-enum-type-mismatch": NoEnumTypeMismatch, + "boolean-parameter-prefixes": BooleanParameterPrefixes, + "no-path-trailing-slash": NoPathTrailingSlash, + "operation-2xx-response": Operation2xxResponse, + "operation-4xx-response": Operation4xxResponse, + assertions: Assertions2, + "operation-operationId-unique": OperationIdUnique, + "operation-parameters-unique": OperationParametersUnique, + "path-parameters-defined": PathParamsDefined, + "operation-tag-defined": OperationTagDefined, + "path-declaration-must-exist": PathDeclarationMustExist, + "operation-operationId-url-safe": OperationIdUrlSafe, + "operation-operationId": OperationOperationId, + "operation-summary": OperationSummary, + "operation-description": OperationDescription, + "path-not-include-query": PathNotIncludeQuery, + "path-params-defined": PathParamsDefined, + "parameter-description": ParameterDescription, + "operation-singular-tag": OperationSingularTag, + "security-defined": SecurityDefined, + "no-unresolved-refs": NoUnresolvedRefs, + "no-identical-paths": NoIdenticalPaths, + "no-ambiguous-paths": NoAmbiguousPaths, + "path-http-verbs-order": PathHttpVerbsOrder, + "no-http-verbs-in-paths": NoHttpVerbsInPaths, + "request-mime-type": RequestMimeType, + "response-mime-type": ResponseMimeType, + "path-segment-plural": PathSegmentPlural, + "response-contains-header": ResponseContainsHeader, + "response-contains-property": ResponseContainsProperty, + "scalar-property-missing-example": ScalarPropertyMissingExample, + "required-string-property-missing-min-length": RequiredStringPropertyMissingMinLength, + "spec-strict-refs": SpecStrictRefs, + "no-required-schema-properties-undefined": NoRequiredSchemaPropertiesUndefined, + "no-schema-type-mismatch": NoSchemaTypeMismatch, + "no-duplicated-tag-names": NoDuplicatedTagNames + }; + preprocessors4 = {}; } -} +}); -module.exports = { - WebsocketFrameSend, - generateMask // for benchmark +// node_modules/@redocly/openapi-core/lib/rules/oas3/array-parameter-serialization.js +function shouldReportMissingStyleAndExplode(node, schema2, options2) { + return (schema2.type === "array" || schema2.items || schema2.prefixItems) && (node.style === void 0 || node.explode === void 0) && (!options2.in || node.in && options2.in?.includes(node.in)); } - - -/***/ }), - -/***/ 68236: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __nccwpck_require__(65628) -const { isValidClientWindowBits } = __nccwpck_require__(89902) -const { MessageSizeExceededError } = __nccwpck_require__(48045) - -const tail = Buffer.from([0x00, 0x00, 0xff, 0xff]) -const kBuffer = Symbol('kBuffer') -const kLength = Symbol('kLength') - -// Default maximum decompressed message size: 4 MB -const kDefaultMaxDecompressedSize = 4 * 1024 * 1024 - -class PerMessageDeflate { - /** @type {import('node:zlib').InflateRaw} */ - #inflate - - #options = {} - - /** @type {boolean} */ - #aborted = false - - /** @type {Function|null} */ - #currentCallback = null - - /** - * @param {Map} extensions - */ - constructor (extensions) { - this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover') - this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits') +var ArrayParameterSerialization; +var init_array_parameter_serialization = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/array-parameter-serialization.js"() { + init_ref_utils(); + ArrayParameterSerialization = (options2) => { + return { + Parameter: { + leave(node, ctx) { + if (!node.schema) { + return; + } + const schema2 = isRef(node.schema) ? ctx.resolve(node.schema).node : node.schema; + if (schema2 && shouldReportMissingStyleAndExplode(node, schema2, options2)) { + ctx.report({ + message: `Parameter \`${node.name}\` should have \`style\` and \`explode \` fields`, + location: ctx.location + }); + } + } + } + }; + }; } +}); - 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.#aborted) { - callback(new MessageSizeExceededError()) - return - } - - 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 +// node_modules/@redocly/openapi-core/lib/rules/oas3/boolean-parameter-prefixes.js +var BooleanParameterPrefixes2; +var init_boolean_parameter_prefixes2 = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/boolean-parameter-prefixes.js"() { + BooleanParameterPrefixes2 = (options2) => { + const prefixes = options2.prefixes || ["is", "has"]; + const regexp = new RegExp(`^(${prefixes.join("|")})[A-Z-_]`); + const wrappedPrefixes = prefixes.map((p2) => `\`${p2}\``); + const prefixesString = wrappedPrefixes.length === 1 ? wrappedPrefixes[0] : wrappedPrefixes.slice(0, -1).join(", ") + " or " + wrappedPrefixes[prefixes.length - 1]; + return { + Parameter: { + Schema(schema2, { report, parentLocations }, parents) { + if (schema2.type === "boolean" && !regexp.test(parents.Parameter.name)) { + report({ + message: `Boolean parameter \`${parents.Parameter.name}\` should have ${prefixesString} prefix.`, + location: parentLocations.Parameter.child(["name"]) + }); + } + } } + }; + }; + } +}); - windowBits = Number.parseInt(this.#options.serverMaxWindowBits) +// node_modules/@redocly/openapi-core/lib/rules/oas3/component-name-unique.js +function getOptionComponentNameForTypeName(typeName) { + return TYPE_NAME_TO_OPTION_COMPONENT_NAME[typeName] ?? null; +} +function getKeyForComponent(typeName, componentName) { + return `${typeName}/${componentName}`; +} +function getComponentFromKey(key) { + const [typeName, componentName] = key.split("/"); + return { typeName, componentName }; +} +var TYPE_NAME_SCHEMA, TYPE_NAME_PARAMETER, TYPE_NAME_RESPONSE, TYPE_NAME_REQUEST_BODY, TYPE_NAME_TO_OPTION_COMPONENT_NAME, ComponentNameUnique; +var init_component_name_unique = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/component-name-unique.js"() { + TYPE_NAME_SCHEMA = "Schema"; + TYPE_NAME_PARAMETER = "Parameter"; + TYPE_NAME_RESPONSE = "Response"; + TYPE_NAME_REQUEST_BODY = "RequestBody"; + TYPE_NAME_TO_OPTION_COMPONENT_NAME = { + [TYPE_NAME_SCHEMA]: "schemas", + [TYPE_NAME_PARAMETER]: "parameters", + [TYPE_NAME_RESPONSE]: "responses", + [TYPE_NAME_REQUEST_BODY]: "requestBodies" + }; + ComponentNameUnique = (options2) => { + const components = /* @__PURE__ */ new Map(); + const typeNames = []; + if (options2.schemas !== "off") { + typeNames.push(TYPE_NAME_SCHEMA); } - - try { - this.#inflate = createInflateRaw({ windowBits }) - } catch (err) { - callback(err) - return + if (options2.parameters !== "off") { + typeNames.push(TYPE_NAME_PARAMETER); } - this.#inflate[kBuffer] = [] - this.#inflate[kLength] = 0 - - this.#inflate.on('data', (data) => { - if (this.#aborted) { - return + if (options2.responses !== "off") { + typeNames.push(TYPE_NAME_RESPONSE); + } + if (options2.requestBodies !== "off") { + typeNames.push(TYPE_NAME_REQUEST_BODY); + } + const rule = { + ref: { + leave(ref, { type: type2, resolve: resolve8 }) { + const typeName = type2.name; + if (typeNames.includes(typeName)) { + const resolvedRef = resolve8(ref); + if (!resolvedRef.location) + return; + addComponentFromAbsoluteLocation(typeName, resolvedRef.location); + } + } + }, + Root: { + leave(root, ctx) { + components.forEach((value, key, _5) => { + if (value.absolutePointers.size > 1) { + const component = getComponentFromKey(key); + const optionComponentName = getOptionComponentNameForTypeName(component.typeName); + const componentSeverity = optionComponentName ? options2[optionComponentName] : null; + for (const location of value.locations) { + const definitions = Array.from(value.absolutePointers).filter((v3) => v3 !== location.absolutePointer.toString()).map((v3) => `- ${v3}`).join("\n"); + const problem = { + message: `Component '${optionComponentName}/${component.componentName}' is not unique. It is also defined at: +${definitions}`, + location + }; + if (componentSeverity) { + problem.forceSeverity = componentSeverity; + } + ctx.report(problem); + } + } + }); + } } - - this.#inflate[kLength] += data.length - - if (this.#inflate[kLength] > kDefaultMaxDecompressedSize) { - this.#aborted = true - this.#inflate.removeAllListeners() - this.#inflate.destroy() - this.#inflate = null - - if (this.#currentCallback) { - const cb = this.#currentCallback - this.#currentCallback = null - cb(new MessageSizeExceededError()) + }; + if (options2.schemas != "off") { + rule.NamedSchemas = { + Schema(_5, { location }) { + addComponentFromAbsoluteLocation(TYPE_NAME_SCHEMA, location); + } + }; + } + if (options2.responses != "off") { + rule.NamedResponses = { + Response(_5, { location }) { + addComponentFromAbsoluteLocation(TYPE_NAME_RESPONSE, location); + } + }; + } + if (options2.parameters != "off") { + rule.NamedParameters = { + Parameter(_5, { location }) { + addComponentFromAbsoluteLocation(TYPE_NAME_PARAMETER, location); + } + }; + } + if (options2.requestBodies != "off") { + rule.NamedRequestBodies = { + RequestBody(_5, { location }) { + addComponentFromAbsoluteLocation(TYPE_NAME_REQUEST_BODY, location); } - return + }; + } + return rule; + function getComponentNameFromAbsoluteLocation(absoluteLocation) { + const componentName = absoluteLocation.split("/").slice(-1)[0]; + if (componentName.endsWith(".yml") || componentName.endsWith(".yaml") || componentName.endsWith(".json")) { + return componentName.slice(0, componentName.lastIndexOf(".")); } - - this.#inflate[kBuffer].push(data) - }) - - this.#inflate.on('error', (err) => { - this.#inflate = null - callback(err) - }) - } - - this.#currentCallback = callback - this.#inflate.write(chunk) - if (fin) { - this.#inflate.write(tail) - } - - this.#inflate.flush(() => { - if (this.#aborted || !this.#inflate) { - return + return componentName; + } + function addFoundComponent(typeName, componentName, location) { + const key = getKeyForComponent(typeName, componentName); + const entry = components.get(key) ?? { + absolutePointers: /* @__PURE__ */ new Set(), + locations: [] + }; + const absoluteLocation = location.absolutePointer.toString(); + if (!entry.absolutePointers.has(absoluteLocation)) { + entry.absolutePointers.add(absoluteLocation); + entry.locations.push(location); + } + components.set(key, entry); } - - const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]) - - this.#inflate[kBuffer].length = 0 - this.#inflate[kLength] = 0 - this.#currentCallback = null - - callback(null, full) - }) - } -} - -module.exports = { PerMessageDeflate } - - -/***/ }), - -/***/ 85442: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { Writable } = __nccwpck_require__(84492) -const assert = __nccwpck_require__(98061) -const { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = __nccwpck_require__(93587) -const { - isValidStatusCode, - isValidOpcode, - websocketMessageReceived, - utf8Decode, - isControlFrame, - isTextBinaryFrame, - isContinuationFrame -} = __nccwpck_require__(89902) -const { failWebsocketConnection } = __nccwpck_require__(88380) -const { WebsocketFrameSend } = __nccwpck_require__(2391) -const { PerMessageDeflate } = __nccwpck_require__(68236) -const { MessageSizeExceededError } = __nccwpck_require__(48045) - -// 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 {import('./websocket').Handler} */ - #handler - - /** - * @param {import('./websocket').Handler} handler - * @param {Map|null} extensions - */ - constructor (handler, extensions) { - super() - - this.#handler = handler - this.#extensions = extensions == null ? new Map() : extensions - - if (this.#extensions.has('permessage-deflate')) { - this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions)) - } - } - - /** - * @param {Buffer} chunk - * @param {() => void} callback - */ - _write (chunk, _, callback) { - this.#buffers.push(chunk) - this.#byteOffset += chunk.length - this.#loop = true - - this.run(callback) + function addComponentFromAbsoluteLocation(typeName, location) { + const componentName = getComponentNameFromAbsoluteLocation(location.absolutePointer.toString()); + addFoundComponent(typeName, componentName, location); + } + }; } +}); - /** - * 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() +// node_modules/@redocly/openapi-core/lib/rules/oas3/no-empty-servers.js +var NoEmptyServers; +var init_no_empty_servers = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/no-empty-servers.js"() { + NoEmptyServers = () => { + return { + Root(root, { report, location }) { + if (!root.hasOwnProperty("servers")) { + report({ + message: "Servers must be present.", + location: location.child(["openapi"]).key() + }); + return; + } + if (!Array.isArray(root.servers) || root.servers.length === 0) { + report({ + message: "Servers must be a non-empty array.", + location: location.child(["servers"]).key() + }); + } } + }; + }; + } +}); - 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.#handler, 1002, 'Invalid opcode received') - return callback() +// node_modules/@redocly/openapi-core/lib/rules/oas3/no-example-value-and-externalValue.js +var NoExampleValueAndExternalValue; +var init_no_example_value_and_externalValue = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/no-example-value-and-externalValue.js"() { + NoExampleValueAndExternalValue = () => { + return { + Example(example, { report, location }) { + if (example.value && example.externalValue) { + report({ + message: "Example object can have either `value` or `externalValue` fields.", + location: location.child(["value"]).key() + }); + } } + }; + }; + } +}); - if (masked) { - failWebsocketConnection(this.#handler, 1002, 'Frame cannot be masked') - return callback() +// node_modules/@redocly/openapi-core/lib/rules/oas3/no-invalid-media-type-examples.js +var ValidContentExamples; +var init_no_invalid_media_type_examples = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/no-invalid-media-type-examples.js"() { + init_ref_utils(); + init_is_defined(); + init_is_plain_object(); + init_utils2(); + ValidContentExamples = (opts) => { + const skip = (mediaType) => { + return mediaType.schema === void 0; + }; + const leave = (context2) => (mediaType, ctx) => { + const { location, resolve: resolve8 } = ctx; + if (isDefined(mediaType.example)) { + resolveAndValidateExample(mediaType.example, location.child("example")); + } else if (isPlainObject(mediaType.examples)) { + for (const exampleName of Object.keys(mediaType.examples)) { + resolveAndValidateExample(mediaType.examples[exampleName], location.child(["examples", exampleName, "value"]), true); + } } - - // 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.#handler, 1002, 'Expected RSV1 to be clear.') - return + function resolveAndValidateExample(example, location2, isMultiple) { + if (isRef(example)) { + const resolved = resolve8(example); + if (!resolved.location) + return; + location2 = isMultiple ? resolved.location.child("value") : resolved.location; + example = resolved.node; + } + if (isMultiple && typeof example?.value === "undefined") { + return; + } + validateExample(isMultiple ? example.value : example, mediaType.schema, { + location: location2, + ctx, + allowAdditionalProperties: !!opts.allowAdditionalProperties, + ajvContext: context2 + }); } - - if (rsv2 !== 0 || rsv3 !== 0) { - failWebsocketConnection(this.#handler, 1002, 'RSV1, RSV2, RSV3 must be clear') - return + }; + return { + Parameter: { + MediaType: { + skip, + leave: leave({ apiContext: "request" }) + } + }, + RequestBody: { + MediaType: { + skip, + leave: leave({ apiContext: "request" }) + } + }, + Response: { + MediaType: { + skip, + leave: leave({ apiContext: "response" }) + } } + }; + }; + } +}); - if (fragmented && !isTextBinaryFrame(opcode)) { - // Only text and binary frames can be fragmented - failWebsocketConnection(this.#handler, 1002, 'Invalid frame type was fragmented.') - return +// node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-example.com.js +var NoServerExample; +var init_no_server_example_com = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-example.com.js"() { + NoServerExample = () => { + return { + Server(server, { report, location }) { + const pattern = /^(.*[\/.])?(example\.com|localhost)([\/:?].*|$)/; + if (server.url && pattern.test(server.url)) { + report({ + message: "Server `url` should not point to example.com or localhost.", + location: location.child(["url"]) + }); + } } + }; + }; + } +}); - // 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.#handler, 1002, 'Expected continuation frame') - return +// node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-trailing-slash.js +var NoServerTrailingSlash; +var init_no_server_trailing_slash = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-trailing-slash.js"() { + NoServerTrailingSlash = () => { + return { + Server(server, { report, location }) { + if (!server.url) + return; + if (server.url.endsWith("/") && server.url !== "/") { + report({ + message: "Server `url` should not have a trailing slash.", + location: location.child(["url"]) + }); + } } + }; + }; + } +}); - if (this.#info.fragmented && fragmented) { - // A fragmented frame can't be fragmented itself - failWebsocketConnection(this.#handler, 1002, 'Fragmented frame exceeded 125 bytes.') - return +// node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-variables-empty-enum.js +function checkEnumVariables(server) { + if (server.variables && Object.keys(server.variables).length === 0) + return; + const errors = []; + for (const variable in server.variables) { + const serverVariable = server.variables[variable]; + if (!serverVariable.enum) + continue; + if (Array.isArray(serverVariable.enum) && serverVariable.enum?.length === 0) + errors.push("empty"); + if (!serverVariable.default) + continue; + const defaultValue = server.variables[variable].default; + if (serverVariable.enum && !serverVariable.enum.includes(defaultValue)) + errors.push("invalidDefaultValue"); + } + if (errors.length) + return errors; + return; +} +var NoServerVariablesEmptyEnum; +var init_no_server_variables_empty_enum = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-variables-empty-enum.js"() { + NoServerVariablesEmptyEnum = () => { + return { + Root(root, { report, location }) { + if (!root.servers || root.servers.length === 0) + return; + const invalidVariables = []; + if (Array.isArray(root.servers)) { + for (const server of root.servers) { + const enumErrors = checkEnumVariables(server); + if (!enumErrors) + continue; + invalidVariables.push(...enumErrors); + } + } else { + const enumErrors = checkEnumVariables(root.servers); + if (!enumErrors) + return; + invalidVariables.push(...enumErrors); + } + for (const invalidVariable of invalidVariables) { + if (invalidVariable === "empty") { + report({ + message: "Server variable with `enum` must be a non-empty array.", + location: location.child(["servers"]).key() + }); + } + if (invalidVariable === "invalidDefaultValue") { + report({ + message: "Server variable define `enum` and `default`. `enum` must include default value", + location: location.child(["servers"]).key() + }); + } + } } + }; + }; + } +}); - // "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.#handler, 1002, 'Control frame either too large or fragmented') - return +// node_modules/@redocly/openapi-core/lib/rules/oas3/no-undefined-server-variable.js +var NoUndefinedServerVariable; +var init_no_undefined_server_variable = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/no-undefined-server-variable.js"() { + NoUndefinedServerVariable = () => { + return { + Server(server, { report, location }) { + if (!server?.url) + return; + const urlVariables = server.url.match(/{[^}]+}/g)?.map((e2) => e2.slice(1, e2.length - 1)) || []; + const definedVariables = server?.variables && Object.keys(server.variables) || []; + for (const serverVar of urlVariables) { + if (!definedVariables.includes(serverVar)) { + report({ + message: `The \`${serverVar}\` variable is not defined in the \`variables\` objects.`, + location: location.child(["url"]) + }); + } + } + for (const definedServerVar of definedVariables) { + if (!urlVariables.includes(definedServerVar)) { + report({ + message: `The \`${definedServerVar}\` variable is not used in the server's \`url\` field.`, + location: location.child(["variables", definedServerVar]).key(), + from: location.child("url") + }); + } + } } + }; + }; + } +}); - if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { - failWebsocketConnection(this.#handler, 1002, 'Unexpected continuation frame') - return +// node_modules/@redocly/openapi-core/lib/rules/oas3/no-unused-components.js +var NoUnusedComponents; +var init_no_unused_components = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/no-unused-components.js"() { + init_ref_utils(); + NoUnusedComponents = () => { + const components = /* @__PURE__ */ new Map(); + function registerComponent(location, name, referencesDiscriminator = false) { + components.set(location.absolutePointer, { + used: components.get(location.absolutePointer)?.used || false, + referencesDiscriminator, + location, + name + }); + } + return { + ref(ref, { type: type2, resolve: resolve8, key, location }) { + if ([ + "Schema", + "Header", + "Parameter", + "Response", + "Example", + "RequestBody", + "MediaTypesMap" + ].includes(type2.name)) { + const resolvedRef = resolve8(ref); + if (!resolvedRef.location) + return; + components.set(resolvedRef.location.absolutePointer, { + used: true, + name: key.toString(), + location + }); + } + }, + Root: { + leave(_5, { report }) { + components.forEach((usageInfo) => { + if (!usageInfo.used && !usageInfo.referencesDiscriminator) { + report({ + message: `Component: "${usageInfo.name}" is never used.`, + location: usageInfo.location.key(), + reference: "https://redocly.com/docs/cli/rules/oas/no-unused-components" + }); + } + }); + } + }, + NamedSchemas: { + Schema(schema2, { location, key, resolve: resolve8 }) { + const referencesDiscriminator = schema2.allOf?.some((ref) => isRef(ref) && resolve8(ref)?.node?.discriminator); + registerComponent(location, key.toString(), referencesDiscriminator); + } + }, + NamedParameters: { + Parameter(_parameter, { location, key }) { + registerComponent(location, key.toString()); + } + }, + NamedResponses: { + Response(_response, { location, key }) { + registerComponent(location, key.toString()); + } + }, + NamedExamples: { + Example(_example, { location, key }) { + registerComponent(location, key.toString()); + } + }, + NamedRequestBodies: { + RequestBody(_requestBody, { location, key }) { + registerComponent(location, key.toString()); + } + }, + NamedHeaders: { + Header(_header, { location, key }) { + registerComponent(location, key.toString()); + } + }, + NamedMediaTypes: { + MediaTypesMap(_mediaTypesMap, { location, key }) { + registerComponent(location, key.toString()); + } } + }; + }; + } +}); - if (payloadLength <= 125) { - this.#info.payloadLength = payloadLength - this.#state = parserStates.READ_DATA - } else if (payloadLength === 126) { - this.#state = parserStates.PAYLOADLENGTH_16 - } else if (payloadLength === 127) { - this.#state = parserStates.PAYLOADLENGTH_64 +// node_modules/@redocly/openapi-core/lib/rules/oas3/nullable-type-sibling.js +var NullableTypeSibling; +var init_nullable_type_sibling = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/nullable-type-sibling.js"() { + NullableTypeSibling = () => { + return { + Schema: { + leave(schema2, ctx) { + if ("nullable" in schema2 && !("type" in schema2)) { + ctx.report({ + message: `The \`type\` field must be defined when the \`nullable\` field is used.`, + location: ctx.location.child(["nullable"]) + }); + } + } } + }; + }; + } +}); - if (isTextBinaryFrame(opcode)) { - this.#info.binaryType = opcode - this.#info.compressed = rsv1 !== 0 +// node_modules/@redocly/openapi-core/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js +var Operation4xxProblemDetailsRfc7807; +var init_operation_4xx_problem_details_rfc7807 = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js"() { + init_utils2(); + Operation4xxProblemDetailsRfc7807 = () => { + return { + Response: { + skip(_5, key) { + return !/4[Xx0-9]{2}/.test(`${key}`); + }, + enter(response, { report, location }) { + if (!response.content || !response.content["application/problem+json"]) + report({ + message: "Response `4xx` must have content-type `application/problem+json`.", + location: location.key() + }); + }, + MediaType: { + skip(_5, key) { + return key !== "application/problem+json"; + }, + enter(media, ctx) { + validateDefinedAndNonEmpty("schema", media, ctx); + }, + SchemaProperties(schema2, ctx) { + validateDefinedAndNonEmpty("type", schema2, ctx); + validateDefinedAndNonEmpty("title", schema2, ctx); + } + } } + }; + }; + } +}); - 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() +// node_modules/@redocly/openapi-core/lib/rules/oas3/request-mime-type.js +var RequestMimeType2; +var init_request_mime_type2 = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/request-mime-type.js"() { + init_validate_mime_type(); + RequestMimeType2 = ({ allowedValues }) => { + return { + Paths: { + RequestBody: { + leave(requestBody, ctx) { + validateMimeTypeOAS3({ type: "consumes", value: requestBody }, ctx, allowedValues); + } + }, + Callback: { + RequestBody() { + }, + Response: { + leave(response, ctx) { + validateMimeTypeOAS3({ type: "consumes", value: response }, ctx, allowedValues); + } + } + } + }, + WebhooksMap: { + Response: { + leave(response, ctx) { + validateMimeTypeOAS3({ type: "consumes", value: response }, ctx, allowedValues); + } + } } + }; + }; + } +}); - const buffer = this.consume(2) - - this.#info.payloadLength = buffer.readUInt16BE(0) - this.#state = parserStates.READ_DATA - } else if (this.#state === parserStates.PAYLOADLENGTH_64) { - if (this.#byteOffset < 8) { - return callback() +// node_modules/@redocly/openapi-core/lib/rules/oas3/response-contains-property.js +var ResponseContainsProperty2; +var init_response_contains_property2 = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/response-contains-property.js"() { + init_get_matching_status_code_range(); + ResponseContainsProperty2 = (options2) => { + const names = options2.names || {}; + let key; + return { + Operation: { + Response: { + skip: (_response, key2) => { + return `${key2}` === "204"; + }, + enter: (_response, ctx) => { + key = ctx.key; + }, + MediaType: { + Schema(schema2, { report, location }) { + if (schema2.type !== "object") + return; + const expectedProperties = names[key] || names[getMatchingStatusCodeRange(key)] || names[getMatchingStatusCodeRange(key).toLowerCase()] || []; + for (const expectedProperty of expectedProperties) { + if (!schema2.properties?.[expectedProperty]) { + report({ + message: `Response object must contain a top-level "${expectedProperty}" property.`, + location: location.child("properties").key() + }); + } + } + } + } + } } + }; + }; + } +}); - 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.#handler, 1009, 'Received payload length > 2^31 bytes.') - return +// node_modules/@redocly/openapi-core/lib/rules/oas3/response-mime-type.js +var ResponseMimeType2; +var init_response_mime_type2 = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/response-mime-type.js"() { + init_validate_mime_type(); + ResponseMimeType2 = ({ allowedValues }) => { + return { + Paths: { + Response: { + leave(response, ctx) { + validateMimeTypeOAS3({ type: "produces", value: response }, ctx, allowedValues); + } + }, + Callback: { + Response() { + }, + RequestBody: { + leave(requestBody, ctx) { + validateMimeTypeOAS3({ type: "produces", value: requestBody }, ctx, allowedValues); + } + } + } + }, + WebhooksMap: { + RequestBody: { + leave(requestBody, ctx) { + validateMimeTypeOAS3({ type: "produces", value: requestBody }, ctx, allowedValues); + } + } } + }; + }; + } +}); - this.#info.payloadLength = lower - this.#state = parserStates.READ_DATA - } else if (this.#state === parserStates.READ_DATA) { - if (this.#byteOffset < this.#info.payloadLength) { - return callback() +// node_modules/@redocly/openapi-core/lib/rules/oas3/spec-components-invalid-map-name.js +var SpecComponentsInvalidMapName; +var init_spec_components_invalid_map_name = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/spec-components-invalid-map-name.js"() { + SpecComponentsInvalidMapName = () => { + const KEYS_REGEX = "^[a-zA-Z0-9\\.\\-_]+$"; + function validateKey(key, report, location, component) { + if (!new RegExp(KEYS_REGEX).test(key)) { + report({ + message: `The map key in ${component} "${key}" does not match the regular expression "${KEYS_REGEX}"`, + location: location.key() + }); } + } + return { + NamedSchemas: { + Schema(_node, { key, report, location }) { + validateKey(key, report, location, "schemas"); + } + }, + NamedParameters: { + Parameter(_node, { key, report, location }) { + validateKey(key, report, location, "parameters"); + } + }, + NamedResponses: { + Response(_node, { key, report, location }) { + validateKey(key, report, location, "responses"); + } + }, + NamedExamples: { + Example(_node, { key, report, location }) { + validateKey(key, report, location, "examples"); + } + }, + NamedRequestBodies: { + RequestBody(_node, { key, report, location }) { + validateKey(key, report, location, "requestBodies"); + } + }, + NamedHeaders: { + Header(_node, { key, report, location }) { + validateKey(key, report, location, "headers"); + } + }, + NamedSecuritySchemes: { + SecurityScheme(_node, { key, report, location }) { + validateKey(key, report, location, "securitySchemes"); + } + }, + NamedLinks: { + Link(_node, { key, report, location }) { + validateKey(key, report, location, "links"); + } + }, + NamedCallbacks: { + Callback(_node, { key, report, location }) { + validateKey(key, report, location, "callbacks"); + } + } + }; + }; + } +}); - 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 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.#handler, this.#info.binaryType, this.consumeFragments()) - } - - this.#state = parserStates.INFO - } else { - this.#extensions.get('permessage-deflate').decompress(body, this.#info.fin, (error, data) => { - if (error) { - // Use 1009 (Message Too Big) for decompression size limit errors - const code = error instanceof MessageSizeExceededError ? 1009 : 1007 - failWebsocketConnection(this.#handler, code, error.message) - return +// node_modules/@redocly/openapi-core/lib/rules/oas3/spec-discriminator-defaultMapping.js +var SpecDiscriminatorDefaultMapping; +var init_spec_discriminator_defaultMapping = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/spec-discriminator-defaultMapping.js"() { + init_utils2(); + SpecDiscriminatorDefaultMapping = () => { + let componentsSchemaNames = []; + return { + Root: { + enter(root) { + componentsSchemaNames = Object.keys(root.components?.schemas || {}); + } + }, + Schema: { + leave(schema2, ctx) { + const discriminatedPropertyName = schema2.discriminator?.propertyName; + if (!discriminatedPropertyName) + return; + const defaultMapping = schema2.discriminator?.defaultMapping; + if (defaultMapping === void 0) { + const visited = /* @__PURE__ */ new Set(); + const isDiscriminatorPropertyRequired = (schemaOrRef, resolveFrom) => { + const resolved = resolveSchema(schemaOrRef, ctx, resolveFrom); + if (!resolved.schema || visited.has(resolved.schema)) { + return true; + } + visited.add(resolved.schema); + if (resolved.schema.required?.includes(discriminatedPropertyName) || resolved.schema.allOf?.some((s2) => isDiscriminatorPropertyRequired(s2, resolved.location)) || resolved.schema.oneOf?.every((s2) => isDiscriminatorPropertyRequired(s2, resolved.location)) || resolved.schema.anyOf?.every((s2) => isDiscriminatorPropertyRequired(s2, resolved.location))) { + return true; + } + return false; + }; + if (!isDiscriminatorPropertyRequired(schema2)) { + ctx.report({ + message: `Discriminator with optional property '${discriminatedPropertyName}' must include a defaultMapping field.`, + location: ctx.location.child("discriminator") + }); } - - this.writeFragments(data) - - if (!this.#info.fin) { - this.#state = parserStates.INFO - this.#loop = true - this.run(callback) - return + } else { + if (ctx.resolve({ $ref: defaultMapping }).node === void 0 && !componentsSchemaNames.includes(defaultMapping)) { + ctx.report({ + message: `defaultMapping value '${defaultMapping}' does not point to an existing schema component.`, + location: ctx.location.child(["discriminator", "defaultMapping"]) + }); } - - websocketMessageReceived(this.#handler, 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 - } - - this.#byteOffset -= n - - const first = this.#buffers[0] - - if (first.length > n) { - // replace with remaining buffer - this.#buffers[0] = first.subarray(n, first.length) - return first.subarray(0, n) - } else if (first.length === n) { - // prefect match - return this.#buffers.shift() - } else { - let offset = 0 - // If Buffer.allocUnsafe is used, extra copies will be made because the offset is non-zero. - const buffer = Buffer.allocUnsafeSlow(n) - while (offset !== n) { - const next = this.#buffers[0] - const length = next.length - - 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 += length +// node_modules/@redocly/openapi-core/lib/rules/oas3/spec-example-values.js +var SpecExampleValues; +var init_spec_example_values = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/spec-example-values.js"() { + SpecExampleValues = () => { + return { + Example({ value, externalValue, dataValue, serializedValue }, { report, location }) { + if (value !== void 0 && externalValue !== void 0) { + report({ + message: "The 'value' and 'externalValue' fields of an example object are mutually exclusive.", + location + }); + } + if (serializedValue !== void 0 && externalValue !== void 0) { + report({ + message: "The 'serializedValue' and 'externalValue' fields of an example object are mutually exclusive.", + location + }); + } + if (value !== void 0 && dataValue !== void 0) { + report({ + message: "The 'value' filed must be absent if 'dataValue' is present in an example object.", + location: location.child("value").key() + }); + } + if (value !== void 0 && serializedValue !== void 0) { + report({ + message: "The 'value' filed must be absent if 'serializedValue' is present in an example object.", + location: location.child("value").key() + }); + } } - } - - return buffer - } + }; + }; } +}); - writeFragments (fragment) { - this.#fragmentsBytes += fragment.length - this.#fragments.push(fragment) +// node_modules/@redocly/openapi-core/lib/rules/oas3/spec-no-invalid-encoding-combinations.js +var SpecNoInvalidEncodingCombinations; +var init_spec_no_invalid_encoding_combinations = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/spec-no-invalid-encoding-combinations.js"() { + SpecNoInvalidEncodingCombinations = () => { + return { + MediaType: { + leave(mediaType, ctx) { + if ("prefixEncoding" in mediaType && "encoding" in mediaType || "itemEncoding" in mediaType && "encoding" in mediaType) { + ctx.report({ + message: "The 'encoding' field cannot be used together with 'prefixEncoding' or 'itemEncoding'.", + location: ctx.location.child("encoding").key() + }); + } + } + } + }; + }; } +}); - consumeFragments () { - const fragments = this.#fragments - - if (fragments.length === 1) { - // single fragment - this.#fragmentsBytes = 0 - return fragments.shift() - } - - let offset = 0 - // If Buffer.allocUnsafe is used, extra copies will be made because the offset is non-zero. - const output = Buffer.allocUnsafeSlow(this.#fragmentsBytes) - - for (let i = 0; i < fragments.length; ++i) { - const buffer = fragments[i] - output.set(buffer, offset) - offset += buffer.length - } - - this.#fragments = [] - this.#fragmentsBytes = 0 - - return output +// node_modules/@redocly/openapi-core/lib/rules/oas3/spec-no-invalid-tag-parents.js +var SpecNoInvalidTagParents; +var init_spec_no_invalid_tag_parents = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/spec-no-invalid-tag-parents.js"() { + SpecNoInvalidTagParents = () => { + let tags; + return { + Root: { + enter(root) { + tags = root.tags ?? []; + } + }, + Tag: { + leave(tag, { report, location }) { + if (tag?.parent === void 0) { + return; + } + if (!tags.find((t2) => t2.name === tag.parent)) { + report({ + message: `Tag parent '${tag.parent}' is not defined in the API description.`, + location: location.child("parent") + }); + return; + } + const visited = new Set(tag.name); + let currentParent = tag.parent; + while (currentParent !== void 0) { + if (visited.has(currentParent)) { + report({ + message: `Circular reference detected in tag parent hierarchy for tag '${tag.name}'.`, + location: location.child("parent") + }); + return; + } + visited.add(currentParent); + currentParent = tags.find((t2) => t2.name === currentParent)?.parent; + } + } + } + }; + }; } +}); - 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) +// node_modules/@redocly/openapi-core/lib/rules/oas3/spec-querystring-parameters.js +function countQuerystring(parameters) { + return parameters.filter((p2) => !("$ref" in p2) && p2.in === "querystring").length; +} +function reportIfMultipleQuerystring(querystringCount, ctx) { + const parametersLocation = ctx.location.child("parameters"); + if (querystringCount > 1) { + ctx.report({ + message: "Parameters with `in: querystring` should be defined only once per path/operation parameter set.", + location: parametersLocation + }); + } +} +function checkMixedUsage(parameter, parameterLocation, state, ctx) { + if (parameter.in === "query") { + if (state.querystringLocation) { + ctx.report({ + message: "Parameters with `in: query` cannot be used together with `in: querystring` in the same operation/path parameter set.", + location: parameterLocation + }); } - - try { - reason = utf8Decode(reason) - } catch { - return { code: 1007, reason: 'Invalid UTF-8', error: true } + state.queryLocation ??= parameterLocation; + return; + } + if (parameter.in === "querystring") { + if (state.queryLocation) { + ctx.report({ + message: "Parameters with `in: querystring` cannot be used together with `in: query` in the same operation/path parameter set.", + location: parameterLocation + }); } - - return { code, reason, error: false } + state.querystringLocation ??= parameterLocation; } - - /** - * Parses control frames. - * @param {Buffer} body - */ - parseControlFrame (body) { - const { opcode, payloadLength } = this.#info - - if (opcode === opcodes.CLOSE) { - if (payloadLength === 1) { - failWebsocketConnection(this.#handler, 1002, '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 - - failWebsocketConnection(this.#handler, code, reason) - return false - } - - // Upon receiving such a frame, the other peer sends a - // Close frame in response, if it hasn't already sent one. - if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { - // 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) +} +var SpecQuerystringParameters; +var init_spec_querystring_parameters = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/spec-querystring-parameters.js"() { + SpecQuerystringParameters = () => { + let pathState = {}; + let operationState = {}; + let pathQuerystringCount = 0; + return { + PathItem: { + enter(pathItem, ctx) { + pathState = {}; + operationState = {}; + pathQuerystringCount = 0; + reportIfMultipleQuerystring(countQuerystring(pathItem.parameters || []), ctx); + }, + Parameter(parameter, ctx) { + checkMixedUsage(parameter, ctx.location, pathState, ctx); + if (parameter.in === "querystring") { + pathQuerystringCount += 1; + } + }, + Operation: { + enter(operation, ctx) { + operationState = { ...pathState }; + const totalQuerystring = pathQuerystringCount + countQuerystring(operation.parameters || []); + reportIfMultipleQuerystring(totalQuerystring, ctx); + }, + Parameter(parameter, ctx) { + checkMixedUsage(parameter, ctx.location, operationState, ctx); + } + } } - const closeFrame = new WebsocketFrameSend(body) - - this.#handler.socket.write(closeFrame.createFrame(opcodes.CLOSE)) - this.#handler.closeState.add(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.#handler.readyState = states.CLOSING - this.#handler.closeState.add(sentCloseFrameState.RECEIVED) - - 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.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { - const frame = new WebsocketFrameSend(body) + }; + }; + } +}); - this.#handler.socket.write(frame.createFrame(opcodes.PONG)) +// node_modules/@redocly/openapi-core/lib/rules/oas3/index.js +var rules5, preprocessors5; +var init_oas33 = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/oas3/index.js"() { + init_assertions(); + init_info_contact(); + init_info_license_strict(); + init_info_license(); + init_no_ambiguous_paths(); + init_no_duplicated_tag_names(); + init_no_enum_type_mismatch(); + init_no_http_verbs_in_paths(); + init_no_identical_paths(); + init_no_invalid_parameter_examples(); + init_no_invalid_schema_examples(); + init_no_mixed_number_range_constraints(); + init_no_path_trailing_slash(); + init_no_required_schema_properties_undefined(); + init_no_schema_type_mismatch(); + init_no_unresolved_refs(); + init_operation_2xx_response(); + init_operation_4xx_response(); + init_operation_description(); + init_operation_operationId_unique(); + init_operation_operationId_url_safe(); + init_operation_operationId(); + init_operation_parameters_unique(); + init_operation_singular_tag(); + init_operation_summary(); + init_operation_tag_defined(); + init_parameter_description(); + init_path_declaration_must_exist(); + init_path_http_verbs_order(); + init_path_not_include_query(); + init_path_params_defined(); + init_path_segment_plural(); + init_paths_kebab_case(); + init_required_string_property_missing_min_length(); + init_response_contains_header(); + init_scalar_property_missing_example(); + init_security_defined(); + init_spec_strict_refs(); + init_struct(); + init_tag_description(); + init_tags_alphabetical(); + init_array_parameter_serialization(); + init_boolean_parameter_prefixes2(); + init_component_name_unique(); + init_no_empty_servers(); + init_no_example_value_and_externalValue(); + init_no_invalid_media_type_examples(); + init_no_server_example_com(); + init_no_server_trailing_slash(); + init_no_server_variables_empty_enum(); + init_no_undefined_server_variable(); + init_no_unused_components(); + init_nullable_type_sibling(); + init_operation_4xx_problem_details_rfc7807(); + init_request_mime_type2(); + init_response_contains_property2(); + init_response_mime_type2(); + init_spec_components_invalid_map_name(); + init_spec_discriminator_defaultMapping(); + init_spec_example_values(); + init_spec_no_invalid_encoding_combinations(); + init_spec_no_invalid_tag_parents(); + init_spec_querystring_parameters(); + rules5 = { + struct: Struct, + "info-contact": InfoContact, + "info-license": InfoLicense, + "info-license-strict": InfoLicenseStrict, + "operation-2xx-response": Operation2xxResponse, + "operation-4xx-response": Operation4xxResponse, + "operation-4xx-problem-details-rfc7807": Operation4xxProblemDetailsRfc7807, + assertions: Assertions2, + "operation-operationId-unique": OperationIdUnique, + "operation-parameters-unique": OperationParametersUnique, + "operation-tag-defined": OperationTagDefined, + "no-example-value-and-externalValue": NoExampleValueAndExternalValue, + "no-mixed-number-range-constraints": NoMixedNumberRangeConstraints, + "no-enum-type-mismatch": NoEnumTypeMismatch, + "no-path-trailing-slash": NoPathTrailingSlash, + "no-empty-servers": NoEmptyServers, + "path-declaration-must-exist": PathDeclarationMustExist, + "operation-operationId-url-safe": OperationIdUrlSafe, + "operation-operationId": OperationOperationId, + "operation-summary": OperationSummary, + "tags-alphabetical": TagsAlphabetical, + "no-server-example.com": NoServerExample, + "no-server-trailing-slash": NoServerTrailingSlash, + "tag-description": TagDescription, + "operation-description": OperationDescription, + "no-unused-components": NoUnusedComponents, + "path-not-include-query": PathNotIncludeQuery, + "path-parameters-defined": PathParamsDefined, + "path-params-defined": PathParamsDefined, + "parameter-description": ParameterDescription, + "operation-singular-tag": OperationSingularTag, + "security-defined": SecurityDefined, + "no-unresolved-refs": NoUnresolvedRefs, + "paths-kebab-case": PathsKebabCase, + "boolean-parameter-prefixes": BooleanParameterPrefixes2, + "path-http-verbs-order": PathHttpVerbsOrder, + "no-invalid-media-type-examples": ValidContentExamples, + "no-identical-paths": NoIdenticalPaths, + "no-ambiguous-paths": NoAmbiguousPaths, + "no-undefined-server-variable": NoUndefinedServerVariable, + "no-server-variables-empty-enum": NoServerVariablesEmptyEnum, + "no-http-verbs-in-paths": NoHttpVerbsInPaths, + "request-mime-type": RequestMimeType2, + "response-mime-type": ResponseMimeType2, + "path-segment-plural": PathSegmentPlural, + "no-invalid-schema-examples": NoInvalidSchemaExamples, + "no-invalid-parameter-examples": NoInvalidParameterExamples, + "response-contains-header": ResponseContainsHeader, + "response-contains-property": ResponseContainsProperty2, + "scalar-property-missing-example": ScalarPropertyMissingExample, + "spec-components-invalid-map-name": SpecComponentsInvalidMapName, + "required-string-property-missing-min-length": RequiredStringPropertyMissingMinLength, + "spec-strict-refs": SpecStrictRefs, + "component-name-unique": ComponentNameUnique, + "array-parameter-serialization": ArrayParameterSerialization, + "no-required-schema-properties-undefined": NoRequiredSchemaPropertiesUndefined, + "no-schema-type-mismatch": NoSchemaTypeMismatch, + "no-duplicated-tag-names": NoDuplicatedTagNames, + "nullable-type-sibling": NullableTypeSibling, + "spec-no-invalid-tag-parents": SpecNoInvalidTagParents, + "spec-no-invalid-encoding-combinations": SpecNoInvalidEncodingCombinations, + "spec-discriminator-defaultMapping": SpecDiscriminatorDefaultMapping, + "spec-example-values": SpecExampleValues, + "spec-querystring-parameters": SpecQuerystringParameters + }; + preprocessors5 = {}; + } +}); - this.#handler.onPing(body) +// node_modules/@redocly/openapi-core/lib/rules/openrpc/no-unused-components.js +var NoUnusedComponents2; +var init_no_unused_components2 = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/openrpc/no-unused-components.js"() { + NoUnusedComponents2 = () => { + const components = /* @__PURE__ */ new Map(); + function registerComponent(location, name) { + components.set(location.absolutePointer, { + used: components.get(location.absolutePointer)?.used || false, + location, + name + }); } - } 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. - this.#handler.onPong(body) - } - - return true + return { + ref(ref, { type: type2, resolve: resolve8, key, location }) { + if ([ + "Schema", + "ContentDescriptor", + "Example", + "Link", + "ErrorObject", + "ExamplePairing", + "Tag" + ].includes(type2.name)) { + const resolvedRef = resolve8(ref); + if (!resolvedRef.location) + return; + components.set(resolvedRef.location.absolutePointer, { + used: true, + name: key.toString(), + location + }); + } + }, + Root: { + leave(_5, { report }) { + components.forEach((usageInfo) => { + if (!usageInfo.used) { + report({ + message: `Component: "${usageInfo.name}" is never used.`, + location: usageInfo.location.key() + }); + } + }); + } + }, + NamedSchemas: { + Schema(schema2, { location, key }) { + registerComponent(location, key.toString()); + } + }, + NamedContentDescriptors: { + ContentDescriptor(_node, { location, key }) { + registerComponent(location, key.toString()); + } + }, + NamedExamples: { + Example(_node, { location, key }) { + registerComponent(location, key.toString()); + } + }, + NamedLinks: { + Link(_node, { location, key }) { + registerComponent(location, key.toString()); + } + }, + NamedErrors: { + ErrorObject(_node, { location, key }) { + registerComponent(location, key.toString()); + } + }, + NamedExamplePairingObjects: { + ExamplePairing(_node, { location, key }) { + registerComponent(location, key.toString()); + } + }, + NamedTags: { + Tag(_node, { location, key }) { + registerComponent(location, key.toString()); + } + } + }; + }; } +}); - get closingInfo () { - return this.#info.closeInfo +// node_modules/@redocly/openapi-core/lib/rules/openrpc/spec-no-duplicated-method-params.js +var NoDuplicatedMethodParams; +var init_spec_no_duplicated_method_params = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/openrpc/spec-no-duplicated-method-params.js"() { + NoDuplicatedMethodParams = () => { + return { + Method: { + leave(method, { report, resolve: resolve8, location }) { + if (!method.params || !Array.isArray(method.params)) + return; + const seenParams = /* @__PURE__ */ new Set(); + method.params.forEach((paramOrRef, index) => { + const resolved = resolve8(paramOrRef); + if (!resolved.node) + return; + const param = resolved.node; + const paramName = param.name; + if (!paramName) + return; + if (seenParams.has(paramName)) { + report({ + message: `Parameter names must be unique. Duplicate parameter name '${param.name}' found.`, + location: location.child([index, "name"]) + }); + } + seenParams.add(paramName); + }); + } + } + }; + }; } -} - -module.exports = { - ByteParser -} - - -/***/ }), - -/***/ 4821: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { WebsocketFrameSend } = __nccwpck_require__(2391) -const { opcodes, sendHints } = __nccwpck_require__(93587) -const FixedQueue = __nccwpck_require__(75158) - -/** - * @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 +// node_modules/@redocly/openapi-core/lib/rules/openrpc/spec-no-required-params-after-optional.js +var NoRequiredParamsAfterOptional; +var init_spec_no_required_params_after_optional = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/openrpc/spec-no-required-params-after-optional.js"() { + NoRequiredParamsAfterOptional = () => { + return { + Method: { + leave(method, { report, resolve: resolve8, location }) { + if (!method.params || !Array.isArray(method.params)) + return; + let foundOptional = false; + method.params.forEach((paramOrRef, index) => { + const resolved = resolve8(paramOrRef); + if (!resolved.node) + return; + const param = resolved.node; + const paramName = param.name; + if (!paramName) + return; + const isRequired = param.required === true; + if (!isRequired) { + foundOptional = true; + } else if (foundOptional) { + report({ + message: `Required parameter '${param.name}' must be positioned before optional parameters.`, + location: location.child([index, "name"]) + }); + } + }); + } + } + }; + }; + } +}); - /** @type {import('node:net').Socket} */ - #socket +// node_modules/@redocly/openapi-core/lib/rules/openrpc/index.js +var rules6, preprocessors6; +var init_openrpc3 = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/openrpc/index.js"() { + init_assertions(); + init_info_contact(); + init_info_license(); + init_no_unresolved_refs(); + init_struct(); + init_no_unused_components2(); + init_spec_no_duplicated_method_params(); + init_spec_no_required_params_after_optional(); + rules6 = { + struct: Struct, + "no-unresolved-refs": NoUnresolvedRefs, + assertions: Assertions2, + "info-license": InfoLicense, + "no-unused-components": NoUnusedComponents2, + "info-contact": InfoContact, + "spec-no-duplicated-method-params": NoDuplicatedMethodParams, + "spec-no-required-params-after-optional": NoRequiredParamsAfterOptional + }; + preprocessors6 = {}; + } +}); - constructor (socket) { - this.#socket = socket +// node_modules/@redocly/openapi-core/lib/rules/overlay1/index.js +var rules7, preprocessors7; +var init_overlay12 = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/overlay1/index.js"() { + init_assertions(); + init_info_contact(); + init_no_unresolved_refs(); + init_struct(); + rules7 = { + "info-contact": InfoContact, + struct: Struct, + "no-unresolved-refs": NoUnresolvedRefs, + assertions: Assertions2 + }; + preprocessors7 = {}; } +}); - add (item, cb, hint) { - if (hint !== sendHints.blob) { - if (!this.#running) { - // TODO(@tsctx): support fast-path for string on running - if (hint === sendHints.text) { - // special fast-path for string - const { 0: head, 1: body } = WebsocketFrameSend.createFastTextFrame(item) - this.#socket.cork() - this.#socket.write(head) - this.#socket.write(body, cb) - this.#socket.uncork() - } else { - // direct writing - this.#socket.write(createFrame(item, hint), cb) - } - } else { - /** @type {SendQueueNode} */ - const node = { - promise: null, - callback: cb, - frame: createFrame(item, hint) - } - this.#queue.push(node) +// node_modules/@redocly/openapi-core/lib/config/all.js +var all, all_default; +var init_all = __esm({ + "node_modules/@redocly/openapi-core/lib/config/all.js"() { + all = { + rules: { + struct: "error", + "no-unresolved-refs": "error" + }, + oas2Rules: { + "boolean-parameter-prefixes": "error", + "info-contact": "error", + "info-license": "error", + "info-license-strict": "error", + "no-path-trailing-slash": "error", + "no-identical-paths": "error", + "no-ambiguous-paths": "error", + "no-invalid-schema-examples": "error", + "no-invalid-parameter-examples": "error", + "no-http-verbs-in-paths": "error", + "no-enum-type-mismatch": "error", + "no-required-schema-properties-undefined": "error", + "no-schema-type-mismatch": "error", + "operation-summary": "error", + "operation-operationId": "error", + "operation-operationId-unique": "error", + "operation-operationId-url-safe": "error", + "operation-description": "error", + "operation-2xx-response": "error", + "operation-4xx-response": "error", + "operation-parameters-unique": "error", + "operation-tag-defined": "error", + "operation-singular-tag": "error", + "parameter-description": "error", + "path-declaration-must-exist": "error", + "path-not-include-query": "error", + "path-parameters-defined": "error", + "paths-kebab-case": "error", + "path-http-verbs-order": "error", + "path-params-defined": "error", + "path-segment-plural": "error", + "required-string-property-missing-min-length": "error", + "response-contains-header": "error", + "request-mime-type": { + severity: "error", + allowedValues: ["application/json"] + }, + "response-mime-type": { + severity: "error", + allowedValues: ["application/json"] + }, + "response-contains-property": "error", + "security-defined": "error", + "spec-strict-refs": "error", + "scalar-property-missing-example": "error", + "tag-description": "error", + "tags-alphabetical": "error", + "no-duplicated-tag-names": "error" + }, + oas3_0Rules: { + "array-parameter-serialization": "error", + "boolean-parameter-prefixes": "error", + "component-name-unique": "error", + "info-contact": "error", + "info-license": "error", + "info-license-strict": "error", + "no-path-trailing-slash": "error", + "no-identical-paths": "error", + "no-ambiguous-paths": "error", + "no-invalid-schema-examples": "error", + "no-invalid-parameter-examples": "error", + "no-http-verbs-in-paths": "error", + "no-enum-type-mismatch": "error", + "no-required-schema-properties-undefined": "error", + "no-schema-type-mismatch": "error", + "no-invalid-media-type-examples": "error", + "no-server-example.com": "error", + "no-server-trailing-slash": "error", + "no-empty-servers": "error", + "no-example-value-and-externalValue": "error", + "no-unused-components": "error", + "no-undefined-server-variable": "error", + "no-server-variables-empty-enum": "error", + "nullable-type-sibling": "error", + "operation-summary": "error", + "operation-operationId": "error", + "operation-operationId-unique": "error", + "operation-operationId-url-safe": "error", + "operation-description": "error", + "operation-2xx-response": "error", + "operation-4xx-response": "error", + "operation-4xx-problem-details-rfc7807": "error", + "operation-parameters-unique": "error", + "operation-tag-defined": "error", + "operation-singular-tag": "error", + "parameter-description": "error", + "path-declaration-must-exist": "error", + "path-not-include-query": "error", + "path-parameters-defined": "error", + "paths-kebab-case": "error", + "path-http-verbs-order": "error", + "path-params-defined": "error", + "path-segment-plural": "error", + "required-string-property-missing-min-length": "error", + "response-contains-header": "error", + "request-mime-type": { + severity: "error", + allowedValues: ["application/json"] + }, + "response-mime-type": { + severity: "error", + allowedValues: ["application/json"] + }, + "response-contains-property": "error", + "security-defined": "error", + "spec-strict-refs": "error", + "scalar-property-missing-example": "error", + "spec-components-invalid-map-name": "error", + "tag-description": "error", + "tags-alphabetical": "error", + "no-duplicated-tag-names": "error", + "spec-example-values": "error" + }, + oas3_1Rules: { + "array-parameter-serialization": "error", + "boolean-parameter-prefixes": "error", + "component-name-unique": "error", + "info-contact": "error", + "info-license": "error", + "info-license-strict": "error", + "no-path-trailing-slash": "error", + "no-identical-paths": "error", + "no-ambiguous-paths": "error", + "no-invalid-schema-examples": "error", + "no-invalid-parameter-examples": "error", + "no-http-verbs-in-paths": "error", + "no-enum-type-mismatch": "error", + "no-required-schema-properties-undefined": "error", + "no-schema-type-mismatch": "error", + "no-invalid-media-type-examples": "error", + "no-mixed-number-range-constraints": "error", + "no-server-example.com": "error", + "no-server-trailing-slash": "error", + "no-empty-servers": "error", + "no-example-value-and-externalValue": "error", + "no-unused-components": "error", + "no-undefined-server-variable": "error", + "no-server-variables-empty-enum": "error", + "parameter-description": "error", + "path-declaration-must-exist": "error", + "path-not-include-query": "error", + "path-parameters-defined": "error", + "paths-kebab-case": "error", + "path-http-verbs-order": "error", + "path-params-defined": "error", + "path-segment-plural": "error", + "operation-summary": "error", + "operation-operationId": "error", + "operation-operationId-unique": "error", + "operation-operationId-url-safe": "error", + "operation-description": "error", + "operation-2xx-response": "error", + "operation-4xx-response": "error", + "operation-4xx-problem-details-rfc7807": "error", + "operation-parameters-unique": "error", + "operation-tag-defined": "error", + "operation-singular-tag": "error", + "required-string-property-missing-min-length": "error", + "response-contains-header": "error", + "request-mime-type": { + severity: "error", + allowedValues: ["application/json"] + }, + "response-mime-type": { + severity: "error", + allowedValues: ["application/json"] + }, + "response-contains-property": "error", + "security-defined": "error", + "spec-strict-refs": "error", + "scalar-property-missing-example": "error", + "spec-components-invalid-map-name": "error", + "tag-description": "error", + "tags-alphabetical": "error", + "no-duplicated-tag-names": "error", + "spec-example-values": "error" + }, + oas3_2Rules: { + "array-parameter-serialization": "error", + "boolean-parameter-prefixes": "error", + "component-name-unique": "error", + "info-contact": "error", + "info-license": "error", + "info-license-strict": "error", + "no-path-trailing-slash": "error", + "no-identical-paths": "error", + "no-ambiguous-paths": "error", + "no-invalid-schema-examples": "error", + "no-invalid-parameter-examples": "error", + "no-http-verbs-in-paths": "error", + "no-enum-type-mismatch": "error", + "no-required-schema-properties-undefined": "error", + "no-schema-type-mismatch": "error", + "no-invalid-media-type-examples": "error", + "no-mixed-number-range-constraints": "error", + "no-server-example.com": "error", + "no-server-trailing-slash": "error", + "no-empty-servers": "error", + "no-unused-components": "error", + "no-undefined-server-variable": "error", + "no-server-variables-empty-enum": "error", + "parameter-description": "error", + "path-declaration-must-exist": "error", + "path-not-include-query": "error", + "path-parameters-defined": "error", + "paths-kebab-case": "error", + "path-http-verbs-order": "error", + "path-params-defined": "error", + "path-segment-plural": "error", + "operation-summary": "error", + "operation-operationId": "error", + "operation-operationId-unique": "error", + "operation-operationId-url-safe": "error", + "operation-description": "error", + "operation-2xx-response": "error", + "operation-4xx-response": "error", + "operation-4xx-problem-details-rfc7807": "error", + "operation-parameters-unique": "error", + "operation-tag-defined": "error", + "operation-singular-tag": "error", + "required-string-property-missing-min-length": "error", + "response-contains-header": "error", + "request-mime-type": { + severity: "error", + allowedValues: ["application/json"] + }, + "response-mime-type": { + severity: "error", + allowedValues: ["application/json"] + }, + "response-contains-property": "error", + "security-defined": "error", + "spec-strict-refs": "error", + "scalar-property-missing-example": "error", + "spec-components-invalid-map-name": "error", + "tag-description": "error", + "tags-alphabetical": "error", + "no-duplicated-tag-names": "error", + "spec-no-invalid-tag-parents": "error", + "spec-no-invalid-encoding-combinations": "error", + "spec-discriminator-defaultMapping": "error", + "spec-example-values": "error", + "spec-querystring-parameters": "error" + }, + async2Rules: { + "channels-kebab-case": "error", + "info-contact": "error", + "info-license-strict": "error", + "no-channel-trailing-slash": "error", + "operation-operationId": "error", + "tag-description": "error", + "tags-alphabetical": "error", + "no-duplicated-tag-names": "error", + "no-required-schema-properties-undefined": "error", + "no-enum-type-mismatch": "error", + "no-mixed-number-range-constraints": "error", + "no-schema-type-mismatch": "error" + }, + async3Rules: { + "channels-kebab-case": "error", + "info-contact": "error", + "info-license-strict": "error", + "no-channel-trailing-slash": "error", + "operation-operationId": "error", + "tag-description": "error", + "tags-alphabetical": "error", + "no-duplicated-tag-names": "error", + "no-required-schema-properties-undefined": "error", + "no-enum-type-mismatch": "error", + "no-mixed-number-range-constraints": "error", + "no-schema-type-mismatch": "error" + }, + arazzo1Rules: { + "criteria-unique": "error", + "no-criteria-xpath": "off", + "no-enum-type-mismatch": "error", + "no-mixed-number-range-constraints": "error", + "no-required-schema-properties-undefined": "error", + "no-schema-type-mismatch": "error", + "no-x-security-both-scheme-and-scheme-name": "off", + "no-x-security-scheme-name-without-openapi": "off", + "outputs-defined": "error", + "parameters-unique": "error", + "requestBody-replacements-unique": "error", + "respect-supported-versions": "off", + "sourceDescription-name-unique": "error", + "sourceDescription-type": "error", + "sourceDescriptions-not-empty": "error", + "step-onFailure-unique": "error", + "step-onSuccess-unique": "error", + "stepId-unique": "error", + "workflow-dependsOn": "error", + "workflowId-unique": "error", + "x-security-scheme-name-reference": "off", + "x-security-scheme-required-values": "off" + }, + overlay1Rules: { + "info-contact": "error" + }, + openrpc1Rules: { + "info-contact": "error", + "info-license": "error", + "no-unused-components": "error", + "spec-no-duplicated-method-params": "error", + "spec-no-required-params-after-optional": "error" } - 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) + }; + all_default = all; + } +}); - if (!this.#running) { - this.#run() - } +// node_modules/@redocly/openapi-core/lib/config/minimal.js +var minimal, minimal_default; +var init_minimal = __esm({ + "node_modules/@redocly/openapi-core/lib/config/minimal.js"() { + minimal = { + rules: { + struct: "error", + "no-unresolved-refs": "error" + }, + oas2Rules: { + "boolean-parameter-prefixes": "off", + "info-contact": "off", + "info-license": "off", + "info-license-strict": "off", + "no-ambiguous-paths": "warn", + "no-duplicated-tag-names": "off", + "no-enum-type-mismatch": "warn", + "no-http-verbs-in-paths": "off", + "no-identical-paths": "warn", + "no-invalid-parameter-examples": "off", + "no-invalid-schema-examples": "off", + "no-path-trailing-slash": "warn", + "no-required-schema-properties-undefined": "warn", + "no-schema-type-mismatch": "warn", + "operation-2xx-response": "warn", + "operation-4xx-response": "off", + "operation-description": "off", + "operation-operationId": "warn", + "operation-operationId-unique": "warn", + "operation-operationId-url-safe": "warn", + "operation-parameters-unique": "warn", + "operation-singular-tag": "off", + "operation-summary": "warn", + "operation-tag-defined": "off", + "parameter-description": "off", + "path-declaration-must-exist": "warn", + "path-http-verbs-order": "off", + "path-not-include-query": "warn", + "path-params-defined": "off", + "path-parameters-defined": "warn", + "path-segment-plural": "off", + "paths-kebab-case": "off", + "request-mime-type": "off", + "required-string-property-missing-min-length": "off", + "response-contains-header": "off", + "response-contains-property": "off", + "response-mime-type": "off", + "scalar-property-missing-example": "off", + "security-defined": "warn", + "spec-strict-refs": "off", + "tag-description": "warn", + "tags-alphabetical": "off" + }, + oas3_0Rules: { + "array-parameter-serialization": "off", + "boolean-parameter-prefixes": "off", + "component-name-unique": "off", + "info-contact": "off", + "info-license": "off", + "info-license-strict": "off", + "no-ambiguous-paths": "warn", + "no-duplicated-tag-names": "off", + "no-empty-servers": "warn", + "no-enum-type-mismatch": "warn", + "no-example-value-and-externalValue": "warn", + "no-http-verbs-in-paths": "off", + "no-identical-paths": "warn", + "no-invalid-media-type-examples": { + severity: "warn", + allowAdditionalProperties: false + }, + "no-invalid-parameter-examples": "off", + "no-invalid-schema-examples": "off", + "no-path-trailing-slash": "warn", + "no-required-schema-properties-undefined": "warn", + "no-schema-type-mismatch": "warn", + "no-server-example.com": "warn", + "no-server-trailing-slash": "error", + "no-server-variables-empty-enum": "error", + "no-undefined-server-variable": "warn", + "no-unused-components": "warn", + "nullable-type-sibling": "warn", + "operation-2xx-response": "warn", + "operation-4xx-problem-details-rfc7807": "off", + "operation-4xx-response": "off", + "operation-description": "off", + "operation-operationId": "warn", + "operation-operationId-unique": "warn", + "operation-operationId-url-safe": "warn", + "operation-parameters-unique": "warn", + "operation-singular-tag": "off", + "operation-summary": "warn", + "operation-tag-defined": "off", + "parameter-description": "off", + "path-declaration-must-exist": "warn", + "path-http-verbs-order": "off", + "path-not-include-query": "warn", + "path-params-defined": "off", + "path-parameters-defined": "warn", + "path-segment-plural": "off", + "paths-kebab-case": "off", + "request-mime-type": "off", + "required-string-property-missing-min-length": "off", + "response-contains-header": "off", + "response-contains-property": "off", + "response-mime-type": "off", + "scalar-property-missing-example": "off", + "security-defined": "warn", + "spec-components-invalid-map-name": "warn", + "spec-example-values": "off", + "spec-strict-refs": "off", + "tag-description": "warn", + "tags-alphabetical": "off" + }, + oas3_1Rules: { + "array-parameter-serialization": "off", + "boolean-parameter-prefixes": "off", + "component-name-unique": "off", + "info-contact": "off", + "info-license": "off", + "info-license-strict": "off", + "no-ambiguous-paths": "warn", + "no-duplicated-tag-names": "off", + "no-empty-servers": "warn", + "no-enum-type-mismatch": "warn", + "no-example-value-and-externalValue": "warn", + "no-http-verbs-in-paths": "off", + "no-identical-paths": "warn", + "no-invalid-media-type-examples": "warn", + "no-invalid-parameter-examples": "off", + "no-invalid-schema-examples": "off", + "no-mixed-number-range-constraints": "off", + "no-path-trailing-slash": "warn", + "no-required-schema-properties-undefined": "warn", + "no-schema-type-mismatch": "warn", + "no-server-example.com": "warn", + "no-server-trailing-slash": "error", + "no-server-variables-empty-enum": "error", + "no-undefined-server-variable": "warn", + "no-unused-components": "warn", + "operation-2xx-response": "warn", + "operation-4xx-problem-details-rfc7807": "off", + "operation-4xx-response": "off", + "operation-description": "off", + "operation-operationId": "warn", + "operation-operationId-unique": "warn", + "operation-operationId-url-safe": "warn", + "operation-parameters-unique": "warn", + "operation-singular-tag": "off", + "operation-summary": "warn", + "operation-tag-defined": "off", + "parameter-description": "off", + "path-declaration-must-exist": "warn", + "path-http-verbs-order": "off", + "path-not-include-query": "warn", + "path-params-defined": "off", + "path-parameters-defined": "warn", + "path-segment-plural": "off", + "paths-kebab-case": "off", + "request-mime-type": "off", + "required-string-property-missing-min-length": "off", + "response-contains-header": "off", + "response-contains-property": "off", + "response-mime-type": "off", + "scalar-property-missing-example": "off", + "security-defined": "warn", + "spec-components-invalid-map-name": "warn", + "spec-example-values": "off", + "spec-strict-refs": "off", + "tag-description": "warn", + "tags-alphabetical": "off" + }, + oas3_2Rules: { + "array-parameter-serialization": "off", + "boolean-parameter-prefixes": "off", + "component-name-unique": "off", + "info-contact": "off", + "info-license": "off", + "info-license-strict": "off", + "no-ambiguous-paths": "warn", + "no-duplicated-tag-names": "off", + "no-empty-servers": "warn", + "no-enum-type-mismatch": "warn", + "no-http-verbs-in-paths": "off", + "no-identical-paths": "warn", + "no-invalid-media-type-examples": "warn", + "no-invalid-parameter-examples": "off", + "no-invalid-schema-examples": "off", + "no-mixed-number-range-constraints": "off", + "no-path-trailing-slash": "warn", + "no-required-schema-properties-undefined": "warn", + "no-schema-type-mismatch": "warn", + "no-server-example.com": "warn", + "no-server-trailing-slash": "error", + "no-server-variables-empty-enum": "error", + "no-undefined-server-variable": "warn", + "no-unused-components": "warn", + "operation-2xx-response": "warn", + "operation-4xx-problem-details-rfc7807": "off", + "operation-4xx-response": "off", + "operation-description": "off", + "operation-operationId": "warn", + "operation-operationId-unique": "warn", + "operation-operationId-url-safe": "warn", + "operation-parameters-unique": "warn", + "operation-singular-tag": "off", + "operation-summary": "warn", + "operation-tag-defined": "off", + "parameter-description": "off", + "path-declaration-must-exist": "warn", + "path-http-verbs-order": "off", + "path-not-include-query": "warn", + "path-params-defined": "off", + "path-parameters-defined": "warn", + "path-segment-plural": "off", + "paths-kebab-case": "off", + "request-mime-type": "off", + "required-string-property-missing-min-length": "off", + "response-contains-header": "off", + "response-contains-property": "off", + "response-mime-type": "off", + "scalar-property-missing-example": "off", + "security-defined": "warn", + "spec-components-invalid-map-name": "warn", + "spec-discriminator-defaultMapping": "off", + "spec-example-values": "off", + "spec-no-invalid-encoding-combinations": "warn", + "spec-no-invalid-tag-parents": "warn", + "spec-querystring-parameters": "error", + "spec-strict-refs": "off", + "tag-description": "warn", + "tags-alphabetical": "off" + }, + async2Rules: { + "channels-kebab-case": "off", + "info-contact": "off", + "info-license-strict": "off", + "no-channel-trailing-slash": "off", + "no-duplicated-tag-names": "off", + "no-enum-type-mismatch": "warn", + "no-mixed-number-range-constraints": "off", + "no-required-schema-properties-undefined": "warn", + "no-schema-type-mismatch": "warn", + "operation-operationId": "warn", + "tag-description": "warn", + "tags-alphabetical": "off" + }, + async3Rules: { + "channels-kebab-case": "off", + "info-contact": "off", + "info-license-strict": "off", + "no-channel-trailing-slash": "off", + "no-duplicated-tag-names": "off", + "no-enum-type-mismatch": "warn", + "no-mixed-number-range-constraints": "off", + "no-required-schema-properties-undefined": "warn", + "no-schema-type-mismatch": "warn", + "operation-operationId": "warn", + "tag-description": "warn", + "tags-alphabetical": "off" + }, + arazzo1Rules: { + "criteria-unique": "off", + "no-criteria-xpath": "off", + "no-enum-type-mismatch": "warn", + "no-mixed-number-range-constraints": "off", + "no-required-schema-properties-undefined": "warn", + "no-schema-type-mismatch": "warn", + "no-x-security-both-scheme-and-scheme-name": "off", + "no-x-security-scheme-name-without-openapi": "off", + "outputs-defined": "off", + "parameters-unique": "off", + "requestBody-replacements-unique": "off", + "respect-supported-versions": "off", + "sourceDescription-name-unique": "off", + "sourceDescription-type": "off", + "sourceDescriptions-not-empty": "off", + "step-onFailure-unique": "off", + "step-onSuccess-unique": "off", + "stepId-unique": "error", + "workflow-dependsOn": "off", + "workflowId-unique": "error", + "x-security-scheme-name-reference": "off", + "x-security-scheme-required-values": "off" + }, + overlay1Rules: { + "info-contact": "off" + }, + openrpc1Rules: { + "info-contact": "off", + "info-license": "off", + "no-unused-components": "off", + "spec-no-duplicated-method-params": "error", + "spec-no-required-params-after-optional": "error" + } + }; + minimal_default = minimal; } +}); - 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 +// node_modules/@redocly/openapi-core/lib/config/recommended-strict.js +var recommendedStrict, recommended_strict_default; +var init_recommended_strict = __esm({ + "node_modules/@redocly/openapi-core/lib/config/recommended-strict.js"() { + recommendedStrict = { + rules: { + struct: "error", + "no-unresolved-refs": "error" + }, + oas2Rules: { + "boolean-parameter-prefixes": "off", + "info-contact": "off", + "info-license": "error", + "info-license-strict": "error", + "no-ambiguous-paths": "error", + "no-duplicated-tag-names": "error", + "no-enum-type-mismatch": "error", + "no-http-verbs-in-paths": "off", + "no-identical-paths": "error", + "no-invalid-parameter-examples": "error", + "no-invalid-schema-examples": "error", + "no-path-trailing-slash": "error", + "no-required-schema-properties-undefined": "error", + "no-schema-type-mismatch": "error", + "operation-2xx-response": "error", + "operation-4xx-response": "error", + "operation-description": "off", + "operation-operationId": "error", + "operation-operationId-unique": "error", + "operation-operationId-url-safe": "error", + "operation-parameters-unique": "error", + "operation-singular-tag": "off", + "operation-summary": "error", + "operation-tag-defined": "off", + "parameter-description": "off", + "path-declaration-must-exist": "error", + "path-http-verbs-order": "off", + "path-not-include-query": "error", + "path-params-defined": "off", + "path-parameters-defined": "error", + "path-segment-plural": "off", + "paths-kebab-case": "off", + "request-mime-type": "off", + "required-string-property-missing-min-length": "off", + "response-contains-header": "off", + "response-contains-property": "off", + "response-mime-type": "off", + "scalar-property-missing-example": "off", + "security-defined": "error", + "spec-strict-refs": "off", + "tag-description": "error", + "tags-alphabetical": "off" + }, + oas3_0Rules: { + "array-parameter-serialization": "off", + "boolean-parameter-prefixes": "off", + "component-name-unique": "off", + "info-contact": "off", + "info-license": "error", + "info-license-strict": "error", + "no-ambiguous-paths": "error", + "no-duplicated-tag-names": "error", + "no-empty-servers": "error", + "no-enum-type-mismatch": "error", + "no-example-value-and-externalValue": "error", + "no-http-verbs-in-paths": "off", + "no-identical-paths": "error", + "no-invalid-media-type-examples": { + severity: "error", + allowAdditionalProperties: false + }, + "no-invalid-parameter-examples": "error", + "no-invalid-schema-examples": "error", + "no-path-trailing-slash": "error", + "no-required-schema-properties-undefined": "error", + "no-schema-type-mismatch": "error", + "no-server-example.com": "error", + "no-server-trailing-slash": "error", + "no-server-variables-empty-enum": "error", + "no-undefined-server-variable": "error", + "no-unused-components": "error", + "nullable-type-sibling": "error", + "operation-2xx-response": "error", + "operation-4xx-problem-details-rfc7807": "off", + "operation-4xx-response": "error", + "operation-description": "off", + "operation-operationId": "error", + "operation-operationId-unique": "error", + "operation-operationId-url-safe": "error", + "operation-parameters-unique": "error", + "operation-singular-tag": "off", + "operation-summary": "error", + "operation-tag-defined": "off", + "parameter-description": "off", + "path-declaration-must-exist": "error", + "path-http-verbs-order": "off", + "path-not-include-query": "error", + "path-params-defined": "off", + "path-parameters-defined": "error", + "path-segment-plural": "off", + "paths-kebab-case": "off", + "request-mime-type": "off", + "required-string-property-missing-min-length": "off", + "response-contains-header": "off", + "response-contains-property": "off", + "response-mime-type": "off", + "scalar-property-missing-example": "off", + "security-defined": "error", + "spec-components-invalid-map-name": "error", + "spec-example-values": "off", + "spec-strict-refs": "off", + "tag-description": "error", + "tags-alphabetical": "off" + }, + oas3_1Rules: { + "array-parameter-serialization": "off", + "boolean-parameter-prefixes": "off", + "component-name-unique": "off", + "info-contact": "off", + "info-license": "error", + "info-license-strict": "error", + "no-ambiguous-paths": "error", + "no-duplicated-tag-names": "error", + "no-empty-servers": "error", + "no-enum-type-mismatch": "error", + "no-example-value-and-externalValue": "error", + "no-http-verbs-in-paths": "off", + "no-identical-paths": "error", + "no-invalid-media-type-examples": "error", + "no-invalid-parameter-examples": "error", + "no-invalid-schema-examples": "error", + "no-mixed-number-range-constraints": "error", + "no-path-trailing-slash": "error", + "no-required-schema-properties-undefined": "error", + "no-schema-type-mismatch": "error", + "no-server-example.com": "error", + "no-server-trailing-slash": "error", + "no-server-variables-empty-enum": "error", + "no-undefined-server-variable": "error", + "no-unused-components": "error", + "operation-2xx-response": "error", + "operation-4xx-problem-details-rfc7807": "off", + "operation-4xx-response": "error", + "operation-description": "off", + "operation-operationId": "error", + "operation-operationId-unique": "error", + "operation-operationId-url-safe": "error", + "operation-parameters-unique": "error", + "operation-singular-tag": "off", + "operation-summary": "error", + "operation-tag-defined": "off", + "parameter-description": "off", + "path-declaration-must-exist": "error", + "path-http-verbs-order": "off", + "path-not-include-query": "error", + "path-params-defined": "off", + "path-parameters-defined": "error", + "path-segment-plural": "off", + "paths-kebab-case": "off", + "request-mime-type": "off", + "required-string-property-missing-min-length": "off", + "response-contains-header": "off", + "response-contains-property": "off", + "response-mime-type": "off", + "scalar-property-missing-example": "off", + "security-defined": "error", + "spec-components-invalid-map-name": "error", + "spec-example-values": "off", + "spec-strict-refs": "off", + "tag-description": "error", + "tags-alphabetical": "off" + }, + oas3_2Rules: { + "array-parameter-serialization": "off", + "boolean-parameter-prefixes": "off", + "component-name-unique": "off", + "info-contact": "off", + "info-license": "error", + "info-license-strict": "error", + "no-ambiguous-paths": "error", + "no-duplicated-tag-names": "error", + "no-empty-servers": "error", + "no-enum-type-mismatch": "error", + "no-http-verbs-in-paths": "off", + "no-identical-paths": "error", + "no-invalid-media-type-examples": "error", + "no-invalid-parameter-examples": "error", + "no-invalid-schema-examples": "error", + "no-mixed-number-range-constraints": "error", + "no-path-trailing-slash": "error", + "no-required-schema-properties-undefined": "error", + "no-schema-type-mismatch": "error", + "no-server-example.com": "error", + "no-server-trailing-slash": "error", + "no-server-variables-empty-enum": "error", + "no-undefined-server-variable": "error", + "no-unused-components": "error", + "operation-2xx-response": "error", + "operation-4xx-problem-details-rfc7807": "off", + "operation-4xx-response": "error", + "operation-description": "off", + "operation-operationId": "error", + "operation-operationId-unique": "error", + "operation-operationId-url-safe": "error", + "operation-parameters-unique": "error", + "operation-singular-tag": "off", + "operation-summary": "error", + "operation-tag-defined": "off", + "parameter-description": "off", + "path-declaration-must-exist": "error", + "path-http-verbs-order": "off", + "path-not-include-query": "error", + "path-params-defined": "off", + "path-parameters-defined": "error", + "path-segment-plural": "off", + "paths-kebab-case": "off", + "request-mime-type": "off", + "required-string-property-missing-min-length": "off", + "response-contains-header": "off", + "response-contains-property": "off", + "response-mime-type": "off", + "scalar-property-missing-example": "off", + "security-defined": "error", + "spec-components-invalid-map-name": "error", + "spec-discriminator-defaultMapping": "error", + "spec-example-values": "error", + "spec-no-invalid-encoding-combinations": "error", + "spec-no-invalid-tag-parents": "error", + "spec-querystring-parameters": "error", + "spec-strict-refs": "off", + "tag-description": "error", + "tags-alphabetical": "off" + }, + async2Rules: { + "channels-kebab-case": "off", + "info-contact": "off", + "info-license-strict": "error", + "no-channel-trailing-slash": "off", + "no-duplicated-tag-names": "error", + "no-enum-type-mismatch": "error", + "no-mixed-number-range-constraints": "error", + "no-required-schema-properties-undefined": "error", + "no-schema-type-mismatch": "error", + "operation-operationId": "error", + "tag-description": "error", + "tags-alphabetical": "off" + }, + async3Rules: { + "channels-kebab-case": "off", + "info-contact": "off", + "info-license-strict": "error", + "no-channel-trailing-slash": "off", + "no-duplicated-tag-names": "error", + "no-enum-type-mismatch": "error", + "no-mixed-number-range-constraints": "error", + "no-required-schema-properties-undefined": "error", + "no-schema-type-mismatch": "error", + "operation-operationId": "error", + "tag-description": "error", + "tags-alphabetical": "off" + }, + arazzo1Rules: { + "criteria-unique": "error", + "no-criteria-xpath": "off", + "no-enum-type-mismatch": "error", + "no-mixed-number-range-constraints": "error", + "no-required-schema-properties-undefined": "error", + "no-schema-type-mismatch": "error", + "no-x-security-both-scheme-and-scheme-name": "off", + "no-x-security-scheme-name-without-openapi": "off", + "outputs-defined": "error", + "parameters-unique": "error", + "requestBody-replacements-unique": "error", + "respect-supported-versions": "off", + "sourceDescription-name-unique": "error", + "sourceDescription-type": "error", + "sourceDescriptions-not-empty": "error", + "step-onFailure-unique": "error", + "step-onSuccess-unique": "error", + "stepId-unique": "error", + "workflow-dependsOn": "error", + "workflowId-unique": "error", + "x-security-scheme-name-reference": "off", + "x-security-scheme-required-values": "off" + }, + overlay1Rules: { + "info-contact": "off" + }, + openrpc1Rules: { + "info-contact": "off", + "info-license": "error", + "no-unused-components": "error", + "spec-no-duplicated-method-params": "error", + "spec-no-required-params-after-optional": "error" } - // write - this.#socket.write(node.frame, node.callback) - // cleanup - node.callback = node.frame = null - } - this.#running = false + }; + recommended_strict_default = recommendedStrict; } -} - -function createFrame (data, hint) { - return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.text ? opcodes.TEXT : opcodes.BINARY) -} +}); -function toBuffer (data, hint) { - switch (hint) { - case sendHints.text: - case sendHints.typedArray: - return new Uint8Array(data.buffer, data.byteOffset, data.byteLength) - case sendHints.arrayBuffer: - case sendHints.blob: - return new Uint8Array(data) +// node_modules/@redocly/openapi-core/lib/config/recommended.js +var recommended, recommended_default; +var init_recommended = __esm({ + "node_modules/@redocly/openapi-core/lib/config/recommended.js"() { + recommended = { + rules: { + struct: "error", + "no-unresolved-refs": "error" + }, + oas2Rules: { + "boolean-parameter-prefixes": "off", + "info-contact": "off", + "info-license": "warn", + "info-license-strict": "warn", + "no-ambiguous-paths": "warn", + "no-duplicated-tag-names": "warn", + "no-enum-type-mismatch": "error", + "no-http-verbs-in-paths": "off", + "no-identical-paths": "error", + "no-invalid-parameter-examples": "warn", + "no-invalid-schema-examples": "warn", + "no-path-trailing-slash": "error", + "no-required-schema-properties-undefined": "warn", + "no-schema-type-mismatch": "error", + "operation-2xx-response": "warn", + "operation-4xx-response": "warn", + "operation-description": "off", + "operation-operationId": "warn", + "operation-operationId-unique": "error", + "operation-operationId-url-safe": "error", + "operation-parameters-unique": "error", + "operation-singular-tag": "off", + "operation-summary": "error", + "operation-tag-defined": "off", + "parameter-description": "off", + "path-declaration-must-exist": "error", + "path-http-verbs-order": "off", + "path-not-include-query": "error", + "path-params-defined": "off", + "path-parameters-defined": "error", + "path-segment-plural": "off", + "paths-kebab-case": "off", + "request-mime-type": "off", + "required-string-property-missing-min-length": "off", + "response-contains-header": "off", + "response-contains-property": "off", + "response-mime-type": "off", + "scalar-property-missing-example": "off", + "security-defined": "error", + "spec-strict-refs": "off", + "tag-description": "warn", + "tags-alphabetical": "off" + }, + oas3_0Rules: { + "array-parameter-serialization": "off", + "boolean-parameter-prefixes": "off", + "component-name-unique": "off", + "info-contact": "off", + "info-license": "warn", + "info-license-strict": "warn", + "no-ambiguous-paths": "warn", + "no-duplicated-tag-names": "warn", + "no-empty-servers": "error", + "no-enum-type-mismatch": "error", + "no-example-value-and-externalValue": "error", + "no-http-verbs-in-paths": "off", + "no-identical-paths": "error", + "no-invalid-media-type-examples": { + severity: "warn", + allowAdditionalProperties: false + }, + "no-invalid-parameter-examples": "warn", + "no-invalid-schema-examples": "warn", + "no-path-trailing-slash": "error", + "no-required-schema-properties-undefined": "warn", + "no-schema-type-mismatch": "error", + "no-server-example.com": "warn", + "no-server-trailing-slash": "error", + "no-server-variables-empty-enum": "error", + "no-undefined-server-variable": "error", + "no-unused-components": "warn", + "nullable-type-sibling": "error", + "operation-2xx-response": "warn", + "operation-4xx-problem-details-rfc7807": "off", + "operation-4xx-response": "warn", + "operation-description": "off", + "operation-operationId": "warn", + "operation-operationId-unique": "error", + "operation-operationId-url-safe": "error", + "operation-parameters-unique": "error", + "operation-singular-tag": "off", + "operation-summary": "error", + "operation-tag-defined": "off", + "parameter-description": "off", + "path-declaration-must-exist": "error", + "path-http-verbs-order": "off", + "path-not-include-query": "error", + "path-params-defined": "off", + "path-parameters-defined": "error", + "path-segment-plural": "off", + "paths-kebab-case": "off", + "request-mime-type": "off", + "required-string-property-missing-min-length": "off", + "response-contains-header": "off", + "response-contains-property": "off", + "response-mime-type": "off", + "scalar-property-missing-example": "off", + "security-defined": "error", + "spec-components-invalid-map-name": "error", + "spec-example-values": "off", + "spec-strict-refs": "off", + "tag-description": "warn", + "tags-alphabetical": "off" + }, + oas3_1Rules: { + "array-parameter-serialization": "off", + "boolean-parameter-prefixes": "off", + "component-name-unique": "off", + "info-contact": "off", + "info-license": "warn", + "info-license-strict": "warn", + "no-ambiguous-paths": "warn", + "no-duplicated-tag-names": "warn", + "no-empty-servers": "error", + "no-enum-type-mismatch": "error", + "no-example-value-and-externalValue": "error", + "no-http-verbs-in-paths": "off", + "no-identical-paths": "error", + "no-invalid-media-type-examples": "warn", + "no-invalid-parameter-examples": "warn", + "no-invalid-schema-examples": "warn", + "no-mixed-number-range-constraints": "warn", + "no-path-trailing-slash": "error", + "no-required-schema-properties-undefined": "warn", + "no-schema-type-mismatch": "error", + "no-server-example.com": "warn", + "no-server-trailing-slash": "error", + "no-server-variables-empty-enum": "error", + "no-undefined-server-variable": "error", + "no-unused-components": "warn", + "operation-2xx-response": "warn", + "operation-4xx-problem-details-rfc7807": "off", + "operation-4xx-response": "warn", + "operation-description": "off", + "operation-operationId": "warn", + "operation-operationId-unique": "error", + "operation-operationId-url-safe": "error", + "operation-parameters-unique": "error", + "operation-singular-tag": "off", + "operation-summary": "error", + "operation-tag-defined": "off", + "parameter-description": "off", + "path-declaration-must-exist": "error", + "path-http-verbs-order": "off", + "path-not-include-query": "error", + "path-params-defined": "off", + "path-parameters-defined": "error", + "path-segment-plural": "off", + "paths-kebab-case": "off", + "request-mime-type": "off", + "required-string-property-missing-min-length": "off", + "response-contains-header": "off", + "response-contains-property": "off", + "response-mime-type": "off", + "scalar-property-missing-example": "off", + "security-defined": "error", + "spec-components-invalid-map-name": "error", + "spec-example-values": "off", + "spec-strict-refs": "off", + "tag-description": "warn", + "tags-alphabetical": "off" + }, + oas3_2Rules: { + "array-parameter-serialization": "off", + "boolean-parameter-prefixes": "off", + "component-name-unique": "off", + "info-contact": "off", + "info-license": "warn", + "info-license-strict": "warn", + "no-ambiguous-paths": "warn", + "no-duplicated-tag-names": "warn", + "no-empty-servers": "error", + "no-enum-type-mismatch": "error", + "no-http-verbs-in-paths": "off", + "no-identical-paths": "error", + "no-invalid-media-type-examples": "warn", + "no-invalid-parameter-examples": "warn", + "no-invalid-schema-examples": "warn", + "no-mixed-number-range-constraints": "warn", + "no-path-trailing-slash": "error", + "no-required-schema-properties-undefined": "warn", + "no-schema-type-mismatch": "error", + "no-server-example.com": "warn", + "no-server-trailing-slash": "error", + "no-server-variables-empty-enum": "error", + "no-undefined-server-variable": "error", + "no-unused-components": "warn", + "operation-2xx-response": "warn", + "operation-4xx-problem-details-rfc7807": "off", + "operation-4xx-response": "warn", + "operation-description": "off", + "operation-operationId": "warn", + "operation-operationId-unique": "error", + "operation-operationId-url-safe": "error", + "operation-parameters-unique": "error", + "operation-singular-tag": "off", + "operation-summary": "error", + "operation-tag-defined": "off", + "parameter-description": "off", + "path-declaration-must-exist": "error", + "path-http-verbs-order": "off", + "path-not-include-query": "error", + "path-params-defined": "off", + "path-parameters-defined": "error", + "path-segment-plural": "off", + "paths-kebab-case": "off", + "request-mime-type": "off", + "required-string-property-missing-min-length": "off", + "response-contains-header": "off", + "response-contains-property": "off", + "response-mime-type": "off", + "scalar-property-missing-example": "off", + "security-defined": "error", + "spec-components-invalid-map-name": "error", + "spec-discriminator-defaultMapping": "warn", + "spec-example-values": "error", + "spec-no-invalid-encoding-combinations": "error", + "spec-no-invalid-tag-parents": "error", + "spec-querystring-parameters": "error", + "spec-strict-refs": "off", + "tag-description": "warn", + "tags-alphabetical": "off" + }, + async2Rules: { + "channels-kebab-case": "off", + "info-contact": "off", + "info-license-strict": "warn", + "no-channel-trailing-slash": "off", + "no-duplicated-tag-names": "warn", + "no-enum-type-mismatch": "error", + "no-mixed-number-range-constraints": "warn", + "no-required-schema-properties-undefined": "warn", + "no-schema-type-mismatch": "error", + "operation-operationId": "warn", + "tag-description": "warn", + "tags-alphabetical": "off" + }, + async3Rules: { + "channels-kebab-case": "off", + "info-contact": "off", + "info-license-strict": "warn", + "no-channel-trailing-slash": "off", + "no-duplicated-tag-names": "warn", + "no-enum-type-mismatch": "error", + "no-mixed-number-range-constraints": "warn", + "no-required-schema-properties-undefined": "warn", + "no-schema-type-mismatch": "error", + "operation-operationId": "warn", + "tag-description": "warn", + "tags-alphabetical": "off" + }, + arazzo1Rules: { + "criteria-unique": "warn", + "no-criteria-xpath": "off", + "no-enum-type-mismatch": "error", + "no-mixed-number-range-constraints": "warn", + "no-required-schema-properties-undefined": "warn", + "no-schema-type-mismatch": "error", + "no-x-security-both-scheme-and-scheme-name": "off", + "no-x-security-scheme-name-without-openapi": "off", + "outputs-defined": "warn", + "parameters-unique": "error", + "requestBody-replacements-unique": "warn", + "respect-supported-versions": "off", + "sourceDescription-name-unique": "error", + "sourceDescription-type": "error", + "sourceDescriptions-not-empty": "error", + "step-onFailure-unique": "warn", + "step-onSuccess-unique": "warn", + "stepId-unique": "error", + "workflow-dependsOn": "error", + "workflowId-unique": "error", + "x-security-scheme-name-reference": "off", + "x-security-scheme-required-values": "off" + }, + overlay1Rules: { + "info-contact": "off" + }, + openrpc1Rules: { + "info-license": "warn", + "no-unused-components": "warn", + "info-contact": "off", + "spec-no-duplicated-method-params": "error", + "spec-no-required-params-after-optional": "error" + } + }; + recommended_default = recommended; } -} - -module.exports = { SendQueue } - - -/***/ }), - -/***/ 97501: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { webidl } = __nccwpck_require__(81040) -const { validateCloseCodeAndReason } = __nccwpck_require__(89902) -const { kConstruct } = __nccwpck_require__(72785) -const { kEnumerableProperty } = __nccwpck_require__(83983) +}); -function createInheritableDOMException () { - // https://github.com/nodejs/node/issues/59677 - class Test extends DOMException { - get reason () { - return '' - } +// node_modules/@redocly/openapi-core/lib/config/spec.js +var spec, spec_default; +var init_spec = __esm({ + "node_modules/@redocly/openapi-core/lib/config/spec.js"() { + spec = { + rules: { + struct: "error", + "no-unresolved-refs": "error" + }, + oas2Rules: { + "boolean-parameter-prefixes": "off", + "info-contact": "off", + "info-license": "off", + "info-license-strict": "off", + "no-ambiguous-paths": "off", + "no-duplicated-tag-names": "error", + "no-enum-type-mismatch": "off", + "no-http-verbs-in-paths": "off", + "no-identical-paths": "error", + "no-invalid-parameter-examples": "off", + "no-invalid-schema-examples": "off", + "no-path-trailing-slash": "off", + "no-required-schema-properties-undefined": "off", + "no-schema-type-mismatch": "off", + "operation-2xx-response": "off", + "operation-4xx-response": "off", + "operation-description": "off", + "operation-operationId": "off", + "operation-operationId-unique": "error", + "operation-operationId-url-safe": "off", + "operation-parameters-unique": "error", + "operation-singular-tag": "off", + "operation-summary": "off", + "operation-tag-defined": "off", + "parameter-description": "off", + "path-declaration-must-exist": "error", + "path-http-verbs-order": "off", + "path-not-include-query": "error", + "path-params-defined": "off", + "path-parameters-defined": "error", + "path-segment-plural": "off", + "paths-kebab-case": "off", + "request-mime-type": "off", + "required-string-property-missing-min-length": "off", + "response-contains-header": "off", + "response-contains-property": "off", + "response-mime-type": "off", + "scalar-property-missing-example": "off", + "security-defined": "off", + "spec-strict-refs": "error", + "tag-description": "off", + "tags-alphabetical": "off" + }, + oas3_0Rules: { + "array-parameter-serialization": "off", + "boolean-parameter-prefixes": "off", + "component-name-unique": "off", + "info-contact": "off", + "info-license": "off", + "info-license-strict": "off", + "no-ambiguous-paths": "off", + "no-duplicated-tag-names": "error", + "no-empty-servers": "off", + "no-enum-type-mismatch": "off", + "no-example-value-and-externalValue": "error", + "no-http-verbs-in-paths": "off", + "no-identical-paths": "error", + "no-invalid-media-type-examples": { + severity: "off", + allowAdditionalProperties: false + }, + "no-invalid-parameter-examples": "off", + "no-invalid-schema-examples": "off", + "no-path-trailing-slash": "off", + "no-required-schema-properties-undefined": "off", + "no-schema-type-mismatch": "off", + "no-server-example.com": "off", + "no-server-trailing-slash": "off", + "no-server-variables-empty-enum": "off", + "no-undefined-server-variable": "error", + "no-unused-components": "off", + "nullable-type-sibling": "error", + "operation-2xx-response": "off", + "operation-4xx-problem-details-rfc7807": "off", + "operation-4xx-response": "off", + "operation-description": "off", + "operation-operationId": "off", + "operation-operationId-unique": "error", + "operation-operationId-url-safe": "off", + "operation-parameters-unique": "error", + "operation-singular-tag": "off", + "operation-summary": "off", + "operation-tag-defined": "off", + "parameter-description": "off", + "path-declaration-must-exist": "error", + "path-http-verbs-order": "off", + "path-not-include-query": "error", + "path-params-defined": "off", + "path-parameters-defined": "error", + "path-segment-plural": "off", + "paths-kebab-case": "off", + "request-mime-type": "off", + "required-string-property-missing-min-length": "off", + "response-contains-header": "off", + "response-contains-property": "off", + "response-mime-type": "off", + "scalar-property-missing-example": "off", + "security-defined": "off", + "spec-components-invalid-map-name": "error", + "spec-example-values": "off", + "spec-strict-refs": "error", + "tag-description": "off", + "tags-alphabetical": "off" + }, + oas3_1Rules: { + "array-parameter-serialization": "off", + "boolean-parameter-prefixes": "off", + "component-name-unique": "off", + "info-contact": "off", + "info-license": "off", + "info-license-strict": "off", + "no-ambiguous-paths": "off", + "no-duplicated-tag-names": "error", + "no-empty-servers": "off", + "no-enum-type-mismatch": "off", + "no-example-value-and-externalValue": "error", + "no-http-verbs-in-paths": "off", + "no-identical-paths": "error", + "no-invalid-media-type-examples": "off", + "no-invalid-parameter-examples": "off", + "no-invalid-schema-examples": "off", + "no-mixed-number-range-constraints": "off", + "no-path-trailing-slash": "off", + "no-required-schema-properties-undefined": "off", + "no-schema-type-mismatch": "off", + "no-server-example.com": "off", + "no-server-trailing-slash": "off", + "no-server-variables-empty-enum": "off", + "no-undefined-server-variable": "error", + "no-unused-components": "off", + "operation-2xx-response": "off", + "operation-4xx-problem-details-rfc7807": "off", + "operation-4xx-response": "off", + "operation-description": "off", + "operation-operationId": "off", + "operation-operationId-unique": "error", + "operation-operationId-url-safe": "off", + "operation-parameters-unique": "error", + "operation-singular-tag": "off", + "operation-summary": "off", + "operation-tag-defined": "off", + "parameter-description": "off", + "path-declaration-must-exist": "error", + "path-http-verbs-order": "off", + "path-not-include-query": "error", + "path-params-defined": "off", + "path-parameters-defined": "error", + "path-segment-plural": "off", + "paths-kebab-case": "off", + "request-mime-type": "off", + "required-string-property-missing-min-length": "off", + "response-contains-header": "off", + "response-contains-property": "off", + "response-mime-type": "off", + "scalar-property-missing-example": "off", + "security-defined": "off", + "spec-components-invalid-map-name": "error", + "spec-example-values": "off", + "spec-strict-refs": "error", + "tag-description": "off", + "tags-alphabetical": "off" + }, + oas3_2Rules: { + "array-parameter-serialization": "off", + "boolean-parameter-prefixes": "off", + "component-name-unique": "off", + "info-contact": "off", + "info-license": "off", + "info-license-strict": "off", + "no-ambiguous-paths": "off", + "no-duplicated-tag-names": "error", + "no-empty-servers": "off", + "no-enum-type-mismatch": "off", + "no-http-verbs-in-paths": "off", + "no-identical-paths": "error", + "no-invalid-media-type-examples": "off", + "no-invalid-parameter-examples": "off", + "no-invalid-schema-examples": "off", + "no-mixed-number-range-constraints": "off", + "no-path-trailing-slash": "off", + "no-required-schema-properties-undefined": "off", + "no-schema-type-mismatch": "off", + "no-server-example.com": "off", + "no-server-trailing-slash": "off", + "no-server-variables-empty-enum": "off", + "no-undefined-server-variable": "error", + "no-unused-components": "off", + "operation-2xx-response": "off", + "operation-4xx-problem-details-rfc7807": "off", + "operation-4xx-response": "off", + "operation-description": "off", + "operation-operationId": "off", + "operation-operationId-unique": "error", + "operation-operationId-url-safe": "off", + "operation-parameters-unique": "error", + "operation-singular-tag": "off", + "operation-summary": "off", + "operation-tag-defined": "off", + "parameter-description": "off", + "path-declaration-must-exist": "error", + "path-http-verbs-order": "off", + "path-not-include-query": "error", + "path-params-defined": "off", + "path-parameters-defined": "error", + "path-segment-plural": "off", + "paths-kebab-case": "off", + "request-mime-type": "off", + "required-string-property-missing-min-length": "off", + "response-contains-header": "off", + "response-contains-property": "off", + "response-mime-type": "off", + "scalar-property-missing-example": "off", + "security-defined": "off", + "spec-components-invalid-map-name": "error", + "spec-discriminator-defaultMapping": "error", + "spec-example-values": "error", + "spec-no-invalid-encoding-combinations": "error", + "spec-no-invalid-tag-parents": "error", + "spec-querystring-parameters": "error", + "spec-strict-refs": "error", + "tag-description": "off", + "tags-alphabetical": "off" + }, + async2Rules: { + "channels-kebab-case": "off", + "info-contact": "off", + "info-license-strict": "off", + "no-channel-trailing-slash": "off", + "no-duplicated-tag-names": "off", + "no-enum-type-mismatch": "off", + "no-mixed-number-range-constraints": "off", + "no-required-schema-properties-undefined": "off", + "no-schema-type-mismatch": "off", + "operation-operationId": "off", + "tag-description": "off", + "tags-alphabetical": "off" + }, + async3Rules: { + "channels-kebab-case": "off", + "info-contact": "off", + "info-license-strict": "off", + "no-channel-trailing-slash": "off", + "no-duplicated-tag-names": "off", + "no-enum-type-mismatch": "off", + "no-mixed-number-range-constraints": "off", + "no-required-schema-properties-undefined": "off", + "no-schema-type-mismatch": "off", + "operation-operationId": "off", + "tag-description": "off", + "tags-alphabetical": "off" + }, + arazzo1Rules: { + "criteria-unique": "error", + "no-criteria-xpath": "off", + "no-enum-type-mismatch": "off", + "no-mixed-number-range-constraints": "off", + "no-required-schema-properties-undefined": "off", + "no-schema-type-mismatch": "off", + "no-x-security-both-scheme-and-scheme-name": "off", + "no-x-security-scheme-name-without-openapi": "off", + "outputs-defined": "error", + "parameters-unique": "error", + "requestBody-replacements-unique": "error", + "respect-supported-versions": "off", + "sourceDescription-name-unique": "error", + "sourceDescription-type": "error", + "sourceDescriptions-not-empty": "error", + "step-onFailure-unique": "error", + "step-onSuccess-unique": "error", + "stepId-unique": "error", + "workflow-dependsOn": "error", + "workflowId-unique": "error", + "x-security-scheme-name-reference": "off", + "x-security-scheme-required-values": "off" + }, + overlay1Rules: { + "info-contact": "off" + }, + openrpc1Rules: { + "info-contact": "off", + "info-license": "off", + "no-unused-components": "off", + "spec-no-duplicated-method-params": "error", + "spec-no-required-params-after-optional": "error" + } + }; + spec_default = spec; } +}); - if (new Test().reason !== undefined) { - return DOMException +// node_modules/@redocly/openapi-core/lib/config/builtIn.js +var builtInConfigs, defaultPlugin; +var init_builtIn = __esm({ + "node_modules/@redocly/openapi-core/lib/config/builtIn.js"() { + init_arazzo3(); + init_async2(); + init_async3(); + init_oas22(); + init_oas32(); + init_openrpc2(); + init_overlay1(); + init_arazzo4(); + init_async22(); + init_async32(); + init_oas23(); + init_oas33(); + init_openrpc3(); + init_overlay12(); + init_all(); + init_minimal(); + init_recommended_strict(); + init_recommended(); + init_spec(); + builtInConfigs = { + recommended: recommended_default, + "recommended-strict": recommended_strict_default, + minimal: minimal_default, + all: all_default, + spec: spec_default + }; + defaultPlugin = { + id: "", + // default plugin doesn't have id + rules: { + oas3: rules5, + oas2: rules4, + async2: rules2, + async3: rules3, + arazzo1: rules, + overlay1: rules7, + openrpc1: rules6 + }, + preprocessors: { + oas3: preprocessors5, + oas2: preprocessors4, + async2: preprocessors2, + async3: preprocessors3, + arazzo1: preprocessors, + overlay1: preprocessors7, + openrpc1: preprocessors6 + }, + decorators: { + oas3: decorators5, + oas2: decorators4, + async2: decorators2, + async3: decorators3, + arazzo1: decorators, + overlay1: decorators7, + openrpc1: decorators6 + }, + configs: builtInConfigs + }; } +}); - return new Proxy(DOMException, { - construct (target, args, newTarget) { - const instance = Reflect.construct(target, args, target) - Object.setPrototypeOf(instance, newTarget.prototype) - return instance - } - }) +// node_modules/@redocly/openapi-core/lib/utils/make-ref-id.js +function makeRefId(absoluteRef, pointer) { + return absoluteRef + "::" + pointer; } - -class WebSocketError extends createInheritableDOMException() { - #closeCode - #reason - - constructor (message = '', init = undefined) { - message = webidl.converters.DOMString(message, 'WebSocketError', 'message') - - // 1. Set this 's name to " WebSocketError ". - // 2. Set this 's message to message . - super(message, 'WebSocketError') - - if (init === kConstruct) { - return - } else if (init !== null) { - init = webidl.converters.WebSocketCloseInfo(init) - } - - // 3. Let code be init [" closeCode "] if it exists , or null otherwise. - let code = init.closeCode ?? null - - // 4. Let reason be init [" reason "] if it exists , or the empty string otherwise. - const reason = init.reason ?? '' - - // 5. Validate close code and reason with code and reason . - validateCloseCodeAndReason(code, reason) - - // 6. If reason is non-empty, but code is not set, then set code to 1000 ("Normal Closure"). - if (reason.length !== 0 && code === null) { - code = 1000 - } - - // 7. Set this 's closeCode to code . - this.#closeCode = code - - // 8. Set this 's reason to reason . - this.#reason = reason - } - - get closeCode () { - return this.#closeCode +var init_make_ref_id = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/make-ref-id.js"() { } +}); - get reason () { - return this.#reason +// node_modules/@redocly/openapi-core/lib/utils/next-tick.js +function nextTick() { + return new Promise((resolve8) => { + setTimeout(resolve8); + }); +} +var init_next_tick = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/next-tick.js"() { } +}); - /** - * @param {string} message - * @param {number|null} code - * @param {string} reason - */ - static createUnvalidatedWebSocketError (message, code, reason) { - const error = new WebSocketError(message, kConstruct) - error.#closeCode = code - error.#reason = reason - return error +// node_modules/@redocly/openapi-core/lib/resolve.js +import * as fs4 from "node:fs"; +import * as path6 from "node:path"; +function makeDocumentFromString(sourceString, absoluteRef) { + const source = new Source(absoluteRef, sourceString); + try { + return { + source, + parsed: parseYaml(sourceString, { filename: absoluteRef }) + }; + } catch (e2) { + throw new YamlParseError(e2, source); } } - -const { createUnvalidatedWebSocketError } = WebSocketError -delete WebSocketError.createUnvalidatedWebSocketError - -Object.defineProperties(WebSocketError.prototype, { - closeCode: kEnumerableProperty, - reason: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'WebSocketError', - writable: false, - enumerable: false, - configurable: true +function pushRef(head, node) { + return { + prev: head, + node + }; +} +function hasRef(head, node) { + while (head) { + if (head.node === node) { + return true; + } + head = head.prev; } -}) - -webidl.is.WebSocketError = webidl.util.MakeTypeAssertion(WebSocketError) - -module.exports = { WebSocketError, createUnvalidatedWebSocketError } - - -/***/ }), - -/***/ 44293: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { createDeferredPromise } = __nccwpck_require__(21489) -const { environmentSettingsObject } = __nccwpck_require__(1310) -const { states, opcodes, sentCloseFrameState } = __nccwpck_require__(93587) -const { webidl } = __nccwpck_require__(81040) -const { getURLRecord, isValidSubprotocol, isEstablished, utf8Decode } = __nccwpck_require__(89902) -const { establishWebSocketConnection, failWebsocketConnection, closeWebSocketConnection } = __nccwpck_require__(88380) -const { channels } = __nccwpck_require__(58438) -const { WebsocketFrameSend } = __nccwpck_require__(2391) -const { ByteParser } = __nccwpck_require__(85442) -const { WebSocketError, createUnvalidatedWebSocketError } = __nccwpck_require__(97501) -const { kEnumerableProperty } = __nccwpck_require__(83983) -const { utf8DecodeBytes } = __nccwpck_require__(98806) - -let emittedExperimentalWarning = false - -class WebSocketStream { - // Each WebSocketStream object has an associated url , which is a URL record . - /** @type {URL} */ - #url - - // Each WebSocketStream object has an associated opened promise , which is a promise. - /** @type {import('../../../util/promise').DeferredPromise} */ - #openedPromise - - // Each WebSocketStream object has an associated closed promise , which is a promise. - /** @type {import('../../../util/promise').DeferredPromise} */ - #closedPromise - - // Each WebSocketStream object has an associated readable stream , which is a ReadableStream . - /** @type {ReadableStream} */ - #readableStream - /** @type {ReadableStreamDefaultController} */ - #readableStreamController - - // Each WebSocketStream object has an associated writable stream , which is a WritableStream . - /** @type {WritableStream} */ - #writableStream - - // Each WebSocketStream object has an associated boolean handshake aborted , which is initially false. - #handshakeAborted = false - - /** @type {import('../websocket').Handler} */ - #handler = { - // https://whatpr.org/websockets/48/7b748d3...d5570f3.html#feedback-to-websocket-stream-from-the-protocol - onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions), - onMessage: (opcode, data) => this.#onMessage(opcode, data), - onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message), - onParserDrain: () => this.#handler.socket.resume(), - onSocketData: (chunk) => { - if (!this.#parser.write(chunk)) { - this.#handler.socket.pause() + return false; +} +async function resolveDocument(opts) { + const { rootDocument, externalRefResolver, rootType } = opts; + const resolvedRefMap = /* @__PURE__ */ new Map(); + const seenNodes = /* @__PURE__ */ new Set(); + const resolvePromises = []; + resolveRefsInParallel(rootDocument.parsed, rootDocument, "#/", rootType); + let resolved; + do { + resolved = await Promise.all(resolvePromises); + } while (resolvePromises.length !== resolved.length); + return resolvedRefMap; + function resolveRefsInParallel(rootNode, rootNodeDocument, rootNodePointer, type2) { + const rootNodeDocAbsoluteRef = rootNodeDocument.source.absoluteRef; + const anchorRefsMap = /* @__PURE__ */ new Map(); + walk(rootNode, type2, rootNodeDocAbsoluteRef + rootNodePointer); + function walk(node, type3, nodeAbsoluteRef) { + if (!isPlainObject(node) && !Array.isArray(node)) { + return; } - }, - onSocketError: (err) => { - this.#handler.readyState = states.CLOSING - - if (channels.socketError.hasSubscribers) { - channels.socketError.publish(err) + const nodeId = `${type3.name}::${nodeAbsoluteRef}`; + if (seenNodes.has(nodeId)) { + return; + } + seenNodes.add(nodeId); + if (Array.isArray(node)) { + const itemsType = type3.items; + if (itemsType === void 0 && type3 !== unknownType && type3 !== SpecExtension) { + return; + } + const isTypeAFunction = typeof itemsType === "function"; + for (let i2 = 0; i2 < node.length; i2++) { + let itemType = isTypeAFunction ? itemsType(node[i2], joinPointer(nodeAbsoluteRef, i2)) : itemsType; + if (itemType === void 0 && type3 !== unknownType && type3 !== SpecExtension) { + continue; + } + const value = itemType?.directResolveAs ? { $ref: node[i2] } : node[i2]; + itemType = itemType?.directResolveAs || itemType; + walk(value, isNamedType(itemType) ? itemType : unknownType, joinPointer(nodeAbsoluteRef, i2)); + } + return; + } + const [_5, anchor] = Object.entries(node).find(([key]) => key === "$anchor") || []; + if (anchor) { + anchorRefsMap.set(`#${anchor}`, node); + } + for (const propName of Object.keys(node)) { + let propValue = node[propName]; + let propType = getOwn(type3.properties, propName); + if (propType === void 0) + propType = type3.additionalProperties; + if (typeof propType === "function") + propType = propType(propValue, propName); + if (propType === void 0) + propType = unknownType; + if (type3.extensionsPrefix && propName.startsWith(type3.extensionsPrefix) && propType === unknownType) { + propType = SpecExtension; + } + if (!isNamedType(propType) && propType?.directResolveAs) { + propType = propType.directResolveAs; + propValue = { $ref: propValue }; + } + if (propType && propType.name === void 0 && propType.resolvable !== false) { + propType = resolvableScalarType; + } + if (!isNamedType(propType) || !(isPlainObject(propValue) || Array.isArray(propValue))) { + continue; + } + walk(propValue, propType, joinPointer(nodeAbsoluteRef, escapePointerFragment(propName))); + } + if (isRef(node)) { + const promise = followRef(rootNodeDocument, node, { + prev: null, + node + }).then((resolvedRef) => { + if (resolvedRef.resolved) { + resolveRefsInParallel(resolvedRef.node, resolvedRef.document, resolvedRef.nodePointer, type3); + } + }); + resolvePromises.push(promise); + } + if (isExternalValue(node)) { + const promise = followRef(rootNodeDocument, { $ref: node.externalValue }, { + prev: null, + node + }).then((resolvedRef) => { + if (resolvedRef.resolved) { + resolveRefsInParallel(resolvedRef.node, resolvedRef.document, resolvedRef.nodePointer, type3); + } + }); + resolvePromises.push(promise); } - - this.#handler.socket.destroy() - }, - onSocketClose: () => this.#onSocketClose(), - onPing: () => {}, - onPong: () => {}, - - readyState: states.CONNECTING, - socket: null, - closeState: new Set(), - controller: null, - wasEverConnected: false - } - - /** @type {import('../receiver').ByteParser} */ - #parser - - constructor (url, options = undefined) { - if (!emittedExperimentalWarning) { - process.emitWarning('WebSocketStream is experimental! Expect it to change at any time.', { - code: 'UNDICI-WSS' - }) - emittedExperimentalWarning = true - } - - webidl.argumentLengthCheck(arguments, 1, 'WebSocket') - - url = webidl.converters.USVString(url) - if (options !== null) { - options = webidl.converters.WebSocketStreamOptions(options) - } - - // 1. Let baseURL be this 's relevant settings object 's API base URL . - const baseURL = environmentSettingsObject.settingsObject.baseUrl - - // 2. Let urlRecord be the result of getting a URL record given url and baseURL . - const urlRecord = getURLRecord(url, baseURL) - - // 3. Let protocols be options [" protocols "] if it exists , otherwise an empty sequence. - const protocols = options.protocols - - // 4. 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 . [WSP] - 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') } - - // 5. Set this 's url to urlRecord . - this.#url = urlRecord.toString() - - // 6. Set this 's opened promise and closed promise to new promises. - this.#openedPromise = createDeferredPromise() - this.#closedPromise = createDeferredPromise() - - // 7. Apply backpressure to the WebSocket. - // TODO - - // 8. If options [" signal "] exists , - if (options.signal != null) { - // 8.1. Let signal be options [" signal "]. - const signal = options.signal - - // 8.2. If signal is aborted , then reject this 's opened promise and closed promise with signal ’s abort reason - // and return. - if (signal.aborted) { - this.#openedPromise.reject(signal.reason) - this.#closedPromise.reject(signal.reason) - return + async function followRef(document2, ref, refStack) { + if (hasRef(refStack.prev, ref)) { + throw new Error("Self-referencing circular pointer"); } - - // 8.3. Add the following abort steps to signal : - signal.addEventListener('abort', () => { - // 8.3.1. If the WebSocket connection is not yet established : [WSP] - if (!isEstablished(this.#handler.readyState)) { - // 8.3.1.1. Fail the WebSocket connection . - failWebsocketConnection(this.#handler) - - // Set this 's ready state to CLOSING . - this.#handler.readyState = states.CLOSING - - // Reject this 's opened promise and closed promise with signal ’s abort reason . - this.#openedPromise.reject(signal.reason) - this.#closedPromise.reject(signal.reason) - - // Set this 's handshake aborted to true. - this.#handshakeAborted = true + if (isAnchor(ref.$ref)) { + await nextTick(); + const resolvedRef2 = { + resolved: true, + isRemote: false, + node: anchorRefsMap.get(ref.$ref), + document: document2, + nodePointer: ref.$ref + }; + const refId2 = makeRefId(document2.source.absoluteRef, ref.$ref); + resolvedRefMap.set(refId2, resolvedRef2); + return resolvedRef2; + } + const { uri, pointer } = parseRef(ref.$ref); + const isRemote = uri !== null && externalRefResolver.resolveExternalRef(document2.source.absoluteRef, uri) !== document2.source.absoluteRef; + let targetDoc; + try { + targetDoc = isRemote ? await externalRefResolver.resolveDocument(document2.source.absoluteRef, uri) : document2; + } catch (error2) { + const resolvedRef2 = { + resolved: false, + isRemote, + document: void 0, + error: error2 + }; + const refId2 = makeRefId(document2.source.absoluteRef, ref.$ref); + resolvedRefMap.set(refId2, resolvedRef2); + return resolvedRef2; + } + let resolvedRef = { + resolved: true, + document: targetDoc, + isRemote, + node: document2.parsed, + nodePointer: "#/" + }; + let target = targetDoc.parsed; + const segments = pointer; + for (const segment of segments) { + if (isPlainObject(target) && target[segment] !== void 0) { + target = target[segment]; + resolvedRef.nodePointer = joinPointer(resolvedRef.nodePointer, escapePointerFragment(segment)); + } else if (Array.isArray(target) && target[+segment] !== void 0) { + target = target[+segment]; + resolvedRef.nodePointer = joinPointer(resolvedRef.nodePointer, escapePointerFragment(segment)); + } else if (isRef(target)) { + resolvedRef = await followRef(targetDoc, target, pushRef(refStack, target)); + targetDoc = resolvedRef.document || targetDoc; + if (isPlainObject(resolvedRef.node)) { + target = resolvedRef.node[segment]; + resolvedRef.nodePointer = joinPointer(resolvedRef.nodePointer, escapePointerFragment(segment)); + } else if (Array.isArray(resolvedRef.node)) { + target = resolvedRef.node[+segment]; + resolvedRef.nodePointer = joinPointer(resolvedRef.nodePointer, escapePointerFragment(segment)); + } else { + target = void 0; + break; + } + } else { + target = void 0; + break; } - }, { once: true }) - } - - // 9. Let client be this 's relevant settings object . - const client = environmentSettingsObject.settingsObject - - // 10. Run this step in parallel : - // 10.1. Establish a WebSocket connection given urlRecord , protocols , and client . [FETCH] - this.#handler.controller = establishWebSocketConnection( - urlRecord, - protocols, - client, - this.#handler, - options - ) - } - - // The url getter steps are to return this 's url , serialized . - get url () { - return this.#url.toString() + } + resolvedRef.node = target; + resolvedRef.document = targetDoc; + const refId = makeRefId(document2.source.absoluteRef, ref.$ref); + if (resolvedRef.document && isRef(target)) { + resolvedRef = await followRef(resolvedRef.document, target, pushRef(refStack, target)); + } + resolvedRefMap.set(refId, resolvedRef); + return { ...resolvedRef }; + } + } +} +var Source, ResolveError, BaseResolver, unknownType, resolvableScalarType; +var init_resolve = __esm({ + "node_modules/@redocly/openapi-core/lib/resolve.js"() { + init_yaml_parse_error(); + init_js_yaml2(); + init_ref_utils(); + init_types(); + init_get_own(); + init_is_plain_object(); + init_make_ref_id(); + init_next_tick(); + init_read_file_from_url(); + Source = class { + absoluteRef; + body; + mimeType; + constructor(absoluteRef, body, mimeType) { + this.absoluteRef = absoluteRef; + this.body = body; + this.mimeType = mimeType; + } + #ast; + #lines; + // pass safeLoad as argument to separate it from browser bundle + getAst(safeLoad3) { + if (this.#ast === void 0) { + this.#ast = safeLoad3(this.body, { filename: this.absoluteRef }) ?? void 0; + if (this.#ast && this.#ast.kind === 0 && // KIND.scalar = 0 + this.#ast.value === "" && this.#ast.startPosition !== 1) { + this.#ast.startPosition = 1; + this.#ast.endPosition = 1; + } + } + return this.#ast; + } + getLines() { + if (this.#lines === void 0) { + this.#lines = this.body.split(/\r\n|[\n\r]/g); + } + return this.#lines; + } + }; + ResolveError = class _ResolveError extends Error { + originalError; + constructor(originalError) { + super(originalError.message); + this.originalError = originalError; + Object.setPrototypeOf(this, _ResolveError.prototype); + } + }; + BaseResolver = class { + config; + cache = /* @__PURE__ */ new Map(); + constructor(config = { http: { headers: [] } }) { + this.config = config; + } + getFiles() { + return new Set(Array.from(this.cache.keys())); + } + resolveExternalRef(base, ref) { + if (isAbsoluteUrl(ref)) { + return ref; + } + if (base && isAbsoluteUrl(base)) { + return new URL(ref, base).href; + } + return path6.resolve(base ? path6.dirname(base) : process.cwd(), ref); + } + async loadExternalRef(absoluteRef) { + try { + if (isAbsoluteUrl(absoluteRef)) { + const { body, mimeType } = await readFileFromUrl(absoluteRef, this.config.http); + return new Source(absoluteRef, body, mimeType); + } else { + if (fs4.lstatSync(absoluteRef).isDirectory()) { + throw new Error(`Expected a file but received a folder at ${absoluteRef}.`); + } + const content = await fs4.promises.readFile(absoluteRef, "utf-8"); + return new Source(absoluteRef, content.replace(/\r\n/g, "\n")); + } + } catch (error2) { + error2.message = error2.message.replace(", lstat", ""); + throw new ResolveError(error2); + } + } + parseDocument(source, isRoot = false) { + const ext = source.absoluteRef.substr(source.absoluteRef.lastIndexOf(".")); + if (![".json", ".json", ".yml", ".yaml"].includes(ext) && !source.mimeType?.match(/(json|yaml|openapi)/) && !isRoot) { + return { source, parsed: source.body }; + } + try { + return { + source, + parsed: parseYaml(source.body, { filename: source.absoluteRef }) + }; + } catch (e2) { + throw new YamlParseError(e2, source); + } + } + async resolveDocument(base, ref, isRoot = false) { + const absoluteRef = this.resolveExternalRef(base, ref); + const cachedDocument = this.cache.get(absoluteRef); + if (cachedDocument) { + return cachedDocument; + } + const doc = this.loadExternalRef(absoluteRef).then((source) => { + return this.parseDocument(source, isRoot); + }); + this.cache.set(absoluteRef, doc); + return doc; + } + }; + unknownType = { name: "unknown", properties: {} }; + resolvableScalarType = { name: "scalar", properties: {} }; } +}); - // The opened getter steps are to return this 's opened promise . - get opened () { - return this.#openedPromise.promise +// node_modules/@redocly/openapi-core/lib/visitors.js +function normalizeVisitors(visitorsConfig, types2) { + const normalizedVisitors = {}; + normalizedVisitors.any = { + enter: [], + leave: [] + }; + for (const typeName of Object.keys(types2)) { + normalizedVisitors[typeName] = { + enter: [], + leave: [] + }; } - - // The closed getter steps are to return this 's closed promise . - get closed () { - return this.#closedPromise.promise + normalizedVisitors.ref = { + enter: [], + leave: [] + }; + for (const { ruleId, severity, message, visitor } of visitorsConfig) { + normalizeVisitorLevel({ ruleId, severity, message }, visitor, null); } - - // The close( closeInfo ) method steps are: - close (closeInfo = undefined) { - if (closeInfo !== null) { - closeInfo = webidl.converters.WebSocketCloseInfo(closeInfo) - } - - // 1. Let code be closeInfo [" closeCode "] if present, or null otherwise. - const code = closeInfo.closeCode ?? null - - // 2. Let reason be closeInfo [" reason "]. - const reason = closeInfo.reason - - // 3. Close the WebSocket with this , code , and reason . - closeWebSocketConnection(this.#handler, code, reason, true) + for (const v3 of Object.keys(normalizedVisitors)) { + normalizedVisitors[v3].enter.sort((a2, b2) => b2.depth - a2.depth); + normalizedVisitors[v3].leave.sort((a2, b2) => a2.depth - b2.depth); } - - #write (chunk) { - // See /websockets/stream/tentative/write.any.html - chunk = webidl.converters.WebSocketStreamWrite(chunk) - - // 1. Let promise be a new promise created in stream ’s relevant realm . - const promise = createDeferredPromise() - - // 2. Let data be null. - let data = null - - // 3. Let opcode be null. - let opcode = null - - // 4. If chunk is a BufferSource , - if (webidl.is.BufferSource(chunk)) { - // 4.1. Set data to a copy of the bytes given chunk . - data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk.slice()) - - // 4.2. Set opcode to a binary frame opcode. - opcode = opcodes.BINARY - } else { - // 5. Otherwise, - - // 5.1. Let string be the result of converting chunk to an IDL USVString . - // If this throws an exception, return a promise rejected with the exception. - let string - - try { - string = webidl.converters.DOMString(chunk) - } catch (e) { - promise.reject(e) - return promise.promise + return normalizedVisitors; + function addWeakNodes(ruleConf, from, to2, parentContext, stack = []) { + if (stack.includes(from)) + return; + stack = [...stack, from]; + const possibleChildren = /* @__PURE__ */ new Set(); + for (const type2 of Object.values(from.properties)) { + if (type2 === to2) { + addWeakFromStack(ruleConf, stack); + continue; } - - // 5.2. Set data to the result of UTF-8 encoding string . - data = new TextEncoder().encode(string) - - // 5.3. Set opcode to a text frame opcode. - opcode = opcodes.TEXT - } - - // 6. In parallel, - // 6.1. Wait until there is sufficient buffer space in stream to send the message. - - // 6.2. If the closing handshake has not yet started , Send a WebSocket Message to stream comprised of data using opcode . - if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { - const frame = new WebsocketFrameSend(data) - - this.#handler.socket.write(frame.createFrame(opcode), () => { - promise.resolve(undefined) - }) - } - - // 6.3. Queue a global task on the WebSocket task source given stream ’s relevant global object to resolve promise with undefined. - return promise.promise - } - - /** @type {import('../websocket').Handler['onConnectionEstablished']} */ - #onConnectionEstablished (response, parsedExtensions) { - this.#handler.socket = response.socket - - const parser = new ByteParser(this.#handler, parsedExtensions) - parser.on('drain', () => this.#handler.onParserDrain()) - parser.on('error', (err) => this.#handler.onParserError(err)) - - this.#parser = parser - - // 1. Change stream ’s ready state to OPEN (1). - this.#handler.readyState = states.OPEN - - // 2. Set stream ’s was ever connected to true. - // This is done in the opening handshake. - - // 3. Let extensions be the extensions in use . - const extensions = parsedExtensions ?? '' - - // 4. Let protocol be the subprotocol in use . - const protocol = response.headersList.get('sec-websocket-protocol') ?? '' - - // 5. Let pullAlgorithm be an action that pulls bytes from stream . - // 6. Let cancelAlgorithm be an action that cancels stream with reason , given reason . - // 7. Let readable be a new ReadableStream . - // 8. Set up readable with pullAlgorithm and cancelAlgorithm . - const readable = new ReadableStream({ - start: (controller) => { - this.#readableStreamController = controller - }, - pull (controller) { - let chunk - while (controller.desiredSize > 0 && (chunk = response.socket.read()) !== null) { - controller.enqueue(chunk) - } - }, - cancel: (reason) => this.#cancel(reason) - }) - - // 9. Let writeAlgorithm be an action that writes chunk to stream , given chunk . - // 10. Let closeAlgorithm be an action that closes stream . - // 11. Let abortAlgorithm be an action that aborts stream with reason , given reason . - // 12. Let writable be a new WritableStream . - // 13. Set up writable with writeAlgorithm , closeAlgorithm , and abortAlgorithm . - const writable = new WritableStream({ - write: (chunk) => this.#write(chunk), - close: () => closeWebSocketConnection(this.#handler, null, null), - abort: (reason) => this.#closeUsingReason(reason) - }) - - // Set stream ’s readable stream to readable . - this.#readableStream = readable - - // Set stream ’s writable stream to writable . - this.#writableStream = writable - - // Resolve stream ’s opened promise with WebSocketOpenInfo «[ " extensions " → extensions , " protocol " → protocol , " readable " → readable , " writable " → writable ]». - this.#openedPromise.resolve({ - extensions, - protocol, - readable, - writable - }) - } - - /** @type {import('../websocket').Handler['onMessage']} */ - #onMessage (type, data) { - // 1. If stream’s ready state is not OPEN (1), then return. - if (this.#handler.readyState !== states.OPEN) { - return - } - - // 2. Let chunk be determined by switching on type: - // - type indicates that the data is Text - // a new DOMString containing data - // - type indicates that the data is Binary - // a new Uint8Array object, created in the relevant Realm of the - // WebSocketStream object, whose contents are data - let chunk - - if (type === opcodes.TEXT) { - try { - chunk = utf8Decode(data) - } catch { - failWebsocketConnection(this.#handler, 'Received invalid UTF-8 in text frame.') - return + if (isPlainObject(type2) && type2.name !== void 0) { + possibleChildren.add(type2); } - } else if (type === opcodes.BINARY) { - chunk = new Uint8Array(data.buffer, data.byteOffset, data.byteLength) } - - // 3. Enqueue chunk into stream’s readable stream. - this.#readableStreamController.enqueue(chunk) - - // 4. Apply backpressure to the WebSocket. - } - - /** @type {import('../websocket').Handler['onSocketClose']} */ - #onSocketClose () { - const wasClean = - this.#handler.closeState.has(sentCloseFrameState.SENT) && - this.#handler.closeState.has(sentCloseFrameState.RECEIVED) - - // 1. Change the ready state to CLOSED (3). - this.#handler.readyState = states.CLOSED - - // 2. If stream ’s handshake aborted is true, then return. - if (this.#handshakeAborted) { - return + if (from.additionalProperties && typeof from.additionalProperties !== "function") { + if (from.additionalProperties === to2) { + addWeakFromStack(ruleConf, stack); + } else if (from.additionalProperties.name !== void 0) { + possibleChildren.add(from.additionalProperties); + } } - - // 3. If stream ’s was ever connected is false, then reject stream ’s opened promise with a new WebSocketError. - if (!this.#handler.wasEverConnected) { - this.#openedPromise.reject(new WebSocketError('Socket never opened')) + if (from.items && typeof from.items !== "function") { + if (from.items === to2) { + addWeakFromStack(ruleConf, stack); + } else if (from.items.name !== void 0) { + possibleChildren.add(from.items); + } } - - const result = this.#parser?.closingInfo - - // 4. Let code be the WebSocket connection close code . - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 - // If this Close control frame contains no status code, _The WebSocket - // Connection Close Code_ is considered to be 1005. 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. - let code = result?.code ?? 1005 - - if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { - code = 1006 + if (from.extensionsPrefix) { + possibleChildren.add(SpecExtension); } - - // 5. Let reason be the result of applying UTF-8 decode without BOM to the WebSocket connection close reason . - const reason = result?.reason == null ? '' : utf8DecodeBytes(Buffer.from(result.reason)) - - // 6. If the connection was closed cleanly , - if (wasClean) { - // 6.1. Close stream ’s readable stream . - this.#readableStreamController.close() - - // 6.2. Error stream ’s writable stream with an " InvalidStateError " DOMException indicating that a closed WebSocketStream cannot be written to. - if (!this.#writableStream.locked) { - this.#writableStream.abort(new DOMException('A closed WebSocketStream cannot be written to', 'InvalidStateError')) + for (const fromType of Array.from(possibleChildren.values())) { + addWeakNodes(ruleConf, fromType, to2, parentContext, stack); + } + function addWeakFromStack(ruleConf2, stack2) { + for (const interType of stack2.slice(1)) { + normalizedVisitors[interType.name] = normalizedVisitors[interType.name] || { + enter: [], + leave: [] + }; + normalizedVisitors[interType.name].enter.push({ + ...ruleConf2, + visit: () => void 0, + depth: 0, + context: { + isSkippedLevel: true, + seen: /* @__PURE__ */ new Set(), + parent: parentContext + } + }); } - - // 6.3. Resolve stream ’s closed promise with WebSocketCloseInfo «[ " closeCode " → code , " reason " → reason ]». - this.#closedPromise.resolve({ - closeCode: code, - reason - }) - } else { - // 7. Otherwise, - - // 7.1. Let error be a new WebSocketError whose closeCode is code and reason is reason . - const error = createUnvalidatedWebSocketError('unclean close', code, reason) - - // 7.2. Error stream ’s readable stream with error . - this.#readableStreamController?.error(error) - - // 7.3. Error stream ’s writable stream with error . - this.#writableStream?.abort(error) - - // 7.4. Reject stream ’s closed promise with error . - this.#closedPromise.reject(error) } } - - #closeUsingReason (reason) { - // 1. Let code be null. - let code = null - - // 2. Let reasonString be the empty string. - let reasonString = '' - - // 3. If reason implements WebSocketError , - if (webidl.is.WebSocketError(reason)) { - // 3.1. Set code to reason ’s closeCode . - code = reason.closeCode - - // 3.2. Set reasonString to reason ’s reason . - reasonString = reason.reason + function findLegacyVisitorNode(visitor, typeName) { + if (Array.isArray(typeName)) { + const name = typeName.find((name2) => visitor[name2]) || void 0; + return name && visitor[name]; } - - // 4. Close the WebSocket with stream , code , and reasonString . If this throws an exception, - // discard code and reasonString and close the WebSocket with stream . - closeWebSocketConnection(this.#handler, code, reasonString) + return visitor[typeName]; } - - // To cancel a WebSocketStream stream given reason , close using reason giving stream and reason . - #cancel (reason) { - this.#closeUsingReason(reason) + function normalizeVisitorLevel(ruleConf, visitor, parentContext, depth = 0) { + const visitorKeys = Object.keys(types2); + if (depth === 0) { + visitorKeys.push("any"); + visitorKeys.push("ref"); + } else { + if (visitor.any) { + throw new Error("any() is allowed only on top level"); + } + if (visitor.ref) { + throw new Error("ref() is allowed only on top level"); + } + } + for (const typeName of visitorKeys) { + const typeVisitor = visitor[typeName] || findLegacyVisitorNode(visitor, legacyTypesMap[typeName]); + const normalizedTypeVisitor = normalizedVisitors[typeName]; + if (!typeVisitor) + continue; + let visitorEnter; + let visitorLeave; + let visitorSkip; + const isObjectVisitor = isPlainObject(typeVisitor); + if (typeName === "ref" && isObjectVisitor && typeVisitor.skip) { + throw new Error("ref() visitor does not support skip"); + } + if (typeof typeVisitor === "function") { + visitorEnter = typeVisitor; + } else if (isObjectVisitor) { + visitorEnter = typeVisitor.enter; + visitorLeave = typeVisitor.leave; + visitorSkip = typeVisitor.skip; + } + const standardKeysCount = (visitorEnter ? 1 : 0) + (visitorLeave ? 1 : 0) + (visitorSkip ? 1 : 0); + const hasNestedVisitors = isObjectVisitor && Object.keys(typeVisitor).length > standardKeysCount; + const context2 = { + activatedOn: null, + type: types2[typeName], + parent: parentContext, + isSkippedLevel: false + }; + if (hasNestedVisitors) { + normalizeVisitorLevel(ruleConf, typeVisitor, context2, depth + 1); + } + if (parentContext) { + addWeakNodes(ruleConf, parentContext.type, types2[typeName], parentContext); + } + if (visitorEnter || isObjectVisitor) { + if (visitorEnter && typeof visitorEnter !== "function") { + throw new Error("DEV: should be function"); + } + normalizedTypeVisitor.enter.push({ + ...ruleConf, + visit: visitorEnter || (() => void 0), + skip: visitorSkip, + depth, + context: context2 + }); + } + if (visitorLeave) { + if (typeof visitorLeave !== "function") { + throw new Error("DEV: should be function"); + } + normalizedTypeVisitor.leave.push({ + ...ruleConf, + visit: visitorLeave, + depth, + context: context2 + }); + } + } } } - -Object.defineProperties(WebSocketStream.prototype, { - url: kEnumerableProperty, - opened: kEnumerableProperty, - closed: kEnumerableProperty, - close: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'WebSocketStream', - writable: false, - enumerable: false, - configurable: true - } -}) - -webidl.converters.WebSocketStreamOptions = webidl.dictionaryConverter([ - { - key: 'protocols', - converter: webidl.sequenceConverter(webidl.converters.USVString), - defaultValue: () => [] - }, - { - key: 'signal', - converter: webidl.nullableConverter(webidl.converters.AbortSignal), - defaultValue: () => null - } -]) - -webidl.converters.WebSocketCloseInfo = webidl.dictionaryConverter([ - { - key: 'closeCode', - converter: (V) => webidl.converters['unsigned short'](V, webidl.attributes.EnforceRange) - }, - { - key: 'reason', - converter: webidl.converters.USVString, - defaultValue: () => '' - } -]) - -webidl.converters.WebSocketStreamWrite = function (V) { - if (typeof V === 'string') { - return webidl.converters.USVString(V) - } - - return webidl.converters.BufferSource(V) -} - -module.exports = { WebSocketStream } - - -/***/ }), - -/***/ 89902: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { states, opcodes } = __nccwpck_require__(93587) -const { isUtf8 } = __nccwpck_require__(72254) -const { removeHTTPWhitespace } = __nccwpck_require__(17704) -const { collectASequenceOfCodePointsFast } = __nccwpck_require__(93082) - -/** - * @param {number} readyState - * @returns {boolean} - */ -function isConnecting (readyState) { - // 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 readyState === states.CONNECTING -} - -/** - * @param {number} readyState - * @returns {boolean} - */ -function isEstablished (readyState) { - // 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 readyState === states.OPEN -} - -/** - * @param {number} readyState - * @returns {boolean} - */ -function isClosing (readyState) { - // 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 readyState === states.CLOSING -} - -/** - * @param {number} readyState - * @returns {boolean} - */ -function isClosed (readyState) { - return readyState === 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 - * @returns {void} - */ -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').Handler} handler - * @param {number} type Opcode - * @param {Buffer} data application data - * @returns {void} - */ -function websocketMessageReceived (handler, type, data) { - handler.onMessage(type, data) -} - -/** - * @param {Buffer} buffer - * @returns {ArrayBuffer} - */ -function toArrayBuffer (buffer) { - if (buffer.byteLength === buffer.buffer.byteLength) { - return buffer.buffer +var legacyTypesMap; +var init_visitors = __esm({ + "node_modules/@redocly/openapi-core/lib/visitors.js"() { + init_types(); + init_is_plain_object(); + legacyTypesMap = { + Root: "DefinitionRoot", + ServerVariablesMap: "ServerVariableMap", + Paths: ["PathMap", "PathsMap"], + CallbacksMap: "CallbackMap", + MediaTypesMap: "MediaTypeMap", + ExamplesMap: "ExampleMap", + EncodingMap: "EncodingsMap", + HeadersMap: "HeaderMap", + LinksMap: "LinkMap", + OAuth2Flows: "SecuritySchemeFlows", + Responses: "ResponsesMap" + }; } - return new Uint8Array(buffer).buffer -} +}); -/** - * @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 - * @returns {boolean} - */ -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 +// node_modules/@redocly/openapi-core/lib/utils/assign-config.js +function assignOnlyExistingConfig(target, obj) { + if (!obj) + return; + for (const k3 of Object.keys(obj)) { + if (!target.hasOwnProperty(k3)) + continue; + if (isPlainObject(target[k3]) && typeof obj[k3] === "string") { + target[k3] = { ...target[k3], severity: obj[k3] }; + } else { + target[k3] = obj[k3]; + } + } } +var assignConfig; +var init_assign_config = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/assign-config.js"() { + init_is_plain_object(); + assignConfig = (target, obj) => { + if (!obj) + return; + for (const k3 of Object.keys(obj)) { + if (isPlainObject(target[k3]) && typeof obj[k3] === "string") { + target[k3] = { ...target[k3], severity: obj[k3] }; + } else { + target[k3] = obj[k3]; + } + } + }; + } +}); -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 - * @param {number} code - * @returns {boolean} - */ -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 +// node_modules/@redocly/openapi-core/lib/config/utils.js +function parsePresetName(presetName) { + if (presetName.indexOf("/") > -1) { + const [pluginId, configName] = presetName.split("/"); + return { pluginId, configName }; + } else { + return { pluginId: "", configName: presetName }; + } } - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 - * @param {number} opcode - * @returns {boolean} - */ -function isControlFrame (opcode) { - return ( - opcode === opcodes.CLOSE || - opcode === opcodes.PING || - opcode === opcodes.PONG - ) +function prefixRules(rules8, prefix) { + if (!prefix) + return rules8; + const res = {}; + for (const name of Object.keys(rules8)) { + res[`${prefix}/${name}`] = rules8[name]; + } + return res; } - -/** - * @param {number} opcode - * @returns {boolean} - */ -function isContinuationFrame (opcode) { - return opcode === opcodes.CONTINUATION +function mergeExtends(rulesConfList) { + const result = { + rules: {}, + oas2Rules: {}, + oas3_0Rules: {}, + oas3_1Rules: {}, + oas3_2Rules: {}, + async2Rules: {}, + async3Rules: {}, + arazzo1Rules: {}, + overlay1Rules: {}, + openrpc1Rules: {}, + preprocessors: {}, + oas2Preprocessors: {}, + oas3_0Preprocessors: {}, + oas3_1Preprocessors: {}, + oas3_2Preprocessors: {}, + async2Preprocessors: {}, + async3Preprocessors: {}, + arazzo1Preprocessors: {}, + overlay1Preprocessors: {}, + openrpc1Preprocessors: {}, + decorators: {}, + oas2Decorators: {}, + oas3_0Decorators: {}, + oas3_1Decorators: {}, + oas3_2Decorators: {}, + async2Decorators: {}, + async3Decorators: {}, + arazzo1Decorators: {}, + overlay1Decorators: {}, + openrpc1Decorators: {} + }; + for (const rulesConf of rulesConfList) { + if (isPlainObject(rulesConf) && "extends" in rulesConf && rulesConf.extends !== void 0) { + throw new Error(`'extends' is not supported in shared configs yet: +${JSON.stringify(rulesConf, null, 2)}`); + } + assignConfig(result.rules, rulesConf.rules); + assignConfig(result.oas2Rules, rulesConf.oas2Rules); + assignOnlyExistingConfig(result.oas2Rules, rulesConf.rules); + assignConfig(result.oas3_0Rules, rulesConf.oas3_0Rules); + assignOnlyExistingConfig(result.oas3_0Rules, rulesConf.rules); + assignConfig(result.oas3_1Rules, rulesConf.oas3_1Rules); + assignOnlyExistingConfig(result.oas3_1Rules, rulesConf.rules); + assignConfig(result.oas3_2Rules, rulesConf.oas3_2Rules); + assignOnlyExistingConfig(result.oas3_2Rules, rulesConf.rules); + assignConfig(result.async2Rules, rulesConf.async2Rules); + assignOnlyExistingConfig(result.async2Rules, rulesConf.rules); + assignConfig(result.async3Rules, rulesConf.async3Rules); + assignOnlyExistingConfig(result.async3Rules, rulesConf.rules); + assignConfig(result.arazzo1Rules, rulesConf.arazzo1Rules); + assignOnlyExistingConfig(result.arazzo1Rules, rulesConf.rules); + assignConfig(result.overlay1Rules, rulesConf.overlay1Rules); + assignOnlyExistingConfig(result.overlay1Rules, rulesConf.rules); + assignConfig(result.openrpc1Rules, rulesConf.openrpc1Rules); + assignOnlyExistingConfig(result.openrpc1Rules, rulesConf.rules); + assignConfig(result.preprocessors, rulesConf.preprocessors); + assignConfig(result.oas2Preprocessors, rulesConf.oas2Preprocessors); + assignOnlyExistingConfig(result.oas2Preprocessors, rulesConf.preprocessors); + assignConfig(result.oas3_0Preprocessors, rulesConf.oas3_0Preprocessors); + assignOnlyExistingConfig(result.oas3_0Preprocessors, rulesConf.preprocessors); + assignConfig(result.oas3_1Preprocessors, rulesConf.oas3_1Preprocessors); + assignOnlyExistingConfig(result.oas3_1Preprocessors, rulesConf.preprocessors); + assignConfig(result.oas3_2Preprocessors, rulesConf.oas3_2Preprocessors); + assignOnlyExistingConfig(result.oas3_2Preprocessors, rulesConf.preprocessors); + assignConfig(result.async2Preprocessors, rulesConf.async2Preprocessors); + assignOnlyExistingConfig(result.async2Preprocessors, rulesConf.preprocessors); + assignConfig(result.async3Preprocessors, rulesConf.async3Preprocessors); + assignOnlyExistingConfig(result.async3Preprocessors, rulesConf.preprocessors); + assignConfig(result.arazzo1Preprocessors, rulesConf.arazzo1Preprocessors); + assignOnlyExistingConfig(result.arazzo1Preprocessors, rulesConf.preprocessors); + assignConfig(result.overlay1Preprocessors, rulesConf.overlay1Preprocessors); + assignOnlyExistingConfig(result.overlay1Preprocessors, rulesConf.preprocessors); + assignConfig(result.openrpc1Preprocessors, rulesConf.openrpc1Preprocessors); + assignOnlyExistingConfig(result.openrpc1Preprocessors, rulesConf.preprocessors); + assignConfig(result.decorators, rulesConf.decorators); + assignConfig(result.oas2Decorators, rulesConf.oas2Decorators); + assignOnlyExistingConfig(result.oas2Decorators, rulesConf.decorators); + assignConfig(result.oas3_0Decorators, rulesConf.oas3_0Decorators); + assignOnlyExistingConfig(result.oas3_0Decorators, rulesConf.decorators); + assignConfig(result.oas3_1Decorators, rulesConf.oas3_1Decorators); + assignOnlyExistingConfig(result.oas3_1Decorators, rulesConf.decorators); + assignConfig(result.oas3_2Decorators, rulesConf.oas3_2Decorators); + assignOnlyExistingConfig(result.oas3_2Decorators, rulesConf.decorators); + assignConfig(result.async2Decorators, rulesConf.async2Decorators); + assignOnlyExistingConfig(result.async2Decorators, rulesConf.decorators); + assignConfig(result.async3Decorators, rulesConf.async3Decorators); + assignOnlyExistingConfig(result.async3Decorators, rulesConf.decorators); + assignConfig(result.arazzo1Decorators, rulesConf.arazzo1Decorators); + assignOnlyExistingConfig(result.arazzo1Decorators, rulesConf.decorators); + assignConfig(result.overlay1Decorators, rulesConf.overlay1Decorators); + assignOnlyExistingConfig(result.overlay1Decorators, rulesConf.decorators); + assignConfig(result.openrpc1Decorators, rulesConf.openrpc1Decorators); + assignOnlyExistingConfig(result.openrpc1Decorators, rulesConf.decorators); + } + return result; } - -/** - * @param {number} opcode - * @returns {boolean} - */ -function isTextBinaryFrame (opcode) { - return opcode === opcodes.TEXT || opcode === opcodes.BINARY +function deepCloneMapWithJSON(originalMap) { + return new Map(JSON.parse(JSON.stringify([...originalMap]))); } - -/** - * - * @param {number} opcode - * @returns {boolean} - */ -function isValidOpcode (opcode) { - return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode) +function isDeprecatedPluginFormat(plugin) { + return isPlainObject(plugin) && "id" in plugin; } - -/** - * 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('=', 2) - - extensionList.set( - removeHTTPWhitespace(name, true, false), - removeHTTPWhitespace(value, false, true) - ) - - position.position++ +function isCommonJsPlugin(plugin) { + return typeof plugin === "function"; +} +var ConfigValidationError; +var init_utils3 = __esm({ + "node_modules/@redocly/openapi-core/lib/config/utils.js"() { + init_assign_config(); + init_is_plain_object(); + ConfigValidationError = class extends Error { + }; } +}); - 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 - * @returns {boolean} - */ -function isValidClientWindowBits (value) { - // Must have at least one character - if (value.length === 0) { - return false +// node_modules/@redocly/openapi-core/lib/config/bundle-extends.js +import path7 from "node:path"; +function bundleExtends({ node, ctx, plugins }) { + if (!node.extends) { + return node; } - - // 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 + const resolvedExtends = (node.extends || []).filter(isTruthy).map((presetItem) => { + if (!isAbsoluteUrl(presetItem) && !path7.extname(presetItem)) { + return resolvePreset(presetItem, plugins); } - } - - // Check numeric range: zlib requires windowBits in range 8-15 - const num = Number.parseInt(value, 10) - return num >= 8 && num <= 15 + const resolvedRef = ctx.resolve({ $ref: presetItem }); + if (resolvedRef.location && resolvedRef.node !== void 0) { + return resolvedRef.node; + } + return null; + }).filter(isTruthy); + return mergeExtends([ + ...resolvedExtends.map((nested) => bundleExtends({ node: nested, ctx, plugins })), + { ...node, extends: void 0 } + ]); } - -/** - * @see https://whatpr.org/websockets/48/7b748d3...d5570f3.html#get-a-url-record - * @param {string} url - * @param {string} [baseURL] - */ -function getURLRecord (url, baseURL) { - // 1. Let urlRecord be the result of applying the URL parser to url with baseURL . - // 2. If urlRecord is failure, then throw a " SyntaxError " DOMException . - let urlRecord - - try { - urlRecord = new URL(url, baseURL) - } catch (e) { - throw new DOMException(e, 'SyntaxError') - } - - // 3. If urlRecord ’s scheme is " http ", then set urlRecord ’s scheme to " ws ". - // 4. Otherwise, if urlRecord ’s scheme is " https ", set urlRecord ’s scheme to " wss ". - if (urlRecord.protocol === 'http:') { - urlRecord.protocol = 'ws:' - } else if (urlRecord.protocol === 'https:') { - urlRecord.protocol = 'wss:' - } - - // 5. 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: url', 'SyntaxError') +var init_bundle_extends = __esm({ + "node_modules/@redocly/openapi-core/lib/config/bundle-extends.js"() { + init_ref_utils(); + init_is_truthy(); + init_config_resolvers(); + init_utils3(); } +}); - // If urlRecord ’s fragment is non-null, then throw a " SyntaxError " DOMException . - if (urlRecord.hash.length || urlRecord.href.endsWith('#')) { - throw new DOMException('hash', 'SyntaxError') +// node_modules/@redocly/openapi-core/lib/config/visitors.js +function collectorHandleNode(node, ctx) { + if (isPlainObject(node) && Array.isArray(node.plugins)) { + const { plugins, rootConfigDir } = ctx.getVisitorData(); + plugins.push(...node.plugins.map((p2) => { + return preResolvePluginPath( + p2, + ctx.location.source.absoluteRef.replace(/^file:\/\//, ""), + // remove file URL prefix for OpenAPI language server + rootConfigDir + ); + })); } - - // Return urlRecord . - return urlRecord } - -// https://whatpr.org/websockets/48.html#validate-close-code-and-reason -function validateCloseCodeAndReason (code, reason) { - // 1. If code is not null, but is neither an integer equal to - // 1000 nor an integer in the range 3000 to 4999, inclusive, - // throw an "InvalidAccessError" DOMException. - if (code !== null) { - if (code !== 1000 && (code < 3000 || code > 4999)) { - throw new DOMException('invalid code', 'InvalidAccessError') - } +function bundlerHandleNode(node, ctx) { + if (isPlainObject(node) && node.extends) { + const { plugins } = ctx.getVisitorData(); + const bundled = bundleExtends({ node, ctx, plugins }); + Object.assign(node, bundled); + delete node.extends; + } +} +var pluginsCollectorVisitor, configBundlerVisitor; +var init_visitors2 = __esm({ + "node_modules/@redocly/openapi-core/lib/config/visitors.js"() { + init_lib_esm(); + init_ref_utils(); + init_redocly_yaml(); + init_is_plain_object(); + init_visitors(); + init_bundle_extends(); + init_config_resolvers(); + init_constants(); + pluginsCollectorVisitor = normalizeVisitors([ + { + severity: "error", + ruleId: PLUGINS_COLLECTOR_VISITOR_ID, + visitor: { + ref: {}, + ConfigGovernance: { + leave(node, ctx) { + collectorHandleNode(node, ctx); + } + }, + ConfigApisProperties: { + leave(node, ctx) { + collectorHandleNode(node, ctx); + } + }, + [i.ScorecardClassicLevel]: { + leave(node, ctx) { + collectorHandleNode(node, ctx); + } + }, + "rootRedoclyConfigSchema.scorecardClassic.levels_items": { + leave(node, ctx) { + collectorHandleNode(node, ctx); + } + }, + ConfigRoot: { + leave(node, ctx) { + collectorHandleNode(node, ctx); + } + } + } + } + ], NormalizedConfigTypes); + configBundlerVisitor = normalizeVisitors([ + { + severity: "error", + ruleId: CONFIG_BUNDLER_VISITOR_ID, + visitor: { + ref: { + leave(node, ctx, resolved) { + replaceRef(node, resolved, ctx); + } + }, + ConfigGovernance: { + leave(node, ctx) { + bundlerHandleNode(node, ctx); + } + }, + ConfigApisProperties: { + leave(node, ctx) { + bundlerHandleNode(node, ctx); + } + }, + [i.ScorecardClassicLevel]: { + leave(node, ctx) { + bundlerHandleNode(node, ctx); + } + }, + "rootRedoclyConfigSchema.scorecardClassic.levels_items": { + leave(node, ctx) { + bundlerHandleNode(node, ctx); + } + }, + ConfigRoot: { + leave(node, ctx) { + bundlerHandleNode(node, ctx); + } + } + } + } + ], NormalizedConfigTypes); } +}); - // 2. If reason is not null, then: - if (reason !== null) { - // 2.1. Let reasonBytes be the result of UTF-8 encoding reason. - // 2.2. If reasonBytes is longer than 123 bytes, then throw a - // "SyntaxError" DOMException. - const reasonBytesLength = Buffer.byteLength(reason) - - if (reasonBytesLength > 123) { - throw new DOMException(`Reason must be less than 123 bytes; received ${reasonBytesLength}`, 'SyntaxError') - } - } +// node_modules/@redocly/openapi-core/lib/utils/stack.js +function pushStack(head, value) { + return { prev: head, value }; } - -/** - * Converts a Buffer to utf-8, even on platforms without icu. - * @type {(buffer: Buffer) => string} - */ -const utf8Decode = (() => { - if (typeof process.versions.icu === 'string') { - const fatalDecoder = new TextDecoder('utf-8', { fatal: true }) - return fatalDecoder.decode.bind(fatalDecoder) - } - return 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, - websocketMessageReceived, - utf8Decode, - isControlFrame, - isContinuationFrame, - isTextBinaryFrame, - isValidOpcode, - parseExtensions, - isValidClientWindowBits, - toArrayBuffer, - getURLRecord, - validateCloseCodeAndReason +function popStack(head) { + return head?.prev ?? null; } - - -/***/ }), - -/***/ 92846: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { isArrayBuffer } = __nccwpck_require__(93746) -const { webidl } = __nccwpck_require__(81040) -const { URLSerializer } = __nccwpck_require__(17704) -const { environmentSettingsObject } = __nccwpck_require__(1310) -const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints, opcodes } = __nccwpck_require__(93587) -const { - isConnecting, - isEstablished, - isClosing, - isClosed, - isValidSubprotocol, - fireEvent, - utf8Decode, - toArrayBuffer, - getURLRecord -} = __nccwpck_require__(89902) -const { establishWebSocketConnection, closeWebSocketConnection, failWebsocketConnection } = __nccwpck_require__(88380) -const { ByteParser } = __nccwpck_require__(85442) -const { kEnumerableProperty } = __nccwpck_require__(83983) -const { getGlobalDispatcher } = __nccwpck_require__(21892) -const { ErrorEvent, CloseEvent, createFastMessageEvent } = __nccwpck_require__(55033) -const { SendQueue } = __nccwpck_require__(4821) -const { WebsocketFrameSend } = __nccwpck_require__(2391) -const { channels } = __nccwpck_require__(58438) - -function getSocketAddress (socket) { - if (typeof socket?.address === 'function') { - return socket.address() +var init_stack = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/stack.js"() { } +}); - if (typeof socket?.session?.socket?.address === 'function') { - return socket.session.socket.address() +// node_modules/@redocly/openapi-core/lib/walk.js +function collectParents(ctx) { + const parents = {}; + while (ctx.parent) { + parents[ctx.parent.type.name] = ctx.parent.activatedOn?.value.node; + ctx = ctx.parent; } - - return null + return parents; } - -/** - * @typedef {object} Handler - * @property {(response: any, extensions?: string[]) => void} onConnectionEstablished - * @property {(opcode: number, data: Buffer) => void} onMessage - * @property {(error: Error) => void} onParserError - * @property {() => void} onParserDrain - * @property {(chunk: Buffer) => void} onSocketData - * @property {(err: Error) => void} onSocketError - * @property {() => void} onSocketClose - * @property {(body: Buffer) => void} onPing - * @property {(body: Buffer) => void} onPong - * - * @property {number} readyState - * @property {import('stream').Duplex} socket - * @property {Set} closeState - * @property {import('../fetch/index').Fetch} controller - * @property {boolean} [wasEverConnected=false] - */ - -// 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 - - /** @type {Handler} */ - #handler = { - onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions), - onMessage: (opcode, data) => this.#onMessage(opcode, data), - onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message), - onParserDrain: () => this.#onParserDrain(), - onSocketData: (chunk) => { - if (!this.#parser.write(chunk)) { - this.#handler.socket.pause() +function collectParentsLocations(ctx) { + const locations = {}; + while (ctx.parent) { + if (ctx.parent.activatedOn?.value.location) { + locations[ctx.parent.type.name] = ctx.parent.activatedOn?.value.location; + } + ctx = ctx.parent; + } + return locations; +} +function walkDocument(opts) { + const { document: document2, rootType, normalizedVisitors, resolvedRefMap, ctx } = opts; + const seenNodesPerType = {}; + const ignoredNodes = /* @__PURE__ */ new Set(); + const anyEnter = normalizedVisitors.any.enter; + const anyLeave = normalizedVisitors.any.leave; + const combinedEnter = {}; + const combinedLeave = {}; + for (const typeName of Object.keys(normalizedVisitors)) { + if (typeName === "any" || typeName === "ref") + continue; + combinedEnter[typeName] = anyEnter.concat(normalizedVisitors[typeName]?.enter || []); + combinedLeave[typeName] = (normalizedVisitors[typeName]?.leave || []).concat(anyLeave); + } + walkNode(document2.parsed, rootType, new Location(document2.source, "#/"), void 0, ""); + function walkNode(node, type2, location, parent, key) { + const resolve8 = (ref, from = currentLocation.source.absoluteRef) => { + if (!isRef(ref)) + return { location, node: ref }; + const refId = makeRefId(from, ref.$ref); + const resolvedRef = resolvedRefMap.get(refId); + if (!resolvedRef) { + return { + location: void 0, + node: void 0 + }; } - }, - onSocketError: (err) => { - this.#handler.readyState = states.CLOSING - - if (channels.socketError.hasSubscribers) { - channels.socketError.publish(err) + const { resolved, node: node2, document: document3, nodePointer, error: error3 } = resolvedRef; + const newLocation = resolved ? new Location(document3.source, nodePointer) : error3 instanceof YamlParseError ? new Location(error3.source, "") : void 0; + return { location: newLocation, node: node2, error: error3 }; + }; + const rawLocation = location; + let currentLocation = location; + const nodeIsRef = isRef(node); + const { node: resolvedNode, location: resolvedLocation, error: error2 } = resolve8(node); + const enteredContexts = /* @__PURE__ */ new Set(); + if (nodeIsRef) { + const refEnterVisitors = normalizedVisitors.ref.enter; + for (const { visit: visitor, ruleId, severity, message, context: context2 } of refEnterVisitors) { + enteredContexts.add(context2); + const report = (opts2) => reportFn(ruleId, severity, message, opts2); + visitor(node, { + report, + resolve: resolve8, + rawNode: node, + rawLocation, + location, + type: type2, + parent, + key, + parentLocations: {}, + specVersion: ctx.specVersion, + config: ctx.config, + getVisitorData: () => getVisitorDataFn(ruleId) + }, { node: resolvedNode, location: resolvedLocation, error: error2 }); + if (resolvedLocation?.source.absoluteRef && ctx.refTypes) { + ctx.refTypes.set(resolvedLocation?.source.absoluteRef, type2); + } + } + } + if (resolvedNode !== void 0 && resolvedLocation && type2.name !== "scalar") { + currentLocation = resolvedLocation; + const isNodeSeen = seenNodesPerType[type2.name]?.has?.(resolvedNode); + let visitedBySome = false; + const currentEnterVisitors = combinedEnter[type2.name] || anyEnter.concat(normalizedVisitors[type2.name]?.enter || []); + const activatedContexts = []; + const ignoreKey = `${currentLocation.absolutePointer}${currentLocation.pointer}`; + for (const { context: context2, visit, skip, ruleId, severity, message } of currentEnterVisitors) { + if (ignoredNodes.has(ignoreKey)) + break; + if (context2.isSkippedLevel) { + if (context2.parent.activatedOn && !context2.parent.activatedOn.value.nextLevelTypeActivated && !context2.seen.has(node)) { + context2.seen.add(node); + visitedBySome = true; + activatedContexts.push(context2); + } + } else { + if (context2.parent && // if nested + context2.parent.activatedOn && context2.activatedOn?.value.withParentNode !== context2.parent.activatedOn.value.node && // do not enter if visited by parent children (it works thanks because deeper visitors are sorted before) + context2.parent.activatedOn.value.nextLevelTypeActivated?.value !== type2 || !context2.parent && !isNodeSeen) { + activatedContexts.push(context2); + const activatedOn = { + node: resolvedNode, + location: resolvedLocation, + nextLevelTypeActivated: null, + withParentNode: context2.parent?.activatedOn?.value.node, + skipped: (context2.parent?.activatedOn?.value.skipped || skip?.(resolvedNode, key, { + location, + rawLocation, + resolve: resolve8, + rawNode: node + })) ?? false + }; + context2.activatedOn = pushStack(context2.activatedOn, activatedOn); + let ctx2 = context2.parent; + while (ctx2) { + ctx2.activatedOn.value.nextLevelTypeActivated = pushStack(ctx2.activatedOn.value.nextLevelTypeActivated, type2); + ctx2 = ctx2.parent; + } + if (!activatedOn.skipped) { + visitedBySome = true; + enteredContexts.add(context2); + visitWithContext(visit, resolvedNode, node, context2, ruleId, severity, message); + } + } + } } - - this.#handler.socket.destroy() - }, - onSocketClose: () => this.#onSocketClose(), - onPing: (body) => { - if (channels.ping.hasSubscribers) { - channels.ping.publish({ - payload: body, - websocket: this - }) + if (visitedBySome || !isNodeSeen) { + seenNodesPerType[type2.name] = seenNodesPerType[type2.name] || /* @__PURE__ */ new Set(); + seenNodesPerType[type2.name].add(resolvedNode); + if (Array.isArray(resolvedNode)) { + const itemsType = type2.items; + if (itemsType !== void 0) { + const isTypeAFunction = typeof itemsType === "function"; + for (let i2 = 0; i2 < resolvedNode.length; i2++) { + const itemLocation = resolvedLocation.child([i2]); + let itemType = isTypeAFunction ? itemsType(resolvedNode[i2], itemLocation.absolutePointer) : itemsType; + let itemValue = resolvedNode[i2]; + if (itemType?.directResolveAs) { + itemType = itemType.directResolveAs; + itemValue = { $ref: itemValue }; + } + if (isNamedType(itemType)) { + walkNode(itemValue, itemType, itemLocation, resolvedNode, i2); + } + } + } + } else if (isPlainObject(resolvedNode)) { + const props = Object.keys(type2.properties); + if (type2.additionalProperties) { + props.push(...Object.keys(resolvedNode).filter((k3) => !props.includes(k3))); + } else if (type2.extensionsPrefix) { + props.push(...Object.keys(resolvedNode).filter((k3) => k3.startsWith(type2.extensionsPrefix))); + } + if (nodeIsRef) { + props.push(...Object.keys(node).filter((k3) => k3 !== "$ref" && !props.includes(k3))); + } + for (const propName of props) { + let value = resolvedNode[propName]; + let loc = resolvedLocation; + if (value === void 0) { + value = node[propName]; + loc = location; + } + let propType = getOwn(type2.properties, propName); + if (propType === void 0) + propType = type2.additionalProperties; + if (typeof propType === "function") + propType = propType(value, propName); + if (propType === void 0 && type2.extensionsPrefix && propName.startsWith(type2.extensionsPrefix)) { + propType = SpecExtension; + } + if (!isNamedType(propType) && propType?.directResolveAs) { + propType = propType.directResolveAs; + value = { $ref: value }; + } + if (propType && propType.name === void 0 && propType.resolvable !== false) { + propType = { name: "scalar", properties: {} }; + } + if (isRef(node[propName]) && propType?.name === "scalar") { + walkNode(node[propName], propType, location.child([propName]), node, propName); + continue; + } + if (!isNamedType(propType) || propType.name === "scalar" && !isRef(value)) { + continue; + } + walkNode(value, propType, loc.child([propName]), resolvedNode, propName); + } + } } - }, - onPong: (body) => { - if (channels.pong.hasSubscribers) { - channels.pong.publish({ - payload: body, - websocket: this - }) + const currentLeaveVisitors = combinedLeave[type2.name] || (normalizedVisitors[type2.name]?.leave || []).concat(anyLeave); + for (const context2 of activatedContexts.reverse()) { + if (context2.isSkippedLevel) { + context2.seen.delete(resolvedNode); + } else { + context2.activatedOn = popStack(context2.activatedOn); + if (context2.parent) { + let ctx2 = context2.parent; + while (ctx2) { + ctx2.activatedOn.value.nextLevelTypeActivated = popStack(ctx2.activatedOn.value.nextLevelTypeActivated); + ctx2 = ctx2.parent; + } + } + } + } + for (const { context: context2, visit, ruleId, severity, message } of currentLeaveVisitors) { + if (!context2.isSkippedLevel && enteredContexts.has(context2)) { + visitWithContext(visit, resolvedNode, node, context2, ruleId, severity, message); + } } - }, - - readyState: states.CONNECTING, - socket: null, - closeState: new Set(), - controller: null, - wasEverConnected: false - } - - #url - #binaryType - /** @type {import('./receiver').ByteParser} */ - #parser - - /** - * @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) - protocols = options.protocols - - // 1. Let baseURL be this's relevant settings object's API base URL. - const baseURL = environmentSettingsObject.settingsObject.baseUrl - - // 2. Let urlRecord be the result of getting a URL record given url and baseURL. - const urlRecord = getURLRecord(url, baseURL) - - // 3. If protocols is a string, set protocols to a sequence consisting - // of just that string. - if (typeof protocols === 'string') { - protocols = [protocols] - } - - // 4. 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') - } - - // 5. Set this's url to urlRecord. - this.#url = new URL(urlRecord.href) - - // 6. Let client be this's relevant settings object. - const client = environmentSettingsObject.settingsObject - - // 7. Run this step in parallel: - // 7.1. Establish a WebSocket connection given urlRecord, protocols, - // and client. - this.#handler.controller = establishWebSocketConnection( - urlRecord, - protocols, - client, - this.#handler, - 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.#handler.readyState = WebSocket.CONNECTING - - // 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.#binaryType = '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', webidl.attributes.Clamp) - } - - if (reason !== undefined) { - reason = webidl.converters.USVString(reason) - } - - // 1. If code is the special value "missing", then set code to null. - code ??= null - - // 2. If reason is the special value "missing", then set reason to the empty string. - reason ??= '' - - // 3. Close the WebSocket with this, code, and reason. - closeWebSocketConnection(this.#handler, code, reason, true) - } - - /** - * @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.#handler.readyState)) { - 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.#handler.readyState) || isClosing(this.#handler.readyState)) { - return + currentLocation = location; + if (nodeIsRef) { + const refLeaveVisitors = normalizedVisitors.ref.leave; + for (const { visit: visitor, ruleId, severity, context: context2, message } of refLeaveVisitors) { + if (enteredContexts.has(context2)) { + const report = (opts2) => reportFn(ruleId, severity, message, opts2); + visitor(node, { + report, + resolve: resolve8, + rawNode: node, + rawLocation, + location, + type: type2, + parent, + key, + parentLocations: {}, + specVersion: ctx.specVersion, + config: ctx.config, + getVisitorData: () => getVisitorDataFn(ruleId) + }, { node: resolvedNode, location: resolvedLocation, error: error2 }); + } + } + } + function visitWithContext(visit, resolvedNode2, node2, context2, ruleId, severity, customMessage) { + const report = (opts2) => reportFn(ruleId, severity, customMessage, opts2); + visit(resolvedNode2, { + report, + resolve: resolve8, + rawNode: node2, + location: currentLocation, + rawLocation, + type: type2, + parent, + key, + parentLocations: collectParentsLocations(context2), + specVersion: ctx.specVersion, + config: ctx.config, + ignoreNextVisitorsOnNode: () => { + ignoredNodes.add(`${currentLocation.absolutePointer}${currentLocation.pointer}`); + }, + getVisitorData: () => getVisitorDataFn(ruleId) + }, collectParents(context2), context2); + } + function reportFn(ruleId, severity, customMessage, opts2) { + const normalizedLocation = opts2.location ? Array.isArray(opts2.location) ? opts2.location : [opts2.location] : [{ ...currentLocation, reportOnKey: false }]; + const location2 = normalizedLocation.map((l2) => ({ + ...currentLocation, + reportOnKey: false, + ...l2 + })); + const ruleSeverity = opts2.forceSeverity || severity; + if (ruleSeverity !== "off") { + ctx.problems.push({ + ruleId: opts2.ruleId || ruleId, + severity: ruleSeverity, + ...opts2, + message: customMessage ? customMessage.replace("{{message}}", opts2.message) : opts2.message, + suggest: opts2.suggest || [], + location: location2 + }); + } } - - // 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 buffer = Buffer.from(data) - - this.#bufferedAmount += buffer.byteLength - this.#sendQueue.add(buffer, () => { - this.#bufferedAmount -= buffer.byteLength - }, sendHints.text) - } else if (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 (webidl.is.Blob(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) + function getVisitorDataFn(ruleId) { + ctx.visitorsData[ruleId] = ctx.visitorsData[ruleId] || {}; + return ctx.visitorsData[ruleId]; } } - - get readyState () { - webidl.brandCheck(this, WebSocket) - - // The readyState getter steps are to return this's ready state. - return this.#handler.readyState - } - - 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.#url) +} +var init_walk = __esm({ + "node_modules/@redocly/openapi-core/lib/walk.js"() { + init_yaml_parse_error(); + init_ref_utils(); + init_types(); + init_get_own(); + init_is_plain_object(); + init_make_ref_id(); + init_stack(); } +}); - get extensions () { - webidl.brandCheck(this, WebSocket) - - return this.#extensions +// node_modules/@redocly/openapi-core/lib/bundle/bundle-visitor.js +function mapTypeToComponent(typeName, version2) { + switch (version2) { + case "oas3": + switch (typeName) { + case "Schema": + return "schemas"; + case "Parameter": + return "parameters"; + case "Response": + return "responses"; + case "Example": + return "examples"; + case "RequestBody": + return "requestBodies"; + case "Header": + return "headers"; + case "SecuritySchema": + return "securitySchemes"; + case "Link": + return "links"; + case "Callback": + return "callbacks"; + case "MediaTypesMap": + return "mediaTypes"; + default: + return null; + } + case "oas2": + switch (typeName) { + case "Schema": + return "definitions"; + case "Parameter": + return "parameters"; + case "Response": + return "responses"; + default: + return null; + } + case "async2": + switch (typeName) { + case "Schema": + return "schemas"; + case "Parameter": + return "parameters"; + default: + return null; + } + case "async3": + switch (typeName) { + case "Schema": + return "schemas"; + case "Parameter": + return "parameters"; + default: + return null; + } + case "arazzo1": + switch (typeName) { + case "Root.workflows_items.parameters_items": + case "Root.workflows_items.steps_items.parameters_items": + return "parameters"; + default: + return null; + } + case "overlay1": + switch (typeName) { + default: + return null; + } + case "openrpc1": + switch (typeName) { + case "ContentDescriptor": + return "contentDescriptors"; + case "Schema": + return "schemas"; + case "Example": + return "examples"; + case "Link": + return "links"; + case "ErrorObject": + return "errors"; + case "ExamplePairing": + return "examplePairingObjects"; + case "Tag": + return "tags"; + default: + return null; + } } - - get protocol () { - webidl.brandCheck(this, WebSocket) - - return this.#protocol +} +function makeBundleVisitor({ version: version2, dereference, rootDocument, resolvedRefMap, keepUrlRefs, componentRenamingConflicts = "warn" }) { + let components; + let rootLocation; + const visitor = { + ref: { + leave(node, ctx, resolved) { + if (!resolved.location || resolved.node === void 0) { + reportUnresolvedRef(resolved, ctx.report, ctx.location); + return; + } + if (resolved.location.source === rootDocument.source && resolved.location.source === ctx.location.source && ctx.type.name !== "scalar" && !dereference) { + if (node.$ref !== resolved.location.pointer) { + node.$ref = resolved.location.pointer; + } + return; + } + if (keepUrlRefs && isAbsoluteUrl(node.$ref)) { + return; + } + const componentType = mapTypeToComponent(ctx.type.name, version2); + if (!componentType) { + replaceRef(node, resolved, ctx); + } else { + if (dereference) { + saveComponent(componentType, resolved, ctx); + replaceRef(node, resolved, ctx); + } else { + node.$ref = saveComponent(componentType, resolved, ctx); + resolveBundledComponent(node, resolved, ctx); + } + } + } + }, + Example: { + leave(node, ctx) { + if (isExternalValue(node) && node.value === void 0) { + const resolved = ctx.resolve({ $ref: node.externalValue }); + if (!resolved.location || resolved.node === void 0) { + reportUnresolvedRef(resolved, ctx.report, ctx.location); + return; + } + if (keepUrlRefs && isAbsoluteUrl(node.externalValue)) { + return; + } + node.value = ctx.resolve({ $ref: node.externalValue }).node; + delete node.externalValue; + } + } + }, + Root: { + enter(root, ctx) { + rootLocation = ctx.location; + if (version2 === "oas3") { + components = root.components = root.components || {}; + } else if (version2 === "oas2") { + components = root; + } else if (version2 === "async2") { + components = root.components = root.components || {}; + } else if (version2 === "async3") { + components = root.components = root.components || {}; + } else if (version2 === "arazzo1") { + components = root.components = root.components || {}; + } else if (version2 === "openrpc1") { + components = root.components = root.components || {}; + } + } + } + }; + if (version2 === "oas3") { + const componentType = mapTypeToComponent("Schema", version2); + visitor.Discriminator = { + leave(discriminator, ctx) { + if (typeof discriminator.defaultMapping !== "string" || !isMappingRef(discriminator.defaultMapping)) { + return; + } + const resolved = ctx.resolve({ $ref: discriminator.defaultMapping }); + if (!resolved.location || resolved.node === void 0) { + reportUnresolvedRef(resolved, ctx.report, ctx.location.child("defaultMapping")); + return; + } + discriminator.defaultMapping = saveComponent(componentType, resolved, ctx); + }, + DiscriminatorMapping: { + leave(mapping, ctx) { + for (const name of Object.keys(mapping)) { + const $ref = mapping[name]; + if (!isMappingRef($ref)) { + continue; + } + const resolved = ctx.resolve({ $ref }); + if (!resolved.location || resolved.node === void 0) { + reportUnresolvedRef(resolved, ctx.report, ctx.location.child(name)); + return; + } + mapping[name] = saveComponent(componentType, resolved, ctx); + } + } + } + }; } - - get onopen () { - webidl.brandCheck(this, WebSocket) - - return this.#events.open + function resolveBundledComponent(node, resolved, ctx) { + const newRefId = makeRefId(ctx.location.source.absoluteRef, node.$ref); + resolvedRefMap.set(newRefId, { + document: rootDocument, + isRemote: false, + node: resolved.node, + nodePointer: node.$ref, + resolved: true + }); } - - set onopen (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.open) { - this.removeEventListener('open', this.#events.open) - } - - const listener = webidl.converters.EventHandlerNonNull(fn) - - if (listener !== null) { - this.addEventListener('open', listener) - this.#events.open = fn + function saveComponent(componentType, target, ctx) { + components[componentType] = components[componentType] || {}; + const name = getComponentName(target, componentType, ctx); + components[componentType][name] = target.node; + if (version2 === "oas3" || version2 === "async2" || version2 === "async3" || version2 === "openrpc1") { + return `#/components/${componentType}/${name}`; } else { - this.#events.open = null + return `#/${componentType}/${name}`; } } - - 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) + function isEqualOrEqualRef(node, target, ctx) { + if (isRef(node) && ctx.resolve(node, rootLocation.absolutePointer).location?.absolutePointer === target.location.absolutePointer) { + return true; } - - const listener = webidl.converters.EventHandlerNonNull(fn) - - if (listener !== null) { - this.addEventListener('error', listener) - this.#events.error = fn - } else { - this.#events.error = null + return dequal(node, target.node); + } + function getComponentName(target, componentType, ctx) { + const componentsGroup = components[componentType]; + const [fileRef, pointer] = [target.location.source.absoluteRef, target.location.pointer]; + let name = pointerBaseName(pointer) || refBaseName(fileRef); + const prevName = name; + let serialId = 2; + while (componentsGroup[name] && !isEqualOrEqualRef(componentsGroup[name], target, ctx)) { + name = `${prevName}-${serialId}`; + serialId++; + } + if (!componentsGroup[name] && prevName !== name) { + ctx.report({ + message: `Two schemas are referenced with the same name but different content. Renamed ${prevName} to ${name}.`, + location: ctx.location, + forceSeverity: componentRenamingConflicts + }); } + return name; } - - get onclose () { - webidl.brandCheck(this, WebSocket) - - return this.#events.close + return visitor; +} +var init_bundle_visitor = __esm({ + "node_modules/@redocly/openapi-core/lib/bundle/bundle-visitor.js"() { + init_ref_utils(); + init_no_unresolved_refs(); + init_dequal(); + init_make_ref_id(); } +}); - set onclose (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.close) { - this.removeEventListener('close', this.#events.close) - } - - const listener = webidl.converters.EventHandlerNonNull(fn) - - if (listener !== null) { - this.addEventListener('close', listener) - this.#events.close = fn - } else { - this.#events.close = null - } +// node_modules/@redocly/openapi-core/lib/bundle/bundle-document.js +async function bundleDocument(opts) { + const { document: document2, config, types: types2, externalRefResolver, dereference = false, removeUnusedComponents = false, keepUrlRefs = false, componentRenamingConflicts } = opts; + const specVersion = detectSpec(document2.parsed); + const specMajorVersion = getMajorSpecVersion(specVersion); + const rules8 = config.getRulesForSpecVersion(specMajorVersion); + const normalizedTypes = normalizeTypes(config.extendTypes(types2, specVersion), config); + const preprocessors8 = initRules(rules8, config, "preprocessors", specVersion); + const decorators8 = initRules(rules8, config, "decorators", specVersion); + const ctx = { + problems: [], + specVersion, + config, + refTypes: /* @__PURE__ */ new Map(), + visitorsData: {} + }; + let resolvedRefMap = await resolveDocument({ + rootDocument: document2, + rootType: normalizedTypes.Root, + externalRefResolver + }); + if (preprocessors8.length > 0) { + walkDocument({ + document: document2, + rootType: normalizedTypes.Root, + normalizedVisitors: normalizeVisitors(preprocessors8, normalizedTypes), + resolvedRefMap, + ctx + }); + resolvedRefMap = await resolveDocument({ + rootDocument: document2, + rootType: normalizedTypes.Root, + externalRefResolver + }); } - - get onmessage () { - webidl.brandCheck(this, WebSocket) - - return this.#events.message + const bundleVisitor = normalizeVisitors([ + { + severity: "error", + ruleId: "bundler", + visitor: makeBundleVisitor({ + version: specMajorVersion, + dereference, + rootDocument: document2, + resolvedRefMap, + keepUrlRefs, + componentRenamingConflicts + }) + }, + ...decorators8.filter((decorator) => decorator.ruleId !== "remove-unused-components") + ], normalizedTypes); + walkDocument({ + document: document2, + rootType: normalizedTypes.Root, + normalizedVisitors: bundleVisitor, + resolvedRefMap, + ctx + }); + if (removeUnusedComponents || config.getDecoratorSettings("remove-unused-components", specVersion).severity !== "off") { + const postBundleRefMap = await resolveDocument({ + rootDocument: document2, + rootType: normalizedTypes.Root, + externalRefResolver + }); + const postBundleVisitors = normalizeVisitors([ + { + severity: "error", + ruleId: "remove-unused-components", + visitor: specMajorVersion === "oas2" ? RemoveUnusedComponents({}) : RemoveUnusedComponents2({}) + } + ], normalizedTypes); + walkDocument({ + document: document2, + rootType: normalizedTypes.Root, + normalizedVisitors: postBundleVisitors, + resolvedRefMap: postBundleRefMap, + ctx + }); } + return { + bundle: document2, + problems: ctx.problems.map((problem) => config.addProblemToIgnore(problem)), + fileDependencies: externalRefResolver.getFiles(), + rootType: normalizedTypes.Root, + refTypes: ctx.refTypes, + visitorsData: ctx.visitorsData + }; +} +var init_bundle_document = __esm({ + "node_modules/@redocly/openapi-core/lib/bundle/bundle-document.js"() { + init_bundle_visitor(); + init_rules(); + init_remove_unused_components(); + init_remove_unused_components2(); + init_detect_spec(); + init_resolve(); + init_types(); + init_visitors(); + init_walk(); + } +}); - set onmessage (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) +// node_modules/@redocly/openapi-core/lib/bundle/bundle.js +function collectConfigPlugins(document2, resolvedRefMap, rootConfigDir) { + const visitorsData = { plugins: [], rootConfigDir }; + const ctx = { + problems: [], + specVersion: "oas3_0", + // TODO: change it to a config-specific type + refTypes: /* @__PURE__ */ new Map(), + visitorsData: { + [PLUGINS_COLLECTOR_VISITOR_ID]: visitorsData } - - const listener = webidl.converters.EventHandlerNonNull(fn) - - if (listener !== null) { - this.addEventListener('message', listener) - this.#events.message = fn - } else { - this.#events.message = null + }; + walkDocument({ + document: document2, + rootType: NormalizedConfigTypes.ConfigRoot, + normalizedVisitors: pluginsCollectorVisitor, + resolvedRefMap, + ctx + }); + return visitorsData.plugins; +} +function bundleConfig(document2, resolvedRefMap, plugins) { + const visitorsData = { plugins }; + const ctx = { + problems: [], + specVersion: "oas3_0", + // TODO: change it to a config-specific type + refTypes: /* @__PURE__ */ new Map(), + visitorsData: { + [CONFIG_BUNDLER_VISITOR_ID]: visitorsData } + }; + walkDocument({ + document: document2, + rootType: NormalizedConfigTypes.ConfigRoot, + normalizedVisitors: configBundlerVisitor, + resolvedRefMap, + ctx + }); + return document2.parsed ?? {}; +} +async function bundle(opts) { + const { ref, doc, externalRefResolver = new BaseResolver(opts.config.resolve), base = null } = opts; + if (!(ref || doc)) { + throw new Error("Document or reference is required.\n"); + } + const document2 = doc === void 0 ? await externalRefResolver.resolveDocument(base, ref, true) : doc; + if (document2 instanceof Error) { + throw document2; + } + opts.collectSpecData?.(document2.parsed); + return bundleDocument({ + document: document2, + ...opts, + externalRefResolver, + types: getTypes(detectSpec(document2.parsed)) + }); +} +async function bundleFromString(opts) { + const { source, absoluteRef, externalRefResolver = new BaseResolver(opts.config.resolve) } = opts; + const document2 = makeDocumentFromString(source, absoluteRef || "/"); + return bundleDocument({ + document: document2, + ...opts, + externalRefResolver, + types: getTypes(detectSpec(document2.parsed)) + }); +} +var init_bundle = __esm({ + "node_modules/@redocly/openapi-core/lib/bundle/bundle.js"() { + init_constants(); + init_visitors2(); + init_detect_spec(); + init_oas_types(); + init_resolve(); + init_redocly_yaml(); + init_walk(); + init_bundle_document(); } +}); - get binaryType () { - webidl.brandCheck(this, WebSocket) - - return this.#binaryType +// node_modules/@redocly/openapi-core/lib/utils/is-not-string.js +function isNotString(value) { + return !isString(value); +} +var init_is_not_string = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/is-not-string.js"() { + init_is_string(); } +}); - set binaryType (type) { - webidl.brandCheck(this, WebSocket) - - if (type !== 'blob' && type !== 'arraybuffer') { - this.#binaryType = 'blob' - } else { - this.#binaryType = type +// node_modules/@redocly/openapi-core/lib/config/plugins-cache.js +import module from "node:module"; +import * as url from "node:url"; +function registerEsmCacheBustHook() { + module.registerHooks({ + // `specifier` — raw import string (e.g. './utils.js', 'node:util'). + // `context` — { parentURL, conditions, importAttributes }. + // `nextResolve` — delegate to the remaining hooks + Node's default resolver. + resolve(specifier, context2, nextResolve) { + const result = nextResolve(specifier, context2); + if (!result.url.startsWith("file:")) + return result; + if (!context2.parentURL) + return result; + const parentVersion = new URL(context2.parentURL).searchParams.get(PLUGIN_VERSION_PARAM); + if (!parentVersion) + return result; + const resolvedURL = new URL(result.url); + if (resolvedURL.pathname.includes("/node_modules/")) + return result; + if (resolvedURL.searchParams.has(PLUGIN_VERSION_PARAM)) + return result; + resolvedURL.searchParams.set(PLUGIN_VERSION_PARAM, parentVersion); + return { ...result, url: resolvedURL.href }; } + }); +} +function ensureEsmCacheBustHook() { + if (isEsmCacheBustHookRegistered) + return; + isEsmCacheBustHookRegistered = true; + if (typeof module.registerHooks !== "function") { + logger.warn(`Redocly plugin reload requires Node.js >= 22.15 (current: ${process.version}). ESM plugins will not pick up edits until the process restarts. +`); + return; } - - /** - * @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.#handler.socket = response.socket - - const parser = new ByteParser(this.#handler, parsedExtensions) - parser.on('drain', () => this.#handler.onParserDrain()) - parser.on('error', (err) => this.#handler.onParserError(err)) - - this.#parser = parser - this.#sendQueue = new SendQueue(response.socket) - - // 1. Change the ready state to OPEN (1). - this.#handler.readyState = 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 + registerEsmCacheBustHook(); +} +function hasCachedPlugin(absolutePluginPath) { + return pluginsCache.has(absolutePluginPath); +} +function getCachedPlugins(absolutePluginPath) { + return pluginsCache.get(absolutePluginPath); +} +function setCachedPlugins(absolutePluginPath, plugins) { + pluginsCache.set(absolutePluginPath, plugins); +} +function getPluginCacheVersion() { + return cacheVersion; +} +function evictPluginFromCjsCache(pluginPath) { + const nodeRequire = module.createRequire(pluginPath); + const visited = /* @__PURE__ */ new Set(); + const evict = (modulePath) => { + if (visited.has(modulePath)) + return; + visited.add(modulePath); + const cached = nodeRequire.cache[modulePath]; + if (!cached) + return; + for (const child of cached.children) { + if (/[/\\]node_modules[/\\]/.test(child.id)) + continue; + evict(child.id); } + delete nodeRequire.cache[modulePath]; + }; + evict(pluginPath); +} +async function loadPluginModule(absolutePluginPath) { + const pluginUrl = url.pathToFileURL(absolutePluginPath); + pluginUrl.searchParams.set(PLUGIN_VERSION_PARAM, String(cacheVersion)); + return import( + /* webpackIgnore: true */ + pluginUrl.href + ); +} +var pluginsCache, PLUGIN_VERSION_PARAM, cacheVersion, isEsmCacheBustHookRegistered, clearPluginsCache; +var init_plugins_cache = __esm({ + "node_modules/@redocly/openapi-core/lib/config/plugins-cache.js"() { + init_logger(); + pluginsCache = /* @__PURE__ */ new Map(); + PLUGIN_VERSION_PARAM = "v"; + cacheVersion = 0; + isEsmCacheBustHookRegistered = false; + clearPluginsCache = () => { + const paths = [...pluginsCache.keys()]; + for (const pluginPath of paths) { + evictPluginFromCjsCache(pluginPath); + } + pluginsCache.clear(); + cacheVersion += 1; + ensureEsmCacheBustHook(); + }; + } +}); - // 4. Fire an event named open at the WebSocket object. - fireEvent('open', this) - - if (channels.open.hasSubscribers) { - // Convert headers to a plain object for the event - const headers = response.headersList.entries - channels.open.publish({ - address: getSocketAddress(response.socket), - protocol: this.#protocol, - extensions: this.#extensions, - websocket: this, - handshakeResponse: { - status: response.status, - statusText: response.statusText, - headers - } - }) +// node_modules/@redocly/openapi-core/lib/config/config-resolvers.js +import * as fs5 from "node:fs"; +import module2 from "node:module"; +import * as path8 from "node:path"; +import * as url2 from "node:url"; +async function resolveConfig({ rawConfigDocument, configPath, externalRefResolver, customExtends }) { + const config = rawConfigDocument === void 0 ? DEFAULT_CONFIG : rawConfigDocument.parsed; + if (customExtends !== void 0 && isPlainObject(config)) { + config.extends = customExtends; + } + if (isPlainObject(config) && (config?.extends?.some(isNotString) || config?.scorecardClassic?.levels?.some((level) => level?.extends?.some(isNotString)) || config?.scorecard?.levels?.some((level) => level?.extends?.some(isNotString)))) { + throw new Error(`Configuration format not detected in extends: values must be strings.`); + } + const rootDocument = rawConfigDocument ?? { + source: new Source(configPath ?? "", JSON.stringify(config)), + parsed: config + }; + const resolvedRefMap = await resolveDocument({ + rootDocument, + rootType: NormalizedConfigTypes.ConfigRoot, + externalRefResolver: externalRefResolver ?? new BaseResolver(getResolveConfig(config?.resolve)) + }); + let pluginsOrPaths = []; + let resolvedPlugins; + let rootConfigDir = ""; + if (isBrowser) { + const instantiatedPlugins = (config?.plugins || []).filter((p2) => !isString(p2)); + resolvedPlugins = [...instantiatedPlugins, defaultPlugin]; + } else { + rootConfigDir = path8.dirname(configPath ?? ""); + pluginsOrPaths = collectConfigPlugins(rootDocument, resolvedRefMap, rootConfigDir); + const plugins = await resolvePlugins(pluginsOrPaths.map((p2) => isPluginResolveInfo(p2) ? p2.absolutePath : p2), rootConfigDir); + resolvedPlugins = [...plugins, defaultPlugin]; + } + const bundledConfig = bundleConfig(rootDocument, deepCloneMapWithJSON(resolvedRefMap), resolvedPlugins); + if (bundledConfig.apis) { + bundledConfig.apis = Object.fromEntries(Object.entries(bundledConfig.apis).map(([key, apiConfig]) => { + const mergedConfig = mergeExtends([bundledConfig, apiConfig]); + return [key, { ...apiConfig, ...mergedConfig }]; + })); + } + const pluginPaths = pluginsOrPaths.length ? pluginsOrPaths.map((p2) => isPluginResolveInfo(p2) && p2.isModule ? p2.rawPath : p2.absolutePath && path8.relative(rootConfigDir, p2.absolutePath)).filter(isDefined) : void 0; + return { + resolvedConfig: { + ...bundledConfig, + plugins: pluginPaths + }, + resolvedRefMap, + plugins: resolvedPlugins + }; +} +function getDefaultPluginPath(configDir) { + for (const pluginPath of DEFAULT_PROJECT_PLUGIN_PATHS) { + const absolutePluginPath = path8.resolve(configDir, pluginPath); + if (fs5.existsSync(absolutePluginPath)) { + return pluginPath; } } - - #onMessage (type, data) { - // 1. If ready state is not OPEN (1), then return. - if (this.#handler.readyState !== states.OPEN) { - return + return; +} +function isPluginResolveInfo(plugin) { + return "isModule" in plugin; +} +async function resolvePlugins(plugins, configDir) { + if (!plugins) + return []; + const requireFunc = async (plugin) => { + if (!isString(plugin)) { + return plugin; } - - // 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(this.#handler, 1007, 'Received invalid UTF-8 in text frame.') - return - } - } else if (type === opcodes.BINARY) { - if (this.#binaryType === '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) + try { + const absolutePluginPath = path8.isAbsolute(plugin) ? plugin : preResolvePluginPath(plugin, path8.join(configDir, CONFIG_FILE_NAME), configDir).absolutePath; + if (!hasCachedPlugin(absolutePluginPath)) { + const mod = await loadPluginModule(absolutePluginPath); + const requiredPlugin = mod.default || mod; + const pluginCreatorOptions = { contentDir: configDir }; + const requiredPluginInstances = Array.isArray(requiredPlugin) ? requiredPlugin : [requiredPlugin]; + for (const requiredPluginInstance of requiredPluginInstances) { + if (requiredPluginInstance?.id && isDeprecatedPluginFormat(requiredPluginInstance)) { + logger.info(`Deprecated plugin format detected: ${requiredPluginInstance.id} +`); + } + } + const pluginModule = isDeprecatedPluginFormat(requiredPlugin) ? requiredPlugin : isCommonJsPlugin(requiredPlugin) ? await requiredPlugin(pluginCreatorOptions) : await requiredPlugin?.default?.(pluginCreatorOptions); + const pluginInstances = Array.isArray(pluginModule) ? pluginModule : [pluginModule]; + if (pluginModule) { + setCachedPlugins(absolutePluginPath, pluginInstances.map((p2) => ({ + ...p2, + path: plugin, + absolutePath: absolutePluginPath + }))); + } } - } - - // 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', this, createFastMessageEvent, { - origin: this.#url.origin, - data: dataForEvent - }) - } - - #onParserDrain () { - this.#handler.socket.resume() - } - - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 - */ - #onSocketClose () { - // 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 = - this.#handler.closeState.has(sentCloseFrameState.SENT) && - this.#handler.closeState.has(sentCloseFrameState.RECEIVED) - - let code = 1005 - let reason = '' - - const result = this.#parser?.closingInfo + return getCachedPlugins(absolutePluginPath); + } catch (e2) { + throw new Error(`Failed to load plugin "${plugin}": ${e2.message} - if (result && !result.error) { - code = result.code ?? 1005 - reason = result.reason +${e2.stack}`); } - - // 1. Change the ready state to CLOSED (3). - this.#handler.readyState = 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. - if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { - // 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 - - fireEvent('error', this, (type, init) => new ErrorEvent(type, init), { - error: new TypeError(reason) - }) + }; + const seenPluginIds = /* @__PURE__ */ new Map(); + const defaultPluginPath = getDefaultPluginPath(configDir); + if (defaultPluginPath) { + plugins.push(defaultPluginPath); + } + const resolvedPlugins = /* @__PURE__ */ new Set(); + const instances = await Promise.all(plugins.map(async (p2) => { + if (isString(p2)) { + if (isAbsoluteUrl(p2)) { + throw new Error(colorize.red(`We don't support remote plugins yet.`)); + } + if (resolvedPlugins.has(p2)) { + return; + } + resolvedPlugins.add(p2); } - - // 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', this, (type, init) => new CloseEvent(type, init), { - wasClean, code, reason - }) - - if (channels.close.hasSubscribers) { - channels.close.publish({ - websocket: this, - code, - reason - }) + const pluginInstanceOrInstances = await requireFunc(p2); + if (!pluginInstanceOrInstances) { + return; } - } - - /** - * @param {WebSocket} ws - * @param {Buffer|undefined} buffer - */ - static ping (ws, buffer) { - if (Buffer.isBuffer(buffer)) { - if (buffer.length > 125) { - throw new TypeError('A PING frame cannot have a body larger than 125 bytes.') + const pluginInstances = Array.isArray(pluginInstanceOrInstances) ? pluginInstanceOrInstances : [pluginInstanceOrInstances]; + return (await Promise.all(pluginInstances.map(async (pluginInstance) => { + if (!pluginInstance) + return; + const id = pluginInstance.id; + if (typeof id !== "string") { + throw new Error(colorize.red(`Plugin must define \`id\` property in ${colorize.blue(p2.toString())}.`)); } - } else if (buffer !== undefined) { - throw new TypeError('Expected buffer payload') - } - - // An endpoint MAY send a Ping frame any time after the connection is - // established and before the connection is closed. - const readyState = ws.#handler.readyState + const pluginPath = pluginInstance.absolutePath ?? p2.toString(); + const existingPluginPath = seenPluginIds.get(id); + if (existingPluginPath) { + if (pluginPath !== existingPluginPath) { + throw new Error(colorize.red(`Plugin "id" must be unique. Plugin ${colorize.blue(pluginPath)} uses id "${colorize.blue(id)}" already seen in ${colorize.blue(pluginPath)}`)); + } + return void 0; + } + seenPluginIds.set(id, pluginPath); + const plugin = { + id, + ...pluginInstance.configs ? { configs: pluginInstance.configs } : {}, + ...pluginInstance.typeExtension ? { typeExtension: pluginInstance.typeExtension } : {} + }; + if (pluginInstance.rules) { + if (!pluginInstance.rules.oas3 && !pluginInstance.rules.oas2 && !pluginInstance.rules.async2 && !pluginInstance.rules.async3 && !pluginInstance.rules.arazzo1 && !pluginInstance.rules.overlay1 && !pluginInstance.rules.openrpc1) { + throw new Error(`Plugin rules must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo\`, \`overlay1\`, or \`openrpc1\` rules "${p2}.`); + } + plugin.rules = {}; + if (pluginInstance.rules.oas3) { + plugin.rules.oas3 = prefixRules(pluginInstance.rules.oas3, id); + } + if (pluginInstance.rules.oas2) { + plugin.rules.oas2 = prefixRules(pluginInstance.rules.oas2, id); + } + if (pluginInstance.rules.async2) { + plugin.rules.async2 = prefixRules(pluginInstance.rules.async2, id); + } + if (pluginInstance.rules.async3) { + plugin.rules.async3 = prefixRules(pluginInstance.rules.async3, id); + } + if (pluginInstance.rules.arazzo1) { + plugin.rules.arazzo1 = prefixRules(pluginInstance.rules.arazzo1, id); + } + if (pluginInstance.rules.overlay1) { + plugin.rules.overlay1 = prefixRules(pluginInstance.rules.overlay1, id); + } + if (pluginInstance.rules.openrpc1) { + plugin.rules.openrpc1 = prefixRules(pluginInstance.rules.openrpc1, id); + } + } + if (pluginInstance.preprocessors) { + if (!pluginInstance.preprocessors.oas3 && !pluginInstance.preprocessors.oas2 && !pluginInstance.preprocessors.async2 && !pluginInstance.preprocessors.async3 && !pluginInstance.preprocessors.arazzo1 && !pluginInstance.preprocessors.overlay1 && !pluginInstance.preprocessors.openrpc1) { + throw new Error(`Plugin \`preprocessors\` must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo1\`, \`overlay1\`, or \`openrpc1\` preprocessors "${p2}.`); + } + plugin.preprocessors = {}; + if (pluginInstance.preprocessors.oas3) { + plugin.preprocessors.oas3 = prefixRules(pluginInstance.preprocessors.oas3, id); + } + if (pluginInstance.preprocessors.oas2) { + plugin.preprocessors.oas2 = prefixRules(pluginInstance.preprocessors.oas2, id); + } + if (pluginInstance.preprocessors.async2) { + plugin.preprocessors.async2 = prefixRules(pluginInstance.preprocessors.async2, id); + } + if (pluginInstance.preprocessors.async3) { + plugin.preprocessors.async3 = prefixRules(pluginInstance.preprocessors.async3, id); + } + if (pluginInstance.preprocessors.arazzo1) { + plugin.preprocessors.arazzo1 = prefixRules(pluginInstance.preprocessors.arazzo1, id); + } + if (pluginInstance.preprocessors.overlay1) { + plugin.preprocessors.overlay1 = prefixRules(pluginInstance.preprocessors.overlay1, id); + } + if (pluginInstance.preprocessors.openrpc1) { + plugin.preprocessors.openrpc1 = prefixRules(pluginInstance.preprocessors.openrpc1, id); + } + } + if (pluginInstance.decorators) { + if (!pluginInstance.decorators.oas3 && !pluginInstance.decorators.oas2 && !pluginInstance.decorators.async2 && !pluginInstance.decorators.async3 && !pluginInstance.decorators.arazzo1 && !pluginInstance.decorators.overlay1 && !pluginInstance.decorators.openrpc1) { + throw new Error(`Plugin \`decorators\` must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo1\`, \`overlay1\`, or \`openrpc1\` decorators "${p2}.`); + } + plugin.decorators = {}; + if (pluginInstance.decorators.oas3) { + plugin.decorators.oas3 = prefixRules(pluginInstance.decorators.oas3, id); + } + if (pluginInstance.decorators.oas2) { + plugin.decorators.oas2 = prefixRules(pluginInstance.decorators.oas2, id); + } + if (pluginInstance.decorators.async2) { + plugin.decorators.async2 = prefixRules(pluginInstance.decorators.async2, id); + } + if (pluginInstance.decorators.async3) { + plugin.decorators.async3 = prefixRules(pluginInstance.decorators.async3, id); + } + if (pluginInstance.decorators.arazzo1) { + plugin.decorators.arazzo1 = prefixRules(pluginInstance.decorators.arazzo1, id); + } + if (pluginInstance.decorators.overlay1) { + plugin.decorators.overlay1 = prefixRules(pluginInstance.decorators.overlay1, id); + } + if (pluginInstance.decorators.openrpc1) { + plugin.decorators.openrpc1 = prefixRules(pluginInstance.decorators.openrpc1, id); + } + } + if (pluginInstance.assertions) { + plugin.assertions = pluginInstance.assertions; + } + return { + ...pluginInstance, + ...plugin + }; + }))).filter(isDefined); + })); + return instances.filter(isDefined).flat(); +} +function resolvePreset(presetName, plugins) { + const { pluginId, configName } = parsePresetName(presetName); + const plugin = plugins.find((p2) => p2.id === pluginId); + if (!plugin) { + throw new Error(`Invalid config ${colorize.red(presetName)}: plugin ${pluginId} is not included.`); + } + const preset = plugin.configs?.[configName]; + if (!preset) { + throw new Error(pluginId ? `Invalid config ${colorize.red(presetName)}: plugin ${pluginId} doesn't export config with name ${configName}.` : `Invalid config ${colorize.red(presetName)}: there is no such built-in config.`); + } + return preset; +} +var preResolvePluginPath; +var init_config_resolvers = __esm({ + "node_modules/@redocly/openapi-core/lib/config/config-resolvers.js"() { + init_bundle(); + init_env(); + init_logger(); + init_ref_utils(); + init_resolve(); + init_redocly_yaml(); + init_is_defined(); + init_is_not_string(); + init_is_plain_object(); + init_is_string(); + init_builtIn(); + init_constants(); + init_get_resolve_config(); + init_plugins_cache(); + init_utils3(); + preResolvePluginPath = (plugin, base, rootConfigDir) => { + if (!isString(plugin)) { + return plugin; + } + const maybeAbsolutePluginPath = path8.resolve(path8.dirname(base), plugin); + if (fs5.existsSync(maybeAbsolutePluginPath)) { + return { absolutePath: maybeAbsolutePluginPath, rawPath: plugin, isModule: false }; + } + try { + return { + absolutePath: module2.createRequire(import.meta.url ?? __dirname).resolve(plugin, { + paths: [ + // Plugins imported from the node_modules in the project directory + rootConfigDir, + // Plugins imported from the node_modules in the package install directory (for example, npx cache directory) + import.meta.url ? path8.dirname(url2.fileURLToPath(import.meta.url)) : __dirname + ] + }), + isModule: true, + rawPath: plugin + }; + } catch { + throw new Error(`Plugin "${plugin}" not found.`); + } + }; + } +}); - if (isEstablished(readyState) && !isClosing(readyState) && !isClosed(readyState)) { - const frame = new WebsocketFrameSend(buffer) - ws.#handler.socket.write(frame.createFrame(opcodes.PING)) - } +// node_modules/@redocly/openapi-core/lib/config/load.js +import * as fs6 from "node:fs"; +import * as path9 from "node:path"; +function resolveIgnore(content, dir) { + const ignore = /* @__PURE__ */ Object.create(null); + for (const fileName of Object.keys(content)) { + const fileIgnore = content[fileName]; + const resolvedFileName = isAbsoluteUrl(fileName) ? fileName : resolvePath(dir, fileName); + ignore[resolvedFileName] = /* @__PURE__ */ Object.create(null); + for (const ruleId of Object.keys(fileIgnore)) { + ignore[resolvedFileName][ruleId] = new Set(fileIgnore[ruleId]); + } + } + return ignore; +} +async function loadIgnoreConfig(configPath, resolver) { + const configDir = configPath ? getDir(configPath) : isBrowser ? "" : process.cwd(); + const ignorePath = configDir ? resolvePath(configDir, IGNORE_FILE) : IGNORE_FILE; + if (fs6?.existsSync && !isAbsoluteUrl(ignorePath) && !fs6.existsSync(ignorePath)) { + return {}; + } + const ignoreDocument = await resolver.resolveDocument(null, ignorePath, true); + if (ignoreDocument instanceof Error || !ignoreDocument.parsed) { + return {}; } + return resolveIgnore(ignoreDocument.parsed || {}, configDir); } - -const { ping } = WebSocket -Reflect.deleteProperty(WebSocket, 'ping') - -// 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) === webidl.util.Types.OBJECT && Symbol.iterator in V) { - return webidl.converters['sequence'](V) - } - - return webidl.converters.DOMString(V, prefix, argument) +async function loadConfig(options2 = {}) { + const { configPath = findConfig(), customExtends, externalRefResolver } = options2; + const resolver = externalRefResolver ?? new BaseResolver(); + const rawConfigDocument = configPath ? await resolver.resolveDocument(null, configPath, true) : void 0; + if (rawConfigDocument instanceof Error) { + throw rawConfigDocument; + } + const { resolvedConfig, resolvedRefMap, plugins } = await resolveConfig({ + rawConfigDocument: rawConfigDocument ? cloneConfigDocument(rawConfigDocument) : void 0, + customExtends, + configPath, + externalRefResolver + }); + const ignore = await loadIgnoreConfig(configPath, resolver); + const config = new Config(resolvedConfig, { + configPath, + document: rawConfigDocument, + resolvedRefMap, + plugins, + ignore + }); + return config; } - -// 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: () => [] - }, - { - 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) === webidl.util.Types.OBJECT && !(Symbol.iterator in V)) { - return webidl.converters.WebSocketInit(V) - } - - return { protocols: webidl.converters['DOMString or sequence'](V) } +function findConfig(dir) { + if (!fs6?.existsSync) + return; + const configPath = dir ? path9.resolve(dir, CONFIG_FILE_NAME) : CONFIG_FILE_NAME; + return fs6.existsSync(configPath) ? configPath : void 0; +} +async function createConfig(config, { configPath, externalRefResolver, ignore } = {}) { + const rawConfigSource = typeof config === "string" ? config : ""; + const rawConfigDocument = makeDocumentFromString(rawConfigSource, configPath ?? ""); + if (typeof config !== "string" && config) { + rawConfigDocument.parsed = config; + } + const { resolvedConfig, resolvedRefMap, plugins } = await resolveConfig({ + rawConfigDocument: cloneConfigDocument(rawConfigDocument), + configPath, + externalRefResolver + }); + return new Config(resolvedConfig, { + configPath, + document: rawConfigDocument, + resolvedRefMap, + plugins, + ignore + }); } - -webidl.converters.WebSocketSendData = function (V) { - if (webidl.util.Type(V) === webidl.util.Types.OBJECT) { - if (webidl.is.Blob(V)) { - return V - } - - if (webidl.is.BufferSource(V)) { - return V - } +function cloneConfigDocument(document2) { + if (!document2.parsed) { + return document2; } - - return webidl.converters.USVString(V) -} - -module.exports = { - WebSocket, - ping + const { plugins, resolve: resolve8, ...rest } = document2.parsed; + const cloned = { + ...structuredClone(rest), + plugins: plugins?.slice(), + ...resolve8 && { resolve: { ...resolve8 } } + }; + return { + ...document2, + parsed: cloned + }; } - - -/***/ }), - -/***/ 45030: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function getUserAgent() { - if (typeof navigator === "object" && "userAgent" in navigator) { - return navigator.userAgent; +var init_load = __esm({ + "node_modules/@redocly/openapi-core/lib/config/load.js"() { + init_env(); + init_ref_utils(); + init_resolve(); + init_config_resolvers(); + init_config(); + init_constants(); } +}); - if (typeof process === "object" && process.version !== undefined) { - return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; +// node_modules/@redocly/openapi-core/lib/config/index.js +var init_config2 = __esm({ + "node_modules/@redocly/openapi-core/lib/config/index.js"() { + init_config(); + init_types2(); + init_rules(); + init_builtIn(); + init_load(); + init_utils3(); + init_config_resolvers(); + init_plugins_cache(); } +}); - return ""; -} - -exports.getUserAgent = getUserAgent; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 54184: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parse = void 0; -function parse(uriString) { - let result = { - path: '', - fragment: undefined, - host: undefined, - port: undefined, - query: undefined, - reference: undefined, - scheme: undefined, - userinfo: undefined, - }; - if (uriString.includes('#')) { - result.fragment = ''; - } - let { parsed, addedDefaultScheme, addedTemporaryHost, error, } = recognizeUrl(uriString); - if (error || parsed === undefined) { - result.error = error; - return result; - } - if (typeof parsed.protocol !== undefined && parsed.protocol !== '' && !addedDefaultScheme) { - result.scheme = String(parsed.protocol).replace(':', ''); - } - if (typeof parsed.username !== undefined && parsed.username !== '') { - let userinfo = parsed.username; - if (parsed.password) { - userinfo += ':' + parsed.password; - } - result.userinfo = userinfo; - } - if (typeof parsed.hostname !== undefined && parsed.hostname !== '' && !addedTemporaryHost) { - result.host = parsed.hostname; - if (result.host.startsWith('[')) { - result.host = result.host.substring(1); - result.host = result.host.slice(0, -1); - } - } - if (typeof parsed.port !== undefined && parsed.port !== '') { - result.port = Number(parsed.port); - } - if (typeof parsed.pathname !== undefined && parsed.pathname !== '/') { - result.path = parsed.pathname; - if (addedTemporaryHost && result.path.startsWith('/')) { - result.path = result.path.substring(1); - } - } - if (typeof parsed.search !== undefined && parsed.search !== '') { - result.query = parsed.search.replace('?', ''); - } - if (typeof parsed.hash !== undefined && parsed.hash !== '') { - result.fragment = parsed.hash.replace('#', ''); +// node_modules/yaml-ast-parser/dist/src/yamlAST.js +var require_yamlAST = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/yamlAST.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var Kind2; + (function(Kind3) { + Kind3[Kind3["SCALAR"] = 0] = "SCALAR"; + Kind3[Kind3["MAPPING"] = 1] = "MAPPING"; + Kind3[Kind3["MAP"] = 2] = "MAP"; + Kind3[Kind3["SEQ"] = 3] = "SEQ"; + Kind3[Kind3["ANCHOR_REF"] = 4] = "ANCHOR_REF"; + Kind3[Kind3["INCLUDE_REF"] = 5] = "INCLUDE_REF"; + })(Kind2 = exports.Kind || (exports.Kind = {})); + function newMapping(key, value) { + var end = value ? value.endPosition : key.endPosition + 1; + var node = { + key, + value, + startPosition: key.startPosition, + endPosition: end, + kind: Kind2.MAPPING, + parent: null, + errors: [] + }; + return node; } - if (result.scheme === undefined && result.userinfo === undefined && result.host === undefined && result.port === undefined && !result.path && result.query === undefined) { - result.reference = "same-document"; + exports.newMapping = newMapping; + function newAnchorRef(key, start, end, value) { + return { + errors: [], + referencesAnchor: key, + value, + startPosition: start, + endPosition: end, + kind: Kind2.ANCHOR_REF, + parent: null + }; } - else if (result.scheme === undefined) { - result.reference = "relative"; + exports.newAnchorRef = newAnchorRef; + function newScalar(v3) { + if (v3 === void 0) { + v3 = ""; + } + var result = { + errors: [], + startPosition: -1, + endPosition: -1, + value: "" + v3, + kind: Kind2.SCALAR, + parent: null, + doubleQuoted: false, + rawValue: "" + v3 + }; + if (typeof v3 !== "string") { + result.valueObject = v3; + } + return result; } - else if (result.fragment === undefined) { - result.reference = "absolute"; + exports.newScalar = newScalar; + function newItems() { + return { + errors: [], + startPosition: -1, + endPosition: -1, + items: [], + kind: Kind2.SEQ, + parent: null + }; } - else { - result.reference = "uri"; + exports.newItems = newItems; + function newSeq() { + return newItems(); } - return result; -} -exports.parse = parse; -const temporaryHost = '_remove_me_host/'; -function recognizeUrl(uriString) { - let result = { - parsed: undefined, - addedDefaultScheme: false, - addedTemporaryHost: false, - error: undefined, - }; - let firstError; - try { - result.parsed = new URL(uriString); - return result; + exports.newSeq = newSeq; + function newMap(mappings) { + return { + errors: [], + startPosition: -1, + endPosition: -1, + mappings: mappings ? mappings : [], + kind: Kind2.MAP, + parent: null + }; } - catch (error) { - firstError = error; + exports.newMap = newMap; + } +}); + +// node_modules/yaml-ast-parser/dist/src/common.js +var require_common = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/common.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function isNothing2(subject) { + return typeof subject === "undefined" || null === subject; + } + exports.isNothing = isNothing2; + function isObject2(subject) { + return typeof subject === "object" && null !== subject; + } + exports.isObject = isObject2; + function toArray2(sequence) { + if (Array.isArray(sequence)) { + return sequence; + } else if (isNothing2(sequence)) { + return []; + } + return [sequence]; } - if (uriString.startsWith('//')) { - try { - result.parsed = new URL('https:' + uriString); - result.addedDefaultScheme = true; - return result; - } - catch (otherError) { - result.error = firstError.message; - return result; + exports.toArray = toArray2; + function extend3(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; } - try { - result.parsed = new URL('https://' + temporaryHost + uriString); - result.addedDefaultScheme = true; - result.addedTemporaryHost = true; - return result; + exports.extend = extend3; + function repeat2(string, count) { + var result = "", cycle; + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + return result; } - catch (otherError) { + exports.repeat = repeat2; + function isNegativeZero2(number) { + return 0 === number && Number.NEGATIVE_INFINITY === 1 / number; } - result.error = firstError.message; - return result; -} - - -/***/ }), - -/***/ 66753: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + exports.isNegativeZero = isNegativeZero2; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveComponents = exports.resolve = void 0; -const Parse_1 = __nccwpck_require__(54184); -const Serialize_1 = __nccwpck_require__(19722); -function resolve(baseURI, relativeURI, options) { - const schemeLessOptions = Object.assign({ scheme: 'null' }, options); - const resolved = resolveComponents((0, Parse_1.parse)(baseURI), (0, Parse_1.parse)(relativeURI), schemeLessOptions, true); - return (0, Serialize_1.serialize)(resolved); -} -exports.resolve = resolve; -function resolveComponents(base, relative, options, skipNormalization) { - const target = {}; - if (!skipNormalization) { - base = (0, Parse_1.parse)((0, Serialize_1.serialize)(base)); - relative = (0, Parse_1.parse)((0, Serialize_1.serialize)(relative)); - } - options = options || {}; - if (!options.tolerant && relative.scheme) { - target.scheme = relative.scheme; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ''); - target.query = relative.query; - } - else { - if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ''); - target.query = relative.query; +// node_modules/yaml-ast-parser/dist/src/exception.js +var require_exception = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/exception.js"(exports, module3) { + "use strict"; + var YAMLException = (function() { + function YAMLException2(reason, mark, isWarning) { + if (mark === void 0) { + mark = null; } - else { - if (!relative.path) { - target.path = base.path; - if (relative.query !== undefined) { - target.query = relative.query; - } - else { - target.query = base.query; - } - } - else { - if (relative.path.charAt(0) === '/') { - target.path = removeDotSegments(relative.path); - } - else { - if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { - target.path = '/' + relative.path; - } - else if (!base.path) { - target.path = relative.path; - } - else { - target.path = base.path.slice(0, base.path.lastIndexOf('/') + 1) + relative.path; - } - target.path = removeDotSegments(target.path); - } - target.query = relative.query; - } - target.userinfo = base.userinfo; - target.host = base.host; - target.port = base.port; + if (isWarning === void 0) { + isWarning = false; } - target.scheme = base.scheme; - } - target.fragment = relative.fragment; - return target; -} -exports.resolveComponents = resolveComponents; -function removeDotSegments(input) { - const RDS1 = /^\.\.?\//u; - const RDS2 = /^\/\.(?:\/|$)/u; - const RDS3 = /^\/\.\.(?:\/|$)/u; - const RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/u; - const output = []; - while (input.length) { - if (input.match(RDS1)) { - input = input.replace(RDS1, ''); - } - else if (input.match(RDS2)) { - input = input.replace(RDS2, '/'); - } - else if (input.match(RDS3)) { - input = input.replace(RDS3, '/'); - output.pop(); - } - else if (input === '.' || input === '..') { - input = ''; + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = this.toString(false); + this.isWarning = isWarning; + } + YAMLException2.isInstance = function(instance) { + if (instance != null && instance.getClassIdentifier && typeof instance.getClassIdentifier == "function") { + for (var _i2 = 0, _a = instance.getClassIdentifier(); _i2 < _a.length; _i2++) { + var currentIdentifier = _a[_i2]; + if (currentIdentifier == YAMLException2.CLASS_IDENTIFIER) + return true; + } } - else { - const im = input.match(RDS5); - if (im) { - const s = im[0]; - input = input.slice(s.length); - output.push(s); - } - else { - throw new Error('Unexpected dot segment condition'); - } + return false; + }; + YAMLException2.prototype.getClassIdentifier = function() { + var superIdentifiers = []; + return superIdentifiers.concat(YAMLException2.CLASS_IDENTIFIER); + }; + YAMLException2.prototype.toString = function(compact) { + if (compact === void 0) { + compact = false; } - } - return output.join(''); -} - - -/***/ }), - -/***/ 19722: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; + var result; + result = "JS-YAML: " + (this.reason || "(unknown reason)"); + if (!compact && this.mark) { + result += " " + this.mark.toString(); + } + return result; + }; + YAMLException2.CLASS_IDENTIFIER = "yaml-ast-parser.YAMLException"; + return YAMLException2; + })(); + module3.exports = YAMLException; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.serialize = void 0; -function serialize(components) { - let buildResult = buildStartUrl(components); - let urlBuilder; - try { - urlBuilder = new URL(buildResult.startUrl); - } - catch (error) { - if (error.message) { - console.error(error.message + ' ' + buildResult.startUrl); +// node_modules/yaml-ast-parser/dist/src/mark.js +var require_mark = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/mark.js"(exports, module3) { + "use strict"; + var common2 = require_common(); + var Mark = (function() { + function Mark2(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; + } + Mark2.prototype.getSnippet = function(indent, maxLength) { + if (indent === void 0) { + indent = 0; } - return ''; - } - if (components.scheme !== undefined && !buildResult.temporarySchemeAndHostUsed && !buildResult.temporarySchemeUsed) { - urlBuilder.protocol = components.scheme.toLowerCase(); - } - else { - urlBuilder.protocol = ''; - } - if (components.host !== undefined && !buildResult.temporarySchemeAndHostUsed && !buildResult.temporaryHostUsed) { - urlBuilder.host = components.host; - } - else { - urlBuilder.host = ''; - } - if (components.port) { - urlBuilder.port = String(components.port); - } - if (components.path) { - urlBuilder.pathname = components.path; - } - if (components.userinfo) { - let parts = components.userinfo.split(':'); - if (parts[0]) { - urlBuilder.username = parts[0]; + if (maxLength === void 0) { + maxLength = 75; } - if (parts[1]) { - urlBuilder.password = parts[1]; + var head, start, tail, end, snippet2; + if (!this.buffer) { + return null; } - } - if (components.query) { - urlBuilder.search = components.query; - } - if (components.fragment) { - urlBuilder.hash = components.fragment; - } - let result = urlBuilder.toString(); - if (!components.path && result.endsWith('/')) { - result = result.slice(0, -1); - } - if (buildResult.temporarySchemeAndHostUsed) { - result = result.replace(temporarySchemeAndHost, ''); - if (result.startsWith('/')) { - result = result.slice(1); + indent = indent || 4; + maxLength = maxLength || 75; + head = ""; + start = this.position; + while (start > 0 && -1 === "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(start - 1))) { + start -= 1; + if (this.position - start > maxLength / 2 - 1) { + head = " ... "; + start += 5; + break; + } } - } - if (buildResult.temporaryHostUsed) { - result = result.replace(temporaryHost, ''); - } - if (buildResult.temporarySchemeUsed) { - result = result.replace(temporaryScheme, ''); - } - return result; -} -exports.serialize = serialize; -const temporaryScheme = 'https:'; -const temporaryHost = '_remove_me_host_'; -const temporarySchemeAndHost = temporaryScheme + '//' + temporaryHost; -function buildStartUrl(components) { - let result = { - startUrl: '', - temporaryHostUsed: false, - temporarySchemeUsed: false, - temporarySchemeAndHostUsed: false, - }; - if (components.scheme && components.host) { - result.startUrl = components.scheme + '://' + components.host; - return result; - } - if (components.host) { - result.temporarySchemeUsed = true; - result.startUrl = temporaryScheme + components.host; - return result; - } - if (components.scheme) { - if (components.path) { - result.startUrl = components.scheme + ':' + components.path; - return result; + tail = ""; + end = this.position; + while (end < this.buffer.length && -1 === "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(end))) { + end += 1; + if (end - this.position > maxLength / 2 - 1) { + tail = " ... "; + end -= 5; + break; + } } - result.temporaryHostUsed = true; - result.startUrl = components.scheme + ':' + temporaryHost; - return result; - } - result.temporarySchemeAndHostUsed = true; - result.startUrl = temporarySchemeAndHost; - return result; -} - - -/***/ }), - -/***/ 99723: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; + snippet2 = this.buffer.slice(start, end); + return common2.repeat(" ", indent) + head + snippet2 + tail + "\n" + common2.repeat(" ", indent + this.position - start + head.length) + "^"; + }; + Mark2.prototype.toString = function(compact) { + if (compact === void 0) { + compact = true; + } + var snippet2, where = ""; + if (this.name) { + where += 'in "' + this.name + '" '; + } + where += "at line " + (this.line + 1) + ", column " + (this.column + 1); + if (!compact) { + snippet2 = this.getSnippet(); + if (snippet2) { + where += ":\n" + snippet2; + } + } + return where; + }; + return Mark2; + })(); + module3.exports = Mark; + } +}); -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 })); -exports.normalize = exports.equal = void 0; -const Serialize_1 = __nccwpck_require__(19722); -const Parse_1 = __nccwpck_require__(54184); -__exportStar(__nccwpck_require__(66753), exports); -__exportStar(__nccwpck_require__(19722), exports); -__exportStar(__nccwpck_require__(54184), exports); -function equal(uriA, uriB) { - let processedA; - let processedB; - if (typeof uriA === "string") { - processedA = (0, Serialize_1.serialize)((0, Parse_1.parse)(uriA)); - } - else { - processedA = (0, Serialize_1.serialize)(uriA); - } - if (typeof uriB === "string") { - processedB = (0, Serialize_1.serialize)((0, Parse_1.parse)(uriB)); - } - else { - processedB = (0, Serialize_1.serialize)(uriB); - } - return processedA.toLowerCase() === processedB.toLowerCase(); -} -exports.equal = equal; -function normalize(uri) { - if (typeof uri === "string") { - return (0, Serialize_1.serialize)((0, Parse_1.parse)(uri)); - } - else { - return (0, Parse_1.parse)((0, Serialize_1.serialize)(uri)); +// node_modules/yaml-ast-parser/dist/src/type.js +var require_type = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/type.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var YAMLException = require_exception(); + var TYPE_CONSTRUCTOR_OPTIONS2 = [ + "kind", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS2 = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases2(map2) { + var result = {}; + if (null !== map2) { + Object.keys(map2).forEach(function(style) { + map2[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + } + return result; } -} -exports.normalize = normalize; - - -/***/ }), - -/***/ 62940: -/***/ ((module) => { - -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper + var Type = /* @__PURE__ */ (function() { + function Type2(tag, options2) { + options2 = options2 || {}; + Object.keys(options2).forEach(function(name) { + if (-1 === TYPE_CONSTRUCTOR_OPTIONS2.indexOf(name)) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + this.tag = tag; + this.kind = options2["kind"] || null; + this.resolve = options2["resolve"] || function() { + return true; + }; + this.construct = options2["construct"] || function(data) { + return data; + }; + this.instanceOf = options2["instanceOf"] || null; + this.predicate = options2["predicate"] || null; + this.represent = options2["represent"] || null; + this.defaultStyle = options2["defaultStyle"] || null; + this.styleAliases = compileStyleAliases2(options2["styleAliases"] || null); + if (-1 === YAML_NODE_KINDS2.indexOf(this.kind)) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } + } + return Type2; + })(); + exports.Type = Type; + } +}); - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] +// node_modules/yaml-ast-parser/dist/src/schema.js +var require_schema2 = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/schema.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var common2 = require_common(); + var YAMLException = require_exception(); + var type_1 = require_type(); + function compileList2(schema2, name, result) { + var exclude = []; + schema2.include.forEach(function(includedSchema) { + result = compileList2(includedSchema, name, result); + }); + schema2[name].forEach(function(currentType) { + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag) { + exclude.push(previousIndex); + } + }); + result.push(currentType); + }); + return result.filter(function(type2, index) { + return -1 === exclude.indexOf(index); + }); } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) + function compileMap2() { + var result = {}, index, length; + function collectType(type2) { + result[type2.tag] = type2; + } + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; } - return ret + var Schema7 = (function() { + function Schema8(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; + this.implicit.forEach(function(type2) { + if (type2.loadKind && "scalar" !== type2.loadKind) { + 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 = compileList2(this, "implicit", []); + this.compiledExplicit = compileList2(this, "explicit", []); + this.compiledTypeMap = compileMap2(this.compiledImplicit, this.compiledExplicit); + } + Schema8.DEFAULT = null; + Schema8.create = function createSchema() { + var schemas, types2; + switch (arguments.length) { + case 1: + schemas = Schema8.DEFAULT; + types2 = arguments[0]; + break; + case 2: + schemas = arguments[0]; + types2 = arguments[1]; + break; + default: + throw new YAMLException("Wrong number of arguments for Schema.create function"); + } + schemas = common2.toArray(schemas); + types2 = common2.toArray(types2); + if (!schemas.every(function(schema2) { + return schema2 instanceof Schema8; + })) { + throw new YAMLException("Specified list of super schemas (or a single Schema object) contains a non-Schema object."); + } + if (!types2.every(function(type2) { + return type2 instanceof type_1.Type; + })) { + throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + return new Schema8({ + include: schemas, + explicit: types2 + }); + }; + return Schema8; + })(); + exports.Schema = Schema7; } -} +}); +// node_modules/yaml-ast-parser/dist/src/type/str.js +var require_str = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/type/str.js"(exports, module3) { + "use strict"; + var type_1 = require_type(); + module3.exports = new type_1.Type("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return null !== data ? data : ""; + } + }); + } +}); -/***/ }), +// node_modules/yaml-ast-parser/dist/src/type/seq.js +var require_seq = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/type/seq.js"(exports, module3) { + "use strict"; + var type_1 = require_type(); + module3.exports = new type_1.Type("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return null !== data ? data : []; + } + }); + } +}); -/***/ 57195: -/***/ ((__unused_webpack_module, exports) => { +// node_modules/yaml-ast-parser/dist/src/type/map.js +var require_map = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/type/map.js"(exports, module3) { + "use strict"; + var type_1 = require_type(); + module3.exports = new type_1.Type("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return null !== data ? data : {}; + } + }); + } +}); -"use strict"; +// node_modules/yaml-ast-parser/dist/src/schema/failsafe.js +var require_failsafe = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/schema/failsafe.js"(exports, module3) { + "use strict"; + var schema_1 = require_schema2(); + module3.exports = new schema_1.Schema({ + explicit: [ + require_str(), + require_seq(), + require_map() + ] + }); + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -function isNothing(subject) { - return (typeof subject === 'undefined') || (null === subject); -} -exports.isNothing = isNothing; -function isObject(subject) { - return (typeof subject === 'object') && (null !== subject); -} -exports.isObject = isObject; -function toArray(sequence) { - if (Array.isArray(sequence)) { - return sequence; - } - else if (isNothing(sequence)) { - return []; - } - return [sequence]; -} -exports.toArray = toArray; -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]; - } +// node_modules/yaml-ast-parser/dist/src/type/null.js +var require_null = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/type/null.js"(exports, module3) { + "use strict"; + var type_1 = require_type(); + function resolveYamlNull2(data) { + if (null === data) { + return true; + } + var max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); } - return target; -} -exports.extend = extend; -function repeat(string, count) { - var result = '', cycle; - for (cycle = 0; cycle < count; cycle += 1) { - result += string; + function constructYamlNull2() { + return null; } - return result; -} -exports.repeat = repeat; -function isNegativeZero(number) { - return (0 === number) && (Number.NEGATIVE_INFINITY === 1 / number); -} -exports.isNegativeZero = isNegativeZero; -//# sourceMappingURL=common.js.map - -/***/ }), - -/***/ 25730: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var common = __nccwpck_require__(57195); -var YAMLException = __nccwpck_require__(41629); -var DEFAULT_FULL_SCHEMA = __nccwpck_require__(75589); -var DEFAULT_SAFE_SCHEMA = __nccwpck_require__(28518); -var _toString = Object.prototype.toString; -var _hasOwnProperty = Object.prototype.hasOwnProperty; -var CHAR_TAB = 0x09; -var CHAR_LINE_FEED = 0x0A; -var CHAR_CARRIAGE_RETURN = 0x0D; -var CHAR_SPACE = 0x20; -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_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 (null === map) { - return {}; + function isNull2(object) { + return null === object; } - 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[tag]; - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style]; + module3.exports = new type_1.Type("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull2, + construct: constructYamlNull2, + predicate: isNull2, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; } - 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; + }, + defaultStyle: "lowercase" + }); + } +}); + +// node_modules/yaml-ast-parser/dist/src/type/bool.js +var require_bool = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/type/bool.js"(exports, module3) { + "use strict"; + var type_1 = require_type(); + function resolveYamlBoolean2(data) { + if (null === data) { + return false; + } + var max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); } - else { - throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); + function constructYamlBoolean2(data) { + return data === "true" || data === "True" || data === "TRUE"; } - 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.skipInvalid = options['skipInvalid'] || false; - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); - this.styleMap = compileStyleMap(this.schema, options['styles'] || 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) { - 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; + function isBoolean2(object) { + return "[object Boolean]" === Object.prototype.toString.call(object); } - 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; + module3.exports = new type_1.Type("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean2, + construct: constructYamlBoolean2, + predicate: isBoolean2, + represent: { + lowercase: function(object) { + return object ? "true" : "false"; + }, + uppercase: function(object) { + return object ? "TRUE" : "FALSE"; + }, + camelcase: function(object) { + return object ? "True" : "False"; } + }, + defaultStyle: "lowercase" + }); + } +}); + +// node_modules/yaml-ast-parser/dist/src/type/int.js +var require_int = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/type/int.js"(exports, module3) { + "use strict"; + var common2 = require_common(); + var type_1 = require_type(); + function isHexCode2(c2) { + return 48 <= c2 && c2 <= 57 || 65 <= c2 && c2 <= 70 || 97 <= c2 && c2 <= 102; } - return false; -} -function StringBuilder(source) { - this.source = source; - this.result = ''; - this.checkpoint = 0; -} -StringBuilder.prototype.takeUpTo = function (position) { - var er; - if (position < this.checkpoint) { - er = new Error('position should be > checkpoint'); - er.position = position; - er.checkpoint = this.checkpoint; - throw er; - } - this.result += this.source.slice(this.checkpoint, position); - this.checkpoint = position; - return this; -}; -StringBuilder.prototype.escapeChar = function () { - var character, esc; - character = this.source.charCodeAt(this.checkpoint); - esc = ESCAPE_SEQUENCES[character] || encodeHex(character); - this.result += esc; - this.checkpoint += 1; - return this; -}; -StringBuilder.prototype.finish = function () { - if (this.source.length > this.checkpoint) { - this.takeUpTo(this.source.length); - } -}; -function writeScalar(state, object, level) { - var simple, first, spaceWrap, folded, literal, single, double, sawLineFeed, linePosition, longestLine, indent, max, character, position, escapeSeq, hexEsc, previous, lineLength, modifier, trailingLineBreaks, result; - if (0 === object.length) { - state.dump = "''"; - return; - } - if (object.indexOf("!include") == 0) { - state.dump = "" + object; - return; - } - if (object.indexOf("!$$$novalue") == 0) { - state.dump = ""; - return; - } - if (-1 !== DEPRECATED_BOOLEANS_SYNTAX.indexOf(object)) { - state.dump = "'" + object + "'"; - return; - } - simple = true; - first = object.length ? object.charCodeAt(0) : 0; - spaceWrap = (CHAR_SPACE === first || - CHAR_SPACE === object.charCodeAt(object.length - 1)); - if (CHAR_MINUS === first || - CHAR_QUESTION === first || - CHAR_COMMERCIAL_AT === first || - CHAR_GRAVE_ACCENT === first) { - simple = false; - } - if (spaceWrap) { - simple = false; - folded = false; - literal = false; - } - else { - folded = true; - literal = true; - } - single = true; - double = new StringBuilder(object); - sawLineFeed = false; - linePosition = 0; - longestLine = 0; - indent = state.indent * level; - max = 80; - if (indent < 40) { - max -= indent; + function isOctCode2(c2) { + return 48 <= c2 && c2 <= 55; } - else { - max = 40; + function isDecCode2(c2) { + return 48 <= c2 && c2 <= 57; } - for (position = 0; position < object.length; position++) { - character = object.charCodeAt(position); - if (simple) { - if (!simpleChar(character)) { - simple = false; + function resolveYamlInteger2(data) { + if (null === data) { + 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; } - else { - continue; + if (ch !== "0" && ch !== "1") { + return false; } + hasDigits = true; + } + return hasDigits; } - if (single && character === CHAR_SINGLE_QUOTE) { - single = false; - } - escapeSeq = ESCAPE_SEQUENCES[character]; - hexEsc = needsHexEscape(character); - if (!escapeSeq && !hexEsc) { - continue; - } - if (character !== CHAR_LINE_FEED && - character !== CHAR_DOUBLE_QUOTE && - character !== CHAR_SINGLE_QUOTE) { - folded = false; - literal = false; - } - else if (character === CHAR_LINE_FEED) { - sawLineFeed = true; - single = false; - if (position > 0) { - previous = object.charCodeAt(position - 1); - if (previous === CHAR_SPACE) { - literal = false; - folded = false; - } + if (ch === "x") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") { + continue; } - if (folded) { - lineLength = position - linePosition; - linePosition = position; - if (lineLength > longestLine) { - longestLine = lineLength; - } + if (!isHexCode2(data.charCodeAt(index))) { + return false; } + hasDigits = true; + } + return hasDigits; } - if (character !== CHAR_DOUBLE_QUOTE) { - single = false; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") { + continue; + } + if (!isOctCode2(data.charCodeAt(index))) { + return false; + } + hasDigits = true; } - double.takeUpTo(position); - double.escapeChar(); - } - if (simple && testImplicitResolving(state, object)) { - simple = false; - } - modifier = ''; - if (folded || literal) { - trailingLineBreaks = 0; - if (object.charCodeAt(object.length - 1) === CHAR_LINE_FEED) { - trailingLineBreaks += 1; - if (object.charCodeAt(object.length - 2) === CHAR_LINE_FEED) { - trailingLineBreaks += 1; - } + return hasDigits; + } + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") { + continue; } - if (trailingLineBreaks === 0) { - modifier = '-'; + if (ch === ":") { + break; } - else if (trailingLineBreaks === 2) { - modifier = '+'; + if (!isDecCode2(data.charCodeAt(index))) { + return false; } + hasDigits = true; + } + if (!hasDigits) { + return false; + } + if (ch !== ":") { + return true; + } + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); } - if (literal && longestLine < max) { - folded = false; - } - if (!sawLineFeed) { - literal = false; - } - if (simple) { - state.dump = object; - } - else if (single) { - state.dump = '\'' + object + '\''; - } - else if (folded) { - result = fold(object, max); - state.dump = '>' + modifier + '\n' + indentString(result, indent); - } - else if (literal) { - if (!modifier) { - object = object.replace(/\n$/, ''); + function constructYamlInteger2(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; } - state.dump = '|' + modifier + '\n' + indentString(object, indent); - } - else if (double) { - double.finish(); - state.dump = '"' + double.result + '"'; - } - else { - throw new Error('Failed to dump scalar value'); + value = value.slice(1); + ch = value[0]; + } + if ("0" === value) { + 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(v3) { + digits.unshift(parseInt(v3, 10)); + }); + value = 0; + base = 1; + digits.forEach(function(d) { + value += d * base; + base *= 60; + }); + return sign * value; + } + return sign * parseInt(value, 10); } - return; -} -function fold(object, max) { - var result = '', position = 0, length = object.length, trailing = /\n+$/.exec(object), newLine; - if (trailing) { - length = trailing.index + 1; + function isInteger2(object) { + return "[object Number]" === Object.prototype.toString.call(object) && (0 === object % 1 && !common2.isNegativeZero(object)); } - while (position < length) { - newLine = object.indexOf('\n', position); - if (newLine > length || newLine === -1) { - if (result) { - result += '\n\n'; - } - result += foldLine(object.slice(position, length), max); - position = length; - } - else { - if (result) { - result += '\n\n'; - } - result += foldLine(object.slice(position, newLine), max); - position = newLine + 1; + module3.exports = new type_1.Type("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger2, + construct: constructYamlInteger2, + predicate: isInteger2, + represent: { + binary: function(object) { + return "0b" + object.toString(2); + }, + octal: function(object) { + return "0" + object.toString(8); + }, + decimal: function(object) { + return object.toString(10); + }, + hexadecimal: function(object) { + return "0x" + object.toString(16).toUpperCase(); } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } + }); + } +}); + +// node_modules/yaml-ast-parser/dist/src/type/float.js +var require_float = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/type/float.js"(exports, module3) { + "use strict"; + var common2 = require_common(); + var type_1 = require_type(); + var YAML_FLOAT_PATTERN2 = new RegExp("^(?:[-+]?(?:[0-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 resolveYamlFloat2(data) { + if (null === data) { + return false; + } + var value, sign, base, digits; + if (!YAML_FLOAT_PATTERN2.test(data)) { + return false; + } + return true; } - if (trailing && trailing[0] !== '\n') { - result += trailing[0]; + function constructYamlFloat2(data) { + var value, sign, base, digits; + value = data.replace(/_/g, "").toLowerCase(); + sign = "-" === value[0] ? -1 : 1; + digits = []; + if (0 <= "+-".indexOf(value[0])) { + value = value.slice(1); + } + if (".inf" === value) { + return 1 === sign ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + } else if (".nan" === value) { + return NaN; + } else if (0 <= value.indexOf(":")) { + value.split(":").forEach(function(v3) { + digits.unshift(parseFloat(v3, 10)); + }); + value = 0; + base = 1; + digits.forEach(function(d) { + value += d * base; + base *= 60; + }); + return sign * value; + } + return sign * parseFloat(value, 10); } - return result; -} -function foldLine(line, max) { - if (line === '') { - return line; + function representYamlFloat2(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 (common2.isNegativeZero(object)) { + return "-0.0"; + } + return object.toString(10); + } + function isFloat2(object) { + return "[object Number]" === Object.prototype.toString.call(object) && (0 !== object % 1 || common2.isNegativeZero(object)); + } + module3.exports = new type_1.Type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat2, + construct: constructYamlFloat2, + predicate: isFloat2, + represent: representYamlFloat2, + defaultStyle: "lowercase" + }); + } +}); + +// node_modules/yaml-ast-parser/dist/src/schema/json.js +var require_json = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/schema/json.js"(exports, module3) { + "use strict"; + var schema_1 = require_schema2(); + module3.exports = new schema_1.Schema({ + include: [ + require_failsafe() + ], + implicit: [ + require_null(), + require_bool(), + require_int(), + require_float() + ] + }); + } +}); + +// node_modules/yaml-ast-parser/dist/src/schema/core.js +var require_core7 = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/schema/core.js"(exports, module3) { + "use strict"; + var schema_1 = require_schema2(); + module3.exports = new schema_1.Schema({ + include: [ + require_json() + ] + }); + } +}); + +// node_modules/yaml-ast-parser/dist/src/type/timestamp.js +var require_timestamp = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/type/timestamp.js"(exports, module3) { + "use strict"; + var type_1 = require_type(); + var YAML_TIMESTAMP_REGEXP2 = 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 resolveYamlTimestamp2(data) { + if (null === data) { + return false; + } + var match2, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match2 = YAML_TIMESTAMP_REGEXP2.exec(data); + if (null === match2) { + return false; + } + return true; } - var foldRe = /[^\s] [^\s]/g, result = '', prevMatch = 0, foldStart = 0, match = foldRe.exec(line), index, foldEnd, folded; - while (match) { - index = match.index; - if (index - foldStart > max) { - if (prevMatch !== foldStart) { - foldEnd = prevMatch; - } - else { - foldEnd = index; - } - if (result) { - result += '\n'; - } - folded = line.slice(foldStart, foldEnd); - result += folded; - foldStart = foldEnd + 1; + function constructYamlTimestamp2(data) { + var match2, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match2 = YAML_TIMESTAMP_REGEXP2.exec(data); + if (null === match2) { + throw new Error("Date resolve error"); + } + year = +match2[1]; + month = +match2[2] - 1; + day = +match2[3]; + if (!match2[4]) { + return new Date(Date.UTC(year, month, day)); + } + hour = +match2[4]; + minute = +match2[5]; + second = +match2[6]; + if (match2[7]) { + fraction = match2[7].slice(0, 3); + while (fraction.length < 3) { + fraction = fraction + "0"; } - prevMatch = index + 1; - match = foldRe.exec(line); - } - if (result) { - result += '\n'; - } - if (foldStart !== prevMatch && line.length - foldStart > max) { - result += line.slice(foldStart, prevMatch) + '\n' + - line.slice(prevMatch + 1); - } - else { - result += line.slice(foldStart); - } - return result; -} -function simpleChar(character) { - return CHAR_TAB !== character && - CHAR_LINE_FEED !== character && - CHAR_CARRIAGE_RETURN !== character && - CHAR_COMMA !== character && - CHAR_LEFT_SQUARE_BRACKET !== character && - CHAR_RIGHT_SQUARE_BRACKET !== character && - CHAR_LEFT_CURLY_BRACKET !== character && - CHAR_RIGHT_CURLY_BRACKET !== character && - CHAR_SHARP !== character && - CHAR_AMPERSAND !== character && - CHAR_ASTERISK !== character && - CHAR_EXCLAMATION !== character && - CHAR_VERTICAL_LINE !== character && - CHAR_GREATER_THAN !== character && - CHAR_SINGLE_QUOTE !== character && - CHAR_DOUBLE_QUOTE !== character && - CHAR_PERCENT !== character && - CHAR_COLON !== character && - !ESCAPE_SEQUENCES[character] && - !needsHexEscape(character); -} -function needsHexEscape(character) { - return !((0x00020 <= character && character <= 0x00007E) || - (0x00085 === character) || - (0x000A0 <= character && character <= 0x00D7FF) || - (0x0E000 <= character && character <= 0x00FFFD) || - (0x10000 <= character && character <= 0x10FFFF)); -} -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 (0 !== index) { - _result += ', '; - } - _result += state.dump; + fraction = +fraction; + } + if (match2[9]) { + tz_hour = +match2[10]; + tz_minute = +(match2[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 6e4; + if ("-" === match2[9]) { + delta = -delta; } + } + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) { + date.setTime(date.getTime() - delta); + } + return date; } - 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 || 0 !== index) { - _result += generateNextLine(state, level); - } - _result += '- ' + state.dump; - } + function representYamlTimestamp2(object) { + return object.toISOString(); } - 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 (0 !== index) { - pairBuffer += ', '; - } - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - if (!writeNode(state, level, objectKey, false, false)) { - continue; - } - if (state.dump.length > 1024) { - pairBuffer += '? '; + module3.exports = new type_1.Type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp2, + construct: constructYamlTimestamp2, + instanceOf: Date, + represent: representYamlTimestamp2 + }); + } +}); + +// node_modules/yaml-ast-parser/dist/src/type/merge.js +var require_merge = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/type/merge.js"(exports, module3) { + "use strict"; + var type_1 = require_type(); + function resolveYamlMerge2(data) { + return "<<" === data || null === data; + } + module3.exports = new type_1.Type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge2 + }); + } +}); + +// node_modules/yaml-ast-parser/dist/src/type/binary.js +var require_binary = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/type/binary.js"(exports, module3) { + "use strict"; + var NodeBuffer = __require("buffer").Buffer; + var type_1 = require_type(); + var BASE64_MAP2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary2(data) { + if (null === data) { + return false; + } + var code, idx, bitlen = 0, len = 0, max = data.length, map2 = BASE64_MAP2; + for (idx = 0; idx < max; idx++) { + code = map2.indexOf(data.charAt(idx)); + if (code > 64) { + continue; } - pairBuffer += state.dump + ': '; - if (!writeNode(state, level, objectValue, false, false)) { - continue; + if (code < 0) { + return false; } - pairBuffer += state.dump; - _result += pairBuffer; + bitlen += 6; + } + return bitlen % 8 === 0; + } + function constructYamlBinary2(data) { + var code, idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map2 = BASE64_MAP2, 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 | map2.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 new NodeBuffer(result); + } + return result; } - 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; - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ''; - if (!compact || 0 !== index) { - pairBuffer += generateNextLine(state, level); + function representYamlBinary2(object) { + var result = "", bits = 0, idx, tail, max = object.length, map2 = BASE64_MAP2; + for (idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; } - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - if (!writeNode(state, level + 1, objectKey, true, true)) { - continue; + bits = (bits << 8) + object[idx]; + } + tail = max % 3; + if (tail === 0) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } else if (tail === 2) { + result += map2[bits >> 10 & 63]; + result += map2[bits >> 4 & 63]; + result += map2[bits << 2 & 63]; + result += map2[64]; + } else if (tail === 1) { + result += map2[bits >> 2 & 63]; + result += map2[bits << 4 & 63]; + result += map2[64]; + result += map2[64]; + } + return result; + } + function isBinary2(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); + } + module3.exports = new type_1.Type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary2, + construct: constructYamlBinary2, + predicate: isBinary2, + represent: representYamlBinary2 + }); + } +}); + +// node_modules/yaml-ast-parser/dist/src/type/omap.js +var require_omap = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/type/omap.js"(exports, module3) { + "use strict"; + var type_1 = require_type(); + var _hasOwnProperty2 = Object.prototype.hasOwnProperty; + var _toString2 = Object.prototype.toString; + function resolveYamlOmap2(data) { + if (null === data) { + 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 ("[object Object]" !== _toString2.call(pair)) { + return false; } - explicitPair = (null !== state.tag && '?' !== state.tag) || - (state.dump && state.dump.length > 1024); - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?'; - } - else { - pairBuffer += '? '; + for (pairKey in pair) { + if (_hasOwnProperty2.call(pair, pairKey)) { + if (!pairHasKey) { + pairHasKey = true; + } else { + return false; } + } } - pairBuffer += state.dump; - if (explicitPair) { - pairBuffer += generateNextLine(state, level); + if (!pairHasKey) { + return false; } - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue; + if (-1 === objectKeys.indexOf(pairKey)) { + objectKeys.push(pairKey); + } else { + return false; } - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':'; + } + return true; + } + function constructYamlOmap2(data) { + return null !== data ? data : []; + } + module3.exports = new type_1.Type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap2, + construct: constructYamlOmap2 + }); + } +}); + +// node_modules/yaml-ast-parser/dist/src/type/pairs.js +var require_pairs = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/type/pairs.js"(exports, module3) { + "use strict"; + var type_1 = require_type(); + var ast = require_yamlAST(); + var _toString2 = Object.prototype.toString; + function resolveYamlPairs2(data) { + if (null === data) { + return true; + } + if (data.kind != ast.Kind.SEQ) { + return false; + } + var index, length, pair, keys, result, object = data.items; + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + if ("[object Object]" !== _toString2.call(pair)) { + return false; } - else { - pairBuffer += ': '; + if (!Array.isArray(pair.mappings)) { + return false; } - pairBuffer += state.dump; - _result += pairBuffer; - } - state.tag = _tag; - state.dump = _result || '{}'; -} -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 || (('object' === typeof 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 ('[object Function]' === _toString.call(type.represent)) { - _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; + if (1 !== pair.mappings.length) { + return false; } + } + return true; } - return false; -} -function writeNode(state, level, object, block, compact) { - state.tag = null; - state.dump = object; - if (!detectType(state, object, false)) { - detectType(state, object, true); + function constructYamlPairs2(data) { + if (null === data || !Array.isArray(data.items)) { + return []; + } + var index, length, keys, result, object = data.items; + result = ast.newItems(); + result.parent = data.parent; + result.startPosition = data.startPosition; + result.endPosition = data.endPosition; + for (index = 0, length = object.length; index < length; index += 1) { + var pair = object[index]; + var mapping = pair.mappings[0]; + var pairSeq = ast.newItems(); + pairSeq.parent = result; + pairSeq.startPosition = mapping.key.startPosition; + pairSeq.endPosition = mapping.value.startPosition; + mapping.key.parent = pairSeq; + mapping.value.parent = pairSeq; + pairSeq.items = [mapping.key, mapping.value]; + result.items.push(pairSeq); + } + return result; } - var type = _toString.call(state.dump); - if (block) { - block = (0 > state.flowLevel || state.flowLevel > level); + module3.exports = new type_1.Type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs2, + construct: constructYamlPairs2 + }); + } +}); + +// node_modules/yaml-ast-parser/dist/src/type/set.js +var require_set = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/type/set.js"(exports, module3) { + "use strict"; + var type_1 = require_type(); + var ast = require_yamlAST(); + function resolveYamlSet2(data) { + if (null === data) { + return true; + } + if (data.kind != ast.Kind.MAP) { + return false; + } + return true; } - if ((null !== state.tag && '?' !== state.tag) || (2 !== state.indent && level > 0)) { - compact = false; + function constructYamlSet2(data) { + return null !== data ? data : {}; } - var objectOrArray = '[object Object]' === type || '[object Array]' === type, duplicateIndex, duplicate; - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; + module3.exports = new type_1.Type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet2, + construct: constructYamlSet2 + }); + } +}); + +// node_modules/yaml-ast-parser/dist/src/schema/default_safe.js +var require_default_safe = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/schema/default_safe.js"(exports, module3) { + "use strict"; + var schema_1 = require_schema2(); + var schema2 = new schema_1.Schema({ + include: [ + require_core7() + ], + implicit: [ + require_timestamp(), + require_merge() + ], + explicit: [ + require_binary(), + require_omap(), + require_pairs(), + require_set() + ] + }); + module3.exports = schema2; + } +}); + +// node_modules/yaml-ast-parser/dist/src/type/js/undefined.js +var require_undefined = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/type/js/undefined.js"(exports, module3) { + "use strict"; + var type_1 = require_type(); + function resolveJavascriptUndefined() { + return true; } - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex; + function constructJavascriptUndefined() { + return void 0; } - else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true; - } - if ('[object Object]' === type) { - if (block && (0 !== Object.keys(state.dump).length)) { - writeBlockMapping(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + (0 === level ? '\n' : '') + state.dump; - } - } - else { - writeFlowMapping(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } - else if ('[object Array]' === type) { - if (block && (0 !== state.dump.length)) { - writeBlockSequence(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + (0 === level ? '\n' : '') + state.dump; - } - } - else { - writeFlowSequence(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } - else if ('[object String]' === type) { - if ('?' !== state.tag) { - writeScalar(state, state.dump, level); - } - } - else { - if (state.skipInvalid) { - return false; - } - throw new YAMLException('unacceptable kind of an object to dump ' + type); - } - if (null !== state.tag && '?' !== state.tag) { - state.dump = '!<' + state.tag + '> ' + state.dump; - } + function representJavascriptUndefined() { + return ""; } - 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]]); + function isUndefined(object) { + return "undefined" === typeof object; } - state.usedDuplicates = new Array(length); -} -function inspectNode(object, objects, duplicatesIndexes) { - var type = _toString.call(object), objectKeyList, index, length; - if (null !== object && 'object' === typeof object) { - index = objects.indexOf(object); - if (-1 !== index) { - if (-1 === duplicatesIndexes.indexOf(index)) { - duplicatesIndexes.push(index); - } + module3.exports = new type_1.Type("tag:yaml.org,2002:js/undefined", { + kind: "scalar", + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined + }); + } +}); + +// node_modules/yaml-ast-parser/dist/src/type/js/regexp.js +var require_regexp = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/type/js/regexp.js"(exports, module3) { + "use strict"; + var type_1 = require_type(); + function resolveJavascriptRegExp(data) { + if (null === data) { + return false; + } + if (0 === data.length) { + return false; + } + var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = ""; + if ("/" === regexp[0]) { + if (tail) { + modifiers = tail[1]; } - 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); - } - } + if (modifiers.length > 3) { + return false; } - } -} -function dump(input, options) { - options = options || {}; - var state = new State(options); - getDuplicateReferences(input, state); - if (writeNode(state, 0, input, true, true)) { - return state.dump + '\n'; - } - return ''; -} -exports.dump = dump; -function safeDump(input, options) { - return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} -exports.safeDump = safeDump; -//# sourceMappingURL=dumper.js.map - -/***/ }), - -/***/ 41629: -/***/ ((module) => { - -"use strict"; - -var YAMLException = (function () { - function YAMLException(reason, mark, isWarning) { - if (mark === void 0) { mark = null; } - if (isWarning === void 0) { isWarning = false; } - this.name = 'YAMLException'; - this.reason = reason; - this.mark = mark; - this.message = this.toString(false); - this.isWarning = isWarning; - } - YAMLException.isInstance = function (instance) { - if (instance != null && instance.getClassIdentifier - && typeof (instance.getClassIdentifier) == "function") { - for (var _i = 0, _a = instance.getClassIdentifier(); _i < _a.length; _i++) { - var currentIdentifier = _a[_i]; - if (currentIdentifier == YAMLException.CLASS_IDENTIFIER) - return true; - } + if (regexp[regexp.length - modifiers.length - 1] !== "/") { + return false; } + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + } + try { + var dummy = new RegExp(regexp, modifiers); + return true; + } catch (error2) { return false; - }; - YAMLException.prototype.getClassIdentifier = function () { - var superIdentifiers = []; - return superIdentifiers.concat(YAMLException.CLASS_IDENTIFIER); - }; - YAMLException.prototype.toString = function (compact) { - if (compact === void 0) { compact = false; } - var result; - result = 'JS-YAML: ' + (this.reason || '(unknown reason)'); - if (!compact && this.mark) { - result += ' ' + this.mark.toString(); + } + } + function constructJavascriptRegExp(data) { + var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = ""; + if ("/" === regexp[0]) { + if (tail) { + modifiers = tail[1]; } - return result; - }; - YAMLException.CLASS_IDENTIFIER = "yaml-ast-parser.YAMLException"; - return YAMLException; -}()); -module.exports = YAMLException; -//# sourceMappingURL=exception.js.map - -/***/ }), - -/***/ 68342: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -Object.defineProperty(exports, "__esModule", ({ value: true })); -var loader_1 = __nccwpck_require__(68729); -exports.load = loader_1.load; -exports.loadAll = loader_1.loadAll; -exports.safeLoad = loader_1.safeLoad; -exports.safeLoadAll = loader_1.safeLoadAll; -var dumper_1 = __nccwpck_require__(25730); -exports.dump = dumper_1.dump; -exports.safeDump = dumper_1.safeDump; -exports.YAMLException = __nccwpck_require__(41629); -__export(__nccwpck_require__(39421)); -function deprecated(name) { - return function () { - throw new Error('Function ' + name + ' is deprecated and cannot be used.'); - }; -} -__export(__nccwpck_require__(92434)); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 68729: -/***/ ((module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var ast = __nccwpck_require__(39421); -'use strict'; -var common = __nccwpck_require__(57195); -var YAMLException = __nccwpck_require__(41629); -var Mark = __nccwpck_require__(6324); -var DEFAULT_SAFE_SCHEMA = __nccwpck_require__(28518); -var DEFAULT_FULL_SCHEMA = __nccwpck_require__(75589); -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 is_EOL(c) { - return (c === 0x0A) || (c === 0x0D); -} -function is_WHITE_SPACE(c) { - return (c === 0x09) || (c === 0x20); -} -function is_WS_OR_EOL(c) { - return (c === 0x09) || - (c === 0x20) || - (c === 0x0A) || - (c === 0x0D); -} -function is_FLOW_INDICATOR(c) { - return 0x2C === c || - 0x5B === c || - 0x5D === c || - 0x7B === c || - 0x7D === c; -} -function fromHexCode(c) { - var lc; - if ((0x30 <= c) && (c <= 0x39)) { - return c - 0x30; + 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; } - lc = c | 0x20; - if ((0x61 <= lc) && (lc <= 0x66)) { - return lc - 0x61 + 10; + function isRegExp(object) { + return "[object RegExp]" === Object.prototype.toString.call(object); } - return -1; -} -function escapedHexLen(c) { - if (c === 0x78) { + module3.exports = new type_1.Type("tag:yaml.org,2002:js/regexp", { + kind: "scalar", + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp + }); + } +}); + +// node_modules/yaml-ast-parser/dist/src/schema/default_full.js +var require_default_full = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/schema/default_full.js"(exports, module3) { + "use strict"; + var schema_1 = require_schema2(); + var schema2 = new schema_1.Schema({ + include: [ + require_default_safe() + ], + explicit: [ + require_undefined(), + require_regexp() + ] + }); + schema_1.Schema.DEFAULT = schema2; + module3.exports = schema2; + } +}); + +// node_modules/yaml-ast-parser/dist/src/loader.js +var require_loader = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/loader.js"(exports, module3) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var ast = require_yamlAST(); + var common2 = 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 _hasOwnProperty2 = Object.prototype.hasOwnProperty; + var CONTEXT_FLOW_IN2 = 1; + var CONTEXT_FLOW_OUT2 = 2; + var CONTEXT_BLOCK_IN2 = 3; + var CONTEXT_BLOCK_OUT2 = 4; + var CHOMPING_CLIP2 = 1; + var CHOMPING_STRIP2 = 2; + var CHOMPING_KEEP2 = 3; + var PATTERN_NON_PRINTABLE2 = /[\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_BREAKS2 = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS2 = /[,\[\]\{\}]/; + var PATTERN_TAG_HANDLE2 = /^(?:!|!!|![a-z\-]+!)$/i; + var PATTERN_TAG_URI2 = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + function is_EOL2(c2) { + return c2 === 10 || c2 === 13; + } + function is_WHITE_SPACE2(c2) { + return c2 === 9 || c2 === 32; + } + function is_WS_OR_EOL2(c2) { + return c2 === 9 || c2 === 32 || c2 === 10 || c2 === 13; + } + function is_FLOW_INDICATOR2(c2) { + return 44 === c2 || 91 === c2 || 93 === c2 || 123 === c2 || 125 === c2; + } + function fromHexCode2(c2) { + var lc; + if (48 <= c2 && c2 <= 57) { + return c2 - 48; + } + lc = c2 | 32; + if (97 <= lc && lc <= 102) { + return lc - 97 + 10; + } + return -1; + } + function escapedHexLen2(c2) { + if (c2 === 120) { return 2; - } - if (c === 0x75) { + } + if (c2 === 117) { return 4; - } - if (c === 0x55) { + } + if (c2 === 85) { return 8; + } + return 0; } - return 0; -} -function fromDecimalCode(c) { - if ((0x30 <= c) && (c <= 0x39)) { - return c - 0x30; + function fromDecimalCode2(c2) { + if (48 <= c2 && c2 <= 57) { + return c2 - 48; + } + return -1; } - return -1; -} -function simpleEscapeSequence(c) { - return (c === 0x30) ? '\x00' : - (c === 0x61) ? '\x07' : - (c === 0x62) ? '\x08' : - (c === 0x74) ? '\x09' : - (c === 0x09) ? '\x09' : - (c === 0x6E) ? '\x0A' : - (c === 0x76) ? '\x0B' : - (c === 0x66) ? '\x0C' : - (c === 0x72) ? '\x0D' : - (c === 0x65) ? '\x1B' : - (c === 0x20) ? ' ' : - (c === 0x22) ? '\x22' : - (c === 0x2F) ? '/' : - (c === 0x5C) ? '\x5C' : - (c === 0x4E) ? '\x85' : - (c === 0x5F) ? '\xA0' : - (c === 0x4C) ? '\u2028' : - (c === 0x50) ? '\u2029' : ''; -} -function charFromCodepoint(c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c); + function simpleEscapeSequence2(c2) { + return c2 === 48 ? "\0" : c2 === 97 ? "\x07" : c2 === 98 ? "\b" : c2 === 116 ? " " : c2 === 9 ? " " : c2 === 110 ? "\n" : c2 === 118 ? "\v" : c2 === 102 ? "\f" : c2 === 114 ? "\r" : c2 === 101 ? "\x1B" : c2 === 32 ? " " : c2 === 34 ? '"' : c2 === 47 ? "/" : c2 === 92 ? "\\" : c2 === 78 ? "\x85" : c2 === 95 ? "\xA0" : c2 === 76 ? "\u2028" : c2 === 80 ? "\u2029" : ""; } - return String.fromCharCode(((c - 0x010000) >> 10) + 0xD800, ((c - 0x010000) & 0x03FF) + 0xDC00); -} -var simpleEscapeCheck = new Array(256); -var simpleEscapeMap = new Array(256); -var customEscapeCheck = new Array(256); -var customEscapeMap = new Array(256); -for (var i = 0; i < 256; i++) { - customEscapeMap[i] = simpleEscapeMap[i] = simpleEscapeSequence(i); - simpleEscapeCheck[i] = simpleEscapeMap[i] ? 1 : 0; - customEscapeCheck[i] = 1; - if (!simpleEscapeCheck[i]) { - customEscapeMap[i] = '\\' + String.fromCharCode(i); + function charFromCodepoint2(c2) { + if (c2 <= 65535) { + return String.fromCharCode(c2); + } + return String.fromCharCode((c2 - 65536 >> 10) + 55296, (c2 - 65536 & 1023) + 56320); } -} -var State = (function () { - function State(input, options) { + var simpleEscapeCheck2 = new Array(256); + var simpleEscapeMap2 = new Array(256); + var customEscapeCheck = new Array(256); + var customEscapeMap = new Array(256); + for (i2 = 0; i2 < 256; i2++) { + customEscapeMap[i2] = simpleEscapeMap2[i2] = simpleEscapeSequence2(i2); + simpleEscapeCheck2[i2] = simpleEscapeMap2[i2] ? 1 : 0; + customEscapeCheck[i2] = 1; + if (!simpleEscapeCheck2[i2]) { + customEscapeMap[i2] = "\\" + String.fromCharCode(i2); + } + } + var i2; + var State2 = /* @__PURE__ */ (function() { + function State3(input, options2) { this.errorMap = {}; this.errors = []; this.lines = []; 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.allowAnyEscape = options['allowAnyEscape'] || false; - this.ignoreDuplicateKeys = options['ignoreDuplicateKeys'] || false; + this.filename = options2["filename"] || null; + this.schema = options2["schema"] || DEFAULT_FULL_SCHEMA; + this.onWarning = options2["onWarning"] || null; + this.legacy = options2["legacy"] || false; + this.allowAnyEscape = options2["allowAnyEscape"] || false; + this.ignoreDuplicateKeys = options2["ignoreDuplicateKeys"] || false; this.implicitTypes = this.schema.compiledImplicit; this.typeMap = this.schema.compiledTypeMap; this.length = input.length; @@ -125127,3573 +68297,8467 @@ var State = (function () { this.lineStart = 0; this.lineIndent = 0; this.documents = []; + } + return State3; + })(); + function generateError2(state, message, isWarning) { + if (isWarning === void 0) { + isWarning = false; + } + return new YAMLException(message, new Mark(state.filename, state.input, state.position, state.line, state.position - state.lineStart), isWarning); } - return State; -}()); -function generateError(state, message, isWarning) { - if (isWarning === void 0) { isWarning = false; } - return new YAMLException(message, new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart)), isWarning); -} -function throwErrorFromPosition(state, position, message, isWarning, toLineEnd) { - if (isWarning === void 0) { isWarning = false; } - if (toLineEnd === void 0) { toLineEnd = false; } - var line = positionToLine(state, position); - if (!line) { + function throwErrorFromPosition(state, position, message, isWarning, toLineEnd) { + if (isWarning === void 0) { + isWarning = false; + } + if (toLineEnd === void 0) { + toLineEnd = false; + } + var line = positionToLine(state, position); + if (!line) { return; - } - var hash = message + position; - if (state.errorMap[hash]) { + } + var hash = message + position; + if (state.errorMap[hash]) { return; - } - var mark = new Mark(state.filename, state.input, position, line.line, (position - line.start)); - if (toLineEnd) { + } + var mark = new Mark(state.filename, state.input, position, line.line, position - line.start); + if (toLineEnd) { mark.toLineEnd = true; + } + var error2 = new YAMLException(message, mark, isWarning); + state.errors.push(error2); } - var error = new YAMLException(message, mark, isWarning); - state.errors.push(error); -} -function throwError(state, message) { - var error = generateError(state, message); - var hash = error.message + error.mark.position; - if (state.errorMap[hash]) { + function throwError2(state, message) { + var error2 = generateError2(state, message); + var hash = error2.message + error2.mark.position; + if (state.errorMap[hash]) { return; - } - state.errors.push(error); - state.errorMap[hash] = 1; - var or = state.position; - while (true) { + } + state.errors.push(error2); + state.errorMap[hash] = 1; + var or2 = state.position; + while (true) { if (state.position >= state.input.length - 1) { - return; + return; } - var c = state.input.charAt(state.position); - if (c == '\n') { - state.position--; - if (state.position == or) { - state.position += 1; - } - return; + var c2 = state.input.charAt(state.position); + if (c2 == "\n") { + state.position--; + if (state.position == or2) { + state.position += 1; + } + return; } - if (c == '\r') { - state.position--; - if (state.position == or) { - state.position += 1; - } - return; + if (c2 == "\r") { + state.position--; + if (state.position == or2) { + state.position += 1; + } + return; } state.position++; + } } -} -function throwWarning(state, message) { - var error = generateError(state, message); - if (state.onWarning) { - state.onWarning.call(null, error); - } - else { + function throwWarning2(state, message) { + var error2 = generateError2(state, message); + if (state.onWarning) { + state.onWarning.call(null, error2); + } else { + } } -} -var directiveHandlers = { - YAML: function handleYamlDirective(state, name, args) { - var match, major, minor; + var directiveHandlers2 = { + YAML: function handleYamlDirective2(state, name, args) { + var match2, major, minor; if (null !== state.version) { - throwError(state, 'duplication of %YAML directive'); + throwError2(state, "duplication of %YAML directive"); } if (1 !== args.length) { - throwError(state, 'YAML directive accepts exactly one argument'); + throwError2(state, "YAML directive accepts exactly one argument"); } - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - if (null === match) { - throwError(state, 'ill-formed argument of the YAML directive'); + match2 = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (null === match2) { + throwError2(state, "ill-formed argument of the YAML directive"); } - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); + major = parseInt(match2[1], 10); + minor = parseInt(match2[2], 10); if (1 !== major) { - throwError(state, 'found incompatible YAML document (version 1.2 is required)'); + throwError2(state, "found incompatible YAML document (version 1.2 is required)"); } state.version = args[0]; - state.checkLineBreaks = (minor < 2); + state.checkLineBreaks = minor < 2; if (2 !== minor) { - throwError(state, 'found incompatible YAML document (version 1.2 is required)'); + throwError2(state, "found incompatible YAML document (version 1.2 is required)"); } - }, - TAG: function handleTagDirective(state, name, args) { + }, + TAG: function handleTagDirective2(state, name, args) { var handle, prefix; if (2 !== args.length) { - throwError(state, 'TAG directive accepts exactly two arguments'); + throwError2(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 (!PATTERN_TAG_HANDLE2.test(handle)) { + throwError2(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 (_hasOwnProperty2.call(state.tagMap, handle)) { + throwError2(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'); + if (!PATTERN_TAG_URI2.test(prefix)) { + throwError2(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; - var scalar = state.result; - if (scalar.startPosition == -1) { + } + }; + function captureSegment2(state, start, end, checkJson) { + var _position, _length, _character, _result; + var scalar = state.result; + if (scalar.startPosition == -1) { scalar.startPosition = start; - } - if (start <= end) { + } + 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 (!(0x09 === _character || - 0x20 <= _character && _character <= 0x10FFFF)) { - throwError(state, 'expected valid JSON character'); - } + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(9 === _character || 32 <= _character && _character <= 1114111)) { + throwError2(state, "expected valid JSON character"); } - } - else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters'); + } + } else if (PATTERN_NON_PRINTABLE2.test(_result)) { + throwError2(state, "the stream contains non-printable characters"); } scalar.value += _result; scalar.endPosition = end; + } } -} -function mergeMappings(state, destination, source) { - 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)) { - destination[key] = source[key]; - } - } -} -function storeMappingPair(state, _result, keyTag, keyNode, valueNode) { - var index, quantity; - if (keyNode == null) { + function storeMappingPair2(state, _result, keyTag, keyNode, valueNode) { + var index, quantity; + if (keyNode == null) { return; - } - if (null === _result) { + } + if (null === _result) { _result = { - startPosition: keyNode.startPosition, - endPosition: valueNode.endPosition, - parent: null, - errors: [], - mappings: [], kind: ast.Kind.MAP + startPosition: keyNode.startPosition, + endPosition: valueNode.endPosition, + parent: null, + errors: [], + mappings: [], + kind: ast.Kind.MAP }; - } - var mapping = ast.newMapping(keyNode, valueNode); - mapping.parent = _result; - keyNode.parent = mapping; - if (valueNode != null) { + } + var mapping = ast.newMapping(keyNode, valueNode); + mapping.parent = _result; + keyNode.parent = mapping; + if (valueNode != null) { valueNode.parent = mapping; - } - !state.ignoreDuplicateKeys && _result.mappings.forEach(function (sibling) { + } + !state.ignoreDuplicateKeys && _result.mappings.forEach(function(sibling) { if (sibling.key && sibling.key.value === (mapping.key && mapping.key.value)) { - throwErrorFromPosition(state, mapping.key.startPosition, 'duplicate key'); - throwErrorFromPosition(state, sibling.key.startPosition, 'duplicate key'); + throwErrorFromPosition(state, mapping.key.startPosition, "duplicate key"); + throwErrorFromPosition(state, sibling.key.startPosition, "duplicate key"); } - }); - _result.mappings.push(mapping); - _result.endPosition = valueNode ? valueNode.endPosition : keyNode.endPosition + 1; - return _result; -} -function readLineBreak(state) { - var ch; - ch = state.input.charCodeAt(state.position); - if (0x0A === ch) { - state.position++; + }); + _result.mappings.push(mapping); + _result.endPosition = valueNode ? valueNode.endPosition : keyNode.endPosition + 1; + return _result; } - else if (0x0D === ch) { + function readLineBreak2(state) { + var ch; + ch = state.input.charCodeAt(state.position); + if (10 === ch) { state.position++; - if (0x0A === state.input.charCodeAt(state.position)) { - state.position++; + } else if (13 === ch) { + state.position++; + if (10 === state.input.charCodeAt(state.position)) { + state.position++; } - } - else { - throwError(state, 'a line break is expected'); - } - state.line += 1; - state.lineStart = state.position; - state.lines.push({ + } else { + throwError2(state, "a line break is expected"); + } + state.line += 1; + state.lineStart = state.position; + state.lines.push({ start: state.lineStart, line: state.line - }); -} -var Line = (function () { - function Line() { - } - return Line; -}()); -function positionToLine(state, position) { - var line; - for (var i = 0; i < state.lines.length; i++) { - if (state.lines[i].start > position) { - break; - } - line = state.lines[i]; + }); } - if (!line) { + function positionToLine(state, position) { + var line; + for (var i3 = 0; i3 < state.lines.length; i3++) { + if (state.lines[i3].start > position) { + break; + } + line = state.lines[i3]; + } + if (!line) { return { - start: 0, - line: 0 + start: 0, + line: 0 }; + } + return line; } - return line; -} -function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, ch = state.input.charCodeAt(state.position); - while (0 !== ch) { - while (is_WHITE_SPACE(ch)) { - if (ch === 0x09) { - state.errors.push(generateError(state, "Using tabs can lead to unpredictable results", true)); - } - ch = state.input.charCodeAt(++state.position); - } - if (allowComments && 0x23 === ch) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0x0A && ch !== 0x0D && 0 !== ch); - } - if (is_EOL(ch)) { - readLineBreak(state); - ch = state.input.charCodeAt(state.position); - lineBreaks++; - state.lineIndent = 0; - while (0x20 === ch) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } + function skipSeparationSpace2(state, allowComments, checkIndent) { + var lineBreaks = 0, ch = state.input.charCodeAt(state.position); + while (0 !== ch) { + while (is_WHITE_SPACE2(ch)) { + if (ch === 9) { + state.errors.push(generateError2(state, "Using tabs can lead to unpredictable results", true)); + } + ch = state.input.charCodeAt(++state.position); } - else { - break; + if (allowComments && 35 === ch) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 10 && ch !== 13 && 0 !== ch); + } + if (is_EOL2(ch)) { + readLineBreak2(state); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + while (32 === ch) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; } + } + if (-1 !== checkIndent && 0 !== lineBreaks && state.lineIndent < checkIndent) { + throwWarning2(state, "deficient indentation"); + } + return lineBreaks; } - if (-1 !== checkIndent && 0 !== lineBreaks && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation'); - } - return lineBreaks; -} -function testDocumentSeparator(state) { - var _position = state.position, ch; - ch = state.input.charCodeAt(_position); - if ((0x2D === ch || 0x2E === ch) && - state.input.charCodeAt(_position + 1) === ch && - state.input.charCodeAt(_position + 2) === ch) { + function testDocumentSeparator2(state) { + var _position = state.position, ch; + ch = state.input.charCodeAt(_position); + if ((45 === ch || 46 === ch) && state.input.charCodeAt(_position + 1) === ch && state.input.charCodeAt(_position + 2) === ch) { _position += 3; ch = state.input.charCodeAt(_position); - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; + if (ch === 0 || is_WS_OR_EOL2(ch)) { + return true; } + } + return false; } - return false; -} -function writeFoldedLines(state, scalar, count) { - if (1 === count) { - scalar.value += ' '; - } - else if (count > 1) { - scalar.value += common.repeat('\n', count - 1); + function writeFoldedLines2(state, scalar, count) { + if (1 === count) { + scalar.value += " "; + } else if (count > 1) { + scalar.value += common2.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; - var state_result = ast.newScalar(); - state_result.plainScalar = true; - state.result = state_result; - ch = state.input.charCodeAt(state.position); - if (is_WS_OR_EOL(ch) || - is_FLOW_INDICATOR(ch) || - 0x23 === ch || - 0x26 === ch || - 0x2A === ch || - 0x21 === ch || - 0x7C === ch || - 0x3E === ch || - 0x27 === ch || - 0x22 === ch || - 0x25 === ch || - 0x40 === ch || - 0x60 === ch) { + function readPlainScalar2(state, nodeIndent, withinFlowCollection) { + var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch; + var state_result = ast.newScalar(); + state_result.plainScalar = true; + state.result = state_result; + ch = state.input.charCodeAt(state.position); + if (is_WS_OR_EOL2(ch) || is_FLOW_INDICATOR2(ch) || 35 === ch || 38 === ch || 42 === ch || 33 === ch || 124 === ch || 62 === ch || 39 === ch || 34 === ch || 37 === ch || 64 === ch || 96 === ch) { return false; - } - if (0x3F === ch || 0x2D === ch) { + } + if (63 === ch || 45 === ch) { following = state.input.charCodeAt(state.position + 1); - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } - } - state.kind = 'scalar'; - captureStart = captureEnd = state.position; - hasPendingContent = false; - while (0 !== ch) { - if (0x3A === ch) { - following = state.input.charCodeAt(state.position + 1); - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } - } - else if (0x23 === ch) { - preceding = state.input.charCodeAt(state.position - 1); - if (is_WS_OR_EOL(preceding)) { - break; - } + if (is_WS_OR_EOL2(following) || withinFlowCollection && is_FLOW_INDICATOR2(following)) { + return false; } - else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - withinFlowCollection && is_FLOW_INDICATOR(ch)) { + } + state.kind = "scalar"; + captureStart = captureEnd = state.position; + hasPendingContent = false; + while (0 !== ch) { + if (58 === ch) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL2(following) || withinFlowCollection && is_FLOW_INDICATOR2(following)) { 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; - } + } + } else if (35 === ch) { + preceding = state.input.charCodeAt(state.position - 1); + if (is_WS_OR_EOL2(preceding)) { + break; + } + } else if (state.position === state.lineStart && testDocumentSeparator2(state) || withinFlowCollection && is_FLOW_INDICATOR2(ch)) { + break; + } else if (is_EOL2(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace2(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_result, state.line - _line); - captureStart = captureEnd = state.position; - hasPendingContent = false; + captureSegment2(state, captureStart, captureEnd, false); + writeFoldedLines2(state, state_result, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; } - if (!is_WHITE_SPACE(ch)) { - captureEnd = state.position + 1; + if (!is_WHITE_SPACE2(ch)) { + captureEnd = state.position + 1; } ch = state.input.charCodeAt(++state.position); if (state.position >= state.input.length) { - return false; + return false; } - } - captureSegment(state, captureStart, captureEnd, false); - if (state.result.startPosition != -1) { + } + captureSegment2(state, captureStart, captureEnd, false); + if (state.result.startPosition != -1) { state_result.rawValue = state.input.substring(state_result.startPosition, state_result.endPosition); return true; + } + state.kind = _kind; + state.result = _result; + return false; } - state.kind = _kind; - state.result = _result; - return false; -} -function readSingleQuotedScalar(state, nodeIndent) { - var ch, captureStart, captureEnd; - ch = state.input.charCodeAt(state.position); - if (0x27 !== ch) { + function readSingleQuotedScalar2(state, nodeIndent) { + var ch, captureStart, captureEnd; + ch = state.input.charCodeAt(state.position); + if (39 !== ch) { return false; - } - var scalar = ast.newScalar(); - scalar.singleQuoted = true; - state.kind = 'scalar'; - state.result = scalar; - scalar.startPosition = state.position; - state.position++; - captureStart = captureEnd = state.position; - while (0 !== (ch = state.input.charCodeAt(state.position))) { - if (0x27 === ch) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - scalar.endPosition = state.position; - if (0x27 === ch) { - captureStart = captureEnd = state.position; - state.position++; - } - else { - return true; - } - } - else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, scalar, skipSeparationSpace(state, false, nodeIndent)); + } + var scalar = ast.newScalar(); + scalar.singleQuoted = true; + state.kind = "scalar"; + state.result = scalar; + scalar.startPosition = state.position; + state.position++; + captureStart = captureEnd = state.position; + while (0 !== (ch = state.input.charCodeAt(state.position))) { + if (39 === ch) { + captureSegment2(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + scalar.endPosition = state.position; + if (39 === ch) { 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; - scalar.endPosition = state.position; + } else { + return true; + } + } else if (is_EOL2(ch)) { + captureSegment2(state, captureStart, captureEnd, true); + writeFoldedLines2(state, scalar, skipSeparationSpace2(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator2(state)) { + throwError2(state, "unexpected end of the document within a single quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + scalar.endPosition = state.position; } + } + throwError2(state, "unexpected end of the stream within a single quoted scalar"); } - throwError(state, 'unexpected end of the stream within a single quoted scalar'); -} -function readDoubleQuotedScalar(state, nodeIndent) { - var captureStart, captureEnd, hexLength, hexResult, tmp, tmpEsc, ch; - ch = state.input.charCodeAt(state.position); - if (0x22 !== ch) { + function readDoubleQuotedScalar2(state, nodeIndent) { + var captureStart, captureEnd, hexLength, hexResult, tmp, tmpEsc, ch; + ch = state.input.charCodeAt(state.position); + if (34 !== ch) { return false; - } - state.kind = 'scalar'; - var scalar = ast.newScalar(); - scalar.doubleQuoted = true; - state.result = scalar; - scalar.startPosition = state.position; - state.position++; - captureStart = captureEnd = state.position; - while (0 !== (ch = state.input.charCodeAt(state.position))) { - if (0x22 === ch) { - captureSegment(state, captureStart, state.position, true); + } + state.kind = "scalar"; + var scalar = ast.newScalar(); + scalar.doubleQuoted = true; + state.result = scalar; + scalar.startPosition = state.position; + state.position++; + captureStart = captureEnd = state.position; + while (0 !== (ch = state.input.charCodeAt(state.position))) { + if (34 === ch) { + captureSegment2(state, captureStart, state.position, true); + state.position++; + scalar.endPosition = state.position; + scalar.rawValue = state.input.substring(scalar.startPosition, scalar.endPosition); + return true; + } else if (92 === ch) { + captureSegment2(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (is_EOL2(ch)) { + skipSeparationSpace2(state, false, nodeIndent); + } else if (ch < 256 && (state.allowAnyEscape ? customEscapeCheck[ch] : simpleEscapeCheck2[ch])) { + scalar.value += state.allowAnyEscape ? customEscapeMap[ch] : simpleEscapeMap2[ch]; state.position++; - scalar.endPosition = state.position; - scalar.rawValue = state.input.substring(scalar.startPosition, scalar.endPosition); - return true; - } - else if (0x5C === ch) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - if (is_EOL(ch)) { - skipSeparationSpace(state, false, nodeIndent); - } - else if (ch < 256 && (state.allowAnyEscape ? customEscapeCheck[ch] : simpleEscapeCheck[ch])) { - scalar.value += (state.allowAnyEscape ? customEscapeMap[ch] : 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'); - } - } - scalar.value += charFromCodepoint(hexResult); - state.position++; - } - else { - throwError(state, 'unknown escape sequence'); + } else if ((tmp = escapedHexLen2(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + if ((tmp = fromHexCode2(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + } else { + throwError2(state, "expected hexadecimal character"); + } } - captureStart = captureEnd = state.position; - } - else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, scalar, 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 { + scalar.value += charFromCodepoint2(hexResult); state.position++; - captureEnd = state.position; + } else { + throwError2(state, "unknown escape sequence"); + } + captureStart = captureEnd = state.position; + } else if (is_EOL2(ch)) { + captureSegment2(state, captureStart, captureEnd, true); + writeFoldedLines2(state, scalar, skipSeparationSpace2(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator2(state)) { + throwError2(state, "unexpected end of the document within a double quoted scalar"); + } else { + state.position++; + captureEnd = state.position; } + } + throwError2(state, "unexpected end of the stream within a double quoted scalar"); } - 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, keyNode, keyTag, valueNode, ch; - ch = state.input.charCodeAt(state.position); - if (ch === 0x5B) { - terminator = 0x5D; + function readFlowCollection2(state, nodeIndent) { + var readNext = true, _line, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, keyNode, keyTag, valueNode, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 91) { + terminator = 93; isMapping = false; _result = ast.newItems(); _result.startPosition = state.position; - } - else if (ch === 0x7B) { - terminator = 0x7D; + } else if (ch === 123) { + terminator = 125; isMapping = true; _result = ast.newMap(); _result.startPosition = state.position; - } - else { + } else { return false; - } - if (null !== state.anchor) { + } + if (null !== state.anchor) { _result.anchorId = state.anchor; state.anchorMap[state.anchor] = _result; - } - ch = state.input.charCodeAt(++state.position); - while (0 !== ch) { - skipSeparationSpace(state, true, nodeIndent); + } + ch = state.input.charCodeAt(++state.position); + while (0 !== ch) { + skipSeparationSpace2(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; - _result.endPosition = state.position; - return true; - } - else if (!readNext) { - var p = state.position; - throwError(state, 'missed comma between flow collection entries'); - state.position = p + 1; + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? "mapping" : "sequence"; + state.result = _result; + _result.endPosition = state.position; + return true; + } else if (!readNext) { + var p2 = state.position; + throwError2(state, "missed comma between flow collection entries"); + state.position = p2 + 1; } keyTag = keyNode = valueNode = null; isPair = isExplicitPair = false; - if (0x3F === ch) { - following = state.input.charCodeAt(state.position + 1); - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; - state.position++; - skipSeparationSpace(state, true, nodeIndent); - } + if (63 === ch) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL2(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace2(state, true, nodeIndent); + } } _line = state.line; - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + composeNode2(state, nodeIndent, CONTEXT_FLOW_IN2, false, true); keyTag = state.tag; keyNode = state.result; - skipSeparationSpace(state, true, nodeIndent); + skipSeparationSpace2(state, true, nodeIndent); ch = state.input.charCodeAt(state.position); - if ((isExplicitPair || state.line === _line) && 0x3A === ch) { - isPair = true; - ch = state.input.charCodeAt(++state.position); - skipSeparationSpace(state, true, nodeIndent); - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state.result; + if ((isExplicitPair || state.line === _line) && 58 === ch) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace2(state, true, nodeIndent); + composeNode2(state, nodeIndent, CONTEXT_FLOW_IN2, false, true); + valueNode = state.result; } if (isMapping) { - storeMappingPair(state, _result, keyTag, keyNode, valueNode); - } - else if (isPair) { - var mp = storeMappingPair(state, null, keyTag, keyNode, valueNode); - mp.parent = _result; - _result.items.push(mp); - } - else { - if (keyNode) { - keyNode.parent = _result; - } - _result.items.push(keyNode); + storeMappingPair2(state, _result, keyTag, keyNode, valueNode); + } else if (isPair) { + var mp = storeMappingPair2(state, null, keyTag, keyNode, valueNode); + mp.parent = _result; + _result.items.push(mp); + } else { + if (keyNode) { + keyNode.parent = _result; + } + _result.items.push(keyNode); } _result.endPosition = state.position + 1; - skipSeparationSpace(state, true, nodeIndent); + skipSeparationSpace2(state, true, nodeIndent); ch = state.input.charCodeAt(state.position); - if (0x2C === ch) { - readNext = true; - ch = state.input.charCodeAt(++state.position); - } - else { - readNext = false; + if (44 === ch) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; } + } + throwError2(state, "unexpected end of the stream within a flow collection"); } - throwError(state, 'unexpected end of the stream within a flow collection'); -} -function readBlockScalar(state, nodeIndent) { - var captureStart, folding, chomping = CHOMPING_CLIP, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; - ch = state.input.charCodeAt(state.position); - if (ch === 0x7C) { + function readBlockScalar2(state, nodeIndent) { + var captureStart, folding, chomping = CHOMPING_CLIP2, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 124) { folding = false; - } - else if (ch === 0x3E) { + } else if (ch === 62) { folding = true; - } - else { + } else { return false; - } - var sc = ast.newScalar(); - state.kind = 'scalar'; - state.result = sc; - sc.startPosition = state.position; - while (0 !== ch) { + } + var sc = ast.newScalar(); + state.kind = "scalar"; + state.result = sc; + sc.startPosition = state.position; + while (0 !== ch) { ch = state.input.charCodeAt(++state.position); - if (0x2B === ch || 0x2D === ch) { - if (CHOMPING_CLIP === chomping) { - chomping = (0x2B === ch) ? 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 (43 === ch || 45 === ch) { + if (CHOMPING_CLIP2 === chomping) { + chomping = 43 === ch ? CHOMPING_KEEP2 : CHOMPING_STRIP2; + } else { + throwError2(state, "repeat of a chomping mode identifier"); + } + } else if ((tmp = fromDecimalCode2(ch)) >= 0) { + if (tmp === 0) { + throwError2(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 { + throwError2(state, "repeat of an indentation width identifier"); + } + } else { + break; } - } - if (is_WHITE_SPACE(ch)) { + } + if (is_WHITE_SPACE2(ch)) { do { + ch = state.input.charCodeAt(++state.position); + } while (is_WHITE_SPACE2(ch)); + if (35 === ch) { + do { ch = state.input.charCodeAt(++state.position); - } while (is_WHITE_SPACE(ch)); - if (0x23 === ch) { - do { - ch = state.input.charCodeAt(++state.position); - } while (!is_EOL(ch) && (0 !== ch)); + } while (!is_EOL2(ch) && 0 !== ch); } - } - while (0 !== ch) { - readLineBreak(state); + } + while (0 !== ch) { + readLineBreak2(state); state.lineIndent = 0; ch = state.input.charCodeAt(state.position); - while ((!detectedIndent || state.lineIndent < textIndent) && - (0x20 === ch)) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); + while ((!detectedIndent || state.lineIndent < textIndent) && 32 === ch) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); } if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent; + textIndent = state.lineIndent; } - if (is_EOL(ch)) { - emptyLines++; - continue; + if (is_EOL2(ch)) { + emptyLines++; + continue; } if (state.lineIndent < textIndent) { - if (chomping === CHOMPING_KEEP) { - sc.value += common.repeat('\n', emptyLines); - } - else if (chomping === CHOMPING_CLIP) { - if (detectedIndent) { - sc.value += '\n'; - } + if (chomping === CHOMPING_KEEP2) { + sc.value += common2.repeat("\n", emptyLines); + } else if (chomping === CHOMPING_CLIP2) { + if (detectedIndent) { + sc.value += "\n"; } - break; + } + break; } if (folding) { - if (is_WHITE_SPACE(ch)) { - atMoreIndented = true; - sc.value += common.repeat('\n', emptyLines + 1); + if (is_WHITE_SPACE2(ch)) { + atMoreIndented = true; + sc.value += common2.repeat("\n", emptyLines + 1); + } else if (atMoreIndented) { + atMoreIndented = false; + sc.value += common2.repeat("\n", emptyLines + 1); + } else if (0 === emptyLines) { + if (detectedIndent) { + sc.value += " "; } - else if (atMoreIndented) { - atMoreIndented = false; - sc.value += common.repeat('\n', emptyLines + 1); + } else { + sc.value += common2.repeat("\n", emptyLines); + } + } else if (detectedIndent) { + sc.value += common2.repeat("\n", emptyLines + 1); + } else { + } + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + while (!is_EOL2(ch) && 0 !== ch) { + ch = state.input.charCodeAt(++state.position); + } + captureSegment2(state, captureStart, state.position, false); + } + sc.endPosition = state.position; + var i3 = state.position - 1; + var needMinus = false; + while (true) { + var c2 = state.input[i3]; + if (c2 == "\r" || c2 == "\n") { + if (needMinus) { + i3--; + } + break; + } + if (c2 != " " && c2 != " ") { + break; + } + i3--; + } + sc.endPosition = i3; + sc.rawValue = state.input.substring(sc.startPosition, sc.endPosition); + return true; + } + function readBlockSequence2(state, nodeIndent) { + var _line, _tag = state.tag, _anchor = state.anchor, _result = ast.newItems(), following, detected = false, ch; + if (null !== state.anchor) { + _result.anchorId = state.anchor; + state.anchorMap[state.anchor] = _result; + } + _result.startPosition = state.position; + ch = state.input.charCodeAt(state.position); + while (0 !== ch) { + if (45 !== ch) { + break; + } + following = state.input.charCodeAt(state.position + 1); + if (!is_WS_OR_EOL2(following)) { + break; + } + detected = true; + state.position++; + if (skipSeparationSpace2(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.items.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + _line = state.line; + composeNode2(state, nodeIndent, CONTEXT_BLOCK_IN2, false, true); + if (state.result) { + state.result.parent = _result; + _result.items.push(state.result); + } + skipSeparationSpace2(state, true, -1); + ch = state.input.charCodeAt(state.position); + if ((state.line === _line || state.lineIndent > nodeIndent) && 0 !== ch) { + throwError2(state, "bad indentation of a sequence entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + _result.endPosition = state.position; + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "sequence"; + state.result = _result; + _result.endPosition = state.position; + return true; + } + return false; + } + function readBlockMapping2(state, nodeIndent, flowIndent) { + var following, allowCompact, _line, _tag = state.tag, _anchor = state.anchor, _result = ast.newMap(), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; + _result.startPosition = state.position; + if (null !== state.anchor) { + _result.anchorId = state.anchor; + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (0 !== ch) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; + if ((63 === ch || 58 === ch) && is_WS_OR_EOL2(following)) { + if (63 === ch) { + if (atExplicitKey) { + storeMappingPair2(state, _result, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else { + throwError2(state, "incomplete explicit mapping pair; a key node is missed"); + } + state.position += 1; + ch = following; + } else if (composeNode2(state, flowIndent, CONTEXT_FLOW_OUT2, false, true)) { + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + while (is_WHITE_SPACE2(ch)) { + ch = state.input.charCodeAt(++state.position); } - else if (0 === emptyLines) { - if (detectedIndent) { - sc.value += ' '; - } + if (58 === ch) { + ch = state.input.charCodeAt(++state.position); + if (!is_WS_OR_EOL2(ch)) { + throwError2(state, "a whitespace character is expected after the key-value separator within a block mapping"); + } + if (atExplicitKey) { + storeMappingPair2(state, _result, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + } else if (state.position == state.lineStart && testDocumentSeparator2(state)) { + break; + } else if (detected) { + throwError2(state, "can not read an implicit mapping pair; a colon is missed"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else if (detected) { + throwError2(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); + while (state.position > 0) { + ch = state.input.charCodeAt(--state.position); + if (is_EOL2(ch)) { + state.position++; + break; + } } - else { - sc.value += common.repeat('\n', emptyLines); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else { + break; + } + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode2(state, nodeIndent, CONTEXT_BLOCK_OUT2, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; } + } + if (!atExplicitKey) { + storeMappingPair2(state, _result, keyTag, keyNode, valueNode); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace2(state, true, -1); + ch = state.input.charCodeAt(state.position); } - else if (detectedIndent) { - sc.value += common.repeat('\n', emptyLines + 1); + if (state.lineIndent > nodeIndent && 0 !== ch) { + throwError2(state, "bad indentation of a mapping entry"); + } else if (state.lineIndent < nodeIndent) { + break; } - else { + } + if (atExplicitKey) { + storeMappingPair2(state, _result, keyTag, keyNode, null); + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "mapping"; + state.result = _result; + } + return detected; + } + function readTagProperty2(state) { + var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; + ch = state.input.charCodeAt(state.position); + if (33 !== ch) { + return false; + } + if (null !== state.tag) { + throwError2(state, "duplication of a tag property"); + } + ch = state.input.charCodeAt(++state.position); + if (60 === ch) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + } else if (33 === ch) { + isNamed = true; + tagHandle = "!!"; + ch = state.input.charCodeAt(++state.position); + } else { + tagHandle = "!"; + } + _position = state.position; + if (isVerbatim) { + do { + ch = state.input.charCodeAt(++state.position); + } while (0 !== ch && 62 !== ch); + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError2(state, "unexpected end of the stream within a verbatim tag"); } - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - while (!is_EOL(ch) && (0 !== ch)) { - ch = state.input.charCodeAt(++state.position); + } else { + while (0 !== ch && !is_WS_OR_EOL2(ch)) { + if (33 === ch) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + if (!PATTERN_TAG_HANDLE2.test(tagHandle)) { + throwError2(state, "named tag handle cannot contain such characters"); + } + isNamed = true; + _position = state.position + 1; + } else { + throwError2(state, "tag suffix cannot contain exclamation marks"); + } + } + ch = state.input.charCodeAt(++state.position); + } + tagName = state.input.slice(_position, state.position); + if (PATTERN_FLOW_INDICATORS2.test(tagName)) { + throwError2(state, "tag suffix cannot contain flow indicator characters"); + } + } + if (tagName && !PATTERN_TAG_URI2.test(tagName)) { + throwError2(state, "tag name cannot contain such characters: " + tagName); + } + if (isVerbatim) { + state.tag = tagName; + } else if (_hasOwnProperty2.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 { + throwError2(state, 'undeclared tag handle "' + tagHandle + '"'); + } + return true; + } + function readAnchorProperty2(state) { + var _position, ch; + ch = state.input.charCodeAt(state.position); + if (38 !== ch) { + return false; + } + if (null !== state.anchor) { + throwError2(state, "duplication of an anchor property"); + } + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (0 !== ch && !is_WS_OR_EOL2(ch) && !is_FLOW_INDICATOR2(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError2(state, "name of an anchor node must contain at least one character"); + } + state.anchor = state.input.slice(_position, state.position); + return true; + } + function readAlias2(state) { + var _position, alias, len = state.length, input = state.input, ch; + ch = state.input.charCodeAt(state.position); + if (42 !== ch) { + return false; + } + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (0 !== ch && !is_WS_OR_EOL2(ch) && !is_FLOW_INDICATOR2(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position <= _position) { + throwError2(state, "name of an alias node must contain at least one character"); + state.position = _position + 1; + } + alias = state.input.slice(_position, state.position); + if (!state.anchorMap.hasOwnProperty(alias)) { + throwError2(state, 'unidentified alias "' + alias + '"'); + if (state.position <= _position) { + state.position = _position + 1; + } + } + state.result = ast.newAnchorRef(alias, _position, state.position, state.anchorMap[alias]); + skipSeparationSpace2(state, true, -1); + return true; + } + function composeNode2(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, type2, flowIndent, blockIndent, _result; + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT2 === nodeContext || CONTEXT_BLOCK_IN2 === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace2(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; + } + } + } + var tagStart = state.position; + var tagColumn = state.position - state.lineStart; + if (1 === indentStatus) { + while (readTagProperty2(state) || readAnchorProperty2(state)) { + if (skipSeparationSpace2(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 (1 === indentStatus || CONTEXT_BLOCK_OUT2 === nodeContext) { + if (CONTEXT_FLOW_IN2 === nodeContext || CONTEXT_FLOW_OUT2 === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + blockIndent = state.position - state.lineStart; + if (1 === indentStatus) { + if (allowBlockCollections && (readBlockSequence2(state, blockIndent) || readBlockMapping2(state, blockIndent, flowIndent)) || readFlowCollection2(state, flowIndent)) { + hasContent = true; + } else { + if (allowBlockScalars && readBlockScalar2(state, flowIndent) || readSingleQuotedScalar2(state, flowIndent) || readDoubleQuotedScalar2(state, flowIndent)) { + hasContent = true; + } else if (readAlias2(state)) { + hasContent = true; + if (null !== state.tag || null !== state.anchor) { + throwError2(state, "alias node should not have any properties"); + } + } else if (readPlainScalar2(state, flowIndent, CONTEXT_FLOW_IN2 === nodeContext)) { + hasContent = true; + if (null === state.tag) { + state.tag = "?"; + } + } + if (null !== state.anchor) { + state.anchorMap[state.anchor] = state.result; + state.result.anchorId = state.anchor; + } + } + } else if (0 === indentStatus) { + hasContent = allowBlockCollections && readBlockSequence2(state, blockIndent); + } + } + if (null !== state.tag && "!" !== state.tag) { + if (state.tag == "!include") { + if (!state.result) { + state.result = ast.newScalar(); + state.result.startPosition = state.position; + state.result.endPosition = state.position; + throwError2(state, "!include without value"); + } + state.result.kind = ast.Kind.INCLUDE_REF; + } else if ("?" === state.tag) { + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type2 = state.implicitTypes[typeIndex]; + var vl = state.result["value"]; + if (type2.resolve(vl)) { + state.result.valueObject = type2.construct(state.result["value"]); + state.tag = type2.tag; + if (null !== state.anchor) { + state.result.anchorId = state.anchor; + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (_hasOwnProperty2.call(state.typeMap, state.tag)) { + type2 = state.typeMap[state.tag]; + if (null !== state.result && type2.kind !== state.kind) { + throwError2(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type2.kind + '", not "' + state.kind + '"'); + } + if (!type2.resolve(state.result)) { + throwError2(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); + } else { + state.result = type2.construct(state.result); + if (null !== state.anchor) { + state.result.anchorId = state.anchor; + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwErrorFromPosition(state, tagStart, "unknown tag <" + state.tag + ">", false, true); } - captureSegment(state, captureStart, state.position, false); + } + return null !== state.tag || null !== state.anchor || hasContent; } - sc.endPosition = state.position; - var i = state.position - 1; - var needMinus = false; - while (true) { - var c = state.input[i]; - if (c == '\r' || c == '\n') { - if (needMinus) { - i--; - } - break; + function readDocument2(state) { + var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + while (0 !== (ch = state.input.charCodeAt(state.position))) { + skipSeparationSpace2(state, true, -1); + ch = state.input.charCodeAt(state.position); + if (state.lineIndent > 0 || 37 !== ch) { + break; } - if (c != ' ' && c != '\t') { - break; + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (0 !== ch && !is_WS_OR_EOL2(ch)) { + ch = state.input.charCodeAt(++state.position); } - i--; - } - sc.endPosition = i; - sc.rawValue = state.input.substring(sc.startPosition, sc.endPosition); - return true; -} -function readBlockSequence(state, nodeIndent) { - var _line, _tag = state.tag, _anchor = state.anchor, _result = ast.newItems(), following, detected = false, ch; - if (null !== state.anchor) { - _result.anchorId = state.anchor; - state.anchorMap[state.anchor] = _result; - } - _result.startPosition = state.position; - ch = state.input.charCodeAt(state.position); - while (0 !== ch) { - if (0x2D !== ch) { - break; + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + if (directiveName.length < 1) { + throwError2(state, "directive name must not be less than one character in length"); } - following = state.input.charCodeAt(state.position + 1); - if (!is_WS_OR_EOL(following)) { + while (0 !== ch) { + while (is_WHITE_SPACE2(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (35 === ch) { + do { + ch = state.input.charCodeAt(++state.position); + } while (0 !== ch && !is_EOL2(ch)); break; + } + if (is_EOL2(ch)) { + break; + } + _position = state.position; + while (0 !== ch && !is_WS_OR_EOL2(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveArgs.push(state.input.slice(_position, state.position)); } - detected = true; - state.position++; - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.items.push(null); - ch = state.input.charCodeAt(state.position); - continue; - } - } - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); - if (state.result) { - state.result.parent = _result; - _result.items.push(state.result); + if (0 !== ch) { + readLineBreak2(state); } - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - if ((state.line === _line || state.lineIndent > nodeIndent) && (0 !== ch)) { - throwError(state, 'bad indentation of a sequence entry'); + if (_hasOwnProperty2.call(directiveHandlers2, directiveName)) { + directiveHandlers2[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning2(state, 'unknown document directive "' + directiveName + '"'); + state.position++; } - else if (state.lineIndent < nodeIndent) { - break; + } + skipSeparationSpace2(state, true, -1); + if (0 === state.lineIndent && 45 === state.input.charCodeAt(state.position) && 45 === state.input.charCodeAt(state.position + 1) && 45 === state.input.charCodeAt(state.position + 2)) { + state.position += 3; + skipSeparationSpace2(state, true, -1); + } else if (hasDirectives) { + throwError2(state, "directives end mark is expected"); + } + composeNode2(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT2, false, true); + skipSeparationSpace2(state, true, -1); + if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS2.test(state.input.slice(documentStart, state.position))) { + throwWarning2(state, "non-ASCII line breaks are interpreted as content"); + } + state.documents.push(state.result); + if (state.position === state.lineStart && testDocumentSeparator2(state)) { + if (46 === state.input.charCodeAt(state.position)) { + state.position += 3; + skipSeparationSpace2(state, true, -1); } + return; + } + if (state.position < state.length - 1) { + throwError2(state, "end of the stream or a document separator is expected"); + } else { + return; + } } - _result.endPosition = state.position; - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'sequence'; - state.result = _result; - _result.endPosition = state.position; - return true; - } - return false; -} -function readBlockMapping(state, nodeIndent, flowIndent) { - var following, allowCompact, _line, _tag = state.tag, _anchor = state.anchor, _result = ast.newMap(), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; - _result.startPosition = state.position; - if (null !== state.anchor) { - _result.anchorId = state.anchor; - state.anchorMap[state.anchor] = _result; - } - ch = state.input.charCodeAt(state.position); - while (0 !== ch) { - following = state.input.charCodeAt(state.position + 1); - _line = state.line; - if ((0x3F === ch || 0x3A === ch) && is_WS_OR_EOL(following)) { - if (0x3F === ch) { - if (atExplicitKey) { - storeMappingPair(state, _result, 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'); - } - 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 (0x3A === ch) { - 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, keyTag, keyNode, null); - keyTag = keyNode = valueNode = null; - } - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = state.tag; - keyNode = state.result; - } - else if (state.position == state.lineStart && testDocumentSeparator(state)) { - break; - } - 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'); - while (state.position > 0) { - ch = state.input.charCodeAt(--state.position); - if (is_EOL(ch)) { - state.position++; - break; - } - } - } - else { - state.tag = _tag; - state.anchor = _anchor; - return true; - } + function loadDocuments2(input, options2) { + input = String(input); + options2 = options2 || {}; + var inputLength = input.length; + if (inputLength !== 0) { + if (10 !== input.charCodeAt(inputLength - 1) && 13 !== input.charCodeAt(inputLength - 1)) { + input += "\n"; } - else { - break; + if (input.charCodeAt(0) === 65279) { + input = input.slice(1); } - 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, keyTag, keyNode, valueNode); - keyTag = keyNode = valueNode = null; + } + var state = new State2(input, options2); + state.input += "\0"; + while (32 === state.input.charCodeAt(state.position)) { + state.lineIndent += 1; + state.position += 1; + } + while (state.position < state.length - 1) { + var q3 = state.position; + readDocument2(state); + if (state.position <= q3) { + for (; state.position < state.length - 1; state.position++) { + var c2 = state.input.charAt(state.position); + if (c2 == "\n") { + break; } - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - } - if (state.lineIndent > nodeIndent && (0 !== ch)) { - throwError(state, 'bad indentation of a mapping entry'); + } } - else if (state.lineIndent < nodeIndent) { - break; + } + var documents = state.documents; + var docsCount = documents.length; + if (docsCount > 0) { + documents[docsCount - 1].endPosition = inputLength; + } + for (var _i2 = 0, documents_1 = documents; _i2 < documents_1.length; _i2++) { + var x3 = documents_1[_i2]; + x3.errors = state.errors; + if (x3.startPosition > x3.endPosition) { + x3.startPosition = x3.endPosition; } + } + return documents; } - if (atExplicitKey) { - storeMappingPair(state, _result, 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; - ch = state.input.charCodeAt(state.position); - if (0x21 !== ch) { - return false; - } - if (null !== state.tag) { - throwError(state, 'duplication of a tag property'); + function loadAll2(input, iterator, options2) { + if (options2 === void 0) { + options2 = {}; + } + var documents = loadDocuments2(input, options2), index, length; + for (index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } } - ch = state.input.charCodeAt(++state.position); - if (0x3C === ch) { - isVerbatim = true; - ch = state.input.charCodeAt(++state.position); + exports.loadAll = loadAll2; + function load2(input, options2) { + if (options2 === void 0) { + options2 = {}; + } + var documents = loadDocuments2(input, options2), index, length; + if (0 === documents.length) { + return void 0; + } else if (1 === documents.length) { + return documents[0]; + } + var e2 = new YAMLException("expected a single document in the stream, but found more"); + e2.mark = new Mark("", "", 0, 0, 0); + e2.mark.position = documents[0].endPosition; + documents[0].errors.push(e2); + return documents[0]; } - else if (0x21 === ch) { - isNamed = true; - tagHandle = '!!'; - ch = state.input.charCodeAt(++state.position); + exports.load = load2; + function safeLoadAll2(input, output, options2) { + if (options2 === void 0) { + options2 = {}; + } + loadAll2(input, output, common2.extend({ schema: DEFAULT_SAFE_SCHEMA }, options2)); } - else { - tagHandle = '!'; + exports.safeLoadAll = safeLoadAll2; + function safeLoad3(input, options2) { + if (options2 === void 0) { + options2 = {}; + } + return load2(input, common2.extend({ schema: DEFAULT_SAFE_SCHEMA }, options2)); } - _position = state.position; - if (isVerbatim) { - do { - ch = state.input.charCodeAt(++state.position); - } while (0 !== ch && 0x3E !== ch); - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); - ch = state.input.charCodeAt(++state.position); + exports.safeLoad = safeLoad3; + module3.exports.loadAll = loadAll2; + module3.exports.load = load2; + module3.exports.safeLoadAll = safeLoadAll2; + module3.exports.safeLoad = safeLoad3; + } +}); + +// node_modules/yaml-ast-parser/dist/src/dumper.js +var require_dumper = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/dumper.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var common2 = require_common(); + var YAMLException = require_exception(); + var DEFAULT_FULL_SCHEMA = require_default_full(); + var DEFAULT_SAFE_SCHEMA = require_default_safe(); + var _toString2 = Object.prototype.toString; + var _hasOwnProperty2 = Object.prototype.hasOwnProperty; + var CHAR_TAB2 = 9; + var CHAR_LINE_FEED2 = 10; + var CHAR_CARRIAGE_RETURN2 = 13; + var CHAR_SPACE2 = 32; + var CHAR_EXCLAMATION2 = 33; + var CHAR_DOUBLE_QUOTE2 = 34; + var CHAR_SHARP2 = 35; + var CHAR_PERCENT2 = 37; + var CHAR_AMPERSAND2 = 38; + var CHAR_SINGLE_QUOTE2 = 39; + var CHAR_ASTERISK2 = 42; + var CHAR_COMMA2 = 44; + var CHAR_MINUS2 = 45; + var CHAR_COLON2 = 58; + var CHAR_GREATER_THAN2 = 62; + var CHAR_QUESTION2 = 63; + var CHAR_COMMERCIAL_AT2 = 64; + var CHAR_LEFT_SQUARE_BRACKET2 = 91; + var CHAR_RIGHT_SQUARE_BRACKET2 = 93; + var CHAR_GRAVE_ACCENT2 = 96; + var CHAR_LEFT_CURLY_BRACKET2 = 123; + var CHAR_VERTICAL_LINE2 = 124; + var CHAR_RIGHT_CURLY_BRACKET2 = 125; + var ESCAPE_SEQUENCES2 = {}; + ESCAPE_SEQUENCES2[0] = "\\0"; + ESCAPE_SEQUENCES2[7] = "\\a"; + ESCAPE_SEQUENCES2[8] = "\\b"; + ESCAPE_SEQUENCES2[9] = "\\t"; + ESCAPE_SEQUENCES2[10] = "\\n"; + ESCAPE_SEQUENCES2[11] = "\\v"; + ESCAPE_SEQUENCES2[12] = "\\f"; + ESCAPE_SEQUENCES2[13] = "\\r"; + ESCAPE_SEQUENCES2[27] = "\\e"; + ESCAPE_SEQUENCES2[34] = '\\"'; + ESCAPE_SEQUENCES2[92] = "\\\\"; + ESCAPE_SEQUENCES2[133] = "\\N"; + ESCAPE_SEQUENCES2[160] = "\\_"; + ESCAPE_SEQUENCES2[8232] = "\\L"; + ESCAPE_SEQUENCES2[8233] = "\\P"; + var DEPRECATED_BOOLEANS_SYNTAX2 = [ + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" + ]; + function compileStyleMap2(schema2, map2) { + var result, keys, index, length, tag, style, type2; + if (null === map2) { + return {}; + } + result = {}; + keys = Object.keys(map2); + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map2[tag]); + if ("!!" === tag.slice(0, 2)) { + tag = "tag:yaml.org,2002:" + tag.slice(2); } - else { - throwError(state, 'unexpected end of the stream within a verbatim tag'); + type2 = schema2.compiledTypeMap[tag]; + if (type2 && _hasOwnProperty2.call(type2.styleAliases, style)) { + style = type2.styleAliases[style]; } + result[tag] = style; + } + return result; } - else { - while (0 !== ch && !is_WS_OR_EOL(ch)) { - if (0x21 === ch) { - 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); + function encodeHex2(character) { + var string, handle, length; + 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 + common2.repeat("0", length - string.length) + string; + } + function State2(options2) { + this.schema = options2["schema"] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, options2["indent"] || 2); + this.skipInvalid = options2["skipInvalid"] || false; + this.flowLevel = common2.isNothing(options2["flowLevel"]) ? -1 : options2["flowLevel"]; + this.styleMap = compileStyleMap2(this.schema, options2["styles"] || null); + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + this.tag = null; + this.result = ""; + this.duplicates = []; + this.usedDuplicates = null; + } + function indentString2(string, spaces) { + var ind = common2.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; } - tagName = state.input.slice(_position, state.position); - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters'); + if (line.length && line !== "\n") { + result += ind; } + result += line; + } + return result; } - 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 (0x26 !== ch) { - return false; - } - if (null !== state.anchor) { - throwError(state, 'duplication of an anchor property'); - } - ch = state.input.charCodeAt(++state.position); - _position = state.position; - while (0 !== ch && !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, len = state.length, input = state.input, ch; - ch = state.input.charCodeAt(state.position); - if (0x2A !== ch) { - return false; - } - ch = state.input.charCodeAt(++state.position); - _position = state.position; - while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); + function generateNextLine2(state, level) { + return "\n" + common2.repeat(" ", state.indent * level); } - if (state.position <= _position) { - throwError(state, 'name of an alias node must contain at least one character'); - state.position = _position + 1; + function testImplicitResolving2(state, str2) { + var index, length, type2; + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type2 = state.implicitTypes[index]; + if (type2.resolve(str2)) { + return true; + } + } + return false; } - alias = state.input.slice(_position, state.position); - if (!state.anchorMap.hasOwnProperty(alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); - if (state.position <= _position) { - state.position = _position + 1; + function StringBuilder(source) { + this.source = source; + this.result = ""; + this.checkpoint = 0; + } + StringBuilder.prototype.takeUpTo = function(position) { + var er2; + if (position < this.checkpoint) { + er2 = new Error("position should be > checkpoint"); + er2.position = position; + er2.checkpoint = this.checkpoint; + throw er2; + } + this.result += this.source.slice(this.checkpoint, position); + this.checkpoint = position; + return this; + }; + StringBuilder.prototype.escapeChar = function() { + var character, esc; + character = this.source.charCodeAt(this.checkpoint); + esc = ESCAPE_SEQUENCES2[character] || encodeHex2(character); + this.result += esc; + this.checkpoint += 1; + return this; + }; + StringBuilder.prototype.finish = function() { + if (this.source.length > this.checkpoint) { + this.takeUpTo(this.source.length); + } + }; + function writeScalar2(state, object, level) { + var simple, first, spaceWrap, folded, literal, single, double, sawLineFeed, linePosition, longestLine, indent, max, character, position, escapeSeq, hexEsc, previous, lineLength, modifier, trailingLineBreaks, result; + if (0 === object.length) { + state.dump = "''"; + return; + } + if (object.indexOf("!include") == 0) { + state.dump = "" + object; + return; + } + if (object.indexOf("!$$$novalue") == 0) { + state.dump = ""; + return; + } + if (-1 !== DEPRECATED_BOOLEANS_SYNTAX2.indexOf(object)) { + state.dump = "'" + object + "'"; + return; + } + simple = true; + first = object.length ? object.charCodeAt(0) : 0; + spaceWrap = CHAR_SPACE2 === first || CHAR_SPACE2 === object.charCodeAt(object.length - 1); + if (CHAR_MINUS2 === first || CHAR_QUESTION2 === first || CHAR_COMMERCIAL_AT2 === first || CHAR_GRAVE_ACCENT2 === first) { + simple = false; + } + if (spaceWrap) { + simple = false; + folded = false; + literal = false; + } else { + folded = true; + literal = true; + } + single = true; + double = new StringBuilder(object); + sawLineFeed = false; + linePosition = 0; + longestLine = 0; + indent = state.indent * level; + max = 80; + if (indent < 40) { + max -= indent; + } else { + max = 40; + } + for (position = 0; position < object.length; position++) { + character = object.charCodeAt(position); + if (simple) { + if (!simpleChar(character)) { + simple = false; + } else { + continue; + } + } + if (single && character === CHAR_SINGLE_QUOTE2) { + single = false; + } + escapeSeq = ESCAPE_SEQUENCES2[character]; + hexEsc = needsHexEscape(character); + if (!escapeSeq && !hexEsc) { + continue; + } + if (character !== CHAR_LINE_FEED2 && character !== CHAR_DOUBLE_QUOTE2 && character !== CHAR_SINGLE_QUOTE2) { + folded = false; + literal = false; + } else if (character === CHAR_LINE_FEED2) { + sawLineFeed = true; + single = false; + if (position > 0) { + previous = object.charCodeAt(position - 1); + if (previous === CHAR_SPACE2) { + literal = false; + folded = false; + } + } + if (folded) { + lineLength = position - linePosition; + linePosition = position; + if (lineLength > longestLine) { + longestLine = lineLength; + } + } + } + if (character !== CHAR_DOUBLE_QUOTE2) { + single = false; + } + double.takeUpTo(position); + double.escapeChar(); + } + if (simple && testImplicitResolving2(state, object)) { + simple = false; + } + modifier = ""; + if (folded || literal) { + trailingLineBreaks = 0; + if (object.charCodeAt(object.length - 1) === CHAR_LINE_FEED2) { + trailingLineBreaks += 1; + if (object.charCodeAt(object.length - 2) === CHAR_LINE_FEED2) { + trailingLineBreaks += 1; + } + } + if (trailingLineBreaks === 0) { + modifier = "-"; + } else if (trailingLineBreaks === 2) { + modifier = "+"; + } + } + if (literal && longestLine < max) { + folded = false; + } + if (!sawLineFeed) { + literal = false; + } + if (simple) { + state.dump = object; + } else if (single) { + state.dump = "'" + object + "'"; + } else if (folded) { + result = fold(object, max); + state.dump = ">" + modifier + "\n" + indentString2(result, indent); + } else if (literal) { + if (!modifier) { + object = object.replace(/\n$/, ""); } + state.dump = "|" + modifier + "\n" + indentString2(object, indent); + } else if (double) { + double.finish(); + state.dump = '"' + double.result + '"'; + } else { + throw new Error("Failed to dump scalar value"); + } + return; } - state.result = ast.newAnchorRef(alias, _position, state.position, 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, _result; - 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; - } + function fold(object, max) { + var result = "", position = 0, length = object.length, trailing = /\n+$/.exec(object), newLine; + if (trailing) { + length = trailing.index + 1; + } + while (position < length) { + newLine = object.indexOf("\n", position); + if (newLine > length || newLine === -1) { + if (result) { + result += "\n\n"; + } + result += foldLine2(object.slice(position, length), max); + position = length; + } else { + if (result) { + result += "\n\n"; + } + result += foldLine2(object.slice(position, newLine), max); + position = newLine + 1; } + } + if (trailing && trailing[0] !== "\n") { + result += trailing[0]; + } + return result; } - var tagStart = state.position; - var tagColumn = state.position - state.lineStart; - if (1 === indentStatus) { - 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; - } + function foldLine2(line, max) { + if (line === "") { + return line; + } + var foldRe = /[^\s] [^\s]/g, result = "", prevMatch = 0, foldStart = 0, match2 = foldRe.exec(line), index, foldEnd, folded; + while (match2) { + index = match2.index; + if (index - foldStart > max) { + if (prevMatch !== foldStart) { + foldEnd = prevMatch; + } else { + foldEnd = index; + } + if (result) { + result += "\n"; + } + folded = line.slice(foldStart, foldEnd); + result += folded; + foldStart = foldEnd + 1; } + prevMatch = index + 1; + match2 = foldRe.exec(line); + } + if (result) { + result += "\n"; + } + if (foldStart !== prevMatch && line.length - foldStart > max) { + result += line.slice(foldStart, prevMatch) + "\n" + line.slice(prevMatch + 1); + } else { + result += line.slice(foldStart); + } + return result; } - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; + function simpleChar(character) { + return CHAR_TAB2 !== character && CHAR_LINE_FEED2 !== character && CHAR_CARRIAGE_RETURN2 !== character && CHAR_COMMA2 !== character && CHAR_LEFT_SQUARE_BRACKET2 !== character && CHAR_RIGHT_SQUARE_BRACKET2 !== character && CHAR_LEFT_CURLY_BRACKET2 !== character && CHAR_RIGHT_CURLY_BRACKET2 !== character && CHAR_SHARP2 !== character && CHAR_AMPERSAND2 !== character && CHAR_ASTERISK2 !== character && CHAR_EXCLAMATION2 !== character && CHAR_VERTICAL_LINE2 !== character && CHAR_GREATER_THAN2 !== character && CHAR_SINGLE_QUOTE2 !== character && CHAR_DOUBLE_QUOTE2 !== character && CHAR_PERCENT2 !== character && CHAR_COLON2 !== character && !ESCAPE_SEQUENCES2[character] && !needsHexEscape(character); } - if (1 === indentStatus || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; + function needsHexEscape(character) { + return !(32 <= character && character <= 126 || 133 === character || 160 <= character && character <= 55295 || 57344 <= character && character <= 65533 || 65536 <= character && character <= 1114111); + } + function writeFlowSequence2(state, level, object) { + var _result = "", _tag = state.tag, index, length; + for (index = 0, length = object.length; index < length; index += 1) { + if (writeNode2(state, level, object[index], false, false)) { + if (0 !== index) { + _result += ", "; + } + _result += state.dump; } - else { - flowIndent = parentIndent + 1; + } + state.tag = _tag; + state.dump = "[" + _result + "]"; + } + function writeBlockSequence2(state, level, object, compact) { + var _result = "", _tag = state.tag, index, length; + for (index = 0, length = object.length; index < length; index += 1) { + if (writeNode2(state, level + 1, object[index], true, true)) { + if (!compact || 0 !== index) { + _result += generateNextLine2(state, level); + } + _result += "- " + state.dump; } - blockIndent = state.position - state.lineStart; - if (1 === indentStatus) { - 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 (null !== state.tag || null !== state.anchor) { - throwError(state, 'alias node should not have any properties'); - } - } - else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; - if (null === state.tag) { - state.tag = '?'; - } - } - if (null !== state.anchor) { - state.anchorMap[state.anchor] = state.result; - state.result.anchorId = state.anchor; - } - } + } + state.tag = _tag; + state.dump = _result || "[]"; + } + function writeFlowMapping2(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 (0 !== index) { + pairBuffer += ", "; + } + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (!writeNode2(state, level, objectKey, false, false)) { + continue; } - else if (0 === indentStatus) { - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + if (state.dump.length > 1024) { + pairBuffer += "? "; + } + pairBuffer += state.dump + ": "; + if (!writeNode2(state, level, objectValue, false, false)) { + continue; } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = "{" + _result + "}"; } - if (null !== state.tag && '!' !== state.tag) { - if (state.tag == "!include") { - if (!state.result) { - state.result = ast.newScalar(); - state.result.startPosition = state.position; - state.result.endPosition = state.position; - throwError(state, "!include without value"); - } - state.result.kind = ast.Kind.INCLUDE_REF; - } - else if ('?' === state.tag) { - for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex]; - var vl = state.result['value']; - if (type.resolve(vl)) { - state.result.valueObject = type.construct(state.result['value']); - state.tag = type.tag; - if (null !== state.anchor) { - state.result.anchorId = state.anchor; - state.anchorMap[state.anchor] = state.result; - } - break; - } - } + function writeBlockMapping2(state, level, object, compact) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer; + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (!compact || 0 !== index) { + pairBuffer += generateNextLine2(state, level); } - else if (_hasOwnProperty.call(state.typeMap, state.tag)) { - type = state.typeMap[state.tag]; - if (null !== state.result && 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 (null !== state.anchor) { - state.result.anchorId = state.anchor; - state.anchorMap[state.anchor] = state.result; - } - } + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (!writeNode2(state, level + 1, objectKey, true, true)) { + continue; } - else { - throwErrorFromPosition(state, tagStart, 'unknown tag <' + state.tag + '>', false, true); + explicitPair = null !== state.tag && "?" !== state.tag || state.dump && state.dump.length > 1024; + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED2 === state.dump.charCodeAt(0)) { + pairBuffer += "?"; + } else { + pairBuffer += "? "; + } } - } - return null !== state.tag || null !== state.anchor || 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 (0 !== (ch = state.input.charCodeAt(state.position))) { - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - if (state.lineIndent > 0 || 0x25 !== ch) { - break; + pairBuffer += state.dump; + if (explicitPair) { + pairBuffer += generateNextLine2(state, level); } - hasDirectives = true; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - while (0 !== ch && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); + if (!writeNode2(state, level + 1, objectValue, true, explicitPair)) { + continue; } - 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'); + if (state.dump && CHAR_LINE_FEED2 === state.dump.charCodeAt(0)) { + pairBuffer += ":"; + } else { + pairBuffer += ": "; } - while (0 !== ch) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = _result || "{}"; + } + function detectType2(state, object, explicit) { + var _result, typeList, index, length, type2, style; + typeList = explicit ? state.explicitTypes : state.implicitTypes; + for (index = 0, length = typeList.length; index < length; index += 1) { + type2 = typeList[index]; + if ((type2.instanceOf || type2.predicate) && (!type2.instanceOf || "object" === typeof object && object instanceof type2.instanceOf) && (!type2.predicate || type2.predicate(object))) { + state.tag = explicit ? type2.tag : "?"; + if (type2.represent) { + style = state.styleMap[type2.tag] || type2.defaultStyle; + if ("[object Function]" === _toString2.call(type2.represent)) { + _result = type2.represent(object, style); + } else if (_hasOwnProperty2.call(type2.represent, style)) { + _result = type2.represent[style](object, style); + } else { + throw new YAMLException("!<" + type2.tag + '> tag resolver accepts not "' + style + '" style'); } - if (0x23 === ch) { - do { - ch = state.input.charCodeAt(++state.position); - } while (0 !== ch && !is_EOL(ch)); - break; + state.dump = _result; + } + return true; + } + } + return false; + } + function writeNode2(state, level, object, block, compact) { + state.tag = null; + state.dump = object; + if (!detectType2(state, object, false)) { + detectType2(state, object, true); + } + var type2 = _toString2.call(state.dump); + if (block) { + block = 0 > state.flowLevel || state.flowLevel > level; + } + if (null !== state.tag && "?" !== state.tag || 2 !== state.indent && level > 0) { + compact = false; + } + var objectOrArray = "[object Object]" === type2 || "[object Array]" === type2, duplicateIndex, duplicate; + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = "*ref_" + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if ("[object Object]" === type2) { + if (block && 0 !== Object.keys(state.dump).length) { + writeBlockMapping2(state, level, state.dump, compact); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + (0 === level ? "\n" : "") + state.dump; } - if (is_EOL(ch)) { - break; + } else { + writeFlowMapping2(state, level, state.dump); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; } - _position = state.position; - while (0 !== ch && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); + } + } else if ("[object Array]" === type2) { + if (block && 0 !== state.dump.length) { + writeBlockSequence2(state, level, state.dump, compact); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + (0 === level ? "\n" : "") + state.dump; } - directiveArgs.push(state.input.slice(_position, state.position)); - } - if (0 !== ch) { - readLineBreak(state); - } - if (_hasOwnProperty.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + writeFlowSequence2(state, level, state.dump); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if ("[object String]" === type2) { + if ("?" !== state.tag) { + writeScalar2(state, state.dump, level); + } + } else { + if (state.skipInvalid) { + return false; + } + throw new YAMLException("unacceptable kind of an object to dump " + type2); } - else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); - state.position++; + if (null !== state.tag && "?" !== state.tag) { + state.dump = "!<" + state.tag + "> " + state.dump; } + } + return true; } - skipSeparationSpace(state, true, -1); - if (0 === state.lineIndent && - 0x2D === state.input.charCodeAt(state.position) && - 0x2D === state.input.charCodeAt(state.position + 1) && - 0x2D === state.input.charCodeAt(state.position + 2)) { - 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'); + function getDuplicateReferences2(object, state) { + var objects = [], duplicatesIndexes = [], index, length; + inspectNode2(object, objects, duplicatesIndexes); + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); } - state.documents.push(state.result); - if (state.position === state.lineStart && testDocumentSeparator(state)) { - if (0x2E === state.input.charCodeAt(state.position)) { - state.position += 3; - skipSeparationSpace(state, true, -1); + function inspectNode2(object, objects, duplicatesIndexes) { + var type2 = _toString2.call(object), objectKeyList, index, length; + if (null !== object && "object" === typeof object) { + index = objects.indexOf(object); + if (-1 !== index) { + if (-1 === duplicatesIndexes.indexOf(index)) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode2(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode2(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } } - return; + } } - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected'); + function dump2(input, options2) { + options2 = options2 || {}; + var state = new State2(options2); + getDuplicateReferences2(input, state); + if (writeNode2(state, 0, input, true, true)) { + return state.dump + "\n"; + } + return ""; } - else { - return; + exports.dump = dump2; + function safeDump2(input, options2) { + return dump2(input, common2.extend({ schema: DEFAULT_SAFE_SCHEMA }, options2)); } -} -function loadDocuments(input, options) { - input = String(input); - options = options || {}; - var inputLength = input.length; - if (inputLength !== 0) { - if (0x0A !== input.charCodeAt(inputLength - 1) && - 0x0D !== input.charCodeAt(inputLength - 1)) { - input += '\n'; - } - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1); - } - } - var state = new State(input, options); - state.input += '\0'; - while (0x20 === state.input.charCodeAt(state.position)) { - state.lineIndent += 1; - state.position += 1; + exports.safeDump = safeDump2; + } +}); + +// node_modules/yaml-ast-parser/dist/src/scalarInference.js +var require_scalarInference = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/scalarInference.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function parseYamlBoolean(input) { + if (["true", "True", "TRUE"].lastIndexOf(input) >= 0) { + return true; + } else if (["false", "False", "FALSE"].lastIndexOf(input) >= 0) { + return false; + } + throw 'Invalid boolean "' + input + '"'; } - while (state.position < (state.length - 1)) { - var q = state.position; - readDocument(state); - if (state.position <= q) { - for (; state.position < state.length - 1; state.position++) { - var c = state.input.charAt(state.position); - if (c == '\n') { - break; - } - } - } + exports.parseYamlBoolean = parseYamlBoolean; + function safeParseYamlInteger(input) { + if (input.lastIndexOf("0o", 0) === 0) { + return parseInt(input.substring(2), 8); + } + return parseInt(input); } - var documents = state.documents; - var docsCount = documents.length; - if (docsCount > 0) { - documents[docsCount - 1].endPosition = inputLength; + function parseYamlInteger(input) { + var result = safeParseYamlInteger(input); + if (isNaN(result)) { + throw 'Invalid integer "' + input + '"'; + } + return result; } - for (var _i = 0, documents_1 = documents; _i < documents_1.length; _i++) { - var x = documents_1[_i]; - x.errors = state.errors; - if (x.startPosition > x.endPosition) { - x.startPosition = x.endPosition; - } + exports.parseYamlInteger = parseYamlInteger; + function parseYamlFloat(input) { + if ([".nan", ".NaN", ".NAN"].lastIndexOf(input) >= 0) { + return NaN; + } + var infinity = /^([-+])?(?:\.inf|\.Inf|\.INF)$/; + var match2 = infinity.exec(input); + if (match2) { + return match2[1] === "-" ? -Infinity : Infinity; + } + var result = parseFloat(input); + if (!isNaN(result)) { + return result; + } + throw 'Invalid float "' + input + '"'; + } + exports.parseYamlFloat = parseYamlFloat; + var ScalarType; + (function(ScalarType2) { + ScalarType2[ScalarType2["null"] = 0] = "null"; + ScalarType2[ScalarType2["bool"] = 1] = "bool"; + ScalarType2[ScalarType2["int"] = 2] = "int"; + ScalarType2[ScalarType2["float"] = 3] = "float"; + ScalarType2[ScalarType2["string"] = 4] = "string"; + })(ScalarType = exports.ScalarType || (exports.ScalarType = {})); + function determineScalarType(node) { + if (node === void 0) { + return ScalarType.null; + } + if (node.doubleQuoted || !node.plainScalar || node["singleQuoted"]) { + return ScalarType.string; + } + var value = node.value; + if (["null", "Null", "NULL", "~", ""].indexOf(value) >= 0) { + return ScalarType.null; + } + if (value === null || value === void 0) { + return ScalarType.null; + } + if (["true", "True", "TRUE", "false", "False", "FALSE"].indexOf(value) >= 0) { + return ScalarType.bool; + } + var base10 = /^[-+]?[0-9]+$/; + var base8 = /^0o[0-7]+$/; + var base16 = /^0x[0-9a-fA-F]+$/; + if (base10.test(value) || base8.test(value) || base16.test(value)) { + return ScalarType.int; + } + var float2 = /^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/; + var infinity = /^[-+]?(\.inf|\.Inf|\.INF)$/; + if (float2.test(value) || infinity.test(value) || [".nan", ".NaN", ".NAN"].indexOf(value) >= 0) { + return ScalarType.float; + } + return ScalarType.string; } - return documents; + exports.determineScalarType = determineScalarType; + } +}); + +// node_modules/yaml-ast-parser/dist/src/index.js +var require_src = __commonJS({ + "node_modules/yaml-ast-parser/dist/src/index.js"(exports) { + "use strict"; + function __export2(m) { + for (var p2 in m) if (!exports.hasOwnProperty(p2)) exports[p2] = m[p2]; + } + Object.defineProperty(exports, "__esModule", { value: true }); + var loader_1 = require_loader(); + exports.load = loader_1.load; + exports.loadAll = loader_1.loadAll; + exports.safeLoad = loader_1.safeLoad; + exports.safeLoadAll = loader_1.safeLoadAll; + var dumper_1 = require_dumper(); + exports.dump = dumper_1.dump; + exports.safeDump = dumper_1.safeDump; + exports.YAMLException = require_exception(); + __export2(require_yamlAST()); + __export2(require_scalarInference()); + } +}); + +// node_modules/@redocly/openapi-core/lib/format/codeframes.js +function getCodeframe(location, color) { + colorOptions.enabled = color; + const { start, end = { line: start.line, col: start.col + 1 }, source } = location; + const lines = source.getLines(); + const startLineNum = start.line; + const endLineNum = Math.max(Math.min(end.line, lines.length), start.line); + let skipLines = Math.max(endLineNum - startLineNum - MAX_CODEFRAME_LINES + 1, 0); + if (skipLines < 2) + skipLines = 0; + const prefixedLines = []; + let currentPad = 0; + for (let i2 = startLineNum; i2 <= endLineNum; i2++) { + if (skipLines > 0 && i2 >= endLineNum - skipLines) + break; + const line = lines[i2 - 1] || ""; + if (line !== "") + currentPad = padSize(line); + const startIdx = i2 === startLineNum ? start.col - 1 : currentPad; + const endIdx = i2 === endLineNum ? end.col - 1 : line.length; + prefixedLines.push([`${i2}`, markLine(line, startIdx, endIdx, colorize.red)]); + if (!color) + prefixedLines.push(["", underlineLine(line, startIdx, endIdx)]); + } + if (skipLines > 0) { + prefixedLines.push([ + `\u2026`, + `${whitespace(currentPad)}${colorize.gray(`< ${skipLines} more lines >`)}` + ]); + prefixedLines.push([ + `${endLineNum}`, + markLine(lines[endLineNum - 1], -1, end.col - 1, colorize.red) + ]); + if (!color) + prefixedLines.push(["", underlineLine(lines[endLineNum - 1], -1, end.col - 1)]); + } + return printPrefixedLines([ + [`${startLineNum - 2}`, markLine(lines[startLineNum - 1 - 2])], + [`${startLineNum - 1}`, markLine(lines[startLineNum - 1 - 1])], + ...prefixedLines, + [`${endLineNum + 1}`, markLine(lines[endLineNum - 1 + 1])], + [`${endLineNum + 2}`, markLine(lines[endLineNum - 1 + 2])] + ]); + function markLine(line, startIdx = -1, endIdx = Infinity, variant = colorize.gray) { + if (!color) + return line; + if (!line) + return line; + if (startIdx === -1) { + startIdx = padSize(line); + } + endIdx = Math.min(endIdx, line.length); + return line.substr(0, startIdx) + variant(line.substring(startIdx, endIdx)) + line.substr(endIdx); + } } -function loadAll(input, iterator, options) { - if (options === void 0) { options = {}; } - var documents = loadDocuments(input, options), index, length; - for (index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); +function printPrefixedLines(lines) { + const existingLines = lines.filter(([_5, line]) => line !== void 0); + const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length)); + const dedentLen = Math.min(...existingLines.map(([_5, line]) => line === "" ? Infinity : padSize(line))); + return existingLines.map(([prefix, line]) => colorize.gray(leftPad(padLen, prefix) + " |") + (line ? " " + limitLineLength(line.substring(dedentLen)) : "")).join("\n"); +} +function limitLineLength(line, maxLen = MAX_LINE_LENGTH) { + const overflowLen = line.length - maxLen; + if (overflowLen > 0) { + const charsMoreText = colorize.gray(`...<${overflowLen} chars>`); + return line.substring(0, maxLen - charsMoreText.length) + charsMoreText; + } else { + return line; + } +} +function underlineLine(line, startIdx = -1, endIdx = Infinity) { + if (startIdx === -1) { + startIdx = padSize(line); + } + endIdx = Math.min(endIdx, line.length); + return whitespace(startIdx) + "^".repeat(Math.max(endIdx - startIdx, 1)); +} +function whitespace(len) { + return " ".repeat(len); +} +function leftPad(len, str2) { + return whitespace(len - str2.length) + str2; +} +function padSize(line) { + for (let i2 = 0; i2 < line.length; i2++) { + if (line[i2] !== " ") + return i2; + } + return line.length; +} +function getLineColLocation(location) { + if (location.pointer === void 0) + return location; + const { source, pointer, reportOnKey } = location; + const ast = source.getAst(yamlAst.safeLoad); + const astNode = getAstNodeByPointer(ast, pointer, !!reportOnKey); + return { + ...location, + pointer: void 0, + ...positionsToLoc(source.body, astNode?.startPosition ?? 1, astNode?.endPosition ?? 1) + }; +} +function positionsToLoc(source, startPos, endPos) { + let currentLine = 1; + let currentCol = 1; + let start = { line: 1, col: 1 }; + for (let i2 = 0; i2 < endPos - 1; i2++) { + if (i2 === startPos - 1) { + start = { line: currentLine, col: currentCol + 1 }; + } + if (source[i2] === "\n") { + currentLine++; + currentCol = 1; + if (i2 === startPos - 1) { + start = { line: currentLine, col: currentCol }; + } + if (source[i2 + 1] === "\r") + i2++; + continue; } + currentCol++; + } + const end = startPos === endPos ? { ...start } : { line: currentLine, col: currentCol + 1 }; + return { start, end }; } -exports.loadAll = loadAll; -function load(input, options) { - if (options === void 0) { options = {}; } - var documents = loadDocuments(input, options), index, length; - if (0 === documents.length) { - return undefined; - } - else if (1 === documents.length) { - return documents[0]; +function getAstNodeByPointer(root, pointer, reportOnKey) { + const pointerSegments = parsePointer(pointer.substr(2)); + if (root === void 0) { + return void 0; + } + let currentNode = root; + for (const key of pointerSegments) { + if (currentNode.kind === yamlAst.Kind.MAP) { + const mapping = currentNode.mappings.find((m) => m.key.value === key); + if (!mapping) + break; + currentNode = mapping; + if (!mapping?.value) + break; + currentNode = mapping.value; + } else if (currentNode.kind === yamlAst.Kind.SEQ) { + const elem = currentNode.items[parseInt(key, 10)]; + if (!elem) + break; + currentNode = elem; + } + } + if (!reportOnKey) { + return currentNode; + } else { + const parent = currentNode.parent; + if (!parent) + return currentNode; + if (parent.kind === yamlAst.Kind.SEQ) { + return currentNode; + } else if (parent.kind === yamlAst.Kind.MAPPING) { + return parent.key; + } else { + return currentNode; } - var e = new YAMLException('expected a single document in the stream, but found more'); - e.mark = new Mark("", "", 0, 0, 0); - e.mark.position = documents[0].endPosition; - documents[0].errors.push(e); - return documents[0]; -} -exports.load = load; -function safeLoadAll(input, output, options) { - if (options === void 0) { options = {}; } - loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} -exports.safeLoadAll = safeLoadAll; -function safeLoad(input, options) { - if (options === void 0) { options = {}; } - return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } } -exports.safeLoad = safeLoad; -module.exports.loadAll = loadAll; -module.exports.load = load; -module.exports.safeLoadAll = safeLoadAll; -module.exports.safeLoad = safeLoad; -//# sourceMappingURL=loader.js.map - -/***/ }), - -/***/ 6324: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; +var yamlAst, MAX_LINE_LENGTH, MAX_CODEFRAME_LINES; +var init_codeframes = __esm({ + "node_modules/@redocly/openapi-core/lib/format/codeframes.js"() { + yamlAst = __toESM(require_src(), 1); + init_logger(); + init_ref_utils(); + MAX_LINE_LENGTH = 150; + MAX_CODEFRAME_LINES = 3; + } +}); -var common = __nccwpck_require__(57195); -var Mark = (function () { - function Mark(name, buffer, position, line, column) { - this.name = name; - this.buffer = buffer; - this.position = position; - this.line = line; - this.column = column; +// node_modules/@redocly/openapi-core/lib/format/format.js +import * as path10 from "node:path"; +function severityToNumber(severity) { + return severity === "error" ? 1 : 2; +} +function getTotals(problems) { + let errors = 0; + let warnings = 0; + let ignored = 0; + for (const m of problems) { + if (m.ignored) { + ignored++; + continue; } - Mark.prototype.getSnippet = function (indent, maxLength) { - if (indent === void 0) { indent = 0; } - if (maxLength === void 0) { maxLength = 75; } - var head, start, tail, end, snippet; - if (!this.buffer) { - return null; - } - indent = indent || 4; - maxLength = maxLength || 75; - head = ''; - start = this.position; - while (start > 0 && -1 === '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1))) { - start -= 1; - if (this.position - start > (maxLength / 2 - 1)) { - head = ' ... '; - start += 5; - break; - } + if (m.severity === "error") + errors++; + if (m.severity === "warn") + warnings++; + } + return { + errors, + warnings, + ignored + }; +} +function formatProblems(problems, opts) { + const { maxProblems = 100, cwd: cwd2 = isBrowser ? "" : process.cwd(), format = "codeframe", color = colorOptions.enabled, totals = getTotals(problems), version: version2 = "2.0", command } = opts; + colorOptions.enabled = color; + const totalProblems = problems.length; + problems = problems.filter((m) => !m.ignored); + const ignoredProblems = totalProblems - problems.length; + problems = problems.sort((a2, b2) => severityToNumber(a2.severity) - severityToNumber(b2.severity)).slice(0, maxProblems); + if (!totalProblems && format !== "json") + return; + switch (format) { + case "json": + outputJSON(); + break; + case "codeframe": + for (let i2 = 0; i2 < problems.length; i2++) { + const problem = problems[i2]; + if (command === "bundle") { + logger.info(`${formatCodeframe(problem, i2)} +`); + } else { + logger.output(`${formatCodeframe(problem, i2)} +`); } - tail = ''; - end = this.position; - while (end < this.buffer.length && -1 === '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end))) { - end += 1; - if (end - this.position > (maxLength / 2 - 1)) { - tail = ' ... '; - end -= 5; - break; - } + } + break; + case "stylish": { + const groupedByFile = groupByFiles(problems); + for (const [file, { ruleIdPad, locationPad: positionPad, fileProblems }] of Object.entries(groupedByFile)) { + logger.output(`${colorize.blue(isAbsoluteUrl(file) ? file : path10.relative(cwd2, file))}: +`); + for (let i2 = 0; i2 < fileProblems.length; i2++) { + const problem = fileProblems[i2]; + logger.output(`${formatStylish(problem, positionPad, ruleIdPad)} +`); + } + logger.output("\n"); + } + break; + } + case "markdown": { + const groupedByFile = groupByFiles(problems); + for (const [file, { fileProblems }] of Object.entries(groupedByFile)) { + logger.output(`## Lint: ${isAbsoluteUrl(file) ? file : path10.relative(cwd2, file)} + +`); + logger.output(`| Severity | Location | Problem | Message | +`); + logger.output(`|---|---|---|---| +`); + for (let i2 = 0; i2 < fileProblems.length; i2++) { + const problem = fileProblems[i2]; + logger.output(`${formatMarkdown(problem)} +`); + } + logger.output("\n"); + if (totals.errors > 0) { + logger.output(`Validation failed +Errors: ${totals.errors} +`); + } else { + logger.output("Validation successful\n"); } - 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 (compact) { - if (compact === void 0) { compact = true; } - var snippet, where = ''; - if (this.name) { - where += 'in "' + this.name + '" '; + if (totals.warnings > 0) { + logger.output(`Warnings: ${totals.warnings} +`); } - where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); - if (!compact) { - snippet = this.getSnippet(); - if (snippet) { - where += ':\n' + snippet; - } + logger.output("\n"); + } + break; + } + case "checkstyle": { + const groupedByFile = groupByFiles(problems); + logger.output('\n'); + logger.output('\n'); + for (const [file, { fileProblems }] of Object.entries(groupedByFile)) { + logger.output(` +`); + fileProblems.forEach(formatCheckstyle); + logger.output(` +`); + } + logger.output(` +`); + break; + } + case "codeclimate": + outputForCodeClimate(); + break; + case "summary": + formatSummary(problems); + break; + case "github-actions": + outputForGithubActions(problems, cwd2); + } + if (totalProblems - ignoredProblems > maxProblems) { + logger.info(`< ... ${totalProblems - maxProblems} more problems hidden > ${colorize.gray("increase with `--max-problems N`")} +`); + } + function outputForCodeClimate() { + const issues = problems.map((p2) => { + const location = p2.location[0]; + const lineCol = getLineColLocation(location); + return { + description: p2.message, + location: { + path: isAbsoluteUrl(location.source.absoluteRef) ? location.source.absoluteRef : path10.relative(cwd2, location.source.absoluteRef), + lines: { + begin: lineCol.start.line + } + }, + severity: CODECLIMATE_SEVERITY_MAPPING[p2.severity], + fingerprint: `${p2.ruleId}${p2.location.length > 0 ? "-" + p2.location[0].pointer : ""}` + }; + }); + logger.output(JSON.stringify(issues, null, 2)); + } + function outputJSON() { + const resultObject = { + totals, + version: version2, + problems: problems.map((p2) => { + const problem = { + ...p2, + location: p2.location.map((location) => ({ + ...location, + source: { + ref: isAbsoluteUrl(location.source.absoluteRef) ? location.source.absoluteRef : path10.relative(cwd2, location.source.absoluteRef) + } + })), + from: p2.from ? { + ...p2.from, + source: { + ref: isAbsoluteUrl(p2.from?.source.absoluteRef) ? p2.from?.source.absoluteRef : path10.relative(cwd2, p2.from?.source.absoluteRef || cwd2) + } + } : void 0 + }; + if (env.FORMAT_JSON_WITH_CODEFRAMES) { + const location = p2.location[0]; + const loc = getLineColLocation(location); + problem.codeframe = getCodeframe(loc, color); } - return where; + return problem; + }) }; - return Mark; -}()); -module.exports = Mark; -//# sourceMappingURL=mark.js.map + logger.output(JSON.stringify(resultObject, null, 2)); + } + function getBgColor(problem) { + const { severity } = problem; + if (!BG_COLORS[severity]) { + throw new Error(ERROR_MESSAGE.INVALID_SEVERITY_LEVEL); + } + return BG_COLORS[severity]; + } + function formatCodeframe(problem, idx) { + const bgColor = getBgColor(problem); + const location = problem.location[0]; + const relativePath = isAbsoluteUrl(location.source.absoluteRef) ? location.source.absoluteRef : path10.relative(cwd2, location.source.absoluteRef); + const loc = getLineColLocation(location); + const atPointer = location.pointer ? colorize.gray(`at ${location.pointer}`) : ""; + const fileWithLoc = `${relativePath}:${loc.start.line}:${loc.start.col}`; + return `[${idx + 1}] ${bgColor(fileWithLoc)} ${atPointer} -/***/ }), +${problem.message} -/***/ 92434: -/***/ ((__unused_webpack_module, exports) => { +` + formatDidYouMean(problem) + (problem.reference ? `Reference: ${colorize.blue(problem.reference)} -"use strict"; +` : "") + getCodeframe(loc, color) + "\n\n" + formatFrom(cwd2, problem.from) + `${SEVERITY_NAMES[problem.severity]} was generated by the ${colorize.blue(problem.ruleId)} rule. -Object.defineProperty(exports, "__esModule", ({ value: true })); -function parseYamlBoolean(input) { - if (["true", "True", "TRUE"].lastIndexOf(input) >= 0) { - return true; - } - else if (["false", "False", "FALSE"].lastIndexOf(input) >= 0) { - return false; +`; + } + function formatStylish(problem, locationPad, ruleIdPad) { + const color2 = COLORS[problem.severity]; + if (!SEVERITY_NAMES[problem.severity]) { + return "Error not found severity. Please check your config file. Allowed values: `warn,error,off`"; } - throw "Invalid boolean \"" + input + "\""; -} -exports.parseYamlBoolean = parseYamlBoolean; -function safeParseYamlInteger(input) { - if (input.lastIndexOf('0o', 0) === 0) { - return parseInt(input.substring(2), 8); + const severityName = color2(SEVERITY_NAMES[problem.severity].toLowerCase().padEnd(7)); + const { start } = problem.location[0]; + return ` ${`${start.line}:${start.col}`.padEnd(locationPad)} ${severityName} ${problem.ruleId.padEnd(ruleIdPad)} ${problem.message}`; + } + function formatMarkdown(problem) { + if (!SEVERITY_NAMES[problem.severity]) { + return "Error not found severity. Please check your config file. Allowed values: `warn,error,off`"; } - return parseInt(input); + const severityName = SEVERITY_NAMES[problem.severity].toLowerCase(); + const { start } = problem.location[0]; + return `| ${severityName} | line ${`${start.line}:${start.col}`} | [${problem.ruleId}](https://redocly.com/docs/cli/rules/${problem.ruleId}/) | ${problem.message.replaceAll("\n", "
")} |`; + } + function formatCheckstyle(problem) { + const { line, col } = problem.location[0].start; + const severity = problem.severity == "warn" ? "warning" : "error"; + const message = xmlEscape(problem.message); + const source = xmlEscape(problem.ruleId); + logger.output(` +`); + } } -function parseYamlInteger(input) { - var result = safeParseYamlInteger(input); - if (isNaN(result)) { - throw "Invalid integer \"" + input + "\""; - } - return result; +function formatSummary(problems) { + const counts = {}; + for (const problem of problems) { + counts[problem.ruleId] = counts[problem.ruleId] || { count: 0, severity: problem.severity }; + counts[problem.ruleId].count++; + } + const sorted = Object.entries(counts).sort(([, a2], [, b2]) => { + const severityDiff = severityToNumber(a2.severity) - severityToNumber(b2.severity); + return severityDiff || b2.count - a2.count; + }); + for (const [ruleId, info] of sorted) { + const color = COLORS[info.severity]; + const severityName = color(SEVERITY_NAMES[info.severity].toLowerCase().padEnd(7)); + logger.output(`${severityName} ${ruleId}: ${info.count} +`); + } + logger.output("\n"); } -exports.parseYamlInteger = parseYamlInteger; -function parseYamlFloat(input) { - if ([".nan", ".NaN", ".NAN"].lastIndexOf(input) >= 0) { - return NaN; - } - var infinity = /^([-+])?(?:\.inf|\.Inf|\.INF)$/; - var match = infinity.exec(input); - if (match) { - return (match[1] === '-') ? -Infinity : Infinity; - } - var result = parseFloat(input); - if (!isNaN(result)) { - return result; - } - throw "Invalid float \"" + input + "\""; +function formatFrom(cwd2, location) { + if (!location) + return ""; + const relativePath = path10.relative(cwd2, location.source.absoluteRef); + const loc = getLineColLocation(location); + const fileWithLoc = `${relativePath}:${loc.start.line}:${loc.start.col}`; + const atPointer = location.pointer ? colorize.gray(`at ${location.pointer}`) : ""; + return `referenced from ${colorize.blue(fileWithLoc)} ${atPointer} + +`; } -exports.parseYamlFloat = parseYamlFloat; -var ScalarType; -(function (ScalarType) { - ScalarType[ScalarType["null"] = 0] = "null"; - ScalarType[ScalarType["bool"] = 1] = "bool"; - ScalarType[ScalarType["int"] = 2] = "int"; - ScalarType[ScalarType["float"] = 3] = "float"; - ScalarType[ScalarType["string"] = 4] = "string"; -})(ScalarType = exports.ScalarType || (exports.ScalarType = {})); -function determineScalarType(node) { - if (node === undefined) { - return ScalarType.null; - } - if (node.doubleQuoted || !node.plainScalar || node['singleQuoted']) { - return ScalarType.string; - } - var value = node.value; - if (["null", "Null", "NULL", "~", ''].indexOf(value) >= 0) { - return ScalarType.null; - } - if (value === null || value === undefined) { - return ScalarType.null; - } - if (["true", "True", "TRUE", "false", "False", "FALSE"].indexOf(value) >= 0) { - return ScalarType.bool; - } - var base10 = /^[-+]?[0-9]+$/; - var base8 = /^0o[0-7]+$/; - var base16 = /^0x[0-9a-fA-F]+$/; - if (base10.test(value) || base8.test(value) || base16.test(value)) { - return ScalarType.int; - } - var float = /^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/; - var infinity = /^[-+]?(\.inf|\.Inf|\.INF)$/; - if (float.test(value) || infinity.test(value) || [".nan", ".NaN", ".NAN"].indexOf(value) >= 0) { - return ScalarType.float; +function formatDidYouMean(problem) { + if (problem.suggest.length === 0) + return ""; + if (problem.suggest.length === 1) { + return `Did you mean: ${problem.suggest[0]} ? + +`; + } else { + return `Did you mean: + - ${problem.suggest.slice(0, MAX_SUGGEST).join("\n - ")} + +`; + } +} +function xmlEscape(s2) { + return s2.replace(/[<>&"'\x00-\x1F\x7F\u0080-\uFFFF]/gu, (char) => { + switch (char) { + case "<": + return "<"; + case ">": + return ">"; + case "&": + return "&"; + case '"': + return """; + case "'": + return "'"; + default: + return `&#${char.charCodeAt(0)};`; } - return ScalarType.string; + }); } -exports.determineScalarType = determineScalarType; -//# sourceMappingURL=scalarInference.js.map - -/***/ }), - -/***/ 96488: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +function outputForGithubActions(problems, cwd2) { + for (const problem of problems) { + for (const location of problem.location.map(getLineColLocation)) { + let command; + switch (problem.severity) { + case "error": + command = "error"; + break; + case "warn": + command = "warning"; + break; + } + const suggest = formatDidYouMean(problem); + const reference = problem.reference ? `Reference: ${problem.reference} + +` : ""; + const message = problem.message + (suggest !== "" || reference !== "" ? "\n\n" : "") + suggest + reference; + const properties = { + title: problem.ruleId, + file: isAbsoluteUrl(location.source.absoluteRef) ? location.source.absoluteRef : path10.relative(cwd2, location.source.absoluteRef), + line: location.start.line, + col: location.start.col, + endLine: location.end?.line, + endColumn: location.end?.col + }; + logger.output(`::${command} ${formatProperties(properties)}::${escapeMessage(message)} +`); + } + } + function formatProperties(props) { + return Object.entries(props).filter(([, v3]) => v3 !== null && v3 !== void 0).map(([k3, v3]) => `${k3}=${escapeProperty(v3)}`).join(","); + } + function toString2(v3) { + if (v3 === null || v3 === void 0) { + return ""; + } else if (typeof v3 === "string" || v3 instanceof String) { + return v3; + } + return JSON.stringify(v3); + } + function escapeMessage(v3) { + return toString2(v3).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(v3) { + return toString2(v3).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } +} +var ERROR_MESSAGE, BG_COLORS, COLORS, SEVERITY_NAMES, CODECLIMATE_SEVERITY_MAPPING, MAX_SUGGEST, groupByFiles; +var init_format = __esm({ + "node_modules/@redocly/openapi-core/lib/format/format.js"() { + init_env(); + init_logger(); + init_ref_utils(); + init_codeframes(); + ERROR_MESSAGE = { + INVALID_SEVERITY_LEVEL: "Invalid severity level; accepted values: error or warn" + }; + BG_COLORS = { + warn: (str2) => colorize.bgYellow(colorize.black(str2)), + error: colorize.bgRed + }; + COLORS = { + warn: colorize.yellow, + error: colorize.red + }; + SEVERITY_NAMES = { + warn: "Warning", + error: "Error" + }; + CODECLIMATE_SEVERITY_MAPPING = { + error: "critical", + warn: "minor" + }; + MAX_SUGGEST = +(env.REDOCLY_CLI_LINT_MAX_SUGGESTIONS ?? 5); + groupByFiles = (problems) => { + const fileGroups = {}; + for (const problem of problems) { + const absoluteRef = problem.location[0].source.absoluteRef; + fileGroups[absoluteRef] = fileGroups[absoluteRef] || { + fileProblems: [], + ruleIdPad: 0, + locationPad: 0 + }; + const mappedProblem = { ...problem, location: problem.location.map(getLineColLocation) }; + fileGroups[absoluteRef].fileProblems.push(mappedProblem); + fileGroups[absoluteRef].ruleIdPad = Math.max(problem.ruleId.length, fileGroups[absoluteRef].ruleIdPad); + fileGroups[absoluteRef].locationPad = Math.max(Math.max(...mappedProblem.location.map((loc) => `${loc.start.line}:${loc.start.col}`.length)), fileGroups[absoluteRef].locationPad); + } + return fileGroups; + }; + } +}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var common = __nccwpck_require__(57195); -var YAMLException = __nccwpck_require__(41629); -var type_1 = __nccwpck_require__(34642); -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) { - exclude.push(previousIndex); - } - }); - result.push(currentType); +// node_modules/@redocly/openapi-core/lib/lint.js +async function lint(opts) { + const { ref, externalRefResolver = new BaseResolver(opts.config.resolve) } = opts; + const document2 = await externalRefResolver.resolveDocument(null, ref, true); + opts.collectSpecData?.(document2.parsed); + return lintDocument({ + document: document2, + ...opts, + externalRefResolver + }); +} +async function lintFromString(opts) { + const { source, absoluteRef, externalRefResolver = new BaseResolver(opts.config.resolve) } = opts; + const document2 = makeDocumentFromString(source, absoluteRef || "/"); + return lintDocument({ + document: document2, + ...opts, + externalRefResolver + }); +} +async function lintDocument(opts) { + releaseAjvInstance(); + const { document: document2, customTypes, externalRefResolver, config } = opts; + const specVersion = detectSpec(document2.parsed); + const specMajorVersion = getMajorSpecVersion(specVersion); + const rules8 = config.getRulesForSpecVersion(specMajorVersion); + const types2 = normalizeTypes(config.extendTypes(customTypes ?? getTypes(specVersion), specVersion), config); + const ctx = { + problems: [], + specVersion, + config, + visitorsData: {} + }; + const preprocessors8 = initRules(rules8, config, "preprocessors", specVersion); + const regularRules = initRules(rules8, config, "rules", specVersion); + let resolvedRefMap = await resolveDocument({ + rootDocument: document2, + rootType: types2.Root, + externalRefResolver + }); + if (preprocessors8.length > 0) { + walkDocument({ + document: document2, + rootType: types2.Root, + normalizedVisitors: normalizeVisitors(preprocessors8, types2), + resolvedRefMap, + ctx }); - return result.filter(function (type, index) { - return -1 === exclude.indexOf(index); + resolvedRefMap = await resolveDocument({ + rootDocument: document2, + rootType: types2.Root, + externalRefResolver }); + } + const normalizedVisitors = normalizeVisitors(regularRules, types2); + walkDocument({ + document: document2, + rootType: types2.Root, + normalizedVisitors, + resolvedRefMap, + ctx + }); + return ctx.problems.map((problem) => config.addProblemToIgnore(problem)); } -function compileMap() { - var result = {}, index, length; - function collectType(type) { - result[type.tag] = type; - } - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } - return result; -} -var Schema = (function () { - function Schema(definition) { - this.include = definition.include || []; - this.implicit = definition.implicit || []; - this.explicit = definition.explicit || []; - this.implicit.forEach(function (type) { - if (type.loadKind && 'scalar' !== type.loadKind) { - throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); +async function lintConfig(opts) { + const { severity, externalRefResolver = new BaseResolver(), config } = opts; + if (!config.document) { + throw new Error("Config document is not set."); + } + const ctx = { + problems: [], + specVersion: "oas3_0", + // TODO: use config-specific version + config, + visitorsData: {} + }; + const types2 = normalizeTypes(opts.externalConfigTypes || createConfigTypes(redoclyConfigSchemaWithoutTheme2, config)); + const rules8 = [ + { + severity: severity || "error", + ruleId: "configuration struct", + visitor: Struct({ severity: "error" }) + }, + { + severity: severity || "error", + ruleId: "configuration no-unresolved-refs", + visitor: NoUnresolvedRefs({ severity: "error" }) + } + ]; + const normalizedVisitors = normalizeVisitors(rules8, types2); + const resolvedRefMap = config.resolvedRefMap || await resolveDocument({ + rootDocument: config.document, + rootType: types2.ConfigRoot, + externalRefResolver + }); + walkDocument({ + document: config.document, + rootType: types2.ConfigRoot, + normalizedVisitors, + resolvedRefMap, + ctx + }); + return ctx.problems; +} +var _3, propertiesWithoutTheme2, redoclyConfigSchemaWithoutTheme2; +var init_lint = __esm({ + "node_modules/@redocly/openapi-core/lib/lint.js"() { + init_lib_esm(); + init_rules(); + init_detect_spec(); + init_oas_types(); + init_resolve(); + init_ajv(); + init_no_unresolved_refs(); + init_struct(); + init_types(); + init_redocly_yaml(); + init_visitors(); + init_walk(); + ({ theme: _3, ...propertiesWithoutTheme2 } = Yr.properties); + redoclyConfigSchemaWithoutTheme2 = { + ...Yr, + properties: propertiesWithoutTheme2 + }; + } +}); + +// node_modules/@redocly/openapi-core/lib/rules/catalog-entity/entity-key-valid.js +var validKeyPattern, MIN_KEY_LENGTH, MAX_KEY_LENGTH, EntityKeyValid; +var init_entity_key_valid = __esm({ + "node_modules/@redocly/openapi-core/lib/rules/catalog-entity/entity-key-valid.js"() { + init_is_plain_object(); + validKeyPattern = /^[a-z0-9]+(?:-[a-z0-9]+)*$/; + MIN_KEY_LENGTH = 2; + MAX_KEY_LENGTH = 150; + EntityKeyValid = () => { + return { + any(node, { report, location }) { + if (isPlainObject(node) && "key" in node) { + const key = node.key; + if (typeof key !== "string") { + report({ + message: "Entity `key` must be a string.", + location: location.child(["key"]) + }); + return; + } + if (key.length < MIN_KEY_LENGTH) { + report({ + message: `Entity 'key' must be at least ${MIN_KEY_LENGTH} characters long.`, + location: location.child(["key"]) + }); + } + if (key.length > MAX_KEY_LENGTH) { + report({ + message: `Entity 'key' must not exceed ${MAX_KEY_LENGTH} characters.`, + location: location.child(["key"]) + }); + } + if (!validKeyPattern.test(key)) { + report({ + message: "Entity `key` must contain only lowercase letters, numbers, and hyphens, and cannot start or end with a hyphen.", + location: location.child(["key"]) + }); } - }); - 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_1.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 - }); + }; }; - return Schema; -}()); -exports.Schema = Schema; -//# sourceMappingURL=schema.js.map - -/***/ }), - -/***/ 11038: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var schema_1 = __nccwpck_require__(96488); -module.exports = new schema_1.Schema({ - include: [ - __nccwpck_require__(48168) - ] + } }); -//# sourceMappingURL=core.js.map -/***/ }), - -/***/ 75589: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var schema_1 = __nccwpck_require__(96488); -var schema = new schema_1.Schema({ - include: [ - __nccwpck_require__(28518) - ], - explicit: [ - __nccwpck_require__(32706), - __nccwpck_require__(57018) - ] -}); -schema_1.Schema.DEFAULT = schema; -module.exports = schema; -//# sourceMappingURL=default_full.js.map - -/***/ }), - -/***/ 28518: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var schema_1 = __nccwpck_require__(96488); -var schema = new schema_1.Schema({ - include: [ - __nccwpck_require__(11038) - ], - implicit: [ - __nccwpck_require__(34214), - __nccwpck_require__(38676) - ], - explicit: [ - __nccwpck_require__(27892), - __nccwpck_require__(2246), - __nccwpck_require__(2594), - __nccwpck_require__(66840) - ] -}); -module.exports = schema; -//# sourceMappingURL=default_safe.js.map - -/***/ }), - -/***/ 78651: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var schema_1 = __nccwpck_require__(96488); -module.exports = new schema_1.Schema({ - explicit: [ - __nccwpck_require__(75801), - __nccwpck_require__(25861), - __nccwpck_require__(17444) - ] -}); -//# sourceMappingURL=failsafe.js.map - -/***/ }), - -/***/ 48168: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var schema_1 = __nccwpck_require__(96488); -module.exports = new schema_1.Schema({ - include: [ - __nccwpck_require__(78651) - ], - implicit: [ - __nccwpck_require__(44322), - __nccwpck_require__(61242), - __nccwpck_require__(12739), - __nccwpck_require__(40056) - ] -}); -//# sourceMappingURL=json.js.map - -/***/ }), - -/***/ 34642: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var YAMLException = __nccwpck_require__(41629); -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 (null !== map) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style; - }); - }); - } - return result; +// node_modules/@redocly/openapi-core/lib/utils/scorecards.js +function transformEntityTypeName(subjectType, entityType) { + const capitalizedEntityType = entityType.split("-").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(""); + const specificType = capitalizedEntityType + subjectType; + if (Object.values(t).includes(specificType)) { + return specificType; + } + return subjectType; } -var Type = (function () { - function Type(tag, options) { - options = options || {}; - Object.keys(options).forEach(function (name) { - if (-1 === TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)) { - 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 (-1 === YAML_NODE_KINDS.indexOf(this.kind)) { - throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } +function transformScorecardRulesToAssertions(entityType, rules8) { + const assertionConfig = {}; + for (const [ruleKey, ruleValue] of Object.entries(rules8)) { + if (isAssertionRule(ruleKey, ruleValue)) { + if (ruleValue.severity === "off") { + continue; + } + assertionConfig[ruleKey] = { + ...buildAssertionWithNormalizedTypes(entityType, ruleKey, ruleValue) + }; + } else { + assertionConfig[ruleKey] = ruleValue; } - return Type; -}()); -exports.Type = Type; -//# sourceMappingURL=type.js.map - -/***/ }), - -/***/ 27892: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var NodeBuffer = (__nccwpck_require__(14300).Buffer); -var type_1 = __nccwpck_require__(34642); -var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; -function resolveYamlBinary(data) { - if (null === data) { - return false; + } + return assertionConfig; +} +function categorizeAssertions(assertionConfig) { + const entityRules = {}; + const apiRules = {}; + for (const [ruleKey, ruleValue] of Object.entries(assertionConfig)) { + if (isAssertionRule(ruleKey, ruleValue)) { + const assertion = ruleValue; + if (isEntityAssertion(assertion)) { + entityRules[ruleKey] = assertion; + } else { + apiRules[ruleKey] = assertion; + } + } else { + apiRules[ruleKey] = ruleValue; } - var code, idx, bitlen = 0, len = 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 { entityRules, apiRules }; +} +function findDataSchemaInDocument(schemaKey, schemaJson, document2) { + if (!isPlainObject(document2.parsed) || !isPlainObject(document2.parsed.components)) { + return null; + } + const components = document2.parsed.components; + const schemas = "schemas" in components ? components.schemas : void 0; + if (!schemas || !(schemaKey in schemas)) { + return null; + } + const foundSchema = schemas[schemaKey]; + try { + const expectedSchema = JSON.parse(schemaJson); + if (dequal(foundSchema, expectedSchema)) { + return foundSchema; } - return (bitlen % 8) === 0; + } catch { + return null; + } + return null; } -function constructYamlBinary(data) { - var code, 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) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } - bits = (bits << 6) | map.indexOf(input.charAt(idx)); +function isAssertionRule(ruleKey, ruleValue) { + return ruleKey.startsWith("rule/") && isPlainObject(ruleValue); +} +function isEntityAssertion(assertion) { + return Object.values(t).some((entityTypeName) => assertion.subject.type === entityTypeName); +} +function buildAssertionWithNormalizedTypes(entityType, ruleKey, rawAssertion) { + const transformedSubjectType = transformEntityTypeName(rawAssertion.subject.type, entityType); + const transformedWhere = rawAssertion.where?.map((whereClause) => ({ + ...whereClause, + subject: { + ...whereClause.subject, + type: transformEntityTypeName(whereClause.subject.type, entityType) } - tailbits = (max % 4) * 6; - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); + })); + return { + assertionId: ruleKey, + subject: { + ...rawAssertion.subject, + type: transformedSubjectType + }, + assertions: rawAssertion.assertions, + ...transformedWhere && { where: transformedWhere }, + ...rawAssertion.message && { message: rawAssertion.message }, + ...rawAssertion.severity && { severity: rawAssertion.severity } + }; +} +var init_scorecards = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/scorecards.js"() { + init_lib_esm(); + init_dequal(); + init_is_plain_object(); + } +}); + +// node_modules/@redocly/openapi-core/lib/lint-entity.js +async function lintEntityFile(opts) { + const { document: document2, entitySchema, entityDefaultSchema, severity, externalRefResolver = new BaseResolver(), assertionConfig = {} } = opts; + const ctx = { + problems: [], + specVersion: "entity", + // FIXME: this should be proper SpecVersion + visitorsData: {} + }; + const { entityTypes, discriminatorResolver } = createEntityTypes(entitySchema, entityDefaultSchema); + const types2 = normalizeTypes(entityTypes); + let rootType = types2.Entity; + if (Array.isArray(document2.parsed)) { + rootType = types2.EntityFileArray; + } else if (isPlainObject(document2.parsed)) { + const discriminatedPropertyValue = document2.parsed[ENTITY_DISCRIMINATOR_PROPERTY_NAME]; + if (!discriminatedPropertyValue) { + rootType = types2.Entity; + } else { + const discriminatedTypeName = discriminatorResolver?.(document2.parsed, discriminatedPropertyValue); + if (discriminatedTypeName && typeof discriminatedTypeName === "string" && types2[discriminatedTypeName]) { + rootType = types2[discriminatedTypeName]; + } } - else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF); - result.push((bits >> 2) & 0xFF); + } + const assertionVisitors = Assertions2(assertionConfig); + const flattenedAssertions = Array.isArray(assertionVisitors) ? assertionVisitors.map((visitor) => ({ + severity: severity || "error", + ruleId: "entity assertions", + visitor + })) : [ + { + severity: severity || "error", + ruleId: "entity assertions", + visitor: assertionVisitors } - else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF); + ]; + const rules8 = [ + { + severity: severity || "error", + ruleId: "entity struct", + visitor: Struct({ severity: "error" }) + }, + { + severity: severity || "error", + ruleId: "entity no-unresolved-refs", + visitor: NoUnresolvedRefs({ severity: "error" }) + }, + { + severity: severity || "error", + ruleId: "entity key-valid", + visitor: EntityKeyValid({ severity: "error" }) + }, + ...flattenedAssertions + ]; + const normalizedVisitors = normalizeVisitors(rules8, types2); + const resolvedRefMap = await resolveDocument({ + rootDocument: document2, + rootType, + externalRefResolver + }); + walkDocument({ + document: document2, + rootType, + normalizedVisitors, + resolvedRefMap, + ctx + }); + return ctx.problems; +} +async function lintEntityWithScorecardLevel(entity, scorecardLevel, document2) { + if (!scorecardLevel.rules) { + throw new Error(`Scorecard level "${scorecardLevel.name}" has no rules defined.`); + } + const externalRefResolver = new BaseResolver(); + const entityDocument = makeDocumentFromString(JSON.stringify(entity, null, 2), "entity"); + const discriminatorValue = entityDocument.parsed[ENTITY_DISCRIMINATOR_PROPERTY_NAME]; + const assertionConfig = transformScorecardRulesToAssertions(discriminatorValue || "unknown", scorecardLevel.rules); + const { entityRules, apiRules } = categorizeAssertions(assertionConfig); + const entityProblems = await lintEntityFile({ + document: entityDocument, + entitySchema: ci, + entityDefaultSchema: li, + externalRefResolver, + assertionConfig: entityRules + }); + if (ENTITY_TYPES_WITH_API_SUPPORT.includes(entity.type)) { + if (Object.keys(apiRules).length === 0) { + return entityProblems; } - if (NodeBuffer) { - return new NodeBuffer(result); + if (!document2) { + throw new Error(`Document is required for entity type "${entity.type}". Provide the source API document to lint API rules.`); } - 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) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; + if (entity.type === "data-schema" && entity.metadata?.schema) { + Object.values(apiRules).forEach((rule) => { + if (isPlainObject(rule) && isPlainObject(rule.subject) && rule.subject.type !== "Schema") { + throw new Error(`API rules for "data-schema" entity must target Schema subject, but found "${rule.subject.type}".`); } - bits = (bits << 8) + object[idx]; + }); + const schema2 = findDataSchemaInDocument(entity.title, entity.metadata.schema, document2); + if (!schema2) { + throw new Error(`Schema "${entity.title}" not found in the document. Ensure the schema exists in components.schemas.`); + } + const schemaProblems = await lintSchema({ + schema: schema2, + schemaKey: entity.title, + config: await createConfig({ + rules: apiRules + }), + specType: entity.metadata.specType, + sourceDocument: document2, + externalRefResolver + }); + return [...entityProblems, ...schemaProblems]; } - 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_1.Type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary + const apiProblems = await lintDocument({ + document: document2, + externalRefResolver, + config: await createConfig({ + rules: apiRules + }) + }); + return [...entityProblems, ...apiProblems]; + } else if (!isEmptyObject(apiRules)) { + throw new Error(`API rules are not supported for entity type "${entity.type}". Only ${ENTITY_TYPES_WITH_API_SUPPORT.join(", ")} support API rules.`); + } + return entityProblems; +} +async function lintSchema(opts) { + const { schema: schema2, schemaKey, config, sourceDocument, specType, externalRefResolver = new BaseResolver(config.resolve) } = opts; + const parsed = sourceDocument.parsed; + const specVersion = parsed[specType]; + const info = parsed.info; + const schemaDocument = makeDocumentFromString(JSON.stringify({ + [specType]: specVersion, + info, + components: { + schemas: { + [schemaKey]: schema2 + } + } + }, null, 2), sourceDocument?.source.absoluteRef || `schema:${schemaKey}`); + const problems = await lintDocument({ + document: schemaDocument, + config, + externalRefResolver + }); + return problems.filter((problem) => problem.location.some((loc) => loc.pointer?.includes(`/components/schemas/${schemaKey}`))); +} +var init_lint_entity = __esm({ + "node_modules/@redocly/openapi-core/lib/lint-entity.js"() { + init_lib_esm(); + init_config2(); + init_lint(); + init_resolve(); + init_entity_key_valid(); + init_assertions(); + init_no_unresolved_refs(); + init_struct(); + init_entity(); + init_types(); + init_is_empty_object(); + init_is_plain_object(); + init_scorecards(); + init_visitors(); + init_walk(); + } }); -//# sourceMappingURL=binary.js.map - -/***/ }), -/***/ 61242: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +// node_modules/@redocly/openapi-core/lib/utils/error.js +var HandledError; +var init_error = __esm({ + "node_modules/@redocly/openapi-core/lib/utils/error.js"() { + HandledError = class extends Error { + }; + } +}); -"use strict"; +// node_modules/@redocly/openapi-core/lib/index.js +var lib_exports = {}; +__export(lib_exports, { + Arazzo1Types: () => Arazzo1Types, + AsyncApi2Types: () => AsyncApi2Types, + AsyncApi3Types: () => AsyncApi3Types, + BaseResolver: () => BaseResolver, + CONFIG_BUNDLER_VISITOR_ID: () => CONFIG_BUNDLER_VISITOR_ID, + CONFIG_FILE_NAME: () => CONFIG_FILE_NAME, + Config: () => Config, + ConfigTypes: () => ConfigTypes, + ConfigValidationError: () => ConfigValidationError, + DEFAULT_CONFIG: () => DEFAULT_CONFIG, + DEFAULT_PROJECT_PLUGIN_PATHS: () => DEFAULT_PROJECT_PLUGIN_PATHS, + HandledError: () => HandledError, + IGNORE_BANNER: () => IGNORE_BANNER, + IGNORE_FILE: () => IGNORE_FILE, + Oas2Types: () => Oas2Types, + Oas3Types: () => Oas3Types, + Oas3_1Types: () => Oas3_1Types, + Oas3_2Types: () => Oas3_2Types, + OpenRpcTypes: () => OpenRpcTypes, + Overlay1Types: () => Overlay1Types, + PLUGINS_COLLECTOR_VISITOR_ID: () => PLUGINS_COLLECTOR_VISITOR_ID, + ResolveError: () => ResolveError, + Source: () => Source, + StatsAsync2: () => StatsAsync2, + StatsAsync3: () => StatsAsync3, + StatsOAS: () => StatsOAS, + YamlParseError: () => YamlParseError, + bundle: () => bundle, + bundleDocument: () => bundleDocument, + bundleFromString: () => bundleFromString, + clearPluginsCache: () => clearPluginsCache, + createConfig: () => createConfig, + createConfigTypes: () => createConfigTypes, + createEntityTypes: () => createEntityTypes, + dequal: () => dequal, + detectSpec: () => detectSpec, + doesYamlFileExist: () => doesYamlFileExist, + escapePointerFragment: () => escapePointerFragment, + findConfig: () => findConfig, + formatProblems: () => formatProblems, + getAstNodeByPointer: () => getAstNodeByPointer, + getCodeframe: () => getCodeframe, + getDir: () => getDir, + getLineColLocation: () => getLineColLocation, + getMajorSpecVersion: () => getMajorSpecVersion, + getPluginCacheVersion: () => getPluginCacheVersion, + getTotals: () => getTotals, + getTypes: () => getTypes, + isAbsoluteUrl: () => isAbsoluteUrl, + isBrowser: () => isBrowser, + isEmptyObject: () => isEmptyObject, + isMappingRef: () => isMappingRef, + isNotEmptyArray: () => isNotEmptyArray, + isNotEmptyObject: () => isNotEmptyObject, + isPlainObject: () => isPlainObject, + isRef: () => isRef, + isString: () => isString, + isTruthy: () => isTruthy, + keysOf: () => keysOf, + lint: () => lint, + lintConfig: () => lintConfig, + lintDocument: () => lintDocument, + lintEntityFile: () => lintEntityFile, + lintEntityWithScorecardLevel: () => lintEntityWithScorecardLevel, + lintFromString: () => lintFromString, + lintSchema: () => lintSchema, + loadConfig: () => loadConfig, + loadIgnoreConfig: () => loadIgnoreConfig, + logger: () => logger, + makeDocumentFromString: () => makeDocumentFromString, + mapTypeToComponent: () => mapTypeToComponent, + normalizeTypes: () => normalizeTypes, + normalizeVisitors: () => normalizeVisitors, + parseYaml: () => parseYaml, + pause: () => pause, + pluralize: () => pluralize, + readFileFromUrl: () => readFileFromUrl, + regexFromString: () => regexFromString, + resolveDocument: () => resolveDocument, + resolvePath: () => resolvePath, + resolvePlugins: () => resolvePlugins, + slash: () => slash, + stringifyYaml: () => stringifyYaml, + unescapePointerFragment: () => unescapePointerFragment, + validate: () => lint, + walkDocument: () => walkDocument, + xmlEscape: () => xmlEscape +}); +var init_lib = __esm({ + "node_modules/@redocly/openapi-core/lib/index.js"() { + init_does_yaml_file_exist(); + init_dequal(); + init_is_empty_object(); + init_is_not_empty_array(); + init_is_not_empty_object(); + init_is_plain_object(); + init_is_string(); + init_is_truthy(); + init_keys_of(); + init_pause(); + init_pluralize(); + init_read_file_from_url(); + init_slash(); + init_regex_from_string(); + init_oas2(); + init_oas3(); + init_oas3_1(); + init_oas3_2(); + init_asyncapi2(); + init_asyncapi3(); + init_arazzo(); + init_overlay(); + init_openrpc(); + init_redocly_yaml(); + init_entity(); + init_types(); + init_stats(); + init_config2(); + init_constants(); + init_resolve(); + init_yaml_parse_error(); + init_js_yaml2(); + init_ref_utils(); + init_detect_spec(); + init_oas_types(); + init_detect_spec(); + init_visitors(); + init_walk(); + init_codeframes(); + init_format(); + init_lint(); + init_lint_entity(); + init_bundle(); + init_bundle_document(); + init_bundle_visitor(); + init_logger(); + init_error(); + init_env(); + } +}); -'use strict'; -var type_1 = __nccwpck_require__(34642); -function resolveYamlBoolean(data) { - if (null === data) { - 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 Boolean]' === Object.prototype.toString.call(object); +// node_modules/@redocly/cli/lib/utils/error.js +function exitWithError(message) { + throw new HandledError(message); } -module.exports = new type_1.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' +var init_error2 = __esm({ + "node_modules/@redocly/cli/lib/utils/error.js"() { + init_lib(); + } }); -//# sourceMappingURL=bool.js.map - -/***/ }), - -/***/ 40056: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; - -var common = __nccwpck_require__(57195); -var type_1 = __nccwpck_require__(34642); -var YAML_FLOAT_PATTERN = new RegExp('^(?:[-+]?(?:[0-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 (null === data) { - return false; +// node_modules/glob/dist/esm/index.min.js +import { fileURLToPath as Wi } from "node:url"; +import { posix as mi, win32 as re2 } from "node:path"; +import { fileURLToPath as gi } from "node:url"; +import { lstatSync as wi, readdir as yi, readdirSync as bi, readlinkSync as Si, realpathSync as Ei } from "fs"; +import * as xi from "node:fs"; +import { lstat as Ci, readdir as Ti, readlink as Ai, realpath as ki } from "node:fs/promises"; +import { EventEmitter as ee2 } from "node:events"; +import Pe2 from "node:stream"; +import { StringDecoder as ni } from "node:string_decoder"; +function Ht2(n8) { + return isNaN(n8) ? n8.charCodeAt(0) : parseInt(n8, 10); +} +function ps(n8) { + return n8.replace(as, fe2).replace(ls, ue2).replace(cs, qt2).replace(fs7, de2).replace(us, pe2); +} +function ms(n8) { + return n8.replace(is, "\\").replace(rs, "{").replace(ns, "}").replace(os, ",").replace(hs, "."); +} +function me2(n8) { + if (!n8) return [""]; + let t2 = [], e2 = Gt2("{", "}", n8); + if (!e2) return n8.split(","); + let { pre: s2, body: i2, post: r2 } = e2, o = s2.split(","); + o[o.length - 1] += "{" + i2 + "}"; + let h = me2(r2); + return r2.length && (o[o.length - 1] += h.shift(), o.push.apply(o, h)), t2.push.apply(t2, o), t2; +} +function ge2(n8, t2 = {}) { + if (!n8) return []; + let { max: e2 = ds } = t2; + return n8.slice(0, 2) === "{}" && (n8 = "\\{\\}" + n8.slice(2)), ht2(ps(n8), e2, true).map(ms); +} +function gs(n8) { + return "{" + n8 + "}"; +} +function ws(n8) { + return /^-?0\d/.test(n8); +} +function ys(n8, t2) { + return n8 <= t2; +} +function bs(n8, t2) { + return n8 >= t2; +} +function ht2(n8, t2, e2) { + let s2 = [], i2 = Gt2("{", "}", n8); + if (!i2) return [n8]; + let r2 = i2.pre, o = i2.post.length ? ht2(i2.post, t2, false) : [""]; + if (/\$$/.test(i2.pre)) for (let h = 0; h < o.length && h < t2; h++) { + let a2 = r2 + "{" + i2.body + "}" + o[h]; + s2.push(a2); + } + else { + let h = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i2.body), a2 = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i2.body), l2 = h || a2, u2 = i2.body.indexOf(",") >= 0; + if (!l2 && !u2) return i2.post.match(/,(?!,).*\}/) ? (n8 = i2.pre + "{" + i2.body + qt2 + i2.post, ht2(n8, t2, true)) : [n8]; + let c2; + if (l2) c2 = i2.body.split(/\.\./); + else if (c2 = me2(i2.body), c2.length === 1 && c2[0] !== void 0 && (c2 = ht2(c2[0], t2, false).map(gs), c2.length === 1)) return o.map((f) => i2.pre + c2[0] + f); + let d; + if (l2 && c2[0] !== void 0 && c2[1] !== void 0) { + let f = Ht2(c2[0]), m = Ht2(c2[1]), p2 = Math.max(c2[0].length, c2[1].length), w2 = c2.length === 3 && c2[2] !== void 0 ? Math.abs(Ht2(c2[2])) : 1, g2 = ys; + m < f && (w2 *= -1, g2 = bs); + let E2 = c2.some(ws); + d = []; + for (let y2 = f; g2(y2, m); y2 += w2) { + let b2; + if (a2) b2 = String.fromCharCode(y2), b2 === "\\" && (b2 = ""); + else if (b2 = String(y2), E2) { + let z2 = p2 - b2.length; + if (z2 > 0) { + let $2 = new Array(z2 + 1).join("0"); + y2 < 0 ? b2 = "-" + $2 + b2.slice(1) : b2 = $2 + b2; + } + } + d.push(b2); + } + } else { + d = []; + for (let f = 0; f < c2.length; f++) d.push.apply(d, ht2(c2[f], t2, false)); } - var value, sign, base, digits; - if (!YAML_FLOAT_PATTERN.test(data)) { - return false; + for (let f = 0; f < d.length; f++) for (let m = 0; m < o.length && s2.length < t2; m++) { + let p2 = r2 + d[f] + o[m]; + (!e2 || l2 || p2) && s2.push(p2); } - return true; + } + return s2; } -function constructYamlFloat(data) { - var value, sign, base, digits; - value = data.replace(/_/g, '').toLowerCase(); - sign = '-' === value[0] ? -1 : 1; - digits = []; - if (0 <= '+-'.indexOf(value[0])) { - value = value.slice(1); - } - if ('.inf' === value) { - return (1 === sign) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - } - else if ('.nan' === value) { - return NaN; - } - else if (0 <= value.indexOf(':')) { - 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); +function Bt2(n8, t2 = {}) { + return new I2(n8, t2).streamSync(); } -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'; - } - return object.toString(10); +function Qe2(n8, t2 = {}) { + return new I2(n8, t2).stream(); } -function isFloat(object) { - return ('[object Number]' === Object.prototype.toString.call(object)) && - (0 !== object % 1 || common.isNegativeZero(object)); +function ts(n8, t2 = {}) { + return new I2(n8, t2).walkSync(); } -module.exports = new type_1.Type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' -}); -//# sourceMappingURL=float.js.map - -/***/ }), - -/***/ 12739: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var common = __nccwpck_require__(57195); -var type_1 = __nccwpck_require__(34642); -function isHexCode(c) { - return ((0x30 <= c) && (c <= 0x39)) || - ((0x41 <= c) && (c <= 0x46)) || - ((0x61 <= c) && (c <= 0x66)); +async function Je2(n8, t2 = {}) { + return new I2(n8, t2).walk(); } -function isOctCode(c) { - return ((0x30 <= c) && (c <= 0x37)); +function Ut2(n8, t2 = {}) { + return new I2(n8, t2).iterateSync(); } -function isDecCode(c) { - return ((0x30 <= c) && (c <= 0x39)); +function es(n8, t2 = {}) { + return new I2(n8, t2).iterate(); } -function resolveYamlInteger(data) { - if (null === data) { - 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; +var Gt2, ce2, ss, fe2, ue2, qt2, de2, pe2, is, rs, ns, os, hs, as, ls, cs, fs7, us, ds, at2, Ss, lt2, Es, we2, ye2, W2, xs, be2, vs, Ct2, Cs, Ts, As, ks, Kt2, Se2, Ee2, Q2, tt2, O2, Rs, Os, Fs, Ds, Ms, Ns, _s, Ls, Ws, Ps, js, Is, zs, Bs, Us, $s, Gs, Hs, Ce2, Te2, Ae2, xe2, qs, A2, Ks, Vs, Ys, Xs, Js, N2, Zs, ke2, Qs, ti, ve2, ei, D2, si, Oe2, Vt2, Fe2, At2, Re2, ii, q2, De2, Tt2, ri, ft2, Ne2, oi, hi, ai, G2, H2, K2, kt2, ut2, Rt2, _e2, Ot2, Le2, P2, et2, v2, dt2, st2, C2, F2, T2, Yt2, Ft2, k2, x2, Xt2, Jt2, We2, Zt2, B2, Qt2, Dt2, pt2, Y2, M2, mt2, li2, ci2, fi, ui, Mt2, te2, di, pi, V2, vi, wt2, Ue2, $e2, Ri, Oi, L2, Ge2, He2, U2, qe2, Ke2, X2, Ve2, _4, gt2, se2, je2, yt2, j2, Nt2, Lt2, Ie2, Fi, ie2, ze2, bt2, Be2, _t2, Wt2, ne2, Ye2, R2, Pt2, jt2, It2, it2, rt2, St2, Cr2, Xe2, Di, Mi, Ni, nt2, _i, ot2, oe, he2, ae2, Et2, Li, zt2, xt2, vt2, Pi, I2, le2, ji, Ii, zi, Bi, Ui, Ze2; +var init_index_min = __esm({ + "node_modules/glob/dist/esm/index.min.js"() { + Gt2 = (n8, t2, e2) => { + let s2 = n8 instanceof RegExp ? ce2(n8, e2) : n8, i2 = t2 instanceof RegExp ? ce2(t2, e2) : t2, r2 = s2 !== null && i2 != null && ss(s2, i2, e2); + return r2 && { start: r2[0], end: r2[1], pre: e2.slice(0, r2[0]), body: e2.slice(r2[0] + s2.length, r2[1]), post: e2.slice(r2[1] + i2.length) }; + }; + ce2 = (n8, t2) => { + let e2 = t2.match(n8); + return e2 ? e2[0] : null; + }; + ss = (n8, t2, e2) => { + let s2, i2, r2, o, h, a2 = e2.indexOf(n8), l2 = e2.indexOf(t2, a2 + 1), u2 = a2; + if (a2 >= 0 && l2 > 0) { + if (n8 === t2) return [a2, l2]; + for (s2 = [], r2 = e2.length; u2 >= 0 && !h; ) { + if (u2 === a2) s2.push(u2), a2 = e2.indexOf(n8, u2 + 1); + else if (s2.length === 1) { + let c2 = s2.pop(); + c2 !== void 0 && (h = [c2, l2]); + } else i2 = s2.pop(), i2 !== void 0 && i2 < r2 && (r2 = i2, o = l2), l2 = e2.indexOf(t2, u2 + 1); + u2 = a2 < l2 && a2 >= 0 ? a2 : l2; + } + s2.length && o !== void 0 && (h = [r2, o]); + } + return h; + }; + fe2 = "\0SLASH" + Math.random() + "\0"; + ue2 = "\0OPEN" + Math.random() + "\0"; + qt2 = "\0CLOSE" + Math.random() + "\0"; + de2 = "\0COMMA" + Math.random() + "\0"; + pe2 = "\0PERIOD" + Math.random() + "\0"; + is = new RegExp(fe2, "g"); + rs = new RegExp(ue2, "g"); + ns = new RegExp(qt2, "g"); + os = new RegExp(de2, "g"); + hs = new RegExp(pe2, "g"); + as = /\\\\/g; + ls = /\\{/g; + cs = /\\}/g; + fs7 = /\\,/g; + us = /\\./g; + ds = 1e5; + at2 = (n8) => { + if (typeof n8 != "string") throw new TypeError("invalid pattern"); + if (n8.length > 65536) throw new TypeError("pattern is too long"); + }; + Ss = { "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true], "[:alpha:]": ["\\p{L}\\p{Nl}", true], "[:ascii:]": ["\\x00-\\x7f", false], "[:blank:]": ["\\p{Zs}\\t", true], "[:cntrl:]": ["\\p{Cc}", true], "[:digit:]": ["\\p{Nd}", true], "[:graph:]": ["\\p{Z}\\p{C}", true, true], "[:lower:]": ["\\p{Ll}", true], "[:print:]": ["\\p{C}", true], "[:punct:]": ["\\p{P}", true], "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true], "[:upper:]": ["\\p{Lu}", true], "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true], "[:xdigit:]": ["A-Fa-f0-9", false] }; + lt2 = (n8) => n8.replace(/[[\]\\-]/g, "\\$&"); + Es = (n8) => n8.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + we2 = (n8) => n8.join(""); + ye2 = (n8, t2) => { + let e2 = t2; + if (n8.charAt(e2) !== "[") throw new Error("not in a brace expression"); + let s2 = [], i2 = [], r2 = e2 + 1, o = false, h = false, a2 = false, l2 = false, u2 = e2, c2 = ""; + t: for (; r2 < n8.length; ) { + let p2 = n8.charAt(r2); + if ((p2 === "!" || p2 === "^") && r2 === e2 + 1) { + l2 = true, r2++; + continue; + } + if (p2 === "]" && o && !a2) { + u2 = r2 + 1; + break; } - 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; + if (o = true, p2 === "\\" && !a2) { + a2 = true, r2++; + continue; } - 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; + if (p2 === "[" && !a2) { + for (let [w2, [g2, S2, E2]] of Object.entries(Ss)) if (n8.startsWith(w2, r2)) { + if (c2) return ["$.", false, n8.length - e2, true]; + r2 += w2.length, E2 ? i2.push(g2) : s2.push(g2), h = h || S2; + continue t; + } } - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') { - continue; - } - if (!isOctCode(data.charCodeAt(index))) { - return false; - } - hasDigits = true; + if (a2 = false, c2) { + p2 > c2 ? s2.push(lt2(c2) + "-" + lt2(p2)) : p2 === c2 && s2.push(lt2(p2)), c2 = "", r2++; + continue; } - return hasDigits; - } - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') { - continue; + if (n8.startsWith("-]", r2 + 1)) { + s2.push(lt2(p2 + "-")), r2 += 2; + continue; } - if (ch === ':') { - break; + if (n8.startsWith("-", r2 + 1)) { + c2 = p2, r2 += 2; + continue; } - if (!isDecCode(data.charCodeAt(index))) { - return false; + s2.push(lt2(p2)), r2++; + } + if (u2 < r2) return ["", false, 0, false]; + if (!s2.length && !i2.length) return ["$.", false, n8.length - e2, true]; + if (i2.length === 0 && s2.length === 1 && /^\\?.$/.test(s2[0]) && !l2) { + let p2 = s2[0].length === 2 ? s2[0].slice(-1) : s2[0]; + return [Es(p2), false, u2 - e2, false]; + } + let d = "[" + (l2 ? "^" : "") + we2(s2) + "]", f = "[" + (l2 ? "" : "^") + we2(i2) + "]"; + return [s2.length && i2.length ? "(" + d + "|" + f + ")" : s2.length ? d : f, h, u2 - e2, true]; + }; + W2 = (n8, { windowsPathsNoEscape: t2 = false, magicalBraces: e2 = true } = {}) => e2 ? t2 ? n8.replace(/\[([^\/\\])\]/g, "$1") : n8.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1") : t2 ? n8.replace(/\[([^\/\\{}])\]/g, "$1") : n8.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1"); + xs = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]); + be2 = (n8) => xs.has(n8); + vs = "(?!(?:^|/)\\.\\.?(?:$|/))"; + Ct2 = "(?!\\.)"; + Cs = /* @__PURE__ */ new Set(["[", "."]); + Ts = /* @__PURE__ */ new Set(["..", "."]); + As = new Set("().*{}+?[]^$\\!"); + ks = (n8) => n8.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + Kt2 = "[^/]"; + Se2 = Kt2 + "*?"; + Ee2 = Kt2 + "+?"; + Q2 = class n2 { + type; + #t; + #s; + #n = false; + #r = []; + #o; + #S; + #w; + #c = false; + #h; + #u; + #f = false; + constructor(t2, e2, s2 = {}) { + this.type = t2, t2 && (this.#s = true), this.#o = e2, this.#t = this.#o ? this.#o.#t : this, this.#h = this.#t === this ? s2 : this.#t.#h, this.#w = this.#t === this ? [] : this.#t.#w, t2 === "!" && !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 t2 of this.#r) if (typeof t2 != "string" && (t2.type || t2.hasMagic)) return this.#s = true; + return this.#s; + } + toString() { + return this.#u !== void 0 ? this.#u : this.type ? this.#u = this.type + "(" + this.#r.map((t2) => String(t2)).join("|") + ")" : this.#u = this.#r.map((t2) => String(t2)).join(""); + } + #a() { + if (this !== this.#t) throw new Error("should only call on root"); + if (this.#c) return this; + this.toString(), this.#c = true; + let t2; + for (; t2 = this.#w.pop(); ) { + if (t2.type !== "!") continue; + let e2 = t2, s2 = e2.#o; + for (; s2; ) { + for (let i2 = e2.#S + 1; !s2.type && i2 < s2.#r.length; i2++) for (let r2 of t2.#r) { + if (typeof r2 == "string") throw new Error("string part in extglob AST??"); + r2.copyIn(s2.#r[i2]); + } + e2 = s2, s2 = e2.#o; + } + } + return this; + } + push(...t2) { + for (let e2 of t2) if (e2 !== "") { + if (typeof e2 != "string" && !(e2 instanceof n2 && e2.#o === this)) throw new Error("invalid part: " + e2); + this.#r.push(e2); + } + } + toJSON() { + let t2 = this.type === null ? this.#r.slice().map((e2) => typeof e2 == "string" ? e2 : e2.toJSON()) : [this.type, ...this.#r.map((e2) => e2.toJSON())]; + return this.isStart() && !this.type && t2.unshift([]), this.isEnd() && (this === this.#t || this.#t.#c && this.#o?.type === "!") && t2.push({}), t2; + } + isStart() { + if (this.#t === this) return true; + if (!this.#o?.isStart()) return false; + if (this.#S === 0) return true; + let t2 = this.#o; + for (let e2 = 0; e2 < this.#S; e2++) { + let s2 = t2.#r[e2]; + if (!(s2 instanceof n2 && s2.type === "!")) return false; } - hasDigits = true; - } - if (!hasDigits) { - 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; + } + isEnd() { + if (this.#t === this || this.#o?.type === "!") return true; + if (!this.#o?.isEnd()) return false; + if (!this.type) return this.#o?.isEnd(); + let t2 = this.#o ? this.#o.#r.length : 0; + return this.#S === t2 - 1; + } + copyIn(t2) { + typeof t2 == "string" ? this.push(t2) : this.push(t2.clone(this)); + } + clone(t2) { + let e2 = new n2(this.type, t2); + for (let s2 of this.#r) e2.copyIn(s2); + return e2; + } + static #i(t2, e2, s2, i2) { + let r2 = false, o = false, h = -1, a2 = false; + if (e2.type === null) { + let f = s2, m = ""; + for (; f < t2.length; ) { + let p2 = t2.charAt(f++); + if (r2 || p2 === "\\") { + r2 = !r2, m += p2; + continue; + } + if (o) { + f === h + 1 ? (p2 === "^" || p2 === "!") && (a2 = true) : p2 === "]" && !(f === h + 2 && a2) && (o = false), m += p2; + continue; + } else if (p2 === "[") { + o = true, h = f, a2 = false, m += p2; + continue; + } + if (!i2.noext && be2(p2) && t2.charAt(f) === "(") { + e2.push(m), m = ""; + let w2 = new n2(p2, e2); + f = n2.#i(t2, w2, f, i2), e2.push(w2); + continue; + } + m += p2; + } + return e2.push(m), f; } - value = value.slice(1); - ch = value[0]; - } - if ('0' === value) { - return 0; - } - if (ch === '0') { - if (value[1] === 'b') { - return sign * parseInt(value.slice(2), 2); + let l2 = s2 + 1, u2 = new n2(null, e2), c2 = [], d = ""; + for (; l2 < t2.length; ) { + let f = t2.charAt(l2++); + if (r2 || f === "\\") { + r2 = !r2, d += f; + continue; + } + if (o) { + l2 === h + 1 ? (f === "^" || f === "!") && (a2 = true) : f === "]" && !(l2 === h + 2 && a2) && (o = false), d += f; + continue; + } else if (f === "[") { + o = true, h = l2, a2 = false, d += f; + continue; + } + if (be2(f) && t2.charAt(l2) === "(") { + u2.push(d), d = ""; + let m = new n2(f, u2); + u2.push(m), l2 = n2.#i(t2, m, l2, i2); + continue; + } + if (f === "|") { + u2.push(d), d = "", c2.push(u2), u2 = new n2(null, e2); + continue; + } + if (f === ")") return d === "" && e2.#r.length === 0 && (e2.#f = true), u2.push(d), d = "", e2.push(...c2, u2), l2; + d += f; + } + return e2.type = null, e2.#s = void 0, e2.#r = [t2.substring(s2 - 1)], l2; + } + static fromGlob(t2, e2 = {}) { + let s2 = new n2(null, void 0, e2); + return n2.#i(t2, s2, 0, e2), s2; + } + toMMPattern() { + if (this !== this.#t) return this.#t.toMMPattern(); + let t2 = this.toString(), [e2, s2, i2, r2] = this.toRegExpSource(); + if (!(i2 || this.#s || this.#h.nocase && !this.#h.nocaseMagicOnly && t2.toUpperCase() !== t2.toLowerCase())) return s2; + let h = (this.#h.nocase ? "i" : "") + (r2 ? "u" : ""); + return Object.assign(new RegExp(`^${e2}$`, h), { _src: e2, _glob: t2 }); + } + get options() { + return this.#h; + } + toRegExpSource(t2) { + let e2 = t2 ?? !!this.#h.dot; + if (this.#t === this && this.#a(), !this.type) { + let a2 = this.isStart() && this.isEnd() && !this.#r.some((f) => typeof f != "string"), l2 = this.#r.map((f) => { + let [m, p2, w2, g2] = typeof f == "string" ? n2.#E(f, this.#s, a2) : f.toRegExpSource(t2); + return this.#s = this.#s || w2, this.#n = this.#n || g2, m; + }).join(""), u2 = ""; + if (this.isStart() && typeof this.#r[0] == "string" && !(this.#r.length === 1 && Ts.has(this.#r[0]))) { + let m = Cs, p2 = e2 && m.has(l2.charAt(0)) || l2.startsWith("\\.") && m.has(l2.charAt(2)) || l2.startsWith("\\.\\.") && m.has(l2.charAt(4)), w2 = !e2 && !t2 && m.has(l2.charAt(0)); + u2 = p2 ? vs : w2 ? Ct2 : ""; + } + let c2 = ""; + return this.isEnd() && this.#t.#c && this.#o?.type === "!" && (c2 = "(?:$|\\/)"), [u2 + l2 + c2, W2(l2), this.#s = !!this.#s, this.#n]; + } + let s2 = this.type === "*" || this.type === "+", i2 = this.type === "!" ? "(?:(?!(?:" : "(?:", r2 = this.#d(e2); + if (this.isStart() && this.isEnd() && !r2 && this.type !== "!") { + let a2 = this.toString(); + return this.#r = [a2], this.type = null, this.#s = void 0, [a2, W2(this.toString()), false, false]; + } + let o = !s2 || t2 || e2 || !Ct2 ? "" : this.#d(true); + o === r2 && (o = ""), o && (r2 = `(?:${r2})(?:${o})*?`); + let h = ""; + if (this.type === "!" && this.#f) h = (this.isStart() && !e2 ? Ct2 : "") + Ee2; + else { + let a2 = this.type === "!" ? "))" + (this.isStart() && !e2 && !t2 ? Ct2 : "") + Se2 + ")" : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && o ? ")" : this.type === "*" && o ? ")?" : `)${this.type}`; + h = i2 + r2 + a2; + } + return [h, W2(r2), this.#s = !!this.#s, this.#n]; + } + #d(t2) { + return this.#r.map((e2) => { + if (typeof e2 == "string") throw new Error("string type in extglob ast??"); + let [s2, i2, r2, o] = e2.toRegExpSource(t2); + return this.#n = this.#n || o, s2; + }).filter((e2) => !(this.isStart() && this.isEnd()) || !!e2).join("|"); + } + static #E(t2, e2, s2 = false) { + let i2 = false, r2 = "", o = false, h = false; + for (let a2 = 0; a2 < t2.length; a2++) { + let l2 = t2.charAt(a2); + if (i2) { + i2 = false, r2 += (As.has(l2) ? "\\" : "") + l2; + continue; + } + if (l2 === "*") { + if (h) continue; + h = true, r2 += s2 && /^[*]+$/.test(t2) ? Ee2 : Se2, e2 = true; + continue; + } else h = false; + if (l2 === "\\") { + a2 === t2.length - 1 ? r2 += "\\\\" : i2 = true; + continue; + } + if (l2 === "[") { + let [u2, c2, d, f] = ye2(t2, a2); + if (d) { + r2 += u2, o = o || c2, a2 += d - 1, e2 = e2 || f; + continue; + } + } + if (l2 === "?") { + r2 += Kt2, e2 = true; + continue; + } + r2 += ks(l2); } - if (value[1] === 'x') { - return sign * parseInt(value, 16); + return [r2, W2(t2), !!e2, o]; + } + }; + tt2 = (n8, { windowsPathsNoEscape: t2 = false, magicalBraces: e2 = false } = {}) => e2 ? t2 ? n8.replace(/[?*()[\]{}]/g, "[$&]") : n8.replace(/[?*()[\]\\{}]/g, "\\$&") : t2 ? n8.replace(/[?*()[\]]/g, "[$&]") : n8.replace(/[?*()[\]\\]/g, "\\$&"); + O2 = (n8, t2, e2 = {}) => (at2(t2), !e2.nocomment && t2.charAt(0) === "#" ? false : new D2(t2, e2).match(n8)); + Rs = /^\*+([^+@!?\*\[\(]*)$/; + Os = (n8) => (t2) => !t2.startsWith(".") && t2.endsWith(n8); + Fs = (n8) => (t2) => t2.endsWith(n8); + Ds = (n8) => (n8 = n8.toLowerCase(), (t2) => !t2.startsWith(".") && t2.toLowerCase().endsWith(n8)); + Ms = (n8) => (n8 = n8.toLowerCase(), (t2) => t2.toLowerCase().endsWith(n8)); + Ns = /^\*+\.\*+$/; + _s = (n8) => !n8.startsWith(".") && n8.includes("."); + Ls = (n8) => n8 !== "." && n8 !== ".." && n8.includes("."); + Ws = /^\.\*+$/; + Ps = (n8) => n8 !== "." && n8 !== ".." && n8.startsWith("."); + js = /^\*+$/; + Is = (n8) => n8.length !== 0 && !n8.startsWith("."); + zs = (n8) => n8.length !== 0 && n8 !== "." && n8 !== ".."; + Bs = /^\?+([^+@!?\*\[\(]*)?$/; + Us = ([n8, t2 = ""]) => { + let e2 = Ce2([n8]); + return t2 ? (t2 = t2.toLowerCase(), (s2) => e2(s2) && s2.toLowerCase().endsWith(t2)) : e2; + }; + $s = ([n8, t2 = ""]) => { + let e2 = Te2([n8]); + return t2 ? (t2 = t2.toLowerCase(), (s2) => e2(s2) && s2.toLowerCase().endsWith(t2)) : e2; + }; + Gs = ([n8, t2 = ""]) => { + let e2 = Te2([n8]); + return t2 ? (s2) => e2(s2) && s2.endsWith(t2) : e2; + }; + Hs = ([n8, t2 = ""]) => { + let e2 = Ce2([n8]); + return t2 ? (s2) => e2(s2) && s2.endsWith(t2) : e2; + }; + Ce2 = ([n8]) => { + let t2 = n8.length; + return (e2) => e2.length === t2 && !e2.startsWith("."); + }; + Te2 = ([n8]) => { + let t2 = n8.length; + return (e2) => e2.length === t2 && e2 !== "." && e2 !== ".."; + }; + Ae2 = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix"; + xe2 = { win32: { sep: "\\" }, posix: { sep: "/" } }; + qs = Ae2 === "win32" ? xe2.win32.sep : xe2.posix.sep; + O2.sep = qs; + A2 = /* @__PURE__ */ Symbol("globstar **"); + O2.GLOBSTAR = A2; + Ks = "[^/]"; + Vs = Ks + "*?"; + Ys = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + Xs = "(?:(?!(?:\\/|^)\\.).)*?"; + Js = (n8, t2 = {}) => (e2) => O2(e2, n8, t2); + O2.filter = Js; + N2 = (n8, t2 = {}) => Object.assign({}, n8, t2); + Zs = (n8) => { + if (!n8 || typeof n8 != "object" || !Object.keys(n8).length) return O2; + let t2 = O2; + return Object.assign((s2, i2, r2 = {}) => t2(s2, i2, N2(n8, r2)), { Minimatch: class extends t2.Minimatch { + constructor(i2, r2 = {}) { + super(i2, N2(n8, r2)); + } + static defaults(i2) { + return t2.defaults(N2(n8, i2)).Minimatch; + } + }, AST: class extends t2.AST { + constructor(i2, r2, o = {}) { + super(i2, r2, N2(n8, o)); + } + static fromGlob(i2, r2 = {}) { + return t2.AST.fromGlob(i2, N2(n8, r2)); + } + }, unescape: (s2, i2 = {}) => t2.unescape(s2, N2(n8, i2)), escape: (s2, i2 = {}) => t2.escape(s2, N2(n8, i2)), filter: (s2, i2 = {}) => t2.filter(s2, N2(n8, i2)), defaults: (s2) => t2.defaults(N2(n8, s2)), makeRe: (s2, i2 = {}) => t2.makeRe(s2, N2(n8, i2)), braceExpand: (s2, i2 = {}) => t2.braceExpand(s2, N2(n8, i2)), match: (s2, i2, r2 = {}) => t2.match(s2, i2, N2(n8, r2)), sep: t2.sep, GLOBSTAR: A2 }); + }; + O2.defaults = Zs; + ke2 = (n8, t2 = {}) => (at2(n8), t2.nobrace || !/\{(?:(?!\{).)*\}/.test(n8) ? [n8] : ge2(n8, { max: t2.braceExpandMax })); + O2.braceExpand = ke2; + Qs = (n8, t2 = {}) => new D2(n8, t2).makeRe(); + O2.makeRe = Qs; + ti = (n8, t2, e2 = {}) => { + let s2 = new D2(t2, e2); + return n8 = n8.filter((i2) => s2.match(i2)), s2.options.nonull && !n8.length && n8.push(t2), n8; + }; + O2.match = ti; + ve2 = /[?*]|[+@!]\(.*?\)|\[|\]/; + ei = (n8) => n8.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + D2 = class { + options; + set; + pattern; + windowsPathsNoEscape; + nonegate; + negate; + comment; + empty; + preserveMultipleSlashes; + partial; + globSet; + globParts; + nocase; + isWindows; + platform; + windowsNoMagicRoot; + regexp; + constructor(t2, e2 = {}) { + at2(t2), e2 = e2 || {}, this.options = e2, this.pattern = t2, this.platform = e2.platform || Ae2, this.isWindows = this.platform === "win32"; + let s2 = "allowWindowsEscape"; + this.windowsPathsNoEscape = !!e2.windowsPathsNoEscape || e2[s2] === false, this.windowsPathsNoEscape && (this.pattern = this.pattern.replace(/\\/g, "/")), this.preserveMultipleSlashes = !!e2.preserveMultipleSlashes, this.regexp = null, this.negate = false, this.nonegate = !!e2.nonegate, this.comment = false, this.empty = false, this.partial = !!e2.partial, this.nocase = !!this.options.nocase, this.windowsNoMagicRoot = e2.windowsNoMagicRoot !== void 0 ? e2.windowsNoMagicRoot : !!(this.isWindows && this.nocase), this.globSet = [], this.globParts = [], this.set = [], this.make(); + } + hasMagic() { + if (this.options.magicalBraces && this.set.length > 1) return true; + for (let t2 of this.set) for (let e2 of t2) if (typeof e2 != "string") return true; + return false; + } + debug(...t2) { + } + make() { + let t2 = this.pattern, e2 = this.options; + if (!e2.nocomment && t2.charAt(0) === "#") { + this.comment = true; + return; } - return sign * parseInt(value, 8); - } - if (value.indexOf(':') !== -1) { - value.split(':').forEach(function (v) { - digits.unshift(parseInt(v, 10)); + if (!t2) { + this.empty = true; + return; + } + this.parseNegate(), this.globSet = [...new Set(this.braceExpand())], e2.debug && (this.debug = (...r2) => console.error(...r2)), this.debug(this.pattern, this.globSet); + let s2 = this.globSet.map((r2) => this.slashSplit(r2)); + this.globParts = this.preprocess(s2), this.debug(this.pattern, this.globParts); + let i2 = this.globParts.map((r2, o, h) => { + if (this.isWindows && this.windowsNoMagicRoot) { + let a2 = r2[0] === "" && r2[1] === "" && (r2[2] === "?" || !ve2.test(r2[2])) && !ve2.test(r2[3]), l2 = /^[a-z]:/i.test(r2[0]); + if (a2) return [...r2.slice(0, 4), ...r2.slice(4).map((u2) => this.parse(u2))]; + if (l2) return [r2[0], ...r2.slice(1).map((u2) => this.parse(u2))]; + } + return r2.map((a2) => this.parse(a2)); }); - value = 0; - base = 1; - digits.forEach(function (d) { - value += (d * base); - base *= 60; + if (this.debug(this.pattern, i2), this.set = i2.filter((r2) => r2.indexOf(false) === -1), this.isWindows) for (let r2 = 0; r2 < this.set.length; r2++) { + let o = this.set[r2]; + o[0] === "" && o[1] === "" && this.globParts[r2][2] === "?" && typeof o[3] == "string" && /^[a-z]:$/i.test(o[3]) && (o[2] = "?"); + } + this.debug(this.pattern, this.set); + } + preprocess(t2) { + if (this.options.noglobstar) for (let s2 = 0; s2 < t2.length; s2++) for (let i2 = 0; i2 < t2[s2].length; i2++) t2[s2][i2] === "**" && (t2[s2][i2] = "*"); + let { optimizationLevel: e2 = 1 } = this.options; + return e2 >= 2 ? (t2 = this.firstPhasePreProcess(t2), t2 = this.secondPhasePreProcess(t2)) : e2 >= 1 ? t2 = this.levelOneOptimize(t2) : t2 = this.adjascentGlobstarOptimize(t2), t2; + } + adjascentGlobstarOptimize(t2) { + return t2.map((e2) => { + let s2 = -1; + for (; (s2 = e2.indexOf("**", s2 + 1)) !== -1; ) { + let i2 = s2; + for (; e2[i2 + 1] === "**"; ) i2++; + i2 !== s2 && e2.splice(s2, i2 - s2); + } + return e2; }); - return sign * value; - } - return sign * parseInt(value, 10); -} -function isInteger(object) { - return ('[object Number]' === Object.prototype.toString.call(object)) && - (0 === object % 1 && !common.isNegativeZero(object)); -} -module.exports = new type_1.Type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (object) { return '0b' + object.toString(2); }, - octal: function (object) { return '0' + object.toString(8); }, - decimal: function (object) { return object.toString(10); }, - hexadecimal: function (object) { return '0x' + object.toString(16).toUpperCase(); } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [2, 'bin'], - octal: [8, 'oct'], - decimal: [10, 'dec'], - hexadecimal: [16, 'hex'] - } -}); -//# sourceMappingURL=int.js.map - -/***/ }), - -/***/ 57018: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var type_1 = __nccwpck_require__(34642); -function resolveJavascriptRegExp(data) { - if (null === data) { - return false; - } - if (0 === data.length) { - return false; + } + levelOneOptimize(t2) { + return t2.map((e2) => (e2 = e2.reduce((s2, i2) => { + let r2 = s2[s2.length - 1]; + return i2 === "**" && r2 === "**" ? s2 : i2 === ".." && r2 && r2 !== ".." && r2 !== "." && r2 !== "**" ? (s2.pop(), s2) : (s2.push(i2), s2); + }, []), e2.length === 0 ? [""] : e2)); + } + levelTwoFileOptimize(t2) { + Array.isArray(t2) || (t2 = this.slashSplit(t2)); + let e2 = false; + do { + if (e2 = false, !this.preserveMultipleSlashes) { + for (let i2 = 1; i2 < t2.length - 1; i2++) { + let r2 = t2[i2]; + i2 === 1 && r2 === "" && t2[0] === "" || (r2 === "." || r2 === "") && (e2 = true, t2.splice(i2, 1), i2--); + } + t2[0] === "." && t2.length === 2 && (t2[1] === "." || t2[1] === "") && (e2 = true, t2.pop()); + } + let s2 = 0; + for (; (s2 = t2.indexOf("..", s2 + 1)) !== -1; ) { + let i2 = t2[s2 - 1]; + i2 && i2 !== "." && i2 !== ".." && i2 !== "**" && (e2 = true, t2.splice(s2 - 1, 2), s2 -= 2); + } + } while (e2); + return t2.length === 0 ? [""] : t2; + } + firstPhasePreProcess(t2) { + let e2 = false; + do { + e2 = false; + for (let s2 of t2) { + let i2 = -1; + for (; (i2 = s2.indexOf("**", i2 + 1)) !== -1; ) { + let o = i2; + for (; s2[o + 1] === "**"; ) o++; + o > i2 && s2.splice(i2 + 1, o - i2); + let h = s2[i2 + 1], a2 = s2[i2 + 2], l2 = s2[i2 + 3]; + if (h !== ".." || !a2 || a2 === "." || a2 === ".." || !l2 || l2 === "." || l2 === "..") continue; + e2 = true, s2.splice(i2, 1); + let u2 = s2.slice(0); + u2[i2] = "**", t2.push(u2), i2--; + } + if (!this.preserveMultipleSlashes) { + for (let o = 1; o < s2.length - 1; o++) { + let h = s2[o]; + o === 1 && h === "" && s2[0] === "" || (h === "." || h === "") && (e2 = true, s2.splice(o, 1), o--); + } + s2[0] === "." && s2.length === 2 && (s2[1] === "." || s2[1] === "") && (e2 = true, s2.pop()); + } + let r2 = 0; + for (; (r2 = s2.indexOf("..", r2 + 1)) !== -1; ) { + let o = s2[r2 - 1]; + if (o && o !== "." && o !== ".." && o !== "**") { + e2 = true; + let a2 = r2 === 1 && s2[r2 + 1] === "**" ? ["."] : []; + s2.splice(r2 - 1, 2, ...a2), s2.length === 0 && s2.push(""), r2 -= 2; + } + } + } + } while (e2); + return t2; + } + secondPhasePreProcess(t2) { + for (let e2 = 0; e2 < t2.length - 1; e2++) for (let s2 = e2 + 1; s2 < t2.length; s2++) { + let i2 = this.partsMatch(t2[e2], t2[s2], !this.preserveMultipleSlashes); + if (i2) { + t2[e2] = [], t2[s2] = i2; + break; + } + } + return t2.filter((e2) => e2.length); + } + partsMatch(t2, e2, s2 = false) { + let i2 = 0, r2 = 0, o = [], h = ""; + for (; i2 < t2.length && r2 < e2.length; ) if (t2[i2] === e2[r2]) o.push(h === "b" ? e2[r2] : t2[i2]), i2++, r2++; + else if (s2 && t2[i2] === "**" && e2[r2] === t2[i2 + 1]) o.push(t2[i2]), i2++; + else if (s2 && e2[r2] === "**" && t2[i2] === e2[r2 + 1]) o.push(e2[r2]), r2++; + else if (t2[i2] === "*" && e2[r2] && (this.options.dot || !e2[r2].startsWith(".")) && e2[r2] !== "**") { + if (h === "b") return false; + h = "a", o.push(t2[i2]), i2++, r2++; + } else if (e2[r2] === "*" && t2[i2] && (this.options.dot || !t2[i2].startsWith(".")) && t2[i2] !== "**") { + if (h === "a") return false; + h = "b", o.push(e2[r2]), i2++, r2++; + } else return false; + return t2.length === e2.length && o; + } + parseNegate() { + if (this.nonegate) return; + let t2 = this.pattern, e2 = false, s2 = 0; + for (let i2 = 0; i2 < t2.length && t2.charAt(i2) === "!"; i2++) e2 = !e2, s2++; + s2 && (this.pattern = t2.slice(s2)), this.negate = e2; + } + matchOne(t2, e2, s2 = false) { + let i2 = this.options; + if (this.isWindows) { + let p2 = typeof t2[0] == "string" && /^[a-z]:$/i.test(t2[0]), w2 = !p2 && t2[0] === "" && t2[1] === "" && t2[2] === "?" && /^[a-z]:$/i.test(t2[3]), g2 = typeof e2[0] == "string" && /^[a-z]:$/i.test(e2[0]), S2 = !g2 && e2[0] === "" && e2[1] === "" && e2[2] === "?" && typeof e2[3] == "string" && /^[a-z]:$/i.test(e2[3]), E2 = w2 ? 3 : p2 ? 0 : void 0, y2 = S2 ? 3 : g2 ? 0 : void 0; + if (typeof E2 == "number" && typeof y2 == "number") { + let [b2, z2] = [t2[E2], e2[y2]]; + b2.toLowerCase() === z2.toLowerCase() && (e2[y2] = b2, y2 > E2 ? e2 = e2.slice(y2) : E2 > y2 && (t2 = t2.slice(E2))); + } + } + let { optimizationLevel: r2 = 1 } = this.options; + r2 >= 2 && (t2 = this.levelTwoFileOptimize(t2)), this.debug("matchOne", this, { file: t2, pattern: e2 }), this.debug("matchOne", t2.length, e2.length); + for (var o = 0, h = 0, a2 = t2.length, l2 = e2.length; o < a2 && h < l2; o++, h++) { + this.debug("matchOne loop"); + var u2 = e2[h], c2 = t2[o]; + if (this.debug(e2, u2, c2), u2 === false) return false; + if (u2 === A2) { + this.debug("GLOBSTAR", [e2, u2, c2]); + var d = o, f = h + 1; + if (f === l2) { + for (this.debug("** at the end"); o < a2; o++) if (t2[o] === "." || t2[o] === ".." || !i2.dot && t2[o].charAt(0) === ".") return false; + return true; + } + for (; d < a2; ) { + var m = t2[d]; + if (this.debug(` +globstar while`, t2, d, e2, f, m), this.matchOne(t2.slice(d), e2.slice(f), s2)) return this.debug("globstar found match!", d, a2, m), true; + if (m === "." || m === ".." || !i2.dot && m.charAt(0) === ".") { + this.debug("dot detected!", t2, d, e2, f); + break; + } + this.debug("globstar swallow a segment, and continue"), d++; + } + return !!(s2 && (this.debug(` +>>> no match, partial?`, t2, d, e2, f), d === a2)); + } + let p2; + if (typeof u2 == "string" ? (p2 = c2 === u2, this.debug("string match", u2, c2, p2)) : (p2 = u2.test(c2), this.debug("pattern match", u2, c2, p2)), !p2) return false; + } + if (o === a2 && h === l2) return true; + if (o === a2) return s2; + if (h === l2) return o === a2 - 1 && t2[o] === ""; + throw new Error("wtf?"); + } + braceExpand() { + return ke2(this.pattern, this.options); + } + parse(t2) { + at2(t2); + let e2 = this.options; + if (t2 === "**") return A2; + if (t2 === "") return ""; + let s2, i2 = null; + (s2 = t2.match(js)) ? i2 = e2.dot ? zs : Is : (s2 = t2.match(Rs)) ? i2 = (e2.nocase ? e2.dot ? Ms : Ds : e2.dot ? Fs : Os)(s2[1]) : (s2 = t2.match(Bs)) ? i2 = (e2.nocase ? e2.dot ? $s : Us : e2.dot ? Gs : Hs)(s2) : (s2 = t2.match(Ns)) ? i2 = e2.dot ? Ls : _s : (s2 = t2.match(Ws)) && (i2 = Ps); + let r2 = Q2.fromGlob(t2, this.options).toMMPattern(); + return i2 && typeof r2 == "object" && Reflect.defineProperty(r2, "test", { value: i2 }), r2; + } + makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + let t2 = this.set; + if (!t2.length) return this.regexp = false, this.regexp; + let e2 = this.options, s2 = e2.noglobstar ? Vs : e2.dot ? Ys : Xs, i2 = new Set(e2.nocase ? ["i"] : []), r2 = t2.map((a2) => { + let l2 = a2.map((c2) => { + if (c2 instanceof RegExp) for (let d of c2.flags.split("")) i2.add(d); + return typeof c2 == "string" ? ei(c2) : c2 === A2 ? A2 : c2._src; + }); + l2.forEach((c2, d) => { + let f = l2[d + 1], m = l2[d - 1]; + c2 !== A2 || m === A2 || (m === void 0 ? f !== void 0 && f !== A2 ? l2[d + 1] = "(?:\\/|" + s2 + "\\/)?" + f : l2[d] = s2 : f === void 0 ? l2[d - 1] = m + "(?:\\/|\\/" + s2 + ")?" : f !== A2 && (l2[d - 1] = m + "(?:\\/|\\/" + s2 + "\\/)" + f, l2[d + 1] = A2)); + }); + let u2 = l2.filter((c2) => c2 !== A2); + if (this.partial && u2.length >= 1) { + let c2 = []; + for (let d = 1; d <= u2.length; d++) c2.push(u2.slice(0, d).join("/")); + return "(?:" + c2.join("|") + ")"; + } + return u2.join("/"); + }).join("|"), [o, h] = t2.length > 1 ? ["(?:", ")"] : ["", ""]; + r2 = "^" + o + r2 + h + "$", this.partial && (r2 = "^(?:\\/|" + o + r2.slice(1, -1) + h + ")$"), this.negate && (r2 = "^(?!" + r2 + ").+$"); + try { + this.regexp = new RegExp(r2, [...i2].join("")); + } catch { + this.regexp = false; + } + return this.regexp; + } + slashSplit(t2) { + return this.preserveMultipleSlashes ? t2.split("/") : this.isWindows && /^\/\/[^\/]+/.test(t2) ? ["", ...t2.split(/\/+/)] : t2.split(/\/+/); + } + match(t2, e2 = this.partial) { + if (this.debug("match", t2, this.pattern), this.comment) return false; + if (this.empty) return t2 === ""; + if (t2 === "/" && e2) return true; + let s2 = this.options; + this.isWindows && (t2 = t2.split("\\").join("/")); + let i2 = this.slashSplit(t2); + this.debug(this.pattern, "split", i2); + let r2 = this.set; + this.debug(this.pattern, "set", r2); + let o = i2[i2.length - 1]; + if (!o) for (let h = i2.length - 2; !o && h >= 0; h--) o = i2[h]; + for (let h = 0; h < r2.length; h++) { + let a2 = r2[h], l2 = i2; + if (s2.matchBase && a2.length === 1 && (l2 = [o]), this.matchOne(l2, a2, e2)) return s2.flipNegate ? true : !this.negate; + } + return s2.flipNegate ? false : this.negate; + } + static defaults(t2) { + return O2.defaults(t2).Minimatch; + } + }; + O2.AST = Q2; + O2.Minimatch = D2; + O2.escape = tt2; + O2.unescape = W2; + si = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date; + Oe2 = /* @__PURE__ */ new Set(); + Vt2 = typeof process == "object" && process ? process : {}; + Fe2 = (n8, t2, e2, s2) => { + typeof Vt2.emitWarning == "function" ? Vt2.emitWarning(n8, t2, e2, s2) : console.error(`[${e2}] ${t2}: ${n8}`); + }; + At2 = globalThis.AbortController; + Re2 = globalThis.AbortSignal; + if (typeof At2 > "u") { + Re2 = class { + onabort; + _onabort = []; + reason; + aborted = false; + addEventListener(e2, s2) { + this._onabort.push(s2); + } + }, At2 = class { + constructor() { + t2(); + } + signal = new Re2(); + abort(e2) { + if (!this.signal.aborted) { + this.signal.reason = e2, this.signal.aborted = true; + for (let s2 of this.signal._onabort) s2(e2); + this.signal.onabort?.(e2); + } + } + }; + let n8 = Vt2.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1", t2 = () => { + n8 && (n8 = false, Fe2("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", t2)); + }; } - var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = ''; - if ('/' === regexp[0]) { - if (tail) { - modifiers = tail[1]; + ii = (n8) => !Oe2.has(n8); + q2 = (n8) => n8 && n8 === Math.floor(n8) && n8 > 0 && isFinite(n8); + De2 = (n8) => q2(n8) ? n8 <= Math.pow(2, 8) ? Uint8Array : n8 <= Math.pow(2, 16) ? Uint16Array : n8 <= Math.pow(2, 32) ? Uint32Array : n8 <= Number.MAX_SAFE_INTEGER ? Tt2 : null : null; + Tt2 = class extends Array { + constructor(n8) { + super(n8), this.fill(0); + } + }; + ri = class ct2 { + heap; + length; + static #t = false; + static create(t2) { + let e2 = De2(t2); + if (!e2) return []; + ct2.#t = true; + let s2 = new ct2(t2, e2); + return ct2.#t = false, s2; + } + constructor(t2, e2) { + if (!ct2.#t) throw new TypeError("instantiate Stack using Stack.create(n)"); + this.heap = new e2(t2), this.length = 0; + } + push(t2) { + this.heap[this.length++] = t2; + } + pop() { + return this.heap[--this.length]; + } + }; + ft2 = class Me2 { + #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(t2) { + return { starts: t2.#T, ttls: t2.#g, autopurgeTimers: t2.#y, sizes: t2.#C, keyMap: t2.#f, keyList: t2.#a, valList: t2.#i, next: t2.#d, prev: t2.#E, get head() { + return t2.#b; + }, get tail() { + return t2.#p; + }, free: t2.#R, isBackgroundFetch: (e2) => t2.#l(e2), backgroundFetch: (e2, s2, i2, r2) => t2.#U(e2, s2, i2, r2), moveToTail: (e2) => t2.#W(e2), indexes: (e2) => t2.#F(e2), rindexes: (e2) => t2.#D(e2), isStale: (e2) => t2.#v(e2) }; + } + 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(t2) { + let { max: e2 = 0, ttl: s2, ttlResolution: i2 = 1, ttlAutopurge: r2, updateAgeOnGet: o, updateAgeOnHas: h, allowStale: a2, dispose: l2, onInsert: u2, disposeAfter: c2, noDisposeOnSet: d, noUpdateTTL: f, maxSize: m = 0, maxEntrySize: p2 = 0, sizeCalculation: w2, fetchMethod: g2, memoMethod: S2, noDeleteOnFetchRejection: E2, noDeleteOnStaleGet: y2, allowStaleOnFetchRejection: b2, allowStaleOnFetchAbort: z2, ignoreFetchAbort: $2, perf: J2 } = t2; + if (J2 !== void 0 && typeof J2?.now != "function") throw new TypeError("perf option must have a now() method if specified"); + if (this.#c = J2 ?? si, e2 !== 0 && !q2(e2)) throw new TypeError("max option must be a nonnegative integer"); + let Z2 = e2 ? De2(e2) : Array; + if (!Z2) throw new Error("invalid max value: " + e2); + if (this.#t = e2, this.#s = m, this.maxEntrySize = p2 || this.#s, this.sizeCalculation = w2, 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 (S2 !== void 0 && typeof S2 != "function") throw new TypeError("memoMethod must be a function if defined"); + if (this.#w = S2, g2 !== void 0 && typeof g2 != "function") throw new TypeError("fetchMethod must be a function if specified"); + if (this.#S = g2, this.#A = !!g2, this.#f = /* @__PURE__ */ new Map(), this.#a = new Array(e2).fill(void 0), this.#i = new Array(e2).fill(void 0), this.#d = new Z2(e2), this.#E = new Z2(e2), this.#b = 0, this.#p = 0, this.#R = ri.create(e2), this.#h = 0, this.#u = 0, typeof l2 == "function" && (this.#n = l2), typeof u2 == "function" && (this.#r = u2), typeof c2 == "function" ? (this.#o = c2, 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 = !!E2, this.allowStaleOnFetchRejection = !!b2, this.allowStaleOnFetchAbort = !!z2, this.ignoreFetchAbort = !!$2, this.maxEntrySize !== 0) { + if (this.#s !== 0 && !q2(this.#s)) throw new TypeError("maxSize must be a positive integer if specified"); + if (!q2(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified"); + this.#G(); + } + if (this.allowStale = !!a2, this.noDeleteOnStaleGet = !!y2, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!h, this.ttlResolution = q2(i2) || i2 === 0 ? i2 : 1, this.ttlAutopurge = !!r2, this.ttl = s2 || 0, this.ttl) { + if (!q2(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 $t2 = "LRU_CACHE_UNBOUNDED"; + ii($t2) && (Oe2.add($t2), Fe2("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", $t2, Me2)); + } + } + getRemainingTTL(t2) { + return this.#f.has(t2) ? 1 / 0 : 0; + } + #M() { + let t2 = new Tt2(this.#t), e2 = new Tt2(this.#t); + this.#g = t2, this.#T = e2; + let s2 = this.ttlAutopurge ? new Array(this.#t) : void 0; + this.#y = s2, this.#j = (o, h, a2 = this.#c.now()) => { + if (e2[o] = h !== 0 ? a2 : 0, t2[o] = h, s2?.[o] && (clearTimeout(s2[o]), s2[o] = void 0), h !== 0 && s2) { + let l2 = setTimeout(() => { + this.#v(o) && this.#O(this.#a[o], "expire"); + }, h + 1); + l2.unref && l2.unref(), s2[o] = l2; + } + }, this.#k = (o) => { + e2[o] = t2[o] !== 0 ? this.#c.now() : 0; + }, this.#N = (o, h) => { + if (t2[h]) { + let a2 = t2[h], l2 = e2[h]; + if (!a2 || !l2) return; + o.ttl = a2, o.start = l2, o.now = i2 || r2(); + let u2 = o.now - l2; + o.remainingTTL = a2 - u2; + } + }; + let i2 = 0, r2 = () => { + let o = this.#c.now(); + if (this.ttlResolution > 0) { + i2 = o; + let h = setTimeout(() => i2 = 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 a2 = t2[h], l2 = e2[h]; + if (!a2 || !l2) return 1 / 0; + let u2 = (i2 || r2()) - l2; + return a2 - u2; + }, this.#v = (o) => { + let h = e2[o], a2 = t2[o]; + return !!a2 && !!h && (i2 || r2()) - h > a2; + }; + } + #k = () => { + }; + #N = () => { + }; + #j = () => { + }; + #v = () => false; + #G() { + let t2 = new Tt2(this.#t); + this.#u = 0, this.#C = t2, this.#P = (e2) => { + this.#u -= t2[e2], t2[e2] = 0; + }, this.#I = (e2, s2, i2, r2) => { + if (this.#l(s2)) return 0; + if (!q2(i2)) if (r2) { + if (typeof r2 != "function") throw new TypeError("sizeCalculation must be a function"); + if (i2 = r2(s2, e2), !q2(i2)) 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 i2; + }, this.#L = (e2, s2, i2) => { + if (t2[e2] = s2, this.#s) { + let r2 = this.#s - t2[e2]; + for (; this.#u > r2; ) this.#B(true); + } + this.#u += t2[e2], i2 && (i2.entrySize = s2, i2.totalCalculatedSize = this.#u); + }; + } + #P = (t2) => { + }; + #L = (t2, e2, s2) => { + }; + #I = (t2, e2, s2, i2) => { + if (s2 || i2) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache"); + return 0; + }; + *#F({ allowStale: t2 = this.allowStale } = {}) { + if (this.#h) for (let e2 = this.#p; !(!this.#z(e2) || ((t2 || !this.#v(e2)) && (yield e2), e2 === this.#b)); ) e2 = this.#E[e2]; + } + *#D({ allowStale: t2 = this.allowStale } = {}) { + if (this.#h) for (let e2 = this.#b; !(!this.#z(e2) || ((t2 || !this.#v(e2)) && (yield e2), e2 === this.#p)); ) e2 = this.#d[e2]; + } + #z(t2) { + return t2 !== void 0 && this.#f.get(this.#a[t2]) === t2; + } + *entries() { + for (let t2 of this.#F()) this.#i[t2] !== void 0 && this.#a[t2] !== void 0 && !this.#l(this.#i[t2]) && (yield [this.#a[t2], this.#i[t2]]); + } + *rentries() { + for (let t2 of this.#D()) this.#i[t2] !== void 0 && this.#a[t2] !== void 0 && !this.#l(this.#i[t2]) && (yield [this.#a[t2], this.#i[t2]]); + } + *keys() { + for (let t2 of this.#F()) { + let e2 = this.#a[t2]; + e2 !== void 0 && !this.#l(this.#i[t2]) && (yield e2); + } + } + *rkeys() { + for (let t2 of this.#D()) { + let e2 = this.#a[t2]; + e2 !== void 0 && !this.#l(this.#i[t2]) && (yield e2); + } + } + *values() { + for (let t2 of this.#F()) this.#i[t2] !== void 0 && !this.#l(this.#i[t2]) && (yield this.#i[t2]); + } + *rvalues() { + for (let t2 of this.#D()) this.#i[t2] !== void 0 && !this.#l(this.#i[t2]) && (yield this.#i[t2]); + } + [Symbol.iterator]() { + return this.entries(); + } + [Symbol.toStringTag] = "LRUCache"; + find(t2, e2 = {}) { + for (let s2 of this.#F()) { + let i2 = this.#i[s2], r2 = this.#l(i2) ? i2.__staleWhileFetching : i2; + if (r2 !== void 0 && t2(r2, this.#a[s2], this)) return this.get(this.#a[s2], e2); + } + } + forEach(t2, e2 = this) { + for (let s2 of this.#F()) { + let i2 = this.#i[s2], r2 = this.#l(i2) ? i2.__staleWhileFetching : i2; + r2 !== void 0 && t2.call(e2, r2, this.#a[s2], this); + } + } + rforEach(t2, e2 = this) { + for (let s2 of this.#D()) { + let i2 = this.#i[s2], r2 = this.#l(i2) ? i2.__staleWhileFetching : i2; + r2 !== void 0 && t2.call(e2, r2, this.#a[s2], this); + } + } + purgeStale() { + let t2 = false; + for (let e2 of this.#D({ allowStale: true })) this.#v(e2) && (this.#O(this.#a[e2], "expire"), t2 = true); + return t2; + } + info(t2) { + let e2 = this.#f.get(t2); + if (e2 === void 0) return; + let s2 = this.#i[e2], i2 = this.#l(s2) ? s2.__staleWhileFetching : s2; + if (i2 === void 0) return; + let r2 = { value: i2 }; + if (this.#g && this.#T) { + let o = this.#g[e2], h = this.#T[e2]; + if (o && h) { + let a2 = o - (this.#c.now() - h); + r2.ttl = a2, r2.start = Date.now(); + } + } + return this.#C && (r2.size = this.#C[e2]), r2; + } + dump() { + let t2 = []; + for (let e2 of this.#F({ allowStale: true })) { + let s2 = this.#a[e2], i2 = this.#i[e2], r2 = this.#l(i2) ? i2.__staleWhileFetching : i2; + if (r2 === void 0 || s2 === void 0) continue; + let o = { value: r2 }; + if (this.#g && this.#T) { + o.ttl = this.#g[e2]; + let h = this.#c.now() - this.#T[e2]; + o.start = Math.floor(Date.now() - h); + } + this.#C && (o.size = this.#C[e2]), t2.unshift([s2, o]); + } + return t2; + } + load(t2) { + this.clear(); + for (let [e2, s2] of t2) { + if (s2.start) { + let i2 = Date.now() - s2.start; + s2.start = this.#c.now() - i2; + } + this.set(e2, s2.value, s2); } - if (modifiers.length > 3) { - return false; + } + set(t2, e2, s2 = {}) { + if (e2 === void 0) return this.delete(t2), this; + let { ttl: i2 = this.ttl, start: r2, noDisposeOnSet: o = this.noDisposeOnSet, sizeCalculation: h = this.sizeCalculation, status: a2 } = s2, { noUpdateTTL: l2 = this.noUpdateTTL } = s2, u2 = this.#I(t2, e2, s2.size || 0, h); + if (this.maxEntrySize && u2 > this.maxEntrySize) return a2 && (a2.set = "miss", a2.maxEntrySizeExceeded = true), this.#O(t2, "set"), this; + let c2 = this.#h === 0 ? void 0 : this.#f.get(t2); + if (c2 === void 0) c2 = this.#h === 0 ? this.#p : this.#R.length !== 0 ? this.#R.pop() : this.#h === this.#t ? this.#B(false) : this.#h, this.#a[c2] = t2, this.#i[c2] = e2, this.#f.set(t2, c2), this.#d[this.#p] = c2, this.#E[c2] = this.#p, this.#p = c2, this.#h++, this.#L(c2, u2, a2), a2 && (a2.set = "add"), l2 = false, this.#_ && this.#r?.(e2, t2, "add"); + else { + this.#W(c2); + let d = this.#i[c2]; + if (e2 !== 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, t2, "set"), this.#e && this.#m?.push([f, t2, "set"])); + } else o || (this.#x && this.#n?.(d, t2, "set"), this.#e && this.#m?.push([d, t2, "set"])); + if (this.#P(c2), this.#L(c2, u2, a2), this.#i[c2] = e2, a2) { + a2.set = "replace"; + let f = d && this.#l(d) ? d.__staleWhileFetching : d; + f !== void 0 && (a2.oldValue = f); + } + } else a2 && (a2.set = "update"); + this.#_ && this.onInsert?.(e2, t2, e2 === d ? "update" : "replace"); + } + if (i2 !== 0 && !this.#g && this.#M(), this.#g && (l2 || this.#j(c2, i2, r2), a2 && this.#N(a2, c2)), !o && this.#e && this.#m) { + let d = this.#m, f; + for (; f = d?.shift(); ) this.#o?.(...f); } - if (regexp[regexp.length - modifiers.length - 1] !== '/') { - return false; + return this; + } + pop() { + try { + for (; this.#h; ) { + let t2 = this.#i[this.#b]; + if (this.#B(true), this.#l(t2)) { + if (t2.__staleWhileFetching) return t2.__staleWhileFetching; + } else if (t2 !== void 0) return t2; + } + } finally { + if (this.#e && this.#m) { + let t2 = this.#m, e2; + for (; e2 = t2?.shift(); ) this.#o?.(...e2); + } } - regexp = regexp.slice(1, regexp.length - modifiers.length - 1); - } - try { - var dummy = new RegExp(regexp, modifiers); - return true; - } - catch (error) { + } + #B(t2) { + let e2 = this.#b, s2 = this.#a[e2], i2 = this.#i[e2]; + return this.#A && this.#l(i2) ? i2.__abortController.abort(new Error("evicted")) : (this.#x || this.#e) && (this.#x && this.#n?.(i2, s2, "evict"), this.#e && this.#m?.push([i2, s2, "evict"])), this.#P(e2), this.#y?.[e2] && (clearTimeout(this.#y[e2]), this.#y[e2] = void 0), t2 && (this.#a[e2] = void 0, this.#i[e2] = void 0, this.#R.push(e2)), this.#h === 1 ? (this.#b = this.#p = 0, this.#R.length = 0) : this.#b = this.#d[e2], this.#f.delete(s2), this.#h--, e2; + } + has(t2, e2 = {}) { + let { updateAgeOnHas: s2 = this.updateAgeOnHas, status: i2 } = e2, r2 = this.#f.get(t2); + if (r2 !== void 0) { + let o = this.#i[r2]; + if (this.#l(o) && o.__staleWhileFetching === void 0) return false; + if (this.#v(r2)) i2 && (i2.has = "stale", this.#N(i2, r2)); + else return s2 && this.#k(r2), i2 && (i2.has = "hit", this.#N(i2, r2)), true; + } else i2 && (i2.has = "miss"); return false; - } -} -function constructJavascriptRegExp(data) { - var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = ''; - if ('/' === regexp[0]) { - if (tail) { - modifiers = tail[1]; + } + peek(t2, e2 = {}) { + let { allowStale: s2 = this.allowStale } = e2, i2 = this.#f.get(t2); + if (i2 === void 0 || !s2 && this.#v(i2)) return; + let r2 = this.#i[i2]; + return this.#l(r2) ? r2.__staleWhileFetching : r2; + } + #U(t2, e2, s2, i2) { + let r2 = e2 === void 0 ? void 0 : this.#i[e2]; + if (this.#l(r2)) return r2; + let o = new At2(), { signal: h } = s2; + h?.addEventListener("abort", () => o.abort(h.reason), { signal: o.signal }); + let a2 = { signal: o.signal, options: s2, context: i2 }, l2 = (p2, w2 = false) => { + let { aborted: g2 } = o.signal, S2 = s2.ignoreFetchAbort && p2 !== void 0, E2 = s2.ignoreFetchAbort || !!(s2.allowStaleOnFetchAbort && p2 !== void 0); + if (s2.status && (g2 && !w2 ? (s2.status.fetchAborted = true, s2.status.fetchError = o.signal.reason, S2 && (s2.status.fetchAbortIgnored = true)) : s2.status.fetchResolved = true), g2 && !S2 && !w2) return c2(o.signal.reason, E2); + let y2 = f, b2 = this.#i[e2]; + return (b2 === f || S2 && w2 && b2 === void 0) && (p2 === void 0 ? y2.__staleWhileFetching !== void 0 ? this.#i[e2] = y2.__staleWhileFetching : this.#O(t2, "fetch") : (s2.status && (s2.status.fetchUpdated = true), this.set(t2, p2, a2.options))), p2; + }, u2 = (p2) => (s2.status && (s2.status.fetchRejected = true, s2.status.fetchError = p2), c2(p2, false)), c2 = (p2, w2) => { + let { aborted: g2 } = o.signal, S2 = g2 && s2.allowStaleOnFetchAbort, E2 = S2 || s2.allowStaleOnFetchRejection, y2 = E2 || s2.noDeleteOnFetchRejection, b2 = f; + if (this.#i[e2] === f && (!y2 || !w2 && b2.__staleWhileFetching === void 0 ? this.#O(t2, "fetch") : S2 || (this.#i[e2] = b2.__staleWhileFetching)), E2) return s2.status && b2.__staleWhileFetching !== void 0 && (s2.status.returnedStale = true), b2.__staleWhileFetching; + if (b2.__returned === b2) throw p2; + }, d = (p2, w2) => { + let g2 = this.#S?.(t2, r2, a2); + g2 && g2 instanceof Promise && g2.then((S2) => p2(S2 === void 0 ? void 0 : S2), w2), o.signal.addEventListener("abort", () => { + (!s2.ignoreFetchAbort || s2.allowStaleOnFetchAbort) && (p2(void 0), s2.allowStaleOnFetchAbort && (p2 = (S2) => l2(S2, true))); + }); + }; + s2.status && (s2.status.fetchDispatched = true); + let f = new Promise(d).then(l2, u2), m = Object.assign(f, { __abortController: o, __staleWhileFetching: r2, __returned: void 0 }); + return e2 === void 0 ? (this.set(t2, m, { ...a2.options, status: void 0 }), e2 = this.#f.get(t2)) : this.#i[e2] = m, m; + } + #l(t2) { + if (!this.#A) return false; + let e2 = t2; + return !!e2 && e2 instanceof Promise && e2.hasOwnProperty("__staleWhileFetching") && e2.__abortController instanceof At2; + } + async fetch(t2, e2 = {}) { + let { allowStale: s2 = this.allowStale, updateAgeOnGet: i2 = this.updateAgeOnGet, noDeleteOnStaleGet: r2 = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: h = this.noDisposeOnSet, size: a2 = 0, sizeCalculation: l2 = this.sizeCalculation, noUpdateTTL: u2 = this.noUpdateTTL, noDeleteOnFetchRejection: c2 = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d = this.allowStaleOnFetchRejection, ignoreFetchAbort: f = this.ignoreFetchAbort, allowStaleOnFetchAbort: m = this.allowStaleOnFetchAbort, context: p2, forceRefresh: w2 = false, status: g2, signal: S2 } = e2; + if (!this.#A) return g2 && (g2.fetch = "get"), this.get(t2, { allowStale: s2, updateAgeOnGet: i2, noDeleteOnStaleGet: r2, status: g2 }); + let E2 = { allowStale: s2, updateAgeOnGet: i2, noDeleteOnStaleGet: r2, ttl: o, noDisposeOnSet: h, size: a2, sizeCalculation: l2, noUpdateTTL: u2, noDeleteOnFetchRejection: c2, allowStaleOnFetchRejection: d, allowStaleOnFetchAbort: m, ignoreFetchAbort: f, status: g2, signal: S2 }, y2 = this.#f.get(t2); + if (y2 === void 0) { + g2 && (g2.fetch = "miss"); + let b2 = this.#U(t2, y2, E2, p2); + return b2.__returned = b2; + } else { + let b2 = this.#i[y2]; + if (this.#l(b2)) { + let Z2 = s2 && b2.__staleWhileFetching !== void 0; + return g2 && (g2.fetch = "inflight", Z2 && (g2.returnedStale = true)), Z2 ? b2.__staleWhileFetching : b2.__returned = b2; + } + let z2 = this.#v(y2); + if (!w2 && !z2) return g2 && (g2.fetch = "hit"), this.#W(y2), i2 && this.#k(y2), g2 && this.#N(g2, y2), b2; + let $2 = this.#U(t2, y2, E2, p2), J2 = $2.__staleWhileFetching !== void 0 && s2; + return g2 && (g2.fetch = z2 ? "stale" : "refresh", J2 && z2 && (g2.returnedStale = true)), J2 ? $2.__staleWhileFetching : $2.__returned = $2; + } + } + async forceFetch(t2, e2 = {}) { + let s2 = await this.fetch(t2, e2); + if (s2 === void 0) throw new Error("fetch() returned undefined"); + return s2; + } + memo(t2, e2 = {}) { + let s2 = this.#w; + if (!s2) throw new Error("no memoMethod provided to constructor"); + let { context: i2, forceRefresh: r2, ...o } = e2, h = this.get(t2, o); + if (!r2 && h !== void 0) return h; + let a2 = s2(t2, h, { options: o, context: i2 }); + return this.set(t2, a2, o), a2; + } + get(t2, e2 = {}) { + let { allowStale: s2 = this.allowStale, updateAgeOnGet: i2 = this.updateAgeOnGet, noDeleteOnStaleGet: r2 = this.noDeleteOnStaleGet, status: o } = e2, h = this.#f.get(t2); + if (h !== void 0) { + let a2 = this.#i[h], l2 = this.#l(a2); + return o && this.#N(o, h), this.#v(h) ? (o && (o.get = "stale"), l2 ? (o && s2 && a2.__staleWhileFetching !== void 0 && (o.returnedStale = true), s2 ? a2.__staleWhileFetching : void 0) : (r2 || this.#O(t2, "expire"), o && s2 && (o.returnedStale = true), s2 ? a2 : void 0)) : (o && (o.get = "hit"), l2 ? a2.__staleWhileFetching : (this.#W(h), i2 && this.#k(h), a2)); + } else o && (o.get = "miss"); + } + #$(t2, e2) { + this.#E[e2] = t2, this.#d[t2] = e2; + } + #W(t2) { + t2 !== this.#p && (t2 === this.#b ? this.#b = this.#d[t2] : this.#$(this.#E[t2], this.#d[t2]), this.#$(this.#p, t2), this.#p = t2); + } + delete(t2) { + return this.#O(t2, "delete"); + } + #O(t2, e2) { + let s2 = false; + if (this.#h !== 0) { + let i2 = this.#f.get(t2); + if (i2 !== void 0) if (this.#y?.[i2] && (clearTimeout(this.#y?.[i2]), this.#y[i2] = void 0), s2 = true, this.#h === 1) this.#H(e2); + else { + this.#P(i2); + let r2 = this.#i[i2]; + if (this.#l(r2) ? r2.__abortController.abort(new Error("deleted")) : (this.#x || this.#e) && (this.#x && this.#n?.(r2, t2, e2), this.#e && this.#m?.push([r2, t2, e2])), this.#f.delete(t2), this.#a[i2] = void 0, this.#i[i2] = void 0, i2 === this.#p) this.#p = this.#E[i2]; + else if (i2 === this.#b) this.#b = this.#d[i2]; + else { + let o = this.#E[i2]; + this.#d[o] = this.#d[i2]; + let h = this.#d[i2]; + this.#E[h] = this.#E[i2]; + } + this.#h--, this.#R.push(i2); + } } - 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 RegExp]' === Object.prototype.toString.call(object); -} -module.exports = new type_1.Type('tag:yaml.org,2002:js/regexp', { - kind: 'scalar', - resolve: resolveJavascriptRegExp, - construct: constructJavascriptRegExp, - predicate: isRegExp, - represent: representJavascriptRegExp -}); -//# sourceMappingURL=regexp.js.map - -/***/ }), - -/***/ 32706: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var type_1 = __nccwpck_require__(34642); -function resolveJavascriptUndefined() { - return true; -} -function constructJavascriptUndefined() { - return undefined; -} -function representJavascriptUndefined() { - return ''; -} -function isUndefined(object) { - return 'undefined' === typeof object; -} -module.exports = new type_1.Type('tag:yaml.org,2002:js/undefined', { - kind: 'scalar', - resolve: resolveJavascriptUndefined, - construct: constructJavascriptUndefined, - predicate: isUndefined, - represent: representJavascriptUndefined -}); -//# sourceMappingURL=undefined.js.map - -/***/ }), - -/***/ 17444: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var type_1 = __nccwpck_require__(34642); -module.exports = new type_1.Type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return null !== data ? data : {}; } -}); -//# sourceMappingURL=map.js.map - -/***/ }), - -/***/ 38676: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var type_1 = __nccwpck_require__(34642); -function resolveYamlMerge(data) { - return '<<' === data || null === data; -} -module.exports = new type_1.Type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge -}); -//# sourceMappingURL=merge.js.map - -/***/ }), - -/***/ 44322: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var type_1 = __nccwpck_require__(34642); -function resolveYamlNull(data) { - if (null === data) { - 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 null === object; -} -module.exports = new type_1.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' -}); -//# sourceMappingURL=null.js.map - -/***/ }), - -/***/ 2246: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var type_1 = __nccwpck_require__(34642); -var _hasOwnProperty = Object.prototype.hasOwnProperty; -var _toString = Object.prototype.toString; -function resolveYamlOmap(data) { - if (null === data) { - 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 ('[object Object]' !== _toString.call(pair)) { - return false; + if (this.#e && this.#m?.length) { + let i2 = this.#m, r2; + for (; r2 = i2?.shift(); ) this.#o?.(...r2); } - for (pairKey in pair) { - if (_hasOwnProperty.call(pair, pairKey)) { - if (!pairHasKey) { - pairHasKey = true; - } - else { - return false; - } - } + return s2; + } + clear() { + return this.#H("delete"); + } + #H(t2) { + for (let e2 of this.#D({ allowStale: true })) { + let s2 = this.#i[e2]; + if (this.#l(s2)) s2.__abortController.abort(new Error("deleted")); + else { + let i2 = this.#a[e2]; + this.#x && this.#n?.(s2, i2, t2), this.#e && this.#m?.push([s2, i2, t2]); + } } - if (!pairHasKey) { - return false; + 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 e2 of this.#y ?? []) e2 !== void 0 && clearTimeout(e2); + this.#y?.fill(void 0); } - if (-1 === objectKeys.indexOf(pairKey)) { - objectKeys.push(pairKey); + 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 e2 = this.#m, s2; + for (; s2 = e2?.shift(); ) this.#o?.(...s2); } + } + }; + Ne2 = typeof process == "object" && process ? process : { stdout: null, stderr: null }; + oi = (n8) => !!n8 && typeof n8 == "object" && (n8 instanceof V2 || n8 instanceof Pe2 || hi(n8) || ai(n8)); + hi = (n8) => !!n8 && typeof n8 == "object" && n8 instanceof ee2 && typeof n8.pipe == "function" && n8.pipe !== Pe2.Writable.prototype.pipe; + ai = (n8) => !!n8 && typeof n8 == "object" && n8 instanceof ee2 && typeof n8.write == "function" && typeof n8.end == "function"; + G2 = /* @__PURE__ */ Symbol("EOF"); + H2 = /* @__PURE__ */ Symbol("maybeEmitEnd"); + K2 = /* @__PURE__ */ Symbol("emittedEnd"); + kt2 = /* @__PURE__ */ Symbol("emittingEnd"); + ut2 = /* @__PURE__ */ Symbol("emittedError"); + Rt2 = /* @__PURE__ */ Symbol("closed"); + _e2 = /* @__PURE__ */ Symbol("read"); + Ot2 = /* @__PURE__ */ Symbol("flush"); + Le2 = /* @__PURE__ */ Symbol("flushChunk"); + P2 = /* @__PURE__ */ Symbol("encoding"); + et2 = /* @__PURE__ */ Symbol("decoder"); + v2 = /* @__PURE__ */ Symbol("flowing"); + dt2 = /* @__PURE__ */ Symbol("paused"); + st2 = /* @__PURE__ */ Symbol("resume"); + C2 = /* @__PURE__ */ Symbol("buffer"); + F2 = /* @__PURE__ */ Symbol("pipes"); + T2 = /* @__PURE__ */ Symbol("bufferLength"); + Yt2 = /* @__PURE__ */ Symbol("bufferPush"); + Ft2 = /* @__PURE__ */ Symbol("bufferShift"); + k2 = /* @__PURE__ */ Symbol("objectMode"); + x2 = /* @__PURE__ */ Symbol("destroyed"); + Xt2 = /* @__PURE__ */ Symbol("error"); + Jt2 = /* @__PURE__ */ Symbol("emitData"); + We2 = /* @__PURE__ */ Symbol("emitEnd"); + Zt2 = /* @__PURE__ */ Symbol("emitEnd2"); + B2 = /* @__PURE__ */ Symbol("async"); + Qt2 = /* @__PURE__ */ Symbol("abort"); + Dt2 = /* @__PURE__ */ Symbol("aborted"); + pt2 = /* @__PURE__ */ Symbol("signal"); + Y2 = /* @__PURE__ */ Symbol("dataListeners"); + M2 = /* @__PURE__ */ Symbol("discarded"); + mt2 = (n8) => Promise.resolve().then(n8); + li2 = (n8) => n8(); + ci2 = (n8) => n8 === "end" || n8 === "finish" || n8 === "prefinish"; + fi = (n8) => n8 instanceof ArrayBuffer || !!n8 && typeof n8 == "object" && n8.constructor && n8.constructor.name === "ArrayBuffer" && n8.byteLength >= 0; + ui = (n8) => !Buffer.isBuffer(n8) && ArrayBuffer.isView(n8); + Mt2 = class { + src; + dest; + opts; + ondrain; + constructor(t2, e2, s2) { + this.src = t2, this.dest = e2, this.opts = s2, this.ondrain = () => t2[st2](), this.dest.on("drain", this.ondrain); + } + unpipe() { + this.dest.removeListener("drain", this.ondrain); + } + proxyErrors(t2) { + } + end() { + this.unpipe(), this.opts.end && this.dest.end(); + } + }; + te2 = class extends Mt2 { + unpipe() { + this.src.removeListener("error", this.proxyErrors), super.unpipe(); + } + constructor(t2, e2, s2) { + super(t2, e2, s2), this.proxyErrors = (i2) => this.dest.emit("error", i2), t2.on("error", this.proxyErrors); + } + }; + di = (n8) => !!n8.objectMode; + pi = (n8) => !n8.objectMode && !!n8.encoding && n8.encoding !== "buffer"; + V2 = class extends ee2 { + [v2] = false; + [dt2] = false; + [F2] = []; + [C2] = []; + [k2]; + [P2]; + [B2]; + [et2]; + [G2] = false; + [K2] = false; + [kt2] = false; + [Rt2] = false; + [ut2] = null; + [T2] = 0; + [x2] = false; + [pt2]; + [Dt2] = false; + [Y2] = 0; + [M2] = false; + writable = true; + readable = true; + constructor(...t2) { + let e2 = t2[0] || {}; + if (super(), e2.objectMode && typeof e2.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together"); + di(e2) ? (this[k2] = true, this[P2] = null) : pi(e2) ? (this[P2] = e2.encoding, this[k2] = false) : (this[k2] = false, this[P2] = null), this[B2] = !!e2.async, this[et2] = this[P2] ? new ni(this[P2]) : null, e2 && e2.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[C2] }), e2 && e2.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[F2] }); + let { signal: s2 } = e2; + s2 && (this[pt2] = s2, s2.aborted ? this[Qt2]() : s2.addEventListener("abort", () => this[Qt2]())); + } + get bufferLength() { + return this[T2]; + } + get encoding() { + return this[P2]; + } + set encoding(t2) { + throw new Error("Encoding must be set at instantiation time"); + } + setEncoding(t2) { + throw new Error("Encoding must be set at instantiation time"); + } + get objectMode() { + return this[k2]; + } + set objectMode(t2) { + throw new Error("objectMode must be set at instantiation time"); + } + get async() { + return this[B2]; + } + set async(t2) { + this[B2] = this[B2] || !!t2; + } + [Qt2]() { + this[Dt2] = true, this.emit("abort", this[pt2]?.reason), this.destroy(this[pt2]?.reason); + } + get aborted() { + return this[Dt2]; + } + set aborted(t2) { + } + write(t2, e2, s2) { + if (this[Dt2]) return false; + if (this[G2]) throw new Error("write after end"); + if (this[x2]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true; + typeof e2 == "function" && (s2 = e2, e2 = "utf8"), e2 || (e2 = "utf8"); + let i2 = this[B2] ? mt2 : li2; + if (!this[k2] && !Buffer.isBuffer(t2)) { + if (ui(t2)) t2 = Buffer.from(t2.buffer, t2.byteOffset, t2.byteLength); + else if (fi(t2)) t2 = Buffer.from(t2); + else if (typeof t2 != "string") throw new Error("Non-contiguous data written to non-objectMode stream"); + } + return this[k2] ? (this[v2] && this[T2] !== 0 && this[Ot2](true), this[v2] ? this.emit("data", t2) : this[Yt2](t2), this[T2] !== 0 && this.emit("readable"), s2 && i2(s2), this[v2]) : t2.length ? (typeof t2 == "string" && !(e2 === this[P2] && !this[et2]?.lastNeed) && (t2 = Buffer.from(t2, e2)), Buffer.isBuffer(t2) && this[P2] && (t2 = this[et2].write(t2)), this[v2] && this[T2] !== 0 && this[Ot2](true), this[v2] ? this.emit("data", t2) : this[Yt2](t2), this[T2] !== 0 && this.emit("readable"), s2 && i2(s2), this[v2]) : (this[T2] !== 0 && this.emit("readable"), s2 && i2(s2), this[v2]); + } + read(t2) { + if (this[x2]) return null; + if (this[M2] = false, this[T2] === 0 || t2 === 0 || t2 && t2 > this[T2]) return this[H2](), null; + this[k2] && (t2 = null), this[C2].length > 1 && !this[k2] && (this[C2] = [this[P2] ? this[C2].join("") : Buffer.concat(this[C2], this[T2])]); + let e2 = this[_e2](t2 || null, this[C2][0]); + return this[H2](), e2; + } + [_e2](t2, e2) { + if (this[k2]) this[Ft2](); else { - return false; + let s2 = e2; + t2 === s2.length || t2 === null ? this[Ft2]() : typeof s2 == "string" ? (this[C2][0] = s2.slice(t2), e2 = s2.slice(0, t2), this[T2] -= t2) : (this[C2][0] = s2.subarray(t2), e2 = s2.subarray(0, t2), this[T2] -= t2); + } + return this.emit("data", e2), !this[C2].length && !this[G2] && this.emit("drain"), e2; + } + end(t2, e2, s2) { + return typeof t2 == "function" && (s2 = t2, t2 = void 0), typeof e2 == "function" && (s2 = e2, e2 = "utf8"), t2 !== void 0 && this.write(t2, e2), s2 && this.once("end", s2), this[G2] = true, this.writable = false, (this[v2] || !this[dt2]) && this[H2](), this; + } + [st2]() { + this[x2] || (!this[Y2] && !this[F2].length && (this[M2] = true), this[dt2] = false, this[v2] = true, this.emit("resume"), this[C2].length ? this[Ot2]() : this[G2] ? this[H2]() : this.emit("drain")); + } + resume() { + return this[st2](); + } + pause() { + this[v2] = false, this[dt2] = true, this[M2] = false; + } + get destroyed() { + return this[x2]; + } + get flowing() { + return this[v2]; + } + get paused() { + return this[dt2]; + } + [Yt2](t2) { + this[k2] ? this[T2] += 1 : this[T2] += t2.length, this[C2].push(t2); + } + [Ft2]() { + return this[k2] ? this[T2] -= 1 : this[T2] -= this[C2][0].length, this[C2].shift(); + } + [Ot2](t2 = false) { + do + ; + while (this[Le2](this[Ft2]()) && this[C2].length); + !t2 && !this[C2].length && !this[G2] && this.emit("drain"); + } + [Le2](t2) { + return this.emit("data", t2), this[v2]; + } + pipe(t2, e2) { + if (this[x2]) return t2; + this[M2] = false; + let s2 = this[K2]; + return e2 = e2 || {}, t2 === Ne2.stdout || t2 === Ne2.stderr ? e2.end = false : e2.end = e2.end !== false, e2.proxyErrors = !!e2.proxyErrors, s2 ? e2.end && t2.end() : (this[F2].push(e2.proxyErrors ? new te2(this, t2, e2) : new Mt2(this, t2, e2)), this[B2] ? mt2(() => this[st2]()) : this[st2]()), t2; + } + unpipe(t2) { + let e2 = this[F2].find((s2) => s2.dest === t2); + e2 && (this[F2].length === 1 ? (this[v2] && this[Y2] === 0 && (this[v2] = false), this[F2] = []) : this[F2].splice(this[F2].indexOf(e2), 1), e2.unpipe()); + } + addListener(t2, e2) { + return this.on(t2, e2); + } + on(t2, e2) { + let s2 = super.on(t2, e2); + if (t2 === "data") this[M2] = false, this[Y2]++, !this[F2].length && !this[v2] && this[st2](); + else if (t2 === "readable" && this[T2] !== 0) super.emit("readable"); + else if (ci2(t2) && this[K2]) super.emit(t2), this.removeAllListeners(t2); + else if (t2 === "error" && this[ut2]) { + let i2 = e2; + this[B2] ? mt2(() => i2.call(this, this[ut2])) : i2.call(this, this[ut2]); + } + return s2; + } + removeListener(t2, e2) { + return this.off(t2, e2); + } + off(t2, e2) { + let s2 = super.off(t2, e2); + return t2 === "data" && (this[Y2] = this.listeners("data").length, this[Y2] === 0 && !this[M2] && !this[F2].length && (this[v2] = false)), s2; + } + removeAllListeners(t2) { + let e2 = super.removeAllListeners(t2); + return (t2 === "data" || t2 === void 0) && (this[Y2] = 0, !this[M2] && !this[F2].length && (this[v2] = false)), e2; + } + get emittedEnd() { + return this[K2]; + } + [H2]() { + !this[kt2] && !this[K2] && !this[x2] && this[C2].length === 0 && this[G2] && (this[kt2] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Rt2] && this.emit("close"), this[kt2] = false); + } + emit(t2, ...e2) { + let s2 = e2[0]; + if (t2 !== "error" && t2 !== "close" && t2 !== x2 && this[x2]) return false; + if (t2 === "data") return !this[k2] && !s2 ? false : this[B2] ? (mt2(() => this[Jt2](s2)), true) : this[Jt2](s2); + if (t2 === "end") return this[We2](); + if (t2 === "close") { + if (this[Rt2] = true, !this[K2] && !this[x2]) return false; + let r2 = super.emit("close"); + return this.removeAllListeners("close"), r2; + } else if (t2 === "error") { + this[ut2] = s2, super.emit(Xt2, s2); + let r2 = !this[pt2] || this.listeners("error").length ? super.emit("error", s2) : false; + return this[H2](), r2; + } else if (t2 === "resume") { + let r2 = super.emit("resume"); + return this[H2](), r2; + } else if (t2 === "finish" || t2 === "prefinish") { + let r2 = super.emit(t2); + return this.removeAllListeners(t2), r2; + } + let i2 = super.emit(t2, ...e2); + return this[H2](), i2; + } + [Jt2](t2) { + for (let s2 of this[F2]) s2.dest.write(t2) === false && this.pause(); + let e2 = this[M2] ? false : super.emit("data", t2); + return this[H2](), e2; + } + [We2]() { + return this[K2] ? false : (this[K2] = true, this.readable = false, this[B2] ? (mt2(() => this[Zt2]()), true) : this[Zt2]()); + } + [Zt2]() { + if (this[et2]) { + let e2 = this[et2].end(); + if (e2) { + for (let s2 of this[F2]) s2.dest.write(e2); + this[M2] || super.emit("data", e2); + } } - } - return true; -} -function constructYamlOmap(data) { - return null !== data ? data : []; -} -module.exports = new type_1.Type('tag:yaml.org,2002:omap', { - kind: 'sequence', - resolve: resolveYamlOmap, - construct: constructYamlOmap -}); -//# sourceMappingURL=omap.js.map - -/***/ }), - -/***/ 2594: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var type_1 = __nccwpck_require__(34642); -var ast = __nccwpck_require__(39421); -var _toString = Object.prototype.toString; -function resolveYamlPairs(data) { - if (null === data) { - return true; - } - if (data.kind != ast.Kind.SEQ) { - return false; - } - var index, length, pair, keys, result, object = data.items; - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - if ('[object Object]' !== _toString.call(pair)) { - return false; + for (let e2 of this[F2]) e2.end(); + let t2 = super.emit("end"); + return this.removeAllListeners("end"), t2; + } + async collect() { + let t2 = Object.assign([], { dataLength: 0 }); + this[k2] || (t2.dataLength = 0); + let e2 = this.promise(); + return this.on("data", (s2) => { + t2.push(s2), this[k2] || (t2.dataLength += s2.length); + }), await e2, t2; + } + async concat() { + if (this[k2]) throw new Error("cannot concat in objectMode"); + let t2 = await this.collect(); + return this[P2] ? t2.join("") : Buffer.concat(t2, t2.dataLength); + } + async promise() { + return new Promise((t2, e2) => { + this.on(x2, () => e2(new Error("stream destroyed"))), this.on("error", (s2) => e2(s2)), this.on("end", () => t2()); + }); + } + [Symbol.asyncIterator]() { + this[M2] = false; + let t2 = false, e2 = async () => (this.pause(), t2 = true, { value: void 0, done: true }); + return { next: () => { + if (t2) return e2(); + let i2 = this.read(); + if (i2 !== null) return Promise.resolve({ done: false, value: i2 }); + if (this[G2]) return e2(); + let r2, o, h = (c2) => { + this.off("data", a2), this.off("end", l2), this.off(x2, u2), e2(), o(c2); + }, a2 = (c2) => { + this.off("error", h), this.off("end", l2), this.off(x2, u2), this.pause(), r2({ value: c2, done: !!this[G2] }); + }, l2 = () => { + this.off("error", h), this.off("data", a2), this.off(x2, u2), e2(), r2({ done: true, value: void 0 }); + }, u2 = () => h(new Error("stream destroyed")); + return new Promise((c2, d) => { + o = d, r2 = c2, this.once(x2, u2), this.once("error", h), this.once("end", l2), this.once("data", a2); + }); + }, throw: e2, return: e2, [Symbol.asyncIterator]() { + return this; + }, [Symbol.asyncDispose]: async () => { + } }; + } + [Symbol.iterator]() { + this[M2] = false; + let t2 = false, e2 = () => (this.pause(), this.off(Xt2, e2), this.off(x2, e2), this.off("end", e2), t2 = true, { done: true, value: void 0 }), s2 = () => { + if (t2) return e2(); + let i2 = this.read(); + return i2 === null ? e2() : { done: false, value: i2 }; + }; + return this.once("end", e2), this.once(Xt2, e2), this.once(x2, e2), { next: s2, throw: e2, return: e2, [Symbol.iterator]() { + return this; + }, [Symbol.dispose]: () => { + } }; + } + destroy(t2) { + if (this[x2]) return t2 ? this.emit("error", t2) : this.emit(x2), this; + this[x2] = true, this[M2] = true, this[C2].length = 0, this[T2] = 0; + let e2 = this; + return typeof e2.close == "function" && !this[Rt2] && e2.close(), t2 ? this.emit("error", t2) : this.emit(x2), this; + } + static get isStream() { + return oi; + } + }; + vi = Ei.native; + wt2 = { lstatSync: wi, readdir: yi, readdirSync: bi, readlinkSync: Si, realpathSync: vi, promises: { lstat: Ci, readdir: Ti, readlink: Ai, realpath: ki } }; + Ue2 = (n8) => !n8 || n8 === wt2 || n8 === xi ? wt2 : { ...wt2, ...n8, promises: { ...wt2.promises, ...n8.promises || {} } }; + $e2 = /^\\\\\?\\([a-z]:)\\?$/i; + Ri = (n8) => n8.replace(/\//g, "\\").replace($e2, "$1\\"); + Oi = /[\\\/]/; + L2 = 0; + Ge2 = 1; + He2 = 2; + U2 = 4; + qe2 = 6; + Ke2 = 8; + X2 = 10; + Ve2 = 12; + _4 = 15; + gt2 = ~_4; + se2 = 16; + je2 = 32; + yt2 = 64; + j2 = 128; + Nt2 = 256; + Lt2 = 512; + Ie2 = yt2 | j2 | Lt2; + Fi = 1023; + ie2 = (n8) => n8.isFile() ? Ke2 : n8.isDirectory() ? U2 : n8.isSymbolicLink() ? X2 : n8.isCharacterDevice() ? He2 : n8.isBlockDevice() ? qe2 : n8.isSocket() ? Ve2 : n8.isFIFO() ? Ge2 : L2; + ze2 = new ft2({ max: 2 ** 12 }); + bt2 = (n8) => { + let t2 = ze2.get(n8); + if (t2) return t2; + let e2 = n8.normalize("NFKD"); + return ze2.set(n8, e2), e2; + }; + Be2 = new ft2({ max: 2 ** 12 }); + _t2 = (n8) => { + let t2 = Be2.get(n8); + if (t2) return t2; + let e2 = bt2(n8.toLowerCase()); + return Be2.set(n8, e2), e2; + }; + Wt2 = class extends ft2 { + constructor() { + super({ max: 256 }); + } + }; + ne2 = class extends ft2 { + constructor(t2 = 16 * 1024) { + super({ maxSize: t2, sizeCalculation: (e2) => e2.length + 1 }); + } + }; + Ye2 = /* @__PURE__ */ Symbol("PathScurry setAsCwd"); + R2 = class { + name; + root; + roots; + parent; + nocase; + isCWD = false; + #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(t2, e2 = L2, s2, i2, r2, o, h) { + this.name = t2, this.#C = r2 ? _t2(t2) : bt2(t2), this.#e = e2 & Fi, this.nocase = r2, this.roots = i2, this.root = s2 || 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 = Ue2(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(t2) { + if (!t2) return this; + let e2 = this.getRootString(t2), i2 = t2.substring(e2.length).split(this.splitSep); + return e2 ? this.getRoot(e2).#N(i2) : this.#N(i2); + } + #N(t2) { + let e2 = this; + for (let s2 of t2) e2 = e2.child(s2); + return e2; + } + children() { + let t2 = this.#_.get(this); + if (t2) return t2; + let e2 = Object.assign([], { provisional: 0 }); + return this.#_.set(this, e2), this.#e &= ~se2, e2; + } + child(t2, e2) { + if (t2 === "" || t2 === ".") return this; + if (t2 === "..") return this.parent || this; + let s2 = this.children(), i2 = this.nocase ? _t2(t2) : bt2(t2); + for (let a2 of s2) if (a2.#C === i2) return a2; + let r2 = this.parent ? this.sep : "", o = this.#g ? this.#g + r2 + t2 : void 0, h = this.newChild(t2, L2, { ...e2, parent: this, fullpath: o }); + return this.canReaddir() || (h.#e |= j2), s2.push(h), h; + } + relative() { + if (this.isCWD) return ""; + if (this.#x !== void 0) return this.#x; + let t2 = this.name, e2 = this.parent; + if (!e2) return this.#x = this.name; + let s2 = e2.relative(); + return s2 + (!s2 || !e2.parent ? "" : this.sep) + t2; + } + relativePosix() { + if (this.sep === "/") return this.relative(); + if (this.isCWD) return ""; + if (this.#A !== void 0) return this.#A; + let t2 = this.name, e2 = this.parent; + if (!e2) return this.#A = this.fullpathPosix(); + let s2 = e2.relativePosix(); + return s2 + (!s2 || !e2.parent ? "" : "/") + t2; + } + fullpath() { + if (this.#g !== void 0) return this.#g; + let t2 = this.name, e2 = this.parent; + if (!e2) return this.#g = this.name; + let i2 = e2.fullpath() + (e2.parent ? this.sep : "") + t2; + return this.#g = i2; + } + fullpathPosix() { + if (this.#y !== void 0) return this.#y; + if (this.sep === "/") return this.#y = this.fullpath(); + if (!this.parent) { + let i2 = this.fullpath().replace(/\\/g, "/"); + return /^[a-z]:\//i.test(i2) ? this.#y = `//?/${i2}` : this.#y = i2; + } + let t2 = this.parent, e2 = t2.fullpathPosix(), s2 = e2 + (!e2 || !t2.parent ? "" : "/") + this.name; + return this.#y = s2; + } + isUnknown() { + return (this.#e & _4) === L2; + } + isType(t2) { + return this[`is${t2}`](); + } + 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 & _4) === Ke2; + } + isDirectory() { + return (this.#e & _4) === U2; + } + isCharacterDevice() { + return (this.#e & _4) === He2; + } + isBlockDevice() { + return (this.#e & _4) === qe2; + } + isFIFO() { + return (this.#e & _4) === Ge2; + } + isSocket() { + return (this.#e & _4) === Ve2; + } + isSymbolicLink() { + return (this.#e & X2) === X2; + } + lstatCached() { + return this.#e & je2 ? this : void 0; + } + readlinkCached() { + return this.#M; + } + realpathCached() { + return this.#k; + } + readdirCached() { + let t2 = this.children(); + return t2.slice(0, t2.provisional); + } + canReadlink() { + if (this.#M) return true; + if (!this.parent) return false; + let t2 = this.#e & _4; + return !(t2 !== L2 && t2 !== X2 || this.#e & Nt2 || this.#e & j2); + } + calledReaddir() { + return !!(this.#e & se2); + } + isENOENT() { + return !!(this.#e & j2); + } + isNamed(t2) { + return this.nocase ? this.#C === _t2(t2) : this.#C === bt2(t2); + } + async readlink() { + let t2 = this.#M; + if (t2) return t2; + if (this.canReadlink() && this.parent) try { + let e2 = await this.#t.promises.readlink(this.fullpath()), s2 = (await this.parent.realpath())?.resolve(e2); + if (s2) return this.#M = s2; + } catch (e2) { + this.#D(e2.code); + return; } - if (!Array.isArray(pair.mappings)) { - return false; + } + readlinkSync() { + let t2 = this.#M; + if (t2) return t2; + if (this.canReadlink() && this.parent) try { + let e2 = this.#t.readlinkSync(this.fullpath()), s2 = this.parent.realpathSync()?.resolve(e2); + if (s2) return this.#M = s2; + } catch (e2) { + this.#D(e2.code); + return; } - if (1 !== pair.mappings.length) { - return false; + } + #j(t2) { + this.#e |= se2; + for (let e2 = t2.provisional; e2 < t2.length; e2++) { + let s2 = t2[e2]; + s2 && s2.#v(); } - } - return true; -} -function constructYamlPairs(data) { - if (null === data || !Array.isArray(data.items)) { - return []; - } - var index, length, keys, result, object = data.items; - result = ast.newItems(); - result.parent = data.parent; - result.startPosition = data.startPosition; - result.endPosition = data.endPosition; - for (index = 0, length = object.length; index < length; index += 1) { - var pair = object[index]; - var mapping = pair.mappings[0]; - var pairSeq = ast.newItems(); - pairSeq.parent = result; - pairSeq.startPosition = mapping.key.startPosition; - pairSeq.endPosition = mapping.value.startPosition; - mapping.key.parent = pairSeq; - mapping.value.parent = pairSeq; - pairSeq.items = [mapping.key, mapping.value]; - result.items.push(pairSeq); - } - return result; -} -module.exports = new type_1.Type('tag:yaml.org,2002:pairs', { - kind: 'sequence', - resolve: resolveYamlPairs, - construct: constructYamlPairs -}); -//# sourceMappingURL=pairs.js.map - -/***/ }), - -/***/ 25861: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var type_1 = __nccwpck_require__(34642); -module.exports = new type_1.Type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return null !== data ? data : []; } -}); -//# sourceMappingURL=seq.js.map - -/***/ }), - -/***/ 66840: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var type_1 = __nccwpck_require__(34642); -var ast = __nccwpck_require__(39421); -var _hasOwnProperty = Object.prototype.hasOwnProperty; -function resolveYamlSet(data) { - if (null === data) { - return true; - } - if (data.kind != ast.Kind.MAP) { - return false; - } - return true; -} -function constructYamlSet(data) { - return null !== data ? data : {}; -} -module.exports = new type_1.Type('tag:yaml.org,2002:set', { - kind: 'mapping', - resolve: resolveYamlSet, - construct: constructYamlSet -}); -//# sourceMappingURL=set.js.map - -/***/ }), - -/***/ 75801: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var type_1 = __nccwpck_require__(34642); -module.exports = new type_1.Type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return null !== data ? data : ''; } -}); -//# sourceMappingURL=str.js.map - -/***/ }), - -/***/ 34214: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var type_1 = __nccwpck_require__(34642); -var YAML_TIMESTAMP_REGEXP = 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 (null === data) { - return false; - } - var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; - match = YAML_TIMESTAMP_REGEXP.exec(data); - if (null === match) { - return false; - } - return true; -} -function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; - match = YAML_TIMESTAMP_REGEXP.exec(data); - if (null === match) { - 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 = fraction + '0'; + } + #v() { + this.#e & j2 || (this.#e = (this.#e | j2) & gt2, this.#G()); + } + #G() { + let t2 = this.children(); + t2.provisional = 0; + for (let e2 of t2) e2.#v(); + } + #P() { + this.#e |= Lt2, this.#L(); + } + #L() { + if (this.#e & yt2) return; + let t2 = this.#e; + (t2 & _4) === U2 && (t2 &= gt2), this.#e = t2 | yt2, this.#G(); + } + #I(t2 = "") { + t2 === "ENOTDIR" || t2 === "EPERM" ? this.#L() : t2 === "ENOENT" ? this.#v() : this.children().provisional = 0; + } + #F(t2 = "") { + t2 === "ENOTDIR" ? this.parent.#L() : t2 === "ENOENT" && this.#v(); + } + #D(t2 = "") { + let e2 = this.#e; + e2 |= Nt2, t2 === "ENOENT" && (e2 |= j2), (t2 === "EINVAL" || t2 === "UNKNOWN") && (e2 &= gt2), this.#e = e2, t2 === "ENOTDIR" && this.parent && this.parent.#L(); + } + #z(t2, e2) { + return this.#U(t2, e2) || this.#B(t2, e2); + } + #B(t2, e2) { + let s2 = ie2(t2), i2 = this.newChild(t2.name, s2, { parent: this }), r2 = i2.#e & _4; + return r2 !== U2 && r2 !== X2 && r2 !== L2 && (i2.#e |= yt2), e2.unshift(i2), e2.provisional++, i2; + } + #U(t2, e2) { + for (let s2 = e2.provisional; s2 < e2.length; s2++) { + let i2 = e2[s2]; + if ((this.nocase ? _t2(t2.name) : bt2(t2.name)) === i2.#C) return this.#l(t2, i2, s2, e2); } - fraction = +fraction; - } - if (match[9]) { - tz_hour = +(match[10]); - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 60000; - if ('-' === match[9]) { - delta = -delta; + } + #l(t2, e2, s2, i2) { + let r2 = e2.name; + return e2.#e = e2.#e & gt2 | ie2(t2), r2 !== t2.name && (e2.name = t2.name), s2 !== i2.provisional && (s2 === i2.length - 1 ? i2.pop() : i2.splice(s2, 1), i2.unshift(e2)), i2.provisional++, e2; + } + async lstat() { + if ((this.#e & j2) === 0) try { + return this.#$(await this.#t.promises.lstat(this.fullpath())), this; + } catch (t2) { + this.#F(t2.code); } - } - 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_1.Type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}); -//# sourceMappingURL=timestamp.js.map - -/***/ }), - -/***/ 39421: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var Kind; -(function (Kind) { - Kind[Kind["SCALAR"] = 0] = "SCALAR"; - Kind[Kind["MAPPING"] = 1] = "MAPPING"; - Kind[Kind["MAP"] = 2] = "MAP"; - Kind[Kind["SEQ"] = 3] = "SEQ"; - Kind[Kind["ANCHOR_REF"] = 4] = "ANCHOR_REF"; - Kind[Kind["INCLUDE_REF"] = 5] = "INCLUDE_REF"; -})(Kind = exports.Kind || (exports.Kind = {})); -function newMapping(key, value) { - var end = (value ? value.endPosition : key.endPosition + 1); - var node = { - key: key, - value: value, - startPosition: key.startPosition, - endPosition: end, - kind: Kind.MAPPING, - parent: null, - errors: [] - }; - return node; -} -exports.newMapping = newMapping; -function newAnchorRef(key, start, end, value) { - return { - errors: [], - referencesAnchor: key, - value: value, - startPosition: start, - endPosition: end, - kind: Kind.ANCHOR_REF, - parent: null + } + lstatSync() { + if ((this.#e & j2) === 0) try { + return this.#$(this.#t.lstatSync(this.fullpath())), this; + } catch (t2) { + this.#F(t2.code); + } + } + #$(t2) { + let { atime: e2, atimeMs: s2, birthtime: i2, birthtimeMs: r2, blksize: o, blocks: h, ctime: a2, ctimeMs: l2, dev: u2, gid: c2, ino: d, mode: f, mtime: m, mtimeMs: p2, nlink: w2, rdev: g2, size: S2, uid: E2 } = t2; + this.#b = e2, this.#a = s2, this.#m = i2, this.#E = r2, this.#c = o, this.#f = h, this.#R = a2, this.#d = l2, this.#s = u2, this.#S = c2, this.#h = d, this.#n = f, this.#p = m, this.#i = p2, this.#r = w2, this.#w = g2, this.#u = S2, this.#o = E2; + let y2 = ie2(t2); + this.#e = this.#e & gt2 | y2 | je2, y2 !== L2 && y2 !== U2 && y2 !== X2 && (this.#e |= yt2); + } + #W = []; + #O = false; + #H(t2) { + this.#O = false; + let e2 = this.#W.slice(); + this.#W.length = 0, e2.forEach((s2) => s2(null, t2)); + } + readdirCB(t2, e2 = false) { + if (!this.canReaddir()) { + e2 ? t2(null, []) : queueMicrotask(() => t2(null, [])); + return; + } + let s2 = this.children(); + if (this.calledReaddir()) { + let r2 = s2.slice(0, s2.provisional); + e2 ? t2(null, r2) : queueMicrotask(() => t2(null, r2)); + return; + } + if (this.#W.push(t2), this.#O) return; + this.#O = true; + let i2 = this.fullpath(); + this.#t.readdir(i2, { withFileTypes: true }, (r2, o) => { + if (r2) this.#I(r2.code), s2.provisional = 0; + else { + for (let h of o) this.#z(h, s2); + this.#j(s2); + } + this.#H(s2.slice(0, s2.provisional)); + }); + } + #q; + async readdir() { + if (!this.canReaddir()) return []; + let t2 = this.children(); + if (this.calledReaddir()) return t2.slice(0, t2.provisional); + let e2 = this.fullpath(); + if (this.#q) await this.#q; + else { + let s2 = () => { + }; + this.#q = new Promise((i2) => s2 = i2); + try { + for (let i2 of await this.#t.promises.readdir(e2, { withFileTypes: true })) this.#z(i2, t2); + this.#j(t2); + } catch (i2) { + this.#I(i2.code), t2.provisional = 0; + } + this.#q = void 0, s2(); + } + return t2.slice(0, t2.provisional); + } + readdirSync() { + if (!this.canReaddir()) return []; + let t2 = this.children(); + if (this.calledReaddir()) return t2.slice(0, t2.provisional); + let e2 = this.fullpath(); + try { + for (let s2 of this.#t.readdirSync(e2, { withFileTypes: true })) this.#z(s2, t2); + this.#j(t2); + } catch (s2) { + this.#I(s2.code), t2.provisional = 0; + } + return t2.slice(0, t2.provisional); + } + canReaddir() { + if (this.#e & Ie2) return false; + let t2 = _4 & this.#e; + return t2 === L2 || t2 === U2 || t2 === X2; + } + shouldWalk(t2, e2) { + return (this.#e & U2) === U2 && !(this.#e & Ie2) && !t2.has(this) && (!e2 || e2(this)); + } + async realpath() { + if (this.#k) return this.#k; + if (!((Lt2 | Nt2 | j2) & this.#e)) try { + let t2 = await this.#t.promises.realpath(this.fullpath()); + return this.#k = this.resolve(t2); + } catch { + this.#P(); + } + } + realpathSync() { + if (this.#k) return this.#k; + if (!((Lt2 | Nt2 | j2) & this.#e)) try { + let t2 = this.#t.realpathSync(this.fullpath()); + return this.#k = this.resolve(t2); + } catch { + this.#P(); + } + } + [Ye2](t2) { + if (t2 === this) return; + t2.isCWD = false, this.isCWD = true; + let e2 = /* @__PURE__ */ new Set([]), s2 = [], i2 = this; + for (; i2 && i2.parent; ) e2.add(i2), i2.#x = s2.join(this.sep), i2.#A = s2.join("/"), i2 = i2.parent, s2.push(".."); + for (i2 = t2; i2 && i2.parent && !e2.has(i2); ) i2.#x = void 0, i2.#A = void 0, i2 = i2.parent; + } }; -} -exports.newAnchorRef = newAnchorRef; -function newScalar(v) { - if (v === void 0) { v = ""; } - var result = { - errors: [], - startPosition: -1, - endPosition: -1, - value: "" + v, - kind: Kind.SCALAR, - parent: null, - doubleQuoted: false, - rawValue: "" + v, + Pt2 = class n3 extends R2 { + sep = "\\"; + splitSep = Oi; + constructor(t2, e2 = L2, s2, i2, r2, o, h) { + super(t2, e2, s2, i2, r2, o, h); + } + newChild(t2, e2 = L2, s2 = {}) { + return new n3(t2, e2, this.root, this.roots, this.nocase, this.childrenCache(), s2); + } + getRootString(t2) { + return re2.parse(t2).root; + } + getRoot(t2) { + if (t2 = Ri(t2.toUpperCase()), t2 === this.root.name) return this.root; + for (let [e2, s2] of Object.entries(this.roots)) if (this.sameRoot(t2, e2)) return this.roots[t2] = s2; + return this.roots[t2] = new it2(t2, this).root; + } + sameRoot(t2, e2 = this.root.name) { + return t2 = t2.toUpperCase().replace(/\//g, "\\").replace($e2, "$1\\"), t2 === e2; + } }; - if (typeof v !== "string") { - result.valueObject = v; - } - return result; -} -exports.newScalar = newScalar; -function newItems() { - return { - errors: [], - startPosition: -1, - endPosition: -1, - items: [], - kind: Kind.SEQ, - parent: null + jt2 = class n4 extends R2 { + splitSep = "/"; + sep = "/"; + constructor(t2, e2 = L2, s2, i2, r2, o, h) { + super(t2, e2, s2, i2, r2, o, h); + } + getRootString(t2) { + return t2.startsWith("/") ? "/" : ""; + } + getRoot(t2) { + return this.root; + } + newChild(t2, e2 = L2, s2 = {}) { + return new n4(t2, e2, this.root, this.roots, this.nocase, this.childrenCache(), s2); + } }; -} -exports.newItems = newItems; -function newSeq() { - return newItems(); -} -exports.newSeq = newSeq; -function newMap(mappings) { - return { - errors: [], - startPosition: -1, - endPosition: -1, - mappings: mappings ? mappings : [], - kind: Kind.MAP, - parent: null + It2 = class { + root; + rootPath; + roots; + cwd; + #t; + #s; + #n; + nocase; + #r; + constructor(t2 = process.cwd(), e2, s2, { nocase: i2, childrenCacheSize: r2 = 16 * 1024, fs: o = wt2 } = {}) { + this.#r = Ue2(o), (t2 instanceof URL || t2.startsWith("file://")) && (t2 = gi(t2)); + let h = e2.resolve(t2); + this.roots = /* @__PURE__ */ Object.create(null), this.rootPath = this.parseRootPath(h), this.#t = new Wt2(), this.#s = new Wt2(), this.#n = new ne2(r2); + let a2 = h.substring(this.rootPath.length).split(s2); + if (a2.length === 1 && !a2[0] && a2.pop(), i2 === void 0) throw new TypeError("must provide nocase setting to PathScurryBase ctor"); + this.nocase = i2, this.root = this.newRoot(this.#r), this.roots[this.rootPath] = this.root; + let l2 = this.root, u2 = a2.length - 1, c2 = e2.sep, d = this.rootPath, f = false; + for (let m of a2) { + let p2 = u2--; + l2 = l2.child(m, { relative: new Array(p2).fill("..").join(c2), relativePosix: new Array(p2).fill("..").join("/"), fullpath: d += (f ? "" : c2) + m }), f = true; + } + this.cwd = l2; + } + depth(t2 = this.cwd) { + return typeof t2 == "string" && (t2 = this.cwd.resolve(t2)), t2.depth(); + } + childrenCache() { + return this.#n; + } + resolve(...t2) { + let e2 = ""; + for (let r2 = t2.length - 1; r2 >= 0; r2--) { + let o = t2[r2]; + if (!(!o || o === ".") && (e2 = e2 ? `${o}/${e2}` : o, this.isAbsolute(o))) break; + } + let s2 = this.#t.get(e2); + if (s2 !== void 0) return s2; + let i2 = this.cwd.resolve(e2).fullpath(); + return this.#t.set(e2, i2), i2; + } + resolvePosix(...t2) { + let e2 = ""; + for (let r2 = t2.length - 1; r2 >= 0; r2--) { + let o = t2[r2]; + if (!(!o || o === ".") && (e2 = e2 ? `${o}/${e2}` : o, this.isAbsolute(o))) break; + } + let s2 = this.#s.get(e2); + if (s2 !== void 0) return s2; + let i2 = this.cwd.resolve(e2).fullpathPosix(); + return this.#s.set(e2, i2), i2; + } + relative(t2 = this.cwd) { + return typeof t2 == "string" && (t2 = this.cwd.resolve(t2)), t2.relative(); + } + relativePosix(t2 = this.cwd) { + return typeof t2 == "string" && (t2 = this.cwd.resolve(t2)), t2.relativePosix(); + } + basename(t2 = this.cwd) { + return typeof t2 == "string" && (t2 = this.cwd.resolve(t2)), t2.name; + } + dirname(t2 = this.cwd) { + return typeof t2 == "string" && (t2 = this.cwd.resolve(t2)), (t2.parent || t2).fullpath(); + } + async readdir(t2 = this.cwd, e2 = { withFileTypes: true }) { + typeof t2 == "string" ? t2 = this.cwd.resolve(t2) : t2 instanceof R2 || (e2 = t2, t2 = this.cwd); + let { withFileTypes: s2 } = e2; + if (t2.canReaddir()) { + let i2 = await t2.readdir(); + return s2 ? i2 : i2.map((r2) => r2.name); + } else return []; + } + readdirSync(t2 = this.cwd, e2 = { withFileTypes: true }) { + typeof t2 == "string" ? t2 = this.cwd.resolve(t2) : t2 instanceof R2 || (e2 = t2, t2 = this.cwd); + let { withFileTypes: s2 = true } = e2; + return t2.canReaddir() ? s2 ? t2.readdirSync() : t2.readdirSync().map((i2) => i2.name) : []; + } + async lstat(t2 = this.cwd) { + return typeof t2 == "string" && (t2 = this.cwd.resolve(t2)), t2.lstat(); + } + lstatSync(t2 = this.cwd) { + return typeof t2 == "string" && (t2 = this.cwd.resolve(t2)), t2.lstatSync(); + } + async readlink(t2 = this.cwd, { withFileTypes: e2 } = { withFileTypes: false }) { + typeof t2 == "string" ? t2 = this.cwd.resolve(t2) : t2 instanceof R2 || (e2 = t2.withFileTypes, t2 = this.cwd); + let s2 = await t2.readlink(); + return e2 ? s2 : s2?.fullpath(); + } + readlinkSync(t2 = this.cwd, { withFileTypes: e2 } = { withFileTypes: false }) { + typeof t2 == "string" ? t2 = this.cwd.resolve(t2) : t2 instanceof R2 || (e2 = t2.withFileTypes, t2 = this.cwd); + let s2 = t2.readlinkSync(); + return e2 ? s2 : s2?.fullpath(); + } + async realpath(t2 = this.cwd, { withFileTypes: e2 } = { withFileTypes: false }) { + typeof t2 == "string" ? t2 = this.cwd.resolve(t2) : t2 instanceof R2 || (e2 = t2.withFileTypes, t2 = this.cwd); + let s2 = await t2.realpath(); + return e2 ? s2 : s2?.fullpath(); + } + realpathSync(t2 = this.cwd, { withFileTypes: e2 } = { withFileTypes: false }) { + typeof t2 == "string" ? t2 = this.cwd.resolve(t2) : t2 instanceof R2 || (e2 = t2.withFileTypes, t2 = this.cwd); + let s2 = t2.realpathSync(); + return e2 ? s2 : s2?.fullpath(); + } + async walk(t2 = this.cwd, e2 = {}) { + typeof t2 == "string" ? t2 = this.cwd.resolve(t2) : t2 instanceof R2 || (e2 = t2, t2 = this.cwd); + let { withFileTypes: s2 = true, follow: i2 = false, filter: r2, walkFilter: o } = e2, h = []; + (!r2 || r2(t2)) && h.push(s2 ? t2 : t2.fullpath()); + let a2 = /* @__PURE__ */ new Set(), l2 = (c2, d) => { + a2.add(c2), c2.readdirCB((f, m) => { + if (f) return d(f); + let p2 = m.length; + if (!p2) return d(); + let w2 = () => { + --p2 === 0 && d(); + }; + for (let g2 of m) (!r2 || r2(g2)) && h.push(s2 ? g2 : g2.fullpath()), i2 && g2.isSymbolicLink() ? g2.realpath().then((S2) => S2?.isUnknown() ? S2.lstat() : S2).then((S2) => S2?.shouldWalk(a2, o) ? l2(S2, w2) : w2()) : g2.shouldWalk(a2, o) ? l2(g2, w2) : w2(); + }, true); + }, u2 = t2; + return new Promise((c2, d) => { + l2(u2, (f) => { + if (f) return d(f); + c2(h); + }); + }); + } + walkSync(t2 = this.cwd, e2 = {}) { + typeof t2 == "string" ? t2 = this.cwd.resolve(t2) : t2 instanceof R2 || (e2 = t2, t2 = this.cwd); + let { withFileTypes: s2 = true, follow: i2 = false, filter: r2, walkFilter: o } = e2, h = []; + (!r2 || r2(t2)) && h.push(s2 ? t2 : t2.fullpath()); + let a2 = /* @__PURE__ */ new Set([t2]); + for (let l2 of a2) { + let u2 = l2.readdirSync(); + for (let c2 of u2) { + (!r2 || r2(c2)) && h.push(s2 ? c2 : c2.fullpath()); + let d = c2; + if (c2.isSymbolicLink()) { + if (!(i2 && (d = c2.realpathSync()))) continue; + d.isUnknown() && d.lstatSync(); + } + d.shouldWalk(a2, o) && a2.add(d); + } + } + return h; + } + [Symbol.asyncIterator]() { + return this.iterate(); + } + iterate(t2 = this.cwd, e2 = {}) { + return typeof t2 == "string" ? t2 = this.cwd.resolve(t2) : t2 instanceof R2 || (e2 = t2, t2 = this.cwd), this.stream(t2, e2)[Symbol.asyncIterator](); + } + [Symbol.iterator]() { + return this.iterateSync(); + } + *iterateSync(t2 = this.cwd, e2 = {}) { + typeof t2 == "string" ? t2 = this.cwd.resolve(t2) : t2 instanceof R2 || (e2 = t2, t2 = this.cwd); + let { withFileTypes: s2 = true, follow: i2 = false, filter: r2, walkFilter: o } = e2; + (!r2 || r2(t2)) && (yield s2 ? t2 : t2.fullpath()); + let h = /* @__PURE__ */ new Set([t2]); + for (let a2 of h) { + let l2 = a2.readdirSync(); + for (let u2 of l2) { + (!r2 || r2(u2)) && (yield s2 ? u2 : u2.fullpath()); + let c2 = u2; + if (u2.isSymbolicLink()) { + if (!(i2 && (c2 = u2.realpathSync()))) continue; + c2.isUnknown() && c2.lstatSync(); + } + c2.shouldWalk(h, o) && h.add(c2); + } + } + } + stream(t2 = this.cwd, e2 = {}) { + typeof t2 == "string" ? t2 = this.cwd.resolve(t2) : t2 instanceof R2 || (e2 = t2, t2 = this.cwd); + let { withFileTypes: s2 = true, follow: i2 = false, filter: r2, walkFilter: o } = e2, h = new V2({ objectMode: true }); + (!r2 || r2(t2)) && h.write(s2 ? t2 : t2.fullpath()); + let a2 = /* @__PURE__ */ new Set(), l2 = [t2], u2 = 0, c2 = () => { + let d = false; + for (; !d; ) { + let f = l2.shift(); + if (!f) { + u2 === 0 && h.end(); + return; + } + u2++, a2.add(f); + let m = (w2, g2, S2 = false) => { + if (w2) return h.emit("error", w2); + if (i2 && !S2) { + let E2 = []; + for (let y2 of g2) y2.isSymbolicLink() && E2.push(y2.realpath().then((b2) => b2?.isUnknown() ? b2.lstat() : b2)); + if (E2.length) { + Promise.all(E2).then(() => m(null, g2, true)); + return; + } + } + for (let E2 of g2) E2 && (!r2 || r2(E2)) && (h.write(s2 ? E2 : E2.fullpath()) || (d = true)); + u2--; + for (let E2 of g2) { + let y2 = E2.realpathCached() || E2; + y2.shouldWalk(a2, o) && l2.push(y2); + } + d && !h.flowing ? h.once("drain", c2) : p2 || c2(); + }, p2 = true; + f.readdirCB(m, true), p2 = false; + } + }; + return c2(), h; + } + streamSync(t2 = this.cwd, e2 = {}) { + typeof t2 == "string" ? t2 = this.cwd.resolve(t2) : t2 instanceof R2 || (e2 = t2, t2 = this.cwd); + let { withFileTypes: s2 = true, follow: i2 = false, filter: r2, walkFilter: o } = e2, h = new V2({ objectMode: true }), a2 = /* @__PURE__ */ new Set(); + (!r2 || r2(t2)) && h.write(s2 ? t2 : t2.fullpath()); + let l2 = [t2], u2 = 0, c2 = () => { + let d = false; + for (; !d; ) { + let f = l2.shift(); + if (!f) { + u2 === 0 && h.end(); + return; + } + u2++, a2.add(f); + let m = f.readdirSync(); + for (let p2 of m) (!r2 || r2(p2)) && (h.write(s2 ? p2 : p2.fullpath()) || (d = true)); + u2--; + for (let p2 of m) { + let w2 = p2; + if (p2.isSymbolicLink()) { + if (!(i2 && (w2 = p2.realpathSync()))) continue; + w2.isUnknown() && w2.lstatSync(); + } + w2.shouldWalk(a2, o) && l2.push(w2); + } + } + d && !h.flowing && h.once("drain", c2); + }; + return c2(), h; + } + chdir(t2 = this.cwd) { + let e2 = this.cwd; + this.cwd = typeof t2 == "string" ? this.cwd.resolve(t2) : t2, this.cwd[Ye2](e2); + } }; -} -exports.newMap = newMap; -//# sourceMappingURL=yamlAST.js.map - -/***/ }), - -/***/ 43015: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRedoclyConfig = exports.getCommitSha = exports.parseEventData = exports.parseInputData = void 0; -const path_1 = __importDefault(__nccwpck_require__(71017)); -const core = __importStar(__nccwpck_require__(42186)); -const github = __importStar(__nccwpck_require__(95438)); -const openapi_core_1 = __nccwpck_require__(59307); -function parseInputData() { - const redoclyOrgSlug = core.getInput('organization', { required: true }); - const redoclyProjectSlug = core.getInput('project', { required: true }); - const mountPath = core.getInput('mountPath', { required: true }); - const files = core.getInput('files', { required: true }).split(' '); - const redoclyDomain = core.getInput('domain') || 'https://app.cloud.redocly.com'; - const maxExecutionTime = Number(core.getInput('maxExecutionTime')) || 1200; - const defaultBranch = core.getInput('defaultBranch') || undefined; - const absoluteFilePaths = files.map(_path => path_1.default.join(process.env.GITHUB_WORKSPACE || '', _path)); - return { - redoclyOrgSlug, - redoclyProjectSlug, - mountPath, - files: absoluteFilePaths, - redoclyDomain, - maxExecutionTime, - defaultBranch, + it2 = class extends It2 { + sep = "\\"; + constructor(t2 = process.cwd(), e2 = {}) { + let { nocase: s2 = true } = e2; + super(t2, re2, "\\", { ...e2, nocase: s2 }), this.nocase = s2; + for (let i2 = this.cwd; i2; i2 = i2.parent) i2.nocase = this.nocase; + } + parseRootPath(t2) { + return re2.parse(t2).root.toUpperCase(); + } + newRoot(t2) { + return new Pt2(this.rootPath, U2, void 0, this.roots, this.nocase, this.childrenCache(), { fs: t2 }); + } + isAbsolute(t2) { + return t2.startsWith("/") || t2.startsWith("\\") || /^[a-z]:(\/|\\)/i.test(t2); + } }; -} -exports.parseInputData = parseInputData; -async function parseEventData(defaultBranchOverride) { - if (!(github.context.eventName === 'push' || - github.context.eventName === 'pull_request')) { - throw new Error('Unsupported GitHub event type. Only "push" and "pull_request" events are supported.'); - } - if (github.context.eventName === 'pull_request') { - const allowedActions = ['opened', 'synchronize', 'reopened']; - if (!github.context.payload.action || - !allowedActions.includes(github.context.payload.action)) { - throw new Error('Unsupported GitHub event. Only "opened", "synchronize" and "reopened" actions are supported for pull requests.'); - } - } - const namespace = github.context.payload?.repository?.owner?.login; - const repository = github.context.payload?.repository?.name; - if (!namespace || !repository) { - throw new Error('Invalid GitHub event data. Can not get owner or repository name from the event payload.'); - } - const branch = github.context.payload.pull_request?.['head']?.['ref'] || - github.context.ref.replace('refs/heads/', ''); - if (!branch) { - throw new Error('Invalid GitHub event data. Can not get branch from the event payload.'); - } - const defaultBranch = defaultBranchOverride || - github.context.payload?.repository?.default_branch || - github.context.payload?.repository?.master_branch; - if (!defaultBranch) { - throw new Error('Invalid GitHub event data. Can not get default branch from the event payload. You can use the "defaultBranch" input to set it manually.'); - } - const commitSha = getCommitSha(); - if (!commitSha) { - throw new Error('Invalid GitHub event data. Can not get commit sha from the event payload.'); - } - const githubToken = core.getInput('githubToken'); - const octokit = github.getOctokit(githubToken); - const { data: commitData } = await octokit.rest.repos.getCommit({ - owner: namespace, - repo: repository, - ref: commitSha, - }); - if (!commitData.commit.author?.name || !commitData.commit.author?.email) { - throw new Error('Invalid GitHub event data. Can not get author name or email from the event payload.'); - } - const commit = { - commitSha, - commitMessage: commitData.commit.message, - commitUrl: commitData.html_url, - commitAuthor: `${commitData.commit.author?.name} <${commitData.commit.author?.email}>`, - commitCreatedAt: commitData.commit.author?.date, + rt2 = class extends It2 { + sep = "/"; + constructor(t2 = process.cwd(), e2 = {}) { + let { nocase: s2 = false } = e2; + super(t2, mi, "/", { ...e2, nocase: s2 }), this.nocase = s2; + } + parseRootPath(t2) { + return "/"; + } + newRoot(t2) { + return new jt2(this.rootPath, U2, void 0, this.roots, this.nocase, this.childrenCache(), { fs: t2 }); + } + isAbsolute(t2) { + return t2.startsWith("/"); + } }; - return { - eventName: github.context.eventName, - namespace, - repository, - branch, - defaultBranch, - commit, + St2 = class extends rt2 { + constructor(t2 = process.cwd(), e2 = {}) { + let { nocase: s2 = true } = e2; + super(t2, { ...e2, nocase: s2 }); + } }; -} -exports.parseEventData = parseEventData; -function getCommitSha() { - if (github.context.eventName === 'push') { - return github.context.payload.after; - } - if (github.context.eventName === 'pull_request') { - return github.context.payload.pull_request?.head?.sha; - } -} -exports.getCommitSha = getCommitSha; -// Returns parsed config from the root or default config if not found -async function getRedoclyConfig() { - const redoclyConfig = await (0, openapi_core_1.loadConfig)(); - return redoclyConfig; -} -exports.getRedoclyConfig = getRedoclyConfig; - - -/***/ }), - -/***/ 70399: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.run = void 0; -const core = __importStar(__nccwpck_require__(42186)); -const push_1 = __nccwpck_require__(72775); -const push_status_1 = __nccwpck_require__(39547); -const set_commit_statuses_1 = __nccwpck_require__(4108); -const helpers_1 = __nccwpck_require__(43015); -const package_json_1 = __nccwpck_require__(4147); -const redoclyCliVersion = package_json_1.dependencies['@redocly/cli']; -async function run() { - try { - const inputData = (0, helpers_1.parseInputData)(); - const ghEvent = await (0, helpers_1.parseEventData)(inputData.defaultBranch); - console.debug('Parsed input data', inputData); - console.debug('Parsed GitHub event', ghEvent); - const config = await (0, helpers_1.getRedoclyConfig)(); - const pushData = await (0, push_1.handlePush)({ - argv: { - domain: inputData.redoclyDomain, - organization: inputData.redoclyOrgSlug, - project: inputData.redoclyProjectSlug, - 'mount-path': inputData.mountPath, - files: inputData.files, - 'max-execution-time': inputData.maxExecutionTime, - namespace: ghEvent.namespace, - repository: ghEvent.repository, - branch: ghEvent.branch, - 'default-branch': ghEvent.defaultBranch, - message: ghEvent.commit.commitMessage, - 'commit-sha': ghEvent.commit.commitSha, - 'commit-url': ghEvent.commit.commitUrl, - author: ghEvent.commit.commitAuthor, - 'created-at': ghEvent.commit.commitCreatedAt, - }, - config, - version: redoclyCliVersion, - }); - if (!pushData?.pushId) { - throw new Error('Missing push ID'); - } - const pushStatusData = await (0, push_status_1.handlePushStatus)({ - argv: { - organization: inputData.redoclyOrgSlug, - project: inputData.redoclyProjectSlug, - pushId: pushData.pushId, - domain: inputData.redoclyDomain, - wait: true, - 'continue-on-deploy-failures': true, - 'max-execution-time': inputData.maxExecutionTime, - onRetry: async (lastResult) => { - try { - await (0, set_commit_statuses_1.setCommitStatuses)({ - commitStatuses: lastResult.commit.statuses, - owner: ghEvent.namespace, - repo: ghEvent.repository, - commitId: ghEvent.commit.commitSha, - }); - } - catch (error) { - core.error(`Failed to set commit statuses. Error: ${error?.message}`); - } - }, - }, - config, - version: redoclyCliVersion, - }); - if (!pushStatusData) { - throw new Error('Missing push status data'); - } - console.debug('Amount of final commit statuses to set', pushStatusData.commit.statuses.length); - await (0, set_commit_statuses_1.setCommitStatuses)({ - commitStatuses: pushStatusData.commit.statuses, - owner: ghEvent.namespace, - repo: ghEvent.repository, - commitId: ghEvent.commit.commitSha, - }); - console.debug('Action finished successfully. Push ID:', pushData.pushId); - core.setOutput('pushId', pushData.pushId); - } - catch (error) { - if (error instanceof Error) - core.setFailed(error.message); - } -} -exports.run = run; - - -/***/ }), - -/***/ 4108: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -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 (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.setCommitStatuses = void 0; -const core = __importStar(__nccwpck_require__(42186)); -const github = __importStar(__nccwpck_require__(95438)); -async function setCommitStatuses({ commitStatuses, owner, repo, commitId, }) { - const githubToken = core.getInput('githubToken'); - const octokit = github.getOctokit(githubToken); - if (commitStatuses?.length > 0) { - // TBD: Should we add a concurrency limit here to avoid hitting rate limits? - await Promise.all(commitStatuses.map(async (status) => { - await octokit.rest.repos.createCommitStatus({ - owner, - repo, - sha: commitId, - state: mapDeploymentStateToGithubCommitState(status.status), - target_url: status.url, - context: status.name, - description: status.description, - }); - })); - } -} -exports.setCommitStatuses = setCommitStatuses; -function mapDeploymentStateToGithubCommitState(state) { - switch (state) { - case 'pending': - case 'running': - return 'pending'; - case 'success': - return 'success'; - case 'failed': - return 'error'; - default: - throw new TypeError(`Unknown deployment state: ${state}`); - } -} - - -/***/ }), - -/***/ 39491: -/***/ ((module) => { - -"use strict"; -module.exports = require("assert"); - -/***/ }), - -/***/ 50852: -/***/ ((module) => { - -"use strict"; -module.exports = require("async_hooks"); - -/***/ }), - -/***/ 14300: -/***/ ((module) => { - -"use strict"; -module.exports = require("buffer"); - -/***/ }), - -/***/ 32081: -/***/ ((module) => { - -"use strict"; -module.exports = require("child_process"); - -/***/ }), - -/***/ 6113: -/***/ ((module) => { - -"use strict"; -module.exports = require("crypto"); - -/***/ }), - -/***/ 82361: -/***/ ((module) => { - -"use strict"; -module.exports = require("events"); - -/***/ }), - -/***/ 57147: -/***/ ((module) => { - -"use strict"; -module.exports = require("fs"); - -/***/ }), - -/***/ 13685: -/***/ ((module) => { - -"use strict"; -module.exports = require("http"); - -/***/ }), - -/***/ 95687: -/***/ ((module) => { - -"use strict"; -module.exports = require("https"); - -/***/ }), - -/***/ 41808: -/***/ ((module) => { - -"use strict"; -module.exports = require("net"); - -/***/ }), - -/***/ 98061: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:assert"); - -/***/ }), - -/***/ 92761: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:async_hooks"); - -/***/ }), - -/***/ 72254: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:buffer"); - -/***/ }), - -/***/ 40027: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:console"); - -/***/ }), - -/***/ 6005: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:crypto"); - -/***/ }), - -/***/ 65714: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:diagnostics_channel"); - -/***/ }), - -/***/ 30604: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:dns"); - -/***/ }), - -/***/ 15673: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:events"); - -/***/ }), - -/***/ 87561: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:fs"); - -/***/ }), - -/***/ 93977: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:fs/promises"); - -/***/ }), - -/***/ 88849: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:http"); - -/***/ }), - -/***/ 42725: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:http2"); - -/***/ }), - -/***/ 87503: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:net"); - -/***/ }), - -/***/ 70612: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:os"); - -/***/ }), - -/***/ 49411: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:path"); - -/***/ }), - -/***/ 38846: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:perf_hooks"); - -/***/ }), - -/***/ 39630: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:querystring"); - -/***/ }), - -/***/ 55467: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:sqlite"); - -/***/ }), - -/***/ 84492: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:stream"); - -/***/ }), - -/***/ 92332: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:timers"); - -/***/ }), - -/***/ 31764: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:tls"); - -/***/ }), - -/***/ 41041: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:url"); - -/***/ }), - -/***/ 47261: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:util"); - -/***/ }), - -/***/ 93746: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:util/types"); - -/***/ }), - -/***/ 24086: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:worker_threads"); - -/***/ }), - -/***/ 65628: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:zlib"); - -/***/ }), - -/***/ 22037: -/***/ ((module) => { - -"use strict"; -module.exports = require("os"); - -/***/ }), - -/***/ 71017: -/***/ ((module) => { - -"use strict"; -module.exports = require("path"); - -/***/ }), - -/***/ 4074: -/***/ ((module) => { - -"use strict"; -module.exports = require("perf_hooks"); - -/***/ }), - -/***/ 77282: -/***/ ((module) => { - -"use strict"; -module.exports = require("process"); - -/***/ }), - -/***/ 14521: -/***/ ((module) => { - -"use strict"; -module.exports = require("readline"); - -/***/ }), - -/***/ 12781: -/***/ ((module) => { - -"use strict"; -module.exports = require("stream"); + Cr2 = process.platform === "win32" ? Pt2 : jt2; + Xe2 = process.platform === "win32" ? it2 : process.platform === "darwin" ? St2 : rt2; + Di = (n8) => n8.length >= 1; + Mi = (n8) => n8.length >= 1; + Ni = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom"); + nt2 = class n5 { + #t; + #s; + #n; + length; + #r; + #o; + #S; + #w; + #c; + #h; + #u = true; + constructor(t2, e2, s2, i2) { + if (!Di(t2)) throw new TypeError("empty pattern list"); + if (!Mi(e2)) throw new TypeError("empty glob list"); + if (e2.length !== t2.length) throw new TypeError("mismatched pattern list and glob list lengths"); + if (this.length = t2.length, s2 < 0 || s2 >= this.length) throw new TypeError("index out of range"); + if (this.#t = t2, this.#s = e2, this.#n = s2, this.#r = i2, this.#n === 0) { + if (this.isUNC()) { + let [r2, o, h, a2, ...l2] = this.#t, [u2, c2, d, f, ...m] = this.#s; + l2[0] === "" && (l2.shift(), m.shift()); + let p2 = [r2, o, h, a2, ""].join("/"), w2 = [u2, c2, d, f, ""].join("/"); + this.#t = [p2, ...l2], this.#s = [w2, ...m], this.length = this.#t.length; + } else if (this.isDrive() || this.isAbsolute()) { + let [r2, ...o] = this.#t, [h, ...a2] = this.#s; + o[0] === "" && (o.shift(), a2.shift()); + let l2 = r2 + "/", u2 = h + "/"; + this.#t = [l2, ...o], this.#s = [u2, ...a2], 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] === A2; + } + 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 n5(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 t2 = this.#t; + return this.#c !== void 0 ? this.#c : this.#c = this.#r === "win32" && this.#n === 0 && t2[0] === "" && t2[1] === "" && typeof t2[2] == "string" && !!t2[2] && typeof t2[3] == "string" && !!t2[3]; + } + isDrive() { + let t2 = this.#t; + return this.#w !== void 0 ? this.#w : this.#w = this.#r === "win32" && this.#n === 0 && this.length > 1 && typeof t2[0] == "string" && /^[a-z]:$/i.test(t2[0]); + } + isAbsolute() { + let t2 = this.#t; + return this.#h !== void 0 ? this.#h : this.#h = t2[0] === "" && t2.length > 1 || this.isDrive() || this.isUNC(); + } + root() { + let t2 = this.#t[0]; + return typeof t2 == "string" && this.isAbsolute() && this.#n === 0 ? t2 : ""; + } + checkFollowGlobstar() { + return !(this.#n === 0 || !this.isGlobstar() || !this.#u); + } + markFollowGlobstar() { + return this.#n === 0 || !this.isGlobstar() || !this.#u ? false : (this.#u = false, true); + } + }; + _i = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux"; + ot2 = class { + relative; + relativeChildren; + absolute; + absoluteChildren; + platform; + mmopts; + constructor(t2, { nobrace: e2, nocase: s2, noext: i2, noglobstar: r2, platform: o = _i }) { + this.relative = [], this.absolute = [], this.relativeChildren = [], this.absoluteChildren = [], this.platform = o, this.mmopts = { dot: true, nobrace: e2, nocase: s2, noext: i2, noglobstar: r2, optimizationLevel: 2, platform: o, nocomment: true, nonegate: true }; + for (let h of t2) this.add(h); + } + add(t2) { + let e2 = new D2(t2, this.mmopts); + for (let s2 = 0; s2 < e2.set.length; s2++) { + let i2 = e2.set[s2], r2 = e2.globParts[s2]; + if (!i2 || !r2) throw new Error("invalid pattern object"); + for (; i2[0] === "." && r2[0] === "."; ) i2.shift(), r2.shift(); + let o = new nt2(i2, r2, 0, this.platform), h = new D2(o.globString(), this.mmopts), a2 = r2[r2.length - 1] === "**", l2 = o.isAbsolute(); + l2 ? this.absolute.push(h) : this.relative.push(h), a2 && (l2 ? this.absoluteChildren.push(h) : this.relativeChildren.push(h)); + } + } + ignored(t2) { + let e2 = t2.fullpath(), s2 = `${e2}/`, i2 = t2.relative() || ".", r2 = `${i2}/`; + for (let o of this.relative) if (o.match(i2) || o.match(r2)) return true; + for (let o of this.absolute) if (o.match(e2) || o.match(s2)) return true; + return false; + } + childrenIgnored(t2) { + let e2 = t2.fullpath() + "/", s2 = (t2.relative() || ".") + "/"; + for (let i2 of this.relativeChildren) if (i2.match(s2)) return true; + for (let i2 of this.absoluteChildren) if (i2.match(e2)) return true; + return false; + } + }; + oe = class n6 { + store; + constructor(t2 = /* @__PURE__ */ new Map()) { + this.store = t2; + } + copy() { + return new n6(new Map(this.store)); + } + hasWalked(t2, e2) { + return this.store.get(t2.fullpath())?.has(e2.globString()); + } + storeWalked(t2, e2) { + let s2 = t2.fullpath(), i2 = this.store.get(s2); + i2 ? i2.add(e2.globString()) : this.store.set(s2, /* @__PURE__ */ new Set([e2.globString()])); + } + }; + he2 = class { + store = /* @__PURE__ */ new Map(); + add(t2, e2, s2) { + let i2 = (e2 ? 2 : 0) | (s2 ? 1 : 0), r2 = this.store.get(t2); + this.store.set(t2, r2 === void 0 ? i2 : i2 & r2); + } + entries() { + return [...this.store.entries()].map(([t2, e2]) => [t2, !!(e2 & 2), !!(e2 & 1)]); + } + }; + ae2 = class { + store = /* @__PURE__ */ new Map(); + add(t2, e2) { + if (!t2.canReaddir()) return; + let s2 = this.store.get(t2); + s2 ? s2.find((i2) => i2.globString() === e2.globString()) || s2.push(e2) : this.store.set(t2, [e2]); + } + get(t2) { + let e2 = this.store.get(t2); + if (!e2) throw new Error("attempting to walk unknown path"); + return e2; + } + entries() { + return this.keys().map((t2) => [t2, this.store.get(t2)]); + } + keys() { + return [...this.store.keys()].filter((t2) => t2.canReaddir()); + } + }; + Et2 = class n7 { + hasWalkedCache; + matches = new he2(); + subwalks = new ae2(); + patterns; + follow; + dot; + opts; + constructor(t2, e2) { + this.opts = t2, this.follow = !!t2.follow, this.dot = !!t2.dot, this.hasWalkedCache = e2 ? e2.copy() : new oe(); + } + processPatterns(t2, e2) { + this.patterns = e2; + let s2 = e2.map((i2) => [t2, i2]); + for (let [i2, r2] of s2) { + this.hasWalkedCache.storeWalked(i2, r2); + let o = r2.root(), h = r2.isAbsolute() && this.opts.absolute !== false; + if (o) { + i2 = i2.resolve(o === "/" && this.opts.root !== void 0 ? this.opts.root : o); + let c2 = r2.rest(); + if (c2) r2 = c2; + else { + this.matches.add(i2, true, false); + continue; + } + } + if (i2.isENOENT()) continue; + let a2, l2, u2 = false; + for (; typeof (a2 = r2.pattern()) == "string" && (l2 = r2.rest()); ) i2 = i2.resolve(a2), r2 = l2, u2 = true; + if (a2 = r2.pattern(), l2 = r2.rest(), u2) { + if (this.hasWalkedCache.hasWalked(i2, r2)) continue; + this.hasWalkedCache.storeWalked(i2, r2); + } + if (typeof a2 == "string") { + let c2 = a2 === ".." || a2 === "" || a2 === "."; + this.matches.add(i2.resolve(a2), h, c2); + continue; + } else if (a2 === A2) { + (!i2.isSymbolicLink() || this.follow || r2.checkFollowGlobstar()) && this.subwalks.add(i2, r2); + let c2 = l2?.pattern(), d = l2?.rest(); + if (!l2 || (c2 === "" || c2 === ".") && !d) this.matches.add(i2, h, c2 === "" || c2 === "."); + else if (c2 === "..") { + let f = i2.parent || i2; + d ? this.hasWalkedCache.hasWalked(f, d) || this.subwalks.add(f, d) : this.matches.add(f, h, true); + } + } else a2 instanceof RegExp && this.subwalks.add(i2, r2); + } + return this; + } + subwalkTargets() { + return this.subwalks.keys(); + } + child() { + return new n7(this.opts, this.hasWalkedCache); + } + filterEntries(t2, e2) { + let s2 = this.subwalks.get(t2), i2 = this.child(); + for (let r2 of e2) for (let o of s2) { + let h = o.isAbsolute(), a2 = o.pattern(), l2 = o.rest(); + a2 === A2 ? i2.testGlobstar(r2, o, l2, h) : a2 instanceof RegExp ? i2.testRegExp(r2, a2, l2, h) : i2.testString(r2, a2, l2, h); + } + return i2; + } + testGlobstar(t2, e2, s2, i2) { + if ((this.dot || !t2.name.startsWith(".")) && (e2.hasMore() || this.matches.add(t2, i2, false), t2.canReaddir() && (this.follow || !t2.isSymbolicLink() ? this.subwalks.add(t2, e2) : t2.isSymbolicLink() && (s2 && e2.checkFollowGlobstar() ? this.subwalks.add(t2, s2) : e2.markFollowGlobstar() && this.subwalks.add(t2, e2)))), s2) { + let r2 = s2.pattern(); + if (typeof r2 == "string" && r2 !== ".." && r2 !== "" && r2 !== ".") this.testString(t2, r2, s2.rest(), i2); + else if (r2 === "..") { + let o = t2.parent || t2; + this.subwalks.add(o, s2); + } else r2 instanceof RegExp && this.testRegExp(t2, r2, s2.rest(), i2); + } + } + testRegExp(t2, e2, s2, i2) { + e2.test(t2.name) && (s2 ? this.subwalks.add(t2, s2) : this.matches.add(t2, i2, false)); + } + testString(t2, e2, s2, i2) { + t2.isNamed(e2) && (s2 ? this.subwalks.add(t2, s2) : this.matches.add(t2, i2, false)); + } + }; + Li = (n8, t2) => typeof n8 == "string" ? new ot2([n8], t2) : Array.isArray(n8) ? new ot2(n8, t2) : n8; + zt2 = class { + path; + patterns; + opts; + seen = /* @__PURE__ */ new Set(); + paused = false; + aborted = false; + #t = []; + #s; + #n; + signal; + maxDepth; + includeChildMatches; + constructor(t2, e2, s2) { + if (this.patterns = t2, this.path = e2, this.opts = s2, this.#n = !s2.posix && s2.platform === "win32" ? "\\" : "/", this.includeChildMatches = s2.includeChildMatches !== false, (s2.ignore || !this.includeChildMatches) && (this.#s = Li(s2.ignore ?? [], s2), !this.includeChildMatches && typeof this.#s.add != "function")) { + let i2 = "cannot ignore child matches, ignore lacks add() method."; + throw new Error(i2); + } + this.maxDepth = s2.maxDepth || 1 / 0, s2.signal && (this.signal = s2.signal, this.signal.addEventListener("abort", () => { + this.#t.length = 0; + })); + } + #r(t2) { + return this.seen.has(t2) || !!this.#s?.ignored?.(t2); + } + #o(t2) { + return !!this.#s?.childrenIgnored?.(t2); + } + pause() { + this.paused = true; + } + resume() { + if (this.signal?.aborted) return; + this.paused = false; + let t2; + for (; !this.paused && (t2 = this.#t.shift()); ) t2(); + } + onResume(t2) { + this.signal?.aborted || (this.paused ? this.#t.push(t2) : t2()); + } + async matchCheck(t2, e2) { + if (e2 && this.opts.nodir) return; + let s2; + if (this.opts.realpath) { + if (s2 = t2.realpathCached() || await t2.realpath(), !s2) return; + t2 = s2; + } + let r2 = t2.isUnknown() || this.opts.stat ? await t2.lstat() : t2; + if (this.opts.follow && this.opts.nodir && r2?.isSymbolicLink()) { + let o = await r2.realpath(); + o && (o.isUnknown() || this.opts.stat) && await o.lstat(); + } + return this.matchCheckTest(r2, e2); + } + matchCheckTest(t2, e2) { + return t2 && (this.maxDepth === 1 / 0 || t2.depth() <= this.maxDepth) && (!e2 || t2.canReaddir()) && (!this.opts.nodir || !t2.isDirectory()) && (!this.opts.nodir || !this.opts.follow || !t2.isSymbolicLink() || !t2.realpathCached()?.isDirectory()) && !this.#r(t2) ? t2 : void 0; + } + matchCheckSync(t2, e2) { + if (e2 && this.opts.nodir) return; + let s2; + if (this.opts.realpath) { + if (s2 = t2.realpathCached() || t2.realpathSync(), !s2) return; + t2 = s2; + } + let r2 = t2.isUnknown() || this.opts.stat ? t2.lstatSync() : t2; + if (this.opts.follow && this.opts.nodir && r2?.isSymbolicLink()) { + let o = r2.realpathSync(); + o && (o?.isUnknown() || this.opts.stat) && o.lstatSync(); + } + return this.matchCheckTest(r2, e2); + } + matchFinish(t2, e2) { + if (this.#r(t2)) return; + if (!this.includeChildMatches && this.#s?.add) { + let r2 = `${t2.relativePosix()}/**`; + this.#s.add(r2); + } + let s2 = this.opts.absolute === void 0 ? e2 : this.opts.absolute; + this.seen.add(t2); + let i2 = this.opts.mark && t2.isDirectory() ? this.#n : ""; + if (this.opts.withFileTypes) this.matchEmit(t2); + else if (s2) { + let r2 = this.opts.posix ? t2.fullpathPosix() : t2.fullpath(); + this.matchEmit(r2 + i2); + } else { + let r2 = this.opts.posix ? t2.relativePosix() : t2.relative(), o = this.opts.dotRelative && !r2.startsWith(".." + this.#n) ? "." + this.#n : ""; + this.matchEmit(r2 ? o + r2 + i2 : "." + i2); + } + } + async match(t2, e2, s2) { + let i2 = await this.matchCheck(t2, s2); + i2 && this.matchFinish(i2, e2); + } + matchSync(t2, e2, s2) { + let i2 = this.matchCheckSync(t2, s2); + i2 && this.matchFinish(i2, e2); + } + walkCB(t2, e2, s2) { + this.signal?.aborted && s2(), this.walkCB2(t2, e2, new Et2(this.opts), s2); + } + walkCB2(t2, e2, s2, i2) { + if (this.#o(t2)) return i2(); + if (this.signal?.aborted && i2(), this.paused) { + this.onResume(() => this.walkCB2(t2, e2, s2, i2)); + return; + } + s2.processPatterns(t2, e2); + let r2 = 1, o = () => { + --r2 === 0 && i2(); + }; + for (let [h, a2, l2] of s2.matches.entries()) this.#r(h) || (r2++, this.match(h, a2, l2).then(() => o())); + for (let h of s2.subwalkTargets()) { + if (this.maxDepth !== 1 / 0 && h.depth() >= this.maxDepth) continue; + r2++; + let a2 = h.readdirCached(); + h.calledReaddir() ? this.walkCB3(h, a2, s2, o) : h.readdirCB((l2, u2) => this.walkCB3(h, u2, s2, o), true); + } + o(); + } + walkCB3(t2, e2, s2, i2) { + s2 = s2.filterEntries(t2, e2); + let r2 = 1, o = () => { + --r2 === 0 && i2(); + }; + for (let [h, a2, l2] of s2.matches.entries()) this.#r(h) || (r2++, this.match(h, a2, l2).then(() => o())); + for (let [h, a2] of s2.subwalks.entries()) r2++, this.walkCB2(h, a2, s2.child(), o); + o(); + } + walkCBSync(t2, e2, s2) { + this.signal?.aborted && s2(), this.walkCB2Sync(t2, e2, new Et2(this.opts), s2); + } + walkCB2Sync(t2, e2, s2, i2) { + if (this.#o(t2)) return i2(); + if (this.signal?.aborted && i2(), this.paused) { + this.onResume(() => this.walkCB2Sync(t2, e2, s2, i2)); + return; + } + s2.processPatterns(t2, e2); + let r2 = 1, o = () => { + --r2 === 0 && i2(); + }; + for (let [h, a2, l2] of s2.matches.entries()) this.#r(h) || this.matchSync(h, a2, l2); + for (let h of s2.subwalkTargets()) { + if (this.maxDepth !== 1 / 0 && h.depth() >= this.maxDepth) continue; + r2++; + let a2 = h.readdirSync(); + this.walkCB3Sync(h, a2, s2, o); + } + o(); + } + walkCB3Sync(t2, e2, s2, i2) { + s2 = s2.filterEntries(t2, e2); + let r2 = 1, o = () => { + --r2 === 0 && i2(); + }; + for (let [h, a2, l2] of s2.matches.entries()) this.#r(h) || this.matchSync(h, a2, l2); + for (let [h, a2] of s2.subwalks.entries()) r2++, this.walkCB2Sync(h, a2, s2.child(), o); + o(); + } + }; + xt2 = class extends zt2 { + matches = /* @__PURE__ */ new Set(); + constructor(t2, e2, s2) { + super(t2, e2, s2); + } + matchEmit(t2) { + this.matches.add(t2); + } + async walk() { + if (this.signal?.aborted) throw this.signal.reason; + return this.path.isUnknown() && await this.path.lstat(), await new Promise((t2, e2) => { + this.walkCB(this.path, this.patterns, () => { + this.signal?.aborted ? e2(this.signal.reason) : t2(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; + } + }; + vt2 = class extends zt2 { + results; + constructor(t2, e2, s2) { + super(t2, e2, s2), this.results = new V2({ signal: this.signal, objectMode: true }), this.results.on("drain", () => this.resume()), this.results.on("resume", () => this.resume()); + } + matchEmit(t2) { + this.results.write(t2), this.results.flowing || this.pause(); + } + stream() { + let t2 = this.path; + return t2.isUnknown() ? t2.lstat().then(() => { + this.walkCB(t2, this.patterns, () => this.results.end()); + }) : this.walkCB(t2, 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; + } + }; + Pi = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux"; + I2 = 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(t2, e2) { + if (!e2) throw new TypeError("glob options required"); + if (this.withFileTypes = !!e2.withFileTypes, this.signal = e2.signal, this.follow = !!e2.follow, this.dot = !!e2.dot, this.dotRelative = !!e2.dotRelative, this.nodir = !!e2.nodir, this.mark = !!e2.mark, e2.cwd ? (e2.cwd instanceof URL || e2.cwd.startsWith("file://")) && (e2.cwd = Wi(e2.cwd)) : this.cwd = "", this.cwd = e2.cwd || "", this.root = e2.root, this.magicalBraces = !!e2.magicalBraces, this.nobrace = !!e2.nobrace, this.noext = !!e2.noext, this.realpath = !!e2.realpath, this.absolute = e2.absolute, this.includeChildMatches = e2.includeChildMatches !== false, this.noglobstar = !!e2.noglobstar, this.matchBase = !!e2.matchBase, this.maxDepth = typeof e2.maxDepth == "number" ? e2.maxDepth : 1 / 0, this.stat = !!e2.stat, this.ignore = e2.ignore, this.withFileTypes && this.absolute !== void 0) throw new Error("cannot set absolute and withFileTypes:true"); + if (typeof t2 == "string" && (t2 = [t2]), this.windowsPathsNoEscape = !!e2.windowsPathsNoEscape || e2.allowWindowsEscape === false, this.windowsPathsNoEscape && (t2 = t2.map((a2) => a2.replace(/\\/g, "/"))), this.matchBase) { + if (e2.noglobstar) throw new TypeError("base matching requires globstar"); + t2 = t2.map((a2) => a2.includes("/") ? a2 : `./**/${a2}`); + } + if (this.pattern = t2, this.platform = e2.platform || Pi, this.opts = { ...e2, platform: this.platform }, e2.scurry) { + if (this.scurry = e2.scurry, e2.nocase !== void 0 && e2.nocase !== e2.scurry.nocase) throw new Error("nocase option contradicts provided scurry option"); + } else { + let a2 = e2.platform === "win32" ? it2 : e2.platform === "darwin" ? St2 : e2.platform ? rt2 : Xe2; + this.scurry = new a2(this.cwd, { nocase: e2.nocase, fs: e2.fs }); + } + this.nocase = this.scurry.nocase; + let s2 = this.platform === "darwin" || this.platform === "win32", i2 = { braceExpandMax: 1e4, ...e2, dot: this.dot, matchBase: this.matchBase, nobrace: this.nobrace, nocase: this.nocase, nocaseMagicOnly: s2, nocomment: true, noext: this.noext, nonegate: true, optimizationLevel: 2, platform: this.platform, windowsPathsNoEscape: this.windowsPathsNoEscape, debug: !!this.opts.debug }, r2 = this.pattern.map((a2) => new D2(a2, i2)), [o, h] = r2.reduce((a2, l2) => (a2[0].push(...l2.set), a2[1].push(...l2.globParts), a2), [[], []]); + this.patterns = o.map((a2, l2) => { + let u2 = h[l2]; + if (!u2) throw new Error("invalid pattern object"); + return new nt2(a2, u2, 0, this.platform); + }); + } + async walk() { + return [...await new xt2(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 xt2(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 vt2(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 vt2(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(); + } + }; + le2 = (n8, t2 = {}) => { + Array.isArray(n8) || (n8 = [n8]); + for (let e2 of n8) if (new D2(e2, t2).hasMagic()) return true; + return false; + }; + ji = Bt2; + Ii = Object.assign(Qe2, { sync: Bt2 }); + zi = Ut2; + Bi = Object.assign(es, { sync: Ut2 }); + Ui = Object.assign(ts, { stream: Bt2, iterate: Ut2 }); + Ze2 = Object.assign(Je2, { glob: Je2, globSync: ts, sync: Ui, globStream: Qe2, stream: Ii, globStreamSync: Bt2, streamSync: ji, globIterate: es, iterate: Bi, globIterateSync: Ut2, iterateSync: zi, Glob: I2, hasMagic: le2, escape: tt2, unescape: W2 }); + Ze2.glob = Ze2; + } +}); -/***/ }), +// node_modules/@redocly/cli/lib/utils/get-command-name-from-args.js +var init_get_command_name_from_args = __esm({ + "node_modules/@redocly/cli/lib/utils/get-command-name-from-args.js"() { + } +}); -/***/ 71576: -/***/ ((module) => { +// node_modules/@redocly/cli/lib/commands/lint.js +var init_lint2 = __esm({ + "node_modules/@redocly/cli/lib/commands/lint.js"() { + init_lib(); + init_colorette(); + init_error2(); + init_get_command_name_from_args(); + init_miscellaneous(); + } +}); -"use strict"; -module.exports = require("string_decoder"); +// node_modules/@redocly/cli/lib/types.js +var init_types3 = __esm({ + "node_modules/@redocly/cli/lib/types.js"() { + } +}); -/***/ }), +// node_modules/@redocly/cli/lib/utils/miscellaneous.js +import * as process2 from "node:process"; +import { performance as performance2 } from "perf_hooks"; +function getExecutionTime(startedAt) { + return process2.env.NODE_ENV === "test" ? "ms" : `${Math.ceil(performance2.now() - startedAt)}ms`; +} +function printExecutionTime(commandName, startedAt, api) { + const elapsed = getExecutionTime(startedAt); + logger.info(gray(` +${api}: ${commandName} processed in ${elapsed} -/***/ 39512: -/***/ ((module) => { +`)); +} +function capitalize(s2) { + if (s2?.length > 0) { + return s2[0].toUpperCase() + s2.slice(1); + } + return s2; +} +var init_miscellaneous = __esm({ + "node_modules/@redocly/cli/lib/utils/miscellaneous.js"() { + init_lib(); + init_colorette(); + init_index_min(); + init_lint2(); + init_types3(); + init_error2(); + } +}); -"use strict"; -module.exports = require("timers"); +// redocly-cli-package-shim:redocly-cli-package +var version; +var init_redocly_cli_package = __esm({ + "redocly-cli-package-shim:redocly-cli-package"() { + version = "2.31.2"; + } +}); -/***/ }), +// node_modules/@redocly/cli/lib/utils/constants.js +var OTEL_URL, OTEL_TRACES_URL, DEFAULT_FETCH_TIMEOUT; +var init_constants2 = __esm({ + "node_modules/@redocly/cli/lib/utils/constants.js"() { + OTEL_URL = "https://otel.cloud.redocly.com"; + OTEL_TRACES_URL = process.env.OTEL_TRACES_URL || `${OTEL_URL}/v1/traces`; + DEFAULT_FETCH_TIMEOUT = 6e3; + } +}); -/***/ 24404: -/***/ ((module) => { +// node_modules/ms/index.js +var require_ms = __commonJS({ + "node_modules/ms/index.js"(exports, module3) { + var s2 = 1e3; + var m = s2 * 60; + var h = m * 60; + var d = h * 24; + var w2 = d * 7; + var y2 = d * 365.25; + module3.exports = function(val, options2) { + options2 = options2 || {}; + var type2 = typeof val; + if (type2 === "string" && val.length > 0) { + return parse(val); + } else if (type2 === "number" && isFinite(val)) { + return options2.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) + ); + }; + function parse(str2) { + str2 = String(str2); + if (str2.length > 100) { + return; + } + var match2 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str2 + ); + if (!match2) { + return; + } + var n8 = parseFloat(match2[1]); + var type2 = (match2[2] || "ms").toLowerCase(); + switch (type2) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return n8 * y2; + case "weeks": + case "week": + case "w": + return n8 * w2; + case "days": + case "day": + case "d": + return n8 * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return n8 * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return n8 * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return n8 * s2; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return n8; + default: + return void 0; + } + } + function fmtShort(ms2) { + var msAbs = Math.abs(ms2); + if (msAbs >= d) { + return Math.round(ms2 / d) + "d"; + } + if (msAbs >= h) { + return Math.round(ms2 / h) + "h"; + } + if (msAbs >= m) { + return Math.round(ms2 / m) + "m"; + } + if (msAbs >= s2) { + return Math.round(ms2 / s2) + "s"; + } + return ms2 + "ms"; + } + function fmtLong(ms2) { + var msAbs = Math.abs(ms2); + if (msAbs >= d) { + return plural(ms2, msAbs, d, "day"); + } + if (msAbs >= h) { + return plural(ms2, msAbs, h, "hour"); + } + if (msAbs >= m) { + return plural(ms2, msAbs, m, "minute"); + } + if (msAbs >= s2) { + return plural(ms2, msAbs, s2, "second"); + } + return ms2 + " ms"; + } + function plural(ms2, msAbs, n8, name) { + var isPlural = msAbs >= n8 * 1.5; + return Math.round(ms2 / n8) + " " + name + (isPlural ? "s" : ""); + } + } +}); -"use strict"; -module.exports = require("tls"); +// node_modules/debug/src/common.js +var require_common2 = __commonJS({ + "node_modules/debug/src/common.js"(exports, module3) { + function setup(env4) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled2; + createDebug.humanize = require_ms(); + createDebug.destroy = destroy; + Object.keys(env4).forEach((key) => { + createDebug[key] = env4[key]; + }); + createDebug.names = []; + createDebug.skips = []; + createDebug.formatters = {}; + function selectColor(namespace) { + let hash = 0; + for (let i2 = 0; i2 < namespace.length; i2++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i2); + hash |= 0; + } + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + function debug(...args) { + if (!debug.enabled) { + return; + } + const self = debug; + const curr = Number(/* @__PURE__ */ new Date()); + const ms2 = curr - (prevTime || curr); + self.diff = ms2; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + args[0] = createDebug.coerce(args[0]); + if (typeof args[0] !== "string") { + args.unshift("%O"); + } + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match2, format) => { + if (match2 === "%%") { + return "%"; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === "function") { + const val = args[index]; + match2 = formatter.call(self, val); + args.splice(index, 1); + index--; + } + return match2; + }); + 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 = extend3; + debug.destroy = createDebug.destroy; + 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: (v3) => { + enableOverride = v3; + } + }); + if (typeof createDebug.init === "function") { + createDebug.init(debug); + } + return debug; + } + function extend3(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + 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 ns2 of split) { + if (ns2[0] === "-") { + createDebug.skips.push(ns2.slice(1)); + } else { + createDebug.names.push(ns2); + } + } + } + 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] === "*")) { + if (template[templateIndex] === "*") { + starIndex = templateIndex; + matchIndex = searchIndex; + templateIndex++; + } else { + searchIndex++; + templateIndex++; + } + } else if (starIndex !== -1) { + templateIndex = starIndex + 1; + matchIndex++; + searchIndex = matchIndex; + } else { + return false; + } + } + while (templateIndex < template.length && template[templateIndex] === "*") { + templateIndex++; + } + return templateIndex === template.length; + } + function disable() { + const namespaces = [ + ...createDebug.names, + ...createDebug.skips.map((namespace) => "-" + namespace) + ].join(","); + createDebug.enable(""); + return namespaces; + } + function enabled2(name) { + for (const skip of createDebug.skips) { + if (matchesTemplate(name, skip)) { + return false; + } + } + for (const ns2 of createDebug.names) { + if (matchesTemplate(name, ns2)) { + return true; + } + } + return false; + } + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + 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; + } + module3.exports = setup; + } +}); -/***/ }), +// node_modules/debug/src/browser.js +var require_browser = __commonJS({ + "node_modules/debug/src/browser.js"(exports, module3) { + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load2; + exports.useColors = useColors; + exports.storage = localstorage(); + exports.destroy = /* @__PURE__ */ (() => { + 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`."); + } + }; + })(); + 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" + ]; + function useColors() { + if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { + return true; + } + if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + let m; + 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+)/); + } + function formatArgs(args) { + args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module3.exports.humanize(this.diff); + if (!this.useColors) { + return; + } + const c2 = "color: " + this.color; + args.splice(1, 0, c2, "color: inherit"); + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, (match2) => { + if (match2 === "%%") { + return; + } + index++; + if (match2 === "%c") { + lastC = index; + } + }); + args.splice(lastC, 0, c2); + } + exports.log = console.debug || console.log || (() => { + }); + function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem("debug", namespaces); + } else { + exports.storage.removeItem("debug"); + } + } catch (error2) { + } + } + function load2() { + let r2; + try { + r2 = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG"); + } catch (error2) { + } + if (!r2 && typeof process !== "undefined" && "env" in process) { + r2 = process.env.DEBUG; + } + return r2; + } + function localstorage() { + try { + return localStorage; + } catch (error2) { + } + } + module3.exports = require_common2()(exports); + var { formatters } = module3.exports; + formatters.j = function(v3) { + try { + return JSON.stringify(v3); + } catch (error2) { + return "[UnexpectedJSONParseError]: " + error2.message; + } + }; + } +}); -/***/ 76224: -/***/ ((module) => { +// node_modules/has-flag/index.js +var require_has_flag = __commonJS({ + "node_modules/has-flag/index.js"(exports, module3) { + "use strict"; + module3.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); + }; + } +}); -"use strict"; -module.exports = require("tty"); +// node_modules/supports-color/index.js +var require_supports_color = __commonJS({ + "node_modules/supports-color/index.js"(exports, module3) { + "use strict"; + var os2 = __require("os"); + var tty2 = __require("tty"); + var hasFlag = require_has_flag(); + var { env: env4 } = process; + var 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 env4) { + if (env4.FORCE_COLOR === "true") { + forceColor = 1; + } else if (env4.FORCE_COLOR === "false") { + forceColor = 0; + } else { + forceColor = env4.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env4.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 === void 0) { + return 0; + } + const min = forceColor || 0; + if (env4.TERM === "dumb") { + return min; + } + if (process.platform === "win32") { + const osRelease = os2.release().split("."); + if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + return 1; + } + if ("CI" in env4) { + if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env4) || env4.CI_NAME === "codeship") { + return 1; + } + return min; + } + if ("TEAMCITY_VERSION" in env4) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env4.TEAMCITY_VERSION) ? 1 : 0; + } + if (env4.COLORTERM === "truecolor") { + return 3; + } + if ("TERM_PROGRAM" in env4) { + const version2 = parseInt((env4.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + switch (env4.TERM_PROGRAM) { + case "iTerm.app": + return version2 >= 3 ? 3 : 2; + case "Apple_Terminal": + return 2; + } + } + if (/-256(color)?$/i.test(env4.TERM)) { + return 2; + } + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env4.TERM)) { + return 1; + } + if ("COLORTERM" in env4) { + return 1; + } + return min; + } + function getSupportLevel(stream) { + const level = supportsColor(stream, stream && stream.isTTY); + return translateLevel(level); + } + module3.exports = { + supportsColor: getSupportLevel, + stdout: translateLevel(supportsColor(true, tty2.isatty(1))), + stderr: translateLevel(supportsColor(true, tty2.isatty(2))) + }; + } +}); -/***/ }), +// node_modules/debug/src/node.js +var require_node = __commonJS({ + "node_modules/debug/src/node.js"(exports, module3) { + var tty2 = __require("tty"); + var util = __require("util"); + exports.init = init2; + exports.log = log; + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load2; + 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`." + ); + exports.colors = [6, 2, 3, 4, 5, 1]; + try { + const supportsColor = require_supports_color(); + 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 (error2) { + } + exports.inspectOpts = Object.keys(process.env).filter((key) => { + return /^debug_/i.test(key); + }).reduce((obj, key) => { + const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_5, k3) => { + return k3.toUpperCase(); + }); + 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; + }, {}); + function useColors() { + return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty2.isatty(process.stderr.fd); + } + function formatArgs(args) { + const { namespace: name, useColors: useColors2 } = this; + if (useColors2) { + const c2 = this.color; + const colorCode = "\x1B[3" + (c2 < 8 ? c2 : "8;5;" + c2); + const prefix = ` ${colorCode};1m${name} \x1B[0m`; + args[0] = prefix + args[0].split("\n").join("\n" + prefix); + args.push(colorCode + "m+" + module3.exports.humanize(this.diff) + "\x1B[0m"); + } else { + args[0] = getDate() + name + " " + args[0]; + } + } + function getDate() { + if (exports.inspectOpts.hideDate) { + return ""; + } + return (/* @__PURE__ */ new Date()).toISOString() + " "; + } + function log(...args) { + return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + "\n"); + } + function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + delete process.env.DEBUG; + } + } + function load2() { + return process.env.DEBUG; + } + function init2(debug) { + debug.inspectOpts = {}; + const keys = Object.keys(exports.inspectOpts); + for (let i2 = 0; i2 < keys.length; i2++) { + debug.inspectOpts[keys[i2]] = exports.inspectOpts[keys[i2]]; + } + } + module3.exports = require_common2()(exports); + var { formatters } = module3.exports; + formatters.o = function(v3) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v3, this.inspectOpts).split("\n").map((str2) => str2.trim()).join(" "); + }; + formatters.O = function(v3) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v3, this.inspectOpts); + }; + } +}); -/***/ 57310: -/***/ ((module) => { +// node_modules/debug/src/index.js +var require_src2 = __commonJS({ + "node_modules/debug/src/index.js"(exports, module3) { + if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { + module3.exports = require_browser(); + } else { + module3.exports = require_node(); + } + } +}); -"use strict"; -module.exports = require("url"); +// node_modules/agent-base/dist/helpers.js +var require_helpers = __commonJS({ + "node_modules/agent-base/dist/helpers.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + var desc = Object.getOwnPropertyDescriptor(m, k3); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k3]; + } }; + } + Object.defineProperty(o, k22, desc); + }) : (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + o[k22] = m[k3]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v3) { + Object.defineProperty(o, "default", { enumerable: true, value: v3 }); + }) : function(o, v3) { + o["default"] = v3; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.req = exports.json = exports.toBuffer = void 0; + var http = __importStar(__require("http")); + var https = __importStar(__require("https")); + async function toBuffer(stream) { + let length = 0; + const chunks = []; + for await (const chunk of stream) { + length += chunk.length; + chunks.push(chunk); + } + return Buffer.concat(chunks, length); + } + exports.toBuffer = toBuffer; + async function json2(stream) { + const buf = await toBuffer(stream); + const str2 = buf.toString("utf8"); + try { + return JSON.parse(str2); + } catch (_err) { + const err = _err; + err.message += ` (input: ${str2})`; + throw err; + } + } + exports.json = json2; + function req(url3, opts = {}) { + const href = typeof url3 === "string" ? url3 : url3.href; + const req2 = (href.startsWith("https:") ? https : http).request(url3, opts); + const promise = new Promise((resolve8, reject) => { + req2.once("response", resolve8).once("error", reject).end(); + }); + req2.then = promise.then.bind(promise); + return req2; + } + exports.req = req; + } +}); -/***/ }), +// node_modules/agent-base/dist/index.js +var require_dist2 = __commonJS({ + "node_modules/agent-base/dist/index.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + var desc = Object.getOwnPropertyDescriptor(m, k3); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k3]; + } }; + } + Object.defineProperty(o, k22, desc); + }) : (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + o[k22] = m[k3]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v3) { + Object.defineProperty(o, "default", { enumerable: true, value: v3 }); + }) : function(o, v3) { + o["default"] = v3; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; + }; + var __exportStar = exports && exports.__exportStar || function(m, exports2) { + for (var p2 in m) if (p2 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p2)) __createBinding(exports2, m, p2); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Agent = void 0; + var net = __importStar(__require("net")); + var http = __importStar(__require("http")); + var https_1 = __require("https"); + __exportStar(require_helpers(), exports); + var INTERNAL = /* @__PURE__ */ Symbol("AgentBaseInternalState"); + var Agent2 = class extends http.Agent { + constructor(opts) { + super(opts); + this[INTERNAL] = {}; + } + /** + * Determine whether this is an `http` or `https` request. + */ + isSecureEndpoint(options2) { + if (options2) { + if (typeof options2.secureEndpoint === "boolean") { + return options2.secureEndpoint; + } + if (typeof options2.protocol === "string") { + return options2.protocol === "https:"; + } + } + const { stack } = new Error(); + if (typeof stack !== "string") + return false; + return stack.split("\n").some((l2) => l2.indexOf("(https.js:") !== -1 || l2.indexOf("node:https:") !== -1); + } + // In order to support async signatures in `connect()` and Node's native + // connection pooling in `http.Agent`, the array of sockets for each origin + // has to be updated synchronously. This is so the length of the array is + // accurate when `addRequest()` is next called. We achieve this by creating a + // fake socket and adding it to `sockets[origin]` and incrementing + // `totalSocketCount`. + incrementSockets(name) { + if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) { + return null; + } + if (!this.sockets[name]) { + this.sockets[name] = []; + } + const fakeSocket = new net.Socket({ writable: false }); + this.sockets[name].push(fakeSocket); + this.totalSocketCount++; + return fakeSocket; + } + decrementSockets(name, socket) { + if (!this.sockets[name] || socket === null) { + return; + } + const sockets = this.sockets[name]; + const index = sockets.indexOf(socket); + if (index !== -1) { + sockets.splice(index, 1); + this.totalSocketCount--; + if (sockets.length === 0) { + delete this.sockets[name]; + } + } + } + // In order to properly update the socket pool, we need to call `getName()` on + // the core `https.Agent` if it is a secureEndpoint. + getName(options2) { + const secureEndpoint = this.isSecureEndpoint(options2); + if (secureEndpoint) { + return https_1.Agent.prototype.getName.call(this, options2); + } + return super.getName(options2); + } + createSocket(req, options2, cb) { + const connectOpts = { + ...options2, + secureEndpoint: this.isSecureEndpoint(options2) + }; + const name = this.getName(connectOpts); + const fakeSocket = this.incrementSockets(name); + Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => { + this.decrementSockets(name, fakeSocket); + if (socket instanceof http.Agent) { + try { + return socket.addRequest(req, connectOpts); + } catch (err) { + return cb(err); + } + } + this[INTERNAL].currentSocket = socket; + super.createSocket(req, options2, cb); + }, (err) => { + this.decrementSockets(name, fakeSocket); + cb(err); + }); + } + createConnection() { + const socket = this[INTERNAL].currentSocket; + this[INTERNAL].currentSocket = void 0; + if (!socket) { + throw new Error("No socket was returned in the `connect()` function"); + } + return socket; + } + get defaultPort() { + return this[INTERNAL].defaultPort ?? (this.protocol === "https:" ? 443 : 80); + } + set defaultPort(v3) { + if (this[INTERNAL]) { + this[INTERNAL].defaultPort = v3; + } + } + get protocol() { + return this[INTERNAL].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:"); + } + set protocol(v3) { + if (this[INTERNAL]) { + this[INTERNAL].protocol = v3; + } + } + }; + exports.Agent = Agent2; + } +}); -/***/ 73837: -/***/ ((module) => { +// node_modules/https-proxy-agent/dist/parse-proxy-response.js +var require_parse_proxy_response = __commonJS({ + "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) { + "use strict"; + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.parseProxyResponse = void 0; + var debug_1 = __importDefault(require_src2()); + var debug = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); + function parseProxyResponse(socket) { + return new Promise((resolve8, reject) => { + let buffersLength = 0; + const buffers = []; + function read() { + const b2 = socket.read(); + if (b2) + ondata(b2); + else + socket.once("readable", read); + } + function cleanup() { + socket.removeListener("end", onend); + socket.removeListener("error", onerror); + socket.removeListener("readable", read); + } + function onend() { + cleanup(); + debug("onend"); + reject(new Error("Proxy connection ended before receiving CONNECT response")); + } + function onerror(err) { + cleanup(); + debug("onerror %o", err); + reject(err); + } + function ondata(b2) { + buffers.push(b2); + buffersLength += b2.length; + const buffered = Buffer.concat(buffers, buffersLength); + const endOfHeaders = buffered.indexOf("\r\n\r\n"); + if (endOfHeaders === -1) { + debug("have not received end of HTTP headers yet..."); + read(); + return; + } + const headerParts = buffered.slice(0, endOfHeaders).toString("ascii").split("\r\n"); + const firstLine = headerParts.shift(); + if (!firstLine) { + socket.destroy(); + return reject(new Error("No header received from proxy CONNECT response")); + } + const firstLineParts = firstLine.split(" "); + const statusCode = +firstLineParts[1]; + const statusText = firstLineParts.slice(2).join(" "); + const headers = {}; + for (const header of headerParts) { + if (!header) + continue; + const firstColon = header.indexOf(":"); + if (firstColon === -1) { + socket.destroy(); + return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`)); + } + const key = header.slice(0, firstColon).toLowerCase(); + const value = header.slice(firstColon + 1).trimStart(); + const current = headers[key]; + if (typeof current === "string") { + headers[key] = [current, value]; + } else if (Array.isArray(current)) { + current.push(value); + } else { + headers[key] = value; + } + } + debug("got proxy server response: %o %o", firstLine, headers); + cleanup(); + resolve8({ + connect: { + statusCode, + statusText, + headers + }, + buffered + }); + } + socket.on("error", onerror); + socket.on("end", onend); + read(); + }); + } + exports.parseProxyResponse = parseProxyResponse; + } +}); -"use strict"; -module.exports = require("util"); +// node_modules/https-proxy-agent/dist/index.js +var require_dist3 = __commonJS({ + "node_modules/https-proxy-agent/dist/index.js"(exports) { + "use strict"; + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + var desc = Object.getOwnPropertyDescriptor(m, k3); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k3]; + } }; + } + Object.defineProperty(o, k22, desc); + }) : (function(o, m, k3, k22) { + if (k22 === void 0) k22 = k3; + o[k22] = m[k3]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v3) { + Object.defineProperty(o, "default", { enumerable: true, value: v3 }); + }) : function(o, v3) { + o["default"] = v3; + }); + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.HttpsProxyAgent = void 0; + var net = __importStar(__require("net")); + var tls = __importStar(__require("tls")); + var assert_1 = __importDefault(__require("assert")); + var debug_1 = __importDefault(require_src2()); + var agent_base_1 = require_dist2(); + var url_1 = __require("url"); + var parse_proxy_response_1 = require_parse_proxy_response(); + var debug = (0, debug_1.default)("https-proxy-agent"); + var setServernameFromNonIpHost = (options2) => { + if (options2.servername === void 0 && options2.host && !net.isIP(options2.host)) { + return { + ...options2, + servername: options2.host + }; + } + return options2; + }; + var HttpsProxyAgent2 = class extends agent_base_1.Agent { + constructor(proxy, opts) { + super(opts); + this.options = { path: void 0 }; + this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy; + this.proxyHeaders = opts?.headers ?? {}; + debug("Creating new HttpsProxyAgent instance: %o", this.proxy.href); + const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""); + const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80; + this.connectOpts = { + // Attempt to negotiate http/1.1 for proxy servers that support http/2 + ALPNProtocols: ["http/1.1"], + ...opts ? omit2(opts, "headers") : null, + host, + port + }; + } + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + */ + async connect(req, opts) { + const { proxy } = this; + if (!opts.host) { + throw new TypeError('No "host" provided'); + } + let socket; + if (proxy.protocol === "https:") { + debug("Creating `tls.Socket`: %o", this.connectOpts); + socket = tls.connect(setServernameFromNonIpHost(this.connectOpts)); + } else { + debug("Creating `net.Socket`: %o", this.connectOpts); + socket = net.connect(this.connectOpts); + } + const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; + const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; + let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r +`; + if (proxy.username || proxy.password) { + const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; + headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth).toString("base64")}`; + } + headers.Host = `${host}:${opts.port}`; + if (!headers["Proxy-Connection"]) { + headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close"; + } + for (const name of Object.keys(headers)) { + payload += `${name}: ${headers[name]}\r +`; + } + const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket); + socket.write(`${payload}\r +`); + const { connect, buffered } = await proxyResponsePromise; + req.emit("proxyConnect", connect); + this.emit("proxyConnect", connect, req); + if (connect.statusCode === 200) { + req.once("socket", resume); + if (opts.secureEndpoint) { + debug("Upgrading socket connection to TLS"); + return tls.connect({ + ...omit2(setServernameFromNonIpHost(opts), "host", "path", "port"), + socket + }); + } + return socket; + } + socket.destroy(); + const fakeSocket = new net.Socket({ writable: false }); + fakeSocket.readable = true; + req.once("socket", (s2) => { + debug("Replaying proxy buffer for failed request"); + (0, assert_1.default)(s2.listenerCount("data") > 0); + s2.push(buffered); + s2.push(null); + }); + return fakeSocket; + } + }; + HttpsProxyAgent2.protocols = ["http", "https"]; + exports.HttpsProxyAgent = HttpsProxyAgent2; + function resume(socket) { + socket.resume(); + } + function omit2(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; + } + } +}); -/***/ }), +// node_modules/@redocly/cli/lib/utils/proxy-agent.js +function getProxyUrl() { + return process.env.HTTPS_PROXY || process.env.HTTP_PROXY || process.env.http_proxy || process.env.https_proxy; +} +function shouldBypassProxy(url3) { + const noProxy = process.env.NO_PROXY || process.env.no_proxy; + if (!noProxy) + return false; + const entries = noProxy.split(",").map((s2) => s2.trim().toLowerCase()).filter(Boolean); + if (entries.length === 0) + return false; + let hostname; + try { + hostname = new URL(url3).hostname.toLowerCase(); + } catch { + return false; + } + return entries.some((entry) => { + if (entry === "*") + return true; + if (hostname === entry) + return true; + if (entry.startsWith(".") && hostname.endsWith(entry)) + return true; + if (!entry.startsWith(".") && hostname.endsWith("." + entry)) + return true; + return false; + }); +} +var import_https_proxy_agent; +var init_proxy_agent = __esm({ + "node_modules/@redocly/cli/lib/utils/proxy-agent.js"() { + import_https_proxy_agent = __toESM(require_dist3(), 1); + } +}); -/***/ 59796: -/***/ ((module) => { +// node_modules/@redocly/cli/lib/utils/fetch-with-timeout.js +var import_undici, fetch_with_timeout_default; +var init_fetch_with_timeout = __esm({ + "node_modules/@redocly/cli/lib/utils/fetch-with-timeout.js"() { + import_undici = __toESM(require_undici(), 1); + init_proxy_agent(); + fetch_with_timeout_default = async (url3, { timeout, ...options2 } = {}) => { + const proxyUrl = getProxyUrl(); + const useProxy = proxyUrl && !shouldBypassProxy(url3); + let dispatcher; + const connectOptions = timeout ? { connect: { timeout } } : {}; + if (useProxy) { + dispatcher = new import_undici.ProxyAgent({ + uri: proxyUrl, + ...connectOptions + }); + } else if (timeout) { + dispatcher = new import_undici.Agent(connectOptions); + } + const res = await fetch(url3, { + signal: timeout ? AbortSignal.timeout(timeout) : void 0, + ...options2, + dispatcher + }); + return res; + }; + } +}); -"use strict"; -module.exports = require("zlib"); +// node_modules/@redocly/cli/lib/reunite/api/api-client.js +async function streamToBuffer(stream) { + const chunks = []; + for await (const chunk of stream) { + chunks.push(chunk); + } + return Buffer.concat(chunks); +} +var ReuniteApiError, ReuniteApiClient, RemotesApi, ReuniteApi; +var init_api_client = __esm({ + "node_modules/@redocly/cli/lib/reunite/api/api-client.js"() { + init_lib(); + init_constants2(); + init_fetch_with_timeout(); + init_redocly_cli_package(); + ReuniteApiError = class extends Error { + status; + constructor(message, status) { + super(message); + this.status = status; + } + }; + ReuniteApiClient = class { + command; + sunsetWarnings = []; + constructor(command) { + this.command = command; + } + async request(url3, options2) { + const headers = { + ...options2.headers, + "user-agent": `redocly-cli/${version} ${this.command}` + }; + try { + const response = await fetch_with_timeout_default(url3, { + ...options2, + headers + }); + this.collectSunsetWarning(response); + return response; + } catch (err) { + let errorMessage = "Failed to fetch."; + if (err.cause) { + errorMessage += ` Caused by ${err.cause.message || err.cause.name}.`; + } + if (err.code || err.cause?.code) { + errorMessage += ` Code: ${err.code || err.cause?.code}`; + } + throw new Error(errorMessage); + } + } + collectSunsetWarning(response) { + const sunsetTime = this.getSunsetDate(response); + if (!sunsetTime) + return; + const sunsetDate = new Date(sunsetTime); + if (sunsetTime > Date.now()) { + this.sunsetWarnings.push({ + sunsetDate, + isSunsetExpired: false + }); + } else { + this.sunsetWarnings.push({ + sunsetDate, + isSunsetExpired: true + }); + } + } + getSunsetDate(response) { + const { headers } = response; + if (!headers) { + return; + } + const sunsetDate = headers.get("sunset") || headers.get("Sunset"); + if (!sunsetDate) { + return; + } + return Date.parse(sunsetDate); + } + }; + RemotesApi = class { + client; + domain; + apiKey; + constructor(client, domain, apiKey) { + this.client = client; + this.domain = domain; + this.apiKey = apiKey; + } + async getParsedResponse(response) { + const responseBody = await response.json(); + if (response.ok) { + return responseBody; + } + throw new ReuniteApiError(`${responseBody.title || response.statusText || "Unknown error"}.`, response.status); + } + async getDefaultBranch(organizationId, projectId) { + try { + const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/source`, { + timeout: DEFAULT_FETCH_TIMEOUT, + method: "GET", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${this.apiKey}` + } + }); + const source = await this.getParsedResponse(response); + return source.branchName; + } catch (err) { + const message = `Failed to fetch default branch. ${err.message}`; + if (err instanceof ReuniteApiError) { + throw new ReuniteApiError(message, err.status); + } + throw new Error(message); + } + } + async upsert(organizationId, projectId, remote) { + try { + const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/remotes`, { + timeout: DEFAULT_FETCH_TIMEOUT, + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${this.apiKey}` + }, + body: JSON.stringify({ + mountPath: remote.mountPath, + mountBranchName: remote.mountBranchName, + type: "CICD", + autoMerge: true + }) + }); + return await this.getParsedResponse(response); + } catch (err) { + const message = `Failed to upsert remote. ${err.message}`; + if (err instanceof ReuniteApiError) { + throw new ReuniteApiError(message, err.status); + } + throw new Error(message); + } + } + async push(organizationId, projectId, payload, files) { + const formData = new globalThis.FormData(); + formData.append("remoteId", payload.remoteId); + formData.append("commit[message]", payload.commit.message); + formData.append("commit[author][name]", payload.commit.author.name); + formData.append("commit[author][email]", payload.commit.author.email); + formData.append("commit[branchName]", payload.commit.branchName); + if (payload.commit.url) { + formData.append("commit[url]", payload.commit.url); + } + if (payload.commit.namespace) { + formData.append("commit[namespaceId]", payload.commit.namespace); + } + if (payload.commit.sha) { + formData.append("commit[sha]", payload.commit.sha); + } + if (payload.commit.repository) { + formData.append("commit[repositoryId]", payload.commit.repository); + } + if (payload.commit.createdAt) { + formData.append("commit[createdAt]", payload.commit.createdAt); + } + for (const file of files) { + const blob = Buffer.isBuffer(file.stream) ? new Blob([file.stream]) : new Blob([await streamToBuffer(file.stream)]); + formData.append(`files[${file.path}]`, blob, file.path); + } + if (payload.isMainBranch) { + formData.append("isMainBranch", "true"); + } + try { + const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/pushes`, { + method: "POST", + headers: { + Authorization: `Bearer ${this.apiKey}` + }, + body: formData + }); + return await this.getParsedResponse(response); + } catch (err) { + const message = `Failed to push. ${err.message}`; + if (err instanceof ReuniteApiError) { + throw new ReuniteApiError(message, err.status); + } + throw new Error(message); + } + } + async getRemotesList({ organizationId, projectId, mountPath }) { + try { + const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/remotes?filter=mountPath:/${mountPath}/`, { + timeout: DEFAULT_FETCH_TIMEOUT, + method: "GET", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${this.apiKey}` + } + }); + return await this.getParsedResponse(response); + } catch (err) { + const message = `Failed to get remote list. ${err.message}`; + if (err instanceof ReuniteApiError) { + throw new ReuniteApiError(message, err.status); + } + throw new Error(message); + } + } + async getPush({ organizationId, projectId, pushId }) { + try { + const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/pushes/${pushId}`, { + timeout: DEFAULT_FETCH_TIMEOUT, + method: "GET", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${this.apiKey}` + } + }); + return await this.getParsedResponse(response); + } catch (err) { + const message = `Failed to get push status. ${err.message}`; + if (err instanceof ReuniteApiError) { + throw new ReuniteApiError(message, err.status); + } + throw new Error(message); + } + } + }; + ReuniteApi = class { + apiClient; + command; + remotes; + constructor({ domain, apiKey, command }) { + this.command = command; + this.apiClient = new ReuniteApiClient(this.command); + this.remotes = new RemotesApi(this.apiClient, domain, apiKey); + } + reportSunsetWarnings() { + const sunsetWarnings = this.apiClient.sunsetWarnings; + if (sunsetWarnings.length) { + const [{ isSunsetExpired, sunsetDate }] = sunsetWarnings.sort((a2, b2) => { + if (a2.isSunsetExpired !== b2.isSunsetExpired) { + return a2.isSunsetExpired ? -1 : 1; + } + return a2.sunsetDate > b2.sunsetDate ? 1 : -1; + }); + const updateVersionMessage = `Update to the latest version by running "npm install @redocly/cli@latest".`; + if (isSunsetExpired) { + logger.error(`The "${this.command}" command is not compatible with your version of Redocly CLI. ${updateVersionMessage} -/***/ }), +`); + } else { + logger.warn(`The "${this.command}" command will be incompatible with your version of Redocly CLI after ${sunsetDate.toLocaleString()}. ${updateVersionMessage} -/***/ 53278: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +`); + } + } + } + }; + } +}); -const tty = __nccwpck_require__(76224) +// node_modules/@redocly/cli/lib/reunite/api/domains.js +function getDomain() { + return process.env.REDOCLY_DOMAIN || REUNITE_URLS.us; +} +function withHttpsValidation(fn) { + return (...args) => { + const url3 = fn(...args); + if (!url3.startsWith("https://")) { + throw new InvalidReuniteUrlError(); + } + return url3; + }; +} +function isLegacyResidency(value) { + return typeof value === "string" && value in REUNITE_URLS; +} +var REUNITE_URLS, getReuniteUrl, InvalidReuniteUrlError; +var init_domains = __esm({ + "node_modules/@redocly/cli/lib/reunite/api/domains.js"() { + REUNITE_URLS = { + us: "https://app.cloud.redocly.com", + eu: "https://app.cloud.eu.redocly.com" + }; + getReuniteUrl = withHttpsValidation((config, residencyOption) => { + try { + const residency = residencyOption || config?.resolvedConfig.residency; + if (isLegacyResidency(residency)) { + return REUNITE_URLS[residency]; + } + if (residency) { + return new URL(residency).origin; + } + if (config?.resolvedConfig.scorecard?.fromProjectUrl) { + return new URL(config.resolvedConfig.scorecard.fromProjectUrl).origin; + } + return REUNITE_URLS.us; + } catch { + throw new InvalidReuniteUrlError(); + } + }); + InvalidReuniteUrlError = class extends Error { + constructor() { + super("Invalid Reunite URL"); + } + }; + } +}); -const env = process.env +// node_modules/@redocly/cli/lib/reunite/api/api-keys.js +function getApiKeys() { + if (process.env.REDOCLY_AUTHORIZATION) { + return process.env.REDOCLY_AUTHORIZATION; + } + throw new Error("No api key provided, please use environment variable REDOCLY_AUTHORIZATION."); +} +var init_api_keys = __esm({ + "node_modules/@redocly/cli/lib/reunite/api/api-keys.js"() { + } +}); -const isDisabled = "NO_COLOR" in env -const isForced = "FORCE_COLOR" in env -const isWindows = process.platform === "win32" +// node_modules/@redocly/cli/lib/reunite/api/index.js +var init_api = __esm({ + "node_modules/@redocly/cli/lib/reunite/api/index.js"() { + init_api_client(); + init_domains(); + init_api_keys(); + } +}); -const isCompatibleTerminal = - tty && tty.isatty(1) && env.TERM && env.TERM !== "dumb" +// node_modules/@redocly/cli/lib/utils/spinner.js +import * as process3 from "node:process"; +var SPINNER_FRAMES, Spinner; +var init_spinner = __esm({ + "node_modules/@redocly/cli/lib/utils/spinner.js"() { + init_lib(); + SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"]; + Spinner = class { + frames; + currentFrame; + intervalId; + message; + constructor() { + this.frames = SPINNER_FRAMES; + this.currentFrame = 0; + this.intervalId = null; + this.message = ""; + } + showFrame() { + logger.info("\r" + this.frames[this.currentFrame] + " " + this.message); + this.currentFrame = (this.currentFrame + 1) % this.frames.length; + } + start(message) { + if (this.message === message) { + return; + } + this.message = message; + if (!process3.stderr.isTTY) { + logger.info(`${message}... +`); + return; + } + if (this.intervalId === null) { + this.intervalId = setInterval(() => { + this.showFrame(); + }, 100); + } + } + stop() { + if (this.intervalId !== null) { + clearInterval(this.intervalId); + this.intervalId = null; + logger.info("\r"); + } + this.message = ""; + } + }; + } +}); -const isCI = - "CI" in env && - ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env) +// node_modules/@redocly/cli/lib/reunite/utils.js +var DeploymentError; +var init_utils4 = __esm({ + "node_modules/@redocly/cli/lib/reunite/utils.js"() { + DeploymentError = class extends Error { + }; + } +}); -let enabled = - !isDisabled && (isForced || isWindows || isCompatibleTerminal || isCI) +// node_modules/@redocly/cli/lib/reunite/commands/utils.js +async function retryUntilConditionMet({ + operation, + condition, + onConditionNotMet, + onRetry, + startTime = Date.now(), + retryTimeoutMs = 6e5, + // 10 min + retryIntervalMs = 5e3 + // 5 sec +}) { + async function attempt() { + const result = await operation(); + if (!condition) { + return result; + } + if (condition(result)) { + return result; + } else if (Date.now() - startTime > retryTimeoutMs) { + throw new Error("Timeout exceeded."); + } else { + onConditionNotMet?.(result); + await pause(retryIntervalMs); + await onRetry?.(result); + return attempt(); + } + } + return attempt(); +} +function handleReuniteError(message, error2) { + if (error2 instanceof DeploymentError) { + return exitWithError(error2.message); + } + if (error2 instanceof ReuniteApiError) { + return exitWithError(`${message} Reason: ${error2.message} (status: ${error2.status}) +`); + } + return exitWithError(`${message} Reason: ${error2.message} +`); +} +var init_utils5 = __esm({ + "node_modules/@redocly/cli/lib/reunite/commands/utils.js"() { + init_lib(); + init_error2(); + init_api(); + init_utils4(); + } +}); -const raw = (open, close, searchRegex, replaceValue) => (s) => - enabled - ? open + - (~(s += "").indexOf(close, 4) // skip opening \x1b[ - ? s.replace(searchRegex, replaceValue) - : s) + - close - : s +// node_modules/@redocly/cli/lib/reunite/commands/push-status.js +var push_status_exports = {}; +__export(push_status_exports, { + handlePushStatus: () => handlePushStatus +}); +async function handlePushStatus({ argv }) { + const startedAt = performance.now(); + const spinner = new Spinner(); + const { organization, project: projectId, pushId, wait } = argv; + const domain = argv.domain || getDomain(); + const maxExecutionTime = argv["max-execution-time"] || 1200; + const retryIntervalMs = argv["retry-interval"] ? argv["retry-interval"] * 1e3 : RETRY_INTERVAL_MS; + const startTime = argv["start-time"] || Date.now(); + const retryTimeoutMs = maxExecutionTime * 1e3; + const continueOnDeployFailures = argv["continue-on-deploy-failures"] || false; + try { + const apiKey = getApiKeys(); + const client = new ReuniteApi({ domain, apiKey, command: "push-status" }); + let pushResponse; + pushResponse = await retryUntilConditionMet({ + operation: () => client.remotes.getPush({ + organizationId: organization, + projectId, + pushId + }), + condition: wait ? ( + // Keep retrying if status is "pending" or "running" (returning false, so the operation will be retried) + (result) => !["pending", "running"].includes(result.status["preview"].deploy.status) + ) : null, + onConditionNotMet: (lastResult) => { + displayDeploymentAndBuildStatus({ + status: lastResult.status["preview"].deploy.status, + url: lastResult.status["preview"].deploy.url, + spinner, + buildType: "preview", + continueOnDeployFailures, + wait + }); + }, + onRetry: (lastResult) => { + if (argv.onRetry) { + argv.onRetry({ + preview: lastResult.status.preview, + production: lastResult.isMainBranch ? lastResult.status.production : null, + commit: lastResult.commit + }); + } + }, + startTime, + retryTimeoutMs, + retryIntervalMs + }); + printPushStatus({ + buildType: "preview", + spinner, + wait, + push: pushResponse, + continueOnDeployFailures + }); + printScorecard(pushResponse.status.preview.scorecard); + const shouldWaitForProdDeployment = pushResponse.isMainBranch && (wait ? pushResponse.status.preview.deploy.status === "success" : true); + if (shouldWaitForProdDeployment) { + pushResponse = await retryUntilConditionMet({ + operation: () => client.remotes.getPush({ + organizationId: organization, + projectId, + pushId + }), + condition: wait ? ( + // Keep retrying if status is "pending" or "running" (returning false, so the operation will be retried) + (result) => !["pending", "running"].includes(result.status["production"].deploy.status) + ) : null, + onConditionNotMet: (lastResult) => { + displayDeploymentAndBuildStatus({ + status: lastResult.status["production"].deploy.status, + url: lastResult.status["production"].deploy.url, + spinner, + buildType: "production", + continueOnDeployFailures, + wait + }); + }, + onRetry: (lastResult) => { + if (argv.onRetry) { + argv.onRetry({ + preview: lastResult.status.preview, + production: lastResult.isMainBranch ? lastResult.status.production : null, + commit: lastResult.commit + }); + } + }, + startTime, + retryTimeoutMs, + retryIntervalMs + }); + } + if (pushResponse.isMainBranch) { + printPushStatus({ + buildType: "production", + spinner, + wait, + push: pushResponse, + continueOnDeployFailures + }); + printScorecard(pushResponse.status.production.scorecard); + } + printPushStatusInfo({ organization, projectId, pushId, startedAt }); + client.reportSunsetWarnings(); + const summary = { + preview: pushResponse.status.preview, + production: pushResponse.isMainBranch ? pushResponse.status.production : null, + commit: pushResponse.commit + }; + return summary; + } catch (err) { + spinner.stop(); + handleReuniteError("\u2717 Failed to get push status.", err); + } finally { + spinner.stop(); + } +} +function printPushStatusInfo({ organization, projectId, pushId, startedAt }) { + logger.info(` +Processed push-status for ${yellow(organization)}, ${yellow(projectId)} and pushID ${yellow(pushId)}. +`); + printExecutionTime("push-status", startedAt, "Finished"); +} +function printPushStatus({ buildType, spinner, push, continueOnDeployFailures }) { + if (!push) { + return; + } + if (push.isOutdated || !push.hasChanges) { + logger.warn(`Files not added to your project. Reason: ${push.isOutdated ? "outdated" : "no changes"}. +`); + } else { + displayDeploymentAndBuildStatus({ + status: push.status[buildType].deploy.status, + url: push.status[buildType].deploy.url, + buildType, + spinner, + continueOnDeployFailures + }); + } +} +function printScorecard(scorecard) { + if (!scorecard || scorecard.length === 0) { + return; + } + logger.output(` +${magenta("Scorecard")}:`); + for (const scorecardItem of scorecard) { + logger.output(` + ${magenta("Name")}: ${scorecardItem.name} + ${magenta("Status")}: ${scorecardItem.status} + ${magenta("URL")}: ${cyan(scorecardItem.url)} + ${magenta("Description")}: ${scorecardItem.description} +`); + } + logger.output(` +`); +} +function displayDeploymentAndBuildStatus({ status, url: url3, spinner, buildType, continueOnDeployFailures, wait }) { + const message = getMessage({ status, url: url3, buildType, wait }); + if (status === "failed" && !continueOnDeployFailures) { + spinner.stop(); + throw new DeploymentError(message); + } + if (wait && (status === "pending" || status === "running")) { + return spinner.start(message); + } + spinner.stop(); + return logger.output(message); +} +function getMessage({ status, url: url3, buildType, wait }) { + switch (status) { + case "skipped": + return `${yellow(`Skipped ${buildType}`)} +`; + case "pending": { + const message = `${yellow(`Pending ${buildType}`)}`; + return wait ? message : `Status: ${message} +`; + } + case "running": { + const message = `${yellow(`Running ${buildType}`)}`; + return wait ? message : `Status: ${message} +`; + } + case "success": + return `${green(`\u{1F680} ${capitalize(buildType)} deploy success.`)} +${magenta(`${capitalize(buildType)} URL`)}: ${cyan(url3 || "No URL yet.")} +`; + case "failed": + return `${red(`\u274C ${capitalize(buildType)} deploy fail.`)} +${magenta(`${capitalize(buildType)} URL`)}: ${cyan(url3 || "No URL yet.")}`; + default: { + const message = `${yellow(`No status yet for ${buildType} deploy`)}`; + return wait ? message : `Status: ${message} +`; + } + } +} +var RETRY_INTERVAL_MS; +var init_push_status = __esm({ + "node_modules/@redocly/cli/lib/reunite/commands/push-status.js"() { + init_lib(); + init_colorette(); + init_miscellaneous(); + init_spinner(); + init_api(); + init_utils4(); + init_utils5(); + RETRY_INTERVAL_MS = 5e3; + } +}); -const init = (open, close) => { - return raw( - `\x1b[${open}m`, - `\x1b[${close}m`, - new RegExp(`\\x1b\\[${close}m`, "g"), - `\x1b[${open}m` - ) +// node_modules/@redocly/cli/lib/reunite/commands/push.js +var push_exports = {}; +__export(push_exports, { + handlePush: () => handlePush +}); +import * as fs8 from "node:fs"; +import * as path12 from "node:path"; +async function handlePush({ argv, config }) { + const startedAt = performance.now(); + const startTime = Date.now(); + const { organization, project: projectId, "mount-path": mountPath, verbose } = argv; + const domain = argv.domain || getDomain(); + if (!domain) { + return exitWithError(`No domain provided, please use --domain option or environment variable REDOCLY_AUTHORIZATION.`); + } + try { + const { "commit-sha": commitSha, "commit-url": commitUrl, "default-branch": defaultBranch, "wait-for-deployment": waitForDeployment, "max-execution-time": maxExecutionTime } = argv; + const author = parseCommitAuthor(argv.author); + const apiKey = getApiKeys(); + const filesToUpload = collectFilesToPush(argv.files); + const commandName = "push"; + if (!filesToUpload.length) { + return printExecutionTime(commandName, startedAt, `No files to upload`); + } + const client = new ReuniteApi({ domain, apiKey, command: commandName }); + const projectDefaultBranch = await client.remotes.getDefaultBranch(organization, projectId); + const remote = await client.remotes.upsert(organization, projectId, { + mountBranchName: projectDefaultBranch, + mountPath + }); + logger.info(`Uploading to ${remote.mountPath} ${filesToUpload.length} ${pluralize("file", filesToUpload.length)}: +`); + const { id } = await client.remotes.push(organization, projectId, { + remoteId: remote.id, + commit: { + message: argv.message, + branchName: argv.branch, + sha: commitSha, + url: commitUrl, + createdAt: argv["created-at"], + namespace: argv.namespace, + repository: argv.repository, + author + }, + isMainBranch: defaultBranch === argv.branch + }, filesToUpload.map((f) => ({ path: slash(f.name), stream: fs8.createReadStream(f.path) }))); + filesToUpload.forEach((f) => { + logger.info(green(`\u2713 ${f.name} +`)); + }); + logger.info("\n"); + logger.info(`Push ID: ${id} +`); + if (waitForDeployment) { + logger.info("\n"); + await handlePushStatus({ + argv: { + organization, + project: projectId, + pushId: id, + wait: true, + domain, + "max-execution-time": maxExecutionTime, + "start-time": startTime, + "continue-on-deploy-failures": argv["continue-on-deploy-failures"] + }, + config, + version + }); + } + if (verbose) { + printExecutionTime(commandName, startedAt, `${pluralize("file", filesToUpload.length)} uploaded to organization ${organization}, project ${projectId}. Push ID: ${id}.`); + } + client.reportSunsetWarnings(); + return { + pushId: id + }; + } catch (err) { + handleReuniteError("\u2717 File upload failed.", err); + } } +function parseCommitAuthor(author) { + const reg = /^.+\s<[^<>]+>$/; + if (!reg.test(author)) { + throw new Error('Invalid author format. Use "Author Name "'); + } + const [name, email] = author.split("<"); + return { + name: name.trim(), + email: email.replace(">", "").trim() + }; +} +function collectFilesToPush(files) { + const collectedFiles = {}; + for (const file of files) { + if (fs8.statSync(file).isDirectory()) { + const dir = file; + const fileList = getFilesList(dir, []); + fileList.forEach((f) => addFile(f, dir)); + } else { + addFile(file, path12.dirname(file)); + } + } + function addFile(filePath, fileDir) { + const fileName = path12.relative(fileDir, filePath); + if (collectedFiles[fileName]) { + logger.warn(`File ${collectedFiles[fileName]} is overwritten by ${filePath} +`); + } + collectedFiles[fileName] = filePath; + } + return Object.entries(collectedFiles).map(([name, filePath]) => getFileEntry(name, filePath)); +} +function getFileEntry(name, filePath) { + return { + name, + path: path12.resolve(filePath) + }; +} +function getFilesList(dir, files) { + const filesAndDirs = fs8.readdirSync(dir); + for (const name of filesAndDirs) { + const currentPath = path12.join(dir, name); + if (fs8.statSync(currentPath).isDirectory()) { + files = getFilesList(currentPath, files); + } else { + files.push(currentPath); + } + } + return files; +} +var init_push = __esm({ + "node_modules/@redocly/cli/lib/reunite/commands/push.js"() { + init_lib(); + init_colorette(); + init_error2(); + init_miscellaneous(); + init_redocly_cli_package(); + init_api(); + init_push_status(); + init_utils5(); + } +}); -exports.options = Object.defineProperty({}, "enabled", { - get: () => enabled, - set: (value) => (enabled = value), -}) - -exports.reset = init(0, 0) -exports.bold = raw("\x1b[1m", "\x1b[22m", /\x1b\[22m/g, "\x1b[22m\x1b[1m") -exports.dim = raw("\x1b[2m", "\x1b[22m", /\x1b\[22m/g, "\x1b[22m\x1b[2m") -exports.italic = init(3, 23) -exports.underline = init(4, 24) -exports.inverse = init(7, 27) -exports.hidden = init(8, 28) -exports.strikethrough = init(9, 29) -exports.black = init(30, 39) -exports.red = init(31, 39) -exports.green = init(32, 39) -exports.yellow = init(33, 39) -exports.blue = init(34, 39) -exports.magenta = init(35, 39) -exports.cyan = init(36, 39) -exports.white = init(37, 39) -exports.gray = init(90, 39) -exports.bgBlack = init(40, 49) -exports.bgRed = init(41, 49) -exports.bgGreen = init(42, 49) -exports.bgYellow = init(43, 49) -exports.bgBlue = init(44, 49) -exports.bgMagenta = init(45, 49) -exports.bgCyan = init(46, 49) -exports.bgWhite = init(47, 49) -exports.blackBright = init(90, 39) -exports.redBright = init(91, 39) -exports.greenBright = init(92, 39) -exports.yellowBright = init(93, 39) -exports.blueBright = init(94, 39) -exports.magentaBright = init(95, 39) -exports.cyanBright = init(96, 39) -exports.whiteBright = init(97, 39) -exports.bgBlackBright = init(100, 49) -exports.bgRedBright = init(101, 49) -exports.bgGreenBright = init(102, 49) -exports.bgYellowBright = init(103, 49) -exports.bgBlueBright = init(104, 49) -exports.bgMagentaBright = init(105, 49) -exports.bgCyanBright = init(106, 49) -exports.bgWhiteBright = init(107, 49) +// src/main.ts +var core4 = __toESM(require_core(), 1); + +// src/set-commit-statuses.ts +var core = __toESM(require_core(), 1); +var github = __toESM(require_github(), 1); +async function setCommitStatuses({ + commitStatuses, + owner, + repo, + commitId +}) { + const githubToken = core.getInput("githubToken"); + const octokit = github.getOctokit(githubToken); + if (commitStatuses?.length > 0) { + await Promise.all( + commitStatuses.map(async (status) => { + await octokit.rest.repos.createCommitStatus({ + owner, + repo, + sha: commitId, + state: mapDeploymentStateToGithubCommitState(status.status), + target_url: status.url, + context: status.name, + description: status.description + }); + }) + ); + } +} +function mapDeploymentStateToGithubCommitState(state) { + switch (state) { + case "pending": + case "running": + return "pending"; + case "success": + return "success"; + case "failed": + return "error"; + default: + throw new TypeError(`Unknown deployment state: ${state}`); + } +} +// src/helpers.ts +var core3 = __toESM(require_core(), 1); +var github2 = __toESM(require_github(), 1); +import path11 from "path"; -/***/ }), +// src/redocly-config.ts +async function loadRedoclyConfig() { + const { loadConfig: load2 } = await Promise.resolve().then(() => (init_lib(), lib_exports)); + return load2(); +} -/***/ 30425: -/***/ ((module) => { +// src/helpers.ts +function parseInputData() { + const redoclyOrgSlug = core3.getInput("organization", { required: true }); + const redoclyProjectSlug = core3.getInput("project", { required: true }); + const mountPath = core3.getInput("mountPath", { required: true }); + const files = core3.getInput("files", { required: true }).split(" "); + const redoclyDomain = core3.getInput("domain") || "https://app.cloud.redocly.com"; + const maxExecutionTime = Number(core3.getInput("maxExecutionTime")) || 1200; + const defaultBranch = core3.getInput("defaultBranch") || void 0; + const absoluteFilePaths = files.map( + (_path) => path11.join(process.env.GITHUB_WORKSPACE || "", _path) + ); + return { + redoclyOrgSlug, + redoclyProjectSlug, + mountPath, + files: absoluteFilePaths, + redoclyDomain, + maxExecutionTime, + defaultBranch + }; +} +async function parseEventData(defaultBranchOverride) { + if (!(github2.context.eventName === "push" || github2.context.eventName === "pull_request")) { + throw new Error( + 'Unsupported GitHub event type. Only "push" and "pull_request" events are supported.' + ); + } + if (github2.context.eventName === "pull_request") { + const allowedActions = ["opened", "synchronize", "reopened"]; + if (!github2.context.payload.action || !allowedActions.includes(github2.context.payload.action)) { + throw new Error( + 'Unsupported GitHub event. Only "opened", "synchronize" and "reopened" actions are supported for pull requests.' + ); + } + } + const namespace = github2.context.payload?.repository?.owner?.login; + const repository = github2.context.payload?.repository?.name; + if (!namespace || !repository) { + throw new Error( + "Invalid GitHub event data. Can not get owner or repository name from the event payload." + ); + } + const branch = github2.context.payload.pull_request?.["head"]?.["ref"] || github2.context.ref.replace("refs/heads/", ""); + if (!branch) { + throw new Error( + "Invalid GitHub event data. Can not get branch from the event payload." + ); + } + const defaultBranch = defaultBranchOverride || github2.context.payload?.repository?.default_branch || github2.context.payload?.repository?.master_branch; + if (!defaultBranch) { + throw new Error( + 'Invalid GitHub event data. Can not get default branch from the event payload. You can use the "defaultBranch" input to set it manually.' + ); + } + const commitSha = getCommitSha(); + if (!commitSha) { + throw new Error( + "Invalid GitHub event data. Can not get commit sha from the event payload." + ); + } + const githubToken = core3.getInput("githubToken"); + const octokit = github2.getOctokit(githubToken); + const { data: commitData } = await octokit.rest.repos.getCommit({ + owner: namespace, + repo: repository, + ref: commitSha + }); + if (!commitData.commit.author?.name || !commitData.commit.author?.email) { + throw new Error( + "Invalid GitHub event data. Can not get author name or email from the event payload." + ); + } + const commit = { + commitSha, + commitMessage: commitData.commit.message, + commitUrl: commitData.html_url, + commitAuthor: `${commitData.commit.author?.name} <${commitData.commit.author?.email}>`, + commitCreatedAt: commitData.commit.author?.date + }; + return { + eventName: github2.context.eventName, + namespace, + repository, + branch, + defaultBranch, + commit + }; +} +function getCommitSha() { + if (github2.context.eventName === "push") { + return github2.context.payload.after; + } + if (github2.context.eventName === "pull_request") { + return github2.context.payload.pull_request?.head?.sha; + } +} +async function getRedoclyConfig() { + return loadRedoclyConfig(); +} -"use strict"; -module.exports = JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}'); +// src/redocly-cli.ts +async function loadRedoclyCliCommands() { + const [push, pushStatus] = await Promise.all([ + Promise.resolve().then(() => (init_push(), push_exports)), + Promise.resolve().then(() => (init_push_status(), push_status_exports)) + ]); + return { + handlePush: push.handlePush, + handlePushStatus: pushStatus.handlePushStatus + }; +} -/***/ }), +// package.json +var dependencies = { + "@actions/core": "^1.10.1", + "@actions/github": "^6.0.0", + "@octokit/rest": "^20.1.0", + "@redocly/cli": "2.31.2", + "@redocly/openapi-core": "2.31.2" +}; -/***/ 3257: -/***/ ((module) => { +// src/main.ts +var redoclyCliVersion = dependencies["@redocly/cli"]; +async function run() { + try { + const inputData = parseInputData(); + const ghEvent = await parseEventData(inputData.defaultBranch); + console.debug("Parsed input data", inputData); + console.debug("Parsed GitHub event", ghEvent); + const config = await getRedoclyConfig(); + const { handlePush: handlePush2, handlePushStatus: handlePushStatus2 } = await loadRedoclyCliCommands(); + const pushData = await handlePush2({ + argv: { + domain: inputData.redoclyDomain, + organization: inputData.redoclyOrgSlug, + project: inputData.redoclyProjectSlug, + "mount-path": inputData.mountPath, + files: inputData.files, + "max-execution-time": inputData.maxExecutionTime, + namespace: ghEvent.namespace, + repository: ghEvent.repository, + branch: ghEvent.branch, + "default-branch": ghEvent.defaultBranch, + message: ghEvent.commit.commitMessage, + "commit-sha": ghEvent.commit.commitSha, + "commit-url": ghEvent.commit.commitUrl, + author: ghEvent.commit.commitAuthor, + "created-at": ghEvent.commit.commitCreatedAt + }, + config, + version: redoclyCliVersion + }); + if (!pushData?.pushId) { + throw new Error("Missing push ID"); + } + const pushStatusData = await handlePushStatus2({ + argv: { + organization: inputData.redoclyOrgSlug, + project: inputData.redoclyProjectSlug, + pushId: pushData.pushId, + domain: inputData.redoclyDomain, + wait: true, + "continue-on-deploy-failures": true, + "max-execution-time": inputData.maxExecutionTime, + onRetry: async (lastResult) => { + try { + await setCommitStatuses({ + commitStatuses: lastResult.commit.statuses, + owner: ghEvent.namespace, + repo: ghEvent.repository, + commitId: ghEvent.commit.commitSha + }); + } catch (error2) { + core4.error( + `Failed to set commit statuses. Error: ${error2?.message}` + ); + } + } + }, + config, + version: redoclyCliVersion + }); + if (!pushStatusData) { + throw new Error("Missing push status data"); + } + console.debug( + "Amount of final commit statuses to set", + pushStatusData.commit.statuses.length + ); + await setCommitStatuses({ + commitStatuses: pushStatusData.commit.statuses, + owner: ghEvent.namespace, + repo: ghEvent.repository, + commitId: ghEvent.commit.commitSha + }); + console.debug("Action finished successfully. Push ID:", pushData.pushId); + core4.setOutput("pushId", pushData.pushId); + } catch (error2) { + if (error2 instanceof Error) core4.setFailed(error2.message); + } +} -"use strict"; -module.exports = JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/applicator","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/applicator":true},"$dynamicAnchor":"meta","title":"Applicator vocabulary meta-schema","type":["object","boolean"],"properties":{"prefixItems":{"$ref":"#/$defs/schemaArray"},"items":{"$dynamicRef":"#meta"},"contains":{"$dynamicRef":"#meta"},"additionalProperties":{"$dynamicRef":"#meta"},"properties":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"propertyNames":{"format":"regex"},"default":{}},"dependentSchemas":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"default":{}},"propertyNames":{"$dynamicRef":"#meta"},"if":{"$dynamicRef":"#meta"},"then":{"$dynamicRef":"#meta"},"else":{"$dynamicRef":"#meta"},"allOf":{"$ref":"#/$defs/schemaArray"},"anyOf":{"$ref":"#/$defs/schemaArray"},"oneOf":{"$ref":"#/$defs/schemaArray"},"not":{"$dynamicRef":"#meta"}},"$defs":{"schemaArray":{"type":"array","minItems":1,"items":{"$dynamicRef":"#meta"}}}}'); +// src/index.ts +run(); +/*! Bundled license information: -/***/ }), +undici/lib/web/fetch/body.js: + (*! formdata-polyfill. MIT License. Jimmy Wärting *) -/***/ 3002: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/content","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/content":true},"$dynamicAnchor":"meta","title":"Content vocabulary meta-schema","type":["object","boolean"],"properties":{"contentEncoding":{"type":"string"},"contentMediaType":{"type":"string"},"contentSchema":{"$dynamicRef":"#meta"}}}'); - -/***/ }), - -/***/ 24630: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/core","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/core":true},"$dynamicAnchor":"meta","title":"Core vocabulary meta-schema","type":["object","boolean"],"properties":{"$id":{"$ref":"#/$defs/uriReferenceString","$comment":"Non-empty fragments not allowed.","pattern":"^[^#]*#?$"},"$schema":{"$ref":"#/$defs/uriString"},"$ref":{"$ref":"#/$defs/uriReferenceString"},"$anchor":{"$ref":"#/$defs/anchorString"},"$dynamicRef":{"$ref":"#/$defs/uriReferenceString"},"$dynamicAnchor":{"$ref":"#/$defs/anchorString"},"$vocabulary":{"type":"object","propertyNames":{"$ref":"#/$defs/uriString"},"additionalProperties":{"type":"boolean"}},"$comment":{"type":"string"},"$defs":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"}}},"$defs":{"anchorString":{"type":"string","pattern":"^[A-Za-z_][-A-Za-z0-9._]*$"},"uriString":{"type":"string","format":"uri"},"uriReferenceString":{"type":"string","format":"uri-reference"}}}'); - -/***/ }), - -/***/ 5947: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/format-annotation","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/format-annotation":true},"$dynamicAnchor":"meta","title":"Format vocabulary meta-schema for annotation results","type":["object","boolean"],"properties":{"format":{"type":"string"}}}'); - -/***/ }), - -/***/ 96970: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/meta-data","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/meta-data":true},"$dynamicAnchor":"meta","title":"Meta-data vocabulary meta-schema","type":["object","boolean"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"default":true,"deprecated":{"type":"boolean","default":false},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true}}}'); - -/***/ }), - -/***/ 70392: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/unevaluated","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/unevaluated":true},"$dynamicAnchor":"meta","title":"Unevaluated applicator vocabulary meta-schema","type":["object","boolean"],"properties":{"unevaluatedItems":{"$dynamicRef":"#meta"},"unevaluatedProperties":{"$dynamicRef":"#meta"}}}'); - -/***/ }), - -/***/ 71526: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/validation","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/validation":true},"$dynamicAnchor":"meta","title":"Validation vocabulary meta-schema","type":["object","boolean"],"properties":{"type":{"anyOf":[{"$ref":"#/$defs/simpleTypes"},{"type":"array","items":{"$ref":"#/$defs/simpleTypes"},"minItems":1,"uniqueItems":true}]},"const":true,"enum":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/$defs/nonNegativeInteger"},"minLength":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"maxItems":{"$ref":"#/$defs/nonNegativeInteger"},"minItems":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxContains":{"$ref":"#/$defs/nonNegativeInteger"},"minContains":{"$ref":"#/$defs/nonNegativeInteger","default":1},"maxProperties":{"$ref":"#/$defs/nonNegativeInteger"},"minProperties":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"required":{"$ref":"#/$defs/stringArray"},"dependentRequired":{"type":"object","additionalProperties":{"$ref":"#/$defs/stringArray"}}},"$defs":{"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"$ref":"#/$defs/nonNegativeInteger","default":0},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}}}'); - -/***/ }), - -/***/ 78691: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/schema","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/core":true,"https://json-schema.org/draft/2020-12/vocab/applicator":true,"https://json-schema.org/draft/2020-12/vocab/unevaluated":true,"https://json-schema.org/draft/2020-12/vocab/validation":true,"https://json-schema.org/draft/2020-12/vocab/meta-data":true,"https://json-schema.org/draft/2020-12/vocab/format-annotation":true,"https://json-schema.org/draft/2020-12/vocab/content":true},"$dynamicAnchor":"meta","title":"Core and Validation specifications meta-schema","allOf":[{"$ref":"meta/core"},{"$ref":"meta/applicator"},{"$ref":"meta/unevaluated"},{"$ref":"meta/validation"},{"$ref":"meta/meta-data"},{"$ref":"meta/format-annotation"},{"$ref":"meta/content"}],"type":["object","boolean"],"$comment":"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.","properties":{"definitions":{"$comment":"\\"definitions\\" has been replaced by \\"$defs\\".","type":"object","additionalProperties":{"$dynamicRef":"#meta"},"deprecated":true,"default":{}},"dependencies":{"$comment":"\\"dependencies\\" has been split and replaced by \\"dependentSchemas\\" and \\"dependentRequired\\" in order to serve their differing semantics.","type":"object","additionalProperties":{"anyOf":[{"$dynamicRef":"#meta"},{"$ref":"meta/validation#/$defs/stringArray"}]},"deprecated":true,"default":{}},"$recursiveAnchor":{"$comment":"\\"$recursiveAnchor\\" has been replaced by \\"$dynamicAnchor\\".","$ref":"meta/core#/$defs/anchorString","deprecated":true},"$recursiveRef":{"$comment":"\\"$recursiveRef\\" has been replaced by \\"$dynamicRef\\".","$ref":"meta/core#/$defs/uriReferenceString","deprecated":true}}}'); - -/***/ }), - -/***/ 67218: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"name":"@redocly/cli","version":"1.34.13","description":"","license":"MIT","bin":{"redocly":"bin/cli.js","openapi":"bin/cli.js"},"engines":{"node":">=18.17.0","npm":">=9.5.0"},"engineStrict":true,"scripts":{"compile":"tsc","copy-assets":"cp src/commands/preview-docs/preview-server/default.hbs lib/commands/preview-docs/preview-server/default.hbs && cp src/commands/preview-docs/preview-server/hot.js lib/commands/preview-docs/preview-server/hot.js && cp src/commands/preview-docs/preview-server/oauth2-redirect.html lib/commands/preview-docs/preview-server/oauth2-redirect.html && cp src/commands/build-docs/template.hbs lib/commands/build-docs/template.hbs ","prepack":"npm run copy-assets","prepublishOnly":"npm run copy-assets && cp ../../README.md ."},"repository":{"type":"git","url":"https://github.com/Redocly/redocly-cli.git"},"homepage":"https://github.com/Redocly/redocly-cli","keywords":["linter","OpenAPI","Swagger","OpenAPI linter","Swagger linter","AsyncAPI linter","Arazzo linter","oas"],"contributors":["Roman Hotsiy (https://redocly.com/)"],"dependencies":{"@redocly/config":"0.22.0","@redocly/openapi-core":"1.34.13","@redocly/respect-core":"1.34.13","abort-controller":"3.0.0","chokidar":"3.5.3","colorette":"1.4.0","core-js":"3.32.1","dotenv":"16.4.7","form-data":"4.0.4","get-port-please":"3.0.1","glob":"7.2.3","handlebars":"4.7.8","mobx":"6.12.3","@opentelemetry/api":"1.9.0","@opentelemetry/exporter-trace-otlp-http":"0.53.0","@opentelemetry/resources":"1.26.0","@opentelemetry/sdk-trace-node":"1.26.0","@opentelemetry/semantic-conventions":"1.27.0","pluralize":"8.0.0","react":"^17.0.0 || ^18.2.0 || ^19.2.1","react-dom":"^17.0.0 || ^18.2.0 || ^19.2.1","redoc":"2.5.0","semver":"7.7.4","simple-websocket":"9.1.0","styled-components":"6.3.9","yargs":"17.0.1"},"devDependencies":{"@types/configstore":"^5.0.1","@types/glob":"^8.1.0","@types/pluralize":"^0.0.29","@types/react":"^17.0.0 || ^18.2.21 || ^19.0.0","@types/react-dom":"^17.0.0 || ^18.2.7 || ^19.0.0","@types/semver":"^7.5.0","@types/yargs":"17.0.32","typescript":"5.5.3"}}'); - -/***/ }), - -/***/ 43244: -/***/ ((module) => { - -"use strict"; -module.exports = {"i8":"1.34.13"}; - -/***/ }), - -/***/ 4147: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse('{"name":"@redocly/reunite-push-action","description":"GitHub Action for pushing files to Redocly Reunite app","version":"1.0.0","author":"Redocly","private":true,"keywords":["actions","node","setup","redocly"],"exports":{".":"./dist/index.js"},"engines":{"node":">=20"},"scripts":{"all":"npm run prettier && npm run lint && npm run test && npm run package","prettier:check":"npx prettier --check .","prettier":"npx prettier --write .","lint":"npx eslint . -c ./.github/linters/.eslintrc.yml","test":"npx jest","test:watch":"npm run test -- --watch","test:coverage":"npm run test -- --coverage","test:ci":"npm run test -- --coverage --ci --silent --testLocationInResults --json --outputFile=results.json","package":"npx ncc build src/index.ts -o dist --source-map --license licenses.txt --transpile-only","package:watch":"npm run package -- --watch","bundle":"npm run prettier && npm run package","compile-fake-server":"tsc -p tsconfig.fake-server.json","fake-server:start":"npm run compile-fake-server && pm2 start ./fake-api-server/.dist/fake-api-server.js","release":"./script/release"},"license":"MIT","dependencies":{"@actions/core":"^1.10.1","@actions/github":"^6.0.0","@octokit/rest":"^20.1.0","@redocly/cli":"1.34.13"},"devDependencies":{"@jest/globals":"^29.7.0","@types/express":"^4.17.21","@types/jest":"^29.5.14","@types/node":"^20.12.7","@typescript-eslint/eslint-plugin":"^7.7.0","@typescript-eslint/parser":"^7.7.0","@vercel/ncc":"^0.38.1","eslint":"^8.57.0","eslint-plugin-github":"^4.10.2","eslint-plugin-jest":"^28.2.0","eslint-plugin-jsonc":"^2.15.1","eslint-plugin-prettier":"^5.1.3","express":"^4.21.1","jest":"^29.7.0","make-coverage-badge":"^1.2.0","pm2":"^6.0.14","prettier":"^3.2.5","prettier-eslint":"^16.3.0","ts-jest":"^29.1.2","ts-node":"^10.9.2","typescript":"^5.4.5"},"eslintConfig":{"extends":"./.github/linters/.eslintrc.yml"},"overrides":{"systeminformation@<5.27.14":">=5.27.14","undici":"^7.24.0","@typescript-eslint/typescript-estree":{"minimatch":">=9.0.7"},"handlebars":">=4.7.9","flatted":">=3.4.2"}}'); - -/***/ }) +undici/lib/web/websocket/frame.js: + (*! ws. MIT License. Einar Otto Stangvik *) -/******/ }); -/************************************************************************/ -/******/ // 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] = { -/******/ id: moduleId, -/******/ loaded: false, -/******/ 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]; -/******/ } -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/node module decorator */ -/******/ (() => { -/******/ __nccwpck_require__.nmd = (module) => { -/******/ module.paths = []; -/******/ if (!module.children) module.children = []; -/******/ return module; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/compat */ -/******/ -/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/"; -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. -(() => { -"use strict"; -var exports = __webpack_exports__; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * The entrypoint for the action. - */ -const main_1 = __nccwpck_require__(70399); -// eslint-disable-next-line @typescript-eslint/no-floating-promises -(0, main_1.run)(); - -})(); - -module.exports = __webpack_exports__; -/******/ })() -; -//# sourceMappingURL=index.js.map \ No newline at end of file +js-yaml/dist/js-yaml.mjs: + (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *) +*/ +//# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map index 5bdd3f3..d59ff3c 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1,7 @@ -{"version":3,"file":"index.js","mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/oBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/8YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC10EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3gBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9mBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACljBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5iBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3DA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9NA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7lBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/ZA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgFA;;;;;;;;;;;;;;;AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/TA;AACA;AACA;AACA;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnGA;AACA;AACA;AACA;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5WA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/+BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACziBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrnCA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjSA;AACA;AACA;AACA;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACn+BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5+BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACreA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACp8BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpsDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtfA;AACA;AACA;AACA;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3iBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3DA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9NA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtIA;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5cA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzkDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACl+BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3cA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9eA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1jBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AClhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACreA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5oBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5fA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9jBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9sBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACz2EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1lCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACj/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7+BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9uBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACv4CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjFA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxBA;AA0BA;AAGA;AAGA;AAGA;AAGA;AAEA;AACA;AAEA;AAEA;AAEA;AAGA;AACA;AAEA;AACA;AAEA;AACA;AAGA;AAEA;AAEA;AAEA;AACA;AAGA;AAEA;AAEA;AACA;AAEA;AACA;AAGA;AAEA;AAEA;AACA;AAGA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhGA;AAkGA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AARA;AAUA;AACA;AACA;AAEA;AACA;AAJA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7IA;AAEA;AACA;AAEA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAKA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AACA;AAAA;AACA;AACA;AAtFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACZA;AACA;AAKA;AAWA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AA9BA;AAgCA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpDA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AChCA;AACA;AACA;AACA;AACA;;;;ACJA;AACA;;;;;;;;;;ACDA;;AAEA;AACA;AAEA;AACA","sources":[".././node_modules/@actions/core/lib/command.js",".././node_modules/@actions/core/lib/core.js",".././node_modules/@actions/core/lib/file-command.js",".././node_modules/@actions/core/lib/oidc-utils.js",".././node_modules/@actions/core/lib/path-utils.js",".././node_modules/@actions/core/lib/platform.js",".././node_modules/@actions/core/lib/summary.js",".././node_modules/@actions/core/lib/utils.js",".././node_modules/@actions/exec/lib/exec.js",".././node_modules/@actions/exec/lib/toolrunner.js",".././node_modules/@actions/github/lib/context.js",".././node_modules/@actions/github/lib/github.js",".././node_modules/@actions/github/lib/internal/utils.js",".././node_modules/@actions/github/lib/utils.js",".././node_modules/@actions/http-client/lib/auth.js",".././node_modules/@actions/http-client/lib/index.js",".././node_modules/@actions/http-client/lib/proxy.js",".././node_modules/@actions/io/lib/io-util.js",".././node_modules/@actions/io/lib/io.js",".././node_modules/@octokit/auth-token/dist-node/index.js",".././node_modules/@octokit/core/dist-node/index.js",".././node_modules/@octokit/endpoint/dist-node/index.js",".././node_modules/@octokit/graphql/dist-node/index.js",".././node_modules/@octokit/plugin-paginate-rest/dist-node/index.js",".././node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js",".././node_modules/@octokit/request-error/dist-node/index.js",".././node_modules/@octokit/request/dist-node/index.js",".././node_modules/@opentelemetry/api/build/src/api/context.js",".././node_modules/@opentelemetry/api/build/src/api/diag.js",".././node_modules/@opentelemetry/api/build/src/api/metrics.js",".././node_modules/@opentelemetry/api/build/src/api/propagation.js",".././node_modules/@opentelemetry/api/build/src/api/trace.js",".././node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js",".././node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js",".././node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js",".././node_modules/@opentelemetry/api/build/src/baggage/utils.js",".././node_modules/@opentelemetry/api/build/src/context-api.js",".././node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js",".././node_modules/@opentelemetry/api/build/src/context/context.js",".././node_modules/@opentelemetry/api/build/src/diag-api.js",".././node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js",".././node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js",".././node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js",".././node_modules/@opentelemetry/api/build/src/diag/types.js",".././node_modules/@opentelemetry/api/build/src/index.js",".././node_modules/@opentelemetry/api/build/src/internal/global-utils.js",".././node_modules/@opentelemetry/api/build/src/internal/semver.js",".././node_modules/@opentelemetry/api/build/src/metrics-api.js",".././node_modules/@opentelemetry/api/build/src/metrics/Metric.js",".././node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js",".././node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js",".././node_modules/@opentelemetry/api/build/src/platform/index.js",".././node_modules/@opentelemetry/api/build/src/platform/node/globalThis.js",".././node_modules/@opentelemetry/api/build/src/platform/node/index.js",".././node_modules/@opentelemetry/api/build/src/propagation-api.js",".././node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js",".././node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js",".././node_modules/@opentelemetry/api/build/src/trace-api.js",".././node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js",".././node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js",".././node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js",".././node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js",".././node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js",".././node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js",".././node_modules/@opentelemetry/api/build/src/trace/context-utils.js",".././node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js",".././node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js",".././node_modules/@opentelemetry/api/build/src/trace/internal/utils.js",".././node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js",".././node_modules/@opentelemetry/api/build/src/trace/span_kind.js",".././node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js",".././node_modules/@opentelemetry/api/build/src/trace/status.js",".././node_modules/@opentelemetry/api/build/src/trace/trace_flags.js",".././node_modules/@opentelemetry/api/build/src/version.js",".././node_modules/@opentelemetry/context-async-hooks/build/src/AbstractAsyncHooksContextManager.js",".././node_modules/@opentelemetry/context-async-hooks/build/src/AsyncHooksContextManager.js",".././node_modules/@opentelemetry/context-async-hooks/build/src/AsyncLocalStorageContextManager.js",".././node_modules/@opentelemetry/context-async-hooks/build/src/index.js",".././node_modules/@opentelemetry/core/build/src/ExportResult.js",".././node_modules/@opentelemetry/core/build/src/baggage/constants.js",".././node_modules/@opentelemetry/core/build/src/baggage/propagation/W3CBaggagePropagator.js",".././node_modules/@opentelemetry/core/build/src/baggage/utils.js",".././node_modules/@opentelemetry/core/build/src/common/anchored-clock.js",".././node_modules/@opentelemetry/core/build/src/common/attributes.js",".././node_modules/@opentelemetry/core/build/src/common/global-error-handler.js",".././node_modules/@opentelemetry/core/build/src/common/hex-to-binary.js",".././node_modules/@opentelemetry/core/build/src/common/logging-error-handler.js",".././node_modules/@opentelemetry/core/build/src/common/time.js",".././node_modules/@opentelemetry/core/build/src/index.js",".././node_modules/@opentelemetry/core/build/src/internal/exporter.js",".././node_modules/@opentelemetry/core/build/src/internal/validators.js",".././node_modules/@opentelemetry/core/build/src/platform/index.js",".././node_modules/@opentelemetry/core/build/src/platform/node/RandomIdGenerator.js",".././node_modules/@opentelemetry/core/build/src/platform/node/environment.js",".././node_modules/@opentelemetry/core/build/src/platform/node/globalThis.js",".././node_modules/@opentelemetry/core/build/src/platform/node/hex-to-base64.js",".././node_modules/@opentelemetry/core/build/src/platform/node/index.js",".././node_modules/@opentelemetry/core/build/src/platform/node/performance.js",".././node_modules/@opentelemetry/core/build/src/platform/node/sdk-info.js",".././node_modules/@opentelemetry/core/build/src/platform/node/timer-util.js",".././node_modules/@opentelemetry/core/build/src/propagation/composite.js",".././node_modules/@opentelemetry/core/build/src/trace/TraceState.js",".././node_modules/@opentelemetry/core/build/src/trace/W3CTraceContextPropagator.js",".././node_modules/@opentelemetry/core/build/src/trace/rpc-metadata.js",".././node_modules/@opentelemetry/core/build/src/trace/sampler/AlwaysOffSampler.js",".././node_modules/@opentelemetry/core/build/src/trace/sampler/AlwaysOnSampler.js",".././node_modules/@opentelemetry/core/build/src/trace/sampler/ParentBasedSampler.js",".././node_modules/@opentelemetry/core/build/src/trace/sampler/TraceIdRatioBasedSampler.js",".././node_modules/@opentelemetry/core/build/src/trace/suppress-tracing.js",".././node_modules/@opentelemetry/core/build/src/utils/callback.js",".././node_modules/@opentelemetry/core/build/src/utils/environment.js",".././node_modules/@opentelemetry/core/build/src/utils/lodash.merge.js",".././node_modules/@opentelemetry/core/build/src/utils/merge.js",".././node_modules/@opentelemetry/core/build/src/utils/promise.js",".././node_modules/@opentelemetry/core/build/src/utils/sampling.js",".././node_modules/@opentelemetry/core/build/src/utils/timeout.js",".././node_modules/@opentelemetry/core/build/src/utils/url.js",".././node_modules/@opentelemetry/core/build/src/utils/wrap.js",".././node_modules/@opentelemetry/core/build/src/version.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/platform/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/platform/node/OTLPTraceExporter.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/platform/node/index.js",".././node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/version.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/OTLPExporterBase.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/index.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/is-export-retryable.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/browser/OTLPExporterBrowserBase.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/browser/index.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/browser/send-beacon-transport.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/browser/xhr-transport.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/index.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/node/OTLPExporterNodeBase.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/node/http-exporter-transport.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/node/http-transport-utils.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/node/index.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/node/types.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/platform/node/util.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/retrying-transport.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/types.js",".././node_modules/@opentelemetry/otlp-exporter-base/build/src/util.js",".././node_modules/@opentelemetry/otlp-transformer/build/src/common/index.js",".././node_modules/@opentelemetry/otlp-transformer/build/src/common/internal.js",".././node_modules/@opentelemetry/otlp-transformer/build/src/generated/root.js",".././node_modules/@opentelemetry/otlp-transformer/build/src/index.js",".././node_modules/@opentelemetry/otlp-transformer/build/src/json/serializers.js",".././node_modules/@opentelemetry/otlp-transformer/build/src/logs/index.js",".././node_modules/@opentelemetry/otlp-transformer/build/src/metrics/index.js",".././node_modules/@opentelemetry/otlp-transformer/build/src/metrics/internal.js",".././node_modules/@opentelemetry/otlp-transformer/build/src/protobuf/serializers.js",".././node_modules/@opentelemetry/otlp-transformer/build/src/resource/internal.js",".././node_modules/@opentelemetry/otlp-transformer/build/src/trace/index.js",".././node_modules/@opentelemetry/otlp-transformer/build/src/trace/internal.js",".././node_modules/@opentelemetry/otlp-transformer/build/src/trace/types.js",".././node_modules/@opentelemetry/propagator-b3/build/src/B3MultiPropagator.js",".././node_modules/@opentelemetry/propagator-b3/build/src/B3Propagator.js",".././node_modules/@opentelemetry/propagator-b3/build/src/B3SinglePropagator.js",".././node_modules/@opentelemetry/propagator-b3/build/src/common.js",".././node_modules/@opentelemetry/propagator-b3/build/src/constants.js",".././node_modules/@opentelemetry/propagator-b3/build/src/index.js",".././node_modules/@opentelemetry/propagator-b3/build/src/types.js",".././node_modules/@opentelemetry/propagator-jaeger/build/src/JaegerPropagator.js",".././node_modules/@opentelemetry/propagator-jaeger/build/src/index.js",".././node_modules/@opentelemetry/resources/build/src/Resource.js",".././node_modules/@opentelemetry/resources/build/src/detect-resources.js",".././node_modules/@opentelemetry/resources/build/src/detectors/BrowserDetector.js",".././node_modules/@opentelemetry/resources/build/src/detectors/BrowserDetectorSync.js",".././node_modules/@opentelemetry/resources/build/src/detectors/EnvDetector.js",".././node_modules/@opentelemetry/resources/build/src/detectors/EnvDetectorSync.js",".././node_modules/@opentelemetry/resources/build/src/detectors/index.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/index.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/node/HostDetector.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/node/HostDetectorSync.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/node/OSDetector.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/node/OSDetectorSync.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/node/ProcessDetector.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/node/ProcessDetectorSync.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/node/ServiceInstanceIdDetectorSync.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/node/index.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-bsd.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-darwin.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-linux.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-unsupported.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId-win.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/getMachineId.js",".././node_modules/@opentelemetry/resources/build/src/detectors/platform/node/utils.js",".././node_modules/@opentelemetry/resources/build/src/index.js",".././node_modules/@opentelemetry/resources/build/src/platform/index.js",".././node_modules/@opentelemetry/resources/build/src/platform/node/default-service-name.js",".././node_modules/@opentelemetry/resources/build/src/platform/node/index.js",".././node_modules/@opentelemetry/resources/build/src/utils.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/InstrumentDescriptor.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/Instruments.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/Meter.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/MeterProvider.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/ObservableResult.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Drop.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/ExponentialHistogram.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Histogram.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/LastValue.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/Sum.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/Buckets.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/ExponentMapping.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/LogarithmMapping.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/getMapping.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/ieee754.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/mapping/types.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/exponential-histogram/util.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/index.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/aggregator/types.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/export/AggregationSelector.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/export/AggregationTemporality.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/export/ConsoleMetricExporter.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/export/InMemoryMetricExporter.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricData.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReader.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/export/PeriodicExportingMetricReader.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/index.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/state/AsyncMetricStorage.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/state/DeltaMetricProcessor.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/state/HashMap.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/state/MeterProviderSharedState.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/state/MeterSharedState.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/state/MetricCollector.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/state/MetricStorage.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/state/MetricStorageRegistry.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/state/MultiWritableMetricStorage.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/state/ObservableRegistry.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/state/SyncMetricStorage.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/state/TemporalMetricProcessor.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/utils.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/view/Aggregation.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/view/AttributesProcessor.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/view/InstrumentSelector.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/view/MeterSelector.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/view/Predicate.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/view/RegistrationConflicts.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/view/View.js",".././node_modules/@opentelemetry/sdk-metrics/build/src/view/ViewRegistry.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/BasicTracerProvider.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/MultiSpanProcessor.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/Sampler.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/Span.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/Tracer.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/config.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/enums.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/export/BatchSpanProcessorBase.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/export/ConsoleSpanExporter.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/export/InMemorySpanExporter.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/export/NoopSpanProcessor.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/export/SimpleSpanProcessor.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/index.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/platform/index.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/platform/node/RandomIdGenerator.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/platform/node/export/BatchSpanProcessor.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/platform/node/index.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/AlwaysOffSampler.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/AlwaysOnSampler.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/ParentBasedSampler.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/sampler/TraceIdRatioBasedSampler.js",".././node_modules/@opentelemetry/sdk-trace-base/build/src/utility.js",".././node_modules/@opentelemetry/sdk-trace-node/build/src/NodeTracerProvider.js",".././node_modules/@opentelemetry/sdk-trace-node/build/src/index.js",".././node_modules/@opentelemetry/semantic-conventions/build/src/index.js",".././node_modules/@opentelemetry/semantic-conventions/build/src/internal/utils.js",".././node_modules/@opentelemetry/semantic-conventions/build/src/resource/SemanticResourceAttributes.js",".././node_modules/@opentelemetry/semantic-conventions/build/src/resource/index.js",".././node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js",".././node_modules/@opentelemetry/semantic-conventions/build/src/stable_metrics.js",".././node_modules/@opentelemetry/semantic-conventions/build/src/trace/SemanticAttributes.js",".././node_modules/@opentelemetry/semantic-conventions/build/src/trace/index.js",".././node_modules/@protobufjs/aspromise/index.js",".././node_modules/@protobufjs/base64/index.js",".././node_modules/@protobufjs/eventemitter/index.js",".././node_modules/@protobufjs/float/index.js",".././node_modules/@protobufjs/inquire/index.js",".././node_modules/@protobufjs/pool/index.js",".././node_modules/@protobufjs/utf8/index.js",".././node_modules/@redocly/ajv/dist/2020.js",".././node_modules/@redocly/ajv/dist/compile/codegen/code.js",".././node_modules/@redocly/ajv/dist/compile/codegen/index.js",".././node_modules/@redocly/ajv/dist/compile/codegen/scope.js",".././node_modules/@redocly/ajv/dist/compile/errors.js",".././node_modules/@redocly/ajv/dist/compile/index.js",".././node_modules/@redocly/ajv/dist/compile/names.js",".././node_modules/@redocly/ajv/dist/compile/ref_error.js",".././node_modules/@redocly/ajv/dist/compile/resolve.js",".././node_modules/@redocly/ajv/dist/compile/rules.js",".././node_modules/@redocly/ajv/dist/compile/util.js",".././node_modules/@redocly/ajv/dist/compile/validate/applicability.js",".././node_modules/@redocly/ajv/dist/compile/validate/boolSchema.js",".././node_modules/@redocly/ajv/dist/compile/validate/dataType.js",".././node_modules/@redocly/ajv/dist/compile/validate/defaults.js",".././node_modules/@redocly/ajv/dist/compile/validate/index.js",".././node_modules/@redocly/ajv/dist/compile/validate/keyword.js",".././node_modules/@redocly/ajv/dist/compile/validate/subschema.js",".././node_modules/@redocly/ajv/dist/core.js",".././node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/index.js",".././node_modules/@redocly/ajv/dist/runtime/equal.js",".././node_modules/@redocly/ajv/dist/runtime/ucs2length.js",".././node_modules/@redocly/ajv/dist/runtime/uri.js",".././node_modules/@redocly/ajv/dist/runtime/validation_error.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/additionalItems.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/additionalProperties.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/allOf.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/anyOf.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/contains.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/dependencies.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/dependentSchemas.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/if.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/index.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/items.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/items2020.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/not.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/oneOf.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/patternProperties.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/prefixItems.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/properties.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/propertyNames.js",".././node_modules/@redocly/ajv/dist/vocabularies/applicator/thenElse.js",".././node_modules/@redocly/ajv/dist/vocabularies/code.js",".././node_modules/@redocly/ajv/dist/vocabularies/core/id.js",".././node_modules/@redocly/ajv/dist/vocabularies/core/index.js",".././node_modules/@redocly/ajv/dist/vocabularies/core/ref.js",".././node_modules/@redocly/ajv/dist/vocabularies/discriminator/index.js",".././node_modules/@redocly/ajv/dist/vocabularies/discriminator/types.js",".././node_modules/@redocly/ajv/dist/vocabularies/draft2020.js",".././node_modules/@redocly/ajv/dist/vocabularies/dynamic/dynamicAnchor.js",".././node_modules/@redocly/ajv/dist/vocabularies/dynamic/dynamicRef.js",".././node_modules/@redocly/ajv/dist/vocabularies/dynamic/index.js",".././node_modules/@redocly/ajv/dist/vocabularies/dynamic/recursiveAnchor.js",".././node_modules/@redocly/ajv/dist/vocabularies/dynamic/recursiveRef.js",".././node_modules/@redocly/ajv/dist/vocabularies/format/format.js",".././node_modules/@redocly/ajv/dist/vocabularies/format/index.js",".././node_modules/@redocly/ajv/dist/vocabularies/metadata.js",".././node_modules/@redocly/ajv/dist/vocabularies/next.js",".././node_modules/@redocly/ajv/dist/vocabularies/unevaluated/index.js",".././node_modules/@redocly/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js",".././node_modules/@redocly/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js",".././node_modules/@redocly/ajv/dist/vocabularies/validation/const.js",".././node_modules/@redocly/ajv/dist/vocabularies/validation/dependentRequired.js",".././node_modules/@redocly/ajv/dist/vocabularies/validation/enum.js",".././node_modules/@redocly/ajv/dist/vocabularies/validation/index.js",".././node_modules/@redocly/ajv/dist/vocabularies/validation/limitContains.js",".././node_modules/@redocly/ajv/dist/vocabularies/validation/limitItems.js",".././node_modules/@redocly/ajv/dist/vocabularies/validation/limitLength.js",".././node_modules/@redocly/ajv/dist/vocabularies/validation/limitNumber.js",".././node_modules/@redocly/ajv/dist/vocabularies/validation/limitProperties.js",".././node_modules/@redocly/ajv/dist/vocabularies/validation/multipleOf.js",".././node_modules/@redocly/ajv/dist/vocabularies/validation/pattern.js",".././node_modules/@redocly/ajv/dist/vocabularies/validation/required.js",".././node_modules/@redocly/ajv/dist/vocabularies/validation/uniqueItems.js",".././node_modules/@redocly/ajv/node_modules/json-schema-traverse/index.js",".././node_modules/@redocly/cli/lib/auth/device-flow.js",".././node_modules/@redocly/cli/lib/auth/oauth-client.js",".././node_modules/@redocly/cli/lib/commands/auth.js",".././node_modules/@redocly/cli/lib/commands/push.js",".././node_modules/@redocly/cli/lib/otel.js",".././node_modules/@redocly/cli/lib/reunite/api/api-client.js",".././node_modules/@redocly/cli/lib/reunite/api/api-keys.js",".././node_modules/@redocly/cli/lib/reunite/api/domains.js",".././node_modules/@redocly/cli/lib/reunite/api/index.js",".././node_modules/@redocly/cli/lib/reunite/commands/push-status.js",".././node_modules/@redocly/cli/lib/reunite/commands/push.js",".././node_modules/@redocly/cli/lib/reunite/commands/utils.js",".././node_modules/@redocly/cli/lib/reunite/utils.js",".././node_modules/@redocly/cli/lib/types.js",".././node_modules/@redocly/cli/lib/utils/fetch-with-timeout.js",".././node_modules/@redocly/cli/lib/utils/js-utils.js",".././node_modules/@redocly/cli/lib/utils/miscellaneous.js",".././node_modules/@redocly/cli/lib/utils/spinner.js",".././node_modules/@redocly/cli/lib/utils/update-version-notifier.js",".././node_modules/@redocly/cli/node_modules/semver/classes/comparator.js",".././node_modules/@redocly/cli/node_modules/semver/classes/range.js",".././node_modules/@redocly/cli/node_modules/semver/classes/semver.js",".././node_modules/@redocly/cli/node_modules/semver/functions/clean.js",".././node_modules/@redocly/cli/node_modules/semver/functions/cmp.js",".././node_modules/@redocly/cli/node_modules/semver/functions/coerce.js",".././node_modules/@redocly/cli/node_modules/semver/functions/compare-build.js",".././node_modules/@redocly/cli/node_modules/semver/functions/compare-loose.js",".././node_modules/@redocly/cli/node_modules/semver/functions/compare.js",".././node_modules/@redocly/cli/node_modules/semver/functions/diff.js",".././node_modules/@redocly/cli/node_modules/semver/functions/eq.js",".././node_modules/@redocly/cli/node_modules/semver/functions/gt.js",".././node_modules/@redocly/cli/node_modules/semver/functions/gte.js",".././node_modules/@redocly/cli/node_modules/semver/functions/inc.js",".././node_modules/@redocly/cli/node_modules/semver/functions/lt.js",".././node_modules/@redocly/cli/node_modules/semver/functions/lte.js",".././node_modules/@redocly/cli/node_modules/semver/functions/major.js",".././node_modules/@redocly/cli/node_modules/semver/functions/minor.js",".././node_modules/@redocly/cli/node_modules/semver/functions/neq.js",".././node_modules/@redocly/cli/node_modules/semver/functions/parse.js",".././node_modules/@redocly/cli/node_modules/semver/functions/patch.js",".././node_modules/@redocly/cli/node_modules/semver/functions/prerelease.js",".././node_modules/@redocly/cli/node_modules/semver/functions/rcompare.js",".././node_modules/@redocly/cli/node_modules/semver/functions/rsort.js",".././node_modules/@redocly/cli/node_modules/semver/functions/satisfies.js",".././node_modules/@redocly/cli/node_modules/semver/functions/sort.js",".././node_modules/@redocly/cli/node_modules/semver/functions/valid.js",".././node_modules/@redocly/cli/node_modules/semver/index.js",".././node_modules/@redocly/cli/node_modules/semver/internal/constants.js",".././node_modules/@redocly/cli/node_modules/semver/internal/debug.js",".././node_modules/@redocly/cli/node_modules/semver/internal/identifiers.js",".././node_modules/@redocly/cli/node_modules/semver/internal/lrucache.js",".././node_modules/@redocly/cli/node_modules/semver/internal/parse-options.js",".././node_modules/@redocly/cli/node_modules/semver/internal/re.js",".././node_modules/@redocly/cli/node_modules/semver/ranges/gtr.js",".././node_modules/@redocly/cli/node_modules/semver/ranges/intersects.js",".././node_modules/@redocly/cli/node_modules/semver/ranges/ltr.js",".././node_modules/@redocly/cli/node_modules/semver/ranges/max-satisfying.js",".././node_modules/@redocly/cli/node_modules/semver/ranges/min-satisfying.js",".././node_modules/@redocly/cli/node_modules/semver/ranges/min-version.js",".././node_modules/@redocly/cli/node_modules/semver/ranges/outside.js",".././node_modules/@redocly/cli/node_modules/semver/ranges/simplify.js",".././node_modules/@redocly/cli/node_modules/semver/ranges/subset.js",".././node_modules/@redocly/cli/node_modules/semver/ranges/to-comparators.js",".././node_modules/@redocly/cli/node_modules/semver/ranges/valid.js",".././node_modules/@redocly/config/lib/constants.js",".././node_modules/@redocly/config/lib/default-theme-config-schema.js",".././node_modules/@redocly/config/lib/ex-theme-config-schemas.js",".././node_modules/@redocly/config/lib/feedback-config-schema.js",".././node_modules/@redocly/config/lib/graphql-config-schema.js",".././node_modules/@redocly/config/lib/index.js",".././node_modules/@redocly/config/lib/product-override-schema.js",".././node_modules/@redocly/config/lib/redoc-config-schema.js",".././node_modules/@redocly/config/lib/reference-docs-config-schema.js",".././node_modules/@redocly/config/lib/remove-property-recursively.js",".././node_modules/@redocly/config/lib/reunite-config-schema.js",".././node_modules/@redocly/config/lib/root-config-schema.js",".././node_modules/@redocly/config/lib/types/api-functions-types.js",".././node_modules/@redocly/config/lib/types/code-walkthrough-types.js",".././node_modules/@redocly/config/lib/types/config-types.js",".././node_modules/@redocly/config/lib/types/index.js",".././node_modules/@redocly/config/lib/types/portal-shared-types.js",".././node_modules/@redocly/openapi-core/lib/bundle.js",".././node_modules/@redocly/openapi-core/lib/config/all.js",".././node_modules/@redocly/openapi-core/lib/config/builtIn.js",".././node_modules/@redocly/openapi-core/lib/config/config-resolvers.js",".././node_modules/@redocly/openapi-core/lib/config/config.js",".././node_modules/@redocly/openapi-core/lib/config/index.js",".././node_modules/@redocly/openapi-core/lib/config/load.js",".././node_modules/@redocly/openapi-core/lib/config/minimal.js",".././node_modules/@redocly/openapi-core/lib/config/recommended-strict.js",".././node_modules/@redocly/openapi-core/lib/config/recommended.js",".././node_modules/@redocly/openapi-core/lib/config/rules.js",".././node_modules/@redocly/openapi-core/lib/config/spec.js",".././node_modules/@redocly/openapi-core/lib/config/types.js",".././node_modules/@redocly/openapi-core/lib/config/utils.js",".././node_modules/@redocly/openapi-core/lib/decorators/arazzo/index.js",".././node_modules/@redocly/openapi-core/lib/decorators/async2/index.js",".././node_modules/@redocly/openapi-core/lib/decorators/async3/index.js",".././node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-helper.js",".././node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-in.js",".././node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-out.js",".././node_modules/@redocly/openapi-core/lib/decorators/common/info-description-override.js",".././node_modules/@redocly/openapi-core/lib/decorators/common/info-override.js",".././node_modules/@redocly/openapi-core/lib/decorators/common/media-type-examples-override.js",".././node_modules/@redocly/openapi-core/lib/decorators/common/operation-description-override.js",".././node_modules/@redocly/openapi-core/lib/decorators/common/registry-dependencies.js",".././node_modules/@redocly/openapi-core/lib/decorators/common/remove-x-internal.js",".././node_modules/@redocly/openapi-core/lib/decorators/common/tag-description-override.js",".././node_modules/@redocly/openapi-core/lib/decorators/oas2/index.js",".././node_modules/@redocly/openapi-core/lib/decorators/oas2/remove-unused-components.js",".././node_modules/@redocly/openapi-core/lib/decorators/oas3/index.js",".././node_modules/@redocly/openapi-core/lib/decorators/oas3/remove-unused-components.js",".././node_modules/@redocly/openapi-core/lib/decorators/overlay1/index.js",".././node_modules/@redocly/openapi-core/lib/env.js",".././node_modules/@redocly/openapi-core/lib/format/codeframes.js",".././node_modules/@redocly/openapi-core/lib/format/format.js",".././node_modules/@redocly/openapi-core/lib/index.js",".././node_modules/@redocly/openapi-core/lib/js-yaml/index.js",".././node_modules/@redocly/openapi-core/lib/lint.js",".././node_modules/@redocly/openapi-core/lib/logger.js",".././node_modules/@redocly/openapi-core/lib/oas-types.js",".././node_modules/@redocly/openapi-core/lib/output.js",".././node_modules/@redocly/openapi-core/lib/redocly/domains.js",".././node_modules/@redocly/openapi-core/lib/redocly/index.js",".././node_modules/@redocly/openapi-core/lib/redocly/registry-api.js",".././node_modules/@redocly/openapi-core/lib/ref-utils.js",".././node_modules/@redocly/openapi-core/lib/resolve.js",".././node_modules/@redocly/openapi-core/lib/rules/ajv.js",".././node_modules/@redocly/openapi-core/lib/rules/arazzo/criteria-unique.js",".././node_modules/@redocly/openapi-core/lib/rules/arazzo/index.js",".././node_modules/@redocly/openapi-core/lib/rules/arazzo/parameters-unique.js",".././node_modules/@redocly/openapi-core/lib/rules/arazzo/requestBody-replacements-unique.js",".././node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescription-type.js",".././node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescriptions-name-unique.js",".././node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescriptions-not-empty.js",".././node_modules/@redocly/openapi-core/lib/rules/arazzo/step-onFailure-unique.js",".././node_modules/@redocly/openapi-core/lib/rules/arazzo/step-onSuccess-unique.js",".././node_modules/@redocly/openapi-core/lib/rules/arazzo/stepId-unique.js",".././node_modules/@redocly/openapi-core/lib/rules/arazzo/workflow-dependsOn.js",".././node_modules/@redocly/openapi-core/lib/rules/arazzo/workflowId-unique.js",".././node_modules/@redocly/openapi-core/lib/rules/async2/channels-kebab-case.js",".././node_modules/@redocly/openapi-core/lib/rules/async2/index.js",".././node_modules/@redocly/openapi-core/lib/rules/async2/no-channel-trailing-slash.js",".././node_modules/@redocly/openapi-core/lib/rules/async3/channels-kebab-case.js",".././node_modules/@redocly/openapi-core/lib/rules/async3/index.js",".././node_modules/@redocly/openapi-core/lib/rules/async3/no-channel-trailing-slash.js",".././node_modules/@redocly/openapi-core/lib/rules/common/assertions/asserts.js",".././node_modules/@redocly/openapi-core/lib/rules/common/assertions/index.js",".././node_modules/@redocly/openapi-core/lib/rules/common/assertions/utils.js",".././node_modules/@redocly/openapi-core/lib/rules/common/info-contact.js",".././node_modules/@redocly/openapi-core/lib/rules/common/info-license-strict.js",".././node_modules/@redocly/openapi-core/lib/rules/common/info-license-url.js",".././node_modules/@redocly/openapi-core/lib/rules/common/info-license.js",".././node_modules/@redocly/openapi-core/lib/rules/common/no-ambiguous-paths.js",".././node_modules/@redocly/openapi-core/lib/rules/common/no-enum-type-mismatch.js",".././node_modules/@redocly/openapi-core/lib/rules/common/no-http-verbs-in-paths.js",".././node_modules/@redocly/openapi-core/lib/rules/common/no-identical-paths.js",".././node_modules/@redocly/openapi-core/lib/rules/common/no-invalid-parameter-examples.js",".././node_modules/@redocly/openapi-core/lib/rules/common/no-invalid-schema-examples.js",".././node_modules/@redocly/openapi-core/lib/rules/common/no-path-trailing-slash.js",".././node_modules/@redocly/openapi-core/lib/rules/common/no-required-schema-properties-undefined.js",".././node_modules/@redocly/openapi-core/lib/rules/common/no-schema-type-mismatch.js",".././node_modules/@redocly/openapi-core/lib/rules/common/operation-2xx-response.js",".././node_modules/@redocly/openapi-core/lib/rules/common/operation-4xx-response.js",".././node_modules/@redocly/openapi-core/lib/rules/common/operation-description.js",".././node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId-unique.js",".././node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId-url-safe.js",".././node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId.js",".././node_modules/@redocly/openapi-core/lib/rules/common/operation-parameters-unique.js",".././node_modules/@redocly/openapi-core/lib/rules/common/operation-singular-tag.js",".././node_modules/@redocly/openapi-core/lib/rules/common/operation-summary.js",".././node_modules/@redocly/openapi-core/lib/rules/common/operation-tag-defined.js",".././node_modules/@redocly/openapi-core/lib/rules/common/parameter-description.js",".././node_modules/@redocly/openapi-core/lib/rules/common/path-declaration-must-exist.js",".././node_modules/@redocly/openapi-core/lib/rules/common/path-excludes-patterns.js",".././node_modules/@redocly/openapi-core/lib/rules/common/path-http-verbs-order.js",".././node_modules/@redocly/openapi-core/lib/rules/common/path-not-include-query.js",".././node_modules/@redocly/openapi-core/lib/rules/common/path-params-defined.js",".././node_modules/@redocly/openapi-core/lib/rules/common/path-segment-plural.js",".././node_modules/@redocly/openapi-core/lib/rules/common/paths-kebab-case.js",".././node_modules/@redocly/openapi-core/lib/rules/common/required-string-property-missing-min-length.js",".././node_modules/@redocly/openapi-core/lib/rules/common/response-contains-header.js",".././node_modules/@redocly/openapi-core/lib/rules/common/scalar-property-missing-example.js",".././node_modules/@redocly/openapi-core/lib/rules/common/security-defined.js",".././node_modules/@redocly/openapi-core/lib/rules/common/spec-strict-refs.js",".././node_modules/@redocly/openapi-core/lib/rules/common/struct.js",".././node_modules/@redocly/openapi-core/lib/rules/common/tag-description.js",".././node_modules/@redocly/openapi-core/lib/rules/common/tags-alphabetical.js",".././node_modules/@redocly/openapi-core/lib/rules/no-unresolved-refs.js",".././node_modules/@redocly/openapi-core/lib/rules/oas2/boolean-parameter-prefixes.js",".././node_modules/@redocly/openapi-core/lib/rules/oas2/index.js",".././node_modules/@redocly/openapi-core/lib/rules/oas2/request-mime-type.js",".././node_modules/@redocly/openapi-core/lib/rules/oas2/response-contains-property.js",".././node_modules/@redocly/openapi-core/lib/rules/oas2/response-mime-type.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/array-parameter-serialization.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/boolean-parameter-prefixes.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/component-name-unique.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/index.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/no-empty-servers.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/no-example-value-and-externalValue.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/no-invalid-media-type-examples.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-example.com.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-trailing-slash.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-variables-empty-enum.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/no-undefined-server-variable.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/no-unused-components.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/request-mime-type.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/response-contains-property.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/response-mime-type.js",".././node_modules/@redocly/openapi-core/lib/rules/oas3/spec-components-invalid-map-name.js",".././node_modules/@redocly/openapi-core/lib/rules/other/stats.js",".././node_modules/@redocly/openapi-core/lib/rules/overlay1/index.js",".././node_modules/@redocly/openapi-core/lib/rules/respect/no-criteria-xpath.js",".././node_modules/@redocly/openapi-core/lib/rules/respect/respect-supported-versions.js",".././node_modules/@redocly/openapi-core/lib/rules/utils.js",".././node_modules/@redocly/openapi-core/lib/types/arazzo.js",".././node_modules/@redocly/openapi-core/lib/types/asyncapi2.js",".././node_modules/@redocly/openapi-core/lib/types/asyncapi3.js",".././node_modules/@redocly/openapi-core/lib/types/index.js",".././node_modules/@redocly/openapi-core/lib/types/json-schema-adapter.js",".././node_modules/@redocly/openapi-core/lib/types/oas2.js",".././node_modules/@redocly/openapi-core/lib/types/oas3.js",".././node_modules/@redocly/openapi-core/lib/types/oas3_1.js",".././node_modules/@redocly/openapi-core/lib/types/overlay.js",".././node_modules/@redocly/openapi-core/lib/types/redocly-yaml.js",".././node_modules/@redocly/openapi-core/lib/typings/arazzo.js",".././node_modules/@redocly/openapi-core/lib/utils.js",".././node_modules/@redocly/openapi-core/lib/visitors.js",".././node_modules/@redocly/openapi-core/lib/walk.js",".././node_modules/@redocly/openapi-core/node_modules/minimatch/lib/path.js",".././node_modules/@redocly/openapi-core/node_modules/minimatch/minimatch.js",".././node_modules/agent-base/dist/helpers.js",".././node_modules/agent-base/dist/index.js",".././node_modules/balanced-match/index.js",".././node_modules/before-after-hook/index.js",".././node_modules/before-after-hook/lib/add.js",".././node_modules/before-after-hook/lib/register.js",".././node_modules/before-after-hook/lib/remove.js",".././node_modules/brace-expansion/index.js",".././node_modules/concat-map/index.js",".././node_modules/debug/src/browser.js",".././node_modules/debug/src/common.js",".././node_modules/debug/src/index.js",".././node_modules/debug/src/node.js",".././node_modules/deprecation/dist-node/index.js",".././node_modules/fast-deep-equal/index.js",".././node_modules/fs.realpath/index.js",".././node_modules/fs.realpath/old.js",".././node_modules/glob/common.js",".././node_modules/glob/glob.js",".././node_modules/glob/node_modules/brace-expansion/index.js",".././node_modules/glob/node_modules/minimatch/minimatch.js",".././node_modules/glob/sync.js",".././node_modules/has-flag/index.js",".././node_modules/https-proxy-agent/dist/index.js",".././node_modules/https-proxy-agent/dist/parse-proxy-response.js",".././node_modules/inflight/inflight.js",".././node_modules/inherits/inherits.js",".././node_modules/inherits/inherits_browser.js",".././node_modules/js-levenshtein/index.js",".././node_modules/js-yaml/index.js",".././node_modules/js-yaml/lib/common.js",".././node_modules/js-yaml/lib/dumper.js",".././node_modules/js-yaml/lib/exception.js",".././node_modules/js-yaml/lib/loader.js",".././node_modules/js-yaml/lib/schema.js",".././node_modules/js-yaml/lib/schema/core.js",".././node_modules/js-yaml/lib/schema/default.js",".././node_modules/js-yaml/lib/schema/failsafe.js",".././node_modules/js-yaml/lib/schema/json.js",".././node_modules/js-yaml/lib/snippet.js",".././node_modules/js-yaml/lib/type.js",".././node_modules/js-yaml/lib/type/binary.js",".././node_modules/js-yaml/lib/type/bool.js",".././node_modules/js-yaml/lib/type/float.js",".././node_modules/js-yaml/lib/type/int.js",".././node_modules/js-yaml/lib/type/map.js",".././node_modules/js-yaml/lib/type/merge.js",".././node_modules/js-yaml/lib/type/null.js",".././node_modules/js-yaml/lib/type/omap.js",".././node_modules/js-yaml/lib/type/pairs.js",".././node_modules/js-yaml/lib/type/seq.js",".././node_modules/js-yaml/lib/type/set.js",".././node_modules/js-yaml/lib/type/str.js",".././node_modules/js-yaml/lib/type/timestamp.js",".././node_modules/ms/index.js",".././node_modules/once/once.js",".././node_modules/path-is-absolute/index.js",".././node_modules/pluralize/pluralize.js",".././node_modules/protobufjs/minimal.js",".././node_modules/protobufjs/src/index-minimal.js",".././node_modules/protobufjs/src/reader.js",".././node_modules/protobufjs/src/reader_buffer.js",".././node_modules/protobufjs/src/roots.js",".././node_modules/protobufjs/src/rpc.js",".././node_modules/protobufjs/src/rpc/service.js",".././node_modules/protobufjs/src/util/longbits.js",".././node_modules/protobufjs/src/util/minimal.js",".././node_modules/protobufjs/src/writer.js",".././node_modules/protobufjs/src/writer_buffer.js",".././node_modules/semver/classes/comparator.js",".././node_modules/semver/classes/range.js",".././node_modules/semver/classes/semver.js",".././node_modules/semver/functions/clean.js",".././node_modules/semver/functions/cmp.js",".././node_modules/semver/functions/coerce.js",".././node_modules/semver/functions/compare-build.js",".././node_modules/semver/functions/compare-loose.js",".././node_modules/semver/functions/compare.js",".././node_modules/semver/functions/diff.js",".././node_modules/semver/functions/eq.js",".././node_modules/semver/functions/gt.js",".././node_modules/semver/functions/gte.js",".././node_modules/semver/functions/inc.js",".././node_modules/semver/functions/lt.js",".././node_modules/semver/functions/lte.js",".././node_modules/semver/functions/major.js",".././node_modules/semver/functions/minor.js",".././node_modules/semver/functions/neq.js",".././node_modules/semver/functions/parse.js",".././node_modules/semver/functions/patch.js",".././node_modules/semver/functions/prerelease.js",".././node_modules/semver/functions/rcompare.js",".././node_modules/semver/functions/rsort.js",".././node_modules/semver/functions/satisfies.js",".././node_modules/semver/functions/sort.js",".././node_modules/semver/functions/valid.js",".././node_modules/semver/index.js",".././node_modules/semver/internal/constants.js",".././node_modules/semver/internal/debug.js",".././node_modules/semver/internal/identifiers.js",".././node_modules/semver/internal/lrucache.js",".././node_modules/semver/internal/parse-options.js",".././node_modules/semver/internal/re.js",".././node_modules/semver/ranges/gtr.js",".././node_modules/semver/ranges/intersects.js",".././node_modules/semver/ranges/ltr.js",".././node_modules/semver/ranges/max-satisfying.js",".././node_modules/semver/ranges/min-satisfying.js",".././node_modules/semver/ranges/min-version.js",".././node_modules/semver/ranges/outside.js",".././node_modules/semver/ranges/simplify.js",".././node_modules/semver/ranges/subset.js",".././node_modules/semver/ranges/to-comparators.js",".././node_modules/semver/ranges/valid.js",".././node_modules/supports-color/index.js",".././node_modules/tunnel/index.js",".././node_modules/tunnel/lib/tunnel.js",".././node_modules/undici/index.js",".././node_modules/undici/lib/api/abort-signal.js",".././node_modules/undici/lib/api/api-connect.js",".././node_modules/undici/lib/api/api-pipeline.js",".././node_modules/undici/lib/api/api-request.js",".././node_modules/undici/lib/api/api-stream.js",".././node_modules/undici/lib/api/api-upgrade.js",".././node_modules/undici/lib/api/index.js",".././node_modules/undici/lib/api/readable.js",".././node_modules/undici/lib/cache/memory-cache-store.js",".././node_modules/undici/lib/cache/sqlite-cache-store.js",".././node_modules/undici/lib/core/connect.js",".././node_modules/undici/lib/core/constants.js",".././node_modules/undici/lib/core/diagnostics.js",".././node_modules/undici/lib/core/errors.js",".././node_modules/undici/lib/core/request.js",".././node_modules/undici/lib/core/socks5-client.js",".././node_modules/undici/lib/core/socks5-utils.js",".././node_modules/undici/lib/core/symbols.js",".././node_modules/undici/lib/core/tree.js",".././node_modules/undici/lib/core/util.js",".././node_modules/undici/lib/dispatcher/agent.js",".././node_modules/undici/lib/dispatcher/balanced-pool.js",".././node_modules/undici/lib/dispatcher/client-h1.js",".././node_modules/undici/lib/dispatcher/client-h2.js",".././node_modules/undici/lib/dispatcher/client.js",".././node_modules/undici/lib/dispatcher/dispatcher-base.js",".././node_modules/undici/lib/dispatcher/dispatcher.js",".././node_modules/undici/lib/dispatcher/env-http-proxy-agent.js",".././node_modules/undici/lib/dispatcher/fixed-queue.js",".././node_modules/undici/lib/dispatcher/h2c-client.js",".././node_modules/undici/lib/dispatcher/pool-base.js",".././node_modules/undici/lib/dispatcher/pool.js",".././node_modules/undici/lib/dispatcher/proxy-agent.js",".././node_modules/undici/lib/dispatcher/retry-agent.js",".././node_modules/undici/lib/dispatcher/round-robin-pool.js",".././node_modules/undici/lib/dispatcher/socks5-proxy-agent.js",".././node_modules/undici/lib/encoding/index.js",".././node_modules/undici/lib/global.js",".././node_modules/undici/lib/handler/cache-handler.js",".././node_modules/undici/lib/handler/cache-revalidation-handler.js",".././node_modules/undici/lib/handler/decorator-handler.js",".././node_modules/undici/lib/handler/deduplication-handler.js",".././node_modules/undici/lib/handler/redirect-handler.js",".././node_modules/undici/lib/handler/retry-handler.js",".././node_modules/undici/lib/handler/unwrap-handler.js",".././node_modules/undici/lib/handler/wrap-handler.js",".././node_modules/undici/lib/interceptor/cache.js",".././node_modules/undici/lib/interceptor/decompress.js",".././node_modules/undici/lib/interceptor/deduplicate.js",".././node_modules/undici/lib/interceptor/dns.js",".././node_modules/undici/lib/interceptor/dump.js",".././node_modules/undici/lib/interceptor/redirect.js",".././node_modules/undici/lib/interceptor/response-error.js",".././node_modules/undici/lib/interceptor/retry.js",".././node_modules/undici/lib/llhttp/constants.js",".././node_modules/undici/lib/llhttp/llhttp-wasm.js",".././node_modules/undici/lib/llhttp/llhttp_simd-wasm.js",".././node_modules/undici/lib/llhttp/utils.js",".././node_modules/undici/lib/mock/mock-agent.js",".././node_modules/undici/lib/mock/mock-call-history.js",".././node_modules/undici/lib/mock/mock-client.js",".././node_modules/undici/lib/mock/mock-errors.js",".././node_modules/undici/lib/mock/mock-interceptor.js",".././node_modules/undici/lib/mock/mock-pool.js",".././node_modules/undici/lib/mock/mock-symbols.js",".././node_modules/undici/lib/mock/mock-utils.js",".././node_modules/undici/lib/mock/pending-interceptors-formatter.js",".././node_modules/undici/lib/mock/snapshot-agent.js",".././node_modules/undici/lib/mock/snapshot-recorder.js",".././node_modules/undici/lib/mock/snapshot-utils.js",".././node_modules/undici/lib/util/cache.js",".././node_modules/undici/lib/util/date.js",".././node_modules/undici/lib/util/promise.js",".././node_modules/undici/lib/util/runtime-features.js",".././node_modules/undici/lib/util/stats.js",".././node_modules/undici/lib/util/timers.js",".././node_modules/undici/lib/web/cache/cache.js",".././node_modules/undici/lib/web/cache/cachestorage.js",".././node_modules/undici/lib/web/cache/util.js",".././node_modules/undici/lib/web/cookies/constants.js",".././node_modules/undici/lib/web/cookies/index.js",".././node_modules/undici/lib/web/cookies/parse.js",".././node_modules/undici/lib/web/cookies/util.js",".././node_modules/undici/lib/web/eventsource/eventsource-stream.js",".././node_modules/undici/lib/web/eventsource/eventsource.js",".././node_modules/undici/lib/web/eventsource/util.js",".././node_modules/undici/lib/web/fetch/body.js",".././node_modules/undici/lib/web/fetch/constants.js",".././node_modules/undici/lib/web/fetch/data-url.js",".././node_modules/undici/lib/web/fetch/formdata-parser.js",".././node_modules/undici/lib/web/fetch/formdata.js",".././node_modules/undici/lib/web/fetch/global.js",".././node_modules/undici/lib/web/fetch/headers.js",".././node_modules/undici/lib/web/fetch/index.js",".././node_modules/undici/lib/web/fetch/request.js",".././node_modules/undici/lib/web/fetch/response.js",".././node_modules/undici/lib/web/fetch/util.js",".././node_modules/undici/lib/web/infra/index.js",".././node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js",".././node_modules/undici/lib/web/webidl/index.js",".././node_modules/undici/lib/web/websocket/connection.js",".././node_modules/undici/lib/web/websocket/constants.js",".././node_modules/undici/lib/web/websocket/events.js",".././node_modules/undici/lib/web/websocket/frame.js",".././node_modules/undici/lib/web/websocket/permessage-deflate.js",".././node_modules/undici/lib/web/websocket/receiver.js",".././node_modules/undici/lib/web/websocket/sender.js",".././node_modules/undici/lib/web/websocket/stream/websocketerror.js",".././node_modules/undici/lib/web/websocket/stream/websocketstream.js",".././node_modules/undici/lib/web/websocket/util.js",".././node_modules/undici/lib/web/websocket/websocket.js",".././node_modules/universal-user-agent/dist-node/index.js",".././node_modules/uri-js-replace/dist/Parse.js",".././node_modules/uri-js-replace/dist/Resolve.js",".././node_modules/uri-js-replace/dist/Serialize.js",".././node_modules/uri-js-replace/dist/index.js",".././node_modules/wrappy/wrappy.js",".././node_modules/yaml-ast-parser/dist/src/common.js",".././node_modules/yaml-ast-parser/dist/src/dumper.js",".././node_modules/yaml-ast-parser/dist/src/exception.js",".././node_modules/yaml-ast-parser/dist/src/index.js",".././node_modules/yaml-ast-parser/dist/src/loader.js",".././node_modules/yaml-ast-parser/dist/src/mark.js",".././node_modules/yaml-ast-parser/dist/src/scalarInference.js",".././node_modules/yaml-ast-parser/dist/src/schema.js",".././node_modules/yaml-ast-parser/dist/src/schema/core.js",".././node_modules/yaml-ast-parser/dist/src/schema/default_full.js",".././node_modules/yaml-ast-parser/dist/src/schema/default_safe.js",".././node_modules/yaml-ast-parser/dist/src/schema/failsafe.js",".././node_modules/yaml-ast-parser/dist/src/schema/json.js",".././node_modules/yaml-ast-parser/dist/src/type.js",".././node_modules/yaml-ast-parser/dist/src/type/binary.js",".././node_modules/yaml-ast-parser/dist/src/type/bool.js",".././node_modules/yaml-ast-parser/dist/src/type/float.js",".././node_modules/yaml-ast-parser/dist/src/type/int.js",".././node_modules/yaml-ast-parser/dist/src/type/js/regexp.js",".././node_modules/yaml-ast-parser/dist/src/type/js/undefined.js",".././node_modules/yaml-ast-parser/dist/src/type/map.js",".././node_modules/yaml-ast-parser/dist/src/type/merge.js",".././node_modules/yaml-ast-parser/dist/src/type/null.js",".././node_modules/yaml-ast-parser/dist/src/type/omap.js",".././node_modules/yaml-ast-parser/dist/src/type/pairs.js",".././node_modules/yaml-ast-parser/dist/src/type/seq.js",".././node_modules/yaml-ast-parser/dist/src/type/set.js",".././node_modules/yaml-ast-parser/dist/src/type/str.js",".././node_modules/yaml-ast-parser/dist/src/type/timestamp.js",".././node_modules/yaml-ast-parser/dist/src/yamlAST.js",".././src/helpers.ts",".././src/main.ts",".././src/set-commit-statuses.ts","../external node-commonjs \"assert\"","../external node-commonjs \"async_hooks\"","../external node-commonjs \"buffer\"","../external node-commonjs \"child_process\"","../external node-commonjs \"crypto\"","../external node-commonjs \"events\"","../external node-commonjs \"fs\"","../external node-commonjs \"http\"","../external node-commonjs \"https\"","../external node-commonjs \"net\"","../external node-commonjs \"node:assert\"","../external node-commonjs \"node:async_hooks\"","../external node-commonjs \"node:buffer\"","../external node-commonjs \"node:console\"","../external node-commonjs \"node:crypto\"","../external node-commonjs \"node:diagnostics_channel\"","../external node-commonjs \"node:dns\"","../external node-commonjs \"node:events\"","../external node-commonjs \"node:fs\"","../external node-commonjs \"node:fs/promises\"","../external node-commonjs \"node:http\"","../external node-commonjs \"node:http2\"","../external node-commonjs \"node:net\"","../external node-commonjs \"node:os\"","../external node-commonjs \"node:path\"","../external node-commonjs \"node:perf_hooks\"","../external node-commonjs \"node:querystring\"","../external node-commonjs \"node:sqlite\"","../external node-commonjs \"node:stream\"","../external node-commonjs \"node:timers\"","../external node-commonjs \"node:tls\"","../external node-commonjs \"node:url\"","../external node-commonjs \"node:util\"","../external node-commonjs \"node:util/types\"","../external node-commonjs \"node:worker_threads\"","../external node-commonjs \"node:zlib\"","../external node-commonjs \"os\"","../external node-commonjs \"path\"","../external node-commonjs \"perf_hooks\"","../external node-commonjs \"process\"","../external node-commonjs \"readline\"","../external node-commonjs \"stream\"","../external node-commonjs \"string_decoder\"","../external node-commonjs \"timers\"","../external node-commonjs \"tls\"","../external node-commonjs \"tty\"","../external node-commonjs \"url\"","../external node-commonjs \"util\"","../external node-commonjs \"zlib\"",".././node_modules/colorette/index.cjs","../webpack/bootstrap","../webpack/runtime/node module decorator","../webpack/runtime/compat",".././src/index.ts"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return (0, utils_1.toCommandValue)(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return (0, utils_1.toCommandValue)(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode || (exports.ExitCode = ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = (0, utils_1.toCommandValue)(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n return (0, file_command_1.issueFileCommand)('ENV', (0, file_command_1.prepareKeyValueMessage)(name, val));\n }\n (0, command_1.issueCommand)('set-env', { name }, convertedVal);\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n (0, command_1.issueCommand)('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n (0, file_command_1.issueFileCommand)('PATH', inputPath);\n }\n else {\n (0, command_1.issueCommand)('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n if (options && options.trimWhitespace === false) {\n return inputs;\n }\n return inputs.map(input => input.trim());\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return (0, file_command_1.issueFileCommand)('OUTPUT', (0, file_command_1.prepareKeyValueMessage)(name, value));\n }\n process.stdout.write(os.EOL);\n (0, command_1.issueCommand)('set-output', { name }, (0, utils_1.toCommandValue)(value));\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n (0, command_1.issue)('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n (0, command_1.issueCommand)('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n (0, command_1.issueCommand)('error', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n (0, command_1.issueCommand)('warning', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n (0, command_1.issueCommand)('notice', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n (0, command_1.issue)('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n (0, command_1.issue)('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n const filePath = process.env['GITHUB_STATE'] || '';\n if (filePath) {\n return (0, file_command_1.issueFileCommand)('STATE', (0, file_command_1.prepareKeyValueMessage)(name, value));\n }\n (0, command_1.issueCommand)('save-state', { name }, (0, utils_1.toCommandValue)(value));\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n/**\n * Summary exports\n */\nvar summary_1 = require(\"./summary\");\nObject.defineProperty(exports, \"summary\", { enumerable: true, get: function () { return summary_1.summary; } });\n/**\n * @deprecated use core.summary\n */\nvar summary_2 = require(\"./summary\");\nObject.defineProperty(exports, \"markdownSummary\", { enumerable: true, get: function () { return summary_2.markdownSummary; } });\n/**\n * Path exports\n */\nvar path_utils_1 = require(\"./path-utils\");\nObject.defineProperty(exports, \"toPosixPath\", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });\nObject.defineProperty(exports, \"toWin32Path\", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });\nObject.defineProperty(exports, \"toPlatformPath\", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });\n/**\n * Platform utilities exports\n */\nexports.platform = __importStar(require(\"./platform\"));\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareKeyValueMessage = exports.issueFileCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst crypto = __importStar(require(\"crypto\"));\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\nfunction issueFileCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueFileCommand = issueFileCommand;\nfunction prepareKeyValueMessage(key, value) {\n const delimiter = `ghadelimiter_${crypto.randomUUID()}`;\n const convertedValue = (0, utils_1.toCommandValue)(value);\n // These should realistically never happen, but just in case someone finds a\n // way to exploit uuid generation let's not allow keys or values that contain\n // the delimiter.\n if (key.includes(delimiter)) {\n throw new Error(`Unexpected input: name should not contain the delimiter \"${delimiter}\"`);\n }\n if (convertedValue.includes(delimiter)) {\n throw new Error(`Unexpected input: value should not contain the delimiter \"${delimiter}\"`);\n }\n return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;\n}\nexports.prepareKeyValueMessage = prepareKeyValueMessage;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n (0, core_1.debug)(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n (0, core_1.setSecret)(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * toPosixPath converts the given path to the posix form. On Windows, \\\\ will be\n * replaced with /.\n *\n * @param pth. Path to transform.\n * @return string Posix path.\n */\nfunction toPosixPath(pth) {\n return pth.replace(/[\\\\]/g, '/');\n}\nexports.toPosixPath = toPosixPath;\n/**\n * toWin32Path converts the given path to the win32 form. On Linux, / will be\n * replaced with \\\\.\n *\n * @param pth. Path to transform.\n * @return string Win32 path.\n */\nfunction toWin32Path(pth) {\n return pth.replace(/[/]/g, '\\\\');\n}\nexports.toWin32Path = toWin32Path;\n/**\n * toPlatformPath converts the given path to a platform-specific path. It does\n * this by replacing instances of / and \\ with the platform-specific path\n * separator.\n *\n * @param pth The path to platformize.\n * @return string The platform-specific path.\n */\nfunction toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}\nexports.toPlatformPath = toPlatformPath;\n//# sourceMappingURL=path-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getDetails = exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0;\nconst os_1 = __importDefault(require(\"os\"));\nconst exec = __importStar(require(\"@actions/exec\"));\nconst getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () {\n const { stdout: version } = yield exec.getExecOutput('powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Version\"', undefined, {\n silent: true\n });\n const { stdout: name } = yield exec.getExecOutput('powershell -command \"(Get-CimInstance -ClassName Win32_OperatingSystem).Caption\"', undefined, {\n silent: true\n });\n return {\n name: name.trim(),\n version: version.trim()\n };\n});\nconst getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () {\n var _a, _b, _c, _d;\n const { stdout } = yield exec.getExecOutput('sw_vers', undefined, {\n silent: true\n });\n const version = (_b = (_a = stdout.match(/ProductVersion:\\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : '';\n const name = (_d = (_c = stdout.match(/ProductName:\\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : '';\n return {\n name,\n version\n };\n});\nconst getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () {\n const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], {\n silent: true\n });\n const [name, version] = stdout.trim().split('\\n');\n return {\n name,\n version\n };\n});\nexports.platform = os_1.default.platform();\nexports.arch = os_1.default.arch();\nexports.isWindows = exports.platform === 'win32';\nexports.isMacOS = exports.platform === 'darwin';\nexports.isLinux = exports.platform === 'linux';\nfunction getDetails() {\n return __awaiter(this, void 0, void 0, function* () {\n return Object.assign(Object.assign({}, (yield (exports.isWindows\n ? getWindowsInfo()\n : exports.isMacOS\n ? getMacOsInfo()\n : getLinuxInfo()))), { platform: exports.platform,\n arch: exports.arch,\n isWindows: exports.isWindows,\n isMacOS: exports.isMacOS,\n isLinux: exports.isLinux });\n });\n}\nexports.getDetails = getDetails;\n//# sourceMappingURL=platform.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst { access, appendFile, writeFile } = fs_1.promises;\nexports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';\nexports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';\nclass Summary {\n constructor() {\n this._buffer = '';\n }\n /**\n * Finds the summary file path from the environment, rejects if env var is not found or file does not exist\n * Also checks r/w permissions.\n *\n * @returns step summary file path\n */\n filePath() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._filePath) {\n return this._filePath;\n }\n const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];\n if (!pathFromEnv) {\n throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);\n }\n try {\n yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);\n }\n catch (_a) {\n throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);\n }\n this._filePath = pathFromEnv;\n return this._filePath;\n });\n }\n /**\n * Wraps content in an HTML tag, adding any HTML attributes\n *\n * @param {string} tag HTML tag to wrap\n * @param {string | null} content content within the tag\n * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add\n *\n * @returns {string} content wrapped in HTML element\n */\n wrap(tag, content, attrs = {}) {\n const htmlAttrs = Object.entries(attrs)\n .map(([key, value]) => ` ${key}=\"${value}\"`)\n .join('');\n if (!content) {\n return `<${tag}${htmlAttrs}>`;\n }\n return `<${tag}${htmlAttrs}>${content}`;\n }\n /**\n * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.\n *\n * @param {SummaryWriteOptions} [options] (optional) options for write operation\n *\n * @returns {Promise} summary instance\n */\n write(options) {\n return __awaiter(this, void 0, void 0, function* () {\n const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);\n const filePath = yield this.filePath();\n const writeFunc = overwrite ? writeFile : appendFile;\n yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });\n return this.emptyBuffer();\n });\n }\n /**\n * Clears the summary buffer and wipes the summary file\n *\n * @returns {Summary} summary instance\n */\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.emptyBuffer().write({ overwrite: true });\n });\n }\n /**\n * Returns the current summary buffer as a string\n *\n * @returns {string} string of summary buffer\n */\n stringify() {\n return this._buffer;\n }\n /**\n * If the summary buffer is empty\n *\n * @returns {boolen} true if the buffer is empty\n */\n isEmptyBuffer() {\n return this._buffer.length === 0;\n }\n /**\n * Resets the summary buffer without writing to summary file\n *\n * @returns {Summary} summary instance\n */\n emptyBuffer() {\n this._buffer = '';\n return this;\n }\n /**\n * Adds raw text to the summary buffer\n *\n * @param {string} text content to add\n * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)\n *\n * @returns {Summary} summary instance\n */\n addRaw(text, addEOL = false) {\n this._buffer += text;\n return addEOL ? this.addEOL() : this;\n }\n /**\n * Adds the operating system-specific end-of-line marker to the buffer\n *\n * @returns {Summary} summary instance\n */\n addEOL() {\n return this.addRaw(os_1.EOL);\n }\n /**\n * Adds an HTML codeblock to the summary buffer\n *\n * @param {string} code content to render within fenced code block\n * @param {string} lang (optional) language to syntax highlight code\n *\n * @returns {Summary} summary instance\n */\n addCodeBlock(code, lang) {\n const attrs = Object.assign({}, (lang && { lang }));\n const element = this.wrap('pre', this.wrap('code', code), attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML list to the summary buffer\n *\n * @param {string[]} items list of items to render\n * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)\n *\n * @returns {Summary} summary instance\n */\n addList(items, ordered = false) {\n const tag = ordered ? 'ol' : 'ul';\n const listItems = items.map(item => this.wrap('li', item)).join('');\n const element = this.wrap(tag, listItems);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML table to the summary buffer\n *\n * @param {SummaryTableCell[]} rows table rows\n *\n * @returns {Summary} summary instance\n */\n addTable(rows) {\n const tableBody = rows\n .map(row => {\n const cells = row\n .map(cell => {\n if (typeof cell === 'string') {\n return this.wrap('td', cell);\n }\n const { header, data, colspan, rowspan } = cell;\n const tag = header ? 'th' : 'td';\n const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));\n return this.wrap(tag, data, attrs);\n })\n .join('');\n return this.wrap('tr', cells);\n })\n .join('');\n const element = this.wrap('table', tableBody);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds a collapsable HTML details element to the summary buffer\n *\n * @param {string} label text for the closed state\n * @param {string} content collapsable content\n *\n * @returns {Summary} summary instance\n */\n addDetails(label, content) {\n const element = this.wrap('details', this.wrap('summary', label) + content);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML image tag to the summary buffer\n *\n * @param {string} src path to the image you to embed\n * @param {string} alt text description of the image\n * @param {SummaryImageOptions} options (optional) addition image attributes\n *\n * @returns {Summary} summary instance\n */\n addImage(src, alt, options) {\n const { width, height } = options || {};\n const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));\n const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML section heading element\n *\n * @param {string} text heading text\n * @param {number | string} [level=1] (optional) the heading level, default: 1\n *\n * @returns {Summary} summary instance\n */\n addHeading(text, level) {\n const tag = `h${level}`;\n const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)\n ? tag\n : 'h1';\n const element = this.wrap(allowedTag, text);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML thematic break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addSeparator() {\n const element = this.wrap('hr', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML line break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addBreak() {\n const element = this.wrap('br', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML blockquote to the summary buffer\n *\n * @param {string} text quote text\n * @param {string} cite (optional) citation url\n *\n * @returns {Summary} summary instance\n */\n addQuote(text, cite) {\n const attrs = Object.assign({}, (cite && { cite }));\n const element = this.wrap('blockquote', text, attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML anchor tag to the summary buffer\n *\n * @param {string} text link text/content\n * @param {string} href hyperlink\n *\n * @returns {Summary} summary instance\n */\n addLink(text, href) {\n const element = this.wrap('a', text, { href });\n return this.addRaw(element).addEOL();\n }\n}\nconst _summary = new Summary();\n/**\n * @deprecated use `core.summary`\n */\nexports.markdownSummary = _summary;\nexports.summary = _summary;\n//# sourceMappingURL=summary.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getExecOutput = exports.exec = void 0;\nconst string_decoder_1 = require(\"string_decoder\");\nconst tr = __importStar(require(\"./toolrunner\"));\n/**\n * Exec a command.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code\n */\nfunction exec(commandLine, args, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const commandArgs = tr.argStringToArray(commandLine);\n if (commandArgs.length === 0) {\n throw new Error(`Parameter 'commandLine' cannot be null or empty.`);\n }\n // Path to tool to execute should be first arg\n const toolPath = commandArgs[0];\n args = commandArgs.slice(1).concat(args || []);\n const runner = new tr.ToolRunner(toolPath, args, options);\n return runner.exec();\n });\n}\nexports.exec = exec;\n/**\n * Exec a command and get the output.\n * Output will be streamed to the live console.\n * Returns promise with the exit code and collected stdout and stderr\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code, stdout, and stderr\n */\nfunction getExecOutput(commandLine, args, options) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function* () {\n let stdout = '';\n let stderr = '';\n //Using string decoder covers the case where a mult-byte character is split\n const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');\n const stderrDecoder = new string_decoder_1.StringDecoder('utf8');\n const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;\n const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;\n const stdErrListener = (data) => {\n stderr += stderrDecoder.write(data);\n if (originalStdErrListener) {\n originalStdErrListener(data);\n }\n };\n const stdOutListener = (data) => {\n stdout += stdoutDecoder.write(data);\n if (originalStdoutListener) {\n originalStdoutListener(data);\n }\n };\n const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });\n const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));\n //flush any remaining characters\n stdout += stdoutDecoder.end();\n stderr += stderrDecoder.end();\n return {\n exitCode,\n stdout,\n stderr\n };\n });\n}\nexports.getExecOutput = getExecOutput;\n//# sourceMappingURL=exec.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.argStringToArray = exports.ToolRunner = void 0;\nconst os = __importStar(require(\"os\"));\nconst events = __importStar(require(\"events\"));\nconst child = __importStar(require(\"child_process\"));\nconst path = __importStar(require(\"path\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst ioUtil = __importStar(require(\"@actions/io/lib/io-util\"));\nconst timers_1 = require(\"timers\");\n/* eslint-disable @typescript-eslint/unbound-method */\nconst IS_WINDOWS = process.platform === 'win32';\n/*\n * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.\n */\nclass ToolRunner extends events.EventEmitter {\n constructor(toolPath, args, options) {\n super();\n if (!toolPath) {\n throw new Error(\"Parameter 'toolPath' cannot be null or empty.\");\n }\n this.toolPath = toolPath;\n this.args = args || [];\n this.options = options || {};\n }\n _debug(message) {\n if (this.options.listeners && this.options.listeners.debug) {\n this.options.listeners.debug(message);\n }\n }\n _getCommandString(options, noPrefix) {\n const toolPath = this._getSpawnFileName();\n const args = this._getSpawnArgs(options);\n let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool\n if (IS_WINDOWS) {\n // Windows + cmd file\n if (this._isCmdFile()) {\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows + verbatim\n else if (options.windowsVerbatimArguments) {\n cmd += `\"${toolPath}\"`;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows (regular)\n else {\n cmd += this._windowsQuoteCmdArg(toolPath);\n for (const a of args) {\n cmd += ` ${this._windowsQuoteCmdArg(a)}`;\n }\n }\n }\n else {\n // OSX/Linux - this can likely be improved with some form of quoting.\n // creating processes on Unix is fundamentally different than Windows.\n // on Unix, execvp() takes an arg array.\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n return cmd;\n }\n _processLineBuffer(data, strBuffer, onLine) {\n try {\n let s = strBuffer + data.toString();\n let n = s.indexOf(os.EOL);\n while (n > -1) {\n const line = s.substring(0, n);\n onLine(line);\n // the rest of the string ...\n s = s.substring(n + os.EOL.length);\n n = s.indexOf(os.EOL);\n }\n return s;\n }\n catch (err) {\n // streaming lines to console is best effort. Don't fail a build.\n this._debug(`error processing line. Failed with error ${err}`);\n return '';\n }\n }\n _getSpawnFileName() {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n return process.env['COMSPEC'] || 'cmd.exe';\n }\n }\n return this.toolPath;\n }\n _getSpawnArgs(options) {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n let argline = `/D /S /C \"${this._windowsQuoteCmdArg(this.toolPath)}`;\n for (const a of this.args) {\n argline += ' ';\n argline += options.windowsVerbatimArguments\n ? a\n : this._windowsQuoteCmdArg(a);\n }\n argline += '\"';\n return [argline];\n }\n }\n return this.args;\n }\n _endsWith(str, end) {\n return str.endsWith(end);\n }\n _isCmdFile() {\n const upperToolPath = this.toolPath.toUpperCase();\n return (this._endsWith(upperToolPath, '.CMD') ||\n this._endsWith(upperToolPath, '.BAT'));\n }\n _windowsQuoteCmdArg(arg) {\n // for .exe, apply the normal quoting rules that libuv applies\n if (!this._isCmdFile()) {\n return this._uvQuoteCmdArg(arg);\n }\n // otherwise apply quoting rules specific to the cmd.exe command line parser.\n // the libuv rules are generic and are not designed specifically for cmd.exe\n // command line parser.\n //\n // for a detailed description of the cmd.exe command line parser, refer to\n // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912\n // need quotes for empty arg\n if (!arg) {\n return '\"\"';\n }\n // determine whether the arg needs to be quoted\n const cmdSpecialChars = [\n ' ',\n '\\t',\n '&',\n '(',\n ')',\n '[',\n ']',\n '{',\n '}',\n '^',\n '=',\n ';',\n '!',\n \"'\",\n '+',\n ',',\n '`',\n '~',\n '|',\n '<',\n '>',\n '\"'\n ];\n let needsQuotes = false;\n for (const char of arg) {\n if (cmdSpecialChars.some(x => x === char)) {\n needsQuotes = true;\n break;\n }\n }\n // short-circuit if quotes not needed\n if (!needsQuotes) {\n return arg;\n }\n // the following quoting rules are very similar to the rules that by libuv applies.\n //\n // 1) wrap the string in quotes\n //\n // 2) double-up quotes - i.e. \" => \"\"\n //\n // this is different from the libuv quoting rules. libuv replaces \" with \\\", which unfortunately\n // doesn't work well with a cmd.exe command line.\n //\n // note, replacing \" with \"\" also works well if the arg is passed to a downstream .NET console app.\n // for example, the command line:\n // foo.exe \"myarg:\"\"my val\"\"\"\n // is parsed by a .NET console app into an arg array:\n // [ \"myarg:\\\"my val\\\"\" ]\n // which is the same end result when applying libuv quoting rules. although the actual\n // command line from libuv quoting rules would look like:\n // foo.exe \"myarg:\\\"my val\\\"\"\n //\n // 3) double-up slashes that precede a quote,\n // e.g. hello \\world => \"hello \\world\"\n // hello\\\"world => \"hello\\\\\"\"world\"\n // hello\\\\\"world => \"hello\\\\\\\\\"\"world\"\n // hello world\\ => \"hello world\\\\\"\n //\n // technically this is not required for a cmd.exe command line, or the batch argument parser.\n // the reasons for including this as a .cmd quoting rule are:\n //\n // a) this is optimized for the scenario where the argument is passed from the .cmd file to an\n // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.\n //\n // b) it's what we've been doing previously (by deferring to node default behavior) and we\n // haven't heard any complaints about that aspect.\n //\n // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be\n // escaped when used on the command line directly - even though within a .cmd file % can be escaped\n // by using %%.\n //\n // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts\n // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.\n //\n // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would\n // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the\n // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args\n // to an external program.\n //\n // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.\n // % can be escaped within a .cmd file.\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\'; // double the slash\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\"'; // double the quote\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _uvQuoteCmdArg(arg) {\n // Tool runner wraps child_process.spawn() and needs to apply the same quoting as\n // Node in certain cases where the undocumented spawn option windowsVerbatimArguments\n // is used.\n //\n // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,\n // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),\n // pasting copyright notice from Node within this function:\n //\n // Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a copy\n // of this software and associated documentation files (the \"Software\"), to\n // deal in the Software without restriction, including without limitation the\n // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n // sell copies of the Software, and to permit persons to whom the Software is\n // furnished to do so, subject to the following conditions:\n //\n // The above copyright notice and this permission notice shall be included in\n // all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n // IN THE SOFTWARE.\n if (!arg) {\n // Need double quotation for empty argument\n return '\"\"';\n }\n if (!arg.includes(' ') && !arg.includes('\\t') && !arg.includes('\"')) {\n // No quotation needed\n return arg;\n }\n if (!arg.includes('\"') && !arg.includes('\\\\')) {\n // No embedded double quotes or backslashes, so I can just wrap\n // quote marks around the whole thing.\n return `\"${arg}\"`;\n }\n // Expected input/output:\n // input : hello\"world\n // output: \"hello\\\"world\"\n // input : hello\"\"world\n // output: \"hello\\\"\\\"world\"\n // input : hello\\world\n // output: hello\\world\n // input : hello\\\\world\n // output: hello\\\\world\n // input : hello\\\"world\n // output: \"hello\\\\\\\"world\"\n // input : hello\\\\\"world\n // output: \"hello\\\\\\\\\\\"world\"\n // input : hello world\\\n // output: \"hello world\\\\\" - note the comment in libuv actually reads \"hello world\\\"\n // but it appears the comment is wrong, it should be \"hello world\\\\\"\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\';\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\\\\';\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _cloneExecOptions(options) {\n options = options || {};\n const result = {\n cwd: options.cwd || process.cwd(),\n env: options.env || process.env,\n silent: options.silent || false,\n windowsVerbatimArguments: options.windowsVerbatimArguments || false,\n failOnStdErr: options.failOnStdErr || false,\n ignoreReturnCode: options.ignoreReturnCode || false,\n delay: options.delay || 10000\n };\n result.outStream = options.outStream || process.stdout;\n result.errStream = options.errStream || process.stderr;\n return result;\n }\n _getSpawnOptions(options, toolPath) {\n options = options || {};\n const result = {};\n result.cwd = options.cwd;\n result.env = options.env;\n result['windowsVerbatimArguments'] =\n options.windowsVerbatimArguments || this._isCmdFile();\n if (options.windowsVerbatimArguments) {\n result.argv0 = `\"${toolPath}\"`;\n }\n return result;\n }\n /**\n * Exec a tool.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param tool path to tool to exec\n * @param options optional exec options. See ExecOptions\n * @returns number\n */\n exec() {\n return __awaiter(this, void 0, void 0, function* () {\n // root the tool path if it is unrooted and contains relative pathing\n if (!ioUtil.isRooted(this.toolPath) &&\n (this.toolPath.includes('/') ||\n (IS_WINDOWS && this.toolPath.includes('\\\\')))) {\n // prefer options.cwd if it is specified, however options.cwd may also need to be rooted\n this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);\n }\n // if the tool is only a file name, then resolve it from the PATH\n // otherwise verify it exists (add extension on Windows if necessary)\n this.toolPath = yield io.which(this.toolPath, true);\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n this._debug(`exec tool: ${this.toolPath}`);\n this._debug('arguments:');\n for (const arg of this.args) {\n this._debug(` ${arg}`);\n }\n const optionsNonNull = this._cloneExecOptions(this.options);\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);\n }\n const state = new ExecState(optionsNonNull, this.toolPath);\n state.on('debug', (message) => {\n this._debug(message);\n });\n if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {\n return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));\n }\n const fileName = this._getSpawnFileName();\n const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));\n let stdbuffer = '';\n if (cp.stdout) {\n cp.stdout.on('data', (data) => {\n if (this.options.listeners && this.options.listeners.stdout) {\n this.options.listeners.stdout(data);\n }\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(data);\n }\n stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.stdline) {\n this.options.listeners.stdline(line);\n }\n });\n });\n }\n let errbuffer = '';\n if (cp.stderr) {\n cp.stderr.on('data', (data) => {\n state.processStderr = true;\n if (this.options.listeners && this.options.listeners.stderr) {\n this.options.listeners.stderr(data);\n }\n if (!optionsNonNull.silent &&\n optionsNonNull.errStream &&\n optionsNonNull.outStream) {\n const s = optionsNonNull.failOnStdErr\n ? optionsNonNull.errStream\n : optionsNonNull.outStream;\n s.write(data);\n }\n errbuffer = this._processLineBuffer(data, errbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.errline) {\n this.options.listeners.errline(line);\n }\n });\n });\n }\n cp.on('error', (err) => {\n state.processError = err.message;\n state.processExited = true;\n state.processClosed = true;\n state.CheckComplete();\n });\n cp.on('exit', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n cp.on('close', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n state.processClosed = true;\n this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n state.on('done', (error, exitCode) => {\n if (stdbuffer.length > 0) {\n this.emit('stdline', stdbuffer);\n }\n if (errbuffer.length > 0) {\n this.emit('errline', errbuffer);\n }\n cp.removeAllListeners();\n if (error) {\n reject(error);\n }\n else {\n resolve(exitCode);\n }\n });\n if (this.options.input) {\n if (!cp.stdin) {\n throw new Error('child process missing stdin');\n }\n cp.stdin.end(this.options.input);\n }\n }));\n });\n }\n}\nexports.ToolRunner = ToolRunner;\n/**\n * Convert an arg string to an array of args. Handles escaping\n *\n * @param argString string of arguments\n * @returns string[] array of arguments\n */\nfunction argStringToArray(argString) {\n const args = [];\n let inQuotes = false;\n let escaped = false;\n let arg = '';\n function append(c) {\n // we only escape double quotes.\n if (escaped && c !== '\"') {\n arg += '\\\\';\n }\n arg += c;\n escaped = false;\n }\n for (let i = 0; i < argString.length; i++) {\n const c = argString.charAt(i);\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes;\n }\n else {\n append(c);\n }\n continue;\n }\n if (c === '\\\\' && escaped) {\n append(c);\n continue;\n }\n if (c === '\\\\' && inQuotes) {\n escaped = true;\n continue;\n }\n if (c === ' ' && !inQuotes) {\n if (arg.length > 0) {\n args.push(arg);\n arg = '';\n }\n continue;\n }\n append(c);\n }\n if (arg.length > 0) {\n args.push(arg.trim());\n }\n return args;\n}\nexports.argStringToArray = argStringToArray;\nclass ExecState extends events.EventEmitter {\n constructor(options, toolPath) {\n super();\n this.processClosed = false; // tracks whether the process has exited and stdio is closed\n this.processError = '';\n this.processExitCode = 0;\n this.processExited = false; // tracks whether the process has exited\n this.processStderr = false; // tracks whether stderr was written to\n this.delay = 10000; // 10 seconds\n this.done = false;\n this.timeout = null;\n if (!toolPath) {\n throw new Error('toolPath must not be empty');\n }\n this.options = options;\n this.toolPath = toolPath;\n if (options.delay) {\n this.delay = options.delay;\n }\n }\n CheckComplete() {\n if (this.done) {\n return;\n }\n if (this.processClosed) {\n this._setResult();\n }\n else if (this.processExited) {\n this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this);\n }\n }\n _debug(message) {\n this.emit('debug', message);\n }\n _setResult() {\n // determine whether there is an error\n let error;\n if (this.processExited) {\n if (this.processError) {\n 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}`);\n }\n else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {\n error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);\n }\n else if (this.processStderr && this.options.failOnStdErr) {\n error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);\n }\n }\n // clear the timeout\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n this.done = true;\n this.emit('done', error, this.processExitCode);\n }\n static HandleTimeout(state) {\n if (state.done) {\n return;\n }\n if (!state.processClosed && state.processExited) {\n const message = `The STDIO streams did not close within ${state.delay /\n 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.`;\n state._debug(message);\n }\n state._setResult();\n }\n}\n//# sourceMappingURL=toolrunner.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Context = void 0;\nconst fs_1 = require(\"fs\");\nconst os_1 = require(\"os\");\nclass Context {\n /**\n * Hydrate the context from the environment\n */\n constructor() {\n var _a, _b, _c;\n this.payload = {};\n if (process.env.GITHUB_EVENT_PATH) {\n if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) {\n this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' }));\n }\n else {\n const path = process.env.GITHUB_EVENT_PATH;\n process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`);\n }\n }\n this.eventName = process.env.GITHUB_EVENT_NAME;\n this.sha = process.env.GITHUB_SHA;\n this.ref = process.env.GITHUB_REF;\n this.workflow = process.env.GITHUB_WORKFLOW;\n this.action = process.env.GITHUB_ACTION;\n this.actor = process.env.GITHUB_ACTOR;\n this.job = process.env.GITHUB_JOB;\n this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);\n this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);\n this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;\n this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`;\n this.graphqlUrl =\n (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`;\n }\n get issue() {\n const payload = this.payload;\n return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number });\n }\n get repo() {\n if (process.env.GITHUB_REPOSITORY) {\n const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');\n return { owner, repo };\n }\n if (this.payload.repository) {\n return {\n owner: this.payload.repository.owner.login,\n repo: this.payload.repository.name\n };\n }\n throw new Error(\"context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'\");\n }\n}\nexports.Context = Context;\n//# sourceMappingURL=context.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOctokit = exports.context = void 0;\nconst Context = __importStar(require(\"./context\"));\nconst utils_1 = require(\"./utils\");\nexports.context = new Context.Context();\n/**\n * Returns a hydrated octokit ready to use for GitHub Actions\n *\n * @param token the repo PAT or GITHUB_TOKEN\n * @param options other options to set\n */\nfunction getOctokit(token, options, ...additionalPlugins) {\n const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins);\n return new GitHubWithPlugins((0, utils_1.getOctokitOptions)(token, options));\n}\nexports.getOctokit = getOctokit;\n//# sourceMappingURL=github.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getApiBaseUrl = exports.getProxyFetch = exports.getProxyAgentDispatcher = exports.getProxyAgent = exports.getAuthString = void 0;\nconst httpClient = __importStar(require(\"@actions/http-client\"));\nconst undici_1 = require(\"undici\");\nfunction getAuthString(token, options) {\n if (!token && !options.auth) {\n throw new Error('Parameter token or opts.auth is required');\n }\n else if (token && options.auth) {\n throw new Error('Parameters token and opts.auth may not both be specified');\n }\n return typeof options.auth === 'string' ? options.auth : `token ${token}`;\n}\nexports.getAuthString = getAuthString;\nfunction getProxyAgent(destinationUrl) {\n const hc = new httpClient.HttpClient();\n return hc.getAgent(destinationUrl);\n}\nexports.getProxyAgent = getProxyAgent;\nfunction getProxyAgentDispatcher(destinationUrl) {\n const hc = new httpClient.HttpClient();\n return hc.getAgentDispatcher(destinationUrl);\n}\nexports.getProxyAgentDispatcher = getProxyAgentDispatcher;\nfunction getProxyFetch(destinationUrl) {\n const httpDispatcher = getProxyAgentDispatcher(destinationUrl);\n const proxyFetch = (url, opts) => __awaiter(this, void 0, void 0, function* () {\n return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher }));\n });\n return proxyFetch;\n}\nexports.getProxyFetch = getProxyFetch;\nfunction getApiBaseUrl() {\n return process.env['GITHUB_API_URL'] || 'https://api.github.com';\n}\nexports.getApiBaseUrl = getApiBaseUrl;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0;\nconst Context = __importStar(require(\"./context\"));\nconst Utils = __importStar(require(\"./internal/utils\"));\n// octokit + plugins\nconst core_1 = require(\"@octokit/core\");\nconst plugin_rest_endpoint_methods_1 = require(\"@octokit/plugin-rest-endpoint-methods\");\nconst plugin_paginate_rest_1 = require(\"@octokit/plugin-paginate-rest\");\nexports.context = new Context.Context();\nconst baseUrl = Utils.getApiBaseUrl();\nexports.defaults = {\n baseUrl,\n request: {\n agent: Utils.getProxyAgent(baseUrl),\n fetch: Utils.getProxyFetch(baseUrl)\n }\n};\nexports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.defaults);\n/**\n * Convience function to correctly format Octokit Options to pass into the constructor.\n *\n * @param token the repo PAT or GITHUB_TOKEN\n * @param options other options to set\n */\nfunction getOctokitOptions(token, options) {\n const opts = Object.assign({}, options || {}); // Shallow clone - don't mutate the object provided by the caller\n // Auth\n const auth = Utils.getAuthString(token, opts);\n if (auth) {\n opts.auth = auth;\n }\n return opts;\n}\nexports.getOctokitOptions = getOctokitOptions;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n//# sourceMappingURL=auth.js.map","\"use strict\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;\nconst http = __importStar(require(\"http\"));\nconst https = __importStar(require(\"https\"));\nconst pm = __importStar(require(\"./proxy\"));\nconst tunnel = __importStar(require(\"tunnel\"));\nconst undici_1 = require(\"undici\");\nvar HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes || (exports.HttpCodes = HttpCodes = {}));\nvar Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers || (exports.Headers = Headers = {}));\nvar MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes || (exports.MediaTypes = MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nfunction getProxyUrl(serverUrl) {\n const proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nexports.getProxyUrl = getProxyUrl;\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nclass HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n}\nexports.HttpClientError = HttpClientError;\nclass HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n readBody() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n }));\n });\n }\n readBodyBuffer() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n const chunks = [];\n this.message.on('data', (chunk) => {\n chunks.push(chunk);\n });\n this.message.on('end', () => {\n resolve(Buffer.concat(chunks));\n });\n }));\n });\n }\n}\nexports.HttpClientResponse = HttpClientResponse;\nfunction isHttps(requestUrl) {\n const parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexports.isHttps = isHttps;\nclass HttpClient {\n constructor(userAgent, handlers, requestOptions) {\n this._ignoreSslError = false;\n this._allowRedirects = true;\n this._allowRedirectDowngrade = false;\n this._maxRedirects = 50;\n this._allowRetries = false;\n this._maxRetries = 1;\n this._keepAlive = false;\n this._disposed = false;\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n options(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n });\n }\n get(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n });\n }\n del(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n });\n }\n post(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n });\n }\n patch(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n });\n }\n put(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n });\n }\n head(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n });\n }\n sendStream(verb, requestUrl, stream, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n });\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n getJson(requestUrl, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n const res = yield this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n postJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n putJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n patchJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n request(verb, requestUrl, data, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n const parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n do {\n response = yield this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (const handler of this.handlers) {\n if (handler.canHandleAuthentication(response)) {\n authenticationHandler = handler;\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (response.message.statusCode &&\n HttpRedirectCodes.includes(response.message.statusCode) &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n const parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol === 'https:' &&\n parsedUrl.protocol !== parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n 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.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n yield response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (const header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = yield this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (!response.message.statusCode ||\n !HttpResponseRetryCodes.includes(response.message.statusCode)) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n yield response.readBody();\n yield this._performExponentialBackoff(numTries);\n }\n } while (numTries < maxTries);\n return response;\n });\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n requestRaw(info, data) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n function callbackForResult(err, res) {\n if (err) {\n reject(err);\n }\n else if (!res) {\n // If `err` is not passed, then `res` must be passed.\n reject(new Error('Unknown error'));\n }\n else {\n resolve(res);\n }\n }\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n if (typeof data === 'string') {\n if (!info.options.headers) {\n info.options.headers = {};\n }\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n function handleResult(err, res) {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n }\n const req = info.httpModule.request(info.options, (msg) => {\n const res = new HttpClientResponse(msg);\n handleResult(undefined, res);\n });\n let socket;\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error(`Request timeout: ${info.options.path}`));\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n getAgentDispatcher(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (!useProxy) {\n return;\n }\n return this._getProxyAgentDispatcher(parsedUrl, proxyUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n for (const handler of this.handlers) {\n handler.prepareRequest(info.options);\n }\n }\n return info;\n }\n _mergeHeaders(headers) {\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (this._keepAlive && !useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.\n if (proxyUrl && proxyUrl.hostname) {\n const agentOptions = {\n maxSockets,\n keepAlive: this._keepAlive,\n proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n })), { host: proxyUrl.hostname, port: proxyUrl.port })\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if reusing agent across request and tunneling agent isn't assigned create a new agent\n if (this._keepAlive && !agent) {\n const options = { keepAlive: this._keepAlive, maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n // if not using private agent and tunnel agent isn't setup then use global agent\n if (!agent) {\n agent = usingSsl ? https.globalAgent : http.globalAgent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n _getProxyAgentDispatcher(parsedUrl, proxyUrl) {\n let proxyAgent;\n if (this._keepAlive) {\n proxyAgent = this._proxyAgentDispatcher;\n }\n // if agent is already assigned use that agent.\n if (proxyAgent) {\n return proxyAgent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {\n token: `${proxyUrl.username}:${proxyUrl.password}`\n })));\n this._proxyAgentDispatcher = proxyAgent;\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {\n rejectUnauthorized: false\n });\n }\n return proxyAgent;\n }\n _performExponentialBackoff(retryNumber) {\n return __awaiter(this, void 0, void 0, function* () {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n });\n }\n _processResponse(res, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n const statusCode = res.message.statusCode || 0;\n const response = {\n statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode === HttpCodes.NotFound) {\n resolve(response);\n }\n // get the result from the body\n function dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n const a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n let obj;\n let contents;\n try {\n contents = yield res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = `Failed request: (${statusCode})`;\n }\n const err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n }));\n });\n }\n}\nexports.HttpClient = HttpClient;\nconst lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkBypass = exports.getProxyUrl = void 0;\nfunction getProxyUrl(reqUrl) {\n const usingSsl = reqUrl.protocol === 'https:';\n if (checkBypass(reqUrl)) {\n return undefined;\n }\n const proxyVar = (() => {\n if (usingSsl) {\n return process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n return process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n })();\n if (proxyVar) {\n try {\n return new URL(proxyVar);\n }\n catch (_a) {\n if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))\n return new URL(`http://${proxyVar}`);\n }\n }\n else {\n return undefined;\n }\n}\nexports.getProxyUrl = getProxyUrl;\nfunction checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n const reqHost = reqUrl.hostname;\n if (isLoopbackAddress(reqHost)) {\n return true;\n }\n const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n const upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (const upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperNoProxyItem === '*' ||\n upperReqHosts.some(x => x === upperNoProxyItem ||\n x.endsWith(`.${upperNoProxyItem}`) ||\n (upperNoProxyItem.startsWith('.') &&\n x.endsWith(`${upperNoProxyItem}`)))) {\n return true;\n }\n }\n return false;\n}\nexports.checkBypass = checkBypass;\nfunction isLoopbackAddress(host) {\n const hostLower = host.toLowerCase();\n return (hostLower === 'localhost' ||\n hostLower.startsWith('127.') ||\n hostLower.startsWith('[::1]') ||\n hostLower.startsWith('[0:0:0:0:0:0:0:1]'));\n}\n//# sourceMappingURL=proxy.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;\nconst fs = __importStar(require(\"fs\"));\nconst path = __importStar(require(\"path\"));\n_a = fs.promises\n// export const {open} = 'fs'\n, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;\n// export const {open} = 'fs'\nexports.IS_WINDOWS = process.platform === 'win32';\n// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691\nexports.UV_FS_O_EXLOCK = 0x10000000;\nexports.READONLY = fs.constants.O_RDONLY;\nfunction exists(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n yield exports.stat(fsPath);\n }\n catch (err) {\n if (err.code === 'ENOENT') {\n return false;\n }\n throw err;\n }\n return true;\n });\n}\nexports.exists = exists;\nfunction isDirectory(fsPath, useStat = false) {\n return __awaiter(this, void 0, void 0, function* () {\n const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath);\n return stats.isDirectory();\n });\n}\nexports.isDirectory = isDirectory;\n/**\n * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:\n * \\, \\hello, \\\\hello\\share, C:, and C:\\hello (and corresponding alternate separator cases).\n */\nfunction isRooted(p) {\n p = normalizeSeparators(p);\n if (!p) {\n throw new Error('isRooted() parameter \"p\" cannot be empty');\n }\n if (exports.IS_WINDOWS) {\n return (p.startsWith('\\\\') || /^[A-Z]:/i.test(p) // e.g. \\ or \\hello or \\\\hello\n ); // e.g. C: or C:\\hello\n }\n return p.startsWith('/');\n}\nexports.isRooted = isRooted;\n/**\n * Best effort attempt to determine whether a file exists and is executable.\n * @param filePath file path to check\n * @param extensions additional file extensions to try\n * @return if file exists and is executable, returns the file path. otherwise empty string.\n */\nfunction tryGetExecutablePath(filePath, extensions) {\n return __awaiter(this, void 0, void 0, function* () {\n let stats = undefined;\n try {\n // test file exists\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // on Windows, test for valid extension\n const upperExt = path.extname(filePath).toUpperCase();\n if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) {\n return filePath;\n }\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n // try each extension\n const originalFilePath = filePath;\n for (const extension of extensions) {\n filePath = originalFilePath + extension;\n stats = undefined;\n try {\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // preserve the case of the actual file (since an extension was appended)\n try {\n const directory = path.dirname(filePath);\n const upperName = path.basename(filePath).toUpperCase();\n for (const actualName of yield exports.readdir(directory)) {\n if (upperName === actualName.toUpperCase()) {\n filePath = path.join(directory, actualName);\n break;\n }\n }\n }\n catch (err) {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);\n }\n return filePath;\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n }\n return '';\n });\n}\nexports.tryGetExecutablePath = tryGetExecutablePath;\nfunction normalizeSeparators(p) {\n p = p || '';\n if (exports.IS_WINDOWS) {\n // convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // remove redundant slashes\n return p.replace(/\\\\\\\\+/g, '\\\\');\n }\n // remove redundant slashes\n return p.replace(/\\/\\/+/g, '/');\n}\n// on Mac/Linux, test the execute bit\n// R W X R W X R W X\n// 256 128 64 32 16 8 4 2 1\nfunction isUnixExecutable(stats) {\n return ((stats.mode & 1) > 0 ||\n ((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||\n ((stats.mode & 64) > 0 && stats.uid === process.getuid()));\n}\n// Get the path of cmd.exe in windows\nfunction getCmdPath() {\n var _a;\n return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;\n}\nexports.getCmdPath = getCmdPath;\n//# sourceMappingURL=io-util.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;\nconst assert_1 = require(\"assert\");\nconst path = __importStar(require(\"path\"));\nconst ioUtil = __importStar(require(\"./io-util\"));\n/**\n * Copies a file or folder.\n * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See CopyOptions.\n */\nfunction cp(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const { force, recursive, copySourceDirectory } = readCopyOptions(options);\n const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;\n // Dest is an existing file, but not forcing\n if (destStat && destStat.isFile() && !force) {\n return;\n }\n // If dest is an existing directory, should copy inside.\n const newDest = destStat && destStat.isDirectory() && copySourceDirectory\n ? path.join(dest, path.basename(source))\n : dest;\n if (!(yield ioUtil.exists(source))) {\n throw new Error(`no such file or directory: ${source}`);\n }\n const sourceStat = yield ioUtil.stat(source);\n if (sourceStat.isDirectory()) {\n if (!recursive) {\n throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);\n }\n else {\n yield cpDirRecursive(source, newDest, 0, force);\n }\n }\n else {\n if (path.relative(source, newDest) === '') {\n // a file cannot be copied to itself\n throw new Error(`'${newDest}' and '${source}' are the same file`);\n }\n yield copyFile(source, newDest, force);\n }\n });\n}\nexports.cp = cp;\n/**\n * Moves a path.\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See MoveOptions.\n */\nfunction mv(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (yield ioUtil.exists(dest)) {\n let destExists = true;\n if (yield ioUtil.isDirectory(dest)) {\n // If dest is directory copy src into dest\n dest = path.join(dest, path.basename(source));\n destExists = yield ioUtil.exists(dest);\n }\n if (destExists) {\n if (options.force == null || options.force) {\n yield rmRF(dest);\n }\n else {\n throw new Error('Destination already exists');\n }\n }\n }\n yield mkdirP(path.dirname(dest));\n yield ioUtil.rename(source, dest);\n });\n}\nexports.mv = mv;\n/**\n * Remove a path recursively with force\n *\n * @param inputPath path to remove\n */\nfunction rmRF(inputPath) {\n return __awaiter(this, void 0, void 0, function* () {\n if (ioUtil.IS_WINDOWS) {\n // Check for invalid characters\n // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file\n if (/[*\"<>|]/.test(inputPath)) {\n throw new Error('File path must not contain `*`, `\"`, `<`, `>` or `|` on Windows');\n }\n }\n try {\n // note if path does not exist, error is silent\n yield ioUtil.rm(inputPath, {\n force: true,\n maxRetries: 3,\n recursive: true,\n retryDelay: 300\n });\n }\n catch (err) {\n throw new Error(`File was unable to be removed ${err}`);\n }\n });\n}\nexports.rmRF = rmRF;\n/**\n * Make a directory. Creates the full path with folders in between\n * Will throw if it fails\n *\n * @param fsPath path to create\n * @returns Promise\n */\nfunction mkdirP(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(fsPath, 'a path argument must be provided');\n yield ioUtil.mkdir(fsPath, { recursive: true });\n });\n}\nexports.mkdirP = mkdirP;\n/**\n * Returns path of a tool had the tool actually been invoked. Resolves via paths.\n * If you check and the tool does not exist, it will throw.\n *\n * @param tool name of the tool\n * @param check whether to check if tool exists\n * @returns Promise path to tool\n */\nfunction which(tool, check) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // recursive when check=true\n if (check) {\n const result = yield which(tool, false);\n if (!result) {\n if (ioUtil.IS_WINDOWS) {\n 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.`);\n }\n else {\n 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.`);\n }\n }\n return result;\n }\n const matches = yield findInPath(tool);\n if (matches && matches.length > 0) {\n return matches[0];\n }\n return '';\n });\n}\nexports.which = which;\n/**\n * Returns a list of all occurrences of the given tool on the system path.\n *\n * @returns Promise the paths of the tool\n */\nfunction findInPath(tool) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // build the list of extensions to try\n const extensions = [];\n if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {\n for (const extension of process.env['PATHEXT'].split(path.delimiter)) {\n if (extension) {\n extensions.push(extension);\n }\n }\n }\n // if it's rooted, return it if exists. otherwise return empty.\n if (ioUtil.isRooted(tool)) {\n const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);\n if (filePath) {\n return [filePath];\n }\n return [];\n }\n // if any path separators, return empty\n if (tool.includes(path.sep)) {\n return [];\n }\n // build the list of directories\n //\n // Note, technically \"where\" checks the current directory on Windows. From a toolkit perspective,\n // it feels like we should not do this. Checking the current directory seems like more of a use\n // case of a shell, and the which() function exposed by the toolkit should strive for consistency\n // across platforms.\n const directories = [];\n if (process.env.PATH) {\n for (const p of process.env.PATH.split(path.delimiter)) {\n if (p) {\n directories.push(p);\n }\n }\n }\n // find all matches\n const matches = [];\n for (const directory of directories) {\n const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);\n if (filePath) {\n matches.push(filePath);\n }\n }\n return matches;\n });\n}\nexports.findInPath = findInPath;\nfunction readCopyOptions(options) {\n const force = options.force == null ? true : options.force;\n const recursive = Boolean(options.recursive);\n const copySourceDirectory = options.copySourceDirectory == null\n ? true\n : Boolean(options.copySourceDirectory);\n return { force, recursive, copySourceDirectory };\n}\nfunction cpDirRecursive(sourceDir, destDir, currentDepth, force) {\n return __awaiter(this, void 0, void 0, function* () {\n // Ensure there is not a run away recursive copy\n if (currentDepth >= 255)\n return;\n currentDepth++;\n yield mkdirP(destDir);\n const files = yield ioUtil.readdir(sourceDir);\n for (const fileName of files) {\n const srcFile = `${sourceDir}/${fileName}`;\n const destFile = `${destDir}/${fileName}`;\n const srcFileStat = yield ioUtil.lstat(srcFile);\n if (srcFileStat.isDirectory()) {\n // Recurse\n yield cpDirRecursive(srcFile, destFile, currentDepth, force);\n }\n else {\n yield copyFile(srcFile, destFile, force);\n }\n }\n // Change the mode for the newly created directory\n yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);\n });\n}\n// Buffered file copy\nfunction copyFile(srcFile, destFile, force) {\n return __awaiter(this, void 0, void 0, function* () {\n if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {\n // unlink/re-link it\n try {\n yield ioUtil.lstat(destFile);\n yield ioUtil.unlink(destFile);\n }\n catch (e) {\n // Try to override file permission\n if (e.code === 'EPERM') {\n yield ioUtil.chmod(destFile, '0666');\n yield ioUtil.unlink(destFile);\n }\n // other errors = it doesn't exist, no work to do\n }\n // Copy over symlink\n const symlinkFull = yield ioUtil.readlink(srcFile);\n yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);\n }\n else if (!(yield ioUtil.exists(destFile)) || force) {\n yield ioUtil.copyFile(srcFile, destFile);\n }\n });\n}\n//# sourceMappingURL=io.js.map","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n createTokenAuth: () => createTokenAuth\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/auth.js\nvar REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nvar REGEX_IS_INSTALLATION = /^ghs_/;\nvar REGEX_IS_USER_TO_SERVER = /^ghu_/;\nasync function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp ? \"app\" : isInstallation ? \"installation\" : isUserToServer ? \"user-to-server\" : \"oauth\";\n return {\n type: \"token\",\n token,\n tokenType\n };\n}\n\n// pkg/dist-src/with-authorization-prefix.js\nfunction withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n\n// pkg/dist-src/hook.js\nasync function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(\n route,\n parameters\n );\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n\n// pkg/dist-src/index.js\nvar createTokenAuth = function createTokenAuth2(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\n \"[@octokit/auth-token] Token passed to createTokenAuth is not a string\"\n );\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token)\n });\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n createTokenAuth\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n Octokit: () => Octokit\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_universal_user_agent = require(\"universal-user-agent\");\nvar import_before_after_hook = require(\"before-after-hook\");\nvar import_request = require(\"@octokit/request\");\nvar import_graphql = require(\"@octokit/graphql\");\nvar import_auth_token = require(\"@octokit/auth-token\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"5.2.0\";\n\n// pkg/dist-src/index.js\nvar noop = () => {\n};\nvar consoleWarn = console.warn.bind(console);\nvar consoleError = console.error.bind(console);\nvar userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;\nvar Octokit = class {\n static {\n this.VERSION = VERSION;\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(\n Object.assign(\n {},\n defaults,\n options,\n options.userAgent && defaults.userAgent ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`\n } : null\n )\n );\n }\n };\n return OctokitWithDefaults;\n }\n static {\n this.plugins = [];\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n const currentPlugins = this.plugins;\n const NewOctokit = class extends this {\n static {\n this.plugins = currentPlugins.concat(\n newPlugins.filter((plugin) => !currentPlugins.includes(plugin))\n );\n }\n };\n return NewOctokit;\n }\n constructor(options = {}) {\n const hook = new import_before_after_hook.Collection();\n const requestDefaults = {\n baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\")\n }),\n mediaType: {\n previews: [],\n format: \"\"\n }\n };\n requestDefaults.headers[\"user-agent\"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail;\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = import_request.request.defaults(requestDefaults);\n this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults);\n this.log = Object.assign(\n {\n debug: noop,\n info: noop,\n warn: consoleWarn,\n error: consoleError\n },\n options.log\n );\n this.hook = hook;\n if (!options.authStrategy) {\n if (!options.auth) {\n this.auth = async () => ({\n type: \"unauthenticated\"\n });\n } else {\n const auth = (0, import_auth_token.createTokenAuth)(options.auth);\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n } else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(\n Object.assign(\n {\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions\n },\n options.auth\n )\n );\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n const classConstructor = this.constructor;\n for (let i = 0; i < classConstructor.plugins.length; ++i) {\n Object.assign(this, classConstructor.plugins[i](this, options));\n }\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n Octokit\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n endpoint: () => endpoint\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/defaults.js\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"9.0.6\";\n\n// pkg/dist-src/defaults.js\nvar userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;\nvar DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent\n },\n mediaType: {\n format: \"\"\n }\n};\n\n// pkg/dist-src/util/lowercase-keys.js\nfunction lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n\n// pkg/dist-src/util/is-plain-object.js\nfunction isPlainObject(value) {\n if (typeof value !== \"object\" || value === null)\n return false;\n if (Object.prototype.toString.call(value) !== \"[object Object]\")\n return false;\n const proto = Object.getPrototypeOf(value);\n if (proto === null)\n return true;\n const Ctor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);\n}\n\n// pkg/dist-src/util/merge-deep.js\nfunction mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n } else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n\n// pkg/dist-src/util/remove-undefined-properties.js\nfunction removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === void 0) {\n delete obj[key];\n }\n }\n return obj;\n}\n\n// pkg/dist-src/merge.js\nfunction merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n } else {\n options = Object.assign({}, route);\n }\n options.headers = lowercaseKeys(options.headers);\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n if (options.url === \"/graphql\") {\n if (defaults && defaults.mediaType.previews?.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(\n (preview) => !mergedOptions.mediaType.previews.includes(preview)\n ).concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, \"\"));\n }\n return mergedOptions;\n}\n\n// pkg/dist-src/util/add-query-parameters.js\nfunction addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return url + separator + names.map((name) => {\n if (name === \"q\") {\n return \"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\");\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n }).join(\"&\");\n}\n\n// pkg/dist-src/util/extract-url-variable-names.js\nvar urlVariableRegex = /\\{[^{}}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/(?:^\\W+)|(?:(? a.concat(b), []);\n}\n\n// pkg/dist-src/util/omit.js\nfunction omit(object, keysToOmit) {\n const result = { __proto__: null };\n for (const key of Object.keys(object)) {\n if (keysToOmit.indexOf(key) === -1) {\n result[key] = object[key];\n }\n }\n return result;\n}\n\n// pkg/dist-src/util/url-template.js\nfunction encodeReserved(str) {\n return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n }).join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value = operator === \"+\" || operator === \"#\" ? encodeReserved(value) : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n } else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== void 0 && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(\n encodeValue(operator, value, isKeyOperator(operator) ? key : \"\")\n );\n } else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n result.push(\n encodeValue(operator, value2, isKeyOperator(operator) ? key : \"\")\n );\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n } else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n tmp.push(encodeValue(operator, value2));\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n } else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n } else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n } else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n } else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nfunction parseUrl(template) {\n return {\n expand: expand.bind(null, template)\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n template = template.replace(\n /\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g,\n function(_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function(variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n } else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n } else {\n return values.join(\",\");\n }\n } else {\n return encodeReserved(literal);\n }\n }\n );\n if (template === \"/\") {\n return template;\n } else {\n return template.replace(/\\/$/, \"\");\n }\n}\n\n// pkg/dist-src/parse.js\nfunction parse(options) {\n let method = options.method.toUpperCase();\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\"\n ]);\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n headers.accept = headers.accept.split(/,/).map(\n (format) => format.replace(\n /application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/,\n `application/vnd$1$2.${options.mediaType.format}`\n )\n ).join(\",\");\n }\n if (url.endsWith(\"/graphql\")) {\n if (options.mediaType.previews?.length) {\n const previewsFromAcceptHeader = headers.accept.match(/(? {\n const format = options.mediaType.format ? `.${options.mediaType.format}` : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n }).join(\",\");\n }\n }\n }\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n } else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n } else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n return Object.assign(\n { method, url, headers },\n typeof body !== \"undefined\" ? { body } : null,\n options.request ? { request: options.request } : null\n );\n}\n\n// pkg/dist-src/endpoint-with-defaults.js\nfunction endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS2 = merge(oldDefaults, newDefaults);\n const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2);\n return Object.assign(endpoint2, {\n DEFAULTS: DEFAULTS2,\n defaults: withDefaults.bind(null, DEFAULTS2),\n merge: merge.bind(null, DEFAULTS2),\n parse\n });\n}\n\n// pkg/dist-src/index.js\nvar endpoint = withDefaults(null, DEFAULTS);\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n endpoint\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar index_exports = {};\n__export(index_exports, {\n GraphqlResponseError: () => GraphqlResponseError,\n graphql: () => graphql2,\n withCustomRequest: () => withCustomRequest\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_request3 = require(\"@octokit/request\");\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"7.1.1\";\n\n// pkg/dist-src/with-defaults.js\nvar import_request2 = require(\"@octokit/request\");\n\n// pkg/dist-src/graphql.js\nvar import_request = require(\"@octokit/request\");\n\n// pkg/dist-src/error.js\nfunction _buildMessageForResponseErrors(data) {\n return `Request failed due to following response errors:\n` + data.errors.map((e) => ` - ${e.message}`).join(\"\\n\");\n}\nvar GraphqlResponseError = class extends Error {\n constructor(request2, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request2;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\";\n this.errors = response.errors;\n this.data = response.data;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n};\n\n// pkg/dist-src/graphql.js\nvar NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\"\n];\nvar FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nvar GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nfunction graphql(request2, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(\n new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`)\n );\n }\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;\n return Promise.reject(\n new Error(\n `[@octokit/graphql] \"${key}\" cannot be used as variable name`\n )\n );\n }\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(\n parsedOptions\n ).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request2(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlResponseError(\n requestOptions,\n headers,\n response.data\n );\n }\n return response.data.data;\n });\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(request2, newDefaults) {\n const newRequest = request2.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: newRequest.endpoint\n });\n}\n\n// pkg/dist-src/index.js\nvar graphql2 = withDefaults(import_request3.request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`\n },\n method: \"POST\",\n url: \"/graphql\"\n});\nfunction withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\"\n });\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n GraphqlResponseError,\n graphql,\n withCustomRequest\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n composePaginateRest: () => composePaginateRest,\n isPaginatingEndpoint: () => isPaginatingEndpoint,\n paginateRest: () => paginateRest,\n paginatingEndpoints: () => paginatingEndpoints\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"9.2.2\";\n\n// pkg/dist-src/normalize-paginated-list-response.js\nfunction normalizePaginatedListResponse(response) {\n if (!response.data) {\n return {\n ...response,\n data: []\n };\n }\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization)\n return response;\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n response.data.total_count = totalCount;\n return response;\n}\n\n// pkg/dist-src/iterator.js\nfunction iterator(octokit, route, parameters) {\n const options = typeof route === \"function\" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url)\n return { done: true };\n try {\n const response = await requestMethod({ method, url, headers });\n const normalizedResponse = normalizePaginatedListResponse(response);\n url = ((normalizedResponse.headers.link || \"\").match(\n /<([^<>]+)>;\\s*rel=\"next\"/\n ) || [])[1];\n return { value: normalizedResponse };\n } catch (error) {\n if (error.status !== 409)\n throw error;\n url = \"\";\n return {\n value: {\n status: 200,\n headers: {},\n data: []\n }\n };\n }\n }\n })\n };\n}\n\n// pkg/dist-src/paginate.js\nfunction paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = void 0;\n }\n return gather(\n octokit,\n [],\n iterator(octokit, route, parameters)[Symbol.asyncIterator](),\n mapFn\n );\n}\nfunction gather(octokit, results, iterator2, mapFn) {\n return iterator2.next().then((result) => {\n if (result.done) {\n return results;\n }\n let earlyExit = false;\n function done() {\n earlyExit = true;\n }\n results = results.concat(\n mapFn ? mapFn(result.value, done) : result.value.data\n );\n if (earlyExit) {\n return results;\n }\n return gather(octokit, results, iterator2, mapFn);\n });\n}\n\n// pkg/dist-src/compose-paginate.js\nvar composePaginateRest = Object.assign(paginate, {\n iterator\n});\n\n// pkg/dist-src/generated/paginating-endpoints.js\nvar paginatingEndpoints = [\n \"GET /advisories\",\n \"GET /app/hook/deliveries\",\n \"GET /app/installation-requests\",\n \"GET /app/installations\",\n \"GET /assignments/{assignment_id}/accepted_assignments\",\n \"GET /classrooms\",\n \"GET /classrooms/{classroom_id}/assignments\",\n \"GET /enterprises/{enterprise}/dependabot/alerts\",\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n \"GET /events\",\n \"GET /gists\",\n \"GET /gists/public\",\n \"GET /gists/starred\",\n \"GET /gists/{gist_id}/comments\",\n \"GET /gists/{gist_id}/commits\",\n \"GET /gists/{gist_id}/forks\",\n \"GET /installation/repositories\",\n \"GET /issues\",\n \"GET /licenses\",\n \"GET /marketplace_listing/plans\",\n \"GET /marketplace_listing/plans/{plan_id}/accounts\",\n \"GET /marketplace_listing/stubbed/plans\",\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"GET /networks/{owner}/{repo}/events\",\n \"GET /notifications\",\n \"GET /organizations\",\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n \"GET /orgs/{org}/actions/permissions/repositories\",\n \"GET /orgs/{org}/actions/runners\",\n \"GET /orgs/{org}/actions/secrets\",\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/actions/variables\",\n \"GET /orgs/{org}/actions/variables/{name}/repositories\",\n \"GET /orgs/{org}/blocks\",\n \"GET /orgs/{org}/code-scanning/alerts\",\n \"GET /orgs/{org}/codespaces\",\n \"GET /orgs/{org}/codespaces/secrets\",\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/copilot/billing/seats\",\n \"GET /orgs/{org}/dependabot/alerts\",\n \"GET /orgs/{org}/dependabot/secrets\",\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/events\",\n \"GET /orgs/{org}/failed_invitations\",\n \"GET /orgs/{org}/hooks\",\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries\",\n \"GET /orgs/{org}/installations\",\n \"GET /orgs/{org}/invitations\",\n \"GET /orgs/{org}/invitations/{invitation_id}/teams\",\n \"GET /orgs/{org}/issues\",\n \"GET /orgs/{org}/members\",\n \"GET /orgs/{org}/members/{username}/codespaces\",\n \"GET /orgs/{org}/migrations\",\n \"GET /orgs/{org}/migrations/{migration_id}/repositories\",\n \"GET /orgs/{org}/organization-roles/{role_id}/teams\",\n \"GET /orgs/{org}/organization-roles/{role_id}/users\",\n \"GET /orgs/{org}/outside_collaborators\",\n \"GET /orgs/{org}/packages\",\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n \"GET /orgs/{org}/personal-access-token-requests\",\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\",\n \"GET /orgs/{org}/personal-access-tokens\",\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\",\n \"GET /orgs/{org}/projects\",\n \"GET /orgs/{org}/properties/values\",\n \"GET /orgs/{org}/public_members\",\n \"GET /orgs/{org}/repos\",\n \"GET /orgs/{org}/rulesets\",\n \"GET /orgs/{org}/rulesets/rule-suites\",\n \"GET /orgs/{org}/secret-scanning/alerts\",\n \"GET /orgs/{org}/security-advisories\",\n \"GET /orgs/{org}/teams\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n \"GET /orgs/{org}/teams/{team_slug}/members\",\n \"GET /orgs/{org}/teams/{team_slug}/projects\",\n \"GET /orgs/{org}/teams/{team_slug}/repos\",\n \"GET /orgs/{org}/teams/{team_slug}/teams\",\n \"GET /projects/columns/{column_id}/cards\",\n \"GET /projects/{project_id}/collaborators\",\n \"GET /projects/{project_id}/columns\",\n \"GET /repos/{owner}/{repo}/actions/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/caches\",\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\",\n \"GET /repos/{owner}/{repo}/actions/organization-variables\",\n \"GET /repos/{owner}/{repo}/actions/runners\",\n \"GET /repos/{owner}/{repo}/actions/runs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/secrets\",\n \"GET /repos/{owner}/{repo}/actions/variables\",\n \"GET /repos/{owner}/{repo}/actions/workflows\",\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n \"GET /repos/{owner}/{repo}/activity\",\n \"GET /repos/{owner}/{repo}/assignees\",\n \"GET /repos/{owner}/{repo}/branches\",\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n \"GET /repos/{owner}/{repo}/code-scanning/analyses\",\n \"GET /repos/{owner}/{repo}/codespaces\",\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n \"GET /repos/{owner}/{repo}/codespaces/secrets\",\n \"GET /repos/{owner}/{repo}/collaborators\",\n \"GET /repos/{owner}/{repo}/comments\",\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/commits\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/status\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n \"GET /repos/{owner}/{repo}/contributors\",\n \"GET /repos/{owner}/{repo}/dependabot/alerts\",\n \"GET /repos/{owner}/{repo}/dependabot/secrets\",\n \"GET /repos/{owner}/{repo}/deployments\",\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n \"GET /repos/{owner}/{repo}/environments\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\",\n \"GET /repos/{owner}/{repo}/events\",\n \"GET /repos/{owner}/{repo}/forks\",\n \"GET /repos/{owner}/{repo}/hooks\",\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n \"GET /repos/{owner}/{repo}/invitations\",\n \"GET /repos/{owner}/{repo}/issues\",\n \"GET /repos/{owner}/{repo}/issues/comments\",\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n \"GET /repos/{owner}/{repo}/keys\",\n \"GET /repos/{owner}/{repo}/labels\",\n \"GET /repos/{owner}/{repo}/milestones\",\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n \"GET /repos/{owner}/{repo}/notifications\",\n \"GET /repos/{owner}/{repo}/pages/builds\",\n \"GET /repos/{owner}/{repo}/projects\",\n \"GET /repos/{owner}/{repo}/pulls\",\n \"GET /repos/{owner}/{repo}/pulls/comments\",\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n \"GET /repos/{owner}/{repo}/releases\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n \"GET /repos/{owner}/{repo}/rules/branches/{branch}\",\n \"GET /repos/{owner}/{repo}/rulesets\",\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n \"GET /repos/{owner}/{repo}/security-advisories\",\n \"GET /repos/{owner}/{repo}/stargazers\",\n \"GET /repos/{owner}/{repo}/subscribers\",\n \"GET /repos/{owner}/{repo}/tags\",\n \"GET /repos/{owner}/{repo}/teams\",\n \"GET /repos/{owner}/{repo}/topics\",\n \"GET /repositories\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables\",\n \"GET /search/code\",\n \"GET /search/commits\",\n \"GET /search/issues\",\n \"GET /search/labels\",\n \"GET /search/repositories\",\n \"GET /search/topics\",\n \"GET /search/users\",\n \"GET /teams/{team_id}/discussions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/reactions\",\n \"GET /teams/{team_id}/invitations\",\n \"GET /teams/{team_id}/members\",\n \"GET /teams/{team_id}/projects\",\n \"GET /teams/{team_id}/repos\",\n \"GET /teams/{team_id}/teams\",\n \"GET /user/blocks\",\n \"GET /user/codespaces\",\n \"GET /user/codespaces/secrets\",\n \"GET /user/emails\",\n \"GET /user/followers\",\n \"GET /user/following\",\n \"GET /user/gpg_keys\",\n \"GET /user/installations\",\n \"GET /user/installations/{installation_id}/repositories\",\n \"GET /user/issues\",\n \"GET /user/keys\",\n \"GET /user/marketplace_purchases\",\n \"GET /user/marketplace_purchases/stubbed\",\n \"GET /user/memberships/orgs\",\n \"GET /user/migrations\",\n \"GET /user/migrations/{migration_id}/repositories\",\n \"GET /user/orgs\",\n \"GET /user/packages\",\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n \"GET /user/public_emails\",\n \"GET /user/repos\",\n \"GET /user/repository_invitations\",\n \"GET /user/social_accounts\",\n \"GET /user/ssh_signing_keys\",\n \"GET /user/starred\",\n \"GET /user/subscriptions\",\n \"GET /user/teams\",\n \"GET /users\",\n \"GET /users/{username}/events\",\n \"GET /users/{username}/events/orgs/{org}\",\n \"GET /users/{username}/events/public\",\n \"GET /users/{username}/followers\",\n \"GET /users/{username}/following\",\n \"GET /users/{username}/gists\",\n \"GET /users/{username}/gpg_keys\",\n \"GET /users/{username}/keys\",\n \"GET /users/{username}/orgs\",\n \"GET /users/{username}/packages\",\n \"GET /users/{username}/projects\",\n \"GET /users/{username}/received_events\",\n \"GET /users/{username}/received_events/public\",\n \"GET /users/{username}/repos\",\n \"GET /users/{username}/social_accounts\",\n \"GET /users/{username}/ssh_signing_keys\",\n \"GET /users/{username}/starred\",\n \"GET /users/{username}/subscriptions\"\n];\n\n// pkg/dist-src/paginating-endpoints.js\nfunction isPaginatingEndpoint(arg) {\n if (typeof arg === \"string\") {\n return paginatingEndpoints.includes(arg);\n } else {\n return false;\n }\n}\n\n// pkg/dist-src/index.js\nfunction paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit)\n })\n };\n}\npaginateRest.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n composePaginateRest,\n isPaginatingEndpoint,\n paginateRest,\n paginatingEndpoints\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n legacyRestEndpointMethods: () => legacyRestEndpointMethods,\n restEndpointMethods: () => restEndpointMethods\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"10.4.1\";\n\n// pkg/dist-src/generated/endpoints.js\nvar Endpoints = {\n actions: {\n addCustomLabelsToSelfHostedRunnerForOrg: [\n \"POST /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n addCustomLabelsToSelfHostedRunnerForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n addSelectedRepoToOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\"\n ],\n approveWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve\"\n ],\n cancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\"\n ],\n createEnvironmentVariable: [\n \"POST /repositories/{repository_id}/environments/{environment_name}/variables\"\n ],\n createOrUpdateEnvironmentSecret: [\n \"PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\"\n ],\n createOrgVariable: [\"POST /orgs/{org}/actions/variables\"],\n createRegistrationTokenForOrg: [\n \"POST /orgs/{org}/actions/runners/registration-token\"\n ],\n createRegistrationTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/registration-token\"\n ],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/remove-token\"\n ],\n createRepoVariable: [\"POST /repos/{owner}/{repo}/actions/variables\"],\n createWorkflowDispatch: [\n \"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\"\n ],\n deleteActionsCacheById: [\n \"DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}\"\n ],\n deleteActionsCacheByKey: [\n \"DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}\"\n ],\n deleteArtifact: [\n \"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"\n ],\n deleteEnvironmentSecret: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n deleteEnvironmentVariable: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteOrgVariable: [\"DELETE /orgs/{org}/actions/variables/{name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\"\n ],\n deleteRepoVariable: [\n \"DELETE /repos/{owner}/{repo}/actions/variables/{name}\"\n ],\n deleteSelfHostedRunnerFromOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}\"\n ],\n deleteSelfHostedRunnerFromRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\"\n ],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\n \"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"\n ],\n disableSelectedRepositoryGithubActionsOrganization: [\n \"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\"\n ],\n disableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\"\n ],\n downloadArtifact: [\n \"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\"\n ],\n downloadJobLogsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\"\n ],\n downloadWorkflowRunAttemptLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs\"\n ],\n downloadWorkflowRunLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"\n ],\n enableSelectedRepositoryGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\"\n ],\n enableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\"\n ],\n forceCancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel\"\n ],\n generateRunnerJitconfigForOrg: [\n \"POST /orgs/{org}/actions/runners/generate-jitconfig\"\n ],\n generateRunnerJitconfigForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig\"\n ],\n getActionsCacheList: [\"GET /repos/{owner}/{repo}/actions/caches\"],\n getActionsCacheUsage: [\"GET /repos/{owner}/{repo}/actions/cache/usage\"],\n getActionsCacheUsageByRepoForOrg: [\n \"GET /orgs/{org}/actions/cache/usage-by-repository\"\n ],\n getActionsCacheUsageForOrg: [\"GET /orgs/{org}/actions/cache/usage\"],\n getAllowedActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/selected-actions\"\n ],\n getAllowedActionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\"\n ],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getCustomOidcSubClaimForRepo: [\n \"GET /repos/{owner}/{repo}/actions/oidc/customization/sub\"\n ],\n getEnvironmentPublicKey: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key\"\n ],\n getEnvironmentSecret: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n getEnvironmentVariable: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n getGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/workflow\"\n ],\n getGithubActionsDefaultWorkflowPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/workflow\"\n ],\n getGithubActionsPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions\"\n ],\n getGithubActionsPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions\"\n ],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getOrgVariable: [\"GET /orgs/{org}/actions/variables/{name}\"],\n getPendingDeploymentsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"\n ],\n getRepoPermissions: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n {},\n { renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"] }\n ],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getRepoVariable: [\"GET /repos/{owner}/{repo}/actions/variables/{name}\"],\n getReviewsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals\"\n ],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\"\n ],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowAccessToRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/access\"\n ],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}\"\n ],\n getWorkflowRunUsage: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\"\n ],\n getWorkflowUsage: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\"\n ],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listEnvironmentSecrets: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\"\n ],\n listEnvironmentVariables: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables\"\n ],\n listJobsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\"\n ],\n listJobsForWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\"\n ],\n listLabelsForSelfHostedRunnerForOrg: [\n \"GET /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n listLabelsForSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listOrgVariables: [\"GET /orgs/{org}/actions/variables\"],\n listRepoOrganizationSecrets: [\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\"\n ],\n listRepoOrganizationVariables: [\n \"GET /repos/{owner}/{repo}/actions/organization-variables\"\n ],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoVariables: [\"GET /repos/{owner}/{repo}/actions/variables\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/downloads\"\n ],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\"\n ],\n listSelectedReposForOrgVariable: [\n \"GET /orgs/{org}/actions/variables/{name}/repositories\"\n ],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/repositories\"\n ],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\"\n ],\n listWorkflowRuns: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\"\n ],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n reRunJobForWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun\"\n ],\n reRunWorkflow: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun\"],\n reRunWorkflowFailedJobs: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs\"\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n removeCustomLabelFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}\"\n ],\n removeCustomLabelFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n removeSelectedRepoFromOrgVariable: [\n \"DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\"\n ],\n reviewCustomGatesForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule\"\n ],\n reviewPendingDeploymentsForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"\n ],\n setAllowedActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/selected-actions\"\n ],\n setAllowedActionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\"\n ],\n setCustomLabelsForSelfHostedRunnerForOrg: [\n \"PUT /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n setCustomLabelsForSelfHostedRunnerForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n setCustomOidcSubClaimForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/oidc/customization/sub\"\n ],\n setGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/workflow\"\n ],\n setGithubActionsDefaultWorkflowPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/workflow\"\n ],\n setGithubActionsPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions\"\n ],\n setGithubActionsPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\"\n ],\n setSelectedReposForOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories\"\n ],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories\"\n ],\n setWorkflowAccessToRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/access\"\n ],\n updateEnvironmentVariable: [\n \"PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n updateOrgVariable: [\"PATCH /orgs/{org}/actions/variables/{name}\"],\n updateRepoVariable: [\n \"PATCH /repos/{owner}/{repo}/actions/variables/{name}\"\n ]\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\n \"DELETE /notifications/threads/{thread_id}/subscription\"\n ],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\n \"GET /notifications/threads/{thread_id}/subscription\"\n ],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\n \"GET /users/{username}/events/orgs/{org}\"\n ],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\n \"GET /users/{username}/received_events/public\"\n ],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/notifications\"\n ],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsDone: [\"DELETE /notifications/threads/{thread_id}\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\n \"PUT /notifications/threads/{thread_id}/subscription\"\n ],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"]\n },\n apps: {\n addRepoToInstallation: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"addRepoToInstallationForAuthenticatedUser\"] }\n ],\n addRepoToInstallationForAuthenticatedUser: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\"\n ],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\n \"POST /app/installations/{installation_id}/access_tokens\"\n ],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\n \"GET /marketplace_listing/accounts/{account_id}\"\n ],\n getSubscriptionPlanForAccountStubbed: [\n \"GET /marketplace_listing/stubbed/accounts/{account_id}\"\n ],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n getWebhookDelivery: [\"GET /app/hook/deliveries/{delivery_id}\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\"\n ],\n listInstallationReposForAuthenticatedUser: [\n \"GET /user/installations/{installation_id}/repositories\"\n ],\n listInstallationRequestsForAuthenticatedApp: [\n \"GET /app/installation-requests\"\n ],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\n \"GET /user/marketplace_purchases/stubbed\"\n ],\n listWebhookDeliveries: [\"GET /app/hook/deliveries\"],\n redeliverWebhookDelivery: [\n \"POST /app/hook/deliveries/{delivery_id}/attempts\"\n ],\n removeRepoFromInstallation: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"removeRepoFromInstallationForAuthenticatedUser\"] }\n ],\n removeRepoFromInstallationForAuthenticatedUser: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\"\n ],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\n \"DELETE /app/installations/{installation_id}/suspended\"\n ],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"]\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\n \"GET /users/{username}/settings/billing/actions\"\n ],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\n \"GET /users/{username}/settings/billing/packages\"\n ],\n getSharedStorageBillingOrg: [\n \"GET /orgs/{org}/settings/billing/shared-storage\"\n ],\n getSharedStorageBillingUser: [\n \"GET /users/{username}/settings/billing/shared-storage\"\n ]\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\"\n ],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\"\n ],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestRun: [\n \"POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest\"\n ],\n rerequestSuite: [\n \"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\"\n ],\n setSuitesPreferences: [\n \"PATCH /repos/{owner}/{repo}/check-suites/preferences\"\n ],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"]\n },\n codeScanning: {\n deleteAnalysis: [\n \"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\"\n ],\n getAlert: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n {},\n { renamedParameters: { alert_id: \"alert_number\" } }\n ],\n getAnalysis: [\n \"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\"\n ],\n getCodeqlDatabase: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}\"\n ],\n getDefaultSetup: [\"GET /repos/{owner}/{repo}/code-scanning/default-setup\"],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/code-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n {},\n { renamed: [\"codeScanning\", \"listAlertInstances\"] }\n ],\n listCodeqlDatabases: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases\"\n ],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\"\n ],\n updateDefaultSetup: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/default-setup\"\n ],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"]\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\"GET /codes_of_conduct\"],\n getConductCode: [\"GET /codes_of_conduct/{key}\"]\n },\n codespaces: {\n addRepositoryForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n checkPermissionsForDevcontainer: [\n \"GET /repos/{owner}/{repo}/codespaces/permissions_check\"\n ],\n codespaceMachinesForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/machines\"\n ],\n createForAuthenticatedUser: [\"POST /user/codespaces\"],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}\"\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n createOrUpdateSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}\"\n ],\n createWithPrForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces\"\n ],\n createWithRepoForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/codespaces\"\n ],\n deleteForAuthenticatedUser: [\"DELETE /user/codespaces/{codespace_name}\"],\n deleteFromOrganization: [\n \"DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/codespaces/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n deleteSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}\"\n ],\n exportForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/exports\"\n ],\n getCodespacesForUserInOrg: [\n \"GET /orgs/{org}/members/{username}/codespaces\"\n ],\n getExportDetailsForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/exports/{export_id}\"\n ],\n getForAuthenticatedUser: [\"GET /user/codespaces/{codespace_name}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/codespaces/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/codespaces/secrets/{secret_name}\"],\n getPublicKeyForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/public-key\"\n ],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/public-key\"\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n getSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}\"\n ],\n listDevcontainersInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\"\n ],\n listForAuthenticatedUser: [\"GET /user/codespaces\"],\n listInOrganization: [\n \"GET /orgs/{org}/codespaces\",\n {},\n { renamedParameters: { org_id: \"org\" } }\n ],\n listInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces\"\n ],\n listOrgSecrets: [\"GET /orgs/{org}/codespaces/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/codespaces/secrets\"],\n listRepositoriesForSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}/repositories\"\n ],\n listSecretsForAuthenticatedUser: [\"GET /user/codespaces/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\"\n ],\n preFlightWithRepoForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/new\"\n ],\n publishForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/publish\"\n ],\n removeRepositoryForSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n repoMachinesForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/machines\"\n ],\n setRepositoriesForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories\"\n ],\n startForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/start\"],\n stopForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/stop\"],\n stopInOrganization: [\n \"POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop\"\n ],\n updateForAuthenticatedUser: [\"PATCH /user/codespaces/{codespace_name}\"]\n },\n copilot: {\n addCopilotSeatsForTeams: [\n \"POST /orgs/{org}/copilot/billing/selected_teams\"\n ],\n addCopilotSeatsForUsers: [\n \"POST /orgs/{org}/copilot/billing/selected_users\"\n ],\n cancelCopilotSeatAssignmentForTeams: [\n \"DELETE /orgs/{org}/copilot/billing/selected_teams\"\n ],\n cancelCopilotSeatAssignmentForUsers: [\n \"DELETE /orgs/{org}/copilot/billing/selected_users\"\n ],\n getCopilotOrganizationDetails: [\"GET /orgs/{org}/copilot/billing\"],\n getCopilotSeatDetailsForUser: [\n \"GET /orgs/{org}/members/{username}/copilot\"\n ],\n listCopilotSeats: [\"GET /orgs/{org}/copilot/billing/seats\"]\n },\n dependabot: {\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}\"\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/dependabot/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n getAlert: [\"GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/dependabot/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/dependabot/secrets/{secret_name}\"],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/public-key\"\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/dependabot/alerts\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/dependabot/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/dependabot/alerts\"],\n listOrgSecrets: [\"GET /orgs/{org}/dependabot/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/dependabot/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories\"\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"\n ]\n },\n dependencyGraph: {\n createRepositorySnapshot: [\n \"POST /repos/{owner}/{repo}/dependency-graph/snapshots\"\n ],\n diffRange: [\n \"GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}\"\n ],\n exportSbom: [\"GET /repos/{owner}/{repo}/dependency-graph/sbom\"]\n },\n emojis: { get: [\"GET /emojis\"] },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"]\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"]\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"]\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\n \"GET /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"] }\n ],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\n \"DELETE /repos/{owner}/{repo}/interaction-limits\"\n ],\n removeRestrictionsForYourPublicRepos: [\n \"DELETE /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"] }\n ],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\n \"PUT /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"] }\n ]\n },\n issues: {\n addAssignees: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\"\n ],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n checkUserCanBeAssignedToIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}\"\n ],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\"\n ],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\"\n ],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\n \"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\"\n ],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\"\n ],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\"\n ],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\"\n ],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\"\n ],\n removeAssignees: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\"\n ],\n removeLabel: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\"\n ],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\n \"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\"\n ]\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"]\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\n \"POST /markdown/raw\",\n { headers: { \"content-type\": \"text/plain; charset=utf-8\" } }\n ]\n },\n meta: {\n get: [\"GET /meta\"],\n getAllVersions: [\"GET /versions\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"]\n },\n migrations: {\n cancelImport: [\n \"DELETE /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import\"\n }\n ],\n deleteArchiveForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/archive\"\n ],\n deleteArchiveForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/archive\"\n ],\n downloadArchiveForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/archive\"\n ],\n getArchiveForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/archive\"\n ],\n getCommitAuthors: [\n \"GET /repos/{owner}/{repo}/import/authors\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors\"\n }\n ],\n getImportStatus: [\n \"GET /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status\"\n }\n ],\n getLargeFiles: [\n \"GET /repos/{owner}/{repo}/import/large_files\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files\"\n }\n ],\n getStatusForAuthenticatedUser: [\"GET /user/migrations/{migration_id}\"],\n getStatusForOrg: [\"GET /orgs/{org}/migrations/{migration_id}\"],\n listForAuthenticatedUser: [\"GET /user/migrations\"],\n listForOrg: [\"GET /orgs/{org}/migrations\"],\n listReposForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/repositories\"\n ],\n listReposForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/repositories\"],\n listReposForUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n {},\n { renamed: [\"migrations\", \"listReposForAuthenticatedUser\"] }\n ],\n mapCommitAuthor: [\n \"PATCH /repos/{owner}/{repo}/import/authors/{author_id}\",\n {},\n {\n deprecated: \"octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author\"\n }\n ],\n setLfsPreference: [\n \"PATCH /repos/{owner}/{repo}/import/lfs\",\n {},\n {\n deprecated: \"octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference\"\n }\n ],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n startImport: [\n \"PUT /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import\"\n }\n ],\n unlockRepoForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\"\n ],\n unlockRepoForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\"\n ],\n updateImport: [\n \"PATCH /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import\"\n }\n ]\n },\n oidc: {\n getOidcCustomSubTemplateForOrg: [\n \"GET /orgs/{org}/actions/oidc/customization/sub\"\n ],\n updateOidcCustomSubTemplateForOrg: [\n \"PUT /orgs/{org}/actions/oidc/customization/sub\"\n ]\n },\n orgs: {\n addSecurityManagerTeam: [\n \"PUT /orgs/{org}/security-managers/teams/{team_slug}\"\n ],\n assignTeamToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\"\n ],\n assignUserToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/users/{username}/{role_id}\"\n ],\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\n \"PUT /orgs/{org}/outside_collaborators/{username}\"\n ],\n createCustomOrganizationRole: [\"POST /orgs/{org}/organization-roles\"],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createOrUpdateCustomProperties: [\"PATCH /orgs/{org}/properties/schema\"],\n createOrUpdateCustomPropertiesValuesForRepos: [\n \"PATCH /orgs/{org}/properties/values\"\n ],\n createOrUpdateCustomProperty: [\n \"PUT /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n delete: [\"DELETE /orgs/{org}\"],\n deleteCustomOrganizationRole: [\n \"DELETE /orgs/{org}/organization-roles/{role_id}\"\n ],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n enableOrDisableSecurityProductOnAllOrgRepos: [\n \"POST /orgs/{org}/{security_product}/{enablement}\"\n ],\n get: [\"GET /orgs/{org}\"],\n getAllCustomProperties: [\"GET /orgs/{org}/properties/schema\"],\n getCustomProperty: [\n \"GET /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getOrgRole: [\"GET /orgs/{org}/organization-roles/{role_id}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}\"\n ],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listCustomPropertiesValuesForRepos: [\"GET /orgs/{org}/properties/values\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOrgRoleTeams: [\"GET /orgs/{org}/organization-roles/{role_id}/teams\"],\n listOrgRoleUsers: [\"GET /orgs/{org}/organization-roles/{role_id}/users\"],\n listOrgRoles: [\"GET /orgs/{org}/organization-roles\"],\n listOrganizationFineGrainedPermissions: [\n \"GET /orgs/{org}/organization-fine-grained-permissions\"\n ],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPatGrantRepositories: [\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\"\n ],\n listPatGrantRequestRepositories: [\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\"\n ],\n listPatGrantRequests: [\"GET /orgs/{org}/personal-access-token-requests\"],\n listPatGrants: [\"GET /orgs/{org}/personal-access-tokens\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listSecurityManagerTeams: [\"GET /orgs/{org}/security-managers\"],\n listWebhookDeliveries: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n patchCustomOrganizationRole: [\n \"PATCH /orgs/{org}/organization-roles/{role_id}\"\n ],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"\n ],\n removeCustomProperty: [\n \"DELETE /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\n \"DELETE /orgs/{org}/outside_collaborators/{username}\"\n ],\n removePublicMembershipForAuthenticatedUser: [\n \"DELETE /orgs/{org}/public_members/{username}\"\n ],\n removeSecurityManagerTeam: [\n \"DELETE /orgs/{org}/security-managers/teams/{team_slug}\"\n ],\n reviewPatGrantRequest: [\n \"POST /orgs/{org}/personal-access-token-requests/{pat_request_id}\"\n ],\n reviewPatGrantRequestsInBulk: [\n \"POST /orgs/{org}/personal-access-token-requests\"\n ],\n revokeAllOrgRolesTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}\"\n ],\n revokeAllOrgRolesUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}\"\n ],\n revokeOrgRoleTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\"\n ],\n revokeOrgRoleUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}\"\n ],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\n \"PUT /orgs/{org}/public_members/{username}\"\n ],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\n \"PATCH /user/memberships/orgs/{org}\"\n ],\n updatePatAccess: [\"POST /orgs/{org}/personal-access-tokens/{pat_id}\"],\n updatePatAccesses: [\"POST /orgs/{org}/personal-access-tokens\"],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"]\n },\n packages: {\n deletePackageForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}\"\n ],\n deletePackageForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}\"\n ],\n deletePackageForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}\"\n ],\n deletePackageVersionForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n deletePackageVersionForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n deletePackageVersionForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n {},\n { renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByOrg\"] }\n ],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n {},\n {\n renamed: [\n \"packages\",\n \"getAllPackageVersionsForPackageOwnedByAuthenticatedUser\"\n ]\n }\n ],\n getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\"\n ],\n getAllPackageVersionsForPackageOwnedByOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\"\n ],\n getAllPackageVersionsForPackageOwnedByUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions\"\n ],\n getPackageForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}\"\n ],\n getPackageForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}\"\n ],\n getPackageForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}\"\n ],\n getPackageVersionForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getPackageVersionForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getPackageVersionForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n listDockerMigrationConflictingPackagesForAuthenticatedUser: [\n \"GET /user/docker/conflicts\"\n ],\n listDockerMigrationConflictingPackagesForOrganization: [\n \"GET /orgs/{org}/docker/conflicts\"\n ],\n listDockerMigrationConflictingPackagesForUser: [\n \"GET /users/{username}/docker/conflicts\"\n ],\n listPackagesForAuthenticatedUser: [\"GET /user/packages\"],\n listPackagesForOrganization: [\"GET /orgs/{org}/packages\"],\n listPackagesForUser: [\"GET /users/{username}/packages\"],\n restorePackageForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageVersionForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ],\n restorePackageVersionForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ],\n restorePackageVersionForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ]\n },\n projects: {\n addCollaborator: [\"PUT /projects/{project_id}/collaborators/{username}\"],\n createCard: [\"POST /projects/columns/{column_id}/cards\"],\n createColumn: [\"POST /projects/{project_id}/columns\"],\n createForAuthenticatedUser: [\"POST /user/projects\"],\n createForOrg: [\"POST /orgs/{org}/projects\"],\n createForRepo: [\"POST /repos/{owner}/{repo}/projects\"],\n delete: [\"DELETE /projects/{project_id}\"],\n deleteCard: [\"DELETE /projects/columns/cards/{card_id}\"],\n deleteColumn: [\"DELETE /projects/columns/{column_id}\"],\n get: [\"GET /projects/{project_id}\"],\n getCard: [\"GET /projects/columns/cards/{card_id}\"],\n getColumn: [\"GET /projects/columns/{column_id}\"],\n getPermissionForUser: [\n \"GET /projects/{project_id}/collaborators/{username}/permission\"\n ],\n listCards: [\"GET /projects/columns/{column_id}/cards\"],\n listCollaborators: [\"GET /projects/{project_id}/collaborators\"],\n listColumns: [\"GET /projects/{project_id}/columns\"],\n listForOrg: [\"GET /orgs/{org}/projects\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/projects\"],\n listForUser: [\"GET /users/{username}/projects\"],\n moveCard: [\"POST /projects/columns/cards/{card_id}/moves\"],\n moveColumn: [\"POST /projects/columns/{column_id}/moves\"],\n removeCollaborator: [\n \"DELETE /projects/{project_id}/collaborators/{username}\"\n ],\n update: [\"PATCH /projects/{project_id}\"],\n updateCard: [\"PATCH /projects/columns/cards/{card_id}\"],\n updateColumn: [\"PATCH /projects/columns/{column_id}\"]\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\"\n ],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\"\n ],\n deletePendingReview: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n deleteReviewComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\"\n ],\n dismissReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\"\n ],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\"\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n listReviewComments: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\"\n ],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n requestReviewers: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n submitReview: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\"\n ],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\"\n ],\n updateReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n updateReviewComment: [\n \"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\"\n ]\n },\n rateLimit: { get: [\"GET /rate_limit\"] },\n reactions: {\n createForCommitComment: [\n \"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\"\n ],\n createForIssue: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\"\n ],\n createForIssueComment: [\n \"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\n ],\n createForPullRequestReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"\n ],\n createForRelease: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/reactions\"\n ],\n createForTeamDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"\n ],\n createForTeamDiscussionInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"\n ],\n deleteForCommitComment: [\n \"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForIssue: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\"\n ],\n deleteForIssueComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForPullRequestComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForRelease: [\n \"DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}\"\n ],\n deleteForTeamDiscussion: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\"\n ],\n deleteForTeamDiscussionComment: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\"\n ],\n listForCommitComment: [\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\"\n ],\n listForIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n listForIssueComment: [\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\n ],\n listForPullRequestReviewComment: [\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"\n ],\n listForRelease: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\"\n ],\n listForTeamDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"\n ],\n listForTeamDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"\n ]\n },\n repos: {\n acceptInvitation: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"acceptInvitationForAuthenticatedUser\"] }\n ],\n acceptInvitationForAuthenticatedUser: [\n \"PATCH /user/repository_invitations/{invitation_id}\"\n ],\n addAppAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n addTeamAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n addUserAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n cancelPagesDeployment: [\n \"POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel\"\n ],\n checkAutomatedSecurityFixes: [\n \"GET /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkVulnerabilityAlerts: [\n \"GET /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n codeownersErrors: [\"GET /repos/{owner}/{repo}/codeowners/errors\"],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n compareCommitsWithBasehead: [\n \"GET /repos/{owner}/{repo}/compare/{basehead}\"\n ],\n createAutolink: [\"POST /repos/{owner}/{repo}/autolinks\"],\n createCommitComment: [\n \"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\"\n ],\n createCommitSignatureProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentBranchPolicy: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\"\n ],\n createDeploymentProtectionRule: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\"\n ],\n createDeploymentStatus: [\n \"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"\n ],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateCustomPropertiesValues: [\n \"PATCH /repos/{owner}/{repo}/properties/values\"\n ],\n createOrUpdateEnvironment: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createOrgRuleset: [\"POST /orgs/{org}/rulesets\"],\n createPagesDeployment: [\"POST /repos/{owner}/{repo}/pages/deployments\"],\n createPagesSite: [\"POST /repos/{owner}/{repo}/pages\"],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createRepoRuleset: [\"POST /repos/{owner}/{repo}/rulesets\"],\n createTagProtection: [\"POST /repos/{owner}/{repo}/tags/protection\"],\n createUsingTemplate: [\n \"POST /repos/{template_owner}/{template_repo}/generate\"\n ],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"declineInvitationForAuthenticatedUser\"] }\n ],\n declineInvitationForAuthenticatedUser: [\n \"DELETE /user/repository_invitations/{invitation_id}\"\n ],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"\n ],\n deleteAdminBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n deleteAnEnvironment: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n deleteAutolink: [\"DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n deleteBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\n \"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\"\n ],\n deleteDeploymentBranchPolicy: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\n \"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\"\n ],\n deleteOrgRuleset: [\"DELETE /orgs/{org}/rulesets/{ruleset_id}\"],\n deletePagesSite: [\"DELETE /repos/{owner}/{repo}/pages\"],\n deletePullRequestReviewProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\n \"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\"\n ],\n deleteRepoRuleset: [\"DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n deleteTagProtection: [\n \"DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}\"\n ],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\n \"DELETE /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n disableDeploymentProtectionRule: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\"\n ],\n disablePrivateVulnerabilityReporting: [\n \"DELETE /repos/{owner}/{repo}/private-vulnerability-reporting\"\n ],\n disableVulnerabilityAlerts: [\n \"DELETE /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n downloadArchive: [\n \"GET /repos/{owner}/{repo}/zipball/{ref}\",\n {},\n { renamed: [\"repos\", \"downloadZipballArchive\"] }\n ],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\n \"PUT /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n enablePrivateVulnerabilityReporting: [\n \"PUT /repos/{owner}/{repo}/private-vulnerability-reporting\"\n ],\n enableVulnerabilityAlerts: [\n \"PUT /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n generateReleaseNotes: [\n \"POST /repos/{owner}/{repo}/releases/generate-notes\"\n ],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"\n ],\n getAdminBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n getAllDeploymentProtectionRules: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\"\n ],\n getAllEnvironments: [\"GET /repos/{owner}/{repo}/environments\"],\n getAllStatusCheckContexts: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\"\n ],\n getAllTopics: [\"GET /repos/{owner}/{repo}/topics\"],\n getAppsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\"\n ],\n getAutolink: [\"GET /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n getBranchRules: [\"GET /repos/{owner}/{repo}/rules/branches/{branch}\"],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\n \"GET /repos/{owner}/{repo}/collaborators/{username}/permission\"\n ],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getCustomDeploymentProtectionRule: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\"\n ],\n getCustomPropertiesValues: [\"GET /repos/{owner}/{repo}/properties/values\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentBranchPolicy: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n getDeploymentStatus: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\"\n ],\n getEnvironment: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getOrgRuleSuite: [\"GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}\"],\n getOrgRuleSuites: [\"GET /orgs/{org}/rulesets/rule-suites\"],\n getOrgRuleset: [\"GET /orgs/{org}/rulesets/{ruleset_id}\"],\n getOrgRulesets: [\"GET /orgs/{org}/rulesets\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getPagesDeployment: [\n \"GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}\"\n ],\n getPagesHealthCheck: [\"GET /repos/{owner}/{repo}/pages/health\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getReadmeInDirectory: [\"GET /repos/{owner}/{repo}/readme/{dir}\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getRepoRuleSuite: [\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}\"\n ],\n getRepoRuleSuites: [\"GET /repos/{owner}/{repo}/rulesets/rule-suites\"],\n getRepoRuleset: [\"GET /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n getRepoRulesets: [\"GET /repos/{owner}/{repo}/rulesets\"],\n getStatusChecksProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n getTeamsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\"\n ],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\"\n ],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\"\n ],\n getWebhookDelivery: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}\"\n ],\n listActivities: [\"GET /repos/{owner}/{repo}/activity\"],\n listAutolinks: [\"GET /repos/{owner}/{repo}/autolinks\"],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\"\n ],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\"\n ],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\"\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listCustomDeploymentRuleIntegrations: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\"\n ],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentBranchPolicies: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\"\n ],\n listDeploymentStatuses: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"\n ],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\"\n ],\n listReleaseAssets: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\"\n ],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTagProtection: [\"GET /repos/{owner}/{repo}/tags/protection\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhookDeliveries: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\"\n ],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n mergeUpstream: [\"POST /repos/{owner}/{repo}/merge-upstream\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"\n ],\n removeAppAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n removeCollaborator: [\n \"DELETE /repos/{owner}/{repo}/collaborators/{username}\"\n ],\n removeStatusCheckContexts: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n removeStatusCheckProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n removeTeamAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n removeUserAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\"PUT /repos/{owner}/{repo}/topics\"],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n setAppAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n setStatusCheckContexts: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n setTeamAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n setUserAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateDeploymentBranchPolicy: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\n \"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\"\n ],\n updateOrgRuleset: [\"PUT /orgs/{org}/rulesets/{ruleset_id}\"],\n updatePullRequestReviewProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\n \"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\"\n ],\n updateRepoRuleset: [\"PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n updateStatusCheckPotection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n {},\n { renamed: [\"repos\", \"updateStatusCheckProtection\"] }\n ],\n updateStatusCheckProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\n \"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\"\n ],\n uploadReleaseAsset: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\",\n { baseUrl: \"https://uploads.github.com\" }\n ]\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\"],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\"],\n users: [\"GET /search/users\"]\n },\n secretScanning: {\n getAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/secret-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n listLocationsForAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\"\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"\n ]\n },\n securityAdvisories: {\n createFork: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks\"\n ],\n createPrivateVulnerabilityReport: [\n \"POST /repos/{owner}/{repo}/security-advisories/reports\"\n ],\n createRepositoryAdvisory: [\n \"POST /repos/{owner}/{repo}/security-advisories\"\n ],\n createRepositoryAdvisoryCveRequest: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve\"\n ],\n getGlobalAdvisory: [\"GET /advisories/{ghsa_id}\"],\n getRepositoryAdvisory: [\n \"GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}\"\n ],\n listGlobalAdvisories: [\"GET /advisories\"],\n listOrgRepositoryAdvisories: [\"GET /orgs/{org}/security-advisories\"],\n listRepositoryAdvisories: [\"GET /repos/{owner}/{repo}/security-advisories\"],\n updateRepositoryAdvisory: [\n \"PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}\"\n ]\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n addOrUpdateProjectPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n addOrUpdateRepoPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n checkPermissionsForProjectInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n checkPermissionsForRepoInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"\n ],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n deleteDiscussionInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n getDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n getMembershipForUserInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"\n ],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/invitations\"\n ],\n listProjectsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects\"],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n removeProjectInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n removeRepoInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n updateDiscussionCommentInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n updateDiscussionInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"]\n },\n users: {\n addEmailForAuthenticated: [\n \"POST /user/emails\",\n {},\n { renamed: [\"users\", \"addEmailForAuthenticatedUser\"] }\n ],\n addEmailForAuthenticatedUser: [\"POST /user/emails\"],\n addSocialAccountForAuthenticatedUser: [\"POST /user/social_accounts\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\n \"POST /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"createGpgKeyForAuthenticatedUser\"] }\n ],\n createGpgKeyForAuthenticatedUser: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\n \"POST /user/keys\",\n {},\n { renamed: [\"users\", \"createPublicSshKeyForAuthenticatedUser\"] }\n ],\n createPublicSshKeyForAuthenticatedUser: [\"POST /user/keys\"],\n createSshSigningKeyForAuthenticatedUser: [\"POST /user/ssh_signing_keys\"],\n deleteEmailForAuthenticated: [\n \"DELETE /user/emails\",\n {},\n { renamed: [\"users\", \"deleteEmailForAuthenticatedUser\"] }\n ],\n deleteEmailForAuthenticatedUser: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\n \"DELETE /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"deleteGpgKeyForAuthenticatedUser\"] }\n ],\n deleteGpgKeyForAuthenticatedUser: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\n \"DELETE /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"deletePublicSshKeyForAuthenticatedUser\"] }\n ],\n deletePublicSshKeyForAuthenticatedUser: [\"DELETE /user/keys/{key_id}\"],\n deleteSocialAccountForAuthenticatedUser: [\"DELETE /user/social_accounts\"],\n deleteSshSigningKeyForAuthenticatedUser: [\n \"DELETE /user/ssh_signing_keys/{ssh_signing_key_id}\"\n ],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\n \"GET /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"getGpgKeyForAuthenticatedUser\"] }\n ],\n getGpgKeyForAuthenticatedUser: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\n \"GET /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"getPublicSshKeyForAuthenticatedUser\"] }\n ],\n getPublicSshKeyForAuthenticatedUser: [\"GET /user/keys/{key_id}\"],\n getSshSigningKeyForAuthenticatedUser: [\n \"GET /user/ssh_signing_keys/{ssh_signing_key_id}\"\n ],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\n \"GET /user/blocks\",\n {},\n { renamed: [\"users\", \"listBlockedByAuthenticatedUser\"] }\n ],\n listBlockedByAuthenticatedUser: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\n \"GET /user/emails\",\n {},\n { renamed: [\"users\", \"listEmailsForAuthenticatedUser\"] }\n ],\n listEmailsForAuthenticatedUser: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\n \"GET /user/following\",\n {},\n { renamed: [\"users\", \"listFollowedByAuthenticatedUser\"] }\n ],\n listFollowedByAuthenticatedUser: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\n \"GET /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"listGpgKeysForAuthenticatedUser\"] }\n ],\n listGpgKeysForAuthenticatedUser: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\n \"GET /user/public_emails\",\n {},\n { renamed: [\"users\", \"listPublicEmailsForAuthenticatedUser\"] }\n ],\n listPublicEmailsForAuthenticatedUser: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\n \"GET /user/keys\",\n {},\n { renamed: [\"users\", \"listPublicSshKeysForAuthenticatedUser\"] }\n ],\n listPublicSshKeysForAuthenticatedUser: [\"GET /user/keys\"],\n listSocialAccountsForAuthenticatedUser: [\"GET /user/social_accounts\"],\n listSocialAccountsForUser: [\"GET /users/{username}/social_accounts\"],\n listSshSigningKeysForAuthenticatedUser: [\"GET /user/ssh_signing_keys\"],\n listSshSigningKeysForUser: [\"GET /users/{username}/ssh_signing_keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\n \"PATCH /user/email/visibility\",\n {},\n { renamed: [\"users\", \"setPrimaryEmailVisibilityForAuthenticatedUser\"] }\n ],\n setPrimaryEmailVisibilityForAuthenticatedUser: [\n \"PATCH /user/email/visibility\"\n ],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"]\n }\n};\nvar endpoints_default = Endpoints;\n\n// pkg/dist-src/endpoints-to-methods.js\nvar endpointMethodsMap = /* @__PURE__ */ new Map();\nfor (const [scope, endpoints] of Object.entries(endpoints_default)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign(\n {\n method,\n url\n },\n defaults\n );\n if (!endpointMethodsMap.has(scope)) {\n endpointMethodsMap.set(scope, /* @__PURE__ */ new Map());\n }\n endpointMethodsMap.get(scope).set(methodName, {\n scope,\n methodName,\n endpointDefaults,\n decorations\n });\n }\n}\nvar handler = {\n has({ scope }, methodName) {\n return endpointMethodsMap.get(scope).has(methodName);\n },\n getOwnPropertyDescriptor(target, methodName) {\n return {\n value: this.get(target, methodName),\n // ensures method is in the cache\n configurable: true,\n writable: true,\n enumerable: true\n };\n },\n defineProperty(target, methodName, descriptor) {\n Object.defineProperty(target.cache, methodName, descriptor);\n return true;\n },\n deleteProperty(target, methodName) {\n delete target.cache[methodName];\n return true;\n },\n ownKeys({ scope }) {\n return [...endpointMethodsMap.get(scope).keys()];\n },\n set(target, methodName, value) {\n return target.cache[methodName] = value;\n },\n get({ octokit, scope, cache }, methodName) {\n if (cache[methodName]) {\n return cache[methodName];\n }\n const method = endpointMethodsMap.get(scope).get(methodName);\n if (!method) {\n return void 0;\n }\n const { endpointDefaults, decorations } = method;\n if (decorations) {\n cache[methodName] = decorate(\n octokit,\n scope,\n methodName,\n endpointDefaults,\n decorations\n );\n } else {\n cache[methodName] = octokit.request.defaults(endpointDefaults);\n }\n return cache[methodName];\n }\n};\nfunction endpointsToMethods(octokit) {\n const newMethods = {};\n for (const scope of endpointMethodsMap.keys()) {\n newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler);\n }\n return newMethods;\n}\nfunction decorate(octokit, scope, methodName, defaults, decorations) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n function withDecorations(...args) {\n let options = requestWithDefaults.endpoint.merge(...args);\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: void 0\n });\n return requestWithDefaults(options);\n }\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(\n `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`\n );\n }\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n if (decorations.renamedParameters) {\n const options2 = requestWithDefaults.endpoint.merge(...args);\n for (const [name, alias] of Object.entries(\n decorations.renamedParameters\n )) {\n if (name in options2) {\n octokit.log.warn(\n `\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`\n );\n if (!(alias in options2)) {\n options2[alias] = options2[name];\n }\n delete options2[name];\n }\n }\n return requestWithDefaults(options2);\n }\n return requestWithDefaults(...args);\n }\n return Object.assign(withDecorations, requestWithDefaults);\n}\n\n// pkg/dist-src/index.js\nfunction restEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit);\n return {\n rest: api\n };\n}\nrestEndpointMethods.VERSION = VERSION;\nfunction legacyRestEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit);\n return {\n ...api,\n rest: api\n };\n}\nlegacyRestEndpointMethods.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n legacyRestEndpointMethods,\n restEndpointMethods\n});\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n RequestError: () => RequestError\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_deprecation = require(\"deprecation\");\nvar import_once = __toESM(require(\"once\"));\nvar logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation));\nvar logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation));\nvar RequestError = class extends Error {\n constructor(message, statusCode, options) {\n super(message);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(\n /(? {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n request: () => request\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_endpoint = require(\"@octokit/endpoint\");\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"8.4.1\";\n\n// pkg/dist-src/is-plain-object.js\nfunction isPlainObject(value) {\n if (typeof value !== \"object\" || value === null)\n return false;\n if (Object.prototype.toString.call(value) !== \"[object Object]\")\n return false;\n const proto = Object.getPrototypeOf(value);\n if (proto === null)\n return true;\n const Ctor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);\n}\n\n// pkg/dist-src/fetch-wrapper.js\nvar import_request_error = require(\"@octokit/request-error\");\n\n// pkg/dist-src/get-buffer-response.js\nfunction getBufferResponse(response) {\n return response.arrayBuffer();\n}\n\n// pkg/dist-src/fetch-wrapper.js\nfunction fetchWrapper(requestOptions) {\n var _a, _b, _c, _d;\n const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;\n const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;\n if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n let { fetch } = globalThis;\n if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) {\n fetch = requestOptions.request.fetch;\n }\n if (!fetch) {\n throw new Error(\n \"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\"\n );\n }\n return fetch(requestOptions.url, {\n method: requestOptions.method,\n body: requestOptions.body,\n redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect,\n headers: requestOptions.headers,\n signal: (_d = requestOptions.request) == null ? void 0 : _d.signal,\n // duplex must be set if request.body is ReadableStream or Async Iterables.\n // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.\n ...requestOptions.body && { duplex: \"half\" }\n }).then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^<>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(\n `[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`\n );\n }\n if (status === 204 || status === 205) {\n return;\n }\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new import_request_error.RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: void 0\n },\n request: requestOptions\n });\n }\n if (status === 304) {\n throw new import_request_error.RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response)\n },\n request: requestOptions\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new import_request_error.RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data\n },\n request: requestOptions\n });\n throw error;\n }\n return parseSuccessResponseBody ? await getResponseData(response) : response.body;\n }).then((data) => {\n return {\n status,\n url,\n headers,\n data\n };\n }).catch((error) => {\n if (error instanceof import_request_error.RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n let message = error.message;\n if (error.name === \"TypeError\" && \"cause\" in error) {\n if (error.cause instanceof Error) {\n message = error.cause.message;\n } else if (typeof error.cause === \"string\") {\n message = error.cause;\n }\n }\n throw new import_request_error.RequestError(message, 500, {\n request: requestOptions\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json().catch(() => response.text()).catch(() => \"\");\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBufferResponse(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n let suffix;\n if (\"documentation_url\" in data) {\n suffix = ` - ${data.documentation_url}`;\n } else {\n suffix = \"\";\n }\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}${suffix}`;\n }\n return `${data.message}${suffix}`;\n }\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(oldEndpoint, newDefaults) {\n const endpoint2 = oldEndpoint.defaults(newDefaults);\n const newApi = function(route, parameters) {\n const endpointOptions = endpoint2.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint2.parse(endpointOptions));\n }\n const request2 = (route2, parameters2) => {\n return fetchWrapper(\n endpoint2.parse(endpoint2.merge(route2, parameters2))\n );\n };\n Object.assign(request2, {\n endpoint: endpoint2,\n defaults: withDefaults.bind(null, endpoint2)\n });\n return endpointOptions.request.hook(request2, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint: endpoint2,\n defaults: withDefaults.bind(null, endpoint2)\n });\n}\n\n// pkg/dist-src/index.js\nvar request = withDefaults(import_endpoint.endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`\n }\n});\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n request\n});\n","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContextAPI = void 0;\nconst NoopContextManager_1 = require(\"../context/NoopContextManager\");\nconst global_utils_1 = require(\"../internal/global-utils\");\nconst diag_1 = require(\"./diag\");\nconst API_NAME = 'context';\nconst NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager();\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Context API\n */\nclass ContextAPI {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n constructor() { }\n /** Get the singleton instance of the Context API */\n static getInstance() {\n if (!this._instance) {\n this._instance = new ContextAPI();\n }\n return this._instance;\n }\n /**\n * Set the current context manager.\n *\n * @returns true if the context manager was successfully registered, else false\n */\n setGlobalContextManager(contextManager) {\n return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());\n }\n /**\n * Get the currently active context\n */\n active() {\n return this._getContextManager().active();\n }\n /**\n * Execute a function with an active context\n *\n * @param context context to be active during function execution\n * @param fn function to execute in a context\n * @param thisArg optional receiver to be used for calling fn\n * @param args optional arguments forwarded to fn\n */\n with(context, fn, thisArg, ...args) {\n return this._getContextManager().with(context, fn, thisArg, ...args);\n }\n /**\n * Bind a context to a target function or event emitter\n *\n * @param context context to bind to the event emitter or function. Defaults to the currently active context\n * @param target function or event emitter to bind\n */\n bind(context, target) {\n return this._getContextManager().bind(context, target);\n }\n _getContextManager() {\n return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;\n }\n /** Disable and remove the global context manager */\n disable() {\n this._getContextManager().disable();\n (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());\n }\n}\nexports.ContextAPI = ContextAPI;\n//# sourceMappingURL=context.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagAPI = void 0;\nconst ComponentLogger_1 = require(\"../diag/ComponentLogger\");\nconst logLevelLogger_1 = require(\"../diag/internal/logLevelLogger\");\nconst types_1 = require(\"../diag/types\");\nconst global_utils_1 = require(\"../internal/global-utils\");\nconst API_NAME = 'diag';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry internal\n * diagnostic API\n */\nclass DiagAPI {\n /**\n * Private internal constructor\n * @private\n */\n constructor() {\n function _logProxy(funcName) {\n return function (...args) {\n const logger = (0, global_utils_1.getGlobal)('diag');\n // shortcut if logger not set\n if (!logger)\n return;\n return logger[funcName](...args);\n };\n }\n // Using self local variable for minification purposes as 'this' cannot be minified\n const self = this;\n // DiagAPI specific functions\n const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {\n var _a, _b, _c;\n if (logger === self) {\n // There isn't much we can do here.\n // Logging to the console might break the user application.\n // Try to log to self. If a logger was previously registered it will receive the log.\n const err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation');\n self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);\n return false;\n }\n if (typeof optionsOrLogLevel === 'number') {\n optionsOrLogLevel = {\n logLevel: optionsOrLogLevel,\n };\n }\n const oldLogger = (0, global_utils_1.getGlobal)('diag');\n const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : types_1.DiagLogLevel.INFO, logger);\n // There already is an logger registered. We'll let it know before overwriting it.\n if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {\n const stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : '';\n oldLogger.warn(`Current logger will be overwritten from ${stack}`);\n newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);\n }\n return (0, global_utils_1.registerGlobal)('diag', newLogger, self, true);\n };\n self.setLogger = setLogger;\n self.disable = () => {\n (0, global_utils_1.unregisterGlobal)(API_NAME, self);\n };\n self.createComponentLogger = (options) => {\n return new ComponentLogger_1.DiagComponentLogger(options);\n };\n self.verbose = _logProxy('verbose');\n self.debug = _logProxy('debug');\n self.info = _logProxy('info');\n self.warn = _logProxy('warn');\n self.error = _logProxy('error');\n }\n /** Get the singleton instance of the DiagAPI API */\n static instance() {\n if (!this._instance) {\n this._instance = new DiagAPI();\n }\n return this._instance;\n }\n}\nexports.DiagAPI = DiagAPI;\n//# sourceMappingURL=diag.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MetricsAPI = void 0;\nconst NoopMeterProvider_1 = require(\"../metrics/NoopMeterProvider\");\nconst global_utils_1 = require(\"../internal/global-utils\");\nconst diag_1 = require(\"./diag\");\nconst API_NAME = 'metrics';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Metrics API\n */\nclass MetricsAPI {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n constructor() { }\n /** Get the singleton instance of the Metrics API */\n static getInstance() {\n if (!this._instance) {\n this._instance = new MetricsAPI();\n }\n return this._instance;\n }\n /**\n * Set the current global meter provider.\n * Returns true if the meter provider was successfully registered, else false.\n */\n setGlobalMeterProvider(provider) {\n return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());\n }\n /**\n * Returns the global meter provider.\n */\n getMeterProvider() {\n return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;\n }\n /**\n * Returns a meter from the global meter provider.\n */\n getMeter(name, version, options) {\n return this.getMeterProvider().getMeter(name, version, options);\n }\n /** Remove the global meter provider */\n disable() {\n (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());\n }\n}\nexports.MetricsAPI = MetricsAPI;\n//# sourceMappingURL=metrics.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PropagationAPI = void 0;\nconst global_utils_1 = require(\"../internal/global-utils\");\nconst NoopTextMapPropagator_1 = require(\"../propagation/NoopTextMapPropagator\");\nconst TextMapPropagator_1 = require(\"../propagation/TextMapPropagator\");\nconst context_helpers_1 = require(\"../baggage/context-helpers\");\nconst utils_1 = require(\"../baggage/utils\");\nconst diag_1 = require(\"./diag\");\nconst API_NAME = 'propagation';\nconst NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator();\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Propagation API\n */\nclass PropagationAPI {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n constructor() {\n this.createBaggage = utils_1.createBaggage;\n this.getBaggage = context_helpers_1.getBaggage;\n this.getActiveBaggage = context_helpers_1.getActiveBaggage;\n this.setBaggage = context_helpers_1.setBaggage;\n this.deleteBaggage = context_helpers_1.deleteBaggage;\n }\n /** Get the singleton instance of the Propagator API */\n static getInstance() {\n if (!this._instance) {\n this._instance = new PropagationAPI();\n }\n return this._instance;\n }\n /**\n * Set the current propagator.\n *\n * @returns true if the propagator was successfully registered, else false\n */\n setGlobalPropagator(propagator) {\n return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());\n }\n /**\n * Inject context into a carrier to be propagated inter-process\n *\n * @param context Context carrying tracing data to inject\n * @param carrier carrier to inject context into\n * @param setter Function used to set values on the carrier\n */\n inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {\n return this._getGlobalPropagator().inject(context, carrier, setter);\n }\n /**\n * Extract context from a carrier\n *\n * @param context Context which the newly created context will inherit from\n * @param carrier Carrier to extract context from\n * @param getter Function used to extract keys from a carrier\n */\n extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {\n return this._getGlobalPropagator().extract(context, carrier, getter);\n }\n /**\n * Return a list of all fields which may be used by the propagator.\n */\n fields() {\n return this._getGlobalPropagator().fields();\n }\n /** Remove the global propagator */\n disable() {\n (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());\n }\n _getGlobalPropagator() {\n return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;\n }\n}\nexports.PropagationAPI = PropagationAPI;\n//# sourceMappingURL=propagation.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceAPI = void 0;\nconst global_utils_1 = require(\"../internal/global-utils\");\nconst ProxyTracerProvider_1 = require(\"../trace/ProxyTracerProvider\");\nconst spancontext_utils_1 = require(\"../trace/spancontext-utils\");\nconst context_utils_1 = require(\"../trace/context-utils\");\nconst diag_1 = require(\"./diag\");\nconst API_NAME = 'trace';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Tracing API\n */\nclass TraceAPI {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n constructor() {\n this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider();\n this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;\n this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;\n this.deleteSpan = context_utils_1.deleteSpan;\n this.getSpan = context_utils_1.getSpan;\n this.getActiveSpan = context_utils_1.getActiveSpan;\n this.getSpanContext = context_utils_1.getSpanContext;\n this.setSpan = context_utils_1.setSpan;\n this.setSpanContext = context_utils_1.setSpanContext;\n }\n /** Get the singleton instance of the Trace API */\n static getInstance() {\n if (!this._instance) {\n this._instance = new TraceAPI();\n }\n return this._instance;\n }\n /**\n * Set the current global tracer.\n *\n * @returns true if the tracer provider was successfully registered, else false\n */\n setGlobalTracerProvider(provider) {\n const success = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());\n if (success) {\n this._proxyTracerProvider.setDelegate(provider);\n }\n return success;\n }\n /**\n * Returns the global tracer provider.\n */\n getTracerProvider() {\n return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;\n }\n /**\n * Returns a tracer from the global tracer provider.\n */\n getTracer(name, version) {\n return this.getTracerProvider().getTracer(name, version);\n }\n /** Remove the global tracer provider */\n disable() {\n (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());\n this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider();\n }\n}\nexports.TraceAPI = TraceAPI;\n//# sourceMappingURL=trace.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = void 0;\nconst context_1 = require(\"../api/context\");\nconst context_2 = require(\"../context/context\");\n/**\n * Baggage key\n */\nconst BAGGAGE_KEY = (0, context_2.createContextKey)('OpenTelemetry Baggage Key');\n/**\n * Retrieve the current baggage from the given context\n *\n * @param {Context} Context that manage all context values\n * @returns {Baggage} Extracted baggage from the context\n */\nfunction getBaggage(context) {\n return context.getValue(BAGGAGE_KEY) || undefined;\n}\nexports.getBaggage = getBaggage;\n/**\n * Retrieve the current baggage from the active/current context\n *\n * @returns {Baggage} Extracted baggage from the context\n */\nfunction getActiveBaggage() {\n return getBaggage(context_1.ContextAPI.getInstance().active());\n}\nexports.getActiveBaggage = getActiveBaggage;\n/**\n * Store a baggage in the given context\n *\n * @param {Context} Context that manage all context values\n * @param {Baggage} baggage that will be set in the actual context\n */\nfunction setBaggage(context, baggage) {\n return context.setValue(BAGGAGE_KEY, baggage);\n}\nexports.setBaggage = setBaggage;\n/**\n * Delete the baggage stored in the given context\n *\n * @param {Context} Context that manage all context values\n */\nfunction deleteBaggage(context) {\n return context.deleteValue(BAGGAGE_KEY);\n}\nexports.deleteBaggage = deleteBaggage;\n//# sourceMappingURL=context-helpers.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BaggageImpl = void 0;\nclass BaggageImpl {\n constructor(entries) {\n this._entries = entries ? new Map(entries) : new Map();\n }\n getEntry(key) {\n const entry = this._entries.get(key);\n if (!entry) {\n return undefined;\n }\n return Object.assign({}, entry);\n }\n getAllEntries() {\n return Array.from(this._entries.entries()).map(([k, v]) => [k, v]);\n }\n setEntry(key, entry) {\n const newBaggage = new BaggageImpl(this._entries);\n newBaggage._entries.set(key, entry);\n return newBaggage;\n }\n removeEntry(key) {\n const newBaggage = new BaggageImpl(this._entries);\n newBaggage._entries.delete(key);\n return newBaggage;\n }\n removeEntries(...keys) {\n const newBaggage = new BaggageImpl(this._entries);\n for (const key of keys) {\n newBaggage._entries.delete(key);\n }\n return newBaggage;\n }\n clear() {\n return new BaggageImpl();\n }\n}\nexports.BaggageImpl = BaggageImpl;\n//# sourceMappingURL=baggage-impl.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.baggageEntryMetadataSymbol = void 0;\n/**\n * Symbol used to make BaggageEntryMetadata an opaque type\n */\nexports.baggageEntryMetadataSymbol = Symbol('BaggageEntryMetadata');\n//# sourceMappingURL=symbol.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.baggageEntryMetadataFromString = exports.createBaggage = void 0;\nconst diag_1 = require(\"../api/diag\");\nconst baggage_impl_1 = require(\"./internal/baggage-impl\");\nconst symbol_1 = require(\"./internal/symbol\");\nconst diag = diag_1.DiagAPI.instance();\n/**\n * Create a new Baggage with optional entries\n *\n * @param entries An array of baggage entries the new baggage should contain\n */\nfunction createBaggage(entries = {}) {\n return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));\n}\nexports.createBaggage = createBaggage;\n/**\n * Create a serializable BaggageEntryMetadata object from a string.\n *\n * @param str string metadata. Format is currently not defined by the spec and has no special meaning.\n *\n */\nfunction baggageEntryMetadataFromString(str) {\n if (typeof str !== 'string') {\n diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);\n str = '';\n }\n return {\n __TYPE__: symbol_1.baggageEntryMetadataSymbol,\n toString() {\n return str;\n },\n };\n}\nexports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.context = void 0;\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst context_1 = require(\"./api/context\");\n/** Entrypoint for context API */\nexports.context = context_1.ContextAPI.getInstance();\n//# sourceMappingURL=context-api.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopContextManager = void 0;\nconst context_1 = require(\"./context\");\nclass NoopContextManager {\n active() {\n return context_1.ROOT_CONTEXT;\n }\n with(_context, fn, thisArg, ...args) {\n return fn.call(thisArg, ...args);\n }\n bind(_context, target) {\n return target;\n }\n enable() {\n return this;\n }\n disable() {\n return this;\n }\n}\nexports.NoopContextManager = NoopContextManager;\n//# sourceMappingURL=NoopContextManager.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ROOT_CONTEXT = exports.createContextKey = void 0;\n/** Get a key to uniquely identify a context value */\nfunction createContextKey(description) {\n // The specification states that for the same input, multiple calls should\n // return different keys. Due to the nature of the JS dependency management\n // system, this creates problems where multiple versions of some package\n // could hold different keys for the same property.\n //\n // Therefore, we use Symbol.for which returns the same key for the same input.\n return Symbol.for(description);\n}\nexports.createContextKey = createContextKey;\nclass BaseContext {\n /**\n * Construct a new context which inherits values from an optional parent context.\n *\n * @param parentContext a context from which to inherit values\n */\n constructor(parentContext) {\n // for minification\n const self = this;\n self._currentContext = parentContext ? new Map(parentContext) : new Map();\n self.getValue = (key) => self._currentContext.get(key);\n self.setValue = (key, value) => {\n const context = new BaseContext(self._currentContext);\n context._currentContext.set(key, value);\n return context;\n };\n self.deleteValue = (key) => {\n const context = new BaseContext(self._currentContext);\n context._currentContext.delete(key);\n return context;\n };\n }\n}\n/** The root context is used as the default parent context when there is no active context */\nexports.ROOT_CONTEXT = new BaseContext();\n//# sourceMappingURL=context.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.diag = void 0;\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst diag_1 = require(\"./api/diag\");\n/**\n * Entrypoint for Diag API.\n * Defines Diagnostic handler used for internal diagnostic logging operations.\n * The default provides a Noop DiagLogger implementation which may be changed via the\n * diag.setLogger(logger: DiagLogger) function.\n */\nexports.diag = diag_1.DiagAPI.instance();\n//# sourceMappingURL=diag-api.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagComponentLogger = void 0;\nconst global_utils_1 = require(\"../internal/global-utils\");\n/**\n * Component Logger which is meant to be used as part of any component which\n * will add automatically additional namespace in front of the log message.\n * It will then forward all message to global diag logger\n * @example\n * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });\n * cLogger.debug('test');\n * // @opentelemetry/instrumentation-http test\n */\nclass DiagComponentLogger {\n constructor(props) {\n this._namespace = props.namespace || 'DiagComponentLogger';\n }\n debug(...args) {\n return logProxy('debug', this._namespace, args);\n }\n error(...args) {\n return logProxy('error', this._namespace, args);\n }\n info(...args) {\n return logProxy('info', this._namespace, args);\n }\n warn(...args) {\n return logProxy('warn', this._namespace, args);\n }\n verbose(...args) {\n return logProxy('verbose', this._namespace, args);\n }\n}\nexports.DiagComponentLogger = DiagComponentLogger;\nfunction logProxy(funcName, namespace, args) {\n const logger = (0, global_utils_1.getGlobal)('diag');\n // shortcut if logger not set\n if (!logger) {\n return;\n }\n args.unshift(namespace);\n return logger[funcName](...args);\n}\n//# sourceMappingURL=ComponentLogger.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagConsoleLogger = void 0;\nconst consoleMap = [\n { n: 'error', c: 'error' },\n { n: 'warn', c: 'warn' },\n { n: 'info', c: 'info' },\n { n: 'debug', c: 'debug' },\n { n: 'verbose', c: 'trace' },\n];\n/**\n * A simple Immutable Console based diagnostic logger which will output any messages to the Console.\n * If you want to limit the amount of logging to a specific level or lower use the\n * {@link createLogLevelDiagLogger}\n */\nclass DiagConsoleLogger {\n constructor() {\n function _consoleFunc(funcName) {\n return function (...args) {\n if (console) {\n // Some environments only expose the console when the F12 developer console is open\n // eslint-disable-next-line no-console\n let theFunc = console[funcName];\n if (typeof theFunc !== 'function') {\n // Not all environments support all functions\n // eslint-disable-next-line no-console\n theFunc = console.log;\n }\n // One last final check\n if (typeof theFunc === 'function') {\n return theFunc.apply(console, args);\n }\n }\n };\n }\n for (let i = 0; i < consoleMap.length; i++) {\n this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);\n }\n }\n}\nexports.DiagConsoleLogger = DiagConsoleLogger;\n//# sourceMappingURL=consoleLogger.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createLogLevelDiagLogger = void 0;\nconst types_1 = require(\"../types\");\nfunction createLogLevelDiagLogger(maxLevel, logger) {\n if (maxLevel < types_1.DiagLogLevel.NONE) {\n maxLevel = types_1.DiagLogLevel.NONE;\n }\n else if (maxLevel > types_1.DiagLogLevel.ALL) {\n maxLevel = types_1.DiagLogLevel.ALL;\n }\n // In case the logger is null or undefined\n logger = logger || {};\n function _filterFunc(funcName, theLevel) {\n const theFunc = logger[funcName];\n if (typeof theFunc === 'function' && maxLevel >= theLevel) {\n return theFunc.bind(logger);\n }\n return function () { };\n }\n return {\n error: _filterFunc('error', types_1.DiagLogLevel.ERROR),\n warn: _filterFunc('warn', types_1.DiagLogLevel.WARN),\n info: _filterFunc('info', types_1.DiagLogLevel.INFO),\n debug: _filterFunc('debug', types_1.DiagLogLevel.DEBUG),\n verbose: _filterFunc('verbose', types_1.DiagLogLevel.VERBOSE),\n };\n}\nexports.createLogLevelDiagLogger = createLogLevelDiagLogger;\n//# sourceMappingURL=logLevelLogger.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagLogLevel = void 0;\n/**\n * Defines the available internal logging levels for the diagnostic logger, the numeric values\n * of the levels are defined to match the original values from the initial LogLevel to avoid\n * compatibility/migration issues for any implementation that assume the numeric ordering.\n */\nvar DiagLogLevel;\n(function (DiagLogLevel) {\n /** Diagnostic Logging level setting to disable all logging (except and forced logs) */\n DiagLogLevel[DiagLogLevel[\"NONE\"] = 0] = \"NONE\";\n /** Identifies an error scenario */\n DiagLogLevel[DiagLogLevel[\"ERROR\"] = 30] = \"ERROR\";\n /** Identifies a warning scenario */\n DiagLogLevel[DiagLogLevel[\"WARN\"] = 50] = \"WARN\";\n /** General informational log message */\n DiagLogLevel[DiagLogLevel[\"INFO\"] = 60] = \"INFO\";\n /** General debug log message */\n DiagLogLevel[DiagLogLevel[\"DEBUG\"] = 70] = \"DEBUG\";\n /**\n * Detailed trace level logging should only be used for development, should only be set\n * in a development environment.\n */\n DiagLogLevel[DiagLogLevel[\"VERBOSE\"] = 80] = \"VERBOSE\";\n /** Used to set the logging level to include all logging */\n DiagLogLevel[DiagLogLevel[\"ALL\"] = 9999] = \"ALL\";\n})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.trace = exports.propagation = exports.metrics = exports.diag = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.TraceFlags = exports.SpanStatusCode = exports.SpanKind = exports.SamplingDecision = exports.ProxyTracerProvider = exports.ProxyTracer = exports.defaultTextMapSetter = exports.defaultTextMapGetter = exports.ValueType = exports.createNoopMeter = exports.DiagLogLevel = exports.DiagConsoleLogger = exports.ROOT_CONTEXT = exports.createContextKey = exports.baggageEntryMetadataFromString = void 0;\nvar utils_1 = require(\"./baggage/utils\");\nObject.defineProperty(exports, \"baggageEntryMetadataFromString\", { enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } });\n// Context APIs\nvar context_1 = require(\"./context/context\");\nObject.defineProperty(exports, \"createContextKey\", { enumerable: true, get: function () { return context_1.createContextKey; } });\nObject.defineProperty(exports, \"ROOT_CONTEXT\", { enumerable: true, get: function () { return context_1.ROOT_CONTEXT; } });\n// Diag APIs\nvar consoleLogger_1 = require(\"./diag/consoleLogger\");\nObject.defineProperty(exports, \"DiagConsoleLogger\", { enumerable: true, get: function () { return consoleLogger_1.DiagConsoleLogger; } });\nvar types_1 = require(\"./diag/types\");\nObject.defineProperty(exports, \"DiagLogLevel\", { enumerable: true, get: function () { return types_1.DiagLogLevel; } });\n// Metrics APIs\nvar NoopMeter_1 = require(\"./metrics/NoopMeter\");\nObject.defineProperty(exports, \"createNoopMeter\", { enumerable: true, get: function () { return NoopMeter_1.createNoopMeter; } });\nvar Metric_1 = require(\"./metrics/Metric\");\nObject.defineProperty(exports, \"ValueType\", { enumerable: true, get: function () { return Metric_1.ValueType; } });\n// Propagation APIs\nvar TextMapPropagator_1 = require(\"./propagation/TextMapPropagator\");\nObject.defineProperty(exports, \"defaultTextMapGetter\", { enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapGetter; } });\nObject.defineProperty(exports, \"defaultTextMapSetter\", { enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapSetter; } });\nvar ProxyTracer_1 = require(\"./trace/ProxyTracer\");\nObject.defineProperty(exports, \"ProxyTracer\", { enumerable: true, get: function () { return ProxyTracer_1.ProxyTracer; } });\nvar ProxyTracerProvider_1 = require(\"./trace/ProxyTracerProvider\");\nObject.defineProperty(exports, \"ProxyTracerProvider\", { enumerable: true, get: function () { return ProxyTracerProvider_1.ProxyTracerProvider; } });\nvar SamplingResult_1 = require(\"./trace/SamplingResult\");\nObject.defineProperty(exports, \"SamplingDecision\", { enumerable: true, get: function () { return SamplingResult_1.SamplingDecision; } });\nvar span_kind_1 = require(\"./trace/span_kind\");\nObject.defineProperty(exports, \"SpanKind\", { enumerable: true, get: function () { return span_kind_1.SpanKind; } });\nvar status_1 = require(\"./trace/status\");\nObject.defineProperty(exports, \"SpanStatusCode\", { enumerable: true, get: function () { return status_1.SpanStatusCode; } });\nvar trace_flags_1 = require(\"./trace/trace_flags\");\nObject.defineProperty(exports, \"TraceFlags\", { enumerable: true, get: function () { return trace_flags_1.TraceFlags; } });\nvar utils_2 = require(\"./trace/internal/utils\");\nObject.defineProperty(exports, \"createTraceState\", { enumerable: true, get: function () { return utils_2.createTraceState; } });\nvar spancontext_utils_1 = require(\"./trace/spancontext-utils\");\nObject.defineProperty(exports, \"isSpanContextValid\", { enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } });\nObject.defineProperty(exports, \"isValidTraceId\", { enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } });\nObject.defineProperty(exports, \"isValidSpanId\", { enumerable: true, get: function () { return spancontext_utils_1.isValidSpanId; } });\nvar invalid_span_constants_1 = require(\"./trace/invalid-span-constants\");\nObject.defineProperty(exports, \"INVALID_SPANID\", { enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPANID; } });\nObject.defineProperty(exports, \"INVALID_TRACEID\", { enumerable: true, get: function () { return invalid_span_constants_1.INVALID_TRACEID; } });\nObject.defineProperty(exports, \"INVALID_SPAN_CONTEXT\", { enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPAN_CONTEXT; } });\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst context_api_1 = require(\"./context-api\");\nObject.defineProperty(exports, \"context\", { enumerable: true, get: function () { return context_api_1.context; } });\nconst diag_api_1 = require(\"./diag-api\");\nObject.defineProperty(exports, \"diag\", { enumerable: true, get: function () { return diag_api_1.diag; } });\nconst metrics_api_1 = require(\"./metrics-api\");\nObject.defineProperty(exports, \"metrics\", { enumerable: true, get: function () { return metrics_api_1.metrics; } });\nconst propagation_api_1 = require(\"./propagation-api\");\nObject.defineProperty(exports, \"propagation\", { enumerable: true, get: function () { return propagation_api_1.propagation; } });\nconst trace_api_1 = require(\"./trace-api\");\nObject.defineProperty(exports, \"trace\", { enumerable: true, get: function () { return trace_api_1.trace; } });\n// Default export.\nexports.default = {\n context: context_api_1.context,\n diag: diag_api_1.diag,\n metrics: metrics_api_1.metrics,\n propagation: propagation_api_1.propagation,\n trace: trace_api_1.trace,\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = void 0;\nconst platform_1 = require(\"../platform\");\nconst version_1 = require(\"../version\");\nconst semver_1 = require(\"./semver\");\nconst major = version_1.VERSION.split('.')[0];\nconst GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);\nconst _global = platform_1._globalThis;\nfunction registerGlobal(type, instance, diag, allowOverride = false) {\n var _a;\n const api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {\n version: version_1.VERSION,\n });\n if (!allowOverride && api[type]) {\n // already registered an API of this type\n const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);\n diag.error(err.stack || err.message);\n return false;\n }\n if (api.version !== version_1.VERSION) {\n // All registered APIs must be of the same version exactly\n const err = new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${version_1.VERSION}`);\n diag.error(err.stack || err.message);\n return false;\n }\n api[type] = instance;\n diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);\n return true;\n}\nexports.registerGlobal = registerGlobal;\nfunction getGlobal(type) {\n var _a, _b;\n const globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;\n if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {\n return;\n }\n return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];\n}\nexports.getGlobal = getGlobal;\nfunction unregisterGlobal(type, diag) {\n diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);\n const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];\n if (api) {\n delete api[type];\n }\n}\nexports.unregisterGlobal = unregisterGlobal;\n//# sourceMappingURL=global-utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isCompatible = exports._makeCompatibilityCheck = void 0;\nconst version_1 = require(\"../version\");\nconst re = /^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;\n/**\n * Create a function to test an API version to see if it is compatible with the provided ownVersion.\n *\n * The returned function has the following semantics:\n * - Exact match is always compatible\n * - Major versions must match exactly\n * - 1.x package cannot use global 2.x package\n * - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param ownVersion version which should be checked against\n */\nfunction _makeCompatibilityCheck(ownVersion) {\n const acceptedVersions = new Set([ownVersion]);\n const rejectedVersions = new Set();\n const myVersionMatch = ownVersion.match(re);\n if (!myVersionMatch) {\n // we cannot guarantee compatibility so we always return noop\n return () => false;\n }\n const ownVersionParsed = {\n major: +myVersionMatch[1],\n minor: +myVersionMatch[2],\n patch: +myVersionMatch[3],\n prerelease: myVersionMatch[4],\n };\n // if ownVersion has a prerelease tag, versions must match exactly\n if (ownVersionParsed.prerelease != null) {\n return function isExactmatch(globalVersion) {\n return globalVersion === ownVersion;\n };\n }\n function _reject(v) {\n rejectedVersions.add(v);\n return false;\n }\n function _accept(v) {\n acceptedVersions.add(v);\n return true;\n }\n return function isCompatible(globalVersion) {\n if (acceptedVersions.has(globalVersion)) {\n return true;\n }\n if (rejectedVersions.has(globalVersion)) {\n return false;\n }\n const globalVersionMatch = globalVersion.match(re);\n if (!globalVersionMatch) {\n // cannot parse other version\n // we cannot guarantee compatibility so we always noop\n return _reject(globalVersion);\n }\n const globalVersionParsed = {\n major: +globalVersionMatch[1],\n minor: +globalVersionMatch[2],\n patch: +globalVersionMatch[3],\n prerelease: globalVersionMatch[4],\n };\n // if globalVersion has a prerelease tag, versions must match exactly\n if (globalVersionParsed.prerelease != null) {\n return _reject(globalVersion);\n }\n // major versions must match\n if (ownVersionParsed.major !== globalVersionParsed.major) {\n return _reject(globalVersion);\n }\n if (ownVersionParsed.major === 0) {\n if (ownVersionParsed.minor === globalVersionParsed.minor &&\n ownVersionParsed.patch <= globalVersionParsed.patch) {\n return _accept(globalVersion);\n }\n return _reject(globalVersion);\n }\n if (ownVersionParsed.minor <= globalVersionParsed.minor) {\n return _accept(globalVersion);\n }\n return _reject(globalVersion);\n };\n}\nexports._makeCompatibilityCheck = _makeCompatibilityCheck;\n/**\n * Test an API version to see if it is compatible with this API.\n *\n * - Exact match is always compatible\n * - Major versions must match exactly\n * - 1.x package cannot use global 2.x package\n * - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param version version of the API requesting an instance of the global API\n */\nexports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);\n//# sourceMappingURL=semver.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.metrics = void 0;\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst metrics_1 = require(\"./api/metrics\");\n/** Entrypoint for metrics API */\nexports.metrics = metrics_1.MetricsAPI.getInstance();\n//# sourceMappingURL=metrics-api.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValueType = void 0;\n/** The Type of value. It describes how the data is reported. */\nvar ValueType;\n(function (ValueType) {\n ValueType[ValueType[\"INT\"] = 0] = \"INT\";\n ValueType[ValueType[\"DOUBLE\"] = 1] = \"DOUBLE\";\n})(ValueType = exports.ValueType || (exports.ValueType = {}));\n//# sourceMappingURL=Metric.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_GAUGE_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopGaugeMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = void 0;\n/**\n * NoopMeter is a noop implementation of the {@link Meter} interface. It reuses\n * constant NoopMetrics for all of its methods.\n */\nclass NoopMeter {\n constructor() { }\n /**\n * @see {@link Meter.createGauge}\n */\n createGauge(_name, _options) {\n return exports.NOOP_GAUGE_METRIC;\n }\n /**\n * @see {@link Meter.createHistogram}\n */\n createHistogram(_name, _options) {\n return exports.NOOP_HISTOGRAM_METRIC;\n }\n /**\n * @see {@link Meter.createCounter}\n */\n createCounter(_name, _options) {\n return exports.NOOP_COUNTER_METRIC;\n }\n /**\n * @see {@link Meter.createUpDownCounter}\n */\n createUpDownCounter(_name, _options) {\n return exports.NOOP_UP_DOWN_COUNTER_METRIC;\n }\n /**\n * @see {@link Meter.createObservableGauge}\n */\n createObservableGauge(_name, _options) {\n return exports.NOOP_OBSERVABLE_GAUGE_METRIC;\n }\n /**\n * @see {@link Meter.createObservableCounter}\n */\n createObservableCounter(_name, _options) {\n return exports.NOOP_OBSERVABLE_COUNTER_METRIC;\n }\n /**\n * @see {@link Meter.createObservableUpDownCounter}\n */\n createObservableUpDownCounter(_name, _options) {\n return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;\n }\n /**\n * @see {@link Meter.addBatchObservableCallback}\n */\n addBatchObservableCallback(_callback, _observables) { }\n /**\n * @see {@link Meter.removeBatchObservableCallback}\n */\n removeBatchObservableCallback(_callback) { }\n}\nexports.NoopMeter = NoopMeter;\nclass NoopMetric {\n}\nexports.NoopMetric = NoopMetric;\nclass NoopCounterMetric extends NoopMetric {\n add(_value, _attributes) { }\n}\nexports.NoopCounterMetric = NoopCounterMetric;\nclass NoopUpDownCounterMetric extends NoopMetric {\n add(_value, _attributes) { }\n}\nexports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;\nclass NoopGaugeMetric extends NoopMetric {\n record(_value, _attributes) { }\n}\nexports.NoopGaugeMetric = NoopGaugeMetric;\nclass NoopHistogramMetric extends NoopMetric {\n record(_value, _attributes) { }\n}\nexports.NoopHistogramMetric = NoopHistogramMetric;\nclass NoopObservableMetric {\n addCallback(_callback) { }\n removeCallback(_callback) { }\n}\nexports.NoopObservableMetric = NoopObservableMetric;\nclass NoopObservableCounterMetric extends NoopObservableMetric {\n}\nexports.NoopObservableCounterMetric = NoopObservableCounterMetric;\nclass NoopObservableGaugeMetric extends NoopObservableMetric {\n}\nexports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;\nclass NoopObservableUpDownCounterMetric extends NoopObservableMetric {\n}\nexports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;\nexports.NOOP_METER = new NoopMeter();\n// Synchronous instruments\nexports.NOOP_COUNTER_METRIC = new NoopCounterMetric();\nexports.NOOP_GAUGE_METRIC = new NoopGaugeMetric();\nexports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric();\nexports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric();\n// Asynchronous instruments\nexports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric();\nexports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric();\nexports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric();\n/**\n * Create a no-op Meter\n */\nfunction createNoopMeter() {\n return exports.NOOP_METER;\n}\nexports.createNoopMeter = createNoopMeter;\n//# sourceMappingURL=NoopMeter.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = void 0;\nconst NoopMeter_1 = require(\"./NoopMeter\");\n/**\n * An implementation of the {@link MeterProvider} which returns an impotent Meter\n * for all calls to `getMeter`\n */\nclass NoopMeterProvider {\n getMeter(_name, _version, _options) {\n return NoopMeter_1.NOOP_METER;\n }\n}\nexports.NoopMeterProvider = NoopMeterProvider;\nexports.NOOP_METER_PROVIDER = new NoopMeterProvider();\n//# sourceMappingURL=NoopMeterProvider.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./node\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._globalThis = void 0;\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexports._globalThis = typeof globalThis === 'object' ? globalThis : global;\n//# sourceMappingURL=globalThis.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./globalThis\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.propagation = void 0;\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst propagation_1 = require(\"./api/propagation\");\n/** Entrypoint for propagation API */\nexports.propagation = propagation_1.PropagationAPI.getInstance();\n//# sourceMappingURL=propagation-api.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopTextMapPropagator = void 0;\n/**\n * No-op implementations of {@link TextMapPropagator}.\n */\nclass NoopTextMapPropagator {\n /** Noop inject function does nothing */\n inject(_context, _carrier) { }\n /** Noop extract function does nothing and returns the input context */\n extract(context, _carrier) {\n return context;\n }\n fields() {\n return [];\n }\n}\nexports.NoopTextMapPropagator = NoopTextMapPropagator;\n//# sourceMappingURL=NoopTextMapPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultTextMapSetter = exports.defaultTextMapGetter = void 0;\nexports.defaultTextMapGetter = {\n get(carrier, key) {\n if (carrier == null) {\n return undefined;\n }\n return carrier[key];\n },\n keys(carrier) {\n if (carrier == null) {\n return [];\n }\n return Object.keys(carrier);\n },\n};\nexports.defaultTextMapSetter = {\n set(carrier, key, value) {\n if (carrier == null) {\n return;\n }\n carrier[key] = value;\n },\n};\n//# sourceMappingURL=TextMapPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.trace = void 0;\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst trace_1 = require(\"./api/trace\");\n/** Entrypoint for trace API */\nexports.trace = trace_1.TraceAPI.getInstance();\n//# sourceMappingURL=trace-api.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NonRecordingSpan = void 0;\nconst invalid_span_constants_1 = require(\"./invalid-span-constants\");\n/**\n * The NonRecordingSpan is the default {@link Span} that is used when no Span\n * implementation is available. All operations are no-op including context\n * propagation.\n */\nclass NonRecordingSpan {\n constructor(_spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {\n this._spanContext = _spanContext;\n }\n // Returns a SpanContext.\n spanContext() {\n return this._spanContext;\n }\n // By default does nothing\n setAttribute(_key, _value) {\n return this;\n }\n // By default does nothing\n setAttributes(_attributes) {\n return this;\n }\n // By default does nothing\n addEvent(_name, _attributes) {\n return this;\n }\n addLink(_link) {\n return this;\n }\n addLinks(_links) {\n return this;\n }\n // By default does nothing\n setStatus(_status) {\n return this;\n }\n // By default does nothing\n updateName(_name) {\n return this;\n }\n // By default does nothing\n end(_endTime) { }\n // isRecording always returns false for NonRecordingSpan.\n isRecording() {\n return false;\n }\n // By default does nothing\n recordException(_exception, _time) { }\n}\nexports.NonRecordingSpan = NonRecordingSpan;\n//# sourceMappingURL=NonRecordingSpan.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopTracer = void 0;\nconst context_1 = require(\"../api/context\");\nconst context_utils_1 = require(\"../trace/context-utils\");\nconst NonRecordingSpan_1 = require(\"./NonRecordingSpan\");\nconst spancontext_utils_1 = require(\"./spancontext-utils\");\nconst contextApi = context_1.ContextAPI.getInstance();\n/**\n * No-op implementations of {@link Tracer}.\n */\nclass NoopTracer {\n // startSpan starts a noop span.\n startSpan(name, options, context = contextApi.active()) {\n const root = Boolean(options === null || options === void 0 ? void 0 : options.root);\n if (root) {\n return new NonRecordingSpan_1.NonRecordingSpan();\n }\n const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);\n if (isSpanContext(parentFromContext) &&\n (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {\n return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);\n }\n else {\n return new NonRecordingSpan_1.NonRecordingSpan();\n }\n }\n startActiveSpan(name, arg2, arg3, arg4) {\n let opts;\n let ctx;\n let fn;\n if (arguments.length < 2) {\n return;\n }\n else if (arguments.length === 2) {\n fn = arg2;\n }\n else if (arguments.length === 3) {\n opts = arg2;\n fn = arg3;\n }\n else {\n opts = arg2;\n ctx = arg3;\n fn = arg4;\n }\n const parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();\n const span = this.startSpan(name, opts, parentContext);\n const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);\n return contextApi.with(contextWithSpanSet, fn, undefined, span);\n }\n}\nexports.NoopTracer = NoopTracer;\nfunction isSpanContext(spanContext) {\n return (typeof spanContext === 'object' &&\n typeof spanContext['spanId'] === 'string' &&\n typeof spanContext['traceId'] === 'string' &&\n typeof spanContext['traceFlags'] === 'number');\n}\n//# sourceMappingURL=NoopTracer.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopTracerProvider = void 0;\nconst NoopTracer_1 = require(\"./NoopTracer\");\n/**\n * An implementation of the {@link TracerProvider} which returns an impotent\n * Tracer for all calls to `getTracer`.\n *\n * All operations are no-op.\n */\nclass NoopTracerProvider {\n getTracer(_name, _version, _options) {\n return new NoopTracer_1.NoopTracer();\n }\n}\nexports.NoopTracerProvider = NoopTracerProvider;\n//# sourceMappingURL=NoopTracerProvider.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProxyTracer = void 0;\nconst NoopTracer_1 = require(\"./NoopTracer\");\nconst NOOP_TRACER = new NoopTracer_1.NoopTracer();\n/**\n * Proxy tracer provided by the proxy tracer provider\n */\nclass ProxyTracer {\n constructor(_provider, name, version, options) {\n this._provider = _provider;\n this.name = name;\n this.version = version;\n this.options = options;\n }\n startSpan(name, options, context) {\n return this._getTracer().startSpan(name, options, context);\n }\n startActiveSpan(_name, _options, _context, _fn) {\n const tracer = this._getTracer();\n return Reflect.apply(tracer.startActiveSpan, tracer, arguments);\n }\n /**\n * Try to get a tracer from the proxy tracer provider.\n * If the proxy tracer provider has no delegate, return a noop tracer.\n */\n _getTracer() {\n if (this._delegate) {\n return this._delegate;\n }\n const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);\n if (!tracer) {\n return NOOP_TRACER;\n }\n this._delegate = tracer;\n return this._delegate;\n }\n}\nexports.ProxyTracer = ProxyTracer;\n//# sourceMappingURL=ProxyTracer.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProxyTracerProvider = void 0;\nconst ProxyTracer_1 = require(\"./ProxyTracer\");\nconst NoopTracerProvider_1 = require(\"./NoopTracerProvider\");\nconst NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider();\n/**\n * Tracer provider which provides {@link ProxyTracer}s.\n *\n * Before a delegate is set, tracers provided are NoOp.\n * When a delegate is set, traces are provided from the delegate.\n * When a delegate is set after tracers have already been provided,\n * all tracers already provided will use the provided delegate implementation.\n */\nclass ProxyTracerProvider {\n /**\n * Get a {@link ProxyTracer}\n */\n getTracer(name, version, options) {\n var _a;\n return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options));\n }\n getDelegate() {\n var _a;\n return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;\n }\n /**\n * Set the delegate tracer provider\n */\n setDelegate(delegate) {\n this._delegate = delegate;\n }\n getDelegateTracer(name, version, options) {\n var _a;\n return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);\n }\n}\nexports.ProxyTracerProvider = ProxyTracerProvider;\n//# sourceMappingURL=ProxyTracerProvider.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SamplingDecision = void 0;\n/**\n * @deprecated use the one declared in @opentelemetry/sdk-trace-base instead.\n * A sampling decision that determines how a {@link Span} will be recorded\n * and collected.\n */\nvar SamplingDecision;\n(function (SamplingDecision) {\n /**\n * `Span.isRecording() === false`, span will not be recorded and all events\n * and attributes will be dropped.\n */\n SamplingDecision[SamplingDecision[\"NOT_RECORD\"] = 0] = \"NOT_RECORD\";\n /**\n * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}\n * MUST NOT be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD\"] = 1] = \"RECORD\";\n /**\n * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}\n * MUST be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD_AND_SAMPLED\"] = 2] = \"RECORD_AND_SAMPLED\";\n})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));\n//# sourceMappingURL=SamplingResult.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = void 0;\nconst context_1 = require(\"../context/context\");\nconst NonRecordingSpan_1 = require(\"./NonRecordingSpan\");\nconst context_2 = require(\"../api/context\");\n/**\n * span key\n */\nconst SPAN_KEY = (0, context_1.createContextKey)('OpenTelemetry Context Key SPAN');\n/**\n * Return the span if one exists\n *\n * @param context context to get span from\n */\nfunction getSpan(context) {\n return context.getValue(SPAN_KEY) || undefined;\n}\nexports.getSpan = getSpan;\n/**\n * Gets the span from the current context, if one exists.\n */\nfunction getActiveSpan() {\n return getSpan(context_2.ContextAPI.getInstance().active());\n}\nexports.getActiveSpan = getActiveSpan;\n/**\n * Set the span on a context\n *\n * @param context context to use as parent\n * @param span span to set active\n */\nfunction setSpan(context, span) {\n return context.setValue(SPAN_KEY, span);\n}\nexports.setSpan = setSpan;\n/**\n * Remove current span stored in the context\n *\n * @param context context to delete span from\n */\nfunction deleteSpan(context) {\n return context.deleteValue(SPAN_KEY);\n}\nexports.deleteSpan = deleteSpan;\n/**\n * Wrap span context in a NoopSpan and set as span in a new\n * context\n *\n * @param context context to set active span on\n * @param spanContext span context to be wrapped\n */\nfunction setSpanContext(context, spanContext) {\n return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));\n}\nexports.setSpanContext = setSpanContext;\n/**\n * Get the span context of the span if it exists.\n *\n * @param context context to get values from\n */\nfunction getSpanContext(context) {\n var _a;\n return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();\n}\nexports.getSpanContext = getSpanContext;\n//# sourceMappingURL=context-utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceStateImpl = void 0;\nconst tracestate_validators_1 = require(\"./tracestate-validators\");\nconst MAX_TRACE_STATE_ITEMS = 32;\nconst MAX_TRACE_STATE_LEN = 512;\nconst LIST_MEMBERS_SEPARATOR = ',';\nconst LIST_MEMBER_KEY_VALUE_SPLITTER = '=';\n/**\n * TraceState must be a class and not a simple object type because of the spec\n * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).\n *\n * Here is the list of allowed mutations:\n * - New key-value pair should be added into the beginning of the list\n * - The value of any key can be updated. Modified keys MUST be moved to the\n * beginning of the list.\n */\nclass TraceStateImpl {\n constructor(rawTraceState) {\n this._internalState = new Map();\n if (rawTraceState)\n this._parse(rawTraceState);\n }\n set(key, value) {\n // TODO: Benchmark the different approaches(map vs list) and\n // use the faster one.\n const traceState = this._clone();\n if (traceState._internalState.has(key)) {\n traceState._internalState.delete(key);\n }\n traceState._internalState.set(key, value);\n return traceState;\n }\n unset(key) {\n const traceState = this._clone();\n traceState._internalState.delete(key);\n return traceState;\n }\n get(key) {\n return this._internalState.get(key);\n }\n serialize() {\n return this._keys()\n .reduce((agg, key) => {\n agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));\n return agg;\n }, [])\n .join(LIST_MEMBERS_SEPARATOR);\n }\n _parse(rawTraceState) {\n if (rawTraceState.length > MAX_TRACE_STATE_LEN)\n return;\n this._internalState = rawTraceState\n .split(LIST_MEMBERS_SEPARATOR)\n .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning\n .reduce((agg, part) => {\n const listMember = part.trim(); // Optional Whitespace (OWS) handling\n const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);\n if (i !== -1) {\n const key = listMember.slice(0, i);\n const value = listMember.slice(i + 1, part.length);\n if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {\n agg.set(key, value);\n }\n else {\n // TODO: Consider to add warning log\n }\n }\n return agg;\n }, new Map());\n // Because of the reverse() requirement, trunc must be done after map is created\n if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {\n this._internalState = new Map(Array.from(this._internalState.entries())\n .reverse() // Use reverse same as original tracestate parse chain\n .slice(0, MAX_TRACE_STATE_ITEMS));\n }\n }\n _keys() {\n return Array.from(this._internalState.keys()).reverse();\n }\n _clone() {\n const traceState = new TraceStateImpl();\n traceState._internalState = new Map(this._internalState);\n return traceState;\n }\n}\nexports.TraceStateImpl = TraceStateImpl;\n//# sourceMappingURL=tracestate-impl.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateValue = exports.validateKey = void 0;\nconst VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';\nconst VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;\nconst VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;\nconst VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);\nconst VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;\nconst INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;\n/**\n * Key is opaque string up to 256 characters printable. It MUST begin with a\n * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,\n * underscores _, dashes -, asterisks *, and forward slashes /.\n * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the\n * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.\n * see https://www.w3.org/TR/trace-context/#key\n */\nfunction validateKey(key) {\n return VALID_KEY_REGEX.test(key);\n}\nexports.validateKey = validateKey;\n/**\n * Value is opaque string up to 256 characters printable ASCII RFC0020\n * characters (i.e., the range 0x20 to 0x7E) except comma , and =.\n */\nfunction validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}\nexports.validateValue = validateValue;\n//# sourceMappingURL=tracestate-validators.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createTraceState = void 0;\nconst tracestate_impl_1 = require(\"./tracestate-impl\");\nfunction createTraceState(rawTraceState) {\n return new tracestate_impl_1.TraceStateImpl(rawTraceState);\n}\nexports.createTraceState = createTraceState;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = void 0;\nconst trace_flags_1 = require(\"./trace_flags\");\nexports.INVALID_SPANID = '0000000000000000';\nexports.INVALID_TRACEID = '00000000000000000000000000000000';\nexports.INVALID_SPAN_CONTEXT = {\n traceId: exports.INVALID_TRACEID,\n spanId: exports.INVALID_SPANID,\n traceFlags: trace_flags_1.TraceFlags.NONE,\n};\n//# sourceMappingURL=invalid-span-constants.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SpanKind = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar SpanKind;\n(function (SpanKind) {\n /** Default value. Indicates that the span is used internally. */\n SpanKind[SpanKind[\"INTERNAL\"] = 0] = \"INTERNAL\";\n /**\n * Indicates that the span covers server-side handling of an RPC or other\n * remote request.\n */\n SpanKind[SpanKind[\"SERVER\"] = 1] = \"SERVER\";\n /**\n * Indicates that the span covers the client-side wrapper around an RPC or\n * other remote request.\n */\n SpanKind[SpanKind[\"CLIENT\"] = 2] = \"CLIENT\";\n /**\n * Indicates that the span describes producer sending a message to a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"PRODUCER\"] = 3] = \"PRODUCER\";\n /**\n * Indicates that the span describes consumer receiving a message from a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"CONSUMER\"] = 4] = \"CONSUMER\";\n})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));\n//# sourceMappingURL=span_kind.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst invalid_span_constants_1 = require(\"./invalid-span-constants\");\nconst NonRecordingSpan_1 = require(\"./NonRecordingSpan\");\nconst VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;\nconst VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;\nfunction isValidTraceId(traceId) {\n return VALID_TRACEID_REGEX.test(traceId) && traceId !== invalid_span_constants_1.INVALID_TRACEID;\n}\nexports.isValidTraceId = isValidTraceId;\nfunction isValidSpanId(spanId) {\n return VALID_SPANID_REGEX.test(spanId) && spanId !== invalid_span_constants_1.INVALID_SPANID;\n}\nexports.isValidSpanId = isValidSpanId;\n/**\n * Returns true if this {@link SpanContext} is valid.\n * @return true if this {@link SpanContext} is valid.\n */\nfunction isSpanContextValid(spanContext) {\n return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId));\n}\nexports.isSpanContextValid = isSpanContextValid;\n/**\n * Wrap the given {@link SpanContext} in a new non-recording {@link Span}\n *\n * @param spanContext span context to be wrapped\n * @returns a new non-recording {@link Span} with the provided context\n */\nfunction wrapSpanContext(spanContext) {\n return new NonRecordingSpan_1.NonRecordingSpan(spanContext);\n}\nexports.wrapSpanContext = wrapSpanContext;\n//# sourceMappingURL=spancontext-utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SpanStatusCode = void 0;\n/**\n * An enumeration of status codes.\n */\nvar SpanStatusCode;\n(function (SpanStatusCode) {\n /**\n * The default status.\n */\n SpanStatusCode[SpanStatusCode[\"UNSET\"] = 0] = \"UNSET\";\n /**\n * The operation has been validated by an Application developer or\n * Operator to have completed successfully.\n */\n SpanStatusCode[SpanStatusCode[\"OK\"] = 1] = \"OK\";\n /**\n * The operation contains an error.\n */\n SpanStatusCode[SpanStatusCode[\"ERROR\"] = 2] = \"ERROR\";\n})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));\n//# sourceMappingURL=status.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceFlags = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar TraceFlags;\n(function (TraceFlags) {\n /** Represents no flag set. */\n TraceFlags[TraceFlags[\"NONE\"] = 0] = \"NONE\";\n /** Bit to represent whether trace is sampled in trace flags. */\n TraceFlags[TraceFlags[\"SAMPLED\"] = 1] = \"SAMPLED\";\n})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));\n//# sourceMappingURL=trace_flags.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VERSION = void 0;\n// this is autogenerated file, see scripts/version-update.js\nexports.VERSION = '1.9.0';\n//# sourceMappingURL=version.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AbstractAsyncHooksContextManager = void 0;\nconst events_1 = require(\"events\");\nconst ADD_LISTENER_METHODS = [\n 'addListener',\n 'on',\n 'once',\n 'prependListener',\n 'prependOnceListener',\n];\nclass AbstractAsyncHooksContextManager {\n constructor() {\n this._kOtListeners = Symbol('OtListeners');\n this._wrapped = false;\n }\n /**\n * Binds a the certain context or the active one to the target function and then returns the target\n * @param context A context (span) to be bind to target\n * @param target a function or event emitter. When target or one of its callbacks is called,\n * the provided context will be used as the active context for the duration of the call.\n */\n bind(context, target) {\n if (target instanceof events_1.EventEmitter) {\n return this._bindEventEmitter(context, target);\n }\n if (typeof target === 'function') {\n return this._bindFunction(context, target);\n }\n return target;\n }\n _bindFunction(context, target) {\n const manager = this;\n const contextWrapper = function (...args) {\n return manager.with(context, () => target.apply(this, args));\n };\n Object.defineProperty(contextWrapper, 'length', {\n enumerable: false,\n configurable: true,\n writable: false,\n value: target.length,\n });\n /**\n * It isn't possible to tell Typescript that contextWrapper is the same as T\n * so we forced to cast as any here.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return contextWrapper;\n }\n /**\n * By default, EventEmitter call their callback with their context, which we do\n * not want, instead we will bind a specific context to all callbacks that\n * go through it.\n * @param context the context we want to bind\n * @param ee EventEmitter an instance of EventEmitter to patch\n */\n _bindEventEmitter(context, ee) {\n const map = this._getPatchMap(ee);\n if (map !== undefined)\n return ee;\n this._createPatchMap(ee);\n // patch methods that add a listener to propagate context\n ADD_LISTENER_METHODS.forEach(methodName => {\n if (ee[methodName] === undefined)\n return;\n ee[methodName] = this._patchAddListener(ee, ee[methodName], context);\n });\n // patch methods that remove a listener\n if (typeof ee.removeListener === 'function') {\n ee.removeListener = this._patchRemoveListener(ee, ee.removeListener);\n }\n if (typeof ee.off === 'function') {\n ee.off = this._patchRemoveListener(ee, ee.off);\n }\n // patch method that remove all listeners\n if (typeof ee.removeAllListeners === 'function') {\n ee.removeAllListeners = this._patchRemoveAllListeners(ee, ee.removeAllListeners);\n }\n return ee;\n }\n /**\n * Patch methods that remove a given listener so that we match the \"patched\"\n * version of that listener (the one that propagate context).\n * @param ee EventEmitter instance\n * @param original reference to the patched method\n */\n _patchRemoveListener(ee, original) {\n const contextManager = this;\n return function (event, listener) {\n var _a;\n const events = (_a = contextManager._getPatchMap(ee)) === null || _a === void 0 ? void 0 : _a[event];\n if (events === undefined) {\n return original.call(this, event, listener);\n }\n const patchedListener = events.get(listener);\n return original.call(this, event, patchedListener || listener);\n };\n }\n /**\n * Patch methods that remove all listeners so we remove our\n * internal references for a given event.\n * @param ee EventEmitter instance\n * @param original reference to the patched method\n */\n _patchRemoveAllListeners(ee, original) {\n const contextManager = this;\n return function (event) {\n const map = contextManager._getPatchMap(ee);\n if (map !== undefined) {\n if (arguments.length === 0) {\n contextManager._createPatchMap(ee);\n }\n else if (map[event] !== undefined) {\n delete map[event];\n }\n }\n return original.apply(this, arguments);\n };\n }\n /**\n * Patch methods on an event emitter instance that can add listeners so we\n * can force them to propagate a given context.\n * @param ee EventEmitter instance\n * @param original reference to the patched method\n * @param [context] context to propagate when calling listeners\n */\n _patchAddListener(ee, original, context) {\n const contextManager = this;\n return function (event, listener) {\n /**\n * This check is required to prevent double-wrapping the listener.\n * The implementation for ee.once wraps the listener and calls ee.on.\n * Without this check, we would wrap that wrapped listener.\n * This causes an issue because ee.removeListener depends on the onceWrapper\n * to properly remove the listener. If we wrap their wrapper, we break\n * that detection.\n */\n if (contextManager._wrapped) {\n return original.call(this, event, listener);\n }\n let map = contextManager._getPatchMap(ee);\n if (map === undefined) {\n map = contextManager._createPatchMap(ee);\n }\n let listeners = map[event];\n if (listeners === undefined) {\n listeners = new WeakMap();\n map[event] = listeners;\n }\n const patchedListener = contextManager.bind(context, listener);\n // store a weak reference of the user listener to ours\n listeners.set(listener, patchedListener);\n /**\n * See comment at the start of this function for the explanation of this property.\n */\n contextManager._wrapped = true;\n try {\n return original.call(this, event, patchedListener);\n }\n finally {\n contextManager._wrapped = false;\n }\n };\n }\n _createPatchMap(ee) {\n const map = Object.create(null);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ee[this._kOtListeners] = map;\n return map;\n }\n _getPatchMap(ee) {\n return ee[this._kOtListeners];\n }\n}\nexports.AbstractAsyncHooksContextManager = AbstractAsyncHooksContextManager;\n//# sourceMappingURL=AbstractAsyncHooksContextManager.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncHooksContextManager = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst asyncHooks = require(\"async_hooks\");\nconst AbstractAsyncHooksContextManager_1 = require(\"./AbstractAsyncHooksContextManager\");\nclass AsyncHooksContextManager extends AbstractAsyncHooksContextManager_1.AbstractAsyncHooksContextManager {\n constructor() {\n super();\n this._contexts = new Map();\n this._stack = [];\n this._asyncHook = asyncHooks.createHook({\n init: this._init.bind(this),\n before: this._before.bind(this),\n after: this._after.bind(this),\n destroy: this._destroy.bind(this),\n promiseResolve: this._destroy.bind(this),\n });\n }\n active() {\n var _a;\n return (_a = this._stack[this._stack.length - 1]) !== null && _a !== void 0 ? _a : api_1.ROOT_CONTEXT;\n }\n with(context, fn, thisArg, ...args) {\n this._enterContext(context);\n try {\n return fn.call(thisArg, ...args);\n }\n finally {\n this._exitContext();\n }\n }\n enable() {\n this._asyncHook.enable();\n return this;\n }\n disable() {\n this._asyncHook.disable();\n this._contexts.clear();\n this._stack = [];\n return this;\n }\n /**\n * Init hook will be called when userland create a async context, setting the\n * context as the current one if it exist.\n * @param uid id of the async context\n * @param type the resource type\n */\n _init(uid, type) {\n // ignore TIMERWRAP as they combine timers with same timeout which can lead to\n // false context propagation. TIMERWRAP has been removed in node 11\n // every timer has it's own `Timeout` resource anyway which is used to propagate\n // context.\n if (type === 'TIMERWRAP')\n return;\n const context = this._stack[this._stack.length - 1];\n if (context !== undefined) {\n this._contexts.set(uid, context);\n }\n }\n /**\n * Destroy hook will be called when a given context is no longer used so we can\n * remove its attached context.\n * @param uid uid of the async context\n */\n _destroy(uid) {\n this._contexts.delete(uid);\n }\n /**\n * Before hook is called just before executing a async context.\n * @param uid uid of the async context\n */\n _before(uid) {\n const context = this._contexts.get(uid);\n if (context !== undefined) {\n this._enterContext(context);\n }\n }\n /**\n * After hook is called just after completing the execution of a async context.\n */\n _after() {\n this._exitContext();\n }\n /**\n * Set the given context as active\n */\n _enterContext(context) {\n this._stack.push(context);\n }\n /**\n * Remove the context at the root of the stack\n */\n _exitContext() {\n this._stack.pop();\n }\n}\nexports.AsyncHooksContextManager = AsyncHooksContextManager;\n//# sourceMappingURL=AsyncHooksContextManager.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncLocalStorageContextManager = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst async_hooks_1 = require(\"async_hooks\");\nconst AbstractAsyncHooksContextManager_1 = require(\"./AbstractAsyncHooksContextManager\");\nclass AsyncLocalStorageContextManager extends AbstractAsyncHooksContextManager_1.AbstractAsyncHooksContextManager {\n constructor() {\n super();\n this._asyncLocalStorage = new async_hooks_1.AsyncLocalStorage();\n }\n active() {\n var _a;\n return (_a = this._asyncLocalStorage.getStore()) !== null && _a !== void 0 ? _a : api_1.ROOT_CONTEXT;\n }\n with(context, fn, thisArg, ...args) {\n const cb = thisArg == null ? fn : fn.bind(thisArg);\n return this._asyncLocalStorage.run(context, cb, ...args);\n }\n enable() {\n return this;\n }\n disable() {\n this._asyncLocalStorage.disable();\n return this;\n }\n}\nexports.AsyncLocalStorageContextManager = AsyncLocalStorageContextManager;\n//# sourceMappingURL=AsyncLocalStorageContextManager.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncLocalStorageContextManager = exports.AsyncHooksContextManager = void 0;\nvar AsyncHooksContextManager_1 = require(\"./AsyncHooksContextManager\");\nObject.defineProperty(exports, \"AsyncHooksContextManager\", { enumerable: true, get: function () { return AsyncHooksContextManager_1.AsyncHooksContextManager; } });\nvar AsyncLocalStorageContextManager_1 = require(\"./AsyncLocalStorageContextManager\");\nObject.defineProperty(exports, \"AsyncLocalStorageContextManager\", { enumerable: true, get: function () { return AsyncLocalStorageContextManager_1.AsyncLocalStorageContextManager; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExportResultCode = void 0;\nvar ExportResultCode;\n(function (ExportResultCode) {\n ExportResultCode[ExportResultCode[\"SUCCESS\"] = 0] = \"SUCCESS\";\n ExportResultCode[ExportResultCode[\"FAILED\"] = 1] = \"FAILED\";\n})(ExportResultCode = exports.ExportResultCode || (exports.ExportResultCode = {}));\n//# sourceMappingURL=ExportResult.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BAGGAGE_MAX_TOTAL_LENGTH = exports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = exports.BAGGAGE_MAX_NAME_VALUE_PAIRS = exports.BAGGAGE_HEADER = exports.BAGGAGE_ITEMS_SEPARATOR = exports.BAGGAGE_PROPERTIES_SEPARATOR = exports.BAGGAGE_KEY_PAIR_SEPARATOR = void 0;\nexports.BAGGAGE_KEY_PAIR_SEPARATOR = '=';\nexports.BAGGAGE_PROPERTIES_SEPARATOR = ';';\nexports.BAGGAGE_ITEMS_SEPARATOR = ',';\n// Name of the http header used to propagate the baggage\nexports.BAGGAGE_HEADER = 'baggage';\n// Maximum number of name-value pairs allowed by w3c spec\nexports.BAGGAGE_MAX_NAME_VALUE_PAIRS = 180;\n// Maximum number of bytes per a single name-value pair allowed by w3c spec\nexports.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096;\n// Maximum total length of all name-value pairs allowed by w3c spec\nexports.BAGGAGE_MAX_TOTAL_LENGTH = 8192;\n//# sourceMappingURL=constants.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.W3CBaggagePropagator = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst suppress_tracing_1 = require(\"../../trace/suppress-tracing\");\nconst constants_1 = require(\"../constants\");\nconst utils_1 = require(\"../utils\");\n/**\n * Propagates {@link Baggage} through Context format propagation.\n *\n * Based on the Baggage specification:\n * https://w3c.github.io/baggage/\n */\nclass W3CBaggagePropagator {\n inject(context, carrier, setter) {\n const baggage = api_1.propagation.getBaggage(context);\n if (!baggage || (0, suppress_tracing_1.isTracingSuppressed)(context))\n return;\n const keyPairs = (0, utils_1.getKeyPairs)(baggage)\n .filter((pair) => {\n return pair.length <= constants_1.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;\n })\n .slice(0, constants_1.BAGGAGE_MAX_NAME_VALUE_PAIRS);\n const headerValue = (0, utils_1.serializeKeyPairs)(keyPairs);\n if (headerValue.length > 0) {\n setter.set(carrier, constants_1.BAGGAGE_HEADER, headerValue);\n }\n }\n extract(context, carrier, getter) {\n const headerValue = getter.get(carrier, constants_1.BAGGAGE_HEADER);\n const baggageString = Array.isArray(headerValue)\n ? headerValue.join(constants_1.BAGGAGE_ITEMS_SEPARATOR)\n : headerValue;\n if (!baggageString)\n return context;\n const baggage = {};\n if (baggageString.length === 0) {\n return context;\n }\n const pairs = baggageString.split(constants_1.BAGGAGE_ITEMS_SEPARATOR);\n pairs.forEach(entry => {\n const keyPair = (0, utils_1.parsePairKeyValue)(entry);\n if (keyPair) {\n const baggageEntry = { value: keyPair.value };\n if (keyPair.metadata) {\n baggageEntry.metadata = keyPair.metadata;\n }\n baggage[keyPair.key] = baggageEntry;\n }\n });\n if (Object.entries(baggage).length === 0) {\n return context;\n }\n return api_1.propagation.setBaggage(context, api_1.propagation.createBaggage(baggage));\n }\n fields() {\n return [constants_1.BAGGAGE_HEADER];\n }\n}\nexports.W3CBaggagePropagator = W3CBaggagePropagator;\n//# sourceMappingURL=W3CBaggagePropagator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseKeyPairsIntoRecord = exports.parsePairKeyValue = exports.getKeyPairs = exports.serializeKeyPairs = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst api_1 = require(\"@opentelemetry/api\");\nconst constants_1 = require(\"./constants\");\nfunction serializeKeyPairs(keyPairs) {\n return keyPairs.reduce((hValue, current) => {\n const value = `${hValue}${hValue !== '' ? constants_1.BAGGAGE_ITEMS_SEPARATOR : ''}${current}`;\n return value.length > constants_1.BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value;\n }, '');\n}\nexports.serializeKeyPairs = serializeKeyPairs;\nfunction getKeyPairs(baggage) {\n return baggage.getAllEntries().map(([key, value]) => {\n let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`;\n // include opaque metadata if provided\n // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation\n if (value.metadata !== undefined) {\n entry += constants_1.BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString();\n }\n return entry;\n });\n}\nexports.getKeyPairs = getKeyPairs;\nfunction parsePairKeyValue(entry) {\n const valueProps = entry.split(constants_1.BAGGAGE_PROPERTIES_SEPARATOR);\n if (valueProps.length <= 0)\n return;\n const keyPairPart = valueProps.shift();\n if (!keyPairPart)\n return;\n const separatorIndex = keyPairPart.indexOf(constants_1.BAGGAGE_KEY_PAIR_SEPARATOR);\n if (separatorIndex <= 0)\n return;\n const key = decodeURIComponent(keyPairPart.substring(0, separatorIndex).trim());\n const value = decodeURIComponent(keyPairPart.substring(separatorIndex + 1).trim());\n let metadata;\n if (valueProps.length > 0) {\n metadata = (0, api_1.baggageEntryMetadataFromString)(valueProps.join(constants_1.BAGGAGE_PROPERTIES_SEPARATOR));\n }\n return { key, value, metadata };\n}\nexports.parsePairKeyValue = parsePairKeyValue;\n/**\n * Parse a string serialized in the baggage HTTP Format (without metadata):\n * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md\n */\nfunction parseKeyPairsIntoRecord(value) {\n if (typeof value !== 'string' || value.length === 0)\n return {};\n return value\n .split(constants_1.BAGGAGE_ITEMS_SEPARATOR)\n .map(entry => {\n return parsePairKeyValue(entry);\n })\n .filter(keyPair => keyPair !== undefined && keyPair.value.length > 0)\n .reduce((headers, keyPair) => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n headers[keyPair.key] = keyPair.value;\n return headers;\n }, {});\n}\nexports.parseKeyPairsIntoRecord = parseKeyPairsIntoRecord;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AnchoredClock = void 0;\n/**\n * A utility for returning wall times anchored to a given point in time. Wall time measurements will\n * not be taken from the system, but instead are computed by adding a monotonic clock time\n * to the anchor point.\n *\n * This is needed because the system time can change and result in unexpected situations like\n * spans ending before they are started. Creating an anchored clock for each local root span\n * ensures that span timings and durations are accurate while preventing span times from drifting\n * too far from the system clock.\n *\n * Only creating an anchored clock once per local trace ensures span times are correct relative\n * to each other. For example, a child span will never have a start time before its parent even\n * if the system clock is corrected during the local trace.\n *\n * Heavily inspired by the OTel Java anchored clock\n * https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/AnchoredClock.java\n */\nclass AnchoredClock {\n /**\n * Create a new AnchoredClock anchored to the current time returned by systemClock.\n *\n * @param systemClock should be a clock that returns the number of milliseconds since January 1 1970 such as Date\n * @param monotonicClock should be a clock that counts milliseconds monotonically such as window.performance or perf_hooks.performance\n */\n constructor(systemClock, monotonicClock) {\n this._monotonicClock = monotonicClock;\n this._epochMillis = systemClock.now();\n this._performanceMillis = monotonicClock.now();\n }\n /**\n * Returns the current time by adding the number of milliseconds since the\n * AnchoredClock was created to the creation epoch time\n */\n now() {\n const delta = this._monotonicClock.now() - this._performanceMillis;\n return this._epochMillis + delta;\n }\n}\nexports.AnchoredClock = AnchoredClock;\n//# sourceMappingURL=anchored-clock.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAttributeValue = exports.isAttributeKey = exports.sanitizeAttributes = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nfunction sanitizeAttributes(attributes) {\n const out = {};\n if (typeof attributes !== 'object' || attributes == null) {\n return out;\n }\n for (const [key, val] of Object.entries(attributes)) {\n if (!isAttributeKey(key)) {\n api_1.diag.warn(`Invalid attribute key: ${key}`);\n continue;\n }\n if (!isAttributeValue(val)) {\n api_1.diag.warn(`Invalid attribute value set for key: ${key}`);\n continue;\n }\n if (Array.isArray(val)) {\n out[key] = val.slice();\n }\n else {\n out[key] = val;\n }\n }\n return out;\n}\nexports.sanitizeAttributes = sanitizeAttributes;\nfunction isAttributeKey(key) {\n return typeof key === 'string' && key.length > 0;\n}\nexports.isAttributeKey = isAttributeKey;\nfunction isAttributeValue(val) {\n if (val == null) {\n return true;\n }\n if (Array.isArray(val)) {\n return isHomogeneousAttributeValueArray(val);\n }\n return isValidPrimitiveAttributeValue(val);\n}\nexports.isAttributeValue = isAttributeValue;\nfunction isHomogeneousAttributeValueArray(arr) {\n let type;\n for (const element of arr) {\n // null/undefined elements are allowed\n if (element == null)\n continue;\n if (!type) {\n if (isValidPrimitiveAttributeValue(element)) {\n type = typeof element;\n continue;\n }\n // encountered an invalid primitive\n return false;\n }\n if (typeof element === type) {\n continue;\n }\n return false;\n }\n return true;\n}\nfunction isValidPrimitiveAttributeValue(val) {\n switch (typeof val) {\n case 'number':\n case 'boolean':\n case 'string':\n return true;\n }\n return false;\n}\n//# sourceMappingURL=attributes.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.globalErrorHandler = exports.setGlobalErrorHandler = void 0;\nconst logging_error_handler_1 = require(\"./logging-error-handler\");\n/** The global error handler delegate */\nlet delegateHandler = (0, logging_error_handler_1.loggingErrorHandler)();\n/**\n * Set the global error handler\n * @param {ErrorHandler} handler\n */\nfunction setGlobalErrorHandler(handler) {\n delegateHandler = handler;\n}\nexports.setGlobalErrorHandler = setGlobalErrorHandler;\n/**\n * Return the global error handler\n * @param {Exception} ex\n */\nfunction globalErrorHandler(ex) {\n try {\n delegateHandler(ex);\n }\n catch (_a) { } // eslint-disable-line no-empty\n}\nexports.globalErrorHandler = globalErrorHandler;\n//# sourceMappingURL=global-error-handler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hexToBinary = void 0;\nfunction intValue(charCode) {\n // 0-9\n if (charCode >= 48 && charCode <= 57) {\n return charCode - 48;\n }\n // a-f\n if (charCode >= 97 && charCode <= 102) {\n return charCode - 87;\n }\n // A-F\n return charCode - 55;\n}\nfunction hexToBinary(hexStr) {\n const buf = new Uint8Array(hexStr.length / 2);\n let offset = 0;\n for (let i = 0; i < hexStr.length; i += 2) {\n const hi = intValue(hexStr.charCodeAt(i));\n const lo = intValue(hexStr.charCodeAt(i + 1));\n buf[offset++] = (hi << 4) | lo;\n }\n return buf;\n}\nexports.hexToBinary = hexToBinary;\n//# sourceMappingURL=hex-to-binary.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.loggingErrorHandler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/**\n * Returns a function that logs an error using the provided logger, or a\n * console logger if one was not provided.\n */\nfunction loggingErrorHandler() {\n return (ex) => {\n api_1.diag.error(stringifyException(ex));\n };\n}\nexports.loggingErrorHandler = loggingErrorHandler;\n/**\n * Converts an exception into a string representation\n * @param {Exception} ex\n */\nfunction stringifyException(ex) {\n if (typeof ex === 'string') {\n return ex;\n }\n else {\n return JSON.stringify(flattenException(ex));\n }\n}\n/**\n * Flattens an exception into key-value pairs by traversing the prototype chain\n * and coercing values to strings. Duplicate properties will not be overwritten;\n * the first insert wins.\n */\nfunction flattenException(ex) {\n const result = {};\n let current = ex;\n while (current !== null) {\n Object.getOwnPropertyNames(current).forEach(propertyName => {\n if (result[propertyName])\n return;\n const value = current[propertyName];\n if (value) {\n result[propertyName] = String(value);\n }\n });\n current = Object.getPrototypeOf(current);\n }\n return result;\n}\n//# sourceMappingURL=logging-error-handler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.addHrTimes = exports.isTimeInput = exports.isTimeInputHrTime = exports.hrTimeToMicroseconds = exports.hrTimeToMilliseconds = exports.hrTimeToNanoseconds = exports.hrTimeToTimeStamp = exports.hrTimeDuration = exports.timeInputToHrTime = exports.hrTime = exports.getTimeOrigin = exports.millisToHrTime = void 0;\nconst platform_1 = require(\"../platform\");\nconst NANOSECOND_DIGITS = 9;\nconst NANOSECOND_DIGITS_IN_MILLIS = 6;\nconst MILLISECONDS_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS_IN_MILLIS);\nconst SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);\n/**\n * Converts a number of milliseconds from epoch to HrTime([seconds, remainder in nanoseconds]).\n * @param epochMillis\n */\nfunction millisToHrTime(epochMillis) {\n const epochSeconds = epochMillis / 1000;\n // Decimals only.\n const seconds = Math.trunc(epochSeconds);\n // Round sub-nanosecond accuracy to nanosecond.\n const nanos = Math.round((epochMillis % 1000) * MILLISECONDS_TO_NANOSECONDS);\n return [seconds, nanos];\n}\nexports.millisToHrTime = millisToHrTime;\nfunction getTimeOrigin() {\n let timeOrigin = platform_1.otperformance.timeOrigin;\n if (typeof timeOrigin !== 'number') {\n const perf = platform_1.otperformance;\n timeOrigin = perf.timing && perf.timing.fetchStart;\n }\n return timeOrigin;\n}\nexports.getTimeOrigin = getTimeOrigin;\n/**\n * Returns an hrtime calculated via performance component.\n * @param performanceNow\n */\nfunction hrTime(performanceNow) {\n const timeOrigin = millisToHrTime(getTimeOrigin());\n const now = millisToHrTime(typeof performanceNow === 'number' ? performanceNow : platform_1.otperformance.now());\n return addHrTimes(timeOrigin, now);\n}\nexports.hrTime = hrTime;\n/**\n *\n * Converts a TimeInput to an HrTime, defaults to _hrtime().\n * @param time\n */\nfunction timeInputToHrTime(time) {\n // process.hrtime\n if (isTimeInputHrTime(time)) {\n return time;\n }\n else if (typeof time === 'number') {\n // Must be a performance.now() if it's smaller than process start time.\n if (time < getTimeOrigin()) {\n return hrTime(time);\n }\n else {\n // epoch milliseconds or performance.timeOrigin\n return millisToHrTime(time);\n }\n }\n else if (time instanceof Date) {\n return millisToHrTime(time.getTime());\n }\n else {\n throw TypeError('Invalid input type');\n }\n}\nexports.timeInputToHrTime = timeInputToHrTime;\n/**\n * Returns a duration of two hrTime.\n * @param startTime\n * @param endTime\n */\nfunction hrTimeDuration(startTime, endTime) {\n let seconds = endTime[0] - startTime[0];\n let nanos = endTime[1] - startTime[1];\n // overflow\n if (nanos < 0) {\n seconds -= 1;\n // negate\n nanos += SECOND_TO_NANOSECONDS;\n }\n return [seconds, nanos];\n}\nexports.hrTimeDuration = hrTimeDuration;\n/**\n * Convert hrTime to timestamp, for example \"2019-05-14T17:00:00.000123456Z\"\n * @param time\n */\nfunction hrTimeToTimeStamp(time) {\n const precision = NANOSECOND_DIGITS;\n const tmp = `${'0'.repeat(precision)}${time[1]}Z`;\n const nanoString = tmp.substr(tmp.length - precision - 1);\n const date = new Date(time[0] * 1000).toISOString();\n return date.replace('000Z', nanoString);\n}\nexports.hrTimeToTimeStamp = hrTimeToTimeStamp;\n/**\n * Convert hrTime to nanoseconds.\n * @param time\n */\nfunction hrTimeToNanoseconds(time) {\n return time[0] * SECOND_TO_NANOSECONDS + time[1];\n}\nexports.hrTimeToNanoseconds = hrTimeToNanoseconds;\n/**\n * Convert hrTime to milliseconds.\n * @param time\n */\nfunction hrTimeToMilliseconds(time) {\n return time[0] * 1e3 + time[1] / 1e6;\n}\nexports.hrTimeToMilliseconds = hrTimeToMilliseconds;\n/**\n * Convert hrTime to microseconds.\n * @param time\n */\nfunction hrTimeToMicroseconds(time) {\n return time[0] * 1e6 + time[1] / 1e3;\n}\nexports.hrTimeToMicroseconds = hrTimeToMicroseconds;\n/**\n * check if time is HrTime\n * @param value\n */\nfunction isTimeInputHrTime(value) {\n return (Array.isArray(value) &&\n value.length === 2 &&\n typeof value[0] === 'number' &&\n typeof value[1] === 'number');\n}\nexports.isTimeInputHrTime = isTimeInputHrTime;\n/**\n * check if input value is a correct types.TimeInput\n * @param value\n */\nfunction isTimeInput(value) {\n return (isTimeInputHrTime(value) ||\n typeof value === 'number' ||\n value instanceof Date);\n}\nexports.isTimeInput = isTimeInput;\n/**\n * Given 2 HrTime formatted times, return their sum as an HrTime.\n */\nfunction addHrTimes(time1, time2) {\n const out = [time1[0] + time2[0], time1[1] + time2[1]];\n // Nanoseconds\n if (out[1] >= SECOND_TO_NANOSECONDS) {\n out[1] -= SECOND_TO_NANOSECONDS;\n out[0] += 1;\n }\n return out;\n}\nexports.addHrTimes = addHrTimes;\n//# sourceMappingURL=time.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.TraceState = exports.unsuppressTracing = exports.suppressTracing = exports.isTracingSuppressed = exports.TraceIdRatioBasedSampler = exports.ParentBasedSampler = exports.AlwaysOnSampler = exports.AlwaysOffSampler = exports.setRPCMetadata = exports.getRPCMetadata = exports.deleteRPCMetadata = exports.RPCType = exports.parseTraceParent = exports.W3CTraceContextPropagator = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = exports.CompositePropagator = exports.unrefTimer = exports.otperformance = exports.hexToBase64 = exports.getEnvWithoutDefaults = exports.getEnv = exports._globalThis = exports.SDK_INFO = exports.RandomIdGenerator = exports.baggageUtils = exports.ExportResultCode = exports.hexToBinary = exports.timeInputToHrTime = exports.millisToHrTime = exports.isTimeInputHrTime = exports.isTimeInput = exports.hrTimeToTimeStamp = exports.hrTimeToNanoseconds = exports.hrTimeToMilliseconds = exports.hrTimeToMicroseconds = exports.hrTimeDuration = exports.hrTime = exports.getTimeOrigin = exports.addHrTimes = exports.loggingErrorHandler = exports.setGlobalErrorHandler = exports.globalErrorHandler = exports.sanitizeAttributes = exports.isAttributeValue = exports.isAttributeKey = exports.AnchoredClock = exports.W3CBaggagePropagator = void 0;\nexports.internal = exports.VERSION = exports.BindOnceFuture = exports.isWrapped = exports.urlMatches = exports.isUrlIgnored = exports.callWithTimeout = exports.TimeoutError = exports.TracesSamplerValues = exports.merge = exports.parseEnvironment = exports.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT = exports.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT = exports.DEFAULT_ENVIRONMENT = void 0;\nvar W3CBaggagePropagator_1 = require(\"./baggage/propagation/W3CBaggagePropagator\");\nObject.defineProperty(exports, \"W3CBaggagePropagator\", { enumerable: true, get: function () { return W3CBaggagePropagator_1.W3CBaggagePropagator; } });\nvar anchored_clock_1 = require(\"./common/anchored-clock\");\nObject.defineProperty(exports, \"AnchoredClock\", { enumerable: true, get: function () { return anchored_clock_1.AnchoredClock; } });\nvar attributes_1 = require(\"./common/attributes\");\nObject.defineProperty(exports, \"isAttributeKey\", { enumerable: true, get: function () { return attributes_1.isAttributeKey; } });\nObject.defineProperty(exports, \"isAttributeValue\", { enumerable: true, get: function () { return attributes_1.isAttributeValue; } });\nObject.defineProperty(exports, \"sanitizeAttributes\", { enumerable: true, get: function () { return attributes_1.sanitizeAttributes; } });\nvar global_error_handler_1 = require(\"./common/global-error-handler\");\nObject.defineProperty(exports, \"globalErrorHandler\", { enumerable: true, get: function () { return global_error_handler_1.globalErrorHandler; } });\nObject.defineProperty(exports, \"setGlobalErrorHandler\", { enumerable: true, get: function () { return global_error_handler_1.setGlobalErrorHandler; } });\nvar logging_error_handler_1 = require(\"./common/logging-error-handler\");\nObject.defineProperty(exports, \"loggingErrorHandler\", { enumerable: true, get: function () { return logging_error_handler_1.loggingErrorHandler; } });\nvar time_1 = require(\"./common/time\");\nObject.defineProperty(exports, \"addHrTimes\", { enumerable: true, get: function () { return time_1.addHrTimes; } });\nObject.defineProperty(exports, \"getTimeOrigin\", { enumerable: true, get: function () { return time_1.getTimeOrigin; } });\nObject.defineProperty(exports, \"hrTime\", { enumerable: true, get: function () { return time_1.hrTime; } });\nObject.defineProperty(exports, \"hrTimeDuration\", { enumerable: true, get: function () { return time_1.hrTimeDuration; } });\nObject.defineProperty(exports, \"hrTimeToMicroseconds\", { enumerable: true, get: function () { return time_1.hrTimeToMicroseconds; } });\nObject.defineProperty(exports, \"hrTimeToMilliseconds\", { enumerable: true, get: function () { return time_1.hrTimeToMilliseconds; } });\nObject.defineProperty(exports, \"hrTimeToNanoseconds\", { enumerable: true, get: function () { return time_1.hrTimeToNanoseconds; } });\nObject.defineProperty(exports, \"hrTimeToTimeStamp\", { enumerable: true, get: function () { return time_1.hrTimeToTimeStamp; } });\nObject.defineProperty(exports, \"isTimeInput\", { enumerable: true, get: function () { return time_1.isTimeInput; } });\nObject.defineProperty(exports, \"isTimeInputHrTime\", { enumerable: true, get: function () { return time_1.isTimeInputHrTime; } });\nObject.defineProperty(exports, \"millisToHrTime\", { enumerable: true, get: function () { return time_1.millisToHrTime; } });\nObject.defineProperty(exports, \"timeInputToHrTime\", { enumerable: true, get: function () { return time_1.timeInputToHrTime; } });\nvar hex_to_binary_1 = require(\"./common/hex-to-binary\");\nObject.defineProperty(exports, \"hexToBinary\", { enumerable: true, get: function () { return hex_to_binary_1.hexToBinary; } });\nvar ExportResult_1 = require(\"./ExportResult\");\nObject.defineProperty(exports, \"ExportResultCode\", { enumerable: true, get: function () { return ExportResult_1.ExportResultCode; } });\nconst utils_1 = require(\"./baggage/utils\");\nexports.baggageUtils = {\n getKeyPairs: utils_1.getKeyPairs,\n serializeKeyPairs: utils_1.serializeKeyPairs,\n parseKeyPairsIntoRecord: utils_1.parseKeyPairsIntoRecord,\n parsePairKeyValue: utils_1.parsePairKeyValue,\n};\nvar platform_1 = require(\"./platform\");\nObject.defineProperty(exports, \"RandomIdGenerator\", { enumerable: true, get: function () { return platform_1.RandomIdGenerator; } });\nObject.defineProperty(exports, \"SDK_INFO\", { enumerable: true, get: function () { return platform_1.SDK_INFO; } });\nObject.defineProperty(exports, \"_globalThis\", { enumerable: true, get: function () { return platform_1._globalThis; } });\nObject.defineProperty(exports, \"getEnv\", { enumerable: true, get: function () { return platform_1.getEnv; } });\nObject.defineProperty(exports, \"getEnvWithoutDefaults\", { enumerable: true, get: function () { return platform_1.getEnvWithoutDefaults; } });\nObject.defineProperty(exports, \"hexToBase64\", { enumerable: true, get: function () { return platform_1.hexToBase64; } });\nObject.defineProperty(exports, \"otperformance\", { enumerable: true, get: function () { return platform_1.otperformance; } });\nObject.defineProperty(exports, \"unrefTimer\", { enumerable: true, get: function () { return platform_1.unrefTimer; } });\nvar composite_1 = require(\"./propagation/composite\");\nObject.defineProperty(exports, \"CompositePropagator\", { enumerable: true, get: function () { return composite_1.CompositePropagator; } });\nvar W3CTraceContextPropagator_1 = require(\"./trace/W3CTraceContextPropagator\");\nObject.defineProperty(exports, \"TRACE_PARENT_HEADER\", { enumerable: true, get: function () { return W3CTraceContextPropagator_1.TRACE_PARENT_HEADER; } });\nObject.defineProperty(exports, \"TRACE_STATE_HEADER\", { enumerable: true, get: function () { return W3CTraceContextPropagator_1.TRACE_STATE_HEADER; } });\nObject.defineProperty(exports, \"W3CTraceContextPropagator\", { enumerable: true, get: function () { return W3CTraceContextPropagator_1.W3CTraceContextPropagator; } });\nObject.defineProperty(exports, \"parseTraceParent\", { enumerable: true, get: function () { return W3CTraceContextPropagator_1.parseTraceParent; } });\nvar rpc_metadata_1 = require(\"./trace/rpc-metadata\");\nObject.defineProperty(exports, \"RPCType\", { enumerable: true, get: function () { return rpc_metadata_1.RPCType; } });\nObject.defineProperty(exports, \"deleteRPCMetadata\", { enumerable: true, get: function () { return rpc_metadata_1.deleteRPCMetadata; } });\nObject.defineProperty(exports, \"getRPCMetadata\", { enumerable: true, get: function () { return rpc_metadata_1.getRPCMetadata; } });\nObject.defineProperty(exports, \"setRPCMetadata\", { enumerable: true, get: function () { return rpc_metadata_1.setRPCMetadata; } });\nvar AlwaysOffSampler_1 = require(\"./trace/sampler/AlwaysOffSampler\");\nObject.defineProperty(exports, \"AlwaysOffSampler\", { enumerable: true, get: function () { return AlwaysOffSampler_1.AlwaysOffSampler; } });\nvar AlwaysOnSampler_1 = require(\"./trace/sampler/AlwaysOnSampler\");\nObject.defineProperty(exports, \"AlwaysOnSampler\", { enumerable: true, get: function () { return AlwaysOnSampler_1.AlwaysOnSampler; } });\nvar ParentBasedSampler_1 = require(\"./trace/sampler/ParentBasedSampler\");\nObject.defineProperty(exports, \"ParentBasedSampler\", { enumerable: true, get: function () { return ParentBasedSampler_1.ParentBasedSampler; } });\nvar TraceIdRatioBasedSampler_1 = require(\"./trace/sampler/TraceIdRatioBasedSampler\");\nObject.defineProperty(exports, \"TraceIdRatioBasedSampler\", { enumerable: true, get: function () { return TraceIdRatioBasedSampler_1.TraceIdRatioBasedSampler; } });\nvar suppress_tracing_1 = require(\"./trace/suppress-tracing\");\nObject.defineProperty(exports, \"isTracingSuppressed\", { enumerable: true, get: function () { return suppress_tracing_1.isTracingSuppressed; } });\nObject.defineProperty(exports, \"suppressTracing\", { enumerable: true, get: function () { return suppress_tracing_1.suppressTracing; } });\nObject.defineProperty(exports, \"unsuppressTracing\", { enumerable: true, get: function () { return suppress_tracing_1.unsuppressTracing; } });\nvar TraceState_1 = require(\"./trace/TraceState\");\nObject.defineProperty(exports, \"TraceState\", { enumerable: true, get: function () { return TraceState_1.TraceState; } });\nvar environment_1 = require(\"./utils/environment\");\nObject.defineProperty(exports, \"DEFAULT_ATTRIBUTE_COUNT_LIMIT\", { enumerable: true, get: function () { return environment_1.DEFAULT_ATTRIBUTE_COUNT_LIMIT; } });\nObject.defineProperty(exports, \"DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT\", { enumerable: true, get: function () { return environment_1.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT; } });\nObject.defineProperty(exports, \"DEFAULT_ENVIRONMENT\", { enumerable: true, get: function () { return environment_1.DEFAULT_ENVIRONMENT; } });\nObject.defineProperty(exports, \"DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT\", { enumerable: true, get: function () { return environment_1.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT; } });\nObject.defineProperty(exports, \"DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT\", { enumerable: true, get: function () { return environment_1.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT; } });\nObject.defineProperty(exports, \"parseEnvironment\", { enumerable: true, get: function () { return environment_1.parseEnvironment; } });\nvar merge_1 = require(\"./utils/merge\");\nObject.defineProperty(exports, \"merge\", { enumerable: true, get: function () { return merge_1.merge; } });\nvar sampling_1 = require(\"./utils/sampling\");\nObject.defineProperty(exports, \"TracesSamplerValues\", { enumerable: true, get: function () { return sampling_1.TracesSamplerValues; } });\nvar timeout_1 = require(\"./utils/timeout\");\nObject.defineProperty(exports, \"TimeoutError\", { enumerable: true, get: function () { return timeout_1.TimeoutError; } });\nObject.defineProperty(exports, \"callWithTimeout\", { enumerable: true, get: function () { return timeout_1.callWithTimeout; } });\nvar url_1 = require(\"./utils/url\");\nObject.defineProperty(exports, \"isUrlIgnored\", { enumerable: true, get: function () { return url_1.isUrlIgnored; } });\nObject.defineProperty(exports, \"urlMatches\", { enumerable: true, get: function () { return url_1.urlMatches; } });\nvar wrap_1 = require(\"./utils/wrap\");\nObject.defineProperty(exports, \"isWrapped\", { enumerable: true, get: function () { return wrap_1.isWrapped; } });\nvar callback_1 = require(\"./utils/callback\");\nObject.defineProperty(exports, \"BindOnceFuture\", { enumerable: true, get: function () { return callback_1.BindOnceFuture; } });\nvar version_1 = require(\"./version\");\nObject.defineProperty(exports, \"VERSION\", { enumerable: true, get: function () { return version_1.VERSION; } });\nconst exporter_1 = require(\"./internal/exporter\");\nexports.internal = {\n _export: exporter_1._export,\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._export = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst suppress_tracing_1 = require(\"../trace/suppress-tracing\");\n/**\n * @internal\n * Shared functionality used by Exporters while exporting data, including suppression of Traces.\n */\nfunction _export(exporter, arg) {\n return new Promise(resolve => {\n // prevent downstream exporter calls from generating spans\n api_1.context.with((0, suppress_tracing_1.suppressTracing)(api_1.context.active()), () => {\n exporter.export(arg, (result) => {\n resolve(result);\n });\n });\n });\n}\nexports._export = _export;\n//# sourceMappingURL=exporter.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateValue = exports.validateKey = void 0;\nconst VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';\nconst VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;\nconst VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;\nconst VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);\nconst VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;\nconst INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;\n/**\n * Key is opaque string up to 256 characters printable. It MUST begin with a\n * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,\n * underscores _, dashes -, asterisks *, and forward slashes /.\n * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the\n * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.\n * see https://www.w3.org/TR/trace-context/#key\n */\nfunction validateKey(key) {\n return VALID_KEY_REGEX.test(key);\n}\nexports.validateKey = validateKey;\n/**\n * Value is opaque string up to 256 characters printable ASCII RFC0020\n * characters (i.e., the range 0x20 to 0x7E) except comma , and =.\n */\nfunction validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}\nexports.validateValue = validateValue;\n//# sourceMappingURL=validators.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unrefTimer = exports.otperformance = exports.hexToBase64 = exports.getEnvWithoutDefaults = exports.getEnv = exports._globalThis = exports.SDK_INFO = exports.RandomIdGenerator = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar node_1 = require(\"./node\");\nObject.defineProperty(exports, \"RandomIdGenerator\", { enumerable: true, get: function () { return node_1.RandomIdGenerator; } });\nObject.defineProperty(exports, \"SDK_INFO\", { enumerable: true, get: function () { return node_1.SDK_INFO; } });\nObject.defineProperty(exports, \"_globalThis\", { enumerable: true, get: function () { return node_1._globalThis; } });\nObject.defineProperty(exports, \"getEnv\", { enumerable: true, get: function () { return node_1.getEnv; } });\nObject.defineProperty(exports, \"getEnvWithoutDefaults\", { enumerable: true, get: function () { return node_1.getEnvWithoutDefaults; } });\nObject.defineProperty(exports, \"hexToBase64\", { enumerable: true, get: function () { return node_1.hexToBase64; } });\nObject.defineProperty(exports, \"otperformance\", { enumerable: true, get: function () { return node_1.otperformance; } });\nObject.defineProperty(exports, \"unrefTimer\", { enumerable: true, get: function () { return node_1.unrefTimer; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RandomIdGenerator = void 0;\nconst SPAN_ID_BYTES = 8;\nconst TRACE_ID_BYTES = 16;\n/**\n * @deprecated Use the one defined in @opentelemetry/sdk-trace-base instead.\n */\nclass RandomIdGenerator {\n constructor() {\n /**\n * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex\n * characters corresponding to 128 bits.\n */\n this.generateTraceId = getIdGenerator(TRACE_ID_BYTES);\n /**\n * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex\n * characters corresponding to 64 bits.\n */\n this.generateSpanId = getIdGenerator(SPAN_ID_BYTES);\n }\n}\nexports.RandomIdGenerator = RandomIdGenerator;\nconst SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES);\nfunction getIdGenerator(bytes) {\n return function generateId() {\n for (let i = 0; i < bytes / 4; i++) {\n // unsigned right shift drops decimal part of the number\n // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE\n SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4);\n }\n // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated\n for (let i = 0; i < bytes; i++) {\n if (SHARED_BUFFER[i] > 0) {\n break;\n }\n else if (i === bytes - 1) {\n SHARED_BUFFER[bytes - 1] = 1;\n }\n }\n return SHARED_BUFFER.toString('hex', 0, bytes);\n };\n}\n//# sourceMappingURL=RandomIdGenerator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEnvWithoutDefaults = exports.getEnv = void 0;\nconst environment_1 = require(\"../../utils/environment\");\n/**\n * Gets the environment variables\n */\nfunction getEnv() {\n const processEnv = (0, environment_1.parseEnvironment)(process.env);\n return Object.assign({}, environment_1.DEFAULT_ENVIRONMENT, processEnv);\n}\nexports.getEnv = getEnv;\nfunction getEnvWithoutDefaults() {\n return (0, environment_1.parseEnvironment)(process.env);\n}\nexports.getEnvWithoutDefaults = getEnvWithoutDefaults;\n//# sourceMappingURL=environment.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._globalThis = void 0;\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexports._globalThis = typeof globalThis === 'object' ? globalThis : global;\n//# sourceMappingURL=globalThis.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hexToBase64 = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst hex_to_binary_1 = require(\"../../common/hex-to-binary\");\nfunction hexToBase64(hexStr) {\n return Buffer.from((0, hex_to_binary_1.hexToBinary)(hexStr)).toString('base64');\n}\nexports.hexToBase64 = hexToBase64;\n//# sourceMappingURL=hex-to-base64.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unrefTimer = exports.SDK_INFO = exports.otperformance = exports.RandomIdGenerator = exports.hexToBase64 = exports._globalThis = exports.getEnv = exports.getEnvWithoutDefaults = void 0;\nvar environment_1 = require(\"./environment\");\nObject.defineProperty(exports, \"getEnvWithoutDefaults\", { enumerable: true, get: function () { return environment_1.getEnvWithoutDefaults; } });\nObject.defineProperty(exports, \"getEnv\", { enumerable: true, get: function () { return environment_1.getEnv; } });\nvar globalThis_1 = require(\"./globalThis\");\nObject.defineProperty(exports, \"_globalThis\", { enumerable: true, get: function () { return globalThis_1._globalThis; } });\nvar hex_to_base64_1 = require(\"./hex-to-base64\");\nObject.defineProperty(exports, \"hexToBase64\", { enumerable: true, get: function () { return hex_to_base64_1.hexToBase64; } });\nvar RandomIdGenerator_1 = require(\"./RandomIdGenerator\");\nObject.defineProperty(exports, \"RandomIdGenerator\", { enumerable: true, get: function () { return RandomIdGenerator_1.RandomIdGenerator; } });\nvar performance_1 = require(\"./performance\");\nObject.defineProperty(exports, \"otperformance\", { enumerable: true, get: function () { return performance_1.otperformance; } });\nvar sdk_info_1 = require(\"./sdk-info\");\nObject.defineProperty(exports, \"SDK_INFO\", { enumerable: true, get: function () { return sdk_info_1.SDK_INFO; } });\nvar timer_util_1 = require(\"./timer-util\");\nObject.defineProperty(exports, \"unrefTimer\", { enumerable: true, get: function () { return timer_util_1.unrefTimer; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.otperformance = void 0;\nconst perf_hooks_1 = require(\"perf_hooks\");\nexports.otperformance = perf_hooks_1.performance;\n//# sourceMappingURL=performance.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SDK_INFO = void 0;\nconst version_1 = require(\"../../version\");\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\n/** Constants describing the SDK in use */\nexports.SDK_INFO = {\n [semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_NAME]: 'opentelemetry',\n [semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_NAME]: 'node',\n [semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE]: semantic_conventions_1.TELEMETRYSDKLANGUAGEVALUES_NODEJS,\n [semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_VERSION]: version_1.VERSION,\n};\n//# sourceMappingURL=sdk-info.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unrefTimer = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction unrefTimer(timer) {\n timer.unref();\n}\nexports.unrefTimer = unrefTimer;\n//# sourceMappingURL=timer-util.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompositePropagator = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** Combines multiple propagators into a single propagator. */\nclass CompositePropagator {\n /**\n * Construct a composite propagator from a list of propagators.\n *\n * @param [config] Configuration object for composite propagator\n */\n constructor(config = {}) {\n var _a;\n this._propagators = (_a = config.propagators) !== null && _a !== void 0 ? _a : [];\n this._fields = Array.from(new Set(this._propagators\n // older propagators may not have fields function, null check to be sure\n .map(p => (typeof p.fields === 'function' ? p.fields() : []))\n .reduce((x, y) => x.concat(y), [])));\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same carrier key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to inject\n * @param carrier Carrier into which context will be injected\n */\n inject(context, carrier, setter) {\n for (const propagator of this._propagators) {\n try {\n propagator.inject(context, carrier, setter);\n }\n catch (err) {\n api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);\n }\n }\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same context key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to add values to\n * @param carrier Carrier from which to extract context\n */\n extract(context, carrier, getter) {\n return this._propagators.reduce((ctx, propagator) => {\n try {\n return propagator.extract(ctx, carrier, getter);\n }\n catch (err) {\n api_1.diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);\n }\n return ctx;\n }, context);\n }\n fields() {\n // return a new array so our fields cannot be modified\n return this._fields.slice();\n }\n}\nexports.CompositePropagator = CompositePropagator;\n//# sourceMappingURL=composite.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceState = void 0;\nconst validators_1 = require(\"../internal/validators\");\nconst MAX_TRACE_STATE_ITEMS = 32;\nconst MAX_TRACE_STATE_LEN = 512;\nconst LIST_MEMBERS_SEPARATOR = ',';\nconst LIST_MEMBER_KEY_VALUE_SPLITTER = '=';\n/**\n * TraceState must be a class and not a simple object type because of the spec\n * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).\n *\n * Here is the list of allowed mutations:\n * - New key-value pair should be added into the beginning of the list\n * - The value of any key can be updated. Modified keys MUST be moved to the\n * beginning of the list.\n */\nclass TraceState {\n constructor(rawTraceState) {\n this._internalState = new Map();\n if (rawTraceState)\n this._parse(rawTraceState);\n }\n set(key, value) {\n // TODO: Benchmark the different approaches(map vs list) and\n // use the faster one.\n const traceState = this._clone();\n if (traceState._internalState.has(key)) {\n traceState._internalState.delete(key);\n }\n traceState._internalState.set(key, value);\n return traceState;\n }\n unset(key) {\n const traceState = this._clone();\n traceState._internalState.delete(key);\n return traceState;\n }\n get(key) {\n return this._internalState.get(key);\n }\n serialize() {\n return this._keys()\n .reduce((agg, key) => {\n agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));\n return agg;\n }, [])\n .join(LIST_MEMBERS_SEPARATOR);\n }\n _parse(rawTraceState) {\n if (rawTraceState.length > MAX_TRACE_STATE_LEN)\n return;\n this._internalState = rawTraceState\n .split(LIST_MEMBERS_SEPARATOR)\n .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning\n .reduce((agg, part) => {\n const listMember = part.trim(); // Optional Whitespace (OWS) handling\n const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);\n if (i !== -1) {\n const key = listMember.slice(0, i);\n const value = listMember.slice(i + 1, part.length);\n if ((0, validators_1.validateKey)(key) && (0, validators_1.validateValue)(value)) {\n agg.set(key, value);\n }\n else {\n // TODO: Consider to add warning log\n }\n }\n return agg;\n }, new Map());\n // Because of the reverse() requirement, trunc must be done after map is created\n if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {\n this._internalState = new Map(Array.from(this._internalState.entries())\n .reverse() // Use reverse same as original tracestate parse chain\n .slice(0, MAX_TRACE_STATE_ITEMS));\n }\n }\n _keys() {\n return Array.from(this._internalState.keys()).reverse();\n }\n _clone() {\n const traceState = new TraceState();\n traceState._internalState = new Map(this._internalState);\n return traceState;\n }\n}\nexports.TraceState = TraceState;\n//# sourceMappingURL=TraceState.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.W3CTraceContextPropagator = exports.parseTraceParent = exports.TRACE_STATE_HEADER = exports.TRACE_PARENT_HEADER = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst suppress_tracing_1 = require(\"./suppress-tracing\");\nconst TraceState_1 = require(\"./TraceState\");\nexports.TRACE_PARENT_HEADER = 'traceparent';\nexports.TRACE_STATE_HEADER = 'tracestate';\nconst VERSION = '00';\nconst VERSION_PART = '(?!ff)[\\\\da-f]{2}';\nconst TRACE_ID_PART = '(?![0]{32})[\\\\da-f]{32}';\nconst PARENT_ID_PART = '(?![0]{16})[\\\\da-f]{16}';\nconst FLAGS_PART = '[\\\\da-f]{2}';\nconst TRACE_PARENT_REGEX = new RegExp(`^\\\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\\\s?$`);\n/**\n * Parses information from the [traceparent] span tag and converts it into {@link SpanContext}\n * @param traceParent - A meta property that comes from server.\n * It should be dynamically generated server side to have the server's request trace Id,\n * a parent span Id that was set on the server's request span,\n * and the trace flags to indicate the server's sampling decision\n * (01 = sampled, 00 = not sampled).\n * for example: '{version}-{traceId}-{spanId}-{sampleDecision}'\n * For more information see {@link https://www.w3.org/TR/trace-context/}\n */\nfunction parseTraceParent(traceParent) {\n const match = TRACE_PARENT_REGEX.exec(traceParent);\n if (!match)\n return null;\n // According to the specification the implementation should be compatible\n // with future versions. If there are more parts, we only reject it if it's using version 00\n // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent\n if (match[1] === '00' && match[5])\n return null;\n return {\n traceId: match[2],\n spanId: match[3],\n traceFlags: parseInt(match[4], 16),\n };\n}\nexports.parseTraceParent = parseTraceParent;\n/**\n * Propagates {@link SpanContext} through Trace Context format propagation.\n *\n * Based on the Trace Context specification:\n * https://www.w3.org/TR/trace-context/\n */\nclass W3CTraceContextPropagator {\n inject(context, carrier, setter) {\n const spanContext = api_1.trace.getSpanContext(context);\n if (!spanContext ||\n (0, suppress_tracing_1.isTracingSuppressed)(context) ||\n !(0, api_1.isSpanContextValid)(spanContext))\n return;\n const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`;\n setter.set(carrier, exports.TRACE_PARENT_HEADER, traceParent);\n if (spanContext.traceState) {\n setter.set(carrier, exports.TRACE_STATE_HEADER, spanContext.traceState.serialize());\n }\n }\n extract(context, carrier, getter) {\n const traceParentHeader = getter.get(carrier, exports.TRACE_PARENT_HEADER);\n if (!traceParentHeader)\n return context;\n const traceParent = Array.isArray(traceParentHeader)\n ? traceParentHeader[0]\n : traceParentHeader;\n if (typeof traceParent !== 'string')\n return context;\n const spanContext = parseTraceParent(traceParent);\n if (!spanContext)\n return context;\n spanContext.isRemote = true;\n const traceStateHeader = getter.get(carrier, exports.TRACE_STATE_HEADER);\n if (traceStateHeader) {\n // If more than one `tracestate` header is found, we merge them into a\n // single header.\n const state = Array.isArray(traceStateHeader)\n ? traceStateHeader.join(',')\n : traceStateHeader;\n spanContext.traceState = new TraceState_1.TraceState(typeof state === 'string' ? state : undefined);\n }\n return api_1.trace.setSpanContext(context, spanContext);\n }\n fields() {\n return [exports.TRACE_PARENT_HEADER, exports.TRACE_STATE_HEADER];\n }\n}\nexports.W3CTraceContextPropagator = W3CTraceContextPropagator;\n//# sourceMappingURL=W3CTraceContextPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRPCMetadata = exports.deleteRPCMetadata = exports.setRPCMetadata = exports.RPCType = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst RPC_METADATA_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key RPC_METADATA');\nvar RPCType;\n(function (RPCType) {\n RPCType[\"HTTP\"] = \"http\";\n})(RPCType = exports.RPCType || (exports.RPCType = {}));\nfunction setRPCMetadata(context, meta) {\n return context.setValue(RPC_METADATA_KEY, meta);\n}\nexports.setRPCMetadata = setRPCMetadata;\nfunction deleteRPCMetadata(context) {\n return context.deleteValue(RPC_METADATA_KEY);\n}\nexports.deleteRPCMetadata = deleteRPCMetadata;\nfunction getRPCMetadata(context) {\n return context.getValue(RPC_METADATA_KEY);\n}\nexports.getRPCMetadata = getRPCMetadata;\n//# sourceMappingURL=rpc-metadata.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlwaysOffSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/**\n * @deprecated Use the one defined in @opentelemetry/sdk-trace-base instead.\n * Sampler that samples no traces.\n */\nclass AlwaysOffSampler {\n shouldSample() {\n return {\n decision: api_1.SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return 'AlwaysOffSampler';\n }\n}\nexports.AlwaysOffSampler = AlwaysOffSampler;\n//# sourceMappingURL=AlwaysOffSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlwaysOnSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/**\n * @deprecated Use the one defined in @opentelemetry/sdk-trace-base instead.\n * Sampler that samples all traces.\n */\nclass AlwaysOnSampler {\n shouldSample() {\n return {\n decision: api_1.SamplingDecision.RECORD_AND_SAMPLED,\n };\n }\n toString() {\n return 'AlwaysOnSampler';\n }\n}\nexports.AlwaysOnSampler = AlwaysOnSampler;\n//# sourceMappingURL=AlwaysOnSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ParentBasedSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst global_error_handler_1 = require(\"../../common/global-error-handler\");\nconst AlwaysOffSampler_1 = require(\"./AlwaysOffSampler\");\nconst AlwaysOnSampler_1 = require(\"./AlwaysOnSampler\");\n/**\n * @deprecated Use the one defined in @opentelemetry/sdk-trace-base instead.\n * A composite sampler that either respects the parent span's sampling decision\n * or delegates to `delegateSampler` for root spans.\n */\nclass ParentBasedSampler {\n constructor(config) {\n var _a, _b, _c, _d;\n this._root = config.root;\n if (!this._root) {\n (0, global_error_handler_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured'));\n this._root = new AlwaysOnSampler_1.AlwaysOnSampler();\n }\n this._remoteParentSampled =\n (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler();\n this._remoteParentNotSampled =\n (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler();\n this._localParentSampled =\n (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler();\n this._localParentNotSampled =\n (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler();\n }\n shouldSample(context, traceId, spanName, spanKind, attributes, links) {\n const parentContext = api_1.trace.getSpanContext(context);\n if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) {\n return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.isRemote) {\n if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {\n return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {\n return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n toString() {\n return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;\n }\n}\nexports.ParentBasedSampler = ParentBasedSampler;\n//# sourceMappingURL=ParentBasedSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceIdRatioBasedSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/**\n * @deprecated Use the one defined in @opentelemetry/sdk-trace-base instead.\n * Sampler that samples a given fraction of traces based of trace id deterministically.\n */\nclass TraceIdRatioBasedSampler {\n constructor(_ratio = 0) {\n this._ratio = _ratio;\n this._ratio = this._normalize(_ratio);\n this._upperBound = Math.floor(this._ratio * 0xffffffff);\n }\n shouldSample(context, traceId) {\n return {\n decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound\n ? api_1.SamplingDecision.RECORD_AND_SAMPLED\n : api_1.SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return `TraceIdRatioBased{${this._ratio}}`;\n }\n _normalize(ratio) {\n if (typeof ratio !== 'number' || isNaN(ratio))\n return 0;\n return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio;\n }\n _accumulate(traceId) {\n let accumulation = 0;\n for (let i = 0; i < traceId.length / 8; i++) {\n const pos = i * 8;\n const part = parseInt(traceId.slice(pos, pos + 8), 16);\n accumulation = (accumulation ^ part) >>> 0;\n }\n return accumulation;\n }\n}\nexports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler;\n//# sourceMappingURL=TraceIdRatioBasedSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTracingSuppressed = exports.unsuppressTracing = exports.suppressTracing = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst SUPPRESS_TRACING_KEY = (0, api_1.createContextKey)('OpenTelemetry SDK Context Key SUPPRESS_TRACING');\nfunction suppressTracing(context) {\n return context.setValue(SUPPRESS_TRACING_KEY, true);\n}\nexports.suppressTracing = suppressTracing;\nfunction unsuppressTracing(context) {\n return context.deleteValue(SUPPRESS_TRACING_KEY);\n}\nexports.unsuppressTracing = unsuppressTracing;\nfunction isTracingSuppressed(context) {\n return context.getValue(SUPPRESS_TRACING_KEY) === true;\n}\nexports.isTracingSuppressed = isTracingSuppressed;\n//# sourceMappingURL=suppress-tracing.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BindOnceFuture = void 0;\nconst promise_1 = require(\"./promise\");\n/**\n * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked.\n */\nclass BindOnceFuture {\n constructor(_callback, _that) {\n this._callback = _callback;\n this._that = _that;\n this._isCalled = false;\n this._deferred = new promise_1.Deferred();\n }\n get isCalled() {\n return this._isCalled;\n }\n get promise() {\n return this._deferred.promise;\n }\n call(...args) {\n if (!this._isCalled) {\n this._isCalled = true;\n try {\n Promise.resolve(this._callback.call(this._that, ...args)).then(val => this._deferred.resolve(val), err => this._deferred.reject(err));\n }\n catch (err) {\n this._deferred.reject(err);\n }\n }\n return this._deferred.promise;\n }\n}\nexports.BindOnceFuture = BindOnceFuture;\n//# sourceMappingURL=callback.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseEnvironment = exports.DEFAULT_ENVIRONMENT = exports.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT = exports.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst sampling_1 = require(\"./sampling\");\nconst DEFAULT_LIST_SEPARATOR = ',';\n/**\n * Environment interface to define all names\n */\nconst ENVIRONMENT_BOOLEAN_KEYS = ['OTEL_SDK_DISABLED'];\nfunction isEnvVarABoolean(key) {\n return (ENVIRONMENT_BOOLEAN_KEYS.indexOf(key) > -1);\n}\nconst ENVIRONMENT_NUMBERS_KEYS = [\n 'OTEL_BSP_EXPORT_TIMEOUT',\n 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE',\n 'OTEL_BSP_MAX_QUEUE_SIZE',\n 'OTEL_BSP_SCHEDULE_DELAY',\n 'OTEL_BLRP_EXPORT_TIMEOUT',\n 'OTEL_BLRP_MAX_EXPORT_BATCH_SIZE',\n 'OTEL_BLRP_MAX_QUEUE_SIZE',\n 'OTEL_BLRP_SCHEDULE_DELAY',\n 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_EVENT_COUNT_LIMIT',\n 'OTEL_SPAN_LINK_COUNT_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT',\n 'OTEL_EXPORTER_OTLP_TIMEOUT',\n 'OTEL_EXPORTER_OTLP_TRACES_TIMEOUT',\n 'OTEL_EXPORTER_OTLP_METRICS_TIMEOUT',\n 'OTEL_EXPORTER_OTLP_LOGS_TIMEOUT',\n 'OTEL_EXPORTER_JAEGER_AGENT_PORT',\n];\nfunction isEnvVarANumber(key) {\n return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1);\n}\nconst ENVIRONMENT_LISTS_KEYS = [\n 'OTEL_NO_PATCH_MODULES',\n 'OTEL_PROPAGATORS',\n];\nfunction isEnvVarAList(key) {\n return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1;\n}\nexports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;\nexports.DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;\nexports.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT = 128;\nexports.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT = 128;\n/**\n * Default environment variables\n */\nexports.DEFAULT_ENVIRONMENT = {\n OTEL_SDK_DISABLED: false,\n CONTAINER_NAME: '',\n ECS_CONTAINER_METADATA_URI_V4: '',\n ECS_CONTAINER_METADATA_URI: '',\n HOSTNAME: '',\n KUBERNETES_SERVICE_HOST: '',\n NAMESPACE: '',\n OTEL_BSP_EXPORT_TIMEOUT: 30000,\n OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512,\n OTEL_BSP_MAX_QUEUE_SIZE: 2048,\n OTEL_BSP_SCHEDULE_DELAY: 5000,\n OTEL_BLRP_EXPORT_TIMEOUT: 30000,\n OTEL_BLRP_MAX_EXPORT_BATCH_SIZE: 512,\n OTEL_BLRP_MAX_QUEUE_SIZE: 2048,\n OTEL_BLRP_SCHEDULE_DELAY: 5000,\n OTEL_EXPORTER_JAEGER_AGENT_HOST: '',\n OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832,\n OTEL_EXPORTER_JAEGER_ENDPOINT: '',\n OTEL_EXPORTER_JAEGER_PASSWORD: '',\n OTEL_EXPORTER_JAEGER_USER: '',\n OTEL_EXPORTER_OTLP_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_HEADERS: '',\n OTEL_EXPORTER_OTLP_TRACES_HEADERS: '',\n OTEL_EXPORTER_OTLP_METRICS_HEADERS: '',\n OTEL_EXPORTER_OTLP_LOGS_HEADERS: '',\n OTEL_EXPORTER_OTLP_TIMEOUT: 10000,\n OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: 10000,\n OTEL_EXPORTER_OTLP_METRICS_TIMEOUT: 10000,\n OTEL_EXPORTER_OTLP_LOGS_TIMEOUT: 10000,\n OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans',\n OTEL_LOG_LEVEL: api_1.DiagLogLevel.INFO,\n OTEL_NO_PATCH_MODULES: [],\n OTEL_PROPAGATORS: ['tracecontext', 'baggage'],\n OTEL_RESOURCE_ATTRIBUTES: '',\n OTEL_SERVICE_NAME: '',\n OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT: exports.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT: exports.DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_EVENT_COUNT_LIMIT: 128,\n OTEL_SPAN_LINK_COUNT_LIMIT: 128,\n OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT: exports.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,\n OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT: exports.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,\n OTEL_TRACES_EXPORTER: '',\n OTEL_TRACES_SAMPLER: sampling_1.TracesSamplerValues.ParentBasedAlwaysOn,\n OTEL_TRACES_SAMPLER_ARG: '',\n OTEL_LOGS_EXPORTER: '',\n OTEL_EXPORTER_OTLP_INSECURE: '',\n OTEL_EXPORTER_OTLP_TRACES_INSECURE: '',\n OTEL_EXPORTER_OTLP_METRICS_INSECURE: '',\n OTEL_EXPORTER_OTLP_LOGS_INSECURE: '',\n OTEL_EXPORTER_OTLP_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_LOGS_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_CLIENT_KEY: '',\n OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY: '',\n OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY: '',\n OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY: '',\n OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_PROTOCOL: 'http/protobuf',\n OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: 'http/protobuf',\n OTEL_EXPORTER_OTLP_METRICS_PROTOCOL: 'http/protobuf',\n OTEL_EXPORTER_OTLP_LOGS_PROTOCOL: 'http/protobuf',\n OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: 'cumulative',\n};\n/**\n * @param key\n * @param environment\n * @param values\n */\nfunction parseBoolean(key, environment, values) {\n if (typeof values[key] === 'undefined') {\n return;\n }\n const value = String(values[key]);\n // support case-insensitive \"true\"\n environment[key] = value.toLowerCase() === 'true';\n}\n/**\n * Parses a variable as number with number validation\n * @param name\n * @param environment\n * @param values\n * @param min\n * @param max\n */\nfunction parseNumber(name, environment, values, min = -Infinity, max = Infinity) {\n if (typeof values[name] !== 'undefined') {\n const value = Number(values[name]);\n if (!isNaN(value)) {\n if (value < min) {\n environment[name] = min;\n }\n else if (value > max) {\n environment[name] = max;\n }\n else {\n environment[name] = value;\n }\n }\n }\n}\n/**\n * Parses list-like strings from input into output.\n * @param name\n * @param environment\n * @param values\n * @param separator\n */\nfunction parseStringList(name, output, input, separator = DEFAULT_LIST_SEPARATOR) {\n const givenValue = input[name];\n if (typeof givenValue === 'string') {\n output[name] = givenValue.split(separator).map(v => v.trim());\n }\n}\n// The support string -> DiagLogLevel mappings\nconst logLevelMap = {\n ALL: api_1.DiagLogLevel.ALL,\n VERBOSE: api_1.DiagLogLevel.VERBOSE,\n DEBUG: api_1.DiagLogLevel.DEBUG,\n INFO: api_1.DiagLogLevel.INFO,\n WARN: api_1.DiagLogLevel.WARN,\n ERROR: api_1.DiagLogLevel.ERROR,\n NONE: api_1.DiagLogLevel.NONE,\n};\n/**\n * Environmentally sets log level if valid log level string is provided\n * @param key\n * @param environment\n * @param values\n */\nfunction setLogLevelFromEnv(key, environment, values) {\n const value = values[key];\n if (typeof value === 'string') {\n const theLevel = logLevelMap[value.toUpperCase()];\n if (theLevel != null) {\n environment[key] = theLevel;\n }\n }\n}\n/**\n * Parses environment values\n * @param values\n */\nfunction parseEnvironment(values) {\n const environment = {};\n for (const env in exports.DEFAULT_ENVIRONMENT) {\n const key = env;\n switch (key) {\n case 'OTEL_LOG_LEVEL':\n setLogLevelFromEnv(key, environment, values);\n break;\n default:\n if (isEnvVarABoolean(key)) {\n parseBoolean(key, environment, values);\n }\n else if (isEnvVarANumber(key)) {\n parseNumber(key, environment, values);\n }\n else if (isEnvVarAList(key)) {\n parseStringList(key, environment, values);\n }\n else {\n const value = values[key];\n if (typeof value !== 'undefined' && value !== null) {\n environment[key] = String(value);\n }\n }\n }\n }\n return environment;\n}\nexports.parseEnvironment = parseEnvironment;\n//# sourceMappingURL=environment.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPlainObject = void 0;\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * based on lodash in order to support esm builds without esModuleInterop.\n * lodash is using MIT License.\n **/\nconst objectTag = '[object Object]';\nconst nullTag = '[object Null]';\nconst undefinedTag = '[object Undefined]';\nconst funcProto = Function.prototype;\nconst funcToString = funcProto.toString;\nconst objectCtorString = funcToString.call(Object);\nconst getPrototype = overArg(Object.getPrototypeOf, Object);\nconst objectProto = Object.prototype;\nconst hasOwnProperty = objectProto.hasOwnProperty;\nconst symToStringTag = Symbol ? Symbol.toStringTag : undefined;\nconst nativeObjectToString = objectProto.toString;\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function (arg) {\n return func(transform(arg));\n };\n}\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) !== objectTag) {\n return false;\n }\n const proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return (typeof Ctor == 'function' &&\n Ctor instanceof Ctor &&\n funcToString.call(Ctor) === objectCtorString);\n}\nexports.isPlainObject = isPlainObject;\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return symToStringTag && symToStringTag in Object(value)\n ? getRawTag(value)\n : objectToString(value);\n}\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];\n let unmasked = false;\n try {\n value[symToStringTag] = undefined;\n unmasked = true;\n }\n catch (e) {\n // silence\n }\n const result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n }\n else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n//# sourceMappingURL=lodash.merge.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.merge = void 0;\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst lodash_merge_1 = require(\"./lodash.merge\");\nconst MAX_LEVEL = 20;\n/**\n * Merges objects together\n * @param args - objects / values to be merged\n */\nfunction merge(...args) {\n let result = args.shift();\n const objects = new WeakMap();\n while (args.length > 0) {\n result = mergeTwoObjects(result, args.shift(), 0, objects);\n }\n return result;\n}\nexports.merge = merge;\nfunction takeValue(value) {\n if (isArray(value)) {\n return value.slice();\n }\n return value;\n}\n/**\n * Merges two objects\n * @param one - first object\n * @param two - second object\n * @param level - current deep level\n * @param objects - objects holder that has been already referenced - to prevent\n * cyclic dependency\n */\nfunction mergeTwoObjects(one, two, level = 0, objects) {\n let result;\n if (level > MAX_LEVEL) {\n return undefined;\n }\n level++;\n if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) {\n result = takeValue(two);\n }\n else if (isArray(one)) {\n result = one.slice();\n if (isArray(two)) {\n for (let i = 0, j = two.length; i < j; i++) {\n result.push(takeValue(two[i]));\n }\n }\n else if (isObject(two)) {\n const keys = Object.keys(two);\n for (let i = 0, j = keys.length; i < j; i++) {\n const key = keys[i];\n result[key] = takeValue(two[key]);\n }\n }\n }\n else if (isObject(one)) {\n if (isObject(two)) {\n if (!shouldMerge(one, two)) {\n return two;\n }\n result = Object.assign({}, one);\n const keys = Object.keys(two);\n for (let i = 0, j = keys.length; i < j; i++) {\n const key = keys[i];\n const twoValue = two[key];\n if (isPrimitive(twoValue)) {\n if (typeof twoValue === 'undefined') {\n delete result[key];\n }\n else {\n // result[key] = takeValue(twoValue);\n result[key] = twoValue;\n }\n }\n else {\n const obj1 = result[key];\n const obj2 = twoValue;\n if (wasObjectReferenced(one, key, objects) ||\n wasObjectReferenced(two, key, objects)) {\n delete result[key];\n }\n else {\n if (isObject(obj1) && isObject(obj2)) {\n const arr1 = objects.get(obj1) || [];\n const arr2 = objects.get(obj2) || [];\n arr1.push({ obj: one, key });\n arr2.push({ obj: two, key });\n objects.set(obj1, arr1);\n objects.set(obj2, arr2);\n }\n result[key] = mergeTwoObjects(result[key], twoValue, level, objects);\n }\n }\n }\n }\n else {\n result = two;\n }\n }\n return result;\n}\n/**\n * Function to check if object has been already reference\n * @param obj\n * @param key\n * @param objects\n */\nfunction wasObjectReferenced(obj, key, objects) {\n const arr = objects.get(obj[key]) || [];\n for (let i = 0, j = arr.length; i < j; i++) {\n const info = arr[i];\n if (info.key === key && info.obj === obj) {\n return true;\n }\n }\n return false;\n}\nfunction isArray(value) {\n return Array.isArray(value);\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}\nfunction isObject(value) {\n return (!isPrimitive(value) &&\n !isArray(value) &&\n !isFunction(value) &&\n typeof value === 'object');\n}\nfunction isPrimitive(value) {\n return (typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n typeof value === 'undefined' ||\n value instanceof Date ||\n value instanceof RegExp ||\n value === null);\n}\nfunction shouldMerge(one, two) {\n if (!(0, lodash_merge_1.isPlainObject)(one) || !(0, lodash_merge_1.isPlainObject)(two)) {\n return false;\n }\n return true;\n}\n//# sourceMappingURL=merge.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Deferred = void 0;\nclass Deferred {\n constructor() {\n this._promise = new Promise((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n }\n get promise() {\n return this._promise;\n }\n resolve(val) {\n this._resolve(val);\n }\n reject(err) {\n this._reject(err);\n }\n}\nexports.Deferred = Deferred;\n//# sourceMappingURL=promise.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TracesSamplerValues = void 0;\nvar TracesSamplerValues;\n(function (TracesSamplerValues) {\n TracesSamplerValues[\"AlwaysOff\"] = \"always_off\";\n TracesSamplerValues[\"AlwaysOn\"] = \"always_on\";\n TracesSamplerValues[\"ParentBasedAlwaysOff\"] = \"parentbased_always_off\";\n TracesSamplerValues[\"ParentBasedAlwaysOn\"] = \"parentbased_always_on\";\n TracesSamplerValues[\"ParentBasedTraceIdRatio\"] = \"parentbased_traceidratio\";\n TracesSamplerValues[\"TraceIdRatio\"] = \"traceidratio\";\n})(TracesSamplerValues = exports.TracesSamplerValues || (exports.TracesSamplerValues = {}));\n//# sourceMappingURL=sampling.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.callWithTimeout = exports.TimeoutError = void 0;\n/**\n * Error that is thrown on timeouts.\n */\nclass TimeoutError extends Error {\n constructor(message) {\n super(message);\n // manually adjust prototype to retain `instanceof` functionality when targeting ES5, see:\n // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, TimeoutError.prototype);\n }\n}\nexports.TimeoutError = TimeoutError;\n/**\n * Adds a timeout to a promise and rejects if the specified timeout has elapsed. Also rejects if the specified promise\n * rejects, and resolves if the specified promise resolves.\n *\n *

NOTE: this operation will continue even after it throws a {@link TimeoutError}.\n *\n * @param promise promise to use with timeout.\n * @param timeout the timeout in milliseconds until the returned promise is rejected.\n */\nfunction callWithTimeout(promise, timeout) {\n let timeoutHandle;\n const timeoutPromise = new Promise(function timeoutFunction(_resolve, reject) {\n timeoutHandle = setTimeout(function timeoutHandler() {\n reject(new TimeoutError('Operation timed out.'));\n }, timeout);\n });\n return Promise.race([promise, timeoutPromise]).then(result => {\n clearTimeout(timeoutHandle);\n return result;\n }, reason => {\n clearTimeout(timeoutHandle);\n throw reason;\n });\n}\nexports.callWithTimeout = callWithTimeout;\n//# sourceMappingURL=timeout.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isUrlIgnored = exports.urlMatches = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction urlMatches(url, urlToMatch) {\n if (typeof urlToMatch === 'string') {\n return url === urlToMatch;\n }\n else {\n return !!url.match(urlToMatch);\n }\n}\nexports.urlMatches = urlMatches;\n/**\n * Check if {@param url} should be ignored when comparing against {@param ignoredUrls}\n * @param url\n * @param ignoredUrls\n */\nfunction isUrlIgnored(url, ignoredUrls) {\n if (!ignoredUrls) {\n return false;\n }\n for (const ignoreUrl of ignoredUrls) {\n if (urlMatches(url, ignoreUrl)) {\n return true;\n }\n }\n return false;\n}\nexports.isUrlIgnored = isUrlIgnored;\n//# sourceMappingURL=url.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isWrapped = void 0;\n/**\n * Checks if certain function has been already wrapped\n * @param func\n */\nfunction isWrapped(func) {\n return (typeof func === 'function' &&\n typeof func.__original === 'function' &&\n typeof func.__unwrap === 'function' &&\n func.__wrapped === true);\n}\nexports.isWrapped = isWrapped;\n//# sourceMappingURL=wrap.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VERSION = void 0;\n// this is autogenerated file, see scripts/version-update.js\nexports.VERSION = '1.26.0';\n//# sourceMappingURL=version.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/* eslint no-restricted-syntax: [\"warn\", \"ExportAllDeclaration\"] --\n * TODO: Replace export * with named exports before next major version\n */\n__exportStar(require(\"./platform\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/* eslint no-restricted-syntax: [\"warn\", \"ExportAllDeclaration\"] --\n * TODO: Replace export * with named exports before next major version\n */\n__exportStar(require(\"./node\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPTraceExporter = void 0;\nconst core_1 = require(\"@opentelemetry/core\");\nconst otlp_exporter_base_1 = require(\"@opentelemetry/otlp-exporter-base\");\nconst otlp_exporter_base_2 = require(\"@opentelemetry/otlp-exporter-base\");\nconst version_1 = require(\"../../version\");\nconst otlp_transformer_1 = require(\"@opentelemetry/otlp-transformer\");\nconst DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';\nconst DEFAULT_COLLECTOR_URL = `http://localhost:4318/${DEFAULT_COLLECTOR_RESOURCE_PATH}`;\nconst USER_AGENT = {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${version_1.VERSION}`,\n};\n/**\n * Collector Trace Exporter for Node\n */\nclass OTLPTraceExporter extends otlp_exporter_base_1.OTLPExporterNodeBase {\n constructor(config = {}) {\n super(config, otlp_transformer_1.JsonTraceSerializer, Object.assign(Object.assign(Object.assign(Object.assign({}, core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_HEADERS)), (0, otlp_exporter_base_1.parseHeaders)(config === null || config === void 0 ? void 0 : config.headers)), USER_AGENT), { 'Content-Type': 'application/json' }));\n }\n getDefaultUrl(config) {\n if (typeof config.url === 'string') {\n return config.url;\n }\n const env = (0, core_1.getEnv)();\n if (env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0) {\n return (0, otlp_exporter_base_2.appendRootPathToUrlIfNeeded)(env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT);\n }\n if (env.OTEL_EXPORTER_OTLP_ENDPOINT.length > 0) {\n return (0, otlp_exporter_base_2.appendResourcePathToUrl)(env.OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH);\n }\n return DEFAULT_COLLECTOR_URL;\n }\n}\nexports.OTLPTraceExporter = OTLPTraceExporter;\n//# sourceMappingURL=OTLPTraceExporter.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/* eslint no-restricted-syntax: [\"warn\", \"ExportAllDeclaration\"] --\n * TODO: Replace export * with named exports before next major version\n */\n__exportStar(require(\"./OTLPTraceExporter\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VERSION = void 0;\n// this is autogenerated file, see scripts/version-update.js\nexports.VERSION = '0.53.0';\n//# sourceMappingURL=version.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPExporterBase = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst util_1 = require(\"./util\");\n/**\n * Collector Exporter abstract base class\n */\nclass OTLPExporterBase {\n /**\n * @param config\n */\n constructor(config = {}) {\n this._sendingPromises = [];\n this.url = this.getDefaultUrl(config);\n if (typeof config.hostname === 'string') {\n this.hostname = config.hostname;\n }\n this.shutdown = this.shutdown.bind(this);\n this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this);\n this._concurrencyLimit =\n typeof config.concurrencyLimit === 'number'\n ? config.concurrencyLimit\n : 30;\n this.timeoutMillis = (0, util_1.configureExporterTimeout)(config.timeoutMillis);\n // platform dependent\n this.onInit(config);\n }\n /**\n * Export items.\n * @param items\n * @param resultCallback\n */\n export(items, resultCallback) {\n if (this._shutdownOnce.isCalled) {\n resultCallback({\n code: core_1.ExportResultCode.FAILED,\n error: new Error('Exporter has been shutdown'),\n });\n return;\n }\n if (this._sendingPromises.length >= this._concurrencyLimit) {\n resultCallback({\n code: core_1.ExportResultCode.FAILED,\n error: new Error('Concurrent export limit reached'),\n });\n return;\n }\n this._export(items)\n .then(() => {\n resultCallback({ code: core_1.ExportResultCode.SUCCESS });\n })\n .catch((error) => {\n resultCallback({ code: core_1.ExportResultCode.FAILED, error });\n });\n }\n _export(items) {\n return new Promise((resolve, reject) => {\n try {\n api_1.diag.debug('items to be sent', items);\n this.send(items, resolve, reject);\n }\n catch (e) {\n reject(e);\n }\n });\n }\n /**\n * Shutdown the exporter.\n */\n shutdown() {\n return this._shutdownOnce.call();\n }\n /**\n * Exports any pending spans in the exporter\n */\n forceFlush() {\n return Promise.all(this._sendingPromises).then(() => {\n /** ignore resolved values */\n });\n }\n /**\n * Called by _shutdownOnce with BindOnceFuture\n */\n _shutdown() {\n api_1.diag.debug('shutdown started');\n this.onShutdown();\n return this.forceFlush();\n }\n}\nexports.OTLPExporterBase = OTLPExporterBase;\n//# sourceMappingURL=OTLPExporterBase.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.invalidTimeout = exports.configureExporterTimeout = exports.appendRootPathToUrlIfNeeded = exports.appendResourcePathToUrl = exports.parseHeaders = exports.OTLPExporterError = exports.OTLPExporterBase = void 0;\n/* eslint no-restricted-syntax: [\"warn\", \"ExportAllDeclaration\"] --\n * TODO: Replace export * with named exports before next major version\n */\n__exportStar(require(\"./platform\"), exports);\nvar OTLPExporterBase_1 = require(\"./OTLPExporterBase\");\nObject.defineProperty(exports, \"OTLPExporterBase\", { enumerable: true, get: function () { return OTLPExporterBase_1.OTLPExporterBase; } });\nvar types_1 = require(\"./types\");\nObject.defineProperty(exports, \"OTLPExporterError\", { enumerable: true, get: function () { return types_1.OTLPExporterError; } });\nvar util_1 = require(\"./util\");\nObject.defineProperty(exports, \"parseHeaders\", { enumerable: true, get: function () { return util_1.parseHeaders; } });\nObject.defineProperty(exports, \"appendResourcePathToUrl\", { enumerable: true, get: function () { return util_1.appendResourcePathToUrl; } });\nObject.defineProperty(exports, \"appendRootPathToUrlIfNeeded\", { enumerable: true, get: function () { return util_1.appendRootPathToUrlIfNeeded; } });\nObject.defineProperty(exports, \"configureExporterTimeout\", { enumerable: true, get: function () { return util_1.configureExporterTimeout; } });\nObject.defineProperty(exports, \"invalidTimeout\", { enumerable: true, get: function () { return util_1.invalidTimeout; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseRetryAfterToMills = exports.isExportRetryable = void 0;\nfunction isExportRetryable(statusCode) {\n const retryCodes = [429, 502, 503, 504];\n return retryCodes.includes(statusCode);\n}\nexports.isExportRetryable = isExportRetryable;\nfunction parseRetryAfterToMills(retryAfter) {\n if (retryAfter == null) {\n return undefined;\n }\n const seconds = Number.parseInt(retryAfter, 10);\n if (Number.isInteger(seconds)) {\n return seconds > 0 ? seconds * 1000 : -1;\n }\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After#directives\n const delay = new Date(retryAfter).getTime() - Date.now();\n if (delay >= 0) {\n return delay;\n }\n return 0;\n}\nexports.parseRetryAfterToMills = parseRetryAfterToMills;\n//# sourceMappingURL=is-export-retryable.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPExporterBrowserBase = void 0;\nconst OTLPExporterBase_1 = require(\"../../OTLPExporterBase\");\nconst types_1 = require(\"../../types\");\nconst util_1 = require(\"../../util\");\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst xhr_transport_1 = require(\"./xhr-transport\");\nconst send_beacon_transport_1 = require(\"./send-beacon-transport\");\nconst retrying_transport_1 = require(\"../../retrying-transport\");\n/**\n * Collector Metric Exporter abstract base class\n */\nclass OTLPExporterBrowserBase extends OTLPExporterBase_1.OTLPExporterBase {\n /**\n * @param config\n * @param serializer\n * @param contentType\n */\n constructor(config = {}, serializer, contentType) {\n super(config);\n this._serializer = serializer;\n const useXhr = !!config.headers || typeof navigator.sendBeacon !== 'function';\n if (useXhr) {\n this._transport = (0, retrying_transport_1.createRetryingTransport)({\n transport: (0, xhr_transport_1.createXhrTransport)({\n headers: Object.assign({}, (0, util_1.parseHeaders)(config.headers), core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_HEADERS), { 'Content-Type': contentType }),\n url: this.url,\n }),\n });\n }\n else {\n // sendBeacon has no way to signal retry, so we do not wrap it in a RetryingTransport\n this._transport = (0, send_beacon_transport_1.createSendBeaconTransport)({\n url: this.url,\n blobType: contentType,\n });\n }\n }\n onInit() { }\n onShutdown() { }\n send(objects, onSuccess, onError) {\n if (this._shutdownOnce.isCalled) {\n api_1.diag.debug('Shutdown already started. Cannot send objects');\n return;\n }\n const data = this._serializer.serializeRequest(objects);\n if (data == null) {\n onError(new Error('Could not serialize message'));\n return;\n }\n const promise = this._transport\n .send(data, this.timeoutMillis)\n .then(response => {\n if (response.status === 'success') {\n onSuccess();\n }\n else if (response.status === 'failure' && response.error) {\n onError(response.error);\n }\n else if (response.status === 'retryable') {\n onError(new types_1.OTLPExporterError('Export failed with retryable status'));\n }\n else {\n onError(new types_1.OTLPExporterError('Export failed with unknown error'));\n }\n }, onError);\n this._sendingPromises.push(promise);\n const popPromise = () => {\n const index = this._sendingPromises.indexOf(promise);\n this._sendingPromises.splice(index, 1);\n };\n promise.then(popPromise, popPromise);\n }\n}\nexports.OTLPExporterBrowserBase = OTLPExporterBrowserBase;\n//# sourceMappingURL=OTLPExporterBrowserBase.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPExporterBrowserBase = void 0;\nvar OTLPExporterBrowserBase_1 = require(\"./OTLPExporterBrowserBase\");\nObject.defineProperty(exports, \"OTLPExporterBrowserBase\", { enumerable: true, get: function () { return OTLPExporterBrowserBase_1.OTLPExporterBrowserBase; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createSendBeaconTransport = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nclass SendBeaconTransport {\n constructor(_params) {\n this._params = _params;\n }\n send(data) {\n return new Promise(resolve => {\n if (navigator.sendBeacon(this._params.url, new Blob([data], { type: this._params.blobType }))) {\n // no way to signal retry, treat everything as success\n api_1.diag.debug('SendBeacon success');\n resolve({\n status: 'success',\n });\n }\n else {\n resolve({\n status: 'failure',\n error: new Error('SendBeacon failed'),\n });\n }\n });\n }\n shutdown() {\n // Intentionally left empty, nothing to do.\n }\n}\nfunction createSendBeaconTransport(parameters) {\n return new SendBeaconTransport(parameters);\n}\nexports.createSendBeaconTransport = createSendBeaconTransport;\n//# sourceMappingURL=send-beacon-transport.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createXhrTransport = void 0;\nconst util_1 = require(\"../../util\");\nconst api_1 = require(\"@opentelemetry/api\");\nclass XhrTransport {\n constructor(_parameters) {\n this._parameters = _parameters;\n }\n send(data, timeoutMillis) {\n return new Promise(resolve => {\n const xhr = new XMLHttpRequest();\n xhr.timeout = timeoutMillis;\n xhr.open('POST', this._parameters.url);\n Object.entries(this._parameters.headers).forEach(([k, v]) => {\n xhr.setRequestHeader(k, v);\n });\n xhr.ontimeout = _ => {\n resolve({\n status: 'failure',\n error: new Error('XHR request timed out'),\n });\n };\n xhr.onreadystatechange = () => {\n if (xhr.status >= 200 && xhr.status <= 299) {\n api_1.diag.debug('XHR success');\n resolve({\n status: 'success',\n });\n }\n else if (xhr.status && (0, util_1.isExportRetryable)(xhr.status)) {\n resolve({\n status: 'retryable',\n retryInMillis: (0, util_1.parseRetryAfterToMills)(xhr.getResponseHeader('Retry-After')),\n });\n }\n else if (xhr.status !== 0) {\n resolve({\n status: 'failure',\n error: new Error('XHR request failed with non-retryable status'),\n });\n }\n };\n xhr.onabort = () => {\n resolve({\n status: 'failure',\n error: new Error('XHR request aborted'),\n });\n };\n xhr.onerror = () => {\n resolve({\n status: 'failure',\n error: new Error('XHR request errored'),\n });\n };\n xhr.send(new Blob([data], { type: this._parameters.headers['Content-Type'] }));\n });\n }\n shutdown() {\n // Intentionally left empty, nothing to do.\n }\n}\n/**\n * Creates an exporter transport that uses XHR to send the data\n * @param parameters applied to each request made by transport\n */\nfunction createXhrTransport(parameters) {\n return new XhrTransport(parameters);\n}\nexports.createXhrTransport = createXhrTransport;\n//# sourceMappingURL=xhr-transport.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPExporterBrowserBase = exports.CompressionAlgorithm = exports.OTLPExporterNodeBase = void 0;\nvar node_1 = require(\"./node\");\nObject.defineProperty(exports, \"OTLPExporterNodeBase\", { enumerable: true, get: function () { return node_1.OTLPExporterNodeBase; } });\nObject.defineProperty(exports, \"CompressionAlgorithm\", { enumerable: true, get: function () { return node_1.CompressionAlgorithm; } });\nvar browser_1 = require(\"./browser\");\nObject.defineProperty(exports, \"OTLPExporterBrowserBase\", { enumerable: true, get: function () { return browser_1.OTLPExporterBrowserBase; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPExporterNodeBase = void 0;\nconst OTLPExporterBase_1 = require(\"../../OTLPExporterBase\");\nconst util_1 = require(\"./util\");\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst http_exporter_transport_1 = require(\"./http-exporter-transport\");\nconst types_1 = require(\"../../types\");\nconst retrying_transport_1 = require(\"../../retrying-transport\");\n/**\n * Collector Metric Exporter abstract base class\n */\nclass OTLPExporterNodeBase extends OTLPExporterBase_1.OTLPExporterBase {\n constructor(config = {}, serializer, signalSpecificHeaders) {\n var _a;\n super(config);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (config.metadata) {\n api_1.diag.warn('Metadata cannot be set when using http');\n }\n this._serializer = serializer;\n // populate keepAlive for use with new settings\n if ((config === null || config === void 0 ? void 0 : config.keepAlive) != null) {\n if (config.httpAgentOptions != null) {\n if (config.httpAgentOptions.keepAlive == null) {\n // specific setting is not set, populate with non-specific setting.\n config.httpAgentOptions.keepAlive = config.keepAlive;\n }\n // do nothing, use specific setting otherwise\n }\n else {\n // populate specific option if AgentOptions does not exist.\n config.httpAgentOptions = {\n keepAlive: config.keepAlive,\n };\n }\n }\n const nonSignalSpecificHeaders = core_1.baggageUtils.parseKeyPairsIntoRecord((0, core_1.getEnv)().OTEL_EXPORTER_OTLP_HEADERS);\n this._transport = (0, retrying_transport_1.createRetryingTransport)({\n transport: (0, http_exporter_transport_1.createHttpExporterTransport)({\n agentOptions: (_a = config.httpAgentOptions) !== null && _a !== void 0 ? _a : { keepAlive: true },\n compression: (0, util_1.configureCompression)(config.compression),\n headers: Object.assign({}, nonSignalSpecificHeaders, signalSpecificHeaders),\n url: this.url,\n }),\n });\n }\n onInit(_config) { }\n send(objects, onSuccess, onError) {\n if (this._shutdownOnce.isCalled) {\n api_1.diag.debug('Shutdown already started. Cannot send objects');\n return;\n }\n const data = this._serializer.serializeRequest(objects);\n if (data == null) {\n onError(new Error('Could not serialize message'));\n return;\n }\n const promise = this._transport\n .send(data, this.timeoutMillis)\n .then(response => {\n if (response.status === 'success') {\n onSuccess();\n }\n else if (response.status === 'failure' && response.error) {\n onError(response.error);\n }\n else if (response.status === 'retryable') {\n onError(new types_1.OTLPExporterError('Export failed with retryable status'));\n }\n else {\n onError(new types_1.OTLPExporterError('Export failed with unknown error'));\n }\n }, onError);\n this._sendingPromises.push(promise);\n const popPromise = () => {\n const index = this._sendingPromises.indexOf(promise);\n this._sendingPromises.splice(index, 1);\n };\n promise.then(popPromise, popPromise);\n }\n onShutdown() { }\n}\nexports.OTLPExporterNodeBase = OTLPExporterNodeBase;\n//# sourceMappingURL=OTLPExporterNodeBase.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createHttpExporterTransport = void 0;\nclass HttpExporterTransport {\n constructor(_parameters) {\n this._parameters = _parameters;\n this._send = null;\n this._agent = null;\n }\n async send(data, timeoutMillis) {\n if (this._send == null) {\n // Lazy require to ensure that http/https is not required before instrumentations can wrap it.\n const { sendWithHttp, createHttpAgent,\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n } = require('./http-transport-utils');\n this._agent = createHttpAgent(this._parameters.url, this._parameters.agentOptions);\n this._send = sendWithHttp;\n }\n return new Promise(resolve => {\n var _a;\n // this will always be defined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n (_a = this._send) === null || _a === void 0 ? void 0 : _a.call(this, this._parameters, this._agent, data, result => {\n resolve(result);\n }, timeoutMillis);\n });\n }\n shutdown() {\n // intentionally left empty, nothing to do.\n }\n}\nfunction createHttpExporterTransport(parameters) {\n return new HttpExporterTransport(parameters);\n}\nexports.createHttpExporterTransport = createHttpExporterTransport;\n//# sourceMappingURL=http-exporter-transport.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createHttpAgent = exports.sendWithHttp = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst http = require(\"http\");\nconst https = require(\"https\");\nconst zlib = require(\"zlib\");\nconst stream_1 = require(\"stream\");\nconst is_export_retryable_1 = require(\"../../is-export-retryable\");\nconst types_1 = require(\"../../types\");\n/**\n * Sends data using http\n * @param params\n * @param agent\n * @param data\n * @param onDone\n * @param timeoutMillis\n */\nfunction sendWithHttp(params, agent, data, onDone, timeoutMillis) {\n const parsedUrl = new URL(params.url);\n const nodeVersion = Number(process.versions.node.split('.')[0]);\n const options = {\n hostname: parsedUrl.hostname,\n port: parsedUrl.port,\n path: parsedUrl.pathname,\n method: 'POST',\n headers: Object.assign({}, params.headers),\n agent: agent,\n };\n const request = parsedUrl.protocol === 'http:' ? http.request : https.request;\n const req = request(options, (res) => {\n const responseData = [];\n res.on('data', chunk => responseData.push(chunk));\n res.on('end', () => {\n if (res.statusCode && res.statusCode < 299) {\n onDone({\n status: 'success',\n data: Buffer.concat(responseData),\n });\n }\n else if (res.statusCode && (0, is_export_retryable_1.isExportRetryable)(res.statusCode)) {\n onDone({\n status: 'retryable',\n retryInMillis: (0, is_export_retryable_1.parseRetryAfterToMills)(res.headers['retry-after']),\n });\n }\n else {\n const error = new types_1.OTLPExporterError(res.statusMessage, res.statusCode);\n onDone({\n status: 'failure',\n error,\n });\n }\n });\n });\n req.setTimeout(timeoutMillis, () => {\n req.destroy();\n onDone({\n status: 'failure',\n error: new Error('Request Timeout'),\n });\n });\n req.on('error', (error) => {\n onDone({\n status: 'failure',\n error: error,\n });\n });\n const reportTimeoutErrorEvent = nodeVersion >= 14 ? 'close' : 'abort';\n req.on(reportTimeoutErrorEvent, () => {\n onDone({\n status: 'failure',\n error: new Error('Request timed out'),\n });\n });\n compressAndSend(req, params.compression, data, (error) => {\n onDone({\n status: 'failure',\n error,\n });\n });\n}\nexports.sendWithHttp = sendWithHttp;\nfunction compressAndSend(req, compression, data, onError) {\n let dataStream = readableFromUint8Array(data);\n if (compression === 'gzip') {\n req.setHeader('Content-Encoding', 'gzip');\n dataStream = dataStream\n .on('error', onError)\n .pipe(zlib.createGzip())\n .on('error', onError);\n }\n dataStream.pipe(req);\n}\nfunction readableFromUint8Array(buff) {\n const readable = new stream_1.Readable();\n readable.push(buff);\n readable.push(null);\n return readable;\n}\nfunction createHttpAgent(rawUrl, agentOptions) {\n const parsedUrl = new URL(rawUrl);\n const Agent = parsedUrl.protocol === 'http:' ? http.Agent : https.Agent;\n return new Agent(agentOptions);\n}\nexports.createHttpAgent = createHttpAgent;\n//# sourceMappingURL=http-transport-utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompressionAlgorithm = exports.OTLPExporterNodeBase = void 0;\nvar OTLPExporterNodeBase_1 = require(\"./OTLPExporterNodeBase\");\nObject.defineProperty(exports, \"OTLPExporterNodeBase\", { enumerable: true, get: function () { return OTLPExporterNodeBase_1.OTLPExporterNodeBase; } });\nvar types_1 = require(\"./types\");\nObject.defineProperty(exports, \"CompressionAlgorithm\", { enumerable: true, get: function () { return types_1.CompressionAlgorithm; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CompressionAlgorithm = void 0;\nvar CompressionAlgorithm;\n(function (CompressionAlgorithm) {\n CompressionAlgorithm[\"NONE\"] = \"none\";\n CompressionAlgorithm[\"GZIP\"] = \"gzip\";\n})(CompressionAlgorithm = exports.CompressionAlgorithm || (exports.CompressionAlgorithm = {}));\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.configureCompression = void 0;\nconst types_1 = require(\"./types\");\nconst core_1 = require(\"@opentelemetry/core\");\nfunction configureCompression(compression) {\n if (compression) {\n return compression;\n }\n else {\n const definedCompression = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_COMPRESSION ||\n (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_COMPRESSION;\n return definedCompression === types_1.CompressionAlgorithm.GZIP\n ? types_1.CompressionAlgorithm.GZIP\n : types_1.CompressionAlgorithm.NONE;\n }\n}\nexports.configureCompression = configureCompression;\n//# sourceMappingURL=util.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createRetryingTransport = void 0;\nconst MAX_ATTEMPTS = 5;\nconst INITIAL_BACKOFF = 1000;\nconst MAX_BACKOFF = 5000;\nconst BACKOFF_MULTIPLIER = 1.5;\nconst JITTER = 0.2;\n/**\n * Get a pseudo-random jitter that falls in the range of [-JITTER, +JITTER]\n */\nfunction getJitter() {\n return Math.random() * (2 * JITTER) - JITTER;\n}\nclass RetryingTransport {\n constructor(_transport) {\n this._transport = _transport;\n }\n retry(data, timeoutMillis, inMillis) {\n return new Promise((resolve, reject) => {\n setTimeout(() => {\n this._transport.send(data, timeoutMillis).then(resolve, reject);\n }, inMillis);\n });\n }\n async send(data, timeoutMillis) {\n var _a;\n const deadline = Date.now() + timeoutMillis;\n let result = await this._transport.send(data, timeoutMillis);\n let attempts = MAX_ATTEMPTS;\n let nextBackoff = INITIAL_BACKOFF;\n while (result.status === 'retryable' && attempts > 0) {\n attempts--;\n // use maximum of computed backoff and 0 to avoid negative timeouts\n const backoff = Math.max(Math.min(nextBackoff, MAX_BACKOFF) + getJitter(), 0);\n nextBackoff = nextBackoff * BACKOFF_MULTIPLIER;\n const retryInMillis = (_a = result.retryInMillis) !== null && _a !== void 0 ? _a : backoff;\n // return when expected retry time is after the export deadline.\n const remainingTimeoutMillis = deadline - Date.now();\n if (retryInMillis > remainingTimeoutMillis) {\n return result;\n }\n result = await this.retry(data, remainingTimeoutMillis, retryInMillis);\n }\n return result;\n }\n shutdown() {\n return this._transport.shutdown();\n }\n}\n/**\n * Creates an Exporter Transport that retries on 'retryable' response.\n */\nfunction createRetryingTransport(options) {\n return new RetryingTransport(options.transport);\n}\nexports.createRetryingTransport = createRetryingTransport;\n//# sourceMappingURL=retrying-transport.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OTLPExporterError = void 0;\n/**\n * Interface for handling error\n */\nclass OTLPExporterError extends Error {\n constructor(message, code, data) {\n super(message);\n this.name = 'OTLPExporterError';\n this.data = data;\n this.code = code;\n }\n}\nexports.OTLPExporterError = OTLPExporterError;\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseRetryAfterToMills = exports.isExportRetryable = exports.invalidTimeout = exports.configureExporterTimeout = exports.appendRootPathToUrlIfNeeded = exports.appendResourcePathToUrl = exports.parseHeaders = exports.DEFAULT_EXPORT_BACKOFF_MULTIPLIER = exports.DEFAULT_EXPORT_MAX_BACKOFF = exports.DEFAULT_EXPORT_INITIAL_BACKOFF = exports.DEFAULT_EXPORT_MAX_ATTEMPTS = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst DEFAULT_TRACE_TIMEOUT = 10000;\nexports.DEFAULT_EXPORT_MAX_ATTEMPTS = 5;\nexports.DEFAULT_EXPORT_INITIAL_BACKOFF = 1000;\nexports.DEFAULT_EXPORT_MAX_BACKOFF = 5000;\nexports.DEFAULT_EXPORT_BACKOFF_MULTIPLIER = 1.5;\n/**\n * Parses headers from config leaving only those that have defined values\n * @param partialHeaders\n */\nfunction parseHeaders(partialHeaders = {}) {\n const headers = {};\n Object.entries(partialHeaders).forEach(([key, value]) => {\n if (typeof value !== 'undefined') {\n headers[key] = String(value);\n }\n else {\n api_1.diag.warn(`Header \"${key}\" has invalid value (${value}) and will be ignored`);\n }\n });\n return headers;\n}\nexports.parseHeaders = parseHeaders;\n/**\n * Adds path (version + signal) to a no per-signal endpoint\n * @param url\n * @param path\n * @returns url + path\n */\nfunction appendResourcePathToUrl(url, path) {\n if (!url.endsWith('/')) {\n url = url + '/';\n }\n return url + path;\n}\nexports.appendResourcePathToUrl = appendResourcePathToUrl;\n/**\n * Adds root path to signal specific endpoint when endpoint contains no path part and no root path\n * @param url\n * @returns url\n */\nfunction appendRootPathToUrlIfNeeded(url) {\n try {\n const parsedUrl = new URL(url);\n if (parsedUrl.pathname === '') {\n parsedUrl.pathname = parsedUrl.pathname + '/';\n }\n return parsedUrl.toString();\n }\n catch (_a) {\n api_1.diag.warn(`Could not parse export URL: '${url}'`);\n return url;\n }\n}\nexports.appendRootPathToUrlIfNeeded = appendRootPathToUrlIfNeeded;\n/**\n * Configure exporter trace timeout value from passed in value or environment variables\n * @param timeoutMillis\n * @returns timeout value in milliseconds\n */\nfunction configureExporterTimeout(timeoutMillis) {\n if (typeof timeoutMillis === 'number') {\n if (timeoutMillis <= 0) {\n // OTLP exporter configured timeout - using default value of 10000ms\n return invalidTimeout(timeoutMillis, DEFAULT_TRACE_TIMEOUT);\n }\n return timeoutMillis;\n }\n else {\n return getExporterTimeoutFromEnv();\n }\n}\nexports.configureExporterTimeout = configureExporterTimeout;\nfunction getExporterTimeoutFromEnv() {\n var _a;\n const definedTimeout = Number((_a = (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT) !== null && _a !== void 0 ? _a : (0, core_1.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);\n if (definedTimeout <= 0) {\n // OTLP exporter configured timeout - using default value of 10000ms\n return invalidTimeout(definedTimeout, DEFAULT_TRACE_TIMEOUT);\n }\n else {\n return definedTimeout;\n }\n}\n// OTLP exporter configured timeout - using default value of 10000ms\nfunction invalidTimeout(timeout, defaultTimeout) {\n api_1.diag.warn('Timeout must be greater than 0', timeout);\n return defaultTimeout;\n}\nexports.invalidTimeout = invalidTimeout;\nfunction isExportRetryable(statusCode) {\n const retryCodes = [429, 502, 503, 504];\n return retryCodes.includes(statusCode);\n}\nexports.isExportRetryable = isExportRetryable;\nfunction parseRetryAfterToMills(retryAfter) {\n if (retryAfter == null) {\n return -1;\n }\n const seconds = Number.parseInt(retryAfter, 10);\n if (Number.isInteger(seconds)) {\n return seconds > 0 ? seconds * 1000 : -1;\n }\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After#directives\n const delay = new Date(retryAfter).getTime() - Date.now();\n if (delay >= 0) {\n return delay;\n }\n return 0;\n}\nexports.parseRetryAfterToMills = parseRetryAfterToMills;\n//# sourceMappingURL=util.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOtlpEncoder = exports.encodeAsString = exports.encodeAsLongBits = exports.toLongBits = exports.hrTimeToNanos = void 0;\nconst core_1 = require(\"@opentelemetry/core\");\nfunction hrTimeToNanos(hrTime) {\n const NANOSECONDS = BigInt(1000000000);\n return BigInt(hrTime[0]) * NANOSECONDS + BigInt(hrTime[1]);\n}\nexports.hrTimeToNanos = hrTimeToNanos;\nfunction toLongBits(value) {\n const low = Number(BigInt.asUintN(32, value));\n const high = Number(BigInt.asUintN(32, value >> BigInt(32)));\n return { low, high };\n}\nexports.toLongBits = toLongBits;\nfunction encodeAsLongBits(hrTime) {\n const nanos = hrTimeToNanos(hrTime);\n return toLongBits(nanos);\n}\nexports.encodeAsLongBits = encodeAsLongBits;\nfunction encodeAsString(hrTime) {\n const nanos = hrTimeToNanos(hrTime);\n return nanos.toString();\n}\nexports.encodeAsString = encodeAsString;\nconst encodeTimestamp = typeof BigInt !== 'undefined' ? encodeAsString : core_1.hrTimeToNanoseconds;\nfunction identity(value) {\n return value;\n}\nfunction optionalHexToBinary(str) {\n if (str === undefined)\n return undefined;\n return (0, core_1.hexToBinary)(str);\n}\nconst DEFAULT_ENCODER = {\n encodeHrTime: encodeAsLongBits,\n encodeSpanContext: core_1.hexToBinary,\n encodeOptionalSpanContext: optionalHexToBinary,\n};\nfunction getOtlpEncoder(options) {\n var _a, _b;\n if (options === undefined) {\n return DEFAULT_ENCODER;\n }\n const useLongBits = (_a = options.useLongBits) !== null && _a !== void 0 ? _a : true;\n const useHex = (_b = options.useHex) !== null && _b !== void 0 ? _b : false;\n return {\n encodeHrTime: useLongBits ? encodeAsLongBits : encodeTimestamp,\n encodeSpanContext: useHex ? identity : core_1.hexToBinary,\n encodeOptionalSpanContext: useHex ? identity : optionalHexToBinary,\n };\n}\nexports.getOtlpEncoder = getOtlpEncoder;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toAnyValue = exports.toKeyValue = exports.toAttributes = exports.createInstrumentationScope = void 0;\nfunction createInstrumentationScope(scope) {\n return {\n name: scope.name,\n version: scope.version,\n };\n}\nexports.createInstrumentationScope = createInstrumentationScope;\nfunction toAttributes(attributes) {\n return Object.keys(attributes).map(key => toKeyValue(key, attributes[key]));\n}\nexports.toAttributes = toAttributes;\nfunction toKeyValue(key, value) {\n return {\n key: key,\n value: toAnyValue(value),\n };\n}\nexports.toKeyValue = toKeyValue;\nfunction toAnyValue(value) {\n const t = typeof value;\n if (t === 'string')\n return { stringValue: value };\n if (t === 'number') {\n if (!Number.isInteger(value))\n return { doubleValue: value };\n return { intValue: value };\n }\n if (t === 'boolean')\n return { boolValue: value };\n if (value instanceof Uint8Array)\n return { bytesValue: value };\n if (Array.isArray(value))\n return { arrayValue: { values: value.map(toAnyValue) } };\n if (t === 'object' && value != null)\n return {\n kvlistValue: {\n values: Object.entries(value).map(([k, v]) => toKeyValue(k, v)),\n },\n };\n return {};\n}\nexports.toAnyValue = toAnyValue;\n//# sourceMappingURL=internal.js.map","/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/\n\"use strict\";\nvar $protobuf = require(\"protobufjs/minimal\");\n// Common aliases\nvar $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;\n// Exported root namespace\nvar $root = $protobuf.roots[\"default\"] || ($protobuf.roots[\"default\"] = {});\n$root.opentelemetry = (function () {\n /**\n * Namespace opentelemetry.\n * @exports opentelemetry\n * @namespace\n */\n var opentelemetry = {};\n opentelemetry.proto = (function () {\n /**\n * Namespace proto.\n * @memberof opentelemetry\n * @namespace\n */\n var proto = {};\n proto.common = (function () {\n /**\n * Namespace common.\n * @memberof opentelemetry.proto\n * @namespace\n */\n var common = {};\n common.v1 = (function () {\n /**\n * Namespace v1.\n * @memberof opentelemetry.proto.common\n * @namespace\n */\n var v1 = {};\n v1.AnyValue = (function () {\n /**\n * Properties of an AnyValue.\n * @memberof opentelemetry.proto.common.v1\n * @interface IAnyValue\n * @property {string|null} [stringValue] AnyValue stringValue\n * @property {boolean|null} [boolValue] AnyValue boolValue\n * @property {number|Long|null} [intValue] AnyValue intValue\n * @property {number|null} [doubleValue] AnyValue doubleValue\n * @property {opentelemetry.proto.common.v1.IArrayValue|null} [arrayValue] AnyValue arrayValue\n * @property {opentelemetry.proto.common.v1.IKeyValueList|null} [kvlistValue] AnyValue kvlistValue\n * @property {Uint8Array|null} [bytesValue] AnyValue bytesValue\n */\n /**\n * Constructs a new AnyValue.\n * @memberof opentelemetry.proto.common.v1\n * @classdesc Represents an AnyValue.\n * @implements IAnyValue\n * @constructor\n * @param {opentelemetry.proto.common.v1.IAnyValue=} [properties] Properties to set\n */\n function AnyValue(properties) {\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * AnyValue stringValue.\n * @member {string|null|undefined} stringValue\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @instance\n */\n AnyValue.prototype.stringValue = null;\n /**\n * AnyValue boolValue.\n * @member {boolean|null|undefined} boolValue\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @instance\n */\n AnyValue.prototype.boolValue = null;\n /**\n * AnyValue intValue.\n * @member {number|Long|null|undefined} intValue\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @instance\n */\n AnyValue.prototype.intValue = null;\n /**\n * AnyValue doubleValue.\n * @member {number|null|undefined} doubleValue\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @instance\n */\n AnyValue.prototype.doubleValue = null;\n /**\n * AnyValue arrayValue.\n * @member {opentelemetry.proto.common.v1.IArrayValue|null|undefined} arrayValue\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @instance\n */\n AnyValue.prototype.arrayValue = null;\n /**\n * AnyValue kvlistValue.\n * @member {opentelemetry.proto.common.v1.IKeyValueList|null|undefined} kvlistValue\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @instance\n */\n AnyValue.prototype.kvlistValue = null;\n /**\n * AnyValue bytesValue.\n * @member {Uint8Array|null|undefined} bytesValue\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @instance\n */\n AnyValue.prototype.bytesValue = null;\n // OneOf field names bound to virtual getters and setters\n var $oneOfFields;\n /**\n * AnyValue value.\n * @member {\"stringValue\"|\"boolValue\"|\"intValue\"|\"doubleValue\"|\"arrayValue\"|\"kvlistValue\"|\"bytesValue\"|undefined} value\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @instance\n */\n Object.defineProperty(AnyValue.prototype, \"value\", {\n get: $util.oneOfGetter($oneOfFields = [\"stringValue\", \"boolValue\", \"intValue\", \"doubleValue\", \"arrayValue\", \"kvlistValue\", \"bytesValue\"]),\n set: $util.oneOfSetter($oneOfFields)\n });\n /**\n * Creates a new AnyValue instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @static\n * @param {opentelemetry.proto.common.v1.IAnyValue=} [properties] Properties to set\n * @returns {opentelemetry.proto.common.v1.AnyValue} AnyValue instance\n */\n AnyValue.create = function create(properties) {\n return new AnyValue(properties);\n };\n /**\n * Encodes the specified AnyValue message. Does not implicitly {@link opentelemetry.proto.common.v1.AnyValue.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @static\n * @param {opentelemetry.proto.common.v1.IAnyValue} message AnyValue message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n AnyValue.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.stringValue != null && Object.hasOwnProperty.call(message, \"stringValue\"))\n writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.stringValue);\n if (message.boolValue != null && Object.hasOwnProperty.call(message, \"boolValue\"))\n writer.uint32(/* id 2, wireType 0 =*/ 16).bool(message.boolValue);\n if (message.intValue != null && Object.hasOwnProperty.call(message, \"intValue\"))\n writer.uint32(/* id 3, wireType 0 =*/ 24).int64(message.intValue);\n if (message.doubleValue != null && Object.hasOwnProperty.call(message, \"doubleValue\"))\n writer.uint32(/* id 4, wireType 1 =*/ 33).double(message.doubleValue);\n if (message.arrayValue != null && Object.hasOwnProperty.call(message, \"arrayValue\"))\n $root.opentelemetry.proto.common.v1.ArrayValue.encode(message.arrayValue, writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim();\n if (message.kvlistValue != null && Object.hasOwnProperty.call(message, \"kvlistValue\"))\n $root.opentelemetry.proto.common.v1.KeyValueList.encode(message.kvlistValue, writer.uint32(/* id 6, wireType 2 =*/ 50).fork()).ldelim();\n if (message.bytesValue != null && Object.hasOwnProperty.call(message, \"bytesValue\"))\n writer.uint32(/* id 7, wireType 2 =*/ 58).bytes(message.bytesValue);\n return writer;\n };\n /**\n * Encodes the specified AnyValue message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.AnyValue.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @static\n * @param {opentelemetry.proto.common.v1.IAnyValue} message AnyValue message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n AnyValue.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes an AnyValue message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.common.v1.AnyValue} AnyValue\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n AnyValue.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.AnyValue();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.stringValue = reader.string();\n break;\n }\n case 2: {\n message.boolValue = reader.bool();\n break;\n }\n case 3: {\n message.intValue = reader.int64();\n break;\n }\n case 4: {\n message.doubleValue = reader.double();\n break;\n }\n case 5: {\n message.arrayValue = $root.opentelemetry.proto.common.v1.ArrayValue.decode(reader, reader.uint32());\n break;\n }\n case 6: {\n message.kvlistValue = $root.opentelemetry.proto.common.v1.KeyValueList.decode(reader, reader.uint32());\n break;\n }\n case 7: {\n message.bytesValue = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes an AnyValue message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.common.v1.AnyValue} AnyValue\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n AnyValue.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies an AnyValue message.\n * @function verify\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n AnyValue.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n var properties = {};\n if (message.stringValue != null && message.hasOwnProperty(\"stringValue\")) {\n properties.value = 1;\n if (!$util.isString(message.stringValue))\n return \"stringValue: string expected\";\n }\n if (message.boolValue != null && message.hasOwnProperty(\"boolValue\")) {\n if (properties.value === 1)\n return \"value: multiple values\";\n properties.value = 1;\n if (typeof message.boolValue !== \"boolean\")\n return \"boolValue: boolean expected\";\n }\n if (message.intValue != null && message.hasOwnProperty(\"intValue\")) {\n if (properties.value === 1)\n return \"value: multiple values\";\n properties.value = 1;\n if (!$util.isInteger(message.intValue) && !(message.intValue && $util.isInteger(message.intValue.low) && $util.isInteger(message.intValue.high)))\n return \"intValue: integer|Long expected\";\n }\n if (message.doubleValue != null && message.hasOwnProperty(\"doubleValue\")) {\n if (properties.value === 1)\n return \"value: multiple values\";\n properties.value = 1;\n if (typeof message.doubleValue !== \"number\")\n return \"doubleValue: number expected\";\n }\n if (message.arrayValue != null && message.hasOwnProperty(\"arrayValue\")) {\n if (properties.value === 1)\n return \"value: multiple values\";\n properties.value = 1;\n {\n var error = $root.opentelemetry.proto.common.v1.ArrayValue.verify(message.arrayValue);\n if (error)\n return \"arrayValue.\" + error;\n }\n }\n if (message.kvlistValue != null && message.hasOwnProperty(\"kvlistValue\")) {\n if (properties.value === 1)\n return \"value: multiple values\";\n properties.value = 1;\n {\n var error = $root.opentelemetry.proto.common.v1.KeyValueList.verify(message.kvlistValue);\n if (error)\n return \"kvlistValue.\" + error;\n }\n }\n if (message.bytesValue != null && message.hasOwnProperty(\"bytesValue\")) {\n if (properties.value === 1)\n return \"value: multiple values\";\n properties.value = 1;\n if (!(message.bytesValue && typeof message.bytesValue.length === \"number\" || $util.isString(message.bytesValue)))\n return \"bytesValue: buffer expected\";\n }\n return null;\n };\n /**\n * Creates an AnyValue message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.common.v1.AnyValue} AnyValue\n */\n AnyValue.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.common.v1.AnyValue)\n return object;\n var message = new $root.opentelemetry.proto.common.v1.AnyValue();\n if (object.stringValue != null)\n message.stringValue = String(object.stringValue);\n if (object.boolValue != null)\n message.boolValue = Boolean(object.boolValue);\n if (object.intValue != null)\n if ($util.Long)\n (message.intValue = $util.Long.fromValue(object.intValue)).unsigned = false;\n else if (typeof object.intValue === \"string\")\n message.intValue = parseInt(object.intValue, 10);\n else if (typeof object.intValue === \"number\")\n message.intValue = object.intValue;\n else if (typeof object.intValue === \"object\")\n message.intValue = new $util.LongBits(object.intValue.low >>> 0, object.intValue.high >>> 0).toNumber();\n if (object.doubleValue != null)\n message.doubleValue = Number(object.doubleValue);\n if (object.arrayValue != null) {\n if (typeof object.arrayValue !== \"object\")\n throw TypeError(\".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected\");\n message.arrayValue = $root.opentelemetry.proto.common.v1.ArrayValue.fromObject(object.arrayValue);\n }\n if (object.kvlistValue != null) {\n if (typeof object.kvlistValue !== \"object\")\n throw TypeError(\".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected\");\n message.kvlistValue = $root.opentelemetry.proto.common.v1.KeyValueList.fromObject(object.kvlistValue);\n }\n if (object.bytesValue != null)\n if (typeof object.bytesValue === \"string\")\n $util.base64.decode(object.bytesValue, message.bytesValue = $util.newBuffer($util.base64.length(object.bytesValue)), 0);\n else if (object.bytesValue.length >= 0)\n message.bytesValue = object.bytesValue;\n return message;\n };\n /**\n * Creates a plain object from an AnyValue message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @static\n * @param {opentelemetry.proto.common.v1.AnyValue} message AnyValue\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n AnyValue.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (message.stringValue != null && message.hasOwnProperty(\"stringValue\")) {\n object.stringValue = message.stringValue;\n if (options.oneofs)\n object.value = \"stringValue\";\n }\n if (message.boolValue != null && message.hasOwnProperty(\"boolValue\")) {\n object.boolValue = message.boolValue;\n if (options.oneofs)\n object.value = \"boolValue\";\n }\n if (message.intValue != null && message.hasOwnProperty(\"intValue\")) {\n if (typeof message.intValue === \"number\")\n object.intValue = options.longs === String ? String(message.intValue) : message.intValue;\n else\n object.intValue = options.longs === String ? $util.Long.prototype.toString.call(message.intValue) : options.longs === Number ? new $util.LongBits(message.intValue.low >>> 0, message.intValue.high >>> 0).toNumber() : message.intValue;\n if (options.oneofs)\n object.value = \"intValue\";\n }\n if (message.doubleValue != null && message.hasOwnProperty(\"doubleValue\")) {\n object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue;\n if (options.oneofs)\n object.value = \"doubleValue\";\n }\n if (message.arrayValue != null && message.hasOwnProperty(\"arrayValue\")) {\n object.arrayValue = $root.opentelemetry.proto.common.v1.ArrayValue.toObject(message.arrayValue, options);\n if (options.oneofs)\n object.value = \"arrayValue\";\n }\n if (message.kvlistValue != null && message.hasOwnProperty(\"kvlistValue\")) {\n object.kvlistValue = $root.opentelemetry.proto.common.v1.KeyValueList.toObject(message.kvlistValue, options);\n if (options.oneofs)\n object.value = \"kvlistValue\";\n }\n if (message.bytesValue != null && message.hasOwnProperty(\"bytesValue\")) {\n object.bytesValue = options.bytes === String ? $util.base64.encode(message.bytesValue, 0, message.bytesValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytesValue) : message.bytesValue;\n if (options.oneofs)\n object.value = \"bytesValue\";\n }\n return object;\n };\n /**\n * Converts this AnyValue to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @instance\n * @returns {Object.} JSON object\n */\n AnyValue.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for AnyValue\n * @function getTypeUrl\n * @memberof opentelemetry.proto.common.v1.AnyValue\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n AnyValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.common.v1.AnyValue\";\n };\n return AnyValue;\n })();\n v1.ArrayValue = (function () {\n /**\n * Properties of an ArrayValue.\n * @memberof opentelemetry.proto.common.v1\n * @interface IArrayValue\n * @property {Array.|null} [values] ArrayValue values\n */\n /**\n * Constructs a new ArrayValue.\n * @memberof opentelemetry.proto.common.v1\n * @classdesc Represents an ArrayValue.\n * @implements IArrayValue\n * @constructor\n * @param {opentelemetry.proto.common.v1.IArrayValue=} [properties] Properties to set\n */\n function ArrayValue(properties) {\n this.values = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ArrayValue values.\n * @member {Array.} values\n * @memberof opentelemetry.proto.common.v1.ArrayValue\n * @instance\n */\n ArrayValue.prototype.values = $util.emptyArray;\n /**\n * Creates a new ArrayValue instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.common.v1.ArrayValue\n * @static\n * @param {opentelemetry.proto.common.v1.IArrayValue=} [properties] Properties to set\n * @returns {opentelemetry.proto.common.v1.ArrayValue} ArrayValue instance\n */\n ArrayValue.create = function create(properties) {\n return new ArrayValue(properties);\n };\n /**\n * Encodes the specified ArrayValue message. Does not implicitly {@link opentelemetry.proto.common.v1.ArrayValue.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.common.v1.ArrayValue\n * @static\n * @param {opentelemetry.proto.common.v1.IArrayValue} message ArrayValue message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ArrayValue.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.values != null && message.values.length)\n for (var i = 0; i < message.values.length; ++i)\n $root.opentelemetry.proto.common.v1.AnyValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified ArrayValue message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.ArrayValue.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.common.v1.ArrayValue\n * @static\n * @param {opentelemetry.proto.common.v1.IArrayValue} message ArrayValue message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ArrayValue.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes an ArrayValue message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.common.v1.ArrayValue\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.common.v1.ArrayValue} ArrayValue\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ArrayValue.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.ArrayValue();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.values && message.values.length))\n message.values = [];\n message.values.push($root.opentelemetry.proto.common.v1.AnyValue.decode(reader, reader.uint32()));\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes an ArrayValue message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.common.v1.ArrayValue\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.common.v1.ArrayValue} ArrayValue\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ArrayValue.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies an ArrayValue message.\n * @function verify\n * @memberof opentelemetry.proto.common.v1.ArrayValue\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ArrayValue.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.values != null && message.hasOwnProperty(\"values\")) {\n if (!Array.isArray(message.values))\n return \"values: array expected\";\n for (var i = 0; i < message.values.length; ++i) {\n var error = $root.opentelemetry.proto.common.v1.AnyValue.verify(message.values[i]);\n if (error)\n return \"values.\" + error;\n }\n }\n return null;\n };\n /**\n * Creates an ArrayValue message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.common.v1.ArrayValue\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.common.v1.ArrayValue} ArrayValue\n */\n ArrayValue.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.common.v1.ArrayValue)\n return object;\n var message = new $root.opentelemetry.proto.common.v1.ArrayValue();\n if (object.values) {\n if (!Array.isArray(object.values))\n throw TypeError(\".opentelemetry.proto.common.v1.ArrayValue.values: array expected\");\n message.values = [];\n for (var i = 0; i < object.values.length; ++i) {\n if (typeof object.values[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.common.v1.ArrayValue.values: object expected\");\n message.values[i] = $root.opentelemetry.proto.common.v1.AnyValue.fromObject(object.values[i]);\n }\n }\n return message;\n };\n /**\n * Creates a plain object from an ArrayValue message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.common.v1.ArrayValue\n * @static\n * @param {opentelemetry.proto.common.v1.ArrayValue} message ArrayValue\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ArrayValue.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.values = [];\n if (message.values && message.values.length) {\n object.values = [];\n for (var j = 0; j < message.values.length; ++j)\n object.values[j] = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.values[j], options);\n }\n return object;\n };\n /**\n * Converts this ArrayValue to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.common.v1.ArrayValue\n * @instance\n * @returns {Object.} JSON object\n */\n ArrayValue.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ArrayValue\n * @function getTypeUrl\n * @memberof opentelemetry.proto.common.v1.ArrayValue\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ArrayValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.common.v1.ArrayValue\";\n };\n return ArrayValue;\n })();\n v1.KeyValueList = (function () {\n /**\n * Properties of a KeyValueList.\n * @memberof opentelemetry.proto.common.v1\n * @interface IKeyValueList\n * @property {Array.|null} [values] KeyValueList values\n */\n /**\n * Constructs a new KeyValueList.\n * @memberof opentelemetry.proto.common.v1\n * @classdesc Represents a KeyValueList.\n * @implements IKeyValueList\n * @constructor\n * @param {opentelemetry.proto.common.v1.IKeyValueList=} [properties] Properties to set\n */\n function KeyValueList(properties) {\n this.values = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * KeyValueList values.\n * @member {Array.} values\n * @memberof opentelemetry.proto.common.v1.KeyValueList\n * @instance\n */\n KeyValueList.prototype.values = $util.emptyArray;\n /**\n * Creates a new KeyValueList instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.common.v1.KeyValueList\n * @static\n * @param {opentelemetry.proto.common.v1.IKeyValueList=} [properties] Properties to set\n * @returns {opentelemetry.proto.common.v1.KeyValueList} KeyValueList instance\n */\n KeyValueList.create = function create(properties) {\n return new KeyValueList(properties);\n };\n /**\n * Encodes the specified KeyValueList message. Does not implicitly {@link opentelemetry.proto.common.v1.KeyValueList.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.common.v1.KeyValueList\n * @static\n * @param {opentelemetry.proto.common.v1.IKeyValueList} message KeyValueList message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n KeyValueList.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.values != null && message.values.length)\n for (var i = 0; i < message.values.length; ++i)\n $root.opentelemetry.proto.common.v1.KeyValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified KeyValueList message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.KeyValueList.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.common.v1.KeyValueList\n * @static\n * @param {opentelemetry.proto.common.v1.IKeyValueList} message KeyValueList message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n KeyValueList.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a KeyValueList message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.common.v1.KeyValueList\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.common.v1.KeyValueList} KeyValueList\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n KeyValueList.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.KeyValueList();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.values && message.values.length))\n message.values = [];\n message.values.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32()));\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a KeyValueList message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.common.v1.KeyValueList\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.common.v1.KeyValueList} KeyValueList\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n KeyValueList.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a KeyValueList message.\n * @function verify\n * @memberof opentelemetry.proto.common.v1.KeyValueList\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n KeyValueList.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.values != null && message.hasOwnProperty(\"values\")) {\n if (!Array.isArray(message.values))\n return \"values: array expected\";\n for (var i = 0; i < message.values.length; ++i) {\n var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.values[i]);\n if (error)\n return \"values.\" + error;\n }\n }\n return null;\n };\n /**\n * Creates a KeyValueList message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.common.v1.KeyValueList\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.common.v1.KeyValueList} KeyValueList\n */\n KeyValueList.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.common.v1.KeyValueList)\n return object;\n var message = new $root.opentelemetry.proto.common.v1.KeyValueList();\n if (object.values) {\n if (!Array.isArray(object.values))\n throw TypeError(\".opentelemetry.proto.common.v1.KeyValueList.values: array expected\");\n message.values = [];\n for (var i = 0; i < object.values.length; ++i) {\n if (typeof object.values[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.common.v1.KeyValueList.values: object expected\");\n message.values[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.values[i]);\n }\n }\n return message;\n };\n /**\n * Creates a plain object from a KeyValueList message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.common.v1.KeyValueList\n * @static\n * @param {opentelemetry.proto.common.v1.KeyValueList} message KeyValueList\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n KeyValueList.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.values = [];\n if (message.values && message.values.length) {\n object.values = [];\n for (var j = 0; j < message.values.length; ++j)\n object.values[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.values[j], options);\n }\n return object;\n };\n /**\n * Converts this KeyValueList to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.common.v1.KeyValueList\n * @instance\n * @returns {Object.} JSON object\n */\n KeyValueList.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for KeyValueList\n * @function getTypeUrl\n * @memberof opentelemetry.proto.common.v1.KeyValueList\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n KeyValueList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.common.v1.KeyValueList\";\n };\n return KeyValueList;\n })();\n v1.KeyValue = (function () {\n /**\n * Properties of a KeyValue.\n * @memberof opentelemetry.proto.common.v1\n * @interface IKeyValue\n * @property {string|null} [key] KeyValue key\n * @property {opentelemetry.proto.common.v1.IAnyValue|null} [value] KeyValue value\n */\n /**\n * Constructs a new KeyValue.\n * @memberof opentelemetry.proto.common.v1\n * @classdesc Represents a KeyValue.\n * @implements IKeyValue\n * @constructor\n * @param {opentelemetry.proto.common.v1.IKeyValue=} [properties] Properties to set\n */\n function KeyValue(properties) {\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * KeyValue key.\n * @member {string|null|undefined} key\n * @memberof opentelemetry.proto.common.v1.KeyValue\n * @instance\n */\n KeyValue.prototype.key = null;\n /**\n * KeyValue value.\n * @member {opentelemetry.proto.common.v1.IAnyValue|null|undefined} value\n * @memberof opentelemetry.proto.common.v1.KeyValue\n * @instance\n */\n KeyValue.prototype.value = null;\n /**\n * Creates a new KeyValue instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.common.v1.KeyValue\n * @static\n * @param {opentelemetry.proto.common.v1.IKeyValue=} [properties] Properties to set\n * @returns {opentelemetry.proto.common.v1.KeyValue} KeyValue instance\n */\n KeyValue.create = function create(properties) {\n return new KeyValue(properties);\n };\n /**\n * Encodes the specified KeyValue message. Does not implicitly {@link opentelemetry.proto.common.v1.KeyValue.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.common.v1.KeyValue\n * @static\n * @param {opentelemetry.proto.common.v1.IKeyValue} message KeyValue message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n KeyValue.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.key != null && Object.hasOwnProperty.call(message, \"key\"))\n writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.key);\n if (message.value != null && Object.hasOwnProperty.call(message, \"value\"))\n $root.opentelemetry.proto.common.v1.AnyValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified KeyValue message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.KeyValue.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.common.v1.KeyValue\n * @static\n * @param {opentelemetry.proto.common.v1.IKeyValue} message KeyValue message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n KeyValue.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a KeyValue message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.common.v1.KeyValue\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.common.v1.KeyValue} KeyValue\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n KeyValue.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.KeyValue();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.key = reader.string();\n break;\n }\n case 2: {\n message.value = $root.opentelemetry.proto.common.v1.AnyValue.decode(reader, reader.uint32());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a KeyValue message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.common.v1.KeyValue\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.common.v1.KeyValue} KeyValue\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n KeyValue.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a KeyValue message.\n * @function verify\n * @memberof opentelemetry.proto.common.v1.KeyValue\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n KeyValue.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.key != null && message.hasOwnProperty(\"key\"))\n if (!$util.isString(message.key))\n return \"key: string expected\";\n if (message.value != null && message.hasOwnProperty(\"value\")) {\n var error = $root.opentelemetry.proto.common.v1.AnyValue.verify(message.value);\n if (error)\n return \"value.\" + error;\n }\n return null;\n };\n /**\n * Creates a KeyValue message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.common.v1.KeyValue\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.common.v1.KeyValue} KeyValue\n */\n KeyValue.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.common.v1.KeyValue)\n return object;\n var message = new $root.opentelemetry.proto.common.v1.KeyValue();\n if (object.key != null)\n message.key = String(object.key);\n if (object.value != null) {\n if (typeof object.value !== \"object\")\n throw TypeError(\".opentelemetry.proto.common.v1.KeyValue.value: object expected\");\n message.value = $root.opentelemetry.proto.common.v1.AnyValue.fromObject(object.value);\n }\n return message;\n };\n /**\n * Creates a plain object from a KeyValue message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.common.v1.KeyValue\n * @static\n * @param {opentelemetry.proto.common.v1.KeyValue} message KeyValue\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n KeyValue.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.defaults) {\n object.key = \"\";\n object.value = null;\n }\n if (message.key != null && message.hasOwnProperty(\"key\"))\n object.key = message.key;\n if (message.value != null && message.hasOwnProperty(\"value\"))\n object.value = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.value, options);\n return object;\n };\n /**\n * Converts this KeyValue to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.common.v1.KeyValue\n * @instance\n * @returns {Object.} JSON object\n */\n KeyValue.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for KeyValue\n * @function getTypeUrl\n * @memberof opentelemetry.proto.common.v1.KeyValue\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n KeyValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.common.v1.KeyValue\";\n };\n return KeyValue;\n })();\n v1.InstrumentationScope = (function () {\n /**\n * Properties of an InstrumentationScope.\n * @memberof opentelemetry.proto.common.v1\n * @interface IInstrumentationScope\n * @property {string|null} [name] InstrumentationScope name\n * @property {string|null} [version] InstrumentationScope version\n * @property {Array.|null} [attributes] InstrumentationScope attributes\n * @property {number|null} [droppedAttributesCount] InstrumentationScope droppedAttributesCount\n */\n /**\n * Constructs a new InstrumentationScope.\n * @memberof opentelemetry.proto.common.v1\n * @classdesc Represents an InstrumentationScope.\n * @implements IInstrumentationScope\n * @constructor\n * @param {opentelemetry.proto.common.v1.IInstrumentationScope=} [properties] Properties to set\n */\n function InstrumentationScope(properties) {\n this.attributes = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * InstrumentationScope name.\n * @member {string|null|undefined} name\n * @memberof opentelemetry.proto.common.v1.InstrumentationScope\n * @instance\n */\n InstrumentationScope.prototype.name = null;\n /**\n * InstrumentationScope version.\n * @member {string|null|undefined} version\n * @memberof opentelemetry.proto.common.v1.InstrumentationScope\n * @instance\n */\n InstrumentationScope.prototype.version = null;\n /**\n * InstrumentationScope attributes.\n * @member {Array.} attributes\n * @memberof opentelemetry.proto.common.v1.InstrumentationScope\n * @instance\n */\n InstrumentationScope.prototype.attributes = $util.emptyArray;\n /**\n * InstrumentationScope droppedAttributesCount.\n * @member {number|null|undefined} droppedAttributesCount\n * @memberof opentelemetry.proto.common.v1.InstrumentationScope\n * @instance\n */\n InstrumentationScope.prototype.droppedAttributesCount = null;\n /**\n * Creates a new InstrumentationScope instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.common.v1.InstrumentationScope\n * @static\n * @param {opentelemetry.proto.common.v1.IInstrumentationScope=} [properties] Properties to set\n * @returns {opentelemetry.proto.common.v1.InstrumentationScope} InstrumentationScope instance\n */\n InstrumentationScope.create = function create(properties) {\n return new InstrumentationScope(properties);\n };\n /**\n * Encodes the specified InstrumentationScope message. Does not implicitly {@link opentelemetry.proto.common.v1.InstrumentationScope.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.common.v1.InstrumentationScope\n * @static\n * @param {opentelemetry.proto.common.v1.IInstrumentationScope} message InstrumentationScope message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n InstrumentationScope.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.name != null && Object.hasOwnProperty.call(message, \"name\"))\n writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.name);\n if (message.version != null && Object.hasOwnProperty.call(message, \"version\"))\n writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.version);\n if (message.attributes != null && message.attributes.length)\n for (var i = 0; i < message.attributes.length; ++i)\n $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 3, wireType 2 =*/ 26).fork()).ldelim();\n if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, \"droppedAttributesCount\"))\n writer.uint32(/* id 4, wireType 0 =*/ 32).uint32(message.droppedAttributesCount);\n return writer;\n };\n /**\n * Encodes the specified InstrumentationScope message, length delimited. Does not implicitly {@link opentelemetry.proto.common.v1.InstrumentationScope.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.common.v1.InstrumentationScope\n * @static\n * @param {opentelemetry.proto.common.v1.IInstrumentationScope} message InstrumentationScope message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n InstrumentationScope.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes an InstrumentationScope message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.common.v1.InstrumentationScope\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.common.v1.InstrumentationScope} InstrumentationScope\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n InstrumentationScope.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.common.v1.InstrumentationScope();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.name = reader.string();\n break;\n }\n case 2: {\n message.version = reader.string();\n break;\n }\n case 3: {\n if (!(message.attributes && message.attributes.length))\n message.attributes = [];\n message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32()));\n break;\n }\n case 4: {\n message.droppedAttributesCount = reader.uint32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes an InstrumentationScope message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.common.v1.InstrumentationScope\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.common.v1.InstrumentationScope} InstrumentationScope\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n InstrumentationScope.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies an InstrumentationScope message.\n * @function verify\n * @memberof opentelemetry.proto.common.v1.InstrumentationScope\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n InstrumentationScope.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.name != null && message.hasOwnProperty(\"name\"))\n if (!$util.isString(message.name))\n return \"name: string expected\";\n if (message.version != null && message.hasOwnProperty(\"version\"))\n if (!$util.isString(message.version))\n return \"version: string expected\";\n if (message.attributes != null && message.hasOwnProperty(\"attributes\")) {\n if (!Array.isArray(message.attributes))\n return \"attributes: array expected\";\n for (var i = 0; i < message.attributes.length; ++i) {\n var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]);\n if (error)\n return \"attributes.\" + error;\n }\n }\n if (message.droppedAttributesCount != null && message.hasOwnProperty(\"droppedAttributesCount\"))\n if (!$util.isInteger(message.droppedAttributesCount))\n return \"droppedAttributesCount: integer expected\";\n return null;\n };\n /**\n * Creates an InstrumentationScope message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.common.v1.InstrumentationScope\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.common.v1.InstrumentationScope} InstrumentationScope\n */\n InstrumentationScope.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.common.v1.InstrumentationScope)\n return object;\n var message = new $root.opentelemetry.proto.common.v1.InstrumentationScope();\n if (object.name != null)\n message.name = String(object.name);\n if (object.version != null)\n message.version = String(object.version);\n if (object.attributes) {\n if (!Array.isArray(object.attributes))\n throw TypeError(\".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected\");\n message.attributes = [];\n for (var i = 0; i < object.attributes.length; ++i) {\n if (typeof object.attributes[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected\");\n message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]);\n }\n }\n if (object.droppedAttributesCount != null)\n message.droppedAttributesCount = object.droppedAttributesCount >>> 0;\n return message;\n };\n /**\n * Creates a plain object from an InstrumentationScope message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.common.v1.InstrumentationScope\n * @static\n * @param {opentelemetry.proto.common.v1.InstrumentationScope} message InstrumentationScope\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n InstrumentationScope.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.attributes = [];\n if (options.defaults) {\n object.name = \"\";\n object.version = \"\";\n object.droppedAttributesCount = 0;\n }\n if (message.name != null && message.hasOwnProperty(\"name\"))\n object.name = message.name;\n if (message.version != null && message.hasOwnProperty(\"version\"))\n object.version = message.version;\n if (message.attributes && message.attributes.length) {\n object.attributes = [];\n for (var j = 0; j < message.attributes.length; ++j)\n object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options);\n }\n if (message.droppedAttributesCount != null && message.hasOwnProperty(\"droppedAttributesCount\"))\n object.droppedAttributesCount = message.droppedAttributesCount;\n return object;\n };\n /**\n * Converts this InstrumentationScope to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.common.v1.InstrumentationScope\n * @instance\n * @returns {Object.} JSON object\n */\n InstrumentationScope.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for InstrumentationScope\n * @function getTypeUrl\n * @memberof opentelemetry.proto.common.v1.InstrumentationScope\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n InstrumentationScope.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.common.v1.InstrumentationScope\";\n };\n return InstrumentationScope;\n })();\n return v1;\n })();\n return common;\n })();\n proto.resource = (function () {\n /**\n * Namespace resource.\n * @memberof opentelemetry.proto\n * @namespace\n */\n var resource = {};\n resource.v1 = (function () {\n /**\n * Namespace v1.\n * @memberof opentelemetry.proto.resource\n * @namespace\n */\n var v1 = {};\n v1.Resource = (function () {\n /**\n * Properties of a Resource.\n * @memberof opentelemetry.proto.resource.v1\n * @interface IResource\n * @property {Array.|null} [attributes] Resource attributes\n * @property {number|null} [droppedAttributesCount] Resource droppedAttributesCount\n */\n /**\n * Constructs a new Resource.\n * @memberof opentelemetry.proto.resource.v1\n * @classdesc Represents a Resource.\n * @implements IResource\n * @constructor\n * @param {opentelemetry.proto.resource.v1.IResource=} [properties] Properties to set\n */\n function Resource(properties) {\n this.attributes = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * Resource attributes.\n * @member {Array.} attributes\n * @memberof opentelemetry.proto.resource.v1.Resource\n * @instance\n */\n Resource.prototype.attributes = $util.emptyArray;\n /**\n * Resource droppedAttributesCount.\n * @member {number|null|undefined} droppedAttributesCount\n * @memberof opentelemetry.proto.resource.v1.Resource\n * @instance\n */\n Resource.prototype.droppedAttributesCount = null;\n /**\n * Creates a new Resource instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.resource.v1.Resource\n * @static\n * @param {opentelemetry.proto.resource.v1.IResource=} [properties] Properties to set\n * @returns {opentelemetry.proto.resource.v1.Resource} Resource instance\n */\n Resource.create = function create(properties) {\n return new Resource(properties);\n };\n /**\n * Encodes the specified Resource message. Does not implicitly {@link opentelemetry.proto.resource.v1.Resource.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.resource.v1.Resource\n * @static\n * @param {opentelemetry.proto.resource.v1.IResource} message Resource message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Resource.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.attributes != null && message.attributes.length)\n for (var i = 0; i < message.attributes.length; ++i)\n $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, \"droppedAttributesCount\"))\n writer.uint32(/* id 2, wireType 0 =*/ 16).uint32(message.droppedAttributesCount);\n return writer;\n };\n /**\n * Encodes the specified Resource message, length delimited. Does not implicitly {@link opentelemetry.proto.resource.v1.Resource.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.resource.v1.Resource\n * @static\n * @param {opentelemetry.proto.resource.v1.IResource} message Resource message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Resource.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a Resource message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.resource.v1.Resource\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.resource.v1.Resource} Resource\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Resource.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.resource.v1.Resource();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.attributes && message.attributes.length))\n message.attributes = [];\n message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32()));\n break;\n }\n case 2: {\n message.droppedAttributesCount = reader.uint32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a Resource message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.resource.v1.Resource\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.resource.v1.Resource} Resource\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Resource.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a Resource message.\n * @function verify\n * @memberof opentelemetry.proto.resource.v1.Resource\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Resource.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.attributes != null && message.hasOwnProperty(\"attributes\")) {\n if (!Array.isArray(message.attributes))\n return \"attributes: array expected\";\n for (var i = 0; i < message.attributes.length; ++i) {\n var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]);\n if (error)\n return \"attributes.\" + error;\n }\n }\n if (message.droppedAttributesCount != null && message.hasOwnProperty(\"droppedAttributesCount\"))\n if (!$util.isInteger(message.droppedAttributesCount))\n return \"droppedAttributesCount: integer expected\";\n return null;\n };\n /**\n * Creates a Resource message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.resource.v1.Resource\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.resource.v1.Resource} Resource\n */\n Resource.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.resource.v1.Resource)\n return object;\n var message = new $root.opentelemetry.proto.resource.v1.Resource();\n if (object.attributes) {\n if (!Array.isArray(object.attributes))\n throw TypeError(\".opentelemetry.proto.resource.v1.Resource.attributes: array expected\");\n message.attributes = [];\n for (var i = 0; i < object.attributes.length; ++i) {\n if (typeof object.attributes[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.resource.v1.Resource.attributes: object expected\");\n message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]);\n }\n }\n if (object.droppedAttributesCount != null)\n message.droppedAttributesCount = object.droppedAttributesCount >>> 0;\n return message;\n };\n /**\n * Creates a plain object from a Resource message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.resource.v1.Resource\n * @static\n * @param {opentelemetry.proto.resource.v1.Resource} message Resource\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Resource.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.attributes = [];\n if (options.defaults)\n object.droppedAttributesCount = 0;\n if (message.attributes && message.attributes.length) {\n object.attributes = [];\n for (var j = 0; j < message.attributes.length; ++j)\n object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options);\n }\n if (message.droppedAttributesCount != null && message.hasOwnProperty(\"droppedAttributesCount\"))\n object.droppedAttributesCount = message.droppedAttributesCount;\n return object;\n };\n /**\n * Converts this Resource to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.resource.v1.Resource\n * @instance\n * @returns {Object.} JSON object\n */\n Resource.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for Resource\n * @function getTypeUrl\n * @memberof opentelemetry.proto.resource.v1.Resource\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Resource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.resource.v1.Resource\";\n };\n return Resource;\n })();\n return v1;\n })();\n return resource;\n })();\n proto.trace = (function () {\n /**\n * Namespace trace.\n * @memberof opentelemetry.proto\n * @namespace\n */\n var trace = {};\n trace.v1 = (function () {\n /**\n * Namespace v1.\n * @memberof opentelemetry.proto.trace\n * @namespace\n */\n var v1 = {};\n v1.TracesData = (function () {\n /**\n * Properties of a TracesData.\n * @memberof opentelemetry.proto.trace.v1\n * @interface ITracesData\n * @property {Array.|null} [resourceSpans] TracesData resourceSpans\n */\n /**\n * Constructs a new TracesData.\n * @memberof opentelemetry.proto.trace.v1\n * @classdesc Represents a TracesData.\n * @implements ITracesData\n * @constructor\n * @param {opentelemetry.proto.trace.v1.ITracesData=} [properties] Properties to set\n */\n function TracesData(properties) {\n this.resourceSpans = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * TracesData resourceSpans.\n * @member {Array.} resourceSpans\n * @memberof opentelemetry.proto.trace.v1.TracesData\n * @instance\n */\n TracesData.prototype.resourceSpans = $util.emptyArray;\n /**\n * Creates a new TracesData instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.trace.v1.TracesData\n * @static\n * @param {opentelemetry.proto.trace.v1.ITracesData=} [properties] Properties to set\n * @returns {opentelemetry.proto.trace.v1.TracesData} TracesData instance\n */\n TracesData.create = function create(properties) {\n return new TracesData(properties);\n };\n /**\n * Encodes the specified TracesData message. Does not implicitly {@link opentelemetry.proto.trace.v1.TracesData.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.trace.v1.TracesData\n * @static\n * @param {opentelemetry.proto.trace.v1.ITracesData} message TracesData message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n TracesData.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.resourceSpans != null && message.resourceSpans.length)\n for (var i = 0; i < message.resourceSpans.length; ++i)\n $root.opentelemetry.proto.trace.v1.ResourceSpans.encode(message.resourceSpans[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified TracesData message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.TracesData.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.trace.v1.TracesData\n * @static\n * @param {opentelemetry.proto.trace.v1.ITracesData} message TracesData message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n TracesData.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a TracesData message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.trace.v1.TracesData\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.trace.v1.TracesData} TracesData\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n TracesData.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.TracesData();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.resourceSpans && message.resourceSpans.length))\n message.resourceSpans = [];\n message.resourceSpans.push($root.opentelemetry.proto.trace.v1.ResourceSpans.decode(reader, reader.uint32()));\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a TracesData message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.trace.v1.TracesData\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.trace.v1.TracesData} TracesData\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n TracesData.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a TracesData message.\n * @function verify\n * @memberof opentelemetry.proto.trace.v1.TracesData\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n TracesData.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.resourceSpans != null && message.hasOwnProperty(\"resourceSpans\")) {\n if (!Array.isArray(message.resourceSpans))\n return \"resourceSpans: array expected\";\n for (var i = 0; i < message.resourceSpans.length; ++i) {\n var error = $root.opentelemetry.proto.trace.v1.ResourceSpans.verify(message.resourceSpans[i]);\n if (error)\n return \"resourceSpans.\" + error;\n }\n }\n return null;\n };\n /**\n * Creates a TracesData message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.trace.v1.TracesData\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.trace.v1.TracesData} TracesData\n */\n TracesData.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.trace.v1.TracesData)\n return object;\n var message = new $root.opentelemetry.proto.trace.v1.TracesData();\n if (object.resourceSpans) {\n if (!Array.isArray(object.resourceSpans))\n throw TypeError(\".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected\");\n message.resourceSpans = [];\n for (var i = 0; i < object.resourceSpans.length; ++i) {\n if (typeof object.resourceSpans[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected\");\n message.resourceSpans[i] = $root.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(object.resourceSpans[i]);\n }\n }\n return message;\n };\n /**\n * Creates a plain object from a TracesData message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.trace.v1.TracesData\n * @static\n * @param {opentelemetry.proto.trace.v1.TracesData} message TracesData\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n TracesData.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.resourceSpans = [];\n if (message.resourceSpans && message.resourceSpans.length) {\n object.resourceSpans = [];\n for (var j = 0; j < message.resourceSpans.length; ++j)\n object.resourceSpans[j] = $root.opentelemetry.proto.trace.v1.ResourceSpans.toObject(message.resourceSpans[j], options);\n }\n return object;\n };\n /**\n * Converts this TracesData to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.trace.v1.TracesData\n * @instance\n * @returns {Object.} JSON object\n */\n TracesData.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for TracesData\n * @function getTypeUrl\n * @memberof opentelemetry.proto.trace.v1.TracesData\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n TracesData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.trace.v1.TracesData\";\n };\n return TracesData;\n })();\n v1.ResourceSpans = (function () {\n /**\n * Properties of a ResourceSpans.\n * @memberof opentelemetry.proto.trace.v1\n * @interface IResourceSpans\n * @property {opentelemetry.proto.resource.v1.IResource|null} [resource] ResourceSpans resource\n * @property {Array.|null} [scopeSpans] ResourceSpans scopeSpans\n * @property {string|null} [schemaUrl] ResourceSpans schemaUrl\n */\n /**\n * Constructs a new ResourceSpans.\n * @memberof opentelemetry.proto.trace.v1\n * @classdesc Represents a ResourceSpans.\n * @implements IResourceSpans\n * @constructor\n * @param {opentelemetry.proto.trace.v1.IResourceSpans=} [properties] Properties to set\n */\n function ResourceSpans(properties) {\n this.scopeSpans = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ResourceSpans resource.\n * @member {opentelemetry.proto.resource.v1.IResource|null|undefined} resource\n * @memberof opentelemetry.proto.trace.v1.ResourceSpans\n * @instance\n */\n ResourceSpans.prototype.resource = null;\n /**\n * ResourceSpans scopeSpans.\n * @member {Array.} scopeSpans\n * @memberof opentelemetry.proto.trace.v1.ResourceSpans\n * @instance\n */\n ResourceSpans.prototype.scopeSpans = $util.emptyArray;\n /**\n * ResourceSpans schemaUrl.\n * @member {string|null|undefined} schemaUrl\n * @memberof opentelemetry.proto.trace.v1.ResourceSpans\n * @instance\n */\n ResourceSpans.prototype.schemaUrl = null;\n /**\n * Creates a new ResourceSpans instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.trace.v1.ResourceSpans\n * @static\n * @param {opentelemetry.proto.trace.v1.IResourceSpans=} [properties] Properties to set\n * @returns {opentelemetry.proto.trace.v1.ResourceSpans} ResourceSpans instance\n */\n ResourceSpans.create = function create(properties) {\n return new ResourceSpans(properties);\n };\n /**\n * Encodes the specified ResourceSpans message. Does not implicitly {@link opentelemetry.proto.trace.v1.ResourceSpans.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.trace.v1.ResourceSpans\n * @static\n * @param {opentelemetry.proto.trace.v1.IResourceSpans} message ResourceSpans message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ResourceSpans.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.resource != null && Object.hasOwnProperty.call(message, \"resource\"))\n $root.opentelemetry.proto.resource.v1.Resource.encode(message.resource, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n if (message.scopeSpans != null && message.scopeSpans.length)\n for (var i = 0; i < message.scopeSpans.length; ++i)\n $root.opentelemetry.proto.trace.v1.ScopeSpans.encode(message.scopeSpans[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim();\n if (message.schemaUrl != null && Object.hasOwnProperty.call(message, \"schemaUrl\"))\n writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl);\n return writer;\n };\n /**\n * Encodes the specified ResourceSpans message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.ResourceSpans.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.trace.v1.ResourceSpans\n * @static\n * @param {opentelemetry.proto.trace.v1.IResourceSpans} message ResourceSpans message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ResourceSpans.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a ResourceSpans message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.trace.v1.ResourceSpans\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.trace.v1.ResourceSpans} ResourceSpans\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ResourceSpans.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.ResourceSpans();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.resource = $root.opentelemetry.proto.resource.v1.Resource.decode(reader, reader.uint32());\n break;\n }\n case 2: {\n if (!(message.scopeSpans && message.scopeSpans.length))\n message.scopeSpans = [];\n message.scopeSpans.push($root.opentelemetry.proto.trace.v1.ScopeSpans.decode(reader, reader.uint32()));\n break;\n }\n case 3: {\n message.schemaUrl = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a ResourceSpans message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.trace.v1.ResourceSpans\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.trace.v1.ResourceSpans} ResourceSpans\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ResourceSpans.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a ResourceSpans message.\n * @function verify\n * @memberof opentelemetry.proto.trace.v1.ResourceSpans\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ResourceSpans.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.resource != null && message.hasOwnProperty(\"resource\")) {\n var error = $root.opentelemetry.proto.resource.v1.Resource.verify(message.resource);\n if (error)\n return \"resource.\" + error;\n }\n if (message.scopeSpans != null && message.hasOwnProperty(\"scopeSpans\")) {\n if (!Array.isArray(message.scopeSpans))\n return \"scopeSpans: array expected\";\n for (var i = 0; i < message.scopeSpans.length; ++i) {\n var error = $root.opentelemetry.proto.trace.v1.ScopeSpans.verify(message.scopeSpans[i]);\n if (error)\n return \"scopeSpans.\" + error;\n }\n }\n if (message.schemaUrl != null && message.hasOwnProperty(\"schemaUrl\"))\n if (!$util.isString(message.schemaUrl))\n return \"schemaUrl: string expected\";\n return null;\n };\n /**\n * Creates a ResourceSpans message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.trace.v1.ResourceSpans\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.trace.v1.ResourceSpans} ResourceSpans\n */\n ResourceSpans.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.trace.v1.ResourceSpans)\n return object;\n var message = new $root.opentelemetry.proto.trace.v1.ResourceSpans();\n if (object.resource != null) {\n if (typeof object.resource !== \"object\")\n throw TypeError(\".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected\");\n message.resource = $root.opentelemetry.proto.resource.v1.Resource.fromObject(object.resource);\n }\n if (object.scopeSpans) {\n if (!Array.isArray(object.scopeSpans))\n throw TypeError(\".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected\");\n message.scopeSpans = [];\n for (var i = 0; i < object.scopeSpans.length; ++i) {\n if (typeof object.scopeSpans[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected\");\n message.scopeSpans[i] = $root.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(object.scopeSpans[i]);\n }\n }\n if (object.schemaUrl != null)\n message.schemaUrl = String(object.schemaUrl);\n return message;\n };\n /**\n * Creates a plain object from a ResourceSpans message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.trace.v1.ResourceSpans\n * @static\n * @param {opentelemetry.proto.trace.v1.ResourceSpans} message ResourceSpans\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ResourceSpans.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.scopeSpans = [];\n if (options.defaults) {\n object.resource = null;\n object.schemaUrl = \"\";\n }\n if (message.resource != null && message.hasOwnProperty(\"resource\"))\n object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource, options);\n if (message.scopeSpans && message.scopeSpans.length) {\n object.scopeSpans = [];\n for (var j = 0; j < message.scopeSpans.length; ++j)\n object.scopeSpans[j] = $root.opentelemetry.proto.trace.v1.ScopeSpans.toObject(message.scopeSpans[j], options);\n }\n if (message.schemaUrl != null && message.hasOwnProperty(\"schemaUrl\"))\n object.schemaUrl = message.schemaUrl;\n return object;\n };\n /**\n * Converts this ResourceSpans to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.trace.v1.ResourceSpans\n * @instance\n * @returns {Object.} JSON object\n */\n ResourceSpans.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ResourceSpans\n * @function getTypeUrl\n * @memberof opentelemetry.proto.trace.v1.ResourceSpans\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ResourceSpans.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.trace.v1.ResourceSpans\";\n };\n return ResourceSpans;\n })();\n v1.ScopeSpans = (function () {\n /**\n * Properties of a ScopeSpans.\n * @memberof opentelemetry.proto.trace.v1\n * @interface IScopeSpans\n * @property {opentelemetry.proto.common.v1.IInstrumentationScope|null} [scope] ScopeSpans scope\n * @property {Array.|null} [spans] ScopeSpans spans\n * @property {string|null} [schemaUrl] ScopeSpans schemaUrl\n */\n /**\n * Constructs a new ScopeSpans.\n * @memberof opentelemetry.proto.trace.v1\n * @classdesc Represents a ScopeSpans.\n * @implements IScopeSpans\n * @constructor\n * @param {opentelemetry.proto.trace.v1.IScopeSpans=} [properties] Properties to set\n */\n function ScopeSpans(properties) {\n this.spans = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ScopeSpans scope.\n * @member {opentelemetry.proto.common.v1.IInstrumentationScope|null|undefined} scope\n * @memberof opentelemetry.proto.trace.v1.ScopeSpans\n * @instance\n */\n ScopeSpans.prototype.scope = null;\n /**\n * ScopeSpans spans.\n * @member {Array.} spans\n * @memberof opentelemetry.proto.trace.v1.ScopeSpans\n * @instance\n */\n ScopeSpans.prototype.spans = $util.emptyArray;\n /**\n * ScopeSpans schemaUrl.\n * @member {string|null|undefined} schemaUrl\n * @memberof opentelemetry.proto.trace.v1.ScopeSpans\n * @instance\n */\n ScopeSpans.prototype.schemaUrl = null;\n /**\n * Creates a new ScopeSpans instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.trace.v1.ScopeSpans\n * @static\n * @param {opentelemetry.proto.trace.v1.IScopeSpans=} [properties] Properties to set\n * @returns {opentelemetry.proto.trace.v1.ScopeSpans} ScopeSpans instance\n */\n ScopeSpans.create = function create(properties) {\n return new ScopeSpans(properties);\n };\n /**\n * Encodes the specified ScopeSpans message. Does not implicitly {@link opentelemetry.proto.trace.v1.ScopeSpans.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.trace.v1.ScopeSpans\n * @static\n * @param {opentelemetry.proto.trace.v1.IScopeSpans} message ScopeSpans message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ScopeSpans.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.scope != null && Object.hasOwnProperty.call(message, \"scope\"))\n $root.opentelemetry.proto.common.v1.InstrumentationScope.encode(message.scope, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n if (message.spans != null && message.spans.length)\n for (var i = 0; i < message.spans.length; ++i)\n $root.opentelemetry.proto.trace.v1.Span.encode(message.spans[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim();\n if (message.schemaUrl != null && Object.hasOwnProperty.call(message, \"schemaUrl\"))\n writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl);\n return writer;\n };\n /**\n * Encodes the specified ScopeSpans message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.ScopeSpans.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.trace.v1.ScopeSpans\n * @static\n * @param {opentelemetry.proto.trace.v1.IScopeSpans} message ScopeSpans message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ScopeSpans.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a ScopeSpans message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.trace.v1.ScopeSpans\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.trace.v1.ScopeSpans} ScopeSpans\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ScopeSpans.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.ScopeSpans();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.decode(reader, reader.uint32());\n break;\n }\n case 2: {\n if (!(message.spans && message.spans.length))\n message.spans = [];\n message.spans.push($root.opentelemetry.proto.trace.v1.Span.decode(reader, reader.uint32()));\n break;\n }\n case 3: {\n message.schemaUrl = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a ScopeSpans message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.trace.v1.ScopeSpans\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.trace.v1.ScopeSpans} ScopeSpans\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ScopeSpans.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a ScopeSpans message.\n * @function verify\n * @memberof opentelemetry.proto.trace.v1.ScopeSpans\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ScopeSpans.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.scope != null && message.hasOwnProperty(\"scope\")) {\n var error = $root.opentelemetry.proto.common.v1.InstrumentationScope.verify(message.scope);\n if (error)\n return \"scope.\" + error;\n }\n if (message.spans != null && message.hasOwnProperty(\"spans\")) {\n if (!Array.isArray(message.spans))\n return \"spans: array expected\";\n for (var i = 0; i < message.spans.length; ++i) {\n var error = $root.opentelemetry.proto.trace.v1.Span.verify(message.spans[i]);\n if (error)\n return \"spans.\" + error;\n }\n }\n if (message.schemaUrl != null && message.hasOwnProperty(\"schemaUrl\"))\n if (!$util.isString(message.schemaUrl))\n return \"schemaUrl: string expected\";\n return null;\n };\n /**\n * Creates a ScopeSpans message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.trace.v1.ScopeSpans\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.trace.v1.ScopeSpans} ScopeSpans\n */\n ScopeSpans.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.trace.v1.ScopeSpans)\n return object;\n var message = new $root.opentelemetry.proto.trace.v1.ScopeSpans();\n if (object.scope != null) {\n if (typeof object.scope !== \"object\")\n throw TypeError(\".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected\");\n message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(object.scope);\n }\n if (object.spans) {\n if (!Array.isArray(object.spans))\n throw TypeError(\".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected\");\n message.spans = [];\n for (var i = 0; i < object.spans.length; ++i) {\n if (typeof object.spans[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected\");\n message.spans[i] = $root.opentelemetry.proto.trace.v1.Span.fromObject(object.spans[i]);\n }\n }\n if (object.schemaUrl != null)\n message.schemaUrl = String(object.schemaUrl);\n return message;\n };\n /**\n * Creates a plain object from a ScopeSpans message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.trace.v1.ScopeSpans\n * @static\n * @param {opentelemetry.proto.trace.v1.ScopeSpans} message ScopeSpans\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ScopeSpans.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.spans = [];\n if (options.defaults) {\n object.scope = null;\n object.schemaUrl = \"\";\n }\n if (message.scope != null && message.hasOwnProperty(\"scope\"))\n object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope, options);\n if (message.spans && message.spans.length) {\n object.spans = [];\n for (var j = 0; j < message.spans.length; ++j)\n object.spans[j] = $root.opentelemetry.proto.trace.v1.Span.toObject(message.spans[j], options);\n }\n if (message.schemaUrl != null && message.hasOwnProperty(\"schemaUrl\"))\n object.schemaUrl = message.schemaUrl;\n return object;\n };\n /**\n * Converts this ScopeSpans to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.trace.v1.ScopeSpans\n * @instance\n * @returns {Object.} JSON object\n */\n ScopeSpans.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ScopeSpans\n * @function getTypeUrl\n * @memberof opentelemetry.proto.trace.v1.ScopeSpans\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ScopeSpans.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.trace.v1.ScopeSpans\";\n };\n return ScopeSpans;\n })();\n v1.Span = (function () {\n /**\n * Properties of a Span.\n * @memberof opentelemetry.proto.trace.v1\n * @interface ISpan\n * @property {Uint8Array|null} [traceId] Span traceId\n * @property {Uint8Array|null} [spanId] Span spanId\n * @property {string|null} [traceState] Span traceState\n * @property {Uint8Array|null} [parentSpanId] Span parentSpanId\n * @property {string|null} [name] Span name\n * @property {opentelemetry.proto.trace.v1.Span.SpanKind|null} [kind] Span kind\n * @property {number|Long|null} [startTimeUnixNano] Span startTimeUnixNano\n * @property {number|Long|null} [endTimeUnixNano] Span endTimeUnixNano\n * @property {Array.|null} [attributes] Span attributes\n * @property {number|null} [droppedAttributesCount] Span droppedAttributesCount\n * @property {Array.|null} [events] Span events\n * @property {number|null} [droppedEventsCount] Span droppedEventsCount\n * @property {Array.|null} [links] Span links\n * @property {number|null} [droppedLinksCount] Span droppedLinksCount\n * @property {opentelemetry.proto.trace.v1.IStatus|null} [status] Span status\n */\n /**\n * Constructs a new Span.\n * @memberof opentelemetry.proto.trace.v1\n * @classdesc Represents a Span.\n * @implements ISpan\n * @constructor\n * @param {opentelemetry.proto.trace.v1.ISpan=} [properties] Properties to set\n */\n function Span(properties) {\n this.attributes = [];\n this.events = [];\n this.links = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * Span traceId.\n * @member {Uint8Array|null|undefined} traceId\n * @memberof opentelemetry.proto.trace.v1.Span\n * @instance\n */\n Span.prototype.traceId = null;\n /**\n * Span spanId.\n * @member {Uint8Array|null|undefined} spanId\n * @memberof opentelemetry.proto.trace.v1.Span\n * @instance\n */\n Span.prototype.spanId = null;\n /**\n * Span traceState.\n * @member {string|null|undefined} traceState\n * @memberof opentelemetry.proto.trace.v1.Span\n * @instance\n */\n Span.prototype.traceState = null;\n /**\n * Span parentSpanId.\n * @member {Uint8Array|null|undefined} parentSpanId\n * @memberof opentelemetry.proto.trace.v1.Span\n * @instance\n */\n Span.prototype.parentSpanId = null;\n /**\n * Span name.\n * @member {string|null|undefined} name\n * @memberof opentelemetry.proto.trace.v1.Span\n * @instance\n */\n Span.prototype.name = null;\n /**\n * Span kind.\n * @member {opentelemetry.proto.trace.v1.Span.SpanKind|null|undefined} kind\n * @memberof opentelemetry.proto.trace.v1.Span\n * @instance\n */\n Span.prototype.kind = null;\n /**\n * Span startTimeUnixNano.\n * @member {number|Long|null|undefined} startTimeUnixNano\n * @memberof opentelemetry.proto.trace.v1.Span\n * @instance\n */\n Span.prototype.startTimeUnixNano = null;\n /**\n * Span endTimeUnixNano.\n * @member {number|Long|null|undefined} endTimeUnixNano\n * @memberof opentelemetry.proto.trace.v1.Span\n * @instance\n */\n Span.prototype.endTimeUnixNano = null;\n /**\n * Span attributes.\n * @member {Array.} attributes\n * @memberof opentelemetry.proto.trace.v1.Span\n * @instance\n */\n Span.prototype.attributes = $util.emptyArray;\n /**\n * Span droppedAttributesCount.\n * @member {number|null|undefined} droppedAttributesCount\n * @memberof opentelemetry.proto.trace.v1.Span\n * @instance\n */\n Span.prototype.droppedAttributesCount = null;\n /**\n * Span events.\n * @member {Array.} events\n * @memberof opentelemetry.proto.trace.v1.Span\n * @instance\n */\n Span.prototype.events = $util.emptyArray;\n /**\n * Span droppedEventsCount.\n * @member {number|null|undefined} droppedEventsCount\n * @memberof opentelemetry.proto.trace.v1.Span\n * @instance\n */\n Span.prototype.droppedEventsCount = null;\n /**\n * Span links.\n * @member {Array.} links\n * @memberof opentelemetry.proto.trace.v1.Span\n * @instance\n */\n Span.prototype.links = $util.emptyArray;\n /**\n * Span droppedLinksCount.\n * @member {number|null|undefined} droppedLinksCount\n * @memberof opentelemetry.proto.trace.v1.Span\n * @instance\n */\n Span.prototype.droppedLinksCount = null;\n /**\n * Span status.\n * @member {opentelemetry.proto.trace.v1.IStatus|null|undefined} status\n * @memberof opentelemetry.proto.trace.v1.Span\n * @instance\n */\n Span.prototype.status = null;\n /**\n * Creates a new Span instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.trace.v1.Span\n * @static\n * @param {opentelemetry.proto.trace.v1.ISpan=} [properties] Properties to set\n * @returns {opentelemetry.proto.trace.v1.Span} Span instance\n */\n Span.create = function create(properties) {\n return new Span(properties);\n };\n /**\n * Encodes the specified Span message. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.trace.v1.Span\n * @static\n * @param {opentelemetry.proto.trace.v1.ISpan} message Span message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Span.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.traceId != null && Object.hasOwnProperty.call(message, \"traceId\"))\n writer.uint32(/* id 1, wireType 2 =*/ 10).bytes(message.traceId);\n if (message.spanId != null && Object.hasOwnProperty.call(message, \"spanId\"))\n writer.uint32(/* id 2, wireType 2 =*/ 18).bytes(message.spanId);\n if (message.traceState != null && Object.hasOwnProperty.call(message, \"traceState\"))\n writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.traceState);\n if (message.parentSpanId != null && Object.hasOwnProperty.call(message, \"parentSpanId\"))\n writer.uint32(/* id 4, wireType 2 =*/ 34).bytes(message.parentSpanId);\n if (message.name != null && Object.hasOwnProperty.call(message, \"name\"))\n writer.uint32(/* id 5, wireType 2 =*/ 42).string(message.name);\n if (message.kind != null && Object.hasOwnProperty.call(message, \"kind\"))\n writer.uint32(/* id 6, wireType 0 =*/ 48).int32(message.kind);\n if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, \"startTimeUnixNano\"))\n writer.uint32(/* id 7, wireType 1 =*/ 57).fixed64(message.startTimeUnixNano);\n if (message.endTimeUnixNano != null && Object.hasOwnProperty.call(message, \"endTimeUnixNano\"))\n writer.uint32(/* id 8, wireType 1 =*/ 65).fixed64(message.endTimeUnixNano);\n if (message.attributes != null && message.attributes.length)\n for (var i = 0; i < message.attributes.length; ++i)\n $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 9, wireType 2 =*/ 74).fork()).ldelim();\n if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, \"droppedAttributesCount\"))\n writer.uint32(/* id 10, wireType 0 =*/ 80).uint32(message.droppedAttributesCount);\n if (message.events != null && message.events.length)\n for (var i = 0; i < message.events.length; ++i)\n $root.opentelemetry.proto.trace.v1.Span.Event.encode(message.events[i], writer.uint32(/* id 11, wireType 2 =*/ 90).fork()).ldelim();\n if (message.droppedEventsCount != null && Object.hasOwnProperty.call(message, \"droppedEventsCount\"))\n writer.uint32(/* id 12, wireType 0 =*/ 96).uint32(message.droppedEventsCount);\n if (message.links != null && message.links.length)\n for (var i = 0; i < message.links.length; ++i)\n $root.opentelemetry.proto.trace.v1.Span.Link.encode(message.links[i], writer.uint32(/* id 13, wireType 2 =*/ 106).fork()).ldelim();\n if (message.droppedLinksCount != null && Object.hasOwnProperty.call(message, \"droppedLinksCount\"))\n writer.uint32(/* id 14, wireType 0 =*/ 112).uint32(message.droppedLinksCount);\n if (message.status != null && Object.hasOwnProperty.call(message, \"status\"))\n $root.opentelemetry.proto.trace.v1.Status.encode(message.status, writer.uint32(/* id 15, wireType 2 =*/ 122).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified Span message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.trace.v1.Span\n * @static\n * @param {opentelemetry.proto.trace.v1.ISpan} message Span message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Span.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a Span message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.trace.v1.Span\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.trace.v1.Span} Span\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Span.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.Span();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.traceId = reader.bytes();\n break;\n }\n case 2: {\n message.spanId = reader.bytes();\n break;\n }\n case 3: {\n message.traceState = reader.string();\n break;\n }\n case 4: {\n message.parentSpanId = reader.bytes();\n break;\n }\n case 5: {\n message.name = reader.string();\n break;\n }\n case 6: {\n message.kind = reader.int32();\n break;\n }\n case 7: {\n message.startTimeUnixNano = reader.fixed64();\n break;\n }\n case 8: {\n message.endTimeUnixNano = reader.fixed64();\n break;\n }\n case 9: {\n if (!(message.attributes && message.attributes.length))\n message.attributes = [];\n message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32()));\n break;\n }\n case 10: {\n message.droppedAttributesCount = reader.uint32();\n break;\n }\n case 11: {\n if (!(message.events && message.events.length))\n message.events = [];\n message.events.push($root.opentelemetry.proto.trace.v1.Span.Event.decode(reader, reader.uint32()));\n break;\n }\n case 12: {\n message.droppedEventsCount = reader.uint32();\n break;\n }\n case 13: {\n if (!(message.links && message.links.length))\n message.links = [];\n message.links.push($root.opentelemetry.proto.trace.v1.Span.Link.decode(reader, reader.uint32()));\n break;\n }\n case 14: {\n message.droppedLinksCount = reader.uint32();\n break;\n }\n case 15: {\n message.status = $root.opentelemetry.proto.trace.v1.Status.decode(reader, reader.uint32());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a Span message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.trace.v1.Span\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.trace.v1.Span} Span\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Span.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a Span message.\n * @function verify\n * @memberof opentelemetry.proto.trace.v1.Span\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Span.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.traceId != null && message.hasOwnProperty(\"traceId\"))\n if (!(message.traceId && typeof message.traceId.length === \"number\" || $util.isString(message.traceId)))\n return \"traceId: buffer expected\";\n if (message.spanId != null && message.hasOwnProperty(\"spanId\"))\n if (!(message.spanId && typeof message.spanId.length === \"number\" || $util.isString(message.spanId)))\n return \"spanId: buffer expected\";\n if (message.traceState != null && message.hasOwnProperty(\"traceState\"))\n if (!$util.isString(message.traceState))\n return \"traceState: string expected\";\n if (message.parentSpanId != null && message.hasOwnProperty(\"parentSpanId\"))\n if (!(message.parentSpanId && typeof message.parentSpanId.length === \"number\" || $util.isString(message.parentSpanId)))\n return \"parentSpanId: buffer expected\";\n if (message.name != null && message.hasOwnProperty(\"name\"))\n if (!$util.isString(message.name))\n return \"name: string expected\";\n if (message.kind != null && message.hasOwnProperty(\"kind\"))\n switch (message.kind) {\n default:\n return \"kind: enum value expected\";\n case 0:\n case 1:\n case 2:\n case 3:\n case 4:\n case 5:\n break;\n }\n if (message.startTimeUnixNano != null && message.hasOwnProperty(\"startTimeUnixNano\"))\n if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high)))\n return \"startTimeUnixNano: integer|Long expected\";\n if (message.endTimeUnixNano != null && message.hasOwnProperty(\"endTimeUnixNano\"))\n if (!$util.isInteger(message.endTimeUnixNano) && !(message.endTimeUnixNano && $util.isInteger(message.endTimeUnixNano.low) && $util.isInteger(message.endTimeUnixNano.high)))\n return \"endTimeUnixNano: integer|Long expected\";\n if (message.attributes != null && message.hasOwnProperty(\"attributes\")) {\n if (!Array.isArray(message.attributes))\n return \"attributes: array expected\";\n for (var i = 0; i < message.attributes.length; ++i) {\n var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]);\n if (error)\n return \"attributes.\" + error;\n }\n }\n if (message.droppedAttributesCount != null && message.hasOwnProperty(\"droppedAttributesCount\"))\n if (!$util.isInteger(message.droppedAttributesCount))\n return \"droppedAttributesCount: integer expected\";\n if (message.events != null && message.hasOwnProperty(\"events\")) {\n if (!Array.isArray(message.events))\n return \"events: array expected\";\n for (var i = 0; i < message.events.length; ++i) {\n var error = $root.opentelemetry.proto.trace.v1.Span.Event.verify(message.events[i]);\n if (error)\n return \"events.\" + error;\n }\n }\n if (message.droppedEventsCount != null && message.hasOwnProperty(\"droppedEventsCount\"))\n if (!$util.isInteger(message.droppedEventsCount))\n return \"droppedEventsCount: integer expected\";\n if (message.links != null && message.hasOwnProperty(\"links\")) {\n if (!Array.isArray(message.links))\n return \"links: array expected\";\n for (var i = 0; i < message.links.length; ++i) {\n var error = $root.opentelemetry.proto.trace.v1.Span.Link.verify(message.links[i]);\n if (error)\n return \"links.\" + error;\n }\n }\n if (message.droppedLinksCount != null && message.hasOwnProperty(\"droppedLinksCount\"))\n if (!$util.isInteger(message.droppedLinksCount))\n return \"droppedLinksCount: integer expected\";\n if (message.status != null && message.hasOwnProperty(\"status\")) {\n var error = $root.opentelemetry.proto.trace.v1.Status.verify(message.status);\n if (error)\n return \"status.\" + error;\n }\n return null;\n };\n /**\n * Creates a Span message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.trace.v1.Span\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.trace.v1.Span} Span\n */\n Span.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.trace.v1.Span)\n return object;\n var message = new $root.opentelemetry.proto.trace.v1.Span();\n if (object.traceId != null)\n if (typeof object.traceId === \"string\")\n $util.base64.decode(object.traceId, message.traceId = $util.newBuffer($util.base64.length(object.traceId)), 0);\n else if (object.traceId.length >= 0)\n message.traceId = object.traceId;\n if (object.spanId != null)\n if (typeof object.spanId === \"string\")\n $util.base64.decode(object.spanId, message.spanId = $util.newBuffer($util.base64.length(object.spanId)), 0);\n else if (object.spanId.length >= 0)\n message.spanId = object.spanId;\n if (object.traceState != null)\n message.traceState = String(object.traceState);\n if (object.parentSpanId != null)\n if (typeof object.parentSpanId === \"string\")\n $util.base64.decode(object.parentSpanId, message.parentSpanId = $util.newBuffer($util.base64.length(object.parentSpanId)), 0);\n else if (object.parentSpanId.length >= 0)\n message.parentSpanId = object.parentSpanId;\n if (object.name != null)\n message.name = String(object.name);\n switch (object.kind) {\n default:\n if (typeof object.kind === \"number\") {\n message.kind = object.kind;\n break;\n }\n break;\n case \"SPAN_KIND_UNSPECIFIED\":\n case 0:\n message.kind = 0;\n break;\n case \"SPAN_KIND_INTERNAL\":\n case 1:\n message.kind = 1;\n break;\n case \"SPAN_KIND_SERVER\":\n case 2:\n message.kind = 2;\n break;\n case \"SPAN_KIND_CLIENT\":\n case 3:\n message.kind = 3;\n break;\n case \"SPAN_KIND_PRODUCER\":\n case 4:\n message.kind = 4;\n break;\n case \"SPAN_KIND_CONSUMER\":\n case 5:\n message.kind = 5;\n break;\n }\n if (object.startTimeUnixNano != null)\n if ($util.Long)\n (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false;\n else if (typeof object.startTimeUnixNano === \"string\")\n message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10);\n else if (typeof object.startTimeUnixNano === \"number\")\n message.startTimeUnixNano = object.startTimeUnixNano;\n else if (typeof object.startTimeUnixNano === \"object\")\n message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber();\n if (object.endTimeUnixNano != null)\n if ($util.Long)\n (message.endTimeUnixNano = $util.Long.fromValue(object.endTimeUnixNano)).unsigned = false;\n else if (typeof object.endTimeUnixNano === \"string\")\n message.endTimeUnixNano = parseInt(object.endTimeUnixNano, 10);\n else if (typeof object.endTimeUnixNano === \"number\")\n message.endTimeUnixNano = object.endTimeUnixNano;\n else if (typeof object.endTimeUnixNano === \"object\")\n message.endTimeUnixNano = new $util.LongBits(object.endTimeUnixNano.low >>> 0, object.endTimeUnixNano.high >>> 0).toNumber();\n if (object.attributes) {\n if (!Array.isArray(object.attributes))\n throw TypeError(\".opentelemetry.proto.trace.v1.Span.attributes: array expected\");\n message.attributes = [];\n for (var i = 0; i < object.attributes.length; ++i) {\n if (typeof object.attributes[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.trace.v1.Span.attributes: object expected\");\n message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]);\n }\n }\n if (object.droppedAttributesCount != null)\n message.droppedAttributesCount = object.droppedAttributesCount >>> 0;\n if (object.events) {\n if (!Array.isArray(object.events))\n throw TypeError(\".opentelemetry.proto.trace.v1.Span.events: array expected\");\n message.events = [];\n for (var i = 0; i < object.events.length; ++i) {\n if (typeof object.events[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.trace.v1.Span.events: object expected\");\n message.events[i] = $root.opentelemetry.proto.trace.v1.Span.Event.fromObject(object.events[i]);\n }\n }\n if (object.droppedEventsCount != null)\n message.droppedEventsCount = object.droppedEventsCount >>> 0;\n if (object.links) {\n if (!Array.isArray(object.links))\n throw TypeError(\".opentelemetry.proto.trace.v1.Span.links: array expected\");\n message.links = [];\n for (var i = 0; i < object.links.length; ++i) {\n if (typeof object.links[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.trace.v1.Span.links: object expected\");\n message.links[i] = $root.opentelemetry.proto.trace.v1.Span.Link.fromObject(object.links[i]);\n }\n }\n if (object.droppedLinksCount != null)\n message.droppedLinksCount = object.droppedLinksCount >>> 0;\n if (object.status != null) {\n if (typeof object.status !== \"object\")\n throw TypeError(\".opentelemetry.proto.trace.v1.Span.status: object expected\");\n message.status = $root.opentelemetry.proto.trace.v1.Status.fromObject(object.status);\n }\n return message;\n };\n /**\n * Creates a plain object from a Span message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.trace.v1.Span\n * @static\n * @param {opentelemetry.proto.trace.v1.Span} message Span\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Span.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults) {\n object.attributes = [];\n object.events = [];\n object.links = [];\n }\n if (options.defaults) {\n if (options.bytes === String)\n object.traceId = \"\";\n else {\n object.traceId = [];\n if (options.bytes !== Array)\n object.traceId = $util.newBuffer(object.traceId);\n }\n if (options.bytes === String)\n object.spanId = \"\";\n else {\n object.spanId = [];\n if (options.bytes !== Array)\n object.spanId = $util.newBuffer(object.spanId);\n }\n object.traceState = \"\";\n if (options.bytes === String)\n object.parentSpanId = \"\";\n else {\n object.parentSpanId = [];\n if (options.bytes !== Array)\n object.parentSpanId = $util.newBuffer(object.parentSpanId);\n }\n object.name = \"\";\n object.kind = options.enums === String ? \"SPAN_KIND_UNSPECIFIED\" : 0;\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.startTimeUnixNano = options.longs === String ? \"0\" : 0;\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.endTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.endTimeUnixNano = options.longs === String ? \"0\" : 0;\n object.droppedAttributesCount = 0;\n object.droppedEventsCount = 0;\n object.droppedLinksCount = 0;\n object.status = null;\n }\n if (message.traceId != null && message.hasOwnProperty(\"traceId\"))\n object.traceId = options.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId;\n if (message.spanId != null && message.hasOwnProperty(\"spanId\"))\n object.spanId = options.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId;\n if (message.traceState != null && message.hasOwnProperty(\"traceState\"))\n object.traceState = message.traceState;\n if (message.parentSpanId != null && message.hasOwnProperty(\"parentSpanId\"))\n object.parentSpanId = options.bytes === String ? $util.base64.encode(message.parentSpanId, 0, message.parentSpanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.parentSpanId) : message.parentSpanId;\n if (message.name != null && message.hasOwnProperty(\"name\"))\n object.name = message.name;\n if (message.kind != null && message.hasOwnProperty(\"kind\"))\n object.kind = options.enums === String ? $root.opentelemetry.proto.trace.v1.Span.SpanKind[message.kind] === undefined ? message.kind : $root.opentelemetry.proto.trace.v1.Span.SpanKind[message.kind] : message.kind;\n if (message.startTimeUnixNano != null && message.hasOwnProperty(\"startTimeUnixNano\"))\n if (typeof message.startTimeUnixNano === \"number\")\n object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano;\n else\n object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano;\n if (message.endTimeUnixNano != null && message.hasOwnProperty(\"endTimeUnixNano\"))\n if (typeof message.endTimeUnixNano === \"number\")\n object.endTimeUnixNano = options.longs === String ? String(message.endTimeUnixNano) : message.endTimeUnixNano;\n else\n object.endTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.endTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.endTimeUnixNano.low >>> 0, message.endTimeUnixNano.high >>> 0).toNumber() : message.endTimeUnixNano;\n if (message.attributes && message.attributes.length) {\n object.attributes = [];\n for (var j = 0; j < message.attributes.length; ++j)\n object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options);\n }\n if (message.droppedAttributesCount != null && message.hasOwnProperty(\"droppedAttributesCount\"))\n object.droppedAttributesCount = message.droppedAttributesCount;\n if (message.events && message.events.length) {\n object.events = [];\n for (var j = 0; j < message.events.length; ++j)\n object.events[j] = $root.opentelemetry.proto.trace.v1.Span.Event.toObject(message.events[j], options);\n }\n if (message.droppedEventsCount != null && message.hasOwnProperty(\"droppedEventsCount\"))\n object.droppedEventsCount = message.droppedEventsCount;\n if (message.links && message.links.length) {\n object.links = [];\n for (var j = 0; j < message.links.length; ++j)\n object.links[j] = $root.opentelemetry.proto.trace.v1.Span.Link.toObject(message.links[j], options);\n }\n if (message.droppedLinksCount != null && message.hasOwnProperty(\"droppedLinksCount\"))\n object.droppedLinksCount = message.droppedLinksCount;\n if (message.status != null && message.hasOwnProperty(\"status\"))\n object.status = $root.opentelemetry.proto.trace.v1.Status.toObject(message.status, options);\n return object;\n };\n /**\n * Converts this Span to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.trace.v1.Span\n * @instance\n * @returns {Object.} JSON object\n */\n Span.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for Span\n * @function getTypeUrl\n * @memberof opentelemetry.proto.trace.v1.Span\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Span.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.trace.v1.Span\";\n };\n /**\n * SpanKind enum.\n * @name opentelemetry.proto.trace.v1.Span.SpanKind\n * @enum {number}\n * @property {number} SPAN_KIND_UNSPECIFIED=0 SPAN_KIND_UNSPECIFIED value\n * @property {number} SPAN_KIND_INTERNAL=1 SPAN_KIND_INTERNAL value\n * @property {number} SPAN_KIND_SERVER=2 SPAN_KIND_SERVER value\n * @property {number} SPAN_KIND_CLIENT=3 SPAN_KIND_CLIENT value\n * @property {number} SPAN_KIND_PRODUCER=4 SPAN_KIND_PRODUCER value\n * @property {number} SPAN_KIND_CONSUMER=5 SPAN_KIND_CONSUMER value\n */\n Span.SpanKind = (function () {\n var valuesById = {}, values = Object.create(valuesById);\n values[valuesById[0] = \"SPAN_KIND_UNSPECIFIED\"] = 0;\n values[valuesById[1] = \"SPAN_KIND_INTERNAL\"] = 1;\n values[valuesById[2] = \"SPAN_KIND_SERVER\"] = 2;\n values[valuesById[3] = \"SPAN_KIND_CLIENT\"] = 3;\n values[valuesById[4] = \"SPAN_KIND_PRODUCER\"] = 4;\n values[valuesById[5] = \"SPAN_KIND_CONSUMER\"] = 5;\n return values;\n })();\n Span.Event = (function () {\n /**\n * Properties of an Event.\n * @memberof opentelemetry.proto.trace.v1.Span\n * @interface IEvent\n * @property {number|Long|null} [timeUnixNano] Event timeUnixNano\n * @property {string|null} [name] Event name\n * @property {Array.|null} [attributes] Event attributes\n * @property {number|null} [droppedAttributesCount] Event droppedAttributesCount\n */\n /**\n * Constructs a new Event.\n * @memberof opentelemetry.proto.trace.v1.Span\n * @classdesc Represents an Event.\n * @implements IEvent\n * @constructor\n * @param {opentelemetry.proto.trace.v1.Span.IEvent=} [properties] Properties to set\n */\n function Event(properties) {\n this.attributes = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * Event timeUnixNano.\n * @member {number|Long|null|undefined} timeUnixNano\n * @memberof opentelemetry.proto.trace.v1.Span.Event\n * @instance\n */\n Event.prototype.timeUnixNano = null;\n /**\n * Event name.\n * @member {string|null|undefined} name\n * @memberof opentelemetry.proto.trace.v1.Span.Event\n * @instance\n */\n Event.prototype.name = null;\n /**\n * Event attributes.\n * @member {Array.} attributes\n * @memberof opentelemetry.proto.trace.v1.Span.Event\n * @instance\n */\n Event.prototype.attributes = $util.emptyArray;\n /**\n * Event droppedAttributesCount.\n * @member {number|null|undefined} droppedAttributesCount\n * @memberof opentelemetry.proto.trace.v1.Span.Event\n * @instance\n */\n Event.prototype.droppedAttributesCount = null;\n /**\n * Creates a new Event instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.trace.v1.Span.Event\n * @static\n * @param {opentelemetry.proto.trace.v1.Span.IEvent=} [properties] Properties to set\n * @returns {opentelemetry.proto.trace.v1.Span.Event} Event instance\n */\n Event.create = function create(properties) {\n return new Event(properties);\n };\n /**\n * Encodes the specified Event message. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.Event.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.trace.v1.Span.Event\n * @static\n * @param {opentelemetry.proto.trace.v1.Span.IEvent} message Event message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Event.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, \"timeUnixNano\"))\n writer.uint32(/* id 1, wireType 1 =*/ 9).fixed64(message.timeUnixNano);\n if (message.name != null && Object.hasOwnProperty.call(message, \"name\"))\n writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.name);\n if (message.attributes != null && message.attributes.length)\n for (var i = 0; i < message.attributes.length; ++i)\n $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 3, wireType 2 =*/ 26).fork()).ldelim();\n if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, \"droppedAttributesCount\"))\n writer.uint32(/* id 4, wireType 0 =*/ 32).uint32(message.droppedAttributesCount);\n return writer;\n };\n /**\n * Encodes the specified Event message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.Event.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.trace.v1.Span.Event\n * @static\n * @param {opentelemetry.proto.trace.v1.Span.IEvent} message Event message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Event.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes an Event message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.trace.v1.Span.Event\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.trace.v1.Span.Event} Event\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Event.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.Span.Event();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.timeUnixNano = reader.fixed64();\n break;\n }\n case 2: {\n message.name = reader.string();\n break;\n }\n case 3: {\n if (!(message.attributes && message.attributes.length))\n message.attributes = [];\n message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32()));\n break;\n }\n case 4: {\n message.droppedAttributesCount = reader.uint32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes an Event message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.trace.v1.Span.Event\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.trace.v1.Span.Event} Event\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Event.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies an Event message.\n * @function verify\n * @memberof opentelemetry.proto.trace.v1.Span.Event\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Event.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.timeUnixNano != null && message.hasOwnProperty(\"timeUnixNano\"))\n if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high)))\n return \"timeUnixNano: integer|Long expected\";\n if (message.name != null && message.hasOwnProperty(\"name\"))\n if (!$util.isString(message.name))\n return \"name: string expected\";\n if (message.attributes != null && message.hasOwnProperty(\"attributes\")) {\n if (!Array.isArray(message.attributes))\n return \"attributes: array expected\";\n for (var i = 0; i < message.attributes.length; ++i) {\n var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]);\n if (error)\n return \"attributes.\" + error;\n }\n }\n if (message.droppedAttributesCount != null && message.hasOwnProperty(\"droppedAttributesCount\"))\n if (!$util.isInteger(message.droppedAttributesCount))\n return \"droppedAttributesCount: integer expected\";\n return null;\n };\n /**\n * Creates an Event message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.trace.v1.Span.Event\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.trace.v1.Span.Event} Event\n */\n Event.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.trace.v1.Span.Event)\n return object;\n var message = new $root.opentelemetry.proto.trace.v1.Span.Event();\n if (object.timeUnixNano != null)\n if ($util.Long)\n (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false;\n else if (typeof object.timeUnixNano === \"string\")\n message.timeUnixNano = parseInt(object.timeUnixNano, 10);\n else if (typeof object.timeUnixNano === \"number\")\n message.timeUnixNano = object.timeUnixNano;\n else if (typeof object.timeUnixNano === \"object\")\n message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber();\n if (object.name != null)\n message.name = String(object.name);\n if (object.attributes) {\n if (!Array.isArray(object.attributes))\n throw TypeError(\".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected\");\n message.attributes = [];\n for (var i = 0; i < object.attributes.length; ++i) {\n if (typeof object.attributes[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected\");\n message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]);\n }\n }\n if (object.droppedAttributesCount != null)\n message.droppedAttributesCount = object.droppedAttributesCount >>> 0;\n return message;\n };\n /**\n * Creates a plain object from an Event message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.trace.v1.Span.Event\n * @static\n * @param {opentelemetry.proto.trace.v1.Span.Event} message Event\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Event.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.attributes = [];\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.timeUnixNano = options.longs === String ? \"0\" : 0;\n object.name = \"\";\n object.droppedAttributesCount = 0;\n }\n if (message.timeUnixNano != null && message.hasOwnProperty(\"timeUnixNano\"))\n if (typeof message.timeUnixNano === \"number\")\n object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano;\n else\n object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano;\n if (message.name != null && message.hasOwnProperty(\"name\"))\n object.name = message.name;\n if (message.attributes && message.attributes.length) {\n object.attributes = [];\n for (var j = 0; j < message.attributes.length; ++j)\n object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options);\n }\n if (message.droppedAttributesCount != null && message.hasOwnProperty(\"droppedAttributesCount\"))\n object.droppedAttributesCount = message.droppedAttributesCount;\n return object;\n };\n /**\n * Converts this Event to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.trace.v1.Span.Event\n * @instance\n * @returns {Object.} JSON object\n */\n Event.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for Event\n * @function getTypeUrl\n * @memberof opentelemetry.proto.trace.v1.Span.Event\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Event.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.trace.v1.Span.Event\";\n };\n return Event;\n })();\n Span.Link = (function () {\n /**\n * Properties of a Link.\n * @memberof opentelemetry.proto.trace.v1.Span\n * @interface ILink\n * @property {Uint8Array|null} [traceId] Link traceId\n * @property {Uint8Array|null} [spanId] Link spanId\n * @property {string|null} [traceState] Link traceState\n * @property {Array.|null} [attributes] Link attributes\n * @property {number|null} [droppedAttributesCount] Link droppedAttributesCount\n */\n /**\n * Constructs a new Link.\n * @memberof opentelemetry.proto.trace.v1.Span\n * @classdesc Represents a Link.\n * @implements ILink\n * @constructor\n * @param {opentelemetry.proto.trace.v1.Span.ILink=} [properties] Properties to set\n */\n function Link(properties) {\n this.attributes = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * Link traceId.\n * @member {Uint8Array|null|undefined} traceId\n * @memberof opentelemetry.proto.trace.v1.Span.Link\n * @instance\n */\n Link.prototype.traceId = null;\n /**\n * Link spanId.\n * @member {Uint8Array|null|undefined} spanId\n * @memberof opentelemetry.proto.trace.v1.Span.Link\n * @instance\n */\n Link.prototype.spanId = null;\n /**\n * Link traceState.\n * @member {string|null|undefined} traceState\n * @memberof opentelemetry.proto.trace.v1.Span.Link\n * @instance\n */\n Link.prototype.traceState = null;\n /**\n * Link attributes.\n * @member {Array.} attributes\n * @memberof opentelemetry.proto.trace.v1.Span.Link\n * @instance\n */\n Link.prototype.attributes = $util.emptyArray;\n /**\n * Link droppedAttributesCount.\n * @member {number|null|undefined} droppedAttributesCount\n * @memberof opentelemetry.proto.trace.v1.Span.Link\n * @instance\n */\n Link.prototype.droppedAttributesCount = null;\n /**\n * Creates a new Link instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.trace.v1.Span.Link\n * @static\n * @param {opentelemetry.proto.trace.v1.Span.ILink=} [properties] Properties to set\n * @returns {opentelemetry.proto.trace.v1.Span.Link} Link instance\n */\n Link.create = function create(properties) {\n return new Link(properties);\n };\n /**\n * Encodes the specified Link message. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.Link.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.trace.v1.Span.Link\n * @static\n * @param {opentelemetry.proto.trace.v1.Span.ILink} message Link message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Link.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.traceId != null && Object.hasOwnProperty.call(message, \"traceId\"))\n writer.uint32(/* id 1, wireType 2 =*/ 10).bytes(message.traceId);\n if (message.spanId != null && Object.hasOwnProperty.call(message, \"spanId\"))\n writer.uint32(/* id 2, wireType 2 =*/ 18).bytes(message.spanId);\n if (message.traceState != null && Object.hasOwnProperty.call(message, \"traceState\"))\n writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.traceState);\n if (message.attributes != null && message.attributes.length)\n for (var i = 0; i < message.attributes.length; ++i)\n $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 4, wireType 2 =*/ 34).fork()).ldelim();\n if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, \"droppedAttributesCount\"))\n writer.uint32(/* id 5, wireType 0 =*/ 40).uint32(message.droppedAttributesCount);\n return writer;\n };\n /**\n * Encodes the specified Link message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.Span.Link.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.trace.v1.Span.Link\n * @static\n * @param {opentelemetry.proto.trace.v1.Span.ILink} message Link message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Link.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a Link message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.trace.v1.Span.Link\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.trace.v1.Span.Link} Link\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Link.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.Span.Link();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.traceId = reader.bytes();\n break;\n }\n case 2: {\n message.spanId = reader.bytes();\n break;\n }\n case 3: {\n message.traceState = reader.string();\n break;\n }\n case 4: {\n if (!(message.attributes && message.attributes.length))\n message.attributes = [];\n message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32()));\n break;\n }\n case 5: {\n message.droppedAttributesCount = reader.uint32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a Link message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.trace.v1.Span.Link\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.trace.v1.Span.Link} Link\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Link.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a Link message.\n * @function verify\n * @memberof opentelemetry.proto.trace.v1.Span.Link\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Link.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.traceId != null && message.hasOwnProperty(\"traceId\"))\n if (!(message.traceId && typeof message.traceId.length === \"number\" || $util.isString(message.traceId)))\n return \"traceId: buffer expected\";\n if (message.spanId != null && message.hasOwnProperty(\"spanId\"))\n if (!(message.spanId && typeof message.spanId.length === \"number\" || $util.isString(message.spanId)))\n return \"spanId: buffer expected\";\n if (message.traceState != null && message.hasOwnProperty(\"traceState\"))\n if (!$util.isString(message.traceState))\n return \"traceState: string expected\";\n if (message.attributes != null && message.hasOwnProperty(\"attributes\")) {\n if (!Array.isArray(message.attributes))\n return \"attributes: array expected\";\n for (var i = 0; i < message.attributes.length; ++i) {\n var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]);\n if (error)\n return \"attributes.\" + error;\n }\n }\n if (message.droppedAttributesCount != null && message.hasOwnProperty(\"droppedAttributesCount\"))\n if (!$util.isInteger(message.droppedAttributesCount))\n return \"droppedAttributesCount: integer expected\";\n return null;\n };\n /**\n * Creates a Link message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.trace.v1.Span.Link\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.trace.v1.Span.Link} Link\n */\n Link.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.trace.v1.Span.Link)\n return object;\n var message = new $root.opentelemetry.proto.trace.v1.Span.Link();\n if (object.traceId != null)\n if (typeof object.traceId === \"string\")\n $util.base64.decode(object.traceId, message.traceId = $util.newBuffer($util.base64.length(object.traceId)), 0);\n else if (object.traceId.length >= 0)\n message.traceId = object.traceId;\n if (object.spanId != null)\n if (typeof object.spanId === \"string\")\n $util.base64.decode(object.spanId, message.spanId = $util.newBuffer($util.base64.length(object.spanId)), 0);\n else if (object.spanId.length >= 0)\n message.spanId = object.spanId;\n if (object.traceState != null)\n message.traceState = String(object.traceState);\n if (object.attributes) {\n if (!Array.isArray(object.attributes))\n throw TypeError(\".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected\");\n message.attributes = [];\n for (var i = 0; i < object.attributes.length; ++i) {\n if (typeof object.attributes[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected\");\n message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]);\n }\n }\n if (object.droppedAttributesCount != null)\n message.droppedAttributesCount = object.droppedAttributesCount >>> 0;\n return message;\n };\n /**\n * Creates a plain object from a Link message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.trace.v1.Span.Link\n * @static\n * @param {opentelemetry.proto.trace.v1.Span.Link} message Link\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Link.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.attributes = [];\n if (options.defaults) {\n if (options.bytes === String)\n object.traceId = \"\";\n else {\n object.traceId = [];\n if (options.bytes !== Array)\n object.traceId = $util.newBuffer(object.traceId);\n }\n if (options.bytes === String)\n object.spanId = \"\";\n else {\n object.spanId = [];\n if (options.bytes !== Array)\n object.spanId = $util.newBuffer(object.spanId);\n }\n object.traceState = \"\";\n object.droppedAttributesCount = 0;\n }\n if (message.traceId != null && message.hasOwnProperty(\"traceId\"))\n object.traceId = options.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId;\n if (message.spanId != null && message.hasOwnProperty(\"spanId\"))\n object.spanId = options.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId;\n if (message.traceState != null && message.hasOwnProperty(\"traceState\"))\n object.traceState = message.traceState;\n if (message.attributes && message.attributes.length) {\n object.attributes = [];\n for (var j = 0; j < message.attributes.length; ++j)\n object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options);\n }\n if (message.droppedAttributesCount != null && message.hasOwnProperty(\"droppedAttributesCount\"))\n object.droppedAttributesCount = message.droppedAttributesCount;\n return object;\n };\n /**\n * Converts this Link to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.trace.v1.Span.Link\n * @instance\n * @returns {Object.} JSON object\n */\n Link.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for Link\n * @function getTypeUrl\n * @memberof opentelemetry.proto.trace.v1.Span.Link\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Link.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.trace.v1.Span.Link\";\n };\n return Link;\n })();\n return Span;\n })();\n v1.Status = (function () {\n /**\n * Properties of a Status.\n * @memberof opentelemetry.proto.trace.v1\n * @interface IStatus\n * @property {string|null} [message] Status message\n * @property {opentelemetry.proto.trace.v1.Status.StatusCode|null} [code] Status code\n */\n /**\n * Constructs a new Status.\n * @memberof opentelemetry.proto.trace.v1\n * @classdesc Represents a Status.\n * @implements IStatus\n * @constructor\n * @param {opentelemetry.proto.trace.v1.IStatus=} [properties] Properties to set\n */\n function Status(properties) {\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * Status message.\n * @member {string|null|undefined} message\n * @memberof opentelemetry.proto.trace.v1.Status\n * @instance\n */\n Status.prototype.message = null;\n /**\n * Status code.\n * @member {opentelemetry.proto.trace.v1.Status.StatusCode|null|undefined} code\n * @memberof opentelemetry.proto.trace.v1.Status\n * @instance\n */\n Status.prototype.code = null;\n /**\n * Creates a new Status instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.trace.v1.Status\n * @static\n * @param {opentelemetry.proto.trace.v1.IStatus=} [properties] Properties to set\n * @returns {opentelemetry.proto.trace.v1.Status} Status instance\n */\n Status.create = function create(properties) {\n return new Status(properties);\n };\n /**\n * Encodes the specified Status message. Does not implicitly {@link opentelemetry.proto.trace.v1.Status.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.trace.v1.Status\n * @static\n * @param {opentelemetry.proto.trace.v1.IStatus} message Status message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Status.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.message != null && Object.hasOwnProperty.call(message, \"message\"))\n writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.message);\n if (message.code != null && Object.hasOwnProperty.call(message, \"code\"))\n writer.uint32(/* id 3, wireType 0 =*/ 24).int32(message.code);\n return writer;\n };\n /**\n * Encodes the specified Status message, length delimited. Does not implicitly {@link opentelemetry.proto.trace.v1.Status.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.trace.v1.Status\n * @static\n * @param {opentelemetry.proto.trace.v1.IStatus} message Status message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Status.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a Status message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.trace.v1.Status\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.trace.v1.Status} Status\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Status.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.trace.v1.Status();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 2: {\n message.message = reader.string();\n break;\n }\n case 3: {\n message.code = reader.int32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a Status message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.trace.v1.Status\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.trace.v1.Status} Status\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Status.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a Status message.\n * @function verify\n * @memberof opentelemetry.proto.trace.v1.Status\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Status.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.message != null && message.hasOwnProperty(\"message\"))\n if (!$util.isString(message.message))\n return \"message: string expected\";\n if (message.code != null && message.hasOwnProperty(\"code\"))\n switch (message.code) {\n default:\n return \"code: enum value expected\";\n case 0:\n case 1:\n case 2:\n break;\n }\n return null;\n };\n /**\n * Creates a Status message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.trace.v1.Status\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.trace.v1.Status} Status\n */\n Status.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.trace.v1.Status)\n return object;\n var message = new $root.opentelemetry.proto.trace.v1.Status();\n if (object.message != null)\n message.message = String(object.message);\n switch (object.code) {\n default:\n if (typeof object.code === \"number\") {\n message.code = object.code;\n break;\n }\n break;\n case \"STATUS_CODE_UNSET\":\n case 0:\n message.code = 0;\n break;\n case \"STATUS_CODE_OK\":\n case 1:\n message.code = 1;\n break;\n case \"STATUS_CODE_ERROR\":\n case 2:\n message.code = 2;\n break;\n }\n return message;\n };\n /**\n * Creates a plain object from a Status message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.trace.v1.Status\n * @static\n * @param {opentelemetry.proto.trace.v1.Status} message Status\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Status.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.defaults) {\n object.message = \"\";\n object.code = options.enums === String ? \"STATUS_CODE_UNSET\" : 0;\n }\n if (message.message != null && message.hasOwnProperty(\"message\"))\n object.message = message.message;\n if (message.code != null && message.hasOwnProperty(\"code\"))\n object.code = options.enums === String ? $root.opentelemetry.proto.trace.v1.Status.StatusCode[message.code] === undefined ? message.code : $root.opentelemetry.proto.trace.v1.Status.StatusCode[message.code] : message.code;\n return object;\n };\n /**\n * Converts this Status to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.trace.v1.Status\n * @instance\n * @returns {Object.} JSON object\n */\n Status.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for Status\n * @function getTypeUrl\n * @memberof opentelemetry.proto.trace.v1.Status\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.trace.v1.Status\";\n };\n /**\n * StatusCode enum.\n * @name opentelemetry.proto.trace.v1.Status.StatusCode\n * @enum {number}\n * @property {number} STATUS_CODE_UNSET=0 STATUS_CODE_UNSET value\n * @property {number} STATUS_CODE_OK=1 STATUS_CODE_OK value\n * @property {number} STATUS_CODE_ERROR=2 STATUS_CODE_ERROR value\n */\n Status.StatusCode = (function () {\n var valuesById = {}, values = Object.create(valuesById);\n values[valuesById[0] = \"STATUS_CODE_UNSET\"] = 0;\n values[valuesById[1] = \"STATUS_CODE_OK\"] = 1;\n values[valuesById[2] = \"STATUS_CODE_ERROR\"] = 2;\n return values;\n })();\n return Status;\n })();\n return v1;\n })();\n return trace;\n })();\n proto.collector = (function () {\n /**\n * Namespace collector.\n * @memberof opentelemetry.proto\n * @namespace\n */\n var collector = {};\n collector.trace = (function () {\n /**\n * Namespace trace.\n * @memberof opentelemetry.proto.collector\n * @namespace\n */\n var trace = {};\n trace.v1 = (function () {\n /**\n * Namespace v1.\n * @memberof opentelemetry.proto.collector.trace\n * @namespace\n */\n var v1 = {};\n v1.TraceService = (function () {\n /**\n * Constructs a new TraceService service.\n * @memberof opentelemetry.proto.collector.trace.v1\n * @classdesc Represents a TraceService\n * @extends $protobuf.rpc.Service\n * @constructor\n * @param {$protobuf.RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\n function TraceService(rpcImpl, requestDelimited, responseDelimited) {\n $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);\n }\n (TraceService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TraceService;\n /**\n * Creates new TraceService service using the specified rpc implementation.\n * @function create\n * @memberof opentelemetry.proto.collector.trace.v1.TraceService\n * @static\n * @param {$protobuf.RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n * @returns {TraceService} RPC service. Useful where requests and/or responses are streamed.\n */\n TraceService.create = function create(rpcImpl, requestDelimited, responseDelimited) {\n return new this(rpcImpl, requestDelimited, responseDelimited);\n };\n /**\n * Callback as used by {@link opentelemetry.proto.collector.trace.v1.TraceService#export_}.\n * @memberof opentelemetry.proto.collector.trace.v1.TraceService\n * @typedef ExportCallback\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} [response] ExportTraceServiceResponse\n */\n /**\n * Calls Export.\n * @function export\n * @memberof opentelemetry.proto.collector.trace.v1.TraceService\n * @instance\n * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest} request ExportTraceServiceRequest message or plain object\n * @param {opentelemetry.proto.collector.trace.v1.TraceService.ExportCallback} callback Node-style callback called with the error, if any, and ExportTraceServiceResponse\n * @returns {undefined}\n * @variation 1\n */\n Object.defineProperty(TraceService.prototype[\"export\"] = function export_(request, callback) {\n return this.rpcCall(export_, $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest, $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse, request, callback);\n }, \"name\", { value: \"Export\" });\n /**\n * Calls Export.\n * @function export\n * @memberof opentelemetry.proto.collector.trace.v1.TraceService\n * @instance\n * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest} request ExportTraceServiceRequest message or plain object\n * @returns {Promise} Promise\n * @variation 2\n */\n return TraceService;\n })();\n v1.ExportTraceServiceRequest = (function () {\n /**\n * Properties of an ExportTraceServiceRequest.\n * @memberof opentelemetry.proto.collector.trace.v1\n * @interface IExportTraceServiceRequest\n * @property {Array.|null} [resourceSpans] ExportTraceServiceRequest resourceSpans\n */\n /**\n * Constructs a new ExportTraceServiceRequest.\n * @memberof opentelemetry.proto.collector.trace.v1\n * @classdesc Represents an ExportTraceServiceRequest.\n * @implements IExportTraceServiceRequest\n * @constructor\n * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest=} [properties] Properties to set\n */\n function ExportTraceServiceRequest(properties) {\n this.resourceSpans = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ExportTraceServiceRequest resourceSpans.\n * @member {Array.} resourceSpans\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\n * @instance\n */\n ExportTraceServiceRequest.prototype.resourceSpans = $util.emptyArray;\n /**\n * Creates a new ExportTraceServiceRequest instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\n * @static\n * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest=} [properties] Properties to set\n * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} ExportTraceServiceRequest instance\n */\n ExportTraceServiceRequest.create = function create(properties) {\n return new ExportTraceServiceRequest(properties);\n };\n /**\n * Encodes the specified ExportTraceServiceRequest message. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\n * @static\n * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest} message ExportTraceServiceRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportTraceServiceRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.resourceSpans != null && message.resourceSpans.length)\n for (var i = 0; i < message.resourceSpans.length; ++i)\n $root.opentelemetry.proto.trace.v1.ResourceSpans.encode(message.resourceSpans[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified ExportTraceServiceRequest message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\n * @static\n * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceRequest} message ExportTraceServiceRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportTraceServiceRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes an ExportTraceServiceRequest message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} ExportTraceServiceRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportTraceServiceRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.resourceSpans && message.resourceSpans.length))\n message.resourceSpans = [];\n message.resourceSpans.push($root.opentelemetry.proto.trace.v1.ResourceSpans.decode(reader, reader.uint32()));\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes an ExportTraceServiceRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} ExportTraceServiceRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportTraceServiceRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies an ExportTraceServiceRequest message.\n * @function verify\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ExportTraceServiceRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.resourceSpans != null && message.hasOwnProperty(\"resourceSpans\")) {\n if (!Array.isArray(message.resourceSpans))\n return \"resourceSpans: array expected\";\n for (var i = 0; i < message.resourceSpans.length; ++i) {\n var error = $root.opentelemetry.proto.trace.v1.ResourceSpans.verify(message.resourceSpans[i]);\n if (error)\n return \"resourceSpans.\" + error;\n }\n }\n return null;\n };\n /**\n * Creates an ExportTraceServiceRequest message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} ExportTraceServiceRequest\n */\n ExportTraceServiceRequest.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)\n return object;\n var message = new $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest();\n if (object.resourceSpans) {\n if (!Array.isArray(object.resourceSpans))\n throw TypeError(\".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected\");\n message.resourceSpans = [];\n for (var i = 0; i < object.resourceSpans.length; ++i) {\n if (typeof object.resourceSpans[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected\");\n message.resourceSpans[i] = $root.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(object.resourceSpans[i]);\n }\n }\n return message;\n };\n /**\n * Creates a plain object from an ExportTraceServiceRequest message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\n * @static\n * @param {opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest} message ExportTraceServiceRequest\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ExportTraceServiceRequest.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.resourceSpans = [];\n if (message.resourceSpans && message.resourceSpans.length) {\n object.resourceSpans = [];\n for (var j = 0; j < message.resourceSpans.length; ++j)\n object.resourceSpans[j] = $root.opentelemetry.proto.trace.v1.ResourceSpans.toObject(message.resourceSpans[j], options);\n }\n return object;\n };\n /**\n * Converts this ExportTraceServiceRequest to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\n * @instance\n * @returns {Object.} JSON object\n */\n ExportTraceServiceRequest.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ExportTraceServiceRequest\n * @function getTypeUrl\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ExportTraceServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\";\n };\n return ExportTraceServiceRequest;\n })();\n v1.ExportTraceServiceResponse = (function () {\n /**\n * Properties of an ExportTraceServiceResponse.\n * @memberof opentelemetry.proto.collector.trace.v1\n * @interface IExportTraceServiceResponse\n * @property {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess|null} [partialSuccess] ExportTraceServiceResponse partialSuccess\n */\n /**\n * Constructs a new ExportTraceServiceResponse.\n * @memberof opentelemetry.proto.collector.trace.v1\n * @classdesc Represents an ExportTraceServiceResponse.\n * @implements IExportTraceServiceResponse\n * @constructor\n * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceResponse=} [properties] Properties to set\n */\n function ExportTraceServiceResponse(properties) {\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ExportTraceServiceResponse partialSuccess.\n * @member {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess|null|undefined} partialSuccess\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\n * @instance\n */\n ExportTraceServiceResponse.prototype.partialSuccess = null;\n /**\n * Creates a new ExportTraceServiceResponse instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\n * @static\n * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceResponse=} [properties] Properties to set\n * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} ExportTraceServiceResponse instance\n */\n ExportTraceServiceResponse.create = function create(properties) {\n return new ExportTraceServiceResponse(properties);\n };\n /**\n * Encodes the specified ExportTraceServiceResponse message. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\n * @static\n * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceResponse} message ExportTraceServiceResponse message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportTraceServiceResponse.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.partialSuccess != null && Object.hasOwnProperty.call(message, \"partialSuccess\"))\n $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(message.partialSuccess, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified ExportTraceServiceResponse message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\n * @static\n * @param {opentelemetry.proto.collector.trace.v1.IExportTraceServiceResponse} message ExportTraceServiceResponse message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportTraceServiceResponse.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes an ExportTraceServiceResponse message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} ExportTraceServiceResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportTraceServiceResponse.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.partialSuccess = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(reader, reader.uint32());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes an ExportTraceServiceResponse message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} ExportTraceServiceResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportTraceServiceResponse.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies an ExportTraceServiceResponse message.\n * @function verify\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ExportTraceServiceResponse.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.partialSuccess != null && message.hasOwnProperty(\"partialSuccess\")) {\n var error = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(message.partialSuccess);\n if (error)\n return \"partialSuccess.\" + error;\n }\n return null;\n };\n /**\n * Creates an ExportTraceServiceResponse message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} ExportTraceServiceResponse\n */\n ExportTraceServiceResponse.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)\n return object;\n var message = new $root.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse();\n if (object.partialSuccess != null) {\n if (typeof object.partialSuccess !== \"object\")\n throw TypeError(\".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected\");\n message.partialSuccess = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(object.partialSuccess);\n }\n return message;\n };\n /**\n * Creates a plain object from an ExportTraceServiceResponse message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\n * @static\n * @param {opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse} message ExportTraceServiceResponse\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ExportTraceServiceResponse.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.defaults)\n object.partialSuccess = null;\n if (message.partialSuccess != null && message.hasOwnProperty(\"partialSuccess\"))\n object.partialSuccess = $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(message.partialSuccess, options);\n return object;\n };\n /**\n * Converts this ExportTraceServiceResponse to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\n * @instance\n * @returns {Object.} JSON object\n */\n ExportTraceServiceResponse.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ExportTraceServiceResponse\n * @function getTypeUrl\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ExportTraceServiceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\";\n };\n return ExportTraceServiceResponse;\n })();\n v1.ExportTracePartialSuccess = (function () {\n /**\n * Properties of an ExportTracePartialSuccess.\n * @memberof opentelemetry.proto.collector.trace.v1\n * @interface IExportTracePartialSuccess\n * @property {number|Long|null} [rejectedSpans] ExportTracePartialSuccess rejectedSpans\n * @property {string|null} [errorMessage] ExportTracePartialSuccess errorMessage\n */\n /**\n * Constructs a new ExportTracePartialSuccess.\n * @memberof opentelemetry.proto.collector.trace.v1\n * @classdesc Represents an ExportTracePartialSuccess.\n * @implements IExportTracePartialSuccess\n * @constructor\n * @param {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess=} [properties] Properties to set\n */\n function ExportTracePartialSuccess(properties) {\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ExportTracePartialSuccess rejectedSpans.\n * @member {number|Long|null|undefined} rejectedSpans\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\n * @instance\n */\n ExportTracePartialSuccess.prototype.rejectedSpans = null;\n /**\n * ExportTracePartialSuccess errorMessage.\n * @member {string|null|undefined} errorMessage\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\n * @instance\n */\n ExportTracePartialSuccess.prototype.errorMessage = null;\n /**\n * Creates a new ExportTracePartialSuccess instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\n * @static\n * @param {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess=} [properties] Properties to set\n * @returns {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} ExportTracePartialSuccess instance\n */\n ExportTracePartialSuccess.create = function create(properties) {\n return new ExportTracePartialSuccess(properties);\n };\n /**\n * Encodes the specified ExportTracePartialSuccess message. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\n * @static\n * @param {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess} message ExportTracePartialSuccess message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportTracePartialSuccess.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.rejectedSpans != null && Object.hasOwnProperty.call(message, \"rejectedSpans\"))\n writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.rejectedSpans);\n if (message.errorMessage != null && Object.hasOwnProperty.call(message, \"errorMessage\"))\n writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.errorMessage);\n return writer;\n };\n /**\n * Encodes the specified ExportTracePartialSuccess message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\n * @static\n * @param {opentelemetry.proto.collector.trace.v1.IExportTracePartialSuccess} message ExportTracePartialSuccess message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportTracePartialSuccess.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes an ExportTracePartialSuccess message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} ExportTracePartialSuccess\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportTracePartialSuccess.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.rejectedSpans = reader.int64();\n break;\n }\n case 2: {\n message.errorMessage = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes an ExportTracePartialSuccess message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} ExportTracePartialSuccess\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportTracePartialSuccess.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies an ExportTracePartialSuccess message.\n * @function verify\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ExportTracePartialSuccess.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.rejectedSpans != null && message.hasOwnProperty(\"rejectedSpans\"))\n if (!$util.isInteger(message.rejectedSpans) && !(message.rejectedSpans && $util.isInteger(message.rejectedSpans.low) && $util.isInteger(message.rejectedSpans.high)))\n return \"rejectedSpans: integer|Long expected\";\n if (message.errorMessage != null && message.hasOwnProperty(\"errorMessage\"))\n if (!$util.isString(message.errorMessage))\n return \"errorMessage: string expected\";\n return null;\n };\n /**\n * Creates an ExportTracePartialSuccess message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} ExportTracePartialSuccess\n */\n ExportTracePartialSuccess.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)\n return object;\n var message = new $root.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess();\n if (object.rejectedSpans != null)\n if ($util.Long)\n (message.rejectedSpans = $util.Long.fromValue(object.rejectedSpans)).unsigned = false;\n else if (typeof object.rejectedSpans === \"string\")\n message.rejectedSpans = parseInt(object.rejectedSpans, 10);\n else if (typeof object.rejectedSpans === \"number\")\n message.rejectedSpans = object.rejectedSpans;\n else if (typeof object.rejectedSpans === \"object\")\n message.rejectedSpans = new $util.LongBits(object.rejectedSpans.low >>> 0, object.rejectedSpans.high >>> 0).toNumber();\n if (object.errorMessage != null)\n message.errorMessage = String(object.errorMessage);\n return message;\n };\n /**\n * Creates a plain object from an ExportTracePartialSuccess message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\n * @static\n * @param {opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess} message ExportTracePartialSuccess\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ExportTracePartialSuccess.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.rejectedSpans = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.rejectedSpans = options.longs === String ? \"0\" : 0;\n object.errorMessage = \"\";\n }\n if (message.rejectedSpans != null && message.hasOwnProperty(\"rejectedSpans\"))\n if (typeof message.rejectedSpans === \"number\")\n object.rejectedSpans = options.longs === String ? String(message.rejectedSpans) : message.rejectedSpans;\n else\n object.rejectedSpans = options.longs === String ? $util.Long.prototype.toString.call(message.rejectedSpans) : options.longs === Number ? new $util.LongBits(message.rejectedSpans.low >>> 0, message.rejectedSpans.high >>> 0).toNumber() : message.rejectedSpans;\n if (message.errorMessage != null && message.hasOwnProperty(\"errorMessage\"))\n object.errorMessage = message.errorMessage;\n return object;\n };\n /**\n * Converts this ExportTracePartialSuccess to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\n * @instance\n * @returns {Object.} JSON object\n */\n ExportTracePartialSuccess.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ExportTracePartialSuccess\n * @function getTypeUrl\n * @memberof opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ExportTracePartialSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\";\n };\n return ExportTracePartialSuccess;\n })();\n return v1;\n })();\n return trace;\n })();\n collector.metrics = (function () {\n /**\n * Namespace metrics.\n * @memberof opentelemetry.proto.collector\n * @namespace\n */\n var metrics = {};\n metrics.v1 = (function () {\n /**\n * Namespace v1.\n * @memberof opentelemetry.proto.collector.metrics\n * @namespace\n */\n var v1 = {};\n v1.MetricsService = (function () {\n /**\n * Constructs a new MetricsService service.\n * @memberof opentelemetry.proto.collector.metrics.v1\n * @classdesc Represents a MetricsService\n * @extends $protobuf.rpc.Service\n * @constructor\n * @param {$protobuf.RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\n function MetricsService(rpcImpl, requestDelimited, responseDelimited) {\n $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);\n }\n (MetricsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MetricsService;\n /**\n * Creates new MetricsService service using the specified rpc implementation.\n * @function create\n * @memberof opentelemetry.proto.collector.metrics.v1.MetricsService\n * @static\n * @param {$protobuf.RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n * @returns {MetricsService} RPC service. Useful where requests and/or responses are streamed.\n */\n MetricsService.create = function create(rpcImpl, requestDelimited, responseDelimited) {\n return new this(rpcImpl, requestDelimited, responseDelimited);\n };\n /**\n * Callback as used by {@link opentelemetry.proto.collector.metrics.v1.MetricsService#export_}.\n * @memberof opentelemetry.proto.collector.metrics.v1.MetricsService\n * @typedef ExportCallback\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} [response] ExportMetricsServiceResponse\n */\n /**\n * Calls Export.\n * @function export\n * @memberof opentelemetry.proto.collector.metrics.v1.MetricsService\n * @instance\n * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest} request ExportMetricsServiceRequest message or plain object\n * @param {opentelemetry.proto.collector.metrics.v1.MetricsService.ExportCallback} callback Node-style callback called with the error, if any, and ExportMetricsServiceResponse\n * @returns {undefined}\n * @variation 1\n */\n Object.defineProperty(MetricsService.prototype[\"export\"] = function export_(request, callback) {\n return this.rpcCall(export_, $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest, $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse, request, callback);\n }, \"name\", { value: \"Export\" });\n /**\n * Calls Export.\n * @function export\n * @memberof opentelemetry.proto.collector.metrics.v1.MetricsService\n * @instance\n * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest} request ExportMetricsServiceRequest message or plain object\n * @returns {Promise} Promise\n * @variation 2\n */\n return MetricsService;\n })();\n v1.ExportMetricsServiceRequest = (function () {\n /**\n * Properties of an ExportMetricsServiceRequest.\n * @memberof opentelemetry.proto.collector.metrics.v1\n * @interface IExportMetricsServiceRequest\n * @property {Array.|null} [resourceMetrics] ExportMetricsServiceRequest resourceMetrics\n */\n /**\n * Constructs a new ExportMetricsServiceRequest.\n * @memberof opentelemetry.proto.collector.metrics.v1\n * @classdesc Represents an ExportMetricsServiceRequest.\n * @implements IExportMetricsServiceRequest\n * @constructor\n * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest=} [properties] Properties to set\n */\n function ExportMetricsServiceRequest(properties) {\n this.resourceMetrics = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ExportMetricsServiceRequest resourceMetrics.\n * @member {Array.} resourceMetrics\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\n * @instance\n */\n ExportMetricsServiceRequest.prototype.resourceMetrics = $util.emptyArray;\n /**\n * Creates a new ExportMetricsServiceRequest instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\n * @static\n * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest=} [properties] Properties to set\n * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} ExportMetricsServiceRequest instance\n */\n ExportMetricsServiceRequest.create = function create(properties) {\n return new ExportMetricsServiceRequest(properties);\n };\n /**\n * Encodes the specified ExportMetricsServiceRequest message. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\n * @static\n * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest} message ExportMetricsServiceRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportMetricsServiceRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.resourceMetrics != null && message.resourceMetrics.length)\n for (var i = 0; i < message.resourceMetrics.length; ++i)\n $root.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(message.resourceMetrics[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified ExportMetricsServiceRequest message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\n * @static\n * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceRequest} message ExportMetricsServiceRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportMetricsServiceRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes an ExportMetricsServiceRequest message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} ExportMetricsServiceRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportMetricsServiceRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.resourceMetrics && message.resourceMetrics.length))\n message.resourceMetrics = [];\n message.resourceMetrics.push($root.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(reader, reader.uint32()));\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes an ExportMetricsServiceRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} ExportMetricsServiceRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportMetricsServiceRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies an ExportMetricsServiceRequest message.\n * @function verify\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ExportMetricsServiceRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.resourceMetrics != null && message.hasOwnProperty(\"resourceMetrics\")) {\n if (!Array.isArray(message.resourceMetrics))\n return \"resourceMetrics: array expected\";\n for (var i = 0; i < message.resourceMetrics.length; ++i) {\n var error = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(message.resourceMetrics[i]);\n if (error)\n return \"resourceMetrics.\" + error;\n }\n }\n return null;\n };\n /**\n * Creates an ExportMetricsServiceRequest message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} ExportMetricsServiceRequest\n */\n ExportMetricsServiceRequest.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)\n return object;\n var message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest();\n if (object.resourceMetrics) {\n if (!Array.isArray(object.resourceMetrics))\n throw TypeError(\".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected\");\n message.resourceMetrics = [];\n for (var i = 0; i < object.resourceMetrics.length; ++i) {\n if (typeof object.resourceMetrics[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected\");\n message.resourceMetrics[i] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(object.resourceMetrics[i]);\n }\n }\n return message;\n };\n /**\n * Creates a plain object from an ExportMetricsServiceRequest message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\n * @static\n * @param {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest} message ExportMetricsServiceRequest\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ExportMetricsServiceRequest.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.resourceMetrics = [];\n if (message.resourceMetrics && message.resourceMetrics.length) {\n object.resourceMetrics = [];\n for (var j = 0; j < message.resourceMetrics.length; ++j)\n object.resourceMetrics[j] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(message.resourceMetrics[j], options);\n }\n return object;\n };\n /**\n * Converts this ExportMetricsServiceRequest to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\n * @instance\n * @returns {Object.} JSON object\n */\n ExportMetricsServiceRequest.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ExportMetricsServiceRequest\n * @function getTypeUrl\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ExportMetricsServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\";\n };\n return ExportMetricsServiceRequest;\n })();\n v1.ExportMetricsServiceResponse = (function () {\n /**\n * Properties of an ExportMetricsServiceResponse.\n * @memberof opentelemetry.proto.collector.metrics.v1\n * @interface IExportMetricsServiceResponse\n * @property {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess|null} [partialSuccess] ExportMetricsServiceResponse partialSuccess\n */\n /**\n * Constructs a new ExportMetricsServiceResponse.\n * @memberof opentelemetry.proto.collector.metrics.v1\n * @classdesc Represents an ExportMetricsServiceResponse.\n * @implements IExportMetricsServiceResponse\n * @constructor\n * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceResponse=} [properties] Properties to set\n */\n function ExportMetricsServiceResponse(properties) {\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ExportMetricsServiceResponse partialSuccess.\n * @member {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess|null|undefined} partialSuccess\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\n * @instance\n */\n ExportMetricsServiceResponse.prototype.partialSuccess = null;\n /**\n * Creates a new ExportMetricsServiceResponse instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\n * @static\n * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceResponse=} [properties] Properties to set\n * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} ExportMetricsServiceResponse instance\n */\n ExportMetricsServiceResponse.create = function create(properties) {\n return new ExportMetricsServiceResponse(properties);\n };\n /**\n * Encodes the specified ExportMetricsServiceResponse message. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\n * @static\n * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceResponse} message ExportMetricsServiceResponse message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportMetricsServiceResponse.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.partialSuccess != null && Object.hasOwnProperty.call(message, \"partialSuccess\"))\n $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(message.partialSuccess, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified ExportMetricsServiceResponse message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\n * @static\n * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsServiceResponse} message ExportMetricsServiceResponse message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportMetricsServiceResponse.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes an ExportMetricsServiceResponse message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} ExportMetricsServiceResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportMetricsServiceResponse.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.partialSuccess = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(reader, reader.uint32());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes an ExportMetricsServiceResponse message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} ExportMetricsServiceResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportMetricsServiceResponse.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies an ExportMetricsServiceResponse message.\n * @function verify\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ExportMetricsServiceResponse.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.partialSuccess != null && message.hasOwnProperty(\"partialSuccess\")) {\n var error = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(message.partialSuccess);\n if (error)\n return \"partialSuccess.\" + error;\n }\n return null;\n };\n /**\n * Creates an ExportMetricsServiceResponse message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} ExportMetricsServiceResponse\n */\n ExportMetricsServiceResponse.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)\n return object;\n var message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse();\n if (object.partialSuccess != null) {\n if (typeof object.partialSuccess !== \"object\")\n throw TypeError(\".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected\");\n message.partialSuccess = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(object.partialSuccess);\n }\n return message;\n };\n /**\n * Creates a plain object from an ExportMetricsServiceResponse message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\n * @static\n * @param {opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse} message ExportMetricsServiceResponse\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ExportMetricsServiceResponse.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.defaults)\n object.partialSuccess = null;\n if (message.partialSuccess != null && message.hasOwnProperty(\"partialSuccess\"))\n object.partialSuccess = $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(message.partialSuccess, options);\n return object;\n };\n /**\n * Converts this ExportMetricsServiceResponse to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\n * @instance\n * @returns {Object.} JSON object\n */\n ExportMetricsServiceResponse.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ExportMetricsServiceResponse\n * @function getTypeUrl\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ExportMetricsServiceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\";\n };\n return ExportMetricsServiceResponse;\n })();\n v1.ExportMetricsPartialSuccess = (function () {\n /**\n * Properties of an ExportMetricsPartialSuccess.\n * @memberof opentelemetry.proto.collector.metrics.v1\n * @interface IExportMetricsPartialSuccess\n * @property {number|Long|null} [rejectedDataPoints] ExportMetricsPartialSuccess rejectedDataPoints\n * @property {string|null} [errorMessage] ExportMetricsPartialSuccess errorMessage\n */\n /**\n * Constructs a new ExportMetricsPartialSuccess.\n * @memberof opentelemetry.proto.collector.metrics.v1\n * @classdesc Represents an ExportMetricsPartialSuccess.\n * @implements IExportMetricsPartialSuccess\n * @constructor\n * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess=} [properties] Properties to set\n */\n function ExportMetricsPartialSuccess(properties) {\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ExportMetricsPartialSuccess rejectedDataPoints.\n * @member {number|Long|null|undefined} rejectedDataPoints\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\n * @instance\n */\n ExportMetricsPartialSuccess.prototype.rejectedDataPoints = null;\n /**\n * ExportMetricsPartialSuccess errorMessage.\n * @member {string|null|undefined} errorMessage\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\n * @instance\n */\n ExportMetricsPartialSuccess.prototype.errorMessage = null;\n /**\n * Creates a new ExportMetricsPartialSuccess instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\n * @static\n * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess=} [properties] Properties to set\n * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} ExportMetricsPartialSuccess instance\n */\n ExportMetricsPartialSuccess.create = function create(properties) {\n return new ExportMetricsPartialSuccess(properties);\n };\n /**\n * Encodes the specified ExportMetricsPartialSuccess message. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\n * @static\n * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess} message ExportMetricsPartialSuccess message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportMetricsPartialSuccess.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.rejectedDataPoints != null && Object.hasOwnProperty.call(message, \"rejectedDataPoints\"))\n writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.rejectedDataPoints);\n if (message.errorMessage != null && Object.hasOwnProperty.call(message, \"errorMessage\"))\n writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.errorMessage);\n return writer;\n };\n /**\n * Encodes the specified ExportMetricsPartialSuccess message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\n * @static\n * @param {opentelemetry.proto.collector.metrics.v1.IExportMetricsPartialSuccess} message ExportMetricsPartialSuccess message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportMetricsPartialSuccess.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes an ExportMetricsPartialSuccess message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} ExportMetricsPartialSuccess\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportMetricsPartialSuccess.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.rejectedDataPoints = reader.int64();\n break;\n }\n case 2: {\n message.errorMessage = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes an ExportMetricsPartialSuccess message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} ExportMetricsPartialSuccess\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportMetricsPartialSuccess.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies an ExportMetricsPartialSuccess message.\n * @function verify\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ExportMetricsPartialSuccess.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.rejectedDataPoints != null && message.hasOwnProperty(\"rejectedDataPoints\"))\n if (!$util.isInteger(message.rejectedDataPoints) && !(message.rejectedDataPoints && $util.isInteger(message.rejectedDataPoints.low) && $util.isInteger(message.rejectedDataPoints.high)))\n return \"rejectedDataPoints: integer|Long expected\";\n if (message.errorMessage != null && message.hasOwnProperty(\"errorMessage\"))\n if (!$util.isString(message.errorMessage))\n return \"errorMessage: string expected\";\n return null;\n };\n /**\n * Creates an ExportMetricsPartialSuccess message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} ExportMetricsPartialSuccess\n */\n ExportMetricsPartialSuccess.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)\n return object;\n var message = new $root.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess();\n if (object.rejectedDataPoints != null)\n if ($util.Long)\n (message.rejectedDataPoints = $util.Long.fromValue(object.rejectedDataPoints)).unsigned = false;\n else if (typeof object.rejectedDataPoints === \"string\")\n message.rejectedDataPoints = parseInt(object.rejectedDataPoints, 10);\n else if (typeof object.rejectedDataPoints === \"number\")\n message.rejectedDataPoints = object.rejectedDataPoints;\n else if (typeof object.rejectedDataPoints === \"object\")\n message.rejectedDataPoints = new $util.LongBits(object.rejectedDataPoints.low >>> 0, object.rejectedDataPoints.high >>> 0).toNumber();\n if (object.errorMessage != null)\n message.errorMessage = String(object.errorMessage);\n return message;\n };\n /**\n * Creates a plain object from an ExportMetricsPartialSuccess message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\n * @static\n * @param {opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess} message ExportMetricsPartialSuccess\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ExportMetricsPartialSuccess.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.rejectedDataPoints = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.rejectedDataPoints = options.longs === String ? \"0\" : 0;\n object.errorMessage = \"\";\n }\n if (message.rejectedDataPoints != null && message.hasOwnProperty(\"rejectedDataPoints\"))\n if (typeof message.rejectedDataPoints === \"number\")\n object.rejectedDataPoints = options.longs === String ? String(message.rejectedDataPoints) : message.rejectedDataPoints;\n else\n object.rejectedDataPoints = options.longs === String ? $util.Long.prototype.toString.call(message.rejectedDataPoints) : options.longs === Number ? new $util.LongBits(message.rejectedDataPoints.low >>> 0, message.rejectedDataPoints.high >>> 0).toNumber() : message.rejectedDataPoints;\n if (message.errorMessage != null && message.hasOwnProperty(\"errorMessage\"))\n object.errorMessage = message.errorMessage;\n return object;\n };\n /**\n * Converts this ExportMetricsPartialSuccess to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\n * @instance\n * @returns {Object.} JSON object\n */\n ExportMetricsPartialSuccess.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ExportMetricsPartialSuccess\n * @function getTypeUrl\n * @memberof opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ExportMetricsPartialSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\";\n };\n return ExportMetricsPartialSuccess;\n })();\n return v1;\n })();\n return metrics;\n })();\n collector.logs = (function () {\n /**\n * Namespace logs.\n * @memberof opentelemetry.proto.collector\n * @namespace\n */\n var logs = {};\n logs.v1 = (function () {\n /**\n * Namespace v1.\n * @memberof opentelemetry.proto.collector.logs\n * @namespace\n */\n var v1 = {};\n v1.LogsService = (function () {\n /**\n * Constructs a new LogsService service.\n * @memberof opentelemetry.proto.collector.logs.v1\n * @classdesc Represents a LogsService\n * @extends $protobuf.rpc.Service\n * @constructor\n * @param {$protobuf.RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\n function LogsService(rpcImpl, requestDelimited, responseDelimited) {\n $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);\n }\n (LogsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LogsService;\n /**\n * Creates new LogsService service using the specified rpc implementation.\n * @function create\n * @memberof opentelemetry.proto.collector.logs.v1.LogsService\n * @static\n * @param {$protobuf.RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n * @returns {LogsService} RPC service. Useful where requests and/or responses are streamed.\n */\n LogsService.create = function create(rpcImpl, requestDelimited, responseDelimited) {\n return new this(rpcImpl, requestDelimited, responseDelimited);\n };\n /**\n * Callback as used by {@link opentelemetry.proto.collector.logs.v1.LogsService#export_}.\n * @memberof opentelemetry.proto.collector.logs.v1.LogsService\n * @typedef ExportCallback\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} [response] ExportLogsServiceResponse\n */\n /**\n * Calls Export.\n * @function export\n * @memberof opentelemetry.proto.collector.logs.v1.LogsService\n * @instance\n * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest} request ExportLogsServiceRequest message or plain object\n * @param {opentelemetry.proto.collector.logs.v1.LogsService.ExportCallback} callback Node-style callback called with the error, if any, and ExportLogsServiceResponse\n * @returns {undefined}\n * @variation 1\n */\n Object.defineProperty(LogsService.prototype[\"export\"] = function export_(request, callback) {\n return this.rpcCall(export_, $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest, $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse, request, callback);\n }, \"name\", { value: \"Export\" });\n /**\n * Calls Export.\n * @function export\n * @memberof opentelemetry.proto.collector.logs.v1.LogsService\n * @instance\n * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest} request ExportLogsServiceRequest message or plain object\n * @returns {Promise} Promise\n * @variation 2\n */\n return LogsService;\n })();\n v1.ExportLogsServiceRequest = (function () {\n /**\n * Properties of an ExportLogsServiceRequest.\n * @memberof opentelemetry.proto.collector.logs.v1\n * @interface IExportLogsServiceRequest\n * @property {Array.|null} [resourceLogs] ExportLogsServiceRequest resourceLogs\n */\n /**\n * Constructs a new ExportLogsServiceRequest.\n * @memberof opentelemetry.proto.collector.logs.v1\n * @classdesc Represents an ExportLogsServiceRequest.\n * @implements IExportLogsServiceRequest\n * @constructor\n * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest=} [properties] Properties to set\n */\n function ExportLogsServiceRequest(properties) {\n this.resourceLogs = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ExportLogsServiceRequest resourceLogs.\n * @member {Array.} resourceLogs\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\n * @instance\n */\n ExportLogsServiceRequest.prototype.resourceLogs = $util.emptyArray;\n /**\n * Creates a new ExportLogsServiceRequest instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\n * @static\n * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest=} [properties] Properties to set\n * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} ExportLogsServiceRequest instance\n */\n ExportLogsServiceRequest.create = function create(properties) {\n return new ExportLogsServiceRequest(properties);\n };\n /**\n * Encodes the specified ExportLogsServiceRequest message. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\n * @static\n * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest} message ExportLogsServiceRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportLogsServiceRequest.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.resourceLogs != null && message.resourceLogs.length)\n for (var i = 0; i < message.resourceLogs.length; ++i)\n $root.opentelemetry.proto.logs.v1.ResourceLogs.encode(message.resourceLogs[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified ExportLogsServiceRequest message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\n * @static\n * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceRequest} message ExportLogsServiceRequest message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportLogsServiceRequest.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes an ExportLogsServiceRequest message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} ExportLogsServiceRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportLogsServiceRequest.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.resourceLogs && message.resourceLogs.length))\n message.resourceLogs = [];\n message.resourceLogs.push($root.opentelemetry.proto.logs.v1.ResourceLogs.decode(reader, reader.uint32()));\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes an ExportLogsServiceRequest message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} ExportLogsServiceRequest\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportLogsServiceRequest.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies an ExportLogsServiceRequest message.\n * @function verify\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ExportLogsServiceRequest.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.resourceLogs != null && message.hasOwnProperty(\"resourceLogs\")) {\n if (!Array.isArray(message.resourceLogs))\n return \"resourceLogs: array expected\";\n for (var i = 0; i < message.resourceLogs.length; ++i) {\n var error = $root.opentelemetry.proto.logs.v1.ResourceLogs.verify(message.resourceLogs[i]);\n if (error)\n return \"resourceLogs.\" + error;\n }\n }\n return null;\n };\n /**\n * Creates an ExportLogsServiceRequest message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} ExportLogsServiceRequest\n */\n ExportLogsServiceRequest.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)\n return object;\n var message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest();\n if (object.resourceLogs) {\n if (!Array.isArray(object.resourceLogs))\n throw TypeError(\".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected\");\n message.resourceLogs = [];\n for (var i = 0; i < object.resourceLogs.length; ++i) {\n if (typeof object.resourceLogs[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected\");\n message.resourceLogs[i] = $root.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(object.resourceLogs[i]);\n }\n }\n return message;\n };\n /**\n * Creates a plain object from an ExportLogsServiceRequest message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\n * @static\n * @param {opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest} message ExportLogsServiceRequest\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ExportLogsServiceRequest.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.resourceLogs = [];\n if (message.resourceLogs && message.resourceLogs.length) {\n object.resourceLogs = [];\n for (var j = 0; j < message.resourceLogs.length; ++j)\n object.resourceLogs[j] = $root.opentelemetry.proto.logs.v1.ResourceLogs.toObject(message.resourceLogs[j], options);\n }\n return object;\n };\n /**\n * Converts this ExportLogsServiceRequest to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\n * @instance\n * @returns {Object.} JSON object\n */\n ExportLogsServiceRequest.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ExportLogsServiceRequest\n * @function getTypeUrl\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ExportLogsServiceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\";\n };\n return ExportLogsServiceRequest;\n })();\n v1.ExportLogsServiceResponse = (function () {\n /**\n * Properties of an ExportLogsServiceResponse.\n * @memberof opentelemetry.proto.collector.logs.v1\n * @interface IExportLogsServiceResponse\n * @property {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess|null} [partialSuccess] ExportLogsServiceResponse partialSuccess\n */\n /**\n * Constructs a new ExportLogsServiceResponse.\n * @memberof opentelemetry.proto.collector.logs.v1\n * @classdesc Represents an ExportLogsServiceResponse.\n * @implements IExportLogsServiceResponse\n * @constructor\n * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceResponse=} [properties] Properties to set\n */\n function ExportLogsServiceResponse(properties) {\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ExportLogsServiceResponse partialSuccess.\n * @member {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess|null|undefined} partialSuccess\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\n * @instance\n */\n ExportLogsServiceResponse.prototype.partialSuccess = null;\n /**\n * Creates a new ExportLogsServiceResponse instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\n * @static\n * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceResponse=} [properties] Properties to set\n * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} ExportLogsServiceResponse instance\n */\n ExportLogsServiceResponse.create = function create(properties) {\n return new ExportLogsServiceResponse(properties);\n };\n /**\n * Encodes the specified ExportLogsServiceResponse message. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\n * @static\n * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceResponse} message ExportLogsServiceResponse message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportLogsServiceResponse.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.partialSuccess != null && Object.hasOwnProperty.call(message, \"partialSuccess\"))\n $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(message.partialSuccess, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified ExportLogsServiceResponse message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\n * @static\n * @param {opentelemetry.proto.collector.logs.v1.IExportLogsServiceResponse} message ExportLogsServiceResponse message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportLogsServiceResponse.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes an ExportLogsServiceResponse message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} ExportLogsServiceResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportLogsServiceResponse.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.partialSuccess = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(reader, reader.uint32());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes an ExportLogsServiceResponse message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} ExportLogsServiceResponse\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportLogsServiceResponse.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies an ExportLogsServiceResponse message.\n * @function verify\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ExportLogsServiceResponse.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.partialSuccess != null && message.hasOwnProperty(\"partialSuccess\")) {\n var error = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(message.partialSuccess);\n if (error)\n return \"partialSuccess.\" + error;\n }\n return null;\n };\n /**\n * Creates an ExportLogsServiceResponse message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} ExportLogsServiceResponse\n */\n ExportLogsServiceResponse.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)\n return object;\n var message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse();\n if (object.partialSuccess != null) {\n if (typeof object.partialSuccess !== \"object\")\n throw TypeError(\".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected\");\n message.partialSuccess = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(object.partialSuccess);\n }\n return message;\n };\n /**\n * Creates a plain object from an ExportLogsServiceResponse message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\n * @static\n * @param {opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse} message ExportLogsServiceResponse\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ExportLogsServiceResponse.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.defaults)\n object.partialSuccess = null;\n if (message.partialSuccess != null && message.hasOwnProperty(\"partialSuccess\"))\n object.partialSuccess = $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(message.partialSuccess, options);\n return object;\n };\n /**\n * Converts this ExportLogsServiceResponse to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\n * @instance\n * @returns {Object.} JSON object\n */\n ExportLogsServiceResponse.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ExportLogsServiceResponse\n * @function getTypeUrl\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ExportLogsServiceResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\";\n };\n return ExportLogsServiceResponse;\n })();\n v1.ExportLogsPartialSuccess = (function () {\n /**\n * Properties of an ExportLogsPartialSuccess.\n * @memberof opentelemetry.proto.collector.logs.v1\n * @interface IExportLogsPartialSuccess\n * @property {number|Long|null} [rejectedLogRecords] ExportLogsPartialSuccess rejectedLogRecords\n * @property {string|null} [errorMessage] ExportLogsPartialSuccess errorMessage\n */\n /**\n * Constructs a new ExportLogsPartialSuccess.\n * @memberof opentelemetry.proto.collector.logs.v1\n * @classdesc Represents an ExportLogsPartialSuccess.\n * @implements IExportLogsPartialSuccess\n * @constructor\n * @param {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess=} [properties] Properties to set\n */\n function ExportLogsPartialSuccess(properties) {\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ExportLogsPartialSuccess rejectedLogRecords.\n * @member {number|Long|null|undefined} rejectedLogRecords\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\n * @instance\n */\n ExportLogsPartialSuccess.prototype.rejectedLogRecords = null;\n /**\n * ExportLogsPartialSuccess errorMessage.\n * @member {string|null|undefined} errorMessage\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\n * @instance\n */\n ExportLogsPartialSuccess.prototype.errorMessage = null;\n /**\n * Creates a new ExportLogsPartialSuccess instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\n * @static\n * @param {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess=} [properties] Properties to set\n * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} ExportLogsPartialSuccess instance\n */\n ExportLogsPartialSuccess.create = function create(properties) {\n return new ExportLogsPartialSuccess(properties);\n };\n /**\n * Encodes the specified ExportLogsPartialSuccess message. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\n * @static\n * @param {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess} message ExportLogsPartialSuccess message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportLogsPartialSuccess.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.rejectedLogRecords != null && Object.hasOwnProperty.call(message, \"rejectedLogRecords\"))\n writer.uint32(/* id 1, wireType 0 =*/ 8).int64(message.rejectedLogRecords);\n if (message.errorMessage != null && Object.hasOwnProperty.call(message, \"errorMessage\"))\n writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.errorMessage);\n return writer;\n };\n /**\n * Encodes the specified ExportLogsPartialSuccess message, length delimited. Does not implicitly {@link opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\n * @static\n * @param {opentelemetry.proto.collector.logs.v1.IExportLogsPartialSuccess} message ExportLogsPartialSuccess message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExportLogsPartialSuccess.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes an ExportLogsPartialSuccess message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} ExportLogsPartialSuccess\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportLogsPartialSuccess.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.rejectedLogRecords = reader.int64();\n break;\n }\n case 2: {\n message.errorMessage = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes an ExportLogsPartialSuccess message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} ExportLogsPartialSuccess\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExportLogsPartialSuccess.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies an ExportLogsPartialSuccess message.\n * @function verify\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ExportLogsPartialSuccess.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.rejectedLogRecords != null && message.hasOwnProperty(\"rejectedLogRecords\"))\n if (!$util.isInteger(message.rejectedLogRecords) && !(message.rejectedLogRecords && $util.isInteger(message.rejectedLogRecords.low) && $util.isInteger(message.rejectedLogRecords.high)))\n return \"rejectedLogRecords: integer|Long expected\";\n if (message.errorMessage != null && message.hasOwnProperty(\"errorMessage\"))\n if (!$util.isString(message.errorMessage))\n return \"errorMessage: string expected\";\n return null;\n };\n /**\n * Creates an ExportLogsPartialSuccess message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} ExportLogsPartialSuccess\n */\n ExportLogsPartialSuccess.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)\n return object;\n var message = new $root.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess();\n if (object.rejectedLogRecords != null)\n if ($util.Long)\n (message.rejectedLogRecords = $util.Long.fromValue(object.rejectedLogRecords)).unsigned = false;\n else if (typeof object.rejectedLogRecords === \"string\")\n message.rejectedLogRecords = parseInt(object.rejectedLogRecords, 10);\n else if (typeof object.rejectedLogRecords === \"number\")\n message.rejectedLogRecords = object.rejectedLogRecords;\n else if (typeof object.rejectedLogRecords === \"object\")\n message.rejectedLogRecords = new $util.LongBits(object.rejectedLogRecords.low >>> 0, object.rejectedLogRecords.high >>> 0).toNumber();\n if (object.errorMessage != null)\n message.errorMessage = String(object.errorMessage);\n return message;\n };\n /**\n * Creates a plain object from an ExportLogsPartialSuccess message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\n * @static\n * @param {opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess} message ExportLogsPartialSuccess\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ExportLogsPartialSuccess.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.rejectedLogRecords = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.rejectedLogRecords = options.longs === String ? \"0\" : 0;\n object.errorMessage = \"\";\n }\n if (message.rejectedLogRecords != null && message.hasOwnProperty(\"rejectedLogRecords\"))\n if (typeof message.rejectedLogRecords === \"number\")\n object.rejectedLogRecords = options.longs === String ? String(message.rejectedLogRecords) : message.rejectedLogRecords;\n else\n object.rejectedLogRecords = options.longs === String ? $util.Long.prototype.toString.call(message.rejectedLogRecords) : options.longs === Number ? new $util.LongBits(message.rejectedLogRecords.low >>> 0, message.rejectedLogRecords.high >>> 0).toNumber() : message.rejectedLogRecords;\n if (message.errorMessage != null && message.hasOwnProperty(\"errorMessage\"))\n object.errorMessage = message.errorMessage;\n return object;\n };\n /**\n * Converts this ExportLogsPartialSuccess to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\n * @instance\n * @returns {Object.} JSON object\n */\n ExportLogsPartialSuccess.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ExportLogsPartialSuccess\n * @function getTypeUrl\n * @memberof opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ExportLogsPartialSuccess.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\";\n };\n return ExportLogsPartialSuccess;\n })();\n return v1;\n })();\n return logs;\n })();\n return collector;\n })();\n proto.metrics = (function () {\n /**\n * Namespace metrics.\n * @memberof opentelemetry.proto\n * @namespace\n */\n var metrics = {};\n metrics.v1 = (function () {\n /**\n * Namespace v1.\n * @memberof opentelemetry.proto.metrics\n * @namespace\n */\n var v1 = {};\n v1.MetricsData = (function () {\n /**\n * Properties of a MetricsData.\n * @memberof opentelemetry.proto.metrics.v1\n * @interface IMetricsData\n * @property {Array.|null} [resourceMetrics] MetricsData resourceMetrics\n */\n /**\n * Constructs a new MetricsData.\n * @memberof opentelemetry.proto.metrics.v1\n * @classdesc Represents a MetricsData.\n * @implements IMetricsData\n * @constructor\n * @param {opentelemetry.proto.metrics.v1.IMetricsData=} [properties] Properties to set\n */\n function MetricsData(properties) {\n this.resourceMetrics = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * MetricsData resourceMetrics.\n * @member {Array.} resourceMetrics\n * @memberof opentelemetry.proto.metrics.v1.MetricsData\n * @instance\n */\n MetricsData.prototype.resourceMetrics = $util.emptyArray;\n /**\n * Creates a new MetricsData instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.metrics.v1.MetricsData\n * @static\n * @param {opentelemetry.proto.metrics.v1.IMetricsData=} [properties] Properties to set\n * @returns {opentelemetry.proto.metrics.v1.MetricsData} MetricsData instance\n */\n MetricsData.create = function create(properties) {\n return new MetricsData(properties);\n };\n /**\n * Encodes the specified MetricsData message. Does not implicitly {@link opentelemetry.proto.metrics.v1.MetricsData.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.metrics.v1.MetricsData\n * @static\n * @param {opentelemetry.proto.metrics.v1.IMetricsData} message MetricsData message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n MetricsData.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.resourceMetrics != null && message.resourceMetrics.length)\n for (var i = 0; i < message.resourceMetrics.length; ++i)\n $root.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(message.resourceMetrics[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified MetricsData message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.MetricsData.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.MetricsData\n * @static\n * @param {opentelemetry.proto.metrics.v1.IMetricsData} message MetricsData message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n MetricsData.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a MetricsData message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.metrics.v1.MetricsData\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.metrics.v1.MetricsData} MetricsData\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n MetricsData.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.MetricsData();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.resourceMetrics && message.resourceMetrics.length))\n message.resourceMetrics = [];\n message.resourceMetrics.push($root.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(reader, reader.uint32()));\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a MetricsData message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.MetricsData\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.metrics.v1.MetricsData} MetricsData\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n MetricsData.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a MetricsData message.\n * @function verify\n * @memberof opentelemetry.proto.metrics.v1.MetricsData\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n MetricsData.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.resourceMetrics != null && message.hasOwnProperty(\"resourceMetrics\")) {\n if (!Array.isArray(message.resourceMetrics))\n return \"resourceMetrics: array expected\";\n for (var i = 0; i < message.resourceMetrics.length; ++i) {\n var error = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(message.resourceMetrics[i]);\n if (error)\n return \"resourceMetrics.\" + error;\n }\n }\n return null;\n };\n /**\n * Creates a MetricsData message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.metrics.v1.MetricsData\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.metrics.v1.MetricsData} MetricsData\n */\n MetricsData.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.metrics.v1.MetricsData)\n return object;\n var message = new $root.opentelemetry.proto.metrics.v1.MetricsData();\n if (object.resourceMetrics) {\n if (!Array.isArray(object.resourceMetrics))\n throw TypeError(\".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected\");\n message.resourceMetrics = [];\n for (var i = 0; i < object.resourceMetrics.length; ++i) {\n if (typeof object.resourceMetrics[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected\");\n message.resourceMetrics[i] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(object.resourceMetrics[i]);\n }\n }\n return message;\n };\n /**\n * Creates a plain object from a MetricsData message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.metrics.v1.MetricsData\n * @static\n * @param {opentelemetry.proto.metrics.v1.MetricsData} message MetricsData\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n MetricsData.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.resourceMetrics = [];\n if (message.resourceMetrics && message.resourceMetrics.length) {\n object.resourceMetrics = [];\n for (var j = 0; j < message.resourceMetrics.length; ++j)\n object.resourceMetrics[j] = $root.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(message.resourceMetrics[j], options);\n }\n return object;\n };\n /**\n * Converts this MetricsData to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.metrics.v1.MetricsData\n * @instance\n * @returns {Object.} JSON object\n */\n MetricsData.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for MetricsData\n * @function getTypeUrl\n * @memberof opentelemetry.proto.metrics.v1.MetricsData\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n MetricsData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.metrics.v1.MetricsData\";\n };\n return MetricsData;\n })();\n v1.ResourceMetrics = (function () {\n /**\n * Properties of a ResourceMetrics.\n * @memberof opentelemetry.proto.metrics.v1\n * @interface IResourceMetrics\n * @property {opentelemetry.proto.resource.v1.IResource|null} [resource] ResourceMetrics resource\n * @property {Array.|null} [scopeMetrics] ResourceMetrics scopeMetrics\n * @property {string|null} [schemaUrl] ResourceMetrics schemaUrl\n */\n /**\n * Constructs a new ResourceMetrics.\n * @memberof opentelemetry.proto.metrics.v1\n * @classdesc Represents a ResourceMetrics.\n * @implements IResourceMetrics\n * @constructor\n * @param {opentelemetry.proto.metrics.v1.IResourceMetrics=} [properties] Properties to set\n */\n function ResourceMetrics(properties) {\n this.scopeMetrics = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ResourceMetrics resource.\n * @member {opentelemetry.proto.resource.v1.IResource|null|undefined} resource\n * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics\n * @instance\n */\n ResourceMetrics.prototype.resource = null;\n /**\n * ResourceMetrics scopeMetrics.\n * @member {Array.} scopeMetrics\n * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics\n * @instance\n */\n ResourceMetrics.prototype.scopeMetrics = $util.emptyArray;\n /**\n * ResourceMetrics schemaUrl.\n * @member {string|null|undefined} schemaUrl\n * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics\n * @instance\n */\n ResourceMetrics.prototype.schemaUrl = null;\n /**\n * Creates a new ResourceMetrics instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics\n * @static\n * @param {opentelemetry.proto.metrics.v1.IResourceMetrics=} [properties] Properties to set\n * @returns {opentelemetry.proto.metrics.v1.ResourceMetrics} ResourceMetrics instance\n */\n ResourceMetrics.create = function create(properties) {\n return new ResourceMetrics(properties);\n };\n /**\n * Encodes the specified ResourceMetrics message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ResourceMetrics.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics\n * @static\n * @param {opentelemetry.proto.metrics.v1.IResourceMetrics} message ResourceMetrics message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ResourceMetrics.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.resource != null && Object.hasOwnProperty.call(message, \"resource\"))\n $root.opentelemetry.proto.resource.v1.Resource.encode(message.resource, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n if (message.scopeMetrics != null && message.scopeMetrics.length)\n for (var i = 0; i < message.scopeMetrics.length; ++i)\n $root.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(message.scopeMetrics[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim();\n if (message.schemaUrl != null && Object.hasOwnProperty.call(message, \"schemaUrl\"))\n writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl);\n return writer;\n };\n /**\n * Encodes the specified ResourceMetrics message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ResourceMetrics.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics\n * @static\n * @param {opentelemetry.proto.metrics.v1.IResourceMetrics} message ResourceMetrics message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ResourceMetrics.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a ResourceMetrics message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.metrics.v1.ResourceMetrics} ResourceMetrics\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ResourceMetrics.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ResourceMetrics();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.resource = $root.opentelemetry.proto.resource.v1.Resource.decode(reader, reader.uint32());\n break;\n }\n case 2: {\n if (!(message.scopeMetrics && message.scopeMetrics.length))\n message.scopeMetrics = [];\n message.scopeMetrics.push($root.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(reader, reader.uint32()));\n break;\n }\n case 3: {\n message.schemaUrl = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a ResourceMetrics message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.metrics.v1.ResourceMetrics} ResourceMetrics\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ResourceMetrics.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a ResourceMetrics message.\n * @function verify\n * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ResourceMetrics.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.resource != null && message.hasOwnProperty(\"resource\")) {\n var error = $root.opentelemetry.proto.resource.v1.Resource.verify(message.resource);\n if (error)\n return \"resource.\" + error;\n }\n if (message.scopeMetrics != null && message.hasOwnProperty(\"scopeMetrics\")) {\n if (!Array.isArray(message.scopeMetrics))\n return \"scopeMetrics: array expected\";\n for (var i = 0; i < message.scopeMetrics.length; ++i) {\n var error = $root.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(message.scopeMetrics[i]);\n if (error)\n return \"scopeMetrics.\" + error;\n }\n }\n if (message.schemaUrl != null && message.hasOwnProperty(\"schemaUrl\"))\n if (!$util.isString(message.schemaUrl))\n return \"schemaUrl: string expected\";\n return null;\n };\n /**\n * Creates a ResourceMetrics message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.metrics.v1.ResourceMetrics} ResourceMetrics\n */\n ResourceMetrics.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.metrics.v1.ResourceMetrics)\n return object;\n var message = new $root.opentelemetry.proto.metrics.v1.ResourceMetrics();\n if (object.resource != null) {\n if (typeof object.resource !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected\");\n message.resource = $root.opentelemetry.proto.resource.v1.Resource.fromObject(object.resource);\n }\n if (object.scopeMetrics) {\n if (!Array.isArray(object.scopeMetrics))\n throw TypeError(\".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected\");\n message.scopeMetrics = [];\n for (var i = 0; i < object.scopeMetrics.length; ++i) {\n if (typeof object.scopeMetrics[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected\");\n message.scopeMetrics[i] = $root.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(object.scopeMetrics[i]);\n }\n }\n if (object.schemaUrl != null)\n message.schemaUrl = String(object.schemaUrl);\n return message;\n };\n /**\n * Creates a plain object from a ResourceMetrics message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics\n * @static\n * @param {opentelemetry.proto.metrics.v1.ResourceMetrics} message ResourceMetrics\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ResourceMetrics.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.scopeMetrics = [];\n if (options.defaults) {\n object.resource = null;\n object.schemaUrl = \"\";\n }\n if (message.resource != null && message.hasOwnProperty(\"resource\"))\n object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource, options);\n if (message.scopeMetrics && message.scopeMetrics.length) {\n object.scopeMetrics = [];\n for (var j = 0; j < message.scopeMetrics.length; ++j)\n object.scopeMetrics[j] = $root.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(message.scopeMetrics[j], options);\n }\n if (message.schemaUrl != null && message.hasOwnProperty(\"schemaUrl\"))\n object.schemaUrl = message.schemaUrl;\n return object;\n };\n /**\n * Converts this ResourceMetrics to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics\n * @instance\n * @returns {Object.} JSON object\n */\n ResourceMetrics.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ResourceMetrics\n * @function getTypeUrl\n * @memberof opentelemetry.proto.metrics.v1.ResourceMetrics\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ResourceMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.metrics.v1.ResourceMetrics\";\n };\n return ResourceMetrics;\n })();\n v1.ScopeMetrics = (function () {\n /**\n * Properties of a ScopeMetrics.\n * @memberof opentelemetry.proto.metrics.v1\n * @interface IScopeMetrics\n * @property {opentelemetry.proto.common.v1.IInstrumentationScope|null} [scope] ScopeMetrics scope\n * @property {Array.|null} [metrics] ScopeMetrics metrics\n * @property {string|null} [schemaUrl] ScopeMetrics schemaUrl\n */\n /**\n * Constructs a new ScopeMetrics.\n * @memberof opentelemetry.proto.metrics.v1\n * @classdesc Represents a ScopeMetrics.\n * @implements IScopeMetrics\n * @constructor\n * @param {opentelemetry.proto.metrics.v1.IScopeMetrics=} [properties] Properties to set\n */\n function ScopeMetrics(properties) {\n this.metrics = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ScopeMetrics scope.\n * @member {opentelemetry.proto.common.v1.IInstrumentationScope|null|undefined} scope\n * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics\n * @instance\n */\n ScopeMetrics.prototype.scope = null;\n /**\n * ScopeMetrics metrics.\n * @member {Array.} metrics\n * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics\n * @instance\n */\n ScopeMetrics.prototype.metrics = $util.emptyArray;\n /**\n * ScopeMetrics schemaUrl.\n * @member {string|null|undefined} schemaUrl\n * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics\n * @instance\n */\n ScopeMetrics.prototype.schemaUrl = null;\n /**\n * Creates a new ScopeMetrics instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics\n * @static\n * @param {opentelemetry.proto.metrics.v1.IScopeMetrics=} [properties] Properties to set\n * @returns {opentelemetry.proto.metrics.v1.ScopeMetrics} ScopeMetrics instance\n */\n ScopeMetrics.create = function create(properties) {\n return new ScopeMetrics(properties);\n };\n /**\n * Encodes the specified ScopeMetrics message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ScopeMetrics.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics\n * @static\n * @param {opentelemetry.proto.metrics.v1.IScopeMetrics} message ScopeMetrics message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ScopeMetrics.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.scope != null && Object.hasOwnProperty.call(message, \"scope\"))\n $root.opentelemetry.proto.common.v1.InstrumentationScope.encode(message.scope, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n if (message.metrics != null && message.metrics.length)\n for (var i = 0; i < message.metrics.length; ++i)\n $root.opentelemetry.proto.metrics.v1.Metric.encode(message.metrics[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim();\n if (message.schemaUrl != null && Object.hasOwnProperty.call(message, \"schemaUrl\"))\n writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl);\n return writer;\n };\n /**\n * Encodes the specified ScopeMetrics message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ScopeMetrics.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics\n * @static\n * @param {opentelemetry.proto.metrics.v1.IScopeMetrics} message ScopeMetrics message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ScopeMetrics.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a ScopeMetrics message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.metrics.v1.ScopeMetrics} ScopeMetrics\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ScopeMetrics.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ScopeMetrics();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.decode(reader, reader.uint32());\n break;\n }\n case 2: {\n if (!(message.metrics && message.metrics.length))\n message.metrics = [];\n message.metrics.push($root.opentelemetry.proto.metrics.v1.Metric.decode(reader, reader.uint32()));\n break;\n }\n case 3: {\n message.schemaUrl = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a ScopeMetrics message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.metrics.v1.ScopeMetrics} ScopeMetrics\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ScopeMetrics.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a ScopeMetrics message.\n * @function verify\n * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ScopeMetrics.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.scope != null && message.hasOwnProperty(\"scope\")) {\n var error = $root.opentelemetry.proto.common.v1.InstrumentationScope.verify(message.scope);\n if (error)\n return \"scope.\" + error;\n }\n if (message.metrics != null && message.hasOwnProperty(\"metrics\")) {\n if (!Array.isArray(message.metrics))\n return \"metrics: array expected\";\n for (var i = 0; i < message.metrics.length; ++i) {\n var error = $root.opentelemetry.proto.metrics.v1.Metric.verify(message.metrics[i]);\n if (error)\n return \"metrics.\" + error;\n }\n }\n if (message.schemaUrl != null && message.hasOwnProperty(\"schemaUrl\"))\n if (!$util.isString(message.schemaUrl))\n return \"schemaUrl: string expected\";\n return null;\n };\n /**\n * Creates a ScopeMetrics message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.metrics.v1.ScopeMetrics} ScopeMetrics\n */\n ScopeMetrics.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.metrics.v1.ScopeMetrics)\n return object;\n var message = new $root.opentelemetry.proto.metrics.v1.ScopeMetrics();\n if (object.scope != null) {\n if (typeof object.scope !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected\");\n message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(object.scope);\n }\n if (object.metrics) {\n if (!Array.isArray(object.metrics))\n throw TypeError(\".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected\");\n message.metrics = [];\n for (var i = 0; i < object.metrics.length; ++i) {\n if (typeof object.metrics[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected\");\n message.metrics[i] = $root.opentelemetry.proto.metrics.v1.Metric.fromObject(object.metrics[i]);\n }\n }\n if (object.schemaUrl != null)\n message.schemaUrl = String(object.schemaUrl);\n return message;\n };\n /**\n * Creates a plain object from a ScopeMetrics message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics\n * @static\n * @param {opentelemetry.proto.metrics.v1.ScopeMetrics} message ScopeMetrics\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ScopeMetrics.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.metrics = [];\n if (options.defaults) {\n object.scope = null;\n object.schemaUrl = \"\";\n }\n if (message.scope != null && message.hasOwnProperty(\"scope\"))\n object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope, options);\n if (message.metrics && message.metrics.length) {\n object.metrics = [];\n for (var j = 0; j < message.metrics.length; ++j)\n object.metrics[j] = $root.opentelemetry.proto.metrics.v1.Metric.toObject(message.metrics[j], options);\n }\n if (message.schemaUrl != null && message.hasOwnProperty(\"schemaUrl\"))\n object.schemaUrl = message.schemaUrl;\n return object;\n };\n /**\n * Converts this ScopeMetrics to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics\n * @instance\n * @returns {Object.} JSON object\n */\n ScopeMetrics.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ScopeMetrics\n * @function getTypeUrl\n * @memberof opentelemetry.proto.metrics.v1.ScopeMetrics\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ScopeMetrics.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.metrics.v1.ScopeMetrics\";\n };\n return ScopeMetrics;\n })();\n v1.Metric = (function () {\n /**\n * Properties of a Metric.\n * @memberof opentelemetry.proto.metrics.v1\n * @interface IMetric\n * @property {string|null} [name] Metric name\n * @property {string|null} [description] Metric description\n * @property {string|null} [unit] Metric unit\n * @property {opentelemetry.proto.metrics.v1.IGauge|null} [gauge] Metric gauge\n * @property {opentelemetry.proto.metrics.v1.ISum|null} [sum] Metric sum\n * @property {opentelemetry.proto.metrics.v1.IHistogram|null} [histogram] Metric histogram\n * @property {opentelemetry.proto.metrics.v1.IExponentialHistogram|null} [exponentialHistogram] Metric exponentialHistogram\n * @property {opentelemetry.proto.metrics.v1.ISummary|null} [summary] Metric summary\n */\n /**\n * Constructs a new Metric.\n * @memberof opentelemetry.proto.metrics.v1\n * @classdesc Represents a Metric.\n * @implements IMetric\n * @constructor\n * @param {opentelemetry.proto.metrics.v1.IMetric=} [properties] Properties to set\n */\n function Metric(properties) {\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * Metric name.\n * @member {string|null|undefined} name\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @instance\n */\n Metric.prototype.name = null;\n /**\n * Metric description.\n * @member {string|null|undefined} description\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @instance\n */\n Metric.prototype.description = null;\n /**\n * Metric unit.\n * @member {string|null|undefined} unit\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @instance\n */\n Metric.prototype.unit = null;\n /**\n * Metric gauge.\n * @member {opentelemetry.proto.metrics.v1.IGauge|null|undefined} gauge\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @instance\n */\n Metric.prototype.gauge = null;\n /**\n * Metric sum.\n * @member {opentelemetry.proto.metrics.v1.ISum|null|undefined} sum\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @instance\n */\n Metric.prototype.sum = null;\n /**\n * Metric histogram.\n * @member {opentelemetry.proto.metrics.v1.IHistogram|null|undefined} histogram\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @instance\n */\n Metric.prototype.histogram = null;\n /**\n * Metric exponentialHistogram.\n * @member {opentelemetry.proto.metrics.v1.IExponentialHistogram|null|undefined} exponentialHistogram\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @instance\n */\n Metric.prototype.exponentialHistogram = null;\n /**\n * Metric summary.\n * @member {opentelemetry.proto.metrics.v1.ISummary|null|undefined} summary\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @instance\n */\n Metric.prototype.summary = null;\n // OneOf field names bound to virtual getters and setters\n var $oneOfFields;\n /**\n * Metric data.\n * @member {\"gauge\"|\"sum\"|\"histogram\"|\"exponentialHistogram\"|\"summary\"|undefined} data\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @instance\n */\n Object.defineProperty(Metric.prototype, \"data\", {\n get: $util.oneOfGetter($oneOfFields = [\"gauge\", \"sum\", \"histogram\", \"exponentialHistogram\", \"summary\"]),\n set: $util.oneOfSetter($oneOfFields)\n });\n /**\n * Creates a new Metric instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @static\n * @param {opentelemetry.proto.metrics.v1.IMetric=} [properties] Properties to set\n * @returns {opentelemetry.proto.metrics.v1.Metric} Metric instance\n */\n Metric.create = function create(properties) {\n return new Metric(properties);\n };\n /**\n * Encodes the specified Metric message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Metric.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @static\n * @param {opentelemetry.proto.metrics.v1.IMetric} message Metric message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Metric.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.name != null && Object.hasOwnProperty.call(message, \"name\"))\n writer.uint32(/* id 1, wireType 2 =*/ 10).string(message.name);\n if (message.description != null && Object.hasOwnProperty.call(message, \"description\"))\n writer.uint32(/* id 2, wireType 2 =*/ 18).string(message.description);\n if (message.unit != null && Object.hasOwnProperty.call(message, \"unit\"))\n writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.unit);\n if (message.gauge != null && Object.hasOwnProperty.call(message, \"gauge\"))\n $root.opentelemetry.proto.metrics.v1.Gauge.encode(message.gauge, writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim();\n if (message.sum != null && Object.hasOwnProperty.call(message, \"sum\"))\n $root.opentelemetry.proto.metrics.v1.Sum.encode(message.sum, writer.uint32(/* id 7, wireType 2 =*/ 58).fork()).ldelim();\n if (message.histogram != null && Object.hasOwnProperty.call(message, \"histogram\"))\n $root.opentelemetry.proto.metrics.v1.Histogram.encode(message.histogram, writer.uint32(/* id 9, wireType 2 =*/ 74).fork()).ldelim();\n if (message.exponentialHistogram != null && Object.hasOwnProperty.call(message, \"exponentialHistogram\"))\n $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(message.exponentialHistogram, writer.uint32(/* id 10, wireType 2 =*/ 82).fork()).ldelim();\n if (message.summary != null && Object.hasOwnProperty.call(message, \"summary\"))\n $root.opentelemetry.proto.metrics.v1.Summary.encode(message.summary, writer.uint32(/* id 11, wireType 2 =*/ 90).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified Metric message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Metric.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @static\n * @param {opentelemetry.proto.metrics.v1.IMetric} message Metric message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Metric.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a Metric message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.metrics.v1.Metric} Metric\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Metric.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Metric();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.name = reader.string();\n break;\n }\n case 2: {\n message.description = reader.string();\n break;\n }\n case 3: {\n message.unit = reader.string();\n break;\n }\n case 5: {\n message.gauge = $root.opentelemetry.proto.metrics.v1.Gauge.decode(reader, reader.uint32());\n break;\n }\n case 7: {\n message.sum = $root.opentelemetry.proto.metrics.v1.Sum.decode(reader, reader.uint32());\n break;\n }\n case 9: {\n message.histogram = $root.opentelemetry.proto.metrics.v1.Histogram.decode(reader, reader.uint32());\n break;\n }\n case 10: {\n message.exponentialHistogram = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(reader, reader.uint32());\n break;\n }\n case 11: {\n message.summary = $root.opentelemetry.proto.metrics.v1.Summary.decode(reader, reader.uint32());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a Metric message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.metrics.v1.Metric} Metric\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Metric.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a Metric message.\n * @function verify\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Metric.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n var properties = {};\n if (message.name != null && message.hasOwnProperty(\"name\"))\n if (!$util.isString(message.name))\n return \"name: string expected\";\n if (message.description != null && message.hasOwnProperty(\"description\"))\n if (!$util.isString(message.description))\n return \"description: string expected\";\n if (message.unit != null && message.hasOwnProperty(\"unit\"))\n if (!$util.isString(message.unit))\n return \"unit: string expected\";\n if (message.gauge != null && message.hasOwnProperty(\"gauge\")) {\n properties.data = 1;\n {\n var error = $root.opentelemetry.proto.metrics.v1.Gauge.verify(message.gauge);\n if (error)\n return \"gauge.\" + error;\n }\n }\n if (message.sum != null && message.hasOwnProperty(\"sum\")) {\n if (properties.data === 1)\n return \"data: multiple values\";\n properties.data = 1;\n {\n var error = $root.opentelemetry.proto.metrics.v1.Sum.verify(message.sum);\n if (error)\n return \"sum.\" + error;\n }\n }\n if (message.histogram != null && message.hasOwnProperty(\"histogram\")) {\n if (properties.data === 1)\n return \"data: multiple values\";\n properties.data = 1;\n {\n var error = $root.opentelemetry.proto.metrics.v1.Histogram.verify(message.histogram);\n if (error)\n return \"histogram.\" + error;\n }\n }\n if (message.exponentialHistogram != null && message.hasOwnProperty(\"exponentialHistogram\")) {\n if (properties.data === 1)\n return \"data: multiple values\";\n properties.data = 1;\n {\n var error = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(message.exponentialHistogram);\n if (error)\n return \"exponentialHistogram.\" + error;\n }\n }\n if (message.summary != null && message.hasOwnProperty(\"summary\")) {\n if (properties.data === 1)\n return \"data: multiple values\";\n properties.data = 1;\n {\n var error = $root.opentelemetry.proto.metrics.v1.Summary.verify(message.summary);\n if (error)\n return \"summary.\" + error;\n }\n }\n return null;\n };\n /**\n * Creates a Metric message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.metrics.v1.Metric} Metric\n */\n Metric.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.metrics.v1.Metric)\n return object;\n var message = new $root.opentelemetry.proto.metrics.v1.Metric();\n if (object.name != null)\n message.name = String(object.name);\n if (object.description != null)\n message.description = String(object.description);\n if (object.unit != null)\n message.unit = String(object.unit);\n if (object.gauge != null) {\n if (typeof object.gauge !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.Metric.gauge: object expected\");\n message.gauge = $root.opentelemetry.proto.metrics.v1.Gauge.fromObject(object.gauge);\n }\n if (object.sum != null) {\n if (typeof object.sum !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.Metric.sum: object expected\");\n message.sum = $root.opentelemetry.proto.metrics.v1.Sum.fromObject(object.sum);\n }\n if (object.histogram != null) {\n if (typeof object.histogram !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.Metric.histogram: object expected\");\n message.histogram = $root.opentelemetry.proto.metrics.v1.Histogram.fromObject(object.histogram);\n }\n if (object.exponentialHistogram != null) {\n if (typeof object.exponentialHistogram !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected\");\n message.exponentialHistogram = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(object.exponentialHistogram);\n }\n if (object.summary != null) {\n if (typeof object.summary !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.Metric.summary: object expected\");\n message.summary = $root.opentelemetry.proto.metrics.v1.Summary.fromObject(object.summary);\n }\n return message;\n };\n /**\n * Creates a plain object from a Metric message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @static\n * @param {opentelemetry.proto.metrics.v1.Metric} message Metric\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Metric.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.defaults) {\n object.name = \"\";\n object.description = \"\";\n object.unit = \"\";\n }\n if (message.name != null && message.hasOwnProperty(\"name\"))\n object.name = message.name;\n if (message.description != null && message.hasOwnProperty(\"description\"))\n object.description = message.description;\n if (message.unit != null && message.hasOwnProperty(\"unit\"))\n object.unit = message.unit;\n if (message.gauge != null && message.hasOwnProperty(\"gauge\")) {\n object.gauge = $root.opentelemetry.proto.metrics.v1.Gauge.toObject(message.gauge, options);\n if (options.oneofs)\n object.data = \"gauge\";\n }\n if (message.sum != null && message.hasOwnProperty(\"sum\")) {\n object.sum = $root.opentelemetry.proto.metrics.v1.Sum.toObject(message.sum, options);\n if (options.oneofs)\n object.data = \"sum\";\n }\n if (message.histogram != null && message.hasOwnProperty(\"histogram\")) {\n object.histogram = $root.opentelemetry.proto.metrics.v1.Histogram.toObject(message.histogram, options);\n if (options.oneofs)\n object.data = \"histogram\";\n }\n if (message.exponentialHistogram != null && message.hasOwnProperty(\"exponentialHistogram\")) {\n object.exponentialHistogram = $root.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(message.exponentialHistogram, options);\n if (options.oneofs)\n object.data = \"exponentialHistogram\";\n }\n if (message.summary != null && message.hasOwnProperty(\"summary\")) {\n object.summary = $root.opentelemetry.proto.metrics.v1.Summary.toObject(message.summary, options);\n if (options.oneofs)\n object.data = \"summary\";\n }\n return object;\n };\n /**\n * Converts this Metric to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @instance\n * @returns {Object.} JSON object\n */\n Metric.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for Metric\n * @function getTypeUrl\n * @memberof opentelemetry.proto.metrics.v1.Metric\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.metrics.v1.Metric\";\n };\n return Metric;\n })();\n v1.Gauge = (function () {\n /**\n * Properties of a Gauge.\n * @memberof opentelemetry.proto.metrics.v1\n * @interface IGauge\n * @property {Array.|null} [dataPoints] Gauge dataPoints\n */\n /**\n * Constructs a new Gauge.\n * @memberof opentelemetry.proto.metrics.v1\n * @classdesc Represents a Gauge.\n * @implements IGauge\n * @constructor\n * @param {opentelemetry.proto.metrics.v1.IGauge=} [properties] Properties to set\n */\n function Gauge(properties) {\n this.dataPoints = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * Gauge dataPoints.\n * @member {Array.} dataPoints\n * @memberof opentelemetry.proto.metrics.v1.Gauge\n * @instance\n */\n Gauge.prototype.dataPoints = $util.emptyArray;\n /**\n * Creates a new Gauge instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.metrics.v1.Gauge\n * @static\n * @param {opentelemetry.proto.metrics.v1.IGauge=} [properties] Properties to set\n * @returns {opentelemetry.proto.metrics.v1.Gauge} Gauge instance\n */\n Gauge.create = function create(properties) {\n return new Gauge(properties);\n };\n /**\n * Encodes the specified Gauge message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Gauge.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.metrics.v1.Gauge\n * @static\n * @param {opentelemetry.proto.metrics.v1.IGauge} message Gauge message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Gauge.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.dataPoints != null && message.dataPoints.length)\n for (var i = 0; i < message.dataPoints.length; ++i)\n $root.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified Gauge message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Gauge.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.Gauge\n * @static\n * @param {opentelemetry.proto.metrics.v1.IGauge} message Gauge message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Gauge.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a Gauge message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.metrics.v1.Gauge\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.metrics.v1.Gauge} Gauge\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Gauge.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Gauge();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.dataPoints && message.dataPoints.length))\n message.dataPoints = [];\n message.dataPoints.push($root.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(reader, reader.uint32()));\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a Gauge message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.Gauge\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.metrics.v1.Gauge} Gauge\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Gauge.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a Gauge message.\n * @function verify\n * @memberof opentelemetry.proto.metrics.v1.Gauge\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Gauge.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.dataPoints != null && message.hasOwnProperty(\"dataPoints\")) {\n if (!Array.isArray(message.dataPoints))\n return \"dataPoints: array expected\";\n for (var i = 0; i < message.dataPoints.length; ++i) {\n var error = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(message.dataPoints[i]);\n if (error)\n return \"dataPoints.\" + error;\n }\n }\n return null;\n };\n /**\n * Creates a Gauge message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.metrics.v1.Gauge\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.metrics.v1.Gauge} Gauge\n */\n Gauge.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.metrics.v1.Gauge)\n return object;\n var message = new $root.opentelemetry.proto.metrics.v1.Gauge();\n if (object.dataPoints) {\n if (!Array.isArray(object.dataPoints))\n throw TypeError(\".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected\");\n message.dataPoints = [];\n for (var i = 0; i < object.dataPoints.length; ++i) {\n if (typeof object.dataPoints[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected\");\n message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(object.dataPoints[i]);\n }\n }\n return message;\n };\n /**\n * Creates a plain object from a Gauge message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.metrics.v1.Gauge\n * @static\n * @param {opentelemetry.proto.metrics.v1.Gauge} message Gauge\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Gauge.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.dataPoints = [];\n if (message.dataPoints && message.dataPoints.length) {\n object.dataPoints = [];\n for (var j = 0; j < message.dataPoints.length; ++j)\n object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(message.dataPoints[j], options);\n }\n return object;\n };\n /**\n * Converts this Gauge to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.metrics.v1.Gauge\n * @instance\n * @returns {Object.} JSON object\n */\n Gauge.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for Gauge\n * @function getTypeUrl\n * @memberof opentelemetry.proto.metrics.v1.Gauge\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Gauge.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.metrics.v1.Gauge\";\n };\n return Gauge;\n })();\n v1.Sum = (function () {\n /**\n * Properties of a Sum.\n * @memberof opentelemetry.proto.metrics.v1\n * @interface ISum\n * @property {Array.|null} [dataPoints] Sum dataPoints\n * @property {opentelemetry.proto.metrics.v1.AggregationTemporality|null} [aggregationTemporality] Sum aggregationTemporality\n * @property {boolean|null} [isMonotonic] Sum isMonotonic\n */\n /**\n * Constructs a new Sum.\n * @memberof opentelemetry.proto.metrics.v1\n * @classdesc Represents a Sum.\n * @implements ISum\n * @constructor\n * @param {opentelemetry.proto.metrics.v1.ISum=} [properties] Properties to set\n */\n function Sum(properties) {\n this.dataPoints = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * Sum dataPoints.\n * @member {Array.} dataPoints\n * @memberof opentelemetry.proto.metrics.v1.Sum\n * @instance\n */\n Sum.prototype.dataPoints = $util.emptyArray;\n /**\n * Sum aggregationTemporality.\n * @member {opentelemetry.proto.metrics.v1.AggregationTemporality|null|undefined} aggregationTemporality\n * @memberof opentelemetry.proto.metrics.v1.Sum\n * @instance\n */\n Sum.prototype.aggregationTemporality = null;\n /**\n * Sum isMonotonic.\n * @member {boolean|null|undefined} isMonotonic\n * @memberof opentelemetry.proto.metrics.v1.Sum\n * @instance\n */\n Sum.prototype.isMonotonic = null;\n /**\n * Creates a new Sum instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.metrics.v1.Sum\n * @static\n * @param {opentelemetry.proto.metrics.v1.ISum=} [properties] Properties to set\n * @returns {opentelemetry.proto.metrics.v1.Sum} Sum instance\n */\n Sum.create = function create(properties) {\n return new Sum(properties);\n };\n /**\n * Encodes the specified Sum message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Sum.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.metrics.v1.Sum\n * @static\n * @param {opentelemetry.proto.metrics.v1.ISum} message Sum message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Sum.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.dataPoints != null && message.dataPoints.length)\n for (var i = 0; i < message.dataPoints.length; ++i)\n $root.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n if (message.aggregationTemporality != null && Object.hasOwnProperty.call(message, \"aggregationTemporality\"))\n writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.aggregationTemporality);\n if (message.isMonotonic != null && Object.hasOwnProperty.call(message, \"isMonotonic\"))\n writer.uint32(/* id 3, wireType 0 =*/ 24).bool(message.isMonotonic);\n return writer;\n };\n /**\n * Encodes the specified Sum message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Sum.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.Sum\n * @static\n * @param {opentelemetry.proto.metrics.v1.ISum} message Sum message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Sum.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a Sum message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.metrics.v1.Sum\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.metrics.v1.Sum} Sum\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Sum.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Sum();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.dataPoints && message.dataPoints.length))\n message.dataPoints = [];\n message.dataPoints.push($root.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(reader, reader.uint32()));\n break;\n }\n case 2: {\n message.aggregationTemporality = reader.int32();\n break;\n }\n case 3: {\n message.isMonotonic = reader.bool();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a Sum message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.Sum\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.metrics.v1.Sum} Sum\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Sum.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a Sum message.\n * @function verify\n * @memberof opentelemetry.proto.metrics.v1.Sum\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Sum.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.dataPoints != null && message.hasOwnProperty(\"dataPoints\")) {\n if (!Array.isArray(message.dataPoints))\n return \"dataPoints: array expected\";\n for (var i = 0; i < message.dataPoints.length; ++i) {\n var error = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(message.dataPoints[i]);\n if (error)\n return \"dataPoints.\" + error;\n }\n }\n if (message.aggregationTemporality != null && message.hasOwnProperty(\"aggregationTemporality\"))\n switch (message.aggregationTemporality) {\n default:\n return \"aggregationTemporality: enum value expected\";\n case 0:\n case 1:\n case 2:\n break;\n }\n if (message.isMonotonic != null && message.hasOwnProperty(\"isMonotonic\"))\n if (typeof message.isMonotonic !== \"boolean\")\n return \"isMonotonic: boolean expected\";\n return null;\n };\n /**\n * Creates a Sum message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.metrics.v1.Sum\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.metrics.v1.Sum} Sum\n */\n Sum.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.metrics.v1.Sum)\n return object;\n var message = new $root.opentelemetry.proto.metrics.v1.Sum();\n if (object.dataPoints) {\n if (!Array.isArray(object.dataPoints))\n throw TypeError(\".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected\");\n message.dataPoints = [];\n for (var i = 0; i < object.dataPoints.length; ++i) {\n if (typeof object.dataPoints[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected\");\n message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(object.dataPoints[i]);\n }\n }\n switch (object.aggregationTemporality) {\n default:\n if (typeof object.aggregationTemporality === \"number\") {\n message.aggregationTemporality = object.aggregationTemporality;\n break;\n }\n break;\n case \"AGGREGATION_TEMPORALITY_UNSPECIFIED\":\n case 0:\n message.aggregationTemporality = 0;\n break;\n case \"AGGREGATION_TEMPORALITY_DELTA\":\n case 1:\n message.aggregationTemporality = 1;\n break;\n case \"AGGREGATION_TEMPORALITY_CUMULATIVE\":\n case 2:\n message.aggregationTemporality = 2;\n break;\n }\n if (object.isMonotonic != null)\n message.isMonotonic = Boolean(object.isMonotonic);\n return message;\n };\n /**\n * Creates a plain object from a Sum message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.metrics.v1.Sum\n * @static\n * @param {opentelemetry.proto.metrics.v1.Sum} message Sum\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Sum.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.dataPoints = [];\n if (options.defaults) {\n object.aggregationTemporality = options.enums === String ? \"AGGREGATION_TEMPORALITY_UNSPECIFIED\" : 0;\n object.isMonotonic = false;\n }\n if (message.dataPoints && message.dataPoints.length) {\n object.dataPoints = [];\n for (var j = 0; j < message.dataPoints.length; ++j)\n object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(message.dataPoints[j], options);\n }\n if (message.aggregationTemporality != null && message.hasOwnProperty(\"aggregationTemporality\"))\n object.aggregationTemporality = options.enums === String ? $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] === undefined ? message.aggregationTemporality : $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] : message.aggregationTemporality;\n if (message.isMonotonic != null && message.hasOwnProperty(\"isMonotonic\"))\n object.isMonotonic = message.isMonotonic;\n return object;\n };\n /**\n * Converts this Sum to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.metrics.v1.Sum\n * @instance\n * @returns {Object.} JSON object\n */\n Sum.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for Sum\n * @function getTypeUrl\n * @memberof opentelemetry.proto.metrics.v1.Sum\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Sum.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.metrics.v1.Sum\";\n };\n return Sum;\n })();\n v1.Histogram = (function () {\n /**\n * Properties of a Histogram.\n * @memberof opentelemetry.proto.metrics.v1\n * @interface IHistogram\n * @property {Array.|null} [dataPoints] Histogram dataPoints\n * @property {opentelemetry.proto.metrics.v1.AggregationTemporality|null} [aggregationTemporality] Histogram aggregationTemporality\n */\n /**\n * Constructs a new Histogram.\n * @memberof opentelemetry.proto.metrics.v1\n * @classdesc Represents a Histogram.\n * @implements IHistogram\n * @constructor\n * @param {opentelemetry.proto.metrics.v1.IHistogram=} [properties] Properties to set\n */\n function Histogram(properties) {\n this.dataPoints = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * Histogram dataPoints.\n * @member {Array.} dataPoints\n * @memberof opentelemetry.proto.metrics.v1.Histogram\n * @instance\n */\n Histogram.prototype.dataPoints = $util.emptyArray;\n /**\n * Histogram aggregationTemporality.\n * @member {opentelemetry.proto.metrics.v1.AggregationTemporality|null|undefined} aggregationTemporality\n * @memberof opentelemetry.proto.metrics.v1.Histogram\n * @instance\n */\n Histogram.prototype.aggregationTemporality = null;\n /**\n * Creates a new Histogram instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.metrics.v1.Histogram\n * @static\n * @param {opentelemetry.proto.metrics.v1.IHistogram=} [properties] Properties to set\n * @returns {opentelemetry.proto.metrics.v1.Histogram} Histogram instance\n */\n Histogram.create = function create(properties) {\n return new Histogram(properties);\n };\n /**\n * Encodes the specified Histogram message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Histogram.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.metrics.v1.Histogram\n * @static\n * @param {opentelemetry.proto.metrics.v1.IHistogram} message Histogram message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Histogram.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.dataPoints != null && message.dataPoints.length)\n for (var i = 0; i < message.dataPoints.length; ++i)\n $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n if (message.aggregationTemporality != null && Object.hasOwnProperty.call(message, \"aggregationTemporality\"))\n writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.aggregationTemporality);\n return writer;\n };\n /**\n * Encodes the specified Histogram message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Histogram.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.Histogram\n * @static\n * @param {opentelemetry.proto.metrics.v1.IHistogram} message Histogram message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Histogram.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a Histogram message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.metrics.v1.Histogram\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.metrics.v1.Histogram} Histogram\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Histogram.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Histogram();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.dataPoints && message.dataPoints.length))\n message.dataPoints = [];\n message.dataPoints.push($root.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(reader, reader.uint32()));\n break;\n }\n case 2: {\n message.aggregationTemporality = reader.int32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a Histogram message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.Histogram\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.metrics.v1.Histogram} Histogram\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Histogram.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a Histogram message.\n * @function verify\n * @memberof opentelemetry.proto.metrics.v1.Histogram\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Histogram.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.dataPoints != null && message.hasOwnProperty(\"dataPoints\")) {\n if (!Array.isArray(message.dataPoints))\n return \"dataPoints: array expected\";\n for (var i = 0; i < message.dataPoints.length; ++i) {\n var error = $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(message.dataPoints[i]);\n if (error)\n return \"dataPoints.\" + error;\n }\n }\n if (message.aggregationTemporality != null && message.hasOwnProperty(\"aggregationTemporality\"))\n switch (message.aggregationTemporality) {\n default:\n return \"aggregationTemporality: enum value expected\";\n case 0:\n case 1:\n case 2:\n break;\n }\n return null;\n };\n /**\n * Creates a Histogram message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.metrics.v1.Histogram\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.metrics.v1.Histogram} Histogram\n */\n Histogram.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.metrics.v1.Histogram)\n return object;\n var message = new $root.opentelemetry.proto.metrics.v1.Histogram();\n if (object.dataPoints) {\n if (!Array.isArray(object.dataPoints))\n throw TypeError(\".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected\");\n message.dataPoints = [];\n for (var i = 0; i < object.dataPoints.length; ++i) {\n if (typeof object.dataPoints[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected\");\n message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(object.dataPoints[i]);\n }\n }\n switch (object.aggregationTemporality) {\n default:\n if (typeof object.aggregationTemporality === \"number\") {\n message.aggregationTemporality = object.aggregationTemporality;\n break;\n }\n break;\n case \"AGGREGATION_TEMPORALITY_UNSPECIFIED\":\n case 0:\n message.aggregationTemporality = 0;\n break;\n case \"AGGREGATION_TEMPORALITY_DELTA\":\n case 1:\n message.aggregationTemporality = 1;\n break;\n case \"AGGREGATION_TEMPORALITY_CUMULATIVE\":\n case 2:\n message.aggregationTemporality = 2;\n break;\n }\n return message;\n };\n /**\n * Creates a plain object from a Histogram message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.metrics.v1.Histogram\n * @static\n * @param {opentelemetry.proto.metrics.v1.Histogram} message Histogram\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Histogram.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.dataPoints = [];\n if (options.defaults)\n object.aggregationTemporality = options.enums === String ? \"AGGREGATION_TEMPORALITY_UNSPECIFIED\" : 0;\n if (message.dataPoints && message.dataPoints.length) {\n object.dataPoints = [];\n for (var j = 0; j < message.dataPoints.length; ++j)\n object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(message.dataPoints[j], options);\n }\n if (message.aggregationTemporality != null && message.hasOwnProperty(\"aggregationTemporality\"))\n object.aggregationTemporality = options.enums === String ? $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] === undefined ? message.aggregationTemporality : $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] : message.aggregationTemporality;\n return object;\n };\n /**\n * Converts this Histogram to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.metrics.v1.Histogram\n * @instance\n * @returns {Object.} JSON object\n */\n Histogram.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for Histogram\n * @function getTypeUrl\n * @memberof opentelemetry.proto.metrics.v1.Histogram\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Histogram.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.metrics.v1.Histogram\";\n };\n return Histogram;\n })();\n v1.ExponentialHistogram = (function () {\n /**\n * Properties of an ExponentialHistogram.\n * @memberof opentelemetry.proto.metrics.v1\n * @interface IExponentialHistogram\n * @property {Array.|null} [dataPoints] ExponentialHistogram dataPoints\n * @property {opentelemetry.proto.metrics.v1.AggregationTemporality|null} [aggregationTemporality] ExponentialHistogram aggregationTemporality\n */\n /**\n * Constructs a new ExponentialHistogram.\n * @memberof opentelemetry.proto.metrics.v1\n * @classdesc Represents an ExponentialHistogram.\n * @implements IExponentialHistogram\n * @constructor\n * @param {opentelemetry.proto.metrics.v1.IExponentialHistogram=} [properties] Properties to set\n */\n function ExponentialHistogram(properties) {\n this.dataPoints = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ExponentialHistogram dataPoints.\n * @member {Array.} dataPoints\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram\n * @instance\n */\n ExponentialHistogram.prototype.dataPoints = $util.emptyArray;\n /**\n * ExponentialHistogram aggregationTemporality.\n * @member {opentelemetry.proto.metrics.v1.AggregationTemporality|null|undefined} aggregationTemporality\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram\n * @instance\n */\n ExponentialHistogram.prototype.aggregationTemporality = null;\n /**\n * Creates a new ExponentialHistogram instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram\n * @static\n * @param {opentelemetry.proto.metrics.v1.IExponentialHistogram=} [properties] Properties to set\n * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogram} ExponentialHistogram instance\n */\n ExponentialHistogram.create = function create(properties) {\n return new ExponentialHistogram(properties);\n };\n /**\n * Encodes the specified ExponentialHistogram message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogram.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram\n * @static\n * @param {opentelemetry.proto.metrics.v1.IExponentialHistogram} message ExponentialHistogram message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExponentialHistogram.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.dataPoints != null && message.dataPoints.length)\n for (var i = 0; i < message.dataPoints.length; ++i)\n $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n if (message.aggregationTemporality != null && Object.hasOwnProperty.call(message, \"aggregationTemporality\"))\n writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.aggregationTemporality);\n return writer;\n };\n /**\n * Encodes the specified ExponentialHistogram message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogram.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram\n * @static\n * @param {opentelemetry.proto.metrics.v1.IExponentialHistogram} message ExponentialHistogram message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExponentialHistogram.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes an ExponentialHistogram message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogram} ExponentialHistogram\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExponentialHistogram.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogram();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.dataPoints && message.dataPoints.length))\n message.dataPoints = [];\n message.dataPoints.push($root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(reader, reader.uint32()));\n break;\n }\n case 2: {\n message.aggregationTemporality = reader.int32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes an ExponentialHistogram message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogram} ExponentialHistogram\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExponentialHistogram.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies an ExponentialHistogram message.\n * @function verify\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ExponentialHistogram.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.dataPoints != null && message.hasOwnProperty(\"dataPoints\")) {\n if (!Array.isArray(message.dataPoints))\n return \"dataPoints: array expected\";\n for (var i = 0; i < message.dataPoints.length; ++i) {\n var error = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(message.dataPoints[i]);\n if (error)\n return \"dataPoints.\" + error;\n }\n }\n if (message.aggregationTemporality != null && message.hasOwnProperty(\"aggregationTemporality\"))\n switch (message.aggregationTemporality) {\n default:\n return \"aggregationTemporality: enum value expected\";\n case 0:\n case 1:\n case 2:\n break;\n }\n return null;\n };\n /**\n * Creates an ExponentialHistogram message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogram} ExponentialHistogram\n */\n ExponentialHistogram.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.metrics.v1.ExponentialHistogram)\n return object;\n var message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogram();\n if (object.dataPoints) {\n if (!Array.isArray(object.dataPoints))\n throw TypeError(\".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected\");\n message.dataPoints = [];\n for (var i = 0; i < object.dataPoints.length; ++i) {\n if (typeof object.dataPoints[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected\");\n message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(object.dataPoints[i]);\n }\n }\n switch (object.aggregationTemporality) {\n default:\n if (typeof object.aggregationTemporality === \"number\") {\n message.aggregationTemporality = object.aggregationTemporality;\n break;\n }\n break;\n case \"AGGREGATION_TEMPORALITY_UNSPECIFIED\":\n case 0:\n message.aggregationTemporality = 0;\n break;\n case \"AGGREGATION_TEMPORALITY_DELTA\":\n case 1:\n message.aggregationTemporality = 1;\n break;\n case \"AGGREGATION_TEMPORALITY_CUMULATIVE\":\n case 2:\n message.aggregationTemporality = 2;\n break;\n }\n return message;\n };\n /**\n * Creates a plain object from an ExponentialHistogram message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram\n * @static\n * @param {opentelemetry.proto.metrics.v1.ExponentialHistogram} message ExponentialHistogram\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ExponentialHistogram.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.dataPoints = [];\n if (options.defaults)\n object.aggregationTemporality = options.enums === String ? \"AGGREGATION_TEMPORALITY_UNSPECIFIED\" : 0;\n if (message.dataPoints && message.dataPoints.length) {\n object.dataPoints = [];\n for (var j = 0; j < message.dataPoints.length; ++j)\n object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(message.dataPoints[j], options);\n }\n if (message.aggregationTemporality != null && message.hasOwnProperty(\"aggregationTemporality\"))\n object.aggregationTemporality = options.enums === String ? $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] === undefined ? message.aggregationTemporality : $root.opentelemetry.proto.metrics.v1.AggregationTemporality[message.aggregationTemporality] : message.aggregationTemporality;\n return object;\n };\n /**\n * Converts this ExponentialHistogram to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram\n * @instance\n * @returns {Object.} JSON object\n */\n ExponentialHistogram.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ExponentialHistogram\n * @function getTypeUrl\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogram\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ExponentialHistogram.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.metrics.v1.ExponentialHistogram\";\n };\n return ExponentialHistogram;\n })();\n v1.Summary = (function () {\n /**\n * Properties of a Summary.\n * @memberof opentelemetry.proto.metrics.v1\n * @interface ISummary\n * @property {Array.|null} [dataPoints] Summary dataPoints\n */\n /**\n * Constructs a new Summary.\n * @memberof opentelemetry.proto.metrics.v1\n * @classdesc Represents a Summary.\n * @implements ISummary\n * @constructor\n * @param {opentelemetry.proto.metrics.v1.ISummary=} [properties] Properties to set\n */\n function Summary(properties) {\n this.dataPoints = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * Summary dataPoints.\n * @member {Array.} dataPoints\n * @memberof opentelemetry.proto.metrics.v1.Summary\n * @instance\n */\n Summary.prototype.dataPoints = $util.emptyArray;\n /**\n * Creates a new Summary instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.metrics.v1.Summary\n * @static\n * @param {opentelemetry.proto.metrics.v1.ISummary=} [properties] Properties to set\n * @returns {opentelemetry.proto.metrics.v1.Summary} Summary instance\n */\n Summary.create = function create(properties) {\n return new Summary(properties);\n };\n /**\n * Encodes the specified Summary message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Summary.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.metrics.v1.Summary\n * @static\n * @param {opentelemetry.proto.metrics.v1.ISummary} message Summary message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Summary.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.dataPoints != null && message.dataPoints.length)\n for (var i = 0; i < message.dataPoints.length; ++i)\n $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(message.dataPoints[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified Summary message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Summary.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.Summary\n * @static\n * @param {opentelemetry.proto.metrics.v1.ISummary} message Summary message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Summary.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a Summary message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.metrics.v1.Summary\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.metrics.v1.Summary} Summary\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Summary.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Summary();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.dataPoints && message.dataPoints.length))\n message.dataPoints = [];\n message.dataPoints.push($root.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(reader, reader.uint32()));\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a Summary message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.Summary\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.metrics.v1.Summary} Summary\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Summary.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a Summary message.\n * @function verify\n * @memberof opentelemetry.proto.metrics.v1.Summary\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Summary.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.dataPoints != null && message.hasOwnProperty(\"dataPoints\")) {\n if (!Array.isArray(message.dataPoints))\n return \"dataPoints: array expected\";\n for (var i = 0; i < message.dataPoints.length; ++i) {\n var error = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(message.dataPoints[i]);\n if (error)\n return \"dataPoints.\" + error;\n }\n }\n return null;\n };\n /**\n * Creates a Summary message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.metrics.v1.Summary\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.metrics.v1.Summary} Summary\n */\n Summary.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.metrics.v1.Summary)\n return object;\n var message = new $root.opentelemetry.proto.metrics.v1.Summary();\n if (object.dataPoints) {\n if (!Array.isArray(object.dataPoints))\n throw TypeError(\".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected\");\n message.dataPoints = [];\n for (var i = 0; i < object.dataPoints.length; ++i) {\n if (typeof object.dataPoints[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected\");\n message.dataPoints[i] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(object.dataPoints[i]);\n }\n }\n return message;\n };\n /**\n * Creates a plain object from a Summary message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.metrics.v1.Summary\n * @static\n * @param {opentelemetry.proto.metrics.v1.Summary} message Summary\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Summary.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.dataPoints = [];\n if (message.dataPoints && message.dataPoints.length) {\n object.dataPoints = [];\n for (var j = 0; j < message.dataPoints.length; ++j)\n object.dataPoints[j] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(message.dataPoints[j], options);\n }\n return object;\n };\n /**\n * Converts this Summary to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.metrics.v1.Summary\n * @instance\n * @returns {Object.} JSON object\n */\n Summary.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for Summary\n * @function getTypeUrl\n * @memberof opentelemetry.proto.metrics.v1.Summary\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Summary.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.metrics.v1.Summary\";\n };\n return Summary;\n })();\n /**\n * AggregationTemporality enum.\n * @name opentelemetry.proto.metrics.v1.AggregationTemporality\n * @enum {number}\n * @property {number} AGGREGATION_TEMPORALITY_UNSPECIFIED=0 AGGREGATION_TEMPORALITY_UNSPECIFIED value\n * @property {number} AGGREGATION_TEMPORALITY_DELTA=1 AGGREGATION_TEMPORALITY_DELTA value\n * @property {number} AGGREGATION_TEMPORALITY_CUMULATIVE=2 AGGREGATION_TEMPORALITY_CUMULATIVE value\n */\n v1.AggregationTemporality = (function () {\n var valuesById = {}, values = Object.create(valuesById);\n values[valuesById[0] = \"AGGREGATION_TEMPORALITY_UNSPECIFIED\"] = 0;\n values[valuesById[1] = \"AGGREGATION_TEMPORALITY_DELTA\"] = 1;\n values[valuesById[2] = \"AGGREGATION_TEMPORALITY_CUMULATIVE\"] = 2;\n return values;\n })();\n /**\n * DataPointFlags enum.\n * @name opentelemetry.proto.metrics.v1.DataPointFlags\n * @enum {number}\n * @property {number} DATA_POINT_FLAGS_DO_NOT_USE=0 DATA_POINT_FLAGS_DO_NOT_USE value\n * @property {number} DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK=1 DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK value\n */\n v1.DataPointFlags = (function () {\n var valuesById = {}, values = Object.create(valuesById);\n values[valuesById[0] = \"DATA_POINT_FLAGS_DO_NOT_USE\"] = 0;\n values[valuesById[1] = \"DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK\"] = 1;\n return values;\n })();\n v1.NumberDataPoint = (function () {\n /**\n * Properties of a NumberDataPoint.\n * @memberof opentelemetry.proto.metrics.v1\n * @interface INumberDataPoint\n * @property {Array.|null} [attributes] NumberDataPoint attributes\n * @property {number|Long|null} [startTimeUnixNano] NumberDataPoint startTimeUnixNano\n * @property {number|Long|null} [timeUnixNano] NumberDataPoint timeUnixNano\n * @property {number|null} [asDouble] NumberDataPoint asDouble\n * @property {number|Long|null} [asInt] NumberDataPoint asInt\n * @property {Array.|null} [exemplars] NumberDataPoint exemplars\n * @property {number|null} [flags] NumberDataPoint flags\n */\n /**\n * Constructs a new NumberDataPoint.\n * @memberof opentelemetry.proto.metrics.v1\n * @classdesc Represents a NumberDataPoint.\n * @implements INumberDataPoint\n * @constructor\n * @param {opentelemetry.proto.metrics.v1.INumberDataPoint=} [properties] Properties to set\n */\n function NumberDataPoint(properties) {\n this.attributes = [];\n this.exemplars = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * NumberDataPoint attributes.\n * @member {Array.} attributes\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @instance\n */\n NumberDataPoint.prototype.attributes = $util.emptyArray;\n /**\n * NumberDataPoint startTimeUnixNano.\n * @member {number|Long|null|undefined} startTimeUnixNano\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @instance\n */\n NumberDataPoint.prototype.startTimeUnixNano = null;\n /**\n * NumberDataPoint timeUnixNano.\n * @member {number|Long|null|undefined} timeUnixNano\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @instance\n */\n NumberDataPoint.prototype.timeUnixNano = null;\n /**\n * NumberDataPoint asDouble.\n * @member {number|null|undefined} asDouble\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @instance\n */\n NumberDataPoint.prototype.asDouble = null;\n /**\n * NumberDataPoint asInt.\n * @member {number|Long|null|undefined} asInt\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @instance\n */\n NumberDataPoint.prototype.asInt = null;\n /**\n * NumberDataPoint exemplars.\n * @member {Array.} exemplars\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @instance\n */\n NumberDataPoint.prototype.exemplars = $util.emptyArray;\n /**\n * NumberDataPoint flags.\n * @member {number|null|undefined} flags\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @instance\n */\n NumberDataPoint.prototype.flags = null;\n // OneOf field names bound to virtual getters and setters\n var $oneOfFields;\n /**\n * NumberDataPoint value.\n * @member {\"asDouble\"|\"asInt\"|undefined} value\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @instance\n */\n Object.defineProperty(NumberDataPoint.prototype, \"value\", {\n get: $util.oneOfGetter($oneOfFields = [\"asDouble\", \"asInt\"]),\n set: $util.oneOfSetter($oneOfFields)\n });\n /**\n * Creates a new NumberDataPoint instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @static\n * @param {opentelemetry.proto.metrics.v1.INumberDataPoint=} [properties] Properties to set\n * @returns {opentelemetry.proto.metrics.v1.NumberDataPoint} NumberDataPoint instance\n */\n NumberDataPoint.create = function create(properties) {\n return new NumberDataPoint(properties);\n };\n /**\n * Encodes the specified NumberDataPoint message. Does not implicitly {@link opentelemetry.proto.metrics.v1.NumberDataPoint.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @static\n * @param {opentelemetry.proto.metrics.v1.INumberDataPoint} message NumberDataPoint message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n NumberDataPoint.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, \"startTimeUnixNano\"))\n writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.startTimeUnixNano);\n if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, \"timeUnixNano\"))\n writer.uint32(/* id 3, wireType 1 =*/ 25).fixed64(message.timeUnixNano);\n if (message.asDouble != null && Object.hasOwnProperty.call(message, \"asDouble\"))\n writer.uint32(/* id 4, wireType 1 =*/ 33).double(message.asDouble);\n if (message.exemplars != null && message.exemplars.length)\n for (var i = 0; i < message.exemplars.length; ++i)\n $root.opentelemetry.proto.metrics.v1.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim();\n if (message.asInt != null && Object.hasOwnProperty.call(message, \"asInt\"))\n writer.uint32(/* id 6, wireType 1 =*/ 49).sfixed64(message.asInt);\n if (message.attributes != null && message.attributes.length)\n for (var i = 0; i < message.attributes.length; ++i)\n $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 7, wireType 2 =*/ 58).fork()).ldelim();\n if (message.flags != null && Object.hasOwnProperty.call(message, \"flags\"))\n writer.uint32(/* id 8, wireType 0 =*/ 64).uint32(message.flags);\n return writer;\n };\n /**\n * Encodes the specified NumberDataPoint message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.NumberDataPoint.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @static\n * @param {opentelemetry.proto.metrics.v1.INumberDataPoint} message NumberDataPoint message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n NumberDataPoint.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a NumberDataPoint message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.metrics.v1.NumberDataPoint} NumberDataPoint\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n NumberDataPoint.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.NumberDataPoint();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 7: {\n if (!(message.attributes && message.attributes.length))\n message.attributes = [];\n message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32()));\n break;\n }\n case 2: {\n message.startTimeUnixNano = reader.fixed64();\n break;\n }\n case 3: {\n message.timeUnixNano = reader.fixed64();\n break;\n }\n case 4: {\n message.asDouble = reader.double();\n break;\n }\n case 6: {\n message.asInt = reader.sfixed64();\n break;\n }\n case 5: {\n if (!(message.exemplars && message.exemplars.length))\n message.exemplars = [];\n message.exemplars.push($root.opentelemetry.proto.metrics.v1.Exemplar.decode(reader, reader.uint32()));\n break;\n }\n case 8: {\n message.flags = reader.uint32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a NumberDataPoint message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.metrics.v1.NumberDataPoint} NumberDataPoint\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n NumberDataPoint.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a NumberDataPoint message.\n * @function verify\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n NumberDataPoint.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n var properties = {};\n if (message.attributes != null && message.hasOwnProperty(\"attributes\")) {\n if (!Array.isArray(message.attributes))\n return \"attributes: array expected\";\n for (var i = 0; i < message.attributes.length; ++i) {\n var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]);\n if (error)\n return \"attributes.\" + error;\n }\n }\n if (message.startTimeUnixNano != null && message.hasOwnProperty(\"startTimeUnixNano\"))\n if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high)))\n return \"startTimeUnixNano: integer|Long expected\";\n if (message.timeUnixNano != null && message.hasOwnProperty(\"timeUnixNano\"))\n if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high)))\n return \"timeUnixNano: integer|Long expected\";\n if (message.asDouble != null && message.hasOwnProperty(\"asDouble\")) {\n properties.value = 1;\n if (typeof message.asDouble !== \"number\")\n return \"asDouble: number expected\";\n }\n if (message.asInt != null && message.hasOwnProperty(\"asInt\")) {\n if (properties.value === 1)\n return \"value: multiple values\";\n properties.value = 1;\n if (!$util.isInteger(message.asInt) && !(message.asInt && $util.isInteger(message.asInt.low) && $util.isInteger(message.asInt.high)))\n return \"asInt: integer|Long expected\";\n }\n if (message.exemplars != null && message.hasOwnProperty(\"exemplars\")) {\n if (!Array.isArray(message.exemplars))\n return \"exemplars: array expected\";\n for (var i = 0; i < message.exemplars.length; ++i) {\n var error = $root.opentelemetry.proto.metrics.v1.Exemplar.verify(message.exemplars[i]);\n if (error)\n return \"exemplars.\" + error;\n }\n }\n if (message.flags != null && message.hasOwnProperty(\"flags\"))\n if (!$util.isInteger(message.flags))\n return \"flags: integer expected\";\n return null;\n };\n /**\n * Creates a NumberDataPoint message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.metrics.v1.NumberDataPoint} NumberDataPoint\n */\n NumberDataPoint.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.metrics.v1.NumberDataPoint)\n return object;\n var message = new $root.opentelemetry.proto.metrics.v1.NumberDataPoint();\n if (object.attributes) {\n if (!Array.isArray(object.attributes))\n throw TypeError(\".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected\");\n message.attributes = [];\n for (var i = 0; i < object.attributes.length; ++i) {\n if (typeof object.attributes[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected\");\n message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]);\n }\n }\n if (object.startTimeUnixNano != null)\n if ($util.Long)\n (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false;\n else if (typeof object.startTimeUnixNano === \"string\")\n message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10);\n else if (typeof object.startTimeUnixNano === \"number\")\n message.startTimeUnixNano = object.startTimeUnixNano;\n else if (typeof object.startTimeUnixNano === \"object\")\n message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber();\n if (object.timeUnixNano != null)\n if ($util.Long)\n (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false;\n else if (typeof object.timeUnixNano === \"string\")\n message.timeUnixNano = parseInt(object.timeUnixNano, 10);\n else if (typeof object.timeUnixNano === \"number\")\n message.timeUnixNano = object.timeUnixNano;\n else if (typeof object.timeUnixNano === \"object\")\n message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber();\n if (object.asDouble != null)\n message.asDouble = Number(object.asDouble);\n if (object.asInt != null)\n if ($util.Long)\n (message.asInt = $util.Long.fromValue(object.asInt)).unsigned = false;\n else if (typeof object.asInt === \"string\")\n message.asInt = parseInt(object.asInt, 10);\n else if (typeof object.asInt === \"number\")\n message.asInt = object.asInt;\n else if (typeof object.asInt === \"object\")\n message.asInt = new $util.LongBits(object.asInt.low >>> 0, object.asInt.high >>> 0).toNumber();\n if (object.exemplars) {\n if (!Array.isArray(object.exemplars))\n throw TypeError(\".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected\");\n message.exemplars = [];\n for (var i = 0; i < object.exemplars.length; ++i) {\n if (typeof object.exemplars[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected\");\n message.exemplars[i] = $root.opentelemetry.proto.metrics.v1.Exemplar.fromObject(object.exemplars[i]);\n }\n }\n if (object.flags != null)\n message.flags = object.flags >>> 0;\n return message;\n };\n /**\n * Creates a plain object from a NumberDataPoint message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @static\n * @param {opentelemetry.proto.metrics.v1.NumberDataPoint} message NumberDataPoint\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n NumberDataPoint.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults) {\n object.exemplars = [];\n object.attributes = [];\n }\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.startTimeUnixNano = options.longs === String ? \"0\" : 0;\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.timeUnixNano = options.longs === String ? \"0\" : 0;\n object.flags = 0;\n }\n if (message.startTimeUnixNano != null && message.hasOwnProperty(\"startTimeUnixNano\"))\n if (typeof message.startTimeUnixNano === \"number\")\n object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano;\n else\n object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano;\n if (message.timeUnixNano != null && message.hasOwnProperty(\"timeUnixNano\"))\n if (typeof message.timeUnixNano === \"number\")\n object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano;\n else\n object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano;\n if (message.asDouble != null && message.hasOwnProperty(\"asDouble\")) {\n object.asDouble = options.json && !isFinite(message.asDouble) ? String(message.asDouble) : message.asDouble;\n if (options.oneofs)\n object.value = \"asDouble\";\n }\n if (message.exemplars && message.exemplars.length) {\n object.exemplars = [];\n for (var j = 0; j < message.exemplars.length; ++j)\n object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j], options);\n }\n if (message.asInt != null && message.hasOwnProperty(\"asInt\")) {\n if (typeof message.asInt === \"number\")\n object.asInt = options.longs === String ? String(message.asInt) : message.asInt;\n else\n object.asInt = options.longs === String ? $util.Long.prototype.toString.call(message.asInt) : options.longs === Number ? new $util.LongBits(message.asInt.low >>> 0, message.asInt.high >>> 0).toNumber() : message.asInt;\n if (options.oneofs)\n object.value = \"asInt\";\n }\n if (message.attributes && message.attributes.length) {\n object.attributes = [];\n for (var j = 0; j < message.attributes.length; ++j)\n object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options);\n }\n if (message.flags != null && message.hasOwnProperty(\"flags\"))\n object.flags = message.flags;\n return object;\n };\n /**\n * Converts this NumberDataPoint to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @instance\n * @returns {Object.} JSON object\n */\n NumberDataPoint.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for NumberDataPoint\n * @function getTypeUrl\n * @memberof opentelemetry.proto.metrics.v1.NumberDataPoint\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n NumberDataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.metrics.v1.NumberDataPoint\";\n };\n return NumberDataPoint;\n })();\n v1.HistogramDataPoint = (function () {\n /**\n * Properties of a HistogramDataPoint.\n * @memberof opentelemetry.proto.metrics.v1\n * @interface IHistogramDataPoint\n * @property {Array.|null} [attributes] HistogramDataPoint attributes\n * @property {number|Long|null} [startTimeUnixNano] HistogramDataPoint startTimeUnixNano\n * @property {number|Long|null} [timeUnixNano] HistogramDataPoint timeUnixNano\n * @property {number|Long|null} [count] HistogramDataPoint count\n * @property {number|null} [sum] HistogramDataPoint sum\n * @property {Array.|null} [bucketCounts] HistogramDataPoint bucketCounts\n * @property {Array.|null} [explicitBounds] HistogramDataPoint explicitBounds\n * @property {Array.|null} [exemplars] HistogramDataPoint exemplars\n * @property {number|null} [flags] HistogramDataPoint flags\n * @property {number|null} [min] HistogramDataPoint min\n * @property {number|null} [max] HistogramDataPoint max\n */\n /**\n * Constructs a new HistogramDataPoint.\n * @memberof opentelemetry.proto.metrics.v1\n * @classdesc Represents a HistogramDataPoint.\n * @implements IHistogramDataPoint\n * @constructor\n * @param {opentelemetry.proto.metrics.v1.IHistogramDataPoint=} [properties] Properties to set\n */\n function HistogramDataPoint(properties) {\n this.attributes = [];\n this.bucketCounts = [];\n this.explicitBounds = [];\n this.exemplars = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * HistogramDataPoint attributes.\n * @member {Array.} attributes\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @instance\n */\n HistogramDataPoint.prototype.attributes = $util.emptyArray;\n /**\n * HistogramDataPoint startTimeUnixNano.\n * @member {number|Long|null|undefined} startTimeUnixNano\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @instance\n */\n HistogramDataPoint.prototype.startTimeUnixNano = null;\n /**\n * HistogramDataPoint timeUnixNano.\n * @member {number|Long|null|undefined} timeUnixNano\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @instance\n */\n HistogramDataPoint.prototype.timeUnixNano = null;\n /**\n * HistogramDataPoint count.\n * @member {number|Long|null|undefined} count\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @instance\n */\n HistogramDataPoint.prototype.count = null;\n /**\n * HistogramDataPoint sum.\n * @member {number|null|undefined} sum\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @instance\n */\n HistogramDataPoint.prototype.sum = null;\n /**\n * HistogramDataPoint bucketCounts.\n * @member {Array.} bucketCounts\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @instance\n */\n HistogramDataPoint.prototype.bucketCounts = $util.emptyArray;\n /**\n * HistogramDataPoint explicitBounds.\n * @member {Array.} explicitBounds\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @instance\n */\n HistogramDataPoint.prototype.explicitBounds = $util.emptyArray;\n /**\n * HistogramDataPoint exemplars.\n * @member {Array.} exemplars\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @instance\n */\n HistogramDataPoint.prototype.exemplars = $util.emptyArray;\n /**\n * HistogramDataPoint flags.\n * @member {number|null|undefined} flags\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @instance\n */\n HistogramDataPoint.prototype.flags = null;\n /**\n * HistogramDataPoint min.\n * @member {number|null|undefined} min\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @instance\n */\n HistogramDataPoint.prototype.min = null;\n /**\n * HistogramDataPoint max.\n * @member {number|null|undefined} max\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @instance\n */\n HistogramDataPoint.prototype.max = null;\n // OneOf field names bound to virtual getters and setters\n var $oneOfFields;\n /**\n * HistogramDataPoint _sum.\n * @member {\"sum\"|undefined} _sum\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @instance\n */\n Object.defineProperty(HistogramDataPoint.prototype, \"_sum\", {\n get: $util.oneOfGetter($oneOfFields = [\"sum\"]),\n set: $util.oneOfSetter($oneOfFields)\n });\n /**\n * HistogramDataPoint _min.\n * @member {\"min\"|undefined} _min\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @instance\n */\n Object.defineProperty(HistogramDataPoint.prototype, \"_min\", {\n get: $util.oneOfGetter($oneOfFields = [\"min\"]),\n set: $util.oneOfSetter($oneOfFields)\n });\n /**\n * HistogramDataPoint _max.\n * @member {\"max\"|undefined} _max\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @instance\n */\n Object.defineProperty(HistogramDataPoint.prototype, \"_max\", {\n get: $util.oneOfGetter($oneOfFields = [\"max\"]),\n set: $util.oneOfSetter($oneOfFields)\n });\n /**\n * Creates a new HistogramDataPoint instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @static\n * @param {opentelemetry.proto.metrics.v1.IHistogramDataPoint=} [properties] Properties to set\n * @returns {opentelemetry.proto.metrics.v1.HistogramDataPoint} HistogramDataPoint instance\n */\n HistogramDataPoint.create = function create(properties) {\n return new HistogramDataPoint(properties);\n };\n /**\n * Encodes the specified HistogramDataPoint message. Does not implicitly {@link opentelemetry.proto.metrics.v1.HistogramDataPoint.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @static\n * @param {opentelemetry.proto.metrics.v1.IHistogramDataPoint} message HistogramDataPoint message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n HistogramDataPoint.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, \"startTimeUnixNano\"))\n writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.startTimeUnixNano);\n if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, \"timeUnixNano\"))\n writer.uint32(/* id 3, wireType 1 =*/ 25).fixed64(message.timeUnixNano);\n if (message.count != null && Object.hasOwnProperty.call(message, \"count\"))\n writer.uint32(/* id 4, wireType 1 =*/ 33).fixed64(message.count);\n if (message.sum != null && Object.hasOwnProperty.call(message, \"sum\"))\n writer.uint32(/* id 5, wireType 1 =*/ 41).double(message.sum);\n if (message.bucketCounts != null && message.bucketCounts.length) {\n writer.uint32(/* id 6, wireType 2 =*/ 50).fork();\n for (var i = 0; i < message.bucketCounts.length; ++i)\n writer.fixed64(message.bucketCounts[i]);\n writer.ldelim();\n }\n if (message.explicitBounds != null && message.explicitBounds.length) {\n writer.uint32(/* id 7, wireType 2 =*/ 58).fork();\n for (var i = 0; i < message.explicitBounds.length; ++i)\n writer.double(message.explicitBounds[i]);\n writer.ldelim();\n }\n if (message.exemplars != null && message.exemplars.length)\n for (var i = 0; i < message.exemplars.length; ++i)\n $root.opentelemetry.proto.metrics.v1.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 8, wireType 2 =*/ 66).fork()).ldelim();\n if (message.attributes != null && message.attributes.length)\n for (var i = 0; i < message.attributes.length; ++i)\n $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 9, wireType 2 =*/ 74).fork()).ldelim();\n if (message.flags != null && Object.hasOwnProperty.call(message, \"flags\"))\n writer.uint32(/* id 10, wireType 0 =*/ 80).uint32(message.flags);\n if (message.min != null && Object.hasOwnProperty.call(message, \"min\"))\n writer.uint32(/* id 11, wireType 1 =*/ 89).double(message.min);\n if (message.max != null && Object.hasOwnProperty.call(message, \"max\"))\n writer.uint32(/* id 12, wireType 1 =*/ 97).double(message.max);\n return writer;\n };\n /**\n * Encodes the specified HistogramDataPoint message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.HistogramDataPoint.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @static\n * @param {opentelemetry.proto.metrics.v1.IHistogramDataPoint} message HistogramDataPoint message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n HistogramDataPoint.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a HistogramDataPoint message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.metrics.v1.HistogramDataPoint} HistogramDataPoint\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n HistogramDataPoint.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.HistogramDataPoint();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 9: {\n if (!(message.attributes && message.attributes.length))\n message.attributes = [];\n message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32()));\n break;\n }\n case 2: {\n message.startTimeUnixNano = reader.fixed64();\n break;\n }\n case 3: {\n message.timeUnixNano = reader.fixed64();\n break;\n }\n case 4: {\n message.count = reader.fixed64();\n break;\n }\n case 5: {\n message.sum = reader.double();\n break;\n }\n case 6: {\n if (!(message.bucketCounts && message.bucketCounts.length))\n message.bucketCounts = [];\n if ((tag & 7) === 2) {\n var end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2)\n message.bucketCounts.push(reader.fixed64());\n }\n else\n message.bucketCounts.push(reader.fixed64());\n break;\n }\n case 7: {\n if (!(message.explicitBounds && message.explicitBounds.length))\n message.explicitBounds = [];\n if ((tag & 7) === 2) {\n var end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2)\n message.explicitBounds.push(reader.double());\n }\n else\n message.explicitBounds.push(reader.double());\n break;\n }\n case 8: {\n if (!(message.exemplars && message.exemplars.length))\n message.exemplars = [];\n message.exemplars.push($root.opentelemetry.proto.metrics.v1.Exemplar.decode(reader, reader.uint32()));\n break;\n }\n case 10: {\n message.flags = reader.uint32();\n break;\n }\n case 11: {\n message.min = reader.double();\n break;\n }\n case 12: {\n message.max = reader.double();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a HistogramDataPoint message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.metrics.v1.HistogramDataPoint} HistogramDataPoint\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n HistogramDataPoint.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a HistogramDataPoint message.\n * @function verify\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n HistogramDataPoint.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n var properties = {};\n if (message.attributes != null && message.hasOwnProperty(\"attributes\")) {\n if (!Array.isArray(message.attributes))\n return \"attributes: array expected\";\n for (var i = 0; i < message.attributes.length; ++i) {\n var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]);\n if (error)\n return \"attributes.\" + error;\n }\n }\n if (message.startTimeUnixNano != null && message.hasOwnProperty(\"startTimeUnixNano\"))\n if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high)))\n return \"startTimeUnixNano: integer|Long expected\";\n if (message.timeUnixNano != null && message.hasOwnProperty(\"timeUnixNano\"))\n if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high)))\n return \"timeUnixNano: integer|Long expected\";\n if (message.count != null && message.hasOwnProperty(\"count\"))\n if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high)))\n return \"count: integer|Long expected\";\n if (message.sum != null && message.hasOwnProperty(\"sum\")) {\n properties._sum = 1;\n if (typeof message.sum !== \"number\")\n return \"sum: number expected\";\n }\n if (message.bucketCounts != null && message.hasOwnProperty(\"bucketCounts\")) {\n if (!Array.isArray(message.bucketCounts))\n return \"bucketCounts: array expected\";\n for (var i = 0; i < message.bucketCounts.length; ++i)\n if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high)))\n return \"bucketCounts: integer|Long[] expected\";\n }\n if (message.explicitBounds != null && message.hasOwnProperty(\"explicitBounds\")) {\n if (!Array.isArray(message.explicitBounds))\n return \"explicitBounds: array expected\";\n for (var i = 0; i < message.explicitBounds.length; ++i)\n if (typeof message.explicitBounds[i] !== \"number\")\n return \"explicitBounds: number[] expected\";\n }\n if (message.exemplars != null && message.hasOwnProperty(\"exemplars\")) {\n if (!Array.isArray(message.exemplars))\n return \"exemplars: array expected\";\n for (var i = 0; i < message.exemplars.length; ++i) {\n var error = $root.opentelemetry.proto.metrics.v1.Exemplar.verify(message.exemplars[i]);\n if (error)\n return \"exemplars.\" + error;\n }\n }\n if (message.flags != null && message.hasOwnProperty(\"flags\"))\n if (!$util.isInteger(message.flags))\n return \"flags: integer expected\";\n if (message.min != null && message.hasOwnProperty(\"min\")) {\n properties._min = 1;\n if (typeof message.min !== \"number\")\n return \"min: number expected\";\n }\n if (message.max != null && message.hasOwnProperty(\"max\")) {\n properties._max = 1;\n if (typeof message.max !== \"number\")\n return \"max: number expected\";\n }\n return null;\n };\n /**\n * Creates a HistogramDataPoint message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.metrics.v1.HistogramDataPoint} HistogramDataPoint\n */\n HistogramDataPoint.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.metrics.v1.HistogramDataPoint)\n return object;\n var message = new $root.opentelemetry.proto.metrics.v1.HistogramDataPoint();\n if (object.attributes) {\n if (!Array.isArray(object.attributes))\n throw TypeError(\".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected\");\n message.attributes = [];\n for (var i = 0; i < object.attributes.length; ++i) {\n if (typeof object.attributes[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected\");\n message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]);\n }\n }\n if (object.startTimeUnixNano != null)\n if ($util.Long)\n (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false;\n else if (typeof object.startTimeUnixNano === \"string\")\n message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10);\n else if (typeof object.startTimeUnixNano === \"number\")\n message.startTimeUnixNano = object.startTimeUnixNano;\n else if (typeof object.startTimeUnixNano === \"object\")\n message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber();\n if (object.timeUnixNano != null)\n if ($util.Long)\n (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false;\n else if (typeof object.timeUnixNano === \"string\")\n message.timeUnixNano = parseInt(object.timeUnixNano, 10);\n else if (typeof object.timeUnixNano === \"number\")\n message.timeUnixNano = object.timeUnixNano;\n else if (typeof object.timeUnixNano === \"object\")\n message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber();\n if (object.count != null)\n if ($util.Long)\n (message.count = $util.Long.fromValue(object.count)).unsigned = false;\n else if (typeof object.count === \"string\")\n message.count = parseInt(object.count, 10);\n else if (typeof object.count === \"number\")\n message.count = object.count;\n else if (typeof object.count === \"object\")\n message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber();\n if (object.sum != null)\n message.sum = Number(object.sum);\n if (object.bucketCounts) {\n if (!Array.isArray(object.bucketCounts))\n throw TypeError(\".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected\");\n message.bucketCounts = [];\n for (var i = 0; i < object.bucketCounts.length; ++i)\n if ($util.Long)\n (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false;\n else if (typeof object.bucketCounts[i] === \"string\")\n message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10);\n else if (typeof object.bucketCounts[i] === \"number\")\n message.bucketCounts[i] = object.bucketCounts[i];\n else if (typeof object.bucketCounts[i] === \"object\")\n message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber();\n }\n if (object.explicitBounds) {\n if (!Array.isArray(object.explicitBounds))\n throw TypeError(\".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected\");\n message.explicitBounds = [];\n for (var i = 0; i < object.explicitBounds.length; ++i)\n message.explicitBounds[i] = Number(object.explicitBounds[i]);\n }\n if (object.exemplars) {\n if (!Array.isArray(object.exemplars))\n throw TypeError(\".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected\");\n message.exemplars = [];\n for (var i = 0; i < object.exemplars.length; ++i) {\n if (typeof object.exemplars[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected\");\n message.exemplars[i] = $root.opentelemetry.proto.metrics.v1.Exemplar.fromObject(object.exemplars[i]);\n }\n }\n if (object.flags != null)\n message.flags = object.flags >>> 0;\n if (object.min != null)\n message.min = Number(object.min);\n if (object.max != null)\n message.max = Number(object.max);\n return message;\n };\n /**\n * Creates a plain object from a HistogramDataPoint message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @static\n * @param {opentelemetry.proto.metrics.v1.HistogramDataPoint} message HistogramDataPoint\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n HistogramDataPoint.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults) {\n object.bucketCounts = [];\n object.explicitBounds = [];\n object.exemplars = [];\n object.attributes = [];\n }\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.startTimeUnixNano = options.longs === String ? \"0\" : 0;\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.timeUnixNano = options.longs === String ? \"0\" : 0;\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.count = options.longs === String ? \"0\" : 0;\n object.flags = 0;\n }\n if (message.startTimeUnixNano != null && message.hasOwnProperty(\"startTimeUnixNano\"))\n if (typeof message.startTimeUnixNano === \"number\")\n object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano;\n else\n object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano;\n if (message.timeUnixNano != null && message.hasOwnProperty(\"timeUnixNano\"))\n if (typeof message.timeUnixNano === \"number\")\n object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano;\n else\n object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano;\n if (message.count != null && message.hasOwnProperty(\"count\"))\n if (typeof message.count === \"number\")\n object.count = options.longs === String ? String(message.count) : message.count;\n else\n object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count;\n if (message.sum != null && message.hasOwnProperty(\"sum\")) {\n object.sum = options.json && !isFinite(message.sum) ? String(message.sum) : message.sum;\n if (options.oneofs)\n object._sum = \"sum\";\n }\n if (message.bucketCounts && message.bucketCounts.length) {\n object.bucketCounts = [];\n for (var j = 0; j < message.bucketCounts.length; ++j)\n if (typeof message.bucketCounts[j] === \"number\")\n object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j];\n else\n object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j];\n }\n if (message.explicitBounds && message.explicitBounds.length) {\n object.explicitBounds = [];\n for (var j = 0; j < message.explicitBounds.length; ++j)\n object.explicitBounds[j] = options.json && !isFinite(message.explicitBounds[j]) ? String(message.explicitBounds[j]) : message.explicitBounds[j];\n }\n if (message.exemplars && message.exemplars.length) {\n object.exemplars = [];\n for (var j = 0; j < message.exemplars.length; ++j)\n object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j], options);\n }\n if (message.attributes && message.attributes.length) {\n object.attributes = [];\n for (var j = 0; j < message.attributes.length; ++j)\n object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options);\n }\n if (message.flags != null && message.hasOwnProperty(\"flags\"))\n object.flags = message.flags;\n if (message.min != null && message.hasOwnProperty(\"min\")) {\n object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min;\n if (options.oneofs)\n object._min = \"min\";\n }\n if (message.max != null && message.hasOwnProperty(\"max\")) {\n object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max;\n if (options.oneofs)\n object._max = \"max\";\n }\n return object;\n };\n /**\n * Converts this HistogramDataPoint to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @instance\n * @returns {Object.} JSON object\n */\n HistogramDataPoint.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for HistogramDataPoint\n * @function getTypeUrl\n * @memberof opentelemetry.proto.metrics.v1.HistogramDataPoint\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n HistogramDataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.metrics.v1.HistogramDataPoint\";\n };\n return HistogramDataPoint;\n })();\n v1.ExponentialHistogramDataPoint = (function () {\n /**\n * Properties of an ExponentialHistogramDataPoint.\n * @memberof opentelemetry.proto.metrics.v1\n * @interface IExponentialHistogramDataPoint\n * @property {Array.|null} [attributes] ExponentialHistogramDataPoint attributes\n * @property {number|Long|null} [startTimeUnixNano] ExponentialHistogramDataPoint startTimeUnixNano\n * @property {number|Long|null} [timeUnixNano] ExponentialHistogramDataPoint timeUnixNano\n * @property {number|Long|null} [count] ExponentialHistogramDataPoint count\n * @property {number|null} [sum] ExponentialHistogramDataPoint sum\n * @property {number|null} [scale] ExponentialHistogramDataPoint scale\n * @property {number|Long|null} [zeroCount] ExponentialHistogramDataPoint zeroCount\n * @property {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets|null} [positive] ExponentialHistogramDataPoint positive\n * @property {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets|null} [negative] ExponentialHistogramDataPoint negative\n * @property {number|null} [flags] ExponentialHistogramDataPoint flags\n * @property {Array.|null} [exemplars] ExponentialHistogramDataPoint exemplars\n * @property {number|null} [min] ExponentialHistogramDataPoint min\n * @property {number|null} [max] ExponentialHistogramDataPoint max\n * @property {number|null} [zeroThreshold] ExponentialHistogramDataPoint zeroThreshold\n */\n /**\n * Constructs a new ExponentialHistogramDataPoint.\n * @memberof opentelemetry.proto.metrics.v1\n * @classdesc Represents an ExponentialHistogramDataPoint.\n * @implements IExponentialHistogramDataPoint\n * @constructor\n * @param {opentelemetry.proto.metrics.v1.IExponentialHistogramDataPoint=} [properties] Properties to set\n */\n function ExponentialHistogramDataPoint(properties) {\n this.attributes = [];\n this.exemplars = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ExponentialHistogramDataPoint attributes.\n * @member {Array.} attributes\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n ExponentialHistogramDataPoint.prototype.attributes = $util.emptyArray;\n /**\n * ExponentialHistogramDataPoint startTimeUnixNano.\n * @member {number|Long|null|undefined} startTimeUnixNano\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n ExponentialHistogramDataPoint.prototype.startTimeUnixNano = null;\n /**\n * ExponentialHistogramDataPoint timeUnixNano.\n * @member {number|Long|null|undefined} timeUnixNano\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n ExponentialHistogramDataPoint.prototype.timeUnixNano = null;\n /**\n * ExponentialHistogramDataPoint count.\n * @member {number|Long|null|undefined} count\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n ExponentialHistogramDataPoint.prototype.count = null;\n /**\n * ExponentialHistogramDataPoint sum.\n * @member {number|null|undefined} sum\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n ExponentialHistogramDataPoint.prototype.sum = null;\n /**\n * ExponentialHistogramDataPoint scale.\n * @member {number|null|undefined} scale\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n ExponentialHistogramDataPoint.prototype.scale = null;\n /**\n * ExponentialHistogramDataPoint zeroCount.\n * @member {number|Long|null|undefined} zeroCount\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n ExponentialHistogramDataPoint.prototype.zeroCount = null;\n /**\n * ExponentialHistogramDataPoint positive.\n * @member {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets|null|undefined} positive\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n ExponentialHistogramDataPoint.prototype.positive = null;\n /**\n * ExponentialHistogramDataPoint negative.\n * @member {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets|null|undefined} negative\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n ExponentialHistogramDataPoint.prototype.negative = null;\n /**\n * ExponentialHistogramDataPoint flags.\n * @member {number|null|undefined} flags\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n ExponentialHistogramDataPoint.prototype.flags = null;\n /**\n * ExponentialHistogramDataPoint exemplars.\n * @member {Array.} exemplars\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n ExponentialHistogramDataPoint.prototype.exemplars = $util.emptyArray;\n /**\n * ExponentialHistogramDataPoint min.\n * @member {number|null|undefined} min\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n ExponentialHistogramDataPoint.prototype.min = null;\n /**\n * ExponentialHistogramDataPoint max.\n * @member {number|null|undefined} max\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n ExponentialHistogramDataPoint.prototype.max = null;\n /**\n * ExponentialHistogramDataPoint zeroThreshold.\n * @member {number|null|undefined} zeroThreshold\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n ExponentialHistogramDataPoint.prototype.zeroThreshold = null;\n // OneOf field names bound to virtual getters and setters\n var $oneOfFields;\n /**\n * ExponentialHistogramDataPoint _sum.\n * @member {\"sum\"|undefined} _sum\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n Object.defineProperty(ExponentialHistogramDataPoint.prototype, \"_sum\", {\n get: $util.oneOfGetter($oneOfFields = [\"sum\"]),\n set: $util.oneOfSetter($oneOfFields)\n });\n /**\n * ExponentialHistogramDataPoint _min.\n * @member {\"min\"|undefined} _min\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n Object.defineProperty(ExponentialHistogramDataPoint.prototype, \"_min\", {\n get: $util.oneOfGetter($oneOfFields = [\"min\"]),\n set: $util.oneOfSetter($oneOfFields)\n });\n /**\n * ExponentialHistogramDataPoint _max.\n * @member {\"max\"|undefined} _max\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n */\n Object.defineProperty(ExponentialHistogramDataPoint.prototype, \"_max\", {\n get: $util.oneOfGetter($oneOfFields = [\"max\"]),\n set: $util.oneOfSetter($oneOfFields)\n });\n /**\n * Creates a new ExponentialHistogramDataPoint instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @static\n * @param {opentelemetry.proto.metrics.v1.IExponentialHistogramDataPoint=} [properties] Properties to set\n * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} ExponentialHistogramDataPoint instance\n */\n ExponentialHistogramDataPoint.create = function create(properties) {\n return new ExponentialHistogramDataPoint(properties);\n };\n /**\n * Encodes the specified ExponentialHistogramDataPoint message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @static\n * @param {opentelemetry.proto.metrics.v1.IExponentialHistogramDataPoint} message ExponentialHistogramDataPoint message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExponentialHistogramDataPoint.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.attributes != null && message.attributes.length)\n for (var i = 0; i < message.attributes.length; ++i)\n $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, \"startTimeUnixNano\"))\n writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.startTimeUnixNano);\n if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, \"timeUnixNano\"))\n writer.uint32(/* id 3, wireType 1 =*/ 25).fixed64(message.timeUnixNano);\n if (message.count != null && Object.hasOwnProperty.call(message, \"count\"))\n writer.uint32(/* id 4, wireType 1 =*/ 33).fixed64(message.count);\n if (message.sum != null && Object.hasOwnProperty.call(message, \"sum\"))\n writer.uint32(/* id 5, wireType 1 =*/ 41).double(message.sum);\n if (message.scale != null && Object.hasOwnProperty.call(message, \"scale\"))\n writer.uint32(/* id 6, wireType 0 =*/ 48).sint32(message.scale);\n if (message.zeroCount != null && Object.hasOwnProperty.call(message, \"zeroCount\"))\n writer.uint32(/* id 7, wireType 1 =*/ 57).fixed64(message.zeroCount);\n if (message.positive != null && Object.hasOwnProperty.call(message, \"positive\"))\n $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(message.positive, writer.uint32(/* id 8, wireType 2 =*/ 66).fork()).ldelim();\n if (message.negative != null && Object.hasOwnProperty.call(message, \"negative\"))\n $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(message.negative, writer.uint32(/* id 9, wireType 2 =*/ 74).fork()).ldelim();\n if (message.flags != null && Object.hasOwnProperty.call(message, \"flags\"))\n writer.uint32(/* id 10, wireType 0 =*/ 80).uint32(message.flags);\n if (message.exemplars != null && message.exemplars.length)\n for (var i = 0; i < message.exemplars.length; ++i)\n $root.opentelemetry.proto.metrics.v1.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 11, wireType 2 =*/ 90).fork()).ldelim();\n if (message.min != null && Object.hasOwnProperty.call(message, \"min\"))\n writer.uint32(/* id 12, wireType 1 =*/ 97).double(message.min);\n if (message.max != null && Object.hasOwnProperty.call(message, \"max\"))\n writer.uint32(/* id 13, wireType 1 =*/ 105).double(message.max);\n if (message.zeroThreshold != null && Object.hasOwnProperty.call(message, \"zeroThreshold\"))\n writer.uint32(/* id 14, wireType 1 =*/ 113).double(message.zeroThreshold);\n return writer;\n };\n /**\n * Encodes the specified ExponentialHistogramDataPoint message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @static\n * @param {opentelemetry.proto.metrics.v1.IExponentialHistogramDataPoint} message ExponentialHistogramDataPoint message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ExponentialHistogramDataPoint.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes an ExponentialHistogramDataPoint message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} ExponentialHistogramDataPoint\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExponentialHistogramDataPoint.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.attributes && message.attributes.length))\n message.attributes = [];\n message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32()));\n break;\n }\n case 2: {\n message.startTimeUnixNano = reader.fixed64();\n break;\n }\n case 3: {\n message.timeUnixNano = reader.fixed64();\n break;\n }\n case 4: {\n message.count = reader.fixed64();\n break;\n }\n case 5: {\n message.sum = reader.double();\n break;\n }\n case 6: {\n message.scale = reader.sint32();\n break;\n }\n case 7: {\n message.zeroCount = reader.fixed64();\n break;\n }\n case 8: {\n message.positive = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(reader, reader.uint32());\n break;\n }\n case 9: {\n message.negative = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(reader, reader.uint32());\n break;\n }\n case 10: {\n message.flags = reader.uint32();\n break;\n }\n case 11: {\n if (!(message.exemplars && message.exemplars.length))\n message.exemplars = [];\n message.exemplars.push($root.opentelemetry.proto.metrics.v1.Exemplar.decode(reader, reader.uint32()));\n break;\n }\n case 12: {\n message.min = reader.double();\n break;\n }\n case 13: {\n message.max = reader.double();\n break;\n }\n case 14: {\n message.zeroThreshold = reader.double();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes an ExponentialHistogramDataPoint message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} ExponentialHistogramDataPoint\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ExponentialHistogramDataPoint.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies an ExponentialHistogramDataPoint message.\n * @function verify\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ExponentialHistogramDataPoint.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n var properties = {};\n if (message.attributes != null && message.hasOwnProperty(\"attributes\")) {\n if (!Array.isArray(message.attributes))\n return \"attributes: array expected\";\n for (var i = 0; i < message.attributes.length; ++i) {\n var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]);\n if (error)\n return \"attributes.\" + error;\n }\n }\n if (message.startTimeUnixNano != null && message.hasOwnProperty(\"startTimeUnixNano\"))\n if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high)))\n return \"startTimeUnixNano: integer|Long expected\";\n if (message.timeUnixNano != null && message.hasOwnProperty(\"timeUnixNano\"))\n if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high)))\n return \"timeUnixNano: integer|Long expected\";\n if (message.count != null && message.hasOwnProperty(\"count\"))\n if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high)))\n return \"count: integer|Long expected\";\n if (message.sum != null && message.hasOwnProperty(\"sum\")) {\n properties._sum = 1;\n if (typeof message.sum !== \"number\")\n return \"sum: number expected\";\n }\n if (message.scale != null && message.hasOwnProperty(\"scale\"))\n if (!$util.isInteger(message.scale))\n return \"scale: integer expected\";\n if (message.zeroCount != null && message.hasOwnProperty(\"zeroCount\"))\n if (!$util.isInteger(message.zeroCount) && !(message.zeroCount && $util.isInteger(message.zeroCount.low) && $util.isInteger(message.zeroCount.high)))\n return \"zeroCount: integer|Long expected\";\n if (message.positive != null && message.hasOwnProperty(\"positive\")) {\n var error = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(message.positive);\n if (error)\n return \"positive.\" + error;\n }\n if (message.negative != null && message.hasOwnProperty(\"negative\")) {\n var error = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(message.negative);\n if (error)\n return \"negative.\" + error;\n }\n if (message.flags != null && message.hasOwnProperty(\"flags\"))\n if (!$util.isInteger(message.flags))\n return \"flags: integer expected\";\n if (message.exemplars != null && message.hasOwnProperty(\"exemplars\")) {\n if (!Array.isArray(message.exemplars))\n return \"exemplars: array expected\";\n for (var i = 0; i < message.exemplars.length; ++i) {\n var error = $root.opentelemetry.proto.metrics.v1.Exemplar.verify(message.exemplars[i]);\n if (error)\n return \"exemplars.\" + error;\n }\n }\n if (message.min != null && message.hasOwnProperty(\"min\")) {\n properties._min = 1;\n if (typeof message.min !== \"number\")\n return \"min: number expected\";\n }\n if (message.max != null && message.hasOwnProperty(\"max\")) {\n properties._max = 1;\n if (typeof message.max !== \"number\")\n return \"max: number expected\";\n }\n if (message.zeroThreshold != null && message.hasOwnProperty(\"zeroThreshold\"))\n if (typeof message.zeroThreshold !== \"number\")\n return \"zeroThreshold: number expected\";\n return null;\n };\n /**\n * Creates an ExponentialHistogramDataPoint message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} ExponentialHistogramDataPoint\n */\n ExponentialHistogramDataPoint.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)\n return object;\n var message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint();\n if (object.attributes) {\n if (!Array.isArray(object.attributes))\n throw TypeError(\".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected\");\n message.attributes = [];\n for (var i = 0; i < object.attributes.length; ++i) {\n if (typeof object.attributes[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected\");\n message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]);\n }\n }\n if (object.startTimeUnixNano != null)\n if ($util.Long)\n (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false;\n else if (typeof object.startTimeUnixNano === \"string\")\n message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10);\n else if (typeof object.startTimeUnixNano === \"number\")\n message.startTimeUnixNano = object.startTimeUnixNano;\n else if (typeof object.startTimeUnixNano === \"object\")\n message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber();\n if (object.timeUnixNano != null)\n if ($util.Long)\n (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false;\n else if (typeof object.timeUnixNano === \"string\")\n message.timeUnixNano = parseInt(object.timeUnixNano, 10);\n else if (typeof object.timeUnixNano === \"number\")\n message.timeUnixNano = object.timeUnixNano;\n else if (typeof object.timeUnixNano === \"object\")\n message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber();\n if (object.count != null)\n if ($util.Long)\n (message.count = $util.Long.fromValue(object.count)).unsigned = false;\n else if (typeof object.count === \"string\")\n message.count = parseInt(object.count, 10);\n else if (typeof object.count === \"number\")\n message.count = object.count;\n else if (typeof object.count === \"object\")\n message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber();\n if (object.sum != null)\n message.sum = Number(object.sum);\n if (object.scale != null)\n message.scale = object.scale | 0;\n if (object.zeroCount != null)\n if ($util.Long)\n (message.zeroCount = $util.Long.fromValue(object.zeroCount)).unsigned = false;\n else if (typeof object.zeroCount === \"string\")\n message.zeroCount = parseInt(object.zeroCount, 10);\n else if (typeof object.zeroCount === \"number\")\n message.zeroCount = object.zeroCount;\n else if (typeof object.zeroCount === \"object\")\n message.zeroCount = new $util.LongBits(object.zeroCount.low >>> 0, object.zeroCount.high >>> 0).toNumber();\n if (object.positive != null) {\n if (typeof object.positive !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected\");\n message.positive = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(object.positive);\n }\n if (object.negative != null) {\n if (typeof object.negative !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected\");\n message.negative = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(object.negative);\n }\n if (object.flags != null)\n message.flags = object.flags >>> 0;\n if (object.exemplars) {\n if (!Array.isArray(object.exemplars))\n throw TypeError(\".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected\");\n message.exemplars = [];\n for (var i = 0; i < object.exemplars.length; ++i) {\n if (typeof object.exemplars[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected\");\n message.exemplars[i] = $root.opentelemetry.proto.metrics.v1.Exemplar.fromObject(object.exemplars[i]);\n }\n }\n if (object.min != null)\n message.min = Number(object.min);\n if (object.max != null)\n message.max = Number(object.max);\n if (object.zeroThreshold != null)\n message.zeroThreshold = Number(object.zeroThreshold);\n return message;\n };\n /**\n * Creates a plain object from an ExponentialHistogramDataPoint message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @static\n * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint} message ExponentialHistogramDataPoint\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ExponentialHistogramDataPoint.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults) {\n object.attributes = [];\n object.exemplars = [];\n }\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.startTimeUnixNano = options.longs === String ? \"0\" : 0;\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.timeUnixNano = options.longs === String ? \"0\" : 0;\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.count = options.longs === String ? \"0\" : 0;\n object.scale = 0;\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.zeroCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.zeroCount = options.longs === String ? \"0\" : 0;\n object.positive = null;\n object.negative = null;\n object.flags = 0;\n object.zeroThreshold = 0;\n }\n if (message.attributes && message.attributes.length) {\n object.attributes = [];\n for (var j = 0; j < message.attributes.length; ++j)\n object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options);\n }\n if (message.startTimeUnixNano != null && message.hasOwnProperty(\"startTimeUnixNano\"))\n if (typeof message.startTimeUnixNano === \"number\")\n object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano;\n else\n object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano;\n if (message.timeUnixNano != null && message.hasOwnProperty(\"timeUnixNano\"))\n if (typeof message.timeUnixNano === \"number\")\n object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano;\n else\n object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano;\n if (message.count != null && message.hasOwnProperty(\"count\"))\n if (typeof message.count === \"number\")\n object.count = options.longs === String ? String(message.count) : message.count;\n else\n object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count;\n if (message.sum != null && message.hasOwnProperty(\"sum\")) {\n object.sum = options.json && !isFinite(message.sum) ? String(message.sum) : message.sum;\n if (options.oneofs)\n object._sum = \"sum\";\n }\n if (message.scale != null && message.hasOwnProperty(\"scale\"))\n object.scale = message.scale;\n if (message.zeroCount != null && message.hasOwnProperty(\"zeroCount\"))\n if (typeof message.zeroCount === \"number\")\n object.zeroCount = options.longs === String ? String(message.zeroCount) : message.zeroCount;\n else\n object.zeroCount = options.longs === String ? $util.Long.prototype.toString.call(message.zeroCount) : options.longs === Number ? new $util.LongBits(message.zeroCount.low >>> 0, message.zeroCount.high >>> 0).toNumber() : message.zeroCount;\n if (message.positive != null && message.hasOwnProperty(\"positive\"))\n object.positive = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(message.positive, options);\n if (message.negative != null && message.hasOwnProperty(\"negative\"))\n object.negative = $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(message.negative, options);\n if (message.flags != null && message.hasOwnProperty(\"flags\"))\n object.flags = message.flags;\n if (message.exemplars && message.exemplars.length) {\n object.exemplars = [];\n for (var j = 0; j < message.exemplars.length; ++j)\n object.exemplars[j] = $root.opentelemetry.proto.metrics.v1.Exemplar.toObject(message.exemplars[j], options);\n }\n if (message.min != null && message.hasOwnProperty(\"min\")) {\n object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min;\n if (options.oneofs)\n object._min = \"min\";\n }\n if (message.max != null && message.hasOwnProperty(\"max\")) {\n object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max;\n if (options.oneofs)\n object._max = \"max\";\n }\n if (message.zeroThreshold != null && message.hasOwnProperty(\"zeroThreshold\"))\n object.zeroThreshold = options.json && !isFinite(message.zeroThreshold) ? String(message.zeroThreshold) : message.zeroThreshold;\n return object;\n };\n /**\n * Converts this ExponentialHistogramDataPoint to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @instance\n * @returns {Object.} JSON object\n */\n ExponentialHistogramDataPoint.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ExponentialHistogramDataPoint\n * @function getTypeUrl\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ExponentialHistogramDataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\";\n };\n ExponentialHistogramDataPoint.Buckets = (function () {\n /**\n * Properties of a Buckets.\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @interface IBuckets\n * @property {number|null} [offset] Buckets offset\n * @property {Array.|null} [bucketCounts] Buckets bucketCounts\n */\n /**\n * Constructs a new Buckets.\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\n * @classdesc Represents a Buckets.\n * @implements IBuckets\n * @constructor\n * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets=} [properties] Properties to set\n */\n function Buckets(properties) {\n this.bucketCounts = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * Buckets offset.\n * @member {number|null|undefined} offset\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\n * @instance\n */\n Buckets.prototype.offset = null;\n /**\n * Buckets bucketCounts.\n * @member {Array.} bucketCounts\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\n * @instance\n */\n Buckets.prototype.bucketCounts = $util.emptyArray;\n /**\n * Creates a new Buckets instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\n * @static\n * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets=} [properties] Properties to set\n * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} Buckets instance\n */\n Buckets.create = function create(properties) {\n return new Buckets(properties);\n };\n /**\n * Encodes the specified Buckets message. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\n * @static\n * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets} message Buckets message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Buckets.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.offset != null && Object.hasOwnProperty.call(message, \"offset\"))\n writer.uint32(/* id 1, wireType 0 =*/ 8).sint32(message.offset);\n if (message.bucketCounts != null && message.bucketCounts.length) {\n writer.uint32(/* id 2, wireType 2 =*/ 18).fork();\n for (var i = 0; i < message.bucketCounts.length; ++i)\n writer.uint64(message.bucketCounts[i]);\n writer.ldelim();\n }\n return writer;\n };\n /**\n * Encodes the specified Buckets message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\n * @static\n * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.IBuckets} message Buckets message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Buckets.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a Buckets message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} Buckets\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Buckets.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.offset = reader.sint32();\n break;\n }\n case 2: {\n if (!(message.bucketCounts && message.bucketCounts.length))\n message.bucketCounts = [];\n if ((tag & 7) === 2) {\n var end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2)\n message.bucketCounts.push(reader.uint64());\n }\n else\n message.bucketCounts.push(reader.uint64());\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a Buckets message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} Buckets\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Buckets.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a Buckets message.\n * @function verify\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Buckets.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.offset != null && message.hasOwnProperty(\"offset\"))\n if (!$util.isInteger(message.offset))\n return \"offset: integer expected\";\n if (message.bucketCounts != null && message.hasOwnProperty(\"bucketCounts\")) {\n if (!Array.isArray(message.bucketCounts))\n return \"bucketCounts: array expected\";\n for (var i = 0; i < message.bucketCounts.length; ++i)\n if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high)))\n return \"bucketCounts: integer|Long[] expected\";\n }\n return null;\n };\n /**\n * Creates a Buckets message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} Buckets\n */\n Buckets.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)\n return object;\n var message = new $root.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets();\n if (object.offset != null)\n message.offset = object.offset | 0;\n if (object.bucketCounts) {\n if (!Array.isArray(object.bucketCounts))\n throw TypeError(\".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected\");\n message.bucketCounts = [];\n for (var i = 0; i < object.bucketCounts.length; ++i)\n if ($util.Long)\n (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = true;\n else if (typeof object.bucketCounts[i] === \"string\")\n message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10);\n else if (typeof object.bucketCounts[i] === \"number\")\n message.bucketCounts[i] = object.bucketCounts[i];\n else if (typeof object.bucketCounts[i] === \"object\")\n message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(true);\n }\n return message;\n };\n /**\n * Creates a plain object from a Buckets message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\n * @static\n * @param {opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets} message Buckets\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Buckets.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.bucketCounts = [];\n if (options.defaults)\n object.offset = 0;\n if (message.offset != null && message.hasOwnProperty(\"offset\"))\n object.offset = message.offset;\n if (message.bucketCounts && message.bucketCounts.length) {\n object.bucketCounts = [];\n for (var j = 0; j < message.bucketCounts.length; ++j)\n if (typeof message.bucketCounts[j] === \"number\")\n object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j];\n else\n object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber(true) : message.bucketCounts[j];\n }\n return object;\n };\n /**\n * Converts this Buckets to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\n * @instance\n * @returns {Object.} JSON object\n */\n Buckets.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for Buckets\n * @function getTypeUrl\n * @memberof opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Buckets.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\";\n };\n return Buckets;\n })();\n return ExponentialHistogramDataPoint;\n })();\n v1.SummaryDataPoint = (function () {\n /**\n * Properties of a SummaryDataPoint.\n * @memberof opentelemetry.proto.metrics.v1\n * @interface ISummaryDataPoint\n * @property {Array.|null} [attributes] SummaryDataPoint attributes\n * @property {number|Long|null} [startTimeUnixNano] SummaryDataPoint startTimeUnixNano\n * @property {number|Long|null} [timeUnixNano] SummaryDataPoint timeUnixNano\n * @property {number|Long|null} [count] SummaryDataPoint count\n * @property {number|null} [sum] SummaryDataPoint sum\n * @property {Array.|null} [quantileValues] SummaryDataPoint quantileValues\n * @property {number|null} [flags] SummaryDataPoint flags\n */\n /**\n * Constructs a new SummaryDataPoint.\n * @memberof opentelemetry.proto.metrics.v1\n * @classdesc Represents a SummaryDataPoint.\n * @implements ISummaryDataPoint\n * @constructor\n * @param {opentelemetry.proto.metrics.v1.ISummaryDataPoint=} [properties] Properties to set\n */\n function SummaryDataPoint(properties) {\n this.attributes = [];\n this.quantileValues = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * SummaryDataPoint attributes.\n * @member {Array.} attributes\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @instance\n */\n SummaryDataPoint.prototype.attributes = $util.emptyArray;\n /**\n * SummaryDataPoint startTimeUnixNano.\n * @member {number|Long|null|undefined} startTimeUnixNano\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @instance\n */\n SummaryDataPoint.prototype.startTimeUnixNano = null;\n /**\n * SummaryDataPoint timeUnixNano.\n * @member {number|Long|null|undefined} timeUnixNano\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @instance\n */\n SummaryDataPoint.prototype.timeUnixNano = null;\n /**\n * SummaryDataPoint count.\n * @member {number|Long|null|undefined} count\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @instance\n */\n SummaryDataPoint.prototype.count = null;\n /**\n * SummaryDataPoint sum.\n * @member {number|null|undefined} sum\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @instance\n */\n SummaryDataPoint.prototype.sum = null;\n /**\n * SummaryDataPoint quantileValues.\n * @member {Array.} quantileValues\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @instance\n */\n SummaryDataPoint.prototype.quantileValues = $util.emptyArray;\n /**\n * SummaryDataPoint flags.\n * @member {number|null|undefined} flags\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @instance\n */\n SummaryDataPoint.prototype.flags = null;\n /**\n * Creates a new SummaryDataPoint instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @static\n * @param {opentelemetry.proto.metrics.v1.ISummaryDataPoint=} [properties] Properties to set\n * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint} SummaryDataPoint instance\n */\n SummaryDataPoint.create = function create(properties) {\n return new SummaryDataPoint(properties);\n };\n /**\n * Encodes the specified SummaryDataPoint message. Does not implicitly {@link opentelemetry.proto.metrics.v1.SummaryDataPoint.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @static\n * @param {opentelemetry.proto.metrics.v1.ISummaryDataPoint} message SummaryDataPoint message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SummaryDataPoint.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.startTimeUnixNano != null && Object.hasOwnProperty.call(message, \"startTimeUnixNano\"))\n writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.startTimeUnixNano);\n if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, \"timeUnixNano\"))\n writer.uint32(/* id 3, wireType 1 =*/ 25).fixed64(message.timeUnixNano);\n if (message.count != null && Object.hasOwnProperty.call(message, \"count\"))\n writer.uint32(/* id 4, wireType 1 =*/ 33).fixed64(message.count);\n if (message.sum != null && Object.hasOwnProperty.call(message, \"sum\"))\n writer.uint32(/* id 5, wireType 1 =*/ 41).double(message.sum);\n if (message.quantileValues != null && message.quantileValues.length)\n for (var i = 0; i < message.quantileValues.length; ++i)\n $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(message.quantileValues[i], writer.uint32(/* id 6, wireType 2 =*/ 50).fork()).ldelim();\n if (message.attributes != null && message.attributes.length)\n for (var i = 0; i < message.attributes.length; ++i)\n $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 7, wireType 2 =*/ 58).fork()).ldelim();\n if (message.flags != null && Object.hasOwnProperty.call(message, \"flags\"))\n writer.uint32(/* id 8, wireType 0 =*/ 64).uint32(message.flags);\n return writer;\n };\n /**\n * Encodes the specified SummaryDataPoint message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.SummaryDataPoint.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @static\n * @param {opentelemetry.proto.metrics.v1.ISummaryDataPoint} message SummaryDataPoint message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n SummaryDataPoint.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a SummaryDataPoint message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint} SummaryDataPoint\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SummaryDataPoint.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.SummaryDataPoint();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 7: {\n if (!(message.attributes && message.attributes.length))\n message.attributes = [];\n message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32()));\n break;\n }\n case 2: {\n message.startTimeUnixNano = reader.fixed64();\n break;\n }\n case 3: {\n message.timeUnixNano = reader.fixed64();\n break;\n }\n case 4: {\n message.count = reader.fixed64();\n break;\n }\n case 5: {\n message.sum = reader.double();\n break;\n }\n case 6: {\n if (!(message.quantileValues && message.quantileValues.length))\n message.quantileValues = [];\n message.quantileValues.push($root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(reader, reader.uint32()));\n break;\n }\n case 8: {\n message.flags = reader.uint32();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a SummaryDataPoint message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint} SummaryDataPoint\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n SummaryDataPoint.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a SummaryDataPoint message.\n * @function verify\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n SummaryDataPoint.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.attributes != null && message.hasOwnProperty(\"attributes\")) {\n if (!Array.isArray(message.attributes))\n return \"attributes: array expected\";\n for (var i = 0; i < message.attributes.length; ++i) {\n var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]);\n if (error)\n return \"attributes.\" + error;\n }\n }\n if (message.startTimeUnixNano != null && message.hasOwnProperty(\"startTimeUnixNano\"))\n if (!$util.isInteger(message.startTimeUnixNano) && !(message.startTimeUnixNano && $util.isInteger(message.startTimeUnixNano.low) && $util.isInteger(message.startTimeUnixNano.high)))\n return \"startTimeUnixNano: integer|Long expected\";\n if (message.timeUnixNano != null && message.hasOwnProperty(\"timeUnixNano\"))\n if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high)))\n return \"timeUnixNano: integer|Long expected\";\n if (message.count != null && message.hasOwnProperty(\"count\"))\n if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high)))\n return \"count: integer|Long expected\";\n if (message.sum != null && message.hasOwnProperty(\"sum\"))\n if (typeof message.sum !== \"number\")\n return \"sum: number expected\";\n if (message.quantileValues != null && message.hasOwnProperty(\"quantileValues\")) {\n if (!Array.isArray(message.quantileValues))\n return \"quantileValues: array expected\";\n for (var i = 0; i < message.quantileValues.length; ++i) {\n var error = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(message.quantileValues[i]);\n if (error)\n return \"quantileValues.\" + error;\n }\n }\n if (message.flags != null && message.hasOwnProperty(\"flags\"))\n if (!$util.isInteger(message.flags))\n return \"flags: integer expected\";\n return null;\n };\n /**\n * Creates a SummaryDataPoint message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint} SummaryDataPoint\n */\n SummaryDataPoint.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.metrics.v1.SummaryDataPoint)\n return object;\n var message = new $root.opentelemetry.proto.metrics.v1.SummaryDataPoint();\n if (object.attributes) {\n if (!Array.isArray(object.attributes))\n throw TypeError(\".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected\");\n message.attributes = [];\n for (var i = 0; i < object.attributes.length; ++i) {\n if (typeof object.attributes[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected\");\n message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]);\n }\n }\n if (object.startTimeUnixNano != null)\n if ($util.Long)\n (message.startTimeUnixNano = $util.Long.fromValue(object.startTimeUnixNano)).unsigned = false;\n else if (typeof object.startTimeUnixNano === \"string\")\n message.startTimeUnixNano = parseInt(object.startTimeUnixNano, 10);\n else if (typeof object.startTimeUnixNano === \"number\")\n message.startTimeUnixNano = object.startTimeUnixNano;\n else if (typeof object.startTimeUnixNano === \"object\")\n message.startTimeUnixNano = new $util.LongBits(object.startTimeUnixNano.low >>> 0, object.startTimeUnixNano.high >>> 0).toNumber();\n if (object.timeUnixNano != null)\n if ($util.Long)\n (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false;\n else if (typeof object.timeUnixNano === \"string\")\n message.timeUnixNano = parseInt(object.timeUnixNano, 10);\n else if (typeof object.timeUnixNano === \"number\")\n message.timeUnixNano = object.timeUnixNano;\n else if (typeof object.timeUnixNano === \"object\")\n message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber();\n if (object.count != null)\n if ($util.Long)\n (message.count = $util.Long.fromValue(object.count)).unsigned = false;\n else if (typeof object.count === \"string\")\n message.count = parseInt(object.count, 10);\n else if (typeof object.count === \"number\")\n message.count = object.count;\n else if (typeof object.count === \"object\")\n message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber();\n if (object.sum != null)\n message.sum = Number(object.sum);\n if (object.quantileValues) {\n if (!Array.isArray(object.quantileValues))\n throw TypeError(\".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected\");\n message.quantileValues = [];\n for (var i = 0; i < object.quantileValues.length; ++i) {\n if (typeof object.quantileValues[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected\");\n message.quantileValues[i] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(object.quantileValues[i]);\n }\n }\n if (object.flags != null)\n message.flags = object.flags >>> 0;\n return message;\n };\n /**\n * Creates a plain object from a SummaryDataPoint message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @static\n * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint} message SummaryDataPoint\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n SummaryDataPoint.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults) {\n object.quantileValues = [];\n object.attributes = [];\n }\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.startTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.startTimeUnixNano = options.longs === String ? \"0\" : 0;\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.timeUnixNano = options.longs === String ? \"0\" : 0;\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.count = options.longs === String ? \"0\" : 0;\n object.sum = 0;\n object.flags = 0;\n }\n if (message.startTimeUnixNano != null && message.hasOwnProperty(\"startTimeUnixNano\"))\n if (typeof message.startTimeUnixNano === \"number\")\n object.startTimeUnixNano = options.longs === String ? String(message.startTimeUnixNano) : message.startTimeUnixNano;\n else\n object.startTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.startTimeUnixNano.low >>> 0, message.startTimeUnixNano.high >>> 0).toNumber() : message.startTimeUnixNano;\n if (message.timeUnixNano != null && message.hasOwnProperty(\"timeUnixNano\"))\n if (typeof message.timeUnixNano === \"number\")\n object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano;\n else\n object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano;\n if (message.count != null && message.hasOwnProperty(\"count\"))\n if (typeof message.count === \"number\")\n object.count = options.longs === String ? String(message.count) : message.count;\n else\n object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count;\n if (message.sum != null && message.hasOwnProperty(\"sum\"))\n object.sum = options.json && !isFinite(message.sum) ? String(message.sum) : message.sum;\n if (message.quantileValues && message.quantileValues.length) {\n object.quantileValues = [];\n for (var j = 0; j < message.quantileValues.length; ++j)\n object.quantileValues[j] = $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(message.quantileValues[j], options);\n }\n if (message.attributes && message.attributes.length) {\n object.attributes = [];\n for (var j = 0; j < message.attributes.length; ++j)\n object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options);\n }\n if (message.flags != null && message.hasOwnProperty(\"flags\"))\n object.flags = message.flags;\n return object;\n };\n /**\n * Converts this SummaryDataPoint to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @instance\n * @returns {Object.} JSON object\n */\n SummaryDataPoint.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for SummaryDataPoint\n * @function getTypeUrl\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n SummaryDataPoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.metrics.v1.SummaryDataPoint\";\n };\n SummaryDataPoint.ValueAtQuantile = (function () {\n /**\n * Properties of a ValueAtQuantile.\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @interface IValueAtQuantile\n * @property {number|null} [quantile] ValueAtQuantile quantile\n * @property {number|null} [value] ValueAtQuantile value\n */\n /**\n * Constructs a new ValueAtQuantile.\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint\n * @classdesc Represents a ValueAtQuantile.\n * @implements IValueAtQuantile\n * @constructor\n * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.IValueAtQuantile=} [properties] Properties to set\n */\n function ValueAtQuantile(properties) {\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ValueAtQuantile quantile.\n * @member {number|null|undefined} quantile\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\n * @instance\n */\n ValueAtQuantile.prototype.quantile = null;\n /**\n * ValueAtQuantile value.\n * @member {number|null|undefined} value\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\n * @instance\n */\n ValueAtQuantile.prototype.value = null;\n /**\n * Creates a new ValueAtQuantile instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\n * @static\n * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.IValueAtQuantile=} [properties] Properties to set\n * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} ValueAtQuantile instance\n */\n ValueAtQuantile.create = function create(properties) {\n return new ValueAtQuantile(properties);\n };\n /**\n * Encodes the specified ValueAtQuantile message. Does not implicitly {@link opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\n * @static\n * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.IValueAtQuantile} message ValueAtQuantile message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ValueAtQuantile.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.quantile != null && Object.hasOwnProperty.call(message, \"quantile\"))\n writer.uint32(/* id 1, wireType 1 =*/ 9).double(message.quantile);\n if (message.value != null && Object.hasOwnProperty.call(message, \"value\"))\n writer.uint32(/* id 2, wireType 1 =*/ 17).double(message.value);\n return writer;\n };\n /**\n * Encodes the specified ValueAtQuantile message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\n * @static\n * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.IValueAtQuantile} message ValueAtQuantile message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ValueAtQuantile.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a ValueAtQuantile message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} ValueAtQuantile\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ValueAtQuantile.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.quantile = reader.double();\n break;\n }\n case 2: {\n message.value = reader.double();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a ValueAtQuantile message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} ValueAtQuantile\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ValueAtQuantile.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a ValueAtQuantile message.\n * @function verify\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ValueAtQuantile.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.quantile != null && message.hasOwnProperty(\"quantile\"))\n if (typeof message.quantile !== \"number\")\n return \"quantile: number expected\";\n if (message.value != null && message.hasOwnProperty(\"value\"))\n if (typeof message.value !== \"number\")\n return \"value: number expected\";\n return null;\n };\n /**\n * Creates a ValueAtQuantile message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} ValueAtQuantile\n */\n ValueAtQuantile.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)\n return object;\n var message = new $root.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile();\n if (object.quantile != null)\n message.quantile = Number(object.quantile);\n if (object.value != null)\n message.value = Number(object.value);\n return message;\n };\n /**\n * Creates a plain object from a ValueAtQuantile message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\n * @static\n * @param {opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile} message ValueAtQuantile\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ValueAtQuantile.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.defaults) {\n object.quantile = 0;\n object.value = 0;\n }\n if (message.quantile != null && message.hasOwnProperty(\"quantile\"))\n object.quantile = options.json && !isFinite(message.quantile) ? String(message.quantile) : message.quantile;\n if (message.value != null && message.hasOwnProperty(\"value\"))\n object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value;\n return object;\n };\n /**\n * Converts this ValueAtQuantile to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\n * @instance\n * @returns {Object.} JSON object\n */\n ValueAtQuantile.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ValueAtQuantile\n * @function getTypeUrl\n * @memberof opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ValueAtQuantile.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\";\n };\n return ValueAtQuantile;\n })();\n return SummaryDataPoint;\n })();\n v1.Exemplar = (function () {\n /**\n * Properties of an Exemplar.\n * @memberof opentelemetry.proto.metrics.v1\n * @interface IExemplar\n * @property {Array.|null} [filteredAttributes] Exemplar filteredAttributes\n * @property {number|Long|null} [timeUnixNano] Exemplar timeUnixNano\n * @property {number|null} [asDouble] Exemplar asDouble\n * @property {number|Long|null} [asInt] Exemplar asInt\n * @property {Uint8Array|null} [spanId] Exemplar spanId\n * @property {Uint8Array|null} [traceId] Exemplar traceId\n */\n /**\n * Constructs a new Exemplar.\n * @memberof opentelemetry.proto.metrics.v1\n * @classdesc Represents an Exemplar.\n * @implements IExemplar\n * @constructor\n * @param {opentelemetry.proto.metrics.v1.IExemplar=} [properties] Properties to set\n */\n function Exemplar(properties) {\n this.filteredAttributes = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * Exemplar filteredAttributes.\n * @member {Array.} filteredAttributes\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @instance\n */\n Exemplar.prototype.filteredAttributes = $util.emptyArray;\n /**\n * Exemplar timeUnixNano.\n * @member {number|Long|null|undefined} timeUnixNano\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @instance\n */\n Exemplar.prototype.timeUnixNano = null;\n /**\n * Exemplar asDouble.\n * @member {number|null|undefined} asDouble\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @instance\n */\n Exemplar.prototype.asDouble = null;\n /**\n * Exemplar asInt.\n * @member {number|Long|null|undefined} asInt\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @instance\n */\n Exemplar.prototype.asInt = null;\n /**\n * Exemplar spanId.\n * @member {Uint8Array|null|undefined} spanId\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @instance\n */\n Exemplar.prototype.spanId = null;\n /**\n * Exemplar traceId.\n * @member {Uint8Array|null|undefined} traceId\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @instance\n */\n Exemplar.prototype.traceId = null;\n // OneOf field names bound to virtual getters and setters\n var $oneOfFields;\n /**\n * Exemplar value.\n * @member {\"asDouble\"|\"asInt\"|undefined} value\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @instance\n */\n Object.defineProperty(Exemplar.prototype, \"value\", {\n get: $util.oneOfGetter($oneOfFields = [\"asDouble\", \"asInt\"]),\n set: $util.oneOfSetter($oneOfFields)\n });\n /**\n * Creates a new Exemplar instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @static\n * @param {opentelemetry.proto.metrics.v1.IExemplar=} [properties] Properties to set\n * @returns {opentelemetry.proto.metrics.v1.Exemplar} Exemplar instance\n */\n Exemplar.create = function create(properties) {\n return new Exemplar(properties);\n };\n /**\n * Encodes the specified Exemplar message. Does not implicitly {@link opentelemetry.proto.metrics.v1.Exemplar.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @static\n * @param {opentelemetry.proto.metrics.v1.IExemplar} message Exemplar message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Exemplar.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, \"timeUnixNano\"))\n writer.uint32(/* id 2, wireType 1 =*/ 17).fixed64(message.timeUnixNano);\n if (message.asDouble != null && Object.hasOwnProperty.call(message, \"asDouble\"))\n writer.uint32(/* id 3, wireType 1 =*/ 25).double(message.asDouble);\n if (message.spanId != null && Object.hasOwnProperty.call(message, \"spanId\"))\n writer.uint32(/* id 4, wireType 2 =*/ 34).bytes(message.spanId);\n if (message.traceId != null && Object.hasOwnProperty.call(message, \"traceId\"))\n writer.uint32(/* id 5, wireType 2 =*/ 42).bytes(message.traceId);\n if (message.asInt != null && Object.hasOwnProperty.call(message, \"asInt\"))\n writer.uint32(/* id 6, wireType 1 =*/ 49).sfixed64(message.asInt);\n if (message.filteredAttributes != null && message.filteredAttributes.length)\n for (var i = 0; i < message.filteredAttributes.length; ++i)\n $root.opentelemetry.proto.common.v1.KeyValue.encode(message.filteredAttributes[i], writer.uint32(/* id 7, wireType 2 =*/ 58).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link opentelemetry.proto.metrics.v1.Exemplar.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @static\n * @param {opentelemetry.proto.metrics.v1.IExemplar} message Exemplar message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n Exemplar.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes an Exemplar message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.metrics.v1.Exemplar} Exemplar\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Exemplar.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.metrics.v1.Exemplar();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 7: {\n if (!(message.filteredAttributes && message.filteredAttributes.length))\n message.filteredAttributes = [];\n message.filteredAttributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32()));\n break;\n }\n case 2: {\n message.timeUnixNano = reader.fixed64();\n break;\n }\n case 3: {\n message.asDouble = reader.double();\n break;\n }\n case 6: {\n message.asInt = reader.sfixed64();\n break;\n }\n case 4: {\n message.spanId = reader.bytes();\n break;\n }\n case 5: {\n message.traceId = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes an Exemplar message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.metrics.v1.Exemplar} Exemplar\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n Exemplar.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies an Exemplar message.\n * @function verify\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n Exemplar.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n var properties = {};\n if (message.filteredAttributes != null && message.hasOwnProperty(\"filteredAttributes\")) {\n if (!Array.isArray(message.filteredAttributes))\n return \"filteredAttributes: array expected\";\n for (var i = 0; i < message.filteredAttributes.length; ++i) {\n var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.filteredAttributes[i]);\n if (error)\n return \"filteredAttributes.\" + error;\n }\n }\n if (message.timeUnixNano != null && message.hasOwnProperty(\"timeUnixNano\"))\n if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high)))\n return \"timeUnixNano: integer|Long expected\";\n if (message.asDouble != null && message.hasOwnProperty(\"asDouble\")) {\n properties.value = 1;\n if (typeof message.asDouble !== \"number\")\n return \"asDouble: number expected\";\n }\n if (message.asInt != null && message.hasOwnProperty(\"asInt\")) {\n if (properties.value === 1)\n return \"value: multiple values\";\n properties.value = 1;\n if (!$util.isInteger(message.asInt) && !(message.asInt && $util.isInteger(message.asInt.low) && $util.isInteger(message.asInt.high)))\n return \"asInt: integer|Long expected\";\n }\n if (message.spanId != null && message.hasOwnProperty(\"spanId\"))\n if (!(message.spanId && typeof message.spanId.length === \"number\" || $util.isString(message.spanId)))\n return \"spanId: buffer expected\";\n if (message.traceId != null && message.hasOwnProperty(\"traceId\"))\n if (!(message.traceId && typeof message.traceId.length === \"number\" || $util.isString(message.traceId)))\n return \"traceId: buffer expected\";\n return null;\n };\n /**\n * Creates an Exemplar message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.metrics.v1.Exemplar} Exemplar\n */\n Exemplar.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.metrics.v1.Exemplar)\n return object;\n var message = new $root.opentelemetry.proto.metrics.v1.Exemplar();\n if (object.filteredAttributes) {\n if (!Array.isArray(object.filteredAttributes))\n throw TypeError(\".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected\");\n message.filteredAttributes = [];\n for (var i = 0; i < object.filteredAttributes.length; ++i) {\n if (typeof object.filteredAttributes[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected\");\n message.filteredAttributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.filteredAttributes[i]);\n }\n }\n if (object.timeUnixNano != null)\n if ($util.Long)\n (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false;\n else if (typeof object.timeUnixNano === \"string\")\n message.timeUnixNano = parseInt(object.timeUnixNano, 10);\n else if (typeof object.timeUnixNano === \"number\")\n message.timeUnixNano = object.timeUnixNano;\n else if (typeof object.timeUnixNano === \"object\")\n message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber();\n if (object.asDouble != null)\n message.asDouble = Number(object.asDouble);\n if (object.asInt != null)\n if ($util.Long)\n (message.asInt = $util.Long.fromValue(object.asInt)).unsigned = false;\n else if (typeof object.asInt === \"string\")\n message.asInt = parseInt(object.asInt, 10);\n else if (typeof object.asInt === \"number\")\n message.asInt = object.asInt;\n else if (typeof object.asInt === \"object\")\n message.asInt = new $util.LongBits(object.asInt.low >>> 0, object.asInt.high >>> 0).toNumber();\n if (object.spanId != null)\n if (typeof object.spanId === \"string\")\n $util.base64.decode(object.spanId, message.spanId = $util.newBuffer($util.base64.length(object.spanId)), 0);\n else if (object.spanId.length >= 0)\n message.spanId = object.spanId;\n if (object.traceId != null)\n if (typeof object.traceId === \"string\")\n $util.base64.decode(object.traceId, message.traceId = $util.newBuffer($util.base64.length(object.traceId)), 0);\n else if (object.traceId.length >= 0)\n message.traceId = object.traceId;\n return message;\n };\n /**\n * Creates a plain object from an Exemplar message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @static\n * @param {opentelemetry.proto.metrics.v1.Exemplar} message Exemplar\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n Exemplar.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.filteredAttributes = [];\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.timeUnixNano = options.longs === String ? \"0\" : 0;\n if (options.bytes === String)\n object.spanId = \"\";\n else {\n object.spanId = [];\n if (options.bytes !== Array)\n object.spanId = $util.newBuffer(object.spanId);\n }\n if (options.bytes === String)\n object.traceId = \"\";\n else {\n object.traceId = [];\n if (options.bytes !== Array)\n object.traceId = $util.newBuffer(object.traceId);\n }\n }\n if (message.timeUnixNano != null && message.hasOwnProperty(\"timeUnixNano\"))\n if (typeof message.timeUnixNano === \"number\")\n object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano;\n else\n object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano;\n if (message.asDouble != null && message.hasOwnProperty(\"asDouble\")) {\n object.asDouble = options.json && !isFinite(message.asDouble) ? String(message.asDouble) : message.asDouble;\n if (options.oneofs)\n object.value = \"asDouble\";\n }\n if (message.spanId != null && message.hasOwnProperty(\"spanId\"))\n object.spanId = options.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId;\n if (message.traceId != null && message.hasOwnProperty(\"traceId\"))\n object.traceId = options.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId;\n if (message.asInt != null && message.hasOwnProperty(\"asInt\")) {\n if (typeof message.asInt === \"number\")\n object.asInt = options.longs === String ? String(message.asInt) : message.asInt;\n else\n object.asInt = options.longs === String ? $util.Long.prototype.toString.call(message.asInt) : options.longs === Number ? new $util.LongBits(message.asInt.low >>> 0, message.asInt.high >>> 0).toNumber() : message.asInt;\n if (options.oneofs)\n object.value = \"asInt\";\n }\n if (message.filteredAttributes && message.filteredAttributes.length) {\n object.filteredAttributes = [];\n for (var j = 0; j < message.filteredAttributes.length; ++j)\n object.filteredAttributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.filteredAttributes[j], options);\n }\n return object;\n };\n /**\n * Converts this Exemplar to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @instance\n * @returns {Object.} JSON object\n */\n Exemplar.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for Exemplar\n * @function getTypeUrl\n * @memberof opentelemetry.proto.metrics.v1.Exemplar\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n Exemplar.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.metrics.v1.Exemplar\";\n };\n return Exemplar;\n })();\n return v1;\n })();\n return metrics;\n })();\n proto.logs = (function () {\n /**\n * Namespace logs.\n * @memberof opentelemetry.proto\n * @namespace\n */\n var logs = {};\n logs.v1 = (function () {\n /**\n * Namespace v1.\n * @memberof opentelemetry.proto.logs\n * @namespace\n */\n var v1 = {};\n v1.LogsData = (function () {\n /**\n * Properties of a LogsData.\n * @memberof opentelemetry.proto.logs.v1\n * @interface ILogsData\n * @property {Array.|null} [resourceLogs] LogsData resourceLogs\n */\n /**\n * Constructs a new LogsData.\n * @memberof opentelemetry.proto.logs.v1\n * @classdesc Represents a LogsData.\n * @implements ILogsData\n * @constructor\n * @param {opentelemetry.proto.logs.v1.ILogsData=} [properties] Properties to set\n */\n function LogsData(properties) {\n this.resourceLogs = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * LogsData resourceLogs.\n * @member {Array.} resourceLogs\n * @memberof opentelemetry.proto.logs.v1.LogsData\n * @instance\n */\n LogsData.prototype.resourceLogs = $util.emptyArray;\n /**\n * Creates a new LogsData instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.logs.v1.LogsData\n * @static\n * @param {opentelemetry.proto.logs.v1.ILogsData=} [properties] Properties to set\n * @returns {opentelemetry.proto.logs.v1.LogsData} LogsData instance\n */\n LogsData.create = function create(properties) {\n return new LogsData(properties);\n };\n /**\n * Encodes the specified LogsData message. Does not implicitly {@link opentelemetry.proto.logs.v1.LogsData.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.logs.v1.LogsData\n * @static\n * @param {opentelemetry.proto.logs.v1.ILogsData} message LogsData message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n LogsData.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.resourceLogs != null && message.resourceLogs.length)\n for (var i = 0; i < message.resourceLogs.length; ++i)\n $root.opentelemetry.proto.logs.v1.ResourceLogs.encode(message.resourceLogs[i], writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n return writer;\n };\n /**\n * Encodes the specified LogsData message, length delimited. Does not implicitly {@link opentelemetry.proto.logs.v1.LogsData.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.logs.v1.LogsData\n * @static\n * @param {opentelemetry.proto.logs.v1.ILogsData} message LogsData message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n LogsData.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a LogsData message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.logs.v1.LogsData\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.logs.v1.LogsData} LogsData\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n LogsData.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.logs.v1.LogsData();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (!(message.resourceLogs && message.resourceLogs.length))\n message.resourceLogs = [];\n message.resourceLogs.push($root.opentelemetry.proto.logs.v1.ResourceLogs.decode(reader, reader.uint32()));\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a LogsData message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.logs.v1.LogsData\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.logs.v1.LogsData} LogsData\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n LogsData.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a LogsData message.\n * @function verify\n * @memberof opentelemetry.proto.logs.v1.LogsData\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n LogsData.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.resourceLogs != null && message.hasOwnProperty(\"resourceLogs\")) {\n if (!Array.isArray(message.resourceLogs))\n return \"resourceLogs: array expected\";\n for (var i = 0; i < message.resourceLogs.length; ++i) {\n var error = $root.opentelemetry.proto.logs.v1.ResourceLogs.verify(message.resourceLogs[i]);\n if (error)\n return \"resourceLogs.\" + error;\n }\n }\n return null;\n };\n /**\n * Creates a LogsData message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.logs.v1.LogsData\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.logs.v1.LogsData} LogsData\n */\n LogsData.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.logs.v1.LogsData)\n return object;\n var message = new $root.opentelemetry.proto.logs.v1.LogsData();\n if (object.resourceLogs) {\n if (!Array.isArray(object.resourceLogs))\n throw TypeError(\".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected\");\n message.resourceLogs = [];\n for (var i = 0; i < object.resourceLogs.length; ++i) {\n if (typeof object.resourceLogs[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected\");\n message.resourceLogs[i] = $root.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(object.resourceLogs[i]);\n }\n }\n return message;\n };\n /**\n * Creates a plain object from a LogsData message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.logs.v1.LogsData\n * @static\n * @param {opentelemetry.proto.logs.v1.LogsData} message LogsData\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n LogsData.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.resourceLogs = [];\n if (message.resourceLogs && message.resourceLogs.length) {\n object.resourceLogs = [];\n for (var j = 0; j < message.resourceLogs.length; ++j)\n object.resourceLogs[j] = $root.opentelemetry.proto.logs.v1.ResourceLogs.toObject(message.resourceLogs[j], options);\n }\n return object;\n };\n /**\n * Converts this LogsData to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.logs.v1.LogsData\n * @instance\n * @returns {Object.} JSON object\n */\n LogsData.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for LogsData\n * @function getTypeUrl\n * @memberof opentelemetry.proto.logs.v1.LogsData\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n LogsData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.logs.v1.LogsData\";\n };\n return LogsData;\n })();\n v1.ResourceLogs = (function () {\n /**\n * Properties of a ResourceLogs.\n * @memberof opentelemetry.proto.logs.v1\n * @interface IResourceLogs\n * @property {opentelemetry.proto.resource.v1.IResource|null} [resource] ResourceLogs resource\n * @property {Array.|null} [scopeLogs] ResourceLogs scopeLogs\n * @property {string|null} [schemaUrl] ResourceLogs schemaUrl\n */\n /**\n * Constructs a new ResourceLogs.\n * @memberof opentelemetry.proto.logs.v1\n * @classdesc Represents a ResourceLogs.\n * @implements IResourceLogs\n * @constructor\n * @param {opentelemetry.proto.logs.v1.IResourceLogs=} [properties] Properties to set\n */\n function ResourceLogs(properties) {\n this.scopeLogs = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ResourceLogs resource.\n * @member {opentelemetry.proto.resource.v1.IResource|null|undefined} resource\n * @memberof opentelemetry.proto.logs.v1.ResourceLogs\n * @instance\n */\n ResourceLogs.prototype.resource = null;\n /**\n * ResourceLogs scopeLogs.\n * @member {Array.} scopeLogs\n * @memberof opentelemetry.proto.logs.v1.ResourceLogs\n * @instance\n */\n ResourceLogs.prototype.scopeLogs = $util.emptyArray;\n /**\n * ResourceLogs schemaUrl.\n * @member {string|null|undefined} schemaUrl\n * @memberof opentelemetry.proto.logs.v1.ResourceLogs\n * @instance\n */\n ResourceLogs.prototype.schemaUrl = null;\n /**\n * Creates a new ResourceLogs instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.logs.v1.ResourceLogs\n * @static\n * @param {opentelemetry.proto.logs.v1.IResourceLogs=} [properties] Properties to set\n * @returns {opentelemetry.proto.logs.v1.ResourceLogs} ResourceLogs instance\n */\n ResourceLogs.create = function create(properties) {\n return new ResourceLogs(properties);\n };\n /**\n * Encodes the specified ResourceLogs message. Does not implicitly {@link opentelemetry.proto.logs.v1.ResourceLogs.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.logs.v1.ResourceLogs\n * @static\n * @param {opentelemetry.proto.logs.v1.IResourceLogs} message ResourceLogs message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ResourceLogs.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.resource != null && Object.hasOwnProperty.call(message, \"resource\"))\n $root.opentelemetry.proto.resource.v1.Resource.encode(message.resource, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n if (message.scopeLogs != null && message.scopeLogs.length)\n for (var i = 0; i < message.scopeLogs.length; ++i)\n $root.opentelemetry.proto.logs.v1.ScopeLogs.encode(message.scopeLogs[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim();\n if (message.schemaUrl != null && Object.hasOwnProperty.call(message, \"schemaUrl\"))\n writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl);\n return writer;\n };\n /**\n * Encodes the specified ResourceLogs message, length delimited. Does not implicitly {@link opentelemetry.proto.logs.v1.ResourceLogs.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.logs.v1.ResourceLogs\n * @static\n * @param {opentelemetry.proto.logs.v1.IResourceLogs} message ResourceLogs message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ResourceLogs.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a ResourceLogs message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.logs.v1.ResourceLogs\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.logs.v1.ResourceLogs} ResourceLogs\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ResourceLogs.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.logs.v1.ResourceLogs();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.resource = $root.opentelemetry.proto.resource.v1.Resource.decode(reader, reader.uint32());\n break;\n }\n case 2: {\n if (!(message.scopeLogs && message.scopeLogs.length))\n message.scopeLogs = [];\n message.scopeLogs.push($root.opentelemetry.proto.logs.v1.ScopeLogs.decode(reader, reader.uint32()));\n break;\n }\n case 3: {\n message.schemaUrl = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a ResourceLogs message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.logs.v1.ResourceLogs\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.logs.v1.ResourceLogs} ResourceLogs\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ResourceLogs.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a ResourceLogs message.\n * @function verify\n * @memberof opentelemetry.proto.logs.v1.ResourceLogs\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ResourceLogs.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.resource != null && message.hasOwnProperty(\"resource\")) {\n var error = $root.opentelemetry.proto.resource.v1.Resource.verify(message.resource);\n if (error)\n return \"resource.\" + error;\n }\n if (message.scopeLogs != null && message.hasOwnProperty(\"scopeLogs\")) {\n if (!Array.isArray(message.scopeLogs))\n return \"scopeLogs: array expected\";\n for (var i = 0; i < message.scopeLogs.length; ++i) {\n var error = $root.opentelemetry.proto.logs.v1.ScopeLogs.verify(message.scopeLogs[i]);\n if (error)\n return \"scopeLogs.\" + error;\n }\n }\n if (message.schemaUrl != null && message.hasOwnProperty(\"schemaUrl\"))\n if (!$util.isString(message.schemaUrl))\n return \"schemaUrl: string expected\";\n return null;\n };\n /**\n * Creates a ResourceLogs message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.logs.v1.ResourceLogs\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.logs.v1.ResourceLogs} ResourceLogs\n */\n ResourceLogs.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.logs.v1.ResourceLogs)\n return object;\n var message = new $root.opentelemetry.proto.logs.v1.ResourceLogs();\n if (object.resource != null) {\n if (typeof object.resource !== \"object\")\n throw TypeError(\".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected\");\n message.resource = $root.opentelemetry.proto.resource.v1.Resource.fromObject(object.resource);\n }\n if (object.scopeLogs) {\n if (!Array.isArray(object.scopeLogs))\n throw TypeError(\".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected\");\n message.scopeLogs = [];\n for (var i = 0; i < object.scopeLogs.length; ++i) {\n if (typeof object.scopeLogs[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected\");\n message.scopeLogs[i] = $root.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(object.scopeLogs[i]);\n }\n }\n if (object.schemaUrl != null)\n message.schemaUrl = String(object.schemaUrl);\n return message;\n };\n /**\n * Creates a plain object from a ResourceLogs message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.logs.v1.ResourceLogs\n * @static\n * @param {opentelemetry.proto.logs.v1.ResourceLogs} message ResourceLogs\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ResourceLogs.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.scopeLogs = [];\n if (options.defaults) {\n object.resource = null;\n object.schemaUrl = \"\";\n }\n if (message.resource != null && message.hasOwnProperty(\"resource\"))\n object.resource = $root.opentelemetry.proto.resource.v1.Resource.toObject(message.resource, options);\n if (message.scopeLogs && message.scopeLogs.length) {\n object.scopeLogs = [];\n for (var j = 0; j < message.scopeLogs.length; ++j)\n object.scopeLogs[j] = $root.opentelemetry.proto.logs.v1.ScopeLogs.toObject(message.scopeLogs[j], options);\n }\n if (message.schemaUrl != null && message.hasOwnProperty(\"schemaUrl\"))\n object.schemaUrl = message.schemaUrl;\n return object;\n };\n /**\n * Converts this ResourceLogs to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.logs.v1.ResourceLogs\n * @instance\n * @returns {Object.} JSON object\n */\n ResourceLogs.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ResourceLogs\n * @function getTypeUrl\n * @memberof opentelemetry.proto.logs.v1.ResourceLogs\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ResourceLogs.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.logs.v1.ResourceLogs\";\n };\n return ResourceLogs;\n })();\n v1.ScopeLogs = (function () {\n /**\n * Properties of a ScopeLogs.\n * @memberof opentelemetry.proto.logs.v1\n * @interface IScopeLogs\n * @property {opentelemetry.proto.common.v1.IInstrumentationScope|null} [scope] ScopeLogs scope\n * @property {Array.|null} [logRecords] ScopeLogs logRecords\n * @property {string|null} [schemaUrl] ScopeLogs schemaUrl\n */\n /**\n * Constructs a new ScopeLogs.\n * @memberof opentelemetry.proto.logs.v1\n * @classdesc Represents a ScopeLogs.\n * @implements IScopeLogs\n * @constructor\n * @param {opentelemetry.proto.logs.v1.IScopeLogs=} [properties] Properties to set\n */\n function ScopeLogs(properties) {\n this.logRecords = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * ScopeLogs scope.\n * @member {opentelemetry.proto.common.v1.IInstrumentationScope|null|undefined} scope\n * @memberof opentelemetry.proto.logs.v1.ScopeLogs\n * @instance\n */\n ScopeLogs.prototype.scope = null;\n /**\n * ScopeLogs logRecords.\n * @member {Array.} logRecords\n * @memberof opentelemetry.proto.logs.v1.ScopeLogs\n * @instance\n */\n ScopeLogs.prototype.logRecords = $util.emptyArray;\n /**\n * ScopeLogs schemaUrl.\n * @member {string|null|undefined} schemaUrl\n * @memberof opentelemetry.proto.logs.v1.ScopeLogs\n * @instance\n */\n ScopeLogs.prototype.schemaUrl = null;\n /**\n * Creates a new ScopeLogs instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.logs.v1.ScopeLogs\n * @static\n * @param {opentelemetry.proto.logs.v1.IScopeLogs=} [properties] Properties to set\n * @returns {opentelemetry.proto.logs.v1.ScopeLogs} ScopeLogs instance\n */\n ScopeLogs.create = function create(properties) {\n return new ScopeLogs(properties);\n };\n /**\n * Encodes the specified ScopeLogs message. Does not implicitly {@link opentelemetry.proto.logs.v1.ScopeLogs.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.logs.v1.ScopeLogs\n * @static\n * @param {opentelemetry.proto.logs.v1.IScopeLogs} message ScopeLogs message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ScopeLogs.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.scope != null && Object.hasOwnProperty.call(message, \"scope\"))\n $root.opentelemetry.proto.common.v1.InstrumentationScope.encode(message.scope, writer.uint32(/* id 1, wireType 2 =*/ 10).fork()).ldelim();\n if (message.logRecords != null && message.logRecords.length)\n for (var i = 0; i < message.logRecords.length; ++i)\n $root.opentelemetry.proto.logs.v1.LogRecord.encode(message.logRecords[i], writer.uint32(/* id 2, wireType 2 =*/ 18).fork()).ldelim();\n if (message.schemaUrl != null && Object.hasOwnProperty.call(message, \"schemaUrl\"))\n writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.schemaUrl);\n return writer;\n };\n /**\n * Encodes the specified ScopeLogs message, length delimited. Does not implicitly {@link opentelemetry.proto.logs.v1.ScopeLogs.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.logs.v1.ScopeLogs\n * @static\n * @param {opentelemetry.proto.logs.v1.IScopeLogs} message ScopeLogs message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n ScopeLogs.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a ScopeLogs message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.logs.v1.ScopeLogs\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.logs.v1.ScopeLogs} ScopeLogs\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ScopeLogs.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.logs.v1.ScopeLogs();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.decode(reader, reader.uint32());\n break;\n }\n case 2: {\n if (!(message.logRecords && message.logRecords.length))\n message.logRecords = [];\n message.logRecords.push($root.opentelemetry.proto.logs.v1.LogRecord.decode(reader, reader.uint32()));\n break;\n }\n case 3: {\n message.schemaUrl = reader.string();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a ScopeLogs message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.logs.v1.ScopeLogs\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.logs.v1.ScopeLogs} ScopeLogs\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n ScopeLogs.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a ScopeLogs message.\n * @function verify\n * @memberof opentelemetry.proto.logs.v1.ScopeLogs\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n ScopeLogs.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.scope != null && message.hasOwnProperty(\"scope\")) {\n var error = $root.opentelemetry.proto.common.v1.InstrumentationScope.verify(message.scope);\n if (error)\n return \"scope.\" + error;\n }\n if (message.logRecords != null && message.hasOwnProperty(\"logRecords\")) {\n if (!Array.isArray(message.logRecords))\n return \"logRecords: array expected\";\n for (var i = 0; i < message.logRecords.length; ++i) {\n var error = $root.opentelemetry.proto.logs.v1.LogRecord.verify(message.logRecords[i]);\n if (error)\n return \"logRecords.\" + error;\n }\n }\n if (message.schemaUrl != null && message.hasOwnProperty(\"schemaUrl\"))\n if (!$util.isString(message.schemaUrl))\n return \"schemaUrl: string expected\";\n return null;\n };\n /**\n * Creates a ScopeLogs message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.logs.v1.ScopeLogs\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.logs.v1.ScopeLogs} ScopeLogs\n */\n ScopeLogs.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.logs.v1.ScopeLogs)\n return object;\n var message = new $root.opentelemetry.proto.logs.v1.ScopeLogs();\n if (object.scope != null) {\n if (typeof object.scope !== \"object\")\n throw TypeError(\".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected\");\n message.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(object.scope);\n }\n if (object.logRecords) {\n if (!Array.isArray(object.logRecords))\n throw TypeError(\".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected\");\n message.logRecords = [];\n for (var i = 0; i < object.logRecords.length; ++i) {\n if (typeof object.logRecords[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected\");\n message.logRecords[i] = $root.opentelemetry.proto.logs.v1.LogRecord.fromObject(object.logRecords[i]);\n }\n }\n if (object.schemaUrl != null)\n message.schemaUrl = String(object.schemaUrl);\n return message;\n };\n /**\n * Creates a plain object from a ScopeLogs message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.logs.v1.ScopeLogs\n * @static\n * @param {opentelemetry.proto.logs.v1.ScopeLogs} message ScopeLogs\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n ScopeLogs.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.logRecords = [];\n if (options.defaults) {\n object.scope = null;\n object.schemaUrl = \"\";\n }\n if (message.scope != null && message.hasOwnProperty(\"scope\"))\n object.scope = $root.opentelemetry.proto.common.v1.InstrumentationScope.toObject(message.scope, options);\n if (message.logRecords && message.logRecords.length) {\n object.logRecords = [];\n for (var j = 0; j < message.logRecords.length; ++j)\n object.logRecords[j] = $root.opentelemetry.proto.logs.v1.LogRecord.toObject(message.logRecords[j], options);\n }\n if (message.schemaUrl != null && message.hasOwnProperty(\"schemaUrl\"))\n object.schemaUrl = message.schemaUrl;\n return object;\n };\n /**\n * Converts this ScopeLogs to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.logs.v1.ScopeLogs\n * @instance\n * @returns {Object.} JSON object\n */\n ScopeLogs.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for ScopeLogs\n * @function getTypeUrl\n * @memberof opentelemetry.proto.logs.v1.ScopeLogs\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n ScopeLogs.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.logs.v1.ScopeLogs\";\n };\n return ScopeLogs;\n })();\n /**\n * SeverityNumber enum.\n * @name opentelemetry.proto.logs.v1.SeverityNumber\n * @enum {number}\n * @property {number} SEVERITY_NUMBER_UNSPECIFIED=0 SEVERITY_NUMBER_UNSPECIFIED value\n * @property {number} SEVERITY_NUMBER_TRACE=1 SEVERITY_NUMBER_TRACE value\n * @property {number} SEVERITY_NUMBER_TRACE2=2 SEVERITY_NUMBER_TRACE2 value\n * @property {number} SEVERITY_NUMBER_TRACE3=3 SEVERITY_NUMBER_TRACE3 value\n * @property {number} SEVERITY_NUMBER_TRACE4=4 SEVERITY_NUMBER_TRACE4 value\n * @property {number} SEVERITY_NUMBER_DEBUG=5 SEVERITY_NUMBER_DEBUG value\n * @property {number} SEVERITY_NUMBER_DEBUG2=6 SEVERITY_NUMBER_DEBUG2 value\n * @property {number} SEVERITY_NUMBER_DEBUG3=7 SEVERITY_NUMBER_DEBUG3 value\n * @property {number} SEVERITY_NUMBER_DEBUG4=8 SEVERITY_NUMBER_DEBUG4 value\n * @property {number} SEVERITY_NUMBER_INFO=9 SEVERITY_NUMBER_INFO value\n * @property {number} SEVERITY_NUMBER_INFO2=10 SEVERITY_NUMBER_INFO2 value\n * @property {number} SEVERITY_NUMBER_INFO3=11 SEVERITY_NUMBER_INFO3 value\n * @property {number} SEVERITY_NUMBER_INFO4=12 SEVERITY_NUMBER_INFO4 value\n * @property {number} SEVERITY_NUMBER_WARN=13 SEVERITY_NUMBER_WARN value\n * @property {number} SEVERITY_NUMBER_WARN2=14 SEVERITY_NUMBER_WARN2 value\n * @property {number} SEVERITY_NUMBER_WARN3=15 SEVERITY_NUMBER_WARN3 value\n * @property {number} SEVERITY_NUMBER_WARN4=16 SEVERITY_NUMBER_WARN4 value\n * @property {number} SEVERITY_NUMBER_ERROR=17 SEVERITY_NUMBER_ERROR value\n * @property {number} SEVERITY_NUMBER_ERROR2=18 SEVERITY_NUMBER_ERROR2 value\n * @property {number} SEVERITY_NUMBER_ERROR3=19 SEVERITY_NUMBER_ERROR3 value\n * @property {number} SEVERITY_NUMBER_ERROR4=20 SEVERITY_NUMBER_ERROR4 value\n * @property {number} SEVERITY_NUMBER_FATAL=21 SEVERITY_NUMBER_FATAL value\n * @property {number} SEVERITY_NUMBER_FATAL2=22 SEVERITY_NUMBER_FATAL2 value\n * @property {number} SEVERITY_NUMBER_FATAL3=23 SEVERITY_NUMBER_FATAL3 value\n * @property {number} SEVERITY_NUMBER_FATAL4=24 SEVERITY_NUMBER_FATAL4 value\n */\n v1.SeverityNumber = (function () {\n var valuesById = {}, values = Object.create(valuesById);\n values[valuesById[0] = \"SEVERITY_NUMBER_UNSPECIFIED\"] = 0;\n values[valuesById[1] = \"SEVERITY_NUMBER_TRACE\"] = 1;\n values[valuesById[2] = \"SEVERITY_NUMBER_TRACE2\"] = 2;\n values[valuesById[3] = \"SEVERITY_NUMBER_TRACE3\"] = 3;\n values[valuesById[4] = \"SEVERITY_NUMBER_TRACE4\"] = 4;\n values[valuesById[5] = \"SEVERITY_NUMBER_DEBUG\"] = 5;\n values[valuesById[6] = \"SEVERITY_NUMBER_DEBUG2\"] = 6;\n values[valuesById[7] = \"SEVERITY_NUMBER_DEBUG3\"] = 7;\n values[valuesById[8] = \"SEVERITY_NUMBER_DEBUG4\"] = 8;\n values[valuesById[9] = \"SEVERITY_NUMBER_INFO\"] = 9;\n values[valuesById[10] = \"SEVERITY_NUMBER_INFO2\"] = 10;\n values[valuesById[11] = \"SEVERITY_NUMBER_INFO3\"] = 11;\n values[valuesById[12] = \"SEVERITY_NUMBER_INFO4\"] = 12;\n values[valuesById[13] = \"SEVERITY_NUMBER_WARN\"] = 13;\n values[valuesById[14] = \"SEVERITY_NUMBER_WARN2\"] = 14;\n values[valuesById[15] = \"SEVERITY_NUMBER_WARN3\"] = 15;\n values[valuesById[16] = \"SEVERITY_NUMBER_WARN4\"] = 16;\n values[valuesById[17] = \"SEVERITY_NUMBER_ERROR\"] = 17;\n values[valuesById[18] = \"SEVERITY_NUMBER_ERROR2\"] = 18;\n values[valuesById[19] = \"SEVERITY_NUMBER_ERROR3\"] = 19;\n values[valuesById[20] = \"SEVERITY_NUMBER_ERROR4\"] = 20;\n values[valuesById[21] = \"SEVERITY_NUMBER_FATAL\"] = 21;\n values[valuesById[22] = \"SEVERITY_NUMBER_FATAL2\"] = 22;\n values[valuesById[23] = \"SEVERITY_NUMBER_FATAL3\"] = 23;\n values[valuesById[24] = \"SEVERITY_NUMBER_FATAL4\"] = 24;\n return values;\n })();\n /**\n * LogRecordFlags enum.\n * @name opentelemetry.proto.logs.v1.LogRecordFlags\n * @enum {number}\n * @property {number} LOG_RECORD_FLAGS_DO_NOT_USE=0 LOG_RECORD_FLAGS_DO_NOT_USE value\n * @property {number} LOG_RECORD_FLAGS_TRACE_FLAGS_MASK=255 LOG_RECORD_FLAGS_TRACE_FLAGS_MASK value\n */\n v1.LogRecordFlags = (function () {\n var valuesById = {}, values = Object.create(valuesById);\n values[valuesById[0] = \"LOG_RECORD_FLAGS_DO_NOT_USE\"] = 0;\n values[valuesById[255] = \"LOG_RECORD_FLAGS_TRACE_FLAGS_MASK\"] = 255;\n return values;\n })();\n v1.LogRecord = (function () {\n /**\n * Properties of a LogRecord.\n * @memberof opentelemetry.proto.logs.v1\n * @interface ILogRecord\n * @property {number|Long|null} [timeUnixNano] LogRecord timeUnixNano\n * @property {number|Long|null} [observedTimeUnixNano] LogRecord observedTimeUnixNano\n * @property {opentelemetry.proto.logs.v1.SeverityNumber|null} [severityNumber] LogRecord severityNumber\n * @property {string|null} [severityText] LogRecord severityText\n * @property {opentelemetry.proto.common.v1.IAnyValue|null} [body] LogRecord body\n * @property {Array.|null} [attributes] LogRecord attributes\n * @property {number|null} [droppedAttributesCount] LogRecord droppedAttributesCount\n * @property {number|null} [flags] LogRecord flags\n * @property {Uint8Array|null} [traceId] LogRecord traceId\n * @property {Uint8Array|null} [spanId] LogRecord spanId\n */\n /**\n * Constructs a new LogRecord.\n * @memberof opentelemetry.proto.logs.v1\n * @classdesc Represents a LogRecord.\n * @implements ILogRecord\n * @constructor\n * @param {opentelemetry.proto.logs.v1.ILogRecord=} [properties] Properties to set\n */\n function LogRecord(properties) {\n this.attributes = [];\n if (properties)\n for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n if (properties[keys[i]] != null)\n this[keys[i]] = properties[keys[i]];\n }\n /**\n * LogRecord timeUnixNano.\n * @member {number|Long|null|undefined} timeUnixNano\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @instance\n */\n LogRecord.prototype.timeUnixNano = null;\n /**\n * LogRecord observedTimeUnixNano.\n * @member {number|Long|null|undefined} observedTimeUnixNano\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @instance\n */\n LogRecord.prototype.observedTimeUnixNano = null;\n /**\n * LogRecord severityNumber.\n * @member {opentelemetry.proto.logs.v1.SeverityNumber|null|undefined} severityNumber\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @instance\n */\n LogRecord.prototype.severityNumber = null;\n /**\n * LogRecord severityText.\n * @member {string|null|undefined} severityText\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @instance\n */\n LogRecord.prototype.severityText = null;\n /**\n * LogRecord body.\n * @member {opentelemetry.proto.common.v1.IAnyValue|null|undefined} body\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @instance\n */\n LogRecord.prototype.body = null;\n /**\n * LogRecord attributes.\n * @member {Array.} attributes\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @instance\n */\n LogRecord.prototype.attributes = $util.emptyArray;\n /**\n * LogRecord droppedAttributesCount.\n * @member {number|null|undefined} droppedAttributesCount\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @instance\n */\n LogRecord.prototype.droppedAttributesCount = null;\n /**\n * LogRecord flags.\n * @member {number|null|undefined} flags\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @instance\n */\n LogRecord.prototype.flags = null;\n /**\n * LogRecord traceId.\n * @member {Uint8Array|null|undefined} traceId\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @instance\n */\n LogRecord.prototype.traceId = null;\n /**\n * LogRecord spanId.\n * @member {Uint8Array|null|undefined} spanId\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @instance\n */\n LogRecord.prototype.spanId = null;\n /**\n * Creates a new LogRecord instance using the specified properties.\n * @function create\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @static\n * @param {opentelemetry.proto.logs.v1.ILogRecord=} [properties] Properties to set\n * @returns {opentelemetry.proto.logs.v1.LogRecord} LogRecord instance\n */\n LogRecord.create = function create(properties) {\n return new LogRecord(properties);\n };\n /**\n * Encodes the specified LogRecord message. Does not implicitly {@link opentelemetry.proto.logs.v1.LogRecord.verify|verify} messages.\n * @function encode\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @static\n * @param {opentelemetry.proto.logs.v1.ILogRecord} message LogRecord message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n LogRecord.encode = function encode(message, writer) {\n if (!writer)\n writer = $Writer.create();\n if (message.timeUnixNano != null && Object.hasOwnProperty.call(message, \"timeUnixNano\"))\n writer.uint32(/* id 1, wireType 1 =*/ 9).fixed64(message.timeUnixNano);\n if (message.severityNumber != null && Object.hasOwnProperty.call(message, \"severityNumber\"))\n writer.uint32(/* id 2, wireType 0 =*/ 16).int32(message.severityNumber);\n if (message.severityText != null && Object.hasOwnProperty.call(message, \"severityText\"))\n writer.uint32(/* id 3, wireType 2 =*/ 26).string(message.severityText);\n if (message.body != null && Object.hasOwnProperty.call(message, \"body\"))\n $root.opentelemetry.proto.common.v1.AnyValue.encode(message.body, writer.uint32(/* id 5, wireType 2 =*/ 42).fork()).ldelim();\n if (message.attributes != null && message.attributes.length)\n for (var i = 0; i < message.attributes.length; ++i)\n $root.opentelemetry.proto.common.v1.KeyValue.encode(message.attributes[i], writer.uint32(/* id 6, wireType 2 =*/ 50).fork()).ldelim();\n if (message.droppedAttributesCount != null && Object.hasOwnProperty.call(message, \"droppedAttributesCount\"))\n writer.uint32(/* id 7, wireType 0 =*/ 56).uint32(message.droppedAttributesCount);\n if (message.flags != null && Object.hasOwnProperty.call(message, \"flags\"))\n writer.uint32(/* id 8, wireType 5 =*/ 69).fixed32(message.flags);\n if (message.traceId != null && Object.hasOwnProperty.call(message, \"traceId\"))\n writer.uint32(/* id 9, wireType 2 =*/ 74).bytes(message.traceId);\n if (message.spanId != null && Object.hasOwnProperty.call(message, \"spanId\"))\n writer.uint32(/* id 10, wireType 2 =*/ 82).bytes(message.spanId);\n if (message.observedTimeUnixNano != null && Object.hasOwnProperty.call(message, \"observedTimeUnixNano\"))\n writer.uint32(/* id 11, wireType 1 =*/ 89).fixed64(message.observedTimeUnixNano);\n return writer;\n };\n /**\n * Encodes the specified LogRecord message, length delimited. Does not implicitly {@link opentelemetry.proto.logs.v1.LogRecord.verify|verify} messages.\n * @function encodeDelimited\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @static\n * @param {opentelemetry.proto.logs.v1.ILogRecord} message LogRecord message or plain object to encode\n * @param {$protobuf.Writer} [writer] Writer to encode to\n * @returns {$protobuf.Writer} Writer\n */\n LogRecord.encodeDelimited = function encodeDelimited(message, writer) {\n return this.encode(message, writer).ldelim();\n };\n /**\n * Decodes a LogRecord message from the specified reader or buffer.\n * @function decode\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Message length if known beforehand\n * @returns {opentelemetry.proto.logs.v1.LogRecord} LogRecord\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n LogRecord.decode = function decode(reader, length) {\n if (!(reader instanceof $Reader))\n reader = $Reader.create(reader);\n var end = length === undefined ? reader.len : reader.pos + length, message = new $root.opentelemetry.proto.logs.v1.LogRecord();\n while (reader.pos < end) {\n var tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n message.timeUnixNano = reader.fixed64();\n break;\n }\n case 11: {\n message.observedTimeUnixNano = reader.fixed64();\n break;\n }\n case 2: {\n message.severityNumber = reader.int32();\n break;\n }\n case 3: {\n message.severityText = reader.string();\n break;\n }\n case 5: {\n message.body = $root.opentelemetry.proto.common.v1.AnyValue.decode(reader, reader.uint32());\n break;\n }\n case 6: {\n if (!(message.attributes && message.attributes.length))\n message.attributes = [];\n message.attributes.push($root.opentelemetry.proto.common.v1.KeyValue.decode(reader, reader.uint32()));\n break;\n }\n case 7: {\n message.droppedAttributesCount = reader.uint32();\n break;\n }\n case 8: {\n message.flags = reader.fixed32();\n break;\n }\n case 9: {\n message.traceId = reader.bytes();\n break;\n }\n case 10: {\n message.spanId = reader.bytes();\n break;\n }\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n };\n /**\n * Decodes a LogRecord message from the specified reader or buffer, length delimited.\n * @function decodeDelimited\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @static\n * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {opentelemetry.proto.logs.v1.LogRecord} LogRecord\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {$protobuf.util.ProtocolError} If required fields are missing\n */\n LogRecord.decodeDelimited = function decodeDelimited(reader) {\n if (!(reader instanceof $Reader))\n reader = new $Reader(reader);\n return this.decode(reader, reader.uint32());\n };\n /**\n * Verifies a LogRecord message.\n * @function verify\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @static\n * @param {Object.} message Plain object to verify\n * @returns {string|null} `null` if valid, otherwise the reason why it is not\n */\n LogRecord.verify = function verify(message) {\n if (typeof message !== \"object\" || message === null)\n return \"object expected\";\n if (message.timeUnixNano != null && message.hasOwnProperty(\"timeUnixNano\"))\n if (!$util.isInteger(message.timeUnixNano) && !(message.timeUnixNano && $util.isInteger(message.timeUnixNano.low) && $util.isInteger(message.timeUnixNano.high)))\n return \"timeUnixNano: integer|Long expected\";\n if (message.observedTimeUnixNano != null && message.hasOwnProperty(\"observedTimeUnixNano\"))\n if (!$util.isInteger(message.observedTimeUnixNano) && !(message.observedTimeUnixNano && $util.isInteger(message.observedTimeUnixNano.low) && $util.isInteger(message.observedTimeUnixNano.high)))\n return \"observedTimeUnixNano: integer|Long expected\";\n if (message.severityNumber != null && message.hasOwnProperty(\"severityNumber\"))\n switch (message.severityNumber) {\n default:\n return \"severityNumber: enum value expected\";\n case 0:\n case 1:\n case 2:\n case 3:\n case 4:\n case 5:\n case 6:\n case 7:\n case 8:\n case 9:\n case 10:\n case 11:\n case 12:\n case 13:\n case 14:\n case 15:\n case 16:\n case 17:\n case 18:\n case 19:\n case 20:\n case 21:\n case 22:\n case 23:\n case 24:\n break;\n }\n if (message.severityText != null && message.hasOwnProperty(\"severityText\"))\n if (!$util.isString(message.severityText))\n return \"severityText: string expected\";\n if (message.body != null && message.hasOwnProperty(\"body\")) {\n var error = $root.opentelemetry.proto.common.v1.AnyValue.verify(message.body);\n if (error)\n return \"body.\" + error;\n }\n if (message.attributes != null && message.hasOwnProperty(\"attributes\")) {\n if (!Array.isArray(message.attributes))\n return \"attributes: array expected\";\n for (var i = 0; i < message.attributes.length; ++i) {\n var error = $root.opentelemetry.proto.common.v1.KeyValue.verify(message.attributes[i]);\n if (error)\n return \"attributes.\" + error;\n }\n }\n if (message.droppedAttributesCount != null && message.hasOwnProperty(\"droppedAttributesCount\"))\n if (!$util.isInteger(message.droppedAttributesCount))\n return \"droppedAttributesCount: integer expected\";\n if (message.flags != null && message.hasOwnProperty(\"flags\"))\n if (!$util.isInteger(message.flags))\n return \"flags: integer expected\";\n if (message.traceId != null && message.hasOwnProperty(\"traceId\"))\n if (!(message.traceId && typeof message.traceId.length === \"number\" || $util.isString(message.traceId)))\n return \"traceId: buffer expected\";\n if (message.spanId != null && message.hasOwnProperty(\"spanId\"))\n if (!(message.spanId && typeof message.spanId.length === \"number\" || $util.isString(message.spanId)))\n return \"spanId: buffer expected\";\n return null;\n };\n /**\n * Creates a LogRecord message from a plain object. Also converts values to their respective internal types.\n * @function fromObject\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @static\n * @param {Object.} object Plain object\n * @returns {opentelemetry.proto.logs.v1.LogRecord} LogRecord\n */\n LogRecord.fromObject = function fromObject(object) {\n if (object instanceof $root.opentelemetry.proto.logs.v1.LogRecord)\n return object;\n var message = new $root.opentelemetry.proto.logs.v1.LogRecord();\n if (object.timeUnixNano != null)\n if ($util.Long)\n (message.timeUnixNano = $util.Long.fromValue(object.timeUnixNano)).unsigned = false;\n else if (typeof object.timeUnixNano === \"string\")\n message.timeUnixNano = parseInt(object.timeUnixNano, 10);\n else if (typeof object.timeUnixNano === \"number\")\n message.timeUnixNano = object.timeUnixNano;\n else if (typeof object.timeUnixNano === \"object\")\n message.timeUnixNano = new $util.LongBits(object.timeUnixNano.low >>> 0, object.timeUnixNano.high >>> 0).toNumber();\n if (object.observedTimeUnixNano != null)\n if ($util.Long)\n (message.observedTimeUnixNano = $util.Long.fromValue(object.observedTimeUnixNano)).unsigned = false;\n else if (typeof object.observedTimeUnixNano === \"string\")\n message.observedTimeUnixNano = parseInt(object.observedTimeUnixNano, 10);\n else if (typeof object.observedTimeUnixNano === \"number\")\n message.observedTimeUnixNano = object.observedTimeUnixNano;\n else if (typeof object.observedTimeUnixNano === \"object\")\n message.observedTimeUnixNano = new $util.LongBits(object.observedTimeUnixNano.low >>> 0, object.observedTimeUnixNano.high >>> 0).toNumber();\n switch (object.severityNumber) {\n default:\n if (typeof object.severityNumber === \"number\") {\n message.severityNumber = object.severityNumber;\n break;\n }\n break;\n case \"SEVERITY_NUMBER_UNSPECIFIED\":\n case 0:\n message.severityNumber = 0;\n break;\n case \"SEVERITY_NUMBER_TRACE\":\n case 1:\n message.severityNumber = 1;\n break;\n case \"SEVERITY_NUMBER_TRACE2\":\n case 2:\n message.severityNumber = 2;\n break;\n case \"SEVERITY_NUMBER_TRACE3\":\n case 3:\n message.severityNumber = 3;\n break;\n case \"SEVERITY_NUMBER_TRACE4\":\n case 4:\n message.severityNumber = 4;\n break;\n case \"SEVERITY_NUMBER_DEBUG\":\n case 5:\n message.severityNumber = 5;\n break;\n case \"SEVERITY_NUMBER_DEBUG2\":\n case 6:\n message.severityNumber = 6;\n break;\n case \"SEVERITY_NUMBER_DEBUG3\":\n case 7:\n message.severityNumber = 7;\n break;\n case \"SEVERITY_NUMBER_DEBUG4\":\n case 8:\n message.severityNumber = 8;\n break;\n case \"SEVERITY_NUMBER_INFO\":\n case 9:\n message.severityNumber = 9;\n break;\n case \"SEVERITY_NUMBER_INFO2\":\n case 10:\n message.severityNumber = 10;\n break;\n case \"SEVERITY_NUMBER_INFO3\":\n case 11:\n message.severityNumber = 11;\n break;\n case \"SEVERITY_NUMBER_INFO4\":\n case 12:\n message.severityNumber = 12;\n break;\n case \"SEVERITY_NUMBER_WARN\":\n case 13:\n message.severityNumber = 13;\n break;\n case \"SEVERITY_NUMBER_WARN2\":\n case 14:\n message.severityNumber = 14;\n break;\n case \"SEVERITY_NUMBER_WARN3\":\n case 15:\n message.severityNumber = 15;\n break;\n case \"SEVERITY_NUMBER_WARN4\":\n case 16:\n message.severityNumber = 16;\n break;\n case \"SEVERITY_NUMBER_ERROR\":\n case 17:\n message.severityNumber = 17;\n break;\n case \"SEVERITY_NUMBER_ERROR2\":\n case 18:\n message.severityNumber = 18;\n break;\n case \"SEVERITY_NUMBER_ERROR3\":\n case 19:\n message.severityNumber = 19;\n break;\n case \"SEVERITY_NUMBER_ERROR4\":\n case 20:\n message.severityNumber = 20;\n break;\n case \"SEVERITY_NUMBER_FATAL\":\n case 21:\n message.severityNumber = 21;\n break;\n case \"SEVERITY_NUMBER_FATAL2\":\n case 22:\n message.severityNumber = 22;\n break;\n case \"SEVERITY_NUMBER_FATAL3\":\n case 23:\n message.severityNumber = 23;\n break;\n case \"SEVERITY_NUMBER_FATAL4\":\n case 24:\n message.severityNumber = 24;\n break;\n }\n if (object.severityText != null)\n message.severityText = String(object.severityText);\n if (object.body != null) {\n if (typeof object.body !== \"object\")\n throw TypeError(\".opentelemetry.proto.logs.v1.LogRecord.body: object expected\");\n message.body = $root.opentelemetry.proto.common.v1.AnyValue.fromObject(object.body);\n }\n if (object.attributes) {\n if (!Array.isArray(object.attributes))\n throw TypeError(\".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected\");\n message.attributes = [];\n for (var i = 0; i < object.attributes.length; ++i) {\n if (typeof object.attributes[i] !== \"object\")\n throw TypeError(\".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected\");\n message.attributes[i] = $root.opentelemetry.proto.common.v1.KeyValue.fromObject(object.attributes[i]);\n }\n }\n if (object.droppedAttributesCount != null)\n message.droppedAttributesCount = object.droppedAttributesCount >>> 0;\n if (object.flags != null)\n message.flags = object.flags >>> 0;\n if (object.traceId != null)\n if (typeof object.traceId === \"string\")\n $util.base64.decode(object.traceId, message.traceId = $util.newBuffer($util.base64.length(object.traceId)), 0);\n else if (object.traceId.length >= 0)\n message.traceId = object.traceId;\n if (object.spanId != null)\n if (typeof object.spanId === \"string\")\n $util.base64.decode(object.spanId, message.spanId = $util.newBuffer($util.base64.length(object.spanId)), 0);\n else if (object.spanId.length >= 0)\n message.spanId = object.spanId;\n return message;\n };\n /**\n * Creates a plain object from a LogRecord message. Also converts values to other types if specified.\n * @function toObject\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @static\n * @param {opentelemetry.proto.logs.v1.LogRecord} message LogRecord\n * @param {$protobuf.IConversionOptions} [options] Conversion options\n * @returns {Object.} Plain object\n */\n LogRecord.toObject = function toObject(message, options) {\n if (!options)\n options = {};\n var object = {};\n if (options.arrays || options.defaults)\n object.attributes = [];\n if (options.defaults) {\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.timeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.timeUnixNano = options.longs === String ? \"0\" : 0;\n object.severityNumber = options.enums === String ? \"SEVERITY_NUMBER_UNSPECIFIED\" : 0;\n object.severityText = \"\";\n object.body = null;\n object.droppedAttributesCount = 0;\n object.flags = 0;\n if (options.bytes === String)\n object.traceId = \"\";\n else {\n object.traceId = [];\n if (options.bytes !== Array)\n object.traceId = $util.newBuffer(object.traceId);\n }\n if (options.bytes === String)\n object.spanId = \"\";\n else {\n object.spanId = [];\n if (options.bytes !== Array)\n object.spanId = $util.newBuffer(object.spanId);\n }\n if ($util.Long) {\n var long = new $util.Long(0, 0, false);\n object.observedTimeUnixNano = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;\n }\n else\n object.observedTimeUnixNano = options.longs === String ? \"0\" : 0;\n }\n if (message.timeUnixNano != null && message.hasOwnProperty(\"timeUnixNano\"))\n if (typeof message.timeUnixNano === \"number\")\n object.timeUnixNano = options.longs === String ? String(message.timeUnixNano) : message.timeUnixNano;\n else\n object.timeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.timeUnixNano) : options.longs === Number ? new $util.LongBits(message.timeUnixNano.low >>> 0, message.timeUnixNano.high >>> 0).toNumber() : message.timeUnixNano;\n if (message.severityNumber != null && message.hasOwnProperty(\"severityNumber\"))\n object.severityNumber = options.enums === String ? $root.opentelemetry.proto.logs.v1.SeverityNumber[message.severityNumber] === undefined ? message.severityNumber : $root.opentelemetry.proto.logs.v1.SeverityNumber[message.severityNumber] : message.severityNumber;\n if (message.severityText != null && message.hasOwnProperty(\"severityText\"))\n object.severityText = message.severityText;\n if (message.body != null && message.hasOwnProperty(\"body\"))\n object.body = $root.opentelemetry.proto.common.v1.AnyValue.toObject(message.body, options);\n if (message.attributes && message.attributes.length) {\n object.attributes = [];\n for (var j = 0; j < message.attributes.length; ++j)\n object.attributes[j] = $root.opentelemetry.proto.common.v1.KeyValue.toObject(message.attributes[j], options);\n }\n if (message.droppedAttributesCount != null && message.hasOwnProperty(\"droppedAttributesCount\"))\n object.droppedAttributesCount = message.droppedAttributesCount;\n if (message.flags != null && message.hasOwnProperty(\"flags\"))\n object.flags = message.flags;\n if (message.traceId != null && message.hasOwnProperty(\"traceId\"))\n object.traceId = options.bytes === String ? $util.base64.encode(message.traceId, 0, message.traceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.traceId) : message.traceId;\n if (message.spanId != null && message.hasOwnProperty(\"spanId\"))\n object.spanId = options.bytes === String ? $util.base64.encode(message.spanId, 0, message.spanId.length) : options.bytes === Array ? Array.prototype.slice.call(message.spanId) : message.spanId;\n if (message.observedTimeUnixNano != null && message.hasOwnProperty(\"observedTimeUnixNano\"))\n if (typeof message.observedTimeUnixNano === \"number\")\n object.observedTimeUnixNano = options.longs === String ? String(message.observedTimeUnixNano) : message.observedTimeUnixNano;\n else\n object.observedTimeUnixNano = options.longs === String ? $util.Long.prototype.toString.call(message.observedTimeUnixNano) : options.longs === Number ? new $util.LongBits(message.observedTimeUnixNano.low >>> 0, message.observedTimeUnixNano.high >>> 0).toNumber() : message.observedTimeUnixNano;\n return object;\n };\n /**\n * Converts this LogRecord to JSON.\n * @function toJSON\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @instance\n * @returns {Object.} JSON object\n */\n LogRecord.prototype.toJSON = function toJSON() {\n return this.constructor.toObject(this, $protobuf.util.toJSONOptions);\n };\n /**\n * Gets the default type url for LogRecord\n * @function getTypeUrl\n * @memberof opentelemetry.proto.logs.v1.LogRecord\n * @static\n * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default \"type.googleapis.com\")\n * @returns {string} The default type url\n */\n LogRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) {\n if (typeUrlPrefix === undefined) {\n typeUrlPrefix = \"type.googleapis.com\";\n }\n return typeUrlPrefix + \"/opentelemetry.proto.logs.v1.LogRecord\";\n };\n return LogRecord;\n })();\n return v1;\n })();\n return logs;\n })();\n return proto;\n })();\n return opentelemetry;\n})();\nmodule.exports = $root;\n//# sourceMappingURL=root.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JsonMetricsSerializer = exports.JsonLogsSerializer = exports.JsonTraceSerializer = exports.ProtobufTraceSerializer = exports.ProtobufMetricsSerializer = exports.ProtobufLogsSerializer = exports.createExportLogsServiceRequest = exports.createExportMetricsServiceRequest = exports.createExportTraceServiceRequest = exports.ESpanKind = exports.hrTimeToNanos = exports.encodeAsString = exports.encodeAsLongBits = exports.getOtlpEncoder = exports.toLongBits = void 0;\nvar common_1 = require(\"./common\");\nObject.defineProperty(exports, \"toLongBits\", { enumerable: true, get: function () { return common_1.toLongBits; } });\nObject.defineProperty(exports, \"getOtlpEncoder\", { enumerable: true, get: function () { return common_1.getOtlpEncoder; } });\nObject.defineProperty(exports, \"encodeAsLongBits\", { enumerable: true, get: function () { return common_1.encodeAsLongBits; } });\nObject.defineProperty(exports, \"encodeAsString\", { enumerable: true, get: function () { return common_1.encodeAsString; } });\nObject.defineProperty(exports, \"hrTimeToNanos\", { enumerable: true, get: function () { return common_1.hrTimeToNanos; } });\nvar types_1 = require(\"./trace/types\");\nObject.defineProperty(exports, \"ESpanKind\", { enumerable: true, get: function () { return types_1.ESpanKind; } });\nvar trace_1 = require(\"./trace\");\nObject.defineProperty(exports, \"createExportTraceServiceRequest\", { enumerable: true, get: function () { return trace_1.createExportTraceServiceRequest; } });\nvar metrics_1 = require(\"./metrics\");\nObject.defineProperty(exports, \"createExportMetricsServiceRequest\", { enumerable: true, get: function () { return metrics_1.createExportMetricsServiceRequest; } });\nvar logs_1 = require(\"./logs\");\nObject.defineProperty(exports, \"createExportLogsServiceRequest\", { enumerable: true, get: function () { return logs_1.createExportLogsServiceRequest; } });\nvar serializers_1 = require(\"./protobuf/serializers\");\nObject.defineProperty(exports, \"ProtobufLogsSerializer\", { enumerable: true, get: function () { return serializers_1.ProtobufLogsSerializer; } });\nObject.defineProperty(exports, \"ProtobufMetricsSerializer\", { enumerable: true, get: function () { return serializers_1.ProtobufMetricsSerializer; } });\nObject.defineProperty(exports, \"ProtobufTraceSerializer\", { enumerable: true, get: function () { return serializers_1.ProtobufTraceSerializer; } });\nvar serializers_2 = require(\"./json/serializers\");\nObject.defineProperty(exports, \"JsonTraceSerializer\", { enumerable: true, get: function () { return serializers_2.JsonTraceSerializer; } });\nObject.defineProperty(exports, \"JsonLogsSerializer\", { enumerable: true, get: function () { return serializers_2.JsonLogsSerializer; } });\nObject.defineProperty(exports, \"JsonMetricsSerializer\", { enumerable: true, get: function () { return serializers_2.JsonMetricsSerializer; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JsonLogsSerializer = exports.JsonMetricsSerializer = exports.JsonTraceSerializer = void 0;\nconst trace_1 = require(\"../trace\");\nconst metrics_1 = require(\"../metrics\");\nconst logs_1 = require(\"../logs\");\nexports.JsonTraceSerializer = {\n serializeRequest: (arg) => {\n const request = (0, trace_1.createExportTraceServiceRequest)(arg, {\n useHex: true,\n useLongBits: false,\n });\n const encoder = new TextEncoder();\n return encoder.encode(JSON.stringify(request));\n },\n deserializeResponse: (arg) => {\n const decoder = new TextDecoder();\n return JSON.parse(decoder.decode(arg));\n },\n};\nexports.JsonMetricsSerializer = {\n serializeRequest: (arg) => {\n const request = (0, metrics_1.createExportMetricsServiceRequest)(arg, {\n useLongBits: false,\n });\n const encoder = new TextEncoder();\n return encoder.encode(JSON.stringify(request));\n },\n deserializeResponse: (arg) => {\n const decoder = new TextDecoder();\n return JSON.parse(decoder.decode(arg));\n },\n};\nexports.JsonLogsSerializer = {\n serializeRequest: (arg) => {\n const request = (0, logs_1.createExportLogsServiceRequest)(arg, {\n useHex: true,\n useLongBits: false,\n });\n const encoder = new TextEncoder();\n return encoder.encode(JSON.stringify(request));\n },\n deserializeResponse: (arg) => {\n const decoder = new TextDecoder();\n return JSON.parse(decoder.decode(arg));\n },\n};\n//# sourceMappingURL=serializers.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toLogAttributes = exports.createExportLogsServiceRequest = void 0;\nconst common_1 = require(\"../common\");\nconst internal_1 = require(\"../common/internal\");\nconst internal_2 = require(\"../resource/internal\");\nfunction createExportLogsServiceRequest(logRecords, options) {\n const encoder = (0, common_1.getOtlpEncoder)(options);\n return {\n resourceLogs: logRecordsToResourceLogs(logRecords, encoder),\n };\n}\nexports.createExportLogsServiceRequest = createExportLogsServiceRequest;\nfunction createResourceMap(logRecords) {\n const resourceMap = new Map();\n for (const record of logRecords) {\n const { resource, instrumentationScope: { name, version = '', schemaUrl = '' }, } = record;\n let ismMap = resourceMap.get(resource);\n if (!ismMap) {\n ismMap = new Map();\n resourceMap.set(resource, ismMap);\n }\n const ismKey = `${name}@${version}:${schemaUrl}`;\n let records = ismMap.get(ismKey);\n if (!records) {\n records = [];\n ismMap.set(ismKey, records);\n }\n records.push(record);\n }\n return resourceMap;\n}\nfunction logRecordsToResourceLogs(logRecords, encoder) {\n const resourceMap = createResourceMap(logRecords);\n return Array.from(resourceMap, ([resource, ismMap]) => ({\n resource: (0, internal_2.createResource)(resource),\n scopeLogs: Array.from(ismMap, ([, scopeLogs]) => {\n return {\n scope: (0, internal_1.createInstrumentationScope)(scopeLogs[0].instrumentationScope),\n logRecords: scopeLogs.map(log => toLogRecord(log, encoder)),\n schemaUrl: scopeLogs[0].instrumentationScope.schemaUrl,\n };\n }),\n schemaUrl: undefined,\n }));\n}\nfunction toLogRecord(log, encoder) {\n var _a, _b, _c;\n return {\n timeUnixNano: encoder.encodeHrTime(log.hrTime),\n observedTimeUnixNano: encoder.encodeHrTime(log.hrTimeObserved),\n severityNumber: toSeverityNumber(log.severityNumber),\n severityText: log.severityText,\n body: (0, internal_1.toAnyValue)(log.body),\n attributes: toLogAttributes(log.attributes),\n droppedAttributesCount: log.droppedAttributesCount,\n flags: (_a = log.spanContext) === null || _a === void 0 ? void 0 : _a.traceFlags,\n traceId: encoder.encodeOptionalSpanContext((_b = log.spanContext) === null || _b === void 0 ? void 0 : _b.traceId),\n spanId: encoder.encodeOptionalSpanContext((_c = log.spanContext) === null || _c === void 0 ? void 0 : _c.spanId),\n };\n}\nfunction toSeverityNumber(severityNumber) {\n return severityNumber;\n}\nfunction toLogAttributes(attributes) {\n return Object.keys(attributes).map(key => (0, internal_1.toKeyValue)(key, attributes[key]));\n}\nexports.toLogAttributes = toLogAttributes;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createExportMetricsServiceRequest = void 0;\nconst internal_1 = require(\"./internal\");\nfunction createExportMetricsServiceRequest(resourceMetrics, options) {\n return {\n resourceMetrics: resourceMetrics.map(metrics => (0, internal_1.toResourceMetrics)(metrics, options)),\n };\n}\nexports.createExportMetricsServiceRequest = createExportMetricsServiceRequest;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toMetric = exports.toScopeMetrics = exports.toResourceMetrics = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst sdk_metrics_1 = require(\"@opentelemetry/sdk-metrics\");\nconst common_1 = require(\"../common\");\nconst internal_1 = require(\"../common/internal\");\nconst internal_2 = require(\"../resource/internal\");\nfunction toResourceMetrics(resourceMetrics, options) {\n const encoder = (0, common_1.getOtlpEncoder)(options);\n return {\n resource: (0, internal_2.createResource)(resourceMetrics.resource),\n schemaUrl: undefined,\n scopeMetrics: toScopeMetrics(resourceMetrics.scopeMetrics, encoder),\n };\n}\nexports.toResourceMetrics = toResourceMetrics;\nfunction toScopeMetrics(scopeMetrics, encoder) {\n return Array.from(scopeMetrics.map(metrics => ({\n scope: (0, internal_1.createInstrumentationScope)(metrics.scope),\n metrics: metrics.metrics.map(metricData => toMetric(metricData, encoder)),\n schemaUrl: metrics.scope.schemaUrl,\n })));\n}\nexports.toScopeMetrics = toScopeMetrics;\nfunction toMetric(metricData, encoder) {\n const out = {\n name: metricData.descriptor.name,\n description: metricData.descriptor.description,\n unit: metricData.descriptor.unit,\n };\n const aggregationTemporality = toAggregationTemporality(metricData.aggregationTemporality);\n switch (metricData.dataPointType) {\n case sdk_metrics_1.DataPointType.SUM:\n out.sum = {\n aggregationTemporality,\n isMonotonic: metricData.isMonotonic,\n dataPoints: toSingularDataPoints(metricData, encoder),\n };\n break;\n case sdk_metrics_1.DataPointType.GAUGE:\n out.gauge = {\n dataPoints: toSingularDataPoints(metricData, encoder),\n };\n break;\n case sdk_metrics_1.DataPointType.HISTOGRAM:\n out.histogram = {\n aggregationTemporality,\n dataPoints: toHistogramDataPoints(metricData, encoder),\n };\n break;\n case sdk_metrics_1.DataPointType.EXPONENTIAL_HISTOGRAM:\n out.exponentialHistogram = {\n aggregationTemporality,\n dataPoints: toExponentialHistogramDataPoints(metricData, encoder),\n };\n break;\n }\n return out;\n}\nexports.toMetric = toMetric;\nfunction toSingularDataPoint(dataPoint, valueType, encoder) {\n const out = {\n attributes: (0, internal_1.toAttributes)(dataPoint.attributes),\n startTimeUnixNano: encoder.encodeHrTime(dataPoint.startTime),\n timeUnixNano: encoder.encodeHrTime(dataPoint.endTime),\n };\n switch (valueType) {\n case api_1.ValueType.INT:\n out.asInt = dataPoint.value;\n break;\n case api_1.ValueType.DOUBLE:\n out.asDouble = dataPoint.value;\n break;\n }\n return out;\n}\nfunction toSingularDataPoints(metricData, encoder) {\n return metricData.dataPoints.map(dataPoint => {\n return toSingularDataPoint(dataPoint, metricData.descriptor.valueType, encoder);\n });\n}\nfunction toHistogramDataPoints(metricData, encoder) {\n return metricData.dataPoints.map(dataPoint => {\n const histogram = dataPoint.value;\n return {\n attributes: (0, internal_1.toAttributes)(dataPoint.attributes),\n bucketCounts: histogram.buckets.counts,\n explicitBounds: histogram.buckets.boundaries,\n count: histogram.count,\n sum: histogram.sum,\n min: histogram.min,\n max: histogram.max,\n startTimeUnixNano: encoder.encodeHrTime(dataPoint.startTime),\n timeUnixNano: encoder.encodeHrTime(dataPoint.endTime),\n };\n });\n}\nfunction toExponentialHistogramDataPoints(metricData, encoder) {\n return metricData.dataPoints.map(dataPoint => {\n const histogram = dataPoint.value;\n return {\n attributes: (0, internal_1.toAttributes)(dataPoint.attributes),\n count: histogram.count,\n min: histogram.min,\n max: histogram.max,\n sum: histogram.sum,\n positive: {\n offset: histogram.positive.offset,\n bucketCounts: histogram.positive.bucketCounts,\n },\n negative: {\n offset: histogram.negative.offset,\n bucketCounts: histogram.negative.bucketCounts,\n },\n scale: histogram.scale,\n zeroCount: histogram.zeroCount,\n startTimeUnixNano: encoder.encodeHrTime(dataPoint.startTime),\n timeUnixNano: encoder.encodeHrTime(dataPoint.endTime),\n };\n });\n}\nfunction toAggregationTemporality(temporality) {\n switch (temporality) {\n case sdk_metrics_1.AggregationTemporality.DELTA:\n return 1 /* AGGREGATION_TEMPORALITY_DELTA */;\n case sdk_metrics_1.AggregationTemporality.CUMULATIVE:\n return 2 /* AGGREGATION_TEMPORALITY_CUMULATIVE */;\n }\n}\n//# sourceMappingURL=internal.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProtobufTraceSerializer = exports.ProtobufMetricsSerializer = exports.ProtobufLogsSerializer = void 0;\nconst root = require(\"../generated/root\");\nconst trace_1 = require(\"../trace\");\nconst metrics_1 = require(\"../metrics\");\nconst logs_1 = require(\"../logs\");\nconst logsResponseType = root.opentelemetry.proto.collector.logs.v1\n .ExportLogsServiceResponse;\nconst logsRequestType = root.opentelemetry.proto.collector.logs.v1\n .ExportLogsServiceRequest;\nconst metricsResponseType = root.opentelemetry.proto.collector.metrics.v1\n .ExportMetricsServiceResponse;\nconst metricsRequestType = root.opentelemetry.proto.collector.metrics.v1\n .ExportMetricsServiceRequest;\nconst traceResponseType = root.opentelemetry.proto.collector.trace.v1\n .ExportTraceServiceResponse;\nconst traceRequestType = root.opentelemetry.proto.collector.trace.v1\n .ExportTraceServiceRequest;\nexports.ProtobufLogsSerializer = {\n serializeRequest: (arg) => {\n const request = (0, logs_1.createExportLogsServiceRequest)(arg);\n return logsRequestType.encode(request).finish();\n },\n deserializeResponse: (arg) => {\n return logsResponseType.decode(arg);\n },\n};\nexports.ProtobufMetricsSerializer = {\n serializeRequest: (arg) => {\n const request = (0, metrics_1.createExportMetricsServiceRequest)(arg);\n return metricsRequestType.encode(request).finish();\n },\n deserializeResponse: (arg) => {\n return metricsResponseType.decode(arg);\n },\n};\nexports.ProtobufTraceSerializer = {\n serializeRequest: (arg) => {\n const request = (0, trace_1.createExportTraceServiceRequest)(arg);\n return traceRequestType.encode(request).finish();\n },\n deserializeResponse: (arg) => {\n return traceResponseType.decode(arg);\n },\n};\n//# sourceMappingURL=serializers.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createResource = void 0;\nconst internal_1 = require(\"../common/internal\");\nfunction createResource(resource) {\n return {\n attributes: (0, internal_1.toAttributes)(resource.attributes),\n droppedAttributesCount: 0,\n };\n}\nexports.createResource = createResource;\n//# sourceMappingURL=internal.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createExportTraceServiceRequest = void 0;\nconst internal_1 = require(\"./internal\");\nconst common_1 = require(\"../common\");\nconst internal_2 = require(\"../common/internal\");\nconst internal_3 = require(\"../resource/internal\");\nfunction createExportTraceServiceRequest(spans, options) {\n const encoder = (0, common_1.getOtlpEncoder)(options);\n return {\n resourceSpans: spanRecordsToResourceSpans(spans, encoder),\n };\n}\nexports.createExportTraceServiceRequest = createExportTraceServiceRequest;\nfunction createResourceMap(readableSpans) {\n const resourceMap = new Map();\n for (const record of readableSpans) {\n let ilmMap = resourceMap.get(record.resource);\n if (!ilmMap) {\n ilmMap = new Map();\n resourceMap.set(record.resource, ilmMap);\n }\n // TODO this is duplicated in basic tracer. Consolidate on a common helper in core\n const instrumentationLibraryKey = `${record.instrumentationLibrary.name}@${record.instrumentationLibrary.version || ''}:${record.instrumentationLibrary.schemaUrl || ''}`;\n let records = ilmMap.get(instrumentationLibraryKey);\n if (!records) {\n records = [];\n ilmMap.set(instrumentationLibraryKey, records);\n }\n records.push(record);\n }\n return resourceMap;\n}\nfunction spanRecordsToResourceSpans(readableSpans, encoder) {\n const resourceMap = createResourceMap(readableSpans);\n const out = [];\n const entryIterator = resourceMap.entries();\n let entry = entryIterator.next();\n while (!entry.done) {\n const [resource, ilmMap] = entry.value;\n const scopeResourceSpans = [];\n const ilmIterator = ilmMap.values();\n let ilmEntry = ilmIterator.next();\n while (!ilmEntry.done) {\n const scopeSpans = ilmEntry.value;\n if (scopeSpans.length > 0) {\n const spans = scopeSpans.map(readableSpan => (0, internal_1.sdkSpanToOtlpSpan)(readableSpan, encoder));\n scopeResourceSpans.push({\n scope: (0, internal_2.createInstrumentationScope)(scopeSpans[0].instrumentationLibrary),\n spans: spans,\n schemaUrl: scopeSpans[0].instrumentationLibrary.schemaUrl,\n });\n }\n ilmEntry = ilmIterator.next();\n }\n // TODO SDK types don't provide resource schema URL at this time\n const transformedSpans = {\n resource: (0, internal_3.createResource)(resource),\n scopeSpans: scopeResourceSpans,\n schemaUrl: undefined,\n };\n out.push(transformedSpans);\n entry = entryIterator.next();\n }\n return out;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toOtlpSpanEvent = exports.toOtlpLink = exports.sdkSpanToOtlpSpan = void 0;\nconst internal_1 = require(\"../common/internal\");\nfunction sdkSpanToOtlpSpan(span, encoder) {\n var _a;\n const ctx = span.spanContext();\n const status = span.status;\n return {\n traceId: encoder.encodeSpanContext(ctx.traceId),\n spanId: encoder.encodeSpanContext(ctx.spanId),\n parentSpanId: encoder.encodeOptionalSpanContext(span.parentSpanId),\n traceState: (_a = ctx.traceState) === null || _a === void 0 ? void 0 : _a.serialize(),\n name: span.name,\n // Span kind is offset by 1 because the API does not define a value for unset\n kind: span.kind == null ? 0 : span.kind + 1,\n startTimeUnixNano: encoder.encodeHrTime(span.startTime),\n endTimeUnixNano: encoder.encodeHrTime(span.endTime),\n attributes: (0, internal_1.toAttributes)(span.attributes),\n droppedAttributesCount: span.droppedAttributesCount,\n events: span.events.map(event => toOtlpSpanEvent(event, encoder)),\n droppedEventsCount: span.droppedEventsCount,\n status: {\n // API and proto enums share the same values\n code: status.code,\n message: status.message,\n },\n links: span.links.map(link => toOtlpLink(link, encoder)),\n droppedLinksCount: span.droppedLinksCount,\n };\n}\nexports.sdkSpanToOtlpSpan = sdkSpanToOtlpSpan;\nfunction toOtlpLink(link, encoder) {\n var _a;\n return {\n attributes: link.attributes ? (0, internal_1.toAttributes)(link.attributes) : [],\n spanId: encoder.encodeSpanContext(link.context.spanId),\n traceId: encoder.encodeSpanContext(link.context.traceId),\n traceState: (_a = link.context.traceState) === null || _a === void 0 ? void 0 : _a.serialize(),\n droppedAttributesCount: link.droppedAttributesCount || 0,\n };\n}\nexports.toOtlpLink = toOtlpLink;\nfunction toOtlpSpanEvent(timedEvent, encoder) {\n return {\n attributes: timedEvent.attributes\n ? (0, internal_1.toAttributes)(timedEvent.attributes)\n : [],\n name: timedEvent.name,\n timeUnixNano: encoder.encodeHrTime(timedEvent.time),\n droppedAttributesCount: timedEvent.droppedAttributesCount || 0,\n };\n}\nexports.toOtlpSpanEvent = toOtlpSpanEvent;\n//# sourceMappingURL=internal.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ESpanKind = void 0;\n/**\n * SpanKind is the type of span. Can be used to specify additional relationships between spans\n * in addition to a parent/child relationship.\n */\nvar ESpanKind;\n(function (ESpanKind) {\n /** Unspecified. Do NOT use as default. Implementations MAY assume SpanKind to be INTERNAL when receiving UNSPECIFIED. */\n ESpanKind[ESpanKind[\"SPAN_KIND_UNSPECIFIED\"] = 0] = \"SPAN_KIND_UNSPECIFIED\";\n /** Indicates that the span represents an internal operation within an application,\n * as opposed to an operation happening at the boundaries. Default value.\n */\n ESpanKind[ESpanKind[\"SPAN_KIND_INTERNAL\"] = 1] = \"SPAN_KIND_INTERNAL\";\n /** Indicates that the span covers server-side handling of an RPC or other\n * remote network request.\n */\n ESpanKind[ESpanKind[\"SPAN_KIND_SERVER\"] = 2] = \"SPAN_KIND_SERVER\";\n /** Indicates that the span describes a request to some remote service.\n */\n ESpanKind[ESpanKind[\"SPAN_KIND_CLIENT\"] = 3] = \"SPAN_KIND_CLIENT\";\n /** Indicates that the span describes a producer sending a message to a broker.\n * Unlike CLIENT and SERVER, there is often no direct critical path latency relationship\n * between producer and consumer spans. A PRODUCER span ends when the message was accepted\n * by the broker while the logical processing of the message might span a much longer time.\n */\n ESpanKind[ESpanKind[\"SPAN_KIND_PRODUCER\"] = 4] = \"SPAN_KIND_PRODUCER\";\n /** Indicates that the span describes consumer receiving a message from a broker.\n * Like the PRODUCER kind, there is often no direct critical path latency relationship\n * between producer and consumer spans.\n */\n ESpanKind[ESpanKind[\"SPAN_KIND_CONSUMER\"] = 5] = \"SPAN_KIND_CONSUMER\";\n})(ESpanKind = exports.ESpanKind || (exports.ESpanKind = {}));\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.B3MultiPropagator = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst common_1 = require(\"./common\");\nconst constants_1 = require(\"./constants\");\nconst VALID_SAMPLED_VALUES = new Set([true, 'true', 'True', '1', 1]);\nconst VALID_UNSAMPLED_VALUES = new Set([false, 'false', 'False', '0', 0]);\nfunction isValidSampledValue(sampled) {\n return sampled === api_1.TraceFlags.SAMPLED || sampled === api_1.TraceFlags.NONE;\n}\nfunction parseHeader(header) {\n return Array.isArray(header) ? header[0] : header;\n}\nfunction getHeaderValue(carrier, getter, key) {\n const header = getter.get(carrier, key);\n return parseHeader(header);\n}\nfunction getTraceId(carrier, getter) {\n const traceId = getHeaderValue(carrier, getter, constants_1.X_B3_TRACE_ID);\n if (typeof traceId === 'string') {\n return traceId.padStart(32, '0');\n }\n return '';\n}\nfunction getSpanId(carrier, getter) {\n const spanId = getHeaderValue(carrier, getter, constants_1.X_B3_SPAN_ID);\n if (typeof spanId === 'string') {\n return spanId;\n }\n return '';\n}\nfunction getDebug(carrier, getter) {\n const debug = getHeaderValue(carrier, getter, constants_1.X_B3_FLAGS);\n return debug === '1' ? '1' : undefined;\n}\nfunction getTraceFlags(carrier, getter) {\n const traceFlags = getHeaderValue(carrier, getter, constants_1.X_B3_SAMPLED);\n const debug = getDebug(carrier, getter);\n if (debug === '1' || VALID_SAMPLED_VALUES.has(traceFlags)) {\n return api_1.TraceFlags.SAMPLED;\n }\n if (traceFlags === undefined || VALID_UNSAMPLED_VALUES.has(traceFlags)) {\n return api_1.TraceFlags.NONE;\n }\n // This indicates to isValidSampledValue that this is not valid\n return;\n}\n/**\n * Propagator for the B3 multiple-header HTTP format.\n * Based on: https://github.com/openzipkin/b3-propagation\n */\nclass B3MultiPropagator {\n inject(context, carrier, setter) {\n const spanContext = api_1.trace.getSpanContext(context);\n if (!spanContext ||\n !(0, api_1.isSpanContextValid)(spanContext) ||\n (0, core_1.isTracingSuppressed)(context))\n return;\n const debug = context.getValue(common_1.B3_DEBUG_FLAG_KEY);\n setter.set(carrier, constants_1.X_B3_TRACE_ID, spanContext.traceId);\n setter.set(carrier, constants_1.X_B3_SPAN_ID, spanContext.spanId);\n // According to the B3 spec, if the debug flag is set,\n // the sampled flag shouldn't be propagated as well.\n if (debug === '1') {\n setter.set(carrier, constants_1.X_B3_FLAGS, debug);\n }\n else if (spanContext.traceFlags !== undefined) {\n // We set the header only if there is an existing sampling decision.\n // Otherwise we will omit it => Absent.\n setter.set(carrier, constants_1.X_B3_SAMPLED, (api_1.TraceFlags.SAMPLED & spanContext.traceFlags) === api_1.TraceFlags.SAMPLED\n ? '1'\n : '0');\n }\n }\n extract(context, carrier, getter) {\n const traceId = getTraceId(carrier, getter);\n const spanId = getSpanId(carrier, getter);\n const traceFlags = getTraceFlags(carrier, getter);\n const debug = getDebug(carrier, getter);\n if ((0, api_1.isValidTraceId)(traceId) &&\n (0, api_1.isValidSpanId)(spanId) &&\n isValidSampledValue(traceFlags)) {\n context = context.setValue(common_1.B3_DEBUG_FLAG_KEY, debug);\n return api_1.trace.setSpanContext(context, {\n traceId,\n spanId,\n isRemote: true,\n traceFlags,\n });\n }\n return context;\n }\n fields() {\n return [\n constants_1.X_B3_TRACE_ID,\n constants_1.X_B3_SPAN_ID,\n constants_1.X_B3_FLAGS,\n constants_1.X_B3_SAMPLED,\n constants_1.X_B3_PARENT_SPAN_ID,\n ];\n }\n}\nexports.B3MultiPropagator = B3MultiPropagator;\n//# sourceMappingURL=B3MultiPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.B3Propagator = void 0;\nconst core_1 = require(\"@opentelemetry/core\");\nconst B3MultiPropagator_1 = require(\"./B3MultiPropagator\");\nconst B3SinglePropagator_1 = require(\"./B3SinglePropagator\");\nconst constants_1 = require(\"./constants\");\nconst types_1 = require(\"./types\");\n/**\n * Propagator that extracts B3 context in both single and multi-header variants,\n * with configurable injection format defaulting to B3 single-header. Due to\n * the asymmetry in injection and extraction formats this is not suitable to\n * be implemented as a composite propagator.\n * Based on: https://github.com/openzipkin/b3-propagation\n */\nclass B3Propagator {\n constructor(config = {}) {\n this._b3MultiPropagator = new B3MultiPropagator_1.B3MultiPropagator();\n this._b3SinglePropagator = new B3SinglePropagator_1.B3SinglePropagator();\n if (config.injectEncoding === types_1.B3InjectEncoding.MULTI_HEADER) {\n this._inject = this._b3MultiPropagator.inject;\n this._fields = this._b3MultiPropagator.fields();\n }\n else {\n this._inject = this._b3SinglePropagator.inject;\n this._fields = this._b3SinglePropagator.fields();\n }\n }\n inject(context, carrier, setter) {\n if ((0, core_1.isTracingSuppressed)(context)) {\n return;\n }\n this._inject(context, carrier, setter);\n }\n extract(context, carrier, getter) {\n const header = getter.get(carrier, constants_1.B3_CONTEXT_HEADER);\n const b3Context = Array.isArray(header) ? header[0] : header;\n if (b3Context) {\n return this._b3SinglePropagator.extract(context, carrier, getter);\n }\n else {\n return this._b3MultiPropagator.extract(context, carrier, getter);\n }\n }\n fields() {\n return this._fields;\n }\n}\nexports.B3Propagator = B3Propagator;\n//# sourceMappingURL=B3Propagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.B3SinglePropagator = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst common_1 = require(\"./common\");\nconst constants_1 = require(\"./constants\");\nconst B3_CONTEXT_REGEX = /((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/;\nconst PADDING = '0'.repeat(16);\nconst SAMPLED_VALUES = new Set(['d', '1']);\nconst DEBUG_STATE = 'd';\nfunction convertToTraceId128(traceId) {\n return traceId.length === 32 ? traceId : `${PADDING}${traceId}`;\n}\nfunction convertToTraceFlags(samplingState) {\n if (samplingState && SAMPLED_VALUES.has(samplingState)) {\n return api_1.TraceFlags.SAMPLED;\n }\n return api_1.TraceFlags.NONE;\n}\n/**\n * Propagator for the B3 single-header HTTP format.\n * Based on: https://github.com/openzipkin/b3-propagation\n */\nclass B3SinglePropagator {\n inject(context, carrier, setter) {\n const spanContext = api_1.trace.getSpanContext(context);\n if (!spanContext ||\n !(0, api_1.isSpanContextValid)(spanContext) ||\n (0, core_1.isTracingSuppressed)(context))\n return;\n const samplingState = context.getValue(common_1.B3_DEBUG_FLAG_KEY) || spanContext.traceFlags & 0x1;\n const value = `${spanContext.traceId}-${spanContext.spanId}-${samplingState}`;\n setter.set(carrier, constants_1.B3_CONTEXT_HEADER, value);\n }\n extract(context, carrier, getter) {\n const header = getter.get(carrier, constants_1.B3_CONTEXT_HEADER);\n const b3Context = Array.isArray(header) ? header[0] : header;\n if (typeof b3Context !== 'string')\n return context;\n const match = b3Context.match(B3_CONTEXT_REGEX);\n if (!match)\n return context;\n const [, extractedTraceId, spanId, samplingState] = match;\n const traceId = convertToTraceId128(extractedTraceId);\n if (!(0, api_1.isValidTraceId)(traceId) || !(0, api_1.isValidSpanId)(spanId))\n return context;\n const traceFlags = convertToTraceFlags(samplingState);\n if (samplingState === DEBUG_STATE) {\n context = context.setValue(common_1.B3_DEBUG_FLAG_KEY, samplingState);\n }\n return api_1.trace.setSpanContext(context, {\n traceId,\n spanId,\n isRemote: true,\n traceFlags,\n });\n }\n fields() {\n return [constants_1.B3_CONTEXT_HEADER];\n }\n}\nexports.B3SinglePropagator = B3SinglePropagator;\n//# sourceMappingURL=B3SinglePropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.B3_DEBUG_FLAG_KEY = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\n/** shared context for storing an extracted b3 debug flag */\nexports.B3_DEBUG_FLAG_KEY = (0, api_1.createContextKey)('OpenTelemetry Context Key B3 Debug Flag');\n//# sourceMappingURL=common.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.X_B3_FLAGS = exports.X_B3_PARENT_SPAN_ID = exports.X_B3_SAMPLED = exports.X_B3_SPAN_ID = exports.X_B3_TRACE_ID = exports.B3_CONTEXT_HEADER = void 0;\n/** B3 single-header key */\nexports.B3_CONTEXT_HEADER = 'b3';\n/* b3 multi-header keys */\nexports.X_B3_TRACE_ID = 'x-b3-traceid';\nexports.X_B3_SPAN_ID = 'x-b3-spanid';\nexports.X_B3_SAMPLED = 'x-b3-sampled';\nexports.X_B3_PARENT_SPAN_ID = 'x-b3-parentspanid';\nexports.X_B3_FLAGS = 'x-b3-flags';\n//# sourceMappingURL=constants.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.B3InjectEncoding = exports.X_B3_TRACE_ID = exports.X_B3_SPAN_ID = exports.X_B3_SAMPLED = exports.X_B3_PARENT_SPAN_ID = exports.X_B3_FLAGS = exports.B3_CONTEXT_HEADER = exports.B3Propagator = void 0;\nvar B3Propagator_1 = require(\"./B3Propagator\");\nObject.defineProperty(exports, \"B3Propagator\", { enumerable: true, get: function () { return B3Propagator_1.B3Propagator; } });\nvar constants_1 = require(\"./constants\");\nObject.defineProperty(exports, \"B3_CONTEXT_HEADER\", { enumerable: true, get: function () { return constants_1.B3_CONTEXT_HEADER; } });\nObject.defineProperty(exports, \"X_B3_FLAGS\", { enumerable: true, get: function () { return constants_1.X_B3_FLAGS; } });\nObject.defineProperty(exports, \"X_B3_PARENT_SPAN_ID\", { enumerable: true, get: function () { return constants_1.X_B3_PARENT_SPAN_ID; } });\nObject.defineProperty(exports, \"X_B3_SAMPLED\", { enumerable: true, get: function () { return constants_1.X_B3_SAMPLED; } });\nObject.defineProperty(exports, \"X_B3_SPAN_ID\", { enumerable: true, get: function () { return constants_1.X_B3_SPAN_ID; } });\nObject.defineProperty(exports, \"X_B3_TRACE_ID\", { enumerable: true, get: function () { return constants_1.X_B3_TRACE_ID; } });\nvar types_1 = require(\"./types\");\nObject.defineProperty(exports, \"B3InjectEncoding\", { enumerable: true, get: function () { return types_1.B3InjectEncoding; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.B3InjectEncoding = void 0;\n/** Enumeration of B3 inject encodings */\nvar B3InjectEncoding;\n(function (B3InjectEncoding) {\n B3InjectEncoding[B3InjectEncoding[\"SINGLE_HEADER\"] = 0] = \"SINGLE_HEADER\";\n B3InjectEncoding[B3InjectEncoding[\"MULTI_HEADER\"] = 1] = \"MULTI_HEADER\";\n})(B3InjectEncoding = exports.B3InjectEncoding || (exports.B3InjectEncoding = {}));\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JaegerPropagator = exports.UBER_BAGGAGE_HEADER_PREFIX = exports.UBER_TRACE_ID_HEADER = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nexports.UBER_TRACE_ID_HEADER = 'uber-trace-id';\nexports.UBER_BAGGAGE_HEADER_PREFIX = 'uberctx';\n/**\n * Propagates {@link SpanContext} through Trace Context format propagation.\n * {trace-id}:{span-id}:{parent-span-id}:{flags}\n * {trace-id}\n * 64-bit or 128-bit random number in base16 format.\n * Can be variable length, shorter values are 0-padded on the left.\n * Value of 0 is invalid.\n * {span-id}\n * 64-bit random number in base16 format.\n * {parent-span-id}\n * Set to 0 because this field is deprecated.\n * {flags}\n * One byte bitmap, as two hex digits.\n * Inspired by jaeger-client-node project.\n */\nclass JaegerPropagator {\n constructor(config) {\n if (typeof config === 'string') {\n this._jaegerTraceHeader = config;\n this._jaegerBaggageHeaderPrefix = exports.UBER_BAGGAGE_HEADER_PREFIX;\n }\n else {\n this._jaegerTraceHeader =\n (config === null || config === void 0 ? void 0 : config.customTraceHeader) || exports.UBER_TRACE_ID_HEADER;\n this._jaegerBaggageHeaderPrefix =\n (config === null || config === void 0 ? void 0 : config.customBaggageHeaderPrefix) || exports.UBER_BAGGAGE_HEADER_PREFIX;\n }\n }\n inject(context, carrier, setter) {\n const spanContext = api_1.trace.getSpanContext(context);\n const baggage = api_1.propagation.getBaggage(context);\n if (spanContext && (0, core_1.isTracingSuppressed)(context) === false) {\n const traceFlags = `0${(spanContext.traceFlags || api_1.TraceFlags.NONE).toString(16)}`;\n setter.set(carrier, this._jaegerTraceHeader, `${spanContext.traceId}:${spanContext.spanId}:0:${traceFlags}`);\n }\n if (baggage) {\n for (const [key, entry] of baggage.getAllEntries()) {\n setter.set(carrier, `${this._jaegerBaggageHeaderPrefix}-${key}`, encodeURIComponent(entry.value));\n }\n }\n }\n extract(context, carrier, getter) {\n var _a;\n const uberTraceIdHeader = getter.get(carrier, this._jaegerTraceHeader);\n const uberTraceId = Array.isArray(uberTraceIdHeader)\n ? uberTraceIdHeader[0]\n : uberTraceIdHeader;\n const baggageValues = getter\n .keys(carrier)\n .filter(key => key.startsWith(`${this._jaegerBaggageHeaderPrefix}-`))\n .map(key => {\n const value = getter.get(carrier, key);\n return {\n key: key.substring(this._jaegerBaggageHeaderPrefix.length + 1),\n value: Array.isArray(value) ? value[0] : value,\n };\n });\n let newContext = context;\n // if the trace id header is present and valid, inject it into the context\n if (typeof uberTraceId === 'string') {\n const spanContext = deserializeSpanContext(uberTraceId);\n if (spanContext) {\n newContext = api_1.trace.setSpanContext(newContext, spanContext);\n }\n }\n if (baggageValues.length === 0)\n return newContext;\n // if baggage values are present, inject it into the current baggage\n let currentBaggage = (_a = api_1.propagation.getBaggage(context)) !== null && _a !== void 0 ? _a : api_1.propagation.createBaggage();\n for (const baggageEntry of baggageValues) {\n if (baggageEntry.value === undefined)\n continue;\n currentBaggage = currentBaggage.setEntry(baggageEntry.key, {\n value: decodeURIComponent(baggageEntry.value),\n });\n }\n newContext = api_1.propagation.setBaggage(newContext, currentBaggage);\n return newContext;\n }\n fields() {\n return [this._jaegerTraceHeader];\n }\n}\nexports.JaegerPropagator = JaegerPropagator;\nconst VALID_HEX_RE = /^[0-9a-f]{1,2}$/i;\n/**\n * @param {string} serializedString - a serialized span context.\n * @return {SpanContext} - returns a span context represented by the serializedString.\n **/\nfunction deserializeSpanContext(serializedString) {\n const headers = decodeURIComponent(serializedString).split(':');\n if (headers.length !== 4) {\n return null;\n }\n const [_traceId, _spanId, , flags] = headers;\n const traceId = _traceId.padStart(32, '0');\n const spanId = _spanId.padStart(16, '0');\n const traceFlags = VALID_HEX_RE.test(flags) ? parseInt(flags, 16) & 1 : 1;\n return { traceId, spanId, isRemote: true, traceFlags };\n}\n//# sourceMappingURL=JaegerPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UBER_TRACE_ID_HEADER = exports.UBER_BAGGAGE_HEADER_PREFIX = exports.JaegerPropagator = void 0;\nvar JaegerPropagator_1 = require(\"./JaegerPropagator\");\nObject.defineProperty(exports, \"JaegerPropagator\", { enumerable: true, get: function () { return JaegerPropagator_1.JaegerPropagator; } });\nObject.defineProperty(exports, \"UBER_BAGGAGE_HEADER_PREFIX\", { enumerable: true, get: function () { return JaegerPropagator_1.UBER_BAGGAGE_HEADER_PREFIX; } });\nObject.defineProperty(exports, \"UBER_TRACE_ID_HEADER\", { enumerable: true, get: function () { return JaegerPropagator_1.UBER_TRACE_ID_HEADER; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Resource = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst platform_1 = require(\"./platform\");\n/**\n * A Resource describes the entity for which a signals (metrics or trace) are\n * collected.\n */\nclass Resource {\n constructor(\n /**\n * A dictionary of attributes with string keys and values that provide\n * information about the entity as numbers, strings or booleans\n * TODO: Consider to add check/validation on attributes.\n */\n attributes, asyncAttributesPromise) {\n var _a;\n this._attributes = attributes;\n this.asyncAttributesPending = asyncAttributesPromise != null;\n this._syncAttributes = (_a = this._attributes) !== null && _a !== void 0 ? _a : {};\n this._asyncAttributesPromise = asyncAttributesPromise === null || asyncAttributesPromise === void 0 ? void 0 : asyncAttributesPromise.then(asyncAttributes => {\n this._attributes = Object.assign({}, this._attributes, asyncAttributes);\n this.asyncAttributesPending = false;\n return asyncAttributes;\n }, err => {\n api_1.diag.debug(\"a resource's async attributes promise rejected: %s\", err);\n this.asyncAttributesPending = false;\n return {};\n });\n }\n /**\n * Returns an empty Resource\n */\n static empty() {\n return Resource.EMPTY;\n }\n /**\n * Returns a Resource that identifies the SDK in use.\n */\n static default() {\n return new Resource({\n [semantic_conventions_1.SEMRESATTRS_SERVICE_NAME]: (0, platform_1.defaultServiceName)(),\n [semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE]: core_1.SDK_INFO[semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE],\n [semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_NAME]: core_1.SDK_INFO[semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_NAME],\n [semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_VERSION]: core_1.SDK_INFO[semantic_conventions_1.SEMRESATTRS_TELEMETRY_SDK_VERSION],\n });\n }\n get attributes() {\n var _a;\n if (this.asyncAttributesPending) {\n api_1.diag.error('Accessing resource attributes before async attributes settled');\n }\n return (_a = this._attributes) !== null && _a !== void 0 ? _a : {};\n }\n /**\n * Returns a promise that will never be rejected. Resolves when all async attributes have finished being added to\n * this Resource's attributes. This is useful in exporters to block until resource detection\n * has finished.\n */\n async waitForAsyncAttributes() {\n if (this.asyncAttributesPending) {\n await this._asyncAttributesPromise;\n }\n }\n /**\n * Returns a new, merged {@link Resource} by merging the current Resource\n * with the other Resource. In case of a collision, other Resource takes\n * precedence.\n *\n * @param other the Resource that will be merged with this.\n * @returns the newly merged Resource.\n */\n merge(other) {\n var _a;\n if (!other)\n return this;\n // SpanAttributes from other resource overwrite attributes from this resource.\n const mergedSyncAttributes = Object.assign(Object.assign({}, this._syncAttributes), ((_a = other._syncAttributes) !== null && _a !== void 0 ? _a : other.attributes));\n if (!this._asyncAttributesPromise &&\n !other._asyncAttributesPromise) {\n return new Resource(mergedSyncAttributes);\n }\n const mergedAttributesPromise = Promise.all([\n this._asyncAttributesPromise,\n other._asyncAttributesPromise,\n ]).then(([thisAsyncAttributes, otherAsyncAttributes]) => {\n var _a;\n return Object.assign(Object.assign(Object.assign(Object.assign({}, this._syncAttributes), thisAsyncAttributes), ((_a = other._syncAttributes) !== null && _a !== void 0 ? _a : other.attributes)), otherAsyncAttributes);\n });\n return new Resource(mergedSyncAttributes, mergedAttributesPromise);\n }\n}\nexports.Resource = Resource;\nResource.EMPTY = new Resource({});\n//# sourceMappingURL=Resource.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.detectResourcesSync = exports.detectResources = void 0;\nconst Resource_1 = require(\"./Resource\");\nconst api_1 = require(\"@opentelemetry/api\");\nconst utils_1 = require(\"./utils\");\n/**\n * Runs all resource detectors and returns the results merged into a single Resource. Promise\n * does not resolve until all the underlying detectors have resolved, unlike\n * detectResourcesSync.\n *\n * @deprecated use detectResourcesSync() instead.\n * @param config Configuration for resource detection\n */\nconst detectResources = async (config = {}) => {\n const resources = await Promise.all((config.detectors || []).map(async (d) => {\n try {\n const resource = await d.detect(config);\n api_1.diag.debug(`${d.constructor.name} found resource.`, resource);\n return resource;\n }\n catch (e) {\n api_1.diag.debug(`${d.constructor.name} failed: ${e.message}`);\n return Resource_1.Resource.empty();\n }\n }));\n // Future check if verbose logging is enabled issue #1903\n logResources(resources);\n return resources.reduce((acc, resource) => acc.merge(resource), Resource_1.Resource.empty());\n};\nexports.detectResources = detectResources;\n/**\n * Runs all resource detectors synchronously, merging their results. In case of attribute collision later resources will take precedence.\n *\n * @param config Configuration for resource detection\n */\nconst detectResourcesSync = (config = {}) => {\n var _a;\n const resources = ((_a = config.detectors) !== null && _a !== void 0 ? _a : []).map((d) => {\n try {\n const resourceOrPromise = d.detect(config);\n let resource;\n if ((0, utils_1.isPromiseLike)(resourceOrPromise)) {\n const createPromise = async () => {\n const resolvedResource = await resourceOrPromise;\n return resolvedResource.attributes;\n };\n resource = new Resource_1.Resource({}, createPromise());\n }\n else {\n resource = resourceOrPromise;\n }\n if (resource.waitForAsyncAttributes) {\n void resource\n .waitForAsyncAttributes()\n .then(() => api_1.diag.debug(`${d.constructor.name} found resource.`, resource));\n }\n else {\n api_1.diag.debug(`${d.constructor.name} found resource.`, resource);\n }\n return resource;\n }\n catch (e) {\n api_1.diag.error(`${d.constructor.name} failed: ${e.message}`);\n return Resource_1.Resource.empty();\n }\n });\n const mergedResources = resources.reduce((acc, resource) => acc.merge(resource), Resource_1.Resource.empty());\n if (mergedResources.waitForAsyncAttributes) {\n void mergedResources.waitForAsyncAttributes().then(() => {\n // Future check if verbose logging is enabled issue #1903\n logResources(resources);\n });\n }\n return mergedResources;\n};\nexports.detectResourcesSync = detectResourcesSync;\n/**\n * Writes debug information about the detected resources to the logger defined in the resource detection config, if one is provided.\n *\n * @param resources The array of {@link Resource} that should be logged. Empty entries will be ignored.\n */\nconst logResources = (resources) => {\n resources.forEach(resource => {\n // Print only populated resources\n if (Object.keys(resource.attributes).length > 0) {\n const resourceDebugString = JSON.stringify(resource.attributes, null, 4);\n api_1.diag.verbose(resourceDebugString);\n }\n });\n};\n//# sourceMappingURL=detect-resources.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.browserDetector = void 0;\nconst BrowserDetectorSync_1 = require(\"./BrowserDetectorSync\");\n/**\n * BrowserDetector will be used to detect the resources related to browser.\n */\nclass BrowserDetector {\n detect(config) {\n return Promise.resolve(BrowserDetectorSync_1.browserDetectorSync.detect(config));\n }\n}\nexports.browserDetector = new BrowserDetector();\n//# sourceMappingURL=BrowserDetector.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.browserDetectorSync = void 0;\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\nconst api_1 = require(\"@opentelemetry/api\");\nconst Resource_1 = require(\"../Resource\");\n/**\n * BrowserDetectorSync will be used to detect the resources related to browser.\n */\nclass BrowserDetectorSync {\n detect(config) {\n var _a, _b, _c;\n const isBrowser = typeof navigator !== 'undefined' &&\n ((_b = (_a = global.process) === null || _a === void 0 ? void 0 : _a.versions) === null || _b === void 0 ? void 0 : _b.node) === undefined && // Node.js v21 adds `navigator`\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore don't have Bun types\n ((_c = global.Bun) === null || _c === void 0 ? void 0 : _c.version) === undefined; // Bun (bun.sh) defines `navigator`\n if (!isBrowser) {\n return Resource_1.Resource.empty();\n }\n const browserResource = {\n [semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_NAME]: 'browser',\n [semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION]: 'Web Browser',\n [semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_VERSION]: navigator.userAgent,\n };\n return this._getResourceAttributes(browserResource, config);\n }\n /**\n * Validates process resource attribute map from process variables\n *\n * @param browserResource The un-sanitized resource attributes from process as key/value pairs.\n * @param config: Config\n * @returns The sanitized resource attributes.\n */\n _getResourceAttributes(browserResource, _config) {\n if (browserResource[semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_VERSION] === '') {\n api_1.diag.debug('BrowserDetector failed: Unable to find required browser resources. ');\n return Resource_1.Resource.empty();\n }\n else {\n return new Resource_1.Resource(Object.assign({}, browserResource));\n }\n }\n}\nexports.browserDetectorSync = new BrowserDetectorSync();\n//# sourceMappingURL=BrowserDetectorSync.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.envDetector = void 0;\nconst EnvDetectorSync_1 = require(\"./EnvDetectorSync\");\n/**\n * EnvDetector can be used to detect the presence of and create a Resource\n * from the OTEL_RESOURCE_ATTRIBUTES environment variable.\n */\nclass EnvDetector {\n /**\n * Returns a {@link Resource} populated with attributes from the\n * OTEL_RESOURCE_ATTRIBUTES environment variable. Note this is an async\n * function to conform to the Detector interface.\n *\n * @param config The resource detection config\n */\n detect(config) {\n return Promise.resolve(EnvDetectorSync_1.envDetectorSync.detect(config));\n }\n}\nexports.envDetector = new EnvDetector();\n//# sourceMappingURL=EnvDetector.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.envDetectorSync = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\nconst Resource_1 = require(\"../Resource\");\n/**\n * EnvDetectorSync can be used to detect the presence of and create a Resource\n * from the OTEL_RESOURCE_ATTRIBUTES environment variable.\n */\nclass EnvDetectorSync {\n constructor() {\n // Type, attribute keys, and attribute values should not exceed 256 characters.\n this._MAX_LENGTH = 255;\n // OTEL_RESOURCE_ATTRIBUTES is a comma-separated list of attributes.\n this._COMMA_SEPARATOR = ',';\n // OTEL_RESOURCE_ATTRIBUTES contains key value pair separated by '='.\n this._LABEL_KEY_VALUE_SPLITTER = '=';\n this._ERROR_MESSAGE_INVALID_CHARS = 'should be a ASCII string with a length greater than 0 and not exceed ' +\n this._MAX_LENGTH +\n ' characters.';\n this._ERROR_MESSAGE_INVALID_VALUE = 'should be a ASCII string with a length not exceed ' +\n this._MAX_LENGTH +\n ' characters.';\n }\n /**\n * Returns a {@link Resource} populated with attributes from the\n * OTEL_RESOURCE_ATTRIBUTES environment variable. Note this is an async\n * function to conform to the Detector interface.\n *\n * @param config The resource detection config\n */\n detect(_config) {\n const attributes = {};\n const env = (0, core_1.getEnv)();\n const rawAttributes = env.OTEL_RESOURCE_ATTRIBUTES;\n const serviceName = env.OTEL_SERVICE_NAME;\n if (rawAttributes) {\n try {\n const parsedAttributes = this._parseResourceAttributes(rawAttributes);\n Object.assign(attributes, parsedAttributes);\n }\n catch (e) {\n api_1.diag.debug(`EnvDetector failed: ${e.message}`);\n }\n }\n if (serviceName) {\n attributes[semantic_conventions_1.SEMRESATTRS_SERVICE_NAME] = serviceName;\n }\n return new Resource_1.Resource(attributes);\n }\n /**\n * Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment\n * variable.\n *\n * OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes describing\n * the source in more detail, e.g. “key1=val1,key2=val2”. Domain names and\n * paths are accepted as attribute keys. Values may be quoted or unquoted in\n * general. If a value contains whitespace, =, or \" characters, it must\n * always be quoted.\n *\n * @param rawEnvAttributes The resource attributes as a comma-separated list\n * of key/value pairs.\n * @returns The sanitized resource attributes.\n */\n _parseResourceAttributes(rawEnvAttributes) {\n if (!rawEnvAttributes)\n return {};\n const attributes = {};\n const rawAttributes = rawEnvAttributes.split(this._COMMA_SEPARATOR, -1);\n for (const rawAttribute of rawAttributes) {\n const keyValuePair = rawAttribute.split(this._LABEL_KEY_VALUE_SPLITTER, -1);\n if (keyValuePair.length !== 2) {\n continue;\n }\n let [key, value] = keyValuePair;\n // Leading and trailing whitespaces are trimmed.\n key = key.trim();\n value = value.trim().split(/^\"|\"$/).join('');\n if (!this._isValidAndNotEmpty(key)) {\n throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);\n }\n if (!this._isValid(value)) {\n throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);\n }\n attributes[key] = decodeURIComponent(value);\n }\n return attributes;\n }\n /**\n * Determines whether the given String is a valid printable ASCII string with\n * a length not exceed _MAX_LENGTH characters.\n *\n * @param str The String to be validated.\n * @returns Whether the String is valid.\n */\n _isValid(name) {\n return name.length <= this._MAX_LENGTH && this._isBaggageOctetString(name);\n }\n // https://www.w3.org/TR/baggage/#definition\n _isBaggageOctetString(str) {\n for (let i = 0; i < str.length; i++) {\n const ch = str.charCodeAt(i);\n if (ch < 0x21 || ch === 0x2c || ch === 0x3b || ch === 0x5c || ch > 0x7e) {\n return false;\n }\n }\n return true;\n }\n /**\n * Determines whether the given String is a valid printable ASCII string with\n * a length greater than 0 and not exceed _MAX_LENGTH characters.\n *\n * @param str The String to be validated.\n * @returns Whether the String is valid and not empty.\n */\n _isValidAndNotEmpty(str) {\n return str.length > 0 && this._isValid(str);\n }\n}\nexports.envDetectorSync = new EnvDetectorSync();\n//# sourceMappingURL=EnvDetectorSync.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.envDetectorSync = exports.browserDetectorSync = exports.envDetector = exports.browserDetector = exports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = void 0;\nvar platform_1 = require(\"./platform\");\nObject.defineProperty(exports, \"hostDetector\", { enumerable: true, get: function () { return platform_1.hostDetector; } });\nObject.defineProperty(exports, \"hostDetectorSync\", { enumerable: true, get: function () { return platform_1.hostDetectorSync; } });\nObject.defineProperty(exports, \"osDetector\", { enumerable: true, get: function () { return platform_1.osDetector; } });\nObject.defineProperty(exports, \"osDetectorSync\", { enumerable: true, get: function () { return platform_1.osDetectorSync; } });\nObject.defineProperty(exports, \"processDetector\", { enumerable: true, get: function () { return platform_1.processDetector; } });\nObject.defineProperty(exports, \"processDetectorSync\", { enumerable: true, get: function () { return platform_1.processDetectorSync; } });\nObject.defineProperty(exports, \"serviceInstanceIdDetectorSync\", { enumerable: true, get: function () { return platform_1.serviceInstanceIdDetectorSync; } });\nvar BrowserDetector_1 = require(\"./BrowserDetector\");\nObject.defineProperty(exports, \"browserDetector\", { enumerable: true, get: function () { return BrowserDetector_1.browserDetector; } });\nvar EnvDetector_1 = require(\"./EnvDetector\");\nObject.defineProperty(exports, \"envDetector\", { enumerable: true, get: function () { return EnvDetector_1.envDetector; } });\nvar BrowserDetectorSync_1 = require(\"./BrowserDetectorSync\");\nObject.defineProperty(exports, \"browserDetectorSync\", { enumerable: true, get: function () { return BrowserDetectorSync_1.browserDetectorSync; } });\nvar EnvDetectorSync_1 = require(\"./EnvDetectorSync\");\nObject.defineProperty(exports, \"envDetectorSync\", { enumerable: true, get: function () { return EnvDetectorSync_1.envDetectorSync; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar node_1 = require(\"./node\");\nObject.defineProperty(exports, \"hostDetector\", { enumerable: true, get: function () { return node_1.hostDetector; } });\nObject.defineProperty(exports, \"hostDetectorSync\", { enumerable: true, get: function () { return node_1.hostDetectorSync; } });\nObject.defineProperty(exports, \"osDetector\", { enumerable: true, get: function () { return node_1.osDetector; } });\nObject.defineProperty(exports, \"osDetectorSync\", { enumerable: true, get: function () { return node_1.osDetectorSync; } });\nObject.defineProperty(exports, \"processDetector\", { enumerable: true, get: function () { return node_1.processDetector; } });\nObject.defineProperty(exports, \"processDetectorSync\", { enumerable: true, get: function () { return node_1.processDetectorSync; } });\nObject.defineProperty(exports, \"serviceInstanceIdDetectorSync\", { enumerable: true, get: function () { return node_1.serviceInstanceIdDetectorSync; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hostDetector = void 0;\nconst HostDetectorSync_1 = require(\"./HostDetectorSync\");\n/**\n * HostDetector detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetector {\n detect(_config) {\n return Promise.resolve(HostDetectorSync_1.hostDetectorSync.detect(_config));\n }\n}\nexports.hostDetector = new HostDetector();\n//# sourceMappingURL=HostDetector.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hostDetectorSync = void 0;\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\nconst Resource_1 = require(\"../../../Resource\");\nconst os_1 = require(\"os\");\nconst utils_1 = require(\"./utils\");\nconst getMachineId_1 = require(\"./machine-id/getMachineId\");\n/**\n * HostDetectorSync detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetectorSync {\n detect(_config) {\n const attributes = {\n [semantic_conventions_1.SEMRESATTRS_HOST_NAME]: (0, os_1.hostname)(),\n [semantic_conventions_1.SEMRESATTRS_HOST_ARCH]: (0, utils_1.normalizeArch)((0, os_1.arch)()),\n };\n return new Resource_1.Resource(attributes, this._getAsyncAttributes());\n }\n _getAsyncAttributes() {\n return (0, getMachineId_1.getMachineId)().then(machineId => {\n const attributes = {};\n if (machineId) {\n attributes[semantic_conventions_1.SEMRESATTRS_HOST_ID] = machineId;\n }\n return attributes;\n });\n }\n}\nexports.hostDetectorSync = new HostDetectorSync();\n//# sourceMappingURL=HostDetectorSync.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.osDetector = void 0;\nconst OSDetectorSync_1 = require(\"./OSDetectorSync\");\n/**\n * OSDetector detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetector {\n detect(_config) {\n return Promise.resolve(OSDetectorSync_1.osDetectorSync.detect(_config));\n }\n}\nexports.osDetector = new OSDetector();\n//# sourceMappingURL=OSDetector.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.osDetectorSync = void 0;\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\nconst Resource_1 = require(\"../../../Resource\");\nconst os_1 = require(\"os\");\nconst utils_1 = require(\"./utils\");\n/**\n * OSDetectorSync detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetectorSync {\n detect(_config) {\n const attributes = {\n [semantic_conventions_1.SEMRESATTRS_OS_TYPE]: (0, utils_1.normalizeType)((0, os_1.platform)()),\n [semantic_conventions_1.SEMRESATTRS_OS_VERSION]: (0, os_1.release)(),\n };\n return new Resource_1.Resource(attributes);\n }\n}\nexports.osDetectorSync = new OSDetectorSync();\n//# sourceMappingURL=OSDetectorSync.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.processDetector = void 0;\nconst ProcessDetectorSync_1 = require(\"./ProcessDetectorSync\");\n/**\n * ProcessDetector will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetector {\n detect(config) {\n return Promise.resolve(ProcessDetectorSync_1.processDetectorSync.detect(config));\n }\n}\nexports.processDetector = new ProcessDetector();\n//# sourceMappingURL=ProcessDetector.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.processDetectorSync = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\nconst Resource_1 = require(\"../../../Resource\");\nconst os = require(\"os\");\n/**\n * ProcessDetectorSync will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetectorSync {\n detect(_config) {\n const attributes = {\n [semantic_conventions_1.SEMRESATTRS_PROCESS_PID]: process.pid,\n [semantic_conventions_1.SEMRESATTRS_PROCESS_EXECUTABLE_NAME]: process.title,\n [semantic_conventions_1.SEMRESATTRS_PROCESS_EXECUTABLE_PATH]: process.execPath,\n [semantic_conventions_1.SEMRESATTRS_PROCESS_COMMAND_ARGS]: [\n process.argv[0],\n ...process.execArgv,\n ...process.argv.slice(1),\n ],\n [semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_VERSION]: process.versions.node,\n [semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_NAME]: 'nodejs',\n [semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',\n };\n if (process.argv.length > 1) {\n attributes[semantic_conventions_1.SEMRESATTRS_PROCESS_COMMAND] = process.argv[1];\n }\n try {\n const userInfo = os.userInfo();\n attributes[semantic_conventions_1.SEMRESATTRS_PROCESS_OWNER] = userInfo.username;\n }\n catch (e) {\n api_1.diag.debug(`error obtaining process owner: ${e}`);\n }\n return new Resource_1.Resource(attributes);\n }\n}\nexports.processDetectorSync = new ProcessDetectorSync();\n//# sourceMappingURL=ProcessDetectorSync.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serviceInstanceIdDetectorSync = void 0;\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\nconst Resource_1 = require(\"../../../Resource\");\nconst crypto_1 = require(\"crypto\");\n/**\n * ServiceInstanceIdDetectorSync detects the resources related to the service instance ID.\n */\nclass ServiceInstanceIdDetectorSync {\n detect(_config) {\n const attributes = {\n [semantic_conventions_1.SEMRESATTRS_SERVICE_INSTANCE_ID]: (0, crypto_1.randomUUID)(),\n };\n return new Resource_1.Resource(attributes);\n }\n}\n/**\n * @experimental\n */\nexports.serviceInstanceIdDetectorSync = new ServiceInstanceIdDetectorSync();\n//# sourceMappingURL=ServiceInstanceIdDetectorSync.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = void 0;\nvar HostDetector_1 = require(\"./HostDetector\");\nObject.defineProperty(exports, \"hostDetector\", { enumerable: true, get: function () { return HostDetector_1.hostDetector; } });\nvar HostDetectorSync_1 = require(\"./HostDetectorSync\");\nObject.defineProperty(exports, \"hostDetectorSync\", { enumerable: true, get: function () { return HostDetectorSync_1.hostDetectorSync; } });\nvar OSDetector_1 = require(\"./OSDetector\");\nObject.defineProperty(exports, \"osDetector\", { enumerable: true, get: function () { return OSDetector_1.osDetector; } });\nvar OSDetectorSync_1 = require(\"./OSDetectorSync\");\nObject.defineProperty(exports, \"osDetectorSync\", { enumerable: true, get: function () { return OSDetectorSync_1.osDetectorSync; } });\nvar ProcessDetector_1 = require(\"./ProcessDetector\");\nObject.defineProperty(exports, \"processDetector\", { enumerable: true, get: function () { return ProcessDetector_1.processDetector; } });\nvar ProcessDetectorSync_1 = require(\"./ProcessDetectorSync\");\nObject.defineProperty(exports, \"processDetectorSync\", { enumerable: true, get: function () { return ProcessDetectorSync_1.processDetectorSync; } });\nvar ServiceInstanceIdDetectorSync_1 = require(\"./ServiceInstanceIdDetectorSync\");\nObject.defineProperty(exports, \"serviceInstanceIdDetectorSync\", { enumerable: true, get: function () { return ServiceInstanceIdDetectorSync_1.serviceInstanceIdDetectorSync; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.execAsync = void 0;\nconst child_process = require(\"child_process\");\nconst util = require(\"util\");\nexports.execAsync = util.promisify(child_process.exec);\n//# sourceMappingURL=execAsync.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst fs_1 = require(\"fs\");\nconst execAsync_1 = require(\"./execAsync\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n try {\n const result = await fs_1.promises.readFile('/etc/hostid', { encoding: 'utf8' });\n return result.trim();\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n try {\n const result = await (0, execAsync_1.execAsync)('kenv -q smbios.system.uuid');\n return result.stdout.trim();\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n return '';\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-bsd.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst execAsync_1 = require(\"./execAsync\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n try {\n const result = await (0, execAsync_1.execAsync)('ioreg -rd1 -c \"IOPlatformExpertDevice\"');\n const idLine = result.stdout\n .split('\\n')\n .find(line => line.includes('IOPlatformUUID'));\n if (!idLine) {\n return '';\n }\n const parts = idLine.split('\" = \"');\n if (parts.length === 2) {\n return parts[1].slice(0, -1);\n }\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n return '';\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-darwin.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst fs_1 = require(\"fs\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];\n for (const path of paths) {\n try {\n const result = await fs_1.promises.readFile(path, { encoding: 'utf8' });\n return result.trim();\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n }\n return '';\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-linux.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n api_1.diag.debug('could not read machine-id: unsupported platform');\n return '';\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-unsupported.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\nconst process = require(\"process\");\nconst execAsync_1 = require(\"./execAsync\");\nconst api_1 = require(\"@opentelemetry/api\");\nasync function getMachineId() {\n const args = 'QUERY HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Cryptography /v MachineGuid';\n let command = '%windir%\\\\System32\\\\REG.exe';\n if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {\n command = '%windir%\\\\sysnative\\\\cmd.exe /c ' + command;\n }\n try {\n const result = await (0, execAsync_1.execAsync)(`${command} ${args}`);\n const parts = result.stdout.split('REG_SZ');\n if (parts.length === 2) {\n return parts[1].trim();\n }\n }\n catch (e) {\n api_1.diag.debug(`error reading machine id: ${e}`);\n }\n return '';\n}\nexports.getMachineId = getMachineId;\n//# sourceMappingURL=getMachineId-win.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMachineId = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst process = require(\"process\");\nlet getMachineId;\nexports.getMachineId = getMachineId;\nswitch (process.platform) {\n case 'darwin':\n (exports.getMachineId = getMachineId = require('./getMachineId-darwin').getMachineId);\n break;\n case 'linux':\n (exports.getMachineId = getMachineId = require('./getMachineId-linux').getMachineId);\n break;\n case 'freebsd':\n (exports.getMachineId = getMachineId = require('./getMachineId-bsd').getMachineId);\n break;\n case 'win32':\n (exports.getMachineId = getMachineId = require('./getMachineId-win').getMachineId);\n break;\n default:\n (exports.getMachineId = getMachineId = require('./getMachineId-unsupported').getMachineId);\n}\n//# sourceMappingURL=getMachineId.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.normalizeType = exports.normalizeArch = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst normalizeArch = (nodeArchString) => {\n // Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md\n switch (nodeArchString) {\n case 'arm':\n return 'arm32';\n case 'ppc':\n return 'ppc32';\n case 'x64':\n return 'amd64';\n default:\n return nodeArchString;\n }\n};\nexports.normalizeArch = normalizeArch;\nconst normalizeType = (nodePlatform) => {\n // Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md\n switch (nodePlatform) {\n case 'sunos':\n return 'solaris';\n case 'win32':\n return 'windows';\n default:\n return nodePlatform;\n }\n};\nexports.normalizeType = normalizeType;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.detectResources = exports.detectResourcesSync = exports.serviceInstanceIdDetectorSync = exports.processDetectorSync = exports.processDetector = exports.osDetectorSync = exports.osDetector = exports.hostDetectorSync = exports.hostDetector = exports.envDetectorSync = exports.envDetector = exports.browserDetectorSync = exports.browserDetector = exports.defaultServiceName = exports.Resource = void 0;\nvar Resource_1 = require(\"./Resource\");\nObject.defineProperty(exports, \"Resource\", { enumerable: true, get: function () { return Resource_1.Resource; } });\nvar platform_1 = require(\"./platform\");\nObject.defineProperty(exports, \"defaultServiceName\", { enumerable: true, get: function () { return platform_1.defaultServiceName; } });\nvar detectors_1 = require(\"./detectors\");\nObject.defineProperty(exports, \"browserDetector\", { enumerable: true, get: function () { return detectors_1.browserDetector; } });\nObject.defineProperty(exports, \"browserDetectorSync\", { enumerable: true, get: function () { return detectors_1.browserDetectorSync; } });\nObject.defineProperty(exports, \"envDetector\", { enumerable: true, get: function () { return detectors_1.envDetector; } });\nObject.defineProperty(exports, \"envDetectorSync\", { enumerable: true, get: function () { return detectors_1.envDetectorSync; } });\nObject.defineProperty(exports, \"hostDetector\", { enumerable: true, get: function () { return detectors_1.hostDetector; } });\nObject.defineProperty(exports, \"hostDetectorSync\", { enumerable: true, get: function () { return detectors_1.hostDetectorSync; } });\nObject.defineProperty(exports, \"osDetector\", { enumerable: true, get: function () { return detectors_1.osDetector; } });\nObject.defineProperty(exports, \"osDetectorSync\", { enumerable: true, get: function () { return detectors_1.osDetectorSync; } });\nObject.defineProperty(exports, \"processDetector\", { enumerable: true, get: function () { return detectors_1.processDetector; } });\nObject.defineProperty(exports, \"processDetectorSync\", { enumerable: true, get: function () { return detectors_1.processDetectorSync; } });\nObject.defineProperty(exports, \"serviceInstanceIdDetectorSync\", { enumerable: true, get: function () { return detectors_1.serviceInstanceIdDetectorSync; } });\nvar detect_resources_1 = require(\"./detect-resources\");\nObject.defineProperty(exports, \"detectResourcesSync\", { enumerable: true, get: function () { return detect_resources_1.detectResourcesSync; } });\nObject.defineProperty(exports, \"detectResources\", { enumerable: true, get: function () { return detect_resources_1.detectResources; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultServiceName = void 0;\nvar node_1 = require(\"./node\");\nObject.defineProperty(exports, \"defaultServiceName\", { enumerable: true, get: function () { return node_1.defaultServiceName; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultServiceName = void 0;\nfunction defaultServiceName() {\n return `unknown_service:${process.argv0}`;\n}\nexports.defaultServiceName = defaultServiceName;\n//# sourceMappingURL=default-service-name.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultServiceName = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar default_service_name_1 = require(\"./default-service-name\");\nObject.defineProperty(exports, \"defaultServiceName\", { enumerable: true, get: function () { return default_service_name_1.defaultServiceName; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPromiseLike = void 0;\nconst isPromiseLike = (val) => {\n return (val !== null && typeof val === 'object' && typeof val.then === 'function');\n};\nexports.isPromiseLike = isPromiseLike;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isValidName = exports.isDescriptorCompatibleWith = exports.createInstrumentDescriptorWithView = exports.createInstrumentDescriptor = exports.InstrumentType = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst utils_1 = require(\"./utils\");\n/**\n * Supported types of metric instruments.\n */\nvar InstrumentType;\n(function (InstrumentType) {\n InstrumentType[\"COUNTER\"] = \"COUNTER\";\n InstrumentType[\"GAUGE\"] = \"GAUGE\";\n InstrumentType[\"HISTOGRAM\"] = \"HISTOGRAM\";\n InstrumentType[\"UP_DOWN_COUNTER\"] = \"UP_DOWN_COUNTER\";\n InstrumentType[\"OBSERVABLE_COUNTER\"] = \"OBSERVABLE_COUNTER\";\n InstrumentType[\"OBSERVABLE_GAUGE\"] = \"OBSERVABLE_GAUGE\";\n InstrumentType[\"OBSERVABLE_UP_DOWN_COUNTER\"] = \"OBSERVABLE_UP_DOWN_COUNTER\";\n})(InstrumentType = exports.InstrumentType || (exports.InstrumentType = {}));\nfunction createInstrumentDescriptor(name, type, options) {\n var _a, _b, _c, _d;\n if (!isValidName(name)) {\n api_1.diag.warn(`Invalid metric name: \"${name}\". The metric name should be a ASCII string with a length no greater than 255 characters.`);\n }\n return {\n name,\n type,\n description: (_a = options === null || options === void 0 ? void 0 : options.description) !== null && _a !== void 0 ? _a : '',\n unit: (_b = options === null || options === void 0 ? void 0 : options.unit) !== null && _b !== void 0 ? _b : '',\n valueType: (_c = options === null || options === void 0 ? void 0 : options.valueType) !== null && _c !== void 0 ? _c : api_1.ValueType.DOUBLE,\n advice: (_d = options === null || options === void 0 ? void 0 : options.advice) !== null && _d !== void 0 ? _d : {},\n };\n}\nexports.createInstrumentDescriptor = createInstrumentDescriptor;\nfunction createInstrumentDescriptorWithView(view, instrument) {\n var _a, _b;\n return {\n name: (_a = view.name) !== null && _a !== void 0 ? _a : instrument.name,\n description: (_b = view.description) !== null && _b !== void 0 ? _b : instrument.description,\n type: instrument.type,\n unit: instrument.unit,\n valueType: instrument.valueType,\n advice: instrument.advice,\n };\n}\nexports.createInstrumentDescriptorWithView = createInstrumentDescriptorWithView;\nfunction isDescriptorCompatibleWith(descriptor, otherDescriptor) {\n // Names are case-insensitive strings.\n return ((0, utils_1.equalsCaseInsensitive)(descriptor.name, otherDescriptor.name) &&\n descriptor.unit === otherDescriptor.unit &&\n descriptor.type === otherDescriptor.type &&\n descriptor.valueType === otherDescriptor.valueType);\n}\nexports.isDescriptorCompatibleWith = isDescriptorCompatibleWith;\n// ASCII string with a length no greater than 255 characters.\n// NB: the first character counted separately from the rest.\nconst NAME_REGEXP = /^[a-z][a-z0-9_.\\-/]{0,254}$/i;\nfunction isValidName(name) {\n return name.match(NAME_REGEXP) != null;\n}\nexports.isValidName = isValidName;\n//# sourceMappingURL=InstrumentDescriptor.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isObservableInstrument = exports.ObservableUpDownCounterInstrument = exports.ObservableGaugeInstrument = exports.ObservableCounterInstrument = exports.ObservableInstrument = exports.HistogramInstrument = exports.GaugeInstrument = exports.CounterInstrument = exports.UpDownCounterInstrument = exports.SyncInstrument = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nclass SyncInstrument {\n constructor(_writableMetricStorage, _descriptor) {\n this._writableMetricStorage = _writableMetricStorage;\n this._descriptor = _descriptor;\n }\n _record(value, attributes = {}, context = api_1.context.active()) {\n if (typeof value !== 'number') {\n api_1.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${value}`);\n return;\n }\n if (this._descriptor.valueType === api_1.ValueType.INT &&\n !Number.isInteger(value)) {\n api_1.diag.warn(`INT value type cannot accept a floating-point value for ${this._descriptor.name}, ignoring the fractional digits.`);\n value = Math.trunc(value);\n // ignore non-finite values.\n if (!Number.isInteger(value)) {\n return;\n }\n }\n this._writableMetricStorage.record(value, attributes, context, (0, core_1.millisToHrTime)(Date.now()));\n }\n}\nexports.SyncInstrument = SyncInstrument;\n/**\n * The class implements {@link UpDownCounter} interface.\n */\nclass UpDownCounterInstrument extends SyncInstrument {\n /**\n * Increment value of counter by the input. Inputs may be negative.\n */\n add(value, attributes, ctx) {\n this._record(value, attributes, ctx);\n }\n}\nexports.UpDownCounterInstrument = UpDownCounterInstrument;\n/**\n * The class implements {@link Counter} interface.\n */\nclass CounterInstrument extends SyncInstrument {\n /**\n * Increment value of counter by the input. Inputs may not be negative.\n */\n add(value, attributes, ctx) {\n if (value < 0) {\n api_1.diag.warn(`negative value provided to counter ${this._descriptor.name}: ${value}`);\n return;\n }\n this._record(value, attributes, ctx);\n }\n}\nexports.CounterInstrument = CounterInstrument;\n/**\n * The class implements {@link Gauge} interface.\n */\nclass GaugeInstrument extends SyncInstrument {\n /**\n * Records a measurement.\n */\n record(value, attributes, ctx) {\n this._record(value, attributes, ctx);\n }\n}\nexports.GaugeInstrument = GaugeInstrument;\n/**\n * The class implements {@link Histogram} interface.\n */\nclass HistogramInstrument extends SyncInstrument {\n /**\n * Records a measurement. Value of the measurement must not be negative.\n */\n record(value, attributes, ctx) {\n if (value < 0) {\n api_1.diag.warn(`negative value provided to histogram ${this._descriptor.name}: ${value}`);\n return;\n }\n this._record(value, attributes, ctx);\n }\n}\nexports.HistogramInstrument = HistogramInstrument;\nclass ObservableInstrument {\n constructor(descriptor, metricStorages, _observableRegistry) {\n this._observableRegistry = _observableRegistry;\n this._descriptor = descriptor;\n this._metricStorages = metricStorages;\n }\n /**\n * @see {Observable.addCallback}\n */\n addCallback(callback) {\n this._observableRegistry.addCallback(callback, this);\n }\n /**\n * @see {Observable.removeCallback}\n */\n removeCallback(callback) {\n this._observableRegistry.removeCallback(callback, this);\n }\n}\nexports.ObservableInstrument = ObservableInstrument;\nclass ObservableCounterInstrument extends ObservableInstrument {\n}\nexports.ObservableCounterInstrument = ObservableCounterInstrument;\nclass ObservableGaugeInstrument extends ObservableInstrument {\n}\nexports.ObservableGaugeInstrument = ObservableGaugeInstrument;\nclass ObservableUpDownCounterInstrument extends ObservableInstrument {\n}\nexports.ObservableUpDownCounterInstrument = ObservableUpDownCounterInstrument;\nfunction isObservableInstrument(it) {\n return it instanceof ObservableInstrument;\n}\nexports.isObservableInstrument = isObservableInstrument;\n//# sourceMappingURL=Instruments.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Meter = void 0;\nconst InstrumentDescriptor_1 = require(\"./InstrumentDescriptor\");\nconst Instruments_1 = require(\"./Instruments\");\n/**\n * This class implements the {@link IMeter} interface.\n */\nclass Meter {\n constructor(_meterSharedState) {\n this._meterSharedState = _meterSharedState;\n }\n /**\n * Create a {@link Gauge} instrument.\n */\n createGauge(name, options) {\n const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.GAUGE, options);\n const storage = this._meterSharedState.registerMetricStorage(descriptor);\n return new Instruments_1.GaugeInstrument(storage, descriptor);\n }\n /**\n * Create a {@link Histogram} instrument.\n */\n createHistogram(name, options) {\n const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.HISTOGRAM, options);\n const storage = this._meterSharedState.registerMetricStorage(descriptor);\n return new Instruments_1.HistogramInstrument(storage, descriptor);\n }\n /**\n * Create a {@link Counter} instrument.\n */\n createCounter(name, options) {\n const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.COUNTER, options);\n const storage = this._meterSharedState.registerMetricStorage(descriptor);\n return new Instruments_1.CounterInstrument(storage, descriptor);\n }\n /**\n * Create a {@link UpDownCounter} instrument.\n */\n createUpDownCounter(name, options) {\n const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.UP_DOWN_COUNTER, options);\n const storage = this._meterSharedState.registerMetricStorage(descriptor);\n return new Instruments_1.UpDownCounterInstrument(storage, descriptor);\n }\n /**\n * Create a {@link ObservableGauge} instrument.\n */\n createObservableGauge(name, options) {\n const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.OBSERVABLE_GAUGE, options);\n const storages = this._meterSharedState.registerAsyncMetricStorage(descriptor);\n return new Instruments_1.ObservableGaugeInstrument(descriptor, storages, this._meterSharedState.observableRegistry);\n }\n /**\n * Create a {@link ObservableCounter} instrument.\n */\n createObservableCounter(name, options) {\n const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.OBSERVABLE_COUNTER, options);\n const storages = this._meterSharedState.registerAsyncMetricStorage(descriptor);\n return new Instruments_1.ObservableCounterInstrument(descriptor, storages, this._meterSharedState.observableRegistry);\n }\n /**\n * Create a {@link ObservableUpDownCounter} instrument.\n */\n createObservableUpDownCounter(name, options) {\n const descriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(name, InstrumentDescriptor_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER, options);\n const storages = this._meterSharedState.registerAsyncMetricStorage(descriptor);\n return new Instruments_1.ObservableUpDownCounterInstrument(descriptor, storages, this._meterSharedState.observableRegistry);\n }\n /**\n * @see {@link Meter.addBatchObservableCallback}\n */\n addBatchObservableCallback(callback, observables) {\n this._meterSharedState.observableRegistry.addBatchCallback(callback, observables);\n }\n /**\n * @see {@link Meter.removeBatchObservableCallback}\n */\n removeBatchObservableCallback(callback, observables) {\n this._meterSharedState.observableRegistry.removeBatchCallback(callback, observables);\n }\n}\nexports.Meter = Meter;\n//# sourceMappingURL=Meter.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MeterProvider = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst resources_1 = require(\"@opentelemetry/resources\");\nconst MeterProviderSharedState_1 = require(\"./state/MeterProviderSharedState\");\nconst MetricCollector_1 = require(\"./state/MetricCollector\");\n/**\n * This class implements the {@link MeterProvider} interface.\n */\nclass MeterProvider {\n constructor(options) {\n var _a;\n this._shutdown = false;\n const resource = resources_1.Resource.default().merge((_a = options === null || options === void 0 ? void 0 : options.resource) !== null && _a !== void 0 ? _a : resources_1.Resource.empty());\n this._sharedState = new MeterProviderSharedState_1.MeterProviderSharedState(resource);\n if ((options === null || options === void 0 ? void 0 : options.views) != null && options.views.length > 0) {\n for (const view of options.views) {\n this._sharedState.viewRegistry.addView(view);\n }\n }\n if ((options === null || options === void 0 ? void 0 : options.readers) != null && options.readers.length > 0) {\n for (const metricReader of options.readers) {\n this.addMetricReader(metricReader);\n }\n }\n }\n /**\n * Get a meter with the configuration of the MeterProvider.\n */\n getMeter(name, version = '', options = {}) {\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#meter-creation\n if (this._shutdown) {\n api_1.diag.warn('A shutdown MeterProvider cannot provide a Meter');\n return (0, api_1.createNoopMeter)();\n }\n return this._sharedState.getMeterSharedState({\n name,\n version,\n schemaUrl: options.schemaUrl,\n }).meter;\n }\n /**\n * Register a {@link MetricReader} to the meter provider. After the\n * registration, the MetricReader can start metrics collection.\n *\n *

NOTE: {@link MetricReader} instances MUST be added before creating any instruments.\n * A {@link MetricReader} instance registered later may receive no or incomplete metric data.\n *\n * @param metricReader the metric reader to be registered.\n *\n * @deprecated This method will be removed in SDK 2.0. Please use\n * {@link MeterProviderOptions.readers} via the {@link MeterProvider} constructor instead\n */\n addMetricReader(metricReader) {\n const collector = new MetricCollector_1.MetricCollector(this._sharedState, metricReader);\n metricReader.setMetricProducer(collector);\n this._sharedState.metricCollectors.push(collector);\n }\n /**\n * Flush all buffered data and shut down the MeterProvider and all registered\n * MetricReaders.\n *\n * Returns a promise which is resolved when all flushes are complete.\n */\n async shutdown(options) {\n if (this._shutdown) {\n api_1.diag.warn('shutdown may only be called once per MeterProvider');\n return;\n }\n this._shutdown = true;\n await Promise.all(this._sharedState.metricCollectors.map(collector => {\n return collector.shutdown(options);\n }));\n }\n /**\n * Notifies all registered MetricReaders to flush any buffered data.\n *\n * Returns a promise which is resolved when all flushes are complete.\n */\n async forceFlush(options) {\n // do not flush after shutdown\n if (this._shutdown) {\n api_1.diag.warn('invalid attempt to force flush after MeterProvider shutdown');\n return;\n }\n await Promise.all(this._sharedState.metricCollectors.map(collector => {\n return collector.forceFlush(options);\n }));\n }\n}\nexports.MeterProvider = MeterProvider;\n//# sourceMappingURL=MeterProvider.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BatchObservableResultImpl = exports.ObservableResultImpl = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst HashMap_1 = require(\"./state/HashMap\");\nconst Instruments_1 = require(\"./Instruments\");\n/**\n * The class implements {@link ObservableResult} interface.\n */\nclass ObservableResultImpl {\n constructor(_instrumentName, _valueType) {\n this._instrumentName = _instrumentName;\n this._valueType = _valueType;\n /**\n * @internal\n */\n this._buffer = new HashMap_1.AttributeHashMap();\n }\n /**\n * Observe a measurement of the value associated with the given attributes.\n */\n observe(value, attributes = {}) {\n if (typeof value !== 'number') {\n api_1.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${value}`);\n return;\n }\n if (this._valueType === api_1.ValueType.INT && !Number.isInteger(value)) {\n api_1.diag.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`);\n value = Math.trunc(value);\n // ignore non-finite values.\n if (!Number.isInteger(value)) {\n return;\n }\n }\n this._buffer.set(attributes, value);\n }\n}\nexports.ObservableResultImpl = ObservableResultImpl;\n/**\n * The class implements {@link BatchObservableCallback} interface.\n */\nclass BatchObservableResultImpl {\n constructor() {\n /**\n * @internal\n */\n this._buffer = new Map();\n }\n /**\n * Observe a measurement of the value associated with the given attributes.\n */\n observe(metric, value, attributes = {}) {\n if (!(0, Instruments_1.isObservableInstrument)(metric)) {\n return;\n }\n let map = this._buffer.get(metric);\n if (map == null) {\n map = new HashMap_1.AttributeHashMap();\n this._buffer.set(metric, map);\n }\n if (typeof value !== 'number') {\n api_1.diag.warn(`non-number value provided to metric ${metric._descriptor.name}: ${value}`);\n return;\n }\n if (metric._descriptor.valueType === api_1.ValueType.INT &&\n !Number.isInteger(value)) {\n api_1.diag.warn(`INT value type cannot accept a floating-point value for ${metric._descriptor.name}, ignoring the fractional digits.`);\n value = Math.trunc(value);\n // ignore non-finite values.\n if (!Number.isInteger(value)) {\n return;\n }\n }\n map.set(attributes, value);\n }\n}\nexports.BatchObservableResultImpl = BatchObservableResultImpl;\n//# sourceMappingURL=ObservableResult.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DropAggregator = void 0;\nconst types_1 = require(\"./types\");\n/** Basic aggregator for None which keeps no recorded value. */\nclass DropAggregator {\n constructor() {\n this.kind = types_1.AggregatorKind.DROP;\n }\n createAccumulation() {\n return undefined;\n }\n merge(_previous, _delta) {\n return undefined;\n }\n diff(_previous, _current) {\n return undefined;\n }\n toMetricData(_descriptor, _aggregationTemporality, _accumulationByAttributes, _endTime) {\n return undefined;\n }\n}\nexports.DropAggregator = DropAggregator;\n//# sourceMappingURL=Drop.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExponentialHistogramAggregator = exports.ExponentialHistogramAccumulation = void 0;\nconst types_1 = require(\"./types\");\nconst MetricData_1 = require(\"../export/MetricData\");\nconst api_1 = require(\"@opentelemetry/api\");\nconst InstrumentDescriptor_1 = require(\"../InstrumentDescriptor\");\nconst Buckets_1 = require(\"./exponential-histogram/Buckets\");\nconst getMapping_1 = require(\"./exponential-histogram/mapping/getMapping\");\nconst util_1 = require(\"./exponential-histogram/util\");\n// HighLow is a utility class used for computing a common scale for\n// two exponential histogram accumulations\nclass HighLow {\n constructor(low, high) {\n this.low = low;\n this.high = high;\n }\n static combine(h1, h2) {\n return new HighLow(Math.min(h1.low, h2.low), Math.max(h1.high, h2.high));\n }\n}\nconst MAX_SCALE = 20;\nconst DEFAULT_MAX_SIZE = 160;\nconst MIN_MAX_SIZE = 2;\nclass ExponentialHistogramAccumulation {\n constructor(startTime = startTime, _maxSize = DEFAULT_MAX_SIZE, _recordMinMax = true, _sum = 0, _count = 0, _zeroCount = 0, _min = Number.POSITIVE_INFINITY, _max = Number.NEGATIVE_INFINITY, _positive = new Buckets_1.Buckets(), _negative = new Buckets_1.Buckets(), _mapping = (0, getMapping_1.getMapping)(MAX_SCALE)) {\n this.startTime = startTime;\n this._maxSize = _maxSize;\n this._recordMinMax = _recordMinMax;\n this._sum = _sum;\n this._count = _count;\n this._zeroCount = _zeroCount;\n this._min = _min;\n this._max = _max;\n this._positive = _positive;\n this._negative = _negative;\n this._mapping = _mapping;\n if (this._maxSize < MIN_MAX_SIZE) {\n api_1.diag.warn(`Exponential Histogram Max Size set to ${this._maxSize}, \\\n changing to the minimum size of: ${MIN_MAX_SIZE}`);\n this._maxSize = MIN_MAX_SIZE;\n }\n }\n /**\n * record updates a histogram with a single count\n * @param {Number} value\n */\n record(value) {\n this.updateByIncrement(value, 1);\n }\n /**\n * Sets the start time for this accumulation\n * @param {HrTime} startTime\n */\n setStartTime(startTime) {\n this.startTime = startTime;\n }\n /**\n * Returns the datapoint representation of this accumulation\n * @param {HrTime} startTime\n */\n toPointValue() {\n return {\n hasMinMax: this._recordMinMax,\n min: this.min,\n max: this.max,\n sum: this.sum,\n positive: {\n offset: this.positive.offset,\n bucketCounts: this.positive.counts(),\n },\n negative: {\n offset: this.negative.offset,\n bucketCounts: this.negative.counts(),\n },\n count: this.count,\n scale: this.scale,\n zeroCount: this.zeroCount,\n };\n }\n /**\n * @returns {Number} The sum of values recorded by this accumulation\n */\n get sum() {\n return this._sum;\n }\n /**\n * @returns {Number} The minimum value recorded by this accumulation\n */\n get min() {\n return this._min;\n }\n /**\n * @returns {Number} The maximum value recorded by this accumulation\n */\n get max() {\n return this._max;\n }\n /**\n * @returns {Number} The count of values recorded by this accumulation\n */\n get count() {\n return this._count;\n }\n /**\n * @returns {Number} The number of 0 values recorded by this accumulation\n */\n get zeroCount() {\n return this._zeroCount;\n }\n /**\n * @returns {Number} The scale used by this accumulation\n */\n get scale() {\n if (this._count === this._zeroCount) {\n // all zeros! scale doesn't matter, use zero\n return 0;\n }\n return this._mapping.scale;\n }\n /**\n * positive holds the positive values\n * @returns {Buckets}\n */\n get positive() {\n return this._positive;\n }\n /**\n * negative holds the negative values by their absolute value\n * @returns {Buckets}\n */\n get negative() {\n return this._negative;\n }\n /**\n * updateByIncr supports updating a histogram with a non-negative\n * increment.\n * @param value\n * @param increment\n */\n updateByIncrement(value, increment) {\n // NaN does not fall into any bucket, is not zero and should not be counted,\n // NaN is never greater than max nor less than min, therefore return as there's nothing for us to do.\n if (Number.isNaN(value)) {\n return;\n }\n if (value > this._max) {\n this._max = value;\n }\n if (value < this._min) {\n this._min = value;\n }\n this._count += increment;\n if (value === 0) {\n this._zeroCount += increment;\n return;\n }\n this._sum += value * increment;\n if (value > 0) {\n this._updateBuckets(this._positive, value, increment);\n }\n else {\n this._updateBuckets(this._negative, -value, increment);\n }\n }\n /**\n * merge combines data from previous value into self\n * @param {ExponentialHistogramAccumulation} previous\n */\n merge(previous) {\n if (this._count === 0) {\n this._min = previous.min;\n this._max = previous.max;\n }\n else if (previous.count !== 0) {\n if (previous.min < this.min) {\n this._min = previous.min;\n }\n if (previous.max > this.max) {\n this._max = previous.max;\n }\n }\n this.startTime = previous.startTime;\n this._sum += previous.sum;\n this._count += previous.count;\n this._zeroCount += previous.zeroCount;\n const minScale = this._minScale(previous);\n this._downscale(this.scale - minScale);\n this._mergeBuckets(this.positive, previous, previous.positive, minScale);\n this._mergeBuckets(this.negative, previous, previous.negative, minScale);\n }\n /**\n * diff subtracts other from self\n * @param {ExponentialHistogramAccumulation} other\n */\n diff(other) {\n this._min = Infinity;\n this._max = -Infinity;\n this._sum -= other.sum;\n this._count -= other.count;\n this._zeroCount -= other.zeroCount;\n const minScale = this._minScale(other);\n this._downscale(this.scale - minScale);\n this._diffBuckets(this.positive, other, other.positive, minScale);\n this._diffBuckets(this.negative, other, other.negative, minScale);\n }\n /**\n * clone returns a deep copy of self\n * @returns {ExponentialHistogramAccumulation}\n */\n clone() {\n return new ExponentialHistogramAccumulation(this.startTime, this._maxSize, this._recordMinMax, this._sum, this._count, this._zeroCount, this._min, this._max, this.positive.clone(), this.negative.clone(), this._mapping);\n }\n /**\n * _updateBuckets maps the incoming value to a bucket index for the current\n * scale. If the bucket index is outside of the range of the backing array,\n * it will rescale the backing array and update the mapping for the new scale.\n */\n _updateBuckets(buckets, value, increment) {\n let index = this._mapping.mapToIndex(value);\n // rescale the mapping if needed\n let rescalingNeeded = false;\n let high = 0;\n let low = 0;\n if (buckets.length === 0) {\n buckets.indexStart = index;\n buckets.indexEnd = buckets.indexStart;\n buckets.indexBase = buckets.indexStart;\n }\n else if (index < buckets.indexStart &&\n buckets.indexEnd - index >= this._maxSize) {\n rescalingNeeded = true;\n low = index;\n high = buckets.indexEnd;\n }\n else if (index > buckets.indexEnd &&\n index - buckets.indexStart >= this._maxSize) {\n rescalingNeeded = true;\n low = buckets.indexStart;\n high = index;\n }\n // rescale and compute index at new scale\n if (rescalingNeeded) {\n const change = this._changeScale(high, low);\n this._downscale(change);\n index = this._mapping.mapToIndex(value);\n }\n this._incrementIndexBy(buckets, index, increment);\n }\n /**\n * _incrementIndexBy increments the count of the bucket specified by `index`.\n * If the index is outside of the range [buckets.indexStart, buckets.indexEnd]\n * the boundaries of the backing array will be adjusted and more buckets will\n * be added if needed.\n */\n _incrementIndexBy(buckets, index, increment) {\n if (increment === 0) {\n // nothing to do for a zero increment, can happen during a merge operation\n return;\n }\n if (buckets.length === 0) {\n buckets.indexStart = buckets.indexEnd = buckets.indexBase = index;\n }\n if (index < buckets.indexStart) {\n const span = buckets.indexEnd - index;\n if (span >= buckets.backing.length) {\n this._grow(buckets, span + 1);\n }\n buckets.indexStart = index;\n }\n else if (index > buckets.indexEnd) {\n const span = index - buckets.indexStart;\n if (span >= buckets.backing.length) {\n this._grow(buckets, span + 1);\n }\n buckets.indexEnd = index;\n }\n let bucketIndex = index - buckets.indexBase;\n if (bucketIndex < 0) {\n bucketIndex += buckets.backing.length;\n }\n buckets.incrementBucket(bucketIndex, increment);\n }\n /**\n * grow resizes the backing array by doubling in size up to maxSize.\n * This extends the array with a bunch of zeros and copies the\n * existing counts to the same position.\n */\n _grow(buckets, needed) {\n const size = buckets.backing.length;\n const bias = buckets.indexBase - buckets.indexStart;\n const oldPositiveLimit = size - bias;\n let newSize = (0, util_1.nextGreaterSquare)(needed);\n if (newSize > this._maxSize) {\n newSize = this._maxSize;\n }\n const newPositiveLimit = newSize - bias;\n buckets.backing.growTo(newSize, oldPositiveLimit, newPositiveLimit);\n }\n /**\n * _changeScale computes how much downscaling is needed by shifting the\n * high and low values until they are separated by no more than size.\n */\n _changeScale(high, low) {\n let change = 0;\n while (high - low >= this._maxSize) {\n high >>= 1;\n low >>= 1;\n change++;\n }\n return change;\n }\n /**\n * _downscale subtracts `change` from the current mapping scale.\n */\n _downscale(change) {\n if (change === 0) {\n return;\n }\n if (change < 0) {\n // Note: this should be impossible. If we get here it's because\n // there is a bug in the implementation.\n throw new Error(`impossible change of scale: ${this.scale}`);\n }\n const newScale = this._mapping.scale - change;\n this._positive.downscale(change);\n this._negative.downscale(change);\n this._mapping = (0, getMapping_1.getMapping)(newScale);\n }\n /**\n * _minScale is used by diff and merge to compute an ideal combined scale\n */\n _minScale(other) {\n const minScale = Math.min(this.scale, other.scale);\n const highLowPos = HighLow.combine(this._highLowAtScale(this.positive, this.scale, minScale), this._highLowAtScale(other.positive, other.scale, minScale));\n const highLowNeg = HighLow.combine(this._highLowAtScale(this.negative, this.scale, minScale), this._highLowAtScale(other.negative, other.scale, minScale));\n return Math.min(minScale - this._changeScale(highLowPos.high, highLowPos.low), minScale - this._changeScale(highLowNeg.high, highLowNeg.low));\n }\n /**\n * _highLowAtScale is used by diff and merge to compute an ideal combined scale.\n */\n _highLowAtScale(buckets, currentScale, newScale) {\n if (buckets.length === 0) {\n return new HighLow(0, -1);\n }\n const shift = currentScale - newScale;\n return new HighLow(buckets.indexStart >> shift, buckets.indexEnd >> shift);\n }\n /**\n * _mergeBuckets translates index values from another histogram and\n * adds the values into the corresponding buckets of this histogram.\n */\n _mergeBuckets(ours, other, theirs, scale) {\n const theirOffset = theirs.offset;\n const theirChange = other.scale - scale;\n for (let i = 0; i < theirs.length; i++) {\n this._incrementIndexBy(ours, (theirOffset + i) >> theirChange, theirs.at(i));\n }\n }\n /**\n * _diffBuckets translates index values from another histogram and\n * subtracts the values in the corresponding buckets of this histogram.\n */\n _diffBuckets(ours, other, theirs, scale) {\n const theirOffset = theirs.offset;\n const theirChange = other.scale - scale;\n for (let i = 0; i < theirs.length; i++) {\n const ourIndex = (theirOffset + i) >> theirChange;\n let bucketIndex = ourIndex - ours.indexBase;\n if (bucketIndex < 0) {\n bucketIndex += ours.backing.length;\n }\n ours.decrementBucket(bucketIndex, theirs.at(i));\n }\n ours.trim();\n }\n}\nexports.ExponentialHistogramAccumulation = ExponentialHistogramAccumulation;\n/**\n * Aggregator for ExponentialHistogramAccumulations\n */\nclass ExponentialHistogramAggregator {\n /**\n * @param _maxSize Maximum number of buckets for each of the positive\n * and negative ranges, exclusive of the zero-bucket.\n * @param _recordMinMax If set to true, min and max will be recorded.\n * Otherwise, min and max will not be recorded.\n */\n constructor(_maxSize, _recordMinMax) {\n this._maxSize = _maxSize;\n this._recordMinMax = _recordMinMax;\n this.kind = types_1.AggregatorKind.EXPONENTIAL_HISTOGRAM;\n }\n createAccumulation(startTime) {\n return new ExponentialHistogramAccumulation(startTime, this._maxSize, this._recordMinMax);\n }\n /**\n * Return the result of the merge of two exponential histogram accumulations.\n */\n merge(previous, delta) {\n const result = delta.clone();\n result.merge(previous);\n return result;\n }\n /**\n * Returns a new DELTA aggregation by comparing two cumulative measurements.\n */\n diff(previous, current) {\n const result = current.clone();\n result.diff(previous);\n return result;\n }\n toMetricData(descriptor, aggregationTemporality, accumulationByAttributes, endTime) {\n return {\n descriptor,\n aggregationTemporality,\n dataPointType: MetricData_1.DataPointType.EXPONENTIAL_HISTOGRAM,\n dataPoints: accumulationByAttributes.map(([attributes, accumulation]) => {\n const pointValue = accumulation.toPointValue();\n // determine if instrument allows negative values.\n const allowsNegativeValues = descriptor.type === InstrumentDescriptor_1.InstrumentType.GAUGE ||\n descriptor.type === InstrumentDescriptor_1.InstrumentType.UP_DOWN_COUNTER ||\n descriptor.type === InstrumentDescriptor_1.InstrumentType.OBSERVABLE_GAUGE ||\n descriptor.type === InstrumentDescriptor_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;\n return {\n attributes,\n startTime: accumulation.startTime,\n endTime,\n value: {\n min: pointValue.hasMinMax ? pointValue.min : undefined,\n max: pointValue.hasMinMax ? pointValue.max : undefined,\n sum: !allowsNegativeValues ? pointValue.sum : undefined,\n positive: {\n offset: pointValue.positive.offset,\n bucketCounts: pointValue.positive.bucketCounts,\n },\n negative: {\n offset: pointValue.negative.offset,\n bucketCounts: pointValue.negative.bucketCounts,\n },\n count: pointValue.count,\n scale: pointValue.scale,\n zeroCount: pointValue.zeroCount,\n },\n };\n }),\n };\n }\n}\nexports.ExponentialHistogramAggregator = ExponentialHistogramAggregator;\n//# sourceMappingURL=ExponentialHistogram.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HistogramAggregator = exports.HistogramAccumulation = void 0;\nconst types_1 = require(\"./types\");\nconst MetricData_1 = require(\"../export/MetricData\");\nconst InstrumentDescriptor_1 = require(\"../InstrumentDescriptor\");\nconst utils_1 = require(\"../utils\");\nfunction createNewEmptyCheckpoint(boundaries) {\n const counts = boundaries.map(() => 0);\n counts.push(0);\n return {\n buckets: {\n boundaries,\n counts,\n },\n sum: 0,\n count: 0,\n hasMinMax: false,\n min: Infinity,\n max: -Infinity,\n };\n}\nclass HistogramAccumulation {\n constructor(startTime, _boundaries, _recordMinMax = true, _current = createNewEmptyCheckpoint(_boundaries)) {\n this.startTime = startTime;\n this._boundaries = _boundaries;\n this._recordMinMax = _recordMinMax;\n this._current = _current;\n }\n record(value) {\n // NaN does not fall into any bucket, is not zero and should not be counted,\n // NaN is never greater than max nor less than min, therefore return as there's nothing for us to do.\n if (Number.isNaN(value)) {\n return;\n }\n this._current.count += 1;\n this._current.sum += value;\n if (this._recordMinMax) {\n this._current.min = Math.min(value, this._current.min);\n this._current.max = Math.max(value, this._current.max);\n this._current.hasMinMax = true;\n }\n const idx = (0, utils_1.binarySearchUB)(this._boundaries, value);\n this._current.buckets.counts[idx] += 1;\n }\n setStartTime(startTime) {\n this.startTime = startTime;\n }\n toPointValue() {\n return this._current;\n }\n}\nexports.HistogramAccumulation = HistogramAccumulation;\n/**\n * Basic aggregator which observes events and counts them in pre-defined buckets\n * and provides the total sum and count of all observations.\n */\nclass HistogramAggregator {\n /**\n * @param _boundaries sorted upper bounds of recorded values.\n * @param _recordMinMax If set to true, min and max will be recorded. Otherwise, min and max will not be recorded.\n */\n constructor(_boundaries, _recordMinMax) {\n this._boundaries = _boundaries;\n this._recordMinMax = _recordMinMax;\n this.kind = types_1.AggregatorKind.HISTOGRAM;\n }\n createAccumulation(startTime) {\n return new HistogramAccumulation(startTime, this._boundaries, this._recordMinMax);\n }\n /**\n * Return the result of the merge of two histogram accumulations. As long as one Aggregator\n * instance produces all Accumulations with constant boundaries we don't need to worry about\n * merging accumulations with different boundaries.\n */\n merge(previous, delta) {\n const previousValue = previous.toPointValue();\n const deltaValue = delta.toPointValue();\n const previousCounts = previousValue.buckets.counts;\n const deltaCounts = deltaValue.buckets.counts;\n const mergedCounts = new Array(previousCounts.length);\n for (let idx = 0; idx < previousCounts.length; idx++) {\n mergedCounts[idx] = previousCounts[idx] + deltaCounts[idx];\n }\n let min = Infinity;\n let max = -Infinity;\n if (this._recordMinMax) {\n if (previousValue.hasMinMax && deltaValue.hasMinMax) {\n min = Math.min(previousValue.min, deltaValue.min);\n max = Math.max(previousValue.max, deltaValue.max);\n }\n else if (previousValue.hasMinMax) {\n min = previousValue.min;\n max = previousValue.max;\n }\n else if (deltaValue.hasMinMax) {\n min = deltaValue.min;\n max = deltaValue.max;\n }\n }\n return new HistogramAccumulation(previous.startTime, previousValue.buckets.boundaries, this._recordMinMax, {\n buckets: {\n boundaries: previousValue.buckets.boundaries,\n counts: mergedCounts,\n },\n count: previousValue.count + deltaValue.count,\n sum: previousValue.sum + deltaValue.sum,\n hasMinMax: this._recordMinMax &&\n (previousValue.hasMinMax || deltaValue.hasMinMax),\n min: min,\n max: max,\n });\n }\n /**\n * Returns a new DELTA aggregation by comparing two cumulative measurements.\n */\n diff(previous, current) {\n const previousValue = previous.toPointValue();\n const currentValue = current.toPointValue();\n const previousCounts = previousValue.buckets.counts;\n const currentCounts = currentValue.buckets.counts;\n const diffedCounts = new Array(previousCounts.length);\n for (let idx = 0; idx < previousCounts.length; idx++) {\n diffedCounts[idx] = currentCounts[idx] - previousCounts[idx];\n }\n return new HistogramAccumulation(current.startTime, previousValue.buckets.boundaries, this._recordMinMax, {\n buckets: {\n boundaries: previousValue.buckets.boundaries,\n counts: diffedCounts,\n },\n count: currentValue.count - previousValue.count,\n sum: currentValue.sum - previousValue.sum,\n hasMinMax: false,\n min: Infinity,\n max: -Infinity,\n });\n }\n toMetricData(descriptor, aggregationTemporality, accumulationByAttributes, endTime) {\n return {\n descriptor,\n aggregationTemporality,\n dataPointType: MetricData_1.DataPointType.HISTOGRAM,\n dataPoints: accumulationByAttributes.map(([attributes, accumulation]) => {\n const pointValue = accumulation.toPointValue();\n // determine if instrument allows negative values.\n const allowsNegativeValues = descriptor.type === InstrumentDescriptor_1.InstrumentType.GAUGE ||\n descriptor.type === InstrumentDescriptor_1.InstrumentType.UP_DOWN_COUNTER ||\n descriptor.type === InstrumentDescriptor_1.InstrumentType.OBSERVABLE_GAUGE ||\n descriptor.type === InstrumentDescriptor_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;\n return {\n attributes,\n startTime: accumulation.startTime,\n endTime,\n value: {\n min: pointValue.hasMinMax ? pointValue.min : undefined,\n max: pointValue.hasMinMax ? pointValue.max : undefined,\n sum: !allowsNegativeValues ? pointValue.sum : undefined,\n buckets: pointValue.buckets,\n count: pointValue.count,\n },\n };\n }),\n };\n }\n}\nexports.HistogramAggregator = HistogramAggregator;\n//# sourceMappingURL=Histogram.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LastValueAggregator = exports.LastValueAccumulation = void 0;\nconst types_1 = require(\"./types\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst MetricData_1 = require(\"../export/MetricData\");\nclass LastValueAccumulation {\n constructor(startTime, _current = 0, sampleTime = [0, 0]) {\n this.startTime = startTime;\n this._current = _current;\n this.sampleTime = sampleTime;\n }\n record(value) {\n this._current = value;\n this.sampleTime = (0, core_1.millisToHrTime)(Date.now());\n }\n setStartTime(startTime) {\n this.startTime = startTime;\n }\n toPointValue() {\n return this._current;\n }\n}\nexports.LastValueAccumulation = LastValueAccumulation;\n/** Basic aggregator which calculates a LastValue from individual measurements. */\nclass LastValueAggregator {\n constructor() {\n this.kind = types_1.AggregatorKind.LAST_VALUE;\n }\n createAccumulation(startTime) {\n return new LastValueAccumulation(startTime);\n }\n /**\n * Returns the result of the merge of the given accumulations.\n *\n * Return the newly captured (delta) accumulation for LastValueAggregator.\n */\n merge(previous, delta) {\n // nanoseconds may lose precisions.\n const latestAccumulation = (0, core_1.hrTimeToMicroseconds)(delta.sampleTime) >=\n (0, core_1.hrTimeToMicroseconds)(previous.sampleTime)\n ? delta\n : previous;\n return new LastValueAccumulation(previous.startTime, latestAccumulation.toPointValue(), latestAccumulation.sampleTime);\n }\n /**\n * Returns a new DELTA aggregation by comparing two cumulative measurements.\n *\n * A delta aggregation is not meaningful to LastValueAggregator, just return\n * the newly captured (delta) accumulation for LastValueAggregator.\n */\n diff(previous, current) {\n // nanoseconds may lose precisions.\n const latestAccumulation = (0, core_1.hrTimeToMicroseconds)(current.sampleTime) >=\n (0, core_1.hrTimeToMicroseconds)(previous.sampleTime)\n ? current\n : previous;\n return new LastValueAccumulation(current.startTime, latestAccumulation.toPointValue(), latestAccumulation.sampleTime);\n }\n toMetricData(descriptor, aggregationTemporality, accumulationByAttributes, endTime) {\n return {\n descriptor,\n aggregationTemporality,\n dataPointType: MetricData_1.DataPointType.GAUGE,\n dataPoints: accumulationByAttributes.map(([attributes, accumulation]) => {\n return {\n attributes,\n startTime: accumulation.startTime,\n endTime,\n value: accumulation.toPointValue(),\n };\n }),\n };\n }\n}\nexports.LastValueAggregator = LastValueAggregator;\n//# sourceMappingURL=LastValue.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SumAggregator = exports.SumAccumulation = void 0;\nconst types_1 = require(\"./types\");\nconst MetricData_1 = require(\"../export/MetricData\");\nclass SumAccumulation {\n constructor(startTime, monotonic, _current = 0, reset = false) {\n this.startTime = startTime;\n this.monotonic = monotonic;\n this._current = _current;\n this.reset = reset;\n }\n record(value) {\n if (this.monotonic && value < 0) {\n return;\n }\n this._current += value;\n }\n setStartTime(startTime) {\n this.startTime = startTime;\n }\n toPointValue() {\n return this._current;\n }\n}\nexports.SumAccumulation = SumAccumulation;\n/** Basic aggregator which calculates a Sum from individual measurements. */\nclass SumAggregator {\n constructor(monotonic) {\n this.monotonic = monotonic;\n this.kind = types_1.AggregatorKind.SUM;\n }\n createAccumulation(startTime) {\n return new SumAccumulation(startTime, this.monotonic);\n }\n /**\n * Returns the result of the merge of the given accumulations.\n */\n merge(previous, delta) {\n const prevPv = previous.toPointValue();\n const deltaPv = delta.toPointValue();\n if (delta.reset) {\n return new SumAccumulation(delta.startTime, this.monotonic, deltaPv, delta.reset);\n }\n return new SumAccumulation(previous.startTime, this.monotonic, prevPv + deltaPv);\n }\n /**\n * Returns a new DELTA aggregation by comparing two cumulative measurements.\n */\n diff(previous, current) {\n const prevPv = previous.toPointValue();\n const currPv = current.toPointValue();\n /**\n * If the SumAggregator is a monotonic one and the previous point value is\n * greater than the current one, a reset is deemed to be happened.\n * Return the current point value to prevent the value from been reset.\n */\n if (this.monotonic && prevPv > currPv) {\n return new SumAccumulation(current.startTime, this.monotonic, currPv, true);\n }\n return new SumAccumulation(current.startTime, this.monotonic, currPv - prevPv);\n }\n toMetricData(descriptor, aggregationTemporality, accumulationByAttributes, endTime) {\n return {\n descriptor,\n aggregationTemporality,\n dataPointType: MetricData_1.DataPointType.SUM,\n dataPoints: accumulationByAttributes.map(([attributes, accumulation]) => {\n return {\n attributes,\n startTime: accumulation.startTime,\n endTime,\n value: accumulation.toPointValue(),\n };\n }),\n isMonotonic: this.monotonic,\n };\n }\n}\nexports.SumAggregator = SumAggregator;\n//# sourceMappingURL=Sum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Buckets = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass Buckets {\n /**\n * The term index refers to the number of the exponential histogram bucket\n * used to determine its boundaries. The lower boundary of a bucket is\n * determined by base ** index and the upper boundary of a bucket is\n * determined by base ** (index + 1). index values are signed to account\n * for values less than or equal to 1.\n *\n * indexBase is the index of the 0th position in the\n * backing array, i.e., backing[0] is the count\n * in the bucket with index `indexBase`.\n *\n * indexStart is the smallest index value represented\n * in the backing array.\n *\n * indexEnd is the largest index value represented in\n * the backing array.\n */\n constructor(backing = new BucketsBacking(), indexBase = 0, indexStart = 0, indexEnd = 0) {\n this.backing = backing;\n this.indexBase = indexBase;\n this.indexStart = indexStart;\n this.indexEnd = indexEnd;\n }\n /**\n * Offset is the bucket index of the smallest entry in the counts array\n * @returns {number}\n */\n get offset() {\n return this.indexStart;\n }\n /**\n * Buckets is a view into the backing array.\n * @returns {number}\n */\n get length() {\n if (this.backing.length === 0) {\n return 0;\n }\n if (this.indexEnd === this.indexStart && this.at(0) === 0) {\n return 0;\n }\n return this.indexEnd - this.indexStart + 1;\n }\n /**\n * An array of counts, where count[i] carries the count\n * of the bucket at index (offset+i). count[i] is the count of\n * values greater than base^(offset+i) and less than or equal to\n * base^(offset+i+1).\n * @returns {number} The logical counts based on the backing array\n */\n counts() {\n return Array.from({ length: this.length }, (_, i) => this.at(i));\n }\n /**\n * At returns the count of the bucket at a position in the logical\n * array of counts.\n * @param position\n * @returns {number}\n */\n at(position) {\n const bias = this.indexBase - this.indexStart;\n if (position < bias) {\n position += this.backing.length;\n }\n position -= bias;\n return this.backing.countAt(position);\n }\n /**\n * incrementBucket increments the backing array index by `increment`\n * @param bucketIndex\n * @param increment\n */\n incrementBucket(bucketIndex, increment) {\n this.backing.increment(bucketIndex, increment);\n }\n /**\n * decrementBucket decrements the backing array index by `decrement`\n * if decrement is greater than the current value, it's set to 0.\n * @param bucketIndex\n * @param decrement\n */\n decrementBucket(bucketIndex, decrement) {\n this.backing.decrement(bucketIndex, decrement);\n }\n /**\n * trim removes leading and / or trailing zero buckets (which can occur\n * after diffing two histos) and rotates the backing array so that the\n * smallest non-zero index is in the 0th position of the backing array\n */\n trim() {\n for (let i = 0; i < this.length; i++) {\n if (this.at(i) !== 0) {\n this.indexStart += i;\n break;\n }\n else if (i === this.length - 1) {\n //the entire array is zeroed out\n this.indexStart = this.indexEnd = this.indexBase = 0;\n return;\n }\n }\n for (let i = this.length - 1; i >= 0; i--) {\n if (this.at(i) !== 0) {\n this.indexEnd -= this.length - i - 1;\n break;\n }\n }\n this._rotate();\n }\n /**\n * downscale first rotates, then collapses 2**`by`-to-1 buckets.\n * @param by\n */\n downscale(by) {\n this._rotate();\n const size = 1 + this.indexEnd - this.indexStart;\n const each = 1 << by;\n let inpos = 0;\n let outpos = 0;\n for (let pos = this.indexStart; pos <= this.indexEnd;) {\n let mod = pos % each;\n if (mod < 0) {\n mod += each;\n }\n for (let i = mod; i < each && inpos < size; i++) {\n this._relocateBucket(outpos, inpos);\n inpos++;\n pos++;\n }\n outpos++;\n }\n this.indexStart >>= by;\n this.indexEnd >>= by;\n this.indexBase = this.indexStart;\n }\n /**\n * Clone returns a deep copy of Buckets\n * @returns {Buckets}\n */\n clone() {\n return new Buckets(this.backing.clone(), this.indexBase, this.indexStart, this.indexEnd);\n }\n /**\n * _rotate shifts the backing array contents so that indexStart ==\n * indexBase to simplify the downscale logic.\n */\n _rotate() {\n const bias = this.indexBase - this.indexStart;\n if (bias === 0) {\n return;\n }\n else if (bias > 0) {\n this.backing.reverse(0, this.backing.length);\n this.backing.reverse(0, bias);\n this.backing.reverse(bias, this.backing.length);\n }\n else {\n // negative bias, this can happen when diffing two histograms\n this.backing.reverse(0, this.backing.length);\n this.backing.reverse(0, this.backing.length + bias);\n }\n this.indexBase = this.indexStart;\n }\n /**\n * _relocateBucket adds the count in counts[src] to counts[dest] and\n * resets count[src] to zero.\n */\n _relocateBucket(dest, src) {\n if (dest === src) {\n return;\n }\n this.incrementBucket(dest, this.backing.emptyBucket(src));\n }\n}\nexports.Buckets = Buckets;\n/**\n * BucketsBacking holds the raw buckets and some utility methods to\n * manage them.\n */\nclass BucketsBacking {\n constructor(_counts = [0]) {\n this._counts = _counts;\n }\n /**\n * length returns the physical size of the backing array, which\n * is >= buckets.length()\n */\n get length() {\n return this._counts.length;\n }\n /**\n * countAt returns the count in a specific bucket\n */\n countAt(pos) {\n return this._counts[pos];\n }\n /**\n * growTo grows a backing array and copies old entries\n * into their correct new positions.\n */\n growTo(newSize, oldPositiveLimit, newPositiveLimit) {\n const tmp = new Array(newSize).fill(0);\n tmp.splice(newPositiveLimit, this._counts.length - oldPositiveLimit, ...this._counts.slice(oldPositiveLimit));\n tmp.splice(0, oldPositiveLimit, ...this._counts.slice(0, oldPositiveLimit));\n this._counts = tmp;\n }\n /**\n * reverse the items in the backing array in the range [from, limit).\n */\n reverse(from, limit) {\n const num = Math.floor((from + limit) / 2) - from;\n for (let i = 0; i < num; i++) {\n const tmp = this._counts[from + i];\n this._counts[from + i] = this._counts[limit - i - 1];\n this._counts[limit - i - 1] = tmp;\n }\n }\n /**\n * emptyBucket empties the count from a bucket, for\n * moving into another.\n */\n emptyBucket(src) {\n const tmp = this._counts[src];\n this._counts[src] = 0;\n return tmp;\n }\n /**\n * increments a bucket by `increment`\n */\n increment(bucketIndex, increment) {\n this._counts[bucketIndex] += increment;\n }\n /**\n * decrements a bucket by `decrement`\n */\n decrement(bucketIndex, decrement) {\n if (this._counts[bucketIndex] >= decrement) {\n this._counts[bucketIndex] -= decrement;\n }\n else {\n // this should not happen, but we're being defensive against\n // negative counts.\n this._counts[bucketIndex] = 0;\n }\n }\n /**\n * clone returns a deep copy of BucketsBacking\n */\n clone() {\n return new BucketsBacking([...this._counts]);\n }\n}\n//# sourceMappingURL=Buckets.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExponentMapping = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst ieee754 = require(\"./ieee754\");\nconst util = require(\"../util\");\nconst types_1 = require(\"./types\");\n/**\n * ExponentMapping implements exponential mapping functions for\n * scales <=0. For scales > 0 LogarithmMapping should be used.\n */\nclass ExponentMapping {\n constructor(scale) {\n this._shift = -scale;\n }\n /**\n * Maps positive floating point values to indexes corresponding to scale\n * @param value\n * @returns {number} index for provided value at the current scale\n */\n mapToIndex(value) {\n if (value < ieee754.MIN_VALUE) {\n return this._minNormalLowerBoundaryIndex();\n }\n const exp = ieee754.getNormalBase2(value);\n // In case the value is an exact power of two, compute a\n // correction of -1. Note, we are using a custom _rightShift\n // to accommodate a 52-bit argument, which the native bitwise\n // operators do not support\n const correction = this._rightShift(ieee754.getSignificand(value) - 1, ieee754.SIGNIFICAND_WIDTH);\n return (exp + correction) >> this._shift;\n }\n /**\n * Returns the lower bucket boundary for the given index for scale\n *\n * @param index\n * @returns {number}\n */\n lowerBoundary(index) {\n const minIndex = this._minNormalLowerBoundaryIndex();\n if (index < minIndex) {\n throw new types_1.MappingError(`underflow: ${index} is < minimum lower boundary: ${minIndex}`);\n }\n const maxIndex = this._maxNormalLowerBoundaryIndex();\n if (index > maxIndex) {\n throw new types_1.MappingError(`overflow: ${index} is > maximum lower boundary: ${maxIndex}`);\n }\n return util.ldexp(1, index << this._shift);\n }\n /**\n * The scale used by this mapping\n * @returns {number}\n */\n get scale() {\n if (this._shift === 0) {\n return 0;\n }\n return -this._shift;\n }\n _minNormalLowerBoundaryIndex() {\n let index = ieee754.MIN_NORMAL_EXPONENT >> this._shift;\n if (this._shift < 2) {\n index--;\n }\n return index;\n }\n _maxNormalLowerBoundaryIndex() {\n return ieee754.MAX_NORMAL_EXPONENT >> this._shift;\n }\n _rightShift(value, shift) {\n return Math.floor(value * Math.pow(2, -shift));\n }\n}\nexports.ExponentMapping = ExponentMapping;\n//# sourceMappingURL=ExponentMapping.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LogarithmMapping = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst ieee754 = require(\"./ieee754\");\nconst util = require(\"../util\");\nconst types_1 = require(\"./types\");\n/**\n * LogarithmMapping implements exponential mapping functions for scale > 0.\n * For scales <= 0 the exponent mapping should be used.\n */\nclass LogarithmMapping {\n constructor(scale) {\n this._scale = scale;\n this._scaleFactor = util.ldexp(Math.LOG2E, scale);\n this._inverseFactor = util.ldexp(Math.LN2, -scale);\n }\n /**\n * Maps positive floating point values to indexes corresponding to scale\n * @param value\n * @returns {number} index for provided value at the current scale\n */\n mapToIndex(value) {\n if (value <= ieee754.MIN_VALUE) {\n return this._minNormalLowerBoundaryIndex() - 1;\n }\n // exact power of two special case\n if (ieee754.getSignificand(value) === 0) {\n const exp = ieee754.getNormalBase2(value);\n return (exp << this._scale) - 1;\n }\n // non-power of two cases. use Math.floor to round the scaled logarithm\n const index = Math.floor(Math.log(value) * this._scaleFactor);\n const maxIndex = this._maxNormalLowerBoundaryIndex();\n if (index >= maxIndex) {\n return maxIndex;\n }\n return index;\n }\n /**\n * Returns the lower bucket boundary for the given index for scale\n *\n * @param index\n * @returns {number}\n */\n lowerBoundary(index) {\n const maxIndex = this._maxNormalLowerBoundaryIndex();\n if (index >= maxIndex) {\n if (index === maxIndex) {\n return 2 * Math.exp((index - (1 << this._scale)) / this._scaleFactor);\n }\n throw new types_1.MappingError(`overflow: ${index} is > maximum lower boundary: ${maxIndex}`);\n }\n const minIndex = this._minNormalLowerBoundaryIndex();\n if (index <= minIndex) {\n if (index === minIndex) {\n return ieee754.MIN_VALUE;\n }\n else if (index === minIndex - 1) {\n return Math.exp((index + (1 << this._scale)) / this._scaleFactor) / 2;\n }\n throw new types_1.MappingError(`overflow: ${index} is < minimum lower boundary: ${minIndex}`);\n }\n return Math.exp(index * this._inverseFactor);\n }\n /**\n * The scale used by this mapping\n * @returns {number}\n */\n get scale() {\n return this._scale;\n }\n _minNormalLowerBoundaryIndex() {\n return ieee754.MIN_NORMAL_EXPONENT << this._scale;\n }\n _maxNormalLowerBoundaryIndex() {\n return ((ieee754.MAX_NORMAL_EXPONENT + 1) << this._scale) - 1;\n }\n}\nexports.LogarithmMapping = LogarithmMapping;\n//# sourceMappingURL=LogarithmMapping.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMapping = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst ExponentMapping_1 = require(\"./ExponentMapping\");\nconst LogarithmMapping_1 = require(\"./LogarithmMapping\");\nconst types_1 = require(\"./types\");\nconst MIN_SCALE = -10;\nconst MAX_SCALE = 20;\nconst PREBUILT_MAPPINGS = Array.from({ length: 31 }, (_, i) => {\n if (i > 10) {\n return new LogarithmMapping_1.LogarithmMapping(i - 10);\n }\n return new ExponentMapping_1.ExponentMapping(i - 10);\n});\n/**\n * getMapping returns an appropriate mapping for the given scale. For scales -10\n * to 0 the underlying type will be ExponentMapping. For scales 1 to 20 the\n * underlying type will be LogarithmMapping.\n * @param scale a number in the range [-10, 20]\n * @returns {Mapping}\n */\nfunction getMapping(scale) {\n if (scale > MAX_SCALE || scale < MIN_SCALE) {\n throw new types_1.MappingError(`expected scale >= ${MIN_SCALE} && <= ${MAX_SCALE}, got: ${scale}`);\n }\n // mappings are offset by 10. scale -10 is at position 0 and scale 20 is at 30\n return PREBUILT_MAPPINGS[scale + 10];\n}\nexports.getMapping = getMapping;\n//# sourceMappingURL=getMapping.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSignificand = exports.getNormalBase2 = exports.MIN_VALUE = exports.MAX_NORMAL_EXPONENT = exports.MIN_NORMAL_EXPONENT = exports.SIGNIFICAND_WIDTH = void 0;\n/**\n * The functions and constants in this file allow us to interact\n * with the internal representation of an IEEE 64-bit floating point\n * number. We need to work with all 64-bits, thus, care needs to be\n * taken when working with Javascript's bitwise operators (<<, >>, &,\n * |, etc) as they truncate operands to 32-bits. In order to work around\n * this we work with the 64-bits as two 32-bit halves, perform bitwise\n * operations on them independently, and combine the results (if needed).\n */\nexports.SIGNIFICAND_WIDTH = 52;\n/**\n * EXPONENT_MASK is set to 1 for the hi 32-bits of an IEEE 754\n * floating point exponent: 0x7ff00000.\n */\nconst EXPONENT_MASK = 0x7ff00000;\n/**\n * SIGNIFICAND_MASK is the mask for the significand portion of the hi 32-bits\n * of an IEEE 754 double-precision floating-point value: 0xfffff\n */\nconst SIGNIFICAND_MASK = 0xfffff;\n/**\n * EXPONENT_BIAS is the exponent bias specified for encoding\n * the IEEE 754 double-precision floating point exponent: 1023\n */\nconst EXPONENT_BIAS = 1023;\n/**\n * MIN_NORMAL_EXPONENT is the minimum exponent of a normalized\n * floating point: -1022.\n */\nexports.MIN_NORMAL_EXPONENT = -EXPONENT_BIAS + 1;\n/**\n * MAX_NORMAL_EXPONENT is the maximum exponent of a normalized\n * floating point: 1023.\n */\nexports.MAX_NORMAL_EXPONENT = EXPONENT_BIAS;\n/**\n * MIN_VALUE is the smallest normal number\n */\nexports.MIN_VALUE = Math.pow(2, -1022);\n/**\n * getNormalBase2 extracts the normalized base-2 fractional exponent.\n * This returns k for the equation f x 2**k where f is\n * in the range [1, 2). Note that this function is not called for\n * subnormal numbers.\n * @param {number} value - the value to determine normalized base-2 fractional\n * exponent for\n * @returns {number} the normalized base-2 exponent\n */\nfunction getNormalBase2(value) {\n const dv = new DataView(new ArrayBuffer(8));\n dv.setFloat64(0, value);\n // access the raw 64-bit float as 32-bit uints\n const hiBits = dv.getUint32(0);\n const expBits = (hiBits & EXPONENT_MASK) >> 20;\n return expBits - EXPONENT_BIAS;\n}\nexports.getNormalBase2 = getNormalBase2;\n/**\n * GetSignificand returns the 52 bit (unsigned) significand as a signed value.\n * @param {number} value - the floating point number to extract the significand from\n * @returns {number} The 52-bit significand\n */\nfunction getSignificand(value) {\n const dv = new DataView(new ArrayBuffer(8));\n dv.setFloat64(0, value);\n // access the raw 64-bit float as two 32-bit uints\n const hiBits = dv.getUint32(0);\n const loBits = dv.getUint32(4);\n // extract the significand bits from the hi bits and left shift 32 places note:\n // we can't use the native << operator as it will truncate the result to 32-bits\n const significandHiBits = (hiBits & SIGNIFICAND_MASK) * Math.pow(2, 32);\n // combine the hi and lo bits and return\n return significandHiBits + loBits;\n}\nexports.getSignificand = getSignificand;\n//# sourceMappingURL=ieee754.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MappingError = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass MappingError extends Error {\n}\nexports.MappingError = MappingError;\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.nextGreaterSquare = exports.ldexp = void 0;\n/**\n * Note: other languages provide this as a built in function. This is\n * a naive, but functionally correct implementation. This is used sparingly,\n * when creating a new mapping in a running application.\n *\n * ldexp returns frac × 2**exp. With the following special cases:\n * ldexp(±0, exp) = ±0\n * ldexp(±Inf, exp) = ±Inf\n * ldexp(NaN, exp) = NaN\n * @param frac\n * @param exp\n * @returns {number}\n */\nfunction ldexp(frac, exp) {\n if (frac === 0 ||\n frac === Number.POSITIVE_INFINITY ||\n frac === Number.NEGATIVE_INFINITY ||\n Number.isNaN(frac)) {\n return frac;\n }\n return frac * Math.pow(2, exp);\n}\nexports.ldexp = ldexp;\n/**\n * Computes the next power of two that is greater than or equal to v.\n * This implementation more efficient than, but functionally equivalent\n * to Math.pow(2, Math.ceil(Math.log(x)/Math.log(2))).\n * @param v\n * @returns {number}\n */\nfunction nextGreaterSquare(v) {\n // The following expression computes the least power-of-two\n // that is >= v. There are a number of tricky ways to\n // do this, see https://stackoverflow.com/questions/466204/rounding-up-to-next-power-of-2\n v--;\n v |= v >> 1;\n v |= v >> 2;\n v |= v >> 4;\n v |= v >> 8;\n v |= v >> 16;\n v++;\n return v;\n}\nexports.nextGreaterSquare = nextGreaterSquare;\n//# sourceMappingURL=util.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SumAggregator = exports.SumAccumulation = exports.LastValueAggregator = exports.LastValueAccumulation = exports.ExponentialHistogramAggregator = exports.ExponentialHistogramAccumulation = exports.HistogramAggregator = exports.HistogramAccumulation = exports.DropAggregator = void 0;\nvar Drop_1 = require(\"./Drop\");\nObject.defineProperty(exports, \"DropAggregator\", { enumerable: true, get: function () { return Drop_1.DropAggregator; } });\nvar Histogram_1 = require(\"./Histogram\");\nObject.defineProperty(exports, \"HistogramAccumulation\", { enumerable: true, get: function () { return Histogram_1.HistogramAccumulation; } });\nObject.defineProperty(exports, \"HistogramAggregator\", { enumerable: true, get: function () { return Histogram_1.HistogramAggregator; } });\nvar ExponentialHistogram_1 = require(\"./ExponentialHistogram\");\nObject.defineProperty(exports, \"ExponentialHistogramAccumulation\", { enumerable: true, get: function () { return ExponentialHistogram_1.ExponentialHistogramAccumulation; } });\nObject.defineProperty(exports, \"ExponentialHistogramAggregator\", { enumerable: true, get: function () { return ExponentialHistogram_1.ExponentialHistogramAggregator; } });\nvar LastValue_1 = require(\"./LastValue\");\nObject.defineProperty(exports, \"LastValueAccumulation\", { enumerable: true, get: function () { return LastValue_1.LastValueAccumulation; } });\nObject.defineProperty(exports, \"LastValueAggregator\", { enumerable: true, get: function () { return LastValue_1.LastValueAggregator; } });\nvar Sum_1 = require(\"./Sum\");\nObject.defineProperty(exports, \"SumAccumulation\", { enumerable: true, get: function () { return Sum_1.SumAccumulation; } });\nObject.defineProperty(exports, \"SumAggregator\", { enumerable: true, get: function () { return Sum_1.SumAggregator; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AggregatorKind = void 0;\n/** The kind of aggregator. */\nvar AggregatorKind;\n(function (AggregatorKind) {\n AggregatorKind[AggregatorKind[\"DROP\"] = 0] = \"DROP\";\n AggregatorKind[AggregatorKind[\"SUM\"] = 1] = \"SUM\";\n AggregatorKind[AggregatorKind[\"LAST_VALUE\"] = 2] = \"LAST_VALUE\";\n AggregatorKind[AggregatorKind[\"HISTOGRAM\"] = 3] = \"HISTOGRAM\";\n AggregatorKind[AggregatorKind[\"EXPONENTIAL_HISTOGRAM\"] = 4] = \"EXPONENTIAL_HISTOGRAM\";\n})(AggregatorKind = exports.AggregatorKind || (exports.AggregatorKind = {}));\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR = exports.DEFAULT_AGGREGATION_SELECTOR = void 0;\nconst Aggregation_1 = require(\"../view/Aggregation\");\nconst AggregationTemporality_1 = require(\"./AggregationTemporality\");\nconst DEFAULT_AGGREGATION_SELECTOR = _instrumentType => Aggregation_1.Aggregation.Default();\nexports.DEFAULT_AGGREGATION_SELECTOR = DEFAULT_AGGREGATION_SELECTOR;\nconst DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR = _instrumentType => AggregationTemporality_1.AggregationTemporality.CUMULATIVE;\nexports.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR = DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR;\n//# sourceMappingURL=AggregationSelector.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AggregationTemporality = void 0;\n/**\n * AggregationTemporality indicates the way additive quantities are expressed.\n */\nvar AggregationTemporality;\n(function (AggregationTemporality) {\n AggregationTemporality[AggregationTemporality[\"DELTA\"] = 0] = \"DELTA\";\n AggregationTemporality[AggregationTemporality[\"CUMULATIVE\"] = 1] = \"CUMULATIVE\";\n})(AggregationTemporality = exports.AggregationTemporality || (exports.AggregationTemporality = {}));\n//# sourceMappingURL=AggregationTemporality.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ConsoleMetricExporter = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst core_1 = require(\"@opentelemetry/core\");\nconst AggregationSelector_1 = require(\"./AggregationSelector\");\n/**\n * This is an implementation of {@link PushMetricExporter} that prints metrics to the\n * console. This class can be used for diagnostic purposes.\n *\n * NOTE: This {@link PushMetricExporter} is intended for diagnostics use only, output rendered to the console may change at any time.\n */\n/* eslint-disable no-console */\nclass ConsoleMetricExporter {\n constructor(options) {\n var _a;\n this._shutdown = false;\n this._temporalitySelector =\n (_a = options === null || options === void 0 ? void 0 : options.temporalitySelector) !== null && _a !== void 0 ? _a : AggregationSelector_1.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR;\n }\n export(metrics, resultCallback) {\n if (this._shutdown) {\n // If the exporter is shutting down, by spec, we need to return FAILED as export result\n setImmediate(resultCallback, { code: core_1.ExportResultCode.FAILED });\n return;\n }\n return ConsoleMetricExporter._sendMetrics(metrics, resultCallback);\n }\n forceFlush() {\n return Promise.resolve();\n }\n selectAggregationTemporality(_instrumentType) {\n return this._temporalitySelector(_instrumentType);\n }\n shutdown() {\n this._shutdown = true;\n return Promise.resolve();\n }\n static _sendMetrics(metrics, done) {\n for (const scopeMetrics of metrics.scopeMetrics) {\n for (const metric of scopeMetrics.metrics) {\n console.dir({\n descriptor: metric.descriptor,\n dataPointType: metric.dataPointType,\n dataPoints: metric.dataPoints,\n }, { depth: null });\n }\n }\n done({ code: core_1.ExportResultCode.SUCCESS });\n }\n}\nexports.ConsoleMetricExporter = ConsoleMetricExporter;\n//# sourceMappingURL=ConsoleMetricExporter.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InMemoryMetricExporter = void 0;\nconst core_1 = require(\"@opentelemetry/core\");\n/**\n * In-memory Metrics Exporter is a Push Metric Exporter\n * which accumulates metrics data in the local memory and\n * allows to inspect it (useful for e.g. unit tests).\n */\nclass InMemoryMetricExporter {\n constructor(aggregationTemporality) {\n this._shutdown = false;\n this._metrics = [];\n this._aggregationTemporality = aggregationTemporality;\n }\n /**\n * @inheritedDoc\n */\n export(metrics, resultCallback) {\n // Avoid storing metrics when exporter is shutdown\n if (this._shutdown) {\n setTimeout(() => resultCallback({ code: core_1.ExportResultCode.FAILED }), 0);\n return;\n }\n this._metrics.push(metrics);\n setTimeout(() => resultCallback({ code: core_1.ExportResultCode.SUCCESS }), 0);\n }\n /**\n * Returns all the collected resource metrics\n * @returns ResourceMetrics[]\n */\n getMetrics() {\n return this._metrics;\n }\n forceFlush() {\n return Promise.resolve();\n }\n reset() {\n this._metrics = [];\n }\n selectAggregationTemporality(_instrumentType) {\n return this._aggregationTemporality;\n }\n shutdown() {\n this._shutdown = true;\n return Promise.resolve();\n }\n}\nexports.InMemoryMetricExporter = InMemoryMetricExporter;\n//# sourceMappingURL=InMemoryMetricExporter.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DataPointType = void 0;\n/**\n * The aggregated point data type.\n */\nvar DataPointType;\n(function (DataPointType) {\n /**\n * A histogram data point contains a histogram statistics of collected\n * values with a list of explicit bucket boundaries and statistics such\n * as min, max, count, and sum of all collected values.\n */\n DataPointType[DataPointType[\"HISTOGRAM\"] = 0] = \"HISTOGRAM\";\n /**\n * An exponential histogram data point contains a histogram statistics of\n * collected values where bucket boundaries are automatically calculated\n * using an exponential function, and statistics such as min, max, count,\n * and sum of all collected values.\n */\n DataPointType[DataPointType[\"EXPONENTIAL_HISTOGRAM\"] = 1] = \"EXPONENTIAL_HISTOGRAM\";\n /**\n * A gauge metric data point has only a single numeric value.\n */\n DataPointType[DataPointType[\"GAUGE\"] = 2] = \"GAUGE\";\n /**\n * A sum metric data point has a single numeric value and a\n * monotonicity-indicator.\n */\n DataPointType[DataPointType[\"SUM\"] = 3] = \"SUM\";\n})(DataPointType = exports.DataPointType || (exports.DataPointType = {}));\n//# sourceMappingURL=MetricData.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MetricReader = void 0;\nconst api = require(\"@opentelemetry/api\");\nconst utils_1 = require(\"../utils\");\nconst AggregationSelector_1 = require(\"./AggregationSelector\");\n/**\n * A registered reader of metrics that, when linked to a {@link MetricProducer}, offers global\n * control over metrics.\n */\nclass MetricReader {\n constructor(options) {\n var _a, _b, _c;\n // Tracks the shutdown state.\n // TODO: use BindOncePromise here once a new version of @opentelemetry/core is available.\n this._shutdown = false;\n this._aggregationSelector =\n (_a = options === null || options === void 0 ? void 0 : options.aggregationSelector) !== null && _a !== void 0 ? _a : AggregationSelector_1.DEFAULT_AGGREGATION_SELECTOR;\n this._aggregationTemporalitySelector =\n (_b = options === null || options === void 0 ? void 0 : options.aggregationTemporalitySelector) !== null && _b !== void 0 ? _b : AggregationSelector_1.DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR;\n this._metricProducers = (_c = options === null || options === void 0 ? void 0 : options.metricProducers) !== null && _c !== void 0 ? _c : [];\n }\n /**\n * Set the {@link MetricProducer} used by this instance. **This should only be called by the\n * SDK and should be considered internal.**\n *\n * To add additional {@link MetricProducer}s to a {@link MetricReader}, pass them to the\n * constructor as {@link MetricReaderOptions.metricProducers}.\n *\n * @internal\n * @param metricProducer\n */\n setMetricProducer(metricProducer) {\n if (this._sdkMetricProducer) {\n throw new Error('MetricReader can not be bound to a MeterProvider again.');\n }\n this._sdkMetricProducer = metricProducer;\n this.onInitialized();\n }\n /**\n * Select the {@link Aggregation} for the given {@link InstrumentType} for this\n * reader.\n */\n selectAggregation(instrumentType) {\n return this._aggregationSelector(instrumentType);\n }\n /**\n * Select the {@link AggregationTemporality} for the given\n * {@link InstrumentType} for this reader.\n */\n selectAggregationTemporality(instrumentType) {\n return this._aggregationTemporalitySelector(instrumentType);\n }\n /**\n * Handle once the SDK has initialized this {@link MetricReader}\n * Overriding this method is optional.\n */\n onInitialized() {\n // Default implementation is empty.\n }\n /**\n * Collect all metrics from the associated {@link MetricProducer}\n */\n async collect(options) {\n if (this._sdkMetricProducer === undefined) {\n throw new Error('MetricReader is not bound to a MetricProducer');\n }\n // Subsequent invocations to collect are not allowed. SDKs SHOULD return some failure for these calls.\n if (this._shutdown) {\n throw new Error('MetricReader is shutdown');\n }\n const [sdkCollectionResults, ...additionalCollectionResults] = await Promise.all([\n this._sdkMetricProducer.collect({\n timeoutMillis: options === null || options === void 0 ? void 0 : options.timeoutMillis,\n }),\n ...this._metricProducers.map(producer => producer.collect({\n timeoutMillis: options === null || options === void 0 ? void 0 : options.timeoutMillis,\n })),\n ]);\n // Merge the results, keeping the SDK's Resource\n const errors = sdkCollectionResults.errors.concat((0, utils_1.FlatMap)(additionalCollectionResults, result => result.errors));\n const resource = sdkCollectionResults.resourceMetrics.resource;\n const scopeMetrics = sdkCollectionResults.resourceMetrics.scopeMetrics.concat((0, utils_1.FlatMap)(additionalCollectionResults, result => result.resourceMetrics.scopeMetrics));\n return {\n resourceMetrics: {\n resource,\n scopeMetrics,\n },\n errors,\n };\n }\n /**\n * Shuts down the metric reader, the promise will reject after the optional timeout or resolve after completion.\n *\n *

NOTE: this operation will continue even after the promise rejects due to a timeout.\n * @param options options with timeout.\n */\n async shutdown(options) {\n // Do not call shutdown again if it has already been called.\n if (this._shutdown) {\n api.diag.error('Cannot call shutdown twice.');\n return;\n }\n // No timeout if timeoutMillis is undefined or null.\n if ((options === null || options === void 0 ? void 0 : options.timeoutMillis) == null) {\n await this.onShutdown();\n }\n else {\n await (0, utils_1.callWithTimeout)(this.onShutdown(), options.timeoutMillis);\n }\n this._shutdown = true;\n }\n /**\n * Flushes metrics read by this reader, the promise will reject after the optional timeout or resolve after completion.\n *\n *

NOTE: this operation will continue even after the promise rejects due to a timeout.\n * @param options options with timeout.\n */\n async forceFlush(options) {\n if (this._shutdown) {\n api.diag.warn('Cannot forceFlush on already shutdown MetricReader.');\n return;\n }\n // No timeout if timeoutMillis is undefined or null.\n if ((options === null || options === void 0 ? void 0 : options.timeoutMillis) == null) {\n await this.onForceFlush();\n return;\n }\n await (0, utils_1.callWithTimeout)(this.onForceFlush(), options.timeoutMillis);\n }\n}\nexports.MetricReader = MetricReader;\n//# sourceMappingURL=MetricReader.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PeriodicExportingMetricReader = void 0;\nconst api = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst MetricReader_1 = require(\"./MetricReader\");\nconst utils_1 = require(\"../utils\");\nconst api_1 = require(\"@opentelemetry/api\");\n/**\n * {@link MetricReader} which collects metrics based on a user-configurable time interval, and passes the metrics to\n * the configured {@link PushMetricExporter}\n */\nclass PeriodicExportingMetricReader extends MetricReader_1.MetricReader {\n constructor(options) {\n var _a, _b, _c, _d;\n super({\n aggregationSelector: (_a = options.exporter.selectAggregation) === null || _a === void 0 ? void 0 : _a.bind(options.exporter),\n aggregationTemporalitySelector: (_b = options.exporter.selectAggregationTemporality) === null || _b === void 0 ? void 0 : _b.bind(options.exporter),\n metricProducers: options.metricProducers,\n });\n if (options.exportIntervalMillis !== undefined &&\n options.exportIntervalMillis <= 0) {\n throw Error('exportIntervalMillis must be greater than 0');\n }\n if (options.exportTimeoutMillis !== undefined &&\n options.exportTimeoutMillis <= 0) {\n throw Error('exportTimeoutMillis must be greater than 0');\n }\n if (options.exportTimeoutMillis !== undefined &&\n options.exportIntervalMillis !== undefined &&\n options.exportIntervalMillis < options.exportTimeoutMillis) {\n throw Error('exportIntervalMillis must be greater than or equal to exportTimeoutMillis');\n }\n this._exportInterval = (_c = options.exportIntervalMillis) !== null && _c !== void 0 ? _c : 60000;\n this._exportTimeout = (_d = options.exportTimeoutMillis) !== null && _d !== void 0 ? _d : 30000;\n this._exporter = options.exporter;\n }\n async _runOnce() {\n try {\n await (0, utils_1.callWithTimeout)(this._doRun(), this._exportTimeout);\n }\n catch (err) {\n if (err instanceof utils_1.TimeoutError) {\n api.diag.error('Export took longer than %s milliseconds and timed out.', this._exportTimeout);\n return;\n }\n (0, core_1.globalErrorHandler)(err);\n }\n }\n async _doRun() {\n var _a, _b;\n const { resourceMetrics, errors } = await this.collect({\n timeoutMillis: this._exportTimeout,\n });\n if (errors.length > 0) {\n api.diag.error('PeriodicExportingMetricReader: metrics collection errors', ...errors);\n }\n const doExport = async () => {\n const result = await core_1.internal._export(this._exporter, resourceMetrics);\n if (result.code !== core_1.ExportResultCode.SUCCESS) {\n throw new Error(`PeriodicExportingMetricReader: metrics export failed (error ${result.error})`);\n }\n };\n // Avoid scheduling a promise to make the behavior more predictable and easier to test\n if (resourceMetrics.resource.asyncAttributesPending) {\n (_b = (_a = resourceMetrics.resource).waitForAsyncAttributes) === null || _b === void 0 ? void 0 : _b.call(_a).then(doExport, err => api_1.diag.debug('Error while resolving async portion of resource: ', err));\n }\n else {\n await doExport();\n }\n }\n onInitialized() {\n // start running the interval as soon as this reader is initialized and keep handle for shutdown.\n this._interval = setInterval(() => {\n // this._runOnce never rejects. Using void operator to suppress @typescript-eslint/no-floating-promises.\n void this._runOnce();\n }, this._exportInterval);\n (0, core_1.unrefTimer)(this._interval);\n }\n async onForceFlush() {\n await this._runOnce();\n await this._exporter.forceFlush();\n }\n async onShutdown() {\n if (this._interval) {\n clearInterval(this._interval);\n }\n await this._exporter.shutdown();\n }\n}\nexports.PeriodicExportingMetricReader = PeriodicExportingMetricReader;\n//# sourceMappingURL=PeriodicExportingMetricReader.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TimeoutError = exports.View = exports.Aggregation = exports.SumAggregation = exports.LastValueAggregation = exports.HistogramAggregation = exports.DropAggregation = exports.ExponentialHistogramAggregation = exports.ExplicitBucketHistogramAggregation = exports.DefaultAggregation = exports.MeterProvider = exports.InstrumentType = exports.ConsoleMetricExporter = exports.InMemoryMetricExporter = exports.PeriodicExportingMetricReader = exports.MetricReader = exports.DataPointType = exports.AggregationTemporality = void 0;\nvar AggregationTemporality_1 = require(\"./export/AggregationTemporality\");\nObject.defineProperty(exports, \"AggregationTemporality\", { enumerable: true, get: function () { return AggregationTemporality_1.AggregationTemporality; } });\nvar MetricData_1 = require(\"./export/MetricData\");\nObject.defineProperty(exports, \"DataPointType\", { enumerable: true, get: function () { return MetricData_1.DataPointType; } });\nvar MetricReader_1 = require(\"./export/MetricReader\");\nObject.defineProperty(exports, \"MetricReader\", { enumerable: true, get: function () { return MetricReader_1.MetricReader; } });\nvar PeriodicExportingMetricReader_1 = require(\"./export/PeriodicExportingMetricReader\");\nObject.defineProperty(exports, \"PeriodicExportingMetricReader\", { enumerable: true, get: function () { return PeriodicExportingMetricReader_1.PeriodicExportingMetricReader; } });\nvar InMemoryMetricExporter_1 = require(\"./export/InMemoryMetricExporter\");\nObject.defineProperty(exports, \"InMemoryMetricExporter\", { enumerable: true, get: function () { return InMemoryMetricExporter_1.InMemoryMetricExporter; } });\nvar ConsoleMetricExporter_1 = require(\"./export/ConsoleMetricExporter\");\nObject.defineProperty(exports, \"ConsoleMetricExporter\", { enumerable: true, get: function () { return ConsoleMetricExporter_1.ConsoleMetricExporter; } });\nvar InstrumentDescriptor_1 = require(\"./InstrumentDescriptor\");\nObject.defineProperty(exports, \"InstrumentType\", { enumerable: true, get: function () { return InstrumentDescriptor_1.InstrumentType; } });\nvar MeterProvider_1 = require(\"./MeterProvider\");\nObject.defineProperty(exports, \"MeterProvider\", { enumerable: true, get: function () { return MeterProvider_1.MeterProvider; } });\nvar Aggregation_1 = require(\"./view/Aggregation\");\nObject.defineProperty(exports, \"DefaultAggregation\", { enumerable: true, get: function () { return Aggregation_1.DefaultAggregation; } });\nObject.defineProperty(exports, \"ExplicitBucketHistogramAggregation\", { enumerable: true, get: function () { return Aggregation_1.ExplicitBucketHistogramAggregation; } });\nObject.defineProperty(exports, \"ExponentialHistogramAggregation\", { enumerable: true, get: function () { return Aggregation_1.ExponentialHistogramAggregation; } });\nObject.defineProperty(exports, \"DropAggregation\", { enumerable: true, get: function () { return Aggregation_1.DropAggregation; } });\nObject.defineProperty(exports, \"HistogramAggregation\", { enumerable: true, get: function () { return Aggregation_1.HistogramAggregation; } });\nObject.defineProperty(exports, \"LastValueAggregation\", { enumerable: true, get: function () { return Aggregation_1.LastValueAggregation; } });\nObject.defineProperty(exports, \"SumAggregation\", { enumerable: true, get: function () { return Aggregation_1.SumAggregation; } });\nObject.defineProperty(exports, \"Aggregation\", { enumerable: true, get: function () { return Aggregation_1.Aggregation; } });\nvar View_1 = require(\"./view/View\");\nObject.defineProperty(exports, \"View\", { enumerable: true, get: function () { return View_1.View; } });\nvar utils_1 = require(\"./utils\");\nObject.defineProperty(exports, \"TimeoutError\", { enumerable: true, get: function () { return utils_1.TimeoutError; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncMetricStorage = void 0;\nconst MetricStorage_1 = require(\"./MetricStorage\");\nconst DeltaMetricProcessor_1 = require(\"./DeltaMetricProcessor\");\nconst TemporalMetricProcessor_1 = require(\"./TemporalMetricProcessor\");\nconst HashMap_1 = require(\"./HashMap\");\n/**\n * Internal interface.\n *\n * Stores and aggregates {@link MetricData} for asynchronous instruments.\n */\nclass AsyncMetricStorage extends MetricStorage_1.MetricStorage {\n constructor(_instrumentDescriptor, aggregator, _attributesProcessor, collectorHandles) {\n super(_instrumentDescriptor);\n this._attributesProcessor = _attributesProcessor;\n this._deltaMetricStorage = new DeltaMetricProcessor_1.DeltaMetricProcessor(aggregator);\n this._temporalMetricStorage = new TemporalMetricProcessor_1.TemporalMetricProcessor(aggregator, collectorHandles);\n }\n record(measurements, observationTime) {\n const processed = new HashMap_1.AttributeHashMap();\n Array.from(measurements.entries()).forEach(([attributes, value]) => {\n processed.set(this._attributesProcessor.process(attributes), value);\n });\n this._deltaMetricStorage.batchCumulate(processed, observationTime);\n }\n /**\n * Collects the metrics from this storage. The ObservableCallback is invoked\n * during the collection.\n *\n * Note: This is a stateful operation and may reset any interval-related\n * state for the MetricCollector.\n */\n collect(collector, collectionTime) {\n const accumulations = this._deltaMetricStorage.collect();\n return this._temporalMetricStorage.buildMetrics(collector, this._instrumentDescriptor, accumulations, collectionTime);\n }\n}\nexports.AsyncMetricStorage = AsyncMetricStorage;\n//# sourceMappingURL=AsyncMetricStorage.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeltaMetricProcessor = void 0;\nconst HashMap_1 = require(\"./HashMap\");\n/**\n * Internal interface.\n *\n * Allows synchronous collection of metrics. This processor should allow\n * allocation of new aggregation cells for metrics and convert cumulative\n * recording to delta data points.\n */\nclass DeltaMetricProcessor {\n constructor(_aggregator) {\n this._aggregator = _aggregator;\n this._activeCollectionStorage = new HashMap_1.AttributeHashMap();\n // TODO: find a reasonable mean to clean the memo;\n // https://github.com/open-telemetry/opentelemetry-specification/pull/2208\n this._cumulativeMemoStorage = new HashMap_1.AttributeHashMap();\n }\n record(value, attributes, _context, collectionTime) {\n const accumulation = this._activeCollectionStorage.getOrDefault(attributes, () => this._aggregator.createAccumulation(collectionTime));\n accumulation === null || accumulation === void 0 ? void 0 : accumulation.record(value);\n }\n batchCumulate(measurements, collectionTime) {\n Array.from(measurements.entries()).forEach(([attributes, value, hashCode]) => {\n const accumulation = this._aggregator.createAccumulation(collectionTime);\n accumulation === null || accumulation === void 0 ? void 0 : accumulation.record(value);\n let delta = accumulation;\n // Diff with recorded cumulative memo.\n if (this._cumulativeMemoStorage.has(attributes, hashCode)) {\n // has() returned true, previous is present.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const previous = this._cumulativeMemoStorage.get(attributes, hashCode);\n delta = this._aggregator.diff(previous, accumulation);\n }\n // Merge with uncollected active delta.\n if (this._activeCollectionStorage.has(attributes, hashCode)) {\n // has() returned true, previous is present.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const active = this._activeCollectionStorage.get(attributes, hashCode);\n delta = this._aggregator.merge(active, delta);\n }\n // Save the current record and the delta record.\n this._cumulativeMemoStorage.set(attributes, accumulation, hashCode);\n this._activeCollectionStorage.set(attributes, delta, hashCode);\n });\n }\n /**\n * Returns a collection of delta metrics. Start time is the when first\n * time event collected.\n */\n collect() {\n const unreportedDelta = this._activeCollectionStorage;\n this._activeCollectionStorage = new HashMap_1.AttributeHashMap();\n return unreportedDelta;\n }\n}\nexports.DeltaMetricProcessor = DeltaMetricProcessor;\n//# sourceMappingURL=DeltaMetricProcessor.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AttributeHashMap = exports.HashMap = void 0;\nconst utils_1 = require(\"../utils\");\nclass HashMap {\n constructor(_hash) {\n this._hash = _hash;\n this._valueMap = new Map();\n this._keyMap = new Map();\n }\n get(key, hashCode) {\n hashCode !== null && hashCode !== void 0 ? hashCode : (hashCode = this._hash(key));\n return this._valueMap.get(hashCode);\n }\n getOrDefault(key, defaultFactory) {\n const hash = this._hash(key);\n if (this._valueMap.has(hash)) {\n return this._valueMap.get(hash);\n }\n const val = defaultFactory();\n if (!this._keyMap.has(hash)) {\n this._keyMap.set(hash, key);\n }\n this._valueMap.set(hash, val);\n return val;\n }\n set(key, value, hashCode) {\n hashCode !== null && hashCode !== void 0 ? hashCode : (hashCode = this._hash(key));\n if (!this._keyMap.has(hashCode)) {\n this._keyMap.set(hashCode, key);\n }\n this._valueMap.set(hashCode, value);\n }\n has(key, hashCode) {\n hashCode !== null && hashCode !== void 0 ? hashCode : (hashCode = this._hash(key));\n return this._valueMap.has(hashCode);\n }\n *keys() {\n const keyIterator = this._keyMap.entries();\n let next = keyIterator.next();\n while (next.done !== true) {\n yield [next.value[1], next.value[0]];\n next = keyIterator.next();\n }\n }\n *entries() {\n const valueIterator = this._valueMap.entries();\n let next = valueIterator.next();\n while (next.done !== true) {\n // next.value[0] here can not be undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n yield [this._keyMap.get(next.value[0]), next.value[1], next.value[0]];\n next = valueIterator.next();\n }\n }\n get size() {\n return this._valueMap.size;\n }\n}\nexports.HashMap = HashMap;\nclass AttributeHashMap extends HashMap {\n constructor() {\n super(utils_1.hashAttributes);\n }\n}\nexports.AttributeHashMap = AttributeHashMap;\n//# sourceMappingURL=HashMap.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MeterProviderSharedState = void 0;\nconst utils_1 = require(\"../utils\");\nconst ViewRegistry_1 = require(\"../view/ViewRegistry\");\nconst MeterSharedState_1 = require(\"./MeterSharedState\");\n/**\n * An internal record for shared meter provider states.\n */\nclass MeterProviderSharedState {\n constructor(resource) {\n this.resource = resource;\n this.viewRegistry = new ViewRegistry_1.ViewRegistry();\n this.metricCollectors = [];\n this.meterSharedStates = new Map();\n }\n getMeterSharedState(instrumentationScope) {\n const id = (0, utils_1.instrumentationScopeId)(instrumentationScope);\n let meterSharedState = this.meterSharedStates.get(id);\n if (meterSharedState == null) {\n meterSharedState = new MeterSharedState_1.MeterSharedState(this, instrumentationScope);\n this.meterSharedStates.set(id, meterSharedState);\n }\n return meterSharedState;\n }\n selectAggregations(instrumentType) {\n const result = [];\n for (const collector of this.metricCollectors) {\n result.push([collector, collector.selectAggregation(instrumentType)]);\n }\n return result;\n }\n}\nexports.MeterProviderSharedState = MeterProviderSharedState;\n//# sourceMappingURL=MeterProviderSharedState.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MeterSharedState = void 0;\nconst InstrumentDescriptor_1 = require(\"../InstrumentDescriptor\");\nconst Meter_1 = require(\"../Meter\");\nconst utils_1 = require(\"../utils\");\nconst AsyncMetricStorage_1 = require(\"./AsyncMetricStorage\");\nconst MetricStorageRegistry_1 = require(\"./MetricStorageRegistry\");\nconst MultiWritableMetricStorage_1 = require(\"./MultiWritableMetricStorage\");\nconst ObservableRegistry_1 = require(\"./ObservableRegistry\");\nconst SyncMetricStorage_1 = require(\"./SyncMetricStorage\");\nconst AttributesProcessor_1 = require(\"../view/AttributesProcessor\");\n/**\n * An internal record for shared meter provider states.\n */\nclass MeterSharedState {\n constructor(_meterProviderSharedState, _instrumentationScope) {\n this._meterProviderSharedState = _meterProviderSharedState;\n this._instrumentationScope = _instrumentationScope;\n this.metricStorageRegistry = new MetricStorageRegistry_1.MetricStorageRegistry();\n this.observableRegistry = new ObservableRegistry_1.ObservableRegistry();\n this.meter = new Meter_1.Meter(this);\n }\n registerMetricStorage(descriptor) {\n const storages = this._registerMetricStorage(descriptor, SyncMetricStorage_1.SyncMetricStorage);\n if (storages.length === 1) {\n return storages[0];\n }\n return new MultiWritableMetricStorage_1.MultiMetricStorage(storages);\n }\n registerAsyncMetricStorage(descriptor) {\n const storages = this._registerMetricStorage(descriptor, AsyncMetricStorage_1.AsyncMetricStorage);\n return storages;\n }\n /**\n * @param collector opaque handle of {@link MetricCollector} which initiated the collection.\n * @param collectionTime the HrTime at which the collection was initiated.\n * @param options options for collection.\n * @returns the list of metric data collected.\n */\n async collect(collector, collectionTime, options) {\n /**\n * 1. Call all observable callbacks first.\n * 2. Collect metric result for the collector.\n */\n const errors = await this.observableRegistry.observe(collectionTime, options === null || options === void 0 ? void 0 : options.timeoutMillis);\n const storages = this.metricStorageRegistry.getStorages(collector);\n // prevent more allocations if there are no storages.\n if (storages.length === 0) {\n return null;\n }\n const metricDataList = storages\n .map(metricStorage => {\n return metricStorage.collect(collector, collectionTime);\n })\n .filter(utils_1.isNotNullish);\n // skip this scope if no data was collected (storage created, but no data observed)\n if (metricDataList.length === 0) {\n return { errors };\n }\n return {\n scopeMetrics: {\n scope: this._instrumentationScope,\n metrics: metricDataList,\n },\n errors,\n };\n }\n _registerMetricStorage(descriptor, MetricStorageType) {\n const views = this._meterProviderSharedState.viewRegistry.findViews(descriptor, this._instrumentationScope);\n let storages = views.map(view => {\n const viewDescriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptorWithView)(view, descriptor);\n const compatibleStorage = this.metricStorageRegistry.findOrUpdateCompatibleStorage(viewDescriptor);\n if (compatibleStorage != null) {\n return compatibleStorage;\n }\n const aggregator = view.aggregation.createAggregator(viewDescriptor);\n const viewStorage = new MetricStorageType(viewDescriptor, aggregator, view.attributesProcessor, this._meterProviderSharedState.metricCollectors);\n this.metricStorageRegistry.register(viewStorage);\n return viewStorage;\n });\n // Fallback to the per-collector aggregations if no view is configured for the instrument.\n if (storages.length === 0) {\n const perCollectorAggregations = this._meterProviderSharedState.selectAggregations(descriptor.type);\n const collectorStorages = perCollectorAggregations.map(([collector, aggregation]) => {\n const compatibleStorage = this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(collector, descriptor);\n if (compatibleStorage != null) {\n return compatibleStorage;\n }\n const aggregator = aggregation.createAggregator(descriptor);\n const storage = new MetricStorageType(descriptor, aggregator, AttributesProcessor_1.AttributesProcessor.Noop(), [collector]);\n this.metricStorageRegistry.registerForCollector(collector, storage);\n return storage;\n });\n storages = storages.concat(collectorStorages);\n }\n return storages;\n }\n}\nexports.MeterSharedState = MeterSharedState;\n//# sourceMappingURL=MeterSharedState.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MetricCollector = void 0;\nconst core_1 = require(\"@opentelemetry/core\");\n/**\n * An internal opaque interface that the MetricReader receives as\n * MetricProducer. It acts as the storage key to the internal metric stream\n * state for each MetricReader.\n */\nclass MetricCollector {\n constructor(_sharedState, _metricReader) {\n this._sharedState = _sharedState;\n this._metricReader = _metricReader;\n }\n async collect(options) {\n const collectionTime = (0, core_1.millisToHrTime)(Date.now());\n const scopeMetrics = [];\n const errors = [];\n const meterCollectionPromises = Array.from(this._sharedState.meterSharedStates.values()).map(async (meterSharedState) => {\n const current = await meterSharedState.collect(this, collectionTime, options);\n // only add scope metrics if available\n if ((current === null || current === void 0 ? void 0 : current.scopeMetrics) != null) {\n scopeMetrics.push(current.scopeMetrics);\n }\n // only add errors if available\n if ((current === null || current === void 0 ? void 0 : current.errors) != null) {\n errors.push(...current.errors);\n }\n });\n await Promise.all(meterCollectionPromises);\n return {\n resourceMetrics: {\n resource: this._sharedState.resource,\n scopeMetrics: scopeMetrics,\n },\n errors: errors,\n };\n }\n /**\n * Delegates for MetricReader.forceFlush.\n */\n async forceFlush(options) {\n await this._metricReader.forceFlush(options);\n }\n /**\n * Delegates for MetricReader.shutdown.\n */\n async shutdown(options) {\n await this._metricReader.shutdown(options);\n }\n selectAggregationTemporality(instrumentType) {\n return this._metricReader.selectAggregationTemporality(instrumentType);\n }\n selectAggregation(instrumentType) {\n return this._metricReader.selectAggregation(instrumentType);\n }\n}\nexports.MetricCollector = MetricCollector;\n//# sourceMappingURL=MetricCollector.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MetricStorage = void 0;\nconst InstrumentDescriptor_1 = require(\"../InstrumentDescriptor\");\n/**\n * Internal interface.\n *\n * Represents a storage from which we can collect metrics.\n */\nclass MetricStorage {\n constructor(_instrumentDescriptor) {\n this._instrumentDescriptor = _instrumentDescriptor;\n }\n getInstrumentDescriptor() {\n return this._instrumentDescriptor;\n }\n updateDescription(description) {\n this._instrumentDescriptor = (0, InstrumentDescriptor_1.createInstrumentDescriptor)(this._instrumentDescriptor.name, this._instrumentDescriptor.type, {\n description: description,\n valueType: this._instrumentDescriptor.valueType,\n unit: this._instrumentDescriptor.unit,\n advice: this._instrumentDescriptor.advice,\n });\n }\n}\nexports.MetricStorage = MetricStorage;\n//# sourceMappingURL=MetricStorage.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MetricStorageRegistry = void 0;\nconst InstrumentDescriptor_1 = require(\"../InstrumentDescriptor\");\nconst api = require(\"@opentelemetry/api\");\nconst RegistrationConflicts_1 = require(\"../view/RegistrationConflicts\");\n/**\n * Internal class for storing {@link MetricStorage}\n */\nclass MetricStorageRegistry {\n constructor() {\n this._sharedRegistry = new Map();\n this._perCollectorRegistry = new Map();\n }\n static create() {\n return new MetricStorageRegistry();\n }\n getStorages(collector) {\n let storages = [];\n for (const metricStorages of this._sharedRegistry.values()) {\n storages = storages.concat(metricStorages);\n }\n const perCollectorStorages = this._perCollectorRegistry.get(collector);\n if (perCollectorStorages != null) {\n for (const metricStorages of perCollectorStorages.values()) {\n storages = storages.concat(metricStorages);\n }\n }\n return storages;\n }\n register(storage) {\n this._registerStorage(storage, this._sharedRegistry);\n }\n registerForCollector(collector, storage) {\n let storageMap = this._perCollectorRegistry.get(collector);\n if (storageMap == null) {\n storageMap = new Map();\n this._perCollectorRegistry.set(collector, storageMap);\n }\n this._registerStorage(storage, storageMap);\n }\n findOrUpdateCompatibleStorage(expectedDescriptor) {\n const storages = this._sharedRegistry.get(expectedDescriptor.name);\n if (storages === undefined) {\n return null;\n }\n // If the descriptor is compatible, the type of their metric storage\n // (either SyncMetricStorage or AsyncMetricStorage) must be compatible.\n return this._findOrUpdateCompatibleStorage(expectedDescriptor, storages);\n }\n findOrUpdateCompatibleCollectorStorage(collector, expectedDescriptor) {\n const storageMap = this._perCollectorRegistry.get(collector);\n if (storageMap === undefined) {\n return null;\n }\n const storages = storageMap.get(expectedDescriptor.name);\n if (storages === undefined) {\n return null;\n }\n // If the descriptor is compatible, the type of their metric storage\n // (either SyncMetricStorage or AsyncMetricStorage) must be compatible.\n return this._findOrUpdateCompatibleStorage(expectedDescriptor, storages);\n }\n _registerStorage(storage, storageMap) {\n const descriptor = storage.getInstrumentDescriptor();\n const storages = storageMap.get(descriptor.name);\n if (storages === undefined) {\n storageMap.set(descriptor.name, [storage]);\n return;\n }\n storages.push(storage);\n }\n _findOrUpdateCompatibleStorage(expectedDescriptor, existingStorages) {\n let compatibleStorage = null;\n for (const existingStorage of existingStorages) {\n const existingDescriptor = existingStorage.getInstrumentDescriptor();\n if ((0, InstrumentDescriptor_1.isDescriptorCompatibleWith)(existingDescriptor, expectedDescriptor)) {\n // Use the longer description if it does not match.\n if (existingDescriptor.description !== expectedDescriptor.description) {\n if (expectedDescriptor.description.length >\n existingDescriptor.description.length) {\n existingStorage.updateDescription(expectedDescriptor.description);\n }\n api.diag.warn('A view or instrument with the name ', expectedDescriptor.name, ' has already been registered, but has a different description and is incompatible with another registered view.\\n', 'Details:\\n', (0, RegistrationConflicts_1.getIncompatibilityDetails)(existingDescriptor, expectedDescriptor), 'The longer description will be used.\\nTo resolve the conflict:', (0, RegistrationConflicts_1.getConflictResolutionRecipe)(existingDescriptor, expectedDescriptor));\n }\n // Storage is fully compatible. There will never be more than one pre-existing fully compatible storage.\n compatibleStorage = existingStorage;\n }\n else {\n // The implementation SHOULD warn about duplicate instrument registration\n // conflicts after applying View configuration.\n api.diag.warn('A view or instrument with the name ', expectedDescriptor.name, ' has already been registered and is incompatible with another registered view.\\n', 'Details:\\n', (0, RegistrationConflicts_1.getIncompatibilityDetails)(existingDescriptor, expectedDescriptor), 'To resolve the conflict:\\n', (0, RegistrationConflicts_1.getConflictResolutionRecipe)(existingDescriptor, expectedDescriptor));\n }\n }\n return compatibleStorage;\n }\n}\nexports.MetricStorageRegistry = MetricStorageRegistry;\n//# sourceMappingURL=MetricStorageRegistry.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MultiMetricStorage = void 0;\n/**\n * Internal interface.\n */\nclass MultiMetricStorage {\n constructor(_backingStorages) {\n this._backingStorages = _backingStorages;\n }\n record(value, attributes, context, recordTime) {\n this._backingStorages.forEach(it => {\n it.record(value, attributes, context, recordTime);\n });\n }\n}\nexports.MultiMetricStorage = MultiMetricStorage;\n//# sourceMappingURL=MultiWritableMetricStorage.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ObservableRegistry = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst Instruments_1 = require(\"../Instruments\");\nconst ObservableResult_1 = require(\"../ObservableResult\");\nconst utils_1 = require(\"../utils\");\n/**\n * An internal interface for managing ObservableCallbacks.\n *\n * Every registered callback associated with a set of instruments are be evaluated\n * exactly once during collection prior to reading data for that instrument.\n */\nclass ObservableRegistry {\n constructor() {\n this._callbacks = [];\n this._batchCallbacks = [];\n }\n addCallback(callback, instrument) {\n const idx = this._findCallback(callback, instrument);\n if (idx >= 0) {\n return;\n }\n this._callbacks.push({ callback, instrument });\n }\n removeCallback(callback, instrument) {\n const idx = this._findCallback(callback, instrument);\n if (idx < 0) {\n return;\n }\n this._callbacks.splice(idx, 1);\n }\n addBatchCallback(callback, instruments) {\n // Create a set of unique instruments.\n const observableInstruments = new Set(instruments.filter(Instruments_1.isObservableInstrument));\n if (observableInstruments.size === 0) {\n api_1.diag.error('BatchObservableCallback is not associated with valid instruments', instruments);\n return;\n }\n const idx = this._findBatchCallback(callback, observableInstruments);\n if (idx >= 0) {\n return;\n }\n this._batchCallbacks.push({ callback, instruments: observableInstruments });\n }\n removeBatchCallback(callback, instruments) {\n // Create a set of unique instruments.\n const observableInstruments = new Set(instruments.filter(Instruments_1.isObservableInstrument));\n const idx = this._findBatchCallback(callback, observableInstruments);\n if (idx < 0) {\n return;\n }\n this._batchCallbacks.splice(idx, 1);\n }\n /**\n * @returns a promise of rejected reasons for invoking callbacks.\n */\n async observe(collectionTime, timeoutMillis) {\n const callbackFutures = this._observeCallbacks(collectionTime, timeoutMillis);\n const batchCallbackFutures = this._observeBatchCallbacks(collectionTime, timeoutMillis);\n const results = await (0, utils_1.PromiseAllSettled)([\n ...callbackFutures,\n ...batchCallbackFutures,\n ]);\n const rejections = results\n .filter(utils_1.isPromiseAllSettledRejectionResult)\n .map(it => it.reason);\n return rejections;\n }\n _observeCallbacks(observationTime, timeoutMillis) {\n return this._callbacks.map(async ({ callback, instrument }) => {\n const observableResult = new ObservableResult_1.ObservableResultImpl(instrument._descriptor.name, instrument._descriptor.valueType);\n let callPromise = Promise.resolve(callback(observableResult));\n if (timeoutMillis != null) {\n callPromise = (0, utils_1.callWithTimeout)(callPromise, timeoutMillis);\n }\n await callPromise;\n instrument._metricStorages.forEach(metricStorage => {\n metricStorage.record(observableResult._buffer, observationTime);\n });\n });\n }\n _observeBatchCallbacks(observationTime, timeoutMillis) {\n return this._batchCallbacks.map(async ({ callback, instruments }) => {\n const observableResult = new ObservableResult_1.BatchObservableResultImpl();\n let callPromise = Promise.resolve(callback(observableResult));\n if (timeoutMillis != null) {\n callPromise = (0, utils_1.callWithTimeout)(callPromise, timeoutMillis);\n }\n await callPromise;\n instruments.forEach(instrument => {\n const buffer = observableResult._buffer.get(instrument);\n if (buffer == null) {\n return;\n }\n instrument._metricStorages.forEach(metricStorage => {\n metricStorage.record(buffer, observationTime);\n });\n });\n });\n }\n _findCallback(callback, instrument) {\n return this._callbacks.findIndex(record => {\n return record.callback === callback && record.instrument === instrument;\n });\n }\n _findBatchCallback(callback, instruments) {\n return this._batchCallbacks.findIndex(record => {\n return (record.callback === callback &&\n (0, utils_1.setEquals)(record.instruments, instruments));\n });\n }\n}\nexports.ObservableRegistry = ObservableRegistry;\n//# sourceMappingURL=ObservableRegistry.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SyncMetricStorage = void 0;\nconst MetricStorage_1 = require(\"./MetricStorage\");\nconst DeltaMetricProcessor_1 = require(\"./DeltaMetricProcessor\");\nconst TemporalMetricProcessor_1 = require(\"./TemporalMetricProcessor\");\n/**\n * Internal interface.\n *\n * Stores and aggregates {@link MetricData} for synchronous instruments.\n */\nclass SyncMetricStorage extends MetricStorage_1.MetricStorage {\n constructor(instrumentDescriptor, aggregator, _attributesProcessor, collectorHandles) {\n super(instrumentDescriptor);\n this._attributesProcessor = _attributesProcessor;\n this._deltaMetricStorage = new DeltaMetricProcessor_1.DeltaMetricProcessor(aggregator);\n this._temporalMetricStorage = new TemporalMetricProcessor_1.TemporalMetricProcessor(aggregator, collectorHandles);\n }\n record(value, attributes, context, recordTime) {\n attributes = this._attributesProcessor.process(attributes, context);\n this._deltaMetricStorage.record(value, attributes, context, recordTime);\n }\n /**\n * Collects the metrics from this storage.\n *\n * Note: This is a stateful operation and may reset any interval-related\n * state for the MetricCollector.\n */\n collect(collector, collectionTime) {\n const accumulations = this._deltaMetricStorage.collect();\n return this._temporalMetricStorage.buildMetrics(collector, this._instrumentDescriptor, accumulations, collectionTime);\n }\n}\nexports.SyncMetricStorage = SyncMetricStorage;\n//# sourceMappingURL=SyncMetricStorage.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TemporalMetricProcessor = void 0;\nconst AggregationTemporality_1 = require(\"../export/AggregationTemporality\");\nconst HashMap_1 = require(\"./HashMap\");\n/**\n * Internal interface.\n *\n * Provides unique reporting for each collector. Allows synchronous collection\n * of metrics and reports given temporality values.\n */\nclass TemporalMetricProcessor {\n constructor(_aggregator, collectorHandles) {\n this._aggregator = _aggregator;\n this._unreportedAccumulations = new Map();\n this._reportHistory = new Map();\n collectorHandles.forEach(handle => {\n this._unreportedAccumulations.set(handle, []);\n });\n }\n /**\n * Builds the {@link MetricData} streams to report against a specific MetricCollector.\n * @param collector The information of the MetricCollector.\n * @param collectors The registered collectors.\n * @param instrumentDescriptor The instrumentation descriptor that these metrics generated with.\n * @param currentAccumulations The current accumulation of metric data from instruments.\n * @param collectionTime The current collection timestamp.\n * @returns The {@link MetricData} points or `null`.\n */\n buildMetrics(collector, instrumentDescriptor, currentAccumulations, collectionTime) {\n this._stashAccumulations(currentAccumulations);\n const unreportedAccumulations = this._getMergedUnreportedAccumulations(collector);\n let result = unreportedAccumulations;\n let aggregationTemporality;\n // Check our last report time.\n if (this._reportHistory.has(collector)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const last = this._reportHistory.get(collector);\n const lastCollectionTime = last.collectionTime;\n aggregationTemporality = last.aggregationTemporality;\n // Use aggregation temporality + instrument to determine if we do a merge or a diff of\n // previous. We have the following four scenarios:\n // 1. Cumulative Aggregation (temporality) + Delta recording (sync instrument).\n // Here we merge with our last record to get a cumulative aggregation.\n // 2. Cumulative Aggregation + Cumulative recording (async instrument).\n // Cumulative records are converted to delta recording with DeltaMetricProcessor.\n // Here we merge with our last record to get a cumulative aggregation.\n // 3. Delta Aggregation + Delta recording\n // Calibrate the startTime of metric streams to be the reader's lastCollectionTime.\n // 4. Delta Aggregation + Cumulative recording.\n // Cumulative records are converted to delta recording with DeltaMetricProcessor.\n // Calibrate the startTime of metric streams to be the reader's lastCollectionTime.\n if (aggregationTemporality === AggregationTemporality_1.AggregationTemporality.CUMULATIVE) {\n // We need to make sure the current delta recording gets merged into the previous cumulative\n // for the next cumulative recording.\n result = TemporalMetricProcessor.merge(last.accumulations, unreportedAccumulations, this._aggregator);\n }\n else {\n result = TemporalMetricProcessor.calibrateStartTime(last.accumulations, unreportedAccumulations, lastCollectionTime);\n }\n }\n else {\n // Call into user code to select aggregation temporality for the instrument.\n aggregationTemporality = collector.selectAggregationTemporality(instrumentDescriptor.type);\n }\n // Update last reported (cumulative) accumulation.\n this._reportHistory.set(collector, {\n accumulations: result,\n collectionTime,\n aggregationTemporality,\n });\n const accumulationRecords = AttributesMapToAccumulationRecords(result);\n // do not convert to metric data if there is nothing to convert.\n if (accumulationRecords.length === 0) {\n return undefined;\n }\n return this._aggregator.toMetricData(instrumentDescriptor, aggregationTemporality, accumulationRecords, \n /* endTime */ collectionTime);\n }\n _stashAccumulations(currentAccumulation) {\n const registeredCollectors = this._unreportedAccumulations.keys();\n for (const collector of registeredCollectors) {\n let stash = this._unreportedAccumulations.get(collector);\n if (stash === undefined) {\n stash = [];\n this._unreportedAccumulations.set(collector, stash);\n }\n stash.push(currentAccumulation);\n }\n }\n _getMergedUnreportedAccumulations(collector) {\n let result = new HashMap_1.AttributeHashMap();\n const unreportedList = this._unreportedAccumulations.get(collector);\n this._unreportedAccumulations.set(collector, []);\n if (unreportedList === undefined) {\n return result;\n }\n for (const it of unreportedList) {\n result = TemporalMetricProcessor.merge(result, it, this._aggregator);\n }\n return result;\n }\n static merge(last, current, aggregator) {\n const result = last;\n const iterator = current.entries();\n let next = iterator.next();\n while (next.done !== true) {\n const [key, record, hash] = next.value;\n if (last.has(key, hash)) {\n const lastAccumulation = last.get(key, hash);\n // last.has() returned true, lastAccumulation is present.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const accumulation = aggregator.merge(lastAccumulation, record);\n result.set(key, accumulation, hash);\n }\n else {\n result.set(key, record, hash);\n }\n next = iterator.next();\n }\n return result;\n }\n /**\n * Calibrate the reported metric streams' startTime to lastCollectionTime. Leaves\n * the new stream to be the initial observation time unchanged.\n */\n static calibrateStartTime(last, current, lastCollectionTime) {\n for (const [key, hash] of last.keys()) {\n const currentAccumulation = current.get(key, hash);\n currentAccumulation === null || currentAccumulation === void 0 ? void 0 : currentAccumulation.setStartTime(lastCollectionTime);\n }\n return current;\n }\n}\nexports.TemporalMetricProcessor = TemporalMetricProcessor;\n// TypeScript complains about converting 3 elements tuple to AccumulationRecord.\nfunction AttributesMapToAccumulationRecords(map) {\n return Array.from(map.entries());\n}\n//# sourceMappingURL=TemporalMetricProcessor.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.equalsCaseInsensitive = exports.binarySearchUB = exports.setEquals = exports.FlatMap = exports.isPromiseAllSettledRejectionResult = exports.PromiseAllSettled = exports.callWithTimeout = exports.TimeoutError = exports.instrumentationScopeId = exports.hashAttributes = exports.isNotNullish = void 0;\nfunction isNotNullish(item) {\n return item !== undefined && item !== null;\n}\nexports.isNotNullish = isNotNullish;\n/**\n * Converting the unordered attributes into unique identifier string.\n * @param attributes user provided unordered MetricAttributes.\n */\nfunction hashAttributes(attributes) {\n let keys = Object.keys(attributes);\n if (keys.length === 0)\n return '';\n // Return a string that is stable on key orders.\n keys = keys.sort();\n return JSON.stringify(keys.map(key => [key, attributes[key]]));\n}\nexports.hashAttributes = hashAttributes;\n/**\n * Converting the instrumentation scope object to a unique identifier string.\n * @param instrumentationScope\n */\nfunction instrumentationScopeId(instrumentationScope) {\n var _a, _b;\n return `${instrumentationScope.name}:${(_a = instrumentationScope.version) !== null && _a !== void 0 ? _a : ''}:${(_b = instrumentationScope.schemaUrl) !== null && _b !== void 0 ? _b : ''}`;\n}\nexports.instrumentationScopeId = instrumentationScopeId;\n/**\n * Error that is thrown on timeouts.\n */\nclass TimeoutError extends Error {\n constructor(message) {\n super(message);\n // manually adjust prototype to retain `instanceof` functionality when targeting ES5, see:\n // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, TimeoutError.prototype);\n }\n}\nexports.TimeoutError = TimeoutError;\n/**\n * Adds a timeout to a promise and rejects if the specified timeout has elapsed. Also rejects if the specified promise\n * rejects, and resolves if the specified promise resolves.\n *\n *

NOTE: this operation will continue even after it throws a {@link TimeoutError}.\n *\n * @param promise promise to use with timeout.\n * @param timeout the timeout in milliseconds until the returned promise is rejected.\n */\nfunction callWithTimeout(promise, timeout) {\n let timeoutHandle;\n const timeoutPromise = new Promise(function timeoutFunction(_resolve, reject) {\n timeoutHandle = setTimeout(function timeoutHandler() {\n reject(new TimeoutError('Operation timed out.'));\n }, timeout);\n });\n return Promise.race([promise, timeoutPromise]).then(result => {\n clearTimeout(timeoutHandle);\n return result;\n }, reason => {\n clearTimeout(timeoutHandle);\n throw reason;\n });\n}\nexports.callWithTimeout = callWithTimeout;\n/**\n * Node.js v12.9 lower and browser compatible `Promise.allSettled`.\n */\nasync function PromiseAllSettled(promises) {\n return Promise.all(promises.map(async (p) => {\n try {\n const ret = await p;\n return {\n status: 'fulfilled',\n value: ret,\n };\n }\n catch (e) {\n return {\n status: 'rejected',\n reason: e,\n };\n }\n }));\n}\nexports.PromiseAllSettled = PromiseAllSettled;\nfunction isPromiseAllSettledRejectionResult(it) {\n return it.status === 'rejected';\n}\nexports.isPromiseAllSettledRejectionResult = isPromiseAllSettledRejectionResult;\n/**\n * Node.js v11.0 lower and browser compatible `Array.prototype.flatMap`.\n */\nfunction FlatMap(arr, fn) {\n const result = [];\n arr.forEach(it => {\n result.push(...fn(it));\n });\n return result;\n}\nexports.FlatMap = FlatMap;\nfunction setEquals(lhs, rhs) {\n if (lhs.size !== rhs.size) {\n return false;\n }\n for (const item of lhs) {\n if (!rhs.has(item)) {\n return false;\n }\n }\n return true;\n}\nexports.setEquals = setEquals;\n/**\n * Binary search the sorted array to the find upper bound for the value.\n * @param arr\n * @param value\n * @returns\n */\nfunction binarySearchUB(arr, value) {\n let lo = 0;\n let hi = arr.length - 1;\n let ret = arr.length;\n while (hi >= lo) {\n const mid = lo + Math.trunc((hi - lo) / 2);\n if (arr[mid] < value) {\n lo = mid + 1;\n }\n else {\n ret = mid;\n hi = mid - 1;\n }\n }\n return ret;\n}\nexports.binarySearchUB = binarySearchUB;\nfunction equalsCaseInsensitive(lhs, rhs) {\n return lhs.toLowerCase() === rhs.toLowerCase();\n}\nexports.equalsCaseInsensitive = equalsCaseInsensitive;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DefaultAggregation = exports.ExponentialHistogramAggregation = exports.ExplicitBucketHistogramAggregation = exports.HistogramAggregation = exports.LastValueAggregation = exports.SumAggregation = exports.DropAggregation = exports.Aggregation = void 0;\nconst api = require(\"@opentelemetry/api\");\nconst aggregator_1 = require(\"../aggregator\");\nconst InstrumentDescriptor_1 = require(\"../InstrumentDescriptor\");\n/**\n * Configures how measurements are combined into metrics for views.\n *\n * Aggregation provides a set of built-in aggregations via static methods.\n */\nclass Aggregation {\n static Drop() {\n return DROP_AGGREGATION;\n }\n static Sum() {\n return SUM_AGGREGATION;\n }\n static LastValue() {\n return LAST_VALUE_AGGREGATION;\n }\n static Histogram() {\n return HISTOGRAM_AGGREGATION;\n }\n static ExponentialHistogram() {\n return EXPONENTIAL_HISTOGRAM_AGGREGATION;\n }\n static Default() {\n return DEFAULT_AGGREGATION;\n }\n}\nexports.Aggregation = Aggregation;\n/**\n * The default drop aggregation.\n */\nclass DropAggregation extends Aggregation {\n createAggregator(_instrument) {\n return DropAggregation.DEFAULT_INSTANCE;\n }\n}\nexports.DropAggregation = DropAggregation;\nDropAggregation.DEFAULT_INSTANCE = new aggregator_1.DropAggregator();\n/**\n * The default sum aggregation.\n */\nclass SumAggregation extends Aggregation {\n createAggregator(instrument) {\n switch (instrument.type) {\n case InstrumentDescriptor_1.InstrumentType.COUNTER:\n case InstrumentDescriptor_1.InstrumentType.OBSERVABLE_COUNTER:\n case InstrumentDescriptor_1.InstrumentType.HISTOGRAM: {\n return SumAggregation.MONOTONIC_INSTANCE;\n }\n default: {\n return SumAggregation.NON_MONOTONIC_INSTANCE;\n }\n }\n }\n}\nexports.SumAggregation = SumAggregation;\nSumAggregation.MONOTONIC_INSTANCE = new aggregator_1.SumAggregator(true);\nSumAggregation.NON_MONOTONIC_INSTANCE = new aggregator_1.SumAggregator(false);\n/**\n * The default last value aggregation.\n */\nclass LastValueAggregation extends Aggregation {\n createAggregator(_instrument) {\n return LastValueAggregation.DEFAULT_INSTANCE;\n }\n}\nexports.LastValueAggregation = LastValueAggregation;\nLastValueAggregation.DEFAULT_INSTANCE = new aggregator_1.LastValueAggregator();\n/**\n * The default histogram aggregation.\n */\nclass HistogramAggregation extends Aggregation {\n createAggregator(_instrument) {\n return HistogramAggregation.DEFAULT_INSTANCE;\n }\n}\nexports.HistogramAggregation = HistogramAggregation;\nHistogramAggregation.DEFAULT_INSTANCE = new aggregator_1.HistogramAggregator([0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000], true);\n/**\n * The explicit bucket histogram aggregation.\n */\nclass ExplicitBucketHistogramAggregation extends Aggregation {\n /**\n * @param boundaries the bucket boundaries of the histogram aggregation\n * @param _recordMinMax If set to true, min and max will be recorded. Otherwise, min and max will not be recorded.\n */\n constructor(boundaries, _recordMinMax = true) {\n super();\n this._recordMinMax = _recordMinMax;\n if (boundaries == null) {\n throw new Error('ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array');\n }\n // Copy the boundaries array for modification.\n boundaries = boundaries.concat();\n // We need to an ordered set to be able to correctly compute count for each\n // boundary since we'll iterate on each in order.\n boundaries = boundaries.sort((a, b) => a - b);\n // Remove all Infinity from the boundaries.\n const minusInfinityIndex = boundaries.lastIndexOf(-Infinity);\n let infinityIndex = boundaries.indexOf(Infinity);\n if (infinityIndex === -1) {\n infinityIndex = undefined;\n }\n this._boundaries = boundaries.slice(minusInfinityIndex + 1, infinityIndex);\n }\n createAggregator(_instrument) {\n return new aggregator_1.HistogramAggregator(this._boundaries, this._recordMinMax);\n }\n}\nexports.ExplicitBucketHistogramAggregation = ExplicitBucketHistogramAggregation;\nclass ExponentialHistogramAggregation extends Aggregation {\n constructor(_maxSize = 160, _recordMinMax = true) {\n super();\n this._maxSize = _maxSize;\n this._recordMinMax = _recordMinMax;\n }\n createAggregator(_instrument) {\n return new aggregator_1.ExponentialHistogramAggregator(this._maxSize, this._recordMinMax);\n }\n}\nexports.ExponentialHistogramAggregation = ExponentialHistogramAggregation;\n/**\n * The default aggregation.\n */\nclass DefaultAggregation extends Aggregation {\n _resolve(instrument) {\n // cast to unknown to disable complaints on the (unreachable) fallback.\n switch (instrument.type) {\n case InstrumentDescriptor_1.InstrumentType.COUNTER:\n case InstrumentDescriptor_1.InstrumentType.UP_DOWN_COUNTER:\n case InstrumentDescriptor_1.InstrumentType.OBSERVABLE_COUNTER:\n case InstrumentDescriptor_1.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER: {\n return SUM_AGGREGATION;\n }\n case InstrumentDescriptor_1.InstrumentType.GAUGE:\n case InstrumentDescriptor_1.InstrumentType.OBSERVABLE_GAUGE: {\n return LAST_VALUE_AGGREGATION;\n }\n case InstrumentDescriptor_1.InstrumentType.HISTOGRAM: {\n if (instrument.advice.explicitBucketBoundaries) {\n return new ExplicitBucketHistogramAggregation(instrument.advice.explicitBucketBoundaries);\n }\n return HISTOGRAM_AGGREGATION;\n }\n }\n api.diag.warn(`Unable to recognize instrument type: ${instrument.type}`);\n return DROP_AGGREGATION;\n }\n createAggregator(instrument) {\n return this._resolve(instrument).createAggregator(instrument);\n }\n}\nexports.DefaultAggregation = DefaultAggregation;\nconst DROP_AGGREGATION = new DropAggregation();\nconst SUM_AGGREGATION = new SumAggregation();\nconst LAST_VALUE_AGGREGATION = new LastValueAggregation();\nconst HISTOGRAM_AGGREGATION = new HistogramAggregation();\nconst EXPONENTIAL_HISTOGRAM_AGGREGATION = new ExponentialHistogramAggregation();\nconst DEFAULT_AGGREGATION = new DefaultAggregation();\n//# sourceMappingURL=Aggregation.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FilteringAttributesProcessor = exports.NoopAttributesProcessor = exports.AttributesProcessor = void 0;\n/**\n * The {@link AttributesProcessor} is responsible for customizing which\n * attribute(s) are to be reported as metrics dimension(s) and adding\n * additional dimension(s) from the {@link Context}.\n */\nclass AttributesProcessor {\n static Noop() {\n return NOOP;\n }\n}\nexports.AttributesProcessor = AttributesProcessor;\nclass NoopAttributesProcessor extends AttributesProcessor {\n process(incoming, _context) {\n return incoming;\n }\n}\nexports.NoopAttributesProcessor = NoopAttributesProcessor;\n/**\n * {@link AttributesProcessor} that filters by allowed attribute names and drops any names that are not in the\n * allow list.\n */\nclass FilteringAttributesProcessor extends AttributesProcessor {\n constructor(_allowedAttributeNames) {\n super();\n this._allowedAttributeNames = _allowedAttributeNames;\n }\n process(incoming, _context) {\n const filteredAttributes = {};\n Object.keys(incoming)\n .filter(attributeName => this._allowedAttributeNames.includes(attributeName))\n .forEach(attributeName => (filteredAttributes[attributeName] = incoming[attributeName]));\n return filteredAttributes;\n }\n}\nexports.FilteringAttributesProcessor = FilteringAttributesProcessor;\nconst NOOP = new NoopAttributesProcessor();\n//# sourceMappingURL=AttributesProcessor.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InstrumentSelector = void 0;\nconst Predicate_1 = require(\"./Predicate\");\nclass InstrumentSelector {\n constructor(criteria) {\n var _a;\n this._nameFilter = new Predicate_1.PatternPredicate((_a = criteria === null || criteria === void 0 ? void 0 : criteria.name) !== null && _a !== void 0 ? _a : '*');\n this._type = criteria === null || criteria === void 0 ? void 0 : criteria.type;\n this._unitFilter = new Predicate_1.ExactPredicate(criteria === null || criteria === void 0 ? void 0 : criteria.unit);\n }\n getType() {\n return this._type;\n }\n getNameFilter() {\n return this._nameFilter;\n }\n getUnitFilter() {\n return this._unitFilter;\n }\n}\nexports.InstrumentSelector = InstrumentSelector;\n//# sourceMappingURL=InstrumentSelector.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MeterSelector = void 0;\nconst Predicate_1 = require(\"./Predicate\");\nclass MeterSelector {\n constructor(criteria) {\n this._nameFilter = new Predicate_1.ExactPredicate(criteria === null || criteria === void 0 ? void 0 : criteria.name);\n this._versionFilter = new Predicate_1.ExactPredicate(criteria === null || criteria === void 0 ? void 0 : criteria.version);\n this._schemaUrlFilter = new Predicate_1.ExactPredicate(criteria === null || criteria === void 0 ? void 0 : criteria.schemaUrl);\n }\n getNameFilter() {\n return this._nameFilter;\n }\n /**\n * TODO: semver filter? no spec yet.\n */\n getVersionFilter() {\n return this._versionFilter;\n }\n getSchemaUrlFilter() {\n return this._schemaUrlFilter;\n }\n}\nexports.MeterSelector = MeterSelector;\n//# sourceMappingURL=MeterSelector.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExactPredicate = exports.PatternPredicate = void 0;\n// https://tc39.es/proposal-regex-escaping\n// escape ^ $ \\ . + ? ( ) [ ] { } |\n// do not need to escape * as we interpret it as wildcard\nconst ESCAPE = /[\\^$\\\\.+?()[\\]{}|]/g;\n/**\n * Wildcard pattern predicate, supports patterns like `*`, `foo*`, `*bar`.\n */\nclass PatternPredicate {\n constructor(pattern) {\n if (pattern === '*') {\n this._matchAll = true;\n this._regexp = /.*/;\n }\n else {\n this._matchAll = false;\n this._regexp = new RegExp(PatternPredicate.escapePattern(pattern));\n }\n }\n match(str) {\n if (this._matchAll) {\n return true;\n }\n return this._regexp.test(str);\n }\n static escapePattern(pattern) {\n return `^${pattern.replace(ESCAPE, '\\\\$&').replace('*', '.*')}$`;\n }\n static hasWildcard(pattern) {\n return pattern.includes('*');\n }\n}\nexports.PatternPredicate = PatternPredicate;\nclass ExactPredicate {\n constructor(pattern) {\n this._matchAll = pattern === undefined;\n this._pattern = pattern;\n }\n match(str) {\n if (this._matchAll) {\n return true;\n }\n if (str === this._pattern) {\n return true;\n }\n return false;\n }\n}\nexports.ExactPredicate = ExactPredicate;\n//# sourceMappingURL=Predicate.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getConflictResolutionRecipe = exports.getDescriptionResolutionRecipe = exports.getTypeConflictResolutionRecipe = exports.getUnitConflictResolutionRecipe = exports.getValueTypeConflictResolutionRecipe = exports.getIncompatibilityDetails = void 0;\nfunction getIncompatibilityDetails(existing, otherDescriptor) {\n let incompatibility = '';\n if (existing.unit !== otherDescriptor.unit) {\n incompatibility += `\\t- Unit '${existing.unit}' does not match '${otherDescriptor.unit}'\\n`;\n }\n if (existing.type !== otherDescriptor.type) {\n incompatibility += `\\t- Type '${existing.type}' does not match '${otherDescriptor.type}'\\n`;\n }\n if (existing.valueType !== otherDescriptor.valueType) {\n incompatibility += `\\t- Value Type '${existing.valueType}' does not match '${otherDescriptor.valueType}'\\n`;\n }\n if (existing.description !== otherDescriptor.description) {\n incompatibility += `\\t- Description '${existing.description}' does not match '${otherDescriptor.description}'\\n`;\n }\n return incompatibility;\n}\nexports.getIncompatibilityDetails = getIncompatibilityDetails;\nfunction getValueTypeConflictResolutionRecipe(existing, otherDescriptor) {\n return `\\t- use valueType '${existing.valueType}' on instrument creation or use an instrument name other than '${otherDescriptor.name}'`;\n}\nexports.getValueTypeConflictResolutionRecipe = getValueTypeConflictResolutionRecipe;\nfunction getUnitConflictResolutionRecipe(existing, otherDescriptor) {\n return `\\t- use unit '${existing.unit}' on instrument creation or use an instrument name other than '${otherDescriptor.name}'`;\n}\nexports.getUnitConflictResolutionRecipe = getUnitConflictResolutionRecipe;\nfunction getTypeConflictResolutionRecipe(existing, otherDescriptor) {\n const selector = {\n name: otherDescriptor.name,\n type: otherDescriptor.type,\n unit: otherDescriptor.unit,\n };\n const selectorString = JSON.stringify(selector);\n return `\\t- create a new view with a name other than '${existing.name}' and InstrumentSelector '${selectorString}'`;\n}\nexports.getTypeConflictResolutionRecipe = getTypeConflictResolutionRecipe;\nfunction getDescriptionResolutionRecipe(existing, otherDescriptor) {\n const selector = {\n name: otherDescriptor.name,\n type: otherDescriptor.type,\n unit: otherDescriptor.unit,\n };\n const selectorString = JSON.stringify(selector);\n return `\\t- create a new view with a name other than '${existing.name}' and InstrumentSelector '${selectorString}'\n \\t- OR - create a new view with the name ${existing.name} and description '${existing.description}' and InstrumentSelector ${selectorString}\n \\t- OR - create a new view with the name ${otherDescriptor.name} and description '${existing.description}' and InstrumentSelector ${selectorString}`;\n}\nexports.getDescriptionResolutionRecipe = getDescriptionResolutionRecipe;\nfunction getConflictResolutionRecipe(existing, otherDescriptor) {\n // Conflicts that cannot be solved via views.\n if (existing.valueType !== otherDescriptor.valueType) {\n return getValueTypeConflictResolutionRecipe(existing, otherDescriptor);\n }\n if (existing.unit !== otherDescriptor.unit) {\n return getUnitConflictResolutionRecipe(existing, otherDescriptor);\n }\n // Conflicts that can be solved via views.\n if (existing.type !== otherDescriptor.type) {\n // this will automatically solve possible description conflicts.\n return getTypeConflictResolutionRecipe(existing, otherDescriptor);\n }\n if (existing.description !== otherDescriptor.description) {\n return getDescriptionResolutionRecipe(existing, otherDescriptor);\n }\n return '';\n}\nexports.getConflictResolutionRecipe = getConflictResolutionRecipe;\n//# sourceMappingURL=RegistrationConflicts.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.View = void 0;\nconst Predicate_1 = require(\"./Predicate\");\nconst AttributesProcessor_1 = require(\"./AttributesProcessor\");\nconst InstrumentSelector_1 = require(\"./InstrumentSelector\");\nconst MeterSelector_1 = require(\"./MeterSelector\");\nconst Aggregation_1 = require(\"./Aggregation\");\nfunction isSelectorNotProvided(options) {\n return (options.instrumentName == null &&\n options.instrumentType == null &&\n options.instrumentUnit == null &&\n options.meterName == null &&\n options.meterVersion == null &&\n options.meterSchemaUrl == null);\n}\n/**\n * Can be passed to a {@link MeterProvider} to select instruments and alter their metric stream.\n */\nclass View {\n /**\n * Create a new {@link View} instance.\n *\n * Parameters can be categorized as two types:\n * Instrument selection criteria: Used to describe the instrument(s) this view will be applied to.\n * Will be treated as additive (the Instrument has to meet all the provided criteria to be selected).\n *\n * Metric stream altering: Alter the metric stream of instruments selected by instrument selection criteria.\n *\n * @param viewOptions {@link ViewOptions} for altering the metric stream and instrument selection.\n * @param viewOptions.name\n * Alters the metric stream:\n * This will be used as the name of the metrics stream.\n * If not provided, the original Instrument name will be used.\n * @param viewOptions.description\n * Alters the metric stream:\n * This will be used as the description of the metrics stream.\n * If not provided, the original Instrument description will be used by default.\n * @param viewOptions.attributeKeys\n * Alters the metric stream:\n * If provided, the attributes that are not in the list will be ignored.\n * If not provided, all attribute keys will be used by default.\n * @param viewOptions.aggregation\n * Alters the metric stream:\n * Alters the {@link Aggregation} of the metric stream.\n * @param viewOptions.instrumentName\n * Instrument selection criteria:\n * Original name of the Instrument(s) with wildcard support.\n * @param viewOptions.instrumentType\n * Instrument selection criteria:\n * The original type of the Instrument(s).\n * @param viewOptions.instrumentUnit\n * Instrument selection criteria:\n * The unit of the Instrument(s).\n * @param viewOptions.meterName\n * Instrument selection criteria:\n * The name of the Meter. No wildcard support, name must match the meter exactly.\n * @param viewOptions.meterVersion\n * Instrument selection criteria:\n * The version of the Meter. No wildcard support, version must match exactly.\n * @param viewOptions.meterSchemaUrl\n * Instrument selection criteria:\n * The schema URL of the Meter. No wildcard support, schema URL must match exactly.\n *\n * @example\n * // Create a view that changes the Instrument 'my.instrument' to use to an\n * // ExplicitBucketHistogramAggregation with the boundaries [20, 30, 40]\n * new View({\n * aggregation: new ExplicitBucketHistogramAggregation([20, 30, 40]),\n * instrumentName: 'my.instrument'\n * })\n */\n constructor(viewOptions) {\n var _a;\n // If no criteria is provided, the SDK SHOULD treat it as an error.\n // It is recommended that the SDK implementations fail fast.\n if (isSelectorNotProvided(viewOptions)) {\n throw new Error('Cannot create view with no selector arguments supplied');\n }\n // the SDK SHOULD NOT allow Views with a specified name to be declared with instrument selectors that\n // may select more than one instrument (e.g. wild card instrument name) in the same Meter.\n if (viewOptions.name != null &&\n ((viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.instrumentName) == null ||\n Predicate_1.PatternPredicate.hasWildcard(viewOptions.instrumentName))) {\n throw new Error('Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.');\n }\n // Create AttributesProcessor if attributeKeys are defined set.\n if (viewOptions.attributeKeys != null) {\n this.attributesProcessor = new AttributesProcessor_1.FilteringAttributesProcessor(viewOptions.attributeKeys);\n }\n else {\n this.attributesProcessor = AttributesProcessor_1.AttributesProcessor.Noop();\n }\n this.name = viewOptions.name;\n this.description = viewOptions.description;\n this.aggregation = (_a = viewOptions.aggregation) !== null && _a !== void 0 ? _a : Aggregation_1.Aggregation.Default();\n this.instrumentSelector = new InstrumentSelector_1.InstrumentSelector({\n name: viewOptions.instrumentName,\n type: viewOptions.instrumentType,\n unit: viewOptions.instrumentUnit,\n });\n this.meterSelector = new MeterSelector_1.MeterSelector({\n name: viewOptions.meterName,\n version: viewOptions.meterVersion,\n schemaUrl: viewOptions.meterSchemaUrl,\n });\n }\n}\nexports.View = View;\n//# sourceMappingURL=View.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ViewRegistry = void 0;\nclass ViewRegistry {\n constructor() {\n this._registeredViews = [];\n }\n addView(view) {\n this._registeredViews.push(view);\n }\n findViews(instrument, meter) {\n const views = this._registeredViews.filter(registeredView => {\n return (this._matchInstrument(registeredView.instrumentSelector, instrument) &&\n this._matchMeter(registeredView.meterSelector, meter));\n });\n return views;\n }\n _matchInstrument(selector, instrument) {\n return ((selector.getType() === undefined ||\n instrument.type === selector.getType()) &&\n selector.getNameFilter().match(instrument.name) &&\n selector.getUnitFilter().match(instrument.unit));\n }\n _matchMeter(selector, meter) {\n return (selector.getNameFilter().match(meter.name) &&\n (meter.version === undefined ||\n selector.getVersionFilter().match(meter.version)) &&\n (meter.schemaUrl === undefined ||\n selector.getSchemaUrlFilter().match(meter.schemaUrl)));\n }\n}\nexports.ViewRegistry = ViewRegistry;\n//# sourceMappingURL=ViewRegistry.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BasicTracerProvider = exports.ForceFlushState = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst resources_1 = require(\"@opentelemetry/resources\");\nconst _1 = require(\".\");\nconst config_1 = require(\"./config\");\nconst MultiSpanProcessor_1 = require(\"./MultiSpanProcessor\");\nconst NoopSpanProcessor_1 = require(\"./export/NoopSpanProcessor\");\nconst platform_1 = require(\"./platform\");\nconst utility_1 = require(\"./utility\");\nvar ForceFlushState;\n(function (ForceFlushState) {\n ForceFlushState[ForceFlushState[\"resolved\"] = 0] = \"resolved\";\n ForceFlushState[ForceFlushState[\"timeout\"] = 1] = \"timeout\";\n ForceFlushState[ForceFlushState[\"error\"] = 2] = \"error\";\n ForceFlushState[ForceFlushState[\"unresolved\"] = 3] = \"unresolved\";\n})(ForceFlushState = exports.ForceFlushState || (exports.ForceFlushState = {}));\n/**\n * This class represents a basic tracer provider which platform libraries can extend\n */\nclass BasicTracerProvider {\n constructor(config = {}) {\n var _a;\n this._registeredSpanProcessors = [];\n this._tracers = new Map();\n const mergedConfig = (0, core_1.merge)({}, (0, config_1.loadDefaultConfig)(), (0, utility_1.reconfigureLimits)(config));\n this.resource = (_a = mergedConfig.resource) !== null && _a !== void 0 ? _a : resources_1.Resource.empty();\n this.resource = resources_1.Resource.default().merge(this.resource);\n this._config = Object.assign({}, mergedConfig, {\n resource: this.resource,\n });\n const defaultExporter = this._buildExporterFromEnv();\n if (defaultExporter !== undefined) {\n const batchProcessor = new platform_1.BatchSpanProcessor(defaultExporter);\n this.activeSpanProcessor = batchProcessor;\n }\n else {\n this.activeSpanProcessor = new NoopSpanProcessor_1.NoopSpanProcessor();\n }\n }\n getTracer(name, version, options) {\n const key = `${name}@${version || ''}:${(options === null || options === void 0 ? void 0 : options.schemaUrl) || ''}`;\n if (!this._tracers.has(key)) {\n this._tracers.set(key, new _1.Tracer({ name, version, schemaUrl: options === null || options === void 0 ? void 0 : options.schemaUrl }, this._config, this));\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return this._tracers.get(key);\n }\n /**\n * Adds a new {@link SpanProcessor} to this tracer.\n * @param spanProcessor the new SpanProcessor to be added.\n */\n addSpanProcessor(spanProcessor) {\n if (this._registeredSpanProcessors.length === 0) {\n // since we might have enabled by default a batchProcessor, we disable it\n // before adding the new one\n this.activeSpanProcessor\n .shutdown()\n .catch(err => api_1.diag.error('Error while trying to shutdown current span processor', err));\n }\n this._registeredSpanProcessors.push(spanProcessor);\n this.activeSpanProcessor = new MultiSpanProcessor_1.MultiSpanProcessor(this._registeredSpanProcessors);\n }\n getActiveSpanProcessor() {\n return this.activeSpanProcessor;\n }\n /**\n * Register this TracerProvider for use with the OpenTelemetry API.\n * Undefined values may be replaced with defaults, and\n * null values will be skipped.\n *\n * @param config Configuration object for SDK registration\n */\n register(config = {}) {\n api_1.trace.setGlobalTracerProvider(this);\n if (config.propagator === undefined) {\n config.propagator = this._buildPropagatorFromEnv();\n }\n if (config.contextManager) {\n api_1.context.setGlobalContextManager(config.contextManager);\n }\n if (config.propagator) {\n api_1.propagation.setGlobalPropagator(config.propagator);\n }\n }\n forceFlush() {\n const timeout = this._config.forceFlushTimeoutMillis;\n const promises = this._registeredSpanProcessors.map((spanProcessor) => {\n return new Promise(resolve => {\n let state;\n const timeoutInterval = setTimeout(() => {\n resolve(new Error(`Span processor did not completed within timeout period of ${timeout} ms`));\n state = ForceFlushState.timeout;\n }, timeout);\n spanProcessor\n .forceFlush()\n .then(() => {\n clearTimeout(timeoutInterval);\n if (state !== ForceFlushState.timeout) {\n state = ForceFlushState.resolved;\n resolve(state);\n }\n })\n .catch(error => {\n clearTimeout(timeoutInterval);\n state = ForceFlushState.error;\n resolve(error);\n });\n });\n });\n return new Promise((resolve, reject) => {\n Promise.all(promises)\n .then(results => {\n const errors = results.filter(result => result !== ForceFlushState.resolved);\n if (errors.length > 0) {\n reject(errors);\n }\n else {\n resolve();\n }\n })\n .catch(error => reject([error]));\n });\n }\n shutdown() {\n return this.activeSpanProcessor.shutdown();\n }\n /**\n * TS cannot yet infer the type of this.constructor:\n * https://github.com/Microsoft/TypeScript/issues/3841#issuecomment-337560146\n * There is no need to override either of the getters in your child class.\n * The type of the registered component maps should be the same across all\n * classes in the inheritance tree.\n */\n _getPropagator(name) {\n var _a;\n return (_a = this.constructor._registeredPropagators.get(name)) === null || _a === void 0 ? void 0 : _a();\n }\n _getSpanExporter(name) {\n var _a;\n return (_a = this.constructor._registeredExporters.get(name)) === null || _a === void 0 ? void 0 : _a();\n }\n _buildPropagatorFromEnv() {\n // per spec, propagators from env must be deduplicated\n const uniquePropagatorNames = Array.from(new Set((0, core_1.getEnv)().OTEL_PROPAGATORS));\n const propagators = uniquePropagatorNames.map(name => {\n const propagator = this._getPropagator(name);\n if (!propagator) {\n api_1.diag.warn(`Propagator \"${name}\" requested through environment variable is unavailable.`);\n }\n return propagator;\n });\n const validPropagators = propagators.reduce((list, item) => {\n if (item) {\n list.push(item);\n }\n return list;\n }, []);\n if (validPropagators.length === 0) {\n return;\n }\n else if (uniquePropagatorNames.length === 1) {\n return validPropagators[0];\n }\n else {\n return new core_1.CompositePropagator({\n propagators: validPropagators,\n });\n }\n }\n _buildExporterFromEnv() {\n const exporterName = (0, core_1.getEnv)().OTEL_TRACES_EXPORTER;\n if (exporterName === 'none' || exporterName === '')\n return;\n const exporter = this._getSpanExporter(exporterName);\n if (!exporter) {\n api_1.diag.error(`Exporter \"${exporterName}\" requested through environment variable is unavailable.`);\n }\n return exporter;\n }\n}\nexports.BasicTracerProvider = BasicTracerProvider;\nBasicTracerProvider._registeredPropagators = new Map([\n ['tracecontext', () => new core_1.W3CTraceContextPropagator()],\n ['baggage', () => new core_1.W3CBaggagePropagator()],\n]);\nBasicTracerProvider._registeredExporters = new Map();\n//# sourceMappingURL=BasicTracerProvider.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MultiSpanProcessor = void 0;\nconst core_1 = require(\"@opentelemetry/core\");\n/**\n * Implementation of the {@link SpanProcessor} that simply forwards all\n * received events to a list of {@link SpanProcessor}s.\n */\nclass MultiSpanProcessor {\n constructor(_spanProcessors) {\n this._spanProcessors = _spanProcessors;\n }\n forceFlush() {\n const promises = [];\n for (const spanProcessor of this._spanProcessors) {\n promises.push(spanProcessor.forceFlush());\n }\n return new Promise(resolve => {\n Promise.all(promises)\n .then(() => {\n resolve();\n })\n .catch(error => {\n (0, core_1.globalErrorHandler)(error || new Error('MultiSpanProcessor: forceFlush failed'));\n resolve();\n });\n });\n }\n onStart(span, context) {\n for (const spanProcessor of this._spanProcessors) {\n spanProcessor.onStart(span, context);\n }\n }\n onEnd(span) {\n for (const spanProcessor of this._spanProcessors) {\n spanProcessor.onEnd(span);\n }\n }\n shutdown() {\n const promises = [];\n for (const spanProcessor of this._spanProcessors) {\n promises.push(spanProcessor.shutdown());\n }\n return new Promise((resolve, reject) => {\n Promise.all(promises).then(() => {\n resolve();\n }, reject);\n });\n }\n}\nexports.MultiSpanProcessor = MultiSpanProcessor;\n//# sourceMappingURL=MultiSpanProcessor.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SamplingDecision = void 0;\n/**\n * A sampling decision that determines how a {@link Span} will be recorded\n * and collected.\n */\nvar SamplingDecision;\n(function (SamplingDecision) {\n /**\n * `Span.isRecording() === false`, span will not be recorded and all events\n * and attributes will be dropped.\n */\n SamplingDecision[SamplingDecision[\"NOT_RECORD\"] = 0] = \"NOT_RECORD\";\n /**\n * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}\n * MUST NOT be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD\"] = 1] = \"RECORD\";\n /**\n * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}\n * MUST be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD_AND_SAMPLED\"] = 2] = \"RECORD_AND_SAMPLED\";\n})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));\n//# sourceMappingURL=Sampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Span = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\nconst enums_1 = require(\"./enums\");\n/**\n * This class represents a span.\n */\nclass Span {\n /**\n * Constructs a new Span instance.\n *\n * @deprecated calling Span constructor directly is not supported. Please use tracer.startSpan.\n * */\n constructor(parentTracer, context, spanName, spanContext, kind, parentSpanId, links = [], startTime, _deprecatedClock, // keeping this argument even though it is unused to ensure backwards compatibility\n attributes) {\n this.attributes = {};\n this.links = [];\n this.events = [];\n this._droppedAttributesCount = 0;\n this._droppedEventsCount = 0;\n this._droppedLinksCount = 0;\n this.status = {\n code: api_1.SpanStatusCode.UNSET,\n };\n this.endTime = [0, 0];\n this._ended = false;\n this._duration = [-1, -1];\n this.name = spanName;\n this._spanContext = spanContext;\n this.parentSpanId = parentSpanId;\n this.kind = kind;\n this.links = links;\n const now = Date.now();\n this._performanceStartTime = core_1.otperformance.now();\n this._performanceOffset =\n now - (this._performanceStartTime + (0, core_1.getTimeOrigin)());\n this._startTimeProvided = startTime != null;\n this.startTime = this._getTime(startTime !== null && startTime !== void 0 ? startTime : now);\n this.resource = parentTracer.resource;\n this.instrumentationLibrary = parentTracer.instrumentationLibrary;\n this._spanLimits = parentTracer.getSpanLimits();\n this._attributeValueLengthLimit =\n this._spanLimits.attributeValueLengthLimit || 0;\n if (attributes != null) {\n this.setAttributes(attributes);\n }\n this._spanProcessor = parentTracer.getActiveSpanProcessor();\n this._spanProcessor.onStart(this, context);\n }\n spanContext() {\n return this._spanContext;\n }\n setAttribute(key, value) {\n if (value == null || this._isSpanEnded())\n return this;\n if (key.length === 0) {\n api_1.diag.warn(`Invalid attribute key: ${key}`);\n return this;\n }\n if (!(0, core_1.isAttributeValue)(value)) {\n api_1.diag.warn(`Invalid attribute value set for key: ${key}`);\n return this;\n }\n if (Object.keys(this.attributes).length >=\n this._spanLimits.attributeCountLimit &&\n !Object.prototype.hasOwnProperty.call(this.attributes, key)) {\n this._droppedAttributesCount++;\n return this;\n }\n this.attributes[key] = this._truncateToSize(value);\n return this;\n }\n setAttributes(attributes) {\n for (const [k, v] of Object.entries(attributes)) {\n this.setAttribute(k, v);\n }\n return this;\n }\n /**\n *\n * @param name Span Name\n * @param [attributesOrStartTime] Span attributes or start time\n * if type is {@type TimeInput} and 3rd param is undefined\n * @param [timeStamp] Specified time stamp for the event\n */\n addEvent(name, attributesOrStartTime, timeStamp) {\n if (this._isSpanEnded())\n return this;\n if (this._spanLimits.eventCountLimit === 0) {\n api_1.diag.warn('No events allowed.');\n this._droppedEventsCount++;\n return this;\n }\n if (this.events.length >= this._spanLimits.eventCountLimit) {\n if (this._droppedEventsCount === 0) {\n api_1.diag.debug('Dropping extra events.');\n }\n this.events.shift();\n this._droppedEventsCount++;\n }\n if ((0, core_1.isTimeInput)(attributesOrStartTime)) {\n if (!(0, core_1.isTimeInput)(timeStamp)) {\n timeStamp = attributesOrStartTime;\n }\n attributesOrStartTime = undefined;\n }\n const attributes = (0, core_1.sanitizeAttributes)(attributesOrStartTime);\n this.events.push({\n name,\n attributes,\n time: this._getTime(timeStamp),\n droppedAttributesCount: 0,\n });\n return this;\n }\n addLink(link) {\n this.links.push(link);\n return this;\n }\n addLinks(links) {\n this.links.push(...links);\n return this;\n }\n setStatus(status) {\n if (this._isSpanEnded())\n return this;\n this.status = status;\n return this;\n }\n updateName(name) {\n if (this._isSpanEnded())\n return this;\n this.name = name;\n return this;\n }\n end(endTime) {\n if (this._isSpanEnded()) {\n api_1.diag.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);\n return;\n }\n this._ended = true;\n this.endTime = this._getTime(endTime);\n this._duration = (0, core_1.hrTimeDuration)(this.startTime, this.endTime);\n if (this._duration[0] < 0) {\n api_1.diag.warn('Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.', this.startTime, this.endTime);\n this.endTime = this.startTime.slice();\n this._duration = [0, 0];\n }\n if (this._droppedEventsCount > 0) {\n api_1.diag.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`);\n }\n this._spanProcessor.onEnd(this);\n }\n _getTime(inp) {\n if (typeof inp === 'number' && inp < core_1.otperformance.now()) {\n // must be a performance timestamp\n // apply correction and convert to hrtime\n return (0, core_1.hrTime)(inp + this._performanceOffset);\n }\n if (typeof inp === 'number') {\n return (0, core_1.millisToHrTime)(inp);\n }\n if (inp instanceof Date) {\n return (0, core_1.millisToHrTime)(inp.getTime());\n }\n if ((0, core_1.isTimeInputHrTime)(inp)) {\n return inp;\n }\n if (this._startTimeProvided) {\n // if user provided a time for the start manually\n // we can't use duration to calculate event/end times\n return (0, core_1.millisToHrTime)(Date.now());\n }\n const msDuration = core_1.otperformance.now() - this._performanceStartTime;\n return (0, core_1.addHrTimes)(this.startTime, (0, core_1.millisToHrTime)(msDuration));\n }\n isRecording() {\n return this._ended === false;\n }\n recordException(exception, time) {\n const attributes = {};\n if (typeof exception === 'string') {\n attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_MESSAGE] = exception;\n }\n else if (exception) {\n if (exception.code) {\n attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_TYPE] = exception.code.toString();\n }\n else if (exception.name) {\n attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_TYPE] = exception.name;\n }\n if (exception.message) {\n attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_MESSAGE] = exception.message;\n }\n if (exception.stack) {\n attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_STACKTRACE] = exception.stack;\n }\n }\n // these are minimum requirements from spec\n if (attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_TYPE] ||\n attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_MESSAGE]) {\n this.addEvent(enums_1.ExceptionEventName, attributes, time);\n }\n else {\n api_1.diag.warn(`Failed to record an exception ${exception}`);\n }\n }\n get duration() {\n return this._duration;\n }\n get ended() {\n return this._ended;\n }\n get droppedAttributesCount() {\n return this._droppedAttributesCount;\n }\n get droppedEventsCount() {\n return this._droppedEventsCount;\n }\n get droppedLinksCount() {\n return this._droppedLinksCount;\n }\n _isSpanEnded() {\n if (this._ended) {\n api_1.diag.warn(`Can not execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);\n }\n return this._ended;\n }\n // Utility function to truncate given value within size\n // for value type of string, will truncate to given limit\n // for type of non-string, will return same value\n _truncateToLimitUtil(value, limit) {\n if (value.length <= limit) {\n return value;\n }\n return value.substr(0, limit);\n }\n /**\n * If the given attribute value is of type string and has more characters than given {@code attributeValueLengthLimit} then\n * return string with truncated to {@code attributeValueLengthLimit} characters\n *\n * If the given attribute value is array of strings then\n * return new array of strings with each element truncated to {@code attributeValueLengthLimit} characters\n *\n * Otherwise return same Attribute {@code value}\n *\n * @param value Attribute value\n * @returns truncated attribute value if required, otherwise same value\n */\n _truncateToSize(value) {\n const limit = this._attributeValueLengthLimit;\n // Check limit\n if (limit <= 0) {\n // Negative values are invalid, so do not truncate\n api_1.diag.warn(`Attribute value limit must be positive, got ${limit}`);\n return value;\n }\n // String\n if (typeof value === 'string') {\n return this._truncateToLimitUtil(value, limit);\n }\n // Array of strings\n if (Array.isArray(value)) {\n return value.map(val => typeof val === 'string' ? this._truncateToLimitUtil(val, limit) : val);\n }\n // Other types, no need to apply value length limit\n return value;\n }\n}\nexports.Span = Span;\n//# sourceMappingURL=Span.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Tracer = void 0;\nconst api = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst Span_1 = require(\"./Span\");\nconst utility_1 = require(\"./utility\");\nconst platform_1 = require(\"./platform\");\n/**\n * This class represents a basic tracer.\n */\nclass Tracer {\n /**\n * Constructs a new Tracer instance.\n */\n constructor(instrumentationLibrary, config, _tracerProvider) {\n this._tracerProvider = _tracerProvider;\n const localConfig = (0, utility_1.mergeConfig)(config);\n this._sampler = localConfig.sampler;\n this._generalLimits = localConfig.generalLimits;\n this._spanLimits = localConfig.spanLimits;\n this._idGenerator = config.idGenerator || new platform_1.RandomIdGenerator();\n this.resource = _tracerProvider.resource;\n this.instrumentationLibrary = instrumentationLibrary;\n }\n /**\n * Starts a new Span or returns the default NoopSpan based on the sampling\n * decision.\n */\n startSpan(name, options = {}, context = api.context.active()) {\n var _a, _b, _c;\n // remove span from context in case a root span is requested via options\n if (options.root) {\n context = api.trace.deleteSpan(context);\n }\n const parentSpan = api.trace.getSpan(context);\n if ((0, core_1.isTracingSuppressed)(context)) {\n api.diag.debug('Instrumentation suppressed, returning Noop Span');\n const nonRecordingSpan = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT);\n return nonRecordingSpan;\n }\n const parentSpanContext = parentSpan === null || parentSpan === void 0 ? void 0 : parentSpan.spanContext();\n const spanId = this._idGenerator.generateSpanId();\n let traceId;\n let traceState;\n let parentSpanId;\n if (!parentSpanContext ||\n !api.trace.isSpanContextValid(parentSpanContext)) {\n // New root span.\n traceId = this._idGenerator.generateTraceId();\n }\n else {\n // New child span.\n traceId = parentSpanContext.traceId;\n traceState = parentSpanContext.traceState;\n parentSpanId = parentSpanContext.spanId;\n }\n const spanKind = (_a = options.kind) !== null && _a !== void 0 ? _a : api.SpanKind.INTERNAL;\n const links = ((_b = options.links) !== null && _b !== void 0 ? _b : []).map(link => {\n return {\n context: link.context,\n attributes: (0, core_1.sanitizeAttributes)(link.attributes),\n };\n });\n const attributes = (0, core_1.sanitizeAttributes)(options.attributes);\n // make sampling decision\n const samplingResult = this._sampler.shouldSample(context, traceId, name, spanKind, attributes, links);\n traceState = (_c = samplingResult.traceState) !== null && _c !== void 0 ? _c : traceState;\n const traceFlags = samplingResult.decision === api.SamplingDecision.RECORD_AND_SAMPLED\n ? api.TraceFlags.SAMPLED\n : api.TraceFlags.NONE;\n const spanContext = { traceId, spanId, traceFlags, traceState };\n if (samplingResult.decision === api.SamplingDecision.NOT_RECORD) {\n api.diag.debug('Recording is off, propagating context in a non-recording span');\n const nonRecordingSpan = api.trace.wrapSpanContext(spanContext);\n return nonRecordingSpan;\n }\n // Set initial span attributes. The attributes object may have been mutated\n // by the sampler, so we sanitize the merged attributes before setting them.\n const initAttributes = (0, core_1.sanitizeAttributes)(Object.assign(attributes, samplingResult.attributes));\n const span = new Span_1.Span(this, context, name, spanContext, spanKind, parentSpanId, links, options.startTime, undefined, initAttributes);\n return span;\n }\n startActiveSpan(name, arg2, arg3, arg4) {\n let opts;\n let ctx;\n let fn;\n if (arguments.length < 2) {\n return;\n }\n else if (arguments.length === 2) {\n fn = arg2;\n }\n else if (arguments.length === 3) {\n opts = arg2;\n fn = arg3;\n }\n else {\n opts = arg2;\n ctx = arg3;\n fn = arg4;\n }\n const parentContext = ctx !== null && ctx !== void 0 ? ctx : api.context.active();\n const span = this.startSpan(name, opts, parentContext);\n const contextWithSpanSet = api.trace.setSpan(parentContext, span);\n return api.context.with(contextWithSpanSet, fn, undefined, span);\n }\n /** Returns the active {@link GeneralLimits}. */\n getGeneralLimits() {\n return this._generalLimits;\n }\n /** Returns the active {@link SpanLimits}. */\n getSpanLimits() {\n return this._spanLimits;\n }\n getActiveSpanProcessor() {\n return this._tracerProvider.getActiveSpanProcessor();\n }\n}\nexports.Tracer = Tracer;\n//# sourceMappingURL=Tracer.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.buildSamplerFromEnv = exports.loadDefaultConfig = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst AlwaysOffSampler_1 = require(\"./sampler/AlwaysOffSampler\");\nconst AlwaysOnSampler_1 = require(\"./sampler/AlwaysOnSampler\");\nconst ParentBasedSampler_1 = require(\"./sampler/ParentBasedSampler\");\nconst TraceIdRatioBasedSampler_1 = require(\"./sampler/TraceIdRatioBasedSampler\");\nconst env = (0, core_1.getEnv)();\nconst FALLBACK_OTEL_TRACES_SAMPLER = core_1.TracesSamplerValues.AlwaysOn;\nconst DEFAULT_RATIO = 1;\n/**\n * Load default configuration. For fields with primitive values, any user-provided\n * value will override the corresponding default value. For fields with\n * non-primitive values (like `spanLimits`), the user-provided value will be\n * used to extend the default value.\n */\n// object needs to be wrapped in this function and called when needed otherwise\n// envs are parsed before tests are ran - causes tests using these envs to fail\nfunction loadDefaultConfig() {\n const _env = (0, core_1.getEnv)();\n return {\n sampler: buildSamplerFromEnv(env),\n forceFlushTimeoutMillis: 30000,\n generalLimits: {\n attributeValueLengthLimit: _env.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n attributeCountLimit: _env.OTEL_ATTRIBUTE_COUNT_LIMIT,\n },\n spanLimits: {\n attributeValueLengthLimit: _env.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n attributeCountLimit: _env.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,\n linkCountLimit: _env.OTEL_SPAN_LINK_COUNT_LIMIT,\n eventCountLimit: _env.OTEL_SPAN_EVENT_COUNT_LIMIT,\n attributePerEventCountLimit: _env.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,\n attributePerLinkCountLimit: _env.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,\n },\n };\n}\nexports.loadDefaultConfig = loadDefaultConfig;\n/**\n * Based on environment, builds a sampler, complies with specification.\n * @param environment optional, by default uses getEnv(), but allows passing a value to reuse parsed environment\n */\nfunction buildSamplerFromEnv(environment = (0, core_1.getEnv)()) {\n switch (environment.OTEL_TRACES_SAMPLER) {\n case core_1.TracesSamplerValues.AlwaysOn:\n return new AlwaysOnSampler_1.AlwaysOnSampler();\n case core_1.TracesSamplerValues.AlwaysOff:\n return new AlwaysOffSampler_1.AlwaysOffSampler();\n case core_1.TracesSamplerValues.ParentBasedAlwaysOn:\n return new ParentBasedSampler_1.ParentBasedSampler({\n root: new AlwaysOnSampler_1.AlwaysOnSampler(),\n });\n case core_1.TracesSamplerValues.ParentBasedAlwaysOff:\n return new ParentBasedSampler_1.ParentBasedSampler({\n root: new AlwaysOffSampler_1.AlwaysOffSampler(),\n });\n case core_1.TracesSamplerValues.TraceIdRatio:\n return new TraceIdRatioBasedSampler_1.TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv(environment));\n case core_1.TracesSamplerValues.ParentBasedTraceIdRatio:\n return new ParentBasedSampler_1.ParentBasedSampler({\n root: new TraceIdRatioBasedSampler_1.TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv(environment)),\n });\n default:\n api_1.diag.error(`OTEL_TRACES_SAMPLER value \"${environment.OTEL_TRACES_SAMPLER} invalid, defaulting to ${FALLBACK_OTEL_TRACES_SAMPLER}\".`);\n return new AlwaysOnSampler_1.AlwaysOnSampler();\n }\n}\nexports.buildSamplerFromEnv = buildSamplerFromEnv;\nfunction getSamplerProbabilityFromEnv(environment) {\n if (environment.OTEL_TRACES_SAMPLER_ARG === undefined ||\n environment.OTEL_TRACES_SAMPLER_ARG === '') {\n api_1.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${DEFAULT_RATIO}.`);\n return DEFAULT_RATIO;\n }\n const probability = Number(environment.OTEL_TRACES_SAMPLER_ARG);\n if (isNaN(probability)) {\n api_1.diag.error(`OTEL_TRACES_SAMPLER_ARG=${environment.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${DEFAULT_RATIO}.`);\n return DEFAULT_RATIO;\n }\n if (probability < 0 || probability > 1) {\n api_1.diag.error(`OTEL_TRACES_SAMPLER_ARG=${environment.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${DEFAULT_RATIO}.`);\n return DEFAULT_RATIO;\n }\n return probability;\n}\n//# sourceMappingURL=config.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExceptionEventName = void 0;\n// Event name definitions\nexports.ExceptionEventName = 'exception';\n//# sourceMappingURL=enums.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BatchSpanProcessorBase = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\n/**\n * Implementation of the {@link SpanProcessor} that batches spans exported by\n * the SDK then pushes them to the exporter pipeline.\n */\nclass BatchSpanProcessorBase {\n constructor(_exporter, config) {\n this._exporter = _exporter;\n this._isExporting = false;\n this._finishedSpans = [];\n this._droppedSpansCount = 0;\n const env = (0, core_1.getEnv)();\n this._maxExportBatchSize =\n typeof (config === null || config === void 0 ? void 0 : config.maxExportBatchSize) === 'number'\n ? config.maxExportBatchSize\n : env.OTEL_BSP_MAX_EXPORT_BATCH_SIZE;\n this._maxQueueSize =\n typeof (config === null || config === void 0 ? void 0 : config.maxQueueSize) === 'number'\n ? config.maxQueueSize\n : env.OTEL_BSP_MAX_QUEUE_SIZE;\n this._scheduledDelayMillis =\n typeof (config === null || config === void 0 ? void 0 : config.scheduledDelayMillis) === 'number'\n ? config.scheduledDelayMillis\n : env.OTEL_BSP_SCHEDULE_DELAY;\n this._exportTimeoutMillis =\n typeof (config === null || config === void 0 ? void 0 : config.exportTimeoutMillis) === 'number'\n ? config.exportTimeoutMillis\n : env.OTEL_BSP_EXPORT_TIMEOUT;\n this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this);\n if (this._maxExportBatchSize > this._maxQueueSize) {\n api_1.diag.warn('BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize');\n this._maxExportBatchSize = this._maxQueueSize;\n }\n }\n forceFlush() {\n if (this._shutdownOnce.isCalled) {\n return this._shutdownOnce.promise;\n }\n return this._flushAll();\n }\n // does nothing.\n onStart(_span, _parentContext) { }\n onEnd(span) {\n if (this._shutdownOnce.isCalled) {\n return;\n }\n if ((span.spanContext().traceFlags & api_1.TraceFlags.SAMPLED) === 0) {\n return;\n }\n this._addToBuffer(span);\n }\n shutdown() {\n return this._shutdownOnce.call();\n }\n _shutdown() {\n return Promise.resolve()\n .then(() => {\n return this.onShutdown();\n })\n .then(() => {\n return this._flushAll();\n })\n .then(() => {\n return this._exporter.shutdown();\n });\n }\n /** Add a span in the buffer. */\n _addToBuffer(span) {\n if (this._finishedSpans.length >= this._maxQueueSize) {\n // limit reached, drop span\n if (this._droppedSpansCount === 0) {\n api_1.diag.debug('maxQueueSize reached, dropping spans');\n }\n this._droppedSpansCount++;\n return;\n }\n if (this._droppedSpansCount > 0) {\n // some spans were dropped, log once with count of spans dropped\n api_1.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`);\n this._droppedSpansCount = 0;\n }\n this._finishedSpans.push(span);\n this._maybeStartTimer();\n }\n /**\n * Send all spans to the exporter respecting the batch size limit\n * This function is used only on forceFlush or shutdown,\n * for all other cases _flush should be used\n * */\n _flushAll() {\n return new Promise((resolve, reject) => {\n const promises = [];\n // calculate number of batches\n const count = Math.ceil(this._finishedSpans.length / this._maxExportBatchSize);\n for (let i = 0, j = count; i < j; i++) {\n promises.push(this._flushOneBatch());\n }\n Promise.all(promises)\n .then(() => {\n resolve();\n })\n .catch(reject);\n });\n }\n _flushOneBatch() {\n this._clearTimer();\n if (this._finishedSpans.length === 0) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const timer = setTimeout(() => {\n // don't wait anymore for export, this way the next batch can start\n reject(new Error('Timeout'));\n }, this._exportTimeoutMillis);\n // prevent downstream exporter calls from generating spans\n api_1.context.with((0, core_1.suppressTracing)(api_1.context.active()), () => {\n // Reset the finished spans buffer here because the next invocations of the _flush method\n // could pass the same finished spans to the exporter if the buffer is cleared\n // outside the execution of this callback.\n let spans;\n if (this._finishedSpans.length <= this._maxExportBatchSize) {\n spans = this._finishedSpans;\n this._finishedSpans = [];\n }\n else {\n spans = this._finishedSpans.splice(0, this._maxExportBatchSize);\n }\n const doExport = () => this._exporter.export(spans, result => {\n var _a;\n clearTimeout(timer);\n if (result.code === core_1.ExportResultCode.SUCCESS) {\n resolve();\n }\n else {\n reject((_a = result.error) !== null && _a !== void 0 ? _a : new Error('BatchSpanProcessor: span export failed'));\n }\n });\n let pendingResources = null;\n for (let i = 0, len = spans.length; i < len; i++) {\n const span = spans[i];\n if (span.resource.asyncAttributesPending &&\n span.resource.waitForAsyncAttributes) {\n pendingResources !== null && pendingResources !== void 0 ? pendingResources : (pendingResources = []);\n pendingResources.push(span.resource.waitForAsyncAttributes());\n }\n }\n // Avoid scheduling a promise to make the behavior more predictable and easier to test\n if (pendingResources === null) {\n doExport();\n }\n else {\n Promise.all(pendingResources).then(doExport, err => {\n (0, core_1.globalErrorHandler)(err);\n reject(err);\n });\n }\n });\n });\n }\n _maybeStartTimer() {\n if (this._isExporting)\n return;\n const flush = () => {\n this._isExporting = true;\n this._flushOneBatch()\n .finally(() => {\n this._isExporting = false;\n if (this._finishedSpans.length > 0) {\n this._clearTimer();\n this._maybeStartTimer();\n }\n })\n .catch(e => {\n this._isExporting = false;\n (0, core_1.globalErrorHandler)(e);\n });\n };\n // we only wait if the queue doesn't have enough elements yet\n if (this._finishedSpans.length >= this._maxExportBatchSize) {\n return flush();\n }\n if (this._timer !== undefined)\n return;\n this._timer = setTimeout(() => flush(), this._scheduledDelayMillis);\n (0, core_1.unrefTimer)(this._timer);\n }\n _clearTimer() {\n if (this._timer !== undefined) {\n clearTimeout(this._timer);\n this._timer = undefined;\n }\n }\n}\nexports.BatchSpanProcessorBase = BatchSpanProcessorBase;\n//# sourceMappingURL=BatchSpanProcessorBase.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ConsoleSpanExporter = void 0;\nconst core_1 = require(\"@opentelemetry/core\");\n/**\n * This is implementation of {@link SpanExporter} that prints spans to the\n * console. This class can be used for diagnostic purposes.\n *\n * NOTE: This {@link SpanExporter} is intended for diagnostics use only, output rendered to the console may change at any time.\n */\n/* eslint-disable no-console */\nclass ConsoleSpanExporter {\n /**\n * Export spans.\n * @param spans\n * @param resultCallback\n */\n export(spans, resultCallback) {\n return this._sendSpans(spans, resultCallback);\n }\n /**\n * Shutdown the exporter.\n */\n shutdown() {\n this._sendSpans([]);\n return this.forceFlush();\n }\n /**\n * Exports any pending spans in exporter\n */\n forceFlush() {\n return Promise.resolve();\n }\n /**\n * converts span info into more readable format\n * @param span\n */\n _exportInfo(span) {\n var _a;\n return {\n resource: {\n attributes: span.resource.attributes,\n },\n instrumentationScope: span.instrumentationLibrary,\n traceId: span.spanContext().traceId,\n parentId: span.parentSpanId,\n traceState: (_a = span.spanContext().traceState) === null || _a === void 0 ? void 0 : _a.serialize(),\n name: span.name,\n id: span.spanContext().spanId,\n kind: span.kind,\n timestamp: (0, core_1.hrTimeToMicroseconds)(span.startTime),\n duration: (0, core_1.hrTimeToMicroseconds)(span.duration),\n attributes: span.attributes,\n status: span.status,\n events: span.events,\n links: span.links,\n };\n }\n /**\n * Showing spans in console\n * @param spans\n * @param done\n */\n _sendSpans(spans, done) {\n for (const span of spans) {\n console.dir(this._exportInfo(span), { depth: 3 });\n }\n if (done) {\n return done({ code: core_1.ExportResultCode.SUCCESS });\n }\n }\n}\nexports.ConsoleSpanExporter = ConsoleSpanExporter;\n//# sourceMappingURL=ConsoleSpanExporter.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InMemorySpanExporter = void 0;\nconst core_1 = require(\"@opentelemetry/core\");\n/**\n * This class can be used for testing purposes. It stores the exported spans\n * in a list in memory that can be retrieved using the `getFinishedSpans()`\n * method.\n */\nclass InMemorySpanExporter {\n constructor() {\n this._finishedSpans = [];\n /**\n * Indicates if the exporter has been \"shutdown.\"\n * When false, exported spans will not be stored in-memory.\n */\n this._stopped = false;\n }\n export(spans, resultCallback) {\n if (this._stopped)\n return resultCallback({\n code: core_1.ExportResultCode.FAILED,\n error: new Error('Exporter has been stopped'),\n });\n this._finishedSpans.push(...spans);\n setTimeout(() => resultCallback({ code: core_1.ExportResultCode.SUCCESS }), 0);\n }\n shutdown() {\n this._stopped = true;\n this._finishedSpans = [];\n return this.forceFlush();\n }\n /**\n * Exports any pending spans in the exporter\n */\n forceFlush() {\n return Promise.resolve();\n }\n reset() {\n this._finishedSpans = [];\n }\n getFinishedSpans() {\n return this._finishedSpans;\n }\n}\nexports.InMemorySpanExporter = InMemorySpanExporter;\n//# sourceMappingURL=InMemorySpanExporter.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopSpanProcessor = void 0;\n/** No-op implementation of SpanProcessor */\nclass NoopSpanProcessor {\n onStart(_span, _context) { }\n onEnd(_span) { }\n shutdown() {\n return Promise.resolve();\n }\n forceFlush() {\n return Promise.resolve();\n }\n}\nexports.NoopSpanProcessor = NoopSpanProcessor;\n//# sourceMappingURL=NoopSpanProcessor.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SimpleSpanProcessor = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\n/**\n * An implementation of the {@link SpanProcessor} that converts the {@link Span}\n * to {@link ReadableSpan} and passes it to the configured exporter.\n *\n * Only spans that are sampled are converted.\n *\n * NOTE: This {@link SpanProcessor} exports every ended span individually instead of batching spans together, which causes significant performance overhead with most exporters. For production use, please consider using the {@link BatchSpanProcessor} instead.\n */\nclass SimpleSpanProcessor {\n constructor(_exporter) {\n this._exporter = _exporter;\n this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this);\n this._unresolvedExports = new Set();\n }\n async forceFlush() {\n // await unresolved resources before resolving\n await Promise.all(Array.from(this._unresolvedExports));\n if (this._exporter.forceFlush) {\n await this._exporter.forceFlush();\n }\n }\n onStart(_span, _parentContext) { }\n onEnd(span) {\n var _a, _b;\n if (this._shutdownOnce.isCalled) {\n return;\n }\n if ((span.spanContext().traceFlags & api_1.TraceFlags.SAMPLED) === 0) {\n return;\n }\n const doExport = () => core_1.internal\n ._export(this._exporter, [span])\n .then((result) => {\n var _a;\n if (result.code !== core_1.ExportResultCode.SUCCESS) {\n (0, core_1.globalErrorHandler)((_a = result.error) !== null && _a !== void 0 ? _a : new Error(`SimpleSpanProcessor: span export failed (status ${result})`));\n }\n })\n .catch(error => {\n (0, core_1.globalErrorHandler)(error);\n });\n // Avoid scheduling a promise to make the behavior more predictable and easier to test\n if (span.resource.asyncAttributesPending) {\n const exportPromise = (_b = (_a = span.resource).waitForAsyncAttributes) === null || _b === void 0 ? void 0 : _b.call(_a).then(() => {\n if (exportPromise != null) {\n this._unresolvedExports.delete(exportPromise);\n }\n return doExport();\n }, err => (0, core_1.globalErrorHandler)(err));\n // store the unresolved exports\n if (exportPromise != null) {\n this._unresolvedExports.add(exportPromise);\n }\n }\n else {\n void doExport();\n }\n }\n shutdown() {\n return this._shutdownOnce.call();\n }\n _shutdown() {\n return this._exporter.shutdown();\n }\n}\nexports.SimpleSpanProcessor = SimpleSpanProcessor;\n//# sourceMappingURL=SimpleSpanProcessor.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Span = exports.SamplingDecision = exports.TraceIdRatioBasedSampler = exports.ParentBasedSampler = exports.AlwaysOnSampler = exports.AlwaysOffSampler = exports.NoopSpanProcessor = exports.SimpleSpanProcessor = exports.InMemorySpanExporter = exports.ConsoleSpanExporter = exports.RandomIdGenerator = exports.BatchSpanProcessor = exports.ForceFlushState = exports.BasicTracerProvider = exports.Tracer = void 0;\nvar Tracer_1 = require(\"./Tracer\");\nObject.defineProperty(exports, \"Tracer\", { enumerable: true, get: function () { return Tracer_1.Tracer; } });\nvar BasicTracerProvider_1 = require(\"./BasicTracerProvider\");\nObject.defineProperty(exports, \"BasicTracerProvider\", { enumerable: true, get: function () { return BasicTracerProvider_1.BasicTracerProvider; } });\nObject.defineProperty(exports, \"ForceFlushState\", { enumerable: true, get: function () { return BasicTracerProvider_1.ForceFlushState; } });\nvar platform_1 = require(\"./platform\");\nObject.defineProperty(exports, \"BatchSpanProcessor\", { enumerable: true, get: function () { return platform_1.BatchSpanProcessor; } });\nObject.defineProperty(exports, \"RandomIdGenerator\", { enumerable: true, get: function () { return platform_1.RandomIdGenerator; } });\nvar ConsoleSpanExporter_1 = require(\"./export/ConsoleSpanExporter\");\nObject.defineProperty(exports, \"ConsoleSpanExporter\", { enumerable: true, get: function () { return ConsoleSpanExporter_1.ConsoleSpanExporter; } });\nvar InMemorySpanExporter_1 = require(\"./export/InMemorySpanExporter\");\nObject.defineProperty(exports, \"InMemorySpanExporter\", { enumerable: true, get: function () { return InMemorySpanExporter_1.InMemorySpanExporter; } });\nvar SimpleSpanProcessor_1 = require(\"./export/SimpleSpanProcessor\");\nObject.defineProperty(exports, \"SimpleSpanProcessor\", { enumerable: true, get: function () { return SimpleSpanProcessor_1.SimpleSpanProcessor; } });\nvar NoopSpanProcessor_1 = require(\"./export/NoopSpanProcessor\");\nObject.defineProperty(exports, \"NoopSpanProcessor\", { enumerable: true, get: function () { return NoopSpanProcessor_1.NoopSpanProcessor; } });\nvar AlwaysOffSampler_1 = require(\"./sampler/AlwaysOffSampler\");\nObject.defineProperty(exports, \"AlwaysOffSampler\", { enumerable: true, get: function () { return AlwaysOffSampler_1.AlwaysOffSampler; } });\nvar AlwaysOnSampler_1 = require(\"./sampler/AlwaysOnSampler\");\nObject.defineProperty(exports, \"AlwaysOnSampler\", { enumerable: true, get: function () { return AlwaysOnSampler_1.AlwaysOnSampler; } });\nvar ParentBasedSampler_1 = require(\"./sampler/ParentBasedSampler\");\nObject.defineProperty(exports, \"ParentBasedSampler\", { enumerable: true, get: function () { return ParentBasedSampler_1.ParentBasedSampler; } });\nvar TraceIdRatioBasedSampler_1 = require(\"./sampler/TraceIdRatioBasedSampler\");\nObject.defineProperty(exports, \"TraceIdRatioBasedSampler\", { enumerable: true, get: function () { return TraceIdRatioBasedSampler_1.TraceIdRatioBasedSampler; } });\nvar Sampler_1 = require(\"./Sampler\");\nObject.defineProperty(exports, \"SamplingDecision\", { enumerable: true, get: function () { return Sampler_1.SamplingDecision; } });\nvar Span_1 = require(\"./Span\");\nObject.defineProperty(exports, \"Span\", { enumerable: true, get: function () { return Span_1.Span; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RandomIdGenerator = exports.BatchSpanProcessor = void 0;\nvar node_1 = require(\"./node\");\nObject.defineProperty(exports, \"BatchSpanProcessor\", { enumerable: true, get: function () { return node_1.BatchSpanProcessor; } });\nObject.defineProperty(exports, \"RandomIdGenerator\", { enumerable: true, get: function () { return node_1.RandomIdGenerator; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RandomIdGenerator = void 0;\nconst SPAN_ID_BYTES = 8;\nconst TRACE_ID_BYTES = 16;\nclass RandomIdGenerator {\n constructor() {\n /**\n * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex\n * characters corresponding to 128 bits.\n */\n this.generateTraceId = getIdGenerator(TRACE_ID_BYTES);\n /**\n * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex\n * characters corresponding to 64 bits.\n */\n this.generateSpanId = getIdGenerator(SPAN_ID_BYTES);\n }\n}\nexports.RandomIdGenerator = RandomIdGenerator;\nconst SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES);\nfunction getIdGenerator(bytes) {\n return function generateId() {\n for (let i = 0; i < bytes / 4; i++) {\n // unsigned right shift drops decimal part of the number\n // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE\n SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4);\n }\n // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated\n for (let i = 0; i < bytes; i++) {\n if (SHARED_BUFFER[i] > 0) {\n break;\n }\n else if (i === bytes - 1) {\n SHARED_BUFFER[bytes - 1] = 1;\n }\n }\n return SHARED_BUFFER.toString('hex', 0, bytes);\n };\n}\n//# sourceMappingURL=RandomIdGenerator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BatchSpanProcessor = void 0;\nconst BatchSpanProcessorBase_1 = require(\"../../../export/BatchSpanProcessorBase\");\nclass BatchSpanProcessor extends BatchSpanProcessorBase_1.BatchSpanProcessorBase {\n onShutdown() { }\n}\nexports.BatchSpanProcessor = BatchSpanProcessor;\n//# sourceMappingURL=BatchSpanProcessor.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RandomIdGenerator = exports.BatchSpanProcessor = void 0;\nvar BatchSpanProcessor_1 = require(\"./export/BatchSpanProcessor\");\nObject.defineProperty(exports, \"BatchSpanProcessor\", { enumerable: true, get: function () { return BatchSpanProcessor_1.BatchSpanProcessor; } });\nvar RandomIdGenerator_1 = require(\"./RandomIdGenerator\");\nObject.defineProperty(exports, \"RandomIdGenerator\", { enumerable: true, get: function () { return RandomIdGenerator_1.RandomIdGenerator; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlwaysOffSampler = void 0;\nconst Sampler_1 = require(\"../Sampler\");\n/** Sampler that samples no traces. */\nclass AlwaysOffSampler {\n shouldSample() {\n return {\n decision: Sampler_1.SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return 'AlwaysOffSampler';\n }\n}\nexports.AlwaysOffSampler = AlwaysOffSampler;\n//# sourceMappingURL=AlwaysOffSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AlwaysOnSampler = void 0;\nconst Sampler_1 = require(\"../Sampler\");\n/** Sampler that samples all traces. */\nclass AlwaysOnSampler {\n shouldSample() {\n return {\n decision: Sampler_1.SamplingDecision.RECORD_AND_SAMPLED,\n };\n }\n toString() {\n return 'AlwaysOnSampler';\n }\n}\nexports.AlwaysOnSampler = AlwaysOnSampler;\n//# sourceMappingURL=AlwaysOnSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ParentBasedSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst core_1 = require(\"@opentelemetry/core\");\nconst AlwaysOffSampler_1 = require(\"./AlwaysOffSampler\");\nconst AlwaysOnSampler_1 = require(\"./AlwaysOnSampler\");\n/**\n * A composite sampler that either respects the parent span's sampling decision\n * or delegates to `delegateSampler` for root spans.\n */\nclass ParentBasedSampler {\n constructor(config) {\n var _a, _b, _c, _d;\n this._root = config.root;\n if (!this._root) {\n (0, core_1.globalErrorHandler)(new Error('ParentBasedSampler must have a root sampler configured'));\n this._root = new AlwaysOnSampler_1.AlwaysOnSampler();\n }\n this._remoteParentSampled =\n (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler_1.AlwaysOnSampler();\n this._remoteParentNotSampled =\n (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler_1.AlwaysOffSampler();\n this._localParentSampled =\n (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler_1.AlwaysOnSampler();\n this._localParentNotSampled =\n (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler_1.AlwaysOffSampler();\n }\n shouldSample(context, traceId, spanName, spanKind, attributes, links) {\n const parentContext = api_1.trace.getSpanContext(context);\n if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) {\n return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.isRemote) {\n if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {\n return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {\n return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n toString() {\n return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;\n }\n}\nexports.ParentBasedSampler = ParentBasedSampler;\n//# sourceMappingURL=ParentBasedSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceIdRatioBasedSampler = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst Sampler_1 = require(\"../Sampler\");\n/** Sampler that samples a given fraction of traces based of trace id deterministically. */\nclass TraceIdRatioBasedSampler {\n constructor(_ratio = 0) {\n this._ratio = _ratio;\n this._ratio = this._normalize(_ratio);\n this._upperBound = Math.floor(this._ratio * 0xffffffff);\n }\n shouldSample(context, traceId) {\n return {\n decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound\n ? Sampler_1.SamplingDecision.RECORD_AND_SAMPLED\n : Sampler_1.SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return `TraceIdRatioBased{${this._ratio}}`;\n }\n _normalize(ratio) {\n if (typeof ratio !== 'number' || isNaN(ratio))\n return 0;\n return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio;\n }\n _accumulate(traceId) {\n let accumulation = 0;\n for (let i = 0; i < traceId.length / 8; i++) {\n const pos = i * 8;\n const part = parseInt(traceId.slice(pos, pos + 8), 16);\n accumulation = (accumulation ^ part) >>> 0;\n }\n return accumulation;\n }\n}\nexports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler;\n//# sourceMappingURL=TraceIdRatioBasedSampler.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reconfigureLimits = exports.mergeConfig = void 0;\nconst config_1 = require(\"./config\");\nconst core_1 = require(\"@opentelemetry/core\");\n/**\n * Function to merge Default configuration (as specified in './config') with\n * user provided configurations.\n */\nfunction mergeConfig(userConfig) {\n const perInstanceDefaults = {\n sampler: (0, config_1.buildSamplerFromEnv)(),\n };\n const DEFAULT_CONFIG = (0, config_1.loadDefaultConfig)();\n const target = Object.assign({}, DEFAULT_CONFIG, perInstanceDefaults, userConfig);\n target.generalLimits = Object.assign({}, DEFAULT_CONFIG.generalLimits, userConfig.generalLimits || {});\n target.spanLimits = Object.assign({}, DEFAULT_CONFIG.spanLimits, userConfig.spanLimits || {});\n return target;\n}\nexports.mergeConfig = mergeConfig;\n/**\n * When general limits are provided and model specific limits are not,\n * configures the model specific limits by using the values from the general ones.\n * @param userConfig User provided tracer configuration\n */\nfunction reconfigureLimits(userConfig) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\n const spanLimits = Object.assign({}, userConfig.spanLimits);\n const parsedEnvConfig = (0, core_1.getEnvWithoutDefaults)();\n /**\n * Reassign span attribute count limit to use first non null value defined by user or use default value\n */\n spanLimits.attributeCountLimit =\n (_f = (_e = (_d = (_b = (_a = userConfig.spanLimits) === null || _a === void 0 ? void 0 : _a.attributeCountLimit) !== null && _b !== void 0 ? _b : (_c = userConfig.generalLimits) === null || _c === void 0 ? void 0 : _c.attributeCountLimit) !== null && _d !== void 0 ? _d : parsedEnvConfig.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT) !== null && _e !== void 0 ? _e : parsedEnvConfig.OTEL_ATTRIBUTE_COUNT_LIMIT) !== null && _f !== void 0 ? _f : core_1.DEFAULT_ATTRIBUTE_COUNT_LIMIT;\n /**\n * Reassign span attribute value length limit to use first non null value defined by user or use default value\n */\n spanLimits.attributeValueLengthLimit =\n (_m = (_l = (_k = (_h = (_g = userConfig.spanLimits) === null || _g === void 0 ? void 0 : _g.attributeValueLengthLimit) !== null && _h !== void 0 ? _h : (_j = userConfig.generalLimits) === null || _j === void 0 ? void 0 : _j.attributeValueLengthLimit) !== null && _k !== void 0 ? _k : parsedEnvConfig.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT) !== null && _l !== void 0 ? _l : parsedEnvConfig.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT) !== null && _m !== void 0 ? _m : core_1.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT;\n return Object.assign({}, userConfig, { spanLimits });\n}\nexports.reconfigureLimits = reconfigureLimits;\n//# sourceMappingURL=utility.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NodeTracerProvider = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst context_async_hooks_1 = require(\"@opentelemetry/context-async-hooks\");\nconst propagator_b3_1 = require(\"@opentelemetry/propagator-b3\");\nconst sdk_trace_base_1 = require(\"@opentelemetry/sdk-trace-base\");\nconst semver = require(\"semver\");\nconst propagator_jaeger_1 = require(\"@opentelemetry/propagator-jaeger\");\n/**\n * Register this TracerProvider for use with the OpenTelemetry API.\n * Undefined values may be replaced with defaults, and\n * null values will be skipped.\n *\n * @param config Configuration object for SDK registration\n */\nclass NodeTracerProvider extends sdk_trace_base_1.BasicTracerProvider {\n constructor(config = {}) {\n super(config);\n }\n register(config = {}) {\n if (config.contextManager === undefined) {\n const ContextManager = semver.gte(process.version, '14.8.0')\n ? context_async_hooks_1.AsyncLocalStorageContextManager\n : context_async_hooks_1.AsyncHooksContextManager;\n config.contextManager = new ContextManager();\n config.contextManager.enable();\n }\n super.register(config);\n }\n}\nexports.NodeTracerProvider = NodeTracerProvider;\nNodeTracerProvider._registeredPropagators = new Map([\n ...sdk_trace_base_1.BasicTracerProvider._registeredPropagators,\n [\n 'b3',\n () => new propagator_b3_1.B3Propagator({ injectEncoding: propagator_b3_1.B3InjectEncoding.SINGLE_HEADER }),\n ],\n [\n 'b3multi',\n () => new propagator_b3_1.B3Propagator({ injectEncoding: propagator_b3_1.B3InjectEncoding.MULTI_HEADER }),\n ],\n ['jaeger', () => new propagator_jaeger_1.JaegerPropagator()],\n]);\n//# sourceMappingURL=NodeTracerProvider.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Tracer = exports.TraceIdRatioBasedSampler = exports.Span = exports.SimpleSpanProcessor = exports.SamplingDecision = exports.RandomIdGenerator = exports.ParentBasedSampler = exports.NoopSpanProcessor = exports.InMemorySpanExporter = exports.ForceFlushState = exports.ConsoleSpanExporter = exports.BatchSpanProcessor = exports.BasicTracerProvider = exports.AlwaysOnSampler = exports.AlwaysOffSampler = exports.NodeTracerProvider = void 0;\nvar NodeTracerProvider_1 = require(\"./NodeTracerProvider\");\nObject.defineProperty(exports, \"NodeTracerProvider\", { enumerable: true, get: function () { return NodeTracerProvider_1.NodeTracerProvider; } });\nvar sdk_trace_base_1 = require(\"@opentelemetry/sdk-trace-base\");\nObject.defineProperty(exports, \"AlwaysOffSampler\", { enumerable: true, get: function () { return sdk_trace_base_1.AlwaysOffSampler; } });\nObject.defineProperty(exports, \"AlwaysOnSampler\", { enumerable: true, get: function () { return sdk_trace_base_1.AlwaysOnSampler; } });\nObject.defineProperty(exports, \"BasicTracerProvider\", { enumerable: true, get: function () { return sdk_trace_base_1.BasicTracerProvider; } });\nObject.defineProperty(exports, \"BatchSpanProcessor\", { enumerable: true, get: function () { return sdk_trace_base_1.BatchSpanProcessor; } });\nObject.defineProperty(exports, \"ConsoleSpanExporter\", { enumerable: true, get: function () { return sdk_trace_base_1.ConsoleSpanExporter; } });\nObject.defineProperty(exports, \"ForceFlushState\", { enumerable: true, get: function () { return sdk_trace_base_1.ForceFlushState; } });\nObject.defineProperty(exports, \"InMemorySpanExporter\", { enumerable: true, get: function () { return sdk_trace_base_1.InMemorySpanExporter; } });\nObject.defineProperty(exports, \"NoopSpanProcessor\", { enumerable: true, get: function () { return sdk_trace_base_1.NoopSpanProcessor; } });\nObject.defineProperty(exports, \"ParentBasedSampler\", { enumerable: true, get: function () { return sdk_trace_base_1.ParentBasedSampler; } });\nObject.defineProperty(exports, \"RandomIdGenerator\", { enumerable: true, get: function () { return sdk_trace_base_1.RandomIdGenerator; } });\nObject.defineProperty(exports, \"SamplingDecision\", { enumerable: true, get: function () { return sdk_trace_base_1.SamplingDecision; } });\nObject.defineProperty(exports, \"SimpleSpanProcessor\", { enumerable: true, get: function () { return sdk_trace_base_1.SimpleSpanProcessor; } });\nObject.defineProperty(exports, \"Span\", { enumerable: true, get: function () { return sdk_trace_base_1.Span; } });\nObject.defineProperty(exports, \"TraceIdRatioBasedSampler\", { enumerable: true, get: function () { return sdk_trace_base_1.TraceIdRatioBasedSampler; } });\nObject.defineProperty(exports, \"Tracer\", { enumerable: true, get: function () { return sdk_trace_base_1.Tracer; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/* eslint-disable no-restricted-syntax --\n * These re-exports are only of constants, only two-levels deep, and\n * should not cause problems for tree-shakers.\n */\n// Deprecated. These are kept around for compatibility purposes\n__exportStar(require(\"./trace\"), exports);\n__exportStar(require(\"./resource\"), exports);\n// Use these instead\n__exportStar(require(\"./stable_attributes\"), exports);\n__exportStar(require(\"./stable_metrics\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createConstMap = void 0;\n/**\n * Creates a const map from the given values\n * @param values - An array of values to be used as keys and values in the map.\n * @returns A populated version of the map with the values and keys derived from the values.\n */\n/*#__NO_SIDE_EFFECTS__*/\nfunction createConstMap(values) {\n // eslint-disable-next-line prefer-const, @typescript-eslint/no-explicit-any\n let res = {};\n const len = values.length;\n for (let lp = 0; lp < len; lp++) {\n const val = values[lp];\n if (val) {\n res[String(val).toUpperCase().replace(/[-.]/g, '_')] = val;\n }\n }\n return res;\n}\nexports.createConstMap = createConstMap;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SEMRESATTRS_K8S_STATEFULSET_NAME = exports.SEMRESATTRS_K8S_STATEFULSET_UID = exports.SEMRESATTRS_K8S_DEPLOYMENT_NAME = exports.SEMRESATTRS_K8S_DEPLOYMENT_UID = exports.SEMRESATTRS_K8S_REPLICASET_NAME = exports.SEMRESATTRS_K8S_REPLICASET_UID = exports.SEMRESATTRS_K8S_CONTAINER_NAME = exports.SEMRESATTRS_K8S_POD_NAME = exports.SEMRESATTRS_K8S_POD_UID = exports.SEMRESATTRS_K8S_NAMESPACE_NAME = exports.SEMRESATTRS_K8S_NODE_UID = exports.SEMRESATTRS_K8S_NODE_NAME = exports.SEMRESATTRS_K8S_CLUSTER_NAME = exports.SEMRESATTRS_HOST_IMAGE_VERSION = exports.SEMRESATTRS_HOST_IMAGE_ID = exports.SEMRESATTRS_HOST_IMAGE_NAME = exports.SEMRESATTRS_HOST_ARCH = exports.SEMRESATTRS_HOST_TYPE = exports.SEMRESATTRS_HOST_NAME = exports.SEMRESATTRS_HOST_ID = exports.SEMRESATTRS_FAAS_MAX_MEMORY = exports.SEMRESATTRS_FAAS_INSTANCE = exports.SEMRESATTRS_FAAS_VERSION = exports.SEMRESATTRS_FAAS_ID = exports.SEMRESATTRS_FAAS_NAME = exports.SEMRESATTRS_DEVICE_MODEL_NAME = exports.SEMRESATTRS_DEVICE_MODEL_IDENTIFIER = exports.SEMRESATTRS_DEVICE_ID = exports.SEMRESATTRS_DEPLOYMENT_ENVIRONMENT = exports.SEMRESATTRS_CONTAINER_IMAGE_TAG = exports.SEMRESATTRS_CONTAINER_IMAGE_NAME = exports.SEMRESATTRS_CONTAINER_RUNTIME = exports.SEMRESATTRS_CONTAINER_ID = exports.SEMRESATTRS_CONTAINER_NAME = exports.SEMRESATTRS_AWS_LOG_STREAM_ARNS = exports.SEMRESATTRS_AWS_LOG_STREAM_NAMES = exports.SEMRESATTRS_AWS_LOG_GROUP_ARNS = exports.SEMRESATTRS_AWS_LOG_GROUP_NAMES = exports.SEMRESATTRS_AWS_EKS_CLUSTER_ARN = exports.SEMRESATTRS_AWS_ECS_TASK_REVISION = exports.SEMRESATTRS_AWS_ECS_TASK_FAMILY = exports.SEMRESATTRS_AWS_ECS_TASK_ARN = exports.SEMRESATTRS_AWS_ECS_LAUNCHTYPE = exports.SEMRESATTRS_AWS_ECS_CLUSTER_ARN = exports.SEMRESATTRS_AWS_ECS_CONTAINER_ARN = exports.SEMRESATTRS_CLOUD_PLATFORM = exports.SEMRESATTRS_CLOUD_AVAILABILITY_ZONE = exports.SEMRESATTRS_CLOUD_REGION = exports.SEMRESATTRS_CLOUD_ACCOUNT_ID = exports.SEMRESATTRS_CLOUD_PROVIDER = void 0;\nexports.CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = exports.CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = exports.CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = exports.CLOUDPLATFORMVALUES_AZURE_AKS = exports.CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = exports.CLOUDPLATFORMVALUES_AZURE_VM = exports.CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = exports.CLOUDPLATFORMVALUES_AWS_LAMBDA = exports.CLOUDPLATFORMVALUES_AWS_EKS = exports.CLOUDPLATFORMVALUES_AWS_ECS = exports.CLOUDPLATFORMVALUES_AWS_EC2 = exports.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = exports.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = exports.CloudProviderValues = exports.CLOUDPROVIDERVALUES_GCP = exports.CLOUDPROVIDERVALUES_AZURE = exports.CLOUDPROVIDERVALUES_AWS = exports.CLOUDPROVIDERVALUES_ALIBABA_CLOUD = exports.SemanticResourceAttributes = exports.SEMRESATTRS_WEBENGINE_DESCRIPTION = exports.SEMRESATTRS_WEBENGINE_VERSION = exports.SEMRESATTRS_WEBENGINE_NAME = exports.SEMRESATTRS_TELEMETRY_AUTO_VERSION = exports.SEMRESATTRS_TELEMETRY_SDK_VERSION = exports.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE = exports.SEMRESATTRS_TELEMETRY_SDK_NAME = exports.SEMRESATTRS_SERVICE_VERSION = exports.SEMRESATTRS_SERVICE_INSTANCE_ID = exports.SEMRESATTRS_SERVICE_NAMESPACE = exports.SEMRESATTRS_SERVICE_NAME = exports.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION = exports.SEMRESATTRS_PROCESS_RUNTIME_VERSION = exports.SEMRESATTRS_PROCESS_RUNTIME_NAME = exports.SEMRESATTRS_PROCESS_OWNER = exports.SEMRESATTRS_PROCESS_COMMAND_ARGS = exports.SEMRESATTRS_PROCESS_COMMAND_LINE = exports.SEMRESATTRS_PROCESS_COMMAND = exports.SEMRESATTRS_PROCESS_EXECUTABLE_PATH = exports.SEMRESATTRS_PROCESS_EXECUTABLE_NAME = exports.SEMRESATTRS_PROCESS_PID = exports.SEMRESATTRS_OS_VERSION = exports.SEMRESATTRS_OS_NAME = exports.SEMRESATTRS_OS_DESCRIPTION = exports.SEMRESATTRS_OS_TYPE = exports.SEMRESATTRS_K8S_CRONJOB_NAME = exports.SEMRESATTRS_K8S_CRONJOB_UID = exports.SEMRESATTRS_K8S_JOB_NAME = exports.SEMRESATTRS_K8S_JOB_UID = exports.SEMRESATTRS_K8S_DAEMONSET_NAME = exports.SEMRESATTRS_K8S_DAEMONSET_UID = void 0;\nexports.TelemetrySdkLanguageValues = exports.TELEMETRYSDKLANGUAGEVALUES_WEBJS = exports.TELEMETRYSDKLANGUAGEVALUES_RUBY = exports.TELEMETRYSDKLANGUAGEVALUES_PYTHON = exports.TELEMETRYSDKLANGUAGEVALUES_PHP = exports.TELEMETRYSDKLANGUAGEVALUES_NODEJS = exports.TELEMETRYSDKLANGUAGEVALUES_JAVA = exports.TELEMETRYSDKLANGUAGEVALUES_GO = exports.TELEMETRYSDKLANGUAGEVALUES_ERLANG = exports.TELEMETRYSDKLANGUAGEVALUES_DOTNET = exports.TELEMETRYSDKLANGUAGEVALUES_CPP = exports.OsTypeValues = exports.OSTYPEVALUES_Z_OS = exports.OSTYPEVALUES_SOLARIS = exports.OSTYPEVALUES_AIX = exports.OSTYPEVALUES_HPUX = exports.OSTYPEVALUES_DRAGONFLYBSD = exports.OSTYPEVALUES_OPENBSD = exports.OSTYPEVALUES_NETBSD = exports.OSTYPEVALUES_FREEBSD = exports.OSTYPEVALUES_DARWIN = exports.OSTYPEVALUES_LINUX = exports.OSTYPEVALUES_WINDOWS = exports.HostArchValues = exports.HOSTARCHVALUES_X86 = exports.HOSTARCHVALUES_PPC64 = exports.HOSTARCHVALUES_PPC32 = exports.HOSTARCHVALUES_IA64 = exports.HOSTARCHVALUES_ARM64 = exports.HOSTARCHVALUES_ARM32 = exports.HOSTARCHVALUES_AMD64 = exports.AwsEcsLaunchtypeValues = exports.AWSECSLAUNCHTYPEVALUES_FARGATE = exports.AWSECSLAUNCHTYPEVALUES_EC2 = exports.CloudPlatformValues = exports.CLOUDPLATFORMVALUES_GCP_APP_ENGINE = exports.CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = exports.CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = exports.CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = void 0;\nconst utils_1 = require(\"../internal/utils\");\n//----------------------------------------------------------------------------------------------------------\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\n//----------------------------------------------------------------------------------------------------------\n//----------------------------------------------------------------------------------------------------------\n// Constant values for SemanticResourceAttributes\n//----------------------------------------------------------------------------------------------------------\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_CLOUD_PROVIDER = 'cloud.provider';\nconst TMP_CLOUD_ACCOUNT_ID = 'cloud.account.id';\nconst TMP_CLOUD_REGION = 'cloud.region';\nconst TMP_CLOUD_AVAILABILITY_ZONE = 'cloud.availability_zone';\nconst TMP_CLOUD_PLATFORM = 'cloud.platform';\nconst TMP_AWS_ECS_CONTAINER_ARN = 'aws.ecs.container.arn';\nconst TMP_AWS_ECS_CLUSTER_ARN = 'aws.ecs.cluster.arn';\nconst TMP_AWS_ECS_LAUNCHTYPE = 'aws.ecs.launchtype';\nconst TMP_AWS_ECS_TASK_ARN = 'aws.ecs.task.arn';\nconst TMP_AWS_ECS_TASK_FAMILY = 'aws.ecs.task.family';\nconst TMP_AWS_ECS_TASK_REVISION = 'aws.ecs.task.revision';\nconst TMP_AWS_EKS_CLUSTER_ARN = 'aws.eks.cluster.arn';\nconst TMP_AWS_LOG_GROUP_NAMES = 'aws.log.group.names';\nconst TMP_AWS_LOG_GROUP_ARNS = 'aws.log.group.arns';\nconst TMP_AWS_LOG_STREAM_NAMES = 'aws.log.stream.names';\nconst TMP_AWS_LOG_STREAM_ARNS = 'aws.log.stream.arns';\nconst TMP_CONTAINER_NAME = 'container.name';\nconst TMP_CONTAINER_ID = 'container.id';\nconst TMP_CONTAINER_RUNTIME = 'container.runtime';\nconst TMP_CONTAINER_IMAGE_NAME = 'container.image.name';\nconst TMP_CONTAINER_IMAGE_TAG = 'container.image.tag';\nconst TMP_DEPLOYMENT_ENVIRONMENT = 'deployment.environment';\nconst TMP_DEVICE_ID = 'device.id';\nconst TMP_DEVICE_MODEL_IDENTIFIER = 'device.model.identifier';\nconst TMP_DEVICE_MODEL_NAME = 'device.model.name';\nconst TMP_FAAS_NAME = 'faas.name';\nconst TMP_FAAS_ID = 'faas.id';\nconst TMP_FAAS_VERSION = 'faas.version';\nconst TMP_FAAS_INSTANCE = 'faas.instance';\nconst TMP_FAAS_MAX_MEMORY = 'faas.max_memory';\nconst TMP_HOST_ID = 'host.id';\nconst TMP_HOST_NAME = 'host.name';\nconst TMP_HOST_TYPE = 'host.type';\nconst TMP_HOST_ARCH = 'host.arch';\nconst TMP_HOST_IMAGE_NAME = 'host.image.name';\nconst TMP_HOST_IMAGE_ID = 'host.image.id';\nconst TMP_HOST_IMAGE_VERSION = 'host.image.version';\nconst TMP_K8S_CLUSTER_NAME = 'k8s.cluster.name';\nconst TMP_K8S_NODE_NAME = 'k8s.node.name';\nconst TMP_K8S_NODE_UID = 'k8s.node.uid';\nconst TMP_K8S_NAMESPACE_NAME = 'k8s.namespace.name';\nconst TMP_K8S_POD_UID = 'k8s.pod.uid';\nconst TMP_K8S_POD_NAME = 'k8s.pod.name';\nconst TMP_K8S_CONTAINER_NAME = 'k8s.container.name';\nconst TMP_K8S_REPLICASET_UID = 'k8s.replicaset.uid';\nconst TMP_K8S_REPLICASET_NAME = 'k8s.replicaset.name';\nconst TMP_K8S_DEPLOYMENT_UID = 'k8s.deployment.uid';\nconst TMP_K8S_DEPLOYMENT_NAME = 'k8s.deployment.name';\nconst TMP_K8S_STATEFULSET_UID = 'k8s.statefulset.uid';\nconst TMP_K8S_STATEFULSET_NAME = 'k8s.statefulset.name';\nconst TMP_K8S_DAEMONSET_UID = 'k8s.daemonset.uid';\nconst TMP_K8S_DAEMONSET_NAME = 'k8s.daemonset.name';\nconst TMP_K8S_JOB_UID = 'k8s.job.uid';\nconst TMP_K8S_JOB_NAME = 'k8s.job.name';\nconst TMP_K8S_CRONJOB_UID = 'k8s.cronjob.uid';\nconst TMP_K8S_CRONJOB_NAME = 'k8s.cronjob.name';\nconst TMP_OS_TYPE = 'os.type';\nconst TMP_OS_DESCRIPTION = 'os.description';\nconst TMP_OS_NAME = 'os.name';\nconst TMP_OS_VERSION = 'os.version';\nconst TMP_PROCESS_PID = 'process.pid';\nconst TMP_PROCESS_EXECUTABLE_NAME = 'process.executable.name';\nconst TMP_PROCESS_EXECUTABLE_PATH = 'process.executable.path';\nconst TMP_PROCESS_COMMAND = 'process.command';\nconst TMP_PROCESS_COMMAND_LINE = 'process.command_line';\nconst TMP_PROCESS_COMMAND_ARGS = 'process.command_args';\nconst TMP_PROCESS_OWNER = 'process.owner';\nconst TMP_PROCESS_RUNTIME_NAME = 'process.runtime.name';\nconst TMP_PROCESS_RUNTIME_VERSION = 'process.runtime.version';\nconst TMP_PROCESS_RUNTIME_DESCRIPTION = 'process.runtime.description';\nconst TMP_SERVICE_NAME = 'service.name';\nconst TMP_SERVICE_NAMESPACE = 'service.namespace';\nconst TMP_SERVICE_INSTANCE_ID = 'service.instance.id';\nconst TMP_SERVICE_VERSION = 'service.version';\nconst TMP_TELEMETRY_SDK_NAME = 'telemetry.sdk.name';\nconst TMP_TELEMETRY_SDK_LANGUAGE = 'telemetry.sdk.language';\nconst TMP_TELEMETRY_SDK_VERSION = 'telemetry.sdk.version';\nconst TMP_TELEMETRY_AUTO_VERSION = 'telemetry.auto.version';\nconst TMP_WEBENGINE_NAME = 'webengine.name';\nconst TMP_WEBENGINE_VERSION = 'webengine.version';\nconst TMP_WEBENGINE_DESCRIPTION = 'webengine.description';\n/**\n * Name of the cloud provider.\n *\n * @deprecated use ATTR_CLOUD_PROVIDER\n */\nexports.SEMRESATTRS_CLOUD_PROVIDER = TMP_CLOUD_PROVIDER;\n/**\n * The cloud account ID the resource is assigned to.\n *\n * @deprecated use ATTR_CLOUD_ACCOUNT_ID\n */\nexports.SEMRESATTRS_CLOUD_ACCOUNT_ID = TMP_CLOUD_ACCOUNT_ID;\n/**\n * The geographical region the resource is running. Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations).\n *\n * @deprecated use ATTR_CLOUD_REGION\n */\nexports.SEMRESATTRS_CLOUD_REGION = TMP_CLOUD_REGION;\n/**\n * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.\n *\n * Note: Availability zones are called "zones" on Alibaba Cloud and Google Cloud.\n *\n * @deprecated use ATTR_CLOUD_AVAILABILITY_ZONE\n */\nexports.SEMRESATTRS_CLOUD_AVAILABILITY_ZONE = TMP_CLOUD_AVAILABILITY_ZONE;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated use ATTR_CLOUD_PLATFORM\n */\nexports.SEMRESATTRS_CLOUD_PLATFORM = TMP_CLOUD_PLATFORM;\n/**\n * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).\n *\n * @deprecated use ATTR_AWS_ECS_CONTAINER_ARN\n */\nexports.SEMRESATTRS_AWS_ECS_CONTAINER_ARN = TMP_AWS_ECS_CONTAINER_ARN;\n/**\n * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).\n *\n * @deprecated use ATTR_AWS_ECS_CLUSTER_ARN\n */\nexports.SEMRESATTRS_AWS_ECS_CLUSTER_ARN = TMP_AWS_ECS_CLUSTER_ARN;\n/**\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n *\n * @deprecated use ATTR_AWS_ECS_LAUNCHTYPE\n */\nexports.SEMRESATTRS_AWS_ECS_LAUNCHTYPE = TMP_AWS_ECS_LAUNCHTYPE;\n/**\n * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).\n *\n * @deprecated use ATTR_AWS_ECS_TASK_ARN\n */\nexports.SEMRESATTRS_AWS_ECS_TASK_ARN = TMP_AWS_ECS_TASK_ARN;\n/**\n * The task definition family this task definition is a member of.\n *\n * @deprecated use ATTR_AWS_ECS_TASK_FAMILY\n */\nexports.SEMRESATTRS_AWS_ECS_TASK_FAMILY = TMP_AWS_ECS_TASK_FAMILY;\n/**\n * The revision for this task definition.\n *\n * @deprecated use ATTR_AWS_ECS_TASK_REVISION\n */\nexports.SEMRESATTRS_AWS_ECS_TASK_REVISION = TMP_AWS_ECS_TASK_REVISION;\n/**\n * The ARN of an EKS cluster.\n *\n * @deprecated use ATTR_AWS_EKS_CLUSTER_ARN\n */\nexports.SEMRESATTRS_AWS_EKS_CLUSTER_ARN = TMP_AWS_EKS_CLUSTER_ARN;\n/**\n * The name(s) of the AWS log group(s) an application is writing to.\n *\n * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group.\n *\n * @deprecated use ATTR_AWS_LOG_GROUP_NAMES\n */\nexports.SEMRESATTRS_AWS_LOG_GROUP_NAMES = TMP_AWS_LOG_GROUP_NAMES;\n/**\n * The Amazon Resource Name(s) (ARN) of the AWS log group(s).\n *\n * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).\n *\n * @deprecated use ATTR_AWS_LOG_GROUP_ARNS\n */\nexports.SEMRESATTRS_AWS_LOG_GROUP_ARNS = TMP_AWS_LOG_GROUP_ARNS;\n/**\n * The name(s) of the AWS log stream(s) an application is writing to.\n *\n * @deprecated use ATTR_AWS_LOG_STREAM_NAMES\n */\nexports.SEMRESATTRS_AWS_LOG_STREAM_NAMES = TMP_AWS_LOG_STREAM_NAMES;\n/**\n * The ARN(s) of the AWS log stream(s).\n *\n * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream.\n *\n * @deprecated use ATTR_AWS_LOG_STREAM_ARNS\n */\nexports.SEMRESATTRS_AWS_LOG_STREAM_ARNS = TMP_AWS_LOG_STREAM_ARNS;\n/**\n * Container name.\n *\n * @deprecated use ATTR_CONTAINER_NAME\n */\nexports.SEMRESATTRS_CONTAINER_NAME = TMP_CONTAINER_NAME;\n/**\n * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated.\n *\n * @deprecated use ATTR_CONTAINER_ID\n */\nexports.SEMRESATTRS_CONTAINER_ID = TMP_CONTAINER_ID;\n/**\n * The container runtime managing this container.\n *\n * @deprecated use ATTR_CONTAINER_RUNTIME\n */\nexports.SEMRESATTRS_CONTAINER_RUNTIME = TMP_CONTAINER_RUNTIME;\n/**\n * Name of the image the container was built on.\n *\n * @deprecated use ATTR_CONTAINER_IMAGE_NAME\n */\nexports.SEMRESATTRS_CONTAINER_IMAGE_NAME = TMP_CONTAINER_IMAGE_NAME;\n/**\n * Container image tag.\n *\n * @deprecated use ATTR_CONTAINER_IMAGE_TAG\n */\nexports.SEMRESATTRS_CONTAINER_IMAGE_TAG = TMP_CONTAINER_IMAGE_TAG;\n/**\n * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier).\n *\n * @deprecated use ATTR_DEPLOYMENT_ENVIRONMENT\n */\nexports.SEMRESATTRS_DEPLOYMENT_ENVIRONMENT = TMP_DEPLOYMENT_ENVIRONMENT;\n/**\n * A unique identifier representing the device.\n *\n * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence.\n *\n * @deprecated use ATTR_DEVICE_ID\n */\nexports.SEMRESATTRS_DEVICE_ID = TMP_DEVICE_ID;\n/**\n * The model identifier for the device.\n *\n * Note: It's recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device.\n *\n * @deprecated use ATTR_DEVICE_MODEL_IDENTIFIER\n */\nexports.SEMRESATTRS_DEVICE_MODEL_IDENTIFIER = TMP_DEVICE_MODEL_IDENTIFIER;\n/**\n * The marketing name for the device model.\n *\n * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative.\n *\n * @deprecated use ATTR_DEVICE_MODEL_NAME\n */\nexports.SEMRESATTRS_DEVICE_MODEL_NAME = TMP_DEVICE_MODEL_NAME;\n/**\n * The name of the single function that this runtime instance executes.\n *\n * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes).\n *\n * @deprecated use ATTR_FAAS_NAME\n */\nexports.SEMRESATTRS_FAAS_NAME = TMP_FAAS_NAME;\n/**\n* The unique ID of the single function that this runtime instance executes.\n*\n* Note: Depending on the cloud provider, use:\n\n* **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).\nTake care not to use the "invoked ARN" directly but replace any\n[alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple\ndifferent aliases.\n* **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)\n* **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id).\n\nOn some providers, it may not be possible to determine the full ID at startup,\nwhich is why this field cannot be made required. For example, on AWS the account ID\npart of the ARN is not available without calling another AWS API\nwhich may be deemed too slow for a short-running lambda function.\nAs an alternative, consider setting `faas.id` as a span attribute instead.\n*\n* @deprecated use ATTR_FAAS_ID\n*/\nexports.SEMRESATTRS_FAAS_ID = TMP_FAAS_ID;\n/**\n* The immutable version of the function being executed.\n*\n* Note: Depending on the cloud provider and platform, use:\n\n* **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)\n (an integer represented as a decimal string).\n* **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions)\n (i.e., the function name plus the revision suffix).\n* **Google Cloud Functions:** The value of the\n [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).\n* **Azure Functions:** Not applicable. Do not set this attribute.\n*\n* @deprecated use ATTR_FAAS_VERSION\n*/\nexports.SEMRESATTRS_FAAS_VERSION = TMP_FAAS_VERSION;\n/**\n * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.\n *\n * Note: * **AWS Lambda:** Use the (full) log stream name.\n *\n * @deprecated use ATTR_FAAS_INSTANCE\n */\nexports.SEMRESATTRS_FAAS_INSTANCE = TMP_FAAS_INSTANCE;\n/**\n * The amount of memory available to the serverless function in MiB.\n *\n * Note: It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information.\n *\n * @deprecated use ATTR_FAAS_MAX_MEMORY\n */\nexports.SEMRESATTRS_FAAS_MAX_MEMORY = TMP_FAAS_MAX_MEMORY;\n/**\n * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider.\n *\n * @deprecated use ATTR_HOST_ID\n */\nexports.SEMRESATTRS_HOST_ID = TMP_HOST_ID;\n/**\n * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.\n *\n * @deprecated use ATTR_HOST_NAME\n */\nexports.SEMRESATTRS_HOST_NAME = TMP_HOST_NAME;\n/**\n * Type of host. For Cloud, this must be the machine type.\n *\n * @deprecated use ATTR_HOST_TYPE\n */\nexports.SEMRESATTRS_HOST_TYPE = TMP_HOST_TYPE;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated use ATTR_HOST_ARCH\n */\nexports.SEMRESATTRS_HOST_ARCH = TMP_HOST_ARCH;\n/**\n * Name of the VM image or OS install the host was instantiated from.\n *\n * @deprecated use ATTR_HOST_IMAGE_NAME\n */\nexports.SEMRESATTRS_HOST_IMAGE_NAME = TMP_HOST_IMAGE_NAME;\n/**\n * VM image ID. For Cloud, this value is from the provider.\n *\n * @deprecated use ATTR_HOST_IMAGE_ID\n */\nexports.SEMRESATTRS_HOST_IMAGE_ID = TMP_HOST_IMAGE_ID;\n/**\n * The version string of the VM image as defined in [Version Attributes](README.md#version-attributes).\n *\n * @deprecated use ATTR_HOST_IMAGE_VERSION\n */\nexports.SEMRESATTRS_HOST_IMAGE_VERSION = TMP_HOST_IMAGE_VERSION;\n/**\n * The name of the cluster.\n *\n * @deprecated use ATTR_K8S_CLUSTER_NAME\n */\nexports.SEMRESATTRS_K8S_CLUSTER_NAME = TMP_K8S_CLUSTER_NAME;\n/**\n * The name of the Node.\n *\n * @deprecated use ATTR_K8S_NODE_NAME\n */\nexports.SEMRESATTRS_K8S_NODE_NAME = TMP_K8S_NODE_NAME;\n/**\n * The UID of the Node.\n *\n * @deprecated use ATTR_K8S_NODE_UID\n */\nexports.SEMRESATTRS_K8S_NODE_UID = TMP_K8S_NODE_UID;\n/**\n * The name of the namespace that the pod is running in.\n *\n * @deprecated use ATTR_K8S_NAMESPACE_NAME\n */\nexports.SEMRESATTRS_K8S_NAMESPACE_NAME = TMP_K8S_NAMESPACE_NAME;\n/**\n * The UID of the Pod.\n *\n * @deprecated use ATTR_K8S_POD_UID\n */\nexports.SEMRESATTRS_K8S_POD_UID = TMP_K8S_POD_UID;\n/**\n * The name of the Pod.\n *\n * @deprecated use ATTR_K8S_POD_NAME\n */\nexports.SEMRESATTRS_K8S_POD_NAME = TMP_K8S_POD_NAME;\n/**\n * The name of the Container in a Pod template.\n *\n * @deprecated use ATTR_K8S_CONTAINER_NAME\n */\nexports.SEMRESATTRS_K8S_CONTAINER_NAME = TMP_K8S_CONTAINER_NAME;\n/**\n * The UID of the ReplicaSet.\n *\n * @deprecated use ATTR_K8S_REPLICASET_UID\n */\nexports.SEMRESATTRS_K8S_REPLICASET_UID = TMP_K8S_REPLICASET_UID;\n/**\n * The name of the ReplicaSet.\n *\n * @deprecated use ATTR_K8S_REPLICASET_NAME\n */\nexports.SEMRESATTRS_K8S_REPLICASET_NAME = TMP_K8S_REPLICASET_NAME;\n/**\n * The UID of the Deployment.\n *\n * @deprecated use ATTR_K8S_DEPLOYMENT_UID\n */\nexports.SEMRESATTRS_K8S_DEPLOYMENT_UID = TMP_K8S_DEPLOYMENT_UID;\n/**\n * The name of the Deployment.\n *\n * @deprecated use ATTR_K8S_DEPLOYMENT_NAME\n */\nexports.SEMRESATTRS_K8S_DEPLOYMENT_NAME = TMP_K8S_DEPLOYMENT_NAME;\n/**\n * The UID of the StatefulSet.\n *\n * @deprecated use ATTR_K8S_STATEFULSET_UID\n */\nexports.SEMRESATTRS_K8S_STATEFULSET_UID = TMP_K8S_STATEFULSET_UID;\n/**\n * The name of the StatefulSet.\n *\n * @deprecated use ATTR_K8S_STATEFULSET_NAME\n */\nexports.SEMRESATTRS_K8S_STATEFULSET_NAME = TMP_K8S_STATEFULSET_NAME;\n/**\n * The UID of the DaemonSet.\n *\n * @deprecated use ATTR_K8S_DAEMONSET_UID\n */\nexports.SEMRESATTRS_K8S_DAEMONSET_UID = TMP_K8S_DAEMONSET_UID;\n/**\n * The name of the DaemonSet.\n *\n * @deprecated use ATTR_K8S_DAEMONSET_NAME\n */\nexports.SEMRESATTRS_K8S_DAEMONSET_NAME = TMP_K8S_DAEMONSET_NAME;\n/**\n * The UID of the Job.\n *\n * @deprecated use ATTR_K8S_JOB_UID\n */\nexports.SEMRESATTRS_K8S_JOB_UID = TMP_K8S_JOB_UID;\n/**\n * The name of the Job.\n *\n * @deprecated use ATTR_K8S_JOB_NAME\n */\nexports.SEMRESATTRS_K8S_JOB_NAME = TMP_K8S_JOB_NAME;\n/**\n * The UID of the CronJob.\n *\n * @deprecated use ATTR_K8S_CRONJOB_UID\n */\nexports.SEMRESATTRS_K8S_CRONJOB_UID = TMP_K8S_CRONJOB_UID;\n/**\n * The name of the CronJob.\n *\n * @deprecated use ATTR_K8S_CRONJOB_NAME\n */\nexports.SEMRESATTRS_K8S_CRONJOB_NAME = TMP_K8S_CRONJOB_NAME;\n/**\n * The operating system type.\n *\n * @deprecated use ATTR_OS_TYPE\n */\nexports.SEMRESATTRS_OS_TYPE = TMP_OS_TYPE;\n/**\n * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands.\n *\n * @deprecated use ATTR_OS_DESCRIPTION\n */\nexports.SEMRESATTRS_OS_DESCRIPTION = TMP_OS_DESCRIPTION;\n/**\n * Human readable operating system name.\n *\n * @deprecated use ATTR_OS_NAME\n */\nexports.SEMRESATTRS_OS_NAME = TMP_OS_NAME;\n/**\n * The version string of the operating system as defined in [Version Attributes](../../resource/semantic_conventions/README.md#version-attributes).\n *\n * @deprecated use ATTR_OS_VERSION\n */\nexports.SEMRESATTRS_OS_VERSION = TMP_OS_VERSION;\n/**\n * Process identifier (PID).\n *\n * @deprecated use ATTR_PROCESS_PID\n */\nexports.SEMRESATTRS_PROCESS_PID = TMP_PROCESS_PID;\n/**\n * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`.\n *\n * @deprecated use ATTR_PROCESS_EXECUTABLE_NAME\n */\nexports.SEMRESATTRS_PROCESS_EXECUTABLE_NAME = TMP_PROCESS_EXECUTABLE_NAME;\n/**\n * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`.\n *\n * @deprecated use ATTR_PROCESS_EXECUTABLE_PATH\n */\nexports.SEMRESATTRS_PROCESS_EXECUTABLE_PATH = TMP_PROCESS_EXECUTABLE_PATH;\n/**\n * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`.\n *\n * @deprecated use ATTR_PROCESS_COMMAND\n */\nexports.SEMRESATTRS_PROCESS_COMMAND = TMP_PROCESS_COMMAND;\n/**\n * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead.\n *\n * @deprecated use ATTR_PROCESS_COMMAND_LINE\n */\nexports.SEMRESATTRS_PROCESS_COMMAND_LINE = TMP_PROCESS_COMMAND_LINE;\n/**\n * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`.\n *\n * @deprecated use ATTR_PROCESS_COMMAND_ARGS\n */\nexports.SEMRESATTRS_PROCESS_COMMAND_ARGS = TMP_PROCESS_COMMAND_ARGS;\n/**\n * The username of the user that owns the process.\n *\n * @deprecated use ATTR_PROCESS_OWNER\n */\nexports.SEMRESATTRS_PROCESS_OWNER = TMP_PROCESS_OWNER;\n/**\n * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler.\n *\n * @deprecated use ATTR_PROCESS_RUNTIME_NAME\n */\nexports.SEMRESATTRS_PROCESS_RUNTIME_NAME = TMP_PROCESS_RUNTIME_NAME;\n/**\n * The version of the runtime of this process, as returned by the runtime without modification.\n *\n * @deprecated use ATTR_PROCESS_RUNTIME_VERSION\n */\nexports.SEMRESATTRS_PROCESS_RUNTIME_VERSION = TMP_PROCESS_RUNTIME_VERSION;\n/**\n * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.\n *\n * @deprecated use ATTR_PROCESS_RUNTIME_DESCRIPTION\n */\nexports.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION = TMP_PROCESS_RUNTIME_DESCRIPTION;\n/**\n * Logical name of the service.\n *\n * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.\n *\n * @deprecated use ATTR_SERVICE_NAME\n */\nexports.SEMRESATTRS_SERVICE_NAME = TMP_SERVICE_NAME;\n/**\n * A namespace for `service.name`.\n *\n * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.\n *\n * @deprecated use ATTR_SERVICE_NAMESPACE\n */\nexports.SEMRESATTRS_SERVICE_NAMESPACE = TMP_SERVICE_NAMESPACE;\n/**\n * The string ID of the service instance.\n *\n * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations).\n *\n * @deprecated use ATTR_SERVICE_INSTANCE_ID\n */\nexports.SEMRESATTRS_SERVICE_INSTANCE_ID = TMP_SERVICE_INSTANCE_ID;\n/**\n * The version string of the service API or implementation.\n *\n * @deprecated use ATTR_SERVICE_VERSION\n */\nexports.SEMRESATTRS_SERVICE_VERSION = TMP_SERVICE_VERSION;\n/**\n * The name of the telemetry SDK as defined above.\n *\n * @deprecated use ATTR_TELEMETRY_SDK_NAME\n */\nexports.SEMRESATTRS_TELEMETRY_SDK_NAME = TMP_TELEMETRY_SDK_NAME;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated use ATTR_TELEMETRY_SDK_LANGUAGE\n */\nexports.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE = TMP_TELEMETRY_SDK_LANGUAGE;\n/**\n * The version string of the telemetry SDK.\n *\n * @deprecated use ATTR_TELEMETRY_SDK_VERSION\n */\nexports.SEMRESATTRS_TELEMETRY_SDK_VERSION = TMP_TELEMETRY_SDK_VERSION;\n/**\n * The version string of the auto instrumentation agent, if used.\n *\n * @deprecated use ATTR_TELEMETRY_AUTO_VERSION\n */\nexports.SEMRESATTRS_TELEMETRY_AUTO_VERSION = TMP_TELEMETRY_AUTO_VERSION;\n/**\n * The name of the web engine.\n *\n * @deprecated use ATTR_WEBENGINE_NAME\n */\nexports.SEMRESATTRS_WEBENGINE_NAME = TMP_WEBENGINE_NAME;\n/**\n * The version of the web engine.\n *\n * @deprecated use ATTR_WEBENGINE_VERSION\n */\nexports.SEMRESATTRS_WEBENGINE_VERSION = TMP_WEBENGINE_VERSION;\n/**\n * Additional description of the web engine (e.g. detailed version and edition information).\n *\n * @deprecated use ATTR_WEBENGINE_DESCRIPTION\n */\nexports.SEMRESATTRS_WEBENGINE_DESCRIPTION = TMP_WEBENGINE_DESCRIPTION;\n/**\n * Create exported Value Map for SemanticResourceAttributes values\n * @deprecated Use the SEMRESATTRS_XXXXX constants rather than the SemanticResourceAttributes.XXXXX for bundle minification\n */\nexports.SemanticResourceAttributes = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_CLOUD_PROVIDER,\n TMP_CLOUD_ACCOUNT_ID,\n TMP_CLOUD_REGION,\n TMP_CLOUD_AVAILABILITY_ZONE,\n TMP_CLOUD_PLATFORM,\n TMP_AWS_ECS_CONTAINER_ARN,\n TMP_AWS_ECS_CLUSTER_ARN,\n TMP_AWS_ECS_LAUNCHTYPE,\n TMP_AWS_ECS_TASK_ARN,\n TMP_AWS_ECS_TASK_FAMILY,\n TMP_AWS_ECS_TASK_REVISION,\n TMP_AWS_EKS_CLUSTER_ARN,\n TMP_AWS_LOG_GROUP_NAMES,\n TMP_AWS_LOG_GROUP_ARNS,\n TMP_AWS_LOG_STREAM_NAMES,\n TMP_AWS_LOG_STREAM_ARNS,\n TMP_CONTAINER_NAME,\n TMP_CONTAINER_ID,\n TMP_CONTAINER_RUNTIME,\n TMP_CONTAINER_IMAGE_NAME,\n TMP_CONTAINER_IMAGE_TAG,\n TMP_DEPLOYMENT_ENVIRONMENT,\n TMP_DEVICE_ID,\n TMP_DEVICE_MODEL_IDENTIFIER,\n TMP_DEVICE_MODEL_NAME,\n TMP_FAAS_NAME,\n TMP_FAAS_ID,\n TMP_FAAS_VERSION,\n TMP_FAAS_INSTANCE,\n TMP_FAAS_MAX_MEMORY,\n TMP_HOST_ID,\n TMP_HOST_NAME,\n TMP_HOST_TYPE,\n TMP_HOST_ARCH,\n TMP_HOST_IMAGE_NAME,\n TMP_HOST_IMAGE_ID,\n TMP_HOST_IMAGE_VERSION,\n TMP_K8S_CLUSTER_NAME,\n TMP_K8S_NODE_NAME,\n TMP_K8S_NODE_UID,\n TMP_K8S_NAMESPACE_NAME,\n TMP_K8S_POD_UID,\n TMP_K8S_POD_NAME,\n TMP_K8S_CONTAINER_NAME,\n TMP_K8S_REPLICASET_UID,\n TMP_K8S_REPLICASET_NAME,\n TMP_K8S_DEPLOYMENT_UID,\n TMP_K8S_DEPLOYMENT_NAME,\n TMP_K8S_STATEFULSET_UID,\n TMP_K8S_STATEFULSET_NAME,\n TMP_K8S_DAEMONSET_UID,\n TMP_K8S_DAEMONSET_NAME,\n TMP_K8S_JOB_UID,\n TMP_K8S_JOB_NAME,\n TMP_K8S_CRONJOB_UID,\n TMP_K8S_CRONJOB_NAME,\n TMP_OS_TYPE,\n TMP_OS_DESCRIPTION,\n TMP_OS_NAME,\n TMP_OS_VERSION,\n TMP_PROCESS_PID,\n TMP_PROCESS_EXECUTABLE_NAME,\n TMP_PROCESS_EXECUTABLE_PATH,\n TMP_PROCESS_COMMAND,\n TMP_PROCESS_COMMAND_LINE,\n TMP_PROCESS_COMMAND_ARGS,\n TMP_PROCESS_OWNER,\n TMP_PROCESS_RUNTIME_NAME,\n TMP_PROCESS_RUNTIME_VERSION,\n TMP_PROCESS_RUNTIME_DESCRIPTION,\n TMP_SERVICE_NAME,\n TMP_SERVICE_NAMESPACE,\n TMP_SERVICE_INSTANCE_ID,\n TMP_SERVICE_VERSION,\n TMP_TELEMETRY_SDK_NAME,\n TMP_TELEMETRY_SDK_LANGUAGE,\n TMP_TELEMETRY_SDK_VERSION,\n TMP_TELEMETRY_AUTO_VERSION,\n TMP_WEBENGINE_NAME,\n TMP_WEBENGINE_VERSION,\n TMP_WEBENGINE_DESCRIPTION,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for CloudProviderValues enum definition\n *\n * Name of the cloud provider.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD = 'alibaba_cloud';\nconst TMP_CLOUDPROVIDERVALUES_AWS = 'aws';\nconst TMP_CLOUDPROVIDERVALUES_AZURE = 'azure';\nconst TMP_CLOUDPROVIDERVALUES_GCP = 'gcp';\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use CLOUD_PROVIDER_VALUE_ALIBABA_CLOUD.\n */\nexports.CLOUDPROVIDERVALUES_ALIBABA_CLOUD = TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD;\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use CLOUD_PROVIDER_VALUE_AWS.\n */\nexports.CLOUDPROVIDERVALUES_AWS = TMP_CLOUDPROVIDERVALUES_AWS;\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use CLOUD_PROVIDER_VALUE_AZURE.\n */\nexports.CLOUDPROVIDERVALUES_AZURE = TMP_CLOUDPROVIDERVALUES_AZURE;\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use CLOUD_PROVIDER_VALUE_GCP.\n */\nexports.CLOUDPROVIDERVALUES_GCP = TMP_CLOUDPROVIDERVALUES_GCP;\n/**\n * The constant map of values for CloudProviderValues.\n * @deprecated Use the CLOUDPROVIDERVALUES_XXXXX constants rather than the CloudProviderValues.XXXXX for bundle minification.\n */\nexports.CloudProviderValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD,\n TMP_CLOUDPROVIDERVALUES_AWS,\n TMP_CLOUDPROVIDERVALUES_AZURE,\n TMP_CLOUDPROVIDERVALUES_GCP,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for CloudPlatformValues enum definition\n *\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = 'alibaba_cloud_ecs';\nconst TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = 'alibaba_cloud_fc';\nconst TMP_CLOUDPLATFORMVALUES_AWS_EC2 = 'aws_ec2';\nconst TMP_CLOUDPLATFORMVALUES_AWS_ECS = 'aws_ecs';\nconst TMP_CLOUDPLATFORMVALUES_AWS_EKS = 'aws_eks';\nconst TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA = 'aws_lambda';\nconst TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = 'aws_elastic_beanstalk';\nconst TMP_CLOUDPLATFORMVALUES_AZURE_VM = 'azure_vm';\nconst TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = 'azure_container_instances';\nconst TMP_CLOUDPLATFORMVALUES_AZURE_AKS = 'azure_aks';\nconst TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = 'azure_functions';\nconst TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = 'azure_app_service';\nconst TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = 'gcp_compute_engine';\nconst TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = 'gcp_cloud_run';\nconst TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = 'gcp_kubernetes_engine';\nconst TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = 'gcp_cloud_functions';\nconst TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE = 'gcp_app_engine';\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_ALIBABA_CLOUD_ECS.\n */\nexports.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_ALIBABA_CLOUD_FC.\n */\nexports.CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AWS_EC2.\n */\nexports.CLOUDPLATFORMVALUES_AWS_EC2 = TMP_CLOUDPLATFORMVALUES_AWS_EC2;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AWS_ECS.\n */\nexports.CLOUDPLATFORMVALUES_AWS_ECS = TMP_CLOUDPLATFORMVALUES_AWS_ECS;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AWS_EKS.\n */\nexports.CLOUDPLATFORMVALUES_AWS_EKS = TMP_CLOUDPLATFORMVALUES_AWS_EKS;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AWS_LAMBDA.\n */\nexports.CLOUDPLATFORMVALUES_AWS_LAMBDA = TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AWS_ELASTIC_BEANSTALK.\n */\nexports.CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AZURE_VM.\n */\nexports.CLOUDPLATFORMVALUES_AZURE_VM = TMP_CLOUDPLATFORMVALUES_AZURE_VM;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AZURE_CONTAINER_INSTANCES.\n */\nexports.CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AZURE_AKS.\n */\nexports.CLOUDPLATFORMVALUES_AZURE_AKS = TMP_CLOUDPLATFORMVALUES_AZURE_AKS;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AZURE_FUNCTIONS.\n */\nexports.CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AZURE_APP_SERVICE.\n */\nexports.CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_GCP_COMPUTE_ENGINE.\n */\nexports.CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_GCP_CLOUD_RUN.\n */\nexports.CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_GCP_KUBERNETES_ENGINE.\n */\nexports.CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_GCP_CLOUD_FUNCTIONS.\n */\nexports.CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_GCP_APP_ENGINE.\n */\nexports.CLOUDPLATFORMVALUES_GCP_APP_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE;\n/**\n * The constant map of values for CloudPlatformValues.\n * @deprecated Use the CLOUDPLATFORMVALUES_XXXXX constants rather than the CloudPlatformValues.XXXXX for bundle minification.\n */\nexports.CloudPlatformValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS,\n TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC,\n TMP_CLOUDPLATFORMVALUES_AWS_EC2,\n TMP_CLOUDPLATFORMVALUES_AWS_ECS,\n TMP_CLOUDPLATFORMVALUES_AWS_EKS,\n TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA,\n TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK,\n TMP_CLOUDPLATFORMVALUES_AZURE_VM,\n TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES,\n TMP_CLOUDPLATFORMVALUES_AZURE_AKS,\n TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS,\n TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE,\n TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE,\n TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN,\n TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE,\n TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS,\n TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for AwsEcsLaunchtypeValues enum definition\n *\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_AWSECSLAUNCHTYPEVALUES_EC2 = 'ec2';\nconst TMP_AWSECSLAUNCHTYPEVALUES_FARGATE = 'fargate';\n/**\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n *\n * @deprecated Use AWS_ECS_LAUNCHTYPE_VALUE_EC2.\n */\nexports.AWSECSLAUNCHTYPEVALUES_EC2 = TMP_AWSECSLAUNCHTYPEVALUES_EC2;\n/**\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n *\n * @deprecated Use AWS_ECS_LAUNCHTYPE_VALUE_FARGATE.\n */\nexports.AWSECSLAUNCHTYPEVALUES_FARGATE = TMP_AWSECSLAUNCHTYPEVALUES_FARGATE;\n/**\n * The constant map of values for AwsEcsLaunchtypeValues.\n * @deprecated Use the AWSECSLAUNCHTYPEVALUES_XXXXX constants rather than the AwsEcsLaunchtypeValues.XXXXX for bundle minification.\n */\nexports.AwsEcsLaunchtypeValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_AWSECSLAUNCHTYPEVALUES_EC2,\n TMP_AWSECSLAUNCHTYPEVALUES_FARGATE,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for HostArchValues enum definition\n *\n * The CPU architecture the host system is running on.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_HOSTARCHVALUES_AMD64 = 'amd64';\nconst TMP_HOSTARCHVALUES_ARM32 = 'arm32';\nconst TMP_HOSTARCHVALUES_ARM64 = 'arm64';\nconst TMP_HOSTARCHVALUES_IA64 = 'ia64';\nconst TMP_HOSTARCHVALUES_PPC32 = 'ppc32';\nconst TMP_HOSTARCHVALUES_PPC64 = 'ppc64';\nconst TMP_HOSTARCHVALUES_X86 = 'x86';\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_AMD64.\n */\nexports.HOSTARCHVALUES_AMD64 = TMP_HOSTARCHVALUES_AMD64;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_ARM32.\n */\nexports.HOSTARCHVALUES_ARM32 = TMP_HOSTARCHVALUES_ARM32;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_ARM64.\n */\nexports.HOSTARCHVALUES_ARM64 = TMP_HOSTARCHVALUES_ARM64;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_IA64.\n */\nexports.HOSTARCHVALUES_IA64 = TMP_HOSTARCHVALUES_IA64;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_PPC32.\n */\nexports.HOSTARCHVALUES_PPC32 = TMP_HOSTARCHVALUES_PPC32;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_PPC64.\n */\nexports.HOSTARCHVALUES_PPC64 = TMP_HOSTARCHVALUES_PPC64;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_X86.\n */\nexports.HOSTARCHVALUES_X86 = TMP_HOSTARCHVALUES_X86;\n/**\n * The constant map of values for HostArchValues.\n * @deprecated Use the HOSTARCHVALUES_XXXXX constants rather than the HostArchValues.XXXXX for bundle minification.\n */\nexports.HostArchValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_HOSTARCHVALUES_AMD64,\n TMP_HOSTARCHVALUES_ARM32,\n TMP_HOSTARCHVALUES_ARM64,\n TMP_HOSTARCHVALUES_IA64,\n TMP_HOSTARCHVALUES_PPC32,\n TMP_HOSTARCHVALUES_PPC64,\n TMP_HOSTARCHVALUES_X86,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for OsTypeValues enum definition\n *\n * The operating system type.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_OSTYPEVALUES_WINDOWS = 'windows';\nconst TMP_OSTYPEVALUES_LINUX = 'linux';\nconst TMP_OSTYPEVALUES_DARWIN = 'darwin';\nconst TMP_OSTYPEVALUES_FREEBSD = 'freebsd';\nconst TMP_OSTYPEVALUES_NETBSD = 'netbsd';\nconst TMP_OSTYPEVALUES_OPENBSD = 'openbsd';\nconst TMP_OSTYPEVALUES_DRAGONFLYBSD = 'dragonflybsd';\nconst TMP_OSTYPEVALUES_HPUX = 'hpux';\nconst TMP_OSTYPEVALUES_AIX = 'aix';\nconst TMP_OSTYPEVALUES_SOLARIS = 'solaris';\nconst TMP_OSTYPEVALUES_Z_OS = 'z_os';\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_WINDOWS.\n */\nexports.OSTYPEVALUES_WINDOWS = TMP_OSTYPEVALUES_WINDOWS;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_LINUX.\n */\nexports.OSTYPEVALUES_LINUX = TMP_OSTYPEVALUES_LINUX;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_DARWIN.\n */\nexports.OSTYPEVALUES_DARWIN = TMP_OSTYPEVALUES_DARWIN;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_FREEBSD.\n */\nexports.OSTYPEVALUES_FREEBSD = TMP_OSTYPEVALUES_FREEBSD;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_NETBSD.\n */\nexports.OSTYPEVALUES_NETBSD = TMP_OSTYPEVALUES_NETBSD;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_OPENBSD.\n */\nexports.OSTYPEVALUES_OPENBSD = TMP_OSTYPEVALUES_OPENBSD;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_DRAGONFLYBSD.\n */\nexports.OSTYPEVALUES_DRAGONFLYBSD = TMP_OSTYPEVALUES_DRAGONFLYBSD;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_HPUX.\n */\nexports.OSTYPEVALUES_HPUX = TMP_OSTYPEVALUES_HPUX;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_AIX.\n */\nexports.OSTYPEVALUES_AIX = TMP_OSTYPEVALUES_AIX;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_SOLARIS.\n */\nexports.OSTYPEVALUES_SOLARIS = TMP_OSTYPEVALUES_SOLARIS;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_Z_OS.\n */\nexports.OSTYPEVALUES_Z_OS = TMP_OSTYPEVALUES_Z_OS;\n/**\n * The constant map of values for OsTypeValues.\n * @deprecated Use the OSTYPEVALUES_XXXXX constants rather than the OsTypeValues.XXXXX for bundle minification.\n */\nexports.OsTypeValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_OSTYPEVALUES_WINDOWS,\n TMP_OSTYPEVALUES_LINUX,\n TMP_OSTYPEVALUES_DARWIN,\n TMP_OSTYPEVALUES_FREEBSD,\n TMP_OSTYPEVALUES_NETBSD,\n TMP_OSTYPEVALUES_OPENBSD,\n TMP_OSTYPEVALUES_DRAGONFLYBSD,\n TMP_OSTYPEVALUES_HPUX,\n TMP_OSTYPEVALUES_AIX,\n TMP_OSTYPEVALUES_SOLARIS,\n TMP_OSTYPEVALUES_Z_OS,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for TelemetrySdkLanguageValues enum definition\n *\n * The language of the telemetry SDK.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_CPP = 'cpp';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET = 'dotnet';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG = 'erlang';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_GO = 'go';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA = 'java';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS = 'nodejs';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_PHP = 'php';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON = 'python';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY = 'ruby';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS = 'webjs';\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_CPP.\n */\nexports.TELEMETRYSDKLANGUAGEVALUES_CPP = TMP_TELEMETRYSDKLANGUAGEVALUES_CPP;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET.\n */\nexports.TELEMETRYSDKLANGUAGEVALUES_DOTNET = TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG.\n */\nexports.TELEMETRYSDKLANGUAGEVALUES_ERLANG = TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_GO.\n */\nexports.TELEMETRYSDKLANGUAGEVALUES_GO = TMP_TELEMETRYSDKLANGUAGEVALUES_GO;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_JAVA.\n */\nexports.TELEMETRYSDKLANGUAGEVALUES_JAVA = TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS.\n */\nexports.TELEMETRYSDKLANGUAGEVALUES_NODEJS = TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_PHP.\n */\nexports.TELEMETRYSDKLANGUAGEVALUES_PHP = TMP_TELEMETRYSDKLANGUAGEVALUES_PHP;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON.\n */\nexports.TELEMETRYSDKLANGUAGEVALUES_PYTHON = TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_RUBY.\n */\nexports.TELEMETRYSDKLANGUAGEVALUES_RUBY = TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS.\n */\nexports.TELEMETRYSDKLANGUAGEVALUES_WEBJS = TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS;\n/**\n * The constant map of values for TelemetrySdkLanguageValues.\n * @deprecated Use the TELEMETRYSDKLANGUAGEVALUES_XXXXX constants rather than the TelemetrySdkLanguageValues.XXXXX for bundle minification.\n */\nexports.TelemetrySdkLanguageValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_TELEMETRYSDKLANGUAGEVALUES_CPP,\n TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET,\n TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG,\n TMP_TELEMETRYSDKLANGUAGEVALUES_GO,\n TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA,\n TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS,\n TMP_TELEMETRYSDKLANGUAGEVALUES_PHP,\n TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON,\n TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY,\n TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS,\n]);\n//# sourceMappingURL=SemanticResourceAttributes.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/* eslint-disable no-restricted-syntax --\n * These re-exports are only of constants, only one-level deep at this point,\n * and should not cause problems for tree-shakers.\n */\n__exportStar(require(\"./SemanticResourceAttributes\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HTTP_REQUEST_METHOD_VALUE_POST = exports.HTTP_REQUEST_METHOD_VALUE_PATCH = exports.HTTP_REQUEST_METHOD_VALUE_OPTIONS = exports.HTTP_REQUEST_METHOD_VALUE_HEAD = exports.HTTP_REQUEST_METHOD_VALUE_GET = exports.HTTP_REQUEST_METHOD_VALUE_DELETE = exports.HTTP_REQUEST_METHOD_VALUE_CONNECT = exports.HTTP_REQUEST_METHOD_VALUE_OTHER = exports.ATTR_HTTP_REQUEST_METHOD = exports.ATTR_HTTP_REQUEST_HEADER = exports.ATTR_EXCEPTION_TYPE = exports.ATTR_EXCEPTION_STACKTRACE = exports.ATTR_EXCEPTION_MESSAGE = exports.ATTR_EXCEPTION_ESCAPED = exports.ERROR_TYPE_VALUE_OTHER = exports.ATTR_ERROR_TYPE = exports.ATTR_CLIENT_PORT = exports.ATTR_CLIENT_ADDRESS = exports.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS = exports.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE = exports.ATTR_ASPNETCORE_ROUTING_MATCH_STATUS = exports.ATTR_ASPNETCORE_ROUTING_IS_FALLBACK = exports.ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED = exports.ATTR_ASPNETCORE_RATE_LIMITING_POLICY = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED = exports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED = exports.ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT = exports.ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE = exports.ATTR_TELEMETRY_SDK_VERSION = exports.ATTR_TELEMETRY_SDK_NAME = exports.TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS = exports.TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT = exports.TELEMETRY_SDK_LANGUAGE_VALUE_RUST = exports.TELEMETRY_SDK_LANGUAGE_VALUE_RUBY = exports.TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON = exports.TELEMETRY_SDK_LANGUAGE_VALUE_PHP = exports.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS = exports.TELEMETRY_SDK_LANGUAGE_VALUE_JAVA = exports.TELEMETRY_SDK_LANGUAGE_VALUE_GO = exports.TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG = exports.TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET = exports.TELEMETRY_SDK_LANGUAGE_VALUE_CPP = exports.ATTR_TELEMETRY_SDK_LANGUAGE = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER = exports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED = exports.ATTR_ASPNETCORE_RATE_LIMITING_RESULT = void 0;\nexports.SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT = exports.SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE = exports.SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN = exports.ATTR_SIGNALR_CONNECTION_STATUS = exports.ATTR_SERVICE_VERSION = exports.ATTR_SERVICE_NAME = exports.ATTR_SERVER_PORT = exports.ATTR_SERVER_ADDRESS = exports.ATTR_OTEL_STATUS_DESCRIPTION = exports.OTEL_STATUS_CODE_VALUE_OK = exports.OTEL_STATUS_CODE_VALUE_ERROR = exports.ATTR_OTEL_STATUS_CODE = exports.ATTR_OTEL_SCOPE_VERSION = exports.ATTR_OTEL_SCOPE_NAME = exports.NETWORK_TYPE_VALUE_IPV6 = exports.NETWORK_TYPE_VALUE_IPV4 = exports.ATTR_NETWORK_TYPE = exports.NETWORK_TRANSPORT_VALUE_UNIX = exports.NETWORK_TRANSPORT_VALUE_UDP = exports.NETWORK_TRANSPORT_VALUE_TCP = exports.NETWORK_TRANSPORT_VALUE_QUIC = exports.NETWORK_TRANSPORT_VALUE_PIPE = exports.ATTR_NETWORK_TRANSPORT = exports.ATTR_NETWORK_PROTOCOL_VERSION = exports.ATTR_NETWORK_PROTOCOL_NAME = exports.ATTR_NETWORK_PEER_PORT = exports.ATTR_NETWORK_PEER_ADDRESS = exports.ATTR_NETWORK_LOCAL_PORT = exports.ATTR_NETWORK_LOCAL_ADDRESS = exports.JVM_THREAD_STATE_VALUE_WAITING = exports.JVM_THREAD_STATE_VALUE_TIMED_WAITING = exports.JVM_THREAD_STATE_VALUE_TERMINATED = exports.JVM_THREAD_STATE_VALUE_RUNNABLE = exports.JVM_THREAD_STATE_VALUE_NEW = exports.JVM_THREAD_STATE_VALUE_BLOCKED = exports.ATTR_JVM_THREAD_STATE = exports.ATTR_JVM_THREAD_DAEMON = exports.JVM_MEMORY_TYPE_VALUE_NON_HEAP = exports.JVM_MEMORY_TYPE_VALUE_HEAP = exports.ATTR_JVM_MEMORY_TYPE = exports.ATTR_JVM_MEMORY_POOL_NAME = exports.ATTR_JVM_GC_NAME = exports.ATTR_JVM_GC_ACTION = exports.ATTR_HTTP_ROUTE = exports.ATTR_HTTP_RESPONSE_STATUS_CODE = exports.ATTR_HTTP_RESPONSE_HEADER = exports.ATTR_HTTP_REQUEST_RESEND_COUNT = exports.ATTR_HTTP_REQUEST_METHOD_ORIGINAL = exports.HTTP_REQUEST_METHOD_VALUE_TRACE = exports.HTTP_REQUEST_METHOD_VALUE_PUT = void 0;\nexports.ATTR_USER_AGENT_ORIGINAL = exports.ATTR_URL_SCHEME = exports.ATTR_URL_QUERY = exports.ATTR_URL_PATH = exports.ATTR_URL_FULL = exports.ATTR_URL_FRAGMENT = exports.SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS = exports.SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS = exports.SIGNALR_TRANSPORT_VALUE_LONG_POLLING = exports.ATTR_SIGNALR_TRANSPORT = void 0;\n//----------------------------------------------------------------------------------------------------------\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates/registry/stable/attributes.ts.j2\n//----------------------------------------------------------------------------------------------------------\n/**\n * Rate-limiting result, shows whether the lease was acquired or contains a rejection reason\n *\n * @example acquired\n *\n * @example request_canceled\n */\nexports.ATTR_ASPNETCORE_RATE_LIMITING_RESULT = 'aspnetcore.rate_limiting.result';\n/**\n * Enum value \"acquired\" for attribute {@link ATTR_ASPNETCORE_RATE_LIMITING_RESULT}.\n */\nexports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED = \"acquired\";\n/**\n * Enum value \"endpoint_limiter\" for attribute {@link ATTR_ASPNETCORE_RATE_LIMITING_RESULT}.\n */\nexports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER = \"endpoint_limiter\";\n/**\n * Enum value \"global_limiter\" for attribute {@link ATTR_ASPNETCORE_RATE_LIMITING_RESULT}.\n */\nexports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER = \"global_limiter\";\n/**\n * Enum value \"request_canceled\" for attribute {@link ATTR_ASPNETCORE_RATE_LIMITING_RESULT}.\n */\nexports.ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED = \"request_canceled\";\n/**\n * The language of the telemetry SDK.\n */\nexports.ATTR_TELEMETRY_SDK_LANGUAGE = 'telemetry.sdk.language';\n/**\n * Enum value \"cpp\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexports.TELEMETRY_SDK_LANGUAGE_VALUE_CPP = \"cpp\";\n/**\n * Enum value \"dotnet\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexports.TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET = \"dotnet\";\n/**\n * Enum value \"erlang\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexports.TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG = \"erlang\";\n/**\n * Enum value \"go\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexports.TELEMETRY_SDK_LANGUAGE_VALUE_GO = \"go\";\n/**\n * Enum value \"java\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexports.TELEMETRY_SDK_LANGUAGE_VALUE_JAVA = \"java\";\n/**\n * Enum value \"nodejs\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexports.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS = \"nodejs\";\n/**\n * Enum value \"php\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexports.TELEMETRY_SDK_LANGUAGE_VALUE_PHP = \"php\";\n/**\n * Enum value \"python\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexports.TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON = \"python\";\n/**\n * Enum value \"ruby\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexports.TELEMETRY_SDK_LANGUAGE_VALUE_RUBY = \"ruby\";\n/**\n * Enum value \"rust\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexports.TELEMETRY_SDK_LANGUAGE_VALUE_RUST = \"rust\";\n/**\n * Enum value \"swift\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexports.TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT = \"swift\";\n/**\n * Enum value \"webjs\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexports.TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS = \"webjs\";\n/**\n * The name of the telemetry SDK as defined above.\n *\n * @example opentelemetry\n *\n * @note The OpenTelemetry SDK **MUST** set the `telemetry.sdk.name` attribute to `opentelemetry`.\n * If another SDK, like a fork or a vendor-provided implementation, is used, this SDK **MUST** set the\n * `telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point\n * or another suitable identifier depending on the language.\n * The identifier `opentelemetry` is reserved and **MUST** **NOT** be used in this case.\n * All custom identifiers **SHOULD** be stable across different versions of an implementation.\n */\nexports.ATTR_TELEMETRY_SDK_NAME = 'telemetry.sdk.name';\n/**\n * The version string of the telemetry SDK.\n *\n * @example 1.2.3\n */\nexports.ATTR_TELEMETRY_SDK_VERSION = 'telemetry.sdk.version';\n/**\n * Full type name of the [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) implementation that handled the exception.\n *\n * @example Contoso.MyHandler\n */\nexports.ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE = 'aspnetcore.diagnostics.handler.type';\n/**\n * ASP.NET Core exception middleware handling result\n *\n * @example handled\n *\n * @example unhandled\n */\nexports.ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT = 'aspnetcore.diagnostics.exception.result';\n/**\n * Enum value \"aborted\" for attribute {@link ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT}.\n */\nexports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED = \"aborted\";\n/**\n * Enum value \"handled\" for attribute {@link ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT}.\n */\nexports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED = \"handled\";\n/**\n * Enum value \"skipped\" for attribute {@link ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT}.\n */\nexports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED = \"skipped\";\n/**\n * Enum value \"unhandled\" for attribute {@link ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT}.\n */\nexports.ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED = \"unhandled\";\n/**\n * Rate limiting policy name.\n *\n * @example fixed\n *\n * @example sliding\n *\n * @example token\n */\nexports.ATTR_ASPNETCORE_RATE_LIMITING_POLICY = 'aspnetcore.rate_limiting.policy';\n/**\n * Flag indicating if request was handled by the application pipeline.\n *\n * @example true\n */\nexports.ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED = 'aspnetcore.request.is_unhandled';\n/**\n * A value that indicates whether the matched route is a fallback route.\n *\n * @example true\n */\nexports.ATTR_ASPNETCORE_ROUTING_IS_FALLBACK = 'aspnetcore.routing.is_fallback';\n/**\n * Match result - success or failure\n *\n * @example success\n *\n * @example failure\n */\nexports.ATTR_ASPNETCORE_ROUTING_MATCH_STATUS = 'aspnetcore.routing.match_status';\n/**\n * Enum value \"failure\" for attribute {@link ATTR_ASPNETCORE_ROUTING_MATCH_STATUS}.\n */\nexports.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE = \"failure\";\n/**\n * Enum value \"success\" for attribute {@link ATTR_ASPNETCORE_ROUTING_MATCH_STATUS}.\n */\nexports.ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS = \"success\";\n/**\n * Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\n *\n * @example client.example.com\n *\n * @example 10.1.2.80\n *\n * @example /tmp/my.sock\n *\n * @note When observed from the server side, and when communicating through an intermediary, `client.address` **SHOULD** represent the client address behind any intermediaries, for example proxies, if it's available.\n */\nexports.ATTR_CLIENT_ADDRESS = 'client.address';\n/**\n * Client port number.\n *\n * @example 65123\n *\n * @note When observed from the server side, and when communicating through an intermediary, `client.port` **SHOULD** represent the client port behind any intermediaries, for example proxies, if it's available.\n */\nexports.ATTR_CLIENT_PORT = 'client.port';\n/**\n * Describes a class of error the operation ended with.\n *\n * @example timeout\n *\n * @example java.net.UnknownHostException\n *\n * @example server_certificate_invalid\n *\n * @example 500\n *\n * @note The `error.type` **SHOULD** be predictable, and **SHOULD** have low cardinality.\n *\n * When `error.type` is set to a type (e.g., an exception type), its\n * canonical class name identifying the type within the artifact **SHOULD** be used.\n *\n * Instrumentations **SHOULD** document the list of errors they report.\n *\n * The cardinality of `error.type` within one instrumentation library **SHOULD** be low.\n * Telemetry consumers that aggregate data from multiple instrumentation libraries and applications\n * should be prepared for `error.type` to have high cardinality at query time when no\n * additional filters are applied.\n *\n * If the operation has completed successfully, instrumentations **SHOULD** **NOT** set `error.type`.\n *\n * If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),\n * it's RECOMMENDED to:\n *\n * * Use a domain-specific attribute\n * * Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.\n */\nexports.ATTR_ERROR_TYPE = 'error.type';\n/**\n * Enum value \"_OTHER\" for attribute {@link ATTR_ERROR_TYPE}.\n */\nexports.ERROR_TYPE_VALUE_OTHER = \"_OTHER\";\n/**\n * **SHOULD** be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.\n *\n * @note An exception is considered to have escaped (or left) the scope of a span,\n * if that span is ended while the exception is still logically \"in flight\".\n * This may be actually \"in flight\" in some languages (e.g. if the exception\n * is passed to a Context manager's `__exit__` method in Python) but will\n * usually be caught at the point of recording the exception in most languages.\n *\n * It is usually not possible to determine at the point where an exception is thrown\n * whether it will escape the scope of a span.\n * However, it is trivial to know that an exception\n * will escape, if one checks for an active exception just before ending the span,\n * as done in the [example for recording span exceptions](https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans/#recording-an-exception).\n *\n * It follows that an exception may still escape the scope of the span\n * even if the `exception.escaped` attribute was not set or set to false,\n * since the event might have been recorded at a time where it was not\n * clear whether the exception will escape.\n */\nexports.ATTR_EXCEPTION_ESCAPED = 'exception.escaped';\n/**\n * The exception message.\n *\n * @example Division by zero\n *\n * @example Can't convert 'int' object to str implicitly\n */\nexports.ATTR_EXCEPTION_MESSAGE = 'exception.message';\n/**\n * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.\n *\n * @example \"Exception in thread \\\"main\\\" java.lang.RuntimeException: Test exception\\\\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\\\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\\\n at com.example.GenerateTrace.main(GenerateTrace.java:5)\"\n */\nexports.ATTR_EXCEPTION_STACKTRACE = 'exception.stacktrace';\n/**\n * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.\n *\n * @example java.net.ConnectException\n *\n * @example OSError\n */\nexports.ATTR_EXCEPTION_TYPE = 'exception.type';\n/**\n * HTTP request headers, `` being the normalized HTTP Header name (lowercase), the value being the header values.\n *\n * @example http.request.header.content-type=[\"application/json\"]\n *\n * @example http.request.header.x-forwarded-for=[\"1.2.3.4\", \"1.2.3.5\"]\n *\n * @note Instrumentations **SHOULD** require an explicit configuration of which headers are to be captured. Including all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information.\n * The `User-Agent` header is already captured in the `user_agent.original` attribute. Users **MAY** explicitly configure instrumentations to capture them even though it is not recommended.\n * The attribute value **MUST** consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers.\n */\nconst ATTR_HTTP_REQUEST_HEADER = (key) => `http.request.header.${key}`;\nexports.ATTR_HTTP_REQUEST_HEADER = ATTR_HTTP_REQUEST_HEADER;\n/**\n * HTTP request method.\n *\n * @example GET\n *\n * @example POST\n *\n * @example HEAD\n *\n * @note HTTP request method value **SHOULD** be \"known\" to the instrumentation.\n * By default, this convention defines \"known\" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)\n * and the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).\n *\n * If the HTTP request method is not known to instrumentation, it **MUST** set the `http.request.method` attribute to `_OTHER`.\n *\n * If the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, then it **MUST** provide a way to override\n * the list of known HTTP methods. If this override is done via environment variable, then the environment variable **MUST** be named\n * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods\n * (this list **MUST** be a full override of the default known method, it is not a list of known methods in addition to the defaults).\n *\n * HTTP method names are case-sensitive and `http.request.method` attribute value **MUST** match a known HTTP method name exactly.\n * Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, **SHOULD** populate a canonical equivalent.\n * Tracing instrumentations that do so, **MUST** also set `http.request.method_original` to the original value.\n */\nexports.ATTR_HTTP_REQUEST_METHOD = 'http.request.method';\n/**\n * Enum value \"_OTHER\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n */\nexports.HTTP_REQUEST_METHOD_VALUE_OTHER = \"_OTHER\";\n/**\n * Enum value \"CONNECT\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n */\nexports.HTTP_REQUEST_METHOD_VALUE_CONNECT = \"CONNECT\";\n/**\n * Enum value \"DELETE\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n */\nexports.HTTP_REQUEST_METHOD_VALUE_DELETE = \"DELETE\";\n/**\n * Enum value \"GET\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n */\nexports.HTTP_REQUEST_METHOD_VALUE_GET = \"GET\";\n/**\n * Enum value \"HEAD\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n */\nexports.HTTP_REQUEST_METHOD_VALUE_HEAD = \"HEAD\";\n/**\n * Enum value \"OPTIONS\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n */\nexports.HTTP_REQUEST_METHOD_VALUE_OPTIONS = \"OPTIONS\";\n/**\n * Enum value \"PATCH\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n */\nexports.HTTP_REQUEST_METHOD_VALUE_PATCH = \"PATCH\";\n/**\n * Enum value \"POST\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n */\nexports.HTTP_REQUEST_METHOD_VALUE_POST = \"POST\";\n/**\n * Enum value \"PUT\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n */\nexports.HTTP_REQUEST_METHOD_VALUE_PUT = \"PUT\";\n/**\n * Enum value \"TRACE\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n */\nexports.HTTP_REQUEST_METHOD_VALUE_TRACE = \"TRACE\";\n/**\n * Original HTTP method sent by the client in the request line.\n *\n * @example GeT\n *\n * @example ACL\n *\n * @example foo\n */\nexports.ATTR_HTTP_REQUEST_METHOD_ORIGINAL = 'http.request.method_original';\n/**\n * The ordinal number of request resending attempt (for any reason, including redirects).\n *\n * @example 3\n *\n * @note The resend count **SHOULD** be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other).\n */\nexports.ATTR_HTTP_REQUEST_RESEND_COUNT = 'http.request.resend_count';\n/**\n * HTTP response headers, `` being the normalized HTTP Header name (lowercase), the value being the header values.\n *\n * @example http.response.header.content-type=[\"application/json\"]\n *\n * @example http.response.header.my-custom-header=[\"abc\", \"def\"]\n *\n * @note Instrumentations **SHOULD** require an explicit configuration of which headers are to be captured. Including all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information.\n * Users **MAY** explicitly configure instrumentations to capture them even though it is not recommended.\n * The attribute value **MUST** consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers.\n */\nconst ATTR_HTTP_RESPONSE_HEADER = (key) => `http.response.header.${key}`;\nexports.ATTR_HTTP_RESPONSE_HEADER = ATTR_HTTP_RESPONSE_HEADER;\n/**\n * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).\n *\n * @example 200\n */\nexports.ATTR_HTTP_RESPONSE_STATUS_CODE = 'http.response.status_code';\n/**\n * The matched route, that is, the path template in the format used by the respective server framework.\n *\n * @example /users/:userID?\n *\n * @example {controller}/{action}/{id?}\n *\n * @note MUST **NOT** be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can **NOT** substitute it.\n * SHOULD include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one.\n */\nexports.ATTR_HTTP_ROUTE = 'http.route';\n/**\n * Name of the garbage collector action.\n *\n * @example end of minor GC\n *\n * @example end of major GC\n *\n * @note Garbage collector action is generally obtained via [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()).\n */\nexports.ATTR_JVM_GC_ACTION = 'jvm.gc.action';\n/**\n * Name of the garbage collector.\n *\n * @example G1 Young Generation\n *\n * @example G1 Old Generation\n *\n * @note Garbage collector name is generally obtained via [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()).\n */\nexports.ATTR_JVM_GC_NAME = 'jvm.gc.name';\n/**\n * Name of the memory pool.\n *\n * @example G1 Old Gen\n *\n * @example G1 Eden space\n *\n * @example G1 Survivor Space\n *\n * @note Pool names are generally obtained via [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()).\n */\nexports.ATTR_JVM_MEMORY_POOL_NAME = 'jvm.memory.pool.name';\n/**\n * The type of memory.\n *\n * @example heap\n *\n * @example non_heap\n */\nexports.ATTR_JVM_MEMORY_TYPE = 'jvm.memory.type';\n/**\n * Enum value \"heap\" for attribute {@link ATTR_JVM_MEMORY_TYPE}.\n */\nexports.JVM_MEMORY_TYPE_VALUE_HEAP = \"heap\";\n/**\n * Enum value \"non_heap\" for attribute {@link ATTR_JVM_MEMORY_TYPE}.\n */\nexports.JVM_MEMORY_TYPE_VALUE_NON_HEAP = \"non_heap\";\n/**\n * Whether the thread is daemon or not.\n */\nexports.ATTR_JVM_THREAD_DAEMON = 'jvm.thread.daemon';\n/**\n * State of the thread.\n *\n * @example runnable\n *\n * @example blocked\n */\nexports.ATTR_JVM_THREAD_STATE = 'jvm.thread.state';\n/**\n * Enum value \"blocked\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n */\nexports.JVM_THREAD_STATE_VALUE_BLOCKED = \"blocked\";\n/**\n * Enum value \"new\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n */\nexports.JVM_THREAD_STATE_VALUE_NEW = \"new\";\n/**\n * Enum value \"runnable\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n */\nexports.JVM_THREAD_STATE_VALUE_RUNNABLE = \"runnable\";\n/**\n * Enum value \"terminated\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n */\nexports.JVM_THREAD_STATE_VALUE_TERMINATED = \"terminated\";\n/**\n * Enum value \"timed_waiting\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n */\nexports.JVM_THREAD_STATE_VALUE_TIMED_WAITING = \"timed_waiting\";\n/**\n * Enum value \"waiting\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n */\nexports.JVM_THREAD_STATE_VALUE_WAITING = \"waiting\";\n/**\n * Local address of the network connection - IP address or Unix domain socket name.\n *\n * @example 10.1.2.80\n *\n * @example /tmp/my.sock\n */\nexports.ATTR_NETWORK_LOCAL_ADDRESS = 'network.local.address';\n/**\n * Local port number of the network connection.\n *\n * @example 65123\n */\nexports.ATTR_NETWORK_LOCAL_PORT = 'network.local.port';\n/**\n * Peer address of the network connection - IP address or Unix domain socket name.\n *\n * @example 10.1.2.80\n *\n * @example /tmp/my.sock\n */\nexports.ATTR_NETWORK_PEER_ADDRESS = 'network.peer.address';\n/**\n * Peer port number of the network connection.\n *\n * @example 65123\n */\nexports.ATTR_NETWORK_PEER_PORT = 'network.peer.port';\n/**\n * [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent.\n *\n * @example amqp\n *\n * @example http\n *\n * @example mqtt\n *\n * @note The value **SHOULD** be normalized to lowercase.\n */\nexports.ATTR_NETWORK_PROTOCOL_NAME = 'network.protocol.name';\n/**\n * The actual version of the protocol used for network communication.\n *\n * @example 1.1\n *\n * @example 2\n *\n * @note If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute **SHOULD** be set to the negotiated version. If the actual protocol version is not known, this attribute **SHOULD** **NOT** be set.\n */\nexports.ATTR_NETWORK_PROTOCOL_VERSION = 'network.protocol.version';\n/**\n * [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication).\n *\n * @example tcp\n *\n * @example udp\n *\n * @note The value **SHOULD** be normalized to lowercase.\n *\n * Consider always setting the transport when setting a port number, since\n * a port number is ambiguous without knowing the transport. For example\n * different processes could be listening on TCP port 12345 and UDP port 12345.\n */\nexports.ATTR_NETWORK_TRANSPORT = 'network.transport';\n/**\n * Enum value \"pipe\" for attribute {@link ATTR_NETWORK_TRANSPORT}.\n */\nexports.NETWORK_TRANSPORT_VALUE_PIPE = \"pipe\";\n/**\n * Enum value \"quic\" for attribute {@link ATTR_NETWORK_TRANSPORT}.\n */\nexports.NETWORK_TRANSPORT_VALUE_QUIC = \"quic\";\n/**\n * Enum value \"tcp\" for attribute {@link ATTR_NETWORK_TRANSPORT}.\n */\nexports.NETWORK_TRANSPORT_VALUE_TCP = \"tcp\";\n/**\n * Enum value \"udp\" for attribute {@link ATTR_NETWORK_TRANSPORT}.\n */\nexports.NETWORK_TRANSPORT_VALUE_UDP = \"udp\";\n/**\n * Enum value \"unix\" for attribute {@link ATTR_NETWORK_TRANSPORT}.\n */\nexports.NETWORK_TRANSPORT_VALUE_UNIX = \"unix\";\n/**\n * [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent.\n *\n * @example ipv4\n *\n * @example ipv6\n *\n * @note The value **SHOULD** be normalized to lowercase.\n */\nexports.ATTR_NETWORK_TYPE = 'network.type';\n/**\n * Enum value \"ipv4\" for attribute {@link ATTR_NETWORK_TYPE}.\n */\nexports.NETWORK_TYPE_VALUE_IPV4 = \"ipv4\";\n/**\n * Enum value \"ipv6\" for attribute {@link ATTR_NETWORK_TYPE}.\n */\nexports.NETWORK_TYPE_VALUE_IPV6 = \"ipv6\";\n/**\n * The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP).\n *\n * @example io.opentelemetry.contrib.mongodb\n */\nexports.ATTR_OTEL_SCOPE_NAME = 'otel.scope.name';\n/**\n * The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP).\n *\n * @example 1.0.0\n */\nexports.ATTR_OTEL_SCOPE_VERSION = 'otel.scope.version';\n/**\n * Name of the code, either \"OK\" or \"ERROR\". **MUST** **NOT** be set if the status code is UNSET.\n */\nexports.ATTR_OTEL_STATUS_CODE = 'otel.status_code';\n/**\n * Enum value \"ERROR\" for attribute {@link ATTR_OTEL_STATUS_CODE}.\n */\nexports.OTEL_STATUS_CODE_VALUE_ERROR = \"ERROR\";\n/**\n * Enum value \"OK\" for attribute {@link ATTR_OTEL_STATUS_CODE}.\n */\nexports.OTEL_STATUS_CODE_VALUE_OK = \"OK\";\n/**\n * Description of the Status if it has a value, otherwise not set.\n *\n * @example resource not found\n */\nexports.ATTR_OTEL_STATUS_DESCRIPTION = 'otel.status_description';\n/**\n * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\n *\n * @example example.com\n *\n * @example 10.1.2.80\n *\n * @example /tmp/my.sock\n *\n * @note When observed from the client side, and when communicating through an intermediary, `server.address` **SHOULD** represent the server address behind any intermediaries, for example proxies, if it's available.\n */\nexports.ATTR_SERVER_ADDRESS = 'server.address';\n/**\n * Server port number.\n *\n * @example 80\n *\n * @example 8080\n *\n * @example 443\n *\n * @note When observed from the client side, and when communicating through an intermediary, `server.port` **SHOULD** represent the server port behind any intermediaries, for example proxies, if it's available.\n */\nexports.ATTR_SERVER_PORT = 'server.port';\n/**\n * Logical name of the service.\n *\n * @example shoppingcart\n *\n * @note MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs **MUST** fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value **MUST** be set to `unknown_service`.\n */\nexports.ATTR_SERVICE_NAME = 'service.name';\n/**\n * The version string of the service API or implementation. The format is not defined by these conventions.\n *\n * @example 2.0.0\n *\n * @example a01dbef8a\n */\nexports.ATTR_SERVICE_VERSION = 'service.version';\n/**\n * SignalR HTTP connection closure status.\n *\n * @example app_shutdown\n *\n * @example timeout\n */\nexports.ATTR_SIGNALR_CONNECTION_STATUS = 'signalr.connection.status';\n/**\n * Enum value \"app_shutdown\" for attribute {@link ATTR_SIGNALR_CONNECTION_STATUS}.\n */\nexports.SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN = \"app_shutdown\";\n/**\n * Enum value \"normal_closure\" for attribute {@link ATTR_SIGNALR_CONNECTION_STATUS}.\n */\nexports.SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE = \"normal_closure\";\n/**\n * Enum value \"timeout\" for attribute {@link ATTR_SIGNALR_CONNECTION_STATUS}.\n */\nexports.SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT = \"timeout\";\n/**\n * [SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md)\n *\n * @example web_sockets\n *\n * @example long_polling\n */\nexports.ATTR_SIGNALR_TRANSPORT = 'signalr.transport';\n/**\n * Enum value \"long_polling\" for attribute {@link ATTR_SIGNALR_TRANSPORT}.\n */\nexports.SIGNALR_TRANSPORT_VALUE_LONG_POLLING = \"long_polling\";\n/**\n * Enum value \"server_sent_events\" for attribute {@link ATTR_SIGNALR_TRANSPORT}.\n */\nexports.SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS = \"server_sent_events\";\n/**\n * Enum value \"web_sockets\" for attribute {@link ATTR_SIGNALR_TRANSPORT}.\n */\nexports.SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS = \"web_sockets\";\n/**\n * The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component\n *\n * @example SemConv\n */\nexports.ATTR_URL_FRAGMENT = 'url.fragment';\n/**\n * Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)\n *\n * @example https://www.foo.bar/search?q=OpenTelemetry#SemConv\n *\n * @example //localhost\n *\n * @note For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment is not transmitted over HTTP, but if it is known, it **SHOULD** be included nevertheless.\n * `url.full` **MUST** **NOT** contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case username and password **SHOULD** be redacted and attribute's value **SHOULD** be `https://REDACTED:REDACTED@www.example.com/`.\n * `url.full` **SHOULD** capture the absolute URL when it is available (or can be reconstructed). Sensitive content provided in `url.full` **SHOULD** be scrubbed when instrumentations can identify it.\n */\nexports.ATTR_URL_FULL = 'url.full';\n/**\n * The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component\n *\n * @example /search\n *\n * @note Sensitive content provided in `url.path` **SHOULD** be scrubbed when instrumentations can identify it.\n */\nexports.ATTR_URL_PATH = 'url.path';\n/**\n * The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component\n *\n * @example q=OpenTelemetry\n *\n * @note Sensitive content provided in `url.query` **SHOULD** be scrubbed when instrumentations can identify it.\n */\nexports.ATTR_URL_QUERY = 'url.query';\n/**\n * The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol.\n *\n * @example https\n *\n * @example ftp\n *\n * @example telnet\n */\nexports.ATTR_URL_SCHEME = 'url.scheme';\n/**\n * Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client.\n *\n * @example CERN-LineMode/2.15 libwww/2.17b3\n *\n * @example Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1\n *\n * @example YourApp/1.0.0 grpc-java-okhttp/1.27.2\n */\nexports.ATTR_USER_AGENT_ORIGINAL = 'user_agent.original';\n//# sourceMappingURL=stable_attributes.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.METRIC_SIGNALR_SERVER_CONNECTION_DURATION = exports.METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS = exports.METRIC_KESTREL_UPGRADED_CONNECTIONS = exports.METRIC_KESTREL_TLS_HANDSHAKE_DURATION = exports.METRIC_KESTREL_REJECTED_CONNECTIONS = exports.METRIC_KESTREL_QUEUED_REQUESTS = exports.METRIC_KESTREL_QUEUED_CONNECTIONS = exports.METRIC_KESTREL_CONNECTION_DURATION = exports.METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES = exports.METRIC_KESTREL_ACTIVE_CONNECTIONS = exports.METRIC_JVM_THREAD_COUNT = exports.METRIC_JVM_MEMORY_USED_AFTER_LAST_GC = exports.METRIC_JVM_MEMORY_USED = exports.METRIC_JVM_MEMORY_LIMIT = exports.METRIC_JVM_MEMORY_COMMITTED = exports.METRIC_JVM_GC_DURATION = exports.METRIC_JVM_CPU_TIME = exports.METRIC_JVM_CPU_RECENT_UTILIZATION = exports.METRIC_JVM_CPU_COUNT = exports.METRIC_JVM_CLASS_UNLOADED = exports.METRIC_JVM_CLASS_LOADED = exports.METRIC_JVM_CLASS_COUNT = exports.METRIC_HTTP_SERVER_REQUEST_DURATION = exports.METRIC_HTTP_CLIENT_REQUEST_DURATION = exports.METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS = exports.METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS = exports.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION = exports.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE = exports.METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS = exports.METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES = exports.METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS = void 0;\n//----------------------------------------------------------------------------------------------------------\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates/register/stable/metrics.ts.j2\n//----------------------------------------------------------------------------------------------------------\n/**\n * Number of exceptions caught by exception handling middleware.\n *\n * @note Meter name: `Microsoft.AspNetCore.Diagnostics`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS = 'aspnetcore.diagnostics.exceptions';\n/**\n * Number of requests that are currently active on the server that hold a rate limiting lease.\n *\n * @note Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES = 'aspnetcore.rate_limiting.active_request_leases';\n/**\n * Number of requests that are currently queued, waiting to acquire a rate limiting lease.\n *\n * @note Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS = 'aspnetcore.rate_limiting.queued_requests';\n/**\n * The time the request spent in a queue waiting to acquire a rate limiting lease.\n *\n * @note Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE = 'aspnetcore.rate_limiting.request.time_in_queue';\n/**\n * The duration of rate limiting lease held by requests on the server.\n *\n * @note Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION = 'aspnetcore.rate_limiting.request_lease.duration';\n/**\n * Number of requests that tried to acquire a rate limiting lease.\n *\n * @note Requests could be:\n *\n * * Rejected by global or endpoint rate limiting policies\n * * Canceled while waiting for the lease.\n *\n * Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS = 'aspnetcore.rate_limiting.requests';\n/**\n * Number of requests that were attempted to be matched to an endpoint.\n *\n * @note Meter name: `Microsoft.AspNetCore.Routing`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS = 'aspnetcore.routing.match_attempts';\n/**\n * Duration of HTTP client requests.\n */\nexports.METRIC_HTTP_CLIENT_REQUEST_DURATION = 'http.client.request.duration';\n/**\n * Duration of HTTP server requests.\n */\nexports.METRIC_HTTP_SERVER_REQUEST_DURATION = 'http.server.request.duration';\n/**\n * Number of classes currently loaded.\n */\nexports.METRIC_JVM_CLASS_COUNT = 'jvm.class.count';\n/**\n * Number of classes loaded since JVM start.\n */\nexports.METRIC_JVM_CLASS_LOADED = 'jvm.class.loaded';\n/**\n * Number of classes unloaded since JVM start.\n */\nexports.METRIC_JVM_CLASS_UNLOADED = 'jvm.class.unloaded';\n/**\n * Number of processors available to the Java virtual machine.\n */\nexports.METRIC_JVM_CPU_COUNT = 'jvm.cpu.count';\n/**\n * Recent CPU utilization for the process as reported by the JVM.\n *\n * @note The value range is [0.0,1.0]. This utilization is not defined as being for the specific interval since last measurement (unlike `system.cpu.utilization`). [Reference](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getProcessCpuLoad()).\n */\nexports.METRIC_JVM_CPU_RECENT_UTILIZATION = 'jvm.cpu.recent_utilization';\n/**\n * CPU time used by the process as reported by the JVM.\n */\nexports.METRIC_JVM_CPU_TIME = 'jvm.cpu.time';\n/**\n * Duration of JVM garbage collection actions.\n */\nexports.METRIC_JVM_GC_DURATION = 'jvm.gc.duration';\n/**\n * Measure of memory committed.\n */\nexports.METRIC_JVM_MEMORY_COMMITTED = 'jvm.memory.committed';\n/**\n * Measure of max obtainable memory.\n */\nexports.METRIC_JVM_MEMORY_LIMIT = 'jvm.memory.limit';\n/**\n * Measure of memory used.\n */\nexports.METRIC_JVM_MEMORY_USED = 'jvm.memory.used';\n/**\n * Measure of memory used, as measured after the most recent garbage collection event on this pool.\n */\nexports.METRIC_JVM_MEMORY_USED_AFTER_LAST_GC = 'jvm.memory.used_after_last_gc';\n/**\n * Number of executing platform threads.\n */\nexports.METRIC_JVM_THREAD_COUNT = 'jvm.thread.count';\n/**\n * Number of connections that are currently active on the server.\n *\n * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_KESTREL_ACTIVE_CONNECTIONS = 'kestrel.active_connections';\n/**\n * Number of TLS handshakes that are currently in progress on the server.\n *\n * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES = 'kestrel.active_tls_handshakes';\n/**\n * The duration of connections on the server.\n *\n * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_KESTREL_CONNECTION_DURATION = 'kestrel.connection.duration';\n/**\n * Number of connections that are currently queued and are waiting to start.\n *\n * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_KESTREL_QUEUED_CONNECTIONS = 'kestrel.queued_connections';\n/**\n * Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start.\n *\n * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_KESTREL_QUEUED_REQUESTS = 'kestrel.queued_requests';\n/**\n * Number of connections rejected by the server.\n *\n * @note Connections are rejected when the currently active count exceeds the value configured with `MaxConcurrentConnections`.\n * Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_KESTREL_REJECTED_CONNECTIONS = 'kestrel.rejected_connections';\n/**\n * The duration of TLS handshakes on the server.\n *\n * @note Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_KESTREL_TLS_HANDSHAKE_DURATION = 'kestrel.tls_handshake.duration';\n/**\n * Number of connections that are currently upgraded (WebSockets). .\n *\n * @note The counter only tracks HTTP/1.1 connections.\n *\n * Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_KESTREL_UPGRADED_CONNECTIONS = 'kestrel.upgraded_connections';\n/**\n * Number of connections that are currently active on the server.\n *\n * @note Meter name: `Microsoft.AspNetCore.Http.Connections`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS = 'signalr.server.active_connections';\n/**\n * The duration of connections on the server.\n *\n * @note Meter name: `Microsoft.AspNetCore.Http.Connections`; Added in: ASP.NET Core 8.0\n */\nexports.METRIC_SIGNALR_SERVER_CONNECTION_DURATION = 'signalr.server.connection.duration';\n//# sourceMappingURL=stable_metrics.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SEMATTRS_NET_HOST_CARRIER_ICC = exports.SEMATTRS_NET_HOST_CARRIER_MNC = exports.SEMATTRS_NET_HOST_CARRIER_MCC = exports.SEMATTRS_NET_HOST_CARRIER_NAME = exports.SEMATTRS_NET_HOST_CONNECTION_SUBTYPE = exports.SEMATTRS_NET_HOST_CONNECTION_TYPE = exports.SEMATTRS_NET_HOST_NAME = exports.SEMATTRS_NET_HOST_PORT = exports.SEMATTRS_NET_HOST_IP = exports.SEMATTRS_NET_PEER_NAME = exports.SEMATTRS_NET_PEER_PORT = exports.SEMATTRS_NET_PEER_IP = exports.SEMATTRS_NET_TRANSPORT = exports.SEMATTRS_FAAS_INVOKED_REGION = exports.SEMATTRS_FAAS_INVOKED_PROVIDER = exports.SEMATTRS_FAAS_INVOKED_NAME = exports.SEMATTRS_FAAS_COLDSTART = exports.SEMATTRS_FAAS_CRON = exports.SEMATTRS_FAAS_TIME = exports.SEMATTRS_FAAS_DOCUMENT_NAME = exports.SEMATTRS_FAAS_DOCUMENT_TIME = exports.SEMATTRS_FAAS_DOCUMENT_OPERATION = exports.SEMATTRS_FAAS_DOCUMENT_COLLECTION = exports.SEMATTRS_FAAS_EXECUTION = exports.SEMATTRS_FAAS_TRIGGER = exports.SEMATTRS_EXCEPTION_ESCAPED = exports.SEMATTRS_EXCEPTION_STACKTRACE = exports.SEMATTRS_EXCEPTION_MESSAGE = exports.SEMATTRS_EXCEPTION_TYPE = exports.SEMATTRS_DB_SQL_TABLE = exports.SEMATTRS_DB_MONGODB_COLLECTION = exports.SEMATTRS_DB_REDIS_DATABASE_INDEX = exports.SEMATTRS_DB_HBASE_NAMESPACE = exports.SEMATTRS_DB_CASSANDRA_COORDINATOR_DC = exports.SEMATTRS_DB_CASSANDRA_COORDINATOR_ID = exports.SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = exports.SEMATTRS_DB_CASSANDRA_IDEMPOTENCE = exports.SEMATTRS_DB_CASSANDRA_TABLE = exports.SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL = exports.SEMATTRS_DB_CASSANDRA_PAGE_SIZE = exports.SEMATTRS_DB_CASSANDRA_KEYSPACE = exports.SEMATTRS_DB_MSSQL_INSTANCE_NAME = exports.SEMATTRS_DB_OPERATION = exports.SEMATTRS_DB_STATEMENT = exports.SEMATTRS_DB_NAME = exports.SEMATTRS_DB_JDBC_DRIVER_CLASSNAME = exports.SEMATTRS_DB_USER = exports.SEMATTRS_DB_CONNECTION_STRING = exports.SEMATTRS_DB_SYSTEM = exports.SEMATTRS_AWS_LAMBDA_INVOKED_ARN = void 0;\nexports.SEMATTRS_MESSAGING_DESTINATION_KIND = exports.SEMATTRS_MESSAGING_DESTINATION = exports.SEMATTRS_MESSAGING_SYSTEM = exports.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = exports.SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = exports.SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT = exports.SEMATTRS_AWS_DYNAMODB_COUNT = exports.SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS = exports.SEMATTRS_AWS_DYNAMODB_SEGMENT = exports.SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD = exports.SEMATTRS_AWS_DYNAMODB_TABLE_COUNT = exports.SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = exports.SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = exports.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = exports.SEMATTRS_AWS_DYNAMODB_SELECT = exports.SEMATTRS_AWS_DYNAMODB_INDEX_NAME = exports.SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET = exports.SEMATTRS_AWS_DYNAMODB_LIMIT = exports.SEMATTRS_AWS_DYNAMODB_PROJECTION = exports.SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ = exports.SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = exports.SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = exports.SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = exports.SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY = exports.SEMATTRS_AWS_DYNAMODB_TABLE_NAMES = exports.SEMATTRS_HTTP_CLIENT_IP = exports.SEMATTRS_HTTP_ROUTE = exports.SEMATTRS_HTTP_SERVER_NAME = exports.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = exports.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH = exports.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = exports.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH = exports.SEMATTRS_HTTP_USER_AGENT = exports.SEMATTRS_HTTP_FLAVOR = exports.SEMATTRS_HTTP_STATUS_CODE = exports.SEMATTRS_HTTP_SCHEME = exports.SEMATTRS_HTTP_HOST = exports.SEMATTRS_HTTP_TARGET = exports.SEMATTRS_HTTP_URL = exports.SEMATTRS_HTTP_METHOD = exports.SEMATTRS_CODE_LINENO = exports.SEMATTRS_CODE_FILEPATH = exports.SEMATTRS_CODE_NAMESPACE = exports.SEMATTRS_CODE_FUNCTION = exports.SEMATTRS_THREAD_NAME = exports.SEMATTRS_THREAD_ID = exports.SEMATTRS_ENDUSER_SCOPE = exports.SEMATTRS_ENDUSER_ROLE = exports.SEMATTRS_ENDUSER_ID = exports.SEMATTRS_PEER_SERVICE = void 0;\nexports.DBSYSTEMVALUES_FILEMAKER = exports.DBSYSTEMVALUES_DERBY = exports.DBSYSTEMVALUES_FIREBIRD = exports.DBSYSTEMVALUES_ADABAS = exports.DBSYSTEMVALUES_CACHE = exports.DBSYSTEMVALUES_EDB = exports.DBSYSTEMVALUES_FIRSTSQL = exports.DBSYSTEMVALUES_INGRES = exports.DBSYSTEMVALUES_HANADB = exports.DBSYSTEMVALUES_MAXDB = exports.DBSYSTEMVALUES_PROGRESS = exports.DBSYSTEMVALUES_HSQLDB = exports.DBSYSTEMVALUES_CLOUDSCAPE = exports.DBSYSTEMVALUES_HIVE = exports.DBSYSTEMVALUES_REDSHIFT = exports.DBSYSTEMVALUES_POSTGRESQL = exports.DBSYSTEMVALUES_DB2 = exports.DBSYSTEMVALUES_ORACLE = exports.DBSYSTEMVALUES_MYSQL = exports.DBSYSTEMVALUES_MSSQL = exports.DBSYSTEMVALUES_OTHER_SQL = exports.SemanticAttributes = exports.SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE = exports.SEMATTRS_MESSAGE_COMPRESSED_SIZE = exports.SEMATTRS_MESSAGE_ID = exports.SEMATTRS_MESSAGE_TYPE = exports.SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE = exports.SEMATTRS_RPC_JSONRPC_ERROR_CODE = exports.SEMATTRS_RPC_JSONRPC_REQUEST_ID = exports.SEMATTRS_RPC_JSONRPC_VERSION = exports.SEMATTRS_RPC_GRPC_STATUS_CODE = exports.SEMATTRS_RPC_METHOD = exports.SEMATTRS_RPC_SERVICE = exports.SEMATTRS_RPC_SYSTEM = exports.SEMATTRS_MESSAGING_KAFKA_TOMBSTONE = exports.SEMATTRS_MESSAGING_KAFKA_PARTITION = exports.SEMATTRS_MESSAGING_KAFKA_CLIENT_ID = exports.SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP = exports.SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY = exports.SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY = exports.SEMATTRS_MESSAGING_CONSUMER_ID = exports.SEMATTRS_MESSAGING_OPERATION = exports.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = exports.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = exports.SEMATTRS_MESSAGING_CONVERSATION_ID = exports.SEMATTRS_MESSAGING_MESSAGE_ID = exports.SEMATTRS_MESSAGING_URL = exports.SEMATTRS_MESSAGING_PROTOCOL_VERSION = exports.SEMATTRS_MESSAGING_PROTOCOL = exports.SEMATTRS_MESSAGING_TEMP_DESTINATION = void 0;\nexports.FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = exports.FaasDocumentOperationValues = exports.FAASDOCUMENTOPERATIONVALUES_DELETE = exports.FAASDOCUMENTOPERATIONVALUES_EDIT = exports.FAASDOCUMENTOPERATIONVALUES_INSERT = exports.FaasTriggerValues = exports.FAASTRIGGERVALUES_OTHER = exports.FAASTRIGGERVALUES_TIMER = exports.FAASTRIGGERVALUES_PUBSUB = exports.FAASTRIGGERVALUES_HTTP = exports.FAASTRIGGERVALUES_DATASOURCE = exports.DbCassandraConsistencyLevelValues = exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = exports.DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = exports.DBCASSANDRACONSISTENCYLEVELVALUES_ANY = exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = exports.DBCASSANDRACONSISTENCYLEVELVALUES_THREE = exports.DBCASSANDRACONSISTENCYLEVELVALUES_TWO = exports.DBCASSANDRACONSISTENCYLEVELVALUES_ONE = exports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = exports.DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = exports.DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = exports.DBCASSANDRACONSISTENCYLEVELVALUES_ALL = exports.DbSystemValues = exports.DBSYSTEMVALUES_COCKROACHDB = exports.DBSYSTEMVALUES_MEMCACHED = exports.DBSYSTEMVALUES_ELASTICSEARCH = exports.DBSYSTEMVALUES_GEODE = exports.DBSYSTEMVALUES_NEO4J = exports.DBSYSTEMVALUES_DYNAMODB = exports.DBSYSTEMVALUES_COSMOSDB = exports.DBSYSTEMVALUES_COUCHDB = exports.DBSYSTEMVALUES_COUCHBASE = exports.DBSYSTEMVALUES_REDIS = exports.DBSYSTEMVALUES_MONGODB = exports.DBSYSTEMVALUES_HBASE = exports.DBSYSTEMVALUES_CASSANDRA = exports.DBSYSTEMVALUES_COLDFUSION = exports.DBSYSTEMVALUES_H2 = exports.DBSYSTEMVALUES_VERTICA = exports.DBSYSTEMVALUES_TERADATA = exports.DBSYSTEMVALUES_SYBASE = exports.DBSYSTEMVALUES_SQLITE = exports.DBSYSTEMVALUES_POINTBASE = exports.DBSYSTEMVALUES_PERVASIVE = exports.DBSYSTEMVALUES_NETEZZA = exports.DBSYSTEMVALUES_MARIADB = exports.DBSYSTEMVALUES_INTERBASE = exports.DBSYSTEMVALUES_INSTANTDB = exports.DBSYSTEMVALUES_INFORMIX = void 0;\nexports.MESSAGINGOPERATIONVALUES_RECEIVE = exports.MessagingDestinationKindValues = exports.MESSAGINGDESTINATIONKINDVALUES_TOPIC = exports.MESSAGINGDESTINATIONKINDVALUES_QUEUE = exports.HttpFlavorValues = exports.HTTPFLAVORVALUES_QUIC = exports.HTTPFLAVORVALUES_SPDY = exports.HTTPFLAVORVALUES_HTTP_2_0 = exports.HTTPFLAVORVALUES_HTTP_1_1 = exports.HTTPFLAVORVALUES_HTTP_1_0 = exports.NetHostConnectionSubtypeValues = exports.NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_NR = exports.NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = exports.NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_GSM = exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = exports.NETHOSTCONNECTIONSUBTYPEVALUES_LTE = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = exports.NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = exports.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = exports.NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = exports.NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = exports.NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = exports.NetHostConnectionTypeValues = exports.NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = exports.NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = exports.NETHOSTCONNECTIONTYPEVALUES_CELL = exports.NETHOSTCONNECTIONTYPEVALUES_WIRED = exports.NETHOSTCONNECTIONTYPEVALUES_WIFI = exports.NetTransportValues = exports.NETTRANSPORTVALUES_OTHER = exports.NETTRANSPORTVALUES_INPROC = exports.NETTRANSPORTVALUES_PIPE = exports.NETTRANSPORTVALUES_UNIX = exports.NETTRANSPORTVALUES_IP = exports.NETTRANSPORTVALUES_IP_UDP = exports.NETTRANSPORTVALUES_IP_TCP = exports.FaasInvokedProviderValues = exports.FAASINVOKEDPROVIDERVALUES_GCP = exports.FAASINVOKEDPROVIDERVALUES_AZURE = exports.FAASINVOKEDPROVIDERVALUES_AWS = void 0;\nexports.MessageTypeValues = exports.MESSAGETYPEVALUES_RECEIVED = exports.MESSAGETYPEVALUES_SENT = exports.RpcGrpcStatusCodeValues = exports.RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = exports.RPCGRPCSTATUSCODEVALUES_DATA_LOSS = exports.RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = exports.RPCGRPCSTATUSCODEVALUES_INTERNAL = exports.RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = exports.RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = exports.RPCGRPCSTATUSCODEVALUES_ABORTED = exports.RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = exports.RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = exports.RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = exports.RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = exports.RPCGRPCSTATUSCODEVALUES_NOT_FOUND = exports.RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = exports.RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = exports.RPCGRPCSTATUSCODEVALUES_UNKNOWN = exports.RPCGRPCSTATUSCODEVALUES_CANCELLED = exports.RPCGRPCSTATUSCODEVALUES_OK = exports.MessagingOperationValues = exports.MESSAGINGOPERATIONVALUES_PROCESS = void 0;\nconst utils_1 = require(\"../internal/utils\");\n//----------------------------------------------------------------------------------------------------------\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\n//----------------------------------------------------------------------------------------------------------\n//----------------------------------------------------------------------------------------------------------\n// Constant values for SemanticAttributes\n//----------------------------------------------------------------------------------------------------------\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_AWS_LAMBDA_INVOKED_ARN = 'aws.lambda.invoked_arn';\nconst TMP_DB_SYSTEM = 'db.system';\nconst TMP_DB_CONNECTION_STRING = 'db.connection_string';\nconst TMP_DB_USER = 'db.user';\nconst TMP_DB_JDBC_DRIVER_CLASSNAME = 'db.jdbc.driver_classname';\nconst TMP_DB_NAME = 'db.name';\nconst TMP_DB_STATEMENT = 'db.statement';\nconst TMP_DB_OPERATION = 'db.operation';\nconst TMP_DB_MSSQL_INSTANCE_NAME = 'db.mssql.instance_name';\nconst TMP_DB_CASSANDRA_KEYSPACE = 'db.cassandra.keyspace';\nconst TMP_DB_CASSANDRA_PAGE_SIZE = 'db.cassandra.page_size';\nconst TMP_DB_CASSANDRA_CONSISTENCY_LEVEL = 'db.cassandra.consistency_level';\nconst TMP_DB_CASSANDRA_TABLE = 'db.cassandra.table';\nconst TMP_DB_CASSANDRA_IDEMPOTENCE = 'db.cassandra.idempotence';\nconst TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = 'db.cassandra.speculative_execution_count';\nconst TMP_DB_CASSANDRA_COORDINATOR_ID = 'db.cassandra.coordinator.id';\nconst TMP_DB_CASSANDRA_COORDINATOR_DC = 'db.cassandra.coordinator.dc';\nconst TMP_DB_HBASE_NAMESPACE = 'db.hbase.namespace';\nconst TMP_DB_REDIS_DATABASE_INDEX = 'db.redis.database_index';\nconst TMP_DB_MONGODB_COLLECTION = 'db.mongodb.collection';\nconst TMP_DB_SQL_TABLE = 'db.sql.table';\nconst TMP_EXCEPTION_TYPE = 'exception.type';\nconst TMP_EXCEPTION_MESSAGE = 'exception.message';\nconst TMP_EXCEPTION_STACKTRACE = 'exception.stacktrace';\nconst TMP_EXCEPTION_ESCAPED = 'exception.escaped';\nconst TMP_FAAS_TRIGGER = 'faas.trigger';\nconst TMP_FAAS_EXECUTION = 'faas.execution';\nconst TMP_FAAS_DOCUMENT_COLLECTION = 'faas.document.collection';\nconst TMP_FAAS_DOCUMENT_OPERATION = 'faas.document.operation';\nconst TMP_FAAS_DOCUMENT_TIME = 'faas.document.time';\nconst TMP_FAAS_DOCUMENT_NAME = 'faas.document.name';\nconst TMP_FAAS_TIME = 'faas.time';\nconst TMP_FAAS_CRON = 'faas.cron';\nconst TMP_FAAS_COLDSTART = 'faas.coldstart';\nconst TMP_FAAS_INVOKED_NAME = 'faas.invoked_name';\nconst TMP_FAAS_INVOKED_PROVIDER = 'faas.invoked_provider';\nconst TMP_FAAS_INVOKED_REGION = 'faas.invoked_region';\nconst TMP_NET_TRANSPORT = 'net.transport';\nconst TMP_NET_PEER_IP = 'net.peer.ip';\nconst TMP_NET_PEER_PORT = 'net.peer.port';\nconst TMP_NET_PEER_NAME = 'net.peer.name';\nconst TMP_NET_HOST_IP = 'net.host.ip';\nconst TMP_NET_HOST_PORT = 'net.host.port';\nconst TMP_NET_HOST_NAME = 'net.host.name';\nconst TMP_NET_HOST_CONNECTION_TYPE = 'net.host.connection.type';\nconst TMP_NET_HOST_CONNECTION_SUBTYPE = 'net.host.connection.subtype';\nconst TMP_NET_HOST_CARRIER_NAME = 'net.host.carrier.name';\nconst TMP_NET_HOST_CARRIER_MCC = 'net.host.carrier.mcc';\nconst TMP_NET_HOST_CARRIER_MNC = 'net.host.carrier.mnc';\nconst TMP_NET_HOST_CARRIER_ICC = 'net.host.carrier.icc';\nconst TMP_PEER_SERVICE = 'peer.service';\nconst TMP_ENDUSER_ID = 'enduser.id';\nconst TMP_ENDUSER_ROLE = 'enduser.role';\nconst TMP_ENDUSER_SCOPE = 'enduser.scope';\nconst TMP_THREAD_ID = 'thread.id';\nconst TMP_THREAD_NAME = 'thread.name';\nconst TMP_CODE_FUNCTION = 'code.function';\nconst TMP_CODE_NAMESPACE = 'code.namespace';\nconst TMP_CODE_FILEPATH = 'code.filepath';\nconst TMP_CODE_LINENO = 'code.lineno';\nconst TMP_HTTP_METHOD = 'http.method';\nconst TMP_HTTP_URL = 'http.url';\nconst TMP_HTTP_TARGET = 'http.target';\nconst TMP_HTTP_HOST = 'http.host';\nconst TMP_HTTP_SCHEME = 'http.scheme';\nconst TMP_HTTP_STATUS_CODE = 'http.status_code';\nconst TMP_HTTP_FLAVOR = 'http.flavor';\nconst TMP_HTTP_USER_AGENT = 'http.user_agent';\nconst TMP_HTTP_REQUEST_CONTENT_LENGTH = 'http.request_content_length';\nconst TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = 'http.request_content_length_uncompressed';\nconst TMP_HTTP_RESPONSE_CONTENT_LENGTH = 'http.response_content_length';\nconst TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = 'http.response_content_length_uncompressed';\nconst TMP_HTTP_SERVER_NAME = 'http.server_name';\nconst TMP_HTTP_ROUTE = 'http.route';\nconst TMP_HTTP_CLIENT_IP = 'http.client_ip';\nconst TMP_AWS_DYNAMODB_TABLE_NAMES = 'aws.dynamodb.table_names';\nconst TMP_AWS_DYNAMODB_CONSUMED_CAPACITY = 'aws.dynamodb.consumed_capacity';\nconst TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = 'aws.dynamodb.item_collection_metrics';\nconst TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = 'aws.dynamodb.provisioned_read_capacity';\nconst TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = 'aws.dynamodb.provisioned_write_capacity';\nconst TMP_AWS_DYNAMODB_CONSISTENT_READ = 'aws.dynamodb.consistent_read';\nconst TMP_AWS_DYNAMODB_PROJECTION = 'aws.dynamodb.projection';\nconst TMP_AWS_DYNAMODB_LIMIT = 'aws.dynamodb.limit';\nconst TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET = 'aws.dynamodb.attributes_to_get';\nconst TMP_AWS_DYNAMODB_INDEX_NAME = 'aws.dynamodb.index_name';\nconst TMP_AWS_DYNAMODB_SELECT = 'aws.dynamodb.select';\nconst TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = 'aws.dynamodb.global_secondary_indexes';\nconst TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = 'aws.dynamodb.local_secondary_indexes';\nconst TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = 'aws.dynamodb.exclusive_start_table';\nconst TMP_AWS_DYNAMODB_TABLE_COUNT = 'aws.dynamodb.table_count';\nconst TMP_AWS_DYNAMODB_SCAN_FORWARD = 'aws.dynamodb.scan_forward';\nconst TMP_AWS_DYNAMODB_SEGMENT = 'aws.dynamodb.segment';\nconst TMP_AWS_DYNAMODB_TOTAL_SEGMENTS = 'aws.dynamodb.total_segments';\nconst TMP_AWS_DYNAMODB_COUNT = 'aws.dynamodb.count';\nconst TMP_AWS_DYNAMODB_SCANNED_COUNT = 'aws.dynamodb.scanned_count';\nconst TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = 'aws.dynamodb.attribute_definitions';\nconst TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = 'aws.dynamodb.global_secondary_index_updates';\nconst TMP_MESSAGING_SYSTEM = 'messaging.system';\nconst TMP_MESSAGING_DESTINATION = 'messaging.destination';\nconst TMP_MESSAGING_DESTINATION_KIND = 'messaging.destination_kind';\nconst TMP_MESSAGING_TEMP_DESTINATION = 'messaging.temp_destination';\nconst TMP_MESSAGING_PROTOCOL = 'messaging.protocol';\nconst TMP_MESSAGING_PROTOCOL_VERSION = 'messaging.protocol_version';\nconst TMP_MESSAGING_URL = 'messaging.url';\nconst TMP_MESSAGING_MESSAGE_ID = 'messaging.message_id';\nconst TMP_MESSAGING_CONVERSATION_ID = 'messaging.conversation_id';\nconst TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = 'messaging.message_payload_size_bytes';\nconst TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = 'messaging.message_payload_compressed_size_bytes';\nconst TMP_MESSAGING_OPERATION = 'messaging.operation';\nconst TMP_MESSAGING_CONSUMER_ID = 'messaging.consumer_id';\nconst TMP_MESSAGING_RABBITMQ_ROUTING_KEY = 'messaging.rabbitmq.routing_key';\nconst TMP_MESSAGING_KAFKA_MESSAGE_KEY = 'messaging.kafka.message_key';\nconst TMP_MESSAGING_KAFKA_CONSUMER_GROUP = 'messaging.kafka.consumer_group';\nconst TMP_MESSAGING_KAFKA_CLIENT_ID = 'messaging.kafka.client_id';\nconst TMP_MESSAGING_KAFKA_PARTITION = 'messaging.kafka.partition';\nconst TMP_MESSAGING_KAFKA_TOMBSTONE = 'messaging.kafka.tombstone';\nconst TMP_RPC_SYSTEM = 'rpc.system';\nconst TMP_RPC_SERVICE = 'rpc.service';\nconst TMP_RPC_METHOD = 'rpc.method';\nconst TMP_RPC_GRPC_STATUS_CODE = 'rpc.grpc.status_code';\nconst TMP_RPC_JSONRPC_VERSION = 'rpc.jsonrpc.version';\nconst TMP_RPC_JSONRPC_REQUEST_ID = 'rpc.jsonrpc.request_id';\nconst TMP_RPC_JSONRPC_ERROR_CODE = 'rpc.jsonrpc.error_code';\nconst TMP_RPC_JSONRPC_ERROR_MESSAGE = 'rpc.jsonrpc.error_message';\nconst TMP_MESSAGE_TYPE = 'message.type';\nconst TMP_MESSAGE_ID = 'message.id';\nconst TMP_MESSAGE_COMPRESSED_SIZE = 'message.compressed_size';\nconst TMP_MESSAGE_UNCOMPRESSED_SIZE = 'message.uncompressed_size';\n/**\n * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable).\n *\n * Note: This may be different from `faas.id` if an alias is involved.\n *\n * @deprecated use ATTR_AWS_LAMBDA_INVOKED_ARN\n */\nexports.SEMATTRS_AWS_LAMBDA_INVOKED_ARN = TMP_AWS_LAMBDA_INVOKED_ARN;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated use ATTR_DB_SYSTEM\n */\nexports.SEMATTRS_DB_SYSTEM = TMP_DB_SYSTEM;\n/**\n * The connection string used to connect to the database. It is recommended to remove embedded credentials.\n *\n * @deprecated use ATTR_DB_CONNECTION_STRING\n */\nexports.SEMATTRS_DB_CONNECTION_STRING = TMP_DB_CONNECTION_STRING;\n/**\n * Username for accessing the database.\n *\n * @deprecated use ATTR_DB_USER\n */\nexports.SEMATTRS_DB_USER = TMP_DB_USER;\n/**\n * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect.\n *\n * @deprecated use ATTR_DB_JDBC_DRIVER_CLASSNAME\n */\nexports.SEMATTRS_DB_JDBC_DRIVER_CLASSNAME = TMP_DB_JDBC_DRIVER_CLASSNAME;\n/**\n * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).\n *\n * Note: In some SQL databases, the database name to be used is called "schema name".\n *\n * @deprecated use ATTR_DB_NAME\n */\nexports.SEMATTRS_DB_NAME = TMP_DB_NAME;\n/**\n * The database statement being executed.\n *\n * Note: The value may be sanitized to exclude sensitive information.\n *\n * @deprecated use ATTR_DB_STATEMENT\n */\nexports.SEMATTRS_DB_STATEMENT = TMP_DB_STATEMENT;\n/**\n * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword.\n *\n * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted.\n *\n * @deprecated use ATTR_DB_OPERATION\n */\nexports.SEMATTRS_DB_OPERATION = TMP_DB_OPERATION;\n/**\n * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance.\n *\n * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard).\n *\n * @deprecated use ATTR_DB_MSSQL_INSTANCE_NAME\n */\nexports.SEMATTRS_DB_MSSQL_INSTANCE_NAME = TMP_DB_MSSQL_INSTANCE_NAME;\n/**\n * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute.\n *\n * @deprecated use ATTR_DB_CASSANDRA_KEYSPACE\n */\nexports.SEMATTRS_DB_CASSANDRA_KEYSPACE = TMP_DB_CASSANDRA_KEYSPACE;\n/**\n * The fetch size used for paging, i.e. how many rows will be returned at once.\n *\n * @deprecated use ATTR_DB_CASSANDRA_PAGE_SIZE\n */\nexports.SEMATTRS_DB_CASSANDRA_PAGE_SIZE = TMP_DB_CASSANDRA_PAGE_SIZE;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated use ATTR_DB_CASSANDRA_CONSISTENCY_LEVEL\n */\nexports.SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL = TMP_DB_CASSANDRA_CONSISTENCY_LEVEL;\n/**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n *\n * @deprecated use ATTR_DB_CASSANDRA_TABLE\n */\nexports.SEMATTRS_DB_CASSANDRA_TABLE = TMP_DB_CASSANDRA_TABLE;\n/**\n * Whether or not the query is idempotent.\n *\n * @deprecated use ATTR_DB_CASSANDRA_IDEMPOTENCE\n */\nexports.SEMATTRS_DB_CASSANDRA_IDEMPOTENCE = TMP_DB_CASSANDRA_IDEMPOTENCE;\n/**\n * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.\n *\n * @deprecated use ATTR_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT\n */\nexports.SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT;\n/**\n * The ID of the coordinating node for a query.\n *\n * @deprecated use ATTR_DB_CASSANDRA_COORDINATOR_ID\n */\nexports.SEMATTRS_DB_CASSANDRA_COORDINATOR_ID = TMP_DB_CASSANDRA_COORDINATOR_ID;\n/**\n * The data center of the coordinating node for a query.\n *\n * @deprecated use ATTR_DB_CASSANDRA_COORDINATOR_DC\n */\nexports.SEMATTRS_DB_CASSANDRA_COORDINATOR_DC = TMP_DB_CASSANDRA_COORDINATOR_DC;\n/**\n * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute.\n *\n * @deprecated use ATTR_DB_HBASE_NAMESPACE\n */\nexports.SEMATTRS_DB_HBASE_NAMESPACE = TMP_DB_HBASE_NAMESPACE;\n/**\n * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute.\n *\n * @deprecated use ATTR_DB_REDIS_DATABASE_INDEX\n */\nexports.SEMATTRS_DB_REDIS_DATABASE_INDEX = TMP_DB_REDIS_DATABASE_INDEX;\n/**\n * The collection being accessed within the database stated in `db.name`.\n *\n * @deprecated use ATTR_DB_MONGODB_COLLECTION\n */\nexports.SEMATTRS_DB_MONGODB_COLLECTION = TMP_DB_MONGODB_COLLECTION;\n/**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n *\n * @deprecated use ATTR_DB_SQL_TABLE\n */\nexports.SEMATTRS_DB_SQL_TABLE = TMP_DB_SQL_TABLE;\n/**\n * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.\n *\n * @deprecated use ATTR_EXCEPTION_TYPE\n */\nexports.SEMATTRS_EXCEPTION_TYPE = TMP_EXCEPTION_TYPE;\n/**\n * The exception message.\n *\n * @deprecated use ATTR_EXCEPTION_MESSAGE\n */\nexports.SEMATTRS_EXCEPTION_MESSAGE = TMP_EXCEPTION_MESSAGE;\n/**\n * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.\n *\n * @deprecated use ATTR_EXCEPTION_STACKTRACE\n */\nexports.SEMATTRS_EXCEPTION_STACKTRACE = TMP_EXCEPTION_STACKTRACE;\n/**\n* SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.\n*\n* Note: An exception is considered to have escaped (or left) the scope of a span,\nif that span is ended while the exception is still logically "in flight".\nThis may be actually "in flight" in some languages (e.g. if the exception\nis passed to a Context manager's `__exit__` method in Python) but will\nusually be caught at the point of recording the exception in most languages.\n\nIt is usually not possible to determine at the point where an exception is thrown\nwhether it will escape the scope of a span.\nHowever, it is trivial to know that an exception\nwill escape, if one checks for an active exception just before ending the span,\nas done in the [example above](#exception-end-example).\n\nIt follows that an exception may still escape the scope of the span\neven if the `exception.escaped` attribute was not set or set to false,\nsince the event might have been recorded at a time where it was not\nclear whether the exception will escape.\n*\n* @deprecated use ATTR_EXCEPTION_ESCAPED\n*/\nexports.SEMATTRS_EXCEPTION_ESCAPED = TMP_EXCEPTION_ESCAPED;\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated use ATTR_FAAS_TRIGGER\n */\nexports.SEMATTRS_FAAS_TRIGGER = TMP_FAAS_TRIGGER;\n/**\n * The execution ID of the current function execution.\n *\n * @deprecated use ATTR_FAAS_EXECUTION\n */\nexports.SEMATTRS_FAAS_EXECUTION = TMP_FAAS_EXECUTION;\n/**\n * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name.\n *\n * @deprecated use ATTR_FAAS_DOCUMENT_COLLECTION\n */\nexports.SEMATTRS_FAAS_DOCUMENT_COLLECTION = TMP_FAAS_DOCUMENT_COLLECTION;\n/**\n * Describes the type of the operation that was performed on the data.\n *\n * @deprecated use ATTR_FAAS_DOCUMENT_OPERATION\n */\nexports.SEMATTRS_FAAS_DOCUMENT_OPERATION = TMP_FAAS_DOCUMENT_OPERATION;\n/**\n * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n *\n * @deprecated use ATTR_FAAS_DOCUMENT_TIME\n */\nexports.SEMATTRS_FAAS_DOCUMENT_TIME = TMP_FAAS_DOCUMENT_TIME;\n/**\n * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name.\n *\n * @deprecated use ATTR_FAAS_DOCUMENT_NAME\n */\nexports.SEMATTRS_FAAS_DOCUMENT_NAME = TMP_FAAS_DOCUMENT_NAME;\n/**\n * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n *\n * @deprecated use ATTR_FAAS_TIME\n */\nexports.SEMATTRS_FAAS_TIME = TMP_FAAS_TIME;\n/**\n * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).\n *\n * @deprecated use ATTR_FAAS_CRON\n */\nexports.SEMATTRS_FAAS_CRON = TMP_FAAS_CRON;\n/**\n * A boolean that is true if the serverless function is executed for the first time (aka cold-start).\n *\n * @deprecated use ATTR_FAAS_COLDSTART\n */\nexports.SEMATTRS_FAAS_COLDSTART = TMP_FAAS_COLDSTART;\n/**\n * The name of the invoked function.\n *\n * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function.\n *\n * @deprecated use ATTR_FAAS_INVOKED_NAME\n */\nexports.SEMATTRS_FAAS_INVOKED_NAME = TMP_FAAS_INVOKED_NAME;\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n *\n * @deprecated use ATTR_FAAS_INVOKED_PROVIDER\n */\nexports.SEMATTRS_FAAS_INVOKED_PROVIDER = TMP_FAAS_INVOKED_PROVIDER;\n/**\n * The cloud region of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function.\n *\n * @deprecated use ATTR_FAAS_INVOKED_REGION\n */\nexports.SEMATTRS_FAAS_INVOKED_REGION = TMP_FAAS_INVOKED_REGION;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated use ATTR_NET_TRANSPORT\n */\nexports.SEMATTRS_NET_TRANSPORT = TMP_NET_TRANSPORT;\n/**\n * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6).\n *\n * @deprecated use ATTR_NET_PEER_IP\n */\nexports.SEMATTRS_NET_PEER_IP = TMP_NET_PEER_IP;\n/**\n * Remote port number.\n *\n * @deprecated use ATTR_NET_PEER_PORT\n */\nexports.SEMATTRS_NET_PEER_PORT = TMP_NET_PEER_PORT;\n/**\n * Remote hostname or similar, see note below.\n *\n * @deprecated use ATTR_NET_PEER_NAME\n */\nexports.SEMATTRS_NET_PEER_NAME = TMP_NET_PEER_NAME;\n/**\n * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host.\n *\n * @deprecated use ATTR_NET_HOST_IP\n */\nexports.SEMATTRS_NET_HOST_IP = TMP_NET_HOST_IP;\n/**\n * Like `net.peer.port` but for the host port.\n *\n * @deprecated use ATTR_NET_HOST_PORT\n */\nexports.SEMATTRS_NET_HOST_PORT = TMP_NET_HOST_PORT;\n/**\n * Local hostname or similar, see note below.\n *\n * @deprecated use ATTR_NET_HOST_NAME\n */\nexports.SEMATTRS_NET_HOST_NAME = TMP_NET_HOST_NAME;\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated use ATTR_NET_HOST_CONNECTION_TYPE\n */\nexports.SEMATTRS_NET_HOST_CONNECTION_TYPE = TMP_NET_HOST_CONNECTION_TYPE;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated use ATTR_NET_HOST_CONNECTION_SUBTYPE\n */\nexports.SEMATTRS_NET_HOST_CONNECTION_SUBTYPE = TMP_NET_HOST_CONNECTION_SUBTYPE;\n/**\n * The name of the mobile carrier.\n *\n * @deprecated use ATTR_NET_HOST_CARRIER_NAME\n */\nexports.SEMATTRS_NET_HOST_CARRIER_NAME = TMP_NET_HOST_CARRIER_NAME;\n/**\n * The mobile carrier country code.\n *\n * @deprecated use ATTR_NET_HOST_CARRIER_MCC\n */\nexports.SEMATTRS_NET_HOST_CARRIER_MCC = TMP_NET_HOST_CARRIER_MCC;\n/**\n * The mobile carrier network code.\n *\n * @deprecated use ATTR_NET_HOST_CARRIER_MNC\n */\nexports.SEMATTRS_NET_HOST_CARRIER_MNC = TMP_NET_HOST_CARRIER_MNC;\n/**\n * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.\n *\n * @deprecated use ATTR_NET_HOST_CARRIER_ICC\n */\nexports.SEMATTRS_NET_HOST_CARRIER_ICC = TMP_NET_HOST_CARRIER_ICC;\n/**\n * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any.\n *\n * @deprecated use ATTR_PEER_SERVICE\n */\nexports.SEMATTRS_PEER_SERVICE = TMP_PEER_SERVICE;\n/**\n * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system.\n *\n * @deprecated use ATTR_ENDUSER_ID\n */\nexports.SEMATTRS_ENDUSER_ID = TMP_ENDUSER_ID;\n/**\n * Actual/assumed role the client is making the request under extracted from token or application security context.\n *\n * @deprecated use ATTR_ENDUSER_ROLE\n */\nexports.SEMATTRS_ENDUSER_ROLE = TMP_ENDUSER_ROLE;\n/**\n * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).\n *\n * @deprecated use ATTR_ENDUSER_SCOPE\n */\nexports.SEMATTRS_ENDUSER_SCOPE = TMP_ENDUSER_SCOPE;\n/**\n * Current "managed" thread ID (as opposed to OS thread ID).\n *\n * @deprecated use ATTR_THREAD_ID\n */\nexports.SEMATTRS_THREAD_ID = TMP_THREAD_ID;\n/**\n * Current thread name.\n *\n * @deprecated use ATTR_THREAD_NAME\n */\nexports.SEMATTRS_THREAD_NAME = TMP_THREAD_NAME;\n/**\n * The method or function name, or equivalent (usually rightmost part of the code unit's name).\n *\n * @deprecated use ATTR_CODE_FUNCTION\n */\nexports.SEMATTRS_CODE_FUNCTION = TMP_CODE_FUNCTION;\n/**\n * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit.\n *\n * @deprecated use ATTR_CODE_NAMESPACE\n */\nexports.SEMATTRS_CODE_NAMESPACE = TMP_CODE_NAMESPACE;\n/**\n * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).\n *\n * @deprecated use ATTR_CODE_FILEPATH\n */\nexports.SEMATTRS_CODE_FILEPATH = TMP_CODE_FILEPATH;\n/**\n * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.\n *\n * @deprecated use ATTR_CODE_LINENO\n */\nexports.SEMATTRS_CODE_LINENO = TMP_CODE_LINENO;\n/**\n * HTTP request method.\n *\n * @deprecated use ATTR_HTTP_METHOD\n */\nexports.SEMATTRS_HTTP_METHOD = TMP_HTTP_METHOD;\n/**\n * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless.\n *\n * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`.\n *\n * @deprecated use ATTR_HTTP_URL\n */\nexports.SEMATTRS_HTTP_URL = TMP_HTTP_URL;\n/**\n * The full request target as passed in a HTTP request line or equivalent.\n *\n * @deprecated use ATTR_HTTP_TARGET\n */\nexports.SEMATTRS_HTTP_TARGET = TMP_HTTP_TARGET;\n/**\n * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note.\n *\n * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set.\n *\n * @deprecated use ATTR_HTTP_HOST\n */\nexports.SEMATTRS_HTTP_HOST = TMP_HTTP_HOST;\n/**\n * The URI scheme identifying the used protocol.\n *\n * @deprecated use ATTR_HTTP_SCHEME\n */\nexports.SEMATTRS_HTTP_SCHEME = TMP_HTTP_SCHEME;\n/**\n * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).\n *\n * @deprecated use ATTR_HTTP_STATUS_CODE\n */\nexports.SEMATTRS_HTTP_STATUS_CODE = TMP_HTTP_STATUS_CODE;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated use ATTR_HTTP_FLAVOR\n */\nexports.SEMATTRS_HTTP_FLAVOR = TMP_HTTP_FLAVOR;\n/**\n * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client.\n *\n * @deprecated use ATTR_HTTP_USER_AGENT\n */\nexports.SEMATTRS_HTTP_USER_AGENT = TMP_HTTP_USER_AGENT;\n/**\n * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n *\n * @deprecated use ATTR_HTTP_REQUEST_CONTENT_LENGTH\n */\nexports.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH = TMP_HTTP_REQUEST_CONTENT_LENGTH;\n/**\n * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used.\n *\n * @deprecated use ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED\n */\nexports.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED;\n/**\n * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n *\n * @deprecated use ATTR_HTTP_RESPONSE_CONTENT_LENGTH\n */\nexports.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH = TMP_HTTP_RESPONSE_CONTENT_LENGTH;\n/**\n * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used.\n *\n * @deprecated use ATTR_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED\n */\nexports.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED;\n/**\n * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead).\n *\n * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available.\n *\n * @deprecated use ATTR_HTTP_SERVER_NAME\n */\nexports.SEMATTRS_HTTP_SERVER_NAME = TMP_HTTP_SERVER_NAME;\n/**\n * The matched route (path template).\n *\n * @deprecated use ATTR_HTTP_ROUTE\n */\nexports.SEMATTRS_HTTP_ROUTE = TMP_HTTP_ROUTE;\n/**\n* The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).\n*\n* Note: This is not necessarily the same as `net.peer.ip`, which would\nidentify the network-level peer, which may be a proxy.\n\nThis attribute should be set when a source of information different\nfrom the one used for `net.peer.ip`, is available even if that other\nsource just confirms the same value as `net.peer.ip`.\nRationale: For `net.peer.ip`, one typically does not know if it\ncomes from a proxy, reverse proxy, or the actual client. Setting\n`http.client_ip` when it's the same as `net.peer.ip` means that\none is at least somewhat confident that the address is not that of\nthe closest proxy.\n*\n* @deprecated use ATTR_HTTP_CLIENT_IP\n*/\nexports.SEMATTRS_HTTP_CLIENT_IP = TMP_HTTP_CLIENT_IP;\n/**\n * The keys in the `RequestItems` object field.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_TABLE_NAMES\n */\nexports.SEMATTRS_AWS_DYNAMODB_TABLE_NAMES = TMP_AWS_DYNAMODB_TABLE_NAMES;\n/**\n * The JSON-serialized value of each item in the `ConsumedCapacity` response field.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_CONSUMED_CAPACITY\n */\nexports.SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY = TMP_AWS_DYNAMODB_CONSUMED_CAPACITY;\n/**\n * The JSON-serialized value of the `ItemCollectionMetrics` response field.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_ITEM_COLLECTION_METRICS\n */\nexports.SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS;\n/**\n * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY\n */\nexports.SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY;\n/**\n * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY\n */\nexports.SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY;\n/**\n * The value of the `ConsistentRead` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_CONSISTENT_READ\n */\nexports.SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ = TMP_AWS_DYNAMODB_CONSISTENT_READ;\n/**\n * The value of the `ProjectionExpression` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_PROJECTION\n */\nexports.SEMATTRS_AWS_DYNAMODB_PROJECTION = TMP_AWS_DYNAMODB_PROJECTION;\n/**\n * The value of the `Limit` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_LIMIT\n */\nexports.SEMATTRS_AWS_DYNAMODB_LIMIT = TMP_AWS_DYNAMODB_LIMIT;\n/**\n * The value of the `AttributesToGet` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_ATTRIBUTES_TO_GET\n */\nexports.SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET = TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET;\n/**\n * The value of the `IndexName` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_INDEX_NAME\n */\nexports.SEMATTRS_AWS_DYNAMODB_INDEX_NAME = TMP_AWS_DYNAMODB_INDEX_NAME;\n/**\n * The value of the `Select` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_SELECT\n */\nexports.SEMATTRS_AWS_DYNAMODB_SELECT = TMP_AWS_DYNAMODB_SELECT;\n/**\n * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES\n */\nexports.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES;\n/**\n * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES\n */\nexports.SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES;\n/**\n * The value of the `ExclusiveStartTableName` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_EXCLUSIVE_START_TABLE\n */\nexports.SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE;\n/**\n * The the number of items in the `TableNames` response parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_TABLE_COUNT\n */\nexports.SEMATTRS_AWS_DYNAMODB_TABLE_COUNT = TMP_AWS_DYNAMODB_TABLE_COUNT;\n/**\n * The value of the `ScanIndexForward` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_SCAN_FORWARD\n */\nexports.SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD = TMP_AWS_DYNAMODB_SCAN_FORWARD;\n/**\n * The value of the `Segment` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_SEGMENT\n */\nexports.SEMATTRS_AWS_DYNAMODB_SEGMENT = TMP_AWS_DYNAMODB_SEGMENT;\n/**\n * The value of the `TotalSegments` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_TOTAL_SEGMENTS\n */\nexports.SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS = TMP_AWS_DYNAMODB_TOTAL_SEGMENTS;\n/**\n * The value of the `Count` response parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_COUNT\n */\nexports.SEMATTRS_AWS_DYNAMODB_COUNT = TMP_AWS_DYNAMODB_COUNT;\n/**\n * The value of the `ScannedCount` response parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_SCANNED_COUNT\n */\nexports.SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT = TMP_AWS_DYNAMODB_SCANNED_COUNT;\n/**\n * The JSON-serialized value of each item in the `AttributeDefinitions` request field.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS\n */\nexports.SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS;\n/**\n * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES\n */\nexports.SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES;\n/**\n * A string identifying the messaging system.\n *\n * @deprecated use ATTR_MESSAGING_SYSTEM\n */\nexports.SEMATTRS_MESSAGING_SYSTEM = TMP_MESSAGING_SYSTEM;\n/**\n * The message destination name. This might be equal to the span name but is required nevertheless.\n *\n * @deprecated use ATTR_MESSAGING_DESTINATION\n */\nexports.SEMATTRS_MESSAGING_DESTINATION = TMP_MESSAGING_DESTINATION;\n/**\n * The kind of message destination.\n *\n * @deprecated use ATTR_MESSAGING_DESTINATION_KIND\n */\nexports.SEMATTRS_MESSAGING_DESTINATION_KIND = TMP_MESSAGING_DESTINATION_KIND;\n/**\n * A boolean that is true if the message destination is temporary.\n *\n * @deprecated use ATTR_MESSAGING_TEMP_DESTINATION\n */\nexports.SEMATTRS_MESSAGING_TEMP_DESTINATION = TMP_MESSAGING_TEMP_DESTINATION;\n/**\n * The name of the transport protocol.\n *\n * @deprecated use ATTR_MESSAGING_PROTOCOL\n */\nexports.SEMATTRS_MESSAGING_PROTOCOL = TMP_MESSAGING_PROTOCOL;\n/**\n * The version of the transport protocol.\n *\n * @deprecated use ATTR_MESSAGING_PROTOCOL_VERSION\n */\nexports.SEMATTRS_MESSAGING_PROTOCOL_VERSION = TMP_MESSAGING_PROTOCOL_VERSION;\n/**\n * Connection string.\n *\n * @deprecated use ATTR_MESSAGING_URL\n */\nexports.SEMATTRS_MESSAGING_URL = TMP_MESSAGING_URL;\n/**\n * A value used by the messaging system as an identifier for the message, represented as a string.\n *\n * @deprecated use ATTR_MESSAGING_MESSAGE_ID\n */\nexports.SEMATTRS_MESSAGING_MESSAGE_ID = TMP_MESSAGING_MESSAGE_ID;\n/**\n * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID".\n *\n * @deprecated use ATTR_MESSAGING_CONVERSATION_ID\n */\nexports.SEMATTRS_MESSAGING_CONVERSATION_ID = TMP_MESSAGING_CONVERSATION_ID;\n/**\n * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported.\n *\n * @deprecated use ATTR_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES\n */\nexports.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES;\n/**\n * The compressed size of the message payload in bytes.\n *\n * @deprecated use ATTR_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES\n */\nexports.SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES;\n/**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n *\n * @deprecated use ATTR_MESSAGING_OPERATION\n */\nexports.SEMATTRS_MESSAGING_OPERATION = TMP_MESSAGING_OPERATION;\n/**\n * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message.\n *\n * @deprecated use ATTR_MESSAGING_CONSUMER_ID\n */\nexports.SEMATTRS_MESSAGING_CONSUMER_ID = TMP_MESSAGING_CONSUMER_ID;\n/**\n * RabbitMQ message routing key.\n *\n * @deprecated use ATTR_MESSAGING_RABBITMQ_ROUTING_KEY\n */\nexports.SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY = TMP_MESSAGING_RABBITMQ_ROUTING_KEY;\n/**\n * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set.\n *\n * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.\n *\n * @deprecated use ATTR_MESSAGING_KAFKA_MESSAGE_KEY\n */\nexports.SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY = TMP_MESSAGING_KAFKA_MESSAGE_KEY;\n/**\n * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers.\n *\n * @deprecated use ATTR_MESSAGING_KAFKA_CONSUMER_GROUP\n */\nexports.SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP = TMP_MESSAGING_KAFKA_CONSUMER_GROUP;\n/**\n * Client Id for the Consumer or Producer that is handling the message.\n *\n * @deprecated use ATTR_MESSAGING_KAFKA_CLIENT_ID\n */\nexports.SEMATTRS_MESSAGING_KAFKA_CLIENT_ID = TMP_MESSAGING_KAFKA_CLIENT_ID;\n/**\n * Partition the message is sent to.\n *\n * @deprecated use ATTR_MESSAGING_KAFKA_PARTITION\n */\nexports.SEMATTRS_MESSAGING_KAFKA_PARTITION = TMP_MESSAGING_KAFKA_PARTITION;\n/**\n * A boolean that is true if the message is a tombstone.\n *\n * @deprecated use ATTR_MESSAGING_KAFKA_TOMBSTONE\n */\nexports.SEMATTRS_MESSAGING_KAFKA_TOMBSTONE = TMP_MESSAGING_KAFKA_TOMBSTONE;\n/**\n * A string identifying the remoting system.\n *\n * @deprecated use ATTR_RPC_SYSTEM\n */\nexports.SEMATTRS_RPC_SYSTEM = TMP_RPC_SYSTEM;\n/**\n * The full (logical) name of the service being called, including its package name, if applicable.\n *\n * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).\n *\n * @deprecated use ATTR_RPC_SERVICE\n */\nexports.SEMATTRS_RPC_SERVICE = TMP_RPC_SERVICE;\n/**\n * The name of the (logical) method being called, must be equal to the $method part in the span name.\n *\n * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).\n *\n * @deprecated use ATTR_RPC_METHOD\n */\nexports.SEMATTRS_RPC_METHOD = TMP_RPC_METHOD;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated use ATTR_RPC_GRPC_STATUS_CODE\n */\nexports.SEMATTRS_RPC_GRPC_STATUS_CODE = TMP_RPC_GRPC_STATUS_CODE;\n/**\n * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted.\n *\n * @deprecated use ATTR_RPC_JSONRPC_VERSION\n */\nexports.SEMATTRS_RPC_JSONRPC_VERSION = TMP_RPC_JSONRPC_VERSION;\n/**\n * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification.\n *\n * @deprecated use ATTR_RPC_JSONRPC_REQUEST_ID\n */\nexports.SEMATTRS_RPC_JSONRPC_REQUEST_ID = TMP_RPC_JSONRPC_REQUEST_ID;\n/**\n * `error.code` property of response if it is an error response.\n *\n * @deprecated use ATTR_RPC_JSONRPC_ERROR_CODE\n */\nexports.SEMATTRS_RPC_JSONRPC_ERROR_CODE = TMP_RPC_JSONRPC_ERROR_CODE;\n/**\n * `error.message` property of response if it is an error response.\n *\n * @deprecated use ATTR_RPC_JSONRPC_ERROR_MESSAGE\n */\nexports.SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE = TMP_RPC_JSONRPC_ERROR_MESSAGE;\n/**\n * Whether this is a received or sent message.\n *\n * @deprecated use ATTR_MESSAGE_TYPE\n */\nexports.SEMATTRS_MESSAGE_TYPE = TMP_MESSAGE_TYPE;\n/**\n * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.\n *\n * Note: This way we guarantee that the values will be consistent between different implementations.\n *\n * @deprecated use ATTR_MESSAGE_ID\n */\nexports.SEMATTRS_MESSAGE_ID = TMP_MESSAGE_ID;\n/**\n * Compressed size of the message in bytes.\n *\n * @deprecated use ATTR_MESSAGE_COMPRESSED_SIZE\n */\nexports.SEMATTRS_MESSAGE_COMPRESSED_SIZE = TMP_MESSAGE_COMPRESSED_SIZE;\n/**\n * Uncompressed size of the message in bytes.\n *\n * @deprecated use ATTR_MESSAGE_UNCOMPRESSED_SIZE\n */\nexports.SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE = TMP_MESSAGE_UNCOMPRESSED_SIZE;\n/**\n * Create exported Value Map for SemanticAttributes values\n * @deprecated Use the SEMATTRS_XXXXX constants rather than the SemanticAttributes.XXXXX for bundle minification\n */\nexports.SemanticAttributes = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_AWS_LAMBDA_INVOKED_ARN,\n TMP_DB_SYSTEM,\n TMP_DB_CONNECTION_STRING,\n TMP_DB_USER,\n TMP_DB_JDBC_DRIVER_CLASSNAME,\n TMP_DB_NAME,\n TMP_DB_STATEMENT,\n TMP_DB_OPERATION,\n TMP_DB_MSSQL_INSTANCE_NAME,\n TMP_DB_CASSANDRA_KEYSPACE,\n TMP_DB_CASSANDRA_PAGE_SIZE,\n TMP_DB_CASSANDRA_CONSISTENCY_LEVEL,\n TMP_DB_CASSANDRA_TABLE,\n TMP_DB_CASSANDRA_IDEMPOTENCE,\n TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT,\n TMP_DB_CASSANDRA_COORDINATOR_ID,\n TMP_DB_CASSANDRA_COORDINATOR_DC,\n TMP_DB_HBASE_NAMESPACE,\n TMP_DB_REDIS_DATABASE_INDEX,\n TMP_DB_MONGODB_COLLECTION,\n TMP_DB_SQL_TABLE,\n TMP_EXCEPTION_TYPE,\n TMP_EXCEPTION_MESSAGE,\n TMP_EXCEPTION_STACKTRACE,\n TMP_EXCEPTION_ESCAPED,\n TMP_FAAS_TRIGGER,\n TMP_FAAS_EXECUTION,\n TMP_FAAS_DOCUMENT_COLLECTION,\n TMP_FAAS_DOCUMENT_OPERATION,\n TMP_FAAS_DOCUMENT_TIME,\n TMP_FAAS_DOCUMENT_NAME,\n TMP_FAAS_TIME,\n TMP_FAAS_CRON,\n TMP_FAAS_COLDSTART,\n TMP_FAAS_INVOKED_NAME,\n TMP_FAAS_INVOKED_PROVIDER,\n TMP_FAAS_INVOKED_REGION,\n TMP_NET_TRANSPORT,\n TMP_NET_PEER_IP,\n TMP_NET_PEER_PORT,\n TMP_NET_PEER_NAME,\n TMP_NET_HOST_IP,\n TMP_NET_HOST_PORT,\n TMP_NET_HOST_NAME,\n TMP_NET_HOST_CONNECTION_TYPE,\n TMP_NET_HOST_CONNECTION_SUBTYPE,\n TMP_NET_HOST_CARRIER_NAME,\n TMP_NET_HOST_CARRIER_MCC,\n TMP_NET_HOST_CARRIER_MNC,\n TMP_NET_HOST_CARRIER_ICC,\n TMP_PEER_SERVICE,\n TMP_ENDUSER_ID,\n TMP_ENDUSER_ROLE,\n TMP_ENDUSER_SCOPE,\n TMP_THREAD_ID,\n TMP_THREAD_NAME,\n TMP_CODE_FUNCTION,\n TMP_CODE_NAMESPACE,\n TMP_CODE_FILEPATH,\n TMP_CODE_LINENO,\n TMP_HTTP_METHOD,\n TMP_HTTP_URL,\n TMP_HTTP_TARGET,\n TMP_HTTP_HOST,\n TMP_HTTP_SCHEME,\n TMP_HTTP_STATUS_CODE,\n TMP_HTTP_FLAVOR,\n TMP_HTTP_USER_AGENT,\n TMP_HTTP_REQUEST_CONTENT_LENGTH,\n TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED,\n TMP_HTTP_RESPONSE_CONTENT_LENGTH,\n TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,\n TMP_HTTP_SERVER_NAME,\n TMP_HTTP_ROUTE,\n TMP_HTTP_CLIENT_IP,\n TMP_AWS_DYNAMODB_TABLE_NAMES,\n TMP_AWS_DYNAMODB_CONSUMED_CAPACITY,\n TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS,\n TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY,\n TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY,\n TMP_AWS_DYNAMODB_CONSISTENT_READ,\n TMP_AWS_DYNAMODB_PROJECTION,\n TMP_AWS_DYNAMODB_LIMIT,\n TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET,\n TMP_AWS_DYNAMODB_INDEX_NAME,\n TMP_AWS_DYNAMODB_SELECT,\n TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES,\n TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES,\n TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE,\n TMP_AWS_DYNAMODB_TABLE_COUNT,\n TMP_AWS_DYNAMODB_SCAN_FORWARD,\n TMP_AWS_DYNAMODB_SEGMENT,\n TMP_AWS_DYNAMODB_TOTAL_SEGMENTS,\n TMP_AWS_DYNAMODB_COUNT,\n TMP_AWS_DYNAMODB_SCANNED_COUNT,\n TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS,\n TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES,\n TMP_MESSAGING_SYSTEM,\n TMP_MESSAGING_DESTINATION,\n TMP_MESSAGING_DESTINATION_KIND,\n TMP_MESSAGING_TEMP_DESTINATION,\n TMP_MESSAGING_PROTOCOL,\n TMP_MESSAGING_PROTOCOL_VERSION,\n TMP_MESSAGING_URL,\n TMP_MESSAGING_MESSAGE_ID,\n TMP_MESSAGING_CONVERSATION_ID,\n TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES,\n TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES,\n TMP_MESSAGING_OPERATION,\n TMP_MESSAGING_CONSUMER_ID,\n TMP_MESSAGING_RABBITMQ_ROUTING_KEY,\n TMP_MESSAGING_KAFKA_MESSAGE_KEY,\n TMP_MESSAGING_KAFKA_CONSUMER_GROUP,\n TMP_MESSAGING_KAFKA_CLIENT_ID,\n TMP_MESSAGING_KAFKA_PARTITION,\n TMP_MESSAGING_KAFKA_TOMBSTONE,\n TMP_RPC_SYSTEM,\n TMP_RPC_SERVICE,\n TMP_RPC_METHOD,\n TMP_RPC_GRPC_STATUS_CODE,\n TMP_RPC_JSONRPC_VERSION,\n TMP_RPC_JSONRPC_REQUEST_ID,\n TMP_RPC_JSONRPC_ERROR_CODE,\n TMP_RPC_JSONRPC_ERROR_MESSAGE,\n TMP_MESSAGE_TYPE,\n TMP_MESSAGE_ID,\n TMP_MESSAGE_COMPRESSED_SIZE,\n TMP_MESSAGE_UNCOMPRESSED_SIZE,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for DbSystemValues enum definition\n *\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_DBSYSTEMVALUES_OTHER_SQL = 'other_sql';\nconst TMP_DBSYSTEMVALUES_MSSQL = 'mssql';\nconst TMP_DBSYSTEMVALUES_MYSQL = 'mysql';\nconst TMP_DBSYSTEMVALUES_ORACLE = 'oracle';\nconst TMP_DBSYSTEMVALUES_DB2 = 'db2';\nconst TMP_DBSYSTEMVALUES_POSTGRESQL = 'postgresql';\nconst TMP_DBSYSTEMVALUES_REDSHIFT = 'redshift';\nconst TMP_DBSYSTEMVALUES_HIVE = 'hive';\nconst TMP_DBSYSTEMVALUES_CLOUDSCAPE = 'cloudscape';\nconst TMP_DBSYSTEMVALUES_HSQLDB = 'hsqldb';\nconst TMP_DBSYSTEMVALUES_PROGRESS = 'progress';\nconst TMP_DBSYSTEMVALUES_MAXDB = 'maxdb';\nconst TMP_DBSYSTEMVALUES_HANADB = 'hanadb';\nconst TMP_DBSYSTEMVALUES_INGRES = 'ingres';\nconst TMP_DBSYSTEMVALUES_FIRSTSQL = 'firstsql';\nconst TMP_DBSYSTEMVALUES_EDB = 'edb';\nconst TMP_DBSYSTEMVALUES_CACHE = 'cache';\nconst TMP_DBSYSTEMVALUES_ADABAS = 'adabas';\nconst TMP_DBSYSTEMVALUES_FIREBIRD = 'firebird';\nconst TMP_DBSYSTEMVALUES_DERBY = 'derby';\nconst TMP_DBSYSTEMVALUES_FILEMAKER = 'filemaker';\nconst TMP_DBSYSTEMVALUES_INFORMIX = 'informix';\nconst TMP_DBSYSTEMVALUES_INSTANTDB = 'instantdb';\nconst TMP_DBSYSTEMVALUES_INTERBASE = 'interbase';\nconst TMP_DBSYSTEMVALUES_MARIADB = 'mariadb';\nconst TMP_DBSYSTEMVALUES_NETEZZA = 'netezza';\nconst TMP_DBSYSTEMVALUES_PERVASIVE = 'pervasive';\nconst TMP_DBSYSTEMVALUES_POINTBASE = 'pointbase';\nconst TMP_DBSYSTEMVALUES_SQLITE = 'sqlite';\nconst TMP_DBSYSTEMVALUES_SYBASE = 'sybase';\nconst TMP_DBSYSTEMVALUES_TERADATA = 'teradata';\nconst TMP_DBSYSTEMVALUES_VERTICA = 'vertica';\nconst TMP_DBSYSTEMVALUES_H2 = 'h2';\nconst TMP_DBSYSTEMVALUES_COLDFUSION = 'coldfusion';\nconst TMP_DBSYSTEMVALUES_CASSANDRA = 'cassandra';\nconst TMP_DBSYSTEMVALUES_HBASE = 'hbase';\nconst TMP_DBSYSTEMVALUES_MONGODB = 'mongodb';\nconst TMP_DBSYSTEMVALUES_REDIS = 'redis';\nconst TMP_DBSYSTEMVALUES_COUCHBASE = 'couchbase';\nconst TMP_DBSYSTEMVALUES_COUCHDB = 'couchdb';\nconst TMP_DBSYSTEMVALUES_COSMOSDB = 'cosmosdb';\nconst TMP_DBSYSTEMVALUES_DYNAMODB = 'dynamodb';\nconst TMP_DBSYSTEMVALUES_NEO4J = 'neo4j';\nconst TMP_DBSYSTEMVALUES_GEODE = 'geode';\nconst TMP_DBSYSTEMVALUES_ELASTICSEARCH = 'elasticsearch';\nconst TMP_DBSYSTEMVALUES_MEMCACHED = 'memcached';\nconst TMP_DBSYSTEMVALUES_COCKROACHDB = 'cockroachdb';\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_OTHER_SQL.\n */\nexports.DBSYSTEMVALUES_OTHER_SQL = TMP_DBSYSTEMVALUES_OTHER_SQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MSSQL.\n */\nexports.DBSYSTEMVALUES_MSSQL = TMP_DBSYSTEMVALUES_MSSQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MYSQL.\n */\nexports.DBSYSTEMVALUES_MYSQL = TMP_DBSYSTEMVALUES_MYSQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_ORACLE.\n */\nexports.DBSYSTEMVALUES_ORACLE = TMP_DBSYSTEMVALUES_ORACLE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_DB2.\n */\nexports.DBSYSTEMVALUES_DB2 = TMP_DBSYSTEMVALUES_DB2;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_POSTGRESQL.\n */\nexports.DBSYSTEMVALUES_POSTGRESQL = TMP_DBSYSTEMVALUES_POSTGRESQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_REDSHIFT.\n */\nexports.DBSYSTEMVALUES_REDSHIFT = TMP_DBSYSTEMVALUES_REDSHIFT;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_HIVE.\n */\nexports.DBSYSTEMVALUES_HIVE = TMP_DBSYSTEMVALUES_HIVE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_CLOUDSCAPE.\n */\nexports.DBSYSTEMVALUES_CLOUDSCAPE = TMP_DBSYSTEMVALUES_CLOUDSCAPE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_HSQLDB.\n */\nexports.DBSYSTEMVALUES_HSQLDB = TMP_DBSYSTEMVALUES_HSQLDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_PROGRESS.\n */\nexports.DBSYSTEMVALUES_PROGRESS = TMP_DBSYSTEMVALUES_PROGRESS;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MAXDB.\n */\nexports.DBSYSTEMVALUES_MAXDB = TMP_DBSYSTEMVALUES_MAXDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_HANADB.\n */\nexports.DBSYSTEMVALUES_HANADB = TMP_DBSYSTEMVALUES_HANADB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_INGRES.\n */\nexports.DBSYSTEMVALUES_INGRES = TMP_DBSYSTEMVALUES_INGRES;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_FIRSTSQL.\n */\nexports.DBSYSTEMVALUES_FIRSTSQL = TMP_DBSYSTEMVALUES_FIRSTSQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_EDB.\n */\nexports.DBSYSTEMVALUES_EDB = TMP_DBSYSTEMVALUES_EDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_CACHE.\n */\nexports.DBSYSTEMVALUES_CACHE = TMP_DBSYSTEMVALUES_CACHE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_ADABAS.\n */\nexports.DBSYSTEMVALUES_ADABAS = TMP_DBSYSTEMVALUES_ADABAS;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_FIREBIRD.\n */\nexports.DBSYSTEMVALUES_FIREBIRD = TMP_DBSYSTEMVALUES_FIREBIRD;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_DERBY.\n */\nexports.DBSYSTEMVALUES_DERBY = TMP_DBSYSTEMVALUES_DERBY;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_FILEMAKER.\n */\nexports.DBSYSTEMVALUES_FILEMAKER = TMP_DBSYSTEMVALUES_FILEMAKER;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_INFORMIX.\n */\nexports.DBSYSTEMVALUES_INFORMIX = TMP_DBSYSTEMVALUES_INFORMIX;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_INSTANTDB.\n */\nexports.DBSYSTEMVALUES_INSTANTDB = TMP_DBSYSTEMVALUES_INSTANTDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_INTERBASE.\n */\nexports.DBSYSTEMVALUES_INTERBASE = TMP_DBSYSTEMVALUES_INTERBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MARIADB.\n */\nexports.DBSYSTEMVALUES_MARIADB = TMP_DBSYSTEMVALUES_MARIADB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_NETEZZA.\n */\nexports.DBSYSTEMVALUES_NETEZZA = TMP_DBSYSTEMVALUES_NETEZZA;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_PERVASIVE.\n */\nexports.DBSYSTEMVALUES_PERVASIVE = TMP_DBSYSTEMVALUES_PERVASIVE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_POINTBASE.\n */\nexports.DBSYSTEMVALUES_POINTBASE = TMP_DBSYSTEMVALUES_POINTBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_SQLITE.\n */\nexports.DBSYSTEMVALUES_SQLITE = TMP_DBSYSTEMVALUES_SQLITE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_SYBASE.\n */\nexports.DBSYSTEMVALUES_SYBASE = TMP_DBSYSTEMVALUES_SYBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_TERADATA.\n */\nexports.DBSYSTEMVALUES_TERADATA = TMP_DBSYSTEMVALUES_TERADATA;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_VERTICA.\n */\nexports.DBSYSTEMVALUES_VERTICA = TMP_DBSYSTEMVALUES_VERTICA;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_H2.\n */\nexports.DBSYSTEMVALUES_H2 = TMP_DBSYSTEMVALUES_H2;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_COLDFUSION.\n */\nexports.DBSYSTEMVALUES_COLDFUSION = TMP_DBSYSTEMVALUES_COLDFUSION;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_CASSANDRA.\n */\nexports.DBSYSTEMVALUES_CASSANDRA = TMP_DBSYSTEMVALUES_CASSANDRA;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_HBASE.\n */\nexports.DBSYSTEMVALUES_HBASE = TMP_DBSYSTEMVALUES_HBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MONGODB.\n */\nexports.DBSYSTEMVALUES_MONGODB = TMP_DBSYSTEMVALUES_MONGODB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_REDIS.\n */\nexports.DBSYSTEMVALUES_REDIS = TMP_DBSYSTEMVALUES_REDIS;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_COUCHBASE.\n */\nexports.DBSYSTEMVALUES_COUCHBASE = TMP_DBSYSTEMVALUES_COUCHBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_COUCHDB.\n */\nexports.DBSYSTEMVALUES_COUCHDB = TMP_DBSYSTEMVALUES_COUCHDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_COSMOSDB.\n */\nexports.DBSYSTEMVALUES_COSMOSDB = TMP_DBSYSTEMVALUES_COSMOSDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_DYNAMODB.\n */\nexports.DBSYSTEMVALUES_DYNAMODB = TMP_DBSYSTEMVALUES_DYNAMODB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_NEO4J.\n */\nexports.DBSYSTEMVALUES_NEO4J = TMP_DBSYSTEMVALUES_NEO4J;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_GEODE.\n */\nexports.DBSYSTEMVALUES_GEODE = TMP_DBSYSTEMVALUES_GEODE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_ELASTICSEARCH.\n */\nexports.DBSYSTEMVALUES_ELASTICSEARCH = TMP_DBSYSTEMVALUES_ELASTICSEARCH;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MEMCACHED.\n */\nexports.DBSYSTEMVALUES_MEMCACHED = TMP_DBSYSTEMVALUES_MEMCACHED;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_COCKROACHDB.\n */\nexports.DBSYSTEMVALUES_COCKROACHDB = TMP_DBSYSTEMVALUES_COCKROACHDB;\n/**\n * The constant map of values for DbSystemValues.\n * @deprecated Use the DBSYSTEMVALUES_XXXXX constants rather than the DbSystemValues.XXXXX for bundle minification.\n */\nexports.DbSystemValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_DBSYSTEMVALUES_OTHER_SQL,\n TMP_DBSYSTEMVALUES_MSSQL,\n TMP_DBSYSTEMVALUES_MYSQL,\n TMP_DBSYSTEMVALUES_ORACLE,\n TMP_DBSYSTEMVALUES_DB2,\n TMP_DBSYSTEMVALUES_POSTGRESQL,\n TMP_DBSYSTEMVALUES_REDSHIFT,\n TMP_DBSYSTEMVALUES_HIVE,\n TMP_DBSYSTEMVALUES_CLOUDSCAPE,\n TMP_DBSYSTEMVALUES_HSQLDB,\n TMP_DBSYSTEMVALUES_PROGRESS,\n TMP_DBSYSTEMVALUES_MAXDB,\n TMP_DBSYSTEMVALUES_HANADB,\n TMP_DBSYSTEMVALUES_INGRES,\n TMP_DBSYSTEMVALUES_FIRSTSQL,\n TMP_DBSYSTEMVALUES_EDB,\n TMP_DBSYSTEMVALUES_CACHE,\n TMP_DBSYSTEMVALUES_ADABAS,\n TMP_DBSYSTEMVALUES_FIREBIRD,\n TMP_DBSYSTEMVALUES_DERBY,\n TMP_DBSYSTEMVALUES_FILEMAKER,\n TMP_DBSYSTEMVALUES_INFORMIX,\n TMP_DBSYSTEMVALUES_INSTANTDB,\n TMP_DBSYSTEMVALUES_INTERBASE,\n TMP_DBSYSTEMVALUES_MARIADB,\n TMP_DBSYSTEMVALUES_NETEZZA,\n TMP_DBSYSTEMVALUES_PERVASIVE,\n TMP_DBSYSTEMVALUES_POINTBASE,\n TMP_DBSYSTEMVALUES_SQLITE,\n TMP_DBSYSTEMVALUES_SYBASE,\n TMP_DBSYSTEMVALUES_TERADATA,\n TMP_DBSYSTEMVALUES_VERTICA,\n TMP_DBSYSTEMVALUES_H2,\n TMP_DBSYSTEMVALUES_COLDFUSION,\n TMP_DBSYSTEMVALUES_CASSANDRA,\n TMP_DBSYSTEMVALUES_HBASE,\n TMP_DBSYSTEMVALUES_MONGODB,\n TMP_DBSYSTEMVALUES_REDIS,\n TMP_DBSYSTEMVALUES_COUCHBASE,\n TMP_DBSYSTEMVALUES_COUCHDB,\n TMP_DBSYSTEMVALUES_COSMOSDB,\n TMP_DBSYSTEMVALUES_DYNAMODB,\n TMP_DBSYSTEMVALUES_NEO4J,\n TMP_DBSYSTEMVALUES_GEODE,\n TMP_DBSYSTEMVALUES_ELASTICSEARCH,\n TMP_DBSYSTEMVALUES_MEMCACHED,\n TMP_DBSYSTEMVALUES_COCKROACHDB,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for DbCassandraConsistencyLevelValues enum definition\n *\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL = 'all';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = 'each_quorum';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = 'quorum';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = 'local_quorum';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE = 'one';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO = 'two';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE = 'three';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = 'local_one';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY = 'any';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = 'serial';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = 'local_serial';\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_ALL.\n */\nexports.DBCASSANDRACONSISTENCYLEVELVALUES_ALL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_EACH_QUORUM.\n */\nexports.DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_QUORUM.\n */\nexports.DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_LOCAL_QUORUM.\n */\nexports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_ONE.\n */\nexports.DBCASSANDRACONSISTENCYLEVELVALUES_ONE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_TWO.\n */\nexports.DBCASSANDRACONSISTENCYLEVELVALUES_TWO = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_THREE.\n */\nexports.DBCASSANDRACONSISTENCYLEVELVALUES_THREE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_LOCAL_ONE.\n */\nexports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_ANY.\n */\nexports.DBCASSANDRACONSISTENCYLEVELVALUES_ANY = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_SERIAL.\n */\nexports.DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_LOCAL_SERIAL.\n */\nexports.DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL;\n/**\n * The constant map of values for DbCassandraConsistencyLevelValues.\n * @deprecated Use the DBCASSANDRACONSISTENCYLEVELVALUES_XXXXX constants rather than the DbCassandraConsistencyLevelValues.XXXXX for bundle minification.\n */\nexports.DbCassandraConsistencyLevelValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for FaasTriggerValues enum definition\n *\n * Type of the trigger on which the function is executed.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_FAASTRIGGERVALUES_DATASOURCE = 'datasource';\nconst TMP_FAASTRIGGERVALUES_HTTP = 'http';\nconst TMP_FAASTRIGGERVALUES_PUBSUB = 'pubsub';\nconst TMP_FAASTRIGGERVALUES_TIMER = 'timer';\nconst TMP_FAASTRIGGERVALUES_OTHER = 'other';\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated Use FAAS_TRIGGER_VALUE_DATASOURCE.\n */\nexports.FAASTRIGGERVALUES_DATASOURCE = TMP_FAASTRIGGERVALUES_DATASOURCE;\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated Use FAAS_TRIGGER_VALUE_HTTP.\n */\nexports.FAASTRIGGERVALUES_HTTP = TMP_FAASTRIGGERVALUES_HTTP;\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated Use FAAS_TRIGGER_VALUE_PUBSUB.\n */\nexports.FAASTRIGGERVALUES_PUBSUB = TMP_FAASTRIGGERVALUES_PUBSUB;\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated Use FAAS_TRIGGER_VALUE_TIMER.\n */\nexports.FAASTRIGGERVALUES_TIMER = TMP_FAASTRIGGERVALUES_TIMER;\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated Use FAAS_TRIGGER_VALUE_OTHER.\n */\nexports.FAASTRIGGERVALUES_OTHER = TMP_FAASTRIGGERVALUES_OTHER;\n/**\n * The constant map of values for FaasTriggerValues.\n * @deprecated Use the FAASTRIGGERVALUES_XXXXX constants rather than the FaasTriggerValues.XXXXX for bundle minification.\n */\nexports.FaasTriggerValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_FAASTRIGGERVALUES_DATASOURCE,\n TMP_FAASTRIGGERVALUES_HTTP,\n TMP_FAASTRIGGERVALUES_PUBSUB,\n TMP_FAASTRIGGERVALUES_TIMER,\n TMP_FAASTRIGGERVALUES_OTHER,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for FaasDocumentOperationValues enum definition\n *\n * Describes the type of the operation that was performed on the data.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_FAASDOCUMENTOPERATIONVALUES_INSERT = 'insert';\nconst TMP_FAASDOCUMENTOPERATIONVALUES_EDIT = 'edit';\nconst TMP_FAASDOCUMENTOPERATIONVALUES_DELETE = 'delete';\n/**\n * Describes the type of the operation that was performed on the data.\n *\n * @deprecated Use FAAS_DOCUMENT_OPERATION_VALUE_INSERT.\n */\nexports.FAASDOCUMENTOPERATIONVALUES_INSERT = TMP_FAASDOCUMENTOPERATIONVALUES_INSERT;\n/**\n * Describes the type of the operation that was performed on the data.\n *\n * @deprecated Use FAAS_DOCUMENT_OPERATION_VALUE_EDIT.\n */\nexports.FAASDOCUMENTOPERATIONVALUES_EDIT = TMP_FAASDOCUMENTOPERATIONVALUES_EDIT;\n/**\n * Describes the type of the operation that was performed on the data.\n *\n * @deprecated Use FAAS_DOCUMENT_OPERATION_VALUE_DELETE.\n */\nexports.FAASDOCUMENTOPERATIONVALUES_DELETE = TMP_FAASDOCUMENTOPERATIONVALUES_DELETE;\n/**\n * The constant map of values for FaasDocumentOperationValues.\n * @deprecated Use the FAASDOCUMENTOPERATIONVALUES_XXXXX constants rather than the FaasDocumentOperationValues.XXXXX for bundle minification.\n */\nexports.FaasDocumentOperationValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_FAASDOCUMENTOPERATIONVALUES_INSERT,\n TMP_FAASDOCUMENTOPERATIONVALUES_EDIT,\n TMP_FAASDOCUMENTOPERATIONVALUES_DELETE,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for FaasInvokedProviderValues enum definition\n *\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = 'alibaba_cloud';\nconst TMP_FAASINVOKEDPROVIDERVALUES_AWS = 'aws';\nconst TMP_FAASINVOKEDPROVIDERVALUES_AZURE = 'azure';\nconst TMP_FAASINVOKEDPROVIDERVALUES_GCP = 'gcp';\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n *\n * @deprecated Use FAAS_INVOKED_PROVIDER_VALUE_ALIBABA_CLOUD.\n */\nexports.FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD;\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n *\n * @deprecated Use FAAS_INVOKED_PROVIDER_VALUE_AWS.\n */\nexports.FAASINVOKEDPROVIDERVALUES_AWS = TMP_FAASINVOKEDPROVIDERVALUES_AWS;\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n *\n * @deprecated Use FAAS_INVOKED_PROVIDER_VALUE_AZURE.\n */\nexports.FAASINVOKEDPROVIDERVALUES_AZURE = TMP_FAASINVOKEDPROVIDERVALUES_AZURE;\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n *\n * @deprecated Use FAAS_INVOKED_PROVIDER_VALUE_GCP.\n */\nexports.FAASINVOKEDPROVIDERVALUES_GCP = TMP_FAASINVOKEDPROVIDERVALUES_GCP;\n/**\n * The constant map of values for FaasInvokedProviderValues.\n * @deprecated Use the FAASINVOKEDPROVIDERVALUES_XXXXX constants rather than the FaasInvokedProviderValues.XXXXX for bundle minification.\n */\nexports.FaasInvokedProviderValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD,\n TMP_FAASINVOKEDPROVIDERVALUES_AWS,\n TMP_FAASINVOKEDPROVIDERVALUES_AZURE,\n TMP_FAASINVOKEDPROVIDERVALUES_GCP,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for NetTransportValues enum definition\n *\n * Transport protocol used. See note below.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_NETTRANSPORTVALUES_IP_TCP = 'ip_tcp';\nconst TMP_NETTRANSPORTVALUES_IP_UDP = 'ip_udp';\nconst TMP_NETTRANSPORTVALUES_IP = 'ip';\nconst TMP_NETTRANSPORTVALUES_UNIX = 'unix';\nconst TMP_NETTRANSPORTVALUES_PIPE = 'pipe';\nconst TMP_NETTRANSPORTVALUES_INPROC = 'inproc';\nconst TMP_NETTRANSPORTVALUES_OTHER = 'other';\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_IP_TCP.\n */\nexports.NETTRANSPORTVALUES_IP_TCP = TMP_NETTRANSPORTVALUES_IP_TCP;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_IP_UDP.\n */\nexports.NETTRANSPORTVALUES_IP_UDP = TMP_NETTRANSPORTVALUES_IP_UDP;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_IP.\n */\nexports.NETTRANSPORTVALUES_IP = TMP_NETTRANSPORTVALUES_IP;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_UNIX.\n */\nexports.NETTRANSPORTVALUES_UNIX = TMP_NETTRANSPORTVALUES_UNIX;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_PIPE.\n */\nexports.NETTRANSPORTVALUES_PIPE = TMP_NETTRANSPORTVALUES_PIPE;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_INPROC.\n */\nexports.NETTRANSPORTVALUES_INPROC = TMP_NETTRANSPORTVALUES_INPROC;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_OTHER.\n */\nexports.NETTRANSPORTVALUES_OTHER = TMP_NETTRANSPORTVALUES_OTHER;\n/**\n * The constant map of values for NetTransportValues.\n * @deprecated Use the NETTRANSPORTVALUES_XXXXX constants rather than the NetTransportValues.XXXXX for bundle minification.\n */\nexports.NetTransportValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_NETTRANSPORTVALUES_IP_TCP,\n TMP_NETTRANSPORTVALUES_IP_UDP,\n TMP_NETTRANSPORTVALUES_IP,\n TMP_NETTRANSPORTVALUES_UNIX,\n TMP_NETTRANSPORTVALUES_PIPE,\n TMP_NETTRANSPORTVALUES_INPROC,\n TMP_NETTRANSPORTVALUES_OTHER,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for NetHostConnectionTypeValues enum definition\n *\n * The internet connection type currently being used by the host.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI = 'wifi';\nconst TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED = 'wired';\nconst TMP_NETHOSTCONNECTIONTYPEVALUES_CELL = 'cell';\nconst TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = 'unavailable';\nconst TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = 'unknown';\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated Use NET_HOST_CONNECTION_TYPE_VALUE_WIFI.\n */\nexports.NETHOSTCONNECTIONTYPEVALUES_WIFI = TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI;\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated Use NET_HOST_CONNECTION_TYPE_VALUE_WIRED.\n */\nexports.NETHOSTCONNECTIONTYPEVALUES_WIRED = TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED;\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated Use NET_HOST_CONNECTION_TYPE_VALUE_CELL.\n */\nexports.NETHOSTCONNECTIONTYPEVALUES_CELL = TMP_NETHOSTCONNECTIONTYPEVALUES_CELL;\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated Use NET_HOST_CONNECTION_TYPE_VALUE_UNAVAILABLE.\n */\nexports.NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE;\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated Use NET_HOST_CONNECTION_TYPE_VALUE_UNKNOWN.\n */\nexports.NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN;\n/**\n * The constant map of values for NetHostConnectionTypeValues.\n * @deprecated Use the NETHOSTCONNECTIONTYPEVALUES_XXXXX constants rather than the NetHostConnectionTypeValues.XXXXX for bundle minification.\n */\nexports.NetHostConnectionTypeValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI,\n TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED,\n TMP_NETHOSTCONNECTIONTYPEVALUES_CELL,\n TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE,\n TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for NetHostConnectionSubtypeValues enum definition\n *\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = 'gprs';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = 'edge';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = 'umts';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = 'cdma';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = 'evdo_0';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = 'evdo_a';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = 'cdma2000_1xrtt';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = 'hsdpa';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = 'hsupa';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = 'hspa';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = 'iden';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = 'evdo_b';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE = 'lte';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = 'ehrpd';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = 'hspap';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM = 'gsm';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = 'td_scdma';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = 'iwlan';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR = 'nr';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = 'nrnsa';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = 'lte_ca';\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_GPRS.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_EDGE.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_UMTS.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_CDMA.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_EVDO_0.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_EVDO_A.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_CDMA2000_1XRTT.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_HSDPA.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_HSUPA.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_HSPA.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_IDEN.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_EVDO_B.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_LTE.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_LTE = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_EHRPD.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_HSPAP.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_GSM.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_GSM = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_TD_SCDMA.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_IWLAN.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_NR.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_NR = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_NRNSA.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_LTE_CA.\n */\nexports.NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA;\n/**\n * The constant map of values for NetHostConnectionSubtypeValues.\n * @deprecated Use the NETHOSTCONNECTIONSUBTYPEVALUES_XXXXX constants rather than the NetHostConnectionSubtypeValues.XXXXX for bundle minification.\n */\nexports.NetHostConnectionSubtypeValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for HttpFlavorValues enum definition\n *\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_HTTPFLAVORVALUES_HTTP_1_0 = '1.0';\nconst TMP_HTTPFLAVORVALUES_HTTP_1_1 = '1.1';\nconst TMP_HTTPFLAVORVALUES_HTTP_2_0 = '2.0';\nconst TMP_HTTPFLAVORVALUES_SPDY = 'SPDY';\nconst TMP_HTTPFLAVORVALUES_QUIC = 'QUIC';\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated Use HTTP_FLAVOR_VALUE_HTTP_1_0.\n */\nexports.HTTPFLAVORVALUES_HTTP_1_0 = TMP_HTTPFLAVORVALUES_HTTP_1_0;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated Use HTTP_FLAVOR_VALUE_HTTP_1_1.\n */\nexports.HTTPFLAVORVALUES_HTTP_1_1 = TMP_HTTPFLAVORVALUES_HTTP_1_1;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated Use HTTP_FLAVOR_VALUE_HTTP_2_0.\n */\nexports.HTTPFLAVORVALUES_HTTP_2_0 = TMP_HTTPFLAVORVALUES_HTTP_2_0;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated Use HTTP_FLAVOR_VALUE_SPDY.\n */\nexports.HTTPFLAVORVALUES_SPDY = TMP_HTTPFLAVORVALUES_SPDY;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated Use HTTP_FLAVOR_VALUE_QUIC.\n */\nexports.HTTPFLAVORVALUES_QUIC = TMP_HTTPFLAVORVALUES_QUIC;\n/**\n * The constant map of values for HttpFlavorValues.\n * @deprecated Use the HTTPFLAVORVALUES_XXXXX constants rather than the HttpFlavorValues.XXXXX for bundle minification.\n */\nexports.HttpFlavorValues = {\n HTTP_1_0: TMP_HTTPFLAVORVALUES_HTTP_1_0,\n HTTP_1_1: TMP_HTTPFLAVORVALUES_HTTP_1_1,\n HTTP_2_0: TMP_HTTPFLAVORVALUES_HTTP_2_0,\n SPDY: TMP_HTTPFLAVORVALUES_SPDY,\n QUIC: TMP_HTTPFLAVORVALUES_QUIC,\n};\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for MessagingDestinationKindValues enum definition\n *\n * The kind of message destination.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE = 'queue';\nconst TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC = 'topic';\n/**\n * The kind of message destination.\n *\n * @deprecated Use MESSAGING_DESTINATION_KIND_VALUE_QUEUE.\n */\nexports.MESSAGINGDESTINATIONKINDVALUES_QUEUE = TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE;\n/**\n * The kind of message destination.\n *\n * @deprecated Use MESSAGING_DESTINATION_KIND_VALUE_TOPIC.\n */\nexports.MESSAGINGDESTINATIONKINDVALUES_TOPIC = TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC;\n/**\n * The constant map of values for MessagingDestinationKindValues.\n * @deprecated Use the MESSAGINGDESTINATIONKINDVALUES_XXXXX constants rather than the MessagingDestinationKindValues.XXXXX for bundle minification.\n */\nexports.MessagingDestinationKindValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE,\n TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for MessagingOperationValues enum definition\n *\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_MESSAGINGOPERATIONVALUES_RECEIVE = 'receive';\nconst TMP_MESSAGINGOPERATIONVALUES_PROCESS = 'process';\n/**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n *\n * @deprecated Use MESSAGING_OPERATION_VALUE_RECEIVE.\n */\nexports.MESSAGINGOPERATIONVALUES_RECEIVE = TMP_MESSAGINGOPERATIONVALUES_RECEIVE;\n/**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n *\n * @deprecated Use MESSAGING_OPERATION_VALUE_PROCESS.\n */\nexports.MESSAGINGOPERATIONVALUES_PROCESS = TMP_MESSAGINGOPERATIONVALUES_PROCESS;\n/**\n * The constant map of values for MessagingOperationValues.\n * @deprecated Use the MESSAGINGOPERATIONVALUES_XXXXX constants rather than the MessagingOperationValues.XXXXX for bundle minification.\n */\nexports.MessagingOperationValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_MESSAGINGOPERATIONVALUES_RECEIVE,\n TMP_MESSAGINGOPERATIONVALUES_PROCESS,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for RpcGrpcStatusCodeValues enum definition\n *\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_RPCGRPCSTATUSCODEVALUES_OK = 0;\nconst TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED = 1;\nconst TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN = 2;\nconst TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = 3;\nconst TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = 4;\nconst TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND = 5;\nconst TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = 6;\nconst TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = 7;\nconst TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = 8;\nconst TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = 9;\nconst TMP_RPCGRPCSTATUSCODEVALUES_ABORTED = 10;\nconst TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = 11;\nconst TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = 12;\nconst TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL = 13;\nconst TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = 14;\nconst TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS = 15;\nconst TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = 16;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_OK.\n */\nexports.RPCGRPCSTATUSCODEVALUES_OK = TMP_RPCGRPCSTATUSCODEVALUES_OK;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_CANCELLED.\n */\nexports.RPCGRPCSTATUSCODEVALUES_CANCELLED = TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_UNKNOWN.\n */\nexports.RPCGRPCSTATUSCODEVALUES_UNKNOWN = TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_INVALID_ARGUMENT.\n */\nexports.RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_DEADLINE_EXCEEDED.\n */\nexports.RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_NOT_FOUND.\n */\nexports.RPCGRPCSTATUSCODEVALUES_NOT_FOUND = TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_ALREADY_EXISTS.\n */\nexports.RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_PERMISSION_DENIED.\n */\nexports.RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_RESOURCE_EXHAUSTED.\n */\nexports.RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_FAILED_PRECONDITION.\n */\nexports.RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_ABORTED.\n */\nexports.RPCGRPCSTATUSCODEVALUES_ABORTED = TMP_RPCGRPCSTATUSCODEVALUES_ABORTED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_OUT_OF_RANGE.\n */\nexports.RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_UNIMPLEMENTED.\n */\nexports.RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_INTERNAL.\n */\nexports.RPCGRPCSTATUSCODEVALUES_INTERNAL = TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_UNAVAILABLE.\n */\nexports.RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_DATA_LOSS.\n */\nexports.RPCGRPCSTATUSCODEVALUES_DATA_LOSS = TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_UNAUTHENTICATED.\n */\nexports.RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED;\n/**\n * The constant map of values for RpcGrpcStatusCodeValues.\n * @deprecated Use the RPCGRPCSTATUSCODEVALUES_XXXXX constants rather than the RpcGrpcStatusCodeValues.XXXXX for bundle minification.\n */\nexports.RpcGrpcStatusCodeValues = {\n OK: TMP_RPCGRPCSTATUSCODEVALUES_OK,\n CANCELLED: TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED,\n UNKNOWN: TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN,\n INVALID_ARGUMENT: TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT,\n DEADLINE_EXCEEDED: TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED,\n NOT_FOUND: TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND,\n ALREADY_EXISTS: TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS,\n PERMISSION_DENIED: TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED,\n RESOURCE_EXHAUSTED: TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED,\n FAILED_PRECONDITION: TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION,\n ABORTED: TMP_RPCGRPCSTATUSCODEVALUES_ABORTED,\n OUT_OF_RANGE: TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE,\n UNIMPLEMENTED: TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED,\n INTERNAL: TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL,\n UNAVAILABLE: TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE,\n DATA_LOSS: TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS,\n UNAUTHENTICATED: TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED,\n};\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for MessageTypeValues enum definition\n *\n * Whether this is a received or sent message.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_MESSAGETYPEVALUES_SENT = 'SENT';\nconst TMP_MESSAGETYPEVALUES_RECEIVED = 'RECEIVED';\n/**\n * Whether this is a received or sent message.\n *\n * @deprecated Use MESSAGE_TYPE_VALUE_SENT.\n */\nexports.MESSAGETYPEVALUES_SENT = TMP_MESSAGETYPEVALUES_SENT;\n/**\n * Whether this is a received or sent message.\n *\n * @deprecated Use MESSAGE_TYPE_VALUE_RECEIVED.\n */\nexports.MESSAGETYPEVALUES_RECEIVED = TMP_MESSAGETYPEVALUES_RECEIVED;\n/**\n * The constant map of values for MessageTypeValues.\n * @deprecated Use the MESSAGETYPEVALUES_XXXXX constants rather than the MessageTypeValues.XXXXX for bundle minification.\n */\nexports.MessageTypeValues = \n/*#__PURE__*/ (0, utils_1.createConstMap)([\n TMP_MESSAGETYPEVALUES_SENT,\n TMP_MESSAGETYPEVALUES_RECEIVED,\n]);\n//# sourceMappingURL=SemanticAttributes.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/* eslint-disable no-restricted-syntax --\n * These re-exports are only of constants, only one-level deep at this point,\n * and should not cause problems for tree-shakers.\n */\n__exportStar(require(\"./SemanticAttributes\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;\nconst core_1 = require(\"./core\");\nconst draft2020_1 = require(\"./vocabularies/draft2020\");\nconst discriminator_1 = require(\"./vocabularies/discriminator\");\nconst json_schema_2020_12_1 = require(\"./refs/json-schema-2020-12\");\nconst META_SCHEMA_ID = \"https://json-schema.org/draft/2020-12/schema\";\nclass Ajv2020 extends core_1.default {\n constructor(opts = {}) {\n super({\n ...opts,\n dynamicRef: true,\n next: true,\n unevaluated: true,\n });\n }\n _addVocabularies() {\n super._addVocabularies();\n draft2020_1.default.forEach((v) => this.addVocabulary(v));\n if (this.opts.discriminator)\n this.addKeyword(discriminator_1.default);\n }\n _addDefaultMetaSchema() {\n super._addDefaultMetaSchema();\n const { $data, meta } = this.opts;\n if (!meta)\n return;\n json_schema_2020_12_1.default.call(this, $data);\n this.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID;\n }\n defaultMeta() {\n return (this.opts.defaultMeta =\n super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));\n }\n}\nmodule.exports = exports = Ajv2020;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = Ajv2020;\nvar validate_1 = require(\"./compile/validate\");\nObject.defineProperty(exports, \"KeywordCxt\", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });\nvar codegen_1 = require(\"./compile/codegen\");\nObject.defineProperty(exports, \"_\", { enumerable: true, get: function () { return codegen_1._; } });\nObject.defineProperty(exports, \"str\", { enumerable: true, get: function () { return codegen_1.str; } });\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return codegen_1.stringify; } });\nObject.defineProperty(exports, \"nil\", { enumerable: true, get: function () { return codegen_1.nil; } });\nObject.defineProperty(exports, \"Name\", { enumerable: true, get: function () { return codegen_1.Name; } });\nObject.defineProperty(exports, \"CodeGen\", { enumerable: true, get: function () { return codegen_1.CodeGen; } });\n//# sourceMappingURL=2020.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;\nexports._ = _;\nexports.str = str;\nexports.addCodeArg = addCodeArg;\nexports.strConcat = strConcat;\nexports.stringify = stringify;\nexports.safeStringify = safeStringify;\nexports.getProperty = getProperty;\nexports.getEsmExportName = getEsmExportName;\nexports.regexpCode = regexpCode;\nclass _CodeOrName {\n}\nexports._CodeOrName = _CodeOrName;\nexports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;\nclass Name extends _CodeOrName {\n constructor(s) {\n super();\n if (!exports.IDENTIFIER.test(s))\n throw new Error(\"CodeGen: name must be a valid identifier\");\n this.str = s;\n }\n toString() {\n return this.str;\n }\n emptyStr() {\n return false;\n }\n get names() {\n return { [this.str]: 1 };\n }\n}\nexports.Name = Name;\nclass _Code extends _CodeOrName {\n constructor(code) {\n super();\n this._items = typeof code === \"string\" ? [code] : code;\n }\n toString() {\n return this.str;\n }\n emptyStr() {\n if (this._items.length > 1)\n return false;\n const item = this._items[0];\n return item === \"\" || item === '\"\"';\n }\n get str() {\n var _a;\n return ((_a = this._str) !== null && _a !== void 0 ? _a : (this._str = this._items.reduce((s, c) => `${s}${c}`, \"\")));\n }\n get names() {\n var _a;\n return ((_a = this._names) !== null && _a !== void 0 ? _a : (this._names = this._items.reduce((names, c) => {\n if (c instanceof Name)\n names[c.str] = (names[c.str] || 0) + 1;\n return names;\n }, {})));\n }\n}\nexports._Code = _Code;\nexports.nil = new _Code(\"\");\nfunction _(strs, ...args) {\n const code = [strs[0]];\n let i = 0;\n while (i < args.length) {\n addCodeArg(code, args[i]);\n code.push(strs[++i]);\n }\n return new _Code(code);\n}\nconst plus = new _Code(\"+\");\nfunction str(strs, ...args) {\n const expr = [safeStringify(strs[0])];\n let i = 0;\n while (i < args.length) {\n expr.push(plus);\n addCodeArg(expr, args[i]);\n expr.push(plus, safeStringify(strs[++i]));\n }\n optimize(expr);\n return new _Code(expr);\n}\nfunction addCodeArg(code, arg) {\n if (arg instanceof _Code)\n code.push(...arg._items);\n else if (arg instanceof Name)\n code.push(arg);\n else\n code.push(interpolate(arg));\n}\nfunction optimize(expr) {\n let i = 1;\n while (i < expr.length - 1) {\n if (expr[i] === plus) {\n const res = mergeExprItems(expr[i - 1], expr[i + 1]);\n if (res !== undefined) {\n expr.splice(i - 1, 3, res);\n continue;\n }\n expr[i++] = \"+\";\n }\n i++;\n }\n}\nfunction mergeExprItems(a, b) {\n if (b === '\"\"')\n return a;\n if (a === '\"\"')\n return b;\n if (typeof a == \"string\") {\n if (b instanceof Name || a[a.length - 1] !== '\"')\n return;\n if (typeof b != \"string\")\n return `${a.slice(0, -1)}${b}\"`;\n if (b[0] === '\"')\n return a.slice(0, -1) + b.slice(1);\n return;\n }\n if (typeof b == \"string\" && b[0] === '\"' && !(a instanceof Name))\n return `\"${a}${b.slice(1)}`;\n return;\n}\nfunction strConcat(c1, c2) {\n return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str `${c1}${c2}`;\n}\n// TODO do not allow arrays here\nfunction interpolate(x) {\n return typeof x == \"number\" || typeof x == \"boolean\" || x === null\n ? x\n : safeStringify(Array.isArray(x) ? x.join(\",\") : x);\n}\nfunction stringify(x) {\n return new _Code(safeStringify(x));\n}\nfunction safeStringify(x) {\n return JSON.stringify(x)\n .replace(/\\u2028/g, \"\\\\u2028\")\n .replace(/\\u2029/g, \"\\\\u2029\");\n}\nfunction getProperty(key) {\n return typeof key == \"string\" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`;\n}\n//Does best effort to format the name properly\nfunction getEsmExportName(key) {\n if (typeof key == \"string\" && exports.IDENTIFIER.test(key)) {\n return new _Code(`${key}`);\n }\n throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);\n}\nfunction regexpCode(rx) {\n return new _Code(rx.toString());\n}\n//# sourceMappingURL=code.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;\nexports.not = not;\nexports.and = and;\nexports.or = or;\nconst code_1 = require(\"./code\");\nconst scope_1 = require(\"./scope\");\nvar code_2 = require(\"./code\");\nObject.defineProperty(exports, \"_\", { enumerable: true, get: function () { return code_2._; } });\nObject.defineProperty(exports, \"str\", { enumerable: true, get: function () { return code_2.str; } });\nObject.defineProperty(exports, \"strConcat\", { enumerable: true, get: function () { return code_2.strConcat; } });\nObject.defineProperty(exports, \"nil\", { enumerable: true, get: function () { return code_2.nil; } });\nObject.defineProperty(exports, \"getProperty\", { enumerable: true, get: function () { return code_2.getProperty; } });\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return code_2.stringify; } });\nObject.defineProperty(exports, \"regexpCode\", { enumerable: true, get: function () { return code_2.regexpCode; } });\nObject.defineProperty(exports, \"Name\", { enumerable: true, get: function () { return code_2.Name; } });\nvar scope_2 = require(\"./scope\");\nObject.defineProperty(exports, \"Scope\", { enumerable: true, get: function () { return scope_2.Scope; } });\nObject.defineProperty(exports, \"ValueScope\", { enumerable: true, get: function () { return scope_2.ValueScope; } });\nObject.defineProperty(exports, \"ValueScopeName\", { enumerable: true, get: function () { return scope_2.ValueScopeName; } });\nObject.defineProperty(exports, \"varKinds\", { enumerable: true, get: function () { return scope_2.varKinds; } });\nexports.operators = {\n GT: new code_1._Code(\">\"),\n GTE: new code_1._Code(\">=\"),\n LT: new code_1._Code(\"<\"),\n LTE: new code_1._Code(\"<=\"),\n EQ: new code_1._Code(\"===\"),\n NEQ: new code_1._Code(\"!==\"),\n NOT: new code_1._Code(\"!\"),\n OR: new code_1._Code(\"||\"),\n AND: new code_1._Code(\"&&\"),\n ADD: new code_1._Code(\"+\"),\n};\nclass Node {\n optimizeNodes() {\n return this;\n }\n optimizeNames(_names, _constants) {\n return this;\n }\n}\nclass Def extends Node {\n constructor(varKind, name, rhs) {\n super();\n this.varKind = varKind;\n this.name = name;\n this.rhs = rhs;\n }\n render({ es5, _n }) {\n const varKind = es5 ? scope_1.varKinds.var : this.varKind;\n const rhs = this.rhs === undefined ? \"\" : ` = ${this.rhs}`;\n return `${varKind} ${this.name}${rhs};` + _n;\n }\n optimizeNames(names, constants) {\n if (!names[this.name.str])\n return;\n if (this.rhs)\n this.rhs = optimizeExpr(this.rhs, names, constants);\n return this;\n }\n get names() {\n return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};\n }\n}\nclass Assign extends Node {\n constructor(lhs, rhs, sideEffects) {\n super();\n this.lhs = lhs;\n this.rhs = rhs;\n this.sideEffects = sideEffects;\n }\n render({ _n }) {\n return `${this.lhs} = ${this.rhs};` + _n;\n }\n optimizeNames(names, constants) {\n if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects)\n return;\n this.rhs = optimizeExpr(this.rhs, names, constants);\n return this;\n }\n get names() {\n const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names };\n return addExprNames(names, this.rhs);\n }\n}\nclass AssignOp extends Assign {\n constructor(lhs, op, rhs, sideEffects) {\n super(lhs, rhs, sideEffects);\n this.op = op;\n }\n render({ _n }) {\n return `${this.lhs} ${this.op}= ${this.rhs};` + _n;\n }\n}\nclass Label extends Node {\n constructor(label) {\n super();\n this.label = label;\n this.names = {};\n }\n render({ _n }) {\n return `${this.label}:` + _n;\n }\n}\nclass Break extends Node {\n constructor(label) {\n super();\n this.label = label;\n this.names = {};\n }\n render({ _n }) {\n const label = this.label ? ` ${this.label}` : \"\";\n return `break${label};` + _n;\n }\n}\nclass Throw extends Node {\n constructor(error) {\n super();\n this.error = error;\n }\n render({ _n }) {\n return `throw ${this.error};` + _n;\n }\n get names() {\n return this.error.names;\n }\n}\nclass AnyCode extends Node {\n constructor(code) {\n super();\n this.code = code;\n }\n render({ _n }) {\n return `${this.code};` + _n;\n }\n optimizeNodes() {\n return `${this.code}` ? this : undefined;\n }\n optimizeNames(names, constants) {\n this.code = optimizeExpr(this.code, names, constants);\n return this;\n }\n get names() {\n return this.code instanceof code_1._CodeOrName ? this.code.names : {};\n }\n}\nclass ParentNode extends Node {\n constructor(nodes = []) {\n super();\n this.nodes = nodes;\n }\n render(opts) {\n return this.nodes.reduce((code, n) => code + n.render(opts), \"\");\n }\n optimizeNodes() {\n const { nodes } = this;\n let i = nodes.length;\n while (i--) {\n const n = nodes[i].optimizeNodes();\n if (Array.isArray(n))\n nodes.splice(i, 1, ...n);\n else if (n)\n nodes[i] = n;\n else\n nodes.splice(i, 1);\n }\n return nodes.length > 0 ? this : undefined;\n }\n optimizeNames(names, constants) {\n const { nodes } = this;\n let i = nodes.length;\n while (i--) {\n // iterating backwards improves 1-pass optimization\n const n = nodes[i];\n if (n.optimizeNames(names, constants))\n continue;\n subtractNames(names, n.names);\n nodes.splice(i, 1);\n }\n return nodes.length > 0 ? this : undefined;\n }\n get names() {\n return this.nodes.reduce((names, n) => addNames(names, n.names), {});\n }\n}\nclass BlockNode extends ParentNode {\n render(opts) {\n return \"{\" + opts._n + super.render(opts) + \"}\" + opts._n;\n }\n}\nclass Root extends ParentNode {\n}\nclass Else extends BlockNode {\n}\nElse.kind = \"else\";\nclass If extends BlockNode {\n constructor(condition, nodes) {\n super(nodes);\n this.condition = condition;\n }\n render(opts) {\n let code = `if(${this.condition})` + super.render(opts);\n if (this.else)\n code += \"else \" + this.else.render(opts);\n return code;\n }\n optimizeNodes() {\n super.optimizeNodes();\n const cond = this.condition;\n if (cond === true)\n return this.nodes; // else is ignored here\n let e = this.else;\n if (e) {\n const ns = e.optimizeNodes();\n e = this.else = Array.isArray(ns) ? new Else(ns) : ns;\n }\n if (e) {\n if (cond === false)\n return e instanceof If ? e : e.nodes;\n if (this.nodes.length)\n return this;\n return new If(not(cond), e instanceof If ? [e] : e.nodes);\n }\n if (cond === false || !this.nodes.length)\n return undefined;\n return this;\n }\n optimizeNames(names, constants) {\n var _a;\n this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);\n if (!(super.optimizeNames(names, constants) || this.else))\n return;\n this.condition = optimizeExpr(this.condition, names, constants);\n return this;\n }\n get names() {\n const names = super.names;\n addExprNames(names, this.condition);\n if (this.else)\n addNames(names, this.else.names);\n return names;\n }\n}\nIf.kind = \"if\";\nclass For extends BlockNode {\n}\nFor.kind = \"for\";\nclass ForLoop extends For {\n constructor(iteration) {\n super();\n this.iteration = iteration;\n }\n render(opts) {\n return `for(${this.iteration})` + super.render(opts);\n }\n optimizeNames(names, constants) {\n if (!super.optimizeNames(names, constants))\n return;\n this.iteration = optimizeExpr(this.iteration, names, constants);\n return this;\n }\n get names() {\n return addNames(super.names, this.iteration.names);\n }\n}\nclass ForRange extends For {\n constructor(varKind, name, from, to) {\n super();\n this.varKind = varKind;\n this.name = name;\n this.from = from;\n this.to = to;\n }\n render(opts) {\n const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;\n const { name, from, to } = this;\n return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts);\n }\n get names() {\n const names = addExprNames(super.names, this.from);\n return addExprNames(names, this.to);\n }\n}\nclass ForIter extends For {\n constructor(loop, varKind, name, iterable) {\n super();\n this.loop = loop;\n this.varKind = varKind;\n this.name = name;\n this.iterable = iterable;\n }\n render(opts) {\n return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);\n }\n optimizeNames(names, constants) {\n if (!super.optimizeNames(names, constants))\n return;\n this.iterable = optimizeExpr(this.iterable, names, constants);\n return this;\n }\n get names() {\n return addNames(super.names, this.iterable.names);\n }\n}\nclass Func extends BlockNode {\n constructor(name, args, async) {\n super();\n this.name = name;\n this.args = args;\n this.async = async;\n }\n render(opts) {\n const _async = this.async ? \"async \" : \"\";\n return `${_async}function ${this.name}(${this.args})` + super.render(opts);\n }\n}\nFunc.kind = \"func\";\nclass Return extends ParentNode {\n render(opts) {\n return \"return \" + super.render(opts);\n }\n}\nReturn.kind = \"return\";\nclass Try extends BlockNode {\n render(opts) {\n let code = \"try\" + super.render(opts);\n if (this.catch)\n code += this.catch.render(opts);\n if (this.finally)\n code += this.finally.render(opts);\n return code;\n }\n optimizeNodes() {\n var _a, _b;\n super.optimizeNodes();\n (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes();\n (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();\n return this;\n }\n optimizeNames(names, constants) {\n var _a, _b;\n super.optimizeNames(names, constants);\n (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);\n (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);\n return this;\n }\n get names() {\n const names = super.names;\n if (this.catch)\n addNames(names, this.catch.names);\n if (this.finally)\n addNames(names, this.finally.names);\n return names;\n }\n}\nclass Catch extends BlockNode {\n constructor(error) {\n super();\n this.error = error;\n }\n render(opts) {\n return `catch(${this.error})` + super.render(opts);\n }\n}\nCatch.kind = \"catch\";\nclass Finally extends BlockNode {\n render(opts) {\n return \"finally\" + super.render(opts);\n }\n}\nFinally.kind = \"finally\";\nclass CodeGen {\n constructor(extScope, opts = {}) {\n this._values = {};\n this._blockStarts = [];\n this._constants = {};\n this.opts = { ...opts, _n: opts.lines ? \"\\n\" : \"\" };\n this._extScope = extScope;\n this._scope = new scope_1.Scope({ parent: extScope });\n this._nodes = [new Root()];\n }\n toString() {\n return this._root.render(this.opts);\n }\n // returns unique name in the internal scope\n name(prefix) {\n return this._scope.name(prefix);\n }\n // reserves unique name in the external scope\n scopeName(prefix) {\n return this._extScope.name(prefix);\n }\n // reserves unique name in the external scope and assigns value to it\n scopeValue(prefixOrName, value) {\n const name = this._extScope.value(prefixOrName, value);\n const vs = this._values[name.prefix] || (this._values[name.prefix] = new Set());\n vs.add(name);\n return name;\n }\n getScopeValue(prefix, keyOrRef) {\n return this._extScope.getValue(prefix, keyOrRef);\n }\n // return code that assigns values in the external scope to the names that are used internally\n // (same names that were returned by gen.scopeName or gen.scopeValue)\n scopeRefs(scopeName) {\n return this._extScope.scopeRefs(scopeName, this._values);\n }\n scopeCode() {\n return this._extScope.scopeCode(this._values);\n }\n _def(varKind, nameOrPrefix, rhs, constant) {\n const name = this._scope.toName(nameOrPrefix);\n if (rhs !== undefined && constant)\n this._constants[name.str] = rhs;\n this._leafNode(new Def(varKind, name, rhs));\n return name;\n }\n // `const` declaration (`var` in es5 mode)\n const(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);\n }\n // `let` declaration with optional assignment (`var` in es5 mode)\n let(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant);\n }\n // `var` declaration with optional assignment\n var(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant);\n }\n // assignment code\n assign(lhs, rhs, sideEffects) {\n return this._leafNode(new Assign(lhs, rhs, sideEffects));\n }\n // `+=` code\n add(lhs, rhs) {\n return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs));\n }\n // appends passed SafeExpr to code or executes Block\n code(c) {\n if (typeof c == \"function\")\n c();\n else if (c !== code_1.nil)\n this._leafNode(new AnyCode(c));\n return this;\n }\n // returns code for object literal for the passed argument list of key-value pairs\n object(...keyValues) {\n const code = [\"{\"];\n for (const [key, value] of keyValues) {\n if (code.length > 1)\n code.push(\",\");\n code.push(key);\n if (key !== value || this.opts.es5) {\n code.push(\":\");\n (0, code_1.addCodeArg)(code, value);\n }\n }\n code.push(\"}\");\n return new code_1._Code(code);\n }\n // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)\n if(condition, thenBody, elseBody) {\n this._blockNode(new If(condition));\n if (thenBody && elseBody) {\n this.code(thenBody).else().code(elseBody).endIf();\n }\n else if (thenBody) {\n this.code(thenBody).endIf();\n }\n else if (elseBody) {\n throw new Error('CodeGen: \"else\" body without \"then\" body');\n }\n return this;\n }\n // `else if` clause - invalid without `if` or after `else` clauses\n elseIf(condition) {\n return this._elseNode(new If(condition));\n }\n // `else` clause - only valid after `if` or `else if` clauses\n else() {\n return this._elseNode(new Else());\n }\n // end `if` statement (needed if gen.if was used only with condition)\n endIf() {\n return this._endBlockNode(If, Else);\n }\n _for(node, forBody) {\n this._blockNode(node);\n if (forBody)\n this.code(forBody).endFor();\n return this;\n }\n // a generic `for` clause (or statement if `forBody` is passed)\n for(iteration, forBody) {\n return this._for(new ForLoop(iteration), forBody);\n }\n // `for` statement for a range of values\n forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {\n const name = this._scope.toName(nameOrPrefix);\n return this._for(new ForRange(varKind, name, from, to), () => forBody(name));\n }\n // `for-of` statement (in es5 mode replace with a normal for loop)\n forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {\n const name = this._scope.toName(nameOrPrefix);\n if (this.opts.es5) {\n const arr = iterable instanceof code_1.Name ? iterable : this.var(\"_arr\", iterable);\n return this.forRange(\"_i\", 0, (0, code_1._) `${arr}.length`, (i) => {\n this.var(name, (0, code_1._) `${arr}[${i}]`);\n forBody(name);\n });\n }\n return this._for(new ForIter(\"of\", varKind, name, iterable), () => forBody(name));\n }\n // `for-in` statement.\n // With option `ownProperties` replaced with a `for-of` loop for object keys\n forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {\n if (this.opts.ownProperties) {\n return this.forOf(nameOrPrefix, (0, code_1._) `Object.keys(${obj})`, forBody);\n }\n const name = this._scope.toName(nameOrPrefix);\n return this._for(new ForIter(\"in\", varKind, name, obj), () => forBody(name));\n }\n // end `for` loop\n endFor() {\n return this._endBlockNode(For);\n }\n // `label` statement\n label(label) {\n return this._leafNode(new Label(label));\n }\n // `break` statement\n break(label) {\n return this._leafNode(new Break(label));\n }\n // `return` statement\n return(value) {\n const node = new Return();\n this._blockNode(node);\n this.code(value);\n if (node.nodes.length !== 1)\n throw new Error('CodeGen: \"return\" should have one node');\n return this._endBlockNode(Return);\n }\n // `try` statement\n try(tryBody, catchCode, finallyCode) {\n if (!catchCode && !finallyCode)\n throw new Error('CodeGen: \"try\" without \"catch\" and \"finally\"');\n const node = new Try();\n this._blockNode(node);\n this.code(tryBody);\n if (catchCode) {\n const error = this.name(\"e\");\n this._currNode = node.catch = new Catch(error);\n catchCode(error);\n }\n if (finallyCode) {\n this._currNode = node.finally = new Finally();\n this.code(finallyCode);\n }\n return this._endBlockNode(Catch, Finally);\n }\n // `throw` statement\n throw(error) {\n return this._leafNode(new Throw(error));\n }\n // start self-balancing block\n block(body, nodeCount) {\n this._blockStarts.push(this._nodes.length);\n if (body)\n this.code(body).endBlock(nodeCount);\n return this;\n }\n // end the current self-balancing block\n endBlock(nodeCount) {\n const len = this._blockStarts.pop();\n if (len === undefined)\n throw new Error(\"CodeGen: not in self-balancing block\");\n const toClose = this._nodes.length - len;\n if (toClose < 0 || (nodeCount !== undefined && toClose !== nodeCount)) {\n throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);\n }\n this._nodes.length = len;\n return this;\n }\n // `function` heading (or definition if funcBody is passed)\n func(name, args = code_1.nil, async, funcBody) {\n this._blockNode(new Func(name, args, async));\n if (funcBody)\n this.code(funcBody).endFunc();\n return this;\n }\n // end function definition\n endFunc() {\n return this._endBlockNode(Func);\n }\n optimize(n = 1) {\n while (n-- > 0) {\n this._root.optimizeNodes();\n this._root.optimizeNames(this._root.names, this._constants);\n }\n }\n _leafNode(node) {\n this._currNode.nodes.push(node);\n return this;\n }\n _blockNode(node) {\n this._currNode.nodes.push(node);\n this._nodes.push(node);\n }\n _endBlockNode(N1, N2) {\n const n = this._currNode;\n if (n instanceof N1 || (N2 && n instanceof N2)) {\n this._nodes.pop();\n return this;\n }\n throw new Error(`CodeGen: not in block \"${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}\"`);\n }\n _elseNode(node) {\n const n = this._currNode;\n if (!(n instanceof If)) {\n throw new Error('CodeGen: \"else\" without \"if\"');\n }\n this._currNode = n.else = node;\n return this;\n }\n get _root() {\n return this._nodes[0];\n }\n get _currNode() {\n const ns = this._nodes;\n return ns[ns.length - 1];\n }\n set _currNode(node) {\n const ns = this._nodes;\n ns[ns.length - 1] = node;\n }\n}\nexports.CodeGen = CodeGen;\nfunction addNames(names, from) {\n for (const n in from)\n names[n] = (names[n] || 0) + (from[n] || 0);\n return names;\n}\nfunction addExprNames(names, from) {\n return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;\n}\nfunction optimizeExpr(expr, names, constants) {\n if (expr instanceof code_1.Name)\n return replaceName(expr);\n if (!canOptimize(expr))\n return expr;\n return new code_1._Code(expr._items.reduce((items, c) => {\n if (c instanceof code_1.Name)\n c = replaceName(c);\n if (c instanceof code_1._Code)\n items.push(...c._items);\n else\n items.push(c);\n return items;\n }, []));\n function replaceName(n) {\n const c = constants[n.str];\n if (c === undefined || names[n.str] !== 1)\n return n;\n delete names[n.str];\n return c;\n }\n function canOptimize(e) {\n return (e instanceof code_1._Code &&\n e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== undefined));\n }\n}\nfunction subtractNames(names, from) {\n for (const n in from)\n names[n] = (names[n] || 0) - (from[n] || 0);\n}\nfunction not(x) {\n return typeof x == \"boolean\" || typeof x == \"number\" || x === null ? !x : (0, code_1._) `!${par(x)}`;\n}\nconst andCode = mappend(exports.operators.AND);\n// boolean AND (&&) expression with the passed arguments\nfunction and(...args) {\n return args.reduce(andCode);\n}\nconst orCode = mappend(exports.operators.OR);\n// boolean OR (||) expression with the passed arguments\nfunction or(...args) {\n return args.reduce(orCode);\n}\nfunction mappend(op) {\n return (x, y) => (x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._) `${par(x)} ${op} ${par(y)}`);\n}\nfunction par(x) {\n return x instanceof code_1.Name ? x : (0, code_1._) `(${x})`;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;\nconst code_1 = require(\"./code\");\nclass ValueError extends Error {\n constructor(name) {\n super(`CodeGen: \"code\" for ${name} not defined`);\n this.value = name.value;\n }\n}\nvar UsedValueState;\n(function (UsedValueState) {\n UsedValueState[UsedValueState[\"Started\"] = 0] = \"Started\";\n UsedValueState[UsedValueState[\"Completed\"] = 1] = \"Completed\";\n})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));\nexports.varKinds = {\n const: new code_1.Name(\"const\"),\n let: new code_1.Name(\"let\"),\n var: new code_1.Name(\"var\"),\n};\nclass Scope {\n constructor({ prefixes, parent } = {}) {\n this._names = {};\n this._prefixes = prefixes;\n this._parent = parent;\n }\n toName(nameOrPrefix) {\n return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix);\n }\n name(prefix) {\n return new code_1.Name(this._newName(prefix));\n }\n _newName(prefix) {\n const ng = this._names[prefix] || this._nameGroup(prefix);\n return `${prefix}${ng.index++}`;\n }\n _nameGroup(prefix) {\n var _a, _b;\n if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || (this._prefixes && !this._prefixes.has(prefix))) {\n throw new Error(`CodeGen: prefix \"${prefix}\" is not allowed in this scope`);\n }\n return (this._names[prefix] = { prefix, index: 0 });\n }\n}\nexports.Scope = Scope;\nclass ValueScopeName extends code_1.Name {\n constructor(prefix, nameStr) {\n super(nameStr);\n this.prefix = prefix;\n }\n setValue(value, { property, itemIndex }) {\n this.value = value;\n this.scopePath = (0, code_1._) `.${new code_1.Name(property)}[${itemIndex}]`;\n }\n}\nexports.ValueScopeName = ValueScopeName;\nconst line = (0, code_1._) `\\n`;\nclass ValueScope extends Scope {\n constructor(opts) {\n super(opts);\n this._values = {};\n this._scope = opts.scope;\n this.opts = { ...opts, _n: opts.lines ? line : code_1.nil };\n }\n get() {\n return this._scope;\n }\n name(prefix) {\n return new ValueScopeName(prefix, this._newName(prefix));\n }\n value(nameOrPrefix, value) {\n var _a;\n if (value.ref === undefined)\n throw new Error(\"CodeGen: ref must be passed in value\");\n const name = this.toName(nameOrPrefix);\n const { prefix } = name;\n const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref;\n let vs = this._values[prefix];\n if (vs) {\n const _name = vs.get(valueKey);\n if (_name)\n return _name;\n }\n else {\n vs = this._values[prefix] = new Map();\n }\n vs.set(valueKey, name);\n const s = this._scope[prefix] || (this._scope[prefix] = []);\n const itemIndex = s.length;\n s[itemIndex] = value.ref;\n name.setValue(value, { property: prefix, itemIndex });\n return name;\n }\n getValue(prefix, keyOrRef) {\n const vs = this._values[prefix];\n if (!vs)\n return;\n return vs.get(keyOrRef);\n }\n scopeRefs(scopeName, values = this._values) {\n return this._reduceValues(values, (name) => {\n if (name.scopePath === undefined)\n throw new Error(`CodeGen: name \"${name}\" has no value`);\n return (0, code_1._) `${scopeName}${name.scopePath}`;\n });\n }\n scopeCode(values = this._values, usedValues, getCode) {\n return this._reduceValues(values, (name) => {\n if (name.value === undefined)\n throw new Error(`CodeGen: name \"${name}\" has no value`);\n return name.value.code;\n }, usedValues, getCode);\n }\n _reduceValues(values, valueCode, usedValues = {}, getCode) {\n let code = code_1.nil;\n for (const prefix in values) {\n const vs = values[prefix];\n if (!vs)\n continue;\n const nameSet = (usedValues[prefix] = usedValues[prefix] || new Map());\n vs.forEach((name) => {\n if (nameSet.has(name))\n return;\n nameSet.set(name, UsedValueState.Started);\n let c = valueCode(name);\n if (c) {\n const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const;\n code = (0, code_1._) `${code}${def} ${name} = ${c};${this.opts._n}`;\n }\n else if ((c = getCode === null || getCode === void 0 ? void 0 : getCode(name))) {\n code = (0, code_1._) `${code}${c}${this.opts._n}`;\n }\n else {\n throw new ValueError(name);\n }\n nameSet.set(name, UsedValueState.Completed);\n });\n }\n return code;\n }\n}\nexports.ValueScope = ValueScope;\n//# sourceMappingURL=scope.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.keyword$DataError = exports.keywordError = void 0;\nexports.reportError = reportError;\nexports.reportExtraError = reportExtraError;\nexports.resetErrorsCount = resetErrorsCount;\nexports.extendErrors = extendErrors;\nconst codegen_1 = require(\"./codegen\");\nconst util_1 = require(\"./util\");\nconst names_1 = require(\"./names\");\nexports.keywordError = {\n message: ({ keyword }) => (0, codegen_1.str) `must pass \"${keyword}\" keyword validation`,\n};\nexports.keyword$DataError = {\n message: ({ keyword, schemaType }) => schemaType\n ? (0, codegen_1.str) `\"${keyword}\" keyword must be ${schemaType} ($data)`\n : (0, codegen_1.str) `\"${keyword}\" keyword is invalid ($data)`,\n};\nfunction reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) {\n const { it } = cxt;\n const { gen, compositeRule, allErrors } = it;\n const errObj = errorObjectCode(cxt, error, errorPaths);\n if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : (compositeRule || allErrors)) {\n addError(gen, errObj);\n }\n else {\n returnErrors(it, (0, codegen_1._) `[${errObj}]`);\n }\n}\nfunction reportExtraError(cxt, error = exports.keywordError, errorPaths) {\n const { it } = cxt;\n const { gen, compositeRule, allErrors } = it;\n const errObj = errorObjectCode(cxt, error, errorPaths);\n addError(gen, errObj);\n if (!(compositeRule || allErrors)) {\n returnErrors(it, names_1.default.vErrors);\n }\n}\nfunction resetErrorsCount(gen, errsCount) {\n gen.assign(names_1.default.errors, errsCount);\n gen.if((0, codegen_1._) `${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._) `${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));\n}\nfunction extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }) {\n /* istanbul ignore if */\n if (errsCount === undefined)\n throw new Error(\"ajv implementation error\");\n const err = gen.name(\"err\");\n gen.forRange(\"i\", errsCount, names_1.default.errors, (i) => {\n gen.const(err, (0, codegen_1._) `${names_1.default.vErrors}[${i}]`);\n gen.if((0, codegen_1._) `${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._) `${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));\n gen.assign((0, codegen_1._) `${err}.schemaPath`, (0, codegen_1.str) `${it.errSchemaPath}/${keyword}`);\n if (it.opts.verbose) {\n gen.assign((0, codegen_1._) `${err}.schema`, schemaValue);\n gen.assign((0, codegen_1._) `${err}.data`, data);\n }\n });\n}\nfunction addError(gen, errObj) {\n const err = gen.const(\"err\", errObj);\n gen.if((0, codegen_1._) `${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._) `[${err}]`), (0, codegen_1._) `${names_1.default.vErrors}.push(${err})`);\n gen.code((0, codegen_1._) `${names_1.default.errors}++`);\n}\nfunction returnErrors(it, errs) {\n const { gen, validateName, schemaEnv } = it;\n if (schemaEnv.$async) {\n gen.throw((0, codegen_1._) `new ${it.ValidationError}(${errs})`);\n }\n else {\n gen.assign((0, codegen_1._) `${validateName}.errors`, errs);\n gen.return(false);\n }\n}\nconst E = {\n keyword: new codegen_1.Name(\"keyword\"),\n schemaPath: new codegen_1.Name(\"schemaPath\"), // also used in JTD errors\n params: new codegen_1.Name(\"params\"),\n propertyName: new codegen_1.Name(\"propertyName\"),\n message: new codegen_1.Name(\"message\"),\n schema: new codegen_1.Name(\"schema\"),\n parentSchema: new codegen_1.Name(\"parentSchema\"),\n};\nfunction errorObjectCode(cxt, error, errorPaths) {\n const { createErrors } = cxt.it;\n if (createErrors === false)\n return (0, codegen_1._) `{}`;\n return errorObject(cxt, error, errorPaths);\n}\nfunction errorObject(cxt, error, errorPaths = {}) {\n const { gen, it } = cxt;\n const keyValues = [\n errorInstancePath(it, errorPaths),\n errorSchemaPath(cxt, errorPaths),\n ];\n extraErrorProps(cxt, error, keyValues);\n return gen.object(...keyValues);\n}\nfunction errorInstancePath({ errorPath }, { instancePath }) {\n const instPath = instancePath\n ? (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}`\n : errorPath;\n return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)];\n}\nfunction errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) {\n let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str) `${errSchemaPath}/${keyword}`;\n if (schemaPath) {\n schPath = (0, codegen_1.str) `${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;\n }\n return [E.schemaPath, schPath];\n}\nfunction extraErrorProps(cxt, { params, message }, keyValues) {\n const { keyword, data, schemaValue, it } = cxt;\n const { opts, propertyName, topSchemaRef, schemaPath } = it;\n keyValues.push([E.keyword, keyword], [E.params, typeof params == \"function\" ? params(cxt) : params || (0, codegen_1._) `{}`]);\n if (opts.messages) {\n keyValues.push([E.message, typeof message == \"function\" ? message(cxt) : message]);\n }\n if (opts.verbose) {\n keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._) `${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);\n }\n if (propertyName)\n keyValues.push([E.propertyName, propertyName]);\n}\n//# sourceMappingURL=errors.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SchemaEnv = void 0;\nexports.compileSchema = compileSchema;\nexports.resolveRef = resolveRef;\nexports.getCompilingSchema = getCompilingSchema;\nexports.resolveSchema = resolveSchema;\nconst codegen_1 = require(\"./codegen\");\nconst validation_error_1 = require(\"../runtime/validation_error\");\nconst names_1 = require(\"./names\");\nconst resolve_1 = require(\"./resolve\");\nconst util_1 = require(\"./util\");\nconst validate_1 = require(\"./validate\");\nclass SchemaEnv {\n constructor(env) {\n var _a;\n this.refs = {};\n this.dynamicAnchors = {};\n let schema;\n if (typeof env.schema == \"object\")\n schema = env.schema;\n this.schema = env.schema;\n this.schemaId = env.schemaId;\n this.root = env.root || this;\n this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || \"$id\"]);\n this.schemaPath = env.schemaPath;\n this.localRefs = env.localRefs;\n this.meta = env.meta;\n this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;\n this.refs = {};\n }\n}\nexports.SchemaEnv = SchemaEnv;\n// let codeSize = 0\n// let nodeCount = 0\n// Compiles schema in SchemaEnv\nfunction compileSchema(sch) {\n // TODO refactor - remove compilations\n const _sch = getCompilingSchema.call(this, sch);\n if (_sch)\n return _sch;\n const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); // TODO if getFullPath removed 1 tests fails\n const { es5, lines } = this.opts.code;\n const { ownProperties } = this.opts;\n const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });\n let _ValidationError;\n if (sch.$async) {\n _ValidationError = gen.scopeValue(\"Error\", {\n ref: validation_error_1.default,\n code: (0, codegen_1._) `require(\"ajv/dist/runtime/validation_error\").default`,\n });\n }\n const validateName = gen.scopeName(\"validate\");\n sch.validateName = validateName;\n const schemaCxt = {\n gen,\n allErrors: this.opts.allErrors,\n data: names_1.default.data,\n parentData: names_1.default.parentData,\n parentDataProperty: names_1.default.parentDataProperty,\n dataNames: [names_1.default.data],\n dataPathArr: [codegen_1.nil], // TODO can its length be used as dataLevel if nil is removed?\n dataLevel: 0,\n dataTypes: [],\n definedProperties: new Set(),\n topSchemaRef: gen.scopeValue(\"schema\", this.opts.code.source === true\n ? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) }\n : { ref: sch.schema }),\n validateName,\n ValidationError: _ValidationError,\n schema: sch.schema,\n schemaEnv: sch,\n rootId,\n baseId: sch.baseId || rootId,\n schemaPath: codegen_1.nil,\n errSchemaPath: sch.schemaPath || (this.opts.jtd ? \"\" : \"#\"),\n errorPath: (0, codegen_1._) `\"\"`,\n opts: this.opts,\n self: this,\n };\n let sourceCode;\n try {\n this._compilations.add(sch);\n (0, validate_1.validateFunctionCode)(schemaCxt);\n gen.optimize(this.opts.code.optimize);\n // gen.optimize(1)\n const validateCode = gen.toString();\n sourceCode = `const visitedNodesForRef = new WeakMap(); ${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;\n // console.log((codeSize += sourceCode.length), (nodeCount += gen.nodeCount))\n if (this.opts.code.process)\n sourceCode = this.opts.code.process(sourceCode, sch);\n // console.log(\"\\n\\n\\n *** \\n\", sourceCode)\n const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);\n const validate = makeValidate(this, this.scope.get());\n this.scope.value(validateName, { ref: validate });\n validate.errors = null;\n validate.schema = sch.schema;\n validate.schemaEnv = sch;\n if (sch.$async)\n validate.$async = true;\n if (this.opts.code.source === true) {\n validate.source = { validateName, validateCode, scopeValues: gen._values };\n }\n if (this.opts.unevaluated) {\n const { props, items } = schemaCxt;\n validate.evaluated = {\n props: props instanceof codegen_1.Name ? undefined : props,\n items: items instanceof codegen_1.Name ? undefined : items,\n dynamicProps: props instanceof codegen_1.Name,\n dynamicItems: items instanceof codegen_1.Name,\n };\n if (validate.source)\n validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);\n }\n sch.validate = validate;\n return sch;\n }\n catch (e) {\n delete sch.validate;\n delete sch.validateName;\n if (sourceCode)\n this.logger.error(\"Error compiling schema, function code:\", sourceCode);\n // console.log(\"\\n\\n\\n *** \\n\", sourceCode, this.opts)\n throw e;\n }\n finally {\n this._compilations.delete(sch);\n }\n}\nfunction resolveRef(root, baseId, origRef) {\n var _a;\n const ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, origRef);\n const schOrFunc = root.refs[ref];\n if (schOrFunc)\n return schOrFunc;\n let _sch = resolve.call(this, root, ref);\n if (_sch === undefined) {\n const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; // TODO maybe localRefs should hold SchemaEnv\n const { schemaId } = this.opts;\n if (schema)\n _sch = new SchemaEnv({ schema, schemaId, root, baseId });\n }\n if (_sch === undefined && this.opts.loadSchemaSync) {\n const remoteSchema = this.opts.loadSchemaSync(baseId, origRef, ref);\n if (remoteSchema && !(this.refs[ref] || this.schemas[ref])) {\n this.addSchema(remoteSchema, ref, undefined);\n _sch = resolve.call(this, root, ref);\n }\n }\n if (_sch === undefined)\n return;\n return (root.refs[ref] = inlineOrCompile.call(this, _sch));\n}\nfunction inlineOrCompile(sch) {\n if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))\n return sch.schema;\n return sch.validate ? sch : compileSchema.call(this, sch);\n}\n// Index of schema compilation in the currently compiled list\nfunction getCompilingSchema(schEnv) {\n for (const sch of this._compilations) {\n if (sameSchemaEnv(sch, schEnv))\n return sch;\n }\n}\nfunction sameSchemaEnv(s1, s2) {\n return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;\n}\n// resolve and compile the references ($ref)\n// TODO returns AnySchemaObject (if the schema can be inlined) or validation function\nfunction resolve(root, // information about the root schema for the current schema\nref // reference to resolve\n) {\n let sch;\n while (typeof (sch = this.refs[ref]) == \"string\")\n ref = sch;\n return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);\n}\n// Resolve schema, its root and baseId\nfunction resolveSchema(root, // root object with properties schema, refs TODO below SchemaEnv is assigned to it\nref // reference to resolve\n) {\n const p = this.opts.uriResolver.parse(ref);\n const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);\n let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, undefined);\n // TODO `Object.keys(root.schema).length > 0` should not be needed - but removing breaks 2 tests\n if (Object.keys(root.schema).length > 0 && refPath === baseId) {\n return getJsonPointer.call(this, p, root);\n }\n const id = (0, resolve_1.normalizeId)(refPath);\n const schOrRef = this.refs[id] || this.schemas[id];\n if (typeof schOrRef == \"string\") {\n const sch = resolveSchema.call(this, root, schOrRef);\n if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== \"object\")\n return;\n return getJsonPointer.call(this, p, sch);\n }\n if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== \"object\")\n return;\n if (!schOrRef.validate)\n compileSchema.call(this, schOrRef);\n if (id === (0, resolve_1.normalizeId)(ref)) {\n const { schema } = schOrRef;\n const { schemaId } = this.opts;\n const schId = schema[schemaId];\n if (schId)\n baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n return new SchemaEnv({ schema, schemaId, root, baseId });\n }\n return getJsonPointer.call(this, p, schOrRef);\n}\nconst PREVENT_SCOPE_CHANGE = new Set([\n \"properties\",\n \"patternProperties\",\n \"enum\",\n \"dependencies\",\n \"definitions\",\n]);\nfunction getJsonPointer(parsedRef, { baseId, schema, root }) {\n var _a;\n if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== \"/\")\n return;\n for (const part of parsedRef.fragment.slice(1).split(\"/\")) {\n if (typeof schema === \"boolean\")\n return;\n const partSchema = schema[(0, util_1.unescapeFragment)(part)];\n if (partSchema === undefined)\n return;\n schema = partSchema;\n // TODO PREVENT_SCOPE_CHANGE could be defined in keyword def?\n const schId = typeof schema === \"object\" && schema[this.opts.schemaId];\n if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {\n baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n }\n }\n let env;\n if (typeof schema != \"boolean\" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {\n const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);\n env = resolveSchema.call(this, root, $ref);\n }\n // even though resolution failed we need to return SchemaEnv to throw exception\n // so that compileAsync loads missing schema.\n const { schemaId } = this.opts;\n env = env || new SchemaEnv({ schema, schemaId, root, baseId });\n if (env.schema !== env.root.schema)\n return env;\n return undefined;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"./codegen\");\nconst names = {\n // validation function arguments\n data: new codegen_1.Name(\"data\"), // data passed to validation function\n // args passed from referencing schema\n valCxt: new codegen_1.Name(\"valCxt\"), // validation/data context - should not be used directly, it is destructured to the names below\n instancePath: new codegen_1.Name(\"instancePath\"),\n parentData: new codegen_1.Name(\"parentData\"),\n parentDataProperty: new codegen_1.Name(\"parentDataProperty\"),\n rootData: new codegen_1.Name(\"rootData\"), // root data - same as the data passed to the first/top validation function\n dynamicAnchors: new codegen_1.Name(\"dynamicAnchors\"), // used to support recursiveRef and dynamicRef\n isAllOfVariant: new codegen_1.Name(\"isAllOfVariant\"), // used to check in runtime if the current function (ref) is called from allOf\n // function scoped variables\n vErrors: new codegen_1.Name(\"vErrors\"), // null or array of validation errors\n errors: new codegen_1.Name(\"errors\"), // counter of validation errors\n this: new codegen_1.Name(\"this\"),\n // \"globals\"\n self: new codegen_1.Name(\"self\"),\n scope: new codegen_1.Name(\"scope\"),\n // JTD serialize/parse name for JSON string and position\n json: new codegen_1.Name(\"json\"),\n jsonPos: new codegen_1.Name(\"jsonPos\"),\n jsonLen: new codegen_1.Name(\"jsonLen\"),\n jsonPart: new codegen_1.Name(\"jsonPart\"),\n};\nexports.default = names;\n//# sourceMappingURL=names.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst resolve_1 = require(\"./resolve\");\nclass MissingRefError extends Error {\n constructor(resolver, baseId, ref, msg) {\n super(msg || `can't resolve reference ${ref} from id ${baseId}`);\n this.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref);\n this.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));\n }\n}\nexports.default = MissingRefError;\n//# sourceMappingURL=ref_error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.inlineRef = inlineRef;\nexports.getFullPath = getFullPath;\nexports._getFullPath = _getFullPath;\nexports.normalizeId = normalizeId;\nexports.resolveUrl = resolveUrl;\nexports.getSchemaRefs = getSchemaRefs;\nconst util_1 = require(\"./util\");\nconst equal = require(\"fast-deep-equal\");\nconst traverse = require(\"json-schema-traverse\");\n// TODO refactor to use keyword definitions\nconst SIMPLE_INLINED = new Set([\n \"type\",\n \"format\",\n \"pattern\",\n \"maxLength\",\n \"minLength\",\n \"maxProperties\",\n \"minProperties\",\n \"maxItems\",\n \"minItems\",\n \"maximum\",\n \"minimum\",\n \"uniqueItems\",\n \"multipleOf\",\n \"required\",\n \"enum\",\n \"const\",\n]);\nfunction inlineRef(schema, limit = true) {\n if (typeof schema == \"boolean\")\n return true;\n if (limit === true)\n return !hasRef(schema);\n if (!limit)\n return false;\n return countKeys(schema) <= limit;\n}\nconst REF_KEYWORDS = new Set([\n \"$ref\",\n \"$recursiveRef\",\n \"$recursiveAnchor\",\n \"$dynamicRef\",\n \"$dynamicAnchor\",\n]);\nfunction hasRef(schema) {\n for (const key in schema) {\n if (REF_KEYWORDS.has(key))\n return true;\n const sch = schema[key];\n if (Array.isArray(sch) && sch.some(hasRef))\n return true;\n if (typeof sch == \"object\" && hasRef(sch))\n return true;\n }\n return false;\n}\nfunction countKeys(schema) {\n let count = 0;\n for (const key in schema) {\n if (key === \"$ref\")\n return Infinity;\n count++;\n if (SIMPLE_INLINED.has(key))\n continue;\n if (typeof schema[key] == \"object\") {\n (0, util_1.eachItem)(schema[key], (sch) => (count += countKeys(sch)));\n }\n if (count === Infinity)\n return Infinity;\n }\n return count;\n}\nfunction getFullPath(resolver, id = \"\", normalize) {\n if (normalize !== false)\n id = normalizeId(id);\n const p = resolver.parse(id);\n return _getFullPath(resolver, p);\n}\nfunction _getFullPath(resolver, p) {\n const serialized = resolver.serialize(p);\n return serialized.split(\"#\")[0] + \"#\";\n}\nconst TRAILING_SLASH_HASH = /#\\/?$/;\nfunction normalizeId(id) {\n return id ? id.replace(TRAILING_SLASH_HASH, \"\") : \"\";\n}\nfunction resolveUrl(resolver, baseId, id) {\n id = normalizeId(id);\n return resolver.resolve(baseId, id);\n}\nconst ANCHOR = /^[a-z_][-a-z0-9._]*$/i;\nfunction getSchemaRefs(schema, baseId) {\n if (typeof schema == \"boolean\")\n return {};\n const { schemaId, uriResolver } = this.opts;\n const schId = normalizeId(schema[schemaId] || baseId);\n const baseIds = { \"\": schId };\n const pathPrefix = getFullPath(uriResolver, schId, false);\n const localRefs = {};\n const schemaRefs = new Set();\n traverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => {\n if (parentJsonPtr === undefined)\n return;\n const fullPath = pathPrefix + jsonPtr;\n let baseId = baseIds[parentJsonPtr];\n if (typeof sch[schemaId] == \"string\")\n baseId = addRef.call(this, sch[schemaId]);\n addAnchor.call(this, sch.$anchor);\n addAnchor.call(this, sch.$dynamicAnchor);\n baseIds[jsonPtr] = baseId;\n function addRef(ref) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const _resolve = this.opts.uriResolver.resolve;\n ref = normalizeId(baseId ? _resolve(baseId, ref) : ref);\n if (schemaRefs.has(ref))\n throw ambiguos(ref);\n schemaRefs.add(ref);\n let schOrRef = this.refs[ref];\n if (typeof schOrRef == \"string\")\n schOrRef = this.refs[schOrRef];\n if (typeof schOrRef == \"object\") {\n checkAmbiguosRef(sch, schOrRef.schema, ref);\n }\n else if (ref !== normalizeId(fullPath)) {\n if (ref[0] === \"#\") {\n checkAmbiguosRef(sch, localRefs[ref], ref);\n localRefs[ref] = sch;\n }\n else {\n this.refs[ref] = fullPath;\n }\n }\n return ref;\n }\n function addAnchor(anchor) {\n if (typeof anchor == \"string\") {\n if (!ANCHOR.test(anchor))\n throw new Error(`invalid anchor \"${anchor}\"`);\n addRef.call(this, `#${anchor}`);\n }\n }\n });\n return localRefs;\n function checkAmbiguosRef(sch1, sch2, ref) {\n if (sch2 !== undefined && !equal(sch1, sch2))\n throw ambiguos(ref);\n }\n function ambiguos(ref) {\n return new Error(`reference \"${ref}\" resolves to more than one schema`);\n }\n}\n//# sourceMappingURL=resolve.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isJSONType = isJSONType;\nexports.getRules = getRules;\nconst _jsonTypes = [\"string\", \"number\", \"integer\", \"boolean\", \"null\", \"object\", \"array\"];\nconst jsonTypes = new Set(_jsonTypes);\nfunction isJSONType(x) {\n return typeof x == \"string\" && jsonTypes.has(x);\n}\nfunction getRules() {\n const groups = {\n number: { type: \"number\", rules: [] },\n string: { type: \"string\", rules: [] },\n array: { type: \"array\", rules: [] },\n object: { type: \"object\", rules: [] },\n };\n return {\n types: { ...groups, integer: true, boolean: true, null: true },\n rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object],\n post: { rules: [] },\n all: {},\n keywords: {},\n };\n}\n//# sourceMappingURL=rules.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Type = exports.mergeEvaluated = void 0;\nexports.toHash = toHash;\nexports.alwaysValidSchema = alwaysValidSchema;\nexports.checkUnknownRules = checkUnknownRules;\nexports.schemaHasRules = schemaHasRules;\nexports.schemaHasRulesButRef = schemaHasRulesButRef;\nexports.schemaRefOrVal = schemaRefOrVal;\nexports.unescapeFragment = unescapeFragment;\nexports.escapeFragment = escapeFragment;\nexports.escapeJsonPointer = escapeJsonPointer;\nexports.unescapeJsonPointer = unescapeJsonPointer;\nexports.eachItem = eachItem;\nexports.evaluatedPropsToName = evaluatedPropsToName;\nexports.setEvaluated = setEvaluated;\nexports.useFunc = useFunc;\nexports.getErrorPath = getErrorPath;\nexports.checkStrictMode = checkStrictMode;\nconst codegen_1 = require(\"./codegen\");\nconst code_1 = require(\"./codegen/code\");\n// TODO refactor to use Set\nfunction toHash(arr) {\n const hash = {};\n for (const item of arr)\n hash[item] = true;\n return hash;\n}\nfunction alwaysValidSchema(it, schema) {\n if (typeof schema == \"boolean\")\n return schema;\n if (Object.keys(schema).length === 0)\n return true;\n checkUnknownRules(it, schema);\n return !schemaHasRules(schema, it.self.RULES.all);\n}\nfunction checkUnknownRules(it, schema = it.schema) {\n const { opts, self } = it;\n if (!opts.strictSchema)\n return;\n if (typeof schema === \"boolean\")\n return;\n const rules = self.RULES.keywords;\n for (const key in schema) {\n if (!rules[key])\n checkStrictMode(it, `unknown keyword: \"${key}\"`);\n }\n}\nfunction schemaHasRules(schema, rules) {\n if (typeof schema == \"boolean\")\n return !schema;\n for (const key in schema)\n if (rules[key])\n return true;\n return false;\n}\nfunction schemaHasRulesButRef(schema, RULES) {\n if (typeof schema == \"boolean\")\n return !schema;\n for (const key in schema)\n if (key !== \"$ref\" && RULES.all[key])\n return true;\n return false;\n}\nfunction schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {\n if (!$data) {\n if (typeof schema == \"number\" || typeof schema == \"boolean\")\n return schema;\n if (typeof schema == \"string\")\n return (0, codegen_1._) `${schema}`;\n }\n return (0, codegen_1._) `${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;\n}\nfunction unescapeFragment(str) {\n return unescapeJsonPointer(decodeURIComponent(str));\n}\nfunction escapeFragment(str) {\n return encodeURIComponent(escapeJsonPointer(str));\n}\nfunction escapeJsonPointer(str) {\n if (typeof str == \"number\")\n return `${str}`;\n return str.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n}\nfunction unescapeJsonPointer(str) {\n return str.replace(/~1/g, \"/\").replace(/~0/g, \"~\");\n}\nfunction eachItem(xs, f) {\n if (Array.isArray(xs)) {\n for (const x of xs)\n f(x);\n }\n else {\n f(xs);\n }\n}\nfunction makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName, }) {\n return (gen, from, to, toName) => {\n const res = to === undefined\n ? from\n : to instanceof codegen_1.Name\n ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to)\n : from instanceof codegen_1.Name\n ? (mergeToName(gen, to, from), from)\n : mergeValues(from, to);\n return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;\n };\n}\nexports.mergeEvaluated = {\n props: makeMergeEvaluated({\n mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => {\n gen.if((0, codegen_1._) `${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._) `${to} || {}`).code((0, codegen_1._) `Object.assign(${to}, ${from})`));\n }),\n mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => {\n if (from === true) {\n gen.assign(to, true);\n }\n else {\n gen.assign(to, (0, codegen_1._) `${to} || {}`);\n setEvaluated(gen, to, from);\n }\n }),\n mergeValues: (from, to) => (from === true ? true : { ...from, ...to }),\n resultToName: evaluatedPropsToName,\n }),\n items: makeMergeEvaluated({\n mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._) `${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),\n mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._) `${to} > ${from} ? ${to} : ${from}`)),\n mergeValues: (from, to) => (from === true ? true : Math.max(from, to)),\n resultToName: (gen, items) => gen.var(\"items\", items),\n }),\n};\nfunction evaluatedPropsToName(gen, ps) {\n if (ps === true)\n return gen.var(\"props\", true);\n const props = gen.var(\"props\", (0, codegen_1._) `{}`);\n if (ps !== undefined)\n setEvaluated(gen, props, ps);\n return props;\n}\nfunction setEvaluated(gen, props, ps) {\n Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._) `${props}${(0, codegen_1.getProperty)(p)}`, true));\n}\nconst snippets = {};\nfunction useFunc(gen, f) {\n return gen.scopeValue(\"func\", {\n ref: f,\n code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code)),\n });\n}\nvar Type;\n(function (Type) {\n Type[Type[\"Num\"] = 0] = \"Num\";\n Type[Type[\"Str\"] = 1] = \"Str\";\n})(Type || (exports.Type = Type = {}));\nfunction getErrorPath(dataProp, dataPropType, jsPropertySyntax) {\n // let path\n if (dataProp instanceof codegen_1.Name) {\n const isNumber = dataPropType === Type.Num;\n return jsPropertySyntax\n ? isNumber\n ? (0, codegen_1._) `\"[\" + ${dataProp} + \"]\"`\n : (0, codegen_1._) `\"['\" + ${dataProp} + \"']\"`\n : isNumber\n ? (0, codegen_1._) `\"/\" + ${dataProp}`\n : (0, codegen_1._) `\"/\" + ${dataProp}.replace(/~/g, \"~0\").replace(/\\\\//g, \"~1\")`; // TODO maybe use global escapePointer\n }\n return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : \"/\" + escapeJsonPointer(dataProp);\n}\nfunction checkStrictMode(it, msg, mode = it.opts.strictSchema) {\n if (!mode)\n return;\n msg = `strict mode: ${msg}`;\n if (mode === true)\n throw new Error(msg);\n it.self.logger.warn(msg);\n}\n//# sourceMappingURL=util.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.schemaHasRulesForType = schemaHasRulesForType;\nexports.shouldUseGroup = shouldUseGroup;\nexports.shouldUseRule = shouldUseRule;\nfunction schemaHasRulesForType({ schema, self }, type) {\n const group = self.RULES.types[type];\n return group && group !== true && shouldUseGroup(schema, group);\n}\nfunction shouldUseGroup(schema, group) {\n return group.rules.some((rule) => shouldUseRule(schema, rule));\n}\nfunction shouldUseRule(schema, rule) {\n var _a;\n return (schema[rule.keyword] !== undefined ||\n ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== undefined)));\n}\n//# sourceMappingURL=applicability.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.topBoolOrEmptySchema = topBoolOrEmptySchema;\nexports.boolOrEmptySchema = boolOrEmptySchema;\nconst errors_1 = require(\"../errors\");\nconst codegen_1 = require(\"../codegen\");\nconst names_1 = require(\"../names\");\nconst boolError = {\n message: \"boolean schema is false\",\n};\nfunction topBoolOrEmptySchema(it) {\n const { gen, schema, validateName } = it;\n if (schema === false) {\n falseSchemaError(it, false);\n }\n else if (typeof schema == \"object\" && schema.$async === true) {\n gen.return(names_1.default.data);\n }\n else {\n gen.assign((0, codegen_1._) `${validateName}.errors`, null);\n gen.return(true);\n }\n}\nfunction boolOrEmptySchema(it, valid) {\n const { gen, schema } = it;\n if (schema === false) {\n gen.var(valid, false); // TODO var\n falseSchemaError(it);\n }\n else {\n gen.var(valid, true); // TODO var\n }\n}\nfunction falseSchemaError(it, overrideAllErrors) {\n const { gen, data } = it;\n // TODO maybe some other interface should be used for non-keyword validation errors...\n const cxt = {\n gen,\n keyword: \"false schema\",\n data,\n schema: false,\n schemaCode: false,\n schemaValue: false,\n params: {},\n it,\n };\n (0, errors_1.reportError)(cxt, boolError, undefined, overrideAllErrors);\n}\n//# sourceMappingURL=boolSchema.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DataType = void 0;\nexports.getSchemaTypes = getSchemaTypes;\nexports.getJSONTypes = getJSONTypes;\nexports.coerceAndCheckDataType = coerceAndCheckDataType;\nexports.checkDataType = checkDataType;\nexports.checkDataTypes = checkDataTypes;\nexports.reportTypeError = reportTypeError;\nconst rules_1 = require(\"../rules\");\nconst applicability_1 = require(\"./applicability\");\nconst errors_1 = require(\"../errors\");\nconst codegen_1 = require(\"../codegen\");\nconst util_1 = require(\"../util\");\nvar DataType;\n(function (DataType) {\n DataType[DataType[\"Correct\"] = 0] = \"Correct\";\n DataType[DataType[\"Wrong\"] = 1] = \"Wrong\";\n})(DataType || (exports.DataType = DataType = {}));\nfunction getSchemaTypes(schema) {\n const types = getJSONTypes(schema.type);\n const hasNull = types.includes(\"null\");\n if (hasNull) {\n if (schema.nullable === false)\n throw new Error(\"type: null contradicts nullable: false\");\n }\n else {\n if (!types.length && schema.nullable !== undefined) {\n throw new Error('\"nullable\" cannot be used without \"type\"');\n }\n if (schema.nullable === true)\n types.push(\"null\");\n }\n return types;\n}\nfunction getJSONTypes(ts) {\n const types = Array.isArray(ts) ? ts : ts ? [ts] : [];\n if (types.every(rules_1.isJSONType))\n return types;\n throw new Error(\"type must be JSONType or JSONType[]: \" + types.join(\",\"));\n}\nfunction coerceAndCheckDataType(it, types) {\n const { gen, data, opts } = it;\n const coerceTo = coerceToTypes(types, opts.coerceTypes);\n const checkTypes = types.length > 0 &&\n !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0]));\n if (checkTypes) {\n const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);\n gen.if(wrongType, () => {\n if (coerceTo.length)\n coerceData(it, types, coerceTo);\n else\n reportTypeError(it);\n });\n }\n return checkTypes;\n}\nconst COERCIBLE = new Set([\"string\", \"number\", \"integer\", \"boolean\", \"null\"]);\nfunction coerceToTypes(types, coerceTypes) {\n return coerceTypes\n ? types.filter((t) => COERCIBLE.has(t) || (coerceTypes === \"array\" && t === \"array\"))\n : [];\n}\nfunction coerceData(it, types, coerceTo) {\n const { gen, data, opts } = it;\n const dataType = gen.let(\"dataType\", (0, codegen_1._) `typeof ${data}`);\n const coerced = gen.let(\"coerced\", (0, codegen_1._) `undefined`);\n if (opts.coerceTypes === \"array\") {\n gen.if((0, codegen_1._) `${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen\n .assign(data, (0, codegen_1._) `${data}[0]`)\n .assign(dataType, (0, codegen_1._) `typeof ${data}`)\n .if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));\n }\n gen.if((0, codegen_1._) `${coerced} !== undefined`);\n for (const t of coerceTo) {\n if (COERCIBLE.has(t) || (t === \"array\" && opts.coerceTypes === \"array\")) {\n coerceSpecificType(t);\n }\n }\n gen.else();\n reportTypeError(it);\n gen.endIf();\n gen.if((0, codegen_1._) `${coerced} !== undefined`, () => {\n gen.assign(data, coerced);\n assignParentData(it, coerced);\n });\n function coerceSpecificType(t) {\n switch (t) {\n case \"string\":\n gen\n .elseIf((0, codegen_1._) `${dataType} == \"number\" || ${dataType} == \"boolean\"`)\n .assign(coerced, (0, codegen_1._) `\"\" + ${data}`)\n .elseIf((0, codegen_1._) `${data} === null`)\n .assign(coerced, (0, codegen_1._) `\"\"`);\n return;\n case \"number\":\n gen\n .elseIf((0, codegen_1._) `${dataType} == \"boolean\" || ${data} === null\n || (${dataType} == \"string\" && ${data} && ${data} == +${data})`)\n .assign(coerced, (0, codegen_1._) `+${data}`);\n return;\n case \"integer\":\n gen\n .elseIf((0, codegen_1._) `${dataType} === \"boolean\" || ${data} === null\n || (${dataType} === \"string\" && ${data} && ${data} == +${data} && !(${data} % 1))`)\n .assign(coerced, (0, codegen_1._) `+${data}`);\n return;\n case \"boolean\":\n gen\n .elseIf((0, codegen_1._) `${data} === \"false\" || ${data} === 0 || ${data} === null`)\n .assign(coerced, false)\n .elseIf((0, codegen_1._) `${data} === \"true\" || ${data} === 1`)\n .assign(coerced, true);\n return;\n case \"null\":\n gen.elseIf((0, codegen_1._) `${data} === \"\" || ${data} === 0 || ${data} === false`);\n gen.assign(coerced, null);\n return;\n case \"array\":\n gen\n .elseIf((0, codegen_1._) `${dataType} === \"string\" || ${dataType} === \"number\"\n || ${dataType} === \"boolean\" || ${data} === null`)\n .assign(coerced, (0, codegen_1._) `[${data}]`);\n }\n }\n}\nfunction assignParentData({ gen, parentData, parentDataProperty }, expr) {\n // TODO use gen.property\n gen.if((0, codegen_1._) `${parentData} !== undefined`, () => gen.assign((0, codegen_1._) `${parentData}[${parentDataProperty}]`, expr));\n}\nfunction checkDataType(dataType, data, strictNums, correct = DataType.Correct) {\n const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;\n let cond;\n switch (dataType) {\n case \"null\":\n return (0, codegen_1._) `${data} ${EQ} null`;\n case \"array\":\n cond = (0, codegen_1._) `Array.isArray(${data})`;\n break;\n case \"object\":\n cond = (0, codegen_1._) `${data} && typeof ${data} == \"object\" && !Array.isArray(${data})`;\n break;\n case \"integer\":\n cond = numCond((0, codegen_1._) `!(${data} % 1) && !isNaN(${data})`);\n break;\n case \"number\":\n cond = numCond();\n break;\n default:\n return (0, codegen_1._) `typeof ${data} ${EQ} ${dataType}`;\n }\n return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);\n function numCond(_cond = codegen_1.nil) {\n return (0, codegen_1.and)((0, codegen_1._) `typeof ${data} == \"number\"`, _cond, strictNums ? (0, codegen_1._) `isFinite(${data})` : codegen_1.nil);\n }\n}\nfunction checkDataTypes(dataTypes, data, strictNums, correct) {\n if (dataTypes.length === 1) {\n return checkDataType(dataTypes[0], data, strictNums, correct);\n }\n let cond;\n const types = (0, util_1.toHash)(dataTypes);\n if (types.array && types.object) {\n const notObj = (0, codegen_1._) `typeof ${data} != \"object\"`;\n cond = types.null ? notObj : (0, codegen_1._) `!${data} || ${notObj}`;\n delete types.null;\n delete types.array;\n delete types.object;\n }\n else {\n cond = codegen_1.nil;\n }\n if (types.number)\n delete types.integer;\n for (const t in types)\n cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));\n return cond;\n}\nconst typeError = {\n message: ({ schema }) => `must be ${schema}`,\n params: ({ schema, schemaValue }) => typeof schema == \"string\" ? (0, codegen_1._) `{type: ${schema}}` : (0, codegen_1._) `{type: ${schemaValue}}`,\n};\nfunction reportTypeError(it) {\n const cxt = getTypeErrorContext(it);\n (0, errors_1.reportError)(cxt, typeError);\n}\nfunction getTypeErrorContext(it) {\n const { gen, data, schema } = it;\n const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, \"type\");\n return {\n gen,\n keyword: \"type\",\n data,\n schema: schema.type,\n schemaCode,\n schemaValue: schemaCode,\n parentSchema: schema,\n params: {},\n it,\n };\n}\n//# sourceMappingURL=dataType.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assignDefaults = assignDefaults;\nconst codegen_1 = require(\"../codegen\");\nconst util_1 = require(\"../util\");\nfunction assignDefaults(it, ty) {\n const { properties, items } = it.schema;\n if (ty === \"object\" && properties) {\n for (const key in properties) {\n assignDefault(it, key, properties[key].default);\n }\n }\n else if (ty === \"array\" && Array.isArray(items)) {\n items.forEach((sch, i) => assignDefault(it, i, sch.default));\n }\n}\nfunction assignDefault(it, prop, defaultValue) {\n const { gen, compositeRule, data, opts } = it;\n if (defaultValue === undefined)\n return;\n const childData = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(prop)}`;\n if (compositeRule) {\n (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`);\n return;\n }\n let condition = (0, codegen_1._) `${childData} === undefined`;\n if (opts.useDefaults === \"empty\") {\n condition = (0, codegen_1._) `${condition} || ${childData} === null || ${childData} === \"\"`;\n }\n // `${childData} === undefined` +\n // (opts.useDefaults === \"empty\" ? ` || ${childData} === null || ${childData} === \"\"` : \"\")\n gen.if(condition, (0, codegen_1._) `${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);\n}\n//# sourceMappingURL=defaults.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.KeywordCxt = void 0;\nexports.validateFunctionCode = validateFunctionCode;\nexports.getData = getData;\nconst boolSchema_1 = require(\"./boolSchema\");\nconst dataType_1 = require(\"./dataType\");\nconst applicability_1 = require(\"./applicability\");\nconst dataType_2 = require(\"./dataType\");\nconst defaults_1 = require(\"./defaults\");\nconst keyword_1 = require(\"./keyword\");\nconst subschema_1 = require(\"./subschema\");\nconst codegen_1 = require(\"../codegen\");\nconst names_1 = require(\"../names\");\nconst resolve_1 = require(\"../resolve\");\nconst util_1 = require(\"../util\");\nconst errors_1 = require(\"../errors\");\n// schema compilation - generates validation function, subschemaCode (below) is used for subschemas\nfunction validateFunctionCode(it) {\n if (isSchemaObj(it)) {\n checkKeywords(it);\n if (schemaCxtHasRules(it)) {\n topSchemaObjCode(it);\n return;\n }\n }\n validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));\n}\nfunction validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {\n if (opts.code.es5) {\n gen.func(validateName, (0, codegen_1._) `${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {\n gen.code((0, codegen_1._) `\"use strict\"; ${funcSourceUrl(schema, opts)}`);\n destructureValCxtES5(gen, opts);\n gen.code(body);\n });\n }\n else {\n gen.func(validateName, (0, codegen_1._) `${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));\n }\n}\nfunction destructureValCxt(opts) {\n return (0, codegen_1._) `{${names_1.default.instancePath}=\"\", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._) `, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}, ${names_1.default.isAllOfVariant} = 0}={}`;\n}\nfunction destructureValCxtES5(gen, opts) {\n gen.if(names_1.default.valCxt, () => {\n gen.var(names_1.default.instancePath, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.instancePath}`);\n gen.var(names_1.default.parentData, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.parentData}`);\n gen.var(names_1.default.parentDataProperty, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.parentDataProperty}`);\n gen.var(names_1.default.rootData, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.rootData}`);\n gen.var(names_1.default.isAllOfVariant, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.isAllOfVariant}`);\n if (opts.dynamicRef)\n gen.var(names_1.default.dynamicAnchors, (0, codegen_1._) `${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`);\n }, () => {\n gen.var(names_1.default.instancePath, (0, codegen_1._) `\"\"`);\n gen.var(names_1.default.parentData, (0, codegen_1._) `undefined`);\n gen.var(names_1.default.parentDataProperty, (0, codegen_1._) `undefined`);\n gen.var(names_1.default.rootData, names_1.default.data);\n gen.var(names_1.default.isAllOfVariant, (0, codegen_1._) `0`);\n if (opts.dynamicRef)\n gen.var(names_1.default.dynamicAnchors, (0, codegen_1._) `{}`);\n });\n}\nfunction topSchemaObjCode(it) {\n const { schema, opts, gen } = it;\n validateFunction(it, () => {\n if (opts.$comment && schema.$comment)\n commentKeyword(it);\n checkNoDefault(it);\n gen.let(names_1.default.vErrors, null);\n gen.let(names_1.default.errors, 0);\n if (opts.unevaluated)\n resetEvaluated(it);\n typeAndKeywords(it);\n returnResults(it);\n });\n return;\n}\nfunction resetEvaluated(it) {\n // TODO maybe some hook to execute it in the end to check whether props/items are Name, as in assignEvaluated\n const { gen, validateName } = it;\n it.evaluated = gen.const(\"evaluated\", (0, codegen_1._) `${validateName}.evaluated`);\n gen.if((0, codegen_1._) `${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._) `${it.evaluated}.props`, (0, codegen_1._) `undefined`));\n gen.if((0, codegen_1._) `${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._) `${it.evaluated}.items`, (0, codegen_1._) `undefined`));\n}\nfunction funcSourceUrl(schema, opts) {\n const schId = typeof schema == \"object\" && schema[opts.schemaId];\n return schId && (opts.code.source || opts.code.process) ? (0, codegen_1._) `/*# sourceURL=${schId} */` : codegen_1.nil;\n}\n// schema compilation - this function is used recursively to generate code for sub-schemas\nfunction subschemaCode(it, valid) {\n if (isSchemaObj(it)) {\n checkKeywords(it);\n if (schemaCxtHasRules(it)) {\n subSchemaObjCode(it, valid);\n return;\n }\n }\n (0, boolSchema_1.boolOrEmptySchema)(it, valid);\n}\nfunction schemaCxtHasRules({ schema, self }) {\n if (typeof schema == \"boolean\")\n return !schema;\n for (const key in schema)\n if (self.RULES.all[key])\n return true;\n return false;\n}\nfunction isSchemaObj(it) {\n return typeof it.schema != \"boolean\";\n}\nfunction subSchemaObjCode(it, valid) {\n const { schema, gen, opts } = it;\n if (opts.$comment && schema.$comment)\n commentKeyword(it);\n updateContext(it);\n checkAsyncSchema(it);\n const errsCount = gen.const(\"_errs\", names_1.default.errors);\n typeAndKeywords(it, errsCount);\n // TODO var\n gen.var(valid, (0, codegen_1._) `${errsCount} === ${names_1.default.errors}`);\n}\nfunction checkKeywords(it) {\n (0, util_1.checkUnknownRules)(it);\n checkRefsAndKeywords(it);\n}\nfunction typeAndKeywords(it, errsCount) {\n if (it.opts.jtd)\n return schemaKeywords(it, [], false, errsCount);\n const types = (0, dataType_1.getSchemaTypes)(it.schema);\n const checkedTypes = (0, dataType_1.coerceAndCheckDataType)(it, types);\n schemaKeywords(it, types, !checkedTypes, errsCount);\n}\nfunction checkRefsAndKeywords(it) {\n const { schema, errSchemaPath, opts, self } = it;\n if (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self.RULES)) {\n self.logger.warn(`$ref: keywords ignored in schema at path \"${errSchemaPath}\"`);\n }\n}\nfunction checkNoDefault(it) {\n const { schema, opts } = it;\n if (schema.default !== undefined && opts.useDefaults && opts.strictSchema) {\n (0, util_1.checkStrictMode)(it, \"default is ignored in the schema root\");\n }\n}\nfunction updateContext(it) {\n const schId = it.schema[it.opts.schemaId];\n if (schId)\n it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId);\n}\nfunction checkAsyncSchema(it) {\n if (it.schema.$async && !it.schemaEnv.$async)\n throw new Error(\"async schema in sync schema\");\n}\nfunction commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) {\n const msg = schema.$comment;\n if (opts.$comment === true) {\n gen.code((0, codegen_1._) `${names_1.default.self}.logger.log(${msg})`);\n }\n else if (typeof opts.$comment == \"function\") {\n const schemaPath = (0, codegen_1.str) `${errSchemaPath}/$comment`;\n const rootName = gen.scopeValue(\"root\", { ref: schemaEnv.root });\n gen.code((0, codegen_1._) `${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`);\n }\n}\nfunction returnResults(it) {\n const { gen, schemaEnv, validateName, ValidationError, opts } = it;\n if (schemaEnv.$async) {\n // TODO assign unevaluated\n gen.if((0, codegen_1._) `${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._) `new ${ValidationError}(${names_1.default.vErrors})`));\n }\n else {\n gen.assign((0, codegen_1._) `${validateName}.errors`, names_1.default.vErrors);\n if (opts.unevaluated)\n assignEvaluated(it);\n gen.return((0, codegen_1._) `${names_1.default.errors} === 0`);\n }\n}\nfunction assignEvaluated({ gen, evaluated, props, items }) {\n if (props instanceof codegen_1.Name)\n gen.assign((0, codegen_1._) `${evaluated}.props`, props);\n if (items instanceof codegen_1.Name)\n gen.assign((0, codegen_1._) `${evaluated}.items`, items);\n}\nfunction schemaKeywords(it, types, typeErrors, errsCount) {\n const { gen, schema, data, allErrors, opts, self } = it;\n const { RULES } = self;\n if (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {\n gen.block(() => keywordCode(it, \"$ref\", RULES.all.$ref.definition)); // TODO typecast\n return;\n }\n if (!opts.jtd)\n checkStrictTypes(it, types);\n gen.block(() => {\n for (const group of RULES.rules)\n groupKeywords(group);\n groupKeywords(RULES.post);\n });\n function groupKeywords(group) {\n if (!(0, applicability_1.shouldUseGroup)(schema, group))\n return;\n if (group.type) {\n gen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers));\n iterateKeywords(it, group);\n if (types.length === 1 && types[0] === group.type && typeErrors) {\n gen.else();\n (0, dataType_2.reportTypeError)(it);\n }\n gen.endIf();\n }\n else {\n iterateKeywords(it, group);\n }\n // TODO make it \"ok\" call?\n if (!allErrors)\n gen.if((0, codegen_1._) `${names_1.default.errors} === ${errsCount || 0}`);\n }\n}\nfunction iterateKeywords(it, group) {\n const { gen, schema, opts: { useDefaults }, } = it;\n if (useDefaults)\n (0, defaults_1.assignDefaults)(it, group.type);\n gen.block(() => {\n for (const rule of group.rules) {\n if ((0, applicability_1.shouldUseRule)(schema, rule) || shouldForceUnevaluatedProperties(schema, rule)) {\n keywordCode(it, rule.keyword, rule.definition, group.type);\n }\n }\n });\n function shouldForceUnevaluatedProperties(schema, rule) {\n return !!(rule.keyword === \"unevaluatedProperties\" &&\n (schema.properties || schema.patternProperties) &&\n !it.isAllOfVariant &&\n it.opts.defaultUnevaluatedProperties === false);\n }\n}\nfunction checkStrictTypes(it, types) {\n if (it.schemaEnv.meta || !it.opts.strictTypes)\n return;\n checkContextTypes(it, types);\n if (!it.opts.allowUnionTypes)\n checkMultipleTypes(it, types);\n checkKeywordTypes(it, it.dataTypes);\n}\nfunction checkContextTypes(it, types) {\n if (!types.length)\n return;\n if (!it.dataTypes.length) {\n it.dataTypes = types;\n return;\n }\n types.forEach((t) => {\n if (!includesType(it.dataTypes, t)) {\n strictTypesError(it, `type \"${t}\" not allowed by context \"${it.dataTypes.join(\",\")}\"`);\n }\n });\n it.dataTypes = it.dataTypes.filter((t) => includesType(types, t));\n}\nfunction checkMultipleTypes(it, ts) {\n if (ts.length > 1 && !(ts.length === 2 && ts.includes(\"null\"))) {\n strictTypesError(it, \"use allowUnionTypes to allow union type keyword\");\n }\n}\nfunction checkKeywordTypes(it, ts) {\n const rules = it.self.RULES.all;\n for (const keyword in rules) {\n const rule = rules[keyword];\n if (typeof rule == \"object\" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {\n const { type } = rule.definition;\n if (type.length && !type.some((t) => hasApplicableType(ts, t))) {\n strictTypesError(it, `missing type \"${type.join(\",\")}\" for keyword \"${keyword}\"`);\n }\n }\n }\n}\nfunction hasApplicableType(schTs, kwdT) {\n return schTs.includes(kwdT) || (kwdT === \"number\" && schTs.includes(\"integer\"));\n}\nfunction includesType(ts, t) {\n return ts.includes(t) || (t === \"integer\" && ts.includes(\"number\"));\n}\nfunction strictTypesError(it, msg) {\n const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;\n msg += ` at \"${schemaPath}\" (strictTypes)`;\n (0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes);\n}\nclass KeywordCxt {\n constructor(it, def, keyword) {\n (0, keyword_1.validateKeywordUsage)(it, def, keyword);\n this.gen = it.gen;\n this.allErrors = it.allErrors;\n this.keyword = keyword;\n this.data = it.data;\n this.schema = it.schema[keyword];\n this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data;\n this.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword, this.$data);\n this.schemaType = def.schemaType;\n this.parentSchema = it.schema;\n this.params = {};\n this.it = it;\n this.def = def;\n if (this.$data) {\n this.schemaCode = it.gen.const(\"vSchema\", getData(this.$data, it));\n }\n else {\n this.schemaCode = this.schemaValue;\n if (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) {\n throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`);\n }\n }\n if (\"code\" in def ? def.trackErrors : def.errors !== false) {\n this.errsCount = it.gen.const(\"_errs\", names_1.default.errors);\n }\n }\n result(condition, successAction, failAction) {\n this.failResult((0, codegen_1.not)(condition), successAction, failAction);\n }\n failResult(condition, successAction, failAction) {\n this.gen.if(condition);\n if (failAction)\n failAction();\n else\n this.error();\n if (successAction) {\n this.gen.else();\n successAction();\n if (this.allErrors)\n this.gen.endIf();\n }\n else {\n if (this.allErrors)\n this.gen.endIf();\n else\n this.gen.else();\n }\n }\n pass(condition, failAction) {\n this.failResult((0, codegen_1.not)(condition), undefined, failAction);\n }\n fail(condition) {\n if (condition === undefined) {\n this.error();\n if (!this.allErrors)\n this.gen.if(false); // this branch will be removed by gen.optimize\n return;\n }\n this.gen.if(condition);\n this.error();\n if (this.allErrors)\n this.gen.endIf();\n else\n this.gen.else();\n }\n fail$data(condition) {\n if (!this.$data)\n return this.fail(condition);\n const { schemaCode } = this;\n this.fail((0, codegen_1._) `${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`);\n }\n error(append, errorParams, errorPaths) {\n if (errorParams) {\n this.setParams(errorParams);\n this._error(append, errorPaths);\n this.setParams({});\n return;\n }\n this._error(append, errorPaths);\n }\n _error(append, errorPaths) {\n ;\n (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths);\n }\n $dataError() {\n (0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError);\n }\n reset() {\n if (this.errsCount === undefined)\n throw new Error('add \"trackErrors\" to keyword definition');\n (0, errors_1.resetErrorsCount)(this.gen, this.errsCount);\n }\n ok(cond) {\n if (!this.allErrors)\n this.gen.if(cond);\n }\n setParams(obj, assign) {\n if (assign)\n Object.assign(this.params, obj);\n else\n this.params = obj;\n }\n block$data(valid, codeBlock, $dataValid = codegen_1.nil) {\n this.gen.block(() => {\n this.check$data(valid, $dataValid);\n codeBlock();\n });\n }\n check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) {\n if (!this.$data)\n return;\n const { gen, schemaCode, schemaType, def } = this;\n gen.if((0, codegen_1.or)((0, codegen_1._) `${schemaCode} === undefined`, $dataValid));\n if (valid !== codegen_1.nil)\n gen.assign(valid, true);\n if (schemaType.length || def.validateSchema) {\n gen.elseIf(this.invalid$data());\n this.$dataError();\n if (valid !== codegen_1.nil)\n gen.assign(valid, false);\n }\n gen.else();\n }\n invalid$data() {\n const { gen, schemaCode, schemaType, def, it } = this;\n return (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema());\n function wrong$DataType() {\n if (schemaType.length) {\n /* istanbul ignore if */\n if (!(schemaCode instanceof codegen_1.Name))\n throw new Error(\"ajv implementation error\");\n const st = Array.isArray(schemaType) ? schemaType : [schemaType];\n return (0, codegen_1._) `${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`;\n }\n return codegen_1.nil;\n }\n function invalid$DataSchema() {\n if (def.validateSchema) {\n const validateSchemaRef = gen.scopeValue(\"validate$data\", { ref: def.validateSchema }); // TODO value.code for standalone\n return (0, codegen_1._) `!${validateSchemaRef}(${schemaCode})`;\n }\n return codegen_1.nil;\n }\n }\n subschema(appl, valid, isAllOfVariant) {\n const subschema = (0, subschema_1.getSubschema)(this.it, appl);\n (0, subschema_1.extendSubschemaData)(subschema, this.it, appl);\n (0, subschema_1.extendSubschemaMode)(subschema, appl);\n const nextContext = {\n ...this.it,\n ...subschema,\n items: undefined,\n props: undefined,\n isAllOfVariant,\n };\n subschemaCode(nextContext, valid);\n return nextContext;\n }\n mergeEvaluated(schemaCxt, toName) {\n const { it, gen } = this;\n if (!it.opts.unevaluated)\n return;\n if (it.props !== true && schemaCxt.props !== undefined) {\n it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName);\n }\n if (it.items !== true && schemaCxt.items !== undefined) {\n it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName);\n }\n }\n mergeValidEvaluated(schemaCxt, valid) {\n const { it, gen } = this;\n if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {\n gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name));\n return true;\n }\n }\n}\nexports.KeywordCxt = KeywordCxt;\nfunction keywordCode(it, keyword, def, ruleType) {\n const cxt = new KeywordCxt(it, def, keyword);\n if (\"code\" in def) {\n def.code(cxt, ruleType);\n }\n else if (cxt.$data && def.validate) {\n (0, keyword_1.funcKeywordCode)(cxt, def);\n }\n else if (\"macro\" in def) {\n (0, keyword_1.macroKeywordCode)(cxt, def);\n }\n else if (def.compile || def.validate) {\n (0, keyword_1.funcKeywordCode)(cxt, def);\n }\n}\nconst JSON_POINTER = /^\\/(?:[^~]|~0|~1)*$/;\nconst RELATIVE_JSON_POINTER = /^([0-9]+)(#|\\/(?:[^~]|~0|~1)*)?$/;\nfunction getData($data, { dataLevel, dataNames, dataPathArr }) {\n let jsonPointer;\n let data;\n if ($data === \"\")\n return names_1.default.rootData;\n if ($data[0] === \"/\") {\n if (!JSON_POINTER.test($data))\n throw new Error(`Invalid JSON-pointer: ${$data}`);\n jsonPointer = $data;\n data = names_1.default.rootData;\n }\n else {\n const matches = RELATIVE_JSON_POINTER.exec($data);\n if (!matches)\n throw new Error(`Invalid JSON-pointer: ${$data}`);\n const up = +matches[1];\n jsonPointer = matches[2];\n if (jsonPointer === \"#\") {\n if (up >= dataLevel)\n throw new Error(errorMsg(\"property/index\", up));\n return dataPathArr[dataLevel - up];\n }\n if (up > dataLevel)\n throw new Error(errorMsg(\"data\", up));\n data = dataNames[dataLevel - up];\n if (!jsonPointer)\n return data;\n }\n let expr = data;\n const segments = jsonPointer.split(\"/\");\n for (const segment of segments) {\n if (segment) {\n data = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;\n expr = (0, codegen_1._) `${expr} && ${data}`;\n }\n }\n return expr;\n function errorMsg(pointerType, up) {\n return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`;\n }\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.macroKeywordCode = macroKeywordCode;\nexports.funcKeywordCode = funcKeywordCode;\nexports.validSchemaType = validSchemaType;\nexports.validateKeywordUsage = validateKeywordUsage;\nconst codegen_1 = require(\"../codegen\");\nconst names_1 = require(\"../names\");\nconst code_1 = require(\"../../vocabularies/code\");\nconst errors_1 = require(\"../errors\");\nfunction macroKeywordCode(cxt, def) {\n const { gen, keyword, schema, parentSchema, it } = cxt;\n const macroSchema = def.macro.call(it.self, schema, parentSchema, it);\n const schemaRef = useKeyword(gen, keyword, macroSchema);\n if (it.opts.validateSchema !== false)\n it.self.validateSchema(macroSchema, true);\n const valid = gen.name(\"valid\");\n cxt.subschema({\n schema: macroSchema,\n schemaPath: codegen_1.nil,\n errSchemaPath: `${it.errSchemaPath}/${keyword}`,\n topSchemaRef: schemaRef,\n compositeRule: true,\n }, valid);\n cxt.pass(valid, () => cxt.error(true));\n}\nfunction funcKeywordCode(cxt, def) {\n var _a;\n const { gen, keyword, schema, parentSchema, $data, it } = cxt;\n checkAsyncKeyword(it, def);\n const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;\n const validateRef = useKeyword(gen, keyword, validate);\n const valid = gen.let(\"valid\");\n cxt.block$data(valid, validateKeyword);\n cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid);\n function validateKeyword() {\n if (def.errors === false) {\n assignValid();\n if (def.modifying)\n modifyData(cxt);\n reportErrs(() => cxt.error());\n }\n else {\n const ruleErrs = def.async ? validateAsync() : validateSync();\n if (def.modifying)\n modifyData(cxt);\n reportErrs(() => addErrs(cxt, ruleErrs));\n }\n }\n function validateAsync() {\n const ruleErrs = gen.let(\"ruleErrs\", null);\n gen.try(() => assignValid((0, codegen_1._) `await `), (e) => gen.assign(valid, false).if((0, codegen_1._) `${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._) `${e}.errors`), () => gen.throw(e)));\n return ruleErrs;\n }\n function validateSync() {\n const validateErrs = (0, codegen_1._) `${validateRef}.errors`;\n gen.assign(validateErrs, null);\n assignValid(codegen_1.nil);\n return validateErrs;\n }\n function assignValid(_await = def.async ? (0, codegen_1._) `await ` : codegen_1.nil) {\n const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;\n const passSchema = !((\"compile\" in def && !$data) || def.schema === false);\n gen.assign(valid, (0, codegen_1._) `${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);\n }\n function reportErrs(errors) {\n var _a;\n gen.if((0, codegen_1.not)((_a = def.valid) !== null && _a !== void 0 ? _a : valid), errors);\n }\n}\nfunction modifyData(cxt) {\n const { gen, data, it } = cxt;\n gen.if(it.parentData, () => gen.assign(data, (0, codegen_1._) `${it.parentData}[${it.parentDataProperty}]`));\n}\nfunction addErrs(cxt, errs) {\n const { gen } = cxt;\n gen.if((0, codegen_1._) `Array.isArray(${errs})`, () => {\n gen\n .assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`)\n .assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`);\n (0, errors_1.extendErrors)(cxt);\n }, () => cxt.error());\n}\nfunction checkAsyncKeyword({ schemaEnv }, def) {\n if (def.async && !schemaEnv.$async)\n throw new Error(\"async keyword in sync schema\");\n}\nfunction useKeyword(gen, keyword, result) {\n if (result === undefined)\n throw new Error(`keyword \"${keyword}\" failed to compile`);\n return gen.scopeValue(\"keyword\", typeof result == \"function\" ? { ref: result } : { ref: result, code: (0, codegen_1.stringify)(result) });\n}\nfunction validSchemaType(schema, schemaType, allowUndefined = false) {\n // TODO add tests\n return (!schemaType.length ||\n schemaType.some((st) => st === \"array\"\n ? Array.isArray(schema)\n : st === \"object\"\n ? schema && typeof schema == \"object\" && !Array.isArray(schema)\n : typeof schema == st || (allowUndefined && typeof schema == \"undefined\")));\n}\nfunction validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword) {\n /* istanbul ignore if */\n if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {\n throw new Error(\"ajv implementation error\");\n }\n const deps = def.dependencies;\n if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {\n throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(\",\")}`);\n }\n if (def.validateSchema) {\n const valid = def.validateSchema(schema[keyword]);\n if (!valid) {\n const msg = `keyword \"${keyword}\" value is invalid at path \"${errSchemaPath}\": ` +\n self.errorsText(def.validateSchema.errors);\n if (opts.validateSchema === \"log\")\n self.logger.error(msg);\n else\n throw new Error(msg);\n }\n }\n}\n//# sourceMappingURL=keyword.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSubschema = getSubschema;\nexports.extendSubschemaData = extendSubschemaData;\nexports.extendSubschemaMode = extendSubschemaMode;\nconst codegen_1 = require(\"../codegen\");\nconst util_1 = require(\"../util\");\nfunction getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {\n if (keyword !== undefined && schema !== undefined) {\n throw new Error('both \"keyword\" and \"schema\" passed, only one allowed');\n }\n if (keyword !== undefined) {\n const sch = it.schema[keyword];\n return schemaProp === undefined\n ? {\n schema: sch,\n schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`,\n errSchemaPath: `${it.errSchemaPath}/${keyword}`,\n }\n : {\n schema: sch[schemaProp],\n schemaPath: (0, codegen_1._) `${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`,\n errSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`,\n };\n }\n if (schema !== undefined) {\n if (schemaPath === undefined || errSchemaPath === undefined || topSchemaRef === undefined) {\n throw new Error('\"schemaPath\", \"errSchemaPath\" and \"topSchemaRef\" are required with \"schema\"');\n }\n return {\n schema,\n schemaPath,\n topSchemaRef,\n errSchemaPath,\n };\n }\n throw new Error('either \"keyword\" or \"schema\" must be passed');\n}\nfunction extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {\n if (data !== undefined && dataProp !== undefined) {\n throw new Error('both \"data\" and \"dataProp\" passed, only one allowed');\n }\n const { gen } = it;\n if (dataProp !== undefined) {\n const { errorPath, dataPathArr, opts } = it;\n const nextData = gen.let(\"data\", (0, codegen_1._) `${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true);\n dataContextProps(nextData);\n subschema.errorPath = (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;\n subschema.parentDataProperty = (0, codegen_1._) `${dataProp}`;\n subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty];\n }\n if (data !== undefined) {\n const nextData = data instanceof codegen_1.Name ? data : gen.let(\"data\", data, true); // replaceable if used once?\n dataContextProps(nextData);\n if (propertyName !== undefined)\n subschema.propertyName = propertyName;\n // TODO something is possibly wrong here with not changing parentDataProperty and not appending dataPathArr\n }\n if (dataTypes)\n subschema.dataTypes = dataTypes;\n function dataContextProps(_nextData) {\n subschema.data = _nextData;\n subschema.dataLevel = it.dataLevel + 1;\n subschema.dataTypes = [];\n it.definedProperties = new Set();\n subschema.parentData = it.data;\n subschema.dataNames = [...it.dataNames, _nextData];\n }\n}\nfunction extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {\n if (compositeRule !== undefined)\n subschema.compositeRule = compositeRule;\n if (createErrors !== undefined)\n subschema.createErrors = createErrors;\n if (allErrors !== undefined)\n subschema.allErrors = allErrors;\n subschema.jtdDiscriminator = jtdDiscriminator; // not inherited\n subschema.jtdMetadata = jtdMetadata; // not inherited\n}\n//# sourceMappingURL=subschema.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;\nvar validate_1 = require(\"./compile/validate\");\nObject.defineProperty(exports, \"KeywordCxt\", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });\nvar codegen_1 = require(\"./compile/codegen\");\nObject.defineProperty(exports, \"_\", { enumerable: true, get: function () { return codegen_1._; } });\nObject.defineProperty(exports, \"str\", { enumerable: true, get: function () { return codegen_1.str; } });\nObject.defineProperty(exports, \"stringify\", { enumerable: true, get: function () { return codegen_1.stringify; } });\nObject.defineProperty(exports, \"nil\", { enumerable: true, get: function () { return codegen_1.nil; } });\nObject.defineProperty(exports, \"Name\", { enumerable: true, get: function () { return codegen_1.Name; } });\nObject.defineProperty(exports, \"CodeGen\", { enumerable: true, get: function () { return codegen_1.CodeGen; } });\nconst validation_error_1 = require(\"./runtime/validation_error\");\nconst ref_error_1 = require(\"./compile/ref_error\");\nconst rules_1 = require(\"./compile/rules\");\nconst compile_1 = require(\"./compile\");\nconst codegen_2 = require(\"./compile/codegen\");\nconst resolve_1 = require(\"./compile/resolve\");\nconst dataType_1 = require(\"./compile/validate/dataType\");\nconst util_1 = require(\"./compile/util\");\nconst $dataRefSchema = require(\"./refs/data.json\");\nconst uri_1 = require(\"./runtime/uri\");\nconst defaultRegExp = (str, flags) => new RegExp(str, flags);\ndefaultRegExp.code = \"new RegExp\";\nconst META_IGNORE_OPTIONS = [\n \"removeAdditional\",\n \"useDefaults\",\n \"coerceTypes\",\n \"defaultUnevaluatedProperties\",\n \"defaultAdditionalProperties\",\n];\nconst EXT_SCOPE_NAMES = new Set([\n \"validate\",\n \"serialize\",\n \"parse\",\n \"wrapper\",\n \"root\",\n \"schema\",\n \"keyword\",\n \"pattern\",\n \"formats\",\n \"validate$data\",\n \"func\",\n \"obj\",\n \"Error\",\n]);\nconst removedOptions = {\n errorDataPath: \"\",\n format: \"`validateFormats: false` can be used instead.\",\n nullable: '\"nullable\" keyword is supported by default.',\n jsonPointers: \"Deprecated jsPropertySyntax can be used instead.\",\n extendRefs: \"Deprecated ignoreKeywordsWithRef can be used instead.\",\n missingRefs: \"Pass empty schema with $id that should be ignored to ajv.addSchema.\",\n processCode: \"Use option `code: {process: (code, schemaEnv: object) => string}`\",\n sourceCode: \"Use option `code: {source: true}`\",\n strictDefaults: \"It is default now, see option `strict`.\",\n strictKeywords: \"It is default now, see option `strict`.\",\n uniqueItems: '\"uniqueItems\" keyword is always validated.',\n unknownFormats: \"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).\",\n cache: \"Map is used as cache, schema object as key.\",\n serialize: \"Map is used as cache, schema object as key.\",\n ajvErrors: \"It is default now.\",\n};\nconst deprecatedOptions = {\n ignoreKeywordsWithRef: \"\",\n jsPropertySyntax: \"\",\n unicode: '\"minLength\"/\"maxLength\" account for unicode characters by default.',\n};\nconst MAX_EXPRESSION = 200;\n// eslint-disable-next-line complexity\nfunction requiredOptions(o) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;\n const s = o.strict;\n const _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize;\n const optimize = _optz === true || _optz === undefined ? 1 : _optz || 0;\n const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;\n const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;\n return {\n strictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true,\n strictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true,\n strictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : \"log\",\n strictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : \"log\",\n strictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false,\n code: o.code ? { ...o.code, optimize, regExp } : { optimize, regExp },\n loopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION,\n loopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION,\n meta: (_s = o.meta) !== null && _s !== void 0 ? _s : true,\n messages: (_t = o.messages) !== null && _t !== void 0 ? _t : true,\n inlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true,\n schemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : \"$id\",\n addUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true,\n validateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true,\n validateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true,\n unicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true,\n int32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true,\n uriResolver: uriResolver,\n };\n}\nclass Ajv {\n constructor(opts = {}) {\n this.schemas = {};\n this.refs = {};\n this.formats = {};\n this._compilations = new Set();\n this._loading = {};\n this._cache = new Map();\n opts = this.opts = { ...opts, ...requiredOptions(opts) };\n const { es5, lines } = this.opts.code;\n this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines });\n this.logger = getLogger(opts.logger);\n const formatOpt = opts.validateFormats;\n opts.validateFormats = false;\n this.RULES = (0, rules_1.getRules)();\n checkOptions.call(this, removedOptions, opts, \"NOT SUPPORTED\");\n checkOptions.call(this, deprecatedOptions, opts, \"DEPRECATED\", \"warn\");\n this._metaOpts = getMetaSchemaOptions.call(this);\n if (opts.formats)\n addInitialFormats.call(this);\n this._addVocabularies();\n this._addDefaultMetaSchema();\n if (opts.keywords)\n addInitialKeywords.call(this, opts.keywords);\n if (typeof opts.meta == \"object\")\n this.addMetaSchema(opts.meta);\n addInitialSchemas.call(this);\n opts.validateFormats = formatOpt;\n }\n _addVocabularies() {\n this.addKeyword(\"$async\");\n }\n _addDefaultMetaSchema() {\n const { $data, meta, schemaId } = this.opts;\n let _dataRefSchema = $dataRefSchema;\n if (schemaId === \"id\") {\n _dataRefSchema = { ...$dataRefSchema };\n _dataRefSchema.id = _dataRefSchema.$id;\n delete _dataRefSchema.$id;\n }\n if (meta && $data)\n this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false);\n }\n defaultMeta() {\n const { meta, schemaId } = this.opts;\n return (this.opts.defaultMeta = typeof meta == \"object\" ? meta[schemaId] || meta : undefined);\n }\n validate(schemaKeyRef, // key, ref or schema object\n data // to be validated\n ) {\n let v;\n if (typeof schemaKeyRef == \"string\") {\n v = this.getSchema(schemaKeyRef);\n if (!v)\n throw new Error(`no schema with key or ref \"${schemaKeyRef}\"`);\n }\n else {\n v = this.compile(schemaKeyRef);\n }\n const valid = v(data);\n if (!(\"$async\" in v))\n this.errors = v.errors;\n return valid;\n }\n compile(schema, _meta) {\n const sch = this._addSchema(schema, _meta);\n return (sch.validate || this._compileSchemaEnv(sch));\n }\n compileAsync(schema, meta) {\n if (typeof this.opts.loadSchema != \"function\") {\n throw new Error(\"options.loadSchema should be a function\");\n }\n const { loadSchema } = this.opts;\n return runCompileAsync.call(this, schema, meta);\n async function runCompileAsync(_schema, _meta) {\n await loadMetaSchema.call(this, _schema.$schema);\n const sch = this._addSchema(_schema, _meta);\n return sch.validate || _compileAsync.call(this, sch);\n }\n async function loadMetaSchema($ref) {\n if ($ref && !this.getSchema($ref)) {\n await runCompileAsync.call(this, { $ref }, true);\n }\n }\n async function _compileAsync(sch) {\n try {\n return this._compileSchemaEnv(sch);\n }\n catch (e) {\n if (!(e instanceof ref_error_1.default))\n throw e;\n checkLoaded.call(this, e);\n await loadMissingSchema.call(this, e.missingSchema);\n return _compileAsync.call(this, sch);\n }\n }\n function checkLoaded({ missingSchema: ref, missingRef }) {\n if (this.refs[ref]) {\n throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`);\n }\n }\n async function loadMissingSchema(ref) {\n const _schema = await _loadSchema.call(this, ref);\n if (!this.refs[ref])\n await loadMetaSchema.call(this, _schema.$schema);\n if (!this.refs[ref])\n this.addSchema(_schema, ref, meta);\n }\n async function _loadSchema(ref) {\n const p = this._loading[ref];\n if (p)\n return p;\n try {\n return await (this._loading[ref] = loadSchema(ref));\n }\n finally {\n delete this._loading[ref];\n }\n }\n }\n // Adds schema to the instance\n addSchema(schema, // If array is passed, `key` will be ignored\n key, // Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.\n _meta, // true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.\n _validateSchema = this.opts.validateSchema // false to skip schema validation. Used internally, option validateSchema should be used instead.\n ) {\n if (Array.isArray(schema)) {\n for (const sch of schema)\n this.addSchema(sch, undefined, _meta, _validateSchema);\n return this;\n }\n let id;\n if (typeof schema === \"object\") {\n const { schemaId } = this.opts;\n id = schema[schemaId];\n if (id !== undefined && typeof id != \"string\") {\n throw new Error(`schema ${schemaId} must be string`);\n }\n }\n key = (0, resolve_1.normalizeId)(key || id);\n this._checkUnique(key);\n this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);\n return this;\n }\n // Add schema that will be used to validate other schemas\n // options in META_IGNORE_OPTIONS are alway set to false\n addMetaSchema(schema, key, // schema key\n _validateSchema = this.opts.validateSchema // false to skip schema validation, can be used to override validateSchema option for meta-schema\n ) {\n this.addSchema(schema, key, true, _validateSchema);\n return this;\n }\n // Validate schema against its meta-schema\n validateSchema(schema, throwOrLogError) {\n if (typeof schema == \"boolean\")\n return true;\n let $schema;\n $schema = schema.$schema;\n if ($schema !== undefined && typeof $schema != \"string\") {\n throw new Error(\"$schema must be a string\");\n }\n $schema = $schema || this.opts.defaultMeta || this.defaultMeta();\n if (!$schema) {\n this.logger.warn(\"meta-schema not available\");\n this.errors = null;\n return true;\n }\n const valid = this.validate($schema, schema);\n if (!valid && throwOrLogError) {\n const message = \"schema is invalid: \" + this.errorsText();\n if (this.opts.validateSchema === \"log\")\n this.logger.error(message);\n else\n throw new Error(message);\n }\n return valid;\n }\n // Get compiled schema by `key` or `ref`.\n // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)\n getSchema(keyRef) {\n let sch;\n while (typeof (sch = getSchEnv.call(this, keyRef)) == \"string\")\n keyRef = sch;\n if (sch === undefined) {\n const { schemaId } = this.opts;\n const root = new compile_1.SchemaEnv({ schema: {}, schemaId });\n sch = compile_1.resolveSchema.call(this, root, keyRef);\n if (!sch)\n return;\n this.refs[keyRef] = sch;\n }\n return (sch.validate || this._compileSchemaEnv(sch));\n }\n // Remove cached schema(s).\n // If no parameter is passed all schemas but meta-schemas are removed.\n // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.\n // Even if schema is referenced by other schemas it still can be removed as other schemas have local references.\n removeSchema(schemaKeyRef) {\n if (schemaKeyRef instanceof RegExp) {\n this._removeAllSchemas(this.schemas, schemaKeyRef);\n this._removeAllSchemas(this.refs, schemaKeyRef);\n return this;\n }\n switch (typeof schemaKeyRef) {\n case \"undefined\":\n this._removeAllSchemas(this.schemas);\n this._removeAllSchemas(this.refs);\n this._cache.clear();\n return this;\n case \"string\": {\n const sch = getSchEnv.call(this, schemaKeyRef);\n if (typeof sch == \"object\")\n this._cache.delete(sch.schema);\n delete this.schemas[schemaKeyRef];\n delete this.refs[schemaKeyRef];\n return this;\n }\n case \"object\": {\n const cacheKey = schemaKeyRef;\n this._cache.delete(cacheKey);\n let id = schemaKeyRef[this.opts.schemaId];\n if (id) {\n id = (0, resolve_1.normalizeId)(id);\n delete this.schemas[id];\n delete this.refs[id];\n }\n return this;\n }\n default:\n throw new Error(\"ajv.removeSchema: invalid parameter\");\n }\n }\n // add \"vocabulary\" - a collection of keywords\n addVocabulary(definitions) {\n for (const def of definitions)\n this.addKeyword(def);\n return this;\n }\n addKeyword(kwdOrDef, def // deprecated\n ) {\n let keyword;\n if (typeof kwdOrDef == \"string\") {\n keyword = kwdOrDef;\n if (typeof def == \"object\") {\n this.logger.warn(\"these parameters are deprecated, see docs for addKeyword\");\n def.keyword = keyword;\n }\n }\n else if (typeof kwdOrDef == \"object\" && def === undefined) {\n def = kwdOrDef;\n keyword = def.keyword;\n if (Array.isArray(keyword) && !keyword.length) {\n throw new Error(\"addKeywords: keyword must be string or non-empty array\");\n }\n }\n else {\n throw new Error(\"invalid addKeywords parameters\");\n }\n checkKeyword.call(this, keyword, def);\n if (!def) {\n (0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd));\n return this;\n }\n keywordMetaschema.call(this, def);\n const definition = {\n ...def,\n type: (0, dataType_1.getJSONTypes)(def.type),\n schemaType: (0, dataType_1.getJSONTypes)(def.schemaType),\n };\n (0, util_1.eachItem)(keyword, definition.type.length === 0\n ? (k) => addRule.call(this, k, definition)\n : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t)));\n return this;\n }\n getKeyword(keyword) {\n const rule = this.RULES.all[keyword];\n return typeof rule == \"object\" ? rule.definition : !!rule;\n }\n // Remove keyword\n removeKeyword(keyword) {\n // TODO return type should be Ajv\n const { RULES } = this;\n delete RULES.keywords[keyword];\n delete RULES.all[keyword];\n for (const group of RULES.rules) {\n const i = group.rules.findIndex((rule) => rule.keyword === keyword);\n if (i >= 0)\n group.rules.splice(i, 1);\n }\n return this;\n }\n // Add format\n addFormat(name, format) {\n if (typeof format == \"string\")\n format = new RegExp(format);\n this.formats[name] = format;\n return this;\n }\n errorsText(errors = this.errors, // optional array of validation errors\n { separator = \", \", dataVar = \"data\" } = {} // optional options with properties `separator` and `dataVar`\n ) {\n if (!errors || errors.length === 0)\n return \"No errors\";\n return errors\n .map((e) => `${dataVar}${e.instancePath} ${e.message}`)\n .reduce((text, msg) => text + separator + msg);\n }\n $dataMetaSchema(metaSchema, keywordsJsonPointers) {\n const rules = this.RULES.all;\n metaSchema = JSON.parse(JSON.stringify(metaSchema));\n for (const jsonPointer of keywordsJsonPointers) {\n const segments = jsonPointer.split(\"/\").slice(1); // first segment is an empty string\n let keywords = metaSchema;\n for (const seg of segments)\n keywords = keywords[seg];\n for (const key in rules) {\n const rule = rules[key];\n if (typeof rule != \"object\")\n continue;\n const { $data } = rule.definition;\n const schema = keywords[key];\n if ($data && schema)\n keywords[key] = schemaOrData(schema);\n }\n }\n return metaSchema;\n }\n _removeAllSchemas(schemas, regex) {\n for (const keyRef in schemas) {\n const sch = schemas[keyRef];\n if (!regex || regex.test(keyRef)) {\n if (typeof sch == \"string\") {\n delete schemas[keyRef];\n }\n else if (sch && !sch.meta) {\n this._cache.delete(sch.schema);\n delete schemas[keyRef];\n }\n }\n }\n }\n _addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {\n let id;\n const { schemaId } = this.opts;\n if (typeof schema == \"object\") {\n id = schema[schemaId];\n }\n else {\n if (this.opts.jtd)\n throw new Error(\"schema must be object\");\n else if (typeof schema != \"boolean\")\n throw new Error(\"schema must be object or boolean\");\n }\n let sch = this._cache.get(schema);\n if (sch !== undefined)\n return sch;\n baseId = (0, resolve_1.normalizeId)(id || baseId);\n const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);\n sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs });\n this._cache.set(sch.schema, sch);\n if (addSchema && !baseId.startsWith(\"#\")) {\n // TODO atm it is allowed to overwrite schemas without id (instead of not adding them)\n if (baseId)\n this._checkUnique(baseId);\n this.refs[baseId] = sch;\n }\n if (validateSchema)\n this.validateSchema(schema, true);\n return sch;\n }\n _checkUnique(id) {\n if (this.schemas[id] || this.refs[id]) {\n throw new Error(`schema with key or id \"${id}\" already exists`);\n }\n }\n _compileSchemaEnv(sch) {\n if (sch.meta)\n this._compileMetaSchema(sch);\n else\n compile_1.compileSchema.call(this, sch);\n /* istanbul ignore if */\n if (!sch.validate)\n throw new Error(\"ajv implementation error\");\n return sch.validate;\n }\n _compileMetaSchema(sch) {\n const currentOpts = this.opts;\n this.opts = this._metaOpts;\n try {\n compile_1.compileSchema.call(this, sch);\n }\n finally {\n this.opts = currentOpts;\n }\n }\n}\nAjv.ValidationError = validation_error_1.default;\nAjv.MissingRefError = ref_error_1.default;\nexports.default = Ajv;\nfunction checkOptions(checkOpts, options, msg, log = \"error\") {\n for (const key in checkOpts) {\n const opt = key;\n if (opt in options)\n this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`);\n }\n}\nfunction getSchEnv(keyRef) {\n keyRef = (0, resolve_1.normalizeId)(keyRef); // TODO tests fail without this line\n return this.schemas[keyRef] || this.refs[keyRef];\n}\nfunction addInitialSchemas() {\n const optsSchemas = this.opts.schemas;\n if (!optsSchemas)\n return;\n if (Array.isArray(optsSchemas))\n this.addSchema(optsSchemas);\n else\n for (const key in optsSchemas)\n this.addSchema(optsSchemas[key], key);\n}\nfunction addInitialFormats() {\n for (const name in this.opts.formats) {\n const format = this.opts.formats[name];\n if (format)\n this.addFormat(name, format);\n }\n}\nfunction addInitialKeywords(defs) {\n if (Array.isArray(defs)) {\n this.addVocabulary(defs);\n return;\n }\n this.logger.warn(\"keywords option as map is deprecated, pass array\");\n for (const keyword in defs) {\n const def = defs[keyword];\n if (!def.keyword)\n def.keyword = keyword;\n this.addKeyword(def);\n }\n}\nfunction getMetaSchemaOptions() {\n const metaOpts = { ...this.opts };\n for (const opt of META_IGNORE_OPTIONS)\n delete metaOpts[opt];\n return metaOpts;\n}\nconst noLogs = { log() { }, warn() { }, error() { } };\nfunction getLogger(logger) {\n if (logger === false)\n return noLogs;\n if (logger === undefined)\n return console;\n if (logger.log && logger.warn && logger.error)\n return logger;\n throw new Error(\"logger must implement log, warn and error methods\");\n}\nconst KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;\nfunction checkKeyword(keyword, def) {\n const { RULES } = this;\n (0, util_1.eachItem)(keyword, (kwd) => {\n if (RULES.keywords[kwd])\n throw new Error(`Keyword ${kwd} is already defined`);\n if (!KEYWORD_NAME.test(kwd))\n throw new Error(`Keyword ${kwd} has invalid name`);\n });\n if (!def)\n return;\n if (def.$data && !(\"code\" in def || \"validate\" in def)) {\n throw new Error('$data keyword must have \"code\" or \"validate\" function');\n }\n}\nfunction addRule(keyword, definition, dataType) {\n var _a;\n const post = definition === null || definition === void 0 ? void 0 : definition.post;\n if (dataType && post)\n throw new Error('keyword with \"post\" flag cannot have \"type\"');\n const { RULES } = this;\n let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType);\n if (!ruleGroup) {\n ruleGroup = { type: dataType, rules: [] };\n RULES.rules.push(ruleGroup);\n }\n RULES.keywords[keyword] = true;\n if (!definition)\n return;\n const rule = {\n keyword,\n definition: {\n ...definition,\n type: (0, dataType_1.getJSONTypes)(definition.type),\n schemaType: (0, dataType_1.getJSONTypes)(definition.schemaType),\n },\n };\n if (definition.before)\n addBeforeRule.call(this, ruleGroup, rule, definition.before);\n else\n ruleGroup.rules.push(rule);\n RULES.all[keyword] = rule;\n (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd));\n}\nfunction addBeforeRule(ruleGroup, rule, before) {\n const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);\n if (i >= 0) {\n ruleGroup.rules.splice(i, 0, rule);\n }\n else {\n ruleGroup.rules.push(rule);\n this.logger.warn(`rule ${before} is not defined`);\n }\n}\nfunction keywordMetaschema(def) {\n let { metaSchema } = def;\n if (metaSchema === undefined)\n return;\n if (def.$data && this.opts.$data)\n metaSchema = schemaOrData(metaSchema);\n def.validateSchema = this.compile(metaSchema, true);\n}\nconst $dataRef = {\n $ref: \"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\",\n};\nfunction schemaOrData(schema) {\n return { anyOf: [schema, $dataRef] };\n}\n//# sourceMappingURL=core.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = addMetaSchema2020;\nconst metaSchema = require(\"./schema.json\");\nconst applicator = require(\"./meta/applicator.json\");\nconst unevaluated = require(\"./meta/unevaluated.json\");\nconst content = require(\"./meta/content.json\");\nconst core = require(\"./meta/core.json\");\nconst format = require(\"./meta/format-annotation.json\");\nconst metadata = require(\"./meta/meta-data.json\");\nconst validation = require(\"./meta/validation.json\");\nconst META_SUPPORT_DATA = [\"/properties\"];\nfunction addMetaSchema2020($data) {\n ;\n [\n metaSchema,\n applicator,\n unevaluated,\n content,\n core,\n with$data(this, format),\n metadata,\n with$data(this, validation),\n ].forEach((sch) => this.addMetaSchema(sch, undefined, false));\n return this;\n function with$data(ajv, sch) {\n return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;\n }\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// https://github.com/ajv-validator/ajv/issues/889\nconst equal = require(\"fast-deep-equal\");\nequal.code = 'require(\"ajv/dist/runtime/equal\").default';\nexports.default = equal;\n//# sourceMappingURL=equal.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = ucs2length;\n// https://mathiasbynens.be/notes/javascript-encoding\n// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode\nfunction ucs2length(str) {\n const len = str.length;\n let length = 0;\n let pos = 0;\n let value;\n while (pos < len) {\n length++;\n value = str.charCodeAt(pos++);\n if (value >= 0xd800 && value <= 0xdbff && pos < len) {\n // high surrogate, and there is a next character\n value = str.charCodeAt(pos);\n if ((value & 0xfc00) === 0xdc00)\n pos++; // low surrogate\n }\n }\n return length;\n}\nucs2length.code = 'require(\"ajv/dist/runtime/ucs2length\").default';\n//# sourceMappingURL=ucs2length.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst uri = require(\"uri-js-replace\");\nuri.code = 'require(\"ajv/dist/runtime/uri\").default';\nexports.default = uri;\n//# sourceMappingURL=uri.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass ValidationError extends Error {\n constructor(errors) {\n super(\"validation failed\");\n this.errors = errors;\n this.ajv = this.validation = true;\n }\n}\nexports.default = ValidationError;\n//# sourceMappingURL=validation_error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateAdditionalItems = validateAdditionalItems;\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`,\n params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`,\n};\nconst def = {\n keyword: \"additionalItems\",\n type: \"array\",\n schemaType: [\"boolean\", \"object\"],\n before: \"uniqueItems\",\n error,\n code(cxt) {\n const { parentSchema, it } = cxt;\n const { items } = parentSchema;\n if (!Array.isArray(items)) {\n (0, util_1.checkStrictMode)(it, '\"additionalItems\" is ignored when \"items\" is not an array of schemas');\n return;\n }\n validateAdditionalItems(cxt, items);\n },\n};\nfunction validateAdditionalItems(cxt, items) {\n const { gen, schema, data, keyword, it } = cxt;\n it.items = true;\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n if (schema === false) {\n cxt.setParams({ len: items.length });\n cxt.pass((0, codegen_1._) `${len} <= ${items.length}`);\n }\n else if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n const valid = gen.var(\"valid\", (0, codegen_1._) `${len} <= ${items.length}`); // TODO var\n gen.if((0, codegen_1.not)(valid), () => validateItems(valid));\n cxt.ok(valid);\n }\n function validateItems(valid) {\n gen.forRange(\"i\", items.length, len, (i) => {\n cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid);\n if (!it.allErrors)\n gen.if((0, codegen_1.not)(valid), () => gen.break());\n });\n }\n}\nexports.default = def;\n//# sourceMappingURL=additionalItems.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst names_1 = require(\"../../compile/names\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: \"must NOT have additional properties\",\n params: ({ params }) => (0, codegen_1._) `{additionalProperty: ${params.additionalProperty}}`,\n};\nconst def = {\n keyword: \"additionalProperties\",\n type: [\"object\"],\n schemaType: [\"boolean\", \"object\"],\n allowUndefined: true,\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, parentSchema, data, errsCount, it } = cxt;\n const { schema = it.opts.defaultAdditionalProperties } = cxt;\n /* istanbul ignore if */\n if (!errsCount)\n throw new Error(\"ajv implementation error\");\n const { allErrors, opts } = it;\n it.props = true;\n if (opts.removeAdditional !== \"all\" && (0, util_1.alwaysValidSchema)(it, schema))\n return;\n const props = (0, code_1.allSchemaProperties)(parentSchema.properties);\n const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties);\n checkAdditionalProperties();\n cxt.ok((0, codegen_1._) `${errsCount} === ${names_1.default.errors}`);\n function checkAdditionalProperties() {\n gen.forIn(\"key\", data, (key) => {\n if (!props.length && !patProps.length)\n additionalPropertyCode(key);\n else\n gen.if(isAdditional(key), () => additionalPropertyCode(key));\n });\n }\n function isAdditional(key) {\n let definedProp;\n if (props.length > 8) {\n // TODO maybe an option instead of hard-coded 8?\n const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, \"properties\");\n definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);\n }\n else if (props.length) {\n definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._) `${key} === ${p}`));\n }\n else {\n definedProp = codegen_1.nil;\n }\n if (patProps.length) {\n definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._) `${(0, code_1.usePattern)(cxt, p)}.test(${key})`));\n }\n return (0, codegen_1.not)(definedProp);\n }\n function deleteAdditional(key) {\n gen.code((0, codegen_1._) `delete ${data}[${key}]`);\n }\n function additionalPropertyCode(key) {\n if (opts.removeAdditional === \"all\" || (opts.removeAdditional && schema === false)) {\n deleteAdditional(key);\n return;\n }\n if (schema === false) {\n cxt.setParams({ additionalProperty: key });\n cxt.error();\n if (!allErrors)\n gen.break();\n return;\n }\n if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n const valid = gen.name(\"valid\");\n if (opts.removeAdditional === \"failing\") {\n applyAdditionalSchema(key, valid, false);\n gen.if((0, codegen_1.not)(valid), () => {\n cxt.reset();\n deleteAdditional(key);\n });\n }\n else {\n applyAdditionalSchema(key, valid);\n if (!allErrors)\n gen.if((0, codegen_1.not)(valid), () => gen.break());\n }\n }\n }\n function applyAdditionalSchema(key, valid, errors) {\n const subschema = {\n keyword: \"additionalProperties\",\n dataProp: key,\n dataPropType: util_1.Type.Str,\n };\n if (errors === false) {\n Object.assign(subschema, {\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n });\n }\n cxt.subschema(subschema, valid);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=additionalProperties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: \"allOf\",\n schemaType: \"array\",\n code(cxt) {\n const { gen, schema, it } = cxt;\n /* istanbul ignore if */\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n const valid = gen.name(\"valid\");\n schema.forEach((sch, i) => {\n if ((0, util_1.alwaysValidSchema)(it, sch))\n return;\n const schCxt = cxt.subschema({ keyword: \"allOf\", schemaProp: i }, valid, true);\n cxt.ok(valid);\n cxt.mergeEvaluated(schCxt);\n });\n },\n};\nexports.default = def;\n//# sourceMappingURL=allOf.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst def = {\n keyword: \"anyOf\",\n schemaType: \"array\",\n trackErrors: true,\n code: code_1.validateUnion,\n error: { message: \"must match a schema in anyOf\" },\n};\nexports.default = def;\n//# sourceMappingURL=anyOf.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { min, max } }) => max === undefined\n ? (0, codegen_1.str) `must contain at least ${min} valid item(s)`\n : (0, codegen_1.str) `must contain at least ${min} and no more than ${max} valid item(s)`,\n params: ({ params: { min, max } }) => max === undefined ? (0, codegen_1._) `{minContains: ${min}}` : (0, codegen_1._) `{minContains: ${min}, maxContains: ${max}}`,\n};\nconst def = {\n keyword: \"contains\",\n type: \"array\",\n schemaType: [\"object\", \"boolean\"],\n before: \"uniqueItems\",\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, schema, parentSchema, data, it } = cxt;\n let min;\n let max;\n const { minContains, maxContains } = parentSchema;\n if (it.opts.next) {\n min = minContains === undefined ? 1 : minContains;\n max = maxContains;\n }\n else {\n min = 1;\n }\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n cxt.setParams({ min, max });\n if (max === undefined && min === 0) {\n (0, util_1.checkStrictMode)(it, `\"minContains\" == 0 without \"maxContains\": \"contains\" keyword ignored`);\n return;\n }\n if (max !== undefined && min > max) {\n (0, util_1.checkStrictMode)(it, `\"minContains\" > \"maxContains\" is always invalid`);\n cxt.fail();\n return;\n }\n if ((0, util_1.alwaysValidSchema)(it, schema)) {\n let cond = (0, codegen_1._) `${len} >= ${min}`;\n if (max !== undefined)\n cond = (0, codegen_1._) `${cond} && ${len} <= ${max}`;\n cxt.pass(cond);\n return;\n }\n it.items = true;\n const valid = gen.name(\"valid\");\n if (max === undefined && min === 1) {\n validateItems(valid, () => gen.if(valid, () => gen.break()));\n }\n else if (min === 0) {\n gen.let(valid, true);\n if (max !== undefined)\n gen.if((0, codegen_1._) `${data}.length > 0`, validateItemsWithCount);\n }\n else {\n gen.let(valid, false);\n validateItemsWithCount();\n }\n cxt.result(valid, () => cxt.reset());\n function validateItemsWithCount() {\n const schValid = gen.name(\"_valid\");\n const count = gen.let(\"count\", 0);\n validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));\n }\n function validateItems(_valid, block) {\n gen.forRange(\"i\", 0, len, (i) => {\n cxt.subschema({\n keyword: \"contains\",\n dataProp: i,\n dataPropType: util_1.Type.Num,\n compositeRule: true,\n }, _valid);\n block();\n });\n }\n function checkLimits(count) {\n gen.code((0, codegen_1._) `${count}++`);\n if (max === undefined) {\n gen.if((0, codegen_1._) `${count} >= ${min}`, () => gen.assign(valid, true).break());\n }\n else {\n gen.if((0, codegen_1._) `${count} > ${max}`, () => gen.assign(valid, false).break());\n if (min === 1)\n gen.assign(valid, true);\n else\n gen.if((0, codegen_1._) `${count} >= ${min}`, () => gen.assign(valid, true));\n }\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=contains.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.error = void 0;\nexports.validatePropertyDeps = validatePropertyDeps;\nexports.validateSchemaDeps = validateSchemaDeps;\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst code_1 = require(\"../code\");\nexports.error = {\n message: ({ params: { property, depsCount, deps } }) => {\n const property_ies = depsCount === 1 ? \"property\" : \"properties\";\n return (0, codegen_1.str) `must have ${property_ies} ${deps} when property ${property} is present`;\n },\n params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._) `{property: ${property},\n missingProperty: ${missingProperty},\n depsCount: ${depsCount},\n deps: ${deps}}`, // TODO change to reference\n};\nconst def = {\n keyword: \"dependencies\",\n type: \"object\",\n schemaType: \"object\",\n error: exports.error,\n code(cxt) {\n const [propDeps, schDeps] = splitDependencies(cxt);\n validatePropertyDeps(cxt, propDeps);\n validateSchemaDeps(cxt, schDeps);\n },\n};\nfunction splitDependencies({ schema }) {\n const propertyDeps = {};\n const schemaDeps = {};\n for (const key in schema) {\n if (key === \"__proto__\")\n continue;\n const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps;\n deps[key] = schema[key];\n }\n return [propertyDeps, schemaDeps];\n}\nfunction validatePropertyDeps(cxt, propertyDeps = cxt.schema) {\n const { gen, data, it } = cxt;\n if (Object.keys(propertyDeps).length === 0)\n return;\n const missing = gen.let(\"missing\");\n for (const prop in propertyDeps) {\n const deps = propertyDeps[prop];\n if (deps.length === 0)\n continue;\n const hasProperty = (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties);\n cxt.setParams({\n property: prop,\n depsCount: deps.length,\n deps: deps.join(\", \"),\n });\n if (it.allErrors) {\n gen.if(hasProperty, () => {\n for (const depProp of deps) {\n (0, code_1.checkReportMissingProp)(cxt, depProp);\n }\n });\n }\n else {\n gen.if((0, codegen_1._) `${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`);\n (0, code_1.reportMissingProp)(cxt, missing);\n gen.else();\n }\n }\n}\nfunction validateSchemaDeps(cxt, schemaDeps = cxt.schema) {\n const { gen, data, keyword, it } = cxt;\n const valid = gen.name(\"valid\");\n for (const prop in schemaDeps) {\n if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop]))\n continue;\n gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties), () => {\n const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid);\n cxt.mergeValidEvaluated(schCxt, valid);\n }, () => gen.var(valid, true) // TODO var\n );\n cxt.ok(valid);\n }\n}\nexports.default = def;\n//# sourceMappingURL=dependencies.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst dependencies_1 = require(\"./dependencies\");\nconst def = {\n keyword: \"dependentSchemas\",\n type: \"object\",\n schemaType: \"object\",\n code: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt),\n};\nexports.default = def;\n//# sourceMappingURL=dependentSchemas.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params }) => (0, codegen_1.str) `must match \"${params.ifClause}\" schema`,\n params: ({ params }) => (0, codegen_1._) `{failingKeyword: ${params.ifClause}}`,\n};\nconst def = {\n keyword: \"if\",\n schemaType: [\"object\", \"boolean\"],\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, parentSchema, it } = cxt;\n if (parentSchema.then === undefined && parentSchema.else === undefined) {\n (0, util_1.checkStrictMode)(it, '\"if\" without \"then\" and \"else\" is ignored');\n }\n const hasThen = hasSchema(it, \"then\");\n const hasElse = hasSchema(it, \"else\");\n if (!hasThen && !hasElse)\n return;\n const valid = gen.let(\"valid\", true);\n const schValid = gen.name(\"_valid\");\n validateIf();\n cxt.reset();\n if (hasThen && hasElse) {\n const ifClause = gen.let(\"ifClause\");\n cxt.setParams({ ifClause });\n gen.if(schValid, validateClause(\"then\", ifClause), validateClause(\"else\", ifClause));\n }\n else if (hasThen) {\n gen.if(schValid, validateClause(\"then\"));\n }\n else {\n gen.if((0, codegen_1.not)(schValid), validateClause(\"else\"));\n }\n cxt.pass(valid, () => cxt.error(true));\n function validateIf() {\n const schCxt = cxt.subschema({\n keyword: \"if\",\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n }, schValid);\n cxt.mergeEvaluated(schCxt);\n }\n function validateClause(keyword, ifClause) {\n return () => {\n const schCxt = cxt.subschema({ keyword }, schValid);\n gen.assign(valid, schValid);\n cxt.mergeValidEvaluated(schCxt, valid);\n if (ifClause)\n gen.assign(ifClause, (0, codegen_1._) `${keyword}`);\n else\n cxt.setParams({ ifClause: keyword });\n };\n }\n },\n};\nfunction hasSchema(it, keyword) {\n const schema = it.schema[keyword];\n return schema !== undefined && !(0, util_1.alwaysValidSchema)(it, schema);\n}\nexports.default = def;\n//# sourceMappingURL=if.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = getApplicator;\nconst additionalItems_1 = require(\"./additionalItems\");\nconst prefixItems_1 = require(\"./prefixItems\");\nconst items_1 = require(\"./items\");\nconst items2020_1 = require(\"./items2020\");\nconst contains_1 = require(\"./contains\");\nconst dependencies_1 = require(\"./dependencies\");\nconst propertyNames_1 = require(\"./propertyNames\");\nconst additionalProperties_1 = require(\"./additionalProperties\");\nconst properties_1 = require(\"./properties\");\nconst patternProperties_1 = require(\"./patternProperties\");\nconst not_1 = require(\"./not\");\nconst anyOf_1 = require(\"./anyOf\");\nconst oneOf_1 = require(\"./oneOf\");\nconst allOf_1 = require(\"./allOf\");\nconst if_1 = require(\"./if\");\nconst thenElse_1 = require(\"./thenElse\");\nfunction getApplicator(draft2020 = false) {\n const applicator = [\n // any\n not_1.default,\n anyOf_1.default,\n oneOf_1.default,\n allOf_1.default,\n if_1.default,\n thenElse_1.default,\n // object\n propertyNames_1.default,\n additionalProperties_1.default,\n dependencies_1.default,\n properties_1.default,\n patternProperties_1.default,\n ];\n // array\n if (draft2020)\n applicator.push(prefixItems_1.default, items2020_1.default);\n else\n applicator.push(additionalItems_1.default, items_1.default);\n applicator.push(contains_1.default);\n return applicator;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateTuple = validateTuple;\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst code_1 = require(\"../code\");\nconst def = {\n keyword: \"items\",\n type: \"array\",\n schemaType: [\"object\", \"array\", \"boolean\"],\n before: \"uniqueItems\",\n code(cxt) {\n const { schema, it } = cxt;\n if (Array.isArray(schema))\n return validateTuple(cxt, \"additionalItems\", schema);\n it.items = true;\n if ((0, util_1.alwaysValidSchema)(it, schema))\n return;\n cxt.ok((0, code_1.validateArray)(cxt));\n },\n};\nfunction validateTuple(cxt, extraItems, schArr = cxt.schema) {\n const { gen, parentSchema, data, keyword, it } = cxt;\n checkStrictTuple(parentSchema);\n if (it.opts.unevaluated && schArr.length && it.items !== true) {\n it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);\n }\n const valid = gen.name(\"valid\");\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n schArr.forEach((sch, i) => {\n if ((0, util_1.alwaysValidSchema)(it, sch))\n return;\n gen.if((0, codegen_1._) `${len} > ${i}`, () => cxt.subschema({\n keyword,\n schemaProp: i,\n dataProp: i,\n }, valid));\n cxt.ok(valid);\n });\n function checkStrictTuple(sch) {\n const { opts, errSchemaPath } = it;\n const l = schArr.length;\n const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false);\n if (opts.strictTuples && !fullTuple) {\n const msg = `\"${keyword}\" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path \"${errSchemaPath}\"`;\n (0, util_1.checkStrictMode)(it, msg, opts.strictTuples);\n }\n }\n}\nexports.default = def;\n//# sourceMappingURL=items.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst code_1 = require(\"../code\");\nconst additionalItems_1 = require(\"./additionalItems\");\nconst error = {\n message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`,\n params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`,\n};\nconst def = {\n keyword: \"items\",\n type: \"array\",\n schemaType: [\"object\", \"boolean\"],\n before: \"uniqueItems\",\n error,\n code(cxt) {\n const { schema, parentSchema, it } = cxt;\n const { prefixItems } = parentSchema;\n it.items = true;\n if ((0, util_1.alwaysValidSchema)(it, schema))\n return;\n if (prefixItems)\n (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems);\n else\n cxt.ok((0, code_1.validateArray)(cxt));\n },\n};\nexports.default = def;\n//# sourceMappingURL=items2020.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: \"not\",\n schemaType: [\"object\", \"boolean\"],\n trackErrors: true,\n code(cxt) {\n const { gen, schema, it } = cxt;\n if ((0, util_1.alwaysValidSchema)(it, schema)) {\n cxt.fail();\n return;\n }\n const valid = gen.name(\"valid\");\n cxt.subschema({\n keyword: \"not\",\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n }, valid);\n cxt.failResult(valid, () => cxt.reset(), () => cxt.error());\n },\n error: { message: \"must NOT be valid\" },\n};\nexports.default = def;\n//# sourceMappingURL=not.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: \"must match exactly one schema in oneOf\",\n params: ({ params }) => (0, codegen_1._) `{passingSchemas: ${params.passing}}`,\n};\nconst def = {\n keyword: \"oneOf\",\n schemaType: \"array\",\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, schema, parentSchema, it } = cxt;\n /* istanbul ignore if */\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n if (it.opts.discriminator && parentSchema.discriminator)\n return;\n const schArr = schema;\n const valid = gen.let(\"valid\", false);\n const passing = gen.let(\"passing\", null);\n const schValid = gen.name(\"_valid\");\n cxt.setParams({ passing });\n // TODO possibly fail straight away (with warning or exception) if there are two empty always valid schemas\n gen.block(validateOneOf);\n cxt.result(valid, () => cxt.reset(), () => cxt.error(true));\n function validateOneOf() {\n schArr.forEach((sch, i) => {\n let schCxt;\n if ((0, util_1.alwaysValidSchema)(it, sch)) {\n gen.var(schValid, true);\n }\n else {\n schCxt = cxt.subschema({\n keyword: \"oneOf\",\n schemaProp: i,\n compositeRule: true,\n }, schValid);\n }\n if (i > 0) {\n gen\n .if((0, codegen_1._) `${schValid} && ${valid}`)\n .assign(valid, false)\n .assign(passing, (0, codegen_1._) `[${passing}, ${i}]`)\n .else();\n }\n gen.if(schValid, () => {\n gen.assign(valid, true);\n gen.assign(passing, i);\n if (schCxt)\n cxt.mergeEvaluated(schCxt, codegen_1.Name);\n });\n });\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=oneOf.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst util_2 = require(\"../../compile/util\");\nconst def = {\n keyword: \"patternProperties\",\n type: \"object\",\n schemaType: \"object\",\n code(cxt) {\n const { gen, schema, data, parentSchema, it } = cxt;\n const { opts } = it;\n const patterns = (0, code_1.allSchemaProperties)(schema);\n const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p]));\n if (patterns.length === 0 ||\n (alwaysValidPatterns.length === patterns.length &&\n (!it.opts.unevaluated || it.props === true))) {\n return;\n }\n const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties;\n const valid = gen.name(\"valid\");\n if (it.props !== true && !(it.props instanceof codegen_1.Name)) {\n it.props = (0, util_2.evaluatedPropsToName)(gen, it.props);\n }\n const { props } = it;\n validatePatternProperties();\n function validatePatternProperties() {\n for (const pat of patterns) {\n if (checkProperties)\n checkMatchingProperties(pat);\n if (it.allErrors) {\n validateProperties(pat);\n }\n else {\n gen.var(valid, true); // TODO var\n validateProperties(pat);\n gen.if(valid);\n }\n }\n }\n function checkMatchingProperties(pat) {\n for (const prop in checkProperties) {\n if (new RegExp(pat).test(prop)) {\n (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);\n }\n }\n }\n function validateProperties(pat) {\n gen.forIn(\"key\", data, (key) => {\n gen.if((0, codegen_1._) `${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {\n const alwaysValid = alwaysValidPatterns.includes(pat);\n if (!alwaysValid) {\n cxt.subschema({\n keyword: \"patternProperties\",\n schemaProp: pat,\n dataProp: key,\n dataPropType: util_2.Type.Str,\n }, valid);\n }\n if (it.opts.unevaluated && props !== true) {\n gen.assign((0, codegen_1._) `${props}[${key}]`, true);\n }\n else if (!alwaysValid && !it.allErrors) {\n // can short-circuit if `unevaluatedProperties` is not supported (opts.next === false)\n // or if all properties were evaluated (props === true)\n gen.if((0, codegen_1.not)(valid), () => gen.break());\n }\n });\n });\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=patternProperties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst items_1 = require(\"./items\");\nconst def = {\n keyword: \"prefixItems\",\n type: \"array\",\n schemaType: [\"array\"],\n before: \"uniqueItems\",\n code: (cxt) => (0, items_1.validateTuple)(cxt, \"items\"),\n};\nexports.default = def;\n//# sourceMappingURL=prefixItems.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst validate_1 = require(\"../../compile/validate\");\nconst code_1 = require(\"../code\");\nconst util_1 = require(\"../../compile/util\");\nconst additionalProperties_1 = require(\"./additionalProperties\");\nconst def = {\n keyword: \"properties\",\n type: \"object\",\n schemaType: \"object\",\n code(cxt) {\n const { gen, schema, parentSchema, data, it } = cxt;\n if ((it.opts.removeAdditional === \"all\" && parentSchema.additionalProperties === undefined) ||\n it.opts.defaultAdditionalProperties === false) {\n additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, \"additionalProperties\"));\n }\n const allProps = (0, code_1.allSchemaProperties)(schema);\n for (const prop of allProps) {\n it.definedProperties.add(prop);\n }\n if (it.opts.unevaluated && allProps.length && it.props !== true) {\n it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);\n }\n const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));\n if (properties.length === 0)\n return;\n const valid = gen.name(\"valid\");\n for (const prop of properties) {\n if (hasDefault(prop)) {\n applyPropertySchema(prop);\n }\n else {\n gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties));\n applyPropertySchema(prop);\n if (!it.allErrors)\n gen.else().var(valid, true);\n gen.endIf();\n }\n cxt.it.definedProperties.add(prop);\n cxt.ok(valid);\n }\n function hasDefault(prop) {\n return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== undefined;\n }\n function applyPropertySchema(prop) {\n cxt.subschema({\n keyword: \"properties\",\n schemaProp: prop,\n dataProp: prop,\n }, valid);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=properties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: \"property name must be valid\",\n params: ({ params }) => (0, codegen_1._) `{propertyName: ${params.propertyName}}`,\n};\nconst def = {\n keyword: \"propertyNames\",\n type: \"object\",\n schemaType: [\"object\", \"boolean\"],\n error,\n code(cxt) {\n const { gen, schema, data, it } = cxt;\n if ((0, util_1.alwaysValidSchema)(it, schema))\n return;\n const valid = gen.name(\"valid\");\n gen.forIn(\"key\", data, (key) => {\n cxt.setParams({ propertyName: key });\n cxt.subschema({\n keyword: \"propertyNames\",\n data: key,\n dataTypes: [\"string\"],\n propertyName: key,\n compositeRule: true,\n }, valid);\n gen.if((0, codegen_1.not)(valid), () => {\n cxt.error(true);\n if (!it.allErrors)\n gen.break();\n });\n });\n cxt.ok(valid);\n },\n};\nexports.default = def;\n//# sourceMappingURL=propertyNames.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: [\"then\", \"else\"],\n schemaType: [\"object\", \"boolean\"],\n code({ keyword, parentSchema, it }) {\n if (parentSchema.if === undefined)\n (0, util_1.checkStrictMode)(it, `\"${keyword}\" without \"if\" is ignored`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=thenElse.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkReportMissingProp = checkReportMissingProp;\nexports.checkMissingProp = checkMissingProp;\nexports.reportMissingProp = reportMissingProp;\nexports.hasPropFunc = hasPropFunc;\nexports.isOwnProperty = isOwnProperty;\nexports.propertyInData = propertyInData;\nexports.noPropertyInData = noPropertyInData;\nexports.allSchemaProperties = allSchemaProperties;\nexports.schemaProperties = schemaProperties;\nexports.callValidateCode = callValidateCode;\nexports.usePattern = usePattern;\nexports.validateArray = validateArray;\nexports.validateUnion = validateUnion;\nconst codegen_1 = require(\"../compile/codegen\");\nconst util_1 = require(\"../compile/util\");\nconst names_1 = require(\"../compile/names\");\nconst util_2 = require(\"../compile/util\");\nfunction checkReportMissingProp(cxt, prop) {\n const { gen, data, it } = cxt;\n gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {\n cxt.setParams({ missingProperty: (0, codegen_1._) `${prop}` }, true);\n cxt.error();\n });\n}\nfunction checkMissingProp({ gen, data, it: { opts } }, properties, missing) {\n return (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._) `${missing} = ${prop}`)));\n}\nfunction reportMissingProp(cxt, missing) {\n cxt.setParams({ missingProperty: missing }, true);\n cxt.error();\n}\nfunction hasPropFunc(gen) {\n return gen.scopeValue(\"func\", {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ref: Object.prototype.hasOwnProperty,\n code: (0, codegen_1._) `Object.prototype.hasOwnProperty`,\n });\n}\nfunction isOwnProperty(gen, data, property) {\n return (0, codegen_1._) `${hasPropFunc(gen)}.call(${data}, ${property})`;\n}\nfunction propertyInData(gen, data, property, ownProperties) {\n const cond = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(property)} !== undefined`;\n return ownProperties ? (0, codegen_1._) `${cond} && ${isOwnProperty(gen, data, property)}` : cond;\n}\nfunction noPropertyInData(gen, data, property, ownProperties) {\n const cond = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(property)} === undefined`;\n return ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond;\n}\nfunction allSchemaProperties(schemaMap) {\n return schemaMap ? Object.keys(schemaMap).filter((p) => p !== \"__proto__\") : [];\n}\nfunction schemaProperties(it, schemaMap) {\n return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));\n}\nfunction callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) {\n const dataAndSchema = passSchema ? (0, codegen_1._) `${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data;\n const valCxt = [\n [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)],\n [names_1.default.parentData, it.parentData],\n [names_1.default.parentDataProperty, it.parentDataProperty],\n [names_1.default.rootData, names_1.default.rootData],\n [names_1.default.isAllOfVariant, it.isAllOfVariant ? 1 : 0],\n ];\n if (it.opts.dynamicRef)\n valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]);\n const args = (0, codegen_1._) `${dataAndSchema}, ${gen.object(...valCxt)}`;\n return context !== codegen_1.nil ? (0, codegen_1._) `${func}.call(${context}, ${args})` : (0, codegen_1._) `${func}(${args})`;\n}\nconst newRegExp = (0, codegen_1._) `new RegExp`;\nfunction usePattern({ gen, it: { opts } }, pattern) {\n const u = opts.unicodeRegExp ? \"u\" : \"\";\n const { regExp } = opts.code;\n const rx = regExp(pattern, u);\n return gen.scopeValue(\"pattern\", {\n key: rx.toString(),\n ref: rx,\n code: (0, codegen_1._) `${regExp.code === \"new RegExp\" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`,\n });\n}\nfunction validateArray(cxt) {\n const { gen, data, keyword, it } = cxt;\n const valid = gen.name(\"valid\");\n if (it.allErrors) {\n const validArr = gen.let(\"valid\", true);\n validateItems(() => gen.assign(validArr, false));\n return validArr;\n }\n gen.var(valid, true);\n validateItems(() => gen.break());\n return valid;\n function validateItems(notValid) {\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n gen.forRange(\"i\", 0, len, (i) => {\n cxt.subschema({\n keyword,\n dataProp: i,\n dataPropType: util_1.Type.Num,\n }, valid);\n gen.if((0, codegen_1.not)(valid), notValid);\n });\n }\n}\nfunction validateUnion(cxt) {\n const { gen, schema, keyword, parentSchema, it } = cxt;\n /* istanbul ignore if */\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n if (it.opts.discriminator && parentSchema.discriminator)\n return;\n const alwaysValid = schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch));\n if (alwaysValid && !it.opts.unevaluated)\n return;\n const valid = gen.let(\"valid\", false);\n const schValid = gen.name(\"_valid\");\n gen.block(() => schema.forEach((_sch, i) => {\n const schCxt = cxt.subschema({\n keyword,\n schemaProp: i,\n compositeRule: true,\n }, schValid);\n gen.assign(valid, (0, codegen_1._) `${valid} || ${schValid}`);\n const merged = cxt.mergeValidEvaluated(schCxt, schValid);\n // can short-circuit if `unevaluatedProperties/Items` not supported (opts.unevaluated !== true)\n // or if all properties and items were evaluated (it.props === true && it.items === true)\n if (!merged)\n gen.if((0, codegen_1.not)(valid));\n }));\n cxt.result(valid, () => cxt.reset(), () => cxt.error(true));\n}\n//# sourceMappingURL=code.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst def = {\n keyword: \"id\",\n code() {\n throw new Error('NOT SUPPORTED: keyword \"id\", use \"$id\" for schema ID');\n },\n};\nexports.default = def;\n//# sourceMappingURL=id.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst id_1 = require(\"./id\");\nconst ref_1 = require(\"./ref\");\nconst core = [\n \"$schema\",\n \"$id\",\n \"$defs\",\n \"$vocabulary\",\n { keyword: \"$comment\" },\n \"definitions\",\n id_1.default,\n ref_1.default,\n];\nexports.default = core;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getValidate = getValidate;\nexports.callRef = callRef;\nconst ref_error_1 = require(\"../../compile/ref_error\");\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst names_1 = require(\"../../compile/names\");\nconst compile_1 = require(\"../../compile\");\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: \"$ref\",\n schemaType: \"string\",\n code(cxt) {\n const { gen, schema: $ref, it } = cxt;\n const { baseId, schemaEnv: env, validateName, opts, self } = it;\n const { root } = env;\n if (($ref === \"#\" || $ref === \"#/\") && baseId === root.baseId)\n return callRootRef();\n const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref);\n if (schOrEnv === undefined)\n throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);\n if (schOrEnv instanceof compile_1.SchemaEnv)\n return callValidate(schOrEnv);\n return inlineRefSchema(schOrEnv);\n function callRootRef() {\n if (env === root)\n return callRef(cxt, validateName, env, env.$async);\n const rootName = gen.scopeValue(\"root\", { ref: root });\n return callRef(cxt, (0, codegen_1._) `${rootName}.validate`, root, root.$async);\n }\n function callValidate(sch) {\n const v = getValidate(cxt, sch);\n callRef(cxt, v, sch, sch.$async);\n }\n function inlineRefSchema(sch) {\n const schName = gen.scopeValue(\"schema\", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });\n const valid = gen.name(\"valid\");\n const schCxt = cxt.subschema({\n schema: sch,\n dataTypes: [],\n schemaPath: codegen_1.nil,\n topSchemaRef: schName,\n errSchemaPath: $ref,\n }, valid, it.isAllOfVariant // pass isAllOfVariant into inlined $ref\n );\n cxt.mergeEvaluated(schCxt);\n cxt.ok(valid);\n }\n },\n};\nfunction getValidate(cxt, sch) {\n const { gen } = cxt;\n return sch.validate\n ? gen.scopeValue(\"validate\", { ref: sch.validate })\n : (0, codegen_1._) `${gen.scopeValue(\"wrapper\", { ref: sch })}.validate`;\n}\nfunction callRef(cxt, v, sch, $async) {\n const { gen, it } = cxt;\n const { allErrors, schemaEnv: env, opts } = it;\n const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;\n if ($async)\n callAsyncRef();\n else\n callSyncRef();\n function callAsyncRef() {\n if (!env.$async)\n throw new Error(\"async schema referenced by sync schema\");\n const valid = gen.let(\"valid\");\n gen.try(() => {\n gen.code((0, codegen_1._) `await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);\n addEvaluatedFrom(v); // TODO will not work with async, it has to be returned with the result\n if (!allErrors)\n gen.assign(valid, true);\n }, (e) => {\n gen.if((0, codegen_1._) `!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));\n addErrorsFrom(e);\n if (!allErrors)\n gen.assign(valid, false);\n });\n cxt.ok(valid);\n }\n function callSyncRef() {\n const visitedNodes = gen.name(\"visitedNodes\");\n gen.code((0, codegen_1._) `const ${visitedNodes} = (typeof visitedNodesForRef !== 'undefined') && visitedNodesForRef.get(${v}) || new Set()`);\n gen.if((0, codegen_1._) `!${visitedNodes}.has(${cxt.data})`, () => {\n gen.code((0, codegen_1._) `if (typeof visitedNodesForRef !== 'undefined') visitedNodesForRef.set(${v}, ${visitedNodes})`);\n gen.code((0, codegen_1._) `const dataNode = ${cxt.data}`);\n gen.code((0, codegen_1._) `if (typeof dataNode === \"object\" && dataNode !== null) ${visitedNodes}.add(dataNode)`);\n const res = cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));\n gen.code((0, codegen_1._) `${visitedNodes}.delete(dataNode)`);\n return res;\n });\n }\n function addErrorsFrom(source) {\n const errs = (0, codegen_1._) `${source}.errors`;\n gen.assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); // TODO tagged\n gen.assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`);\n }\n function addEvaluatedFrom(source) {\n var _a;\n if (!it.opts.unevaluated)\n return;\n const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;\n // TODO refactor\n if (it.props !== true) {\n if (schEvaluated && !schEvaluated.dynamicProps) {\n if (schEvaluated.props !== undefined) {\n it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);\n }\n }\n else {\n const props = gen.var(\"props\", (0, codegen_1._) `${source}.evaluated.props`);\n it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);\n }\n }\n if (it.items !== true) {\n if (schEvaluated && !schEvaluated.dynamicItems) {\n if (schEvaluated.items !== undefined) {\n it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);\n }\n }\n else {\n const items = gen.var(\"items\", (0, codegen_1._) `${source}.evaluated.items`);\n it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);\n }\n }\n }\n}\nexports.default = def;\n//# sourceMappingURL=ref.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst types_1 = require(\"../discriminator/types\");\nconst compile_1 = require(\"../../compile\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag\n ? `tag \"${tagName}\" must be string`\n : `value of tag \"${tagName}\" must be in oneOf or anyOf`,\n params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._) `{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`,\n};\nconst def = {\n keyword: \"discriminator\",\n type: \"object\",\n schemaType: \"object\",\n error,\n code(cxt) {\n const { gen, data, schema, parentSchema, it } = cxt;\n const keyword = parentSchema.oneOf ? \"oneOf\" : parentSchema.anyOf ? \"anyOf\" : undefined;\n if (!it.opts.discriminator) {\n throw new Error(\"discriminator: requires discriminator option\");\n }\n const tagName = schema.propertyName;\n if (typeof tagName != \"string\")\n throw new Error(\"discriminator: requires propertyName\");\n if (!keyword)\n throw new Error(\"discriminator: requires oneOf or anyOf composite keyword\");\n const parentSchemaVariants = parentSchema[keyword];\n const valid = gen.let(\"valid\", false);\n const tag = gen.const(\"tag\", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(tagName)}`);\n gen.if((0, codegen_1._) `typeof ${tag} == \"string\"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName }));\n cxt.ok(valid);\n function validateMapping() {\n const mapping = getMapping();\n gen.if(false);\n for (const tagValue in mapping) {\n gen.elseIf((0, codegen_1._) `${tag} === ${tagValue}`);\n gen.assign(valid, applyTagSchema(mapping[tagValue]));\n }\n gen.else();\n cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName });\n gen.endIf();\n }\n function applyTagSchema(schemaProp) {\n const _valid = gen.name(\"valid\");\n const schCxt = cxt.subschema({ keyword, schemaProp }, _valid);\n cxt.mergeEvaluated(schCxt, codegen_1.Name);\n return _valid;\n }\n function getMapping() {\n var _a;\n const discriminatorMapping = {};\n const topRequired = hasRequired(parentSchema);\n let tagRequired = true;\n for (let i = 0; i < parentSchemaVariants.length; i++) {\n let sch = parentSchemaVariants[i];\n const schRef = sch === null || sch === void 0 ? void 0 : sch.$ref;\n if (schRef && schema.mapping) {\n const { mapping } = schema;\n const matchedKeys = Object.keys(mapping).filter((key) => mapping[key] === sch.$ref);\n if (matchedKeys.length) {\n for (const key of matchedKeys) {\n addMapping(key, i);\n }\n continue;\n }\n }\n if (schRef && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {\n sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, schRef);\n if (sch instanceof compile_1.SchemaEnv)\n sch = sch.schema;\n }\n const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];\n if (typeof propSch != \"object\") {\n throw new Error(`discriminator: ${keyword} subschemas (or referenced schemas) must have \"properties/${tagName}\" or match mapping`);\n }\n tagRequired = tagRequired && (topRequired || hasRequired(sch));\n addMappings(propSch, i);\n }\n if (!tagRequired)\n throw new Error(`discriminator: \"${tagName}\" must be required`);\n return discriminatorMapping;\n function hasRequired({ required }) {\n return Array.isArray(required) && required.includes(tagName);\n }\n function addMappings(sch, i) {\n if (sch.const) {\n addMapping(sch.const, i);\n }\n else if (sch.enum) {\n for (const tagValue of sch.enum) {\n addMapping(tagValue, i);\n }\n }\n else {\n throw new Error(`discriminator: \"properties/${tagName}\" must have \"const\" or \"enum\"`);\n }\n }\n function addMapping(tagValue, i) {\n if (typeof tagValue != \"string\" || tagValue in discriminatorMapping) {\n throw new Error(`discriminator: \"${tagName}\" values must be unique strings`);\n }\n discriminatorMapping[tagValue] = i;\n }\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiscrError = void 0;\nvar DiscrError;\n(function (DiscrError) {\n DiscrError[\"Tag\"] = \"tag\";\n DiscrError[\"Mapping\"] = \"mapping\";\n})(DiscrError || (exports.DiscrError = DiscrError = {}));\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core_1 = require(\"./core\");\nconst validation_1 = require(\"./validation\");\nconst applicator_1 = require(\"./applicator\");\nconst dynamic_1 = require(\"./dynamic\");\nconst next_1 = require(\"./next\");\nconst unevaluated_1 = require(\"./unevaluated\");\nconst format_1 = require(\"./format\");\nconst metadata_1 = require(\"./metadata\");\nconst draft2020Vocabularies = [\n dynamic_1.default,\n core_1.default,\n validation_1.default,\n (0, applicator_1.default)(true),\n format_1.default,\n metadata_1.metadataVocabulary,\n metadata_1.contentVocabulary,\n next_1.default,\n unevaluated_1.default,\n];\nexports.default = draft2020Vocabularies;\n//# sourceMappingURL=draft2020.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dynamicAnchor = dynamicAnchor;\nconst codegen_1 = require(\"../../compile/codegen\");\nconst names_1 = require(\"../../compile/names\");\nconst compile_1 = require(\"../../compile\");\nconst ref_1 = require(\"../core/ref\");\nconst def = {\n keyword: \"$dynamicAnchor\",\n schemaType: \"string\",\n code: (cxt) => dynamicAnchor(cxt, cxt.schema),\n};\nfunction dynamicAnchor(cxt, anchor) {\n const { gen, it } = cxt;\n it.schemaEnv.root.dynamicAnchors[anchor] = true;\n const v = (0, codegen_1._) `${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`;\n const validate = it.errSchemaPath === \"#\" ? it.validateName : _getValidate(cxt);\n gen.if((0, codegen_1._) `!${v}`, () => gen.assign(v, validate));\n}\nfunction _getValidate(cxt) {\n const { schemaEnv, schema, self } = cxt.it;\n const { root, baseId, localRefs, meta } = schemaEnv.root;\n const { schemaId } = self.opts;\n const sch = new compile_1.SchemaEnv({ schema, schemaId, root, baseId, localRefs, meta });\n compile_1.compileSchema.call(self, sch);\n return (0, ref_1.getValidate)(cxt, sch);\n}\nexports.default = def;\n//# sourceMappingURL=dynamicAnchor.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dynamicRef = dynamicRef;\nconst codegen_1 = require(\"../../compile/codegen\");\nconst names_1 = require(\"../../compile/names\");\nconst ref_1 = require(\"../core/ref\");\nconst def = {\n keyword: \"$dynamicRef\",\n schemaType: \"string\",\n code: (cxt) => dynamicRef(cxt, cxt.schema),\n};\nfunction dynamicRef(cxt, ref) {\n const { gen, keyword, it } = cxt;\n if (ref[0] !== \"#\")\n throw new Error(`\"${keyword}\" only supports hash fragment reference`);\n const anchor = ref.slice(1);\n if (it.allErrors) {\n _dynamicRef();\n }\n else {\n const valid = gen.let(\"valid\", false);\n _dynamicRef(valid);\n cxt.ok(valid);\n }\n function _dynamicRef(valid) {\n // TODO the assumption here is that `recursiveRef: #` always points to the root\n // of the schema object, which is not correct, because there may be $id that\n // makes # point to it, and the target schema may not contain dynamic/recursiveAnchor.\n // Because of that 2 tests in recursiveRef.json fail.\n // This is a similar problem to #815 (`$id` doesn't alter resolution scope for `{ \"$ref\": \"#\" }`).\n // (This problem is not tested in JSON-Schema-Test-Suite)\n if (it.schemaEnv.root.dynamicAnchors[anchor]) {\n const v = gen.let(\"_v\", (0, codegen_1._) `${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`);\n gen.if(v, _callRef(v, valid), _callRef(it.validateName, valid));\n }\n else {\n _callRef(it.validateName, valid)();\n }\n }\n function _callRef(validate, valid) {\n return valid\n ? () => gen.block(() => {\n (0, ref_1.callRef)(cxt, validate);\n gen.let(valid, true);\n })\n : () => (0, ref_1.callRef)(cxt, validate);\n }\n}\nexports.default = def;\n//# sourceMappingURL=dynamicRef.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst dynamicAnchor_1 = require(\"./dynamicAnchor\");\nconst dynamicRef_1 = require(\"./dynamicRef\");\nconst recursiveAnchor_1 = require(\"./recursiveAnchor\");\nconst recursiveRef_1 = require(\"./recursiveRef\");\nconst dynamic = [dynamicAnchor_1.default, dynamicRef_1.default, recursiveAnchor_1.default, recursiveRef_1.default];\nexports.default = dynamic;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst dynamicAnchor_1 = require(\"./dynamicAnchor\");\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: \"$recursiveAnchor\",\n schemaType: \"boolean\",\n code(cxt) {\n if (cxt.schema)\n (0, dynamicAnchor_1.dynamicAnchor)(cxt, \"\");\n else\n (0, util_1.checkStrictMode)(cxt.it, \"$recursiveAnchor: false is ignored\");\n },\n};\nexports.default = def;\n//# sourceMappingURL=recursiveAnchor.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst dynamicRef_1 = require(\"./dynamicRef\");\nconst def = {\n keyword: \"$recursiveRef\",\n schemaType: \"string\",\n code: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema),\n};\nexports.default = def;\n//# sourceMappingURL=recursiveRef.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message: ({ schemaCode }) => (0, codegen_1.str) `must match format \"${schemaCode}\"`,\n params: ({ schemaCode }) => (0, codegen_1._) `{format: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"format\",\n type: [\"number\", \"string\"],\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt, ruleType) {\n const { gen, data, $data, schema, schemaCode, it } = cxt;\n const { opts, errSchemaPath, schemaEnv, self } = it;\n if (!opts.validateFormats)\n return;\n if ($data)\n validate$DataFormat();\n else\n validateFormat();\n function validate$DataFormat() {\n const fmts = gen.scopeValue(\"formats\", {\n ref: self.formats,\n code: opts.code.formats,\n });\n const fDef = gen.const(\"fDef\", (0, codegen_1._) `${fmts}[${schemaCode}]`);\n const fType = gen.let(\"fType\");\n const format = gen.let(\"format\");\n // TODO simplify\n gen.if((0, codegen_1._) `typeof ${fDef} == \"object\" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._) `${fDef}.type || \"string\"`).assign(format, (0, codegen_1._) `${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._) `\"string\"`).assign(format, fDef));\n cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));\n function unknownFmt() {\n if (opts.strictSchema === false)\n return codegen_1.nil;\n return (0, codegen_1._) `${schemaCode} && !${format}`;\n }\n function invalidFmt() {\n const callFormat = schemaEnv.$async\n ? (0, codegen_1._) `(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))`\n : (0, codegen_1._) `${format}(${data})`;\n const validData = (0, codegen_1._) `(typeof ${format} == \"function\" ? ${callFormat} : ${format}.test(${data}))`;\n return (0, codegen_1._) `${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`;\n }\n }\n function validateFormat() {\n const formatDef = self.formats[schema];\n if (!formatDef) {\n unknownFormat();\n return;\n }\n if (formatDef === true)\n return;\n const [fmtType, format, fmtRef] = getFormat(formatDef);\n if (fmtType === ruleType)\n cxt.pass(validCondition());\n function unknownFormat() {\n if (opts.strictSchema === false) {\n self.logger.warn(unknownMsg());\n return;\n }\n throw new Error(unknownMsg());\n function unknownMsg() {\n return `unknown format \"${schema}\" ignored in schema at path \"${errSchemaPath}\"`;\n }\n }\n function getFormat(fmtDef) {\n const code = fmtDef instanceof RegExp\n ? (0, codegen_1.regexpCode)(fmtDef)\n : opts.code.formats\n ? (0, codegen_1._) `${opts.code.formats}${(0, codegen_1.getProperty)(schema)}`\n : undefined;\n const fmt = gen.scopeValue(\"formats\", { key: schema, ref: fmtDef, code });\n if (typeof fmtDef == \"object\" && !(fmtDef instanceof RegExp)) {\n return [fmtDef.type || \"string\", fmtDef.validate, (0, codegen_1._) `${fmt}.validate`];\n }\n return [\"string\", fmtDef, fmt];\n }\n function validCondition() {\n if (typeof formatDef == \"object\" && !(formatDef instanceof RegExp) && formatDef.async) {\n if (!schemaEnv.$async)\n throw new Error(\"async format in sync schema\");\n return (0, codegen_1._) `await ${fmtRef}(${data})`;\n }\n return typeof format == \"function\" ? (0, codegen_1._) `${fmtRef}(${data})` : (0, codegen_1._) `${fmtRef}.test(${data})`;\n }\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=format.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst format_1 = require(\"./format\");\nconst format = [format_1.default];\nexports.default = format;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.contentVocabulary = exports.metadataVocabulary = void 0;\nexports.metadataVocabulary = [\n \"title\",\n \"description\",\n \"default\",\n \"deprecated\",\n \"readOnly\",\n \"writeOnly\",\n \"examples\",\n];\nexports.contentVocabulary = [\n \"contentMediaType\",\n \"contentEncoding\",\n \"contentSchema\",\n];\n//# sourceMappingURL=metadata.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst dependentRequired_1 = require(\"./validation/dependentRequired\");\nconst dependentSchemas_1 = require(\"./applicator/dependentSchemas\");\nconst limitContains_1 = require(\"./validation/limitContains\");\nconst next = [dependentRequired_1.default, dependentSchemas_1.default, limitContains_1.default];\nexports.default = next;\n//# sourceMappingURL=next.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst unevaluatedProperties_1 = require(\"./unevaluatedProperties\");\nconst unevaluatedItems_1 = require(\"./unevaluatedItems\");\nconst unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default];\nexports.default = unevaluated;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { len } }) => (0, codegen_1.str) `must NOT have more than ${len} items`,\n params: ({ params: { len } }) => (0, codegen_1._) `{limit: ${len}}`,\n};\nconst def = {\n keyword: \"unevaluatedItems\",\n type: \"array\",\n schemaType: [\"boolean\", \"object\"],\n error,\n code(cxt) {\n const { gen, schema, data, it } = cxt;\n const items = it.items || 0;\n if (items === true)\n return;\n const len = gen.const(\"len\", (0, codegen_1._) `${data}.length`);\n if (schema === false) {\n cxt.setParams({ len: items });\n cxt.fail((0, codegen_1._) `${len} > ${items}`);\n }\n else if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n const valid = gen.var(\"valid\", (0, codegen_1._) `${len} <= ${items}`);\n gen.if((0, codegen_1.not)(valid), () => validateItems(valid, items));\n cxt.ok(valid);\n }\n it.items = true;\n function validateItems(valid, from) {\n gen.forRange(\"i\", from, len, (i) => {\n cxt.subschema({ keyword: \"unevaluatedItems\", dataProp: i, dataPropType: util_1.Type.Num }, valid);\n if (!it.allErrors)\n gen.if((0, codegen_1.not)(valid), () => gen.break());\n });\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=unevaluatedItems.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst names_1 = require(\"../../compile/names\");\nconst error = {\n message: \"must NOT have unevaluated properties\",\n params: ({ params }) => (0, codegen_1._) `{unevaluatedProperty: ${params.unevaluatedProperty}}`,\n};\nconst def = {\n keyword: \"unevaluatedProperties\",\n type: \"object\",\n schemaType: [\"boolean\", \"object\"],\n allowUndefined: true,\n trackErrors: true,\n error,\n code(cxt) {\n const { gen, schema = cxt.it.opts.defaultUnevaluatedProperties, data, errsCount, it } = cxt;\n const isForced = cxt.schema === undefined && cxt.it.opts.defaultUnevaluatedProperties === false;\n /* istanbul ignore if */\n if (!errsCount)\n throw new Error(\"ajv implementation error\");\n const { allErrors, props } = it;\n if (props instanceof codegen_1.Name) {\n gen.if((0, codegen_1._) `${props} !== true`, () => gen.forIn(\"key\", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))));\n }\n else if (props !== true) {\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const staticCheck = () => gen.forIn(\"key\", data, (key) => props === undefined\n ? unevaluatedPropCode(key)\n : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));\n if (isForced && it.errorPath.emptyStr()) {\n // $refs are compiled into functions\n // We need to check in runtime if function was called from allOf.\n // We need to check only on the top level of the function:\n // it is ensured with `it.errorPath.emptyStr()` check\n gen.if((0, codegen_1._) `${names_1.default.isAllOfVariant} === 0`, staticCheck);\n }\n else {\n staticCheck();\n }\n }\n if (!isForced) {\n // disable shot-circut for forced unevaluatedProperties=false\n // we may run or not the check in runtime so we can't short-circuit in compile-time\n it.props = true;\n }\n cxt.ok((0, codegen_1._) `${errsCount} === ${names_1.default.errors}`);\n function unevaluatedPropCode(key) {\n if (schema === false) {\n cxt.setParams({ unevaluatedProperty: key });\n cxt.error();\n if (!allErrors)\n gen.break();\n return;\n }\n if (!(0, util_1.alwaysValidSchema)(it, schema)) {\n const valid = gen.name(\"valid\");\n cxt.subschema({\n keyword: \"unevaluatedProperties\",\n dataProp: key,\n dataPropType: util_1.Type.Str,\n }, valid);\n if (!allErrors)\n gen.if((0, codegen_1.not)(valid), () => gen.break());\n }\n }\n function unevaluatedDynamic(evaluatedProps, key) {\n return (0, codegen_1._) `!${evaluatedProps} || !${evaluatedProps}[${key}]`;\n }\n function unevaluatedStatic(evaluatedProps, key) {\n const ps = [];\n for (const p in evaluatedProps) {\n if (evaluatedProps[p] === true)\n ps.push((0, codegen_1._) `${key} !== ${p}`);\n }\n return (0, codegen_1.and)(...ps);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=unevaluatedProperties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst equal_1 = require(\"../../runtime/equal\");\nconst error = {\n message: \"must be equal to constant\",\n params: ({ schemaCode }) => (0, codegen_1._) `{allowedValue: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"const\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, $data, schemaCode, schema } = cxt;\n if ($data || (schema && typeof schema == \"object\")) {\n cxt.fail$data((0, codegen_1._) `!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`);\n }\n else {\n cxt.fail((0, codegen_1._) `${schema} !== ${data}`);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=const.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst dependencies_1 = require(\"../applicator/dependencies\");\nconst def = {\n keyword: \"dependentRequired\",\n type: \"object\",\n schemaType: \"object\",\n error: dependencies_1.error,\n code: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt),\n};\nexports.default = def;\n//# sourceMappingURL=dependentRequired.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst equal_1 = require(\"../../runtime/equal\");\nconst error = {\n message: \"must be equal to one of the allowed values\",\n params: ({ schemaCode }) => (0, codegen_1._) `{allowedValues: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"enum\",\n schemaType: \"array\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, $data, schema, schemaCode, it } = cxt;\n if (!$data && schema.length === 0)\n throw new Error(\"enum must have non-empty array\");\n const useLoop = schema.length >= it.opts.loopEnum;\n let eql;\n const getEql = () => (eql !== null && eql !== void 0 ? eql : (eql = (0, util_1.useFunc)(gen, equal_1.default)));\n let valid;\n if (useLoop || $data) {\n valid = gen.let(\"valid\");\n cxt.block$data(valid, loopEnum);\n }\n else {\n /* istanbul ignore if */\n if (!Array.isArray(schema))\n throw new Error(\"ajv implementation error\");\n const vSchema = gen.const(\"vSchema\", schemaCode);\n valid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));\n }\n cxt.pass(valid);\n function loopEnum() {\n gen.assign(valid, false);\n gen.forOf(\"v\", schemaCode, (v) => gen.if((0, codegen_1._) `${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));\n }\n function equalCode(vSchema, i) {\n const sch = schema[i];\n return typeof sch === \"object\" && sch !== null\n ? (0, codegen_1._) `${getEql()}(${data}, ${vSchema}[${i}])`\n : (0, codegen_1._) `${data} === ${sch}`;\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=enum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst limitNumber_1 = require(\"./limitNumber\");\nconst multipleOf_1 = require(\"./multipleOf\");\nconst limitLength_1 = require(\"./limitLength\");\nconst pattern_1 = require(\"./pattern\");\nconst limitProperties_1 = require(\"./limitProperties\");\nconst required_1 = require(\"./required\");\nconst limitItems_1 = require(\"./limitItems\");\nconst uniqueItems_1 = require(\"./uniqueItems\");\nconst const_1 = require(\"./const\");\nconst enum_1 = require(\"./enum\");\nconst validation = [\n // number\n limitNumber_1.default,\n multipleOf_1.default,\n // string\n limitLength_1.default,\n pattern_1.default,\n // object\n limitProperties_1.default,\n required_1.default,\n // array\n limitItems_1.default,\n uniqueItems_1.default,\n // any\n { keyword: \"type\", schemaType: [\"string\", \"array\"] },\n { keyword: \"nullable\", schemaType: \"boolean\" },\n const_1.default,\n enum_1.default,\n];\nexports.default = validation;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: [\"maxContains\", \"minContains\"],\n type: \"array\",\n schemaType: \"number\",\n code({ keyword, parentSchema, it }) {\n if (parentSchema.contains === undefined) {\n (0, util_1.checkStrictMode)(it, `\"${keyword}\" without \"contains\" is ignored`);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitContains.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message({ keyword, schemaCode }) {\n const comp = keyword === \"maxItems\" ? \"more\" : \"fewer\";\n return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} items`;\n },\n params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`,\n};\nconst def = {\n keyword: [\"maxItems\", \"minItems\"],\n type: \"array\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode } = cxt;\n const op = keyword === \"maxItems\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n cxt.fail$data((0, codegen_1._) `${data}.length ${op} ${schemaCode}`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitItems.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst ucs2length_1 = require(\"../../runtime/ucs2length\");\nconst error = {\n message({ keyword, schemaCode }) {\n const comp = keyword === \"maxLength\" ? \"more\" : \"fewer\";\n return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} characters`;\n },\n params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`,\n};\nconst def = {\n keyword: [\"maxLength\", \"minLength\"],\n type: \"string\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode, it } = cxt;\n const op = keyword === \"maxLength\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n const len = it.opts.unicode === false ? (0, codegen_1._) `${data}.length` : (0, codegen_1._) `${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;\n cxt.fail$data((0, codegen_1._) `${len} ${op} ${schemaCode}`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitLength.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst ops = codegen_1.operators;\nconst KWDs = {\n maximum: { okStr: \"<=\", ok: ops.LTE, fail: ops.GT },\n minimum: { okStr: \">=\", ok: ops.GTE, fail: ops.LT },\n exclusiveMaximum: { okStr: \"<\", ok: ops.LT, fail: ops.GTE },\n exclusiveMinimum: { okStr: \">\", ok: ops.GT, fail: ops.LTE },\n};\nconst error = {\n message: ({ keyword, schemaCode }) => (0, codegen_1.str) `must be ${KWDs[keyword].okStr} ${schemaCode}`,\n params: ({ keyword, schemaCode }) => (0, codegen_1._) `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`,\n};\nconst def = {\n keyword: Object.keys(KWDs),\n type: \"number\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode } = cxt;\n cxt.fail$data((0, codegen_1._) `${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitNumber.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message({ keyword, schemaCode }) {\n const comp = keyword === \"maxProperties\" ? \"more\" : \"fewer\";\n return (0, codegen_1.str) `must NOT have ${comp} than ${schemaCode} properties`;\n },\n params: ({ schemaCode }) => (0, codegen_1._) `{limit: ${schemaCode}}`,\n};\nconst def = {\n keyword: [\"maxProperties\", \"minProperties\"],\n type: \"object\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { keyword, data, schemaCode } = cxt;\n const op = keyword === \"maxProperties\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n cxt.fail$data((0, codegen_1._) `Object.keys(${data}).length ${op} ${schemaCode}`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=limitProperties.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message: ({ schemaCode }) => (0, codegen_1.str) `must be multiple of ${schemaCode}`,\n params: ({ schemaCode }) => (0, codegen_1._) `{multipleOf: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"multipleOf\",\n type: \"number\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, schemaCode, it } = cxt;\n // const bdt = bad$DataType(schemaCode, def.schemaType, $data)\n const prec = it.opts.multipleOfPrecision;\n const res = gen.let(\"res\");\n const invalid = prec\n ? (0, codegen_1._) `Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}`\n : (0, codegen_1._) `${res} !== parseInt(${res})`;\n cxt.fail$data((0, codegen_1._) `(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=multipleOf.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst error = {\n message: ({ schemaCode }) => (0, codegen_1.str) `must match pattern \"${schemaCode}\"`,\n params: ({ schemaCode }) => (0, codegen_1._) `{pattern: ${schemaCode}}`,\n};\nconst def = {\n keyword: \"pattern\",\n type: \"string\",\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt) {\n const { data, $data, schema, schemaCode, it } = cxt;\n // TODO regexp should be wrapped in try/catchs\n const u = it.opts.unicodeRegExp ? \"u\" : \"\";\n const regExp = $data ? (0, codegen_1._) `(new RegExp(${schemaCode}, ${u}))` : (0, code_1.usePattern)(cxt, schema);\n cxt.fail$data((0, codegen_1._) `!${regExp}.test(${data})`);\n },\n};\nexports.default = def;\n//# sourceMappingURL=pattern.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { missingProperty } }) => (0, codegen_1.str) `must have required property '${missingProperty}'`,\n params: ({ params: { missingProperty } }) => (0, codegen_1._) `{missingProperty: ${missingProperty}}`,\n};\nconst def = {\n keyword: \"required\",\n type: \"object\",\n schemaType: \"array\",\n $data: true,\n error,\n code(cxt) {\n const { gen, schema, schemaCode, data, $data, it } = cxt;\n const { opts } = it;\n if (!$data && schema.length === 0)\n return;\n const useLoop = schema.length >= opts.loopRequired;\n if (it.allErrors)\n allErrorsMode();\n else\n exitOnErrorMode();\n if (opts.strictRequired) {\n const props = cxt.parentSchema.properties;\n const { definedProperties } = cxt.it;\n for (const requiredKey of schema) {\n if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === undefined && !definedProperties.has(requiredKey)) {\n const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;\n const msg = `required property \"${requiredKey}\" is not defined at \"${schemaPath}\" (strictRequired)`;\n (0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired);\n }\n }\n }\n function allErrorsMode() {\n if (useLoop || $data) {\n cxt.block$data(codegen_1.nil, loopAllRequired);\n }\n else {\n for (const prop of schema) {\n (0, code_1.checkReportMissingProp)(cxt, prop);\n }\n }\n }\n function exitOnErrorMode() {\n const missing = gen.let(\"missing\");\n if (useLoop || $data) {\n const valid = gen.let(\"valid\", true);\n cxt.block$data(valid, () => loopUntilMissing(missing, valid));\n cxt.ok(valid);\n }\n else {\n gen.if((0, code_1.checkMissingProp)(cxt, schema, missing));\n (0, code_1.reportMissingProp)(cxt, missing);\n gen.else();\n }\n }\n function loopAllRequired() {\n gen.forOf(\"prop\", schemaCode, (prop) => {\n cxt.setParams({ missingProperty: prop });\n gen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error());\n });\n }\n function loopUntilMissing(missing, valid) {\n cxt.setParams({ missingProperty: missing });\n gen.forOf(missing, schemaCode, () => {\n gen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties));\n gen.if((0, codegen_1.not)(valid), () => {\n cxt.error();\n gen.break();\n });\n }, codegen_1.nil);\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=required.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst dataType_1 = require(\"../../compile/validate/dataType\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst util_1 = require(\"../../compile/util\");\nconst equal_1 = require(\"../../runtime/equal\");\nconst error = {\n message: ({ params: { i, j } }) => (0, codegen_1.str) `must NOT have duplicate items (items ## ${j} and ${i} are identical)`,\n params: ({ params: { i, j } }) => (0, codegen_1._) `{i: ${i}, j: ${j}}`,\n};\nconst def = {\n keyword: \"uniqueItems\",\n type: \"array\",\n schemaType: \"boolean\",\n $data: true,\n error,\n code(cxt) {\n const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt;\n if (!$data && !schema)\n return;\n const valid = gen.let(\"valid\");\n const itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : [];\n cxt.block$data(valid, validateUniqueItems, (0, codegen_1._) `${schemaCode} === false`);\n cxt.ok(valid);\n function validateUniqueItems() {\n const i = gen.let(\"i\", (0, codegen_1._) `${data}.length`);\n const j = gen.let(\"j\");\n cxt.setParams({ i, j });\n gen.assign(valid, true);\n gen.if((0, codegen_1._) `${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));\n }\n function canOptimize() {\n return itemTypes.length > 0 && !itemTypes.some((t) => t === \"object\" || t === \"array\");\n }\n function loopN(i, j) {\n const item = gen.name(\"item\");\n const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);\n const indices = gen.const(\"indices\", (0, codegen_1._) `{}`);\n gen.for((0, codegen_1._) `;${i}--;`, () => {\n gen.let(item, (0, codegen_1._) `${data}[${i}]`);\n gen.if(wrongType, (0, codegen_1._) `continue`);\n if (itemTypes.length > 1)\n gen.if((0, codegen_1._) `typeof ${item} == \"string\"`, (0, codegen_1._) `${item} += \"_\"`);\n gen\n .if((0, codegen_1._) `typeof ${indices}[${item}] == \"number\"`, () => {\n gen.assign(j, (0, codegen_1._) `${indices}[${item}]`);\n cxt.error();\n gen.assign(valid, false).break();\n })\n .code((0, codegen_1._) `${indices}[${item}] = ${i}`);\n });\n }\n function loopN2(i, j) {\n const eql = (0, util_1.useFunc)(gen, equal_1.default);\n const outer = gen.name(\"outer\");\n gen.label(outer).for((0, codegen_1._) `;${i}--;`, () => gen.for((0, codegen_1._) `${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._) `${eql}(${data}[${i}], ${data}[${j}])`, () => {\n cxt.error();\n gen.assign(valid, false).break(outer);\n })));\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=uniqueItems.js.map","'use strict';\n\nvar traverse = module.exports = function (schema, opts, cb) {\n // Legacy support for v0.3.1 and earlier.\n if (typeof opts == 'function') {\n cb = opts;\n opts = {};\n }\n\n cb = opts.cb || cb;\n var pre = (typeof cb == 'function') ? cb : cb.pre || function() {};\n var post = cb.post || function() {};\n\n _traverse(opts, pre, post, schema, '', schema);\n};\n\n\ntraverse.keywords = {\n additionalItems: true,\n items: true,\n contains: true,\n additionalProperties: true,\n propertyNames: true,\n not: true,\n if: true,\n then: true,\n else: true\n};\n\ntraverse.arrayKeywords = {\n items: true,\n allOf: true,\n anyOf: true,\n oneOf: true\n};\n\ntraverse.propsKeywords = {\n $defs: true,\n definitions: true,\n properties: true,\n patternProperties: true,\n dependencies: true\n};\n\ntraverse.skipKeywords = {\n default: true,\n enum: true,\n const: true,\n required: true,\n maximum: true,\n minimum: true,\n exclusiveMaximum: true,\n exclusiveMinimum: true,\n multipleOf: true,\n maxLength: true,\n minLength: true,\n pattern: true,\n format: true,\n maxItems: true,\n minItems: true,\n uniqueItems: true,\n maxProperties: true,\n minProperties: true\n};\n\n\nfunction _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {\n if (schema && typeof schema == 'object' && !Array.isArray(schema)) {\n pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n for (var key in schema) {\n var sch = schema[key];\n if (Array.isArray(sch)) {\n if (key in traverse.arrayKeywords) {\n for (var i=0; i {\n const intervalId = setInterval(async () => {\n const response = await this.getAccessToken(deviceCode);\n if (response.access_token) {\n clearInterval(intervalId);\n clearTimeout(timeoutId);\n resolve(response);\n }\n if (response.error && response.error !== 'authorization_pending') {\n clearInterval(intervalId);\n clearTimeout(timeoutId);\n reject(response.error_description);\n }\n }, interval * 1000);\n const timeoutId = setTimeout(async () => {\n clearInterval(intervalId);\n clearTimeout(timeoutId);\n reject('Authorization has expired. Please try again.');\n }, expiresIn * 1000);\n });\n }\n async getAccessToken(deviceCode) {\n return await this.sendRequest('/device-token', 'POST', {\n client_name: this.clientName,\n device_code: deviceCode,\n grant_type: 'urn:ietf:params:oauth:grant-type:device_code',\n });\n }\n async getDeviceCode() {\n const { device_code: deviceCode, user_code: userCode, verification_uri: verificationUri, verification_uri_complete: verificationUriComplete, interval = 10, expires_in: expiresIn = 300, } = await this.sendRequest('/device-authorize', 'POST', {\n client_name: this.clientName,\n });\n return {\n deviceCode,\n userCode,\n verificationUri,\n verificationUriComplete,\n interval,\n expiresIn,\n };\n }\n async sendRequest(url, method = 'GET', body = undefined, headers = {}) {\n url = `${this.baseUrl}${url}`;\n const response = await this.apiClient.request(url, {\n body: body ? JSON.stringify(body) : body,\n method,\n headers: { 'Content-Type': 'application/json', ...headers },\n });\n if (response.status === 204) {\n return { success: true };\n }\n return await response.json();\n }\n}\nexports.RedoclyOAuthDeviceFlow = RedoclyOAuthDeviceFlow;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RedoclyOAuthClient = void 0;\nconst node_os_1 = require(\"node:os\");\nconst path = require(\"node:path\");\nconst node_fs_1 = require(\"node:fs\");\nconst crypto = require(\"node:crypto\");\nconst node_buffer_1 = require(\"node:buffer\");\nconst device_flow_1 = require(\"./device-flow\");\nconst SALT = '4618dbc9-8aed-4e27-aaf0-225f4603e5a4';\nconst CRYPTO_ALGORITHM = 'aes-256-cbc';\nclass RedoclyOAuthClient {\n constructor(clientName, version) {\n this.clientName = clientName;\n this.version = version;\n this.dir = path.join((0, node_os_1.homedir)(), '.redocly');\n if (!(0, node_fs_1.existsSync)(this.dir)) {\n (0, node_fs_1.mkdirSync)(this.dir);\n }\n const homeDirPath = process.env.HOME;\n const hash = crypto.createHash('sha256');\n hash.update(`${homeDirPath}${SALT}`);\n const hashHex = hash.digest('hex');\n const key = node_buffer_1.Buffer.alloc(32, node_buffer_1.Buffer.from(hashHex).toString('base64')).toString();\n const iv = node_buffer_1.Buffer.alloc(16, node_buffer_1.Buffer.from(process.env.HOME).toString('base64')).toString();\n this.cipher = crypto.createCipheriv(CRYPTO_ALGORITHM, key, iv);\n this.decipher = crypto.createDecipheriv(CRYPTO_ALGORITHM, key, iv);\n }\n async login(baseUrl) {\n const deviceFlow = new device_flow_1.RedoclyOAuthDeviceFlow(baseUrl, this.clientName, this.version);\n const token = await deviceFlow.run();\n if (!token) {\n throw new Error('Failed to login');\n }\n this.saveToken(token);\n }\n async logout() {\n try {\n this.removeToken();\n }\n catch (err) {\n // do nothing\n }\n }\n async isAuthorized(baseUrl, apiKey) {\n const deviceFlow = new device_flow_1.RedoclyOAuthDeviceFlow(baseUrl, this.clientName, this.version);\n if (apiKey) {\n return await deviceFlow.verifyApiKey(apiKey);\n }\n const token = await this.readToken();\n if (!token) {\n return false;\n }\n const isValidAccessToken = await deviceFlow.verifyToken(token.access_token);\n if (isValidAccessToken) {\n return true;\n }\n try {\n const newToken = await deviceFlow.refreshToken(token.refresh_token);\n await this.saveToken(newToken);\n }\n catch {\n return false;\n }\n return true;\n }\n async saveToken(token) {\n try {\n const encrypted = this.cipher.update(JSON.stringify(token), 'utf8', 'hex') + this.cipher.final('hex');\n (0, node_fs_1.writeFileSync)(path.join(this.dir, 'auth.json'), encrypted);\n }\n catch (error) {\n process.stderr.write('Error saving tokens:', error);\n }\n }\n async readToken() {\n try {\n const token = (0, node_fs_1.readFileSync)(path.join(this.dir, 'auth.json'), 'utf8');\n const decrypted = this.decipher.update(token, 'hex', 'utf8') + this.decipher.final('utf8');\n return decrypted ? JSON.parse(decrypted) : null;\n }\n catch {\n return null;\n }\n }\n async removeToken() {\n const tokenPath = path.join(this.dir, 'auth.json');\n if ((0, node_fs_1.existsSync)(tokenPath)) {\n (0, node_fs_1.rmSync)(tokenPath);\n }\n }\n}\nexports.RedoclyOAuthClient = RedoclyOAuthClient;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.promptClientToken = promptClientToken;\nexports.handleLogin = handleLogin;\nexports.handleLogout = handleLogout;\nconst colorette_1 = require(\"colorette\");\nconst openapi_core_1 = require(\"@redocly/openapi-core\");\nconst miscellaneous_1 = require(\"../utils/miscellaneous\");\nconst oauth_client_1 = require(\"../auth/oauth-client\");\nconst api_1 = require(\"../reunite/api\");\nfunction promptClientToken(domain) {\n return (0, miscellaneous_1.promptUser)((0, colorette_1.green)(`\\n 🔑 Copy your API key from ${(0, colorette_1.blue)(`https://app.${domain}/profile`)} and paste it below`) + (0, colorette_1.yellow)(' (if you want to log in with Reunite, please run `redocly login --next` instead)'), true);\n}\nasync function handleLogin({ argv, config, version }) {\n if (argv.next) {\n try {\n const reuniteUrl = (0, api_1.getReuniteUrl)(argv.residency);\n const oauthClient = new oauth_client_1.RedoclyOAuthClient('redocly-cli', version);\n await oauthClient.login(reuniteUrl);\n }\n catch {\n if (argv.residency) {\n const reuniteUrl = (0, api_1.getReuniteUrl)(argv.residency);\n (0, miscellaneous_1.exitWithError)(`❌ Connection to ${reuniteUrl} failed.`);\n }\n else {\n (0, miscellaneous_1.exitWithError)(`❌ Login failed. Please check your credentials and try again.`);\n }\n }\n }\n else {\n try {\n const region = argv.residency || config.region;\n const client = new openapi_core_1.RedoclyClient(region);\n const clientToken = await promptClientToken(client.domain);\n process.stdout.write((0, colorette_1.gray)('\\n Logging in...\\n'));\n await client.login(clientToken, argv.verbose);\n process.stdout.write((0, colorette_1.green)(' Authorization confirmed. ✅\\n\\n'));\n }\n catch (err) {\n (0, miscellaneous_1.exitWithError)(' ' + err?.message);\n }\n }\n}\nasync function handleLogout({ version }) {\n const client = new openapi_core_1.RedoclyClient();\n client.logout();\n const oauthClient = new oauth_client_1.RedoclyOAuthClient('redocly-cli', version);\n oauthClient.logout();\n process.stdout.write('Logged out from the Redocly account. ✋ \\n');\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.transformPush = exports.DESTINATION_REGEX = void 0;\nexports.commonPushHandler = commonPushHandler;\nexports.handlePush = handlePush;\nexports.getDestinationProps = getDestinationProps;\nexports.getApiRoot = getApiRoot;\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nconst perf_hooks_1 = require(\"perf_hooks\");\nconst colorette_1 = require(\"colorette\");\nconst crypto_1 = require(\"crypto\");\nconst openapi_core_1 = require(\"@redocly/openapi-core\");\nconst utils_1 = require(\"@redocly/openapi-core/lib/utils\");\nconst miscellaneous_1 = require(\"../utils/miscellaneous\");\nconst auth_1 = require(\"./auth\");\nconst push_1 = require(\"../reunite/commands/push\");\nconst api_client_1 = require(\"../reunite/api/api-client\");\nconst DEFAULT_VERSION = 'latest';\nexports.DESTINATION_REGEX = \n// eslint-disable-next-line no-useless-escape\n/^(@(?[\\w\\-\\s]+)\\/)?(?[^@]*)@(?[\\w\\.\\-]+)$/;\nfunction commonPushHandler({ project, 'mount-path': mountPath, }) {\n if (project && mountPath) {\n return push_1.handlePush;\n }\n return (0, exports.transformPush)(handlePush);\n}\nasync function handlePush({ argv, config }) {\n const client = new openapi_core_1.RedoclyClient(config.region);\n const isAuthorized = await client.isAuthorizedWithRedoclyByRegion();\n if (!isAuthorized) {\n try {\n const clientToken = await (0, auth_1.promptClientToken)(client.domain);\n await client.login(clientToken);\n }\n catch (e) {\n (0, miscellaneous_1.exitWithError)(e);\n }\n }\n const startedAt = perf_hooks_1.performance.now();\n const { destination, branchName, upsert } = argv;\n const jobId = argv['job-id'];\n const batchSize = argv['batch-size'];\n if (destination && !exports.DESTINATION_REGEX.test(destination)) {\n (0, miscellaneous_1.exitWithError)(`Destination argument value is not valid, please use the right format: ${(0, colorette_1.yellow)('')}.`);\n }\n const destinationProps = getDestinationProps(destination, config.organization);\n const organizationId = argv.organization || destinationProps.organizationId;\n const { name, version } = destinationProps;\n if (!organizationId) {\n return (0, miscellaneous_1.exitWithError)(`No organization provided, please use --organization option or specify the 'organization' field in the config file.`);\n }\n const api = argv.api || (name && version && getApiRoot({ name, version, config }));\n if (name && version && !api) {\n (0, miscellaneous_1.exitWithError)(`No api found that matches ${(0, colorette_1.blue)(`${name}@${version}`)}. Please make sure you have provided the correct data in the config file.`);\n }\n // Ensure that a destination for the api is provided.\n if (!name && api) {\n return (0, miscellaneous_1.exitWithError)(`No destination provided, please use --destination option to provide destination.`);\n }\n if (jobId && !jobId.trim()) {\n (0, miscellaneous_1.exitWithError)(`The ${(0, colorette_1.blue)(`job-id`)} option value is not valid, please avoid using an empty string.`);\n }\n if (batchSize && batchSize < 2) {\n (0, miscellaneous_1.exitWithError)(`The ${(0, colorette_1.blue)(`batch-size`)} option value is not valid, please use the integer bigger than 1.`);\n }\n const apis = api ? { [`${name}@${version}`]: { root: api } } : config.apis;\n if (!Object.keys(apis).length) {\n (0, miscellaneous_1.exitWithError)(`Api not found. Please make sure you have provided the correct data in the config file.`);\n }\n for (const [apiNameAndVersion, { root: api }] of Object.entries(apis)) {\n const resolvedConfig = (0, openapi_core_1.getMergedConfig)(config, apiNameAndVersion);\n resolvedConfig.styleguide.skipDecorators(argv['skip-decorator']);\n const [name, version = DEFAULT_VERSION] = apiNameAndVersion.split('@');\n const encodedName = encodeURIComponent(name);\n try {\n let rootFilePath = '';\n const filePaths = [];\n const filesToUpload = await collectFilesToUpload(api, resolvedConfig);\n const filesHash = hashFiles(filesToUpload.files);\n process.stdout.write(`Uploading ${filesToUpload.files.length} ${(0, utils_1.pluralize)('file', filesToUpload.files.length)}:\\n`);\n let uploaded = 0;\n for (const file of filesToUpload.files) {\n const { signedUploadUrl, filePath } = await client.registryApi.prepareFileUpload({\n organizationId,\n name: encodedName,\n version,\n filesHash,\n filename: file.keyOnS3,\n isUpsert: upsert,\n });\n if (file.filePath === filesToUpload.root) {\n rootFilePath = filePath;\n }\n filePaths.push(filePath);\n process.stdout.write(`Uploading ${file.contents ? 'bundle for ' : ''}${(0, colorette_1.blue)(file.filePath)}...`);\n const uploadResponse = await uploadFileToS3(signedUploadUrl, file.contents || file.filePath);\n const fileCounter = `(${++uploaded}/${filesToUpload.files.length})`;\n if (!uploadResponse.ok) {\n (0, miscellaneous_1.exitWithError)(`✗ ${fileCounter}\\nFile upload failed.`);\n }\n process.stdout.write((0, colorette_1.green)(`✓ ${fileCounter}\\n`));\n }\n process.stdout.write('\\n');\n await client.registryApi.pushApi({\n organizationId,\n name: encodedName,\n version,\n rootFilePath,\n filePaths,\n branch: branchName,\n isUpsert: upsert,\n isPublic: argv['public'],\n batchId: jobId,\n batchSize: batchSize,\n });\n }\n catch (error) {\n if (error.message === 'ORGANIZATION_NOT_FOUND') {\n (0, miscellaneous_1.exitWithError)(`Organization ${(0, colorette_1.blue)(organizationId)} not found.`);\n }\n if (error.message === 'API_VERSION_NOT_FOUND') {\n (0, miscellaneous_1.exitWithError)(`The definition version ${(0, colorette_1.blue)(`${name}@${version}`)} does not exist in organization ${(0, colorette_1.blue)(organizationId)}!\\n${(0, colorette_1.yellow)('Suggestion:')} please use ${(0, colorette_1.blue)('-u')} or ${(0, colorette_1.blue)('--upsert')} to create definition.`);\n }\n throw error;\n }\n process.stdout.write(`Definition: ${(0, colorette_1.blue)(api)} is successfully pushed to Redocly API Registry.\\n`);\n }\n (0, miscellaneous_1.printExecutionTime)('push', startedAt, api || `apis in organization ${organizationId}`);\n}\nfunction getFilesList(dir, files) {\n files = files || [];\n const filesAndDirs = fs.readdirSync(dir);\n for (const name of filesAndDirs) {\n if (fs.statSync(path.join(dir, name)).isDirectory()) {\n files = getFilesList(path.join(dir, name), files);\n }\n else {\n const currentPath = dir + '/' + name;\n files.push(currentPath);\n }\n }\n return files;\n}\nasync function collectFilesToUpload(api, config) {\n const files = [];\n const [{ path: apiPath }] = await (0, miscellaneous_1.getFallbackApisOrExit)([api], config);\n process.stdout.write('Bundling definition\\n');\n const { bundle: openapiBundle, problems } = await (0, openapi_core_1.bundle)({\n config,\n ref: apiPath,\n skipRedoclyRegistryRefs: true,\n });\n const fileTotals = (0, openapi_core_1.getTotals)(problems);\n if (fileTotals.errors === 0) {\n process.stdout.write(`Created a bundle for ${(0, colorette_1.blue)(api)} ${fileTotals.warnings > 0 ? 'with warnings' : ''}\\n`);\n }\n else {\n (0, miscellaneous_1.exitWithError)(`Failed to create a bundle for ${(0, colorette_1.blue)(api)}.`);\n }\n const fileExt = path.extname(apiPath).split('.').pop();\n files.push(getFileEntry(apiPath, (0, miscellaneous_1.dumpBundle)(openapiBundle.parsed, fileExt)));\n if (fs.existsSync('package.json')) {\n files.push(getFileEntry('package.json'));\n }\n if (fs.existsSync(openapi_core_1.IGNORE_FILE)) {\n files.push(getFileEntry(openapi_core_1.IGNORE_FILE));\n }\n if (config.configFile) {\n // All config file paths including the root one\n files.push(...[...new Set(config.styleguide.extendPaths)].map((f) => getFileEntry(f)));\n if (config.theme?.openapi?.htmlTemplate) {\n const dir = getFolder(config.theme.openapi.htmlTemplate);\n const fileList = getFilesList(dir, []);\n files.push(...fileList.map((f) => getFileEntry(f)));\n }\n const pluginFiles = new Set();\n for (const plugin of config.styleguide.pluginPaths) {\n if (typeof plugin !== 'string')\n continue;\n const fileList = getFilesList(getFolder(plugin), []);\n fileList.forEach((f) => pluginFiles.add(f));\n }\n files.push(...filterPluginFilesByExt(Array.from(pluginFiles)).map((f) => getFileEntry(f)));\n }\n if (config.files) {\n const otherFiles = new Set();\n for (const file of config.files) {\n if (fs.statSync(file).isDirectory()) {\n const fileList = getFilesList(file, []);\n fileList.forEach((f) => otherFiles.add(f));\n }\n else {\n otherFiles.add(file);\n }\n }\n files.push(...Array.from(otherFiles).map((f) => getFileEntry(f)));\n }\n return {\n files,\n root: path.resolve(apiPath),\n };\n function filterPluginFilesByExt(files) {\n return files.filter((file) => {\n const fileExt = path.extname(file).toLowerCase();\n return fileExt === '.js' || fileExt === '.ts' || fileExt === '.mjs' || fileExt === 'json';\n });\n }\n function getFileEntry(filename, contents) {\n return {\n filePath: path.resolve(filename),\n keyOnS3: config.configFile\n ? (0, openapi_core_1.slash)(path.relative(path.dirname(config.configFile), filename))\n : (0, openapi_core_1.slash)(path.basename(filename)),\n contents: (contents && Buffer.from(contents, 'utf-8')) || undefined,\n };\n }\n}\nfunction getFolder(filePath) {\n return path.resolve(path.dirname(filePath));\n}\nfunction hashFiles(filePaths) {\n const sum = (0, crypto_1.createHash)('sha256');\n filePaths.forEach((file) => sum.update(fs.readFileSync(file.filePath)));\n return sum.digest('hex');\n}\nfunction parseDestination(destination) {\n return destination?.match(exports.DESTINATION_REGEX)?.groups;\n}\nfunction getDestinationProps(destination, organization) {\n const groups = destination && parseDestination(destination);\n if (groups) {\n return {\n organizationId: groups.organizationId || organization,\n name: groups.name,\n version: groups.version,\n };\n }\n else {\n return { organizationId: organization, name: undefined, version: undefined };\n }\n}\nconst transformPush = (callback) => ({ argv: { apis, branch, 'batch-id': batchId, 'job-id': jobId, ...rest }, config, version, }) => {\n const [maybeApiOrDestination, maybeDestination, maybeBranchName] = apis || [];\n if (batchId) {\n process.stderr.write((0, colorette_1.yellow)(`The ${(0, colorette_1.red)('batch-id')} option is deprecated. Please use ${(0, colorette_1.green)('job-id')} instead.\\n\\n`));\n }\n if (maybeBranchName) {\n process.stderr.write((0, colorette_1.yellow)('Deprecation warning: Do not use the third parameter as a branch name. Please use a separate --branch option instead.\\n\\n'));\n }\n let apiFile, destination;\n if (maybeDestination) {\n process.stderr.write((0, colorette_1.yellow)('Deprecation warning: Do not use the second parameter as a destination. Please use a separate --destination and --organization instead.\\n\\n'));\n apiFile = maybeApiOrDestination;\n destination = maybeDestination;\n }\n else if (maybeApiOrDestination && exports.DESTINATION_REGEX.test(maybeApiOrDestination)) {\n process.stderr.write((0, colorette_1.yellow)('Deprecation warning: Do not use the first parameter as a destination. Please use a separate --destination and --organization options instead.\\n\\n'));\n destination = maybeApiOrDestination;\n }\n else if (maybeApiOrDestination && !exports.DESTINATION_REGEX.test(maybeApiOrDestination)) {\n apiFile = maybeApiOrDestination;\n }\n return callback({\n argv: {\n ...rest,\n destination: rest.destination ?? destination,\n api: apiFile,\n branchName: branch ?? maybeBranchName,\n 'job-id': jobId || batchId,\n },\n config,\n version,\n });\n};\nexports.transformPush = transformPush;\nfunction getApiRoot({ name, version, config: { apis }, }) {\n const api = apis?.[`${name}@${version}`] || (version === DEFAULT_VERSION && apis?.[name]);\n return api?.root;\n}\nasync function uploadFileToS3(url, filePathOrBuffer) {\n const fileSizeInBytes = typeof filePathOrBuffer === 'string'\n ? fs.statSync(filePathOrBuffer).size\n : filePathOrBuffer.byteLength;\n const readStream = typeof filePathOrBuffer === 'string' ? fs.createReadStream(filePathOrBuffer) : filePathOrBuffer;\n const requestOptions = {\n method: 'PUT',\n headers: {\n 'Content-Length': fileSizeInBytes.toString(),\n },\n body: Buffer.isBuffer(readStream)\n ? new Blob([readStream])\n : new Blob([await (0, api_client_1.streamToBuffer)(readStream)]),\n };\n const proxyAgent = (0, openapi_core_1.getProxyAgent)();\n if (proxyAgent) {\n requestOptions.dispatcher = proxyAgent;\n }\n return fetch(url, requestOptions);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.otelTelemetry = exports.OtelServerTelemetry = void 0;\nconst api_1 = require(\"@opentelemetry/api\");\nconst resources_1 = require(\"@opentelemetry/resources\");\nconst sdk_trace_node_1 = require(\"@opentelemetry/sdk-trace-node\");\nconst exporter_trace_otlp_http_1 = require(\"@opentelemetry/exporter-trace-otlp-http\");\nconst semantic_conventions_1 = require(\"@opentelemetry/semantic-conventions\");\nconst update_version_notifier_1 = require(\"./utils/update-version-notifier\");\nconst fetch_with_timeout_1 = require(\"./utils/fetch-with-timeout\");\nconst OTEL_TRACES_URL = process.env.OTEL_TRACES_URL || 'https://otel.cloud.redocly.com/v1/traces';\nclass OtelServerTelemetry {\n init() {\n const nodeTracerProvider = new sdk_trace_node_1.NodeTracerProvider({\n resource: new resources_1.Resource({\n [semantic_conventions_1.ATTR_SERVICE_NAME]: `redocly-cli`,\n [semantic_conventions_1.ATTR_SERVICE_VERSION]: `@redocly/cli@${update_version_notifier_1.version}`,\n }),\n });\n nodeTracerProvider.addSpanProcessor(new sdk_trace_node_1.SimpleSpanProcessor(new exporter_trace_otlp_http_1.OTLPTraceExporter({\n url: OTEL_TRACES_URL,\n headers: {},\n timeoutMillis: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT,\n })));\n nodeTracerProvider.register();\n }\n send(event, data) {\n const time = new Date();\n const eventId = crypto.randomUUID();\n const span = api_1.trace.getTracer('CliTelemetry').startSpan(`event.${event}`, {\n attributes: {\n 'cloudevents.event_client.id': eventId,\n 'cloudevents.event_client.type': event,\n },\n startTime: time,\n });\n for (const [key, value] of Object.entries(data)) {\n const keySnakeCase = key.replace(/([A-Z])/g, '_$1').toLowerCase();\n if (value !== undefined) {\n span.setAttribute(`cloudevents.event_data.${keySnakeCase}`, value);\n }\n }\n span.end(time);\n }\n}\nexports.OtelServerTelemetry = OtelServerTelemetry;\nexports.otelTelemetry = new OtelServerTelemetry();\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReuniteApi = exports.ReuniteApiClient = exports.ReuniteApiError = void 0;\nexports.streamToBuffer = streamToBuffer;\nconst colorette_1 = require(\"colorette\");\nconst fetch_with_timeout_1 = require(\"../../utils/fetch-with-timeout\");\nclass ReuniteApiError extends Error {\n constructor(message, status) {\n super(message);\n this.status = status;\n }\n}\nexports.ReuniteApiError = ReuniteApiError;\nclass ReuniteApiClient {\n constructor(version, command) {\n this.version = version;\n this.command = command;\n this.sunsetWarnings = [];\n }\n async request(url, options) {\n const headers = {\n ...options.headers,\n 'user-agent': `redocly-cli/${this.version.trim()} ${this.command}`,\n };\n const response = await (0, fetch_with_timeout_1.default)(url, {\n ...options,\n headers,\n });\n this.collectSunsetWarning(response);\n return response;\n }\n collectSunsetWarning(response) {\n const sunsetTime = this.getSunsetDate(response);\n if (!sunsetTime)\n return;\n const sunsetDate = new Date(sunsetTime);\n if (sunsetTime > Date.now()) {\n this.sunsetWarnings.push({\n sunsetDate,\n isSunsetExpired: false,\n });\n }\n else {\n this.sunsetWarnings.push({\n sunsetDate,\n isSunsetExpired: true,\n });\n }\n }\n getSunsetDate(response) {\n const { headers } = response;\n if (!headers) {\n return;\n }\n const sunsetDate = headers.get('sunset') || headers.get('Sunset');\n if (!sunsetDate) {\n return;\n }\n return Date.parse(sunsetDate);\n }\n}\nexports.ReuniteApiClient = ReuniteApiClient;\nclass RemotesApi {\n constructor(client, domain, apiKey) {\n this.client = client;\n this.domain = domain;\n this.apiKey = apiKey;\n }\n async getParsedResponse(response) {\n const responseBody = await response.json();\n if (response.ok) {\n return responseBody;\n }\n throw new ReuniteApiError(`${responseBody.title || response.statusText || 'Unknown error'}.`, response.status);\n }\n async getDefaultBranch(organizationId, projectId) {\n try {\n const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/source`, {\n timeout: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT,\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${this.apiKey}`,\n },\n });\n const source = await this.getParsedResponse(response);\n return source.branchName;\n }\n catch (err) {\n const message = `Failed to fetch default branch. ${err.message}`;\n if (err instanceof ReuniteApiError) {\n throw new ReuniteApiError(message, err.status);\n }\n throw new Error(message);\n }\n }\n async upsert(organizationId, projectId, remote) {\n try {\n const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/remotes`, {\n timeout: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT,\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${this.apiKey}`,\n },\n body: JSON.stringify({\n mountPath: remote.mountPath,\n mountBranchName: remote.mountBranchName,\n type: 'CICD',\n autoMerge: true,\n }),\n });\n return await this.getParsedResponse(response);\n }\n catch (err) {\n const message = `Failed to upsert remote. ${err.message}`;\n if (err instanceof ReuniteApiError) {\n throw new ReuniteApiError(message, err.status);\n }\n throw new Error(message);\n }\n }\n async push(organizationId, projectId, payload, files) {\n const formData = new globalThis.FormData();\n formData.append('remoteId', payload.remoteId);\n formData.append('commit[message]', payload.commit.message);\n formData.append('commit[author][name]', payload.commit.author.name);\n formData.append('commit[author][email]', payload.commit.author.email);\n formData.append('commit[branchName]', payload.commit.branchName);\n payload.commit.url && formData.append('commit[url]', payload.commit.url);\n payload.commit.namespace && formData.append('commit[namespaceId]', payload.commit.namespace);\n payload.commit.sha && formData.append('commit[sha]', payload.commit.sha);\n payload.commit.repository && formData.append('commit[repositoryId]', payload.commit.repository);\n payload.commit.createdAt && formData.append('commit[createdAt]', payload.commit.createdAt);\n for (const file of files) {\n const blob = Buffer.isBuffer(file.stream)\n ? new Blob([file.stream])\n : new Blob([await streamToBuffer(file.stream)]);\n formData.append(`files[${file.path}]`, blob, file.path);\n }\n payload.isMainBranch && formData.append('isMainBranch', 'true');\n try {\n const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/pushes`, {\n method: 'POST',\n headers: {\n Authorization: `Bearer ${this.apiKey}`,\n },\n body: formData,\n });\n return await this.getParsedResponse(response);\n }\n catch (err) {\n const message = `Failed to push. ${err.message}`;\n if (err instanceof ReuniteApiError) {\n throw new ReuniteApiError(message, err.status);\n }\n throw new Error(message);\n }\n }\n async getRemotesList({ organizationId, projectId, mountPath, }) {\n try {\n const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/remotes?filter=mountPath:/${mountPath}/`, {\n timeout: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT,\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${this.apiKey}`,\n },\n });\n return await this.getParsedResponse(response);\n }\n catch (err) {\n const message = `Failed to get remote list. ${err.message}`;\n if (err instanceof ReuniteApiError) {\n throw new ReuniteApiError(message, err.status);\n }\n throw new Error(message);\n }\n }\n async getPush({ organizationId, projectId, pushId, }) {\n try {\n const response = await this.client.request(`${this.domain}/api/orgs/${organizationId}/projects/${projectId}/pushes/${pushId}`, {\n timeout: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT,\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${this.apiKey}`,\n },\n });\n return await this.getParsedResponse(response);\n }\n catch (err) {\n const message = `Failed to get push status. ${err.message}`;\n if (err instanceof ReuniteApiError) {\n throw new ReuniteApiError(message, err.status);\n }\n throw new Error(message);\n }\n }\n}\nclass ReuniteApi {\n constructor({ domain, apiKey, version, command, }) {\n this.command = command;\n this.version = version;\n this.apiClient = new ReuniteApiClient(this.version, this.command);\n this.remotes = new RemotesApi(this.apiClient, domain, apiKey);\n }\n reportSunsetWarnings() {\n const sunsetWarnings = this.apiClient.sunsetWarnings;\n if (sunsetWarnings.length) {\n const [{ isSunsetExpired, sunsetDate }] = sunsetWarnings.sort((a, b) => {\n // First, prioritize by expiration status\n if (a.isSunsetExpired !== b.isSunsetExpired) {\n return a.isSunsetExpired ? -1 : 1;\n }\n // If both are either expired or not, sort by sunset date\n return a.sunsetDate > b.sunsetDate ? 1 : -1;\n });\n const updateVersionMessage = `Update to the latest version by running \"npm install @redocly/cli@latest\".`;\n if (isSunsetExpired) {\n process.stdout.write((0, colorette_1.red)(`The \"${this.command}\" command is not compatible with your version of Redocly CLI. ${updateVersionMessage}\\n\\n`));\n }\n else {\n process.stdout.write((0, colorette_1.yellow)(`The \"${this.command}\" command will be incompatible with your version of Redocly CLI after ${sunsetDate.toLocaleString()}. ${updateVersionMessage}\\n\\n`));\n }\n }\n }\n}\nexports.ReuniteApi = ReuniteApi;\nasync function streamToBuffer(stream) {\n const chunks = [];\n for await (const chunk of stream) {\n chunks.push(chunk);\n }\n return Buffer.concat(chunks);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getApiKeys = getApiKeys;\nconst path_1 = require(\"path\");\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst utils_1 = require(\"@redocly/openapi-core/lib/utils\");\nconst redocly_1 = require(\"@redocly/openapi-core/lib/redocly\");\nfunction readCredentialsFile(credentialsPath) {\n return (0, fs_1.existsSync)(credentialsPath) ? JSON.parse((0, fs_1.readFileSync)(credentialsPath, 'utf-8')) : {};\n}\nfunction getApiKeys(domain) {\n const apiKey = process.env.REDOCLY_AUTHORIZATION;\n if (apiKey) {\n return apiKey;\n }\n const credentialsPath = (0, path_1.resolve)((0, os_1.homedir)(), redocly_1.TOKEN_FILENAME);\n const credentials = readCredentialsFile(credentialsPath);\n if ((0, utils_1.isNotEmptyObject)(credentials) && credentials[domain]) {\n return credentials[domain];\n }\n throw new Error('No api key provided, please use environment variable REDOCLY_AUTHORIZATION.');\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.REUNITE_URLS = void 0;\nexports.getDomain = getDomain;\nexports.getReuniteUrl = getReuniteUrl;\nexports.REUNITE_URLS = {\n us: 'https://app.cloud.redocly.com',\n eu: 'https://app.cloud.eu.redocly.com',\n};\nfunction getDomain() {\n return process.env.REDOCLY_DOMAIN || exports.REUNITE_URLS.us;\n}\nfunction getReuniteUrl(residency) {\n if (!residency)\n residency = 'us';\n let reuniteUrl = exports.REUNITE_URLS[residency];\n if (!reuniteUrl) {\n reuniteUrl = residency;\n }\n const url = new URL('/api', reuniteUrl).toString();\n return url;\n}\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./api-client\"), exports);\n__exportStar(require(\"./domains\"), exports);\n__exportStar(require(\"./api-keys\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handlePushStatus = handlePushStatus;\nconst colors = require(\"colorette\");\nconst miscellaneous_1 = require(\"../../utils/miscellaneous\");\nconst spinner_1 = require(\"../../utils/spinner\");\nconst utils_1 = require(\"../utils\");\nconst api_1 = require(\"../api\");\nconst js_utils_1 = require(\"../../utils/js-utils\");\nconst utils_2 = require(\"./utils\");\nconst RETRY_INTERVAL_MS = 5000; // 5 sec\nasync function handlePushStatus({ argv, config, version, }) {\n const startedAt = performance.now();\n const spinner = new spinner_1.Spinner();\n const { organization, project: projectId, pushId, wait } = argv;\n const orgId = organization || config.organization;\n if (!orgId) {\n (0, miscellaneous_1.exitWithError)(`No organization provided, please use --organization option or specify the 'organization' field in the config file.`);\n return;\n }\n const domain = argv.domain || (0, api_1.getDomain)();\n const maxExecutionTime = argv['max-execution-time'] || 1200; // 20 min\n const retryIntervalMs = argv['retry-interval']\n ? argv['retry-interval'] * 1000\n : RETRY_INTERVAL_MS;\n const startTime = argv['start-time'] || Date.now();\n const retryTimeoutMs = maxExecutionTime * 1000;\n const continueOnDeployFailures = argv['continue-on-deploy-failures'] || false;\n try {\n const apiKey = (0, api_1.getApiKeys)(domain);\n const client = new api_1.ReuniteApi({ domain, apiKey, version, command: 'push-status' });\n let pushResponse;\n pushResponse = await (0, utils_2.retryUntilConditionMet)({\n operation: () => client.remotes.getPush({\n organizationId: orgId,\n projectId,\n pushId,\n }),\n condition: wait\n ? // Keep retrying if status is \"pending\" or \"running\" (returning false, so the operation will be retried)\n (result) => !['pending', 'running'].includes(result.status['preview'].deploy.status)\n : null,\n onConditionNotMet: (lastResult) => {\n displayDeploymentAndBuildStatus({\n status: lastResult.status['preview'].deploy.status,\n url: lastResult.status['preview'].deploy.url,\n spinner,\n buildType: 'preview',\n continueOnDeployFailures,\n wait,\n });\n },\n onRetry: (lastResult) => {\n if (argv.onRetry) {\n argv.onRetry({\n preview: lastResult.status.preview,\n production: lastResult.isMainBranch ? lastResult.status.production : null,\n commit: lastResult.commit,\n });\n }\n },\n startTime,\n retryTimeoutMs,\n retryIntervalMs,\n });\n printPushStatus({\n buildType: 'preview',\n spinner,\n wait,\n push: pushResponse,\n continueOnDeployFailures,\n });\n printScorecard(pushResponse.status.preview.scorecard);\n const shouldWaitForProdDeployment = pushResponse.isMainBranch &&\n (wait ? pushResponse.status.preview.deploy.status === 'success' : true);\n if (shouldWaitForProdDeployment) {\n pushResponse = await (0, utils_2.retryUntilConditionMet)({\n operation: () => client.remotes.getPush({\n organizationId: orgId,\n projectId,\n pushId,\n }),\n condition: wait\n ? // Keep retrying if status is \"pending\" or \"running\" (returning false, so the operation will be retried)\n (result) => !['pending', 'running'].includes(result.status['production'].deploy.status)\n : null,\n onConditionNotMet: (lastResult) => {\n displayDeploymentAndBuildStatus({\n status: lastResult.status['production'].deploy.status,\n url: lastResult.status['production'].deploy.url,\n spinner,\n buildType: 'production',\n continueOnDeployFailures,\n wait,\n });\n },\n onRetry: (lastResult) => {\n if (argv.onRetry) {\n argv.onRetry({\n preview: lastResult.status.preview,\n production: lastResult.isMainBranch ? lastResult.status.production : null,\n commit: lastResult.commit,\n });\n }\n },\n startTime,\n retryTimeoutMs,\n retryIntervalMs,\n });\n }\n if (pushResponse.isMainBranch) {\n printPushStatus({\n buildType: 'production',\n spinner,\n wait,\n push: pushResponse,\n continueOnDeployFailures,\n });\n printScorecard(pushResponse.status.production.scorecard);\n }\n printPushStatusInfo({ orgId, projectId, pushId, startedAt });\n client.reportSunsetWarnings();\n const summary = {\n preview: pushResponse.status.preview,\n production: pushResponse.isMainBranch ? pushResponse.status.production : null,\n commit: pushResponse.commit,\n };\n return summary;\n }\n catch (err) {\n spinner.stop(); // Spinner can block process exit, so we need to stop it explicitly.\n (0, utils_2.handleReuniteError)('✗ Failed to get push status.', err);\n }\n finally {\n spinner.stop(); // Spinner can block process exit, so we need to stop it explicitly.\n }\n}\nfunction printPushStatusInfo({ orgId, projectId, pushId, startedAt, }) {\n process.stderr.write(`\\nProcessed push-status for ${colors.yellow(orgId)}, ${colors.yellow(projectId)} and pushID ${colors.yellow(pushId)}.\\n`);\n (0, miscellaneous_1.printExecutionTime)('push-status', startedAt, 'Finished');\n}\nfunction printPushStatus({ buildType, spinner, push, continueOnDeployFailures, }) {\n if (!push) {\n return;\n }\n if (push.isOutdated || !push.hasChanges) {\n process.stderr.write(colors.yellow(`Files not added to your project. Reason: ${push.isOutdated ? 'outdated' : 'no changes'}.\\n`));\n }\n else {\n displayDeploymentAndBuildStatus({\n status: push.status[buildType].deploy.status,\n url: push.status[buildType].deploy.url,\n buildType,\n spinner,\n continueOnDeployFailures,\n });\n }\n}\nfunction printScorecard(scorecard) {\n if (!scorecard || scorecard.length === 0) {\n return;\n }\n process.stdout.write(`\\n${colors.magenta('Scorecard')}:`);\n for (const scorecardItem of scorecard) {\n process.stdout.write(`\n ${colors.magenta('Name')}: ${scorecardItem.name}\n ${colors.magenta('Status')}: ${scorecardItem.status}\n ${colors.magenta('URL')}: ${colors.cyan(scorecardItem.url)}\n ${colors.magenta('Description')}: ${scorecardItem.description}\\n`);\n }\n process.stdout.write(`\\n`);\n}\nfunction displayDeploymentAndBuildStatus({ status, url, spinner, buildType, continueOnDeployFailures, wait, }) {\n const message = getMessage({ status, url, buildType, wait });\n if (status === 'failed' && !continueOnDeployFailures) {\n spinner.stop();\n throw new utils_1.DeploymentError(message);\n }\n if (wait && (status === 'pending' || status === 'running')) {\n return spinner.start(message);\n }\n spinner.stop();\n return process.stdout.write(message);\n}\nfunction getMessage({ status, url, buildType, wait, }) {\n switch (status) {\n case 'skipped':\n return `${colors.yellow(`Skipped ${buildType}`)}\\n`;\n case 'pending': {\n const message = `${colors.yellow(`Pending ${buildType}`)}`;\n return wait ? message : `Status: ${message}\\n`;\n }\n case 'running': {\n const message = `${colors.yellow(`Running ${buildType}`)}`;\n return wait ? message : `Status: ${message}\\n`;\n }\n case 'success':\n return `${colors.green(`🚀 ${(0, js_utils_1.capitalize)(buildType)} deploy success.`)}\\n${colors.magenta(`${(0, js_utils_1.capitalize)(buildType)} URL`)}: ${colors.cyan(url || 'No URL yet.')}\\n`;\n case 'failed':\n return `${colors.red(`❌ ${(0, js_utils_1.capitalize)(buildType)} deploy fail.`)}\\n${colors.magenta(`${(0, js_utils_1.capitalize)(buildType)} URL`)}: ${colors.cyan(url || 'No URL yet.')}`;\n default: {\n const message = `${colors.yellow(`No status yet for ${buildType} deploy`)}`;\n return wait ? message : `Status: ${message}\\n`;\n }\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handlePush = handlePush;\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nconst openapi_core_1 = require(\"@redocly/openapi-core\");\nconst utils_1 = require(\"@redocly/openapi-core/lib/utils\");\nconst colorette_1 = require(\"colorette\");\nconst miscellaneous_1 = require(\"../../utils/miscellaneous\");\nconst push_status_1 = require(\"./push-status\");\nconst api_1 = require(\"../api\");\nconst utils_2 = require(\"./utils\");\nasync function handlePush({ argv, config, version, }) {\n const startedAt = performance.now(); // for printing execution time\n const startTime = Date.now(); // for push-status command\n const { organization, project: projectId, 'mount-path': mountPath, verbose } = argv;\n const orgId = organization || config.organization;\n if (!argv.message || !argv.author || !argv.branch) {\n (0, miscellaneous_1.exitWithError)('Error: message, author and branch are required for push to the Reunite.');\n }\n if (!orgId) {\n return (0, miscellaneous_1.exitWithError)(`No organization provided, please use --organization option or specify the 'organization' field in the config file.`);\n }\n const domain = argv.domain || (0, api_1.getDomain)();\n if (!domain) {\n return (0, miscellaneous_1.exitWithError)(`No domain provided, please use --domain option or environment variable REDOCLY_AUTHORIZATION.`);\n }\n try {\n const { 'commit-sha': commitSha, 'commit-url': commitUrl, 'default-branch': defaultBranch, 'wait-for-deployment': waitForDeployment, 'max-execution-time': maxExecutionTime, } = argv;\n const author = parseCommitAuthor(argv.author);\n const apiKey = (0, api_1.getApiKeys)(domain);\n const filesToUpload = collectFilesToPush(argv.files || argv.apis);\n const commandName = 'push';\n if (!filesToUpload.length) {\n return (0, miscellaneous_1.printExecutionTime)(commandName, startedAt, `No files to upload`);\n }\n const client = new api_1.ReuniteApi({ domain, apiKey, version, command: commandName });\n const projectDefaultBranch = await client.remotes.getDefaultBranch(orgId, projectId);\n const remote = await client.remotes.upsert(orgId, projectId, {\n mountBranchName: projectDefaultBranch,\n mountPath,\n });\n process.stderr.write(`Uploading to ${remote.mountPath} ${filesToUpload.length} ${(0, utils_1.pluralize)('file', filesToUpload.length)}:\\n`);\n const { id } = await client.remotes.push(orgId, projectId, {\n remoteId: remote.id,\n commit: {\n message: argv.message,\n branchName: argv.branch,\n sha: commitSha,\n url: commitUrl,\n createdAt: argv['created-at'],\n namespace: argv.namespace,\n repository: argv.repository,\n author,\n },\n isMainBranch: defaultBranch === argv.branch,\n }, filesToUpload.map((f) => ({ path: (0, openapi_core_1.slash)(f.name), stream: fs.createReadStream(f.path) })));\n filesToUpload.forEach((f) => {\n process.stderr.write((0, colorette_1.green)(`✓ ${f.name}\\n`));\n });\n process.stdout.write('\\n');\n process.stdout.write(`Push ID: ${id}\\n`);\n if (waitForDeployment) {\n process.stdout.write('\\n');\n await (0, push_status_1.handlePushStatus)({\n argv: {\n organization: orgId,\n project: projectId,\n pushId: id,\n wait: true,\n domain,\n 'max-execution-time': maxExecutionTime,\n 'start-time': startTime,\n 'continue-on-deploy-failures': argv['continue-on-deploy-failures'],\n },\n config,\n version,\n });\n }\n verbose &&\n (0, miscellaneous_1.printExecutionTime)(commandName, startedAt, `${(0, utils_1.pluralize)('file', filesToUpload.length)} uploaded to organization ${orgId}, project ${projectId}. Push ID: ${id}.`);\n client.reportSunsetWarnings();\n return {\n pushId: id,\n };\n }\n catch (err) {\n (0, utils_2.handleReuniteError)('✗ File upload failed.', err);\n }\n}\nfunction parseCommitAuthor(author) {\n // Author Name \n const reg = /^.+\\s<[^<>]+>$/;\n if (!reg.test(author)) {\n throw new Error('Invalid author format. Use \"Author Name \"');\n }\n const [name, email] = author.split('<');\n return {\n name: name.trim(),\n email: email.replace('>', '').trim(),\n };\n}\nfunction collectFilesToPush(files) {\n const collectedFiles = {};\n for (const file of files) {\n if (fs.statSync(file).isDirectory()) {\n const dir = file;\n const fileList = getFilesList(dir, []);\n fileList.forEach((f) => addFile(f, dir));\n }\n else {\n addFile(file, path.dirname(file));\n }\n }\n function addFile(filePath, fileDir) {\n const fileName = path.relative(fileDir, filePath);\n if (collectedFiles[fileName]) {\n process.stdout.write((0, colorette_1.yellow)(`File ${collectedFiles[fileName]} is overwritten by ${filePath}\\n`));\n }\n collectedFiles[fileName] = filePath;\n }\n return Object.entries(collectedFiles).map(([name, filePath]) => getFileEntry(name, filePath));\n}\nfunction getFileEntry(name, filePath) {\n return {\n name,\n path: path.resolve(filePath),\n };\n}\nfunction getFilesList(dir, files) {\n const filesAndDirs = fs.readdirSync(dir);\n for (const name of filesAndDirs) {\n const currentPath = path.join(dir, name);\n if (fs.statSync(currentPath).isDirectory()) {\n files = getFilesList(currentPath, files);\n }\n else {\n files.push(currentPath);\n }\n }\n return files;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retryUntilConditionMet = retryUntilConditionMet;\nexports.handleReuniteError = handleReuniteError;\nconst openapi_core_1 = require(\"@redocly/openapi-core\");\nconst utils_1 = require(\"../utils\");\nconst miscellaneous_1 = require(\"../../utils/miscellaneous\");\n/**\n * This function retries an operation until a condition is met or a timeout is exceeded.\n * If the condition is not met within the timeout, an error is thrown.\n * @operation The operation to retry.\n * @condition The condition to check after each operation result. Return false to continue retrying. Return true to stop retrying.\n * If not provided, the first result will be returned.\n * @param onConditionNotMet Will be called with the last result right after checking condition and before timeout and retrying.\n * @param onRetry Will be called right before retrying operation with the last result before retrying.\n * @param startTime The start time of the operation. Default is the current time.\n * @param retryTimeoutMs The maximum time to retry the operation. Default is 10 minutes.\n * @param retryIntervalMs The interval between retries. Default is 5 seconds.\n */\nasync function retryUntilConditionMet({ operation, condition, onConditionNotMet, onRetry, startTime = Date.now(), retryTimeoutMs = 600000, // 10 min\nretryIntervalMs = 5000, // 5 sec\n }) {\n async function attempt() {\n const result = await operation();\n if (!condition) {\n return result;\n }\n if (condition(result)) {\n return result;\n }\n else if (Date.now() - startTime > retryTimeoutMs) {\n throw new Error('Timeout exceeded.');\n }\n else {\n onConditionNotMet?.(result);\n await (0, openapi_core_1.pause)(retryIntervalMs);\n await onRetry?.(result);\n return attempt();\n }\n }\n return attempt();\n}\nfunction handleReuniteError(message, error) {\n const errorMessage = error instanceof utils_1.DeploymentError ? error.message : `${message} Reason: ${error.message}\\n`;\n return (0, miscellaneous_1.exitWithError)(errorMessage);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeploymentError = void 0;\nclass DeploymentError extends Error {\n}\nexports.DeploymentError = DeploymentError;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.regionChoices = exports.outputExtensions = void 0;\nexports.outputExtensions = ['json', 'yaml', 'yml'];\nexports.regionChoices = ['us', 'eu'];\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_FETCH_TIMEOUT = void 0;\nconst openapi_core_1 = require(\"@redocly/openapi-core\");\nexports.DEFAULT_FETCH_TIMEOUT = 6000;\nexports.default = async (url, { timeout, ...options } = {}) => {\n if (!timeout) {\n return fetch(url, {\n ...options,\n dispatcher: (0, openapi_core_1.getProxyAgent)(),\n });\n }\n const controller = new globalThis.AbortController();\n const timeoutId = setTimeout(() => {\n controller.abort();\n }, timeout);\n const res = await fetch(url, {\n signal: controller.signal,\n ...options,\n dispatcher: (0, openapi_core_1.getProxyAgent)(),\n });\n clearTimeout(timeoutId);\n return res;\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isObject = isObject;\nexports.isEmptyObject = isEmptyObject;\nexports.isString = isString;\nexports.keysOf = keysOf;\nexports.capitalize = capitalize;\nfunction isObject(obj) {\n const type = typeof obj;\n return type === 'function' || (type === 'object' && !!obj);\n}\nfunction isEmptyObject(obj) {\n return !!obj && Object.keys(obj).length === 0;\n}\nfunction isString(str) {\n return Object.prototype.toString.call(str) === '[object String]';\n}\nfunction keysOf(obj) {\n if (!obj)\n return [];\n return Object.keys(obj);\n}\nfunction capitalize(s) {\n if (s?.length > 0) {\n return s[0].toUpperCase() + s.slice(1);\n }\n return s;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HandledError = exports.CircularJSONNotSupportedError = void 0;\nexports.getFallbackApisOrExit = getFallbackApisOrExit;\nexports.getExecutionTime = getExecutionTime;\nexports.printExecutionTime = printExecutionTime;\nexports.pathToFilename = pathToFilename;\nexports.escapeLanguageName = escapeLanguageName;\nexports.langToExt = langToExt;\nexports.dumpBundle = dumpBundle;\nexports.saveBundle = saveBundle;\nexports.promptUser = promptUser;\nexports.readYaml = readYaml;\nexports.writeToFileByExtension = writeToFileByExtension;\nexports.writeYaml = writeYaml;\nexports.writeJson = writeJson;\nexports.getAndValidateFileExtension = getAndValidateFileExtension;\nexports.handleError = handleError;\nexports.printLintTotals = printLintTotals;\nexports.printConfigLintTotals = printConfigLintTotals;\nexports.getOutputFileName = getOutputFileName;\nexports.printUnusedWarnings = printUnusedWarnings;\nexports.exitWithError = exitWithError;\nexports.isSubdir = isSubdir;\nexports.loadConfigAndHandleErrors = loadConfigAndHandleErrors;\nexports.sortTopLevelKeysForOas = sortTopLevelKeysForOas;\nexports.checkIfRulesetExist = checkIfRulesetExist;\nexports.cleanColors = cleanColors;\nexports.sendTelemetry = sendTelemetry;\nexports.cleanArgs = cleanArgs;\nexports.checkForDeprecatedOptions = checkForDeprecatedOptions;\nexports.notifyAboutIncompatibleConfigOptions = notifyAboutIncompatibleConfigOptions;\nexports.formatPath = formatPath;\nconst path_1 = require(\"path\");\nconst colorette_1 = require(\"colorette\");\nconst perf_hooks_1 = require(\"perf_hooks\");\nconst glob = require(\"glob\");\nconst fs = require(\"fs\");\nconst os = require(\"os\");\nconst readline = require(\"readline\");\nconst stream_1 = require(\"stream\");\nconst child_process_1 = require(\"child_process\");\nconst util_1 = require(\"util\");\nconst openapi_core_1 = require(\"@redocly/openapi-core\");\nconst utils_1 = require(\"@redocly/openapi-core/lib/utils\");\nconst config_1 = require(\"@redocly/openapi-core/lib/config\");\nconst reference_docs_config_schema_1 = require(\"@redocly/config/lib/reference-docs-config-schema\");\nconst types_1 = require(\"../types\");\nconst update_version_notifier_1 = require(\"./update-version-notifier\");\nconst push_1 = require(\"../commands/push\");\nconst api_1 = require(\"../reunite/api\");\nasync function getFallbackApisOrExit(argsApis, config) {\n const { apis } = config;\n const shouldFallbackToAllDefinitions = !(0, utils_1.isNotEmptyArray)(argsApis) && (0, utils_1.isNotEmptyObject)(apis);\n const res = shouldFallbackToAllDefinitions\n ? fallbackToAllDefinitions(apis, config)\n : await expandGlobsInEntrypoints(argsApis, config);\n const filteredInvalidEntrypoints = res.filter(({ path }) => !isApiPathValid(path));\n if ((0, utils_1.isNotEmptyArray)(filteredInvalidEntrypoints)) {\n for (const { path } of filteredInvalidEntrypoints) {\n process.stderr.write((0, colorette_1.yellow)(`\\n${formatPath(path)} ${(0, colorette_1.red)(`does not exist or is invalid.\\n\\n`)}`));\n }\n exitWithError('Please provide a valid path.');\n }\n return res;\n}\nfunction getConfigDirectory(config) {\n return config.configFile ? (0, path_1.dirname)(config.configFile) : process.cwd();\n}\nfunction isApiPathValid(apiPath) {\n if (!apiPath.trim()) {\n exitWithError('Path cannot be empty.');\n return;\n }\n return fs.existsSync(apiPath) || (0, openapi_core_1.isAbsoluteUrl)(apiPath) ? apiPath : undefined;\n}\nfunction fallbackToAllDefinitions(apis, config) {\n return Object.entries(apis).map(([alias, { root, output }]) => ({\n path: (0, openapi_core_1.isAbsoluteUrl)(root) ? root : (0, path_1.resolve)(getConfigDirectory(config), root),\n alias,\n output: output && (0, path_1.resolve)(getConfigDirectory(config), output),\n }));\n}\nfunction getAliasOrPath(config, aliasOrPath) {\n const aliasApi = config.apis[aliasOrPath];\n return aliasApi\n ? {\n path: (0, openapi_core_1.isAbsoluteUrl)(aliasApi.root)\n ? aliasApi.root\n : (0, path_1.resolve)(getConfigDirectory(config), aliasApi.root),\n alias: aliasOrPath,\n output: aliasApi.output && (0, path_1.resolve)(getConfigDirectory(config), aliasApi.output),\n }\n : {\n path: aliasOrPath,\n // find alias by path, take the first match\n alias: Object.entries(config.apis).find(([_alias, api]) => {\n return (0, path_1.resolve)(api.root) === (0, path_1.resolve)(aliasOrPath);\n })?.[0] ?? undefined,\n };\n}\nasync function expandGlobsInEntrypoints(argApis, config) {\n return (await Promise.all(argApis.map(async (aliasOrPath) => {\n return glob.hasMagic(aliasOrPath) && !(0, openapi_core_1.isAbsoluteUrl)(aliasOrPath)\n ? (await (0, util_1.promisify)(glob)(aliasOrPath)).map((g) => getAliasOrPath(config, g))\n : getAliasOrPath(config, aliasOrPath);\n }))).flat();\n}\nfunction getExecutionTime(startedAt) {\n return process.env.NODE_ENV === 'test'\n ? 'ms'\n : `${Math.ceil(perf_hooks_1.performance.now() - startedAt)}ms`;\n}\nfunction printExecutionTime(commandName, startedAt, api) {\n const elapsed = getExecutionTime(startedAt);\n process.stderr.write((0, colorette_1.gray)(`\\n${api}: ${commandName} processed in ${elapsed}\\n\\n`));\n}\nfunction pathToFilename(path, pathSeparator) {\n return path\n .replace(/~1/g, '/')\n .replace(/~0/g, '~')\n .replace(/^\\//, '')\n .replace(/\\//g, pathSeparator);\n}\nfunction escapeLanguageName(lang) {\n return lang.replace(/#/g, '_sharp').replace(/\\//, '_').replace(/\\s/g, '');\n}\nfunction langToExt(lang) {\n const langObj = {\n php: '.php',\n 'c#': '.cs',\n shell: '.sh',\n curl: '.sh',\n bash: '.sh',\n javascript: '.js',\n js: '.js',\n python: '.py',\n c: '.c',\n 'c++': '.cpp',\n coffeescript: '.litcoffee',\n dart: '.dart',\n elixir: '.ex',\n go: '.go',\n groovy: '.groovy',\n java: '.java',\n kotlin: '.kt',\n 'objective-c': '.m',\n perl: '.pl',\n powershell: '.ps1',\n ruby: '.rb',\n rust: '.rs',\n scala: '.sc',\n swift: '.swift',\n typescript: '.ts',\n tsx: '.tsx',\n };\n return langObj[lang.toLowerCase()];\n}\nclass CircularJSONNotSupportedError extends Error {\n constructor(originalError) {\n super(originalError.message);\n this.originalError = originalError;\n // Set the prototype explicitly.\n Object.setPrototypeOf(this, CircularJSONNotSupportedError.prototype);\n }\n}\nexports.CircularJSONNotSupportedError = CircularJSONNotSupportedError;\nfunction dumpBundle(obj, format, dereference) {\n if (format === 'json') {\n try {\n return JSON.stringify(obj, null, 2);\n }\n catch (e) {\n if (e.message.indexOf('circular') > -1) {\n throw new CircularJSONNotSupportedError(e);\n }\n throw e;\n }\n }\n else {\n return (0, openapi_core_1.stringifyYaml)(obj, {\n noRefs: !dereference,\n lineWidth: -1,\n });\n }\n}\nfunction saveBundle(filename, output) {\n fs.mkdirSync((0, path_1.dirname)(filename), { recursive: true });\n fs.writeFileSync(filename, output);\n}\nasync function promptUser(query, hideUserInput = false) {\n return new Promise((resolve) => {\n let output = process.stdout;\n let isOutputMuted = false;\n if (hideUserInput) {\n output = new stream_1.Writable({\n write: (chunk, encoding, callback) => {\n if (!isOutputMuted) {\n process.stdout.write(chunk, encoding);\n }\n callback();\n },\n });\n }\n const rl = readline.createInterface({\n input: process.stdin,\n output,\n terminal: true,\n historySize: hideUserInput ? 0 : 30,\n });\n rl.question(`${query}:\\n\\n `, (answer) => {\n rl.close();\n resolve(answer);\n });\n isOutputMuted = hideUserInput;\n });\n}\nfunction readYaml(filename) {\n return (0, openapi_core_1.parseYaml)(fs.readFileSync(filename, 'utf-8'), { filename });\n}\nfunction writeToFileByExtension(data, filePath, noRefs) {\n const ext = getAndValidateFileExtension(filePath);\n if (ext === 'json') {\n writeJson(data, filePath);\n return;\n }\n writeYaml(data, filePath, noRefs);\n}\nfunction writeYaml(data, filename, noRefs = false) {\n const content = (0, openapi_core_1.stringifyYaml)(data, { noRefs });\n if (process.env.NODE_ENV === 'test') {\n process.stderr.write(content);\n return;\n }\n fs.mkdirSync((0, path_1.dirname)(filename), { recursive: true });\n fs.writeFileSync(filename, content);\n}\nfunction writeJson(data, filename) {\n const content = JSON.stringify(data, null, 2);\n if (process.env.NODE_ENV === 'test') {\n process.stderr.write(content);\n return;\n }\n fs.mkdirSync((0, path_1.dirname)(filename), { recursive: true });\n fs.writeFileSync(filename, content);\n}\nfunction getAndValidateFileExtension(fileName) {\n const ext = fileName.split('.').pop();\n if (['yaml', 'yml', 'json'].includes(ext)) {\n return ext;\n }\n process.stderr.write((0, colorette_1.yellow)(`Unsupported file extension: ${ext}. Using yaml.\\n`));\n return 'yaml';\n}\nfunction handleError(e, ref) {\n switch (e.constructor) {\n case HandledError: {\n throw e;\n }\n case openapi_core_1.ResolveError:\n return exitWithError(`Failed to resolve API description at ${ref}:\\n\\n - ${e.message}`);\n case openapi_core_1.YamlParseError:\n return exitWithError(`Failed to parse API description at ${ref}:\\n\\n - ${e.message}`);\n case CircularJSONNotSupportedError: {\n return exitWithError(`Detected circular reference which can't be converted to JSON.\\n` +\n `Try to use ${(0, colorette_1.blue)('yaml')} output or remove ${(0, colorette_1.blue)('--dereferenced')}.`);\n }\n case SyntaxError:\n return exitWithError(`Syntax error: ${e.message} ${e.stack?.split('\\n\\n')?.[0]}`);\n case config_1.ConfigValidationError:\n return exitWithError(e.message);\n default: {\n exitWithError(`Something went wrong when processing ${ref}:\\n\\n - ${e.message}`);\n }\n }\n}\nclass HandledError extends Error {\n}\nexports.HandledError = HandledError;\nfunction printLintTotals(totals, definitionsCount) {\n const ignored = totals.ignored\n ? (0, colorette_1.yellow)(`${totals.ignored} ${(0, utils_1.pluralize)('problem is', totals.ignored)} explicitly ignored.\\n\\n`)\n : '';\n if (totals.errors > 0) {\n process.stderr.write((0, colorette_1.red)(`❌ Validation failed with ${totals.errors} ${(0, utils_1.pluralize)('error', totals.errors)}${totals.warnings > 0\n ? ` and ${totals.warnings} ${(0, utils_1.pluralize)('warning', totals.warnings)}`\n : ''}.\\n${ignored}`));\n }\n else if (totals.warnings > 0) {\n process.stderr.write((0, colorette_1.green)(`Woohoo! Your API ${(0, utils_1.pluralize)('description is', definitionsCount)} valid. 🎉\\n`));\n process.stderr.write((0, colorette_1.yellow)(`You have ${totals.warnings} ${(0, utils_1.pluralize)('warning', totals.warnings)}.\\n${ignored}`));\n }\n else {\n process.stderr.write((0, colorette_1.green)(`Woohoo! Your API ${(0, utils_1.pluralize)('description is', definitionsCount)} valid. 🎉\\n${ignored}`));\n }\n if (totals.errors > 0) {\n process.stderr.write((0, colorette_1.gray)(`run \\`redocly lint --generate-ignore-file\\` to add all problems to the ignore file.\\n`));\n }\n process.stderr.write('\\n');\n}\nfunction printConfigLintTotals(totals, command) {\n if (totals.errors > 0) {\n process.stderr.write((0, colorette_1.red)(`❌ Your config has ${totals.errors} ${(0, utils_1.pluralize)('error', totals.errors)}.`));\n }\n else if (totals.warnings > 0) {\n process.stderr.write((0, colorette_1.yellow)(`⚠️ Your config has ${totals.warnings} ${(0, utils_1.pluralize)('warning', totals.warnings)}.\\n`));\n }\n else if (command === 'check-config') {\n process.stderr.write((0, colorette_1.green)('✅ Your config is valid.\\n'));\n }\n}\nfunction getOutputFileName({ entrypoint, output, argvOutput, ext, entries, }) {\n let outputFile = output || argvOutput;\n if (!outputFile) {\n return { ext: ext || 'yaml' };\n }\n if (entries > 1 && argvOutput) {\n ext = ext || (0, path_1.extname)(entrypoint).substring(1);\n if (!types_1.outputExtensions.includes(ext)) {\n throw new Error(`Invalid file extension: ${ext}.`);\n }\n outputFile = (0, path_1.join)(argvOutput, (0, path_1.basename)(entrypoint, (0, path_1.extname)(entrypoint))) + '.' + ext;\n }\n else {\n ext =\n ext ||\n (0, path_1.extname)(outputFile).substring(1) ||\n (0, path_1.extname)(entrypoint).substring(1);\n if (!types_1.outputExtensions.includes(ext)) {\n throw new Error(`Invalid file extension: ${ext}.`);\n }\n outputFile = (0, path_1.join)((0, path_1.dirname)(outputFile), (0, path_1.basename)(outputFile, (0, path_1.extname)(outputFile))) + '.' + ext;\n }\n return { outputFile, ext };\n}\nfunction printUnusedWarnings(config) {\n const { preprocessors, rules, decorators } = config.getUnusedRules();\n if (rules.length) {\n process.stderr.write((0, colorette_1.yellow)(`[WARNING] Unused rules found in ${(0, colorette_1.blue)(config.configFile || '')}: ${rules.join(', ')}.\\n`));\n }\n if (preprocessors.length) {\n process.stderr.write((0, colorette_1.yellow)(`[WARNING] Unused preprocessors found in ${(0, colorette_1.blue)(config.configFile || '')}: ${preprocessors.join(', ')}.\\n`));\n }\n if (decorators.length) {\n process.stderr.write((0, colorette_1.yellow)(`[WARNING] Unused decorators found in ${(0, colorette_1.blue)(config.configFile || '')}: ${decorators.join(', ')}.\\n`));\n }\n if (rules.length || preprocessors.length) {\n process.stderr.write(`Check the spelling and verify the added plugin prefix.\\n`);\n }\n}\nfunction exitWithError(message) {\n process.stderr.write((0, colorette_1.red)(message) + '\\n\\n');\n throw new HandledError(message);\n}\n/**\n * Checks if dir is subdir of parent\n */\nfunction isSubdir(parent, dir) {\n const relativePath = (0, path_1.relative)(parent, dir);\n return !!relativePath && !/^..($|\\/)/.test(relativePath) && !(0, path_1.isAbsolute)(relativePath);\n}\nasync function loadConfigAndHandleErrors(options = {}) {\n try {\n return await (0, openapi_core_1.loadConfig)(options);\n }\n catch (e) {\n handleError(e, '');\n }\n}\nfunction sortTopLevelKeysForOas(document) {\n if ('swagger' in document) {\n return sortOas2Keys(document);\n }\n return sortOas3Keys(document);\n}\nfunction sortOas2Keys(document) {\n const orderedKeys = [\n 'swagger',\n 'info',\n 'host',\n 'basePath',\n 'schemes',\n 'consumes',\n 'produces',\n 'security',\n 'tags',\n 'externalDocs',\n 'paths',\n 'definitions',\n 'parameters',\n 'responses',\n 'securityDefinitions',\n ];\n const result = {};\n for (const key of orderedKeys) {\n if (document.hasOwnProperty(key)) {\n result[key] = document[key];\n }\n }\n // merge any other top-level keys (e.g. vendor extensions)\n return Object.assign(result, document);\n}\nfunction sortOas3Keys(document) {\n const orderedKeys = [\n 'openapi',\n 'info',\n 'jsonSchemaDialect',\n 'servers',\n 'security',\n 'tags',\n 'externalDocs',\n 'paths',\n 'webhooks',\n 'x-webhooks',\n 'components',\n ];\n const result = {};\n for (const key of orderedKeys) {\n if (document.hasOwnProperty(key)) {\n result[key] = document[key];\n }\n }\n // merge any other top-level keys (e.g. vendor extensions)\n return Object.assign(result, document);\n}\nfunction checkIfRulesetExist(rules) {\n const ruleset = {\n ...rules.oas2,\n ...rules.oas3_0,\n ...rules.oas3_1,\n ...rules.async2,\n ...rules.async3,\n ...rules.arazzo1,\n };\n if ((0, utils_1.isEmptyObject)(ruleset)) {\n exitWithError('⚠️ No rules were configured. Learn how to configure rules: https://redocly.com/docs/cli/rules/');\n }\n}\nfunction cleanColors(input) {\n // eslint-disable-next-line no-control-regex\n return input.replace(/\\x1b\\[\\d+m/g, '');\n}\nasync function sendTelemetry(argv, exit_code, has_config, spec_version, spec_keyword, spec_full_version) {\n try {\n if (!argv) {\n return;\n }\n const { _: [command], $0: _, ...args } = argv;\n const event_time = new Date().toISOString();\n const redoclyClient = new openapi_core_1.RedoclyClient();\n const { RedoclyOAuthClient } = await Promise.resolve().then(() => require('../auth/oauth-client'));\n const oauthClient = new RedoclyOAuthClient('redocly-cli', update_version_notifier_1.version);\n const reuniteUrl = (0, api_1.getReuniteUrl)(argv.residency);\n const logged_in = redoclyClient.hasTokens() || (await oauthClient.isAuthorized(reuniteUrl));\n const data = {\n event: 'cli_command',\n event_time,\n logged_in: logged_in ? 'yes' : 'no',\n command: `${command}`,\n ...cleanArgs(args, process.argv.slice(2)),\n node_version: process.version,\n npm_version: (0, child_process_1.execSync)('npm -v').toString().replace('\\n', ''),\n os_platform: os.platform(),\n version: update_version_notifier_1.version,\n exit_code,\n environment: process.env.REDOCLY_ENVIRONMENT,\n environment_ci: process.env.CI,\n has_config: has_config ? 'yes' : 'no',\n spec_version,\n spec_keyword,\n spec_full_version,\n };\n const { otelTelemetry } = await Promise.resolve().then(() => require('../otel'));\n otelTelemetry.init();\n otelTelemetry.send(data.command, data);\n }\n catch (err) {\n // Do nothing.\n }\n}\nfunction isFile(value) {\n return fs.existsSync(value) && fs.statSync(value).isFile();\n}\nfunction isDirectory(value) {\n return fs.existsSync(value) && fs.statSync(value).isDirectory();\n}\nfunction cleanString(value) {\n if (!value) {\n return value;\n }\n if ((0, openapi_core_1.isAbsoluteUrl)(value)) {\n return value.split('://')[0] + '://url';\n }\n if (isFile(value)) {\n return value.replace(/.+\\.([^.]+)$/, (_, ext) => 'file-' + ext);\n }\n if (isDirectory(value)) {\n return 'folder';\n }\n if (push_1.DESTINATION_REGEX.test(value)) {\n return value.startsWith('@') ? '@organization/api-name@api-version' : 'api-name@api-version';\n }\n return value;\n}\nfunction replaceArgs(commandInput, targets, replacement) {\n const targetValues = Array.isArray(targets) ? targets : [targets];\n for (const target of targetValues) {\n commandInput = commandInput.replaceAll(target, replacement);\n }\n return commandInput;\n}\nfunction cleanArgs(parsedArgs, rawArgv) {\n const KEYS_TO_CLEAN = ['organization', 'o', 'input', 'i', 'client-cert', 'client-key', 'ca-cert'];\n let commandInput = rawArgv.join(' ');\n const commandArguments = {};\n for (const [key, value] of Object.entries(parsedArgs)) {\n if (KEYS_TO_CLEAN.includes(key)) {\n commandArguments[key] = '***';\n commandInput = replaceArgs(commandInput, value, '***');\n }\n else if (typeof value === 'string') {\n const cleanedValue = cleanString(value);\n commandArguments[key] = cleanedValue;\n commandInput = replaceArgs(commandInput, value, cleanedValue);\n }\n else if (Array.isArray(value)) {\n commandArguments[key] = value.map(cleanString);\n for (const replacedValue of value) {\n const newValue = cleanString(replacedValue);\n if (commandInput.includes(replacedValue)) {\n commandInput = commandInput.replaceAll(replacedValue, newValue);\n }\n }\n }\n else {\n commandArguments[key] = value;\n }\n }\n return { arguments: JSON.stringify(commandArguments), raw_input: commandInput };\n}\nfunction checkForDeprecatedOptions(argv, deprecatedOptions) {\n for (const option of deprecatedOptions) {\n if (argv[option]) {\n process.stderr.write((0, colorette_1.yellow)(`[WARNING] \"${String(option)}\" option is deprecated and will be removed in a future release. \\n\\n`));\n }\n }\n}\nfunction notifyAboutIncompatibleConfigOptions(themeOpenapiOptions) {\n if ((0, utils_1.isPlainObject)(themeOpenapiOptions)) {\n const propertiesSet = Object.keys(themeOpenapiOptions);\n const deprecatedSet = Object.keys(reference_docs_config_schema_1.deprecatedRefDocsSchema.properties);\n const intersection = propertiesSet.filter((prop) => deprecatedSet.includes(prop));\n if (intersection.length > 0) {\n process.stderr.write((0, colorette_1.yellow)(`\\n${(0, utils_1.pluralize)('Property', intersection.length)} ${(0, colorette_1.gray)(intersection.map((prop) => `'${prop}'`).join(', '))} ${(0, utils_1.pluralize)('is', intersection.length)} only used in API Reference Docs and Redoc version 2.x or earlier.\\n\\n`));\n }\n }\n}\nfunction formatPath(path) {\n if ((0, openapi_core_1.isAbsoluteUrl)(path)) {\n return path;\n }\n return (0, path_1.relative)(process.cwd(), path);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Spinner = void 0;\nconst process = require(\"process\");\nconst SPINNER_FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];\nclass Spinner {\n constructor() {\n this.frames = SPINNER_FRAMES;\n this.currentFrame = 0;\n this.intervalId = null;\n this.message = '';\n }\n showFrame() {\n process.stdout.write('\\r' + this.frames[this.currentFrame] + ' ' + this.message);\n this.currentFrame = (this.currentFrame + 1) % this.frames.length;\n }\n start(message) {\n if (this.message === message) {\n return;\n }\n this.message = message;\n // If we're not in a TTY, don't display the spinner.\n if (!process.stdout.isTTY) {\n process.stdout.write(`${message}...\\n`);\n return;\n }\n if (this.intervalId === null) {\n this.intervalId = setInterval(() => {\n this.showFrame();\n }, 100);\n }\n }\n stop() {\n if (this.intervalId !== null) {\n clearInterval(this.intervalId);\n this.intervalId = null;\n process.stdout.write('\\r');\n }\n this.message = '';\n }\n}\nexports.Spinner = Spinner;\n","\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cacheLatestVersion = exports.notifyUpdateCliVersion = exports.name = exports.version = void 0;\nconst os_1 = require(\"os\");\nconst path_1 = require(\"path\");\nconst fs_1 = require(\"fs\");\nconst semver_1 = require(\"semver\");\nconst fetch_with_timeout_1 = require(\"./fetch-with-timeout\");\nconst colorette_1 = require(\"colorette\");\nconst miscellaneous_1 = require(\"./miscellaneous\");\n_a = require('../../package.json'), exports.version = _a.version, exports.name = _a.name;\nconst VERSION_CACHE_FILE = 'redocly-cli-version';\nconst SPACE_TO_BORDER = 4;\nconst INTERVAL_TO_CHECK = 1000 * 60 * 60 * 12;\nconst SHOULD_NOT_NOTIFY = process.env.NODE_ENV === 'test' ||\n process.env.CI ||\n !!process.env.LAMBDA_TASK_ROOT ||\n process.env.REDOCLY_SUPPRESS_UPDATE_NOTICE === 'true';\nconst notifyUpdateCliVersion = () => {\n if (SHOULD_NOT_NOTIFY) {\n return;\n }\n try {\n const latestVersion = (0, fs_1.readFileSync)((0, path_1.join)((0, os_1.tmpdir)(), VERSION_CACHE_FILE)).toString();\n if (isNewVersionAvailable(exports.version, latestVersion)) {\n renderUpdateBanner(exports.version, latestVersion);\n }\n }\n catch (e) {\n return;\n }\n};\nexports.notifyUpdateCliVersion = notifyUpdateCliVersion;\nconst isNewVersionAvailable = (current, latest) => (0, semver_1.compare)(current, latest) < 0;\nconst getLatestVersion = async (packageName) => {\n const latestUrl = `http://registry.npmjs.org/${packageName}/latest`;\n try {\n const response = await (0, fetch_with_timeout_1.default)(latestUrl, { timeout: fetch_with_timeout_1.DEFAULT_FETCH_TIMEOUT });\n const info = await response.json();\n return info.version;\n }\n catch {\n // Do nothing\n return;\n }\n};\nconst cacheLatestVersion = () => {\n if (!isNeedToBeCached() || SHOULD_NOT_NOTIFY) {\n return;\n }\n getLatestVersion(exports.name)\n .then((version) => {\n if (version) {\n const lastCheckFile = (0, path_1.join)((0, os_1.tmpdir)(), VERSION_CACHE_FILE);\n (0, fs_1.writeFileSync)(lastCheckFile, version);\n }\n })\n .catch(() => { });\n};\nexports.cacheLatestVersion = cacheLatestVersion;\nconst renderUpdateBanner = (current, latest) => {\n const messageLines = [\n `A new version of ${(0, colorette_1.cyan)('Redocly CLI')} (${(0, colorette_1.green)(latest)}) is available.`,\n `Update now: \\`${(0, colorette_1.cyan)('npm i -g @redocly/cli@latest')}\\`.`,\n `Changelog: https://redocly.com/docs/cli/changelog/`,\n ];\n const maxLength = Math.max(...messageLines.map((line) => (0, miscellaneous_1.cleanColors)(line).length));\n const border = (0, colorette_1.yellow)('═'.repeat(maxLength + SPACE_TO_BORDER));\n const extraSpaces = ' '.repeat(SPACE_TO_BORDER);\n const banner = [\n '',\n extraSpaces + (0, colorette_1.yellow)('╔' + border + '╗'),\n extraSpaces + (0, colorette_1.yellow)('║' + ' '.repeat(maxLength + SPACE_TO_BORDER) + '║'),\n messageLines.map(getLineWithPadding(maxLength, extraSpaces)).join('\\n'),\n extraSpaces + (0, colorette_1.yellow)('║' + ' '.repeat(maxLength + SPACE_TO_BORDER) + '║'),\n extraSpaces + (0, colorette_1.yellow)('╚' + border + '╝'),\n '',\n '',\n ].join('\\n');\n process.stderr.write(banner);\n};\nconst getLineWithPadding = (maxLength, extraSpaces) => (line) => {\n const padding = ' '.repeat(maxLength - (0, miscellaneous_1.cleanColors)(line).length);\n return `${extraSpaces}${(0, colorette_1.yellow)('║')} ${line}${padding} ${(0, colorette_1.yellow)('║')}`;\n};\nconst isNeedToBeCached = () => {\n try {\n // Last version from npm is stored in a file in the OS temp folder\n const versionFile = (0, path_1.join)((0, os_1.tmpdir)(), VERSION_CACHE_FILE);\n if (!(0, fs_1.existsSync)(versionFile)) {\n return true;\n }\n const now = new Date().getTime();\n const stats = (0, fs_1.statSync)(versionFile);\n const lastCheck = stats.mtime.getTime();\n return now - lastCheck >= INTERVAL_TO_CHECK;\n }\n catch (e) {\n return false;\n }\n};\n","'use strict'\n\nconst ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { safeRe: re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n","'use strict'\n\nconst SPACE_CHARACTERS = /\\s+/g\n\n// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.formatted = undefined\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')\n\n // First, split on ||\n this.set = this.raw\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.formatted = undefined\n }\n\n get range () {\n if (this.formatted === undefined) {\n this.formatted = ''\n for (let i = 0; i < this.set.length; i++) {\n if (i > 0) {\n this.formatted += '||'\n }\n const comps = this.set[i]\n for (let k = 0; k < comps.length; k++) {\n if (k > 0) {\n this.formatted += ' '\n }\n this.formatted += comps[k].toString().trim()\n }\n }\n }\n return this.formatted\n }\n\n format () {\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n debug('tilde trim', range)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n debug('caret trim', range)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('../internal/lrucache')\nconst cache = new LRU()\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n safeRe: re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n comp = comp.replace(re[t.BUILD], '')\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceTilde(c, options))\n .join(' ')\n}\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceCaret(c, options))\n .join(' ')\n}\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp\n .split(/\\s+/)\n .map((c) => replaceXRange(c, options))\n .join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp\n .trim()\n .replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp\n .trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\n// TODO build?\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return `${from} ${to}`.trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n","'use strict'\n\nconst debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n if (this.major < other.major) {\n return -1\n }\n if (this.major > other.major) {\n return 1\n }\n if (this.minor < other.minor) {\n return -1\n }\n if (this.minor > other.minor) {\n return 1\n }\n if (this.patch < other.patch) {\n return -1\n }\n if (this.patch > other.patch) {\n return 1\n }\n return 0\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('build compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n if (release.startsWith('pre')) {\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n // Avoid an invalid semver results\n if (identifier) {\n const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])\n if (!match || match[1] !== identifier) {\n throw new Error(`invalid identifier: ${identifier}`)\n }\n }\n }\n\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n case 'release':\n if (this.prerelease.length === 0) {\n throw new Error(`version ${this.raw} is not a prerelease`)\n }\n this.prerelease.length = 0\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n","'use strict'\n\nconst parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n","'use strict'\n\nconst eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]\n let next\n while ((next = coerceRtlRegex.exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n coerceRtlRegex.lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n const major = match[2]\n const minor = match[3] || '0'\n const patch = match[4] || '0'\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''\n\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)\n}\nmodule.exports = coerce\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n","'use strict'\n\nconst compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n","'use strict'\n\nconst parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n const lowHasPre = !!lowVersion.prerelease.length\n\n if (lowHasPre && !highHasPre) {\n // Going from prerelease -> no prerelease requires some special casing\n\n // If the low version has only a major, then it will always be a major\n // Some examples:\n // 1.0.0-1 -> 1.0.0\n // 1.0.0-1 -> 1.1.1\n // 1.0.0-1 -> 2.0.0\n if (!lowVersion.patch && !lowVersion.minor) {\n return 'major'\n }\n\n // If the main part has no difference\n if (lowVersion.compareMain(highVersion) === 0) {\n if (lowVersion.minor && !lowVersion.patch) {\n return 'minor'\n }\n return 'patch'\n }\n }\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // high and low are prereleases\n return 'prerelease'\n}\n\nmodule.exports = diff\n","'use strict'\n\nconst compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n","'use strict'\n\nconst compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n","'use strict'\n\nconst compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n","'use strict'\n\nconst SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n","'use strict'\n\nconst compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n","'use strict'\n\nconst compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n","'use strict'\n\nconst compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n","'use strict'\n\nconst parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n","'use strict'\n\nconst compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n","'use strict'\n\nconst compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n","'use strict'\n\nconst Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n","'use strict'\n\nconst compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n","'use strict'\n\nconst parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n","'use strict'\n\n// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n","'use strict'\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n","'use strict'\n\nconst debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n","'use strict'\n\nconst numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n if (typeof a === 'number' && typeof b === 'number') {\n return a === b ? 0 : a < b ? -1 : 1\n }\n\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n","'use strict'\n\nclass LRUCache {\n constructor () {\n this.max = 1000\n this.map = new Map()\n }\n\n get (key) {\n const value = this.map.get(key)\n if (value === undefined) {\n return undefined\n } else {\n // Remove the key from the map and add it to the end\n this.map.delete(key)\n this.map.set(key, value)\n return value\n }\n }\n\n delete (key) {\n return this.map.delete(key)\n }\n\n set (key, value) {\n const deleted = this.delete(key)\n\n if (!deleted && value !== undefined) {\n // If cache is full, delete the least recently used item\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value\n this.delete(firstKey)\n }\n\n this.map.set(key, value)\n }\n\n return this\n }\n}\n\nmodule.exports = LRUCache\n","'use strict'\n\n// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n","'use strict'\n\nconst {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst safeSrc = exports.safeSrc = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n safeSrc[index] = safe\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n// Non-numeric identifiers include numeric identifiers but can be longer.\n// Therefore non-numeric identifiers must go first.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]\n}|${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]\n}|${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n","'use strict'\n\n// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n","'use strict'\n\nconst Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n","'use strict'\n\nconst outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n","'use strict'\n\n// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n","'use strict'\n\nconst Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If LT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n","'use strict'\n\nconst Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n","'use strict'\n\nconst Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LayoutVariant = exports.REDOCLY_ROUTE_RBAC = exports.REDOCLY_TEAMS_RBAC = exports.ApigeeDevOnboardingIntegrationAuthType = exports.AuthProviderType = exports.DEFAULT_TEAM_CLAIM_NAME = void 0;\nexports.DEFAULT_TEAM_CLAIM_NAME = 'https://redocly.com/sso/teams';\nvar AuthProviderType;\n(function (AuthProviderType) {\n AuthProviderType[\"OIDC\"] = \"OIDC\";\n AuthProviderType[\"SAML2\"] = \"SAML2\";\n})(AuthProviderType || (exports.AuthProviderType = AuthProviderType = {}));\nvar ApigeeDevOnboardingIntegrationAuthType;\n(function (ApigeeDevOnboardingIntegrationAuthType) {\n ApigeeDevOnboardingIntegrationAuthType[\"SERVICE_ACCOUNT\"] = \"SERVICE_ACCOUNT\";\n ApigeeDevOnboardingIntegrationAuthType[\"OAUTH2\"] = \"OAUTH2\";\n})(ApigeeDevOnboardingIntegrationAuthType || (exports.ApigeeDevOnboardingIntegrationAuthType = ApigeeDevOnboardingIntegrationAuthType = {}));\nexports.REDOCLY_TEAMS_RBAC = 'redocly::teams-rbac';\nexports.REDOCLY_ROUTE_RBAC = 'redocly::route-rbac';\nvar LayoutVariant;\n(function (LayoutVariant) {\n LayoutVariant[\"STACKED\"] = \"stacked\";\n LayoutVariant[\"THREE_PANEL\"] = \"three-panel\";\n})(LayoutVariant || (exports.LayoutVariant = LayoutVariant = {}));\n//# sourceMappingURL=constants.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.closedThemeConfigSchema = exports.themeConfigSchema = void 0;\nconst graphql_config_schema_1 = require(\"./graphql-config-schema\");\nconst feedback_config_schema_1 = require(\"./feedback-config-schema\");\nconst ex_theme_config_schemas_1 = require(\"./ex-theme-config-schemas\");\nexports.themeConfigSchema = {\n type: 'object',\n properties: {\n /**\n * @deprecated Should use `plugins` instead\n */\n imports: {\n type: 'array',\n items: { type: 'string' },\n },\n logo: ex_theme_config_schemas_1.logoConfigSchema,\n navbar: ex_theme_config_schemas_1.navbarConfigSchema,\n products: ex_theme_config_schemas_1.productsConfigSchema,\n footer: ex_theme_config_schemas_1.footerConfigSchema,\n sidebar: ex_theme_config_schemas_1.sidebarConfigSchema,\n scripts: ex_theme_config_schemas_1.scriptsConfigSchema,\n links: ex_theme_config_schemas_1.linksConfigSchema,\n feedback: feedback_config_schema_1.feedbackConfigSchema,\n search: ex_theme_config_schemas_1.searchConfigSchema,\n colorMode: ex_theme_config_schemas_1.colorModeConfigSchema,\n navigation: ex_theme_config_schemas_1.navigationConfigSchema,\n codeSnippet: ex_theme_config_schemas_1.codeSnippetConfigSchema,\n markdown: ex_theme_config_schemas_1.markdownConfigSchema,\n openapi: ex_theme_config_schemas_1.openapiConfigSchema,\n graphql: graphql_config_schema_1.graphqlConfigSchema,\n analytics: ex_theme_config_schemas_1.analyticsConfigSchema,\n userMenu: ex_theme_config_schemas_1.userMenuConfigSchema,\n versionPicker: ex_theme_config_schemas_1.versionPickerConfigSchema,\n breadcrumbs: ex_theme_config_schemas_1.breadcrumbsConfigSchema,\n catalog: ex_theme_config_schemas_1.catalogsConfigSchema,\n scorecard: ex_theme_config_schemas_1.scorecardConfigSchema,\n },\n additionalProperties: true,\n};\nexports.closedThemeConfigSchema = Object.assign(Object.assign({}, exports.themeConfigSchema), { additionalProperties: false });\n//# sourceMappingURL=default-theme-config-schema.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.scorecardConfigSchema = exports.catalogsConfigSchema = exports.catalogSchema = exports.catalogFilterSchema = exports.breadcrumbsConfigSchema = exports.versionPickerConfigSchema = exports.userMenuConfigSchema = exports.analyticsConfigSchema = exports.googleAnalyticsConfigSchema = exports.productGoogleAnalyticsConfigSchema = exports.gtmAnalyticsConfigSchema = exports.segmentAnalyticsConfigSchema = exports.rudderstackAnalyticsConfigSchema = exports.heapAnalyticsConfigSchema = exports.fullstoryAnalyticsConfigSchema = exports.amplitudeAnalyticsConfigSchema = exports.openapiConfigSchema = exports.markdownConfigSchema = exports.codeSnippetConfigSchema = exports.navigationConfigSchema = exports.colorModeConfigSchema = exports.searchConfigSchema = exports.linksConfigSchema = exports.scriptsConfigSchema = exports.sidebarConfigSchema = exports.footerConfigSchema = exports.productsConfigSchema = exports.navbarConfigSchema = exports.logoConfigSchema = exports.searchFiltersConfigSchema = exports.searchFacetsConfigSchema = exports.aiSearchConfigSchema = exports.productConfigSchema = exports.navItemsSchema = void 0;\nconst redoc_config_schema_1 = require(\"./redoc-config-schema\");\nconst reference_docs_config_schema_1 = require(\"./reference-docs-config-schema\");\nconst hideConfigSchema = {\n type: 'object',\n properties: {\n hide: { type: 'boolean' },\n },\n additionalProperties: false,\n};\nconst scriptConfigSchema = {\n type: 'object',\n properties: {\n src: { type: 'string' },\n async: { type: 'boolean' },\n crossorigin: { type: 'string' },\n defer: { type: 'boolean' },\n fetchpriority: { type: 'string' },\n integrity: { type: 'string' },\n module: { type: 'boolean' },\n nomodule: { type: 'boolean' },\n nonce: { type: 'string' },\n referrerpolicy: { type: 'string' },\n type: { type: 'string' },\n },\n required: ['src'],\n additionalProperties: true,\n};\nconst navItemSchema = {\n type: 'object',\n properties: {\n page: { type: 'string' },\n directory: { type: 'string' },\n disconnect: { type: 'boolean', default: false },\n group: { type: 'string' },\n label: { type: 'string' },\n href: { type: 'string' },\n external: { type: 'boolean' },\n labelTranslationKey: { type: 'string' },\n groupTranslationKey: { type: 'string' },\n icon: {\n oneOf: [\n { type: 'string' },\n { type: 'object', properties: { srcSet: { type: 'string' } }, required: ['srcSet'] },\n ],\n },\n separator: { type: 'string' },\n separatorLine: { type: 'boolean' },\n linePosition: {\n type: 'string',\n enum: ['top', 'bottom'],\n default: 'top',\n },\n version: { type: 'string' },\n menuStyle: { type: 'string', enum: ['drilldown'] },\n expanded: { type: 'string', const: 'always' },\n selectFirstItemOnExpand: { type: 'boolean' },\n flatten: { type: 'boolean' },\n linkedSidebars: {\n type: 'array',\n items: { type: 'string' },\n },\n // Allow users to eject the navbar and implement additional levels of nesting\n items: { type: 'array', items: { type: 'object', additionalProperties: true } },\n },\n};\nexports.navItemsSchema = {\n type: 'array',\n items: Object.assign(Object.assign({}, navItemSchema), { properties: Object.assign(Object.assign({}, navItemSchema.properties), { items: { type: 'array', items: navItemSchema } }) }),\n};\nexports.productConfigSchema = {\n type: 'object',\n properties: {\n name: { type: 'string' },\n icon: { type: 'string' },\n folder: { type: 'string' },\n },\n additionalProperties: false,\n required: ['name', 'folder'],\n};\nexports.aiSearchConfigSchema = {\n type: 'object',\n properties: {\n hide: {\n type: 'boolean',\n default: false,\n },\n suggestions: {\n default: [],\n type: 'array',\n items: {\n type: 'string',\n },\n },\n prompt: {\n type: 'string',\n },\n },\n additionalProperties: false,\n};\nexports.searchFacetsConfigSchema = {\n type: 'array',\n items: {\n type: 'object',\n required: ['name', 'field', 'type'],\n properties: {\n name: { type: 'string' },\n field: { type: 'string' },\n type: {\n type: 'string',\n enum: ['multi-select', 'select', 'tags'],\n },\n },\n additionalProperties: false,\n },\n};\nexports.searchFiltersConfigSchema = {\n type: 'object',\n properties: Object.assign({ facets: exports.searchFacetsConfigSchema }, hideConfigSchema.properties),\n additionalProperties: false,\n};\nconst searchSuggestedPageSchema = {\n type: 'object',\n properties: {\n page: { type: 'string' },\n label: { type: 'string' },\n labelTranslationKey: { type: 'string' },\n },\n required: ['page'],\n};\nexports.logoConfigSchema = {\n type: 'object',\n properties: {\n image: { type: 'string' },\n srcSet: { type: 'string' },\n altText: { type: 'string' },\n link: { type: 'string' },\n favicon: { type: 'string' },\n },\n additionalProperties: false,\n};\nexports.navbarConfigSchema = {\n type: 'object',\n properties: Object.assign({ items: exports.navItemsSchema }, hideConfigSchema.properties),\n additionalProperties: false,\n};\nexports.productsConfigSchema = {\n type: 'object',\n additionalProperties: exports.productConfigSchema,\n};\nexports.footerConfigSchema = {\n type: 'object',\n properties: Object.assign({ items: exports.navItemsSchema, copyrightText: { type: 'string' }, logo: hideConfigSchema }, hideConfigSchema.properties),\n additionalProperties: false,\n};\nexports.sidebarConfigSchema = {\n type: 'object',\n properties: Object.assign({ separatorLine: { type: 'boolean' }, linePosition: {\n type: 'string',\n enum: ['top', 'bottom'],\n default: 'bottom',\n } }, hideConfigSchema.properties),\n additionalProperties: false,\n};\nexports.scriptsConfigSchema = {\n type: 'object',\n properties: {\n head: { type: 'array', items: scriptConfigSchema },\n body: { type: 'array', items: scriptConfigSchema },\n },\n additionalProperties: false,\n};\nexports.linksConfigSchema = {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n href: { type: 'string' },\n as: { type: 'string' },\n crossorigin: { type: 'string' },\n fetchpriority: { type: 'string' },\n hreflang: { type: 'string' },\n imagesizes: { type: 'string' },\n imagesrcset: { type: 'string' },\n integrity: { type: 'string' },\n media: { type: 'string' },\n prefetch: { type: 'string' },\n referrerpolicy: { type: 'string' },\n rel: { type: 'string' },\n sizes: { type: 'string' },\n title: { type: 'string' },\n type: { type: 'string' },\n },\n required: ['href'],\n additionalProperties: true,\n },\n};\nexports.searchConfigSchema = {\n type: 'object',\n properties: Object.assign({ engine: {\n type: 'string',\n enum: ['flexsearch', 'typesense'],\n default: 'flexsearch',\n }, ai: exports.aiSearchConfigSchema, filters: exports.searchFiltersConfigSchema, placement: {\n type: 'string',\n default: 'navbar',\n }, shortcuts: {\n type: 'array',\n items: { type: 'string' },\n default: ['/'],\n }, suggestedPages: {\n type: 'array',\n items: searchSuggestedPageSchema,\n } }, hideConfigSchema.properties),\n additionalProperties: false,\n};\nexports.colorModeConfigSchema = {\n type: 'object',\n properties: Object.assign({ ignoreDetection: { type: 'boolean' }, modes: {\n type: 'array',\n items: { type: 'string' },\n default: ['light', 'dark'],\n } }, hideConfigSchema.properties),\n additionalProperties: false,\n};\nexports.navigationConfigSchema = {\n type: 'object',\n properties: {\n nextButton: {\n type: 'object',\n properties: Object.assign({ text: { type: 'string', default: 'Next page' } }, hideConfigSchema.properties),\n additionalProperties: false,\n default: {},\n },\n previousButton: {\n type: 'object',\n properties: Object.assign({ text: { type: 'string', default: 'Previous page' } }, hideConfigSchema.properties),\n additionalProperties: false,\n default: {},\n },\n },\n additionalProperties: false,\n};\nexports.codeSnippetConfigSchema = {\n type: 'object',\n properties: {\n elementFormat: { type: 'string', default: 'icon' },\n copy: {\n type: 'object',\n properties: Object.assign({}, hideConfigSchema.properties),\n additionalProperties: false,\n default: { hide: false },\n },\n report: {\n type: 'object',\n properties: Object.assign({ tooltipText: { type: 'string' }, buttonText: { type: 'string' }, label: { type: 'string' } }, hideConfigSchema.properties),\n additionalProperties: false,\n default: { hide: false },\n },\n expand: {\n type: 'object',\n properties: Object.assign({}, hideConfigSchema.properties),\n additionalProperties: false,\n default: { hide: false },\n },\n collapse: {\n type: 'object',\n properties: Object.assign({}, hideConfigSchema.properties),\n additionalProperties: false,\n default: { hide: false },\n },\n },\n additionalProperties: false,\n};\nexports.markdownConfigSchema = {\n type: 'object',\n properties: {\n frontMatterKeysToResolve: {\n type: 'array',\n items: { type: 'string' },\n default: ['image', 'links'],\n },\n partialsFolders: {\n type: 'array',\n items: { type: 'string' },\n default: ['_partials'],\n },\n lastUpdatedBlock: {\n type: 'object',\n properties: Object.assign({ format: {\n type: 'string',\n enum: ['timeago', 'iso', 'long', 'short'],\n default: 'timeago',\n }, locale: { type: 'string' } }, hideConfigSchema.properties),\n additionalProperties: false,\n default: {},\n },\n toc: {\n type: 'object',\n properties: Object.assign({ header: { type: 'string', default: 'On this page' }, depth: { type: 'integer', default: 3, minimum: 1 } }, hideConfigSchema.properties),\n additionalProperties: false,\n default: {},\n },\n editPage: {\n type: 'object',\n properties: Object.assign({ baseUrl: { type: 'string' } }, hideConfigSchema.properties),\n additionalProperties: false,\n default: {},\n },\n },\n additionalProperties: false,\n default: {},\n};\nexports.openapiConfigSchema = Object.assign(Object.assign({}, redoc_config_schema_1.redocConfigSchema), { properties: Object.assign(Object.assign({}, redoc_config_schema_1.redocConfigSchema.properties), reference_docs_config_schema_1.deprecatedRefDocsSchema.properties) });\nconst adobeAnalyticsConfigSchema = {\n type: 'object',\n properties: {\n includeInDevelopment: { type: 'boolean' },\n scriptUrl: { type: 'string' },\n pageViewEventName: { type: 'string' },\n },\n additionalProperties: false,\n required: ['scriptUrl'],\n};\nexports.amplitudeAnalyticsConfigSchema = {\n type: 'object',\n properties: {\n includeInDevelopment: { type: 'boolean' },\n apiKey: { type: 'string' },\n head: { type: 'boolean' },\n respectDNT: { type: 'boolean' },\n exclude: { type: 'array', items: { type: 'string' } },\n outboundClickEventName: { type: 'string' },\n pageViewEventName: { type: 'string' },\n amplitudeConfig: { type: 'object', additionalProperties: true },\n },\n additionalProperties: false,\n required: ['apiKey'],\n};\nexports.fullstoryAnalyticsConfigSchema = {\n type: 'object',\n properties: {\n includeInDevelopment: { type: 'boolean' },\n orgId: { type: 'string' },\n },\n additionalProperties: false,\n required: ['orgId'],\n};\nexports.heapAnalyticsConfigSchema = {\n type: 'object',\n properties: {\n includeInDevelopment: { type: 'boolean' },\n appId: { type: 'string' },\n },\n additionalProperties: false,\n required: ['appId'],\n};\nexports.rudderstackAnalyticsConfigSchema = {\n type: 'object',\n properties: {\n includeInDevelopment: { type: 'boolean' },\n writeKey: { type: 'string', minLength: 10 },\n trackPage: { type: 'boolean' },\n dataPlaneUrl: { type: 'string' },\n controlPlaneUrl: { type: 'string' },\n sdkUrl: { type: 'string' },\n loadOptions: { type: 'object', additionalProperties: true },\n },\n additionalProperties: false,\n required: ['writeKey'],\n};\nexports.segmentAnalyticsConfigSchema = {\n type: 'object',\n properties: {\n includeInDevelopment: { type: 'boolean' },\n writeKey: { type: 'string', minLength: 10 },\n trackPage: { type: 'boolean' },\n includeTitleInPageCall: { type: 'boolean' },\n host: { type: 'string' },\n },\n additionalProperties: false,\n required: ['writeKey'],\n};\nexports.gtmAnalyticsConfigSchema = {\n type: 'object',\n properties: {\n includeInDevelopment: { type: 'boolean' },\n trackingId: { type: 'string' },\n gtmAuth: { type: 'string' },\n gtmPreview: { type: 'string' },\n defaultDataLayer: {},\n dataLayerName: { type: 'string' },\n enableWebVitalsTracking: { type: 'boolean' },\n selfHostedOrigin: { type: 'string' },\n pageViewEventName: { type: 'string' },\n },\n additionalProperties: false,\n required: ['trackingId'],\n};\nexports.productGoogleAnalyticsConfigSchema = {\n type: 'object',\n properties: {\n includeInDevelopment: { type: 'boolean' },\n trackingId: { type: 'string' },\n conversionId: { type: 'string' },\n floodlightId: { type: 'string' },\n optimizeId: { type: 'string' },\n exclude: { type: 'array', items: { type: 'string' } },\n },\n additionalProperties: false,\n required: ['trackingId'],\n};\nexports.googleAnalyticsConfigSchema = {\n type: 'object',\n properties: {\n includeInDevelopment: { type: 'boolean' },\n trackingId: { type: 'string' },\n conversionId: { type: 'string' },\n floodlightId: { type: 'string' },\n head: { type: 'boolean' },\n respectDNT: { type: 'boolean' },\n exclude: { type: 'array', items: { type: 'string' } },\n optimizeId: { type: 'string' },\n anonymizeIp: { type: 'boolean' },\n cookieExpires: { type: 'number' },\n // All enabled tracking configs\n trackers: {\n type: 'object',\n additionalProperties: exports.productGoogleAnalyticsConfigSchema,\n },\n },\n additionalProperties: false,\n required: ['trackingId'],\n};\nexports.analyticsConfigSchema = {\n type: 'object',\n properties: {\n adobe: adobeAnalyticsConfigSchema,\n amplitude: exports.amplitudeAnalyticsConfigSchema,\n fullstory: exports.fullstoryAnalyticsConfigSchema,\n heap: exports.heapAnalyticsConfigSchema,\n rudderstack: exports.rudderstackAnalyticsConfigSchema,\n segment: exports.segmentAnalyticsConfigSchema,\n gtm: exports.gtmAnalyticsConfigSchema,\n ga: exports.googleAnalyticsConfigSchema,\n },\n};\nexports.userMenuConfigSchema = {\n type: 'object',\n properties: Object.assign({ items: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n label: { type: 'string' },\n external: { type: 'boolean' },\n link: { type: 'string' },\n separatorLine: { type: 'boolean' },\n },\n additionalProperties: true,\n },\n default: [],\n }, hideLoginButton: { type: 'boolean' } }, hideConfigSchema.properties),\n additionalProperties: false,\n};\nexports.versionPickerConfigSchema = {\n type: 'object',\n properties: {\n hide: { type: 'boolean' },\n showForUnversioned: {\n type: 'boolean',\n },\n },\n};\nexports.breadcrumbsConfigSchema = {\n type: 'object',\n properties: {\n hide: { type: 'boolean' },\n prefixItems: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n label: { type: 'string' },\n labelTranslationKey: { type: 'string' },\n page: { type: 'string' },\n },\n additionalProperties: false,\n default: {},\n },\n },\n },\n additionalProperties: false,\n};\nexports.catalogFilterSchema = {\n type: 'object',\n additionalProperties: false,\n required: ['title', 'property'],\n properties: {\n type: {\n type: 'string',\n enum: ['select', 'checkboxes', 'date-range'],\n default: 'checkboxes',\n },\n title: { type: 'string' },\n titleTranslationKey: { type: 'string' },\n property: { type: 'string' },\n parentFilter: { type: 'string' },\n valuesMapping: { type: 'object', additionalProperties: { type: 'string' } },\n missingCategoryName: { type: 'string' },\n missingCategoryNameTranslationKey: { type: 'string' },\n options: { type: 'array', items: { type: 'string' } },\n },\n};\nexports.catalogSchema = {\n type: 'object',\n additionalProperties: true,\n required: ['slug', 'items'],\n properties: {\n slug: { type: 'string' },\n filters: { type: 'array', items: exports.catalogFilterSchema },\n groupByFirstFilter: { type: 'boolean' },\n filterValuesCasing: {\n type: 'string',\n enum: ['sentence', 'original', 'lowercase', 'uppercase'],\n },\n items: exports.navItemsSchema,\n requiredPermission: { type: 'string' },\n separateVersions: { type: 'boolean' },\n title: { type: 'string' },\n titleTranslationKey: { type: 'string' },\n description: { type: 'string' },\n descriptionTranslationKey: { type: 'string' },\n },\n};\nexports.catalogsConfigSchema = {\n type: 'object',\n patternProperties: {\n '.*': exports.catalogSchema,\n },\n};\nexports.scorecardConfigSchema = {\n type: 'object',\n additionalProperties: true,\n required: [],\n properties: {\n /**\n * @deprecated Should use `reunite.ignoreLint` instead\n */\n ignoreNonCompliant: { type: 'boolean', default: false },\n teamMetadataProperty: {\n type: 'object',\n properties: {\n property: { type: 'string' },\n label: { type: 'string' },\n default: { type: 'string' },\n },\n },\n levels: {\n type: 'array',\n items: {\n type: 'object',\n required: ['name'],\n properties: {\n name: { type: 'string' },\n color: { type: 'string' },\n extends: { type: 'array', items: { type: 'string' } },\n rules: {\n type: 'object',\n additionalProperties: {\n oneOf: [{ type: 'string' }, { type: 'object' }],\n },\n },\n },\n additionalProperties: false,\n },\n },\n targets: {\n type: 'array',\n items: {\n type: 'object',\n required: ['where'],\n properties: {\n minimumLevel: { type: 'string' },\n rules: { type: 'object', additionalProperties: true },\n where: {\n type: 'object',\n required: ['metadata'],\n properties: {\n metadata: { type: 'object', additionalProperties: { type: 'string' } },\n },\n additionalProperties: false,\n },\n },\n additionalProperties: false,\n },\n },\n ignore: {\n type: 'array',\n items: { type: 'string' },\n },\n },\n};\n//# sourceMappingURL=ex-theme-config-schemas.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.feedbackConfigSchema = exports.optionalEmailSettings = exports.reasonsSettings = void 0;\nconst reasonsBaseProperties = {\n hide: {\n type: 'boolean',\n default: false,\n },\n component: {\n type: 'string',\n enum: ['radio', 'checkbox'],\n default: 'checkbox',\n },\n label: { type: 'string' },\n items: { type: 'array', items: { type: 'string' } },\n};\nexports.reasonsSettings = {\n type: 'object',\n properties: reasonsBaseProperties,\n additionalProperties: false,\n};\nexports.optionalEmailSettings = {\n type: 'object',\n properties: {\n hide: {\n type: 'boolean',\n default: false,\n },\n label: { type: 'string' },\n placeholder: { type: 'string' },\n },\n additionalProperties: false,\n};\nexports.feedbackConfigSchema = {\n type: 'object',\n properties: {\n hide: {\n type: 'boolean',\n default: false,\n },\n type: {\n type: 'string',\n enum: ['rating', 'sentiment', 'comment', 'reasons', 'mood', 'scale'],\n default: 'sentiment',\n },\n settings: {\n type: 'object',\n properties: {\n label: { type: 'string' },\n submitText: { type: 'string' },\n buttonText: { type: 'string' },\n component: {\n type: 'string',\n enum: ['radio', 'checkbox'],\n default: 'checkbox',\n },\n items: { type: 'array', items: { type: 'string' }, minItems: 1 },\n leftScaleLabel: { type: 'string' },\n rightScaleLabel: { type: 'string' },\n reasons: {\n type: 'object',\n properties: Object.assign(Object.assign({}, reasonsBaseProperties), { like: exports.reasonsSettings, dislike: exports.reasonsSettings, satisfied: exports.reasonsSettings, neutral: exports.reasonsSettings, dissatisfied: exports.reasonsSettings }),\n additionalProperties: false,\n },\n comment: {\n type: 'object',\n properties: {\n hide: {\n type: 'boolean',\n default: false,\n },\n label: { type: 'string' },\n likeLabel: { type: 'string' },\n dislikeLabel: { type: 'string' },\n satisfiedLabel: { type: 'string' },\n neutralLabel: { type: 'string' },\n dissatisfiedLabel: { type: 'string' },\n },\n additionalProperties: false,\n },\n optionalEmail: exports.optionalEmailSettings,\n },\n additionalProperties: false,\n },\n },\n additionalProperties: false,\n};\n//# sourceMappingURL=feedback-config-schema.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.graphqlConfigSchema = void 0;\nconst feedback_config_schema_1 = require(\"./feedback-config-schema\");\nconst typeGroupConfig = {\n type: 'object',\n properties: {\n includeByName: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n excludeByName: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n additionalProperties: false,\n};\nconst menuGroupConfig = {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n },\n items: typeGroupConfig,\n queries: typeGroupConfig,\n mutations: typeGroupConfig,\n subscriptions: typeGroupConfig,\n types: typeGroupConfig,\n directives: typeGroupConfig,\n },\n required: ['name'],\n additionalProperties: false,\n};\nconst menuGroupingConfig = {\n type: 'object',\n properties: {\n requireExactGroups: {\n type: 'boolean',\n },\n groups: {\n type: 'array',\n items: menuGroupConfig,\n },\n otherItemsGroupName: {\n type: 'string',\n },\n },\n required: ['requireExactGroups', 'groups', 'otherItemsGroupName'],\n additionalProperties: false,\n};\nexports.graphqlConfigSchema = {\n type: 'object',\n properties: {\n hidePaginationButtons: {\n type: 'boolean',\n },\n menu: {\n type: 'object',\n properties: Object.assign({}, menuGroupingConfig.properties),\n additionalProperties: false,\n },\n sidebar: {\n type: 'object',\n properties: {\n hide: {\n type: 'boolean',\n },\n },\n },\n apiLogo: {\n type: 'object',\n properties: {\n imageUrl: {\n type: 'string',\n },\n href: {\n type: 'string',\n },\n altText: {\n type: 'string',\n },\n backgroundColor: {\n type: 'string',\n },\n },\n },\n jsonSamplesDepth: {\n type: 'number',\n },\n samplesMaxInlineArgs: {\n type: 'number',\n },\n licenseKey: {\n type: 'string',\n },\n fieldExpandLevel: {\n type: 'number',\n },\n baseUrlPath: {\n type: 'string',\n },\n feedback: feedback_config_schema_1.feedbackConfigSchema,\n },\n additionalProperties: false,\n};\n//# sourceMappingURL=graphql-config-schema.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.REDOCLY_ROUTE_RBAC = exports.REDOCLY_TEAMS_RBAC = exports.LayoutVariant = exports.DEFAULT_TEAM_CLAIM_NAME = exports.AuthProviderType = exports.ApigeeDevOnboardingIntegrationAuthType = exports.redocConfigSchema = exports.rootRedoclyConfigSchema = exports.rbacConfigSchema = exports.productConfigOverrideSchema = exports.productThemeOverrideSchema = void 0;\nvar product_override_schema_1 = require(\"./product-override-schema\");\nObject.defineProperty(exports, \"productThemeOverrideSchema\", { enumerable: true, get: function () { return product_override_schema_1.productThemeOverrideSchema; } });\nObject.defineProperty(exports, \"productConfigOverrideSchema\", { enumerable: true, get: function () { return product_override_schema_1.productConfigOverrideSchema; } });\nvar root_config_schema_1 = require(\"./root-config-schema\");\nObject.defineProperty(exports, \"rbacConfigSchema\", { enumerable: true, get: function () { return root_config_schema_1.rbacConfigSchema; } });\nObject.defineProperty(exports, \"rootRedoclyConfigSchema\", { enumerable: true, get: function () { return root_config_schema_1.rootRedoclyConfigSchema; } });\nvar redoc_config_schema_1 = require(\"./redoc-config-schema\");\nObject.defineProperty(exports, \"redocConfigSchema\", { enumerable: true, get: function () { return redoc_config_schema_1.redocConfigSchema; } });\n__exportStar(require(\"./types\"), exports);\nvar constants_1 = require(\"./constants\");\nObject.defineProperty(exports, \"ApigeeDevOnboardingIntegrationAuthType\", { enumerable: true, get: function () { return constants_1.ApigeeDevOnboardingIntegrationAuthType; } });\nObject.defineProperty(exports, \"AuthProviderType\", { enumerable: true, get: function () { return constants_1.AuthProviderType; } });\nObject.defineProperty(exports, \"DEFAULT_TEAM_CLAIM_NAME\", { enumerable: true, get: function () { return constants_1.DEFAULT_TEAM_CLAIM_NAME; } });\nObject.defineProperty(exports, \"LayoutVariant\", { enumerable: true, get: function () { return constants_1.LayoutVariant; } });\nObject.defineProperty(exports, \"REDOCLY_TEAMS_RBAC\", { enumerable: true, get: function () { return constants_1.REDOCLY_TEAMS_RBAC; } });\nObject.defineProperty(exports, \"REDOCLY_ROUTE_RBAC\", { enumerable: true, get: function () { return constants_1.REDOCLY_ROUTE_RBAC; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.productConfigOverrideSchema = exports.productThemeOverrideSchema = void 0;\nconst default_theme_config_schema_1 = require(\"./default-theme-config-schema\");\nconst ex_theme_config_schemas_1 = require(\"./ex-theme-config-schemas\");\nconst root_config_schema_1 = require(\"./root-config-schema\");\nexports.productThemeOverrideSchema = {\n type: 'object',\n properties: {\n logo: default_theme_config_schema_1.themeConfigSchema.properties.logo,\n navbar: default_theme_config_schema_1.themeConfigSchema.properties.navbar,\n footer: default_theme_config_schema_1.themeConfigSchema.properties.footer,\n sidebar: default_theme_config_schema_1.themeConfigSchema.properties.sidebar,\n search: default_theme_config_schema_1.themeConfigSchema.properties.search,\n codeSnippet: default_theme_config_schema_1.themeConfigSchema.properties.codeSnippet,\n breadcrumbs: default_theme_config_schema_1.themeConfigSchema.properties.breadcrumbs,\n openapi: default_theme_config_schema_1.themeConfigSchema.properties.openapi,\n feedback: default_theme_config_schema_1.themeConfigSchema.properties.feedback,\n analytics: {\n type: 'object',\n properties: {\n ga: ex_theme_config_schemas_1.productGoogleAnalyticsConfigSchema,\n },\n },\n },\n additionalProperties: true,\n default: {},\n};\nexports.productConfigOverrideSchema = {\n $id: 'product-config-override',\n type: 'object',\n properties: Object.assign(Object.assign({}, exports.productThemeOverrideSchema.properties), { apis: {\n type: 'object',\n additionalProperties: root_config_schema_1.apiConfigSchema,\n }, \n /**\n * @deprecated left for backwards compatibility\n */\n theme: exports.productThemeOverrideSchema }),\n additionalProperties: false,\n};\n//# sourceMappingURL=product-override-schema.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.redocConfigSchema = void 0;\nconst feedback_config_schema_1 = require(\"./feedback-config-schema\");\nconst codeSamplesConfigSchema = {\n type: 'object',\n properties: {\n languages: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n lang: {\n type: 'string',\n enum: [\n 'curl',\n 'JavaScript',\n 'Node.js',\n 'Python',\n 'Java8+Apache',\n 'Java',\n 'C#',\n 'C#+Newtonsoft',\n 'PHP',\n 'Go',\n 'Ruby',\n 'R',\n 'Payload',\n ],\n },\n label: { type: 'string' },\n options: {\n type: 'object',\n properties: {\n indent: { type: 'string' },\n withImports: { type: 'boolean' },\n withComments: { type: 'boolean' },\n binary: { type: 'boolean' },\n credentials: {\n type: 'string',\n enum: ['omit', 'same-origin', 'include'],\n },\n },\n additionalProperties: false,\n },\n },\n required: ['lang'],\n additionalProperties: false,\n },\n },\n skipOptionalParameters: { type: 'boolean' },\n withOAuth2Call: { type: 'boolean' },\n },\n required: ['languages'],\n additionalProperties: false,\n};\nconst downloadUrlsSchema = {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n title: { type: 'string' },\n url: { type: 'string' },\n },\n required: ['url'],\n additionalProperties: false,\n },\n};\nexports.redocConfigSchema = {\n type: 'object',\n properties: {\n licenseKey: { type: 'string' },\n hideLoading: { type: 'boolean' },\n disableRouter: { type: 'boolean' },\n hideSidebar: { type: 'boolean' },\n feedback: feedback_config_schema_1.feedbackConfigSchema,\n hideReplay: { type: 'boolean' },\n oAuth2RedirectURI: { type: 'string', nullable: true },\n corsProxyUrl: { type: 'string' },\n sortRequiredPropsFirst: { type: 'boolean' },\n sanitize: { type: 'boolean' },\n hideDownloadButtons: { type: 'boolean' },\n downloadUrls: downloadUrlsSchema,\n onlyRequiredInSamples: { type: 'boolean' },\n generatedSamplesMaxDepth: { oneOf: [{ type: 'number' }, { type: 'string' }] },\n showExtensions: {\n oneOf: [\n { type: 'boolean' },\n { type: 'string' },\n { type: 'array', items: { type: 'string' } },\n ],\n },\n hideSchemaTitles: { type: 'boolean' },\n jsonSamplesExpandLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] },\n schemasExpansionLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] },\n mockServer: {\n type: 'object',\n properties: {\n url: { type: 'string' },\n position: { type: 'string', enum: ['first', 'last', 'replace', 'off'] },\n description: { type: 'string' },\n },\n },\n maxDisplayedEnumValues: { type: 'number' },\n schemaDefinitionsTagName: { type: 'string' },\n layout: { type: 'string', enum: ['stacked', 'three-panel'] },\n hideInfoMetadata: { type: 'boolean' },\n events: { type: 'object' },\n skipBundle: { type: 'boolean' },\n routingBasePath: { type: 'string' },\n codeSamples: codeSamplesConfigSchema,\n ignoreNamedSchemas: {\n oneOf: [{ type: 'array', items: { type: 'string' } }, { type: 'string' }],\n },\n hidePropertiesPrefix: { type: 'boolean' },\n excludeFromSearch: { type: 'boolean' },\n },\n additionalProperties: false,\n};\n//# sourceMappingURL=redoc-config-schema.js.map","\"use strict\";\n// Needed for supporting deprecated Reference Docs config options\n// Transferred from https://github.com/Redocly/redocly-cli/blob/main/packages/core/src/types/redocly-yaml.ts\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deprecatedRefDocsSchema = void 0;\nconst ConfigLanguage = {\n type: 'object',\n properties: {\n label: { type: 'string' },\n lang: {\n enum: [\n 'curl',\n 'C#',\n 'Go',\n 'Java',\n 'Java8+Apache',\n 'JavaScript',\n 'Node.js',\n 'PHP',\n 'Python',\n 'R',\n 'Ruby',\n ],\n },\n },\n required: ['lang'],\n};\nconst ConfigLabels = {\n type: 'object',\n properties: {\n enum: { type: 'string' },\n enumSingleValue: { type: 'string' },\n enumArray: { type: 'string' },\n default: { type: 'string' },\n deprecated: { type: 'string' },\n example: { type: 'string' },\n examples: { type: 'string' },\n nullable: { type: 'string' },\n recursive: { type: 'string' },\n arrayOf: { type: 'string' },\n webhook: { type: 'string' },\n authorizations: { type: 'string' },\n tryItAuthBasicUsername: { type: 'string' },\n tryItAuthBasicPassword: { type: 'string' },\n },\n};\nconst CommonConfigSidebarLinks = {\n type: 'object',\n properties: {\n label: { type: 'string' },\n link: { type: 'string' },\n target: { type: 'string' },\n },\n required: ['label', 'link'],\n};\nconst ConfigSidebarLinks = {\n type: 'object',\n properties: {\n beforeInfo: { type: 'array', items: CommonConfigSidebarLinks },\n end: { type: 'array', items: CommonConfigSidebarLinks },\n },\n};\nconst CommonThemeColors = {\n type: 'object',\n properties: {\n main: { type: 'string' },\n light: { type: 'string' },\n dark: { type: 'string' },\n contrastText: { type: 'string' },\n },\n};\nconst CommonColorProps = {\n type: 'object',\n properties: {\n backgroundColor: { type: 'string' },\n borderColor: { type: 'string' },\n color: { type: 'string' },\n tabTextColor: { type: 'string' },\n },\n};\nconst BorderThemeColors = {\n type: 'object',\n properties: pickObjectProps(CommonThemeColors.properties, ['light', 'dark']),\n};\nconst HttpColors = {\n type: 'object',\n properties: {\n basic: { type: 'string' },\n delete: { type: 'string' },\n get: { type: 'string' },\n head: { type: 'string' },\n link: { type: 'string' },\n options: { type: 'string' },\n patch: { type: 'string' },\n post: { type: 'string' },\n put: { type: 'string' },\n },\n};\nconst ResponseColors = {\n type: 'object',\n properties: {\n error: CommonColorProps,\n info: CommonColorProps,\n redirect: CommonColorProps,\n success: CommonColorProps,\n },\n};\nconst SecondaryColors = {\n type: 'object',\n properties: omitObjectProps(CommonThemeColors.properties, ['dark']),\n};\nconst TextThemeColors = {\n type: 'object',\n properties: {\n primary: { type: 'string' },\n secondary: { type: 'string' },\n light: { type: 'string' },\n },\n};\nconst ThemeColors = {\n type: 'object',\n properties: {\n accent: CommonThemeColors,\n border: BorderThemeColors,\n error: CommonThemeColors,\n http: HttpColors,\n primary: CommonThemeColors,\n responses: ResponseColors,\n secondary: SecondaryColors,\n success: CommonThemeColors,\n text: TextThemeColors,\n tonalOffset: { type: 'number' },\n warning: CommonThemeColors,\n },\n};\nconst SizeProps = {\n type: 'object',\n properties: {\n fontSize: { type: 'string' },\n padding: { type: 'string' },\n minWidth: { type: 'string' },\n },\n};\nconst Sizes = {\n type: 'object',\n properties: {\n small: SizeProps,\n medium: SizeProps,\n large: SizeProps,\n xlarge: SizeProps,\n },\n};\nconst FontConfig = {\n type: 'object',\n properties: {\n fontFamily: { type: 'string' },\n fontSize: { type: 'string' },\n fontWeight: { type: 'string' },\n lineHeight: { type: 'string' },\n },\n};\nconst ButtonsConfig = {\n type: 'object',\n properties: Object.assign(Object.assign({}, omitObjectProps(FontConfig.properties, ['fontSize', 'lineHeight'])), { borderRadius: { type: 'string' }, hoverStyle: { type: 'string' }, boxShadow: { type: 'string' }, hoverBoxShadow: { type: 'string' }, sizes: Sizes }),\n};\nconst BadgeFontConfig = {\n type: 'object',\n properties: pickObjectProps(FontConfig.properties, ['fontSize', 'lineHeight']),\n};\nconst BadgeSizes = {\n type: 'object',\n properties: {\n medium: BadgeFontConfig,\n small: BadgeFontConfig,\n },\n};\nconst HttpBadgesConfig = {\n type: 'object',\n properties: Object.assign(Object.assign({}, omitObjectProps(FontConfig.properties, ['fontSize', 'lineHeight'])), { borderRadius: { type: 'string' }, color: { type: 'string' }, sizes: BadgeSizes }),\n};\nconst LabelControls = {\n type: 'object',\n properties: {\n top: { type: 'string' },\n width: { type: 'string' },\n height: { type: 'string' },\n },\n};\nconst Panels = {\n type: 'object',\n properties: {\n borderRadius: { type: 'string' },\n backgroundColor: { type: 'string' },\n },\n};\nconst TryItButton = {\n type: 'object',\n properties: {\n fullWidth: { type: 'boolean' },\n },\n};\nconst ConfigThemeComponents = {\n type: 'object',\n properties: {\n buttons: ButtonsConfig,\n httpBadges: HttpBadgesConfig,\n layoutControls: LabelControls,\n panels: Panels,\n tryItButton: TryItButton,\n tryItSendButton: TryItButton,\n },\n};\nconst Breakpoints = {\n type: 'object',\n properties: {\n small: { type: 'string' },\n medium: { type: 'string' },\n large: { type: 'string' },\n },\n};\nconst StackedConfig = {\n type: 'object',\n properties: {\n maxWidth: Breakpoints,\n },\n};\nconst ThreePanelConfig = {\n type: 'object',\n properties: {\n maxWidth: Breakpoints,\n middlePanelMaxWidth: Breakpoints,\n },\n};\nconst Layout = {\n type: 'object',\n properties: {\n showDarkRightPanel: { type: 'boolean' },\n stacked: StackedConfig,\n 'three-panel': ThreePanelConfig,\n },\n};\nconst SchemaColorsConfig = {\n type: 'object',\n properties: {\n backgroundColor: { type: 'string' },\n border: { type: 'string' },\n },\n};\nconst ConfigThemeSchema = {\n type: 'object',\n properties: {\n breakFieldNames: { type: 'boolean' },\n caretColor: { type: 'string' },\n caretSize: { type: 'string' },\n constraints: SchemaColorsConfig,\n defaultDetailsWidth: { type: 'string' },\n examples: SchemaColorsConfig,\n labelsTextSize: { type: 'string' },\n linesColor: { type: 'string' },\n nestedBackground: { type: 'string' },\n nestingSpacing: { type: 'string' },\n requireLabelColor: { type: 'string' },\n typeNameColor: { type: 'string' },\n typeTitleColor: { type: 'string' },\n },\n};\nconst GroupItemsConfig = {\n type: 'object',\n properties: {\n subItemsColor: { type: 'string' },\n textTransform: { type: 'string' },\n fontWeight: { type: 'string' },\n },\n};\nconst Level1Items = {\n type: 'object',\n properties: pickObjectProps(GroupItemsConfig.properties, ['textTransform']),\n};\nconst SpacingConfig = {\n type: 'object',\n properties: {\n unit: { type: 'number' },\n paddingHorizontal: { type: 'string' },\n paddingVertical: { type: 'string' },\n offsetTop: { type: 'string' },\n offsetLeft: { type: 'string' },\n offsetNesting: { type: 'string' },\n },\n};\nconst Sidebar = {\n type: 'object',\n properties: Object.assign(Object.assign({}, omitObjectProps(FontConfig.properties, ['fontWeight', 'lineHeight'])), { activeBgColor: { type: 'string' }, activeTextColor: { type: 'string' }, backgroundColor: { type: 'string' }, borderRadius: { type: 'string' }, breakPath: { type: 'boolean' }, caretColor: { type: 'string' }, caretSize: { type: 'string' }, groupItems: GroupItemsConfig, level1items: Level1Items, rightLineColor: { type: 'string' }, separatorLabelColor: { type: 'string' }, showAtBreakpoint: { type: 'string' }, spacing: SpacingConfig, textColor: { type: 'string' }, width: { type: 'string' } }),\n};\nconst Heading = {\n type: 'object',\n properties: Object.assign(Object.assign({}, FontConfig.properties), { color: { type: 'string' }, transform: { type: 'string' } }),\n};\nconst CodeConfig = {\n type: 'object',\n properties: Object.assign(Object.assign({}, FontConfig.properties), { backgroundColor: { type: 'string' }, color: { type: 'string' }, wordBreak: {\n type: 'string',\n enum: [\n 'break-all',\n 'break-word',\n 'keep-all',\n 'normal',\n 'revert',\n 'unset',\n 'inherit',\n 'initial',\n ],\n }, wrap: { type: 'boolean' } }),\n};\nconst HeadingsConfig = {\n type: 'object',\n properties: omitObjectProps(FontConfig.properties, ['fontSize']),\n};\nconst LinksConfig = {\n type: 'object',\n properties: {\n color: { type: 'string' },\n hover: { type: 'string' },\n textDecoration: { type: 'string' },\n hoverTextDecoration: { type: 'string' },\n visited: { type: 'string' },\n },\n};\nconst Typography = {\n type: 'object',\n properties: Object.assign(Object.assign({ code: CodeConfig, fieldName: FontConfig }, pickObjectProps(FontConfig.properties, ['fontSize', 'fontFamily'])), { fontWeightBold: { type: 'string' }, fontWeightLight: { type: 'string' }, fontWeightRegular: { type: 'string' }, heading1: Heading, heading2: Heading, heading3: Heading, headings: HeadingsConfig, lineHeight: { type: 'string' }, links: LinksConfig, optimizeSpeed: { type: 'boolean' }, rightPanelHeading: Heading, smoothing: {\n type: 'string',\n enum: ['auto', 'none', 'antialiased', 'subpixel-antialiased', 'grayscale'],\n } }),\n};\nconst TokenProps = {\n type: 'object',\n properties: Object.assign({ color: { type: 'string' } }, omitObjectProps(FontConfig.properties, ['fontWeight'])),\n};\nconst CodeBlock = {\n type: 'object',\n properties: {\n backgroundColor: { type: 'string' },\n borderRadius: { type: 'string' },\n tokens: TokenProps,\n },\n};\nconst ConfigThemeLogo = {\n type: 'object',\n properties: {\n gutter: { type: 'string' },\n maxHeight: { type: 'string' },\n maxWidth: { type: 'string' },\n },\n};\nconst Fab = {\n type: 'object',\n properties: {\n backgroundColor: { type: 'string' },\n color: { type: 'string' },\n },\n};\nconst ButtonOverrides = {\n type: 'object',\n properties: {\n custom: { type: 'string' },\n },\n};\nconst Overrides = {\n type: 'object',\n properties: {\n DownloadButton: ButtonOverrides,\n NextSectionButton: ButtonOverrides,\n },\n};\nconst RightPanel = {\n type: 'object',\n properties: {\n backgroundColor: { type: 'string' },\n panelBackgroundColor: { type: 'string' },\n panelControlsBackgroundColor: { type: 'string' },\n showAtBreakpoint: { type: 'string' },\n textColor: { type: 'string' },\n width: { type: 'string' },\n },\n};\nconst Shape = {\n type: 'object',\n properties: { borderRadius: { type: 'string' } },\n};\nconst ThemeSpacing = {\n type: 'object',\n properties: {\n sectionHorizontal: { type: 'number' },\n sectionVertical: { type: 'number' },\n unit: { type: 'number' },\n },\n};\nconst ConfigTheme = {\n type: 'object',\n properties: {\n breakpoints: Breakpoints,\n codeBlock: CodeBlock,\n colors: ThemeColors,\n components: ConfigThemeComponents,\n layout: Layout,\n logo: ConfigThemeLogo,\n fab: Fab,\n overrides: Overrides,\n rightPanel: RightPanel,\n schema: ConfigThemeSchema,\n shape: Shape,\n sidebar: Sidebar,\n spacing: ThemeSpacing,\n typography: Typography,\n links: { properties: { color: { type: 'string' } } },\n codeSample: { properties: { backgroundColor: { type: 'string' } } },\n },\n};\nconst GenerateCodeSamples = {\n type: 'object',\n properties: {\n skipOptionalParameters: { type: 'boolean' },\n languages: { type: 'array', items: ConfigLanguage },\n },\n required: ['languages'],\n};\nexports.deprecatedRefDocsSchema = {\n type: 'object',\n properties: {\n theme: ConfigTheme,\n ctrlFHijack: { type: 'boolean' },\n defaultSampleLanguage: { type: 'string' },\n disableDeepLinks: { type: 'boolean' },\n disableSearch: { type: 'boolean' },\n disableSidebar: { type: 'boolean' },\n downloadDefinitionUrl: { type: 'string' },\n expandDefaultServerVariables: { type: 'boolean' },\n enumSkipQuotes: { type: 'boolean' },\n expandDefaultRequest: { type: 'boolean' },\n expandDefaultResponse: { type: 'boolean' },\n expandResponses: { type: 'string' },\n expandSingleSchemaField: { type: 'boolean' },\n generateCodeSamples: GenerateCodeSamples,\n generatedPayloadSamplesMaxDepth: { type: 'number' },\n hideDownloadButton: { type: 'boolean' },\n hideHostname: { type: 'boolean' },\n hideInfoSection: { type: 'boolean' },\n hideLogo: { type: 'boolean' },\n hideRequestPayloadSample: { type: 'boolean' },\n hideRightPanel: { type: 'boolean' },\n hideSchemaPattern: { type: 'boolean' },\n hideSingleRequestSampleTab: { type: 'boolean' },\n hideSecuritySection: { type: 'boolean' },\n hideTryItPanel: { type: 'boolean' },\n hideFab: { type: 'boolean' },\n hideOneOfDescription: { type: 'boolean' },\n htmlTemplate: { type: 'string' },\n jsonSampleExpandLevel: {\n oneOf: [{ type: 'number', minimum: 1 }, { type: 'string' }],\n },\n labels: ConfigLabels,\n menuToggle: { type: 'boolean' },\n nativeScrollbars: { type: 'boolean' },\n noAutoAuth: { type: 'boolean' },\n onDeepLinkClick: { type: 'object' },\n pagination: { enum: ['none', 'section', 'item'] },\n pathInMiddlePanel: { type: 'boolean' },\n payloadSampleIdx: { type: 'number', minimum: 0 },\n requestInterceptor: { type: 'object' },\n requiredPropsFirst: { type: 'boolean' },\n routingStrategy: { type: 'string' },\n samplesTabsMaxCount: { type: 'number' },\n schemaExpansionLevel: {\n oneOf: [{ type: 'number', minimum: 0 }, { type: 'string' }],\n },\n minCharacterLengthToInitSearch: { type: 'number', minimum: 1 },\n maxResponseHeadersToShowInTryIt: { type: 'number', minimum: 0 },\n scrollYOffset: {\n oneOf: [{ type: 'number' }, { type: 'string' }],\n },\n searchAutoExpand: { type: 'boolean' },\n searchFieldLevelBoost: { type: 'number', minimum: 0 },\n searchMaxDepth: { type: 'number', minimum: 1 },\n searchMode: { type: 'string', enum: ['default', 'path-only'] },\n searchOperationTitleBoost: { type: 'number' },\n searchTagTitleBoost: { type: 'number' },\n sendXUserAgentInTryIt: { type: 'boolean' },\n showChangeLayoutButton: { type: 'boolean' },\n showConsole: { type: 'boolean' },\n showNextButton: { type: 'boolean' },\n showRightPanelToggle: { type: 'boolean' },\n showSecuritySchemeType: { type: 'boolean' },\n showWebhookVerb: { type: 'boolean' },\n showObjectSchemaExamples: { type: 'boolean' },\n disableTryItRequestUrlEncoding: { type: 'boolean' },\n sidebarLinks: ConfigSidebarLinks,\n sideNavStyle: { type: 'string', enum: ['summary-only', 'path-first', 'id-only', 'path-only'] },\n simpleOneOfTypeLabel: { type: 'boolean' },\n sortEnumValuesAlphabetically: { type: 'boolean' },\n sortOperationsAlphabetically: { type: 'boolean' },\n sortPropsAlphabetically: { type: 'boolean' },\n sortTagsAlphabetically: { type: 'boolean' },\n suppressWarnings: { type: 'boolean' },\n unstable_externalDescription: { type: 'boolean' },\n unstable_ignoreMimeParameters: { type: 'boolean' },\n untrustedDefinition: { type: 'boolean' },\n showAccessMode: { type: 'boolean' },\n preserveOriginalExtensionsName: { type: 'boolean' },\n markdownHeadingsAnchorLevel: { type: 'number' },\n },\n additionalProperties: false,\n};\nfunction pickObjectProps(object, keys) {\n return Object.fromEntries(keys.filter((key) => key in object).map((key) => [key, object[key]]));\n}\nfunction omitObjectProps(object, keys) {\n return Object.fromEntries(Object.entries(object).filter(([key]) => !keys.includes(key)));\n}\n//# sourceMappingURL=reference-docs-config-schema.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.removePropertyRecursively = removePropertyRecursively;\nfunction removePropertyRecursively(object, propToRemove) {\n return Object.fromEntries(Object.entries(object)\n .map(([key, value]) => {\n if (key === propToRemove) {\n return undefined;\n }\n if (typeof value !== 'object' || !value) {\n return [key, value];\n }\n if (Array.isArray(value)) {\n return [\n key,\n value.map((arrayItem) => typeof arrayItem === 'object'\n ? removePropertyRecursively(arrayItem, propToRemove)\n : arrayItem),\n ];\n }\n return [key, removePropertyRecursively(value, propToRemove)];\n })\n .filter(Boolean));\n}\n//# sourceMappingURL=remove-property-recursively.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reuniteConfigSchema = void 0;\nconst jobInputsSchema = {\n type: 'object',\n additionalProperties: { type: 'string' },\n};\nconst jobServersSchema = {\n type: 'object',\n additionalProperties: false,\n patternProperties: {\n '^[a-zA-Z0-9_-]+$': {\n type: 'string',\n pattern: '^https?://[^\\\\s/$.?#].[^\\\\s]*$',\n },\n },\n};\nconst severitySchema = {\n type: 'string',\n enum: ['error', 'warn', 'off'],\n};\nconst jobSeveritySchema = {\n type: 'object',\n additionalProperties: false,\n properties: {\n schemaCheck: severitySchema,\n statusCodeCheck: severitySchema,\n contentTypeCheck: severitySchema,\n successCriteriaCheck: severitySchema,\n },\n};\nconst jobTriggerSchema = {\n type: 'object',\n additionalProperties: false,\n properties: {\n event: {\n type: 'string',\n enum: ['schedule'],\n },\n interval: { type: 'string', pattern: '^[1-9]\\\\d*[mhdw]$' },\n },\n required: ['event'],\n};\nexports.reuniteConfigSchema = {\n type: 'object',\n properties: {\n ignoreLint: {\n oneOf: [\n { type: 'boolean', default: false },\n {\n type: 'object',\n additionalProperties: { type: 'boolean' },\n },\n ],\n },\n ignoreLinkChecker: { type: 'boolean' },\n ignoreMarkdocErrors: { type: 'boolean' },\n jobs: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n path: {\n type: 'string',\n pattern: '^(?!\\\\.\\\\./)(/[a-zA-Z0-9_\\\\-\\\\./]+|./[a-zA-Z0-9_\\\\-\\\\./]+|[a-zA-Z0-9_\\\\-\\\\./]+)$',\n },\n agent: {\n type: 'string',\n enum: ['respect'],\n },\n trigger: jobTriggerSchema,\n inputs: jobInputsSchema,\n servers: jobServersSchema,\n severity: jobSeveritySchema,\n },\n required: ['path', 'trigger', 'agent'],\n additionalProperties: false,\n },\n },\n },\n additionalProperties: false,\n};\n//# sourceMappingURL=reunite-config-schema.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.rootRedoclyConfigSchema = exports.redoclyConfigSchema = exports.l10nConfigSchema = exports.devOnboardingAdapterConfigSchema = exports.apigeeEdgeAdapterConfigSchema = exports.apigeeXAdapterConfigSchema = exports.apigeeAdapterAuthServiceAccountSchema = exports.apigeeAdapterAuthOauth2Schema = exports.graviteeAdapterConfigSchema = exports.graviteeAdapterAuthIdpSchema = exports.graviteeAdapterAuthStaticSchema = exports.rbacConfigSchema = exports.rbacScopeItemsSchema = exports.apiFunctionsConfigSchema = exports.seoConfigSchema = exports.apiConfigSchema = exports.redirectsConfigSchema = exports.redirectConfigSchema = exports.ssoConfigSchema = exports.ssoDirectConfigSchema = exports.authProviderConfigSchema = exports.saml2ProviderConfigSchema = exports.oidcProviderConfigSchema = exports.oidcIssuerMetadataSchema = void 0;\nconst constants_1 = require(\"./constants\");\nconst default_theme_config_schema_1 = require(\"./default-theme-config-schema\");\nconst feedback_config_schema_1 = require(\"./feedback-config-schema\");\nconst graphql_config_schema_1 = require(\"./graphql-config-schema\");\nconst remove_property_recursively_1 = require(\"./remove-property-recursively\");\nconst reunite_config_schema_1 = require(\"./reunite-config-schema\");\nconst ex_theme_config_schemas_1 = require(\"./ex-theme-config-schemas\");\nexports.oidcIssuerMetadataSchema = {\n type: 'object',\n properties: {\n end_session_endpoint: { type: 'string' },\n token_endpoint: { type: 'string' },\n authorization_endpoint: { type: 'string' },\n jwks_uri: { type: 'string' },\n },\n required: ['token_endpoint', 'authorization_endpoint'],\n additionalProperties: true,\n};\nexports.oidcProviderConfigSchema = {\n type: 'object',\n properties: {\n type: { type: 'string', const: constants_1.AuthProviderType.OIDC },\n title: { type: 'string' },\n pkce: { type: 'boolean', default: false },\n configurationUrl: { type: 'string', minLength: 1 },\n configuration: exports.oidcIssuerMetadataSchema,\n clientId: { type: 'string', minLength: 1 },\n clientSecret: { type: 'string', minLength: 0 },\n teamsClaimName: { type: 'string' },\n teamsClaimMap: { type: 'object', additionalProperties: { type: 'string' } },\n defaultTeams: { type: 'array', items: { type: 'string' } },\n scopes: { type: 'array', items: { type: 'string' } },\n tokenExpirationTime: { type: 'number' },\n authorizationRequestCustomParams: { type: 'object', additionalProperties: { type: 'string' } },\n tokenRequestCustomParams: { type: 'object', additionalProperties: { type: 'string' } },\n audience: { type: 'array', items: { type: 'string' } },\n },\n required: ['type', 'clientId'],\n oneOf: [{ required: ['configurationUrl'] }, { required: ['configuration'] }],\n additionalProperties: false,\n};\nexports.saml2ProviderConfigSchema = {\n type: 'object',\n properties: {\n type: { type: 'string', const: constants_1.AuthProviderType.SAML2 },\n title: { type: 'string' },\n issuerId: { type: 'string' },\n entityId: { type: 'string' },\n ssoUrl: { type: 'string' },\n x509PublicCert: { type: 'string' },\n teamsAttributeName: { type: 'string', default: constants_1.DEFAULT_TEAM_CLAIM_NAME },\n teamsAttributeMap: { type: 'object', additionalProperties: { type: 'string' } },\n defaultTeams: { type: 'array', items: { type: 'string' } },\n },\n additionalProperties: false,\n required: ['type', 'issuerId', 'ssoUrl', 'x509PublicCert'],\n};\nexports.authProviderConfigSchema = {\n oneOf: [exports.oidcProviderConfigSchema, exports.saml2ProviderConfigSchema],\n discriminator: { propertyName: 'type' },\n};\nexports.ssoDirectConfigSchema = {\n type: 'object',\n additionalProperties: exports.authProviderConfigSchema,\n};\nexports.ssoConfigSchema = {\n oneOf: [\n {\n type: 'array',\n items: {\n type: 'string',\n enum: ['REDOCLY', 'CORPORATE', 'GUEST'],\n },\n uniqueItems: true,\n },\n {\n type: 'string',\n enum: ['REDOCLY', 'CORPORATE', 'GUEST'],\n },\n ],\n};\nexports.redirectConfigSchema = {\n type: 'object',\n properties: {\n to: { type: 'string' },\n type: { type: 'number', default: 301 },\n },\n additionalProperties: false,\n};\nexports.redirectsConfigSchema = {\n type: 'object',\n additionalProperties: exports.redirectConfigSchema,\n default: {},\n};\nconst rulesSchema = {\n type: 'object',\n additionalProperties: {\n oneOf: [{ type: 'string' }, { type: 'object' }],\n },\n};\nexports.apiConfigSchema = {\n type: 'object',\n properties: {\n root: { type: 'string' },\n output: { type: 'string', pattern: '(.ya?ml|.json)$' },\n rbac: { type: 'object', additionalProperties: true },\n openapi: ex_theme_config_schemas_1.openapiConfigSchema,\n graphql: graphql_config_schema_1.graphqlConfigSchema,\n /**\n * @deprecated left for backwards compatibility\n */\n theme: {\n type: 'object',\n properties: {\n openapi: ex_theme_config_schemas_1.openapiConfigSchema,\n graphql: graphql_config_schema_1.graphqlConfigSchema,\n },\n additionalProperties: false,\n },\n title: { type: 'string' },\n metadata: { type: 'object', additionalProperties: true },\n rules: rulesSchema,\n decorators: { type: 'object', additionalProperties: true },\n preprocessors: { type: 'object', additionalProperties: true },\n },\n required: ['root'],\n};\nconst metadataConfigSchema = {\n type: 'object',\n additionalProperties: true,\n};\nconst metadataGlobsConfigSchema = {\n type: 'object',\n additionalProperties: {\n type: 'object',\n additionalProperties: true,\n },\n};\nexports.seoConfigSchema = {\n type: 'object',\n properties: {\n title: { type: 'string' },\n description: { type: 'string' },\n siteUrl: { type: 'string' },\n image: { type: 'string' },\n keywords: {\n oneOf: [{ type: 'array', items: { type: 'string' } }, { type: 'string' }],\n },\n lang: { type: 'string' },\n jsonLd: { type: 'object' },\n meta: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: { type: 'string' },\n content: { type: 'string' },\n },\n required: ['name', 'content'],\n additionalProperties: false,\n },\n },\n },\n additionalProperties: false,\n};\nexports.apiFunctionsConfigSchema = {\n type: 'object',\n properties: {\n folders: { type: 'array', items: { type: 'string' } },\n },\n additionalProperties: false,\n};\nexports.rbacScopeItemsSchema = {\n type: 'object',\n additionalProperties: { type: 'string' },\n};\nexports.rbacConfigSchema = {\n type: 'object',\n properties: {\n teamNamePatterns: { type: 'array', items: { type: 'string' } },\n teamFolders: { type: 'array', items: { type: 'string' } },\n teamFoldersBaseRoles: exports.rbacScopeItemsSchema,\n cms: exports.rbacScopeItemsSchema, // deprecated in favor of reunite\n reunite: exports.rbacScopeItemsSchema,\n features: {\n type: 'object',\n properties: {\n aiSearch: exports.rbacScopeItemsSchema,\n },\n additionalProperties: false,\n },\n content: {\n type: 'object',\n properties: {\n '**': exports.rbacScopeItemsSchema,\n },\n additionalProperties: exports.rbacScopeItemsSchema,\n },\n },\n additionalProperties: exports.rbacScopeItemsSchema,\n};\nexports.graviteeAdapterAuthStaticSchema = {\n type: 'object',\n properties: { static: { type: 'string' } },\n additionalProperties: false,\n required: ['static'],\n};\nexports.graviteeAdapterAuthIdpSchema = {\n type: 'object',\n properties: { idp: { type: 'string' } },\n additionalProperties: false,\n required: ['idp'],\n};\nexports.graviteeAdapterConfigSchema = {\n type: 'object',\n properties: {\n type: { type: 'string', const: 'GRAVITEE' },\n apiBaseUrl: { type: 'string' },\n env: { type: 'string' },\n allowApiProductsOutsideCatalog: { type: 'boolean', default: false },\n stage: { type: 'string', default: 'non-production' },\n auth: {\n oneOf: [exports.graviteeAdapterAuthStaticSchema, exports.graviteeAdapterAuthIdpSchema],\n },\n },\n additionalProperties: false,\n required: ['type', 'apiBaseUrl'],\n};\nexports.apigeeAdapterAuthOauth2Schema = {\n type: 'object',\n properties: {\n type: { type: 'string', const: constants_1.ApigeeDevOnboardingIntegrationAuthType.OAUTH2 },\n tokenEndpoint: { type: 'string' },\n clientId: { type: 'string' },\n clientSecret: { type: 'string' },\n },\n additionalProperties: false,\n required: ['type', 'tokenEndpoint', 'clientId', 'clientSecret'],\n};\nexports.apigeeAdapterAuthServiceAccountSchema = {\n type: 'object',\n properties: {\n type: { type: 'string', const: constants_1.ApigeeDevOnboardingIntegrationAuthType.SERVICE_ACCOUNT },\n serviceAccountEmail: { type: 'string' },\n serviceAccountPrivateKey: { type: 'string' },\n },\n additionalProperties: false,\n required: ['type', 'serviceAccountEmail', 'serviceAccountPrivateKey'],\n};\nexports.apigeeXAdapterConfigSchema = {\n type: 'object',\n properties: {\n type: { type: 'string', const: 'APIGEE_X' },\n apiUrl: { type: 'string' },\n stage: { type: 'string', default: 'non-production' },\n organizationName: { type: 'string' },\n ignoreApiProducts: { type: 'array', items: { type: 'string' } },\n allowApiProductsOutsideCatalog: { type: 'boolean', default: false },\n auth: {\n type: 'object',\n oneOf: [exports.apigeeAdapterAuthOauth2Schema, exports.apigeeAdapterAuthServiceAccountSchema],\n discriminator: { propertyName: 'type' },\n },\n },\n additionalProperties: false,\n required: ['type', 'organizationName', 'auth'],\n};\nexports.apigeeEdgeAdapterConfigSchema = Object.assign(Object.assign({}, exports.apigeeXAdapterConfigSchema), { properties: Object.assign(Object.assign({}, exports.apigeeXAdapterConfigSchema.properties), { type: { type: 'string', const: 'APIGEE_EDGE' } }) });\nexports.devOnboardingAdapterConfigSchema = {\n type: 'object',\n oneOf: [exports.apigeeXAdapterConfigSchema, exports.apigeeEdgeAdapterConfigSchema, exports.graviteeAdapterConfigSchema],\n discriminator: { propertyName: 'type' },\n};\nconst devOnboardingConfigSchema = {\n type: 'object',\n required: ['adapters'],\n additionalProperties: false,\n properties: {\n adapters: {\n type: 'array',\n items: exports.devOnboardingAdapterConfigSchema,\n },\n },\n};\nexports.l10nConfigSchema = {\n type: 'object',\n properties: {\n defaultLocale: {\n type: 'string',\n },\n locales: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n code: {\n type: 'string',\n },\n name: {\n type: 'string',\n },\n },\n required: ['code'],\n },\n },\n },\n additionalProperties: false,\n required: ['defaultLocale'],\n};\nconst responseHeaderSchema = {\n type: 'object',\n properties: {\n name: { type: 'string' },\n value: { type: 'string' },\n },\n additionalProperties: false,\n required: ['name', 'value'],\n};\nexports.redoclyConfigSchema = {\n type: 'object',\n properties: {\n /**\n * @deprecated Should use `plugins` instead\n */\n imports: {\n type: 'array',\n items: { type: 'string' },\n },\n licenseKey: { type: 'string' },\n redirects: exports.redirectsConfigSchema,\n seo: exports.seoConfigSchema,\n rbac: exports.rbacConfigSchema,\n apiFunctions: exports.apiFunctionsConfigSchema,\n requiresLogin: { type: 'boolean' },\n responseHeaders: {\n type: 'object',\n additionalProperties: {\n type: 'array',\n items: responseHeaderSchema,\n },\n },\n mockServer: {\n type: 'object',\n properties: {\n off: { type: 'boolean', default: false },\n position: { type: 'string', enum: ['first', 'last', 'replace', 'off'], default: 'first' },\n strictExamples: { type: 'boolean', default: false },\n errorIfForcedExampleNotFound: { type: 'boolean', default: false },\n description: { type: 'string' },\n },\n },\n apis: {\n type: 'object',\n additionalProperties: exports.apiConfigSchema,\n },\n rules: rulesSchema,\n decorators: { type: 'object', additionalProperties: true },\n preprocessors: { type: 'object', additionalProperties: true },\n ssoDirect: exports.ssoDirectConfigSchema,\n sso: exports.ssoConfigSchema,\n residency: { type: 'string' },\n developerOnboarding: devOnboardingConfigSchema,\n removeAttribution: { type: 'boolean' },\n i18n: exports.l10nConfigSchema, // deprecated\n l10n: exports.l10nConfigSchema,\n metadata: metadataConfigSchema,\n metadataGlobs: metadataGlobsConfigSchema,\n ignore: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n /**\n * @deprecated properties moved to the root of the config\n */\n theme: default_theme_config_schema_1.themeConfigSchema,\n reunite: reunite_config_schema_1.reuniteConfigSchema,\n // Ex theme properties\n logo: ex_theme_config_schemas_1.logoConfigSchema,\n navbar: ex_theme_config_schemas_1.navbarConfigSchema,\n products: ex_theme_config_schemas_1.productsConfigSchema,\n footer: ex_theme_config_schemas_1.footerConfigSchema,\n sidebar: ex_theme_config_schemas_1.sidebarConfigSchema,\n scripts: ex_theme_config_schemas_1.scriptsConfigSchema,\n links: ex_theme_config_schemas_1.linksConfigSchema,\n feedback: feedback_config_schema_1.feedbackConfigSchema,\n search: ex_theme_config_schemas_1.searchConfigSchema,\n colorMode: ex_theme_config_schemas_1.colorModeConfigSchema,\n navigation: ex_theme_config_schemas_1.navigationConfigSchema,\n codeSnippet: ex_theme_config_schemas_1.codeSnippetConfigSchema,\n markdown: ex_theme_config_schemas_1.markdownConfigSchema,\n openapi: ex_theme_config_schemas_1.openapiConfigSchema,\n graphql: graphql_config_schema_1.graphqlConfigSchema,\n analytics: ex_theme_config_schemas_1.analyticsConfigSchema,\n userMenu: ex_theme_config_schemas_1.userMenuConfigSchema,\n versionPicker: ex_theme_config_schemas_1.versionPickerConfigSchema,\n breadcrumbs: ex_theme_config_schemas_1.breadcrumbsConfigSchema,\n catalog: ex_theme_config_schemas_1.catalogsConfigSchema,\n scorecard: ex_theme_config_schemas_1.scorecardConfigSchema,\n },\n default: { redirects: {} },\n additionalProperties: true,\n};\nconst environmentSchema = Object.assign(Object.assign({}, (0, remove_property_recursively_1.removePropertyRecursively)(exports.redoclyConfigSchema, 'default')), { additionalProperties: false });\nexports.rootRedoclyConfigSchema = Object.assign(Object.assign({ $id: 'root-redocly-config' }, exports.redoclyConfigSchema), { properties: Object.assign(Object.assign({ plugins: {\n type: 'array',\n items: { type: 'string' },\n } }, exports.redoclyConfigSchema.properties), { env: {\n type: 'object',\n additionalProperties: environmentSchema, // TODO: if we want full validation we need to override apis, theme and the root\n } }), default: {}, additionalProperties: false });\n//# sourceMappingURL=root-config-schema.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=api-functions-types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=code-walkthrough-types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=config-types.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./api-functions-types\"), exports);\n__exportStar(require(\"./config-types\"), exports);\n__exportStar(require(\"./portal-shared-types\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./code-walkthrough-types\"), exports);\n//# sourceMappingURL=portal-shared-types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OasVersion = void 0;\nexports.bundleConfig = bundleConfig;\nexports.bundle = bundle;\nexports.bundleFromString = bundleFromString;\nexports.bundleDocument = bundleDocument;\nexports.mapTypeToComponent = mapTypeToComponent;\nconst resolve_1 = require(\"./resolve\");\nconst visitors_1 = require(\"./visitors\");\nconst types_1 = require(\"./types\");\nconst walk_1 = require(\"./walk\");\nconst oas_types_1 = require(\"./oas-types\");\nconst ref_utils_1 = require(\"./ref-utils\");\nconst rules_1 = require(\"./config/rules\");\nconst no_unresolved_refs_1 = require(\"./rules/no-unresolved-refs\");\nconst utils_1 = require(\"./utils\");\nconst domains_1 = require(\"./redocly/domains\");\nconst remove_unused_components_1 = require(\"./decorators/oas2/remove-unused-components\");\nconst remove_unused_components_2 = require(\"./decorators/oas3/remove-unused-components\");\nconst redocly_yaml_1 = require(\"./types/redocly-yaml\");\nvar OasVersion;\n(function (OasVersion) {\n OasVersion[\"Version2\"] = \"oas2\";\n OasVersion[\"Version3_0\"] = \"oas3_0\";\n OasVersion[\"Version3_1\"] = \"oas3_1\";\n})(OasVersion || (exports.OasVersion = OasVersion = {}));\nconst bundleVisitor = (0, visitors_1.normalizeVisitors)([\n {\n severity: 'error',\n ruleId: 'configBundler',\n visitor: {\n ref: {\n leave(node, ctx, resolved) {\n replaceRef(node, resolved, ctx);\n },\n },\n },\n },\n], redocly_yaml_1.NormalizedConfigTypes);\nasync function bundleConfig(document, resolvedRefMap) {\n const ctx = {\n problems: [],\n oasVersion: oas_types_1.SpecVersion.OAS3_0,\n refTypes: new Map(),\n visitorsData: {},\n };\n (0, walk_1.walkDocument)({\n document,\n rootType: redocly_yaml_1.NormalizedConfigTypes.ConfigRoot,\n normalizedVisitors: bundleVisitor,\n resolvedRefMap,\n ctx,\n });\n return document.parsed ?? {};\n}\nasync function bundle(opts) {\n const { ref, doc, externalRefResolver = new resolve_1.BaseResolver(opts.config.resolve), base = null, } = opts;\n if (!(ref || doc)) {\n throw new Error('Document or reference is required.\\n');\n }\n const document = doc === undefined ? await externalRefResolver.resolveDocument(base, ref, true) : doc;\n if (document instanceof Error) {\n throw document;\n }\n opts.collectSpecData?.(document.parsed);\n return bundleDocument({\n document,\n ...opts,\n config: opts.config.styleguide,\n externalRefResolver,\n });\n}\nasync function bundleFromString(opts) {\n const { source, absoluteRef, externalRefResolver = new resolve_1.BaseResolver(opts.config.resolve) } = opts;\n const document = (0, resolve_1.makeDocumentFromString)(source, absoluteRef || '/');\n return bundleDocument({\n document,\n ...opts,\n externalRefResolver,\n config: opts.config.styleguide,\n });\n}\nasync function bundleDocument(opts) {\n const { document, config, customTypes, externalRefResolver, dereference = false, skipRedoclyRegistryRefs = false, removeUnusedComponents = false, keepUrlRefs = false, } = opts;\n const specVersion = (0, oas_types_1.detectSpec)(document.parsed);\n const specMajorVersion = (0, oas_types_1.getMajorSpecVersion)(specVersion);\n const rules = config.getRulesForSpecVersion(specMajorVersion);\n const types = (0, types_1.normalizeTypes)(config.extendTypes(customTypes ?? (0, oas_types_1.getTypes)(specVersion), specVersion), config);\n const preprocessors = (0, rules_1.initRules)(rules, config, 'preprocessors', specVersion);\n const decorators = (0, rules_1.initRules)(rules, config, 'decorators', specVersion);\n const ctx = {\n problems: [],\n oasVersion: specVersion,\n refTypes: new Map(),\n visitorsData: {},\n };\n if (removeUnusedComponents) {\n decorators.push({\n severity: 'error',\n ruleId: 'remove-unused-components',\n visitor: specMajorVersion === oas_types_1.SpecMajorVersion.OAS2\n ? (0, remove_unused_components_1.RemoveUnusedComponents)({})\n : (0, remove_unused_components_2.RemoveUnusedComponents)({}),\n });\n }\n let resolvedRefMap = await (0, resolve_1.resolveDocument)({\n rootDocument: document,\n rootType: types.Root,\n externalRefResolver,\n });\n if (preprocessors.length > 0) {\n // Make additional pass to resolve refs defined in preprocessors.\n (0, walk_1.walkDocument)({\n document,\n rootType: types.Root,\n normalizedVisitors: (0, visitors_1.normalizeVisitors)(preprocessors, types),\n resolvedRefMap,\n ctx,\n });\n resolvedRefMap = await (0, resolve_1.resolveDocument)({\n rootDocument: document,\n rootType: types.Root,\n externalRefResolver,\n });\n }\n const bundleVisitor = (0, visitors_1.normalizeVisitors)([\n {\n severity: 'error',\n ruleId: 'bundler',\n visitor: makeBundleVisitor(specMajorVersion, dereference, skipRedoclyRegistryRefs, document, resolvedRefMap, keepUrlRefs),\n },\n ...decorators,\n ], types);\n (0, walk_1.walkDocument)({\n document,\n rootType: types.Root,\n normalizedVisitors: bundleVisitor,\n resolvedRefMap,\n ctx,\n });\n return {\n bundle: document,\n problems: ctx.problems.map((problem) => config.addProblemToIgnore(problem)),\n fileDependencies: externalRefResolver.getFiles(),\n rootType: types.Root,\n refTypes: ctx.refTypes,\n visitorsData: ctx.visitorsData,\n };\n}\nfunction mapTypeToComponent(typeName, version) {\n switch (version) {\n case oas_types_1.SpecMajorVersion.OAS3:\n switch (typeName) {\n case 'Schema':\n return 'schemas';\n case 'Parameter':\n return 'parameters';\n case 'Response':\n return 'responses';\n case 'Example':\n return 'examples';\n case 'RequestBody':\n return 'requestBodies';\n case 'Header':\n return 'headers';\n case 'SecuritySchema':\n return 'securitySchemes';\n case 'Link':\n return 'links';\n case 'Callback':\n return 'callbacks';\n default:\n return null;\n }\n case oas_types_1.SpecMajorVersion.OAS2:\n switch (typeName) {\n case 'Schema':\n return 'definitions';\n case 'Parameter':\n return 'parameters';\n case 'Response':\n return 'responses';\n default:\n return null;\n }\n case oas_types_1.SpecMajorVersion.Async2:\n switch (typeName) {\n case 'Schema':\n return 'schemas';\n case 'Parameter':\n return 'parameters';\n default:\n return null;\n }\n case oas_types_1.SpecMajorVersion.Async3:\n switch (typeName) {\n case 'Schema':\n return 'schemas';\n case 'Parameter':\n return 'parameters';\n default:\n return null;\n }\n case oas_types_1.SpecMajorVersion.Arazzo1:\n switch (typeName) {\n case 'Root.workflows_items.parameters_items':\n case 'Root.workflows_items.steps_items.parameters_items':\n return 'parameters';\n default:\n return null;\n }\n case oas_types_1.SpecMajorVersion.Overlay1:\n switch (typeName) {\n default:\n return null;\n }\n }\n}\nfunction replaceRef(ref, resolved, ctx) {\n if (!(0, utils_1.isPlainObject)(resolved.node)) {\n ctx.parent[ctx.key] = resolved.node;\n }\n else {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n delete ref.$ref;\n const obj = Object.assign({}, resolved.node, ref);\n Object.assign(ref, obj); // assign ref itself again so ref fields take precedence\n }\n}\n// function oas3Move\nfunction makeBundleVisitor(version, dereference, skipRedoclyRegistryRefs, rootDocument, resolvedRefMap, keepUrlRefs) {\n let components;\n let rootLocation;\n const visitor = {\n ref: {\n leave(node, ctx, resolved) {\n if (!resolved.location || resolved.node === undefined) {\n (0, no_unresolved_refs_1.reportUnresolvedRef)(resolved, ctx.report, ctx.location);\n return;\n }\n if (resolved.location.source === rootDocument.source &&\n resolved.location.source === ctx.location.source &&\n ctx.type.name !== 'scalar' &&\n !dereference) {\n return;\n }\n // do not bundle registry URL before push, otherwise we can't record dependencies\n if (skipRedoclyRegistryRefs && (0, domains_1.isRedoclyRegistryURL)(node.$ref)) {\n return;\n }\n if (keepUrlRefs && (0, ref_utils_1.isAbsoluteUrl)(node.$ref)) {\n return;\n }\n const componentType = mapTypeToComponent(ctx.type.name, version);\n if (!componentType) {\n replaceRef(node, resolved, ctx);\n }\n else {\n if (dereference) {\n saveComponent(componentType, resolved, ctx);\n replaceRef(node, resolved, ctx);\n }\n else {\n node.$ref = saveComponent(componentType, resolved, ctx);\n resolveBundledComponent(node, resolved, ctx);\n }\n }\n },\n },\n Example: {\n leave(node, ctx) {\n if ((0, ref_utils_1.isExternalValue)(node) && node.value === undefined) {\n const resolved = ctx.resolve({ $ref: node.externalValue });\n if (!resolved.location || resolved.node === undefined) {\n (0, no_unresolved_refs_1.reportUnresolvedRef)(resolved, ctx.report, ctx.location);\n return;\n }\n if (keepUrlRefs && (0, ref_utils_1.isAbsoluteUrl)(node.externalValue)) {\n return;\n }\n node.value = ctx.resolve({ $ref: node.externalValue }).node;\n delete node.externalValue;\n }\n },\n },\n Root: {\n enter(root, ctx) {\n rootLocation = ctx.location;\n if (version === oas_types_1.SpecMajorVersion.OAS3) {\n components = root.components = root.components || {};\n }\n else if (version === oas_types_1.SpecMajorVersion.OAS2) {\n components = root;\n }\n else if (version === oas_types_1.SpecMajorVersion.Async2) {\n components = root.components = root.components || {};\n }\n else if (version === oas_types_1.SpecMajorVersion.Async3) {\n components = root.components = root.components || {};\n }\n else if (version === oas_types_1.SpecMajorVersion.Arazzo1) {\n components = root.components = root.components || {};\n }\n },\n },\n };\n if (version === oas_types_1.SpecMajorVersion.OAS3) {\n visitor.DiscriminatorMapping = {\n leave(mapping, ctx) {\n for (const name of Object.keys(mapping)) {\n const $ref = mapping[name];\n const resolved = ctx.resolve({ $ref });\n if (!resolved.location || resolved.node === undefined) {\n (0, no_unresolved_refs_1.reportUnresolvedRef)(resolved, ctx.report, ctx.location.child(name));\n return;\n }\n const componentType = mapTypeToComponent('Schema', version);\n mapping[name] = saveComponent(componentType, resolved, ctx);\n }\n },\n };\n }\n function resolveBundledComponent(node, resolved, ctx) {\n const newRefId = (0, resolve_1.makeRefId)(ctx.location.source.absoluteRef, node.$ref);\n resolvedRefMap.set(newRefId, {\n document: rootDocument,\n isRemote: false,\n node: resolved.node,\n nodePointer: node.$ref,\n resolved: true,\n });\n }\n function saveComponent(componentType, target, ctx) {\n components[componentType] = components[componentType] || {};\n const name = getComponentName(target, componentType, ctx);\n components[componentType][name] = target.node;\n if (version === oas_types_1.SpecMajorVersion.OAS3 ||\n version === oas_types_1.SpecMajorVersion.Async2 ||\n version === oas_types_1.SpecMajorVersion.Async3) {\n return `#/components/${componentType}/${name}`;\n }\n else {\n return `#/${componentType}/${name}`;\n }\n }\n function isEqualOrEqualRef(node, target, ctx) {\n if ((0, ref_utils_1.isRef)(node) &&\n ctx.resolve(node, rootLocation.absolutePointer).location?.absolutePointer ===\n target.location.absolutePointer) {\n return true;\n }\n return (0, utils_1.dequal)(node, target.node);\n }\n function getComponentName(target, componentType, ctx) {\n const [fileRef, pointer] = [target.location.source.absoluteRef, target.location.pointer];\n const componentsGroup = components[componentType];\n let name = '';\n const refParts = pointer.slice(2).split('/').filter(utils_1.isTruthy); // slice(2) removes \"#/\"\n while (refParts.length > 0) {\n name = refParts.pop() + (name ? `-${name}` : '');\n if (!componentsGroup ||\n !componentsGroup[name] ||\n isEqualOrEqualRef(componentsGroup[name], target, ctx)) {\n return name;\n }\n }\n name = (0, ref_utils_1.refBaseName)(fileRef) + (name ? `_${name}` : '');\n if (!componentsGroup[name] || isEqualOrEqualRef(componentsGroup[name], target, ctx)) {\n return name;\n }\n const prevName = name;\n let serialId = 2;\n while (componentsGroup[name] && !isEqualOrEqualRef(componentsGroup[name], target, ctx)) {\n name = `${prevName}-${serialId}`;\n serialId++;\n }\n if (!componentsGroup[name]) {\n ctx.report({\n message: `Two schemas are referenced with the same name but different content. Renamed ${prevName} to ${name}.`,\n location: ctx.location,\n forceSeverity: 'warn',\n });\n }\n return name;\n }\n return visitor;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst all = {\n rules: {\n struct: 'error',\n },\n oas2Rules: {\n 'boolean-parameter-prefixes': 'error',\n 'info-contact': 'error',\n 'info-license': 'error',\n 'info-license-url': 'error',\n 'info-license-strict': 'error',\n 'no-path-trailing-slash': 'error',\n 'no-identical-paths': 'error',\n 'no-ambiguous-paths': 'error',\n 'no-invalid-schema-examples': 'error',\n 'no-invalid-parameter-examples': 'error',\n 'no-http-verbs-in-paths': 'error',\n 'no-enum-type-mismatch': 'error',\n 'no-unresolved-refs': 'error',\n 'no-required-schema-properties-undefined': 'error',\n 'no-schema-type-mismatch': 'error',\n 'operation-summary': 'error',\n 'operation-operationId': 'error',\n 'operation-operationId-unique': 'error',\n 'operation-operationId-url-safe': 'error',\n 'operation-description': 'error',\n 'operation-2xx-response': 'error',\n 'operation-4xx-response': 'error',\n 'operation-parameters-unique': 'error',\n 'operation-tag-defined': 'error',\n 'operation-singular-tag': 'error',\n 'parameter-description': 'error',\n 'path-declaration-must-exist': 'error',\n 'path-not-include-query': 'error',\n 'path-parameters-defined': 'error',\n 'paths-kebab-case': 'error',\n 'path-excludes-patterns': {\n severity: 'error',\n patterns: [],\n },\n 'path-http-verbs-order': 'error',\n 'path-params-defined': 'error',\n 'path-segment-plural': 'error',\n 'required-string-property-missing-min-length': 'error',\n 'response-contains-header': 'error',\n 'request-mime-type': {\n severity: 'error',\n allowedValues: ['application/json'],\n },\n 'response-mime-type': {\n severity: 'error',\n allowedValues: ['application/json'],\n },\n 'response-contains-property': 'error',\n 'security-defined': 'error',\n 'spec-strict-refs': 'error',\n 'scalar-property-missing-example': 'error',\n 'tag-description': 'error',\n 'tags-alphabetical': 'error',\n },\n oas3_0Rules: {\n 'array-parameter-serialization': 'error',\n 'boolean-parameter-prefixes': 'error',\n 'component-name-unique': 'error',\n 'info-contact': 'error',\n 'info-license': 'error',\n 'info-license-url': 'error',\n 'info-license-strict': 'error',\n 'no-path-trailing-slash': 'error',\n 'no-identical-paths': 'error',\n 'no-ambiguous-paths': 'error',\n 'no-invalid-schema-examples': 'error',\n 'no-invalid-parameter-examples': 'error',\n 'no-http-verbs-in-paths': 'error',\n 'no-enum-type-mismatch': 'error',\n 'no-unresolved-refs': 'error',\n 'no-required-schema-properties-undefined': 'error',\n 'no-schema-type-mismatch': 'error',\n 'no-invalid-media-type-examples': 'error',\n 'no-server-example.com': 'error',\n 'no-server-trailing-slash': 'error',\n 'no-empty-servers': 'error',\n 'no-example-value-and-externalValue': 'error',\n 'no-unused-components': 'error',\n 'no-undefined-server-variable': 'error',\n 'no-server-variables-empty-enum': 'error',\n 'operation-summary': 'error',\n 'operation-operationId': 'error',\n 'operation-operationId-unique': 'error',\n 'operation-operationId-url-safe': 'error',\n 'operation-description': 'error',\n 'operation-2xx-response': 'error',\n 'operation-4xx-response': 'error',\n 'operation-4xx-problem-details-rfc7807': 'error',\n 'operation-parameters-unique': 'error',\n 'operation-tag-defined': 'error',\n 'operation-singular-tag': 'error',\n 'parameter-description': 'error',\n 'path-declaration-must-exist': 'error',\n 'path-not-include-query': 'error',\n 'path-parameters-defined': 'error',\n 'paths-kebab-case': 'error',\n 'path-excludes-patterns': {\n severity: 'error',\n patterns: [],\n },\n 'path-http-verbs-order': 'error',\n 'path-params-defined': 'error',\n 'path-segment-plural': 'error',\n 'required-string-property-missing-min-length': 'error',\n 'response-contains-header': 'error',\n 'request-mime-type': {\n severity: 'error',\n allowedValues: ['application/json'],\n },\n 'response-mime-type': {\n severity: 'error',\n allowedValues: ['application/json'],\n },\n 'response-contains-property': 'error',\n 'security-defined': 'error',\n 'spec-strict-refs': 'error',\n 'scalar-property-missing-example': 'error',\n 'spec-components-invalid-map-name': 'error',\n 'tag-description': 'error',\n 'tags-alphabetical': 'error',\n },\n oas3_1Rules: {\n 'array-parameter-serialization': 'error',\n 'boolean-parameter-prefixes': 'error',\n 'component-name-unique': 'error',\n 'info-contact': 'error',\n 'info-license': 'error',\n 'info-license-url': 'error',\n 'info-license-strict': 'error',\n 'no-path-trailing-slash': 'error',\n 'no-identical-paths': 'error',\n 'no-ambiguous-paths': 'error',\n 'no-invalid-schema-examples': 'error',\n 'no-invalid-parameter-examples': 'error',\n 'no-http-verbs-in-paths': 'error',\n 'no-enum-type-mismatch': 'error',\n 'no-unresolved-refs': 'error',\n 'no-required-schema-properties-undefined': 'error',\n 'no-schema-type-mismatch': 'error',\n 'no-invalid-media-type-examples': 'error',\n 'no-server-example.com': 'error',\n 'no-server-trailing-slash': 'error',\n 'no-empty-servers': 'error',\n 'no-example-value-and-externalValue': 'error',\n 'no-unused-components': 'error',\n 'no-undefined-server-variable': 'error',\n 'no-server-variables-empty-enum': 'error',\n 'parameter-description': 'error',\n 'path-declaration-must-exist': 'error',\n 'path-not-include-query': 'error',\n 'path-parameters-defined': 'error',\n 'paths-kebab-case': 'error',\n 'path-excludes-patterns': {\n severity: 'error',\n patterns: [],\n },\n 'path-http-verbs-order': 'error',\n 'path-params-defined': 'error',\n 'path-segment-plural': 'error',\n 'operation-summary': 'error',\n 'operation-operationId': 'error',\n 'operation-operationId-unique': 'error',\n 'operation-operationId-url-safe': 'error',\n 'operation-description': 'error',\n 'operation-2xx-response': 'error',\n 'operation-4xx-response': 'error',\n 'operation-4xx-problem-details-rfc7807': 'error',\n 'operation-parameters-unique': 'error',\n 'operation-tag-defined': 'error',\n 'operation-singular-tag': 'error',\n 'required-string-property-missing-min-length': 'error',\n 'response-contains-header': 'error',\n 'request-mime-type': {\n severity: 'error',\n allowedValues: ['application/json'],\n },\n 'response-mime-type': {\n severity: 'error',\n allowedValues: ['application/json'],\n },\n 'response-contains-property': 'error',\n 'security-defined': 'error',\n 'spec-strict-refs': 'error',\n 'scalar-property-missing-example': 'error',\n 'spec-components-invalid-map-name': 'error',\n 'tag-description': 'error',\n 'tags-alphabetical': 'error',\n },\n async2Rules: {\n 'channels-kebab-case': 'error',\n 'info-contact': 'error',\n 'info-license-strict': 'error',\n 'no-channel-trailing-slash': 'error',\n 'operation-operationId': 'error',\n 'tag-description': 'error',\n 'tags-alphabetical': 'error',\n },\n async3Rules: {\n 'channels-kebab-case': 'error',\n 'info-contact': 'error',\n 'info-license-strict': 'error',\n 'no-channel-trailing-slash': 'error',\n 'operation-operationId': 'error',\n 'tag-description': 'error',\n 'tags-alphabetical': 'error',\n },\n arazzo1Rules: {\n 'criteria-unique': 'error',\n 'no-criteria-xpath': 'off',\n 'parameters-unique': 'error',\n 'requestBody-replacements-unique': 'error',\n 'sourceDescription-type': 'error',\n 'step-onSuccess-unique': 'error',\n 'step-onFailure-unique': 'error',\n 'stepId-unique': 'error',\n 'sourceDescription-name-unique': 'error',\n 'sourceDescriptions-not-empty': 'error',\n 'respect-supported-versions': 'off',\n 'workflowId-unique': 'error',\n 'workflow-dependsOn': 'error',\n },\n overlay1Rules: {\n 'info-contact': 'error',\n },\n};\nexports.default = all;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultPlugin = exports.builtInConfigs = void 0;\nconst recommended_1 = require(\"./recommended\");\nconst recommended_strict_1 = require(\"./recommended-strict\");\nconst all_1 = require(\"./all\");\nconst minimal_1 = require(\"./minimal\");\nconst spec_1 = require(\"./spec\");\nconst oas3_1 = require(\"../rules/oas3\");\nconst oas2_1 = require(\"../rules/oas2\");\nconst async2_1 = require(\"../rules/async2\");\nconst async3_1 = require(\"../rules/async3\");\nconst arazzo_1 = require(\"../rules/arazzo\");\nconst overlay1_1 = require(\"../rules/overlay1\");\nconst oas3_2 = require(\"../decorators/oas3\");\nconst oas2_2 = require(\"../decorators/oas2\");\nconst async2_2 = require(\"../decorators/async2\");\nconst async3_2 = require(\"../decorators/async3\");\nconst arazzo_2 = require(\"../decorators/arazzo\");\nconst overlay1_2 = require(\"../decorators/overlay1\");\nexports.builtInConfigs = {\n recommended: recommended_1.default,\n 'recommended-strict': recommended_strict_1.default,\n minimal: minimal_1.default,\n all: all_1.default,\n spec: spec_1.default,\n 'redocly-registry': {\n decorators: { 'registry-dependencies': 'on' },\n },\n};\nexports.defaultPlugin = {\n id: '', // default plugin doesn't have id\n rules: {\n oas3: oas3_1.rules,\n oas2: oas2_1.rules,\n async2: async2_1.rules,\n async3: async3_1.rules,\n arazzo1: arazzo_1.rules,\n overlay1: overlay1_1.rules,\n },\n preprocessors: {\n oas3: oas3_1.preprocessors,\n oas2: oas2_1.preprocessors,\n async2: async2_1.preprocessors,\n async3: async3_1.preprocessors,\n arazzo1: arazzo_1.preprocessors,\n overlay1: overlay1_1.preprocessors,\n },\n decorators: {\n oas3: oas3_2.decorators,\n oas2: oas2_2.decorators,\n async2: async2_2.decorators,\n async3: async3_2.decorators,\n arazzo1: arazzo_2.decorators,\n overlay1: overlay1_2.decorators,\n },\n configs: exports.builtInConfigs,\n};\n",null,"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Config = exports.StyleguideConfig = exports.IGNORE_FILE = void 0;\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nconst js_yaml_1 = require(\"../js-yaml\");\nconst utils_1 = require(\"../utils\");\nconst oas_types_1 = require(\"../oas-types\");\nconst env_1 = require(\"../env\");\nconst utils_2 = require(\"./utils\");\nconst ref_utils_1 = require(\"../ref-utils\");\nexports.IGNORE_FILE = '.redocly.lint-ignore.yaml';\nconst IGNORE_BANNER = `# This file instructs Redocly's linter to ignore the rules contained for specific parts of your API.\\n` +\n `# See https://redocly.com/docs/cli/ for more information.\\n`;\nfunction getIgnoreFilePath(configFile) {\n if (configFile) {\n return (0, utils_1.doesYamlFileExist)(configFile)\n ? path.join(path.dirname(configFile), exports.IGNORE_FILE)\n : path.join(configFile, exports.IGNORE_FILE);\n }\n else {\n return env_1.isBrowser ? undefined : path.join(process.cwd(), exports.IGNORE_FILE);\n }\n}\nclass StyleguideConfig {\n constructor(rawConfig, configFile) {\n this.rawConfig = rawConfig;\n this.configFile = configFile;\n this.ignore = {};\n this._usedRules = new Set();\n this._usedVersions = new Set();\n this.plugins = rawConfig.plugins || [];\n this.doNotResolveExamples = !!rawConfig.doNotResolveExamples;\n this.recommendedFallback = rawConfig.recommendedFallback || false;\n const ruleGroups = [\n 'rules',\n 'oas2Rules',\n 'oas3_0Rules',\n 'oas3_1Rules',\n 'async2Rules',\n 'async3Rules',\n 'arazzo1Rules',\n 'overlay1Rules',\n ];\n replaceSpecWithStruct(ruleGroups, rawConfig);\n this.rules = {\n [oas_types_1.SpecVersion.OAS2]: { ...rawConfig.rules, ...rawConfig.oas2Rules },\n [oas_types_1.SpecVersion.OAS3_0]: { ...rawConfig.rules, ...rawConfig.oas3_0Rules },\n [oas_types_1.SpecVersion.OAS3_1]: { ...rawConfig.rules, ...rawConfig.oas3_1Rules },\n [oas_types_1.SpecVersion.Async2]: { ...rawConfig.rules, ...rawConfig.async2Rules },\n [oas_types_1.SpecVersion.Async3]: { ...rawConfig.rules, ...rawConfig.async3Rules },\n [oas_types_1.SpecVersion.Arazzo1]: { ...rawConfig.rules, ...rawConfig.arazzo1Rules },\n [oas_types_1.SpecVersion.Overlay1]: { ...rawConfig.rules, ...rawConfig.overlay1Rules },\n };\n this.preprocessors = {\n [oas_types_1.SpecVersion.OAS2]: { ...rawConfig.preprocessors, ...rawConfig.oas2Preprocessors },\n [oas_types_1.SpecVersion.OAS3_0]: { ...rawConfig.preprocessors, ...rawConfig.oas3_0Preprocessors },\n [oas_types_1.SpecVersion.OAS3_1]: { ...rawConfig.preprocessors, ...rawConfig.oas3_1Preprocessors },\n [oas_types_1.SpecVersion.Async2]: { ...rawConfig.preprocessors, ...rawConfig.async2Preprocessors },\n [oas_types_1.SpecVersion.Async3]: { ...rawConfig.preprocessors, ...rawConfig.async3Preprocessors },\n [oas_types_1.SpecVersion.Arazzo1]: { ...rawConfig.arazzo1Preprocessors },\n [oas_types_1.SpecVersion.Overlay1]: { ...rawConfig.preprocessors, ...rawConfig.overlay1Preprocessors },\n };\n this.decorators = {\n [oas_types_1.SpecVersion.OAS2]: { ...rawConfig.decorators, ...rawConfig.oas2Decorators },\n [oas_types_1.SpecVersion.OAS3_0]: { ...rawConfig.decorators, ...rawConfig.oas3_0Decorators },\n [oas_types_1.SpecVersion.OAS3_1]: { ...rawConfig.decorators, ...rawConfig.oas3_1Decorators },\n [oas_types_1.SpecVersion.Async2]: { ...rawConfig.decorators, ...rawConfig.async2Decorators },\n [oas_types_1.SpecVersion.Async3]: { ...rawConfig.decorators, ...rawConfig.async3Decorators },\n [oas_types_1.SpecVersion.Arazzo1]: { ...rawConfig.arazzo1Decorators },\n [oas_types_1.SpecVersion.Overlay1]: { ...rawConfig.decorators, ...rawConfig.overlay1Decorators },\n };\n this.extendPaths = rawConfig.extendPaths || [];\n this.pluginPaths = rawConfig.pluginPaths || [];\n this.resolveIgnore(getIgnoreFilePath(configFile));\n }\n resolveIgnore(ignoreFile) {\n if (!ignoreFile || !(0, utils_1.doesYamlFileExist)(ignoreFile))\n return;\n this.ignore =\n (0, js_yaml_1.parseYaml)(fs.readFileSync(ignoreFile, 'utf-8')) || {};\n replaceSpecWithStruct(Object.keys(this.ignore), this.ignore);\n // resolve ignore paths\n for (const fileName of Object.keys(this.ignore)) {\n this.ignore[(0, ref_utils_1.isAbsoluteUrl)(fileName) ? fileName : path.resolve(path.dirname(ignoreFile), fileName)] = this.ignore[fileName];\n for (const ruleId of Object.keys(this.ignore[fileName])) {\n this.ignore[fileName][ruleId] = new Set(this.ignore[fileName][ruleId]);\n }\n if (!(0, ref_utils_1.isAbsoluteUrl)(fileName)) {\n delete this.ignore[fileName];\n }\n }\n }\n saveIgnore() {\n const dir = this.configFile ? path.dirname(this.configFile) : process.cwd();\n const ignoreFile = path.join(dir, exports.IGNORE_FILE);\n const mapped = {};\n for (const absFileName of Object.keys(this.ignore)) {\n const mappedDefinitionName = (0, ref_utils_1.isAbsoluteUrl)(absFileName)\n ? absFileName\n : (0, utils_1.slash)(path.relative(dir, absFileName));\n const ignoredRules = (mapped[mappedDefinitionName] = this.ignore[absFileName]);\n for (const ruleId of Object.keys(ignoredRules)) {\n ignoredRules[ruleId] = Array.from(ignoredRules[ruleId]);\n }\n }\n fs.writeFileSync(ignoreFile, IGNORE_BANNER + (0, js_yaml_1.stringifyYaml)(mapped));\n }\n addIgnore(problem) {\n const ignore = this.ignore;\n const loc = problem.location[0];\n if (loc.pointer === undefined)\n return;\n const fileIgnore = (ignore[loc.source.absoluteRef] = ignore[loc.source.absoluteRef] || {});\n const ruleIgnore = (fileIgnore[problem.ruleId] = fileIgnore[problem.ruleId] || new Set());\n ruleIgnore.add(loc.pointer);\n }\n addProblemToIgnore(problem) {\n const loc = problem.location[0];\n if (loc.pointer === undefined)\n return problem;\n const fileIgnore = this.ignore[loc.source.absoluteRef] || {};\n const ruleIgnore = fileIgnore[problem.ruleId];\n const ignored = ruleIgnore && ruleIgnore.has(loc.pointer);\n return ignored\n ? {\n ...problem,\n ignored,\n }\n : problem;\n }\n extendTypes(types, version) {\n let extendedTypes = types;\n for (const plugin of this.plugins) {\n if (plugin.typeExtension !== undefined) {\n switch (version) {\n case oas_types_1.SpecVersion.OAS3_0:\n case oas_types_1.SpecVersion.OAS3_1:\n if (!plugin.typeExtension.oas3)\n continue;\n extendedTypes = plugin.typeExtension.oas3(extendedTypes, version);\n break;\n case oas_types_1.SpecVersion.OAS2:\n if (!plugin.typeExtension.oas2)\n continue;\n extendedTypes = plugin.typeExtension.oas2(extendedTypes, version);\n break;\n case oas_types_1.SpecVersion.Async2:\n if (!plugin.typeExtension.async2)\n continue;\n extendedTypes = plugin.typeExtension.async2(extendedTypes, version);\n break;\n case oas_types_1.SpecVersion.Async3:\n if (!plugin.typeExtension.async3)\n continue;\n extendedTypes = plugin.typeExtension.async3(extendedTypes, version);\n break;\n case oas_types_1.SpecVersion.Arazzo1:\n if (!plugin.typeExtension.arazzo1)\n continue;\n extendedTypes = plugin.typeExtension.arazzo1(extendedTypes, version);\n break;\n case oas_types_1.SpecVersion.Overlay1:\n if (!plugin.typeExtension.overlay1)\n continue;\n extendedTypes = plugin.typeExtension.overlay1(extendedTypes, version);\n break;\n default:\n throw new Error('Not implemented');\n }\n }\n }\n return extendedTypes;\n }\n getRuleSettings(ruleId, oasVersion) {\n this._usedRules.add(ruleId);\n this._usedVersions.add(oasVersion);\n const settings = this.rules[oasVersion][ruleId] || 'off';\n if (typeof settings === 'string') {\n return {\n severity: settings,\n };\n }\n else {\n return { severity: 'error', ...settings };\n }\n }\n getPreprocessorSettings(ruleId, oasVersion) {\n this._usedRules.add(ruleId);\n this._usedVersions.add(oasVersion);\n const settings = this.preprocessors[oasVersion][ruleId] || 'off';\n if (typeof settings === 'string') {\n return {\n severity: settings === 'on' ? 'error' : settings,\n };\n }\n else {\n return { severity: 'error', ...settings };\n }\n }\n getDecoratorSettings(ruleId, oasVersion) {\n this._usedRules.add(ruleId);\n this._usedVersions.add(oasVersion);\n const settings = this.decorators[oasVersion][ruleId] || 'off';\n if (typeof settings === 'string') {\n return {\n severity: settings === 'on' ? 'error' : settings,\n };\n }\n else {\n return { severity: 'error', ...settings };\n }\n }\n getUnusedRules() {\n const rules = [];\n const decorators = [];\n const preprocessors = [];\n for (const usedVersion of Array.from(this._usedVersions)) {\n rules.push(...Object.keys(this.rules[usedVersion]).filter((name) => !this._usedRules.has(name)));\n decorators.push(...Object.keys(this.decorators[usedVersion]).filter((name) => !this._usedRules.has(name)));\n preprocessors.push(...Object.keys(this.preprocessors[usedVersion]).filter((name) => !this._usedRules.has(name)));\n }\n return {\n rules,\n preprocessors,\n decorators,\n };\n }\n getRulesForSpecVersion(version) {\n switch (version) {\n case oas_types_1.SpecMajorVersion.OAS3:\n // eslint-disable-next-line no-case-declarations\n const oas3Rules = [];\n this.plugins.forEach((p) => p.preprocessors?.oas3 && oas3Rules.push(p.preprocessors.oas3));\n this.plugins.forEach((p) => p.rules?.oas3 && oas3Rules.push(p.rules.oas3));\n this.plugins.forEach((p) => p.decorators?.oas3 && oas3Rules.push(p.decorators.oas3));\n return oas3Rules;\n case oas_types_1.SpecMajorVersion.OAS2:\n // eslint-disable-next-line no-case-declarations\n const oas2Rules = [];\n this.plugins.forEach((p) => p.preprocessors?.oas2 && oas2Rules.push(p.preprocessors.oas2));\n this.plugins.forEach((p) => p.rules?.oas2 && oas2Rules.push(p.rules.oas2));\n this.plugins.forEach((p) => p.decorators?.oas2 && oas2Rules.push(p.decorators.oas2));\n return oas2Rules;\n case oas_types_1.SpecMajorVersion.Async2:\n // eslint-disable-next-line no-case-declarations\n const asyncApi2Rules = [];\n this.plugins.forEach((p) => p.preprocessors?.async2 && asyncApi2Rules.push(p.preprocessors.async2));\n this.plugins.forEach((p) => p.rules?.async2 && asyncApi2Rules.push(p.rules.async2));\n this.plugins.forEach((p) => p.decorators?.async2 && asyncApi2Rules.push(p.decorators.async2));\n return asyncApi2Rules;\n case oas_types_1.SpecMajorVersion.Async3:\n // eslint-disable-next-line no-case-declarations\n const asyncApi3Rules = [];\n this.plugins.forEach((p) => p.preprocessors?.async3 && asyncApi3Rules.push(p.preprocessors.async3));\n this.plugins.forEach((p) => p.rules?.async3 && asyncApi3Rules.push(p.rules.async3));\n this.plugins.forEach((p) => p.decorators?.async3 && asyncApi3Rules.push(p.decorators.async3));\n return asyncApi3Rules;\n case oas_types_1.SpecMajorVersion.Arazzo1:\n // eslint-disable-next-line no-case-declarations\n const arazzo1Rules = [];\n this.plugins.forEach((p) => p.preprocessors?.arazzo1 && arazzo1Rules.push(p.preprocessors.arazzo1));\n this.plugins.forEach((p) => p.rules?.arazzo1 && arazzo1Rules.push(p.rules.arazzo1));\n this.plugins.forEach((p) => p.decorators?.arazzo1 && arazzo1Rules.push(p.decorators.arazzo1));\n return arazzo1Rules;\n case oas_types_1.SpecMajorVersion.Overlay1:\n // eslint-disable-next-line no-case-declarations\n const overlay1Rules = [];\n this.plugins.forEach((p) => p.preprocessors?.overlay1 && overlay1Rules.push(p.preprocessors.overlay1));\n this.plugins.forEach((p) => p.rules?.overlay1 && overlay1Rules.push(p.rules.overlay1));\n this.plugins.forEach((p) => p.decorators?.overlay1 && overlay1Rules.push(p.decorators.overlay1));\n return overlay1Rules;\n }\n }\n skipRules(rules) {\n for (const ruleId of rules || []) {\n for (const version of Object.values(oas_types_1.SpecVersion)) {\n if (this.rules[version][ruleId]) {\n this.rules[version][ruleId] = 'off';\n }\n else if (Array.isArray(this.rules[version].assertions)) {\n // skip assertions\n for (const configurableRule of this.rules[version].assertions) {\n if (configurableRule.assertionId === ruleId) {\n configurableRule.severity = 'off';\n }\n }\n }\n }\n }\n }\n skipPreprocessors(preprocessors) {\n for (const preprocessorId of preprocessors || []) {\n for (const version of Object.values(oas_types_1.SpecVersion)) {\n if (this.preprocessors[version][preprocessorId]) {\n this.preprocessors[version][preprocessorId] = 'off';\n }\n }\n }\n }\n skipDecorators(decorators) {\n for (const decoratorId of decorators || []) {\n for (const version of Object.values(oas_types_1.SpecVersion)) {\n if (this.decorators[version][decoratorId]) {\n this.decorators[version][decoratorId] = 'off';\n }\n }\n }\n }\n}\nexports.StyleguideConfig = StyleguideConfig;\n// To support backwards compatibility with the old `spec` key we rename it to `struct`.\nfunction replaceSpecWithStruct(ruleGroups, config) {\n for (const ruleGroup of ruleGroups) {\n if (config[ruleGroup] && (0, utils_1.isPlainObject)(config[ruleGroup]) && 'spec' in config[ruleGroup]) {\n (0, utils_1.showWarningForDeprecatedField)('spec', 'struct');\n config[ruleGroup].struct = config[ruleGroup].spec;\n delete config[ruleGroup].spec;\n }\n }\n}\nclass Config {\n constructor(rawConfig, configFile) {\n this.rawConfig = rawConfig;\n this.configFile = configFile;\n this.apis = rawConfig.apis || {};\n this.styleguide = new StyleguideConfig(rawConfig.styleguide || {}, configFile);\n this.theme = rawConfig.theme || {};\n this.resolve = (0, utils_2.getResolveConfig)(rawConfig?.resolve);\n this.region = rawConfig.region;\n this.organization = rawConfig.organization;\n this.files = rawConfig.files || [];\n this.telemetry = rawConfig.telemetry;\n }\n}\nexports.Config = Config;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./config\"), exports);\n__exportStar(require(\"./types\"), exports);\n__exportStar(require(\"./rules\"), exports);\n__exportStar(require(\"./builtIn\"), exports);\n__exportStar(require(\"./load\"), exports);\n__exportStar(require(\"./utils\"), exports);\n__exportStar(require(\"./config-resolvers\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CONFIG_FILE_NAMES = void 0;\nexports.loadConfig = loadConfig;\nexports.findConfig = findConfig;\nexports.getConfig = getConfig;\nexports.createConfig = createConfig;\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nconst redocly_1 = require(\"../redocly\");\nconst utils_1 = require(\"../utils\");\nconst js_yaml_1 = require(\"../js-yaml\");\nconst utils_2 = require(\"./utils\");\nconst config_resolvers_1 = require(\"./config-resolvers\");\nconst bundle_1 = require(\"../bundle\");\nconst resolve_1 = require(\"../resolve\");\nconst env_1 = require(\"../env\");\nconst domains_1 = require(\"../redocly/domains\");\nasync function addConfigMetadata({ rawConfig, customExtends, configPath, tokens, files, region, externalRefResolver, }) {\n if (customExtends !== undefined) {\n rawConfig.styleguide = rawConfig.styleguide || {};\n rawConfig.styleguide.extends = customExtends;\n }\n else if ((0, utils_1.isEmptyObject)(rawConfig)) {\n rawConfig.styleguide = { extends: ['recommended'], recommendedFallback: true };\n }\n if (tokens?.length) {\n if (!rawConfig.resolve)\n rawConfig.resolve = {};\n if (!rawConfig.resolve.http)\n rawConfig.resolve.http = {};\n rawConfig.resolve.http.headers = [...(rawConfig.resolve.http.headers ?? [])];\n for (const item of tokens) {\n const domain = domains_1.DOMAINS[item.region];\n rawConfig.resolve.http.headers.push({\n matches: `https://api.${domain}/registry/**`,\n name: 'Authorization',\n envVariable: undefined,\n value: item.token,\n }, \n //support redocly.com domain for future compatibility\n ...(item.region === 'us'\n ? [\n {\n matches: `https://api.redoc.ly/registry/**`,\n name: 'Authorization',\n envVariable: undefined,\n value: item.token,\n },\n ]\n : []));\n }\n }\n return (0, config_resolvers_1.resolveConfig)({\n rawConfig: {\n ...rawConfig,\n files: files ?? rawConfig.files,\n region: region ?? rawConfig.region,\n },\n configPath,\n externalRefResolver,\n });\n}\nasync function loadConfig(options = {}) {\n const { configPath = findConfig(), customExtends, processRawConfig, files, region, externalRefResolver, } = options;\n const { rawConfig, document, parsed, resolvedRefMap } = await getConfig({\n configPath,\n externalRefResolver,\n });\n const redoclyClient = env_1.isBrowser ? undefined : new redocly_1.RedoclyClient();\n const tokens = redoclyClient && redoclyClient.hasTokens() ? redoclyClient.getAllTokens() : [];\n const config = await addConfigMetadata({\n rawConfig,\n customExtends,\n configPath,\n tokens,\n files,\n region,\n externalRefResolver,\n });\n if (document && parsed && resolvedRefMap && typeof processRawConfig === 'function') {\n try {\n await processRawConfig({\n document,\n resolvedRefMap,\n config,\n parsed,\n });\n }\n catch (e) {\n if (e instanceof utils_2.ConfigValidationError) {\n throw e;\n }\n throw new Error(`Error parsing config file at '${configPath}': ${e.message}`);\n }\n }\n return config;\n}\nexports.CONFIG_FILE_NAMES = ['redocly.yaml', 'redocly.yml', '.redocly.yaml', '.redocly.yml'];\nfunction findConfig(dir) {\n if (!fs?.hasOwnProperty?.('existsSync'))\n return;\n const existingConfigFiles = exports.CONFIG_FILE_NAMES.map((name) => dir ? path.resolve(dir, name) : name).filter(fs.existsSync);\n if (existingConfigFiles.length > 1) {\n throw new Error(`\n Multiple configuration files are not allowed.\n Found the following files: ${existingConfigFiles.join(', ')}.\n Please use 'redocly.yaml' instead.\n `);\n }\n return existingConfigFiles[0];\n}\nasync function getConfig(options = {}) {\n const { configPath = findConfig(), externalRefResolver = new resolve_1.BaseResolver() } = options;\n if (!configPath)\n return { rawConfig: {} };\n try {\n const { document, resolvedRefMap } = await (0, config_resolvers_1.resolveConfigFileAndRefs)({\n configPath,\n externalRefResolver,\n });\n const bundledRefMap = (0, utils_2.deepCloneMapWithJSON)(resolvedRefMap);\n const parsed = await (0, bundle_1.bundleConfig)(JSON.parse(JSON.stringify(document)), bundledRefMap);\n return {\n rawConfig: (0, utils_2.transformConfig)(parsed),\n document,\n parsed,\n resolvedRefMap,\n };\n }\n catch (e) {\n throw new Error(`Error parsing config file at '${configPath}': ${e.message}`);\n }\n}\nasync function createConfig(config, options) {\n return addConfigMetadata({\n rawConfig: (0, utils_2.transformConfig)(typeof config === 'string' ? (0, js_yaml_1.parseYaml)(config) : config),\n ...options,\n });\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst minimal = {\n rules: {\n struct: 'error',\n },\n oas2Rules: {\n 'boolean-parameter-prefixes': 'off',\n 'info-contact': 'off',\n 'info-license': 'off',\n 'info-license-url': 'off',\n 'info-license-strict': 'off',\n 'no-path-trailing-slash': 'warn',\n 'no-identical-paths': 'warn',\n 'no-ambiguous-paths': 'warn',\n 'no-invalid-schema-examples': 'off',\n 'no-invalid-parameter-examples': 'off',\n 'no-http-verbs-in-paths': 'off',\n 'no-enum-type-mismatch': 'warn',\n 'no-unresolved-refs': 'error',\n 'no-required-schema-properties-undefined': 'off',\n 'no-schema-type-mismatch': 'off',\n 'operation-summary': 'warn',\n 'operation-operationId': 'warn',\n 'operation-operationId-unique': 'warn',\n 'operation-operationId-url-safe': 'warn',\n 'operation-description': 'off',\n 'operation-2xx-response': 'warn',\n 'operation-4xx-response': 'off',\n 'operation-parameters-unique': 'warn',\n 'operation-tag-defined': 'off',\n 'operation-singular-tag': 'off',\n 'parameter-description': 'off',\n 'path-declaration-must-exist': 'warn',\n 'path-not-include-query': 'warn',\n 'path-parameters-defined': 'warn',\n 'paths-kebab-case': 'off',\n 'path-excludes-patterns': 'off',\n 'path-http-verbs-order': 'off',\n 'path-params-defined': 'off',\n 'path-segment-plural': 'off',\n 'required-string-property-missing-min-length': 'off',\n 'response-contains-header': 'off',\n 'request-mime-type': 'off',\n 'response-contains-property': 'off',\n 'response-mime-type': 'off',\n 'security-defined': 'warn',\n 'spec-strict-refs': 'off',\n 'scalar-property-missing-example': 'off',\n 'tag-description': 'warn',\n 'tags-alphabetical': 'off',\n },\n oas3_0Rules: {\n 'array-parameter-serialization': 'off',\n 'boolean-parameter-prefixes': 'off',\n 'component-name-unique': 'off',\n 'info-contact': 'off',\n 'info-license': 'off',\n 'info-license-url': 'off',\n 'info-license-strict': 'off',\n 'no-ambiguous-paths': 'warn',\n 'no-path-trailing-slash': 'warn',\n 'no-identical-paths': 'warn',\n 'no-invalid-schema-examples': 'off',\n 'no-invalid-parameter-examples': 'off',\n 'no-http-verbs-in-paths': 'off',\n 'no-enum-type-mismatch': 'warn',\n 'no-unresolved-refs': 'error',\n 'no-required-schema-properties-undefined': 'off',\n 'no-schema-type-mismatch': 'off',\n 'no-invalid-media-type-examples': {\n severity: 'warn',\n allowAdditionalProperties: false,\n },\n 'no-server-example.com': 'warn',\n 'no-server-trailing-slash': 'error',\n 'no-empty-servers': 'warn',\n 'no-example-value-and-externalValue': 'warn',\n 'no-unused-components': 'warn',\n 'no-undefined-server-variable': 'warn',\n 'no-server-variables-empty-enum': 'error',\n 'operation-summary': 'warn',\n 'operation-operationId': 'warn',\n 'operation-operationId-unique': 'warn',\n 'operation-operationId-url-safe': 'warn',\n 'operation-description': 'off',\n 'operation-2xx-response': 'warn',\n 'operation-4xx-response': 'off',\n 'operation-4xx-problem-details-rfc7807': 'off',\n 'operation-parameters-unique': 'warn',\n 'operation-tag-defined': 'off',\n 'operation-singular-tag': 'off',\n 'parameter-description': 'off',\n 'path-declaration-must-exist': 'warn',\n 'path-not-include-query': 'warn',\n 'path-parameters-defined': 'warn',\n 'paths-kebab-case': 'off',\n 'path-excludes-patterns': 'off',\n 'path-http-verbs-order': 'off',\n 'path-params-defined': 'off',\n 'path-segment-plural': 'off',\n 'required-string-property-missing-min-length': 'off',\n 'response-contains-header': 'off',\n 'request-mime-type': 'off',\n 'response-contains-property': 'off',\n 'response-mime-type': 'off',\n 'security-defined': 'warn',\n 'spec-strict-refs': 'off',\n 'scalar-property-missing-example': 'off',\n 'spec-components-invalid-map-name': 'warn',\n 'tag-description': 'warn',\n 'tags-alphabetical': 'off',\n },\n oas3_1Rules: {\n 'array-parameter-serialization': 'off',\n 'boolean-parameter-prefixes': 'off',\n 'component-name-unique': 'off',\n 'info-contact': 'off',\n 'info-license': 'off',\n 'info-license-url': 'off',\n 'info-license-strict': 'off',\n 'no-path-trailing-slash': 'warn',\n 'no-identical-paths': 'warn',\n 'no-ambiguous-paths': 'warn',\n 'no-invalid-schema-examples': 'off',\n 'no-invalid-parameter-examples': 'off',\n 'no-http-verbs-in-paths': 'off',\n 'no-enum-type-mismatch': 'warn',\n 'no-unresolved-refs': 'error',\n 'no-required-schema-properties-undefined': 'off',\n 'no-schema-type-mismatch': 'off',\n 'no-invalid-media-type-examples': 'warn',\n 'no-server-example.com': 'warn',\n 'no-server-trailing-slash': 'error',\n 'no-empty-servers': 'warn',\n 'no-example-value-and-externalValue': 'warn',\n 'no-unused-components': 'warn',\n 'no-undefined-server-variable': 'warn',\n 'no-server-variables-empty-enum': 'error',\n 'operation-summary': 'warn',\n 'operation-operationId': 'warn',\n 'operation-operationId-unique': 'warn',\n 'operation-operationId-url-safe': 'warn',\n 'operation-description': 'off',\n 'operation-2xx-response': 'warn',\n 'operation-4xx-response': 'off',\n 'operation-4xx-problem-details-rfc7807': 'off',\n 'operation-parameters-unique': 'warn',\n 'operation-tag-defined': 'off',\n 'operation-singular-tag': 'off',\n 'parameter-description': 'off',\n 'path-declaration-must-exist': 'warn',\n 'path-not-include-query': 'warn',\n 'path-parameters-defined': 'warn',\n 'paths-kebab-case': 'off',\n 'path-excludes-patterns': 'off',\n 'path-http-verbs-order': 'off',\n 'path-params-defined': 'off',\n 'path-segment-plural': 'off',\n 'required-string-property-missing-min-length': 'off',\n 'response-contains-header': 'off',\n 'request-mime-type': 'off',\n 'response-contains-property': 'off',\n 'response-mime-type': 'off',\n 'security-defined': 'warn',\n 'spec-strict-refs': 'off',\n 'scalar-property-missing-example': 'off',\n 'spec-components-invalid-map-name': 'warn',\n 'tag-description': 'warn',\n 'tags-alphabetical': 'off',\n },\n async2Rules: {\n 'channels-kebab-case': 'off',\n 'info-contact': 'off',\n 'info-license-strict': 'off',\n 'no-channel-trailing-slash': 'off',\n 'operation-operationId': 'warn',\n 'tag-description': 'warn',\n 'tags-alphabetical': 'off',\n },\n async3Rules: {\n 'channels-kebab-case': 'off',\n 'info-contact': 'off',\n 'info-license-strict': 'off',\n 'no-channel-trailing-slash': 'off',\n 'operation-operationId': 'warn',\n 'tag-description': 'warn',\n 'tags-alphabetical': 'off',\n },\n arazzo1Rules: {\n 'criteria-unique': 'off',\n 'no-criteria-xpath': 'off',\n 'parameters-unique': 'off',\n 'requestBody-replacements-unique': 'off',\n 'sourceDescription-type': 'off',\n 'sourceDescriptions-not-empty': 'off',\n 'step-onSuccess-unique': 'off',\n 'step-onFailure-unique': 'off',\n 'stepId-unique': 'error',\n 'sourceDescription-name-unique': 'off',\n 'respect-supported-versions': 'off',\n 'workflowId-unique': 'error',\n 'workflow-dependsOn': 'off',\n },\n overlay1Rules: {\n 'info-contact': 'off',\n },\n};\nexports.default = minimal;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst recommendedStrict = {\n rules: {\n struct: 'error',\n },\n oas2Rules: {\n 'boolean-parameter-prefixes': 'off',\n 'info-contact': 'off',\n 'info-license': 'error',\n 'info-license-url': 'off',\n 'info-license-strict': 'error',\n 'no-path-trailing-slash': 'error',\n 'no-identical-paths': 'error',\n 'no-ambiguous-paths': 'error',\n 'no-invalid-schema-examples': 'off',\n 'no-invalid-parameter-examples': 'off',\n 'no-http-verbs-in-paths': 'off',\n 'no-enum-type-mismatch': 'error',\n 'no-unresolved-refs': 'error',\n 'no-required-schema-properties-undefined': 'off',\n 'no-schema-type-mismatch': 'error',\n 'operation-summary': 'error',\n 'operation-operationId': 'error',\n 'operation-operationId-unique': 'error',\n 'operation-operationId-url-safe': 'error',\n 'operation-description': 'off',\n 'operation-2xx-response': 'error',\n 'operation-4xx-response': 'error',\n 'operation-parameters-unique': 'error',\n 'operation-tag-defined': 'off',\n 'operation-singular-tag': 'off',\n 'parameter-description': 'off',\n 'path-declaration-must-exist': 'error',\n 'path-not-include-query': 'error',\n 'path-parameters-defined': 'error',\n 'paths-kebab-case': 'off',\n 'path-excludes-patterns': 'off',\n 'path-http-verbs-order': 'off',\n 'path-params-defined': 'off',\n 'path-segment-plural': 'off',\n 'required-string-property-missing-min-length': 'off',\n 'response-contains-header': 'off',\n 'request-mime-type': 'off',\n 'response-contains-property': 'off',\n 'response-mime-type': 'off',\n 'security-defined': 'error',\n 'spec-strict-refs': 'off',\n 'scalar-property-missing-example': 'off',\n 'tag-description': 'error',\n 'tags-alphabetical': 'off',\n },\n oas3_0Rules: {\n 'array-parameter-serialization': 'off',\n 'boolean-parameter-prefixes': 'off',\n 'component-name-unique': 'off',\n 'info-contact': 'off',\n 'info-license': 'error',\n 'info-license-url': 'off',\n 'info-license-strict': 'error',\n 'no-path-trailing-slash': 'error',\n 'no-identical-paths': 'error',\n 'no-ambiguous-paths': 'error',\n 'no-invalid-schema-examples': 'off',\n 'no-invalid-parameter-examples': 'off',\n 'no-http-verbs-in-paths': 'off',\n 'no-enum-type-mismatch': 'error',\n 'no-unresolved-refs': 'error',\n 'no-required-schema-properties-undefined': 'off',\n 'no-schema-type-mismatch': 'error',\n 'no-invalid-media-type-examples': {\n severity: 'error',\n allowAdditionalProperties: false,\n },\n 'no-server-example.com': 'error',\n 'no-server-trailing-slash': 'error',\n 'no-empty-servers': 'error',\n 'no-example-value-and-externalValue': 'error',\n 'no-unused-components': 'error',\n 'no-undefined-server-variable': 'error',\n 'no-server-variables-empty-enum': 'error',\n 'operation-summary': 'error',\n 'operation-operationId': 'error',\n 'operation-operationId-unique': 'error',\n 'operation-operationId-url-safe': 'error',\n 'operation-description': 'off',\n 'operation-2xx-response': 'error',\n 'operation-4xx-response': 'error',\n 'operation-4xx-problem-details-rfc7807': 'off',\n 'operation-parameters-unique': 'error',\n 'operation-tag-defined': 'off',\n 'operation-singular-tag': 'off',\n 'parameter-description': 'off',\n 'path-declaration-must-exist': 'error',\n 'path-not-include-query': 'error',\n 'path-parameters-defined': 'error',\n 'paths-kebab-case': 'off',\n 'path-excludes-patterns': 'off',\n 'path-http-verbs-order': 'off',\n 'path-params-defined': 'off',\n 'path-segment-plural': 'off',\n 'required-string-property-missing-min-length': 'off',\n 'response-contains-header': 'off',\n 'request-mime-type': 'off',\n 'response-contains-property': 'off',\n 'response-mime-type': 'off',\n 'security-defined': 'error',\n 'spec-strict-refs': 'off',\n 'scalar-property-missing-example': 'off',\n 'spec-components-invalid-map-name': 'error',\n 'tag-description': 'error',\n 'tags-alphabetical': 'off',\n },\n oas3_1Rules: {\n 'array-parameter-serialization': 'off',\n 'boolean-parameter-prefixes': 'off',\n 'component-name-unique': 'off',\n 'info-contact': 'off',\n 'info-license': 'error',\n 'info-license-url': 'off',\n 'info-license-strict': 'error',\n 'no-path-trailing-slash': 'error',\n 'no-identical-paths': 'error',\n 'no-ambiguous-paths': 'error',\n 'no-invalid-schema-examples': 'off',\n 'no-invalid-parameter-examples': 'off',\n 'no-http-verbs-in-paths': 'off',\n 'no-enum-type-mismatch': 'error',\n 'no-unresolved-refs': 'error',\n 'no-required-schema-properties-undefined': 'off',\n 'no-schema-type-mismatch': 'error',\n 'no-invalid-media-type-examples': 'error',\n 'no-server-example.com': 'error',\n 'no-server-trailing-slash': 'error',\n 'no-empty-servers': 'error',\n 'no-example-value-and-externalValue': 'error',\n 'no-unused-components': 'error',\n 'no-undefined-server-variable': 'error',\n 'no-server-variables-empty-enum': 'error',\n 'operation-summary': 'error',\n 'operation-operationId': 'error',\n 'operation-operationId-unique': 'error',\n 'operation-operationId-url-safe': 'error',\n 'operation-description': 'off',\n 'operation-2xx-response': 'error',\n 'operation-4xx-response': 'error',\n 'operation-4xx-problem-details-rfc7807': 'off',\n 'operation-parameters-unique': 'error',\n 'operation-tag-defined': 'off',\n 'operation-singular-tag': 'off',\n 'parameter-description': 'off',\n 'path-declaration-must-exist': 'error',\n 'path-not-include-query': 'error',\n 'path-parameters-defined': 'error',\n 'paths-kebab-case': 'off',\n 'path-excludes-patterns': 'off',\n 'path-http-verbs-order': 'off',\n 'path-params-defined': 'off',\n 'path-segment-plural': 'off',\n 'required-string-property-missing-min-length': 'off',\n 'response-contains-header': 'off',\n 'request-mime-type': 'off',\n 'response-contains-property': 'off',\n 'response-mime-type': 'off',\n 'security-defined': 'error',\n 'spec-strict-refs': 'off',\n 'scalar-property-missing-example': 'off',\n 'spec-components-invalid-map-name': 'error',\n 'tag-description': 'error',\n 'tags-alphabetical': 'off',\n },\n async2Rules: {\n 'channels-kebab-case': 'off',\n 'info-contact': 'off',\n 'info-license-strict': 'error',\n 'no-channel-trailing-slash': 'off',\n 'operation-operationId': 'error',\n 'tag-description': 'error',\n 'tags-alphabetical': 'off',\n },\n async3Rules: {\n 'channels-kebab-case': 'off',\n 'info-contact': 'off',\n 'info-license-strict': 'error',\n 'no-channel-trailing-slash': 'off',\n 'operation-operationId': 'error',\n 'tag-description': 'error',\n 'tags-alphabetical': 'off',\n },\n arazzo1Rules: {\n 'criteria-unique': 'error',\n 'no-criteria-xpath': 'off',\n 'parameters-unique': 'error',\n 'requestBody-replacements-unique': 'error',\n 'sourceDescription-type': 'error',\n 'step-onSuccess-unique': 'error',\n 'step-onFailure-unique': 'error',\n 'stepId-unique': 'error',\n 'sourceDescription-name-unique': 'error',\n 'sourceDescriptions-not-empty': 'error',\n 'respect-supported-versions': 'off',\n 'workflowId-unique': 'error',\n 'workflow-dependsOn': 'error',\n },\n overlay1Rules: {\n 'info-contact': 'off',\n },\n};\nexports.default = recommendedStrict;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst recommended = {\n rules: {\n struct: 'error',\n },\n oas2Rules: {\n 'boolean-parameter-prefixes': 'off',\n 'info-contact': 'off',\n 'info-license': 'warn',\n 'info-license-url': 'off',\n 'info-license-strict': 'warn',\n 'no-path-trailing-slash': 'error',\n 'no-identical-paths': 'error',\n 'no-ambiguous-paths': 'warn',\n 'no-invalid-schema-examples': 'off',\n 'no-invalid-parameter-examples': 'off',\n 'no-http-verbs-in-paths': 'off',\n 'no-enum-type-mismatch': 'error',\n 'no-unresolved-refs': 'error',\n 'no-required-schema-properties-undefined': 'off',\n 'no-schema-type-mismatch': 'warn',\n 'operation-summary': 'error',\n 'operation-description': 'off',\n 'operation-operationId': 'warn',\n 'operation-operationId-unique': 'error',\n 'operation-operationId-url-safe': 'error',\n 'operation-2xx-response': 'warn',\n 'operation-4xx-response': 'warn',\n 'operation-parameters-unique': 'error',\n 'operation-tag-defined': 'off',\n 'operation-singular-tag': 'off',\n 'parameter-description': 'off',\n 'path-declaration-must-exist': 'error',\n 'path-not-include-query': 'error',\n 'path-parameters-defined': 'error',\n 'paths-kebab-case': 'off',\n 'path-excludes-patterns': 'off',\n 'path-http-verbs-order': 'off',\n 'path-params-defined': 'off',\n 'path-segment-plural': 'off',\n 'required-string-property-missing-min-length': 'off',\n 'response-contains-header': 'off',\n 'request-mime-type': 'off',\n 'response-contains-property': 'off',\n 'response-mime-type': 'off',\n 'security-defined': 'error',\n 'spec-strict-refs': 'off',\n 'scalar-property-missing-example': 'off',\n 'tag-description': 'warn',\n 'tags-alphabetical': 'off',\n },\n oas3_0Rules: {\n 'array-parameter-serialization': 'off',\n 'boolean-parameter-prefixes': 'off',\n 'component-name-unique': 'off',\n 'info-contact': 'off',\n 'info-license': 'warn',\n 'info-license-url': 'off',\n 'info-license-strict': 'warn',\n 'no-path-trailing-slash': 'error',\n 'no-identical-paths': 'error',\n 'no-ambiguous-paths': 'warn',\n 'no-invalid-schema-examples': 'off',\n 'no-invalid-parameter-examples': 'off',\n 'no-http-verbs-in-paths': 'off',\n 'no-enum-type-mismatch': 'error',\n 'no-unresolved-refs': 'error',\n 'no-required-schema-properties-undefined': 'off',\n 'no-schema-type-mismatch': 'warn',\n 'no-invalid-media-type-examples': {\n severity: 'warn',\n allowAdditionalProperties: false,\n },\n 'no-server-example.com': 'warn',\n 'no-server-trailing-slash': 'error',\n 'no-empty-servers': 'error',\n 'no-example-value-and-externalValue': 'error',\n 'no-unused-components': 'warn',\n 'no-undefined-server-variable': 'error',\n 'no-server-variables-empty-enum': 'error',\n 'operation-summary': 'error',\n 'operation-operationId': 'warn',\n 'operation-operationId-unique': 'error',\n 'operation-operationId-url-safe': 'error',\n 'operation-description': 'off',\n 'operation-2xx-response': 'warn',\n 'operation-4xx-response': 'warn',\n 'operation-4xx-problem-details-rfc7807': 'off',\n 'operation-parameters-unique': 'error',\n 'operation-tag-defined': 'off',\n 'operation-singular-tag': 'off',\n 'parameter-description': 'off',\n 'path-declaration-must-exist': 'error',\n 'path-not-include-query': 'error',\n 'path-parameters-defined': 'error',\n 'paths-kebab-case': 'off',\n 'path-excludes-patterns': 'off',\n 'path-http-verbs-order': 'off',\n 'path-params-defined': 'off',\n 'path-segment-plural': 'off',\n 'required-string-property-missing-min-length': 'off',\n 'response-contains-header': 'off',\n 'request-mime-type': 'off',\n 'response-contains-property': 'off',\n 'response-mime-type': 'off',\n 'security-defined': 'error',\n 'spec-strict-refs': 'off',\n 'scalar-property-missing-example': 'off',\n 'spec-components-invalid-map-name': 'error',\n 'tag-description': 'warn',\n 'tags-alphabetical': 'off',\n },\n oas3_1Rules: {\n 'array-parameter-serialization': 'off',\n 'boolean-parameter-prefixes': 'off',\n 'component-name-unique': 'off',\n 'info-contact': 'off',\n 'info-license': 'warn',\n 'info-license-url': 'off',\n 'info-license-strict': 'warn',\n 'no-path-trailing-slash': 'error',\n 'no-identical-paths': 'error',\n 'no-ambiguous-paths': 'warn',\n 'no-invalid-schema-examples': 'off',\n 'no-invalid-parameter-examples': 'off',\n 'no-http-verbs-in-paths': 'off',\n 'no-enum-type-mismatch': 'error',\n 'no-unresolved-refs': 'error',\n 'no-required-schema-properties-undefined': 'off',\n 'no-schema-type-mismatch': 'warn',\n 'no-invalid-media-type-examples': 'warn',\n 'no-server-example.com': 'warn',\n 'no-server-trailing-slash': 'error',\n 'no-empty-servers': 'error',\n 'no-example-value-and-externalValue': 'error',\n 'no-unused-components': 'warn',\n 'no-undefined-server-variable': 'error',\n 'no-server-variables-empty-enum': 'error',\n 'operation-summary': 'error',\n 'operation-operationId': 'warn',\n 'operation-operationId-unique': 'error',\n 'operation-operationId-url-safe': 'error',\n 'operation-description': 'off',\n 'operation-2xx-response': 'warn',\n 'operation-4xx-response': 'warn',\n 'operation-4xx-problem-details-rfc7807': 'off',\n 'operation-parameters-unique': 'error',\n 'operation-tag-defined': 'off',\n 'operation-singular-tag': 'off',\n 'parameter-description': 'off',\n 'path-declaration-must-exist': 'error',\n 'path-not-include-query': 'error',\n 'path-parameters-defined': 'error',\n 'paths-kebab-case': 'off',\n 'path-excludes-patterns': 'off',\n 'path-http-verbs-order': 'off',\n 'path-params-defined': 'off',\n 'path-segment-plural': 'off',\n 'required-string-property-missing-min-length': 'off',\n 'response-contains-header': 'off',\n 'request-mime-type': 'off',\n 'response-contains-property': 'off',\n 'response-mime-type': 'off',\n 'security-defined': 'error',\n 'spec-strict-refs': 'off',\n 'scalar-property-missing-example': 'off',\n 'spec-components-invalid-map-name': 'error',\n 'tag-description': 'warn',\n 'tags-alphabetical': 'off',\n },\n async2Rules: {\n 'channels-kebab-case': 'off',\n 'info-contact': 'off',\n 'info-license-strict': 'warn',\n 'no-channel-trailing-slash': 'off',\n 'operation-operationId': 'warn',\n 'tag-description': 'warn',\n 'tags-alphabetical': 'off',\n },\n async3Rules: {\n 'channels-kebab-case': 'off',\n 'info-contact': 'off',\n 'info-license-strict': 'warn',\n 'no-channel-trailing-slash': 'off',\n 'operation-operationId': 'warn',\n 'tag-description': 'warn',\n 'tags-alphabetical': 'off',\n },\n arazzo1Rules: {\n 'criteria-unique': 'warn',\n 'no-criteria-xpath': 'off',\n 'parameters-unique': 'error',\n 'requestBody-replacements-unique': 'warn',\n 'sourceDescription-type': 'error',\n 'step-onSuccess-unique': 'warn',\n 'step-onFailure-unique': 'warn',\n 'stepId-unique': 'error',\n 'sourceDescription-name-unique': 'error',\n 'sourceDescriptions-not-empty': 'error',\n 'respect-supported-versions': 'off',\n 'workflowId-unique': 'error',\n 'workflow-dependsOn': 'error',\n },\n overlay1Rules: {\n 'info-contact': 'off',\n },\n};\nexports.default = recommended;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.initRules = initRules;\nconst utils_1 = require(\"../utils\");\nfunction initRules(rules, config, type, oasVersion) {\n return rules\n .flatMap((ruleset) => Object.keys(ruleset).map((ruleId) => {\n const rule = ruleset[ruleId];\n const ruleSettings = type === 'rules'\n ? config.getRuleSettings(ruleId, oasVersion)\n : type === 'preprocessors'\n ? config.getPreprocessorSettings(ruleId, oasVersion)\n : config.getDecoratorSettings(ruleId, oasVersion);\n if (ruleSettings.severity === 'off') {\n return undefined;\n }\n const severity = ruleSettings.severity;\n const message = ruleSettings.message;\n const visitors = rule(ruleSettings);\n if (Array.isArray(visitors)) {\n return visitors.map((visitor) => ({\n severity,\n ruleId,\n message,\n visitor: visitor,\n }));\n }\n return {\n severity,\n message,\n ruleId,\n visitor: visitors, // note: actually it is only one visitor object\n };\n }))\n .flatMap((visitor) => visitor)\n .filter(utils_1.isDefined);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst spec = {\n rules: {\n struct: 'error',\n },\n // TODO: populate with spec-related rules similar to `arazzo1Rules`\n oas2Rules: {},\n oas3_0Rules: {},\n oas3_1Rules: {},\n async2Rules: {},\n async3Rules: {},\n arazzo1Rules: {\n 'sourceDescription-type': 'error',\n 'respect-supported-versions': 'off',\n 'workflowId-unique': 'error',\n 'stepId-unique': 'error',\n 'sourceDescription-name-unique': 'error',\n 'sourceDescriptions-not-empty': 'error',\n 'workflow-dependsOn': 'error',\n 'parameters-unique': 'error',\n 'step-onSuccess-unique': 'error',\n 'step-onFailure-unique': 'error',\n 'requestBody-replacements-unique': 'error',\n 'no-criteria-xpath': 'off',\n 'criteria-unique': 'error',\n },\n overlay1Rules: {\n 'info-contact': 'warn',\n },\n};\nexports.default = spec;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ConfigValidationError = void 0;\nexports.parsePresetName = parsePresetName;\nexports.transformApiDefinitionsToApis = transformApiDefinitionsToApis;\nexports.prefixRules = prefixRules;\nexports.mergeExtends = mergeExtends;\nexports.getMergedConfig = getMergedConfig;\nexports.checkForDeprecatedFields = checkForDeprecatedFields;\nexports.transformConfig = transformConfig;\nexports.getResolveConfig = getResolveConfig;\nexports.getUniquePlugins = getUniquePlugins;\nexports.deepCloneMapWithJSON = deepCloneMapWithJSON;\nexports.isDeprecatedPluginFormat = isDeprecatedPluginFormat;\nexports.isCommonJsPlugin = isCommonJsPlugin;\nconst utils_1 = require(\"../utils\");\nconst config_1 = require(\"./config\");\nconst logger_1 = require(\"../logger\");\nfunction parsePresetName(presetName) {\n if (presetName.indexOf('/') > -1) {\n const [pluginId, configName] = presetName.split('/');\n return { pluginId, configName };\n }\n else {\n return { pluginId: '', configName: presetName };\n }\n}\nfunction transformApiDefinitionsToApis(apiDefinitions) {\n if (!apiDefinitions)\n return undefined;\n const apis = {};\n for (const [apiName, apiPath] of Object.entries(apiDefinitions)) {\n apis[apiName] = { root: apiPath };\n }\n return apis;\n}\nfunction extractFlatConfig({ plugins, extends: _extends, rules, oas2Rules, oas3_0Rules, oas3_1Rules, async2Rules, async3Rules, arazzo1Rules, overlay1Rules, preprocessors, oas2Preprocessors, oas3_0Preprocessors, oas3_1Preprocessors, async2Preprocessors, async3Preprocessors, arazzo1Preprocessors, overlay1Preprocessors, decorators, oas2Decorators, oas3_0Decorators, oas3_1Decorators, async2Decorators, async3Decorators, arazzo1Decorators, overlay1Decorators, ...rawConfigRest }) {\n const styleguideConfig = {\n plugins,\n extends: _extends,\n rules,\n oas2Rules,\n oas3_0Rules,\n oas3_1Rules,\n async2Rules,\n async3Rules,\n arazzo1Rules,\n overlay1Rules,\n preprocessors,\n oas2Preprocessors,\n oas3_0Preprocessors,\n oas3_1Preprocessors,\n async2Preprocessors,\n async3Preprocessors,\n arazzo1Preprocessors,\n overlay1Preprocessors,\n decorators,\n oas2Decorators,\n oas3_0Decorators,\n oas3_1Decorators,\n async2Decorators,\n async3Decorators,\n arazzo1Decorators,\n overlay1Decorators,\n doNotResolveExamples: rawConfigRest.resolve?.doNotResolveExamples,\n };\n if ((rawConfigRest.lint && rawConfigRest.styleguide) ||\n (Object.values(styleguideConfig).some(utils_1.isDefined) &&\n (rawConfigRest.lint || rawConfigRest.styleguide))) {\n throw new Error(`Do not use 'lint', 'styleguide' and flat syntax together. \\nSee more about the configuration in the docs: https://redocly.com/docs/cli/configuration/ \\n`);\n }\n return {\n styleguideConfig: Object.values(styleguideConfig).some(utils_1.isDefined)\n ? styleguideConfig\n : undefined,\n rawConfigRest,\n };\n}\nfunction transformApis(legacyApis) {\n if (!legacyApis)\n return undefined;\n const apis = {};\n for (const [apiName, { lint, ...apiContent }] of Object.entries(legacyApis)) {\n const { styleguideConfig, rawConfigRest } = extractFlatConfig(apiContent);\n apis[apiName] = {\n styleguide: styleguideConfig || lint,\n ...rawConfigRest,\n };\n }\n return apis;\n}\nfunction prefixRules(rules, prefix) {\n if (!prefix)\n return rules;\n const res = {};\n for (const name of Object.keys(rules)) {\n res[`${prefix}/${name}`] = rules[name];\n }\n return res;\n}\nfunction mergeExtends(rulesConfList) {\n const result = {\n rules: {},\n oas2Rules: {},\n oas3_0Rules: {},\n oas3_1Rules: {},\n async2Rules: {},\n async3Rules: {},\n arazzo1Rules: {},\n overlay1Rules: {},\n preprocessors: {},\n oas2Preprocessors: {},\n oas3_0Preprocessors: {},\n oas3_1Preprocessors: {},\n async2Preprocessors: {},\n async3Preprocessors: {},\n arazzo1Preprocessors: {},\n overlay1Preprocessors: {},\n decorators: {},\n oas2Decorators: {},\n oas3_0Decorators: {},\n oas3_1Decorators: {},\n async2Decorators: {},\n async3Decorators: {},\n arazzo1Decorators: {},\n overlay1Decorators: {},\n plugins: [],\n pluginPaths: [],\n extendPaths: [],\n };\n for (const rulesConf of rulesConfList) {\n if (rulesConf.extends) {\n throw new Error(`'extends' is not supported in shared configs yet:\\n${JSON.stringify(rulesConf, null, 2)}`);\n }\n (0, utils_1.assignConfig)(result.rules, rulesConf.rules);\n (0, utils_1.assignConfig)(result.oas2Rules, rulesConf.oas2Rules);\n (0, utils_1.assignOnlyExistingConfig)(result.oas2Rules, rulesConf.rules);\n (0, utils_1.assignConfig)(result.oas3_0Rules, rulesConf.oas3_0Rules);\n (0, utils_1.assignOnlyExistingConfig)(result.oas3_0Rules, rulesConf.rules);\n (0, utils_1.assignConfig)(result.oas3_1Rules, rulesConf.oas3_1Rules);\n (0, utils_1.assignOnlyExistingConfig)(result.oas3_1Rules, rulesConf.rules);\n (0, utils_1.assignConfig)(result.async2Rules, rulesConf.async2Rules);\n (0, utils_1.assignOnlyExistingConfig)(result.async2Rules, rulesConf.rules);\n (0, utils_1.assignConfig)(result.async3Rules, rulesConf.async3Rules);\n (0, utils_1.assignOnlyExistingConfig)(result.async3Rules, rulesConf.rules);\n (0, utils_1.assignConfig)(result.arazzo1Rules, rulesConf.arazzo1Rules);\n (0, utils_1.assignOnlyExistingConfig)(result.arazzo1Rules, rulesConf.rules);\n (0, utils_1.assignConfig)(result.overlay1Rules, rulesConf.overlay1Rules);\n (0, utils_1.assignOnlyExistingConfig)(result.overlay1Rules, rulesConf.rules);\n (0, utils_1.assignConfig)(result.preprocessors, rulesConf.preprocessors);\n (0, utils_1.assignConfig)(result.oas2Preprocessors, rulesConf.oas2Preprocessors);\n (0, utils_1.assignOnlyExistingConfig)(result.oas2Preprocessors, rulesConf.preprocessors);\n (0, utils_1.assignConfig)(result.oas3_0Preprocessors, rulesConf.oas3_0Preprocessors);\n (0, utils_1.assignOnlyExistingConfig)(result.oas3_0Preprocessors, rulesConf.preprocessors);\n (0, utils_1.assignConfig)(result.oas3_1Preprocessors, rulesConf.oas3_1Preprocessors);\n (0, utils_1.assignOnlyExistingConfig)(result.oas3_1Preprocessors, rulesConf.preprocessors);\n (0, utils_1.assignConfig)(result.async2Preprocessors, rulesConf.async2Preprocessors);\n (0, utils_1.assignOnlyExistingConfig)(result.async2Preprocessors, rulesConf.preprocessors);\n (0, utils_1.assignConfig)(result.async3Preprocessors, rulesConf.async3Preprocessors);\n (0, utils_1.assignOnlyExistingConfig)(result.async3Preprocessors, rulesConf.preprocessors);\n (0, utils_1.assignConfig)(result.arazzo1Preprocessors, rulesConf.arazzo1Preprocessors);\n (0, utils_1.assignOnlyExistingConfig)(result.arazzo1Preprocessors, rulesConf.preprocessors);\n (0, utils_1.assignConfig)(result.overlay1Preprocessors, rulesConf.overlay1Preprocessors);\n (0, utils_1.assignOnlyExistingConfig)(result.overlay1Preprocessors, rulesConf.preprocessors);\n (0, utils_1.assignConfig)(result.decorators, rulesConf.decorators);\n (0, utils_1.assignConfig)(result.oas2Decorators, rulesConf.oas2Decorators);\n (0, utils_1.assignOnlyExistingConfig)(result.oas2Decorators, rulesConf.decorators);\n (0, utils_1.assignConfig)(result.oas3_0Decorators, rulesConf.oas3_0Decorators);\n (0, utils_1.assignOnlyExistingConfig)(result.oas3_0Decorators, rulesConf.decorators);\n (0, utils_1.assignConfig)(result.oas3_1Decorators, rulesConf.oas3_1Decorators);\n (0, utils_1.assignOnlyExistingConfig)(result.oas3_1Decorators, rulesConf.decorators);\n (0, utils_1.assignConfig)(result.async2Decorators, rulesConf.async2Decorators);\n (0, utils_1.assignOnlyExistingConfig)(result.async2Decorators, rulesConf.decorators);\n (0, utils_1.assignConfig)(result.async3Decorators, rulesConf.async3Decorators);\n (0, utils_1.assignOnlyExistingConfig)(result.async3Decorators, rulesConf.decorators);\n (0, utils_1.assignConfig)(result.arazzo1Decorators, rulesConf.arazzo1Decorators);\n (0, utils_1.assignOnlyExistingConfig)(result.arazzo1Decorators, rulesConf.decorators);\n (0, utils_1.assignConfig)(result.overlay1Decorators, rulesConf.overlay1Decorators);\n (0, utils_1.assignOnlyExistingConfig)(result.overlay1Decorators, rulesConf.decorators);\n result.plugins.push(...(rulesConf.plugins || []));\n result.pluginPaths.push(...(rulesConf.pluginPaths || []));\n result.extendPaths.push(...new Set(rulesConf.extendPaths));\n }\n return result;\n}\nfunction getMergedConfig(config, apiName) {\n const extendPaths = [\n ...Object.values(config.apis).map((api) => api?.styleguide?.extendPaths),\n config.rawConfig?.styleguide?.extendPaths,\n ]\n .flat()\n .filter(utils_1.isTruthy);\n const pluginPaths = [\n ...Object.values(config.apis).map((api) => api?.styleguide?.pluginPaths),\n config.rawConfig?.styleguide?.pluginPaths,\n ]\n .flat()\n .filter(utils_1.isTruthy);\n return apiName\n ? new config_1.Config({\n ...config.rawConfig,\n styleguide: {\n ...(config.apis[apiName]\n ? config.apis[apiName].styleguide\n : config.rawConfig.styleguide),\n extendPaths,\n pluginPaths,\n },\n theme: {\n ...config.rawConfig.theme,\n ...config.apis[apiName]?.theme,\n },\n files: [...config.files, ...(config.apis?.[apiName]?.files ?? [])],\n // TODO: merge everything else here\n }, config.configFile)\n : config;\n}\nfunction checkForDeprecatedFields(deprecatedField, updatedField, rawConfig, updatedObject, link) {\n const isDeprecatedFieldInApis = rawConfig.apis &&\n Object.values(rawConfig.apis).some((api) => api[deprecatedField]);\n if (rawConfig[deprecatedField] && updatedField === null) {\n (0, utils_1.showWarningForDeprecatedField)(deprecatedField, undefined, updatedObject, link);\n }\n if (rawConfig[deprecatedField] && updatedField && rawConfig[updatedField]) {\n (0, utils_1.showErrorForDeprecatedField)(deprecatedField, updatedField);\n }\n if (rawConfig[deprecatedField] && updatedObject && rawConfig[updatedObject]) {\n (0, utils_1.showErrorForDeprecatedField)(deprecatedField, updatedField, updatedObject);\n }\n if (rawConfig[deprecatedField] || isDeprecatedFieldInApis) {\n (0, utils_1.showWarningForDeprecatedField)(deprecatedField, updatedField, updatedObject, link);\n }\n}\nfunction transformConfig(rawConfig) {\n const migratedFields = [\n ['apiDefinitions', 'apis', undefined, undefined],\n ['referenceDocs', 'openapi', 'theme', undefined],\n [\n 'lint',\n undefined,\n undefined,\n 'https://redocly.com/docs/api-registry/guides/migration-guide-config-file/#changed-properties',\n ],\n [\n 'styleguide',\n undefined,\n undefined,\n 'https://redocly.com/docs/api-registry/guides/migration-guide-config-file/#changed-properties',\n ],\n ['features.openapi', 'openapi', 'theme', undefined],\n ];\n for (const [deprecatedField, updatedField, updatedObject, link] of migratedFields) {\n checkForDeprecatedFields(deprecatedField, updatedField, rawConfig, updatedObject, link);\n }\n const { apis, apiDefinitions, referenceDocs, lint, ...rest } = rawConfig;\n const { styleguideConfig, rawConfigRest } = extractFlatConfig(rest);\n const transformedConfig = {\n theme: {\n openapi: {\n ...referenceDocs,\n ...rawConfig['features.openapi'],\n ...rawConfig.theme?.openapi,\n },\n mockServer: {\n ...rawConfig['features.mockServer'],\n ...rawConfig.theme?.mockServer,\n },\n },\n apis: transformApis(apis) || transformApiDefinitionsToApis(apiDefinitions),\n styleguide: styleguideConfig || lint,\n ...rawConfigRest,\n };\n showDeprecationMessages(transformedConfig);\n return transformedConfig;\n}\nfunction showDeprecationMessages(config) {\n let allRules = { ...config.styleguide?.rules };\n for (const api of Object.values(config.apis || {})) {\n allRules = { ...allRules, ...api?.styleguide?.rules };\n }\n for (const ruleKey of Object.keys(allRules)) {\n if (ruleKey.startsWith('assert/')) {\n logger_1.logger.warn(`\\nThe 'assert/' syntax in ${ruleKey} is deprecated. Update your configuration to use 'rule/' instead. Examples and more information: https://redocly.com/docs/cli/rules/configurable-rules/\\n`);\n }\n }\n}\nfunction getResolveConfig(resolve) {\n return {\n http: {\n headers: resolve?.http?.headers ?? [],\n customFetch: undefined,\n },\n };\n}\nfunction getUniquePlugins(plugins) {\n const seen = new Set();\n const results = [];\n for (const p of plugins) {\n if (!seen.has(p.id)) {\n results.push(p);\n seen.add(p.id);\n }\n else if (p.id) {\n logger_1.logger.warn(`Duplicate plugin id \"${logger_1.colorize.red(p.id)}\".\\n`);\n }\n }\n return results;\n}\nclass ConfigValidationError extends Error {\n}\nexports.ConfigValidationError = ConfigValidationError;\nfunction deepCloneMapWithJSON(originalMap) {\n return new Map(JSON.parse(JSON.stringify([...originalMap])));\n}\nfunction isDeprecatedPluginFormat(plugin) {\n return plugin !== undefined && typeof plugin === 'object' && 'id' in plugin;\n}\nfunction isCommonJsPlugin(plugin) {\n return typeof plugin === 'function';\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decorators = void 0;\nexports.decorators = {};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decorators = void 0;\nexports.decorators = {};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decorators = void 0;\nexports.decorators = {};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.filter = filter;\nexports.checkIfMatchByStrategy = checkIfMatchByStrategy;\nconst ref_utils_1 = require(\"../../../ref-utils\");\nconst utils_1 = require(\"../../../utils\");\nfunction filter(node, ctx, criteria) {\n const { parent, key } = ctx;\n let didDelete = false;\n if (Array.isArray(node)) {\n for (let i = 0; i < node.length; i++) {\n if ((0, ref_utils_1.isRef)(node[i])) {\n const resolved = ctx.resolve(node[i]);\n if (criteria(resolved.node)) {\n node.splice(i, 1);\n didDelete = true;\n i--;\n }\n }\n if (criteria(node[i])) {\n node.splice(i, 1);\n didDelete = true;\n i--;\n }\n }\n }\n else if ((0, utils_1.isPlainObject)(node)) {\n for (const key of Object.keys(node)) {\n node = node;\n if ((0, ref_utils_1.isRef)(node[key])) {\n const resolved = ctx.resolve(node[key]);\n if (criteria(resolved.node)) {\n delete node[key];\n didDelete = true;\n }\n }\n if (criteria(node[key])) {\n delete node[key];\n didDelete = true;\n }\n }\n }\n if (didDelete && ((0, utils_1.isEmptyObject)(node) || (0, utils_1.isEmptyArray)(node))) {\n delete parent[key];\n }\n}\nfunction checkIfMatchByStrategy(nodeValue, decoratorValue, strategy) {\n if (nodeValue === undefined || decoratorValue === undefined) {\n return false;\n }\n if (!Array.isArray(decoratorValue) && !Array.isArray(nodeValue)) {\n return nodeValue === decoratorValue;\n }\n decoratorValue = toArrayIfNeeded(decoratorValue);\n nodeValue = toArrayIfNeeded(nodeValue);\n if (strategy === 'any') {\n return decoratorValue.some((item) => nodeValue.includes(item));\n }\n if (strategy === 'all') {\n return decoratorValue.every((item) => nodeValue.includes(item));\n }\n return false;\n}\nfunction toArrayIfNeeded(value) {\n return Array.isArray(value) ? value : [value];\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FilterIn = void 0;\nconst filter_helper_1 = require(\"./filter-helper\");\nconst DEFAULT_STRATEGY = 'any';\nconst FilterIn = ({ property, value, matchStrategy }) => {\n const strategy = matchStrategy || DEFAULT_STRATEGY;\n const filterInCriteria = (item) => item?.[property] && !(0, filter_helper_1.checkIfMatchByStrategy)(item?.[property], value, strategy);\n return {\n any: {\n enter: (node, ctx) => {\n (0, filter_helper_1.filter)(node, ctx, filterInCriteria);\n },\n },\n };\n};\nexports.FilterIn = FilterIn;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FilterOut = void 0;\nconst filter_helper_1 = require(\"./filter-helper\");\nconst DEFAULT_STRATEGY = 'any';\nconst FilterOut = ({ property, value, matchStrategy }) => {\n const strategy = matchStrategy || DEFAULT_STRATEGY;\n const filterOutCriteria = (item) => (0, filter_helper_1.checkIfMatchByStrategy)(item?.[property], value, strategy);\n return {\n any: {\n enter: (node, ctx) => {\n (0, filter_helper_1.filter)(node, ctx, filterOutCriteria);\n },\n },\n };\n};\nexports.FilterOut = FilterOut;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InfoDescriptionOverride = void 0;\nconst utils_1 = require(\"../../utils\");\nconst InfoDescriptionOverride = ({ filePath }) => {\n return {\n Info: {\n leave(info, { report, location }) {\n if (!filePath)\n throw new Error(`Parameter \"filePath\" is not provided for \"info-description-override\" rule`);\n try {\n info.description = (0, utils_1.readFileAsStringSync)(filePath);\n }\n catch (e) {\n report({\n message: `Failed to read markdown override file for \"info.description\".\\n${e.message}`,\n location: location.child('description'),\n });\n }\n },\n },\n };\n};\nexports.InfoDescriptionOverride = InfoDescriptionOverride;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InfoOverride = void 0;\nconst InfoOverride = (newInfo) => {\n return {\n Info: {\n leave(info) {\n if (typeof newInfo !== 'object' || Array.isArray(newInfo) || newInfo === null) {\n throw new Error(`\"info-override\" decorator should be called with an object`);\n }\n const { severity: _, ...rest } = newInfo;\n Object.assign(info, rest);\n },\n },\n };\n};\nexports.InfoOverride = InfoOverride;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MediaTypeExamplesOverride = void 0;\nconst utils_1 = require(\"../../utils\");\nconst ref_utils_1 = require(\"../../ref-utils\");\nconst MediaTypeExamplesOverride = ({ operationIds }) => {\n return {\n Operation: {\n enter(operation, ctx) {\n const operationId = operation.operationId;\n if (!operationId) {\n return;\n }\n const properties = operationIds[operationId];\n if (!properties) {\n return;\n }\n if (properties.responses && operation.responses) {\n for (const responseCode of Object.keys(properties.responses)) {\n const resolvedResponse = checkAndResolveRef(operation.responses[responseCode], ctx.resolve);\n if (!resolvedResponse) {\n continue;\n }\n resolvedResponse.content = resolvedResponse.content ? resolvedResponse.content : {};\n Object.keys(properties.responses[responseCode]).forEach((mimeType) => {\n resolvedResponse.content[mimeType] = {\n ...resolvedResponse.content[mimeType],\n examples: (0, utils_1.yamlAndJsonSyncReader)(properties.responses[responseCode][mimeType]),\n };\n });\n operation.responses[responseCode] = resolvedResponse;\n }\n }\n if (properties.request && operation.requestBody) {\n const resolvedRequest = checkAndResolveRef(operation.requestBody, ctx.resolve);\n if (!resolvedRequest) {\n return;\n }\n resolvedRequest.content = resolvedRequest.content ? resolvedRequest.content : {};\n Object.keys(properties.request).forEach((mimeType) => {\n resolvedRequest.content[mimeType] = {\n ...resolvedRequest.content[mimeType],\n examples: (0, utils_1.yamlAndJsonSyncReader)(properties.request[mimeType]),\n };\n });\n operation.requestBody = resolvedRequest;\n }\n },\n },\n };\n};\nexports.MediaTypeExamplesOverride = MediaTypeExamplesOverride;\nfunction checkAndResolveRef(node, resolver) {\n if (!(0, ref_utils_1.isRef)(node)) {\n return node;\n }\n const resolved = resolver(node);\n return resolved.error ? undefined : JSON.parse(JSON.stringify(resolved.node));\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OperationDescriptionOverride = void 0;\nconst utils_1 = require(\"../../utils\");\nconst OperationDescriptionOverride = ({ operationIds }) => {\n return {\n Operation: {\n leave(operation, { report, location }) {\n if (!operation.operationId)\n return;\n if (!operationIds)\n throw new Error(`Parameter \"operationIds\" is not provided for \"operation-description-override\" rule`);\n const operationId = operation.operationId;\n if (operationIds[operationId]) {\n try {\n operation.description = (0, utils_1.readFileAsStringSync)(operationIds[operationId]);\n }\n catch (e) {\n report({\n message: `Failed to read markdown override file for operation \"${operationId}\".\\n${e.message}`,\n location: location.child('operationId').key(),\n });\n }\n }\n },\n },\n };\n};\nexports.OperationDescriptionOverride = OperationDescriptionOverride;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RegistryDependencies = void 0;\nconst domains_1 = require(\"../../redocly/domains\");\nconst RegistryDependencies = () => {\n const registryDependencies = new Set();\n return {\n Root: {\n leave(_, ctx) {\n const data = ctx.getVisitorData();\n data.links = Array.from(registryDependencies);\n },\n },\n ref(node) {\n if (node.$ref) {\n const link = node.$ref.split('#/')[0];\n if ((0, domains_1.isRedoclyRegistryURL)(link)) {\n registryDependencies.add(link);\n }\n }\n },\n };\n};\nexports.RegistryDependencies = RegistryDependencies;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RemoveXInternal = void 0;\nconst utils_1 = require(\"../../utils\");\nconst ref_utils_1 = require(\"../../ref-utils\");\nconst DEFAULT_INTERNAL_PROPERTY_NAME = 'x-internal';\nconst RemoveXInternal = ({ internalFlagProperty = DEFAULT_INTERNAL_PROPERTY_NAME, }) => {\n function removeInternal(node, ctx, originalMapping) {\n const { parent, key } = ctx;\n let didDelete = false;\n if (Array.isArray(node)) {\n for (let i = 0; i < node.length; i++) {\n if ((0, ref_utils_1.isRef)(node[i])) {\n const resolved = ctx.resolve(node[i]);\n if (resolved.node?.[internalFlagProperty]) {\n // First, remove the reference in the discriminator mapping, if it exists:\n if ((0, utils_1.isPlainObject)(parent.discriminator?.mapping)) {\n for (const mapping in parent.discriminator.mapping) {\n if (originalMapping?.[mapping] === node[i].$ref) {\n delete parent.discriminator.mapping[mapping];\n }\n }\n }\n node.splice(i, 1);\n didDelete = true;\n i--;\n }\n }\n if (node[i]?.[internalFlagProperty]) {\n node.splice(i, 1);\n didDelete = true;\n i--;\n }\n }\n }\n else if ((0, utils_1.isPlainObject)(node)) {\n for (const key of Object.keys(node)) {\n if ((0, ref_utils_1.isRef)(node[key])) {\n const resolved = ctx.resolve(node[key]);\n if ((0, utils_1.isPlainObject)(resolved.node) && resolved.node?.[internalFlagProperty]) {\n delete node[key];\n didDelete = true;\n }\n }\n if ((0, utils_1.isPlainObject)(node[key]) && node[key]?.[internalFlagProperty]) {\n delete node[key];\n didDelete = true;\n }\n }\n }\n if (didDelete && ((0, utils_1.isEmptyObject)(node) || (0, utils_1.isEmptyArray)(node))) {\n delete parent[key];\n }\n }\n let originalMapping = {};\n return {\n DiscriminatorMapping: {\n enter: (mapping) => {\n originalMapping = JSON.parse(JSON.stringify(mapping));\n },\n },\n any: {\n enter: (node, ctx) => {\n removeInternal(node, ctx, originalMapping);\n },\n },\n };\n};\nexports.RemoveXInternal = RemoveXInternal;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TagDescriptionOverride = void 0;\nconst utils_1 = require(\"../../utils\");\nconst TagDescriptionOverride = ({ tagNames }) => {\n return {\n Tag: {\n leave(tag, { report }) {\n if (!tagNames)\n throw new Error(`Parameter \"tagNames\" is not provided for \"tag-description-override\" rule`);\n if (tagNames[tag.name]) {\n try {\n tag.description = (0, utils_1.readFileAsStringSync)(tagNames[tag.name]);\n }\n catch (e) {\n report({\n message: `Failed to read markdown override file for tag \"${tag.name}\".\\n${e.message}`,\n });\n }\n }\n },\n },\n };\n};\nexports.TagDescriptionOverride = TagDescriptionOverride;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decorators = void 0;\nconst registry_dependencies_1 = require(\"../common/registry-dependencies\");\nconst operation_description_override_1 = require(\"../common/operation-description-override\");\nconst tag_description_override_1 = require(\"../common/tag-description-override\");\nconst info_description_override_1 = require(\"../common/info-description-override\");\nconst info_override_1 = require(\"../common/info-override\");\nconst remove_x_internal_1 = require(\"../common/remove-x-internal\");\nconst filter_in_1 = require(\"../common/filters/filter-in\");\nconst filter_out_1 = require(\"../common/filters/filter-out\");\nexports.decorators = {\n 'registry-dependencies': registry_dependencies_1.RegistryDependencies,\n 'operation-description-override': operation_description_override_1.OperationDescriptionOverride,\n 'tag-description-override': tag_description_override_1.TagDescriptionOverride,\n 'info-description-override': info_description_override_1.InfoDescriptionOverride,\n 'info-override': info_override_1.InfoOverride,\n 'remove-x-internal': remove_x_internal_1.RemoveXInternal,\n 'filter-in': filter_in_1.FilterIn,\n 'filter-out': filter_out_1.FilterOut,\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RemoveUnusedComponents = void 0;\nconst utils_1 = require(\"../../utils\");\nconst RemoveUnusedComponents = () => {\n const components = new Map();\n function registerComponent(location, componentType, name) {\n components.set(location.absolutePointer, {\n usedIn: components.get(location.absolutePointer)?.usedIn ?? [],\n componentType,\n name,\n });\n }\n function removeUnusedComponents(root, removedPaths) {\n const removedLengthStart = removedPaths.length;\n for (const [path, { usedIn, name, componentType }] of components) {\n const used = usedIn.some((location) => !removedPaths.some((removed) => \n // Check if the current location's absolute pointer starts with the 'removed' path\n // and either its length matches exactly with 'removed' or the character after the 'removed' path is a '/'\n location.absolutePointer.startsWith(removed) &&\n (location.absolutePointer.length === removed.length ||\n location.absolutePointer[removed.length] === '/')));\n if (!used && componentType) {\n removedPaths.push(path);\n delete root[componentType][name];\n components.delete(path);\n if ((0, utils_1.isEmptyObject)(root[componentType])) {\n delete root[componentType];\n }\n }\n }\n return removedPaths.length > removedLengthStart\n ? removeUnusedComponents(root, removedPaths)\n : removedPaths.length;\n }\n return {\n ref: {\n leave(ref, { location, type, resolve, key }) {\n if (['Schema', 'Parameter', 'Response', 'SecurityScheme'].includes(type.name)) {\n const resolvedRef = resolve(ref);\n if (!resolvedRef.location)\n return;\n const [fileLocation, localPointer] = resolvedRef.location.absolutePointer.split('#', 2);\n const componentLevelLocalPointer = localPointer.split('/').slice(0, 3).join('/');\n const pointer = `${fileLocation}#${componentLevelLocalPointer}`;\n const registered = components.get(pointer);\n if (registered) {\n registered.usedIn.push(location);\n }\n else {\n components.set(pointer, {\n usedIn: [location],\n name: key.toString(),\n });\n }\n }\n },\n },\n Root: {\n leave(root, ctx) {\n const data = ctx.getVisitorData();\n data.removedCount = removeUnusedComponents(root, []);\n },\n },\n NamedSchemas: {\n Schema(schema, { location, key }) {\n if (!schema.allOf) {\n registerComponent(location, 'definitions', key.toString());\n }\n },\n },\n NamedParameters: {\n Parameter(_parameter, { location, key }) {\n registerComponent(location, 'parameters', key.toString());\n },\n },\n NamedResponses: {\n Response(_response, { location, key }) {\n registerComponent(location, 'responses', key.toString());\n },\n },\n NamedSecuritySchemes: {\n SecurityScheme(_securityScheme, { location, key }) {\n registerComponent(location, 'securityDefinitions', key.toString());\n },\n },\n };\n};\nexports.RemoveUnusedComponents = RemoveUnusedComponents;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decorators = void 0;\nconst registry_dependencies_1 = require(\"../common/registry-dependencies\");\nconst operation_description_override_1 = require(\"../common/operation-description-override\");\nconst tag_description_override_1 = require(\"../common/tag-description-override\");\nconst info_description_override_1 = require(\"../common/info-description-override\");\nconst info_override_1 = require(\"../common/info-override\");\nconst remove_x_internal_1 = require(\"../common/remove-x-internal\");\nconst filter_in_1 = require(\"../common/filters/filter-in\");\nconst filter_out_1 = require(\"../common/filters/filter-out\");\nconst media_type_examples_override_1 = require(\"../common/media-type-examples-override\");\nexports.decorators = {\n 'registry-dependencies': registry_dependencies_1.RegistryDependencies,\n 'operation-description-override': operation_description_override_1.OperationDescriptionOverride,\n 'tag-description-override': tag_description_override_1.TagDescriptionOverride,\n 'info-description-override': info_description_override_1.InfoDescriptionOverride,\n 'info-override': info_override_1.InfoOverride,\n 'remove-x-internal': remove_x_internal_1.RemoveXInternal,\n 'filter-in': filter_in_1.FilterIn,\n 'filter-out': filter_out_1.FilterOut,\n 'media-type-examples-override': media_type_examples_override_1.MediaTypeExamplesOverride,\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RemoveUnusedComponents = void 0;\nconst utils_1 = require(\"../../utils\");\nconst RemoveUnusedComponents = () => {\n const components = new Map();\n function registerComponent(location, componentType, name) {\n components.set(location.absolutePointer, {\n usedIn: components.get(location.absolutePointer)?.usedIn ?? [],\n componentType,\n name,\n });\n }\n function removeUnusedComponents(root, removedPaths) {\n const removedLengthStart = removedPaths.length;\n for (const [path, { usedIn, name, componentType }] of components) {\n const used = usedIn.some((location) => !removedPaths.some((removed) => location.absolutePointer.startsWith(removed) &&\n (location.absolutePointer.length === removed.length ||\n location.absolutePointer[removed.length] === '/')));\n if (!used && componentType && root.components) {\n removedPaths.push(path);\n const componentChild = root.components[componentType];\n delete componentChild[name];\n components.delete(path);\n if ((0, utils_1.isEmptyObject)(componentChild)) {\n delete root.components[componentType];\n }\n }\n }\n return removedPaths.length > removedLengthStart\n ? removeUnusedComponents(root, removedPaths)\n : removedPaths.length;\n }\n return {\n ref: {\n leave(ref, { location, type, resolve, key }) {\n if (['Schema', 'Header', 'Parameter', 'Response', 'Example', 'RequestBody'].includes(type.name)) {\n const resolvedRef = resolve(ref);\n if (!resolvedRef.location)\n return;\n const [fileLocation, localPointer] = resolvedRef.location.absolutePointer.split('#', 2);\n const componentLevelLocalPointer = localPointer.split('/').slice(0, 4).join('/');\n const pointer = `${fileLocation}#${componentLevelLocalPointer}`;\n const registered = components.get(pointer);\n if (registered) {\n registered.usedIn.push(location);\n }\n else {\n components.set(pointer, {\n usedIn: [location],\n name: key.toString(),\n });\n }\n }\n },\n },\n Root: {\n leave(root, ctx) {\n const data = ctx.getVisitorData();\n data.removedCount = removeUnusedComponents(root, []);\n if ((0, utils_1.isEmptyObject)(root.components)) {\n delete root.components;\n }\n },\n },\n NamedSchemas: {\n Schema(schema, { location, key }) {\n if (!schema.allOf) {\n registerComponent(location, 'schemas', key.toString());\n }\n },\n },\n NamedParameters: {\n Parameter(_parameter, { location, key }) {\n registerComponent(location, 'parameters', key.toString());\n },\n },\n NamedResponses: {\n Response(_response, { location, key }) {\n registerComponent(location, 'responses', key.toString());\n },\n },\n NamedExamples: {\n Example(_example, { location, key }) {\n registerComponent(location, 'examples', key.toString());\n },\n },\n NamedRequestBodies: {\n RequestBody(_requestBody, { location, key }) {\n registerComponent(location, 'requestBodies', key.toString());\n },\n },\n NamedHeaders: {\n Header(_header, { location, key }) {\n registerComponent(location, 'headers', key.toString());\n },\n },\n };\n};\nexports.RemoveUnusedComponents = RemoveUnusedComponents;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decorators = void 0;\nexports.decorators = {};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.env = exports.isBrowser = void 0;\nexports.isBrowser = typeof window !== 'undefined' ||\n typeof process === 'undefined' ||\n process?.platform === 'browser'; // main and worker thread\nexports.env = exports.isBrowser ? {} : process.env || {};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getCodeframe = getCodeframe;\nexports.getLineColLocation = getLineColLocation;\nexports.getAstNodeByPointer = getAstNodeByPointer;\nconst yamlAst = require(\"yaml-ast-parser\");\nconst ref_utils_1 = require(\"../ref-utils\");\nconst logger_1 = require(\"../logger\");\nconst MAX_LINE_LENGTH = 150;\nconst MAX_CODEFRAME_LINES = 3;\n// TODO: temporary\nfunction parsePointer(pointer) {\n return pointer.substr(2).split('/').map(ref_utils_1.unescapePointer);\n}\nfunction getCodeframe(location, color) {\n logger_1.colorOptions.enabled = color;\n const { start, end = { line: start.line, col: start.col + 1 }, source } = location;\n const lines = source.getLines();\n const startLineNum = start.line;\n const endLineNum = Math.max(Math.min(end.line, lines.length), start.line);\n let skipLines = Math.max(endLineNum - startLineNum - MAX_CODEFRAME_LINES + 1, 0);\n if (skipLines < 2)\n skipLines = 0; // do not skip one line\n // Lines specified like this: [\"prefix\", \"string\"],\n const prefixedLines = [];\n let currentPad = 0;\n for (let i = startLineNum; i <= endLineNum; i++) {\n if (skipLines > 0 && i >= endLineNum - skipLines)\n break;\n const line = lines[i - 1] || '';\n if (line !== '')\n currentPad = padSize(line);\n const startIdx = i === startLineNum ? start.col - 1 : currentPad;\n const endIdx = i === endLineNum ? end.col - 1 : line.length;\n prefixedLines.push([`${i}`, markLine(line, startIdx, endIdx, logger_1.colorize.red)]);\n if (!color)\n prefixedLines.push(['', underlineLine(line, startIdx, endIdx)]);\n }\n if (skipLines > 0) {\n prefixedLines.push([\n `…`,\n `${whitespace(currentPad)}${logger_1.colorize.gray(`< ${skipLines} more lines >`)}`,\n ]);\n // print last line\n prefixedLines.push([\n `${endLineNum}`,\n markLine(lines[endLineNum - 1], -1, end.col - 1, logger_1.colorize.red),\n ]);\n if (!color)\n prefixedLines.push(['', underlineLine(lines[endLineNum - 1], -1, end.col - 1)]);\n }\n return printPrefixedLines([\n [`${startLineNum - 2}`, markLine(lines[startLineNum - 1 - 2])],\n [`${startLineNum - 1}`, markLine(lines[startLineNum - 1 - 1])],\n ...prefixedLines,\n [`${endLineNum + 1}`, markLine(lines[endLineNum - 1 + 1])],\n [`${endLineNum + 2}`, markLine(lines[endLineNum - 1 + 2])],\n ]);\n function markLine(line, startIdx = -1, endIdx = +Infinity, variant = logger_1.colorize.gray) {\n if (!color)\n return line;\n if (!line)\n return line;\n if (startIdx === -1) {\n startIdx = padSize(line);\n }\n endIdx = Math.min(endIdx, line.length);\n return (line.substr(0, startIdx) + variant(line.substring(startIdx, endIdx)) + line.substr(endIdx));\n }\n}\nfunction printPrefixedLines(lines) {\n const existingLines = lines.filter(([_, line]) => line !== undefined);\n const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));\n const dedentLen = Math.min(...existingLines.map(([_, line]) => (line === '' ? Infinity : padSize(line))));\n return existingLines\n .map(([prefix, line]) => logger_1.colorize.gray(leftPad(padLen, prefix) + ' |') +\n (line ? ' ' + limitLineLength(line.substring(dedentLen)) : ''))\n .join('\\n');\n}\nfunction limitLineLength(line, maxLen = MAX_LINE_LENGTH) {\n const overflowLen = line.length - maxLen;\n if (overflowLen > 0) {\n const charsMoreText = logger_1.colorize.gray(`...<${overflowLen} chars>`);\n return line.substring(0, maxLen - charsMoreText.length) + charsMoreText;\n }\n else {\n return line;\n }\n}\nfunction underlineLine(line, startIdx = -1, endIdx = +Infinity) {\n if (startIdx === -1) {\n startIdx = padSize(line);\n }\n endIdx = Math.min(endIdx, line.length);\n return whitespace(startIdx) + '^'.repeat(Math.max(endIdx - startIdx, 1));\n}\nfunction whitespace(len) {\n return ' '.repeat(len);\n}\nfunction leftPad(len, str) {\n return whitespace(len - str.length) + str;\n}\nfunction padSize(line) {\n for (let i = 0; i < line.length; i++) {\n if (line[i] !== ' ')\n return i;\n }\n return line.length;\n}\nfunction getLineColLocation(location) {\n if (location.pointer === undefined)\n return location;\n const { source, pointer, reportOnKey } = location;\n const ast = source.getAst(yamlAst.safeLoad);\n const astNode = getAstNodeByPointer(ast, pointer, !!reportOnKey);\n return {\n ...location,\n pointer: undefined,\n ...positionsToLoc(source.body, astNode?.startPosition ?? 1, astNode?.endPosition ?? 1),\n };\n}\nfunction positionsToLoc(source, startPos, endPos) {\n let currentLine = 1;\n let currentCol = 1;\n let start = { line: 1, col: 1 };\n for (let i = 0; i < endPos - 1; i++) {\n if (i === startPos - 1) {\n start = { line: currentLine, col: currentCol + 1 };\n }\n if (source[i] === '\\n') {\n currentLine++;\n currentCol = 1;\n if (i === startPos - 1) {\n start = { line: currentLine, col: currentCol };\n }\n if (source[i + 1] === '\\r')\n i++; // TODO: test it\n continue;\n }\n currentCol++;\n }\n const end = startPos === endPos ? { ...start } : { line: currentLine, col: currentCol + 1 };\n return { start, end };\n}\nfunction getAstNodeByPointer(root, pointer, reportOnKey) {\n const pointerSegments = parsePointer(pointer);\n if (root === undefined) {\n return undefined;\n }\n let currentNode = root;\n for (const key of pointerSegments) {\n if (currentNode.kind === yamlAst.Kind.MAP) {\n const mapping = currentNode.mappings.find((m) => m.key.value === key);\n if (!mapping)\n break;\n currentNode = mapping;\n if (!mapping?.value)\n break; // If node has value - return value, if not - return node itself\n currentNode = mapping.value;\n }\n else if (currentNode.kind === yamlAst.Kind.SEQ) {\n const elem = currentNode.items[parseInt(key, 10)];\n if (!elem)\n break;\n currentNode = elem;\n }\n }\n if (!reportOnKey) {\n return currentNode;\n }\n else {\n const parent = currentNode.parent;\n if (!parent)\n return currentNode;\n if (parent.kind === yamlAst.Kind.SEQ) {\n return currentNode;\n }\n else if (parent.kind === yamlAst.Kind.MAPPING) {\n return parent.key;\n }\n else {\n return currentNode;\n }\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getTotals = getTotals;\nexports.formatProblems = formatProblems;\nconst path = require(\"path\");\nconst logger_1 = require(\"../logger\");\nconst output_1 = require(\"../output\");\nconst codeframes_1 = require(\"./codeframes\");\nconst env_1 = require(\"../env\");\nconst ref_utils_1 = require(\"../ref-utils\");\nconst coreVersion = require('../../package.json').version;\nconst ERROR_MESSAGE = {\n INVALID_SEVERITY_LEVEL: 'Invalid severity level; accepted values: error or warn',\n};\nconst BG_COLORS = {\n warn: (str) => logger_1.colorize.bgYellow(logger_1.colorize.black(str)),\n error: logger_1.colorize.bgRed,\n};\nconst COLORS = {\n warn: logger_1.colorize.yellow,\n error: logger_1.colorize.red,\n};\nconst SEVERITY_NAMES = {\n warn: 'Warning',\n error: 'Error',\n};\nconst CODECLIMATE_SEVERITY_MAPPING = {\n error: 'critical',\n warn: 'minor',\n};\nconst MAX_SUGGEST = 5;\nfunction severityToNumber(severity) {\n return severity === 'error' ? 1 : 2;\n}\nfunction getTotals(problems) {\n let errors = 0;\n let warnings = 0;\n let ignored = 0;\n for (const m of problems) {\n if (m.ignored) {\n ignored++;\n continue;\n }\n if (m.severity === 'error')\n errors++;\n if (m.severity === 'warn')\n warnings++;\n }\n return {\n errors,\n warnings,\n ignored,\n };\n}\nfunction formatProblems(problems, opts) {\n const { maxProblems = 100, cwd = env_1.isBrowser ? '' : process.cwd(), format = 'codeframe', color = logger_1.colorOptions.enabled, totals = getTotals(problems), version = coreVersion, } = opts;\n logger_1.colorOptions.enabled = color; // force colors if specified\n const totalProblems = problems.length;\n problems = problems.filter((m) => !m.ignored);\n const ignoredProblems = totalProblems - problems.length;\n problems = problems\n .sort((a, b) => severityToNumber(a.severity) - severityToNumber(b.severity))\n .slice(0, maxProblems);\n if (!totalProblems && format !== 'json')\n return;\n switch (format) {\n case 'json':\n outputJSON();\n break;\n case 'codeframe':\n for (let i = 0; i < problems.length; i++) {\n const problem = problems[i];\n logger_1.logger.info(`${formatCodeframe(problem, i)}\\n`);\n }\n break;\n case 'stylish': {\n const groupedByFile = groupByFiles(problems);\n for (const [file, { ruleIdPad, locationPad: positionPad, fileProblems }] of Object.entries(groupedByFile)) {\n logger_1.logger.info(`${logger_1.colorize.blue((0, ref_utils_1.isAbsoluteUrl)(file) ? file : path.relative(cwd, file))}:\\n`);\n for (let i = 0; i < fileProblems.length; i++) {\n const problem = fileProblems[i];\n logger_1.logger.info(`${formatStylish(problem, positionPad, ruleIdPad)}\\n`);\n }\n logger_1.logger.info('\\n');\n }\n break;\n }\n case 'markdown': {\n const groupedByFile = groupByFiles(problems);\n for (const [file, { fileProblems }] of Object.entries(groupedByFile)) {\n output_1.output.write(`## Lint: ${(0, ref_utils_1.isAbsoluteUrl)(file) ? file : path.relative(cwd, file)}\\n\\n`);\n output_1.output.write(`| Severity | Location | Problem | Message |\\n`);\n output_1.output.write(`|---|---|---|---|\\n`);\n for (let i = 0; i < fileProblems.length; i++) {\n const problem = fileProblems[i];\n output_1.output.write(`${formatMarkdown(problem)}\\n`);\n }\n output_1.output.write('\\n');\n if (totals.errors > 0) {\n output_1.output.write(`Validation failed\\nErrors: ${totals.errors}\\n`);\n }\n else {\n output_1.output.write('Validation successful\\n');\n }\n if (totals.warnings > 0) {\n output_1.output.write(`Warnings: ${totals.warnings}\\n`);\n }\n output_1.output.write('\\n');\n }\n break;\n }\n case 'checkstyle': {\n const groupedByFile = groupByFiles(problems);\n output_1.output.write('\\n');\n output_1.output.write('\\n');\n for (const [file, { fileProblems }] of Object.entries(groupedByFile)) {\n output_1.output.write(`\\n`);\n fileProblems.forEach(formatCheckstyle);\n output_1.output.write(`\\n`);\n }\n output_1.output.write(`\\n`);\n break;\n }\n case 'codeclimate':\n outputForCodeClimate();\n break;\n case 'summary':\n formatSummary(problems);\n break;\n case 'github-actions':\n outputForGithubActions(problems, cwd);\n }\n if (totalProblems - ignoredProblems > maxProblems) {\n logger_1.logger.info(`< ... ${totalProblems - maxProblems} more problems hidden > ${logger_1.colorize.gray('increase with `--max-problems N`')}\\n`);\n }\n function outputForCodeClimate() {\n const issues = problems.map((p) => {\n const location = p.location[0]; // TODO: support multiple location\n const lineCol = (0, codeframes_1.getLineColLocation)(location);\n return {\n description: p.message,\n location: {\n path: (0, ref_utils_1.isAbsoluteUrl)(location.source.absoluteRef)\n ? location.source.absoluteRef\n : path.relative(cwd, location.source.absoluteRef),\n lines: {\n begin: lineCol.start.line,\n },\n },\n severity: CODECLIMATE_SEVERITY_MAPPING[p.severity],\n fingerprint: `${p.ruleId}${p.location.length > 0 ? '-' + p.location[0].pointer : ''}`,\n };\n });\n output_1.output.write(JSON.stringify(issues, null, 2));\n }\n function outputJSON() {\n const resultObject = {\n totals,\n version,\n problems: problems.map((p) => {\n const problem = {\n ...p,\n location: p.location.map((location) => ({\n ...location,\n source: {\n ref: (0, ref_utils_1.isAbsoluteUrl)(location.source.absoluteRef)\n ? location.source.absoluteRef\n : path.relative(cwd, location.source.absoluteRef),\n },\n })),\n from: p.from\n ? {\n ...p.from,\n source: {\n ref: (0, ref_utils_1.isAbsoluteUrl)(p.from?.source.absoluteRef)\n ? p.from?.source.absoluteRef\n : path.relative(cwd, p.from?.source.absoluteRef || cwd),\n },\n }\n : undefined,\n };\n if (env_1.env.FORMAT_JSON_WITH_CODEFRAMES) {\n const location = p.location[0]; // TODO: support multiple locations\n const loc = (0, codeframes_1.getLineColLocation)(location);\n problem.codeframe = (0, codeframes_1.getCodeframe)(loc, color);\n }\n return problem;\n }),\n };\n output_1.output.write(JSON.stringify(resultObject, null, 2));\n }\n function getBgColor(problem) {\n const { severity } = problem;\n if (!BG_COLORS[severity]) {\n throw new Error(ERROR_MESSAGE.INVALID_SEVERITY_LEVEL);\n }\n return BG_COLORS[severity];\n }\n function formatCodeframe(problem, idx) {\n const bgColor = getBgColor(problem);\n const location = problem.location[0]; // TODO: support multiple locations\n const relativePath = (0, ref_utils_1.isAbsoluteUrl)(location.source.absoluteRef)\n ? location.source.absoluteRef\n : path.relative(cwd, location.source.absoluteRef);\n const loc = (0, codeframes_1.getLineColLocation)(location);\n const atPointer = location.pointer ? logger_1.colorize.gray(`at ${location.pointer}`) : '';\n const fileWithLoc = `${relativePath}:${loc.start.line}:${loc.start.col}`;\n return (`[${idx + 1}] ${bgColor(fileWithLoc)} ${atPointer}\\n\\n` +\n `${problem.message}\\n\\n` +\n formatDidYouMean(problem) +\n (0, codeframes_1.getCodeframe)(loc, color) +\n '\\n\\n' +\n formatFrom(cwd, problem.from) +\n `${SEVERITY_NAMES[problem.severity]} was generated by the ${logger_1.colorize.blue(problem.ruleId)} rule.\\n\\n`);\n }\n function formatStylish(problem, locationPad, ruleIdPad) {\n const color = COLORS[problem.severity];\n if (!SEVERITY_NAMES[problem.severity]) {\n return 'Error not found severity. Please check your config file. Allowed values: `warn,error,off`';\n }\n const severityName = color(SEVERITY_NAMES[problem.severity].toLowerCase().padEnd(7));\n const { start } = problem.location[0];\n return ` ${`${start.line}:${start.col}`.padEnd(locationPad)} ${severityName} ${problem.ruleId.padEnd(ruleIdPad)} ${problem.message}`;\n }\n function formatMarkdown(problem) {\n if (!SEVERITY_NAMES[problem.severity]) {\n return 'Error not found severity. Please check your config file. Allowed values: `warn,error,off`';\n }\n const severityName = SEVERITY_NAMES[problem.severity].toLowerCase();\n const { start } = problem.location[0];\n return `| ${severityName} | line ${`${start.line}:${start.col}`} | [${problem.ruleId}](https://redocly.com/docs/cli/rules/${problem.ruleId}/) | ${problem.message} |`;\n }\n function formatCheckstyle(problem) {\n const { line, col } = problem.location[0].start;\n const severity = problem.severity == 'warn' ? 'warning' : 'error';\n const message = xmlEscape(problem.message);\n const source = xmlEscape(problem.ruleId);\n output_1.output.write(`\\n`);\n }\n}\nfunction formatSummary(problems) {\n const counts = {};\n for (const problem of problems) {\n counts[problem.ruleId] = counts[problem.ruleId] || { count: 0, severity: problem.severity };\n counts[problem.ruleId].count++;\n }\n const sorted = Object.entries(counts).sort(([, a], [, b]) => {\n const severityDiff = severityToNumber(a.severity) - severityToNumber(b.severity);\n return severityDiff || b.count - a.count;\n });\n for (const [ruleId, info] of sorted) {\n const color = COLORS[info.severity];\n const severityName = color(SEVERITY_NAMES[info.severity].toLowerCase().padEnd(7));\n logger_1.logger.info(`${severityName} ${ruleId}: ${info.count}\\n`);\n }\n logger_1.logger.info('\\n');\n}\nfunction formatFrom(cwd, location) {\n if (!location)\n return '';\n const relativePath = path.relative(cwd, location.source.absoluteRef);\n const loc = (0, codeframes_1.getLineColLocation)(location);\n const fileWithLoc = `${relativePath}:${loc.start.line}:${loc.start.col}`;\n const atPointer = location.pointer ? logger_1.colorize.gray(`at ${location.pointer}`) : '';\n return `referenced from ${logger_1.colorize.blue(fileWithLoc)} ${atPointer} \\n\\n`;\n}\nfunction formatDidYouMean(problem) {\n if (problem.suggest.length === 0)\n return '';\n if (problem.suggest.length === 1) {\n return `Did you mean: ${problem.suggest[0]} ?\\n\\n`;\n }\n else {\n return `Did you mean:\\n - ${problem.suggest.slice(0, MAX_SUGGEST).join('\\n - ')}\\n\\n`;\n }\n}\nconst groupByFiles = (problems) => {\n const fileGroups = {};\n for (const problem of problems) {\n const absoluteRef = problem.location[0].source.absoluteRef; // TODO: multiple errors\n fileGroups[absoluteRef] = fileGroups[absoluteRef] || {\n fileProblems: [],\n ruleIdPad: 0,\n locationPad: 0,\n };\n const mappedProblem = { ...problem, location: problem.location.map(codeframes_1.getLineColLocation) };\n fileGroups[absoluteRef].fileProblems.push(mappedProblem);\n fileGroups[absoluteRef].ruleIdPad = Math.max(problem.ruleId.length, fileGroups[absoluteRef].ruleIdPad);\n fileGroups[absoluteRef].locationPad = Math.max(Math.max(...mappedProblem.location.map((loc) => `${loc.start.line}:${loc.start.col}`.length)), fileGroups[absoluteRef].locationPad);\n }\n return fileGroups;\n};\nfunction xmlEscape(s) {\n // eslint-disable-next-line no-control-regex\n return s.replace(/[<>&\"'\\x00-\\x1F\\x7F\\u0080-\\uFFFF]/gu, (char) => {\n switch (char) {\n case '<':\n return '<';\n case '>':\n return '>';\n case '&':\n return '&';\n case '\"':\n return '"';\n case \"'\":\n return ''';\n default:\n return `&#${char.charCodeAt(0)};`;\n }\n });\n}\nfunction outputForGithubActions(problems, cwd) {\n for (const problem of problems) {\n for (const location of problem.location.map(codeframes_1.getLineColLocation)) {\n let command;\n switch (problem.severity) {\n case 'error':\n command = 'error';\n break;\n case 'warn':\n command = 'warning';\n break;\n }\n const suggest = formatDidYouMean(problem);\n const message = suggest !== '' ? problem.message + '\\n\\n' + suggest : problem.message;\n const properties = {\n title: problem.ruleId,\n file: (0, ref_utils_1.isAbsoluteUrl)(location.source.absoluteRef)\n ? location.source.absoluteRef\n : path.relative(cwd, location.source.absoluteRef),\n line: location.start.line,\n col: location.start.col,\n endLine: location.end?.line,\n endColumn: location.end?.col,\n };\n output_1.output.write(`::${command} ${formatProperties(properties)}::${escapeMessage(message)}\\n`);\n }\n }\n function formatProperties(props) {\n return Object.entries(props)\n .filter(([, v]) => v !== null && v !== undefined)\n .map(([k, v]) => `${k}=${escapeProperty(v)}`)\n .join(',');\n }\n function toString(v) {\n if (v === null || v === undefined) {\n return '';\n }\n else if (typeof v === 'string' || v instanceof String) {\n return v;\n }\n return JSON.stringify(v);\n }\n function escapeMessage(v) {\n return toString(v).replace(/%/g, '%25').replace(/\\r/g, '%0D').replace(/\\n/g, '%0A');\n }\n function escapeProperty(v) {\n return toString(v)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n }\n}\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validate = exports.lint = exports.getTotals = exports.formatProblems = exports.getLineColLocation = exports.getAstNodeByPointer = exports.walkDocument = exports.normalizeVisitors = exports.getTypes = exports.detectSpec = exports.SpecVersion = exports.getMajorSpecVersion = exports.SpecMajorVersion = exports.isAbsoluteUrl = exports.isRef = exports.unescapePointer = exports.stringifyYaml = exports.parseYaml = exports.makeDocumentFromString = exports.YamlParseError = exports.ResolveError = exports.resolveDocument = exports.BaseResolver = exports.Source = exports.RedoclyClient = exports.createConfig = exports.CONFIG_FILE_NAMES = exports.findConfig = exports.getConfig = exports.loadConfig = exports.transformConfig = exports.getMergedConfig = exports.IGNORE_FILE = exports.StyleguideConfig = exports.Config = exports.Stats = exports.normalizeTypes = exports.ConfigTypes = exports.AsyncApi3Types = exports.AsyncApi2Types = exports.Oas2Types = exports.Oas3Types = exports.Arazzo1Types = exports.Oas3_1Types = exports.pause = exports.getProxyAgent = exports.isTruthy = exports.doesYamlFileExist = exports.slash = exports.readFileFromUrl = void 0;\nexports.bundleFromString = exports.mapTypeToComponent = exports.bundleDocument = exports.bundle = exports.lintConfig = exports.lintFromString = exports.lintDocument = void 0;\nvar utils_1 = require(\"./utils\");\nObject.defineProperty(exports, \"readFileFromUrl\", { enumerable: true, get: function () { return utils_1.readFileFromUrl; } });\nObject.defineProperty(exports, \"slash\", { enumerable: true, get: function () { return utils_1.slash; } });\nObject.defineProperty(exports, \"doesYamlFileExist\", { enumerable: true, get: function () { return utils_1.doesYamlFileExist; } });\nObject.defineProperty(exports, \"isTruthy\", { enumerable: true, get: function () { return utils_1.isTruthy; } });\nObject.defineProperty(exports, \"getProxyAgent\", { enumerable: true, get: function () { return utils_1.getProxyAgent; } });\nObject.defineProperty(exports, \"pause\", { enumerable: true, get: function () { return utils_1.pause; } });\nvar oas3_1_1 = require(\"./types/oas3_1\");\nObject.defineProperty(exports, \"Oas3_1Types\", { enumerable: true, get: function () { return oas3_1_1.Oas3_1Types; } });\nvar arazzo_1 = require(\"./types/arazzo\");\nObject.defineProperty(exports, \"Arazzo1Types\", { enumerable: true, get: function () { return arazzo_1.Arazzo1Types; } });\nvar oas3_1 = require(\"./types/oas3\");\nObject.defineProperty(exports, \"Oas3Types\", { enumerable: true, get: function () { return oas3_1.Oas3Types; } });\nvar oas2_1 = require(\"./types/oas2\");\nObject.defineProperty(exports, \"Oas2Types\", { enumerable: true, get: function () { return oas2_1.Oas2Types; } });\nvar asyncapi2_1 = require(\"./types/asyncapi2\");\nObject.defineProperty(exports, \"AsyncApi2Types\", { enumerable: true, get: function () { return asyncapi2_1.AsyncApi2Types; } });\nvar asyncapi3_1 = require(\"./types/asyncapi3\");\nObject.defineProperty(exports, \"AsyncApi3Types\", { enumerable: true, get: function () { return asyncapi3_1.AsyncApi3Types; } });\nvar redocly_yaml_1 = require(\"./types/redocly-yaml\");\nObject.defineProperty(exports, \"ConfigTypes\", { enumerable: true, get: function () { return redocly_yaml_1.ConfigTypes; } });\nvar types_1 = require(\"./types\");\nObject.defineProperty(exports, \"normalizeTypes\", { enumerable: true, get: function () { return types_1.normalizeTypes; } });\nvar stats_1 = require(\"./rules/other/stats\");\nObject.defineProperty(exports, \"Stats\", { enumerable: true, get: function () { return stats_1.Stats; } });\nvar config_1 = require(\"./config\");\nObject.defineProperty(exports, \"Config\", { enumerable: true, get: function () { return config_1.Config; } });\nObject.defineProperty(exports, \"StyleguideConfig\", { enumerable: true, get: function () { return config_1.StyleguideConfig; } });\nObject.defineProperty(exports, \"IGNORE_FILE\", { enumerable: true, get: function () { return config_1.IGNORE_FILE; } });\nObject.defineProperty(exports, \"getMergedConfig\", { enumerable: true, get: function () { return config_1.getMergedConfig; } });\nObject.defineProperty(exports, \"transformConfig\", { enumerable: true, get: function () { return config_1.transformConfig; } });\nObject.defineProperty(exports, \"loadConfig\", { enumerable: true, get: function () { return config_1.loadConfig; } });\nObject.defineProperty(exports, \"getConfig\", { enumerable: true, get: function () { return config_1.getConfig; } });\nObject.defineProperty(exports, \"findConfig\", { enumerable: true, get: function () { return config_1.findConfig; } });\nObject.defineProperty(exports, \"CONFIG_FILE_NAMES\", { enumerable: true, get: function () { return config_1.CONFIG_FILE_NAMES; } });\nObject.defineProperty(exports, \"createConfig\", { enumerable: true, get: function () { return config_1.createConfig; } });\nvar redocly_1 = require(\"./redocly\");\nObject.defineProperty(exports, \"RedoclyClient\", { enumerable: true, get: function () { return redocly_1.RedoclyClient; } });\n__exportStar(require(\"./redocly/domains\"), exports);\nvar resolve_1 = require(\"./resolve\");\nObject.defineProperty(exports, \"Source\", { enumerable: true, get: function () { return resolve_1.Source; } });\nObject.defineProperty(exports, \"BaseResolver\", { enumerable: true, get: function () { return resolve_1.BaseResolver; } });\nObject.defineProperty(exports, \"resolveDocument\", { enumerable: true, get: function () { return resolve_1.resolveDocument; } });\nObject.defineProperty(exports, \"ResolveError\", { enumerable: true, get: function () { return resolve_1.ResolveError; } });\nObject.defineProperty(exports, \"YamlParseError\", { enumerable: true, get: function () { return resolve_1.YamlParseError; } });\nObject.defineProperty(exports, \"makeDocumentFromString\", { enumerable: true, get: function () { return resolve_1.makeDocumentFromString; } });\nvar js_yaml_1 = require(\"./js-yaml\");\nObject.defineProperty(exports, \"parseYaml\", { enumerable: true, get: function () { return js_yaml_1.parseYaml; } });\nObject.defineProperty(exports, \"stringifyYaml\", { enumerable: true, get: function () { return js_yaml_1.stringifyYaml; } });\nvar ref_utils_1 = require(\"./ref-utils\");\nObject.defineProperty(exports, \"unescapePointer\", { enumerable: true, get: function () { return ref_utils_1.unescapePointer; } });\nObject.defineProperty(exports, \"isRef\", { enumerable: true, get: function () { return ref_utils_1.isRef; } });\nObject.defineProperty(exports, \"isAbsoluteUrl\", { enumerable: true, get: function () { return ref_utils_1.isAbsoluteUrl; } });\nvar oas_types_1 = require(\"./oas-types\");\nObject.defineProperty(exports, \"SpecMajorVersion\", { enumerable: true, get: function () { return oas_types_1.SpecMajorVersion; } });\nObject.defineProperty(exports, \"getMajorSpecVersion\", { enumerable: true, get: function () { return oas_types_1.getMajorSpecVersion; } });\nObject.defineProperty(exports, \"SpecVersion\", { enumerable: true, get: function () { return oas_types_1.SpecVersion; } });\nObject.defineProperty(exports, \"detectSpec\", { enumerable: true, get: function () { return oas_types_1.detectSpec; } });\nObject.defineProperty(exports, \"getTypes\", { enumerable: true, get: function () { return oas_types_1.getTypes; } });\nvar visitors_1 = require(\"./visitors\");\nObject.defineProperty(exports, \"normalizeVisitors\", { enumerable: true, get: function () { return visitors_1.normalizeVisitors; } });\nvar walk_1 = require(\"./walk\");\nObject.defineProperty(exports, \"walkDocument\", { enumerable: true, get: function () { return walk_1.walkDocument; } });\nvar codeframes_1 = require(\"./format/codeframes\");\nObject.defineProperty(exports, \"getAstNodeByPointer\", { enumerable: true, get: function () { return codeframes_1.getAstNodeByPointer; } });\nObject.defineProperty(exports, \"getLineColLocation\", { enumerable: true, get: function () { return codeframes_1.getLineColLocation; } });\nvar format_1 = require(\"./format/format\");\nObject.defineProperty(exports, \"formatProblems\", { enumerable: true, get: function () { return format_1.formatProblems; } });\nObject.defineProperty(exports, \"getTotals\", { enumerable: true, get: function () { return format_1.getTotals; } });\nvar lint_1 = require(\"./lint\");\nObject.defineProperty(exports, \"lint\", { enumerable: true, get: function () { return lint_1.lint; } });\nObject.defineProperty(exports, \"validate\", { enumerable: true, get: function () { return lint_1.lint; } });\nObject.defineProperty(exports, \"lintDocument\", { enumerable: true, get: function () { return lint_1.lintDocument; } });\nObject.defineProperty(exports, \"lintFromString\", { enumerable: true, get: function () { return lint_1.lintFromString; } });\nObject.defineProperty(exports, \"lintConfig\", { enumerable: true, get: function () { return lint_1.lintConfig; } });\nvar bundle_1 = require(\"./bundle\");\nObject.defineProperty(exports, \"bundle\", { enumerable: true, get: function () { return bundle_1.bundle; } });\nObject.defineProperty(exports, \"bundleDocument\", { enumerable: true, get: function () { return bundle_1.bundleDocument; } });\nObject.defineProperty(exports, \"mapTypeToComponent\", { enumerable: true, get: function () { return bundle_1.mapTypeToComponent; } });\nObject.defineProperty(exports, \"bundleFromString\", { enumerable: true, get: function () { return bundle_1.bundleFromString; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.stringifyYaml = exports.parseYaml = void 0;\n// TODO: add a type for \"types\" https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/js-yaml/index.d.ts\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst js_yaml_1 = require(\"js-yaml\");\nconst DEFAULT_SCHEMA_WITHOUT_TIMESTAMP = js_yaml_1.JSON_SCHEMA.extend({\n implicit: [js_yaml_1.types.merge],\n explicit: [js_yaml_1.types.binary, js_yaml_1.types.omap, js_yaml_1.types.pairs, js_yaml_1.types.set],\n});\nconst parseYaml = (str, opts) => (0, js_yaml_1.load)(str, { schema: DEFAULT_SCHEMA_WITHOUT_TIMESTAMP, ...opts });\nexports.parseYaml = parseYaml;\nconst stringifyYaml = (obj, opts) => (0, js_yaml_1.dump)(obj, opts);\nexports.stringifyYaml = stringifyYaml;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lint = lint;\nexports.lintFromString = lintFromString;\nexports.lintDocument = lintDocument;\nexports.lintConfig = lintConfig;\nconst config_1 = require(\"@redocly/config\");\nconst resolve_1 = require(\"./resolve\");\nconst visitors_1 = require(\"./visitors\");\nconst walk_1 = require(\"./walk\");\nconst config_2 = require(\"./config\");\nconst types_1 = require(\"./types\");\nconst ajv_1 = require(\"./rules/ajv\");\nconst oas_types_1 = require(\"./oas-types\");\nconst redocly_yaml_1 = require(\"./types/redocly-yaml\");\nconst struct_1 = require(\"./rules/common/struct\");\nconst no_unresolved_refs_1 = require(\"./rules/no-unresolved-refs\");\nasync function lint(opts) {\n const { ref, externalRefResolver = new resolve_1.BaseResolver(opts.config.resolve) } = opts;\n const document = (await externalRefResolver.resolveDocument(null, ref, true));\n opts.collectSpecData?.(document.parsed);\n return lintDocument({\n document,\n ...opts,\n externalRefResolver,\n config: opts.config.styleguide,\n });\n}\nasync function lintFromString(opts) {\n const { source, absoluteRef, externalRefResolver = new resolve_1.BaseResolver(opts.config.resolve) } = opts;\n const document = (0, resolve_1.makeDocumentFromString)(source, absoluteRef || '/');\n return lintDocument({\n document,\n ...opts,\n externalRefResolver,\n config: opts.config.styleguide,\n });\n}\nasync function lintDocument(opts) {\n (0, ajv_1.releaseAjvInstance)(); // FIXME: preprocessors can modify nodes which are then cached to ajv-instance by absolute path\n const { document, customTypes, externalRefResolver, config } = opts;\n const specVersion = (0, oas_types_1.detectSpec)(document.parsed);\n const specMajorVersion = (0, oas_types_1.getMajorSpecVersion)(specVersion);\n const rules = config.getRulesForSpecVersion(specMajorVersion);\n const types = (0, types_1.normalizeTypes)(config.extendTypes(customTypes ?? (0, oas_types_1.getTypes)(specVersion), specVersion), config);\n const ctx = {\n problems: [],\n oasVersion: specVersion,\n visitorsData: {},\n };\n const preprocessors = (0, config_2.initRules)(rules, config, 'preprocessors', specVersion);\n const regularRules = (0, config_2.initRules)(rules, config, 'rules', specVersion);\n let resolvedRefMap = await (0, resolve_1.resolveDocument)({\n rootDocument: document,\n rootType: types.Root,\n externalRefResolver,\n });\n if (preprocessors.length > 0) {\n // Make additional pass to resolve refs defined in preprocessors.\n (0, walk_1.walkDocument)({\n document,\n rootType: types.Root,\n normalizedVisitors: (0, visitors_1.normalizeVisitors)(preprocessors, types),\n resolvedRefMap,\n ctx,\n });\n resolvedRefMap = await (0, resolve_1.resolveDocument)({\n rootDocument: document,\n rootType: types.Root,\n externalRefResolver,\n });\n }\n const normalizedVisitors = (0, visitors_1.normalizeVisitors)(regularRules, types);\n (0, walk_1.walkDocument)({\n document,\n rootType: types.Root,\n normalizedVisitors,\n resolvedRefMap,\n ctx,\n });\n return ctx.problems.map((problem) => config.addProblemToIgnore(problem));\n}\nasync function lintConfig(opts) {\n const { document, severity, externalRefResolver = new resolve_1.BaseResolver(), config } = opts;\n const ctx = {\n problems: [],\n oasVersion: oas_types_1.SpecVersion.OAS3_0,\n visitorsData: {},\n };\n const types = (0, types_1.normalizeTypes)(opts.externalConfigTypes || (0, redocly_yaml_1.createConfigTypes)(config_1.rootRedoclyConfigSchema, config), { doNotResolveExamples: config.styleguide.doNotResolveExamples });\n const rules = [\n {\n severity: severity || 'error',\n ruleId: 'configuration spec',\n visitor: (0, struct_1.Struct)({ severity: 'error' }),\n },\n {\n severity: severity || 'error',\n ruleId: 'configuration no-unresolved-refs',\n visitor: (0, no_unresolved_refs_1.NoUnresolvedRefs)({ severity: 'error' }),\n },\n ];\n const normalizedVisitors = (0, visitors_1.normalizeVisitors)(rules, types);\n const resolvedRefMap = opts.resolvedRefMap ||\n (await (0, resolve_1.resolveDocument)({\n rootDocument: document,\n rootType: types.ConfigRoot,\n externalRefResolver,\n }));\n (0, walk_1.walkDocument)({\n document,\n rootType: types.ConfigRoot,\n normalizedVisitors,\n resolvedRefMap,\n ctx,\n });\n return ctx.problems;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.logger = exports.colorize = exports.colorOptions = void 0;\nconst colorette = require(\"colorette\");\nconst env_1 = require(\"./env\");\nconst utils_1 = require(\"./utils\");\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore this works but some types are not working\nexports.colorOptions = colorette.options;\nexports.colorize = new Proxy(colorette, {\n get(target, prop) {\n if (env_1.isBrowser) {\n return utils_1.identity;\n }\n return target[prop];\n },\n});\nclass Logger {\n stderr(str) {\n return process.stderr.write(str);\n }\n info(str) {\n return env_1.isBrowser ? console.log(str) : this.stderr(str);\n }\n warn(str) {\n return env_1.isBrowser ? console.warn(str) : this.stderr(exports.colorize.yellow(str));\n }\n error(str) {\n return env_1.isBrowser ? console.error(str) : this.stderr(exports.colorize.red(str));\n }\n}\nexports.logger = new Logger();\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SpecMajorVersion = exports.SpecVersion = void 0;\nexports.detectSpec = detectSpec;\nexports.getMajorSpecVersion = getMajorSpecVersion;\nexports.getTypes = getTypes;\nconst oas2_1 = require(\"./types/oas2\");\nconst oas3_1 = require(\"./types/oas3\");\nconst oas3_1_1 = require(\"./types/oas3_1\");\nconst asyncapi2_1 = require(\"./types/asyncapi2\");\nconst asyncapi3_1 = require(\"./types/asyncapi3\");\nconst arazzo_1 = require(\"./types/arazzo\");\nconst overlay_1 = require(\"./types/overlay\");\nconst utils_1 = require(\"./utils\");\nconst arazzo_2 = require(\"./typings/arazzo\");\nvar SpecVersion;\n(function (SpecVersion) {\n SpecVersion[\"OAS2\"] = \"oas2\";\n SpecVersion[\"OAS3_0\"] = \"oas3_0\";\n SpecVersion[\"OAS3_1\"] = \"oas3_1\";\n SpecVersion[\"Async2\"] = \"async2\";\n SpecVersion[\"Async3\"] = \"async3\";\n SpecVersion[\"Arazzo1\"] = \"arazzo1\";\n SpecVersion[\"Overlay1\"] = \"overlay1\";\n})(SpecVersion || (exports.SpecVersion = SpecVersion = {}));\nvar SpecMajorVersion;\n(function (SpecMajorVersion) {\n SpecMajorVersion[\"OAS2\"] = \"oas2\";\n SpecMajorVersion[\"OAS3\"] = \"oas3\";\n SpecMajorVersion[\"Async2\"] = \"async2\";\n SpecMajorVersion[\"Async3\"] = \"async3\";\n SpecMajorVersion[\"Arazzo1\"] = \"arazzo1\";\n SpecMajorVersion[\"Overlay1\"] = \"overlay1\";\n})(SpecMajorVersion || (exports.SpecMajorVersion = SpecMajorVersion = {}));\nconst typesMap = {\n [SpecVersion.OAS2]: oas2_1.Oas2Types,\n [SpecVersion.OAS3_0]: oas3_1.Oas3Types,\n [SpecVersion.OAS3_1]: oas3_1_1.Oas3_1Types,\n [SpecVersion.Async2]: asyncapi2_1.AsyncApi2Types,\n [SpecVersion.Async3]: asyncapi3_1.AsyncApi3Types,\n [SpecVersion.Arazzo1]: arazzo_1.Arazzo1Types,\n [SpecVersion.Overlay1]: overlay_1.Overlay1Types,\n};\nfunction detectSpec(root) {\n if (!(0, utils_1.isPlainObject)(root)) {\n throw new Error(`Document must be JSON object, got ${typeof root}`);\n }\n if (root.openapi && typeof root.openapi !== 'string') {\n throw new Error(`Invalid OpenAPI version: should be a string but got \"${typeof root.openapi}\"`);\n }\n if (typeof root.openapi === 'string' && root.openapi.startsWith('3.0')) {\n return SpecVersion.OAS3_0;\n }\n if (typeof root.openapi === 'string' && root.openapi.startsWith('3.1')) {\n return SpecVersion.OAS3_1;\n }\n if (root.swagger && root.swagger === '2.0') {\n return SpecVersion.OAS2;\n }\n if (root.openapi || root.swagger) {\n throw new Error(`Unsupported OpenAPI version: ${root.openapi || root.swagger}`);\n }\n if (typeof root.asyncapi === 'string' && root.asyncapi.startsWith('2.')) {\n return SpecVersion.Async2;\n }\n if (typeof root.asyncapi === 'string' && root.asyncapi.startsWith('3.')) {\n return SpecVersion.Async3;\n }\n if (root.asyncapi) {\n throw new Error(`Unsupported AsyncAPI version: ${root.asyncapi}`);\n }\n if (typeof root.arazzo === 'string' && arazzo_2.VERSION_PATTERN.test(root.arazzo)) {\n return SpecVersion.Arazzo1;\n }\n if (typeof root.overlay === 'string' && arazzo_2.VERSION_PATTERN.test(root.overlay)) {\n return SpecVersion.Overlay1;\n }\n throw new Error(`Unsupported specification`);\n}\nfunction getMajorSpecVersion(version) {\n if (version === SpecVersion.OAS2) {\n return SpecMajorVersion.OAS2;\n }\n else if (version === SpecVersion.Async2) {\n return SpecMajorVersion.Async2;\n }\n else if (version === SpecVersion.Async3) {\n return SpecMajorVersion.Async3;\n }\n else if (version === SpecVersion.Arazzo1) {\n return SpecMajorVersion.Arazzo1;\n }\n else if (version === SpecVersion.Overlay1) {\n return SpecMajorVersion.Overlay1;\n }\n else {\n return SpecMajorVersion.OAS3;\n }\n}\nfunction getTypes(spec) {\n return typesMap[spec];\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.output = void 0;\nconst env_1 = require(\"./env\");\nexports.output = {\n write(str) {\n return env_1.isBrowser ? undefined : process.stdout.write(str);\n },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AVAILABLE_REGIONS = exports.DOMAINS = exports.DEFAULT_REGION = void 0;\nexports.getDomains = getDomains;\nexports.setRedoclyDomain = setRedoclyDomain;\nexports.getRedoclyDomain = getRedoclyDomain;\nexports.isRedoclyRegistryURL = isRedoclyRegistryURL;\nlet redoclyDomain = 'redocly.com';\nexports.DEFAULT_REGION = 'us';\nexports.DOMAINS = getDomains();\nexports.AVAILABLE_REGIONS = Object.keys(exports.DOMAINS);\nfunction getDomains() {\n const domains = {\n us: 'redocly.com',\n eu: 'eu.redocly.com',\n };\n // FIXME: temporary fix for our lab environments\n const domain = redoclyDomain;\n if (domain?.endsWith('.redocly.host')) {\n domains[domain.split('.')[0]] = domain;\n }\n if (domain === 'redoc.online') {\n domains[domain] = domain;\n }\n return domains;\n}\nfunction setRedoclyDomain(domain) {\n redoclyDomain = domain;\n}\nfunction getRedoclyDomain() {\n return redoclyDomain;\n}\nfunction isRedoclyRegistryURL(link) {\n const domain = getRedoclyDomain() || exports.DOMAINS[exports.DEFAULT_REGION];\n const legacyDomain = domain === 'redocly.com' ? 'redoc.ly' : domain;\n if (!link.startsWith(`https://api.${domain}/registry/`) &&\n !link.startsWith(`https://api.${legacyDomain}/registry/`)) {\n return false;\n }\n return true;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RedoclyClient = exports.TOKEN_FILENAME = void 0;\nconst fs_1 = require(\"fs\");\nconst path_1 = require(\"path\");\nconst os_1 = require(\"os\");\nconst registry_api_1 = require(\"./registry-api\");\nconst env_1 = require(\"../env\");\nconst utils_1 = require(\"../utils\");\nconst logger_1 = require(\"../logger\");\nconst domains_1 = require(\"./domains\");\nexports.TOKEN_FILENAME = '.redocly-config.json';\nclass RedoclyClient {\n constructor(region) {\n this.accessTokens = {};\n this.region = this.loadRegion(region);\n this.loadTokens();\n this.domain = region ? domains_1.DOMAINS[region] : env_1.env.REDOCLY_DOMAIN || domains_1.DOMAINS[domains_1.DEFAULT_REGION];\n (0, domains_1.setRedoclyDomain)(this.domain);\n this.registryApi = new registry_api_1.RegistryApi(this.accessTokens, this.region);\n }\n loadRegion(region) {\n if (region && !domains_1.DOMAINS[region]) {\n throw new Error(`Invalid argument: region in config file.\\nGiven: ${logger_1.colorize.green(region)}, choices: \"us\", \"eu\".`);\n }\n if ((0, domains_1.getRedoclyDomain)()) {\n return (domains_1.AVAILABLE_REGIONS.find((region) => domains_1.DOMAINS[region] === (0, domains_1.getRedoclyDomain)()) || domains_1.DEFAULT_REGION);\n }\n return region || domains_1.DEFAULT_REGION;\n }\n getRegion() {\n return this.region;\n }\n hasTokens() {\n return (0, utils_1.isNotEmptyObject)(this.accessTokens);\n }\n // \n hasToken() {\n return !!this.accessTokens[this.region];\n }\n async getAuthorizationHeader() {\n return this.accessTokens[this.region];\n }\n // \n setAccessTokens(accessTokens) {\n this.accessTokens = accessTokens;\n }\n loadTokens() {\n const credentialsPath = (0, path_1.resolve)((0, os_1.homedir)(), exports.TOKEN_FILENAME);\n const credentials = this.readCredentialsFile(credentialsPath);\n if ((0, utils_1.isNotEmptyObject)(credentials)) {\n this.setAccessTokens({\n ...credentials,\n ...(credentials.token &&\n !credentials[this.region] && {\n [this.region]: credentials.token,\n }),\n });\n }\n if (env_1.env.REDOCLY_AUTHORIZATION) {\n this.setAccessTokens({\n ...this.accessTokens,\n [this.region]: env_1.env.REDOCLY_AUTHORIZATION,\n });\n }\n }\n getAllTokens() {\n return Object.entries(this.accessTokens)\n .filter(([region]) => domains_1.AVAILABLE_REGIONS.includes(region))\n .map(([region, token]) => ({ region, token }));\n }\n async getValidTokens() {\n const allTokens = this.getAllTokens();\n const verifiedTokens = await Promise.allSettled(allTokens.map(({ token }) => this.verifyToken(token)));\n return allTokens\n .filter((_, index) => verifiedTokens[index].status === 'fulfilled')\n .map(({ token, region }) => ({ token, region, valid: true }));\n }\n async getTokens() {\n return this.hasTokens() ? await this.getValidTokens() : [];\n }\n async isAuthorizedWithRedoclyByRegion() {\n if (!this.hasTokens()) {\n return false;\n }\n const accessToken = this.accessTokens[this.region];\n if (!accessToken) {\n return false;\n }\n try {\n await this.verifyToken(accessToken);\n return true;\n }\n catch (err) {\n return false;\n }\n }\n async isAuthorizedWithRedocly() {\n return this.hasTokens() && (0, utils_1.isNotEmptyArray)(await this.getValidTokens());\n }\n readCredentialsFile(credentialsPath) {\n return (0, fs_1.existsSync)(credentialsPath) ? JSON.parse((0, fs_1.readFileSync)(credentialsPath, 'utf-8')) : {};\n }\n async verifyToken(accessToken, verbose = false) {\n return this.registryApi.authStatus(accessToken, verbose);\n }\n async login(accessToken, verbose = false) {\n const credentialsPath = (0, path_1.resolve)((0, os_1.homedir)(), exports.TOKEN_FILENAME);\n try {\n await this.verifyToken(accessToken, verbose);\n }\n catch (err) {\n throw new Error('Authorization failed. Please check if you entered a valid API key.');\n }\n const credentials = {\n ...this.readCredentialsFile(credentialsPath),\n [this.region]: accessToken,\n token: accessToken, // FIXME: backward compatibility, remove on 1.0.0\n };\n this.accessTokens = credentials;\n this.registryApi.setAccessTokens(credentials);\n (0, fs_1.writeFileSync)(credentialsPath, JSON.stringify(credentials, null, 2));\n }\n logout() {\n const credentialsPath = (0, path_1.resolve)((0, os_1.homedir)(), exports.TOKEN_FILENAME);\n if ((0, fs_1.existsSync)(credentialsPath)) {\n (0, fs_1.unlinkSync)(credentialsPath);\n }\n }\n}\nexports.RedoclyClient = RedoclyClient;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RegistryApi = void 0;\nconst utils_1 = require(\"../utils\");\nconst domains_1 = require(\"./domains\");\nconst version = require('../../package.json').version;\nclass RegistryApi {\n constructor(accessTokens, region) {\n this.accessTokens = accessTokens;\n this.region = region;\n }\n get accessToken() {\n return (0, utils_1.isNotEmptyObject)(this.accessTokens) && this.accessTokens[this.region];\n }\n getBaseUrl() {\n return `https://api.${(0, domains_1.getRedoclyDomain)()}/registry`;\n }\n setAccessTokens(accessTokens) {\n this.accessTokens = accessTokens;\n return this;\n }\n async request(path = '', options = {}) {\n const currentCommand = typeof process !== 'undefined' ? process.env?.REDOCLY_CLI_COMMAND || '' : '';\n const redoclyEnv = typeof process !== 'undefined' ? process.env?.REDOCLY_ENVIRONMENT || '' : '';\n const headers = Object.assign({}, options.headers || {}, {\n 'x-redocly-cli-version': version,\n 'user-agent': `redocly-cli / ${version} ${currentCommand} ${redoclyEnv}`,\n });\n if (!headers.hasOwnProperty('authorization')) {\n throw new Error('Unauthorized');\n }\n const requestOptions = {\n ...options,\n headers,\n agent: (0, utils_1.getProxyAgent)(),\n };\n const response = await fetch(`${this.getBaseUrl()}${path}`, requestOptions);\n if (response.status === 401) {\n throw new Error('Unauthorized');\n }\n if (response.status === 404) {\n const body = await response.json();\n throw new Error(body.code);\n }\n return response;\n }\n async authStatus(accessToken, verbose = false) {\n try {\n const response = await this.request('', { headers: { authorization: accessToken } });\n return await response.json();\n }\n catch (error) {\n if (verbose) {\n console.log(error);\n }\n throw error;\n }\n }\n async prepareFileUpload({ organizationId, name, version, filesHash, filename, isUpsert, }) {\n const response = await this.request(`/${organizationId}/${name}/${version}/prepare-file-upload`, {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n authorization: this.accessToken,\n },\n body: JSON.stringify({\n filesHash,\n filename,\n isUpsert,\n }),\n });\n if (response.ok) {\n return response.json();\n }\n throw new Error('Could not prepare file upload');\n }\n async pushApi({ organizationId, name, version, rootFilePath, filePaths, branch, isUpsert, isPublic, batchId, batchSize, }) {\n const response = await this.request(`/${organizationId}/${name}/${version}`, {\n method: 'PUT',\n headers: {\n 'content-type': 'application/json',\n authorization: this.accessToken,\n },\n body: JSON.stringify({\n rootFilePath,\n filePaths,\n branch,\n isUpsert,\n isPublic,\n batchId,\n batchSize,\n }),\n });\n if (response.ok) {\n return;\n }\n throw new Error('Could not push api');\n }\n}\nexports.RegistryApi = RegistryApi;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Location = void 0;\nexports.joinPointer = joinPointer;\nexports.isRef = isRef;\nexports.isExternalValue = isExternalValue;\nexports.unescapePointer = unescapePointer;\nexports.escapePointer = escapePointer;\nexports.parseRef = parseRef;\nexports.parsePointer = parsePointer;\nexports.pointerBaseName = pointerBaseName;\nexports.refBaseName = refBaseName;\nexports.isAbsoluteUrl = isAbsoluteUrl;\nexports.isMappingRef = isMappingRef;\nexports.isAnchor = isAnchor;\nconst utils_1 = require(\"./utils\");\nfunction joinPointer(base, key) {\n if (base === '')\n base = '#/';\n return base[base.length - 1] === '/' ? base + key : base + '/' + key;\n}\nfunction isRef(node) {\n return (0, utils_1.isPlainObject)(node) && typeof node.$ref === 'string';\n}\nfunction isExternalValue(node) {\n return (0, utils_1.isPlainObject)(node) && typeof node.externalValue === 'string';\n}\nclass Location {\n constructor(source, pointer) {\n this.source = source;\n this.pointer = pointer;\n }\n child(components) {\n return new Location(this.source, joinPointer(this.pointer, (Array.isArray(components) ? components : [components]).map(escapePointer).join('/')));\n }\n key() {\n return { ...this, reportOnKey: true };\n }\n get absolutePointer() {\n return this.source.absoluteRef + (this.pointer === '#/' ? '' : this.pointer);\n }\n}\nexports.Location = Location;\nfunction unescapePointer(fragment) {\n return decodeURIComponent(fragment.replace(/~1/g, '/').replace(/~0/g, '~'));\n}\nfunction escapePointer(fragment) {\n if (typeof fragment === 'number')\n return fragment;\n return fragment.replace(/~/g, '~0').replace(/\\//g, '~1');\n}\nfunction parseRef(ref) {\n const [uri, pointer = ''] = ref.split('#/');\n return {\n uri: (uri.endsWith('#') ? uri.slice(0, -1) : uri) || null,\n pointer: parsePointer(pointer),\n };\n}\nfunction parsePointer(pointer) {\n return pointer.split('/').map(unescapePointer).filter(utils_1.isTruthy);\n}\nfunction pointerBaseName(pointer) {\n const parts = pointer.split('/');\n return parts[parts.length - 1];\n}\nfunction refBaseName(ref) {\n // eslint-disable-next-line no-useless-escape\n const parts = ref.split(/[\\/\\\\]/); // split by '\\' and '/'\n return parts[parts.length - 1].replace(/\\.[^.]+$/, ''); // replace extension with empty string\n}\nfunction isAbsoluteUrl(ref) {\n return ref.startsWith('http://') || ref.startsWith('https://');\n}\nfunction isMappingRef(mapping) {\n // TODO: proper detection of mapping refs\n return (mapping.startsWith('#') ||\n mapping.startsWith('https://') ||\n mapping.startsWith('http://') ||\n mapping.startsWith('./') ||\n mapping.startsWith('../') ||\n mapping.indexOf('/') > -1);\n}\nfunction isAnchor(ref) {\n return /^#[A-Za-z][A-Za-z0-9\\-_:.]*$/.test(ref);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BaseResolver = exports.YamlParseError = exports.ResolveError = exports.Source = void 0;\nexports.makeRefId = makeRefId;\nexports.makeDocumentFromString = makeDocumentFromString;\nexports.resolveDocument = resolveDocument;\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nconst ref_utils_1 = require(\"./ref-utils\");\nconst types_1 = require(\"./types\");\nconst utils_1 = require(\"./utils\");\nclass Source {\n constructor(absoluteRef, body, mimeType) {\n this.absoluteRef = absoluteRef;\n this.body = body;\n this.mimeType = mimeType;\n }\n // pass safeLoad as argument to separate it from browser bundle\n getAst(safeLoad) {\n if (this._ast === undefined) {\n this._ast = safeLoad(this.body, { filename: this.absoluteRef }) ?? undefined;\n // fix ast representation of file with newlines only\n if (this._ast &&\n this._ast.kind === 0 && // KIND.scalar = 0\n this._ast.value === '' &&\n this._ast.startPosition !== 1) {\n this._ast.startPosition = 1;\n this._ast.endPosition = 1;\n }\n }\n return this._ast;\n }\n getLines() {\n if (this._lines === undefined) {\n this._lines = this.body.split(/\\r\\n|[\\n\\r]/g);\n }\n return this._lines;\n }\n}\nexports.Source = Source;\nclass ResolveError extends Error {\n constructor(originalError) {\n super(originalError.message);\n this.originalError = originalError;\n // Set the prototype explicitly.\n Object.setPrototypeOf(this, ResolveError.prototype);\n }\n}\nexports.ResolveError = ResolveError;\nconst jsYamlErrorLineColRegexp = /\\((\\d+):(\\d+)\\)$/;\nclass YamlParseError extends Error {\n constructor(originalError, source) {\n super(originalError.message.split('\\n')[0]);\n this.originalError = originalError;\n this.source = source;\n // Set the prototype explicitly.\n Object.setPrototypeOf(this, YamlParseError.prototype);\n const [, line, col] = this.message.match(jsYamlErrorLineColRegexp) || [];\n this.line = parseInt(line, 10);\n this.col = parseInt(col, 10);\n }\n}\nexports.YamlParseError = YamlParseError;\nfunction makeRefId(absoluteRef, pointer) {\n return absoluteRef + '::' + pointer;\n}\nfunction makeDocumentFromString(sourceString, absoluteRef) {\n const source = new Source(absoluteRef, sourceString);\n try {\n return {\n source,\n parsed: (0, utils_1.parseYaml)(sourceString, { filename: absoluteRef }),\n };\n }\n catch (e) {\n throw new YamlParseError(e, source);\n }\n}\nclass BaseResolver {\n constructor(config = { http: { headers: [] } }) {\n this.config = config;\n this.cache = new Map();\n }\n getFiles() {\n return new Set(Array.from(this.cache.keys()));\n }\n resolveExternalRef(base, ref) {\n if ((0, ref_utils_1.isAbsoluteUrl)(ref)) {\n return ref;\n }\n if (base && (0, ref_utils_1.isAbsoluteUrl)(base)) {\n return new URL(ref, base).href;\n }\n return path.resolve(base ? path.dirname(base) : process.cwd(), ref);\n }\n async loadExternalRef(absoluteRef) {\n try {\n if ((0, ref_utils_1.isAbsoluteUrl)(absoluteRef)) {\n const { body, mimeType } = await (0, utils_1.readFileFromUrl)(absoluteRef, this.config.http);\n return new Source(absoluteRef, body, mimeType);\n }\n else {\n if (fs.lstatSync(absoluteRef).isDirectory()) {\n throw new Error(`Expected a file but received a folder at ${absoluteRef}.`);\n }\n const content = await fs.promises.readFile(absoluteRef, 'utf-8');\n // In some cases file have \\r\\n line delimeters like on windows, we should skip it.\n return new Source(absoluteRef, content.replace(/\\r\\n/g, '\\n'));\n }\n }\n catch (error) {\n error.message = error.message.replace(', lstat', '');\n throw new ResolveError(error);\n }\n }\n parseDocument(source, isRoot = false) {\n const ext = source.absoluteRef.substr(source.absoluteRef.lastIndexOf('.'));\n if (!['.json', '.json', '.yml', '.yaml'].includes(ext) &&\n !source.mimeType?.match(/(json|yaml|openapi)/) &&\n !isRoot // always parse root\n ) {\n return { source, parsed: source.body };\n }\n try {\n return {\n source,\n parsed: (0, utils_1.parseYaml)(source.body, { filename: source.absoluteRef }),\n };\n }\n catch (e) {\n throw new YamlParseError(e, source);\n }\n }\n async resolveDocument(base, ref, isRoot = false) {\n const absoluteRef = this.resolveExternalRef(base, ref);\n const cachedDocument = this.cache.get(absoluteRef);\n if (cachedDocument) {\n return cachedDocument;\n }\n const doc = this.loadExternalRef(absoluteRef).then((source) => {\n return this.parseDocument(source, isRoot);\n });\n this.cache.set(absoluteRef, doc);\n return doc;\n }\n}\nexports.BaseResolver = BaseResolver;\nfunction pushRef(head, node) {\n return {\n prev: head,\n node,\n };\n}\nfunction hasRef(head, node) {\n while (head) {\n if (head.node === node) {\n return true;\n }\n head = head.prev;\n }\n return false;\n}\nconst unknownType = { name: 'unknown', properties: {} };\nconst resolvableScalarType = { name: 'scalar', properties: {} };\nasync function resolveDocument(opts) {\n const { rootDocument, externalRefResolver, rootType } = opts;\n const resolvedRefMap = new Map();\n const seenNodes = new Set(); // format \"${type}::${absoluteRef}${pointer}\"\n const resolvePromises = [];\n resolveRefsInParallel(rootDocument.parsed, rootDocument, '#/', rootType);\n let resolved;\n do {\n resolved = await Promise.all(resolvePromises);\n } while (resolvePromises.length !== resolved.length);\n return resolvedRefMap;\n function resolveRefsInParallel(rootNode, rootNodeDocument, rootNodePointer, type) {\n const rootNodeDocAbsoluteRef = rootNodeDocument.source.absoluteRef;\n const anchorRefsMap = new Map();\n walk(rootNode, type, rootNodeDocAbsoluteRef + rootNodePointer);\n function walk(node, type, nodeAbsoluteRef) {\n if (typeof node !== 'object' || node === null) {\n return;\n }\n const nodeId = `${type.name}::${nodeAbsoluteRef}`;\n if (seenNodes.has(nodeId)) {\n return;\n }\n seenNodes.add(nodeId);\n const [_, anchor] = Object.entries(node).find(([key]) => key === '$anchor') || [];\n if (anchor) {\n anchorRefsMap.set(`#${anchor}`, node);\n }\n if (Array.isArray(node)) {\n const itemsType = type.items;\n // we continue resolving unknown types, but stop early on known scalars\n if (itemsType === undefined && type !== unknownType && type !== types_1.SpecExtension) {\n return;\n }\n const isTypeAFunction = typeof itemsType === 'function';\n for (let i = 0; i < node.length; i++) {\n const itemType = isTypeAFunction\n ? itemsType(node[i], (0, ref_utils_1.joinPointer)(nodeAbsoluteRef, i))\n : itemsType;\n // we continue resolving unknown types, but stop early on known scalars\n if (itemType === undefined && type !== unknownType && type !== types_1.SpecExtension) {\n continue;\n }\n walk(node[i], (0, types_1.isNamedType)(itemType) ? itemType : unknownType, (0, ref_utils_1.joinPointer)(nodeAbsoluteRef, i));\n }\n return;\n }\n for (const propName of Object.keys(node)) {\n let propValue = node[propName];\n let propType = type.properties[propName];\n if (propType === undefined)\n propType = type.additionalProperties;\n if (typeof propType === 'function')\n propType = propType(propValue, propName);\n if (propType === undefined)\n propType = unknownType;\n if (type.extensionsPrefix &&\n propName.startsWith(type.extensionsPrefix) &&\n propType === unknownType) {\n propType = types_1.SpecExtension;\n }\n if (!(0, types_1.isNamedType)(propType) && propType?.directResolveAs) {\n propType = propType.directResolveAs;\n propValue = { $ref: propValue };\n }\n if (propType && propType.name === undefined && propType.resolvable !== false) {\n propType = resolvableScalarType;\n }\n if (!(0, types_1.isNamedType)(propType) || typeof propValue !== 'object') {\n continue;\n }\n walk(propValue, propType, (0, ref_utils_1.joinPointer)(nodeAbsoluteRef, (0, ref_utils_1.escapePointer)(propName)));\n }\n if ((0, ref_utils_1.isRef)(node)) {\n const promise = followRef(rootNodeDocument, node, {\n prev: null,\n node,\n }).then((resolvedRef) => {\n if (resolvedRef.resolved) {\n resolveRefsInParallel(resolvedRef.node, resolvedRef.document, resolvedRef.nodePointer, type);\n }\n });\n resolvePromises.push(promise);\n }\n // handle example.externalValue as reference\n if ((0, ref_utils_1.isExternalValue)(node)) {\n const promise = followRef(rootNodeDocument, { $ref: node.externalValue }, {\n prev: null,\n node,\n }).then((resolvedRef) => {\n if (resolvedRef.resolved) {\n resolveRefsInParallel(resolvedRef.node, resolvedRef.document, resolvedRef.nodePointer, type);\n }\n });\n resolvePromises.push(promise);\n }\n }\n async function followRef(document, ref, refStack) {\n if (hasRef(refStack.prev, ref)) {\n throw new Error('Self-referencing circular pointer');\n }\n if ((0, ref_utils_1.isAnchor)(ref.$ref)) {\n // Wait for all anchors in the document to be collected firstly.\n await (0, utils_1.nextTick)();\n const resolvedRef = {\n resolved: true,\n isRemote: false,\n node: anchorRefsMap.get(ref.$ref),\n document,\n nodePointer: ref.$ref,\n };\n const refId = makeRefId(document.source.absoluteRef, ref.$ref);\n resolvedRefMap.set(refId, resolvedRef);\n return resolvedRef;\n }\n const { uri, pointer } = (0, ref_utils_1.parseRef)(ref.$ref);\n const isRemote = uri !== null;\n let targetDoc;\n try {\n targetDoc = isRemote\n ? (await externalRefResolver.resolveDocument(document.source.absoluteRef, uri))\n : document;\n }\n catch (error) {\n const resolvedRef = {\n resolved: false,\n isRemote,\n document: undefined,\n error: error,\n };\n const refId = makeRefId(document.source.absoluteRef, ref.$ref);\n resolvedRefMap.set(refId, resolvedRef);\n return resolvedRef;\n }\n let resolvedRef = {\n resolved: true,\n document: targetDoc,\n isRemote,\n node: document.parsed,\n nodePointer: '#/',\n };\n let target = targetDoc.parsed;\n const segments = pointer;\n for (const segment of segments) {\n if (typeof target !== 'object') {\n target = undefined;\n break;\n }\n else if (target[segment] !== undefined) {\n target = target[segment];\n resolvedRef.nodePointer = (0, ref_utils_1.joinPointer)(resolvedRef.nodePointer, (0, ref_utils_1.escapePointer)(segment));\n }\n else if ((0, ref_utils_1.isRef)(target)) {\n resolvedRef = await followRef(targetDoc, target, pushRef(refStack, target));\n targetDoc = resolvedRef.document || targetDoc;\n if (typeof resolvedRef.node !== 'object') {\n target = undefined;\n break;\n }\n target = resolvedRef.node[segment];\n resolvedRef.nodePointer = (0, ref_utils_1.joinPointer)(resolvedRef.nodePointer, (0, ref_utils_1.escapePointer)(segment));\n }\n else {\n target = undefined;\n break;\n }\n }\n resolvedRef.node = target;\n resolvedRef.document = targetDoc;\n const refId = makeRefId(document.source.absoluteRef, ref.$ref);\n if (resolvedRef.document && (0, ref_utils_1.isRef)(target)) {\n resolvedRef = await followRef(resolvedRef.document, target, pushRef(refStack, target));\n }\n resolvedRefMap.set(refId, resolvedRef);\n return { ...resolvedRef };\n }\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.releaseAjvInstance = releaseAjvInstance;\nexports.validateJsonSchema = validateJsonSchema;\nconst _2020_1 = require(\"@redocly/ajv/dist/2020\");\nconst ref_utils_1 = require(\"../ref-utils\");\nlet ajvInstance = null;\nfunction releaseAjvInstance() {\n ajvInstance = null;\n}\nfunction getAjv(resolve, allowAdditionalProperties) {\n if (!ajvInstance) {\n ajvInstance = new _2020_1.default({\n schemaId: '$id',\n meta: true,\n allErrors: true,\n strictSchema: false,\n inlineRefs: false,\n validateSchema: false,\n discriminator: true,\n allowUnionTypes: true,\n validateFormats: false, // TODO: fix it\n defaultUnevaluatedProperties: allowAdditionalProperties,\n loadSchemaSync(base, $ref, $id) {\n const resolvedRef = resolve({ $ref }, base.split('#')[0]);\n if (!resolvedRef || !resolvedRef.location)\n return false;\n return { $id: resolvedRef.location.source.absoluteRef + '#' + $id, ...resolvedRef.node };\n },\n logger: false,\n });\n }\n return ajvInstance;\n}\nfunction getAjvValidator(schema, loc, resolve, allowAdditionalProperties) {\n const ajv = getAjv(resolve, allowAdditionalProperties);\n if (!ajv.getSchema(loc.absolutePointer)) {\n ajv.addSchema({ $id: loc.absolutePointer, ...schema }, loc.absolutePointer);\n }\n return ajv.getSchema(loc.absolutePointer);\n}\nfunction validateJsonSchema(data, schema, schemaLoc, instancePath, resolve, allowAdditionalProperties) {\n const validate = getAjvValidator(schema, schemaLoc, resolve, allowAdditionalProperties);\n if (!validate)\n return { valid: true, errors: [] }; // unresolved refs are reported\n const valid = validate(data, {\n instancePath,\n parentData: { fake: {} },\n parentDataProperty: 'fake',\n rootData: {},\n dynamicAnchors: {},\n });\n return {\n valid: !!valid,\n errors: (validate.errors || []).map(beatifyErrorMessage),\n };\n function beatifyErrorMessage(error) {\n let message = error.message;\n const suggest = error.keyword === 'enum' ? error.params.allowedValues : undefined;\n if (suggest) {\n message += ` ${suggest.map((e) => `\"${e}\"`).join(', ')}`;\n }\n if (error.keyword === 'type') {\n message = `type ${message}`;\n }\n const relativePath = error.instancePath.substring(instancePath.length + 1);\n const propName = relativePath.substring(relativePath.lastIndexOf('/') + 1);\n if (propName) {\n message = `\\`${propName}\\` property ${message}`;\n }\n if (error.keyword === 'additionalProperties' || error.keyword === 'unevaluatedProperties') {\n const property = error.params.additionalProperty || error.params.unevaluatedProperty;\n message = `${message} \\`${property}\\``;\n error.instancePath += '/' + (0, ref_utils_1.escapePointer)(property);\n }\n return {\n ...error,\n message,\n suggest,\n };\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CriteriaUnique = void 0;\nconst CriteriaUnique = () => {\n return {\n FailureActionObject: {\n enter(action, { report, location }) {\n const criterias = action?.criteria;\n if (!Array.isArray(criterias)) {\n return;\n }\n const seen = new Set();\n for (const criteria of criterias) {\n const key = JSON.stringify(criteria);\n if (seen.has(key)) {\n report({\n message: 'The FailureAction criteria items must be unique.',\n location: location.child(['criteria', criterias.indexOf(criteria)]),\n });\n }\n else {\n seen.add(key);\n }\n }\n },\n },\n SuccessActionObject: {\n enter(action, { report, location }) {\n const criterias = action?.criteria;\n if (!Array.isArray(criterias)) {\n return;\n }\n const seen = new Set();\n for (const criteria of criterias) {\n const key = JSON.stringify(criteria);\n if (seen.has(key)) {\n report({\n message: 'The SuccessAction criteria items must be unique.',\n location: location.child(['criteria', criterias.indexOf(criteria)]),\n });\n }\n else {\n seen.add(key);\n }\n }\n },\n },\n Step: {\n enter(step, { report, location }) {\n const successCriterias = step?.successCriteria;\n if (!Array.isArray(successCriterias)) {\n return;\n }\n const seen = new Set();\n for (const criteria of successCriterias) {\n const key = JSON.stringify(criteria);\n if (seen.has(key)) {\n report({\n message: 'The Step SuccessCriteria items must be unique.',\n location: location.child(['successCriteria', successCriterias.indexOf(criteria)]),\n });\n }\n else {\n seen.add(key);\n }\n }\n },\n },\n };\n};\nexports.CriteriaUnique = CriteriaUnique;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.preprocessors = exports.rules = void 0;\nconst struct_1 = require(\"../common/struct\");\nconst assertions_1 = require(\"../common/assertions\");\nconst sourceDescription_type_1 = require(\"../arazzo/sourceDescription-type\");\nconst sourceDescriptions_not_empty_1 = require(\"./sourceDescriptions-not-empty\");\nconst respect_supported_versions_1 = require(\"../respect/respect-supported-versions\");\nconst workflowId_unique_1 = require(\"./workflowId-unique\");\nconst stepId_unique_1 = require(\"./stepId-unique\");\nconst sourceDescriptions_name_unique_1 = require(\"./sourceDescriptions-name-unique\");\nconst workflow_dependsOn_1 = require(\"./workflow-dependsOn\");\nconst parameters_unique_1 = require(\"./parameters-unique\");\nconst step_onSuccess_unique_1 = require(\"./step-onSuccess-unique\");\nconst step_onFailure_unique_1 = require(\"./step-onFailure-unique\");\nconst requestBody_replacements_unique_1 = require(\"./requestBody-replacements-unique\");\nconst no_criteria_xpath_1 = require(\"../respect/no-criteria-xpath\");\nconst criteria_unique_1 = require(\"./criteria-unique\");\nexports.rules = {\n struct: struct_1.Struct,\n assertions: assertions_1.Assertions,\n 'sourceDescription-type': sourceDescription_type_1.SourceDescriptionType,\n 'respect-supported-versions': respect_supported_versions_1.RespectSupportedVersions,\n 'workflowId-unique': workflowId_unique_1.WorkflowIdUnique,\n 'stepId-unique': stepId_unique_1.StepIdUnique,\n 'sourceDescription-name-unique': sourceDescriptions_name_unique_1.SourceDescriptionsNameUnique,\n 'sourceDescriptions-not-empty': sourceDescriptions_not_empty_1.SourceDescriptionsNotEmpty,\n 'workflow-dependsOn': workflow_dependsOn_1.WorkflowDependsOn,\n 'parameters-unique': parameters_unique_1.ParametersUnique,\n 'step-onSuccess-unique': step_onSuccess_unique_1.StepOnSuccessUnique,\n 'step-onFailure-unique': step_onFailure_unique_1.StepOnFailureUnique,\n 'requestBody-replacements-unique': requestBody_replacements_unique_1.RequestBodyReplacementsUnique,\n 'no-criteria-xpath': no_criteria_xpath_1.NoCriteriaXpath,\n 'criteria-unique': criteria_unique_1.CriteriaUnique,\n};\nexports.preprocessors = {};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ParametersUnique = void 0;\nconst ParametersUnique = () => {\n return {\n Parameters: {\n enter(parameters, { report, location }) {\n if (!parameters)\n return;\n const seenParameters = new Set();\n for (const parameter of parameters) {\n if (seenParameters.has(parameter?.name)) {\n report({\n message: 'The parameter `name` must be unique amongst listed parameters.',\n location: location.child([parameters.indexOf(parameter)]),\n });\n }\n if (seenParameters.has(parameter?.reference)) {\n report({\n message: 'The parameter `reference` must be unique amongst listed parameters.',\n location: location.child([parameters.indexOf(parameter)]),\n });\n }\n parameter?.name\n ? seenParameters.add(parameter.name)\n : seenParameters.add(parameter.reference);\n }\n },\n },\n };\n};\nexports.ParametersUnique = ParametersUnique;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RequestBodyReplacementsUnique = void 0;\nconst RequestBodyReplacementsUnique = () => {\n const seenReplacements = new Set();\n return {\n Step: {\n leave() {\n seenReplacements.clear();\n },\n RequestBody: {\n enter(requestBody, { report, location }) {\n if (!requestBody.replacements)\n return;\n for (const replacement of requestBody.replacements) {\n if (seenReplacements.has(replacement.target)) {\n report({\n message: 'Every `replacement` in `requestBody` must be unique.',\n location: location.child([\n 'replacements',\n requestBody.replacements.indexOf(replacement),\n `target`,\n ]),\n });\n }\n seenReplacements.add(replacement.target);\n }\n },\n },\n },\n };\n};\nexports.RequestBodyReplacementsUnique = RequestBodyReplacementsUnique;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SourceDescriptionType = void 0;\nconst SourceDescriptionType = () => {\n return {\n SourceDescriptions: {\n enter(sourceDescriptions, { report, location }) {\n if (!sourceDescriptions.length)\n return;\n for (const sourceDescription of sourceDescriptions) {\n if (!['openapi', 'arazzo'].includes(sourceDescription?.type)) {\n report({\n message: 'The `type` property of the `sourceDescription` object must be either `openapi` or `arazzo`.',\n location: location.child([sourceDescriptions.indexOf(sourceDescription)]),\n });\n }\n }\n },\n },\n };\n};\nexports.SourceDescriptionType = SourceDescriptionType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SourceDescriptionsNameUnique = void 0;\nconst SourceDescriptionsNameUnique = () => {\n const seenSourceDescriptions = new Set();\n return {\n SourceDescriptions: {\n enter(sourceDescriptions, { report, location }) {\n if (!sourceDescriptions.length)\n return;\n for (const sourceDescription of sourceDescriptions) {\n if (seenSourceDescriptions.has(sourceDescription.name)) {\n report({\n message: 'The `name` must be unique amongst all SourceDescriptions.',\n location: location.child([sourceDescriptions.indexOf(sourceDescription)]),\n });\n }\n seenSourceDescriptions.add(sourceDescription.name);\n }\n },\n },\n };\n};\nexports.SourceDescriptionsNameUnique = SourceDescriptionsNameUnique;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SourceDescriptionsNotEmpty = void 0;\nconst SourceDescriptionsNotEmpty = () => {\n return {\n SourceDescriptions: {\n enter(sourceDescriptions, { report, location }) {\n if (!sourceDescriptions?.length) {\n report({\n message: 'The `sourceDescriptions` list must have at least one entry.',\n location,\n });\n }\n },\n },\n };\n};\nexports.SourceDescriptionsNotEmpty = SourceDescriptionsNotEmpty;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StepOnFailureUnique = void 0;\nconst StepOnFailureUnique = () => {\n return {\n OnFailureActionList: {\n enter(onFailureActionList, { report, location }) {\n if (!onFailureActionList)\n return;\n const seenFailureActions = new Set();\n for (const onFailureAction of onFailureActionList) {\n if (seenFailureActions.has(onFailureAction?.name)) {\n report({\n message: 'The action `name` must be unique amongst listed `onFailure` actions.',\n location: location.child([onFailureActionList.indexOf(onFailureAction)]),\n });\n }\n if (seenFailureActions.has(onFailureAction?.reference)) {\n report({\n message: 'The action `reference` must be unique amongst listed `onFailure` actions.',\n location: location.child([onFailureActionList.indexOf(onFailureAction)]),\n });\n }\n onFailureAction?.name\n ? seenFailureActions.add(onFailureAction.name)\n : seenFailureActions.add(onFailureAction.reference);\n }\n },\n },\n };\n};\nexports.StepOnFailureUnique = StepOnFailureUnique;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StepOnSuccessUnique = void 0;\nconst StepOnSuccessUnique = () => {\n return {\n OnSuccessActionList: {\n enter(onSuccessActionList, { report, location }) {\n if (!onSuccessActionList)\n return;\n const seenSuccessActions = new Set();\n for (const onSuccessAction of onSuccessActionList) {\n if (seenSuccessActions.has(onSuccessAction?.name)) {\n report({\n message: 'The action `name` must be unique amongst listed `onSuccess` actions.',\n location: location.child([onSuccessActionList.indexOf(onSuccessAction)]),\n });\n }\n if (seenSuccessActions.has(onSuccessAction?.reference)) {\n report({\n message: 'The action `reference` must be unique amongst listed `onSuccess` actions.',\n location: location.child([onSuccessActionList.indexOf(onSuccessAction)]),\n });\n }\n onSuccessAction?.name\n ? seenSuccessActions.add(onSuccessAction.name)\n : seenSuccessActions.add(onSuccessAction.reference);\n }\n },\n },\n };\n};\nexports.StepOnSuccessUnique = StepOnSuccessUnique;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StepIdUnique = void 0;\nconst StepIdUnique = () => {\n return {\n Workflow: {\n enter(workflow, { report, location }) {\n if (!workflow.steps)\n return;\n const seenSteps = new Set();\n for (const step of workflow.steps) {\n if (!step.stepId)\n return;\n if (seenSteps.has(step.stepId)) {\n report({\n message: 'The `stepId` must be unique amongst all steps described in the workflow.',\n location: location.child(['steps', workflow.steps.indexOf(step)]),\n });\n }\n seenSteps.add(step.stepId);\n }\n },\n },\n };\n};\nexports.StepIdUnique = StepIdUnique;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WorkflowDependsOn = void 0;\nconst WorkflowDependsOn = () => {\n const seenWorkflow = new Set();\n const existingSourceDescriptions = new Set();\n const existingWorkflowIds = new Set();\n return {\n SourceDescriptions: {\n enter(sourceDescriptions) {\n for (const sourceDescription of sourceDescriptions) {\n existingSourceDescriptions.add(sourceDescription.name);\n }\n },\n },\n Workflows: {\n enter(workflows) {\n for (const workflow of workflows) {\n existingWorkflowIds.add(workflow.workflowId);\n }\n },\n },\n Workflow: {\n leave(workflow, { report, location }) {\n if (!workflow.dependsOn)\n return;\n for (const item of workflow.dependsOn) {\n // Possible dependsOn workflow pattern: $sourceDescriptions..\n if (item.startsWith('$sourceDescriptions.')) {\n const sourceDescriptionName = item.split('.')[1];\n if (!existingSourceDescriptions.has(sourceDescriptionName)) {\n report({\n message: `SourceDescription ${sourceDescriptionName} must be defined in sourceDescriptions.`,\n location: location.child([`dependsOn`, workflow.dependsOn.indexOf(item)]),\n });\n }\n }\n if (!item.startsWith('$sourceDescriptions') && !existingWorkflowIds.has(item)) {\n report({\n message: `Workflow ${item} must be defined in workflows.`,\n location: location.child([`dependsOn`, workflow.dependsOn.indexOf(item)]),\n });\n }\n if (seenWorkflow.has(item)) {\n report({\n message: 'Every workflow in dependsOn must be unique.',\n location: location.child([`dependsOn`]),\n });\n }\n seenWorkflow.add(item);\n }\n },\n },\n };\n};\nexports.WorkflowDependsOn = WorkflowDependsOn;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WorkflowIdUnique = void 0;\nconst WorkflowIdUnique = () => {\n const seenWorkflow = new Set();\n return {\n Workflow: {\n enter(workflow, { report, location }) {\n if (!workflow.workflowId)\n return;\n if (seenWorkflow.has(workflow.workflowId)) {\n report({\n message: 'Every workflow must have a unique `workflowId`.',\n location: location.child([workflow.workflowId]),\n });\n }\n seenWorkflow.add(workflow.workflowId);\n },\n },\n };\n};\nexports.WorkflowIdUnique = WorkflowIdUnique;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChannelsKebabCase = void 0;\nconst ChannelsKebabCase = () => {\n return {\n Channel(_channel, { report, key }) {\n const segments = key\n .split(/[/.:]/) // split on / or : as likely channel namespacers\n .filter((s) => s !== ''); // filter out empty segments\n if (!segments.every((segment) => /^{.+}$/.test(segment) || /^[a-z0-9-.]+$/.test(segment))) {\n report({\n message: `\\`${key}\\` does not use kebab-case.`,\n location: { reportOnKey: true },\n });\n }\n },\n };\n};\nexports.ChannelsKebabCase = ChannelsKebabCase;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.preprocessors = exports.rules = void 0;\nconst assertions_1 = require(\"../common/assertions\");\nconst struct_1 = require(\"../common/struct\");\nconst info_contact_1 = require(\"../common/info-contact\");\nconst info_license_strict_1 = require(\"../common/info-license-strict\");\nconst operation_operationId_1 = require(\"../common/operation-operationId\");\nconst tag_description_1 = require(\"../common/tag-description\");\nconst tags_alphabetical_1 = require(\"../common/tags-alphabetical\");\nconst channels_kebab_case_1 = require(\"./channels-kebab-case\");\nconst no_channel_trailing_slash_1 = require(\"./no-channel-trailing-slash\");\nexports.rules = {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-ignore TODO: This is depricated property `spec` and should be removed in the future\n spec: struct_1.Struct,\n struct: struct_1.Struct,\n assertions: assertions_1.Assertions,\n 'info-contact': info_contact_1.InfoContact,\n 'info-license-strict': info_license_strict_1.InfoLicenseStrict,\n 'operation-operationId': operation_operationId_1.OperationOperationId,\n 'channels-kebab-case': channels_kebab_case_1.ChannelsKebabCase,\n 'no-channel-trailing-slash': no_channel_trailing_slash_1.NoChannelTrailingSlash,\n 'tag-description': tag_description_1.TagDescription,\n 'tags-alphabetical': tags_alphabetical_1.TagsAlphabetical,\n};\nexports.preprocessors = {};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoChannelTrailingSlash = void 0;\nconst NoChannelTrailingSlash = () => {\n return {\n Channel(_channel, { report, key, location }) {\n if (key.endsWith('/') && key !== '/') {\n report({\n message: `\\`${key}\\` should not have a trailing slash.`,\n location: location.key(),\n });\n }\n },\n };\n};\nexports.NoChannelTrailingSlash = NoChannelTrailingSlash;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChannelsKebabCase = void 0;\nconst ChannelsKebabCase = () => {\n return {\n Channel(channel, { report }) {\n const segments = (channel.address || '')\n .split(/[/.:]/) // split on / or : as likely channel namespacers\n .filter((s) => s !== ''); // filter out empty segments\n if (!segments.every((segment) => /^{.+}$/.test(segment) || /^[a-z0-9-.]+$/.test(segment))) {\n report({\n message: `\\`${channel.address}\\` does not use kebab-case.`,\n location: { reportOnKey: true },\n });\n }\n },\n };\n};\nexports.ChannelsKebabCase = ChannelsKebabCase;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.preprocessors = exports.rules = void 0;\nconst assertions_1 = require(\"../common/assertions\");\nconst struct_1 = require(\"../common/struct\");\nconst info_contact_1 = require(\"../common/info-contact\");\nconst info_license_strict_1 = require(\"../common/info-license-strict\");\nconst operation_operationId_1 = require(\"../common/operation-operationId\");\nconst tag_description_1 = require(\"../common/tag-description\");\nconst tags_alphabetical_1 = require(\"../common/tags-alphabetical\");\nconst channels_kebab_case_1 = require(\"./channels-kebab-case\");\nconst no_channel_trailing_slash_1 = require(\"./no-channel-trailing-slash\");\nexports.rules = {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-ignore TODO: This is depricated property `spec` and should be removed in the future\n spec: struct_1.Struct,\n struct: struct_1.Struct,\n assertions: assertions_1.Assertions,\n 'info-contact': info_contact_1.InfoContact,\n 'info-license-strict': info_license_strict_1.InfoLicenseStrict,\n 'operation-operationId': operation_operationId_1.OperationOperationId,\n 'channels-kebab-case': channels_kebab_case_1.ChannelsKebabCase,\n 'no-channel-trailing-slash': no_channel_trailing_slash_1.NoChannelTrailingSlash,\n 'tag-description': tag_description_1.TagDescription,\n 'tags-alphabetical': tags_alphabetical_1.TagsAlphabetical,\n};\nexports.preprocessors = {};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoChannelTrailingSlash = void 0;\nconst NoChannelTrailingSlash = () => {\n return {\n Channel(channel, { report, location }) {\n if (channel.address.endsWith('/') && channel.address !== '/') {\n report({\n message: `\\`${channel.address}\\` should not have a trailing slash.`,\n location: location.key(),\n });\n }\n },\n };\n};\nexports.NoChannelTrailingSlash = NoChannelTrailingSlash;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.asserts = exports.runOnValuesSet = exports.runOnKeysSet = void 0;\nexports.buildAssertCustomFunction = buildAssertCustomFunction;\nconst utils_1 = require(\"../../../utils\");\nconst utils_2 = require(\"./utils\");\nexports.runOnKeysSet = new Set([\n 'mutuallyExclusive',\n 'mutuallyRequired',\n 'enum',\n 'pattern',\n 'notPattern',\n 'minLength',\n 'maxLength',\n 'casing',\n 'sortOrder',\n 'disallowed',\n 'required',\n 'requireAny',\n 'ref',\n 'const',\n 'defined', // In case if `property` for assertions is not added\n]);\nexports.runOnValuesSet = new Set([\n 'pattern',\n 'notPattern',\n 'enum',\n 'defined',\n 'undefined',\n 'nonEmpty',\n 'minLength',\n 'maxLength',\n 'casing',\n 'sortOrder',\n 'ref',\n 'const',\n]);\nexports.asserts = {\n pattern: (value, condition, { baseLocation, rawValue }) => {\n if (typeof value === 'undefined' || (0, utils_1.isPlainObject)(value))\n return []; // property doesn't exist or is an object, no need to lint it with this assert\n const values = Array.isArray(value) ? value : [value];\n const regex = (0, utils_2.regexFromString)(condition);\n return values\n .map((_val) => !regex?.test(_val) && {\n message: `\"${_val}\" should match a regex ${condition}`,\n location: (0, utils_1.isString)(value)\n ? baseLocation\n : (0, utils_1.isPlainObject)(rawValue)\n ? baseLocation.child(_val).key()\n : baseLocation.key(),\n })\n .filter(utils_1.isTruthy);\n },\n notPattern: (value, condition, { baseLocation, rawValue }) => {\n if (typeof value === 'undefined' || (0, utils_1.isPlainObject)(value))\n return []; // property doesn't exist or is an object, no need to lint it with this assert\n const values = Array.isArray(value) ? value : [value];\n const regex = (0, utils_2.regexFromString)(condition);\n return values\n .map((_val) => regex?.test(_val) && {\n message: `\"${_val}\" should not match a regex ${condition}`,\n location: (0, utils_1.isString)(value)\n ? baseLocation\n : (0, utils_1.isPlainObject)(rawValue)\n ? baseLocation.child(_val).key()\n : baseLocation.key(),\n })\n .filter(utils_1.isTruthy);\n },\n enum: (value, condition, { baseLocation }) => {\n if (typeof value === 'undefined' || (0, utils_1.isPlainObject)(value))\n return []; // property doesn't exist or is an object, no need to lint it with this assert\n const values = Array.isArray(value) ? value : [value];\n return values\n .map((_val) => !condition.includes(_val) && {\n message: `\"${_val}\" should be one of the predefined values`,\n location: (0, utils_1.isString)(value) ? baseLocation : baseLocation.child(_val).key(),\n })\n .filter(utils_1.isTruthy);\n },\n defined: (value, condition = true, { baseLocation }) => {\n const isDefined = typeof value !== 'undefined';\n const isValid = condition ? isDefined : !isDefined;\n return isValid\n ? []\n : [\n {\n message: condition ? `Should be defined` : 'Should be not defined',\n location: baseLocation,\n },\n ];\n },\n required: (value, keys, { baseLocation }) => {\n return keys\n .map((requiredKey) => !value.includes(requiredKey) && {\n message: `${requiredKey} is required`,\n location: baseLocation.key(),\n })\n .filter(utils_1.isTruthy);\n },\n disallowed: (value, condition, { baseLocation }) => {\n if (typeof value === 'undefined' || (0, utils_1.isPlainObject)(value))\n return []; // property doesn't exist or is an object, no need to lint it with this assert\n const values = Array.isArray(value) ? value : [value];\n return values\n .map((_val) => condition.includes(_val) && {\n message: `\"${_val}\" is disallowed`,\n location: (0, utils_1.isString)(value) ? baseLocation : baseLocation.child(_val).key(),\n })\n .filter(utils_1.isTruthy);\n },\n const: (value, condition, { baseLocation }) => {\n if (typeof value === 'undefined')\n return [];\n if (Array.isArray(value)) {\n return value\n .map((_val) => condition !== _val && {\n message: `\"${_val}\" should be equal ${condition} `,\n location: (0, utils_1.isString)(value) ? baseLocation : baseLocation.child(_val).key(),\n })\n .filter(utils_1.isTruthy);\n }\n else {\n return value !== condition\n ? [\n {\n message: `${value} should be equal ${condition}`,\n location: baseLocation,\n },\n ]\n : [];\n }\n },\n undefined: (value, condition = true, { baseLocation }) => {\n const isUndefined = typeof value === 'undefined';\n const isValid = condition ? isUndefined : !isUndefined;\n return isValid\n ? []\n : [\n {\n message: condition ? `Should not be defined` : 'Should be defined',\n location: baseLocation,\n },\n ];\n },\n nonEmpty: (value, condition = true, { baseLocation }) => {\n const isEmpty = typeof value === 'undefined' || value === null || value === '';\n const isValid = condition ? !isEmpty : isEmpty;\n return isValid\n ? []\n : [\n {\n message: condition ? `Should not be empty` : 'Should be empty',\n location: baseLocation,\n },\n ];\n },\n minLength: (value, condition, { baseLocation }) => {\n if (typeof value === 'undefined' || value.length >= condition)\n return []; // property doesn't exist, no need to lint it with this assert\n return [\n {\n message: `Should have at least ${condition} characters`,\n location: baseLocation,\n },\n ];\n },\n maxLength: (value, condition, { baseLocation }) => {\n if (typeof value === 'undefined' || value.length <= condition)\n return []; // property doesn't exist, no need to lint it with this assert\n return [\n {\n message: `Should have at most ${condition} characters`,\n location: baseLocation,\n },\n ];\n },\n casing: (value, condition, { baseLocation }) => {\n if (typeof value === 'undefined' || (0, utils_1.isPlainObject)(value))\n return []; // property doesn't exist or is an object, no need to lint it with this assert\n const values = Array.isArray(value) ? value : [value];\n const casingRegexes = {\n camelCase: /^[a-z][a-zA-Z0-9]*$/g,\n 'kebab-case': /^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/g,\n snake_case: /^([a-z][a-z0-9]*)(_[a-z0-9]+)*$/g,\n PascalCase: /^[A-Z][a-zA-Z0-9]+$/g,\n MACRO_CASE: /^([A-Z][A-Z0-9]*)(_[A-Z0-9]+)*$/g,\n 'COBOL-CASE': /^([A-Z][A-Z0-9]*)(-[A-Z0-9]+)*$/g,\n flatcase: /^[a-z][a-z0-9]+$/g,\n };\n return values\n .map((_val) => !_val.match(casingRegexes[condition]) && {\n message: `\"${_val}\" should use ${condition}`,\n location: (0, utils_1.isString)(value) ? baseLocation : baseLocation.child(_val).key(),\n })\n .filter(utils_1.isTruthy);\n },\n sortOrder: (value, condition, { baseLocation }) => {\n const direction = condition.direction || condition;\n const property = condition.property;\n if (Array.isArray(value) && value.length > 0 && typeof value[0] === 'object' && !property) {\n return [\n {\n message: `Please define a property to sort objects by`,\n location: baseLocation,\n },\n ];\n }\n if (typeof value === 'undefined' || (0, utils_2.isOrdered)(value, condition))\n return [];\n return [\n {\n message: `Should be sorted in ${direction === 'asc' ? 'an ascending' : 'a descending'} order${property ? ` by property ${property}` : ''}`,\n location: baseLocation,\n },\n ];\n },\n mutuallyExclusive: (value, condition, { baseLocation }) => {\n if ((0, utils_2.getIntersectionLength)(value, condition) < 2)\n return [];\n return [\n {\n message: `${condition.join(', ')} keys should be mutually exclusive`,\n location: baseLocation.key(),\n },\n ];\n },\n mutuallyRequired: (value, condition, { baseLocation }) => {\n const isValid = (0, utils_2.getIntersectionLength)(value, condition) > 0\n ? (0, utils_2.getIntersectionLength)(value, condition) === condition.length\n : true;\n return isValid\n ? []\n : [\n {\n message: `Properties ${condition.join(', ')} are mutually required`,\n location: baseLocation.key(),\n },\n ];\n },\n requireAny: (value, condition, { baseLocation }) => {\n return (0, utils_2.getIntersectionLength)(value, condition) >= 1\n ? []\n : [\n {\n message: `Should have any of ${condition.join(', ')}`,\n location: baseLocation.key(),\n },\n ];\n },\n ref: (_value, condition, { baseLocation, rawValue }) => {\n if (typeof rawValue === 'undefined')\n return []; // property doesn't exist, no need to lint it with this assert\n const hasRef = rawValue.hasOwnProperty('$ref');\n if (typeof condition === 'boolean') {\n const isValid = condition ? hasRef : !hasRef;\n return isValid\n ? []\n : [\n {\n message: condition ? `should use $ref` : 'should not use $ref',\n location: hasRef ? baseLocation : baseLocation.key(),\n },\n ];\n }\n const regex = (0, utils_2.regexFromString)(condition);\n const isValid = hasRef && regex?.test(rawValue['$ref']);\n return isValid\n ? []\n : [\n {\n message: `$ref value should match ${condition}`,\n location: hasRef ? baseLocation : baseLocation.key(),\n },\n ];\n },\n};\nfunction buildAssertCustomFunction(fn) {\n return (value, options, ctx) => fn.call(null, value, options, ctx);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Assertions = void 0;\nconst utils_1 = require(\"./utils\");\nconst utils_2 = require(\"../../../utils\");\nconst Assertions = (opts) => {\n const visitors = [];\n // As 'Assertions' has an array of asserts,\n // that array spreads into an 'opts' object on init rules phase here\n // https://github.com/Redocly/redocly-cli/blob/main/packages/core/src/config/config.ts#L311\n // that is why we need to iterate through 'opts' values;\n // before - filter only object 'opts' values\n const assertions = Object.values(opts).filter((opt) => typeof opt === 'object' && opt !== null);\n for (const [_, assertion] of assertions.entries()) {\n if (!(0, utils_2.isString)(assertion.subject.type)) {\n throw new Error(`${assertion.assertionId}: 'type' (String) is required`);\n }\n const subjectVisitor = (0, utils_1.buildSubjectVisitor)(assertion.assertionId, assertion);\n const visitorObject = (0, utils_1.buildVisitorObject)(assertion, subjectVisitor);\n visitors.push(visitorObject);\n }\n return visitors;\n};\nexports.Assertions = Assertions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getAssertsToApply = getAssertsToApply;\nexports.buildVisitorObject = buildVisitorObject;\nexports.buildSubjectVisitor = buildSubjectVisitor;\nexports.getIntersectionLength = getIntersectionLength;\nexports.isOrdered = isOrdered;\nexports.runAssertion = runAssertion;\nexports.regexFromString = regexFromString;\nconst asserts_1 = require(\"./asserts\");\nconst logger_1 = require(\"../../../logger\");\nconst ref_utils_1 = require(\"../../../ref-utils\");\nconst utils_1 = require(\"../../../utils\");\nconst assertionMessageTemplates = {\n problems: '{{problems}}',\n};\nfunction getPredicatesFromLocators(locators) {\n const { filterInParentKeys, filterOutParentKeys, matchParentKeys } = locators;\n const keyMatcher = matchParentKeys && regexFromString(matchParentKeys);\n const matchKeysPredicate = keyMatcher && ((key) => keyMatcher.test(key.toString()));\n const filterInPredicate = Array.isArray(filterInParentKeys) &&\n ((key) => filterInParentKeys.includes(key.toString()));\n const filterOutPredicate = Array.isArray(filterOutParentKeys) &&\n ((key) => !filterOutParentKeys.includes(key.toString()));\n return [matchKeysPredicate, filterInPredicate, filterOutPredicate].filter(utils_1.isTruthy);\n}\nfunction getAssertsToApply(assertion) {\n const assertsToApply = (0, utils_1.keysOf)(asserts_1.asserts)\n .filter((assertName) => assertion.assertions[assertName] !== undefined)\n .map((assertName) => {\n return {\n name: assertName,\n conditions: assertion.assertions[assertName],\n runsOnKeys: asserts_1.runOnKeysSet.has(assertName),\n runsOnValues: asserts_1.runOnValuesSet.has(assertName),\n };\n });\n const shouldRunOnKeys = assertsToApply.find((assert) => assert.runsOnKeys && !assert.runsOnValues);\n const shouldRunOnValues = assertsToApply.find((assert) => assert.runsOnValues && !assert.runsOnKeys);\n if (shouldRunOnValues && !assertion.subject.property) {\n throw new Error(`The '${shouldRunOnValues.name}' assertion can't be used on all keys. Please provide a single property.`);\n }\n if (shouldRunOnKeys && assertion.subject.property) {\n throw new Error(`The '${shouldRunOnKeys.name}' assertion can't be used on properties. Please remove the 'property' key.`);\n }\n return assertsToApply;\n}\nfunction getAssertionProperties({ subject }) {\n return (Array.isArray(subject.property) ? subject.property : [subject?.property]).filter(Boolean);\n}\nfunction applyAssertions(assertionDefinition, asserts, ctx) {\n const properties = getAssertionProperties(assertionDefinition);\n const assertResults = [];\n for (const assert of asserts) {\n if (properties.length) {\n for (const property of properties) {\n assertResults.push(runAssertion({\n assert,\n ctx,\n assertionProperty: property,\n }));\n }\n }\n else {\n assertResults.push(runAssertion({\n assert,\n ctx,\n }));\n }\n }\n return assertResults.flat();\n}\nfunction buildVisitorObject(assertion, subjectVisitor) {\n const targetVisitorLocatorPredicates = getPredicatesFromLocators(assertion.subject);\n const targetVisitorSkipFunction = targetVisitorLocatorPredicates.length\n ? (_, key) => !targetVisitorLocatorPredicates.every((predicate) => predicate(key))\n : undefined;\n const targetVisitor = {\n [assertion.subject.type]: {\n enter: subjectVisitor,\n ...(targetVisitorSkipFunction && { skip: targetVisitorSkipFunction }),\n },\n };\n if (!Array.isArray(assertion.where)) {\n return targetVisitor;\n }\n let currentVisitorLevel = {};\n const visitor = currentVisitorLevel;\n const context = assertion.where;\n for (let index = 0; index < context.length; index++) {\n const assertionDefinitionNode = context[index];\n if (!(0, utils_1.isString)(assertionDefinitionNode.subject?.type)) {\n throw new Error(`${assertion.assertionId} -> where -> [${index}]: 'type' (String) is required`);\n }\n const locatorPredicates = getPredicatesFromLocators(assertionDefinitionNode.subject);\n const assertsToApply = getAssertsToApply(assertionDefinitionNode);\n const skipFunction = (node, key, ctx) => !locatorPredicates.every((predicate) => predicate(key)) ||\n !!applyAssertions(assertionDefinitionNode, assertsToApply, { ...ctx, node }).length;\n const nodeVisitor = {\n ...((locatorPredicates.length || assertsToApply.length) && { skip: skipFunction }),\n };\n if (assertionDefinitionNode.subject.type === assertion.subject.type &&\n index === context.length - 1) {\n // We have to merge the visitors if the last node inside the `where` is the same as the subject.\n targetVisitor[assertion.subject.type] = {\n enter: subjectVisitor,\n ...((nodeVisitor.skip && { skip: nodeVisitor.skip }) ||\n (targetVisitorSkipFunction && {\n skip: (node, key, ctx // We may have locators defined on assertion level and on where level for the same node type\n ) => !!(nodeVisitor.skip?.(node, key, ctx) || targetVisitorSkipFunction?.(node, key)),\n })),\n };\n }\n else {\n currentVisitorLevel = currentVisitorLevel[assertionDefinitionNode.subject?.type] =\n nodeVisitor;\n }\n }\n currentVisitorLevel[assertion.subject.type] = targetVisitor[assertion.subject.type];\n return visitor;\n}\nfunction buildSubjectVisitor(assertId, assertion) {\n return (node, ctx) => {\n const properties = getAssertionProperties(assertion);\n const defaultMessage = `${logger_1.colorize.blue(assertId)} failed because the ${logger_1.colorize.blue(assertion.subject.type)} ${logger_1.colorize.blue(properties.join(', '))} didn't meet the assertions: ${assertionMessageTemplates.problems}`.replace(/ +/g, ' ');\n const problems = applyAssertions(assertion, getAssertsToApply(assertion), {\n ...ctx,\n node,\n });\n if (problems.length) {\n for (const problemGroup of groupProblemsByPointer(problems)) {\n const message = assertion.message || defaultMessage;\n const problemMessage = getProblemsMessage(problemGroup);\n ctx.report({\n message: message.replace(assertionMessageTemplates.problems, problemMessage),\n location: getProblemsLocation(problemGroup) || ctx.location,\n forceSeverity: assertion.severity || 'error',\n suggest: assertion.suggest || [],\n ruleId: assertId,\n });\n }\n }\n };\n}\nfunction groupProblemsByPointer(problems) {\n const groups = {};\n for (const problem of problems) {\n if (!problem.location)\n continue;\n const pointer = problem.location.pointer;\n groups[pointer] = groups[pointer] || [];\n groups[pointer].push(problem);\n }\n return Object.values(groups);\n}\nfunction getProblemsLocation(problems) {\n return problems.length ? problems[0].location : undefined;\n}\nfunction getProblemsMessage(problems) {\n return problems.length === 1\n ? problems[0].message ?? ''\n : problems.map((problem) => `\\n- ${problem.message ?? ''}`).join('');\n}\nfunction getIntersectionLength(keys, properties) {\n const props = new Set(properties);\n let count = 0;\n for (const key of keys) {\n if (props.has(key)) {\n count++;\n }\n }\n return count;\n}\nfunction isOrdered(value, options) {\n const direction = options.direction || options;\n const property = options.property;\n for (let i = 1; i < value.length; i++) {\n let currValue = value[i];\n let prevVal = value[i - 1];\n if (property) {\n const currPropValue = value[i][property];\n const prevPropValue = value[i - 1][property];\n if (!currPropValue || !prevPropValue) {\n return false; // property doesn't exist, so collection is not ordered\n }\n currValue = currPropValue;\n prevVal = prevPropValue;\n }\n if (typeof currValue === 'string' && typeof prevVal === 'string') {\n currValue = currValue.toLowerCase();\n prevVal = prevVal.toLowerCase();\n }\n const result = direction === 'asc' ? currValue >= prevVal : currValue <= prevVal;\n if (!result) {\n return false;\n }\n }\n return true;\n}\nfunction runAssertion({ assert, ctx, assertionProperty, }) {\n const currentLocation = assert.name === 'ref' ? ctx.rawLocation : ctx.location;\n if (assertionProperty) {\n const values = (0, ref_utils_1.isRef)(ctx.node[assertionProperty])\n ? ctx.resolve(ctx.node[assertionProperty])?.node\n : ctx.node[assertionProperty];\n const rawValues = ctx.rawNode[assertionProperty];\n const location = currentLocation.child(assertionProperty);\n return asserts_1.asserts[assert.name](values, assert.conditions, {\n ...ctx,\n baseLocation: location,\n rawValue: rawValues,\n });\n }\n else {\n const value = Array.isArray(ctx.node) ? ctx.node : Object.keys(ctx.node);\n return asserts_1.asserts[assert.name](value, assert.conditions, {\n ...ctx,\n rawValue: ctx.rawNode,\n baseLocation: currentLocation,\n });\n }\n}\nfunction regexFromString(input) {\n const matches = input.match(/^\\/(.*)\\/(.*)|(.*)/);\n return matches && new RegExp(matches[1] || matches[3], matches[2]);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InfoContact = void 0;\nconst utils_1 = require(\"../utils\");\nconst InfoContact = () => {\n return {\n Info(info, { report, location }) {\n if (!info.contact) {\n report({\n message: (0, utils_1.missingRequiredField)('Info', 'contact'),\n location: location.child('contact').key(),\n });\n }\n },\n };\n};\nexports.InfoContact = InfoContact;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InfoLicenseStrict = void 0;\nconst oas_types_1 = require(\"../../oas-types\");\nconst utils_1 = require(\"../utils\");\nconst InfoLicenseStrict = () => {\n let specVersion;\n return {\n Root: {\n enter(root) {\n specVersion = (0, oas_types_1.detectSpec)(root);\n },\n License: {\n leave(license, ctx) {\n if (specVersion === 'oas3_1') {\n (0, utils_1.validateOneOfDefinedAndNonEmpty)(['url', 'identifier'], license, ctx);\n }\n else {\n (0, utils_1.validateDefinedAndNonEmpty)('url', license, ctx);\n }\n },\n },\n },\n };\n};\nexports.InfoLicenseStrict = InfoLicenseStrict;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InfoLicenseUrl = void 0;\nconst utils_1 = require(\"../utils\");\nconst InfoLicenseUrl = () => {\n return {\n License(license, ctx) {\n (0, utils_1.validateDefinedAndNonEmpty)('url', license, ctx);\n },\n };\n};\nexports.InfoLicenseUrl = InfoLicenseUrl;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InfoLicense = void 0;\nconst utils_1 = require(\"../utils\");\nconst InfoLicense = () => {\n return {\n Info(info, { report }) {\n if (!info.license) {\n report({\n message: (0, utils_1.missingRequiredField)('Info', 'license'),\n location: { reportOnKey: true },\n });\n }\n },\n };\n};\nexports.InfoLicense = InfoLicense;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoAmbiguousPaths = void 0;\nconst NoAmbiguousPaths = () => {\n return {\n Paths(pathMap, { report, location }) {\n const seenPaths = [];\n for (const currentPath of Object.keys(pathMap)) {\n const ambiguousPath = seenPaths.find((seenPath) => arePathsAmbiguous(seenPath, currentPath));\n if (ambiguousPath) {\n report({\n message: `Paths should resolve unambiguously. Found two ambiguous paths: \\`${ambiguousPath}\\` and \\`${currentPath}\\`.`,\n location: location.child([currentPath]).key(),\n });\n }\n seenPaths.push(currentPath);\n }\n },\n };\n};\nexports.NoAmbiguousPaths = NoAmbiguousPaths;\nfunction arePathsAmbiguous(a, b) {\n const partsA = a.split('/');\n const partsB = b.split('/');\n if (partsA.length !== partsB.length)\n return false;\n let aVars = 0;\n let bVars = 0;\n let ambiguous = true;\n for (let i = 0; i < partsA.length; i++) {\n const aIsVar = partsA[i].match(/^{.+?}$/);\n const bIsVar = partsB[i].match(/^{.+?}$/);\n if (aIsVar || bIsVar) {\n if (aIsVar)\n aVars++;\n if (bIsVar)\n bVars++;\n continue;\n }\n else if (partsA[i] !== partsB[i]) {\n ambiguous = false;\n }\n }\n return ambiguous && aVars === bVars;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoEnumTypeMismatch = void 0;\nconst utils_1 = require(\"../utils\");\nconst NoEnumTypeMismatch = () => {\n return {\n Schema(schema, { report, location }) {\n if (schema.enum && !Array.isArray(schema.enum))\n return;\n if (schema.enum && schema.type && !Array.isArray(schema.type)) {\n const typeMismatchedValues = schema.enum.filter((item) => !(0, utils_1.matchesJsonSchemaType)(item, schema.type, schema.nullable));\n for (const mismatchedValue of typeMismatchedValues) {\n report({\n message: `All values of \\`enum\\` field must be of the same type as the \\`type\\` field: expected \"${schema.type}\" but received \"${(0, utils_1.oasTypeOf)(mismatchedValue)}\".`,\n location: location.child(['enum', schema.enum.indexOf(mismatchedValue)]),\n });\n }\n }\n if (schema.enum && schema.type && Array.isArray(schema.type)) {\n const mismatchedResults = {};\n for (const enumValue of schema.enum) {\n mismatchedResults[enumValue] = [];\n for (const type of schema.type) {\n const valid = (0, utils_1.matchesJsonSchemaType)(enumValue, type, schema.nullable);\n if (!valid)\n mismatchedResults[enumValue].push(type);\n }\n if (mismatchedResults[enumValue].length !== schema.type.length)\n delete mismatchedResults[enumValue];\n }\n for (const mismatchedKey of Object.keys(mismatchedResults)) {\n report({\n message: `Enum value \\`${mismatchedKey}\\` must be of allowed types: \\`${schema.type}\\`.`,\n location: location.child(['enum', schema.enum.indexOf(mismatchedKey)]),\n });\n }\n }\n },\n };\n};\nexports.NoEnumTypeMismatch = NoEnumTypeMismatch;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoHttpVerbsInPaths = void 0;\nconst utils_1 = require(\"../../utils\");\nconst httpMethods = ['get', 'head', 'post', 'put', 'patch', 'delete', 'options', 'trace'];\nconst NoHttpVerbsInPaths = ({ splitIntoWords }) => {\n return {\n PathItem(_path, { key, report, location }) {\n const pathKey = key.toString();\n if (!pathKey.startsWith('/'))\n return;\n const pathSegments = pathKey.split('/');\n for (const pathSegment of pathSegments) {\n if (!pathSegment || (0, utils_1.isPathParameter)(pathSegment))\n continue;\n const isHttpMethodIncluded = (method) => {\n return splitIntoWords\n ? (0, utils_1.splitCamelCaseIntoWords)(pathSegment).has(method)\n : pathSegment.toLocaleLowerCase().includes(method);\n };\n for (const method of httpMethods) {\n if (isHttpMethodIncluded(method)) {\n report({\n message: `path \\`${pathKey}\\` should not contain http verb ${method}`,\n location: location.key(),\n });\n }\n }\n }\n },\n };\n};\nexports.NoHttpVerbsInPaths = NoHttpVerbsInPaths;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoIdenticalPaths = void 0;\nconst NoIdenticalPaths = () => {\n return {\n Paths(pathMap, { report, location }) {\n const Paths = new Map();\n for (const pathName of Object.keys(pathMap)) {\n const id = pathName.replace(/{.+?}/g, '{VARIABLE}');\n const existingSamePath = Paths.get(id);\n if (existingSamePath) {\n report({\n message: `The path already exists which differs only by path parameter name(s): \\`${existingSamePath}\\` and \\`${pathName}\\`.`,\n location: location.child([pathName]).key(),\n });\n }\n else {\n Paths.set(id, pathName);\n }\n }\n },\n };\n};\nexports.NoIdenticalPaths = NoIdenticalPaths;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoInvalidParameterExamples = void 0;\nconst utils_1 = require(\"../utils\");\nconst NoInvalidParameterExamples = (opts) => {\n const allowAdditionalProperties = (0, utils_1.getAdditionalPropertiesOption)(opts) ?? false;\n return {\n Parameter: {\n leave(parameter, ctx) {\n if (parameter.example !== undefined) {\n (0, utils_1.validateExample)(parameter.example, parameter.schema, ctx.location.child('example'), ctx, allowAdditionalProperties);\n }\n if (parameter.examples) {\n for (const [key, example] of Object.entries(parameter.examples)) {\n if ('value' in example) {\n (0, utils_1.validateExample)(example.value, parameter.schema, ctx.location.child(['examples', key]), ctx, true);\n }\n }\n }\n },\n },\n };\n};\nexports.NoInvalidParameterExamples = NoInvalidParameterExamples;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoInvalidSchemaExamples = void 0;\nconst utils_1 = require(\"../utils\");\nconst NoInvalidSchemaExamples = (opts) => {\n const allowAdditionalProperties = (0, utils_1.getAdditionalPropertiesOption)(opts) ?? false;\n return {\n Schema: {\n leave(schema, ctx) {\n const examples = schema.examples;\n if (examples) {\n for (const example of examples) {\n (0, utils_1.validateExample)(example, schema, ctx.location.child(['examples', examples.indexOf(example)]), ctx, allowAdditionalProperties);\n }\n }\n if (schema.example !== undefined) {\n // Handle nullable example for OAS3\n if (schema.nullable === true &&\n schema.example === null &&\n schema.type !== undefined) {\n return;\n }\n (0, utils_1.validateExample)(schema.example, schema, ctx.location.child('example'), ctx, true);\n }\n },\n },\n };\n};\nexports.NoInvalidSchemaExamples = NoInvalidSchemaExamples;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoPathTrailingSlash = void 0;\nconst NoPathTrailingSlash = () => {\n return {\n PathItem(_path, { report, key, rawLocation }) {\n if (key.endsWith('/') && key !== '/') {\n report({\n message: `\\`${key}\\` should not have a trailing slash.`,\n location: rawLocation.key(),\n });\n }\n },\n };\n};\nexports.NoPathTrailingSlash = NoPathTrailingSlash;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoRequiredSchemaPropertiesUndefined = void 0;\nconst ref_utils_1 = require(\"../../ref-utils\");\nconst NoRequiredSchemaPropertiesUndefined = () => {\n return {\n Schema: {\n enter(schema, { location, report, resolve }) {\n if (!schema.required)\n return;\n const visitedSchemas = new Set();\n const elevateProperties = (schema) => {\n // Check if the schema has been visited before processing it\n if (visitedSchemas.has(schema)) {\n return {};\n }\n visitedSchemas.add(schema);\n if ((0, ref_utils_1.isRef)(schema)) {\n return elevateProperties(resolve(schema).node);\n }\n return Object.assign({}, schema.properties, ...(schema.allOf?.map(elevateProperties) ?? []), ...(schema.anyOf?.map(elevateProperties) ?? []));\n };\n const allProperties = elevateProperties(schema);\n for (const [i, requiredProperty] of schema.required.entries()) {\n if (!allProperties || allProperties[requiredProperty] === undefined) {\n report({\n message: `Required property '${requiredProperty}' is undefined.`,\n location: location.child(['required', i]),\n });\n }\n }\n },\n },\n };\n};\nexports.NoRequiredSchemaPropertiesUndefined = NoRequiredSchemaPropertiesUndefined;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoSchemaTypeMismatch = void 0;\nconst NoSchemaTypeMismatch = () => {\n return {\n Schema(schema, { report, location }) {\n if (schema.type === 'object' && schema.items) {\n report({\n message: \"Schema type mismatch: 'object' type should not contain 'items' field.\",\n location: location.child('items'),\n });\n }\n if (schema.type === 'array' && schema.properties) {\n report({\n message: \"Schema type mismatch: 'array' type should not contain 'properties' field.\",\n location: location.child('properties'),\n });\n }\n },\n };\n};\nexports.NoSchemaTypeMismatch = NoSchemaTypeMismatch;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Operation2xxResponse = void 0;\nconst utils_1 = require(\"../utils\");\nconst Operation2xxResponse = ({ validateWebhooks }) => {\n return {\n Paths: {\n Responses(responses, { report }) {\n const codes = Object.keys(responses || {});\n (0, utils_1.validateResponseCodes)(codes, '2XX', { report });\n },\n },\n WebhooksMap: {\n Responses(responses, { report }) {\n if (!validateWebhooks)\n return;\n const codes = Object.keys(responses || {});\n (0, utils_1.validateResponseCodes)(codes, '2XX', { report });\n },\n },\n };\n};\nexports.Operation2xxResponse = Operation2xxResponse;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Operation4xxResponse = void 0;\nconst utils_1 = require(\"../utils\");\nconst Operation4xxResponse = ({ validateWebhooks }) => {\n return {\n Paths: {\n Responses(responses, { report }) {\n const codes = Object.keys(responses || {});\n (0, utils_1.validateResponseCodes)(codes, '4XX', { report });\n },\n },\n WebhooksMap: {\n Responses(responses, { report }) {\n if (!validateWebhooks)\n return;\n const codes = Object.keys(responses || {});\n (0, utils_1.validateResponseCodes)(codes, '4XX', { report });\n },\n },\n };\n};\nexports.Operation4xxResponse = Operation4xxResponse;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OperationDescription = void 0;\nconst utils_1 = require(\"../utils\");\nconst OperationDescription = () => {\n return {\n Operation(operation, ctx) {\n (0, utils_1.validateDefinedAndNonEmpty)('description', operation, ctx);\n },\n };\n};\nexports.OperationDescription = OperationDescription;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OperationIdUnique = void 0;\nconst OperationIdUnique = () => {\n const seenOperations = new Set();\n return {\n Operation(operation, { report, location }) {\n if (!operation.operationId)\n return;\n if (seenOperations.has(operation.operationId)) {\n report({\n message: 'Every operation must have a unique `operationId`.',\n location: location.child([operation.operationId]),\n });\n }\n seenOperations.add(operation.operationId);\n },\n };\n};\nexports.OperationIdUnique = OperationIdUnique;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OperationIdUrlSafe = void 0;\n// eslint-disable-next-line no-useless-escape\nconst validUrlSymbols = /^[A-Za-z0-9-._~:/?#\\[\\]@!\\$&'()*+,;=]*$/;\nconst OperationIdUrlSafe = () => {\n return {\n Operation(operation, { report, location }) {\n if (operation.operationId && !validUrlSymbols.test(operation.operationId)) {\n report({\n message: 'Operation `operationId` should not have URL invalid characters.',\n location: location.child(['operationId']),\n });\n }\n },\n };\n};\nexports.OperationIdUrlSafe = OperationIdUrlSafe;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OperationOperationId = void 0;\nconst utils_1 = require(\"../utils\");\nconst OperationOperationId = () => {\n return {\n Root: {\n PathItem: {\n Operation(operation, ctx) {\n (0, utils_1.validateDefinedAndNonEmpty)('operationId', operation, ctx);\n },\n },\n },\n };\n};\nexports.OperationOperationId = OperationOperationId;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OperationParametersUnique = void 0;\nconst OperationParametersUnique = () => {\n let seenPathParams;\n let seenOperationParams;\n return {\n PathItem: {\n enter() {\n seenPathParams = new Set();\n },\n Parameter(parameter, { report, key, parentLocations }) {\n const paramId = `${parameter.in}___${parameter.name}`;\n if (seenPathParams.has(paramId)) {\n report({\n message: `Paths must have unique \\`name\\` + \\`in\\` parameters.\\nRepeats of \\`in:${parameter.in}\\` + \\`name:${parameter.name}\\`.`,\n location: parentLocations.PathItem.child(['parameters', key]),\n });\n }\n seenPathParams.add(`${parameter.in}___${parameter.name}`);\n },\n Operation: {\n enter() {\n seenOperationParams = new Set();\n },\n Parameter(parameter, { report, key, parentLocations }) {\n const paramId = `${parameter.in}___${parameter.name}`;\n if (seenOperationParams.has(paramId)) {\n report({\n message: `Operations must have unique \\`name\\` + \\`in\\` parameters. Repeats of \\`in:${parameter.in}\\` + \\`name:${parameter.name}\\`.`,\n location: parentLocations.Operation.child(['parameters', key]),\n });\n }\n seenOperationParams.add(paramId);\n },\n },\n },\n };\n};\nexports.OperationParametersUnique = OperationParametersUnique;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OperationSingularTag = void 0;\nconst OperationSingularTag = () => {\n return {\n Operation(operation, { report, location }) {\n if (operation.tags && operation.tags.length > 1) {\n report({\n message: 'Operation `tags` object should have only one tag.',\n location: location.child(['tags']).key(),\n });\n }\n },\n };\n};\nexports.OperationSingularTag = OperationSingularTag;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OperationSummary = void 0;\nconst utils_1 = require(\"../utils\");\nconst OperationSummary = () => {\n return {\n Operation(operation, ctx) {\n (0, utils_1.validateDefinedAndNonEmpty)('summary', operation, ctx);\n },\n };\n};\nexports.OperationSummary = OperationSummary;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OperationTagDefined = void 0;\nconst OperationTagDefined = () => {\n let definedTags;\n return {\n Root(root) {\n definedTags = new Set((root.tags ?? []).map((t) => t.name));\n },\n Operation(operation, { report, location }) {\n if (operation?.tags) {\n for (let i = 0; i < operation.tags.length; i++) {\n if (!definedTags.has(operation.tags[i])) {\n report({\n message: `Operation tags should be defined in global tags.`,\n location: location.child(['tags', i]),\n });\n }\n }\n }\n else {\n report({\n message: `Operation tags should be defined`,\n location: location.key(),\n });\n }\n },\n };\n};\nexports.OperationTagDefined = OperationTagDefined;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ParameterDescription = void 0;\nconst ParameterDescription = () => {\n return {\n Parameter(parameter, { report, location }) {\n if (parameter.description === undefined) {\n report({\n message: 'Parameter object description must be present.',\n location: { reportOnKey: true },\n });\n }\n else if (!parameter.description) {\n report({\n message: 'Parameter object description must be non-empty string.',\n location: location.child(['description']),\n });\n }\n },\n };\n};\nexports.ParameterDescription = ParameterDescription;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PathDeclarationMustExist = void 0;\nconst PathDeclarationMustExist = () => {\n return {\n PathItem(_path, { report, key }) {\n if (key.indexOf('{}') !== -1) {\n report({\n message: 'Path parameter declarations must be non-empty. `{}` is invalid.',\n location: { reportOnKey: true },\n });\n }\n },\n };\n};\nexports.PathDeclarationMustExist = PathDeclarationMustExist;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PathExcludesPatterns = void 0;\nconst PathExcludesPatterns = ({ patterns }) => {\n return {\n PathItem(_path, { report, key, location }) {\n if (!patterns)\n throw new Error(`Parameter \"patterns\" is not provided for \"path-excludes-patterns\" rule`);\n const pathKey = key.toString();\n if (pathKey.startsWith('/')) {\n const matches = patterns.filter((pattern) => pathKey.match(pattern));\n for (const match of matches) {\n report({\n message: `path \\`${pathKey}\\` should not match regex pattern: \\`${match}\\``,\n location: location.key(),\n });\n }\n }\n },\n };\n};\nexports.PathExcludesPatterns = PathExcludesPatterns;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PathHttpVerbsOrder = void 0;\nconst defaultOrder = ['get', 'head', 'post', 'put', 'patch', 'delete', 'options', 'trace'];\nconst PathHttpVerbsOrder = (opts) => {\n const order = (opts && opts.order) || defaultOrder;\n if (!Array.isArray(order)) {\n throw new Error('path-http-verbs-order `order` option must be an array');\n }\n return {\n PathItem(path, { report, location }) {\n const httpVerbs = Object.keys(path).filter((k) => order.includes(k));\n for (let i = 0; i < httpVerbs.length - 1; i++) {\n const aIdx = order.indexOf(httpVerbs[i]);\n const bIdx = order.indexOf(httpVerbs[i + 1]);\n if (bIdx < aIdx) {\n report({\n message: 'Operation http verbs must be ordered.',\n location: { reportOnKey: true, ...location.child(httpVerbs[i + 1]) },\n });\n }\n }\n },\n };\n};\nexports.PathHttpVerbsOrder = PathHttpVerbsOrder;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PathNotIncludeQuery = void 0;\nconst PathNotIncludeQuery = () => {\n return {\n Paths: {\n PathItem(_operation, { report, key }) {\n if (key.toString().includes('?')) {\n report({\n message: `Don't put query string items in the path, they belong in parameters with \\`in: query\\`.`,\n location: { reportOnKey: true },\n });\n }\n },\n },\n };\n};\nexports.PathNotIncludeQuery = PathNotIncludeQuery;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PathParamsDefined = void 0;\nconst pathRegex = /\\{([a-zA-Z0-9_.-]+)\\}+/g;\nconst PathParamsDefined = () => {\n let pathTemplateParams;\n let definedPathParams;\n let currentPath;\n let definedOperationParams;\n return {\n PathItem: {\n enter(_, { key }) {\n definedPathParams = new Set();\n currentPath = key;\n pathTemplateParams = new Set(Array.from(key.toString().matchAll(pathRegex)).map((m) => m[1]));\n },\n Parameter(parameter, { report, location }) {\n if (parameter.in === 'path' && parameter.name) {\n definedPathParams.add(parameter.name);\n if (!pathTemplateParams.has(parameter.name)) {\n report({\n message: `Path parameter \\`${parameter.name}\\` is not used in the path \\`${currentPath}\\`.`,\n location: location.child(['name']),\n });\n }\n }\n },\n Operation: {\n enter() {\n definedOperationParams = new Set();\n },\n leave(_op, { report, location }) {\n for (const templateParam of Array.from(pathTemplateParams.keys())) {\n if (!definedOperationParams.has(templateParam) &&\n !definedPathParams.has(templateParam)) {\n report({\n message: `The operation does not define the path parameter \\`{${templateParam}}\\` expected by path \\`${currentPath}\\`.`,\n location: location.child(['parameters']).key(), // report on operation\n });\n }\n }\n },\n Parameter(parameter, { report, location }) {\n if (parameter.in === 'path' && parameter.name) {\n definedOperationParams.add(parameter.name);\n if (!pathTemplateParams.has(parameter.name)) {\n report({\n message: `Path parameter \\`${parameter.name}\\` is not used in the path \\`${currentPath}\\`.`,\n location: location.child(['name']),\n });\n }\n }\n },\n },\n },\n };\n};\nexports.PathParamsDefined = PathParamsDefined;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PathSegmentPlural = void 0;\nconst pluralize = require(\"pluralize\");\nconst utils_1 = require(\"../../utils\");\nconst PathSegmentPlural = (opts) => {\n const { ignoreLastPathSegment, exceptions } = opts;\n return {\n PathItem: {\n leave(_path, { report, key, location }) {\n const pathKey = key.toString();\n if (pathKey.startsWith('/')) {\n const pathSegments = pathKey.split('/');\n pathSegments.shift();\n if (ignoreLastPathSegment && pathSegments.length > 1) {\n pathSegments.pop();\n }\n for (const pathSegment of pathSegments) {\n if (exceptions && exceptions.includes(pathSegment))\n continue;\n if (!(0, utils_1.isPathParameter)(pathSegment) && pluralize.isSingular(pathSegment)) {\n report({\n message: `path segment \\`${pathSegment}\\` should be plural.`,\n location: location.key(),\n });\n }\n }\n }\n },\n },\n };\n};\nexports.PathSegmentPlural = PathSegmentPlural;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PathsKebabCase = void 0;\nconst PathsKebabCase = () => {\n return {\n PathItem(_path, { report, key }) {\n const segments = key\n .substr(1)\n .split('/')\n .filter((s) => s !== ''); // filter out empty segments\n if (!segments.every((segment) => /^{.+}$/.test(segment) || /^[a-z0-9-.]+$/.test(segment))) {\n report({\n message: `\\`${key}\\` does not use kebab-case.`,\n location: { reportOnKey: true },\n });\n }\n },\n };\n};\nexports.PathsKebabCase = PathsKebabCase;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RequiredStringPropertyMissingMinLength = void 0;\nconst RequiredStringPropertyMissingMinLength = () => {\n let skipSchemaProperties;\n let requiredPropertiesSet;\n return {\n Schema: {\n enter(schema) {\n if (!schema?.required) {\n skipSchemaProperties = true;\n return;\n }\n requiredPropertiesSet = new Set(schema.required);\n skipSchemaProperties = false;\n },\n SchemaProperties: {\n skip() {\n return skipSchemaProperties;\n },\n Schema: {\n enter(schema, { key, location, report }) {\n if (requiredPropertiesSet.has(key) && schema.type === 'string') {\n if (!schema?.minLength) {\n report({\n message: 'Property minLength is required.',\n location: location.key(),\n });\n }\n }\n },\n },\n },\n },\n };\n};\nexports.RequiredStringPropertyMissingMinLength = RequiredStringPropertyMissingMinLength;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ResponseContainsHeader = void 0;\nconst utils_1 = require(\"../../utils\");\nconst ResponseContainsHeader = (options) => {\n const names = options.names || {};\n return {\n Operation: {\n Response: {\n enter: (response, { report, location, key }) => {\n const expectedHeaders = names[key] ||\n names[(0, utils_1.getMatchingStatusCodeRange)(key)] ||\n names[(0, utils_1.getMatchingStatusCodeRange)(key).toLowerCase()] ||\n [];\n for (const expectedHeader of expectedHeaders) {\n if (!response?.headers ||\n !Object.keys(response?.headers).some((header) => header.toLowerCase() === expectedHeader.toLowerCase())) {\n report({\n message: `Response object must contain a \"${expectedHeader}\" header.`,\n location: location.child('headers').key(),\n });\n }\n }\n },\n },\n },\n };\n};\nexports.ResponseContainsHeader = ResponseContainsHeader;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ScalarPropertyMissingExample = void 0;\nconst oas_types_1 = require(\"../../oas-types\");\nconst SCALAR_TYPES = ['string', 'integer', 'number', 'boolean', 'null'];\nconst ScalarPropertyMissingExample = () => {\n return {\n SchemaProperties(properties, { report, location, oasVersion, resolve }) {\n for (const propName of Object.keys(properties)) {\n const propSchema = resolve(properties[propName]).node;\n if (!propSchema || !isScalarSchema(propSchema)) {\n continue;\n }\n if (propSchema.example === undefined &&\n propSchema.examples === undefined) {\n report({\n message: `Scalar property should have \"example\"${oasVersion === oas_types_1.SpecVersion.OAS3_1 ? ' or \"examples\"' : ''} defined.`,\n location: location.child(propName).key(),\n });\n }\n }\n },\n };\n};\nexports.ScalarPropertyMissingExample = ScalarPropertyMissingExample;\nfunction isScalarSchema(schema) {\n if (!schema.type) {\n return false;\n }\n if (schema.allOf || schema.anyOf || schema.oneOf) {\n // Skip allOf/oneOf/anyOf as it's complicated to validate it right now.\n // We need core support for checking contrstrains through those keywords.\n return false;\n }\n if (schema.format === 'binary') {\n return false;\n }\n if (Array.isArray(schema.type)) {\n return schema.type.every((t) => SCALAR_TYPES.includes(t));\n }\n return SCALAR_TYPES.includes(schema.type);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SecurityDefined = void 0;\nconst SecurityDefined = (opts) => {\n const referencedSchemes = new Map();\n const operationsWithoutSecurity = [];\n let eachOperationHasSecurity = true;\n let path;\n return {\n Root: {\n leave(root, { report }) {\n for (const [name, scheme] of referencedSchemes.entries()) {\n if (scheme.defined)\n continue;\n for (const reportedFromLocation of scheme.from) {\n report({\n message: `There is no \\`${name}\\` security scheme defined.`,\n location: reportedFromLocation.key(),\n });\n }\n }\n if (root.security || eachOperationHasSecurity) {\n return;\n }\n else {\n for (const operationLocation of operationsWithoutSecurity) {\n report({\n message: `Every operation should have security defined on it or on the root level.`,\n location: operationLocation.key(),\n });\n }\n }\n },\n },\n SecurityScheme(_securityScheme, { key }) {\n referencedSchemes.set(key.toString(), { defined: true, from: [] });\n },\n SecurityRequirement(requirements, { location }) {\n for (const requirement of Object.keys(requirements)) {\n const authScheme = referencedSchemes.get(requirement);\n const requirementLocation = location.child([requirement]);\n if (!authScheme) {\n referencedSchemes.set(requirement, { from: [requirementLocation] });\n }\n else {\n authScheme.from.push(requirementLocation);\n }\n }\n },\n PathItem: {\n enter(pathItem, { key }) {\n path = key;\n },\n Operation(operation, { location, key }) {\n const isException = opts.exceptions?.some((item) => item.path === path &&\n (!item.methods || item.methods?.some((method) => method.toLowerCase() === key)));\n if (!operation?.security && !isException) {\n eachOperationHasSecurity = false;\n operationsWithoutSecurity.push(location);\n }\n },\n },\n };\n};\nexports.SecurityDefined = SecurityDefined;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SpecStrictRefs = void 0;\nconst ref_utils_1 = require(\"../../ref-utils\");\nconst SpecStrictRefs = () => {\n const nodesToSkip = [\n 'Schema',\n 'Response',\n 'Parameter',\n 'RequestBody',\n 'Example',\n 'Header',\n 'SecurityScheme',\n 'Link',\n 'Callback',\n 'PathItem',\n ];\n return {\n any(_node, { report, rawNode, rawLocation, type }) {\n const shouldCheck = !nodesToSkip.includes(type.name);\n if (shouldCheck && (0, ref_utils_1.isRef)(rawNode)) {\n report({\n message: 'Field $ref is not expected here.',\n location: rawLocation.child('$ref').key(),\n });\n }\n },\n };\n};\nexports.SpecStrictRefs = SpecStrictRefs;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Struct = void 0;\nconst types_1 = require(\"../../types\");\nconst utils_1 = require(\"../utils\");\nconst ref_utils_1 = require(\"../../ref-utils\");\nconst utils_2 = require(\"../../utils\");\nconst Struct = () => {\n return {\n any(node, { report, type, location, rawLocation, key, resolve, ignoreNextVisitorsOnNode }) {\n const nodeType = (0, utils_1.oasTypeOf)(node);\n const refLocation = rawLocation !== location ? rawLocation : undefined;\n if (type.items) {\n if (nodeType !== 'array') {\n report({\n message: `Expected type \\`${type.name}\\` (array) but got \\`${nodeType}\\``,\n from: refLocation,\n });\n ignoreNextVisitorsOnNode();\n }\n return;\n }\n else if (nodeType !== 'object') {\n if (type !== types_1.SpecExtension) {\n // do not validate unknown extensions structure\n report({\n message: `Expected type \\`${type.name}\\` (object) but got \\`${nodeType}\\``,\n from: refLocation,\n });\n }\n ignoreNextVisitorsOnNode();\n return;\n }\n const required = typeof type.required === 'function' ? type.required(node, key) : type.required;\n for (const propName of required || []) {\n if (!node.hasOwnProperty(propName)) {\n report({\n message: `The field \\`${propName}\\` must be present on this level.`,\n from: refLocation,\n location: [{ reportOnKey: true }],\n });\n }\n }\n const allowed = type.allowed?.(node);\n if (allowed && (0, utils_2.isPlainObject)(node)) {\n for (const propName in node) {\n if (allowed.includes(propName) ||\n (type.extensionsPrefix && propName.startsWith(type.extensionsPrefix)) ||\n !Object.keys(type.properties).includes(propName)) {\n continue;\n }\n report({\n message: `The field \\`${propName}\\` is not allowed here.`,\n from: refLocation,\n location: location.child([propName]).key(),\n });\n }\n }\n const requiredOneOf = type.requiredOneOf || null;\n if (requiredOneOf) {\n let hasProperty = false;\n for (const propName of requiredOneOf || []) {\n if (node.hasOwnProperty(propName)) {\n hasProperty = true;\n }\n }\n if (!hasProperty)\n report({\n message: `Must contain at least one of the following fields: ${type.requiredOneOf?.join(', ')}.`,\n from: refLocation,\n location: [{ reportOnKey: true }],\n });\n }\n for (const propName of Object.keys(node)) {\n const propLocation = location.child([propName]);\n let propValue = node[propName];\n let propType = type.properties[propName];\n if (propType === undefined)\n propType = type.additionalProperties;\n if (typeof propType === 'function')\n propType = propType(propValue, propName);\n if ((0, types_1.isNamedType)(propType)) {\n continue; // do nothing for named schema, it is executed with the next any call\n }\n const propSchema = propType;\n const propValueType = (0, utils_1.oasTypeOf)(propValue);\n if (propSchema === undefined) {\n if (propName.startsWith('x-'))\n continue;\n report({\n message: `Property \\`${propName}\\` is not expected here.`,\n suggest: (0, utils_1.getSuggest)(propName, Object.keys(type.properties)),\n from: refLocation,\n location: propLocation.key(),\n });\n continue;\n }\n if (propSchema === null) {\n continue; // just defined, no validation\n }\n if (propSchema.resolvable !== false && (0, ref_utils_1.isRef)(propValue)) {\n propValue = resolve(propValue).node;\n }\n if (propSchema.items && propSchema.items?.enum && Array.isArray(propValue)) {\n for (let i = 0; i < propValue.length; i++) {\n (0, utils_1.validateSchemaEnumType)(propSchema.items?.enum, propValue[i], propName, refLocation, {\n report,\n location: location.child([propName, i]),\n });\n }\n }\n if (propSchema.enum) {\n (0, utils_1.validateSchemaEnumType)(propSchema.enum, propValue, propName, refLocation, {\n report,\n location: location.child([propName]),\n });\n }\n else if (propSchema.type && !(0, utils_1.matchesJsonSchemaType)(propValue, propSchema.type, false)) {\n report({\n message: `Expected type \\`${propSchema.type}\\` but got \\`${propValueType}\\`.`,\n from: refLocation,\n location: propLocation,\n });\n ignoreNextVisitorsOnNode();\n }\n else if (propValueType === 'array' && propSchema.items?.type) {\n const itemsType = propSchema.items?.type;\n for (let i = 0; i < propValue.length; i++) {\n const item = propValue[i];\n if (!(0, utils_1.matchesJsonSchemaType)(item, itemsType, false)) {\n report({\n message: `Expected type \\`${itemsType}\\` but got \\`${(0, utils_1.oasTypeOf)(item)}\\`.`,\n from: refLocation,\n location: propLocation.child([i]),\n });\n }\n }\n }\n if (typeof propSchema.minimum === 'number') {\n if (propSchema.minimum > node[propName]) {\n report({\n message: `The value of the ${propName} field must be greater than or equal to ${propSchema.minimum}`,\n from: refLocation,\n location: location.child([propName]),\n });\n }\n }\n if (propName === 'nullable' && !node.type) {\n report({\n message: 'The `type` field must be defined when the `nullable` field is used.',\n location: location.child([propName]),\n });\n }\n }\n },\n };\n};\nexports.Struct = Struct;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TagDescription = void 0;\nconst utils_1 = require(\"../utils\");\nconst TagDescription = () => {\n return {\n Tag(tag, ctx) {\n (0, utils_1.validateDefinedAndNonEmpty)('description', tag, ctx);\n },\n };\n};\nexports.TagDescription = TagDescription;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TagsAlphabetical = void 0;\nconst TagsAlphabetical = ({ ignoreCase = false }) => {\n return {\n Root(root, { report, location }) {\n if (!root.tags)\n return;\n for (let i = 0; i < root.tags.length - 1; i++) {\n if (getTagName(root.tags[i], ignoreCase) > getTagName(root.tags[i + 1], ignoreCase)) {\n report({\n message: 'The `tags` array should be in alphabetical order.',\n location: location.child(['tags', i]),\n });\n }\n }\n },\n };\n};\nexports.TagsAlphabetical = TagsAlphabetical;\nfunction getTagName(tag, ignoreCase) {\n return ignoreCase ? tag.name.toLowerCase() : tag.name;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoUnresolvedRefs = void 0;\nexports.reportUnresolvedRef = reportUnresolvedRef;\nconst resolve_1 = require(\"../resolve\");\nconst NoUnresolvedRefs = () => {\n return {\n ref: {\n leave(_, { report, location }, resolved) {\n if (resolved.node !== undefined)\n return;\n reportUnresolvedRef(resolved, report, location);\n },\n },\n DiscriminatorMapping(mapping, { report, resolve, location }) {\n for (const mappingName of Object.keys(mapping)) {\n const resolved = resolve({ $ref: mapping[mappingName] });\n if (resolved.node !== undefined)\n return;\n reportUnresolvedRef(resolved, report, location.child(mappingName));\n }\n },\n };\n};\nexports.NoUnresolvedRefs = NoUnresolvedRefs;\nfunction reportUnresolvedRef(resolved, report, location) {\n const error = resolved.error;\n if (error instanceof resolve_1.YamlParseError) {\n report({\n message: 'Failed to parse: ' + error.message,\n location: {\n source: error.source,\n pointer: undefined,\n start: {\n col: error.col,\n line: error.line,\n },\n },\n });\n }\n const message = resolved.error?.message;\n report({\n location,\n message: `Can't resolve $ref${message ? ': ' + message : ''}`,\n });\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BooleanParameterPrefixes = void 0;\nconst BooleanParameterPrefixes = (options) => {\n const prefixes = options.prefixes || ['is', 'has'];\n const regexp = new RegExp(`^(${prefixes.join('|')})[A-Z-_]`);\n const wrappedPrefixes = prefixes.map((p) => `\\`${p}\\``);\n const prefixesString = wrappedPrefixes.length === 1\n ? wrappedPrefixes[0]\n : wrappedPrefixes.slice(0, -1).join(', ') + ' or ' + wrappedPrefixes[prefixes.length - 1];\n return {\n Parameter(param, { report, location }) {\n if (param.type === 'boolean' && !regexp.test(param.name)) {\n report({\n message: `Boolean parameter \\`${param.name}\\` should have ${prefixesString} prefix.`,\n location: location.child('name'),\n });\n }\n },\n };\n};\nexports.BooleanParameterPrefixes = BooleanParameterPrefixes;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.preprocessors = exports.rules = void 0;\nconst struct_1 = require(\"../common/struct\");\nconst no_invalid_schema_examples_1 = require(\"../common/no-invalid-schema-examples\");\nconst no_invalid_parameter_examples_1 = require(\"../common/no-invalid-parameter-examples\");\nconst info_contact_1 = require(\"../common/info-contact\");\nconst info_license_1 = require(\"../common/info-license\");\nconst info_license_url_1 = require(\"../common/info-license-url\");\nconst info_license_strict_1 = require(\"../common/info-license-strict\");\nconst boolean_parameter_prefixes_1 = require(\"./boolean-parameter-prefixes\");\nconst tag_description_1 = require(\"../common/tag-description\");\nconst tags_alphabetical_1 = require(\"../common/tags-alphabetical\");\nconst paths_kebab_case_1 = require(\"../common/paths-kebab-case\");\nconst no_enum_type_mismatch_1 = require(\"../common/no-enum-type-mismatch\");\nconst no_path_trailing_slash_1 = require(\"../common/no-path-trailing-slash\");\nconst operation_2xx_response_1 = require(\"../common/operation-2xx-response\");\nconst operation_4xx_response_1 = require(\"../common/operation-4xx-response\");\nconst assertions_1 = require(\"../common/assertions\");\nconst operation_operationId_unique_1 = require(\"../common/operation-operationId-unique\");\nconst operation_parameters_unique_1 = require(\"../common/operation-parameters-unique\");\nconst path_params_defined_1 = require(\"../common/path-params-defined\");\nconst operation_tag_defined_1 = require(\"../common/operation-tag-defined\");\nconst path_declaration_must_exist_1 = require(\"../common/path-declaration-must-exist\");\nconst operation_operationId_url_safe_1 = require(\"../common/operation-operationId-url-safe\");\nconst operation_description_1 = require(\"../common/operation-description\");\nconst path_not_include_query_1 = require(\"../common/path-not-include-query\");\nconst parameter_description_1 = require(\"../common/parameter-description\");\nconst operation_singular_tag_1 = require(\"../common/operation-singular-tag\");\nconst security_defined_1 = require(\"../common/security-defined\");\nconst no_unresolved_refs_1 = require(\"../no-unresolved-refs\");\nconst path_http_verbs_order_1 = require(\"../common/path-http-verbs-order\");\nconst no_identical_paths_1 = require(\"../common/no-identical-paths\");\nconst operation_operationId_1 = require(\"../common/operation-operationId\");\nconst operation_summary_1 = require(\"../common/operation-summary\");\nconst no_ambiguous_paths_1 = require(\"../common/no-ambiguous-paths\");\nconst no_http_verbs_in_paths_1 = require(\"../common/no-http-verbs-in-paths\");\nconst path_excludes_patterns_1 = require(\"../common/path-excludes-patterns\");\nconst request_mime_type_1 = require(\"./request-mime-type\");\nconst response_mime_type_1 = require(\"./response-mime-type\");\nconst path_segment_plural_1 = require(\"../common/path-segment-plural\");\nconst response_contains_header_1 = require(\"../common/response-contains-header\");\nconst response_contains_property_1 = require(\"./response-contains-property\");\nconst scalar_property_missing_example_1 = require(\"../common/scalar-property-missing-example\");\nconst required_string_property_missing_min_length_1 = require(\"../common/required-string-property-missing-min-length\");\nconst spec_strict_refs_1 = require(\"../common/spec-strict-refs\");\nconst no_required_schema_properties_undefined_1 = require(\"../common/no-required-schema-properties-undefined\");\nconst no_schema_type_mismatch_1 = require(\"../common/no-schema-type-mismatch\");\nexports.rules = {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-ignore TODO: This is depricated property `spec` and should be removed in the future\n spec: struct_1.Struct,\n struct: struct_1.Struct,\n 'no-invalid-schema-examples': no_invalid_schema_examples_1.NoInvalidSchemaExamples,\n 'no-invalid-parameter-examples': no_invalid_parameter_examples_1.NoInvalidParameterExamples,\n 'info-contact': info_contact_1.InfoContact,\n 'info-license': info_license_1.InfoLicense,\n 'info-license-url': info_license_url_1.InfoLicenseUrl,\n 'info-license-strict': info_license_strict_1.InfoLicenseStrict,\n 'tag-description': tag_description_1.TagDescription,\n 'tags-alphabetical': tags_alphabetical_1.TagsAlphabetical,\n 'paths-kebab-case': paths_kebab_case_1.PathsKebabCase,\n 'no-enum-type-mismatch': no_enum_type_mismatch_1.NoEnumTypeMismatch,\n 'boolean-parameter-prefixes': boolean_parameter_prefixes_1.BooleanParameterPrefixes,\n 'no-path-trailing-slash': no_path_trailing_slash_1.NoPathTrailingSlash,\n 'operation-2xx-response': operation_2xx_response_1.Operation2xxResponse,\n 'operation-4xx-response': operation_4xx_response_1.Operation4xxResponse,\n assertions: assertions_1.Assertions,\n 'operation-operationId-unique': operation_operationId_unique_1.OperationIdUnique,\n 'operation-parameters-unique': operation_parameters_unique_1.OperationParametersUnique,\n 'path-parameters-defined': path_params_defined_1.PathParamsDefined,\n 'operation-tag-defined': operation_tag_defined_1.OperationTagDefined,\n 'path-declaration-must-exist': path_declaration_must_exist_1.PathDeclarationMustExist,\n 'operation-operationId-url-safe': operation_operationId_url_safe_1.OperationIdUrlSafe,\n 'operation-operationId': operation_operationId_1.OperationOperationId,\n 'operation-summary': operation_summary_1.OperationSummary,\n 'operation-description': operation_description_1.OperationDescription,\n 'path-not-include-query': path_not_include_query_1.PathNotIncludeQuery,\n 'path-params-defined': path_params_defined_1.PathParamsDefined,\n 'parameter-description': parameter_description_1.ParameterDescription,\n 'operation-singular-tag': operation_singular_tag_1.OperationSingularTag,\n 'security-defined': security_defined_1.SecurityDefined,\n 'no-unresolved-refs': no_unresolved_refs_1.NoUnresolvedRefs,\n 'no-identical-paths': no_identical_paths_1.NoIdenticalPaths,\n 'no-ambiguous-paths': no_ambiguous_paths_1.NoAmbiguousPaths,\n 'path-http-verbs-order': path_http_verbs_order_1.PathHttpVerbsOrder,\n 'no-http-verbs-in-paths': no_http_verbs_in_paths_1.NoHttpVerbsInPaths,\n 'path-excludes-patterns': path_excludes_patterns_1.PathExcludesPatterns,\n 'request-mime-type': request_mime_type_1.RequestMimeType,\n 'response-mime-type': response_mime_type_1.ResponseMimeType,\n 'path-segment-plural': path_segment_plural_1.PathSegmentPlural,\n 'response-contains-header': response_contains_header_1.ResponseContainsHeader,\n 'response-contains-property': response_contains_property_1.ResponseContainsProperty,\n 'scalar-property-missing-example': scalar_property_missing_example_1.ScalarPropertyMissingExample,\n 'required-string-property-missing-min-length': required_string_property_missing_min_length_1.RequiredStringPropertyMissingMinLength,\n 'spec-strict-refs': spec_strict_refs_1.SpecStrictRefs,\n 'no-required-schema-properties-undefined': no_required_schema_properties_undefined_1.NoRequiredSchemaPropertiesUndefined,\n 'no-schema-type-mismatch': no_schema_type_mismatch_1.NoSchemaTypeMismatch,\n};\nexports.preprocessors = {};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RequestMimeType = void 0;\nconst utils_1 = require(\"../../utils\");\nconst RequestMimeType = ({ allowedValues }) => {\n return {\n Root(root, ctx) {\n (0, utils_1.validateMimeType)({ type: 'consumes', value: root }, ctx, allowedValues);\n },\n Operation: {\n leave(operation, ctx) {\n (0, utils_1.validateMimeType)({ type: 'consumes', value: operation }, ctx, allowedValues);\n },\n },\n };\n};\nexports.RequestMimeType = RequestMimeType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ResponseContainsProperty = void 0;\nconst utils_1 = require(\"../../utils\");\nconst ResponseContainsProperty = (options) => {\n const names = options.names || {};\n let key;\n return {\n Operation: {\n Response: {\n skip: (_response, key) => {\n return `${key}` === '204';\n },\n enter: (_response, ctx) => {\n key = ctx.key;\n },\n Schema(schema, { report, location }) {\n if (schema.type !== 'object')\n return;\n const expectedProperties = names[key] ||\n names[(0, utils_1.getMatchingStatusCodeRange)(key)] ||\n names[(0, utils_1.getMatchingStatusCodeRange)(key).toLowerCase()] ||\n [];\n for (const expectedProperty of expectedProperties) {\n if (!schema.properties?.[expectedProperty]) {\n report({\n message: `Response object must contain a top-level \"${expectedProperty}\" property.`,\n location: location.child('properties').key(),\n });\n }\n }\n },\n },\n },\n };\n};\nexports.ResponseContainsProperty = ResponseContainsProperty;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ResponseMimeType = void 0;\nconst utils_1 = require(\"../../utils\");\nconst ResponseMimeType = ({ allowedValues }) => {\n return {\n Root(root, ctx) {\n (0, utils_1.validateMimeType)({ type: 'produces', value: root }, ctx, allowedValues);\n },\n Operation: {\n leave(operation, ctx) {\n (0, utils_1.validateMimeType)({ type: 'produces', value: operation }, ctx, allowedValues);\n },\n },\n };\n};\nexports.ResponseMimeType = ResponseMimeType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ArrayParameterSerialization = void 0;\nconst ref_utils_1 = require(\"../../ref-utils\");\nconst ArrayParameterSerialization = (options) => {\n return {\n Parameter: {\n leave(node, ctx) {\n if (!node.schema) {\n return;\n }\n const schema = ((0, ref_utils_1.isRef)(node.schema) ? ctx.resolve(node.schema).node : node.schema);\n if (schema &&\n shouldReportMissingStyleAndExplode(node, schema, options)) {\n ctx.report({\n message: `Parameter \\`${node.name}\\` should have \\`style\\` and \\`explode \\` fields`,\n location: ctx.location,\n });\n }\n },\n },\n };\n};\nexports.ArrayParameterSerialization = ArrayParameterSerialization;\nfunction shouldReportMissingStyleAndExplode(node, schema, options) {\n return ((schema.type === 'array' || schema.items || schema.prefixItems) &&\n (node.style === undefined || node.explode === undefined) &&\n (!options.in || (node.in && options.in?.includes(node.in))));\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BooleanParameterPrefixes = void 0;\nconst BooleanParameterPrefixes = (options) => {\n const prefixes = options.prefixes || ['is', 'has'];\n const regexp = new RegExp(`^(${prefixes.join('|')})[A-Z-_]`);\n const wrappedPrefixes = prefixes.map((p) => `\\`${p}\\``);\n const prefixesString = wrappedPrefixes.length === 1\n ? wrappedPrefixes[0]\n : wrappedPrefixes.slice(0, -1).join(', ') + ' or ' + wrappedPrefixes[prefixes.length - 1];\n return {\n Parameter: {\n Schema(schema, { report, parentLocations }, parents) {\n if (schema.type === 'boolean' && !regexp.test(parents.Parameter.name)) {\n report({\n message: `Boolean parameter \\`${parents.Parameter.name}\\` should have ${prefixesString} prefix.`,\n location: parentLocations.Parameter.child(['name']),\n });\n }\n },\n },\n };\n};\nexports.BooleanParameterPrefixes = BooleanParameterPrefixes;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ComponentNameUnique = void 0;\nconst TYPE_NAME_SCHEMA = 'Schema';\nconst TYPE_NAME_PARAMETER = 'Parameter';\nconst TYPE_NAME_RESPONSE = 'Response';\nconst TYPE_NAME_REQUEST_BODY = 'RequestBody';\nconst TYPE_NAME_TO_OPTION_COMPONENT_NAME = {\n [TYPE_NAME_SCHEMA]: 'schemas',\n [TYPE_NAME_PARAMETER]: 'parameters',\n [TYPE_NAME_RESPONSE]: 'responses',\n [TYPE_NAME_REQUEST_BODY]: 'requestBodies',\n};\nconst ComponentNameUnique = (options) => {\n const components = new Map();\n const typeNames = [];\n if (options.schemas !== 'off') {\n typeNames.push(TYPE_NAME_SCHEMA);\n }\n if (options.parameters !== 'off') {\n typeNames.push(TYPE_NAME_PARAMETER);\n }\n if (options.responses !== 'off') {\n typeNames.push(TYPE_NAME_RESPONSE);\n }\n if (options.requestBodies !== 'off') {\n typeNames.push(TYPE_NAME_REQUEST_BODY);\n }\n const rule = {\n ref: {\n leave(ref, { type, resolve }) {\n const typeName = type.name;\n if (typeNames.includes(typeName)) {\n const resolvedRef = resolve(ref);\n if (!resolvedRef.location)\n return;\n addComponentFromAbsoluteLocation(typeName, resolvedRef.location);\n }\n },\n },\n Root: {\n leave(root, ctx) {\n components.forEach((value, key, _) => {\n if (value.absolutePointers.size > 1) {\n const component = getComponentFromKey(key);\n const optionComponentName = getOptionComponentNameForTypeName(component.typeName);\n const componentSeverity = optionComponentName ? options[optionComponentName] : null;\n for (const location of value.locations) {\n const definitions = Array.from(value.absolutePointers)\n .filter((v) => v !== location.absolutePointer.toString())\n .map((v) => `- ${v}`)\n .join('\\n');\n const problem = {\n message: `Component '${optionComponentName}/${component.componentName}' is not unique. It is also defined at:\\n${definitions}`,\n location: location,\n };\n if (componentSeverity) {\n problem.forceSeverity = componentSeverity;\n }\n ctx.report(problem);\n }\n }\n });\n },\n },\n };\n if (options.schemas != 'off') {\n rule.NamedSchemas = {\n Schema(_, { location }) {\n addComponentFromAbsoluteLocation(TYPE_NAME_SCHEMA, location);\n },\n };\n }\n if (options.responses != 'off') {\n rule.NamedResponses = {\n Response(_, { location }) {\n addComponentFromAbsoluteLocation(TYPE_NAME_RESPONSE, location);\n },\n };\n }\n if (options.parameters != 'off') {\n rule.NamedParameters = {\n Parameter(_, { location }) {\n addComponentFromAbsoluteLocation(TYPE_NAME_PARAMETER, location);\n },\n };\n }\n if (options.requestBodies != 'off') {\n rule.NamedRequestBodies = {\n RequestBody(_, { location }) {\n addComponentFromAbsoluteLocation(TYPE_NAME_REQUEST_BODY, location);\n },\n };\n }\n return rule;\n function getComponentNameFromAbsoluteLocation(absoluteLocation) {\n const componentName = absoluteLocation.split('/').slice(-1)[0];\n if (componentName.endsWith('.yml') ||\n componentName.endsWith('.yaml') ||\n componentName.endsWith('.json')) {\n return componentName.slice(0, componentName.lastIndexOf('.'));\n }\n return componentName;\n }\n function addFoundComponent(typeName, componentName, location) {\n const key = getKeyForComponent(typeName, componentName);\n const entry = components.get(key) ?? {\n absolutePointers: new Set(),\n locations: [],\n };\n const absoluteLocation = location.absolutePointer.toString();\n if (!entry.absolutePointers.has(absoluteLocation)) {\n entry.absolutePointers.add(absoluteLocation);\n entry.locations.push(location);\n }\n components.set(key, entry);\n }\n function addComponentFromAbsoluteLocation(typeName, location) {\n const componentName = getComponentNameFromAbsoluteLocation(location.absolutePointer.toString());\n addFoundComponent(typeName, componentName, location);\n }\n};\nexports.ComponentNameUnique = ComponentNameUnique;\nfunction getOptionComponentNameForTypeName(typeName) {\n return TYPE_NAME_TO_OPTION_COMPONENT_NAME[typeName] ?? null;\n}\nfunction getKeyForComponent(typeName, componentName) {\n return `${typeName}/${componentName}`;\n}\nfunction getComponentFromKey(key) {\n const [typeName, componentName] = key.split('/');\n return { typeName, componentName };\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.preprocessors = exports.rules = void 0;\nconst struct_1 = require(\"../common/struct\");\nconst operation_2xx_response_1 = require(\"../common/operation-2xx-response\");\nconst operation_4xx_response_1 = require(\"../common/operation-4xx-response\");\nconst assertions_1 = require(\"../common/assertions\");\nconst operation_operationId_unique_1 = require(\"../common/operation-operationId-unique\");\nconst operation_parameters_unique_1 = require(\"../common/operation-parameters-unique\");\nconst path_params_defined_1 = require(\"../common/path-params-defined\");\nconst operation_tag_defined_1 = require(\"../common/operation-tag-defined\");\nconst no_example_value_and_externalValue_1 = require(\"./no-example-value-and-externalValue\");\nconst no_enum_type_mismatch_1 = require(\"../common/no-enum-type-mismatch\");\nconst no_path_trailing_slash_1 = require(\"../common/no-path-trailing-slash\");\nconst path_declaration_must_exist_1 = require(\"../common/path-declaration-must-exist\");\nconst operation_operationId_url_safe_1 = require(\"../common/operation-operationId-url-safe\");\nconst tags_alphabetical_1 = require(\"../common/tags-alphabetical\");\nconst no_server_example_com_1 = require(\"./no-server-example.com\");\nconst no_server_trailing_slash_1 = require(\"./no-server-trailing-slash\");\nconst tag_description_1 = require(\"../common/tag-description\");\nconst info_contact_1 = require(\"../common/info-contact\");\nconst info_license_1 = require(\"../common/info-license\");\nconst info_license_url_1 = require(\"../common/info-license-url\");\nconst info_license_strict_1 = require(\"../common/info-license-strict\");\nconst operation_description_1 = require(\"../common/operation-description\");\nconst no_unused_components_1 = require(\"./no-unused-components\");\nconst path_not_include_query_1 = require(\"../common/path-not-include-query\");\nconst parameter_description_1 = require(\"../common/parameter-description\");\nconst operation_singular_tag_1 = require(\"../common/operation-singular-tag\");\nconst security_defined_1 = require(\"../common/security-defined\");\nconst no_unresolved_refs_1 = require(\"../no-unresolved-refs\");\nconst boolean_parameter_prefixes_1 = require(\"./boolean-parameter-prefixes\");\nconst paths_kebab_case_1 = require(\"../common/paths-kebab-case\");\nconst path_http_verbs_order_1 = require(\"../common/path-http-verbs-order\");\nconst no_empty_servers_1 = require(\"./no-empty-servers\");\nconst no_invalid_media_type_examples_1 = require(\"./no-invalid-media-type-examples\");\nconst no_identical_paths_1 = require(\"../common/no-identical-paths\");\nconst no_undefined_server_variable_1 = require(\"./no-undefined-server-variable\");\nconst operation_operationId_1 = require(\"../common/operation-operationId\");\nconst operation_summary_1 = require(\"../common/operation-summary\");\nconst no_ambiguous_paths_1 = require(\"../common/no-ambiguous-paths\");\nconst no_server_variables_empty_enum_1 = require(\"./no-server-variables-empty-enum\");\nconst no_http_verbs_in_paths_1 = require(\"../common/no-http-verbs-in-paths\");\nconst request_mime_type_1 = require(\"./request-mime-type\");\nconst response_mime_type_1 = require(\"./response-mime-type\");\nconst path_segment_plural_1 = require(\"../common/path-segment-plural\");\nconst path_excludes_patterns_1 = require(\"../common/path-excludes-patterns\");\nconst no_invalid_schema_examples_1 = require(\"../common/no-invalid-schema-examples\");\nconst no_invalid_parameter_examples_1 = require(\"../common/no-invalid-parameter-examples\");\nconst response_contains_header_1 = require(\"../common/response-contains-header\");\nconst response_contains_property_1 = require(\"./response-contains-property\");\nconst scalar_property_missing_example_1 = require(\"../common/scalar-property-missing-example\");\nconst spec_components_invalid_map_name_1 = require(\"./spec-components-invalid-map-name\");\nconst operation_4xx_problem_details_rfc7807_1 = require(\"./operation-4xx-problem-details-rfc7807\");\nconst required_string_property_missing_min_length_1 = require(\"../common/required-string-property-missing-min-length\");\nconst spec_strict_refs_1 = require(\"../common/spec-strict-refs\");\nconst component_name_unique_1 = require(\"./component-name-unique\");\nconst array_parameter_serialization_1 = require(\"./array-parameter-serialization\");\nconst no_required_schema_properties_undefined_1 = require(\"../common/no-required-schema-properties-undefined\");\nconst no_schema_type_mismatch_1 = require(\"../common/no-schema-type-mismatch\");\nexports.rules = {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-ignore TODO: This is depricated property `spec` and should be removed in the future\n spec: struct_1.Struct,\n struct: struct_1.Struct,\n 'info-contact': info_contact_1.InfoContact,\n 'info-license': info_license_1.InfoLicense,\n 'info-license-url': info_license_url_1.InfoLicenseUrl,\n 'info-license-strict': info_license_strict_1.InfoLicenseStrict,\n 'operation-2xx-response': operation_2xx_response_1.Operation2xxResponse,\n 'operation-4xx-response': operation_4xx_response_1.Operation4xxResponse,\n 'operation-4xx-problem-details-rfc7807': operation_4xx_problem_details_rfc7807_1.Operation4xxProblemDetailsRfc7807,\n assertions: assertions_1.Assertions,\n 'operation-operationId-unique': operation_operationId_unique_1.OperationIdUnique,\n 'operation-parameters-unique': operation_parameters_unique_1.OperationParametersUnique,\n 'operation-tag-defined': operation_tag_defined_1.OperationTagDefined,\n 'no-example-value-and-externalValue': no_example_value_and_externalValue_1.NoExampleValueAndExternalValue,\n 'no-enum-type-mismatch': no_enum_type_mismatch_1.NoEnumTypeMismatch,\n 'no-path-trailing-slash': no_path_trailing_slash_1.NoPathTrailingSlash,\n 'no-empty-servers': no_empty_servers_1.NoEmptyServers,\n 'path-declaration-must-exist': path_declaration_must_exist_1.PathDeclarationMustExist,\n 'operation-operationId-url-safe': operation_operationId_url_safe_1.OperationIdUrlSafe,\n 'operation-operationId': operation_operationId_1.OperationOperationId,\n 'operation-summary': operation_summary_1.OperationSummary,\n 'tags-alphabetical': tags_alphabetical_1.TagsAlphabetical,\n 'no-server-example.com': no_server_example_com_1.NoServerExample,\n 'no-server-trailing-slash': no_server_trailing_slash_1.NoServerTrailingSlash,\n 'tag-description': tag_description_1.TagDescription,\n 'operation-description': operation_description_1.OperationDescription,\n 'no-unused-components': no_unused_components_1.NoUnusedComponents,\n 'path-not-include-query': path_not_include_query_1.PathNotIncludeQuery,\n 'path-parameters-defined': path_params_defined_1.PathParamsDefined,\n 'path-params-defined': path_params_defined_1.PathParamsDefined,\n 'parameter-description': parameter_description_1.ParameterDescription,\n 'operation-singular-tag': operation_singular_tag_1.OperationSingularTag,\n 'security-defined': security_defined_1.SecurityDefined,\n 'no-unresolved-refs': no_unresolved_refs_1.NoUnresolvedRefs,\n 'paths-kebab-case': paths_kebab_case_1.PathsKebabCase,\n 'boolean-parameter-prefixes': boolean_parameter_prefixes_1.BooleanParameterPrefixes,\n 'path-http-verbs-order': path_http_verbs_order_1.PathHttpVerbsOrder,\n 'no-invalid-media-type-examples': no_invalid_media_type_examples_1.ValidContentExamples,\n 'no-identical-paths': no_identical_paths_1.NoIdenticalPaths,\n 'no-ambiguous-paths': no_ambiguous_paths_1.NoAmbiguousPaths,\n 'no-undefined-server-variable': no_undefined_server_variable_1.NoUndefinedServerVariable,\n 'no-server-variables-empty-enum': no_server_variables_empty_enum_1.NoServerVariablesEmptyEnum,\n 'no-http-verbs-in-paths': no_http_verbs_in_paths_1.NoHttpVerbsInPaths,\n 'path-excludes-patterns': path_excludes_patterns_1.PathExcludesPatterns,\n 'request-mime-type': request_mime_type_1.RequestMimeType,\n 'response-mime-type': response_mime_type_1.ResponseMimeType,\n 'path-segment-plural': path_segment_plural_1.PathSegmentPlural,\n 'no-invalid-schema-examples': no_invalid_schema_examples_1.NoInvalidSchemaExamples,\n 'no-invalid-parameter-examples': no_invalid_parameter_examples_1.NoInvalidParameterExamples,\n 'response-contains-header': response_contains_header_1.ResponseContainsHeader,\n 'response-contains-property': response_contains_property_1.ResponseContainsProperty,\n 'scalar-property-missing-example': scalar_property_missing_example_1.ScalarPropertyMissingExample,\n 'spec-components-invalid-map-name': spec_components_invalid_map_name_1.SpecComponentsInvalidMapName,\n 'required-string-property-missing-min-length': required_string_property_missing_min_length_1.RequiredStringPropertyMissingMinLength,\n 'spec-strict-refs': spec_strict_refs_1.SpecStrictRefs,\n 'component-name-unique': component_name_unique_1.ComponentNameUnique,\n 'array-parameter-serialization': array_parameter_serialization_1.ArrayParameterSerialization,\n 'no-required-schema-properties-undefined': no_required_schema_properties_undefined_1.NoRequiredSchemaPropertiesUndefined,\n 'no-schema-type-mismatch': no_schema_type_mismatch_1.NoSchemaTypeMismatch,\n};\nexports.preprocessors = {};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoEmptyServers = void 0;\nconst NoEmptyServers = () => {\n return {\n Root(root, { report, location }) {\n if (!root.hasOwnProperty('servers')) {\n report({\n message: 'Servers must be present.',\n location: location.child(['openapi']).key(),\n });\n return;\n }\n if (!Array.isArray(root.servers) || root.servers.length === 0) {\n report({\n message: 'Servers must be a non-empty array.',\n location: location.child(['servers']).key(),\n });\n }\n },\n };\n};\nexports.NoEmptyServers = NoEmptyServers;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoExampleValueAndExternalValue = void 0;\nconst NoExampleValueAndExternalValue = () => {\n return {\n Example(example, { report, location }) {\n if (example.value && example.externalValue) {\n report({\n message: 'Example object can have either `value` or `externalValue` fields.',\n location: location.child(['value']).key(),\n });\n }\n },\n };\n};\nexports.NoExampleValueAndExternalValue = NoExampleValueAndExternalValue;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidContentExamples = void 0;\nconst ref_utils_1 = require(\"../../ref-utils\");\nconst utils_1 = require(\"../utils\");\nconst ValidContentExamples = (opts) => {\n const allowAdditionalProperties = (0, utils_1.getAdditionalPropertiesOption)(opts) ?? false;\n return {\n MediaType: {\n leave(mediaType, ctx) {\n const { location, resolve } = ctx;\n if (!mediaType.schema)\n return;\n if (mediaType.example !== undefined) {\n resolveAndValidateExample(mediaType.example, location.child('example'));\n }\n else if (mediaType.examples) {\n for (const exampleName of Object.keys(mediaType.examples)) {\n resolveAndValidateExample(mediaType.examples[exampleName], location.child(['examples', exampleName, 'value']), true);\n }\n }\n function resolveAndValidateExample(example, location, isMultiple) {\n if ((0, ref_utils_1.isRef)(example)) {\n const resolved = resolve(example);\n if (!resolved.location)\n return;\n location = isMultiple ? resolved.location.child('value') : resolved.location;\n example = resolved.node;\n }\n if (isMultiple && typeof example?.value === 'undefined') {\n return;\n }\n (0, utils_1.validateExample)(isMultiple ? example.value : example, mediaType.schema, location, ctx, allowAdditionalProperties);\n }\n },\n },\n };\n};\nexports.ValidContentExamples = ValidContentExamples;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoServerExample = void 0;\nconst NoServerExample = () => {\n return {\n Server(server, { report, location }) {\n // eslint-disable-next-line no-useless-escape\n const pattern = /^(.*[\\/.])?(example\\.com|localhost)([\\/:?].*|$)/;\n if (server.url && pattern.test(server.url)) {\n report({\n message: 'Server `url` should not point to example.com or localhost.',\n location: location.child(['url']),\n });\n }\n },\n };\n};\nexports.NoServerExample = NoServerExample;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoServerTrailingSlash = void 0;\nconst NoServerTrailingSlash = () => {\n return {\n Server(server, { report, location }) {\n if (!server.url)\n return;\n if (server.url.endsWith('/') && server.url !== '/') {\n report({\n message: 'Server `url` should not have a trailing slash.',\n location: location.child(['url']),\n });\n }\n },\n };\n};\nexports.NoServerTrailingSlash = NoServerTrailingSlash;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoServerVariablesEmptyEnum = void 0;\nvar enumError;\n(function (enumError) {\n enumError[\"empty\"] = \"empty\";\n enumError[\"invalidDefaultValue\"] = \"invalidDefaultValue\";\n})(enumError || (enumError = {}));\nconst NoServerVariablesEmptyEnum = () => {\n return {\n Root(root, { report, location }) {\n if (!root.servers || root.servers.length === 0)\n return;\n const invalidVariables = [];\n if (Array.isArray(root.servers)) {\n for (const server of root.servers) {\n const enumErrors = checkEnumVariables(server);\n if (!enumErrors)\n continue;\n invalidVariables.push(...enumErrors);\n }\n }\n else {\n const enumErrors = checkEnumVariables(root.servers);\n if (!enumErrors)\n return;\n invalidVariables.push(...enumErrors);\n }\n for (const invalidVariable of invalidVariables) {\n if (invalidVariable === enumError.empty) {\n report({\n message: 'Server variable with `enum` must be a non-empty array.',\n location: location.child(['servers']).key(),\n });\n }\n if (invalidVariable === enumError.invalidDefaultValue) {\n report({\n message: 'Server variable define `enum` and `default`. `enum` must include default value',\n location: location.child(['servers']).key(),\n });\n }\n }\n },\n };\n};\nexports.NoServerVariablesEmptyEnum = NoServerVariablesEmptyEnum;\nfunction checkEnumVariables(server) {\n if (server.variables && Object.keys(server.variables).length === 0)\n return;\n const errors = [];\n for (const variable in server.variables) {\n const serverVariable = server.variables[variable];\n if (!serverVariable.enum)\n continue;\n if (Array.isArray(serverVariable.enum) && serverVariable.enum?.length === 0)\n errors.push(enumError.empty);\n if (!serverVariable.default)\n continue;\n const defaultValue = server.variables[variable].default;\n if (serverVariable.enum && !serverVariable.enum.includes(defaultValue))\n errors.push(enumError.invalidDefaultValue);\n }\n if (errors.length)\n return errors;\n return;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoUndefinedServerVariable = void 0;\nconst NoUndefinedServerVariable = () => {\n return {\n Server(server, { report, location }) {\n if (!server.url)\n return;\n const urlVariables = server.url.match(/{[^}]+}/g)?.map((e) => e.slice(1, e.length - 1)) || [];\n const definedVariables = (server?.variables && Object.keys(server.variables)) || [];\n for (const serverVar of urlVariables) {\n if (!definedVariables.includes(serverVar)) {\n report({\n message: `The \\`${serverVar}\\` variable is not defined in the \\`variables\\` objects.`,\n location: location.child(['url']),\n });\n }\n }\n for (const definedServerVar of definedVariables) {\n if (!urlVariables.includes(definedServerVar)) {\n report({\n message: `The \\`${definedServerVar}\\` variable is not used in the server's \\`url\\` field.`,\n location: location.child(['variables', definedServerVar]).key(),\n from: location.child('url'),\n });\n }\n }\n },\n };\n};\nexports.NoUndefinedServerVariable = NoUndefinedServerVariable;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoUnusedComponents = void 0;\nconst NoUnusedComponents = () => {\n const components = new Map();\n function registerComponent(location, name) {\n components.set(location.absolutePointer, {\n used: components.get(location.absolutePointer)?.used || false,\n location,\n name,\n });\n }\n return {\n ref(ref, { type, resolve, key, location }) {\n if (['Schema', 'Header', 'Parameter', 'Response', 'Example', 'RequestBody'].includes(type.name)) {\n const resolvedRef = resolve(ref);\n if (!resolvedRef.location)\n return;\n components.set(resolvedRef.location.absolutePointer, {\n used: true,\n name: key.toString(),\n location,\n });\n }\n },\n Root: {\n leave(_, { report }) {\n components.forEach((usageInfo) => {\n if (!usageInfo.used) {\n report({\n message: `Component: \"${usageInfo.name}\" is never used.`,\n location: usageInfo.location.key(),\n });\n }\n });\n },\n },\n NamedSchemas: {\n Schema(schema, { location, key }) {\n if (!schema.allOf) {\n // FIXME: find a better way to detect possible discriminator\n registerComponent(location, key.toString());\n }\n },\n },\n NamedParameters: {\n Parameter(_parameter, { location, key }) {\n registerComponent(location, key.toString());\n },\n },\n NamedResponses: {\n Response(_response, { location, key }) {\n registerComponent(location, key.toString());\n },\n },\n NamedExamples: {\n Example(_example, { location, key }) {\n registerComponent(location, key.toString());\n },\n },\n NamedRequestBodies: {\n RequestBody(_requestBody, { location, key }) {\n registerComponent(location, key.toString());\n },\n },\n NamedHeaders: {\n Header(_header, { location, key }) {\n registerComponent(location, key.toString());\n },\n },\n };\n};\nexports.NoUnusedComponents = NoUnusedComponents;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Operation4xxProblemDetailsRfc7807 = void 0;\nconst utils_1 = require(\"../utils\");\n/**\n * Validation according to rfc7807 - https://datatracker.ietf.org/doc/html/rfc7807\n */\nconst Operation4xxProblemDetailsRfc7807 = () => {\n return {\n Response: {\n skip(_, key) {\n return !/4[Xx0-9]{2}/.test(`${key}`);\n },\n enter(response, { report, location }) {\n if (!response.content || !response.content['application/problem+json'])\n report({\n message: 'Response `4xx` must have content-type `application/problem+json`.',\n location: location.key(),\n });\n },\n MediaType: {\n skip(_, key) {\n return key !== 'application/problem+json';\n },\n enter(media, ctx) {\n (0, utils_1.validateDefinedAndNonEmpty)('schema', media, ctx);\n },\n SchemaProperties(schema, ctx) {\n (0, utils_1.validateDefinedAndNonEmpty)('type', schema, ctx);\n (0, utils_1.validateDefinedAndNonEmpty)('title', schema, ctx);\n },\n },\n },\n };\n};\nexports.Operation4xxProblemDetailsRfc7807 = Operation4xxProblemDetailsRfc7807;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RequestMimeType = void 0;\nconst utils_1 = require(\"../../utils\");\nconst RequestMimeType = ({ allowedValues }) => {\n return {\n Paths: {\n RequestBody: {\n leave(requestBody, ctx) {\n (0, utils_1.validateMimeTypeOAS3)({ type: 'consumes', value: requestBody }, ctx, allowedValues);\n },\n },\n Callback: {\n RequestBody() { },\n Response: {\n leave(response, ctx) {\n (0, utils_1.validateMimeTypeOAS3)({ type: 'consumes', value: response }, ctx, allowedValues);\n },\n },\n },\n },\n WebhooksMap: {\n Response: {\n leave(response, ctx) {\n (0, utils_1.validateMimeTypeOAS3)({ type: 'consumes', value: response }, ctx, allowedValues);\n },\n },\n },\n };\n};\nexports.RequestMimeType = RequestMimeType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ResponseContainsProperty = void 0;\nconst utils_1 = require(\"../../utils\");\nconst ResponseContainsProperty = (options) => {\n const names = options.names || {};\n let key;\n return {\n Operation: {\n Response: {\n skip: (_response, key) => {\n return `${key}` === '204';\n },\n enter: (_response, ctx) => {\n key = ctx.key;\n },\n MediaType: {\n Schema(schema, { report, location }) {\n if (schema.type !== 'object')\n return;\n const expectedProperties = names[key] ||\n names[(0, utils_1.getMatchingStatusCodeRange)(key)] ||\n names[(0, utils_1.getMatchingStatusCodeRange)(key).toLowerCase()] ||\n [];\n for (const expectedProperty of expectedProperties) {\n if (!schema.properties?.[expectedProperty]) {\n report({\n message: `Response object must contain a top-level \"${expectedProperty}\" property.`,\n location: location.child('properties').key(),\n });\n }\n }\n },\n },\n },\n },\n };\n};\nexports.ResponseContainsProperty = ResponseContainsProperty;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ResponseMimeType = void 0;\nconst utils_1 = require(\"../../utils\");\nconst ResponseMimeType = ({ allowedValues }) => {\n return {\n Paths: {\n Response: {\n leave(response, ctx) {\n (0, utils_1.validateMimeTypeOAS3)({ type: 'produces', value: response }, ctx, allowedValues);\n },\n },\n Callback: {\n Response() { },\n RequestBody: {\n leave(requestBody, ctx) {\n (0, utils_1.validateMimeTypeOAS3)({ type: 'produces', value: requestBody }, ctx, allowedValues);\n },\n },\n },\n },\n WebhooksMap: {\n RequestBody: {\n leave(requestBody, ctx) {\n (0, utils_1.validateMimeTypeOAS3)({ type: 'produces', value: requestBody }, ctx, allowedValues);\n },\n },\n },\n };\n};\nexports.ResponseMimeType = ResponseMimeType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SpecComponentsInvalidMapName = void 0;\nconst SpecComponentsInvalidMapName = () => {\n const KEYS_REGEX = '^[a-zA-Z0-9\\\\.\\\\-_]+$';\n function validateKey(key, report, location, component) {\n if (!new RegExp(KEYS_REGEX).test(key)) {\n report({\n message: `The map key in ${component} \"${key}\" does not match the regular expression \"${KEYS_REGEX}\"`,\n location: location.key(),\n });\n }\n }\n return {\n NamedSchemas: {\n Schema(_node, { key, report, location }) {\n validateKey(key, report, location, 'schemas');\n },\n },\n NamedParameters: {\n Parameter(_node, { key, report, location }) {\n validateKey(key, report, location, 'parameters');\n },\n },\n NamedResponses: {\n Response(_node, { key, report, location }) {\n validateKey(key, report, location, 'responses');\n },\n },\n NamedExamples: {\n Example(_node, { key, report, location }) {\n validateKey(key, report, location, 'examples');\n },\n },\n NamedRequestBodies: {\n RequestBody(_node, { key, report, location }) {\n validateKey(key, report, location, 'requestBodies');\n },\n },\n NamedHeaders: {\n Header(_node, { key, report, location }) {\n validateKey(key, report, location, 'headers');\n },\n },\n NamedSecuritySchemes: {\n SecurityScheme(_node, { key, report, location }) {\n validateKey(key, report, location, 'securitySchemes');\n },\n },\n NamedLinks: {\n Link(_node, { key, report, location }) {\n validateKey(key, report, location, 'links');\n },\n },\n NamedCallbacks: {\n Callback(_node, { key, report, location }) {\n validateKey(key, report, location, 'callbacks');\n },\n },\n };\n};\nexports.SpecComponentsInvalidMapName = SpecComponentsInvalidMapName;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Stats = void 0;\nconst Stats = (statsAccumulator) => {\n return {\n ExternalDocs: {\n leave() {\n statsAccumulator.externalDocs.total++;\n },\n },\n ref: {\n enter(ref) {\n statsAccumulator.refs.items.add(ref['$ref']);\n },\n },\n Tag: {\n leave(tag) {\n statsAccumulator.tags.items.add(tag.name);\n },\n },\n Link: {\n leave(link) {\n statsAccumulator.links.items.add(link.operationId);\n },\n },\n Root: {\n leave() {\n statsAccumulator.parameters.total = statsAccumulator.parameters.items.size;\n statsAccumulator.refs.total = statsAccumulator.refs.items.size;\n statsAccumulator.links.total = statsAccumulator.links.items.size;\n statsAccumulator.tags.total = statsAccumulator.tags.items.size;\n },\n },\n WebhooksMap: {\n Operation: {\n leave(operation) {\n statsAccumulator.webhooks.total++;\n operation.tags &&\n operation.tags.forEach((tag) => {\n statsAccumulator.tags.items.add(tag);\n });\n },\n },\n },\n Paths: {\n PathItem: {\n leave() {\n statsAccumulator.pathItems.total++;\n },\n Operation: {\n leave(operation) {\n statsAccumulator.operations.total++;\n operation.tags &&\n operation.tags.forEach((tag) => {\n statsAccumulator.tags.items.add(tag);\n });\n },\n },\n Parameter: {\n leave(parameter) {\n statsAccumulator.parameters.items.add(parameter.name);\n },\n },\n },\n },\n NamedSchemas: {\n Schema: {\n leave() {\n statsAccumulator.schemas.total++;\n },\n },\n },\n };\n};\nexports.Stats = Stats;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.preprocessors = exports.rules = void 0;\nconst assertions_1 = require(\"../common/assertions\");\nconst info_contact_1 = require(\"../common/info-contact\");\nconst struct_1 = require(\"../common/struct\");\nexports.rules = {\n 'info-contact': info_contact_1.InfoContact,\n struct: struct_1.Struct,\n assertions: assertions_1.Assertions,\n};\nexports.preprocessors = {};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoCriteriaXpath = void 0;\nconst NoCriteriaXpath = () => {\n return {\n CriterionObject: {\n enter(criteria, { report, location }) {\n if (!criteria.type) {\n return;\n }\n if (criteria?.type?.type === 'xpath' || criteria?.type === 'xpath') {\n report({\n message: 'The `xpath` type criteria is not supported by Respect.',\n location: location.child(['type']),\n });\n }\n },\n },\n };\n};\nexports.NoCriteriaXpath = NoCriteriaXpath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RespectSupportedVersions = void 0;\nconst arazzo_1 = require(\"../../typings/arazzo\");\nconst utils_1 = require(\"../../utils\");\nconst RespectSupportedVersions = () => {\n const supportedVersions = arazzo_1.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.join(', ');\n return {\n Root: {\n enter(root, { report, location }) {\n if (!arazzo_1.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.includes(root.arazzo)) {\n report({\n message: `Only ${supportedVersions} Arazzo ${(0, utils_1.pluralize)('version is', arazzo_1.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT.length)} fully supported by Respect.`,\n location: location.child('arazzo'),\n });\n }\n },\n },\n };\n};\nexports.RespectSupportedVersions = RespectSupportedVersions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.oasTypeOf = oasTypeOf;\nexports.matchesJsonSchemaType = matchesJsonSchemaType;\nexports.missingRequiredField = missingRequiredField;\nexports.missingRequiredOneOfFields = missingRequiredOneOfFields;\nexports.fieldNonEmpty = fieldNonEmpty;\nexports.validateDefinedAndNonEmpty = validateDefinedAndNonEmpty;\nexports.validateOneOfDefinedAndNonEmpty = validateOneOfDefinedAndNonEmpty;\nexports.getSuggest = getSuggest;\nexports.validateExample = validateExample;\nexports.getAdditionalPropertiesOption = getAdditionalPropertiesOption;\nexports.validateSchemaEnumType = validateSchemaEnumType;\nexports.validateResponseCodes = validateResponseCodes;\nconst levenshtein = require(\"js-levenshtein\");\nconst ref_utils_1 = require(\"../ref-utils\");\nconst ajv_1 = require(\"./ajv\");\nconst utils_1 = require(\"../utils\");\nfunction oasTypeOf(value) {\n if (Array.isArray(value)) {\n return 'array';\n }\n else if (value === null) {\n return 'null';\n }\n else if (Number.isInteger(value)) {\n return 'integer';\n }\n else {\n return typeof value;\n }\n}\n/**\n * Checks if value matches specified JSON schema type\n *\n * @param {*} value - value to check\n * @param {JSONSchemaType} type - JSON Schema type\n * @returns boolean\n */\nfunction matchesJsonSchemaType(value, type, nullable) {\n if (nullable && value === null) {\n return true;\n }\n switch (type) {\n case 'array':\n return Array.isArray(value);\n case 'object':\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n case 'null':\n return value === null;\n case 'integer':\n return Number.isInteger(value);\n default:\n return typeof value === type;\n }\n}\nfunction missingRequiredField(type, field) {\n return `${type} object should contain \\`${field}\\` field.`;\n}\nfunction missingRequiredOneOfFields(type, fields) {\n return `${type} object should contain one of the fields: ${fields\n .map((field) => `\\`${field}\\``)\n .join(', ')}.`;\n}\nfunction fieldNonEmpty(type, field) {\n return `${type} object \\`${field}\\` must be non-empty string.`;\n}\nfunction validateDefinedAndNonEmpty(fieldName, value, ctx) {\n if (!(0, utils_1.isPlainObject)(value)) {\n return;\n }\n if (value[fieldName] === undefined) {\n ctx.report({\n message: missingRequiredField(ctx.type.name, fieldName),\n location: ctx.location.child([fieldName]).key(),\n });\n }\n else if (!value[fieldName]) {\n ctx.report({\n message: fieldNonEmpty(ctx.type.name, fieldName),\n location: ctx.location.child([fieldName]).key(),\n });\n }\n}\nfunction validateOneOfDefinedAndNonEmpty(fieldNames, value, ctx) {\n if (!(0, utils_1.isPlainObject)(value)) {\n return;\n }\n if (!fieldNames.some((fieldName) => value.hasOwnProperty(fieldName))) {\n ctx.report({\n message: missingRequiredOneOfFields(ctx.type.name, fieldNames),\n location: ctx.location.key(),\n });\n }\n for (const fieldName of fieldNames) {\n if (value.hasOwnProperty(fieldName) && !value[fieldName]) {\n ctx.report({\n message: fieldNonEmpty(ctx.type.name, fieldName),\n location: ctx.location.child([fieldName]).key(),\n });\n }\n }\n}\nfunction getSuggest(given, variants) {\n if (given === null)\n return variants;\n if (typeof given !== 'string' || !variants.length)\n return [];\n const distances = [];\n for (let i = 0; i < variants.length; i++) {\n const distance = levenshtein(given, variants[i]);\n if (distance < 4) {\n distances.push({ distance, variant: variants[i] });\n }\n }\n distances.sort((a, b) => a.distance - b.distance);\n // if (bestMatch.distance <= 4) return bestMatch.string;\n return distances.map((d) => d.variant);\n}\nfunction validateExample(example, schema, dataLoc, { resolve, location, report }, allowAdditionalProperties) {\n try {\n const { valid, errors } = (0, ajv_1.validateJsonSchema)(example, schema, location.child('schema'), dataLoc.pointer, resolve, allowAdditionalProperties);\n if (!valid) {\n for (const error of errors) {\n report({\n message: `Example value must conform to the schema: ${error.message}.`,\n location: {\n ...new ref_utils_1.Location(dataLoc.source, error.instancePath),\n reportOnKey: error.keyword === 'unevaluatedProperties' || error.keyword === 'additionalProperties',\n },\n from: location,\n suggest: error.suggest,\n });\n }\n }\n }\n catch (e) {\n if (e.message === 'discriminator: requires oneOf or anyOf composite keyword') {\n return;\n }\n report({\n message: `Example validation errored: ${e.message}.`,\n location: location.child('schema'),\n from: location,\n });\n }\n}\nfunction getAdditionalPropertiesOption(opts) {\n if (opts.disallowAdditionalProperties === undefined) {\n return opts.allowAdditionalProperties;\n }\n if (opts.allowAdditionalProperties !== undefined) {\n (0, utils_1.showErrorForDeprecatedField)('disallowAdditionalProperties', 'allowAdditionalProperties', undefined);\n }\n (0, utils_1.showWarningForDeprecatedField)('disallowAdditionalProperties', 'allowAdditionalProperties');\n return !opts.disallowAdditionalProperties;\n}\nfunction validateSchemaEnumType(schemaEnum, propertyValue, propName, refLocation, { report, location }) {\n if (!schemaEnum) {\n return;\n }\n if (!schemaEnum.includes(propertyValue)) {\n report({\n location,\n message: `\\`${propName}\\` can be one of the following only: ${schemaEnum\n .map((type) => `\"${type}\"`)\n .join(', ')}.`,\n from: refLocation,\n suggest: getSuggest(propertyValue, schemaEnum),\n });\n }\n}\nfunction validateResponseCodes(responseCodes, codeRange, { report }) {\n const responseCodeRegexp = new RegExp(`^${codeRange[0]}[0-9Xx]{2}$`);\n const containsNeededCode = responseCodes.some((code) => (codeRange === '2XX' && code === 'default') || // It's OK to replace 2xx codes with the default\n responseCodeRegexp.test(code));\n if (!containsNeededCode) {\n report({\n message: `Operation must have at least one \\`${codeRange}\\` response.`,\n location: { reportOnKey: true },\n });\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Arazzo1Types = void 0;\nconst _1 = require(\".\");\nconst oas3_1_1 = require(\"./oas3_1\");\nconst oas3_1 = require(\"./oas3\");\nconst Root = {\n properties: {\n arazzo: { type: 'string' },\n info: 'Info',\n sourceDescriptions: 'SourceDescriptions',\n workflows: 'Workflows',\n components: 'Components',\n },\n required: ['arazzo', 'info', 'sourceDescriptions', 'workflows'],\n extensionsPrefix: 'x-',\n};\nconst NamedParameters = {\n properties: {},\n additionalProperties: 'Parameter',\n};\nconst NamedSuccessActions = {\n properties: {},\n additionalProperties: 'SuccessActionObject',\n};\nconst NamedFailureActions = {\n properties: {},\n additionalProperties: 'FailureActionObject',\n};\nconst Components = {\n properties: {\n inputs: 'NamedInputs',\n parameters: 'NamedParameters',\n successActions: 'NamedSuccessActions',\n failureActions: 'NamedFailureActions',\n },\n extensionsPrefix: 'x-',\n};\nconst NamedInputs = (0, _1.mapOf)('Schema');\nconst Info = {\n properties: {\n title: { type: 'string' },\n description: { type: 'string' },\n summary: { type: 'string' },\n version: { type: 'string' },\n },\n required: ['title', 'version'],\n extensionsPrefix: 'x-',\n};\nconst SourceDescriptions = {\n properties: {},\n items: (value) => {\n if (value?.type === 'openapi') {\n return 'OpenAPISourceDescription';\n }\n else {\n return 'ArazzoSourceDescription';\n }\n },\n};\nconst OpenAPISourceDescription = {\n properties: {\n name: { type: 'string' },\n type: { type: 'string', enum: ['openapi'] },\n url: { type: 'string' },\n 'x-serverUrl': { type: 'string' },\n },\n required: ['name', 'type', 'url'],\n extensionsPrefix: 'x-',\n};\nconst ArazzoSourceDescription = {\n properties: {\n name: { type: 'string' },\n type: { type: 'string', enum: ['arazzo'] },\n url: { type: 'string' },\n },\n required: ['name', 'type', 'url'],\n extensionsPrefix: 'x-',\n};\nconst ReusableObject = {\n properties: {\n reference: { type: 'string' },\n value: {}, // any\n },\n required: ['reference'],\n extensionsPrefix: 'x-',\n};\nconst Parameter = {\n properties: {\n in: { type: 'string', enum: ['header', 'query', 'path', 'cookie'] },\n name: { type: 'string' },\n value: {}, // any\n },\n required: ['name', 'value'],\n extensionsPrefix: 'x-',\n};\nconst Parameters = {\n properties: {},\n items: (value) => {\n if (value?.reference) {\n return 'ReusableObject';\n }\n else {\n return 'Parameter';\n }\n },\n};\nconst Workflow = {\n properties: {\n workflowId: { type: 'string' },\n summary: { type: 'string' },\n description: { type: 'string' },\n parameters: 'Parameters',\n dependsOn: { type: 'array', items: { type: 'string' } },\n inputs: 'Schema',\n outputs: 'Outputs',\n steps: 'Steps',\n successActions: 'OnSuccessActionList',\n failureActions: 'OnFailureActionList',\n },\n required: ['workflowId', 'steps'],\n extensionsPrefix: 'x-',\n};\nconst Workflows = (0, _1.listOf)('Workflow');\nconst Steps = (0, _1.listOf)('Step');\nconst Step = {\n properties: {\n stepId: { type: 'string' },\n description: { type: 'string' },\n operationId: { type: 'string' },\n operationPath: { type: 'string' },\n workflowId: { type: 'string' },\n parameters: 'Parameters',\n successCriteria: (0, _1.listOf)('CriterionObject'),\n onSuccess: 'OnSuccessActionList',\n onFailure: 'OnFailureActionList',\n outputs: 'Outputs',\n 'x-operation': 'ExtendedOperation',\n requestBody: 'RequestBody',\n },\n required: ['stepId'],\n requiredOneOf: ['x-operation', 'operationId', 'operationPath', 'workflowId'],\n extensionsPrefix: 'x-',\n};\nconst Outputs = {\n properties: {},\n additionalProperties: {\n type: 'string',\n },\n};\nconst RequestBody = {\n properties: {\n contentType: { type: 'string' },\n payload: {},\n replacements: (0, _1.listOf)('Replacement'),\n },\n required: ['payload'],\n extensionsPrefix: 'x-',\n};\nconst Replacement = {\n properties: {\n target: { type: 'string' },\n value: {},\n },\n required: ['target', 'value'],\n extensionsPrefix: 'x-',\n};\nconst ExtendedOperation = {\n properties: {\n url: { type: 'string' },\n method: {\n enum: [\n 'get',\n 'post',\n 'put',\n 'delete',\n 'patch',\n 'head',\n 'options',\n 'trace',\n 'connect',\n 'query',\n 'GET',\n 'POST',\n 'PUT',\n 'DELETE',\n 'PATCH',\n 'OPTIONS',\n 'HEAD',\n 'TRACE',\n 'CONNECT',\n 'QUERY',\n ],\n },\n },\n required: ['url', 'method'],\n};\nconst CriterionObject = {\n properties: {\n condition: { type: 'string' },\n context: { type: 'string' },\n type: (value) => {\n if (!value) {\n return undefined;\n }\n else if (typeof value === 'string') {\n return { enum: ['regex', 'jsonpath', 'simple', 'xpath'] };\n }\n else if (value?.type === 'jsonpath') {\n return 'JSONPathCriterion';\n }\n else {\n return 'XPathCriterion';\n }\n },\n },\n required: ['condition'],\n};\nconst JSONPathCriterion = {\n properties: {\n type: { type: 'string', enum: ['jsonpath'] },\n version: { type: 'string', enum: ['draft-goessner-dispatch-jsonpath-00'] },\n },\n};\nconst XPathCriterion = {\n properties: {\n type: { type: 'string', enum: ['xpath'] },\n version: { type: 'string', enum: ['xpath-30', 'xpath-20', 'xpath-10'] },\n },\n};\nconst SuccessActionObject = {\n properties: {\n name: { type: 'string' },\n type: { type: 'string', enum: ['goto', 'end'] },\n stepId: { type: 'string' },\n workflowId: { type: 'string' },\n criteria: (0, _1.listOf)('CriterionObject'),\n },\n required: ['type', 'name'],\n};\nconst OnSuccessActionList = {\n properties: {},\n items: (value) => {\n if (value?.type && value?.name) {\n return 'SuccessActionObject';\n }\n else {\n return 'ReusableObject';\n }\n },\n};\nconst FailureActionObject = {\n properties: {\n name: { type: 'string' },\n type: { type: 'string', enum: ['goto', 'retry', 'end'] },\n workflowId: { type: 'string' },\n stepId: { type: 'string' },\n retryAfter: { type: 'number' },\n retryLimit: { type: 'number' },\n criteria: (0, _1.listOf)('CriterionObject'),\n },\n required: ['type', 'name'],\n};\nconst OnFailureActionList = {\n properties: {},\n items: (value) => {\n if (value?.type && value?.name) {\n return 'FailureActionObject';\n }\n else {\n return 'ReusableObject';\n }\n },\n};\nexports.Arazzo1Types = {\n Root,\n Info,\n SourceDescriptions,\n OpenAPISourceDescription,\n ArazzoSourceDescription,\n Parameters,\n Parameter,\n ReusableObject,\n Workflows,\n Workflow,\n Steps,\n Step,\n RequestBody,\n Replacement,\n ExtendedOperation,\n Outputs,\n CriterionObject,\n XPathCriterion,\n JSONPathCriterion,\n SuccessActionObject,\n OnSuccessActionList,\n FailureActionObject,\n OnFailureActionList,\n Schema: oas3_1_1.Schema,\n NamedSchemas: (0, _1.mapOf)('Schema'),\n ExternalDocs: oas3_1.ExternalDocs,\n DiscriminatorMapping: oas3_1.DiscriminatorMapping,\n Discriminator: oas3_1.Discriminator,\n DependentRequired: oas3_1_1.DependentRequired,\n SchemaProperties: oas3_1_1.SchemaProperties,\n PatternProperties: oas3_1_1.SchemaProperties,\n Components,\n NamedInputs,\n NamedParameters,\n NamedSuccessActions,\n NamedFailureActions,\n Xml: oas3_1.Xml,\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncApi2Types = exports.AsyncApi2Bindings = exports.Dependencies = exports.SecuritySchemeFlows = exports.Discriminator = exports.DiscriminatorMapping = exports.SchemaProperties = exports.Schema = exports.MessageExample = exports.CorrelationId = exports.License = exports.Contact = exports.ServerVariable = exports.ServerMap = exports.ExternalDocs = exports.Tag = void 0;\nconst _1 = require(\".\");\nconst ref_utils_1 = require(\"../ref-utils\");\nconst Root = {\n properties: {\n asyncapi: null, // TODO: validate semver format and supported version\n info: 'Info',\n id: { type: 'string' },\n servers: 'ServerMap',\n channels: 'ChannelMap',\n components: 'Components',\n tags: 'TagList',\n externalDocs: 'ExternalDocs',\n defaultContentType: { type: 'string' },\n },\n required: ['asyncapi', 'channels', 'info'],\n};\nconst Channel = {\n properties: {\n description: { type: 'string' },\n subscribe: 'Operation',\n publish: 'Operation',\n parameters: 'ParametersMap',\n bindings: 'ChannelBindings',\n servers: { type: 'array', items: { type: 'string' } },\n },\n};\nconst ChannelMap = {\n properties: {},\n additionalProperties: 'Channel',\n};\nconst ChannelBindings = {\n properties: {},\n allowed() {\n // allow all supported values, not all have deep linting\n return [\n 'http',\n 'ws',\n 'kafka',\n 'anypointmq',\n 'amqp',\n 'amqp1',\n 'mqtt',\n 'mqtt5',\n 'nats',\n 'jms',\n 'sns',\n 'solace',\n 'sqs',\n 'stomp',\n 'redis',\n 'mercure',\n 'ibmmq',\n 'googlepubsub',\n 'pulsar',\n ];\n },\n additionalProperties: { type: 'object' },\n};\nexports.Tag = {\n properties: {\n name: { type: 'string' },\n description: { type: 'string' },\n externalDocs: 'ExternalDocs',\n },\n required: ['name'],\n};\nexports.ExternalDocs = {\n properties: {\n description: { type: 'string' },\n url: { type: 'string' },\n },\n required: ['url'],\n};\nconst SecurityRequirement = {\n properties: {},\n additionalProperties: { type: 'array', items: { type: 'string' } },\n};\nconst ServerBindings = {\n properties: {},\n allowed() {\n // allow all supported values, not all have deep linting\n return [\n 'http',\n 'ws',\n 'kafka',\n 'anypointmq',\n 'amqp',\n 'amqp1',\n 'mqtt',\n 'mqtt5',\n 'nats',\n 'jms',\n 'sns',\n 'solace',\n 'sqs',\n 'stomp',\n 'redis',\n 'mercure',\n 'ibmmq',\n 'googlepubsub',\n 'pulsar',\n ];\n },\n additionalProperties: { type: 'object' },\n};\nconst Server = {\n properties: {\n url: { type: 'string' },\n protocol: { type: 'string' },\n protocolVersion: { type: 'string' },\n description: { type: 'string' },\n variables: 'ServerVariablesMap',\n security: 'SecurityRequirementList',\n bindings: 'ServerBindings',\n tags: 'TagList',\n },\n required: ['url', 'protocol'],\n};\nexports.ServerMap = {\n properties: {},\n additionalProperties: (_value, key) => \n // eslint-disable-next-line no-useless-escape\n key.match(/^[A-Za-z0-9_\\-]+$/) ? 'Server' : undefined,\n};\nexports.ServerVariable = {\n properties: {\n enum: {\n type: 'array',\n items: { type: 'string' },\n },\n default: { type: 'string' },\n description: { type: 'string' },\n examples: {\n type: 'array',\n items: { type: 'string' },\n },\n },\n required: [],\n};\nconst Info = {\n properties: {\n title: { type: 'string' },\n version: { type: 'string' },\n description: { type: 'string' },\n termsOfService: { type: 'string' },\n contact: 'Contact',\n license: 'License',\n },\n required: ['title', 'version'],\n};\nexports.Contact = {\n properties: {\n name: { type: 'string' },\n url: { type: 'string' },\n email: { type: 'string' },\n },\n};\nexports.License = {\n properties: {\n name: { type: 'string' },\n url: { type: 'string' },\n },\n required: ['name'],\n};\nconst Parameter = {\n properties: {\n description: { type: 'string' },\n schema: 'Schema',\n location: { type: 'string' },\n },\n};\nexports.CorrelationId = {\n properties: {\n description: { type: 'string' },\n location: { type: 'string' },\n },\n required: ['location'],\n};\nconst Message = {\n properties: {\n messageId: { type: 'string' },\n headers: 'Schema',\n payload: 'Schema', // TODO: strictly this does not cover all cases\n correlationId: 'CorrelationId',\n schemaFormat: { type: 'string' }, // TODO: support official list of schema formats and custom values\n contentType: { type: 'string' },\n name: { type: 'string' },\n title: { type: 'string' },\n summary: { type: 'string' },\n description: { type: 'string' },\n tags: 'TagList',\n externalDocs: 'ExternalDocs',\n bindings: 'MessageBindings',\n examples: 'MessageExampleList',\n traits: 'MessageTraitList',\n },\n additionalProperties: {},\n};\nconst MessageBindings = {\n properties: {},\n allowed() {\n // allow all supported values, not all have deep linting\n return [\n 'http',\n 'ws',\n 'kafka',\n 'anypointmq',\n 'amqp',\n 'amqp1',\n 'mqtt',\n 'mqtt5',\n 'nats',\n 'jms',\n 'sns',\n 'solace',\n 'sqs',\n 'stomp',\n 'redis',\n 'mercure',\n 'ibmmq',\n 'googlepubsub',\n 'pulsar',\n ];\n },\n additionalProperties: { type: 'object' },\n};\nconst OperationBindings = {\n properties: {},\n allowed() {\n // allow all supported values, not all have deep linting\n return [\n 'http',\n 'ws',\n 'kafka',\n 'anypointmq',\n 'amqp',\n 'amqp1',\n 'mqtt',\n 'mqtt5',\n 'nats',\n 'jms',\n 'sns',\n 'solace',\n 'sqs',\n 'stomp',\n 'redis',\n 'mercure',\n 'ibmmq',\n 'googlepubsub',\n 'pulsar',\n ];\n },\n additionalProperties: { type: 'object' },\n};\nconst OperationTrait = {\n properties: {\n tags: 'TagList',\n summary: { type: 'string' },\n description: { type: 'string' },\n externalDocs: 'ExternalDocs',\n operationId: { type: 'string' },\n security: 'SecurityRequirementList',\n bindings: 'OperationBindings',\n },\n required: [],\n};\nconst MessageTrait = {\n properties: {\n messageId: { type: 'string' },\n headers: 'Schema',\n correlationId: 'CorrelationId',\n schemaFormat: { type: 'string' },\n contentType: { type: 'string' },\n name: { type: 'string' },\n title: { type: 'string' },\n summary: { type: 'string' },\n description: { type: 'string' },\n tags: 'TagList',\n externalDocs: 'ExternalDocs',\n bindings: 'MessageBindings',\n examples: 'MessageExampleList',\n },\n additionalProperties: {},\n};\nconst Operation = {\n properties: {\n tags: 'TagList',\n summary: { type: 'string' },\n description: { type: 'string' },\n externalDocs: 'ExternalDocs',\n operationId: { type: 'string' },\n security: 'SecurityRequirementList',\n bindings: 'OperationBindings',\n traits: 'OperationTraitList',\n message: 'Message',\n },\n required: [],\n};\nexports.MessageExample = {\n properties: {\n payload: { isExample: true },\n summary: { type: 'string' },\n name: { type: 'string' },\n headers: { type: 'object' },\n },\n};\nexports.Schema = {\n properties: {\n $id: { type: 'string' },\n $schema: { type: 'string' },\n definitions: 'NamedSchemas',\n externalDocs: 'ExternalDocs',\n discriminator: 'Discriminator',\n myArbitraryKeyword: { type: 'boolean' },\n title: { type: 'string' },\n multipleOf: { type: 'number', minimum: 0 },\n maximum: { type: 'number' },\n minimum: { type: 'number' },\n exclusiveMaximum: { type: 'number' },\n exclusiveMinimum: { type: 'number' },\n maxLength: { type: 'integer', minimum: 0 },\n minLength: { type: 'integer', minimum: 0 },\n pattern: { type: 'string' },\n maxItems: { type: 'integer', minimum: 0 },\n minItems: { type: 'integer', minimum: 0 },\n uniqueItems: { type: 'boolean' },\n maxProperties: { type: 'integer', minimum: 0 },\n minProperties: { type: 'integer', minimum: 0 },\n required: { type: 'array', items: { type: 'string' } },\n enum: { type: 'array' },\n type: (value) => {\n return Array.isArray(value)\n ? {\n type: 'array',\n items: { enum: ['object', 'array', 'string', 'number', 'integer', 'boolean', 'null'] },\n }\n : {\n enum: ['object', 'array', 'string', 'number', 'integer', 'boolean', 'null'],\n };\n },\n allOf: (0, _1.listOf)('Schema'),\n anyOf: (0, _1.listOf)('Schema'),\n oneOf: (0, _1.listOf)('Schema'),\n not: 'Schema',\n if: 'Schema',\n then: 'Schema',\n else: 'Schema',\n contains: 'Schema',\n patternProperties: { type: 'object' },\n propertyNames: 'Schema',\n properties: 'SchemaProperties',\n items: (value) => {\n return Array.isArray(value) ? (0, _1.listOf)('Schema') : 'Schema';\n },\n additionalProperties: (value) => {\n return typeof value === 'boolean' ? { type: 'boolean' } : 'Schema';\n },\n description: { type: 'string' },\n format: { type: 'string' },\n contentEncoding: { type: 'string' },\n contentMediaType: { type: 'string' },\n default: null,\n readOnly: { type: 'boolean' },\n writeOnly: { type: 'boolean' },\n examples: { type: 'array' },\n example: { isExample: true },\n deprecated: { type: 'boolean' },\n const: null,\n $comment: { type: 'string' },\n additionalItems: (value) => {\n return typeof value === 'boolean' ? { type: 'boolean' } : 'Schema';\n },\n dependencies: 'Dependencies',\n },\n};\nexports.SchemaProperties = {\n properties: {},\n additionalProperties: (value) => {\n return typeof value === 'boolean' ? { type: 'boolean' } : 'Schema';\n },\n};\nexports.DiscriminatorMapping = {\n properties: {},\n additionalProperties: (value) => {\n if ((0, ref_utils_1.isMappingRef)(value)) {\n return { type: 'string', directResolveAs: 'Schema' };\n }\n else {\n return { type: 'string' };\n }\n },\n};\nexports.Discriminator = {\n properties: {\n propertyName: { type: 'string' },\n mapping: 'DiscriminatorMapping',\n },\n required: ['propertyName'],\n};\nconst Components = {\n properties: {\n messages: 'NamedMessages',\n parameters: 'NamedParameters',\n schemas: 'NamedSchemas',\n correlationIds: 'NamedCorrelationIds',\n messageTraits: 'NamedMessageTraits',\n operationTraits: 'NamedOperationTraits',\n securitySchemes: 'NamedSecuritySchemes',\n servers: 'ServerMap',\n serverVariables: 'ServerVariablesMap',\n channels: 'ChannelMap',\n serverBindings: 'ServerBindings',\n channelBindings: 'ChannelBindings',\n operationBindings: 'OperationBindings',\n messageBindings: 'MessageBindings',\n },\n};\nconst ImplicitFlow = {\n properties: {\n refreshUrl: { type: 'string' },\n scopes: { type: 'object', additionalProperties: { type: 'string' } }, // TODO: validate scopes\n authorizationUrl: { type: 'string' },\n },\n required: ['authorizationUrl', 'scopes'],\n};\nconst PasswordFlow = {\n properties: {\n refreshUrl: { type: 'string' },\n scopes: { type: 'object', additionalProperties: { type: 'string' } }, // TODO: validate scopes\n tokenUrl: { type: 'string' },\n },\n required: ['tokenUrl', 'scopes'],\n};\nconst ClientCredentials = {\n properties: {\n refreshUrl: { type: 'string' },\n scopes: { type: 'object', additionalProperties: { type: 'string' } }, // TODO: validate scopes\n tokenUrl: { type: 'string' },\n },\n required: ['tokenUrl', 'scopes'],\n};\nconst AuthorizationCode = {\n properties: {\n refreshUrl: { type: 'string' },\n authorizationUrl: { type: 'string' },\n scopes: { type: 'object', additionalProperties: { type: 'string' } }, // TODO: validate scopes\n tokenUrl: { type: 'string' },\n },\n required: ['authorizationUrl', 'tokenUrl', 'scopes'],\n};\nexports.SecuritySchemeFlows = {\n properties: {\n implicit: 'ImplicitFlow',\n password: 'PasswordFlow',\n clientCredentials: 'ClientCredentials',\n authorizationCode: 'AuthorizationCode',\n },\n};\nconst SecurityScheme = {\n properties: {\n type: {\n enum: [\n 'userPassword',\n 'apiKey',\n 'X509',\n 'symmetricEncryption',\n 'asymmetricEncryption',\n 'httpApiKey',\n 'http',\n 'oauth2',\n 'openIdConnect',\n 'plain',\n 'scramSha256',\n 'scramSha512',\n 'gssapi',\n ],\n },\n description: { type: 'string' },\n name: { type: 'string' },\n in: { type: 'string', enum: ['query', 'header', 'cookie', 'user', 'password'] },\n scheme: { type: 'string' },\n bearerFormat: { type: 'string' },\n flows: 'SecuritySchemeFlows',\n openIdConnectUrl: { type: 'string' },\n },\n required(value) {\n switch (value?.type) {\n case 'apiKey':\n return ['type', 'in'];\n case 'httpApiKey':\n return ['type', 'name', 'in'];\n case 'http':\n return ['type', 'scheme'];\n case 'oauth2':\n return ['type', 'flows'];\n case 'openIdConnect':\n return ['type', 'openIdConnectUrl'];\n default:\n return ['type'];\n }\n },\n allowed(value) {\n switch (value?.type) {\n case 'apiKey':\n return ['type', 'in', 'description'];\n case 'httpApiKey':\n return ['type', 'name', 'in', 'description'];\n case 'http':\n return ['type', 'scheme', 'bearerFormat', 'description'];\n case 'oauth2':\n return ['type', 'flows', 'description'];\n case 'openIdConnect':\n return ['type', 'openIdConnectUrl', 'description'];\n default:\n return ['type', 'description'];\n }\n },\n extensionsPrefix: 'x-',\n};\nexports.Dependencies = {\n properties: {},\n additionalProperties: (value) => {\n return Array.isArray(value) ? { type: 'array', items: { type: 'string' } } : 'Schema';\n },\n};\n// --- Per-protocol node types\n// http\nconst HttpChannelBinding = {\n properties: {}, // empty object\n};\nChannelBindings.properties.http = HttpChannelBinding;\nconst HttpServerBinding = {\n properties: {}, // empty object\n};\nServerBindings.properties.http = HttpServerBinding;\nconst HttpMessageBinding = {\n properties: {\n headers: 'Schema',\n bindingVersion: { type: 'string' },\n },\n};\nMessageBindings.properties.http = HttpMessageBinding;\nconst HttpOperationBinding = {\n properties: {\n type: { type: 'string' },\n method: {\n type: 'string',\n enum: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', 'TRACE'],\n },\n headers: 'Schema',\n bindingVersion: { type: 'string' },\n },\n};\nOperationBindings.properties.http = HttpOperationBinding;\n// ws\nconst WsChannelBinding = {\n properties: {\n method: { type: 'string' },\n query: 'Schema',\n headers: 'Schema',\n bindingVersion: { type: 'string' },\n },\n};\nChannelBindings.properties.ws = WsChannelBinding;\nconst WsServerBinding = {\n properties: {}, // empty object\n};\nServerBindings.properties.ws = WsServerBinding;\nconst WsMessageBinding = {\n properties: {}, // empty object\n};\nMessageBindings.properties.ws = WsMessageBinding;\nconst WsOperationBinding = {\n properties: {}, // empty object\n};\nOperationBindings.properties.ws = WsOperationBinding;\n// kafka\nconst KafkaTopicConfiguration = {\n properties: {\n 'cleanup.policy': { type: 'array', items: { enum: ['delete', 'compact'] } },\n 'retention.ms': { type: 'integer' },\n 'retention.bytes': { type: 'integer' },\n 'delete.retention.ms': { type: 'integer' },\n 'max.message.bytes': { type: 'integer' },\n },\n};\nconst KafkaChannelBinding = {\n properties: {\n topic: { type: 'string' },\n partitions: { type: 'integer' },\n replicas: { type: 'integer' },\n topicConfiguration: 'KafkaTopicConfiguration',\n bindingVersion: { type: 'string' },\n },\n};\nChannelBindings.properties.kafka = KafkaChannelBinding;\nconst KafkaServerBinding = {\n properties: {}, // empty object\n};\nServerBindings.properties.kafka = KafkaServerBinding;\nconst KafkaMessageBinding = {\n properties: {\n key: 'Schema', // TODO: add avro support\n schemaIdLocation: { type: 'string' },\n schemaIdPayloadEncoding: { type: 'string' },\n schemaLookupStrategy: { type: 'string' },\n bindingVersion: { type: 'string' },\n },\n};\nMessageBindings.properties.kafka = KafkaMessageBinding;\nconst KafkaOperationBinding = {\n properties: {\n groupId: 'Schema',\n clientId: 'Schema',\n bindingVersion: { type: 'string' },\n },\n};\nOperationBindings.properties.kafka = KafkaOperationBinding;\n// anypointmq\nconst AnypointmqChannelBinding = {\n properties: {\n destination: { type: 'string' },\n destinationType: { type: 'string' },\n bindingVersion: { type: 'string' },\n },\n};\nChannelBindings.properties.anypointmq = AnypointmqChannelBinding;\nconst AnypointmqServerBinding = {\n properties: {}, // empty object\n};\nServerBindings.properties.anypointmq = AnypointmqServerBinding;\nconst AnypointmqMessageBinding = {\n properties: {\n headers: 'Schema',\n bindingVersion: { type: 'string' },\n },\n};\nMessageBindings.properties.anypointmq = AnypointmqMessageBinding;\nconst AnypointmqOperationBinding = {\n properties: {}, // empty object\n};\nOperationBindings.properties.anypointmq = AnypointmqOperationBinding;\n// amqp\nconst AmqpChannelBinding = {\n properties: {}, // empty object\n};\nChannelBindings.properties.amqp = AmqpChannelBinding;\nconst AmqpServerBinding = {\n properties: {}, // empty object\n};\nServerBindings.properties.amqp = AmqpServerBinding;\nconst AmqpMessageBinding = {\n properties: {\n contentEncoding: { type: 'string' },\n messageType: { type: 'string' },\n bindingVersion: { type: 'string' },\n },\n};\nMessageBindings.properties.amqp = AmqpMessageBinding;\nconst AmqpOperationBinding = {\n // TODO: some fields are subscribe only\n properties: {\n expiration: { type: 'integer' },\n userId: { type: 'string' },\n cc: { type: 'array', items: { type: 'string' } },\n priority: { type: 'integer' },\n deliveryMode: { type: 'integer' }, // TODO: enum: [1, 2]\n mandatory: { type: 'boolean' },\n bcc: { type: 'array', items: { type: 'string' } },\n replyTo: { type: 'string' },\n timestamp: { type: 'boolean' },\n ack: { type: 'boolean' },\n bindingVersion: { type: 'string' },\n },\n};\nOperationBindings.properties.amqp = AmqpOperationBinding;\n// amqp1\nconst Amqp1ChannelBinding = {\n properties: {}, // empty object\n};\nChannelBindings.properties.amqp1 = Amqp1ChannelBinding;\nconst Amqp1ServerBinding = {\n properties: {}, // empty object\n};\nServerBindings.properties.amqp1 = Amqp1ServerBinding;\nconst Amqp1MessageBinding = {\n properties: {}, // empty object\n};\nMessageBindings.properties.amqp1 = Amqp1MessageBinding;\nconst Amqp1OperationBinding = {\n properties: {}, // empty object\n};\nOperationBindings.properties.amqp1 = Amqp1OperationBinding;\n// mqtt\nconst MqttChannelBinding = {\n properties: {\n qos: { type: 'integer' },\n retain: { type: 'boolean' },\n bindingVersion: { type: 'string' },\n },\n};\nChannelBindings.properties.mqtt = MqttChannelBinding;\nconst MqttServerBindingLastWill = {\n properties: {\n topic: { type: 'string' },\n qos: { type: 'integer' },\n message: { type: 'string' },\n retain: { type: 'boolean' },\n },\n};\nconst MqttServerBinding = {\n properties: {\n clientId: { type: 'string' },\n cleanSession: { type: 'boolean' },\n lastWill: 'MqttServerBindingLastWill',\n keepAlive: { type: 'integer' },\n bindingVersion: { type: 'string' },\n },\n};\nServerBindings.properties.mqtt = MqttServerBinding;\nconst MqttMessageBinding = {\n properties: {\n bindingVersion: { type: 'string' },\n },\n};\nMessageBindings.properties.mqtt = MqttMessageBinding;\nconst MqttOperationBinding = {\n properties: {\n qos: { type: 'integer' },\n retain: { type: 'boolean' },\n bindingVersion: { type: 'string' },\n },\n};\nOperationBindings.properties.mqtt = MqttOperationBinding;\n// mqtt5\nconst Mqtt5ChannelBinding = {\n properties: {}, // empty object\n};\nChannelBindings.properties.mqtt5 = Mqtt5ChannelBinding;\nconst Mqtt5ServerBinding = {\n properties: {}, // empty object\n};\nServerBindings.properties.mqtt5 = Mqtt5ServerBinding;\nconst Mqtt5MessageBinding = {\n properties: {}, // empty object\n};\nMessageBindings.properties.mqtt5 = Mqtt5MessageBinding;\nconst Mqtt5OperationBinding = {\n properties: {}, // empty object\n};\nOperationBindings.properties.mqtt5 = Mqtt5OperationBinding;\n// nats\nconst NatsChannelBinding = {\n properties: {}, // empty object\n};\nChannelBindings.properties.nats = NatsChannelBinding;\nconst NatsServerBinding = {\n properties: {}, // empty object\n};\nServerBindings.properties.nats = NatsServerBinding;\nconst NatsMessageBinding = {\n properties: {}, // empty object\n};\nMessageBindings.properties.nats = NatsMessageBinding;\nconst NatsOperationBinding = {\n properties: {\n queue: { type: 'string' },\n bindingVersion: { type: 'string' },\n },\n};\nOperationBindings.properties.nats = NatsOperationBinding;\n// jms\nconst JmsChannelBinding = {\n properties: {\n destination: { type: 'string' },\n destinationType: { type: 'string' },\n bindingVersion: { type: 'string' },\n },\n};\nChannelBindings.properties.jms = JmsChannelBinding;\nconst JmsServerBinding = {\n properties: {}, // empty object\n};\nServerBindings.properties.jms = JmsServerBinding;\nconst JmsMessageBinding = {\n properties: {\n headers: 'Schema',\n bindingVersion: { type: 'string' },\n },\n};\nMessageBindings.properties.jms = JmsMessageBinding;\nconst JmsOperationBinding = {\n properties: {\n headers: 'Schema',\n bindingVersion: { type: 'string' },\n },\n};\nOperationBindings.properties.jms = JmsOperationBinding;\n// sns\n// solace\nconst SolaceChannelBinding = {\n properties: {}, // empty object\n};\nChannelBindings.properties.solace = SolaceChannelBinding;\nconst SolaceServerBinding = {\n properties: {\n bindingVersion: { type: 'string' },\n msgVpn: { type: 'string' },\n },\n};\nServerBindings.properties.solace = SolaceServerBinding;\nconst SolaceMessageBinding = {\n properties: {}, // empty object\n};\nMessageBindings.properties.solace = SolaceMessageBinding;\nconst SolaceDestination = {\n properties: {\n destinationType: { type: 'string', enum: ['queue', 'topic'] },\n deliveryMode: { type: 'string', enum: ['direct', 'persistent'] },\n 'queue.name': { type: 'string' },\n 'queue.topicSubscriptions': { type: 'array', items: { type: 'string' } },\n 'queue.accessType': { type: 'string', enum: ['exclusive', 'nonexclusive'] },\n 'queue.maxMsgSpoolSize': { type: 'string' },\n 'queue.maxTtl': { type: 'string' },\n 'topic.topicSubscriptions': { type: 'array', items: { type: 'string' } },\n },\n};\nconst SolaceOperationBinding = {\n properties: {\n bindingVersion: { type: 'string' },\n destinations: (0, _1.listOf)('SolaceDestination'),\n },\n};\nOperationBindings.properties.solace = SolaceOperationBinding;\n// sqs\n// stomp\nconst StompChannelBinding = {\n properties: {}, // empty object\n};\nChannelBindings.properties.stomp = StompChannelBinding;\nconst StompServerBinding = {\n properties: {}, // empty object\n};\nServerBindings.properties.stomp = StompServerBinding;\nconst StompMessageBinding = {\n properties: {}, // empty object\n};\nMessageBindings.properties.stomp = StompMessageBinding;\nconst StompOperationBinding = {\n properties: {}, // empty object\n};\nOperationBindings.properties.stomp = StompOperationBinding;\n// redis\nconst RedisChannelBinding = {\n properties: {}, // empty object\n};\nChannelBindings.properties.redis = RedisChannelBinding;\nconst RedisServerBinding = {\n properties: {}, // empty object\n};\nServerBindings.properties.redis = RedisServerBinding;\nconst RedisMessageBinding = {\n properties: {}, // empty object\n};\nMessageBindings.properties.redis = RedisMessageBinding;\nconst RedisOperationBinding = {\n properties: {}, // empty object\n};\nOperationBindings.properties.redis = RedisOperationBinding;\n// mercure\nconst MercureChannelBinding = {\n properties: {}, // empty object\n};\nChannelBindings.properties.mercure = MercureChannelBinding;\nconst MercureServerBinding = {\n properties: {}, // empty object\n};\nServerBindings.properties.mercure = MercureServerBinding;\nconst MercureMessageBinding = {\n properties: {}, // empty object\n};\nMessageBindings.properties.mercure = MercureMessageBinding;\nconst MercureOperationBinding = {\n properties: {}, // empty object\n};\nOperationBindings.properties.mercure = MercureOperationBinding;\n// ibmmq\n// googlepubsub\n// pulsar\n// --- End per-protocol node types\nexports.AsyncApi2Bindings = {\n HttpServerBinding,\n HttpChannelBinding,\n HttpMessageBinding,\n HttpOperationBinding,\n WsServerBinding,\n WsChannelBinding,\n WsMessageBinding,\n WsOperationBinding,\n KafkaServerBinding,\n KafkaTopicConfiguration,\n KafkaChannelBinding,\n KafkaMessageBinding,\n KafkaOperationBinding,\n AnypointmqServerBinding,\n AnypointmqChannelBinding,\n AnypointmqMessageBinding,\n AnypointmqOperationBinding,\n AmqpServerBinding,\n AmqpChannelBinding,\n AmqpMessageBinding,\n AmqpOperationBinding,\n Amqp1ServerBinding,\n Amqp1ChannelBinding,\n Amqp1MessageBinding,\n Amqp1OperationBinding,\n MqttServerBindingLastWill,\n MqttServerBinding,\n MqttChannelBinding,\n MqttMessageBinding,\n MqttOperationBinding,\n Mqtt5ServerBinding,\n Mqtt5ChannelBinding,\n Mqtt5MessageBinding,\n Mqtt5OperationBinding,\n NatsServerBinding,\n NatsChannelBinding,\n NatsMessageBinding,\n NatsOperationBinding,\n JmsServerBinding,\n JmsChannelBinding,\n JmsMessageBinding,\n JmsOperationBinding,\n SolaceServerBinding,\n SolaceChannelBinding,\n SolaceMessageBinding,\n SolaceDestination,\n SolaceOperationBinding,\n StompServerBinding,\n StompChannelBinding,\n StompMessageBinding,\n StompOperationBinding,\n RedisServerBinding,\n RedisChannelBinding,\n RedisMessageBinding,\n RedisOperationBinding,\n MercureServerBinding,\n MercureChannelBinding,\n MercureMessageBinding,\n MercureOperationBinding,\n ServerBindings,\n ChannelBindings,\n MessageBindings,\n OperationBindings,\n};\nexports.AsyncApi2Types = {\n ...exports.AsyncApi2Bindings,\n Root,\n Tag: exports.Tag,\n TagList: (0, _1.listOf)('Tag'),\n ServerMap: exports.ServerMap,\n ExternalDocs: exports.ExternalDocs,\n Server,\n ServerVariable: exports.ServerVariable,\n ServerVariablesMap: (0, _1.mapOf)('ServerVariable'),\n SecurityRequirement,\n SecurityRequirementList: (0, _1.listOf)('SecurityRequirement'),\n Info,\n Contact: exports.Contact,\n License: exports.License,\n ChannelMap,\n Channel,\n Parameter,\n ParametersMap: (0, _1.mapOf)('Parameter'),\n Operation,\n Schema: exports.Schema,\n MessageExample: exports.MessageExample,\n SchemaProperties: exports.SchemaProperties,\n DiscriminatorMapping: exports.DiscriminatorMapping,\n Discriminator: exports.Discriminator,\n Components,\n NamedSchemas: (0, _1.mapOf)('Schema'),\n NamedMessages: (0, _1.mapOf)('Message'),\n NamedMessageTraits: (0, _1.mapOf)('MessageTrait'),\n NamedOperationTraits: (0, _1.mapOf)('OperationTrait'),\n NamedParameters: (0, _1.mapOf)('Parameter'),\n NamedSecuritySchemes: (0, _1.mapOf)('SecurityScheme'),\n NamedCorrelationIds: (0, _1.mapOf)('CorrelationId'),\n ImplicitFlow,\n PasswordFlow,\n ClientCredentials,\n AuthorizationCode,\n SecuritySchemeFlows: exports.SecuritySchemeFlows,\n SecurityScheme,\n Message,\n MessageBindings,\n OperationBindings,\n OperationTrait,\n OperationTraitList: (0, _1.listOf)('OperationTrait'),\n MessageTrait,\n MessageTraitList: (0, _1.listOf)('MessageTrait'),\n MessageExampleList: (0, _1.listOf)('MessageExample'),\n CorrelationId: exports.CorrelationId,\n Dependencies: exports.Dependencies,\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncApi3Types = void 0;\nconst _1 = require(\".\");\nconst asyncapi2_1 = require(\"./asyncapi2\");\nconst Root = {\n properties: {\n asyncapi: { type: 'string', enum: ['3.0.0'] },\n info: 'Info',\n id: { type: 'string' },\n servers: 'ServerMap',\n channels: 'NamedChannels',\n components: 'Components',\n operations: 'NamedOperations',\n defaultContentType: { type: 'string' },\n },\n required: ['asyncapi', 'info'],\n};\nconst Channel = {\n properties: {\n address: { type: 'string' },\n messages: 'NamedMessages',\n title: { type: 'string' },\n summary: { type: 'string' },\n description: { type: 'string' },\n servers: 'ServerList',\n parameters: 'ParametersMap',\n bindings: 'ChannelBindings',\n tags: 'TagList',\n externalDocs: 'ExternalDocs',\n },\n};\nconst Server = {\n properties: {\n host: { type: 'string' },\n pathname: { type: 'string' },\n protocol: { type: 'string' },\n protocolVersion: { type: 'string' },\n description: { type: 'string' },\n variables: 'ServerVariablesMap',\n security: 'SecuritySchemeList',\n bindings: 'ServerBindings',\n externalDocs: 'ExternalDocs',\n tags: 'TagList',\n },\n required: ['host', 'protocol'],\n};\nconst Info = {\n properties: {\n title: { type: 'string' },\n version: { type: 'string' },\n description: { type: 'string' },\n termsOfService: { type: 'string' },\n contact: 'Contact',\n license: 'License',\n tags: 'TagList',\n externalDocs: 'ExternalDocs',\n },\n required: ['title', 'version'],\n};\nconst Parameter = {\n properties: {\n description: { type: 'string' },\n enum: { type: 'array', items: { type: 'string' } },\n default: { type: 'string' },\n examples: { type: 'array', items: { type: 'string' } },\n location: { type: 'string' },\n },\n};\nconst Message = {\n properties: {\n headers: 'Schema',\n payload: (value) => {\n if (!!value && value?.['schemaFormat']) {\n return {\n properties: {\n schema: 'Schema',\n schemaFormat: { type: 'string' },\n },\n required: ['schema', 'schemaFormat'],\n };\n }\n else {\n return 'Schema';\n }\n },\n correlationId: 'CorrelationId',\n contentType: { type: 'string' },\n name: { type: 'string' },\n title: { type: 'string' },\n summary: { type: 'string' },\n description: { type: 'string' },\n tags: 'TagList',\n externalDocs: 'ExternalDocs',\n bindings: 'MessageBindings',\n examples: 'MessageExampleList',\n traits: 'MessageTraitList',\n },\n additionalProperties: {},\n};\nconst OperationTrait = {\n properties: {\n tags: 'TagList',\n title: { type: 'string' },\n summary: { type: 'string' },\n description: { type: 'string' },\n externalDocs: 'ExternalDocs',\n security: 'SecuritySchemeList',\n bindings: 'OperationBindings',\n },\n required: [],\n};\nconst MessageTrait = {\n properties: {\n headers: (value) => {\n if (typeof value === 'function' || (typeof value === 'object' && !!value)) {\n return {\n properties: {\n schema: 'Schema',\n schemaFormat: { type: 'string' },\n },\n };\n }\n else {\n return 'Schema';\n }\n },\n correlationId: 'CorrelationId',\n contentType: { type: 'string' },\n name: { type: 'string' },\n title: { type: 'string' },\n summary: { type: 'string' },\n description: { type: 'string' },\n tags: 'TagList',\n externalDocs: 'ExternalDocs',\n bindings: 'MessageBindings',\n examples: 'MessageExampleList',\n },\n additionalProperties: {},\n};\nconst Operation = {\n properties: {\n action: { type: 'string', enum: ['send', 'receive'] },\n channel: 'Channel',\n title: { type: 'string' },\n tags: 'TagList',\n summary: { type: 'string' },\n description: { type: 'string' },\n externalDocs: 'ExternalDocs',\n operationId: { type: 'string' },\n security: 'SecuritySchemeList',\n bindings: 'OperationBindings',\n traits: 'OperationTraitList',\n messages: 'MessageList',\n reply: 'OperationReply',\n },\n required: ['action', 'channel'],\n};\nconst OperationReply = {\n properties: {\n channel: 'Channel',\n messages: 'MessageList',\n address: 'OperationReplyAddress',\n },\n};\nconst OperationReplyAddress = {\n properties: {\n location: { type: 'string' },\n description: { type: 'string' },\n },\n required: ['location'],\n};\nconst Components = {\n properties: {\n messages: 'NamedMessages',\n parameters: 'NamedParameters',\n schemas: 'NamedSchemas',\n replies: 'NamedOperationReplies',\n replyAddresses: 'NamedOperationRelyAddresses',\n correlationIds: 'NamedCorrelationIds',\n messageTraits: 'NamedMessageTraits',\n operationTraits: 'NamedOperationTraits',\n tags: 'NamedTags',\n externalDocs: 'NamedExternalDocs',\n securitySchemes: 'NamedSecuritySchemes',\n servers: 'ServerMap',\n serverVariables: 'ServerVariablesMap',\n channels: 'NamedChannels',\n operations: 'NamedOperations',\n serverBindings: 'ServerBindings',\n channelBindings: 'ChannelBindings',\n operationBindings: 'OperationBindings',\n messageBindings: 'MessageBindings',\n },\n};\nconst ImplicitFlow = {\n properties: {\n refreshUrl: { type: 'string' },\n availableScopes: { type: 'object', additionalProperties: { type: 'string' } },\n authorizationUrl: { type: 'string' },\n },\n required: ['authorizationUrl', 'availableScopes'],\n};\nconst PasswordFlow = {\n properties: {\n refreshUrl: { type: 'string' },\n availableScopes: { type: 'object', additionalProperties: { type: 'string' } },\n tokenUrl: { type: 'string' },\n },\n required: ['tokenUrl', 'availableScopes'],\n};\nconst ClientCredentials = {\n properties: {\n refreshUrl: { type: 'string' },\n availableScopes: { type: 'object', additionalProperties: { type: 'string' } },\n tokenUrl: { type: 'string' },\n },\n required: ['tokenUrl', 'availableScopes'],\n};\nconst AuthorizationCode = {\n properties: {\n refreshUrl: { type: 'string' },\n authorizationUrl: { type: 'string' },\n availableScopes: { type: 'object', additionalProperties: { type: 'string' } },\n tokenUrl: { type: 'string' },\n },\n required: ['authorizationUrl', 'tokenUrl', 'availableScopes'],\n};\nconst SecurityScheme = {\n properties: {\n type: {\n enum: [\n 'userPassword',\n 'apiKey',\n 'X509',\n 'symmetricEncryption',\n 'asymmetricEncryption',\n 'httpApiKey',\n 'http',\n 'oauth2',\n 'openIdConnect',\n 'plain',\n 'scramSha256',\n 'scramSha512',\n 'gssapi',\n ],\n },\n description: { type: 'string' },\n name: { type: 'string' },\n in: { type: 'string', enum: ['query', 'header', 'cookie', 'user', 'password'] },\n scheme: { type: 'string' },\n bearerFormat: { type: 'string' },\n flows: 'SecuritySchemeFlows',\n openIdConnectUrl: { type: 'string' },\n scopes: { type: 'array', items: { type: 'string' } },\n },\n required(value) {\n switch (value?.type) {\n case 'apiKey':\n return ['type', 'in'];\n case 'httpApiKey':\n return ['type', 'name', 'in'];\n case 'http':\n return ['type', 'scheme'];\n case 'oauth2':\n return ['type', 'flows'];\n case 'openIdConnect':\n return ['type', 'openIdConnectUrl'];\n default:\n return ['type'];\n }\n },\n allowed(value) {\n switch (value?.type) {\n case 'apiKey':\n return ['type', 'in', 'description'];\n case 'httpApiKey':\n return ['type', 'name', 'in', 'description'];\n case 'http':\n return ['type', 'scheme', 'bearerFormat', 'description'];\n case 'oauth2':\n return ['type', 'flows', 'description', 'scopes'];\n case 'openIdConnect':\n return ['type', 'openIdConnectUrl', 'description', 'scopes'];\n default:\n return ['type', 'description'];\n }\n },\n extensionsPrefix: 'x-',\n};\nexports.AsyncApi3Types = {\n // from asyncapi2\n ...asyncapi2_1.AsyncApi2Bindings,\n CorrelationId: asyncapi2_1.CorrelationId,\n SecuritySchemeFlows: asyncapi2_1.SecuritySchemeFlows,\n ServerVariable: asyncapi2_1.ServerVariable,\n Contact: asyncapi2_1.Contact,\n License: asyncapi2_1.License,\n MessageExample: asyncapi2_1.MessageExample,\n Tag: asyncapi2_1.Tag,\n Dependencies: asyncapi2_1.Dependencies,\n Schema: asyncapi2_1.Schema,\n Discriminator: asyncapi2_1.Discriminator,\n DiscriminatorMapping: asyncapi2_1.DiscriminatorMapping,\n SchemaProperties: asyncapi2_1.SchemaProperties,\n ServerMap: asyncapi2_1.ServerMap,\n ExternalDocs: asyncapi2_1.ExternalDocs,\n Root,\n Channel,\n Parameter,\n Info,\n Server,\n MessageTrait,\n Operation,\n OperationReply,\n OperationReplyAddress,\n Components,\n ImplicitFlow,\n PasswordFlow,\n ClientCredentials,\n AuthorizationCode,\n SecurityScheme,\n Message,\n OperationTrait,\n ServerVariablesMap: (0, _1.mapOf)('ServerVariable'),\n NamedTags: (0, _1.mapOf)('Tag'),\n NamedExternalDocs: (0, _1.mapOf)('ExternalDocs'),\n NamedChannels: (0, _1.mapOf)('Channel'),\n ParametersMap: (0, _1.mapOf)('Parameter'),\n NamedOperations: (0, _1.mapOf)('Operation'),\n NamedOperationReplies: (0, _1.mapOf)('OperationReply'),\n NamedOperationRelyAddresses: (0, _1.mapOf)('OperationReplyAddress'),\n NamedSchemas: (0, _1.mapOf)('Schema'),\n NamedMessages: (0, _1.mapOf)('Message'),\n NamedMessageTraits: (0, _1.mapOf)('MessageTrait'),\n NamedOperationTraits: (0, _1.mapOf)('OperationTrait'),\n NamedParameters: (0, _1.mapOf)('Parameter'),\n NamedSecuritySchemes: (0, _1.mapOf)('SecurityScheme'),\n NamedCorrelationIds: (0, _1.mapOf)('CorrelationId'),\n ServerList: (0, _1.listOf)('Server'),\n SecuritySchemeList: (0, _1.listOf)('SecurityScheme'),\n MessageList: (0, _1.listOf)('Message'),\n OperationTraitList: (0, _1.listOf)('OperationTrait'),\n MessageTraitList: (0, _1.listOf)('MessageTrait'),\n MessageExampleList: (0, _1.listOf)('MessageExample'),\n TagList: (0, _1.listOf)('Tag'),\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SpecExtension = void 0;\nexports.listOf = listOf;\nexports.mapOf = mapOf;\nexports.normalizeTypes = normalizeTypes;\nexports.isNamedType = isNamedType;\nfunction listOf(typeName) {\n return {\n name: `${typeName}List`,\n properties: {},\n items: typeName,\n };\n}\nfunction mapOf(typeName) {\n return {\n name: `${typeName}Map`,\n properties: {},\n additionalProperties: () => typeName,\n };\n}\nexports.SpecExtension = {\n name: 'SpecExtension',\n properties: {},\n // skip validation of additional properties for unknown extensions\n additionalProperties: { resolvable: true },\n};\nfunction normalizeTypes(types, options = {}) {\n const normalizedTypes = {};\n for (const typeName of Object.keys(types)) {\n normalizedTypes[typeName] = {\n ...types[typeName],\n name: typeName,\n };\n }\n for (const type of Object.values(normalizedTypes)) {\n normalizeType(type);\n }\n // all type trees have a SpecExtension type by default\n normalizedTypes['SpecExtension'] = exports.SpecExtension;\n return normalizedTypes;\n function normalizeType(type) {\n if (type.additionalProperties) {\n type.additionalProperties = resolveType(type.additionalProperties);\n }\n if (type.items) {\n type.items = resolveType(type.items);\n }\n if (type.properties) {\n const mappedProps = {};\n for (const [propName, prop] of Object.entries(type.properties)) {\n mappedProps[propName] = resolveType(prop);\n if (options.doNotResolveExamples && prop && prop.isExample) {\n mappedProps[propName] = {\n ...prop,\n resolvable: false,\n };\n }\n }\n type.properties = mappedProps;\n }\n }\n // typings are painful here...\n function resolveType(type) {\n if (typeof type === 'string') {\n if (!normalizedTypes[type]) {\n throw new Error(`Unknown type name found: ${type}`);\n }\n return normalizedTypes[type];\n }\n else if (typeof type === 'function') {\n return (value, key) => {\n return resolveType(type(value, key));\n };\n }\n else if (type && type.name) {\n type = { ...type };\n normalizeType(type);\n return type;\n }\n else if (type && type.directResolveAs) {\n return {\n ...type,\n directResolveAs: resolveType(type.directResolveAs),\n };\n }\n else {\n return type;\n }\n }\n}\nfunction isNamedType(t) {\n return typeof t?.name === 'string';\n}\n","\"use strict\";\n// For internal usage only\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getNodeTypesFromJSONSchema = getNodeTypesFromJSONSchema;\nconst _2020_1 = require(\"@redocly/ajv/dist/2020\");\nconst utils_1 = require(\"../utils\");\nconst ajv = new _2020_1.default({\n strictSchema: false,\n allowUnionTypes: true,\n useDefaults: true,\n allErrors: true,\n discriminator: true,\n strictTypes: false,\n verbose: true,\n});\nfunction findOneOf(schemaOneOf, oneOfs) {\n if (oneOfs.some((option) => typeof option === 'function')) {\n throw new Error('Unexpected oneOf inside oneOf.');\n }\n return (value) => {\n let index = schemaOneOf.findIndex((option) => ajv.validate(option, value));\n if (index === -1) {\n index = 0;\n }\n return oneOfs[index];\n };\n}\nfunction transformJSONSchemaToNodeType(propertyName, schema, ctx) {\n if (!schema || typeof schema === 'boolean') {\n throw new Error(`Unexpected schema in ${propertyName}.`);\n }\n if (schema instanceof Array) {\n throw new Error(`Unexpected array schema in ${propertyName}. Try using oneOf instead.`);\n }\n if (schema.type === 'null') {\n throw new Error(`Unexpected null schema type in ${propertyName} schema.`);\n }\n if (schema.type instanceof Array) {\n throw new Error(`Unexpected array schema type in ${propertyName} schema. Try using oneOf instead.`);\n }\n if (schema.type === 'string' ||\n schema.type === 'number' ||\n schema.type === 'integer' ||\n schema.type === 'boolean') {\n const { default: _, format: _format, ...rest } = schema;\n return rest;\n }\n if (schema.type === 'object' && !schema.properties && !schema.oneOf) {\n if (schema.additionalProperties === undefined || schema.additionalProperties === true) {\n return { type: 'object' };\n }\n else if (schema.additionalProperties === false) {\n return { type: 'object', properties: {} };\n }\n }\n if (schema.allOf) {\n throw new Error(`Unexpected allOf in ${propertyName}.`);\n }\n if (schema.anyOf) {\n throw new Error(`Unexpected anyOf in ${propertyName}.`);\n }\n if ((0, utils_1.isPlainObject)(schema.properties) ||\n (0, utils_1.isPlainObject)(schema.additionalProperties) ||\n ((0, utils_1.isPlainObject)(schema.items) &&\n ((0, utils_1.isPlainObject)(schema.items.properties) ||\n (0, utils_1.isPlainObject)(schema.items.additionalProperties) ||\n schema.items.oneOf)) // exclude scalar array types\n ) {\n return extractNodeToContext(propertyName, schema, ctx);\n }\n if (schema.oneOf) {\n if (schema.discriminator) {\n const discriminatedPropertyName = schema.discriminator?.propertyName;\n if (!discriminatedPropertyName) {\n throw new Error(`Unexpected discriminator without a propertyName in ${propertyName}.`);\n }\n const oneOfs = schema.oneOf.map((option, i) => {\n if (typeof option === 'boolean') {\n throw new Error(`Unexpected boolean schema in ${propertyName} at position ${i} in oneOf.`);\n }\n const discriminatedProperty = option?.properties?.[discriminatedPropertyName];\n if (!discriminatedProperty || typeof discriminatedProperty === 'boolean') {\n throw new Error(`Unexpected property '${discriminatedProperty}' schema in ${propertyName} at position ${i} in oneOf.`);\n }\n const name = discriminatedProperty.const;\n return transformJSONSchemaToNodeType(name, option, ctx);\n });\n return (value, key) => {\n if ((0, utils_1.isPlainObject)(value)) {\n const discriminatedTypeName = value[discriminatedPropertyName];\n if (typeof discriminatedTypeName === 'string' && ctx[discriminatedTypeName]) {\n return discriminatedTypeName;\n }\n }\n return findOneOf(schema.oneOf, oneOfs)(value, key);\n };\n }\n else {\n const oneOfs = schema.oneOf.map((option, i) => transformJSONSchemaToNodeType(propertyName + '_' + i, option, ctx));\n return findOneOf(schema.oneOf, oneOfs);\n }\n }\n return schema;\n}\nfunction extractNodeToContext(propertyName, schema, ctx) {\n if (!schema || typeof schema === 'boolean') {\n throw new Error(`Unexpected schema in ${propertyName}.`);\n }\n if (schema instanceof Array) {\n throw new Error(`Unexpected array schema in ${propertyName}. Try using oneOf instead.`);\n }\n if (schema.type === 'null') {\n throw new Error(`Unexpected null schema type in ${propertyName} schema.`);\n }\n if (schema.type instanceof Array) {\n throw new Error(`Unexpected array schema type in ${propertyName} schema. Try using oneOf instead.`);\n }\n const properties = {};\n for (const [name, property] of Object.entries(schema.properties || {})) {\n properties[name] = transformJSONSchemaToNodeType(propertyName + '.' + name, property, ctx);\n }\n let additionalProperties;\n if ((0, utils_1.isPlainObject)(schema.additionalProperties)) {\n additionalProperties = transformJSONSchemaToNodeType(propertyName + '_additionalProperties', schema.additionalProperties, ctx);\n }\n if (schema.additionalProperties === true) {\n additionalProperties = {};\n }\n let items;\n if ((0, utils_1.isPlainObject)(schema.items) &&\n ((0, utils_1.isPlainObject)(schema.items.properties) ||\n (0, utils_1.isPlainObject)(schema.items.additionalProperties) ||\n schema.items.oneOf) // exclude scalar array types\n ) {\n items = transformJSONSchemaToNodeType(propertyName + '_items', schema.items, ctx);\n }\n let required = schema.required;\n // Translate required in oneOfs into a ResolveTypeFn.\n if (schema.oneOf && schema.oneOf.every((option) => !!option.required)) {\n required = (value) => {\n const requiredList = schema.oneOf.map((option) => [\n ...(schema.required || []),\n ...option.required,\n ]);\n let index = requiredList.findIndex((r) => r.every((requiredProp) => value[requiredProp] !== undefined));\n if (index === -1) {\n index = 0;\n }\n return requiredList[index];\n };\n }\n ctx[propertyName] = { properties, additionalProperties, items, required };\n return propertyName;\n}\nfunction getNodeTypesFromJSONSchema(schemaName, entrySchema) {\n const ctx = {};\n transformJSONSchemaToNodeType(schemaName, entrySchema, ctx);\n return ctx;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Oas2Types = void 0;\nconst _1 = require(\".\");\nconst responseCodeRegexp = /^[0-9][0-9Xx]{2}$/;\nconst Root = {\n properties: {\n swagger: { type: 'string' },\n info: 'Info',\n host: { type: 'string' },\n basePath: { type: 'string' },\n schemes: { type: 'array', items: { type: 'string' } },\n consumes: { type: 'array', items: { type: 'string' } },\n produces: { type: 'array', items: { type: 'string' } },\n paths: 'Paths',\n definitions: 'NamedSchemas',\n parameters: 'NamedParameters',\n responses: 'NamedResponses',\n securityDefinitions: 'NamedSecuritySchemes',\n security: 'SecurityRequirementList',\n tags: 'TagList',\n externalDocs: 'ExternalDocs',\n 'x-servers': 'XServerList',\n 'x-tagGroups': 'TagGroups',\n 'x-ignoredHeaderParameters': { type: 'array', items: { type: 'string' } },\n },\n required: ['swagger', 'paths', 'info'],\n extensionsPrefix: 'x-',\n};\nconst Info = {\n properties: {\n title: { type: 'string' },\n description: { type: 'string' },\n termsOfService: { type: 'string' },\n contact: 'Contact',\n license: 'License',\n version: { type: 'string' },\n 'x-logo': 'Logo',\n },\n required: ['title', 'version'],\n extensionsPrefix: 'x-',\n};\nconst Logo = {\n properties: {\n url: { type: 'string' },\n altText: { type: 'string' },\n backgroundColor: { type: 'string' },\n href: { type: 'string' },\n },\n extensionsPrefix: 'x-',\n};\nconst Contact = {\n properties: {\n name: { type: 'string' },\n url: { type: 'string' },\n email: { type: 'string' },\n },\n extensionsPrefix: 'x-',\n};\nconst License = {\n properties: {\n name: { type: 'string' },\n url: { type: 'string' },\n },\n required: ['name'],\n extensionsPrefix: 'x-',\n};\nconst Paths = {\n properties: {},\n additionalProperties: (_value, key) => key.startsWith('/') ? 'PathItem' : undefined,\n};\nconst PathItem = {\n properties: {\n $ref: { type: 'string' }, // TODO: verify special $ref handling for Path Item\n parameters: 'ParameterList',\n get: 'Operation',\n put: 'Operation',\n post: 'Operation',\n delete: 'Operation',\n options: 'Operation',\n head: 'Operation',\n patch: 'Operation',\n },\n extensionsPrefix: 'x-',\n};\nconst Operation = {\n properties: {\n tags: { type: 'array', items: { type: 'string' } },\n summary: { type: 'string' },\n description: { type: 'string' },\n externalDocs: 'ExternalDocs',\n operationId: { type: 'string' },\n consumes: { type: 'array', items: { type: 'string' } },\n produces: { type: 'array', items: { type: 'string' } },\n parameters: 'ParameterList',\n responses: 'Responses',\n schemes: { type: 'array', items: { type: 'string' } },\n deprecated: { type: 'boolean' },\n security: 'SecurityRequirementList',\n 'x-codeSamples': 'XCodeSampleList',\n 'x-code-samples': 'XCodeSampleList', // deprecated\n 'x-hideTryItPanel': { type: 'boolean' },\n },\n required: ['responses'],\n extensionsPrefix: 'x-',\n};\nconst XCodeSample = {\n properties: {\n lang: { type: 'string' },\n label: { type: 'string' },\n source: { type: 'string' },\n },\n};\nconst XServer = {\n properties: {\n url: { type: 'string' },\n description: { type: 'string' },\n },\n required: ['url'],\n};\nconst ExternalDocs = {\n properties: {\n description: { type: 'string' },\n url: { type: 'string' },\n },\n required: ['url'],\n extensionsPrefix: 'x-',\n};\nconst Parameter = {\n properties: {\n name: { type: 'string' },\n in: { type: 'string', enum: ['query', 'header', 'path', 'formData', 'body'] },\n description: { type: 'string' },\n required: { type: 'boolean' },\n schema: 'Schema',\n type: { type: 'string', enum: ['string', 'number', 'integer', 'boolean', 'array', 'file'] },\n format: { type: 'string' },\n allowEmptyValue: { type: 'boolean' },\n items: 'ParameterItems',\n collectionFormat: { type: 'string', enum: ['csv', 'ssv', 'tsv', 'pipes', 'multi'] },\n default: null,\n maximum: { type: 'integer' },\n exclusiveMaximum: { type: 'boolean' },\n minimum: { type: 'integer' },\n exclusiveMinimum: { type: 'boolean' },\n maxLength: { type: 'integer' },\n minLength: { type: 'integer' },\n pattern: { type: 'string' },\n maxItems: { type: 'integer' },\n minItems: { type: 'integer' },\n uniqueItems: { type: 'boolean' },\n enum: { type: 'array' },\n multipleOf: { type: 'number' },\n 'x-example': {}, // any\n 'x-examples': 'ExamplesMap',\n },\n required(value) {\n if (!value || !value.in) {\n return ['name', 'in'];\n }\n if (value.in === 'body') {\n return ['name', 'in', 'schema'];\n }\n else {\n if (value.type === 'array') {\n return ['name', 'in', 'type', 'items'];\n }\n else {\n return ['name', 'in', 'type'];\n }\n }\n },\n extensionsPrefix: 'x-',\n};\nconst ParameterItems = {\n properties: {\n type: { type: 'string', enum: ['string', 'number', 'integer', 'boolean', 'array'] },\n format: { type: 'string' },\n items: 'ParameterItems',\n collectionFormat: { type: 'string', enum: ['csv', 'ssv', 'tsv', 'pipes', 'multi'] },\n default: null,\n maximum: { type: 'integer' },\n exclusiveMaximum: { type: 'boolean' },\n minimum: { type: 'integer' },\n exclusiveMinimum: { type: 'boolean' },\n maxLength: { type: 'integer' },\n minLength: { type: 'integer' },\n pattern: { type: 'string' },\n maxItems: { type: 'integer' },\n minItems: { type: 'integer' },\n uniqueItems: { type: 'boolean' },\n enum: { type: 'array' },\n multipleOf: { type: 'number' },\n },\n required(value) {\n if (value && value.type === 'array') {\n return ['type', 'items'];\n }\n else {\n return ['type'];\n }\n },\n extensionsPrefix: 'x-',\n};\nconst Responses = {\n properties: {\n default: 'Response',\n },\n additionalProperties: (_v, key) => responseCodeRegexp.test(key) ? 'Response' : undefined,\n};\nconst Response = {\n properties: {\n description: { type: 'string' },\n schema: 'Schema',\n headers: (0, _1.mapOf)('Header'),\n examples: 'Examples',\n 'x-summary': { type: 'string' },\n },\n required: ['description'],\n extensionsPrefix: 'x-',\n};\nconst Examples = {\n properties: {},\n additionalProperties: { isExample: true },\n};\nconst Header = {\n properties: {\n description: { type: 'string' },\n type: { type: 'string', enum: ['string', 'number', 'integer', 'boolean', 'array'] },\n format: { type: 'string' },\n items: 'ParameterItems',\n collectionFormat: { type: 'string', enum: ['csv', 'ssv', 'tsv', 'pipes', 'multi'] },\n default: null,\n maximum: { type: 'integer' },\n exclusiveMaximum: { type: 'boolean' },\n minimum: { type: 'integer' },\n exclusiveMinimum: { type: 'boolean' },\n maxLength: { type: 'integer' },\n minLength: { type: 'integer' },\n pattern: { type: 'string' },\n maxItems: { type: 'integer' },\n minItems: { type: 'integer' },\n uniqueItems: { type: 'boolean' },\n enum: { type: 'array' },\n multipleOf: { type: 'number' },\n },\n required(value) {\n if (value && value.type === 'array') {\n return ['type', 'items'];\n }\n else {\n return ['type'];\n }\n },\n extensionsPrefix: 'x-',\n};\nconst Tag = {\n properties: {\n name: { type: 'string' },\n description: { type: 'string' },\n externalDocs: 'ExternalDocs',\n 'x-traitTag': { type: 'boolean' },\n 'x-displayName': { type: 'string' },\n },\n required: ['name'],\n extensionsPrefix: 'x-',\n};\nconst TagGroup = {\n properties: {\n name: { type: 'string' },\n tags: { type: 'array', items: { type: 'string' } },\n },\n};\nconst Schema = {\n properties: {\n format: { type: 'string' },\n title: { type: 'string' },\n description: { type: 'string' },\n default: null,\n multipleOf: { type: 'number' },\n maximum: { type: 'number' },\n minimum: { type: 'number' },\n exclusiveMaximum: { type: 'boolean' },\n exclusiveMinimum: { type: 'boolean' },\n maxLength: { type: 'number' },\n minLength: { type: 'number' },\n pattern: { type: 'string' },\n maxItems: { type: 'number' },\n minItems: { type: 'number' },\n uniqueItems: { type: 'boolean' },\n maxProperties: { type: 'number' },\n minProperties: { type: 'number' },\n required: { type: 'array', items: { type: 'string' } },\n enum: { type: 'array' },\n type: {\n type: 'string',\n enum: ['object', 'array', 'string', 'number', 'integer', 'boolean', 'null'],\n },\n items: (value) => {\n if (Array.isArray(value)) {\n return (0, _1.listOf)('Schema');\n }\n else {\n return 'Schema';\n }\n },\n allOf: (0, _1.listOf)('Schema'),\n properties: 'SchemaProperties',\n additionalProperties: (value) => {\n if (typeof value === 'boolean') {\n return { type: 'boolean' };\n }\n else {\n return 'Schema';\n }\n },\n discriminator: { type: 'string' },\n readOnly: { type: 'boolean' },\n xml: 'Xml',\n externalDocs: 'ExternalDocs',\n example: { isExample: true },\n 'x-tags': { type: 'array', items: { type: 'string' } },\n 'x-nullable': { type: 'boolean' },\n 'x-extendedDiscriminator': { type: 'string' },\n 'x-additionalPropertiesName': { type: 'string' },\n 'x-explicitMappingOnly': { type: 'boolean' },\n 'x-enumDescriptions': 'EnumDescriptions',\n },\n extensionsPrefix: 'x-',\n};\nconst EnumDescriptions = {\n properties: {},\n additionalProperties: { type: 'string' },\n};\nconst SchemaProperties = {\n properties: {},\n additionalProperties: 'Schema',\n};\nconst Xml = {\n properties: {\n name: { type: 'string' },\n namespace: { type: 'string' },\n prefix: { type: 'string' },\n attribute: { type: 'boolean' },\n wrapped: { type: 'boolean' },\n },\n extensionsPrefix: 'x-',\n};\nconst SecurityScheme = {\n properties: {\n type: { enum: ['basic', 'apiKey', 'oauth2'] },\n description: { type: 'string' },\n name: { type: 'string' },\n in: { type: 'string', enum: ['query', 'header'] },\n flow: { enum: ['implicit', 'password', 'application', 'accessCode'] },\n authorizationUrl: { type: 'string' },\n tokenUrl: { type: 'string' },\n scopes: { type: 'object', additionalProperties: { type: 'string' } },\n 'x-defaultClientId': { type: 'string' },\n },\n required(value) {\n switch (value?.type) {\n case 'apiKey':\n return ['type', 'name', 'in'];\n case 'oauth2':\n switch (value?.flow) {\n case 'implicit':\n return ['type', 'flow', 'authorizationUrl', 'scopes'];\n case 'accessCode':\n return ['type', 'flow', 'authorizationUrl', 'tokenUrl', 'scopes'];\n case 'application':\n case 'password':\n return ['type', 'flow', 'tokenUrl', 'scopes'];\n default:\n return ['type', 'flow', 'scopes'];\n }\n default:\n return ['type'];\n }\n },\n allowed(value) {\n switch (value?.type) {\n case 'basic':\n return ['type', 'description'];\n case 'apiKey':\n return ['type', 'name', 'in', 'description'];\n case 'oauth2':\n switch (value?.flow) {\n case 'implicit':\n return ['type', 'flow', 'authorizationUrl', 'description', 'scopes'];\n case 'accessCode':\n return ['type', 'flow', 'authorizationUrl', 'tokenUrl', 'description', 'scopes'];\n case 'application':\n case 'password':\n return ['type', 'flow', 'tokenUrl', 'description', 'scopes'];\n default:\n return ['type', 'flow', 'tokenUrl', 'authorizationUrl', 'description', 'scopes'];\n }\n default:\n return ['type', 'description'];\n }\n },\n extensionsPrefix: 'x-',\n};\nconst SecurityRequirement = {\n properties: {},\n additionalProperties: { type: 'array', items: { type: 'string' } },\n};\nconst Example = {\n properties: {\n value: { isExample: true },\n summary: { type: 'string' },\n description: { type: 'string' },\n externalValue: { type: 'string' },\n },\n extensionsPrefix: 'x-',\n};\nexports.Oas2Types = {\n Root,\n Tag,\n TagList: (0, _1.listOf)('Tag'),\n TagGroups: (0, _1.listOf)('TagGroup'),\n TagGroup,\n ExternalDocs,\n Example,\n ExamplesMap: (0, _1.mapOf)('Example'),\n EnumDescriptions,\n SecurityRequirement,\n SecurityRequirementList: (0, _1.listOf)('SecurityRequirement'),\n Info,\n Contact,\n License,\n Logo,\n Paths,\n PathItem,\n Parameter,\n ParameterItems,\n ParameterList: (0, _1.listOf)('Parameter'),\n Operation,\n Examples,\n Header,\n Responses,\n Response,\n Schema,\n Xml,\n SchemaProperties,\n NamedSchemas: (0, _1.mapOf)('Schema'),\n NamedResponses: (0, _1.mapOf)('Response'),\n NamedParameters: (0, _1.mapOf)('Parameter'),\n NamedSecuritySchemes: (0, _1.mapOf)('SecurityScheme'),\n SecurityScheme,\n XCodeSample,\n XCodeSampleList: (0, _1.listOf)('XCodeSample'),\n XServerList: (0, _1.listOf)('XServer'),\n XServer,\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Oas3Types = exports.Discriminator = exports.DiscriminatorMapping = exports.Xml = exports.ExternalDocs = void 0;\nconst _1 = require(\".\");\nconst ref_utils_1 = require(\"../ref-utils\");\nconst responseCodeRegexp = /^[0-9][0-9Xx]{2}$/;\nconst Root = {\n properties: {\n openapi: null,\n info: 'Info',\n servers: 'ServerList',\n security: 'SecurityRequirementList',\n tags: 'TagList',\n externalDocs: 'ExternalDocs',\n paths: 'Paths',\n components: 'Components',\n 'x-webhooks': 'WebhooksMap',\n 'x-tagGroups': 'TagGroups',\n 'x-ignoredHeaderParameters': { type: 'array', items: { type: 'string' } },\n },\n required: ['openapi', 'paths', 'info'],\n extensionsPrefix: 'x-',\n};\nconst Tag = {\n properties: {\n name: { type: 'string' },\n description: { type: 'string' },\n externalDocs: 'ExternalDocs',\n 'x-traitTag': { type: 'boolean' },\n 'x-displayName': { type: 'string' },\n },\n required: ['name'],\n extensionsPrefix: 'x-',\n};\nconst TagGroup = {\n properties: {\n name: { type: 'string' },\n tags: { type: 'array', items: { type: 'string' } },\n },\n extensionsPrefix: 'x-',\n};\nexports.ExternalDocs = {\n properties: {\n description: { type: 'string' },\n url: { type: 'string' },\n },\n required: ['url'],\n extensionsPrefix: 'x-',\n};\nconst Server = {\n properties: {\n url: { type: 'string' },\n description: { type: 'string' },\n variables: 'ServerVariablesMap',\n },\n required: ['url'],\n extensionsPrefix: 'x-',\n};\nconst ServerVariable = {\n properties: {\n enum: {\n type: 'array',\n items: { type: 'string' },\n },\n default: { type: 'string' },\n description: { type: 'string' },\n },\n required: ['default'],\n extensionsPrefix: 'x-',\n};\nconst SecurityRequirement = {\n properties: {},\n additionalProperties: { type: 'array', items: { type: 'string' } },\n};\nconst Info = {\n properties: {\n title: { type: 'string' },\n version: { type: 'string' },\n description: { type: 'string' },\n termsOfService: { type: 'string' },\n contact: 'Contact',\n license: 'License',\n 'x-logo': 'Logo',\n },\n required: ['title', 'version'],\n extensionsPrefix: 'x-',\n};\nconst Logo = {\n properties: {\n url: { type: 'string' },\n altText: { type: 'string' },\n backgroundColor: { type: 'string' },\n href: { type: 'string' },\n },\n};\nconst Contact = {\n properties: {\n name: { type: 'string' },\n url: { type: 'string' },\n email: { type: 'string' },\n },\n extensionsPrefix: 'x-',\n};\nconst License = {\n properties: {\n name: { type: 'string' },\n url: { type: 'string' },\n },\n required: ['name'],\n extensionsPrefix: 'x-',\n};\nconst Paths = {\n properties: {},\n additionalProperties: (_value, key) => key.startsWith('/') ? 'PathItem' : undefined,\n};\nconst WebhooksMap = {\n properties: {},\n additionalProperties: () => 'PathItem',\n};\nconst PathItem = {\n properties: {\n $ref: { type: 'string' }, // TODO: verify special $ref handling for Path Item\n servers: 'ServerList',\n parameters: 'ParameterList',\n summary: { type: 'string' },\n description: { type: 'string' },\n get: 'Operation',\n put: 'Operation',\n post: 'Operation',\n delete: 'Operation',\n options: 'Operation',\n head: 'Operation',\n patch: 'Operation',\n trace: 'Operation',\n },\n extensionsPrefix: 'x-',\n};\nconst Parameter = {\n properties: {\n name: { type: 'string' },\n in: { enum: ['query', 'header', 'path', 'cookie'] },\n description: { type: 'string' },\n required: { type: 'boolean' },\n deprecated: { type: 'boolean' },\n allowEmptyValue: { type: 'boolean' },\n style: {\n enum: ['form', 'simple', 'label', 'matrix', 'spaceDelimited', 'pipeDelimited', 'deepObject'],\n },\n explode: { type: 'boolean' },\n allowReserved: { type: 'boolean' },\n schema: 'Schema',\n example: { isExample: true },\n examples: 'ExamplesMap',\n content: 'MediaTypesMap',\n },\n required: ['name', 'in'],\n requiredOneOf: ['schema', 'content'],\n extensionsPrefix: 'x-',\n};\nconst Operation = {\n properties: {\n tags: {\n type: 'array',\n items: { type: 'string' },\n },\n summary: { type: 'string' },\n description: { type: 'string' },\n externalDocs: 'ExternalDocs',\n operationId: { type: 'string' },\n parameters: 'ParameterList',\n security: 'SecurityRequirementList',\n servers: 'ServerList',\n requestBody: 'RequestBody',\n responses: 'Responses',\n deprecated: { type: 'boolean' },\n callbacks: 'CallbacksMap',\n 'x-codeSamples': 'XCodeSampleList',\n 'x-code-samples': 'XCodeSampleList', // deprecated\n 'x-hideTryItPanel': { type: 'boolean' },\n },\n required: ['responses'],\n extensionsPrefix: 'x-',\n};\nconst XCodeSample = {\n properties: {\n lang: { type: 'string' },\n label: { type: 'string' },\n source: { type: 'string' },\n },\n};\nconst RequestBody = {\n properties: {\n description: { type: 'string' },\n required: { type: 'boolean' },\n content: 'MediaTypesMap',\n },\n required: ['content'],\n extensionsPrefix: 'x-',\n};\nconst MediaTypesMap = {\n properties: {},\n additionalProperties: 'MediaType',\n};\nconst MediaType = {\n properties: {\n schema: 'Schema',\n example: { isExample: true },\n examples: 'ExamplesMap',\n encoding: 'EncodingMap',\n },\n extensionsPrefix: 'x-',\n};\nconst Example = {\n properties: {\n value: { isExample: true },\n summary: { type: 'string' },\n description: { type: 'string' },\n externalValue: { type: 'string' },\n },\n extensionsPrefix: 'x-',\n};\nconst Encoding = {\n properties: {\n contentType: { type: 'string' },\n headers: 'HeadersMap',\n style: {\n enum: ['form', 'simple', 'label', 'matrix', 'spaceDelimited', 'pipeDelimited', 'deepObject'],\n },\n explode: { type: 'boolean' },\n allowReserved: { type: 'boolean' },\n },\n extensionsPrefix: 'x-',\n};\nconst EnumDescriptions = {\n properties: {},\n additionalProperties: { type: 'string' },\n};\nconst Header = {\n properties: {\n description: { type: 'string' },\n required: { type: 'boolean' },\n deprecated: { type: 'boolean' },\n allowEmptyValue: { type: 'boolean' },\n style: {\n enum: ['form', 'simple', 'label', 'matrix', 'spaceDelimited', 'pipeDelimited', 'deepObject'],\n },\n explode: { type: 'boolean' },\n allowReserved: { type: 'boolean' },\n schema: 'Schema',\n example: { isExample: true },\n examples: 'ExamplesMap',\n content: 'MediaTypesMap',\n },\n requiredOneOf: ['schema', 'content'],\n extensionsPrefix: 'x-',\n};\nconst Responses = {\n properties: { default: 'Response' },\n additionalProperties: (_v, key) => responseCodeRegexp.test(key) ? 'Response' : undefined,\n};\nconst Response = {\n properties: {\n description: { type: 'string' },\n headers: 'HeadersMap',\n content: 'MediaTypesMap',\n links: 'LinksMap',\n 'x-summary': { type: 'string' },\n },\n required: ['description'],\n extensionsPrefix: 'x-',\n};\nconst Link = {\n properties: {\n operationRef: { type: 'string' },\n operationId: { type: 'string' },\n parameters: null, // TODO: figure out how to describe/validate this\n requestBody: null, // TODO: figure out how to describe/validate this\n description: { type: 'string' },\n server: 'Server',\n },\n extensionsPrefix: 'x-',\n};\nconst Schema = {\n properties: {\n externalDocs: 'ExternalDocs',\n discriminator: 'Discriminator',\n title: { type: 'string' },\n multipleOf: { type: 'number', minimum: 0 },\n maximum: { type: 'number' },\n minimum: { type: 'number' },\n exclusiveMaximum: { type: 'boolean' },\n exclusiveMinimum: { type: 'boolean' },\n maxLength: { type: 'integer', minimum: 0 },\n minLength: { type: 'integer', minimum: 0 },\n pattern: { type: 'string' },\n maxItems: { type: 'integer', minimum: 0 },\n minItems: { type: 'integer', minimum: 0 },\n uniqueItems: { type: 'boolean' },\n maxProperties: { type: 'integer', minimum: 0 },\n minProperties: { type: 'integer', minimum: 0 },\n required: { type: 'array', items: { type: 'string' } },\n enum: { type: 'array' },\n type: {\n enum: ['object', 'array', 'string', 'number', 'integer', 'boolean'],\n },\n allOf: (0, _1.listOf)('Schema'),\n anyOf: (0, _1.listOf)('Schema'),\n oneOf: (0, _1.listOf)('Schema'),\n not: 'Schema',\n properties: 'SchemaProperties',\n items: (value) => {\n if (Array.isArray(value)) {\n return (0, _1.listOf)('Schema');\n }\n else {\n return 'Schema';\n }\n },\n additionalProperties: (value) => {\n if (typeof value === 'boolean') {\n return { type: 'boolean' };\n }\n else {\n return 'Schema';\n }\n },\n description: { type: 'string' },\n format: { type: 'string' },\n default: null,\n nullable: { type: 'boolean' },\n readOnly: { type: 'boolean' },\n writeOnly: { type: 'boolean' },\n xml: 'Xml',\n example: { isExample: true },\n deprecated: { type: 'boolean' },\n 'x-tags': { type: 'array', items: { type: 'string' } },\n 'x-additionalPropertiesName': { type: 'string' },\n 'x-explicitMappingOnly': { type: 'boolean' },\n },\n extensionsPrefix: 'x-',\n};\nexports.Xml = {\n properties: {\n name: { type: 'string' },\n namespace: { type: 'string' },\n prefix: { type: 'string' },\n attribute: { type: 'boolean' },\n wrapped: { type: 'boolean' },\n },\n extensionsPrefix: 'x-',\n};\nconst SchemaProperties = {\n properties: {},\n additionalProperties: 'Schema',\n};\nexports.DiscriminatorMapping = {\n properties: {},\n additionalProperties: (value) => {\n if ((0, ref_utils_1.isMappingRef)(value)) {\n return { type: 'string', directResolveAs: 'Schema' };\n }\n else {\n return { type: 'string' };\n }\n },\n};\nexports.Discriminator = {\n properties: {\n propertyName: { type: 'string' },\n mapping: 'DiscriminatorMapping',\n },\n required: ['propertyName'],\n extensionsPrefix: 'x-',\n};\nconst Components = {\n properties: {\n parameters: 'NamedParameters',\n schemas: 'NamedSchemas',\n responses: 'NamedResponses',\n examples: 'NamedExamples',\n requestBodies: 'NamedRequestBodies',\n headers: 'NamedHeaders',\n securitySchemes: 'NamedSecuritySchemes',\n links: 'NamedLinks',\n callbacks: 'NamedCallbacks',\n },\n extensionsPrefix: 'x-',\n};\nconst ImplicitFlow = {\n properties: {\n refreshUrl: { type: 'string' },\n scopes: { type: 'object', additionalProperties: { type: 'string' } }, // TODO: validate scopes\n authorizationUrl: { type: 'string' },\n },\n required: ['authorizationUrl', 'scopes'],\n extensionsPrefix: 'x-',\n};\nconst PasswordFlow = {\n properties: {\n refreshUrl: { type: 'string' },\n scopes: { type: 'object', additionalProperties: { type: 'string' } }, // TODO: validate scopes\n tokenUrl: { type: 'string' },\n },\n required: ['tokenUrl', 'scopes'],\n extensionsPrefix: 'x-',\n};\nconst ClientCredentials = {\n properties: {\n refreshUrl: { type: 'string' },\n scopes: { type: 'object', additionalProperties: { type: 'string' } }, // TODO: validate scopes\n tokenUrl: { type: 'string' },\n },\n required: ['tokenUrl', 'scopes'],\n extensionsPrefix: 'x-',\n};\nconst AuthorizationCode = {\n properties: {\n refreshUrl: { type: 'string' },\n authorizationUrl: { type: 'string' },\n scopes: { type: 'object', additionalProperties: { type: 'string' } }, // TODO: validate scopes\n tokenUrl: { type: 'string' },\n 'x-usePkce': (value) => {\n if (typeof value === 'boolean') {\n return { type: 'boolean' };\n }\n else {\n return 'XUsePkce';\n }\n },\n },\n required: ['authorizationUrl', 'tokenUrl', 'scopes'],\n extensionsPrefix: 'x-',\n};\nconst OAuth2Flows = {\n properties: {\n implicit: 'ImplicitFlow',\n password: 'PasswordFlow',\n clientCredentials: 'ClientCredentials',\n authorizationCode: 'AuthorizationCode',\n },\n extensionsPrefix: 'x-',\n};\nconst SecurityScheme = {\n properties: {\n type: { enum: ['apiKey', 'http', 'oauth2', 'openIdConnect'] },\n description: { type: 'string' },\n name: { type: 'string' },\n in: { type: 'string', enum: ['query', 'header', 'cookie'] },\n scheme: { type: 'string' },\n bearerFormat: { type: 'string' },\n flows: 'OAuth2Flows',\n openIdConnectUrl: { type: 'string' },\n 'x-defaultClientId': { type: 'string' },\n },\n required(value) {\n switch (value?.type) {\n case 'apiKey':\n return ['type', 'name', 'in'];\n case 'http':\n return ['type', 'scheme'];\n case 'oauth2':\n return ['type', 'flows'];\n case 'openIdConnect':\n return ['type', 'openIdConnectUrl'];\n default:\n return ['type'];\n }\n },\n allowed(value) {\n switch (value?.type) {\n case 'apiKey':\n return ['type', 'name', 'in', 'description'];\n case 'http':\n return ['type', 'scheme', 'bearerFormat', 'description'];\n case 'oauth2':\n return ['type', 'flows', 'description'];\n case 'openIdConnect':\n return ['type', 'openIdConnectUrl', 'description'];\n default:\n return ['type', 'description'];\n }\n },\n extensionsPrefix: 'x-',\n};\nconst XUsePkce = {\n properties: {\n disableManualConfiguration: { type: 'boolean' },\n hideClientSecretInput: { type: 'boolean' },\n },\n};\nexports.Oas3Types = {\n Root,\n Tag,\n TagList: (0, _1.listOf)('Tag'),\n TagGroups: (0, _1.listOf)('TagGroup'),\n TagGroup,\n ExternalDocs: exports.ExternalDocs,\n Server,\n ServerList: (0, _1.listOf)('Server'),\n ServerVariable,\n ServerVariablesMap: (0, _1.mapOf)('ServerVariable'),\n SecurityRequirement,\n SecurityRequirementList: (0, _1.listOf)('SecurityRequirement'),\n Info,\n Contact,\n License,\n Paths,\n PathItem,\n Parameter,\n ParameterList: (0, _1.listOf)('Parameter'),\n Operation,\n Callback: (0, _1.mapOf)('PathItem'),\n CallbacksMap: (0, _1.mapOf)('Callback'),\n RequestBody,\n MediaTypesMap,\n MediaType,\n Example,\n ExamplesMap: (0, _1.mapOf)('Example'),\n Encoding,\n EncodingMap: (0, _1.mapOf)('Encoding'),\n EnumDescriptions,\n Header,\n HeadersMap: (0, _1.mapOf)('Header'),\n Responses,\n Response,\n Link,\n Logo,\n Schema,\n Xml: exports.Xml,\n SchemaProperties,\n DiscriminatorMapping: exports.DiscriminatorMapping,\n Discriminator: exports.Discriminator,\n Components,\n LinksMap: (0, _1.mapOf)('Link'),\n NamedSchemas: (0, _1.mapOf)('Schema'),\n NamedResponses: (0, _1.mapOf)('Response'),\n NamedParameters: (0, _1.mapOf)('Parameter'),\n NamedExamples: (0, _1.mapOf)('Example'),\n NamedRequestBodies: (0, _1.mapOf)('RequestBody'),\n NamedHeaders: (0, _1.mapOf)('Header'),\n NamedSecuritySchemes: (0, _1.mapOf)('SecurityScheme'),\n NamedLinks: (0, _1.mapOf)('Link'),\n NamedCallbacks: (0, _1.mapOf)('Callback'),\n ImplicitFlow,\n PasswordFlow,\n ClientCredentials,\n AuthorizationCode,\n OAuth2Flows,\n SecurityScheme,\n XCodeSample,\n XCodeSampleList: (0, _1.listOf)('XCodeSample'),\n XUsePkce,\n WebhooksMap,\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Oas3_1Types = exports.DependentRequired = exports.SchemaProperties = exports.Schema = void 0;\nconst _1 = require(\".\");\nconst oas3_1 = require(\"./oas3\");\nconst Root = {\n properties: {\n openapi: null,\n info: 'Info',\n servers: 'ServerList',\n security: 'SecurityRequirementList',\n tags: 'TagList',\n externalDocs: 'ExternalDocs',\n paths: 'Paths',\n webhooks: 'WebhooksMap',\n components: 'Components',\n jsonSchemaDialect: { type: 'string' },\n },\n required: ['openapi', 'info'],\n requiredOneOf: ['paths', 'components', 'webhooks'],\n extensionsPrefix: 'x-',\n};\nconst License = {\n properties: {\n name: { type: 'string' },\n url: { type: 'string' },\n identifier: { type: 'string' },\n },\n required: ['name'],\n extensionsPrefix: 'x-',\n};\nconst Info = {\n properties: {\n title: { type: 'string' },\n version: { type: 'string' },\n description: { type: 'string' },\n termsOfService: { type: 'string' },\n summary: { type: 'string' },\n contact: 'Contact',\n license: 'License',\n 'x-logo': 'Logo',\n },\n required: ['title', 'version'],\n extensionsPrefix: 'x-',\n};\nconst Components = {\n properties: {\n parameters: 'NamedParameters',\n schemas: 'NamedSchemas',\n responses: 'NamedResponses',\n examples: 'NamedExamples',\n requestBodies: 'NamedRequestBodies',\n headers: 'NamedHeaders',\n securitySchemes: 'NamedSecuritySchemes',\n links: 'NamedLinks',\n callbacks: 'NamedCallbacks',\n pathItems: 'NamedPathItems',\n },\n extensionsPrefix: 'x-',\n};\nconst Operation = {\n properties: {\n tags: {\n type: 'array',\n items: { type: 'string' },\n },\n summary: { type: 'string' },\n description: { type: 'string' },\n externalDocs: 'ExternalDocs',\n operationId: { type: 'string' },\n parameters: 'ParameterList',\n security: 'SecurityRequirementList',\n servers: 'ServerList',\n requestBody: 'RequestBody',\n responses: 'Responses',\n deprecated: { type: 'boolean' },\n callbacks: 'CallbacksMap',\n 'x-codeSamples': 'XCodeSampleList',\n 'x-code-samples': 'XCodeSampleList', // deprecated\n 'x-hideTryItPanel': { type: 'boolean' },\n },\n extensionsPrefix: 'x-',\n};\nexports.Schema = {\n properties: {\n $id: { type: 'string' },\n $anchor: { type: 'string' },\n id: { type: 'string' },\n $schema: { type: 'string' },\n definitions: 'NamedSchemas',\n $defs: 'NamedSchemas',\n $vocabulary: { type: 'string' },\n externalDocs: 'ExternalDocs',\n discriminator: 'Discriminator',\n title: { type: 'string' },\n multipleOf: { type: 'number', minimum: 0 },\n maximum: { type: 'number' },\n minimum: { type: 'number' },\n exclusiveMaximum: { type: 'number' },\n exclusiveMinimum: { type: 'number' },\n maxLength: { type: 'integer', minimum: 0 },\n minLength: { type: 'integer', minimum: 0 },\n pattern: { type: 'string' },\n maxItems: { type: 'integer', minimum: 0 },\n minItems: { type: 'integer', minimum: 0 },\n uniqueItems: { type: 'boolean' },\n maxProperties: { type: 'integer', minimum: 0 },\n minProperties: { type: 'integer', minimum: 0 },\n required: { type: 'array', items: { type: 'string' } },\n enum: { type: 'array' },\n type: (value) => {\n if (Array.isArray(value)) {\n return {\n type: 'array',\n items: { enum: ['object', 'array', 'string', 'number', 'integer', 'boolean', 'null'] },\n };\n }\n else {\n return {\n enum: ['object', 'array', 'string', 'number', 'integer', 'boolean', 'null'],\n };\n }\n },\n allOf: (0, _1.listOf)('Schema'),\n anyOf: (0, _1.listOf)('Schema'),\n oneOf: (0, _1.listOf)('Schema'),\n not: 'Schema',\n if: 'Schema',\n then: 'Schema',\n else: 'Schema',\n dependentSchemas: (0, _1.mapOf)('Schema'),\n dependentRequired: 'DependentRequired',\n prefixItems: (0, _1.listOf)('Schema'),\n contains: 'Schema',\n minContains: { type: 'integer', minimum: 0 },\n maxContains: { type: 'integer', minimum: 0 },\n patternProperties: 'PatternProperties',\n propertyNames: 'Schema',\n unevaluatedItems: (value) => {\n if (typeof value === 'boolean') {\n return { type: 'boolean' };\n }\n else {\n return 'Schema';\n }\n },\n unevaluatedProperties: (value) => {\n if (typeof value === 'boolean') {\n return { type: 'boolean' };\n }\n else {\n return 'Schema';\n }\n },\n summary: { type: 'string' },\n properties: 'SchemaProperties',\n items: (value) => {\n if (typeof value === 'boolean') {\n return { type: 'boolean' };\n }\n else {\n return 'Schema';\n }\n },\n additionalProperties: (value) => {\n return typeof value === 'boolean' ? { type: 'boolean' } : 'Schema';\n },\n description: { type: 'string' },\n format: { type: 'string' },\n contentEncoding: { type: 'string' },\n contentMediaType: { type: 'string' },\n contentSchema: 'Schema',\n default: null,\n readOnly: { type: 'boolean' },\n writeOnly: { type: 'boolean' },\n xml: 'Xml',\n examples: { type: 'array' },\n example: { isExample: true },\n deprecated: { type: 'boolean' },\n const: null,\n $comment: { type: 'string' },\n 'x-tags': { type: 'array', items: { type: 'string' } },\n $dynamicAnchor: { type: 'string' },\n $dynamicRef: { type: 'string' },\n },\n extensionsPrefix: 'x-',\n};\nexports.SchemaProperties = {\n properties: {},\n additionalProperties: (value) => {\n if (typeof value === 'boolean') {\n return { type: 'boolean' };\n }\n else {\n return 'Schema';\n }\n },\n};\nconst SecurityScheme = {\n properties: {\n type: { enum: ['apiKey', 'http', 'oauth2', 'openIdConnect', 'mutualTLS'] },\n description: { type: 'string' },\n name: { type: 'string' },\n in: { type: 'string', enum: ['query', 'header', 'cookie'] },\n scheme: { type: 'string' },\n bearerFormat: { type: 'string' },\n flows: 'OAuth2Flows',\n openIdConnectUrl: { type: 'string' },\n },\n required(value) {\n switch (value?.type) {\n case 'apiKey':\n return ['type', 'name', 'in'];\n case 'http':\n return ['type', 'scheme'];\n case 'oauth2':\n return ['type', 'flows'];\n case 'openIdConnect':\n return ['type', 'openIdConnectUrl'];\n default:\n return ['type'];\n }\n },\n allowed(value) {\n switch (value?.type) {\n case 'apiKey':\n return ['type', 'name', 'in', 'description'];\n case 'http':\n return ['type', 'scheme', 'bearerFormat', 'description'];\n case 'oauth2':\n switch (value?.flows) {\n case 'implicit':\n return ['type', 'flows', 'authorizationUrl', 'refreshUrl', 'description', 'scopes'];\n case 'password':\n case 'clientCredentials':\n return ['type', 'flows', 'tokenUrl', 'refreshUrl', 'description', 'scopes'];\n case 'authorizationCode':\n return [\n 'type',\n 'flows',\n 'authorizationUrl',\n 'refreshUrl',\n 'tokenUrl',\n 'description',\n 'scopes',\n ];\n default:\n return [\n 'type',\n 'flows',\n 'authorizationUrl',\n 'refreshUrl',\n 'tokenUrl',\n 'description',\n 'scopes',\n ];\n }\n case 'openIdConnect':\n return ['type', 'openIdConnectUrl', 'description'];\n case 'mutualTLS':\n return ['type', 'description'];\n default:\n return ['type', 'description'];\n }\n },\n extensionsPrefix: 'x-',\n};\nexports.DependentRequired = {\n properties: {},\n additionalProperties: { type: 'array', items: { type: 'string' } },\n};\nexports.Oas3_1Types = {\n ...oas3_1.Oas3Types,\n Info,\n Root,\n Schema: exports.Schema,\n SchemaProperties: exports.SchemaProperties,\n PatternProperties: exports.SchemaProperties,\n License,\n Components,\n NamedPathItems: (0, _1.mapOf)('PathItem'),\n SecurityScheme,\n Operation,\n DependentRequired: exports.DependentRequired,\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Overlay1Types = void 0;\nconst _1 = require(\".\");\nconst Root = {\n properties: {\n overlay: { type: 'string' },\n info: 'Info',\n extends: { type: 'string' },\n actions: 'Actions',\n },\n required: ['overlay', 'info', 'actions'],\n extensionsPrefix: 'x-',\n};\nconst Info = {\n properties: {\n title: { type: 'string' },\n version: { type: 'string' },\n },\n required: ['title', 'version'],\n extensionsPrefix: 'x-',\n};\nconst Actions = (0, _1.listOf)('Action');\nconst Action = {\n properties: {\n target: { type: 'string' },\n description: { type: 'string' },\n update: {}, // any\n remove: { type: 'boolean' },\n },\n required: ['target'],\n extensionsPrefix: 'x-',\n};\nexports.Overlay1Types = {\n Root,\n Info,\n Actions,\n Action,\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NormalizedConfigTypes = exports.ConfigTypes = void 0;\nexports.createConfigTypes = createConfigTypes;\nconst config_1 = require(\"@redocly/config\");\nconst _1 = require(\".\");\nconst oas_types_1 = require(\"../oas-types\");\nconst utils_1 = require(\"../utils\");\nconst json_schema_adapter_1 = require(\"./json-schema-adapter\");\nconst types_1 = require(\"../types\");\nconst builtInOAS2Rules = [\n 'info-contact',\n 'operation-operationId',\n 'tag-description',\n 'tags-alphabetical',\n 'info-license-url',\n 'info-license-strict',\n 'info-license',\n 'no-ambiguous-paths',\n 'no-enum-type-mismatch',\n 'no-http-verbs-in-paths',\n 'no-identical-paths',\n 'no-invalid-parameter-examples',\n 'no-invalid-schema-examples',\n 'no-path-trailing-slash',\n 'operation-2xx-response',\n 'operation-4xx-response',\n 'operation-description',\n 'operation-operationId-unique',\n 'operation-operationId-url-safe',\n 'operation-parameters-unique',\n 'operation-singular-tag',\n 'operation-summary',\n 'operation-tag-defined',\n 'parameter-description',\n 'path-declaration-must-exist',\n 'path-excludes-patterns',\n 'path-http-verbs-order',\n 'path-not-include-query',\n 'path-params-defined',\n 'path-parameters-defined',\n 'path-segment-plural',\n 'paths-kebab-case',\n 'required-string-property-missing-min-length',\n 'response-contains-header',\n 'scalar-property-missing-example',\n 'security-defined',\n 'spec-strict-refs',\n 'no-unresolved-refs',\n 'no-required-schema-properties-undefined',\n 'no-schema-type-mismatch',\n 'boolean-parameter-prefixes',\n 'request-mime-type',\n 'response-contains-property',\n 'response-mime-type',\n];\nconst builtInOAS3Rules = [\n 'info-contact',\n 'operation-operationId',\n 'tag-description',\n 'tags-alphabetical',\n 'info-license-url',\n 'info-license-strict',\n 'info-license',\n 'no-ambiguous-paths',\n 'no-enum-type-mismatch',\n 'no-http-verbs-in-paths',\n 'no-identical-paths',\n 'no-invalid-parameter-examples',\n 'no-invalid-schema-examples',\n 'no-path-trailing-slash',\n 'operation-2xx-response',\n 'operation-4xx-response',\n 'operation-description',\n 'operation-operationId-unique',\n 'operation-operationId-url-safe',\n 'operation-parameters-unique',\n 'operation-singular-tag',\n 'operation-summary',\n 'operation-tag-defined',\n 'parameter-description',\n 'path-declaration-must-exist',\n 'path-excludes-patterns',\n 'path-http-verbs-order',\n 'path-not-include-query',\n 'path-params-defined',\n 'path-parameters-defined',\n 'path-segment-plural',\n 'paths-kebab-case',\n 'required-string-property-missing-min-length',\n 'response-contains-header',\n 'scalar-property-missing-example',\n 'security-defined',\n 'spec-strict-refs',\n 'no-unresolved-refs',\n 'no-required-schema-properties-undefined',\n 'no-schema-type-mismatch',\n 'boolean-parameter-prefixes',\n 'component-name-unique',\n 'no-empty-servers',\n 'no-example-value-and-externalValue',\n 'no-invalid-media-type-examples',\n 'no-server-example.com',\n 'no-server-trailing-slash',\n 'no-server-variables-empty-enum',\n 'no-undefined-server-variable',\n 'no-unused-components',\n 'operation-4xx-problem-details-rfc7807',\n 'request-mime-type',\n 'response-contains-property',\n 'response-mime-type',\n 'spec-components-invalid-map-name',\n 'array-parameter-serialization',\n];\nconst builtInAsync2Rules = [\n 'info-contact',\n 'info-license-strict',\n 'operation-operationId',\n 'tag-description',\n 'tags-alphabetical',\n 'channels-kebab-case',\n 'no-channel-trailing-slash',\n];\nconst builtInAsync3Rules = [\n 'info-contact',\n 'info-license-strict',\n 'operation-operationId',\n 'tag-description',\n 'tags-alphabetical',\n 'channels-kebab-case',\n 'no-channel-trailing-slash',\n];\nconst builtInArazzo1Rules = [\n 'sourceDescription-type',\n 'workflowId-unique',\n 'stepId-unique',\n 'sourceDescription-name-unique',\n 'sourceDescriptions-not-empty',\n 'workflow-dependsOn',\n 'parameters-unique',\n 'step-onSuccess-unique',\n 'step-onFailure-unique',\n 'respect-supported-versions',\n 'requestBody-replacements-unique',\n 'no-criteria-xpath',\n 'criteria-unique',\n];\nconst builtInOverlay1Rules = ['info-contact'];\nconst builtInRules = [\n ...builtInOAS2Rules,\n ...builtInOAS3Rules,\n ...builtInAsync2Rules,\n ...builtInAsync3Rules,\n ...builtInArazzo1Rules,\n ...builtInOverlay1Rules,\n 'spec', // TODO: depricated in favor of struct\n 'struct',\n];\nconst oas2NodeTypesList = [\n 'Root',\n 'Tag',\n 'TagList',\n 'ExternalDocs',\n 'SecurityRequirement',\n 'SecurityRequirementList',\n 'Info',\n 'Contact',\n 'License',\n 'Paths',\n 'PathItem',\n 'Parameter',\n 'ParameterList',\n 'ParameterItems',\n 'Operation',\n 'Example',\n 'ExamplesMap',\n 'Examples',\n 'Header',\n 'Responses',\n 'Response',\n 'Schema',\n 'Xml',\n 'SchemaProperties',\n 'NamedSchemas',\n 'NamedResponses',\n 'NamedParameters',\n 'NamedSecuritySchemes',\n 'SecurityScheme',\n 'TagGroup',\n 'TagGroups',\n 'EnumDescriptions',\n 'Logo',\n 'XCodeSample',\n 'XCodeSampleList',\n 'XServer',\n 'XServerList',\n];\nconst oas3NodeTypesList = [\n 'Root',\n 'Tag',\n 'TagList',\n 'ExternalDocs',\n 'Server',\n 'ServerList',\n 'ServerVariable',\n 'ServerVariablesMap',\n 'SecurityRequirement',\n 'SecurityRequirementList',\n 'Info',\n 'Contact',\n 'License',\n 'Paths',\n 'PathItem',\n 'Parameter',\n 'ParameterList',\n 'Operation',\n 'Callback',\n 'CallbacksMap',\n 'RequestBody',\n 'MediaTypesMap',\n 'MediaType',\n 'Example',\n 'ExamplesMap',\n 'Encoding',\n 'EncodingMap',\n 'Header',\n 'HeadersMap',\n 'Responses',\n 'Response',\n 'Link',\n 'LinksMap',\n 'Schema',\n 'Xml',\n 'SchemaProperties',\n 'DiscriminatorMapping',\n 'Discriminator',\n 'Components',\n 'NamedSchemas',\n 'NamedResponses',\n 'NamedParameters',\n 'NamedExamples',\n 'NamedRequestBodies',\n 'NamedHeaders',\n 'NamedSecuritySchemes',\n 'NamedLinks',\n 'NamedCallbacks',\n 'ImplicitFlow',\n 'PasswordFlow',\n 'ClientCredentials',\n 'AuthorizationCode',\n 'OAuth2Flows',\n 'SecurityScheme',\n 'TagGroup',\n 'TagGroups',\n 'EnumDescriptions',\n 'Logo',\n 'XCodeSample',\n 'XCodeSampleList',\n 'XUsePkce',\n 'WebhooksMap',\n];\nconst oas3_1NodeTypesList = [\n 'Root',\n 'Schema',\n 'SchemaProperties',\n 'PatternProperties',\n 'Info',\n 'License',\n 'Components',\n 'NamedPathItems',\n 'SecurityScheme',\n 'Operation',\n 'DependentRequired',\n];\nconst ConfigStyleguide = {\n properties: {\n extends: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n rules: 'Rules',\n oas2Rules: 'Rules',\n oas3_0Rules: 'Rules',\n oas3_1Rules: 'Rules',\n async2Rules: 'Rules',\n arazzo1Rules: 'Rules',\n preprocessors: { type: 'object' },\n oas2Preprocessors: { type: 'object' },\n oas3_0Preprocessors: { type: 'object' },\n oas3_1Preprocessors: { type: 'object' },\n async2Preprocessors: { type: 'object' },\n arazzoPreprocessors: { type: 'object' },\n decorators: { type: 'object' },\n oas2Decorators: { type: 'object' },\n oas3_0Decorators: { type: 'object' },\n oas3_1Decorators: { type: 'object' },\n async2Decorators: { type: 'object' },\n arazzo1Decorators: { type: 'object' },\n },\n};\nconst createConfigRoot = (nodeTypes) => ({\n ...nodeTypes.rootRedoclyConfigSchema,\n properties: {\n ...nodeTypes.rootRedoclyConfigSchema.properties,\n ...ConfigStyleguide.properties,\n apis: 'ConfigApis', // Override apis with internal format\n 'features.openapi': 'ConfigReferenceDocs', // deprecated\n 'features.mockServer': 'ConfigMockServer', // deprecated\n organization: { type: 'string' },\n region: { enum: ['us', 'eu'] },\n telemetry: { enum: ['on', 'off'] },\n resolve: {\n properties: {\n http: 'ConfigHTTP',\n doNotResolveExamples: { type: 'boolean' },\n },\n },\n files: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n});\nconst ConfigApis = {\n properties: {},\n additionalProperties: 'ConfigApisProperties',\n};\nconst createConfigApisProperties = (nodeTypes) => ({\n ...nodeTypes['rootRedoclyConfigSchema.apis_additionalProperties'],\n properties: {\n ...nodeTypes['rootRedoclyConfigSchema.apis_additionalProperties']?.properties,\n labels: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n ...ConfigStyleguide.properties,\n 'features.openapi': 'ConfigReferenceDocs', // deprecated\n 'features.mockServer': 'ConfigMockServer', // deprecated\n files: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n});\nconst ConfigHTTP = {\n properties: {\n headers: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n};\nconst Rules = {\n properties: {},\n additionalProperties: (value, key) => {\n if (key.startsWith('rule/')) {\n if (typeof value === 'string') {\n return { enum: ['error', 'warn', 'off'] };\n }\n else {\n return 'Assert';\n }\n }\n else if (key.startsWith('assert/')) {\n // keep the old assert/ prefix as an alias\n if (typeof value === 'string') {\n return { enum: ['error', 'warn', 'off'] };\n }\n else {\n return 'Assert';\n }\n }\n else if (builtInRules.includes(key) || (0, utils_1.isCustomRuleId)(key)) {\n if (typeof value === 'string') {\n return { enum: ['error', 'warn', 'off'] };\n }\n else {\n return 'ObjectRule';\n }\n }\n else if (key === 'metadata-schema' || key === 'custom-fields-schema') {\n return 'Schema';\n }\n // Otherwise is considered as invalid\n return;\n },\n};\nconst ObjectRule = {\n properties: {\n severity: { enum: ['error', 'warn', 'off'] },\n },\n additionalProperties: {},\n required: ['severity'],\n};\n// TODO: add better type tree for this\nconst Schema = {\n properties: {},\n additionalProperties: {},\n};\nfunction createAssertionDefinitionSubject(nodeNames) {\n return {\n properties: {\n type: {\n enum: [...new Set(['any', ...nodeNames, 'SpecExtension'])],\n },\n property: (value) => {\n if (Array.isArray(value)) {\n return { type: 'array', items: { type: 'string' } };\n }\n else if (value === null) {\n return null;\n }\n else {\n return { type: 'string' };\n }\n },\n filterInParentKeys: { type: 'array', items: { type: 'string' } },\n filterOutParentKeys: { type: 'array', items: { type: 'string' } },\n matchParentKeys: { type: 'string' },\n },\n required: ['type'],\n };\n}\nconst AssertionDefinitionAssertions = {\n properties: {\n enum: { type: 'array', items: { type: 'string' } },\n pattern: { type: 'string' },\n notPattern: { type: 'string' },\n casing: {\n enum: [\n 'camelCase',\n 'kebab-case',\n 'snake_case',\n 'PascalCase',\n 'MACRO_CASE',\n 'COBOL-CASE',\n 'flatcase',\n ],\n },\n mutuallyExclusive: { type: 'array', items: { type: 'string' } },\n mutuallyRequired: { type: 'array', items: { type: 'string' } },\n required: { type: 'array', items: { type: 'string' } },\n requireAny: { type: 'array', items: { type: 'string' } },\n disallowed: { type: 'array', items: { type: 'string' } },\n defined: { type: 'boolean' },\n // undefined: { type: 'boolean' }, // TODO: Remove `undefined` assertion from codebase overall\n nonEmpty: { type: 'boolean' },\n minLength: { type: 'integer' },\n maxLength: { type: 'integer' },\n ref: (value) => typeof value === 'string' ? { type: 'string' } : { type: 'boolean' },\n const: (value) => {\n if (typeof value === 'string') {\n return { type: 'string' };\n }\n if (typeof value === 'number') {\n return { type: 'number' };\n }\n if (typeof value === 'boolean') {\n return { type: 'boolean' };\n }\n else {\n return;\n }\n },\n },\n additionalProperties: (_value, key) => {\n if (/^\\w+\\/\\w+$/.test(key))\n return { type: 'object' };\n return;\n },\n};\nconst AssertDefinition = {\n properties: {\n subject: 'AssertionDefinitionSubject',\n assertions: 'AssertionDefinitionAssertions',\n },\n required: ['subject', 'assertions'],\n};\nconst Assert = {\n properties: {\n subject: 'AssertionDefinitionSubject',\n assertions: 'AssertionDefinitionAssertions',\n where: (0, _1.listOf)('AssertDefinition'),\n message: { type: 'string' },\n suggest: { type: 'array', items: { type: 'string' } },\n severity: { enum: ['error', 'warn', 'off'] },\n },\n required: ['subject', 'assertions'],\n};\nconst ConfigLanguage = {\n properties: {\n label: { type: 'string' },\n lang: {\n enum: [\n 'curl',\n 'C#',\n 'Go',\n 'Java',\n 'Java8+Apache',\n 'JavaScript',\n 'Node.js',\n 'PHP',\n 'Python',\n 'R',\n 'Ruby',\n ],\n },\n },\n required: ['lang'],\n};\nconst ConfigLabels = {\n properties: {\n enum: { type: 'string' },\n enumSingleValue: { type: 'string' },\n enumArray: { type: 'string' },\n default: { type: 'string' },\n deprecated: { type: 'string' },\n example: { type: 'string' },\n examples: { type: 'string' },\n nullable: { type: 'string' },\n recursive: { type: 'string' },\n arrayOf: { type: 'string' },\n webhook: { type: 'string' },\n authorizations: { type: 'string' },\n tryItAuthBasicUsername: { type: 'string' },\n tryItAuthBasicPassword: { type: 'string' },\n },\n};\nconst ConfigSidebarLinks = {\n properties: {\n beforeInfo: (0, _1.listOf)('CommonConfigSidebarLinks'),\n end: (0, _1.listOf)('CommonConfigSidebarLinks'),\n },\n};\nconst CommonConfigSidebarLinks = {\n properties: {\n label: { type: 'string' },\n link: { type: 'string' },\n target: { type: 'string' },\n },\n required: ['label', 'link'],\n};\nconst CommonThemeColors = {\n properties: {\n main: { type: 'string' },\n light: { type: 'string' },\n dark: { type: 'string' },\n contrastText: { type: 'string' },\n },\n};\nconst CommonColorProps = {\n properties: {\n backgroundColor: { type: 'string' },\n borderColor: { type: 'string' },\n color: { type: 'string' },\n tabTextColor: { type: 'string' },\n },\n};\nconst BorderThemeColors = {\n properties: (0, utils_1.pickObjectProps)(CommonThemeColors.properties, ['light', 'dark']),\n};\nconst HttpColors = {\n properties: {\n basic: { type: 'string' },\n delete: { type: 'string' },\n get: { type: 'string' },\n head: { type: 'string' },\n link: { type: 'string' },\n options: { type: 'string' },\n patch: { type: 'string' },\n post: { type: 'string' },\n put: { type: 'string' },\n },\n};\nconst ResponseColors = {\n properties: {\n error: 'CommonColorProps',\n info: 'CommonColorProps',\n redirect: 'CommonColorProps',\n success: 'CommonColorProps',\n },\n};\nconst SecondaryColors = {\n properties: (0, utils_1.omitObjectProps)(CommonThemeColors.properties, ['dark']),\n};\nconst TextThemeColors = {\n properties: {\n primary: { type: 'string' },\n secondary: { type: 'string' },\n light: { type: 'string' },\n },\n};\nconst ThemeColors = {\n properties: {\n accent: 'CommonThemeColors',\n border: 'BorderThemeColors',\n error: 'CommonThemeColors',\n http: 'HttpColors',\n primary: 'CommonThemeColors',\n responses: 'ResponseColors',\n secondary: 'SecondaryColors',\n success: 'CommonThemeColors',\n text: 'TextThemeColors',\n tonalOffset: { type: 'number' },\n warning: 'CommonThemeColors',\n },\n};\nconst SizeProps = {\n properties: {\n fontSize: { type: 'string' },\n padding: { type: 'string' },\n minWidth: { type: 'string' },\n },\n};\nconst Sizes = {\n properties: {\n small: 'SizeProps',\n medium: 'SizeProps',\n large: 'SizeProps',\n xlarge: 'SizeProps',\n },\n};\nconst FontConfig = {\n properties: {\n fontFamily: { type: 'string' },\n fontSize: { type: 'string' },\n fontWeight: { type: 'string' },\n lineHeight: { type: 'string' },\n },\n};\nconst ButtonsConfig = {\n properties: {\n ...(0, utils_1.omitObjectProps)(FontConfig.properties, ['fontSize', 'lineHeight']),\n borderRadius: { type: 'string' },\n hoverStyle: { type: 'string' },\n boxShadow: { type: 'string' },\n hoverBoxShadow: { type: 'string' },\n sizes: 'Sizes',\n },\n};\nconst BadgeFontConfig = {\n properties: (0, utils_1.pickObjectProps)(FontConfig.properties, ['fontSize', 'lineHeight']),\n};\nconst BadgeSizes = {\n properties: {\n medium: 'BadgeFontConfig',\n small: 'BadgeFontConfig',\n },\n};\nconst HttpBadgesConfig = {\n properties: {\n ...(0, utils_1.omitObjectProps)(FontConfig.properties, ['fontSize', 'lineHeight']),\n borderRadius: { type: 'string' },\n color: { type: 'string' },\n sizes: 'BadgeSizes',\n },\n};\nconst LabelControls = {\n properties: {\n top: { type: 'string' },\n width: { type: 'string' },\n height: { type: 'string' },\n },\n};\nconst Panels = {\n properties: {\n borderRadius: { type: 'string' },\n backgroundColor: { type: 'string' },\n },\n};\nconst TryItButton = {\n properties: {\n fullWidth: { type: 'boolean' },\n },\n};\nconst ConfigThemeComponents = {\n properties: {\n buttons: 'ButtonsConfig',\n httpBadges: 'HttpBadgesConfig',\n layoutControls: 'LabelControls',\n panels: 'Panels',\n tryItButton: 'TryItButton',\n tryItSendButton: 'TryItButton',\n },\n};\nconst Breakpoints = {\n properties: {\n small: { type: 'string' },\n medium: { type: 'string' },\n large: { type: 'string' },\n },\n};\nconst StackedConfig = {\n properties: {\n maxWidth: 'Breakpoints',\n },\n};\nconst ThreePanelConfig = {\n properties: {\n maxWidth: 'Breakpoints',\n middlePanelMaxWidth: 'Breakpoints',\n },\n};\nconst Layout = {\n properties: {\n showDarkRightPanel: { type: 'boolean' },\n stacked: 'StackedConfig',\n 'three-panel': 'ThreePanelConfig',\n },\n};\nconst SchemaColorsConfig = {\n properties: {\n backgroundColor: { type: 'string' },\n border: { type: 'string' },\n },\n};\nconst ConfigThemeSchema = {\n properties: {\n breakFieldNames: { type: 'boolean' },\n caretColor: { type: 'string' },\n caretSize: { type: 'string' },\n constraints: 'SchemaColorsConfig',\n defaultDetailsWidth: { type: 'string' },\n examples: 'SchemaColorsConfig',\n labelsTextSize: { type: 'string' },\n linesColor: { type: 'string' },\n nestedBackground: { type: 'string' },\n nestingSpacing: { type: 'string' },\n requireLabelColor: { type: 'string' },\n typeNameColor: { type: 'string' },\n typeTitleColor: { type: 'string' },\n },\n};\nconst GroupItemsConfig = {\n properties: {\n subItemsColor: { type: 'string' },\n textTransform: { type: 'string' },\n fontWeight: { type: 'string' },\n },\n};\nconst Level1Items = {\n properties: (0, utils_1.pickObjectProps)(GroupItemsConfig.properties, ['textTransform']),\n};\nconst SpacingConfig = {\n properties: {\n unit: { type: 'number' },\n paddingHorizontal: { type: 'string' },\n paddingVertical: { type: 'string' },\n offsetTop: { type: 'string' },\n offsetLeft: { type: 'string' },\n offsetNesting: { type: 'string' },\n },\n};\nconst Sidebar = {\n properties: {\n ...(0, utils_1.omitObjectProps)(FontConfig.properties, ['fontWeight', 'lineHeight']),\n activeBgColor: { type: 'string' },\n activeTextColor: { type: 'string' },\n backgroundColor: { type: 'string' },\n borderRadius: { type: 'string' },\n breakPath: { type: 'boolean' },\n caretColor: { type: 'string' },\n caretSize: { type: 'string' },\n groupItems: 'GroupItemsConfig',\n level1items: 'Level1Items',\n rightLineColor: { type: 'string' },\n separatorLabelColor: { type: 'string' },\n showAtBreakpoint: { type: 'string' },\n spacing: 'SpacingConfig',\n textColor: { type: 'string' },\n width: { type: 'string' },\n },\n};\nconst Heading = {\n properties: {\n ...FontConfig.properties,\n color: { type: 'string' },\n transform: { type: 'string' },\n },\n};\nconst CodeConfig = {\n properties: {\n ...FontConfig.properties,\n backgroundColor: { type: 'string' },\n color: { type: 'string' },\n wordBreak: {\n enum: [\n 'break-all',\n 'break-word',\n 'keep-all',\n 'normal',\n 'revert',\n 'unset',\n 'inherit',\n 'initial',\n ],\n },\n wrap: { type: 'boolean' },\n },\n};\nconst HeadingsConfig = {\n properties: (0, utils_1.omitObjectProps)(FontConfig.properties, ['fontSize']),\n};\nconst LinksConfig = {\n properties: {\n color: { type: 'string' },\n hover: { type: 'string' },\n textDecoration: { type: 'string' },\n hoverTextDecoration: { type: 'string' },\n visited: { type: 'string' },\n },\n};\nconst Typography = {\n properties: {\n code: 'CodeConfig',\n fieldName: 'FontConfig',\n ...(0, utils_1.pickObjectProps)(FontConfig.properties, ['fontSize', 'fontFamily']),\n fontWeightBold: { type: 'string' },\n fontWeightLight: { type: 'string' },\n fontWeightRegular: { type: 'string' },\n heading1: 'Heading',\n heading2: 'Heading',\n heading3: 'Heading',\n headings: 'HeadingsConfig',\n lineHeight: { type: 'string' },\n links: 'LinksConfig',\n optimizeSpeed: { type: 'boolean' },\n rightPanelHeading: 'Heading',\n smoothing: { enum: ['auto', 'none', 'antialiased', 'subpixel-antialiased', 'grayscale'] },\n },\n};\nconst TokenProps = {\n properties: {\n color: { type: 'string' },\n ...(0, utils_1.omitObjectProps)(FontConfig.properties, ['fontWeight']),\n },\n};\nconst CodeBlock = {\n properties: {\n backgroundColor: { type: 'string' },\n borderRadius: { type: 'string' },\n tokens: 'TokenProps',\n },\n};\nconst ConfigThemeLogo = {\n properties: {\n gutter: { type: 'string' },\n maxHeight: { type: 'string' },\n maxWidth: { type: 'string' },\n },\n};\nconst Fab = {\n properties: {\n backgroundColor: { type: 'string' },\n color: { type: 'string' },\n },\n};\nconst ButtonOverrides = {\n properties: {\n custom: { type: 'string' },\n },\n};\nconst Overrides = {\n properties: {\n DownloadButton: 'ButtonOverrides',\n NextSectionButton: 'ButtonOverrides',\n },\n};\nconst RightPanel = {\n properties: {\n backgroundColor: { type: 'string' },\n panelBackgroundColor: { type: 'string' },\n panelControlsBackgroundColor: { type: 'string' },\n showAtBreakpoint: { type: 'string' },\n textColor: { type: 'string' },\n width: { type: 'string' },\n },\n};\nconst Shape = {\n properties: { borderRadius: { type: 'string' } },\n};\nconst ThemeSpacing = {\n properties: {\n sectionHorizontal: { type: 'number' },\n sectionVertical: { type: 'number' },\n unit: { type: 'number' },\n },\n};\nconst ConfigTheme = {\n properties: {\n breakpoints: 'Breakpoints',\n codeBlock: 'CodeBlock',\n colors: 'ThemeColors',\n components: 'ConfigThemeComponents',\n layout: 'Layout',\n logo: 'ConfigThemeLogo',\n fab: 'Fab',\n overrides: 'Overrides',\n rightPanel: 'RightPanel',\n schema: 'ConfigThemeSchema',\n shape: 'Shape',\n sidebar: 'Sidebar',\n spacing: 'ThemeSpacing',\n typography: 'Typography',\n links: { properties: { color: { type: 'string' } } }, // deprecated\n codeSample: { properties: { backgroundColor: { type: 'string' } } }, // deprecated\n },\n};\nconst GenerateCodeSamples = {\n properties: {\n skipOptionalParameters: { type: 'boolean' },\n languages: (0, _1.listOf)('ConfigLanguage'),\n },\n required: ['languages'],\n};\n// TODO: deprecated\nconst ConfigReferenceDocs = {\n properties: {\n theme: 'ConfigTheme',\n corsProxyUrl: { type: 'string' },\n ctrlFHijack: { type: 'boolean' },\n defaultSampleLanguage: { type: 'string' },\n disableDeepLinks: { type: 'boolean' },\n disableSearch: { type: 'boolean' },\n disableSidebar: { type: 'boolean' },\n downloadDefinitionUrl: { type: 'string' },\n expandDefaultServerVariables: { type: 'boolean' },\n enumSkipQuotes: { type: 'boolean' },\n expandDefaultRequest: { type: 'boolean' },\n expandDefaultResponse: { type: 'boolean' },\n expandResponses: { type: 'string' },\n expandSingleSchemaField: { type: 'boolean' },\n generateCodeSamples: 'GenerateCodeSamples',\n generatedPayloadSamplesMaxDepth: { type: 'number' },\n hideDownloadButton: { type: 'boolean' },\n hideHostname: { type: 'boolean' },\n hideInfoSection: { type: 'boolean' },\n hideLoading: { type: 'boolean' },\n hideLogo: { type: 'boolean' },\n hideRequestPayloadSample: { type: 'boolean' },\n hideRightPanel: { type: 'boolean' },\n hideSchemaPattern: { type: 'boolean' },\n hideSchemaTitles: { type: 'boolean' },\n hideSingleRequestSampleTab: { type: 'boolean' },\n hideSecuritySection: { type: 'boolean' },\n hideTryItPanel: { type: 'boolean' },\n hideFab: { type: 'boolean' },\n hideOneOfDescription: { type: 'boolean' },\n htmlTemplate: { type: 'string' },\n jsonSampleExpandLevel: (value) => {\n if (typeof value === 'number') {\n return { type: 'number', minimum: 1 };\n }\n else {\n return { type: 'string' };\n }\n },\n labels: 'ConfigLabels',\n layout: { enum: ['stacked', 'three-panel'] },\n maxDisplayedEnumValues: { type: 'number' },\n menuToggle: { type: 'boolean' },\n nativeScrollbars: { type: 'boolean' },\n noAutoAuth: { type: 'boolean' }, // deprecated\n oAuth2RedirectURI: { type: 'string' },\n onDeepLinkClick: { type: 'object' },\n onlyRequiredInSamples: { type: 'boolean' },\n pagination: { enum: ['none', 'section', 'item'] },\n pathInMiddlePanel: { type: 'boolean' },\n payloadSampleIdx: { type: 'number', minimum: 0 },\n requestInterceptor: { type: 'object' },\n requiredPropsFirst: { type: 'boolean' },\n routingBasePath: { type: 'string' },\n routingStrategy: { type: 'string' }, // deprecated\n samplesTabsMaxCount: { type: 'number' },\n schemaExpansionLevel: (value) => {\n if (typeof value === 'number') {\n return { type: 'number', minimum: 0 };\n }\n else {\n return { type: 'string' };\n }\n },\n schemaDefinitionsTagName: { type: 'string' },\n minCharacterLengthToInitSearch: { type: 'number', minimum: 1 },\n maxResponseHeadersToShowInTryIt: { type: 'number', minimum: 0 },\n scrollYOffset: (value) => {\n if (typeof value === 'number') {\n return { type: 'number' };\n }\n else {\n return { type: 'string' };\n }\n },\n searchAutoExpand: { type: 'boolean' },\n searchFieldLevelBoost: { type: 'number', minimum: 0 },\n searchMaxDepth: { type: 'number', minimum: 1 },\n searchMode: { enum: ['default', 'path-only'] },\n searchOperationTitleBoost: { type: 'number' },\n searchTagTitleBoost: { type: 'number' },\n sendXUserAgentInTryIt: { type: 'boolean' },\n showChangeLayoutButton: { type: 'boolean' },\n showConsole: { type: 'boolean' }, // deprecated\n showExtensions: (value) => {\n if (typeof value === 'boolean') {\n return { type: 'boolean' };\n }\n else {\n return {\n type: 'array',\n items: {\n type: 'string',\n },\n };\n }\n },\n showNextButton: { type: 'boolean' },\n showRightPanelToggle: { type: 'boolean' },\n showSecuritySchemeType: { type: 'boolean' },\n showWebhookVerb: { type: 'boolean' },\n showObjectSchemaExamples: { type: 'boolean' },\n disableTryItRequestUrlEncoding: { type: 'boolean' },\n sidebarLinks: 'ConfigSidebarLinks',\n sideNavStyle: { enum: ['summary-only', 'path-first', 'id-only', 'path-only'] },\n simpleOneOfTypeLabel: { type: 'boolean' },\n sortEnumValuesAlphabetically: { type: 'boolean' },\n sortOperationsAlphabetically: { type: 'boolean' },\n sortPropsAlphabetically: { type: 'boolean' },\n sortTagsAlphabetically: { type: 'boolean' },\n suppressWarnings: { type: 'boolean' }, // deprecated\n unstable_externalDescription: { type: 'boolean' }, // deprecated\n unstable_ignoreMimeParameters: { type: 'boolean' },\n untrustedDefinition: { type: 'boolean' },\n mockServer: {\n properties: {\n url: { type: 'string' },\n position: { enum: ['first', 'last', 'replace', 'off'] },\n description: { type: 'string' },\n },\n },\n showAccessMode: { type: 'boolean' },\n preserveOriginalExtensionsName: { type: 'boolean' },\n markdownHeadingsAnchorLevel: { type: 'number' },\n },\n additionalProperties: {},\n};\nconst ConfigMockServer = {\n properties: {\n strictExamples: { type: 'boolean' },\n errorIfForcedExampleNotFound: { type: 'boolean' },\n },\n};\nfunction createConfigTypes(extraSchemas, config) {\n const nodeNames = Object.values(oas_types_1.SpecVersion).flatMap((version) => {\n const types = config?.styleguide\n ? config.styleguide.extendTypes((0, oas_types_1.getTypes)(version), version)\n : (0, oas_types_1.getTypes)(version);\n return Object.keys(types);\n });\n // Create types based on external schemas\n const nodeTypes = (0, json_schema_adapter_1.getNodeTypesFromJSONSchema)('rootRedoclyConfigSchema', extraSchemas);\n return {\n ...CoreConfigTypes,\n ConfigRoot: createConfigRoot(nodeTypes), // This is the REAL config root type\n ConfigApisProperties: createConfigApisProperties(nodeTypes),\n AssertionDefinitionSubject: createAssertionDefinitionSubject(nodeNames),\n ...nodeTypes,\n };\n}\nconst CoreConfigTypes = {\n Assert,\n ConfigApis,\n ConfigStyleguide,\n ConfigReferenceDocs,\n ConfigMockServer,\n ConfigHTTP,\n ConfigLanguage,\n ConfigLabels,\n ConfigSidebarLinks,\n CommonConfigSidebarLinks,\n ConfigTheme,\n AssertDefinition,\n ThemeColors,\n CommonThemeColors,\n BorderThemeColors,\n HttpColors,\n ResponseColors,\n SecondaryColors,\n TextThemeColors,\n Sizes,\n ButtonsConfig,\n CommonColorProps,\n BadgeFontConfig,\n BadgeSizes,\n HttpBadgesConfig,\n LabelControls,\n Panels,\n TryItButton,\n Breakpoints,\n StackedConfig,\n ThreePanelConfig,\n SchemaColorsConfig,\n SizeProps,\n Level1Items,\n SpacingConfig,\n FontConfig,\n CodeConfig,\n HeadingsConfig,\n LinksConfig,\n TokenProps,\n CodeBlock,\n ConfigThemeLogo,\n Fab,\n ButtonOverrides,\n Overrides,\n ObjectRule,\n Schema,\n RightPanel,\n Rules,\n Shape,\n ThemeSpacing,\n GenerateCodeSamples,\n GroupItemsConfig,\n ConfigThemeComponents,\n Layout,\n ConfigThemeSchema,\n Sidebar,\n Heading,\n Typography,\n AssertionDefinitionAssertions,\n};\nexports.ConfigTypes = createConfigTypes(config_1.rootRedoclyConfigSchema);\nexports.NormalizedConfigTypes = (0, types_1.normalizeTypes)(exports.ConfigTypes);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT = exports.VERSION_PATTERN = void 0;\nexports.VERSION_PATTERN = /^1\\.0\\.\\d+(-.+)?$/;\nexports.ARAZZO_VERSIONS_SUPPORTED_BY_RESPECT = ['1.0.1'];\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assignConfig = exports.stringifyYaml = exports.parseYaml = void 0;\nexports.pushStack = pushStack;\nexports.pluralize = pluralize;\nexports.popStack = popStack;\nexports.loadYaml = loadYaml;\nexports.isDefined = isDefined;\nexports.isPlainObject = isPlainObject;\nexports.isEmptyObject = isEmptyObject;\nexports.isNotEmptyObject = isNotEmptyObject;\nexports.isEmptyArray = isEmptyArray;\nexports.isNotEmptyArray = isNotEmptyArray;\nexports.readFileFromUrl = readFileFromUrl;\nexports.pickObjectProps = pickObjectProps;\nexports.omitObjectProps = omitObjectProps;\nexports.splitCamelCaseIntoWords = splitCamelCaseIntoWords;\nexports.validateMimeType = validateMimeType;\nexports.validateMimeTypeOAS3 = validateMimeTypeOAS3;\nexports.readFileAsStringSync = readFileAsStringSync;\nexports.yamlAndJsonSyncReader = yamlAndJsonSyncReader;\nexports.isPathParameter = isPathParameter;\nexports.slash = slash;\nexports.isString = isString;\nexports.isNotString = isNotString;\nexports.assignOnlyExistingConfig = assignOnlyExistingConfig;\nexports.getMatchingStatusCodeRange = getMatchingStatusCodeRange;\nexports.isCustomRuleId = isCustomRuleId;\nexports.doesYamlFileExist = doesYamlFileExist;\nexports.showWarningForDeprecatedField = showWarningForDeprecatedField;\nexports.showErrorForDeprecatedField = showErrorForDeprecatedField;\nexports.isTruthy = isTruthy;\nexports.identity = identity;\nexports.keysOf = keysOf;\nexports.pickDefined = pickDefined;\nexports.nextTick = nextTick;\nexports.pause = pause;\nexports.getProxyAgent = getProxyAgent;\nexports.dequal = dequal;\nconst fs = require(\"fs\");\nconst path_1 = require(\"path\");\nconst minimatch = require(\"minimatch\");\nconst js_yaml_1 = require(\"./js-yaml\");\nconst env_1 = require(\"./env\");\nconst logger_1 = require(\"./logger\");\nconst https_proxy_agent_1 = require(\"https-proxy-agent\");\nconst pluralizeOne = require(\"pluralize\");\nvar js_yaml_2 = require(\"./js-yaml\");\nObject.defineProperty(exports, \"parseYaml\", { enumerable: true, get: function () { return js_yaml_2.parseYaml; } });\nObject.defineProperty(exports, \"stringifyYaml\", { enumerable: true, get: function () { return js_yaml_2.stringifyYaml; } });\nfunction pushStack(head, value) {\n return { prev: head, value };\n}\nfunction pluralize(sentence, count, inclusive) {\n return sentence\n .split(' ')\n .map((word) => pluralizeOne(word, count, inclusive))\n .join(' ');\n}\nfunction popStack(head) {\n return head?.prev ?? null;\n}\nasync function loadYaml(filename) {\n const contents = await fs.promises.readFile(filename, 'utf-8');\n return (0, js_yaml_1.parseYaml)(contents);\n}\nfunction isDefined(x) {\n return x !== undefined;\n}\nfunction isPlainObject(value) {\n return value !== null && typeof value === 'object' && !Array.isArray(value);\n}\nfunction isEmptyObject(value) {\n return isPlainObject(value) && Object.keys(value).length === 0;\n}\nfunction isNotEmptyObject(obj) {\n return isPlainObject(obj) && !isEmptyObject(obj);\n}\nfunction isEmptyArray(value) {\n return Array.isArray(value) && value.length === 0;\n}\nfunction isNotEmptyArray(args) {\n return !!args && Array.isArray(args) && !!args.length;\n}\nasync function readFileFromUrl(url, config) {\n const headers = {};\n for (const header of config.headers) {\n if (match(url, header.matches)) {\n headers[header.name] =\n header.envVariable !== undefined ? env_1.env[header.envVariable] || '' : header.value;\n }\n }\n const req = await (config.customFetch || fetch)(url, {\n headers: headers,\n });\n if (!req.ok) {\n throw new Error(`Failed to load ${url}: ${req.status} ${req.statusText}`);\n }\n return { body: await req.text(), mimeType: req.headers.get('content-type') };\n}\nfunction match(url, pattern) {\n if (!pattern.match(/^https?:\\/\\//)) {\n // if pattern doesn't specify protocol directly, do not match against it\n url = url.replace(/^https?:\\/\\//, '');\n }\n return minimatch(url, pattern);\n}\nfunction pickObjectProps(object, keys) {\n return Object.fromEntries(keys.filter((key) => key in object).map((key) => [key, object[key]]));\n}\nfunction omitObjectProps(object, keys) {\n return Object.fromEntries(Object.entries(object).filter(([key]) => !keys.includes(key)));\n}\nfunction splitCamelCaseIntoWords(str) {\n const camel = str\n .split(/(?:[-._])|([A-Z][a-z]+)/)\n .filter(isTruthy)\n .map((item) => item.toLocaleLowerCase());\n const caps = str\n .split(/([A-Z]{2,})/)\n .filter((e) => e && e === e.toUpperCase())\n .map((item) => item.toLocaleLowerCase());\n return new Set([...camel, ...caps]);\n}\nfunction validateMimeType({ type, value }, { report, location }, allowedValues) {\n const ruleType = type === 'consumes' ? 'request' : 'response';\n if (!allowedValues)\n throw new Error(`Parameter \"allowedValues\" is not provided for \"${ruleType}-mime-type\" rule`);\n if (!value[type])\n return;\n for (const mime of value[type]) {\n if (!allowedValues.includes(mime)) {\n report({\n message: `Mime type \"${mime}\" is not allowed`,\n location: location.child(value[type].indexOf(mime)).key(),\n });\n }\n }\n}\nfunction validateMimeTypeOAS3({ type, value }, { report, location }, allowedValues) {\n const ruleType = type === 'consumes' ? 'request' : 'response';\n if (!allowedValues)\n throw new Error(`Parameter \"allowedValues\" is not provided for \"${ruleType}-mime-type\" rule`);\n if (!value.content)\n return;\n for (const mime of Object.keys(value.content)) {\n if (!allowedValues.includes(mime)) {\n report({\n message: `Mime type \"${mime}\" is not allowed`,\n location: location.child('content').child(mime).key(),\n });\n }\n }\n}\nfunction readFileAsStringSync(filePath) {\n return fs.readFileSync(filePath, 'utf-8');\n}\nfunction yamlAndJsonSyncReader(filePath) {\n const content = fs.readFileSync(filePath, 'utf-8');\n return (0, js_yaml_1.parseYaml)(content);\n}\nfunction isPathParameter(pathSegment) {\n return pathSegment.startsWith('{') && pathSegment.endsWith('}');\n}\n/**\n * Convert Windows backslash paths to slash paths: foo\\\\bar ➔ foo/bar\n */\nfunction slash(path) {\n const isExtendedLengthPath = /^\\\\\\\\\\?\\\\/.test(path);\n if (isExtendedLengthPath) {\n return path;\n }\n return path.replace(/\\\\/g, '/');\n}\n// TODO: use it everywhere\nfunction isString(value) {\n return typeof value === 'string';\n}\nfunction isNotString(value) {\n return !isString(value);\n}\nconst assignConfig = (target, obj) => {\n if (!obj)\n return;\n for (const k of Object.keys(obj)) {\n if (isPlainObject(target[k]) && typeof obj[k] === 'string') {\n target[k].severity = obj[k];\n }\n else {\n target[k] = obj[k];\n }\n }\n};\nexports.assignConfig = assignConfig;\nfunction assignOnlyExistingConfig(target, obj) {\n if (!obj)\n return;\n for (const k of Object.keys(obj)) {\n if (!target.hasOwnProperty(k))\n continue;\n if (isPlainObject(target[k]) && typeof obj[k] === 'string') {\n target[k].severity = obj[k];\n }\n else {\n target[k] = obj[k];\n }\n }\n}\nfunction getMatchingStatusCodeRange(code) {\n return `${code}`.replace(/^(\\d)\\d\\d$/, (_, firstDigit) => `${firstDigit}XX`);\n}\nfunction isCustomRuleId(id) {\n return id.includes('/');\n}\nfunction doesYamlFileExist(filePath) {\n return (((0, path_1.extname)(filePath) === '.yaml' || (0, path_1.extname)(filePath) === '.yml') &&\n fs?.hasOwnProperty?.('existsSync') &&\n fs.existsSync(filePath));\n}\nfunction showWarningForDeprecatedField(deprecatedField, updatedField, updatedObject, link) {\n const readMoreText = link ? `Read more about this change: ${link}` : '';\n logger_1.logger.warn(`The '${logger_1.colorize.red(deprecatedField)}' field is deprecated. ${updatedField\n ? `Use ${logger_1.colorize.green(getUpdatedFieldName(updatedField, updatedObject))} instead. `\n : ''}${readMoreText}\\n`);\n}\nfunction showErrorForDeprecatedField(deprecatedField, updatedField, updatedObject) {\n throw new Error(`Do not use '${deprecatedField}' field. ${updatedField ? `Use '${getUpdatedFieldName(updatedField, updatedObject)}' instead. ` : ''}\\n`);\n}\nfunction isTruthy(value) {\n return !!value;\n}\nfunction identity(value) {\n return value;\n}\nfunction keysOf(obj) {\n if (!obj)\n return [];\n return Object.keys(obj);\n}\nfunction pickDefined(obj) {\n if (!obj)\n return undefined;\n const res = {};\n for (const key in obj) {\n if (obj[key] !== undefined) {\n res[key] = obj[key];\n }\n }\n return res;\n}\nfunction nextTick() {\n return new Promise((resolve) => {\n setTimeout(resolve);\n });\n}\nasync function pause(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\nfunction getUpdatedFieldName(updatedField, updatedObject) {\n return `${typeof updatedObject !== 'undefined' ? `${updatedObject}.` : ''}${updatedField}`;\n}\nfunction getProxyAgent() {\n const proxy = process.env.HTTPS_PROXY || process.env.HTTP_PROXY;\n return proxy ? new https_proxy_agent_1.HttpsProxyAgent(proxy) : undefined;\n}\n/**\n * Checks if two objects are deeply equal.\n * Borrowed the source code from https://github.com/lukeed/dequal.\n */\nfunction dequal(foo, bar) {\n let ctor, len;\n if (foo === bar)\n return true;\n if (foo && bar && (ctor = foo.constructor) === bar.constructor) {\n if (ctor === Date)\n return foo.getTime() === bar.getTime();\n if (ctor === RegExp)\n return foo.toString() === bar.toString();\n if (ctor === Array) {\n if ((len = foo.length) === bar.length) {\n while (len-- && dequal(foo[len], bar[len]))\n ;\n }\n return len === -1;\n }\n if (!ctor || typeof foo === 'object') {\n len = 0;\n for (ctor in foo) {\n if (Object.prototype.hasOwnProperty.call(foo, ctor) &&\n ++len &&\n !Object.prototype.hasOwnProperty.call(bar, ctor))\n return false;\n if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor]))\n return false;\n }\n return Object.keys(bar).length === len;\n }\n }\n return foo !== foo && bar !== bar;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.normalizeVisitors = normalizeVisitors;\nconst types_1 = require(\"./types\");\nconst legacyTypesMap = {\n Root: 'DefinitionRoot',\n ServerVariablesMap: 'ServerVariableMap',\n Paths: ['PathMap', 'PathsMap'],\n CallbacksMap: 'CallbackMap',\n MediaTypesMap: 'MediaTypeMap',\n ExamplesMap: 'ExampleMap',\n EncodingMap: 'EncodingsMap',\n HeadersMap: 'HeaderMap',\n LinksMap: 'LinkMap',\n OAuth2Flows: 'SecuritySchemeFlows',\n Responses: 'ResponsesMap',\n};\nfunction normalizeVisitors(visitorsConfig, types) {\n const normalizedVisitors = {};\n normalizedVisitors.any = {\n enter: [],\n leave: [],\n };\n for (const typeName of Object.keys(types)) {\n normalizedVisitors[typeName] = {\n enter: [],\n leave: [],\n };\n }\n normalizedVisitors.ref = {\n enter: [],\n leave: [],\n };\n for (const { ruleId, severity, message, visitor } of visitorsConfig) {\n normalizeVisitorLevel({ ruleId, severity, message }, visitor, null);\n }\n for (const v of Object.keys(normalizedVisitors)) {\n normalizedVisitors[v].enter.sort((a, b) => b.depth - a.depth);\n normalizedVisitors[v].leave.sort((a, b) => a.depth - b.depth);\n }\n return normalizedVisitors;\n function addWeakNodes(ruleConf, from, to, parentContext, stack = []) {\n if (stack.includes(from))\n return;\n stack = [...stack, from];\n const possibleChildren = new Set();\n for (const type of Object.values(from.properties)) {\n if (type === to) {\n addWeakFromStack(ruleConf, stack);\n continue;\n }\n if (typeof type === 'object' && type !== null && type.name) {\n possibleChildren.add(type);\n }\n }\n if (from.additionalProperties && typeof from.additionalProperties !== 'function') {\n if (from.additionalProperties === to) {\n addWeakFromStack(ruleConf, stack);\n }\n else if (from.additionalProperties.name !== undefined) {\n possibleChildren.add(from.additionalProperties);\n }\n }\n if (from.items && typeof from.items !== 'function') {\n if (from.items === to) {\n addWeakFromStack(ruleConf, stack);\n }\n else if (from.items.name !== undefined) {\n possibleChildren.add(from.items);\n }\n }\n if (from.extensionsPrefix) {\n possibleChildren.add(types_1.SpecExtension);\n }\n for (const fromType of Array.from(possibleChildren.values())) {\n addWeakNodes(ruleConf, fromType, to, parentContext, stack);\n }\n function addWeakFromStack(ruleConf, stack) {\n for (const interType of stack.slice(1)) {\n normalizedVisitors[interType.name] = normalizedVisitors[interType.name] || {\n enter: [],\n leave: [],\n };\n normalizedVisitors[interType.name].enter.push({\n ...ruleConf,\n visit: () => undefined,\n depth: 0,\n context: {\n isSkippedLevel: true,\n seen: new Set(),\n parent: parentContext,\n },\n });\n }\n }\n }\n function findLegacyVisitorNode(visitor, typeName) {\n if (Array.isArray(typeName)) {\n const name = typeName.find((name) => visitor[name]) || undefined;\n return name && visitor[name];\n }\n return visitor[typeName];\n }\n function normalizeVisitorLevel(ruleConf, visitor, parentContext, depth = 0) {\n const visitorKeys = Object.keys(types);\n if (depth === 0) {\n visitorKeys.push('any');\n visitorKeys.push('ref');\n }\n else {\n if (visitor.any) {\n throw new Error('any() is allowed only on top level');\n }\n if (visitor.ref) {\n throw new Error('ref() is allowed only on top level');\n }\n }\n for (const typeName of visitorKeys) {\n const typeVisitor = (visitor[typeName] ||\n findLegacyVisitorNode(visitor, legacyTypesMap[typeName]));\n const normalizedTypeVisitor = normalizedVisitors[typeName];\n if (!typeVisitor)\n continue;\n let visitorEnter;\n let visitorLeave;\n let visitorSkip;\n const isObjectVisitor = typeof typeVisitor === 'object';\n if (typeName === 'ref' && isObjectVisitor && typeVisitor.skip) {\n throw new Error('ref() visitor does not support skip');\n }\n if (typeof typeVisitor === 'function') {\n visitorEnter = typeVisitor;\n }\n else if (isObjectVisitor) {\n visitorEnter = typeVisitor.enter;\n visitorLeave = typeVisitor.leave;\n visitorSkip = typeVisitor.skip;\n }\n const context = {\n activatedOn: null,\n type: types[typeName],\n parent: parentContext,\n isSkippedLevel: false,\n };\n if (typeof typeVisitor === 'object') {\n normalizeVisitorLevel(ruleConf, typeVisitor, context, depth + 1);\n }\n if (parentContext) {\n addWeakNodes(ruleConf, parentContext.type, types[typeName], parentContext);\n }\n if (visitorEnter || isObjectVisitor) {\n if (visitorEnter && typeof visitorEnter !== 'function') {\n throw new Error('DEV: should be function');\n }\n normalizedTypeVisitor.enter.push({\n ...ruleConf,\n visit: visitorEnter || (() => undefined),\n skip: visitorSkip,\n depth,\n context,\n });\n }\n if (visitorLeave) {\n if (typeof visitorLeave !== 'function') {\n throw new Error('DEV: should be function');\n }\n normalizedTypeVisitor.leave.push({\n ...ruleConf,\n visit: visitorLeave,\n depth,\n context,\n });\n }\n }\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.walkDocument = walkDocument;\nconst ref_utils_1 = require(\"./ref-utils\");\nconst utils_1 = require(\"./utils\");\nconst resolve_1 = require(\"./resolve\");\nconst types_1 = require(\"./types\");\nfunction collectParents(ctx) {\n const parents = {};\n while (ctx.parent) {\n parents[ctx.parent.type.name] = ctx.parent.activatedOn?.value.node;\n ctx = ctx.parent;\n }\n return parents;\n}\nfunction collectParentsLocations(ctx) {\n const locations = {};\n while (ctx.parent) {\n if (ctx.parent.activatedOn?.value.location) {\n locations[ctx.parent.type.name] = ctx.parent.activatedOn?.value.location;\n }\n ctx = ctx.parent;\n }\n return locations;\n}\nfunction walkDocument(opts) {\n const { document, rootType, normalizedVisitors, resolvedRefMap, ctx } = opts;\n const seenNodesPerType = {};\n const ignoredNodes = new Set();\n walkNode(document.parsed, rootType, new ref_utils_1.Location(document.source, '#/'), undefined, '');\n function walkNode(node, type, location, parent, key) {\n const resolve = (ref, from = currentLocation.source.absoluteRef) => {\n if (!(0, ref_utils_1.isRef)(ref))\n return { location, node: ref };\n const refId = (0, resolve_1.makeRefId)(from, ref.$ref);\n const resolvedRef = resolvedRefMap.get(refId);\n if (!resolvedRef) {\n return {\n location: undefined,\n node: undefined,\n };\n }\n const { resolved, node, document, nodePointer, error } = resolvedRef;\n const newLocation = resolved\n ? new ref_utils_1.Location(document.source, nodePointer)\n : error instanceof resolve_1.YamlParseError\n ? new ref_utils_1.Location(error.source, '')\n : undefined;\n return { location: newLocation, node, error };\n };\n const rawLocation = location;\n let currentLocation = location;\n const { node: resolvedNode, location: resolvedLocation, error } = resolve(node);\n const enteredContexts = new Set();\n if ((0, ref_utils_1.isRef)(node)) {\n const refEnterVisitors = normalizedVisitors.ref.enter;\n for (const { visit: visitor, ruleId, severity, message, context } of refEnterVisitors) {\n enteredContexts.add(context);\n const report = reportFn.bind(undefined, ruleId, severity, message);\n visitor(node, {\n report,\n resolve,\n rawNode: node,\n rawLocation,\n location,\n type,\n parent,\n key,\n parentLocations: {},\n oasVersion: ctx.oasVersion,\n getVisitorData: getVisitorDataFn.bind(undefined, ruleId),\n }, { node: resolvedNode, location: resolvedLocation, error });\n if (resolvedLocation?.source.absoluteRef && ctx.refTypes) {\n ctx.refTypes.set(resolvedLocation?.source.absoluteRef, type);\n }\n }\n }\n if (resolvedNode !== undefined && resolvedLocation && type.name !== 'scalar') {\n currentLocation = resolvedLocation;\n const isNodeSeen = seenNodesPerType[type.name]?.has?.(resolvedNode);\n let visitedBySome = false;\n const anyEnterVisitors = normalizedVisitors.any.enter;\n const currentEnterVisitors = anyEnterVisitors.concat(normalizedVisitors[type.name]?.enter || []);\n const activatedContexts = [];\n for (const { context, visit, skip, ruleId, severity, message } of currentEnterVisitors) {\n if (ignoredNodes.has(`${currentLocation.absolutePointer}${currentLocation.pointer}`))\n break;\n if (context.isSkippedLevel) {\n if (context.parent.activatedOn &&\n !context.parent.activatedOn.value.nextLevelTypeActivated &&\n !context.seen.has(node)) {\n // TODO: test for walk through duplicated $ref-ed node\n context.seen.add(node);\n visitedBySome = true;\n activatedContexts.push(context);\n }\n }\n else {\n if ((context.parent && // if nested\n context.parent.activatedOn &&\n context.activatedOn?.value.withParentNode !== context.parent.activatedOn.value.node &&\n // do not enter if visited by parent children (it works thanks because deeper visitors are sorted before)\n context.parent.activatedOn.value.nextLevelTypeActivated?.value !== type) ||\n (!context.parent && !isNodeSeen) // if top-level visit each node just once\n ) {\n activatedContexts.push(context);\n const activatedOn = {\n node: resolvedNode,\n location: resolvedLocation,\n nextLevelTypeActivated: null,\n withParentNode: context.parent?.activatedOn?.value.node,\n skipped: (context.parent?.activatedOn?.value.skipped ||\n skip?.(resolvedNode, key, {\n location,\n rawLocation,\n resolve,\n rawNode: node,\n })) ??\n false,\n };\n context.activatedOn = (0, utils_1.pushStack)(context.activatedOn, activatedOn);\n let ctx = context.parent;\n while (ctx) {\n ctx.activatedOn.value.nextLevelTypeActivated = (0, utils_1.pushStack)(ctx.activatedOn.value.nextLevelTypeActivated, type);\n ctx = ctx.parent;\n }\n if (!activatedOn.skipped) {\n visitedBySome = true;\n enteredContexts.add(context);\n visitWithContext(visit, resolvedNode, node, context, ruleId, severity, message);\n }\n }\n }\n }\n if (visitedBySome || !isNodeSeen) {\n seenNodesPerType[type.name] = seenNodesPerType[type.name] || new Set();\n seenNodesPerType[type.name].add(resolvedNode);\n if (Array.isArray(resolvedNode)) {\n const itemsType = type.items;\n if (itemsType !== undefined) {\n const isTypeAFunction = typeof itemsType === 'function';\n for (let i = 0; i < resolvedNode.length; i++) {\n const itemType = isTypeAFunction\n ? itemsType(resolvedNode[i], resolvedLocation.child([i]).absolutePointer)\n : itemsType;\n if ((0, types_1.isNamedType)(itemType)) {\n walkNode(resolvedNode[i], itemType, resolvedLocation.child([i]), resolvedNode, i);\n }\n }\n }\n }\n else if (typeof resolvedNode === 'object' && resolvedNode !== null) {\n // visit in order from type-tree first\n const props = Object.keys(type.properties);\n if (type.additionalProperties) {\n props.push(...Object.keys(resolvedNode).filter((k) => !props.includes(k)));\n }\n else if (type.extensionsPrefix) {\n props.push(...Object.keys(resolvedNode).filter((k) => k.startsWith(type.extensionsPrefix)));\n }\n if ((0, ref_utils_1.isRef)(node)) {\n props.push(...Object.keys(node).filter((k) => k !== '$ref' && !props.includes(k))); // properties on the same level as $ref\n }\n for (const propName of props) {\n let value = resolvedNode[propName];\n let loc = resolvedLocation;\n if (value === undefined) {\n value = node[propName];\n loc = location; // properties on the same level as $ref should resolve against original location, not target\n }\n let propType = type.properties[propName];\n if (propType === undefined)\n propType = type.additionalProperties;\n if (typeof propType === 'function')\n propType = propType(value, propName);\n if (propType === undefined &&\n type.extensionsPrefix &&\n propName.startsWith(type.extensionsPrefix)) {\n propType = types_1.SpecExtension;\n }\n if (!(0, types_1.isNamedType)(propType) && propType?.directResolveAs) {\n propType = propType.directResolveAs;\n value = { $ref: value };\n }\n if (propType && propType.name === undefined && propType.resolvable !== false) {\n propType = { name: 'scalar', properties: {} };\n }\n if (!(0, types_1.isNamedType)(propType) || (propType.name === 'scalar' && !(0, ref_utils_1.isRef)(value))) {\n continue;\n }\n walkNode(value, propType, loc.child([propName]), resolvedNode, propName);\n }\n }\n }\n const anyLeaveVisitors = normalizedVisitors.any.leave;\n const currentLeaveVisitors = (normalizedVisitors[type.name]?.leave || []).concat(anyLeaveVisitors);\n for (const context of activatedContexts.reverse()) {\n if (context.isSkippedLevel) {\n context.seen.delete(resolvedNode);\n }\n else {\n context.activatedOn = (0, utils_1.popStack)(context.activatedOn);\n if (context.parent) {\n let ctx = context.parent;\n while (ctx) {\n ctx.activatedOn.value.nextLevelTypeActivated = (0, utils_1.popStack)(ctx.activatedOn.value.nextLevelTypeActivated);\n ctx = ctx.parent;\n }\n }\n }\n }\n for (const { context, visit, ruleId, severity, message } of currentLeaveVisitors) {\n if (!context.isSkippedLevel && enteredContexts.has(context)) {\n visitWithContext(visit, resolvedNode, node, context, ruleId, severity, message);\n }\n }\n }\n currentLocation = location;\n if ((0, ref_utils_1.isRef)(node)) {\n const refLeaveVisitors = normalizedVisitors.ref.leave;\n for (const { visit: visitor, ruleId, severity, context, message } of refLeaveVisitors) {\n if (enteredContexts.has(context)) {\n const report = reportFn.bind(undefined, ruleId, severity, message);\n visitor(node, {\n report,\n resolve,\n rawNode: node,\n rawLocation,\n location,\n type,\n parent,\n key,\n parentLocations: {},\n oasVersion: ctx.oasVersion,\n getVisitorData: getVisitorDataFn.bind(undefined, ruleId),\n }, { node: resolvedNode, location: resolvedLocation, error });\n }\n }\n }\n // returns true ignores all the next visitors on the specific node\n function visitWithContext(visit, resolvedNode, node, context, ruleId, severity, customMessage) {\n const report = reportFn.bind(undefined, ruleId, severity, customMessage);\n visit(resolvedNode, {\n report,\n resolve,\n rawNode: node,\n location: currentLocation,\n rawLocation,\n type,\n parent,\n key,\n parentLocations: collectParentsLocations(context),\n oasVersion: ctx.oasVersion,\n ignoreNextVisitorsOnNode: () => {\n ignoredNodes.add(`${currentLocation.absolutePointer}${currentLocation.pointer}`);\n },\n getVisitorData: getVisitorDataFn.bind(undefined, ruleId),\n }, collectParents(context), context);\n }\n function reportFn(ruleId, severity, customMessage, opts) {\n const normalizedLocation = opts.location\n ? Array.isArray(opts.location)\n ? opts.location\n : [opts.location]\n : [{ ...currentLocation, reportOnKey: false }];\n const location = normalizedLocation.map((l) => ({\n ...currentLocation,\n reportOnKey: false,\n ...l,\n }));\n const ruleSeverity = opts.forceSeverity || severity;\n if (ruleSeverity !== 'off') {\n ctx.problems.push({\n ruleId: opts.ruleId || ruleId,\n severity: ruleSeverity,\n ...opts,\n message: customMessage\n ? customMessage.replace('{{message}}', opts.message)\n : opts.message,\n suggest: opts.suggest || [],\n location,\n });\n }\n }\n function getVisitorDataFn(ruleId) {\n ctx.visitorsData[ruleId] = ctx.visitorsData[ruleId] || {};\n return ctx.visitorsData[ruleId];\n }\n }\n}\n","const isWindows = typeof process === 'object' &&\n process &&\n process.platform === 'win32'\nmodule.exports = isWindows ? { sep: '\\\\' } : { sep: '/' }\n","const minimatch = module.exports = (p, pattern, options = {}) => {\n assertValidPattern(pattern)\n\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false\n }\n\n return new Minimatch(pattern, options).match(p)\n}\n\nmodule.exports = minimatch\n\nconst path = require('./lib/path.js')\nminimatch.sep = path.sep\n\nconst GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\nconst expand = require('brace-expansion')\n\nconst plTypes = {\n '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},\n '?': { open: '(?:', close: ')?' },\n '+': { open: '(?:', close: ')+' },\n '*': { open: '(?:', close: ')*' },\n '@': { open: '(?:', close: ')' }\n}\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\\\/|^)(?:\\\\.{1,2})($|\\\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\\\/|^)\\\\.).)*?'\n\n// \"abc\" -> { a:true, b:true, c:true }\nconst charSet = s => s.split('').reduce((set, c) => {\n set[c] = true\n return set\n}, {})\n\n// characters that need to be escaped in RegExp.\nconst reSpecials = charSet('().*{}+?[]^$\\\\!')\n\n// characters that indicate we have to add the pattern start\nconst addPatternStartSet = charSet('[.(')\n\n// normalizes slashes.\nconst slashSplit = /\\/+/\n\nminimatch.filter = (pattern, options = {}) =>\n (p, i, list) => minimatch(p, pattern, options)\n\nconst ext = (a, b = {}) => {\n const t = {}\n Object.keys(a).forEach(k => t[k] = a[k])\n Object.keys(b).forEach(k => t[k] = b[k])\n return t\n}\n\nminimatch.defaults = def => {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch\n }\n\n const orig = minimatch\n\n const m = (p, pattern, options) => orig(p, pattern, ext(def, options))\n m.Minimatch = class Minimatch extends orig.Minimatch {\n constructor (pattern, options) {\n super(pattern, ext(def, options))\n }\n }\n m.Minimatch.defaults = options => orig.defaults(ext(def, options)).Minimatch\n m.filter = (pattern, options) => orig.filter(pattern, ext(def, options))\n m.defaults = options => orig.defaults(ext(def, options))\n m.makeRe = (pattern, options) => orig.makeRe(pattern, ext(def, options))\n m.braceExpand = (pattern, options) => orig.braceExpand(pattern, ext(def, options))\n m.match = (list, pattern, options) => orig.match(list, pattern, ext(def, options))\n\n return m\n}\n\n\n\n\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nminimatch.braceExpand = (pattern, options) => braceExpand(pattern, options)\n\nconst braceExpand = (pattern, options = {}) => {\n assertValidPattern(pattern)\n\n // Thanks to Yeting Li for\n // improving this regexp to avoid a ReDOS vulnerability.\n if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n // shortcut. no need to expand.\n return [pattern]\n }\n\n return expand(pattern)\n}\n\nconst MAX_PATTERN_LENGTH = 1024 * 64\nconst assertValidPattern = pattern => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\nconst SUBPARSE = Symbol('subparse')\n\nminimatch.makeRe = (pattern, options) =>\n new Minimatch(pattern, options || {}).makeRe()\n\nminimatch.match = (list, pattern, options = {}) => {\n const mm = new Minimatch(pattern, options)\n list = list.filter(f => mm.match(f))\n if (mm.options.nonull && !list.length) {\n list.push(pattern)\n }\n return list\n}\n\n// replace stuff like \\* with *\nconst globUnescape = s => s.replace(/\\\\(.)/g, '$1')\nconst charUnescape = s => s.replace(/\\\\([^-\\]])/g, '$1')\nconst regExpEscape = s => s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\nconst braExpEscape = s => s.replace(/[[\\]\\\\]/g, '\\\\$&')\n\nclass Minimatch {\n constructor (pattern, options) {\n assertValidPattern(pattern)\n\n if (!options) options = {}\n\n this.options = options\n this.maxGlobstarRecursion = options.maxGlobstarRecursion !== undefined\n ? options.maxGlobstarRecursion : 200\n this.set = []\n this.pattern = pattern\n this.windowsPathsNoEscape = !!options.windowsPathsNoEscape ||\n options.allowWindowsEscape === false\n if (this.windowsPathsNoEscape) {\n this.pattern = this.pattern.replace(/\\\\/g, '/')\n }\n this.regexp = null\n this.negate = false\n this.comment = false\n this.empty = false\n this.partial = !!options.partial\n\n // make the set of regexps etc.\n this.make()\n }\n\n debug () {}\n\n make () {\n const pattern = this.pattern\n const options = this.options\n\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true\n return\n }\n if (!pattern) {\n this.empty = true\n return\n }\n\n // step 1: figure out negation, etc.\n this.parseNegate()\n\n // step 2: expand braces\n let set = this.globSet = this.braceExpand()\n\n if (options.debug) this.debug = (...args) => console.error(...args)\n\n this.debug(this.pattern, set)\n\n // step 3: now we have a set, so turn each one into a series of path-portion\n // matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n set = this.globParts = set.map(s => s.split(slashSplit))\n\n this.debug(this.pattern, set)\n\n // glob --> regexps\n set = set.map((s, si, set) => s.map(this.parse, this))\n\n this.debug(this.pattern, set)\n\n // filter out everything that didn't compile properly.\n set = set.filter(s => s.indexOf(false) === -1)\n\n this.debug(this.pattern, set)\n\n this.set = set\n }\n\n parseNegate () {\n if (this.options.nonegate) return\n\n const pattern = this.pattern\n let negate = false\n let negateOffset = 0\n\n for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n negate = !negate\n negateOffset++\n }\n\n if (negateOffset) this.pattern = pattern.slice(negateOffset)\n this.negate = negate\n }\n\n // set partial to true to test if, for example,\n // \"/a/b\" matches the start of \"/*/b/*/d\"\n // Partial means, if you run out of file before you run\n // out of pattern, then that's fine, as long as all\n // the parts match.\n matchOne (file, pattern, partial) {\n if (pattern.indexOf(GLOBSTAR) !== -1) {\n return this._matchGlobstar(file, pattern, partial, 0, 0)\n }\n return this._matchOne(file, pattern, partial, 0, 0)\n }\n\n _matchGlobstar (file, pattern, partial, fileIndex, patternIndex) {\n // find first globstar from patternIndex\n let firstgs = -1\n for (let i = patternIndex; i < pattern.length; i++) {\n if (pattern[i] === GLOBSTAR) { firstgs = i; break }\n }\n\n // find last globstar\n let lastgs = -1\n for (let i = pattern.length - 1; i >= 0; i--) {\n if (pattern[i] === GLOBSTAR) { lastgs = i; break }\n }\n\n const head = pattern.slice(patternIndex, firstgs)\n const body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs)\n const tail = partial ? [] : pattern.slice(lastgs + 1)\n\n // check the head\n if (head.length) {\n const fileHead = file.slice(fileIndex, fileIndex + head.length)\n if (!this._matchOne(fileHead, head, partial, 0, 0)) {\n return false\n }\n fileIndex += head.length\n }\n\n // check the tail\n let fileTailMatch = 0\n if (tail.length) {\n if (tail.length + fileIndex > file.length) return false\n\n const tailStart = file.length - tail.length\n if (this._matchOne(file, tail, partial, tailStart, 0)) {\n fileTailMatch = tail.length\n } else {\n // affordance for stuff like a/**/* matching a/b/\n if (file[file.length - 1] !== '' ||\n fileIndex + tail.length === file.length) {\n return false\n }\n if (!this._matchOne(file, tail, partial, tailStart - 1, 0)) {\n return false\n }\n fileTailMatch = tail.length + 1\n }\n }\n\n // if body is empty (single ** between head and tail)\n if (!body.length) {\n let sawSome = !!fileTailMatch\n for (let i = fileIndex; i < file.length - fileTailMatch; i++) {\n const f = String(file[i])\n sawSome = true\n if (f === '.' || f === '..' ||\n (!this.options.dot && f.charAt(0) === '.')) {\n return false\n }\n }\n return partial || sawSome\n }\n\n // split body into segments at each GLOBSTAR\n const bodySegments = [[[], 0]]\n let currentBody = bodySegments[0]\n let nonGsParts = 0\n const nonGsPartsSums = [0]\n for (const b of body) {\n if (b === GLOBSTAR) {\n nonGsPartsSums.push(nonGsParts)\n currentBody = [[], 0]\n bodySegments.push(currentBody)\n } else {\n currentBody[0].push(b)\n nonGsParts++\n }\n }\n\n let idx = bodySegments.length - 1\n const fileLength = file.length - fileTailMatch\n for (const b of bodySegments) {\n b[1] = fileLength - (nonGsPartsSums[idx--] + b[0].length)\n }\n\n return !!this._matchGlobStarBodySections(\n file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch\n )\n }\n\n // return false for \"nope, not matching\"\n // return null for \"not matching, cannot keep trying\"\n _matchGlobStarBodySections (\n file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail\n ) {\n const bs = bodySegments[bodyIndex]\n if (!bs) {\n // just make sure there are no bad dots\n for (let i = fileIndex; i < file.length; i++) {\n sawTail = true\n const f = file[i]\n if (f === '.' || f === '..' ||\n (!this.options.dot && f.charAt(0) === '.')) {\n return false\n }\n }\n return sawTail\n }\n\n const [body, after] = bs\n while (fileIndex <= after) {\n const m = this._matchOne(\n file.slice(0, fileIndex + body.length),\n body,\n partial,\n fileIndex,\n 0\n )\n // if limit exceeded, no match. intentional false negative,\n // acceptable break in correctness for security.\n if (m && globStarDepth < this.maxGlobstarRecursion) {\n const sub = this._matchGlobStarBodySections(\n file, bodySegments,\n fileIndex + body.length, bodyIndex + 1,\n partial, globStarDepth + 1, sawTail\n )\n if (sub !== false) {\n return sub\n }\n }\n const f = file[fileIndex]\n if (f === '.' || f === '..' ||\n (!this.options.dot && f.charAt(0) === '.')) {\n return false\n }\n fileIndex++\n }\n return partial || null\n }\n\n _matchOne (file, pattern, partial, fileIndex, patternIndex) {\n let fi, pi, fl, pl\n for (\n fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length\n ; (fi < fl) && (pi < pl)\n ; fi++, pi++\n ) {\n this.debug('matchOne loop')\n const p = pattern[pi]\n const f = file[fi]\n\n this.debug(pattern, p, f)\n\n // should be impossible.\n // some invalid regexp stuff in the set.\n /* istanbul ignore if */\n if (p === false || p === GLOBSTAR) return false\n\n // something other than **\n // non-magic patterns just have to match exactly\n // patterns with magic have been turned into regexps.\n let hit\n if (typeof p === 'string') {\n hit = f === p\n this.debug('string match', p, f, hit)\n } else {\n hit = f.match(p)\n this.debug('pattern match', p, f, hit)\n }\n\n if (!hit) return false\n }\n\n // now either we fell off the end of the pattern, or we're done.\n if (fi === fl && pi === pl) {\n // ran out of pattern and filename at the same time.\n // an exact hit!\n return true\n } else if (fi === fl) {\n // ran out of file, but still had pattern left.\n // this is ok if we're doing the match as part of\n // a glob fs traversal.\n return partial\n } else /* istanbul ignore else */ if (pi === pl) {\n // ran out of pattern, still have file left.\n // this is only acceptable if we're on the very last\n // empty segment of a file with a trailing slash.\n // a/* should match a/b/\n return (fi === fl - 1) && (file[fi] === '')\n }\n\n // should be unreachable.\n /* istanbul ignore next */\n throw new Error('wtf?')\n }\n\n braceExpand () {\n return braceExpand(this.pattern, this.options)\n }\n\n parse (pattern, isSub) {\n assertValidPattern(pattern)\n\n const options = this.options\n\n // shortcuts\n if (pattern === '**') {\n if (!options.noglobstar)\n return GLOBSTAR\n else\n pattern = '*'\n }\n if (pattern === '') return ''\n\n let re = ''\n let hasMagic = false\n let escaping = false\n // ? => one single character\n const patternListStack = []\n const negativeLists = []\n let stateChar\n let inClass = false\n let reClassStart = -1\n let classStart = -1\n let cs\n let pl\n let sp\n // . and .. never match anything that doesn't start with .,\n // even when options.dot is set. However, if the pattern\n // starts with ., then traversal patterns can match.\n let dotTravAllowed = pattern.charAt(0) === '.'\n let dotFileAllowed = options.dot || dotTravAllowed\n const patternStart = () =>\n dotTravAllowed\n ? ''\n : dotFileAllowed\n ? '(?!(?:^|\\\\/)\\\\.{1,2}(?:$|\\\\/))'\n : '(?!\\\\.)'\n const subPatternStart = (p) =>\n p.charAt(0) === '.'\n ? ''\n : options.dot\n ? '(?!(?:^|\\\\/)\\\\.{1,2}(?:$|\\\\/))'\n : '(?!\\\\.)'\n\n\n const clearStateChar = () => {\n if (stateChar) {\n // we had some state-tracking character\n // that wasn't consumed by this pass.\n switch (stateChar) {\n case '*':\n re += star\n hasMagic = true\n break\n case '?':\n re += qmark\n hasMagic = true\n break\n default:\n re += '\\\\' + stateChar\n break\n }\n this.debug('clearStateChar %j %j', stateChar, re)\n stateChar = false\n }\n }\n\n for (let i = 0, c; (i < pattern.length) && (c = pattern.charAt(i)); i++) {\n this.debug('%s\\t%s %s %j', pattern, i, re, c)\n\n // skip over any that are escaped.\n if (escaping) {\n /* istanbul ignore next - completely not allowed, even escaped. */\n if (c === '/') {\n return false\n }\n\n if (reSpecials[c]) {\n re += '\\\\'\n }\n re += c\n escaping = false\n continue\n }\n\n switch (c) {\n /* istanbul ignore next */\n case '/': {\n // Should already be path-split by now.\n return false\n }\n\n case '\\\\':\n if (inClass && pattern.charAt(i + 1) === '-') {\n re += c\n continue\n }\n\n clearStateChar()\n escaping = true\n continue\n\n // the various stateChar values\n // for the \"extglob\" stuff.\n case '?':\n case '*':\n case '+':\n case '@':\n case '!':\n this.debug('%s\\t%s %s %j <-- stateChar', pattern, i, re, c)\n\n // all of those are literals inside a class, except that\n // the glob [!a] means [^a] in regexp\n if (inClass) {\n this.debug(' in class')\n if (c === '!' && i === classStart + 1) c = '^'\n re += c\n continue\n }\n\n // coalesce consecutive non-globstar * characters\n if (c === '*' && stateChar === '*') continue\n\n // if we already have a stateChar, then it means\n // that there was something like ** or +? in there.\n // Handle the stateChar, then proceed with this one.\n this.debug('call clearStateChar %j', stateChar)\n clearStateChar()\n stateChar = c\n // if extglob is disabled, then +(asdf|foo) isn't a thing.\n // just clear the statechar *now*, rather than even diving into\n // the patternList stuff.\n if (options.noext) clearStateChar()\n continue\n\n case '(': {\n if (inClass) {\n re += '('\n continue\n }\n\n if (!stateChar) {\n re += '\\\\('\n continue\n }\n\n const plEntry = {\n type: stateChar,\n start: i - 1,\n reStart: re.length,\n open: plTypes[stateChar].open,\n close: plTypes[stateChar].close,\n }\n this.debug(this.pattern, '\\t', plEntry)\n patternListStack.push(plEntry)\n // negation is (?:(?!(?:js)(?:))[^/]*)\n re += plEntry.open\n // next entry starts with a dot maybe?\n if (plEntry.start === 0 && plEntry.type !== '!') {\n dotTravAllowed = true\n re += subPatternStart(pattern.slice(i + 1))\n }\n this.debug('plType %j %j', stateChar, re)\n stateChar = false\n continue\n }\n\n case ')': {\n const plEntry = patternListStack[patternListStack.length - 1]\n if (inClass || !plEntry) {\n re += '\\\\)'\n continue\n }\n patternListStack.pop()\n\n // closing an extglob\n clearStateChar()\n hasMagic = true\n pl = plEntry\n // negation is (?:(?!js)[^/]*)\n // The others are (?:)\n re += pl.close\n if (pl.type === '!') {\n negativeLists.push(Object.assign(pl, { reEnd: re.length }))\n }\n continue\n }\n\n case '|': {\n const plEntry = patternListStack[patternListStack.length - 1]\n if (inClass || !plEntry) {\n re += '\\\\|'\n continue\n }\n\n clearStateChar()\n re += '|'\n // next subpattern can start with a dot?\n if (plEntry.start === 0 && plEntry.type !== '!') {\n dotTravAllowed = true\n re += subPatternStart(pattern.slice(i + 1))\n }\n continue\n }\n\n // these are mostly the same in regexp and glob\n case '[':\n // swallow any state-tracking char before the [\n clearStateChar()\n\n if (inClass) {\n re += '\\\\' + c\n continue\n }\n\n inClass = true\n classStart = i\n reClassStart = re.length\n re += c\n continue\n\n case ']':\n // a right bracket shall lose its special\n // meaning and represent itself in\n // a bracket expression if it occurs\n // first in the list. -- POSIX.2 2.8.3.2\n if (i === classStart + 1 || !inClass) {\n re += '\\\\' + c\n continue\n }\n\n // split where the last [ was, make sure we don't have\n // an invalid re. if so, re-walk the contents of the\n // would-be class to re-translate any characters that\n // were passed through as-is\n // TODO: It would probably be faster to determine this\n // without a try/catch and a new RegExp, but it's tricky\n // to do safely. For now, this is safe and works.\n cs = pattern.substring(classStart + 1, i)\n try {\n RegExp('[' + braExpEscape(charUnescape(cs)) + ']')\n // looks good, finish up the class.\n re += c\n } catch (er) {\n // out of order ranges in JS are errors, but in glob syntax,\n // they're just a range that matches nothing.\n re = re.substring(0, reClassStart) + '(?:$.)' // match nothing ever\n }\n hasMagic = true\n inClass = false\n continue\n\n default:\n // swallow any state char that wasn't consumed\n clearStateChar()\n\n if (reSpecials[c] && !(c === '^' && inClass)) {\n re += '\\\\'\n }\n\n re += c\n break\n\n } // switch\n } // for\n\n // handle the case where we left a class open.\n // \"[abc\" is valid, equivalent to \"\\[abc\"\n if (inClass) {\n // split where the last [ was, and escape it\n // this is a huge pita. We now have to re-walk\n // the contents of the would-be class to re-translate\n // any characters that were passed through as-is\n cs = pattern.slice(classStart + 1)\n sp = this.parse(cs, SUBPARSE)\n re = re.substring(0, reClassStart) + '\\\\[' + sp[0]\n hasMagic = hasMagic || sp[1]\n }\n\n // handle the case where we had a +( thing at the *end*\n // of the pattern.\n // each pattern list stack adds 3 chars, and we need to go through\n // and escape any | chars that were passed through as-is for the regexp.\n // Go through and escape them, taking care not to double-escape any\n // | chars that were already escaped.\n for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {\n let tail\n tail = re.slice(pl.reStart + pl.open.length)\n this.debug('setting tail', re, pl)\n // maybe some even number of \\, then maybe 1 \\, followed by a |\n tail = tail.replace(/((?:\\\\{2}){0,64})(\\\\?)\\|/g, (_, $1, $2) => {\n /* istanbul ignore else - should already be done */\n if (!$2) {\n // the | isn't already escaped, so escape it.\n $2 = '\\\\'\n }\n\n // need to escape all those slashes *again*, without escaping the\n // one that we need for escaping the | character. As it works out,\n // escaping an even number of slashes can be done by simply repeating\n // it exactly after itself. That's why this trick works.\n //\n // I am sorry that you have to see this.\n return $1 + $1 + $2 + '|'\n })\n\n this.debug('tail=%j\\n %s', tail, tail, pl, re)\n const t = pl.type === '*' ? star\n : pl.type === '?' ? qmark\n : '\\\\' + pl.type\n\n hasMagic = true\n re = re.slice(0, pl.reStart) + t + '\\\\(' + tail\n }\n\n // handle trailing things that only matter at the very end.\n clearStateChar()\n if (escaping) {\n // trailing \\\\\n re += '\\\\\\\\'\n }\n\n // only need to apply the nodot start if the re starts with\n // something that could conceivably capture a dot\n const addPatternStart = addPatternStartSet[re.charAt(0)]\n\n // Hack to work around lack of negative lookbehind in JS\n // A pattern like: *.!(x).!(y|z) needs to ensure that a name\n // like 'a.xyz.yz' doesn't match. So, the first negative\n // lookahead, has to look ALL the way ahead, to the end of\n // the pattern.\n for (let n = negativeLists.length - 1; n > -1; n--) {\n const nl = negativeLists[n]\n\n const nlBefore = re.slice(0, nl.reStart)\n const nlFirst = re.slice(nl.reStart, nl.reEnd - 8)\n let nlAfter = re.slice(nl.reEnd)\n const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter\n\n // Handle nested stuff like *(*.js|!(*.json)), where open parens\n // mean that we should *not* include the ) in the bit that is considered\n // \"after\" the negated section.\n const closeParensBefore = nlBefore.split(')').length\n const openParensBefore = nlBefore.split('(').length - closeParensBefore\n let cleanAfter = nlAfter\n for (let i = 0; i < openParensBefore; i++) {\n cleanAfter = cleanAfter.replace(/\\)[+*?]?/, '')\n }\n nlAfter = cleanAfter\n\n const dollar = nlAfter === '' && isSub !== SUBPARSE ? '(?:$|\\\\/)' : ''\n\n re = nlBefore + nlFirst + nlAfter + dollar + nlLast\n }\n\n // if the re is not \"\" at this point, then we need to make sure\n // it doesn't match against an empty path part.\n // Otherwise a/* will match a/, which it should not.\n if (re !== '' && hasMagic) {\n re = '(?=.)' + re\n }\n\n if (addPatternStart) {\n re = patternStart() + re\n }\n\n // parsing just a piece of a larger pattern.\n if (isSub === SUBPARSE) {\n return [re, hasMagic]\n }\n\n // if it's nocase, and the lcase/uppercase don't match, it's magic\n if (options.nocase && !hasMagic) {\n hasMagic = pattern.toUpperCase() !== pattern.toLowerCase()\n }\n\n // skip the regexp for non-magical patterns\n // unescape anything in it, though, so that it'll be\n // an exact match against a file etc.\n if (!hasMagic) {\n return globUnescape(pattern)\n }\n\n const flags = options.nocase ? 'i' : ''\n try {\n return Object.assign(new RegExp('^' + re + '$', flags), {\n _glob: pattern,\n _src: re,\n })\n } catch (er) /* istanbul ignore next - should be impossible */ {\n // If it was an invalid regular expression, then it can't match\n // anything. This trick looks for a character after the end of\n // the string, which is of course impossible, except in multi-line\n // mode, but it's not a /m regex.\n return new RegExp('$.')\n }\n }\n\n makeRe () {\n if (this.regexp || this.regexp === false) return this.regexp\n\n // at this point, this.set is a 2d array of partial\n // pattern strings, or \"**\".\n //\n // It's better to use .match(). This function shouldn't\n // be used, really, but it's pretty convenient sometimes,\n // when you just want to work with a regex.\n const set = this.set\n\n if (!set.length) {\n this.regexp = false\n return this.regexp\n }\n const options = this.options\n\n const twoStar = options.noglobstar ? star\n : options.dot ? twoStarDot\n : twoStarNoDot\n const flags = options.nocase ? 'i' : ''\n\n // coalesce globstars and regexpify non-globstar patterns\n // if it's the only item, then we just do one twoStar\n // if it's the first, and there are more, prepend (\\/|twoStar\\/)? to next\n // if it's the last, append (\\/twoStar|) to previous\n // if it's in the middle, append (\\/|\\/twoStar\\/) to previous\n // then filter out GLOBSTAR symbols\n let re = set.map(pattern => {\n pattern = pattern.map(p =>\n typeof p === 'string' ? regExpEscape(p)\n : p === GLOBSTAR ? GLOBSTAR\n : p._src\n ).reduce((set, p) => {\n if (!(set[set.length - 1] === GLOBSTAR && p === GLOBSTAR)) {\n set.push(p)\n }\n return set\n }, [])\n pattern.forEach((p, i) => {\n if (p !== GLOBSTAR || pattern[i-1] === GLOBSTAR) {\n return\n }\n if (i === 0) {\n if (pattern.length > 1) {\n pattern[i+1] = '(?:\\\\\\/|' + twoStar + '\\\\\\/)?' + pattern[i+1]\n } else {\n pattern[i] = twoStar\n }\n } else if (i === pattern.length - 1) {\n pattern[i-1] += '(?:\\\\\\/|' + twoStar + ')?'\n } else {\n pattern[i-1] += '(?:\\\\\\/|\\\\\\/' + twoStar + '\\\\\\/)' + pattern[i+1]\n pattern[i+1] = GLOBSTAR\n }\n })\n return pattern.filter(p => p !== GLOBSTAR).join('/')\n }).join('|')\n\n // must match entire pattern\n // ending in a * or ** will make it less strict.\n re = '^(?:' + re + ')$'\n\n // can match anything, as long as it's not this.\n if (this.negate) re = '^(?!' + re + ').*$'\n\n try {\n this.regexp = new RegExp(re, flags)\n } catch (ex) /* istanbul ignore next - should be impossible */ {\n this.regexp = false\n }\n return this.regexp\n }\n\n match (f, partial = this.partial) {\n this.debug('match', f, this.pattern)\n // short-circuit in the case of busted things.\n // comments, etc.\n if (this.comment) return false\n if (this.empty) return f === ''\n\n if (f === '/' && partial) return true\n\n const options = this.options\n\n // windows: need to use /, not \\\n if (path.sep !== '/') {\n f = f.split(path.sep).join('/')\n }\n\n // treat the test path as a set of pathparts.\n f = f.split(slashSplit)\n this.debug(this.pattern, 'split', f)\n\n // just ONE of the pattern sets in this.set needs to match\n // in order for it to be valid. If negating, then just one\n // match means that we have failed.\n // Either way, return on the first hit.\n\n const set = this.set\n this.debug(this.pattern, 'set', set)\n\n // Find the basename of the path by looking for the last non-empty segment\n let filename\n for (let i = f.length - 1; i >= 0; i--) {\n filename = f[i]\n if (filename) break\n }\n\n for (let i = 0; i < set.length; i++) {\n const pattern = set[i]\n let file = f\n if (options.matchBase && pattern.length === 1) {\n file = [filename]\n }\n const hit = this.matchOne(file, pattern, partial)\n if (hit) {\n if (options.flipNegate) return true\n return !this.negate\n }\n }\n\n // didn't get any hits. this is success if it's a negative\n // pattern, failure otherwise.\n if (options.flipNegate) return false\n return this.negate\n }\n\n static defaults (def) {\n return minimatch.defaults(def).Minimatch\n }\n}\n\nminimatch.Minimatch = Minimatch\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.req = exports.json = exports.toBuffer = void 0;\nconst http = __importStar(require(\"http\"));\nconst https = __importStar(require(\"https\"));\nasync function toBuffer(stream) {\n let length = 0;\n const chunks = [];\n for await (const chunk of stream) {\n length += chunk.length;\n chunks.push(chunk);\n }\n return Buffer.concat(chunks, length);\n}\nexports.toBuffer = toBuffer;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nasync function json(stream) {\n const buf = await toBuffer(stream);\n const str = buf.toString('utf8');\n try {\n return JSON.parse(str);\n }\n catch (_err) {\n const err = _err;\n err.message += ` (input: ${str})`;\n throw err;\n }\n}\nexports.json = json;\nfunction req(url, opts = {}) {\n const href = typeof url === 'string' ? url : url.href;\n const req = (href.startsWith('https:') ? https : http).request(url, opts);\n const promise = new Promise((resolve, reject) => {\n req\n .once('response', resolve)\n .once('error', reject)\n .end();\n });\n req.then = promise.then.bind(promise);\n return req;\n}\nexports.req = req;\n//# sourceMappingURL=helpers.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Agent = void 0;\nconst net = __importStar(require(\"net\"));\nconst http = __importStar(require(\"http\"));\nconst https_1 = require(\"https\");\n__exportStar(require(\"./helpers\"), exports);\nconst INTERNAL = Symbol('AgentBaseInternalState');\nclass Agent extends http.Agent {\n constructor(opts) {\n super(opts);\n this[INTERNAL] = {};\n }\n /**\n * Determine whether this is an `http` or `https` request.\n */\n isSecureEndpoint(options) {\n if (options) {\n // First check the `secureEndpoint` property explicitly, since this\n // means that a parent `Agent` is \"passing through\" to this instance.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (typeof options.secureEndpoint === 'boolean') {\n return options.secureEndpoint;\n }\n // If no explicit `secure` endpoint, check if `protocol` property is\n // set. This will usually be the case since using a full string URL\n // or `URL` instance should be the most common usage.\n if (typeof options.protocol === 'string') {\n return options.protocol === 'https:';\n }\n }\n // Finally, if no `protocol` property was set, then fall back to\n // checking the stack trace of the current call stack, and try to\n // detect the \"https\" module.\n const { stack } = new Error();\n if (typeof stack !== 'string')\n return false;\n return stack\n .split('\\n')\n .some((l) => l.indexOf('(https.js:') !== -1 ||\n l.indexOf('node:https:') !== -1);\n }\n // In order to support async signatures in `connect()` and Node's native\n // connection pooling in `http.Agent`, the array of sockets for each origin\n // has to be updated synchronously. This is so the length of the array is\n // accurate when `addRequest()` is next called. We achieve this by creating a\n // fake socket and adding it to `sockets[origin]` and incrementing\n // `totalSocketCount`.\n incrementSockets(name) {\n // If `maxSockets` and `maxTotalSockets` are both Infinity then there is no\n // need to create a fake socket because Node.js native connection pooling\n // will never be invoked.\n if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {\n return null;\n }\n // All instances of `sockets` are expected TypeScript errors. The\n // alternative is to add it as a private property of this class but that\n // will break TypeScript subclassing.\n if (!this.sockets[name]) {\n // @ts-expect-error `sockets` is readonly in `@types/node`\n this.sockets[name] = [];\n }\n const fakeSocket = new net.Socket({ writable: false });\n this.sockets[name].push(fakeSocket);\n // @ts-expect-error `totalSocketCount` isn't defined in `@types/node`\n this.totalSocketCount++;\n return fakeSocket;\n }\n decrementSockets(name, socket) {\n if (!this.sockets[name] || socket === null) {\n return;\n }\n const sockets = this.sockets[name];\n const index = sockets.indexOf(socket);\n if (index !== -1) {\n sockets.splice(index, 1);\n // @ts-expect-error `totalSocketCount` isn't defined in `@types/node`\n this.totalSocketCount--;\n if (sockets.length === 0) {\n // @ts-expect-error `sockets` is readonly in `@types/node`\n delete this.sockets[name];\n }\n }\n }\n // In order to properly update the socket pool, we need to call `getName()` on\n // the core `https.Agent` if it is a secureEndpoint.\n getName(options) {\n const secureEndpoint = typeof options.secureEndpoint === 'boolean'\n ? options.secureEndpoint\n : this.isSecureEndpoint(options);\n if (secureEndpoint) {\n // @ts-expect-error `getName()` isn't defined in `@types/node`\n return https_1.Agent.prototype.getName.call(this, options);\n }\n // @ts-expect-error `getName()` isn't defined in `@types/node`\n return super.getName(options);\n }\n createSocket(req, options, cb) {\n const connectOpts = {\n ...options,\n secureEndpoint: this.isSecureEndpoint(options),\n };\n const name = this.getName(connectOpts);\n const fakeSocket = this.incrementSockets(name);\n Promise.resolve()\n .then(() => this.connect(req, connectOpts))\n .then((socket) => {\n this.decrementSockets(name, fakeSocket);\n if (socket instanceof http.Agent) {\n try {\n // @ts-expect-error `addRequest()` isn't defined in `@types/node`\n return socket.addRequest(req, connectOpts);\n }\n catch (err) {\n return cb(err);\n }\n }\n this[INTERNAL].currentSocket = socket;\n // @ts-expect-error `createSocket()` isn't defined in `@types/node`\n super.createSocket(req, options, cb);\n }, (err) => {\n this.decrementSockets(name, fakeSocket);\n cb(err);\n });\n }\n createConnection() {\n const socket = this[INTERNAL].currentSocket;\n this[INTERNAL].currentSocket = undefined;\n if (!socket) {\n throw new Error('No socket was returned in the `connect()` function');\n }\n return socket;\n }\n get defaultPort() {\n return (this[INTERNAL].defaultPort ??\n (this.protocol === 'https:' ? 443 : 80));\n }\n set defaultPort(v) {\n if (this[INTERNAL]) {\n this[INTERNAL].defaultPort = v;\n }\n }\n get protocol() {\n return (this[INTERNAL].protocol ??\n (this.isSecureEndpoint() ? 'https:' : 'http:'));\n }\n set protocol(v) {\n if (this[INTERNAL]) {\n this[INTERNAL].protocol = v;\n }\n }\n}\nexports.Agent = Agent;\n//# sourceMappingURL=index.js.map","'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n if(a===b) {\n return [ai, bi];\n }\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n","var register = require(\"./lib/register\");\nvar addHook = require(\"./lib/add\");\nvar removeHook = require(\"./lib/remove\");\n\n// bind with array of arguments: https://stackoverflow.com/a/21792913\nvar bind = Function.bind;\nvar bindable = bind.bind(bind);\n\nfunction bindApi(hook, state, name) {\n var removeHookRef = bindable(removeHook, null).apply(\n null,\n name ? [state, name] : [state]\n );\n hook.api = { remove: removeHookRef };\n hook.remove = removeHookRef;\n [\"before\", \"error\", \"after\", \"wrap\"].forEach(function (kind) {\n var args = name ? [state, kind, name] : [state, kind];\n hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args);\n });\n}\n\nfunction HookSingular() {\n var singularHookName = \"h\";\n var singularHookState = {\n registry: {},\n };\n var singularHook = register.bind(null, singularHookState, singularHookName);\n bindApi(singularHook, singularHookState, singularHookName);\n return singularHook;\n}\n\nfunction HookCollection() {\n var state = {\n registry: {},\n };\n\n var hook = register.bind(null, state);\n bindApi(hook, state);\n\n return hook;\n}\n\nvar collectionHookDeprecationMessageDisplayed = false;\nfunction Hook() {\n if (!collectionHookDeprecationMessageDisplayed) {\n console.warn(\n '[before-after-hook]: \"Hook()\" repurposing warning, use \"Hook.Collection()\". Read more: https://git.io/upgrade-before-after-hook-to-1.4'\n );\n collectionHookDeprecationMessageDisplayed = true;\n }\n return HookCollection();\n}\n\nHook.Singular = HookSingular.bind();\nHook.Collection = HookCollection.bind();\n\nmodule.exports = Hook;\n// expose constructors as a named property for TypeScript\nmodule.exports.Hook = Hook;\nmodule.exports.Singular = Hook.Singular;\nmodule.exports.Collection = Hook.Collection;\n","module.exports = addHook;\n\nfunction addHook(state, kind, name, hook) {\n var orig = hook;\n if (!state.registry[name]) {\n state.registry[name] = [];\n }\n\n if (kind === \"before\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(orig.bind(null, options))\n .then(method.bind(null, options));\n };\n }\n\n if (kind === \"after\") {\n hook = function (method, options) {\n var result;\n return Promise.resolve()\n .then(method.bind(null, options))\n .then(function (result_) {\n result = result_;\n return orig(result, options);\n })\n .then(function () {\n return result;\n });\n };\n }\n\n if (kind === \"error\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(method.bind(null, options))\n .catch(function (error) {\n return orig(error, options);\n });\n };\n }\n\n state.registry[name].push({\n hook: hook,\n orig: orig,\n });\n}\n","module.exports = register;\n\nfunction register(state, name, method, options) {\n if (typeof method !== \"function\") {\n throw new Error(\"method for before hook must be a function\");\n }\n\n if (!options) {\n options = {};\n }\n\n if (Array.isArray(name)) {\n return name.reverse().reduce(function (callback, name) {\n return register.bind(null, state, name, callback, options);\n }, method)();\n }\n\n return Promise.resolve().then(function () {\n if (!state.registry[name]) {\n return method(options);\n }\n\n return state.registry[name].reduce(function (method, registered) {\n return registered.hook.bind(null, method, options);\n }, method)();\n });\n}\n","module.exports = removeHook;\n\nfunction removeHook(state, name, method) {\n if (!state.registry[name]) {\n return;\n }\n\n var index = state.registry[name]\n .map(function (registered) {\n return registered.orig;\n })\n .indexOf(method);\n\n if (index === -1) {\n return;\n }\n\n state.registry[name].splice(index, 1);\n}\n","var balanced = require('balanced-match');\n\nmodule.exports = expandTop;\n\nvar escSlash = '\\0SLASH'+Math.random()+'\\0';\nvar escOpen = '\\0OPEN'+Math.random()+'\\0';\nvar escClose = '\\0CLOSE'+Math.random()+'\\0';\nvar escComma = '\\0COMMA'+Math.random()+'\\0';\nvar escPeriod = '\\0PERIOD'+Math.random()+'\\0';\n\nfunction numeric(str) {\n return parseInt(str, 10) == str\n ? parseInt(str, 10)\n : str.charCodeAt(0);\n}\n\nfunction escapeBraces(str) {\n return str.split('\\\\\\\\').join(escSlash)\n .split('\\\\{').join(escOpen)\n .split('\\\\}').join(escClose)\n .split('\\\\,').join(escComma)\n .split('\\\\.').join(escPeriod);\n}\n\nfunction unescapeBraces(str) {\n return str.split(escSlash).join('\\\\')\n .split(escOpen).join('{')\n .split(escClose).join('}')\n .split(escComma).join(',')\n .split(escPeriod).join('.');\n}\n\n\n// Basically just str.split(\",\"), but handling cases\n// where we have nested braced sections, which should be\n// treated as individual members, like {a,{b,c},d}\nfunction parseCommaParts(str) {\n if (!str)\n return [''];\n\n var parts = [];\n var m = balanced('{', '}', str);\n\n if (!m)\n return str.split(',');\n\n var pre = m.pre;\n var body = m.body;\n var post = m.post;\n var p = pre.split(',');\n\n p[p.length-1] += '{' + body + '}';\n var postParts = parseCommaParts(post);\n if (post.length) {\n p[p.length-1] += postParts.shift();\n p.push.apply(p, postParts);\n }\n\n parts.push.apply(parts, p);\n\n return parts;\n}\n\nfunction expandTop(str, options) {\n if (!str)\n return [];\n\n options = options || {};\n var max = options.max == null ? Infinity : options.max;\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.substr(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.substr(2);\n }\n\n return expand(escapeBraces(str), max, true).map(unescapeBraces);\n}\n\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\n\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\n\nfunction expand(str, max, isTop) {\n var expansions = [];\n\n var m = balanced('{', '}', str);\n if (!m) return [str];\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n var pre = m.pre;\n var post = m.post.length\n ? expand(m.post, max, false)\n : [''];\n\n if (/\\$$/.test(m.pre)) { \n for (var k = 0; k < post.length && k < max; k++) {\n var expansion = pre+ '{' + m.body + '}' + post[k];\n expansions.push(expansion);\n }\n } else {\n var isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n var isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\n var isSequence = isNumericSequence || isAlphaSequence;\n var isOptions = m.body.indexOf(',') >= 0;\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,(?!,).*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post;\n return expand(str, max, true);\n }\n return [str];\n }\n\n var n;\n if (isSequence) {\n n = m.body.split(/\\.\\./);\n } else {\n n = parseCommaParts(m.body);\n if (n.length === 1) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand(n[0], max, false).map(embrace);\n if (n.length === 1) {\n return post.map(function(p) {\n return m.pre + n[0] + p;\n });\n }\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n var N;\n\n if (isSequence) {\n var x = numeric(n[0]);\n var y = numeric(n[1]);\n var width = Math.max(n[0].length, n[1].length)\n var incr = n.length == 3\n ? Math.max(Math.abs(numeric(n[2])), 1)\n : 1;\n var test = lte;\n var reverse = y < x;\n if (reverse) {\n incr *= -1;\n test = gte;\n }\n var pad = n.some(isPadded);\n\n N = [];\n\n for (var i = x; test(i, y); i += incr) {\n var c;\n if (isAlphaSequence) {\n c = String.fromCharCode(i);\n if (c === '\\\\')\n c = '';\n } else {\n c = String(i);\n if (pad) {\n var need = width - c.length;\n if (need > 0) {\n var z = new Array(need + 1).join('0');\n if (i < 0)\n c = '-' + z + c.slice(1);\n else\n c = z + c;\n }\n }\n }\n N.push(c);\n }\n } else {\n N = [];\n\n for (var j = 0; j < n.length; j++) {\n N.push.apply(N, expand(n[j], max, false));\n }\n }\n\n for (var j = 0; j < N.length; j++) {\n for (var k = 0; k < post.length && expansions.length < max; k++) {\n var expansion = pre + N[j] + post[k];\n if (!isTop || isSequence || expansion)\n expansions.push(expansion);\n }\n }\n }\n\n return expansions;\n}\n","module.exports = function (xs, fn) {\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n var x = fn(xs[i], i);\n if (isArray(x)) res.push.apply(res, x);\n else res.push(x);\n }\n return res;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n","/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.format()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.format(...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nclass Deprecation extends Error {\n constructor(message) {\n super(message); // Maintains proper stack trace (only available on V8)\n\n /* istanbul ignore next */\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = 'Deprecation';\n }\n\n}\n\nexports.Deprecation = Deprecation;\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","module.exports = realpath\nrealpath.realpath = realpath\nrealpath.sync = realpathSync\nrealpath.realpathSync = realpathSync\nrealpath.monkeypatch = monkeypatch\nrealpath.unmonkeypatch = unmonkeypatch\n\nvar fs = require('fs')\nvar origRealpath = fs.realpath\nvar origRealpathSync = fs.realpathSync\n\nvar version = process.version\nvar ok = /^v[0-5]\\./.test(version)\nvar old = require('./old.js')\n\nfunction newError (er) {\n return er && er.syscall === 'realpath' && (\n er.code === 'ELOOP' ||\n er.code === 'ENOMEM' ||\n er.code === 'ENAMETOOLONG'\n )\n}\n\nfunction realpath (p, cache, cb) {\n if (ok) {\n return origRealpath(p, cache, cb)\n }\n\n if (typeof cache === 'function') {\n cb = cache\n cache = null\n }\n origRealpath(p, cache, function (er, result) {\n if (newError(er)) {\n old.realpath(p, cache, cb)\n } else {\n cb(er, result)\n }\n })\n}\n\nfunction realpathSync (p, cache) {\n if (ok) {\n return origRealpathSync(p, cache)\n }\n\n try {\n return origRealpathSync(p, cache)\n } catch (er) {\n if (newError(er)) {\n return old.realpathSync(p, cache)\n } else {\n throw er\n }\n }\n}\n\nfunction monkeypatch () {\n fs.realpath = realpath\n fs.realpathSync = realpathSync\n}\n\nfunction unmonkeypatch () {\n fs.realpath = origRealpath\n fs.realpathSync = origRealpathSync\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar pathModule = require('path');\nvar isWindows = process.platform === 'win32';\nvar fs = require('fs');\n\n// JavaScript implementation of realpath, ported from node pre-v6\n\nvar DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);\n\nfunction rethrow() {\n // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and\n // is fairly slow to generate.\n var callback;\n if (DEBUG) {\n var backtrace = new Error;\n callback = debugCallback;\n } else\n callback = missingCallback;\n\n return callback;\n\n function debugCallback(err) {\n if (err) {\n backtrace.message = err.message;\n err = backtrace;\n missingCallback(err);\n }\n }\n\n function missingCallback(err) {\n if (err) {\n if (process.throwDeprecation)\n throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs\n else if (!process.noDeprecation) {\n var msg = 'fs: missing callback ' + (err.stack || err.message);\n if (process.traceDeprecation)\n console.trace(msg);\n else\n console.error(msg);\n }\n }\n }\n}\n\nfunction maybeCallback(cb) {\n return typeof cb === 'function' ? cb : rethrow();\n}\n\nvar normalize = pathModule.normalize;\n\n// Regexp that finds the next partion of a (partial) path\n// result is [base_with_slash, base], e.g. ['somedir/', 'somedir']\nif (isWindows) {\n var nextPartRe = /(.*?)(?:[\\/\\\\]+|$)/g;\n} else {\n var nextPartRe = /(.*?)(?:[\\/]+|$)/g;\n}\n\n// Regex to find the device root, including trailing slash. E.g. 'c:\\\\'.\nif (isWindows) {\n var splitRootRe = /^(?:[a-zA-Z]:|[\\\\\\/]{2}[^\\\\\\/]+[\\\\\\/][^\\\\\\/]+)?[\\\\\\/]*/;\n} else {\n var splitRootRe = /^[\\/]*/;\n}\n\nexports.realpathSync = function realpathSync(p, cache) {\n // make p is absolute\n p = pathModule.resolve(p);\n\n if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {\n return cache[p];\n }\n\n var original = p,\n seenLinks = {},\n knownHard = {};\n\n // current character position in p\n var pos;\n // the partial path so far, including a trailing slash if any\n var current;\n // the partial path without a trailing slash (except when pointing at a root)\n var base;\n // the partial path scanned in the previous round, with slash\n var previous;\n\n start();\n\n function start() {\n // Skip over roots\n var m = splitRootRe.exec(p);\n pos = m[0].length;\n current = m[0];\n base = m[0];\n previous = '';\n\n // On windows, check that the root exists. On unix there is no need.\n if (isWindows && !knownHard[base]) {\n fs.lstatSync(base);\n knownHard[base] = true;\n }\n }\n\n // walk down the path, swapping out linked pathparts for their real\n // values\n // NB: p.length changes.\n while (pos < p.length) {\n // find the next part\n nextPartRe.lastIndex = pos;\n var result = nextPartRe.exec(p);\n previous = current;\n current += result[0];\n base = previous + result[1];\n pos = nextPartRe.lastIndex;\n\n // continue if not a symlink\n if (knownHard[base] || (cache && cache[base] === base)) {\n continue;\n }\n\n var resolvedLink;\n if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {\n // some known symbolic link. no need to stat again.\n resolvedLink = cache[base];\n } else {\n var stat = fs.lstatSync(base);\n if (!stat.isSymbolicLink()) {\n knownHard[base] = true;\n if (cache) cache[base] = base;\n continue;\n }\n\n // read the link if it wasn't read before\n // dev/ino always return 0 on windows, so skip the check.\n var linkTarget = null;\n if (!isWindows) {\n var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);\n if (seenLinks.hasOwnProperty(id)) {\n linkTarget = seenLinks[id];\n }\n }\n if (linkTarget === null) {\n fs.statSync(base);\n linkTarget = fs.readlinkSync(base);\n }\n resolvedLink = pathModule.resolve(previous, linkTarget);\n // track this, if given a cache.\n if (cache) cache[base] = resolvedLink;\n if (!isWindows) seenLinks[id] = linkTarget;\n }\n\n // resolve the link, then start over\n p = pathModule.resolve(resolvedLink, p.slice(pos));\n start();\n }\n\n if (cache) cache[original] = p;\n\n return p;\n};\n\n\nexports.realpath = function realpath(p, cache, cb) {\n if (typeof cb !== 'function') {\n cb = maybeCallback(cache);\n cache = null;\n }\n\n // make p is absolute\n p = pathModule.resolve(p);\n\n if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {\n return process.nextTick(cb.bind(null, null, cache[p]));\n }\n\n var original = p,\n seenLinks = {},\n knownHard = {};\n\n // current character position in p\n var pos;\n // the partial path so far, including a trailing slash if any\n var current;\n // the partial path without a trailing slash (except when pointing at a root)\n var base;\n // the partial path scanned in the previous round, with slash\n var previous;\n\n start();\n\n function start() {\n // Skip over roots\n var m = splitRootRe.exec(p);\n pos = m[0].length;\n current = m[0];\n base = m[0];\n previous = '';\n\n // On windows, check that the root exists. On unix there is no need.\n if (isWindows && !knownHard[base]) {\n fs.lstat(base, function(err) {\n if (err) return cb(err);\n knownHard[base] = true;\n LOOP();\n });\n } else {\n process.nextTick(LOOP);\n }\n }\n\n // walk down the path, swapping out linked pathparts for their real\n // values\n function LOOP() {\n // stop if scanned past end of path\n if (pos >= p.length) {\n if (cache) cache[original] = p;\n return cb(null, p);\n }\n\n // find the next part\n nextPartRe.lastIndex = pos;\n var result = nextPartRe.exec(p);\n previous = current;\n current += result[0];\n base = previous + result[1];\n pos = nextPartRe.lastIndex;\n\n // continue if not a symlink\n if (knownHard[base] || (cache && cache[base] === base)) {\n return process.nextTick(LOOP);\n }\n\n if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {\n // known symbolic link. no need to stat again.\n return gotResolvedLink(cache[base]);\n }\n\n return fs.lstat(base, gotStat);\n }\n\n function gotStat(err, stat) {\n if (err) return cb(err);\n\n // if not a symlink, skip to the next path part\n if (!stat.isSymbolicLink()) {\n knownHard[base] = true;\n if (cache) cache[base] = base;\n return process.nextTick(LOOP);\n }\n\n // stat & read the link if not read before\n // call gotTarget as soon as the link target is known\n // dev/ino always return 0 on windows, so skip the check.\n if (!isWindows) {\n var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);\n if (seenLinks.hasOwnProperty(id)) {\n return gotTarget(null, seenLinks[id], base);\n }\n }\n fs.stat(base, function(err) {\n if (err) return cb(err);\n\n fs.readlink(base, function(err, target) {\n if (!isWindows) seenLinks[id] = target;\n gotTarget(err, target);\n });\n });\n }\n\n function gotTarget(err, target, base) {\n if (err) return cb(err);\n\n var resolvedLink = pathModule.resolve(previous, target);\n if (cache) cache[base] = resolvedLink;\n gotResolvedLink(resolvedLink);\n }\n\n function gotResolvedLink(resolvedLink) {\n // resolve the link, then start over\n p = pathModule.resolve(resolvedLink, p.slice(pos));\n start();\n }\n};\n","exports.setopts = setopts\nexports.ownProp = ownProp\nexports.makeAbs = makeAbs\nexports.finish = finish\nexports.mark = mark\nexports.isIgnored = isIgnored\nexports.childrenIgnored = childrenIgnored\n\nfunction ownProp (obj, field) {\n return Object.prototype.hasOwnProperty.call(obj, field)\n}\n\nvar fs = require(\"fs\")\nvar path = require(\"path\")\nvar minimatch = require(\"minimatch\")\nvar isAbsolute = require(\"path-is-absolute\")\nvar Minimatch = minimatch.Minimatch\n\nfunction alphasort (a, b) {\n return a.localeCompare(b, 'en')\n}\n\nfunction setupIgnores (self, options) {\n self.ignore = options.ignore || []\n\n if (!Array.isArray(self.ignore))\n self.ignore = [self.ignore]\n\n if (self.ignore.length) {\n self.ignore = self.ignore.map(ignoreMap)\n }\n}\n\n// ignore patterns are always in dot:true mode.\nfunction ignoreMap (pattern) {\n var gmatcher = null\n if (pattern.slice(-3) === '/**') {\n var gpattern = pattern.replace(/(\\/\\*\\*)+$/, '')\n gmatcher = new Minimatch(gpattern, { dot: true })\n }\n\n return {\n matcher: new Minimatch(pattern, { dot: true }),\n gmatcher: gmatcher\n }\n}\n\nfunction setopts (self, pattern, options) {\n if (!options)\n options = {}\n\n // base-matching: just use globstar for that.\n if (options.matchBase && -1 === pattern.indexOf(\"/\")) {\n if (options.noglobstar) {\n throw new Error(\"base matching requires globstar\")\n }\n pattern = \"**/\" + pattern\n }\n\n self.silent = !!options.silent\n self.pattern = pattern\n self.strict = options.strict !== false\n self.realpath = !!options.realpath\n self.realpathCache = options.realpathCache || Object.create(null)\n self.follow = !!options.follow\n self.dot = !!options.dot\n self.mark = !!options.mark\n self.nodir = !!options.nodir\n if (self.nodir)\n self.mark = true\n self.sync = !!options.sync\n self.nounique = !!options.nounique\n self.nonull = !!options.nonull\n self.nosort = !!options.nosort\n self.nocase = !!options.nocase\n self.stat = !!options.stat\n self.noprocess = !!options.noprocess\n self.absolute = !!options.absolute\n self.fs = options.fs || fs\n\n self.maxLength = options.maxLength || Infinity\n self.cache = options.cache || Object.create(null)\n self.statCache = options.statCache || Object.create(null)\n self.symlinks = options.symlinks || Object.create(null)\n\n setupIgnores(self, options)\n\n self.changedCwd = false\n var cwd = process.cwd()\n if (!ownProp(options, \"cwd\"))\n self.cwd = cwd\n else {\n self.cwd = path.resolve(options.cwd)\n self.changedCwd = self.cwd !== cwd\n }\n\n self.root = options.root || path.resolve(self.cwd, \"/\")\n self.root = path.resolve(self.root)\n if (process.platform === \"win32\")\n self.root = self.root.replace(/\\\\/g, \"/\")\n\n // TODO: is an absolute `cwd` supposed to be resolved against `root`?\n // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')\n self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)\n if (process.platform === \"win32\")\n self.cwdAbs = self.cwdAbs.replace(/\\\\/g, \"/\")\n self.nomount = !!options.nomount\n\n // disable comments and negation in Minimatch.\n // Note that they are not supported in Glob itself anyway.\n options.nonegate = true\n options.nocomment = true\n // always treat \\ in patterns as escapes, not path separators\n options.allowWindowsEscape = false\n\n self.minimatch = new Minimatch(pattern, options)\n self.options = self.minimatch.options\n}\n\nfunction finish (self) {\n var nou = self.nounique\n var all = nou ? [] : Object.create(null)\n\n for (var i = 0, l = self.matches.length; i < l; i ++) {\n var matches = self.matches[i]\n if (!matches || Object.keys(matches).length === 0) {\n if (self.nonull) {\n // do like the shell, and spit out the literal glob\n var literal = self.minimatch.globSet[i]\n if (nou)\n all.push(literal)\n else\n all[literal] = true\n }\n } else {\n // had matches\n var m = Object.keys(matches)\n if (nou)\n all.push.apply(all, m)\n else\n m.forEach(function (m) {\n all[m] = true\n })\n }\n }\n\n if (!nou)\n all = Object.keys(all)\n\n if (!self.nosort)\n all = all.sort(alphasort)\n\n // at *some* point we statted all of these\n if (self.mark) {\n for (var i = 0; i < all.length; i++) {\n all[i] = self._mark(all[i])\n }\n if (self.nodir) {\n all = all.filter(function (e) {\n var notDir = !(/\\/$/.test(e))\n var c = self.cache[e] || self.cache[makeAbs(self, e)]\n if (notDir && c)\n notDir = c !== 'DIR' && !Array.isArray(c)\n return notDir\n })\n }\n }\n\n if (self.ignore.length)\n all = all.filter(function(m) {\n return !isIgnored(self, m)\n })\n\n self.found = all\n}\n\nfunction mark (self, p) {\n var abs = makeAbs(self, p)\n var c = self.cache[abs]\n var m = p\n if (c) {\n var isDir = c === 'DIR' || Array.isArray(c)\n var slash = p.slice(-1) === '/'\n\n if (isDir && !slash)\n m += '/'\n else if (!isDir && slash)\n m = m.slice(0, -1)\n\n if (m !== p) {\n var mabs = makeAbs(self, m)\n self.statCache[mabs] = self.statCache[abs]\n self.cache[mabs] = self.cache[abs]\n }\n }\n\n return m\n}\n\n// lotta situps...\nfunction makeAbs (self, f) {\n var abs = f\n if (f.charAt(0) === '/') {\n abs = path.join(self.root, f)\n } else if (isAbsolute(f) || f === '') {\n abs = f\n } else if (self.changedCwd) {\n abs = path.resolve(self.cwd, f)\n } else {\n abs = path.resolve(f)\n }\n\n if (process.platform === 'win32')\n abs = abs.replace(/\\\\/g, '/')\n\n return abs\n}\n\n\n// Return true, if pattern ends with globstar '**', for the accompanying parent directory.\n// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents\nfunction isIgnored (self, path) {\n if (!self.ignore.length)\n return false\n\n return self.ignore.some(function(item) {\n return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))\n })\n}\n\nfunction childrenIgnored (self, path) {\n if (!self.ignore.length)\n return false\n\n return self.ignore.some(function(item) {\n return !!(item.gmatcher && item.gmatcher.match(path))\n })\n}\n","// Approach:\n//\n// 1. Get the minimatch set\n// 2. For each pattern in the set, PROCESS(pattern, false)\n// 3. Store matches per-set, then uniq them\n//\n// PROCESS(pattern, inGlobStar)\n// Get the first [n] items from pattern that are all strings\n// Join these together. This is PREFIX.\n// If there is no more remaining, then stat(PREFIX) and\n// add to matches if it succeeds. END.\n//\n// If inGlobStar and PREFIX is symlink and points to dir\n// set ENTRIES = []\n// else readdir(PREFIX) as ENTRIES\n// If fail, END\n//\n// with ENTRIES\n// If pattern[n] is GLOBSTAR\n// // handle the case where the globstar match is empty\n// // by pruning it out, and testing the resulting pattern\n// PROCESS(pattern[0..n] + pattern[n+1 .. $], false)\n// // handle other cases.\n// for ENTRY in ENTRIES (not dotfiles)\n// // attach globstar + tail onto the entry\n// // Mark that this entry is a globstar match\n// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)\n//\n// else // not globstar\n// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)\n// Test ENTRY against pattern[n]\n// If fails, continue\n// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])\n//\n// Caveat:\n// Cache all stats and readdirs results to minimize syscall. Since all\n// we ever care about is existence and directory-ness, we can just keep\n// `true` for files, and [children,...] for directories, or `false` for\n// things that don't exist.\n\nmodule.exports = glob\n\nvar rp = require('fs.realpath')\nvar minimatch = require('minimatch')\nvar Minimatch = minimatch.Minimatch\nvar inherits = require('inherits')\nvar EE = require('events').EventEmitter\nvar path = require('path')\nvar assert = require('assert')\nvar isAbsolute = require('path-is-absolute')\nvar globSync = require('./sync.js')\nvar common = require('./common.js')\nvar setopts = common.setopts\nvar ownProp = common.ownProp\nvar inflight = require('inflight')\nvar util = require('util')\nvar childrenIgnored = common.childrenIgnored\nvar isIgnored = common.isIgnored\n\nvar once = require('once')\n\nfunction glob (pattern, options, cb) {\n if (typeof options === 'function') cb = options, options = {}\n if (!options) options = {}\n\n if (options.sync) {\n if (cb)\n throw new TypeError('callback provided to sync glob')\n return globSync(pattern, options)\n }\n\n return new Glob(pattern, options, cb)\n}\n\nglob.sync = globSync\nvar GlobSync = glob.GlobSync = globSync.GlobSync\n\n// old api surface\nglob.glob = glob\n\nfunction extend (origin, add) {\n if (add === null || typeof add !== 'object') {\n return origin\n }\n\n var keys = Object.keys(add)\n var i = keys.length\n while (i--) {\n origin[keys[i]] = add[keys[i]]\n }\n return origin\n}\n\nglob.hasMagic = function (pattern, options_) {\n var options = extend({}, options_)\n options.noprocess = true\n\n var g = new Glob(pattern, options)\n var set = g.minimatch.set\n\n if (!pattern)\n return false\n\n if (set.length > 1)\n return true\n\n for (var j = 0; j < set[0].length; j++) {\n if (typeof set[0][j] !== 'string')\n return true\n }\n\n return false\n}\n\nglob.Glob = Glob\ninherits(Glob, EE)\nfunction Glob (pattern, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = null\n }\n\n if (options && options.sync) {\n if (cb)\n throw new TypeError('callback provided to sync glob')\n return new GlobSync(pattern, options)\n }\n\n if (!(this instanceof Glob))\n return new Glob(pattern, options, cb)\n\n setopts(this, pattern, options)\n this._didRealPath = false\n\n // process each pattern in the minimatch set\n var n = this.minimatch.set.length\n\n // The matches are stored as {: true,...} so that\n // duplicates are automagically pruned.\n // Later, we do an Object.keys() on these.\n // Keep them as a list so we can fill in when nonull is set.\n this.matches = new Array(n)\n\n if (typeof cb === 'function') {\n cb = once(cb)\n this.on('error', cb)\n this.on('end', function (matches) {\n cb(null, matches)\n })\n }\n\n var self = this\n this._processing = 0\n\n this._emitQueue = []\n this._processQueue = []\n this.paused = false\n\n if (this.noprocess)\n return this\n\n if (n === 0)\n return done()\n\n var sync = true\n for (var i = 0; i < n; i ++) {\n this._process(this.minimatch.set[i], i, false, done)\n }\n sync = false\n\n function done () {\n --self._processing\n if (self._processing <= 0) {\n if (sync) {\n process.nextTick(function () {\n self._finish()\n })\n } else {\n self._finish()\n }\n }\n }\n}\n\nGlob.prototype._finish = function () {\n assert(this instanceof Glob)\n if (this.aborted)\n return\n\n if (this.realpath && !this._didRealpath)\n return this._realpath()\n\n common.finish(this)\n this.emit('end', this.found)\n}\n\nGlob.prototype._realpath = function () {\n if (this._didRealpath)\n return\n\n this._didRealpath = true\n\n var n = this.matches.length\n if (n === 0)\n return this._finish()\n\n var self = this\n for (var i = 0; i < this.matches.length; i++)\n this._realpathSet(i, next)\n\n function next () {\n if (--n === 0)\n self._finish()\n }\n}\n\nGlob.prototype._realpathSet = function (index, cb) {\n var matchset = this.matches[index]\n if (!matchset)\n return cb()\n\n var found = Object.keys(matchset)\n var self = this\n var n = found.length\n\n if (n === 0)\n return cb()\n\n var set = this.matches[index] = Object.create(null)\n found.forEach(function (p, i) {\n // If there's a problem with the stat, then it means that\n // one or more of the links in the realpath couldn't be\n // resolved. just return the abs value in that case.\n p = self._makeAbs(p)\n rp.realpath(p, self.realpathCache, function (er, real) {\n if (!er)\n set[real] = true\n else if (er.syscall === 'stat')\n set[p] = true\n else\n self.emit('error', er) // srsly wtf right here\n\n if (--n === 0) {\n self.matches[index] = set\n cb()\n }\n })\n })\n}\n\nGlob.prototype._mark = function (p) {\n return common.mark(this, p)\n}\n\nGlob.prototype._makeAbs = function (f) {\n return common.makeAbs(this, f)\n}\n\nGlob.prototype.abort = function () {\n this.aborted = true\n this.emit('abort')\n}\n\nGlob.prototype.pause = function () {\n if (!this.paused) {\n this.paused = true\n this.emit('pause')\n }\n}\n\nGlob.prototype.resume = function () {\n if (this.paused) {\n this.emit('resume')\n this.paused = false\n if (this._emitQueue.length) {\n var eq = this._emitQueue.slice(0)\n this._emitQueue.length = 0\n for (var i = 0; i < eq.length; i ++) {\n var e = eq[i]\n this._emitMatch(e[0], e[1])\n }\n }\n if (this._processQueue.length) {\n var pq = this._processQueue.slice(0)\n this._processQueue.length = 0\n for (var i = 0; i < pq.length; i ++) {\n var p = pq[i]\n this._processing--\n this._process(p[0], p[1], p[2], p[3])\n }\n }\n }\n}\n\nGlob.prototype._process = function (pattern, index, inGlobStar, cb) {\n assert(this instanceof Glob)\n assert(typeof cb === 'function')\n\n if (this.aborted)\n return\n\n this._processing++\n if (this.paused) {\n this._processQueue.push([pattern, index, inGlobStar, cb])\n return\n }\n\n //console.error('PROCESS %d', this._processing, pattern)\n\n // Get the first [n] parts of pattern that are all strings.\n var n = 0\n while (typeof pattern[n] === 'string') {\n n ++\n }\n // now n is the index of the first one that is *not* a string.\n\n // see if there's anything else\n var prefix\n switch (n) {\n // if not, then this is rather simple\n case pattern.length:\n this._processSimple(pattern.join('/'), index, cb)\n return\n\n case 0:\n // pattern *starts* with some non-trivial item.\n // going to readdir(cwd), but not include the prefix in matches.\n prefix = null\n break\n\n default:\n // pattern has some string bits in the front.\n // whatever it starts with, whether that's 'absolute' like /foo/bar,\n // or 'relative' like '../baz'\n prefix = pattern.slice(0, n).join('/')\n break\n }\n\n var remain = pattern.slice(n)\n\n // get the list of entries.\n var read\n if (prefix === null)\n read = '.'\n else if (isAbsolute(prefix) ||\n isAbsolute(pattern.map(function (p) {\n return typeof p === 'string' ? p : '[*]'\n }).join('/'))) {\n if (!prefix || !isAbsolute(prefix))\n prefix = '/' + prefix\n read = prefix\n } else\n read = prefix\n\n var abs = this._makeAbs(read)\n\n //if ignored, skip _processing\n if (childrenIgnored(this, read))\n return cb()\n\n var isGlobStar = remain[0] === minimatch.GLOBSTAR\n if (isGlobStar)\n this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)\n else\n this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)\n}\n\nGlob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {\n var self = this\n this._readdir(abs, inGlobStar, function (er, entries) {\n return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)\n })\n}\n\nGlob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {\n\n // if the abs isn't a dir, then nothing can match!\n if (!entries)\n return cb()\n\n // It will only match dot entries if it starts with a dot, or if\n // dot is set. Stuff like @(.foo|.bar) isn't allowed.\n var pn = remain[0]\n var negate = !!this.minimatch.negate\n var rawGlob = pn._glob\n var dotOk = this.dot || rawGlob.charAt(0) === '.'\n\n var matchedEntries = []\n for (var i = 0; i < entries.length; i++) {\n var e = entries[i]\n if (e.charAt(0) !== '.' || dotOk) {\n var m\n if (negate && !prefix) {\n m = !e.match(pn)\n } else {\n m = e.match(pn)\n }\n if (m)\n matchedEntries.push(e)\n }\n }\n\n //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)\n\n var len = matchedEntries.length\n // If there are no matched entries, then nothing matches.\n if (len === 0)\n return cb()\n\n // if this is the last remaining pattern bit, then no need for\n // an additional stat *unless* the user has specified mark or\n // stat explicitly. We know they exist, since readdir returned\n // them.\n\n if (remain.length === 1 && !this.mark && !this.stat) {\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n if (prefix) {\n if (prefix !== '/')\n e = prefix + '/' + e\n else\n e = prefix + e\n }\n\n if (e.charAt(0) === '/' && !this.nomount) {\n e = path.join(this.root, e)\n }\n this._emitMatch(index, e)\n }\n // This was the last one, and no stats were needed\n return cb()\n }\n\n // now test all matched entries as stand-ins for that part\n // of the pattern.\n remain.shift()\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n var newPattern\n if (prefix) {\n if (prefix !== '/')\n e = prefix + '/' + e\n else\n e = prefix + e\n }\n this._process([e].concat(remain), index, inGlobStar, cb)\n }\n cb()\n}\n\nGlob.prototype._emitMatch = function (index, e) {\n if (this.aborted)\n return\n\n if (isIgnored(this, e))\n return\n\n if (this.paused) {\n this._emitQueue.push([index, e])\n return\n }\n\n var abs = isAbsolute(e) ? e : this._makeAbs(e)\n\n if (this.mark)\n e = this._mark(e)\n\n if (this.absolute)\n e = abs\n\n if (this.matches[index][e])\n return\n\n if (this.nodir) {\n var c = this.cache[abs]\n if (c === 'DIR' || Array.isArray(c))\n return\n }\n\n this.matches[index][e] = true\n\n var st = this.statCache[abs]\n if (st)\n this.emit('stat', e, st)\n\n this.emit('match', e)\n}\n\nGlob.prototype._readdirInGlobStar = function (abs, cb) {\n if (this.aborted)\n return\n\n // follow all symlinked directories forever\n // just proceed as if this is a non-globstar situation\n if (this.follow)\n return this._readdir(abs, false, cb)\n\n var lstatkey = 'lstat\\0' + abs\n var self = this\n var lstatcb = inflight(lstatkey, lstatcb_)\n\n if (lstatcb)\n self.fs.lstat(abs, lstatcb)\n\n function lstatcb_ (er, lstat) {\n if (er && er.code === 'ENOENT')\n return cb()\n\n var isSym = lstat && lstat.isSymbolicLink()\n self.symlinks[abs] = isSym\n\n // If it's not a symlink or a dir, then it's definitely a regular file.\n // don't bother doing a readdir in that case.\n if (!isSym && lstat && !lstat.isDirectory()) {\n self.cache[abs] = 'FILE'\n cb()\n } else\n self._readdir(abs, false, cb)\n }\n}\n\nGlob.prototype._readdir = function (abs, inGlobStar, cb) {\n if (this.aborted)\n return\n\n cb = inflight('readdir\\0'+abs+'\\0'+inGlobStar, cb)\n if (!cb)\n return\n\n //console.error('RD %j %j', +inGlobStar, abs)\n if (inGlobStar && !ownProp(this.symlinks, abs))\n return this._readdirInGlobStar(abs, cb)\n\n if (ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n if (!c || c === 'FILE')\n return cb()\n\n if (Array.isArray(c))\n return cb(null, c)\n }\n\n var self = this\n self.fs.readdir(abs, readdirCb(this, abs, cb))\n}\n\nfunction readdirCb (self, abs, cb) {\n return function (er, entries) {\n if (er)\n self._readdirError(abs, er, cb)\n else\n self._readdirEntries(abs, entries, cb)\n }\n}\n\nGlob.prototype._readdirEntries = function (abs, entries, cb) {\n if (this.aborted)\n return\n\n // if we haven't asked to stat everything, then just\n // assume that everything in there exists, so we can avoid\n // having to stat it a second time.\n if (!this.mark && !this.stat) {\n for (var i = 0; i < entries.length; i ++) {\n var e = entries[i]\n if (abs === '/')\n e = abs + e\n else\n e = abs + '/' + e\n this.cache[e] = true\n }\n }\n\n this.cache[abs] = entries\n return cb(null, entries)\n}\n\nGlob.prototype._readdirError = function (f, er, cb) {\n if (this.aborted)\n return\n\n // handle errors, and cache the information\n switch (er.code) {\n case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205\n case 'ENOTDIR': // totally normal. means it *does* exist.\n var abs = this._makeAbs(f)\n this.cache[abs] = 'FILE'\n if (abs === this.cwdAbs) {\n var error = new Error(er.code + ' invalid cwd ' + this.cwd)\n error.path = this.cwd\n error.code = er.code\n this.emit('error', error)\n this.abort()\n }\n break\n\n case 'ENOENT': // not terribly unusual\n case 'ELOOP':\n case 'ENAMETOOLONG':\n case 'UNKNOWN':\n this.cache[this._makeAbs(f)] = false\n break\n\n default: // some unusual error. Treat as failure.\n this.cache[this._makeAbs(f)] = false\n if (this.strict) {\n this.emit('error', er)\n // If the error is handled, then we abort\n // if not, we threw out of here\n this.abort()\n }\n if (!this.silent)\n console.error('glob error', er)\n break\n }\n\n return cb()\n}\n\nGlob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {\n var self = this\n this._readdir(abs, inGlobStar, function (er, entries) {\n self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)\n })\n}\n\n\nGlob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {\n //console.error('pgs2', prefix, remain[0], entries)\n\n // no entries means not a dir, so it can never have matches\n // foo.txt/** doesn't match foo.txt\n if (!entries)\n return cb()\n\n // test without the globstar, and with every child both below\n // and replacing the globstar.\n var remainWithoutGlobStar = remain.slice(1)\n var gspref = prefix ? [ prefix ] : []\n var noGlobStar = gspref.concat(remainWithoutGlobStar)\n\n // the noGlobStar pattern exits the inGlobStar state\n this._process(noGlobStar, index, false, cb)\n\n var isSym = this.symlinks[abs]\n var len = entries.length\n\n // If it's a symlink, and we're in a globstar, then stop\n if (isSym && inGlobStar)\n return cb()\n\n for (var i = 0; i < len; i++) {\n var e = entries[i]\n if (e.charAt(0) === '.' && !this.dot)\n continue\n\n // these two cases enter the inGlobStar state\n var instead = gspref.concat(entries[i], remainWithoutGlobStar)\n this._process(instead, index, true, cb)\n\n var below = gspref.concat(entries[i], remain)\n this._process(below, index, true, cb)\n }\n\n cb()\n}\n\nGlob.prototype._processSimple = function (prefix, index, cb) {\n // XXX review this. Shouldn't it be doing the mounting etc\n // before doing stat? kinda weird?\n var self = this\n this._stat(prefix, function (er, exists) {\n self._processSimple2(prefix, index, er, exists, cb)\n })\n}\nGlob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {\n\n //console.error('ps2', prefix, exists)\n\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n // If it doesn't exist, then just mark the lack of results\n if (!exists)\n return cb()\n\n if (prefix && isAbsolute(prefix) && !this.nomount) {\n var trail = /[\\/\\\\]$/.test(prefix)\n if (prefix.charAt(0) === '/') {\n prefix = path.join(this.root, prefix)\n } else {\n prefix = path.resolve(this.root, prefix)\n if (trail)\n prefix += '/'\n }\n }\n\n if (process.platform === 'win32')\n prefix = prefix.replace(/\\\\/g, '/')\n\n // Mark this as a match\n this._emitMatch(index, prefix)\n cb()\n}\n\n// Returns either 'DIR', 'FILE', or false\nGlob.prototype._stat = function (f, cb) {\n var abs = this._makeAbs(f)\n var needDir = f.slice(-1) === '/'\n\n if (f.length > this.maxLength)\n return cb()\n\n if (!this.stat && ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n\n if (Array.isArray(c))\n c = 'DIR'\n\n // It exists, but maybe not how we need it\n if (!needDir || c === 'DIR')\n return cb(null, c)\n\n if (needDir && c === 'FILE')\n return cb()\n\n // otherwise we have to stat, because maybe c=true\n // if we know it exists, but not what it is.\n }\n\n var exists\n var stat = this.statCache[abs]\n if (stat !== undefined) {\n if (stat === false)\n return cb(null, stat)\n else {\n var type = stat.isDirectory() ? 'DIR' : 'FILE'\n if (needDir && type === 'FILE')\n return cb()\n else\n return cb(null, type, stat)\n }\n }\n\n var self = this\n var statcb = inflight('stat\\0' + abs, lstatcb_)\n if (statcb)\n self.fs.lstat(abs, statcb)\n\n function lstatcb_ (er, lstat) {\n if (lstat && lstat.isSymbolicLink()) {\n // If it's a symlink, then treat it as the target, unless\n // the target does not exist, then treat it as a file.\n return self.fs.stat(abs, function (er, stat) {\n if (er)\n self._stat2(f, abs, null, lstat, cb)\n else\n self._stat2(f, abs, er, stat, cb)\n })\n } else {\n self._stat2(f, abs, er, lstat, cb)\n }\n }\n}\n\nGlob.prototype._stat2 = function (f, abs, er, stat, cb) {\n if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {\n this.statCache[abs] = false\n return cb()\n }\n\n var needDir = f.slice(-1) === '/'\n this.statCache[abs] = stat\n\n if (abs.slice(-1) === '/' && stat && !stat.isDirectory())\n return cb(null, false, stat)\n\n var c = true\n if (stat)\n c = stat.isDirectory() ? 'DIR' : 'FILE'\n this.cache[abs] = this.cache[abs] || c\n\n if (needDir && c === 'FILE')\n return cb()\n\n return cb(null, c, stat)\n}\n","var concatMap = require('concat-map');\nvar balanced = require('balanced-match');\n\nmodule.exports = expandTop;\n\nvar escSlash = '\\0SLASH'+Math.random()+'\\0';\nvar escOpen = '\\0OPEN'+Math.random()+'\\0';\nvar escClose = '\\0CLOSE'+Math.random()+'\\0';\nvar escComma = '\\0COMMA'+Math.random()+'\\0';\nvar escPeriod = '\\0PERIOD'+Math.random()+'\\0';\n\nfunction numeric(str) {\n return parseInt(str, 10) == str\n ? parseInt(str, 10)\n : str.charCodeAt(0);\n}\n\nfunction escapeBraces(str) {\n return str.split('\\\\\\\\').join(escSlash)\n .split('\\\\{').join(escOpen)\n .split('\\\\}').join(escClose)\n .split('\\\\,').join(escComma)\n .split('\\\\.').join(escPeriod);\n}\n\nfunction unescapeBraces(str) {\n return str.split(escSlash).join('\\\\')\n .split(escOpen).join('{')\n .split(escClose).join('}')\n .split(escComma).join(',')\n .split(escPeriod).join('.');\n}\n\n\n// Basically just str.split(\",\"), but handling cases\n// where we have nested braced sections, which should be\n// treated as individual members, like {a,{b,c},d}\nfunction parseCommaParts(str) {\n if (!str)\n return [''];\n\n var parts = [];\n var m = balanced('{', '}', str);\n\n if (!m)\n return str.split(',');\n\n var pre = m.pre;\n var body = m.body;\n var post = m.post;\n var p = pre.split(',');\n\n p[p.length-1] += '{' + body + '}';\n var postParts = parseCommaParts(post);\n if (post.length) {\n p[p.length-1] += postParts.shift();\n p.push.apply(p, postParts);\n }\n\n parts.push.apply(parts, p);\n\n return parts;\n}\n\nfunction expandTop(str, options) {\n if (!str)\n return [];\n\n options = options || {};\n var max = options.max == null ? Infinity : options.max;\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.substr(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.substr(2);\n }\n\n return expand(escapeBraces(str), max, true).map(unescapeBraces);\n}\n\nfunction identity(e) {\n return e;\n}\n\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\n\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\n\nfunction expand(str, max, isTop) {\n var expansions = [];\n\n var m = balanced('{', '}', str);\n if (!m || /\\$$/.test(m.pre)) return [str];\n\n var isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n var isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\n var isSequence = isNumericSequence || isAlphaSequence;\n var isOptions = m.body.indexOf(',') >= 0;\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,(?!,).*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post;\n return expand(str, max, true);\n }\n return [str];\n }\n\n var n;\n if (isSequence) {\n n = m.body.split(/\\.\\./);\n } else {\n n = parseCommaParts(m.body);\n if (n.length === 1) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand(n[0], max, false).map(embrace);\n if (n.length === 1) {\n var post = m.post.length\n ? expand(m.post, max, false)\n : [''];\n return post.map(function(p) {\n return m.pre + n[0] + p;\n });\n }\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n var pre = m.pre;\n var post = m.post.length\n ? expand(m.post, max, false)\n : [''];\n\n var N;\n\n if (isSequence) {\n var x = numeric(n[0]);\n var y = numeric(n[1]);\n var width = Math.max(n[0].length, n[1].length)\n var incr = n.length == 3\n ? Math.max(Math.abs(numeric(n[2])), 1)\n : 1;\n var test = lte;\n var reverse = y < x;\n if (reverse) {\n incr *= -1;\n test = gte;\n }\n var pad = n.some(isPadded);\n\n N = [];\n\n for (var i = x; test(i, y); i += incr) {\n var c;\n if (isAlphaSequence) {\n c = String.fromCharCode(i);\n if (c === '\\\\')\n c = '';\n } else {\n c = String(i);\n if (pad) {\n var need = width - c.length;\n if (need > 0) {\n var z = new Array(need + 1).join('0');\n if (i < 0)\n c = '-' + z + c.slice(1);\n else\n c = z + c;\n }\n }\n }\n N.push(c);\n }\n } else {\n N = concatMap(n, function(el) { return expand(el, max, false) });\n }\n\n for (var j = 0; j < N.length; j++) {\n for (var k = 0; k < post.length && expansions.length < max; k++) {\n var expansion = pre + N[j] + post[k];\n if (!isTop || isSequence || expansion)\n expansions.push(expansion);\n }\n }\n\n return expansions;\n}\n","module.exports = minimatch\nminimatch.Minimatch = Minimatch\n\nvar path = (function () { try { return require('path') } catch (e) {}}()) || {\n sep: '/'\n}\nminimatch.sep = path.sep\n\nvar GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}\nvar expand = require('brace-expansion')\n\nvar plTypes = {\n '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},\n '?': { open: '(?:', close: ')?' },\n '+': { open: '(?:', close: ')+' },\n '*': { open: '(?:', close: ')*' },\n '@': { open: '(?:', close: ')' }\n}\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nvar qmark = '[^/]'\n\n// * => any number of characters\nvar star = qmark + '*?'\n\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nvar twoStarDot = '(?:(?!(?:\\\\\\/|^)(?:\\\\.{1,2})($|\\\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nvar twoStarNoDot = '(?:(?!(?:\\\\\\/|^)\\\\.).)*?'\n\n// characters that need to be escaped in RegExp.\nvar reSpecials = charSet('().*{}+?[]^$\\\\!')\n\n// \"abc\" -> { a:true, b:true, c:true }\nfunction charSet (s) {\n return s.split('').reduce(function (set, c) {\n set[c] = true\n return set\n }, {})\n}\n\n// normalizes slashes.\nvar slashSplit = /\\/+/\n\nminimatch.filter = filter\nfunction filter (pattern, options) {\n options = options || {}\n return function (p, i, list) {\n return minimatch(p, pattern, options)\n }\n}\n\nfunction ext (a, b) {\n b = b || {}\n var t = {}\n Object.keys(a).forEach(function (k) {\n t[k] = a[k]\n })\n Object.keys(b).forEach(function (k) {\n t[k] = b[k]\n })\n return t\n}\n\nminimatch.defaults = function (def) {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch\n }\n\n var orig = minimatch\n\n var m = function minimatch (p, pattern, options) {\n return orig(p, pattern, ext(def, options))\n }\n\n m.Minimatch = function Minimatch (pattern, options) {\n return new orig.Minimatch(pattern, ext(def, options))\n }\n m.Minimatch.defaults = function defaults (options) {\n return orig.defaults(ext(def, options)).Minimatch\n }\n\n m.filter = function filter (pattern, options) {\n return orig.filter(pattern, ext(def, options))\n }\n\n m.defaults = function defaults (options) {\n return orig.defaults(ext(def, options))\n }\n\n m.makeRe = function makeRe (pattern, options) {\n return orig.makeRe(pattern, ext(def, options))\n }\n\n m.braceExpand = function braceExpand (pattern, options) {\n return orig.braceExpand(pattern, ext(def, options))\n }\n\n m.match = function (list, pattern, options) {\n return orig.match(list, pattern, ext(def, options))\n }\n\n return m\n}\n\nMinimatch.defaults = function (def) {\n return minimatch.defaults(def).Minimatch\n}\n\nfunction minimatch (p, pattern, options) {\n assertValidPattern(pattern)\n\n if (!options) options = {}\n\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false\n }\n\n return new Minimatch(pattern, options).match(p)\n}\n\nfunction Minimatch (pattern, options) {\n if (!(this instanceof Minimatch)) {\n return new Minimatch(pattern, options)\n }\n\n assertValidPattern(pattern)\n\n if (!options) options = {}\n\n pattern = pattern.trim()\n\n // windows support: need to use /, not \\\n if (!options.allowWindowsEscape && path.sep !== '/') {\n pattern = pattern.split(path.sep).join('/')\n }\n\n this.options = options\n this.maxGlobstarRecursion = options.maxGlobstarRecursion !== undefined\n ? options.maxGlobstarRecursion : 200\n this.set = []\n this.pattern = pattern\n this.regexp = null\n this.negate = false\n this.comment = false\n this.empty = false\n this.partial = !!options.partial\n\n // make the set of regexps etc.\n this.make()\n}\n\nMinimatch.prototype.debug = function () {}\n\nMinimatch.prototype.make = make\nfunction make () {\n var pattern = this.pattern\n var options = this.options\n\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true\n return\n }\n if (!pattern) {\n this.empty = true\n return\n }\n\n // step 1: figure out negation, etc.\n this.parseNegate()\n\n // step 2: expand braces\n var set = this.globSet = this.braceExpand()\n\n if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }\n\n this.debug(this.pattern, set)\n\n // step 3: now we have a set, so turn each one into a series of path-portion\n // matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n set = this.globParts = set.map(function (s) {\n return s.split(slashSplit)\n })\n\n this.debug(this.pattern, set)\n\n // glob --> regexps\n set = set.map(function (s, si, set) {\n return s.map(this.parse, this)\n }, this)\n\n this.debug(this.pattern, set)\n\n // filter out everything that didn't compile properly.\n set = set.filter(function (s) {\n return s.indexOf(false) === -1\n })\n\n this.debug(this.pattern, set)\n\n this.set = set\n}\n\nMinimatch.prototype.parseNegate = parseNegate\nfunction parseNegate () {\n var pattern = this.pattern\n var negate = false\n var options = this.options\n var negateOffset = 0\n\n if (options.nonegate) return\n\n for (var i = 0, l = pattern.length\n ; i < l && pattern.charAt(i) === '!'\n ; i++) {\n negate = !negate\n negateOffset++\n }\n\n if (negateOffset) this.pattern = pattern.substr(negateOffset)\n this.negate = negate\n}\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nminimatch.braceExpand = function (pattern, options) {\n return braceExpand(pattern, options)\n}\n\nMinimatch.prototype.braceExpand = braceExpand\n\nfunction braceExpand (pattern, options) {\n if (!options) {\n if (this instanceof Minimatch) {\n options = this.options\n } else {\n options = {}\n }\n }\n\n pattern = typeof pattern === 'undefined'\n ? this.pattern : pattern\n\n assertValidPattern(pattern)\n\n // Thanks to Yeting Li for\n // improving this regexp to avoid a ReDOS vulnerability.\n if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n // shortcut. no need to expand.\n return [pattern]\n }\n\n return expand(pattern)\n}\n\nvar MAX_PATTERN_LENGTH = 1024 * 64\nvar assertValidPattern = function (pattern) {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\nMinimatch.prototype.parse = parse\nvar SUBPARSE = {}\nfunction parse (pattern, isSub) {\n assertValidPattern(pattern)\n\n var options = this.options\n\n // shortcuts\n if (pattern === '**') {\n if (!options.noglobstar)\n return GLOBSTAR\n else\n pattern = '*'\n }\n if (pattern === '') return ''\n\n var re = ''\n var hasMagic = !!options.nocase\n var escaping = false\n // ? => one single character\n var patternListStack = []\n var negativeLists = []\n var stateChar\n var inClass = false\n var reClassStart = -1\n var classStart = -1\n // . and .. never match anything that doesn't start with .,\n // even when options.dot is set.\n var patternStart = pattern.charAt(0) === '.' ? '' // anything\n // not (start or / followed by . or .. followed by / or end)\n : options.dot ? '(?!(?:^|\\\\\\/)\\\\.{1,2}(?:$|\\\\\\/))'\n : '(?!\\\\.)'\n var self = this\n\n function clearStateChar () {\n if (stateChar) {\n // we had some state-tracking character\n // that wasn't consumed by this pass.\n switch (stateChar) {\n case '*':\n re += star\n hasMagic = true\n break\n case '?':\n re += qmark\n hasMagic = true\n break\n default:\n re += '\\\\' + stateChar\n break\n }\n self.debug('clearStateChar %j %j', stateChar, re)\n stateChar = false\n }\n }\n\n for (var i = 0, len = pattern.length, c\n ; (i < len) && (c = pattern.charAt(i))\n ; i++) {\n this.debug('%s\\t%s %s %j', pattern, i, re, c)\n\n // skip over any that are escaped.\n if (escaping && reSpecials[c]) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n switch (c) {\n /* istanbul ignore next */\n case '/': {\n // completely not allowed, even escaped.\n // Should already be path-split by now.\n return false\n }\n\n case '\\\\':\n clearStateChar()\n escaping = true\n continue\n\n // the various stateChar values\n // for the \"extglob\" stuff.\n case '?':\n case '*':\n case '+':\n case '@':\n case '!':\n this.debug('%s\\t%s %s %j <-- stateChar', pattern, i, re, c)\n\n // all of those are literals inside a class, except that\n // the glob [!a] means [^a] in regexp\n if (inClass) {\n this.debug(' in class')\n if (c === '!' && i === classStart + 1) c = '^'\n re += c\n continue\n }\n\n // coalesce consecutive non-globstar * characters\n if (c === '*' && stateChar === '*') continue\n\n // if we already have a stateChar, then it means\n // that there was something like ** or +? in there.\n // Handle the stateChar, then proceed with this one.\n self.debug('call clearStateChar %j', stateChar)\n clearStateChar()\n stateChar = c\n // if extglob is disabled, then +(asdf|foo) isn't a thing.\n // just clear the statechar *now*, rather than even diving into\n // the patternList stuff.\n if (options.noext) clearStateChar()\n continue\n\n case '(':\n if (inClass) {\n re += '('\n continue\n }\n\n if (!stateChar) {\n re += '\\\\('\n continue\n }\n\n patternListStack.push({\n type: stateChar,\n start: i - 1,\n reStart: re.length,\n open: plTypes[stateChar].open,\n close: plTypes[stateChar].close\n })\n // negation is (?:(?!js)[^/]*)\n re += stateChar === '!' ? '(?:(?!(?:' : '(?:'\n this.debug('plType %j %j', stateChar, re)\n stateChar = false\n continue\n\n case ')':\n if (inClass || !patternListStack.length) {\n re += '\\\\)'\n continue\n }\n\n clearStateChar()\n hasMagic = true\n var pl = patternListStack.pop()\n // negation is (?:(?!js)[^/]*)\n // The others are (?:)\n re += pl.close\n if (pl.type === '!') {\n negativeLists.push(pl)\n }\n pl.reEnd = re.length\n continue\n\n case '|':\n if (inClass || !patternListStack.length || escaping) {\n re += '\\\\|'\n escaping = false\n continue\n }\n\n clearStateChar()\n re += '|'\n continue\n\n // these are mostly the same in regexp and glob\n case '[':\n // swallow any state-tracking char before the [\n clearStateChar()\n\n if (inClass) {\n re += '\\\\' + c\n continue\n }\n\n inClass = true\n classStart = i\n reClassStart = re.length\n re += c\n continue\n\n case ']':\n // a right bracket shall lose its special\n // meaning and represent itself in\n // a bracket expression if it occurs\n // first in the list. -- POSIX.2 2.8.3.2\n if (i === classStart + 1 || !inClass) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n // handle the case where we left a class open.\n // \"[z-a]\" is valid, equivalent to \"\\[z-a\\]\"\n // split where the last [ was, make sure we don't have\n // an invalid re. if so, re-walk the contents of the\n // would-be class to re-translate any characters that\n // were passed through as-is\n // TODO: It would probably be faster to determine this\n // without a try/catch and a new RegExp, but it's tricky\n // to do safely. For now, this is safe and works.\n var cs = pattern.substring(classStart + 1, i)\n try {\n RegExp('[' + cs + ']')\n } catch (er) {\n // not a valid class!\n var sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0] + '\\\\]'\n hasMagic = hasMagic || sp[1]\n inClass = false\n continue\n }\n\n // finish up the class.\n hasMagic = true\n inClass = false\n re += c\n continue\n\n default:\n // swallow any state char that wasn't consumed\n clearStateChar()\n\n if (escaping) {\n // no need\n escaping = false\n } else if (reSpecials[c]\n && !(c === '^' && inClass)) {\n re += '\\\\'\n }\n\n re += c\n\n } // switch\n } // for\n\n // handle the case where we left a class open.\n // \"[abc\" is valid, equivalent to \"\\[abc\"\n if (inClass) {\n // split where the last [ was, and escape it\n // this is a huge pita. We now have to re-walk\n // the contents of the would-be class to re-translate\n // any characters that were passed through as-is\n cs = pattern.substr(classStart + 1)\n sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0]\n hasMagic = hasMagic || sp[1]\n }\n\n // handle the case where we had a +( thing at the *end*\n // of the pattern.\n // each pattern list stack adds 3 chars, and we need to go through\n // and escape any | chars that were passed through as-is for the regexp.\n // Go through and escape them, taking care not to double-escape any\n // | chars that were already escaped.\n for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {\n var tail = re.slice(pl.reStart + pl.open.length)\n this.debug('setting tail', re, pl)\n // maybe some even number of \\, then maybe 1 \\, followed by a |\n tail = tail.replace(/((?:\\\\{2}){0,64})(\\\\?)\\|/g, function (_, $1, $2) {\n if (!$2) {\n // the | isn't already escaped, so escape it.\n $2 = '\\\\'\n }\n\n // need to escape all those slashes *again*, without escaping the\n // one that we need for escaping the | character. As it works out,\n // escaping an even number of slashes can be done by simply repeating\n // it exactly after itself. That's why this trick works.\n //\n // I am sorry that you have to see this.\n return $1 + $1 + $2 + '|'\n })\n\n this.debug('tail=%j\\n %s', tail, tail, pl, re)\n var t = pl.type === '*' ? star\n : pl.type === '?' ? qmark\n : '\\\\' + pl.type\n\n hasMagic = true\n re = re.slice(0, pl.reStart) + t + '\\\\(' + tail\n }\n\n // handle trailing things that only matter at the very end.\n clearStateChar()\n if (escaping) {\n // trailing \\\\\n re += '\\\\\\\\'\n }\n\n // only need to apply the nodot start if the re starts with\n // something that could conceivably capture a dot\n var addPatternStart = false\n switch (re.charAt(0)) {\n case '[': case '.': case '(': addPatternStart = true\n }\n\n // Hack to work around lack of negative lookbehind in JS\n // A pattern like: *.!(x).!(y|z) needs to ensure that a name\n // like 'a.xyz.yz' doesn't match. So, the first negative\n // lookahead, has to look ALL the way ahead, to the end of\n // the pattern.\n for (var n = negativeLists.length - 1; n > -1; n--) {\n var nl = negativeLists[n]\n\n var nlBefore = re.slice(0, nl.reStart)\n var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)\n var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)\n var nlAfter = re.slice(nl.reEnd)\n\n nlLast += nlAfter\n\n // Handle nested stuff like *(*.js|!(*.json)), where open parens\n // mean that we should *not* include the ) in the bit that is considered\n // \"after\" the negated section.\n var openParensBefore = nlBefore.split('(').length - 1\n var cleanAfter = nlAfter\n for (i = 0; i < openParensBefore; i++) {\n cleanAfter = cleanAfter.replace(/\\)[+*?]?/, '')\n }\n nlAfter = cleanAfter\n\n var dollar = ''\n if (nlAfter === '' && isSub !== SUBPARSE) {\n dollar = '$'\n }\n var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast\n re = newRe\n }\n\n // if the re is not \"\" at this point, then we need to make sure\n // it doesn't match against an empty path part.\n // Otherwise a/* will match a/, which it should not.\n if (re !== '' && hasMagic) {\n re = '(?=.)' + re\n }\n\n if (addPatternStart) {\n re = patternStart + re\n }\n\n // parsing just a piece of a larger pattern.\n if (isSub === SUBPARSE) {\n return [re, hasMagic]\n }\n\n // skip the regexp for non-magical patterns\n // unescape anything in it, though, so that it'll be\n // an exact match against a file etc.\n if (!hasMagic) {\n return globUnescape(pattern)\n }\n\n var flags = options.nocase ? 'i' : ''\n try {\n var regExp = new RegExp('^' + re + '$', flags)\n } catch (er) /* istanbul ignore next - should be impossible */ {\n // If it was an invalid regular expression, then it can't match\n // anything. This trick looks for a character after the end of\n // the string, which is of course impossible, except in multi-line\n // mode, but it's not a /m regex.\n return new RegExp('$.')\n }\n\n regExp._glob = pattern\n regExp._src = re\n\n return regExp\n}\n\nminimatch.makeRe = function (pattern, options) {\n return new Minimatch(pattern, options || {}).makeRe()\n}\n\nMinimatch.prototype.makeRe = makeRe\nfunction makeRe () {\n if (this.regexp || this.regexp === false) return this.regexp\n\n // at this point, this.set is a 2d array of partial\n // pattern strings, or \"**\".\n //\n // It's better to use .match(). This function shouldn't\n // be used, really, but it's pretty convenient sometimes,\n // when you just want to work with a regex.\n var set = this.set\n\n if (!set.length) {\n this.regexp = false\n return this.regexp\n }\n var options = this.options\n\n var twoStar = options.noglobstar ? star\n : options.dot ? twoStarDot\n : twoStarNoDot\n var flags = options.nocase ? 'i' : ''\n\n var re = set.map(function (pattern) {\n return pattern.map(function (p) {\n return (p === GLOBSTAR) ? twoStar\n : (typeof p === 'string') ? regExpEscape(p)\n : p._src\n }).join('\\\\\\/')\n }).join('|')\n\n // must match entire pattern\n // ending in a * or ** will make it less strict.\n re = '^(?:' + re + ')$'\n\n // can match anything, as long as it's not this.\n if (this.negate) re = '^(?!' + re + ').*$'\n\n try {\n this.regexp = new RegExp(re, flags)\n } catch (ex) /* istanbul ignore next - should be impossible */ {\n this.regexp = false\n }\n return this.regexp\n}\n\nminimatch.match = function (list, pattern, options) {\n options = options || {}\n var mm = new Minimatch(pattern, options)\n list = list.filter(function (f) {\n return mm.match(f)\n })\n if (mm.options.nonull && !list.length) {\n list.push(pattern)\n }\n return list\n}\n\nMinimatch.prototype.match = function match (f, partial) {\n if (typeof partial === 'undefined') partial = this.partial\n this.debug('match', f, this.pattern)\n // short-circuit in the case of busted things.\n // comments, etc.\n if (this.comment) return false\n if (this.empty) return f === ''\n\n if (f === '/' && partial) return true\n\n var options = this.options\n\n // windows: need to use /, not \\\n if (path.sep !== '/') {\n f = f.split(path.sep).join('/')\n }\n\n // treat the test path as a set of pathparts.\n f = f.split(slashSplit)\n this.debug(this.pattern, 'split', f)\n\n // just ONE of the pattern sets in this.set needs to match\n // in order for it to be valid. If negating, then just one\n // match means that we have failed.\n // Either way, return on the first hit.\n\n var set = this.set\n this.debug(this.pattern, 'set', set)\n\n // Find the basename of the path by looking for the last non-empty segment\n var filename\n var i\n for (i = f.length - 1; i >= 0; i--) {\n filename = f[i]\n if (filename) break\n }\n\n for (i = 0; i < set.length; i++) {\n var pattern = set[i]\n var file = f\n if (options.matchBase && pattern.length === 1) {\n file = [filename]\n }\n var hit = this.matchOne(file, pattern, partial)\n if (hit) {\n if (options.flipNegate) return true\n return !this.negate\n }\n }\n\n // didn't get any hits. this is success if it's a negative\n // pattern, failure otherwise.\n if (options.flipNegate) return false\n return this.negate\n}\n\n// set partial to true to test if, for example,\n// \"/a/b\" matches the start of \"/*/b/*/d\"\n// Partial means, if you run out of file before you run\n// out of pattern, then that's fine, as long as all\n// the parts match.\nMinimatch.prototype.matchOne = function (file, pattern, partial) {\n if (pattern.indexOf(GLOBSTAR) !== -1) {\n return this._matchGlobstar(file, pattern, partial, 0, 0)\n }\n return this._matchOne(file, pattern, partial, 0, 0)\n}\n\nMinimatch.prototype._matchGlobstar = function (file, pattern, partial, fileIndex, patternIndex) {\n var i\n\n // find first globstar from patternIndex\n var firstgs = -1\n for (i = patternIndex; i < pattern.length; i++) {\n if (pattern[i] === GLOBSTAR) { firstgs = i; break }\n }\n\n // find last globstar\n var lastgs = -1\n for (i = pattern.length - 1; i >= 0; i--) {\n if (pattern[i] === GLOBSTAR) { lastgs = i; break }\n }\n\n var head = pattern.slice(patternIndex, firstgs)\n var body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs)\n var tail = partial ? [] : pattern.slice(lastgs + 1)\n\n // check the head\n if (head.length) {\n var fileHead = file.slice(fileIndex, fileIndex + head.length)\n if (!this._matchOne(fileHead, head, partial, 0, 0)) {\n return false\n }\n fileIndex += head.length\n }\n\n // check the tail\n var fileTailMatch = 0\n if (tail.length) {\n if (tail.length + fileIndex > file.length) return false\n\n var tailStart = file.length - tail.length\n if (this._matchOne(file, tail, partial, tailStart, 0)) {\n fileTailMatch = tail.length\n } else {\n // affordance for stuff like a/**/* matching a/b/\n if (file[file.length - 1] !== '' ||\n fileIndex + tail.length === file.length) {\n return false\n }\n tailStart--\n if (!this._matchOne(file, tail, partial, tailStart, 0)) {\n return false\n }\n fileTailMatch = tail.length + 1\n }\n }\n\n // if body is empty (single ** between head and tail)\n if (!body.length) {\n var sawSome = !!fileTailMatch\n for (i = fileIndex; i < file.length - fileTailMatch; i++) {\n var f = String(file[i])\n sawSome = true\n if (f === '.' || f === '..' ||\n (!this.options.dot && f.charAt(0) === '.')) {\n return false\n }\n }\n return partial || sawSome\n }\n\n // split body into segments at each GLOBSTAR\n var bodySegments = [[[], 0]]\n var currentBody = bodySegments[0]\n var nonGsParts = 0\n var nonGsPartsSums = [0]\n for (var bi = 0; bi < body.length; bi++) {\n var b = body[bi]\n if (b === GLOBSTAR) {\n nonGsPartsSums.push(nonGsParts)\n currentBody = [[], 0]\n bodySegments.push(currentBody)\n } else {\n currentBody[0].push(b)\n nonGsParts++\n }\n }\n\n var idx = bodySegments.length - 1\n var fileLength = file.length - fileTailMatch\n for (var si = 0; si < bodySegments.length; si++) {\n bodySegments[si][1] = fileLength -\n (nonGsPartsSums[idx--] + bodySegments[si][0].length)\n }\n\n return !!this._matchGlobStarBodySections(\n file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch\n )\n}\n\n// return false for \"nope, not matching\"\n// return null for \"not matching, cannot keep trying\"\nMinimatch.prototype._matchGlobStarBodySections = function (\n file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail\n) {\n var bs = bodySegments[bodyIndex]\n if (!bs) {\n // just make sure there are no bad dots\n for (var i = fileIndex; i < file.length; i++) {\n sawTail = true\n var f = file[i]\n if (f === '.' || f === '..' ||\n (!this.options.dot && f.charAt(0) === '.')) {\n return false\n }\n }\n return sawTail\n }\n\n var body = bs[0]\n var after = bs[1]\n while (fileIndex <= after) {\n var m = this._matchOne(\n file.slice(0, fileIndex + body.length),\n body,\n partial,\n fileIndex,\n 0\n )\n // if limit exceeded, no match. intentional false negative,\n // acceptable break in correctness for security.\n if (m && globStarDepth < this.maxGlobstarRecursion) {\n var sub = this._matchGlobStarBodySections(\n file, bodySegments,\n fileIndex + body.length, bodyIndex + 1,\n partial, globStarDepth + 1, sawTail\n )\n if (sub !== false) {\n return sub\n }\n }\n var f = file[fileIndex]\n if (f === '.' || f === '..' ||\n (!this.options.dot && f.charAt(0) === '.')) {\n return false\n }\n fileIndex++\n }\n return partial || null\n}\n\nMinimatch.prototype._matchOne = function (file, pattern, partial, fileIndex, patternIndex) {\n var fi, pi, fl, pl\n for (\n fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length\n ; (fi < fl) && (pi < pl)\n ; fi++, pi++\n ) {\n this.debug('matchOne loop')\n var p = pattern[pi]\n var f = file[fi]\n\n this.debug(pattern, p, f)\n\n // should be impossible.\n // some invalid regexp stuff in the set.\n /* istanbul ignore if */\n if (p === false || p === GLOBSTAR) return false\n\n // something other than **\n // non-magic patterns just have to match exactly\n // patterns with magic have been turned into regexps.\n var hit\n if (typeof p === 'string') {\n hit = f === p\n this.debug('string match', p, f, hit)\n } else {\n hit = f.match(p)\n this.debug('pattern match', p, f, hit)\n }\n\n if (!hit) return false\n }\n\n // now either we fell off the end of the pattern, or we're done.\n if (fi === fl && pi === pl) {\n // ran out of pattern and filename at the same time.\n // an exact hit!\n return true\n } else if (fi === fl) {\n // ran out of file, but still had pattern left.\n // this is ok if we're doing the match as part of\n // a glob fs traversal.\n return partial\n } else /* istanbul ignore else */ if (pi === pl) {\n // ran out of pattern, still have file left.\n // this is only acceptable if we're on the very last\n // empty segment of a file with a trailing slash.\n // a/* should match a/b/\n return (fi === fl - 1) && (file[fi] === '')\n }\n\n // should be unreachable.\n /* istanbul ignore next */\n throw new Error('wtf?')\n}\n\n// replace stuff like \\* with *\nfunction globUnescape (s) {\n return s.replace(/\\\\(.)/g, '$1')\n}\n\nfunction regExpEscape (s) {\n return s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n}\n","module.exports = globSync\nglobSync.GlobSync = GlobSync\n\nvar rp = require('fs.realpath')\nvar minimatch = require('minimatch')\nvar Minimatch = minimatch.Minimatch\nvar Glob = require('./glob.js').Glob\nvar util = require('util')\nvar path = require('path')\nvar assert = require('assert')\nvar isAbsolute = require('path-is-absolute')\nvar common = require('./common.js')\nvar setopts = common.setopts\nvar ownProp = common.ownProp\nvar childrenIgnored = common.childrenIgnored\nvar isIgnored = common.isIgnored\n\nfunction globSync (pattern, options) {\n if (typeof options === 'function' || arguments.length === 3)\n throw new TypeError('callback provided to sync glob\\n'+\n 'See: https://github.com/isaacs/node-glob/issues/167')\n\n return new GlobSync(pattern, options).found\n}\n\nfunction GlobSync (pattern, options) {\n if (!pattern)\n throw new Error('must provide pattern')\n\n if (typeof options === 'function' || arguments.length === 3)\n throw new TypeError('callback provided to sync glob\\n'+\n 'See: https://github.com/isaacs/node-glob/issues/167')\n\n if (!(this instanceof GlobSync))\n return new GlobSync(pattern, options)\n\n setopts(this, pattern, options)\n\n if (this.noprocess)\n return this\n\n var n = this.minimatch.set.length\n this.matches = new Array(n)\n for (var i = 0; i < n; i ++) {\n this._process(this.minimatch.set[i], i, false)\n }\n this._finish()\n}\n\nGlobSync.prototype._finish = function () {\n assert.ok(this instanceof GlobSync)\n if (this.realpath) {\n var self = this\n this.matches.forEach(function (matchset, index) {\n var set = self.matches[index] = Object.create(null)\n for (var p in matchset) {\n try {\n p = self._makeAbs(p)\n var real = rp.realpathSync(p, self.realpathCache)\n set[real] = true\n } catch (er) {\n if (er.syscall === 'stat')\n set[self._makeAbs(p)] = true\n else\n throw er\n }\n }\n })\n }\n common.finish(this)\n}\n\n\nGlobSync.prototype._process = function (pattern, index, inGlobStar) {\n assert.ok(this instanceof GlobSync)\n\n // Get the first [n] parts of pattern that are all strings.\n var n = 0\n while (typeof pattern[n] === 'string') {\n n ++\n }\n // now n is the index of the first one that is *not* a string.\n\n // See if there's anything else\n var prefix\n switch (n) {\n // if not, then this is rather simple\n case pattern.length:\n this._processSimple(pattern.join('/'), index)\n return\n\n case 0:\n // pattern *starts* with some non-trivial item.\n // going to readdir(cwd), but not include the prefix in matches.\n prefix = null\n break\n\n default:\n // pattern has some string bits in the front.\n // whatever it starts with, whether that's 'absolute' like /foo/bar,\n // or 'relative' like '../baz'\n prefix = pattern.slice(0, n).join('/')\n break\n }\n\n var remain = pattern.slice(n)\n\n // get the list of entries.\n var read\n if (prefix === null)\n read = '.'\n else if (isAbsolute(prefix) ||\n isAbsolute(pattern.map(function (p) {\n return typeof p === 'string' ? p : '[*]'\n }).join('/'))) {\n if (!prefix || !isAbsolute(prefix))\n prefix = '/' + prefix\n read = prefix\n } else\n read = prefix\n\n var abs = this._makeAbs(read)\n\n //if ignored, skip processing\n if (childrenIgnored(this, read))\n return\n\n var isGlobStar = remain[0] === minimatch.GLOBSTAR\n if (isGlobStar)\n this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)\n else\n this._processReaddir(prefix, read, abs, remain, index, inGlobStar)\n}\n\n\nGlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {\n var entries = this._readdir(abs, inGlobStar)\n\n // if the abs isn't a dir, then nothing can match!\n if (!entries)\n return\n\n // It will only match dot entries if it starts with a dot, or if\n // dot is set. Stuff like @(.foo|.bar) isn't allowed.\n var pn = remain[0]\n var negate = !!this.minimatch.negate\n var rawGlob = pn._glob\n var dotOk = this.dot || rawGlob.charAt(0) === '.'\n\n var matchedEntries = []\n for (var i = 0; i < entries.length; i++) {\n var e = entries[i]\n if (e.charAt(0) !== '.' || dotOk) {\n var m\n if (negate && !prefix) {\n m = !e.match(pn)\n } else {\n m = e.match(pn)\n }\n if (m)\n matchedEntries.push(e)\n }\n }\n\n var len = matchedEntries.length\n // If there are no matched entries, then nothing matches.\n if (len === 0)\n return\n\n // if this is the last remaining pattern bit, then no need for\n // an additional stat *unless* the user has specified mark or\n // stat explicitly. We know they exist, since readdir returned\n // them.\n\n if (remain.length === 1 && !this.mark && !this.stat) {\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n if (prefix) {\n if (prefix.slice(-1) !== '/')\n e = prefix + '/' + e\n else\n e = prefix + e\n }\n\n if (e.charAt(0) === '/' && !this.nomount) {\n e = path.join(this.root, e)\n }\n this._emitMatch(index, e)\n }\n // This was the last one, and no stats were needed\n return\n }\n\n // now test all matched entries as stand-ins for that part\n // of the pattern.\n remain.shift()\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n var newPattern\n if (prefix)\n newPattern = [prefix, e]\n else\n newPattern = [e]\n this._process(newPattern.concat(remain), index, inGlobStar)\n }\n}\n\n\nGlobSync.prototype._emitMatch = function (index, e) {\n if (isIgnored(this, e))\n return\n\n var abs = this._makeAbs(e)\n\n if (this.mark)\n e = this._mark(e)\n\n if (this.absolute) {\n e = abs\n }\n\n if (this.matches[index][e])\n return\n\n if (this.nodir) {\n var c = this.cache[abs]\n if (c === 'DIR' || Array.isArray(c))\n return\n }\n\n this.matches[index][e] = true\n\n if (this.stat)\n this._stat(e)\n}\n\n\nGlobSync.prototype._readdirInGlobStar = function (abs) {\n // follow all symlinked directories forever\n // just proceed as if this is a non-globstar situation\n if (this.follow)\n return this._readdir(abs, false)\n\n var entries\n var lstat\n var stat\n try {\n lstat = this.fs.lstatSync(abs)\n } catch (er) {\n if (er.code === 'ENOENT') {\n // lstat failed, doesn't exist\n return null\n }\n }\n\n var isSym = lstat && lstat.isSymbolicLink()\n this.symlinks[abs] = isSym\n\n // If it's not a symlink or a dir, then it's definitely a regular file.\n // don't bother doing a readdir in that case.\n if (!isSym && lstat && !lstat.isDirectory())\n this.cache[abs] = 'FILE'\n else\n entries = this._readdir(abs, false)\n\n return entries\n}\n\nGlobSync.prototype._readdir = function (abs, inGlobStar) {\n var entries\n\n if (inGlobStar && !ownProp(this.symlinks, abs))\n return this._readdirInGlobStar(abs)\n\n if (ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n if (!c || c === 'FILE')\n return null\n\n if (Array.isArray(c))\n return c\n }\n\n try {\n return this._readdirEntries(abs, this.fs.readdirSync(abs))\n } catch (er) {\n this._readdirError(abs, er)\n return null\n }\n}\n\nGlobSync.prototype._readdirEntries = function (abs, entries) {\n // if we haven't asked to stat everything, then just\n // assume that everything in there exists, so we can avoid\n // having to stat it a second time.\n if (!this.mark && !this.stat) {\n for (var i = 0; i < entries.length; i ++) {\n var e = entries[i]\n if (abs === '/')\n e = abs + e\n else\n e = abs + '/' + e\n this.cache[e] = true\n }\n }\n\n this.cache[abs] = entries\n\n // mark and cache dir-ness\n return entries\n}\n\nGlobSync.prototype._readdirError = function (f, er) {\n // handle errors, and cache the information\n switch (er.code) {\n case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205\n case 'ENOTDIR': // totally normal. means it *does* exist.\n var abs = this._makeAbs(f)\n this.cache[abs] = 'FILE'\n if (abs === this.cwdAbs) {\n var error = new Error(er.code + ' invalid cwd ' + this.cwd)\n error.path = this.cwd\n error.code = er.code\n throw error\n }\n break\n\n case 'ENOENT': // not terribly unusual\n case 'ELOOP':\n case 'ENAMETOOLONG':\n case 'UNKNOWN':\n this.cache[this._makeAbs(f)] = false\n break\n\n default: // some unusual error. Treat as failure.\n this.cache[this._makeAbs(f)] = false\n if (this.strict)\n throw er\n if (!this.silent)\n console.error('glob error', er)\n break\n }\n}\n\nGlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {\n\n var entries = this._readdir(abs, inGlobStar)\n\n // no entries means not a dir, so it can never have matches\n // foo.txt/** doesn't match foo.txt\n if (!entries)\n return\n\n // test without the globstar, and with every child both below\n // and replacing the globstar.\n var remainWithoutGlobStar = remain.slice(1)\n var gspref = prefix ? [ prefix ] : []\n var noGlobStar = gspref.concat(remainWithoutGlobStar)\n\n // the noGlobStar pattern exits the inGlobStar state\n this._process(noGlobStar, index, false)\n\n var len = entries.length\n var isSym = this.symlinks[abs]\n\n // If it's a symlink, and we're in a globstar, then stop\n if (isSym && inGlobStar)\n return\n\n for (var i = 0; i < len; i++) {\n var e = entries[i]\n if (e.charAt(0) === '.' && !this.dot)\n continue\n\n // these two cases enter the inGlobStar state\n var instead = gspref.concat(entries[i], remainWithoutGlobStar)\n this._process(instead, index, true)\n\n var below = gspref.concat(entries[i], remain)\n this._process(below, index, true)\n }\n}\n\nGlobSync.prototype._processSimple = function (prefix, index) {\n // XXX review this. Shouldn't it be doing the mounting etc\n // before doing stat? kinda weird?\n var exists = this._stat(prefix)\n\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n // If it doesn't exist, then just mark the lack of results\n if (!exists)\n return\n\n if (prefix && isAbsolute(prefix) && !this.nomount) {\n var trail = /[\\/\\\\]$/.test(prefix)\n if (prefix.charAt(0) === '/') {\n prefix = path.join(this.root, prefix)\n } else {\n prefix = path.resolve(this.root, prefix)\n if (trail)\n prefix += '/'\n }\n }\n\n if (process.platform === 'win32')\n prefix = prefix.replace(/\\\\/g, '/')\n\n // Mark this as a match\n this._emitMatch(index, prefix)\n}\n\n// Returns either 'DIR', 'FILE', or false\nGlobSync.prototype._stat = function (f) {\n var abs = this._makeAbs(f)\n var needDir = f.slice(-1) === '/'\n\n if (f.length > this.maxLength)\n return false\n\n if (!this.stat && ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n\n if (Array.isArray(c))\n c = 'DIR'\n\n // It exists, but maybe not how we need it\n if (!needDir || c === 'DIR')\n return c\n\n if (needDir && c === 'FILE')\n return false\n\n // otherwise we have to stat, because maybe c=true\n // if we know it exists, but not what it is.\n }\n\n var exists\n var stat = this.statCache[abs]\n if (!stat) {\n var lstat\n try {\n lstat = this.fs.lstatSync(abs)\n } catch (er) {\n if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {\n this.statCache[abs] = false\n return false\n }\n }\n\n if (lstat && lstat.isSymbolicLink()) {\n try {\n stat = this.fs.statSync(abs)\n } catch (er) {\n stat = lstat\n }\n } else {\n stat = lstat\n }\n }\n\n this.statCache[abs] = stat\n\n var c = true\n if (stat)\n c = stat.isDirectory() ? 'DIR' : 'FILE'\n\n this.cache[abs] = this.cache[abs] || c\n\n if (needDir && c === 'FILE')\n return false\n\n return c\n}\n\nGlobSync.prototype._mark = function (p) {\n return common.mark(this, p)\n}\n\nGlobSync.prototype._makeAbs = function (f) {\n return common.makeAbs(this, f)\n}\n","'use strict';\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpsProxyAgent = void 0;\nconst net = __importStar(require(\"net\"));\nconst tls = __importStar(require(\"tls\"));\nconst assert_1 = __importDefault(require(\"assert\"));\nconst debug_1 = __importDefault(require(\"debug\"));\nconst agent_base_1 = require(\"agent-base\");\nconst url_1 = require(\"url\");\nconst parse_proxy_response_1 = require(\"./parse-proxy-response\");\nconst debug = (0, debug_1.default)('https-proxy-agent');\nconst setServernameFromNonIpHost = (options) => {\n if (options.servername === undefined &&\n options.host &&\n !net.isIP(options.host)) {\n return {\n ...options,\n servername: options.host,\n };\n }\n return options;\n};\n/**\n * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to\n * the specified \"HTTP(s) proxy server\" in order to proxy HTTPS requests.\n *\n * Outgoing HTTP requests are first tunneled through the proxy server using the\n * `CONNECT` HTTP request method to establish a connection to the proxy server,\n * and then the proxy server connects to the destination target and issues the\n * HTTP request from the proxy server.\n *\n * `https:` requests have their socket connection upgraded to TLS once\n * the connection to the proxy server has been established.\n */\nclass HttpsProxyAgent extends agent_base_1.Agent {\n constructor(proxy, opts) {\n super(opts);\n this.options = { path: undefined };\n this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy;\n this.proxyHeaders = opts?.headers ?? {};\n debug('Creating new HttpsProxyAgent instance: %o', this.proxy.href);\n // Trim off the brackets from IPv6 addresses\n const host = (this.proxy.hostname || this.proxy.host).replace(/^\\[|\\]$/g, '');\n const port = this.proxy.port\n ? parseInt(this.proxy.port, 10)\n : this.proxy.protocol === 'https:'\n ? 443\n : 80;\n this.connectOpts = {\n // Attempt to negotiate http/1.1 for proxy servers that support http/2\n ALPNProtocols: ['http/1.1'],\n ...(opts ? omit(opts, 'headers') : null),\n host,\n port,\n };\n }\n /**\n * Called when the node-core HTTP client library is creating a\n * new HTTP request.\n */\n async connect(req, opts) {\n const { proxy } = this;\n if (!opts.host) {\n throw new TypeError('No \"host\" provided');\n }\n // Create a socket connection to the proxy server.\n let socket;\n if (proxy.protocol === 'https:') {\n debug('Creating `tls.Socket`: %o', this.connectOpts);\n socket = tls.connect(setServernameFromNonIpHost(this.connectOpts));\n }\n else {\n debug('Creating `net.Socket`: %o', this.connectOpts);\n socket = net.connect(this.connectOpts);\n }\n const headers = typeof this.proxyHeaders === 'function'\n ? this.proxyHeaders()\n : { ...this.proxyHeaders };\n const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;\n let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\\r\\n`;\n // Inject the `Proxy-Authorization` header if necessary.\n if (proxy.username || proxy.password) {\n const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;\n headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`;\n }\n headers.Host = `${host}:${opts.port}`;\n if (!headers['Proxy-Connection']) {\n headers['Proxy-Connection'] = this.keepAlive\n ? 'Keep-Alive'\n : 'close';\n }\n for (const name of Object.keys(headers)) {\n payload += `${name}: ${headers[name]}\\r\\n`;\n }\n const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket);\n socket.write(`${payload}\\r\\n`);\n const { connect, buffered } = await proxyResponsePromise;\n req.emit('proxyConnect', connect);\n this.emit('proxyConnect', connect, req);\n if (connect.statusCode === 200) {\n req.once('socket', resume);\n if (opts.secureEndpoint) {\n // The proxy is connecting to a TLS server, so upgrade\n // this socket connection to a TLS connection.\n debug('Upgrading socket connection to TLS');\n return tls.connect({\n ...omit(setServernameFromNonIpHost(opts), 'host', 'path', 'port'),\n socket,\n });\n }\n return socket;\n }\n // Some other status code that's not 200... need to re-play the HTTP\n // header \"data\" events onto the socket once the HTTP machinery is\n // attached so that the node core `http` can parse and handle the\n // error status code.\n // Close the original socket, and a new \"fake\" socket is returned\n // instead, so that the proxy doesn't get the HTTP request\n // written to it (which may contain `Authorization` headers or other\n // sensitive data).\n //\n // See: https://hackerone.com/reports/541502\n socket.destroy();\n const fakeSocket = new net.Socket({ writable: false });\n fakeSocket.readable = true;\n // Need to wait for the \"socket\" event to re-play the \"data\" events.\n req.once('socket', (s) => {\n debug('Replaying proxy buffer for failed request');\n (0, assert_1.default)(s.listenerCount('data') > 0);\n // Replay the \"buffered\" Buffer onto the fake `socket`, since at\n // this point the HTTP module machinery has been hooked up for\n // the user.\n s.push(buffered);\n s.push(null);\n });\n return fakeSocket;\n }\n}\nHttpsProxyAgent.protocols = ['http', 'https'];\nexports.HttpsProxyAgent = HttpsProxyAgent;\nfunction resume(socket) {\n socket.resume();\n}\nfunction omit(obj, ...keys) {\n const ret = {};\n let key;\n for (key in obj) {\n if (!keys.includes(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseProxyResponse = void 0;\nconst debug_1 = __importDefault(require(\"debug\"));\nconst debug = (0, debug_1.default)('https-proxy-agent:parse-proxy-response');\nfunction parseProxyResponse(socket) {\n return new Promise((resolve, reject) => {\n // we need to buffer any HTTP traffic that happens with the proxy before we get\n // the CONNECT response, so that if the response is anything other than an \"200\"\n // response code, then we can re-play the \"data\" events on the socket once the\n // HTTP parser is hooked up...\n let buffersLength = 0;\n const buffers = [];\n function read() {\n const b = socket.read();\n if (b)\n ondata(b);\n else\n socket.once('readable', read);\n }\n function cleanup() {\n socket.removeListener('end', onend);\n socket.removeListener('error', onerror);\n socket.removeListener('readable', read);\n }\n function onend() {\n cleanup();\n debug('onend');\n reject(new Error('Proxy connection ended before receiving CONNECT response'));\n }\n function onerror(err) {\n cleanup();\n debug('onerror %o', err);\n reject(err);\n }\n function ondata(b) {\n buffers.push(b);\n buffersLength += b.length;\n const buffered = Buffer.concat(buffers, buffersLength);\n const endOfHeaders = buffered.indexOf('\\r\\n\\r\\n');\n if (endOfHeaders === -1) {\n // keep buffering\n debug('have not received end of HTTP headers yet...');\n read();\n return;\n }\n const headerParts = buffered\n .slice(0, endOfHeaders)\n .toString('ascii')\n .split('\\r\\n');\n const firstLine = headerParts.shift();\n if (!firstLine) {\n socket.destroy();\n return reject(new Error('No header received from proxy CONNECT response'));\n }\n const firstLineParts = firstLine.split(' ');\n const statusCode = +firstLineParts[1];\n const statusText = firstLineParts.slice(2).join(' ');\n const headers = {};\n for (const header of headerParts) {\n if (!header)\n continue;\n const firstColon = header.indexOf(':');\n if (firstColon === -1) {\n socket.destroy();\n return reject(new Error(`Invalid header from proxy CONNECT response: \"${header}\"`));\n }\n const key = header.slice(0, firstColon).toLowerCase();\n const value = header.slice(firstColon + 1).trimStart();\n const current = headers[key];\n if (typeof current === 'string') {\n headers[key] = [current, value];\n }\n else if (Array.isArray(current)) {\n current.push(value);\n }\n else {\n headers[key] = value;\n }\n }\n debug('got proxy server response: %o %o', firstLine, headers);\n cleanup();\n resolve({\n connect: {\n statusCode,\n statusText,\n headers,\n },\n buffered,\n });\n }\n socket.on('error', onerror);\n socket.on('end', onend);\n read();\n });\n}\nexports.parseProxyResponse = parseProxyResponse;\n//# sourceMappingURL=parse-proxy-response.js.map","var wrappy = require('wrappy')\nvar reqs = Object.create(null)\nvar once = require('once')\n\nmodule.exports = wrappy(inflight)\n\nfunction inflight (key, cb) {\n if (reqs[key]) {\n reqs[key].push(cb)\n return null\n } else {\n reqs[key] = [cb]\n return makeres(key)\n }\n}\n\nfunction makeres (key) {\n return once(function RES () {\n var cbs = reqs[key]\n var len = cbs.length\n var args = slice(arguments)\n\n // XXX It's somewhat ambiguous whether a new callback added in this\n // pass should be queued for later execution if something in the\n // list of callbacks throws, or if it should just be discarded.\n // However, it's such an edge case that it hardly matters, and either\n // choice is likely as surprising as the other.\n // As it happens, we do go ahead and schedule it for later execution.\n try {\n for (var i = 0; i < len; i++) {\n cbs[i].apply(null, args)\n }\n } finally {\n if (cbs.length > len) {\n // added more in the interim.\n // de-zalgo, just in case, but don't call again.\n cbs.splice(0, len)\n process.nextTick(function () {\n RES.apply(null, args)\n })\n } else {\n delete reqs[key]\n }\n }\n })\n}\n\nfunction slice (args) {\n var length = args.length\n var array = []\n\n for (var i = 0; i < length; i++) array[i] = args[i]\n return array\n}\n","try {\n var util = require('util');\n /* istanbul ignore next */\n if (typeof util.inherits !== 'function') throw '';\n module.exports = util.inherits;\n} catch (e) {\n /* istanbul ignore next */\n module.exports = require('./inherits_browser.js');\n}\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","'use strict';\nmodule.exports = (function()\n{\n function _min(d0, d1, d2, bx, ay)\n {\n return d0 < d1 || d2 < d1\n ? d0 > d2\n ? d2 + 1\n : d0 + 1\n : bx === ay\n ? d1\n : d1 + 1;\n }\n\n return function(a, b)\n {\n if (a === b) {\n return 0;\n }\n\n if (a.length > b.length) {\n var tmp = a;\n a = b;\n b = tmp;\n }\n\n var la = a.length;\n var lb = b.length;\n\n while (la > 0 && (a.charCodeAt(la - 1) === b.charCodeAt(lb - 1))) {\n la--;\n lb--;\n }\n\n var offset = 0;\n\n while (offset < la && (a.charCodeAt(offset) === b.charCodeAt(offset))) {\n offset++;\n }\n\n la -= offset;\n lb -= offset;\n\n if (la === 0 || lb < 3) {\n return lb;\n }\n\n var x = 0;\n var y;\n var d0;\n var d1;\n var d2;\n var d3;\n var dd;\n var dy;\n var ay;\n var bx0;\n var bx1;\n var bx2;\n var bx3;\n\n var vector = [];\n\n for (y = 0; y < la; y++) {\n vector.push(y + 1);\n vector.push(a.charCodeAt(offset + y));\n }\n\n var len = vector.length - 1;\n\n for (; x < lb - 3;) {\n bx0 = b.charCodeAt(offset + (d0 = x));\n bx1 = b.charCodeAt(offset + (d1 = x + 1));\n bx2 = b.charCodeAt(offset + (d2 = x + 2));\n bx3 = b.charCodeAt(offset + (d3 = x + 3));\n dd = (x += 4);\n for (y = 0; y < len; y += 2) {\n dy = vector[y];\n ay = vector[y + 1];\n d0 = _min(dy, d0, d1, bx0, ay);\n d1 = _min(d0, d1, d2, bx1, ay);\n d2 = _min(d1, d2, d3, bx2, ay);\n dd = _min(d2, d3, dd, bx3, ay);\n vector[y] = dd;\n d3 = d2;\n d2 = d1;\n d1 = d0;\n d0 = dy;\n }\n }\n\n for (; x < lb;) {\n bx0 = b.charCodeAt(offset + (d0 = x));\n dd = ++x;\n for (y = 0; y < len; y += 2) {\n dy = vector[y];\n vector[y] = dd = _min(dy, d0, dd, bx0, vector[y + 1]);\n d0 = dy;\n }\n }\n\n return dd;\n };\n})();\n\n","'use strict';\n\n\nvar loader = require('./lib/loader');\nvar dumper = require('./lib/dumper');\n\n\nfunction renamed(from, to) {\n return function () {\n throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' +\n 'Use yaml.' + to + ' instead, which is now safe by default.');\n };\n}\n\n\nmodule.exports.Type = require('./lib/type');\nmodule.exports.Schema = require('./lib/schema');\nmodule.exports.FAILSAFE_SCHEMA = require('./lib/schema/failsafe');\nmodule.exports.JSON_SCHEMA = require('./lib/schema/json');\nmodule.exports.CORE_SCHEMA = require('./lib/schema/core');\nmodule.exports.DEFAULT_SCHEMA = require('./lib/schema/default');\nmodule.exports.load = loader.load;\nmodule.exports.loadAll = loader.loadAll;\nmodule.exports.dump = dumper.dump;\nmodule.exports.YAMLException = require('./lib/exception');\n\n// Re-export all types in case user wants to create custom schema\nmodule.exports.types = {\n binary: require('./lib/type/binary'),\n float: require('./lib/type/float'),\n map: require('./lib/type/map'),\n null: require('./lib/type/null'),\n pairs: require('./lib/type/pairs'),\n set: require('./lib/type/set'),\n timestamp: require('./lib/type/timestamp'),\n bool: require('./lib/type/bool'),\n int: require('./lib/type/int'),\n merge: require('./lib/type/merge'),\n omap: require('./lib/type/omap'),\n seq: require('./lib/type/seq'),\n str: require('./lib/type/str')\n};\n\n// Removed functions from JS-YAML 3.0.x\nmodule.exports.safeLoad = renamed('safeLoad', 'load');\nmodule.exports.safeLoadAll = renamed('safeLoadAll', 'loadAll');\nmodule.exports.safeDump = renamed('safeDump', 'dump');\n","'use strict';\n\n\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);\n}\n\n\nmodule.exports.isNothing = isNothing;\nmodule.exports.isObject = isObject;\nmodule.exports.toArray = toArray;\nmodule.exports.repeat = repeat;\nmodule.exports.isNegativeZero = isNegativeZero;\nmodule.exports.extend = extend;\n","'use strict';\n\n/*eslint-disable no-use-before-define*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar DEFAULT_SCHEMA = require('./schema/default');\n\nvar _toString = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar CHAR_BOM = 0xFEFF;\nvar CHAR_TAB = 0x09; /* Tab */\nvar CHAR_LINE_FEED = 0x0A; /* LF */\nvar CHAR_CARRIAGE_RETURN = 0x0D; /* CR */\nvar CHAR_SPACE = 0x20; /* Space */\nvar CHAR_EXCLAMATION = 0x21; /* ! */\nvar CHAR_DOUBLE_QUOTE = 0x22; /* \" */\nvar CHAR_SHARP = 0x23; /* # */\nvar CHAR_PERCENT = 0x25; /* % */\nvar CHAR_AMPERSAND = 0x26; /* & */\nvar CHAR_SINGLE_QUOTE = 0x27; /* ' */\nvar CHAR_ASTERISK = 0x2A; /* * */\nvar CHAR_COMMA = 0x2C; /* , */\nvar CHAR_MINUS = 0x2D; /* - */\nvar CHAR_COLON = 0x3A; /* : */\nvar CHAR_EQUALS = 0x3D; /* = */\nvar CHAR_GREATER_THAN = 0x3E; /* > */\nvar CHAR_QUESTION = 0x3F; /* ? */\nvar CHAR_COMMERCIAL_AT = 0x40; /* @ */\nvar CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\nvar CHAR_GRAVE_ACCENT = 0x60; /* ` */\nvar CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */\nvar CHAR_VERTICAL_LINE = 0x7C; /* | */\nvar CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */\n\nvar ESCAPE_SEQUENCES = {};\n\nESCAPE_SEQUENCES[0x00] = '\\\\0';\nESCAPE_SEQUENCES[0x07] = '\\\\a';\nESCAPE_SEQUENCES[0x08] = '\\\\b';\nESCAPE_SEQUENCES[0x09] = '\\\\t';\nESCAPE_SEQUENCES[0x0A] = '\\\\n';\nESCAPE_SEQUENCES[0x0B] = '\\\\v';\nESCAPE_SEQUENCES[0x0C] = '\\\\f';\nESCAPE_SEQUENCES[0x0D] = '\\\\r';\nESCAPE_SEQUENCES[0x1B] = '\\\\e';\nESCAPE_SEQUENCES[0x22] = '\\\\\"';\nESCAPE_SEQUENCES[0x5C] = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85] = '\\\\N';\nESCAPE_SEQUENCES[0xA0] = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\n\nvar DEPRECATED_BOOLEANS_SYNTAX = [\n 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\n 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\n];\n\nvar DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;\n\nfunction compileStyleMap(schema, map) {\n var result, keys, index, length, tag, style, type;\n\n if (map === null) return {};\n\n result = {};\n keys = Object.keys(map);\n\n for (index = 0, length = keys.length; index < length; index += 1) {\n tag = keys[index];\n style = String(map[tag]);\n\n if (tag.slice(0, 2) === '!!') {\n tag = 'tag:yaml.org,2002:' + tag.slice(2);\n }\n type = schema.compiledTypeMap['fallback'][tag];\n\n if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n style = type.styleAliases[style];\n }\n\n result[tag] = style;\n }\n\n return result;\n}\n\nfunction encodeHex(character) {\n var string, handle, length;\n\n string = character.toString(16).toUpperCase();\n\n if (character <= 0xFF) {\n handle = 'x';\n length = 2;\n } else if (character <= 0xFFFF) {\n handle = 'u';\n length = 4;\n } else if (character <= 0xFFFFFFFF) {\n handle = 'U';\n length = 8;\n } else {\n throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');\n }\n\n return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\n\n\nvar QUOTING_TYPE_SINGLE = 1,\n QUOTING_TYPE_DOUBLE = 2;\n\nfunction State(options) {\n this.schema = options['schema'] || DEFAULT_SCHEMA;\n this.indent = Math.max(1, (options['indent'] || 2));\n this.noArrayIndent = options['noArrayIndent'] || false;\n this.skipInvalid = options['skipInvalid'] || false;\n this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\n this.styleMap = compileStyleMap(this.schema, options['styles'] || null);\n this.sortKeys = options['sortKeys'] || false;\n this.lineWidth = options['lineWidth'] || 80;\n this.noRefs = options['noRefs'] || false;\n this.noCompatMode = options['noCompatMode'] || false;\n this.condenseFlow = options['condenseFlow'] || false;\n this.quotingType = options['quotingType'] === '\"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;\n this.forceQuotes = options['forceQuotes'] || false;\n this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.explicitTypes = this.schema.compiledExplicit;\n\n this.tag = null;\n this.result = '';\n\n this.duplicates = [];\n this.usedDuplicates = null;\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString(string, spaces) {\n var ind = common.repeat(' ', spaces),\n position = 0,\n next = -1,\n result = '',\n line,\n length = string.length;\n\n while (position < length) {\n next = string.indexOf('\\n', position);\n if (next === -1) {\n line = string.slice(position);\n position = length;\n } else {\n line = string.slice(position, next + 1);\n position = next + 1;\n }\n\n if (line.length && line !== '\\n') result += ind;\n\n result += line;\n }\n\n return result;\n}\n\nfunction generateNextLine(state, level) {\n return '\\n' + common.repeat(' ', state.indent * level);\n}\n\nfunction testImplicitResolving(state, str) {\n var index, length, type;\n\n for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n type = state.implicitTypes[index];\n\n if (type.resolve(str)) {\n return true;\n }\n }\n\n return false;\n}\n\n// [33] s-white ::= s-space | s-tab\nfunction isWhitespace(c) {\n return c === CHAR_SPACE || c === CHAR_TAB;\n}\n\n// Returns true if the character can be printed without escaping.\n// From YAML 1.2: \"any allowed characters known to be non-printable\n// should also be escaped. [However,] This isn’t mandatory\"\n// Derived from nb-char - \\t - #x85 - #xA0 - #x2028 - #x2029.\nfunction isPrintable(c) {\n return (0x00020 <= c && c <= 0x00007E)\n || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)\n || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM)\n || (0x10000 <= c && c <= 0x10FFFF);\n}\n\n// [34] ns-char ::= nb-char - s-white\n// [27] nb-char ::= c-printable - b-char - c-byte-order-mark\n// [26] b-char ::= b-line-feed | b-carriage-return\n// Including s-white (for some reason, examples doesn't match specs in this aspect)\n// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark\nfunction isNsCharOrWhitespace(c) {\n return isPrintable(c)\n && c !== CHAR_BOM\n // - b-char\n && c !== CHAR_CARRIAGE_RETURN\n && c !== CHAR_LINE_FEED;\n}\n\n// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out\n// c = flow-in ⇒ ns-plain-safe-in\n// c = block-key ⇒ ns-plain-safe-out\n// c = flow-key ⇒ ns-plain-safe-in\n// [128] ns-plain-safe-out ::= ns-char\n// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator\n// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” )\n// | ( /* An ns-char preceding */ “#” )\n// | ( “:” /* Followed by an ns-plain-safe(c) */ )\nfunction isPlainSafe(c, prev, inblock) {\n var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);\n var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);\n return (\n // ns-plain-safe\n inblock ? // c = flow-in\n cIsNsCharOrWhitespace\n : cIsNsCharOrWhitespace\n // - c-flow-indicator\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n )\n // ns-plain-char\n && c !== CHAR_SHARP // false on '#'\n && !(prev === CHAR_COLON && !cIsNsChar) // false on ': '\n || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#'\n || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]'\n}\n\n// Simplified test for values allowed as the first character in plain style.\nfunction isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable(c) && c !== CHAR_BOM\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}\n\n// Simplified test for values allowed as the last character in plain style.\nfunction isPlainSafeLast(c) {\n // just not whitespace or colon, it will be checked to be plain character later\n return !isWhitespace(c) && c !== CHAR_COLON;\n}\n\n// Same as 'string'.codePointAt(pos), but works in older browsers.\nfunction codePointAt(string, pos) {\n var first = string.charCodeAt(pos), second;\n if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) {\n second = string.charCodeAt(pos + 1);\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n }\n }\n return first;\n}\n\n// Determines whether block indentation indicator is required.\nfunction needIndentIndicator(string) {\n var leadingSpaceRe = /^\\n* /;\n return leadingSpaceRe.test(string);\n}\n\nvar STYLE_PLAIN = 1,\n STYLE_SINGLE = 2,\n STYLE_LITERAL = 3,\n STYLE_FOLDED = 4,\n STYLE_DOUBLE = 5;\n\n// Determines which scalar styles are possible and returns the preferred style.\n// lineWidth = -1 => no limit.\n// Pre-conditions: str.length > 0.\n// Post-conditions:\n// STYLE_PLAIN or STYLE_SINGLE => no \\n are in the string.\n// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).\n// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).\nfunction chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth,\n testAmbiguousType, quotingType, forceQuotes, inblock) {\n\n var i;\n var char = 0;\n var prevChar = null;\n var hasLineBreak = false;\n var hasFoldableLine = false; // only checked if shouldTrackWidth\n var shouldTrackWidth = lineWidth !== -1;\n var previousLineBreak = -1; // count the first line correctly\n var plain = isPlainSafeFirst(codePointAt(string, 0))\n && isPlainSafeLast(codePointAt(string, string.length - 1));\n\n if (singleLineOnly || forceQuotes) {\n // Case: no block styles.\n // Check for disallowed characters to rule out plain and single.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n } else {\n // Case: block styles permitted.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (char === CHAR_LINE_FEED) {\n hasLineBreak = true;\n // Check if any line can be folded.\n if (shouldTrackWidth) {\n hasFoldableLine = hasFoldableLine ||\n // Foldable line = too long, and not more-indented.\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' ');\n previousLineBreak = i;\n }\n } else if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n // in case the end is missing a \\n\n hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' '));\n }\n // Although every style can represent \\n without escaping, prefer block styles\n // for multiline, since they're more readable and they don't add empty lines.\n // Also prefer folding a super-long line.\n if (!hasLineBreak && !hasFoldableLine) {\n // Strings interpretable as another type have to be quoted;\n // e.g. the string 'true' vs. the boolean true.\n if (plain && !forceQuotes && !testAmbiguousType(string)) {\n return STYLE_PLAIN;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n }\n // Edge case: block indentation indicator can only have one digit.\n if (indentPerLevel > 9 && needIndentIndicator(string)) {\n return STYLE_DOUBLE;\n }\n // At this point we know block styles are valid.\n // Prefer literal style unless we want to fold.\n if (!forceQuotes) {\n return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n}\n\n// Note: line breaking/folding is implemented for only the folded style.\n// NB. We drop the last trailing newline (if any) of a returned block scalar\n// since the dumper adds its own newline. This always works:\n// • No ending newline => unaffected; already using strip \"-\" chomping.\n// • Ending newline => removed then restored.\n// Importantly, this keeps the \"+\" chomp indicator from gaining an extra line.\nfunction writeScalar(state, string, level, iskey, inblock) {\n state.dump = (function () {\n if (string.length === 0) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? '\"\"' : \"''\";\n }\n if (!state.noCompatMode) {\n if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? ('\"' + string + '\"') : (\"'\" + string + \"'\");\n }\n }\n\n var indent = state.indent * Math.max(1, level); // no 0-indent scalars\n // As indentation gets deeper, let the width decrease monotonically\n // to the lower bound min(state.lineWidth, 40).\n // Note that this implies\n // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.\n // state.lineWidth > 40 + state.indent: width decreases until the lower bound.\n // This behaves better than a constant minimum width which disallows narrower options,\n // or an indent threshold which causes the width to suddenly increase.\n var lineWidth = state.lineWidth === -1\n ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);\n\n // Without knowing if keys are implicit/explicit, assume implicit for safety.\n var singleLineOnly = iskey\n // No block styles in flow mode.\n || (state.flowLevel > -1 && level >= state.flowLevel);\n function testAmbiguity(string) {\n return testImplicitResolving(state, string);\n }\n\n switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth,\n testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {\n\n case STYLE_PLAIN:\n return string;\n case STYLE_SINGLE:\n return \"'\" + string.replace(/'/g, \"''\") + \"'\";\n case STYLE_LITERAL:\n return '|' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(string, indent));\n case STYLE_FOLDED:\n return '>' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(foldString(string, lineWidth), indent));\n case STYLE_DOUBLE:\n return '\"' + escapeString(string, lineWidth) + '\"';\n default:\n throw new YAMLException('impossible error: invalid scalar style');\n }\n }());\n}\n\n// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.\nfunction blockHeader(string, indentPerLevel) {\n var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';\n\n // note the special case: the string '\\n' counts as a \"trailing\" empty line.\n var clip = string[string.length - 1] === '\\n';\n var keep = clip && (string[string.length - 2] === '\\n' || string === '\\n');\n var chomp = keep ? '+' : (clip ? '' : '-');\n\n return indentIndicator + chomp + '\\n';\n}\n\n// (See the note for writeScalar.)\nfunction dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}\n\n// Note: a long line without a suitable break point will exceed the width limit.\n// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.\nfunction foldString(string, width) {\n // In folded style, $k$ consecutive newlines output as $k+1$ newlines—\n // unless they're before or after a more-indented line, or at the very\n // beginning or end, in which case $k$ maps to $k$.\n // Therefore, parse each chunk as newline(s) followed by a content line.\n var lineRe = /(\\n+)([^\\n]*)/g;\n\n // first line (possibly an empty line)\n var result = (function () {\n var nextLF = string.indexOf('\\n');\n nextLF = nextLF !== -1 ? nextLF : string.length;\n lineRe.lastIndex = nextLF;\n return foldLine(string.slice(0, nextLF), width);\n }());\n // If we haven't reached the first content line yet, don't add an extra \\n.\n var prevMoreIndented = string[0] === '\\n' || string[0] === ' ';\n var moreIndented;\n\n // rest of the lines\n var match;\n while ((match = lineRe.exec(string))) {\n var prefix = match[1], line = match[2];\n moreIndented = (line[0] === ' ');\n result += prefix\n + (!prevMoreIndented && !moreIndented && line !== ''\n ? '\\n' : '')\n + foldLine(line, width);\n prevMoreIndented = moreIndented;\n }\n\n return result;\n}\n\n// Greedy line breaking.\n// Picks the longest line under the limit each time,\n// otherwise settles for the shortest line over the limit.\n// NB. More-indented lines *cannot* be folded, as that would add an extra \\n.\nfunction foldLine(line, width) {\n if (line === '' || line[0] === ' ') return line;\n\n // Since a more-indented line adds a \\n, breaks can't be followed by a space.\n var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.\n var match;\n // start is an inclusive index. end, curr, and next are exclusive.\n var start = 0, end, curr = 0, next = 0;\n var result = '';\n\n // Invariants: 0 <= start <= length-1.\n // 0 <= curr <= next <= max(0, length-2). curr - start <= width.\n // Inside the loop:\n // A match implies length >= 2, so curr and next are <= length-2.\n while ((match = breakRe.exec(line))) {\n next = match.index;\n // maintain invariant: curr - start <= width\n if (next - start > width) {\n end = (curr > start) ? curr : next; // derive end <= length-2\n result += '\\n' + line.slice(start, end);\n // skip the space that was output as \\n\n start = end + 1; // derive start <= length-1\n }\n curr = next;\n }\n\n // By the invariants, start <= length-1, so there is something left over.\n // It is either the whole string or a part starting from non-whitespace.\n result += '\\n';\n // Insert a break if the remainder is too long and there is a break available.\n if (line.length - start > width && curr > start) {\n result += line.slice(start, curr) + '\\n' + line.slice(curr + 1);\n } else {\n result += line.slice(start);\n }\n\n return result.slice(1); // drop extra \\n joiner\n}\n\n// Escapes a double-quoted string.\nfunction escapeString(string) {\n var result = '';\n var char = 0;\n var escapeSeq;\n\n for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n escapeSeq = ESCAPE_SEQUENCES[char];\n\n if (!escapeSeq && isPrintable(char)) {\n result += string[i];\n if (char >= 0x10000) result += string[i + 1];\n } else {\n result += escapeSeq || encodeHex(char);\n }\n }\n\n return result;\n}\n\nfunction writeFlowSequence(state, level, object) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level, value, false, false) ||\n (typeof value === 'undefined' &&\n writeNode(state, level, null, false, false))) {\n\n if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '');\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = '[' + _result + ']';\n}\n\nfunction writeBlockSequence(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level + 1, value, true, true, false, true) ||\n (typeof value === 'undefined' &&\n writeNode(state, level + 1, null, true, true, false, true))) {\n\n if (!compact || _result !== '') {\n _result += generateNextLine(state, level);\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n _result += '-';\n } else {\n _result += '- ';\n }\n\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = _result || '[]'; // Empty sequence if no valid values.\n}\n\nfunction writeFlowMapping(state, level, object) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n pairBuffer;\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n\n pairBuffer = '';\n if (_result !== '') pairBuffer += ', ';\n\n if (state.condenseFlow) pairBuffer += '\"';\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level, objectKey, false, false)) {\n continue; // Skip this pair because of invalid key;\n }\n\n if (state.dump.length > 1024) pairBuffer += '? ';\n\n pairBuffer += state.dump + (state.condenseFlow ? '\"' : '') + ':' + (state.condenseFlow ? '' : ' ');\n\n if (!writeNode(state, level, objectValue, false, false)) {\n continue; // Skip this pair because of invalid value.\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = '{' + _result + '}';\n}\n\nfunction writeBlockMapping(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n explicitPair,\n pairBuffer;\n\n // Allow sorting keys so that the output file is deterministic\n if (state.sortKeys === true) {\n // Default sorting\n objectKeyList.sort();\n } else if (typeof state.sortKeys === 'function') {\n // Custom sort function\n objectKeyList.sort(state.sortKeys);\n } else if (state.sortKeys) {\n // Something is wrong\n throw new YAMLException('sortKeys must be a boolean or a function');\n }\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n\n if (!compact || _result !== '') {\n pairBuffer += generateNextLine(state, level);\n }\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level + 1, objectKey, true, true, true)) {\n continue; // Skip this pair because of invalid key.\n }\n\n explicitPair = (state.tag !== null && state.tag !== '?') ||\n (state.dump && state.dump.length > 1024);\n\n if (explicitPair) {\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += '?';\n } else {\n pairBuffer += '? ';\n }\n }\n\n pairBuffer += state.dump;\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level);\n }\n\n if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n continue; // Skip this pair because of invalid value.\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += ':';\n } else {\n pairBuffer += ': ';\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = _result || '{}'; // Empty mapping if no valid pairs.\n}\n\nfunction detectType(state, object, explicit) {\n var _result, typeList, index, length, type, style;\n\n typeList = explicit ? state.explicitTypes : state.implicitTypes;\n\n for (index = 0, length = typeList.length; index < length; index += 1) {\n type = typeList[index];\n\n if ((type.instanceOf || type.predicate) &&\n (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&\n (!type.predicate || type.predicate(object))) {\n\n if (explicit) {\n if (type.multi && type.representName) {\n state.tag = type.representName(object);\n } else {\n state.tag = type.tag;\n }\n } else {\n state.tag = '?';\n }\n\n if (type.represent) {\n style = state.styleMap[type.tag] || type.defaultStyle;\n\n if (_toString.call(type.represent) === '[object Function]') {\n _result = type.represent(object, style);\n } else if (_hasOwnProperty.call(type.represent, style)) {\n _result = type.represent[style](object, style);\n } else {\n throw new YAMLException('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n }\n\n state.dump = _result;\n }\n\n return true;\n }\n }\n\n return false;\n}\n\n// Serializes `object` and writes it to global `result`.\n// Returns true on success, or false on invalid object.\n//\nfunction writeNode(state, level, object, block, compact, iskey, isblockseq) {\n state.tag = null;\n state.dump = object;\n\n if (!detectType(state, object, false)) {\n detectType(state, object, true);\n }\n\n var type = _toString.call(state.dump);\n var inblock = block;\n var tagStr;\n\n if (block) {\n block = (state.flowLevel < 0 || state.flowLevel > level);\n }\n\n var objectOrArray = type === '[object Object]' || type === '[object Array]',\n duplicateIndex,\n duplicate;\n\n if (objectOrArray) {\n duplicateIndex = state.duplicates.indexOf(object);\n duplicate = duplicateIndex !== -1;\n }\n\n if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {\n compact = false;\n }\n\n if (duplicate && state.usedDuplicates[duplicateIndex]) {\n state.dump = '*ref_' + duplicateIndex;\n } else {\n if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n state.usedDuplicates[duplicateIndex] = true;\n }\n if (type === '[object Object]') {\n if (block && (Object.keys(state.dump).length !== 0)) {\n writeBlockMapping(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowMapping(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object Array]') {\n if (block && (state.dump.length !== 0)) {\n if (state.noArrayIndent && !isblockseq && level > 0) {\n writeBlockSequence(state, level - 1, state.dump, compact);\n } else {\n writeBlockSequence(state, level, state.dump, compact);\n }\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowSequence(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object String]') {\n if (state.tag !== '?') {\n writeScalar(state, state.dump, level, iskey, inblock);\n }\n } else if (type === '[object Undefined]') {\n return false;\n } else {\n if (state.skipInvalid) return false;\n throw new YAMLException('unacceptable kind of an object to dump ' + type);\n }\n\n if (state.tag !== null && state.tag !== '?') {\n // Need to encode all characters except those allowed by the spec:\n //\n // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */\n // [36] ns-hex-digit ::= ns-dec-digit\n // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */\n // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */\n // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-”\n // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#”\n // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,”\n // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]”\n //\n // Also need to encode '!' because it has special meaning (end of tag prefix).\n //\n tagStr = encodeURI(\n state.tag[0] === '!' ? state.tag.slice(1) : state.tag\n ).replace(/!/g, '%21');\n\n if (state.tag[0] === '!') {\n tagStr = '!' + tagStr;\n } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') {\n tagStr = '!!' + tagStr.slice(18);\n } else {\n tagStr = '!<' + tagStr + '>';\n }\n\n state.dump = tagStr + ' ' + state.dump;\n }\n }\n\n return true;\n}\n\nfunction getDuplicateReferences(object, state) {\n var objects = [],\n duplicatesIndexes = [],\n index,\n length;\n\n inspectNode(object, objects, duplicatesIndexes);\n\n for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n state.duplicates.push(objects[duplicatesIndexes[index]]);\n }\n state.usedDuplicates = new Array(length);\n}\n\nfunction inspectNode(object, objects, duplicatesIndexes) {\n var objectKeyList,\n index,\n length;\n\n if (object !== null && typeof object === 'object') {\n index = objects.indexOf(object);\n if (index !== -1) {\n if (duplicatesIndexes.indexOf(index) === -1) {\n duplicatesIndexes.push(index);\n }\n } else {\n objects.push(object);\n\n if (Array.isArray(object)) {\n for (index = 0, length = object.length; index < length; index += 1) {\n inspectNode(object[index], objects, duplicatesIndexes);\n }\n } else {\n objectKeyList = Object.keys(object);\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n }\n }\n }\n }\n}\n\nfunction dump(input, options) {\n options = options || {};\n\n var state = new State(options);\n\n if (!state.noRefs) getDuplicateReferences(input, state);\n\n var value = input;\n\n if (state.replacer) {\n value = state.replacer.call({ '': value }, '', value);\n }\n\n if (writeNode(state, 0, value, true, true)) return state.dump + '\\n';\n\n return '';\n}\n\nmodule.exports.dump = dump;\n","// YAML error class. http://stackoverflow.com/questions/8458984\n//\n'use strict';\n\n\nfunction formatError(exception, compact) {\n var where = '', message = exception.reason || '(unknown reason)';\n\n if (!exception.mark) return message;\n\n if (exception.mark.name) {\n where += 'in \"' + exception.mark.name + '\" ';\n }\n\n where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')';\n\n if (!compact && exception.mark.snippet) {\n where += '\\n\\n' + exception.mark.snippet;\n }\n\n return message + ' ' + where;\n}\n\n\nfunction YAMLException(reason, mark) {\n // Super constructor\n Error.call(this);\n\n this.name = 'YAMLException';\n this.reason = reason;\n this.mark = mark;\n this.message = formatError(this, false);\n\n // Include stack trace in error object\n if (Error.captureStackTrace) {\n // Chrome and NodeJS\n Error.captureStackTrace(this, this.constructor);\n } else {\n // FF, IE 10+ and Safari 6+. Fallback for others\n this.stack = (new Error()).stack || '';\n }\n}\n\n\n// Inherit from Error\nYAMLException.prototype = Object.create(Error.prototype);\nYAMLException.prototype.constructor = YAMLException;\n\n\nYAMLException.prototype.toString = function toString(compact) {\n return this.name + ': ' + formatError(this, compact);\n};\n\n\nmodule.exports = YAMLException;\n","'use strict';\n\n/*eslint-disable max-len,no-use-before-define*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar makeSnippet = require('./snippet');\nvar DEFAULT_SCHEMA = require('./schema/default');\n\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\nvar CONTEXT_FLOW_IN = 1;\nvar CONTEXT_FLOW_OUT = 2;\nvar CONTEXT_BLOCK_IN = 3;\nvar CONTEXT_BLOCK_OUT = 4;\n\n\nvar CHOMPING_CLIP = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP = 3;\n\n\nvar PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\n\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\n\nfunction is_EOL(c) {\n return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);\n}\n\nfunction is_WHITE_SPACE(c) {\n return (c === 0x09/* Tab */) || (c === 0x20/* Space */);\n}\n\nfunction is_WS_OR_EOL(c) {\n return (c === 0x09/* Tab */) ||\n (c === 0x20/* Space */) ||\n (c === 0x0A/* LF */) ||\n (c === 0x0D/* CR */);\n}\n\nfunction is_FLOW_INDICATOR(c) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */;\n}\n\nfunction fromHexCode(c) {\n var lc;\n\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n /*eslint-disable no-bitwise*/\n lc = c | 0x20;\n\n if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {\n return lc - 0x61 + 10;\n }\n\n return -1;\n}\n\nfunction escapedHexLen(c) {\n if (c === 0x78/* x */) { return 2; }\n if (c === 0x75/* u */) { return 4; }\n if (c === 0x55/* U */) { return 8; }\n return 0;\n}\n\nfunction fromDecimalCode(c) {\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n return -1;\n}\n\nfunction simpleEscapeSequence(c) {\n /* eslint-disable indent */\n return (c === 0x30/* 0 */) ? '\\x00' :\n (c === 0x61/* a */) ? '\\x07' :\n (c === 0x62/* b */) ? '\\x08' :\n (c === 0x74/* t */) ? '\\x09' :\n (c === 0x09/* Tab */) ? '\\x09' :\n (c === 0x6E/* n */) ? '\\x0A' :\n (c === 0x76/* v */) ? '\\x0B' :\n (c === 0x66/* f */) ? '\\x0C' :\n (c === 0x72/* r */) ? '\\x0D' :\n (c === 0x65/* e */) ? '\\x1B' :\n (c === 0x20/* Space */) ? ' ' :\n (c === 0x22/* \" */) ? '\\x22' :\n (c === 0x2F/* / */) ? '/' :\n (c === 0x5C/* \\ */) ? '\\x5C' :\n (c === 0x4E/* N */) ? '\\x85' :\n (c === 0x5F/* _ */) ? '\\xA0' :\n (c === 0x4C/* L */) ? '\\u2028' :\n (c === 0x50/* P */) ? '\\u2029' : '';\n}\n\nfunction charFromCodepoint(c) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c);\n }\n // Encode UTF-16 surrogate pair\n // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n );\n}\n\n// set a property of a literal object, while protecting against prototype pollution,\n// see https://github.com/nodeca/js-yaml/issues/164 for more details\nfunction setProperty(object, key, value) {\n // used for this specific key only because Object.defineProperty is slow\n if (key === '__proto__') {\n Object.defineProperty(object, key, {\n configurable: true,\n enumerable: true,\n writable: true,\n value: value\n });\n } else {\n object[key] = value;\n }\n}\n\nvar simpleEscapeCheck = new Array(256); // integer, for fast access\nvar simpleEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;\n simpleEscapeMap[i] = simpleEscapeSequence(i);\n}\n\n\nfunction State(input, options) {\n this.input = input;\n\n this.filename = options['filename'] || null;\n this.schema = options['schema'] || DEFAULT_SCHEMA;\n this.onWarning = options['onWarning'] || null;\n // (Hidden) Remove? makes the loader to expect YAML 1.1 documents\n // if such documents have no explicit %YAML directive\n this.legacy = options['legacy'] || false;\n\n this.json = options['json'] || false;\n this.listener = options['listener'] || null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.typeMap = this.schema.compiledTypeMap;\n\n this.length = input.length;\n this.position = 0;\n this.line = 0;\n this.lineStart = 0;\n this.lineIndent = 0;\n\n // position of first leading tab in the current line,\n // used to make sure there are no tabs in the indentation\n this.firstTabInLine = -1;\n\n this.documents = [];\n\n /*\n this.version;\n this.checkLineBreaks;\n this.tagMap;\n this.anchorMap;\n this.tag;\n this.anchor;\n this.kind;\n this.result;*/\n\n}\n\n\nfunction generateError(state, message) {\n var mark = {\n name: state.filename,\n buffer: state.input.slice(0, -1), // omit trailing \\0\n position: state.position,\n line: state.line,\n column: state.position - state.lineStart\n };\n\n mark.snippet = makeSnippet(mark);\n\n return new YAMLException(message, mark);\n}\n\nfunction throwError(state, message) {\n throw generateError(state, message);\n}\n\nfunction throwWarning(state, message) {\n if (state.onWarning) {\n state.onWarning.call(null, generateError(state, message));\n }\n}\n\n\nvar directiveHandlers = {\n\n YAML: function handleYamlDirective(state, name, args) {\n\n var match, major, minor;\n\n if (state.version !== null) {\n throwError(state, 'duplication of %YAML directive');\n }\n\n if (args.length !== 1) {\n throwError(state, 'YAML directive accepts exactly one argument');\n }\n\n match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n\n if (match === null) {\n throwError(state, 'ill-formed argument of the YAML directive');\n }\n\n major = parseInt(match[1], 10);\n minor = parseInt(match[2], 10);\n\n if (major !== 1) {\n throwError(state, 'unacceptable YAML version of the document');\n }\n\n state.version = args[0];\n state.checkLineBreaks = (minor < 2);\n\n if (minor !== 1 && minor !== 2) {\n throwWarning(state, 'unsupported YAML version of the document');\n }\n },\n\n TAG: function handleTagDirective(state, name, args) {\n\n var handle, prefix;\n\n if (args.length !== 2) {\n throwError(state, 'TAG directive accepts exactly two arguments');\n }\n\n handle = args[0];\n prefix = args[1];\n\n if (!PATTERN_TAG_HANDLE.test(handle)) {\n throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n }\n\n if (_hasOwnProperty.call(state.tagMap, handle)) {\n throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n }\n\n if (!PATTERN_TAG_URI.test(prefix)) {\n throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n }\n\n try {\n prefix = decodeURIComponent(prefix);\n } catch (err) {\n throwError(state, 'tag prefix is malformed: ' + prefix);\n }\n\n state.tagMap[handle] = prefix;\n }\n};\n\n\nfunction captureSegment(state, start, end, checkJson) {\n var _position, _length, _character, _result;\n\n if (start < end) {\n _result = state.input.slice(start, end);\n\n if (checkJson) {\n for (_position = 0, _length = _result.length; _position < _length; _position += 1) {\n _character = _result.charCodeAt(_position);\n if (!(_character === 0x09 ||\n (0x20 <= _character && _character <= 0x10FFFF))) {\n throwError(state, 'expected valid JSON character');\n }\n }\n } else if (PATTERN_NON_PRINTABLE.test(_result)) {\n throwError(state, 'the stream contains non-printable characters');\n }\n\n state.result += _result;\n }\n}\n\nfunction mergeMappings(state, destination, source, overridableKeys) {\n var sourceKeys, key, index, quantity;\n\n if (!common.isObject(source)) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n }\n\n sourceKeys = Object.keys(source);\n\n for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n key = sourceKeys[index];\n\n if (!_hasOwnProperty.call(destination, key)) {\n setProperty(destination, key, source[key]);\n overridableKeys[key] = true;\n }\n }\n}\n\nfunction storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode,\n startLine, startLineStart, startPos) {\n\n var index, quantity;\n\n // The output is a plain object here, so keys can only be strings.\n // We need to convert keyNode to a string, but doing so can hang the process\n // (deeply nested arrays that explode exponentially using aliases).\n if (Array.isArray(keyNode)) {\n keyNode = Array.prototype.slice.call(keyNode);\n\n for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {\n if (Array.isArray(keyNode[index])) {\n throwError(state, 'nested arrays are not supported inside keys');\n }\n\n if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {\n keyNode[index] = '[object Object]';\n }\n }\n }\n\n // Avoid code execution in load() via toString property\n // (still use its own toString for arrays, timestamps,\n // and whatever user schema extensions happen to have @@toStringTag)\n if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {\n keyNode = '[object Object]';\n }\n\n\n keyNode = String(keyNode);\n\n if (_result === null) {\n _result = {};\n }\n\n if (keyTag === 'tag:yaml.org,2002:merge') {\n if (Array.isArray(valueNode)) {\n for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {\n mergeMappings(state, _result, valueNode[index], overridableKeys);\n }\n } else {\n mergeMappings(state, _result, valueNode, overridableKeys);\n }\n } else {\n if (!state.json &&\n !_hasOwnProperty.call(overridableKeys, keyNode) &&\n _hasOwnProperty.call(_result, keyNode)) {\n state.line = startLine || state.line;\n state.lineStart = startLineStart || state.lineStart;\n state.position = startPos || state.position;\n throwError(state, 'duplicated mapping key');\n }\n\n setProperty(_result, keyNode, valueNode);\n delete overridableKeys[keyNode];\n }\n\n return _result;\n}\n\nfunction readLineBreak(state) {\n var ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x0A/* LF */) {\n state.position++;\n } else if (ch === 0x0D/* CR */) {\n state.position++;\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {\n state.position++;\n }\n } else {\n throwError(state, 'a line break is expected');\n }\n\n state.line += 1;\n state.lineStart = state.position;\n state.firstTabInLine = -1;\n}\n\nfunction skipSeparationSpace(state, allowComments, checkIndent) {\n var lineBreaks = 0,\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {\n state.firstTabInLine = state.position;\n }\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (allowComments && ch === 0x23/* # */) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);\n }\n\n if (is_EOL(ch)) {\n readLineBreak(state);\n\n ch = state.input.charCodeAt(state.position);\n lineBreaks++;\n state.lineIndent = 0;\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n } else {\n break;\n }\n }\n\n if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {\n throwWarning(state, 'deficient indentation');\n }\n\n return lineBreaks;\n}\n\nfunction testDocumentSeparator(state) {\n var _position = state.position,\n ch;\n\n ch = state.input.charCodeAt(_position);\n\n // Condition state.position === state.lineStart is tested\n // in parent on each call, for efficiency. No needs to test here again.\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(_position + 1) &&\n ch === state.input.charCodeAt(_position + 2)) {\n\n _position += 3;\n\n ch = state.input.charCodeAt(_position);\n\n if (ch === 0 || is_WS_OR_EOL(ch)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction writeFoldedLines(state, count) {\n if (count === 1) {\n state.result += ' ';\n } else if (count > 1) {\n state.result += common.repeat('\\n', count - 1);\n }\n}\n\n\nfunction readPlainScalar(state, nodeIndent, withinFlowCollection) {\n var preceding,\n following,\n captureStart,\n captureEnd,\n hasPendingContent,\n _line,\n _lineStart,\n _lineIndent,\n _kind = state.kind,\n _result = state.result,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (is_WS_OR_EOL(ch) ||\n is_FLOW_INDICATOR(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */) {\n return false;\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n return false;\n }\n }\n\n state.kind = 'scalar';\n state.result = '';\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n\n while (ch !== 0) {\n if (ch === 0x3A/* : */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n break;\n }\n\n } else if (ch === 0x23/* # */) {\n preceding = state.input.charCodeAt(state.position - 1);\n\n if (is_WS_OR_EOL(preceding)) {\n break;\n }\n\n } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\n withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n break;\n\n } else if (is_EOL(ch)) {\n _line = state.line;\n _lineStart = state.lineStart;\n _lineIndent = state.lineIndent;\n skipSeparationSpace(state, false, -1);\n\n if (state.lineIndent >= nodeIndent) {\n hasPendingContent = true;\n ch = state.input.charCodeAt(state.position);\n continue;\n } else {\n state.position = captureEnd;\n state.line = _line;\n state.lineStart = _lineStart;\n state.lineIndent = _lineIndent;\n break;\n }\n }\n\n if (hasPendingContent) {\n captureSegment(state, captureStart, captureEnd, false);\n writeFoldedLines(state, state.line - _line);\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n }\n\n if (!is_WHITE_SPACE(ch)) {\n captureEnd = state.position + 1;\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, captureEnd, false);\n\n if (state.result) {\n return true;\n }\n\n state.kind = _kind;\n state.result = _result;\n return false;\n}\n\nfunction readSingleQuotedScalar(state, nodeIndent) {\n var ch,\n captureStart, captureEnd;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x27/* ' */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x27/* ' */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x27/* ' */) {\n captureStart = state.position;\n state.position++;\n captureEnd = state.position;\n } else {\n return true;\n }\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\n\nfunction readDoubleQuotedScalar(state, nodeIndent) {\n var captureStart,\n captureEnd,\n hexLength,\n hexResult,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x22/* \" */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x22/* \" */) {\n captureSegment(state, captureStart, state.position, true);\n state.position++;\n return true;\n\n } else if (ch === 0x5C/* \\ */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (is_EOL(ch)) {\n skipSeparationSpace(state, false, nodeIndent);\n\n // TODO: rework to inline fn with no type cast?\n } else if (ch < 256 && simpleEscapeCheck[ch]) {\n state.result += simpleEscapeMap[ch];\n state.position++;\n\n } else if ((tmp = escapedHexLen(ch)) > 0) {\n hexLength = tmp;\n hexResult = 0;\n\n for (; hexLength > 0; hexLength--) {\n ch = state.input.charCodeAt(++state.position);\n\n if ((tmp = fromHexCode(ch)) >= 0) {\n hexResult = (hexResult << 4) + tmp;\n\n } else {\n throwError(state, 'expected hexadecimal character');\n }\n }\n\n state.result += charFromCodepoint(hexResult);\n\n state.position++;\n\n } else {\n throwError(state, 'unknown escape sequence');\n }\n\n captureStart = captureEnd = state.position;\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\n\nfunction readFlowCollection(state, nodeIndent) {\n var readNext = true,\n _line,\n _lineStart,\n _pos,\n _tag = state.tag,\n _result,\n _anchor = state.anchor,\n following,\n terminator,\n isPair,\n isExplicitPair,\n isMapping,\n overridableKeys = Object.create(null),\n keyNode,\n keyTag,\n valueNode,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x5B/* [ */) {\n terminator = 0x5D;/* ] */\n isMapping = false;\n _result = [];\n } else if (ch === 0x7B/* { */) {\n terminator = 0x7D;/* } */\n isMapping = true;\n _result = {};\n } else {\n return false;\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n while (ch !== 0) {\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === terminator) {\n state.position++;\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = isMapping ? 'mapping' : 'sequence';\n state.result = _result;\n return true;\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries');\n } else if (ch === 0x2C/* , */) {\n // \"flow collection entries can never be completely empty\", as per YAML 1.2, section 7.4\n throwError(state, \"expected the node content, but found ','\");\n }\n\n keyTag = keyNode = valueNode = null;\n isPair = isExplicitPair = false;\n\n if (ch === 0x3F/* ? */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following)) {\n isPair = isExplicitPair = true;\n state.position++;\n skipSeparationSpace(state, true, nodeIndent);\n }\n }\n\n _line = state.line; // Save the current line.\n _lineStart = state.lineStart;\n _pos = state.position;\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n keyTag = state.tag;\n keyNode = state.result;\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {\n isPair = true;\n ch = state.input.charCodeAt(++state.position);\n skipSeparationSpace(state, true, nodeIndent);\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n valueNode = state.result;\n }\n\n if (isMapping) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);\n } else if (isPair) {\n _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));\n } else {\n _result.push(keyNode);\n }\n\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x2C/* , */) {\n readNext = true;\n ch = state.input.charCodeAt(++state.position);\n } else {\n readNext = false;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection');\n}\n\nfunction readBlockScalar(state, nodeIndent) {\n var captureStart,\n folding,\n chomping = CHOMPING_CLIP,\n didReadContent = false,\n detectedIndent = false,\n textIndent = nodeIndent,\n emptyLines = 0,\n atMoreIndented = false,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x7C/* | */) {\n folding = false;\n } else if (ch === 0x3E/* > */) {\n folding = true;\n } else {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n\n while (ch !== 0) {\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\n if (CHOMPING_CLIP === chomping) {\n chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;\n } else {\n throwError(state, 'repeat of a chomping mode identifier');\n }\n\n } else if ((tmp = fromDecimalCode(ch)) >= 0) {\n if (tmp === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n } else if (!detectedIndent) {\n textIndent = nodeIndent + tmp - 1;\n detectedIndent = true;\n } else {\n throwError(state, 'repeat of an indentation width identifier');\n }\n\n } else {\n break;\n }\n }\n\n if (is_WHITE_SPACE(ch)) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (is_WHITE_SPACE(ch));\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (!is_EOL(ch) && (ch !== 0));\n }\n }\n\n while (ch !== 0) {\n readLineBreak(state);\n state.lineIndent = 0;\n\n ch = state.input.charCodeAt(state.position);\n\n while ((!detectedIndent || state.lineIndent < textIndent) &&\n (ch === 0x20/* Space */)) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (!detectedIndent && state.lineIndent > textIndent) {\n textIndent = state.lineIndent;\n }\n\n if (is_EOL(ch)) {\n emptyLines++;\n continue;\n }\n\n // End of the scalar.\n if (state.lineIndent < textIndent) {\n\n // Perform the chomping.\n if (chomping === CHOMPING_KEEP) {\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n } else if (chomping === CHOMPING_CLIP) {\n if (didReadContent) { // i.e. only if the scalar is not empty.\n state.result += '\\n';\n }\n }\n\n // Break this `while` cycle and go to the funciton's epilogue.\n break;\n }\n\n // Folded style: use fancy rules to handle line breaks.\n if (folding) {\n\n // Lines starting with white space characters (more-indented lines) are not folded.\n if (is_WHITE_SPACE(ch)) {\n atMoreIndented = true;\n // except for the first content line (cf. Example 8.1)\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n\n // End of more-indented block.\n } else if (atMoreIndented) {\n atMoreIndented = false;\n state.result += common.repeat('\\n', emptyLines + 1);\n\n // Just one line break - perceive as the same line.\n } else if (emptyLines === 0) {\n if (didReadContent) { // i.e. only if we have already read some scalar content.\n state.result += ' ';\n }\n\n // Several line breaks - perceive as different lines.\n } else {\n state.result += common.repeat('\\n', emptyLines);\n }\n\n // Literal style: just add exact number of line breaks between content lines.\n } else {\n // Keep all line breaks except the header line break.\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n }\n\n didReadContent = true;\n detectedIndent = true;\n emptyLines = 0;\n captureStart = state.position;\n\n while (!is_EOL(ch) && (ch !== 0)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, state.position, false);\n }\n\n return true;\n}\n\nfunction readBlockSequence(state, nodeIndent) {\n var _line,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = [],\n following,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n if (ch !== 0x2D/* - */) {\n break;\n }\n\n following = state.input.charCodeAt(state.position + 1);\n\n if (!is_WS_OR_EOL(following)) {\n break;\n }\n\n detected = true;\n state.position++;\n\n if (skipSeparationSpace(state, true, -1)) {\n if (state.lineIndent <= nodeIndent) {\n _result.push(null);\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n _result.push(state.result);\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a sequence entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'sequence';\n state.result = _result;\n return true;\n }\n return false;\n}\n\nfunction readBlockMapping(state, nodeIndent, flowIndent) {\n var following,\n allowCompact,\n _line,\n _keyLine,\n _keyLineStart,\n _keyPos,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = {},\n overridableKeys = Object.create(null),\n keyTag = null,\n keyNode = null,\n valueNode = null,\n atExplicitKey = false,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (!atExplicitKey && state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n following = state.input.charCodeAt(state.position + 1);\n _line = state.line; // Save the current line.\n\n //\n // Explicit notation case. There are two separate blocks:\n // first for the key (denoted by \"?\") and second for the value (denoted by \":\")\n //\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = true;\n allowCompact = true;\n\n } else if (atExplicitKey) {\n // i.e. 0x3A/* : */ === character after the explicit key.\n atExplicitKey = false;\n allowCompact = true;\n\n } else {\n throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');\n }\n\n state.position += 1;\n ch = following;\n\n //\n // Implicit notation case. Flow-style node as the key first, then \":\", and the value.\n //\n } else {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n\n if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n // Neither implicit nor explicit notation.\n // Reading is done. Go to the epilogue.\n break;\n }\n\n if (state.line === _line) {\n ch = state.input.charCodeAt(state.position);\n\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position);\n\n if (!is_WS_OR_EOL(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n }\n\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = false;\n allowCompact = false;\n keyTag = state.tag;\n keyNode = state.result;\n\n } else if (detected) {\n throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n }\n\n //\n // Common reading code for both explicit and implicit notations.\n //\n if (state.line === _line || state.lineIndent > nodeIndent) {\n if (atExplicitKey) {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n }\n\n if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n if (atExplicitKey) {\n keyNode = state.result;\n } else {\n valueNode = state.result;\n }\n }\n\n if (!atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n }\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a mapping entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n //\n // Epilogue.\n //\n\n // Special case: last mapping's node contains only the key in explicit notation.\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n }\n\n // Expose the resulting mapping.\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'mapping';\n state.result = _result;\n }\n\n return detected;\n}\n\nfunction readTagProperty(state) {\n var _position,\n isVerbatim = false,\n isNamed = false,\n tagHandle,\n tagName,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x21/* ! */) return false;\n\n if (state.tag !== null) {\n throwError(state, 'duplication of a tag property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true;\n ch = state.input.charCodeAt(++state.position);\n\n } else if (ch === 0x21/* ! */) {\n isNamed = true;\n tagHandle = '!!';\n ch = state.input.charCodeAt(++state.position);\n\n } else {\n tagHandle = '!';\n }\n\n _position = state.position;\n\n if (isVerbatim) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && ch !== 0x3E/* > */);\n\n if (state.position < state.length) {\n tagName = state.input.slice(_position, state.position);\n ch = state.input.charCodeAt(++state.position);\n } else {\n throwError(state, 'unexpected end of the stream within a verbatim tag');\n }\n } else {\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(_position - 1, state.position + 1);\n\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n throwError(state, 'named tag handle cannot contain such characters');\n }\n\n isNamed = true;\n _position = state.position + 1;\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks');\n }\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n tagName = state.input.slice(_position, state.position);\n\n if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n throwError(state, 'tag suffix cannot contain flow indicator characters');\n }\n }\n\n if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n throwError(state, 'tag name cannot contain such characters: ' + tagName);\n }\n\n try {\n tagName = decodeURIComponent(tagName);\n } catch (err) {\n throwError(state, 'tag name is malformed: ' + tagName);\n }\n\n if (isVerbatim) {\n state.tag = tagName;\n\n } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {\n state.tag = state.tagMap[tagHandle] + tagName;\n\n } else if (tagHandle === '!') {\n state.tag = '!' + tagName;\n\n } else if (tagHandle === '!!') {\n state.tag = 'tag:yaml.org,2002:' + tagName;\n\n } else {\n throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n }\n\n return true;\n}\n\nfunction readAnchorProperty(state) {\n var _position,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x26/* & */) return false;\n\n if (state.anchor !== null) {\n throwError(state, 'duplication of an anchor property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an anchor node must contain at least one character');\n }\n\n state.anchor = state.input.slice(_position, state.position);\n return true;\n}\n\nfunction readAlias(state) {\n var _position, alias,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x2A/* * */) return false;\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an alias node must contain at least one character');\n }\n\n alias = state.input.slice(_position, state.position);\n\n if (!_hasOwnProperty.call(state.anchorMap, alias)) {\n throwError(state, 'unidentified alias \"' + alias + '\"');\n }\n\n state.result = state.anchorMap[alias];\n skipSeparationSpace(state, true, -1);\n return true;\n}\n\nfunction composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\n var allowBlockStyles,\n allowBlockScalars,\n allowBlockCollections,\n indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n }\n\n if (indentStatus === 1) {\n while (readTagProperty(state) || readAnchorProperty(state)) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n allowBlockCollections = allowBlockStyles;\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n } else {\n allowBlockCollections = false;\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact;\n }\n\n if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {\n if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n flowIndent = parentIndent;\n } else {\n flowIndent = parentIndent + 1;\n }\n\n blockIndent = state.position - state.lineStart;\n\n if (indentStatus === 1) {\n if (allowBlockCollections &&\n (readBlockSequence(state, blockIndent) ||\n readBlockMapping(state, blockIndent, flowIndent)) ||\n readFlowCollection(state, flowIndent)) {\n hasContent = true;\n } else {\n if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\n readSingleQuotedScalar(state, flowIndent) ||\n readDoubleQuotedScalar(state, flowIndent)) {\n hasContent = true;\n\n } else if (readAlias(state)) {\n hasContent = true;\n\n if (state.tag !== null || state.anchor !== null) {\n throwError(state, 'alias node should not have any properties');\n }\n\n } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n hasContent = true;\n\n if (state.tag === null) {\n state.tag = '?';\n }\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else if (indentStatus === 0) {\n // Special case: block sequences are allowed to have same indentation level as the parent.\n // http://www.yaml.org/spec/1.2/spec.html#id2799784\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n }\n }\n\n if (state.tag === null) {\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n\n } else if (state.tag === '?') {\n // Implicit resolving is not allowed for non-scalar types, and '?'\n // non-specific tag is only automatically assigned to plain scalars.\n //\n // We only need to check kind conformity in case user explicitly assigns '?'\n // tag, for example like this: \"! [0]\"\n //\n if (state.result !== null && state.kind !== 'scalar') {\n throwError(state, 'unacceptable node kind for ! tag; it should be \"scalar\", not \"' + state.kind + '\"');\n }\n\n for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {\n type = state.implicitTypes[typeIndex];\n\n if (type.resolve(state.result)) { // `state.result` updated in resolver if matched\n state.result = type.construct(state.result);\n state.tag = type.tag;\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n break;\n }\n }\n } else if (state.tag !== '!') {\n if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) {\n type = state.typeMap[state.kind || 'fallback'][state.tag];\n } else {\n // looking for multi type\n type = null;\n typeList = state.typeMap.multi[state.kind || 'fallback'];\n\n for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {\n if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {\n type = typeList[typeIndex];\n break;\n }\n }\n }\n\n if (!type) {\n throwError(state, 'unknown tag !<' + state.tag + '>');\n }\n\n if (state.result !== null && type.kind !== state.kind) {\n throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n }\n\n if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched\n throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n } else {\n state.result = type.construct(state.result, state.tag);\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n }\n\n if (state.listener !== null) {\n state.listener('close', state);\n }\n return state.tag !== null || state.anchor !== null || hasContent;\n}\n\nfunction readDocument(state) {\n var documentStart = state.position,\n _position,\n directiveName,\n directiveArgs,\n hasDirectives = false,\n ch;\n\n state.version = null;\n state.checkLineBreaks = state.legacy;\n state.tagMap = Object.create(null);\n state.anchorMap = Object.create(null);\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if (state.lineIndent > 0 || ch !== 0x25/* % */) {\n break;\n }\n\n hasDirectives = true;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveName = state.input.slice(_position, state.position);\n directiveArgs = [];\n\n if (directiveName.length < 1) {\n throwError(state, 'directive name must not be less than one character in length');\n }\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && !is_EOL(ch));\n break;\n }\n\n if (is_EOL(ch)) break;\n\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveArgs.push(state.input.slice(_position, state.position));\n }\n\n if (ch !== 0) readLineBreak(state);\n\n if (_hasOwnProperty.call(directiveHandlers, directiveName)) {\n directiveHandlers[directiveName](state, directiveName, directiveArgs);\n } else {\n throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n }\n }\n\n skipSeparationSpace(state, true, -1);\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected');\n }\n\n composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n skipSeparationSpace(state, true, -1);\n\n if (state.checkLineBreaks &&\n PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n }\n\n state.documents.push(state.result);\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n\n if (state.input.charCodeAt(state.position) === 0x2E/* . */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n return;\n }\n\n if (state.position < (state.length - 1)) {\n throwError(state, 'end of the stream or a document separator is expected');\n } else {\n return;\n }\n}\n\n\nfunction loadDocuments(input, options) {\n input = String(input);\n options = options || {};\n\n if (input.length !== 0) {\n\n // Add tailing `\\n` if not exists\n if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&\n input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {\n input += '\\n';\n }\n\n // Strip BOM\n if (input.charCodeAt(0) === 0xFEFF) {\n input = input.slice(1);\n }\n }\n\n var state = new State(input, options);\n\n var nullpos = input.indexOf('\\0');\n\n if (nullpos !== -1) {\n state.position = nullpos;\n throwError(state, 'null byte is not allowed in input');\n }\n\n // Use 0 as string terminator. That significantly simplifies bounds check.\n state.input += '\\0';\n\n while (state.input.charCodeAt(state.position) === 0x20/* Space */) {\n state.lineIndent += 1;\n state.position += 1;\n }\n\n while (state.position < (state.length - 1)) {\n readDocument(state);\n }\n\n return state.documents;\n}\n\n\nfunction loadAll(input, iterator, options) {\n if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {\n options = iterator;\n iterator = null;\n }\n\n var documents = loadDocuments(input, options);\n\n if (typeof iterator !== 'function') {\n return documents;\n }\n\n for (var index = 0, length = documents.length; index < length; index += 1) {\n iterator(documents[index]);\n }\n}\n\n\nfunction load(input, options) {\n var documents = loadDocuments(input, options);\n\n if (documents.length === 0) {\n /*eslint-disable no-undefined*/\n return undefined;\n } else if (documents.length === 1) {\n return documents[0];\n }\n throw new YAMLException('expected a single document in the stream, but found more');\n}\n\n\nmodule.exports.loadAll = loadAll;\nmodule.exports.load = load;\n","'use strict';\n\n/*eslint-disable max-len*/\n\nvar YAMLException = require('./exception');\nvar Type = require('./type');\n\n\nfunction compileList(schema, name) {\n var result = [];\n\n schema[name].forEach(function (currentType) {\n var newIndex = result.length;\n\n result.forEach(function (previousType, previousIndex) {\n if (previousType.tag === currentType.tag &&\n previousType.kind === currentType.kind &&\n previousType.multi === currentType.multi) {\n\n newIndex = previousIndex;\n }\n });\n\n result[newIndex] = currentType;\n });\n\n return result;\n}\n\n\nfunction compileMap(/* lists... */) {\n var result = {\n scalar: {},\n sequence: {},\n mapping: {},\n fallback: {},\n multi: {\n scalar: [],\n sequence: [],\n mapping: [],\n fallback: []\n }\n }, index, length;\n\n function collectType(type) {\n if (type.multi) {\n result.multi[type.kind].push(type);\n result.multi['fallback'].push(type);\n } else {\n result[type.kind][type.tag] = result['fallback'][type.tag] = type;\n }\n }\n\n for (index = 0, length = arguments.length; index < length; index += 1) {\n arguments[index].forEach(collectType);\n }\n return result;\n}\n\n\nfunction Schema(definition) {\n return this.extend(definition);\n}\n\n\nSchema.prototype.extend = function extend(definition) {\n var implicit = [];\n var explicit = [];\n\n if (definition instanceof Type) {\n // Schema.extend(type)\n explicit.push(definition);\n\n } else if (Array.isArray(definition)) {\n // Schema.extend([ type1, type2, ... ])\n explicit = explicit.concat(definition);\n\n } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {\n // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })\n if (definition.implicit) implicit = implicit.concat(definition.implicit);\n if (definition.explicit) explicit = explicit.concat(definition.explicit);\n\n } else {\n throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' +\n 'or a schema definition ({ implicit: [...], explicit: [...] })');\n }\n\n implicit.forEach(function (type) {\n if (!(type instanceof Type)) {\n throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n\n if (type.loadKind && type.loadKind !== 'scalar') {\n throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n }\n\n if (type.multi) {\n throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.');\n }\n });\n\n explicit.forEach(function (type) {\n if (!(type instanceof Type)) {\n throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n });\n\n var result = Object.create(Schema.prototype);\n\n result.implicit = (this.implicit || []).concat(implicit);\n result.explicit = (this.explicit || []).concat(explicit);\n\n result.compiledImplicit = compileList(result, 'implicit');\n result.compiledExplicit = compileList(result, 'explicit');\n result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);\n\n return result;\n};\n\n\nmodule.exports = Schema;\n","// Standard YAML's Core schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2804923\n//\n// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.\n// So, Core schema has no distinctions from JSON schema is JS-YAML.\n\n\n'use strict';\n\n\nmodule.exports = require('./json');\n","// JS-YAML's default schema for `safeLoad` function.\n// It is not described in the YAML specification.\n//\n// This schema is based on standard YAML's Core schema and includes most of\n// extra types described at YAML tag repository. (http://yaml.org/type/)\n\n\n'use strict';\n\n\nmodule.exports = require('./core').extend({\n implicit: [\n require('../type/timestamp'),\n require('../type/merge')\n ],\n explicit: [\n require('../type/binary'),\n require('../type/omap'),\n require('../type/pairs'),\n require('../type/set')\n ]\n});\n","// Standard YAML's Failsafe schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2802346\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n explicit: [\n require('../type/str'),\n require('../type/seq'),\n require('../type/map')\n ]\n});\n","// Standard YAML's JSON schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2803231\n//\n// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.\n// So, this schema is not such strict as defined in the YAML specification.\n// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc.\n\n\n'use strict';\n\n\nmodule.exports = require('./failsafe').extend({\n implicit: [\n require('../type/null'),\n require('../type/bool'),\n require('../type/int'),\n require('../type/float')\n ]\n});\n","'use strict';\n\n\nvar common = require('./common');\n\n\n// get snippet for a single line, respecting maxLength\nfunction getLine(buffer, lineStart, lineEnd, position, maxLineLength) {\n var head = '';\n var tail = '';\n var maxHalfLength = Math.floor(maxLineLength / 2) - 1;\n\n if (position - lineStart > maxHalfLength) {\n head = ' ... ';\n lineStart = position - maxHalfLength + head.length;\n }\n\n if (lineEnd - position > maxHalfLength) {\n tail = ' ...';\n lineEnd = position + maxHalfLength - tail.length;\n }\n\n return {\n str: head + buffer.slice(lineStart, lineEnd).replace(/\\t/g, '→') + tail,\n pos: position - lineStart + head.length // relative position\n };\n}\n\n\nfunction padStart(string, max) {\n return common.repeat(' ', max - string.length) + string;\n}\n\n\nfunction makeSnippet(mark, options) {\n options = Object.create(options || null);\n\n if (!mark.buffer) return null;\n\n if (!options.maxLength) options.maxLength = 79;\n if (typeof options.indent !== 'number') options.indent = 1;\n if (typeof options.linesBefore !== 'number') options.linesBefore = 3;\n if (typeof options.linesAfter !== 'number') options.linesAfter = 2;\n\n var re = /\\r?\\n|\\r|\\0/g;\n var lineStarts = [ 0 ];\n var lineEnds = [];\n var match;\n var foundLineNo = -1;\n\n while ((match = re.exec(mark.buffer))) {\n lineEnds.push(match.index);\n lineStarts.push(match.index + match[0].length);\n\n if (mark.position <= match.index && foundLineNo < 0) {\n foundLineNo = lineStarts.length - 2;\n }\n }\n\n if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;\n\n var result = '', i, line;\n var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;\n var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);\n\n for (i = 1; i <= options.linesBefore; i++) {\n if (foundLineNo - i < 0) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo - i],\n lineEnds[foundLineNo - i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),\n maxLineLength\n );\n result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n' + result;\n }\n\n line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);\n result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\\n';\n\n for (i = 1; i <= options.linesAfter; i++) {\n if (foundLineNo + i >= lineEnds.length) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo + i],\n lineEnds[foundLineNo + i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),\n maxLineLength\n );\n result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n }\n\n return result.replace(/\\n$/, '');\n}\n\n\nmodule.exports = makeSnippet;\n","'use strict';\n\nvar YAMLException = require('./exception');\n\nvar TYPE_CONSTRUCTOR_OPTIONS = [\n 'kind',\n 'multi',\n 'resolve',\n 'construct',\n 'instanceOf',\n 'predicate',\n 'represent',\n 'representName',\n 'defaultStyle',\n 'styleAliases'\n];\n\nvar YAML_NODE_KINDS = [\n 'scalar',\n 'sequence',\n 'mapping'\n];\n\nfunction compileStyleAliases(map) {\n var result = {};\n\n if (map !== null) {\n Object.keys(map).forEach(function (style) {\n map[style].forEach(function (alias) {\n result[String(alias)] = style;\n });\n });\n }\n\n return result;\n}\n\nfunction Type(tag, options) {\n options = options || {};\n\n Object.keys(options).forEach(function (name) {\n if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {\n throw new YAMLException('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n }\n });\n\n // TODO: Add tag format check.\n this.options = options; // keep original options in case user wants to extend this type later\n this.tag = tag;\n this.kind = options['kind'] || null;\n this.resolve = options['resolve'] || function () { return true; };\n this.construct = options['construct'] || function (data) { return data; };\n this.instanceOf = options['instanceOf'] || null;\n this.predicate = options['predicate'] || null;\n this.represent = options['represent'] || null;\n this.representName = options['representName'] || null;\n this.defaultStyle = options['defaultStyle'] || null;\n this.multi = options['multi'] || false;\n this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\n\n if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {\n throw new YAMLException('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n }\n}\n\nmodule.exports = Type;\n","'use strict';\n\n/*eslint-disable no-bitwise*/\n\n\nvar Type = require('../type');\n\n\n// [ 64, 65, 66 ] -> [ padding, CR, LF ]\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r';\n\n\nfunction resolveYamlBinary(data) {\n if (data === null) return false;\n\n var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;\n\n // Convert one by one.\n for (idx = 0; idx < max; idx++) {\n code = map.indexOf(data.charAt(idx));\n\n // Skip CR/LF\n if (code > 64) continue;\n\n // Fail on illegal characters\n if (code < 0) return false;\n\n bitlen += 6;\n }\n\n // If there are any bits left, source was corrupted\n return (bitlen % 8) === 0;\n}\n\nfunction constructYamlBinary(data) {\n var idx, tailbits,\n input = data.replace(/[\\r\\n=]/g, ''), // remove CR/LF & padding to simplify scan\n max = input.length,\n map = BASE64_MAP,\n bits = 0,\n result = [];\n\n // Collect by 6*4 bits (3 bytes)\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 4 === 0) && idx) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n }\n\n bits = (bits << 6) | map.indexOf(input.charAt(idx));\n }\n\n // Dump tail\n\n tailbits = (max % 4) * 6;\n\n if (tailbits === 0) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n } else if (tailbits === 18) {\n result.push((bits >> 10) & 0xFF);\n result.push((bits >> 2) & 0xFF);\n } else if (tailbits === 12) {\n result.push((bits >> 4) & 0xFF);\n }\n\n return new Uint8Array(result);\n}\n\nfunction representYamlBinary(object /*, style*/) {\n var result = '', bits = 0, idx, tail,\n max = object.length,\n map = BASE64_MAP;\n\n // Convert every three bytes to 4 ASCII characters.\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 3 === 0) && idx) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n }\n\n bits = (bits << 8) + object[idx];\n }\n\n // Dump tail\n\n tail = max % 3;\n\n if (tail === 0) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n } else if (tail === 2) {\n result += map[(bits >> 10) & 0x3F];\n result += map[(bits >> 4) & 0x3F];\n result += map[(bits << 2) & 0x3F];\n result += map[64];\n } else if (tail === 1) {\n result += map[(bits >> 2) & 0x3F];\n result += map[(bits << 4) & 0x3F];\n result += map[64];\n result += map[64];\n }\n\n return result;\n}\n\nfunction isBinary(obj) {\n return Object.prototype.toString.call(obj) === '[object Uint8Array]';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:binary', {\n kind: 'scalar',\n resolve: resolveYamlBinary,\n construct: constructYamlBinary,\n predicate: isBinary,\n represent: representYamlBinary\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlBoolean(data) {\n if (data === null) return false;\n\n var max = data.length;\n\n return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\n (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\n}\n\nfunction constructYamlBoolean(data) {\n return data === 'true' ||\n data === 'True' ||\n data === 'TRUE';\n}\n\nfunction isBoolean(object) {\n return Object.prototype.toString.call(object) === '[object Boolean]';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:bool', {\n kind: 'scalar',\n resolve: resolveYamlBoolean,\n construct: constructYamlBoolean,\n predicate: isBoolean,\n represent: {\n lowercase: function (object) { return object ? 'true' : 'false'; },\n uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\n camelcase: function (object) { return object ? 'True' : 'False'; }\n },\n defaultStyle: 'lowercase'\n});\n","'use strict';\n\nvar common = require('../common');\nvar Type = require('../type');\n\nvar YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n // special case, seems not from spec\n '|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$');\n\nfunction resolveYamlFloat(data) {\n if (data === null) return false;\n\n if (!YAML_FLOAT_PATTERN.test(data) ||\n // Quick hack to not allow integers end with `_`\n // Probably should update regexp & check speed\n data[data.length - 1] === '_') {\n return false;\n }\n\n return true;\n}\n\nfunction constructYamlFloat(data) {\n var value, sign;\n\n value = data.replace(/_/g, '').toLowerCase();\n sign = value[0] === '-' ? -1 : 1;\n\n if ('+-'.indexOf(value[0]) >= 0) {\n value = value.slice(1);\n }\n\n if (value === '.inf') {\n return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n\n } else if (value === '.nan') {\n return NaN;\n }\n return sign * parseFloat(value, 10);\n}\n\n\nvar SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;\n\nfunction representYamlFloat(object, style) {\n var res;\n\n if (isNaN(object)) {\n switch (style) {\n case 'lowercase': return '.nan';\n case 'uppercase': return '.NAN';\n case 'camelcase': return '.NaN';\n }\n } else if (Number.POSITIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '.inf';\n case 'uppercase': return '.INF';\n case 'camelcase': return '.Inf';\n }\n } else if (Number.NEGATIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '-.inf';\n case 'uppercase': return '-.INF';\n case 'camelcase': return '-.Inf';\n }\n } else if (common.isNegativeZero(object)) {\n return '-0.0';\n }\n\n res = object.toString(10);\n\n // JS stringifier can build scientific format without dots: 5e-100,\n // while YAML requres dot: 5.e-100. Fix it with simple hack\n\n return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;\n}\n\nfunction isFloat(object) {\n return (Object.prototype.toString.call(object) === '[object Number]') &&\n (object % 1 !== 0 || common.isNegativeZero(object));\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:float', {\n kind: 'scalar',\n resolve: resolveYamlFloat,\n construct: constructYamlFloat,\n predicate: isFloat,\n represent: representYamlFloat,\n defaultStyle: 'lowercase'\n});\n","'use strict';\n\nvar common = require('../common');\nvar Type = require('../type');\n\nfunction isHexCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||\n ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||\n ((0x61/* a */ <= c) && (c <= 0x66/* f */));\n}\n\nfunction isOctCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));\n}\n\nfunction isDecCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));\n}\n\nfunction resolveYamlInteger(data) {\n if (data === null) return false;\n\n var max = data.length,\n index = 0,\n hasDigits = false,\n ch;\n\n if (!max) return false;\n\n ch = data[index];\n\n // sign\n if (ch === '-' || ch === '+') {\n ch = data[++index];\n }\n\n if (ch === '0') {\n // 0\n if (index + 1 === max) return true;\n ch = data[++index];\n\n // base 2, base 8, base 16\n\n if (ch === 'b') {\n // base 2\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch !== '0' && ch !== '1') return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'x') {\n // base 16\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isHexCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'o') {\n // base 8\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isOctCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n }\n\n // base 10 (except 0)\n\n // value should not start with `_`;\n if (ch === '_') return false;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isDecCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n\n // Should have digits and should not end with `_`\n if (!hasDigits || ch === '_') return false;\n\n return true;\n}\n\nfunction constructYamlInteger(data) {\n var value = data, sign = 1, ch;\n\n if (value.indexOf('_') !== -1) {\n value = value.replace(/_/g, '');\n }\n\n ch = value[0];\n\n if (ch === '-' || ch === '+') {\n if (ch === '-') sign = -1;\n value = value.slice(1);\n ch = value[0];\n }\n\n if (value === '0') return 0;\n\n if (ch === '0') {\n if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);\n if (value[1] === 'x') return sign * parseInt(value.slice(2), 16);\n if (value[1] === 'o') return sign * parseInt(value.slice(2), 8);\n }\n\n return sign * parseInt(value, 10);\n}\n\nfunction isInteger(object) {\n return (Object.prototype.toString.call(object)) === '[object Number]' &&\n (object % 1 === 0 && !common.isNegativeZero(object));\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:int', {\n kind: 'scalar',\n resolve: resolveYamlInteger,\n construct: constructYamlInteger,\n predicate: isInteger,\n represent: {\n binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },\n octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); },\n decimal: function (obj) { return obj.toString(10); },\n /* eslint-disable max-len */\n hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }\n },\n defaultStyle: 'decimal',\n styleAliases: {\n binary: [ 2, 'bin' ],\n octal: [ 8, 'oct' ],\n decimal: [ 10, 'dec' ],\n hexadecimal: [ 16, 'hex' ]\n }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:map', {\n kind: 'mapping',\n construct: function (data) { return data !== null ? data : {}; }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlMerge(data) {\n return data === '<<' || data === null;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:merge', {\n kind: 'scalar',\n resolve: resolveYamlMerge\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlNull(data) {\n if (data === null) return true;\n\n var max = data.length;\n\n return (max === 1 && data === '~') ||\n (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\n}\n\nfunction constructYamlNull() {\n return null;\n}\n\nfunction isNull(object) {\n return object === null;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:null', {\n kind: 'scalar',\n resolve: resolveYamlNull,\n construct: constructYamlNull,\n predicate: isNull,\n represent: {\n canonical: function () { return '~'; },\n lowercase: function () { return 'null'; },\n uppercase: function () { return 'NULL'; },\n camelcase: function () { return 'Null'; },\n empty: function () { return ''; }\n },\n defaultStyle: 'lowercase'\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\nvar _toString = Object.prototype.toString;\n\nfunction resolveYamlOmap(data) {\n if (data === null) return true;\n\n var objectKeys = [], index, length, pair, pairKey, pairHasKey,\n object = data;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n pairHasKey = false;\n\n if (_toString.call(pair) !== '[object Object]') return false;\n\n for (pairKey in pair) {\n if (_hasOwnProperty.call(pair, pairKey)) {\n if (!pairHasKey) pairHasKey = true;\n else return false;\n }\n }\n\n if (!pairHasKey) return false;\n\n if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);\n else return false;\n }\n\n return true;\n}\n\nfunction constructYamlOmap(data) {\n return data !== null ? data : [];\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:omap', {\n kind: 'sequence',\n resolve: resolveYamlOmap,\n construct: constructYamlOmap\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _toString = Object.prototype.toString;\n\nfunction resolveYamlPairs(data) {\n if (data === null) return true;\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n if (_toString.call(pair) !== '[object Object]') return false;\n\n keys = Object.keys(pair);\n\n if (keys.length !== 1) return false;\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return true;\n}\n\nfunction constructYamlPairs(data) {\n if (data === null) return [];\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n keys = Object.keys(pair);\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return result;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:pairs', {\n kind: 'sequence',\n resolve: resolveYamlPairs,\n construct: constructYamlPairs\n});\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:seq', {\n kind: 'sequence',\n construct: function (data) { return data !== null ? data : []; }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction resolveYamlSet(data) {\n if (data === null) return true;\n\n var key, object = data;\n\n for (key in object) {\n if (_hasOwnProperty.call(object, key)) {\n if (object[key] !== null) return false;\n }\n }\n\n return true;\n}\n\nfunction constructYamlSet(data) {\n return data !== null ? data : {};\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:set', {\n kind: 'mapping',\n resolve: resolveYamlSet,\n construct: constructYamlSet\n});\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:str', {\n kind: 'scalar',\n construct: function (data) { return data !== null ? data : ''; }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9])' + // [2] month\n '-([0-9][0-9])$'); // [3] day\n\nvar YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9]?)' + // [2] month\n '-([0-9][0-9]?)' + // [3] day\n '(?:[Tt]|[ \\\\t]+)' + // ...\n '([0-9][0-9]?)' + // [4] hour\n ':([0-9][0-9])' + // [5] minute\n ':([0-9][0-9])' + // [6] second\n '(?:\\\\.([0-9]*))?' + // [7] fraction\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour\n '(?::([0-9][0-9]))?))?$'); // [11] tz_minute\n\nfunction resolveYamlTimestamp(data) {\n if (data === null) return false;\n if (YAML_DATE_REGEXP.exec(data) !== null) return true;\n if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;\n return false;\n}\n\nfunction constructYamlTimestamp(data) {\n var match, year, month, day, hour, minute, second, fraction = 0,\n delta = null, tz_hour, tz_minute, date;\n\n match = YAML_DATE_REGEXP.exec(data);\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);\n\n if (match === null) throw new Error('Date resolve error');\n\n // match: [1] year [2] month [3] day\n\n year = +(match[1]);\n month = +(match[2]) - 1; // JS month starts with 0\n day = +(match[3]);\n\n if (!match[4]) { // no hour\n return new Date(Date.UTC(year, month, day));\n }\n\n // match: [4] hour [5] minute [6] second [7] fraction\n\n hour = +(match[4]);\n minute = +(match[5]);\n second = +(match[6]);\n\n if (match[7]) {\n fraction = match[7].slice(0, 3);\n while (fraction.length < 3) { // milli-seconds\n fraction += '0';\n }\n fraction = +fraction;\n }\n\n // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\n\n if (match[9]) {\n tz_hour = +(match[10]);\n tz_minute = +(match[11] || 0);\n delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\n if (match[9] === '-') delta = -delta;\n }\n\n date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n\n if (delta) date.setTime(date.getTime() - delta);\n\n return date;\n}\n\nfunction representYamlTimestamp(object /*, style*/) {\n return object.toISOString();\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:timestamp', {\n kind: 'scalar',\n resolve: resolveYamlTimestamp,\n construct: constructYamlTimestamp,\n instanceOf: Date,\n represent: representYamlTimestamp\n});\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n 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(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","var wrappy = require('wrappy')\nmodule.exports = wrappy(once)\nmodule.exports.strict = wrappy(onceStrict)\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n\n Object.defineProperty(Function.prototype, 'onceStrict', {\n value: function () {\n return onceStrict(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var f = function () {\n if (f.called) return f.value\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n f.called = false\n return f\n}\n\nfunction onceStrict (fn) {\n var f = function () {\n if (f.called)\n throw new Error(f.onceError)\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n var name = fn.name || 'Function wrapped with `once`'\n f.onceError = name + \" shouldn't be called more than once\"\n f.called = false\n return f\n}\n","'use strict';\n\nfunction posix(path) {\n\treturn path.charAt(0) === '/';\n}\n\nfunction win32(path) {\n\t// https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56\n\tvar splitDeviceRe = /^([a-zA-Z]:|[\\\\\\/]{2}[^\\\\\\/]+[\\\\\\/]+[^\\\\\\/]+)?([\\\\\\/])?([\\s\\S]*?)$/;\n\tvar result = splitDeviceRe.exec(path);\n\tvar device = result[1] || '';\n\tvar isUnc = Boolean(device && device.charAt(1) !== ':');\n\n\t// UNC paths are always absolute\n\treturn Boolean(result[2] || isUnc);\n}\n\nmodule.exports = process.platform === 'win32' ? win32 : posix;\nmodule.exports.posix = posix;\nmodule.exports.win32 = win32;\n","/* global define */\n\n(function (root, pluralize) {\n /* istanbul ignore else */\n if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') {\n // Node.\n module.exports = pluralize();\n } else if (typeof define === 'function' && define.amd) {\n // AMD, registers as an anonymous module.\n define(function () {\n return pluralize();\n });\n } else {\n // Browser global.\n root.pluralize = pluralize();\n }\n})(this, function () {\n // Rule storage - pluralize and singularize need to be run sequentially,\n // while other rules can be optimized using an object for instant lookups.\n var pluralRules = [];\n var singularRules = [];\n var uncountables = {};\n var irregularPlurals = {};\n var irregularSingles = {};\n\n /**\n * Sanitize a pluralization rule to a usable regular expression.\n *\n * @param {(RegExp|string)} rule\n * @return {RegExp}\n */\n function sanitizeRule (rule) {\n if (typeof rule === 'string') {\n return new RegExp('^' + rule + '$', 'i');\n }\n\n return rule;\n }\n\n /**\n * Pass in a word token to produce a function that can replicate the case on\n * another word.\n *\n * @param {string} word\n * @param {string} token\n * @return {Function}\n */\n function restoreCase (word, token) {\n // Tokens are an exact match.\n if (word === token) return token;\n\n // Lower cased words. E.g. \"hello\".\n if (word === word.toLowerCase()) return token.toLowerCase();\n\n // Upper cased words. E.g. \"WHISKY\".\n if (word === word.toUpperCase()) return token.toUpperCase();\n\n // Title cased words. E.g. \"Title\".\n if (word[0] === word[0].toUpperCase()) {\n return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();\n }\n\n // Lower cased words. E.g. \"test\".\n return token.toLowerCase();\n }\n\n /**\n * Interpolate a regexp string.\n *\n * @param {string} str\n * @param {Array} args\n * @return {string}\n */\n function interpolate (str, args) {\n return str.replace(/\\$(\\d{1,2})/g, function (match, index) {\n return args[index] || '';\n });\n }\n\n /**\n * Replace a word using a rule.\n *\n * @param {string} word\n * @param {Array} rule\n * @return {string}\n */\n function replace (word, rule) {\n return word.replace(rule[0], function (match, index) {\n var result = interpolate(rule[1], arguments);\n\n if (match === '') {\n return restoreCase(word[index - 1], result);\n }\n\n return restoreCase(match, result);\n });\n }\n\n /**\n * Sanitize a word by passing in the word and sanitization rules.\n *\n * @param {string} token\n * @param {string} word\n * @param {Array} rules\n * @return {string}\n */\n function sanitizeWord (token, word, rules) {\n // Empty string or doesn't need fixing.\n if (!token.length || uncountables.hasOwnProperty(token)) {\n return word;\n }\n\n var len = rules.length;\n\n // Iterate over the sanitization rules and use the first one to match.\n while (len--) {\n var rule = rules[len];\n\n if (rule[0].test(word)) return replace(word, rule);\n }\n\n return word;\n }\n\n /**\n * Replace a word with the updated word.\n *\n * @param {Object} replaceMap\n * @param {Object} keepMap\n * @param {Array} rules\n * @return {Function}\n */\n function replaceWord (replaceMap, keepMap, rules) {\n return function (word) {\n // Get the correct token and case restoration functions.\n var token = word.toLowerCase();\n\n // Check against the keep object map.\n if (keepMap.hasOwnProperty(token)) {\n return restoreCase(word, token);\n }\n\n // Check against the replacement map for a direct word replacement.\n if (replaceMap.hasOwnProperty(token)) {\n return restoreCase(word, replaceMap[token]);\n }\n\n // Run all the rules against the word.\n return sanitizeWord(token, word, rules);\n };\n }\n\n /**\n * Check if a word is part of the map.\n */\n function checkWord (replaceMap, keepMap, rules, bool) {\n return function (word) {\n var token = word.toLowerCase();\n\n if (keepMap.hasOwnProperty(token)) return true;\n if (replaceMap.hasOwnProperty(token)) return false;\n\n return sanitizeWord(token, token, rules) === token;\n };\n }\n\n /**\n * Pluralize or singularize a word based on the passed in count.\n *\n * @param {string} word The word to pluralize\n * @param {number} count How many of the word exist\n * @param {boolean} inclusive Whether to prefix with the number (e.g. 3 ducks)\n * @return {string}\n */\n function pluralize (word, count, inclusive) {\n var pluralized = count === 1\n ? pluralize.singular(word) : pluralize.plural(word);\n\n return (inclusive ? count + ' ' : '') + pluralized;\n }\n\n /**\n * Pluralize a word.\n *\n * @type {Function}\n */\n pluralize.plural = replaceWord(\n irregularSingles, irregularPlurals, pluralRules\n );\n\n /**\n * Check if a word is plural.\n *\n * @type {Function}\n */\n pluralize.isPlural = checkWord(\n irregularSingles, irregularPlurals, pluralRules\n );\n\n /**\n * Singularize a word.\n *\n * @type {Function}\n */\n pluralize.singular = replaceWord(\n irregularPlurals, irregularSingles, singularRules\n );\n\n /**\n * Check if a word is singular.\n *\n * @type {Function}\n */\n pluralize.isSingular = checkWord(\n irregularPlurals, irregularSingles, singularRules\n );\n\n /**\n * Add a pluralization rule to the collection.\n *\n * @param {(string|RegExp)} rule\n * @param {string} replacement\n */\n pluralize.addPluralRule = function (rule, replacement) {\n pluralRules.push([sanitizeRule(rule), replacement]);\n };\n\n /**\n * Add a singularization rule to the collection.\n *\n * @param {(string|RegExp)} rule\n * @param {string} replacement\n */\n pluralize.addSingularRule = function (rule, replacement) {\n singularRules.push([sanitizeRule(rule), replacement]);\n };\n\n /**\n * Add an uncountable word rule.\n *\n * @param {(string|RegExp)} word\n */\n pluralize.addUncountableRule = function (word) {\n if (typeof word === 'string') {\n uncountables[word.toLowerCase()] = true;\n return;\n }\n\n // Set singular and plural references for the word.\n pluralize.addPluralRule(word, '$0');\n pluralize.addSingularRule(word, '$0');\n };\n\n /**\n * Add an irregular word definition.\n *\n * @param {string} single\n * @param {string} plural\n */\n pluralize.addIrregularRule = function (single, plural) {\n plural = plural.toLowerCase();\n single = single.toLowerCase();\n\n irregularSingles[single] = plural;\n irregularPlurals[plural] = single;\n };\n\n /**\n * Irregular rules.\n */\n [\n // Pronouns.\n ['I', 'we'],\n ['me', 'us'],\n ['he', 'they'],\n ['she', 'they'],\n ['them', 'them'],\n ['myself', 'ourselves'],\n ['yourself', 'yourselves'],\n ['itself', 'themselves'],\n ['herself', 'themselves'],\n ['himself', 'themselves'],\n ['themself', 'themselves'],\n ['is', 'are'],\n ['was', 'were'],\n ['has', 'have'],\n ['this', 'these'],\n ['that', 'those'],\n // Words ending in with a consonant and `o`.\n ['echo', 'echoes'],\n ['dingo', 'dingoes'],\n ['volcano', 'volcanoes'],\n ['tornado', 'tornadoes'],\n ['torpedo', 'torpedoes'],\n // Ends with `us`.\n ['genus', 'genera'],\n ['viscus', 'viscera'],\n // Ends with `ma`.\n ['stigma', 'stigmata'],\n ['stoma', 'stomata'],\n ['dogma', 'dogmata'],\n ['lemma', 'lemmata'],\n ['schema', 'schemata'],\n ['anathema', 'anathemata'],\n // Other irregular rules.\n ['ox', 'oxen'],\n ['axe', 'axes'],\n ['die', 'dice'],\n ['yes', 'yeses'],\n ['foot', 'feet'],\n ['eave', 'eaves'],\n ['goose', 'geese'],\n ['tooth', 'teeth'],\n ['quiz', 'quizzes'],\n ['human', 'humans'],\n ['proof', 'proofs'],\n ['carve', 'carves'],\n ['valve', 'valves'],\n ['looey', 'looies'],\n ['thief', 'thieves'],\n ['groove', 'grooves'],\n ['pickaxe', 'pickaxes'],\n ['passerby', 'passersby']\n ].forEach(function (rule) {\n return pluralize.addIrregularRule(rule[0], rule[1]);\n });\n\n /**\n * Pluralization rules.\n */\n [\n [/s?$/i, 's'],\n [/[^\\u0000-\\u007F]$/i, '$0'],\n [/([^aeiou]ese)$/i, '$1'],\n [/(ax|test)is$/i, '$1es'],\n [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, '$1es'],\n [/(e[mn]u)s?$/i, '$1s'],\n [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, '$1'],\n [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1i'],\n [/(alumn|alg|vertebr)(?:a|ae)$/i, '$1ae'],\n [/(seraph|cherub)(?:im)?$/i, '$1im'],\n [/(her|at|gr)o$/i, '$1oes'],\n [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, '$1a'],\n [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, '$1a'],\n [/sis$/i, 'ses'],\n [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, '$1$2ves'],\n [/([^aeiouy]|qu)y$/i, '$1ies'],\n [/([^ch][ieo][ln])ey$/i, '$1ies'],\n [/(x|ch|ss|sh|zz)$/i, '$1es'],\n [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, '$1ices'],\n [/\\b((?:tit)?m|l)(?:ice|ouse)$/i, '$1ice'],\n [/(pe)(?:rson|ople)$/i, '$1ople'],\n [/(child)(?:ren)?$/i, '$1ren'],\n [/eaux$/i, '$0'],\n [/m[ae]n$/i, 'men'],\n ['thou', 'you']\n ].forEach(function (rule) {\n return pluralize.addPluralRule(rule[0], rule[1]);\n });\n\n /**\n * Singularization rules.\n */\n [\n [/s$/i, ''],\n [/(ss)$/i, '$1'],\n [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\\w]|^)li)ves$/i, '$1fe'],\n [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, '$1f'],\n [/ies$/i, 'y'],\n [/\\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, '$1ie'],\n [/\\b(mon|smil)ies$/i, '$1ey'],\n [/\\b((?:tit)?m|l)ice$/i, '$1ouse'],\n [/(seraph|cherub)im$/i, '$1'],\n [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, '$1'],\n [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, '$1sis'],\n [/(movie|twelve|abuse|e[mn]u)s$/i, '$1'],\n [/(test)(?:is|es)$/i, '$1is'],\n [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1us'],\n [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, '$1um'],\n [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, '$1on'],\n [/(alumn|alg|vertebr)ae$/i, '$1a'],\n [/(cod|mur|sil|vert|ind)ices$/i, '$1ex'],\n [/(matr|append)ices$/i, '$1ix'],\n [/(pe)(rson|ople)$/i, '$1rson'],\n [/(child)ren$/i, '$1'],\n [/(eau)x?$/i, '$1'],\n [/men$/i, 'man']\n ].forEach(function (rule) {\n return pluralize.addSingularRule(rule[0], rule[1]);\n });\n\n /**\n * Uncountable rules.\n */\n [\n // Singular words with no plurals.\n 'adulthood',\n 'advice',\n 'agenda',\n 'aid',\n 'aircraft',\n 'alcohol',\n 'ammo',\n 'analytics',\n 'anime',\n 'athletics',\n 'audio',\n 'bison',\n 'blood',\n 'bream',\n 'buffalo',\n 'butter',\n 'carp',\n 'cash',\n 'chassis',\n 'chess',\n 'clothing',\n 'cod',\n 'commerce',\n 'cooperation',\n 'corps',\n 'debris',\n 'diabetes',\n 'digestion',\n 'elk',\n 'energy',\n 'equipment',\n 'excretion',\n 'expertise',\n 'firmware',\n 'flounder',\n 'fun',\n 'gallows',\n 'garbage',\n 'graffiti',\n 'hardware',\n 'headquarters',\n 'health',\n 'herpes',\n 'highjinks',\n 'homework',\n 'housework',\n 'information',\n 'jeans',\n 'justice',\n 'kudos',\n 'labour',\n 'literature',\n 'machinery',\n 'mackerel',\n 'mail',\n 'media',\n 'mews',\n 'moose',\n 'music',\n 'mud',\n 'manga',\n 'news',\n 'only',\n 'personnel',\n 'pike',\n 'plankton',\n 'pliers',\n 'police',\n 'pollution',\n 'premises',\n 'rain',\n 'research',\n 'rice',\n 'salmon',\n 'scissors',\n 'series',\n 'sewage',\n 'shambles',\n 'shrimp',\n 'software',\n 'species',\n 'staff',\n 'swine',\n 'tennis',\n 'traffic',\n 'transportation',\n 'trout',\n 'tuna',\n 'wealth',\n 'welfare',\n 'whiting',\n 'wildebeest',\n 'wildlife',\n 'you',\n /pok[eé]mon$/i,\n // Regexes.\n /[^aeiou]ese$/i, // \"chinese\", \"japanese\"\n /deer$/i, // \"deer\", \"reindeer\"\n /fish$/i, // \"fish\", \"blowfish\", \"angelfish\"\n /measles$/i,\n /o[iu]s$/i, // \"carnivorous\"\n /pox$/i, // \"chickpox\", \"smallpox\"\n /sheep$/i\n ].forEach(pluralize.addUncountableRule);\n\n return pluralize;\n});\n","// minimal library entry point.\n\n\"use strict\";\nmodule.exports = require(\"./src/index-minimal\");\n","\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(\"./writer\");\nprotobuf.BufferWriter = require(\"./writer_buffer\");\nprotobuf.Reader = require(\"./reader\");\nprotobuf.BufferReader = require(\"./reader_buffer\");\n\n// Utility\nprotobuf.util = require(\"./util/minimal\");\nprotobuf.rpc = require(\"./rpc\");\nprotobuf.roots = require(\"./roots\");\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n","\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(\"./util/minimal\");\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n","\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(\"./reader\");\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n","\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n","\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(\"./rpc/service\");\n","\"use strict\";\nmodule.exports = Service;\n\nvar util = require(\"../util/minimal\");\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n","\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(\"../util/minimal\");\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n","\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(\"@protobufjs/aspromise\");\n\n// converts to / from base64 encoded strings\nutil.base64 = require(\"@protobufjs/base64\");\n\n// base class of rpc.Service\nutil.EventEmitter = require(\"@protobufjs/eventemitter\");\n\n// float handling accross browsers\nutil.float = require(\"@protobufjs/float\");\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(\"@protobufjs/inquire\");\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(\"@protobufjs/utf8\");\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(\"@protobufjs/pool\");\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(\"./longbits\");\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.inquire(\"buffer\").Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || util.inquire(\"long\");\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {Object.} src Source object\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\n * @returns {Object.} Destination object\n */\nfunction merge(dst, src, ifNotSet) { // used by converters\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (dst[keys[i]] === undefined || !ifNotSet)\n dst[keys[i]] = src[keys[i]];\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n","\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(\"./util/minimal\");\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return value < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n while (val.hi) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\n val.hi >>>= 7;\n }\n while (val.lo > 127) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = val.lo >>> 7;\n }\n buf[pos++] = val.lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n","\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(\"./writer\");\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n","'use strict'\n\nconst ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { safeRe: re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n","'use strict'\n\nconst SPACE_CHARACTERS = /\\s+/g\n\n// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.formatted = undefined\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')\n\n // First, split on ||\n this.set = this.raw\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.formatted = undefined\n }\n\n get range () {\n if (this.formatted === undefined) {\n this.formatted = ''\n for (let i = 0; i < this.set.length; i++) {\n if (i > 0) {\n this.formatted += '||'\n }\n const comps = this.set[i]\n for (let k = 0; k < comps.length; k++) {\n if (k > 0) {\n this.formatted += ' '\n }\n this.formatted += comps[k].toString().trim()\n }\n }\n }\n return this.formatted\n }\n\n format () {\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n debug('tilde trim', range)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n debug('caret trim', range)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('../internal/lrucache')\nconst cache = new LRU()\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n safeRe: re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceTilde(c, options))\n .join(' ')\n}\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceCaret(c, options))\n .join(' ')\n}\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp\n .split(/\\s+/)\n .map((c) => replaceXRange(c, options))\n .join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp\n .trim()\n .replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp\n .trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\n// TODO build?\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return `${from} ${to}`.trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n","'use strict'\n\nconst debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('build compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n if (release.startsWith('pre')) {\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n // Avoid an invalid semver results\n if (identifier) {\n const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE])\n if (!match || match[1] !== identifier) {\n throw new Error(`invalid identifier: ${identifier}`)\n }\n }\n }\n\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n case 'release':\n if (this.prerelease.length === 0) {\n throw new Error(`version ${this.raw} is not a prerelease`)\n }\n this.prerelease.length = 0\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n","'use strict'\n\nconst parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n","'use strict'\n\nconst eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]\n let next\n while ((next = coerceRtlRegex.exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n coerceRtlRegex.lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n const major = match[2]\n const minor = match[3] || '0'\n const patch = match[4] || '0'\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''\n\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)\n}\nmodule.exports = coerce\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n","'use strict'\n\nconst compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n","'use strict'\n\nconst parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n const lowHasPre = !!lowVersion.prerelease.length\n\n if (lowHasPre && !highHasPre) {\n // Going from prerelease -> no prerelease requires some special casing\n\n // If the low version has only a major, then it will always be a major\n // Some examples:\n // 1.0.0-1 -> 1.0.0\n // 1.0.0-1 -> 1.1.1\n // 1.0.0-1 -> 2.0.0\n if (!lowVersion.patch && !lowVersion.minor) {\n return 'major'\n }\n\n // If the main part has no difference\n if (lowVersion.compareMain(highVersion) === 0) {\n if (lowVersion.minor && !lowVersion.patch) {\n return 'minor'\n }\n return 'patch'\n }\n }\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // high and low are preleases\n return 'prerelease'\n}\n\nmodule.exports = diff\n","'use strict'\n\nconst compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n","'use strict'\n\nconst compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n","'use strict'\n\nconst compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n","'use strict'\n\nconst SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n","'use strict'\n\nconst compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n","'use strict'\n\nconst compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n","'use strict'\n\nconst compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n","'use strict'\n\nconst parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n","'use strict'\n\nconst compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n","'use strict'\n\nconst compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n","'use strict'\n\nconst Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n","'use strict'\n\nconst compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n","'use strict'\n\nconst parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n","'use strict'\n\n// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n","'use strict'\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n","'use strict'\n\nconst debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n","'use strict'\n\nconst numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n","'use strict'\n\nclass LRUCache {\n constructor () {\n this.max = 1000\n this.map = new Map()\n }\n\n get (key) {\n const value = this.map.get(key)\n if (value === undefined) {\n return undefined\n } else {\n // Remove the key from the map and add it to the end\n this.map.delete(key)\n this.map.set(key, value)\n return value\n }\n }\n\n delete (key) {\n return this.map.delete(key)\n }\n\n set (key, value) {\n const deleted = this.delete(key)\n\n if (!deleted && value !== undefined) {\n // If cache is full, delete the least recently used item\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value\n this.delete(firstKey)\n }\n\n this.map.set(key, value)\n }\n\n return this\n }\n}\n\nmodule.exports = LRUCache\n","'use strict'\n\n// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n","'use strict'\n\nconst {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst safeSrc = exports.safeSrc = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n safeSrc[index] = safe\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n// Non-numberic identifiers include numberic identifiers but can be longer.\n// Therefore non-numberic identifiers must go first.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]\n}|${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]\n}|${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n","'use strict'\n\n// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n","'use strict'\n\nconst Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n","'use strict'\n\nconst outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n","'use strict'\n\nconst SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n","'use strict'\n\n// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n","'use strict'\n\nconst Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n","'use strict'\n\nconst Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n","'use strict'\n\nconst Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n","'use strict';\nconst os = require('os');\nconst tty = require('tty');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n","module.exports = require('./lib/tunnel');\n","'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n","'use strict'\n\nconst Client = require('./lib/dispatcher/client')\nconst Dispatcher = require('./lib/dispatcher/dispatcher')\nconst Pool = require('./lib/dispatcher/pool')\nconst BalancedPool = require('./lib/dispatcher/balanced-pool')\nconst RoundRobinPool = require('./lib/dispatcher/round-robin-pool')\nconst Agent = require('./lib/dispatcher/agent')\nconst ProxyAgent = require('./lib/dispatcher/proxy-agent')\nconst Socks5ProxyAgent = require('./lib/dispatcher/socks5-proxy-agent')\nconst EnvHttpProxyAgent = require('./lib/dispatcher/env-http-proxy-agent')\nconst RetryAgent = require('./lib/dispatcher/retry-agent')\nconst H2CClient = require('./lib/dispatcher/h2c-client')\nconst errors = require('./lib/core/errors')\nconst util = require('./lib/core/util')\nconst { InvalidArgumentError } = errors\nconst api = require('./lib/api')\nconst buildConnector = require('./lib/core/connect')\nconst MockClient = require('./lib/mock/mock-client')\nconst { MockCallHistory, MockCallHistoryLog } = require('./lib/mock/mock-call-history')\nconst MockAgent = require('./lib/mock/mock-agent')\nconst MockPool = require('./lib/mock/mock-pool')\nconst SnapshotAgent = require('./lib/mock/snapshot-agent')\nconst mockErrors = require('./lib/mock/mock-errors')\nconst RetryHandler = require('./lib/handler/retry-handler')\nconst { getGlobalDispatcher, setGlobalDispatcher } = require('./lib/global')\nconst DecoratorHandler = require('./lib/handler/decorator-handler')\nconst RedirectHandler = require('./lib/handler/redirect-handler')\n\nObject.assign(Dispatcher.prototype, api)\n\nmodule.exports.Dispatcher = Dispatcher\nmodule.exports.Client = Client\nmodule.exports.Pool = Pool\nmodule.exports.BalancedPool = BalancedPool\nmodule.exports.RoundRobinPool = RoundRobinPool\nmodule.exports.Agent = Agent\nmodule.exports.ProxyAgent = ProxyAgent\nmodule.exports.Socks5ProxyAgent = Socks5ProxyAgent\nmodule.exports.EnvHttpProxyAgent = EnvHttpProxyAgent\nmodule.exports.RetryAgent = RetryAgent\nmodule.exports.H2CClient = H2CClient\nmodule.exports.RetryHandler = RetryHandler\n\nmodule.exports.DecoratorHandler = DecoratorHandler\nmodule.exports.RedirectHandler = RedirectHandler\nmodule.exports.interceptors = {\n redirect: require('./lib/interceptor/redirect'),\n responseError: require('./lib/interceptor/response-error'),\n retry: require('./lib/interceptor/retry'),\n dump: require('./lib/interceptor/dump'),\n dns: require('./lib/interceptor/dns'),\n cache: require('./lib/interceptor/cache'),\n decompress: require('./lib/interceptor/decompress'),\n deduplicate: require('./lib/interceptor/deduplicate')\n}\n\nmodule.exports.cacheStores = {\n MemoryCacheStore: require('./lib/cache/memory-cache-store')\n}\n\nconst SqliteCacheStore = require('./lib/cache/sqlite-cache-store')\nmodule.exports.cacheStores.SqliteCacheStore = SqliteCacheStore\n\nmodule.exports.buildConnector = buildConnector\nmodule.exports.errors = errors\nmodule.exports.util = {\n parseHeaders: util.parseHeaders,\n headerNameToString: util.headerNameToString\n}\n\nfunction makeDispatcher (fn) {\n return (url, opts, handler) => {\n if (typeof opts === 'function') {\n handler = opts\n opts = null\n }\n\n if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) {\n throw new InvalidArgumentError('invalid url')\n }\n\n if (opts != null && typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (opts && opts.path != null) {\n if (typeof opts.path !== 'string') {\n throw new InvalidArgumentError('invalid opts.path')\n }\n\n let path = opts.path\n if (!opts.path.startsWith('/')) {\n path = `/${path}`\n }\n\n url = new URL(util.parseOrigin(url).origin + path)\n } else {\n if (!opts) {\n opts = typeof url === 'object' ? url : {}\n }\n\n url = util.parseURL(url)\n }\n\n const { agent, dispatcher = getGlobalDispatcher() } = opts\n\n if (agent) {\n throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?')\n }\n\n return fn.call(dispatcher, {\n ...opts,\n origin: url.origin,\n path: url.search ? `${url.pathname}${url.search}` : url.pathname,\n method: opts.method || (opts.body ? 'PUT' : 'GET')\n }, handler)\n }\n}\n\nmodule.exports.setGlobalDispatcher = setGlobalDispatcher\nmodule.exports.getGlobalDispatcher = getGlobalDispatcher\n\nconst fetchImpl = require('./lib/web/fetch').fetch\n\n// Capture __filename at module load time for stack trace augmentation.\n// This may be undefined when bundled in environments like Node.js internals.\nconst currentFilename = typeof __filename !== 'undefined' ? __filename : undefined\n\nfunction appendFetchStackTrace (err, filename) {\n if (!err || typeof err !== 'object') {\n return\n }\n\n const stack = typeof err.stack === 'string' ? err.stack : ''\n const normalizedFilename = filename.replace(/\\\\/g, '/')\n\n if (stack && (stack.includes(filename) || stack.includes(normalizedFilename))) {\n return\n }\n\n const capture = {}\n Error.captureStackTrace(capture, appendFetchStackTrace)\n\n if (!capture.stack) {\n return\n }\n\n const captureLines = capture.stack.split('\\n').slice(1).join('\\n')\n\n err.stack = stack ? `${stack}\\n${captureLines}` : capture.stack\n}\n\nmodule.exports.fetch = function fetch (init, options = undefined) {\n return fetchImpl(init, options).catch(err => {\n if (currentFilename) {\n appendFetchStackTrace(err, currentFilename)\n } else if (err && typeof err === 'object') {\n Error.captureStackTrace(err, module.exports.fetch)\n }\n throw err\n })\n}\nmodule.exports.Headers = require('./lib/web/fetch/headers').Headers\nmodule.exports.Response = require('./lib/web/fetch/response').Response\nmodule.exports.Request = require('./lib/web/fetch/request').Request\nmodule.exports.FormData = require('./lib/web/fetch/formdata').FormData\n\nconst { setGlobalOrigin, getGlobalOrigin } = require('./lib/web/fetch/global')\n\nmodule.exports.setGlobalOrigin = setGlobalOrigin\nmodule.exports.getGlobalOrigin = getGlobalOrigin\n\nconst { CacheStorage } = require('./lib/web/cache/cachestorage')\nconst { kConstruct } = require('./lib/core/symbols')\n\nmodule.exports.caches = new CacheStorage(kConstruct)\n\nconst { deleteCookie, getCookies, getSetCookies, setCookie, parseCookie } = require('./lib/web/cookies')\n\nmodule.exports.deleteCookie = deleteCookie\nmodule.exports.getCookies = getCookies\nmodule.exports.getSetCookies = getSetCookies\nmodule.exports.setCookie = setCookie\nmodule.exports.parseCookie = parseCookie\n\nconst { parseMIMEType, serializeAMimeType } = require('./lib/web/fetch/data-url')\n\nmodule.exports.parseMIMEType = parseMIMEType\nmodule.exports.serializeAMimeType = serializeAMimeType\n\nconst { CloseEvent, ErrorEvent, MessageEvent } = require('./lib/web/websocket/events')\nconst { WebSocket, ping } = require('./lib/web/websocket/websocket')\nmodule.exports.WebSocket = WebSocket\nmodule.exports.CloseEvent = CloseEvent\nmodule.exports.ErrorEvent = ErrorEvent\nmodule.exports.MessageEvent = MessageEvent\nmodule.exports.ping = ping\n\nmodule.exports.WebSocketStream = require('./lib/web/websocket/stream/websocketstream').WebSocketStream\nmodule.exports.WebSocketError = require('./lib/web/websocket/stream/websocketerror').WebSocketError\n\nmodule.exports.request = makeDispatcher(api.request)\nmodule.exports.stream = makeDispatcher(api.stream)\nmodule.exports.pipeline = makeDispatcher(api.pipeline)\nmodule.exports.connect = makeDispatcher(api.connect)\nmodule.exports.upgrade = makeDispatcher(api.upgrade)\n\nmodule.exports.MockClient = MockClient\nmodule.exports.MockCallHistory = MockCallHistory\nmodule.exports.MockCallHistoryLog = MockCallHistoryLog\nmodule.exports.MockPool = MockPool\nmodule.exports.MockAgent = MockAgent\nmodule.exports.SnapshotAgent = SnapshotAgent\nmodule.exports.mockErrors = mockErrors\n\nconst { EventSource } = require('./lib/web/eventsource/eventsource')\n\nmodule.exports.EventSource = EventSource\n\nfunction install () {\n globalThis.fetch = module.exports.fetch\n globalThis.Headers = module.exports.Headers\n globalThis.Response = module.exports.Response\n globalThis.Request = module.exports.Request\n globalThis.FormData = module.exports.FormData\n globalThis.WebSocket = module.exports.WebSocket\n globalThis.CloseEvent = module.exports.CloseEvent\n globalThis.ErrorEvent = module.exports.ErrorEvent\n globalThis.MessageEvent = module.exports.MessageEvent\n globalThis.EventSource = module.exports.EventSource\n}\n\nmodule.exports.install = install\n","'use strict'\n\nconst { addAbortListener } = require('../core/util')\nconst { RequestAbortedError } = require('../core/errors')\n\nconst kListener = Symbol('kListener')\nconst kSignal = Symbol('kSignal')\n\nfunction abort (self) {\n if (self.abort) {\n self.abort(self[kSignal]?.reason)\n } else {\n self.reason = self[kSignal]?.reason ?? new RequestAbortedError()\n }\n removeSignal(self)\n}\n\nfunction addSignal (self, signal) {\n self.reason = null\n\n self[kSignal] = null\n self[kListener] = null\n\n if (!signal) {\n return\n }\n\n if (signal.aborted) {\n abort(self)\n return\n }\n\n self[kSignal] = signal\n self[kListener] = () => {\n abort(self)\n }\n\n addAbortListener(self[kSignal], self[kListener])\n}\n\nfunction removeSignal (self) {\n if (!self[kSignal]) {\n return\n }\n\n if ('removeEventListener' in self[kSignal]) {\n self[kSignal].removeEventListener('abort', self[kListener])\n } else {\n self[kSignal].removeListener('abort', self[kListener])\n }\n\n self[kSignal] = null\n self[kListener] = null\n}\n\nmodule.exports = {\n addSignal,\n removeSignal\n}\n","'use strict'\n\nconst assert = require('node:assert')\nconst { AsyncResource } = require('node:async_hooks')\nconst { InvalidArgumentError, SocketError } = require('../core/errors')\nconst util = require('../core/util')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nclass ConnectHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n const { signal, opaque, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n super('UNDICI_CONNECT')\n\n this.opaque = opaque || null\n this.responseHeaders = responseHeaders || null\n this.callback = callback\n this.abort = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (this.reason) {\n abort(this.reason)\n return\n }\n\n assert(this.callback)\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders () {\n throw new SocketError('bad connect', null)\n }\n\n onUpgrade (statusCode, rawHeaders, socket) {\n const { callback, opaque, context } = this\n\n removeSignal(this)\n\n this.callback = null\n\n let headers = rawHeaders\n // Indicates is an HTTP2Session\n if (headers != null) {\n headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n }\n\n this.runInAsyncScope(callback, null, null, {\n statusCode,\n headers,\n socket,\n opaque,\n context\n })\n }\n\n onError (err) {\n const { callback, opaque } = this\n\n removeSignal(this)\n\n if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n }\n}\n\nfunction connect (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n connect.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n const connectHandler = new ConnectHandler(opts, callback)\n const connectOptions = { ...opts, method: 'CONNECT' }\n\n this.dispatch(connectOptions, connectHandler)\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts?.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = connect\n","'use strict'\n\nconst {\n Readable,\n Duplex,\n PassThrough\n} = require('node:stream')\nconst assert = require('node:assert')\nconst { AsyncResource } = require('node:async_hooks')\nconst {\n InvalidArgumentError,\n InvalidReturnValueError,\n RequestAbortedError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nfunction noop () {}\n\nconst kResume = Symbol('resume')\n\nclass PipelineRequest extends Readable {\n constructor () {\n super({ autoDestroy: true })\n\n this[kResume] = null\n }\n\n _read () {\n const { [kResume]: resume } = this\n\n if (resume) {\n this[kResume] = null\n resume()\n }\n }\n\n _destroy (err, callback) {\n this._read()\n\n callback(err)\n }\n}\n\nclass PipelineResponse extends Readable {\n constructor (resume) {\n super({ autoDestroy: true })\n this[kResume] = resume\n }\n\n _read () {\n this[kResume]()\n }\n\n _destroy (err, callback) {\n if (!err && !this._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n callback(err)\n }\n}\n\nclass PipelineHandler extends AsyncResource {\n constructor (opts, handler) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof handler !== 'function') {\n throw new InvalidArgumentError('invalid handler')\n }\n\n const { signal, method, opaque, onInfo, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_PIPELINE')\n\n this.opaque = opaque || null\n this.responseHeaders = responseHeaders || null\n this.handler = handler\n this.abort = null\n this.context = null\n this.onInfo = onInfo || null\n\n this.req = new PipelineRequest().on('error', noop)\n\n this.ret = new Duplex({\n readableObjectMode: opts.objectMode,\n autoDestroy: true,\n read: () => {\n const { body } = this\n\n if (body?.resume) {\n body.resume()\n }\n },\n write: (chunk, encoding, callback) => {\n const { req } = this\n\n if (req.push(chunk, encoding) || req._readableState.destroyed) {\n callback()\n } else {\n req[kResume] = callback\n }\n },\n destroy: (err, callback) => {\n const { body, req, res, ret, abort } = this\n\n if (!err && !ret._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n if (abort && err) {\n abort()\n }\n\n util.destroy(body, err)\n util.destroy(req, err)\n util.destroy(res, err)\n\n removeSignal(this)\n\n callback(err)\n }\n }).on('prefinish', () => {\n const { req } = this\n\n // Node < 15 does not call _final in same tick.\n req.push(null)\n })\n\n this.res = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n const { res } = this\n\n if (this.reason) {\n abort(this.reason)\n return\n }\n\n assert(!res, 'pipeline cannot be retried')\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume) {\n const { opaque, handler, context } = this\n\n if (statusCode < 200) {\n if (this.onInfo) {\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n this.res = new PipelineResponse(resume)\n\n let body\n try {\n this.handler = null\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n body = this.runInAsyncScope(handler, null, {\n statusCode,\n headers,\n opaque,\n body: this.res,\n context\n })\n } catch (err) {\n this.res.on('error', noop)\n throw err\n }\n\n if (!body || typeof body.on !== 'function') {\n throw new InvalidReturnValueError('expected Readable')\n }\n\n body\n .on('data', (chunk) => {\n const { ret, body } = this\n\n if (!ret.push(chunk) && body.pause) {\n body.pause()\n }\n })\n .on('error', (err) => {\n const { ret } = this\n\n util.destroy(ret, err)\n })\n .on('end', () => {\n const { ret } = this\n\n ret.push(null)\n })\n .on('close', () => {\n const { ret } = this\n\n if (!ret._readableState.ended) {\n util.destroy(ret, new RequestAbortedError())\n }\n })\n\n this.body = body\n }\n\n onData (chunk) {\n const { res } = this\n return res.push(chunk)\n }\n\n onComplete (trailers) {\n const { res } = this\n res.push(null)\n }\n\n onError (err) {\n const { ret } = this\n this.handler = null\n util.destroy(ret, err)\n }\n}\n\nfunction pipeline (opts, handler) {\n try {\n const pipelineHandler = new PipelineHandler(opts, handler)\n this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler)\n return pipelineHandler.ret\n } catch (err) {\n return new PassThrough().destroy(err)\n }\n}\n\nmodule.exports = pipeline\n","'use strict'\n\nconst assert = require('node:assert')\nconst { AsyncResource } = require('node:async_hooks')\nconst { Readable } = require('./readable')\nconst { InvalidArgumentError, RequestAbortedError } = require('../core/errors')\nconst util = require('../core/util')\n\nfunction noop () {}\n\nclass RequestHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n const { signal, method, opaque, body, onInfo, responseHeaders, highWaterMark } = opts\n\n try {\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) {\n throw new InvalidArgumentError('invalid highWaterMark')\n }\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_REQUEST')\n } catch (err) {\n if (util.isStream(body)) {\n util.destroy(body.on('error', noop), err)\n }\n throw err\n }\n\n this.method = method\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.callback = callback\n this.res = null\n this.abort = null\n this.body = body\n this.trailers = {}\n this.context = null\n this.onInfo = onInfo || null\n this.highWaterMark = highWaterMark\n this.reason = null\n this.removeAbortListener = null\n\n if (signal?.aborted) {\n this.reason = signal.reason ?? new RequestAbortedError()\n } else if (signal) {\n this.removeAbortListener = util.addAbortListener(signal, () => {\n this.reason = signal.reason ?? new RequestAbortedError()\n if (this.res) {\n util.destroy(this.res.on('error', noop), this.reason)\n } else if (this.abort) {\n this.abort(this.reason)\n }\n })\n }\n }\n\n onConnect (abort, context) {\n if (this.reason) {\n abort(this.reason)\n return\n }\n\n assert(this.callback)\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this\n\n const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n\n if (statusCode < 200) {\n if (this.onInfo) {\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers\n const contentType = parsedHeaders['content-type']\n const contentLength = parsedHeaders['content-length']\n const res = new Readable({\n resume,\n abort,\n contentType,\n contentLength: this.method !== 'HEAD' && contentLength\n ? Number(contentLength)\n : null,\n highWaterMark\n })\n\n if (this.removeAbortListener) {\n res.on('close', this.removeAbortListener)\n this.removeAbortListener = null\n }\n\n this.callback = null\n this.res = res\n if (callback !== null) {\n try {\n this.runInAsyncScope(callback, null, null, {\n statusCode,\n statusText: statusMessage,\n headers,\n trailers: this.trailers,\n opaque,\n body: res,\n context\n })\n } catch (err) {\n // If the callback throws synchronously, we need to handle it\n // Remove reference to res to allow res being garbage collected\n this.res = null\n\n // Destroy the response stream\n util.destroy(res.on('error', noop), err)\n\n // Use queueMicrotask to re-throw the error so it reaches uncaughtException\n queueMicrotask(() => {\n throw err\n })\n }\n }\n }\n\n onData (chunk) {\n return this.res.push(chunk)\n }\n\n onComplete (trailers) {\n util.parseHeaders(trailers, this.trailers)\n this.res.push(null)\n }\n\n onError (err) {\n const { res, callback, body, opaque } = this\n\n if (callback) {\n // TODO: Does this need queueMicrotask?\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n\n if (res) {\n this.res = null\n // Ensure all queued handlers are invoked before destroying res.\n queueMicrotask(() => {\n util.destroy(res.on('error', noop), err)\n })\n }\n\n if (body) {\n this.body = null\n\n if (util.isStream(body)) {\n body.on('error', noop)\n util.destroy(body, err)\n }\n }\n\n if (this.removeAbortListener) {\n this.removeAbortListener()\n this.removeAbortListener = null\n }\n }\n}\n\nfunction request (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n request.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n const handler = new RequestHandler(opts, callback)\n\n this.dispatch(opts, handler)\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts?.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = request\nmodule.exports.RequestHandler = RequestHandler\n","'use strict'\n\nconst assert = require('node:assert')\nconst { finished } = require('node:stream')\nconst { AsyncResource } = require('node:async_hooks')\nconst { InvalidArgumentError, InvalidReturnValueError } = require('../core/errors')\nconst util = require('../core/util')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nfunction noop () {}\n\nclass StreamHandler extends AsyncResource {\n constructor (opts, factory, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n const { signal, method, opaque, body, onInfo, responseHeaders } = opts\n\n try {\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('invalid factory')\n }\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_STREAM')\n } catch (err) {\n if (util.isStream(body)) {\n util.destroy(body.on('error', noop), err)\n }\n throw err\n }\n\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.factory = factory\n this.callback = callback\n this.res = null\n this.abort = null\n this.context = null\n this.trailers = null\n this.body = body\n this.onInfo = onInfo || null\n\n if (util.isStream(body)) {\n body.on('error', (err) => {\n this.onError(err)\n })\n }\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (this.reason) {\n abort(this.reason)\n return\n }\n\n assert(this.callback)\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const { factory, opaque, context, responseHeaders } = this\n\n const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n\n if (statusCode < 200) {\n if (this.onInfo) {\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n this.factory = null\n\n if (factory === null) {\n return\n }\n\n const res = this.runInAsyncScope(factory, null, {\n statusCode,\n headers,\n opaque,\n context\n })\n\n if (\n !res ||\n typeof res.write !== 'function' ||\n typeof res.end !== 'function' ||\n typeof res.on !== 'function'\n ) {\n throw new InvalidReturnValueError('expected Writable')\n }\n\n // TODO: Avoid finished. It registers an unnecessary amount of listeners.\n finished(res, { readable: false }, (err) => {\n const { callback, res, opaque, trailers, abort } = this\n\n this.res = null\n if (err || !res?.readable) {\n util.destroy(res, err)\n }\n\n this.callback = null\n this.runInAsyncScope(callback, null, err || null, { opaque, trailers })\n\n if (err) {\n abort()\n }\n })\n\n res.on('drain', resume)\n\n this.res = res\n\n const needDrain = res.writableNeedDrain !== undefined\n ? res.writableNeedDrain\n : res._writableState?.needDrain\n\n return needDrain !== true\n }\n\n onData (chunk) {\n const { res } = this\n\n return res ? res.write(chunk) : true\n }\n\n onComplete (trailers) {\n const { res } = this\n\n removeSignal(this)\n\n if (!res) {\n return\n }\n\n this.trailers = util.parseHeaders(trailers)\n\n res.end()\n }\n\n onError (err) {\n const { res, callback, opaque, body } = this\n\n removeSignal(this)\n\n this.factory = null\n\n if (res) {\n this.res = null\n util.destroy(res, err)\n } else if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n\n if (body) {\n this.body = null\n util.destroy(body, err)\n }\n }\n}\n\nfunction stream (opts, factory, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n stream.call(this, opts, factory, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n const handler = new StreamHandler(opts, factory, callback)\n\n this.dispatch(opts, handler)\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts?.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = stream\n","'use strict'\n\nconst { InvalidArgumentError, SocketError } = require('../core/errors')\nconst { AsyncResource } = require('node:async_hooks')\nconst assert = require('node:assert')\nconst util = require('../core/util')\nconst { kHTTP2Stream } = require('../core/symbols')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nclass UpgradeHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n const { signal, opaque, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n super('UNDICI_UPGRADE')\n\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.callback = callback\n this.abort = null\n this.context = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (this.reason) {\n abort(this.reason)\n return\n }\n\n assert(this.callback)\n\n this.abort = abort\n this.context = null\n }\n\n onHeaders () {\n throw new SocketError('bad upgrade', null)\n }\n\n onUpgrade (statusCode, rawHeaders, socket) {\n assert(socket[kHTTP2Stream] === true ? statusCode === 200 : statusCode === 101)\n\n const { callback, opaque, context } = this\n\n removeSignal(this)\n\n this.callback = null\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n this.runInAsyncScope(callback, null, null, {\n headers,\n socket,\n opaque,\n context\n })\n }\n\n onError (err) {\n const { callback, opaque } = this\n\n removeSignal(this)\n\n if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n }\n}\n\nfunction upgrade (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n upgrade.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n const upgradeHandler = new UpgradeHandler(opts, callback)\n const upgradeOpts = {\n ...opts,\n method: opts.method || 'GET',\n upgrade: opts.protocol || 'Websocket'\n }\n\n this.dispatch(upgradeOpts, upgradeHandler)\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts?.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = upgrade\n","'use strict'\n\nmodule.exports.request = require('./api-request')\nmodule.exports.stream = require('./api-stream')\nmodule.exports.pipeline = require('./api-pipeline')\nmodule.exports.upgrade = require('./api-upgrade')\nmodule.exports.connect = require('./api-connect')\n","'use strict'\n\nconst assert = require('node:assert')\nconst { Readable } = require('node:stream')\nconst { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require('../core/errors')\nconst util = require('../core/util')\nconst { ReadableStreamFrom } = require('../core/util')\n\nconst kConsume = Symbol('kConsume')\nconst kReading = Symbol('kReading')\nconst kBody = Symbol('kBody')\nconst kAbort = Symbol('kAbort')\nconst kContentType = Symbol('kContentType')\nconst kContentLength = Symbol('kContentLength')\nconst kUsed = Symbol('kUsed')\nconst kBytesRead = Symbol('kBytesRead')\n\nconst noop = () => {}\n\n/**\n * @class\n * @extends {Readable}\n * @see https://fetch.spec.whatwg.org/#body\n */\nclass BodyReadable extends Readable {\n /**\n * @param {object} opts\n * @param {(this: Readable, size: number) => void} opts.resume\n * @param {() => (void | null)} opts.abort\n * @param {string} [opts.contentType = '']\n * @param {number} [opts.contentLength]\n * @param {number} [opts.highWaterMark = 64 * 1024]\n */\n constructor ({\n resume,\n abort,\n contentType = '',\n contentLength,\n highWaterMark = 64 * 1024 // Same as nodejs fs streams.\n }) {\n super({\n autoDestroy: true,\n read: resume,\n highWaterMark\n })\n\n this._readableState.dataEmitted = false\n\n this[kAbort] = abort\n\n /** @type {Consume | null} */\n this[kConsume] = null\n\n /** @type {number} */\n this[kBytesRead] = 0\n\n /** @type {ReadableStream|null} */\n this[kBody] = null\n\n /** @type {boolean} */\n this[kUsed] = false\n\n /** @type {string} */\n this[kContentType] = contentType\n\n /** @type {number|null} */\n this[kContentLength] = Number.isFinite(contentLength) ? contentLength : null\n\n /**\n * Is stream being consumed through Readable API?\n * This is an optimization so that we avoid checking\n * for 'data' and 'readable' listeners in the hot path\n * inside push().\n *\n * @type {boolean}\n */\n this[kReading] = false\n }\n\n /**\n * @param {Error|null} err\n * @param {(error:(Error|null)) => void} callback\n * @returns {void}\n */\n _destroy (err, callback) {\n if (!err && !this._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n if (err) {\n this[kAbort]()\n }\n\n // Workaround for Node \"bug\". If the stream is destroyed in same\n // tick as it is created, then a user who is waiting for a\n // promise (i.e micro tick) for installing an 'error' listener will\n // never get a chance and will always encounter an unhandled exception.\n if (!this[kUsed]) {\n setImmediate(callback, err)\n } else {\n callback(err)\n }\n }\n\n /**\n * @param {string|symbol} event\n * @param {(...args: any[]) => void} listener\n * @returns {this}\n */\n on (event, listener) {\n if (event === 'data' || event === 'readable') {\n this[kReading] = true\n this[kUsed] = true\n }\n return super.on(event, listener)\n }\n\n /**\n * @param {string|symbol} event\n * @param {(...args: any[]) => void} listener\n * @returns {this}\n */\n addListener (event, listener) {\n return this.on(event, listener)\n }\n\n /**\n * @param {string|symbol} event\n * @param {(...args: any[]) => void} listener\n * @returns {this}\n */\n off (event, listener) {\n const ret = super.off(event, listener)\n if (event === 'data' || event === 'readable') {\n this[kReading] = (\n this.listenerCount('data') > 0 ||\n this.listenerCount('readable') > 0\n )\n }\n return ret\n }\n\n /**\n * @param {string|symbol} event\n * @param {(...args: any[]) => void} listener\n * @returns {this}\n */\n removeListener (event, listener) {\n return this.off(event, listener)\n }\n\n /**\n * @param {Buffer|null} chunk\n * @returns {boolean}\n */\n push (chunk) {\n if (chunk) {\n this[kBytesRead] += chunk.length\n if (this[kConsume]) {\n consumePush(this[kConsume], chunk)\n return this[kReading] ? super.push(chunk) : true\n }\n }\n\n return super.push(chunk)\n }\n\n /**\n * Consumes and returns the body as a string.\n *\n * @see https://fetch.spec.whatwg.org/#dom-body-text\n * @returns {Promise}\n */\n text () {\n return consume(this, 'text')\n }\n\n /**\n * Consumes and returns the body as a JavaScript Object.\n *\n * @see https://fetch.spec.whatwg.org/#dom-body-json\n * @returns {Promise}\n */\n json () {\n return consume(this, 'json')\n }\n\n /**\n * Consumes and returns the body as a Blob\n *\n * @see https://fetch.spec.whatwg.org/#dom-body-blob\n * @returns {Promise}\n */\n blob () {\n return consume(this, 'blob')\n }\n\n /**\n * Consumes and returns the body as an Uint8Array.\n *\n * @see https://fetch.spec.whatwg.org/#dom-body-bytes\n * @returns {Promise}\n */\n bytes () {\n return consume(this, 'bytes')\n }\n\n /**\n * Consumes and returns the body as an ArrayBuffer.\n *\n * @see https://fetch.spec.whatwg.org/#dom-body-arraybuffer\n * @returns {Promise}\n */\n arrayBuffer () {\n return consume(this, 'arrayBuffer')\n }\n\n /**\n * Not implemented\n *\n * @see https://fetch.spec.whatwg.org/#dom-body-formdata\n * @throws {NotSupportedError}\n */\n async formData () {\n // TODO: Implement.\n throw new NotSupportedError()\n }\n\n /**\n * Returns true if the body is not null and the body has been consumed.\n * Otherwise, returns false.\n *\n * @see https://fetch.spec.whatwg.org/#dom-body-bodyused\n * @readonly\n * @returns {boolean}\n */\n get bodyUsed () {\n return util.isDisturbed(this)\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#dom-body-body\n * @readonly\n * @returns {ReadableStream}\n */\n get body () {\n if (!this[kBody]) {\n this[kBody] = ReadableStreamFrom(this)\n if (this[kConsume]) {\n // TODO: Is this the best way to force a lock?\n this[kBody].getReader() // Ensure stream is locked.\n assert(this[kBody].locked)\n }\n }\n return this[kBody]\n }\n\n /**\n * Dumps the response body by reading `limit` number of bytes.\n * @param {object} opts\n * @param {number} [opts.limit = 131072] Number of bytes to read.\n * @param {AbortSignal} [opts.signal] An AbortSignal to cancel the dump.\n * @returns {Promise}\n */\n dump (opts) {\n const signal = opts?.signal\n\n if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) {\n return Promise.reject(new InvalidArgumentError('signal must be an AbortSignal'))\n }\n\n const limit = opts?.limit && Number.isFinite(opts.limit)\n ? opts.limit\n : 128 * 1024\n\n if (signal?.aborted) {\n return Promise.reject(signal.reason ?? new AbortError())\n }\n\n if (this._readableState.closeEmitted) {\n return Promise.resolve(null)\n }\n\n return new Promise((resolve, reject) => {\n if (\n (this[kContentLength] && (this[kContentLength] > limit)) ||\n this[kBytesRead] > limit\n ) {\n this.destroy(new AbortError())\n }\n\n if (signal) {\n const onAbort = () => {\n this.destroy(signal.reason ?? new AbortError())\n }\n signal.addEventListener('abort', onAbort)\n this\n .on('close', function () {\n signal.removeEventListener('abort', onAbort)\n if (signal.aborted) {\n reject(signal.reason ?? new AbortError())\n } else {\n resolve(null)\n }\n })\n } else {\n this.on('close', resolve)\n }\n\n this\n .on('error', noop)\n .on('data', () => {\n if (this[kBytesRead] > limit) {\n this.destroy()\n }\n })\n .resume()\n })\n }\n\n /**\n * @param {BufferEncoding} encoding\n * @returns {this}\n */\n setEncoding (encoding) {\n if (Buffer.isEncoding(encoding)) {\n this._readableState.encoding = encoding\n }\n return this\n }\n}\n\n/**\n * @see https://streams.spec.whatwg.org/#readablestream-locked\n * @param {BodyReadable} bodyReadable\n * @returns {boolean}\n */\nfunction isLocked (bodyReadable) {\n // Consume is an implicit lock.\n return bodyReadable[kBody]?.locked === true || bodyReadable[kConsume] !== null\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#body-unusable\n * @param {BodyReadable} bodyReadable\n * @returns {boolean}\n */\nfunction isUnusable (bodyReadable) {\n return util.isDisturbed(bodyReadable) || isLocked(bodyReadable)\n}\n\n/**\n * @typedef {'text' | 'json' | 'blob' | 'bytes' | 'arrayBuffer'} ConsumeType\n */\n\n/**\n * @template {ConsumeType} T\n * @typedef {T extends 'text' ? string :\n * T extends 'json' ? unknown :\n * T extends 'blob' ? Blob :\n * T extends 'arrayBuffer' ? ArrayBuffer :\n * T extends 'bytes' ? Uint8Array :\n * never\n * } ConsumeReturnType\n */\n/**\n * @typedef {object} Consume\n * @property {ConsumeType} type\n * @property {BodyReadable} stream\n * @property {((value?: any) => void)} resolve\n * @property {((err: Error) => void)} reject\n * @property {number} length\n * @property {Buffer[]} body\n */\n\n/**\n * @template {ConsumeType} T\n * @param {BodyReadable} stream\n * @param {T} type\n * @returns {Promise>}\n */\nfunction consume (stream, type) {\n assert(!stream[kConsume])\n\n return new Promise((resolve, reject) => {\n if (isUnusable(stream)) {\n const rState = stream._readableState\n if (rState.destroyed && rState.closeEmitted === false) {\n stream\n .on('error', reject)\n .on('close', () => {\n reject(new TypeError('unusable'))\n })\n } else {\n reject(rState.errored ?? new TypeError('unusable'))\n }\n } else {\n queueMicrotask(() => {\n stream[kConsume] = {\n type,\n stream,\n resolve,\n reject,\n length: 0,\n body: []\n }\n\n stream\n .on('error', function (err) {\n consumeFinish(this[kConsume], err)\n })\n .on('close', function () {\n if (this[kConsume].body !== null) {\n consumeFinish(this[kConsume], new RequestAbortedError())\n }\n })\n\n consumeStart(stream[kConsume])\n })\n }\n })\n}\n\n/**\n * @param {Consume} consume\n * @returns {void}\n */\nfunction consumeStart (consume) {\n if (consume.body === null) {\n return\n }\n\n const { _readableState: state } = consume.stream\n\n if (state.bufferIndex) {\n const start = state.bufferIndex\n const end = state.buffer.length\n for (let n = start; n < end; n++) {\n consumePush(consume, state.buffer[n])\n }\n } else {\n for (const chunk of state.buffer) {\n consumePush(consume, chunk)\n }\n }\n\n if (state.endEmitted) {\n consumeEnd(this[kConsume], this._readableState.encoding)\n } else {\n consume.stream.on('end', function () {\n consumeEnd(this[kConsume], this._readableState.encoding)\n })\n }\n\n consume.stream.resume()\n\n while (consume.stream.read() != null) {\n // Loop\n }\n}\n\n/**\n * @param {Buffer[]} chunks\n * @param {number} length\n * @param {BufferEncoding} [encoding='utf8']\n * @returns {string}\n */\nfunction chunksDecode (chunks, length, encoding) {\n if (chunks.length === 0 || length === 0) {\n return ''\n }\n const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length)\n const bufferLength = buffer.length\n\n // Skip BOM.\n const start =\n bufferLength > 2 &&\n buffer[0] === 0xef &&\n buffer[1] === 0xbb &&\n buffer[2] === 0xbf\n ? 3\n : 0\n if (!encoding || encoding === 'utf8' || encoding === 'utf-8') {\n return buffer.utf8Slice(start, bufferLength)\n } else {\n return buffer.subarray(start, bufferLength).toString(encoding)\n }\n}\n\n/**\n * @param {Buffer[]} chunks\n * @param {number} length\n * @returns {Uint8Array}\n */\nfunction chunksConcat (chunks, length) {\n if (chunks.length === 0 || length === 0) {\n return new Uint8Array(0)\n }\n if (chunks.length === 1) {\n // fast-path\n return new Uint8Array(chunks[0])\n }\n const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer)\n\n let offset = 0\n for (let i = 0; i < chunks.length; ++i) {\n const chunk = chunks[i]\n buffer.set(chunk, offset)\n offset += chunk.length\n }\n\n return buffer\n}\n\n/**\n * @param {Consume} consume\n * @param {BufferEncoding} encoding\n * @returns {void}\n */\nfunction consumeEnd (consume, encoding) {\n const { type, body, resolve, stream, length } = consume\n\n try {\n if (type === 'text') {\n resolve(chunksDecode(body, length, encoding))\n } else if (type === 'json') {\n resolve(JSON.parse(chunksDecode(body, length, encoding)))\n } else if (type === 'arrayBuffer') {\n resolve(chunksConcat(body, length).buffer)\n } else if (type === 'blob') {\n resolve(new Blob(body, { type: stream[kContentType] }))\n } else if (type === 'bytes') {\n resolve(chunksConcat(body, length))\n }\n\n consumeFinish(consume)\n } catch (err) {\n stream.destroy(err)\n }\n}\n\n/**\n * @param {Consume} consume\n * @param {Buffer} chunk\n * @returns {void}\n */\nfunction consumePush (consume, chunk) {\n consume.length += chunk.length\n consume.body.push(chunk)\n}\n\n/**\n * @param {Consume} consume\n * @param {Error} [err]\n * @returns {void}\n */\nfunction consumeFinish (consume, err) {\n if (consume.body === null) {\n return\n }\n\n if (err) {\n consume.reject(err)\n } else {\n consume.resolve()\n }\n\n // Reset the consume object to allow for garbage collection.\n consume.type = null\n consume.stream = null\n consume.resolve = null\n consume.reject = null\n consume.length = 0\n consume.body = null\n}\n\nmodule.exports = {\n Readable: BodyReadable,\n chunksDecode\n}\n","'use strict'\n\nconst { Writable } = require('node:stream')\nconst { EventEmitter } = require('node:events')\nconst { assertCacheKey, assertCacheValue } = require('../util/cache.js')\n\n/**\n * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheKey} CacheKey\n * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheValue} CacheValue\n * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheStore} CacheStore\n * @typedef {import('../../types/cache-interceptor.d.ts').default.GetResult} GetResult\n */\n\n/**\n * @implements {CacheStore}\n * @extends {EventEmitter}\n */\nclass MemoryCacheStore extends EventEmitter {\n #maxCount = 1024\n #maxSize = 104857600 // 100MB\n #maxEntrySize = 5242880 // 5MB\n\n #size = 0\n #count = 0\n #entries = new Map()\n #hasEmittedMaxSizeEvent = false\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.MemoryCacheStoreOpts | undefined} [opts]\n */\n constructor (opts) {\n super()\n if (opts) {\n if (typeof opts !== 'object') {\n throw new TypeError('MemoryCacheStore options must be an object')\n }\n\n if (opts.maxCount !== undefined) {\n if (\n typeof opts.maxCount !== 'number' ||\n !Number.isInteger(opts.maxCount) ||\n opts.maxCount < 0\n ) {\n throw new TypeError('MemoryCacheStore options.maxCount must be a non-negative integer')\n }\n this.#maxCount = opts.maxCount\n }\n\n if (opts.maxSize !== undefined) {\n if (\n typeof opts.maxSize !== 'number' ||\n !Number.isInteger(opts.maxSize) ||\n opts.maxSize < 0\n ) {\n throw new TypeError('MemoryCacheStore options.maxSize must be a non-negative integer')\n }\n this.#maxSize = opts.maxSize\n }\n\n if (opts.maxEntrySize !== undefined) {\n if (\n typeof opts.maxEntrySize !== 'number' ||\n !Number.isInteger(opts.maxEntrySize) ||\n opts.maxEntrySize < 0\n ) {\n throw new TypeError('MemoryCacheStore options.maxEntrySize must be a non-negative integer')\n }\n this.#maxEntrySize = opts.maxEntrySize\n }\n }\n }\n\n /**\n * Get the current size of the cache in bytes\n * @returns {number} The current size of the cache in bytes\n */\n get size () {\n return this.#size\n }\n\n /**\n * Check if the cache is full (either max size or max count reached)\n * @returns {boolean} True if the cache is full, false otherwise\n */\n isFull () {\n return this.#size >= this.#maxSize || this.#count >= this.#maxCount\n }\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} req\n * @returns {import('../../types/cache-interceptor.d.ts').default.GetResult | undefined}\n */\n get (key) {\n assertCacheKey(key)\n\n const topLevelKey = `${key.origin}:${key.path}`\n\n const now = Date.now()\n const entries = this.#entries.get(topLevelKey)\n\n const entry = entries ? findEntry(key, entries, now) : null\n\n return entry == null\n ? undefined\n : {\n statusMessage: entry.statusMessage,\n statusCode: entry.statusCode,\n headers: entry.headers,\n body: entry.body,\n vary: entry.vary ? entry.vary : undefined,\n etag: entry.etag,\n cacheControlDirectives: entry.cacheControlDirectives,\n cachedAt: entry.cachedAt,\n staleAt: entry.staleAt,\n deleteAt: entry.deleteAt\n }\n }\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue} val\n * @returns {Writable | undefined}\n */\n createWriteStream (key, val) {\n assertCacheKey(key)\n assertCacheValue(val)\n\n const topLevelKey = `${key.origin}:${key.path}`\n\n const store = this\n const entry = { ...key, ...val, body: [], size: 0 }\n\n return new Writable({\n write (chunk, encoding, callback) {\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding)\n }\n\n entry.size += chunk.byteLength\n\n if (entry.size >= store.#maxEntrySize) {\n this.destroy()\n } else {\n entry.body.push(chunk)\n }\n\n callback(null)\n },\n final (callback) {\n let entries = store.#entries.get(topLevelKey)\n if (!entries) {\n entries = []\n store.#entries.set(topLevelKey, entries)\n }\n const previousEntry = findEntry(key, entries, Date.now())\n if (previousEntry) {\n const index = entries.indexOf(previousEntry)\n entries.splice(index, 1, entry)\n store.#size -= previousEntry.size\n } else {\n entries.push(entry)\n store.#count += 1\n }\n\n store.#size += entry.size\n\n // Check if cache is full and emit event if needed\n if (store.#size > store.#maxSize || store.#count > store.#maxCount) {\n // Emit maxSizeExceeded event if we haven't already\n if (!store.#hasEmittedMaxSizeEvent) {\n store.emit('maxSizeExceeded', {\n size: store.#size,\n maxSize: store.#maxSize,\n count: store.#count,\n maxCount: store.#maxCount\n })\n store.#hasEmittedMaxSizeEvent = true\n }\n\n // Perform eviction\n for (const [key, entries] of store.#entries) {\n for (const entry of entries.splice(0, entries.length / 2)) {\n store.#size -= entry.size\n store.#count -= 1\n }\n if (entries.length === 0) {\n store.#entries.delete(key)\n }\n }\n\n // Reset the event flag after eviction\n if (store.#size < store.#maxSize && store.#count < store.#maxCount) {\n store.#hasEmittedMaxSizeEvent = false\n }\n }\n\n callback(null)\n }\n })\n }\n\n /**\n * @param {CacheKey} key\n */\n delete (key) {\n if (typeof key !== 'object') {\n throw new TypeError(`expected key to be object, got ${typeof key}`)\n }\n\n const topLevelKey = `${key.origin}:${key.path}`\n\n for (const entry of this.#entries.get(topLevelKey) ?? []) {\n this.#size -= entry.size\n this.#count -= 1\n }\n this.#entries.delete(topLevelKey)\n }\n}\n\nfunction findEntry (key, entries, now) {\n return entries.find((entry) => (\n entry.deleteAt > now &&\n entry.method === key.method &&\n (entry.vary == null || Object.keys(entry.vary).every(headerName => {\n if (entry.vary[headerName] === null) {\n return key.headers[headerName] === undefined\n }\n\n return entry.vary[headerName] === key.headers[headerName]\n }))\n ))\n}\n\nmodule.exports = MemoryCacheStore\n","'use strict'\n\nconst { Writable } = require('node:stream')\nconst { assertCacheKey, assertCacheValue } = require('../util/cache.js')\n\nlet DatabaseSync\n\nconst VERSION = 3\n\n// 2gb\nconst MAX_ENTRY_SIZE = 2 * 1000 * 1000 * 1000\n\n/**\n * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheStore} CacheStore\n * @implements {CacheStore}\n *\n * @typedef {{\n * id: Readonly,\n * body?: Uint8Array\n * statusCode: number\n * statusMessage: string\n * headers?: string\n * vary?: string\n * etag?: string\n * cacheControlDirectives?: string\n * cachedAt: number\n * staleAt: number\n * deleteAt: number\n * }} SqliteStoreValue\n */\nmodule.exports = class SqliteCacheStore {\n #maxEntrySize = MAX_ENTRY_SIZE\n #maxCount = Infinity\n\n /**\n * @type {import('node:sqlite').DatabaseSync}\n */\n #db\n\n /**\n * @type {import('node:sqlite').StatementSync}\n */\n #getValuesQuery\n\n /**\n * @type {import('node:sqlite').StatementSync}\n */\n #updateValueQuery\n\n /**\n * @type {import('node:sqlite').StatementSync}\n */\n #insertValueQuery\n\n /**\n * @type {import('node:sqlite').StatementSync}\n */\n #deleteExpiredValuesQuery\n\n /**\n * @type {import('node:sqlite').StatementSync}\n */\n #deleteByUrlQuery\n\n /**\n * @type {import('node:sqlite').StatementSync}\n */\n #countEntriesQuery\n\n /**\n * @type {import('node:sqlite').StatementSync | null}\n */\n #deleteOldValuesQuery\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.SqliteCacheStoreOpts | undefined} opts\n */\n constructor (opts) {\n if (opts) {\n if (typeof opts !== 'object') {\n throw new TypeError('SqliteCacheStore options must be an object')\n }\n\n if (opts.maxEntrySize !== undefined) {\n if (\n typeof opts.maxEntrySize !== 'number' ||\n !Number.isInteger(opts.maxEntrySize) ||\n opts.maxEntrySize < 0\n ) {\n throw new TypeError('SqliteCacheStore options.maxEntrySize must be a non-negative integer')\n }\n\n if (opts.maxEntrySize > MAX_ENTRY_SIZE) {\n throw new TypeError('SqliteCacheStore options.maxEntrySize must be less than 2gb')\n }\n\n this.#maxEntrySize = opts.maxEntrySize\n }\n\n if (opts.maxCount !== undefined) {\n if (\n typeof opts.maxCount !== 'number' ||\n !Number.isInteger(opts.maxCount) ||\n opts.maxCount < 0\n ) {\n throw new TypeError('SqliteCacheStore options.maxCount must be a non-negative integer')\n }\n this.#maxCount = opts.maxCount\n }\n }\n\n if (!DatabaseSync) {\n DatabaseSync = require('node:sqlite').DatabaseSync\n }\n this.#db = new DatabaseSync(opts?.location ?? ':memory:')\n\n this.#db.exec(`\n PRAGMA journal_mode = WAL;\n PRAGMA synchronous = NORMAL;\n PRAGMA temp_store = memory;\n PRAGMA optimize;\n\n CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION} (\n -- Data specific to us\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n url TEXT NOT NULL,\n method TEXT NOT NULL,\n\n -- Data returned to the interceptor\n body BUF NULL,\n deleteAt INTEGER NOT NULL,\n statusCode INTEGER NOT NULL,\n statusMessage TEXT NOT NULL,\n headers TEXT NULL,\n cacheControlDirectives TEXT NULL,\n etag TEXT NULL,\n vary TEXT NULL,\n cachedAt INTEGER NOT NULL,\n staleAt INTEGER NOT NULL\n );\n\n CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_getValuesQuery ON cacheInterceptorV${VERSION}(url, method, deleteAt);\n CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_deleteByUrlQuery ON cacheInterceptorV${VERSION}(deleteAt);\n `)\n\n this.#getValuesQuery = this.#db.prepare(`\n SELECT\n id,\n body,\n deleteAt,\n statusCode,\n statusMessage,\n headers,\n etag,\n cacheControlDirectives,\n vary,\n cachedAt,\n staleAt\n FROM cacheInterceptorV${VERSION}\n WHERE\n url = ?\n AND method = ?\n ORDER BY\n deleteAt ASC\n `)\n\n this.#updateValueQuery = this.#db.prepare(`\n UPDATE cacheInterceptorV${VERSION} SET\n body = ?,\n deleteAt = ?,\n statusCode = ?,\n statusMessage = ?,\n headers = ?,\n etag = ?,\n cacheControlDirectives = ?,\n cachedAt = ?,\n staleAt = ?\n WHERE\n id = ?\n `)\n\n this.#insertValueQuery = this.#db.prepare(`\n INSERT INTO cacheInterceptorV${VERSION} (\n url,\n method,\n body,\n deleteAt,\n statusCode,\n statusMessage,\n headers,\n etag,\n cacheControlDirectives,\n vary,\n cachedAt,\n staleAt\n ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\n `)\n\n this.#deleteByUrlQuery = this.#db.prepare(\n `DELETE FROM cacheInterceptorV${VERSION} WHERE url = ?`\n )\n\n this.#countEntriesQuery = this.#db.prepare(\n `SELECT COUNT(*) AS total FROM cacheInterceptorV${VERSION}`\n )\n\n this.#deleteExpiredValuesQuery = this.#db.prepare(\n `DELETE FROM cacheInterceptorV${VERSION} WHERE deleteAt <= ?`\n )\n\n this.#deleteOldValuesQuery = this.#maxCount === Infinity\n ? null\n : this.#db.prepare(`\n DELETE FROM cacheInterceptorV${VERSION}\n WHERE id IN (\n SELECT\n id\n FROM cacheInterceptorV${VERSION}\n ORDER BY cachedAt DESC\n LIMIT ?\n )\n `)\n }\n\n close () {\n this.#db.close()\n }\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key\n * @returns {(import('../../types/cache-interceptor.d.ts').default.GetResult & { body?: Buffer }) | undefined}\n */\n get (key) {\n assertCacheKey(key)\n\n const value = this.#findValue(key)\n return value\n ? {\n body: value.body ? Buffer.from(value.body.buffer, value.body.byteOffset, value.body.byteLength) : undefined,\n statusCode: value.statusCode,\n statusMessage: value.statusMessage,\n headers: value.headers ? JSON.parse(value.headers) : undefined,\n etag: value.etag ? value.etag : undefined,\n vary: value.vary ? JSON.parse(value.vary) : undefined,\n cacheControlDirectives: value.cacheControlDirectives\n ? JSON.parse(value.cacheControlDirectives)\n : undefined,\n cachedAt: value.cachedAt,\n staleAt: value.staleAt,\n deleteAt: value.deleteAt\n }\n : undefined\n }\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue & { body: null | Buffer | Array}} value\n */\n set (key, value) {\n assertCacheKey(key)\n\n const url = this.#makeValueUrl(key)\n const body = Array.isArray(value.body) ? Buffer.concat(value.body) : value.body\n const size = body?.byteLength\n\n if (size && size > this.#maxEntrySize) {\n return\n }\n\n const existingValue = this.#findValue(key, true)\n if (existingValue) {\n // Updating an existing response, let's overwrite it\n this.#updateValueQuery.run(\n body,\n value.deleteAt,\n value.statusCode,\n value.statusMessage,\n value.headers ? JSON.stringify(value.headers) : null,\n value.etag ? value.etag : null,\n value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null,\n value.cachedAt,\n value.staleAt,\n existingValue.id\n )\n } else {\n this.#prune()\n // New response, let's insert it\n this.#insertValueQuery.run(\n url,\n key.method,\n body,\n value.deleteAt,\n value.statusCode,\n value.statusMessage,\n value.headers ? JSON.stringify(value.headers) : null,\n value.etag ? value.etag : null,\n value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null,\n value.vary ? JSON.stringify(value.vary) : null,\n value.cachedAt,\n value.staleAt\n )\n }\n }\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue} value\n * @returns {Writable | undefined}\n */\n createWriteStream (key, value) {\n assertCacheKey(key)\n assertCacheValue(value)\n\n let size = 0\n /**\n * @type {Buffer[] | null}\n */\n const body = []\n const store = this\n\n return new Writable({\n decodeStrings: true,\n write (chunk, encoding, callback) {\n size += chunk.byteLength\n\n if (size < store.#maxEntrySize) {\n body.push(chunk)\n } else {\n this.destroy()\n }\n\n callback()\n },\n final (callback) {\n store.set(key, { ...value, body })\n callback()\n }\n })\n }\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key\n */\n delete (key) {\n if (typeof key !== 'object') {\n throw new TypeError(`expected key to be object, got ${typeof key}`)\n }\n\n this.#deleteByUrlQuery.run(this.#makeValueUrl(key))\n }\n\n #prune () {\n if (Number.isFinite(this.#maxCount) && this.size <= this.#maxCount) {\n return 0\n }\n\n {\n const removed = this.#deleteExpiredValuesQuery.run(Date.now()).changes\n if (removed) {\n return removed\n }\n }\n\n {\n const removed = this.#deleteOldValuesQuery?.run(Math.max(Math.floor(this.#maxCount * 0.1), 1)).changes\n if (removed) {\n return removed\n }\n }\n\n return 0\n }\n\n /**\n * Counts the number of rows in the cache\n * @returns {Number}\n */\n get size () {\n const { total } = this.#countEntriesQuery.get()\n return total\n }\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key\n * @returns {string}\n */\n #makeValueUrl (key) {\n return `${key.origin}/${key.path}`\n }\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key\n * @param {boolean} [canBeExpired=false]\n * @returns {SqliteStoreValue | undefined}\n */\n #findValue (key, canBeExpired = false) {\n const url = this.#makeValueUrl(key)\n const { headers, method } = key\n\n /**\n * @type {SqliteStoreValue[]}\n */\n const values = this.#getValuesQuery.all(url, method)\n\n if (values.length === 0) {\n return undefined\n }\n\n const now = Date.now()\n for (const value of values) {\n if (now >= value.deleteAt && !canBeExpired) {\n return undefined\n }\n\n let matches = true\n\n if (value.vary) {\n const vary = JSON.parse(value.vary)\n\n for (const header in vary) {\n if (!headerValueEquals(headers[header], vary[header])) {\n matches = false\n break\n }\n }\n }\n\n if (matches) {\n return value\n }\n }\n\n return undefined\n }\n}\n\n/**\n * @param {string|string[]|null|undefined} lhs\n * @param {string|string[]|null|undefined} rhs\n * @returns {boolean}\n */\nfunction headerValueEquals (lhs, rhs) {\n if (lhs == null && rhs == null) {\n return true\n }\n\n if ((lhs == null && rhs != null) ||\n (lhs != null && rhs == null)) {\n return false\n }\n\n if (Array.isArray(lhs) && Array.isArray(rhs)) {\n if (lhs.length !== rhs.length) {\n return false\n }\n\n return lhs.every((x, i) => x === rhs[i])\n }\n\n return lhs === rhs\n}\n","'use strict'\n\nconst net = require('node:net')\nconst assert = require('node:assert')\nconst util = require('./util')\nconst { InvalidArgumentError } = require('./errors')\n\nlet tls // include tls conditionally since it is not always available\n\n// TODO: session re-use does not wait for the first\n// connection to resolve the session and might therefore\n// resolve the same servername multiple times even when\n// re-use is enabled.\n\nconst SessionCache = class WeakSessionCache {\n constructor (maxCachedSessions) {\n this._maxCachedSessions = maxCachedSessions\n this._sessionCache = new Map()\n this._sessionRegistry = new FinalizationRegistry((key) => {\n if (this._sessionCache.size < this._maxCachedSessions) {\n return\n }\n\n const ref = this._sessionCache.get(key)\n if (ref !== undefined && ref.deref() === undefined) {\n this._sessionCache.delete(key)\n }\n })\n }\n\n get (sessionKey) {\n const ref = this._sessionCache.get(sessionKey)\n return ref ? ref.deref() : null\n }\n\n set (sessionKey, session) {\n if (this._maxCachedSessions === 0) {\n return\n }\n\n this._sessionCache.set(sessionKey, new WeakRef(session))\n this._sessionRegistry.register(session, sessionKey)\n }\n}\n\nfunction buildConnector ({ allowH2, useH2c, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) {\n if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) {\n throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero')\n }\n\n const options = { path: socketPath, ...opts }\n const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions)\n timeout = timeout == null ? 10e3 : timeout\n allowH2 = allowH2 != null ? allowH2 : false\n return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) {\n let socket\n if (protocol === 'https:') {\n if (!tls) {\n tls = require('node:tls')\n }\n servername = servername || options.servername || util.getServerName(host) || null\n\n const sessionKey = servername || hostname\n assert(sessionKey)\n\n const session = customSession || sessionCache.get(sessionKey) || null\n\n port = port || 443\n\n socket = tls.connect({\n highWaterMark: 16384, // TLS in node can't have bigger HWM anyway...\n ...options,\n servername,\n session,\n localAddress,\n ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'],\n socket: httpSocket, // upgrade socket connection\n port,\n host: hostname\n })\n\n socket\n .on('session', function (session) {\n // TODO (fix): Can a session become invalid once established? Don't think so?\n sessionCache.set(sessionKey, session)\n })\n } else {\n assert(!httpSocket, 'httpSocket can only be sent on TLS update')\n\n port = port || 80\n\n socket = net.connect({\n highWaterMark: 64 * 1024, // Same as nodejs fs streams.\n ...options,\n localAddress,\n port,\n host: hostname\n })\n if (useH2c === true) {\n socket.alpnProtocol = 'h2'\n }\n }\n\n // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket\n if (options.keepAlive == null || options.keepAlive) {\n const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay\n socket.setKeepAlive(true, keepAliveInitialDelay)\n }\n\n const clearConnectTimeout = util.setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port })\n\n socket\n .setNoDelay(true)\n .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () {\n queueMicrotask(clearConnectTimeout)\n\n if (callback) {\n const cb = callback\n callback = null\n cb(null, this)\n }\n })\n .on('error', function (err) {\n queueMicrotask(clearConnectTimeout)\n\n if (callback) {\n const cb = callback\n callback = null\n cb(err)\n }\n })\n\n return socket\n }\n}\n\nmodule.exports = buildConnector\n","'use strict'\n\n/**\n * @see https://developer.mozilla.org/docs/Web/HTTP/Headers\n */\nconst wellknownHeaderNames = /** @type {const} */ ([\n 'Accept',\n 'Accept-Encoding',\n 'Accept-Language',\n 'Accept-Ranges',\n 'Access-Control-Allow-Credentials',\n 'Access-Control-Allow-Headers',\n 'Access-Control-Allow-Methods',\n 'Access-Control-Allow-Origin',\n 'Access-Control-Expose-Headers',\n 'Access-Control-Max-Age',\n 'Access-Control-Request-Headers',\n 'Access-Control-Request-Method',\n 'Age',\n 'Allow',\n 'Alt-Svc',\n 'Alt-Used',\n 'Authorization',\n 'Cache-Control',\n 'Clear-Site-Data',\n 'Connection',\n 'Content-Disposition',\n 'Content-Encoding',\n 'Content-Language',\n 'Content-Length',\n 'Content-Location',\n 'Content-Range',\n 'Content-Security-Policy',\n 'Content-Security-Policy-Report-Only',\n 'Content-Type',\n 'Cookie',\n 'Cross-Origin-Embedder-Policy',\n 'Cross-Origin-Opener-Policy',\n 'Cross-Origin-Resource-Policy',\n 'Date',\n 'Device-Memory',\n 'Downlink',\n 'ECT',\n 'ETag',\n 'Expect',\n 'Expect-CT',\n 'Expires',\n 'Forwarded',\n 'From',\n 'Host',\n 'If-Match',\n 'If-Modified-Since',\n 'If-None-Match',\n 'If-Range',\n 'If-Unmodified-Since',\n 'Keep-Alive',\n 'Last-Modified',\n 'Link',\n 'Location',\n 'Max-Forwards',\n 'Origin',\n 'Permissions-Policy',\n 'Pragma',\n 'Proxy-Authenticate',\n 'Proxy-Authorization',\n 'RTT',\n 'Range',\n 'Referer',\n 'Referrer-Policy',\n 'Refresh',\n 'Retry-After',\n 'Sec-WebSocket-Accept',\n 'Sec-WebSocket-Extensions',\n 'Sec-WebSocket-Key',\n 'Sec-WebSocket-Protocol',\n 'Sec-WebSocket-Version',\n 'Server',\n 'Server-Timing',\n 'Service-Worker-Allowed',\n 'Service-Worker-Navigation-Preload',\n 'Set-Cookie',\n 'SourceMap',\n 'Strict-Transport-Security',\n 'Supports-Loading-Mode',\n 'TE',\n 'Timing-Allow-Origin',\n 'Trailer',\n 'Transfer-Encoding',\n 'Upgrade',\n 'Upgrade-Insecure-Requests',\n 'User-Agent',\n 'Vary',\n 'Via',\n 'WWW-Authenticate',\n 'X-Content-Type-Options',\n 'X-DNS-Prefetch-Control',\n 'X-Frame-Options',\n 'X-Permitted-Cross-Domain-Policies',\n 'X-Powered-By',\n 'X-Requested-With',\n 'X-XSS-Protection'\n])\n\n/** @type {Record, string>} */\nconst headerNameLowerCasedRecord = {}\n\n// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`.\nObject.setPrototypeOf(headerNameLowerCasedRecord, null)\n\n/**\n * @type {Record, Buffer>}\n */\nconst wellknownHeaderNameBuffers = {}\n\n// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`.\nObject.setPrototypeOf(wellknownHeaderNameBuffers, null)\n\n/**\n * @param {string} header Lowercased header\n * @returns {Buffer}\n */\nfunction getHeaderNameAsBuffer (header) {\n let buffer = wellknownHeaderNameBuffers[header]\n\n if (buffer === undefined) {\n buffer = Buffer.from(header)\n }\n\n return buffer\n}\n\nfor (let i = 0; i < wellknownHeaderNames.length; ++i) {\n const key = wellknownHeaderNames[i]\n const lowerCasedKey = key.toLowerCase()\n headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] =\n lowerCasedKey\n}\n\nmodule.exports = {\n wellknownHeaderNames,\n headerNameLowerCasedRecord,\n getHeaderNameAsBuffer\n}\n","'use strict'\n\nconst diagnosticsChannel = require('node:diagnostics_channel')\nconst util = require('node:util')\n\nconst undiciDebugLog = util.debuglog('undici')\nconst fetchDebuglog = util.debuglog('fetch')\nconst websocketDebuglog = util.debuglog('websocket')\n\nconst channels = {\n // Client\n beforeConnect: diagnosticsChannel.channel('undici:client:beforeConnect'),\n connected: diagnosticsChannel.channel('undici:client:connected'),\n connectError: diagnosticsChannel.channel('undici:client:connectError'),\n sendHeaders: diagnosticsChannel.channel('undici:client:sendHeaders'),\n // Request\n create: diagnosticsChannel.channel('undici:request:create'),\n bodySent: diagnosticsChannel.channel('undici:request:bodySent'),\n bodyChunkSent: diagnosticsChannel.channel('undici:request:bodyChunkSent'),\n bodyChunkReceived: diagnosticsChannel.channel('undici:request:bodyChunkReceived'),\n headers: diagnosticsChannel.channel('undici:request:headers'),\n trailers: diagnosticsChannel.channel('undici:request:trailers'),\n error: diagnosticsChannel.channel('undici:request:error'),\n // WebSocket\n open: diagnosticsChannel.channel('undici:websocket:open'),\n close: diagnosticsChannel.channel('undici:websocket:close'),\n socketError: diagnosticsChannel.channel('undici:websocket:socket_error'),\n ping: diagnosticsChannel.channel('undici:websocket:ping'),\n pong: diagnosticsChannel.channel('undici:websocket:pong'),\n // ProxyAgent\n proxyConnected: diagnosticsChannel.channel('undici:proxy:connected')\n}\n\nlet isTrackingClientEvents = false\n\nfunction trackClientEvents (debugLog = undiciDebugLog) {\n if (isTrackingClientEvents) {\n return\n }\n\n // Check if any of the channels already have subscribers to prevent duplicate subscriptions\n // This can happen when both Node.js built-in undici and undici as a dependency are present\n if (channels.beforeConnect.hasSubscribers || channels.connected.hasSubscribers ||\n channels.connectError.hasSubscribers || channels.sendHeaders.hasSubscribers) {\n isTrackingClientEvents = true\n return\n }\n\n isTrackingClientEvents = true\n\n diagnosticsChannel.subscribe('undici:client:beforeConnect',\n evt => {\n const {\n connectParams: { version, protocol, port, host }\n } = evt\n debugLog(\n 'connecting to %s%s using %s%s',\n host,\n port ? `:${port}` : '',\n protocol,\n version\n )\n })\n\n diagnosticsChannel.subscribe('undici:client:connected',\n evt => {\n const {\n connectParams: { version, protocol, port, host }\n } = evt\n debugLog(\n 'connected to %s%s using %s%s',\n host,\n port ? `:${port}` : '',\n protocol,\n version\n )\n })\n\n diagnosticsChannel.subscribe('undici:client:connectError',\n evt => {\n const {\n connectParams: { version, protocol, port, host },\n error\n } = evt\n debugLog(\n 'connection to %s%s using %s%s errored - %s',\n host,\n port ? `:${port}` : '',\n protocol,\n version,\n error.message\n )\n })\n\n diagnosticsChannel.subscribe('undici:client:sendHeaders',\n evt => {\n const {\n request: { method, path, origin }\n } = evt\n debugLog('sending request to %s %s%s', method, origin, path)\n })\n}\n\nlet isTrackingRequestEvents = false\n\nfunction trackRequestEvents (debugLog = undiciDebugLog) {\n if (isTrackingRequestEvents) {\n return\n }\n\n // Check if any of the channels already have subscribers to prevent duplicate subscriptions\n // This can happen when both Node.js built-in undici and undici as a dependency are present\n if (channels.headers.hasSubscribers || channels.trailers.hasSubscribers ||\n channels.error.hasSubscribers) {\n isTrackingRequestEvents = true\n return\n }\n\n isTrackingRequestEvents = true\n\n diagnosticsChannel.subscribe('undici:request:headers',\n evt => {\n const {\n request: { method, path, origin },\n response: { statusCode }\n } = evt\n debugLog(\n 'received response to %s %s%s - HTTP %d',\n method,\n origin,\n path,\n statusCode\n )\n })\n\n diagnosticsChannel.subscribe('undici:request:trailers',\n evt => {\n const {\n request: { method, path, origin }\n } = evt\n debugLog('trailers received from %s %s%s', method, origin, path)\n })\n\n diagnosticsChannel.subscribe('undici:request:error',\n evt => {\n const {\n request: { method, path, origin },\n error\n } = evt\n debugLog(\n 'request to %s %s%s errored - %s',\n method,\n origin,\n path,\n error.message\n )\n })\n}\n\nlet isTrackingWebSocketEvents = false\n\nfunction trackWebSocketEvents (debugLog = websocketDebuglog) {\n if (isTrackingWebSocketEvents) {\n return\n }\n\n // Check if any of the channels already have subscribers to prevent duplicate subscriptions\n // This can happen when both Node.js built-in undici and undici as a dependency are present\n if (channels.open.hasSubscribers || channels.close.hasSubscribers ||\n channels.socketError.hasSubscribers || channels.ping.hasSubscribers ||\n channels.pong.hasSubscribers) {\n isTrackingWebSocketEvents = true\n return\n }\n\n isTrackingWebSocketEvents = true\n\n diagnosticsChannel.subscribe('undici:websocket:open',\n evt => {\n if (evt.address != null) {\n const { address, port } = evt.address\n debugLog('connection opened %s%s', address, port ? `:${port}` : '')\n } else {\n debugLog('connection opened')\n }\n })\n\n diagnosticsChannel.subscribe('undici:websocket:close',\n evt => {\n const { websocket, code, reason } = evt\n debugLog(\n 'closed connection to %s - %s %s',\n websocket.url,\n code,\n reason\n )\n })\n\n diagnosticsChannel.subscribe('undici:websocket:socket_error',\n err => {\n debugLog('connection errored - %s', err.message)\n })\n\n diagnosticsChannel.subscribe('undici:websocket:ping',\n evt => {\n debugLog('ping received')\n })\n\n diagnosticsChannel.subscribe('undici:websocket:pong',\n evt => {\n debugLog('pong received')\n })\n}\n\nif (undiciDebugLog.enabled || fetchDebuglog.enabled) {\n trackClientEvents(fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog)\n trackRequestEvents(fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog)\n}\n\nif (websocketDebuglog.enabled) {\n trackClientEvents(undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog)\n trackWebSocketEvents(websocketDebuglog)\n}\n\nmodule.exports = {\n channels\n}\n","'use strict'\n\nconst kUndiciError = Symbol.for('undici.error.UND_ERR')\nclass UndiciError extends Error {\n constructor (message, options) {\n super(message, options)\n this.name = 'UndiciError'\n this.code = 'UND_ERR'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kUndiciError] === true\n }\n\n get [kUndiciError] () {\n return true\n }\n}\n\nconst kConnectTimeoutError = Symbol.for('undici.error.UND_ERR_CONNECT_TIMEOUT')\nclass ConnectTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'ConnectTimeoutError'\n this.message = message || 'Connect Timeout Error'\n this.code = 'UND_ERR_CONNECT_TIMEOUT'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kConnectTimeoutError] === true\n }\n\n get [kConnectTimeoutError] () {\n return true\n }\n}\n\nconst kHeadersTimeoutError = Symbol.for('undici.error.UND_ERR_HEADERS_TIMEOUT')\nclass HeadersTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'HeadersTimeoutError'\n this.message = message || 'Headers Timeout Error'\n this.code = 'UND_ERR_HEADERS_TIMEOUT'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kHeadersTimeoutError] === true\n }\n\n get [kHeadersTimeoutError] () {\n return true\n }\n}\n\nconst kHeadersOverflowError = Symbol.for('undici.error.UND_ERR_HEADERS_OVERFLOW')\nclass HeadersOverflowError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'HeadersOverflowError'\n this.message = message || 'Headers Overflow Error'\n this.code = 'UND_ERR_HEADERS_OVERFLOW'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kHeadersOverflowError] === true\n }\n\n get [kHeadersOverflowError] () {\n return true\n }\n}\n\nconst kBodyTimeoutError = Symbol.for('undici.error.UND_ERR_BODY_TIMEOUT')\nclass BodyTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'BodyTimeoutError'\n this.message = message || 'Body Timeout Error'\n this.code = 'UND_ERR_BODY_TIMEOUT'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kBodyTimeoutError] === true\n }\n\n get [kBodyTimeoutError] () {\n return true\n }\n}\n\nconst kInvalidArgumentError = Symbol.for('undici.error.UND_ERR_INVALID_ARG')\nclass InvalidArgumentError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'InvalidArgumentError'\n this.message = message || 'Invalid Argument Error'\n this.code = 'UND_ERR_INVALID_ARG'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kInvalidArgumentError] === true\n }\n\n get [kInvalidArgumentError] () {\n return true\n }\n}\n\nconst kInvalidReturnValueError = Symbol.for('undici.error.UND_ERR_INVALID_RETURN_VALUE')\nclass InvalidReturnValueError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'InvalidReturnValueError'\n this.message = message || 'Invalid Return Value Error'\n this.code = 'UND_ERR_INVALID_RETURN_VALUE'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kInvalidReturnValueError] === true\n }\n\n get [kInvalidReturnValueError] () {\n return true\n }\n}\n\nconst kAbortError = Symbol.for('undici.error.UND_ERR_ABORT')\nclass AbortError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'AbortError'\n this.message = message || 'The operation was aborted'\n this.code = 'UND_ERR_ABORT'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kAbortError] === true\n }\n\n get [kAbortError] () {\n return true\n }\n}\n\nconst kRequestAbortedError = Symbol.for('undici.error.UND_ERR_ABORTED')\nclass RequestAbortedError extends AbortError {\n constructor (message) {\n super(message)\n this.name = 'AbortError'\n this.message = message || 'Request aborted'\n this.code = 'UND_ERR_ABORTED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kRequestAbortedError] === true\n }\n\n get [kRequestAbortedError] () {\n return true\n }\n}\n\nconst kInformationalError = Symbol.for('undici.error.UND_ERR_INFO')\nclass InformationalError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'InformationalError'\n this.message = message || 'Request information'\n this.code = 'UND_ERR_INFO'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kInformationalError] === true\n }\n\n get [kInformationalError] () {\n return true\n }\n}\n\nconst kRequestContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH')\nclass RequestContentLengthMismatchError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'RequestContentLengthMismatchError'\n this.message = message || 'Request body length does not match content-length header'\n this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kRequestContentLengthMismatchError] === true\n }\n\n get [kRequestContentLengthMismatchError] () {\n return true\n }\n}\n\nconst kResponseContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH')\nclass ResponseContentLengthMismatchError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'ResponseContentLengthMismatchError'\n this.message = message || 'Response body length does not match content-length header'\n this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kResponseContentLengthMismatchError] === true\n }\n\n get [kResponseContentLengthMismatchError] () {\n return true\n }\n}\n\nconst kClientDestroyedError = Symbol.for('undici.error.UND_ERR_DESTROYED')\nclass ClientDestroyedError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'ClientDestroyedError'\n this.message = message || 'The client is destroyed'\n this.code = 'UND_ERR_DESTROYED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kClientDestroyedError] === true\n }\n\n get [kClientDestroyedError] () {\n return true\n }\n}\n\nconst kClientClosedError = Symbol.for('undici.error.UND_ERR_CLOSED')\nclass ClientClosedError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'ClientClosedError'\n this.message = message || 'The client is closed'\n this.code = 'UND_ERR_CLOSED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kClientClosedError] === true\n }\n\n get [kClientClosedError] () {\n return true\n }\n}\n\nconst kSocketError = Symbol.for('undici.error.UND_ERR_SOCKET')\nclass SocketError extends UndiciError {\n constructor (message, socket) {\n super(message)\n this.name = 'SocketError'\n this.message = message || 'Socket error'\n this.code = 'UND_ERR_SOCKET'\n this.socket = socket\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kSocketError] === true\n }\n\n get [kSocketError] () {\n return true\n }\n}\n\nconst kNotSupportedError = Symbol.for('undici.error.UND_ERR_NOT_SUPPORTED')\nclass NotSupportedError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'NotSupportedError'\n this.message = message || 'Not supported error'\n this.code = 'UND_ERR_NOT_SUPPORTED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kNotSupportedError] === true\n }\n\n get [kNotSupportedError] () {\n return true\n }\n}\n\nconst kBalancedPoolMissingUpstreamError = Symbol.for('undici.error.UND_ERR_BPL_MISSING_UPSTREAM')\nclass BalancedPoolMissingUpstreamError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'MissingUpstreamError'\n this.message = message || 'No upstream has been added to the BalancedPool'\n this.code = 'UND_ERR_BPL_MISSING_UPSTREAM'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kBalancedPoolMissingUpstreamError] === true\n }\n\n get [kBalancedPoolMissingUpstreamError] () {\n return true\n }\n}\n\nconst kHTTPParserError = Symbol.for('undici.error.UND_ERR_HTTP_PARSER')\nclass HTTPParserError extends Error {\n constructor (message, code, data) {\n super(message)\n this.name = 'HTTPParserError'\n this.code = code ? `HPE_${code}` : undefined\n this.data = data ? data.toString() : undefined\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kHTTPParserError] === true\n }\n\n get [kHTTPParserError] () {\n return true\n }\n}\n\nconst kResponseExceededMaxSizeError = Symbol.for('undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE')\nclass ResponseExceededMaxSizeError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'ResponseExceededMaxSizeError'\n this.message = message || 'Response content exceeded max size'\n this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kResponseExceededMaxSizeError] === true\n }\n\n get [kResponseExceededMaxSizeError] () {\n return true\n }\n}\n\nconst kRequestRetryError = Symbol.for('undici.error.UND_ERR_REQ_RETRY')\nclass RequestRetryError extends UndiciError {\n constructor (message, code, { headers, data }) {\n super(message)\n this.name = 'RequestRetryError'\n this.message = message || 'Request retry error'\n this.code = 'UND_ERR_REQ_RETRY'\n this.statusCode = code\n this.data = data\n this.headers = headers\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kRequestRetryError] === true\n }\n\n get [kRequestRetryError] () {\n return true\n }\n}\n\nconst kResponseError = Symbol.for('undici.error.UND_ERR_RESPONSE')\nclass ResponseError extends UndiciError {\n constructor (message, code, { headers, body }) {\n super(message)\n this.name = 'ResponseError'\n this.message = message || 'Response error'\n this.code = 'UND_ERR_RESPONSE'\n this.statusCode = code\n this.body = body\n this.headers = headers\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kResponseError] === true\n }\n\n get [kResponseError] () {\n return true\n }\n}\n\nconst kSecureProxyConnectionError = Symbol.for('undici.error.UND_ERR_PRX_TLS')\nclass SecureProxyConnectionError extends UndiciError {\n constructor (cause, message, options = {}) {\n super(message, { cause, ...options })\n this.name = 'SecureProxyConnectionError'\n this.message = message || 'Secure Proxy Connection failed'\n this.code = 'UND_ERR_PRX_TLS'\n this.cause = cause\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kSecureProxyConnectionError] === true\n }\n\n get [kSecureProxyConnectionError] () {\n return true\n }\n}\n\nconst kMaxOriginsReachedError = Symbol.for('undici.error.UND_ERR_MAX_ORIGINS_REACHED')\nclass MaxOriginsReachedError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'MaxOriginsReachedError'\n this.message = message || 'Maximum allowed origins reached'\n this.code = 'UND_ERR_MAX_ORIGINS_REACHED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kMaxOriginsReachedError] === true\n }\n\n get [kMaxOriginsReachedError] () {\n return true\n }\n}\n\nclass Socks5ProxyError extends UndiciError {\n constructor (message, code) {\n super(message)\n this.name = 'Socks5ProxyError'\n this.message = message || 'SOCKS5 proxy error'\n this.code = code || 'UND_ERR_SOCKS5'\n }\n}\n\nconst kMessageSizeExceededError = Symbol.for('undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED')\nclass MessageSizeExceededError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'MessageSizeExceededError'\n this.message = message || 'Max decompressed message size exceeded'\n this.code = 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kMessageSizeExceededError] === true\n }\n\n get [kMessageSizeExceededError] () {\n return true\n }\n}\n\nmodule.exports = {\n AbortError,\n HTTPParserError,\n UndiciError,\n HeadersTimeoutError,\n HeadersOverflowError,\n BodyTimeoutError,\n RequestContentLengthMismatchError,\n ConnectTimeoutError,\n InvalidArgumentError,\n InvalidReturnValueError,\n RequestAbortedError,\n ClientDestroyedError,\n ClientClosedError,\n InformationalError,\n SocketError,\n NotSupportedError,\n ResponseContentLengthMismatchError,\n BalancedPoolMissingUpstreamError,\n ResponseExceededMaxSizeError,\n RequestRetryError,\n ResponseError,\n SecureProxyConnectionError,\n MaxOriginsReachedError,\n Socks5ProxyError,\n MessageSizeExceededError\n}\n","'use strict'\n\nconst {\n InvalidArgumentError,\n NotSupportedError\n} = require('./errors')\nconst assert = require('node:assert')\nconst {\n isValidHTTPToken,\n isValidHeaderValue,\n isStream,\n destroy,\n isBuffer,\n isFormDataLike,\n isIterable,\n hasSafeIterator,\n isBlobLike,\n serializePathWithQuery,\n assertRequestHandler,\n getServerName,\n normalizedMethodRecords,\n getProtocolFromUrlString\n} = require('./util')\nconst { channels } = require('./diagnostics.js')\nconst { headerNameLowerCasedRecord } = require('./constants')\n\n// Verifies that a given path is valid does not contain control chars \\x00 to \\x20\nconst invalidPathRegex = /[^\\u0021-\\u00ff]/\n\nconst kHandler = Symbol('handler')\n\nclass Request {\n constructor (origin, {\n path,\n method,\n body,\n headers,\n query,\n idempotent,\n blocking,\n upgrade,\n headersTimeout,\n bodyTimeout,\n reset,\n expectContinue,\n servername,\n throwOnError,\n maxRedirections,\n typeOfService\n }, handler) {\n if (typeof path !== 'string') {\n throw new InvalidArgumentError('path must be a string')\n } else if (\n path[0] !== '/' &&\n !(path.startsWith('http://') || path.startsWith('https://')) &&\n method !== 'CONNECT'\n ) {\n throw new InvalidArgumentError('path must be an absolute URL or start with a slash')\n } else if (invalidPathRegex.test(path)) {\n throw new InvalidArgumentError('invalid request path')\n }\n\n if (typeof method !== 'string') {\n throw new InvalidArgumentError('method must be a string')\n } else if (normalizedMethodRecords[method] === undefined && !isValidHTTPToken(method)) {\n throw new InvalidArgumentError('invalid request method')\n }\n\n if (upgrade && typeof upgrade !== 'string') {\n throw new InvalidArgumentError('upgrade must be a string')\n }\n\n if (upgrade && !isValidHeaderValue(upgrade)) {\n throw new InvalidArgumentError('invalid upgrade header')\n }\n\n if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) {\n throw new InvalidArgumentError('invalid headersTimeout')\n }\n\n if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) {\n throw new InvalidArgumentError('invalid bodyTimeout')\n }\n\n if (reset != null && typeof reset !== 'boolean') {\n throw new InvalidArgumentError('invalid reset')\n }\n\n if (expectContinue != null && typeof expectContinue !== 'boolean') {\n throw new InvalidArgumentError('invalid expectContinue')\n }\n\n if (throwOnError != null) {\n throw new InvalidArgumentError('invalid throwOnError')\n }\n\n if (maxRedirections != null && maxRedirections !== 0) {\n throw new InvalidArgumentError('maxRedirections is not supported, use the redirect interceptor')\n }\n\n if (typeOfService != null && (!Number.isInteger(typeOfService) || typeOfService < 0 || typeOfService > 255)) {\n throw new InvalidArgumentError('typeOfService must be an integer between 0 and 255')\n }\n\n this.headersTimeout = headersTimeout\n\n this.bodyTimeout = bodyTimeout\n\n this.method = method\n\n this.typeOfService = typeOfService ?? 0\n\n this.abort = null\n\n if (body == null) {\n this.body = null\n } else if (isStream(body)) {\n this.body = body\n\n const rState = this.body._readableState\n if (!rState || !rState.autoDestroy) {\n this.endHandler = function autoDestroy () {\n destroy(this)\n }\n this.body.on('end', this.endHandler)\n }\n\n this.errorHandler = err => {\n if (this.abort) {\n this.abort(err)\n } else {\n this.error = err\n }\n }\n this.body.on('error', this.errorHandler)\n } else if (isBuffer(body)) {\n this.body = body.byteLength ? body : null\n } else if (ArrayBuffer.isView(body)) {\n this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null\n } else if (body instanceof ArrayBuffer) {\n this.body = body.byteLength ? Buffer.from(body) : null\n } else if (typeof body === 'string') {\n this.body = body.length ? Buffer.from(body) : null\n } else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) {\n this.body = body\n } else {\n throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable')\n }\n\n this.completed = false\n this.aborted = false\n\n this.upgrade = upgrade || null\n\n this.path = query ? serializePathWithQuery(path, query) : path\n\n // TODO: shall we maybe standardize it to an URL object?\n this.origin = origin\n\n this.protocol = getProtocolFromUrlString(origin)\n\n this.idempotent = idempotent == null\n ? method === 'HEAD' || method === 'GET'\n : idempotent\n\n this.blocking = blocking ?? this.method !== 'HEAD'\n\n this.reset = reset == null ? null : reset\n\n this.host = null\n\n this.contentLength = null\n\n this.contentType = null\n\n this.headers = []\n\n // Only for H2\n this.expectContinue = expectContinue != null ? expectContinue : false\n\n if (Array.isArray(headers)) {\n if (headers.length % 2 !== 0) {\n throw new InvalidArgumentError('headers array must be even')\n }\n for (let i = 0; i < headers.length; i += 2) {\n processHeader(this, headers[i], headers[i + 1])\n }\n } else if (headers && typeof headers === 'object') {\n if (hasSafeIterator(headers)) {\n for (const header of headers) {\n if (!Array.isArray(header) || header.length !== 2) {\n throw new InvalidArgumentError('headers must be in key-value pair format')\n }\n processHeader(this, header[0], header[1])\n }\n } else {\n const keys = Object.keys(headers)\n for (let i = 0; i < keys.length; ++i) {\n processHeader(this, keys[i], headers[keys[i]])\n }\n }\n } else if (headers != null) {\n throw new InvalidArgumentError('headers must be an object or an array')\n }\n\n assertRequestHandler(handler, method, upgrade)\n\n this.servername = servername || getServerName(this.host) || null\n\n this[kHandler] = handler\n\n if (channels.create.hasSubscribers) {\n channels.create.publish({ request: this })\n }\n }\n\n onBodySent (chunk) {\n if (channels.bodyChunkSent.hasSubscribers) {\n channels.bodyChunkSent.publish({ request: this, chunk })\n }\n if (this[kHandler].onBodySent) {\n try {\n return this[kHandler].onBodySent(chunk)\n } catch (err) {\n this.abort(err)\n }\n }\n }\n\n onRequestSent () {\n if (channels.bodySent.hasSubscribers) {\n channels.bodySent.publish({ request: this })\n }\n\n if (this[kHandler].onRequestSent) {\n try {\n return this[kHandler].onRequestSent()\n } catch (err) {\n this.abort(err)\n }\n }\n }\n\n onConnect (abort) {\n assert(!this.aborted)\n assert(!this.completed)\n\n if (this.error) {\n abort(this.error)\n } else {\n this.abort = abort\n return this[kHandler].onConnect(abort)\n }\n }\n\n onResponseStarted () {\n return this[kHandler].onResponseStarted?.()\n }\n\n onHeaders (statusCode, headers, resume, statusText) {\n assert(!this.aborted)\n assert(!this.completed)\n\n if (channels.headers.hasSubscribers) {\n channels.headers.publish({ request: this, response: { statusCode, headers, statusText } })\n }\n\n try {\n return this[kHandler].onHeaders(statusCode, headers, resume, statusText)\n } catch (err) {\n this.abort(err)\n }\n }\n\n onData (chunk) {\n assert(!this.aborted)\n assert(!this.completed)\n\n if (channels.bodyChunkReceived.hasSubscribers) {\n channels.bodyChunkReceived.publish({ request: this, chunk })\n }\n try {\n return this[kHandler].onData(chunk)\n } catch (err) {\n this.abort(err)\n return false\n }\n }\n\n onUpgrade (statusCode, headers, socket) {\n assert(!this.aborted)\n assert(!this.completed)\n\n return this[kHandler].onUpgrade(statusCode, headers, socket)\n }\n\n onComplete (trailers) {\n this.onFinally()\n\n assert(!this.aborted)\n assert(!this.completed)\n\n this.completed = true\n if (channels.trailers.hasSubscribers) {\n channels.trailers.publish({ request: this, trailers })\n }\n\n try {\n return this[kHandler].onComplete(trailers)\n } catch (err) {\n // TODO (fix): This might be a bad idea?\n this.onError(err)\n }\n }\n\n onError (error) {\n this.onFinally()\n\n if (channels.error.hasSubscribers) {\n channels.error.publish({ request: this, error })\n }\n\n if (this.aborted) {\n return\n }\n this.aborted = true\n\n return this[kHandler].onError(error)\n }\n\n onFinally () {\n if (this.errorHandler) {\n this.body.off('error', this.errorHandler)\n this.errorHandler = null\n }\n\n if (this.endHandler) {\n this.body.off('end', this.endHandler)\n this.endHandler = null\n }\n }\n\n addHeader (key, value) {\n processHeader(this, key, value)\n return this\n }\n}\n\nfunction processHeader (request, key, val) {\n if (val && (typeof val === 'object' && !Array.isArray(val))) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n } else if (val === undefined) {\n return\n }\n\n let headerName = headerNameLowerCasedRecord[key]\n\n if (headerName === undefined) {\n headerName = key.toLowerCase()\n if (headerNameLowerCasedRecord[headerName] === undefined && !isValidHTTPToken(headerName)) {\n throw new InvalidArgumentError('invalid header key')\n }\n }\n\n if (Array.isArray(val)) {\n const arr = []\n for (let i = 0; i < val.length; i++) {\n if (typeof val[i] === 'string') {\n if (!isValidHeaderValue(val[i])) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n }\n arr.push(val[i])\n } else if (val[i] === null) {\n arr.push('')\n } else if (typeof val[i] === 'object') {\n throw new InvalidArgumentError(`invalid ${key} header`)\n } else {\n arr.push(`${val[i]}`)\n }\n }\n val = arr\n } else if (typeof val === 'string') {\n if (!isValidHeaderValue(val)) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n }\n } else if (val === null) {\n val = ''\n } else {\n val = `${val}`\n }\n\n if (headerName === 'host') {\n if (request.host !== null) {\n throw new InvalidArgumentError('duplicate host header')\n }\n if (typeof val !== 'string') {\n throw new InvalidArgumentError('invalid host header')\n }\n // Consumed by Client\n request.host = val\n } else if (headerName === 'content-length') {\n if (request.contentLength !== null) {\n throw new InvalidArgumentError('duplicate content-length header')\n }\n request.contentLength = parseInt(val, 10)\n if (!Number.isFinite(request.contentLength)) {\n throw new InvalidArgumentError('invalid content-length header')\n }\n } else if (request.contentType === null && headerName === 'content-type') {\n request.contentType = val\n request.headers.push(key, val)\n } else if (headerName === 'transfer-encoding' || headerName === 'keep-alive' || headerName === 'upgrade') {\n throw new InvalidArgumentError(`invalid ${headerName} header`)\n } else if (headerName === 'connection') {\n // Per RFC 7230 Section 6.1, Connection header can contain\n // a comma-separated list of connection option tokens (header names)\n const value = typeof val === 'string' ? val : null\n if (value === null) {\n throw new InvalidArgumentError('invalid connection header')\n }\n\n for (const token of value.toLowerCase().split(',')) {\n const trimmed = token.trim()\n if (!isValidHTTPToken(trimmed)) {\n throw new InvalidArgumentError('invalid connection header')\n }\n if (trimmed === 'close') {\n request.reset = true\n }\n }\n } else if (headerName === 'expect') {\n throw new NotSupportedError('expect header not supported')\n } else {\n request.headers.push(key, val)\n }\n}\n\nmodule.exports = Request\n","'use strict'\n\nconst { EventEmitter } = require('node:events')\nconst { Buffer } = require('node:buffer')\nconst { InvalidArgumentError, Socks5ProxyError } = require('./errors')\nconst { debuglog } = require('node:util')\nconst { parseAddress } = require('./socks5-utils')\n\nconst debug = debuglog('undici:socks5')\n\n// SOCKS5 constants\nconst SOCKS_VERSION = 0x05\n\n// Authentication methods\nconst AUTH_METHODS = {\n NO_AUTH: 0x00,\n GSSAPI: 0x01,\n USERNAME_PASSWORD: 0x02,\n NO_ACCEPTABLE: 0xFF\n}\n\n// SOCKS5 commands\nconst COMMANDS = {\n CONNECT: 0x01,\n BIND: 0x02,\n UDP_ASSOCIATE: 0x03\n}\n\n// Address types\nconst ADDRESS_TYPES = {\n IPV4: 0x01,\n DOMAIN: 0x03,\n IPV6: 0x04\n}\n\n// Reply codes\nconst REPLY_CODES = {\n SUCCEEDED: 0x00,\n GENERAL_FAILURE: 0x01,\n CONNECTION_NOT_ALLOWED: 0x02,\n NETWORK_UNREACHABLE: 0x03,\n HOST_UNREACHABLE: 0x04,\n CONNECTION_REFUSED: 0x05,\n TTL_EXPIRED: 0x06,\n COMMAND_NOT_SUPPORTED: 0x07,\n ADDRESS_TYPE_NOT_SUPPORTED: 0x08\n}\n\n// State machine states\nconst STATES = {\n INITIAL: 'initial',\n HANDSHAKING: 'handshaking',\n AUTHENTICATING: 'authenticating',\n CONNECTING: 'connecting',\n CONNECTED: 'connected',\n ERROR: 'error',\n CLOSED: 'closed'\n}\n\n/**\n * SOCKS5 client implementation\n * Handles SOCKS5 protocol negotiation and connection establishment\n */\nclass Socks5Client extends EventEmitter {\n constructor (socket, options = {}) {\n super()\n\n if (!socket) {\n throw new InvalidArgumentError('socket is required')\n }\n\n this.socket = socket\n this.options = options\n this.state = STATES.INITIAL\n this.buffer = Buffer.alloc(0)\n\n // Authentication settings\n this.authMethods = []\n if (options.username && options.password) {\n this.authMethods.push(AUTH_METHODS.USERNAME_PASSWORD)\n }\n this.authMethods.push(AUTH_METHODS.NO_AUTH)\n\n // Socket event handlers\n this.socket.on('data', this.onData.bind(this))\n this.socket.on('error', this.onError.bind(this))\n this.socket.on('close', this.onClose.bind(this))\n }\n\n /**\n * Handle incoming data from the socket\n */\n onData (data) {\n debug('received data', data.length, 'bytes in state', this.state)\n this.buffer = Buffer.concat([this.buffer, data])\n\n try {\n switch (this.state) {\n case STATES.HANDSHAKING:\n this.handleHandshakeResponse()\n break\n case STATES.AUTHENTICATING:\n this.handleAuthResponse()\n break\n case STATES.CONNECTING:\n this.handleConnectResponse()\n break\n }\n } catch (err) {\n this.onError(err)\n }\n }\n\n /**\n * Handle socket errors\n */\n onError (err) {\n debug('socket error', err)\n this.state = STATES.ERROR\n this.emit('error', err)\n this.destroy()\n }\n\n /**\n * Handle socket close\n */\n onClose () {\n debug('socket closed')\n this.state = STATES.CLOSED\n this.emit('close')\n }\n\n /**\n * Destroy the client and underlying socket\n */\n destroy () {\n if (this.socket && !this.socket.destroyed) {\n this.socket.destroy()\n }\n }\n\n /**\n * Start the SOCKS5 handshake\n */\n handshake () {\n if (this.state !== STATES.INITIAL) {\n throw new InvalidArgumentError('Handshake already started')\n }\n\n debug('starting handshake with', this.authMethods.length, 'auth methods')\n this.state = STATES.HANDSHAKING\n\n // Build handshake request\n // +----+----------+----------+\n // |VER | NMETHODS | METHODS |\n // +----+----------+----------+\n // | 1 | 1 | 1 to 255 |\n // +----+----------+----------+\n const request = Buffer.alloc(2 + this.authMethods.length)\n request[0] = SOCKS_VERSION\n request[1] = this.authMethods.length\n this.authMethods.forEach((method, i) => {\n request[2 + i] = method\n })\n\n this.socket.write(request)\n }\n\n /**\n * Handle handshake response from server\n */\n handleHandshakeResponse () {\n if (this.buffer.length < 2) {\n return // Not enough data yet\n }\n\n const version = this.buffer[0]\n const method = this.buffer[1]\n\n if (version !== SOCKS_VERSION) {\n throw new Socks5ProxyError(`Invalid SOCKS version: ${version}`, 'UND_ERR_SOCKS5_VERSION')\n }\n\n if (method === AUTH_METHODS.NO_ACCEPTABLE) {\n throw new Socks5ProxyError('No acceptable authentication method', 'UND_ERR_SOCKS5_AUTH_REJECTED')\n }\n\n this.buffer = this.buffer.subarray(2)\n debug('server selected auth method', method)\n\n if (method === AUTH_METHODS.NO_AUTH) {\n this.emit('authenticated')\n } else if (method === AUTH_METHODS.USERNAME_PASSWORD) {\n this.state = STATES.AUTHENTICATING\n this.sendAuthRequest()\n } else {\n throw new Socks5ProxyError(`Unsupported authentication method: ${method}`, 'UND_ERR_SOCKS5_AUTH_METHOD')\n }\n }\n\n /**\n * Send username/password authentication request\n */\n sendAuthRequest () {\n const { username, password } = this.options\n\n if (!username || !password) {\n throw new InvalidArgumentError('Username and password required for authentication')\n }\n\n debug('sending username/password auth')\n\n // Username/Password authentication request (RFC 1929)\n // +----+------+----------+------+----------+\n // |VER | ULEN | UNAME | PLEN | PASSWD |\n // +----+------+----------+------+----------+\n // | 1 | 1 | 1 to 255 | 1 | 1 to 255 |\n // +----+------+----------+------+----------+\n const usernameBuffer = Buffer.from(username)\n const passwordBuffer = Buffer.from(password)\n\n if (usernameBuffer.length > 255 || passwordBuffer.length > 255) {\n throw new InvalidArgumentError('Username or password too long')\n }\n\n const request = Buffer.alloc(3 + usernameBuffer.length + passwordBuffer.length)\n request[0] = 0x01 // Sub-negotiation version\n request[1] = usernameBuffer.length\n usernameBuffer.copy(request, 2)\n request[2 + usernameBuffer.length] = passwordBuffer.length\n passwordBuffer.copy(request, 3 + usernameBuffer.length)\n\n this.socket.write(request)\n }\n\n /**\n * Handle authentication response\n */\n handleAuthResponse () {\n if (this.buffer.length < 2) {\n return // Not enough data yet\n }\n\n const version = this.buffer[0]\n const status = this.buffer[1]\n\n if (version !== 0x01) {\n throw new Socks5ProxyError(`Invalid auth sub-negotiation version: ${version}`, 'UND_ERR_SOCKS5_AUTH_VERSION')\n }\n\n if (status !== 0x00) {\n throw new Socks5ProxyError('Authentication failed', 'UND_ERR_SOCKS5_AUTH_FAILED')\n }\n\n this.buffer = this.buffer.subarray(2)\n debug('authentication successful')\n this.emit('authenticated')\n }\n\n /**\n * Send CONNECT command\n * @param {string} address - Target address (IP or domain)\n * @param {number} port - Target port\n */\n connect (address, port) {\n if (this.state === STATES.CONNECTED) {\n throw new InvalidArgumentError('Already connected')\n }\n\n debug('connecting to', address, port)\n this.state = STATES.CONNECTING\n\n const request = this.buildConnectRequest(COMMANDS.CONNECT, address, port)\n this.socket.write(request)\n }\n\n /**\n * Build a SOCKS5 request\n */\n buildConnectRequest (command, address, port) {\n // Parse address to determine type and buffer\n const { type: addressType, buffer: addressBuffer } = parseAddress(address)\n\n // Build request\n // +----+-----+-------+------+----------+----------+\n // |VER | CMD | RSV | ATYP | DST.ADDR | DST.PORT |\n // +----+-----+-------+------+----------+----------+\n // | 1 | 1 | X'00' | 1 | Variable | 2 |\n // +----+-----+-------+------+----------+----------+\n const request = Buffer.alloc(4 + addressBuffer.length + 2)\n request[0] = SOCKS_VERSION\n request[1] = command\n request[2] = 0x00 // Reserved\n request[3] = addressType\n addressBuffer.copy(request, 4)\n request.writeUInt16BE(port, 4 + addressBuffer.length)\n\n return request\n }\n\n /**\n * Handle CONNECT response\n */\n handleConnectResponse () {\n if (this.buffer.length < 4) {\n return // Not enough data for header\n }\n\n const version = this.buffer[0]\n const reply = this.buffer[1]\n const addressType = this.buffer[3]\n\n if (version !== SOCKS_VERSION) {\n throw new Socks5ProxyError(`Invalid SOCKS version in reply: ${version}`, 'UND_ERR_SOCKS5_REPLY_VERSION')\n }\n\n // Calculate the expected response length\n let responseLength = 4 // VER + REP + RSV + ATYP\n if (addressType === ADDRESS_TYPES.IPV4) {\n responseLength += 4 + 2 // IPv4 + port\n } else if (addressType === ADDRESS_TYPES.DOMAIN) {\n if (this.buffer.length < 5) {\n return // Need domain length byte\n }\n responseLength += 1 + this.buffer[4] + 2 // length byte + domain + port\n } else if (addressType === ADDRESS_TYPES.IPV6) {\n responseLength += 16 + 2 // IPv6 + port\n } else {\n throw new Socks5ProxyError(`Invalid address type in reply: ${addressType}`, 'UND_ERR_SOCKS5_ADDR_TYPE')\n }\n\n if (this.buffer.length < responseLength) {\n return // Not enough data for full response\n }\n\n if (reply !== REPLY_CODES.SUCCEEDED) {\n const errorMessage = this.getReplyErrorMessage(reply)\n throw new Socks5ProxyError(`SOCKS5 connection failed: ${errorMessage}`, `UND_ERR_SOCKS5_REPLY_${reply}`)\n }\n\n // Parse bound address and port\n let boundAddress\n let offset = 4\n\n if (addressType === ADDRESS_TYPES.IPV4) {\n boundAddress = Array.from(this.buffer.subarray(offset, offset + 4)).join('.')\n offset += 4\n } else if (addressType === ADDRESS_TYPES.DOMAIN) {\n const domainLength = this.buffer[offset]\n offset += 1\n boundAddress = this.buffer.subarray(offset, offset + domainLength).toString()\n offset += domainLength\n } else if (addressType === ADDRESS_TYPES.IPV6) {\n // Parse IPv6 address from 16-byte buffer\n const parts = []\n for (let i = 0; i < 8; i++) {\n const value = this.buffer.readUInt16BE(offset + i * 2)\n parts.push(value.toString(16))\n }\n boundAddress = parts.join(':')\n offset += 16\n }\n\n const boundPort = this.buffer.readUInt16BE(offset)\n\n this.buffer = this.buffer.subarray(responseLength)\n this.state = STATES.CONNECTED\n\n debug('connected, bound address:', boundAddress, 'port:', boundPort)\n this.emit('connected', { address: boundAddress, port: boundPort })\n }\n\n /**\n * Get human-readable error message for reply code\n */\n getReplyErrorMessage (reply) {\n switch (reply) {\n case REPLY_CODES.GENERAL_FAILURE:\n return 'General SOCKS server failure'\n case REPLY_CODES.CONNECTION_NOT_ALLOWED:\n return 'Connection not allowed by ruleset'\n case REPLY_CODES.NETWORK_UNREACHABLE:\n return 'Network unreachable'\n case REPLY_CODES.HOST_UNREACHABLE:\n return 'Host unreachable'\n case REPLY_CODES.CONNECTION_REFUSED:\n return 'Connection refused'\n case REPLY_CODES.TTL_EXPIRED:\n return 'TTL expired'\n case REPLY_CODES.COMMAND_NOT_SUPPORTED:\n return 'Command not supported'\n case REPLY_CODES.ADDRESS_TYPE_NOT_SUPPORTED:\n return 'Address type not supported'\n default:\n return `Unknown error code: ${reply}`\n }\n }\n}\n\nmodule.exports = {\n Socks5Client,\n AUTH_METHODS,\n COMMANDS,\n ADDRESS_TYPES,\n REPLY_CODES,\n STATES\n}\n","'use strict'\n\nconst { Buffer } = require('node:buffer')\nconst net = require('node:net')\nconst { InvalidArgumentError } = require('./errors')\n\n/**\n * Parse an address and determine its type\n * @param {string} address - The address to parse\n * @returns {{type: number, buffer: Buffer}} Address type and buffer\n */\nfunction parseAddress (address) {\n // Check if it's an IPv4 address\n if (net.isIPv4(address)) {\n const parts = address.split('.').map(Number)\n return {\n type: 0x01, // IPv4\n buffer: Buffer.from(parts)\n }\n }\n\n // Check if it's an IPv6 address\n if (net.isIPv6(address)) {\n return {\n type: 0x04, // IPv6\n buffer: parseIPv6(address)\n }\n }\n\n // Otherwise, treat as domain name\n const domainBuffer = Buffer.from(address, 'utf8')\n if (domainBuffer.length > 255) {\n throw new InvalidArgumentError('Domain name too long (max 255 bytes)')\n }\n\n return {\n type: 0x03, // Domain\n buffer: Buffer.concat([Buffer.from([domainBuffer.length]), domainBuffer])\n }\n}\n\n/**\n * Parse IPv6 address to buffer\n * @param {string} address - IPv6 address string\n * @returns {Buffer} 16-byte buffer\n */\nfunction parseIPv6 (address) {\n const buffer = Buffer.alloc(16)\n const parts = address.split(':')\n let partIndex = 0\n let bufferIndex = 0\n\n // Handle compressed notation (::)\n const doubleColonIndex = address.indexOf('::')\n if (doubleColonIndex !== -1) {\n // Count non-empty parts\n const nonEmptyParts = parts.filter(p => p.length > 0).length\n const skipParts = 8 - nonEmptyParts\n\n for (let i = 0; i < parts.length; i++) {\n if (parts[i] === '' && i === doubleColonIndex / 3) {\n // Skip empty parts for ::\n bufferIndex += skipParts * 2\n } else if (parts[i] !== '') {\n const value = parseInt(parts[i], 16)\n buffer.writeUInt16BE(value, bufferIndex)\n bufferIndex += 2\n }\n }\n } else {\n // No compression, parse normally\n for (const part of parts) {\n if (part === '') continue\n const value = parseInt(part, 16)\n buffer.writeUInt16BE(value, partIndex * 2)\n partIndex++\n }\n }\n\n return buffer\n}\n\n/**\n * Build a SOCKS5 address buffer\n * @param {number} type - Address type (1=IPv4, 3=Domain, 4=IPv6)\n * @param {Buffer} addressBuffer - The address data\n * @param {number} port - Port number\n * @returns {Buffer} Complete address buffer including type, address, and port\n */\nfunction buildAddressBuffer (type, addressBuffer, port) {\n const portBuffer = Buffer.allocUnsafe(2)\n portBuffer.writeUInt16BE(port, 0)\n\n return Buffer.concat([\n Buffer.from([type]),\n addressBuffer,\n portBuffer\n ])\n}\n\n/**\n * Parse address from SOCKS5 response\n * @param {Buffer} buffer - Buffer containing the address\n * @param {number} offset - Starting offset in buffer\n * @returns {{address: string, port: number, bytesRead: number}}\n */\nfunction parseResponseAddress (buffer, offset = 0) {\n if (buffer.length < offset + 1) {\n throw new InvalidArgumentError('Buffer too small to contain address type')\n }\n\n const addressType = buffer[offset]\n let address\n let currentOffset = offset + 1\n\n switch (addressType) {\n case 0x01: { // IPv4\n if (buffer.length < currentOffset + 6) {\n throw new InvalidArgumentError('Buffer too small for IPv4 address')\n }\n address = Array.from(buffer.subarray(currentOffset, currentOffset + 4)).join('.')\n currentOffset += 4\n break\n }\n\n case 0x03: { // Domain\n if (buffer.length < currentOffset + 1) {\n throw new InvalidArgumentError('Buffer too small for domain length')\n }\n const domainLength = buffer[currentOffset]\n currentOffset += 1\n\n if (buffer.length < currentOffset + domainLength + 2) {\n throw new InvalidArgumentError('Buffer too small for domain address')\n }\n address = buffer.subarray(currentOffset, currentOffset + domainLength).toString('utf8')\n currentOffset += domainLength\n break\n }\n\n case 0x04: { // IPv6\n if (buffer.length < currentOffset + 18) {\n throw new InvalidArgumentError('Buffer too small for IPv6 address')\n }\n // Convert buffer to IPv6 string\n const parts = []\n for (let i = 0; i < 8; i++) {\n const value = buffer.readUInt16BE(currentOffset + i * 2)\n parts.push(value.toString(16))\n }\n address = parts.join(':')\n currentOffset += 16\n break\n }\n\n default:\n throw new InvalidArgumentError(`Invalid address type: ${addressType}`)\n }\n\n // Parse port\n if (buffer.length < currentOffset + 2) {\n throw new InvalidArgumentError('Buffer too small for port')\n }\n const port = buffer.readUInt16BE(currentOffset)\n currentOffset += 2\n\n return {\n address,\n port,\n bytesRead: currentOffset - offset\n }\n}\n\n/**\n * Create error for SOCKS5 reply code\n * @param {number} replyCode - SOCKS5 reply code\n * @returns {Error} Appropriate error object\n */\nfunction createReplyError (replyCode) {\n const messages = {\n 0x01: 'General SOCKS server failure',\n 0x02: 'Connection not allowed by ruleset',\n 0x03: 'Network unreachable',\n 0x04: 'Host unreachable',\n 0x05: 'Connection refused',\n 0x06: 'TTL expired',\n 0x07: 'Command not supported',\n 0x08: 'Address type not supported'\n }\n\n const message = messages[replyCode] || `Unknown SOCKS5 error code: ${replyCode}`\n const error = new Error(message)\n error.code = `SOCKS5_${replyCode}`\n return error\n}\n\nmodule.exports = {\n parseAddress,\n parseIPv6,\n buildAddressBuffer,\n parseResponseAddress,\n createReplyError\n}\n","'use strict'\n\nmodule.exports = {\n kClose: Symbol('close'),\n kDestroy: Symbol('destroy'),\n kDispatch: Symbol('dispatch'),\n kUrl: Symbol('url'),\n kWriting: Symbol('writing'),\n kResuming: Symbol('resuming'),\n kQueue: Symbol('queue'),\n kConnect: Symbol('connect'),\n kConnecting: Symbol('connecting'),\n kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'),\n kKeepAliveMaxTimeout: Symbol('max keep alive timeout'),\n kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'),\n kKeepAliveTimeoutValue: Symbol('keep alive timeout'),\n kKeepAlive: Symbol('keep alive'),\n kHeadersTimeout: Symbol('headers timeout'),\n kBodyTimeout: Symbol('body timeout'),\n kServerName: Symbol('server name'),\n kLocalAddress: Symbol('local address'),\n kHost: Symbol('host'),\n kNoRef: Symbol('no ref'),\n kBodyUsed: Symbol('used'),\n kBody: Symbol('abstracted request body'),\n kRunning: Symbol('running'),\n kBlocking: Symbol('blocking'),\n kPending: Symbol('pending'),\n kSize: Symbol('size'),\n kBusy: Symbol('busy'),\n kQueued: Symbol('queued'),\n kFree: Symbol('free'),\n kConnected: Symbol('connected'),\n kClosed: Symbol('closed'),\n kNeedDrain: Symbol('need drain'),\n kReset: Symbol('reset'),\n kDestroyed: Symbol.for('nodejs.stream.destroyed'),\n kResume: Symbol('resume'),\n kOnError: Symbol('on error'),\n kMaxHeadersSize: Symbol('max headers size'),\n kRunningIdx: Symbol('running index'),\n kPendingIdx: Symbol('pending index'),\n kError: Symbol('error'),\n kClients: Symbol('clients'),\n kClient: Symbol('client'),\n kParser: Symbol('parser'),\n kOnDestroyed: Symbol('destroy callbacks'),\n kPipelining: Symbol('pipelining'),\n kSocket: Symbol('socket'),\n kHostHeader: Symbol('host header'),\n kConnector: Symbol('connector'),\n kStrictContentLength: Symbol('strict content length'),\n kMaxRedirections: Symbol('maxRedirections'),\n kMaxRequests: Symbol('maxRequestsPerClient'),\n kProxy: Symbol('proxy agent options'),\n kCounter: Symbol('socket request counter'),\n kMaxResponseSize: Symbol('max response size'),\n kHTTP2Session: Symbol('http2Session'),\n kHTTP2SessionState: Symbol('http2Session state'),\n kRetryHandlerDefaultRetry: Symbol('retry agent default retry'),\n kConstruct: Symbol('constructable'),\n kListeners: Symbol('listeners'),\n kHTTPContext: Symbol('http context'),\n kMaxConcurrentStreams: Symbol('max concurrent streams'),\n kHTTP2InitialWindowSize: Symbol('http2 initial window size'),\n kHTTP2ConnectionWindowSize: Symbol('http2 connection window size'),\n kEnableConnectProtocol: Symbol('http2session connect protocol'),\n kRemoteSettings: Symbol('http2session remote settings'),\n kHTTP2Stream: Symbol('http2session client stream'),\n kPingInterval: Symbol('ping interval'),\n kNoProxyAgent: Symbol('no proxy agent'),\n kHttpProxyAgent: Symbol('http proxy agent'),\n kHttpsProxyAgent: Symbol('https proxy agent'),\n kSocks5ProxyAgent: Symbol('socks5 proxy agent')\n}\n","'use strict'\n\nconst {\n wellknownHeaderNames,\n headerNameLowerCasedRecord\n} = require('./constants')\n\nclass TstNode {\n /** @type {any} */\n value = null\n /** @type {null | TstNode} */\n left = null\n /** @type {null | TstNode} */\n middle = null\n /** @type {null | TstNode} */\n right = null\n /** @type {number} */\n code\n /**\n * @param {string} key\n * @param {any} value\n * @param {number} index\n */\n constructor (key, value, index) {\n if (index === undefined || index >= key.length) {\n throw new TypeError('Unreachable')\n }\n const code = this.code = key.charCodeAt(index)\n // check code is ascii string\n if (code > 0x7F) {\n throw new TypeError('key must be ascii string')\n }\n if (key.length !== ++index) {\n this.middle = new TstNode(key, value, index)\n } else {\n this.value = value\n }\n }\n\n /**\n * @param {string} key\n * @param {any} value\n * @returns {void}\n */\n add (key, value) {\n const length = key.length\n if (length === 0) {\n throw new TypeError('Unreachable')\n }\n let index = 0\n /**\n * @type {TstNode}\n */\n let node = this\n while (true) {\n const code = key.charCodeAt(index)\n // check code is ascii string\n if (code > 0x7F) {\n throw new TypeError('key must be ascii string')\n }\n if (node.code === code) {\n if (length === ++index) {\n node.value = value\n break\n } else if (node.middle !== null) {\n node = node.middle\n } else {\n node.middle = new TstNode(key, value, index)\n break\n }\n } else if (node.code < code) {\n if (node.left !== null) {\n node = node.left\n } else {\n node.left = new TstNode(key, value, index)\n break\n }\n } else if (node.right !== null) {\n node = node.right\n } else {\n node.right = new TstNode(key, value, index)\n break\n }\n }\n }\n\n /**\n * @param {Uint8Array} key\n * @returns {TstNode | null}\n */\n search (key) {\n const keylength = key.length\n let index = 0\n /**\n * @type {TstNode|null}\n */\n let node = this\n while (node !== null && index < keylength) {\n let code = key[index]\n // A-Z\n // First check if it is bigger than 0x5a.\n // Lowercase letters have higher char codes than uppercase ones.\n // Also we assume that headers will mostly contain lowercase characters.\n if (code <= 0x5a && code >= 0x41) {\n // Lowercase for uppercase.\n code |= 32\n }\n while (node !== null) {\n if (code === node.code) {\n if (keylength === ++index) {\n // Returns Node since it is the last key.\n return node\n }\n node = node.middle\n break\n }\n node = node.code < code ? node.left : node.right\n }\n }\n return null\n }\n}\n\nclass TernarySearchTree {\n /** @type {TstNode | null} */\n node = null\n\n /**\n * @param {string} key\n * @param {any} value\n * @returns {void}\n * */\n insert (key, value) {\n if (this.node === null) {\n this.node = new TstNode(key, value, 0)\n } else {\n this.node.add(key, value)\n }\n }\n\n /**\n * @param {Uint8Array} key\n * @returns {any}\n */\n lookup (key) {\n return this.node?.search(key)?.value ?? null\n }\n}\n\nconst tree = new TernarySearchTree()\n\nfor (let i = 0; i < wellknownHeaderNames.length; ++i) {\n const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]]\n tree.insert(key, key)\n}\n\nmodule.exports = {\n TernarySearchTree,\n tree\n}\n","'use strict'\n\nconst assert = require('node:assert')\nconst { kDestroyed, kBodyUsed, kListeners, kBody } = require('./symbols')\nconst { IncomingMessage } = require('node:http')\nconst stream = require('node:stream')\nconst net = require('node:net')\nconst { stringify } = require('node:querystring')\nconst { EventEmitter: EE } = require('node:events')\nconst timers = require('../util/timers')\nconst { InvalidArgumentError, ConnectTimeoutError } = require('./errors')\nconst { headerNameLowerCasedRecord } = require('./constants')\nconst { tree } = require('./tree')\n\nconst [nodeMajor, nodeMinor] = process.versions.node.split('.', 2).map(v => Number(v))\n\nclass BodyAsyncIterable {\n constructor (body) {\n this[kBody] = body\n this[kBodyUsed] = false\n }\n\n async * [Symbol.asyncIterator] () {\n assert(!this[kBodyUsed], 'disturbed')\n this[kBodyUsed] = true\n yield * this[kBody]\n }\n}\n\nfunction noop () {}\n\n/**\n * @param {*} body\n * @returns {*}\n */\nfunction wrapRequestBody (body) {\n if (isStream(body)) {\n // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp\n // so that it can be dispatched again?\n // TODO (fix): Do we need 100-expect support to provide a way to do this properly?\n if (bodyLength(body) === 0) {\n body\n .on('data', function () {\n assert(false)\n })\n }\n\n if (typeof body.readableDidRead !== 'boolean') {\n body[kBodyUsed] = false\n EE.prototype.on.call(body, 'data', function () {\n this[kBodyUsed] = true\n })\n }\n\n return body\n } else if (body && typeof body.pipeTo === 'function') {\n // TODO (fix): We can't access ReadableStream internal state\n // to determine whether or not it has been disturbed. This is just\n // a workaround.\n return new BodyAsyncIterable(body)\n } else if (body && isFormDataLike(body)) {\n return body\n } else if (\n body &&\n typeof body !== 'string' &&\n !ArrayBuffer.isView(body) &&\n isIterable(body)\n ) {\n // TODO: Should we allow re-using iterable if !this.opts.idempotent\n // or through some other flag?\n return new BodyAsyncIterable(body)\n } else {\n return body\n }\n}\n\n/**\n * @param {*} obj\n * @returns {obj is import('node:stream').Stream}\n */\nfunction isStream (obj) {\n return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function'\n}\n\n/**\n * @param {*} object\n * @returns {object is Blob}\n * based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License)\n */\nfunction isBlobLike (object) {\n if (object === null) {\n return false\n } else if (object instanceof Blob) {\n return true\n } else if (typeof object !== 'object') {\n return false\n } else {\n const sTag = object[Symbol.toStringTag]\n\n return (sTag === 'Blob' || sTag === 'File') && (\n ('stream' in object && typeof object.stream === 'function') ||\n ('arrayBuffer' in object && typeof object.arrayBuffer === 'function')\n )\n }\n}\n\n/**\n * @param {string} url The path to check for query strings or fragments.\n * @returns {boolean} Returns true if the path contains a query string or fragment.\n */\nfunction pathHasQueryOrFragment (url) {\n return (\n url.includes('?') ||\n url.includes('#')\n )\n}\n\n/**\n * @param {string} url The URL to add the query params to\n * @param {import('node:querystring').ParsedUrlQueryInput} queryParams The object to serialize into a URL query string\n * @returns {string} The URL with the query params added\n */\nfunction serializePathWithQuery (url, queryParams) {\n if (pathHasQueryOrFragment(url)) {\n throw new Error('Query params cannot be passed when url already contains \"?\" or \"#\".')\n }\n\n const stringified = stringify(queryParams)\n\n if (stringified) {\n url += '?' + stringified\n }\n\n return url\n}\n\n/**\n * @param {number|string|undefined} port\n * @returns {boolean}\n */\nfunction isValidPort (port) {\n const value = parseInt(port, 10)\n return (\n value === Number(port) &&\n value >= 0 &&\n value <= 65535\n )\n}\n\n/**\n * Check if the value is a valid http or https prefixed string.\n *\n * @param {string} value\n * @returns {boolean}\n */\nfunction isHttpOrHttpsPrefixed (value) {\n return (\n value != null &&\n value[0] === 'h' &&\n value[1] === 't' &&\n value[2] === 't' &&\n value[3] === 'p' &&\n (\n value[4] === ':' ||\n (\n value[4] === 's' &&\n value[5] === ':'\n )\n )\n )\n}\n\n/**\n * @param {string|URL|Record} url\n * @returns {URL}\n */\nfunction parseURL (url) {\n if (typeof url === 'string') {\n /**\n * @type {URL}\n */\n url = new URL(url)\n\n if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) {\n throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')\n }\n\n return url\n }\n\n if (!url || typeof url !== 'object') {\n throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.')\n }\n\n if (!(url instanceof URL)) {\n if (url.port != null && url.port !== '' && isValidPort(url.port) === false) {\n throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.')\n }\n\n if (url.path != null && typeof url.path !== 'string') {\n throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.')\n }\n\n if (url.pathname != null && typeof url.pathname !== 'string') {\n throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.')\n }\n\n if (url.hostname != null && typeof url.hostname !== 'string') {\n throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.')\n }\n\n if (url.origin != null && typeof url.origin !== 'string') {\n throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.')\n }\n\n if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) {\n throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')\n }\n\n const port = url.port != null\n ? url.port\n : (url.protocol === 'https:' ? 443 : 80)\n let origin = url.origin != null\n ? url.origin\n : `${url.protocol || ''}//${url.hostname || ''}:${port}`\n let path = url.path != null\n ? url.path\n : `${url.pathname || ''}${url.search || ''}`\n\n if (origin[origin.length - 1] === '/') {\n origin = origin.slice(0, origin.length - 1)\n }\n\n if (path && path[0] !== '/') {\n path = `/${path}`\n }\n // new URL(path, origin) is unsafe when `path` contains an absolute URL\n // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL:\n // If first parameter is a relative URL, second param is required, and will be used as the base URL.\n // If first parameter is an absolute URL, a given second param will be ignored.\n return new URL(`${origin}${path}`)\n }\n\n if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) {\n throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')\n }\n\n return url\n}\n\n/**\n * @param {string|URL|Record} url\n * @returns {URL}\n */\nfunction parseOrigin (url) {\n url = parseURL(url)\n\n if (url.pathname !== '/' || url.search || url.hash) {\n throw new InvalidArgumentError('invalid url')\n }\n\n return url\n}\n\n/**\n * @param {string} host\n * @returns {string}\n */\nfunction getHostname (host) {\n if (host[0] === '[') {\n const idx = host.indexOf(']')\n\n assert(idx !== -1)\n return host.substring(1, idx)\n }\n\n const idx = host.indexOf(':')\n if (idx === -1) return host\n\n return host.substring(0, idx)\n}\n\n/**\n * IP addresses are not valid server names per RFC6066\n * Currently, the only server names supported are DNS hostnames\n * @param {string|null} host\n * @returns {string|null}\n */\nfunction getServerName (host) {\n if (!host) {\n return null\n }\n\n assert(typeof host === 'string')\n\n const servername = getHostname(host)\n if (net.isIP(servername)) {\n return ''\n }\n\n return servername\n}\n\n/**\n * @function\n * @template T\n * @param {T} obj\n * @returns {T}\n */\nfunction deepClone (obj) {\n return JSON.parse(JSON.stringify(obj))\n}\n\n/**\n * @param {*} obj\n * @returns {obj is AsyncIterable}\n */\nfunction isAsyncIterable (obj) {\n return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function')\n}\n\n/**\n * @param {*} obj\n * @returns {obj is Iterable}\n */\nfunction isIterable (obj) {\n return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function'))\n}\n\n/**\n * Checks whether an object has a safe Symbol.iterator — i.e. one that is\n * either own or inherited from a non-Object.prototype chain. This prevents\n * prototype-pollution attacks from injecting a fake iterator on\n * Object.prototype.\n * @param {object} obj\n * @returns {boolean}\n */\nfunction hasSafeIterator (obj) {\n const prototype = Object.getPrototypeOf(obj)\n const ownIterator = Object.prototype.hasOwnProperty.call(obj, Symbol.iterator)\n return ownIterator || (prototype != null && prototype !== Object.prototype && typeof obj[Symbol.iterator] === 'function')\n}\n\n/**\n * @param {Blob|Buffer|import ('stream').Stream} body\n * @returns {number|null}\n */\nfunction bodyLength (body) {\n if (body == null) {\n return 0\n } else if (isStream(body)) {\n const state = body._readableState\n return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length)\n ? state.length\n : null\n } else if (isBlobLike(body)) {\n return body.size != null ? body.size : null\n } else if (isBuffer(body)) {\n return body.byteLength\n }\n\n return null\n}\n\n/**\n * @param {import ('stream').Stream} body\n * @returns {boolean}\n */\nfunction isDestroyed (body) {\n return body && !!(body.destroyed || body[kDestroyed] || (stream.isDestroyed?.(body)))\n}\n\n/**\n * @param {import ('stream').Stream} stream\n * @param {Error} [err]\n * @returns {void}\n */\nfunction destroy (stream, err) {\n if (stream == null || !isStream(stream) || isDestroyed(stream)) {\n return\n }\n\n if (typeof stream.destroy === 'function') {\n if (Object.getPrototypeOf(stream).constructor === IncomingMessage) {\n // See: https://github.com/nodejs/node/pull/38505/files\n stream.socket = null\n }\n\n stream.destroy(err)\n } else if (err) {\n queueMicrotask(() => {\n stream.emit('error', err)\n })\n }\n\n if (stream.destroyed !== true) {\n stream[kDestroyed] = true\n }\n}\n\nconst KEEPALIVE_TIMEOUT_EXPR = /timeout=(\\d+)/\n/**\n * @param {string} val\n * @returns {number | null}\n */\nfunction parseKeepAliveTimeout (val) {\n const m = val.match(KEEPALIVE_TIMEOUT_EXPR)\n return m ? parseInt(m[1], 10) * 1000 : null\n}\n\n/**\n * Retrieves a header name and returns its lowercase value.\n * @param {string | Buffer} value Header name\n * @returns {string}\n */\nfunction headerNameToString (value) {\n return typeof value === 'string'\n ? headerNameLowerCasedRecord[value] ?? value.toLowerCase()\n : tree.lookup(value) ?? value.toString('latin1').toLowerCase()\n}\n\n/**\n * Receive the buffer as a string and return its lowercase value.\n * @param {Buffer} value Header name\n * @returns {string}\n */\nfunction bufferToLowerCasedHeaderName (value) {\n return tree.lookup(value) ?? value.toString('latin1').toLowerCase()\n}\n\n/**\n * @param {(Buffer | string)[]} headers\n * @param {Record} [obj]\n * @returns {Record}\n */\nfunction parseHeaders (headers, obj) {\n if (obj === undefined) obj = {}\n\n for (let i = 0; i < headers.length; i += 2) {\n const key = headerNameToString(headers[i])\n let val = obj[key]\n\n if (val !== undefined) {\n if (!Object.hasOwn(obj, key)) {\n const headersValue = typeof headers[i + 1] === 'string'\n ? headers[i + 1]\n : Array.isArray(headers[i + 1])\n ? headers[i + 1].map(x => x.toString('latin1'))\n : headers[i + 1].toString('latin1')\n\n if (key === '__proto__') {\n Object.defineProperty(obj, key, {\n value: headersValue,\n enumerable: true,\n configurable: true,\n writable: true\n })\n } else {\n obj[key] = headersValue\n }\n } else {\n if (typeof val === 'string') {\n val = [val]\n obj[key] = val\n }\n val.push(headers[i + 1].toString('latin1'))\n }\n } else {\n const headersValue = typeof headers[i + 1] === 'string'\n ? headers[i + 1]\n : Array.isArray(headers[i + 1])\n ? headers[i + 1].map(x => x.toString('latin1'))\n : headers[i + 1].toString('latin1')\n\n obj[key] = headersValue\n }\n }\n\n return obj\n}\n\n/**\n * @param {Buffer[]} headers\n * @returns {string[]}\n */\nfunction parseRawHeaders (headers) {\n const headersLength = headers.length\n /**\n * @type {string[]}\n */\n const ret = new Array(headersLength)\n\n let key\n let val\n\n for (let n = 0; n < headersLength; n += 2) {\n key = headers[n]\n val = headers[n + 1]\n\n typeof key !== 'string' && (key = key.toString())\n typeof val !== 'string' && (val = val.toString('latin1'))\n\n ret[n] = key\n ret[n + 1] = val\n }\n\n return ret\n}\n\n/**\n * @param {string[]} headers\n * @param {Buffer[]} headers\n */\nfunction encodeRawHeaders (headers) {\n if (!Array.isArray(headers)) {\n throw new TypeError('expected headers to be an array')\n }\n return headers.map(x => Buffer.from(x))\n}\n\n/**\n * @param {*} buffer\n * @returns {buffer is Buffer}\n */\nfunction isBuffer (buffer) {\n // See, https://github.com/mcollina/undici/pull/319\n return buffer instanceof Uint8Array || Buffer.isBuffer(buffer)\n}\n\n/**\n * Asserts that the handler object is a request handler.\n *\n * @param {object} handler\n * @param {string} method\n * @param {string} [upgrade]\n * @returns {asserts handler is import('../api/api-request').RequestHandler}\n */\nfunction assertRequestHandler (handler, method, upgrade) {\n if (!handler || typeof handler !== 'object') {\n throw new InvalidArgumentError('handler must be an object')\n }\n\n if (typeof handler.onRequestStart === 'function') {\n // TODO (fix): More checks...\n return\n }\n\n if (typeof handler.onConnect !== 'function') {\n throw new InvalidArgumentError('invalid onConnect method')\n }\n\n if (typeof handler.onError !== 'function') {\n throw new InvalidArgumentError('invalid onError method')\n }\n\n if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) {\n throw new InvalidArgumentError('invalid onBodySent method')\n }\n\n if (upgrade || method === 'CONNECT') {\n if (typeof handler.onUpgrade !== 'function') {\n throw new InvalidArgumentError('invalid onUpgrade method')\n }\n } else {\n if (typeof handler.onHeaders !== 'function') {\n throw new InvalidArgumentError('invalid onHeaders method')\n }\n\n if (typeof handler.onData !== 'function') {\n throw new InvalidArgumentError('invalid onData method')\n }\n\n if (typeof handler.onComplete !== 'function') {\n throw new InvalidArgumentError('invalid onComplete method')\n }\n }\n}\n\n/**\n * A body is disturbed if it has been read from and it cannot be re-used without\n * losing state or data.\n * @param {import('node:stream').Readable} body\n * @returns {boolean}\n */\nfunction isDisturbed (body) {\n // TODO (fix): Why is body[kBodyUsed] needed?\n return !!(body && (stream.isDisturbed(body) || body[kBodyUsed]))\n}\n\n/**\n * @typedef {object} SocketInfo\n * @property {string} [localAddress]\n * @property {number} [localPort]\n * @property {string} [remoteAddress]\n * @property {number} [remotePort]\n * @property {string} [remoteFamily]\n * @property {number} [timeout]\n * @property {number} bytesWritten\n * @property {number} bytesRead\n */\n\n/**\n * @param {import('net').Socket} socket\n * @returns {SocketInfo}\n */\nfunction getSocketInfo (socket) {\n return {\n localAddress: socket.localAddress,\n localPort: socket.localPort,\n remoteAddress: socket.remoteAddress,\n remotePort: socket.remotePort,\n remoteFamily: socket.remoteFamily,\n timeout: socket.timeout,\n bytesWritten: socket.bytesWritten,\n bytesRead: socket.bytesRead\n }\n}\n\n/**\n * @param {Iterable} iterable\n * @returns {ReadableStream}\n */\nfunction ReadableStreamFrom (iterable) {\n // We cannot use ReadableStream.from here because it does not return a byte stream.\n\n let iterator\n return new ReadableStream(\n {\n start () {\n iterator = iterable[Symbol.asyncIterator]()\n },\n pull (controller) {\n return iterator.next().then(({ done, value }) => {\n if (done) {\n return queueMicrotask(() => {\n controller.close()\n controller.byobRequest?.respond(0)\n })\n } else {\n const buf = Buffer.isBuffer(value) ? value : Buffer.from(value)\n if (buf.byteLength) {\n return controller.enqueue(new Uint8Array(buf))\n } else {\n return this.pull(controller)\n }\n }\n })\n },\n cancel () {\n return iterator.return()\n },\n type: 'bytes'\n }\n )\n}\n\n/**\n * The object should be a FormData instance and contains all the required\n * methods.\n * @param {*} object\n * @returns {object is FormData}\n */\nfunction isFormDataLike (object) {\n return (\n object &&\n typeof object === 'object' &&\n typeof object.append === 'function' &&\n typeof object.delete === 'function' &&\n typeof object.get === 'function' &&\n typeof object.getAll === 'function' &&\n typeof object.has === 'function' &&\n typeof object.set === 'function' &&\n object[Symbol.toStringTag] === 'FormData'\n )\n}\n\nfunction addAbortListener (signal, listener) {\n if ('addEventListener' in signal) {\n signal.addEventListener('abort', listener, { once: true })\n return () => signal.removeEventListener('abort', listener)\n }\n signal.once('abort', listener)\n return () => signal.removeListener('abort', listener)\n}\n\nconst validTokenChars = new Uint8Array([\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0-15\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16-31\n 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, // 32-47 (!\"#$%&'()*+,-./)\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 48-63 (0-9:;<=>?)\n 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 64-79 (@A-O)\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, // 80-95 (P-Z[\\]^_)\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 96-111 (`a-o)\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, // 112-127 (p-z{|}~)\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 128-143\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 144-159\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 160-175\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 176-191\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 192-207\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 208-223\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 224-239\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // 240-255\n])\n\n/**\n * @see https://tools.ietf.org/html/rfc7230#section-3.2.6\n * @param {number} c\n * @returns {boolean}\n */\nfunction isTokenCharCode (c) {\n return (validTokenChars[c] === 1)\n}\n\nconst tokenRegExp = /^[\\^_`a-zA-Z\\-0-9!#$%&'*+.|~]+$/\n\n/**\n * @param {string} characters\n * @returns {boolean}\n */\nfunction isValidHTTPToken (characters) {\n if (characters.length >= 12) return tokenRegExp.test(characters)\n if (characters.length === 0) return false\n\n for (let i = 0; i < characters.length; i++) {\n if (validTokenChars[characters.charCodeAt(i)] !== 1) {\n return false\n }\n }\n return true\n}\n\n// headerCharRegex have been lifted from\n// https://github.com/nodejs/node/blob/main/lib/_http_common.js\n\n/**\n * Matches if val contains an invalid field-vchar\n * field-value = *( field-content / obs-fold )\n * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n * field-vchar = VCHAR / obs-text\n */\nconst headerCharRegex = /[^\\t\\x20-\\x7e\\x80-\\xff]/\n\n/**\n * @param {string} characters\n * @returns {boolean}\n */\nfunction isValidHeaderValue (characters) {\n return !headerCharRegex.test(characters)\n}\n\nconst rangeHeaderRegex = /^bytes (\\d+)-(\\d+)\\/(\\d+)?$/\n\n/**\n * @typedef {object} RangeHeader\n * @property {number} start\n * @property {number | null} end\n * @property {number | null} size\n */\n\n/**\n * Parse accordingly to RFC 9110\n * @see https://www.rfc-editor.org/rfc/rfc9110#field.content-range\n * @param {string} [range]\n * @returns {RangeHeader|null}\n */\nfunction parseRangeHeader (range) {\n if (range == null || range === '') return { start: 0, end: null, size: null }\n\n const m = range ? range.match(rangeHeaderRegex) : null\n return m\n ? {\n start: parseInt(m[1]),\n end: m[2] ? parseInt(m[2]) : null,\n size: m[3] ? parseInt(m[3]) : null\n }\n : null\n}\n\n/**\n * @template {import(\"events\").EventEmitter} T\n * @param {T} obj\n * @param {string} name\n * @param {(...args: any[]) => void} listener\n * @returns {T}\n */\nfunction addListener (obj, name, listener) {\n const listeners = (obj[kListeners] ??= [])\n listeners.push([name, listener])\n obj.on(name, listener)\n return obj\n}\n\n/**\n * @template {import(\"events\").EventEmitter} T\n * @param {T} obj\n * @returns {T}\n */\nfunction removeAllListeners (obj) {\n if (obj[kListeners] != null) {\n for (const [name, listener] of obj[kListeners]) {\n obj.removeListener(name, listener)\n }\n obj[kListeners] = null\n }\n return obj\n}\n\n/**\n * @param {import ('../dispatcher/client')} client\n * @param {import ('../core/request')} request\n * @param {Error} err\n */\nfunction errorRequest (client, request, err) {\n try {\n request.onError(err)\n assert(request.aborted)\n } catch (err) {\n client.emit('error', err)\n }\n}\n\n/**\n * @param {WeakRef} socketWeakRef\n * @param {object} opts\n * @param {number} opts.timeout\n * @param {string} opts.hostname\n * @param {number} opts.port\n * @returns {() => void}\n */\nconst setupConnectTimeout = process.platform === 'win32'\n ? (socketWeakRef, opts) => {\n if (!opts.timeout) {\n return noop\n }\n\n let s1 = null\n let s2 = null\n const fastTimer = timers.setFastTimeout(() => {\n // setImmediate is added to make sure that we prioritize socket error events over timeouts\n s1 = setImmediate(() => {\n // Windows needs an extra setImmediate probably due to implementation differences in the socket logic\n s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts))\n })\n }, opts.timeout)\n return () => {\n timers.clearFastTimeout(fastTimer)\n clearImmediate(s1)\n clearImmediate(s2)\n }\n }\n : (socketWeakRef, opts) => {\n if (!opts.timeout) {\n return noop\n }\n\n let s1 = null\n const fastTimer = timers.setFastTimeout(() => {\n // setImmediate is added to make sure that we prioritize socket error events over timeouts\n s1 = setImmediate(() => {\n onConnectTimeout(socketWeakRef.deref(), opts)\n })\n }, opts.timeout)\n return () => {\n timers.clearFastTimeout(fastTimer)\n clearImmediate(s1)\n }\n }\n\n/**\n * @param {net.Socket} socket\n * @param {object} opts\n * @param {number} opts.timeout\n * @param {string} opts.hostname\n * @param {number} opts.port\n */\nfunction onConnectTimeout (socket, opts) {\n // The socket could be already garbage collected\n if (socket == null) {\n return\n }\n\n let message = 'Connect Timeout Error'\n if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) {\n message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(', ')},`\n } else {\n message += ` (attempted address: ${opts.hostname}:${opts.port},`\n }\n\n message += ` timeout: ${opts.timeout}ms)`\n\n destroy(socket, new ConnectTimeoutError(message))\n}\n\n/**\n * @param {string} urlString\n * @returns {string}\n */\nfunction getProtocolFromUrlString (urlString) {\n if (\n urlString[0] === 'h' &&\n urlString[1] === 't' &&\n urlString[2] === 't' &&\n urlString[3] === 'p'\n ) {\n switch (urlString[4]) {\n case ':':\n return 'http:'\n case 's':\n if (urlString[5] === ':') {\n return 'https:'\n }\n }\n }\n // fallback if none of the usual suspects\n return urlString.slice(0, urlString.indexOf(':') + 1)\n}\n\nconst kEnumerableProperty = Object.create(null)\nkEnumerableProperty.enumerable = true\n\nconst normalizedMethodRecordsBase = {\n delete: 'DELETE',\n DELETE: 'DELETE',\n get: 'GET',\n GET: 'GET',\n head: 'HEAD',\n HEAD: 'HEAD',\n options: 'OPTIONS',\n OPTIONS: 'OPTIONS',\n post: 'POST',\n POST: 'POST',\n put: 'PUT',\n PUT: 'PUT'\n}\n\nconst normalizedMethodRecords = {\n ...normalizedMethodRecordsBase,\n patch: 'patch',\n PATCH: 'PATCH'\n}\n\n// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`.\nObject.setPrototypeOf(normalizedMethodRecordsBase, null)\nObject.setPrototypeOf(normalizedMethodRecords, null)\n\nmodule.exports = {\n kEnumerableProperty,\n isDisturbed,\n isBlobLike,\n parseOrigin,\n parseURL,\n getServerName,\n isStream,\n isIterable,\n hasSafeIterator,\n isAsyncIterable,\n isDestroyed,\n headerNameToString,\n bufferToLowerCasedHeaderName,\n addListener,\n removeAllListeners,\n errorRequest,\n parseRawHeaders,\n encodeRawHeaders,\n parseHeaders,\n parseKeepAliveTimeout,\n destroy,\n bodyLength,\n deepClone,\n ReadableStreamFrom,\n isBuffer,\n assertRequestHandler,\n getSocketInfo,\n isFormDataLike,\n pathHasQueryOrFragment,\n serializePathWithQuery,\n addAbortListener,\n isValidHTTPToken,\n isValidHeaderValue,\n isTokenCharCode,\n parseRangeHeader,\n normalizedMethodRecordsBase,\n normalizedMethodRecords,\n isValidPort,\n isHttpOrHttpsPrefixed,\n nodeMajor,\n nodeMinor,\n safeHTTPMethods: Object.freeze(['GET', 'HEAD', 'OPTIONS', 'TRACE']),\n wrapRequestBody,\n setupConnectTimeout,\n getProtocolFromUrlString\n}\n","'use strict'\n\nconst { InvalidArgumentError, MaxOriginsReachedError } = require('../core/errors')\nconst { kClients, kRunning, kClose, kDestroy, kDispatch, kUrl } = require('../core/symbols')\nconst DispatcherBase = require('./dispatcher-base')\nconst Pool = require('./pool')\nconst Client = require('./client')\nconst util = require('../core/util')\n\nconst kOnConnect = Symbol('onConnect')\nconst kOnDisconnect = Symbol('onDisconnect')\nconst kOnConnectionError = Symbol('onConnectionError')\nconst kOnDrain = Symbol('onDrain')\nconst kFactory = Symbol('factory')\nconst kOptions = Symbol('options')\nconst kOrigins = Symbol('origins')\n\nfunction defaultFactory (origin, opts) {\n return opts && opts.connections === 1\n ? new Client(origin, opts)\n : new Pool(origin, opts)\n}\n\nclass Agent extends DispatcherBase {\n constructor ({ factory = defaultFactory, maxOrigins = Infinity, connect, ...options } = {}) {\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (typeof maxOrigins !== 'number' || Number.isNaN(maxOrigins) || maxOrigins <= 0) {\n throw new InvalidArgumentError('maxOrigins must be a number greater than 0')\n }\n\n super()\n\n if (connect && typeof connect !== 'function') {\n connect = { ...connect }\n }\n\n this[kOptions] = { ...util.deepClone(options), maxOrigins, connect }\n this[kFactory] = factory\n this[kClients] = new Map()\n this[kOrigins] = new Set()\n\n this[kOnDrain] = (origin, targets) => {\n this.emit('drain', origin, [this, ...targets])\n }\n\n this[kOnConnect] = (origin, targets) => {\n this.emit('connect', origin, [this, ...targets])\n }\n\n this[kOnDisconnect] = (origin, targets, err) => {\n this.emit('disconnect', origin, [this, ...targets], err)\n }\n\n this[kOnConnectionError] = (origin, targets, err) => {\n this.emit('connectionError', origin, [this, ...targets], err)\n }\n }\n\n get [kRunning] () {\n let ret = 0\n for (const { dispatcher } of this[kClients].values()) {\n ret += dispatcher[kRunning]\n }\n return ret\n }\n\n [kDispatch] (opts, handler) {\n let key\n if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) {\n key = String(opts.origin)\n } else {\n throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.')\n }\n\n if (this[kOrigins].size >= this[kOptions].maxOrigins && !this[kOrigins].has(key)) {\n throw new MaxOriginsReachedError()\n }\n\n const result = this[kClients].get(key)\n let dispatcher = result && result.dispatcher\n if (!dispatcher) {\n const closeClientIfUnused = (connected) => {\n const result = this[kClients].get(key)\n if (result) {\n if (connected) result.count -= 1\n if (result.count <= 0) {\n this[kClients].delete(key)\n if (!result.dispatcher.destroyed) {\n result.dispatcher.close()\n }\n }\n this[kOrigins].delete(key)\n }\n }\n dispatcher = this[kFactory](opts.origin, this[kOptions])\n .on('drain', this[kOnDrain])\n .on('connect', (origin, targets) => {\n const result = this[kClients].get(key)\n if (result) {\n result.count += 1\n }\n this[kOnConnect](origin, targets)\n })\n .on('disconnect', (origin, targets, err) => {\n closeClientIfUnused(true)\n this[kOnDisconnect](origin, targets, err)\n })\n .on('connectionError', (origin, targets, err) => {\n closeClientIfUnused(false)\n this[kOnConnectionError](origin, targets, err)\n })\n\n this[kClients].set(key, { count: 0, dispatcher })\n this[kOrigins].add(key)\n }\n\n return dispatcher.dispatch(opts, handler)\n }\n\n [kClose] () {\n const closePromises = []\n for (const { dispatcher } of this[kClients].values()) {\n closePromises.push(dispatcher.close())\n }\n this[kClients].clear()\n\n return Promise.all(closePromises)\n }\n\n [kDestroy] (err) {\n const destroyPromises = []\n for (const { dispatcher } of this[kClients].values()) {\n destroyPromises.push(dispatcher.destroy(err))\n }\n this[kClients].clear()\n\n return Promise.all(destroyPromises)\n }\n\n get stats () {\n const allClientStats = {}\n for (const { dispatcher } of this[kClients].values()) {\n if (dispatcher.stats) {\n allClientStats[dispatcher[kUrl].origin] = dispatcher.stats\n }\n }\n return allClientStats\n }\n}\n\nmodule.exports = Agent\n","'use strict'\n\nconst {\n BalancedPoolMissingUpstreamError,\n InvalidArgumentError\n} = require('../core/errors')\nconst {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kRemoveClient,\n kGetDispatcher\n} = require('./pool-base')\nconst Pool = require('./pool')\nconst { kUrl } = require('../core/symbols')\nconst util = require('../core/util')\nconst kFactory = Symbol('factory')\n\nconst kOptions = Symbol('options')\nconst kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor')\nconst kCurrentWeight = Symbol('kCurrentWeight')\nconst kIndex = Symbol('kIndex')\nconst kWeight = Symbol('kWeight')\nconst kMaxWeightPerServer = Symbol('kMaxWeightPerServer')\nconst kErrorPenalty = Symbol('kErrorPenalty')\n\n/**\n * Calculate the greatest common divisor of two numbers by\n * using the Euclidean algorithm.\n *\n * @param {number} a\n * @param {number} b\n * @returns {number}\n */\nfunction getGreatestCommonDivisor (a, b) {\n if (a === 0) return b\n\n while (b !== 0) {\n const t = b\n b = a % b\n a = t\n }\n return a\n}\n\nfunction defaultFactory (origin, opts) {\n return new Pool(origin, opts)\n}\n\nclass BalancedPool extends PoolBase {\n constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) {\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n super()\n\n this[kOptions] = { ...util.deepClone(opts) }\n this[kOptions].interceptors = opts.interceptors\n ? { ...opts.interceptors }\n : undefined\n this[kIndex] = -1\n this[kCurrentWeight] = 0\n\n this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100\n this[kErrorPenalty] = this[kOptions].errorPenalty || 15\n\n if (!Array.isArray(upstreams)) {\n upstreams = [upstreams]\n }\n\n this[kFactory] = factory\n\n for (const upstream of upstreams) {\n this.addUpstream(upstream)\n }\n this._updateBalancedPoolStats()\n }\n\n addUpstream (upstream) {\n const upstreamOrigin = util.parseOrigin(upstream).origin\n\n if (this[kClients].find((pool) => (\n pool[kUrl].origin === upstreamOrigin &&\n pool.closed !== true &&\n pool.destroyed !== true\n ))) {\n return this\n }\n const pool = this[kFactory](upstreamOrigin, this[kOptions])\n\n this[kAddClient](pool)\n pool.on('connect', () => {\n pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty])\n })\n\n pool.on('connectionError', () => {\n pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty])\n this._updateBalancedPoolStats()\n })\n\n pool.on('disconnect', (...args) => {\n const err = args[2]\n if (err && err.code === 'UND_ERR_SOCKET') {\n // decrease the weight of the pool.\n pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty])\n this._updateBalancedPoolStats()\n }\n })\n\n for (const client of this[kClients]) {\n client[kWeight] = this[kMaxWeightPerServer]\n }\n\n this._updateBalancedPoolStats()\n\n return this\n }\n\n _updateBalancedPoolStats () {\n let result = 0\n for (let i = 0; i < this[kClients].length; i++) {\n result = getGreatestCommonDivisor(this[kClients][i][kWeight], result)\n }\n\n this[kGreatestCommonDivisor] = result\n }\n\n removeUpstream (upstream) {\n const upstreamOrigin = util.parseOrigin(upstream).origin\n\n const pool = this[kClients].find((pool) => (\n pool[kUrl].origin === upstreamOrigin &&\n pool.closed !== true &&\n pool.destroyed !== true\n ))\n\n if (pool) {\n this[kRemoveClient](pool)\n }\n\n return this\n }\n\n getUpstream (upstream) {\n const upstreamOrigin = util.parseOrigin(upstream).origin\n\n return this[kClients].find((pool) => (\n pool[kUrl].origin === upstreamOrigin &&\n pool.closed !== true &&\n pool.destroyed !== true\n ))\n }\n\n get upstreams () {\n return this[kClients]\n .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true)\n .map((p) => p[kUrl].origin)\n }\n\n [kGetDispatcher] () {\n // We validate that pools is greater than 0,\n // otherwise we would have to wait until an upstream\n // is added, which might never happen.\n if (this[kClients].length === 0) {\n throw new BalancedPoolMissingUpstreamError()\n }\n\n const dispatcher = this[kClients].find(dispatcher => (\n !dispatcher[kNeedDrain] &&\n dispatcher.closed !== true &&\n dispatcher.destroyed !== true\n ))\n\n if (!dispatcher) {\n return\n }\n\n const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true)\n\n if (allClientsBusy) {\n return\n }\n\n let counter = 0\n\n let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain])\n\n while (counter++ < this[kClients].length) {\n this[kIndex] = (this[kIndex] + 1) % this[kClients].length\n const pool = this[kClients][this[kIndex]]\n\n // find pool index with the largest weight\n if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) {\n maxWeightIndex = this[kIndex]\n }\n\n // decrease the current weight every `this[kClients].length`.\n if (this[kIndex] === 0) {\n // Set the current weight to the next lower weight.\n this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]\n\n if (this[kCurrentWeight] <= 0) {\n this[kCurrentWeight] = this[kMaxWeightPerServer]\n }\n }\n if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) {\n return pool\n }\n }\n\n this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]\n this[kIndex] = maxWeightIndex\n return this[kClients][maxWeightIndex]\n }\n}\n\nmodule.exports = BalancedPool\n","'use strict'\n\n/* global WebAssembly */\n\nconst assert = require('node:assert')\nconst util = require('../core/util.js')\nconst { channels } = require('../core/diagnostics.js')\nconst timers = require('../util/timers.js')\nconst {\n RequestContentLengthMismatchError,\n ResponseContentLengthMismatchError,\n RequestAbortedError,\n HeadersTimeoutError,\n HeadersOverflowError,\n SocketError,\n InformationalError,\n BodyTimeoutError,\n HTTPParserError,\n ResponseExceededMaxSizeError\n} = require('../core/errors.js')\nconst {\n kUrl,\n kReset,\n kClient,\n kParser,\n kBlocking,\n kRunning,\n kPending,\n kSize,\n kWriting,\n kQueue,\n kNoRef,\n kKeepAliveDefaultTimeout,\n kHostHeader,\n kPendingIdx,\n kRunningIdx,\n kError,\n kPipelining,\n kSocket,\n kKeepAliveTimeoutValue,\n kMaxHeadersSize,\n kKeepAliveMaxTimeout,\n kKeepAliveTimeoutThreshold,\n kHeadersTimeout,\n kBodyTimeout,\n kStrictContentLength,\n kMaxRequests,\n kCounter,\n kMaxResponseSize,\n kOnError,\n kResume,\n kHTTPContext,\n kClosed\n} = require('../core/symbols.js')\n\nconst constants = require('../llhttp/constants.js')\nconst EMPTY_BUF = Buffer.alloc(0)\nconst FastBuffer = Buffer[Symbol.species]\nconst removeAllListeners = util.removeAllListeners\n\nlet extractBody\n\nfunction lazyllhttp () {\n const llhttpWasmData = process.env.JEST_WORKER_ID ? require('../llhttp/llhttp-wasm.js') : undefined\n\n let mod\n\n // We disable wasm SIMD on ppc64 as it seems to be broken on Power 9 architectures.\n let useWasmSIMD = process.arch !== 'ppc64'\n // The Env Variable UNDICI_NO_WASM_SIMD allows explicitly overriding the default behavior\n if (process.env.UNDICI_NO_WASM_SIMD === '1') {\n useWasmSIMD = true\n } else if (process.env.UNDICI_NO_WASM_SIMD === '0') {\n useWasmSIMD = false\n }\n\n if (useWasmSIMD) {\n try {\n mod = new WebAssembly.Module(require('../llhttp/llhttp_simd-wasm.js'))\n } catch {\n }\n }\n\n if (!mod) {\n // We could check if the error was caused by the simd option not\n // being enabled, but the occurring of this other error\n // * https://github.com/emscripten-core/emscripten/issues/11495\n // got me to remove that check to avoid breaking Node 12.\n mod = new WebAssembly.Module(llhttpWasmData || require('../llhttp/llhttp-wasm.js'))\n }\n\n return new WebAssembly.Instance(mod, {\n env: {\n /**\n * @param {number} p\n * @param {number} at\n * @param {number} len\n * @returns {number}\n */\n wasm_on_url: (p, at, len) => {\n return 0\n },\n /**\n * @param {number} p\n * @param {number} at\n * @param {number} len\n * @returns {number}\n */\n wasm_on_status: (p, at, len) => {\n assert(currentParser.ptr === p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len))\n },\n /**\n * @param {number} p\n * @returns {number}\n */\n wasm_on_message_begin: (p) => {\n assert(currentParser.ptr === p)\n return currentParser.onMessageBegin()\n },\n /**\n * @param {number} p\n * @param {number} at\n * @param {number} len\n * @returns {number}\n */\n wasm_on_header_field: (p, at, len) => {\n assert(currentParser.ptr === p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len))\n },\n /**\n * @param {number} p\n * @param {number} at\n * @param {number} len\n * @returns {number}\n */\n wasm_on_header_value: (p, at, len) => {\n assert(currentParser.ptr === p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len))\n },\n /**\n * @param {number} p\n * @param {number} statusCode\n * @param {0|1} upgrade\n * @param {0|1} shouldKeepAlive\n * @returns {number}\n */\n wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => {\n assert(currentParser.ptr === p)\n return currentParser.onHeadersComplete(statusCode, upgrade === 1, shouldKeepAlive === 1)\n },\n /**\n * @param {number} p\n * @param {number} at\n * @param {number} len\n * @returns {number}\n */\n wasm_on_body: (p, at, len) => {\n assert(currentParser.ptr === p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len))\n },\n /**\n * @param {number} p\n * @returns {number}\n */\n wasm_on_message_complete: (p) => {\n assert(currentParser.ptr === p)\n return currentParser.onMessageComplete()\n }\n\n }\n })\n}\n\nlet llhttpInstance = null\n\n/**\n * @type {Parser|null}\n */\nlet currentParser = null\nlet currentBufferRef = null\n/**\n * @type {number}\n */\nlet currentBufferSize = 0\nlet currentBufferPtr = null\n\nconst USE_NATIVE_TIMER = 0\nconst USE_FAST_TIMER = 1\n\n// Use fast timers for headers and body to take eventual event loop\n// latency into account.\nconst TIMEOUT_HEADERS = 2 | USE_FAST_TIMER\nconst TIMEOUT_BODY = 4 | USE_FAST_TIMER\n\n// Use native timers to ignore event loop latency for keep-alive\n// handling.\nconst TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER\n\nclass Parser {\n /**\n * @param {import('./client.js')} client\n * @param {import('net').Socket} socket\n * @param {*} llhttp\n */\n constructor (client, socket, { exports }) {\n this.llhttp = exports\n this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE)\n this.client = client\n /**\n * @type {import('net').Socket}\n */\n this.socket = socket\n this.timeout = null\n this.timeoutValue = null\n this.timeoutType = null\n this.statusCode = 0\n this.statusText = ''\n this.upgrade = false\n this.headers = []\n this.headersSize = 0\n this.headersMaxSize = client[kMaxHeadersSize]\n this.shouldKeepAlive = false\n this.paused = false\n this.resume = this.resume.bind(this)\n\n this.bytesRead = 0\n\n this.keepAlive = ''\n this.contentLength = ''\n this.connection = ''\n this.maxResponseSize = client[kMaxResponseSize]\n }\n\n setTimeout (delay, type) {\n // If the existing timer and the new timer are of different timer type\n // (fast or native) or have different delay, we need to clear the existing\n // timer and set a new one.\n if (\n delay !== this.timeoutValue ||\n (type & USE_FAST_TIMER) ^ (this.timeoutType & USE_FAST_TIMER)\n ) {\n // If a timeout is already set, clear it with clearTimeout of the fast\n // timer implementation, as it can clear fast and native timers.\n if (this.timeout) {\n timers.clearTimeout(this.timeout)\n this.timeout = null\n }\n\n if (delay) {\n if (type & USE_FAST_TIMER) {\n this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this))\n } else {\n this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this))\n this.timeout?.unref()\n }\n }\n\n this.timeoutValue = delay\n } else if (this.timeout) {\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n this.timeoutType = type\n }\n\n resume () {\n if (this.socket.destroyed || !this.paused) {\n return\n }\n\n assert(this.ptr != null)\n assert(currentParser === null)\n\n this.llhttp.llhttp_resume(this.ptr)\n\n assert(this.timeoutType === TIMEOUT_BODY)\n if (this.timeout) {\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n this.paused = false\n this.execute(this.socket.read() || EMPTY_BUF) // Flush parser.\n this.readMore()\n }\n\n readMore () {\n while (!this.paused && this.ptr) {\n const chunk = this.socket.read()\n if (chunk === null) {\n break\n }\n this.execute(chunk)\n }\n }\n\n /**\n * @param {Buffer} chunk\n */\n execute (chunk) {\n assert(currentParser === null)\n assert(this.ptr != null)\n assert(!this.paused)\n\n const { socket, llhttp } = this\n\n // Allocate a new buffer if the current buffer is too small.\n if (chunk.length > currentBufferSize) {\n if (currentBufferPtr) {\n llhttp.free(currentBufferPtr)\n }\n // Allocate a buffer that is a multiple of 4096 bytes.\n currentBufferSize = Math.ceil(chunk.length / 4096) * 4096\n currentBufferPtr = llhttp.malloc(currentBufferSize)\n }\n\n new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(chunk)\n\n // Call `execute` on the wasm parser.\n // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data,\n // and finally the length of bytes to parse.\n // The return value is an error code or `constants.ERROR.OK`.\n try {\n let ret\n\n try {\n currentBufferRef = chunk\n currentParser = this\n ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, chunk.length)\n } finally {\n currentParser = null\n currentBufferRef = null\n }\n\n if (ret !== constants.ERROR.OK) {\n const data = chunk.subarray(llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr)\n\n if (ret === constants.ERROR.PAUSED_UPGRADE) {\n this.onUpgrade(data)\n } else if (ret === constants.ERROR.PAUSED) {\n this.paused = true\n socket.unshift(data)\n } else {\n const ptr = llhttp.llhttp_get_error_reason(this.ptr)\n let message = ''\n if (ptr) {\n const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0)\n message =\n 'Response does not match the HTTP/1.1 protocol (' +\n Buffer.from(llhttp.memory.buffer, ptr, len).toString() +\n ')'\n }\n throw new HTTPParserError(message, constants.ERROR[ret], data)\n }\n }\n } catch (err) {\n util.destroy(socket, err)\n }\n }\n\n destroy () {\n assert(currentParser === null)\n assert(this.ptr != null)\n\n this.llhttp.llhttp_free(this.ptr)\n this.ptr = null\n\n this.timeout && timers.clearTimeout(this.timeout)\n this.timeout = null\n this.timeoutValue = null\n this.timeoutType = null\n\n this.paused = false\n }\n\n /**\n * @param {Buffer} buf\n * @returns {0}\n */\n onStatus (buf) {\n this.statusText = buf.toString()\n return 0\n }\n\n /**\n * @returns {0|-1}\n */\n onMessageBegin () {\n const { socket, client } = this\n\n if (socket.destroyed) {\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n if (!request) {\n return -1\n }\n request.onResponseStarted()\n\n return 0\n }\n\n /**\n * @param {Buffer} buf\n * @returns {number}\n */\n onHeaderField (buf) {\n const len = this.headers.length\n\n if ((len & 1) === 0) {\n this.headers.push(buf)\n } else {\n this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf])\n }\n\n this.trackHeader(buf.length)\n\n return 0\n }\n\n /**\n * @param {Buffer} buf\n * @returns {number}\n */\n onHeaderValue (buf) {\n let len = this.headers.length\n\n if ((len & 1) === 1) {\n this.headers.push(buf)\n len += 1\n } else {\n this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf])\n }\n\n const key = this.headers[len - 2]\n if (key.length === 10) {\n const headerName = util.bufferToLowerCasedHeaderName(key)\n if (headerName === 'keep-alive') {\n this.keepAlive += buf.toString()\n } else if (headerName === 'connection') {\n this.connection += buf.toString()\n }\n } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === 'content-length') {\n this.contentLength += buf.toString()\n }\n\n this.trackHeader(buf.length)\n\n return 0\n }\n\n /**\n * @param {number} len\n */\n trackHeader (len) {\n this.headersSize += len\n if (this.headersSize >= this.headersMaxSize) {\n util.destroy(this.socket, new HeadersOverflowError())\n }\n }\n\n /**\n * @param {Buffer} head\n */\n onUpgrade (head) {\n const { upgrade, client, socket, headers, statusCode } = this\n\n assert(upgrade)\n assert(client[kSocket] === socket)\n assert(!socket.destroyed)\n assert(!this.paused)\n assert((headers.length & 1) === 0)\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n assert(request.upgrade || request.method === 'CONNECT')\n\n this.statusCode = 0\n this.statusText = ''\n this.shouldKeepAlive = false\n\n this.headers = []\n this.headersSize = 0\n\n socket.unshift(head)\n\n socket[kParser].destroy()\n socket[kParser] = null\n\n socket[kClient] = null\n socket[kError] = null\n\n removeAllListeners(socket)\n\n client[kSocket] = null\n client[kHTTPContext] = null // TODO (fix): This is hacky...\n client[kQueue][client[kRunningIdx]++] = null\n client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade'))\n\n try {\n request.onUpgrade(statusCode, headers, socket)\n } catch (err) {\n util.destroy(socket, err)\n }\n\n client[kResume]()\n }\n\n /**\n * @param {number} statusCode\n * @param {boolean} upgrade\n * @param {boolean} shouldKeepAlive\n * @returns {number}\n */\n onHeadersComplete (statusCode, upgrade, shouldKeepAlive) {\n const { client, socket, headers, statusText } = this\n\n if (socket.destroyed) {\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n\n if (!request) {\n return -1\n }\n\n assert(!this.upgrade)\n assert(this.statusCode < 200)\n\n if (statusCode === 100) {\n util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))\n return -1\n }\n\n /* this can only happen if server is misbehaving */\n if (upgrade && !request.upgrade) {\n util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket)))\n return -1\n }\n\n assert(this.timeoutType === TIMEOUT_HEADERS)\n\n this.statusCode = statusCode\n this.shouldKeepAlive = (\n shouldKeepAlive ||\n // Override llhttp value which does not allow keepAlive for HEAD.\n (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive')\n )\n\n if (this.statusCode >= 200) {\n const bodyTimeout = request.bodyTimeout != null\n ? request.bodyTimeout\n : client[kBodyTimeout]\n this.setTimeout(bodyTimeout, TIMEOUT_BODY)\n } else if (this.timeout) {\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n if (request.method === 'CONNECT') {\n assert(client[kRunning] === 1)\n this.upgrade = true\n return 2\n }\n\n if (upgrade) {\n assert(client[kRunning] === 1)\n this.upgrade = true\n return 2\n }\n\n assert((this.headers.length & 1) === 0)\n this.headers = []\n this.headersSize = 0\n\n if (this.shouldKeepAlive && client[kPipelining]) {\n const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null\n\n if (keepAliveTimeout != null) {\n const timeout = Math.min(\n keepAliveTimeout - client[kKeepAliveTimeoutThreshold],\n client[kKeepAliveMaxTimeout]\n )\n if (timeout <= 0) {\n socket[kReset] = true\n } else {\n client[kKeepAliveTimeoutValue] = timeout\n }\n } else {\n client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]\n }\n } else {\n // Stop more requests from being dispatched.\n socket[kReset] = true\n }\n\n const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false\n\n if (request.aborted) {\n return -1\n }\n\n if (request.method === 'HEAD') {\n return 1\n }\n\n if (statusCode < 200) {\n return 1\n }\n\n if (socket[kBlocking]) {\n socket[kBlocking] = false\n client[kResume]()\n }\n\n return pause ? constants.ERROR.PAUSED : 0\n }\n\n /**\n * @param {Buffer} buf\n * @returns {number}\n */\n onBody (buf) {\n const { client, socket, statusCode, maxResponseSize } = this\n\n if (socket.destroyed) {\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n\n assert(this.timeoutType === TIMEOUT_BODY)\n if (this.timeout) {\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n assert(statusCode >= 200)\n\n if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) {\n util.destroy(socket, new ResponseExceededMaxSizeError())\n return -1\n }\n\n this.bytesRead += buf.length\n\n if (request.onData(buf) === false) {\n return constants.ERROR.PAUSED\n }\n\n return 0\n }\n\n /**\n * @returns {number}\n */\n onMessageComplete () {\n const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this\n\n if (socket.destroyed && (!statusCode || shouldKeepAlive)) {\n return -1\n }\n\n if (upgrade) {\n return 0\n }\n\n assert(statusCode >= 100)\n assert((this.headers.length & 1) === 0)\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n\n this.statusCode = 0\n this.statusText = ''\n this.bytesRead = 0\n this.contentLength = ''\n this.keepAlive = ''\n this.connection = ''\n\n this.headers = []\n this.headersSize = 0\n\n if (statusCode < 200) {\n return 0\n }\n\n if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) {\n util.destroy(socket, new ResponseContentLengthMismatchError())\n return -1\n }\n\n request.onComplete(headers)\n\n client[kQueue][client[kRunningIdx]++] = null\n\n if (socket[kWriting]) {\n assert(client[kRunning] === 0)\n // Response completed before request.\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (!shouldKeepAlive) {\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (socket[kReset] && client[kRunning] === 0) {\n // Destroy socket once all requests have completed.\n // The request at the tail of the pipeline is the one\n // that requested reset and no further requests should\n // have been queued since then.\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (client[kPipelining] == null || client[kPipelining] === 1) {\n // We must wait a full event loop cycle to reuse this socket to make sure\n // that non-spec compliant servers are not closing the connection even if they\n // said they won't.\n setImmediate(client[kResume])\n } else {\n client[kResume]()\n }\n\n return 0\n }\n}\n\nfunction onParserTimeout (parserWeakRef) {\n const parser = parserWeakRef.deref()\n if (!parser) {\n return\n }\n\n const { socket, timeoutType, client, paused } = parser\n\n if (timeoutType === TIMEOUT_HEADERS) {\n if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {\n assert(!paused, 'cannot be paused while waiting for headers')\n util.destroy(socket, new HeadersTimeoutError())\n }\n } else if (timeoutType === TIMEOUT_BODY) {\n if (!paused) {\n util.destroy(socket, new BodyTimeoutError())\n }\n } else if (timeoutType === TIMEOUT_KEEP_ALIVE) {\n assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue])\n util.destroy(socket, new InformationalError('socket idle timeout'))\n }\n}\n\n/**\n * @param {import ('./client.js')} client\n * @param {import('net').Socket} socket\n * @returns\n */\nfunction connectH1 (client, socket) {\n client[kSocket] = socket\n\n if (!llhttpInstance) {\n llhttpInstance = lazyllhttp()\n }\n\n if (socket.errored) {\n throw socket.errored\n }\n\n if (socket.destroyed) {\n throw new SocketError('destroyed')\n }\n\n socket[kNoRef] = false\n socket[kWriting] = false\n socket[kReset] = false\n socket[kBlocking] = false\n socket[kParser] = new Parser(client, socket, llhttpInstance)\n\n util.addListener(socket, 'error', onHttpSocketError)\n util.addListener(socket, 'readable', onHttpSocketReadable)\n util.addListener(socket, 'end', onHttpSocketEnd)\n util.addListener(socket, 'close', onHttpSocketClose)\n\n socket[kClosed] = false\n socket.on('close', onSocketClose)\n\n return {\n version: 'h1',\n defaultPipelining: 1,\n write (request) {\n return writeH1(client, request)\n },\n resume () {\n resumeH1(client)\n },\n /**\n * @param {Error|undefined} err\n * @param {() => void} callback\n */\n destroy (err, callback) {\n if (socket[kClosed]) {\n queueMicrotask(callback)\n } else {\n socket.on('close', callback)\n socket.destroy(err)\n }\n },\n /**\n * @returns {boolean}\n */\n get destroyed () {\n return socket.destroyed\n },\n /**\n * @param {import('../core/request.js')} request\n * @returns {boolean}\n */\n busy (request) {\n if (socket[kWriting] || socket[kReset] || socket[kBlocking]) {\n return true\n }\n\n if (request) {\n if (client[kRunning] > 0 && !request.idempotent) {\n // Non-idempotent request cannot be retried.\n // Ensure that no other requests are inflight and\n // could cause failure.\n return true\n }\n\n if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) {\n // Don't dispatch an upgrade until all preceding requests have completed.\n // A misbehaving server might upgrade the connection before all pipelined\n // request has completed.\n return true\n }\n\n if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 &&\n (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) {\n // Request with stream or iterator body can error while other requests\n // are inflight and indirectly error those as well.\n // Ensure this doesn't happen by waiting for inflight\n // to complete before dispatching.\n\n // Request with stream or iterator body cannot be retried.\n // Ensure that no other requests are inflight and\n // could cause failure.\n return true\n }\n }\n\n return false\n }\n }\n}\n\nfunction onHttpSocketError (err) {\n assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')\n\n const parser = this[kParser]\n\n // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded\n // to the user.\n if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) {\n // We treat all incoming data so for as a valid response.\n parser.onMessageComplete()\n return\n }\n\n this[kError] = err\n\n this[kClient][kOnError](err)\n}\n\nfunction onHttpSocketReadable () {\n this[kParser]?.readMore()\n}\n\nfunction onHttpSocketEnd () {\n const parser = this[kParser]\n\n if (parser.statusCode && !parser.shouldKeepAlive) {\n // We treat all incoming data so far as a valid response.\n parser.onMessageComplete()\n return\n }\n\n util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this)))\n}\n\nfunction onHttpSocketClose () {\n const parser = this[kParser]\n\n if (parser) {\n if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) {\n // We treat all incoming data so far as a valid response.\n parser.onMessageComplete()\n }\n\n this[kParser].destroy()\n this[kParser] = null\n }\n\n const err = this[kError] || new SocketError('closed', util.getSocketInfo(this))\n\n const client = this[kClient]\n\n client[kSocket] = null\n client[kHTTPContext] = null // TODO (fix): This is hacky...\n\n if (client.destroyed) {\n assert(client[kPending] === 0)\n\n // Fail entire queue.\n const requests = client[kQueue].splice(client[kRunningIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n util.errorRequest(client, request, err)\n }\n } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') {\n // Fail head of pipeline.\n const request = client[kQueue][client[kRunningIdx]]\n client[kQueue][client[kRunningIdx]++] = null\n\n util.errorRequest(client, request, err)\n }\n\n client[kPendingIdx] = client[kRunningIdx]\n\n assert(client[kRunning] === 0)\n\n client.emit('disconnect', client[kUrl], [client], err)\n\n client[kResume]()\n}\n\nfunction onSocketClose () {\n this[kClosed] = true\n}\n\n/**\n * @param {import('./client.js')} client\n */\nfunction resumeH1 (client) {\n const socket = client[kSocket]\n\n if (socket && !socket.destroyed) {\n if (client[kSize] === 0) {\n if (!socket[kNoRef] && socket.unref) {\n socket.unref()\n socket[kNoRef] = true\n }\n } else if (socket[kNoRef] && socket.ref) {\n socket.ref()\n socket[kNoRef] = false\n }\n\n if (client[kSize] === 0) {\n if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) {\n socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE)\n }\n } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) {\n if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) {\n const request = client[kQueue][client[kRunningIdx]]\n const headersTimeout = request.headersTimeout != null\n ? request.headersTimeout\n : client[kHeadersTimeout]\n socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS)\n }\n }\n }\n}\n\n// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2\nfunction shouldSendContentLength (method) {\n return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT'\n}\n\n/**\n * @param {import('./client.js')} client\n * @param {import('../core/request.js')} request\n * @returns\n */\nfunction writeH1 (client, request) {\n const { method, path, host, upgrade, blocking, reset } = request\n\n let { body, headers, contentLength } = request\n\n // https://tools.ietf.org/html/rfc7231#section-4.3.1\n // https://tools.ietf.org/html/rfc7231#section-4.3.2\n // https://tools.ietf.org/html/rfc7231#section-4.3.5\n\n // Sending a payload body on a request that does not\n // expect it can cause undefined behavior on some\n // servers and corrupt connection state. Do not\n // re-use the connection for further requests.\n\n const expectsPayload = (\n method === 'PUT' ||\n method === 'POST' ||\n method === 'PATCH' ||\n method === 'QUERY' ||\n method === 'PROPFIND' ||\n method === 'PROPPATCH'\n )\n\n if (util.isFormDataLike(body)) {\n if (!extractBody) {\n extractBody = require('../web/fetch/body.js').extractBody\n }\n\n const [bodyStream, contentType] = extractBody(body)\n if (request.contentType == null) {\n headers.push('content-type', contentType)\n }\n body = bodyStream.stream\n contentLength = bodyStream.length\n } else if (util.isBlobLike(body) && request.contentType == null && body.type) {\n headers.push('content-type', body.type)\n }\n\n if (body && typeof body.read === 'function') {\n // Try to read EOF in order to get length.\n body.read(0)\n }\n\n const bodyLength = util.bodyLength(body)\n\n contentLength = bodyLength ?? contentLength\n\n if (contentLength === null) {\n contentLength = request.contentLength\n }\n\n if (contentLength === 0 && !expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD NOT send a Content-Length header field when\n // the request message does not contain a payload body and the method\n // semantics do not anticipate such a body.\n\n contentLength = null\n }\n\n // https://github.com/nodejs/undici/issues/2046\n // A user agent may send a Content-Length header with 0 value, this should be allowed.\n if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) {\n if (client[kStrictContentLength]) {\n util.errorRequest(client, request, new RequestContentLengthMismatchError())\n return false\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n const socket = client[kSocket]\n\n /**\n * @param {Error} [err]\n * @returns {void}\n */\n const abort = (err) => {\n if (request.aborted || request.completed) {\n return\n }\n\n util.errorRequest(client, request, err || new RequestAbortedError())\n\n util.destroy(body)\n util.destroy(socket, new InformationalError('aborted'))\n }\n\n try {\n request.onConnect(abort)\n } catch (err) {\n util.errorRequest(client, request, err)\n }\n\n if (request.aborted) {\n return false\n }\n\n if (method === 'HEAD') {\n // https://github.com/mcollina/undici/issues/258\n // Close after a HEAD request to interop with misbehaving servers\n // that may send a body in the response.\n\n socket[kReset] = true\n }\n\n if (upgrade || method === 'CONNECT') {\n // On CONNECT or upgrade, block pipeline from dispatching further\n // requests on this connection.\n\n socket[kReset] = true\n }\n\n if (reset != null) {\n socket[kReset] = reset\n }\n\n if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) {\n socket[kReset] = true\n }\n\n if (blocking) {\n socket[kBlocking] = true\n }\n\n if (socket.setTypeOfService) {\n socket.setTypeOfService(request.typeOfService)\n }\n\n let header = `${method} ${path} HTTP/1.1\\r\\n`\n\n if (typeof host === 'string') {\n header += `host: ${host}\\r\\n`\n } else {\n header += client[kHostHeader]\n }\n\n if (upgrade) {\n header += `connection: upgrade\\r\\nupgrade: ${upgrade}\\r\\n`\n } else if (client[kPipelining] && !socket[kReset]) {\n header += 'connection: keep-alive\\r\\n'\n } else {\n header += 'connection: close\\r\\n'\n }\n\n if (Array.isArray(headers)) {\n for (let n = 0; n < headers.length; n += 2) {\n const key = headers[n + 0]\n const val = headers[n + 1]\n\n if (Array.isArray(val)) {\n for (let i = 0; i < val.length; i++) {\n header += `${key}: ${val[i]}\\r\\n`\n }\n } else {\n header += `${key}: ${val}\\r\\n`\n }\n }\n }\n\n if (channels.sendHeaders.hasSubscribers) {\n channels.sendHeaders.publish({ request, headers: header, socket })\n }\n\n if (!body || bodyLength === 0) {\n writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload)\n } else if (util.isBuffer(body)) {\n writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload)\n } else if (util.isBlobLike(body)) {\n if (typeof body.stream === 'function') {\n writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload)\n } else {\n writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload)\n }\n } else if (util.isStream(body)) {\n writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload)\n } else if (util.isIterable(body)) {\n writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload)\n } else {\n assert(false)\n }\n\n return true\n}\n\n/**\n * @param {AbortCallback} abort\n * @param {import('stream').Stream} body\n * @param {import('./client.js')} client\n * @param {import('../core/request.js')} request\n * @param {import('net').Socket} socket\n * @param {number} contentLength\n * @param {string} header\n * @param {boolean} expectsPayload\n */\nfunction writeStream (abort, body, client, request, socket, contentLength, header, expectsPayload) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined')\n\n let finished = false\n\n const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header })\n\n /**\n * @param {Buffer} chunk\n * @returns {void}\n */\n const onData = function (chunk) {\n if (finished) {\n return\n }\n\n try {\n if (!writer.write(chunk) && this.pause) {\n this.pause()\n }\n } catch (err) {\n util.destroy(this, err)\n }\n }\n\n /**\n * @returns {void}\n */\n const onDrain = function () {\n if (finished) {\n return\n }\n\n if (body.resume) {\n body.resume()\n }\n }\n\n /**\n * @returns {void}\n */\n const onClose = function () {\n // 'close' might be emitted *before* 'error' for\n // broken streams. Wait a tick to avoid this case.\n queueMicrotask(() => {\n // It's only safe to remove 'error' listener after\n // 'close'.\n body.removeListener('error', onFinished)\n })\n\n if (!finished) {\n const err = new RequestAbortedError()\n queueMicrotask(() => onFinished(err))\n }\n }\n\n /**\n * @param {Error} [err]\n * @returns\n */\n const onFinished = function (err) {\n if (finished) {\n return\n }\n\n finished = true\n\n assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1))\n\n socket\n .off('drain', onDrain)\n .off('error', onFinished)\n\n body\n .removeListener('data', onData)\n .removeListener('end', onFinished)\n .removeListener('close', onClose)\n\n if (!err) {\n try {\n writer.end()\n } catch (er) {\n err = er\n }\n }\n\n writer.destroy(err)\n\n if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) {\n util.destroy(body, err)\n } else {\n util.destroy(body)\n }\n }\n\n body\n .on('data', onData)\n .on('end', onFinished)\n .on('error', onFinished)\n .on('close', onClose)\n\n if (body.resume) {\n body.resume()\n }\n\n socket\n .on('drain', onDrain)\n .on('error', onFinished)\n\n if (body.errorEmitted ?? body.errored) {\n setImmediate(onFinished, body.errored)\n } else if (body.endEmitted ?? body.readableEnded) {\n setImmediate(onFinished, null)\n }\n\n if (body.closeEmitted ?? body.closed) {\n setImmediate(onClose)\n }\n}\n\n/**\n * @typedef AbortCallback\n * @type {Function}\n * @param {Error} [err]\n * @returns {void}\n */\n\n/**\n * @param {AbortCallback} abort\n * @param {Uint8Array|null} body\n * @param {import('./client.js')} client\n * @param {import('../core/request.js')} request\n * @param {import('net').Socket} socket\n * @param {number} contentLength\n * @param {string} header\n * @param {boolean} expectsPayload\n * @returns {void}\n */\nfunction writeBuffer (abort, body, client, request, socket, contentLength, header, expectsPayload) {\n try {\n if (!body) {\n if (contentLength === 0) {\n socket.write(`${header}content-length: 0\\r\\n\\r\\n`, 'latin1')\n } else {\n assert(contentLength === null, 'no body must not have content length')\n socket.write(`${header}\\r\\n`, 'latin1')\n }\n } else if (util.isBuffer(body)) {\n assert(contentLength === body.byteLength, 'buffer body must have content length')\n\n socket.cork()\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n socket.write(body)\n socket.uncork()\n request.onBodySent(body)\n\n if (!expectsPayload && request.reset !== false) {\n socket[kReset] = true\n }\n }\n request.onRequestSent()\n\n client[kResume]()\n } catch (err) {\n abort(err)\n }\n}\n\n/**\n * @param {AbortCallback} abort\n * @param {Blob} body\n * @param {import('./client.js')} client\n * @param {import('../core/request.js')} request\n * @param {import('net').Socket} socket\n * @param {number} contentLength\n * @param {string} header\n * @param {boolean} expectsPayload\n * @returns {Promise}\n */\nasync function writeBlob (abort, body, client, request, socket, contentLength, header, expectsPayload) {\n assert(contentLength === body.size, 'blob body must have content length')\n\n try {\n if (contentLength != null && contentLength !== body.size) {\n throw new RequestContentLengthMismatchError()\n }\n\n const buffer = Buffer.from(await body.arrayBuffer())\n\n socket.cork()\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n socket.write(buffer)\n socket.uncork()\n\n request.onBodySent(buffer)\n request.onRequestSent()\n\n if (!expectsPayload && request.reset !== false) {\n socket[kReset] = true\n }\n\n client[kResume]()\n } catch (err) {\n abort(err)\n }\n}\n\n/**\n * @param {AbortCallback} abort\n * @param {Iterable} body\n * @param {import('./client.js')} client\n * @param {import('../core/request.js')} request\n * @param {import('net').Socket} socket\n * @param {number} contentLength\n * @param {string} header\n * @param {boolean} expectsPayload\n * @returns {Promise}\n */\nasync function writeIterable (abort, body, client, request, socket, contentLength, header, expectsPayload) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined')\n\n let callback = null\n function onDrain () {\n if (callback) {\n const cb = callback\n callback = null\n cb()\n }\n }\n\n const waitForDrain = () => new Promise((resolve, reject) => {\n assert(callback === null)\n\n if (socket[kError]) {\n reject(socket[kError])\n } else {\n callback = resolve\n }\n })\n\n socket\n .on('close', onDrain)\n .on('drain', onDrain)\n\n const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header })\n try {\n // It's up to the user to somehow abort the async iterable.\n for await (const chunk of body) {\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (!writer.write(chunk)) {\n await waitForDrain()\n }\n }\n\n writer.end()\n } catch (err) {\n writer.destroy(err)\n } finally {\n socket\n .off('close', onDrain)\n .off('drain', onDrain)\n }\n}\n\nclass AsyncWriter {\n /**\n *\n * @param {object} arg\n * @param {AbortCallback} arg.abort\n * @param {import('net').Socket} arg.socket\n * @param {import('../core/request.js')} arg.request\n * @param {number} arg.contentLength\n * @param {import('./client.js')} arg.client\n * @param {boolean} arg.expectsPayload\n * @param {string} arg.header\n */\n constructor ({ abort, socket, request, contentLength, client, expectsPayload, header }) {\n this.socket = socket\n this.request = request\n this.contentLength = contentLength\n this.client = client\n this.bytesWritten = 0\n this.expectsPayload = expectsPayload\n this.header = header\n this.abort = abort\n\n socket[kWriting] = true\n }\n\n /**\n * @param {Buffer} chunk\n * @returns\n */\n write (chunk) {\n const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this\n\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (socket.destroyed) {\n return false\n }\n\n const len = Buffer.byteLength(chunk)\n if (!len) {\n return true\n }\n\n // We should defer writing chunks.\n if (contentLength !== null && bytesWritten + len > contentLength) {\n if (client[kStrictContentLength]) {\n throw new RequestContentLengthMismatchError()\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n socket.cork()\n\n if (bytesWritten === 0) {\n if (!expectsPayload && request.reset !== false) {\n socket[kReset] = true\n }\n\n if (contentLength === null) {\n socket.write(`${header}transfer-encoding: chunked\\r\\n`, 'latin1')\n } else {\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n }\n }\n\n if (contentLength === null) {\n socket.write(`\\r\\n${len.toString(16)}\\r\\n`, 'latin1')\n }\n\n this.bytesWritten += len\n\n const ret = socket.write(chunk)\n\n socket.uncork()\n\n request.onBodySent(chunk)\n\n if (!ret) {\n if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {\n if (socket[kParser].timeout.refresh) {\n socket[kParser].timeout.refresh()\n }\n }\n }\n\n return ret\n }\n\n /**\n * @returns {void}\n */\n end () {\n const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this\n request.onRequestSent()\n\n socket[kWriting] = false\n\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (socket.destroyed) {\n return\n }\n\n if (bytesWritten === 0) {\n if (expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD send a Content-Length in a request message when\n // no Transfer-Encoding is sent and the request method defines a meaning\n // for an enclosed payload body.\n\n socket.write(`${header}content-length: 0\\r\\n\\r\\n`, 'latin1')\n } else {\n socket.write(`${header}\\r\\n`, 'latin1')\n }\n } else if (contentLength === null) {\n socket.write('\\r\\n0\\r\\n\\r\\n', 'latin1')\n }\n\n if (contentLength !== null && bytesWritten !== contentLength) {\n if (client[kStrictContentLength]) {\n throw new RequestContentLengthMismatchError()\n } else {\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n }\n\n if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {\n if (socket[kParser].timeout.refresh) {\n socket[kParser].timeout.refresh()\n }\n }\n\n client[kResume]()\n }\n\n /**\n * @param {Error} [err]\n * @returns {void}\n */\n destroy (err) {\n const { socket, client, abort } = this\n\n socket[kWriting] = false\n\n if (err) {\n assert(client[kRunning] <= 1, 'pipeline should only contain this request')\n abort(err)\n }\n }\n}\n\nmodule.exports = connectH1\n","'use strict'\n\nconst assert = require('node:assert')\nconst { pipeline } = require('node:stream')\nconst util = require('../core/util.js')\nconst {\n RequestContentLengthMismatchError,\n RequestAbortedError,\n SocketError,\n InformationalError,\n InvalidArgumentError\n} = require('../core/errors.js')\nconst {\n kUrl,\n kReset,\n kClient,\n kRunning,\n kPending,\n kQueue,\n kPendingIdx,\n kRunningIdx,\n kError,\n kSocket,\n kStrictContentLength,\n kOnError,\n kMaxConcurrentStreams,\n kPingInterval,\n kHTTP2Session,\n kHTTP2InitialWindowSize,\n kHTTP2ConnectionWindowSize,\n kResume,\n kSize,\n kHTTPContext,\n kClosed,\n kBodyTimeout,\n kEnableConnectProtocol,\n kRemoteSettings,\n kHTTP2Stream,\n kHTTP2SessionState\n} = require('../core/symbols.js')\nconst { channels } = require('../core/diagnostics.js')\n\nconst kOpenStreams = Symbol('open streams')\n\nlet extractBody\n\n/** @type {import('http2')} */\nlet http2\ntry {\n http2 = require('node:http2')\n} catch {\n // @ts-ignore\n http2 = { constants: {} }\n}\n\nconst {\n constants: {\n HTTP2_HEADER_AUTHORITY,\n HTTP2_HEADER_METHOD,\n HTTP2_HEADER_PATH,\n HTTP2_HEADER_SCHEME,\n HTTP2_HEADER_CONTENT_LENGTH,\n HTTP2_HEADER_EXPECT,\n HTTP2_HEADER_STATUS,\n HTTP2_HEADER_PROTOCOL,\n NGHTTP2_REFUSED_STREAM,\n NGHTTP2_CANCEL\n }\n} = http2\n\nfunction parseH2Headers (headers) {\n const result = []\n\n for (const [name, value] of Object.entries(headers)) {\n // h2 may concat the header value by array\n // e.g. Set-Cookie\n if (Array.isArray(value)) {\n for (const subvalue of value) {\n // we need to provide each header value of header name\n // because the headers handler expect name-value pair\n result.push(Buffer.from(name), Buffer.from(subvalue))\n }\n } else {\n result.push(Buffer.from(name), Buffer.from(value))\n }\n }\n\n return result\n}\n\nfunction connectH2 (client, socket) {\n client[kSocket] = socket\n\n const http2InitialWindowSize = client[kHTTP2InitialWindowSize]\n const http2ConnectionWindowSize = client[kHTTP2ConnectionWindowSize]\n\n const session = http2.connect(client[kUrl], {\n createConnection: () => socket,\n peerMaxConcurrentStreams: client[kMaxConcurrentStreams],\n settings: {\n // TODO(metcoder95): add support for PUSH\n enablePush: false,\n ...(http2InitialWindowSize != null ? { initialWindowSize: http2InitialWindowSize } : null)\n }\n })\n\n client[kSocket] = socket\n session[kOpenStreams] = 0\n session[kClient] = client\n session[kSocket] = socket\n session[kHTTP2SessionState] = {\n ping: {\n interval: client[kPingInterval] === 0 ? null : setInterval(onHttp2SendPing, client[kPingInterval], session).unref()\n }\n }\n // We set it to true by default in a best-effort; however once connected to an H2 server\n // we will check if extended CONNECT protocol is supported or not\n // and set this value accordingly.\n session[kEnableConnectProtocol] = false\n // States whether or not we have received the remote settings from the server\n session[kRemoteSettings] = false\n\n // Apply connection-level flow control once connected (if supported).\n if (http2ConnectionWindowSize) {\n util.addListener(session, 'connect', applyConnectionWindowSize.bind(session, http2ConnectionWindowSize))\n }\n\n util.addListener(session, 'error', onHttp2SessionError)\n util.addListener(session, 'frameError', onHttp2FrameError)\n util.addListener(session, 'end', onHttp2SessionEnd)\n util.addListener(session, 'goaway', onHttp2SessionGoAway)\n util.addListener(session, 'close', onHttp2SessionClose)\n util.addListener(session, 'remoteSettings', onHttp2RemoteSettings)\n // TODO (@metcoder95): implement SETTINGS support\n // util.addListener(session, 'localSettings', onHttp2RemoteSettings)\n\n session.unref()\n\n client[kHTTP2Session] = session\n socket[kHTTP2Session] = session\n\n util.addListener(socket, 'error', onHttp2SocketError)\n util.addListener(socket, 'end', onHttp2SocketEnd)\n util.addListener(socket, 'close', onHttp2SocketClose)\n\n socket[kClosed] = false\n socket.on('close', onSocketClose)\n\n return {\n version: 'h2',\n defaultPipelining: Infinity,\n /**\n * @param {import('../core/request.js')} request\n * @returns {boolean}\n */\n write (request) {\n return writeH2(client, request)\n },\n /**\n * @returns {void}\n */\n resume () {\n resumeH2(client)\n },\n /**\n * @param {Error | null} err\n * @param {() => void} callback\n */\n destroy (err, callback) {\n if (socket[kClosed]) {\n queueMicrotask(callback)\n } else {\n socket.destroy(err).on('close', callback)\n }\n },\n /**\n * @type {boolean}\n */\n get destroyed () {\n return socket.destroyed\n },\n /**\n * @param {import('../core/request.js')} request\n * @returns {boolean}\n */\n busy (request) {\n if (request != null) {\n if (client[kRunning] > 0) {\n // We are already processing requests\n\n // Non-idempotent request cannot be retried.\n // Ensure that no other requests are inflight and\n // could cause failure.\n if (request.idempotent === false) return true\n // Don't dispatch an upgrade until all preceding requests have completed.\n // Possibly, we do not have remote settings confirmed yet.\n if ((request.upgrade === 'websocket' || request.method === 'CONNECT') && session[kRemoteSettings] === false) return true\n // Request with stream or iterator body can error while other requests\n // are inflight and indirectly error those as well.\n // Ensure this doesn't happen by waiting for inflight\n // to complete before dispatching.\n\n // Request with stream or iterator body cannot be retried.\n // Ensure that no other requests are inflight and\n // could cause failure.\n if (util.bodyLength(request.body) !== 0 &&\n (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) return true\n } else {\n return (request.upgrade === 'websocket' || request.method === 'CONNECT') && session[kRemoteSettings] === false\n }\n }\n\n return false\n }\n }\n}\n\nfunction resumeH2 (client) {\n const socket = client[kSocket]\n\n if (socket?.destroyed === false) {\n if (client[kSize] === 0 || client[kMaxConcurrentStreams] === 0) {\n socket.unref()\n client[kHTTP2Session].unref()\n } else {\n socket.ref()\n client[kHTTP2Session].ref()\n }\n }\n}\n\nfunction applyConnectionWindowSize (connectionWindowSize) {\n try {\n if (typeof this.setLocalWindowSize === 'function') {\n this.setLocalWindowSize(connectionWindowSize)\n }\n } catch {\n // Best-effort only.\n }\n}\n\nfunction onHttp2RemoteSettings (settings) {\n // Fallbacks are a safe bet, remote setting will always override\n this[kClient][kMaxConcurrentStreams] = settings.maxConcurrentStreams ?? this[kClient][kMaxConcurrentStreams]\n /**\n * From RFC-8441\n * A sender MUST NOT send a SETTINGS_ENABLE_CONNECT_PROTOCOL parameter\n * with the value of 0 after previously sending a value of 1.\n */\n // Note: Cannot be tested in Node, it does not supports disabling the extended CONNECT protocol once enabled\n if (this[kRemoteSettings] === true && this[kEnableConnectProtocol] === true && settings.enableConnectProtocol === false) {\n const err = new InformationalError('HTTP/2: Server disabled extended CONNECT protocol against RFC-8441')\n this[kSocket][kError] = err\n this[kClient][kOnError](err)\n return\n }\n\n this[kEnableConnectProtocol] = settings.enableConnectProtocol ?? this[kEnableConnectProtocol]\n this[kRemoteSettings] = true\n this[kClient][kResume]()\n}\n\nfunction onHttp2SendPing (session) {\n const state = session[kHTTP2SessionState]\n if ((session.closed || session.destroyed) && state.ping.interval != null) {\n clearInterval(state.ping.interval)\n state.ping.interval = null\n return\n }\n\n // If no ping sent, do nothing\n session.ping(onPing.bind(session))\n\n function onPing (err, duration) {\n const client = this[kClient]\n const socket = this[kClient]\n\n if (err != null) {\n const error = new InformationalError(`HTTP/2: \"PING\" errored - type ${err.message}`)\n socket[kError] = error\n client[kOnError](error)\n } else {\n client.emit('ping', duration)\n }\n }\n}\n\nfunction onHttp2SessionError (err) {\n assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')\n\n this[kSocket][kError] = err\n this[kClient][kOnError](err)\n}\n\nfunction onHttp2FrameError (type, code, id) {\n if (id === 0) {\n const err = new InformationalError(`HTTP/2: \"frameError\" received - type ${type}, code ${code}`)\n this[kSocket][kError] = err\n this[kClient][kOnError](err)\n }\n}\n\nfunction onHttp2SessionEnd () {\n const err = new SocketError('other side closed', util.getSocketInfo(this[kSocket]))\n this.destroy(err)\n util.destroy(this[kSocket], err)\n}\n\n/**\n * This is the root cause of #3011\n * We need to handle GOAWAY frames properly, and trigger the session close\n * along with the socket right away\n *\n * @this {import('http2').ClientHttp2Session}\n * @param {number} errorCode\n */\nfunction onHttp2SessionGoAway (errorCode) {\n // TODO(mcollina): Verify if GOAWAY implements the spec correctly:\n // https://datatracker.ietf.org/doc/html/rfc7540#section-6.8\n // Specifically, we do not verify the \"valid\" stream id.\n\n const err = this[kError] || new SocketError(`HTTP/2: \"GOAWAY\" frame received with code ${errorCode}`, util.getSocketInfo(this[kSocket]))\n const client = this[kClient]\n\n client[kSocket] = null\n client[kHTTPContext] = null\n\n // this is an HTTP2 session\n this.close()\n this[kHTTP2Session] = null\n\n util.destroy(this[kSocket], err)\n\n // Fail head of pipeline.\n if (client[kRunningIdx] < client[kQueue].length) {\n const request = client[kQueue][client[kRunningIdx]]\n client[kQueue][client[kRunningIdx]++] = null\n util.errorRequest(client, request, err)\n client[kPendingIdx] = client[kRunningIdx]\n }\n\n assert(client[kRunning] === 0)\n\n client.emit('disconnect', client[kUrl], [client], err)\n client.emit('connectionError', client[kUrl], [client], err)\n\n client[kResume]()\n}\n\nfunction onHttp2SessionClose () {\n const { [kClient]: client, [kHTTP2SessionState]: state } = this\n const { [kSocket]: socket } = client\n\n const err = this[kSocket][kError] || this[kError] || new SocketError('closed', util.getSocketInfo(socket))\n\n client[kSocket] = null\n client[kHTTPContext] = null\n\n if (state.ping.interval != null) {\n clearInterval(state.ping.interval)\n state.ping.interval = null\n }\n\n if (client.destroyed) {\n assert(client[kPending] === 0)\n\n // Fail entire queue.\n const requests = client[kQueue].splice(client[kRunningIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n util.errorRequest(client, request, err)\n }\n }\n}\n\nfunction onHttp2SocketClose () {\n const err = this[kError] || new SocketError('closed', util.getSocketInfo(this))\n\n const client = this[kHTTP2Session][kClient]\n\n client[kSocket] = null\n client[kHTTPContext] = null\n\n if (this[kHTTP2Session] !== null) {\n this[kHTTP2Session].destroy(err)\n }\n\n client[kPendingIdx] = client[kRunningIdx]\n\n assert(client[kRunning] === 0)\n\n client.emit('disconnect', client[kUrl], [client], err)\n\n client[kResume]()\n}\n\nfunction onHttp2SocketError (err) {\n assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')\n\n this[kError] = err\n\n this[kClient][kOnError](err)\n}\n\nfunction onHttp2SocketEnd () {\n util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this)))\n}\n\nfunction onSocketClose () {\n this[kClosed] = true\n}\n\n// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2\nfunction shouldSendContentLength (method) {\n return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT'\n}\n\nfunction writeH2 (client, request) {\n const requestTimeout = request.bodyTimeout ?? client[kBodyTimeout]\n const session = client[kHTTP2Session]\n const { method, path, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request\n let { body } = request\n\n if (upgrade != null && upgrade !== 'websocket') {\n util.errorRequest(client, request, new InvalidArgumentError(`Custom upgrade \"${upgrade}\" not supported over HTTP/2`))\n return false\n }\n\n const headers = {}\n for (let n = 0; n < reqHeaders.length; n += 2) {\n const key = reqHeaders[n + 0]\n const val = reqHeaders[n + 1]\n\n if (key === 'cookie') {\n if (headers[key] != null) {\n headers[key] = Array.isArray(headers[key]) ? (headers[key].push(val), headers[key]) : [headers[key], val]\n } else {\n headers[key] = val\n }\n\n continue\n }\n\n if (Array.isArray(val)) {\n for (let i = 0; i < val.length; i++) {\n if (headers[key]) {\n headers[key] += `, ${val[i]}`\n } else {\n headers[key] = val[i]\n }\n }\n } else if (headers[key]) {\n headers[key] += `, ${val}`\n } else {\n headers[key] = val\n }\n }\n\n /** @type {import('node:http2').ClientHttp2Stream} */\n let stream = null\n\n const { hostname, port } = client[kUrl]\n\n headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ''}`\n headers[HTTP2_HEADER_METHOD] = method\n\n const abort = (err) => {\n if (request.aborted || request.completed) {\n return\n }\n\n err = err || new RequestAbortedError()\n\n util.errorRequest(client, request, err)\n\n if (stream != null) {\n // Some chunks might still come after abort,\n // let's ignore them\n stream.removeAllListeners('data')\n\n // On Abort, we close the stream to send RST_STREAM frame\n stream.close()\n\n // We move the running index to the next request\n client[kOnError](err)\n client[kResume]()\n }\n\n // We do not destroy the socket as we can continue using the session\n // the stream gets destroyed and the session remains to create new streams\n util.destroy(body, err)\n }\n\n try {\n // We are already connected, streams are pending.\n // We can call on connect, and wait for abort\n request.onConnect(abort)\n } catch (err) {\n util.errorRequest(client, request, err)\n }\n\n if (request.aborted) {\n return false\n }\n\n if (upgrade || method === 'CONNECT') {\n session.ref()\n\n if (upgrade === 'websocket') {\n // We cannot upgrade to websocket if extended CONNECT protocol is not supported\n if (session[kEnableConnectProtocol] === false) {\n util.errorRequest(client, request, new InformationalError('HTTP/2: Extended CONNECT protocol not supported by server'))\n session.unref()\n return false\n }\n\n // We force the method to CONNECT\n // as per RFC-8441\n // https://datatracker.ietf.org/doc/html/rfc8441#section-4\n headers[HTTP2_HEADER_METHOD] = 'CONNECT'\n headers[HTTP2_HEADER_PROTOCOL] = 'websocket'\n // :path and :scheme headers must be omitted when sending CONNECT but set if extended-CONNECT\n headers[HTTP2_HEADER_PATH] = path\n\n if (protocol === 'ws:' || protocol === 'wss:') {\n headers[HTTP2_HEADER_SCHEME] = protocol === 'ws:' ? 'http' : 'https'\n } else {\n headers[HTTP2_HEADER_SCHEME] = protocol === 'http:' ? 'http' : 'https'\n }\n\n stream = session.request(headers, { endStream: false, signal })\n stream[kHTTP2Stream] = true\n\n stream.once('response', (headers, _flags) => {\n const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers\n\n request.onUpgrade(statusCode, parseH2Headers(realHeaders), stream)\n\n ++session[kOpenStreams]\n client[kQueue][client[kRunningIdx]++] = null\n })\n\n stream.on('error', () => {\n if (stream.rstCode === NGHTTP2_REFUSED_STREAM || stream.rstCode === NGHTTP2_CANCEL) {\n // NGHTTP2_REFUSED_STREAM (7) or NGHTTP2_CANCEL (8)\n // We do not treat those as errors as the server might\n // not support websockets and refuse the stream\n abort(new InformationalError(`HTTP/2: \"stream error\" received - code ${stream.rstCode}`))\n }\n })\n\n stream.once('close', () => {\n session[kOpenStreams] -= 1\n if (session[kOpenStreams] === 0) session.unref()\n })\n\n stream.setTimeout(requestTimeout)\n return true\n }\n\n // TODO: consolidate once we support CONNECT properly\n // NOTE: We are already connected, streams are pending, first request\n // will create a new stream. We trigger a request to create the stream and wait until\n // `ready` event is triggered\n // We disabled endStream to allow the user to write to the stream\n stream = session.request(headers, { endStream: false, signal })\n stream[kHTTP2Stream] = true\n stream.on('response', headers => {\n const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers\n\n request.onUpgrade(statusCode, parseH2Headers(realHeaders), stream)\n ++session[kOpenStreams]\n client[kQueue][client[kRunningIdx]++] = null\n })\n stream.once('close', () => {\n session[kOpenStreams] -= 1\n if (session[kOpenStreams] === 0) session.unref()\n })\n stream.setTimeout(requestTimeout)\n\n return true\n }\n\n // https://tools.ietf.org/html/rfc7540#section-8.3\n // :path and :scheme headers must be omitted when sending CONNECT\n headers[HTTP2_HEADER_PATH] = path\n headers[HTTP2_HEADER_SCHEME] = protocol === 'http:' ? 'http' : 'https'\n\n // https://tools.ietf.org/html/rfc7231#section-4.3.1\n // https://tools.ietf.org/html/rfc7231#section-4.3.2\n // https://tools.ietf.org/html/rfc7231#section-4.3.5\n\n // Sending a payload body on a request that does not\n // expect it can cause undefined behavior on some\n // servers and corrupt connection state. Do not\n // re-use the connection for further requests.\n\n const expectsPayload = (\n method === 'PUT' ||\n method === 'POST' ||\n method === 'PATCH'\n )\n\n if (body && typeof body.read === 'function') {\n // Try to read EOF in order to get length.\n body.read(0)\n }\n\n let contentLength = util.bodyLength(body)\n\n if (util.isFormDataLike(body)) {\n extractBody ??= require('../web/fetch/body.js').extractBody\n\n const [bodyStream, contentType] = extractBody(body)\n headers['content-type'] = contentType\n\n body = bodyStream.stream\n contentLength = bodyStream.length\n }\n\n if (contentLength == null) {\n contentLength = request.contentLength\n }\n\n if (!expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD NOT send a Content-Length header field when\n // the request message does not contain a payload body and the method\n // semantics do not anticipate such a body.\n // And for methods that don't expect a payload, omit Content-Length.\n contentLength = null\n }\n\n // https://github.com/nodejs/undici/issues/2046\n // A user agent may send a Content-Length header with 0 value, this should be allowed.\n if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) {\n if (client[kStrictContentLength]) {\n util.errorRequest(client, request, new RequestContentLengthMismatchError())\n return false\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n if (contentLength != null) {\n assert(body || contentLength === 0, 'no body must not have content length')\n headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`\n }\n\n session.ref()\n\n if (channels.sendHeaders.hasSubscribers) {\n let header = ''\n for (const key in headers) {\n header += `${key}: ${headers[key]}\\r\\n`\n }\n channels.sendHeaders.publish({ request, headers: header, socket: session[kSocket] })\n }\n\n // TODO(metcoder95): add support for sending trailers\n const shouldEndStream = method === 'GET' || method === 'HEAD' || body === null\n if (expectContinue) {\n headers[HTTP2_HEADER_EXPECT] = '100-continue'\n stream = session.request(headers, { endStream: shouldEndStream, signal })\n stream[kHTTP2Stream] = true\n\n stream.once('continue', writeBodyH2)\n } else {\n stream = session.request(headers, {\n endStream: shouldEndStream,\n signal\n })\n stream[kHTTP2Stream] = true\n\n writeBodyH2()\n }\n\n // Increment counter as we have new streams open\n ++session[kOpenStreams]\n stream.setTimeout(requestTimeout)\n\n // Track whether we received a response (headers)\n let responseReceived = false\n\n stream.once('response', headers => {\n const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers\n request.onResponseStarted()\n responseReceived = true\n\n // Due to the stream nature, it is possible we face a race condition\n // where the stream has been assigned, but the request has been aborted\n // the request remains in-flight and headers hasn't been received yet\n // for those scenarios, best effort is to destroy the stream immediately\n // as there's no value to keep it open.\n if (request.aborted) {\n stream.removeAllListeners('data')\n return\n }\n\n if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), '') === false) {\n stream.pause()\n }\n\n stream.on('data', (chunk) => {\n if (request.aborted || request.completed) {\n return\n }\n\n if (request.onData(chunk) === false) {\n stream.pause()\n }\n })\n })\n\n stream.once('end', () => {\n stream.removeAllListeners('data')\n // If we received a response, this is a normal completion\n if (responseReceived) {\n if (!request.aborted && !request.completed) {\n request.onComplete({})\n }\n\n client[kQueue][client[kRunningIdx]++] = null\n client[kResume]()\n } else {\n // Stream ended without receiving a response - this is an error\n // (e.g., server destroyed the stream before sending headers)\n abort(new InformationalError('HTTP/2: stream half-closed (remote)'))\n client[kQueue][client[kRunningIdx]++] = null\n client[kPendingIdx] = client[kRunningIdx]\n client[kResume]()\n }\n })\n\n stream.once('close', () => {\n stream.removeAllListeners('data')\n session[kOpenStreams] -= 1\n if (session[kOpenStreams] === 0) {\n session.unref()\n }\n })\n\n stream.once('error', function (err) {\n stream.removeAllListeners('data')\n abort(err)\n })\n\n stream.once('frameError', (type, code) => {\n stream.removeAllListeners('data')\n abort(new InformationalError(`HTTP/2: \"frameError\" received - type ${type}, code ${code}`))\n })\n\n stream.on('aborted', () => {\n stream.removeAllListeners('data')\n })\n\n stream.on('timeout', () => {\n const err = new InformationalError(`HTTP/2: \"stream timeout after ${requestTimeout}\"`)\n stream.removeAllListeners('data')\n session[kOpenStreams] -= 1\n\n if (session[kOpenStreams] === 0) {\n session.unref()\n }\n\n abort(err)\n })\n\n stream.once('trailers', trailers => {\n if (request.aborted || request.completed) {\n return\n }\n\n stream.removeAllListeners('data')\n request.onComplete(trailers)\n })\n\n return true\n\n function writeBodyH2 () {\n if (!body || contentLength === 0) {\n writeBuffer(\n abort,\n stream,\n null,\n client,\n request,\n client[kSocket],\n contentLength,\n expectsPayload\n )\n } else if (util.isBuffer(body)) {\n writeBuffer(\n abort,\n stream,\n body,\n client,\n request,\n client[kSocket],\n contentLength,\n expectsPayload\n )\n } else if (util.isBlobLike(body)) {\n if (typeof body.stream === 'function') {\n writeIterable(\n abort,\n stream,\n body.stream(),\n client,\n request,\n client[kSocket],\n contentLength,\n expectsPayload\n )\n } else {\n writeBlob(\n abort,\n stream,\n body,\n client,\n request,\n client[kSocket],\n contentLength,\n expectsPayload\n )\n }\n } else if (util.isStream(body)) {\n writeStream(\n abort,\n client[kSocket],\n expectsPayload,\n stream,\n body,\n client,\n request,\n contentLength\n )\n } else if (util.isIterable(body)) {\n writeIterable(\n abort,\n stream,\n body,\n client,\n request,\n client[kSocket],\n contentLength,\n expectsPayload\n )\n } else {\n assert(false)\n }\n }\n}\n\nfunction writeBuffer (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) {\n try {\n if (body != null && util.isBuffer(body)) {\n assert(contentLength === body.byteLength, 'buffer body must have content length')\n h2stream.cork()\n h2stream.write(body)\n h2stream.uncork()\n h2stream.end()\n\n request.onBodySent(body)\n }\n\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n request.onRequestSent()\n client[kResume]()\n } catch (error) {\n abort(error)\n }\n}\n\nfunction writeStream (abort, socket, expectsPayload, h2stream, body, client, request, contentLength) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined')\n\n // For HTTP/2, is enough to pipe the stream\n const pipe = pipeline(\n body,\n h2stream,\n (err) => {\n if (err) {\n util.destroy(pipe, err)\n abort(err)\n } else {\n util.removeAllListeners(pipe)\n request.onRequestSent()\n\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n client[kResume]()\n }\n }\n )\n\n util.addListener(pipe, 'data', onPipeData)\n\n function onPipeData (chunk) {\n request.onBodySent(chunk)\n }\n}\n\nasync function writeBlob (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) {\n assert(contentLength === body.size, 'blob body must have content length')\n\n try {\n if (contentLength != null && contentLength !== body.size) {\n throw new RequestContentLengthMismatchError()\n }\n\n const buffer = Buffer.from(await body.arrayBuffer())\n\n h2stream.cork()\n h2stream.write(buffer)\n h2stream.uncork()\n h2stream.end()\n\n request.onBodySent(buffer)\n request.onRequestSent()\n\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n client[kResume]()\n } catch (err) {\n abort(err)\n }\n}\n\nasync function writeIterable (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined')\n\n let callback = null\n function onDrain () {\n if (callback) {\n const cb = callback\n callback = null\n cb()\n }\n }\n\n const waitForDrain = () => new Promise((resolve, reject) => {\n assert(callback === null)\n\n if (socket[kError]) {\n reject(socket[kError])\n } else {\n callback = resolve\n }\n })\n\n h2stream\n .on('close', onDrain)\n .on('drain', onDrain)\n\n try {\n // It's up to the user to somehow abort the async iterable.\n for await (const chunk of body) {\n if (socket[kError]) {\n throw socket[kError]\n }\n\n const res = h2stream.write(chunk)\n request.onBodySent(chunk)\n if (!res) {\n await waitForDrain()\n }\n }\n\n h2stream.end()\n\n request.onRequestSent()\n\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n client[kResume]()\n } catch (err) {\n abort(err)\n } finally {\n h2stream\n .off('close', onDrain)\n .off('drain', onDrain)\n }\n}\n\nmodule.exports = connectH2\n","'use strict'\n\nconst assert = require('node:assert')\nconst net = require('node:net')\nconst http = require('node:http')\nconst util = require('../core/util.js')\nconst { ClientStats } = require('../util/stats.js')\nconst { channels } = require('../core/diagnostics.js')\nconst Request = require('../core/request.js')\nconst DispatcherBase = require('./dispatcher-base')\nconst {\n InvalidArgumentError,\n InformationalError,\n ClientDestroyedError\n} = require('../core/errors.js')\nconst buildConnector = require('../core/connect.js')\nconst {\n kUrl,\n kServerName,\n kClient,\n kBusy,\n kConnect,\n kResuming,\n kRunning,\n kPending,\n kSize,\n kQueue,\n kConnected,\n kConnecting,\n kNeedDrain,\n kKeepAliveDefaultTimeout,\n kHostHeader,\n kPendingIdx,\n kRunningIdx,\n kError,\n kPipelining,\n kKeepAliveTimeoutValue,\n kMaxHeadersSize,\n kKeepAliveMaxTimeout,\n kKeepAliveTimeoutThreshold,\n kHeadersTimeout,\n kBodyTimeout,\n kStrictContentLength,\n kConnector,\n kMaxRequests,\n kCounter,\n kClose,\n kDestroy,\n kDispatch,\n kLocalAddress,\n kMaxResponseSize,\n kOnError,\n kHTTPContext,\n kMaxConcurrentStreams,\n kHTTP2InitialWindowSize,\n kHTTP2ConnectionWindowSize,\n kResume,\n kPingInterval\n} = require('../core/symbols.js')\nconst connectH1 = require('./client-h1.js')\nconst connectH2 = require('./client-h2.js')\n\nconst kClosedResolve = Symbol('kClosedResolve')\n\nconst getDefaultNodeMaxHeaderSize = http &&\n http.maxHeaderSize &&\n Number.isInteger(http.maxHeaderSize) &&\n http.maxHeaderSize > 0\n ? () => http.maxHeaderSize\n : () => { throw new InvalidArgumentError('http module not available or http.maxHeaderSize invalid') }\n\nconst noop = () => { }\n\nfunction getPipelining (client) {\n return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1\n}\n\n/**\n * @type {import('../../types/client.js').default}\n */\nclass Client extends DispatcherBase {\n /**\n *\n * @param {string|URL} url\n * @param {import('../../types/client.js').Client.Options} options\n */\n constructor (url, {\n maxHeaderSize,\n headersTimeout,\n socketTimeout,\n requestTimeout,\n connectTimeout,\n bodyTimeout,\n idleTimeout,\n keepAlive,\n keepAliveTimeout,\n maxKeepAliveTimeout,\n keepAliveMaxTimeout,\n keepAliveTimeoutThreshold,\n socketPath,\n pipelining,\n tls,\n strictContentLength,\n maxCachedSessions,\n connect,\n maxRequestsPerClient,\n localAddress,\n maxResponseSize,\n autoSelectFamily,\n autoSelectFamilyAttemptTimeout,\n // h2\n maxConcurrentStreams,\n allowH2,\n useH2c,\n initialWindowSize,\n connectionWindowSize,\n pingInterval\n } = {}) {\n if (keepAlive !== undefined) {\n throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')\n }\n\n if (socketTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead')\n }\n\n if (requestTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead')\n }\n\n if (idleTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead')\n }\n\n if (maxKeepAliveTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead')\n }\n\n if (maxHeaderSize != null) {\n if (!Number.isInteger(maxHeaderSize) || maxHeaderSize < 1) {\n throw new InvalidArgumentError('invalid maxHeaderSize')\n }\n } else {\n // If maxHeaderSize is not provided, use the default value from the http module\n // or if that is not available, throw an error.\n maxHeaderSize = getDefaultNodeMaxHeaderSize()\n }\n\n if (socketPath != null && typeof socketPath !== 'string') {\n throw new InvalidArgumentError('invalid socketPath')\n }\n\n if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) {\n throw new InvalidArgumentError('invalid connectTimeout')\n }\n\n if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) {\n throw new InvalidArgumentError('invalid keepAliveTimeout')\n }\n\n if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) {\n throw new InvalidArgumentError('invalid keepAliveMaxTimeout')\n }\n\n if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) {\n throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold')\n }\n\n if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) {\n throw new InvalidArgumentError('headersTimeout must be a positive integer or zero')\n }\n\n if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) {\n throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) {\n throw new InvalidArgumentError('maxRequestsPerClient must be a positive number')\n }\n\n if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) {\n throw new InvalidArgumentError('localAddress must be valid string IP address')\n }\n\n if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) {\n throw new InvalidArgumentError('maxResponseSize must be a positive number')\n }\n\n if (\n autoSelectFamilyAttemptTimeout != null &&\n (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)\n ) {\n throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number')\n }\n\n // h2\n if (allowH2 != null && typeof allowH2 !== 'boolean') {\n throw new InvalidArgumentError('allowH2 must be a valid boolean value')\n }\n\n if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) {\n throw new InvalidArgumentError('maxConcurrentStreams must be a positive integer, greater than 0')\n }\n\n if (useH2c != null && typeof useH2c !== 'boolean') {\n throw new InvalidArgumentError('useH2c must be a valid boolean value')\n }\n\n if (initialWindowSize != null && (!Number.isInteger(initialWindowSize) || initialWindowSize < 1)) {\n throw new InvalidArgumentError('initialWindowSize must be a positive integer, greater than 0')\n }\n\n if (connectionWindowSize != null && (!Number.isInteger(connectionWindowSize) || connectionWindowSize < 1)) {\n throw new InvalidArgumentError('connectionWindowSize must be a positive integer, greater than 0')\n }\n\n if (pingInterval != null && (typeof pingInterval !== 'number' || !Number.isInteger(pingInterval) || pingInterval < 0)) {\n throw new InvalidArgumentError('pingInterval must be a positive integer, greater or equal to 0')\n }\n\n super()\n\n if (typeof connect !== 'function') {\n connect = buildConnector({\n ...tls,\n maxCachedSessions,\n allowH2,\n useH2c,\n socketPath,\n timeout: connectTimeout,\n ...(typeof autoSelectFamily === 'boolean' ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),\n ...connect\n })\n } else if (socketPath != null) {\n const customConnect = connect\n connect = (opts, callback) => customConnect({ ...opts, socketPath }, callback)\n }\n\n this[kUrl] = util.parseOrigin(url)\n this[kConnector] = connect\n this[kPipelining] = pipelining != null ? pipelining : 1\n this[kMaxHeadersSize] = maxHeaderSize\n this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout\n this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout\n this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold\n this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]\n this[kServerName] = null\n this[kLocalAddress] = localAddress != null ? localAddress : null\n this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming\n this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming\n this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\\r\\n`\n this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3\n this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3\n this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength\n this[kMaxRequests] = maxRequestsPerClient\n this[kClosedResolve] = null\n this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1\n this[kHTTPContext] = null\n // h2\n this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server\n // HTTP/2 window sizes are set to higher defaults than Node.js core for better performance:\n // - initialWindowSize: 262144 (256KB) vs Node.js default 65535 (64KB - 1)\n // Allows more data to be sent before requiring acknowledgment, improving throughput\n // especially on high-latency networks. This matches common production HTTP/2 servers.\n // - connectionWindowSize: 524288 (512KB) vs Node.js default (none set)\n // Provides better flow control for the entire connection across multiple streams.\n this[kHTTP2InitialWindowSize] = initialWindowSize != null ? initialWindowSize : 262144\n this[kHTTP2ConnectionWindowSize] = connectionWindowSize != null ? connectionWindowSize : 524288\n this[kPingInterval] = pingInterval != null ? pingInterval : 60e3 // Default ping interval for h2 - 1 minute\n\n // kQueue is built up of 3 sections separated by\n // the kRunningIdx and kPendingIdx indices.\n // | complete | running | pending |\n // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length\n // kRunningIdx points to the first running element.\n // kPendingIdx points to the first pending element.\n // This implements a fast queue with an amortized\n // time of O(1).\n\n this[kQueue] = []\n this[kRunningIdx] = 0\n this[kPendingIdx] = 0\n\n this[kResume] = (sync) => resume(this, sync)\n this[kOnError] = (err) => onError(this, err)\n }\n\n get pipelining () {\n return this[kPipelining]\n }\n\n set pipelining (value) {\n this[kPipelining] = value\n this[kResume](true)\n }\n\n get stats () {\n return new ClientStats(this)\n }\n\n get [kPending] () {\n return this[kQueue].length - this[kPendingIdx]\n }\n\n get [kRunning] () {\n return this[kPendingIdx] - this[kRunningIdx]\n }\n\n get [kSize] () {\n return this[kQueue].length - this[kRunningIdx]\n }\n\n get [kConnected] () {\n return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed\n }\n\n get [kBusy] () {\n return Boolean(\n this[kHTTPContext]?.busy(null) ||\n (this[kSize] >= (getPipelining(this) || 1)) ||\n this[kPending] > 0\n )\n }\n\n [kConnect] (cb) {\n connect(this)\n this.once('connect', cb)\n }\n\n [kDispatch] (opts, handler) {\n const request = new Request(this[kUrl].origin, opts, handler)\n\n this[kQueue].push(request)\n if (this[kResuming]) {\n // Do nothing.\n } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) {\n // Wait a tick in case stream/iterator is ended in the same tick.\n this[kResuming] = 1\n queueMicrotask(() => resume(this))\n } else {\n this[kResume](true)\n }\n\n if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) {\n this[kNeedDrain] = 2\n }\n\n return this[kNeedDrain] < 2\n }\n\n [kClose] () {\n // TODO: for H2 we need to gracefully flush the remaining enqueued\n // request and close each stream.\n return new Promise((resolve) => {\n if (this[kSize]) {\n this[kClosedResolve] = resolve\n } else {\n resolve(null)\n }\n })\n }\n\n [kDestroy] (err) {\n return new Promise((resolve) => {\n const requests = this[kQueue].splice(this[kPendingIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n util.errorRequest(this, request, err)\n }\n\n const callback = () => {\n if (this[kClosedResolve]) {\n // TODO (fix): Should we error here with ClientDestroyedError?\n this[kClosedResolve]()\n this[kClosedResolve] = null\n }\n resolve(null)\n }\n\n if (this[kHTTPContext]) {\n this[kHTTPContext].destroy(err, callback)\n this[kHTTPContext] = null\n } else {\n queueMicrotask(callback)\n }\n\n this[kResume]()\n })\n }\n}\n\nfunction onError (client, err) {\n if (\n client[kRunning] === 0 &&\n err.code !== 'UND_ERR_INFO' &&\n err.code !== 'UND_ERR_SOCKET'\n ) {\n // Error is not caused by running request and not a recoverable\n // socket error.\n\n assert(client[kPendingIdx] === client[kRunningIdx])\n\n const requests = client[kQueue].splice(client[kRunningIdx])\n\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n util.errorRequest(client, request, err)\n }\n assert(client[kSize] === 0)\n }\n}\n\n/**\n * @param {Client} client\n * @returns {void}\n */\nfunction connect (client) {\n assert(!client[kConnecting])\n assert(!client[kHTTPContext])\n\n let { host, hostname, protocol, port } = client[kUrl]\n\n // Resolve ipv6\n if (hostname[0] === '[') {\n const idx = hostname.indexOf(']')\n\n assert(idx !== -1)\n const ip = hostname.substring(1, idx)\n\n assert(net.isIPv6(ip))\n hostname = ip\n }\n\n client[kConnecting] = true\n\n if (channels.beforeConnect.hasSubscribers) {\n channels.beforeConnect.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n version: client[kHTTPContext]?.version,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector]\n })\n }\n\n try {\n client[kConnector]({\n host,\n hostname,\n protocol,\n port,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n }, (err, socket) => {\n if (err) {\n handleConnectError(client, err, { host, hostname, protocol, port })\n client[kResume]()\n return\n }\n\n if (client.destroyed) {\n util.destroy(socket.on('error', noop), new ClientDestroyedError())\n client[kResume]()\n return\n }\n\n assert(socket)\n\n try {\n client[kHTTPContext] = socket.alpnProtocol === 'h2'\n ? connectH2(client, socket)\n : connectH1(client, socket)\n } catch (err) {\n socket.destroy().on('error', noop)\n handleConnectError(client, err, { host, hostname, protocol, port })\n client[kResume]()\n return\n }\n\n client[kConnecting] = false\n\n socket[kCounter] = 0\n socket[kMaxRequests] = client[kMaxRequests]\n socket[kClient] = client\n socket[kError] = null\n\n if (channels.connected.hasSubscribers) {\n channels.connected.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n version: client[kHTTPContext]?.version,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector],\n socket\n })\n }\n\n client.emit('connect', client[kUrl], [client])\n client[kResume]()\n })\n } catch (err) {\n handleConnectError(client, err, { host, hostname, protocol, port })\n client[kResume]()\n }\n}\n\nfunction handleConnectError (client, err, { host, hostname, protocol, port }) {\n if (client.destroyed) {\n return\n }\n\n client[kConnecting] = false\n\n if (channels.connectError.hasSubscribers) {\n channels.connectError.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n version: client[kHTTPContext]?.version,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector],\n error: err\n })\n }\n\n if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {\n assert(client[kRunning] === 0)\n while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {\n const request = client[kQueue][client[kPendingIdx]++]\n util.errorRequest(client, request, err)\n }\n } else {\n onError(client, err)\n }\n\n client.emit('connectionError', client[kUrl], [client], err)\n}\n\nfunction emitDrain (client) {\n client[kNeedDrain] = 0\n client.emit('drain', client[kUrl], [client])\n}\n\nfunction resume (client, sync) {\n if (client[kResuming] === 2) {\n return\n }\n\n client[kResuming] = 2\n\n _resume(client, sync)\n client[kResuming] = 0\n\n if (client[kRunningIdx] > 256) {\n client[kQueue].splice(0, client[kRunningIdx])\n client[kPendingIdx] -= client[kRunningIdx]\n client[kRunningIdx] = 0\n }\n}\n\nfunction _resume (client, sync) {\n while (true) {\n if (client.destroyed) {\n assert(client[kPending] === 0)\n return\n }\n\n if (client[kClosedResolve] && !client[kSize]) {\n client[kClosedResolve]()\n client[kClosedResolve] = null\n return\n }\n\n if (client[kHTTPContext]) {\n client[kHTTPContext].resume()\n }\n\n if (client[kBusy]) {\n client[kNeedDrain] = 2\n } else if (client[kNeedDrain] === 2) {\n if (sync) {\n client[kNeedDrain] = 1\n queueMicrotask(() => emitDrain(client))\n } else {\n emitDrain(client)\n }\n continue\n }\n\n if (client[kPending] === 0) {\n return\n }\n\n if (client[kRunning] >= (getPipelining(client) || 1)) {\n return\n }\n\n const request = client[kQueue][client[kPendingIdx]]\n\n if (request === null) {\n return\n }\n\n if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) {\n if (client[kRunning] > 0) {\n return\n }\n\n client[kServerName] = request.servername\n client[kHTTPContext]?.destroy(new InformationalError('servername changed'), () => {\n client[kHTTPContext] = null\n resume(client)\n })\n }\n\n if (client[kConnecting]) {\n return\n }\n\n if (!client[kHTTPContext]) {\n connect(client)\n return\n }\n\n if (client[kHTTPContext].destroyed) {\n return\n }\n\n if (client[kHTTPContext].busy(request)) {\n return\n }\n\n if (!request.aborted && client[kHTTPContext].write(request)) {\n client[kPendingIdx]++\n } else {\n client[kQueue].splice(client[kPendingIdx], 1)\n }\n }\n}\n\nmodule.exports = Client\n","'use strict'\n\nconst Dispatcher = require('./dispatcher')\nconst UnwrapHandler = require('../handler/unwrap-handler')\nconst {\n ClientDestroyedError,\n ClientClosedError,\n InvalidArgumentError\n} = require('../core/errors')\nconst { kDestroy, kClose, kClosed, kDestroyed, kDispatch } = require('../core/symbols')\n\nconst kOnDestroyed = Symbol('onDestroyed')\nconst kOnClosed = Symbol('onClosed')\n\nclass DispatcherBase extends Dispatcher {\n /** @type {boolean} */\n [kDestroyed] = false;\n\n /** @type {Array|null} */\n [kOnClosed] = null\n\n /** @returns {boolean} */\n get destroyed () {\n return this[kDestroyed]\n }\n\n /** @returns {boolean} */\n get closed () {\n return this[kClosed]\n }\n\n close (callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n this.close((err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (this[kDestroyed]) {\n const err = new ClientDestroyedError()\n queueMicrotask(() => callback(err, null))\n return\n }\n\n if (this[kClosed]) {\n if (this[kOnClosed]) {\n this[kOnClosed].push(callback)\n } else {\n queueMicrotask(() => callback(null, null))\n }\n return\n }\n\n this[kClosed] = true\n this[kOnClosed] ??= []\n this[kOnClosed].push(callback)\n\n const onClosed = () => {\n const callbacks = this[kOnClosed]\n this[kOnClosed] = null\n for (let i = 0; i < callbacks.length; i++) {\n callbacks[i](null, null)\n }\n }\n\n // Should not error.\n this[kClose]()\n .then(() => this.destroy())\n .then(() => queueMicrotask(onClosed))\n }\n\n destroy (err, callback) {\n if (typeof err === 'function') {\n callback = err\n err = null\n }\n\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n this.destroy(err, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (this[kDestroyed]) {\n if (this[kOnDestroyed]) {\n this[kOnDestroyed].push(callback)\n } else {\n queueMicrotask(() => callback(null, null))\n }\n return\n }\n\n if (!err) {\n err = new ClientDestroyedError()\n }\n\n this[kDestroyed] = true\n this[kOnDestroyed] ??= []\n this[kOnDestroyed].push(callback)\n\n const onDestroyed = () => {\n const callbacks = this[kOnDestroyed]\n this[kOnDestroyed] = null\n for (let i = 0; i < callbacks.length; i++) {\n callbacks[i](null, null)\n }\n }\n\n // Should not error.\n this[kDestroy](err)\n .then(() => queueMicrotask(onDestroyed))\n }\n\n dispatch (opts, handler) {\n if (!handler || typeof handler !== 'object') {\n throw new InvalidArgumentError('handler must be an object')\n }\n\n handler = UnwrapHandler.unwrap(handler)\n\n try {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('opts must be an object.')\n }\n\n if (this[kDestroyed] || this[kOnDestroyed]) {\n throw new ClientDestroyedError()\n }\n\n if (this[kClosed]) {\n throw new ClientClosedError()\n }\n\n return this[kDispatch](opts, handler)\n } catch (err) {\n if (typeof handler.onError !== 'function') {\n throw err\n }\n\n handler.onError(err)\n\n return false\n }\n }\n}\n\nmodule.exports = DispatcherBase\n","'use strict'\nconst EventEmitter = require('node:events')\nconst WrapHandler = require('../handler/wrap-handler')\n\nconst wrapInterceptor = (dispatch) => (opts, handler) => dispatch(opts, WrapHandler.wrap(handler))\n\nclass Dispatcher extends EventEmitter {\n dispatch () {\n throw new Error('not implemented')\n }\n\n close () {\n throw new Error('not implemented')\n }\n\n destroy () {\n throw new Error('not implemented')\n }\n\n compose (...args) {\n // So we handle [interceptor1, interceptor2] or interceptor1, interceptor2, ...\n const interceptors = Array.isArray(args[0]) ? args[0] : args\n let dispatch = this.dispatch.bind(this)\n\n for (const interceptor of interceptors) {\n if (interceptor == null) {\n continue\n }\n\n if (typeof interceptor !== 'function') {\n throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`)\n }\n\n dispatch = interceptor(dispatch)\n dispatch = wrapInterceptor(dispatch)\n\n if (dispatch == null || typeof dispatch !== 'function' || dispatch.length !== 2) {\n throw new TypeError('invalid interceptor')\n }\n }\n\n return new Proxy(this, {\n get: (target, key) => key === 'dispatch' ? dispatch : target[key]\n })\n }\n}\n\nmodule.exports = Dispatcher\n","'use strict'\n\nconst DispatcherBase = require('./dispatcher-base')\nconst { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require('../core/symbols')\nconst ProxyAgent = require('./proxy-agent')\nconst Agent = require('./agent')\n\nconst DEFAULT_PORTS = {\n 'http:': 80,\n 'https:': 443\n}\n\nclass EnvHttpProxyAgent extends DispatcherBase {\n #noProxyValue = null\n #noProxyEntries = null\n #opts = null\n\n constructor (opts = {}) {\n super()\n this.#opts = opts\n\n const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts\n\n this[kNoProxyAgent] = new Agent(agentOpts)\n\n const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY\n if (HTTP_PROXY) {\n this[kHttpProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTP_PROXY })\n } else {\n this[kHttpProxyAgent] = this[kNoProxyAgent]\n }\n\n const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY\n if (HTTPS_PROXY) {\n this[kHttpsProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTPS_PROXY })\n } else {\n this[kHttpsProxyAgent] = this[kHttpProxyAgent]\n }\n\n this.#parseNoProxy()\n }\n\n [kDispatch] (opts, handler) {\n const url = new URL(opts.origin)\n const agent = this.#getProxyAgentForUrl(url)\n return agent.dispatch(opts, handler)\n }\n\n [kClose] () {\n return Promise.all([\n this[kNoProxyAgent].close(),\n !this[kHttpProxyAgent][kClosed] && this[kHttpProxyAgent].close(),\n !this[kHttpsProxyAgent][kClosed] && this[kHttpsProxyAgent].close()\n ])\n }\n\n [kDestroy] (err) {\n return Promise.all([\n this[kNoProxyAgent].destroy(err),\n !this[kHttpProxyAgent][kDestroyed] && this[kHttpProxyAgent].destroy(err),\n !this[kHttpsProxyAgent][kDestroyed] && this[kHttpsProxyAgent].destroy(err)\n ])\n }\n\n #getProxyAgentForUrl (url) {\n let { protocol, host: hostname, port } = url\n\n // Stripping ports in this way instead of using parsedUrl.hostname to make\n // sure that the brackets around IPv6 addresses are kept.\n hostname = hostname.replace(/:\\d*$/, '').toLowerCase()\n port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0\n if (!this.#shouldProxy(hostname, port)) {\n return this[kNoProxyAgent]\n }\n if (protocol === 'https:') {\n return this[kHttpsProxyAgent]\n }\n return this[kHttpProxyAgent]\n }\n\n #shouldProxy (hostname, port) {\n if (this.#noProxyChanged) {\n this.#parseNoProxy()\n }\n\n if (this.#noProxyEntries.length === 0) {\n return true // Always proxy if NO_PROXY is not set or empty.\n }\n if (this.#noProxyValue === '*') {\n return false // Never proxy if wildcard is set.\n }\n\n for (let i = 0; i < this.#noProxyEntries.length; i++) {\n const entry = this.#noProxyEntries[i]\n if (entry.port && entry.port !== port) {\n continue // Skip if ports don't match.\n }\n // Don't proxy if the hostname is equal with the no_proxy host.\n if (hostname === entry.hostname) {\n return false\n }\n // Don't proxy if the hostname is the subdomain of the no_proxy host.\n // Reference - https://github.com/denoland/deno/blob/6fbce91e40cc07fc6da74068e5cc56fdd40f7b4c/ext/fetch/proxy.rs#L485\n if (hostname.slice(-(entry.hostname.length + 1)) === `.${entry.hostname}`) {\n return false\n }\n }\n\n return true\n }\n\n #parseNoProxy () {\n const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv\n const noProxySplit = noProxyValue.split(/[,\\s]/)\n const noProxyEntries = []\n\n for (let i = 0; i < noProxySplit.length; i++) {\n const entry = noProxySplit[i]\n if (!entry) {\n continue\n }\n const parsed = entry.match(/^(.+):(\\d+)$/)\n noProxyEntries.push({\n // strip leading dot or asterisk with dot\n hostname: (parsed ? parsed[1] : entry).replace(/^\\*?\\./, '').toLowerCase(),\n port: parsed ? Number.parseInt(parsed[2], 10) : 0\n })\n }\n\n this.#noProxyValue = noProxyValue\n this.#noProxyEntries = noProxyEntries\n }\n\n get #noProxyChanged () {\n if (this.#opts.noProxy !== undefined) {\n return false\n }\n return this.#noProxyValue !== this.#noProxyEnv\n }\n\n get #noProxyEnv () {\n return process.env.no_proxy ?? process.env.NO_PROXY ?? ''\n }\n}\n\nmodule.exports = EnvHttpProxyAgent\n","'use strict'\n\n// Extracted from node/lib/internal/fixed_queue.js\n\n// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two.\nconst kSize = 2048\nconst kMask = kSize - 1\n\n// The FixedQueue is implemented as a singly-linked list of fixed-size\n// circular buffers. It looks something like this:\n//\n// head tail\n// | |\n// v v\n// +-----------+ <-----\\ +-----------+ <------\\ +-----------+\n// | [null] | \\----- | next | \\------- | next |\n// +-----------+ +-----------+ +-----------+\n// | item | <-- bottom | item | <-- bottom | undefined |\n// | item | | item | | undefined |\n// | item | | item | | undefined |\n// | item | | item | | undefined |\n// | item | | item | bottom --> | item |\n// | item | | item | | item |\n// | ... | | ... | | ... |\n// | item | | item | | item |\n// | item | | item | | item |\n// | undefined | <-- top | item | | item |\n// | undefined | | item | | item |\n// | undefined | | undefined | <-- top top --> | undefined |\n// +-----------+ +-----------+ +-----------+\n//\n// Or, if there is only one circular buffer, it looks something\n// like either of these:\n//\n// head tail head tail\n// | | | |\n// v v v v\n// +-----------+ +-----------+\n// | [null] | | [null] |\n// +-----------+ +-----------+\n// | undefined | | item |\n// | undefined | | item |\n// | item | <-- bottom top --> | undefined |\n// | item | | undefined |\n// | undefined | <-- top bottom --> | item |\n// | undefined | | item |\n// +-----------+ +-----------+\n//\n// Adding a value means moving `top` forward by one, removing means\n// moving `bottom` forward by one. After reaching the end, the queue\n// wraps around.\n//\n// When `top === bottom` the current queue is empty and when\n// `top + 1 === bottom` it's full. This wastes a single space of storage\n// but allows much quicker checks.\n\n/**\n * @type {FixedCircularBuffer}\n * @template T\n */\nclass FixedCircularBuffer {\n /** @type {number} */\n bottom = 0\n /** @type {number} */\n top = 0\n /** @type {Array} */\n list = new Array(kSize).fill(undefined)\n /** @type {T|null} */\n next = null\n\n /** @returns {boolean} */\n isEmpty () {\n return this.top === this.bottom\n }\n\n /** @returns {boolean} */\n isFull () {\n return ((this.top + 1) & kMask) === this.bottom\n }\n\n /**\n * @param {T} data\n * @returns {void}\n */\n push (data) {\n this.list[this.top] = data\n this.top = (this.top + 1) & kMask\n }\n\n /** @returns {T|null} */\n shift () {\n const nextItem = this.list[this.bottom]\n if (nextItem === undefined) { return null }\n this.list[this.bottom] = undefined\n this.bottom = (this.bottom + 1) & kMask\n return nextItem\n }\n}\n\n/**\n * @template T\n */\nmodule.exports = class FixedQueue {\n constructor () {\n /** @type {FixedCircularBuffer} */\n this.head = this.tail = new FixedCircularBuffer()\n }\n\n /** @returns {boolean} */\n isEmpty () {\n return this.head.isEmpty()\n }\n\n /** @param {T} data */\n push (data) {\n if (this.head.isFull()) {\n // Head is full: Creates a new queue, sets the old queue's `.next` to it,\n // and sets it as the new main queue.\n this.head = this.head.next = new FixedCircularBuffer()\n }\n this.head.push(data)\n }\n\n /** @returns {T|null} */\n shift () {\n const tail = this.tail\n const next = tail.shift()\n if (tail.isEmpty() && tail.next !== null) {\n // If there is another queue, it forms the new tail.\n this.tail = tail.next\n tail.next = null\n }\n return next\n }\n}\n","'use strict'\n\nconst { InvalidArgumentError } = require('../core/errors')\nconst Client = require('./client')\n\nclass H2CClient extends Client {\n constructor (origin, clientOpts) {\n if (typeof origin === 'string') {\n origin = new URL(origin)\n }\n\n if (origin.protocol !== 'http:') {\n throw new InvalidArgumentError(\n 'h2c-client: Only h2c protocol is supported'\n )\n }\n\n const { connect, maxConcurrentStreams, pipelining, ...opts } =\n clientOpts ?? {}\n let defaultMaxConcurrentStreams = 100\n let defaultPipelining = 100\n\n if (\n maxConcurrentStreams != null &&\n Number.isInteger(maxConcurrentStreams) &&\n maxConcurrentStreams > 0\n ) {\n defaultMaxConcurrentStreams = maxConcurrentStreams\n }\n\n if (pipelining != null && Number.isInteger(pipelining) && pipelining > 0) {\n defaultPipelining = pipelining\n }\n\n if (defaultPipelining > defaultMaxConcurrentStreams) {\n throw new InvalidArgumentError(\n 'h2c-client: pipelining cannot be greater than maxConcurrentStreams'\n )\n }\n\n super(origin, {\n ...opts,\n maxConcurrentStreams: defaultMaxConcurrentStreams,\n pipelining: defaultPipelining,\n allowH2: true,\n useH2c: true\n })\n }\n}\n\nmodule.exports = H2CClient\n","'use strict'\n\nconst { PoolStats } = require('../util/stats.js')\nconst DispatcherBase = require('./dispatcher-base')\nconst FixedQueue = require('./fixed-queue')\nconst { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require('../core/symbols')\n\nconst kClients = Symbol('clients')\nconst kNeedDrain = Symbol('needDrain')\nconst kQueue = Symbol('queue')\nconst kClosedResolve = Symbol('closed resolve')\nconst kOnDrain = Symbol('onDrain')\nconst kOnConnect = Symbol('onConnect')\nconst kOnDisconnect = Symbol('onDisconnect')\nconst kOnConnectionError = Symbol('onConnectionError')\nconst kGetDispatcher = Symbol('get dispatcher')\nconst kAddClient = Symbol('add client')\nconst kRemoveClient = Symbol('remove client')\n\nclass PoolBase extends DispatcherBase {\n [kQueue] = new FixedQueue();\n\n [kQueued] = 0;\n\n [kClients] = [];\n\n [kNeedDrain] = false;\n\n [kOnDrain] (client, origin, targets) {\n const queue = this[kQueue]\n\n let needDrain = false\n\n while (!needDrain) {\n const item = queue.shift()\n if (!item) {\n break\n }\n this[kQueued]--\n needDrain = !client.dispatch(item.opts, item.handler)\n }\n\n client[kNeedDrain] = needDrain\n\n if (!needDrain && this[kNeedDrain]) {\n this[kNeedDrain] = false\n this.emit('drain', origin, [this, ...targets])\n }\n\n if (this[kClosedResolve] && queue.isEmpty()) {\n const closeAll = []\n for (let i = 0; i < this[kClients].length; i++) {\n const client = this[kClients][i]\n if (!client.destroyed) {\n closeAll.push(client.close())\n }\n }\n return Promise.all(closeAll)\n .then(this[kClosedResolve])\n }\n }\n\n [kOnConnect] = (origin, targets) => {\n this.emit('connect', origin, [this, ...targets])\n };\n\n [kOnDisconnect] = (origin, targets, err) => {\n this.emit('disconnect', origin, [this, ...targets], err)\n };\n\n [kOnConnectionError] = (origin, targets, err) => {\n this.emit('connectionError', origin, [this, ...targets], err)\n }\n\n get [kBusy] () {\n return this[kNeedDrain]\n }\n\n get [kConnected] () {\n let ret = 0\n for (const { [kConnected]: connected } of this[kClients]) {\n ret += connected\n }\n return ret\n }\n\n get [kFree] () {\n let ret = 0\n for (const { [kConnected]: connected, [kNeedDrain]: needDrain } of this[kClients]) {\n ret += connected && !needDrain\n }\n return ret\n }\n\n get [kPending] () {\n let ret = this[kQueued]\n for (const { [kPending]: pending } of this[kClients]) {\n ret += pending\n }\n return ret\n }\n\n get [kRunning] () {\n let ret = 0\n for (const { [kRunning]: running } of this[kClients]) {\n ret += running\n }\n return ret\n }\n\n get [kSize] () {\n let ret = this[kQueued]\n for (const { [kSize]: size } of this[kClients]) {\n ret += size\n }\n return ret\n }\n\n get stats () {\n return new PoolStats(this)\n }\n\n [kClose] () {\n if (this[kQueue].isEmpty()) {\n const closeAll = []\n for (let i = 0; i < this[kClients].length; i++) {\n const client = this[kClients][i]\n if (!client.destroyed) {\n closeAll.push(client.close())\n }\n }\n return Promise.all(closeAll)\n } else {\n return new Promise((resolve) => {\n this[kClosedResolve] = resolve\n })\n }\n }\n\n [kDestroy] (err) {\n while (true) {\n const item = this[kQueue].shift()\n if (!item) {\n break\n }\n item.handler.onError(err)\n }\n\n const destroyAll = new Array(this[kClients].length)\n for (let i = 0; i < this[kClients].length; i++) {\n destroyAll[i] = this[kClients][i].destroy(err)\n }\n return Promise.all(destroyAll)\n }\n\n [kDispatch] (opts, handler) {\n const dispatcher = this[kGetDispatcher]()\n\n if (!dispatcher) {\n this[kNeedDrain] = true\n this[kQueue].push({ opts, handler })\n this[kQueued]++\n } else if (!dispatcher.dispatch(opts, handler)) {\n dispatcher[kNeedDrain] = true\n this[kNeedDrain] = !this[kGetDispatcher]()\n }\n\n return !this[kNeedDrain]\n }\n\n [kAddClient] (client) {\n client\n .on('drain', this[kOnDrain].bind(this, client))\n .on('connect', this[kOnConnect])\n .on('disconnect', this[kOnDisconnect])\n .on('connectionError', this[kOnConnectionError])\n\n this[kClients].push(client)\n\n if (this[kNeedDrain]) {\n queueMicrotask(() => {\n if (this[kNeedDrain]) {\n this[kOnDrain](client, client[kUrl], [client, this])\n }\n })\n }\n\n return this\n }\n\n [kRemoveClient] (client) {\n client.close(() => {\n const idx = this[kClients].indexOf(client)\n if (idx !== -1) {\n this[kClients].splice(idx, 1)\n }\n })\n\n this[kNeedDrain] = this[kClients].some(dispatcher => (\n !dispatcher[kNeedDrain] &&\n dispatcher.closed !== true &&\n dispatcher.destroyed !== true\n ))\n }\n}\n\nmodule.exports = {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kRemoveClient,\n kGetDispatcher\n}\n","'use strict'\n\nconst {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kGetDispatcher,\n kRemoveClient\n} = require('./pool-base')\nconst Client = require('./client')\nconst {\n InvalidArgumentError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { kUrl } = require('../core/symbols')\nconst buildConnector = require('../core/connect')\n\nconst kOptions = Symbol('options')\nconst kConnections = Symbol('connections')\nconst kFactory = Symbol('factory')\n\nfunction defaultFactory (origin, opts) {\n return new Client(origin, opts)\n}\n\nclass Pool extends PoolBase {\n constructor (origin, {\n connections,\n factory = defaultFactory,\n connect,\n connectTimeout,\n tls,\n maxCachedSessions,\n socketPath,\n autoSelectFamily,\n autoSelectFamilyAttemptTimeout,\n allowH2,\n clientTtl,\n ...options\n } = {}) {\n if (connections != null && (!Number.isFinite(connections) || connections < 0)) {\n throw new InvalidArgumentError('invalid connections')\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (typeof connect !== 'function') {\n connect = buildConnector({\n ...tls,\n maxCachedSessions,\n allowH2,\n socketPath,\n timeout: connectTimeout,\n ...(typeof autoSelectFamily === 'boolean' ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),\n ...connect\n })\n }\n\n super()\n\n this[kConnections] = connections || null\n this[kUrl] = util.parseOrigin(origin)\n this[kOptions] = { ...util.deepClone(options), connect, allowH2, clientTtl, socketPath }\n this[kOptions].interceptors = options.interceptors\n ? { ...options.interceptors }\n : undefined\n this[kFactory] = factory\n\n this.on('connect', (origin, targets) => {\n if (clientTtl != null && clientTtl > 0) {\n for (const target of targets) {\n Object.assign(target, { ttl: Date.now() })\n }\n }\n })\n\n this.on('connectionError', (origin, targets, error) => {\n // If a connection error occurs, we remove the client from the pool,\n // and emit a connectionError event. They will not be re-used.\n // Fixes https://github.com/nodejs/undici/issues/3895\n for (const target of targets) {\n // Do not use kRemoveClient here, as it will close the client,\n // but the client cannot be closed in this state.\n const idx = this[kClients].indexOf(target)\n if (idx !== -1) {\n this[kClients].splice(idx, 1)\n }\n }\n })\n }\n\n [kGetDispatcher] () {\n const clientTtlOption = this[kOptions].clientTtl\n for (const client of this[kClients]) {\n // check ttl of client and if it's stale, remove it from the pool\n if (clientTtlOption != null && clientTtlOption > 0 && client.ttl && ((Date.now() - client.ttl) > clientTtlOption)) {\n this[kRemoveClient](client)\n } else if (!client[kNeedDrain]) {\n return client\n }\n }\n\n if (!this[kConnections] || this[kClients].length < this[kConnections]) {\n const dispatcher = this[kFactory](this[kUrl], this[kOptions])\n this[kAddClient](dispatcher)\n return dispatcher\n }\n }\n}\n\nmodule.exports = Pool\n","'use strict'\n\nconst { kProxy, kClose, kDestroy, kDispatch } = require('../core/symbols')\nconst Agent = require('./agent')\nconst Pool = require('./pool')\nconst DispatcherBase = require('./dispatcher-base')\nconst { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require('../core/errors')\nconst buildConnector = require('../core/connect')\nconst Client = require('./client')\nconst { channels } = require('../core/diagnostics')\nconst Socks5ProxyAgent = require('./socks5-proxy-agent')\n\nconst kAgent = Symbol('proxy agent')\nconst kClient = Symbol('proxy client')\nconst kProxyHeaders = Symbol('proxy headers')\nconst kRequestTls = Symbol('request tls settings')\nconst kProxyTls = Symbol('proxy tls settings')\nconst kConnectEndpoint = Symbol('connect endpoint function')\nconst kTunnelProxy = Symbol('tunnel proxy')\n\nfunction defaultProtocolPort (protocol) {\n return protocol === 'https:' ? 443 : 80\n}\n\nfunction defaultFactory (origin, opts) {\n return new Pool(origin, opts)\n}\n\nconst noop = () => {}\n\nfunction defaultAgentFactory (origin, opts) {\n if (opts.connections === 1) {\n return new Client(origin, opts)\n }\n return new Pool(origin, opts)\n}\n\nclass Http1ProxyWrapper extends DispatcherBase {\n #client\n\n constructor (proxyUrl, { headers = {}, connect, factory }) {\n if (!proxyUrl) {\n throw new InvalidArgumentError('Proxy URL is mandatory')\n }\n\n super()\n\n this[kProxyHeaders] = headers\n if (factory) {\n this.#client = factory(proxyUrl, { connect })\n } else {\n this.#client = new Client(proxyUrl, { connect })\n }\n }\n\n [kDispatch] (opts, handler) {\n const onHeaders = handler.onHeaders\n handler.onHeaders = function (statusCode, data, resume) {\n if (statusCode === 407) {\n if (typeof handler.onError === 'function') {\n handler.onError(new InvalidArgumentError('Proxy Authentication Required (407)'))\n }\n return\n }\n if (onHeaders) onHeaders.call(this, statusCode, data, resume)\n }\n\n // Rewrite request as an HTTP1 Proxy request, without tunneling.\n const {\n origin,\n path = '/',\n headers = {}\n } = opts\n\n opts.path = origin + path\n\n if (!('host' in headers) && !('Host' in headers)) {\n const { host } = new URL(origin)\n headers.host = host\n }\n opts.headers = { ...this[kProxyHeaders], ...headers }\n\n return this.#client[kDispatch](opts, handler)\n }\n\n [kClose] () {\n return this.#client.close()\n }\n\n [kDestroy] (err) {\n return this.#client.destroy(err)\n }\n}\n\nclass ProxyAgent extends DispatcherBase {\n constructor (opts) {\n if (!opts || (typeof opts === 'object' && !(opts instanceof URL) && !opts.uri)) {\n throw new InvalidArgumentError('Proxy uri is mandatory')\n }\n\n const { clientFactory = defaultFactory } = opts\n if (typeof clientFactory !== 'function') {\n throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.')\n }\n\n const { proxyTunnel = true } = opts\n\n super()\n\n const url = this.#getUrl(opts)\n const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url\n\n this[kProxy] = { uri: href, protocol }\n this[kRequestTls] = opts.requestTls\n this[kProxyTls] = opts.proxyTls\n this[kProxyHeaders] = opts.headers || {}\n this[kTunnelProxy] = proxyTunnel\n\n if (opts.auth && opts.token) {\n throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token')\n } else if (opts.auth) {\n /* @deprecated in favour of opts.token */\n this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}`\n } else if (opts.token) {\n this[kProxyHeaders]['proxy-authorization'] = opts.token\n } else if (username && password) {\n this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}`\n }\n\n const connect = buildConnector({ ...opts.proxyTls })\n this[kConnectEndpoint] = buildConnector({ ...opts.requestTls })\n\n const agentFactory = opts.factory || defaultAgentFactory\n const factory = (origin, options) => {\n const { protocol } = new URL(origin)\n\n // Handle SOCKS5 proxy\n if (this[kProxy].protocol === 'socks5:' || this[kProxy].protocol === 'socks:') {\n return new Socks5ProxyAgent(this[kProxy].uri, {\n headers: this[kProxyHeaders],\n connect,\n factory: agentFactory,\n username: opts.username || username,\n password: opts.password || password,\n proxyTls: opts.proxyTls\n })\n }\n\n if (!this[kTunnelProxy] && protocol === 'http:' && this[kProxy].protocol === 'http:') {\n return new Http1ProxyWrapper(this[kProxy].uri, {\n headers: this[kProxyHeaders],\n connect,\n factory: agentFactory\n })\n }\n return agentFactory(origin, options)\n }\n\n // For SOCKS5 proxies, we don't need a client to the proxy itself\n // The SOCKS5 connection is handled within Socks5ProxyAgent\n if (protocol === 'socks5:' || protocol === 'socks:') {\n this[kClient] = null\n } else {\n this[kClient] = clientFactory(url, { connect })\n }\n\n this[kAgent] = new Agent({\n ...opts,\n factory,\n connect: async (opts, callback) => {\n // SOCKS5 proxies handle their own connections via Socks5ProxyAgent,\n // so this connect function should never be called for them.\n if (!this[kClient]) {\n callback(new InvalidArgumentError('Cannot establish tunnel connection without a proxy client'))\n return\n }\n\n let requestedPath = opts.host\n if (!opts.port) {\n requestedPath += `:${defaultProtocolPort(opts.protocol)}`\n }\n try {\n const connectParams = {\n origin,\n port,\n path: requestedPath,\n signal: opts.signal,\n headers: {\n ...this[kProxyHeaders],\n host: opts.host,\n ...(opts.connections == null || opts.connections > 0 ? { 'proxy-connection': 'keep-alive' } : {})\n },\n servername: this[kProxyTls]?.servername || proxyHostname\n }\n const { socket, statusCode } = await this[kClient].connect(connectParams)\n if (statusCode !== 200) {\n socket.on('error', noop).destroy()\n callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`))\n return\n }\n\n if (channels.proxyConnected.hasSubscribers) {\n channels.proxyConnected.publish({\n socket,\n connectParams\n })\n }\n\n if (opts.protocol !== 'https:') {\n callback(null, socket)\n return\n }\n let servername\n if (this[kRequestTls]) {\n servername = this[kRequestTls].servername\n } else {\n servername = opts.servername\n }\n this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback)\n } catch (err) {\n if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {\n // Throw a custom error to avoid loop in client.js#connect\n callback(new SecureProxyConnectionError(err))\n } else {\n callback(err)\n }\n }\n }\n })\n }\n\n dispatch (opts, handler) {\n const headers = buildHeaders(opts.headers)\n throwIfProxyAuthIsSent(headers)\n\n if (headers && !('host' in headers) && !('Host' in headers)) {\n const { host } = new URL(opts.origin)\n headers.host = host\n }\n\n return this[kAgent].dispatch(\n {\n ...opts,\n headers\n },\n handler\n )\n }\n\n /**\n * @param {import('../../types/proxy-agent').ProxyAgent.Options | string | URL} opts\n * @returns {URL}\n */\n #getUrl (opts) {\n if (typeof opts === 'string') {\n return new URL(opts)\n } else if (opts instanceof URL) {\n return opts\n } else {\n return new URL(opts.uri)\n }\n }\n\n [kClose] () {\n const promises = [this[kAgent].close()]\n if (this[kClient]) {\n promises.push(this[kClient].close())\n }\n return Promise.all(promises)\n }\n\n [kDestroy] () {\n const promises = [this[kAgent].destroy()]\n if (this[kClient]) {\n promises.push(this[kClient].destroy())\n }\n return Promise.all(promises)\n }\n}\n\n/**\n * @param {string[] | Record} headers\n * @returns {Record}\n */\nfunction buildHeaders (headers) {\n // When using undici.fetch, the headers list is stored\n // as an array.\n if (Array.isArray(headers)) {\n /** @type {Record} */\n const headersPair = {}\n\n for (let i = 0; i < headers.length; i += 2) {\n headersPair[headers[i]] = headers[i + 1]\n }\n\n return headersPair\n }\n\n return headers\n}\n\n/**\n * @param {Record} headers\n *\n * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers\n * Nevertheless, it was changed and to avoid a security vulnerability by end users\n * this check was created.\n * It should be removed in the next major version for performance reasons\n */\nfunction throwIfProxyAuthIsSent (headers) {\n const existProxyAuth = headers && Object.keys(headers)\n .find((key) => key.toLowerCase() === 'proxy-authorization')\n if (existProxyAuth) {\n throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor')\n }\n}\n\nmodule.exports = ProxyAgent\n","'use strict'\n\nconst Dispatcher = require('./dispatcher')\nconst RetryHandler = require('../handler/retry-handler')\n\nclass RetryAgent extends Dispatcher {\n #agent = null\n #options = null\n constructor (agent, options = {}) {\n super(options)\n this.#agent = agent\n this.#options = options\n }\n\n dispatch (opts, handler) {\n const retry = new RetryHandler({\n ...opts,\n retryOptions: this.#options\n }, {\n dispatch: this.#agent.dispatch.bind(this.#agent),\n handler\n })\n return this.#agent.dispatch(opts, retry)\n }\n\n close () {\n return this.#agent.close()\n }\n\n destroy () {\n return this.#agent.destroy()\n }\n}\n\nmodule.exports = RetryAgent\n","'use strict'\n\nconst {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kGetDispatcher,\n kRemoveClient\n} = require('./pool-base')\nconst Client = require('./client')\nconst {\n InvalidArgumentError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { kUrl } = require('../core/symbols')\nconst buildConnector = require('../core/connect')\n\nconst kOptions = Symbol('options')\nconst kConnections = Symbol('connections')\nconst kFactory = Symbol('factory')\nconst kIndex = Symbol('index')\n\nfunction defaultFactory (origin, opts) {\n return new Client(origin, opts)\n}\n\nclass RoundRobinPool extends PoolBase {\n constructor (origin, {\n connections,\n factory = defaultFactory,\n connect,\n connectTimeout,\n tls,\n maxCachedSessions,\n socketPath,\n autoSelectFamily,\n autoSelectFamilyAttemptTimeout,\n allowH2,\n clientTtl,\n ...options\n } = {}) {\n if (connections != null && (!Number.isFinite(connections) || connections < 0)) {\n throw new InvalidArgumentError('invalid connections')\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (typeof connect !== 'function') {\n connect = buildConnector({\n ...tls,\n maxCachedSessions,\n allowH2,\n socketPath,\n timeout: connectTimeout,\n ...(typeof autoSelectFamily === 'boolean' ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),\n ...connect\n })\n }\n\n super()\n\n this[kConnections] = connections || null\n this[kUrl] = util.parseOrigin(origin)\n this[kOptions] = { ...util.deepClone(options), connect, allowH2, clientTtl, socketPath }\n this[kOptions].interceptors = options.interceptors\n ? { ...options.interceptors }\n : undefined\n this[kFactory] = factory\n this[kIndex] = -1\n\n this.on('connect', (origin, targets) => {\n if (clientTtl != null && clientTtl > 0) {\n for (const target of targets) {\n Object.assign(target, { ttl: Date.now() })\n }\n }\n })\n\n this.on('connectionError', (origin, targets, error) => {\n for (const target of targets) {\n const idx = this[kClients].indexOf(target)\n if (idx !== -1) {\n this[kClients].splice(idx, 1)\n }\n }\n })\n }\n\n [kGetDispatcher] () {\n const clientTtlOption = this[kOptions].clientTtl\n const clientsLength = this[kClients].length\n\n // If we have no clients yet, create one\n if (clientsLength === 0) {\n const dispatcher = this[kFactory](this[kUrl], this[kOptions])\n this[kAddClient](dispatcher)\n return dispatcher\n }\n\n // Round-robin through existing clients\n let checked = 0\n while (checked < clientsLength) {\n this[kIndex] = (this[kIndex] + 1) % clientsLength\n const client = this[kClients][this[kIndex]]\n\n // Check if client is stale (TTL expired)\n if (clientTtlOption != null && clientTtlOption > 0 && client.ttl && ((Date.now() - client.ttl) > clientTtlOption)) {\n this[kRemoveClient](client)\n checked++\n continue\n }\n\n // Return client if it's not draining\n if (!client[kNeedDrain]) {\n return client\n }\n\n checked++\n }\n\n // All clients are busy, create a new one if we haven't reached the limit\n if (!this[kConnections] || clientsLength < this[kConnections]) {\n const dispatcher = this[kFactory](this[kUrl], this[kOptions])\n this[kAddClient](dispatcher)\n return dispatcher\n }\n }\n}\n\nmodule.exports = RoundRobinPool\n","'use strict'\n\nconst net = require('node:net')\nconst { URL } = require('node:url')\n\nlet tls // include tls conditionally since it is not always available\nconst DispatcherBase = require('./dispatcher-base')\nconst { InvalidArgumentError } = require('../core/errors')\nconst { Socks5Client } = require('../core/socks5-client')\nconst { kDispatch, kClose, kDestroy } = require('../core/symbols')\nconst Pool = require('./pool')\nconst buildConnector = require('../core/connect')\nconst { debuglog } = require('node:util')\n\nconst debug = debuglog('undici:socks5-proxy')\n\nconst kProxyUrl = Symbol('proxy url')\nconst kProxyHeaders = Symbol('proxy headers')\nconst kProxyAuth = Symbol('proxy auth')\nconst kPool = Symbol('pool')\nconst kConnector = Symbol('connector')\n\n// Static flag to ensure warning is only emitted once per process\nlet experimentalWarningEmitted = false\n\n/**\n * SOCKS5 proxy agent for dispatching requests through a SOCKS5 proxy\n */\nclass Socks5ProxyAgent extends DispatcherBase {\n constructor (proxyUrl, options = {}) {\n super()\n\n // Emit experimental warning only once\n if (!experimentalWarningEmitted) {\n process.emitWarning(\n 'SOCKS5 proxy support is experimental and subject to change',\n 'ExperimentalWarning'\n )\n experimentalWarningEmitted = true\n }\n\n if (!proxyUrl) {\n throw new InvalidArgumentError('Proxy URL is mandatory')\n }\n\n // Parse proxy URL\n const url = typeof proxyUrl === 'string' ? new URL(proxyUrl) : proxyUrl\n\n if (url.protocol !== 'socks5:' && url.protocol !== 'socks:') {\n throw new InvalidArgumentError('Proxy URL must use socks5:// or socks:// protocol')\n }\n\n this[kProxyUrl] = url\n this[kProxyHeaders] = options.headers || {}\n\n // Extract auth from URL or options\n this[kProxyAuth] = {\n username: options.username || (url.username ? decodeURIComponent(url.username) : null),\n password: options.password || (url.password ? decodeURIComponent(url.password) : null)\n }\n\n // Create connector for proxy connection\n this[kConnector] = options.connect || buildConnector({\n ...options.proxyTls,\n servername: options.proxyTls?.servername || url.hostname\n })\n\n // Pool for the actual HTTP connections (with SOCKS5 tunnel connect function)\n this[kPool] = null\n }\n\n /**\n * Create a SOCKS5 connection to the proxy\n */\n async createSocks5Connection (targetHost, targetPort) {\n const proxyHost = this[kProxyUrl].hostname\n const proxyPort = parseInt(this[kProxyUrl].port) || 1080\n\n debug('creating SOCKS5 connection to', proxyHost, proxyPort)\n\n // Connect to the SOCKS5 proxy\n const socket = await new Promise((resolve, reject) => {\n const onConnect = () => {\n socket.removeListener('error', onError)\n resolve(socket)\n }\n\n const onError = (err) => {\n socket.removeListener('connect', onConnect)\n reject(err)\n }\n\n const socket = net.connect({\n host: proxyHost,\n port: proxyPort\n })\n\n socket.once('connect', onConnect)\n socket.once('error', onError)\n })\n\n // Create SOCKS5 client\n const socks5Client = new Socks5Client(socket, this[kProxyAuth])\n\n // Handle SOCKS5 errors\n socks5Client.on('error', (err) => {\n debug('SOCKS5 error:', err)\n socket.destroy()\n })\n\n // Perform SOCKS5 handshake\n await socks5Client.handshake()\n\n // Wait for authentication (if required)\n await new Promise((resolve, reject) => {\n const timeout = setTimeout(() => {\n reject(new Error('SOCKS5 authentication timeout'))\n }, 5000)\n\n const onAuthenticated = () => {\n clearTimeout(timeout)\n socks5Client.removeListener('error', onError)\n resolve()\n }\n\n const onError = (err) => {\n clearTimeout(timeout)\n socks5Client.removeListener('authenticated', onAuthenticated)\n reject(err)\n }\n\n // Check if already authenticated (for NO_AUTH method)\n if (socks5Client.state === 'authenticated') {\n clearTimeout(timeout)\n resolve()\n } else {\n socks5Client.once('authenticated', onAuthenticated)\n socks5Client.once('error', onError)\n }\n })\n\n // Send CONNECT command\n await socks5Client.connect(targetHost, targetPort)\n\n // Wait for connection\n await new Promise((resolve, reject) => {\n const timeout = setTimeout(() => {\n reject(new Error('SOCKS5 connection timeout'))\n }, 5000)\n\n const onConnected = (info) => {\n debug('SOCKS5 tunnel established to', targetHost, targetPort, 'via', info)\n clearTimeout(timeout)\n socks5Client.removeListener('error', onError)\n resolve()\n }\n\n const onError = (err) => {\n clearTimeout(timeout)\n socks5Client.removeListener('connected', onConnected)\n reject(err)\n }\n\n socks5Client.once('connected', onConnected)\n socks5Client.once('error', onError)\n })\n\n return socket\n }\n\n /**\n * Dispatch a request through the SOCKS5 proxy\n */\n async [kDispatch] (opts, handler) {\n const { origin } = opts\n\n debug('dispatching request to', origin, 'via SOCKS5')\n\n try {\n // Create Pool with custom connect function if we don't have one yet\n if (!this[kPool] || this[kPool].destroyed || this[kPool].closed) {\n this[kPool] = new Pool(origin, {\n pipelining: opts.pipelining,\n connections: opts.connections,\n connect: async (connectOpts, callback) => {\n try {\n const url = new URL(origin)\n const targetHost = url.hostname\n const targetPort = parseInt(url.port) || (url.protocol === 'https:' ? 443 : 80)\n\n debug('establishing SOCKS5 connection to', targetHost, targetPort)\n\n // Create SOCKS5 tunnel\n const socket = await this.createSocks5Connection(targetHost, targetPort)\n\n // Handle TLS if needed\n let finalSocket = socket\n if (url.protocol === 'https:') {\n if (!tls) {\n tls = require('node:tls')\n }\n debug('upgrading to TLS')\n finalSocket = tls.connect({\n socket,\n servername: targetHost,\n ...connectOpts.tls || {}\n })\n\n await new Promise((resolve, reject) => {\n finalSocket.once('secureConnect', resolve)\n finalSocket.once('error', reject)\n })\n }\n\n callback(null, finalSocket)\n } catch (err) {\n debug('SOCKS5 connection error:', err)\n callback(err)\n }\n }\n })\n }\n\n // Dispatch the request through the pool\n return this[kPool][kDispatch](opts, handler)\n } catch (err) {\n debug('dispatch error:', err)\n if (typeof handler.onError === 'function') {\n handler.onError(err)\n } else {\n throw err\n }\n }\n }\n\n async [kClose] () {\n if (this[kPool]) {\n await this[kPool].close()\n }\n }\n\n async [kDestroy] (err) {\n if (this[kPool]) {\n await this[kPool].destroy(err)\n }\n }\n}\n\nmodule.exports = Socks5ProxyAgent\n","'use strict'\n\nconst textDecoder = new TextDecoder()\n\n/**\n * @see https://encoding.spec.whatwg.org/#utf-8-decode\n * @param {Uint8Array} buffer\n */\nfunction utf8DecodeBytes (buffer) {\n if (buffer.length === 0) {\n return ''\n }\n\n // 1. Let buffer be the result of peeking three bytes from\n // ioQueue, converted to a byte sequence.\n\n // 2. If buffer is 0xEF 0xBB 0xBF, then read three\n // bytes from ioQueue. (Do nothing with those bytes.)\n if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) {\n buffer = buffer.subarray(3)\n }\n\n // 3. Process a queue with an instance of UTF-8’s\n // decoder, ioQueue, output, and \"replacement\".\n const output = textDecoder.decode(buffer)\n\n // 4. Return output.\n return output\n}\n\nmodule.exports = {\n utf8DecodeBytes\n}\n","'use strict'\n\n// We include a version number for the Dispatcher API. In case of breaking changes,\n// this version number must be increased to avoid conflicts.\nconst globalDispatcher = Symbol.for('undici.globalDispatcher.1')\nconst { InvalidArgumentError } = require('./core/errors')\nconst Agent = require('./dispatcher/agent')\n\nif (getGlobalDispatcher() === undefined) {\n setGlobalDispatcher(new Agent())\n}\n\nfunction setGlobalDispatcher (agent) {\n if (!agent || typeof agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument agent must implement Agent')\n }\n Object.defineProperty(globalThis, globalDispatcher, {\n value: agent,\n writable: true,\n enumerable: false,\n configurable: false\n })\n}\n\nfunction getGlobalDispatcher () {\n return globalThis[globalDispatcher]\n}\n\n// These are the globals that can be installed by undici.install().\n// Not exported by index.js to avoid use outside of this module.\nconst installedExports = /** @type {const} */ (\n [\n 'fetch',\n 'Headers',\n 'Response',\n 'Request',\n 'FormData',\n 'WebSocket',\n 'CloseEvent',\n 'ErrorEvent',\n 'MessageEvent',\n 'EventSource'\n ]\n)\n\nmodule.exports = {\n setGlobalDispatcher,\n getGlobalDispatcher,\n installedExports\n}\n","'use strict'\n\nconst util = require('../core/util')\nconst {\n parseCacheControlHeader,\n parseVaryHeader,\n isEtagUsable\n} = require('../util/cache')\nconst { parseHttpDate } = require('../util/date.js')\n\nfunction noop () {}\n\n// Status codes that we can use some heuristics on to cache\nconst HEURISTICALLY_CACHEABLE_STATUS_CODES = [\n 200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414, 501\n]\n\n// Status codes which semantic is not handled by the cache\n// https://datatracker.ietf.org/doc/html/rfc9111#section-3\n// This list should not grow beyond 206 unless the RFC is updated\n// by a newer one including more. Please introduce another list if\n// implementing caching of responses with the 'must-understand' directive.\nconst NOT_UNDERSTOOD_STATUS_CODES = [\n 206\n]\n\nconst MAX_RESPONSE_AGE = 2147483647000\n\n/**\n * @typedef {import('../../types/dispatcher.d.ts').default.DispatchHandler} DispatchHandler\n *\n * @implements {DispatchHandler}\n */\nclass CacheHandler {\n /**\n * @type {import('../../types/cache-interceptor.d.ts').default.CacheKey}\n */\n #cacheKey\n\n /**\n * @type {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions['type']}\n */\n #cacheType\n\n /**\n * @type {number | undefined}\n */\n #cacheByDefault\n\n /**\n * @type {import('../../types/cache-interceptor.d.ts').default.CacheStore}\n */\n #store\n\n /**\n * @type {import('../../types/dispatcher.d.ts').default.DispatchHandler}\n */\n #handler\n\n /**\n * @type {import('node:stream').Writable | undefined}\n */\n #writeStream\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} opts\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey\n * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler\n */\n constructor ({ store, type, cacheByDefault }, cacheKey, handler) {\n this.#store = store\n this.#cacheType = type\n this.#cacheByDefault = cacheByDefault\n this.#cacheKey = cacheKey\n this.#handler = handler\n }\n\n onRequestStart (controller, context) {\n this.#writeStream?.destroy()\n this.#writeStream = undefined\n this.#handler.onRequestStart?.(controller, context)\n }\n\n onRequestUpgrade (controller, statusCode, headers, socket) {\n this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket)\n }\n\n /**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller\n * @param {number} statusCode\n * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders\n * @param {string} statusMessage\n */\n onResponseStart (\n controller,\n statusCode,\n resHeaders,\n statusMessage\n ) {\n const downstreamOnHeaders = () =>\n this.#handler.onResponseStart?.(\n controller,\n statusCode,\n resHeaders,\n statusMessage\n )\n const handler = this\n\n if (\n !util.safeHTTPMethods.includes(this.#cacheKey.method) &&\n statusCode >= 200 &&\n statusCode <= 399\n ) {\n // Successful response to an unsafe method, delete it from cache\n // https://www.rfc-editor.org/rfc/rfc9111.html#name-invalidating-stored-response\n try {\n this.#store.delete(this.#cacheKey)?.catch?.(noop)\n } catch {\n // Fail silently\n }\n return downstreamOnHeaders()\n }\n\n const cacheControlHeader = resHeaders['cache-control']\n const heuristicallyCacheable = resHeaders['last-modified'] && HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode)\n if (\n !cacheControlHeader &&\n !resHeaders['expires'] &&\n !heuristicallyCacheable &&\n !this.#cacheByDefault\n ) {\n // Don't have anything to tell us this response is cachable and we're not\n // caching by default\n return downstreamOnHeaders()\n }\n\n const cacheControlDirectives = cacheControlHeader ? parseCacheControlHeader(cacheControlHeader) : {}\n if (!canCacheResponse(this.#cacheType, statusCode, resHeaders, cacheControlDirectives, this.#cacheKey.headers)) {\n return downstreamOnHeaders()\n }\n\n const now = Date.now()\n const resAge = resHeaders.age ? getAge(resHeaders.age) : undefined\n if (resAge && resAge >= MAX_RESPONSE_AGE) {\n // Response considered stale\n return downstreamOnHeaders()\n }\n\n const resDate = typeof resHeaders.date === 'string'\n ? parseHttpDate(resHeaders.date)\n : undefined\n\n const staleAt =\n determineStaleAt(this.#cacheType, now, resAge, resHeaders, resDate, cacheControlDirectives) ??\n this.#cacheByDefault\n if (staleAt === undefined || (resAge && resAge > staleAt)) {\n return downstreamOnHeaders()\n }\n\n const baseTime = resDate ? resDate.getTime() : now\n const absoluteStaleAt = staleAt + baseTime\n if (now >= absoluteStaleAt) {\n // Response is already stale\n return downstreamOnHeaders()\n }\n\n let varyDirectives\n if (this.#cacheKey.headers && resHeaders.vary) {\n varyDirectives = parseVaryHeader(resHeaders.vary, this.#cacheKey.headers)\n if (!varyDirectives) {\n // Parse error\n return downstreamOnHeaders()\n }\n }\n\n const deleteAt = determineDeleteAt(baseTime, cacheControlDirectives, absoluteStaleAt)\n const strippedHeaders = stripNecessaryHeaders(resHeaders, cacheControlDirectives)\n\n /**\n * @type {import('../../types/cache-interceptor.d.ts').default.CacheValue}\n */\n const value = {\n statusCode,\n statusMessage,\n headers: strippedHeaders,\n vary: varyDirectives,\n cacheControlDirectives,\n cachedAt: resAge ? now - resAge : now,\n staleAt: absoluteStaleAt,\n deleteAt\n }\n\n // Not modified, re-use the cached value\n // https://www.rfc-editor.org/rfc/rfc9111.html#name-handling-304-not-modified\n if (statusCode === 304) {\n const handle304 = (cachedValue) => {\n if (!cachedValue) {\n // Do not create a new cache entry, as a 304 won't have a body - so cannot be cached.\n return downstreamOnHeaders()\n }\n\n // Re-use the cached value: statuscode, statusmessage, headers and body\n value.statusCode = cachedValue.statusCode\n value.statusMessage = cachedValue.statusMessage\n value.etag = cachedValue.etag\n value.headers = { ...cachedValue.headers, ...strippedHeaders }\n\n downstreamOnHeaders()\n\n this.#writeStream = this.#store.createWriteStream(this.#cacheKey, value)\n\n if (!this.#writeStream || !cachedValue?.body) {\n return\n }\n\n if (typeof cachedValue.body.values === 'function') {\n const bodyIterator = cachedValue.body.values()\n\n const streamCachedBody = () => {\n for (const chunk of bodyIterator) {\n const full = this.#writeStream.write(chunk) === false\n this.#handler.onResponseData?.(controller, chunk)\n // when stream is full stop writing until we get a 'drain' event\n if (full) {\n break\n }\n }\n }\n\n this.#writeStream\n .on('error', function () {\n handler.#writeStream = undefined\n handler.#store.delete(handler.#cacheKey)\n })\n .on('drain', () => {\n streamCachedBody()\n })\n .on('close', function () {\n if (handler.#writeStream === this) {\n handler.#writeStream = undefined\n }\n })\n\n streamCachedBody()\n } else if (typeof cachedValue.body.on === 'function') {\n // Readable stream body (e.g. from async/remote cache stores)\n cachedValue.body\n .on('data', (chunk) => {\n this.#writeStream.write(chunk)\n this.#handler.onResponseData?.(controller, chunk)\n })\n .on('end', () => {\n this.#writeStream.end()\n })\n .on('error', () => {\n this.#writeStream = undefined\n this.#store.delete(this.#cacheKey)\n })\n\n this.#writeStream\n .on('error', function () {\n handler.#writeStream = undefined\n handler.#store.delete(handler.#cacheKey)\n })\n .on('close', function () {\n if (handler.#writeStream === this) {\n handler.#writeStream = undefined\n }\n })\n }\n }\n\n /**\n * @type {import('../../types/cache-interceptor.d.ts').default.CacheValue}\n */\n const result = this.#store.get(this.#cacheKey)\n if (result && typeof result.then === 'function') {\n result.then(handle304)\n } else {\n handle304(result)\n }\n } else {\n if (typeof resHeaders.etag === 'string' && isEtagUsable(resHeaders.etag)) {\n value.etag = resHeaders.etag\n }\n\n this.#writeStream = this.#store.createWriteStream(this.#cacheKey, value)\n\n if (!this.#writeStream) {\n return downstreamOnHeaders()\n }\n\n this.#writeStream\n .on('drain', () => controller.resume())\n .on('error', function () {\n // TODO (fix): Make error somehow observable?\n handler.#writeStream = undefined\n\n // Delete the value in case the cache store is holding onto state from\n // the call to createWriteStream\n handler.#store.delete(handler.#cacheKey)\n })\n .on('close', function () {\n if (handler.#writeStream === this) {\n handler.#writeStream = undefined\n }\n\n // TODO (fix): Should we resume even if was paused downstream?\n controller.resume()\n })\n\n downstreamOnHeaders()\n }\n }\n\n onResponseData (controller, chunk) {\n if (this.#writeStream?.write(chunk) === false) {\n controller.pause()\n }\n\n this.#handler.onResponseData?.(controller, chunk)\n }\n\n onResponseEnd (controller, trailers) {\n this.#writeStream?.end()\n this.#handler.onResponseEnd?.(controller, trailers)\n }\n\n onResponseError (controller, err) {\n this.#writeStream?.destroy(err)\n this.#writeStream = undefined\n this.#handler.onResponseError?.(controller, err)\n }\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-storing-responses-to-authen\n *\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions['type']} cacheType\n * @param {number} statusCode\n * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives\n * @param {import('../../types/header.d.ts').IncomingHttpHeaders} [reqHeaders]\n */\nfunction canCacheResponse (cacheType, statusCode, resHeaders, cacheControlDirectives, reqHeaders) {\n // Status code must be final and understood.\n if (statusCode < 200 || NOT_UNDERSTOOD_STATUS_CODES.includes(statusCode)) {\n return false\n }\n // Responses with neither status codes that are heuristically cacheable, nor \"explicit enough\" caching\n // directives, are not cacheable. \"Explicit enough\": see https://www.rfc-editor.org/rfc/rfc9111.html#section-3\n if (!HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode) && !resHeaders['expires'] &&\n !cacheControlDirectives.public &&\n cacheControlDirectives['max-age'] === undefined &&\n // RFC 9111: a private response directive, if the cache is not shared\n !(cacheControlDirectives.private && cacheType === 'private') &&\n !(cacheControlDirectives['s-maxage'] !== undefined && cacheType === 'shared')\n ) {\n return false\n }\n\n if (cacheControlDirectives['no-store']) {\n return false\n }\n\n if (cacheType === 'shared' && cacheControlDirectives.private === true) {\n return false\n }\n\n // https://www.rfc-editor.org/rfc/rfc9111.html#section-4.1-5\n if (resHeaders.vary?.includes('*')) {\n return false\n }\n\n // https://www.rfc-editor.org/rfc/rfc9111.html#name-storing-responses-to-authen\n if (reqHeaders?.authorization) {\n if (\n !cacheControlDirectives.public &&\n !cacheControlDirectives['s-maxage'] &&\n !cacheControlDirectives['must-revalidate']\n ) {\n return false\n }\n\n if (typeof reqHeaders.authorization !== 'string') {\n return false\n }\n\n if (\n Array.isArray(cacheControlDirectives['no-cache']) &&\n cacheControlDirectives['no-cache'].includes('authorization')\n ) {\n return false\n }\n\n if (\n Array.isArray(cacheControlDirectives['private']) &&\n cacheControlDirectives['private'].includes('authorization')\n ) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * @param {string | string[]} ageHeader\n * @returns {number | undefined}\n */\nfunction getAge (ageHeader) {\n const age = parseInt(Array.isArray(ageHeader) ? ageHeader[0] : ageHeader)\n\n return isNaN(age) ? undefined : age * 1000\n}\n\n/**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions['type']} cacheType\n * @param {number} now\n * @param {number | undefined} age\n * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders\n * @param {Date | undefined} responseDate\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives\n *\n * @returns {number | undefined} time that the value is stale at in seconds or undefined if it shouldn't be cached\n */\nfunction determineStaleAt (cacheType, now, age, resHeaders, responseDate, cacheControlDirectives) {\n if (cacheType === 'shared') {\n // Prioritize s-maxage since we're a shared cache\n // s-maxage > max-age > Expire\n // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.2.10-3\n const sMaxAge = cacheControlDirectives['s-maxage']\n if (sMaxAge !== undefined) {\n return sMaxAge > 0 ? sMaxAge * 1000 : undefined\n }\n }\n\n const maxAge = cacheControlDirectives['max-age']\n if (maxAge !== undefined) {\n return maxAge > 0 ? maxAge * 1000 : undefined\n }\n\n if (typeof resHeaders.expires === 'string') {\n // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.3\n const expiresDate = parseHttpDate(resHeaders.expires)\n if (expiresDate) {\n if (now >= expiresDate.getTime()) {\n return undefined\n }\n\n if (responseDate) {\n if (responseDate >= expiresDate) {\n return undefined\n }\n\n if (age !== undefined && age > (expiresDate - responseDate)) {\n return undefined\n }\n }\n\n return expiresDate.getTime() - now\n }\n }\n\n if (typeof resHeaders['last-modified'] === 'string') {\n // https://www.rfc-editor.org/rfc/rfc9111.html#name-calculating-heuristic-fresh\n const lastModified = new Date(resHeaders['last-modified'])\n if (isValidDate(lastModified)) {\n if (lastModified.getTime() >= now) {\n return undefined\n }\n\n const responseAge = now - lastModified.getTime()\n\n return responseAge * 0.1\n }\n }\n\n if (cacheControlDirectives.immutable) {\n // https://www.rfc-editor.org/rfc/rfc8246.html#section-2.2\n return 31536000\n }\n\n return undefined\n}\n\n/**\n * @param {number} now\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives\n * @param {number} staleAt\n */\nfunction determineDeleteAt (now, cacheControlDirectives, staleAt) {\n let staleWhileRevalidate = -Infinity\n let staleIfError = -Infinity\n let immutable = -Infinity\n\n if (cacheControlDirectives['stale-while-revalidate']) {\n staleWhileRevalidate = staleAt + (cacheControlDirectives['stale-while-revalidate'] * 1000)\n }\n\n if (cacheControlDirectives['stale-if-error']) {\n staleIfError = staleAt + (cacheControlDirectives['stale-if-error'] * 1000)\n }\n\n if (cacheControlDirectives.immutable && staleWhileRevalidate === -Infinity && staleIfError === -Infinity) {\n immutable = now + 31536000000\n }\n\n // When no stale directives or immutable flag, add a revalidation buffer\n // equal to the freshness lifetime so the entry survives past staleAt long\n // enough to be revalidated instead of silently disappearing.\n if (staleWhileRevalidate === -Infinity && staleIfError === -Infinity && immutable === -Infinity) {\n const freshnessLifetime = staleAt - now\n return staleAt + freshnessLifetime\n }\n\n return Math.max(staleAt, staleWhileRevalidate, staleIfError, immutable)\n}\n\n/**\n * Strips headers required to be removed in cached responses\n * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives\n * @returns {Record}\n */\nfunction stripNecessaryHeaders (resHeaders, cacheControlDirectives) {\n const headersToRemove = [\n 'connection',\n 'proxy-authenticate',\n 'proxy-authentication-info',\n 'proxy-authorization',\n 'proxy-connection',\n 'te',\n 'transfer-encoding',\n 'upgrade',\n // We'll add age back when serving it\n 'age'\n ]\n\n if (resHeaders['connection']) {\n if (Array.isArray(resHeaders['connection'])) {\n // connection: a\n // connection: b\n headersToRemove.push(...resHeaders['connection'].map(header => header.trim()))\n } else {\n // connection: a, b\n headersToRemove.push(...resHeaders['connection'].split(',').map(header => header.trim()))\n }\n }\n\n if (Array.isArray(cacheControlDirectives['no-cache'])) {\n headersToRemove.push(...cacheControlDirectives['no-cache'])\n }\n\n if (Array.isArray(cacheControlDirectives['private'])) {\n headersToRemove.push(...cacheControlDirectives['private'])\n }\n\n let strippedHeaders\n for (const headerName of headersToRemove) {\n if (resHeaders[headerName]) {\n strippedHeaders ??= { ...resHeaders }\n delete strippedHeaders[headerName]\n }\n }\n\n return strippedHeaders ?? resHeaders\n}\n\n/**\n * @param {Date} date\n * @returns {boolean}\n */\nfunction isValidDate (date) {\n return date instanceof Date && Number.isFinite(date.valueOf())\n}\n\nmodule.exports = CacheHandler\n","'use strict'\n\nconst assert = require('node:assert')\n\n/**\n * This takes care of revalidation requests we send to the origin. If we get\n * a response indicating that what we have is cached (via a HTTP 304), we can\n * continue using the cached value. Otherwise, we'll receive the new response\n * here, which we then just pass on to the next handler (most likely a\n * CacheHandler). Note that this assumes the proper headers were already\n * included in the request to tell the origin that we want to revalidate the\n * response (i.e. if-modified-since or if-none-match).\n *\n * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-validation\n *\n * @implements {import('../../types/dispatcher.d.ts').default.DispatchHandler}\n */\nclass CacheRevalidationHandler {\n #successful = false\n\n /**\n * @type {((boolean, any) => void) | null}\n */\n #callback\n\n /**\n * @type {(import('../../types/dispatcher.d.ts').default.DispatchHandler)}\n */\n #handler\n\n #context\n\n /**\n * @type {boolean}\n */\n #allowErrorStatusCodes\n\n /**\n * @param {(boolean) => void} callback Function to call if the cached value is valid\n * @param {import('../../types/dispatcher.d.ts').default.DispatchHandlers} handler\n * @param {boolean} allowErrorStatusCodes\n */\n constructor (callback, handler, allowErrorStatusCodes) {\n if (typeof callback !== 'function') {\n throw new TypeError('callback must be a function')\n }\n\n this.#callback = callback\n this.#handler = handler\n this.#allowErrorStatusCodes = allowErrorStatusCodes\n }\n\n onRequestStart (_, context) {\n this.#successful = false\n this.#context = context\n }\n\n onRequestUpgrade (controller, statusCode, headers, socket) {\n this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket)\n }\n\n onResponseStart (\n controller,\n statusCode,\n headers,\n statusMessage\n ) {\n assert(this.#callback != null)\n\n // https://www.rfc-editor.org/rfc/rfc9111.html#name-handling-a-validation-respo\n // https://datatracker.ietf.org/doc/html/rfc5861#section-4\n this.#successful = statusCode === 304 ||\n (this.#allowErrorStatusCodes && statusCode >= 500 && statusCode <= 504)\n this.#callback(this.#successful, this.#context)\n this.#callback = null\n\n if (this.#successful) {\n return true\n }\n\n this.#handler.onRequestStart?.(controller, this.#context)\n this.#handler.onResponseStart?.(\n controller,\n statusCode,\n headers,\n statusMessage\n )\n }\n\n onResponseData (controller, chunk) {\n if (this.#successful) {\n return\n }\n\n return this.#handler.onResponseData?.(controller, chunk)\n }\n\n onResponseEnd (controller, trailers) {\n if (this.#successful) {\n return\n }\n\n this.#handler.onResponseEnd?.(controller, trailers)\n }\n\n onResponseError (controller, err) {\n if (this.#successful) {\n return\n }\n\n if (this.#callback) {\n this.#callback(false)\n this.#callback = null\n }\n\n if (typeof this.#handler.onResponseError === 'function') {\n this.#handler.onResponseError(controller, err)\n } else {\n throw err\n }\n }\n}\n\nmodule.exports = CacheRevalidationHandler\n","'use strict'\n\nconst assert = require('node:assert')\nconst WrapHandler = require('./wrap-handler')\n\n/**\n * @deprecated\n */\nmodule.exports = class DecoratorHandler {\n #handler\n #onCompleteCalled = false\n #onErrorCalled = false\n #onResponseStartCalled = false\n\n constructor (handler) {\n if (typeof handler !== 'object' || handler === null) {\n throw new TypeError('handler must be an object')\n }\n this.#handler = WrapHandler.wrap(handler)\n }\n\n onRequestStart (...args) {\n this.#handler.onRequestStart?.(...args)\n }\n\n onRequestUpgrade (...args) {\n assert(!this.#onCompleteCalled)\n assert(!this.#onErrorCalled)\n\n return this.#handler.onRequestUpgrade?.(...args)\n }\n\n onResponseStart (...args) {\n assert(!this.#onCompleteCalled)\n assert(!this.#onErrorCalled)\n assert(!this.#onResponseStartCalled)\n\n this.#onResponseStartCalled = true\n\n return this.#handler.onResponseStart?.(...args)\n }\n\n onResponseData (...args) {\n assert(!this.#onCompleteCalled)\n assert(!this.#onErrorCalled)\n\n return this.#handler.onResponseData?.(...args)\n }\n\n onResponseEnd (...args) {\n assert(!this.#onCompleteCalled)\n assert(!this.#onErrorCalled)\n\n this.#onCompleteCalled = true\n return this.#handler.onResponseEnd?.(...args)\n }\n\n onResponseError (...args) {\n this.#onErrorCalled = true\n return this.#handler.onResponseError?.(...args)\n }\n\n /**\n * @deprecated\n */\n onBodySent () {}\n}\n","'use strict'\n\nconst { RequestAbortedError } = require('../core/errors')\n\n/**\n * @typedef {import('../../types/dispatcher.d.ts').default.DispatchHandler} DispatchHandler\n */\n\nconst DEFAULT_MAX_BUFFER_SIZE = 5 * 1024 * 1024\n\n/**\n * @typedef {Object} WaitingHandler\n * @property {DispatchHandler} handler\n * @property {import('../../types/dispatcher.d.ts').default.DispatchController} controller\n * @property {Buffer[]} bufferedChunks\n * @property {number} bufferedBytes\n * @property {object | null} pendingTrailers\n * @property {boolean} done\n */\n\n/**\n * Handler that forwards response events to multiple waiting handlers.\n * Used for request deduplication.\n *\n * @implements {DispatchHandler}\n */\nclass DeduplicationHandler {\n /**\n * @type {DispatchHandler}\n */\n #primaryHandler\n\n /**\n * @type {WaitingHandler[]}\n */\n #waitingHandlers = []\n\n /**\n * @type {number}\n */\n #maxBufferSize = DEFAULT_MAX_BUFFER_SIZE\n\n /**\n * @type {number}\n */\n #statusCode = 0\n\n /**\n * @type {Record}\n */\n #headers = {}\n\n /**\n * @type {string}\n */\n #statusMessage = ''\n\n /**\n * @type {boolean}\n */\n #aborted = false\n\n /**\n * @type {boolean}\n */\n #responseStarted = false\n\n /**\n * @type {boolean}\n */\n #responseDataStarted = false\n\n /**\n * @type {boolean}\n */\n #completed = false\n\n /**\n * @type {import('../../types/dispatcher.d.ts').default.DispatchController | null}\n */\n #controller = null\n\n /**\n * @type {(() => void) | null}\n */\n #onComplete = null\n\n /**\n * @param {DispatchHandler} primaryHandler The primary handler\n * @param {() => void} onComplete Callback when request completes\n * @param {number} [maxBufferSize] Maximum paused buffer size per waiting handler\n */\n constructor (primaryHandler, onComplete, maxBufferSize = DEFAULT_MAX_BUFFER_SIZE) {\n this.#primaryHandler = primaryHandler\n this.#onComplete = onComplete\n this.#maxBufferSize = maxBufferSize\n }\n\n /**\n * Add a waiting handler that will receive response events.\n * Returns false if deduplication can no longer safely attach this handler.\n *\n * @param {DispatchHandler} handler\n * @returns {boolean}\n */\n addWaitingHandler (handler) {\n if (this.#completed || this.#responseDataStarted) {\n return false\n }\n\n const waitingHandler = this.#createWaitingHandler(handler)\n const waitingController = waitingHandler.controller\n\n try {\n handler.onRequestStart?.(waitingController, null)\n\n if (waitingController.aborted) {\n waitingHandler.done = true\n return true\n }\n\n if (this.#responseStarted) {\n handler.onResponseStart?.(\n waitingController,\n this.#statusCode,\n this.#headers,\n this.#statusMessage\n )\n }\n } catch {\n // Ignore errors from waiting handlers\n waitingHandler.done = true\n return true\n }\n\n if (!waitingController.aborted) {\n this.#waitingHandlers.push(waitingHandler)\n }\n\n return true\n }\n\n /**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller\n * @param {any} context\n */\n onRequestStart (controller, context) {\n this.#controller = controller\n this.#primaryHandler.onRequestStart?.(controller, context)\n }\n\n /**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller\n * @param {number} statusCode\n * @param {import('../../types/header.d.ts').IncomingHttpHeaders} headers\n * @param {Socket} socket\n */\n onRequestUpgrade (controller, statusCode, headers, socket) {\n this.#primaryHandler.onRequestUpgrade?.(controller, statusCode, headers, socket)\n }\n\n /**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller\n * @param {number} statusCode\n * @param {Record} headers\n * @param {string} statusMessage\n */\n onResponseStart (controller, statusCode, headers, statusMessage) {\n this.#responseStarted = true\n this.#statusCode = statusCode\n this.#headers = headers\n this.#statusMessage = statusMessage\n\n this.#primaryHandler.onResponseStart?.(controller, statusCode, headers, statusMessage)\n\n for (const waitingHandler of this.#waitingHandlers) {\n const { handler, controller: waitingController } = waitingHandler\n\n if (waitingHandler.done || waitingController.aborted) {\n waitingHandler.done = true\n continue\n }\n\n try {\n handler.onResponseStart?.(\n waitingController,\n statusCode,\n headers,\n statusMessage\n )\n } catch {\n // Ignore errors from waiting handlers\n }\n\n if (waitingController.aborted) {\n waitingHandler.done = true\n }\n }\n\n this.#pruneDoneWaitingHandlers()\n }\n\n /**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller\n * @param {Buffer} chunk\n */\n onResponseData (controller, chunk) {\n if (this.#aborted || this.#completed) {\n return\n }\n\n this.#responseDataStarted = true\n\n this.#primaryHandler.onResponseData?.(controller, chunk)\n\n for (const waitingHandler of this.#waitingHandlers) {\n const { handler, controller: waitingController } = waitingHandler\n\n if (waitingHandler.done || waitingController.aborted) {\n waitingHandler.done = true\n continue\n }\n\n if (waitingController.paused) {\n this.#bufferWaitingChunk(waitingHandler, chunk)\n continue\n }\n\n try {\n handler.onResponseData?.(waitingController, chunk)\n } catch {\n // Ignore errors from waiting handlers\n }\n\n if (waitingController.aborted) {\n waitingHandler.done = true\n waitingHandler.bufferedChunks = []\n waitingHandler.bufferedBytes = 0\n }\n }\n\n this.#pruneDoneWaitingHandlers()\n }\n\n /**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller\n * @param {object} trailers\n */\n onResponseEnd (controller, trailers) {\n if (this.#aborted || this.#completed) {\n return\n }\n\n this.#completed = true\n this.#primaryHandler.onResponseEnd?.(controller, trailers)\n\n for (const waitingHandler of this.#waitingHandlers) {\n if (waitingHandler.done || waitingHandler.controller.aborted) {\n waitingHandler.done = true\n continue\n }\n\n this.#flushWaitingHandler(waitingHandler)\n\n if (waitingHandler.done || waitingHandler.controller.aborted) {\n waitingHandler.done = true\n continue\n }\n\n if (waitingHandler.controller.paused && waitingHandler.bufferedChunks.length > 0) {\n waitingHandler.pendingTrailers = trailers\n continue\n }\n\n try {\n waitingHandler.handler.onResponseEnd?.(waitingHandler.controller, trailers)\n } catch {\n // Ignore errors from waiting handlers\n }\n\n waitingHandler.done = true\n }\n\n this.#pruneDoneWaitingHandlers()\n this.#onComplete?.()\n }\n\n /**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller\n * @param {Error} err\n */\n onResponseError (controller, err) {\n if (this.#completed) {\n return\n }\n\n this.#aborted = true\n this.#completed = true\n\n this.#primaryHandler.onResponseError?.(controller, err)\n\n for (const waitingHandler of this.#waitingHandlers) {\n this.#errorWaitingHandler(waitingHandler, err)\n }\n\n this.#waitingHandlers = []\n this.#onComplete?.()\n }\n\n /**\n * @param {DispatchHandler} handler\n * @returns {WaitingHandler}\n */\n #createWaitingHandler (handler) {\n /** @type {WaitingHandler} */\n const waitingHandler = {\n handler,\n controller: null,\n bufferedChunks: [],\n bufferedBytes: 0,\n pendingTrailers: null,\n done: false\n }\n\n const state = {\n aborted: false,\n paused: false,\n reason: null\n }\n\n waitingHandler.controller = {\n resume: () => {\n if (state.aborted) {\n return\n }\n\n state.paused = false\n this.#flushWaitingHandler(waitingHandler)\n\n if (\n this.#completed &&\n waitingHandler.pendingTrailers &&\n waitingHandler.bufferedChunks.length === 0 &&\n !state.paused &&\n !state.aborted\n ) {\n try {\n waitingHandler.handler.onResponseEnd?.(waitingHandler.controller, waitingHandler.pendingTrailers)\n } catch {\n // Ignore errors from waiting handlers\n }\n\n waitingHandler.pendingTrailers = null\n waitingHandler.done = true\n }\n\n this.#pruneDoneWaitingHandlers()\n },\n pause: () => {\n if (!state.aborted) {\n state.paused = true\n }\n },\n get paused () { return state.paused },\n get aborted () { return state.aborted },\n get reason () { return state.reason },\n abort: (reason) => {\n state.aborted = true\n state.reason = reason ?? null\n waitingHandler.done = true\n waitingHandler.pendingTrailers = null\n waitingHandler.bufferedChunks = []\n waitingHandler.bufferedBytes = 0\n }\n }\n\n return waitingHandler\n }\n\n /**\n * @param {WaitingHandler} waitingHandler\n * @param {Buffer} chunk\n */\n #bufferWaitingChunk (waitingHandler, chunk) {\n if (waitingHandler.done || waitingHandler.controller.aborted) {\n waitingHandler.done = true\n waitingHandler.bufferedChunks = []\n waitingHandler.bufferedBytes = 0\n return\n }\n\n const bufferedChunk = Buffer.from(chunk)\n waitingHandler.bufferedChunks.push(bufferedChunk)\n waitingHandler.bufferedBytes += bufferedChunk.length\n\n if (waitingHandler.bufferedBytes > this.#maxBufferSize) {\n const err = new RequestAbortedError(`Deduplicated waiting handler exceeded maxBufferSize (${this.#maxBufferSize} bytes) while paused`)\n this.#errorWaitingHandler(waitingHandler, err)\n }\n }\n\n /**\n * @param {WaitingHandler} waitingHandler\n */\n #flushWaitingHandler (waitingHandler) {\n const { handler, controller } = waitingHandler\n\n while (\n !waitingHandler.done &&\n !controller.aborted &&\n !controller.paused &&\n waitingHandler.bufferedChunks.length > 0\n ) {\n const bufferedChunk = waitingHandler.bufferedChunks.shift()\n waitingHandler.bufferedBytes -= bufferedChunk.length\n\n try {\n handler.onResponseData?.(controller, bufferedChunk)\n } catch {\n // Ignore errors from waiting handlers\n }\n\n if (controller.aborted) {\n waitingHandler.done = true\n waitingHandler.pendingTrailers = null\n waitingHandler.bufferedChunks = []\n waitingHandler.bufferedBytes = 0\n break\n }\n }\n }\n\n /**\n * @param {WaitingHandler} waitingHandler\n * @param {Error} err\n */\n #errorWaitingHandler (waitingHandler, err) {\n if (waitingHandler.done) {\n return\n }\n\n waitingHandler.done = true\n waitingHandler.pendingTrailers = null\n waitingHandler.bufferedChunks = []\n waitingHandler.bufferedBytes = 0\n\n try {\n waitingHandler.controller.abort(err)\n waitingHandler.handler.onResponseError?.(waitingHandler.controller, err)\n } catch {\n // Ignore errors from waiting handlers\n }\n }\n\n #pruneDoneWaitingHandlers () {\n this.#waitingHandlers = this.#waitingHandlers.filter(waitingHandler => waitingHandler.done === false)\n }\n}\n\nmodule.exports = DeduplicationHandler\n","'use strict'\n\nconst util = require('../core/util')\nconst { kBodyUsed } = require('../core/symbols')\nconst assert = require('node:assert')\nconst { InvalidArgumentError } = require('../core/errors')\nconst EE = require('node:events')\n\nconst redirectableStatusCodes = [300, 301, 302, 303, 307, 308]\n\nconst kBody = Symbol('body')\n\nconst noop = () => {}\n\nclass BodyAsyncIterable {\n constructor (body) {\n this[kBody] = body\n this[kBodyUsed] = false\n }\n\n async * [Symbol.asyncIterator] () {\n assert(!this[kBodyUsed], 'disturbed')\n this[kBodyUsed] = true\n yield * this[kBody]\n }\n}\n\nclass RedirectHandler {\n static buildDispatch (dispatcher, maxRedirections) {\n if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) {\n throw new InvalidArgumentError('maxRedirections must be a positive number')\n }\n\n const dispatch = dispatcher.dispatch.bind(dispatcher)\n return (opts, originalHandler) => dispatch(opts, new RedirectHandler(dispatch, maxRedirections, opts, originalHandler))\n }\n\n constructor (dispatch, maxRedirections, opts, handler) {\n if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) {\n throw new InvalidArgumentError('maxRedirections must be a positive number')\n }\n\n this.dispatch = dispatch\n this.location = null\n const { maxRedirections: _, ...cleanOpts } = opts\n this.opts = cleanOpts // opts must be a copy, exclude maxRedirections\n this.maxRedirections = maxRedirections\n this.handler = handler\n this.history = []\n\n if (util.isStream(this.opts.body)) {\n // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp\n // so that it can be dispatched again?\n // TODO (fix): Do we need 100-expect support to provide a way to do this properly?\n if (util.bodyLength(this.opts.body) === 0) {\n this.opts.body\n .on('data', function () {\n assert(false)\n })\n }\n\n if (typeof this.opts.body.readableDidRead !== 'boolean') {\n this.opts.body[kBodyUsed] = false\n EE.prototype.on.call(this.opts.body, 'data', function () {\n this[kBodyUsed] = true\n })\n }\n } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') {\n // TODO (fix): We can't access ReadableStream internal state\n // to determine whether or not it has been disturbed. This is just\n // a workaround.\n this.opts.body = new BodyAsyncIterable(this.opts.body)\n } else if (\n this.opts.body &&\n typeof this.opts.body !== 'string' &&\n !ArrayBuffer.isView(this.opts.body) &&\n util.isIterable(this.opts.body) &&\n !util.isFormDataLike(this.opts.body)\n ) {\n // TODO: Should we allow re-using iterable if !this.opts.idempotent\n // or through some other flag?\n this.opts.body = new BodyAsyncIterable(this.opts.body)\n }\n }\n\n onRequestStart (controller, context) {\n this.handler.onRequestStart?.(controller, { ...context, history: this.history })\n }\n\n onRequestUpgrade (controller, statusCode, headers, socket) {\n this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket)\n }\n\n onResponseStart (controller, statusCode, headers, statusMessage) {\n if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) {\n throw new Error('max redirects')\n }\n\n // https://tools.ietf.org/html/rfc7231#section-6.4.2\n // https://fetch.spec.whatwg.org/#http-redirect-fetch\n // In case of HTTP 301 or 302 with POST, change the method to GET\n if ((statusCode === 301 || statusCode === 302) && this.opts.method === 'POST') {\n this.opts.method = 'GET'\n if (util.isStream(this.opts.body)) {\n util.destroy(this.opts.body.on('error', noop))\n }\n this.opts.body = null\n }\n\n // https://tools.ietf.org/html/rfc7231#section-6.4.4\n // In case of HTTP 303, always replace method to be either HEAD or GET\n if (statusCode === 303 && this.opts.method !== 'HEAD') {\n this.opts.method = 'GET'\n if (util.isStream(this.opts.body)) {\n util.destroy(this.opts.body.on('error', noop))\n }\n this.opts.body = null\n }\n\n this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) || redirectableStatusCodes.indexOf(statusCode) === -1\n ? null\n : headers.location\n\n if (this.opts.origin) {\n this.history.push(new URL(this.opts.path, this.opts.origin))\n }\n\n if (!this.location) {\n this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage)\n return\n }\n\n const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)))\n const path = search ? `${pathname}${search}` : pathname\n\n // Check for redirect loops by seeing if we've already visited this URL in our history\n // This catches the case where Client/Pool try to handle cross-origin redirects but fail\n // and keep redirecting to the same URL in an infinite loop\n const redirectUrlString = `${origin}${path}`\n for (const historyUrl of this.history) {\n if (historyUrl.toString() === redirectUrlString) {\n throw new InvalidArgumentError(`Redirect loop detected. Cannot redirect to ${origin}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`)\n }\n }\n\n // Remove headers referring to the original URL.\n // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers.\n // https://tools.ietf.org/html/rfc7231#section-6.4\n this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin)\n this.opts.path = path\n this.opts.origin = origin\n this.opts.query = null\n }\n\n onResponseData (controller, chunk) {\n if (this.location) {\n /*\n https://tools.ietf.org/html/rfc7231#section-6.4\n\n TLDR: undici always ignores 3xx response bodies.\n\n Redirection is used to serve the requested resource from another URL, so it assumes that\n no body is generated (and thus can be ignored). Even though generating a body is not prohibited.\n\n For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually\n (which means it's optional and not mandated) contain just an hyperlink to the value of\n the Location response header, so the body can be ignored safely.\n\n For status 300, which is \"Multiple Choices\", the spec mentions both generating a Location\n response header AND a response body with the other possible location to follow.\n Since the spec explicitly chooses not to specify a format for such body and leave it to\n servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it.\n */\n } else {\n this.handler.onResponseData?.(controller, chunk)\n }\n }\n\n onResponseEnd (controller, trailers) {\n if (this.location) {\n /*\n https://tools.ietf.org/html/rfc7231#section-6.4\n\n TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections\n and neither are useful if present.\n\n See comment on onData method above for more detailed information.\n */\n this.dispatch(this.opts, this)\n } else {\n this.handler.onResponseEnd(controller, trailers)\n }\n }\n\n onResponseError (controller, error) {\n this.handler.onResponseError?.(controller, error)\n }\n}\n\n// https://tools.ietf.org/html/rfc7231#section-6.4.4\nfunction shouldRemoveHeader (header, removeContent, unknownOrigin) {\n if (header.length === 4) {\n return util.headerNameToString(header) === 'host'\n }\n if (removeContent && util.headerNameToString(header).startsWith('content-')) {\n return true\n }\n if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) {\n const name = util.headerNameToString(header)\n return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization'\n }\n return false\n}\n\n// https://tools.ietf.org/html/rfc7231#section-6.4\nfunction cleanRequestHeaders (headers, removeContent, unknownOrigin) {\n const ret = []\n if (Array.isArray(headers)) {\n for (let i = 0; i < headers.length; i += 2) {\n if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) {\n ret.push(headers[i], headers[i + 1])\n }\n }\n } else if (headers && typeof headers === 'object') {\n const entries = util.hasSafeIterator(headers) ? headers : Object.entries(headers)\n\n for (const [key, value] of entries) {\n if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) {\n ret.push(key, value)\n }\n }\n } else {\n assert(headers == null, 'headers must be an object or an array')\n }\n return ret\n}\n\nmodule.exports = RedirectHandler\n","'use strict'\nconst assert = require('node:assert')\n\nconst { kRetryHandlerDefaultRetry } = require('../core/symbols')\nconst { RequestRetryError } = require('../core/errors')\nconst WrapHandler = require('./wrap-handler')\nconst {\n isDisturbed,\n parseRangeHeader,\n wrapRequestBody\n} = require('../core/util')\n\nfunction calculateRetryAfterHeader (retryAfter) {\n const retryTime = new Date(retryAfter).getTime()\n return isNaN(retryTime) ? 0 : retryTime - Date.now()\n}\n\nclass RetryHandler {\n constructor (opts, { dispatch, handler }) {\n const { retryOptions, ...dispatchOpts } = opts\n const {\n // Retry scoped\n retry: retryFn,\n maxRetries,\n maxTimeout,\n minTimeout,\n timeoutFactor,\n // Response scoped\n methods,\n errorCodes,\n retryAfter,\n statusCodes,\n throwOnError\n } = retryOptions ?? {}\n\n this.error = null\n this.dispatch = dispatch\n this.handler = WrapHandler.wrap(handler)\n this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) }\n this.retryOpts = {\n throwOnError: throwOnError ?? true,\n retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry],\n retryAfter: retryAfter ?? true,\n maxTimeout: maxTimeout ?? 30 * 1000, // 30s,\n minTimeout: minTimeout ?? 500, // .5s\n timeoutFactor: timeoutFactor ?? 2,\n maxRetries: maxRetries ?? 5,\n // What errors we should retry\n methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'],\n // Indicates which errors to retry\n statusCodes: statusCodes ?? [500, 502, 503, 504, 429],\n // List of errors to retry\n errorCodes: errorCodes ?? [\n 'ECONNRESET',\n 'ECONNREFUSED',\n 'ENOTFOUND',\n 'ENETDOWN',\n 'ENETUNREACH',\n 'EHOSTDOWN',\n 'EHOSTUNREACH',\n 'EPIPE',\n 'UND_ERR_SOCKET'\n ]\n }\n\n this.retryCount = 0\n this.retryCountCheckpoint = 0\n this.headersSent = false\n this.start = 0\n this.end = null\n this.etag = null\n }\n\n onResponseStartWithRetry (controller, statusCode, headers, statusMessage, err) {\n if (this.retryOpts.throwOnError) {\n // Preserve old behavior for status codes that are not eligible for retry\n if (this.retryOpts.statusCodes.includes(statusCode) === false) {\n this.headersSent = true\n this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage)\n } else {\n this.error = err\n }\n\n return\n }\n\n if (isDisturbed(this.opts.body)) {\n this.headersSent = true\n this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage)\n return\n }\n\n function shouldRetry (passedErr) {\n if (passedErr) {\n this.headersSent = true\n this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage)\n controller.resume()\n return\n }\n\n this.error = err\n controller.resume()\n }\n\n controller.pause()\n this.retryOpts.retry(\n err,\n {\n state: { counter: this.retryCount },\n opts: { retryOptions: this.retryOpts, ...this.opts }\n },\n shouldRetry.bind(this)\n )\n }\n\n onRequestStart (controller, context) {\n if (!this.headersSent) {\n this.handler.onRequestStart?.(controller, context)\n }\n }\n\n onRequestUpgrade (controller, statusCode, headers, socket) {\n this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket)\n }\n\n static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) {\n const { statusCode, code, headers } = err\n const { method, retryOptions } = opts\n const {\n maxRetries,\n minTimeout,\n maxTimeout,\n timeoutFactor,\n statusCodes,\n errorCodes,\n methods\n } = retryOptions\n const { counter } = state\n\n // Any code that is not a Undici's originated and allowed to retry\n if (code && code !== 'UND_ERR_REQ_RETRY' && !errorCodes.includes(code)) {\n cb(err)\n return\n }\n\n // If a set of method are provided and the current method is not in the list\n if (Array.isArray(methods) && !methods.includes(method)) {\n cb(err)\n return\n }\n\n // If a set of status code are provided and the current status code is not in the list\n if (\n statusCode != null &&\n Array.isArray(statusCodes) &&\n !statusCodes.includes(statusCode)\n ) {\n cb(err)\n return\n }\n\n // If we reached the max number of retries\n if (counter > maxRetries) {\n cb(err)\n return\n }\n\n let retryAfterHeader = headers?.['retry-after']\n if (retryAfterHeader) {\n retryAfterHeader = Number(retryAfterHeader)\n retryAfterHeader = Number.isNaN(retryAfterHeader)\n ? calculateRetryAfterHeader(headers['retry-after'])\n : retryAfterHeader * 1e3 // Retry-After is in seconds\n }\n\n const retryTimeout =\n retryAfterHeader > 0\n ? Math.min(retryAfterHeader, maxTimeout)\n : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout)\n\n setTimeout(() => cb(null), retryTimeout)\n }\n\n onResponseStart (controller, statusCode, headers, statusMessage) {\n this.error = null\n this.retryCount += 1\n\n if (statusCode >= 300) {\n const err = new RequestRetryError('Request failed', statusCode, {\n headers,\n data: {\n count: this.retryCount\n }\n })\n\n this.onResponseStartWithRetry(controller, statusCode, headers, statusMessage, err)\n return\n }\n\n // Checkpoint for resume from where we left it\n if (this.headersSent) {\n // Only Partial Content 206 supposed to provide Content-Range,\n // any other status code that partially consumed the payload\n // should not be retried because it would result in downstream\n // wrongly concatenate multiple responses.\n if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) {\n throw new RequestRetryError('server does not support the range header and the payload was partially consumed', statusCode, {\n headers,\n data: { count: this.retryCount }\n })\n }\n\n const contentRange = parseRangeHeader(headers['content-range'])\n // If no content range\n if (!contentRange) {\n // We always throw here as we want to indicate that we entred unexpected path\n throw new RequestRetryError('Content-Range mismatch', statusCode, {\n headers,\n data: { count: this.retryCount }\n })\n }\n\n // Let's start with a weak etag check\n if (this.etag != null && this.etag !== headers.etag) {\n // We always throw here as we want to indicate that we entred unexpected path\n throw new RequestRetryError('ETag mismatch', statusCode, {\n headers,\n data: { count: this.retryCount }\n })\n }\n\n const { start, size, end = size ? size - 1 : null } = contentRange\n\n assert(this.start === start, 'content-range mismatch')\n assert(this.end == null || this.end === end, 'content-range mismatch')\n\n return\n }\n\n if (this.end == null) {\n if (statusCode === 206) {\n // First time we receive 206\n const range = parseRangeHeader(headers['content-range'])\n\n if (range == null) {\n this.headersSent = true\n this.handler.onResponseStart?.(\n controller,\n statusCode,\n headers,\n statusMessage\n )\n return\n }\n\n const { start, size, end = size ? size - 1 : null } = range\n assert(\n start != null && Number.isFinite(start),\n 'content-range mismatch'\n )\n assert(end != null && Number.isFinite(end), 'invalid content-length')\n\n this.start = start\n this.end = end\n }\n\n // We make our best to checkpoint the body for further range headers\n if (this.end == null) {\n const contentLength = headers['content-length']\n this.end = contentLength != null ? Number(contentLength) - 1 : null\n }\n\n assert(Number.isFinite(this.start))\n assert(\n this.end == null || Number.isFinite(this.end),\n 'invalid content-length'\n )\n\n this.resume = true\n this.etag = headers.etag != null ? headers.etag : null\n\n // Weak etags are not useful for comparison nor cache\n // for instance not safe to assume if the response is byte-per-byte\n // equal\n if (\n this.etag != null &&\n this.etag[0] === 'W' &&\n this.etag[1] === '/'\n ) {\n this.etag = null\n }\n\n this.headersSent = true\n this.handler.onResponseStart?.(\n controller,\n statusCode,\n headers,\n statusMessage\n )\n } else {\n throw new RequestRetryError('Request failed', statusCode, {\n headers,\n data: { count: this.retryCount }\n })\n }\n }\n\n onResponseData (controller, chunk) {\n if (this.error) {\n return\n }\n\n this.start += chunk.length\n\n this.handler.onResponseData?.(controller, chunk)\n }\n\n onResponseEnd (controller, trailers) {\n if (this.error && this.retryOpts.throwOnError) {\n throw this.error\n }\n\n if (!this.error) {\n this.retryCount = 0\n return this.handler.onResponseEnd?.(controller, trailers)\n }\n\n this.retry(controller)\n }\n\n retry (controller) {\n if (this.start !== 0) {\n const headers = { range: `bytes=${this.start}-${this.end ?? ''}` }\n\n // Weak etag check - weak etags will make comparison algorithms never match\n if (this.etag != null) {\n headers['if-match'] = this.etag\n }\n\n this.opts = {\n ...this.opts,\n headers: {\n ...this.opts.headers,\n ...headers\n }\n }\n }\n\n try {\n this.retryCountCheckpoint = this.retryCount\n this.dispatch(this.opts, this)\n } catch (err) {\n this.handler.onResponseError?.(controller, err)\n }\n }\n\n onResponseError (controller, err) {\n if (controller?.aborted || isDisturbed(this.opts.body)) {\n this.handler.onResponseError?.(controller, err)\n return\n }\n\n function shouldRetry (returnedErr) {\n if (!returnedErr) {\n this.retry(controller)\n return\n }\n\n this.handler?.onResponseError?.(controller, returnedErr)\n }\n\n // We reconcile in case of a mix between network errors\n // and server error response\n if (this.retryCount - this.retryCountCheckpoint > 0) {\n // We count the difference between the last checkpoint and the current retry count\n this.retryCount =\n this.retryCountCheckpoint +\n (this.retryCount - this.retryCountCheckpoint)\n } else {\n this.retryCount += 1\n }\n\n this.retryOpts.retry(\n err,\n {\n state: { counter: this.retryCount },\n opts: { retryOptions: this.retryOpts, ...this.opts }\n },\n shouldRetry.bind(this)\n )\n }\n}\n\nmodule.exports = RetryHandler\n","'use strict'\n\nconst { parseHeaders } = require('../core/util')\nconst { InvalidArgumentError } = require('../core/errors')\n\nconst kResume = Symbol('resume')\n\nclass UnwrapController {\n #paused = false\n #reason = null\n #aborted = false\n #abort\n\n [kResume] = null\n\n constructor (abort) {\n this.#abort = abort\n }\n\n pause () {\n this.#paused = true\n }\n\n resume () {\n if (this.#paused) {\n this.#paused = false\n this[kResume]?.()\n }\n }\n\n abort (reason) {\n if (!this.#aborted) {\n this.#aborted = true\n this.#reason = reason\n this.#abort(reason)\n }\n }\n\n get aborted () {\n return this.#aborted\n }\n\n get reason () {\n return this.#reason\n }\n\n get paused () {\n return this.#paused\n }\n}\n\nmodule.exports = class UnwrapHandler {\n #handler\n #controller\n\n constructor (handler) {\n this.#handler = handler\n }\n\n static unwrap (handler) {\n // TODO (fix): More checks...\n return !handler.onRequestStart ? handler : new UnwrapHandler(handler)\n }\n\n onConnect (abort, context) {\n this.#controller = new UnwrapController(abort)\n this.#handler.onRequestStart?.(this.#controller, context)\n }\n\n onResponseStarted () {\n return this.#handler.onResponseStarted?.()\n }\n\n onUpgrade (statusCode, rawHeaders, socket) {\n this.#handler.onRequestUpgrade?.(this.#controller, statusCode, parseHeaders(rawHeaders), socket)\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n this.#controller[kResume] = resume\n this.#handler.onResponseStart?.(this.#controller, statusCode, parseHeaders(rawHeaders), statusMessage)\n return !this.#controller.paused\n }\n\n onData (data) {\n this.#handler.onResponseData?.(this.#controller, data)\n return !this.#controller.paused\n }\n\n onComplete (rawTrailers) {\n this.#handler.onResponseEnd?.(this.#controller, parseHeaders(rawTrailers))\n }\n\n onError (err) {\n if (!this.#handler.onResponseError) {\n throw new InvalidArgumentError('invalid onError method')\n }\n\n this.#handler.onResponseError?.(this.#controller, err)\n }\n}\n","'use strict'\n\nconst { InvalidArgumentError } = require('../core/errors')\n\nmodule.exports = class WrapHandler {\n #handler\n\n constructor (handler) {\n this.#handler = handler\n }\n\n static wrap (handler) {\n // TODO (fix): More checks...\n return handler.onRequestStart ? handler : new WrapHandler(handler)\n }\n\n // Unwrap Interface\n\n onConnect (abort, context) {\n return this.#handler.onConnect?.(abort, context)\n }\n\n onResponseStarted () {\n return this.#handler.onResponseStarted?.()\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n return this.#handler.onHeaders?.(statusCode, rawHeaders, resume, statusMessage)\n }\n\n onUpgrade (statusCode, rawHeaders, socket) {\n return this.#handler.onUpgrade?.(statusCode, rawHeaders, socket)\n }\n\n onData (data) {\n return this.#handler.onData?.(data)\n }\n\n onComplete (trailers) {\n return this.#handler.onComplete?.(trailers)\n }\n\n onError (err) {\n if (!this.#handler.onError) {\n throw err\n }\n\n return this.#handler.onError?.(err)\n }\n\n // Wrap Interface\n\n onRequestStart (controller, context) {\n this.#handler.onConnect?.((reason) => controller.abort(reason), context)\n }\n\n onRequestUpgrade (controller, statusCode, headers, socket) {\n const rawHeaders = []\n for (const [key, val] of Object.entries(headers)) {\n rawHeaders.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val))\n }\n\n this.#handler.onUpgrade?.(statusCode, rawHeaders, socket)\n }\n\n onResponseStart (controller, statusCode, headers, statusMessage) {\n const rawHeaders = []\n for (const [key, val] of Object.entries(headers)) {\n rawHeaders.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val))\n }\n\n if (this.#handler.onHeaders?.(statusCode, rawHeaders, () => controller.resume(), statusMessage) === false) {\n controller.pause()\n }\n }\n\n onResponseData (controller, data) {\n if (this.#handler.onData?.(data) === false) {\n controller.pause()\n }\n }\n\n onResponseEnd (controller, trailers) {\n const rawTrailers = []\n for (const [key, val] of Object.entries(trailers)) {\n rawTrailers.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val))\n }\n\n this.#handler.onComplete?.(rawTrailers)\n }\n\n onResponseError (controller, err) {\n if (!this.#handler.onError) {\n throw new InvalidArgumentError('invalid onError method')\n }\n\n this.#handler.onError?.(err)\n }\n}\n\nfunction toRawHeaderValue (value) {\n return Array.isArray(value)\n ? value.map((item) => Buffer.from(item, 'latin1'))\n : Buffer.from(value, 'latin1')\n}\n","'use strict'\n\nconst assert = require('node:assert')\nconst { Readable } = require('node:stream')\nconst util = require('../core/util')\nconst CacheHandler = require('../handler/cache-handler')\nconst MemoryCacheStore = require('../cache/memory-cache-store')\nconst CacheRevalidationHandler = require('../handler/cache-revalidation-handler')\nconst { assertCacheStore, assertCacheMethods, makeCacheKey, normalizeHeaders, parseCacheControlHeader } = require('../util/cache.js')\nconst { AbortError } = require('../core/errors.js')\n\n/**\n * @param {(string | RegExp)[] | undefined} origins\n * @param {string} name\n */\nfunction assertCacheOrigins (origins, name) {\n if (origins === undefined) return\n if (!Array.isArray(origins)) {\n throw new TypeError(`expected ${name} to be an array or undefined, got ${typeof origins}`)\n }\n for (let i = 0; i < origins.length; i++) {\n const origin = origins[i]\n if (typeof origin !== 'string' && !(origin instanceof RegExp)) {\n throw new TypeError(`expected ${name}[${i}] to be a string or RegExp, got ${typeof origin}`)\n }\n }\n}\n\nconst nop = () => {}\n\n/**\n * @typedef {(options: import('../../types/dispatcher.d.ts').default.DispatchOptions, handler: import('../../types/dispatcher.d.ts').default.DispatchHandler) => void} DispatchFn\n */\n\n/**\n * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} cacheControlDirectives\n * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts\n * @returns {boolean}\n */\nfunction needsRevalidation (result, cacheControlDirectives, { headers = {} }) {\n // Always revalidate requests with the no-cache request directive.\n if (cacheControlDirectives?.['no-cache']) {\n return true\n }\n\n // Always revalidate requests with unqualified no-cache response directive.\n if (result.cacheControlDirectives?.['no-cache'] && !Array.isArray(result.cacheControlDirectives['no-cache'])) {\n return true\n }\n\n // Always revalidate requests with conditional headers.\n if (headers['if-modified-since'] || headers['if-none-match']) {\n return true\n }\n\n return false\n}\n\n/**\n * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} cacheControlDirectives\n * @returns {boolean}\n */\nfunction isStale (result, cacheControlDirectives) {\n const now = Date.now()\n if (now > result.staleAt) {\n // Response is stale\n if (cacheControlDirectives?.['max-stale']) {\n // There's a threshold where we can serve stale responses, let's see if\n // we're in it\n // https://www.rfc-editor.org/rfc/rfc9111.html#name-max-stale\n const gracePeriod = result.staleAt + (cacheControlDirectives['max-stale'] * 1000)\n return now > gracePeriod\n }\n\n return true\n }\n\n if (cacheControlDirectives?.['min-fresh']) {\n // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.1.3\n\n // At this point, staleAt is always > now\n const timeLeftTillStale = result.staleAt - now\n const threshold = cacheControlDirectives['min-fresh'] * 1000\n\n return timeLeftTillStale <= threshold\n }\n\n return false\n}\n\n/**\n * Check if we're within the stale-while-revalidate window for a stale response\n * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result\n * @returns {boolean}\n */\nfunction withinStaleWhileRevalidateWindow (result) {\n const staleWhileRevalidate = result.cacheControlDirectives?.['stale-while-revalidate']\n if (!staleWhileRevalidate) {\n return false\n }\n\n const now = Date.now()\n const staleWhileRevalidateExpiry = result.staleAt + (staleWhileRevalidate * 1000)\n return now <= staleWhileRevalidateExpiry\n}\n\n/**\n * @param {DispatchFn} dispatch\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} globalOpts\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey\n * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler\n * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} reqCacheControl\n */\nfunction handleUncachedResponse (\n dispatch,\n globalOpts,\n cacheKey,\n handler,\n opts,\n reqCacheControl\n) {\n if (reqCacheControl?.['only-if-cached']) {\n let aborted = false\n try {\n if (typeof handler.onConnect === 'function') {\n handler.onConnect(() => {\n aborted = true\n })\n\n if (aborted) {\n return\n }\n }\n\n if (typeof handler.onHeaders === 'function') {\n handler.onHeaders(504, [], nop, 'Gateway Timeout')\n if (aborted) {\n return\n }\n }\n\n if (typeof handler.onComplete === 'function') {\n handler.onComplete([])\n }\n } catch (err) {\n if (typeof handler.onError === 'function') {\n handler.onError(err)\n }\n }\n\n return true\n }\n\n return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler))\n}\n\n/**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler\n * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts\n * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result\n * @param {number} age\n * @param {any} context\n * @param {boolean} isStale\n */\nfunction sendCachedValue (handler, opts, result, age, context, isStale) {\n // TODO (perf): Readable.from path can be optimized...\n const stream = util.isStream(result.body)\n ? result.body\n : Readable.from(result.body ?? [])\n\n assert(!stream.destroyed, 'stream should not be destroyed')\n assert(!stream.readableDidRead, 'stream should not be readableDidRead')\n\n const controller = {\n resume () {\n stream.resume()\n },\n pause () {\n stream.pause()\n },\n get paused () {\n return stream.isPaused()\n },\n get aborted () {\n return stream.destroyed\n },\n get reason () {\n return stream.errored\n },\n abort (reason) {\n stream.destroy(reason ?? new AbortError())\n }\n }\n\n stream\n .on('error', function (err) {\n if (!this.readableEnded) {\n if (typeof handler.onResponseError === 'function') {\n handler.onResponseError(controller, err)\n } else {\n throw err\n }\n }\n })\n .on('close', function () {\n if (!this.errored) {\n handler.onResponseEnd?.(controller, {})\n }\n })\n\n handler.onRequestStart?.(controller, context)\n\n if (stream.destroyed) {\n return\n }\n\n // Add the age header\n // https://www.rfc-editor.org/rfc/rfc9111.html#name-age\n const headers = { ...result.headers, age: String(age) }\n\n if (isStale) {\n // Add warning header\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Warning\n headers.warning = '110 - \"response is stale\"'\n }\n\n handler.onResponseStart?.(controller, result.statusCode, headers, result.statusMessage)\n\n if (opts.method === 'HEAD') {\n stream.destroy()\n } else {\n stream.on('data', function (chunk) {\n handler.onResponseData?.(controller, chunk)\n })\n }\n}\n\n/**\n * @param {DispatchFn} dispatch\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} globalOpts\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey\n * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler\n * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} reqCacheControl\n * @param {import('../../types/cache-interceptor.d.ts').default.GetResult | undefined} result\n */\nfunction handleResult (\n dispatch,\n globalOpts,\n cacheKey,\n handler,\n opts,\n reqCacheControl,\n result\n) {\n if (!result) {\n return handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl)\n }\n\n const now = Date.now()\n if (now > result.deleteAt) {\n // Response is expired, cache store shouldn't have given this to us\n return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler))\n }\n\n const age = Math.round((now - result.cachedAt) / 1000)\n if (reqCacheControl?.['max-age'] && age >= reqCacheControl['max-age']) {\n // Response is considered expired for this specific request\n // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.1.1\n return dispatch(opts, handler)\n }\n\n const stale = isStale(result, reqCacheControl)\n const revalidate = needsRevalidation(result, reqCacheControl, opts)\n\n // Check if the response is stale\n if (stale || revalidate) {\n if (util.isStream(opts.body) && util.bodyLength(opts.body) !== 0) {\n // If body is a stream we can't revalidate...\n // TODO (fix): This could be less strict...\n return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler))\n }\n\n // RFC 5861: If we're within stale-while-revalidate window, serve stale immediately\n // and revalidate in background, unless immediate revalidation is necessary\n if (!revalidate && withinStaleWhileRevalidateWindow(result)) {\n // Serve stale response immediately\n sendCachedValue(handler, opts, result, age, null, true)\n\n // Start background revalidation (fire-and-forget)\n queueMicrotask(() => {\n const headers = {\n ...opts.headers,\n 'if-modified-since': new Date(result.cachedAt).toUTCString()\n }\n\n if (result.etag) {\n headers['if-none-match'] = result.etag\n }\n\n if (result.vary) {\n for (const key in result.vary) {\n if (result.vary[key] != null) {\n headers[key] = result.vary[key]\n }\n }\n }\n\n // Background revalidation - update cache if we get new data\n dispatch(\n {\n ...opts,\n headers\n },\n new CacheHandler(globalOpts, cacheKey, {\n // Silent handler that just updates the cache\n onRequestStart () {},\n onRequestUpgrade () {},\n onResponseStart () {},\n onResponseData () {},\n onResponseEnd () {},\n onResponseError () {}\n })\n )\n })\n\n return true\n }\n\n let withinStaleIfErrorThreshold = false\n const staleIfErrorExpiry = result.cacheControlDirectives['stale-if-error'] ?? reqCacheControl?.['stale-if-error']\n if (staleIfErrorExpiry) {\n withinStaleIfErrorThreshold = now < (result.staleAt + (staleIfErrorExpiry * 1000))\n }\n\n const headers = {\n ...opts.headers,\n 'if-modified-since': new Date(result.cachedAt).toUTCString()\n }\n\n if (result.etag) {\n headers['if-none-match'] = result.etag\n }\n\n if (result.vary) {\n for (const key in result.vary) {\n if (result.vary[key] != null) {\n headers[key] = result.vary[key]\n }\n }\n }\n\n // We need to revalidate the response\n return dispatch(\n {\n ...opts,\n headers\n },\n new CacheRevalidationHandler(\n (success, context) => {\n if (success) {\n // TODO: successful revalidation should be considered fresh (not give stale warning).\n sendCachedValue(handler, opts, result, age, context, stale)\n } else if (util.isStream(result.body)) {\n result.body.on('error', nop).destroy()\n }\n },\n new CacheHandler(globalOpts, cacheKey, handler),\n withinStaleIfErrorThreshold\n )\n )\n }\n\n // Dump request body.\n if (util.isStream(opts.body)) {\n opts.body.on('error', nop).destroy()\n }\n\n sendCachedValue(handler, opts, result, age, null, false)\n}\n\n/**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions} [opts]\n * @returns {import('../../types/dispatcher.d.ts').default.DispatcherComposeInterceptor}\n */\nmodule.exports = (opts = {}) => {\n const {\n store = new MemoryCacheStore(),\n methods = ['GET'],\n cacheByDefault = undefined,\n type = 'shared',\n origins = undefined\n } = opts\n\n if (typeof opts !== 'object' || opts === null) {\n throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? 'null' : typeof opts}`)\n }\n\n assertCacheStore(store, 'opts.store')\n assertCacheMethods(methods, 'opts.methods')\n assertCacheOrigins(origins, 'opts.origins')\n\n if (typeof cacheByDefault !== 'undefined' && typeof cacheByDefault !== 'number') {\n throw new TypeError(`expected opts.cacheByDefault to be number or undefined, got ${typeof cacheByDefault}`)\n }\n\n if (typeof type !== 'undefined' && type !== 'shared' && type !== 'private') {\n throw new TypeError(`expected opts.type to be shared, private, or undefined, got ${typeof type}`)\n }\n\n const globalOpts = {\n store,\n methods,\n cacheByDefault,\n type\n }\n\n const safeMethodsToNotCache = util.safeHTTPMethods.filter(method => methods.includes(method) === false)\n\n return dispatch => {\n return (opts, handler) => {\n if (!opts.origin || safeMethodsToNotCache.includes(opts.method)) {\n // Not a method we want to cache or we don't have the origin, skip\n return dispatch(opts, handler)\n }\n\n // Check if origin is in whitelist\n if (origins !== undefined) {\n const requestOrigin = opts.origin.toString().toLowerCase()\n let isAllowed = false\n\n for (let i = 0; i < origins.length; i++) {\n const allowed = origins[i]\n if (typeof allowed === 'string') {\n if (allowed.toLowerCase() === requestOrigin) {\n isAllowed = true\n break\n }\n } else if (allowed.test(requestOrigin)) {\n isAllowed = true\n break\n }\n }\n\n if (!isAllowed) {\n return dispatch(opts, handler)\n }\n }\n\n opts = {\n ...opts,\n headers: normalizeHeaders(opts)\n }\n\n const reqCacheControl = opts.headers?.['cache-control']\n ? parseCacheControlHeader(opts.headers['cache-control'])\n : undefined\n\n if (reqCacheControl?.['no-store']) {\n return dispatch(opts, handler)\n }\n\n /**\n * @type {import('../../types/cache-interceptor.d.ts').default.CacheKey}\n */\n const cacheKey = makeCacheKey(opts)\n const result = store.get(cacheKey)\n\n if (result && typeof result.then === 'function') {\n return result\n .then(result => handleResult(dispatch,\n globalOpts,\n cacheKey,\n handler,\n opts,\n reqCacheControl,\n result\n ))\n } else {\n return handleResult(\n dispatch,\n globalOpts,\n cacheKey,\n handler,\n opts,\n reqCacheControl,\n result\n )\n }\n }\n }\n}\n","'use strict'\n\nconst { createInflate, createGunzip, createBrotliDecompress, createZstdDecompress } = require('node:zlib')\nconst { pipeline } = require('node:stream')\nconst DecoratorHandler = require('../handler/decorator-handler')\nconst { runtimeFeatures } = require('../util/runtime-features')\n\n/** @typedef {import('node:stream').Transform} Transform */\n/** @typedef {import('node:stream').Transform} Controller */\n/** @typedef {Transform&import('node:zlib').Zlib} DecompressorStream */\n\n/** @type {Record DecompressorStream>} */\nconst supportedEncodings = {\n gzip: createGunzip,\n 'x-gzip': createGunzip,\n br: createBrotliDecompress,\n deflate: createInflate,\n compress: createInflate,\n 'x-compress': createInflate,\n ...(runtimeFeatures.has('zstd') ? { zstd: createZstdDecompress } : {})\n}\n\nconst defaultSkipStatusCodes = /** @type {const} */ ([204, 304])\n\nlet warningEmitted = /** @type {boolean} */ (false)\n\n/**\n * @typedef {Object} DecompressHandlerOptions\n * @property {number[]|Readonly} [skipStatusCodes=[204, 304]] - List of status codes to skip decompression for\n * @property {boolean} [skipErrorResponses] - Whether to skip decompression for error responses (status codes >= 400)\n */\n\nclass DecompressHandler extends DecoratorHandler {\n /** @type {Transform[]} */\n #decompressors = []\n /** @type {Readonly} */\n #skipStatusCodes\n /** @type {boolean} */\n #skipErrorResponses\n\n constructor (handler, { skipStatusCodes = defaultSkipStatusCodes, skipErrorResponses = true } = {}) {\n super(handler)\n this.#skipStatusCodes = skipStatusCodes\n this.#skipErrorResponses = skipErrorResponses\n }\n\n /**\n * Determines if decompression should be skipped based on encoding and status code\n * @param {string} contentEncoding - Content-Encoding header value\n * @param {number} statusCode - HTTP status code of the response\n * @returns {boolean} - True if decompression should be skipped\n */\n #shouldSkipDecompression (contentEncoding, statusCode) {\n if (!contentEncoding || statusCode < 200) return true\n if (this.#skipStatusCodes.includes(statusCode)) return true\n if (this.#skipErrorResponses && statusCode >= 400) return true\n return false\n }\n\n /**\n * Creates a chain of decompressors for multiple content encodings\n *\n * @param {string} encodings - Comma-separated list of content encodings\n * @returns {Array} - Array of decompressor streams\n * @throws {Error} - If the number of content-encodings exceeds the maximum allowed\n */\n #createDecompressionChain (encodings) {\n const parts = encodings.split(',')\n\n // Limit the number of content-encodings to prevent resource exhaustion.\n // CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206).\n const maxContentEncodings = 5\n if (parts.length > maxContentEncodings) {\n throw new Error(`too many content-encodings in response: ${parts.length}, maximum allowed is ${maxContentEncodings}`)\n }\n\n /** @type {DecompressorStream[]} */\n const decompressors = []\n\n for (let i = parts.length - 1; i >= 0; i--) {\n const encoding = parts[i].trim()\n if (!encoding) continue\n\n if (!supportedEncodings[encoding]) {\n decompressors.length = 0 // Clear if unsupported encoding\n return decompressors // Unsupported encoding\n }\n\n decompressors.push(supportedEncodings[encoding]())\n }\n\n return decompressors\n }\n\n /**\n * Sets up event handlers for a decompressor stream using readable events\n * @param {DecompressorStream} decompressor - The decompressor stream\n * @param {Controller} controller - The controller to coordinate with\n * @returns {void}\n */\n #setupDecompressorEvents (decompressor, controller) {\n decompressor.on('readable', () => {\n let chunk\n while ((chunk = decompressor.read()) !== null) {\n const result = super.onResponseData(controller, chunk)\n if (result === false) {\n break\n }\n }\n })\n\n decompressor.on('error', (error) => {\n super.onResponseError(controller, error)\n })\n }\n\n /**\n * Sets up event handling for a single decompressor\n * @param {Controller} controller - The controller to handle events\n * @returns {void}\n */\n #setupSingleDecompressor (controller) {\n const decompressor = this.#decompressors[0]\n this.#setupDecompressorEvents(decompressor, controller)\n\n decompressor.on('end', () => {\n super.onResponseEnd(controller, {})\n })\n }\n\n /**\n * Sets up event handling for multiple chained decompressors using pipeline\n * @param {Controller} controller - The controller to handle events\n * @returns {void}\n */\n #setupMultipleDecompressors (controller) {\n const lastDecompressor = this.#decompressors[this.#decompressors.length - 1]\n this.#setupDecompressorEvents(lastDecompressor, controller)\n\n pipeline(this.#decompressors, (err) => {\n if (err) {\n super.onResponseError(controller, err)\n return\n }\n super.onResponseEnd(controller, {})\n })\n }\n\n /**\n * Cleans up decompressor references to prevent memory leaks\n * @returns {void}\n */\n #cleanupDecompressors () {\n this.#decompressors.length = 0\n }\n\n /**\n * @param {Controller} controller\n * @param {number} statusCode\n * @param {Record} headers\n * @param {string} statusMessage\n * @returns {void}\n */\n onResponseStart (controller, statusCode, headers, statusMessage) {\n const contentEncoding = headers['content-encoding']\n\n // If content encoding is not supported or status code is in skip list\n if (this.#shouldSkipDecompression(contentEncoding, statusCode)) {\n return super.onResponseStart(controller, statusCode, headers, statusMessage)\n }\n\n const decompressors = this.#createDecompressionChain(contentEncoding.toLowerCase())\n\n if (decompressors.length === 0) {\n this.#cleanupDecompressors()\n return super.onResponseStart(controller, statusCode, headers, statusMessage)\n }\n\n this.#decompressors = decompressors\n\n // Remove compression headers since we're decompressing\n const { 'content-encoding': _, 'content-length': __, ...newHeaders } = headers\n\n if (this.#decompressors.length === 1) {\n this.#setupSingleDecompressor(controller)\n } else {\n this.#setupMultipleDecompressors(controller)\n }\n\n return super.onResponseStart(controller, statusCode, newHeaders, statusMessage)\n }\n\n /**\n * @param {Controller} controller\n * @param {Buffer} chunk\n * @returns {void}\n */\n onResponseData (controller, chunk) {\n if (this.#decompressors.length > 0) {\n this.#decompressors[0].write(chunk)\n return\n }\n super.onResponseData(controller, chunk)\n }\n\n /**\n * @param {Controller} controller\n * @param {Record | undefined} trailers\n * @returns {void}\n */\n onResponseEnd (controller, trailers) {\n if (this.#decompressors.length > 0) {\n this.#decompressors[0].end()\n this.#cleanupDecompressors()\n return\n }\n super.onResponseEnd(controller, trailers)\n }\n\n /**\n * @param {Controller} controller\n * @param {Error} err\n * @returns {void}\n */\n onResponseError (controller, err) {\n if (this.#decompressors.length > 0) {\n for (const decompressor of this.#decompressors) {\n decompressor.destroy(err)\n }\n this.#cleanupDecompressors()\n }\n super.onResponseError(controller, err)\n }\n}\n\n/**\n * Creates a decompression interceptor for HTTP responses\n * @param {DecompressHandlerOptions} [options] - Options for the interceptor\n * @returns {Function} - Interceptor function\n */\nfunction createDecompressInterceptor (options = {}) {\n // Emit experimental warning only once\n if (!warningEmitted) {\n process.emitWarning(\n 'DecompressInterceptor is experimental and subject to change',\n 'ExperimentalWarning'\n )\n warningEmitted = true\n }\n\n return (dispatch) => {\n return (opts, handler) => {\n const decompressHandler = new DecompressHandler(handler, options)\n return dispatch(opts, decompressHandler)\n }\n }\n}\n\nmodule.exports = createDecompressInterceptor\n","'use strict'\n\nconst diagnosticsChannel = require('node:diagnostics_channel')\nconst util = require('../core/util')\nconst DeduplicationHandler = require('../handler/deduplication-handler')\nconst { normalizeHeaders, makeCacheKey, makeDeduplicationKey } = require('../util/cache.js')\n\nconst pendingRequestsChannel = diagnosticsChannel.channel('undici:request:pending-requests')\n\n/**\n * @param {import('../../types/interceptors.d.ts').default.DeduplicateInterceptorOpts} [opts]\n * @returns {import('../../types/dispatcher.d.ts').default.DispatcherComposeInterceptor}\n */\nmodule.exports = (opts = {}) => {\n const {\n methods = ['GET'],\n skipHeaderNames = [],\n excludeHeaderNames = [],\n maxBufferSize = 5 * 1024 * 1024\n } = opts\n\n if (typeof opts !== 'object' || opts === null) {\n throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? 'null' : typeof opts}`)\n }\n\n if (!Array.isArray(methods)) {\n throw new TypeError(`expected opts.methods to be an array, got ${typeof methods}`)\n }\n\n for (const method of methods) {\n if (!util.safeHTTPMethods.includes(method)) {\n throw new TypeError(`expected opts.methods to only contain safe HTTP methods, got ${method}`)\n }\n }\n\n if (!Array.isArray(skipHeaderNames)) {\n throw new TypeError(`expected opts.skipHeaderNames to be an array, got ${typeof skipHeaderNames}`)\n }\n\n if (!Array.isArray(excludeHeaderNames)) {\n throw new TypeError(`expected opts.excludeHeaderNames to be an array, got ${typeof excludeHeaderNames}`)\n }\n\n if (!Number.isFinite(maxBufferSize) || maxBufferSize <= 0) {\n throw new TypeError(`expected opts.maxBufferSize to be a positive finite number, got ${maxBufferSize}`)\n }\n\n // Convert to lowercase Set for case-insensitive header matching\n const skipHeaderNamesSet = new Set(skipHeaderNames.map(name => name.toLowerCase()))\n\n // Convert to lowercase Set for case-insensitive header exclusion from deduplication key\n const excludeHeaderNamesSet = new Set(excludeHeaderNames.map(name => name.toLowerCase()))\n\n /**\n * Map of pending requests for deduplication\n * @type {Map}\n */\n const pendingRequests = new Map()\n\n return dispatch => {\n return (opts, handler) => {\n if (!opts.origin || methods.includes(opts.method) === false) {\n return dispatch(opts, handler)\n }\n\n opts = {\n ...opts,\n headers: normalizeHeaders(opts)\n }\n\n // Skip deduplication if request contains any of the specified headers\n if (skipHeaderNamesSet.size > 0) {\n for (const headerName of Object.keys(opts.headers)) {\n if (skipHeaderNamesSet.has(headerName.toLowerCase())) {\n return dispatch(opts, handler)\n }\n }\n }\n\n const cacheKey = makeCacheKey(opts)\n const dedupeKey = makeDeduplicationKey(cacheKey, excludeHeaderNamesSet)\n\n // Check if there's already a pending request for this key\n const pendingHandler = pendingRequests.get(dedupeKey)\n if (pendingHandler) {\n // Add this handler to the waiting list when safe.\n // If body streaming has already started, this request must be sent independently.\n if (pendingHandler.addWaitingHandler(handler)) {\n return true\n }\n\n return dispatch(opts, handler)\n }\n\n // Create a new deduplication handler\n const deduplicationHandler = new DeduplicationHandler(\n handler,\n () => {\n // Clean up when request completes\n pendingRequests.delete(dedupeKey)\n if (pendingRequestsChannel.hasSubscribers) {\n pendingRequestsChannel.publish({ size: pendingRequests.size, key: dedupeKey, type: 'removed' })\n }\n },\n maxBufferSize\n )\n\n // Register the pending request\n pendingRequests.set(dedupeKey, deduplicationHandler)\n if (pendingRequestsChannel.hasSubscribers) {\n pendingRequestsChannel.publish({ size: pendingRequests.size, key: dedupeKey, type: 'added' })\n }\n\n return dispatch(opts, deduplicationHandler)\n }\n }\n}\n","'use strict'\nconst { isIP } = require('node:net')\nconst { lookup } = require('node:dns')\nconst DecoratorHandler = require('../handler/decorator-handler')\nconst { InvalidArgumentError, InformationalError } = require('../core/errors')\nconst maxInt = Math.pow(2, 31) - 1\n\nfunction hasSafeIterator (headers) {\n const prototype = Object.getPrototypeOf(headers)\n const ownIterator = Object.prototype.hasOwnProperty.call(headers, Symbol.iterator)\n return ownIterator || (prototype != null && prototype !== Object.prototype && typeof headers[Symbol.iterator] === 'function')\n}\n\nfunction isHostHeader (key) {\n return typeof key === 'string' && key.toLowerCase() === 'host'\n}\n\nfunction normalizeHeaders (headers) {\n if (headers == null) {\n return null\n }\n\n if (Array.isArray(headers)) {\n if (headers.length === 0 || !Array.isArray(headers[0])) {\n return headers\n }\n\n const normalized = []\n for (const header of headers) {\n if (Array.isArray(header) && header.length === 2) {\n normalized.push(header[0], header[1])\n } else {\n normalized.push(header)\n }\n }\n\n return normalized\n }\n\n if (typeof headers === 'object' && hasSafeIterator(headers)) {\n const normalized = []\n for (const header of headers) {\n if (Array.isArray(header) && header.length === 2) {\n normalized.push(header[0], header[1])\n } else {\n normalized.push(header)\n }\n }\n\n return normalized\n }\n\n return headers\n}\n\nfunction hasHostHeader (headers) {\n if (headers == null) {\n return false\n }\n\n if (Array.isArray(headers)) {\n if (headers.length === 0) {\n return false\n }\n\n for (let i = 0; i < headers.length; i += 2) {\n if (isHostHeader(headers[i])) {\n return true\n }\n }\n\n return false\n }\n\n if (typeof headers === 'object') {\n for (const key in headers) {\n if (isHostHeader(key)) {\n return true\n }\n }\n }\n\n return false\n}\n\nfunction withHostHeader (host, headers) {\n const normalizedHeaders = normalizeHeaders(headers)\n\n if (hasHostHeader(normalizedHeaders)) {\n return normalizedHeaders\n }\n\n if (Array.isArray(normalizedHeaders)) {\n return ['host', host, ...normalizedHeaders]\n }\n\n if (normalizedHeaders && typeof normalizedHeaders === 'object') {\n return {\n host,\n ...normalizedHeaders\n }\n }\n\n return { host }\n}\n\nclass DNSStorage {\n #maxItems = 0\n #records = new Map()\n\n constructor (opts) {\n this.#maxItems = opts.maxItems\n }\n\n get size () {\n return this.#records.size\n }\n\n get (hostname) {\n return this.#records.get(hostname) ?? null\n }\n\n set (hostname, records) {\n this.#records.set(hostname, records)\n }\n\n delete (hostname) {\n this.#records.delete(hostname)\n }\n\n // Delegate to storage decide can we do more lookups or not\n full () {\n return this.size >= this.#maxItems\n }\n}\n\nclass DNSInstance {\n #maxTTL = 0\n #maxItems = 0\n dualStack = true\n affinity = null\n lookup = null\n pick = null\n storage = null\n\n constructor (opts) {\n this.#maxTTL = opts.maxTTL\n this.#maxItems = opts.maxItems\n this.dualStack = opts.dualStack\n this.affinity = opts.affinity\n this.lookup = opts.lookup ?? this.#defaultLookup\n this.pick = opts.pick ?? this.#defaultPick\n this.storage = opts.storage ?? new DNSStorage(opts)\n }\n\n runLookup (origin, opts, cb) {\n const ips = this.storage.get(origin.hostname)\n\n // If full, we just return the origin\n if (ips == null && this.storage.full()) {\n cb(null, origin)\n return\n }\n\n const newOpts = {\n affinity: this.affinity,\n dualStack: this.dualStack,\n lookup: this.lookup,\n pick: this.pick,\n ...opts.dns,\n maxTTL: this.#maxTTL,\n maxItems: this.#maxItems\n }\n\n // If no IPs we lookup\n if (ips == null) {\n this.lookup(origin, newOpts, (err, addresses) => {\n if (err || addresses == null || addresses.length === 0) {\n cb(err ?? new InformationalError('No DNS entries found'))\n return\n }\n\n this.setRecords(origin, addresses)\n const records = this.storage.get(origin.hostname)\n\n const ip = this.pick(\n origin,\n records,\n newOpts.affinity\n )\n\n let port\n if (typeof ip.port === 'number') {\n port = `:${ip.port}`\n } else if (origin.port !== '') {\n port = `:${origin.port}`\n } else {\n port = ''\n }\n\n cb(\n null,\n new URL(`${origin.protocol}//${\n ip.family === 6 ? `[${ip.address}]` : ip.address\n }${port}`)\n )\n })\n } else {\n // If there's IPs we pick\n const ip = this.pick(\n origin,\n ips,\n newOpts.affinity\n )\n\n // If no IPs we lookup - deleting old records\n if (ip == null) {\n this.storage.delete(origin.hostname)\n this.runLookup(origin, opts, cb)\n return\n }\n\n let port\n if (typeof ip.port === 'number') {\n port = `:${ip.port}`\n } else if (origin.port !== '') {\n port = `:${origin.port}`\n } else {\n port = ''\n }\n\n cb(\n null,\n new URL(`${origin.protocol}//${\n ip.family === 6 ? `[${ip.address}]` : ip.address\n }${port}`)\n )\n }\n }\n\n #defaultLookup (origin, opts, cb) {\n lookup(\n origin.hostname,\n {\n all: true,\n family: this.dualStack === false ? this.affinity : 0,\n order: 'ipv4first'\n },\n (err, addresses) => {\n if (err) {\n return cb(err)\n }\n\n const results = new Map()\n\n for (const addr of addresses) {\n // On linux we found duplicates, we attempt to remove them with\n // the latest record\n results.set(`${addr.address}:${addr.family}`, addr)\n }\n\n cb(null, results.values())\n }\n )\n }\n\n #defaultPick (origin, hostnameRecords, affinity) {\n let ip = null\n const { records, offset } = hostnameRecords\n\n let family\n if (this.dualStack) {\n if (affinity == null) {\n // Balance between ip families\n if (offset == null || offset === maxInt) {\n hostnameRecords.offset = 0\n affinity = 4\n } else {\n hostnameRecords.offset++\n affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4\n }\n }\n\n if (records[affinity] != null && records[affinity].ips.length > 0) {\n family = records[affinity]\n } else {\n family = records[affinity === 4 ? 6 : 4]\n }\n } else {\n family = records[affinity]\n }\n\n // If no IPs we return null\n if (family == null || family.ips.length === 0) {\n return ip\n }\n\n if (family.offset == null || family.offset === maxInt) {\n family.offset = 0\n } else {\n family.offset++\n }\n\n const position = family.offset % family.ips.length\n ip = family.ips[position] ?? null\n\n if (ip == null) {\n return ip\n }\n\n if (Date.now() - ip.timestamp > ip.ttl) { // record TTL is already in ms\n // We delete expired records\n // It is possible that they have different TTL, so we manage them individually\n family.ips.splice(position, 1)\n return this.pick(origin, hostnameRecords, affinity)\n }\n\n return ip\n }\n\n pickFamily (origin, ipFamily) {\n const records = this.storage.get(origin.hostname)?.records\n if (!records) {\n return null\n }\n\n const family = records[ipFamily]\n if (!family) {\n return null\n }\n\n if (family.offset == null || family.offset === maxInt) {\n family.offset = 0\n } else {\n family.offset++\n }\n\n const position = family.offset % family.ips.length\n const ip = family.ips[position] ?? null\n if (ip == null) {\n return ip\n }\n\n if (Date.now() - ip.timestamp > ip.ttl) { // record TTL is already in ms\n // We delete expired records\n // It is possible that they have different TTL, so we manage them individually\n family.ips.splice(position, 1)\n }\n\n return ip\n }\n\n setRecords (origin, addresses) {\n const timestamp = Date.now()\n const records = { records: { 4: null, 6: null } }\n let minTTL = this.#maxTTL\n for (const record of addresses) {\n record.timestamp = timestamp\n if (typeof record.ttl === 'number') {\n // The record TTL is expected to be in ms\n record.ttl = Math.min(record.ttl, this.#maxTTL)\n minTTL = Math.min(minTTL, record.ttl)\n } else {\n record.ttl = this.#maxTTL\n }\n\n const familyRecords = records.records[record.family] ?? { ips: [] }\n\n familyRecords.ips.push(record)\n records.records[record.family] = familyRecords\n }\n\n // We provide a default TTL if external storage will be used without TTL per record-level support\n this.storage.set(origin.hostname, records, { ttl: minTTL })\n }\n\n deleteRecords (origin) {\n this.storage.delete(origin.hostname)\n }\n\n getHandler (meta, opts) {\n return new DNSDispatchHandler(this, meta, opts)\n }\n}\n\nclass DNSDispatchHandler extends DecoratorHandler {\n #state = null\n #opts = null\n #dispatch = null\n #origin = null\n #controller = null\n #newOrigin = null\n #firstTry = true\n\n constructor (state, { origin, handler, dispatch, newOrigin }, opts) {\n super(handler)\n this.#origin = origin\n this.#newOrigin = newOrigin\n this.#opts = { ...opts }\n this.#state = state\n this.#dispatch = dispatch\n }\n\n onResponseError (controller, err) {\n switch (err.code) {\n case 'ETIMEDOUT':\n case 'ECONNREFUSED': {\n if (this.#state.dualStack) {\n if (!this.#firstTry) {\n super.onResponseError(controller, err)\n return\n }\n this.#firstTry = false\n\n // Pick an ip address from the other family\n const otherFamily = this.#newOrigin.hostname[0] === '[' ? 4 : 6\n const ip = this.#state.pickFamily(this.#origin, otherFamily)\n if (ip == null) {\n super.onResponseError(controller, err)\n return\n }\n\n let port\n if (typeof ip.port === 'number') {\n port = `:${ip.port}`\n } else if (this.#origin.port !== '') {\n port = `:${this.#origin.port}`\n } else {\n port = ''\n }\n\n const dispatchOpts = {\n ...this.#opts,\n origin: `${this.#origin.protocol}//${\n ip.family === 6 ? `[${ip.address}]` : ip.address\n }${port}`,\n headers: withHostHeader(this.#origin.host, this.#opts.headers)\n }\n this.#dispatch(dispatchOpts, this)\n return\n }\n\n // if dual-stack disabled, we error out\n super.onResponseError(controller, err)\n break\n }\n case 'ENOTFOUND':\n this.#state.deleteRecords(this.#origin)\n super.onResponseError(controller, err)\n break\n default:\n super.onResponseError(controller, err)\n break\n }\n }\n}\n\nmodule.exports = interceptorOpts => {\n if (\n interceptorOpts?.maxTTL != null &&\n (typeof interceptorOpts?.maxTTL !== 'number' || interceptorOpts?.maxTTL < 0)\n ) {\n throw new InvalidArgumentError('Invalid maxTTL. Must be a positive number')\n }\n\n if (\n interceptorOpts?.maxItems != null &&\n (typeof interceptorOpts?.maxItems !== 'number' ||\n interceptorOpts?.maxItems < 1)\n ) {\n throw new InvalidArgumentError(\n 'Invalid maxItems. Must be a positive number and greater than zero'\n )\n }\n\n if (\n interceptorOpts?.affinity != null &&\n interceptorOpts?.affinity !== 4 &&\n interceptorOpts?.affinity !== 6\n ) {\n throw new InvalidArgumentError('Invalid affinity. Must be either 4 or 6')\n }\n\n if (\n interceptorOpts?.dualStack != null &&\n typeof interceptorOpts?.dualStack !== 'boolean'\n ) {\n throw new InvalidArgumentError('Invalid dualStack. Must be a boolean')\n }\n\n if (\n interceptorOpts?.lookup != null &&\n typeof interceptorOpts?.lookup !== 'function'\n ) {\n throw new InvalidArgumentError('Invalid lookup. Must be a function')\n }\n\n if (\n interceptorOpts?.pick != null &&\n typeof interceptorOpts?.pick !== 'function'\n ) {\n throw new InvalidArgumentError('Invalid pick. Must be a function')\n }\n\n if (\n interceptorOpts?.storage != null &&\n (typeof interceptorOpts?.storage?.get !== 'function' ||\n typeof interceptorOpts?.storage?.set !== 'function' ||\n typeof interceptorOpts?.storage?.full !== 'function' ||\n typeof interceptorOpts?.storage?.delete !== 'function'\n )\n ) {\n throw new InvalidArgumentError('Invalid storage. Must be a object with methods: { get, set, full, delete }')\n }\n\n const dualStack = interceptorOpts?.dualStack ?? true\n let affinity\n if (dualStack) {\n affinity = interceptorOpts?.affinity ?? null\n } else {\n affinity = interceptorOpts?.affinity ?? 4\n }\n\n const opts = {\n maxTTL: interceptorOpts?.maxTTL ?? 10e3, // Expressed in ms\n lookup: interceptorOpts?.lookup ?? null,\n pick: interceptorOpts?.pick ?? null,\n dualStack,\n affinity,\n maxItems: interceptorOpts?.maxItems ?? Infinity,\n storage: interceptorOpts?.storage\n }\n\n const instance = new DNSInstance(opts)\n\n return dispatch => {\n return function dnsInterceptor (origDispatchOpts, handler) {\n const origin =\n origDispatchOpts.origin.constructor === URL\n ? origDispatchOpts.origin\n : new URL(origDispatchOpts.origin)\n\n if (isIP(origin.hostname) !== 0) {\n return dispatch(origDispatchOpts, handler)\n }\n\n instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => {\n if (err) {\n return handler.onResponseError(null, err)\n }\n\n const dispatchOpts = {\n ...origDispatchOpts,\n servername: origin.hostname, // For SNI on TLS\n origin: newOrigin.origin,\n headers: withHostHeader(origin.host, origDispatchOpts.headers)\n }\n\n dispatch(\n dispatchOpts,\n instance.getHandler(\n { origin, dispatch, handler, newOrigin },\n origDispatchOpts\n )\n )\n })\n\n return true\n }\n }\n}\n","'use strict'\n\nconst { InvalidArgumentError, RequestAbortedError } = require('../core/errors')\nconst DecoratorHandler = require('../handler/decorator-handler')\n\nclass DumpHandler extends DecoratorHandler {\n #maxSize = 1024 * 1024\n #dumped = false\n #size = 0\n #controller = null\n aborted = false\n reason = false\n\n constructor ({ maxSize, signal }, handler) {\n if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) {\n throw new InvalidArgumentError('maxSize must be a number greater than 0')\n }\n\n super(handler)\n\n this.#maxSize = maxSize ?? this.#maxSize\n // this.#handler = handler\n }\n\n #abort (reason) {\n this.aborted = true\n this.reason = reason\n }\n\n onRequestStart (controller, context) {\n controller.abort = this.#abort.bind(this)\n this.#controller = controller\n\n return super.onRequestStart(controller, context)\n }\n\n onResponseStart (controller, statusCode, headers, statusMessage) {\n const contentLength = headers['content-length']\n\n if (contentLength != null && contentLength > this.#maxSize) {\n throw new RequestAbortedError(\n `Response size (${contentLength}) larger than maxSize (${\n this.#maxSize\n })`\n )\n }\n\n if (this.aborted === true) {\n return true\n }\n\n return super.onResponseStart(controller, statusCode, headers, statusMessage)\n }\n\n onResponseError (controller, err) {\n if (this.#dumped) {\n return\n }\n\n // On network errors before connect, controller will be null\n err = this.#controller?.reason ?? err\n\n super.onResponseError(controller, err)\n }\n\n onResponseData (controller, chunk) {\n this.#size = this.#size + chunk.length\n\n if (this.#size >= this.#maxSize) {\n this.#dumped = true\n\n if (this.aborted === true) {\n super.onResponseError(controller, this.reason)\n } else {\n super.onResponseEnd(controller, {})\n }\n }\n\n return true\n }\n\n onResponseEnd (controller, trailers) {\n if (this.#dumped) {\n return\n }\n\n if (this.#controller.aborted === true) {\n super.onResponseError(controller, this.reason)\n return\n }\n\n super.onResponseEnd(controller, trailers)\n }\n}\n\nfunction createDumpInterceptor (\n { maxSize: defaultMaxSize } = {\n maxSize: 1024 * 1024\n }\n) {\n return dispatch => {\n return function Intercept (opts, handler) {\n const { dumpMaxSize = defaultMaxSize } = opts\n\n const dumpHandler = new DumpHandler({ maxSize: dumpMaxSize, signal: opts.signal }, handler)\n\n return dispatch(opts, dumpHandler)\n }\n }\n}\n\nmodule.exports = createDumpInterceptor\n","'use strict'\n\nconst RedirectHandler = require('../handler/redirect-handler')\n\nfunction createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections } = {}) {\n return (dispatch) => {\n return function Intercept (opts, handler) {\n const { maxRedirections = defaultMaxRedirections, ...rest } = opts\n\n if (maxRedirections == null || maxRedirections === 0) {\n return dispatch(opts, handler)\n }\n\n const dispatchOpts = { ...rest } // Stop sub dispatcher from also redirecting.\n const redirectHandler = new RedirectHandler(dispatch, maxRedirections, dispatchOpts, handler)\n return dispatch(dispatchOpts, redirectHandler)\n }\n }\n}\n\nmodule.exports = createRedirectInterceptor\n","'use strict'\n\n// const { parseHeaders } = require('../core/util')\nconst DecoratorHandler = require('../handler/decorator-handler')\nconst { ResponseError } = require('../core/errors')\n\nclass ResponseErrorHandler extends DecoratorHandler {\n #statusCode\n #contentType\n #decoder\n #headers\n #body\n\n constructor (_opts, { handler }) {\n super(handler)\n }\n\n #checkContentType (contentType) {\n return (this.#contentType ?? '').indexOf(contentType) === 0\n }\n\n onRequestStart (controller, context) {\n this.#statusCode = 0\n this.#contentType = null\n this.#decoder = null\n this.#headers = null\n this.#body = ''\n\n return super.onRequestStart(controller, context)\n }\n\n onResponseStart (controller, statusCode, headers, statusMessage) {\n this.#statusCode = statusCode\n this.#headers = headers\n this.#contentType = headers['content-type']\n\n if (this.#statusCode < 400) {\n return super.onResponseStart(controller, statusCode, headers, statusMessage)\n }\n\n if (this.#checkContentType('application/json') || this.#checkContentType('text/plain')) {\n this.#decoder = new TextDecoder('utf-8')\n }\n }\n\n onResponseData (controller, chunk) {\n if (this.#statusCode < 400) {\n return super.onResponseData(controller, chunk)\n }\n\n this.#body += this.#decoder?.decode(chunk, { stream: true }) ?? ''\n }\n\n onResponseEnd (controller, trailers) {\n if (this.#statusCode >= 400) {\n this.#body += this.#decoder?.decode(undefined, { stream: false }) ?? ''\n\n if (this.#checkContentType('application/json')) {\n try {\n this.#body = JSON.parse(this.#body)\n } catch {\n // Do nothing...\n }\n }\n\n let err\n const stackTraceLimit = Error.stackTraceLimit\n Error.stackTraceLimit = 0\n try {\n err = new ResponseError('Response Error', this.#statusCode, {\n body: this.#body,\n headers: this.#headers\n })\n } finally {\n Error.stackTraceLimit = stackTraceLimit\n }\n\n super.onResponseError(controller, err)\n } else {\n super.onResponseEnd(controller, trailers)\n }\n }\n\n onResponseError (controller, err) {\n super.onResponseError(controller, err)\n }\n}\n\nmodule.exports = () => {\n return (dispatch) => {\n return function Intercept (opts, handler) {\n return dispatch(opts, new ResponseErrorHandler(opts, { handler }))\n }\n }\n}\n","'use strict'\nconst RetryHandler = require('../handler/retry-handler')\n\nmodule.exports = globalOpts => {\n return dispatch => {\n return function retryInterceptor (opts, handler) {\n return dispatch(\n opts,\n new RetryHandler(\n { ...opts, retryOptions: { ...globalOpts, ...opts.retryOptions } },\n {\n handler,\n dispatch\n }\n )\n )\n }\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SPECIAL_HEADERS = exports.MINOR = exports.MAJOR = exports.HTAB_SP_VCHAR_OBS_TEXT = exports.QUOTED_STRING = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.HEX = exports.URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.STATUSES_HTTP = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.HEADER_STATE = exports.FINISH = exports.STATUSES = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0;\nconst utils_1 = require(\"./utils\");\n// Emums\nexports.ERROR = {\n OK: 0,\n INTERNAL: 1,\n STRICT: 2,\n CR_EXPECTED: 25,\n LF_EXPECTED: 3,\n UNEXPECTED_CONTENT_LENGTH: 4,\n UNEXPECTED_SPACE: 30,\n CLOSED_CONNECTION: 5,\n INVALID_METHOD: 6,\n INVALID_URL: 7,\n INVALID_CONSTANT: 8,\n INVALID_VERSION: 9,\n INVALID_HEADER_TOKEN: 10,\n INVALID_CONTENT_LENGTH: 11,\n INVALID_CHUNK_SIZE: 12,\n INVALID_STATUS: 13,\n INVALID_EOF_STATE: 14,\n INVALID_TRANSFER_ENCODING: 15,\n CB_MESSAGE_BEGIN: 16,\n CB_HEADERS_COMPLETE: 17,\n CB_MESSAGE_COMPLETE: 18,\n CB_CHUNK_HEADER: 19,\n CB_CHUNK_COMPLETE: 20,\n PAUSED: 21,\n PAUSED_UPGRADE: 22,\n PAUSED_H2_UPGRADE: 23,\n USER: 24,\n CB_URL_COMPLETE: 26,\n CB_STATUS_COMPLETE: 27,\n CB_METHOD_COMPLETE: 32,\n CB_VERSION_COMPLETE: 33,\n CB_HEADER_FIELD_COMPLETE: 28,\n CB_HEADER_VALUE_COMPLETE: 29,\n CB_CHUNK_EXTENSION_NAME_COMPLETE: 34,\n CB_CHUNK_EXTENSION_VALUE_COMPLETE: 35,\n CB_RESET: 31,\n CB_PROTOCOL_COMPLETE: 38,\n};\nexports.TYPE = {\n BOTH: 0, // default\n REQUEST: 1,\n RESPONSE: 2,\n};\nexports.FLAGS = {\n CONNECTION_KEEP_ALIVE: 1 << 0,\n CONNECTION_CLOSE: 1 << 1,\n CONNECTION_UPGRADE: 1 << 2,\n CHUNKED: 1 << 3,\n UPGRADE: 1 << 4,\n CONTENT_LENGTH: 1 << 5,\n SKIPBODY: 1 << 6,\n TRAILING: 1 << 7,\n // 1 << 8 is unused\n TRANSFER_ENCODING: 1 << 9,\n};\nexports.LENIENT_FLAGS = {\n HEADERS: 1 << 0,\n CHUNKED_LENGTH: 1 << 1,\n KEEP_ALIVE: 1 << 2,\n TRANSFER_ENCODING: 1 << 3,\n VERSION: 1 << 4,\n DATA_AFTER_CLOSE: 1 << 5,\n OPTIONAL_LF_AFTER_CR: 1 << 6,\n OPTIONAL_CRLF_AFTER_CHUNK: 1 << 7,\n OPTIONAL_CR_BEFORE_LF: 1 << 8,\n SPACES_AFTER_CHUNK_SIZE: 1 << 9,\n};\nexports.METHODS = {\n 'DELETE': 0,\n 'GET': 1,\n 'HEAD': 2,\n 'POST': 3,\n 'PUT': 4,\n /* pathological */\n 'CONNECT': 5,\n 'OPTIONS': 6,\n 'TRACE': 7,\n /* WebDAV */\n 'COPY': 8,\n 'LOCK': 9,\n 'MKCOL': 10,\n 'MOVE': 11,\n 'PROPFIND': 12,\n 'PROPPATCH': 13,\n 'SEARCH': 14,\n 'UNLOCK': 15,\n 'BIND': 16,\n 'REBIND': 17,\n 'UNBIND': 18,\n 'ACL': 19,\n /* subversion */\n 'REPORT': 20,\n 'MKACTIVITY': 21,\n 'CHECKOUT': 22,\n 'MERGE': 23,\n /* upnp */\n 'M-SEARCH': 24,\n 'NOTIFY': 25,\n 'SUBSCRIBE': 26,\n 'UNSUBSCRIBE': 27,\n /* RFC-5789 */\n 'PATCH': 28,\n 'PURGE': 29,\n /* CalDAV */\n 'MKCALENDAR': 30,\n /* RFC-2068, section 19.6.1.2 */\n 'LINK': 31,\n 'UNLINK': 32,\n /* icecast */\n 'SOURCE': 33,\n /* RFC-7540, section 11.6 */\n 'PRI': 34,\n /* RFC-2326 RTSP */\n 'DESCRIBE': 35,\n 'ANNOUNCE': 36,\n 'SETUP': 37,\n 'PLAY': 38,\n 'PAUSE': 39,\n 'TEARDOWN': 40,\n 'GET_PARAMETER': 41,\n 'SET_PARAMETER': 42,\n 'REDIRECT': 43,\n 'RECORD': 44,\n /* RAOP */\n 'FLUSH': 45,\n /* DRAFT https://www.ietf.org/archive/id/draft-ietf-httpbis-safe-method-w-body-02.html */\n 'QUERY': 46,\n};\nexports.STATUSES = {\n CONTINUE: 100,\n SWITCHING_PROTOCOLS: 101,\n PROCESSING: 102,\n EARLY_HINTS: 103,\n RESPONSE_IS_STALE: 110, // Unofficial\n REVALIDATION_FAILED: 111, // Unofficial\n DISCONNECTED_OPERATION: 112, // Unofficial\n HEURISTIC_EXPIRATION: 113, // Unofficial\n MISCELLANEOUS_WARNING: 199, // Unofficial\n OK: 200,\n CREATED: 201,\n ACCEPTED: 202,\n NON_AUTHORITATIVE_INFORMATION: 203,\n NO_CONTENT: 204,\n RESET_CONTENT: 205,\n PARTIAL_CONTENT: 206,\n MULTI_STATUS: 207,\n ALREADY_REPORTED: 208,\n TRANSFORMATION_APPLIED: 214, // Unofficial\n IM_USED: 226,\n MISCELLANEOUS_PERSISTENT_WARNING: 299, // Unofficial\n MULTIPLE_CHOICES: 300,\n MOVED_PERMANENTLY: 301,\n FOUND: 302,\n SEE_OTHER: 303,\n NOT_MODIFIED: 304,\n USE_PROXY: 305,\n SWITCH_PROXY: 306, // No longer used\n TEMPORARY_REDIRECT: 307,\n PERMANENT_REDIRECT: 308,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n PAYMENT_REQUIRED: 402,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n METHOD_NOT_ALLOWED: 405,\n NOT_ACCEPTABLE: 406,\n PROXY_AUTHENTICATION_REQUIRED: 407,\n REQUEST_TIMEOUT: 408,\n CONFLICT: 409,\n GONE: 410,\n LENGTH_REQUIRED: 411,\n PRECONDITION_FAILED: 412,\n PAYLOAD_TOO_LARGE: 413,\n URI_TOO_LONG: 414,\n UNSUPPORTED_MEDIA_TYPE: 415,\n RANGE_NOT_SATISFIABLE: 416,\n EXPECTATION_FAILED: 417,\n IM_A_TEAPOT: 418,\n PAGE_EXPIRED: 419, // Unofficial\n ENHANCE_YOUR_CALM: 420, // Unofficial\n MISDIRECTED_REQUEST: 421,\n UNPROCESSABLE_ENTITY: 422,\n LOCKED: 423,\n FAILED_DEPENDENCY: 424,\n TOO_EARLY: 425,\n UPGRADE_REQUIRED: 426,\n PRECONDITION_REQUIRED: 428,\n TOO_MANY_REQUESTS: 429,\n REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL: 430, // Unofficial\n REQUEST_HEADER_FIELDS_TOO_LARGE: 431,\n LOGIN_TIMEOUT: 440, // Unofficial\n NO_RESPONSE: 444, // Unofficial\n RETRY_WITH: 449, // Unofficial\n BLOCKED_BY_PARENTAL_CONTROL: 450, // Unofficial\n UNAVAILABLE_FOR_LEGAL_REASONS: 451,\n CLIENT_CLOSED_LOAD_BALANCED_REQUEST: 460, // Unofficial\n INVALID_X_FORWARDED_FOR: 463, // Unofficial\n REQUEST_HEADER_TOO_LARGE: 494, // Unofficial\n SSL_CERTIFICATE_ERROR: 495, // Unofficial\n SSL_CERTIFICATE_REQUIRED: 496, // Unofficial\n HTTP_REQUEST_SENT_TO_HTTPS_PORT: 497, // Unofficial\n INVALID_TOKEN: 498, // Unofficial\n CLIENT_CLOSED_REQUEST: 499, // Unofficial\n INTERNAL_SERVER_ERROR: 500,\n NOT_IMPLEMENTED: 501,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n HTTP_VERSION_NOT_SUPPORTED: 505,\n VARIANT_ALSO_NEGOTIATES: 506,\n INSUFFICIENT_STORAGE: 507,\n LOOP_DETECTED: 508,\n BANDWIDTH_LIMIT_EXCEEDED: 509,\n NOT_EXTENDED: 510,\n NETWORK_AUTHENTICATION_REQUIRED: 511,\n WEB_SERVER_UNKNOWN_ERROR: 520, // Unofficial\n WEB_SERVER_IS_DOWN: 521, // Unofficial\n CONNECTION_TIMEOUT: 522, // Unofficial\n ORIGIN_IS_UNREACHABLE: 523, // Unofficial\n TIMEOUT_OCCURED: 524, // Unofficial\n SSL_HANDSHAKE_FAILED: 525, // Unofficial\n INVALID_SSL_CERTIFICATE: 526, // Unofficial\n RAILGUN_ERROR: 527, // Unofficial\n SITE_IS_OVERLOADED: 529, // Unofficial\n SITE_IS_FROZEN: 530, // Unofficial\n IDENTITY_PROVIDER_AUTHENTICATION_ERROR: 561, // Unofficial\n NETWORK_READ_TIMEOUT: 598, // Unofficial\n NETWORK_CONNECT_TIMEOUT: 599, // Unofficial\n};\nexports.FINISH = {\n SAFE: 0,\n SAFE_WITH_CB: 1,\n UNSAFE: 2,\n};\nexports.HEADER_STATE = {\n GENERAL: 0,\n CONNECTION: 1,\n CONTENT_LENGTH: 2,\n TRANSFER_ENCODING: 3,\n UPGRADE: 4,\n CONNECTION_KEEP_ALIVE: 5,\n CONNECTION_CLOSE: 6,\n CONNECTION_UPGRADE: 7,\n TRANSFER_ENCODING_CHUNKED: 8,\n};\n// C headers\nexports.METHODS_HTTP = [\n exports.METHODS.DELETE,\n exports.METHODS.GET,\n exports.METHODS.HEAD,\n exports.METHODS.POST,\n exports.METHODS.PUT,\n exports.METHODS.CONNECT,\n exports.METHODS.OPTIONS,\n exports.METHODS.TRACE,\n exports.METHODS.COPY,\n exports.METHODS.LOCK,\n exports.METHODS.MKCOL,\n exports.METHODS.MOVE,\n exports.METHODS.PROPFIND,\n exports.METHODS.PROPPATCH,\n exports.METHODS.SEARCH,\n exports.METHODS.UNLOCK,\n exports.METHODS.BIND,\n exports.METHODS.REBIND,\n exports.METHODS.UNBIND,\n exports.METHODS.ACL,\n exports.METHODS.REPORT,\n exports.METHODS.MKACTIVITY,\n exports.METHODS.CHECKOUT,\n exports.METHODS.MERGE,\n exports.METHODS['M-SEARCH'],\n exports.METHODS.NOTIFY,\n exports.METHODS.SUBSCRIBE,\n exports.METHODS.UNSUBSCRIBE,\n exports.METHODS.PATCH,\n exports.METHODS.PURGE,\n exports.METHODS.MKCALENDAR,\n exports.METHODS.LINK,\n exports.METHODS.UNLINK,\n exports.METHODS.PRI,\n // TODO(indutny): should we allow it with HTTP?\n exports.METHODS.SOURCE,\n exports.METHODS.QUERY,\n];\nexports.METHODS_ICE = [\n exports.METHODS.SOURCE,\n];\nexports.METHODS_RTSP = [\n exports.METHODS.OPTIONS,\n exports.METHODS.DESCRIBE,\n exports.METHODS.ANNOUNCE,\n exports.METHODS.SETUP,\n exports.METHODS.PLAY,\n exports.METHODS.PAUSE,\n exports.METHODS.TEARDOWN,\n exports.METHODS.GET_PARAMETER,\n exports.METHODS.SET_PARAMETER,\n exports.METHODS.REDIRECT,\n exports.METHODS.RECORD,\n exports.METHODS.FLUSH,\n // For AirPlay\n exports.METHODS.GET,\n exports.METHODS.POST,\n];\nexports.METHOD_MAP = (0, utils_1.enumToMap)(exports.METHODS);\nexports.H_METHOD_MAP = Object.fromEntries(Object.entries(exports.METHODS).filter(([k]) => k.startsWith('H')));\nexports.STATUSES_HTTP = [\n exports.STATUSES.CONTINUE,\n exports.STATUSES.SWITCHING_PROTOCOLS,\n exports.STATUSES.PROCESSING,\n exports.STATUSES.EARLY_HINTS,\n exports.STATUSES.RESPONSE_IS_STALE,\n exports.STATUSES.REVALIDATION_FAILED,\n exports.STATUSES.DISCONNECTED_OPERATION,\n exports.STATUSES.HEURISTIC_EXPIRATION,\n exports.STATUSES.MISCELLANEOUS_WARNING,\n exports.STATUSES.OK,\n exports.STATUSES.CREATED,\n exports.STATUSES.ACCEPTED,\n exports.STATUSES.NON_AUTHORITATIVE_INFORMATION,\n exports.STATUSES.NO_CONTENT,\n exports.STATUSES.RESET_CONTENT,\n exports.STATUSES.PARTIAL_CONTENT,\n exports.STATUSES.MULTI_STATUS,\n exports.STATUSES.ALREADY_REPORTED,\n exports.STATUSES.TRANSFORMATION_APPLIED,\n exports.STATUSES.IM_USED,\n exports.STATUSES.MISCELLANEOUS_PERSISTENT_WARNING,\n exports.STATUSES.MULTIPLE_CHOICES,\n exports.STATUSES.MOVED_PERMANENTLY,\n exports.STATUSES.FOUND,\n exports.STATUSES.SEE_OTHER,\n exports.STATUSES.NOT_MODIFIED,\n exports.STATUSES.USE_PROXY,\n exports.STATUSES.SWITCH_PROXY,\n exports.STATUSES.TEMPORARY_REDIRECT,\n exports.STATUSES.PERMANENT_REDIRECT,\n exports.STATUSES.BAD_REQUEST,\n exports.STATUSES.UNAUTHORIZED,\n exports.STATUSES.PAYMENT_REQUIRED,\n exports.STATUSES.FORBIDDEN,\n exports.STATUSES.NOT_FOUND,\n exports.STATUSES.METHOD_NOT_ALLOWED,\n exports.STATUSES.NOT_ACCEPTABLE,\n exports.STATUSES.PROXY_AUTHENTICATION_REQUIRED,\n exports.STATUSES.REQUEST_TIMEOUT,\n exports.STATUSES.CONFLICT,\n exports.STATUSES.GONE,\n exports.STATUSES.LENGTH_REQUIRED,\n exports.STATUSES.PRECONDITION_FAILED,\n exports.STATUSES.PAYLOAD_TOO_LARGE,\n exports.STATUSES.URI_TOO_LONG,\n exports.STATUSES.UNSUPPORTED_MEDIA_TYPE,\n exports.STATUSES.RANGE_NOT_SATISFIABLE,\n exports.STATUSES.EXPECTATION_FAILED,\n exports.STATUSES.IM_A_TEAPOT,\n exports.STATUSES.PAGE_EXPIRED,\n exports.STATUSES.ENHANCE_YOUR_CALM,\n exports.STATUSES.MISDIRECTED_REQUEST,\n exports.STATUSES.UNPROCESSABLE_ENTITY,\n exports.STATUSES.LOCKED,\n exports.STATUSES.FAILED_DEPENDENCY,\n exports.STATUSES.TOO_EARLY,\n exports.STATUSES.UPGRADE_REQUIRED,\n exports.STATUSES.PRECONDITION_REQUIRED,\n exports.STATUSES.TOO_MANY_REQUESTS,\n exports.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL,\n exports.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE,\n exports.STATUSES.LOGIN_TIMEOUT,\n exports.STATUSES.NO_RESPONSE,\n exports.STATUSES.RETRY_WITH,\n exports.STATUSES.BLOCKED_BY_PARENTAL_CONTROL,\n exports.STATUSES.UNAVAILABLE_FOR_LEGAL_REASONS,\n exports.STATUSES.CLIENT_CLOSED_LOAD_BALANCED_REQUEST,\n exports.STATUSES.INVALID_X_FORWARDED_FOR,\n exports.STATUSES.REQUEST_HEADER_TOO_LARGE,\n exports.STATUSES.SSL_CERTIFICATE_ERROR,\n exports.STATUSES.SSL_CERTIFICATE_REQUIRED,\n exports.STATUSES.HTTP_REQUEST_SENT_TO_HTTPS_PORT,\n exports.STATUSES.INVALID_TOKEN,\n exports.STATUSES.CLIENT_CLOSED_REQUEST,\n exports.STATUSES.INTERNAL_SERVER_ERROR,\n exports.STATUSES.NOT_IMPLEMENTED,\n exports.STATUSES.BAD_GATEWAY,\n exports.STATUSES.SERVICE_UNAVAILABLE,\n exports.STATUSES.GATEWAY_TIMEOUT,\n exports.STATUSES.HTTP_VERSION_NOT_SUPPORTED,\n exports.STATUSES.VARIANT_ALSO_NEGOTIATES,\n exports.STATUSES.INSUFFICIENT_STORAGE,\n exports.STATUSES.LOOP_DETECTED,\n exports.STATUSES.BANDWIDTH_LIMIT_EXCEEDED,\n exports.STATUSES.NOT_EXTENDED,\n exports.STATUSES.NETWORK_AUTHENTICATION_REQUIRED,\n exports.STATUSES.WEB_SERVER_UNKNOWN_ERROR,\n exports.STATUSES.WEB_SERVER_IS_DOWN,\n exports.STATUSES.CONNECTION_TIMEOUT,\n exports.STATUSES.ORIGIN_IS_UNREACHABLE,\n exports.STATUSES.TIMEOUT_OCCURED,\n exports.STATUSES.SSL_HANDSHAKE_FAILED,\n exports.STATUSES.INVALID_SSL_CERTIFICATE,\n exports.STATUSES.RAILGUN_ERROR,\n exports.STATUSES.SITE_IS_OVERLOADED,\n exports.STATUSES.SITE_IS_FROZEN,\n exports.STATUSES.IDENTITY_PROVIDER_AUTHENTICATION_ERROR,\n exports.STATUSES.NETWORK_READ_TIMEOUT,\n exports.STATUSES.NETWORK_CONNECT_TIMEOUT,\n];\nexports.ALPHA = [];\nfor (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) {\n // Upper case\n exports.ALPHA.push(String.fromCharCode(i));\n // Lower case\n exports.ALPHA.push(String.fromCharCode(i + 0x20));\n}\nexports.NUM_MAP = {\n 0: 0, 1: 1, 2: 2, 3: 3, 4: 4,\n 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,\n};\nexports.HEX_MAP = {\n 0: 0, 1: 1, 2: 2, 3: 3, 4: 4,\n 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,\n A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF,\n a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf,\n};\nexports.NUM = [\n '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n];\nexports.ALPHANUM = exports.ALPHA.concat(exports.NUM);\nexports.MARK = ['-', '_', '.', '!', '~', '*', '\\'', '(', ')'];\nexports.USERINFO_CHARS = exports.ALPHANUM\n .concat(exports.MARK)\n .concat(['%', ';', ':', '&', '=', '+', '$', ',']);\n// TODO(indutny): use RFC\nexports.URL_CHAR = [\n '!', '\"', '$', '%', '&', '\\'',\n '(', ')', '*', '+', ',', '-', '.', '/',\n ':', ';', '<', '=', '>',\n '@', '[', '\\\\', ']', '^', '_',\n '`',\n '{', '|', '}', '~',\n].concat(exports.ALPHANUM);\nexports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']);\n/* Tokens as defined by rfc 2616. Also lowercases them.\n * token = 1*\n * separators = \"(\" | \")\" | \"<\" | \">\" | \"@\"\n * | \",\" | \";\" | \":\" | \"\\\" | <\">\n * | \"/\" | \"[\" | \"]\" | \"?\" | \"=\"\n * | \"{\" | \"}\" | SP | HT\n */\nexports.TOKEN = [\n '!', '#', '$', '%', '&', '\\'',\n '*', '+', '-', '.',\n '^', '_', '`',\n '|', '~',\n].concat(exports.ALPHANUM);\n/*\n * Verify that a char is a valid visible (printable) US-ASCII\n * character or %x80-FF\n */\nexports.HEADER_CHARS = ['\\t'];\nfor (let i = 32; i <= 255; i++) {\n if (i !== 127) {\n exports.HEADER_CHARS.push(i);\n }\n}\n// ',' = \\x44\nexports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44);\nexports.QUOTED_STRING = ['\\t', ' '];\nfor (let i = 0x21; i <= 0xff; i++) {\n if (i !== 0x22 && i !== 0x5c) { // All characters in ASCII except \\ and \"\n exports.QUOTED_STRING.push(i);\n }\n}\nexports.HTAB_SP_VCHAR_OBS_TEXT = ['\\t', ' '];\n// VCHAR: https://tools.ietf.org/html/rfc5234#appendix-B.1\nfor (let i = 0x21; i <= 0x7E; i++) {\n exports.HTAB_SP_VCHAR_OBS_TEXT.push(i);\n}\n// OBS_TEXT: https://datatracker.ietf.org/doc/html/rfc9110#name-collected-abnf\nfor (let i = 0x80; i <= 0xff; i++) {\n exports.HTAB_SP_VCHAR_OBS_TEXT.push(i);\n}\nexports.MAJOR = exports.NUM_MAP;\nexports.MINOR = exports.MAJOR;\nexports.SPECIAL_HEADERS = {\n 'connection': exports.HEADER_STATE.CONNECTION,\n 'content-length': exports.HEADER_STATE.CONTENT_LENGTH,\n 'proxy-connection': exports.HEADER_STATE.CONNECTION,\n 'transfer-encoding': exports.HEADER_STATE.TRANSFER_ENCODING,\n 'upgrade': exports.HEADER_STATE.UPGRADE,\n};\nexports.default = {\n ERROR: exports.ERROR,\n TYPE: exports.TYPE,\n FLAGS: exports.FLAGS,\n LENIENT_FLAGS: exports.LENIENT_FLAGS,\n METHODS: exports.METHODS,\n STATUSES: exports.STATUSES,\n FINISH: exports.FINISH,\n HEADER_STATE: exports.HEADER_STATE,\n ALPHA: exports.ALPHA,\n NUM_MAP: exports.NUM_MAP,\n HEX_MAP: exports.HEX_MAP,\n NUM: exports.NUM,\n ALPHANUM: exports.ALPHANUM,\n MARK: exports.MARK,\n USERINFO_CHARS: exports.USERINFO_CHARS,\n URL_CHAR: exports.URL_CHAR,\n HEX: exports.HEX,\n TOKEN: exports.TOKEN,\n HEADER_CHARS: exports.HEADER_CHARS,\n CONNECTION_TOKEN_CHARS: exports.CONNECTION_TOKEN_CHARS,\n QUOTED_STRING: exports.QUOTED_STRING,\n HTAB_SP_VCHAR_OBS_TEXT: exports.HTAB_SP_VCHAR_OBS_TEXT,\n MAJOR: exports.MAJOR,\n MINOR: exports.MINOR,\n SPECIAL_HEADERS: exports.SPECIAL_HEADERS,\n METHODS_HTTP: exports.METHODS_HTTP,\n METHODS_ICE: exports.METHODS_ICE,\n METHODS_RTSP: exports.METHODS_RTSP,\n METHOD_MAP: exports.METHOD_MAP,\n H_METHOD_MAP: exports.H_METHOD_MAP,\n STATUSES_HTTP: exports.STATUSES_HTTP,\n};\n","'use strict'\n\nconst { Buffer } = require('node:buffer')\n\nconst wasmBase64 = 'AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAg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RAIAAgATYCAEHI1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgL5YUCAgd/A34gASACaiEEAkAgACIDKAIMIgANACADKAIEBEAgAyABNgIECyMAQRBrIgkkAAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQA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AygCOCICRQ0AIAIoAlwiAkUNACADIAIRAAAhAAsgAEUN5gIgAEEVRgRAIANBJDYCHCADIAE2AhQgA0GbGzYCECADQRU2AgxBACECDJQDC0EAIQIgA0EANgIcIAMgATYCFCADQZAONgIQIANBFDYCDAyTAwtBACECIANBADYCHCADIAE2AhQgA0G+IDYCECADQQI2AgwMkgMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABIAynaiIBEDIiAEUNKyADQQc2AhwgAyABNgIUIAMgADYCDAyRAwsgAy0ALkHAAHFFDQELQQAhAAJAIAMoAjgiAkUNACACKAJYIgJFDQAgAyACEQAAIQALIABFDSsgAEEVRgRAIANBCjYCHCADIAE2AhQgA0HrGTYCECADQRU2AgxBACECDJADC0EAIQIgA0EANgIcIAMgATYCFCADQZMMNgIQIANBEzYCDAyPAwtBACECIANBADYCHCADIAE2AhQgA0GCFTYCECADQQI2AgwMjgMLQQAhAiADQQA2AhwgAyABNgIUIANB3RQ2AhAgA0EZNgIMDI0DC0EAIQIgA0EANgIcIAMgATYCFCADQeYdNgIQIANBGTYCDAyMAwsgAEEVRg09QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIsDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFDSggA0ENNgIcIAMgATYCFCADIAA2AgwMigMLIABBFUYNOkEAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAyJAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMyIARQRAIAFBAWohAQwoCyADQQ42AhwgAyAANgIMIAMgAUEBajYCFAyIAwsgAEEVRg03QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIcDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDCcLIANBDzYCHCADIAA2AgwgAyABQQFqNgIUDIYDC0EAIQIgA0EANgIcIAMgATYCFCADQeIXNgIQIANBGTYCDAyFAwsgAEEVRg0zQQAhAiADQQA2AhwgAyABNgI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CC0EeIQIMwwILQR8hAgzCAgtBICECDMECC0EiIQIMwAILQSMhAgy/AgtBJSECDL4CC0HlACECDL0CCyADQT02AhwgAyABNgIUIAMgADYCDEEAIQIM1QILIANBGzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDNQCCyADQSA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzTAgsgA0ETNgIcIAMgATYCFCADQZgaNgIQIANBFTYCDEEAIQIM0gILIANBCzYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNECCyADQRA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzQAgsgA0EgNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIMzwILIANBCzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDM4CCyADQQw2AhwgAyABNgIUIANBpBw2AhAgA0EVNgIMQQAhAgzNAgtBACECIANBADYCHCADIAE2AhQgA0HdDjYCECADQRI2AgwMzAILAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB/QEhAgzMAgsCQAJAIAMtADZBAUcNAEEAIQACQCADKAI4IgJFDQAgAigCYCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUcNASADQfwBNgIcIAMgATYCFCADQdwZNgIQIANBFTYCDEEAIQIMzQILQdwBIQIMswILIANBADYCHCADIAE2AhQgA0H5CzYCECADQR82AgxBACECDMsCCwJAAkAgAy0AKEEBaw4CBAEAC0HbASECDLICC0HUASECDLECCyADQQI6ADFBACEAAkAgAygCOCICRQ0AIAIoAgAiAkUNACADIAIRAAAhAAsgAEUEQEHdASECDLECCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQbQMNgIQIANBEDYCDEEAIQIMygILIANB+wE2AhwgAyABNgIUIANBgRo2AhAgA0EVNgIMQQAhAgzJAgsgASAERgRAQfoBIQIMyQILIAEtAABByABGDQEgA0EBOgAoC0HAASECDK4CC0HaASECDK0CCyABIARHBEAgA0EMNgIIIAMgATYCBEHZASECDK0CC0H5ASECDMUCCyABIARGBEBB+AEhAgzFAgsgAS0AAEHIAEcNBCABQQFqIQFB2AEhAgyrAgsgASAERgRAQfcBIQIMxAILAkACQCABLQAAQcUAaw4QAAUFBQUFBQUFBQUFBQUFAQULIAFBAWohAUHWASECDKsCCyABQQFqIQFB1wEhAgyqAgtB9gEhAiABIARGDcICIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbrVAGotAABHDQMgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMMCCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIARQRAQeMBIQIMqgILIANB9QE2AhwgAyABNgIUIAMgADYCDEEAIQIMwgILQfQBIQIgASAERg3BAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEG41QBqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzCAgsgA0GBBDsBKCADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIADQMMAgsgA0EANgIAC0EAIQIgA0EANgIcIAMgATYCFCADQeUfNgIQIANBCDYCDAy/AgtB1QEhAgylAgsgA0HzATYCHCADIAE2AhQgAyAANgIMQQAhAgy9AgtBACEAAkAgAygCOCICRQ0AIAIoAkAiAkUNACADIAIRAAAhAAsgAEUNbiAAQRVHBEAgA0EANgIcIAMgATYCFCADQYIPNgIQIANBIDYCDEEAIQIMvQILIANBjwE2AhwgAyABNgIUIANB7Bs2AhAgA0EVNgIMQQAhAgy8AgsgASAERwRAIANBDTYCCCADIAE2AgRB0wEhAgyjAgtB8gEhAgy7AgsgASAERgRAQfEBIQIMuwILAkACQAJAIAEtAABByABrDgsAAQgICAgICAgIAggLIAFBAWohAUHQASECDKMCCyABQQFqIQFB0QEhAgyiAgsgAUEBaiEBQdIBIQIMoQILQfABIQIgASAERg25AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBtdUAai0AAEcNBCAAQQJGDQMgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuQILQe8BIQIgASAERg24AiADKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABBs9UAai0AAEcNAyAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuAILQe4BIQIgASAERg23AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMtwILIAMoAgQhACADQgA3AwAgAyAAIAVBAWoiARArIgBFDQIgA0HsATYCHCADIAE2AhQgAyAANgIMQQAhAgy2AgsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNnAIgA0HtATYCHCADIAE2AhQgAyAANgIMQQAhAgy0AgtBzwEhAgyaAgtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDLQCC0HOASECDJoCCyADQesBNgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMsgILIAEgBEYEQEHrASECDLICCyABLQAAQS9GBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GyODYCECADQQg2AgxBACECDLECC0HNASECDJcCCyABIARHBEAgA0EONgIIIAMgATYCBEHMASECDJcCC0HqASECDK8CCyABIARGBEBB6QEhAgyvAgsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFBywEhAgyWAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZcCIANB6AE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAEgBEYEQEHnASECDK4CCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5gE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILQcoBIQIMlAILIAEgBEYEQEHlASECDK0CC0EAIQBBASEFQQEhB0EAIQICQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQCABLQAAQTBrDgoKCQABAgMEBQYICwtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshAkEAIQVBACEHDAILQQkhAkEBIQBBACEFQQAhBwwBC0EAIQVBASECCyADIAI6ACsgAUEBaiEBAkACQCADLQAuQRBxDQACQAJAAkAgAy0AKg4DAQACBAsgB0UNAwwCCyAADQEMAgsgBUUNAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDQIgA0HiATYCHCADIAE2AhQgAyAANgIMQQAhAgyvAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZoCIANB4wE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ2YAiADQeQBNgIcIAMgATYCFCADIAA2AgwMrQILQckBIQIMkwILQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANBpA02AhAgA0EhNgIMQQAhAgytAgtByAEhAgyTAgsgA0HhATYCHCADIAE2AhQgA0HQGjYCECADQRU2AgxBACECDKsCCyABIARGBEBB4QEhAgyrAgsCQCABLQAAQSBGBEAgA0EAOwE0IAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANBmRE2AhAgA0EJNgIMQQAhAgyrAgtBxwEhAgyRAgsgASAERgRAQeABIQIMqgILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyrAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqgILQcYBIQIMkAILIAEgBEYEQEHfASECDKkCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqgILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKkCC0HFASECDI8CCyABIARGBEBB3gEhAgyoAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKkCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyoAgtBxAEhAgyOAgsgASAERgRAQd0BIQIMpwILAkACQAJAAkAgAS0AAEEKaw4XAgMDAAMDAwMDAwMDAwMDAwMDAwMDAwEDCyABQQFqDAULIAFBAWohAUHDASECDI8CCyABQQFqIQEgA0Evai0AAEEBcQ0IIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKcCCyADQQA2AhwgAyABNgIUIANBjQs2AhAgA0ENNgIMQQAhAgymAgsgASAERwRAIANBDzYCCCADIAE2AgRBASECDI0CC0HcASECDKUCCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtB2wEhAgymAgsgAygCBCEAIANBADYCBCADIAAgARAtIgBFBEAgAUEBaiEBDAQLIANB2gE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMpQILIAMoAgQhACADQQA2AgQgAyAAIAEQLSIADQEgAUEBagshAUHBASECDIoCCyADQdkBNgIcIAMgADYCDCADIAFBAWo2AhRBACECDKICC0HCASECDIgCCyADQS9qLQAAQQFxDQEgA0EANgIcIAMgATYCFCADQeQcNgIQIANBGTYCDEEAIQIMoAILIAEgBEYEQEHZASECDKACCwJAAkACQCABLQAAQQprDgQBAgIAAgsgAUEBaiEBDAILIAFBAWohAQwBCyADLQAuQ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IBRw0ACyADIAU2AgAMgAILIANBADYCACAGQQFqIQFBHQwsCyABIARGBEBBugEhAgz/AQsCQAJAIAEtAABByQBrDgcBLi4uLi4ALgsgAUEBaiEBQaEBIQIM5gELIAFBAWohAUEiDCsLIAEgBEYEQEG5ASECDP4BCyABLQAAQdAARw0rIAFBAWohAUGgASECDOQBCyABIARGBEBBuAEhAgz9AQsCQAJAIAEtAABBxgBrDgsALCwsLCwsLCwsASwLIAFBAWohAUGeASECDOQBCyABQQFqIQFBnwEhAgzjAQtBtwEhAiABIARGDfsBIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQezUAGotAABHDSggAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPwBCyADQQA2AgAgBkEBaiEBQQ0MKAtBtgEhAiABIARGDfoBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQaHVAGotAABHDScgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPsBCyADQQA2AgAgBkEBaiEBQQwMJwtBtQEhAiABIARGDfkBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQerUAGotAABHDSYgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPoBCyADQQA2AgAgBkEBaiEBQQMMJgtBtAEhAiABIARGDfgBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQejUAGotAABHDSUgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPkBCyADQQA2AgAgBkEBaiEBQSYMJQsgASAERgRAQbMBIQIM+AELAkACQCABLQAAQdQAaw4CAAEnCyABQQFqIQFBmQEhAgzfAQsgAUEBaiEBQZoBIQIM3gELQbIBIQIgASAERg32ASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHm1ABqLQAARw0jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALI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yABIARGBEBBmAEhAgzcAQsCQAJAIAEtAABBzgBrDgMACwELCyABQQFqIQFB/gAhAgzDAQsgAUEBaiEBQf8AIQIMwgELIAEgBEYEQEGXASECDNsBCyABLQAAQdkARw0IIAFBAWohAUEIDAcLQZYBIQIgASAERg3ZASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEGs1ABqLQAARw0GIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzaAQsgA0EANgIAIAZBAWohAUEFDAYLQZUBIQIgASAERg3YASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGm1ABqLQAARw0FIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzZAQsgA0EANgIAIAZBAWohAUEWDAULQZQBIQIgASAERg3XASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGh1QBqLQAARw0EIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzYAQsgA0EANgIAIAZBAWohAUEQDAQLIAEgBEYEQEGTASECDNcBCwJAAkAgAS0AAEHDAGsODAAGBgYGBgYGBgYGAQYLIAFBAWohAUH5ACECDL4BCyABQQFqIQFB+gAhAgy9AQtBkgEhAiABIARGDdUBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQaDUAGotAABHDQIgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNYBCyADQQA2AgAgBkEBaiEBQSQMAgsgA0EANgIADAILIAEgBEYEQEGRASECDNQBCyABLQAAQcwARw0BIAFBAWohAUETCzoAKSADKAIEIQAgA0EANgIEIAMgACABEC4iAA0CDAELQQAhAiADQQA2AhwgAyABNgIUIANB/h82AhAgA0EGNgIMDNEBC0H4ACECDLcBCyADQZABNgIcIAMgATYCFCADIAA2AgxBACECDM8BC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ0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BAWoLIQFBBSECDJQBCyABQQFqDAYLIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIANBADYCHCADIAE2AhQgA0GNFDYCECADQQc2AgxBACECDKgBCwJAAkACQAJAA0AgAS0AAEGgygBqLQAAIgBBBUcEQAJAIABBAWsOBi4DBAUGAAYLQegAIQIMlAELIAQgAUEBaiIBRw0AC0H9ACECDKsBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQdsANgIcIAMgATYCFCADIAA2AgxBACECDKoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDKkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQfoANgIcIAMgATYCFCADIAA2AgxBACECDKgBCyADQQA2AhwgAyABNgIUIANB5Ag2AhAgA0EHNgIMQQAhAgynAQsgASAERg0BIAFBAWoLIQFBBiECDIwBC0H8ACECDKQBCwJAAkACQAJAA0AgAS0AAEGgyABqLQAAIgBBBUcEQCAAQQFrDgQpAgMEBQsgBCABQQFqIgFHDQALQfsAIQIMpwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMpgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMpQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMpAELIANBADYCHCADIAE2AhQgA0G8CjYCECADQQc2AgxBACECDKMBC0HPACECDIkBC0HRACECDIgBC0HnACECDIcBCyABIARG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IAZBAWoiARArIgAEQCADQfEANgIcIAMgATYCFCADIAA2AgxBACECDJkBC0HfACECDH8LQQAhAAJAIAMoAjgiAkUNACACKAI0IgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANB6g02AhAgA0EmNgIMQQAhAgyZAQtB3gAhAgx/CyADQfAANgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMlwELIAMtAClBIUYNBiADQQA2AhwgAyABNgIUIANBkQo2AhAgA0EINgIMQQAhAgyWAQtB7wAhAiABIARGDZUBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDVAGotAABHDQIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJYBCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQKyIARQ0CIANB7QA2AhwgAyABNgIUIAMgADYCDEEAIQIMlQELIANBADYCAAsgAygCBCEAIANBADYCBCADIAAgARArIgBFDYABIANB7gA2AhwgAyABNgIUIAMgADYCDEEAIQIMkwELQdwAIQIMeQtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJMBC0HbACECDHkLIANB7AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyRAQsgAy0AKSIAQSNJDQAgAEEuRg0AIANBADYCHCADIAE2AhQgA0HJCTYCECADQQg2AgxBACECDJABC0HaACECDHYLIAEgBEYEQEHrACECDI8BCwJAIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMjwELQdkAIQIMdQsgASAERwRAIANBDjYCCCADIAE2AgRB2AAhAgx1C0HqACECDI0BCyABIARGBEBB6QAhAgyNAQsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFB1wAhAgx0CyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeiADQegANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyABIARGBEBB5wAhAgyMAQsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ17IANB5gA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELQdYAIQIMcgsgASAERgRAQeUAIQIMiwELQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIANgIcIAMgATYCFCADIAA2AgxBACECDI0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNfSADQeMANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeyADQeQANgIcIAMgATYCFCADIAA2AgwMiwELQdQAIQIMcQsgAy0AKUEiRg2GAUHTACECDHALQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALIABFBEBB1QAhAgxwCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQaQNNgIQIANBITYCDEEAIQIMiQELIANB4QA2AhwgAyABNgIUIANB0Bo2AhAgA0EVNgIMQQAhAgyIAQsgASAERgRAQeAAIQIMiAELAkACQAJAAkACQCABLQAAQQprDgQBBAQABAsgAUEBaiEBDAELIAFBAWohASADQS9qLQAAQQFxRQ0BC0HSACECDHALIANBADYCHCADIAE2AhQgA0G2ETYCECADQQk2AgxBACECDIgBCyADQQA2AhwgAyABNgIUIANBthE2AhAgA0EJNgIMQQAhAgyHAQsgASAERgRAQd8AIQIMhwELIAEtAABBCkYEQCABQQFqIQEMCQsgAy0ALkHAAHENCCADQQA2AhwgAyABNgIUIANBthE2AhAgA0ECNgIMQQAhAgyGAQsgASAERgRAQd0AIQIMhgELIAEtAAAiAkENRgRAIAFBAWohAUHQACECDG0LIAEhACACQQlrDgQFAQEFAQsgBCABIgBGBEBB3AAhAgyFAQsgAC0AAEEKRw0AIABBAWoMAgtBACECIANBADYCHCADIAA2AhQgA0HKLTYCECADQQc2AgwMgwELIAEgBEYEQEHbACECDIMBCwJAIAEtAABBCWsOBAMAAAMACyABQQFqCyEBQc4AIQIMaAsgASAERgRAQdoAIQIMgQELIAEtAABBCWsOBAABAQABC0EAIQIgA0EANgIcIANBmhI2AhAgA0EHNgIMIAMgAUEBajYCFAx/CyADQYASOwEqQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2QA2AhwgAyABNgIUIANB6ho2AhAgA0EVNgIMQQAhAgx+C0HNACECDGQLIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDHwLIAEgBEYEQEHZACECDHwLIAEtAABBIEcNPSABQQFqIQEgAy0ALkEBcQ09IANBADYCHCADIAE2AhQgA0HCHDYCECADQR42AgxBACECDHsLIAEgBEYEQEHYACECDHsLAkACQAJAAkACQCABLQAAIgBBCmsOBAIDAwABCyABQQFqIQFBLCECDGULIABBOkcNASADQQA2AhwgAyABNgIUIANB5xE2AhAgA0EKNgIMQQAhAgx9CyABQQFqIQEgA0Evai0AAEEBcUUNcyADLQAyQYABcUUEQCADQTJqIQIgAxA1QQAhAAJAIAMoAjgiBkUNACAGKAIoIgZFDQAgAyAGEQAAIQALAkACQCAADhZNTEsBAQEBAQEBAQEBAQEBAQEBAQEAAQsgA0EpNgIcIAMgATYCFCADQawZNgIQIANBFTYCDEEAIQIMfgsgA0EANgIcIAMgATYCFCADQeULNgIQIANBETYCDEEAIQIMfQtBACEAAkAgAygCOCICRQ0AIAIo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ELQT4hAgw7CyADQQA6ACwLQTkhAgw5CyABIARGBEBBNiECDFILAkACQAJAAkACQCABLQAAQQprDgQAAgIBAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFDQIgA0EzNgIcIAMgATYCFCADIAA2AgxBACECDFULIAMoAgQhACADQQA2AgQgAyAAIAEQMSIARQRAIAFBAWohAQwGCyADQTI2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMVAsgAy0ALkEBcQRAQd8BIQIMOwsgAygCBCEAIANBADYCBCADIAAgARAxIgANAQxJC0E0IQIMOQsgA0E1NgIcIAMgATYCFCADIAA2AgxBACECDFELQTUhAgw3CyADQS9qLQAAQQFxDQAgA0EANgIcIAMgATYCFCADQesWNgIQIANBGTYCDEEAIQIMTwtBMyECDDULIAEgBEYEQEEyIQIMTgsCQCABLQAAQQpGBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GSFzYCECADQQM2AgxBACECDE4LQTIhAgw0CyABIARGBEBBMSECDE0LAkAgAS0AACIAQQlGDQAgAEEgRg0AQQEhAgJAIAMtACxBBWsOBAYEBQANCyADIAMvATJBCHI7ATIMDAsgAy0ALkEBcUUNASADLQAsQQhHDQAgA0EAOgAsC0E9IQIMMgsgA0EANgIcIAMgATYCFCADQcIWNgIQIANBCjYCDEEAIQIMSgtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiACcjsBMgwGCyABIARGBEBBMCECDEcLIAEtAABBCkYEQCABQQFqIQEMAQsgAy0ALkEBcQ0AIANBADYCHCADIAE2AhQgA0HcKDYCECADQQI2AgxBACECDEYLQTAhAgwsCyABQQFqIQFBMSECDCsLIAEgBEYEQEEvIQIMRAsgAS0AACIAQQlHIABBIEdxRQRAIAFBAWohASADLQAuQQFxDQEgA0EANgIcIAMgATYCFCADQZcQNgIQIANBCjYCDEEAIQIMRAtBASECAkACQAJAAkACQAJAIAMtACxBAmsOBwUEBAMBAgAECyADIAMvATJBCHI7ATIMAwtBAiECDAELQQQhAgsgA0EBOg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BQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAQanMAAsEAQAAAQBBwcwAC14CAgACAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAEGpzgALBQECAAEDAEHAzgALXwQFAAAFBQUFBQUFBQUFBQYFBQUFBQUFBQUFBQUABQAHCAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQAFAAUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEGp0AALBQEBAAEBAEHA0AALAQEAQdrQAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQanSAAsFAQEAAQEAQcDSAAsBAQBBytIACwYCAAAAAAIAQeHSAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw=='\n\nlet wasmBuffer\n\nObject.defineProperty(module, 'exports', {\n get: () => {\n return wasmBuffer\n ? wasmBuffer\n : (wasmBuffer = Buffer.from(wasmBase64, 'base64'))\n }\n})\n","'use strict'\n\nconst { Buffer } = require('node:buffer')\n\nconst wasmBase64 = 'AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21l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AIAQ2AgAMAQsgBEH/AU0EQCAEQXhxQezVAGohAAJ/QcTVACgCACICQQEgBEEDdnQiA3FFBEBBxNUAIAIgA3I2AgAgAAwBCyAAKAIICyICIAE2AgwgACABNgIIIAEgADYCDCABIAI2AggMAQtBHyECIARB////B00EQCAEQSYgBEEIdmciAGt2QQFxIABBAXRrQT5qIQILIAEgAjYCHCABQgA3AhAgAkECdEH01wBqIQACQEHI1QAoAgAiA0EBIAJ0IgdxRQRAIAAgATYCAEHI1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgLhocCAwd/A34BeyABIAJqIQQCQCAAIgMoAgwiAA0AIAMoAgQEQCADIAE2AgQLIwBBEGsiCSQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQA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QRAIAFBAWohAQzvAgsgA0EaNgIcIAMgADYCDCADIAFBAWo2AhQM9QILIABBFUYNH0EAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAz0AgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDBsLIANBHDYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgzzAgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDOsCCyADQR02AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM8gILIABBO0cNASABQQFqIQELQSYhAgzXAgtBACECIANBADYCHCADIAE2AhQgA0GfFTYCECADQQw2AgwM7wILIAEgBEcEQANAIAEtAABBIEcNhAIgBCABQQFqIgFHDQALQSwhAgzvAgtBLCECDO4CCyABIARGBEBBNCECDO4CCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtBNCECDO8CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNnwIgA0EyNgIcIAMgATYCFCADIAA2AgxBACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUEQCABQQFqIQEMnwILIANBMjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgztAgsgASAERwRAAkADQCABLQAAQTBrIgBB/wFxQQpPBEBBOiECDNcCCyADKQMgIgtCmbPmzJmz5swZVg0BIAMgC0IKfiIKNwMgIAogAK1C/wGDIgtCf4VWDQEgAyAKIAt8NwMgIAQgAUEBaiIBRw0AC0HAACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABQQFqIgEQMSIADRcM4gILQcAAIQIM7AILIAEgBEYEQEHJACECDOwCCwJAA0ACQCABLQAAQQlrDhgAAqICogKpAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAgCiAgsgBCABQQFqIgFHDQALQckAIQIM7AILIAFBAWohASADQS9qLQAAQQFxDaUCIANBADYCHCADIAE2AhQgA0GXEDYCECADQQo2AgxBACECDOsCCyABIARHBEADQCABLQAAQS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AgAigCACICRQ0AIAMgAhEAACEACyAARQRAQd0BIQIMsQILIABBFUcEQCADQQA2AhwgAyABNgIUIANBtAw2AhAgA0EQNgIMQQAhAgzKAgsgA0H7ATYCHCADIAE2AhQgA0GBGjYCECADQRU2AgxBACECDMkCCyABIARGBEBB+gEhAgzJAgsgAS0AAEHIAEYNASADQQE6ACgLQcABIQIMrgILQdoBIQIMrQILIAEgBEcEQCADQQw2AgggAyABNgIEQdkBIQIMrQILQfkBIQIMxQILIAEgBEYEQEH4ASECDMUCCyABLQAAQcgARw0EIAFBAWohAUHYASECDKsCCyABIARGBEBB9wEhAgzEAgsCQAJAIAEtAABBxQBrDhAABQUFBQUFBQUFBQUFBQUBBQsgAUEBaiEBQdYBIQIMqwILIAFBAWohAUHXASECDKoCC0H2ASECIAEgBEYNwgIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABButUAai0AAEcNAyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMwwILIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgBFBEBB4wEhAgyqAgsgA0H1ATYCHCADIAE2AhQgAyAANgIMQQAhAgzCAgtB9AEhAiABIARGDcECIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjVAGotAABHDQIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMICCyADQYEEOwEoIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgANAwwCCyADQQA2AgALQQAhAiADQQA2AhwgAyABNgIUIANB5R82AhAgA0EINgIMDL8CC0HVASECDKUCCyADQfMBNgIcIAMgATYCFCADIAA2AgxBACECDL0CC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ1uIABBFUcEQCADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgy9AgsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDLwCCyABIARHBEAgA0ENNgIIIAMgATYCBEHTASECDKMCC0HyASECDLsCCyABIARGBEBB8QEhAgy7AgsCQAJAAkAgAS0AAEHIAGsOCwABCAgICAgICAgCCAsgAUEBaiEBQdABIQIMowILIAFBAWohAUHRASECDKICCyABQQFqIQFB0gEhAgyhAgtB8AEhAiABIARGDbkCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEG11QBqLQAARw0EIABBAkYNAyAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy5AgtB7wEhAiABIARGDbgCIAMoAgAiACAEIAFraiEGIAEgAGtBAWohBQNAIAEtAAAgAEGz1QBqLQAARw0DIABBAUYNAiAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy4AgtB7gEhAiABIARGDbcCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEGw1QBqLQAARw0CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy3AgsgAygCBCEAIANCADcDACADIAAgBUEBaiIBECsiAEUNAiADQewBNgIcIAMgATYCFCADIAA2AgxBACECDLYCCyADQQA2AgALIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ2cAiADQe0BNgIcIAMgATYCFCADIAA2AgxBACECDLQCC0HPASECDJoCC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMtAILQc4BIQIMmgILIANB6wE2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyyAgsgASAERgRAQesBIQIMsgILIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMsQILQc0BIQIMlwILIAEgBEcEQCADQQ42AgggAyABNgIEQcwBIQIMlwILQeoBIQIMrwILIAEgBEYEQEHpASECDK8CCyABLQAAQTBrIgBB/wFxQQpJBEAgAyAAOgAqIAFBAWohAUHLASECDJYCCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNlwIgA0HoATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgASAERgRAQecBIQIMrgILAkAgAS0AAEEuRgRAIAFBAWohAQwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmAIgA0HmATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgtBygEhAgyUAgsgASAERgRAQeUBIQIMrQILQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIBNgIcIAMgATYCFCADIAA2AgxBACECDK8CCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmgIgA0HjATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5AE2AhwgAyABNgIUIAMgADYCDAytAgtByQEhAgyTAgtBACEAAkAgAygCOCICRQ0AIAIoAkQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GkDTYCECADQSE2AgxBACECDK0CC0HIASECDJMCCyADQeEBNgIcIAMgATYCFCADQdAaNgIQIANBFTYCDEEAIQIMqwILIAEgBEYEQEHhASECDKsCCwJAIAEtAABBIEYEQCADQQA7ATQgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GZETYCECADQQk2AgxBACECDKsCC0HHASECDJECCyABIARGBEBB4AEhAgyqAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKsCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyqAgtBxgEhAgyQAgsgASAERgRAQd8BIQIMqQILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyqAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqQILQcUBIQIMjwILIAEgBEYEQEHeASECDKgCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqQILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKgCC0HEASECDI4CCyABIARGBEBB3QEhAgynAgsCQAJAAkACQCABLQAAQQprDhcCAwMAAwMDAwMDAwMDAwMDAwMDAwMDAQMLIAFBAWoMBQsgAUEBaiEBQcMBIQIMjwILIAFBAWohASADQS9qLQAAQQFxDQggA0EANgIcIAMgATYCFCADQY0LNgIQIANBDTYCDEEAIQIMpwILIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKYCCyABIARHBEAgA0EPNgIIIAMgATYCBEEBIQIMjQILQdwBIQIMpQILAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0HbASECDKYCCyADKAIEIQAgA0EANgIEIAMgACABEC0iAEUEQCABQQFqIQEMBAsgA0HaATYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgylAgsgAygCBCEAIANBADYCBCADIAAgARAtIgANASABQQFqCyEBQcEBIQIMigILIANB2QE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMogILQcIBIQIMiAILIANBL2otAABBAXENASADQQA2AhwgAyABNgIUIANB5Bw2AhAgA0EZNgIMQQAhAgygAgsgASAERgRAQdkBIQIMoAILAkACQAJAIAEtAABBCmsOBAECAgACCyABQQFqIQEMAgsgAUEBaiEBDAELIAMtAC5BwABxRQ0BC0EAIQACQCADKAI4IgJFDQAgAigCPCICRQ0AIAMgAhEAACEACyAARQ2gASAAQRVGBEAgA0HZADYCHCADIAE2AhQgA0G3GjYCECADQRU2AgxBACECDJ8CCyADQQA2AhwgAyABNgIUIANBgA02AhAgA0EbNgIMQQAhAgyeAgsgA0EANgIcIAMgATYCFCADQdwoNgIQIANBAjYCDEEAIQIMnQILIAEgBEcEQCADQQw2AgggAyABNgIEQb8BIQIMhAILQdgBIQIMnAILIAEgBEYEQEHXASECDJwCCwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEHBAGsOFQABAgNaBAUGWlpaBwgJCgsMDQ4PEFoLIAFBAWohAUH7ACECDJICCyABQQFqIQFB/AAhAgyRAgsgAUEBaiEBQYEBIQIMkAILIAFBAWohAUGFASECDI8CCyABQQFqIQFBhgEhAgyOAgsgAUEBaiEBQYkBIQIMjQILIAFBAWohAUGKASECDIwCCyABQQFqIQFBjQEhAgyLAgsgAUEBaiEBQZYBIQIMigILIAFBAWohAUGXASECDIkCCyABQQFqIQFBmAEhAgyIAgsgAUEBaiEBQaUBIQIMhwILIAFBAWohAUGmASECDIYCCyABQQFqIQFBrAEhAgyFAgsgAUEBaiEBQbQBIQIMhAILIAFBAWohAUG3ASECDIMCCyABQQFqIQFBvgEhAgyCAgsgASAERgRAQdYBIQIMmwILIAEtAABBzgBHDUggAUEBaiEBQb0BIQIMgQILIAEgBEYEQEHVASECDJoCCwJAAkACQCABLQAAQcIAaw4SAEpKSkpKSkpKSgFK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gAEGY1QBqLQAARw0+IABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAySAgsgA0EANgIAIAZBAWohAUEoDD4LIAEgBEYEQEHMASECDJECCwJAAkACQCABLQAAQcUAaw4RAEFBQUFBQUFBQQFBQUFBQQJBCyABQQFqIQFBsQEhAgz5AQsgAUEBaiEBQbIBIQIM+AELIAFBAWohAUGzASECDPcBC0HLASECIAEgBEYNjwIgAygCACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCABLQAAIABBkdUAai0AAEcNPCAAQQZGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkAILIANBADYCACAGQQFqIQFBGgw8C0HKASECIAEgBEYNjgIgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBjdUAai0AAEcNOyAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMjwILIANBADYCACAGQQFqIQFBIQw7CyABIARGBEBByQEhAgyOAgsCQAJAIAEtAABBwQBrDhQAPT09PT09PT09PT09PT09PT09AT0LIAFBAWohAUGtASECDPUBCyABQQFqIQFBsAEhAgz0AQsgASAERgRAQcgBIQIMjQILAkACQCABLQAAQdUAaw4LADw8PDw8PDw8PAE8CyABQQFqIQFBrgEhAgz0AQsgAUEBaiEBQa8BIQIM8wELQccBIQIgASAERg2LAiADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw04IABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyMAgsgA0EANgIAIAZBAWohAUEqDDgLIAEgBEYEQEHGASECDIsCCyABLQAAQdAARw04IAFBAWohAUElDDcLQcUBIQIgASAERg2JAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGB1QBqLQAARw02IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyKAgsgA0EANgIAIAZBAWohAUEODDYLIAEgBEYEQEHEASEC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QAAQcEAaw4DACABIAsgAUEBaiEBQZABIQIM2AELIAFBAWohAUGTASECDNcBCyABIARGBEBBqwEhAgzwAQsCQAJAIAEtAABBwQBrDg8AHx8fHx8fHx8fHx8fHwEfCyABQQFqIQFBkQEhAgzXAQsgAUEBaiEBQZIBIQIM1gELIAEgBEYEQEGqASECDO8BCyABLQAAQcwARw0cIAFBAWohAUEKDBsLQakBIQIgASAERg3tASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHR1ABqLQAARw0aIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzuAQsgA0EANgIAIAZBAWohAUEeDBoLQagBIQIgASAERg3sASADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEHK1ABqLQAARw0ZIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAztAQsgA0EANgIAIAZBAWohAUEVDBkLQacBIQIgASAERg3rASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHH1ABqLQAARw0YIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzsAQsgA0EANgIAIAZBAWohAUEXDBgLQaYBIQIgASAERg3qASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHB1ABqLQAARw0XIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzrAQsgA0EANgIAIAZBAWohAUEYDBcLIAEgBEYEQEGlASECDOoBCwJAAkAgAS0AAEHJAGsOBwAZGRkZGQEZCyABQQFqIQFBiwEhAgzRAQsgAUEBaiEBQYwBIQIM0AELQaQBIQIgASAERg3oASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm1QBqLQAARw0VIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzpAQsgA0EANgIAIAZBAWohAUEJDBULQaMBIQIgASAERg3nASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk1QBqLQAARw0UIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzoAQsgA0EANgIAIAZBAWohAUEfDBQLQaIBIQIgASAERg3mASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEG+1ABqLQAARw0TIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAznAQsgA0EANgIAIAZBAWohAUECDBMLQaEBIQIgASAERg3lASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYDQCABLQAAIABBvNQAai0AAEcNESAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5QELIAEgBEYEQEGgASECDOUBC0EBIAEtAABB3wBHDREaIAFBAWohAUGHASECDMsBCyADQQA2AgAgBkEBaiEBQYgBIQIMygELQZ8BIQIgASAERg3iASADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw0PIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzjAQsgA0EANgIAIAZBAWohAUEpDA8LQZ4BIQIgASAERg3hASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEG41ABqLQAARw0OIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAziAQsgA0EANgIAIAZBAWohAUEtDA4LIAEgBEYEQEGdASECDOEBCyABLQAAQcUARw0OIAFBAWohAUGEASECDMcBCyABIARGBEBBnAEhAgzgAQsCQAJAIAEtAABBzABrDggADw8PDw8PAQ8LIAFBAWohAUGCASECDMcBCyABQQFqIQFBgwEhAgzGAQtBmwEhAiABIARGDd4BIAMoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQbPUAGotAABHDQsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADN8BCyADQQA2AgAgBkEBaiEBQSMMCwtBmgEhAiABIARGDd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sgASAERgRAQZEBIQIM1AELIAEtAABBzABHDQEgAUEBaiEBQRMLOgApIAMoAgQhACADQQA2AgQgAyAAIAEQLiIADQIMAQtBACECIANBADYCHCADIAE2AhQgA0H+HzYCECADQQY2AgwM0QELQfgAIQIMtwELIANBkAE2AhwgAyABNgIUIAMgADYCDEEAIQIMzwELQQAhAAJAIAMoAjgiAkUNACACKAJAIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GCDzYCECADQSA2AgxBACECDM4BC0H3ACECDLQBCyADQY8BNgIcIAMgATYCFCADQewbNgIQIANBFTYCDEEAIQIMzAELIAEgBEYEQEGPASECDMwBCwJAIAEtAABBIEYEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQZsfNgIQIANBBjYCDEEAIQIMzAELQQIhAgyyAQsDQCABLQAAQSBHDQIgBCABQQFqIgFHDQALQY4BIQIMygELIAEgBEYEQEGNASECDMoBCwJAIAEtAABBCWsOBEoAAEoAC0H1ACECDLABCyADLQApQQVGBEBB9gAhAgywAQtB9AAhAgyvAQsgASAERgRAQYwBIQIMyAELIANBEDYCCCADIAE2AgQMCgsgASAERgRAQYsBIQIMxwELAkAgAS0AAEEJaw4ERwAARwALQfMAIQIMrQELIAEgBEcEQCADQRA2AgggAyABNgIEQfEAIQIMrQELQYoBIQIMxQELAkAgASAERwRAA0AgAS0AAEGg0ABqLQAAIgBBA0cEQAJAIABBAWsOAkkABAtB8AAhAgyvAQsgBCABQQFqIgFHDQALQYgBIQIMxgELQYgBIQIMxQELIANBADYCHCADIAE2AhQgA0HbIDYCECADQQc2AgxBACECDMQBCyABIARGBEBBiQEhAgzEAQsCQAJAAkAgAS0AAEGg0gBqLQAAQQFrDgNGAgABC0HyACECDKwBCyADQQA2AhwgAyABNgIUIANBtBI2AhAgA0EHNgIMQQAhAgzEAQtB6gAhAgyqAQsgASAERwRAIAFBAWohAUHvACECDKoBC0GHASECDMIBCyAEIAEiAEYEQEGGASECDMIBCyAALQAAIgFBL0YEQCAAQQFqIQFB7gAhAgypAQsgAUEJayICQRdLDQEgACEBQQEgAnRBm4CABHENQQwBCyAEIAEiAEYEQEGFASECDMEBCyAALQAAQS9HDQAgAEEBaiEBDAMLQQAhAiADQQA2AhwgAyAANgIUIANB2yA2AhAgA0EHNgIMDL8BCwJAAkACQAJAAkADQCABLQAAQaDOAGotAAAiAEEFRwRAAkACQCAAQQFrDghHBQYHCAAEAQgLQesAIQIMrQELIAFBAWohAUHtACECDKwBCyAEIAFBAWoiAUcNAAtBhAEhAgzDAQsgAUEBagwUCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDMEBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDMABCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDL8BCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy+AQsgASAERgRAQYMBIQIMvgELAkAgAS0AAEGgzgBqLQAAQQFrDgg+BAUGAAgCAwcLIAFBAWohAQtBAyECDKMBCyABQQFqDA0LQQAhAiADQQA2AhwgA0HREjYCECADQQc2AgwgAyABQQFqNgIUDLoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDLkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDLgBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDLcBCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy2AQtB7AAhAgycAQsgASAERgRAQYIBIQIMtQELIAFBAWoMAgsgASAERgRAQYEBIQIMtAELIAFBAWoMAQsgASAERg0BIAFBAWoLIQFBBCECDJgBC0GAASECDLABCwNAIAEtAABBoMwAai0AACIAQQJHBEAgAEEBRwRAQekAIQIMmQELDDELIAQgAUEBaiIBRw0AC0H/ACECDK8BCyABIARGBEBB/gAhAgyvAQsCQCABLQAAQQlrDjcvAwYvBAYGBgYGBgYGBgYGBgYGBgYGBgUGBgIGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYABgsgAUEBagshAUEFIQIMlAELIAFBAWoMBgsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgyrAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyqAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgypAQsgA0EANgIcIAMgATYCFCADQY0UNgIQIANBBzYCDEEAIQIMqAELAkACQAJAAkADQCABLQAAQaDKAGotAAAiAEEFRwRAAkAgAEEBaw4GLgMEBQYABgtB6AAhAgyUAQsgBCABQQFqIgFHDQALQf0AIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqAELIANBADYCHCADIAE2AhQgA0HkCDYCECADQQc2AgxBACECDKcBCyABIARGDQEgAUEBagshAUEGIQIMjAELQfwAIQIMpAELAkACQAJAAkADQCABLQAAQaDIAGotAAAiAEEFRwRAIABBAWsOBCkCAwQFCyAEIAFBAWoiAUcNAAtB+wAhAgynAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgymAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgylAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgykAQsgA0EANgIcIAMgATYCFCADQbwKNgIQIANBBzYCDEEAIQIMowELQc8AIQIMiQELQdEAIQIMiAELQecAIQIMhwELIAEgBEYEQEH6ACECDKABCwJAIAEtAABBCWsOBCAAACAACyABQQFqIQFB5gAhAgyGAQsgASAERgRAQfkAIQIMnwELAkAgAS0AAEEJaw4EHwAAHwALQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFBEBB4gEhAgyGAQsgAEEVRwRAIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDJ8BCyADQfgANgIcIAMgATYCFCADQeoaNgIQIANBFTYCDEEAIQIMngELIAEgBEcEQCADQQ02AgggAyABNgIEQeQAIQIMhQELQfcAIQIMnQELIAEgBEYEQEH2ACECDJ0BCwJAAkACQCABLQAAQcgAaw4LAAELCwsLCwsLCwILCyABQQFqIQFB3QAhAgyFAQsgAUEBaiEBQeAAIQIMhAELIAFBAWohAUHjACECDIMBC0H1ACECIAEgBEYNmwEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBtdUAai0AAEcNCCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMnAELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgAEQCADQfQANgIcIAMgATYCFCADIAA2AgxBACECDJwBC0HiACECDIIBC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMnAELQeEAIQIMggELIANB8wA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyaAQsgAy0AKSIAQSNrQQtJDQkCQCAAQQZLDQBBASAAdEHKAHFFDQAMCgtBACECIANBADYCHCADIAE2AhQgA0HtCTYCECADQQg2AgwMmQELQfIAIQIgASAERg2YASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGz1QBqLQAARw0FIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyZAQsgAygCBCEAIANCADcDACADIAAgBkEBaiIBECsiAARAIANB8QA2AhwgAyABNgIUIAMgADYCDEEAIQIMmQELQd8AIQIMfwtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJkBC0HeACECDH8LIANB8AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyXAQsgAy0AKUEhRg0GIANBADYCHCADIAE2AhQgA0GRCjYCECADQQg2AgxBACECDJYBC0HvACECIAEgBEYNlQEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMlgELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgBFDQIgA0HtADYCHCADIAE2AhQgAyAANgIMQQAhAgyVAQsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNgAEgA0HuADYCHCADIAE2AhQgAyAANgIMQQAhAgyTAQtB3AAhAgx5C0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMkwELQdsAIQIMeQsgA0HsADYCHCADIAE2AhQgA0GAGzYCECADQRU2AgxBACECDJEBCyADLQApIgBBI0kNACAAQS5GDQAgA0EANgIcIAMgATYCFCADQckJNgIQIANBCDYCDEEAIQIMkAELQdoAIQIMdgsgASAERgRAQesAIQIMjwELAkAgAS0AAEEvRgRAIAFBAWohAQwBCyADQQA2Ahw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ABNgIUIANBvRM2AhAgA0EPNgIMQQAhAgxoC0EAIQACQCADKAI4IgJFDQAgAigCSCICRQ0AIAMgAhEAACEACyAARQRAQcEAIQIMTwsgAEEVRwRAIANBADYCHCADIAE2AhQgA0GmDzYCECADQRw2AgxBACECDGgLIANBygA2AhwgAyABNgIUIANBhRw2AhAgA0EVNgIMQQAhAgxnCyABIARHBEAgASECA0AgBCACIgFrQRBOBEAgAUEQaiEC/Qz/////////////////////IAH9AAAAIg1BB/1sIA39DODg4ODg4ODg4ODg4ODg4OD9bv0MX19fX19fX19fX19fX19fX/0mIA39DAkJCQkJCQkJCQkJCQkJCQn9I/1Q/VL9ZEF/c2giAEEQRg0BIAAgAWohAQwYCyABIARGBEBBxAAhAgxpCyABLQAAQcDBAGotAABBAUcNFyAEIAFBAWoiAkcNAAtBxAAhAgxnC0HEACECDGYLIAEgBEcEQANAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXEiAEEJRg0AIABBIEYNAAJAAkACQAJAIABB4wBrDhMAAwMDAwMDAwEDAwMDAwMDAwMCAwsgAUEBaiEBQTYhAgxSCyABQQFqIQFBNyECDFELIAFBAWohAUE4IQIMUAsMFQsgBCABQQFqIgFHDQALQTwhAgxmC0E8IQIMZQsgASAERgRAQcgAIQIMZQsgA0ESNgIIIAMgATYCBAJAAkACQAJAAkAgAy0ALEEBaw4EFAABAgkLIAMtADJBIHENA0HgASECDE8LAkAgAy8BMiIAQQhxRQ0AIAMtAChBAUcNACADLQAuQQhxRQ0CCyADIABB9/sDcUGABHI7ATIMCwsgAyADLwEyQRByOwEyDAQLIANBADYCBCADIAEgARAxIgAEQCADQcEANgIcIAMgADYCDCADIAFBAWo2AhRBACECDGYLIAFBAWohAQxYCyADQQA2AhwgAyABNgIUIANB9BM2AhAgA0EENgIMQQAhAgxkC0HHACECIAEgBEYNYyADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIABBwMUAai0AACABLQAAQSByRw0BIABBBkYNSiAAQQ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gA0ECNgIMDAULQQAhAiADQQA2AhwgAyABNgIUIANBxBg2AhAgA0ECNgIMDAQLIANBAjYCHCADIAE2AhQgA0GpHjYCECADQRY2AgxBACECDAMLQd4AIQIgASAERg0CIAlBCGohByADKAIAIQUCQAJAIAEgBEcEQCAFQZbIAGohCCAEIAVqIAFrIQYgBUF/c0EKaiIFIAFqIQADQCABLQAAIAgtAABHBEBBAiEIDAMLIAVFBEBBACEIIAAhAQwDCyAFQQFrIQUgCEEBaiEIIAQgAUEBaiIBRw0ACyAGIQUgBCEBCyAHQQE2AgAgAyAFNgIADAELIANBADYCACAHIAg2AgALIAcgATYCBCAJKAIMIQACQAJAIAkoAghBAWsOAgQBAAsgA0EANgIcIANBwh42AhAgA0EXNgIMIAMgAEEBajYCFEEAIQIMAwsgA0EANgIcIAMgADYCFCADQdceNgIQIANBCTYCDEEAIQIMAgsgASAERgRAQSghAgwCCyADQQk2AgggAyABNgIEQSchAgwBCyABIARGBEBBASECDAELA0ACQAJAAkAgAS0AAEEKaw4EAAEBAAELIAFBAWohAQwBCyABQQFqIQEgAy0ALkEgcQ0AQQAhAiADQQA2AhwgAyABNgIUIANBoSE2AhAgA0EFNgIMDAILQQEhAiABIARHDQALCyAJQRBqJAAgAkUEQCADKAIMIQAMAQsgAyACNgIcQQAhACADKAIEIgFFDQAgAyABIAQgAygCCBEBACIBRQ0AIAMgBDYCFCADIAE2AgwgASEACyAAC74CAQJ/IABBADoAACAAQeQAaiIBQQFrQQA6AAAgAEEAOgACIABBADoAASABQQNrQQA6AAAgAUECa0EAOgAAIABBADoAAyABQQRrQQA6AABBACAAa0EDcSIBIABqIgBBADYCAEHkACABa0F8cSICIABqIgFBBGtBADYCAAJAIAJBCUkNACAAQQA2AgggAEEANgIEIAFBCGtBADYCACABQQxrQQA2AgAgAkEZSQ0AIABBADYCGCAAQQA2AhQgAEEANgIQIABBADYCDCABQRBrQQA2AgAgAUEUa0EANgIAIAFBGGtBADYCACABQRxrQQA2AgAgAiAAQQR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AwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw=='\n\nlet wasmBuffer\n\nObject.defineProperty(module, 'exports', {\n get: () => {\n return wasmBuffer\n ? wasmBuffer\n : (wasmBuffer = Buffer.from(wasmBase64, 'base64'))\n }\n})\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.enumToMap = enumToMap;\nfunction enumToMap(obj, filter = [], exceptions = []) {\n const emptyFilter = (filter?.length ?? 0) === 0;\n const emptyExceptions = (exceptions?.length ?? 0) === 0;\n return Object.fromEntries(Object.entries(obj).filter(([, value]) => {\n return (typeof value === 'number' &&\n (emptyFilter || filter.includes(value)) &&\n (emptyExceptions || !exceptions.includes(value)));\n }));\n}\n","'use strict'\n\nconst { kClients } = require('../core/symbols')\nconst Agent = require('../dispatcher/agent')\nconst {\n kAgent,\n kMockAgentSet,\n kMockAgentGet,\n kDispatches,\n kIsMockActive,\n kNetConnect,\n kGetNetConnect,\n kOptions,\n kFactory,\n kMockAgentRegisterCallHistory,\n kMockAgentIsCallHistoryEnabled,\n kMockAgentAddCallHistoryLog,\n kMockAgentMockCallHistoryInstance,\n kMockAgentAcceptsNonStandardSearchParameters,\n kMockCallHistoryAddLog,\n kIgnoreTrailingSlash\n} = require('./mock-symbols')\nconst MockClient = require('./mock-client')\nconst MockPool = require('./mock-pool')\nconst { matchValue, normalizeSearchParams, buildAndValidateMockOptions, normalizeOrigin } = require('./mock-utils')\nconst { InvalidArgumentError, UndiciError } = require('../core/errors')\nconst Dispatcher = require('../dispatcher/dispatcher')\nconst PendingInterceptorsFormatter = require('./pending-interceptors-formatter')\nconst { MockCallHistory } = require('./mock-call-history')\n\nclass MockAgent extends Dispatcher {\n constructor (opts = {}) {\n super(opts)\n\n const mockOptions = buildAndValidateMockOptions(opts)\n\n this[kNetConnect] = true\n this[kIsMockActive] = true\n this[kMockAgentIsCallHistoryEnabled] = mockOptions.enableCallHistory ?? false\n this[kMockAgentAcceptsNonStandardSearchParameters] = mockOptions.acceptNonStandardSearchParameters ?? false\n this[kIgnoreTrailingSlash] = mockOptions.ignoreTrailingSlash ?? false\n\n // Instantiate Agent and encapsulate\n if (opts?.agent && typeof opts.agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n const agent = opts?.agent ? opts.agent : new Agent(opts)\n this[kAgent] = agent\n\n this[kClients] = agent[kClients]\n this[kOptions] = mockOptions\n\n if (this[kMockAgentIsCallHistoryEnabled]) {\n this[kMockAgentRegisterCallHistory]()\n }\n }\n\n get (origin) {\n // Normalize origin to handle URL objects and case-insensitive hostnames\n const normalizedOrigin = normalizeOrigin(origin)\n const originKey = this[kIgnoreTrailingSlash] ? normalizedOrigin.replace(/\\/$/, '') : normalizedOrigin\n\n let dispatcher = this[kMockAgentGet](originKey)\n\n if (!dispatcher) {\n dispatcher = this[kFactory](originKey)\n this[kMockAgentSet](originKey, dispatcher)\n }\n return dispatcher\n }\n\n dispatch (opts, handler) {\n opts.origin = normalizeOrigin(opts.origin)\n\n // Call MockAgent.get to perform additional setup before dispatching as normal\n this.get(opts.origin)\n\n this[kMockAgentAddCallHistoryLog](opts)\n\n const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters]\n\n const dispatchOpts = { ...opts }\n\n if (acceptNonStandardSearchParameters && dispatchOpts.path) {\n const [path, searchParams] = dispatchOpts.path.split('?')\n const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters)\n dispatchOpts.path = `${path}?${normalizedSearchParams}`\n }\n\n return this[kAgent].dispatch(dispatchOpts, handler)\n }\n\n async close () {\n this.clearCallHistory()\n await this[kAgent].close()\n this[kClients].clear()\n }\n\n deactivate () {\n this[kIsMockActive] = false\n }\n\n activate () {\n this[kIsMockActive] = true\n }\n\n enableNetConnect (matcher) {\n if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) {\n if (Array.isArray(this[kNetConnect])) {\n this[kNetConnect].push(matcher)\n } else {\n this[kNetConnect] = [matcher]\n }\n } else if (typeof matcher === 'undefined') {\n this[kNetConnect] = true\n } else {\n throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.')\n }\n }\n\n disableNetConnect () {\n this[kNetConnect] = false\n }\n\n enableCallHistory () {\n this[kMockAgentIsCallHistoryEnabled] = true\n\n return this\n }\n\n disableCallHistory () {\n this[kMockAgentIsCallHistoryEnabled] = false\n\n return this\n }\n\n getCallHistory () {\n return this[kMockAgentMockCallHistoryInstance]\n }\n\n clearCallHistory () {\n if (this[kMockAgentMockCallHistoryInstance] !== undefined) {\n this[kMockAgentMockCallHistoryInstance].clear()\n }\n }\n\n // This is required to bypass issues caused by using global symbols - see:\n // https://github.com/nodejs/undici/issues/1447\n get isMockActive () {\n return this[kIsMockActive]\n }\n\n [kMockAgentRegisterCallHistory] () {\n if (this[kMockAgentMockCallHistoryInstance] === undefined) {\n this[kMockAgentMockCallHistoryInstance] = new MockCallHistory()\n }\n }\n\n [kMockAgentAddCallHistoryLog] (opts) {\n if (this[kMockAgentIsCallHistoryEnabled]) {\n // additional setup when enableCallHistory class method is used after mockAgent instantiation\n this[kMockAgentRegisterCallHistory]()\n\n // add call history log on every call (intercepted or not)\n this[kMockAgentMockCallHistoryInstance][kMockCallHistoryAddLog](opts)\n }\n }\n\n [kMockAgentSet] (origin, dispatcher) {\n this[kClients].set(origin, { count: 0, dispatcher })\n }\n\n [kFactory] (origin) {\n const mockOptions = Object.assign({ agent: this }, this[kOptions])\n return this[kOptions] && this[kOptions].connections === 1\n ? new MockClient(origin, mockOptions)\n : new MockPool(origin, mockOptions)\n }\n\n [kMockAgentGet] (origin) {\n // First check if we can immediately find it\n const result = this[kClients].get(origin)\n if (result?.dispatcher) {\n return result.dispatcher\n }\n\n // If the origin is not a string create a dummy parent pool and return to user\n if (typeof origin !== 'string') {\n const dispatcher = this[kFactory]('http://localhost:9999')\n this[kMockAgentSet](origin, dispatcher)\n return dispatcher\n }\n\n // If we match, create a pool and assign the same dispatches\n for (const [keyMatcher, result] of Array.from(this[kClients])) {\n if (result && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) {\n const dispatcher = this[kFactory](origin)\n this[kMockAgentSet](origin, dispatcher)\n dispatcher[kDispatches] = result.dispatcher[kDispatches]\n return dispatcher\n }\n }\n }\n\n [kGetNetConnect] () {\n return this[kNetConnect]\n }\n\n pendingInterceptors () {\n const mockAgentClients = this[kClients]\n\n return Array.from(mockAgentClients.entries())\n .flatMap(([origin, result]) => result.dispatcher[kDispatches].map(dispatch => ({ ...dispatch, origin })))\n .filter(({ pending }) => pending)\n }\n\n assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) {\n const pending = this.pendingInterceptors()\n\n if (pending.length === 0) {\n return\n }\n\n throw new UndiciError(\n pending.length === 1\n ? `1 interceptor is pending:\\n\\n${pendingInterceptorsFormatter.format(pending)}`.trim()\n : `${pending.length} interceptors are pending:\\n\\n${pendingInterceptorsFormatter.format(pending)}`.trim()\n )\n }\n}\n\nmodule.exports = MockAgent\n","'use strict'\n\nconst { kMockCallHistoryAddLog } = require('./mock-symbols')\nconst { InvalidArgumentError } = require('../core/errors')\n\nfunction handleFilterCallsWithOptions (criteria, options, handler, store) {\n switch (options.operator) {\n case 'OR':\n store.push(...handler(criteria))\n\n return store\n case 'AND':\n return handler.call({ logs: store }, criteria)\n default:\n // guard -- should never happens because buildAndValidateFilterCallsOptions is called before\n throw new InvalidArgumentError('options.operator must to be a case insensitive string equal to \\'OR\\' or \\'AND\\'')\n }\n}\n\nfunction buildAndValidateFilterCallsOptions (options = {}) {\n const finalOptions = {}\n\n if ('operator' in options) {\n if (typeof options.operator !== 'string' || (options.operator.toUpperCase() !== 'OR' && options.operator.toUpperCase() !== 'AND')) {\n throw new InvalidArgumentError('options.operator must to be a case insensitive string equal to \\'OR\\' or \\'AND\\'')\n }\n\n return {\n ...finalOptions,\n operator: options.operator.toUpperCase()\n }\n }\n\n return finalOptions\n}\n\nfunction makeFilterCalls (parameterName) {\n return (parameterValue) => {\n if (typeof parameterValue === 'string' || parameterValue == null) {\n return this.logs.filter((log) => {\n return log[parameterName] === parameterValue\n })\n }\n if (parameterValue instanceof RegExp) {\n return this.logs.filter((log) => {\n return parameterValue.test(log[parameterName])\n })\n }\n\n throw new InvalidArgumentError(`${parameterName} parameter should be one of string, regexp, undefined or null`)\n }\n}\nfunction computeUrlWithMaybeSearchParameters (requestInit) {\n // path can contains query url parameters\n // or query can contains query url parameters\n try {\n const url = new URL(requestInit.path, requestInit.origin)\n\n // requestInit.path contains query url parameters\n // requestInit.query is then undefined\n if (url.search.length !== 0) {\n return url\n }\n\n // requestInit.query can be populated here\n url.search = new URLSearchParams(requestInit.query).toString()\n\n return url\n } catch (error) {\n throw new InvalidArgumentError('An error occurred when computing MockCallHistoryLog.url', { cause: error })\n }\n}\n\nclass MockCallHistoryLog {\n constructor (requestInit = {}) {\n this.body = requestInit.body\n this.headers = requestInit.headers\n this.method = requestInit.method\n\n const url = computeUrlWithMaybeSearchParameters(requestInit)\n\n this.fullUrl = url.toString()\n this.origin = url.origin\n this.path = url.pathname\n this.searchParams = Object.fromEntries(url.searchParams)\n this.protocol = url.protocol\n this.host = url.host\n this.port = url.port\n this.hash = url.hash\n }\n\n toMap () {\n return new Map([\n ['protocol', this.protocol],\n ['host', this.host],\n ['port', this.port],\n ['origin', this.origin],\n ['path', this.path],\n ['hash', this.hash],\n ['searchParams', this.searchParams],\n ['fullUrl', this.fullUrl],\n ['method', this.method],\n ['body', this.body],\n ['headers', this.headers]]\n )\n }\n\n toString () {\n const options = { betweenKeyValueSeparator: '->', betweenPairSeparator: '|' }\n let result = ''\n\n this.toMap().forEach((value, key) => {\n if (typeof value === 'string' || value === undefined || value === null) {\n result = `${result}${key}${options.betweenKeyValueSeparator}${value}${options.betweenPairSeparator}`\n }\n if ((typeof value === 'object' && value !== null) || Array.isArray(value)) {\n result = `${result}${key}${options.betweenKeyValueSeparator}${JSON.stringify(value)}${options.betweenPairSeparator}`\n }\n // maybe miss something for non Record / Array headers and searchParams here\n })\n\n // delete last betweenPairSeparator\n return result.slice(0, -1)\n }\n}\n\nclass MockCallHistory {\n logs = []\n\n calls () {\n return this.logs\n }\n\n firstCall () {\n return this.logs.at(0)\n }\n\n lastCall () {\n return this.logs.at(-1)\n }\n\n nthCall (number) {\n if (typeof number !== 'number') {\n throw new InvalidArgumentError('nthCall must be called with a number')\n }\n if (!Number.isInteger(number)) {\n throw new InvalidArgumentError('nthCall must be called with an integer')\n }\n if (Math.sign(number) !== 1) {\n throw new InvalidArgumentError('nthCall must be called with a positive value. use firstCall or lastCall instead')\n }\n\n // non zero based index. this is more human readable\n return this.logs.at(number - 1)\n }\n\n filterCalls (criteria, options) {\n // perf\n if (this.logs.length === 0) {\n return this.logs\n }\n if (typeof criteria === 'function') {\n return this.logs.filter(criteria)\n }\n if (criteria instanceof RegExp) {\n return this.logs.filter((log) => {\n return criteria.test(log.toString())\n })\n }\n if (typeof criteria === 'object' && criteria !== null) {\n // no criteria - returning all logs\n if (Object.keys(criteria).length === 0) {\n return this.logs\n }\n\n const finalOptions = { operator: 'OR', ...buildAndValidateFilterCallsOptions(options) }\n\n let maybeDuplicatedLogsFiltered = []\n if ('protocol' in criteria) {\n maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.protocol, finalOptions, this.filterCallsByProtocol, maybeDuplicatedLogsFiltered)\n }\n if ('host' in criteria) {\n maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.host, finalOptions, this.filterCallsByHost, maybeDuplicatedLogsFiltered)\n }\n if ('port' in criteria) {\n maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.port, finalOptions, this.filterCallsByPort, maybeDuplicatedLogsFiltered)\n }\n if ('origin' in criteria) {\n maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.origin, finalOptions, this.filterCallsByOrigin, maybeDuplicatedLogsFiltered)\n }\n if ('path' in criteria) {\n maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.path, finalOptions, this.filterCallsByPath, maybeDuplicatedLogsFiltered)\n }\n if ('hash' in criteria) {\n maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.hash, finalOptions, this.filterCallsByHash, maybeDuplicatedLogsFiltered)\n }\n if ('fullUrl' in criteria) {\n maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.fullUrl, finalOptions, this.filterCallsByFullUrl, maybeDuplicatedLogsFiltered)\n }\n if ('method' in criteria) {\n maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.method, finalOptions, this.filterCallsByMethod, maybeDuplicatedLogsFiltered)\n }\n\n const uniqLogsFiltered = [...new Set(maybeDuplicatedLogsFiltered)]\n\n return uniqLogsFiltered\n }\n\n throw new InvalidArgumentError('criteria parameter should be one of function, regexp, or object')\n }\n\n filterCallsByProtocol = makeFilterCalls.call(this, 'protocol')\n\n filterCallsByHost = makeFilterCalls.call(this, 'host')\n\n filterCallsByPort = makeFilterCalls.call(this, 'port')\n\n filterCallsByOrigin = makeFilterCalls.call(this, 'origin')\n\n filterCallsByPath = makeFilterCalls.call(this, 'path')\n\n filterCallsByHash = makeFilterCalls.call(this, 'hash')\n\n filterCallsByFullUrl = makeFilterCalls.call(this, 'fullUrl')\n\n filterCallsByMethod = makeFilterCalls.call(this, 'method')\n\n clear () {\n this.logs = []\n }\n\n [kMockCallHistoryAddLog] (requestInit) {\n const log = new MockCallHistoryLog(requestInit)\n\n this.logs.push(log)\n\n return log\n }\n\n * [Symbol.iterator] () {\n for (const log of this.calls()) {\n yield log\n }\n }\n}\n\nmodule.exports.MockCallHistory = MockCallHistory\nmodule.exports.MockCallHistoryLog = MockCallHistoryLog\n","'use strict'\n\nconst { promisify } = require('node:util')\nconst Client = require('../dispatcher/client')\nconst { buildMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kMockAgent,\n kClose,\n kOriginalClose,\n kOrigin,\n kOriginalDispatch,\n kConnected,\n kIgnoreTrailingSlash\n} = require('./mock-symbols')\nconst { MockInterceptor } = require('./mock-interceptor')\nconst Symbols = require('../core/symbols')\nconst { InvalidArgumentError } = require('../core/errors')\n\n/**\n * MockClient provides an API that extends the Client to influence the mockDispatches.\n */\nclass MockClient extends Client {\n constructor (origin, opts) {\n if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n\n super(origin, opts)\n\n this[kMockAgent] = opts.agent\n this[kOrigin] = origin\n this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false\n this[kDispatches] = []\n this[kConnected] = 1\n this[kOriginalDispatch] = this.dispatch\n this[kOriginalClose] = this.close.bind(this)\n\n this.dispatch = buildMockDispatch.call(this)\n this.close = this[kClose]\n }\n\n get [Symbols.kConnected] () {\n return this[kConnected]\n }\n\n /**\n * Sets up the base interceptor for mocking replies from undici.\n */\n intercept (opts) {\n return new MockInterceptor(\n opts && { ignoreTrailingSlash: this[kIgnoreTrailingSlash], ...opts },\n this[kDispatches]\n )\n }\n\n cleanMocks () {\n this[kDispatches] = []\n }\n\n async [kClose] () {\n await promisify(this[kOriginalClose])()\n this[kConnected] = 0\n this[kMockAgent][Symbols.kClients].delete(this[kOrigin])\n }\n}\n\nmodule.exports = MockClient\n","'use strict'\n\nconst { UndiciError } = require('../core/errors')\n\nconst kMockNotMatchedError = Symbol.for('undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED')\n\n/**\n * The request does not match any registered mock dispatches.\n */\nclass MockNotMatchedError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'MockNotMatchedError'\n this.message = message || 'The request does not match any registered mock dispatches'\n this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kMockNotMatchedError] === true\n }\n\n get [kMockNotMatchedError] () {\n return true\n }\n}\n\nmodule.exports = {\n MockNotMatchedError\n}\n","'use strict'\n\nconst { getResponseData, buildKey, addMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kDispatchKey,\n kDefaultHeaders,\n kDefaultTrailers,\n kContentLength,\n kMockDispatch,\n kIgnoreTrailingSlash\n} = require('./mock-symbols')\nconst { InvalidArgumentError } = require('../core/errors')\nconst { serializePathWithQuery } = require('../core/util')\n\n/**\n * Defines the scope API for an interceptor reply\n */\nclass MockScope {\n constructor (mockDispatch) {\n this[kMockDispatch] = mockDispatch\n }\n\n /**\n * Delay a reply by a set amount in ms.\n */\n delay (waitInMs) {\n if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) {\n throw new InvalidArgumentError('waitInMs must be a valid integer > 0')\n }\n\n this[kMockDispatch].delay = waitInMs\n return this\n }\n\n /**\n * For a defined reply, never mark as consumed.\n */\n persist () {\n this[kMockDispatch].persist = true\n return this\n }\n\n /**\n * Allow one to define a reply for a set amount of matching requests.\n */\n times (repeatTimes) {\n if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) {\n throw new InvalidArgumentError('repeatTimes must be a valid integer > 0')\n }\n\n this[kMockDispatch].times = repeatTimes\n return this\n }\n}\n\n/**\n * Defines an interceptor for a Mock\n */\nclass MockInterceptor {\n constructor (opts, mockDispatches) {\n if (typeof opts !== 'object') {\n throw new InvalidArgumentError('opts must be an object')\n }\n if (typeof opts.path === 'undefined') {\n throw new InvalidArgumentError('opts.path must be defined')\n }\n if (typeof opts.method === 'undefined') {\n opts.method = 'GET'\n }\n // See https://github.com/nodejs/undici/issues/1245\n // As per RFC 3986, clients are not supposed to send URI\n // fragments to servers when they retrieve a document,\n if (typeof opts.path === 'string') {\n if (opts.query) {\n opts.path = serializePathWithQuery(opts.path, opts.query)\n } else {\n // Matches https://github.com/nodejs/undici/blob/main/lib/web/fetch/index.js#L1811\n const parsedURL = new URL(opts.path, 'data://')\n opts.path = parsedURL.pathname + parsedURL.search\n }\n }\n if (typeof opts.method === 'string') {\n opts.method = opts.method.toUpperCase()\n }\n\n this[kDispatchKey] = buildKey(opts)\n this[kDispatches] = mockDispatches\n this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false\n this[kDefaultHeaders] = {}\n this[kDefaultTrailers] = {}\n this[kContentLength] = false\n }\n\n createMockScopeDispatchData ({ statusCode, data, responseOptions }) {\n const responseData = getResponseData(data)\n const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {}\n const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers }\n const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers }\n\n return { statusCode, data, headers, trailers }\n }\n\n validateReplyParameters (replyParameters) {\n if (typeof replyParameters.statusCode === 'undefined') {\n throw new InvalidArgumentError('statusCode must be defined')\n }\n if (typeof replyParameters.responseOptions !== 'object' || replyParameters.responseOptions === null) {\n throw new InvalidArgumentError('responseOptions must be an object')\n }\n }\n\n /**\n * Mock an undici request with a defined reply.\n */\n reply (replyOptionsCallbackOrStatusCode) {\n // Values of reply aren't available right now as they\n // can only be available when the reply callback is invoked.\n if (typeof replyOptionsCallbackOrStatusCode === 'function') {\n // We'll first wrap the provided callback in another function,\n // this function will properly resolve the data from the callback\n // when invoked.\n const wrappedDefaultsCallback = (opts) => {\n // Our reply options callback contains the parameter for statusCode, data and options.\n const resolvedData = replyOptionsCallbackOrStatusCode(opts)\n\n // Check if it is in the right format\n if (typeof resolvedData !== 'object' || resolvedData === null) {\n throw new InvalidArgumentError('reply options callback must return an object')\n }\n\n const replyParameters = { data: '', responseOptions: {}, ...resolvedData }\n this.validateReplyParameters(replyParameters)\n // Since the values can be obtained immediately we return them\n // from this higher order function that will be resolved later.\n return {\n ...this.createMockScopeDispatchData(replyParameters)\n }\n }\n\n // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data.\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] })\n return new MockScope(newMockDispatch)\n }\n\n // We can have either one or three parameters, if we get here,\n // we should have 1-3 parameters. So we spread the arguments of\n // this function to obtain the parameters, since replyData will always\n // just be the statusCode.\n const replyParameters = {\n statusCode: replyOptionsCallbackOrStatusCode,\n data: arguments[1] === undefined ? '' : arguments[1],\n responseOptions: arguments[2] === undefined ? {} : arguments[2]\n }\n this.validateReplyParameters(replyParameters)\n\n // Send in-already provided data like usual\n const dispatchData = this.createMockScopeDispatchData(replyParameters)\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] })\n return new MockScope(newMockDispatch)\n }\n\n /**\n * Mock an undici request with a defined error.\n */\n replyWithError (error) {\n if (typeof error === 'undefined') {\n throw new InvalidArgumentError('error must be defined')\n }\n\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] })\n return new MockScope(newMockDispatch)\n }\n\n /**\n * Set default reply headers on the interceptor for subsequent replies\n */\n defaultReplyHeaders (headers) {\n if (typeof headers === 'undefined') {\n throw new InvalidArgumentError('headers must be defined')\n }\n\n this[kDefaultHeaders] = headers\n return this\n }\n\n /**\n * Set default reply trailers on the interceptor for subsequent replies\n */\n defaultReplyTrailers (trailers) {\n if (typeof trailers === 'undefined') {\n throw new InvalidArgumentError('trailers must be defined')\n }\n\n this[kDefaultTrailers] = trailers\n return this\n }\n\n /**\n * Set reply content length header for replies on the interceptor\n */\n replyContentLength () {\n this[kContentLength] = true\n return this\n }\n}\n\nmodule.exports.MockInterceptor = MockInterceptor\nmodule.exports.MockScope = MockScope\n","'use strict'\n\nconst { promisify } = require('node:util')\nconst Pool = require('../dispatcher/pool')\nconst { buildMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kMockAgent,\n kClose,\n kOriginalClose,\n kOrigin,\n kOriginalDispatch,\n kConnected,\n kIgnoreTrailingSlash\n} = require('./mock-symbols')\nconst { MockInterceptor } = require('./mock-interceptor')\nconst Symbols = require('../core/symbols')\nconst { InvalidArgumentError } = require('../core/errors')\n\n/**\n * MockPool provides an API that extends the Pool to influence the mockDispatches.\n */\nclass MockPool extends Pool {\n constructor (origin, opts) {\n if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n\n super(origin, opts)\n\n this[kMockAgent] = opts.agent\n this[kOrigin] = origin\n this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false\n this[kDispatches] = []\n this[kConnected] = 1\n this[kOriginalDispatch] = this.dispatch\n this[kOriginalClose] = this.close.bind(this)\n\n this.dispatch = buildMockDispatch.call(this)\n this.close = this[kClose]\n }\n\n get [Symbols.kConnected] () {\n return this[kConnected]\n }\n\n /**\n * Sets up the base interceptor for mocking replies from undici.\n */\n intercept (opts) {\n return new MockInterceptor(\n opts && { ignoreTrailingSlash: this[kIgnoreTrailingSlash], ...opts },\n this[kDispatches]\n )\n }\n\n cleanMocks () {\n this[kDispatches] = []\n }\n\n async [kClose] () {\n await promisify(this[kOriginalClose])()\n this[kConnected] = 0\n this[kMockAgent][Symbols.kClients].delete(this[kOrigin])\n }\n}\n\nmodule.exports = MockPool\n","'use strict'\n\nmodule.exports = {\n kAgent: Symbol('agent'),\n kOptions: Symbol('options'),\n kFactory: Symbol('factory'),\n kDispatches: Symbol('dispatches'),\n kDispatchKey: Symbol('dispatch key'),\n kDefaultHeaders: Symbol('default headers'),\n kDefaultTrailers: Symbol('default trailers'),\n kContentLength: Symbol('content length'),\n kMockAgent: Symbol('mock agent'),\n kMockAgentSet: Symbol('mock agent set'),\n kMockAgentGet: Symbol('mock agent get'),\n kMockDispatch: Symbol('mock dispatch'),\n kClose: Symbol('close'),\n kOriginalClose: Symbol('original agent close'),\n kOriginalDispatch: Symbol('original dispatch'),\n kOrigin: Symbol('origin'),\n kIsMockActive: Symbol('is mock active'),\n kNetConnect: Symbol('net connect'),\n kGetNetConnect: Symbol('get net connect'),\n kConnected: Symbol('connected'),\n kIgnoreTrailingSlash: Symbol('ignore trailing slash'),\n kMockAgentMockCallHistoryInstance: Symbol('mock agent mock call history name'),\n kMockAgentRegisterCallHistory: Symbol('mock agent register mock call history'),\n kMockAgentAddCallHistoryLog: Symbol('mock agent add call history log'),\n kMockAgentIsCallHistoryEnabled: Symbol('mock agent is call history enabled'),\n kMockAgentAcceptsNonStandardSearchParameters: Symbol('mock agent accepts non standard search parameters'),\n kMockCallHistoryAddLog: Symbol('mock call history add log'),\n kTotalDispatchCount: Symbol('total dispatch count')\n}\n","'use strict'\n\nconst { MockNotMatchedError } = require('./mock-errors')\nconst {\n kDispatches,\n kMockAgent,\n kOriginalDispatch,\n kOrigin,\n kGetNetConnect,\n kTotalDispatchCount\n} = require('./mock-symbols')\nconst { serializePathWithQuery } = require('../core/util')\nconst { STATUS_CODES } = require('node:http')\nconst {\n types: {\n isPromise\n }\n} = require('node:util')\nconst { InvalidArgumentError } = require('../core/errors')\n\nfunction matchValue (match, value) {\n if (typeof match === 'string') {\n return match === value\n }\n if (match instanceof RegExp) {\n return match.test(value)\n }\n if (typeof match === 'function') {\n return match(value) === true\n }\n return false\n}\n\nfunction lowerCaseEntries (headers) {\n return Object.fromEntries(\n Object.entries(headers).map(([headerName, headerValue]) => {\n return [headerName.toLocaleLowerCase(), headerValue]\n })\n )\n}\n\n/**\n * @param {import('../../index').Headers|string[]|Record} headers\n * @param {string} key\n */\nfunction getHeaderByName (headers, key) {\n if (Array.isArray(headers)) {\n for (let i = 0; i < headers.length; i += 2) {\n if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) {\n return headers[i + 1]\n }\n }\n\n return undefined\n } else if (typeof headers.get === 'function') {\n return headers.get(key)\n } else {\n return lowerCaseEntries(headers)[key.toLocaleLowerCase()]\n }\n}\n\n/** @param {string[]} headers */\nfunction buildHeadersFromArray (headers) { // fetch HeadersList\n const clone = headers.slice()\n const entries = []\n for (let index = 0; index < clone.length; index += 2) {\n entries.push([clone[index], clone[index + 1]])\n }\n return Object.fromEntries(entries)\n}\n\nfunction matchHeaders (mockDispatch, headers) {\n if (typeof mockDispatch.headers === 'function') {\n if (Array.isArray(headers)) { // fetch HeadersList\n headers = buildHeadersFromArray(headers)\n }\n return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {})\n }\n if (typeof mockDispatch.headers === 'undefined') {\n return true\n }\n if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') {\n return false\n }\n\n for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) {\n const headerValue = getHeaderByName(headers, matchHeaderName)\n\n if (!matchValue(matchHeaderValue, headerValue)) {\n return false\n }\n }\n return true\n}\n\nfunction normalizeSearchParams (query) {\n if (typeof query !== 'string') {\n return query\n }\n\n const originalQp = new URLSearchParams(query)\n const normalizedQp = new URLSearchParams()\n\n for (let [key, value] of originalQp.entries()) {\n key = key.replace('[]', '')\n\n const valueRepresentsString = /^(['\"]).*\\1$/.test(value)\n if (valueRepresentsString) {\n normalizedQp.append(key, value)\n continue\n }\n\n if (value.includes(',')) {\n const values = value.split(',')\n for (const v of values) {\n normalizedQp.append(key, v)\n }\n continue\n }\n\n normalizedQp.append(key, value)\n }\n\n return normalizedQp\n}\n\nfunction safeUrl (path) {\n if (typeof path !== 'string') {\n return path\n }\n const pathSegments = path.split('?', 3)\n if (pathSegments.length !== 2) {\n return path\n }\n\n const qp = new URLSearchParams(pathSegments.pop())\n qp.sort()\n return [...pathSegments, qp.toString()].join('?')\n}\n\nfunction matchKey (mockDispatch, { path, method, body, headers }) {\n const pathMatch = matchValue(mockDispatch.path, path)\n const methodMatch = matchValue(mockDispatch.method, method)\n const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true\n const headersMatch = matchHeaders(mockDispatch, headers)\n return pathMatch && methodMatch && bodyMatch && headersMatch\n}\n\nfunction getResponseData (data) {\n if (Buffer.isBuffer(data)) {\n return data\n } else if (data instanceof Uint8Array) {\n return data\n } else if (data instanceof ArrayBuffer) {\n return data\n } else if (typeof data === 'object') {\n return JSON.stringify(data)\n } else if (data) {\n return data.toString()\n } else {\n return ''\n }\n}\n\nfunction getMockDispatch (mockDispatches, key) {\n const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path\n const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath\n\n const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath)\n\n // Match path\n let matchedMockDispatches = mockDispatches\n .filter(({ consumed }) => !consumed)\n .filter(({ path, ignoreTrailingSlash }) => {\n return ignoreTrailingSlash\n ? matchValue(removeTrailingSlash(safeUrl(path)), resolvedPathWithoutTrailingSlash)\n : matchValue(safeUrl(path), resolvedPath)\n })\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`)\n }\n\n // Match method\n matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method))\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`)\n }\n\n // Match body\n matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true)\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`)\n }\n\n // Match headers\n matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers))\n if (matchedMockDispatches.length === 0) {\n const headers = typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers\n throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`)\n }\n\n return matchedMockDispatches[0]\n}\n\nfunction addMockDispatch (mockDispatches, key, data, opts) {\n const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false, ...opts }\n const replyData = typeof data === 'function' ? { callback: data } : { ...data }\n const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } }\n mockDispatches.push(newMockDispatch)\n // Track total number of intercepts ever registered for better error messages\n mockDispatches[kTotalDispatchCount] = (mockDispatches[kTotalDispatchCount] || 0) + 1\n return newMockDispatch\n}\n\nfunction deleteMockDispatch (mockDispatches, key) {\n const index = mockDispatches.findIndex(dispatch => {\n if (!dispatch.consumed) {\n return false\n }\n return matchKey(dispatch, key)\n })\n if (index !== -1) {\n mockDispatches.splice(index, 1)\n }\n}\n\n/**\n * @param {string} path Path to remove trailing slash from\n */\nfunction removeTrailingSlash (path) {\n while (path.endsWith('/')) {\n path = path.slice(0, -1)\n }\n\n if (path.length === 0) {\n path = '/'\n }\n\n return path\n}\n\nfunction buildKey (opts) {\n const { path, method, body, headers, query } = opts\n\n return {\n path,\n method,\n body,\n headers,\n query\n }\n}\n\nfunction generateKeyValues (data) {\n const keys = Object.keys(data)\n const result = []\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n const value = data[key]\n const name = Buffer.from(`${key}`)\n if (Array.isArray(value)) {\n for (let j = 0; j < value.length; ++j) {\n result.push(name, Buffer.from(`${value[j]}`))\n }\n } else {\n result.push(name, Buffer.from(`${value}`))\n }\n }\n return result\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status\n * @param {number} statusCode\n */\nfunction getStatusText (statusCode) {\n return STATUS_CODES[statusCode] || 'unknown'\n}\n\nasync function getResponse (body) {\n const buffers = []\n for await (const data of body) {\n buffers.push(data)\n }\n return Buffer.concat(buffers).toString('utf8')\n}\n\n/**\n * Mock dispatch function used to simulate undici dispatches\n */\nfunction mockDispatch (opts, handler) {\n // Get mock dispatch from built key\n const key = buildKey(opts)\n const mockDispatch = getMockDispatch(this[kDispatches], key)\n\n mockDispatch.timesInvoked++\n\n // Here's where we resolve a callback if a callback is present for the dispatch data.\n if (mockDispatch.data.callback) {\n mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) }\n }\n\n // Parse mockDispatch data\n const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch\n const { timesInvoked, times } = mockDispatch\n\n // If it's used up and not persistent, mark as consumed\n mockDispatch.consumed = !persist && timesInvoked >= times\n mockDispatch.pending = timesInvoked < times\n\n // If specified, trigger dispatch error\n if (error !== null) {\n deleteMockDispatch(this[kDispatches], key)\n handler.onError(error)\n return true\n }\n\n // Track whether the request has been aborted\n let aborted = false\n let timer = null\n\n function abort (err) {\n if (aborted) {\n return\n }\n aborted = true\n\n // Clear the pending delayed response if any\n if (timer !== null) {\n clearTimeout(timer)\n timer = null\n }\n\n // Notify the handler of the abort\n handler.onError(err)\n }\n\n // Call onConnect to allow the handler to register the abort callback\n handler.onConnect?.(abort, null)\n\n // Handle the request with a delay if necessary\n if (typeof delay === 'number' && delay > 0) {\n timer = setTimeout(() => {\n timer = null\n handleReply(this[kDispatches])\n }, delay)\n } else {\n handleReply(this[kDispatches])\n }\n\n function handleReply (mockDispatches, _data = data) {\n // Don't send response if the request was aborted\n if (aborted) {\n return\n }\n\n // fetch's HeadersList is a 1D string array\n const optsHeaders = Array.isArray(opts.headers)\n ? buildHeadersFromArray(opts.headers)\n : opts.headers\n const body = typeof _data === 'function'\n ? _data({ ...opts, headers: optsHeaders })\n : _data\n\n // util.types.isPromise is likely needed for jest.\n if (isPromise(body)) {\n // If handleReply is asynchronous, throwing an error\n // in the callback will reject the promise, rather than\n // synchronously throw the error, which breaks some tests.\n // Rather, we wait for the callback to resolve if it is a\n // promise, and then re-run handleReply with the new body.\n return body.then((newData) => handleReply(mockDispatches, newData))\n }\n\n // Check again if aborted after async body resolution\n if (aborted) {\n return\n }\n\n const responseData = getResponseData(body)\n const responseHeaders = generateKeyValues(headers)\n const responseTrailers = generateKeyValues(trailers)\n\n handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode))\n handler.onData?.(Buffer.from(responseData))\n handler.onComplete?.(responseTrailers)\n deleteMockDispatch(mockDispatches, key)\n }\n\n function resume () {}\n\n return true\n}\n\nfunction buildMockDispatch () {\n const agent = this[kMockAgent]\n const origin = this[kOrigin]\n const originalDispatch = this[kOriginalDispatch]\n\n return function dispatch (opts, handler) {\n if (agent.isMockActive) {\n try {\n mockDispatch.call(this, opts, handler)\n } catch (error) {\n if (error.code === 'UND_MOCK_ERR_MOCK_NOT_MATCHED') {\n const netConnect = agent[kGetNetConnect]()\n const totalInterceptsCount = this[kDispatches][kTotalDispatchCount] || this[kDispatches].length\n const pendingInterceptsCount = this[kDispatches].filter(({ consumed }) => !consumed).length\n const interceptsMessage = `, ${pendingInterceptsCount} interceptor(s) remaining out of ${totalInterceptsCount} defined`\n if (netConnect === false) {\n throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)${interceptsMessage}`)\n }\n if (checkNetConnect(netConnect, origin)) {\n originalDispatch.call(this, opts, handler)\n } else {\n throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)${interceptsMessage}`)\n }\n } else {\n throw error\n }\n }\n } else {\n originalDispatch.call(this, opts, handler)\n }\n }\n}\n\nfunction checkNetConnect (netConnect, origin) {\n const url = new URL(origin)\n if (netConnect === true) {\n return true\n } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) {\n return true\n }\n return false\n}\n\nfunction normalizeOrigin (origin) {\n if (typeof origin !== 'string' && !(origin instanceof URL)) {\n return origin\n }\n\n if (origin instanceof URL) {\n return origin.origin\n }\n\n return origin.toLowerCase()\n}\n\nfunction buildAndValidateMockOptions (opts) {\n const { agent, ...mockOptions } = opts\n\n if ('enableCallHistory' in mockOptions && typeof mockOptions.enableCallHistory !== 'boolean') {\n throw new InvalidArgumentError('options.enableCallHistory must to be a boolean')\n }\n\n if ('acceptNonStandardSearchParameters' in mockOptions && typeof mockOptions.acceptNonStandardSearchParameters !== 'boolean') {\n throw new InvalidArgumentError('options.acceptNonStandardSearchParameters must to be a boolean')\n }\n\n if ('ignoreTrailingSlash' in mockOptions && typeof mockOptions.ignoreTrailingSlash !== 'boolean') {\n throw new InvalidArgumentError('options.ignoreTrailingSlash must to be a boolean')\n }\n\n return mockOptions\n}\n\nmodule.exports = {\n getResponseData,\n getMockDispatch,\n addMockDispatch,\n deleteMockDispatch,\n buildKey,\n generateKeyValues,\n matchValue,\n getResponse,\n getStatusText,\n mockDispatch,\n buildMockDispatch,\n checkNetConnect,\n buildAndValidateMockOptions,\n getHeaderByName,\n buildHeadersFromArray,\n normalizeSearchParams,\n normalizeOrigin\n}\n","'use strict'\n\nconst { Transform } = require('node:stream')\nconst { Console } = require('node:console')\n\nconst PERSISTENT = process.versions.icu ? '✅' : 'Y '\nconst NOT_PERSISTENT = process.versions.icu ? '❌' : 'N '\n\n/**\n * Gets the output of `console.table(…)` as a string.\n */\nmodule.exports = class PendingInterceptorsFormatter {\n constructor ({ disableColors } = {}) {\n this.transform = new Transform({\n transform (chunk, _enc, cb) {\n cb(null, chunk)\n }\n })\n\n this.logger = new Console({\n stdout: this.transform,\n inspectOptions: {\n colors: !disableColors && !process.env.CI\n }\n })\n }\n\n format (pendingInterceptors) {\n const withPrettyHeaders = pendingInterceptors.map(\n ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({\n Method: method,\n Origin: origin,\n Path: path,\n 'Status code': statusCode,\n Persistent: persist ? PERSISTENT : NOT_PERSISTENT,\n Invocations: timesInvoked,\n Remaining: persist ? Infinity : times - timesInvoked\n }))\n\n this.logger.table(withPrettyHeaders)\n return this.transform.read().toString()\n }\n}\n","'use strict'\n\nconst Agent = require('../dispatcher/agent')\nconst MockAgent = require('./mock-agent')\nconst { SnapshotRecorder } = require('./snapshot-recorder')\nconst WrapHandler = require('../handler/wrap-handler')\nconst { InvalidArgumentError, UndiciError } = require('../core/errors')\nconst { validateSnapshotMode } = require('./snapshot-utils')\n\nconst kSnapshotRecorder = Symbol('kSnapshotRecorder')\nconst kSnapshotMode = Symbol('kSnapshotMode')\nconst kSnapshotPath = Symbol('kSnapshotPath')\nconst kSnapshotLoaded = Symbol('kSnapshotLoaded')\nconst kRealAgent = Symbol('kRealAgent')\n\n// Static flag to ensure warning is only emitted once per process\nlet warningEmitted = false\n\nclass SnapshotAgent extends MockAgent {\n constructor (opts = {}) {\n // Emit experimental warning only once\n if (!warningEmitted) {\n process.emitWarning(\n 'SnapshotAgent is experimental and subject to change',\n 'ExperimentalWarning'\n )\n warningEmitted = true\n }\n\n const {\n mode = 'record',\n snapshotPath = null,\n ...mockAgentOpts\n } = opts\n\n super(mockAgentOpts)\n\n validateSnapshotMode(mode)\n\n // Validate snapshotPath is provided when required\n if ((mode === 'playback' || mode === 'update') && !snapshotPath) {\n throw new InvalidArgumentError(`snapshotPath is required when mode is '${mode}'`)\n }\n\n this[kSnapshotMode] = mode\n this[kSnapshotPath] = snapshotPath\n\n this[kSnapshotRecorder] = new SnapshotRecorder({\n snapshotPath: this[kSnapshotPath],\n mode: this[kSnapshotMode],\n maxSnapshots: opts.maxSnapshots,\n autoFlush: opts.autoFlush,\n flushInterval: opts.flushInterval,\n matchHeaders: opts.matchHeaders,\n ignoreHeaders: opts.ignoreHeaders,\n excludeHeaders: opts.excludeHeaders,\n matchBody: opts.matchBody,\n matchQuery: opts.matchQuery,\n caseSensitive: opts.caseSensitive,\n shouldRecord: opts.shouldRecord,\n shouldPlayback: opts.shouldPlayback,\n excludeUrls: opts.excludeUrls\n })\n this[kSnapshotLoaded] = false\n\n // For recording/update mode, we need a real agent to make actual requests\n // For playback mode, we need a real agent if there are excluded URLs\n if (this[kSnapshotMode] === 'record' || this[kSnapshotMode] === 'update' ||\n (this[kSnapshotMode] === 'playback' && opts.excludeUrls && opts.excludeUrls.length > 0)) {\n this[kRealAgent] = new Agent(opts)\n }\n\n // Auto-load snapshots in playback/update mode\n if ((this[kSnapshotMode] === 'playback' || this[kSnapshotMode] === 'update') && this[kSnapshotPath]) {\n this.loadSnapshots().catch(() => {\n // Ignore load errors - file might not exist yet\n })\n }\n }\n\n dispatch (opts, handler) {\n handler = WrapHandler.wrap(handler)\n const mode = this[kSnapshotMode]\n\n // Check if URL should be excluded (pass through without mocking/recording)\n if (this[kSnapshotRecorder].isUrlExcluded(opts)) {\n // Real agent is guaranteed by constructor when excludeUrls is configured\n return this[kRealAgent].dispatch(opts, handler)\n }\n\n if (mode === 'playback' || mode === 'update') {\n // Ensure snapshots are loaded\n if (!this[kSnapshotLoaded]) {\n // Need to load asynchronously, delegate to async version\n return this.#asyncDispatch(opts, handler)\n }\n\n // Try to find existing snapshot (synchronous)\n const snapshot = this[kSnapshotRecorder].findSnapshot(opts)\n\n if (snapshot) {\n // Use recorded response (synchronous)\n return this.#replaySnapshot(snapshot, handler)\n } else if (mode === 'update') {\n // Make real request and record it (async required)\n return this.#recordAndReplay(opts, handler)\n } else {\n // Playback mode but no snapshot found\n const error = new UndiciError(`No snapshot found for ${opts.method || 'GET'} ${opts.path}`)\n if (handler.onError) {\n handler.onError(error)\n return\n }\n throw error\n }\n } else if (mode === 'record') {\n // Record mode - make real request and save response (async required)\n return this.#recordAndReplay(opts, handler)\n }\n }\n\n /**\n * Async version of dispatch for when we need to load snapshots first\n */\n async #asyncDispatch (opts, handler) {\n await this.loadSnapshots()\n return this.dispatch(opts, handler)\n }\n\n /**\n * Records a real request and replays the response\n */\n #recordAndReplay (opts, handler) {\n const responseData = {\n statusCode: null,\n headers: {},\n trailers: {},\n body: []\n }\n\n const self = this // Capture 'this' context for use within nested handler callbacks\n\n const recordingHandler = {\n onRequestStart (controller, context) {\n return handler.onRequestStart(controller, { ...context, history: this.history })\n },\n\n onRequestUpgrade (controller, statusCode, headers, socket) {\n return handler.onRequestUpgrade(controller, statusCode, headers, socket)\n },\n\n onResponseStart (controller, statusCode, headers, statusMessage) {\n responseData.statusCode = statusCode\n responseData.headers = headers\n return handler.onResponseStart(controller, statusCode, headers, statusMessage)\n },\n\n onResponseData (controller, chunk) {\n responseData.body.push(chunk)\n return handler.onResponseData(controller, chunk)\n },\n\n onResponseEnd (controller, trailers) {\n responseData.trailers = trailers\n\n // Record the interaction using captured 'self' context (fire and forget)\n const responseBody = Buffer.concat(responseData.body)\n self[kSnapshotRecorder].record(opts, {\n statusCode: responseData.statusCode,\n headers: responseData.headers,\n body: responseBody,\n trailers: responseData.trailers\n })\n .then(() => handler.onResponseEnd(controller, trailers))\n .catch((error) => handler.onResponseError(controller, error))\n }\n }\n\n // Use composed agent if available (includes interceptors), otherwise use real agent\n const agent = this[kRealAgent]\n return agent.dispatch(opts, recordingHandler)\n }\n\n /**\n * Replays a recorded response\n *\n * @param {Object} snapshot - The recorded snapshot to replay.\n * @param {Object} handler - The handler to call with the response data.\n * @returns {void}\n */\n #replaySnapshot (snapshot, handler) {\n try {\n const { response } = snapshot\n\n const controller = {\n pause () { },\n resume () { },\n abort (reason) {\n this.aborted = true\n this.reason = reason\n },\n\n aborted: false,\n paused: false\n }\n\n handler.onRequestStart(controller)\n\n handler.onResponseStart(controller, response.statusCode, response.headers)\n\n // Body is always stored as base64 string\n const body = Buffer.from(response.body, 'base64')\n handler.onResponseData(controller, body)\n\n handler.onResponseEnd(controller, response.trailers)\n } catch (error) {\n handler.onError?.(error)\n }\n }\n\n /**\n * Loads snapshots from file\n *\n * @param {string} [filePath] - Optional file path to load snapshots from.\n * @returns {Promise} - Resolves when snapshots are loaded.\n */\n async loadSnapshots (filePath) {\n await this[kSnapshotRecorder].loadSnapshots(filePath || this[kSnapshotPath])\n this[kSnapshotLoaded] = true\n\n // In playback mode, set up MockAgent interceptors for all snapshots\n if (this[kSnapshotMode] === 'playback') {\n this.#setupMockInterceptors()\n }\n }\n\n /**\n * Saves snapshots to file\n *\n * @param {string} [filePath] - Optional file path to save snapshots to.\n * @returns {Promise} - Resolves when snapshots are saved.\n */\n async saveSnapshots (filePath) {\n return this[kSnapshotRecorder].saveSnapshots(filePath || this[kSnapshotPath])\n }\n\n /**\n * Sets up MockAgent interceptors based on recorded snapshots.\n *\n * This method creates MockAgent interceptors for each recorded snapshot,\n * allowing the SnapshotAgent to fall back to MockAgent's standard intercept\n * mechanism in playback mode. Each interceptor is configured to persist\n * (remain active for multiple requests) and responds with the recorded\n * response data.\n *\n * Called automatically when loading snapshots in playback mode.\n *\n * @returns {void}\n */\n #setupMockInterceptors () {\n for (const snapshot of this[kSnapshotRecorder].getSnapshots()) {\n const { request, responses, response } = snapshot\n const url = new URL(request.url)\n\n const mockPool = this.get(url.origin)\n\n // Handle both new format (responses array) and legacy format (response object)\n const responseData = responses ? responses[0] : response\n if (!responseData) continue\n\n mockPool.intercept({\n path: url.pathname + url.search,\n method: request.method,\n headers: request.headers,\n body: request.body\n }).reply(responseData.statusCode, responseData.body, {\n headers: responseData.headers,\n trailers: responseData.trailers\n }).persist()\n }\n }\n\n /**\n * Gets the snapshot recorder\n * @return {SnapshotRecorder} - The snapshot recorder instance\n */\n getRecorder () {\n return this[kSnapshotRecorder]\n }\n\n /**\n * Gets the current mode\n * @return {import('./snapshot-utils').SnapshotMode} - The current snapshot mode\n */\n getMode () {\n return this[kSnapshotMode]\n }\n\n /**\n * Clears all snapshots\n * @returns {void}\n */\n clearSnapshots () {\n this[kSnapshotRecorder].clear()\n }\n\n /**\n * Resets call counts for all snapshots (useful for test cleanup)\n * @returns {void}\n */\n resetCallCounts () {\n this[kSnapshotRecorder].resetCallCounts()\n }\n\n /**\n * Deletes a specific snapshot by request options\n * @param {import('./snapshot-recorder').SnapshotRequestOptions} requestOpts - Request options to identify the snapshot\n * @return {Promise} - Returns true if the snapshot was deleted, false if not found\n */\n deleteSnapshot (requestOpts) {\n return this[kSnapshotRecorder].deleteSnapshot(requestOpts)\n }\n\n /**\n * Gets information about a specific snapshot\n * @returns {import('./snapshot-recorder').SnapshotInfo|null} - Snapshot information or null if not found\n */\n getSnapshotInfo (requestOpts) {\n return this[kSnapshotRecorder].getSnapshotInfo(requestOpts)\n }\n\n /**\n * Replaces all snapshots with new data (full replacement)\n * @param {Array<{hash: string; snapshot: import('./snapshot-recorder').SnapshotEntryshotEntry}>|Record} snapshotData - New snapshot data to replace existing snapshots\n * @returns {void}\n */\n replaceSnapshots (snapshotData) {\n this[kSnapshotRecorder].replaceSnapshots(snapshotData)\n }\n\n /**\n * Closes the agent, saving snapshots and cleaning up resources.\n *\n * @returns {Promise}\n */\n async close () {\n await this[kSnapshotRecorder].close()\n await this[kRealAgent]?.close()\n await super.close()\n }\n}\n\nmodule.exports = SnapshotAgent\n","'use strict'\n\nconst { writeFile, readFile, mkdir } = require('node:fs/promises')\nconst { dirname, resolve } = require('node:path')\nconst { setTimeout, clearTimeout } = require('node:timers')\nconst { InvalidArgumentError, UndiciError } = require('../core/errors')\nconst { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require('./snapshot-utils')\n\n/**\n * @typedef {Object} SnapshotRequestOptions\n * @property {string} method - HTTP method (e.g. 'GET', 'POST', etc.)\n * @property {string} path - Request path\n * @property {string} origin - Request origin (base URL)\n * @property {import('./snapshot-utils').Headers|import('./snapshot-utils').UndiciHeaders} headers - Request headers\n * @property {import('./snapshot-utils').NormalizedHeaders} _normalizedHeaders - Request headers as a lowercase object\n * @property {string|Buffer} [body] - Request body (optional)\n */\n\n/**\n * @typedef {Object} SnapshotEntryRequest\n * @property {string} method - HTTP method (e.g. 'GET', 'POST', etc.)\n * @property {string} url - Full URL of the request\n * @property {import('./snapshot-utils').NormalizedHeaders} headers - Normalized headers as a lowercase object\n * @property {string|Buffer} [body] - Request body (optional)\n */\n\n/**\n * @typedef {Object} SnapshotEntryResponse\n * @property {number} statusCode - HTTP status code of the response\n * @property {import('./snapshot-utils').NormalizedHeaders} headers - Normalized response headers as a lowercase object\n * @property {string} body - Response body as a base64url encoded string\n * @property {Object} [trailers] - Optional response trailers\n */\n\n/**\n * @typedef {Object} SnapshotEntry\n * @property {SnapshotEntryRequest} request - The request object\n * @property {Array} responses - Array of response objects\n * @property {number} callCount - Number of times this snapshot has been called\n * @property {string} timestamp - ISO timestamp of when the snapshot was created\n */\n\n/**\n * @typedef {Object} SnapshotRecorderMatchOptions\n * @property {Array} [matchHeaders=[]] - Headers to match (empty array means match all headers)\n * @property {Array} [ignoreHeaders=[]] - Headers to ignore for matching\n * @property {Array} [excludeHeaders=[]] - Headers to exclude from matching\n * @property {boolean} [matchBody=true] - Whether to match request body\n * @property {boolean} [matchQuery=true] - Whether to match query properties\n * @property {boolean} [caseSensitive=false] - Whether header matching is case-sensitive\n */\n\n/**\n * @typedef {Object} SnapshotRecorderOptions\n * @property {string} [snapshotPath] - Path to save/load snapshots\n * @property {import('./snapshot-utils').SnapshotMode} [mode='record'] - Mode: 'record' or 'playback'\n * @property {number} [maxSnapshots=Infinity] - Maximum number of snapshots to keep\n * @property {boolean} [autoFlush=false] - Whether to automatically flush snapshots to disk\n * @property {number} [flushInterval=30000] - Auto-flush interval in milliseconds (default: 30 seconds)\n * @property {Array} [excludeUrls=[]] - URLs to exclude from recording\n * @property {function} [shouldRecord=null] - Function to filter requests for recording\n * @property {function} [shouldPlayback=null] - Function to filter requests\n */\n\n/**\n * @typedef {Object} SnapshotFormattedRequest\n * @property {string} method - HTTP method (e.g. 'GET', 'POST', etc.)\n * @property {string} url - Full URL of the request (with query parameters if matchQuery is true)\n * @property {import('./snapshot-utils').NormalizedHeaders} headers - Normalized headers as a lowercase object\n * @property {string} body - Request body (optional, only if matchBody is true)\n */\n\n/**\n * @typedef {Object} SnapshotInfo\n * @property {string} hash - Hash key for the snapshot\n * @property {SnapshotEntryRequest} request - The request object\n * @property {number} responseCount - Number of responses recorded for this request\n * @property {number} callCount - Number of times this snapshot has been called\n * @property {string} timestamp - ISO timestamp of when the snapshot was created\n */\n\n/**\n * Formats a request for consistent snapshot storage\n * Caches normalized headers to avoid repeated processing\n *\n * @param {SnapshotRequestOptions} opts - Request options\n * @param {import('./snapshot-utils').HeaderFilters} headerFilters - Cached header sets for performance\n * @param {SnapshotRecorderMatchOptions} [matchOptions] - Matching options for headers and body\n * @returns {SnapshotFormattedRequest} - Formatted request object\n */\nfunction formatRequestKey (opts, headerFilters, matchOptions = {}) {\n const url = new URL(opts.path, opts.origin)\n\n // Cache normalized headers if not already done\n const normalized = opts._normalizedHeaders || normalizeHeaders(opts.headers)\n if (!opts._normalizedHeaders) {\n opts._normalizedHeaders = normalized\n }\n\n return {\n method: opts.method || 'GET',\n url: matchOptions.matchQuery !== false ? url.toString() : `${url.origin}${url.pathname}`,\n headers: filterHeadersForMatching(normalized, headerFilters, matchOptions),\n body: matchOptions.matchBody !== false && opts.body ? String(opts.body) : ''\n }\n}\n\n/**\n * Filters headers based on matching configuration\n *\n * @param {import('./snapshot-utils').Headers} headers - Headers to filter\n * @param {import('./snapshot-utils').HeaderFilters} headerFilters - Cached sets for ignore, exclude, and match headers\n * @param {SnapshotRecorderMatchOptions} [matchOptions] - Matching options for headers\n */\nfunction filterHeadersForMatching (headers, headerFilters, matchOptions = {}) {\n if (!headers || typeof headers !== 'object') return {}\n\n const {\n caseSensitive = false\n } = matchOptions\n\n const filtered = {}\n const { ignore, exclude, match } = headerFilters\n\n for (const [key, value] of Object.entries(headers)) {\n const headerKey = caseSensitive ? key : key.toLowerCase()\n\n // Skip if in exclude list (for security)\n if (exclude.has(headerKey)) continue\n\n // Skip if in ignore list (for matching)\n if (ignore.has(headerKey)) continue\n\n // If matchHeaders is specified, only include those headers\n if (match.size !== 0) {\n if (!match.has(headerKey)) continue\n }\n\n filtered[headerKey] = value\n }\n\n return filtered\n}\n\n/**\n * Filters headers for storage (only excludes sensitive headers)\n *\n * @param {import('./snapshot-utils').Headers} headers - Headers to filter\n * @param {import('./snapshot-utils').HeaderFilters} headerFilters - Cached sets for ignore, exclude, and match headers\n * @param {SnapshotRecorderMatchOptions} [matchOptions] - Matching options for headers\n */\nfunction filterHeadersForStorage (headers, headerFilters, matchOptions = {}) {\n if (!headers || typeof headers !== 'object') return {}\n\n const {\n caseSensitive = false\n } = matchOptions\n\n const filtered = {}\n const { exclude: excludeSet } = headerFilters\n\n for (const [key, value] of Object.entries(headers)) {\n const headerKey = caseSensitive ? key : key.toLowerCase()\n\n // Skip if in exclude list (for security)\n if (excludeSet.has(headerKey)) continue\n\n filtered[headerKey] = value\n }\n\n return filtered\n}\n\n/**\n * Creates a hash key for request matching\n * Properly orders headers to avoid conflicts and uses crypto hashing when available\n *\n * @param {SnapshotFormattedRequest} formattedRequest - Request object\n * @returns {string} - Base64url encoded hash of the request\n */\nfunction createRequestHash (formattedRequest) {\n const parts = [\n formattedRequest.method,\n formattedRequest.url\n ]\n\n // Process headers in a deterministic way to avoid conflicts\n if (formattedRequest.headers && typeof formattedRequest.headers === 'object') {\n const headerKeys = Object.keys(formattedRequest.headers).sort()\n for (const key of headerKeys) {\n const values = Array.isArray(formattedRequest.headers[key])\n ? formattedRequest.headers[key]\n : [formattedRequest.headers[key]]\n\n // Add header name\n parts.push(key)\n\n // Add all values for this header, sorted for consistency\n for (const value of values.sort()) {\n parts.push(String(value))\n }\n }\n }\n\n // Add body\n parts.push(formattedRequest.body)\n\n const content = parts.join('|')\n\n return hashId(content)\n}\n\nclass SnapshotRecorder {\n /** @type {NodeJS.Timeout | null} */\n #flushTimeout\n\n /** @type {import('./snapshot-utils').IsUrlExcluded} */\n #isUrlExcluded\n\n /** @type {Map} */\n #snapshots = new Map()\n\n /** @type {string|undefined} */\n #snapshotPath\n\n /** @type {number} */\n #maxSnapshots = Infinity\n\n /** @type {boolean} */\n #autoFlush = false\n\n /** @type {import('./snapshot-utils').HeaderFilters} */\n #headerFilters\n\n /**\n * Creates a new SnapshotRecorder instance\n * @param {SnapshotRecorderOptions&SnapshotRecorderMatchOptions} [options={}] - Configuration options for the recorder\n */\n constructor (options = {}) {\n this.#snapshotPath = options.snapshotPath\n this.#maxSnapshots = options.maxSnapshots || Infinity\n this.#autoFlush = options.autoFlush || false\n this.flushInterval = options.flushInterval || 30000 // 30 seconds default\n this._flushTimer = null\n\n // Matching configuration\n /** @type {Required} */\n this.matchOptions = {\n matchHeaders: options.matchHeaders || [], // empty means match all headers\n ignoreHeaders: options.ignoreHeaders || [],\n excludeHeaders: options.excludeHeaders || [],\n matchBody: options.matchBody !== false, // default: true\n matchQuery: options.matchQuery !== false, // default: true\n caseSensitive: options.caseSensitive || false\n }\n\n // Cache processed header sets to avoid recreating them on every request\n this.#headerFilters = createHeaderFilters(this.matchOptions)\n\n // Request filtering callbacks\n this.shouldRecord = options.shouldRecord || (() => true) // function(requestOpts) -> boolean\n this.shouldPlayback = options.shouldPlayback || (() => true) // function(requestOpts) -> boolean\n\n // URL pattern filtering\n this.#isUrlExcluded = isUrlExcludedFactory(options.excludeUrls) // Array of regex patterns or strings\n\n // Start auto-flush timer if enabled\n if (this.#autoFlush && this.#snapshotPath) {\n this.#startAutoFlush()\n }\n }\n\n /**\n * Records a request-response interaction\n * @param {SnapshotRequestOptions} requestOpts - Request options\n * @param {SnapshotEntryResponse} response - Response data to record\n * @return {Promise} - Resolves when the recording is complete\n */\n async record (requestOpts, response) {\n // Check if recording should be filtered out\n if (!this.shouldRecord(requestOpts)) {\n return // Skip recording\n }\n\n // Check URL exclusion patterns\n if (this.isUrlExcluded(requestOpts)) {\n return // Skip recording\n }\n\n const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions)\n const hash = createRequestHash(request)\n\n // Extract response data - always store body as base64\n const normalizedHeaders = normalizeHeaders(response.headers)\n\n /** @type {SnapshotEntryResponse} */\n const responseData = {\n statusCode: response.statusCode,\n headers: filterHeadersForStorage(normalizedHeaders, this.#headerFilters, this.matchOptions),\n body: Buffer.isBuffer(response.body)\n ? response.body.toString('base64')\n : Buffer.from(String(response.body || '')).toString('base64'),\n trailers: response.trailers\n }\n\n // Remove oldest snapshot if we exceed maxSnapshots limit\n if (this.#snapshots.size >= this.#maxSnapshots && !this.#snapshots.has(hash)) {\n const oldestKey = this.#snapshots.keys().next().value\n this.#snapshots.delete(oldestKey)\n }\n\n // Support sequential responses - if snapshot exists, add to responses array\n const existingSnapshot = this.#snapshots.get(hash)\n if (existingSnapshot && existingSnapshot.responses) {\n existingSnapshot.responses.push(responseData)\n existingSnapshot.timestamp = new Date().toISOString()\n } else {\n this.#snapshots.set(hash, {\n request,\n responses: [responseData], // Always store as array for consistency\n callCount: 0,\n timestamp: new Date().toISOString()\n })\n }\n\n // Auto-flush if enabled\n if (this.#autoFlush && this.#snapshotPath) {\n this.#scheduleFlush()\n }\n }\n\n /**\n * Checks if a URL should be excluded from recording/playback\n * @param {SnapshotRequestOptions} requestOpts - Request options to check\n * @returns {boolean} - True if URL is excluded\n */\n isUrlExcluded (requestOpts) {\n const url = new URL(requestOpts.path, requestOpts.origin).toString()\n return this.#isUrlExcluded(url)\n }\n\n /**\n * Finds a matching snapshot for the given request\n * Returns the appropriate response based on call count for sequential responses\n *\n * @param {SnapshotRequestOptions} requestOpts - Request options to match\n * @returns {SnapshotEntry&Record<'response', SnapshotEntryResponse>|undefined} - Matching snapshot response or undefined if not found\n */\n findSnapshot (requestOpts) {\n // Check if playback should be filtered out\n if (!this.shouldPlayback(requestOpts)) {\n return undefined // Skip playback\n }\n\n // Check URL exclusion patterns\n if (this.isUrlExcluded(requestOpts)) {\n return undefined // Skip playback\n }\n\n const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions)\n const hash = createRequestHash(request)\n const snapshot = this.#snapshots.get(hash)\n\n if (!snapshot) return undefined\n\n // Handle sequential responses\n const currentCallCount = snapshot.callCount || 0\n const responseIndex = Math.min(currentCallCount, snapshot.responses.length - 1)\n snapshot.callCount = currentCallCount + 1\n\n return {\n ...snapshot,\n response: snapshot.responses[responseIndex]\n }\n }\n\n /**\n * Loads snapshots from file\n * @param {string} [filePath] - Optional file path to load snapshots from\n * @return {Promise} - Resolves when snapshots are loaded\n */\n async loadSnapshots (filePath) {\n const path = filePath || this.#snapshotPath\n if (!path) {\n throw new InvalidArgumentError('Snapshot path is required')\n }\n\n try {\n const data = await readFile(resolve(path), 'utf8')\n const parsed = JSON.parse(data)\n\n // Convert array format back to Map\n if (Array.isArray(parsed)) {\n this.#snapshots.clear()\n for (const { hash, snapshot } of parsed) {\n this.#snapshots.set(hash, snapshot)\n }\n } else {\n // Legacy object format\n this.#snapshots = new Map(Object.entries(parsed))\n }\n } catch (error) {\n if (error.code === 'ENOENT') {\n // File doesn't exist yet - that's ok for recording mode\n this.#snapshots.clear()\n } else {\n throw new UndiciError(`Failed to load snapshots from ${path}`, { cause: error })\n }\n }\n }\n\n /**\n * Saves snapshots to file\n *\n * @param {string} [filePath] - Optional file path to save snapshots\n * @returns {Promise} - Resolves when snapshots are saved\n */\n async saveSnapshots (filePath) {\n const path = filePath || this.#snapshotPath\n if (!path) {\n throw new InvalidArgumentError('Snapshot path is required')\n }\n\n const resolvedPath = resolve(path)\n\n // Ensure directory exists\n await mkdir(dirname(resolvedPath), { recursive: true })\n\n // Convert Map to serializable format\n const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({\n hash,\n snapshot\n }))\n\n await writeFile(resolvedPath, JSON.stringify(data, null, 2), { flush: true })\n }\n\n /**\n * Clears all recorded snapshots\n * @returns {void}\n */\n clear () {\n this.#snapshots.clear()\n }\n\n /**\n * Gets all recorded snapshots\n * @return {Array} - Array of all recorded snapshots\n */\n getSnapshots () {\n return Array.from(this.#snapshots.values())\n }\n\n /**\n * Gets snapshot count\n * @return {number} - Number of recorded snapshots\n */\n size () {\n return this.#snapshots.size\n }\n\n /**\n * Resets call counts for all snapshots (useful for test cleanup)\n * @returns {void}\n */\n resetCallCounts () {\n for (const snapshot of this.#snapshots.values()) {\n snapshot.callCount = 0\n }\n }\n\n /**\n * Deletes a specific snapshot by request options\n * @param {SnapshotRequestOptions} requestOpts - Request options to match\n * @returns {boolean} - True if snapshot was deleted, false if not found\n */\n deleteSnapshot (requestOpts) {\n const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions)\n const hash = createRequestHash(request)\n return this.#snapshots.delete(hash)\n }\n\n /**\n * Gets information about a specific snapshot\n * @param {SnapshotRequestOptions} requestOpts - Request options to match\n * @returns {SnapshotInfo|null} - Snapshot information or null if not found\n */\n getSnapshotInfo (requestOpts) {\n const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions)\n const hash = createRequestHash(request)\n const snapshot = this.#snapshots.get(hash)\n\n if (!snapshot) return null\n\n return {\n hash,\n request: snapshot.request,\n responseCount: snapshot.responses ? snapshot.responses.length : (snapshot.response ? 1 : 0), // .response for legacy snapshots\n callCount: snapshot.callCount || 0,\n timestamp: snapshot.timestamp\n }\n }\n\n /**\n * Replaces all snapshots with new data (full replacement)\n * @param {Array<{hash: string; snapshot: SnapshotEntry}>|Record} snapshotData - New snapshot data to replace existing ones\n * @returns {void}\n */\n replaceSnapshots (snapshotData) {\n this.#snapshots.clear()\n\n if (Array.isArray(snapshotData)) {\n for (const { hash, snapshot } of snapshotData) {\n this.#snapshots.set(hash, snapshot)\n }\n } else if (snapshotData && typeof snapshotData === 'object') {\n // Legacy object format\n this.#snapshots = new Map(Object.entries(snapshotData))\n }\n }\n\n /**\n * Starts the auto-flush timer\n * @returns {void}\n */\n #startAutoFlush () {\n return this.#scheduleFlush()\n }\n\n /**\n * Stops the auto-flush timer\n * @returns {void}\n */\n #stopAutoFlush () {\n if (this.#flushTimeout) {\n clearTimeout(this.#flushTimeout)\n // Ensure any pending flush is completed\n this.saveSnapshots().catch(() => {\n // Ignore flush errors\n })\n this.#flushTimeout = null\n }\n }\n\n /**\n * Schedules a flush (debounced to avoid excessive writes)\n */\n #scheduleFlush () {\n this.#flushTimeout = setTimeout(() => {\n this.saveSnapshots().catch(() => {\n // Ignore flush errors\n })\n if (this.#autoFlush) {\n this.#flushTimeout?.refresh()\n } else {\n this.#flushTimeout = null\n }\n }, 1000) // 1 second debounce\n }\n\n /**\n * Cleanup method to stop timers\n * @returns {void}\n */\n destroy () {\n this.#stopAutoFlush()\n if (this.#flushTimeout) {\n clearTimeout(this.#flushTimeout)\n this.#flushTimeout = null\n }\n }\n\n /**\n * Async close method that saves all recordings and performs cleanup\n * @returns {Promise}\n */\n async close () {\n // Save any pending recordings if we have a snapshot path\n if (this.#snapshotPath && this.#snapshots.size !== 0) {\n await this.saveSnapshots()\n }\n\n // Perform cleanup\n this.destroy()\n }\n}\n\nmodule.exports = { SnapshotRecorder, formatRequestKey, createRequestHash, filterHeadersForMatching, filterHeadersForStorage, createHeaderFilters }\n","'use strict'\n\nconst { InvalidArgumentError } = require('../core/errors')\nconst { runtimeFeatures } = require('../util/runtime-features.js')\n\n/**\n * @typedef {Object} HeaderFilters\n * @property {Set} ignore - Set of headers to ignore for matching\n * @property {Set} exclude - Set of headers to exclude from matching\n * @property {Set} match - Set of headers to match (empty means match\n */\n\n/**\n * Creates cached header sets for performance\n *\n * @param {import('./snapshot-recorder').SnapshotRecorderMatchOptions} matchOptions - Matching options for headers\n * @returns {HeaderFilters} - Cached sets for ignore, exclude, and match headers\n */\nfunction createHeaderFilters (matchOptions = {}) {\n const { ignoreHeaders = [], excludeHeaders = [], matchHeaders = [], caseSensitive = false } = matchOptions\n\n return {\n ignore: new Set(ignoreHeaders.map(header => caseSensitive ? header : header.toLowerCase())),\n exclude: new Set(excludeHeaders.map(header => caseSensitive ? header : header.toLowerCase())),\n match: new Set(matchHeaders.map(header => caseSensitive ? header : header.toLowerCase()))\n }\n}\n\nconst crypto = runtimeFeatures.has('crypto')\n ? require('node:crypto')\n : null\n\n/**\n * @callback HashIdFunction\n * @param {string} value - The value to hash\n * @returns {string} - The base64url encoded hash of the value\n */\n\n/**\n * Generates a hash for a given value\n * @type {HashIdFunction}\n */\nconst hashId = crypto?.hash\n ? (value) => crypto.hash('sha256', value, 'base64url')\n : (value) => Buffer.from(value).toString('base64url')\n\n/**\n * @typedef {(url: string) => boolean} IsUrlExcluded Checks if a URL matches any of the exclude patterns\n */\n\n/** @typedef {{[key: Lowercase]: string}} NormalizedHeaders */\n/** @typedef {Array} UndiciHeaders */\n/** @typedef {Record} Headers */\n\n/**\n * @param {*} headers\n * @returns {headers is UndiciHeaders}\n */\nfunction isUndiciHeaders (headers) {\n return Array.isArray(headers) && (headers.length & 1) === 0\n}\n\n/**\n * Factory function to create a URL exclusion checker\n * @param {Array} [excludePatterns=[]] - Array of patterns to exclude\n * @returns {IsUrlExcluded} - A function that checks if a URL matches any of the exclude patterns\n */\nfunction isUrlExcludedFactory (excludePatterns = []) {\n if (excludePatterns.length === 0) {\n return () => false\n }\n\n return function isUrlExcluded (url) {\n let urlLowerCased\n\n for (const pattern of excludePatterns) {\n if (typeof pattern === 'string') {\n if (!urlLowerCased) {\n // Convert URL to lowercase only once\n urlLowerCased = url.toLowerCase()\n }\n // Simple string match (case-insensitive)\n if (urlLowerCased.includes(pattern.toLowerCase())) {\n return true\n }\n } else if (pattern instanceof RegExp) {\n // Regex pattern match\n if (pattern.test(url)) {\n return true\n }\n }\n }\n\n return false\n }\n}\n\n/**\n * Normalizes headers for consistent comparison\n *\n * @param {Object|UndiciHeaders} headers - Headers to normalize\n * @returns {NormalizedHeaders} - Normalized headers as a lowercase object\n */\nfunction normalizeHeaders (headers) {\n /** @type {NormalizedHeaders} */\n const normalizedHeaders = {}\n\n if (!headers) return normalizedHeaders\n\n // Handle array format (undici internal format: [name, value, name, value, ...])\n if (isUndiciHeaders(headers)) {\n for (let i = 0; i < headers.length; i += 2) {\n const key = headers[i]\n const value = headers[i + 1]\n if (key && value !== undefined) {\n // Convert Buffers to strings if needed\n const keyStr = Buffer.isBuffer(key) ? key.toString() : key\n const valueStr = Buffer.isBuffer(value) ? value.toString() : value\n normalizedHeaders[keyStr.toLowerCase()] = valueStr\n }\n }\n return normalizedHeaders\n }\n\n // Handle object format\n if (headers && typeof headers === 'object') {\n for (const [key, value] of Object.entries(headers)) {\n if (key && typeof key === 'string') {\n normalizedHeaders[key.toLowerCase()] = Array.isArray(value) ? value.join(', ') : String(value)\n }\n }\n }\n\n return normalizedHeaders\n}\n\nconst validSnapshotModes = /** @type {const} */ (['record', 'playback', 'update'])\n\n/** @typedef {typeof validSnapshotModes[number]} SnapshotMode */\n\n/**\n * @param {*} mode - The snapshot mode to validate\n * @returns {asserts mode is SnapshotMode}\n */\nfunction validateSnapshotMode (mode) {\n if (!validSnapshotModes.includes(mode)) {\n throw new InvalidArgumentError(`Invalid snapshot mode: ${mode}. Must be one of: ${validSnapshotModes.join(', ')}`)\n }\n}\n\nmodule.exports = {\n createHeaderFilters,\n hashId,\n isUndiciHeaders,\n normalizeHeaders,\n isUrlExcludedFactory,\n validateSnapshotMode\n}\n","'use strict'\n\nconst {\n safeHTTPMethods,\n pathHasQueryOrFragment,\n hasSafeIterator\n} = require('../core/util')\n\nconst { serializePathWithQuery } = require('../core/util')\n\n/**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchOptions} opts\n */\nfunction makeCacheKey (opts) {\n if (!opts.origin) {\n throw new Error('opts.origin is undefined')\n }\n\n let fullPath = opts.path || '/'\n\n if (opts.query && !pathHasQueryOrFragment(opts.path)) {\n fullPath = serializePathWithQuery(fullPath, opts.query)\n }\n\n return {\n origin: opts.origin.toString(),\n method: opts.method,\n path: fullPath,\n headers: opts.headers\n }\n}\n\n/**\n * @param {Record}\n * @returns {Record}\n */\nfunction normalizeHeaders (opts) {\n let headers\n if (opts.headers == null) {\n headers = {}\n } else if (typeof opts.headers === 'object') {\n headers = {}\n\n if (hasSafeIterator(opts.headers)) {\n for (const x of opts.headers) {\n if (!Array.isArray(x)) {\n throw new Error('opts.headers is not a valid header map')\n }\n const [key, val] = x\n if (typeof key !== 'string' || typeof val !== 'string') {\n throw new Error('opts.headers is not a valid header map')\n }\n headers[key.toLowerCase()] = val\n }\n } else {\n for (const key of Object.keys(opts.headers)) {\n headers[key.toLowerCase()] = opts.headers[key]\n }\n }\n } else {\n throw new Error('opts.headers is not an object')\n }\n\n return headers\n}\n\n/**\n * @param {any} key\n */\nfunction assertCacheKey (key) {\n if (typeof key !== 'object') {\n throw new TypeError(`expected key to be object, got ${typeof key}`)\n }\n\n for (const property of ['origin', 'method', 'path']) {\n if (typeof key[property] !== 'string') {\n throw new TypeError(`expected key.${property} to be string, got ${typeof key[property]}`)\n }\n }\n\n if (key.headers !== undefined && typeof key.headers !== 'object') {\n throw new TypeError(`expected headers to be object, got ${typeof key}`)\n }\n}\n\n/**\n * @param {any} value\n */\nfunction assertCacheValue (value) {\n if (typeof value !== 'object') {\n throw new TypeError(`expected value to be object, got ${typeof value}`)\n }\n\n for (const property of ['statusCode', 'cachedAt', 'staleAt', 'deleteAt']) {\n if (typeof value[property] !== 'number') {\n throw new TypeError(`expected value.${property} to be number, got ${typeof value[property]}`)\n }\n }\n\n if (typeof value.statusMessage !== 'string') {\n throw new TypeError(`expected value.statusMessage to be string, got ${typeof value.statusMessage}`)\n }\n\n if (value.headers != null && typeof value.headers !== 'object') {\n throw new TypeError(`expected value.rawHeaders to be object, got ${typeof value.headers}`)\n }\n\n if (value.vary !== undefined && typeof value.vary !== 'object') {\n throw new TypeError(`expected value.vary to be object, got ${typeof value.vary}`)\n }\n\n if (value.etag !== undefined && typeof value.etag !== 'string') {\n throw new TypeError(`expected value.etag to be string, got ${typeof value.etag}`)\n }\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-cache-control\n * @see https://www.iana.org/assignments/http-cache-directives/http-cache-directives.xhtml\n\n * @param {string | string[]} header\n * @returns {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives}\n */\nfunction parseCacheControlHeader (header) {\n /**\n * @type {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives}\n */\n const output = {}\n\n let directives\n if (Array.isArray(header)) {\n directives = []\n\n for (const directive of header) {\n directives.push(...directive.split(','))\n }\n } else {\n directives = header.split(',')\n }\n\n for (let i = 0; i < directives.length; i++) {\n const directive = directives[i].toLowerCase()\n const keyValueDelimiter = directive.indexOf('=')\n\n let key\n let value\n if (keyValueDelimiter !== -1) {\n key = directive.substring(0, keyValueDelimiter).trimStart()\n value = directive.substring(keyValueDelimiter + 1)\n } else {\n key = directive.trim()\n }\n\n switch (key) {\n case 'min-fresh':\n case 'max-stale':\n case 'max-age':\n case 's-maxage':\n case 'stale-while-revalidate':\n case 'stale-if-error': {\n if (value === undefined || value[0] === ' ') {\n continue\n }\n\n if (\n value.length >= 2 &&\n value[0] === '\"' &&\n value[value.length - 1] === '\"'\n ) {\n value = value.substring(1, value.length - 1)\n }\n\n const parsedValue = parseInt(value, 10)\n // eslint-disable-next-line no-self-compare\n if (parsedValue !== parsedValue) {\n continue\n }\n\n if (key === 'max-age' && key in output && output[key] >= parsedValue) {\n continue\n }\n\n output[key] = parsedValue\n\n break\n }\n case 'private':\n case 'no-cache': {\n if (value) {\n // The private and no-cache directives can be unqualified (aka just\n // `private` or `no-cache`) or qualified (w/ a value). When they're\n // qualified, it's a list of headers like `no-cache=header1`,\n // `no-cache=\"header1\"`, or `no-cache=\"header1, header2\"`\n // If we're given multiple headers, the comma messes us up since\n // we split the full header by commas. So, let's loop through the\n // remaining parts in front of us until we find one that ends in a\n // quote. We can then just splice all of the parts in between the\n // starting quote and the ending quote out of the directives array\n // and continue parsing like normal.\n // https://www.rfc-editor.org/rfc/rfc9111.html#name-no-cache-2\n if (value[0] === '\"') {\n // Something like `no-cache=\"some-header\"` OR `no-cache=\"some-header, another-header\"`.\n\n // Add the first header on and cut off the leading quote\n const headers = [value.substring(1)]\n\n let foundEndingQuote = value[value.length - 1] === '\"'\n if (!foundEndingQuote) {\n // Something like `no-cache=\"some-header, another-header\"`\n // This can still be something invalid, e.g. `no-cache=\"some-header, ...`\n for (let j = i + 1; j < directives.length; j++) {\n const nextPart = directives[j]\n const nextPartLength = nextPart.length\n\n headers.push(nextPart.trim())\n\n if (nextPartLength !== 0 && nextPart[nextPartLength - 1] === '\"') {\n foundEndingQuote = true\n break\n }\n }\n }\n\n if (foundEndingQuote) {\n let lastHeader = headers[headers.length - 1]\n if (lastHeader[lastHeader.length - 1] === '\"') {\n lastHeader = lastHeader.substring(0, lastHeader.length - 1)\n headers[headers.length - 1] = lastHeader\n }\n\n if (key in output) {\n output[key] = output[key].concat(headers)\n } else {\n output[key] = headers\n }\n }\n } else {\n // Something like `no-cache=\"some-header\"`\n if (key in output) {\n output[key] = output[key].concat(value)\n } else {\n output[key] = [value]\n }\n }\n\n break\n }\n }\n // eslint-disable-next-line no-fallthrough\n case 'public':\n case 'no-store':\n case 'must-revalidate':\n case 'proxy-revalidate':\n case 'immutable':\n case 'no-transform':\n case 'must-understand':\n case 'only-if-cached':\n if (value) {\n // These are qualified (something like `public=...`) when they aren't\n // allowed to be, skip\n continue\n }\n\n output[key] = true\n break\n default:\n // Ignore unknown directives as per https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.3-1\n continue\n }\n }\n\n return output\n}\n\n/**\n * @param {string | string[]} varyHeader Vary header from the server\n * @param {Record} headers Request headers\n * @returns {Record}\n */\nfunction parseVaryHeader (varyHeader, headers) {\n if (typeof varyHeader === 'string' && varyHeader.includes('*')) {\n return headers\n }\n\n const output = /** @type {Record} */ ({})\n\n const varyingHeaders = typeof varyHeader === 'string'\n ? varyHeader.split(',')\n : varyHeader\n\n for (const header of varyingHeaders) {\n const trimmedHeader = header.trim().toLowerCase()\n\n output[trimmedHeader] = headers[trimmedHeader] ?? null\n }\n\n return output\n}\n\n/**\n * Note: this deviates from the spec a little. Empty etags (\"\", W/\"\") are valid,\n * however, including them in cached resposnes serves little to no purpose.\n *\n * @see https://www.rfc-editor.org/rfc/rfc9110.html#name-etag\n *\n * @param {string} etag\n * @returns {boolean}\n */\nfunction isEtagUsable (etag) {\n if (etag.length <= 2) {\n // Shortest an etag can be is two chars (just \"\"). This is where we deviate\n // from the spec requiring a min of 3 chars however\n return false\n }\n\n if (etag[0] === '\"' && etag[etag.length - 1] === '\"') {\n // ETag: \"\"asd123\"\" or ETag: \"W/\"asd123\"\", kinda undefined behavior in the\n // spec. Some servers will accept these while others don't.\n // ETag: \"asd123\"\n return !(etag[1] === '\"' || etag.startsWith('\"W/'))\n }\n\n if (etag.startsWith('W/\"') && etag[etag.length - 1] === '\"') {\n // ETag: W/\"\", also where we deviate from the spec & require a min of 3\n // chars\n // ETag: for W/\"\", W/\"asd123\"\n return etag.length !== 4\n }\n\n // Anything else\n return false\n}\n\n/**\n * @param {unknown} store\n * @returns {asserts store is import('../../types/cache-interceptor.d.ts').default.CacheStore}\n */\nfunction assertCacheStore (store, name = 'CacheStore') {\n if (typeof store !== 'object' || store === null) {\n throw new TypeError(`expected type of ${name} to be a CacheStore, got ${store === null ? 'null' : typeof store}`)\n }\n\n for (const fn of ['get', 'createWriteStream', 'delete']) {\n if (typeof store[fn] !== 'function') {\n throw new TypeError(`${name} needs to have a \\`${fn}()\\` function`)\n }\n }\n}\n/**\n * @param {unknown} methods\n * @returns {asserts methods is import('../../types/cache-interceptor.d.ts').default.CacheMethods[]}\n */\nfunction assertCacheMethods (methods, name = 'CacheMethods') {\n if (!Array.isArray(methods)) {\n throw new TypeError(`expected type of ${name} needs to be an array, got ${methods === null ? 'null' : typeof methods}`)\n }\n\n if (methods.length === 0) {\n throw new TypeError(`${name} needs to have at least one method`)\n }\n\n for (const method of methods) {\n if (!safeHTTPMethods.includes(method)) {\n throw new TypeError(`element of ${name}-array needs to be one of following values: ${safeHTTPMethods.join(', ')}, got ${method}`)\n }\n }\n}\n\n/**\n * Creates a string key for request deduplication purposes.\n * This key is used to identify in-flight requests that can be shared.\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey\n * @param {Set} [excludeHeaders] Set of lowercase header names to exclude from the key\n * @returns {string}\n */\nfunction makeDeduplicationKey (cacheKey, excludeHeaders) {\n // Create a deterministic string key from the cache key\n // Include origin, method, path, and sorted headers\n let key = `${cacheKey.origin}:${cacheKey.method}:${cacheKey.path}`\n\n if (cacheKey.headers) {\n const sortedHeaders = Object.keys(cacheKey.headers).sort()\n for (const header of sortedHeaders) {\n // Skip excluded headers\n if (excludeHeaders?.has(header.toLowerCase())) {\n continue\n }\n const value = cacheKey.headers[header]\n key += `:${header}=${Array.isArray(value) ? value.join(',') : value}`\n }\n }\n\n return key\n}\n\nmodule.exports = {\n makeCacheKey,\n normalizeHeaders,\n assertCacheKey,\n assertCacheValue,\n parseCacheControlHeader,\n parseVaryHeader,\n isEtagUsable,\n assertCacheMethods,\n assertCacheStore,\n makeDeduplicationKey\n}\n","'use strict'\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc9110.html#name-date-time-formats\n *\n * @param {string} date\n * @returns {Date | undefined}\n */\nfunction parseHttpDate (date) {\n // Sun, 06 Nov 1994 08:49:37 GMT ; IMF-fixdate\n // Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format\n // Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format\n\n switch (date[3]) {\n case ',': return parseImfDate(date)\n case ' ': return parseAscTimeDate(date)\n default: return parseRfc850Date(date)\n }\n}\n\n/**\n * @see https://httpwg.org/specs/rfc9110.html#preferred.date.format\n *\n * @param {string} date\n * @returns {Date | undefined}\n */\nfunction parseImfDate (date) {\n if (\n date.length !== 29 ||\n date[4] !== ' ' ||\n date[7] !== ' ' ||\n date[11] !== ' ' ||\n date[16] !== ' ' ||\n date[19] !== ':' ||\n date[22] !== ':' ||\n date[25] !== ' ' ||\n date[26] !== 'G' ||\n date[27] !== 'M' ||\n date[28] !== 'T'\n ) {\n return undefined\n }\n\n let weekday = -1\n if (date[0] === 'S' && date[1] === 'u' && date[2] === 'n') { // Sunday\n weekday = 0\n } else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n') { // Monday\n weekday = 1\n } else if (date[0] === 'T' && date[1] === 'u' && date[2] === 'e') { // Tuesday\n weekday = 2\n } else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd') { // Wednesday\n weekday = 3\n } else if (date[0] === 'T' && date[1] === 'h' && date[2] === 'u') { // Thursday\n weekday = 4\n } else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i') { // Friday\n weekday = 5\n } else if (date[0] === 'S' && date[1] === 'a' && date[2] === 't') { // Saturday\n weekday = 6\n } else {\n return undefined // Not a valid day of the week\n }\n\n let day = 0\n if (date[5] === '0') {\n // Single digit day, e.g. \"Sun Nov 6 08:49:37 1994\"\n const code = date.charCodeAt(6)\n if (code < 49 || code > 57) {\n return undefined // Not a digit\n }\n day = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(5)\n if (code1 < 49 || code1 > 51) {\n return undefined // Not a digit between 1 and 3\n }\n const code2 = date.charCodeAt(6)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let monthIdx = -1\n if (\n (date[8] === 'J' && date[9] === 'a' && date[10] === 'n')\n ) {\n monthIdx = 0 // Jan\n } else if (\n (date[8] === 'F' && date[9] === 'e' && date[10] === 'b')\n ) {\n monthIdx = 1 // Feb\n } else if (\n (date[8] === 'M' && date[9] === 'a')\n ) {\n if (date[10] === 'r') {\n monthIdx = 2 // Mar\n } else if (date[10] === 'y') {\n monthIdx = 4 // May\n } else {\n return undefined // Invalid month\n }\n } else if (\n (date[8] === 'J')\n ) {\n if (date[9] === 'a' && date[10] === 'n') {\n monthIdx = 0 // Jan\n } else if (date[9] === 'u') {\n if (date[10] === 'n') {\n monthIdx = 5 // Jun\n } else if (date[10] === 'l') {\n monthIdx = 6 // Jul\n } else {\n return undefined // Invalid month\n }\n } else {\n return undefined // Invalid month\n }\n } else if (\n (date[8] === 'A')\n ) {\n if (date[9] === 'p' && date[10] === 'r') {\n monthIdx = 3 // Apr\n } else if (date[9] === 'u' && date[10] === 'g') {\n monthIdx = 7 // Aug\n } else {\n return undefined // Invalid month\n }\n } else if (\n (date[8] === 'S' && date[9] === 'e' && date[10] === 'p')\n ) {\n monthIdx = 8 // Sep\n } else if (\n (date[8] === 'O' && date[9] === 'c' && date[10] === 't')\n ) {\n monthIdx = 9 // Oct\n } else if (\n (date[8] === 'N' && date[9] === 'o' && date[10] === 'v')\n ) {\n monthIdx = 10 // Nov\n } else if (\n (date[8] === 'D' && date[9] === 'e' && date[10] === 'c')\n ) {\n monthIdx = 11 // Dec\n } else {\n // Not a valid month\n return undefined\n }\n\n const yearDigit1 = date.charCodeAt(12)\n if (yearDigit1 < 48 || yearDigit1 > 57) {\n return undefined // Not a digit\n }\n const yearDigit2 = date.charCodeAt(13)\n if (yearDigit2 < 48 || yearDigit2 > 57) {\n return undefined // Not a digit\n }\n const yearDigit3 = date.charCodeAt(14)\n if (yearDigit3 < 48 || yearDigit3 > 57) {\n return undefined // Not a digit\n }\n const yearDigit4 = date.charCodeAt(15)\n if (yearDigit4 < 48 || yearDigit4 > 57) {\n return undefined // Not a digit\n }\n const year = (yearDigit1 - 48) * 1000 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48)\n\n let hour = 0\n if (date[17] === '0') {\n const code = date.charCodeAt(18)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n hour = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(17)\n if (code1 < 48 || code1 > 50) {\n return undefined // Not a digit between 0 and 2\n }\n const code2 = date.charCodeAt(18)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n if (code1 === 50 && code2 > 51) {\n return undefined // Hour cannot be greater than 23\n }\n hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let minute = 0\n if (date[20] === '0') {\n const code = date.charCodeAt(21)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n minute = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(20)\n if (code1 < 48 || code1 > 53) {\n return undefined // Not a digit between 0 and 5\n }\n const code2 = date.charCodeAt(21)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let second = 0\n if (date[23] === '0') {\n const code = date.charCodeAt(24)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n second = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(23)\n if (code1 < 48 || code1 > 53) {\n return undefined // Not a digit between 0 and 5\n }\n const code2 = date.charCodeAt(24)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))\n return result.getUTCDay() === weekday ? result : undefined\n}\n\n/**\n * @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats\n *\n * @param {string} date\n * @returns {Date | undefined}\n */\nfunction parseAscTimeDate (date) {\n // This is assumed to be in UTC\n\n if (\n date.length !== 24 ||\n date[7] !== ' ' ||\n date[10] !== ' ' ||\n date[19] !== ' '\n ) {\n return undefined\n }\n\n let weekday = -1\n if (date[0] === 'S' && date[1] === 'u' && date[2] === 'n') { // Sunday\n weekday = 0\n } else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n') { // Monday\n weekday = 1\n } else if (date[0] === 'T' && date[1] === 'u' && date[2] === 'e') { // Tuesday\n weekday = 2\n } else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd') { // Wednesday\n weekday = 3\n } else if (date[0] === 'T' && date[1] === 'h' && date[2] === 'u') { // Thursday\n weekday = 4\n } else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i') { // Friday\n weekday = 5\n } else if (date[0] === 'S' && date[1] === 'a' && date[2] === 't') { // Saturday\n weekday = 6\n } else {\n return undefined // Not a valid day of the week\n }\n\n let monthIdx = -1\n if (\n (date[4] === 'J' && date[5] === 'a' && date[6] === 'n')\n ) {\n monthIdx = 0 // Jan\n } else if (\n (date[4] === 'F' && date[5] === 'e' && date[6] === 'b')\n ) {\n monthIdx = 1 // Feb\n } else if (\n (date[4] === 'M' && date[5] === 'a')\n ) {\n if (date[6] === 'r') {\n monthIdx = 2 // Mar\n } else if (date[6] === 'y') {\n monthIdx = 4 // May\n } else {\n return undefined // Invalid month\n }\n } else if (\n (date[4] === 'J')\n ) {\n if (date[5] === 'a' && date[6] === 'n') {\n monthIdx = 0 // Jan\n } else if (date[5] === 'u') {\n if (date[6] === 'n') {\n monthIdx = 5 // Jun\n } else if (date[6] === 'l') {\n monthIdx = 6 // Jul\n } else {\n return undefined // Invalid month\n }\n } else {\n return undefined // Invalid month\n }\n } else if (\n (date[4] === 'A')\n ) {\n if (date[5] === 'p' && date[6] === 'r') {\n monthIdx = 3 // Apr\n } else if (date[5] === 'u' && date[6] === 'g') {\n monthIdx = 7 // Aug\n } else {\n return undefined // Invalid month\n }\n } else if (\n (date[4] === 'S' && date[5] === 'e' && date[6] === 'p')\n ) {\n monthIdx = 8 // Sep\n } else if (\n (date[4] === 'O' && date[5] === 'c' && date[6] === 't')\n ) {\n monthIdx = 9 // Oct\n } else if (\n (date[4] === 'N' && date[5] === 'o' && date[6] === 'v')\n ) {\n monthIdx = 10 // Nov\n } else if (\n (date[4] === 'D' && date[5] === 'e' && date[6] === 'c')\n ) {\n monthIdx = 11 // Dec\n } else {\n // Not a valid month\n return undefined\n }\n\n let day = 0\n if (date[8] === ' ') {\n // Single digit day, e.g. \"Sun Nov 6 08:49:37 1994\"\n const code = date.charCodeAt(9)\n if (code < 49 || code > 57) {\n return undefined // Not a digit\n }\n day = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(8)\n if (code1 < 49 || code1 > 51) {\n return undefined // Not a digit between 1 and 3\n }\n const code2 = date.charCodeAt(9)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let hour = 0\n if (date[11] === '0') {\n const code = date.charCodeAt(12)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n hour = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(11)\n if (code1 < 48 || code1 > 50) {\n return undefined // Not a digit between 0 and 2\n }\n const code2 = date.charCodeAt(12)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n if (code1 === 50 && code2 > 51) {\n return undefined // Hour cannot be greater than 23\n }\n hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let minute = 0\n if (date[14] === '0') {\n const code = date.charCodeAt(15)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n minute = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(14)\n if (code1 < 48 || code1 > 53) {\n return undefined // Not a digit between 0 and 5\n }\n const code2 = date.charCodeAt(15)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let second = 0\n if (date[17] === '0') {\n const code = date.charCodeAt(18)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n second = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(17)\n if (code1 < 48 || code1 > 53) {\n return undefined // Not a digit between 0 and 5\n }\n const code2 = date.charCodeAt(18)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n const yearDigit1 = date.charCodeAt(20)\n if (yearDigit1 < 48 || yearDigit1 > 57) {\n return undefined // Not a digit\n }\n const yearDigit2 = date.charCodeAt(21)\n if (yearDigit2 < 48 || yearDigit2 > 57) {\n return undefined // Not a digit\n }\n const yearDigit3 = date.charCodeAt(22)\n if (yearDigit3 < 48 || yearDigit3 > 57) {\n return undefined // Not a digit\n }\n const yearDigit4 = date.charCodeAt(23)\n if (yearDigit4 < 48 || yearDigit4 > 57) {\n return undefined // Not a digit\n }\n const year = (yearDigit1 - 48) * 1000 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48)\n\n const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))\n return result.getUTCDay() === weekday ? result : undefined\n}\n\n/**\n * @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats\n *\n * @param {string} date\n * @returns {Date | undefined}\n */\nfunction parseRfc850Date (date) {\n let commaIndex = -1\n\n let weekday = -1\n if (date[0] === 'S') {\n if (date[1] === 'u' && date[2] === 'n' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') {\n weekday = 0 // Sunday\n commaIndex = 6\n } else if (date[1] === 'a' && date[2] === 't' && date[3] === 'u' && date[4] === 'r' && date[5] === 'd' && date[6] === 'a' && date[7] === 'y') {\n weekday = 6 // Saturday\n commaIndex = 8\n }\n } else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') {\n weekday = 1 // Monday\n commaIndex = 6\n } else if (date[0] === 'T') {\n if (date[1] === 'u' && date[2] === 'e' && date[3] === 's' && date[4] === 'd' && date[5] === 'a' && date[6] === 'y') {\n weekday = 2 // Tuesday\n commaIndex = 7\n } else if (date[1] === 'h' && date[2] === 'u' && date[3] === 'r' && date[4] === 's' && date[5] === 'd' && date[6] === 'a' && date[7] === 'y') {\n weekday = 4 // Thursday\n commaIndex = 8\n }\n } else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd' && date[3] === 'n' && date[4] === 'e' && date[5] === 's' && date[6] === 'd' && date[7] === 'a' && date[8] === 'y') {\n weekday = 3 // Wednesday\n commaIndex = 9\n } else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') {\n weekday = 5 // Friday\n commaIndex = 6\n } else {\n // Not a valid day name\n return undefined\n }\n\n if (\n date[commaIndex] !== ',' ||\n (date.length - commaIndex - 1) !== 23 ||\n date[commaIndex + 1] !== ' ' ||\n date[commaIndex + 4] !== '-' ||\n date[commaIndex + 8] !== '-' ||\n date[commaIndex + 11] !== ' ' ||\n date[commaIndex + 14] !== ':' ||\n date[commaIndex + 17] !== ':' ||\n date[commaIndex + 20] !== ' ' ||\n date[commaIndex + 21] !== 'G' ||\n date[commaIndex + 22] !== 'M' ||\n date[commaIndex + 23] !== 'T'\n ) {\n return undefined\n }\n\n let day = 0\n if (date[commaIndex + 2] === '0') {\n // Single digit day, e.g. \"Sun Nov 6 08:49:37 1994\"\n const code = date.charCodeAt(commaIndex + 3)\n if (code < 49 || code > 57) {\n return undefined // Not a digit\n }\n day = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(commaIndex + 2)\n if (code1 < 49 || code1 > 51) {\n return undefined // Not a digit between 1 and 3\n }\n const code2 = date.charCodeAt(commaIndex + 3)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let monthIdx = -1\n if (\n (date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'n')\n ) {\n monthIdx = 0 // Jan\n } else if (\n (date[commaIndex + 5] === 'F' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'b')\n ) {\n monthIdx = 1 // Feb\n } else if (\n (date[commaIndex + 5] === 'M' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'r')\n ) {\n monthIdx = 2 // Mar\n } else if (\n (date[commaIndex + 5] === 'A' && date[commaIndex + 6] === 'p' && date[commaIndex + 7] === 'r')\n ) {\n monthIdx = 3 // Apr\n } else if (\n (date[commaIndex + 5] === 'M' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'y')\n ) {\n monthIdx = 4 // May\n } else if (\n (date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'n')\n ) {\n monthIdx = 5 // Jun\n } else if (\n (date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'l')\n ) {\n monthIdx = 6 // Jul\n } else if (\n (date[commaIndex + 5] === 'A' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'g')\n ) {\n monthIdx = 7 // Aug\n } else if (\n (date[commaIndex + 5] === 'S' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'p')\n ) {\n monthIdx = 8 // Sep\n } else if (\n (date[commaIndex + 5] === 'O' && date[commaIndex + 6] === 'c' && date[commaIndex + 7] === 't')\n ) {\n monthIdx = 9 // Oct\n } else if (\n (date[commaIndex + 5] === 'N' && date[commaIndex + 6] === 'o' && date[commaIndex + 7] === 'v')\n ) {\n monthIdx = 10 // Nov\n } else if (\n (date[commaIndex + 5] === 'D' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'c')\n ) {\n monthIdx = 11 // Dec\n } else {\n // Not a valid month\n return undefined\n }\n\n const yearDigit1 = date.charCodeAt(commaIndex + 9)\n if (yearDigit1 < 48 || yearDigit1 > 57) {\n return undefined // Not a digit\n }\n const yearDigit2 = date.charCodeAt(commaIndex + 10)\n if (yearDigit2 < 48 || yearDigit2 > 57) {\n return undefined // Not a digit\n }\n\n let year = (yearDigit1 - 48) * 10 + (yearDigit2 - 48) // Convert ASCII codes to number\n\n // RFC 6265 states that the year is in the range 1970-2069.\n // @see https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.1\n //\n // 3. If the year-value is greater than or equal to 70 and less than or\n // equal to 99, increment the year-value by 1900.\n // 4. If the year-value is greater than or equal to 0 and less than or\n // equal to 69, increment the year-value by 2000.\n year += year < 70 ? 2000 : 1900\n\n let hour = 0\n if (date[commaIndex + 12] === '0') {\n const code = date.charCodeAt(commaIndex + 13)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n hour = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(commaIndex + 12)\n if (code1 < 48 || code1 > 50) {\n return undefined // Not a digit between 0 and 2\n }\n const code2 = date.charCodeAt(commaIndex + 13)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n if (code1 === 50 && code2 > 51) {\n return undefined // Hour cannot be greater than 23\n }\n hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let minute = 0\n if (date[commaIndex + 15] === '0') {\n const code = date.charCodeAt(commaIndex + 16)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n minute = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(commaIndex + 15)\n if (code1 < 48 || code1 > 53) {\n return undefined // Not a digit between 0 and 5\n }\n const code2 = date.charCodeAt(commaIndex + 16)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let second = 0\n if (date[commaIndex + 18] === '0') {\n const code = date.charCodeAt(commaIndex + 19)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n second = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(commaIndex + 18)\n if (code1 < 48 || code1 > 53) {\n return undefined // Not a digit between 0 and 5\n }\n const code2 = date.charCodeAt(commaIndex + 19)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))\n return result.getUTCDay() === weekday ? result : undefined\n}\n\nmodule.exports = {\n parseHttpDate\n}\n","'use strict'\n\n/**\n * @template {*} T\n * @typedef {Object} DeferredPromise\n * @property {Promise} promise\n * @property {(value?: T) => void} resolve\n * @property {(reason?: any) => void} reject\n */\n\n/**\n * @template {*} T\n * @returns {DeferredPromise} An object containing a promise and its resolve/reject methods.\n */\nfunction createDeferredPromise () {\n let res\n let rej\n const promise = new Promise((resolve, reject) => {\n res = resolve\n rej = reject\n })\n\n return { promise, resolve: res, reject: rej }\n}\n\nmodule.exports = {\n createDeferredPromise\n}\n","'use strict'\n\n/** @typedef {`node:${string}`} NodeModuleName */\n\n/** @type {Record any>} */\nconst lazyLoaders = {\n __proto__: null,\n 'node:crypto': () => require('node:crypto'),\n 'node:sqlite': () => require('node:sqlite'),\n 'node:worker_threads': () => require('node:worker_threads'),\n 'node:zlib': () => require('node:zlib')\n}\n\n/**\n * @param {NodeModuleName} moduleName\n * @returns {boolean}\n */\nfunction detectRuntimeFeatureByNodeModule (moduleName) {\n try {\n lazyLoaders[moduleName]()\n return true\n } catch (err) {\n if (err.code !== 'ERR_UNKNOWN_BUILTIN_MODULE' && err.code !== 'ERR_NO_CRYPTO') {\n throw err\n }\n return false\n }\n}\n\n/**\n * @param {NodeModuleName} moduleName\n * @param {string} property\n * @returns {boolean}\n */\nfunction detectRuntimeFeatureByExportedProperty (moduleName, property) {\n const module = lazyLoaders[moduleName]()\n return typeof module[property] !== 'undefined'\n}\n\nconst runtimeFeaturesByExportedProperty = /** @type {const} */ (['markAsUncloneable', 'zstd'])\n\n/** @type {Record} */\nconst exportedPropertyLookup = {\n markAsUncloneable: ['node:worker_threads', 'markAsUncloneable'],\n zstd: ['node:zlib', 'createZstdDecompress']\n}\n\n/** @typedef {typeof runtimeFeaturesByExportedProperty[number]} RuntimeFeatureByExportedProperty */\n\nconst runtimeFeaturesAsNodeModule = /** @type {const} */ (['crypto', 'sqlite'])\n/** @typedef {typeof runtimeFeaturesAsNodeModule[number]} RuntimeFeatureByNodeModule */\n\nconst features = /** @type {const} */ ([\n ...runtimeFeaturesAsNodeModule,\n ...runtimeFeaturesByExportedProperty\n])\n\n/** @typedef {typeof features[number]} Feature */\n\n/**\n * @param {Feature} feature\n * @returns {boolean}\n */\nfunction detectRuntimeFeature (feature) {\n if (runtimeFeaturesAsNodeModule.includes(/** @type {RuntimeFeatureByNodeModule} */ (feature))) {\n return detectRuntimeFeatureByNodeModule(`node:${feature}`)\n } else if (runtimeFeaturesByExportedProperty.includes(/** @type {RuntimeFeatureByExportedProperty} */ (feature))) {\n const [moduleName, property] = exportedPropertyLookup[feature]\n return detectRuntimeFeatureByExportedProperty(moduleName, property)\n }\n throw new TypeError(`unknown feature: ${feature}`)\n}\n\n/**\n * @class\n * @name RuntimeFeatures\n */\nclass RuntimeFeatures {\n /** @type {Map} */\n #map = new Map()\n\n /**\n * Clears all cached feature detections.\n */\n clear () {\n this.#map.clear()\n }\n\n /**\n * @param {Feature} feature\n * @returns {boolean}\n */\n has (feature) {\n return (\n this.#map.get(feature) ?? this.#detectRuntimeFeature(feature)\n )\n }\n\n /**\n * @param {Feature} feature\n * @param {boolean} value\n */\n set (feature, value) {\n if (features.includes(feature) === false) {\n throw new TypeError(`unknown feature: ${feature}`)\n }\n this.#map.set(feature, value)\n }\n\n /**\n * @param {Feature} feature\n * @returns {boolean}\n */\n #detectRuntimeFeature (feature) {\n const result = detectRuntimeFeature(feature)\n this.#map.set(feature, result)\n return result\n }\n}\n\nconst instance = new RuntimeFeatures()\n\nmodule.exports.runtimeFeatures = instance\nmodule.exports.default = instance\n","'use strict'\n\nconst {\n kConnected,\n kPending,\n kRunning,\n kSize,\n kFree,\n kQueued\n} = require('../core/symbols')\n\nclass ClientStats {\n constructor (client) {\n this.connected = client[kConnected]\n this.pending = client[kPending]\n this.running = client[kRunning]\n this.size = client[kSize]\n }\n}\n\nclass PoolStats {\n constructor (pool) {\n this.connected = pool[kConnected]\n this.free = pool[kFree]\n this.pending = pool[kPending]\n this.queued = pool[kQueued]\n this.running = pool[kRunning]\n this.size = pool[kSize]\n }\n}\n\nmodule.exports = { ClientStats, PoolStats }\n","'use strict'\n\n/**\n * This module offers an optimized timer implementation designed for scenarios\n * where high precision is not critical.\n *\n * The timer achieves faster performance by using a low-resolution approach,\n * with an accuracy target of within 500ms. This makes it particularly useful\n * for timers with delays of 1 second or more, where exact timing is less\n * crucial.\n *\n * It's important to note that Node.js timers are inherently imprecise, as\n * delays can occur due to the event loop being blocked by other operations.\n * Consequently, timers may trigger later than their scheduled time.\n */\n\n/**\n * The fastNow variable contains the internal fast timer clock value.\n *\n * @type {number}\n */\nlet fastNow = 0\n\n/**\n * RESOLUTION_MS represents the target resolution time in milliseconds.\n *\n * @type {number}\n * @default 1000\n */\nconst RESOLUTION_MS = 1e3\n\n/**\n * TICK_MS defines the desired interval in milliseconds between each tick.\n * The target value is set to half the resolution time, minus 1 ms, to account\n * for potential event loop overhead.\n *\n * @type {number}\n * @default 499\n */\nconst TICK_MS = (RESOLUTION_MS >> 1) - 1\n\n/**\n * fastNowTimeout is a Node.js timer used to manage and process\n * the FastTimers stored in the `fastTimers` array.\n *\n * @type {NodeJS.Timeout}\n */\nlet fastNowTimeout\n\n/**\n * The kFastTimer symbol is used to identify FastTimer instances.\n *\n * @type {Symbol}\n */\nconst kFastTimer = Symbol('kFastTimer')\n\n/**\n * The fastTimers array contains all active FastTimers.\n *\n * @type {FastTimer[]}\n */\nconst fastTimers = []\n\n/**\n * These constants represent the various states of a FastTimer.\n */\n\n/**\n * The `NOT_IN_LIST` constant indicates that the FastTimer is not included\n * in the `fastTimers` array. Timers with this status will not be processed\n * during the next tick by the `onTick` function.\n *\n * A FastTimer can be re-added to the `fastTimers` array by invoking the\n * `refresh` method on the FastTimer instance.\n *\n * @type {-2}\n */\nconst NOT_IN_LIST = -2\n\n/**\n * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled\n * for removal from the `fastTimers` array. A FastTimer in this state will\n * be removed in the next tick by the `onTick` function and will no longer\n * be processed.\n *\n * This status is also set when the `clear` method is called on the FastTimer instance.\n *\n * @type {-1}\n */\nconst TO_BE_CLEARED = -1\n\n/**\n * The `PENDING` constant signifies that the FastTimer is awaiting processing\n * in the next tick by the `onTick` function. Timers with this status will have\n * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick.\n *\n * @type {0}\n */\nconst PENDING = 0\n\n/**\n * The `ACTIVE` constant indicates that the FastTimer is active and waiting\n * for its timer to expire. During the next tick, the `onTick` function will\n * check if the timer has expired, and if so, it will execute the associated callback.\n *\n * @type {1}\n */\nconst ACTIVE = 1\n\n/**\n * The onTick function processes the fastTimers array.\n *\n * @returns {void}\n */\nfunction onTick () {\n /**\n * Increment the fastNow value by the TICK_MS value, despite the actual time\n * that has passed since the last tick. This approach ensures independence\n * from the system clock and delays caused by a blocked event loop.\n *\n * @type {number}\n */\n fastNow += TICK_MS\n\n /**\n * The `idx` variable is used to iterate over the `fastTimers` array.\n * Expired timers are removed by replacing them with the last element in the array.\n * Consequently, `idx` is only incremented when the current element is not removed.\n *\n * @type {number}\n */\n let idx = 0\n\n /**\n * The len variable will contain the length of the fastTimers array\n * and will be decremented when a FastTimer should be removed from the\n * fastTimers array.\n *\n * @type {number}\n */\n let len = fastTimers.length\n\n while (idx < len) {\n /**\n * @type {FastTimer}\n */\n const timer = fastTimers[idx]\n\n // If the timer is in the ACTIVE state and the timer has expired, it will\n // be processed in the next tick.\n if (timer._state === PENDING) {\n // Set the _idleStart value to the fastNow value minus the TICK_MS value\n // to account for the time the timer was in the PENDING state.\n timer._idleStart = fastNow - TICK_MS\n timer._state = ACTIVE\n } else if (\n timer._state === ACTIVE &&\n fastNow >= timer._idleStart + timer._idleTimeout\n ) {\n timer._state = TO_BE_CLEARED\n timer._idleStart = -1\n timer._onTimeout(timer._timerArg)\n }\n\n if (timer._state === TO_BE_CLEARED) {\n timer._state = NOT_IN_LIST\n\n // Move the last element to the current index and decrement len if it is\n // not the only element in the array.\n if (--len !== 0) {\n fastTimers[idx] = fastTimers[len]\n }\n } else {\n ++idx\n }\n }\n\n // Set the length of the fastTimers array to the new length and thus\n // removing the excess FastTimers elements from the array.\n fastTimers.length = len\n\n // If there are still active FastTimers in the array, refresh the Timer.\n // If there are no active FastTimers, the timer will be refreshed again\n // when a new FastTimer is instantiated.\n if (fastTimers.length !== 0) {\n refreshTimeout()\n }\n}\n\nfunction refreshTimeout () {\n // If the fastNowTimeout is already set and the Timer has the refresh()-\n // method available, call it to refresh the timer.\n // Some timer objects returned by setTimeout may not have a .refresh()\n // method (e.g. mocked timers in tests).\n if (fastNowTimeout?.refresh) {\n fastNowTimeout.refresh()\n // fastNowTimeout is not instantiated yet or refresh is not availabe,\n // create a new Timer.\n } else {\n clearTimeout(fastNowTimeout)\n fastNowTimeout = setTimeout(onTick, TICK_MS)\n // If the Timer has an unref method, call it to allow the process to exit,\n // if there are no other active handles. When using fake timers or mocked\n // environments (like Jest), .unref() may not be defined,\n fastNowTimeout?.unref()\n }\n}\n\n/**\n * The `FastTimer` class is a data structure designed to store and manage\n * timer information.\n */\nclass FastTimer {\n [kFastTimer] = true\n\n /**\n * The state of the timer, which can be one of the following:\n * - NOT_IN_LIST (-2)\n * - TO_BE_CLEARED (-1)\n * - PENDING (0)\n * - ACTIVE (1)\n *\n * @type {-2|-1|0|1}\n * @private\n */\n _state = NOT_IN_LIST\n\n /**\n * The number of milliseconds to wait before calling the callback.\n *\n * @type {number}\n * @private\n */\n _idleTimeout = -1\n\n /**\n * The time in milliseconds when the timer was started. This value is used to\n * calculate when the timer should expire.\n *\n * @type {number}\n * @default -1\n * @private\n */\n _idleStart = -1\n\n /**\n * The function to be executed when the timer expires.\n * @type {Function}\n * @private\n */\n _onTimeout\n\n /**\n * The argument to be passed to the callback when the timer expires.\n *\n * @type {*}\n * @private\n */\n _timerArg\n\n /**\n * @constructor\n * @param {Function} callback A function to be executed after the timer\n * expires.\n * @param {number} delay The time, in milliseconds that the timer should wait\n * before the specified function or code is executed.\n * @param {*} arg\n */\n constructor (callback, delay, arg) {\n this._onTimeout = callback\n this._idleTimeout = delay\n this._timerArg = arg\n\n this.refresh()\n }\n\n /**\n * Sets the timer's start time to the current time, and reschedules the timer\n * to call its callback at the previously specified duration adjusted to the\n * current time.\n * Using this on a timer that has already called its callback will reactivate\n * the timer.\n *\n * @returns {void}\n */\n refresh () {\n // In the special case that the timer is not in the list of active timers,\n // add it back to the array to be processed in the next tick by the onTick\n // function.\n if (this._state === NOT_IN_LIST) {\n fastTimers.push(this)\n }\n\n // If the timer is the only active timer, refresh the fastNowTimeout for\n // better resolution.\n if (!fastNowTimeout || fastTimers.length === 1) {\n refreshTimeout()\n }\n\n // Setting the state to PENDING will cause the timer to be reset in the\n // next tick by the onTick function.\n this._state = PENDING\n }\n\n /**\n * The `clear` method cancels the timer, preventing it from executing.\n *\n * @returns {void}\n * @private\n */\n clear () {\n // Set the state to TO_BE_CLEARED to mark the timer for removal in the next\n // tick by the onTick function.\n this._state = TO_BE_CLEARED\n\n // Reset the _idleStart value to -1 to indicate that the timer is no longer\n // active.\n this._idleStart = -1\n }\n}\n\n/**\n * This module exports a setTimeout and clearTimeout function that can be\n * used as a drop-in replacement for the native functions.\n */\nmodule.exports = {\n /**\n * The setTimeout() method sets a timer which executes a function once the\n * timer expires.\n * @param {Function} callback A function to be executed after the timer\n * expires.\n * @param {number} delay The time, in milliseconds that the timer should\n * wait before the specified function or code is executed.\n * @param {*} [arg] An optional argument to be passed to the callback function\n * when the timer expires.\n * @returns {NodeJS.Timeout|FastTimer}\n */\n setTimeout (callback, delay, arg) {\n // If the delay is less than or equal to the RESOLUTION_MS value return a\n // native Node.js Timer instance.\n return delay <= RESOLUTION_MS\n ? setTimeout(callback, delay, arg)\n : new FastTimer(callback, delay, arg)\n },\n /**\n * The clearTimeout method cancels an instantiated Timer previously created\n * by calling setTimeout.\n *\n * @param {NodeJS.Timeout|FastTimer} timeout\n */\n clearTimeout (timeout) {\n // If the timeout is a FastTimer, call its own clear method.\n if (timeout[kFastTimer]) {\n /**\n * @type {FastTimer}\n */\n timeout.clear()\n // Otherwise it is an instance of a native NodeJS.Timeout, so call the\n // Node.js native clearTimeout function.\n } else {\n clearTimeout(timeout)\n }\n },\n /**\n * The setFastTimeout() method sets a fastTimer which executes a function once\n * the timer expires.\n * @param {Function} callback A function to be executed after the timer\n * expires.\n * @param {number} delay The time, in milliseconds that the timer should\n * wait before the specified function or code is executed.\n * @param {*} [arg] An optional argument to be passed to the callback function\n * when the timer expires.\n * @returns {FastTimer}\n */\n setFastTimeout (callback, delay, arg) {\n return new FastTimer(callback, delay, arg)\n },\n /**\n * The clearTimeout method cancels an instantiated FastTimer previously\n * created by calling setFastTimeout.\n *\n * @param {FastTimer} timeout\n */\n clearFastTimeout (timeout) {\n timeout.clear()\n },\n /**\n * The now method returns the value of the internal fast timer clock.\n *\n * @returns {number}\n */\n now () {\n return fastNow\n },\n /**\n * Trigger the onTick function to process the fastTimers array.\n * Exported for testing purposes only.\n * Marking as deprecated to discourage any use outside of testing.\n * @deprecated\n * @param {number} [delay=0] The delay in milliseconds to add to the now value.\n */\n tick (delay = 0) {\n fastNow += delay - RESOLUTION_MS + 1\n onTick()\n onTick()\n },\n /**\n * Reset FastTimers.\n * Exported for testing purposes only.\n * Marking as deprecated to discourage any use outside of testing.\n * @deprecated\n */\n reset () {\n fastNow = 0\n fastTimers.length = 0\n clearTimeout(fastNowTimeout)\n fastNowTimeout = null\n },\n /**\n * Exporting for testing purposes only.\n * Marking as deprecated to discourage any use outside of testing.\n * @deprecated\n */\n kFastTimer\n}\n","'use strict'\n\nconst assert = require('node:assert')\n\nconst { kConstruct } = require('../../core/symbols')\nconst { urlEquals, getFieldValues } = require('./util')\nconst { kEnumerableProperty, isDisturbed } = require('../../core/util')\nconst { webidl } = require('../webidl')\nconst { cloneResponse, fromInnerResponse, getResponseState } = require('../fetch/response')\nconst { Request, fromInnerRequest, getRequestState } = require('../fetch/request')\nconst { fetching } = require('../fetch/index')\nconst { urlIsHttpHttpsScheme, readAllBytes } = require('../fetch/util')\nconst { createDeferredPromise } = require('../../util/promise')\n\n/**\n * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation\n * @typedef {Object} CacheBatchOperation\n * @property {'delete' | 'put'} type\n * @property {any} request\n * @property {any} response\n * @property {import('../../../types/cache').CacheQueryOptions} options\n */\n\n/**\n * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list\n * @typedef {[any, any][]} requestResponseList\n */\n\nclass Cache {\n /**\n * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list\n * @type {requestResponseList}\n */\n #relevantRequestResponseList\n\n constructor () {\n if (arguments[0] !== kConstruct) {\n webidl.illegalConstructor()\n }\n\n webidl.util.markAsUncloneable(this)\n this.#relevantRequestResponseList = arguments[1]\n }\n\n async match (request, options = {}) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.match'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options, prefix, 'options')\n\n const p = this.#internalMatchAll(request, options, 1)\n\n if (p.length === 0) {\n return\n }\n\n return p[0]\n }\n\n async matchAll (request = undefined, options = {}) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.matchAll'\n if (request !== undefined) request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options, prefix, 'options')\n\n return this.#internalMatchAll(request, options)\n }\n\n async add (request) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.add'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n request = webidl.converters.RequestInfo(request)\n\n // 1.\n const requests = [request]\n\n // 2.\n const responseArrayPromise = this.addAll(requests)\n\n // 3.\n return await responseArrayPromise\n }\n\n async addAll (requests) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.addAll'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n // 1.\n const responsePromises = []\n\n // 2.\n const requestList = []\n\n // 3.\n for (let request of requests) {\n if (request === undefined) {\n throw webidl.errors.conversionFailed({\n prefix,\n argument: 'Argument 1',\n types: ['undefined is not allowed']\n })\n }\n\n request = webidl.converters.RequestInfo(request)\n\n if (typeof request === 'string') {\n continue\n }\n\n // 3.1\n const r = getRequestState(request)\n\n // 3.2\n if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Expected http/s scheme when method is not GET.'\n })\n }\n }\n\n // 4.\n /** @type {ReturnType[]} */\n const fetchControllers = []\n\n // 5.\n for (const request of requests) {\n // 5.1\n const r = getRequestState(new Request(request))\n\n // 5.2\n if (!urlIsHttpHttpsScheme(r.url)) {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Expected http/s scheme.'\n })\n }\n\n // 5.4\n r.initiator = 'fetch'\n r.destination = 'subresource'\n\n // 5.5\n requestList.push(r)\n\n // 5.6\n const responsePromise = createDeferredPromise()\n\n // 5.7\n fetchControllers.push(fetching({\n request: r,\n processResponse (response) {\n // 1.\n if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) {\n responsePromise.reject(webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'Received an invalid status code or the request failed.'\n }))\n } else if (response.headersList.contains('vary')) { // 2.\n // 2.1\n const fieldValues = getFieldValues(response.headersList.get('vary'))\n\n // 2.2\n for (const fieldValue of fieldValues) {\n // 2.2.1\n if (fieldValue === '*') {\n responsePromise.reject(webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'invalid vary field value'\n }))\n\n for (const controller of fetchControllers) {\n controller.abort()\n }\n\n return\n }\n }\n }\n },\n processResponseEndOfBody (response) {\n // 1.\n if (response.aborted) {\n responsePromise.reject(new DOMException('aborted', 'AbortError'))\n return\n }\n\n // 2.\n responsePromise.resolve(response)\n }\n }))\n\n // 5.8\n responsePromises.push(responsePromise.promise)\n }\n\n // 6.\n const p = Promise.all(responsePromises)\n\n // 7.\n const responses = await p\n\n // 7.1\n const operations = []\n\n // 7.2\n let index = 0\n\n // 7.3\n for (const response of responses) {\n // 7.3.1\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'put', // 7.3.2\n request: requestList[index], // 7.3.3\n response // 7.3.4\n }\n\n operations.push(operation) // 7.3.5\n\n index++ // 7.3.6\n }\n\n // 7.5\n const cacheJobPromise = createDeferredPromise()\n\n // 7.6.1\n let errorData = null\n\n // 7.6.2\n try {\n this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n // 7.6.3\n queueMicrotask(() => {\n // 7.6.3.1\n if (errorData === null) {\n cacheJobPromise.resolve(undefined)\n } else {\n // 7.6.3.2\n cacheJobPromise.reject(errorData)\n }\n })\n\n // 7.7\n return cacheJobPromise.promise\n }\n\n async put (request, response) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.put'\n webidl.argumentLengthCheck(arguments, 2, prefix)\n\n request = webidl.converters.RequestInfo(request)\n response = webidl.converters.Response(response, prefix, 'response')\n\n // 1.\n let innerRequest = null\n\n // 2.\n if (webidl.is.Request(request)) {\n innerRequest = getRequestState(request)\n } else { // 3.\n innerRequest = getRequestState(new Request(request))\n }\n\n // 4.\n if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Expected an http/s scheme when method is not GET'\n })\n }\n\n // 5.\n const innerResponse = getResponseState(response)\n\n // 6.\n if (innerResponse.status === 206) {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Got 206 status'\n })\n }\n\n // 7.\n if (innerResponse.headersList.contains('vary')) {\n // 7.1.\n const fieldValues = getFieldValues(innerResponse.headersList.get('vary'))\n\n // 7.2.\n for (const fieldValue of fieldValues) {\n // 7.2.1\n if (fieldValue === '*') {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Got * vary field value'\n })\n }\n }\n }\n\n // 8.\n if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Response body is locked or disturbed'\n })\n }\n\n // 9.\n const clonedResponse = cloneResponse(innerResponse)\n\n // 10.\n const bodyReadPromise = createDeferredPromise()\n\n // 11.\n if (innerResponse.body != null) {\n // 11.1\n const stream = innerResponse.body.stream\n\n // 11.2\n const reader = stream.getReader()\n\n // 11.3\n readAllBytes(reader, bodyReadPromise.resolve, bodyReadPromise.reject)\n } else {\n bodyReadPromise.resolve(undefined)\n }\n\n // 12.\n /** @type {CacheBatchOperation[]} */\n const operations = []\n\n // 13.\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'put', // 14.\n request: innerRequest, // 15.\n response: clonedResponse // 16.\n }\n\n // 17.\n operations.push(operation)\n\n // 19.\n const bytes = await bodyReadPromise.promise\n\n if (clonedResponse.body != null) {\n clonedResponse.body.source = bytes\n }\n\n // 19.1\n const cacheJobPromise = createDeferredPromise()\n\n // 19.2.1\n let errorData = null\n\n // 19.2.2\n try {\n this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n // 19.2.3\n queueMicrotask(() => {\n // 19.2.3.1\n if (errorData === null) {\n cacheJobPromise.resolve()\n } else { // 19.2.3.2\n cacheJobPromise.reject(errorData)\n }\n })\n\n return cacheJobPromise.promise\n }\n\n async delete (request, options = {}) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.delete'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options, prefix, 'options')\n\n /**\n * @type {Request}\n */\n let r = null\n\n if (webidl.is.Request(request)) {\n r = getRequestState(request)\n\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return false\n }\n } else {\n assert(typeof request === 'string')\n\n r = getRequestState(new Request(request))\n }\n\n /** @type {CacheBatchOperation[]} */\n const operations = []\n\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'delete',\n request: r,\n options\n }\n\n operations.push(operation)\n\n const cacheJobPromise = createDeferredPromise()\n\n let errorData = null\n let requestResponses\n\n try {\n requestResponses = this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n queueMicrotask(() => {\n if (errorData === null) {\n cacheJobPromise.resolve(!!requestResponses?.length)\n } else {\n cacheJobPromise.reject(errorData)\n }\n })\n\n return cacheJobPromise.promise\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys\n * @param {any} request\n * @param {import('../../../types/cache').CacheQueryOptions} options\n * @returns {Promise}\n */\n async keys (request = undefined, options = {}) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.keys'\n\n if (request !== undefined) request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options, prefix, 'options')\n\n // 1.\n let r = null\n\n // 2.\n if (request !== undefined) {\n // 2.1\n if (webidl.is.Request(request)) {\n // 2.1.1\n r = getRequestState(request)\n\n // 2.1.2\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return []\n }\n } else if (typeof request === 'string') { // 2.2\n r = getRequestState(new Request(request))\n }\n }\n\n // 4.\n const promise = createDeferredPromise()\n\n // 5.\n // 5.1\n const requests = []\n\n // 5.2\n if (request === undefined) {\n // 5.2.1\n for (const requestResponse of this.#relevantRequestResponseList) {\n // 5.2.1.1\n requests.push(requestResponse[0])\n }\n } else { // 5.3\n // 5.3.1\n const requestResponses = this.#queryCache(r, options)\n\n // 5.3.2\n for (const requestResponse of requestResponses) {\n // 5.3.2.1\n requests.push(requestResponse[0])\n }\n }\n\n // 5.4\n queueMicrotask(() => {\n // 5.4.1\n const requestList = []\n\n // 5.4.2\n for (const request of requests) {\n const requestObject = fromInnerRequest(\n request,\n undefined,\n new AbortController().signal,\n 'immutable'\n )\n // 5.4.2.1\n requestList.push(requestObject)\n }\n\n // 5.4.3\n promise.resolve(Object.freeze(requestList))\n })\n\n return promise.promise\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm\n * @param {CacheBatchOperation[]} operations\n * @returns {requestResponseList}\n */\n #batchCacheOperations (operations) {\n // 1.\n const cache = this.#relevantRequestResponseList\n\n // 2.\n const backupCache = [...cache]\n\n // 3.\n const addedItems = []\n\n // 4.1\n const resultList = []\n\n try {\n // 4.2\n for (const operation of operations) {\n // 4.2.1\n if (operation.type !== 'delete' && operation.type !== 'put') {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'operation type does not match \"delete\" or \"put\"'\n })\n }\n\n // 4.2.2\n if (operation.type === 'delete' && operation.response != null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'delete operation should not have an associated response'\n })\n }\n\n // 4.2.3\n if (this.#queryCache(operation.request, operation.options, addedItems).length) {\n throw new DOMException('???', 'InvalidStateError')\n }\n\n // 4.2.4\n let requestResponses\n\n // 4.2.5\n if (operation.type === 'delete') {\n // 4.2.5.1\n requestResponses = this.#queryCache(operation.request, operation.options)\n\n // TODO: the spec is wrong, this is needed to pass WPTs\n if (requestResponses.length === 0) {\n return []\n }\n\n // 4.2.5.2\n for (const requestResponse of requestResponses) {\n const idx = cache.indexOf(requestResponse)\n assert(idx !== -1)\n\n // 4.2.5.2.1\n cache.splice(idx, 1)\n }\n } else if (operation.type === 'put') { // 4.2.6\n // 4.2.6.1\n if (operation.response == null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'put operation should have an associated response'\n })\n }\n\n // 4.2.6.2\n const r = operation.request\n\n // 4.2.6.3\n if (!urlIsHttpHttpsScheme(r.url)) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'expected http or https scheme'\n })\n }\n\n // 4.2.6.4\n if (r.method !== 'GET') {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'not get method'\n })\n }\n\n // 4.2.6.5\n if (operation.options != null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'options must not be defined'\n })\n }\n\n // 4.2.6.6\n requestResponses = this.#queryCache(operation.request)\n\n // 4.2.6.7\n for (const requestResponse of requestResponses) {\n const idx = cache.indexOf(requestResponse)\n assert(idx !== -1)\n\n // 4.2.6.7.1\n cache.splice(idx, 1)\n }\n\n // 4.2.6.8\n cache.push([operation.request, operation.response])\n\n // 4.2.6.10\n addedItems.push([operation.request, operation.response])\n }\n\n // 4.2.7\n resultList.push([operation.request, operation.response])\n }\n\n // 4.3\n return resultList\n } catch (e) { // 5.\n // 5.1\n this.#relevantRequestResponseList.length = 0\n\n // 5.2\n this.#relevantRequestResponseList = backupCache\n\n // 5.3\n throw e\n }\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#query-cache\n * @param {any} requestQuery\n * @param {import('../../../types/cache').CacheQueryOptions} options\n * @param {requestResponseList} targetStorage\n * @returns {requestResponseList}\n */\n #queryCache (requestQuery, options, targetStorage) {\n /** @type {requestResponseList} */\n const resultList = []\n\n const storage = targetStorage ?? this.#relevantRequestResponseList\n\n for (const requestResponse of storage) {\n const [cachedRequest, cachedResponse] = requestResponse\n if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) {\n resultList.push(requestResponse)\n }\n }\n\n return resultList\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm\n * @param {any} requestQuery\n * @param {any} request\n * @param {any | null} response\n * @param {import('../../../types/cache').CacheQueryOptions | undefined} options\n * @returns {boolean}\n */\n #requestMatchesCachedItem (requestQuery, request, response = null, options) {\n // if (options?.ignoreMethod === false && request.method === 'GET') {\n // return false\n // }\n\n const queryURL = new URL(requestQuery.url)\n\n const cachedURL = new URL(request.url)\n\n if (options?.ignoreSearch) {\n cachedURL.search = ''\n\n queryURL.search = ''\n }\n\n if (!urlEquals(queryURL, cachedURL, true)) {\n return false\n }\n\n if (\n response == null ||\n options?.ignoreVary ||\n !response.headersList.contains('vary')\n ) {\n return true\n }\n\n const fieldValues = getFieldValues(response.headersList.get('vary'))\n\n for (const fieldValue of fieldValues) {\n if (fieldValue === '*') {\n return false\n }\n\n const requestValue = request.headersList.get(fieldValue)\n const queryValue = requestQuery.headersList.get(fieldValue)\n\n // If one has the header and the other doesn't, or one has\n // a different value than the other, return false\n if (requestValue !== queryValue) {\n return false\n }\n }\n\n return true\n }\n\n #internalMatchAll (request, options, maxResponses = Infinity) {\n // 1.\n let r = null\n\n // 2.\n if (request !== undefined) {\n if (webidl.is.Request(request)) {\n // 2.1.1\n r = getRequestState(request)\n\n // 2.1.2\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return []\n }\n } else if (typeof request === 'string') {\n // 2.2.1\n r = getRequestState(new Request(request))\n }\n }\n\n // 5.\n // 5.1\n const responses = []\n\n // 5.2\n if (request === undefined) {\n // 5.2.1\n for (const requestResponse of this.#relevantRequestResponseList) {\n responses.push(requestResponse[1])\n }\n } else { // 5.3\n // 5.3.1\n const requestResponses = this.#queryCache(r, options)\n\n // 5.3.2\n for (const requestResponse of requestResponses) {\n responses.push(requestResponse[1])\n }\n }\n\n // 5.4\n // We don't implement CORs so we don't need to loop over the responses, yay!\n\n // 5.5.1\n const responseList = []\n\n // 5.5.2\n for (const response of responses) {\n // 5.5.2.1\n const responseObject = fromInnerResponse(cloneResponse(response), 'immutable')\n\n responseList.push(responseObject)\n\n if (responseList.length >= maxResponses) {\n break\n }\n }\n\n // 6.\n return Object.freeze(responseList)\n }\n}\n\nObject.defineProperties(Cache.prototype, {\n [Symbol.toStringTag]: {\n value: 'Cache',\n configurable: true\n },\n match: kEnumerableProperty,\n matchAll: kEnumerableProperty,\n add: kEnumerableProperty,\n addAll: kEnumerableProperty,\n put: kEnumerableProperty,\n delete: kEnumerableProperty,\n keys: kEnumerableProperty\n})\n\nconst cacheQueryOptionConverters = [\n {\n key: 'ignoreSearch',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'ignoreMethod',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'ignoreVary',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n }\n]\n\nwebidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters)\n\nwebidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([\n ...cacheQueryOptionConverters,\n {\n key: 'cacheName',\n converter: webidl.converters.DOMString\n }\n])\n\nwebidl.converters.Response = webidl.interfaceConverter(\n webidl.is.Response,\n 'Response'\n)\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.RequestInfo\n)\n\nmodule.exports = {\n Cache\n}\n","'use strict'\n\nconst { Cache } = require('./cache')\nconst { webidl } = require('../webidl')\nconst { kEnumerableProperty } = require('../../core/util')\nconst { kConstruct } = require('../../core/symbols')\n\nclass CacheStorage {\n /**\n * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map\n * @type {Map}\n */\n async has (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n\n const prefix = 'CacheStorage.has'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName')\n\n // 2.1.1\n // 2.2\n return this.#caches.has(cacheName)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open\n * @param {string} cacheName\n * @returns {Promise}\n */\n async open (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n\n const prefix = 'CacheStorage.open'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName')\n\n // 2.1\n if (this.#caches.has(cacheName)) {\n // await caches.open('v1') !== await caches.open('v1')\n\n // 2.1.1\n const cache = this.#caches.get(cacheName)\n\n // 2.1.1.1\n return new Cache(kConstruct, cache)\n }\n\n // 2.2\n const cache = []\n\n // 2.3\n this.#caches.set(cacheName, cache)\n\n // 2.4\n return new Cache(kConstruct, cache)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete\n * @param {string} cacheName\n * @returns {Promise}\n */\n async delete (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n\n const prefix = 'CacheStorage.delete'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName')\n\n return this.#caches.delete(cacheName)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys\n * @returns {Promise}\n */\n async keys () {\n webidl.brandCheck(this, CacheStorage)\n\n // 2.1\n const keys = this.#caches.keys()\n\n // 2.2\n return [...keys]\n }\n}\n\nObject.defineProperties(CacheStorage.prototype, {\n [Symbol.toStringTag]: {\n value: 'CacheStorage',\n configurable: true\n },\n match: kEnumerableProperty,\n has: kEnumerableProperty,\n open: kEnumerableProperty,\n delete: kEnumerableProperty,\n keys: kEnumerableProperty\n})\n\nmodule.exports = {\n CacheStorage\n}\n","'use strict'\n\nconst assert = require('node:assert')\nconst { URLSerializer } = require('../fetch/data-url')\nconst { isValidHeaderName } = require('../fetch/util')\n\n/**\n * @see https://url.spec.whatwg.org/#concept-url-equals\n * @param {URL} A\n * @param {URL} B\n * @param {boolean | undefined} excludeFragment\n * @returns {boolean}\n */\nfunction urlEquals (A, B, excludeFragment = false) {\n const serializedA = URLSerializer(A, excludeFragment)\n\n const serializedB = URLSerializer(B, excludeFragment)\n\n return serializedA === serializedB\n}\n\n/**\n * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262\n * @param {string} header\n */\nfunction getFieldValues (header) {\n assert(header !== null)\n\n const values = []\n\n for (let value of header.split(',')) {\n value = value.trim()\n\n if (isValidHeaderName(value)) {\n values.push(value)\n }\n }\n\n return values\n}\n\nmodule.exports = {\n urlEquals,\n getFieldValues\n}\n","'use strict'\n\n// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size\nconst maxAttributeValueSize = 1024\n\n// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size\nconst maxNameValuePairSize = 4096\n\nmodule.exports = {\n maxAttributeValueSize,\n maxNameValuePairSize\n}\n","'use strict'\n\nconst { parseSetCookie } = require('./parse')\nconst { stringify } = require('./util')\nconst { webidl } = require('../webidl')\nconst { Headers } = require('../fetch/headers')\n\nconst brandChecks = webidl.brandCheckMultiple([Headers, globalThis.Headers].filter(Boolean))\n\n/**\n * @typedef {Object} Cookie\n * @property {string} name\n * @property {string} value\n * @property {Date|number} [expires]\n * @property {number} [maxAge]\n * @property {string} [domain]\n * @property {string} [path]\n * @property {boolean} [secure]\n * @property {boolean} [httpOnly]\n * @property {'Strict'|'Lax'|'None'} [sameSite]\n * @property {string[]} [unparsed]\n */\n\n/**\n * @param {Headers} headers\n * @returns {Record}\n */\nfunction getCookies (headers) {\n webidl.argumentLengthCheck(arguments, 1, 'getCookies')\n\n brandChecks(headers)\n\n const cookie = headers.get('cookie')\n\n /** @type {Record} */\n const out = {}\n\n if (!cookie) {\n return out\n }\n\n for (const piece of cookie.split(';')) {\n const [name, ...value] = piece.split('=')\n\n out[name.trim()] = value.join('=')\n }\n\n return out\n}\n\n/**\n * @param {Headers} headers\n * @param {string} name\n * @param {{ path?: string, domain?: string }|undefined} attributes\n * @returns {void}\n */\nfunction deleteCookie (headers, name, attributes) {\n brandChecks(headers)\n\n const prefix = 'deleteCookie'\n webidl.argumentLengthCheck(arguments, 2, prefix)\n\n name = webidl.converters.DOMString(name, prefix, 'name')\n attributes = webidl.converters.DeleteCookieAttributes(attributes)\n\n // Matches behavior of\n // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278\n setCookie(headers, {\n name,\n value: '',\n expires: new Date(0),\n ...attributes\n })\n}\n\n/**\n * @param {Headers} headers\n * @returns {Cookie[]}\n */\nfunction getSetCookies (headers) {\n webidl.argumentLengthCheck(arguments, 1, 'getSetCookies')\n\n brandChecks(headers)\n\n const cookies = headers.getSetCookie()\n\n if (!cookies) {\n return []\n }\n\n return cookies.map((pair) => parseSetCookie(pair))\n}\n\n/**\n * Parses a cookie string\n * @param {string} cookie\n */\nfunction parseCookie (cookie) {\n cookie = webidl.converters.DOMString(cookie)\n\n return parseSetCookie(cookie)\n}\n\n/**\n * @param {Headers} headers\n * @param {Cookie} cookie\n * @returns {void}\n */\nfunction setCookie (headers, cookie) {\n webidl.argumentLengthCheck(arguments, 2, 'setCookie')\n\n brandChecks(headers)\n\n cookie = webidl.converters.Cookie(cookie)\n\n const str = stringify(cookie)\n\n if (str) {\n headers.append('set-cookie', str, true)\n }\n}\n\nwebidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'path',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'domain',\n defaultValue: () => null\n }\n])\n\nwebidl.converters.Cookie = webidl.dictionaryConverter([\n {\n converter: webidl.converters.DOMString,\n key: 'name'\n },\n {\n converter: webidl.converters.DOMString,\n key: 'value'\n },\n {\n converter: webidl.nullableConverter((value) => {\n if (typeof value === 'number') {\n return webidl.converters['unsigned long long'](value)\n }\n\n return new Date(value)\n }),\n key: 'expires',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters['long long']),\n key: 'maxAge',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'domain',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'path',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.boolean),\n key: 'secure',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.boolean),\n key: 'httpOnly',\n defaultValue: () => null\n },\n {\n converter: webidl.converters.USVString,\n key: 'sameSite',\n allowedValues: ['Strict', 'Lax', 'None']\n },\n {\n converter: webidl.sequenceConverter(webidl.converters.DOMString),\n key: 'unparsed',\n defaultValue: () => []\n }\n])\n\nmodule.exports = {\n getCookies,\n deleteCookie,\n getSetCookies,\n setCookie,\n parseCookie\n}\n","'use strict'\n\nconst { collectASequenceOfCodePointsFast } = require('../infra')\nconst { maxNameValuePairSize, maxAttributeValueSize } = require('./constants')\nconst { isCTLExcludingHtab } = require('./util')\nconst assert = require('node:assert')\nconst { unescape: qsUnescape } = require('node:querystring')\n\n/**\n * @description Parses the field-value attributes of a set-cookie header string.\n * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4\n * @param {string} header\n * @returns {import('./index').Cookie|null} if the header is invalid, null will be returned\n */\nfunction parseSetCookie (header) {\n // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F\n // character (CTL characters excluding HTAB): Abort these steps and\n // ignore the set-cookie-string entirely.\n if (isCTLExcludingHtab(header)) {\n return null\n }\n\n let nameValuePair = ''\n let unparsedAttributes = ''\n let name = ''\n let value = ''\n\n // 2. If the set-cookie-string contains a %x3B (\";\") character:\n if (header.includes(';')) {\n // 1. The name-value-pair string consists of the characters up to,\n // but not including, the first %x3B (\";\"), and the unparsed-\n // attributes consist of the remainder of the set-cookie-string\n // (including the %x3B (\";\") in question).\n const position = { position: 0 }\n\n nameValuePair = collectASequenceOfCodePointsFast(';', header, position)\n unparsedAttributes = header.slice(position.position)\n } else {\n // Otherwise:\n\n // 1. The name-value-pair string consists of all the characters\n // contained in the set-cookie-string, and the unparsed-\n // attributes is the empty string.\n nameValuePair = header\n }\n\n // 3. If the name-value-pair string lacks a %x3D (\"=\") character, then\n // the name string is empty, and the value string is the value of\n // name-value-pair.\n if (!nameValuePair.includes('=')) {\n value = nameValuePair\n } else {\n // Otherwise, the name string consists of the characters up to, but\n // not including, the first %x3D (\"=\") character, and the (possibly\n // empty) value string consists of the characters after the first\n // %x3D (\"=\") character.\n const position = { position: 0 }\n name = collectASequenceOfCodePointsFast(\n '=',\n nameValuePair,\n position\n )\n value = nameValuePair.slice(position.position + 1)\n }\n\n // 4. Remove any leading or trailing WSP characters from the name\n // string and the value string.\n name = name.trim()\n value = value.trim()\n\n // 5. If the sum of the lengths of the name string and the value string\n // is more than 4096 octets, abort these steps and ignore the set-\n // cookie-string entirely.\n if (name.length + value.length > maxNameValuePairSize) {\n return null\n }\n\n // 6. The cookie-name is the name string, and the cookie-value is the\n // value string.\n // https://datatracker.ietf.org/doc/html/rfc6265\n // To maximize compatibility with user agents, servers that wish to\n // store arbitrary data in a cookie-value SHOULD encode that data, for\n // example, using Base64 [RFC4648].\n return {\n name, value: qsUnescape(value), ...parseUnparsedAttributes(unparsedAttributes)\n }\n}\n\n/**\n * Parses the remaining attributes of a set-cookie header\n * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4\n * @param {string} unparsedAttributes\n * @param {Object.} [cookieAttributeList={}]\n */\nfunction parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) {\n // 1. If the unparsed-attributes string is empty, skip the rest of\n // these steps.\n if (unparsedAttributes.length === 0) {\n return cookieAttributeList\n }\n\n // 2. Discard the first character of the unparsed-attributes (which\n // will be a %x3B (\";\") character).\n assert(unparsedAttributes[0] === ';')\n unparsedAttributes = unparsedAttributes.slice(1)\n\n let cookieAv = ''\n\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n if (unparsedAttributes.includes(';')) {\n // 1. Consume the characters of the unparsed-attributes up to, but\n // not including, the first %x3B (\";\") character.\n cookieAv = collectASequenceOfCodePointsFast(\n ';',\n unparsedAttributes,\n { position: 0 }\n )\n unparsedAttributes = unparsedAttributes.slice(cookieAv.length)\n } else {\n // Otherwise:\n\n // 1. Consume the remainder of the unparsed-attributes.\n cookieAv = unparsedAttributes\n unparsedAttributes = ''\n }\n\n // Let the cookie-av string be the characters consumed in this step.\n\n let attributeName = ''\n let attributeValue = ''\n\n // 4. If the cookie-av string contains a %x3D (\"=\") character:\n if (cookieAv.includes('=')) {\n // 1. The (possibly empty) attribute-name string consists of the\n // characters up to, but not including, the first %x3D (\"=\")\n // character, and the (possibly empty) attribute-value string\n // consists of the characters after the first %x3D (\"=\")\n // character.\n const position = { position: 0 }\n\n attributeName = collectASequenceOfCodePointsFast(\n '=',\n cookieAv,\n position\n )\n attributeValue = cookieAv.slice(position.position + 1)\n } else {\n // Otherwise:\n\n // 1. The attribute-name string consists of the entire cookie-av\n // string, and the attribute-value string is empty.\n attributeName = cookieAv\n }\n\n // 5. Remove any leading or trailing WSP characters from the attribute-\n // name string and the attribute-value string.\n attributeName = attributeName.trim()\n attributeValue = attributeValue.trim()\n\n // 6. If the attribute-value is longer than 1024 octets, ignore the\n // cookie-av string and return to Step 1 of this algorithm.\n if (attributeValue.length > maxAttributeValueSize) {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 7. Process the attribute-name and attribute-value according to the\n // requirements in the following subsections. (Notice that\n // attributes with unrecognized attribute-names are ignored.)\n const attributeNameLowercase = attributeName.toLowerCase()\n\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1\n // If the attribute-name case-insensitively matches the string\n // \"Expires\", the user agent MUST process the cookie-av as follows.\n if (attributeNameLowercase === 'expires') {\n // 1. Let the expiry-time be the result of parsing the attribute-value\n // as cookie-date (see Section 5.1.1).\n const expiryTime = new Date(attributeValue)\n\n // 2. If the attribute-value failed to parse as a cookie date, ignore\n // the cookie-av.\n\n cookieAttributeList.expires = expiryTime\n } else if (attributeNameLowercase === 'max-age') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2\n // If the attribute-name case-insensitively matches the string \"Max-\n // Age\", the user agent MUST process the cookie-av as follows.\n\n // 1. If the first character of the attribute-value is not a DIGIT or a\n // \"-\" character, ignore the cookie-av.\n const charCode = attributeValue.charCodeAt(0)\n\n if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 2. If the remainder of attribute-value contains a non-DIGIT\n // character, ignore the cookie-av.\n if (!/^\\d+$/.test(attributeValue)) {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 3. Let delta-seconds be the attribute-value converted to an integer.\n const deltaSeconds = Number(attributeValue)\n\n // 4. Let cookie-age-limit be the maximum age of the cookie (which\n // SHOULD be 400 days or less, see Section 4.1.2.2).\n\n // 5. Set delta-seconds to the smaller of its present value and cookie-\n // age-limit.\n // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs)\n\n // 6. If delta-seconds is less than or equal to zero (0), let expiry-\n // time be the earliest representable date and time. Otherwise, let\n // the expiry-time be the current date and time plus delta-seconds\n // seconds.\n // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds\n\n // 7. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Max-Age and an attribute-value of expiry-time.\n cookieAttributeList.maxAge = deltaSeconds\n } else if (attributeNameLowercase === 'domain') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3\n // If the attribute-name case-insensitively matches the string \"Domain\",\n // the user agent MUST process the cookie-av as follows.\n\n // 1. Let cookie-domain be the attribute-value.\n let cookieDomain = attributeValue\n\n // 2. If cookie-domain starts with %x2E (\".\"), let cookie-domain be\n // cookie-domain without its leading %x2E (\".\").\n if (cookieDomain[0] === '.') {\n cookieDomain = cookieDomain.slice(1)\n }\n\n // 3. Convert the cookie-domain to lower case.\n cookieDomain = cookieDomain.toLowerCase()\n\n // 4. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Domain and an attribute-value of cookie-domain.\n cookieAttributeList.domain = cookieDomain\n } else if (attributeNameLowercase === 'path') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4\n // If the attribute-name case-insensitively matches the string \"Path\",\n // the user agent MUST process the cookie-av as follows.\n\n // 1. If the attribute-value is empty or if the first character of the\n // attribute-value is not %x2F (\"/\"):\n let cookiePath = ''\n if (attributeValue.length === 0 || attributeValue[0] !== '/') {\n // 1. Let cookie-path be the default-path.\n cookiePath = '/'\n } else {\n // Otherwise:\n\n // 1. Let cookie-path be the attribute-value.\n cookiePath = attributeValue\n }\n\n // 2. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Path and an attribute-value of cookie-path.\n cookieAttributeList.path = cookiePath\n } else if (attributeNameLowercase === 'secure') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5\n // If the attribute-name case-insensitively matches the string \"Secure\",\n // the user agent MUST append an attribute to the cookie-attribute-list\n // with an attribute-name of Secure and an empty attribute-value.\n\n cookieAttributeList.secure = true\n } else if (attributeNameLowercase === 'httponly') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6\n // If the attribute-name case-insensitively matches the string\n // \"HttpOnly\", the user agent MUST append an attribute to the cookie-\n // attribute-list with an attribute-name of HttpOnly and an empty\n // attribute-value.\n\n cookieAttributeList.httpOnly = true\n } else if (attributeNameLowercase === 'samesite') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7\n // If the attribute-name case-insensitively matches the string\n // \"SameSite\", the user agent MUST process the cookie-av as follows:\n\n // 1. Let enforcement be \"Default\".\n let enforcement = 'Default'\n\n const attributeValueLowercase = attributeValue.toLowerCase()\n // 2. If cookie-av's attribute-value is a case-insensitive match for\n // \"None\", set enforcement to \"None\".\n if (attributeValueLowercase.includes('none')) {\n enforcement = 'None'\n }\n\n // 3. If cookie-av's attribute-value is a case-insensitive match for\n // \"Strict\", set enforcement to \"Strict\".\n if (attributeValueLowercase.includes('strict')) {\n enforcement = 'Strict'\n }\n\n // 4. If cookie-av's attribute-value is a case-insensitive match for\n // \"Lax\", set enforcement to \"Lax\".\n if (attributeValueLowercase.includes('lax')) {\n enforcement = 'Lax'\n }\n\n // 5. Append an attribute to the cookie-attribute-list with an\n // attribute-name of \"SameSite\" and an attribute-value of\n // enforcement.\n cookieAttributeList.sameSite = enforcement\n } else {\n cookieAttributeList.unparsed ??= []\n\n cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`)\n }\n\n // 8. Return to Step 1 of this algorithm.\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n}\n\nmodule.exports = {\n parseSetCookie,\n parseUnparsedAttributes\n}\n","'use strict'\n\n/**\n * @param {string} value\n * @returns {boolean}\n */\nfunction isCTLExcludingHtab (value) {\n for (let i = 0; i < value.length; ++i) {\n const code = value.charCodeAt(i)\n\n if (\n (code >= 0x00 && code <= 0x08) ||\n (code >= 0x0A && code <= 0x1F) ||\n code === 0x7F\n ) {\n return true\n }\n }\n return false\n}\n\n/**\n CHAR = \n token = 1*\n separators = \"(\" | \")\" | \"<\" | \">\" | \"@\"\n | \",\" | \";\" | \":\" | \"\\\" | <\">\n | \"/\" | \"[\" | \"]\" | \"?\" | \"=\"\n | \"{\" | \"}\" | SP | HT\n * @param {string} name\n */\nfunction validateCookieName (name) {\n for (let i = 0; i < name.length; ++i) {\n const code = name.charCodeAt(i)\n\n if (\n code < 0x21 || // exclude CTLs (0-31), SP and HT\n code > 0x7E || // exclude non-ascii and DEL\n code === 0x22 || // \"\n code === 0x28 || // (\n code === 0x29 || // )\n code === 0x3C || // <\n code === 0x3E || // >\n code === 0x40 || // @\n code === 0x2C || // ,\n code === 0x3B || // ;\n code === 0x3A || // :\n code === 0x5C || // \\\n code === 0x2F || // /\n code === 0x5B || // [\n code === 0x5D || // ]\n code === 0x3F || // ?\n code === 0x3D || // =\n code === 0x7B || // {\n code === 0x7D // }\n ) {\n throw new Error('Invalid cookie name')\n }\n }\n}\n\n/**\n cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )\n cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n ; US-ASCII characters excluding CTLs,\n ; whitespace DQUOTE, comma, semicolon,\n ; and backslash\n * @param {string} value\n */\nfunction validateCookieValue (value) {\n let len = value.length\n let i = 0\n\n // if the value is wrapped in DQUOTE\n if (value[0] === '\"') {\n if (len === 1 || value[len - 1] !== '\"') {\n throw new Error('Invalid cookie value')\n }\n --len\n ++i\n }\n\n while (i < len) {\n const code = value.charCodeAt(i++)\n\n if (\n code < 0x21 || // exclude CTLs (0-31)\n code > 0x7E || // non-ascii and DEL (127)\n code === 0x22 || // \"\n code === 0x2C || // ,\n code === 0x3B || // ;\n code === 0x5C // \\\n ) {\n throw new Error('Invalid cookie value')\n }\n }\n}\n\n/**\n * path-value = \n * @param {string} path\n */\nfunction validateCookiePath (path) {\n for (let i = 0; i < path.length; ++i) {\n const code = path.charCodeAt(i)\n\n if (\n code < 0x20 || // exclude CTLs (0-31)\n code === 0x7F || // DEL\n code === 0x3B // ;\n ) {\n throw new Error('Invalid cookie path')\n }\n }\n}\n\n/**\n * I have no idea why these values aren't allowed to be honest,\n * but Deno tests these. - Khafra\n * @param {string} domain\n */\nfunction validateCookieDomain (domain) {\n if (\n domain.startsWith('-') ||\n domain.endsWith('.') ||\n domain.endsWith('-')\n ) {\n throw new Error('Invalid cookie domain')\n }\n}\n\nconst IMFDays = [\n 'Sun', 'Mon', 'Tue', 'Wed',\n 'Thu', 'Fri', 'Sat'\n]\n\nconst IMFMonths = [\n 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',\n 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'\n]\n\nconst IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, '0'))\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1\n * @param {number|Date} date\n IMF-fixdate = day-name \",\" SP date1 SP time-of-day SP GMT\n ; fixed length/zone/capitalization subset of the format\n ; see Section 3.3 of [RFC5322]\n\n day-name = %x4D.6F.6E ; \"Mon\", case-sensitive\n / %x54.75.65 ; \"Tue\", case-sensitive\n / %x57.65.64 ; \"Wed\", case-sensitive\n / %x54.68.75 ; \"Thu\", case-sensitive\n / %x46.72.69 ; \"Fri\", case-sensitive\n / %x53.61.74 ; \"Sat\", case-sensitive\n / %x53.75.6E ; \"Sun\", case-sensitive\n date1 = day SP month SP year\n ; e.g., 02 Jun 1982\n\n day = 2DIGIT\n month = %x4A.61.6E ; \"Jan\", case-sensitive\n / %x46.65.62 ; \"Feb\", case-sensitive\n / %x4D.61.72 ; \"Mar\", case-sensitive\n / %x41.70.72 ; \"Apr\", case-sensitive\n / %x4D.61.79 ; \"May\", case-sensitive\n / %x4A.75.6E ; \"Jun\", case-sensitive\n / %x4A.75.6C ; \"Jul\", case-sensitive\n / %x41.75.67 ; \"Aug\", case-sensitive\n / %x53.65.70 ; \"Sep\", case-sensitive\n / %x4F.63.74 ; \"Oct\", case-sensitive\n / %x4E.6F.76 ; \"Nov\", case-sensitive\n / %x44.65.63 ; \"Dec\", case-sensitive\n year = 4DIGIT\n\n GMT = %x47.4D.54 ; \"GMT\", case-sensitive\n\n time-of-day = hour \":\" minute \":\" second\n ; 00:00:00 - 23:59:60 (leap second)\n\n hour = 2DIGIT\n minute = 2DIGIT\n second = 2DIGIT\n */\nfunction toIMFDate (date) {\n if (typeof date === 'number') {\n date = new Date(date)\n }\n\n return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT`\n}\n\n/**\n max-age-av = \"Max-Age=\" non-zero-digit *DIGIT\n ; In practice, both expires-av and max-age-av\n ; are limited to dates representable by the\n ; user agent.\n * @param {number} maxAge\n */\nfunction validateCookieMaxAge (maxAge) {\n if (maxAge < 0) {\n throw new Error('Invalid cookie max-age')\n }\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1\n * @param {import('./index').Cookie} cookie\n */\nfunction stringify (cookie) {\n if (cookie.name.length === 0) {\n return null\n }\n\n validateCookieName(cookie.name)\n validateCookieValue(cookie.value)\n\n const out = [`${cookie.name}=${cookie.value}`]\n\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2\n if (cookie.name.startsWith('__Secure-')) {\n cookie.secure = true\n }\n\n if (cookie.name.startsWith('__Host-')) {\n cookie.secure = true\n cookie.domain = null\n cookie.path = '/'\n }\n\n if (cookie.secure) {\n out.push('Secure')\n }\n\n if (cookie.httpOnly) {\n out.push('HttpOnly')\n }\n\n if (typeof cookie.maxAge === 'number') {\n validateCookieMaxAge(cookie.maxAge)\n out.push(`Max-Age=${cookie.maxAge}`)\n }\n\n if (cookie.domain) {\n validateCookieDomain(cookie.domain)\n out.push(`Domain=${cookie.domain}`)\n }\n\n if (cookie.path) {\n validateCookiePath(cookie.path)\n out.push(`Path=${cookie.path}`)\n }\n\n if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') {\n out.push(`Expires=${toIMFDate(cookie.expires)}`)\n }\n\n if (cookie.sameSite) {\n out.push(`SameSite=${cookie.sameSite}`)\n }\n\n for (const part of cookie.unparsed) {\n if (!part.includes('=')) {\n throw new Error('Invalid unparsed')\n }\n\n const [key, ...value] = part.split('=')\n\n out.push(`${key.trim()}=${value.join('=')}`)\n }\n\n return out.join('; ')\n}\n\nmodule.exports = {\n isCTLExcludingHtab,\n validateCookieName,\n validateCookiePath,\n validateCookieValue,\n toIMFDate,\n stringify\n}\n","'use strict'\nconst { Transform } = require('node:stream')\nconst { isASCIINumber, isValidLastEventId } = require('./util')\n\n/**\n * @type {number[]} BOM\n */\nconst BOM = [0xEF, 0xBB, 0xBF]\n/**\n * @type {10} LF\n */\nconst LF = 0x0A\n/**\n * @type {13} CR\n */\nconst CR = 0x0D\n/**\n * @type {58} COLON\n */\nconst COLON = 0x3A\n/**\n * @type {32} SPACE\n */\nconst SPACE = 0x20\n\n/**\n * @typedef {object} EventSourceStreamEvent\n * @type {object}\n * @property {string} [event] The event type.\n * @property {string} [data] The data of the message.\n * @property {string} [id] A unique ID for the event.\n * @property {string} [retry] The reconnection time, in milliseconds.\n */\n\n/**\n * @typedef eventSourceSettings\n * @type {object}\n * @property {string} [lastEventId] The last event ID received from the server.\n * @property {string} [origin] The origin of the event source.\n * @property {number} [reconnectionTime] The reconnection time, in milliseconds.\n */\n\nclass EventSourceStream extends Transform {\n /**\n * @type {eventSourceSettings}\n */\n state\n\n /**\n * Leading byte-order-mark check.\n * @type {boolean}\n */\n checkBOM = true\n\n /**\n * @type {boolean}\n */\n crlfCheck = false\n\n /**\n * @type {boolean}\n */\n eventEndCheck = false\n\n /**\n * @type {Buffer|null}\n */\n buffer = null\n\n pos = 0\n\n event = {\n data: undefined,\n event: undefined,\n id: undefined,\n retry: undefined\n }\n\n /**\n * @param {object} options\n * @param {boolean} [options.readableObjectMode]\n * @param {eventSourceSettings} [options.eventSourceSettings]\n * @param {(chunk: any, encoding?: BufferEncoding | undefined) => boolean} [options.push]\n */\n constructor (options = {}) {\n // Enable object mode as EventSourceStream emits objects of shape\n // EventSourceStreamEvent\n options.readableObjectMode = true\n\n super(options)\n\n this.state = options.eventSourceSettings || {}\n if (options.push) {\n this.push = options.push\n }\n }\n\n /**\n * @param {Buffer} chunk\n * @param {string} _encoding\n * @param {Function} callback\n * @returns {void}\n */\n _transform (chunk, _encoding, callback) {\n if (chunk.length === 0) {\n callback()\n return\n }\n\n // Cache the chunk in the buffer, as the data might not be complete while\n // processing it\n // TODO: Investigate if there is a more performant way to handle\n // incoming chunks\n // see: https://github.com/nodejs/undici/issues/2630\n if (this.buffer) {\n this.buffer = Buffer.concat([this.buffer, chunk])\n } else {\n this.buffer = chunk\n }\n\n // Strip leading byte-order-mark if we opened the stream and started\n // the processing of the incoming data\n if (this.checkBOM) {\n switch (this.buffer.length) {\n case 1:\n // Check if the first byte is the same as the first byte of the BOM\n if (this.buffer[0] === BOM[0]) {\n // If it is, we need to wait for more data\n callback()\n return\n }\n // Set the checkBOM flag to false as we don't need to check for the\n // BOM anymore\n this.checkBOM = false\n\n // The buffer only contains one byte so we need to wait for more data\n callback()\n return\n case 2:\n // Check if the first two bytes are the same as the first two bytes\n // of the BOM\n if (\n this.buffer[0] === BOM[0] &&\n this.buffer[1] === BOM[1]\n ) {\n // If it is, we need to wait for more data, because the third byte\n // is needed to determine if it is the BOM or not\n callback()\n return\n }\n\n // Set the checkBOM flag to false as we don't need to check for the\n // BOM anymore\n this.checkBOM = false\n break\n case 3:\n // Check if the first three bytes are the same as the first three\n // bytes of the BOM\n if (\n this.buffer[0] === BOM[0] &&\n this.buffer[1] === BOM[1] &&\n this.buffer[2] === BOM[2]\n ) {\n // If it is, we can drop the buffered data, as it is only the BOM\n this.buffer = Buffer.alloc(0)\n // Set the checkBOM flag to false as we don't need to check for the\n // BOM anymore\n this.checkBOM = false\n\n // Await more data\n callback()\n return\n }\n // If it is not the BOM, we can start processing the data\n this.checkBOM = false\n break\n default:\n // The buffer is longer than 3 bytes, so we can drop the BOM if it is\n // present\n if (\n this.buffer[0] === BOM[0] &&\n this.buffer[1] === BOM[1] &&\n this.buffer[2] === BOM[2]\n ) {\n // Remove the BOM from the buffer\n this.buffer = this.buffer.subarray(3)\n }\n\n // Set the checkBOM flag to false as we don't need to check for the\n this.checkBOM = false\n break\n }\n }\n\n while (this.pos < this.buffer.length) {\n // If the previous line ended with an end-of-line, we need to check\n // if the next character is also an end-of-line.\n if (this.eventEndCheck) {\n // If the the current character is an end-of-line, then the event\n // is finished and we can process it\n\n // If the previous line ended with a carriage return, we need to\n // check if the current character is a line feed and remove it\n // from the buffer.\n if (this.crlfCheck) {\n // If the current character is a line feed, we can remove it\n // from the buffer and reset the crlfCheck flag\n if (this.buffer[this.pos] === LF) {\n this.buffer = this.buffer.subarray(this.pos + 1)\n this.pos = 0\n this.crlfCheck = false\n\n // It is possible that the line feed is not the end of the\n // event. We need to check if the next character is an\n // end-of-line character to determine if the event is\n // finished. We simply continue the loop to check the next\n // character.\n\n // As we removed the line feed from the buffer and set the\n // crlfCheck flag to false, we basically don't make any\n // distinction between a line feed and a carriage return.\n continue\n }\n this.crlfCheck = false\n }\n\n if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) {\n // If the current character is a carriage return, we need to\n // set the crlfCheck flag to true, as we need to check if the\n // next character is a line feed so we can remove it from the\n // buffer\n if (this.buffer[this.pos] === CR) {\n this.crlfCheck = true\n }\n\n this.buffer = this.buffer.subarray(this.pos + 1)\n this.pos = 0\n if (\n this.event.data !== undefined || this.event.event || this.event.id !== undefined || this.event.retry) {\n this.processEvent(this.event)\n }\n this.clearEvent()\n continue\n }\n // If the current character is not an end-of-line, then the event\n // is not finished and we have to reset the eventEndCheck flag\n this.eventEndCheck = false\n continue\n }\n\n // If the current character is an end-of-line, we can process the\n // line\n if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) {\n // If the current character is a carriage return, we need to\n // set the crlfCheck flag to true, as we need to check if the\n // next character is a line feed\n if (this.buffer[this.pos] === CR) {\n this.crlfCheck = true\n }\n\n // In any case, we can process the line as we reached an\n // end-of-line character\n this.parseLine(this.buffer.subarray(0, this.pos), this.event)\n\n // Remove the processed line from the buffer\n this.buffer = this.buffer.subarray(this.pos + 1)\n // Reset the position as we removed the processed line from the buffer\n this.pos = 0\n // A line was processed and this could be the end of the event. We need\n // to check if the next line is empty to determine if the event is\n // finished.\n this.eventEndCheck = true\n continue\n }\n\n this.pos++\n }\n\n callback()\n }\n\n /**\n * @param {Buffer} line\n * @param {EventSourceStreamEvent} event\n */\n parseLine (line, event) {\n // If the line is empty (a blank line)\n // Dispatch the event, as defined below.\n // This will be handled in the _transform method\n if (line.length === 0) {\n return\n }\n\n // If the line starts with a U+003A COLON character (:)\n // Ignore the line.\n const colonPosition = line.indexOf(COLON)\n if (colonPosition === 0) {\n return\n }\n\n let field = ''\n let value = ''\n\n // If the line contains a U+003A COLON character (:)\n if (colonPosition !== -1) {\n // Collect the characters on the line before the first U+003A COLON\n // character (:), and let field be that string.\n // TODO: Investigate if there is a more performant way to extract the\n // field\n // see: https://github.com/nodejs/undici/issues/2630\n field = line.subarray(0, colonPosition).toString('utf8')\n\n // Collect the characters on the line after the first U+003A COLON\n // character (:), and let value be that string.\n // If value starts with a U+0020 SPACE character, remove it from value.\n let valueStart = colonPosition + 1\n if (line[valueStart] === SPACE) {\n ++valueStart\n }\n // TODO: Investigate if there is a more performant way to extract the\n // value\n // see: https://github.com/nodejs/undici/issues/2630\n value = line.subarray(valueStart).toString('utf8')\n\n // Otherwise, the string is not empty but does not contain a U+003A COLON\n // character (:)\n } else {\n // Process the field using the steps described below, using the whole\n // line as the field name, and the empty string as the field value.\n field = line.toString('utf8')\n value = ''\n }\n\n // Modify the event with the field name and value. The value is also\n // decoded as UTF-8\n switch (field) {\n case 'data':\n if (event[field] === undefined) {\n event[field] = value\n } else {\n event[field] += `\\n${value}`\n }\n break\n case 'retry':\n if (isASCIINumber(value)) {\n event[field] = value\n }\n break\n case 'id':\n if (isValidLastEventId(value)) {\n event[field] = value\n }\n break\n case 'event':\n if (value.length > 0) {\n event[field] = value\n }\n break\n }\n }\n\n /**\n * @param {EventSourceStreamEvent} event\n */\n processEvent (event) {\n if (event.retry && isASCIINumber(event.retry)) {\n this.state.reconnectionTime = parseInt(event.retry, 10)\n }\n\n if (event.id !== undefined && isValidLastEventId(event.id)) {\n this.state.lastEventId = event.id\n }\n\n // only dispatch event, when data is provided\n if (event.data !== undefined) {\n this.push({\n type: event.event || 'message',\n options: {\n data: event.data,\n lastEventId: this.state.lastEventId,\n origin: this.state.origin\n }\n })\n }\n }\n\n clearEvent () {\n this.event = {\n data: undefined,\n event: undefined,\n id: undefined,\n retry: undefined\n }\n }\n}\n\nmodule.exports = {\n EventSourceStream\n}\n","'use strict'\n\nconst { pipeline } = require('node:stream')\nconst { fetching } = require('../fetch')\nconst { makeRequest } = require('../fetch/request')\nconst { webidl } = require('../webidl')\nconst { EventSourceStream } = require('./eventsource-stream')\nconst { parseMIMEType } = require('../fetch/data-url')\nconst { createFastMessageEvent } = require('../websocket/events')\nconst { isNetworkError } = require('../fetch/response')\nconst { kEnumerableProperty } = require('../../core/util')\nconst { environmentSettingsObject } = require('../fetch/util')\n\nlet experimentalWarned = false\n\n/**\n * A reconnection time, in milliseconds. This must initially be an implementation-defined value,\n * probably in the region of a few seconds.\n *\n * In Comparison:\n * - Chrome uses 3000ms.\n * - Deno uses 5000ms.\n *\n * @type {3000}\n */\nconst defaultReconnectionTime = 3000\n\n/**\n * The readyState attribute represents the state of the connection.\n * @typedef ReadyState\n * @type {0|1|2}\n * @readonly\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev\n */\n\n/**\n * The connection has not yet been established, or it was closed and the user\n * agent is reconnecting.\n * @type {0}\n */\nconst CONNECTING = 0\n\n/**\n * The user agent has an open connection and is dispatching events as it\n * receives them.\n * @type {1}\n */\nconst OPEN = 1\n\n/**\n * The connection is not open, and the user agent is not trying to reconnect.\n * @type {2}\n */\nconst CLOSED = 2\n\n/**\n * Requests for the element will have their mode set to \"cors\" and their credentials mode set to \"same-origin\".\n * @type {'anonymous'}\n */\nconst ANONYMOUS = 'anonymous'\n\n/**\n * Requests for the element will have their mode set to \"cors\" and their credentials mode set to \"include\".\n * @type {'use-credentials'}\n */\nconst USE_CREDENTIALS = 'use-credentials'\n\n/**\n * The EventSource interface is used to receive server-sent events. It\n * connects to a server over HTTP and receives events in text/event-stream\n * format without closing the connection.\n * @extends {EventTarget}\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events\n * @api public\n */\nclass EventSource extends EventTarget {\n #events = {\n open: null,\n error: null,\n message: null\n }\n\n #url\n #withCredentials = false\n\n /**\n * @type {ReadyState}\n */\n #readyState = CONNECTING\n\n #request = null\n #controller = null\n\n #dispatcher\n\n /**\n * @type {import('./eventsource-stream').eventSourceSettings}\n */\n #state\n\n /**\n * Creates a new EventSource object.\n * @param {string} url\n * @param {EventSourceInit} [eventSourceInitDict={}]\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface\n */\n constructor (url, eventSourceInitDict = {}) {\n // 1. Let ev be a new EventSource object.\n super()\n\n webidl.util.markAsUncloneable(this)\n\n const prefix = 'EventSource constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n if (!experimentalWarned) {\n experimentalWarned = true\n process.emitWarning('EventSource is experimental, expect them to change at any time.', {\n code: 'UNDICI-ES'\n })\n }\n\n url = webidl.converters.USVString(url)\n eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, 'eventSourceInitDict')\n\n this.#dispatcher = eventSourceInitDict.node.dispatcher || eventSourceInitDict.dispatcher\n this.#state = {\n lastEventId: '',\n reconnectionTime: eventSourceInitDict.node.reconnectionTime\n }\n\n // 2. Let settings be ev's relevant settings object.\n // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object\n const settings = environmentSettingsObject\n\n let urlRecord\n\n try {\n // 3. Let urlRecord be the result of encoding-parsing a URL given url, relative to settings.\n urlRecord = new URL(url, settings.settingsObject.baseUrl)\n this.#state.origin = urlRecord.origin\n } catch (e) {\n // 4. If urlRecord is failure, then throw a \"SyntaxError\" DOMException.\n throw new DOMException(e, 'SyntaxError')\n }\n\n // 5. Set ev's url to urlRecord.\n this.#url = urlRecord.href\n\n // 6. Let corsAttributeState be Anonymous.\n let corsAttributeState = ANONYMOUS\n\n // 7. If the value of eventSourceInitDict's withCredentials member is true,\n // then set corsAttributeState to Use Credentials and set ev's\n // withCredentials attribute to true.\n if (eventSourceInitDict.withCredentials === true) {\n corsAttributeState = USE_CREDENTIALS\n this.#withCredentials = true\n }\n\n // 8. Let request be the result of creating a potential-CORS request given\n // urlRecord, the empty string, and corsAttributeState.\n const initRequest = {\n redirect: 'follow',\n keepalive: true,\n // @see https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attributes\n mode: 'cors',\n credentials: corsAttributeState === 'anonymous'\n ? 'same-origin'\n : 'omit',\n referrer: 'no-referrer'\n }\n\n // 9. Set request's client to settings.\n initRequest.client = environmentSettingsObject.settingsObject\n\n // 10. User agents may set (`Accept`, `text/event-stream`) in request's header list.\n initRequest.headersList = [['accept', { name: 'accept', value: 'text/event-stream' }]]\n\n // 11. Set request's cache mode to \"no-store\".\n initRequest.cache = 'no-store'\n\n // 12. Set request's initiator type to \"other\".\n initRequest.initiator = 'other'\n\n initRequest.urlList = [new URL(this.#url)]\n\n // 13. Set ev's request to request.\n this.#request = makeRequest(initRequest)\n\n this.#connect()\n }\n\n /**\n * Returns the state of this EventSource object's connection. It can have the\n * values described below.\n * @returns {ReadyState}\n * @readonly\n */\n get readyState () {\n return this.#readyState\n }\n\n /**\n * Returns the URL providing the event stream.\n * @readonly\n * @returns {string}\n */\n get url () {\n return this.#url\n }\n\n /**\n * Returns a boolean indicating whether the EventSource object was\n * instantiated with CORS credentials set (true), or not (false, the default).\n */\n get withCredentials () {\n return this.#withCredentials\n }\n\n #connect () {\n if (this.#readyState === CLOSED) return\n\n this.#readyState = CONNECTING\n\n const fetchParams = {\n request: this.#request,\n dispatcher: this.#dispatcher\n }\n\n // 14. Let processEventSourceEndOfBody given response res be the following step: if res is not a network error, then reestablish the connection.\n const processEventSourceEndOfBody = (response) => {\n if (!isNetworkError(response)) {\n return this.#reconnect()\n }\n }\n\n // 15. Fetch request, with processResponseEndOfBody set to processEventSourceEndOfBody...\n fetchParams.processResponseEndOfBody = processEventSourceEndOfBody\n\n // and processResponse set to the following steps given response res:\n fetchParams.processResponse = (response) => {\n // 1. If res is an aborted network error, then fail the connection.\n\n if (isNetworkError(response)) {\n // 1. When a user agent is to fail the connection, the user agent\n // must queue a task which, if the readyState attribute is set to a\n // value other than CLOSED, sets the readyState attribute to CLOSED\n // and fires an event named error at the EventSource object. Once the\n // user agent has failed the connection, it does not attempt to\n // reconnect.\n if (response.aborted) {\n this.close()\n this.dispatchEvent(new Event('error'))\n return\n // 2. Otherwise, if res is a network error, then reestablish the\n // connection, unless the user agent knows that to be futile, in\n // which case the user agent may fail the connection.\n } else {\n this.#reconnect()\n return\n }\n }\n\n // 3. Otherwise, if res's status is not 200, or if res's `Content-Type`\n // is not `text/event-stream`, then fail the connection.\n const contentType = response.headersList.get('content-type', true)\n const mimeType = contentType !== null ? parseMIMEType(contentType) : 'failure'\n const contentTypeValid = mimeType !== 'failure' && mimeType.essence === 'text/event-stream'\n if (\n response.status !== 200 ||\n contentTypeValid === false\n ) {\n this.close()\n this.dispatchEvent(new Event('error'))\n return\n }\n\n // 4. Otherwise, announce the connection and interpret res's body\n // line by line.\n\n // When a user agent is to announce the connection, the user agent\n // must queue a task which, if the readyState attribute is set to a\n // value other than CLOSED, sets the readyState attribute to OPEN\n // and fires an event named open at the EventSource object.\n // @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model\n this.#readyState = OPEN\n this.dispatchEvent(new Event('open'))\n\n // If redirected to a different origin, set the origin to the new origin.\n this.#state.origin = response.urlList[response.urlList.length - 1].origin\n\n const eventSourceStream = new EventSourceStream({\n eventSourceSettings: this.#state,\n push: (event) => {\n this.dispatchEvent(createFastMessageEvent(\n event.type,\n event.options\n ))\n }\n })\n\n pipeline(response.body.stream,\n eventSourceStream,\n (error) => {\n if (\n error?.aborted === false\n ) {\n this.close()\n this.dispatchEvent(new Event('error'))\n }\n })\n }\n\n this.#controller = fetching(fetchParams)\n }\n\n /**\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model\n * @returns {void}\n */\n #reconnect () {\n // When a user agent is to reestablish the connection, the user agent must\n // run the following steps. These steps are run in parallel, not as part of\n // a task. (The tasks that it queues, of course, are run like normal tasks\n // and not themselves in parallel.)\n\n // 1. Queue a task to run the following steps:\n\n // 1. If the readyState attribute is set to CLOSED, abort the task.\n if (this.#readyState === CLOSED) return\n\n // 2. Set the readyState attribute to CONNECTING.\n this.#readyState = CONNECTING\n\n // 3. Fire an event named error at the EventSource object.\n this.dispatchEvent(new Event('error'))\n\n // 2. Wait a delay equal to the reconnection time of the event source.\n setTimeout(() => {\n // 5. Queue a task to run the following steps:\n\n // 1. If the EventSource object's readyState attribute is not set to\n // CONNECTING, then return.\n if (this.#readyState !== CONNECTING) return\n\n // 2. Let request be the EventSource object's request.\n // 3. If the EventSource object's last event ID string is not the empty\n // string, then:\n // 1. Let lastEventIDValue be the EventSource object's last event ID\n // string, encoded as UTF-8.\n // 2. Set (`Last-Event-ID`, lastEventIDValue) in request's header\n // list.\n if (this.#state.lastEventId.length) {\n this.#request.headersList.set('last-event-id', this.#state.lastEventId, true)\n }\n\n // 4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section.\n this.#connect()\n }, this.#state.reconnectionTime)?.unref()\n }\n\n /**\n * Closes the connection, if any, and sets the readyState attribute to\n * CLOSED.\n */\n close () {\n webidl.brandCheck(this, EventSource)\n\n if (this.#readyState === CLOSED) return\n this.#readyState = CLOSED\n this.#controller.abort()\n this.#request = null\n }\n\n get onopen () {\n return this.#events.open\n }\n\n set onopen (fn) {\n if (this.#events.open) {\n this.removeEventListener('open', this.#events.open)\n }\n\n const listener = webidl.converters.EventHandlerNonNull(fn)\n\n if (listener !== null) {\n this.addEventListener('open', listener)\n this.#events.open = fn\n } else {\n this.#events.open = null\n }\n }\n\n get onmessage () {\n return this.#events.message\n }\n\n set onmessage (fn) {\n if (this.#events.message) {\n this.removeEventListener('message', this.#events.message)\n }\n\n const listener = webidl.converters.EventHandlerNonNull(fn)\n\n if (listener !== null) {\n this.addEventListener('message', listener)\n this.#events.message = fn\n } else {\n this.#events.message = null\n }\n }\n\n get onerror () {\n return this.#events.error\n }\n\n set onerror (fn) {\n if (this.#events.error) {\n this.removeEventListener('error', this.#events.error)\n }\n\n const listener = webidl.converters.EventHandlerNonNull(fn)\n\n if (listener !== null) {\n this.addEventListener('error', listener)\n this.#events.error = fn\n } else {\n this.#events.error = null\n }\n }\n}\n\nconst constantsPropertyDescriptors = {\n CONNECTING: {\n __proto__: null,\n configurable: false,\n enumerable: true,\n value: CONNECTING,\n writable: false\n },\n OPEN: {\n __proto__: null,\n configurable: false,\n enumerable: true,\n value: OPEN,\n writable: false\n },\n CLOSED: {\n __proto__: null,\n configurable: false,\n enumerable: true,\n value: CLOSED,\n writable: false\n }\n}\n\nObject.defineProperties(EventSource, constantsPropertyDescriptors)\nObject.defineProperties(EventSource.prototype, constantsPropertyDescriptors)\n\nObject.defineProperties(EventSource.prototype, {\n close: kEnumerableProperty,\n onerror: kEnumerableProperty,\n onmessage: kEnumerableProperty,\n onopen: kEnumerableProperty,\n readyState: kEnumerableProperty,\n url: kEnumerableProperty,\n withCredentials: kEnumerableProperty\n})\n\nwebidl.converters.EventSourceInitDict = webidl.dictionaryConverter([\n {\n key: 'withCredentials',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'dispatcher', // undici only\n converter: webidl.converters.any\n },\n {\n key: 'node', // undici only\n converter: webidl.dictionaryConverter([\n {\n key: 'reconnectionTime',\n converter: webidl.converters['unsigned long'],\n defaultValue: () => defaultReconnectionTime\n },\n {\n key: 'dispatcher',\n converter: webidl.converters.any\n }\n ]),\n defaultValue: () => ({})\n }\n])\n\nmodule.exports = {\n EventSource,\n defaultReconnectionTime\n}\n","'use strict'\n\n/**\n * Checks if the given value is a valid LastEventId.\n * @param {string} value\n * @returns {boolean}\n */\nfunction isValidLastEventId (value) {\n // LastEventId should not contain U+0000 NULL\n return value.indexOf('\\u0000') === -1\n}\n\n/**\n * Checks if the given value is a base 10 digit.\n * @param {string} value\n * @returns {boolean}\n */\nfunction isASCIINumber (value) {\n if (value.length === 0) return false\n for (let i = 0; i < value.length; i++) {\n if (value.charCodeAt(i) < 0x30 || value.charCodeAt(i) > 0x39) return false\n }\n return true\n}\n\nmodule.exports = {\n isValidLastEventId,\n isASCIINumber\n}\n","'use strict'\n\nconst util = require('../../core/util')\nconst {\n ReadableStreamFrom,\n readableStreamClose,\n fullyReadBody,\n extractMimeType\n} = require('./util')\nconst { FormData, setFormDataState } = require('./formdata')\nconst { webidl } = require('../webidl')\nconst assert = require('node:assert')\nconst { isErrored, isDisturbed } = require('node:stream')\nconst { isUint8Array } = require('node:util/types')\nconst { serializeAMimeType } = require('./data-url')\nconst { multipartFormDataParser } = require('./formdata-parser')\nconst { createDeferredPromise } = require('../../util/promise')\nconst { parseJSONFromBytes } = require('../infra')\nconst { utf8DecodeBytes } = require('../../encoding')\nconst { runtimeFeatures } = require('../../util/runtime-features.js')\n\nconst random = runtimeFeatures.has('crypto')\n ? require('node:crypto').randomInt\n : (max) => Math.floor(Math.random() * max)\n\nconst textEncoder = new TextEncoder()\nfunction noop () {}\n\nconst streamRegistry = new FinalizationRegistry((weakRef) => {\n const stream = weakRef.deref()\n if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) {\n stream.cancel('Response object has been garbage collected').catch(noop)\n }\n})\n\n/**\n * Extract a body with type from a byte sequence or BodyInit object\n *\n * @param {import('../../../types').BodyInit} object - The BodyInit object to extract from\n * @param {boolean} [keepalive=false] - If true, indicates that the body\n * @returns {[{stream: ReadableStream, source: any, length: number | null}, string | null]} - Returns a tuple containing the body and its type\n *\n * @see https://fetch.spec.whatwg.org/#concept-bodyinit-extract\n */\nfunction extractBody (object, keepalive = false) {\n // 1. Let stream be null.\n let stream = null\n let controller = null\n\n // 2. If object is a ReadableStream object, then set stream to object.\n if (webidl.is.ReadableStream(object)) {\n stream = object\n } else if (webidl.is.Blob(object)) {\n // 3. Otherwise, if object is a Blob object, set stream to the\n // result of running object’s get stream.\n stream = object.stream()\n } else {\n // 4. Otherwise, set stream to a new ReadableStream object, and set\n // up stream with byte reading support.\n stream = new ReadableStream({\n pull () {},\n start (c) {\n controller = c\n },\n cancel () {},\n type: 'bytes'\n })\n }\n\n // 5. Assert: stream is a ReadableStream object.\n assert(webidl.is.ReadableStream(stream))\n\n // 6. Let action be null.\n let action = null\n\n // 7. Let source be null.\n let source = null\n\n // 8. Let length be null.\n let length = null\n\n // 9. Let type be null.\n let type = null\n\n // 10. Switch on object:\n if (typeof object === 'string') {\n // Set source to the UTF-8 encoding of object.\n // Note: setting source to a Uint8Array here breaks some mocking assumptions.\n source = object\n\n // Set type to `text/plain;charset=UTF-8`.\n type = 'text/plain;charset=UTF-8'\n } else if (webidl.is.URLSearchParams(object)) {\n // URLSearchParams\n\n // spec says to run application/x-www-form-urlencoded on body.list\n // this is implemented in Node.js as apart of an URLSearchParams instance toString method\n // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490\n // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100\n\n // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list.\n source = object.toString()\n\n // Set type to `application/x-www-form-urlencoded;charset=UTF-8`.\n type = 'application/x-www-form-urlencoded;charset=UTF-8'\n } else if (webidl.is.BufferSource(object)) {\n // Set source to a copy of the bytes held by object.\n source = webidl.util.getCopyOfBytesHeldByBufferSource(object)\n } else if (webidl.is.FormData(object)) {\n const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`\n const prefix = `--${boundary}\\r\\nContent-Disposition: form-data`\n\n /*! formdata-polyfill. MIT License. Jimmy Wärting */\n const formdataEscape = (str) =>\n str.replace(/\\n/g, '%0A').replace(/\\r/g, '%0D').replace(/\"/g, '%22')\n const normalizeLinefeeds = (value) => value.replace(/\\r?\\n|\\r/g, '\\r\\n')\n\n // Set action to this step: run the multipart/form-data\n // encoding algorithm, with object’s entry list and UTF-8.\n // - This ensures that the body is immutable and can't be changed afterwords\n // - That the content-length is calculated in advance.\n // - And that all parts are pre-encoded and ready to be sent.\n\n const blobParts = []\n const rn = new Uint8Array([13, 10]) // '\\r\\n'\n length = 0\n let hasUnknownSizeValue = false\n\n for (const [name, value] of object) {\n if (typeof value === 'string') {\n const chunk = textEncoder.encode(prefix +\n `; name=\"${formdataEscape(normalizeLinefeeds(name))}\"` +\n `\\r\\n\\r\\n${normalizeLinefeeds(value)}\\r\\n`)\n blobParts.push(chunk)\n length += chunk.byteLength\n } else {\n const chunk = textEncoder.encode(`${prefix}; name=\"${formdataEscape(normalizeLinefeeds(name))}\"` +\n (value.name ? `; filename=\"${formdataEscape(value.name)}\"` : '') + '\\r\\n' +\n `Content-Type: ${\n value.type || 'application/octet-stream'\n }\\r\\n\\r\\n`)\n blobParts.push(chunk, value, rn)\n if (typeof value.size === 'number') {\n length += chunk.byteLength + value.size + rn.byteLength\n } else {\n hasUnknownSizeValue = true\n }\n }\n }\n\n // CRLF is appended to the body to function with legacy servers and match other implementations.\n // https://github.com/curl/curl/blob/3434c6b46e682452973972e8313613dfa58cd690/lib/mime.c#L1029-L1030\n // https://github.com/form-data/form-data/issues/63\n const chunk = textEncoder.encode(`--${boundary}--\\r\\n`)\n blobParts.push(chunk)\n length += chunk.byteLength\n if (hasUnknownSizeValue) {\n length = null\n }\n\n // Set source to object.\n source = object\n\n action = async function * () {\n for (const part of blobParts) {\n if (part.stream) {\n yield * part.stream()\n } else {\n yield part\n }\n }\n }\n\n // Set type to `multipart/form-data; boundary=`,\n // followed by the multipart/form-data boundary string generated\n // by the multipart/form-data encoding algorithm.\n type = `multipart/form-data; boundary=${boundary}`\n } else if (webidl.is.Blob(object)) {\n // Blob\n\n // Set source to object.\n source = object\n\n // Set length to object’s size.\n length = object.size\n\n // If object’s type attribute is not the empty byte sequence, set\n // type to its value.\n if (object.type) {\n type = object.type\n }\n } else if (typeof object[Symbol.asyncIterator] === 'function') {\n // If keepalive is true, then throw a TypeError.\n if (keepalive) {\n throw new TypeError('keepalive')\n }\n\n // If object is disturbed or locked, then throw a TypeError.\n if (util.isDisturbed(object) || object.locked) {\n throw new TypeError(\n 'Response body object should not be disturbed or locked'\n )\n }\n\n stream =\n webidl.is.ReadableStream(object) ? object : ReadableStreamFrom(object)\n }\n\n // 11. If source is a byte sequence, then set action to a\n // step that returns source and length to source’s length.\n if (typeof source === 'string' || isUint8Array(source)) {\n action = () => {\n length = typeof source === 'string' ? Buffer.byteLength(source) : source.length\n return source\n }\n }\n\n // 12. If action is non-null, then run these steps in parallel:\n if (action != null) {\n ;(async () => {\n // 1. Run action.\n const result = action()\n\n // 2. Whenever one or more bytes are available and stream is not errored,\n // enqueue the result of creating a Uint8Array from the available bytes into stream.\n const iterator = result?.[Symbol.asyncIterator]?.()\n if (iterator) {\n for await (const bytes of iterator) {\n if (isErrored(stream)) break\n if (bytes.length) {\n controller.enqueue(new Uint8Array(bytes))\n }\n }\n } else if (result?.length && !isErrored(stream)) {\n controller.enqueue(typeof result === 'string' ? textEncoder.encode(result) : new Uint8Array(result))\n }\n\n // 3. When running action is done, close stream.\n queueMicrotask(() => readableStreamClose(controller))\n })()\n }\n\n // 13. Let body be a body whose stream is stream, source is source,\n // and length is length.\n const body = { stream, source, length }\n\n // 14. Return (body, type).\n return [body, type]\n}\n\n/**\n * @typedef {object} ExtractBodyResult\n * @property {ReadableStream>} stream - The ReadableStream containing the body data\n * @property {any} source - The original source of the body data\n * @property {number | null} length - The length of the body data, or null\n */\n\n/**\n * Safely extract a body with type from a byte sequence or BodyInit object.\n *\n * @param {import('../../../types').BodyInit} object - The BodyInit object to extract from\n * @param {boolean} [keepalive=false] - If true, indicates that the body\n * @returns {[ExtractBodyResult, string | null]} - Returns a tuple containing the body and its type\n *\n * @see https://fetch.spec.whatwg.org/#bodyinit-safely-extract\n */\nfunction safelyExtractBody (object, keepalive = false) {\n // To safely extract a body and a `Content-Type` value from\n // a byte sequence or BodyInit object object, run these steps:\n\n // 1. If object is a ReadableStream object, then:\n if (webidl.is.ReadableStream(object)) {\n // Assert: object is neither disturbed nor locked.\n assert(!util.isDisturbed(object), 'The body has already been consumed.')\n assert(!object.locked, 'The stream is locked.')\n }\n\n // 2. Return the results of extracting object.\n return extractBody(object, keepalive)\n}\n\nfunction cloneBody (body) {\n // To clone a body body, run these steps:\n\n // https://fetch.spec.whatwg.org/#concept-body-clone\n\n // 1. Let « out1, out2 » be the result of teeing body’s stream.\n const { 0: out1, 1: out2 } = body.stream.tee()\n\n // 2. Set body’s stream to out1.\n body.stream = out1\n\n // 3. Return a body whose stream is out2 and other members are copied from body.\n return {\n stream: out2,\n length: body.length,\n source: body.source\n }\n}\n\nfunction bodyMixinMethods (instance, getInternalState) {\n const methods = {\n blob () {\n // The blob() method steps are to return the result of\n // running consume body with this and the following step\n // given a byte sequence bytes: return a Blob whose\n // contents are bytes and whose type attribute is this’s\n // MIME type.\n return consumeBody(this, (bytes) => {\n let mimeType = bodyMimeType(getInternalState(this))\n\n if (mimeType === null) {\n mimeType = ''\n } else if (mimeType) {\n mimeType = serializeAMimeType(mimeType)\n }\n\n // Return a Blob whose contents are bytes and type attribute\n // is mimeType.\n return new Blob([bytes], { type: mimeType })\n }, instance, getInternalState)\n },\n\n arrayBuffer () {\n // The arrayBuffer() method steps are to return the result\n // of running consume body with this and the following step\n // given a byte sequence bytes: return a new ArrayBuffer\n // whose contents are bytes.\n return consumeBody(this, (bytes) => {\n return new Uint8Array(bytes).buffer\n }, instance, getInternalState)\n },\n\n text () {\n // The text() method steps are to return the result of running\n // consume body with this and UTF-8 decode.\n return consumeBody(this, utf8DecodeBytes, instance, getInternalState)\n },\n\n json () {\n // The json() method steps are to return the result of running\n // consume body with this and parse JSON from bytes.\n return consumeBody(this, parseJSONFromBytes, instance, getInternalState)\n },\n\n formData () {\n // The formData() method steps are to return the result of running\n // consume body with this and the following step given a byte sequence bytes:\n return consumeBody(this, (value) => {\n // 1. Let mimeType be the result of get the MIME type with this.\n const mimeType = bodyMimeType(getInternalState(this))\n\n // 2. If mimeType is non-null, then switch on mimeType’s essence and run\n // the corresponding steps:\n if (mimeType !== null) {\n switch (mimeType.essence) {\n case 'multipart/form-data': {\n // 1. ... [long step]\n // 2. If that fails for some reason, then throw a TypeError.\n const parsed = multipartFormDataParser(value, mimeType)\n\n // 3. Return a new FormData object, appending each entry,\n // resulting from the parsing operation, to its entry list.\n const fd = new FormData()\n setFormDataState(fd, parsed)\n\n return fd\n }\n case 'application/x-www-form-urlencoded': {\n // 1. Let entries be the result of parsing bytes.\n const entries = new URLSearchParams(value.toString())\n\n // 2. If entries is failure, then throw a TypeError.\n\n // 3. Return a new FormData object whose entry list is entries.\n const fd = new FormData()\n\n for (const [name, value] of entries) {\n fd.append(name, value)\n }\n\n return fd\n }\n }\n }\n\n // 3. Throw a TypeError.\n throw new TypeError(\n 'Content-Type was not one of \"multipart/form-data\" or \"application/x-www-form-urlencoded\".'\n )\n }, instance, getInternalState)\n },\n\n bytes () {\n // The bytes() method steps are to return the result of running consume body\n // with this and the following step given a byte sequence bytes: return the\n // result of creating a Uint8Array from bytes in this’s relevant realm.\n return consumeBody(this, (bytes) => {\n return new Uint8Array(bytes)\n }, instance, getInternalState)\n }\n }\n\n return methods\n}\n\nfunction mixinBody (prototype, getInternalState) {\n Object.assign(prototype.prototype, bodyMixinMethods(prototype, getInternalState))\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-body-consume-body\n * @param {any} object internal state\n * @param {(value: unknown) => unknown} convertBytesToJSValue\n * @param {any} instance\n * @param {(target: any) => any} getInternalState\n */\nfunction consumeBody (object, convertBytesToJSValue, instance, getInternalState) {\n try {\n webidl.brandCheck(object, instance)\n } catch (e) {\n return Promise.reject(e)\n }\n\n object = getInternalState(object)\n\n // 1. If object is unusable, then return a promise rejected\n // with a TypeError.\n if (bodyUnusable(object)) {\n return Promise.reject(new TypeError('Body is unusable: Body has already been read'))\n }\n\n // 2. Let promise be a new promise.\n const promise = createDeferredPromise()\n\n // 3. Let errorSteps given error be to reject promise with error.\n const errorSteps = promise.reject\n\n // 4. Let successSteps given a byte sequence data be to resolve\n // promise with the result of running convertBytesToJSValue\n // with data. If that threw an exception, then run errorSteps\n // with that exception.\n const successSteps = (data) => {\n try {\n promise.resolve(convertBytesToJSValue(data))\n } catch (e) {\n errorSteps(e)\n }\n }\n\n // 5. If object’s body is null, then run successSteps with an\n // empty byte sequence.\n if (object.body == null) {\n successSteps(Buffer.allocUnsafe(0))\n return promise.promise\n }\n\n // 6. Otherwise, fully read object’s body given successSteps,\n // errorSteps, and object’s relevant global object.\n fullyReadBody(object.body, successSteps, errorSteps)\n\n // 7. Return promise.\n return promise.promise\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#body-unusable\n * @param {any} object internal state\n */\nfunction bodyUnusable (object) {\n const body = object.body\n\n // An object including the Body interface mixin is\n // said to be unusable if its body is non-null and\n // its body’s stream is disturbed or locked.\n return body != null && (body.stream.locked || util.isDisturbed(body.stream))\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-body-mime-type\n * @param {any} requestOrResponse internal state\n */\nfunction bodyMimeType (requestOrResponse) {\n // 1. Let headers be null.\n // 2. If requestOrResponse is a Request object, then set headers to requestOrResponse’s request’s header list.\n // 3. Otherwise, set headers to requestOrResponse’s response’s header list.\n /** @type {import('./headers').HeadersList} */\n const headers = requestOrResponse.headersList\n\n // 4. Let mimeType be the result of extracting a MIME type from headers.\n const mimeType = extractMimeType(headers)\n\n // 5. If mimeType is failure, then return null.\n if (mimeType === 'failure') {\n return null\n }\n\n // 6. Return mimeType.\n return mimeType\n}\n\nmodule.exports = {\n extractBody,\n safelyExtractBody,\n cloneBody,\n mixinBody,\n streamRegistry,\n bodyUnusable\n}\n","'use strict'\n\nconst corsSafeListedMethods = /** @type {const} */ (['GET', 'HEAD', 'POST'])\nconst corsSafeListedMethodsSet = new Set(corsSafeListedMethods)\n\nconst nullBodyStatus = /** @type {const} */ ([101, 204, 205, 304])\n\nconst redirectStatus = /** @type {const} */ ([301, 302, 303, 307, 308])\nconst redirectStatusSet = new Set(redirectStatus)\n\n/**\n * @see https://fetch.spec.whatwg.org/#block-bad-port\n */\nconst badPorts = /** @type {const} */ ([\n '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79',\n '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137',\n '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532',\n '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723',\n '2049', '3659', '4045', '4190', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6679',\n '6697', '10080'\n])\nconst badPortsSet = new Set(badPorts)\n\n/**\n * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-header\n */\nconst referrerPolicyTokens = /** @type {const} */ ([\n 'no-referrer',\n 'no-referrer-when-downgrade',\n 'same-origin',\n 'origin',\n 'strict-origin',\n 'origin-when-cross-origin',\n 'strict-origin-when-cross-origin',\n 'unsafe-url'\n])\n\n/**\n * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies\n */\nconst referrerPolicy = /** @type {const} */ ([\n '',\n ...referrerPolicyTokens\n])\nconst referrerPolicyTokensSet = new Set(referrerPolicyTokens)\n\nconst requestRedirect = /** @type {const} */ (['follow', 'manual', 'error'])\n\nconst safeMethods = /** @type {const} */ (['GET', 'HEAD', 'OPTIONS', 'TRACE'])\nconst safeMethodsSet = new Set(safeMethods)\n\nconst requestMode = /** @type {const} */ (['navigate', 'same-origin', 'no-cors', 'cors'])\n\nconst requestCredentials = /** @type {const} */ (['omit', 'same-origin', 'include'])\n\nconst requestCache = /** @type {const} */ ([\n 'default',\n 'no-store',\n 'reload',\n 'no-cache',\n 'force-cache',\n 'only-if-cached'\n])\n\n/**\n * @see https://fetch.spec.whatwg.org/#request-body-header-name\n */\nconst requestBodyHeader = /** @type {const} */ ([\n 'content-encoding',\n 'content-language',\n 'content-location',\n 'content-type',\n // See https://github.com/nodejs/undici/issues/2021\n // 'Content-Length' is a forbidden header name, which is typically\n // removed in the Headers implementation. However, undici doesn't\n // filter out headers, so we add it here.\n 'content-length'\n])\n\n/**\n * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex\n */\nconst requestDuplex = /** @type {const} */ ([\n 'half'\n])\n\n/**\n * @see http://fetch.spec.whatwg.org/#forbidden-method\n */\nconst forbiddenMethods = /** @type {const} */ (['CONNECT', 'TRACE', 'TRACK'])\nconst forbiddenMethodsSet = new Set(forbiddenMethods)\n\nconst subresource = /** @type {const} */ ([\n 'audio',\n 'audioworklet',\n 'font',\n 'image',\n 'manifest',\n 'paintworklet',\n 'script',\n 'style',\n 'track',\n 'video',\n 'xslt',\n ''\n])\nconst subresourceSet = new Set(subresource)\n\nmodule.exports = {\n subresource,\n forbiddenMethods,\n requestBodyHeader,\n referrerPolicy,\n requestRedirect,\n requestMode,\n requestCredentials,\n requestCache,\n redirectStatus,\n corsSafeListedMethods,\n nullBodyStatus,\n safeMethods,\n badPorts,\n requestDuplex,\n subresourceSet,\n badPortsSet,\n redirectStatusSet,\n corsSafeListedMethodsSet,\n safeMethodsSet,\n forbiddenMethodsSet,\n referrerPolicyTokens: referrerPolicyTokensSet\n}\n","'use strict'\n\nconst assert = require('node:assert')\nconst { forgivingBase64, collectASequenceOfCodePoints, collectASequenceOfCodePointsFast, isomorphicDecode, removeASCIIWhitespace, removeChars } = require('../infra')\n\nconst encoder = new TextEncoder()\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#http-token-code-point\n */\nconst HTTP_TOKEN_CODEPOINTS = /^[-!#$%&'*+.^_|~A-Za-z0-9]+$/u\nconst HTTP_WHITESPACE_REGEX = /[\\u000A\\u000D\\u0009\\u0020]/u // eslint-disable-line\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point\n */\nconst HTTP_QUOTED_STRING_TOKENS = /^[\\u0009\\u0020-\\u007E\\u0080-\\u00FF]+$/u // eslint-disable-line\n\n// https://fetch.spec.whatwg.org/#data-url-processor\n/** @param {URL} dataURL */\nfunction dataURLProcessor (dataURL) {\n // 1. Assert: dataURL’s scheme is \"data\".\n assert(dataURL.protocol === 'data:')\n\n // 2. Let input be the result of running the URL\n // serializer on dataURL with exclude fragment\n // set to true.\n let input = URLSerializer(dataURL, true)\n\n // 3. Remove the leading \"data:\" string from input.\n input = input.slice(5)\n\n // 4. Let position point at the start of input.\n const position = { position: 0 }\n\n // 5. Let mimeType be the result of collecting a\n // sequence of code points that are not equal\n // to U+002C (,), given position.\n let mimeType = collectASequenceOfCodePointsFast(\n ',',\n input,\n position\n )\n\n // 6. Strip leading and trailing ASCII whitespace\n // from mimeType.\n // Undici implementation note: we need to store the\n // length because if the mimetype has spaces removed,\n // the wrong amount will be sliced from the input in\n // step #9\n const mimeTypeLength = mimeType.length\n mimeType = removeASCIIWhitespace(mimeType, true, true)\n\n // 7. If position is past the end of input, then\n // return failure\n if (position.position >= input.length) {\n return 'failure'\n }\n\n // 8. Advance position by 1.\n position.position++\n\n // 9. Let encodedBody be the remainder of input.\n const encodedBody = input.slice(mimeTypeLength + 1)\n\n // 10. Let body be the percent-decoding of encodedBody.\n let body = stringPercentDecode(encodedBody)\n\n // 11. If mimeType ends with U+003B (;), followed by\n // zero or more U+0020 SPACE, followed by an ASCII\n // case-insensitive match for \"base64\", then:\n if (/;(?:\\u0020*)base64$/ui.test(mimeType)) {\n // 1. Let stringBody be the isomorphic decode of body.\n const stringBody = isomorphicDecode(body)\n\n // 2. Set body to the forgiving-base64 decode of\n // stringBody.\n body = forgivingBase64(stringBody)\n\n // 3. If body is failure, then return failure.\n if (body === 'failure') {\n return 'failure'\n }\n\n // 4. Remove the last 6 code points from mimeType.\n mimeType = mimeType.slice(0, -6)\n\n // 5. Remove trailing U+0020 SPACE code points from mimeType,\n // if any.\n mimeType = mimeType.replace(/(\\u0020+)$/u, '')\n\n // 6. Remove the last U+003B (;) code point from mimeType.\n mimeType = mimeType.slice(0, -1)\n }\n\n // 12. If mimeType starts with U+003B (;), then prepend\n // \"text/plain\" to mimeType.\n if (mimeType.startsWith(';')) {\n mimeType = 'text/plain' + mimeType\n }\n\n // 13. Let mimeTypeRecord be the result of parsing\n // mimeType.\n let mimeTypeRecord = parseMIMEType(mimeType)\n\n // 14. If mimeTypeRecord is failure, then set\n // mimeTypeRecord to text/plain;charset=US-ASCII.\n if (mimeTypeRecord === 'failure') {\n mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII')\n }\n\n // 15. Return a new data: URL struct whose MIME\n // type is mimeTypeRecord and body is body.\n // https://fetch.spec.whatwg.org/#data-url-struct\n return { mimeType: mimeTypeRecord, body }\n}\n\n// https://url.spec.whatwg.org/#concept-url-serializer\n/**\n * @param {URL} url\n * @param {boolean} excludeFragment\n */\nfunction URLSerializer (url, excludeFragment = false) {\n if (!excludeFragment) {\n return url.href\n }\n\n const href = url.href\n const hashLength = url.hash.length\n\n const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength)\n\n if (!hashLength && href.endsWith('#')) {\n return serialized.slice(0, -1)\n }\n\n return serialized\n}\n\n// https://url.spec.whatwg.org/#string-percent-decode\n/** @param {string} input */\nfunction stringPercentDecode (input) {\n // 1. Let bytes be the UTF-8 encoding of input.\n const bytes = encoder.encode(input)\n\n // 2. Return the percent-decoding of bytes.\n return percentDecode(bytes)\n}\n\n/**\n * @param {number} byte\n */\nfunction isHexCharByte (byte) {\n // 0-9 A-F a-f\n return (byte >= 0x30 && byte <= 0x39) || (byte >= 0x41 && byte <= 0x46) || (byte >= 0x61 && byte <= 0x66)\n}\n\n/**\n * @param {number} byte\n */\nfunction hexByteToNumber (byte) {\n return (\n // 0-9\n byte >= 0x30 && byte <= 0x39\n ? (byte - 48)\n // Convert to uppercase\n // ((byte & 0xDF) - 65) + 10\n : ((byte & 0xDF) - 55)\n )\n}\n\n// https://url.spec.whatwg.org/#percent-decode\n/** @param {Uint8Array} input */\nfunction percentDecode (input) {\n const length = input.length\n // 1. Let output be an empty byte sequence.\n /** @type {Uint8Array} */\n const output = new Uint8Array(length)\n let j = 0\n let i = 0\n // 2. For each byte byte in input:\n while (i < length) {\n const byte = input[i]\n\n // 1. If byte is not 0x25 (%), then append byte to output.\n if (byte !== 0x25) {\n output[j++] = byte\n\n // 2. Otherwise, if byte is 0x25 (%) and the next two bytes\n // after byte in input are not in the ranges\n // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F),\n // and 0x61 (a) to 0x66 (f), all inclusive, append byte\n // to output.\n } else if (\n byte === 0x25 &&\n !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))\n ) {\n output[j++] = 0x25\n\n // 3. Otherwise:\n } else {\n // 1. Let bytePoint be the two bytes after byte in input,\n // decoded, and then interpreted as hexadecimal number.\n // 2. Append a byte whose value is bytePoint to output.\n output[j++] = (hexByteToNumber(input[i + 1]) << 4) | hexByteToNumber(input[i + 2])\n\n // 3. Skip the next two bytes in input.\n i += 2\n }\n ++i\n }\n\n // 3. Return output.\n return length === j ? output : output.subarray(0, j)\n}\n\n// https://mimesniff.spec.whatwg.org/#parse-a-mime-type\n/** @param {string} input */\nfunction parseMIMEType (input) {\n // 1. Remove any leading and trailing HTTP whitespace\n // from input.\n input = removeHTTPWhitespace(input, true, true)\n\n // 2. Let position be a position variable for input,\n // initially pointing at the start of input.\n const position = { position: 0 }\n\n // 3. Let type be the result of collecting a sequence\n // of code points that are not U+002F (/) from\n // input, given position.\n const type = collectASequenceOfCodePointsFast(\n '/',\n input,\n position\n )\n\n // 4. If type is the empty string or does not solely\n // contain HTTP token code points, then return failure.\n // https://mimesniff.spec.whatwg.org/#http-token-code-point\n if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) {\n return 'failure'\n }\n\n // 5. If position is past the end of input, then return\n // failure\n if (position.position >= input.length) {\n return 'failure'\n }\n\n // 6. Advance position by 1. (This skips past U+002F (/).)\n position.position++\n\n // 7. Let subtype be the result of collecting a sequence of\n // code points that are not U+003B (;) from input, given\n // position.\n let subtype = collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 8. Remove any trailing HTTP whitespace from subtype.\n subtype = removeHTTPWhitespace(subtype, false, true)\n\n // 9. If subtype is the empty string or does not solely\n // contain HTTP token code points, then return failure.\n if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) {\n return 'failure'\n }\n\n const typeLowercase = type.toLowerCase()\n const subtypeLowercase = subtype.toLowerCase()\n\n // 10. Let mimeType be a new MIME type record whose type\n // is type, in ASCII lowercase, and subtype is subtype,\n // in ASCII lowercase.\n // https://mimesniff.spec.whatwg.org/#mime-type\n const mimeType = {\n type: typeLowercase,\n subtype: subtypeLowercase,\n /** @type {Map} */\n parameters: new Map(),\n // https://mimesniff.spec.whatwg.org/#mime-type-essence\n essence: `${typeLowercase}/${subtypeLowercase}`\n }\n\n // 11. While position is not past the end of input:\n while (position.position < input.length) {\n // 1. Advance position by 1. (This skips past U+003B (;).)\n position.position++\n\n // 2. Collect a sequence of code points that are HTTP\n // whitespace from input given position.\n collectASequenceOfCodePoints(\n // https://fetch.spec.whatwg.org/#http-whitespace\n char => HTTP_WHITESPACE_REGEX.test(char),\n input,\n position\n )\n\n // 3. Let parameterName be the result of collecting a\n // sequence of code points that are not U+003B (;)\n // or U+003D (=) from input, given position.\n let parameterName = collectASequenceOfCodePoints(\n (char) => char !== ';' && char !== '=',\n input,\n position\n )\n\n // 4. Set parameterName to parameterName, in ASCII\n // lowercase.\n parameterName = parameterName.toLowerCase()\n\n // 5. If position is not past the end of input, then:\n if (position.position < input.length) {\n // 1. If the code point at position within input is\n // U+003B (;), then continue.\n if (input[position.position] === ';') {\n continue\n }\n\n // 2. Advance position by 1. (This skips past U+003D (=).)\n position.position++\n }\n\n // 6. If position is past the end of input, then break.\n if (position.position >= input.length) {\n break\n }\n\n // 7. Let parameterValue be null.\n let parameterValue = null\n\n // 8. If the code point at position within input is\n // U+0022 (\"), then:\n if (input[position.position] === '\"') {\n // 1. Set parameterValue to the result of collecting\n // an HTTP quoted string from input, given position\n // and the extract-value flag.\n parameterValue = collectAnHTTPQuotedString(input, position, true)\n\n // 2. Collect a sequence of code points that are not\n // U+003B (;) from input, given position.\n collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 9. Otherwise:\n } else {\n // 1. Set parameterValue to the result of collecting\n // a sequence of code points that are not U+003B (;)\n // from input, given position.\n parameterValue = collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 2. Remove any trailing HTTP whitespace from parameterValue.\n parameterValue = removeHTTPWhitespace(parameterValue, false, true)\n\n // 3. If parameterValue is the empty string, then continue.\n if (parameterValue.length === 0) {\n continue\n }\n }\n\n // 10. If all of the following are true\n // - parameterName is not the empty string\n // - parameterName solely contains HTTP token code points\n // - parameterValue solely contains HTTP quoted-string token code points\n // - mimeType’s parameters[parameterName] does not exist\n // then set mimeType’s parameters[parameterName] to parameterValue.\n if (\n parameterName.length !== 0 &&\n HTTP_TOKEN_CODEPOINTS.test(parameterName) &&\n (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) &&\n !mimeType.parameters.has(parameterName)\n ) {\n mimeType.parameters.set(parameterName, parameterValue)\n }\n }\n\n // 12. Return mimeType.\n return mimeType\n}\n\n// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string\n// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string\n/**\n * @param {string} input\n * @param {{ position: number }} position\n * @param {boolean} [extractValue=false]\n */\nfunction collectAnHTTPQuotedString (input, position, extractValue = false) {\n // 1. Let positionStart be position.\n const positionStart = position.position\n\n // 2. Let value be the empty string.\n let value = ''\n\n // 3. Assert: the code point at position within input\n // is U+0022 (\").\n assert(input[position.position] === '\"')\n\n // 4. Advance position by 1.\n position.position++\n\n // 5. While true:\n while (true) {\n // 1. Append the result of collecting a sequence of code points\n // that are not U+0022 (\") or U+005C (\\) from input, given\n // position, to value.\n value += collectASequenceOfCodePoints(\n (char) => char !== '\"' && char !== '\\\\',\n input,\n position\n )\n\n // 2. If position is past the end of input, then break.\n if (position.position >= input.length) {\n break\n }\n\n // 3. Let quoteOrBackslash be the code point at position within\n // input.\n const quoteOrBackslash = input[position.position]\n\n // 4. Advance position by 1.\n position.position++\n\n // 5. If quoteOrBackslash is U+005C (\\), then:\n if (quoteOrBackslash === '\\\\') {\n // 1. If position is past the end of input, then append\n // U+005C (\\) to value and break.\n if (position.position >= input.length) {\n value += '\\\\'\n break\n }\n\n // 2. Append the code point at position within input to value.\n value += input[position.position]\n\n // 3. Advance position by 1.\n position.position++\n\n // 6. Otherwise:\n } else {\n // 1. Assert: quoteOrBackslash is U+0022 (\").\n assert(quoteOrBackslash === '\"')\n\n // 2. Break.\n break\n }\n }\n\n // 6. If the extract-value flag is set, then return value.\n if (extractValue) {\n return value\n }\n\n // 7. Return the code points from positionStart to position,\n // inclusive, within input.\n return input.slice(positionStart, position.position)\n}\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type\n */\nfunction serializeAMimeType (mimeType) {\n assert(mimeType !== 'failure')\n const { parameters, essence } = mimeType\n\n // 1. Let serialization be the concatenation of mimeType’s\n // type, U+002F (/), and mimeType’s subtype.\n let serialization = essence\n\n // 2. For each name → value of mimeType’s parameters:\n for (let [name, value] of parameters.entries()) {\n // 1. Append U+003B (;) to serialization.\n serialization += ';'\n\n // 2. Append name to serialization.\n serialization += name\n\n // 3. Append U+003D (=) to serialization.\n serialization += '='\n\n // 4. If value does not solely contain HTTP token code\n // points or value is the empty string, then:\n if (!HTTP_TOKEN_CODEPOINTS.test(value)) {\n // 1. Precede each occurrence of U+0022 (\") or\n // U+005C (\\) in value with U+005C (\\).\n value = value.replace(/[\\\\\"]/ug, '\\\\$&')\n\n // 2. Prepend U+0022 (\") to value.\n value = '\"' + value\n\n // 3. Append U+0022 (\") to value.\n value += '\"'\n }\n\n // 5. Append value to serialization.\n serialization += value\n }\n\n // 3. Return serialization.\n return serialization\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-whitespace\n * @param {number} char\n */\nfunction isHTTPWhiteSpace (char) {\n // \"\\r\\n\\t \"\n return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x020\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-whitespace\n * @param {string} str\n * @param {boolean} [leading=true]\n * @param {boolean} [trailing=true]\n */\nfunction removeHTTPWhitespace (str, leading = true, trailing = true) {\n return removeChars(str, leading, trailing, isHTTPWhiteSpace)\n}\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type\n * @param {Exclude, 'failure'>} mimeType\n */\nfunction minimizeSupportedMimeType (mimeType) {\n switch (mimeType.essence) {\n case 'application/ecmascript':\n case 'application/javascript':\n case 'application/x-ecmascript':\n case 'application/x-javascript':\n case 'text/ecmascript':\n case 'text/javascript':\n case 'text/javascript1.0':\n case 'text/javascript1.1':\n case 'text/javascript1.2':\n case 'text/javascript1.3':\n case 'text/javascript1.4':\n case 'text/javascript1.5':\n case 'text/jscript':\n case 'text/livescript':\n case 'text/x-ecmascript':\n case 'text/x-javascript':\n // 1. If mimeType is a JavaScript MIME type, then return \"text/javascript\".\n return 'text/javascript'\n case 'application/json':\n case 'text/json':\n // 2. If mimeType is a JSON MIME type, then return \"application/json\".\n return 'application/json'\n case 'image/svg+xml':\n // 3. If mimeType’s essence is \"image/svg+xml\", then return \"image/svg+xml\".\n return 'image/svg+xml'\n case 'text/xml':\n case 'application/xml':\n // 4. If mimeType is an XML MIME type, then return \"application/xml\".\n return 'application/xml'\n }\n\n // 2. If mimeType is a JSON MIME type, then return \"application/json\".\n if (mimeType.subtype.endsWith('+json')) {\n return 'application/json'\n }\n\n // 4. If mimeType is an XML MIME type, then return \"application/xml\".\n if (mimeType.subtype.endsWith('+xml')) {\n return 'application/xml'\n }\n\n // 5. If mimeType is supported by the user agent, then return mimeType’s essence.\n // Technically, node doesn't support any mimetypes.\n\n // 6. Return the empty string.\n return ''\n}\n\nmodule.exports = {\n dataURLProcessor,\n URLSerializer,\n stringPercentDecode,\n parseMIMEType,\n collectAnHTTPQuotedString,\n serializeAMimeType,\n removeHTTPWhitespace,\n minimizeSupportedMimeType,\n HTTP_TOKEN_CODEPOINTS\n}\n","'use strict'\n\nconst { bufferToLowerCasedHeaderName } = require('../../core/util')\nconst { HTTP_TOKEN_CODEPOINTS } = require('./data-url')\nconst { makeEntry } = require('./formdata')\nconst { webidl } = require('../webidl')\nconst assert = require('node:assert')\nconst { isomorphicDecode } = require('../infra')\n\nconst dd = Buffer.from('--')\nconst decoder = new TextDecoder()\nconst decoderIgnoreBOM = new TextDecoder('utf-8', { ignoreBOM: true })\n\n/**\n * @param {string} chars\n */\nfunction isAsciiString (chars) {\n for (let i = 0; i < chars.length; ++i) {\n if ((chars.charCodeAt(i) & ~0x7F) !== 0) {\n return false\n }\n }\n return true\n}\n\n/**\n * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary\n * @param {string} boundary\n */\nfunction validateBoundary (boundary) {\n const length = boundary.length\n\n // - its length is greater or equal to 27 and lesser or equal to 70, and\n if (length < 27 || length > 70) {\n return false\n }\n\n // - it is composed by bytes in the ranges 0x30 to 0x39, 0x41 to 0x5A, or\n // 0x61 to 0x7A, inclusive (ASCII alphanumeric), or which are 0x27 ('),\n // 0x2D (-) or 0x5F (_).\n for (let i = 0; i < length; ++i) {\n const cp = boundary.charCodeAt(i)\n\n if (!(\n (cp >= 0x30 && cp <= 0x39) ||\n (cp >= 0x41 && cp <= 0x5a) ||\n (cp >= 0x61 && cp <= 0x7a) ||\n cp === 0x27 ||\n cp === 0x2d ||\n cp === 0x5f\n )) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser\n * @param {Buffer} input\n * @param {ReturnType} mimeType\n */\nfunction multipartFormDataParser (input, mimeType) {\n // 1. Assert: mimeType’s essence is \"multipart/form-data\".\n assert(mimeType !== 'failure' && mimeType.essence === 'multipart/form-data')\n\n const boundaryString = mimeType.parameters.get('boundary')\n\n // 2. If mimeType’s parameters[\"boundary\"] does not exist, return failure.\n // Otherwise, let boundary be the result of UTF-8 decoding mimeType’s\n // parameters[\"boundary\"].\n if (boundaryString === undefined) {\n throw parsingError('missing boundary in content-type header')\n }\n\n const boundary = Buffer.from(`--${boundaryString}`, 'utf8')\n\n // 3. Let entry list be an empty entry list.\n const entryList = []\n\n // 4. Let position be a pointer to a byte in input, initially pointing at\n // the first byte.\n const position = { position: 0 }\n\n // Note: Per RFC 2046 Section 5.1.1, we must ignore anything before the\n // first boundary delimiter line (preamble). Search for the first boundary.\n const firstBoundaryIndex = input.indexOf(boundary)\n\n if (firstBoundaryIndex === -1) {\n throw parsingError('no boundary found in multipart body')\n }\n\n // Start parsing from the first boundary, ignoring any preamble\n position.position = firstBoundaryIndex\n\n // 5. While true:\n while (true) {\n // 5.1. If position points to a sequence of bytes starting with 0x2D 0x2D\n // (`--`) followed by boundary, advance position by 2 + the length of\n // boundary. Otherwise, return failure.\n // Note: boundary is padded with 2 dashes already, no need to add 2.\n if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) {\n position.position += boundary.length\n } else {\n throw parsingError('expected a value starting with -- and the boundary')\n }\n\n // 5.2. If position points to the sequence of bytes 0x2D 0x2D 0x0D 0x0A\n // (`--` followed by CR LF) followed by the end of input, return entry list.\n // Note: Per RFC 2046 Section 5.1.1, we must ignore anything after the\n // final boundary delimiter (epilogue). Check for -- or --CRLF and return\n // regardless of what follows.\n if (bufferStartsWith(input, dd, position)) {\n // Found closing boundary delimiter (--), ignore any epilogue\n return entryList\n }\n\n // 5.3. If position does not point to a sequence of bytes starting with 0x0D\n // 0x0A (CR LF), return failure.\n if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) {\n throw parsingError('expected CRLF')\n }\n\n // 5.4. Advance position by 2. (This skips past the newline.)\n position.position += 2\n\n // 5.5. Let name, filename and contentType be the result of parsing\n // multipart/form-data headers on input and position, if the result\n // is not failure. Otherwise, return failure.\n const result = parseMultipartFormDataHeaders(input, position)\n\n let { name, filename, contentType, encoding } = result\n\n // 5.6. Advance position by 2. (This skips past the empty line that marks\n // the end of the headers.)\n position.position += 2\n\n // 5.7. Let body be the empty byte sequence.\n let body\n\n // 5.8. Body loop: While position is not past the end of input:\n // TODO: the steps here are completely wrong\n {\n const boundaryIndex = input.indexOf(boundary.subarray(2), position.position)\n\n if (boundaryIndex === -1) {\n throw parsingError('expected boundary after body')\n }\n\n body = input.subarray(position.position, boundaryIndex - 4)\n\n position.position += body.length\n\n // Note: position must be advanced by the body's length before being\n // decoded, otherwise the parsing will fail.\n if (encoding === 'base64') {\n body = Buffer.from(body.toString(), 'base64')\n }\n }\n\n // 5.9. If position does not point to a sequence of bytes starting with\n // 0x0D 0x0A (CR LF), return failure. Otherwise, advance position by 2.\n if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) {\n throw parsingError('expected CRLF')\n } else {\n position.position += 2\n }\n\n // 5.10. If filename is not null:\n let value\n\n if (filename !== null) {\n // 5.10.1. If contentType is null, set contentType to \"text/plain\".\n contentType ??= 'text/plain'\n\n // 5.10.2. If contentType is not an ASCII string, set contentType to the empty string.\n\n // Note: `buffer.isAscii` can be used at zero-cost, but converting a string to a buffer is a high overhead.\n // Content-Type is a relatively small string, so it is faster to use `String#charCodeAt`.\n if (!isAsciiString(contentType)) {\n contentType = ''\n }\n\n // 5.10.3. Let value be a new File object with name filename, type contentType, and body body.\n value = new File([body], filename, { type: contentType })\n } else {\n // 5.11. Otherwise:\n\n // 5.11.1. Let value be the UTF-8 decoding without BOM of body.\n value = decoderIgnoreBOM.decode(Buffer.from(body))\n }\n\n // 5.12. Assert: name is a scalar value string and value is either a scalar value string or a File object.\n assert(webidl.is.USVString(name))\n assert((typeof value === 'string' && webidl.is.USVString(value)) || webidl.is.File(value))\n\n // 5.13. Create an entry with name and value, and append it to entry list.\n entryList.push(makeEntry(name, value, filename))\n }\n}\n\n/**\n * Parses content-disposition attributes (e.g., name=\"value\" or filename*=utf-8''encoded)\n * @param {Buffer} input\n * @param {{ position: number }} position\n * @returns {{ name: string, value: string }}\n */\nfunction parseContentDispositionAttribute (input, position) {\n // Skip leading semicolon and whitespace\n if (input[position.position] === 0x3b /* ; */) {\n position.position++\n }\n\n // Skip whitespace\n collectASequenceOfBytes(\n (char) => char === 0x20 || char === 0x09,\n input,\n position\n )\n\n // Collect attribute name (token characters)\n const attributeName = collectASequenceOfBytes(\n (char) => isToken(char) && char !== 0x3d && char !== 0x2a, // not = or *\n input,\n position\n )\n\n if (attributeName.length === 0) {\n return null\n }\n\n const attrNameStr = attributeName.toString('ascii').toLowerCase()\n\n // Check for extended notation (attribute*)\n const isExtended = input[position.position] === 0x2a /* * */\n if (isExtended) {\n position.position++ // skip *\n }\n\n // Expect = sign\n if (input[position.position] !== 0x3d /* = */) {\n return null\n }\n position.position++ // skip =\n\n // Skip whitespace\n collectASequenceOfBytes(\n (char) => char === 0x20 || char === 0x09,\n input,\n position\n )\n\n let value\n\n if (isExtended) {\n // Extended attribute format: charset'language'encoded-value\n const headerValue = collectASequenceOfBytes(\n (char) => char !== 0x20 && char !== 0x0d && char !== 0x0a && char !== 0x3b, // not space, CRLF, or ;\n input,\n position\n )\n\n // Check for utf-8'' prefix (case insensitive)\n if (\n (headerValue[0] !== 0x75 && headerValue[0] !== 0x55) || // u or U\n (headerValue[1] !== 0x74 && headerValue[1] !== 0x54) || // t or T\n (headerValue[2] !== 0x66 && headerValue[2] !== 0x46) || // f or F\n headerValue[3] !== 0x2d || // -\n headerValue[4] !== 0x38 // 8\n ) {\n throw parsingError('unknown encoding, expected utf-8\\'\\'')\n }\n\n // Skip utf-8'' and decode the rest\n value = decodeURIComponent(decoder.decode(headerValue.subarray(7)))\n } else if (input[position.position] === 0x22 /* \" */) {\n // Quoted string\n position.position++ // skip opening quote\n\n const quotedValue = collectASequenceOfBytes(\n (char) => char !== 0x0a && char !== 0x0d && char !== 0x22, // not LF, CR, or \"\n input,\n position\n )\n\n if (input[position.position] !== 0x22) {\n throw parsingError('Closing quote not found')\n }\n position.position++ // skip closing quote\n\n value = decoder.decode(quotedValue)\n .replace(/%0A/ig, '\\n')\n .replace(/%0D/ig, '\\r')\n .replace(/%22/g, '\"')\n } else {\n // Token value (no quotes)\n const tokenValue = collectASequenceOfBytes(\n (char) => isToken(char) && char !== 0x3b, // not ;\n input,\n position\n )\n\n value = decoder.decode(tokenValue)\n }\n\n return { name: attrNameStr, value }\n}\n\n/**\n * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers\n * @param {Buffer} input\n * @param {{ position: number }} position\n */\nfunction parseMultipartFormDataHeaders (input, position) {\n // 1. Let name, filename and contentType be null.\n let name = null\n let filename = null\n let contentType = null\n let encoding = null\n\n // 2. While true:\n while (true) {\n // 2.1. If position points to a sequence of bytes starting with 0x0D 0x0A (CR LF):\n if (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) {\n // 2.1.1. If name is null, return failure.\n if (name === null) {\n throw parsingError('header name is null')\n }\n\n // 2.1.2. Return name, filename and contentType.\n return { name, filename, contentType, encoding }\n }\n\n // 2.2. Let header name be the result of collecting a sequence of bytes that are\n // not 0x0A (LF), 0x0D (CR) or 0x3A (:), given position.\n let headerName = collectASequenceOfBytes(\n (char) => char !== 0x0a && char !== 0x0d && char !== 0x3a,\n input,\n position\n )\n\n // 2.3. Remove any HTTP tab or space bytes from the start or end of header name.\n headerName = removeChars(headerName, true, true, (char) => char === 0x9 || char === 0x20)\n\n // 2.4. If header name does not match the field-name token production, return failure.\n if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) {\n throw parsingError('header name does not match the field-name token production')\n }\n\n // 2.5. If the byte at position is not 0x3A (:), return failure.\n if (input[position.position] !== 0x3a) {\n throw parsingError('expected :')\n }\n\n // 2.6. Advance position by 1.\n position.position++\n\n // 2.7. Collect a sequence of bytes that are HTTP tab or space bytes given position.\n // (Do nothing with those bytes.)\n collectASequenceOfBytes(\n (char) => char === 0x20 || char === 0x09,\n input,\n position\n )\n\n // 2.8. Byte-lowercase header name and switch on the result:\n switch (bufferToLowerCasedHeaderName(headerName)) {\n case 'content-disposition': {\n name = filename = null\n\n // Collect the disposition type (should be \"form-data\")\n const dispositionType = collectASequenceOfBytes(\n (char) => isToken(char),\n input,\n position\n )\n\n if (dispositionType.toString('ascii').toLowerCase() !== 'form-data') {\n throw parsingError('expected form-data for content-disposition header')\n }\n\n // Parse attributes recursively until CRLF\n while (\n position.position < input.length &&\n input[position.position] !== 0x0d &&\n input[position.position + 1] !== 0x0a\n ) {\n const attribute = parseContentDispositionAttribute(input, position)\n\n if (!attribute) {\n break\n }\n\n if (attribute.name === 'name') {\n name = attribute.value\n } else if (attribute.name === 'filename') {\n filename = attribute.value\n }\n }\n\n if (name === null) {\n throw parsingError('name attribute is required in content-disposition header')\n }\n\n break\n }\n case 'content-type': {\n // 1. Let header value be the result of collecting a sequence of bytes that are\n // not 0x0A (LF) or 0x0D (CR), given position.\n let headerValue = collectASequenceOfBytes(\n (char) => char !== 0x0a && char !== 0x0d,\n input,\n position\n )\n\n // 2. Remove any HTTP tab or space bytes from the end of header value.\n headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20)\n\n // 3. Set contentType to the isomorphic decoding of header value.\n contentType = isomorphicDecode(headerValue)\n\n break\n }\n case 'content-transfer-encoding': {\n let headerValue = collectASequenceOfBytes(\n (char) => char !== 0x0a && char !== 0x0d,\n input,\n position\n )\n\n headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20)\n\n encoding = isomorphicDecode(headerValue)\n\n break\n }\n default: {\n // Collect a sequence of bytes that are not 0x0A (LF) or 0x0D (CR), given position.\n // (Do nothing with those bytes.)\n collectASequenceOfBytes(\n (char) => char !== 0x0a && char !== 0x0d,\n input,\n position\n )\n }\n }\n\n // 2.9. If position does not point to a sequence of bytes starting with 0x0D 0x0A\n // (CR LF), return failure. Otherwise, advance position by 2 (past the newline).\n if (input[position.position] !== 0x0d && input[position.position + 1] !== 0x0a) {\n throw parsingError('expected CRLF')\n } else {\n position.position += 2\n }\n }\n}\n\n/**\n * @param {(char: number) => boolean} condition\n * @param {Buffer} input\n * @param {{ position: number }} position\n */\nfunction collectASequenceOfBytes (condition, input, position) {\n let start = position.position\n\n while (start < input.length && condition(input[start])) {\n ++start\n }\n\n return input.subarray(position.position, (position.position = start))\n}\n\n/**\n * @param {Buffer} buf\n * @param {boolean} leading\n * @param {boolean} trailing\n * @param {(charCode: number) => boolean} predicate\n * @returns {Buffer}\n */\nfunction removeChars (buf, leading, trailing, predicate) {\n let lead = 0\n let trail = buf.length - 1\n\n if (leading) {\n while (lead < buf.length && predicate(buf[lead])) lead++\n }\n\n if (trailing) {\n while (trail > 0 && predicate(buf[trail])) trail--\n }\n\n return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1)\n}\n\n/**\n * Checks if {@param buffer} starts with {@param start}\n * @param {Buffer} buffer\n * @param {Buffer} start\n * @param {{ position: number }} position\n */\nfunction bufferStartsWith (buffer, start, position) {\n if (buffer.length < start.length) {\n return false\n }\n\n for (let i = 0; i < start.length; i++) {\n if (start[i] !== buffer[position.position + i]) {\n return false\n }\n }\n\n return true\n}\n\nfunction parsingError (cause) {\n return new TypeError('Failed to parse body as FormData.', { cause: new TypeError(cause) })\n}\n\n/**\n * CTL = \n * @param {number} char\n */\nfunction isCTL (char) {\n return char <= 0x1f || char === 0x7f\n}\n\n/**\n * tspecials := \"(\" / \")\" / \"<\" / \">\" / \"@\" /\n * \",\" / \";\" / \":\" / \"\\\" / <\">\n * \"/\" / \"[\" / \"]\" / \"?\" / \"=\"\n * ; Must be in quoted-string,\n * ; to use within parameter values\n * @param {number} char\n */\nfunction isTSpecial (char) {\n return (\n char === 0x28 || // (\n char === 0x29 || // )\n char === 0x3c || // <\n char === 0x3e || // >\n char === 0x40 || // @\n char === 0x2c || // ,\n char === 0x3b || // ;\n char === 0x3a || // :\n char === 0x5c || // \\\n char === 0x22 || // \"\n char === 0x2f || // /\n char === 0x5b || // [\n char === 0x5d || // ]\n char === 0x3f || // ?\n char === 0x3d // +\n )\n}\n\n/**\n * token := 1*\n * @param {number} char\n */\nfunction isToken (char) {\n return (\n char <= 0x7f && // ascii\n char !== 0x20 && // space\n char !== 0x09 &&\n !isCTL(char) &&\n !isTSpecial(char)\n )\n}\n\nmodule.exports = {\n multipartFormDataParser,\n validateBoundary\n}\n","'use strict'\n\nconst { iteratorMixin } = require('./util')\nconst { kEnumerableProperty } = require('../../core/util')\nconst { webidl } = require('../webidl')\nconst nodeUtil = require('node:util')\n\n// https://xhr.spec.whatwg.org/#formdata\nclass FormData {\n #state = []\n\n constructor (form = undefined) {\n webidl.util.markAsUncloneable(this)\n\n if (form !== undefined) {\n throw webidl.errors.conversionFailed({\n prefix: 'FormData constructor',\n argument: 'Argument 1',\n types: ['undefined']\n })\n }\n }\n\n append (name, value, filename = undefined) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.append'\n webidl.argumentLengthCheck(arguments, 2, prefix)\n\n name = webidl.converters.USVString(name)\n\n if (arguments.length === 3 || webidl.is.Blob(value)) {\n value = webidl.converters.Blob(value, prefix, 'value')\n\n if (filename !== undefined) {\n filename = webidl.converters.USVString(filename)\n }\n } else {\n value = webidl.converters.USVString(value)\n }\n\n // 1. Let value be value if given; otherwise blobValue.\n\n // 2. Let entry be the result of creating an entry with\n // name, value, and filename if given.\n const entry = makeEntry(name, value, filename)\n\n // 3. Append entry to this’s entry list.\n this.#state.push(entry)\n }\n\n delete (name) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.delete'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n name = webidl.converters.USVString(name)\n\n // The delete(name) method steps are to remove all entries whose name\n // is name from this’s entry list.\n this.#state = this.#state.filter(entry => entry.name !== name)\n }\n\n get (name) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.get'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n name = webidl.converters.USVString(name)\n\n // 1. If there is no entry whose name is name in this’s entry list,\n // then return null.\n const idx = this.#state.findIndex((entry) => entry.name === name)\n if (idx === -1) {\n return null\n }\n\n // 2. Return the value of the first entry whose name is name from\n // this’s entry list.\n return this.#state[idx].value\n }\n\n getAll (name) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.getAll'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n name = webidl.converters.USVString(name)\n\n // 1. If there is no entry whose name is name in this’s entry list,\n // then return the empty list.\n // 2. Return the values of all entries whose name is name, in order,\n // from this’s entry list.\n return this.#state\n .filter((entry) => entry.name === name)\n .map((entry) => entry.value)\n }\n\n has (name) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.has'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n name = webidl.converters.USVString(name)\n\n // The has(name) method steps are to return true if there is an entry\n // whose name is name in this’s entry list; otherwise false.\n return this.#state.findIndex((entry) => entry.name === name) !== -1\n }\n\n set (name, value, filename = undefined) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.set'\n webidl.argumentLengthCheck(arguments, 2, prefix)\n\n name = webidl.converters.USVString(name)\n\n if (arguments.length === 3 || webidl.is.Blob(value)) {\n value = webidl.converters.Blob(value, prefix, 'value')\n\n if (filename !== undefined) {\n filename = webidl.converters.USVString(filename)\n }\n } else {\n value = webidl.converters.USVString(value)\n }\n\n // The set(name, value) and set(name, blobValue, filename) method steps\n // are:\n\n // 1. Let value be value if given; otherwise blobValue.\n\n // 2. Let entry be the result of creating an entry with name, value, and\n // filename if given.\n const entry = makeEntry(name, value, filename)\n\n // 3. If there are entries in this’s entry list whose name is name, then\n // replace the first such entry with entry and remove the others.\n const idx = this.#state.findIndex((entry) => entry.name === name)\n if (idx !== -1) {\n this.#state = [\n ...this.#state.slice(0, idx),\n entry,\n ...this.#state.slice(idx + 1).filter((entry) => entry.name !== name)\n ]\n } else {\n // 4. Otherwise, append entry to this’s entry list.\n this.#state.push(entry)\n }\n }\n\n [nodeUtil.inspect.custom] (depth, options) {\n const state = this.#state.reduce((a, b) => {\n if (a[b.name]) {\n if (Array.isArray(a[b.name])) {\n a[b.name].push(b.value)\n } else {\n a[b.name] = [a[b.name], b.value]\n }\n } else {\n a[b.name] = b.value\n }\n\n return a\n }, { __proto__: null })\n\n options.depth ??= depth\n options.colors ??= true\n\n const output = nodeUtil.formatWithOptions(options, state)\n\n // remove [Object null prototype]\n return `FormData ${output.slice(output.indexOf(']') + 2)}`\n }\n\n /**\n * @param {FormData} formData\n */\n static getFormDataState (formData) {\n return formData.#state\n }\n\n /**\n * @param {FormData} formData\n * @param {any[]} newState\n */\n static setFormDataState (formData, newState) {\n formData.#state = newState\n }\n}\n\nconst { getFormDataState, setFormDataState } = FormData\nReflect.deleteProperty(FormData, 'getFormDataState')\nReflect.deleteProperty(FormData, 'setFormDataState')\n\niteratorMixin('FormData', FormData, getFormDataState, 'name', 'value')\n\nObject.defineProperties(FormData.prototype, {\n append: kEnumerableProperty,\n delete: kEnumerableProperty,\n get: kEnumerableProperty,\n getAll: kEnumerableProperty,\n has: kEnumerableProperty,\n set: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'FormData',\n configurable: true\n }\n})\n\n/**\n * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry\n * @param {string} name\n * @param {string|Blob} value\n * @param {?string} filename\n * @returns\n */\nfunction makeEntry (name, value, filename) {\n // 1. Set name to the result of converting name into a scalar value string.\n // Note: This operation was done by the webidl converter USVString.\n\n // 2. If value is a string, then set value to the result of converting\n // value into a scalar value string.\n if (typeof value === 'string') {\n // Note: This operation was done by the webidl converter USVString.\n } else {\n // 3. Otherwise:\n\n // 1. If value is not a File object, then set value to a new File object,\n // representing the same bytes, whose name attribute value is \"blob\"\n if (!webidl.is.File(value)) {\n value = new File([value], 'blob', { type: value.type })\n }\n\n // 2. If filename is given, then set value to a new File object,\n // representing the same bytes, whose name attribute is filename.\n if (filename !== undefined) {\n /** @type {FilePropertyBag} */\n const options = {\n type: value.type,\n lastModified: value.lastModified\n }\n\n value = new File([value], filename, options)\n }\n }\n\n // 4. Return an entry whose name is name and whose value is value.\n return { name, value }\n}\n\nwebidl.is.FormData = webidl.util.MakeTypeAssertion(FormData)\n\nmodule.exports = { FormData, makeEntry, setFormDataState }\n","'use strict'\n\n// In case of breaking changes, increase the version\n// number to avoid conflicts.\nconst globalOrigin = Symbol.for('undici.globalOrigin.1')\n\nfunction getGlobalOrigin () {\n return globalThis[globalOrigin]\n}\n\nfunction setGlobalOrigin (newOrigin) {\n if (newOrigin === undefined) {\n Object.defineProperty(globalThis, globalOrigin, {\n value: undefined,\n writable: true,\n enumerable: false,\n configurable: false\n })\n\n return\n }\n\n const parsedURL = new URL(newOrigin)\n\n if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') {\n throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`)\n }\n\n Object.defineProperty(globalThis, globalOrigin, {\n value: parsedURL,\n writable: true,\n enumerable: false,\n configurable: false\n })\n}\n\nmodule.exports = {\n getGlobalOrigin,\n setGlobalOrigin\n}\n","// https://github.com/Ethan-Arrowood/undici-fetch\n\n'use strict'\n\nconst { kConstruct } = require('../../core/symbols')\nconst { kEnumerableProperty } = require('../../core/util')\nconst {\n iteratorMixin,\n isValidHeaderName,\n isValidHeaderValue\n} = require('./util')\nconst { webidl } = require('../webidl')\nconst assert = require('node:assert')\nconst util = require('node:util')\n\n/**\n * @param {number} code\n * @returns {code is (0x0a | 0x0d | 0x09 | 0x20)}\n */\nfunction isHTTPWhiteSpaceCharCode (code) {\n return code === 0x0a || code === 0x0d || code === 0x09 || code === 0x20\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize\n * @param {string} potentialValue\n * @returns {string}\n */\nfunction headerValueNormalize (potentialValue) {\n // To normalize a byte sequence potentialValue, remove\n // any leading and trailing HTTP whitespace bytes from\n // potentialValue.\n let i = 0; let j = potentialValue.length\n\n while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j\n while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i\n\n return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j)\n}\n\n/**\n * @param {Headers} headers\n * @param {Array|Object} object\n */\nfunction fill (headers, object) {\n // To fill a Headers object headers with a given object object, run these steps:\n\n // 1. If object is a sequence, then for each header in object:\n // Note: webidl conversion to array has already been done.\n if (Array.isArray(object)) {\n for (let i = 0; i < object.length; ++i) {\n const header = object[i]\n // 1. If header does not contain exactly two items, then throw a TypeError.\n if (header.length !== 2) {\n throw webidl.errors.exception({\n header: 'Headers constructor',\n message: `expected name/value pair to be length 2, found ${header.length}.`\n })\n }\n\n // 2. Append (header’s first item, header’s second item) to headers.\n appendHeader(headers, header[0], header[1])\n }\n } else if (typeof object === 'object' && object !== null) {\n // Note: null should throw\n\n // 2. Otherwise, object is a record, then for each key → value in object,\n // append (key, value) to headers\n const keys = Object.keys(object)\n for (let i = 0; i < keys.length; ++i) {\n appendHeader(headers, keys[i], object[keys[i]])\n }\n } else {\n throw webidl.errors.conversionFailed({\n prefix: 'Headers constructor',\n argument: 'Argument 1',\n types: ['sequence>', 'record']\n })\n }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-headers-append\n * @param {Headers} headers\n * @param {string} name\n * @param {string} value\n */\nfunction appendHeader (headers, name, value) {\n // 1. Normalize value.\n value = headerValueNormalize(value)\n\n // 2. If name is not a header name or value is not a\n // header value, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.append',\n value: name,\n type: 'header name'\n })\n } else if (!isValidHeaderValue(value)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.append',\n value,\n type: 'header value'\n })\n }\n\n // 3. If headers’s guard is \"immutable\", then throw a TypeError.\n // 4. Otherwise, if headers’s guard is \"request\" and name is a\n // forbidden header name, return.\n // 5. Otherwise, if headers’s guard is \"request-no-cors\":\n // TODO\n // Note: undici does not implement forbidden header names\n if (getHeadersGuard(headers) === 'immutable') {\n throw new TypeError('immutable')\n }\n\n // 6. Otherwise, if headers’s guard is \"response\" and name is a\n // forbidden response-header name, return.\n\n // 7. Append (name, value) to headers’s header list.\n return getHeadersList(headers).append(name, value, false)\n\n // 8. If headers’s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from headers\n}\n\n// https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine\n/**\n * @param {Headers} target\n */\nfunction headersListSortAndCombine (target) {\n const headersList = getHeadersList(target)\n\n if (!headersList) {\n return []\n }\n\n if (headersList.sortedMap) {\n return headersList.sortedMap\n }\n\n // 1. Let headers be an empty list of headers with the key being the name\n // and value the value.\n const headers = []\n\n // 2. Let names be the result of convert header names to a sorted-lowercase\n // set with all the names of the headers in list.\n const names = headersList.toSortedArray()\n\n const cookies = headersList.cookies\n\n // fast-path\n if (cookies === null || cookies.length === 1) {\n // Note: The non-null assertion of value has already been done by `HeadersList#toSortedArray`\n return (headersList.sortedMap = names)\n }\n\n // 3. For each name of names:\n for (let i = 0; i < names.length; ++i) {\n const { 0: name, 1: value } = names[i]\n // 1. If name is `set-cookie`, then:\n if (name === 'set-cookie') {\n // 1. Let values be a list of all values of headers in list whose name\n // is a byte-case-insensitive match for name, in order.\n\n // 2. For each value of values:\n // 1. Append (name, value) to headers.\n for (let j = 0; j < cookies.length; ++j) {\n headers.push([name, cookies[j]])\n }\n } else {\n // 2. Otherwise:\n\n // 1. Let value be the result of getting name from list.\n\n // 2. Assert: value is non-null.\n // Note: This operation was done by `HeadersList#toSortedArray`.\n\n // 3. Append (name, value) to headers.\n headers.push([name, value])\n }\n }\n\n // 4. Return headers.\n return (headersList.sortedMap = headers)\n}\n\nfunction compareHeaderName (a, b) {\n return a[0] < b[0] ? -1 : 1\n}\n\nclass HeadersList {\n /** @type {[string, string][]|null} */\n cookies = null\n\n sortedMap\n headersMap\n\n constructor (init) {\n if (init instanceof HeadersList) {\n this.headersMap = new Map(init.headersMap)\n this.sortedMap = init.sortedMap\n this.cookies = init.cookies === null ? null : [...init.cookies]\n } else {\n this.headersMap = new Map(init)\n this.sortedMap = null\n }\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#header-list-contains\n * @param {string} name\n * @param {boolean} isLowerCase\n */\n contains (name, isLowerCase) {\n // A header list list contains a header name name if list\n // contains a header whose name is a byte-case-insensitive\n // match for name.\n\n return this.headersMap.has(isLowerCase ? name : name.toLowerCase())\n }\n\n clear () {\n this.headersMap.clear()\n this.sortedMap = null\n this.cookies = null\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#concept-header-list-append\n * @param {string} name\n * @param {string} value\n * @param {boolean} isLowerCase\n */\n append (name, value, isLowerCase) {\n this.sortedMap = null\n\n // 1. If list contains name, then set name to the first such\n // header’s name.\n const lowercaseName = isLowerCase ? name : name.toLowerCase()\n const exists = this.headersMap.get(lowercaseName)\n\n // 2. Append (name, value) to list.\n if (exists) {\n const delimiter = lowercaseName === 'cookie' ? '; ' : ', '\n this.headersMap.set(lowercaseName, {\n name: exists.name,\n value: `${exists.value}${delimiter}${value}`\n })\n } else {\n this.headersMap.set(lowercaseName, { name, value })\n }\n\n if (lowercaseName === 'set-cookie') {\n (this.cookies ??= []).push(value)\n }\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#concept-header-list-set\n * @param {string} name\n * @param {string} value\n * @param {boolean} isLowerCase\n */\n set (name, value, isLowerCase) {\n this.sortedMap = null\n const lowercaseName = isLowerCase ? name : name.toLowerCase()\n\n if (lowercaseName === 'set-cookie') {\n this.cookies = [value]\n }\n\n // 1. If list contains name, then set the value of\n // the first such header to value and remove the\n // others.\n // 2. Otherwise, append header (name, value) to list.\n this.headersMap.set(lowercaseName, { name, value })\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#concept-header-list-delete\n * @param {string} name\n * @param {boolean} isLowerCase\n */\n delete (name, isLowerCase) {\n this.sortedMap = null\n if (!isLowerCase) name = name.toLowerCase()\n\n if (name === 'set-cookie') {\n this.cookies = null\n }\n\n this.headersMap.delete(name)\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#concept-header-list-get\n * @param {string} name\n * @param {boolean} isLowerCase\n * @returns {string | null}\n */\n get (name, isLowerCase) {\n // 1. If list does not contain name, then return null.\n // 2. Return the values of all headers in list whose name\n // is a byte-case-insensitive match for name,\n // separated from each other by 0x2C 0x20, in order.\n return this.headersMap.get(isLowerCase ? name : name.toLowerCase())?.value ?? null\n }\n\n * [Symbol.iterator] () {\n // use the lowercased name\n for (const { 0: name, 1: { value } } of this.headersMap) {\n yield [name, value]\n }\n }\n\n get entries () {\n const headers = {}\n\n if (this.headersMap.size !== 0) {\n for (const { name, value } of this.headersMap.values()) {\n headers[name] = value\n }\n }\n\n return headers\n }\n\n rawValues () {\n return this.headersMap.values()\n }\n\n get entriesList () {\n const headers = []\n\n if (this.headersMap.size !== 0) {\n for (const { 0: lowerName, 1: { name, value } } of this.headersMap) {\n if (lowerName === 'set-cookie') {\n for (const cookie of this.cookies) {\n headers.push([name, cookie])\n }\n } else {\n headers.push([name, value])\n }\n }\n }\n\n return headers\n }\n\n // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set\n toSortedArray () {\n const size = this.headersMap.size\n const array = new Array(size)\n // In most cases, you will use the fast-path.\n // fast-path: Use binary insertion sort for small arrays.\n if (size <= 32) {\n if (size === 0) {\n // If empty, it is an empty array. To avoid the first index assignment.\n return array\n }\n // Improve performance by unrolling loop and avoiding double-loop.\n // Double-loop-less version of the binary insertion sort.\n const iterator = this.headersMap[Symbol.iterator]()\n const firstValue = iterator.next().value\n // set [name, value] to first index.\n array[0] = [firstValue[0], firstValue[1].value]\n // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine\n // 3.2.2. Assert: value is non-null.\n assert(firstValue[1].value !== null)\n for (\n let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value;\n i < size;\n ++i\n ) {\n // get next value\n value = iterator.next().value\n // set [name, value] to current index.\n x = array[i] = [value[0], value[1].value]\n // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine\n // 3.2.2. Assert: value is non-null.\n assert(x[1] !== null)\n left = 0\n right = i\n // binary search\n while (left < right) {\n // middle index\n pivot = left + ((right - left) >> 1)\n // compare header name\n if (array[pivot][0] <= x[0]) {\n left = pivot + 1\n } else {\n right = pivot\n }\n }\n if (i !== pivot) {\n j = i\n while (j > left) {\n array[j] = array[--j]\n }\n array[left] = x\n }\n }\n /* c8 ignore next 4 */\n if (!iterator.next().done) {\n // This is for debugging and will never be called.\n throw new TypeError('Unreachable')\n }\n return array\n } else {\n // This case would be a rare occurrence.\n // slow-path: fallback\n let i = 0\n for (const { 0: name, 1: { value } } of this.headersMap) {\n array[i++] = [name, value]\n // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine\n // 3.2.2. Assert: value is non-null.\n assert(value !== null)\n }\n return array.sort(compareHeaderName)\n }\n }\n}\n\n// https://fetch.spec.whatwg.org/#headers-class\nclass Headers {\n #guard\n /**\n * @type {HeadersList}\n */\n #headersList\n\n /**\n * @param {HeadersInit|Symbol} [init]\n * @returns\n */\n constructor (init = undefined) {\n webidl.util.markAsUncloneable(this)\n\n if (init === kConstruct) {\n return\n }\n\n this.#headersList = new HeadersList()\n\n // The new Headers(init) constructor steps are:\n\n // 1. Set this’s guard to \"none\".\n this.#guard = 'none'\n\n // 2. If init is given, then fill this with init.\n if (init !== undefined) {\n init = webidl.converters.HeadersInit(init, 'Headers constructor', 'init')\n fill(this, init)\n }\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-append\n append (name, value) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 2, 'Headers.append')\n\n const prefix = 'Headers.append'\n name = webidl.converters.ByteString(name, prefix, 'name')\n value = webidl.converters.ByteString(value, prefix, 'value')\n\n return appendHeader(this, name, value)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-delete\n delete (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, 'Headers.delete')\n\n const prefix = 'Headers.delete'\n name = webidl.converters.ByteString(name, prefix, 'name')\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.delete',\n value: name,\n type: 'header name'\n })\n }\n\n // 2. If this’s guard is \"immutable\", then throw a TypeError.\n // 3. Otherwise, if this’s guard is \"request\" and name is a\n // forbidden header name, return.\n // 4. Otherwise, if this’s guard is \"request-no-cors\", name\n // is not a no-CORS-safelisted request-header name, and\n // name is not a privileged no-CORS request-header name,\n // return.\n // 5. Otherwise, if this’s guard is \"response\" and name is\n // a forbidden response-header name, return.\n // Note: undici does not implement forbidden header names\n if (this.#guard === 'immutable') {\n throw new TypeError('immutable')\n }\n\n // 6. If this’s header list does not contain name, then\n // return.\n if (!this.#headersList.contains(name, false)) {\n return\n }\n\n // 7. Delete name from this’s header list.\n // 8. If this’s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from this.\n this.#headersList.delete(name, false)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-get\n get (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, 'Headers.get')\n\n const prefix = 'Headers.get'\n name = webidl.converters.ByteString(name, prefix, 'name')\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix,\n value: name,\n type: 'header name'\n })\n }\n\n // 2. Return the result of getting name from this’s header\n // list.\n return this.#headersList.get(name, false)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-has\n has (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, 'Headers.has')\n\n const prefix = 'Headers.has'\n name = webidl.converters.ByteString(name, prefix, 'name')\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix,\n value: name,\n type: 'header name'\n })\n }\n\n // 2. Return true if this’s header list contains name;\n // otherwise false.\n return this.#headersList.contains(name, false)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-set\n set (name, value) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 2, 'Headers.set')\n\n const prefix = 'Headers.set'\n name = webidl.converters.ByteString(name, prefix, 'name')\n value = webidl.converters.ByteString(value, prefix, 'value')\n\n // 1. Normalize value.\n value = headerValueNormalize(value)\n\n // 2. If name is not a header name or value is not a\n // header value, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix,\n value: name,\n type: 'header name'\n })\n } else if (!isValidHeaderValue(value)) {\n throw webidl.errors.invalidArgument({\n prefix,\n value,\n type: 'header value'\n })\n }\n\n // 3. If this’s guard is \"immutable\", then throw a TypeError.\n // 4. Otherwise, if this’s guard is \"request\" and name is a\n // forbidden header name, return.\n // 5. Otherwise, if this’s guard is \"request-no-cors\" and\n // name/value is not a no-CORS-safelisted request-header,\n // return.\n // 6. Otherwise, if this’s guard is \"response\" and name is a\n // forbidden response-header name, return.\n // Note: undici does not implement forbidden header names\n if (this.#guard === 'immutable') {\n throw new TypeError('immutable')\n }\n\n // 7. Set (name, value) in this’s header list.\n // 8. If this’s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from this\n this.#headersList.set(name, value, false)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie\n getSetCookie () {\n webidl.brandCheck(this, Headers)\n\n // 1. If this’s header list does not contain `Set-Cookie`, then return « ».\n // 2. Return the values of all headers in this’s header list whose name is\n // a byte-case-insensitive match for `Set-Cookie`, in order.\n\n const list = this.#headersList.cookies\n\n if (list) {\n return [...list]\n }\n\n return []\n }\n\n [util.inspect.custom] (depth, options) {\n options.depth ??= depth\n\n return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}`\n }\n\n static getHeadersGuard (o) {\n return o.#guard\n }\n\n static setHeadersGuard (o, guard) {\n o.#guard = guard\n }\n\n /**\n * @param {Headers} o\n */\n static getHeadersList (o) {\n return o.#headersList\n }\n\n /**\n * @param {Headers} target\n * @param {HeadersList} list\n */\n static setHeadersList (target, list) {\n target.#headersList = list\n }\n}\n\nconst { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers\nReflect.deleteProperty(Headers, 'getHeadersGuard')\nReflect.deleteProperty(Headers, 'setHeadersGuard')\nReflect.deleteProperty(Headers, 'getHeadersList')\nReflect.deleteProperty(Headers, 'setHeadersList')\n\niteratorMixin('Headers', Headers, headersListSortAndCombine, 0, 1)\n\nObject.defineProperties(Headers.prototype, {\n append: kEnumerableProperty,\n delete: kEnumerableProperty,\n get: kEnumerableProperty,\n has: kEnumerableProperty,\n set: kEnumerableProperty,\n getSetCookie: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'Headers',\n configurable: true\n },\n [util.inspect.custom]: {\n enumerable: false\n }\n})\n\nwebidl.converters.HeadersInit = function (V, prefix, argument) {\n if (webidl.util.Type(V) === webidl.util.Types.OBJECT) {\n const iterator = Reflect.get(V, Symbol.iterator)\n\n // A work-around to ensure we send the properly-cased Headers when V is a Headers object.\n // Read https://github.com/nodejs/undici/pull/3159#issuecomment-2075537226 before touching, please.\n if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) { // Headers object\n try {\n return getHeadersList(V).entriesList\n } catch {\n // fall-through\n }\n }\n\n if (typeof iterator === 'function') {\n return webidl.converters['sequence>'](V, prefix, argument, iterator.bind(V))\n }\n\n return webidl.converters['record'](V, prefix, argument)\n }\n\n throw webidl.errors.conversionFailed({\n prefix: 'Headers constructor',\n argument: 'Argument 1',\n types: ['sequence>', 'record']\n })\n}\n\nmodule.exports = {\n fill,\n // for test.\n compareHeaderName,\n Headers,\n HeadersList,\n getHeadersGuard,\n setHeadersGuard,\n setHeadersList,\n getHeadersList\n}\n","// https://github.com/Ethan-Arrowood/undici-fetch\n\n'use strict'\n\nconst {\n makeNetworkError,\n makeAppropriateNetworkError,\n filterResponse,\n makeResponse,\n fromInnerResponse,\n getResponseState\n} = require('./response')\nconst { HeadersList } = require('./headers')\nconst { Request, cloneRequest, getRequestDispatcher, getRequestState } = require('./request')\nconst zlib = require('node:zlib')\nconst {\n makePolicyContainer,\n clonePolicyContainer,\n requestBadPort,\n TAOCheck,\n appendRequestOriginHeader,\n responseLocationURL,\n requestCurrentURL,\n setRequestReferrerPolicyOnRedirect,\n tryUpgradeRequestToAPotentiallyTrustworthyURL,\n createOpaqueTimingInfo,\n appendFetchMetadata,\n corsCheck,\n crossOriginResourcePolicyCheck,\n determineRequestsReferrer,\n coarsenedSharedCurrentTime,\n sameOrigin,\n isCancelled,\n isAborted,\n isErrorLike,\n fullyReadBody,\n readableStreamClose,\n urlIsLocal,\n urlIsHttpHttpsScheme,\n urlHasHttpsScheme,\n clampAndCoarsenConnectionTimingInfo,\n simpleRangeHeaderValue,\n buildContentRange,\n createInflate,\n extractMimeType,\n hasAuthenticationEntry,\n includesCredentials,\n isTraversableNavigable\n} = require('./util')\nconst assert = require('node:assert')\nconst { safelyExtractBody, extractBody } = require('./body')\nconst {\n redirectStatusSet,\n nullBodyStatus,\n safeMethodsSet,\n requestBodyHeader,\n subresourceSet\n} = require('./constants')\nconst EE = require('node:events')\nconst { Readable, pipeline, finished, isErrored, isReadable } = require('node:stream')\nconst { addAbortListener, bufferToLowerCasedHeaderName } = require('../../core/util')\nconst { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require('./data-url')\nconst { getGlobalDispatcher } = require('../../global')\nconst { webidl } = require('../webidl')\nconst { STATUS_CODES } = require('node:http')\nconst { bytesMatch } = require('../subresource-integrity/subresource-integrity')\nconst { createDeferredPromise } = require('../../util/promise')\nconst { isomorphicEncode } = require('../infra')\nconst { runtimeFeatures } = require('../../util/runtime-features')\n\n// Node.js v23.8.0+ and v22.15.0+ supports Zstandard\nconst hasZstd = runtimeFeatures.has('zstd')\n\nconst GET_OR_HEAD = ['GET', 'HEAD']\n\nconst defaultUserAgent = typeof __UNDICI_IS_NODE__ !== 'undefined' || typeof esbuildDetection !== 'undefined'\n ? 'node'\n : 'undici'\n\n/** @type {import('buffer').resolveObjectURL} */\nlet resolveObjectURL\n\nclass Fetch extends EE {\n constructor (dispatcher) {\n super()\n\n this.dispatcher = dispatcher\n this.connection = null\n this.dump = false\n this.state = 'ongoing'\n }\n\n terminate (reason) {\n if (this.state !== 'ongoing') {\n return\n }\n\n this.state = 'terminated'\n this.connection?.destroy(reason)\n this.emit('terminated', reason)\n }\n\n // https://fetch.spec.whatwg.org/#fetch-controller-abort\n abort (error) {\n if (this.state !== 'ongoing') {\n return\n }\n\n // 1. Set controller’s state to \"aborted\".\n this.state = 'aborted'\n\n // 2. Let fallbackError be an \"AbortError\" DOMException.\n // 3. Set error to fallbackError if it is not given.\n if (!error) {\n error = new DOMException('The operation was aborted.', 'AbortError')\n }\n\n // 4. Let serializedError be StructuredSerialize(error).\n // If that threw an exception, catch it, and let\n // serializedError be StructuredSerialize(fallbackError).\n\n // 5. Set controller’s serialized abort reason to serializedError.\n this.serializedAbortReason = error\n\n this.connection?.destroy(error)\n this.emit('terminated', error)\n }\n}\n\nfunction handleFetchDone (response) {\n finalizeAndReportTiming(response, 'fetch')\n}\n\n// https://fetch.spec.whatwg.org/#fetch-method\nfunction fetch (input, init = undefined) {\n webidl.argumentLengthCheck(arguments, 1, 'globalThis.fetch')\n\n // 1. Let p be a new promise.\n let p = createDeferredPromise()\n\n // 2. Let requestObject be the result of invoking the initial value of\n // Request as constructor with input and init as arguments. If this throws\n // an exception, reject p with it and return p.\n let requestObject\n\n try {\n requestObject = new Request(input, init)\n } catch (e) {\n p.reject(e)\n return p.promise\n }\n\n // 3. Let request be requestObject’s request.\n const request = getRequestState(requestObject)\n\n // 4. If requestObject’s signal’s aborted flag is set, then:\n if (requestObject.signal.aborted) {\n // 1. Abort the fetch() call with p, request, null, and\n // requestObject’s signal’s abort reason.\n abortFetch(p, request, null, requestObject.signal.reason, null)\n\n // 2. Return p.\n return p.promise\n }\n\n // 5. Let globalObject be request’s client’s global object.\n const globalObject = request.client.globalObject\n\n // 6. If globalObject is a ServiceWorkerGlobalScope object, then set\n // request’s service-workers mode to \"none\".\n if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') {\n request.serviceWorkers = 'none'\n }\n\n // 7. Let responseObject be null.\n let responseObject = null\n\n // 8. Let relevantRealm be this’s relevant Realm.\n\n // 9. Let locallyAborted be false.\n let locallyAborted = false\n\n // 10. Let controller be null.\n let controller = null\n\n // 11. Add the following abort steps to requestObject’s signal:\n addAbortListener(\n requestObject.signal,\n () => {\n // 1. Set locallyAborted to true.\n locallyAborted = true\n\n // 2. Assert: controller is non-null.\n assert(controller != null)\n\n // 3. Abort controller with requestObject’s signal’s abort reason.\n controller.abort(requestObject.signal.reason)\n\n const realResponse = responseObject?.deref()\n\n // 4. Abort the fetch() call with p, request, responseObject,\n // and requestObject’s signal’s abort reason.\n abortFetch(p, request, realResponse, requestObject.signal.reason, controller.controller)\n }\n )\n\n // 12. Let handleFetchDone given response response be to finalize and\n // report timing with response, globalObject, and \"fetch\".\n // see function handleFetchDone\n\n // 13. Set controller to the result of calling fetch given request,\n // with processResponseEndOfBody set to handleFetchDone, and processResponse\n // given response being these substeps:\n\n const processResponse = (response) => {\n // 1. If locallyAborted is true, terminate these substeps.\n if (locallyAborted) {\n return\n }\n\n // 2. If response’s aborted flag is set, then:\n if (response.aborted) {\n // 1. Let deserializedError be the result of deserialize a serialized\n // abort reason given controller’s serialized abort reason and\n // relevantRealm.\n\n // 2. Abort the fetch() call with p, request, responseObject, and\n // deserializedError.\n\n abortFetch(p, request, responseObject, controller.serializedAbortReason, controller.controller)\n return\n }\n\n // 3. If response is a network error, then reject p with a TypeError\n // and terminate these substeps.\n if (response.type === 'error') {\n p.reject(new TypeError('fetch failed', { cause: response.error }))\n return\n }\n\n // 4. Set responseObject to the result of creating a Response object,\n // given response, \"immutable\", and relevantRealm.\n responseObject = new WeakRef(fromInnerResponse(response, 'immutable'))\n\n // 5. Resolve p with responseObject.\n p.resolve(responseObject.deref())\n p = null\n }\n\n controller = fetching({\n request,\n processResponseEndOfBody: handleFetchDone,\n processResponse,\n dispatcher: getRequestDispatcher(requestObject), // undici\n // Keep requestObject alive to prevent its AbortController from being GC'd\n // See https://github.com/nodejs/undici/issues/4627\n requestObject\n })\n\n // 14. Return p.\n return p.promise\n}\n\n// https://fetch.spec.whatwg.org/#finalize-and-report-timing\nfunction finalizeAndReportTiming (response, initiatorType = 'other') {\n // 1. If response is an aborted network error, then return.\n if (response.type === 'error' && response.aborted) {\n return\n }\n\n // 2. If response’s URL list is null or empty, then return.\n if (!response.urlList?.length) {\n return\n }\n\n // 3. Let originalURL be response’s URL list[0].\n const originalURL = response.urlList[0]\n\n // 4. Let timingInfo be response’s timing info.\n let timingInfo = response.timingInfo\n\n // 5. Let cacheState be response’s cache state.\n let cacheState = response.cacheState\n\n // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return.\n if (!urlIsHttpHttpsScheme(originalURL)) {\n return\n }\n\n // 7. If timingInfo is null, then return.\n if (timingInfo === null) {\n return\n }\n\n // 8. If response’s timing allow passed flag is not set, then:\n if (!response.timingAllowPassed) {\n // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo.\n timingInfo = createOpaqueTimingInfo({\n startTime: timingInfo.startTime\n })\n\n // 2. Set cacheState to the empty string.\n cacheState = ''\n }\n\n // 9. Set timingInfo’s end time to the coarsened shared current time\n // given global’s relevant settings object’s cross-origin isolated\n // capability.\n // TODO: given global’s relevant settings object’s cross-origin isolated\n // capability?\n timingInfo.endTime = coarsenedSharedCurrentTime()\n\n // 10. Set response’s timing info to timingInfo.\n response.timingInfo = timingInfo\n\n // 11. Mark resource timing for timingInfo, originalURL, initiatorType,\n // global, and cacheState.\n markResourceTiming(\n timingInfo,\n originalURL.href,\n initiatorType,\n globalThis,\n cacheState,\n '', // bodyType\n response.status\n )\n}\n\n// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing\nconst markResourceTiming = performance.markResourceTiming\n\n// https://fetch.spec.whatwg.org/#abort-fetch\nfunction abortFetch (p, request, responseObject, error, controller /* undici-specific */) {\n // 1. Reject promise with error.\n if (p) {\n // We might have already resolved the promise at this stage\n p.reject(error)\n }\n\n // 2. If request’s body is not null and is readable, then cancel request’s\n // body with error.\n if (request.body?.stream != null && isReadable(request.body.stream)) {\n request.body.stream.cancel(error).catch((err) => {\n if (err.code === 'ERR_INVALID_STATE') {\n // Node bug?\n return\n }\n throw err\n })\n }\n\n // 3. If responseObject is null, then return.\n if (responseObject == null) {\n return\n }\n\n // 4. Let response be responseObject’s response.\n const response = getResponseState(responseObject)\n\n // 5. If response’s body is not null and is readable, then error response’s\n // body with error.\n if (response.body?.stream != null && isReadable(response.body.stream)) {\n controller.error(error)\n }\n}\n\n// https://fetch.spec.whatwg.org/#fetching\nfunction fetching ({\n request,\n processRequestBodyChunkLength,\n processRequestEndOfBody,\n processResponse,\n processResponseEndOfBody,\n processResponseConsumeBody,\n useParallelQueue = false,\n dispatcher = getGlobalDispatcher(), // undici\n requestObject = null // Keep alive to prevent AbortController GC, see #4627\n}) {\n // Ensure that the dispatcher is set accordingly\n assert(dispatcher)\n\n // 1. Let taskDestination be null.\n let taskDestination = null\n\n // 2. Let crossOriginIsolatedCapability be false.\n let crossOriginIsolatedCapability = false\n\n // 3. If request’s client is non-null, then:\n if (request.client != null) {\n // 1. Set taskDestination to request’s client’s global object.\n taskDestination = request.client.globalObject\n\n // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin\n // isolated capability.\n crossOriginIsolatedCapability =\n request.client.crossOriginIsolatedCapability\n }\n\n // 4. If useParallelQueue is true, then set taskDestination to the result of\n // starting a new parallel queue.\n // TODO\n\n // 5. Let timingInfo be a new fetch timing info whose start time and\n // post-redirect start time are the coarsened shared current time given\n // crossOriginIsolatedCapability.\n const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability)\n const timingInfo = createOpaqueTimingInfo({\n startTime: currentTime\n })\n\n // 6. Let fetchParams be a new fetch params whose\n // request is request,\n // timing info is timingInfo,\n // process request body chunk length is processRequestBodyChunkLength,\n // process request end-of-body is processRequestEndOfBody,\n // process response is processResponse,\n // process response consume body is processResponseConsumeBody,\n // process response end-of-body is processResponseEndOfBody,\n // task destination is taskDestination,\n // and cross-origin isolated capability is crossOriginIsolatedCapability.\n const fetchParams = {\n controller: new Fetch(dispatcher),\n request,\n timingInfo,\n processRequestBodyChunkLength,\n processRequestEndOfBody,\n processResponse,\n processResponseConsumeBody,\n processResponseEndOfBody,\n taskDestination,\n crossOriginIsolatedCapability,\n // Keep requestObject alive to prevent its AbortController from being GC'd\n requestObject\n }\n\n // 7. If request’s body is a byte sequence, then set request’s body to\n // request’s body as a body.\n // NOTE: Since fetching is only called from fetch, body should already be\n // extracted.\n assert(!request.body || request.body.stream)\n\n // 8. If request’s window is \"client\", then set request’s window to request’s\n // client, if request’s client’s global object is a Window object; otherwise\n // \"no-window\".\n if (request.window === 'client') {\n // TODO: What if request.client is null?\n request.window =\n request.client?.globalObject?.constructor?.name === 'Window'\n ? request.client\n : 'no-window'\n }\n\n // 9. If request’s origin is \"client\", then set request’s origin to request’s\n // client’s origin.\n if (request.origin === 'client') {\n request.origin = request.client.origin\n }\n\n // 10. If all of the following conditions are true:\n // TODO\n\n // 11. If request’s policy container is \"client\", then:\n if (request.policyContainer === 'client') {\n // 1. If request’s client is non-null, then set request’s policy\n // container to a clone of request’s client’s policy container. [HTML]\n if (request.client != null) {\n request.policyContainer = clonePolicyContainer(\n request.client.policyContainer\n )\n } else {\n // 2. Otherwise, set request’s policy container to a new policy\n // container.\n request.policyContainer = makePolicyContainer()\n }\n }\n\n // 12. If request’s header list does not contain `Accept`, then:\n if (!request.headersList.contains('accept', true)) {\n // 1. Let value be `*/*`.\n const value = '*/*'\n\n // 2. A user agent should set value to the first matching statement, if\n // any, switching on request’s destination:\n // \"document\"\n // \"frame\"\n // \"iframe\"\n // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8`\n // \"image\"\n // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5`\n // \"style\"\n // `text/css,*/*;q=0.1`\n // TODO\n\n // 3. Append `Accept`/value to request’s header list.\n request.headersList.append('accept', value, true)\n }\n\n // 13. If request’s header list does not contain `Accept-Language`, then\n // user agents should append `Accept-Language`/an appropriate value to\n // request’s header list.\n if (!request.headersList.contains('accept-language', true)) {\n request.headersList.append('accept-language', '*', true)\n }\n\n // 14. If request’s priority is null, then use request’s initiator and\n // destination appropriately in setting request’s priority to a\n // user-agent-defined object.\n if (request.priority === null) {\n // TODO\n }\n\n // 15. If request is a subresource request, then:\n if (subresourceSet.has(request.destination)) {\n // TODO\n }\n\n // 16. Run main fetch given fetchParams.\n mainFetch(fetchParams, false)\n\n // 17. Return fetchParam's controller\n return fetchParams.controller\n}\n\n// https://fetch.spec.whatwg.org/#concept-main-fetch\nasync function mainFetch (fetchParams, recursive) {\n try {\n // 1. Let request be fetchParams’s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. If request’s local-URLs-only flag is set and request’s current URL is\n // not local, then set response to a network error.\n if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) {\n response = makeNetworkError('local URLs only')\n }\n\n // 4. Run report Content Security Policy violations for request.\n // TODO\n\n // 5. Upgrade request to a potentially trustworthy URL, if appropriate.\n tryUpgradeRequestToAPotentiallyTrustworthyURL(request)\n\n // 6. If should request be blocked due to a bad port, should fetching request\n // be blocked as mixed content, or should request be blocked by Content\n // Security Policy returns blocked, then set response to a network error.\n if (requestBadPort(request) === 'blocked') {\n response = makeNetworkError('bad port')\n }\n // TODO: should fetching request be blocked as mixed content?\n // TODO: should request be blocked by Content Security Policy?\n\n // 7. If request’s referrer policy is the empty string, then set request’s\n // referrer policy to request’s policy container’s referrer policy.\n if (request.referrerPolicy === '') {\n request.referrerPolicy = request.policyContainer.referrerPolicy\n }\n\n // 8. If request’s referrer is not \"no-referrer\", then set request’s\n // referrer to the result of invoking determine request’s referrer.\n if (request.referrer !== 'no-referrer') {\n request.referrer = determineRequestsReferrer(request)\n }\n\n // 9. Set request’s current URL’s scheme to \"https\" if all of the following\n // conditions are true:\n // - request’s current URL’s scheme is \"http\"\n // - request’s current URL’s host is a domain\n // - Matching request’s current URL’s host per Known HSTS Host Domain Name\n // Matching results in either a superdomain match with an asserted\n // includeSubDomains directive or a congruent match (with or without an\n // asserted includeSubDomains directive). [HSTS]\n // TODO\n\n // 10. If recursive is false, then run the remaining steps in parallel.\n // TODO\n\n // 11. If response is null, then set response to the result of running\n // the steps corresponding to the first matching statement:\n if (response === null) {\n const currentURL = requestCurrentURL(request)\n if (\n // - request’s current URL’s origin is same origin with request’s origin,\n // and request’s response tainting is \"basic\"\n (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') ||\n // request’s current URL’s scheme is \"data\"\n (currentURL.protocol === 'data:') ||\n // - request’s mode is \"navigate\" or \"websocket\"\n (request.mode === 'navigate' || request.mode === 'websocket')\n ) {\n // 1. Set request’s response tainting to \"basic\".\n request.responseTainting = 'basic'\n\n // 2. Return the result of running scheme fetch given fetchParams.\n response = await schemeFetch(fetchParams)\n\n // request’s mode is \"same-origin\"\n } else if (request.mode === 'same-origin') {\n // 1. Return a network error.\n response = makeNetworkError('request mode cannot be \"same-origin\"')\n\n // request’s mode is \"no-cors\"\n } else if (request.mode === 'no-cors') {\n // 1. If request’s redirect mode is not \"follow\", then return a network\n // error.\n if (request.redirect !== 'follow') {\n response = makeNetworkError(\n 'redirect mode cannot be \"follow\" for \"no-cors\" request'\n )\n } else {\n // 2. Set request’s response tainting to \"opaque\".\n request.responseTainting = 'opaque'\n\n // 3. Return the result of running scheme fetch given fetchParams.\n response = await schemeFetch(fetchParams)\n }\n // request’s current URL’s scheme is not an HTTP(S) scheme\n } else if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) {\n // Return a network error.\n response = makeNetworkError('URL scheme must be a HTTP(S) scheme')\n\n // - request’s use-CORS-preflight flag is set\n // - request’s unsafe-request flag is set and either request’s method is\n // not a CORS-safelisted method or CORS-unsafe request-header names with\n // request’s header list is not empty\n // 1. Set request’s response tainting to \"cors\".\n // 2. Let corsWithPreflightResponse be the result of running HTTP fetch\n // given fetchParams and true.\n // 3. If corsWithPreflightResponse is a network error, then clear cache\n // entries using request.\n // 4. Return corsWithPreflightResponse.\n // TODO\n\n // Otherwise\n } else {\n // 1. Set request’s response tainting to \"cors\".\n request.responseTainting = 'cors'\n\n // 2. Return the result of running HTTP fetch given fetchParams.\n response = await httpFetch(fetchParams)\n }\n }\n\n // 12. If recursive is true, then return response.\n if (recursive) {\n return response\n }\n\n // 13. If response is not a network error and response is not a filtered\n // response, then:\n if (response.status !== 0 && !response.internalResponse) {\n // If request’s response tainting is \"cors\", then:\n if (request.responseTainting === 'cors') {\n // 1. Let headerNames be the result of extracting header list values\n // given `Access-Control-Expose-Headers` and response’s header list.\n // TODO\n // 2. If request’s credentials mode is not \"include\" and headerNames\n // contains `*`, then set response’s CORS-exposed header-name list to\n // all unique header names in response’s header list.\n // TODO\n // 3. Otherwise, if headerNames is not null or failure, then set\n // response’s CORS-exposed header-name list to headerNames.\n // TODO\n }\n\n // Set response to the following filtered response with response as its\n // internal response, depending on request’s response tainting:\n if (request.responseTainting === 'basic') {\n response = filterResponse(response, 'basic')\n } else if (request.responseTainting === 'cors') {\n response = filterResponse(response, 'cors')\n } else if (request.responseTainting === 'opaque') {\n response = filterResponse(response, 'opaque')\n } else {\n assert(false)\n }\n }\n\n // 14. Let internalResponse be response, if response is a network error,\n // and response’s internal response otherwise.\n let internalResponse =\n response.status === 0 ? response : response.internalResponse\n\n // 15. If internalResponse’s URL list is empty, then set it to a clone of\n // request’s URL list.\n if (internalResponse.urlList.length === 0) {\n internalResponse.urlList.push(...request.urlList)\n }\n\n // 16. If request’s timing allow failed flag is unset, then set\n // internalResponse’s timing allow passed flag.\n if (!request.timingAllowFailed) {\n response.timingAllowPassed = true\n }\n\n // 17. If response is not a network error and any of the following returns\n // blocked\n // - should internalResponse to request be blocked as mixed content\n // - should internalResponse to request be blocked by Content Security Policy\n // - should internalResponse to request be blocked due to its MIME type\n // - should internalResponse to request be blocked due to nosniff\n // TODO\n\n // 18. If response’s type is \"opaque\", internalResponse’s status is 206,\n // internalResponse’s range-requested flag is set, and request’s header\n // list does not contain `Range`, then set response and internalResponse\n // to a network error.\n if (\n response.type === 'opaque' &&\n internalResponse.status === 206 &&\n internalResponse.rangeRequested &&\n !request.headers.contains('range', true)\n ) {\n response = internalResponse = makeNetworkError()\n }\n\n // 19. If response is not a network error and either request’s method is\n // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status,\n // set internalResponse’s body to null and disregard any enqueuing toward\n // it (if any).\n if (\n response.status !== 0 &&\n (request.method === 'HEAD' ||\n request.method === 'CONNECT' ||\n nullBodyStatus.includes(internalResponse.status))\n ) {\n internalResponse.body = null\n fetchParams.controller.dump = true\n }\n\n // 20. If request’s integrity metadata is not the empty string, then:\n if (request.integrity) {\n // 1. Let processBodyError be this step: run fetch finale given fetchParams\n // and a network error.\n const processBodyError = (reason) =>\n fetchFinale(fetchParams, makeNetworkError(reason))\n\n // 2. If request’s response tainting is \"opaque\", or response’s body is null,\n // then run processBodyError and abort these steps.\n if (request.responseTainting === 'opaque' || response.body == null) {\n processBodyError(response.error)\n return\n }\n\n // 3. Let processBody given bytes be these steps:\n const processBody = (bytes) => {\n // 1. If bytes do not match request’s integrity metadata,\n // then run processBodyError and abort these steps. [SRI]\n if (!bytesMatch(bytes, request.integrity)) {\n processBodyError('integrity mismatch')\n return\n }\n\n // 2. Set response’s body to bytes as a body.\n response.body = safelyExtractBody(bytes)[0]\n\n // 3. Run fetch finale given fetchParams and response.\n fetchFinale(fetchParams, response)\n }\n\n // 4. Fully read response’s body given processBody and processBodyError.\n fullyReadBody(response.body, processBody, processBodyError)\n } else {\n // 21. Otherwise, run fetch finale given fetchParams and response.\n fetchFinale(fetchParams, response)\n }\n } catch (err) {\n fetchParams.controller.terminate(err)\n }\n}\n\n// https://fetch.spec.whatwg.org/#concept-scheme-fetch\n// given a fetch params fetchParams\nfunction schemeFetch (fetchParams) {\n // Note: since the connection is destroyed on redirect, which sets fetchParams to a\n // cancelled state, we do not want this condition to trigger *unless* there have been\n // no redirects. See https://github.com/nodejs/undici/issues/1776\n // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) {\n return Promise.resolve(makeAppropriateNetworkError(fetchParams))\n }\n\n // 2. Let request be fetchParams’s request.\n const { request } = fetchParams\n\n const { protocol: scheme } = requestCurrentURL(request)\n\n // 3. Switch on request’s current URL’s scheme and run the associated steps:\n switch (scheme) {\n case 'about:': {\n // If request’s current URL’s path is the string \"blank\", then return a new response\n // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) »,\n // and body is the empty byte sequence as a body.\n\n // Otherwise, return a network error.\n return Promise.resolve(makeNetworkError('about scheme is not supported'))\n }\n case 'blob:': {\n if (!resolveObjectURL) {\n resolveObjectURL = require('node:buffer').resolveObjectURL\n }\n\n // 1. Let blobURLEntry be request’s current URL’s blob URL entry.\n const blobURLEntry = requestCurrentURL(request)\n\n // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56\n // Buffer.resolveObjectURL does not ignore URL queries.\n if (blobURLEntry.search.length !== 0) {\n return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.'))\n }\n\n const blob = resolveObjectURL(blobURLEntry.toString())\n\n // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s\n // object is not a Blob object, then return a network error.\n if (request.method !== 'GET' || !webidl.is.Blob(blob)) {\n return Promise.resolve(makeNetworkError('invalid method'))\n }\n\n // 3. Let blob be blobURLEntry’s object.\n // Note: done above\n\n // 4. Let response be a new response.\n const response = makeResponse()\n\n // 5. Let fullLength be blob’s size.\n const fullLength = blob.size\n\n // 6. Let serializedFullLength be fullLength, serialized and isomorphic encoded.\n const serializedFullLength = isomorphicEncode(`${fullLength}`)\n\n // 7. Let type be blob’s type.\n const type = blob.type\n\n // 8. If request’s header list does not contain `Range`:\n // 9. Otherwise:\n if (!request.headersList.contains('range', true)) {\n // 1. Let bodyWithType be the result of safely extracting blob.\n // Note: in the FileAPI a blob \"object\" is a Blob *or* a MediaSource.\n // In node, this can only ever be a Blob. Therefore we can safely\n // use extractBody directly.\n const bodyWithType = extractBody(blob)\n\n // 2. Set response’s status message to `OK`.\n response.statusText = 'OK'\n\n // 3. Set response’s body to bodyWithType’s body.\n response.body = bodyWithType[0]\n\n // 4. Set response’s header list to « (`Content-Length`, serializedFullLength), (`Content-Type`, type) ».\n response.headersList.set('content-length', serializedFullLength, true)\n response.headersList.set('content-type', type, true)\n } else {\n // 1. Set response’s range-requested flag.\n response.rangeRequested = true\n\n // 2. Let rangeHeader be the result of getting `Range` from request’s header list.\n const rangeHeader = request.headersList.get('range', true)\n\n // 3. Let rangeValue be the result of parsing a single range header value given rangeHeader and true.\n const rangeValue = simpleRangeHeaderValue(rangeHeader, true)\n\n // 4. If rangeValue is failure, then return a network error.\n if (rangeValue === 'failure') {\n return Promise.resolve(makeNetworkError('failed to fetch the data URL'))\n }\n\n // 5. Let (rangeStart, rangeEnd) be rangeValue.\n let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue\n\n // 6. If rangeStart is null:\n // 7. Otherwise:\n if (rangeStart === null) {\n // 1. Set rangeStart to fullLength − rangeEnd.\n rangeStart = fullLength - rangeEnd\n\n // 2. Set rangeEnd to rangeStart + rangeEnd − 1.\n rangeEnd = rangeStart + rangeEnd - 1\n } else {\n // 1. If rangeStart is greater than or equal to fullLength, then return a network error.\n if (rangeStart >= fullLength) {\n return Promise.resolve(makeNetworkError('Range start is greater than the blob\\'s size.'))\n }\n\n // 2. If rangeEnd is null or rangeEnd is greater than or equal to fullLength, then set\n // rangeEnd to fullLength − 1.\n if (rangeEnd === null || rangeEnd >= fullLength) {\n rangeEnd = fullLength - 1\n }\n }\n\n // 8. Let slicedBlob be the result of invoking slice blob given blob, rangeStart,\n // rangeEnd + 1, and type.\n const slicedBlob = blob.slice(rangeStart, rangeEnd + 1, type)\n\n // 9. Let slicedBodyWithType be the result of safely extracting slicedBlob.\n // Note: same reason as mentioned above as to why we use extractBody\n const slicedBodyWithType = extractBody(slicedBlob)\n\n // 10. Set response’s body to slicedBodyWithType’s body.\n response.body = slicedBodyWithType[0]\n\n // 11. Let serializedSlicedLength be slicedBlob’s size, serialized and isomorphic encoded.\n const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`)\n\n // 12. Let contentRange be the result of invoking build a content range given rangeStart,\n // rangeEnd, and fullLength.\n const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength)\n\n // 13. Set response’s status to 206.\n response.status = 206\n\n // 14. Set response’s status message to `Partial Content`.\n response.statusText = 'Partial Content'\n\n // 15. Set response’s header list to « (`Content-Length`, serializedSlicedLength),\n // (`Content-Type`, type), (`Content-Range`, contentRange) ».\n response.headersList.set('content-length', serializedSlicedLength, true)\n response.headersList.set('content-type', type, true)\n response.headersList.set('content-range', contentRange, true)\n }\n\n // 10. Return response.\n return Promise.resolve(response)\n }\n case 'data:': {\n // 1. Let dataURLStruct be the result of running the\n // data: URL processor on request’s current URL.\n const currentURL = requestCurrentURL(request)\n const dataURLStruct = dataURLProcessor(currentURL)\n\n // 2. If dataURLStruct is failure, then return a\n // network error.\n if (dataURLStruct === 'failure') {\n return Promise.resolve(makeNetworkError('failed to fetch the data URL'))\n }\n\n // 3. Let mimeType be dataURLStruct’s MIME type, serialized.\n const mimeType = serializeAMimeType(dataURLStruct.mimeType)\n\n // 4. Return a response whose status message is `OK`,\n // header list is « (`Content-Type`, mimeType) »,\n // and body is dataURLStruct’s body as a body.\n return Promise.resolve(makeResponse({\n statusText: 'OK',\n headersList: [\n ['content-type', { name: 'Content-Type', value: mimeType }]\n ],\n body: safelyExtractBody(dataURLStruct.body)[0]\n }))\n }\n case 'file:': {\n // For now, unfortunate as it is, file URLs are left as an exercise for the reader.\n // When in doubt, return a network error.\n return Promise.resolve(makeNetworkError('not implemented... yet...'))\n }\n case 'http:':\n case 'https:': {\n // Return the result of running HTTP fetch given fetchParams.\n\n return httpFetch(fetchParams)\n .catch((err) => makeNetworkError(err))\n }\n default: {\n return Promise.resolve(makeNetworkError('unknown scheme'))\n }\n }\n}\n\n// https://fetch.spec.whatwg.org/#finalize-response\nfunction finalizeResponse (fetchParams, response) {\n // 1. Set fetchParams’s request’s done flag.\n fetchParams.request.done = true\n\n // 2, If fetchParams’s process response done is not null, then queue a fetch\n // task to run fetchParams’s process response done given response, with\n // fetchParams’s task destination.\n if (fetchParams.processResponseDone != null) {\n queueMicrotask(() => fetchParams.processResponseDone(response))\n }\n}\n\n// https://fetch.spec.whatwg.org/#fetch-finale\nfunction fetchFinale (fetchParams, response) {\n // 1. Let timingInfo be fetchParams’s timing info.\n let timingInfo = fetchParams.timingInfo\n\n // 2. If response is not a network error and fetchParams’s request’s client is a secure context,\n // then set timingInfo’s server-timing headers to the result of getting, decoding, and splitting\n // `Server-Timing` from response’s internal response’s header list.\n // TODO\n\n // 3. Let processResponseEndOfBody be the following steps:\n const processResponseEndOfBody = () => {\n // 1. Let unsafeEndTime be the unsafe shared current time.\n const unsafeEndTime = Date.now() // ?\n\n // 2. If fetchParams’s request’s destination is \"document\", then set fetchParams’s controller’s\n // full timing info to fetchParams’s timing info.\n if (fetchParams.request.destination === 'document') {\n fetchParams.controller.fullTimingInfo = timingInfo\n }\n\n // 3. Set fetchParams’s controller’s report timing steps to the following steps given a global object global:\n fetchParams.controller.reportTimingSteps = () => {\n // 1. If fetchParams’s request’s URL’s scheme is not an HTTP(S) scheme, then return.\n if (!urlIsHttpHttpsScheme(fetchParams.request.url)) {\n return\n }\n\n // 2. Set timingInfo’s end time to the relative high resolution time given unsafeEndTime and global.\n timingInfo.endTime = unsafeEndTime\n\n // 3. Let cacheState be response’s cache state.\n let cacheState = response.cacheState\n\n // 4. Let bodyInfo be response’s body info.\n const bodyInfo = response.bodyInfo\n\n // 5. If response’s timing allow passed flag is not set, then set timingInfo to the result of creating an\n // opaque timing info for timingInfo and set cacheState to the empty string.\n if (!response.timingAllowPassed) {\n timingInfo = createOpaqueTimingInfo(timingInfo)\n\n cacheState = ''\n }\n\n // 6. Let responseStatus be 0.\n let responseStatus = 0\n\n // 7. If fetchParams’s request’s mode is not \"navigate\" or response’s has-cross-origin-redirects is false:\n if (fetchParams.request.mode !== 'navigator' || !response.hasCrossOriginRedirects) {\n // 1. Set responseStatus to response’s status.\n responseStatus = response.status\n\n // 2. Let mimeType be the result of extracting a MIME type from response’s header list.\n const mimeType = extractMimeType(response.headersList)\n\n // 3. If mimeType is not failure, then set bodyInfo’s content type to the result of minimizing a supported MIME type given mimeType.\n if (mimeType !== 'failure') {\n bodyInfo.contentType = minimizeSupportedMimeType(mimeType)\n }\n }\n\n // 8. If fetchParams’s request’s initiator type is non-null, then mark resource timing given timingInfo,\n // fetchParams’s request’s URL, fetchParams’s request’s initiator type, global, cacheState, bodyInfo,\n // and responseStatus.\n if (fetchParams.request.initiatorType != null) {\n markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus)\n }\n }\n\n // 4. Let processResponseEndOfBodyTask be the following steps:\n const processResponseEndOfBodyTask = () => {\n // 1. Set fetchParams’s request’s done flag.\n fetchParams.request.done = true\n\n // 2. If fetchParams’s process response end-of-body is non-null, then run fetchParams’s process\n // response end-of-body given response.\n if (fetchParams.processResponseEndOfBody != null) {\n queueMicrotask(() => fetchParams.processResponseEndOfBody(response))\n }\n\n // 3. If fetchParams’s request’s initiator type is non-null and fetchParams’s request’s client’s\n // global object is fetchParams’s task destination, then run fetchParams’s controller’s report\n // timing steps given fetchParams’s request’s client’s global object.\n if (fetchParams.request.initiatorType != null) {\n fetchParams.controller.reportTimingSteps()\n }\n }\n\n // 5. Queue a fetch task to run processResponseEndOfBodyTask with fetchParams’s task destination\n queueMicrotask(() => processResponseEndOfBodyTask())\n }\n\n // 4. If fetchParams’s process response is non-null, then queue a fetch task to run fetchParams’s\n // process response given response, with fetchParams’s task destination.\n if (fetchParams.processResponse != null) {\n queueMicrotask(() => {\n fetchParams.processResponse(response)\n fetchParams.processResponse = null\n })\n }\n\n // 5. Let internalResponse be response, if response is a network error; otherwise response’s internal response.\n const internalResponse = response.type === 'error' ? response : (response.internalResponse ?? response)\n\n // 6. If internalResponse’s body is null, then run processResponseEndOfBody.\n // 7. Otherwise:\n if (internalResponse.body == null) {\n processResponseEndOfBody()\n } else {\n // mcollina: all the following steps of the specs are skipped.\n // The internal transform stream is not needed.\n // See https://github.com/nodejs/undici/pull/3093#issuecomment-2050198541\n\n // 1. Let transformStream be a new TransformStream.\n // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, enqueues chunk in transformStream.\n // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm and flushAlgorithm\n // set to processResponseEndOfBody.\n // 4. Set internalResponse’s body’s stream to the result of internalResponse’s body’s stream piped through transformStream.\n\n finished(internalResponse.body.stream, () => {\n processResponseEndOfBody()\n })\n }\n}\n\n// https://fetch.spec.whatwg.org/#http-fetch\nasync function httpFetch (fetchParams) {\n // 1. Let request be fetchParams’s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. Let actualResponse be null.\n let actualResponse = null\n\n // 4. Let timingInfo be fetchParams’s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 5. If request’s service-workers mode is \"all\", then:\n if (request.serviceWorkers === 'all') {\n // TODO\n }\n\n // 6. If response is null, then:\n if (response === null) {\n // 1. If makeCORSPreflight is true and one of these conditions is true:\n // TODO\n\n // 2. If request’s redirect mode is \"follow\", then set request’s\n // service-workers mode to \"none\".\n if (request.redirect === 'follow') {\n request.serviceWorkers = 'none'\n }\n\n // 3. Set response and actualResponse to the result of running\n // HTTP-network-or-cache fetch given fetchParams.\n actualResponse = response = await httpNetworkOrCacheFetch(fetchParams)\n\n // 4. If request’s response tainting is \"cors\" and a CORS check\n // for request and response returns failure, then return a network error.\n if (\n request.responseTainting === 'cors' &&\n corsCheck(request, response) === 'failure'\n ) {\n return makeNetworkError('cors failure')\n }\n\n // 5. If the TAO check for request and response returns failure, then set\n // request’s timing allow failed flag.\n if (TAOCheck(request, response) === 'failure') {\n request.timingAllowFailed = true\n }\n }\n\n // 7. If either request’s response tainting or response’s type\n // is \"opaque\", and the cross-origin resource policy check with\n // request’s origin, request’s client, request’s destination,\n // and actualResponse returns blocked, then return a network error.\n if (\n (request.responseTainting === 'opaque' || response.type === 'opaque') &&\n crossOriginResourcePolicyCheck(\n request.origin,\n request.client,\n request.destination,\n actualResponse\n ) === 'blocked'\n ) {\n return makeNetworkError('blocked')\n }\n\n // 8. If actualResponse’s status is a redirect status, then:\n if (redirectStatusSet.has(actualResponse.status)) {\n // 1. If actualResponse’s status is not 303, request’s body is not null,\n // and the connection uses HTTP/2, then user agents may, and are even\n // encouraged to, transmit an RST_STREAM frame.\n // See, https://github.com/whatwg/fetch/issues/1288\n if (request.redirect !== 'manual') {\n fetchParams.controller.connection.destroy(undefined, false)\n }\n\n // 2. Switch on request’s redirect mode:\n if (request.redirect === 'error') {\n // Set response to a network error.\n response = makeNetworkError('unexpected redirect')\n } else if (request.redirect === 'manual') {\n // Set response to an opaque-redirect filtered response whose internal\n // response is actualResponse.\n // NOTE(spec): On the web this would return an `opaqueredirect` response,\n // but that doesn't make sense server side.\n // See https://github.com/nodejs/undici/issues/1193.\n response = actualResponse\n } else if (request.redirect === 'follow') {\n // Set response to the result of running HTTP-redirect fetch given\n // fetchParams and response.\n response = await httpRedirectFetch(fetchParams, response)\n } else {\n assert(false)\n }\n }\n\n // 9. Set response’s timing info to timingInfo.\n response.timingInfo = timingInfo\n\n // 10. Return response.\n return response\n}\n\n// https://fetch.spec.whatwg.org/#http-redirect-fetch\nfunction httpRedirectFetch (fetchParams, response) {\n // 1. Let request be fetchParams’s request.\n const request = fetchParams.request\n\n // 2. Let actualResponse be response, if response is not a filtered response,\n // and response’s internal response otherwise.\n const actualResponse = response.internalResponse\n ? response.internalResponse\n : response\n\n // 3. Let locationURL be actualResponse’s location URL given request’s current\n // URL’s fragment.\n let locationURL\n\n try {\n locationURL = responseLocationURL(\n actualResponse,\n requestCurrentURL(request).hash\n )\n\n // 4. If locationURL is null, then return response.\n if (locationURL == null) {\n return response\n }\n } catch (err) {\n // 5. If locationURL is failure, then return a network error.\n return Promise.resolve(makeNetworkError(err))\n }\n\n // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network\n // error.\n if (!urlIsHttpHttpsScheme(locationURL)) {\n return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme'))\n }\n\n // 7. If request’s redirect count is 20, then return a network error.\n if (request.redirectCount === 20) {\n return Promise.resolve(makeNetworkError('redirect count exceeded'))\n }\n\n // 8. Increase request’s redirect count by 1.\n request.redirectCount += 1\n\n // 9. If request’s mode is \"cors\", locationURL includes credentials, and\n // request’s origin is not same origin with locationURL’s origin, then return\n // a network error.\n if (\n request.mode === 'cors' &&\n (locationURL.username || locationURL.password) &&\n !sameOrigin(request, locationURL)\n ) {\n return Promise.resolve(makeNetworkError('cross origin not allowed for request mode \"cors\"'))\n }\n\n // 10. If request’s response tainting is \"cors\" and locationURL includes\n // credentials, then return a network error.\n if (\n request.responseTainting === 'cors' &&\n (locationURL.username || locationURL.password)\n ) {\n return Promise.resolve(makeNetworkError(\n 'URL cannot contain credentials for request mode \"cors\"'\n ))\n }\n\n // 11. If actualResponse’s status is not 303, request’s body is non-null,\n // and request’s body’s source is null, then return a network error.\n if (\n actualResponse.status !== 303 &&\n request.body != null &&\n request.body.source == null\n ) {\n return Promise.resolve(makeNetworkError())\n }\n\n // 12. If one of the following is true\n // - actualResponse’s status is 301 or 302 and request’s method is `POST`\n // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD`\n if (\n ([301, 302].includes(actualResponse.status) && request.method === 'POST') ||\n (actualResponse.status === 303 &&\n !GET_OR_HEAD.includes(request.method))\n ) {\n // then:\n // 1. Set request’s method to `GET` and request’s body to null.\n request.method = 'GET'\n request.body = null\n\n // 2. For each headerName of request-body-header name, delete headerName from\n // request’s header list.\n for (const headerName of requestBodyHeader) {\n request.headersList.delete(headerName)\n }\n }\n\n // 13. If request’s current URL’s origin is not same origin with locationURL’s\n // origin, then for each headerName of CORS non-wildcard request-header name,\n // delete headerName from request’s header list.\n if (!sameOrigin(requestCurrentURL(request), locationURL)) {\n // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name\n request.headersList.delete('authorization', true)\n\n // https://fetch.spec.whatwg.org/#authentication-entries\n request.headersList.delete('proxy-authorization', true)\n\n // \"Cookie\" and \"Host\" are forbidden request-headers, which undici doesn't implement.\n request.headersList.delete('cookie', true)\n request.headersList.delete('host', true)\n }\n\n // 14. If request's body is non-null, then set request's body to the first return\n // value of safely extracting request's body's source.\n if (request.body != null) {\n assert(request.body.source != null)\n request.body = safelyExtractBody(request.body.source)[0]\n }\n\n // 15. Let timingInfo be fetchParams’s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 16. Set timingInfo’s redirect end time and post-redirect start time to the\n // coarsened shared current time given fetchParams’s cross-origin isolated\n // capability.\n timingInfo.redirectEndTime = timingInfo.postRedirectStartTime =\n coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability)\n\n // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s\n // redirect start time to timingInfo’s start time.\n if (timingInfo.redirectStartTime === 0) {\n timingInfo.redirectStartTime = timingInfo.startTime\n }\n\n // 18. Append locationURL to request’s URL list.\n request.urlList.push(locationURL)\n\n // 19. Invoke set request’s referrer policy on redirect on request and\n // actualResponse.\n setRequestReferrerPolicyOnRedirect(request, actualResponse)\n\n // 20. Return the result of running main fetch given fetchParams and true.\n return mainFetch(fetchParams, true)\n}\n\n// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch\nasync function httpNetworkOrCacheFetch (\n fetchParams,\n isAuthenticationFetch = false,\n isNewConnectionFetch = false\n) {\n // 1. Let request be fetchParams’s request.\n const request = fetchParams.request\n\n // 2. Let httpFetchParams be null.\n let httpFetchParams = null\n\n // 3. Let httpRequest be null.\n let httpRequest = null\n\n // 4. Let response be null.\n let response = null\n\n // 5. Let storedResponse be null.\n // TODO: cache\n\n // 6. Let httpCache be null.\n const httpCache = null\n\n // 7. Let the revalidatingFlag be unset.\n const revalidatingFlag = false\n\n // 8. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. If request’s window is \"no-window\" and request’s redirect mode is\n // \"error\", then set httpFetchParams to fetchParams and httpRequest to\n // request.\n if (request.window === 'no-window' && request.redirect === 'error') {\n httpFetchParams = fetchParams\n httpRequest = request\n } else {\n // Otherwise:\n\n // 1. Set httpRequest to a clone of request.\n httpRequest = cloneRequest(request)\n\n // 2. Set httpFetchParams to a copy of fetchParams.\n httpFetchParams = { ...fetchParams }\n\n // 3. Set httpFetchParams’s request to httpRequest.\n httpFetchParams.request = httpRequest\n }\n\n // 3. Let includeCredentials be true if one of\n const includeCredentials =\n request.credentials === 'include' ||\n (request.credentials === 'same-origin' &&\n request.responseTainting === 'basic')\n\n // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s\n // body is non-null; otherwise null.\n const contentLength = httpRequest.body ? httpRequest.body.length : null\n\n // 5. Let contentLengthHeaderValue be null.\n let contentLengthHeaderValue = null\n\n // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or\n // `PUT`, then set contentLengthHeaderValue to `0`.\n if (\n httpRequest.body == null &&\n ['POST', 'PUT'].includes(httpRequest.method)\n ) {\n contentLengthHeaderValue = '0'\n }\n\n // 7. If contentLength is non-null, then set contentLengthHeaderValue to\n // contentLength, serialized and isomorphic encoded.\n if (contentLength != null) {\n contentLengthHeaderValue = isomorphicEncode(`${contentLength}`)\n }\n\n // 8. If contentLengthHeaderValue is non-null, then append\n // `Content-Length`/contentLengthHeaderValue to httpRequest’s header\n // list.\n if (contentLengthHeaderValue != null) {\n httpRequest.headersList.append('content-length', contentLengthHeaderValue, true)\n }\n\n // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`,\n // contentLengthHeaderValue) to httpRequest’s header list.\n\n // 10. If contentLength is non-null and httpRequest’s keepalive is true,\n // then:\n if (contentLength != null && httpRequest.keepalive) {\n // NOTE: keepalive is a noop outside of browser context.\n }\n\n // 11. If httpRequest’s referrer is a URL, then append\n // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded,\n // to httpRequest’s header list.\n if (webidl.is.URL(httpRequest.referrer)) {\n httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href), true)\n }\n\n // 12. Append a request `Origin` header for httpRequest.\n appendRequestOriginHeader(httpRequest)\n\n // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA]\n appendFetchMetadata(httpRequest)\n\n // 14. If httpRequest’s header list does not contain `User-Agent`, then\n // user agents should append `User-Agent`/default `User-Agent` value to\n // httpRequest’s header list.\n if (!httpRequest.headersList.contains('user-agent', true)) {\n httpRequest.headersList.append('user-agent', defaultUserAgent, true)\n }\n\n // 15. If httpRequest’s cache mode is \"default\" and httpRequest’s header\n // list contains `If-Modified-Since`, `If-None-Match`,\n // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set\n // httpRequest’s cache mode to \"no-store\".\n if (\n httpRequest.cache === 'default' &&\n (httpRequest.headersList.contains('if-modified-since', true) ||\n httpRequest.headersList.contains('if-none-match', true) ||\n httpRequest.headersList.contains('if-unmodified-since', true) ||\n httpRequest.headersList.contains('if-match', true) ||\n httpRequest.headersList.contains('if-range', true))\n ) {\n httpRequest.cache = 'no-store'\n }\n\n // 16. If httpRequest’s cache mode is \"no-cache\", httpRequest’s prevent\n // no-cache cache-control header modification flag is unset, and\n // httpRequest’s header list does not contain `Cache-Control`, then append\n // `Cache-Control`/`max-age=0` to httpRequest’s header list.\n if (\n httpRequest.cache === 'no-cache' &&\n !httpRequest.preventNoCacheCacheControlHeaderModification &&\n !httpRequest.headersList.contains('cache-control', true)\n ) {\n httpRequest.headersList.append('cache-control', 'max-age=0', true)\n }\n\n // 17. If httpRequest’s cache mode is \"no-store\" or \"reload\", then:\n if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') {\n // 1. If httpRequest’s header list does not contain `Pragma`, then append\n // `Pragma`/`no-cache` to httpRequest’s header list.\n if (!httpRequest.headersList.contains('pragma', true)) {\n httpRequest.headersList.append('pragma', 'no-cache', true)\n }\n\n // 2. If httpRequest’s header list does not contain `Cache-Control`,\n // then append `Cache-Control`/`no-cache` to httpRequest’s header list.\n if (!httpRequest.headersList.contains('cache-control', true)) {\n httpRequest.headersList.append('cache-control', 'no-cache', true)\n }\n }\n\n // 18. If httpRequest’s header list contains `Range`, then append\n // `Accept-Encoding`/`identity` to httpRequest’s header list.\n if (httpRequest.headersList.contains('range', true)) {\n httpRequest.headersList.append('accept-encoding', 'identity', true)\n }\n\n // 19. Modify httpRequest’s header list per HTTP. Do not append a given\n // header if httpRequest’s header list contains that header’s name.\n // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129\n if (!httpRequest.headersList.contains('accept-encoding', true)) {\n if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) {\n httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate', true)\n } else {\n httpRequest.headersList.append('accept-encoding', 'gzip, deflate', true)\n }\n }\n\n httpRequest.headersList.delete('host', true)\n\n // 21. If includeCredentials is true, then:\n if (includeCredentials) {\n // 1. If the user agent is not configured to block cookies for httpRequest\n // (see section 7 of [COOKIES]), then:\n // TODO: credentials\n\n // 2. If httpRequest’s header list does not contain `Authorization`, then:\n if (!httpRequest.headersList.contains('authorization', true)) {\n // 1. Let authorizationValue be null.\n let authorizationValue = null\n\n // 2. If there’s an authentication entry for httpRequest and either\n // httpRequest’s use-URL-credentials flag is unset or httpRequest’s\n // current URL does not include credentials, then set\n // authorizationValue to authentication entry.\n if (hasAuthenticationEntry(httpRequest) && (\n httpRequest.useURLCredentials === undefined || !includesCredentials(requestCurrentURL(httpRequest))\n )) {\n // TODO\n } else if (includesCredentials(requestCurrentURL(httpRequest)) && isAuthenticationFetch) {\n // 3. Otherwise, if httpRequest’s current URL does include credentials\n // and isAuthenticationFetch is true, set authorizationValue to\n // httpRequest’s current URL, converted to an `Authorization` value\n const { username, password } = requestCurrentURL(httpRequest)\n authorizationValue = `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`\n }\n\n // 4. If authorizationValue is non-null, then append (`Authorization`,\n // authorizationValue) to httpRequest’s header list.\n if (authorizationValue !== null) {\n httpRequest.headersList.append('Authorization', authorizationValue, false)\n }\n }\n }\n\n // 21. If there’s a proxy-authentication entry, use it as appropriate.\n // TODO: proxy-authentication\n\n // 22. Set httpCache to the result of determining the HTTP cache\n // partition, given httpRequest.\n // TODO: cache\n\n // 23. If httpCache is null, then set httpRequest’s cache mode to\n // \"no-store\".\n if (httpCache == null) {\n httpRequest.cache = 'no-store'\n }\n\n // 24. If httpRequest’s cache mode is neither \"no-store\" nor \"reload\",\n // then:\n if (httpRequest.cache !== 'no-store' && httpRequest.cache !== 'reload') {\n // TODO: cache\n }\n\n // 9. If aborted, then return the appropriate network error for fetchParams.\n // TODO\n\n // 10. If response is null, then:\n if (response == null) {\n // 1. If httpRequest’s cache mode is \"only-if-cached\", then return a\n // network error.\n if (httpRequest.cache === 'only-if-cached') {\n return makeNetworkError('only if cached')\n }\n\n // 2. Let forwardResponse be the result of running HTTP-network fetch\n // given httpFetchParams, includeCredentials, and isNewConnectionFetch.\n const forwardResponse = await httpNetworkFetch(\n httpFetchParams,\n includeCredentials,\n isNewConnectionFetch\n )\n\n // 3. If httpRequest’s method is unsafe and forwardResponse’s status is\n // in the range 200 to 399, inclusive, invalidate appropriate stored\n // responses in httpCache, as per the \"Invalidation\" chapter of HTTP\n // Caching, and set storedResponse to null. [HTTP-CACHING]\n if (\n !safeMethodsSet.has(httpRequest.method) &&\n forwardResponse.status >= 200 &&\n forwardResponse.status <= 399\n ) {\n // TODO: cache\n }\n\n // 4. If the revalidatingFlag is set and forwardResponse’s status is 304,\n // then:\n if (revalidatingFlag && forwardResponse.status === 304) {\n // TODO: cache\n }\n\n // 5. If response is null, then:\n if (response == null) {\n // 1. Set response to forwardResponse.\n response = forwardResponse\n\n // 2. Store httpRequest and forwardResponse in httpCache, as per the\n // \"Storing Responses in Caches\" chapter of HTTP Caching. [HTTP-CACHING]\n // TODO: cache\n }\n }\n\n // 11. Set response’s URL list to a clone of httpRequest’s URL list.\n response.urlList = [...httpRequest.urlList]\n\n // 12. If httpRequest’s header list contains `Range`, then set response’s\n // range-requested flag.\n if (httpRequest.headersList.contains('range', true)) {\n response.rangeRequested = true\n }\n\n // 13. Set response’s request-includes-credentials to includeCredentials.\n response.requestIncludesCredentials = includeCredentials\n\n // 14. If response’s status is 401, httpRequest’s response tainting is not \"cors\",\n // includeCredentials is true, and request’s traversable for user prompts is\n // a traversable navigable:\n //\n // In Node.js there is no traversable navigable to prompt the user, but we\n // still need to handle URL-embedded credentials so authentication retries\n // for WebSocket handshakes continue to work.\n if (response.status === 401 && httpRequest.responseTainting !== 'cors' && includeCredentials && (\n request.useURLCredentials !== undefined ||\n isTraversableNavigable(request.traversableForUserPrompts)\n )) {\n // 2. If request’s body is non-null, then:\n if (request.body != null) {\n // 1. If request’s body’s source is null, then return a network error.\n if (request.body.source == null) {\n // Note: In Node.js, this code path should not be reached because\n // isTraversableNavigable() returns false for non-navigable contexts.\n // However, we handle it gracefully by returning the response instead of\n // a network error, as we won't actually retry the request.\n // This aligns with the Fetch spec discussion in whatwg/fetch#1132,\n // which allows implementations flexibility when credentials can't be obtained.\n return response\n }\n\n // 2. Set request’s body to the body of the result of safely extracting\n // request’s body’s source.\n request.body = safelyExtractBody(request.body.source)[0]\n }\n\n // 3. If request’s use-URL-credentials flag is unset or isAuthenticationFetch is\n // true, then:\n if (request.useURLCredentials === undefined || isAuthenticationFetch) {\n // 1. If fetchParams is canceled, then return the appropriate network error\n // for fetchParams.\n if (isCancelled(fetchParams)) {\n return makeAppropriateNetworkError(fetchParams)\n }\n\n // 2. Let username and password be the result of prompting the end user for a\n // username and password, respectively, in request’s traversable for user prompts.\n // TODO\n\n // 3. Set the username given request’s current URL and username.\n // requestCurrentURL(request).username = TODO\n\n // 4. Set the password given request’s current URL and password.\n // requestCurrentURL(request).password = TODO\n\n // In browsers, the user will be prompted to enter a username/password before the request\n // is re-sent. To prevent an infinite 401 loop, return the response for now.\n // https://github.com/nodejs/undici/pull/4756\n return response\n }\n\n // 4. Set response to the result of running HTTP-network-or-cache fetch given\n // fetchParams and true.\n fetchParams.controller.connection.destroy()\n\n response = await httpNetworkOrCacheFetch(fetchParams, true)\n }\n\n // 15. If response’s status is 407, then:\n if (response.status === 407) {\n // 1. If request’s window is \"no-window\", then return a network error.\n if (request.window === 'no-window') {\n return makeNetworkError()\n }\n\n // 2. ???\n\n // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams)) {\n return makeAppropriateNetworkError(fetchParams)\n }\n\n // 4. Prompt the end user as appropriate in request’s window and store\n // the result as a proxy-authentication entry. [HTTP-AUTH]\n // TODO: Invoke some kind of callback?\n\n // 5. Set response to the result of running HTTP-network-or-cache fetch given\n // fetchParams.\n // TODO\n return makeNetworkError('proxy authentication required')\n }\n\n // 16. If all of the following are true\n if (\n // response’s status is 421\n response.status === 421 &&\n // isNewConnectionFetch is false\n !isNewConnectionFetch &&\n // request’s body is null, or request’s body is non-null and request’s body’s source is non-null\n (request.body == null || request.body.source != null)\n ) {\n // then:\n\n // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams)) {\n return makeAppropriateNetworkError(fetchParams)\n }\n\n // 2. Set response to the result of running HTTP-network-or-cache\n // fetch given fetchParams, isAuthenticationFetch, and true.\n\n // TODO (spec): The spec doesn't specify this but we need to cancel\n // the active response before we can start a new one.\n // https://github.com/whatwg/fetch/issues/1293\n fetchParams.controller.connection.destroy()\n\n response = await httpNetworkOrCacheFetch(\n fetchParams,\n isAuthenticationFetch,\n true\n )\n }\n\n // 17. If isAuthenticationFetch is true, then create an authentication entry\n if (isAuthenticationFetch) {\n // TODO\n }\n\n // 18. Return response.\n return response\n}\n\n// https://fetch.spec.whatwg.org/#http-network-fetch\nasync function httpNetworkFetch (\n fetchParams,\n includeCredentials = false,\n forceNewConnection = false\n) {\n assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed)\n\n fetchParams.controller.connection = {\n abort: null,\n destroyed: false,\n destroy (err, abort = true) {\n if (!this.destroyed) {\n this.destroyed = true\n if (abort) {\n this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError'))\n }\n }\n }\n }\n\n // 1. Let request be fetchParams’s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. Let timingInfo be fetchParams’s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 4. Let httpCache be the result of determining the HTTP cache partition,\n // given request.\n // TODO: cache\n const httpCache = null\n\n // 5. If httpCache is null, then set request’s cache mode to \"no-store\".\n if (httpCache == null) {\n request.cache = 'no-store'\n }\n\n // 6. Let networkPartitionKey be the result of determining the network\n // partition key given request.\n // TODO\n\n // 7. Let newConnection be \"yes\" if forceNewConnection is true; otherwise\n // \"no\".\n const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars\n\n // 8. Switch on request’s mode:\n if (request.mode === 'websocket') {\n // Let connection be the result of obtaining a WebSocket connection,\n // given request’s current URL.\n // TODO\n } else {\n // Let connection be the result of obtaining a connection, given\n // networkPartitionKey, request’s current URL’s origin,\n // includeCredentials, and forceNewConnection.\n // TODO\n }\n\n // 9. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. If connection is failure, then return a network error.\n\n // 2. Set timingInfo’s final connection timing info to the result of\n // calling clamp and coarsen connection timing info with connection’s\n // timing info, timingInfo’s post-redirect start time, and fetchParams’s\n // cross-origin isolated capability.\n\n // 3. If connection is not an HTTP/2 connection, request’s body is non-null,\n // and request’s body’s source is null, then append (`Transfer-Encoding`,\n // `chunked`) to request’s header list.\n\n // 4. Set timingInfo’s final network-request start time to the coarsened\n // shared current time given fetchParams’s cross-origin isolated\n // capability.\n\n // 5. Set response to the result of making an HTTP request over connection\n // using request with the following caveats:\n\n // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS]\n // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH]\n\n // - If request’s body is non-null, and request’s body’s source is null,\n // then the user agent may have a buffer of up to 64 kibibytes and store\n // a part of request’s body in that buffer. If the user agent reads from\n // request’s body beyond that buffer’s size and the user agent needs to\n // resend request, then instead return a network error.\n\n // - Set timingInfo’s final network-response start time to the coarsened\n // shared current time given fetchParams’s cross-origin isolated capability,\n // immediately after the user agent’s HTTP parser receives the first byte\n // of the response (e.g., frame header bytes for HTTP/2 or response status\n // line for HTTP/1.x).\n\n // - Wait until all the headers are transmitted.\n\n // - Any responses whose status is in the range 100 to 199, inclusive,\n // and is not 101, are to be ignored, except for the purposes of setting\n // timingInfo’s final network-response start time above.\n\n // - If request’s header list contains `Transfer-Encoding`/`chunked` and\n // response is transferred via HTTP/1.0 or older, then return a network\n // error.\n\n // - If the HTTP request results in a TLS client certificate dialog, then:\n\n // 1. If request’s window is an environment settings object, make the\n // dialog available in request’s window.\n\n // 2. Otherwise, return a network error.\n\n // To transmit request’s body body, run these steps:\n let requestBody = null\n // 1. If body is null and fetchParams’s process request end-of-body is\n // non-null, then queue a fetch task given fetchParams’s process request\n // end-of-body and fetchParams’s task destination.\n if (request.body == null && fetchParams.processRequestEndOfBody) {\n queueMicrotask(() => fetchParams.processRequestEndOfBody())\n } else if (request.body != null) {\n // 2. Otherwise, if body is non-null:\n\n // 1. Let processBodyChunk given bytes be these steps:\n const processBodyChunk = async function * (bytes) {\n // 1. If the ongoing fetch is terminated, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. Run this step in parallel: transmit bytes.\n yield bytes\n\n // 3. If fetchParams’s process request body is non-null, then run\n // fetchParams’s process request body given bytes’s length.\n fetchParams.processRequestBodyChunkLength?.(bytes.byteLength)\n }\n\n // 2. Let processEndOfBody be these steps:\n const processEndOfBody = () => {\n // 1. If fetchParams is canceled, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. If fetchParams’s process request end-of-body is non-null,\n // then run fetchParams’s process request end-of-body.\n if (fetchParams.processRequestEndOfBody) {\n fetchParams.processRequestEndOfBody()\n }\n }\n\n // 3. Let processBodyError given e be these steps:\n const processBodyError = (e) => {\n // 1. If fetchParams is canceled, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. If e is an \"AbortError\" DOMException, then abort fetchParams’s controller.\n if (e.name === 'AbortError') {\n fetchParams.controller.abort()\n } else {\n fetchParams.controller.terminate(e)\n }\n }\n\n // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody,\n // processBodyError, and fetchParams’s task destination.\n requestBody = (async function * () {\n try {\n for await (const bytes of request.body.stream) {\n yield * processBodyChunk(bytes)\n }\n processEndOfBody()\n } catch (err) {\n processBodyError(err)\n }\n })()\n }\n\n try {\n // socket is only provided for websockets\n const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody })\n\n if (socket) {\n response = makeResponse({ status, statusText, headersList, socket })\n } else {\n const iterator = body[Symbol.asyncIterator]()\n fetchParams.controller.next = () => iterator.next()\n\n response = makeResponse({ status, statusText, headersList })\n }\n } catch (err) {\n // 10. If aborted, then:\n if (err.name === 'AbortError') {\n // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame.\n fetchParams.controller.connection.destroy()\n\n // 2. Return the appropriate network error for fetchParams.\n return makeAppropriateNetworkError(fetchParams, err)\n }\n\n return makeNetworkError(err)\n }\n\n // 11. Let pullAlgorithm be an action that resumes the ongoing fetch\n // if it is suspended.\n const pullAlgorithm = () => {\n return fetchParams.controller.resume()\n }\n\n // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s\n // controller with reason, given reason.\n const cancelAlgorithm = (reason) => {\n // If the aborted fetch was already terminated, then we do not\n // need to do anything.\n if (!isCancelled(fetchParams)) {\n fetchParams.controller.abort(reason)\n }\n }\n\n // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by\n // the user agent.\n // TODO\n\n // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object\n // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent.\n // TODO\n\n // 15. Let stream be a new ReadableStream.\n // 16. Set up stream with byte reading support with pullAlgorithm set to pullAlgorithm,\n // cancelAlgorithm set to cancelAlgorithm.\n const stream = new ReadableStream(\n {\n start (controller) {\n fetchParams.controller.controller = controller\n },\n pull: pullAlgorithm,\n cancel: cancelAlgorithm,\n type: 'bytes'\n }\n )\n\n // 17. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. Set response’s body to a new body whose stream is stream.\n response.body = { stream, source: null, length: null }\n\n // 2. If response is not a network error and request’s cache mode is\n // not \"no-store\", then update response in httpCache for request.\n // TODO\n\n // 3. If includeCredentials is true and the user agent is not configured\n // to block cookies for request (see section 7 of [COOKIES]), then run the\n // \"set-cookie-string\" parsing algorithm (see section 5.2 of [COOKIES]) on\n // the value of each header whose name is a byte-case-insensitive match for\n // `Set-Cookie` in response’s header list, if any, and request’s current URL.\n // TODO\n\n // 18. If aborted, then:\n // TODO\n\n // 19. Run these steps in parallel:\n\n // 1. Run these steps, but abort when fetchParams is canceled:\n if (!fetchParams.controller.resume) {\n fetchParams.controller.on('terminated', onAborted)\n }\n\n fetchParams.controller.resume = async () => {\n // 1. While true\n while (true) {\n // 1-3. See onData...\n\n // 4. Set bytes to the result of handling content codings given\n // codings and bytes.\n let bytes\n let isFailure\n try {\n const { done, value } = await fetchParams.controller.next()\n\n if (isAborted(fetchParams)) {\n break\n }\n\n bytes = done ? undefined : value\n } catch (err) {\n if (fetchParams.controller.ended && !timingInfo.encodedBodySize) {\n // zlib doesn't like empty streams.\n bytes = undefined\n } else {\n bytes = err\n\n // err may be propagated from the result of calling readablestream.cancel,\n // which might not be an error. https://github.com/nodejs/undici/issues/2009\n isFailure = true\n }\n }\n\n if (bytes === undefined) {\n // 2. Otherwise, if the bytes transmission for response’s message\n // body is done normally and stream is readable, then close\n // stream, finalize response for fetchParams and response, and\n // abort these in-parallel steps.\n readableStreamClose(fetchParams.controller.controller)\n\n finalizeResponse(fetchParams, response)\n\n return\n }\n\n // 5. Increase timingInfo’s decoded body size by bytes’s length.\n timingInfo.decodedBodySize += bytes?.byteLength ?? 0\n\n // 6. If bytes is failure, then terminate fetchParams’s controller.\n if (isFailure) {\n fetchParams.controller.terminate(bytes)\n return\n }\n\n // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes\n // into stream.\n const buffer = new Uint8Array(bytes)\n if (buffer.byteLength) {\n fetchParams.controller.controller.enqueue(buffer)\n }\n\n // 8. If stream is errored, then terminate the ongoing fetch.\n if (isErrored(stream)) {\n fetchParams.controller.terminate()\n return\n }\n\n // 9. If stream doesn’t need more data ask the user agent to suspend\n // the ongoing fetch.\n if (fetchParams.controller.controller.desiredSize <= 0) {\n return\n }\n }\n }\n\n // 2. If aborted, then:\n function onAborted (reason) {\n // 2. If fetchParams is aborted, then:\n if (isAborted(fetchParams)) {\n // 1. Set response’s aborted flag.\n response.aborted = true\n\n // 2. If stream is readable, then error stream with the result of\n // deserialize a serialized abort reason given fetchParams’s\n // controller’s serialized abort reason and an\n // implementation-defined realm.\n if (isReadable(stream)) {\n fetchParams.controller.controller.error(\n fetchParams.controller.serializedAbortReason\n )\n }\n } else {\n // 3. Otherwise, if stream is readable, error stream with a TypeError.\n if (isReadable(stream)) {\n fetchParams.controller.controller.error(new TypeError('terminated', {\n cause: isErrorLike(reason) ? reason : undefined\n }))\n }\n }\n\n // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame.\n // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so.\n fetchParams.controller.connection.destroy()\n }\n\n // 20. Return response.\n return response\n\n function dispatch ({ body }) {\n const url = requestCurrentURL(request)\n /** @type {import('../../..').Agent} */\n const agent = fetchParams.controller.dispatcher\n\n const path = url.pathname + url.search\n const hasTrailingQuestionMark = url.search.length === 0 && url.href[url.href.length - url.hash.length - 1] === '?'\n\n return new Promise((resolve, reject) => agent.dispatch(\n {\n path: hasTrailingQuestionMark ? `${path}?` : path,\n origin: url.origin,\n method: request.method,\n body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body,\n headers: request.headersList.entries,\n maxRedirections: 0,\n upgrade: request.mode === 'websocket' ? 'websocket' : undefined\n },\n {\n body: null,\n abort: null,\n\n onConnect (abort) {\n // TODO (fix): Do we need connection here?\n const { connection } = fetchParams.controller\n\n // Set timingInfo’s final connection timing info to the result of calling clamp and coarsen\n // connection timing info with connection’s timing info, timingInfo’s post-redirect start\n // time, and fetchParams’s cross-origin isolated capability.\n // TODO: implement connection timing\n timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(undefined, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability)\n\n if (connection.destroyed) {\n abort(new DOMException('The operation was aborted.', 'AbortError'))\n } else {\n fetchParams.controller.on('terminated', abort)\n this.abort = connection.abort = abort\n }\n\n // Set timingInfo’s final network-request start time to the coarsened shared current time given\n // fetchParams’s cross-origin isolated capability.\n timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability)\n },\n\n onResponseStarted () {\n // Set timingInfo’s final network-response start time to the coarsened shared current\n // time given fetchParams’s cross-origin isolated capability, immediately after the\n // user agent’s HTTP parser receives the first byte of the response (e.g., frame header\n // bytes for HTTP/2 or response status line for HTTP/1.x).\n timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability)\n },\n\n onHeaders (status, rawHeaders, resume, statusText) {\n if (status < 200) {\n return false\n }\n\n const headersList = new HeadersList()\n\n for (let i = 0; i < rawHeaders.length; i += 2) {\n const nameStr = bufferToLowerCasedHeaderName(rawHeaders[i])\n const value = rawHeaders[i + 1]\n if (Array.isArray(value) && !Buffer.isBuffer(rawHeaders[i + 1])) {\n for (const val of value) {\n headersList.append(nameStr, val.toString('latin1'), true)\n }\n } else {\n headersList.append(nameStr, value.toString('latin1'), true)\n }\n }\n const location = headersList.get('location', true)\n\n this.body = new Readable({ read: resume })\n\n const willFollow = location && request.redirect === 'follow' &&\n redirectStatusSet.has(status)\n\n const decoders = []\n\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding\n if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) {\n // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1\n const contentEncoding = headersList.get('content-encoding', true)\n // \"All content-coding values are case-insensitive...\"\n /** @type {string[]} */\n const codings = contentEncoding ? contentEncoding.toLowerCase().split(',') : []\n\n // Limit the number of content-encodings to prevent resource exhaustion.\n // CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206).\n const maxContentEncodings = 5\n if (codings.length > maxContentEncodings) {\n reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`))\n return true\n }\n\n for (let i = codings.length - 1; i >= 0; --i) {\n const coding = codings[i].trim()\n // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2\n if (coding === 'x-gzip' || coding === 'gzip') {\n decoders.push(zlib.createGunzip({\n // Be less strict when decoding compressed responses, since sometimes\n // servers send slightly invalid responses that are still accepted\n // by common browsers.\n // Always using Z_SYNC_FLUSH is what cURL does.\n flush: zlib.constants.Z_SYNC_FLUSH,\n finishFlush: zlib.constants.Z_SYNC_FLUSH\n }))\n } else if (coding === 'deflate') {\n decoders.push(createInflate({\n flush: zlib.constants.Z_SYNC_FLUSH,\n finishFlush: zlib.constants.Z_SYNC_FLUSH\n }))\n } else if (coding === 'br') {\n decoders.push(zlib.createBrotliDecompress({\n flush: zlib.constants.BROTLI_OPERATION_FLUSH,\n finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH\n }))\n } else if (coding === 'zstd' && hasZstd) {\n decoders.push(zlib.createZstdDecompress({\n flush: zlib.constants.ZSTD_e_continue,\n finishFlush: zlib.constants.ZSTD_e_end\n }))\n } else {\n decoders.length = 0\n break\n }\n }\n }\n\n const onError = this.onError.bind(this)\n\n resolve({\n status,\n statusText,\n headersList,\n body: decoders.length\n ? pipeline(this.body, ...decoders, (err) => {\n if (err) {\n this.onError(err)\n }\n }).on('error', onError)\n : this.body.on('error', onError)\n })\n\n return true\n },\n\n onData (chunk) {\n if (fetchParams.controller.dump) {\n return\n }\n\n // 1. If one or more bytes have been transmitted from response’s\n // message body, then:\n\n // 1. Let bytes be the transmitted bytes.\n const bytes = chunk\n\n // 2. Let codings be the result of extracting header list values\n // given `Content-Encoding` and response’s header list.\n // See pullAlgorithm.\n\n // 3. Increase timingInfo’s encoded body size by bytes’s length.\n timingInfo.encodedBodySize += bytes.byteLength\n\n // 4. See pullAlgorithm...\n\n return this.body.push(bytes)\n },\n\n onComplete () {\n if (this.abort) {\n fetchParams.controller.off('terminated', this.abort)\n }\n\n fetchParams.controller.ended = true\n\n this.body.push(null)\n },\n\n onError (error) {\n if (this.abort) {\n fetchParams.controller.off('terminated', this.abort)\n }\n\n this.body?.destroy(error)\n\n fetchParams.controller.terminate(error)\n\n reject(error)\n },\n\n onRequestUpgrade (_controller, status, headers, socket) {\n // We need to support 200 for websocket over h2 as per RFC-8441\n // Absence of session means H1\n if ((socket.session != null && status !== 200) || (socket.session == null && status !== 101)) {\n return false\n }\n\n const headersList = new HeadersList()\n\n for (const [name, value] of Object.entries(headers)) {\n if (value == null) {\n continue\n }\n\n const headerName = name.toLowerCase()\n\n if (Array.isArray(value)) {\n for (const entry of value) {\n headersList.append(headerName, String(entry), true)\n }\n } else {\n headersList.append(headerName, String(value), true)\n }\n }\n\n resolve({\n status,\n statusText: STATUS_CODES[status],\n headersList,\n socket\n })\n\n return true\n },\n\n onUpgrade (status, rawHeaders, socket) {\n // We need to support 200 for websocket over h2 as per RFC-8441\n // Absence of session means H1\n if ((socket.session != null && status !== 200) || (socket.session == null && status !== 101)) {\n return false\n }\n\n const headersList = new HeadersList()\n\n for (let i = 0; i < rawHeaders.length; i += 2) {\n const nameStr = bufferToLowerCasedHeaderName(rawHeaders[i])\n const value = rawHeaders[i + 1]\n if (Array.isArray(value) && !Buffer.isBuffer(rawHeaders[i + 1])) {\n for (const val of value) {\n headersList.append(nameStr, val.toString('latin1'), true)\n }\n } else {\n headersList.append(nameStr, value.toString('latin1'), true)\n }\n }\n\n resolve({\n status,\n statusText: STATUS_CODES[status],\n headersList,\n socket\n })\n\n return true\n }\n }\n ))\n }\n}\n\nmodule.exports = {\n fetch,\n Fetch,\n fetching,\n finalizeAndReportTiming\n}\n","/* globals AbortController */\n\n'use strict'\n\nconst { extractBody, mixinBody, cloneBody, bodyUnusable } = require('./body')\nconst { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require('./headers')\nconst util = require('../../core/util')\nconst nodeUtil = require('node:util')\nconst {\n isValidHTTPToken,\n sameOrigin,\n environmentSettingsObject\n} = require('./util')\nconst {\n forbiddenMethodsSet,\n corsSafeListedMethodsSet,\n referrerPolicy,\n requestRedirect,\n requestMode,\n requestCredentials,\n requestCache,\n requestDuplex\n} = require('./constants')\nconst { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util\nconst { webidl } = require('../webidl')\nconst { URLSerializer } = require('./data-url')\nconst { kConstruct } = require('../../core/symbols')\nconst assert = require('node:assert')\nconst { getMaxListeners, setMaxListeners, defaultMaxListeners } = require('node:events')\n\nconst kAbortController = Symbol('abortController')\n\nconst requestFinalizer = new FinalizationRegistry(({ signal, abort }) => {\n signal.removeEventListener('abort', abort)\n})\n\nconst dependentControllerMap = new WeakMap()\n\nlet abortSignalHasEventHandlerLeakWarning\n\ntry {\n abortSignalHasEventHandlerLeakWarning = getMaxListeners(new AbortController().signal) > 0\n} catch {\n abortSignalHasEventHandlerLeakWarning = false\n}\n\nfunction buildAbort (acRef) {\n return abort\n\n function abort () {\n const ac = acRef.deref()\n if (ac !== undefined) {\n // Currently, there is a problem with FinalizationRegistry.\n // https://github.com/nodejs/node/issues/49344\n // https://github.com/nodejs/node/issues/47748\n // In the case of abort, the first step is to unregister from it.\n // If the controller can refer to it, it is still registered.\n // It will be removed in the future.\n requestFinalizer.unregister(abort)\n\n // Unsubscribe a listener.\n // FinalizationRegistry will no longer be called, so this must be done.\n this.removeEventListener('abort', abort)\n\n ac.abort(this.reason)\n\n const controllerList = dependentControllerMap.get(ac.signal)\n\n if (controllerList !== undefined) {\n if (controllerList.size !== 0) {\n for (const ref of controllerList) {\n const ctrl = ref.deref()\n if (ctrl !== undefined) {\n ctrl.abort(this.reason)\n }\n }\n controllerList.clear()\n }\n dependentControllerMap.delete(ac.signal)\n }\n }\n }\n}\n\nlet patchMethodWarning = false\n\n// https://fetch.spec.whatwg.org/#request-class\nclass Request {\n /** @type {AbortSignal} */\n #signal\n\n /** @type {import('../../dispatcher/dispatcher')} */\n #dispatcher\n\n /** @type {Headers} */\n #headers\n\n #state\n\n // https://fetch.spec.whatwg.org/#dom-request\n constructor (input, init = undefined) {\n webidl.util.markAsUncloneable(this)\n\n if (input === kConstruct) {\n return\n }\n\n const prefix = 'Request constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n input = webidl.converters.RequestInfo(input)\n init = webidl.converters.RequestInit(init)\n\n // 1. Let request be null.\n let request = null\n\n // 2. Let fallbackMode be null.\n let fallbackMode = null\n\n // 3. Let baseURL be this’s relevant settings object’s API base URL.\n const baseUrl = environmentSettingsObject.settingsObject.baseUrl\n\n // 4. Let signal be null.\n let signal = null\n\n // 5. If input is a string, then:\n if (typeof input === 'string') {\n this.#dispatcher = init.dispatcher\n\n // 1. Let parsedURL be the result of parsing input with baseURL.\n // 2. If parsedURL is failure, then throw a TypeError.\n let parsedURL\n try {\n parsedURL = new URL(input, baseUrl)\n } catch (err) {\n throw new TypeError('Failed to parse URL from ' + input, { cause: err })\n }\n\n // 3. If parsedURL includes credentials, then throw a TypeError.\n if (parsedURL.username || parsedURL.password) {\n throw new TypeError(\n 'Request cannot be constructed from a URL that includes credentials: ' +\n input\n )\n }\n\n // 4. Set request to a new request whose URL is parsedURL.\n request = makeRequest({ urlList: [parsedURL] })\n\n // 5. Set fallbackMode to \"cors\".\n fallbackMode = 'cors'\n } else {\n // 6. Otherwise:\n\n // 7. Assert: input is a Request object.\n assert(webidl.is.Request(input))\n\n // 8. Set request to input’s request.\n request = input.#state\n\n // 9. Set signal to input’s signal.\n signal = input.#signal\n\n this.#dispatcher = init.dispatcher || input.#dispatcher\n }\n\n // 7. Let origin be this’s relevant settings object’s origin.\n const origin = environmentSettingsObject.settingsObject.origin\n\n // 8. Let window be \"client\".\n let window = 'client'\n\n // 9. If request’s window is an environment settings object and its origin\n // is same origin with origin, then set window to request’s window.\n if (\n request.window?.constructor?.name === 'EnvironmentSettingsObject' &&\n sameOrigin(request.window, origin)\n ) {\n window = request.window\n }\n\n // 10. If init[\"window\"] exists and is non-null, then throw a TypeError.\n if (init.window != null) {\n throw new TypeError(`'window' option '${window}' must be null`)\n }\n\n // 11. If init[\"window\"] exists, then set window to \"no-window\".\n if ('window' in init) {\n window = 'no-window'\n }\n\n // 12. Set request to a new request with the following properties:\n request = makeRequest({\n // URL request’s URL.\n // undici implementation note: this is set as the first item in request's urlList in makeRequest\n // method request’s method.\n method: request.method,\n // header list A copy of request’s header list.\n // undici implementation note: headersList is cloned in makeRequest\n headersList: request.headersList,\n // unsafe-request flag Set.\n unsafeRequest: request.unsafeRequest,\n // client This’s relevant settings object.\n client: environmentSettingsObject.settingsObject,\n // window window.\n window,\n // priority request’s priority.\n priority: request.priority,\n // origin request’s origin. The propagation of the origin is only significant for navigation requests\n // being handled by a service worker. In this scenario a request can have an origin that is different\n // from the current client.\n origin: request.origin,\n // referrer request’s referrer.\n referrer: request.referrer,\n // referrer policy request’s referrer policy.\n referrerPolicy: request.referrerPolicy,\n // mode request’s mode.\n mode: request.mode,\n // credentials mode request’s credentials mode.\n credentials: request.credentials,\n // cache mode request’s cache mode.\n cache: request.cache,\n // redirect mode request’s redirect mode.\n redirect: request.redirect,\n // integrity metadata request’s integrity metadata.\n integrity: request.integrity,\n // keepalive request’s keepalive.\n keepalive: request.keepalive,\n // reload-navigation flag request’s reload-navigation flag.\n reloadNavigation: request.reloadNavigation,\n // history-navigation flag request’s history-navigation flag.\n historyNavigation: request.historyNavigation,\n // URL list A clone of request’s URL list.\n urlList: [...request.urlList]\n })\n\n const initHasKey = Object.keys(init).length !== 0\n\n // 13. If init is not empty, then:\n if (initHasKey) {\n // 1. If request’s mode is \"navigate\", then set it to \"same-origin\".\n if (request.mode === 'navigate') {\n request.mode = 'same-origin'\n }\n\n // 2. Unset request’s reload-navigation flag.\n request.reloadNavigation = false\n\n // 3. Unset request’s history-navigation flag.\n request.historyNavigation = false\n\n // 4. Set request’s origin to \"client\".\n request.origin = 'client'\n\n // 5. Set request’s referrer to \"client\"\n request.referrer = 'client'\n\n // 6. Set request’s referrer policy to the empty string.\n request.referrerPolicy = ''\n\n // 7. Set request’s URL to request’s current URL.\n request.url = request.urlList[request.urlList.length - 1]\n\n // 8. Set request’s URL list to « request’s URL ».\n request.urlList = [request.url]\n }\n\n // 14. If init[\"referrer\"] exists, then:\n if (init.referrer !== undefined) {\n // 1. Let referrer be init[\"referrer\"].\n const referrer = init.referrer\n\n // 2. If referrer is the empty string, then set request’s referrer to \"no-referrer\".\n if (referrer === '') {\n request.referrer = 'no-referrer'\n } else {\n // 1. Let parsedReferrer be the result of parsing referrer with\n // baseURL.\n // 2. If parsedReferrer is failure, then throw a TypeError.\n let parsedReferrer\n try {\n parsedReferrer = new URL(referrer, baseUrl)\n } catch (err) {\n throw new TypeError(`Referrer \"${referrer}\" is not a valid URL.`, { cause: err })\n }\n\n // 3. If one of the following is true\n // - parsedReferrer’s scheme is \"about\" and path is the string \"client\"\n // - parsedReferrer’s origin is not same origin with origin\n // then set request’s referrer to \"client\".\n if (\n (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') ||\n (origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl))\n ) {\n request.referrer = 'client'\n } else {\n // 4. Otherwise, set request’s referrer to parsedReferrer.\n request.referrer = parsedReferrer\n }\n }\n }\n\n // 15. If init[\"referrerPolicy\"] exists, then set request’s referrer policy\n // to it.\n if (init.referrerPolicy !== undefined) {\n request.referrerPolicy = init.referrerPolicy\n }\n\n // 16. Let mode be init[\"mode\"] if it exists, and fallbackMode otherwise.\n let mode\n if (init.mode !== undefined) {\n mode = init.mode\n } else {\n mode = fallbackMode\n }\n\n // 17. If mode is \"navigate\", then throw a TypeError.\n if (mode === 'navigate') {\n throw webidl.errors.exception({\n header: 'Request constructor',\n message: 'invalid request mode navigate.'\n })\n }\n\n // 18. If mode is non-null, set request’s mode to mode.\n if (mode != null) {\n request.mode = mode\n }\n\n // 19. If init[\"credentials\"] exists, then set request’s credentials mode\n // to it.\n if (init.credentials !== undefined) {\n request.credentials = init.credentials\n }\n\n // 18. If init[\"cache\"] exists, then set request’s cache mode to it.\n if (init.cache !== undefined) {\n request.cache = init.cache\n }\n\n // 21. If request’s cache mode is \"only-if-cached\" and request’s mode is\n // not \"same-origin\", then throw a TypeError.\n if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') {\n throw new TypeError(\n \"'only-if-cached' can be set only with 'same-origin' mode\"\n )\n }\n\n // 22. If init[\"redirect\"] exists, then set request’s redirect mode to it.\n if (init.redirect !== undefined) {\n request.redirect = init.redirect\n }\n\n // 23. If init[\"integrity\"] exists, then set request’s integrity metadata to it.\n if (init.integrity != null) {\n request.integrity = String(init.integrity)\n }\n\n // 24. If init[\"keepalive\"] exists, then set request’s keepalive to it.\n if (init.keepalive !== undefined) {\n request.keepalive = Boolean(init.keepalive)\n }\n\n // 25. If init[\"method\"] exists, then:\n if (init.method !== undefined) {\n // 1. Let method be init[\"method\"].\n let method = init.method\n\n const mayBeNormalized = normalizedMethodRecords[method]\n\n if (mayBeNormalized !== undefined) {\n // Note: Bypass validation DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH and these lowercase ones\n request.method = mayBeNormalized\n } else {\n // 2. If method is not a method or method is a forbidden method, then\n // throw a TypeError.\n if (!isValidHTTPToken(method)) {\n throw new TypeError(`'${method}' is not a valid HTTP method.`)\n }\n\n const upperCase = method.toUpperCase()\n\n if (forbiddenMethodsSet.has(upperCase)) {\n throw new TypeError(`'${method}' HTTP method is unsupported.`)\n }\n\n // 3. Normalize method.\n // https://fetch.spec.whatwg.org/#concept-method-normalize\n // Note: must be in uppercase\n method = normalizedMethodRecordsBase[upperCase] ?? method\n\n // 4. Set request’s method to method.\n request.method = method\n }\n\n if (!patchMethodWarning && request.method === 'patch') {\n process.emitWarning('Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.', {\n code: 'UNDICI-FETCH-patch'\n })\n\n patchMethodWarning = true\n }\n }\n\n // 26. If init[\"signal\"] exists, then set signal to it.\n if (init.signal !== undefined) {\n signal = init.signal\n }\n\n // 27. Set this’s request to request.\n this.#state = request\n\n // 28. Set this’s signal to a new AbortSignal object with this’s relevant\n // Realm.\n // TODO: could this be simplified with AbortSignal.any\n // (https://dom.spec.whatwg.org/#dom-abortsignal-any)\n const ac = new AbortController()\n this.#signal = ac.signal\n\n // 29. If signal is not null, then make this’s signal follow signal.\n if (signal != null) {\n if (signal.aborted) {\n ac.abort(signal.reason)\n } else {\n // Keep a strong ref to ac while request object\n // is alive. This is needed to prevent AbortController\n // from being prematurely garbage collected.\n // See, https://github.com/nodejs/undici/issues/1926.\n this[kAbortController] = ac\n\n const acRef = new WeakRef(ac)\n const abort = buildAbort(acRef)\n\n // If the max amount of listeners is equal to the default, increase it\n if (abortSignalHasEventHandlerLeakWarning && getMaxListeners(signal) === defaultMaxListeners) {\n setMaxListeners(1500, signal)\n }\n\n util.addAbortListener(signal, abort)\n // The third argument must be a registry key to be unregistered.\n // Without it, you cannot unregister.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n // abort is used as the unregister key. (because it is unique)\n requestFinalizer.register(ac, { signal, abort }, abort)\n }\n }\n\n // 30. Set this’s headers to a new Headers object with this’s relevant\n // Realm, whose header list is request’s header list and guard is\n // \"request\".\n this.#headers = new Headers(kConstruct)\n setHeadersList(this.#headers, request.headersList)\n setHeadersGuard(this.#headers, 'request')\n\n // 31. If this’s request’s mode is \"no-cors\", then:\n if (mode === 'no-cors') {\n // 1. If this’s request’s method is not a CORS-safelisted method,\n // then throw a TypeError.\n if (!corsSafeListedMethodsSet.has(request.method)) {\n throw new TypeError(\n `'${request.method} is unsupported in no-cors mode.`\n )\n }\n\n // 2. Set this’s headers’s guard to \"request-no-cors\".\n setHeadersGuard(this.#headers, 'request-no-cors')\n }\n\n // 32. If init is not empty, then:\n if (initHasKey) {\n /** @type {HeadersList} */\n const headersList = getHeadersList(this.#headers)\n // 1. Let headers be a copy of this’s headers and its associated header\n // list.\n // 2. If init[\"headers\"] exists, then set headers to init[\"headers\"].\n const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList)\n\n // 3. Empty this’s headers’s header list.\n headersList.clear()\n\n // 4. If headers is a Headers object, then for each header in its header\n // list, append header’s name/header’s value to this’s headers.\n if (headers instanceof HeadersList) {\n for (const { name, value } of headers.rawValues()) {\n headersList.append(name, value, false)\n }\n // Note: Copy the `set-cookie` meta-data.\n headersList.cookies = headers.cookies\n } else {\n // 5. Otherwise, fill this’s headers with headers.\n fillHeaders(this.#headers, headers)\n }\n }\n\n // 33. Let inputBody be input’s request’s body if input is a Request\n // object; otherwise null.\n const inputBody = webidl.is.Request(input) ? input.#state.body : null\n\n // 34. If either init[\"body\"] exists and is non-null or inputBody is\n // non-null, and request’s method is `GET` or `HEAD`, then throw a\n // TypeError.\n if (\n (init.body != null || inputBody != null) &&\n (request.method === 'GET' || request.method === 'HEAD')\n ) {\n throw new TypeError('Request with GET/HEAD method cannot have body.')\n }\n\n // 35. Let initBody be null.\n let initBody = null\n\n // 36. If init[\"body\"] exists and is non-null, then:\n if (init.body != null) {\n // 1. Let Content-Type be null.\n // 2. Set initBody and Content-Type to the result of extracting\n // init[\"body\"], with keepalive set to request’s keepalive.\n const [extractedBody, contentType] = extractBody(\n init.body,\n request.keepalive\n )\n initBody = extractedBody\n\n // 3, If Content-Type is non-null and this’s headers’s header list does\n // not contain `Content-Type`, then append `Content-Type`/Content-Type to\n // this’s headers.\n if (contentType && !getHeadersList(this.#headers).contains('content-type', true)) {\n this.#headers.append('content-type', contentType, true)\n }\n }\n\n // 37. Let inputOrInitBody be initBody if it is non-null; otherwise\n // inputBody.\n const inputOrInitBody = initBody ?? inputBody\n\n // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is\n // null, then:\n if (inputOrInitBody != null && inputOrInitBody.source == null) {\n // 1. If initBody is non-null and init[\"duplex\"] does not exist,\n // then throw a TypeError.\n if (initBody != null && init.duplex == null) {\n throw new TypeError('RequestInit: duplex option is required when sending a body.')\n }\n\n // 2. If this’s request’s mode is neither \"same-origin\" nor \"cors\",\n // then throw a TypeError.\n if (request.mode !== 'same-origin' && request.mode !== 'cors') {\n throw new TypeError(\n 'If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\"'\n )\n }\n\n // 3. Set this’s request’s use-CORS-preflight flag.\n request.useCORSPreflightFlag = true\n }\n\n // 39. Let finalBody be inputOrInitBody.\n let finalBody = inputOrInitBody\n\n // 40. If initBody is null and inputBody is non-null, then:\n if (initBody == null && inputBody != null) {\n // 1. If input is unusable, then throw a TypeError.\n if (bodyUnusable(input.#state)) {\n throw new TypeError(\n 'Cannot construct a Request with a Request object that has already been used.'\n )\n }\n\n // 2. Set finalBody to the result of creating a proxy for inputBody.\n // https://streams.spec.whatwg.org/#readablestream-create-a-proxy\n const identityTransform = new TransformStream()\n inputBody.stream.pipeThrough(identityTransform)\n finalBody = {\n source: inputBody.source,\n length: inputBody.length,\n stream: identityTransform.readable\n }\n }\n\n // 41. Set this’s request’s body to finalBody.\n this.#state.body = finalBody\n }\n\n // Returns request’s HTTP method, which is \"GET\" by default.\n get method () {\n webidl.brandCheck(this, Request)\n\n // The method getter steps are to return this’s request’s method.\n return this.#state.method\n }\n\n // Returns the URL of request as a string.\n get url () {\n webidl.brandCheck(this, Request)\n\n // The url getter steps are to return this’s request’s URL, serialized.\n return URLSerializer(this.#state.url)\n }\n\n // Returns a Headers object consisting of the headers associated with request.\n // Note that headers added in the network layer by the user agent will not\n // be accounted for in this object, e.g., the \"Host\" header.\n get headers () {\n webidl.brandCheck(this, Request)\n\n // The headers getter steps are to return this’s headers.\n return this.#headers\n }\n\n // Returns the kind of resource requested by request, e.g., \"document\"\n // or \"script\".\n get destination () {\n webidl.brandCheck(this, Request)\n\n // The destination getter are to return this’s request’s destination.\n return this.#state.destination\n }\n\n // Returns the referrer of request. Its value can be a same-origin URL if\n // explicitly set in init, the empty string to indicate no referrer, and\n // \"about:client\" when defaulting to the global’s default. This is used\n // during fetching to determine the value of the `Referer` header of the\n // request being made.\n get referrer () {\n webidl.brandCheck(this, Request)\n\n // 1. If this’s request’s referrer is \"no-referrer\", then return the\n // empty string.\n if (this.#state.referrer === 'no-referrer') {\n return ''\n }\n\n // 2. If this’s request’s referrer is \"client\", then return\n // \"about:client\".\n if (this.#state.referrer === 'client') {\n return 'about:client'\n }\n\n // Return this’s request’s referrer, serialized.\n return this.#state.referrer.toString()\n }\n\n // Returns the referrer policy associated with request.\n // This is used during fetching to compute the value of the request’s\n // referrer.\n get referrerPolicy () {\n webidl.brandCheck(this, Request)\n\n // The referrerPolicy getter steps are to return this’s request’s referrer policy.\n return this.#state.referrerPolicy\n }\n\n // Returns the mode associated with request, which is a string indicating\n // whether the request will use CORS, or will be restricted to same-origin\n // URLs.\n get mode () {\n webidl.brandCheck(this, Request)\n\n // The mode getter steps are to return this’s request’s mode.\n return this.#state.mode\n }\n\n // Returns the credentials mode associated with request,\n // which is a string indicating whether credentials will be sent with the\n // request always, never, or only when sent to a same-origin URL.\n get credentials () {\n webidl.brandCheck(this, Request)\n\n // The credentials getter steps are to return this’s request’s credentials mode.\n return this.#state.credentials\n }\n\n // Returns the cache mode associated with request,\n // which is a string indicating how the request will\n // interact with the browser’s cache when fetching.\n get cache () {\n webidl.brandCheck(this, Request)\n\n // The cache getter steps are to return this’s request’s cache mode.\n return this.#state.cache\n }\n\n // Returns the redirect mode associated with request,\n // which is a string indicating how redirects for the\n // request will be handled during fetching. A request\n // will follow redirects by default.\n get redirect () {\n webidl.brandCheck(this, Request)\n\n // The redirect getter steps are to return this’s request’s redirect mode.\n return this.#state.redirect\n }\n\n // Returns request’s subresource integrity metadata, which is a\n // cryptographic hash of the resource being fetched. Its value\n // consists of multiple hashes separated by whitespace. [SRI]\n get integrity () {\n webidl.brandCheck(this, Request)\n\n // The integrity getter steps are to return this’s request’s integrity\n // metadata.\n return this.#state.integrity\n }\n\n // Returns a boolean indicating whether or not request can outlive the\n // global in which it was created.\n get keepalive () {\n webidl.brandCheck(this, Request)\n\n // The keepalive getter steps are to return this’s request’s keepalive.\n return this.#state.keepalive\n }\n\n // Returns a boolean indicating whether or not request is for a reload\n // navigation.\n get isReloadNavigation () {\n webidl.brandCheck(this, Request)\n\n // The isReloadNavigation getter steps are to return true if this’s\n // request’s reload-navigation flag is set; otherwise false.\n return this.#state.reloadNavigation\n }\n\n // Returns a boolean indicating whether or not request is for a history\n // navigation (a.k.a. back-forward navigation).\n get isHistoryNavigation () {\n webidl.brandCheck(this, Request)\n\n // The isHistoryNavigation getter steps are to return true if this’s request’s\n // history-navigation flag is set; otherwise false.\n return this.#state.historyNavigation\n }\n\n // Returns the signal associated with request, which is an AbortSignal\n // object indicating whether or not request has been aborted, and its\n // abort event handler.\n get signal () {\n webidl.brandCheck(this, Request)\n\n // The signal getter steps are to return this’s signal.\n return this.#signal\n }\n\n get body () {\n webidl.brandCheck(this, Request)\n\n return this.#state.body ? this.#state.body.stream : null\n }\n\n get bodyUsed () {\n webidl.brandCheck(this, Request)\n\n return !!this.#state.body && util.isDisturbed(this.#state.body.stream)\n }\n\n get duplex () {\n webidl.brandCheck(this, Request)\n\n return 'half'\n }\n\n // Returns a clone of request.\n clone () {\n webidl.brandCheck(this, Request)\n\n // 1. If this is unusable, then throw a TypeError.\n if (bodyUnusable(this.#state)) {\n throw new TypeError('unusable')\n }\n\n // 2. Let clonedRequest be the result of cloning this’s request.\n const clonedRequest = cloneRequest(this.#state)\n\n // 3. Let clonedRequestObject be the result of creating a Request object,\n // given clonedRequest, this’s headers’s guard, and this’s relevant Realm.\n // 4. Make clonedRequestObject’s signal follow this’s signal.\n const ac = new AbortController()\n if (this.signal.aborted) {\n ac.abort(this.signal.reason)\n } else {\n let list = dependentControllerMap.get(this.signal)\n if (list === undefined) {\n list = new Set()\n dependentControllerMap.set(this.signal, list)\n }\n const acRef = new WeakRef(ac)\n list.add(acRef)\n util.addAbortListener(\n ac.signal,\n buildAbort(acRef)\n )\n }\n\n // 4. Return clonedRequestObject.\n return fromInnerRequest(clonedRequest, this.#dispatcher, ac.signal, getHeadersGuard(this.#headers))\n }\n\n [nodeUtil.inspect.custom] (depth, options) {\n if (options.depth === null) {\n options.depth = 2\n }\n\n options.colors ??= true\n\n const properties = {\n method: this.method,\n url: this.url,\n headers: this.headers,\n destination: this.destination,\n referrer: this.referrer,\n referrerPolicy: this.referrerPolicy,\n mode: this.mode,\n credentials: this.credentials,\n cache: this.cache,\n redirect: this.redirect,\n integrity: this.integrity,\n keepalive: this.keepalive,\n isReloadNavigation: this.isReloadNavigation,\n isHistoryNavigation: this.isHistoryNavigation,\n signal: this.signal\n }\n\n return `Request ${nodeUtil.formatWithOptions(options, properties)}`\n }\n\n /**\n * @param {Request} request\n * @param {AbortSignal} newSignal\n */\n static setRequestSignal (request, newSignal) {\n request.#signal = newSignal\n return request\n }\n\n /**\n * @param {Request} request\n */\n static getRequestDispatcher (request) {\n return request.#dispatcher\n }\n\n /**\n * @param {Request} request\n * @param {import('../../dispatcher/dispatcher')} newDispatcher\n */\n static setRequestDispatcher (request, newDispatcher) {\n request.#dispatcher = newDispatcher\n }\n\n /**\n * @param {Request} request\n * @param {Headers} newHeaders\n */\n static setRequestHeaders (request, newHeaders) {\n request.#headers = newHeaders\n }\n\n /**\n * @param {Request} request\n */\n static getRequestState (request) {\n return request.#state\n }\n\n /**\n * @param {Request} request\n * @param {any} newState\n */\n static setRequestState (request, newState) {\n request.#state = newState\n }\n}\n\nconst { setRequestSignal, getRequestDispatcher, setRequestDispatcher, setRequestHeaders, getRequestState, setRequestState } = Request\nReflect.deleteProperty(Request, 'setRequestSignal')\nReflect.deleteProperty(Request, 'getRequestDispatcher')\nReflect.deleteProperty(Request, 'setRequestDispatcher')\nReflect.deleteProperty(Request, 'setRequestHeaders')\nReflect.deleteProperty(Request, 'getRequestState')\nReflect.deleteProperty(Request, 'setRequestState')\n\nmixinBody(Request, getRequestState)\n\n// https://fetch.spec.whatwg.org/#requests\nfunction makeRequest (init) {\n return {\n method: init.method ?? 'GET',\n localURLsOnly: init.localURLsOnly ?? false,\n unsafeRequest: init.unsafeRequest ?? false,\n body: init.body ?? null,\n client: init.client ?? null,\n reservedClient: init.reservedClient ?? null,\n replacesClientId: init.replacesClientId ?? '',\n window: init.window ?? 'client',\n keepalive: init.keepalive ?? false,\n serviceWorkers: init.serviceWorkers ?? 'all',\n initiator: init.initiator ?? '',\n destination: init.destination ?? '',\n priority: init.priority ?? null,\n origin: init.origin ?? 'client',\n policyContainer: init.policyContainer ?? 'client',\n referrer: init.referrer ?? 'client',\n referrerPolicy: init.referrerPolicy ?? '',\n mode: init.mode ?? 'no-cors',\n useCORSPreflightFlag: init.useCORSPreflightFlag ?? false,\n credentials: init.credentials ?? 'same-origin',\n useCredentials: init.useCredentials ?? false,\n cache: init.cache ?? 'default',\n redirect: init.redirect ?? 'follow',\n integrity: init.integrity ?? '',\n cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? '',\n parserMetadata: init.parserMetadata ?? '',\n reloadNavigation: init.reloadNavigation ?? false,\n historyNavigation: init.historyNavigation ?? false,\n userActivation: init.userActivation ?? false,\n taintedOrigin: init.taintedOrigin ?? false,\n redirectCount: init.redirectCount ?? 0,\n responseTainting: init.responseTainting ?? 'basic',\n preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false,\n done: init.done ?? false,\n timingAllowFailed: init.timingAllowFailed ?? false,\n useURLCredentials: init.useURLCredentials ?? undefined,\n traversableForUserPrompts: init.traversableForUserPrompts ?? 'client',\n urlList: init.urlList,\n url: init.urlList[0],\n headersList: init.headersList\n ? new HeadersList(init.headersList)\n : new HeadersList()\n }\n}\n\n// https://fetch.spec.whatwg.org/#concept-request-clone\nfunction cloneRequest (request) {\n // To clone a request request, run these steps:\n\n // 1. Let newRequest be a copy of request, except for its body.\n const newRequest = makeRequest({ ...request, body: null })\n\n // 2. If request’s body is non-null, set newRequest’s body to the\n // result of cloning request’s body.\n if (request.body != null) {\n newRequest.body = cloneBody(request.body)\n }\n\n // 3. Return newRequest.\n return newRequest\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#request-create\n * @param {any} innerRequest\n * @param {import('../../dispatcher/agent')} dispatcher\n * @param {AbortSignal} signal\n * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard\n * @returns {Request}\n */\nfunction fromInnerRequest (innerRequest, dispatcher, signal, guard) {\n const request = new Request(kConstruct)\n setRequestState(request, innerRequest)\n setRequestDispatcher(request, dispatcher)\n setRequestSignal(request, signal)\n const headers = new Headers(kConstruct)\n setRequestHeaders(request, headers)\n setHeadersList(headers, innerRequest.headersList)\n setHeadersGuard(headers, guard)\n return request\n}\n\nObject.defineProperties(Request.prototype, {\n method: kEnumerableProperty,\n url: kEnumerableProperty,\n headers: kEnumerableProperty,\n redirect: kEnumerableProperty,\n clone: kEnumerableProperty,\n signal: kEnumerableProperty,\n duplex: kEnumerableProperty,\n destination: kEnumerableProperty,\n body: kEnumerableProperty,\n bodyUsed: kEnumerableProperty,\n isHistoryNavigation: kEnumerableProperty,\n isReloadNavigation: kEnumerableProperty,\n keepalive: kEnumerableProperty,\n integrity: kEnumerableProperty,\n cache: kEnumerableProperty,\n credentials: kEnumerableProperty,\n attribute: kEnumerableProperty,\n referrerPolicy: kEnumerableProperty,\n referrer: kEnumerableProperty,\n mode: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'Request',\n configurable: true\n }\n})\n\nwebidl.is.Request = webidl.util.MakeTypeAssertion(Request)\n\n/**\n * @param {*} V\n * @returns {import('../../../types/fetch').Request|string}\n *\n * @see https://fetch.spec.whatwg.org/#requestinfo\n */\nwebidl.converters.RequestInfo = function (V) {\n if (typeof V === 'string') {\n return webidl.converters.USVString(V)\n }\n\n if (webidl.is.Request(V)) {\n return V\n }\n\n return webidl.converters.USVString(V)\n}\n\n/**\n * @param {*} V\n * @returns {import('../../../types/fetch').RequestInit}\n * @see https://fetch.spec.whatwg.org/#requestinit\n */\nwebidl.converters.RequestInit = webidl.dictionaryConverter([\n {\n key: 'method',\n converter: webidl.converters.ByteString\n },\n {\n key: 'headers',\n converter: webidl.converters.HeadersInit\n },\n {\n key: 'body',\n converter: webidl.nullableConverter(\n webidl.converters.BodyInit\n )\n },\n {\n key: 'referrer',\n converter: webidl.converters.USVString\n },\n {\n key: 'referrerPolicy',\n converter: webidl.converters.DOMString,\n // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy\n allowedValues: referrerPolicy\n },\n {\n key: 'mode',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#concept-request-mode\n allowedValues: requestMode\n },\n {\n key: 'credentials',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestcredentials\n allowedValues: requestCredentials\n },\n {\n key: 'cache',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestcache\n allowedValues: requestCache\n },\n {\n key: 'redirect',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestredirect\n allowedValues: requestRedirect\n },\n {\n key: 'integrity',\n converter: webidl.converters.DOMString\n },\n {\n key: 'keepalive',\n converter: webidl.converters.boolean\n },\n {\n key: 'signal',\n converter: webidl.nullableConverter(\n (signal) => webidl.converters.AbortSignal(\n signal,\n 'RequestInit',\n 'signal'\n )\n )\n },\n {\n key: 'window',\n converter: webidl.converters.any\n },\n {\n key: 'duplex',\n converter: webidl.converters.DOMString,\n allowedValues: requestDuplex\n },\n {\n key: 'dispatcher', // undici specific option\n converter: webidl.converters.any\n },\n {\n key: 'priority',\n converter: webidl.converters.DOMString,\n allowedValues: ['high', 'low', 'auto'],\n defaultValue: () => 'auto'\n }\n])\n\nmodule.exports = {\n Request,\n makeRequest,\n fromInnerRequest,\n cloneRequest,\n getRequestDispatcher,\n getRequestState\n}\n","'use strict'\n\nconst { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require('./headers')\nconst { extractBody, cloneBody, mixinBody, streamRegistry, bodyUnusable } = require('./body')\nconst util = require('../../core/util')\nconst nodeUtil = require('node:util')\nconst { kEnumerableProperty } = util\nconst {\n isValidReasonPhrase,\n isCancelled,\n isAborted,\n isErrorLike,\n environmentSettingsObject: relevantRealm\n} = require('./util')\nconst {\n redirectStatusSet,\n nullBodyStatus\n} = require('./constants')\nconst { webidl } = require('../webidl')\nconst { URLSerializer } = require('./data-url')\nconst { kConstruct } = require('../../core/symbols')\nconst assert = require('node:assert')\nconst { isomorphicEncode, serializeJavascriptValueToJSONString } = require('../infra')\n\nconst textEncoder = new TextEncoder('utf-8')\n\n// https://fetch.spec.whatwg.org/#response-class\nclass Response {\n /** @type {Headers} */\n #headers\n\n #state\n\n // Creates network error Response.\n static error () {\n // The static error() method steps are to return the result of creating a\n // Response object, given a new network error, \"immutable\", and this’s\n // relevant Realm.\n const responseObject = fromInnerResponse(makeNetworkError(), 'immutable')\n\n return responseObject\n }\n\n // https://fetch.spec.whatwg.org/#dom-response-json\n static json (data, init = undefined) {\n webidl.argumentLengthCheck(arguments, 1, 'Response.json')\n\n if (init !== null) {\n init = webidl.converters.ResponseInit(init)\n }\n\n // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data.\n const bytes = textEncoder.encode(\n serializeJavascriptValueToJSONString(data)\n )\n\n // 2. Let body be the result of extracting bytes.\n const body = extractBody(bytes)\n\n // 3. Let responseObject be the result of creating a Response object, given a new response,\n // \"response\", and this’s relevant Realm.\n const responseObject = fromInnerResponse(makeResponse({}), 'response')\n\n // 4. Perform initialize a response given responseObject, init, and (body, \"application/json\").\n initializeResponse(responseObject, init, { body: body[0], type: 'application/json' })\n\n // 5. Return responseObject.\n return responseObject\n }\n\n // Creates a redirect Response that redirects to url with status status.\n static redirect (url, status = 302) {\n webidl.argumentLengthCheck(arguments, 1, 'Response.redirect')\n\n url = webidl.converters.USVString(url)\n status = webidl.converters['unsigned short'](status)\n\n // 1. Let parsedURL be the result of parsing url with current settings\n // object’s API base URL.\n // 2. If parsedURL is failure, then throw a TypeError.\n // TODO: base-URL?\n let parsedURL\n try {\n parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl)\n } catch (err) {\n throw new TypeError(`Failed to parse URL from ${url}`, { cause: err })\n }\n\n // 3. If status is not a redirect status, then throw a RangeError.\n if (!redirectStatusSet.has(status)) {\n throw new RangeError(`Invalid status code ${status}`)\n }\n\n // 4. Let responseObject be the result of creating a Response object,\n // given a new response, \"immutable\", and this’s relevant Realm.\n const responseObject = fromInnerResponse(makeResponse({}), 'immutable')\n\n // 5. Set responseObject’s response’s status to status.\n responseObject.#state.status = status\n\n // 6. Let value be parsedURL, serialized and isomorphic encoded.\n const value = isomorphicEncode(URLSerializer(parsedURL))\n\n // 7. Append `Location`/value to responseObject’s response’s header list.\n responseObject.#state.headersList.append('location', value, true)\n\n // 8. Return responseObject.\n return responseObject\n }\n\n // https://fetch.spec.whatwg.org/#dom-response\n constructor (body = null, init = undefined) {\n webidl.util.markAsUncloneable(this)\n\n if (body === kConstruct) {\n return\n }\n\n if (body !== null) {\n body = webidl.converters.BodyInit(body, 'Response', 'body')\n }\n\n init = webidl.converters.ResponseInit(init)\n\n // 1. Set this’s response to a new response.\n this.#state = makeResponse({})\n\n // 2. Set this’s headers to a new Headers object with this’s relevant\n // Realm, whose header list is this’s response’s header list and guard\n // is \"response\".\n this.#headers = new Headers(kConstruct)\n setHeadersGuard(this.#headers, 'response')\n setHeadersList(this.#headers, this.#state.headersList)\n\n // 3. Let bodyWithType be null.\n let bodyWithType = null\n\n // 4. If body is non-null, then set bodyWithType to the result of extracting body.\n if (body != null) {\n const [extractedBody, type] = extractBody(body)\n bodyWithType = { body: extractedBody, type }\n }\n\n // 5. Perform initialize a response given this, init, and bodyWithType.\n initializeResponse(this, init, bodyWithType)\n }\n\n // Returns response’s type, e.g., \"cors\".\n get type () {\n webidl.brandCheck(this, Response)\n\n // The type getter steps are to return this’s response’s type.\n return this.#state.type\n }\n\n // Returns response’s URL, if it has one; otherwise the empty string.\n get url () {\n webidl.brandCheck(this, Response)\n\n const urlList = this.#state.urlList\n\n // The url getter steps are to return the empty string if this’s\n // response’s URL is null; otherwise this’s response’s URL,\n // serialized with exclude fragment set to true.\n const url = urlList[urlList.length - 1] ?? null\n\n if (url === null) {\n return ''\n }\n\n return URLSerializer(url, true)\n }\n\n // Returns whether response was obtained through a redirect.\n get redirected () {\n webidl.brandCheck(this, Response)\n\n // The redirected getter steps are to return true if this’s response’s URL\n // list has more than one item; otherwise false.\n return this.#state.urlList.length > 1\n }\n\n // Returns response’s status.\n get status () {\n webidl.brandCheck(this, Response)\n\n // The status getter steps are to return this’s response’s status.\n return this.#state.status\n }\n\n // Returns whether response’s status is an ok status.\n get ok () {\n webidl.brandCheck(this, Response)\n\n // The ok getter steps are to return true if this’s response’s status is an\n // ok status; otherwise false.\n return this.#state.status >= 200 && this.#state.status <= 299\n }\n\n // Returns response’s status message.\n get statusText () {\n webidl.brandCheck(this, Response)\n\n // The statusText getter steps are to return this’s response’s status\n // message.\n return this.#state.statusText\n }\n\n // Returns response’s headers as Headers.\n get headers () {\n webidl.brandCheck(this, Response)\n\n // The headers getter steps are to return this’s headers.\n return this.#headers\n }\n\n get body () {\n webidl.brandCheck(this, Response)\n\n return this.#state.body ? this.#state.body.stream : null\n }\n\n get bodyUsed () {\n webidl.brandCheck(this, Response)\n\n return !!this.#state.body && util.isDisturbed(this.#state.body.stream)\n }\n\n // Returns a clone of response.\n clone () {\n webidl.brandCheck(this, Response)\n\n // 1. If this is unusable, then throw a TypeError.\n if (bodyUnusable(this.#state)) {\n throw webidl.errors.exception({\n header: 'Response.clone',\n message: 'Body has already been consumed.'\n })\n }\n\n // 2. Let clonedResponse be the result of cloning this’s response.\n const clonedResponse = cloneResponse(this.#state)\n\n // Note: To re-register because of a new stream.\n // Don't set finalizers other than for fetch responses.\n if (this.#state.urlList.length !== 0 && this.#state.body?.stream) {\n streamRegistry.register(this, new WeakRef(this.#state.body.stream))\n }\n\n // 3. Return the result of creating a Response object, given\n // clonedResponse, this’s headers’s guard, and this’s relevant Realm.\n return fromInnerResponse(clonedResponse, getHeadersGuard(this.#headers))\n }\n\n [nodeUtil.inspect.custom] (depth, options) {\n if (options.depth === null) {\n options.depth = 2\n }\n\n options.colors ??= true\n\n const properties = {\n status: this.status,\n statusText: this.statusText,\n headers: this.headers,\n body: this.body,\n bodyUsed: this.bodyUsed,\n ok: this.ok,\n redirected: this.redirected,\n type: this.type,\n url: this.url\n }\n\n return `Response ${nodeUtil.formatWithOptions(options, properties)}`\n }\n\n /**\n * @param {Response} response\n */\n static getResponseHeaders (response) {\n return response.#headers\n }\n\n /**\n * @param {Response} response\n * @param {Headers} newHeaders\n */\n static setResponseHeaders (response, newHeaders) {\n response.#headers = newHeaders\n }\n\n /**\n * @param {Response} response\n */\n static getResponseState (response) {\n return response.#state\n }\n\n /**\n * @param {Response} response\n * @param {any} newState\n */\n static setResponseState (response, newState) {\n response.#state = newState\n }\n}\n\nconst { getResponseHeaders, setResponseHeaders, getResponseState, setResponseState } = Response\nReflect.deleteProperty(Response, 'getResponseHeaders')\nReflect.deleteProperty(Response, 'setResponseHeaders')\nReflect.deleteProperty(Response, 'getResponseState')\nReflect.deleteProperty(Response, 'setResponseState')\n\nmixinBody(Response, getResponseState)\n\nObject.defineProperties(Response.prototype, {\n type: kEnumerableProperty,\n url: kEnumerableProperty,\n status: kEnumerableProperty,\n ok: kEnumerableProperty,\n redirected: kEnumerableProperty,\n statusText: kEnumerableProperty,\n headers: kEnumerableProperty,\n clone: kEnumerableProperty,\n body: kEnumerableProperty,\n bodyUsed: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'Response',\n configurable: true\n }\n})\n\nObject.defineProperties(Response, {\n json: kEnumerableProperty,\n redirect: kEnumerableProperty,\n error: kEnumerableProperty\n})\n\n// https://fetch.spec.whatwg.org/#concept-response-clone\nfunction cloneResponse (response) {\n // To clone a response response, run these steps:\n\n // 1. If response is a filtered response, then return a new identical\n // filtered response whose internal response is a clone of response’s\n // internal response.\n if (response.internalResponse) {\n return filterResponse(\n cloneResponse(response.internalResponse),\n response.type\n )\n }\n\n // 2. Let newResponse be a copy of response, except for its body.\n const newResponse = makeResponse({ ...response, body: null })\n\n // 3. If response’s body is non-null, then set newResponse’s body to the\n // result of cloning response’s body.\n if (response.body != null) {\n newResponse.body = cloneBody(response.body)\n }\n\n // 4. Return newResponse.\n return newResponse\n}\n\nfunction makeResponse (init) {\n return {\n aborted: false,\n rangeRequested: false,\n timingAllowPassed: false,\n requestIncludesCredentials: false,\n type: 'default',\n status: 200,\n timingInfo: null,\n cacheState: '',\n statusText: '',\n ...init,\n headersList: init?.headersList\n ? new HeadersList(init?.headersList)\n : new HeadersList(),\n urlList: init?.urlList ? [...init.urlList] : []\n }\n}\n\nfunction makeNetworkError (reason) {\n const isError = isErrorLike(reason)\n return makeResponse({\n type: 'error',\n status: 0,\n error: isError\n ? reason\n : new Error(reason ? String(reason) : reason),\n aborted: reason && reason.name === 'AbortError'\n })\n}\n\n// @see https://fetch.spec.whatwg.org/#concept-network-error\nfunction isNetworkError (response) {\n return (\n // A network error is a response whose type is \"error\",\n response.type === 'error' &&\n // status is 0\n response.status === 0\n )\n}\n\nfunction makeFilteredResponse (response, state) {\n state = {\n internalResponse: response,\n ...state\n }\n\n return new Proxy(response, {\n get (target, p) {\n return p in state ? state[p] : target[p]\n },\n set (target, p, value) {\n assert(!(p in state))\n target[p] = value\n return true\n }\n })\n}\n\n// https://fetch.spec.whatwg.org/#concept-filtered-response\nfunction filterResponse (response, type) {\n // Set response to the following filtered response with response as its\n // internal response, depending on request’s response tainting:\n if (type === 'basic') {\n // A basic filtered response is a filtered response whose type is \"basic\"\n // and header list excludes any headers in internal response’s header list\n // whose name is a forbidden response-header name.\n\n // Note: undici does not implement forbidden response-header names\n return makeFilteredResponse(response, {\n type: 'basic',\n headersList: response.headersList\n })\n } else if (type === 'cors') {\n // A CORS filtered response is a filtered response whose type is \"cors\"\n // and header list excludes any headers in internal response’s header\n // list whose name is not a CORS-safelisted response-header name, given\n // internal response’s CORS-exposed header-name list.\n\n // Note: undici does not implement CORS-safelisted response-header names\n return makeFilteredResponse(response, {\n type: 'cors',\n headersList: response.headersList\n })\n } else if (type === 'opaque') {\n // An opaque filtered response is a filtered response whose type is\n // \"opaque\", URL list is the empty list, status is 0, status message\n // is the empty byte sequence, header list is empty, and body is null.\n\n return makeFilteredResponse(response, {\n type: 'opaque',\n urlList: [],\n status: 0,\n statusText: '',\n body: null\n })\n } else if (type === 'opaqueredirect') {\n // An opaque-redirect filtered response is a filtered response whose type\n // is \"opaqueredirect\", status is 0, status message is the empty byte\n // sequence, header list is empty, and body is null.\n\n return makeFilteredResponse(response, {\n type: 'opaqueredirect',\n status: 0,\n statusText: '',\n headersList: [],\n body: null\n })\n } else {\n assert(false)\n }\n}\n\n// https://fetch.spec.whatwg.org/#appropriate-network-error\nfunction makeAppropriateNetworkError (fetchParams, err = null) {\n // 1. Assert: fetchParams is canceled.\n assert(isCancelled(fetchParams))\n\n // 2. Return an aborted network error if fetchParams is aborted;\n // otherwise return a network error.\n return isAborted(fetchParams)\n ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err }))\n : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err }))\n}\n\n// https://whatpr.org/fetch/1392.html#initialize-a-response\nfunction initializeResponse (response, init, body) {\n // 1. If init[\"status\"] is not in the range 200 to 599, inclusive, then\n // throw a RangeError.\n if (init.status !== null && (init.status < 200 || init.status > 599)) {\n throw new RangeError('init[\"status\"] must be in the range of 200 to 599, inclusive.')\n }\n\n // 2. If init[\"statusText\"] does not match the reason-phrase token production,\n // then throw a TypeError.\n if ('statusText' in init && init.statusText != null) {\n // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2:\n // reason-phrase = *( HTAB / SP / VCHAR / obs-text )\n if (!isValidReasonPhrase(String(init.statusText))) {\n throw new TypeError('Invalid statusText')\n }\n }\n\n // 3. Set response’s response’s status to init[\"status\"].\n if ('status' in init && init.status != null) {\n getResponseState(response).status = init.status\n }\n\n // 4. Set response’s response’s status message to init[\"statusText\"].\n if ('statusText' in init && init.statusText != null) {\n getResponseState(response).statusText = init.statusText\n }\n\n // 5. If init[\"headers\"] exists, then fill response’s headers with init[\"headers\"].\n if ('headers' in init && init.headers != null) {\n fill(getResponseHeaders(response), init.headers)\n }\n\n // 6. If body was given, then:\n if (body) {\n // 1. If response's status is a null body status, then throw a TypeError.\n if (nullBodyStatus.includes(response.status)) {\n throw webidl.errors.exception({\n header: 'Response constructor',\n message: `Invalid response status code ${response.status}`\n })\n }\n\n // 2. Set response's body to body's body.\n getResponseState(response).body = body.body\n\n // 3. If body's type is non-null and response's header list does not contain\n // `Content-Type`, then append (`Content-Type`, body's type) to response's header list.\n if (body.type != null && !getResponseState(response).headersList.contains('content-type', true)) {\n getResponseState(response).headersList.append('content-type', body.type, true)\n }\n }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#response-create\n * @param {any} innerResponse\n * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard\n * @returns {Response}\n */\nfunction fromInnerResponse (innerResponse, guard) {\n const response = new Response(kConstruct)\n setResponseState(response, innerResponse)\n const headers = new Headers(kConstruct)\n setResponseHeaders(response, headers)\n setHeadersList(headers, innerResponse.headersList)\n setHeadersGuard(headers, guard)\n\n // Note: If innerResponse's urlList contains a URL, it is a fetch response.\n if (innerResponse.urlList.length !== 0 && innerResponse.body?.stream) {\n // If the target (response) is reclaimed, the cleanup callback may be called at some point with\n // the held value provided for it (innerResponse.body.stream). The held value can be any value:\n // a primitive or an object, even undefined. If the held value is an object, the registry keeps\n // a strong reference to it (so it can pass it to the cleanup callback later). Reworded from\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n streamRegistry.register(response, new WeakRef(innerResponse.body.stream))\n }\n\n return response\n}\n\n// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit\nwebidl.converters.XMLHttpRequestBodyInit = function (V, prefix, name) {\n if (typeof V === 'string') {\n return webidl.converters.USVString(V, prefix, name)\n }\n\n if (webidl.is.Blob(V)) {\n return V\n }\n\n if (webidl.is.BufferSource(V)) {\n return V\n }\n\n if (webidl.is.FormData(V)) {\n return V\n }\n\n if (webidl.is.URLSearchParams(V)) {\n return V\n }\n\n return webidl.converters.DOMString(V, prefix, name)\n}\n\n// https://fetch.spec.whatwg.org/#bodyinit\nwebidl.converters.BodyInit = function (V, prefix, argument) {\n if (webidl.is.ReadableStream(V)) {\n return V\n }\n\n // Note: the spec doesn't include async iterables,\n // this is an undici extension.\n if (V?.[Symbol.asyncIterator]) {\n return V\n }\n\n return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument)\n}\n\nwebidl.converters.ResponseInit = webidl.dictionaryConverter([\n {\n key: 'status',\n converter: webidl.converters['unsigned short'],\n defaultValue: () => 200\n },\n {\n key: 'statusText',\n converter: webidl.converters.ByteString,\n defaultValue: () => ''\n },\n {\n key: 'headers',\n converter: webidl.converters.HeadersInit\n }\n])\n\nwebidl.is.Response = webidl.util.MakeTypeAssertion(Response)\n\nmodule.exports = {\n isNetworkError,\n makeNetworkError,\n makeResponse,\n makeAppropriateNetworkError,\n filterResponse,\n Response,\n cloneResponse,\n fromInnerResponse,\n getResponseState\n}\n","'use strict'\n\nconst { Transform } = require('node:stream')\nconst zlib = require('node:zlib')\nconst { redirectStatusSet, referrerPolicyTokens, badPortsSet } = require('./constants')\nconst { getGlobalOrigin } = require('./global')\nconst { collectAnHTTPQuotedString, parseMIMEType } = require('./data-url')\nconst { performance } = require('node:perf_hooks')\nconst { ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require('../../core/util')\nconst assert = require('node:assert')\nconst { isUint8Array } = require('node:util/types')\nconst { webidl } = require('../webidl')\nconst { isomorphicEncode, collectASequenceOfCodePoints, removeChars } = require('../infra')\n\nfunction responseURL (response) {\n // https://fetch.spec.whatwg.org/#responses\n // A response has an associated URL. It is a pointer to the last URL\n // in response’s URL list and null if response’s URL list is empty.\n const urlList = response.urlList\n const length = urlList.length\n return length === 0 ? null : urlList[length - 1].toString()\n}\n\n// https://fetch.spec.whatwg.org/#concept-response-location-url\nfunction responseLocationURL (response, requestFragment) {\n // 1. If response’s status is not a redirect status, then return null.\n if (!redirectStatusSet.has(response.status)) {\n return null\n }\n\n // 2. Let location be the result of extracting header list values given\n // `Location` and response’s header list.\n let location = response.headersList.get('location', true)\n\n // 3. If location is a header value, then set location to the result of\n // parsing location with response’s URL.\n if (location !== null && isValidHeaderValue(location)) {\n if (!isValidEncodedURL(location)) {\n // Some websites respond location header in UTF-8 form without encoding them as ASCII\n // and major browsers redirect them to correctly UTF-8 encoded addresses.\n // Here, we handle that behavior in the same way.\n location = normalizeBinaryStringToUtf8(location)\n }\n location = new URL(location, responseURL(response))\n }\n\n // 4. If location is a URL whose fragment is null, then set location’s\n // fragment to requestFragment.\n if (location && !location.hash) {\n location.hash = requestFragment\n }\n\n // 5. Return location.\n return location\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2\n * @param {string} url\n * @returns {boolean}\n */\nfunction isValidEncodedURL (url) {\n for (let i = 0; i < url.length; ++i) {\n const code = url.charCodeAt(i)\n\n if (\n code > 0x7E || // Non-US-ASCII + DEL\n code < 0x20 // Control characters NUL - US\n ) {\n return false\n }\n }\n return true\n}\n\n/**\n * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it.\n * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well.\n * @param {string} value\n * @returns {string}\n */\nfunction normalizeBinaryStringToUtf8 (value) {\n return Buffer.from(value, 'binary').toString('utf8')\n}\n\n/** @returns {URL} */\nfunction requestCurrentURL (request) {\n return request.urlList[request.urlList.length - 1]\n}\n\nfunction requestBadPort (request) {\n // 1. Let url be request’s current URL.\n const url = requestCurrentURL(request)\n\n // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port,\n // then return blocked.\n if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) {\n return 'blocked'\n }\n\n // 3. Return allowed.\n return 'allowed'\n}\n\nfunction isErrorLike (object) {\n return object instanceof Error || (\n object?.constructor?.name === 'Error' ||\n object?.constructor?.name === 'DOMException'\n )\n}\n\n// Check whether |statusText| is a ByteString and\n// matches the Reason-Phrase token production.\n// RFC 2616: https://tools.ietf.org/html/rfc2616\n// RFC 7230: https://tools.ietf.org/html/rfc7230\n// \"reason-phrase = *( HTAB / SP / VCHAR / obs-text )\"\n// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116\nfunction isValidReasonPhrase (statusText) {\n for (let i = 0; i < statusText.length; ++i) {\n const c = statusText.charCodeAt(i)\n if (\n !(\n (\n c === 0x09 || // HTAB\n (c >= 0x20 && c <= 0x7e) || // SP / VCHAR\n (c >= 0x80 && c <= 0xff)\n ) // obs-text\n )\n ) {\n return false\n }\n }\n return true\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#header-name\n * @param {string} potentialValue\n */\nconst isValidHeaderName = isValidHTTPToken\n\n/**\n * @see https://fetch.spec.whatwg.org/#header-value\n * @param {string} potentialValue\n */\nfunction isValidHeaderValue (potentialValue) {\n // - Has no leading or trailing HTTP tab or space bytes.\n // - Contains no 0x00 (NUL) or HTTP newline bytes.\n return (\n potentialValue[0] === '\\t' ||\n potentialValue[0] === ' ' ||\n potentialValue[potentialValue.length - 1] === '\\t' ||\n potentialValue[potentialValue.length - 1] === ' ' ||\n potentialValue.includes('\\n') ||\n potentialValue.includes('\\r') ||\n potentialValue.includes('\\0')\n ) === false\n}\n\n/**\n * Parse a referrer policy from a Referrer-Policy header\n * @see https://w3c.github.io/webappsec-referrer-policy/#parse-referrer-policy-from-header\n */\nfunction parseReferrerPolicy (actualResponse) {\n // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list.\n const policyHeader = (actualResponse.headersList.get('referrer-policy', true) ?? '').split(',')\n\n // 2. Let policy be the empty string.\n let policy = ''\n\n // 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.\n\n // Note: As the referrer-policy can contain multiple policies\n // separated by comma, we need to loop through all of them\n // and pick the first valid one.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy\n if (policyHeader.length) {\n // The right-most policy takes precedence.\n // The left-most policy is the fallback.\n for (let i = policyHeader.length; i !== 0; i--) {\n const token = policyHeader[i - 1].trim()\n if (referrerPolicyTokens.has(token)) {\n policy = token\n break\n }\n }\n }\n\n // 4. Return policy.\n return policy\n}\n\n/**\n * Given a request request and a response actualResponse, this algorithm\n * updates request’s referrer policy according to the Referrer-Policy\n * header (if any) in actualResponse.\n * @see https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect\n * @param {import('./request').Request} request\n * @param {import('./response').Response} actualResponse\n */\nfunction setRequestReferrerPolicyOnRedirect (request, actualResponse) {\n // 1. Let policy be the result of executing § 8.1 Parse a referrer policy\n // from a Referrer-Policy header on actualResponse.\n const policy = parseReferrerPolicy(actualResponse)\n\n // 2. If policy is not the empty string, then set request’s referrer policy to policy.\n if (policy !== '') {\n request.referrerPolicy = policy\n }\n}\n\n// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check\nfunction crossOriginResourcePolicyCheck () {\n // TODO\n return 'allowed'\n}\n\n// https://fetch.spec.whatwg.org/#concept-cors-check\nfunction corsCheck () {\n // TODO\n return 'success'\n}\n\n// https://fetch.spec.whatwg.org/#concept-tao-check\nfunction TAOCheck () {\n // TODO\n return 'success'\n}\n\nfunction appendFetchMetadata (httpRequest) {\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header\n // TODO\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header\n\n // 1. Assert: r’s url is a potentially trustworthy URL.\n // TODO\n\n // 2. Let header be a Structured Header whose value is a token.\n let header = null\n\n // 3. Set header’s value to r’s mode.\n header = httpRequest.mode\n\n // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list.\n httpRequest.headersList.set('sec-fetch-mode', header, true)\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header\n // TODO\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header\n // TODO\n}\n\n// https://fetch.spec.whatwg.org/#append-a-request-origin-header\nfunction appendRequestOriginHeader (request) {\n // 1. Let serializedOrigin be the result of byte-serializing a request origin\n // with request.\n // TODO: implement \"byte-serializing a request origin\"\n let serializedOrigin = request.origin\n\n // - \"'client' is changed to an origin during fetching.\"\n // This doesn't happen in undici (in most cases) because undici, by default,\n // has no concept of origin.\n // - request.origin can also be set to request.client.origin (client being\n // an environment settings object), which is undefined without using\n // setGlobalOrigin.\n if (serializedOrigin === 'client' || serializedOrigin === undefined) {\n return\n }\n\n // 2. If request’s response tainting is \"cors\" or request’s mode is \"websocket\",\n // then append (`Origin`, serializedOrigin) to request’s header list.\n // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then:\n if (request.responseTainting === 'cors' || request.mode === 'websocket') {\n request.headersList.append('origin', serializedOrigin, true)\n } else if (request.method !== 'GET' && request.method !== 'HEAD') {\n // 1. Switch on request’s referrer policy:\n switch (request.referrerPolicy) {\n case 'no-referrer':\n // Set serializedOrigin to `null`.\n serializedOrigin = null\n break\n case 'no-referrer-when-downgrade':\n case 'strict-origin':\n case 'strict-origin-when-cross-origin':\n // If request’s origin is a tuple origin, its scheme is \"https\", and\n // request’s current URL’s scheme is not \"https\", then set\n // serializedOrigin to `null`.\n if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) {\n serializedOrigin = null\n }\n break\n case 'same-origin':\n // If request’s origin is not same origin with request’s current URL’s\n // origin, then set serializedOrigin to `null`.\n if (!sameOrigin(request, requestCurrentURL(request))) {\n serializedOrigin = null\n }\n break\n default:\n // Do nothing.\n }\n\n // 2. Append (`Origin`, serializedOrigin) to request’s header list.\n request.headersList.append('origin', serializedOrigin, true)\n }\n}\n\n// https://w3c.github.io/hr-time/#dfn-coarsen-time\nfunction coarsenTime (timestamp, crossOriginIsolatedCapability) {\n // TODO\n return timestamp\n}\n\n// https://fetch.spec.whatwg.org/#clamp-and-coarsen-connection-timing-info\nfunction clampAndCoarsenConnectionTimingInfo (connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) {\n if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) {\n return {\n domainLookupStartTime: defaultStartTime,\n domainLookupEndTime: defaultStartTime,\n connectionStartTime: defaultStartTime,\n connectionEndTime: defaultStartTime,\n secureConnectionStartTime: defaultStartTime,\n ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol\n }\n }\n\n return {\n domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability),\n domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability),\n connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability),\n connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability),\n secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability),\n ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol\n }\n}\n\n// https://w3c.github.io/hr-time/#dfn-coarsened-shared-current-time\nfunction coarsenedSharedCurrentTime (crossOriginIsolatedCapability) {\n return coarsenTime(performance.now(), crossOriginIsolatedCapability)\n}\n\n// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info\nfunction createOpaqueTimingInfo (timingInfo) {\n return {\n startTime: timingInfo.startTime ?? 0,\n redirectStartTime: 0,\n redirectEndTime: 0,\n postRedirectStartTime: timingInfo.startTime ?? 0,\n finalServiceWorkerStartTime: 0,\n finalNetworkResponseStartTime: 0,\n finalNetworkRequestStartTime: 0,\n endTime: 0,\n encodedBodySize: 0,\n decodedBodySize: 0,\n finalConnectionTimingInfo: null\n }\n}\n\n// https://html.spec.whatwg.org/multipage/origin.html#policy-container\nfunction makePolicyContainer () {\n // Note: the fetch spec doesn't make use of embedder policy or CSP list\n return {\n referrerPolicy: 'strict-origin-when-cross-origin'\n }\n}\n\n// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container\nfunction clonePolicyContainer (policyContainer) {\n return {\n referrerPolicy: policyContainer.referrerPolicy\n }\n}\n\n/**\n * Determine request’s Referrer\n *\n * @see https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer\n */\nfunction determineRequestsReferrer (request) {\n // Given a request request, we can determine the correct referrer information\n // to send by examining its referrer policy as detailed in the following\n // steps, which return either no referrer or a URL:\n\n // 1. Let policy be request's referrer policy.\n const policy = request.referrerPolicy\n\n // Note: policy cannot (shouldn't) be null or an empty string.\n assert(policy)\n\n // 2. Let environment be request’s client.\n\n let referrerSource = null\n\n // 3. Switch on request’s referrer:\n\n // \"client\"\n if (request.referrer === 'client') {\n // Note: node isn't a browser and doesn't implement document/iframes,\n // so we bypass this step and replace it with our own.\n\n const globalOrigin = getGlobalOrigin()\n\n if (!globalOrigin || globalOrigin.origin === 'null') {\n return 'no-referrer'\n }\n\n // Note: we need to clone it as it's mutated\n referrerSource = new URL(globalOrigin)\n // a URL\n } else if (webidl.is.URL(request.referrer)) {\n // Let referrerSource be request’s referrer.\n referrerSource = request.referrer\n }\n\n // 4. Let request’s referrerURL be the result of stripping referrerSource for\n // use as a referrer.\n let referrerURL = stripURLForReferrer(referrerSource)\n\n // 5. Let referrerOrigin be the result of stripping referrerSource for use as\n // a referrer, with the origin-only flag set to true.\n const referrerOrigin = stripURLForReferrer(referrerSource, true)\n\n // 6. If the result of serializing referrerURL is a string whose length is\n // greater than 4096, set referrerURL to referrerOrigin.\n if (referrerURL.toString().length > 4096) {\n referrerURL = referrerOrigin\n }\n\n // 7. The user agent MAY alter referrerURL or referrerOrigin at this point\n // to enforce arbitrary policy considerations in the interests of minimizing\n // data leakage. For example, the user agent could strip the URL down to an\n // origin, modify its host, replace it with an empty string, etc.\n\n // 8. Execute the switch statements corresponding to the value of policy:\n switch (policy) {\n case 'no-referrer':\n // Return no referrer\n return 'no-referrer'\n case 'origin':\n // Return referrerOrigin\n if (referrerOrigin != null) {\n return referrerOrigin\n }\n return stripURLForReferrer(referrerSource, true)\n case 'unsafe-url':\n // Return referrerURL.\n return referrerURL\n case 'strict-origin': {\n const currentURL = requestCurrentURL(request)\n\n // 1. If referrerURL is a potentially trustworthy URL and request’s\n // current URL is not a potentially trustworthy URL, then return no\n // referrer.\n if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {\n return 'no-referrer'\n }\n // 2. Return referrerOrigin\n return referrerOrigin\n }\n case 'strict-origin-when-cross-origin': {\n const currentURL = requestCurrentURL(request)\n\n // 1. If the origin of referrerURL and the origin of request’s current\n // URL are the same, then return referrerURL.\n if (sameOrigin(referrerURL, currentURL)) {\n return referrerURL\n }\n\n // 2. If referrerURL is a potentially trustworthy URL and request’s\n // current URL is not a potentially trustworthy URL, then return no\n // referrer.\n if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {\n return 'no-referrer'\n }\n\n // 3. Return referrerOrigin.\n return referrerOrigin\n }\n case 'same-origin':\n // 1. If the origin of referrerURL and the origin of request’s current\n // URL are the same, then return referrerURL.\n if (sameOrigin(request, referrerURL)) {\n return referrerURL\n }\n // 2. Return no referrer.\n return 'no-referrer'\n case 'origin-when-cross-origin':\n // 1. If the origin of referrerURL and the origin of request’s current\n // URL are the same, then return referrerURL.\n if (sameOrigin(request, referrerURL)) {\n return referrerURL\n }\n // 2. Return referrerOrigin.\n return referrerOrigin\n case 'no-referrer-when-downgrade': {\n const currentURL = requestCurrentURL(request)\n\n // 1. If referrerURL is a potentially trustworthy URL and request’s\n // current URL is not a potentially trustworthy URL, then return no\n // referrer.\n if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {\n return 'no-referrer'\n }\n // 2. Return referrerURL.\n return referrerURL\n }\n }\n}\n\n/**\n * Certain portions of URLs must not be included when sending a URL as the\n * value of a `Referer` header: a URLs fragment, username, and password\n * components must be stripped from the URL before it’s sent out. This\n * algorithm accepts a origin-only flag, which defaults to false. If set to\n * true, the algorithm will additionally remove the URL’s path and query\n * components, leaving only the scheme, host, and port.\n *\n * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url\n * @param {URL} url\n * @param {boolean} [originOnly=false]\n */\nfunction stripURLForReferrer (url, originOnly = false) {\n // 1. Assert: url is a URL.\n assert(webidl.is.URL(url))\n\n // Note: Create a new URL instance to avoid mutating the original URL.\n url = new URL(url)\n\n // 2. If url’s scheme is a local scheme, then return no referrer.\n if (urlIsLocal(url)) {\n return 'no-referrer'\n }\n\n // 3. Set url’s username to the empty string.\n url.username = ''\n\n // 4. Set url’s password to the empty string.\n url.password = ''\n\n // 5. Set url’s fragment to null.\n url.hash = ''\n\n // 6. If the origin-only flag is true, then:\n if (originOnly === true) {\n // 1. Set url’s path to « the empty string ».\n url.pathname = ''\n\n // 2. Set url’s query to null.\n url.search = ''\n }\n\n // 7. Return url.\n return url\n}\n\nconst isPotentialleTrustworthyIPv4 = RegExp.prototype.test\n .bind(/^127\\.(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){2}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)$/)\n\nconst isPotentiallyTrustworthyIPv6 = RegExp.prototype.test\n .bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/)\n\n/**\n * Check if host matches one of the CIDR notations 127.0.0.0/8 or ::1/128.\n *\n * @param {string} origin\n * @returns {boolean}\n */\nfunction isOriginIPPotentiallyTrustworthy (origin) {\n // IPv6\n if (origin.includes(':')) {\n // Remove brackets from IPv6 addresses\n if (origin[0] === '[' && origin[origin.length - 1] === ']') {\n origin = origin.slice(1, -1)\n }\n return isPotentiallyTrustworthyIPv6(origin)\n }\n\n // IPv4\n return isPotentialleTrustworthyIPv4(origin)\n}\n\n/**\n * A potentially trustworthy origin is one which a user agent can generally\n * trust as delivering data securely.\n *\n * Return value `true` means `Potentially Trustworthy`.\n * Return value `false` means `Not Trustworthy`.\n *\n * @see https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy\n * @param {string} origin\n * @returns {boolean}\n */\nfunction isOriginPotentiallyTrustworthy (origin) {\n // 1. If origin is an opaque origin, return \"Not Trustworthy\".\n if (origin == null || origin === 'null') {\n return false\n }\n\n // 2. Assert: origin is a tuple origin.\n origin = new URL(origin)\n\n // 3. If origin’s scheme is either \"https\" or \"wss\",\n // return \"Potentially Trustworthy\".\n if (origin.protocol === 'https:' || origin.protocol === 'wss:') {\n return true\n }\n\n // 4. If origin’s host matches one of the CIDR notations 127.0.0.0/8 or\n // ::1/128 [RFC4632], return \"Potentially Trustworthy\".\n if (isOriginIPPotentiallyTrustworthy(origin.hostname)) {\n return true\n }\n\n // 5. If the user agent conforms to the name resolution rules in\n // [let-localhost-be-localhost] and one of the following is true:\n\n // origin’s host is \"localhost\" or \"localhost.\"\n if (origin.hostname === 'localhost' || origin.hostname === 'localhost.') {\n return true\n }\n\n // origin’s host ends with \".localhost\" or \".localhost.\"\n if (origin.hostname.endsWith('.localhost') || origin.hostname.endsWith('.localhost.')) {\n return true\n }\n\n // 6. If origin’s scheme is \"file\", return \"Potentially Trustworthy\".\n if (origin.protocol === 'file:') {\n return true\n }\n\n // 7. If origin’s scheme component is one which the user agent considers to\n // be authenticated, return \"Potentially Trustworthy\".\n\n // 8. If origin has been configured as a trustworthy origin, return\n // \"Potentially Trustworthy\".\n\n // 9. Return \"Not Trustworthy\".\n return false\n}\n\n/**\n * A potentially trustworthy URL is one which either inherits context from its\n * creator (about:blank, about:srcdoc, data) or one whose origin is a\n * potentially trustworthy origin.\n *\n * Return value `true` means `Potentially Trustworthy`.\n * Return value `false` means `Not Trustworthy`.\n *\n * @see https://www.w3.org/TR/secure-contexts/#is-url-trustworthy\n * @param {URL} url\n * @returns {boolean}\n */\nfunction isURLPotentiallyTrustworthy (url) {\n // Given a URL record (url), the following algorithm returns \"Potentially\n // Trustworthy\" or \"Not Trustworthy\" as appropriate:\n if (!webidl.is.URL(url)) {\n return false\n }\n\n // 1. If url is \"about:blank\" or \"about:srcdoc\",\n // return \"Potentially Trustworthy\".\n if (url.href === 'about:blank' || url.href === 'about:srcdoc') {\n return true\n }\n\n // 2. If url’s scheme is \"data\", return \"Potentially Trustworthy\".\n if (url.protocol === 'data:') return true\n\n // Note: The origin of blob: URLs is the origin of the context in which they\n // were created. Therefore, blobs created in a trustworthy origin will\n // themselves be potentially trustworthy.\n if (url.protocol === 'blob:') return true\n\n // 3. Return the result of executing § 3.1 Is origin potentially trustworthy?\n // on url’s origin.\n return isOriginPotentiallyTrustworthy(url.origin)\n}\n\n// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request\nfunction tryUpgradeRequestToAPotentiallyTrustworthyURL (request) {\n // TODO\n}\n\n/**\n * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin}\n * @param {URL} A\n * @param {URL} B\n */\nfunction sameOrigin (A, B) {\n // 1. If A and B are the same opaque origin, then return true.\n if (A.origin === B.origin && A.origin === 'null') {\n return true\n }\n\n // 2. If A and B are both tuple origins and their schemes,\n // hosts, and port are identical, then return true.\n if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) {\n return true\n }\n\n // 3. Return false.\n return false\n}\n\nfunction isAborted (fetchParams) {\n return fetchParams.controller.state === 'aborted'\n}\n\nfunction isCancelled (fetchParams) {\n return fetchParams.controller.state === 'aborted' ||\n fetchParams.controller.state === 'terminated'\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-method-normalize\n * @param {string} method\n */\nfunction normalizeMethod (method) {\n return normalizedMethodRecordsBase[method.toLowerCase()] ?? method\n}\n\n// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object\nconst esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))\n\n/**\n * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object\n * @param {string} name name of the instance\n * @param {((target: any) => any)} kInternalIterator\n * @param {string | number} [keyIndex]\n * @param {string | number} [valueIndex]\n */\nfunction createIterator (name, kInternalIterator, keyIndex = 0, valueIndex = 1) {\n class FastIterableIterator {\n /** @type {any} */\n #target\n /** @type {'key' | 'value' | 'key+value'} */\n #kind\n /** @type {number} */\n #index\n\n /**\n * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object\n * @param {unknown} target\n * @param {'key' | 'value' | 'key+value'} kind\n */\n constructor (target, kind) {\n this.#target = target\n this.#kind = kind\n this.#index = 0\n }\n\n next () {\n // 1. Let interface be the interface for which the iterator prototype object exists.\n // 2. Let thisValue be the this value.\n // 3. Let object be ? ToObject(thisValue).\n // 4. If object is a platform object, then perform a security\n // check, passing:\n // 5. If object is not a default iterator object for interface,\n // then throw a TypeError.\n if (typeof this !== 'object' || this === null || !(#target in this)) {\n throw new TypeError(\n `'next' called on an object that does not implement interface ${name} Iterator.`\n )\n }\n\n // 6. Let index be object’s index.\n // 7. Let kind be object’s kind.\n // 8. Let values be object’s target's value pairs to iterate over.\n const index = this.#index\n const values = kInternalIterator(this.#target)\n\n // 9. Let len be the length of values.\n const len = values.length\n\n // 10. If index is greater than or equal to len, then return\n // CreateIterResultObject(undefined, true).\n if (index >= len) {\n return {\n value: undefined,\n done: true\n }\n }\n\n // 11. Let pair be the entry in values at index index.\n const { [keyIndex]: key, [valueIndex]: value } = values[index]\n\n // 12. Set object’s index to index + 1.\n this.#index = index + 1\n\n // 13. Return the iterator result for pair and kind.\n\n // https://webidl.spec.whatwg.org/#iterator-result\n\n // 1. Let result be a value determined by the value of kind:\n let result\n switch (this.#kind) {\n case 'key':\n // 1. Let idlKey be pair’s key.\n // 2. Let key be the result of converting idlKey to an\n // ECMAScript value.\n // 3. result is key.\n result = key\n break\n case 'value':\n // 1. Let idlValue be pair’s value.\n // 2. Let value be the result of converting idlValue to\n // an ECMAScript value.\n // 3. result is value.\n result = value\n break\n case 'key+value':\n // 1. Let idlKey be pair’s key.\n // 2. Let idlValue be pair’s value.\n // 3. Let key be the result of converting idlKey to an\n // ECMAScript value.\n // 4. Let value be the result of converting idlValue to\n // an ECMAScript value.\n // 5. Let array be ! ArrayCreate(2).\n // 6. Call ! CreateDataProperty(array, \"0\", key).\n // 7. Call ! CreateDataProperty(array, \"1\", value).\n // 8. result is array.\n result = [key, value]\n break\n }\n\n // 2. Return CreateIterResultObject(result, false).\n return {\n value: result,\n done: false\n }\n }\n }\n\n // https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object\n // @ts-ignore\n delete FastIterableIterator.prototype.constructor\n\n Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype)\n\n Object.defineProperties(FastIterableIterator.prototype, {\n [Symbol.toStringTag]: {\n writable: false,\n enumerable: false,\n configurable: true,\n value: `${name} Iterator`\n },\n next: { writable: true, enumerable: true, configurable: true }\n })\n\n /**\n * @param {unknown} target\n * @param {'key' | 'value' | 'key+value'} kind\n * @returns {IterableIterator}\n */\n return function (target, kind) {\n return new FastIterableIterator(target, kind)\n }\n}\n\n/**\n * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object\n * @param {string} name name of the instance\n * @param {any} object class\n * @param {(target: any) => any} kInternalIterator\n * @param {string | number} [keyIndex]\n * @param {string | number} [valueIndex]\n */\nfunction iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) {\n const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex)\n\n const properties = {\n keys: {\n writable: true,\n enumerable: true,\n configurable: true,\n value: function keys () {\n webidl.brandCheck(this, object)\n return makeIterator(this, 'key')\n }\n },\n values: {\n writable: true,\n enumerable: true,\n configurable: true,\n value: function values () {\n webidl.brandCheck(this, object)\n return makeIterator(this, 'value')\n }\n },\n entries: {\n writable: true,\n enumerable: true,\n configurable: true,\n value: function entries () {\n webidl.brandCheck(this, object)\n return makeIterator(this, 'key+value')\n }\n },\n forEach: {\n writable: true,\n enumerable: true,\n configurable: true,\n value: function forEach (callbackfn, thisArg = globalThis) {\n webidl.brandCheck(this, object)\n webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`)\n if (typeof callbackfn !== 'function') {\n throw new TypeError(\n `Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.`\n )\n }\n for (const { 0: key, 1: value } of makeIterator(this, 'key+value')) {\n callbackfn.call(thisArg, value, key, this)\n }\n }\n }\n }\n\n return Object.defineProperties(object.prototype, {\n ...properties,\n [Symbol.iterator]: {\n writable: true,\n enumerable: false,\n configurable: true,\n value: properties.entries.value\n }\n })\n}\n\n/**\n * @param {import('./body').ExtractBodyResult} body\n * @param {(bytes: Uint8Array) => void} processBody\n * @param {(error: Error) => void} processBodyError\n * @returns {void}\n *\n * @see https://fetch.spec.whatwg.org/#body-fully-read\n */\nfunction fullyReadBody (body, processBody, processBodyError) {\n // 1. If taskDestination is null, then set taskDestination to\n // the result of starting a new parallel queue.\n\n // 2. Let successSteps given a byte sequence bytes be to queue a\n // fetch task to run processBody given bytes, with taskDestination.\n const successSteps = processBody\n\n // 3. Let errorSteps be to queue a fetch task to run processBodyError,\n // with taskDestination.\n const errorSteps = processBodyError\n\n try {\n // 4. Let reader be the result of getting a reader for body’s stream.\n // If that threw an exception, then run errorSteps with that\n // exception and return.\n const reader = body.stream.getReader()\n\n // 5. Read all bytes from reader, given successSteps and errorSteps.\n readAllBytes(reader, successSteps, errorSteps)\n } catch (e) {\n errorSteps(e)\n }\n}\n\n/**\n * @param {ReadableStreamController} controller\n */\nfunction readableStreamClose (controller) {\n try {\n controller.close()\n controller.byobRequest?.respond(0)\n } catch (err) {\n // TODO: add comment explaining why this error occurs.\n if (!err.message.includes('Controller is already closed') && !err.message.includes('ReadableStream is already closed')) {\n throw err\n }\n }\n}\n\n/**\n * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes\n * @see https://streams.spec.whatwg.org/#read-loop\n * @param {ReadableStream>} reader\n * @param {(bytes: Uint8Array) => void} successSteps\n * @param {(error: Error) => void} failureSteps\n * @returns {Promise}\n */\nasync function readAllBytes (reader, successSteps, failureSteps) {\n try {\n const bytes = []\n let byteLength = 0\n\n do {\n const { done, value: chunk } = await reader.read()\n\n if (done) {\n // 1. Call successSteps with bytes.\n successSteps(Buffer.concat(bytes, byteLength))\n return\n }\n\n // 1. If chunk is not a Uint8Array object, call failureSteps\n // with a TypeError and abort these steps.\n if (!isUint8Array(chunk)) {\n failureSteps(new TypeError('Received non-Uint8Array chunk'))\n return\n }\n\n // 2. Append the bytes represented by chunk to bytes.\n bytes.push(chunk)\n byteLength += chunk.length\n\n // 3. Read-loop given reader, bytes, successSteps, and failureSteps.\n } while (true)\n } catch (e) {\n // 1. Call failureSteps with e.\n failureSteps(e)\n }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#is-local\n * @param {URL} url\n * @returns {boolean}\n */\nfunction urlIsLocal (url) {\n assert('protocol' in url) // ensure it's a url object\n\n const protocol = url.protocol\n\n // A URL is local if its scheme is a local scheme.\n // A local scheme is \"about\", \"blob\", or \"data\".\n return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:'\n}\n\n/**\n * @param {string|URL} url\n * @returns {boolean}\n */\nfunction urlHasHttpsScheme (url) {\n return (\n (\n typeof url === 'string' &&\n url[5] === ':' &&\n url[0] === 'h' &&\n url[1] === 't' &&\n url[2] === 't' &&\n url[3] === 'p' &&\n url[4] === 's'\n ) ||\n url.protocol === 'https:'\n )\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-scheme\n * @param {URL} url\n */\nfunction urlIsHttpHttpsScheme (url) {\n assert('protocol' in url) // ensure it's a url object\n\n const protocol = url.protocol\n\n return protocol === 'http:' || protocol === 'https:'\n}\n\n/**\n * @typedef {Object} RangeHeaderValue\n * @property {number|null} rangeStartValue\n * @property {number|null} rangeEndValue\n */\n\n/**\n * @see https://fetch.spec.whatwg.org/#simple-range-header-value\n * @param {string} value\n * @param {boolean} allowWhitespace\n * @return {RangeHeaderValue|'failure'}\n */\nfunction simpleRangeHeaderValue (value, allowWhitespace) {\n // 1. Let data be the isomorphic decoding of value.\n // Note: isomorphic decoding takes a sequence of bytes (ie. a Uint8Array) and turns it into a string,\n // nothing more. We obviously don't need to do that if value is a string already.\n const data = value\n\n // 2. If data does not start with \"bytes\", then return failure.\n if (!data.startsWith('bytes')) {\n return 'failure'\n }\n\n // 3. Let position be a position variable for data, initially pointing at the 5th code point of data.\n const position = { position: 5 }\n\n // 4. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space,\n // from data given position.\n if (allowWhitespace) {\n collectASequenceOfCodePoints(\n (char) => char === '\\t' || char === ' ',\n data,\n position\n )\n }\n\n // 5. If the code point at position within data is not U+003D (=), then return failure.\n if (data.charCodeAt(position.position) !== 0x3D) {\n return 'failure'\n }\n\n // 6. Advance position by 1.\n position.position++\n\n // 7. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, from\n // data given position.\n if (allowWhitespace) {\n collectASequenceOfCodePoints(\n (char) => char === '\\t' || char === ' ',\n data,\n position\n )\n }\n\n // 8. Let rangeStart be the result of collecting a sequence of code points that are ASCII digits,\n // from data given position.\n const rangeStart = collectASequenceOfCodePoints(\n (char) => {\n const code = char.charCodeAt(0)\n\n return code >= 0x30 && code <= 0x39\n },\n data,\n position\n )\n\n // 9. Let rangeStartValue be rangeStart, interpreted as decimal number, if rangeStart is not the\n // empty string; otherwise null.\n const rangeStartValue = rangeStart.length ? Number(rangeStart) : null\n\n // 10. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space,\n // from data given position.\n if (allowWhitespace) {\n collectASequenceOfCodePoints(\n (char) => char === '\\t' || char === ' ',\n data,\n position\n )\n }\n\n // 11. If the code point at position within data is not U+002D (-), then return failure.\n if (data.charCodeAt(position.position) !== 0x2D) {\n return 'failure'\n }\n\n // 12. Advance position by 1.\n position.position++\n\n // 13. If allowWhitespace is true, collect a sequence of code points that are HTTP tab\n // or space, from data given position.\n // Note from Khafra: its the same step as in #8 again lol\n if (allowWhitespace) {\n collectASequenceOfCodePoints(\n (char) => char === '\\t' || char === ' ',\n data,\n position\n )\n }\n\n // 14. Let rangeEnd be the result of collecting a sequence of code points that are\n // ASCII digits, from data given position.\n // Note from Khafra: you wouldn't guess it, but this is also the same step as #8\n const rangeEnd = collectASequenceOfCodePoints(\n (char) => {\n const code = char.charCodeAt(0)\n\n return code >= 0x30 && code <= 0x39\n },\n data,\n position\n )\n\n // 15. Let rangeEndValue be rangeEnd, interpreted as decimal number, if rangeEnd\n // is not the empty string; otherwise null.\n // Note from Khafra: THE SAME STEP, AGAIN!!!\n // Note: why interpret as a decimal if we only collect ascii digits?\n const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null\n\n // 16. If position is not past the end of data, then return failure.\n if (position.position < data.length) {\n return 'failure'\n }\n\n // 17. If rangeEndValue and rangeStartValue are null, then return failure.\n if (rangeEndValue === null && rangeStartValue === null) {\n return 'failure'\n }\n\n // 18. If rangeStartValue and rangeEndValue are numbers, and rangeStartValue is\n // greater than rangeEndValue, then return failure.\n // Note: ... when can they not be numbers?\n if (rangeStartValue > rangeEndValue) {\n return 'failure'\n }\n\n // 19. Return (rangeStartValue, rangeEndValue).\n return { rangeStartValue, rangeEndValue }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#build-a-content-range\n * @param {number} rangeStart\n * @param {number} rangeEnd\n * @param {number} fullLength\n */\nfunction buildContentRange (rangeStart, rangeEnd, fullLength) {\n // 1. Let contentRange be `bytes `.\n let contentRange = 'bytes '\n\n // 2. Append rangeStart, serialized and isomorphic encoded, to contentRange.\n contentRange += isomorphicEncode(`${rangeStart}`)\n\n // 3. Append 0x2D (-) to contentRange.\n contentRange += '-'\n\n // 4. Append rangeEnd, serialized and isomorphic encoded to contentRange.\n contentRange += isomorphicEncode(`${rangeEnd}`)\n\n // 5. Append 0x2F (/) to contentRange.\n contentRange += '/'\n\n // 6. Append fullLength, serialized and isomorphic encoded to contentRange.\n contentRange += isomorphicEncode(`${fullLength}`)\n\n // 7. Return contentRange.\n return contentRange\n}\n\n// A Stream, which pipes the response to zlib.createInflate() or\n// zlib.createInflateRaw() depending on the first byte of the Buffer.\n// If the lower byte of the first byte is 0x08, then the stream is\n// interpreted as a zlib stream, otherwise it's interpreted as a\n// raw deflate stream.\nclass InflateStream extends Transform {\n #zlibOptions\n\n /** @param {zlib.ZlibOptions} [zlibOptions] */\n constructor (zlibOptions) {\n super()\n this.#zlibOptions = zlibOptions\n }\n\n _transform (chunk, encoding, callback) {\n if (!this._inflateStream) {\n if (chunk.length === 0) {\n callback()\n return\n }\n this._inflateStream = (chunk[0] & 0x0F) === 0x08\n ? zlib.createInflate(this.#zlibOptions)\n : zlib.createInflateRaw(this.#zlibOptions)\n\n this._inflateStream.on('data', this.push.bind(this))\n this._inflateStream.on('end', () => this.push(null))\n this._inflateStream.on('error', (err) => this.destroy(err))\n }\n\n this._inflateStream.write(chunk, encoding, callback)\n }\n\n _final (callback) {\n if (this._inflateStream) {\n this._inflateStream.end()\n this._inflateStream = null\n }\n callback()\n }\n}\n\n/**\n * @param {zlib.ZlibOptions} [zlibOptions]\n * @returns {InflateStream}\n */\nfunction createInflate (zlibOptions) {\n return new InflateStream(zlibOptions)\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type\n * @param {import('./headers').HeadersList} headers\n */\nfunction extractMimeType (headers) {\n // 1. Let charset be null.\n let charset = null\n\n // 2. Let essence be null.\n let essence = null\n\n // 3. Let mimeType be null.\n let mimeType = null\n\n // 4. Let values be the result of getting, decoding, and splitting `Content-Type` from headers.\n const values = getDecodeSplit('content-type', headers)\n\n // 5. If values is null, then return failure.\n if (values === null) {\n return 'failure'\n }\n\n // 6. For each value of values:\n for (const value of values) {\n // 6.1. Let temporaryMimeType be the result of parsing value.\n const temporaryMimeType = parseMIMEType(value)\n\n // 6.2. If temporaryMimeType is failure or its essence is \"*/*\", then continue.\n if (temporaryMimeType === 'failure' || temporaryMimeType.essence === '*/*') {\n continue\n }\n\n // 6.3. Set mimeType to temporaryMimeType.\n mimeType = temporaryMimeType\n\n // 6.4. If mimeType’s essence is not essence, then:\n if (mimeType.essence !== essence) {\n // 6.4.1. Set charset to null.\n charset = null\n\n // 6.4.2. If mimeType’s parameters[\"charset\"] exists, then set charset to\n // mimeType’s parameters[\"charset\"].\n if (mimeType.parameters.has('charset')) {\n charset = mimeType.parameters.get('charset')\n }\n\n // 6.4.3. Set essence to mimeType’s essence.\n essence = mimeType.essence\n } else if (!mimeType.parameters.has('charset') && charset !== null) {\n // 6.5. Otherwise, if mimeType’s parameters[\"charset\"] does not exist, and\n // charset is non-null, set mimeType’s parameters[\"charset\"] to charset.\n mimeType.parameters.set('charset', charset)\n }\n }\n\n // 7. If mimeType is null, then return failure.\n if (mimeType == null) {\n return 'failure'\n }\n\n // 8. Return mimeType.\n return mimeType\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split\n * @param {string|null} value\n */\nfunction gettingDecodingSplitting (value) {\n // 1. Let input be the result of isomorphic decoding value.\n const input = value\n\n // 2. Let position be a position variable for input, initially pointing at the start of input.\n const position = { position: 0 }\n\n // 3. Let values be a list of strings, initially empty.\n const values = []\n\n // 4. Let temporaryValue be the empty string.\n let temporaryValue = ''\n\n // 5. While position is not past the end of input:\n while (position.position < input.length) {\n // 5.1. Append the result of collecting a sequence of code points that are not U+0022 (\")\n // or U+002C (,) from input, given position, to temporaryValue.\n temporaryValue += collectASequenceOfCodePoints(\n (char) => char !== '\"' && char !== ',',\n input,\n position\n )\n\n // 5.2. If position is not past the end of input, then:\n if (position.position < input.length) {\n // 5.2.1. If the code point at position within input is U+0022 (\"), then:\n if (input.charCodeAt(position.position) === 0x22) {\n // 5.2.1.1. Append the result of collecting an HTTP quoted string from input, given position, to temporaryValue.\n temporaryValue += collectAnHTTPQuotedString(\n input,\n position\n )\n\n // 5.2.1.2. If position is not past the end of input, then continue.\n if (position.position < input.length) {\n continue\n }\n } else {\n // 5.2.2. Otherwise:\n\n // 5.2.2.1. Assert: the code point at position within input is U+002C (,).\n assert(input.charCodeAt(position.position) === 0x2C)\n\n // 5.2.2.2. Advance position by 1.\n position.position++\n }\n }\n\n // 5.3. Remove all HTTP tab or space from the start and end of temporaryValue.\n temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 0x9 || char === 0x20)\n\n // 5.4. Append temporaryValue to values.\n values.push(temporaryValue)\n\n // 5.6. Set temporaryValue to the empty string.\n temporaryValue = ''\n }\n\n // 6. Return values.\n return values\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split\n * @param {string} name lowercase header name\n * @param {import('./headers').HeadersList} list\n */\nfunction getDecodeSplit (name, list) {\n // 1. Let value be the result of getting name from list.\n const value = list.get(name, true)\n\n // 2. If value is null, then return null.\n if (value === null) {\n return null\n }\n\n // 3. Return the result of getting, decoding, and splitting value.\n return gettingDecodingSplitting(value)\n}\n\nfunction hasAuthenticationEntry (request) {\n return false\n}\n\n/**\n * @see https://url.spec.whatwg.org/#include-credentials\n * @param {URL} url\n */\nfunction includesCredentials (url) {\n // A URL includes credentials if its username or password is not the empty string.\n return !!(url.username || url.password)\n}\n\n/**\n * @see https://html.spec.whatwg.org/multipage/document-sequences.html#traversable-navigable\n * @param {object|string} navigable\n */\nfunction isTraversableNavigable (navigable) {\n // Returns true only if we have an actual traversable navigable object\n // that can prompt the user for credentials. In Node.js, this will always\n // be false since there's no Window object or navigable.\n return navigable != null && navigable !== 'client' && navigable !== 'no-traversable'\n}\n\nclass EnvironmentSettingsObjectBase {\n get baseUrl () {\n return getGlobalOrigin()\n }\n\n get origin () {\n return this.baseUrl?.origin\n }\n\n policyContainer = makePolicyContainer()\n}\n\nclass EnvironmentSettingsObject {\n settingsObject = new EnvironmentSettingsObjectBase()\n}\n\nconst environmentSettingsObject = new EnvironmentSettingsObject()\n\nmodule.exports = {\n isAborted,\n isCancelled,\n isValidEncodedURL,\n ReadableStreamFrom,\n tryUpgradeRequestToAPotentiallyTrustworthyURL,\n clampAndCoarsenConnectionTimingInfo,\n coarsenedSharedCurrentTime,\n determineRequestsReferrer,\n makePolicyContainer,\n clonePolicyContainer,\n appendFetchMetadata,\n appendRequestOriginHeader,\n TAOCheck,\n corsCheck,\n crossOriginResourcePolicyCheck,\n createOpaqueTimingInfo,\n setRequestReferrerPolicyOnRedirect,\n isValidHTTPToken,\n requestBadPort,\n requestCurrentURL,\n responseURL,\n responseLocationURL,\n isURLPotentiallyTrustworthy,\n isValidReasonPhrase,\n sameOrigin,\n normalizeMethod,\n iteratorMixin,\n createIterator,\n isValidHeaderName,\n isValidHeaderValue,\n isErrorLike,\n fullyReadBody,\n readableStreamClose,\n urlIsLocal,\n urlHasHttpsScheme,\n urlIsHttpHttpsScheme,\n readAllBytes,\n simpleRangeHeaderValue,\n buildContentRange,\n createInflate,\n extractMimeType,\n getDecodeSplit,\n environmentSettingsObject,\n isOriginIPPotentiallyTrustworthy,\n hasAuthenticationEntry,\n includesCredentials,\n isTraversableNavigable\n}\n","'use strict'\n\nconst assert = require('node:assert')\nconst { utf8DecodeBytes } = require('../../encoding')\n\n/**\n * @param {(char: string) => boolean} condition\n * @param {string} input\n * @param {{ position: number }} position\n * @returns {string}\n *\n * @see https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points\n */\nfunction collectASequenceOfCodePoints (condition, input, position) {\n // 1. Let result be the empty string.\n let result = ''\n\n // 2. While position doesn’t point past the end of input and the\n // code point at position within input meets the condition condition:\n while (position.position < input.length && condition(input[position.position])) {\n // 1. Append that code point to the end of result.\n result += input[position.position]\n\n // 2. Advance position by 1.\n position.position++\n }\n\n // 3. Return result.\n return result\n}\n\n/**\n * A faster collectASequenceOfCodePoints that only works when comparing a single character.\n * @param {string} char\n * @param {string} input\n * @param {{ position: number }} position\n * @returns {string}\n *\n * @see https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points\n */\nfunction collectASequenceOfCodePointsFast (char, input, position) {\n const idx = input.indexOf(char, position.position)\n const start = position.position\n\n if (idx === -1) {\n position.position = input.length\n return input.slice(start)\n }\n\n position.position = idx\n return input.slice(start, position.position)\n}\n\nconst ASCII_WHITESPACE_REPLACE_REGEX = /[\\u0009\\u000A\\u000C\\u000D\\u0020]/g // eslint-disable-line no-control-regex\n\n/**\n * @param {string} data\n * @returns {Uint8Array | 'failure'}\n *\n * @see https://infra.spec.whatwg.org/#forgiving-base64-decode\n */\nfunction forgivingBase64 (data) {\n // 1. Remove all ASCII whitespace from data.\n data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, '')\n\n let dataLength = data.length\n // 2. If data’s code point length divides by 4 leaving\n // no remainder, then:\n if (dataLength % 4 === 0) {\n // 1. If data ends with one or two U+003D (=) code points,\n // then remove them from data.\n if (data.charCodeAt(dataLength - 1) === 0x003D) {\n --dataLength\n if (data.charCodeAt(dataLength - 1) === 0x003D) {\n --dataLength\n }\n }\n }\n\n // 3. If data’s code point length divides by 4 leaving\n // a remainder of 1, then return failure.\n if (dataLength % 4 === 1) {\n return 'failure'\n }\n\n // 4. If data contains a code point that is not one of\n // U+002B (+)\n // U+002F (/)\n // ASCII alphanumeric\n // then return failure.\n if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) {\n return 'failure'\n }\n\n const buffer = Buffer.from(data, 'base64')\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength)\n}\n\n/**\n * @param {number} char\n * @returns {boolean}\n *\n * @see https://infra.spec.whatwg.org/#ascii-whitespace\n */\nfunction isASCIIWhitespace (char) {\n return (\n char === 0x09 || // \\t\n char === 0x0a || // \\n\n char === 0x0c || // \\f\n char === 0x0d || // \\r\n char === 0x20 // space\n )\n}\n\n/**\n * @param {Uint8Array} input\n * @returns {string}\n *\n * @see https://infra.spec.whatwg.org/#isomorphic-decode\n */\nfunction isomorphicDecode (input) {\n // 1. To isomorphic decode a byte sequence input, return a string whose code point\n // length is equal to input’s length and whose code points have the same values\n // as the values of input’s bytes, in the same order.\n const length = input.length\n if ((2 << 15) - 1 > length) {\n return String.fromCharCode.apply(null, input)\n }\n let result = ''\n let i = 0\n let addition = (2 << 15) - 1\n while (i < length) {\n if (i + addition > length) {\n addition = length - i\n }\n result += String.fromCharCode.apply(null, input.subarray(i, i += addition))\n }\n return result\n}\n\nconst invalidIsomorphicEncodeValueRegex = /[^\\x00-\\xFF]/ // eslint-disable-line no-control-regex\n\n/**\n * @param {string} input\n * @returns {string}\n *\n * @see https://infra.spec.whatwg.org/#isomorphic-encode\n */\nfunction isomorphicEncode (input) {\n // 1. Assert: input contains no code points greater than U+00FF.\n assert(!invalidIsomorphicEncodeValueRegex.test(input))\n\n // 2. Return a byte sequence whose length is equal to input’s code\n // point length and whose bytes have the same values as the\n // values of input’s code points, in the same order\n return input\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value\n * @param {Uint8Array} bytes\n */\nfunction parseJSONFromBytes (bytes) {\n return JSON.parse(utf8DecodeBytes(bytes))\n}\n\n/**\n * @param {string} str\n * @param {boolean} [leading=true]\n * @param {boolean} [trailing=true]\n * @returns {string}\n *\n * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace\n */\nfunction removeASCIIWhitespace (str, leading = true, trailing = true) {\n return removeChars(str, leading, trailing, isASCIIWhitespace)\n}\n\n/**\n * @param {string} str\n * @param {boolean} leading\n * @param {boolean} trailing\n * @param {(charCode: number) => boolean} predicate\n * @returns {string}\n */\nfunction removeChars (str, leading, trailing, predicate) {\n let lead = 0\n let trail = str.length - 1\n\n if (leading) {\n while (lead < str.length && predicate(str.charCodeAt(lead))) lead++\n }\n\n if (trailing) {\n while (trail > 0 && predicate(str.charCodeAt(trail))) trail--\n }\n\n return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1)\n}\n\n// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string\nfunction serializeJavascriptValueToJSONString (value) {\n // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »).\n const result = JSON.stringify(value)\n\n // 2. If result is undefined, then throw a TypeError.\n if (result === undefined) {\n throw new TypeError('Value is not JSON serializable')\n }\n\n // 3. Assert: result is a string.\n assert(typeof result === 'string')\n\n // 4. Return result.\n return result\n}\n\nmodule.exports = {\n collectASequenceOfCodePoints,\n collectASequenceOfCodePointsFast,\n forgivingBase64,\n isASCIIWhitespace,\n isomorphicDecode,\n isomorphicEncode,\n parseJSONFromBytes,\n removeASCIIWhitespace,\n removeChars,\n serializeJavascriptValueToJSONString\n}\n","'use strict'\n\nconst assert = require('node:assert')\nconst { runtimeFeatures } = require('../../util/runtime-features.js')\n\n/**\n * @typedef {object} Metadata\n * @property {SRIHashAlgorithm} alg - The algorithm used for the hash.\n * @property {string} val - The base64-encoded hash value.\n */\n\n/**\n * @typedef {Metadata[]} MetadataList\n */\n\n/**\n * @typedef {('sha256' | 'sha384' | 'sha512')} SRIHashAlgorithm\n */\n\n/**\n * @type {Map}\n *\n * The valid SRI hash algorithm token set is the ordered set « \"sha256\",\n * \"sha384\", \"sha512\" » (corresponding to SHA-256, SHA-384, and SHA-512\n * respectively). The ordering of this set is meaningful, with stronger\n * algorithms appearing later in the set.\n *\n * @see https://w3c.github.io/webappsec-subresource-integrity/#valid-sri-hash-algorithm-token-set\n */\nconst validSRIHashAlgorithmTokenSet = new Map([['sha256', 0], ['sha384', 1], ['sha512', 2]])\n\n// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable\n/** @type {import('node:crypto')} */\nlet crypto\n\nif (runtimeFeatures.has('crypto')) {\n crypto = require('node:crypto')\n const cryptoHashes = crypto.getHashes()\n\n // If no hashes are available, we cannot support SRI.\n if (cryptoHashes.length === 0) {\n validSRIHashAlgorithmTokenSet.clear()\n }\n\n for (const algorithm of validSRIHashAlgorithmTokenSet.keys()) {\n // If the algorithm is not supported, remove it from the list.\n if (cryptoHashes.includes(algorithm) === false) {\n validSRIHashAlgorithmTokenSet.delete(algorithm)\n }\n }\n} else {\n // If crypto is not available, we cannot support SRI.\n validSRIHashAlgorithmTokenSet.clear()\n}\n\n/**\n * @typedef GetSRIHashAlgorithmIndex\n * @type {(algorithm: SRIHashAlgorithm) => number}\n * @param {SRIHashAlgorithm} algorithm\n * @returns {number} The index of the algorithm in the valid SRI hash algorithm\n * token set.\n */\n\nconst getSRIHashAlgorithmIndex = /** @type {GetSRIHashAlgorithmIndex} */ (Map.prototype.get.bind(\n validSRIHashAlgorithmTokenSet))\n\n/**\n * @typedef IsValidSRIHashAlgorithm\n * @type {(algorithm: string) => algorithm is SRIHashAlgorithm}\n * @param {*} algorithm\n * @returns {algorithm is SRIHashAlgorithm}\n */\n\nconst isValidSRIHashAlgorithm = /** @type {IsValidSRIHashAlgorithm} */ (\n Map.prototype.has.bind(validSRIHashAlgorithmTokenSet)\n)\n\n/**\n * @param {Uint8Array} bytes\n * @param {string} metadataList\n * @returns {boolean}\n *\n * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist\n */\nconst bytesMatch = runtimeFeatures.has('crypto') === false || validSRIHashAlgorithmTokenSet.size === 0\n // If node is not built with OpenSSL support, we cannot check\n // a request's integrity, so allow it by default (the spec will\n // allow requests if an invalid hash is given, as precedence).\n ? () => true\n : (bytes, metadataList) => {\n // 1. Let parsedMetadata be the result of parsing metadataList.\n const parsedMetadata = parseMetadata(metadataList)\n\n // 2. If parsedMetadata is empty set, return true.\n if (parsedMetadata.length === 0) {\n return true\n }\n\n // 3. Let metadata be the result of getting the strongest\n // metadata from parsedMetadata.\n const metadata = getStrongestMetadata(parsedMetadata)\n\n // 4. For each item in metadata:\n for (const item of metadata) {\n // 1. Let algorithm be the item[\"alg\"].\n const algorithm = item.alg\n\n // 2. Let expectedValue be the item[\"val\"].\n const expectedValue = item.val\n\n // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e\n // \"be liberal with padding\". This is annoying, and it's not even in the spec.\n\n // 3. Let actualValue be the result of applying algorithm to bytes .\n const actualValue = applyAlgorithmToBytes(algorithm, bytes)\n\n // 4. If actualValue is a case-sensitive match for expectedValue,\n // return true.\n if (caseSensitiveMatch(actualValue, expectedValue)) {\n return true\n }\n }\n\n // 5. Return false.\n return false\n }\n\n/**\n * @param {MetadataList} metadataList\n * @returns {MetadataList} The strongest hash algorithm from the metadata list.\n */\nfunction getStrongestMetadata (metadataList) {\n // 1. Let result be the empty set and strongest be the empty string.\n const result = []\n /** @type {Metadata|null} */\n let strongest = null\n\n // 2. For each item in set:\n for (const item of metadataList) {\n // 1. Assert: item[\"alg\"] is a valid SRI hash algorithm token.\n assert(isValidSRIHashAlgorithm(item.alg), 'Invalid SRI hash algorithm token')\n\n // 2. If result is the empty set, then:\n if (result.length === 0) {\n // 1. Append item to result.\n result.push(item)\n\n // 2. Set strongest to item.\n strongest = item\n\n // 3. Continue.\n continue\n }\n\n // 3. Let currentAlgorithm be strongest[\"alg\"], and currentAlgorithmIndex be\n // the index of currentAlgorithm in the valid SRI hash algorithm token set.\n const currentAlgorithm = /** @type {Metadata} */ (strongest).alg\n const currentAlgorithmIndex = getSRIHashAlgorithmIndex(currentAlgorithm)\n\n // 4. Let newAlgorithm be the item[\"alg\"], and newAlgorithmIndex be the\n // index of newAlgorithm in the valid SRI hash algorithm token set.\n const newAlgorithm = item.alg\n const newAlgorithmIndex = getSRIHashAlgorithmIndex(newAlgorithm)\n\n // 5. If newAlgorithmIndex is less than currentAlgorithmIndex, then continue.\n if (newAlgorithmIndex < currentAlgorithmIndex) {\n continue\n\n // 6. Otherwise, if newAlgorithmIndex is greater than\n // currentAlgorithmIndex:\n } else if (newAlgorithmIndex > currentAlgorithmIndex) {\n // 1. Set strongest to item.\n strongest = item\n\n // 2. Set result to « item ».\n result[0] = item\n result.length = 1\n\n // 7. Otherwise, newAlgorithmIndex and currentAlgorithmIndex are the same\n // value. Append item to result.\n } else {\n result.push(item)\n }\n }\n\n // 3. Return result.\n return result\n}\n\n/**\n * @param {string} metadata\n * @returns {MetadataList}\n *\n * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata\n */\nfunction parseMetadata (metadata) {\n // 1. Let result be the empty set.\n /** @type {MetadataList} */\n const result = []\n\n // 2. For each item returned by splitting metadata on spaces:\n for (const item of metadata.split(' ')) {\n // 1. Let expression-and-options be the result of splitting item on U+003F (?).\n const expressionAndOptions = item.split('?', 1)\n\n // 2. Let algorithm-expression be expression-and-options[0].\n const algorithmExpression = expressionAndOptions[0]\n\n // 3. Let base64-value be the empty string.\n let base64Value = ''\n\n // 4. Let algorithm-and-value be the result of splitting algorithm-expression on U+002D (-).\n const algorithmAndValue = [algorithmExpression.slice(0, 6), algorithmExpression.slice(7)]\n\n // 5. Let algorithm be algorithm-and-value[0].\n const algorithm = algorithmAndValue[0]\n\n // 6. If algorithm is not a valid SRI hash algorithm token, then continue.\n if (!isValidSRIHashAlgorithm(algorithm)) {\n continue\n }\n\n // 7. If algorithm-and-value[1] exists, set base64-value to\n // algorithm-and-value[1].\n if (algorithmAndValue[1]) {\n base64Value = algorithmAndValue[1]\n }\n\n // 8. Let metadata be the ordered map\n // «[\"alg\" → algorithm, \"val\" → base64-value]».\n const metadata = {\n alg: algorithm,\n val: base64Value\n }\n\n // 9. Append metadata to result.\n result.push(metadata)\n }\n\n // 3. Return result.\n return result\n}\n\n/**\n * Applies the specified hash algorithm to the given bytes\n *\n * @typedef {(algorithm: SRIHashAlgorithm, bytes: Uint8Array) => string} ApplyAlgorithmToBytes\n * @param {SRIHashAlgorithm} algorithm\n * @param {Uint8Array} bytes\n * @returns {string}\n */\nconst applyAlgorithmToBytes = (algorithm, bytes) => {\n return crypto.hash(algorithm, bytes, 'base64')\n}\n\n/**\n * Compares two base64 strings, allowing for base64url\n * in the second string.\n *\n * @param {string} actualValue base64 encoded string\n * @param {string} expectedValue base64 or base64url encoded string\n * @returns {boolean}\n */\nfunction caseSensitiveMatch (actualValue, expectedValue) {\n // Ignore padding characters from the end of the strings by\n // decreasing the length by 1 or 2 if the last characters are `=`.\n let actualValueLength = actualValue.length\n if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === '=') {\n actualValueLength -= 1\n }\n if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === '=') {\n actualValueLength -= 1\n }\n let expectedValueLength = expectedValue.length\n if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === '=') {\n expectedValueLength -= 1\n }\n if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === '=') {\n expectedValueLength -= 1\n }\n\n if (actualValueLength !== expectedValueLength) {\n return false\n }\n\n for (let i = 0; i < actualValueLength; ++i) {\n if (\n actualValue[i] === expectedValue[i] ||\n (actualValue[i] === '+' && expectedValue[i] === '-') ||\n (actualValue[i] === '/' && expectedValue[i] === '_')\n ) {\n continue\n }\n return false\n }\n\n return true\n}\n\nmodule.exports = {\n applyAlgorithmToBytes,\n bytesMatch,\n caseSensitiveMatch,\n isValidSRIHashAlgorithm,\n getStrongestMetadata,\n parseMetadata\n}\n","'use strict'\n\nconst assert = require('node:assert')\nconst { types, inspect } = require('node:util')\nconst { runtimeFeatures } = require('../../util/runtime-features')\n\nconst UNDEFINED = 1\nconst BOOLEAN = 2\nconst STRING = 3\nconst SYMBOL = 4\nconst NUMBER = 5\nconst BIGINT = 6\nconst NULL = 7\nconst OBJECT = 8 // function and object\n\nconst FunctionPrototypeSymbolHasInstance = Function.call.bind(Function.prototype[Symbol.hasInstance])\n\n/** @type {import('../../../types/webidl').Webidl} */\nconst webidl = {\n converters: {},\n util: {},\n errors: {},\n is: {}\n}\n\n/**\n * @description Instantiate an error.\n *\n * @param {Object} opts\n * @param {string} opts.header\n * @param {string} opts.message\n * @returns {TypeError}\n */\nwebidl.errors.exception = function (message) {\n return new TypeError(`${message.header}: ${message.message}`)\n}\n\n/**\n * @description Instantiate an error when conversion from one type to another has failed.\n *\n * @param {Object} opts\n * @param {string} opts.prefix\n * @param {string} opts.argument\n * @param {string[]} opts.types\n * @returns {TypeError}\n */\nwebidl.errors.conversionFailed = function (opts) {\n const plural = opts.types.length === 1 ? '' : ' one of'\n const message =\n `${opts.argument} could not be converted to` +\n `${plural}: ${opts.types.join(', ')}.`\n\n return webidl.errors.exception({\n header: opts.prefix,\n message\n })\n}\n\n/**\n * @description Instantiate an error when an invalid argument is provided\n *\n * @param {Object} context\n * @param {string} context.prefix\n * @param {string} context.value\n * @param {string} context.type\n * @returns {TypeError}\n */\nwebidl.errors.invalidArgument = function (context) {\n return webidl.errors.exception({\n header: context.prefix,\n message: `\"${context.value}\" is an invalid ${context.type}.`\n })\n}\n\n// https://webidl.spec.whatwg.org/#implements\nwebidl.brandCheck = function (V, I) {\n if (!FunctionPrototypeSymbolHasInstance(I, V)) {\n const err = new TypeError('Illegal invocation')\n err.code = 'ERR_INVALID_THIS' // node compat.\n throw err\n }\n}\n\nwebidl.brandCheckMultiple = function (List) {\n const prototypes = List.map((c) => webidl.util.MakeTypeAssertion(c))\n\n return (V) => {\n if (prototypes.every(typeCheck => !typeCheck(V))) {\n const err = new TypeError('Illegal invocation')\n err.code = 'ERR_INVALID_THIS' // node compat.\n throw err\n }\n }\n}\n\nwebidl.argumentLengthCheck = function ({ length }, min, ctx) {\n if (length < min) {\n throw webidl.errors.exception({\n message: `${min} argument${min !== 1 ? 's' : ''} required, ` +\n `but${length ? ' only' : ''} ${length} found.`,\n header: ctx\n })\n }\n}\n\nwebidl.illegalConstructor = function () {\n throw webidl.errors.exception({\n header: 'TypeError',\n message: 'Illegal constructor'\n })\n}\n\nwebidl.util.MakeTypeAssertion = function (I) {\n return (O) => FunctionPrototypeSymbolHasInstance(I, O)\n}\n\n// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values\nwebidl.util.Type = function (V) {\n switch (typeof V) {\n case 'undefined': return UNDEFINED\n case 'boolean': return BOOLEAN\n case 'string': return STRING\n case 'symbol': return SYMBOL\n case 'number': return NUMBER\n case 'bigint': return BIGINT\n case 'function':\n case 'object': {\n if (V === null) {\n return NULL\n }\n\n return OBJECT\n }\n }\n}\n\nwebidl.util.Types = {\n UNDEFINED,\n BOOLEAN,\n STRING,\n SYMBOL,\n NUMBER,\n BIGINT,\n NULL,\n OBJECT\n}\n\nwebidl.util.TypeValueToString = function (o) {\n switch (webidl.util.Type(o)) {\n case UNDEFINED: return 'Undefined'\n case BOOLEAN: return 'Boolean'\n case STRING: return 'String'\n case SYMBOL: return 'Symbol'\n case NUMBER: return 'Number'\n case BIGINT: return 'BigInt'\n case NULL: return 'Null'\n case OBJECT: return 'Object'\n }\n}\n\nwebidl.util.markAsUncloneable = runtimeFeatures.has('markAsUncloneable')\n ? require('node:worker_threads').markAsUncloneable\n : () => {}\n\n// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint\nwebidl.util.ConvertToInt = function (V, bitLength, signedness, flags) {\n let upperBound\n let lowerBound\n\n // 1. If bitLength is 64, then:\n if (bitLength === 64) {\n // 1. Let upperBound be 2^53 − 1.\n upperBound = Math.pow(2, 53) - 1\n\n // 2. If signedness is \"unsigned\", then let lowerBound be 0.\n if (signedness === 'unsigned') {\n lowerBound = 0\n } else {\n // 3. Otherwise let lowerBound be −2^53 + 1.\n lowerBound = Math.pow(-2, 53) + 1\n }\n } else if (signedness === 'unsigned') {\n // 2. Otherwise, if signedness is \"unsigned\", then:\n\n // 1. Let lowerBound be 0.\n lowerBound = 0\n\n // 2. Let upperBound be 2^bitLength − 1.\n upperBound = Math.pow(2, bitLength) - 1\n } else {\n // 3. Otherwise:\n\n // 1. Let lowerBound be -2^bitLength − 1.\n lowerBound = Math.pow(-2, bitLength) - 1\n\n // 2. Let upperBound be 2^bitLength − 1 − 1.\n upperBound = Math.pow(2, bitLength - 1) - 1\n }\n\n // 4. Let x be ? ToNumber(V).\n let x = Number(V)\n\n // 5. If x is −0, then set x to +0.\n if (x === 0) {\n x = 0\n }\n\n // 6. If the conversion is to an IDL type associated\n // with the [EnforceRange] extended attribute, then:\n if (webidl.util.HasFlag(flags, webidl.attributes.EnforceRange)) {\n // 1. If x is NaN, +∞, or −∞, then throw a TypeError.\n if (\n Number.isNaN(x) ||\n x === Number.POSITIVE_INFINITY ||\n x === Number.NEGATIVE_INFINITY\n ) {\n throw webidl.errors.exception({\n header: 'Integer conversion',\n message: `Could not convert ${webidl.util.Stringify(V)} to an integer.`\n })\n }\n\n // 2. Set x to IntegerPart(x).\n x = webidl.util.IntegerPart(x)\n\n // 3. If x < lowerBound or x > upperBound, then\n // throw a TypeError.\n if (x < lowerBound || x > upperBound) {\n throw webidl.errors.exception({\n header: 'Integer conversion',\n message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.`\n })\n }\n\n // 4. Return x.\n return x\n }\n\n // 7. If x is not NaN and the conversion is to an IDL\n // type associated with the [Clamp] extended\n // attribute, then:\n if (!Number.isNaN(x) && webidl.util.HasFlag(flags, webidl.attributes.Clamp)) {\n // 1. Set x to min(max(x, lowerBound), upperBound).\n x = Math.min(Math.max(x, lowerBound), upperBound)\n\n // 2. Round x to the nearest integer, choosing the\n // even integer if it lies halfway between two,\n // and choosing +0 rather than −0.\n if (Math.floor(x) % 2 === 0) {\n x = Math.floor(x)\n } else {\n x = Math.ceil(x)\n }\n\n // 3. Return x.\n return x\n }\n\n // 8. If x is NaN, +0, +∞, or −∞, then return +0.\n if (\n Number.isNaN(x) ||\n (x === 0 && Object.is(0, x)) ||\n x === Number.POSITIVE_INFINITY ||\n x === Number.NEGATIVE_INFINITY\n ) {\n return 0\n }\n\n // 9. Set x to IntegerPart(x).\n x = webidl.util.IntegerPart(x)\n\n // 10. Set x to x modulo 2^bitLength.\n x = x % Math.pow(2, bitLength)\n\n // 11. If signedness is \"signed\" and x ≥ 2^bitLength − 1,\n // then return x − 2^bitLength.\n if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) {\n return x - Math.pow(2, bitLength)\n }\n\n // 12. Otherwise, return x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart\nwebidl.util.IntegerPart = function (n) {\n // 1. Let r be floor(abs(n)).\n const r = Math.floor(Math.abs(n))\n\n // 2. If n < 0, then return -1 × r.\n if (n < 0) {\n return -1 * r\n }\n\n // 3. Otherwise, return r.\n return r\n}\n\nwebidl.util.Stringify = function (V) {\n const type = webidl.util.Type(V)\n\n switch (type) {\n case SYMBOL:\n return `Symbol(${V.description})`\n case OBJECT:\n return inspect(V)\n case STRING:\n return `\"${V}\"`\n case BIGINT:\n return `${V}n`\n default:\n return `${V}`\n }\n}\n\nwebidl.util.IsResizableArrayBuffer = function (V) {\n if (types.isArrayBuffer(V)) {\n return V.resizable\n }\n\n if (types.isSharedArrayBuffer(V)) {\n return V.growable\n }\n\n throw webidl.errors.exception({\n header: 'IsResizableArrayBuffer',\n message: `\"${webidl.util.Stringify(V)}\" is not an array buffer.`\n })\n}\n\nwebidl.util.HasFlag = function (flags, attributes) {\n return typeof flags === 'number' && (flags & attributes) === attributes\n}\n\n// https://webidl.spec.whatwg.org/#es-sequence\nwebidl.sequenceConverter = function (converter) {\n return (V, prefix, argument, Iterable) => {\n // 1. If Type(V) is not Object, throw a TypeError.\n if (webidl.util.Type(V) !== OBJECT) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.`\n })\n }\n\n // 2. Let method be ? GetMethod(V, @@iterator).\n /** @type {Generator} */\n const method = typeof Iterable === 'function' ? Iterable() : V?.[Symbol.iterator]?.()\n const seq = []\n let index = 0\n\n // 3. If method is undefined, throw a TypeError.\n if (\n method === undefined ||\n typeof method.next !== 'function'\n ) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} is not iterable.`\n })\n }\n\n // https://webidl.spec.whatwg.org/#create-sequence-from-iterable\n while (true) {\n const { done, value } = method.next()\n\n if (done) {\n break\n }\n\n seq.push(converter(value, prefix, `${argument}[${index++}]`))\n }\n\n return seq\n }\n}\n\n// https://webidl.spec.whatwg.org/#es-to-record\nwebidl.recordConverter = function (keyConverter, valueConverter) {\n return (O, prefix, argument) => {\n // 1. If Type(O) is not Object, throw a TypeError.\n if (webidl.util.Type(O) !== OBJECT) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} (\"${webidl.util.TypeValueToString(O)}\") is not an Object.`\n })\n }\n\n // 2. Let result be a new empty instance of record.\n const result = {}\n\n if (!types.isProxy(O)) {\n // 1. Let desc be ? O.[[GetOwnProperty]](key).\n const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]\n\n for (const key of keys) {\n const keyName = webidl.util.Stringify(key)\n\n // 1. Let typedKey be key converted to an IDL value of type K.\n const typedKey = keyConverter(key, prefix, `Key ${keyName} in ${argument}`)\n\n // 2. Let value be ? Get(O, key).\n // 3. Let typedValue be value converted to an IDL value of type V.\n const typedValue = valueConverter(O[key], prefix, `${argument}[${keyName}]`)\n\n // 4. Set result[typedKey] to typedValue.\n result[typedKey] = typedValue\n }\n\n // 5. Return result.\n return result\n }\n\n // 3. Let keys be ? O.[[OwnPropertyKeys]]().\n const keys = Reflect.ownKeys(O)\n\n // 4. For each key of keys.\n for (const key of keys) {\n // 1. Let desc be ? O.[[GetOwnProperty]](key).\n const desc = Reflect.getOwnPropertyDescriptor(O, key)\n\n // 2. If desc is not undefined and desc.[[Enumerable]] is true:\n if (desc?.enumerable) {\n // 1. Let typedKey be key converted to an IDL value of type K.\n const typedKey = keyConverter(key, prefix, argument)\n\n // 2. Let value be ? Get(O, key).\n // 3. Let typedValue be value converted to an IDL value of type V.\n const typedValue = valueConverter(O[key], prefix, argument)\n\n // 4. Set result[typedKey] to typedValue.\n result[typedKey] = typedValue\n }\n }\n\n // 5. Return result.\n return result\n }\n}\n\nwebidl.interfaceConverter = function (TypeCheck, name) {\n return (V, prefix, argument) => {\n if (!TypeCheck(V)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `Expected ${argument} (\"${webidl.util.Stringify(V)}\") to be an instance of ${name}.`\n })\n }\n\n return V\n }\n}\n\nwebidl.dictionaryConverter = function (converters) {\n // \"For each dictionary member member declared on dictionary, in lexicographical order:\"\n converters.sort((a, b) => (a.key > b.key) - (a.key < b.key))\n\n return (dictionary, prefix, argument) => {\n const dict = {}\n\n if (dictionary != null && webidl.util.Type(dictionary) !== OBJECT) {\n throw webidl.errors.exception({\n header: prefix,\n message: `Expected ${dictionary} to be one of: Null, Undefined, Object.`\n })\n }\n\n for (const options of converters) {\n const { key, defaultValue, required, converter } = options\n\n if (required === true) {\n if (dictionary == null || !Object.hasOwn(dictionary, key)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `Missing required key \"${key}\".`\n })\n }\n }\n\n let value = dictionary?.[key]\n const hasDefault = defaultValue !== undefined\n\n // Only use defaultValue if value is undefined and\n // a defaultValue options was provided.\n if (hasDefault && value === undefined) {\n value = defaultValue()\n }\n\n // A key can be optional and have no default value.\n // When this happens, do not perform a conversion,\n // and do not assign the key a value.\n if (required || hasDefault || value !== undefined) {\n value = converter(value, prefix, `${argument}.${key}`)\n\n if (\n options.allowedValues &&\n !options.allowedValues.includes(value)\n ) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.`\n })\n }\n\n dict[key] = value\n }\n }\n\n return dict\n }\n}\n\nwebidl.nullableConverter = function (converter) {\n return (V, prefix, argument) => {\n if (V === null) {\n return V\n }\n\n return converter(V, prefix, argument)\n }\n}\n\n/**\n * @param {*} value\n * @returns {boolean}\n */\nwebidl.is.USVString = function (value) {\n return (\n typeof value === 'string' &&\n value.isWellFormed()\n )\n}\n\nwebidl.is.ReadableStream = webidl.util.MakeTypeAssertion(ReadableStream)\nwebidl.is.Blob = webidl.util.MakeTypeAssertion(Blob)\nwebidl.is.URLSearchParams = webidl.util.MakeTypeAssertion(URLSearchParams)\nwebidl.is.File = webidl.util.MakeTypeAssertion(File)\nwebidl.is.URL = webidl.util.MakeTypeAssertion(URL)\nwebidl.is.AbortSignal = webidl.util.MakeTypeAssertion(AbortSignal)\nwebidl.is.MessagePort = webidl.util.MakeTypeAssertion(MessagePort)\n\nwebidl.is.BufferSource = function (V) {\n return types.isArrayBuffer(V) || (\n ArrayBuffer.isView(V) &&\n types.isArrayBuffer(V.buffer)\n )\n}\n\n// https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy\nwebidl.util.getCopyOfBytesHeldByBufferSource = function (bufferSource) {\n // 1. Let jsBufferSource be the result of converting bufferSource to a JavaScript value.\n const jsBufferSource = bufferSource\n\n // 2. Let jsArrayBuffer be jsBufferSource.\n let jsArrayBuffer = jsBufferSource\n\n // 3. Let offset be 0.\n let offset = 0\n\n // 4. Let length be 0.\n let length = 0\n\n // 5. If jsBufferSource has a [[ViewedArrayBuffer]] internal slot, then:\n if (types.isTypedArray(jsBufferSource) || types.isDataView(jsBufferSource)) {\n // 5.1. Set jsArrayBuffer to jsBufferSource.[[ViewedArrayBuffer]].\n jsArrayBuffer = jsBufferSource.buffer\n\n // 5.2. Set offset to jsBufferSource.[[ByteOffset]].\n offset = jsBufferSource.byteOffset\n\n // 5.3. Set length to jsBufferSource.[[ByteLength]].\n length = jsBufferSource.byteLength\n } else {\n // 6. Otherwise:\n\n // 6.1. Assert: jsBufferSource is an ArrayBuffer or SharedArrayBuffer object.\n assert(types.isAnyArrayBuffer(jsBufferSource))\n\n // 6.2. Set length to jsBufferSource.[[ArrayBufferByteLength]].\n length = jsBufferSource.byteLength\n }\n\n // 7. If IsDetachedBuffer(jsArrayBuffer) is true, then return the empty byte sequence.\n if (jsArrayBuffer.detached) {\n return new Uint8Array(0)\n }\n\n // 8. Let bytes be a new byte sequence of length equal to length.\n const bytes = new Uint8Array(length)\n\n // 9. For i in the range offset to offset + length − 1, inclusive,\n // set bytes[i − offset] to GetValueFromBuffer(jsArrayBuffer, i, Uint8, true, Unordered).\n const view = new Uint8Array(jsArrayBuffer, offset, length)\n bytes.set(view)\n\n // 10. Return bytes.\n return bytes\n}\n\n// https://webidl.spec.whatwg.org/#es-DOMString\nwebidl.converters.DOMString = function (V, prefix, argument, flags) {\n // 1. If V is null and the conversion is to an IDL type\n // associated with the [LegacyNullToEmptyString]\n // extended attribute, then return the DOMString value\n // that represents the empty string.\n if (V === null && webidl.util.HasFlag(flags, webidl.attributes.LegacyNullToEmptyString)) {\n return ''\n }\n\n // 2. Let x be ? ToString(V).\n if (typeof V === 'symbol') {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} is a symbol, which cannot be converted to a DOMString.`\n })\n }\n\n // 3. Return the IDL DOMString value that represents the\n // same sequence of code units as the one the\n // ECMAScript String value x represents.\n return String(V)\n}\n\n// https://webidl.spec.whatwg.org/#es-ByteString\nwebidl.converters.ByteString = function (V, prefix, argument) {\n // 1. Let x be ? ToString(V).\n if (typeof V === 'symbol') {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} is a symbol, which cannot be converted to a ByteString.`\n })\n }\n\n const x = String(V)\n\n // 2. If the value of any element of x is greater than\n // 255, then throw a TypeError.\n for (let index = 0; index < x.length; index++) {\n if (x.charCodeAt(index) > 255) {\n throw new TypeError(\n 'Cannot convert argument to a ByteString because the character at ' +\n `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`\n )\n }\n }\n\n // 3. Return an IDL ByteString value whose length is the\n // length of x, and where the value of each element is\n // the value of the corresponding element of x.\n return x\n}\n\n/**\n * @param {unknown} value\n * @returns {string}\n * @see https://webidl.spec.whatwg.org/#es-USVString\n */\nwebidl.converters.USVString = function (value) {\n // TODO: rewrite this so we can control the errors thrown\n if (typeof value === 'string') {\n return value.toWellFormed()\n }\n return `${value}`.toWellFormed()\n}\n\n// https://webidl.spec.whatwg.org/#es-boolean\nwebidl.converters.boolean = function (V) {\n // 1. Let x be the result of computing ToBoolean(V).\n // https://262.ecma-international.org/10.0/index.html#table-10\n const x = Boolean(V)\n\n // 2. Return the IDL boolean value that is the one that represents\n // the same truth value as the ECMAScript Boolean value x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-any\nwebidl.converters.any = function (V) {\n return V\n}\n\n// https://webidl.spec.whatwg.org/#es-long-long\nwebidl.converters['long long'] = function (V, prefix, argument) {\n // 1. Let x be ? ConvertToInt(V, 64, \"signed\").\n const x = webidl.util.ConvertToInt(V, 64, 'signed', 0, prefix, argument)\n\n // 2. Return the IDL long long value that represents\n // the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-long-long\nwebidl.converters['unsigned long long'] = function (V, prefix, argument) {\n // 1. Let x be ? ConvertToInt(V, 64, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 64, 'unsigned', 0, prefix, argument)\n\n // 2. Return the IDL unsigned long long value that\n // represents the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-long\nwebidl.converters['unsigned long'] = function (V, prefix, argument) {\n // 1. Let x be ? ConvertToInt(V, 32, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 32, 'unsigned', 0, prefix, argument)\n\n // 2. Return the IDL unsigned long value that\n // represents the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-short\nwebidl.converters['unsigned short'] = function (V, prefix, argument, flags) {\n // 1. Let x be ? ConvertToInt(V, 16, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 16, 'unsigned', flags, prefix, argument)\n\n // 2. Return the IDL unsigned short value that represents\n // the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#idl-ArrayBuffer\nwebidl.converters.ArrayBuffer = function (V, prefix, argument, flags) {\n // 1. If V is not an Object, or V does not have an\n // [[ArrayBufferData]] internal slot, then throw a\n // TypeError.\n // 2. If IsSharedArrayBuffer(V) is true, then throw a\n // TypeError.\n // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances\n if (\n webidl.util.Type(V) !== OBJECT ||\n !types.isArrayBuffer(V)\n ) {\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${argument} (\"${webidl.util.Stringify(V)}\")`,\n types: ['ArrayBuffer']\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V) is true, then throw a\n // TypeError.\n if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a resizable ArrayBuffer.`\n })\n }\n\n // 4. Return the IDL ArrayBuffer value that is a\n // reference to the same object as V.\n return V\n}\n\n// https://webidl.spec.whatwg.org/#idl-SharedArrayBuffer\nwebidl.converters.SharedArrayBuffer = function (V, prefix, argument, flags) {\n // 1. If V is not an Object, or V does not have an\n // [[ArrayBufferData]] internal slot, then throw a\n // TypeError.\n // 2. If IsSharedArrayBuffer(V) is false, then throw a\n // TypeError.\n // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances\n if (\n webidl.util.Type(V) !== OBJECT ||\n !types.isSharedArrayBuffer(V)\n ) {\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${argument} (\"${webidl.util.Stringify(V)}\")`,\n types: ['SharedArrayBuffer']\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V) is true, then throw a\n // TypeError.\n if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a resizable SharedArrayBuffer.`\n })\n }\n\n // 4. Return the IDL SharedArrayBuffer value that is a\n // reference to the same object as V.\n return V\n}\n\n// https://webidl.spec.whatwg.org/#dfn-typed-array-type\nwebidl.converters.TypedArray = function (V, T, prefix, argument, flags) {\n // 1. Let T be the IDL type V is being converted to.\n\n // 2. If Type(V) is not Object, or V does not have a\n // [[TypedArrayName]] internal slot with a value\n // equal to T’s name, then throw a TypeError.\n if (\n webidl.util.Type(V) !== OBJECT ||\n !types.isTypedArray(V) ||\n V.constructor.name !== T.name\n ) {\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${argument} (\"${webidl.util.Stringify(V)}\")`,\n types: [T.name]\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowShared] extended attribute, and\n // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a view on a shared array buffer.`\n })\n }\n\n // 4. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a view on a resizable array buffer.`\n })\n }\n\n // 5. Return the IDL value of type T that is a reference\n // to the same object as V.\n return V\n}\n\n// https://webidl.spec.whatwg.org/#idl-DataView\nwebidl.converters.DataView = function (V, prefix, argument, flags) {\n // 1. If Type(V) is not Object, or V does not have a\n // [[DataView]] internal slot, then throw a TypeError.\n if (webidl.util.Type(V) !== OBJECT || !types.isDataView(V)) {\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${argument} (\"${webidl.util.Stringify(V)}\")`,\n types: ['DataView']\n })\n }\n\n // 2. If the conversion is not to an IDL type associated\n // with the [AllowShared] extended attribute, and\n // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true,\n // then throw a TypeError.\n if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a view on a shared array buffer.`\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a view on a resizable array buffer.`\n })\n }\n\n // 4. Return the IDL DataView value that is a reference\n // to the same object as V.\n return V\n}\n\n// https://webidl.spec.whatwg.org/#ArrayBufferView\nwebidl.converters.ArrayBufferView = function (V, prefix, argument, flags) {\n if (\n webidl.util.Type(V) !== OBJECT ||\n !types.isArrayBufferView(V)\n ) {\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${argument} (\"${webidl.util.Stringify(V)}\")`,\n types: ['ArrayBufferView']\n })\n }\n\n if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a view on a shared array buffer.`\n })\n }\n\n if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a view on a resizable array buffer.`\n })\n }\n\n return V\n}\n\n// https://webidl.spec.whatwg.org/#BufferSource\nwebidl.converters.BufferSource = function (V, prefix, argument, flags) {\n if (types.isArrayBuffer(V)) {\n return webidl.converters.ArrayBuffer(V, prefix, argument, flags)\n }\n\n if (types.isArrayBufferView(V)) {\n flags &= ~webidl.attributes.AllowShared\n\n return webidl.converters.ArrayBufferView(V, prefix, argument, flags)\n }\n\n // Make this explicit for easier debugging\n if (types.isSharedArrayBuffer(V)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a SharedArrayBuffer.`\n })\n }\n\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${argument} (\"${webidl.util.Stringify(V)}\")`,\n types: ['ArrayBuffer', 'ArrayBufferView']\n })\n}\n\n// https://webidl.spec.whatwg.org/#AllowSharedBufferSource\nwebidl.converters.AllowSharedBufferSource = function (V, prefix, argument, flags) {\n if (types.isArrayBuffer(V)) {\n return webidl.converters.ArrayBuffer(V, prefix, argument, flags)\n }\n\n if (types.isSharedArrayBuffer(V)) {\n return webidl.converters.SharedArrayBuffer(V, prefix, argument, flags)\n }\n\n if (types.isArrayBufferView(V)) {\n flags |= webidl.attributes.AllowShared\n return webidl.converters.ArrayBufferView(V, prefix, argument, flags)\n }\n\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${argument} (\"${webidl.util.Stringify(V)}\")`,\n types: ['ArrayBuffer', 'SharedArrayBuffer', 'ArrayBufferView']\n })\n}\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.ByteString\n)\n\nwebidl.converters['sequence>'] = webidl.sequenceConverter(\n webidl.converters['sequence']\n)\n\nwebidl.converters['record'] = webidl.recordConverter(\n webidl.converters.ByteString,\n webidl.converters.ByteString\n)\n\nwebidl.converters.Blob = webidl.interfaceConverter(webidl.is.Blob, 'Blob')\n\nwebidl.converters.AbortSignal = webidl.interfaceConverter(\n webidl.is.AbortSignal,\n 'AbortSignal'\n)\n\n/**\n * [LegacyTreatNonObjectAsNull]\n * callback EventHandlerNonNull = any (Event event);\n * typedef EventHandlerNonNull? EventHandler;\n * @param {*} V\n */\nwebidl.converters.EventHandlerNonNull = function (V) {\n if (webidl.util.Type(V) !== OBJECT) {\n return null\n }\n\n // [I]f the value is not an object, it will be converted to null, and if the value is not callable,\n // it will be converted to a callback function value that does nothing when called.\n if (typeof V === 'function') {\n return V\n }\n\n return () => {}\n}\n\nwebidl.attributes = {\n Clamp: 1 << 0,\n EnforceRange: 1 << 1,\n AllowShared: 1 << 2,\n AllowResizable: 1 << 3,\n LegacyNullToEmptyString: 1 << 4\n}\n\nmodule.exports = {\n webidl\n}\n","'use strict'\n\nconst { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require('./constants')\nconst { parseExtensions, isClosed, isClosing, isEstablished, isConnecting, validateCloseCodeAndReason } = require('./util')\nconst { makeRequest } = require('../fetch/request')\nconst { fetching } = require('../fetch/index')\nconst { Headers, getHeadersList } = require('../fetch/headers')\nconst { getDecodeSplit } = require('../fetch/util')\nconst { WebsocketFrameSend } = require('./frame')\nconst assert = require('node:assert')\nconst { runtimeFeatures } = require('../../util/runtime-features')\n\nconst crypto = runtimeFeatures.has('crypto')\n ? require('node:crypto')\n : null\n\nlet warningEmitted = false\n\n/**\n * @see https://websockets.spec.whatwg.org/#concept-websocket-establish\n * @param {URL} url\n * @param {string|string[]} protocols\n * @param {import('./websocket').Handler} handler\n * @param {Partial} options\n */\nfunction establishWebSocketConnection (url, protocols, client, handler, options) {\n // 1. Let requestURL be a copy of url, with its scheme set to \"http\", if url’s\n // scheme is \"ws\", and to \"https\" otherwise.\n const requestURL = url\n\n requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:'\n\n // 2. Let request be a new request, whose URL is requestURL, client is client,\n // service-workers mode is \"none\", referrer is \"no-referrer\", mode is\n // \"websocket\", credentials mode is \"include\", cache mode is \"no-store\" ,\n // redirect mode is \"error\", and use-URL-credentials flag is set.\n const request = makeRequest({\n urlList: [requestURL],\n client,\n serviceWorkers: 'none',\n referrer: 'no-referrer',\n mode: 'websocket',\n credentials: 'include',\n cache: 'no-store',\n redirect: 'error',\n useURLCredentials: true\n })\n\n // Note: undici extension, allow setting custom headers.\n if (options.headers) {\n const headersList = getHeadersList(new Headers(options.headers))\n\n request.headersList = headersList\n }\n\n // 3. Append (`Upgrade`, `websocket`) to request’s header list.\n // 4. Append (`Connection`, `Upgrade`) to request’s header list.\n // Note: both of these are handled by undici currently.\n // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397\n\n // 5. Let keyValue be a nonce consisting of a randomly selected\n // 16-byte value that has been forgiving-base64-encoded and\n // isomorphic encoded.\n const keyValue = crypto.randomBytes(16).toString('base64')\n\n // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s\n // header list.\n request.headersList.append('sec-websocket-key', keyValue, true)\n\n // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s\n // header list.\n request.headersList.append('sec-websocket-version', '13', true)\n\n // 8. For each protocol in protocols, combine\n // (`Sec-WebSocket-Protocol`, protocol) in request’s header\n // list.\n for (const protocol of protocols) {\n request.headersList.append('sec-websocket-protocol', protocol, true)\n }\n\n // 9. Let permessageDeflate be a user-agent defined\n // \"permessage-deflate\" extension header value.\n // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673\n const permessageDeflate = 'permessage-deflate; client_max_window_bits'\n\n // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to\n // request’s header list.\n request.headersList.append('sec-websocket-extensions', permessageDeflate, true)\n\n // 11. Fetch request with useParallelQueue set to true, and\n // processResponse given response being these steps:\n const controller = fetching({\n request,\n useParallelQueue: true,\n dispatcher: options.dispatcher,\n processResponse (response) {\n // 1. If response is a network error or its status is not 101,\n // fail the WebSocket connection.\n // if (response.type === 'error' || ((response.socket?.session != null && response.status !== 200) && response.status !== 101)) {\n if (response.type === 'error' || response.status !== 101) {\n // The presence of a session property on the socket indicates HTTP2\n // HTTP1\n if (response.socket?.session == null) {\n failWebsocketConnection(handler, 1002, 'Received network error or non-101 status code.', response.error)\n return\n }\n\n // HTTP2\n if (response.status !== 200) {\n failWebsocketConnection(handler, 1002, 'Received network error or non-200 status code.', response.error)\n return\n }\n }\n\n if (warningEmitted === false && response.socket?.session != null) {\n process.emitWarning('WebSocket over HTTP2 is experimental, and subject to change.', 'ExperimentalWarning')\n warningEmitted = true\n }\n\n // 2. If protocols is not the empty list and extracting header\n // list values given `Sec-WebSocket-Protocol` and response’s\n // header list results in null, failure, or the empty byte\n // sequence, then fail the WebSocket connection.\n if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) {\n failWebsocketConnection(handler, 1002, 'Server did not respond with sent protocols.')\n return\n }\n\n // 3. Follow the requirements stated step 2 to step 6, inclusive,\n // of the last set of steps in section 4.1 of The WebSocket\n // Protocol to validate response. This either results in fail\n // the WebSocket connection or the WebSocket connection is\n // established.\n\n // 2. If the response lacks an |Upgrade| header field or the |Upgrade|\n // header field contains a value that is not an ASCII case-\n // insensitive match for the value \"websocket\", the client MUST\n // _Fail the WebSocket Connection_.\n // For H2, no upgrade header is expected.\n if (response.socket.session == null && response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') {\n failWebsocketConnection(handler, 1002, 'Server did not set Upgrade header to \"websocket\".')\n return\n }\n\n // 3. If the response lacks a |Connection| header field or the\n // |Connection| header field doesn't contain a token that is an\n // ASCII case-insensitive match for the value \"Upgrade\", the client\n // MUST _Fail the WebSocket Connection_.\n // For H2, no connection header is expected.\n if (response.socket.session == null && response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') {\n failWebsocketConnection(handler, 1002, 'Server did not set Connection header to \"upgrade\".')\n return\n }\n\n // 4. If the response lacks a |Sec-WebSocket-Accept| header field or\n // the |Sec-WebSocket-Accept| contains a value other than the\n // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket-\n // Key| (as a string, not base64-decoded) with the string \"258EAFA5-\n // E914-47DA-95CA-C5AB0DC85B11\" but ignoring any leading and\n // trailing whitespace, the client MUST _Fail the WebSocket\n // Connection_.\n const secWSAccept = response.headersList.get('Sec-WebSocket-Accept')\n const digest = crypto.hash('sha1', keyValue + uid, 'base64')\n if (secWSAccept !== digest) {\n failWebsocketConnection(handler, 1002, 'Incorrect hash received in Sec-WebSocket-Accept header.')\n return\n }\n\n // 5. If the response includes a |Sec-WebSocket-Extensions| header\n // field and this header field indicates the use of an extension\n // that was not present in the client's handshake (the server has\n // indicated an extension not requested by the client), the client\n // MUST _Fail the WebSocket Connection_. (The parsing of this\n // header field to determine which extensions are requested is\n // discussed in Section 9.1.)\n const secExtension = response.headersList.get('Sec-WebSocket-Extensions')\n let extensions\n\n if (secExtension !== null) {\n extensions = parseExtensions(secExtension)\n\n if (!extensions.has('permessage-deflate')) {\n failWebsocketConnection(handler, 1002, 'Sec-WebSocket-Extensions header does not match.')\n return\n }\n }\n\n // 6. If the response includes a |Sec-WebSocket-Protocol| header field\n // and this header field indicates the use of a subprotocol that was\n // not present in the client's handshake (the server has indicated a\n // subprotocol not requested by the client), the client MUST _Fail\n // the WebSocket Connection_.\n const secProtocol = response.headersList.get('Sec-WebSocket-Protocol')\n\n if (secProtocol !== null) {\n const requestProtocols = getDecodeSplit('sec-websocket-protocol', request.headersList)\n\n // The client can request that the server use a specific subprotocol by\n // including the |Sec-WebSocket-Protocol| field in its handshake. If it\n // is specified, the server needs to include the same field and one of\n // the selected subprotocol values in its response for the connection to\n // be established.\n if (!requestProtocols.includes(secProtocol)) {\n failWebsocketConnection(handler, 1002, 'Protocol was not set in the opening handshake.')\n return\n }\n }\n\n response.socket.on('data', handler.onSocketData)\n response.socket.on('close', handler.onSocketClose)\n response.socket.on('error', handler.onSocketError)\n\n handler.wasEverConnected = true\n handler.onConnectionEstablished(response, extensions)\n }\n })\n\n return controller\n}\n\n/**\n * @see https://whatpr.org/websockets/48.html#close-the-websocket\n * @param {import('./websocket').Handler} object\n * @param {number} [code=null]\n * @param {string} [reason='']\n */\nfunction closeWebSocketConnection (object, code, reason, validate = false) {\n // 1. If code was not supplied, let code be null.\n code ??= null\n\n // 2. If reason was not supplied, let reason be the empty string.\n reason ??= ''\n\n // 3. Validate close code and reason with code and reason.\n if (validate) validateCloseCodeAndReason(code, reason)\n\n // 4. Run the first matching steps from the following list:\n // - If object’s ready state is CLOSING (2) or CLOSED (3)\n // - If the WebSocket connection is not yet established [WSP]\n // - If the WebSocket closing handshake has not yet been started [WSP]\n // - Otherwise\n if (isClosed(object.readyState) || isClosing(object.readyState)) {\n // Do nothing.\n } else if (!isEstablished(object.readyState)) {\n // Fail the WebSocket connection and set object’s ready state to CLOSING (2). [WSP]\n failWebsocketConnection(object)\n object.readyState = states.CLOSING\n } else if (!object.closeState.has(sentCloseFrameState.SENT) && !object.closeState.has(sentCloseFrameState.RECEIVED)) {\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n\n const frame = new WebsocketFrameSend()\n\n // If neither code nor reason is present, the WebSocket Close\n // message must not have a body.\n\n // If code is present, then the status code to use in the\n // WebSocket Close message must be the integer given by code.\n // If code is null and reason is the empty string, the WebSocket Close frame must not have a body.\n // If reason is non-empty but code is null, then set code to 1000 (\"Normal Closure\").\n if (reason.length !== 0 && code === null) {\n code = 1000\n }\n\n // If code is set, then the status code to use in the WebSocket Close frame must be the integer given by code.\n assert(code === null || Number.isInteger(code))\n\n if (code === null && reason.length === 0) {\n frame.frameData = emptyBuffer\n } else if (code !== null && reason === null) {\n frame.frameData = Buffer.allocUnsafe(2)\n frame.frameData.writeUInt16BE(code, 0)\n } else if (code !== null && reason !== null) {\n // If reason is also present, then reasonBytes must be\n // provided in the Close message after the status code.\n frame.frameData = Buffer.allocUnsafe(2 + Buffer.byteLength(reason))\n frame.frameData.writeUInt16BE(code, 0)\n // the body MAY contain UTF-8-encoded data with value /reason/\n frame.frameData.write(reason, 2, 'utf-8')\n } else {\n frame.frameData = emptyBuffer\n }\n\n object.socket.write(frame.createFrame(opcodes.CLOSE))\n\n object.closeState.add(sentCloseFrameState.SENT)\n\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n object.readyState = states.CLOSING\n } else {\n // Set object’s ready state to CLOSING (2).\n object.readyState = states.CLOSING\n }\n}\n\n/**\n * @param {import('./websocket').Handler} handler\n * @param {number} code\n * @param {string|undefined} reason\n * @param {unknown} cause\n * @returns {void}\n */\nfunction failWebsocketConnection (handler, code, reason, cause) {\n // If _The WebSocket Connection is Established_ prior to the point where\n // the endpoint is required to _Fail the WebSocket Connection_, the\n // endpoint SHOULD send a Close frame with an appropriate status code\n // (Section 7.4) before proceeding to _Close the WebSocket Connection_.\n if (isEstablished(handler.readyState)) {\n closeWebSocketConnection(handler, code, reason, false)\n }\n\n handler.controller.abort()\n\n if (isConnecting(handler.readyState)) {\n // If the connection was not established, we must still emit an 'error' and 'close' events\n handler.onSocketClose()\n } else if (handler.socket?.destroyed === false) {\n handler.socket.destroy()\n }\n}\n\nmodule.exports = {\n establishWebSocketConnection,\n failWebsocketConnection,\n closeWebSocketConnection\n}\n","'use strict'\n\n/**\n * This is a Globally Unique Identifier unique used to validate that the\n * endpoint accepts websocket connections.\n * @see https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3\n * @type {'258EAFA5-E914-47DA-95CA-C5AB0DC85B11'}\n */\nconst uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'\n\n/**\n * @type {PropertyDescriptor}\n */\nconst staticPropertyDescriptors = {\n enumerable: true,\n writable: false,\n configurable: false\n}\n\n/**\n * The states of the WebSocket connection.\n *\n * @readonly\n * @enum\n * @property {0} CONNECTING\n * @property {1} OPEN\n * @property {2} CLOSING\n * @property {3} CLOSED\n */\nconst states = {\n CONNECTING: 0,\n OPEN: 1,\n CLOSING: 2,\n CLOSED: 3\n}\n\n/**\n * @readonly\n * @enum\n * @property {0} NOT_SENT\n * @property {1} PROCESSING\n * @property {2} SENT\n */\nconst sentCloseFrameState = {\n SENT: 1,\n RECEIVED: 2\n}\n\n/**\n * The WebSocket opcodes.\n *\n * @readonly\n * @enum\n * @property {0x0} CONTINUATION\n * @property {0x1} TEXT\n * @property {0x2} BINARY\n * @property {0x8} CLOSE\n * @property {0x9} PING\n * @property {0xA} PONG\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.2\n */\nconst opcodes = {\n CONTINUATION: 0x0,\n TEXT: 0x1,\n BINARY: 0x2,\n CLOSE: 0x8,\n PING: 0x9,\n PONG: 0xA\n}\n\n/**\n * The maximum value for an unsigned 16-bit integer.\n *\n * @type {65535} 2 ** 16 - 1\n */\nconst maxUnsigned16Bit = 65535\n\n/**\n * The states of the parser.\n *\n * @readonly\n * @enum\n * @property {0} INFO\n * @property {2} PAYLOADLENGTH_16\n * @property {3} PAYLOADLENGTH_64\n * @property {4} READ_DATA\n */\nconst parserStates = {\n INFO: 0,\n PAYLOADLENGTH_16: 2,\n PAYLOADLENGTH_64: 3,\n READ_DATA: 4\n}\n\n/**\n * An empty buffer.\n *\n * @type {Buffer}\n */\nconst emptyBuffer = Buffer.allocUnsafe(0)\n\n/**\n * @readonly\n * @property {1} text\n * @property {2} typedArray\n * @property {3} arrayBuffer\n * @property {4} blob\n */\nconst sendHints = {\n text: 1,\n typedArray: 2,\n arrayBuffer: 3,\n blob: 4\n}\n\nmodule.exports = {\n uid,\n sentCloseFrameState,\n staticPropertyDescriptors,\n states,\n opcodes,\n maxUnsigned16Bit,\n parserStates,\n emptyBuffer,\n sendHints\n}\n","'use strict'\n\nconst { webidl } = require('../webidl')\nconst { kEnumerableProperty } = require('../../core/util')\nconst { kConstruct } = require('../../core/symbols')\n\n/**\n * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent\n */\nclass MessageEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict = {}) {\n if (type === kConstruct) {\n super(arguments[1], arguments[2])\n webidl.util.markAsUncloneable(this)\n return\n }\n\n const prefix = 'MessageEvent constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n type = webidl.converters.DOMString(type, prefix, 'type')\n eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, 'eventInitDict')\n\n super(type, eventInitDict)\n\n this.#eventInit = eventInitDict\n webidl.util.markAsUncloneable(this)\n }\n\n get data () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.data\n }\n\n get origin () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.origin\n }\n\n get lastEventId () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.lastEventId\n }\n\n get source () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.source\n }\n\n get ports () {\n webidl.brandCheck(this, MessageEvent)\n\n if (!Object.isFrozen(this.#eventInit.ports)) {\n Object.freeze(this.#eventInit.ports)\n }\n\n return this.#eventInit.ports\n }\n\n initMessageEvent (\n type,\n bubbles = false,\n cancelable = false,\n data = null,\n origin = '',\n lastEventId = '',\n source = null,\n ports = []\n ) {\n webidl.brandCheck(this, MessageEvent)\n\n webidl.argumentLengthCheck(arguments, 1, 'MessageEvent.initMessageEvent')\n\n return new MessageEvent(type, {\n bubbles, cancelable, data, origin, lastEventId, source, ports\n })\n }\n\n static createFastMessageEvent (type, init) {\n const messageEvent = new MessageEvent(kConstruct, type, init)\n messageEvent.#eventInit = init\n messageEvent.#eventInit.data ??= null\n messageEvent.#eventInit.origin ??= ''\n messageEvent.#eventInit.lastEventId ??= ''\n messageEvent.#eventInit.source ??= null\n messageEvent.#eventInit.ports ??= []\n return messageEvent\n }\n}\n\nconst { createFastMessageEvent } = MessageEvent\ndelete MessageEvent.createFastMessageEvent\n\n/**\n * @see https://websockets.spec.whatwg.org/#the-closeevent-interface\n */\nclass CloseEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict = {}) {\n const prefix = 'CloseEvent constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n type = webidl.converters.DOMString(type, prefix, 'type')\n eventInitDict = webidl.converters.CloseEventInit(eventInitDict)\n\n super(type, eventInitDict)\n\n this.#eventInit = eventInitDict\n webidl.util.markAsUncloneable(this)\n }\n\n get wasClean () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.wasClean\n }\n\n get code () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.code\n }\n\n get reason () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.reason\n }\n}\n\n// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface\nclass ErrorEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict) {\n const prefix = 'ErrorEvent constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n super(type, eventInitDict)\n webidl.util.markAsUncloneable(this)\n\n type = webidl.converters.DOMString(type, prefix, 'type')\n eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {})\n\n this.#eventInit = eventInitDict\n }\n\n get message () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.message\n }\n\n get filename () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.filename\n }\n\n get lineno () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.lineno\n }\n\n get colno () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.colno\n }\n\n get error () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.error\n }\n}\n\nObject.defineProperties(MessageEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'MessageEvent',\n configurable: true\n },\n data: kEnumerableProperty,\n origin: kEnumerableProperty,\n lastEventId: kEnumerableProperty,\n source: kEnumerableProperty,\n ports: kEnumerableProperty,\n initMessageEvent: kEnumerableProperty\n})\n\nObject.defineProperties(CloseEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'CloseEvent',\n configurable: true\n },\n reason: kEnumerableProperty,\n code: kEnumerableProperty,\n wasClean: kEnumerableProperty\n})\n\nObject.defineProperties(ErrorEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'ErrorEvent',\n configurable: true\n },\n message: kEnumerableProperty,\n filename: kEnumerableProperty,\n lineno: kEnumerableProperty,\n colno: kEnumerableProperty,\n error: kEnumerableProperty\n})\n\nwebidl.converters.MessagePort = webidl.interfaceConverter(\n webidl.is.MessagePort,\n 'MessagePort'\n)\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.MessagePort\n)\n\nconst eventInit = [\n {\n key: 'bubbles',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'cancelable',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'composed',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n }\n]\n\nwebidl.converters.MessageEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'data',\n converter: webidl.converters.any,\n defaultValue: () => null\n },\n {\n key: 'origin',\n converter: webidl.converters.USVString,\n defaultValue: () => ''\n },\n {\n key: 'lastEventId',\n converter: webidl.converters.DOMString,\n defaultValue: () => ''\n },\n {\n key: 'source',\n // Node doesn't implement WindowProxy or ServiceWorker, so the only\n // valid value for source is a MessagePort.\n converter: webidl.nullableConverter(webidl.converters.MessagePort),\n defaultValue: () => null\n },\n {\n key: 'ports',\n converter: webidl.converters['sequence'],\n defaultValue: () => []\n }\n])\n\nwebidl.converters.CloseEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'wasClean',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'code',\n converter: webidl.converters['unsigned short'],\n defaultValue: () => 0\n },\n {\n key: 'reason',\n converter: webidl.converters.USVString,\n defaultValue: () => ''\n }\n])\n\nwebidl.converters.ErrorEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'message',\n converter: webidl.converters.DOMString,\n defaultValue: () => ''\n },\n {\n key: 'filename',\n converter: webidl.converters.USVString,\n defaultValue: () => ''\n },\n {\n key: 'lineno',\n converter: webidl.converters['unsigned long'],\n defaultValue: () => 0\n },\n {\n key: 'colno',\n converter: webidl.converters['unsigned long'],\n defaultValue: () => 0\n },\n {\n key: 'error',\n converter: webidl.converters.any\n }\n])\n\nmodule.exports = {\n MessageEvent,\n CloseEvent,\n ErrorEvent,\n createFastMessageEvent\n}\n","'use strict'\n\nconst { runtimeFeatures } = require('../../util/runtime-features')\nconst { maxUnsigned16Bit, opcodes } = require('./constants')\n\nconst BUFFER_SIZE = 8 * 1024\n\nlet buffer = null\nlet bufIdx = BUFFER_SIZE\n\nconst randomFillSync = runtimeFeatures.has('crypto')\n ? require('node:crypto').randomFillSync\n // not full compatibility, but minimum.\n : function randomFillSync (buffer, _offset, _size) {\n for (let i = 0; i < buffer.length; ++i) {\n buffer[i] = Math.random() * 255 | 0\n }\n return buffer\n }\n\nfunction generateMask () {\n if (bufIdx === BUFFER_SIZE) {\n bufIdx = 0\n randomFillSync((buffer ??= Buffer.allocUnsafeSlow(BUFFER_SIZE)), 0, BUFFER_SIZE)\n }\n return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]]\n}\n\nclass WebsocketFrameSend {\n /**\n * @param {Buffer|undefined} data\n */\n constructor (data) {\n this.frameData = data\n }\n\n createFrame (opcode) {\n const frameData = this.frameData\n const maskKey = generateMask()\n const bodyLength = frameData?.byteLength ?? 0\n\n /** @type {number} */\n let payloadLength = bodyLength // 0-125\n let offset = 6\n\n if (bodyLength > maxUnsigned16Bit) {\n offset += 8 // payload length is next 8 bytes\n payloadLength = 127\n } else if (bodyLength > 125) {\n offset += 2 // payload length is next 2 bytes\n payloadLength = 126\n }\n\n const buffer = Buffer.allocUnsafe(bodyLength + offset)\n\n // Clear first 2 bytes, everything else is overwritten\n buffer[0] = buffer[1] = 0\n buffer[0] |= 0x80 // FIN\n buffer[0] = (buffer[0] & 0xF0) + opcode // opcode\n\n /*! ws. MIT License. Einar Otto Stangvik */\n buffer[offset - 4] = maskKey[0]\n buffer[offset - 3] = maskKey[1]\n buffer[offset - 2] = maskKey[2]\n buffer[offset - 1] = maskKey[3]\n\n buffer[1] = payloadLength\n\n if (payloadLength === 126) {\n buffer.writeUInt16BE(bodyLength, 2)\n } else if (payloadLength === 127) {\n // Clear extended payload length\n buffer[2] = buffer[3] = 0\n buffer.writeUIntBE(bodyLength, 4, 6)\n }\n\n buffer[1] |= 0x80 // MASK\n\n // mask body\n for (let i = 0; i < bodyLength; ++i) {\n buffer[offset + i] = frameData[i] ^ maskKey[i & 3]\n }\n\n return buffer\n }\n\n /**\n * @param {Uint8Array} buffer\n */\n static createFastTextFrame (buffer) {\n const maskKey = generateMask()\n\n const bodyLength = buffer.length\n\n // mask body\n for (let i = 0; i < bodyLength; ++i) {\n buffer[i] ^= maskKey[i & 3]\n }\n\n let payloadLength = bodyLength\n let offset = 6\n\n if (bodyLength > maxUnsigned16Bit) {\n offset += 8 // payload length is next 8 bytes\n payloadLength = 127\n } else if (bodyLength > 125) {\n offset += 2 // payload length is next 2 bytes\n payloadLength = 126\n }\n const head = Buffer.allocUnsafeSlow(offset)\n\n head[0] = 0x80 /* FIN */ | opcodes.TEXT /* opcode TEXT */\n head[1] = payloadLength | 0x80 /* MASK */\n head[offset - 4] = maskKey[0]\n head[offset - 3] = maskKey[1]\n head[offset - 2] = maskKey[2]\n head[offset - 1] = maskKey[3]\n\n if (payloadLength === 126) {\n head.writeUInt16BE(bodyLength, 2)\n } else if (payloadLength === 127) {\n head[2] = head[3] = 0\n head.writeUIntBE(bodyLength, 4, 6)\n }\n\n return [head, buffer]\n }\n}\n\nmodule.exports = {\n WebsocketFrameSend,\n generateMask // for benchmark\n}\n","'use strict'\n\nconst { createInflateRaw, Z_DEFAULT_WINDOWBITS } = require('node:zlib')\nconst { isValidClientWindowBits } = require('./util')\nconst { MessageSizeExceededError } = require('../../core/errors')\n\nconst tail = Buffer.from([0x00, 0x00, 0xff, 0xff])\nconst kBuffer = Symbol('kBuffer')\nconst kLength = Symbol('kLength')\n\n// Default maximum decompressed message size: 4 MB\nconst kDefaultMaxDecompressedSize = 4 * 1024 * 1024\n\nclass PerMessageDeflate {\n /** @type {import('node:zlib').InflateRaw} */\n #inflate\n\n #options = {}\n\n /** @type {boolean} */\n #aborted = false\n\n /** @type {Function|null} */\n #currentCallback = null\n\n /**\n * @param {Map} extensions\n */\n constructor (extensions) {\n this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover')\n this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits')\n }\n\n decompress (chunk, fin, callback) {\n // An endpoint uses the following algorithm to decompress a message.\n // 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the\n // payload of the message.\n // 2. Decompress the resulting data using DEFLATE.\n\n if (this.#aborted) {\n callback(new MessageSizeExceededError())\n return\n }\n\n if (!this.#inflate) {\n let windowBits = Z_DEFAULT_WINDOWBITS\n\n if (this.#options.serverMaxWindowBits) { // empty values default to Z_DEFAULT_WINDOWBITS\n if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) {\n callback(new Error('Invalid server_max_window_bits'))\n return\n }\n\n windowBits = Number.parseInt(this.#options.serverMaxWindowBits)\n }\n\n try {\n this.#inflate = createInflateRaw({ windowBits })\n } catch (err) {\n callback(err)\n return\n }\n this.#inflate[kBuffer] = []\n this.#inflate[kLength] = 0\n\n this.#inflate.on('data', (data) => {\n if (this.#aborted) {\n return\n }\n\n this.#inflate[kLength] += data.length\n\n if (this.#inflate[kLength] > kDefaultMaxDecompressedSize) {\n this.#aborted = true\n this.#inflate.removeAllListeners()\n this.#inflate.destroy()\n this.#inflate = null\n\n if (this.#currentCallback) {\n const cb = this.#currentCallback\n this.#currentCallback = null\n cb(new MessageSizeExceededError())\n }\n return\n }\n\n this.#inflate[kBuffer].push(data)\n })\n\n this.#inflate.on('error', (err) => {\n this.#inflate = null\n callback(err)\n })\n }\n\n this.#currentCallback = callback\n this.#inflate.write(chunk)\n if (fin) {\n this.#inflate.write(tail)\n }\n\n this.#inflate.flush(() => {\n if (this.#aborted || !this.#inflate) {\n return\n }\n\n const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength])\n\n this.#inflate[kBuffer].length = 0\n this.#inflate[kLength] = 0\n this.#currentCallback = null\n\n callback(null, full)\n })\n }\n}\n\nmodule.exports = { PerMessageDeflate }\n","'use strict'\n\nconst { Writable } = require('node:stream')\nconst assert = require('node:assert')\nconst { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require('./constants')\nconst {\n isValidStatusCode,\n isValidOpcode,\n websocketMessageReceived,\n utf8Decode,\n isControlFrame,\n isTextBinaryFrame,\n isContinuationFrame\n} = require('./util')\nconst { failWebsocketConnection } = require('./connection')\nconst { WebsocketFrameSend } = require('./frame')\nconst { PerMessageDeflate } = require('./permessage-deflate')\nconst { MessageSizeExceededError } = require('../../core/errors')\n\n// This code was influenced by ws released under the MIT license.\n// Copyright (c) 2011 Einar Otto Stangvik \n// Copyright (c) 2013 Arnout Kazemier and contributors\n// Copyright (c) 2016 Luigi Pinca and contributors\n\nclass ByteParser extends Writable {\n #buffers = []\n #fragmentsBytes = 0\n #byteOffset = 0\n #loop = false\n\n #state = parserStates.INFO\n\n #info = {}\n #fragments = []\n\n /** @type {Map} */\n #extensions\n\n /** @type {import('./websocket').Handler} */\n #handler\n\n /**\n * @param {import('./websocket').Handler} handler\n * @param {Map|null} extensions\n */\n constructor (handler, extensions) {\n super()\n\n this.#handler = handler\n this.#extensions = extensions == null ? new Map() : extensions\n\n if (this.#extensions.has('permessage-deflate')) {\n this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions))\n }\n }\n\n /**\n * @param {Buffer} chunk\n * @param {() => void} callback\n */\n _write (chunk, _, callback) {\n this.#buffers.push(chunk)\n this.#byteOffset += chunk.length\n this.#loop = true\n\n this.run(callback)\n }\n\n /**\n * Runs whenever a new chunk is received.\n * Callback is called whenever there are no more chunks buffering,\n * or not enough bytes are buffered to parse.\n */\n run (callback) {\n while (this.#loop) {\n if (this.#state === parserStates.INFO) {\n // If there aren't enough bytes to parse the payload length, etc.\n if (this.#byteOffset < 2) {\n return callback()\n }\n\n const buffer = this.consume(2)\n const fin = (buffer[0] & 0x80) !== 0\n const opcode = buffer[0] & 0x0F\n const masked = (buffer[1] & 0x80) === 0x80\n\n const fragmented = !fin && opcode !== opcodes.CONTINUATION\n const payloadLength = buffer[1] & 0x7F\n\n const rsv1 = buffer[0] & 0x40\n const rsv2 = buffer[0] & 0x20\n const rsv3 = buffer[0] & 0x10\n\n if (!isValidOpcode(opcode)) {\n failWebsocketConnection(this.#handler, 1002, 'Invalid opcode received')\n return callback()\n }\n\n if (masked) {\n failWebsocketConnection(this.#handler, 1002, 'Frame cannot be masked')\n return callback()\n }\n\n // MUST be 0 unless an extension is negotiated that defines meanings\n // for non-zero values. If a nonzero value is received and none of\n // the negotiated extensions defines the meaning of such a nonzero\n // value, the receiving endpoint MUST _Fail the WebSocket\n // Connection_.\n // This document allocates the RSV1 bit of the WebSocket header for\n // PMCEs and calls the bit the \"Per-Message Compressed\" bit. On a\n // WebSocket connection where a PMCE is in use, this bit indicates\n // whether a message is compressed or not.\n if (rsv1 !== 0 && !this.#extensions.has('permessage-deflate')) {\n failWebsocketConnection(this.#handler, 1002, 'Expected RSV1 to be clear.')\n return\n }\n\n if (rsv2 !== 0 || rsv3 !== 0) {\n failWebsocketConnection(this.#handler, 1002, 'RSV1, RSV2, RSV3 must be clear')\n return\n }\n\n if (fragmented && !isTextBinaryFrame(opcode)) {\n // Only text and binary frames can be fragmented\n failWebsocketConnection(this.#handler, 1002, 'Invalid frame type was fragmented.')\n return\n }\n\n // If we are already parsing a text/binary frame and do not receive either\n // a continuation frame or close frame, fail the connection.\n if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) {\n failWebsocketConnection(this.#handler, 1002, 'Expected continuation frame')\n return\n }\n\n if (this.#info.fragmented && fragmented) {\n // A fragmented frame can't be fragmented itself\n failWebsocketConnection(this.#handler, 1002, 'Fragmented frame exceeded 125 bytes.')\n return\n }\n\n // \"All control frames MUST have a payload length of 125 bytes or less\n // and MUST NOT be fragmented.\"\n if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) {\n failWebsocketConnection(this.#handler, 1002, 'Control frame either too large or fragmented')\n return\n }\n\n if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) {\n failWebsocketConnection(this.#handler, 1002, 'Unexpected continuation frame')\n return\n }\n\n if (payloadLength <= 125) {\n this.#info.payloadLength = payloadLength\n this.#state = parserStates.READ_DATA\n } else if (payloadLength === 126) {\n this.#state = parserStates.PAYLOADLENGTH_16\n } else if (payloadLength === 127) {\n this.#state = parserStates.PAYLOADLENGTH_64\n }\n\n if (isTextBinaryFrame(opcode)) {\n this.#info.binaryType = opcode\n this.#info.compressed = rsv1 !== 0\n }\n\n this.#info.opcode = opcode\n this.#info.masked = masked\n this.#info.fin = fin\n this.#info.fragmented = fragmented\n } else if (this.#state === parserStates.PAYLOADLENGTH_16) {\n if (this.#byteOffset < 2) {\n return callback()\n }\n\n const buffer = this.consume(2)\n\n this.#info.payloadLength = buffer.readUInt16BE(0)\n this.#state = parserStates.READ_DATA\n } else if (this.#state === parserStates.PAYLOADLENGTH_64) {\n if (this.#byteOffset < 8) {\n return callback()\n }\n\n const buffer = this.consume(8)\n const upper = buffer.readUInt32BE(0)\n const lower = buffer.readUInt32BE(4)\n\n // 2^31 is the maximum bytes an arraybuffer can contain\n // on 32-bit systems. Although, on 64-bit systems, this is\n // 2^53-1 bytes.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length\n // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275\n // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e\n if (upper !== 0 || lower > 2 ** 31 - 1) {\n failWebsocketConnection(this.#handler, 1009, 'Received payload length > 2^31 bytes.')\n return\n }\n\n this.#info.payloadLength = lower\n this.#state = parserStates.READ_DATA\n } else if (this.#state === parserStates.READ_DATA) {\n if (this.#byteOffset < this.#info.payloadLength) {\n return callback()\n }\n\n const body = this.consume(this.#info.payloadLength)\n\n if (isControlFrame(this.#info.opcode)) {\n this.#loop = this.parseControlFrame(body)\n this.#state = parserStates.INFO\n } else {\n if (!this.#info.compressed) {\n this.writeFragments(body)\n\n // If the frame is not fragmented, a message has been received.\n // If the frame is fragmented, it will terminate with a fin bit set\n // and an opcode of 0 (continuation), therefore we handle that when\n // parsing continuation frames, not here.\n if (!this.#info.fragmented && this.#info.fin) {\n websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments())\n }\n\n this.#state = parserStates.INFO\n } else {\n this.#extensions.get('permessage-deflate').decompress(body, this.#info.fin, (error, data) => {\n if (error) {\n // Use 1009 (Message Too Big) for decompression size limit errors\n const code = error instanceof MessageSizeExceededError ? 1009 : 1007\n failWebsocketConnection(this.#handler, code, error.message)\n return\n }\n\n this.writeFragments(data)\n\n if (!this.#info.fin) {\n this.#state = parserStates.INFO\n this.#loop = true\n this.run(callback)\n return\n }\n\n websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments())\n\n this.#loop = true\n this.#state = parserStates.INFO\n this.run(callback)\n })\n\n this.#loop = false\n break\n }\n }\n }\n }\n }\n\n /**\n * Take n bytes from the buffered Buffers\n * @param {number} n\n * @returns {Buffer}\n */\n consume (n) {\n if (n > this.#byteOffset) {\n throw new Error('Called consume() before buffers satiated.')\n } else if (n === 0) {\n return emptyBuffer\n }\n\n this.#byteOffset -= n\n\n const first = this.#buffers[0]\n\n if (first.length > n) {\n // replace with remaining buffer\n this.#buffers[0] = first.subarray(n, first.length)\n return first.subarray(0, n)\n } else if (first.length === n) {\n // prefect match\n return this.#buffers.shift()\n } else {\n let offset = 0\n // If Buffer.allocUnsafe is used, extra copies will be made because the offset is non-zero.\n const buffer = Buffer.allocUnsafeSlow(n)\n while (offset !== n) {\n const next = this.#buffers[0]\n const length = next.length\n\n if (length + offset === n) {\n buffer.set(this.#buffers.shift(), offset)\n break\n } else if (length + offset > n) {\n buffer.set(next.subarray(0, n - offset), offset)\n this.#buffers[0] = next.subarray(n - offset)\n break\n } else {\n buffer.set(this.#buffers.shift(), offset)\n offset += length\n }\n }\n\n return buffer\n }\n }\n\n writeFragments (fragment) {\n this.#fragmentsBytes += fragment.length\n this.#fragments.push(fragment)\n }\n\n consumeFragments () {\n const fragments = this.#fragments\n\n if (fragments.length === 1) {\n // single fragment\n this.#fragmentsBytes = 0\n return fragments.shift()\n }\n\n let offset = 0\n // If Buffer.allocUnsafe is used, extra copies will be made because the offset is non-zero.\n const output = Buffer.allocUnsafeSlow(this.#fragmentsBytes)\n\n for (let i = 0; i < fragments.length; ++i) {\n const buffer = fragments[i]\n output.set(buffer, offset)\n offset += buffer.length\n }\n\n this.#fragments = []\n this.#fragmentsBytes = 0\n\n return output\n }\n\n parseCloseBody (data) {\n assert(data.length !== 1)\n\n // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5\n /** @type {number|undefined} */\n let code\n\n if (data.length >= 2) {\n // _The WebSocket Connection Close Code_ is\n // defined as the status code (Section 7.4) contained in the first Close\n // control frame received by the application\n code = data.readUInt16BE(0)\n }\n\n if (code !== undefined && !isValidStatusCode(code)) {\n return { code: 1002, reason: 'Invalid status code', error: true }\n }\n\n // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6\n /** @type {Buffer} */\n let reason = data.subarray(2)\n\n // Remove BOM\n if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) {\n reason = reason.subarray(3)\n }\n\n try {\n reason = utf8Decode(reason)\n } catch {\n return { code: 1007, reason: 'Invalid UTF-8', error: true }\n }\n\n return { code, reason, error: false }\n }\n\n /**\n * Parses control frames.\n * @param {Buffer} body\n */\n parseControlFrame (body) {\n const { opcode, payloadLength } = this.#info\n\n if (opcode === opcodes.CLOSE) {\n if (payloadLength === 1) {\n failWebsocketConnection(this.#handler, 1002, 'Received close frame with a 1-byte body.')\n return false\n }\n\n this.#info.closeInfo = this.parseCloseBody(body)\n\n if (this.#info.closeInfo.error) {\n const { code, reason } = this.#info.closeInfo\n\n failWebsocketConnection(this.#handler, code, reason)\n return false\n }\n\n // Upon receiving such a frame, the other peer sends a\n // Close frame in response, if it hasn't already sent one.\n if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {\n // If an endpoint receives a Close frame and did not previously send a\n // Close frame, the endpoint MUST send a Close frame in response. (When\n // sending a Close frame in response, the endpoint typically echos the\n // status code it received.)\n let body = emptyBuffer\n if (this.#info.closeInfo.code) {\n body = Buffer.allocUnsafe(2)\n body.writeUInt16BE(this.#info.closeInfo.code, 0)\n }\n const closeFrame = new WebsocketFrameSend(body)\n\n this.#handler.socket.write(closeFrame.createFrame(opcodes.CLOSE))\n this.#handler.closeState.add(sentCloseFrameState.SENT)\n }\n\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n this.#handler.readyState = states.CLOSING\n this.#handler.closeState.add(sentCloseFrameState.RECEIVED)\n\n return false\n } else if (opcode === opcodes.PING) {\n // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in\n // response, unless it already received a Close frame.\n // A Pong frame sent in response to a Ping frame must have identical\n // \"Application data\"\n\n if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {\n const frame = new WebsocketFrameSend(body)\n\n this.#handler.socket.write(frame.createFrame(opcodes.PONG))\n\n this.#handler.onPing(body)\n }\n } else if (opcode === opcodes.PONG) {\n // A Pong frame MAY be sent unsolicited. This serves as a\n // unidirectional heartbeat. A response to an unsolicited Pong frame is\n // not expected.\n this.#handler.onPong(body)\n }\n\n return true\n }\n\n get closingInfo () {\n return this.#info.closeInfo\n }\n}\n\nmodule.exports = {\n ByteParser\n}\n","'use strict'\n\nconst { WebsocketFrameSend } = require('./frame')\nconst { opcodes, sendHints } = require('./constants')\nconst FixedQueue = require('../../dispatcher/fixed-queue')\n\n/**\n * @typedef {object} SendQueueNode\n * @property {Promise | null} promise\n * @property {((...args: any[]) => any)} callback\n * @property {Buffer | null} frame\n */\n\nclass SendQueue {\n /**\n * @type {FixedQueue}\n */\n #queue = new FixedQueue()\n\n /**\n * @type {boolean}\n */\n #running = false\n\n /** @type {import('node:net').Socket} */\n #socket\n\n constructor (socket) {\n this.#socket = socket\n }\n\n add (item, cb, hint) {\n if (hint !== sendHints.blob) {\n if (!this.#running) {\n // TODO(@tsctx): support fast-path for string on running\n if (hint === sendHints.text) {\n // special fast-path for string\n const { 0: head, 1: body } = WebsocketFrameSend.createFastTextFrame(item)\n this.#socket.cork()\n this.#socket.write(head)\n this.#socket.write(body, cb)\n this.#socket.uncork()\n } else {\n // direct writing\n this.#socket.write(createFrame(item, hint), cb)\n }\n } else {\n /** @type {SendQueueNode} */\n const node = {\n promise: null,\n callback: cb,\n frame: createFrame(item, hint)\n }\n this.#queue.push(node)\n }\n return\n }\n\n /** @type {SendQueueNode} */\n const node = {\n promise: item.arrayBuffer().then((ab) => {\n node.promise = null\n node.frame = createFrame(ab, hint)\n }),\n callback: cb,\n frame: null\n }\n\n this.#queue.push(node)\n\n if (!this.#running) {\n this.#run()\n }\n }\n\n async #run () {\n this.#running = true\n const queue = this.#queue\n while (!queue.isEmpty()) {\n const node = queue.shift()\n // wait pending promise\n if (node.promise !== null) {\n await node.promise\n }\n // write\n this.#socket.write(node.frame, node.callback)\n // cleanup\n node.callback = node.frame = null\n }\n this.#running = false\n }\n}\n\nfunction createFrame (data, hint) {\n return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.text ? opcodes.TEXT : opcodes.BINARY)\n}\n\nfunction toBuffer (data, hint) {\n switch (hint) {\n case sendHints.text:\n case sendHints.typedArray:\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength)\n case sendHints.arrayBuffer:\n case sendHints.blob:\n return new Uint8Array(data)\n }\n}\n\nmodule.exports = { SendQueue }\n","'use strict'\n\nconst { webidl } = require('../../webidl')\nconst { validateCloseCodeAndReason } = require('../util')\nconst { kConstruct } = require('../../../core/symbols')\nconst { kEnumerableProperty } = require('../../../core/util')\n\nfunction createInheritableDOMException () {\n // https://github.com/nodejs/node/issues/59677\n class Test extends DOMException {\n get reason () {\n return ''\n }\n }\n\n if (new Test().reason !== undefined) {\n return DOMException\n }\n\n return new Proxy(DOMException, {\n construct (target, args, newTarget) {\n const instance = Reflect.construct(target, args, target)\n Object.setPrototypeOf(instance, newTarget.prototype)\n return instance\n }\n })\n}\n\nclass WebSocketError extends createInheritableDOMException() {\n #closeCode\n #reason\n\n constructor (message = '', init = undefined) {\n message = webidl.converters.DOMString(message, 'WebSocketError', 'message')\n\n // 1. Set this 's name to \" WebSocketError \".\n // 2. Set this 's message to message .\n super(message, 'WebSocketError')\n\n if (init === kConstruct) {\n return\n } else if (init !== null) {\n init = webidl.converters.WebSocketCloseInfo(init)\n }\n\n // 3. Let code be init [\" closeCode \"] if it exists , or null otherwise.\n let code = init.closeCode ?? null\n\n // 4. Let reason be init [\" reason \"] if it exists , or the empty string otherwise.\n const reason = init.reason ?? ''\n\n // 5. Validate close code and reason with code and reason .\n validateCloseCodeAndReason(code, reason)\n\n // 6. If reason is non-empty, but code is not set, then set code to 1000 (\"Normal Closure\").\n if (reason.length !== 0 && code === null) {\n code = 1000\n }\n\n // 7. Set this 's closeCode to code .\n this.#closeCode = code\n\n // 8. Set this 's reason to reason .\n this.#reason = reason\n }\n\n get closeCode () {\n return this.#closeCode\n }\n\n get reason () {\n return this.#reason\n }\n\n /**\n * @param {string} message\n * @param {number|null} code\n * @param {string} reason\n */\n static createUnvalidatedWebSocketError (message, code, reason) {\n const error = new WebSocketError(message, kConstruct)\n error.#closeCode = code\n error.#reason = reason\n return error\n }\n}\n\nconst { createUnvalidatedWebSocketError } = WebSocketError\ndelete WebSocketError.createUnvalidatedWebSocketError\n\nObject.defineProperties(WebSocketError.prototype, {\n closeCode: kEnumerableProperty,\n reason: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'WebSocketError',\n writable: false,\n enumerable: false,\n configurable: true\n }\n})\n\nwebidl.is.WebSocketError = webidl.util.MakeTypeAssertion(WebSocketError)\n\nmodule.exports = { WebSocketError, createUnvalidatedWebSocketError }\n","'use strict'\n\nconst { createDeferredPromise } = require('../../../util/promise')\nconst { environmentSettingsObject } = require('../../fetch/util')\nconst { states, opcodes, sentCloseFrameState } = require('../constants')\nconst { webidl } = require('../../webidl')\nconst { getURLRecord, isValidSubprotocol, isEstablished, utf8Decode } = require('../util')\nconst { establishWebSocketConnection, failWebsocketConnection, closeWebSocketConnection } = require('../connection')\nconst { channels } = require('../../../core/diagnostics')\nconst { WebsocketFrameSend } = require('../frame')\nconst { ByteParser } = require('../receiver')\nconst { WebSocketError, createUnvalidatedWebSocketError } = require('./websocketerror')\nconst { kEnumerableProperty } = require('../../../core/util')\nconst { utf8DecodeBytes } = require('../../../encoding')\n\nlet emittedExperimentalWarning = false\n\nclass WebSocketStream {\n // Each WebSocketStream object has an associated url , which is a URL record .\n /** @type {URL} */\n #url\n\n // Each WebSocketStream object has an associated opened promise , which is a promise.\n /** @type {import('../../../util/promise').DeferredPromise} */\n #openedPromise\n\n // Each WebSocketStream object has an associated closed promise , which is a promise.\n /** @type {import('../../../util/promise').DeferredPromise} */\n #closedPromise\n\n // Each WebSocketStream object has an associated readable stream , which is a ReadableStream .\n /** @type {ReadableStream} */\n #readableStream\n /** @type {ReadableStreamDefaultController} */\n #readableStreamController\n\n // Each WebSocketStream object has an associated writable stream , which is a WritableStream .\n /** @type {WritableStream} */\n #writableStream\n\n // Each WebSocketStream object has an associated boolean handshake aborted , which is initially false.\n #handshakeAborted = false\n\n /** @type {import('../websocket').Handler} */\n #handler = {\n // https://whatpr.org/websockets/48/7b748d3...d5570f3.html#feedback-to-websocket-stream-from-the-protocol\n onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions),\n onMessage: (opcode, data) => this.#onMessage(opcode, data),\n onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message),\n onParserDrain: () => this.#handler.socket.resume(),\n onSocketData: (chunk) => {\n if (!this.#parser.write(chunk)) {\n this.#handler.socket.pause()\n }\n },\n onSocketError: (err) => {\n this.#handler.readyState = states.CLOSING\n\n if (channels.socketError.hasSubscribers) {\n channels.socketError.publish(err)\n }\n\n this.#handler.socket.destroy()\n },\n onSocketClose: () => this.#onSocketClose(),\n onPing: () => {},\n onPong: () => {},\n\n readyState: states.CONNECTING,\n socket: null,\n closeState: new Set(),\n controller: null,\n wasEverConnected: false\n }\n\n /** @type {import('../receiver').ByteParser} */\n #parser\n\n constructor (url, options = undefined) {\n if (!emittedExperimentalWarning) {\n process.emitWarning('WebSocketStream is experimental! Expect it to change at any time.', {\n code: 'UNDICI-WSS'\n })\n emittedExperimentalWarning = true\n }\n\n webidl.argumentLengthCheck(arguments, 1, 'WebSocket')\n\n url = webidl.converters.USVString(url)\n if (options !== null) {\n options = webidl.converters.WebSocketStreamOptions(options)\n }\n\n // 1. Let baseURL be this 's relevant settings object 's API base URL .\n const baseURL = environmentSettingsObject.settingsObject.baseUrl\n\n // 2. Let urlRecord be the result of getting a URL record given url and baseURL .\n const urlRecord = getURLRecord(url, baseURL)\n\n // 3. Let protocols be options [\" protocols \"] if it exists , otherwise an empty sequence.\n const protocols = options.protocols\n\n // 4. 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 . [WSP]\n if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n // 5. Set this 's url to urlRecord .\n this.#url = urlRecord.toString()\n\n // 6. Set this 's opened promise and closed promise to new promises.\n this.#openedPromise = createDeferredPromise()\n this.#closedPromise = createDeferredPromise()\n\n // 7. Apply backpressure to the WebSocket.\n // TODO\n\n // 8. If options [\" signal \"] exists ,\n if (options.signal != null) {\n // 8.1. Let signal be options [\" signal \"].\n const signal = options.signal\n\n // 8.2. If signal is aborted , then reject this 's opened promise and closed promise with signal ’s abort reason\n // and return.\n if (signal.aborted) {\n this.#openedPromise.reject(signal.reason)\n this.#closedPromise.reject(signal.reason)\n return\n }\n\n // 8.3. Add the following abort steps to signal :\n signal.addEventListener('abort', () => {\n // 8.3.1. If the WebSocket connection is not yet established : [WSP]\n if (!isEstablished(this.#handler.readyState)) {\n // 8.3.1.1. Fail the WebSocket connection .\n failWebsocketConnection(this.#handler)\n\n // Set this 's ready state to CLOSING .\n this.#handler.readyState = states.CLOSING\n\n // Reject this 's opened promise and closed promise with signal ’s abort reason .\n this.#openedPromise.reject(signal.reason)\n this.#closedPromise.reject(signal.reason)\n\n // Set this 's handshake aborted to true.\n this.#handshakeAborted = true\n }\n }, { once: true })\n }\n\n // 9. Let client be this 's relevant settings object .\n const client = environmentSettingsObject.settingsObject\n\n // 10. Run this step in parallel :\n // 10.1. Establish a WebSocket connection given urlRecord , protocols , and client . [FETCH]\n this.#handler.controller = establishWebSocketConnection(\n urlRecord,\n protocols,\n client,\n this.#handler,\n options\n )\n }\n\n // The url getter steps are to return this 's url , serialized .\n get url () {\n return this.#url.toString()\n }\n\n // The opened getter steps are to return this 's opened promise .\n get opened () {\n return this.#openedPromise.promise\n }\n\n // The closed getter steps are to return this 's closed promise .\n get closed () {\n return this.#closedPromise.promise\n }\n\n // The close( closeInfo ) method steps are:\n close (closeInfo = undefined) {\n if (closeInfo !== null) {\n closeInfo = webidl.converters.WebSocketCloseInfo(closeInfo)\n }\n\n // 1. Let code be closeInfo [\" closeCode \"] if present, or null otherwise.\n const code = closeInfo.closeCode ?? null\n\n // 2. Let reason be closeInfo [\" reason \"].\n const reason = closeInfo.reason\n\n // 3. Close the WebSocket with this , code , and reason .\n closeWebSocketConnection(this.#handler, code, reason, true)\n }\n\n #write (chunk) {\n // See /websockets/stream/tentative/write.any.html\n chunk = webidl.converters.WebSocketStreamWrite(chunk)\n\n // 1. Let promise be a new promise created in stream ’s relevant realm .\n const promise = createDeferredPromise()\n\n // 2. Let data be null.\n let data = null\n\n // 3. Let opcode be null.\n let opcode = null\n\n // 4. If chunk is a BufferSource ,\n if (webidl.is.BufferSource(chunk)) {\n // 4.1. Set data to a copy of the bytes given chunk .\n data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk.slice())\n\n // 4.2. Set opcode to a binary frame opcode.\n opcode = opcodes.BINARY\n } else {\n // 5. Otherwise,\n\n // 5.1. Let string be the result of converting chunk to an IDL USVString .\n // If this throws an exception, return a promise rejected with the exception.\n let string\n\n try {\n string = webidl.converters.DOMString(chunk)\n } catch (e) {\n promise.reject(e)\n return promise.promise\n }\n\n // 5.2. Set data to the result of UTF-8 encoding string .\n data = new TextEncoder().encode(string)\n\n // 5.3. Set opcode to a text frame opcode.\n opcode = opcodes.TEXT\n }\n\n // 6. In parallel,\n // 6.1. Wait until there is sufficient buffer space in stream to send the message.\n\n // 6.2. If the closing handshake has not yet started , Send a WebSocket Message to stream comprised of data using opcode .\n if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {\n const frame = new WebsocketFrameSend(data)\n\n this.#handler.socket.write(frame.createFrame(opcode), () => {\n promise.resolve(undefined)\n })\n }\n\n // 6.3. Queue a global task on the WebSocket task source given stream ’s relevant global object to resolve promise with undefined.\n return promise.promise\n }\n\n /** @type {import('../websocket').Handler['onConnectionEstablished']} */\n #onConnectionEstablished (response, parsedExtensions) {\n this.#handler.socket = response.socket\n\n const parser = new ByteParser(this.#handler, parsedExtensions)\n parser.on('drain', () => this.#handler.onParserDrain())\n parser.on('error', (err) => this.#handler.onParserError(err))\n\n this.#parser = parser\n\n // 1. Change stream ’s ready state to OPEN (1).\n this.#handler.readyState = states.OPEN\n\n // 2. Set stream ’s was ever connected to true.\n // This is done in the opening handshake.\n\n // 3. Let extensions be the extensions in use .\n const extensions = parsedExtensions ?? ''\n\n // 4. Let protocol be the subprotocol in use .\n const protocol = response.headersList.get('sec-websocket-protocol') ?? ''\n\n // 5. Let pullAlgorithm be an action that pulls bytes from stream .\n // 6. Let cancelAlgorithm be an action that cancels stream with reason , given reason .\n // 7. Let readable be a new ReadableStream .\n // 8. Set up readable with pullAlgorithm and cancelAlgorithm .\n const readable = new ReadableStream({\n start: (controller) => {\n this.#readableStreamController = controller\n },\n pull (controller) {\n let chunk\n while (controller.desiredSize > 0 && (chunk = response.socket.read()) !== null) {\n controller.enqueue(chunk)\n }\n },\n cancel: (reason) => this.#cancel(reason)\n })\n\n // 9. Let writeAlgorithm be an action that writes chunk to stream , given chunk .\n // 10. Let closeAlgorithm be an action that closes stream .\n // 11. Let abortAlgorithm be an action that aborts stream with reason , given reason .\n // 12. Let writable be a new WritableStream .\n // 13. Set up writable with writeAlgorithm , closeAlgorithm , and abortAlgorithm .\n const writable = new WritableStream({\n write: (chunk) => this.#write(chunk),\n close: () => closeWebSocketConnection(this.#handler, null, null),\n abort: (reason) => this.#closeUsingReason(reason)\n })\n\n // Set stream ’s readable stream to readable .\n this.#readableStream = readable\n\n // Set stream ’s writable stream to writable .\n this.#writableStream = writable\n\n // Resolve stream ’s opened promise with WebSocketOpenInfo «[ \" extensions \" → extensions , \" protocol \" → protocol , \" readable \" → readable , \" writable \" → writable ]».\n this.#openedPromise.resolve({\n extensions,\n protocol,\n readable,\n writable\n })\n }\n\n /** @type {import('../websocket').Handler['onMessage']} */\n #onMessage (type, data) {\n // 1. If stream’s ready state is not OPEN (1), then return.\n if (this.#handler.readyState !== states.OPEN) {\n return\n }\n\n // 2. Let chunk be determined by switching on type:\n // - type indicates that the data is Text\n // a new DOMString containing data\n // - type indicates that the data is Binary\n // a new Uint8Array object, created in the relevant Realm of the\n // WebSocketStream object, whose contents are data\n let chunk\n\n if (type === opcodes.TEXT) {\n try {\n chunk = utf8Decode(data)\n } catch {\n failWebsocketConnection(this.#handler, 'Received invalid UTF-8 in text frame.')\n return\n }\n } else if (type === opcodes.BINARY) {\n chunk = new Uint8Array(data.buffer, data.byteOffset, data.byteLength)\n }\n\n // 3. Enqueue chunk into stream’s readable stream.\n this.#readableStreamController.enqueue(chunk)\n\n // 4. Apply backpressure to the WebSocket.\n }\n\n /** @type {import('../websocket').Handler['onSocketClose']} */\n #onSocketClose () {\n const wasClean =\n this.#handler.closeState.has(sentCloseFrameState.SENT) &&\n this.#handler.closeState.has(sentCloseFrameState.RECEIVED)\n\n // 1. Change the ready state to CLOSED (3).\n this.#handler.readyState = states.CLOSED\n\n // 2. If stream ’s handshake aborted is true, then return.\n if (this.#handshakeAborted) {\n return\n }\n\n // 3. If stream ’s was ever connected is false, then reject stream ’s opened promise with a new WebSocketError.\n if (!this.#handler.wasEverConnected) {\n this.#openedPromise.reject(new WebSocketError('Socket never opened'))\n }\n\n const result = this.#parser?.closingInfo\n\n // 4. Let code be the WebSocket connection close code .\n // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5\n // If this Close control frame contains no status code, _The WebSocket\n // Connection Close Code_ is considered to be 1005. If _The WebSocket\n // Connection is Closed_ and no Close control frame was received by the\n // endpoint (such as could occur if the underlying transport connection\n // is lost), _The WebSocket Connection Close Code_ is considered to be\n // 1006.\n let code = result?.code ?? 1005\n\n if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {\n code = 1006\n }\n\n // 5. Let reason be the result of applying UTF-8 decode without BOM to the WebSocket connection close reason .\n const reason = result?.reason == null ? '' : utf8DecodeBytes(Buffer.from(result.reason))\n\n // 6. If the connection was closed cleanly ,\n if (wasClean) {\n // 6.1. Close stream ’s readable stream .\n this.#readableStreamController.close()\n\n // 6.2. Error stream ’s writable stream with an \" InvalidStateError \" DOMException indicating that a closed WebSocketStream cannot be written to.\n if (!this.#writableStream.locked) {\n this.#writableStream.abort(new DOMException('A closed WebSocketStream cannot be written to', 'InvalidStateError'))\n }\n\n // 6.3. Resolve stream ’s closed promise with WebSocketCloseInfo «[ \" closeCode \" → code , \" reason \" → reason ]».\n this.#closedPromise.resolve({\n closeCode: code,\n reason\n })\n } else {\n // 7. Otherwise,\n\n // 7.1. Let error be a new WebSocketError whose closeCode is code and reason is reason .\n const error = createUnvalidatedWebSocketError('unclean close', code, reason)\n\n // 7.2. Error stream ’s readable stream with error .\n this.#readableStreamController?.error(error)\n\n // 7.3. Error stream ’s writable stream with error .\n this.#writableStream?.abort(error)\n\n // 7.4. Reject stream ’s closed promise with error .\n this.#closedPromise.reject(error)\n }\n }\n\n #closeUsingReason (reason) {\n // 1. Let code be null.\n let code = null\n\n // 2. Let reasonString be the empty string.\n let reasonString = ''\n\n // 3. If reason implements WebSocketError ,\n if (webidl.is.WebSocketError(reason)) {\n // 3.1. Set code to reason ’s closeCode .\n code = reason.closeCode\n\n // 3.2. Set reasonString to reason ’s reason .\n reasonString = reason.reason\n }\n\n // 4. Close the WebSocket with stream , code , and reasonString . If this throws an exception,\n // discard code and reasonString and close the WebSocket with stream .\n closeWebSocketConnection(this.#handler, code, reasonString)\n }\n\n // To cancel a WebSocketStream stream given reason , close using reason giving stream and reason .\n #cancel (reason) {\n this.#closeUsingReason(reason)\n }\n}\n\nObject.defineProperties(WebSocketStream.prototype, {\n url: kEnumerableProperty,\n opened: kEnumerableProperty,\n closed: kEnumerableProperty,\n close: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'WebSocketStream',\n writable: false,\n enumerable: false,\n configurable: true\n }\n})\n\nwebidl.converters.WebSocketStreamOptions = webidl.dictionaryConverter([\n {\n key: 'protocols',\n converter: webidl.sequenceConverter(webidl.converters.USVString),\n defaultValue: () => []\n },\n {\n key: 'signal',\n converter: webidl.nullableConverter(webidl.converters.AbortSignal),\n defaultValue: () => null\n }\n])\n\nwebidl.converters.WebSocketCloseInfo = webidl.dictionaryConverter([\n {\n key: 'closeCode',\n converter: (V) => webidl.converters['unsigned short'](V, webidl.attributes.EnforceRange)\n },\n {\n key: 'reason',\n converter: webidl.converters.USVString,\n defaultValue: () => ''\n }\n])\n\nwebidl.converters.WebSocketStreamWrite = function (V) {\n if (typeof V === 'string') {\n return webidl.converters.USVString(V)\n }\n\n return webidl.converters.BufferSource(V)\n}\n\nmodule.exports = { WebSocketStream }\n","'use strict'\n\nconst { states, opcodes } = require('./constants')\nconst { isUtf8 } = require('node:buffer')\nconst { removeHTTPWhitespace } = require('../fetch/data-url')\nconst { collectASequenceOfCodePointsFast } = require('../infra')\n\n/**\n * @param {number} readyState\n * @returns {boolean}\n */\nfunction isConnecting (readyState) {\n // If the WebSocket connection is not yet established, and the connection\n // is not yet closed, then the WebSocket connection is in the CONNECTING state.\n return readyState === states.CONNECTING\n}\n\n/**\n * @param {number} readyState\n * @returns {boolean}\n */\nfunction isEstablished (readyState) {\n // If the server's response is validated as provided for above, it is\n // said that _The WebSocket Connection is Established_ and that the\n // WebSocket Connection is in the OPEN state.\n return readyState === states.OPEN\n}\n\n/**\n * @param {number} readyState\n * @returns {boolean}\n */\nfunction isClosing (readyState) {\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n return readyState === states.CLOSING\n}\n\n/**\n * @param {number} readyState\n * @returns {boolean}\n */\nfunction isClosed (readyState) {\n return readyState === states.CLOSED\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#concept-event-fire\n * @param {string} e\n * @param {EventTarget} target\n * @param {(...args: ConstructorParameters) => Event} eventFactory\n * @param {EventInit | undefined} eventInitDict\n * @returns {void}\n */\nfunction fireEvent (e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) {\n // 1. If eventConstructor is not given, then let eventConstructor be Event.\n\n // 2. Let event be the result of creating an event given eventConstructor,\n // in the relevant realm of target.\n // 3. Initialize event’s type attribute to e.\n const event = eventFactory(e, eventInitDict)\n\n // 4. Initialize any other IDL attributes of event as described in the\n // invocation of this algorithm.\n\n // 5. Return the result of dispatching event at target, with legacy target\n // override flag set if set.\n target.dispatchEvent(event)\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n * @param {import('./websocket').Handler} handler\n * @param {number} type Opcode\n * @param {Buffer} data application data\n * @returns {void}\n */\nfunction websocketMessageReceived (handler, type, data) {\n handler.onMessage(type, data)\n}\n\n/**\n * @param {Buffer} buffer\n * @returns {ArrayBuffer}\n */\nfunction toArrayBuffer (buffer) {\n if (buffer.byteLength === buffer.buffer.byteLength) {\n return buffer.buffer\n }\n return new Uint8Array(buffer).buffer\n}\n\n/**\n * @see https://datatracker.ietf.org/doc/html/rfc6455\n * @see https://datatracker.ietf.org/doc/html/rfc2616\n * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407\n * @param {string} protocol\n * @returns {boolean}\n */\nfunction isValidSubprotocol (protocol) {\n // If present, this value indicates one\n // or more comma-separated subprotocol the client wishes to speak,\n // ordered by preference. The elements that comprise this value\n // MUST be non-empty strings with characters in the range U+0021 to\n // U+007E not including separator characters as defined in\n // [RFC2616] and MUST all be unique strings.\n if (protocol.length === 0) {\n return false\n }\n\n for (let i = 0; i < protocol.length; ++i) {\n const code = protocol.charCodeAt(i)\n\n if (\n code < 0x21 || // CTL, contains SP (0x20) and HT (0x09)\n code > 0x7E ||\n code === 0x22 || // \"\n code === 0x28 || // (\n code === 0x29 || // )\n code === 0x2C || // ,\n code === 0x2F || // /\n code === 0x3A || // :\n code === 0x3B || // ;\n code === 0x3C || // <\n code === 0x3D || // =\n code === 0x3E || // >\n code === 0x3F || // ?\n code === 0x40 || // @\n code === 0x5B || // [\n code === 0x5C || // \\\n code === 0x5D || // ]\n code === 0x7B || // {\n code === 0x7D // }\n ) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4\n * @param {number} code\n * @returns {boolean}\n */\nfunction isValidStatusCode (code) {\n if (code >= 1000 && code < 1015) {\n return (\n code !== 1004 && // reserved\n code !== 1005 && // \"MUST NOT be set as a status code\"\n code !== 1006 // \"MUST NOT be set as a status code\"\n )\n }\n\n return code >= 3000 && code <= 4999\n}\n\n/**\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5\n * @param {number} opcode\n * @returns {boolean}\n */\nfunction isControlFrame (opcode) {\n return (\n opcode === opcodes.CLOSE ||\n opcode === opcodes.PING ||\n opcode === opcodes.PONG\n )\n}\n\n/**\n * @param {number} opcode\n * @returns {boolean}\n */\nfunction isContinuationFrame (opcode) {\n return opcode === opcodes.CONTINUATION\n}\n\n/**\n * @param {number} opcode\n * @returns {boolean}\n */\nfunction isTextBinaryFrame (opcode) {\n return opcode === opcodes.TEXT || opcode === opcodes.BINARY\n}\n\n/**\n *\n * @param {number} opcode\n * @returns {boolean}\n */\nfunction isValidOpcode (opcode) {\n return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode)\n}\n\n/**\n * Parses a Sec-WebSocket-Extensions header value.\n * @param {string} extensions\n * @returns {Map}\n */\n// TODO(@Uzlopak, @KhafraDev): make compliant https://datatracker.ietf.org/doc/html/rfc6455#section-9.1\nfunction parseExtensions (extensions) {\n const position = { position: 0 }\n const extensionList = new Map()\n\n while (position.position < extensions.length) {\n const pair = collectASequenceOfCodePointsFast(';', extensions, position)\n const [name, value = ''] = pair.split('=', 2)\n\n extensionList.set(\n removeHTTPWhitespace(name, true, false),\n removeHTTPWhitespace(value, false, true)\n )\n\n position.position++\n }\n\n return extensionList\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2\n * @description \"client-max-window-bits = 1*DIGIT\"\n * @param {string} value\n * @returns {boolean}\n */\nfunction isValidClientWindowBits (value) {\n // Must have at least one character\n if (value.length === 0) {\n return false\n }\n\n // Check all characters are ASCII digits\n for (let i = 0; i < value.length; i++) {\n const byte = value.charCodeAt(i)\n\n if (byte < 0x30 || byte > 0x39) {\n return false\n }\n }\n\n // Check numeric range: zlib requires windowBits in range 8-15\n const num = Number.parseInt(value, 10)\n return num >= 8 && num <= 15\n}\n\n/**\n * @see https://whatpr.org/websockets/48/7b748d3...d5570f3.html#get-a-url-record\n * @param {string} url\n * @param {string} [baseURL]\n */\nfunction getURLRecord (url, baseURL) {\n // 1. Let urlRecord be the result of applying the URL parser to url with baseURL .\n // 2. If urlRecord is failure, then throw a \" SyntaxError \" DOMException .\n let urlRecord\n\n try {\n urlRecord = new URL(url, baseURL)\n } catch (e) {\n throw new DOMException(e, 'SyntaxError')\n }\n\n // 3. If urlRecord ’s scheme is \" http \", then set urlRecord ’s scheme to \" ws \".\n // 4. Otherwise, if urlRecord ’s scheme is \" https \", set urlRecord ’s scheme to \" wss \".\n if (urlRecord.protocol === 'http:') {\n urlRecord.protocol = 'ws:'\n } else if (urlRecord.protocol === 'https:') {\n urlRecord.protocol = 'wss:'\n }\n\n // 5. If urlRecord ’s scheme is not \" ws \" or \" wss \", then throw a \" SyntaxError \" DOMException .\n if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') {\n throw new DOMException('expected a ws: or wss: url', 'SyntaxError')\n }\n\n // If urlRecord ’s fragment is non-null, then throw a \" SyntaxError \" DOMException .\n if (urlRecord.hash.length || urlRecord.href.endsWith('#')) {\n throw new DOMException('hash', 'SyntaxError')\n }\n\n // Return urlRecord .\n return urlRecord\n}\n\n// https://whatpr.org/websockets/48.html#validate-close-code-and-reason\nfunction validateCloseCodeAndReason (code, reason) {\n // 1. If code is not null, but is neither an integer equal to\n // 1000 nor an integer in the range 3000 to 4999, inclusive,\n // throw an \"InvalidAccessError\" DOMException.\n if (code !== null) {\n if (code !== 1000 && (code < 3000 || code > 4999)) {\n throw new DOMException('invalid code', 'InvalidAccessError')\n }\n }\n\n // 2. If reason is not null, then:\n if (reason !== null) {\n // 2.1. Let reasonBytes be the result of UTF-8 encoding reason.\n // 2.2. If reasonBytes is longer than 123 bytes, then throw a\n // \"SyntaxError\" DOMException.\n const reasonBytesLength = Buffer.byteLength(reason)\n\n if (reasonBytesLength > 123) {\n throw new DOMException(`Reason must be less than 123 bytes; received ${reasonBytesLength}`, 'SyntaxError')\n }\n }\n}\n\n/**\n * Converts a Buffer to utf-8, even on platforms without icu.\n * @type {(buffer: Buffer) => string}\n */\nconst utf8Decode = (() => {\n if (typeof process.versions.icu === 'string') {\n const fatalDecoder = new TextDecoder('utf-8', { fatal: true })\n return fatalDecoder.decode.bind(fatalDecoder)\n }\n return function (buffer) {\n if (isUtf8(buffer)) {\n return buffer.toString('utf-8')\n }\n throw new TypeError('Invalid utf-8 received.')\n }\n})()\n\nmodule.exports = {\n isConnecting,\n isEstablished,\n isClosing,\n isClosed,\n fireEvent,\n isValidSubprotocol,\n isValidStatusCode,\n websocketMessageReceived,\n utf8Decode,\n isControlFrame,\n isContinuationFrame,\n isTextBinaryFrame,\n isValidOpcode,\n parseExtensions,\n isValidClientWindowBits,\n toArrayBuffer,\n getURLRecord,\n validateCloseCodeAndReason\n}\n","'use strict'\n\nconst { isArrayBuffer } = require('node:util/types')\nconst { webidl } = require('../webidl')\nconst { URLSerializer } = require('../fetch/data-url')\nconst { environmentSettingsObject } = require('../fetch/util')\nconst { staticPropertyDescriptors, states, sentCloseFrameState, sendHints, opcodes } = require('./constants')\nconst {\n isConnecting,\n isEstablished,\n isClosing,\n isClosed,\n isValidSubprotocol,\n fireEvent,\n utf8Decode,\n toArrayBuffer,\n getURLRecord\n} = require('./util')\nconst { establishWebSocketConnection, closeWebSocketConnection, failWebsocketConnection } = require('./connection')\nconst { ByteParser } = require('./receiver')\nconst { kEnumerableProperty } = require('../../core/util')\nconst { getGlobalDispatcher } = require('../../global')\nconst { ErrorEvent, CloseEvent, createFastMessageEvent } = require('./events')\nconst { SendQueue } = require('./sender')\nconst { WebsocketFrameSend } = require('./frame')\nconst { channels } = require('../../core/diagnostics')\n\nfunction getSocketAddress (socket) {\n if (typeof socket?.address === 'function') {\n return socket.address()\n }\n\n if (typeof socket?.session?.socket?.address === 'function') {\n return socket.session.socket.address()\n }\n\n return null\n}\n\n/**\n * @typedef {object} Handler\n * @property {(response: any, extensions?: string[]) => void} onConnectionEstablished\n * @property {(opcode: number, data: Buffer) => void} onMessage\n * @property {(error: Error) => void} onParserError\n * @property {() => void} onParserDrain\n * @property {(chunk: Buffer) => void} onSocketData\n * @property {(err: Error) => void} onSocketError\n * @property {() => void} onSocketClose\n * @property {(body: Buffer) => void} onPing\n * @property {(body: Buffer) => void} onPong\n *\n * @property {number} readyState\n * @property {import('stream').Duplex} socket\n * @property {Set} closeState\n * @property {import('../fetch/index').Fetch} controller\n * @property {boolean} [wasEverConnected=false]\n */\n\n// https://websockets.spec.whatwg.org/#interface-definition\nclass WebSocket extends EventTarget {\n #events = {\n open: null,\n error: null,\n close: null,\n message: null\n }\n\n #bufferedAmount = 0\n #protocol = ''\n #extensions = ''\n\n /** @type {SendQueue} */\n #sendQueue\n\n /** @type {Handler} */\n #handler = {\n onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions),\n onMessage: (opcode, data) => this.#onMessage(opcode, data),\n onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message),\n onParserDrain: () => this.#onParserDrain(),\n onSocketData: (chunk) => {\n if (!this.#parser.write(chunk)) {\n this.#handler.socket.pause()\n }\n },\n onSocketError: (err) => {\n this.#handler.readyState = states.CLOSING\n\n if (channels.socketError.hasSubscribers) {\n channels.socketError.publish(err)\n }\n\n this.#handler.socket.destroy()\n },\n onSocketClose: () => this.#onSocketClose(),\n onPing: (body) => {\n if (channels.ping.hasSubscribers) {\n channels.ping.publish({\n payload: body,\n websocket: this\n })\n }\n },\n onPong: (body) => {\n if (channels.pong.hasSubscribers) {\n channels.pong.publish({\n payload: body,\n websocket: this\n })\n }\n },\n\n readyState: states.CONNECTING,\n socket: null,\n closeState: new Set(),\n controller: null,\n wasEverConnected: false\n }\n\n #url\n #binaryType\n /** @type {import('./receiver').ByteParser} */\n #parser\n\n /**\n * @param {string} url\n * @param {string|string[]} protocols\n */\n constructor (url, protocols = []) {\n super()\n\n webidl.util.markAsUncloneable(this)\n\n const prefix = 'WebSocket constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols, prefix, 'options')\n\n url = webidl.converters.USVString(url)\n protocols = options.protocols\n\n // 1. Let baseURL be this's relevant settings object's API base URL.\n const baseURL = environmentSettingsObject.settingsObject.baseUrl\n\n // 2. Let urlRecord be the result of getting a URL record given url and baseURL.\n const urlRecord = getURLRecord(url, baseURL)\n\n // 3. If protocols is a string, set protocols to a sequence consisting\n // of just that string.\n if (typeof protocols === 'string') {\n protocols = [protocols]\n }\n\n // 4. If any of the values in protocols occur more than once or otherwise\n // fail to match the requirements for elements that comprise the value\n // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket\n // protocol, then throw a \"SyntaxError\" DOMException.\n if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n // 5. Set this's url to urlRecord.\n this.#url = new URL(urlRecord.href)\n\n // 6. Let client be this's relevant settings object.\n const client = environmentSettingsObject.settingsObject\n\n // 7. Run this step in parallel:\n // 7.1. Establish a WebSocket connection given urlRecord, protocols,\n // and client.\n this.#handler.controller = establishWebSocketConnection(\n urlRecord,\n protocols,\n client,\n this.#handler,\n options\n )\n\n // Each WebSocket object has an associated ready state, which is a\n // number representing the state of the connection. Initially it must\n // be CONNECTING (0).\n this.#handler.readyState = WebSocket.CONNECTING\n\n // The extensions attribute must initially return the empty string.\n\n // The protocol attribute must initially return the empty string.\n\n // Each WebSocket object has an associated binary type, which is a\n // BinaryType. Initially it must be \"blob\".\n this.#binaryType = 'blob'\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#dom-websocket-close\n * @param {number|undefined} code\n * @param {string|undefined} reason\n */\n close (code = undefined, reason = undefined) {\n webidl.brandCheck(this, WebSocket)\n\n const prefix = 'WebSocket.close'\n\n if (code !== undefined) {\n code = webidl.converters['unsigned short'](code, prefix, 'code', webidl.attributes.Clamp)\n }\n\n if (reason !== undefined) {\n reason = webidl.converters.USVString(reason)\n }\n\n // 1. If code is the special value \"missing\", then set code to null.\n code ??= null\n\n // 2. If reason is the special value \"missing\", then set reason to the empty string.\n reason ??= ''\n\n // 3. Close the WebSocket with this, code, and reason.\n closeWebSocketConnection(this.#handler, code, reason, true)\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#dom-websocket-send\n * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data\n */\n send (data) {\n webidl.brandCheck(this, WebSocket)\n\n const prefix = 'WebSocket.send'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n data = webidl.converters.WebSocketSendData(data, prefix, 'data')\n\n // 1. If this's ready state is CONNECTING, then throw an\n // \"InvalidStateError\" DOMException.\n if (isConnecting(this.#handler.readyState)) {\n throw new DOMException('Sent before connected.', 'InvalidStateError')\n }\n\n // 2. Run the appropriate set of steps from the following list:\n // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1\n // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2\n\n if (!isEstablished(this.#handler.readyState) || isClosing(this.#handler.readyState)) {\n return\n }\n\n // If data is a string\n if (typeof data === 'string') {\n // If the WebSocket connection is established and the WebSocket\n // closing handshake has not yet started, then the user agent\n // must send a WebSocket Message comprised of the data argument\n // using a text frame opcode; if the data cannot be sent, e.g.\n // because it would need to be buffered but the buffer is full,\n // the user agent must flag the WebSocket as full and then close\n // the WebSocket connection. Any invocation of this method with a\n // string argument that does not throw an exception must increase\n // the bufferedAmount attribute by the number of bytes needed to\n // express the argument as UTF-8.\n\n const buffer = Buffer.from(data)\n\n this.#bufferedAmount += buffer.byteLength\n this.#sendQueue.add(buffer, () => {\n this.#bufferedAmount -= buffer.byteLength\n }, sendHints.text)\n } else if (isArrayBuffer(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need\n // to be buffered but the buffer is full, the user agent must flag\n // the WebSocket as full and then close the WebSocket connection.\n // The data to be sent is the data stored in the buffer described\n // by the ArrayBuffer object. Any invocation of this method with an\n // ArrayBuffer argument that does not throw an exception must\n // increase the bufferedAmount attribute by the length of the\n // ArrayBuffer in bytes.\n\n this.#bufferedAmount += data.byteLength\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= data.byteLength\n }, sendHints.arrayBuffer)\n } else if (ArrayBuffer.isView(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need to\n // be buffered but the buffer is full, the user agent must flag the\n // WebSocket as full and then close the WebSocket connection. The\n // data to be sent is the data stored in the section of the buffer\n // described by the ArrayBuffer object that data references. Any\n // invocation of this method with this kind of argument that does\n // not throw an exception must increase the bufferedAmount attribute\n // by the length of data’s buffer in bytes.\n\n this.#bufferedAmount += data.byteLength\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= data.byteLength\n }, sendHints.typedArray)\n } else if (webidl.is.Blob(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need to\n // be buffered but the buffer is full, the user agent must flag the\n // WebSocket as full and then close the WebSocket connection. The data\n // to be sent is the raw data represented by the Blob object. Any\n // invocation of this method with a Blob argument that does not throw\n // an exception must increase the bufferedAmount attribute by the size\n // of the Blob object’s raw data, in bytes.\n\n this.#bufferedAmount += data.size\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= data.size\n }, sendHints.blob)\n }\n }\n\n get readyState () {\n webidl.brandCheck(this, WebSocket)\n\n // The readyState getter steps are to return this's ready state.\n return this.#handler.readyState\n }\n\n get bufferedAmount () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#bufferedAmount\n }\n\n get url () {\n webidl.brandCheck(this, WebSocket)\n\n // The url getter steps are to return this's url, serialized.\n return URLSerializer(this.#url)\n }\n\n get extensions () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#extensions\n }\n\n get protocol () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#protocol\n }\n\n get onopen () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.open\n }\n\n set onopen (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.open) {\n this.removeEventListener('open', this.#events.open)\n }\n\n const listener = webidl.converters.EventHandlerNonNull(fn)\n\n if (listener !== null) {\n this.addEventListener('open', listener)\n this.#events.open = fn\n } else {\n this.#events.open = null\n }\n }\n\n get onerror () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.error\n }\n\n set onerror (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.error) {\n this.removeEventListener('error', this.#events.error)\n }\n\n const listener = webidl.converters.EventHandlerNonNull(fn)\n\n if (listener !== null) {\n this.addEventListener('error', listener)\n this.#events.error = fn\n } else {\n this.#events.error = null\n }\n }\n\n get onclose () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.close\n }\n\n set onclose (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.close) {\n this.removeEventListener('close', this.#events.close)\n }\n\n const listener = webidl.converters.EventHandlerNonNull(fn)\n\n if (listener !== null) {\n this.addEventListener('close', listener)\n this.#events.close = fn\n } else {\n this.#events.close = null\n }\n }\n\n get onmessage () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.message\n }\n\n set onmessage (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.message) {\n this.removeEventListener('message', this.#events.message)\n }\n\n const listener = webidl.converters.EventHandlerNonNull(fn)\n\n if (listener !== null) {\n this.addEventListener('message', listener)\n this.#events.message = fn\n } else {\n this.#events.message = null\n }\n }\n\n get binaryType () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#binaryType\n }\n\n set binaryType (type) {\n webidl.brandCheck(this, WebSocket)\n\n if (type !== 'blob' && type !== 'arraybuffer') {\n this.#binaryType = 'blob'\n } else {\n this.#binaryType = type\n }\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n */\n #onConnectionEstablished (response, parsedExtensions) {\n // processResponse is called when the \"response's header list has been received and initialized.\"\n // once this happens, the connection is open\n this.#handler.socket = response.socket\n\n const parser = new ByteParser(this.#handler, parsedExtensions)\n parser.on('drain', () => this.#handler.onParserDrain())\n parser.on('error', (err) => this.#handler.onParserError(err))\n\n this.#parser = parser\n this.#sendQueue = new SendQueue(response.socket)\n\n // 1. Change the ready state to OPEN (1).\n this.#handler.readyState = states.OPEN\n\n // 2. Change the extensions attribute’s value to the extensions in use, if\n // it is not the null value.\n // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1\n const extensions = response.headersList.get('sec-websocket-extensions')\n\n if (extensions !== null) {\n this.#extensions = extensions\n }\n\n // 3. Change the protocol attribute’s value to the subprotocol in use, if\n // it is not the null value.\n // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9\n const protocol = response.headersList.get('sec-websocket-protocol')\n\n if (protocol !== null) {\n this.#protocol = protocol\n }\n\n // 4. Fire an event named open at the WebSocket object.\n fireEvent('open', this)\n\n if (channels.open.hasSubscribers) {\n // Convert headers to a plain object for the event\n const headers = response.headersList.entries\n channels.open.publish({\n address: getSocketAddress(response.socket),\n protocol: this.#protocol,\n extensions: this.#extensions,\n websocket: this,\n handshakeResponse: {\n status: response.status,\n statusText: response.statusText,\n headers\n }\n })\n }\n }\n\n #onMessage (type, data) {\n // 1. If ready state is not OPEN (1), then return.\n if (this.#handler.readyState !== states.OPEN) {\n return\n }\n\n // 2. Let dataForEvent be determined by switching on type and binary type:\n let dataForEvent\n\n if (type === opcodes.TEXT) {\n // -> type indicates that the data is Text\n // a new DOMString containing data\n try {\n dataForEvent = utf8Decode(data)\n } catch {\n failWebsocketConnection(this.#handler, 1007, 'Received invalid UTF-8 in text frame.')\n return\n }\n } else if (type === opcodes.BINARY) {\n if (this.#binaryType === 'blob') {\n // -> type indicates that the data is Binary and binary type is \"blob\"\n // a new Blob object, created in the relevant Realm of the WebSocket\n // object, that represents data as its raw data\n dataForEvent = new Blob([data])\n } else {\n // -> type indicates that the data is Binary and binary type is \"arraybuffer\"\n // a new ArrayBuffer object, created in the relevant Realm of the\n // WebSocket object, whose contents are data\n dataForEvent = toArrayBuffer(data)\n }\n }\n\n // 3. Fire an event named message at the WebSocket object, using MessageEvent,\n // with the origin attribute initialized to the serialization of the WebSocket\n // object’s url's origin, and the data attribute initialized to dataForEvent.\n fireEvent('message', this, createFastMessageEvent, {\n origin: this.#url.origin,\n data: dataForEvent\n })\n }\n\n #onParserDrain () {\n this.#handler.socket.resume()\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4\n */\n #onSocketClose () {\n // If the TCP connection was closed after the\n // WebSocket closing handshake was completed, the WebSocket connection\n // is said to have been closed _cleanly_.\n const wasClean =\n this.#handler.closeState.has(sentCloseFrameState.SENT) &&\n this.#handler.closeState.has(sentCloseFrameState.RECEIVED)\n\n let code = 1005\n let reason = ''\n\n const result = this.#parser?.closingInfo\n\n if (result && !result.error) {\n code = result.code ?? 1005\n reason = result.reason\n }\n\n // 1. Change the ready state to CLOSED (3).\n this.#handler.readyState = states.CLOSED\n\n // 2. If the user agent was required to fail the WebSocket\n // connection, or if the WebSocket connection was closed\n // after being flagged as full, fire an event named error\n // at the WebSocket object.\n if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {\n // If _The WebSocket\n // Connection is Closed_ and no Close control frame was received by the\n // endpoint (such as could occur if the underlying transport connection\n // is lost), _The WebSocket Connection Close Code_ is considered to be\n // 1006.\n code = 1006\n\n fireEvent('error', this, (type, init) => new ErrorEvent(type, init), {\n error: new TypeError(reason)\n })\n }\n\n // 3. Fire an event named close at the WebSocket object,\n // using CloseEvent, with the wasClean attribute\n // initialized to true if the connection closed cleanly\n // and false otherwise, the code attribute initialized to\n // the WebSocket connection close code, and the reason\n // attribute initialized to the result of applying UTF-8\n // decode without BOM to the WebSocket connection close\n // reason.\n // TODO: process.nextTick\n fireEvent('close', this, (type, init) => new CloseEvent(type, init), {\n wasClean, code, reason\n })\n\n if (channels.close.hasSubscribers) {\n channels.close.publish({\n websocket: this,\n code,\n reason\n })\n }\n }\n\n /**\n * @param {WebSocket} ws\n * @param {Buffer|undefined} buffer\n */\n static ping (ws, buffer) {\n if (Buffer.isBuffer(buffer)) {\n if (buffer.length > 125) {\n throw new TypeError('A PING frame cannot have a body larger than 125 bytes.')\n }\n } else if (buffer !== undefined) {\n throw new TypeError('Expected buffer payload')\n }\n\n // An endpoint MAY send a Ping frame any time after the connection is\n // established and before the connection is closed.\n const readyState = ws.#handler.readyState\n\n if (isEstablished(readyState) && !isClosing(readyState) && !isClosed(readyState)) {\n const frame = new WebsocketFrameSend(buffer)\n ws.#handler.socket.write(frame.createFrame(opcodes.PING))\n }\n }\n}\n\nconst { ping } = WebSocket\nReflect.deleteProperty(WebSocket, 'ping')\n\n// https://websockets.spec.whatwg.org/#dom-websocket-connecting\nWebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING\n// https://websockets.spec.whatwg.org/#dom-websocket-open\nWebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN\n// https://websockets.spec.whatwg.org/#dom-websocket-closing\nWebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING\n// https://websockets.spec.whatwg.org/#dom-websocket-closed\nWebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED\n\nObject.defineProperties(WebSocket.prototype, {\n CONNECTING: staticPropertyDescriptors,\n OPEN: staticPropertyDescriptors,\n CLOSING: staticPropertyDescriptors,\n CLOSED: staticPropertyDescriptors,\n url: kEnumerableProperty,\n readyState: kEnumerableProperty,\n bufferedAmount: kEnumerableProperty,\n onopen: kEnumerableProperty,\n onerror: kEnumerableProperty,\n onclose: kEnumerableProperty,\n close: kEnumerableProperty,\n onmessage: kEnumerableProperty,\n binaryType: kEnumerableProperty,\n send: kEnumerableProperty,\n extensions: kEnumerableProperty,\n protocol: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'WebSocket',\n writable: false,\n enumerable: false,\n configurable: true\n }\n})\n\nObject.defineProperties(WebSocket, {\n CONNECTING: staticPropertyDescriptors,\n OPEN: staticPropertyDescriptors,\n CLOSING: staticPropertyDescriptors,\n CLOSED: staticPropertyDescriptors\n})\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.DOMString\n)\n\nwebidl.converters['DOMString or sequence'] = function (V, prefix, argument) {\n if (webidl.util.Type(V) === webidl.util.Types.OBJECT && Symbol.iterator in V) {\n return webidl.converters['sequence'](V)\n }\n\n return webidl.converters.DOMString(V, prefix, argument)\n}\n\n// This implements the proposal made in https://github.com/whatwg/websockets/issues/42\nwebidl.converters.WebSocketInit = webidl.dictionaryConverter([\n {\n key: 'protocols',\n converter: webidl.converters['DOMString or sequence'],\n defaultValue: () => []\n },\n {\n key: 'dispatcher',\n converter: webidl.converters.any,\n defaultValue: () => getGlobalDispatcher()\n },\n {\n key: 'headers',\n converter: webidl.nullableConverter(webidl.converters.HeadersInit)\n }\n])\n\nwebidl.converters['DOMString or sequence or WebSocketInit'] = function (V) {\n if (webidl.util.Type(V) === webidl.util.Types.OBJECT && !(Symbol.iterator in V)) {\n return webidl.converters.WebSocketInit(V)\n }\n\n return { protocols: webidl.converters['DOMString or sequence'](V) }\n}\n\nwebidl.converters.WebSocketSendData = function (V) {\n if (webidl.util.Type(V) === webidl.util.Types.OBJECT) {\n if (webidl.is.Blob(V)) {\n return V\n }\n\n if (webidl.is.BufferSource(V)) {\n return V\n }\n }\n\n return webidl.converters.USVString(V)\n}\n\nmodule.exports = {\n WebSocket,\n ping\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction getUserAgent() {\n if (typeof navigator === \"object\" && \"userAgent\" in navigator) {\n return navigator.userAgent;\n }\n\n if (typeof process === \"object\" && process.version !== undefined) {\n return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;\n }\n\n return \"\";\n}\n\nexports.getUserAgent = getUserAgent;\n//# sourceMappingURL=index.js.map\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parse = void 0;\nfunction parse(uriString) {\n let result = {\n path: '',\n fragment: undefined,\n host: undefined,\n port: undefined,\n query: undefined,\n reference: undefined,\n scheme: undefined,\n userinfo: undefined,\n };\n if (uriString.includes('#')) {\n result.fragment = '';\n }\n let { parsed, addedDefaultScheme, addedTemporaryHost, error, } = recognizeUrl(uriString);\n if (error || parsed === undefined) {\n result.error = error;\n return result;\n }\n if (typeof parsed.protocol !== undefined && parsed.protocol !== '' && !addedDefaultScheme) {\n result.scheme = String(parsed.protocol).replace(':', '');\n }\n if (typeof parsed.username !== undefined && parsed.username !== '') {\n let userinfo = parsed.username;\n if (parsed.password) {\n userinfo += ':' + parsed.password;\n }\n result.userinfo = userinfo;\n }\n if (typeof parsed.hostname !== undefined && parsed.hostname !== '' && !addedTemporaryHost) {\n result.host = parsed.hostname;\n if (result.host.startsWith('[')) {\n result.host = result.host.substring(1);\n result.host = result.host.slice(0, -1);\n }\n }\n if (typeof parsed.port !== undefined && parsed.port !== '') {\n result.port = Number(parsed.port);\n }\n if (typeof parsed.pathname !== undefined && parsed.pathname !== '/') {\n result.path = parsed.pathname;\n if (addedTemporaryHost && result.path.startsWith('/')) {\n result.path = result.path.substring(1);\n }\n }\n if (typeof parsed.search !== undefined && parsed.search !== '') {\n result.query = parsed.search.replace('?', '');\n }\n if (typeof parsed.hash !== undefined && parsed.hash !== '') {\n result.fragment = parsed.hash.replace('#', '');\n }\n if (result.scheme === undefined && result.userinfo === undefined && result.host === undefined && result.port === undefined && !result.path && result.query === undefined) {\n result.reference = \"same-document\";\n }\n else if (result.scheme === undefined) {\n result.reference = \"relative\";\n }\n else if (result.fragment === undefined) {\n result.reference = \"absolute\";\n }\n else {\n result.reference = \"uri\";\n }\n return result;\n}\nexports.parse = parse;\nconst temporaryHost = '_remove_me_host/';\nfunction recognizeUrl(uriString) {\n let result = {\n parsed: undefined,\n addedDefaultScheme: false,\n addedTemporaryHost: false,\n error: undefined,\n };\n let firstError;\n try {\n result.parsed = new URL(uriString);\n return result;\n }\n catch (error) {\n firstError = error;\n }\n if (uriString.startsWith('//')) {\n try {\n result.parsed = new URL('https:' + uriString);\n result.addedDefaultScheme = true;\n return result;\n }\n catch (otherError) {\n result.error = firstError.message;\n return result;\n }\n }\n try {\n result.parsed = new URL('https://' + temporaryHost + uriString);\n result.addedDefaultScheme = true;\n result.addedTemporaryHost = true;\n return result;\n }\n catch (otherError) {\n }\n result.error = firstError.message;\n return result;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveComponents = exports.resolve = void 0;\nconst Parse_1 = require(\"./Parse\");\nconst Serialize_1 = require(\"./Serialize\");\nfunction resolve(baseURI, relativeURI, options) {\n const schemeLessOptions = Object.assign({ scheme: 'null' }, options);\n const resolved = resolveComponents((0, Parse_1.parse)(baseURI), (0, Parse_1.parse)(relativeURI), schemeLessOptions, true);\n return (0, Serialize_1.serialize)(resolved);\n}\nexports.resolve = resolve;\nfunction resolveComponents(base, relative, options, skipNormalization) {\n const target = {};\n if (!skipNormalization) {\n base = (0, Parse_1.parse)((0, Serialize_1.serialize)(base));\n relative = (0, Parse_1.parse)((0, Serialize_1.serialize)(relative));\n }\n options = options || {};\n if (!options.tolerant && relative.scheme) {\n target.scheme = relative.scheme;\n target.userinfo = relative.userinfo;\n target.host = relative.host;\n target.port = relative.port;\n target.path = removeDotSegments(relative.path || '');\n target.query = relative.query;\n }\n else {\n if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n target.userinfo = relative.userinfo;\n target.host = relative.host;\n target.port = relative.port;\n target.path = removeDotSegments(relative.path || '');\n target.query = relative.query;\n }\n else {\n if (!relative.path) {\n target.path = base.path;\n if (relative.query !== undefined) {\n target.query = relative.query;\n }\n else {\n target.query = base.query;\n }\n }\n else {\n if (relative.path.charAt(0) === '/') {\n target.path = removeDotSegments(relative.path);\n }\n else {\n if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n target.path = '/' + relative.path;\n }\n else if (!base.path) {\n target.path = relative.path;\n }\n else {\n target.path = base.path.slice(0, base.path.lastIndexOf('/') + 1) + relative.path;\n }\n target.path = removeDotSegments(target.path);\n }\n target.query = relative.query;\n }\n target.userinfo = base.userinfo;\n target.host = base.host;\n target.port = base.port;\n }\n target.scheme = base.scheme;\n }\n target.fragment = relative.fragment;\n return target;\n}\nexports.resolveComponents = resolveComponents;\nfunction removeDotSegments(input) {\n const RDS1 = /^\\.\\.?\\//u;\n const RDS2 = /^\\/\\.(?:\\/|$)/u;\n const RDS3 = /^\\/\\.\\.(?:\\/|$)/u;\n const RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/u;\n const output = [];\n while (input.length) {\n if (input.match(RDS1)) {\n input = input.replace(RDS1, '');\n }\n else if (input.match(RDS2)) {\n input = input.replace(RDS2, '/');\n }\n else if (input.match(RDS3)) {\n input = input.replace(RDS3, '/');\n output.pop();\n }\n else if (input === '.' || input === '..') {\n input = '';\n }\n else {\n const im = input.match(RDS5);\n if (im) {\n const s = im[0];\n input = input.slice(s.length);\n output.push(s);\n }\n else {\n throw new Error('Unexpected dot segment condition');\n }\n }\n }\n return output.join('');\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serialize = void 0;\nfunction serialize(components) {\n let buildResult = buildStartUrl(components);\n let urlBuilder;\n try {\n urlBuilder = new URL(buildResult.startUrl);\n }\n catch (error) {\n if (error.message) {\n console.error(error.message + ' ' + buildResult.startUrl);\n }\n return '';\n }\n if (components.scheme !== undefined && !buildResult.temporarySchemeAndHostUsed && !buildResult.temporarySchemeUsed) {\n urlBuilder.protocol = components.scheme.toLowerCase();\n }\n else {\n urlBuilder.protocol = '';\n }\n if (components.host !== undefined && !buildResult.temporarySchemeAndHostUsed && !buildResult.temporaryHostUsed) {\n urlBuilder.host = components.host;\n }\n else {\n urlBuilder.host = '';\n }\n if (components.port) {\n urlBuilder.port = String(components.port);\n }\n if (components.path) {\n urlBuilder.pathname = components.path;\n }\n if (components.userinfo) {\n let parts = components.userinfo.split(':');\n if (parts[0]) {\n urlBuilder.username = parts[0];\n }\n if (parts[1]) {\n urlBuilder.password = parts[1];\n }\n }\n if (components.query) {\n urlBuilder.search = components.query;\n }\n if (components.fragment) {\n urlBuilder.hash = components.fragment;\n }\n let result = urlBuilder.toString();\n if (!components.path && result.endsWith('/')) {\n result = result.slice(0, -1);\n }\n if (buildResult.temporarySchemeAndHostUsed) {\n result = result.replace(temporarySchemeAndHost, '');\n if (result.startsWith('/')) {\n result = result.slice(1);\n }\n }\n if (buildResult.temporaryHostUsed) {\n result = result.replace(temporaryHost, '');\n }\n if (buildResult.temporarySchemeUsed) {\n result = result.replace(temporaryScheme, '');\n }\n return result;\n}\nexports.serialize = serialize;\nconst temporaryScheme = 'https:';\nconst temporaryHost = '_remove_me_host_';\nconst temporarySchemeAndHost = temporaryScheme + '//' + temporaryHost;\nfunction buildStartUrl(components) {\n let result = {\n startUrl: '',\n temporaryHostUsed: false,\n temporarySchemeUsed: false,\n temporarySchemeAndHostUsed: false,\n };\n if (components.scheme && components.host) {\n result.startUrl = components.scheme + '://' + components.host;\n return result;\n }\n if (components.host) {\n result.temporarySchemeUsed = true;\n result.startUrl = temporaryScheme + components.host;\n return result;\n }\n if (components.scheme) {\n if (components.path) {\n result.startUrl = components.scheme + ':' + components.path;\n return result;\n }\n result.temporaryHostUsed = true;\n result.startUrl = components.scheme + ':' + temporaryHost;\n return result;\n }\n result.temporarySchemeAndHostUsed = true;\n result.startUrl = temporarySchemeAndHost;\n return result;\n}\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.normalize = exports.equal = void 0;\nconst Serialize_1 = require(\"./Serialize\");\nconst Parse_1 = require(\"./Parse\");\n__exportStar(require(\"./Resolve\"), exports);\n__exportStar(require(\"./Serialize\"), exports);\n__exportStar(require(\"./Parse\"), exports);\nfunction equal(uriA, uriB) {\n let processedA;\n let processedB;\n if (typeof uriA === \"string\") {\n processedA = (0, Serialize_1.serialize)((0, Parse_1.parse)(uriA));\n }\n else {\n processedA = (0, Serialize_1.serialize)(uriA);\n }\n if (typeof uriB === \"string\") {\n processedB = (0, Serialize_1.serialize)((0, Parse_1.parse)(uriB));\n }\n else {\n processedB = (0, Serialize_1.serialize)(uriB);\n }\n return processedA.toLowerCase() === processedB.toLowerCase();\n}\nexports.equal = equal;\nfunction normalize(uri) {\n if (typeof uri === \"string\") {\n return (0, Serialize_1.serialize)((0, Parse_1.parse)(uri));\n }\n else {\n return (0, Parse_1.parse)((0, Serialize_1.serialize)(uri));\n }\n}\nexports.normalize = normalize;\n","// Returns a wrapper function that returns a wrapped callback\n// The wrapper function should do some stuff, and return a\n// presumably different callback function.\n// This makes sure that own properties are retained, so that\n// decorations and such are not lost along the way.\nmodule.exports = wrappy\nfunction wrappy (fn, cb) {\n if (fn && cb) return wrappy(fn)(cb)\n\n if (typeof fn !== 'function')\n throw new TypeError('need wrapper function')\n\n Object.keys(fn).forEach(function (k) {\n wrapper[k] = fn[k]\n })\n\n return wrapper\n\n function wrapper() {\n var args = new Array(arguments.length)\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i]\n }\n var ret = fn.apply(this, args)\n var cb = args[args.length-1]\n if (typeof ret === 'function' && ret !== cb) {\n Object.keys(cb).forEach(function (k) {\n ret[k] = cb[k]\n })\n }\n return ret\n }\n}\n","'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (null === subject);\n}\nexports.isNothing = isNothing;\nfunction isObject(subject) {\n return (typeof subject === 'object') && (null !== subject);\n}\nexports.isObject = isObject;\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) {\n return sequence;\n }\n else if (isNothing(sequence)) {\n return [];\n }\n return [sequence];\n}\nexports.toArray = toArray;\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n if (source) {\n sourceKeys = Object.keys(source);\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n return target;\n}\nexports.extend = extend;\nfunction repeat(string, count) {\n var result = '', cycle;\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n return result;\n}\nexports.repeat = repeat;\nfunction isNegativeZero(number) {\n return (0 === number) && (Number.NEGATIVE_INFINITY === 1 / number);\n}\nexports.isNegativeZero = isNegativeZero;\n//# sourceMappingURL=common.js.map","'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar DEFAULT_FULL_SCHEMA = require('./schema/default_full');\nvar DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');\nvar _toString = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\nvar CHAR_TAB = 0x09;\nvar CHAR_LINE_FEED = 0x0A;\nvar CHAR_CARRIAGE_RETURN = 0x0D;\nvar CHAR_SPACE = 0x20;\nvar CHAR_EXCLAMATION = 0x21;\nvar CHAR_DOUBLE_QUOTE = 0x22;\nvar CHAR_SHARP = 0x23;\nvar CHAR_PERCENT = 0x25;\nvar CHAR_AMPERSAND = 0x26;\nvar CHAR_SINGLE_QUOTE = 0x27;\nvar CHAR_ASTERISK = 0x2A;\nvar CHAR_COMMA = 0x2C;\nvar CHAR_MINUS = 0x2D;\nvar CHAR_COLON = 0x3A;\nvar CHAR_GREATER_THAN = 0x3E;\nvar CHAR_QUESTION = 0x3F;\nvar CHAR_COMMERCIAL_AT = 0x40;\nvar CHAR_LEFT_SQUARE_BRACKET = 0x5B;\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D;\nvar CHAR_GRAVE_ACCENT = 0x60;\nvar CHAR_LEFT_CURLY_BRACKET = 0x7B;\nvar CHAR_VERTICAL_LINE = 0x7C;\nvar CHAR_RIGHT_CURLY_BRACKET = 0x7D;\nvar ESCAPE_SEQUENCES = {};\nESCAPE_SEQUENCES[0x00] = '\\\\0';\nESCAPE_SEQUENCES[0x07] = '\\\\a';\nESCAPE_SEQUENCES[0x08] = '\\\\b';\nESCAPE_SEQUENCES[0x09] = '\\\\t';\nESCAPE_SEQUENCES[0x0A] = '\\\\n';\nESCAPE_SEQUENCES[0x0B] = '\\\\v';\nESCAPE_SEQUENCES[0x0C] = '\\\\f';\nESCAPE_SEQUENCES[0x0D] = '\\\\r';\nESCAPE_SEQUENCES[0x1B] = '\\\\e';\nESCAPE_SEQUENCES[0x22] = '\\\\\"';\nESCAPE_SEQUENCES[0x5C] = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85] = '\\\\N';\nESCAPE_SEQUENCES[0xA0] = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\nvar DEPRECATED_BOOLEANS_SYNTAX = [\n 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\n 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\n];\nfunction compileStyleMap(schema, map) {\n var result, keys, index, length, tag, style, type;\n if (null === map) {\n return {};\n }\n result = {};\n keys = Object.keys(map);\n for (index = 0, length = keys.length; index < length; index += 1) {\n tag = keys[index];\n style = String(map[tag]);\n if ('!!' === tag.slice(0, 2)) {\n tag = 'tag:yaml.org,2002:' + tag.slice(2);\n }\n type = schema.compiledTypeMap[tag];\n if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n style = type.styleAliases[style];\n }\n result[tag] = style;\n }\n return result;\n}\nfunction encodeHex(character) {\n var string, handle, length;\n string = character.toString(16).toUpperCase();\n if (character <= 0xFF) {\n handle = 'x';\n length = 2;\n }\n else if (character <= 0xFFFF) {\n handle = 'u';\n length = 4;\n }\n else if (character <= 0xFFFFFFFF) {\n handle = 'U';\n length = 8;\n }\n else {\n throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');\n }\n return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\nfunction State(options) {\n this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;\n this.indent = Math.max(1, (options['indent'] || 2));\n this.skipInvalid = options['skipInvalid'] || false;\n this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\n this.styleMap = compileStyleMap(this.schema, options['styles'] || null);\n this.implicitTypes = this.schema.compiledImplicit;\n this.explicitTypes = this.schema.compiledExplicit;\n this.tag = null;\n this.result = '';\n this.duplicates = [];\n this.usedDuplicates = null;\n}\nfunction indentString(string, spaces) {\n var ind = common.repeat(' ', spaces), position = 0, next = -1, result = '', line, length = string.length;\n while (position < length) {\n next = string.indexOf('\\n', position);\n if (next === -1) {\n line = string.slice(position);\n position = length;\n }\n else {\n line = string.slice(position, next + 1);\n position = next + 1;\n }\n if (line.length && line !== '\\n') {\n result += ind;\n }\n result += line;\n }\n return result;\n}\nfunction generateNextLine(state, level) {\n return '\\n' + common.repeat(' ', state.indent * level);\n}\nfunction testImplicitResolving(state, str) {\n var index, length, type;\n for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n type = state.implicitTypes[index];\n if (type.resolve(str)) {\n return true;\n }\n }\n return false;\n}\nfunction StringBuilder(source) {\n this.source = source;\n this.result = '';\n this.checkpoint = 0;\n}\nStringBuilder.prototype.takeUpTo = function (position) {\n var er;\n if (position < this.checkpoint) {\n er = new Error('position should be > checkpoint');\n er.position = position;\n er.checkpoint = this.checkpoint;\n throw er;\n }\n this.result += this.source.slice(this.checkpoint, position);\n this.checkpoint = position;\n return this;\n};\nStringBuilder.prototype.escapeChar = function () {\n var character, esc;\n character = this.source.charCodeAt(this.checkpoint);\n esc = ESCAPE_SEQUENCES[character] || encodeHex(character);\n this.result += esc;\n this.checkpoint += 1;\n return this;\n};\nStringBuilder.prototype.finish = function () {\n if (this.source.length > this.checkpoint) {\n this.takeUpTo(this.source.length);\n }\n};\nfunction writeScalar(state, object, level) {\n var simple, first, spaceWrap, folded, literal, single, double, sawLineFeed, linePosition, longestLine, indent, max, character, position, escapeSeq, hexEsc, previous, lineLength, modifier, trailingLineBreaks, result;\n if (0 === object.length) {\n state.dump = \"''\";\n return;\n }\n if (object.indexOf(\"!include\") == 0) {\n state.dump = \"\" + object;\n return;\n }\n if (object.indexOf(\"!$$$novalue\") == 0) {\n state.dump = \"\";\n return;\n }\n if (-1 !== DEPRECATED_BOOLEANS_SYNTAX.indexOf(object)) {\n state.dump = \"'\" + object + \"'\";\n return;\n }\n simple = true;\n first = object.length ? object.charCodeAt(0) : 0;\n spaceWrap = (CHAR_SPACE === first ||\n CHAR_SPACE === object.charCodeAt(object.length - 1));\n if (CHAR_MINUS === first ||\n CHAR_QUESTION === first ||\n CHAR_COMMERCIAL_AT === first ||\n CHAR_GRAVE_ACCENT === first) {\n simple = false;\n }\n if (spaceWrap) {\n simple = false;\n folded = false;\n literal = false;\n }\n else {\n folded = true;\n literal = true;\n }\n single = true;\n double = new StringBuilder(object);\n sawLineFeed = false;\n linePosition = 0;\n longestLine = 0;\n indent = state.indent * level;\n max = 80;\n if (indent < 40) {\n max -= indent;\n }\n else {\n max = 40;\n }\n for (position = 0; position < object.length; position++) {\n character = object.charCodeAt(position);\n if (simple) {\n if (!simpleChar(character)) {\n simple = false;\n }\n else {\n continue;\n }\n }\n if (single && character === CHAR_SINGLE_QUOTE) {\n single = false;\n }\n escapeSeq = ESCAPE_SEQUENCES[character];\n hexEsc = needsHexEscape(character);\n if (!escapeSeq && !hexEsc) {\n continue;\n }\n if (character !== CHAR_LINE_FEED &&\n character !== CHAR_DOUBLE_QUOTE &&\n character !== CHAR_SINGLE_QUOTE) {\n folded = false;\n literal = false;\n }\n else if (character === CHAR_LINE_FEED) {\n sawLineFeed = true;\n single = false;\n if (position > 0) {\n previous = object.charCodeAt(position - 1);\n if (previous === CHAR_SPACE) {\n literal = false;\n folded = false;\n }\n }\n if (folded) {\n lineLength = position - linePosition;\n linePosition = position;\n if (lineLength > longestLine) {\n longestLine = lineLength;\n }\n }\n }\n if (character !== CHAR_DOUBLE_QUOTE) {\n single = false;\n }\n double.takeUpTo(position);\n double.escapeChar();\n }\n if (simple && testImplicitResolving(state, object)) {\n simple = false;\n }\n modifier = '';\n if (folded || literal) {\n trailingLineBreaks = 0;\n if (object.charCodeAt(object.length - 1) === CHAR_LINE_FEED) {\n trailingLineBreaks += 1;\n if (object.charCodeAt(object.length - 2) === CHAR_LINE_FEED) {\n trailingLineBreaks += 1;\n }\n }\n if (trailingLineBreaks === 0) {\n modifier = '-';\n }\n else if (trailingLineBreaks === 2) {\n modifier = '+';\n }\n }\n if (literal && longestLine < max) {\n folded = false;\n }\n if (!sawLineFeed) {\n literal = false;\n }\n if (simple) {\n state.dump = object;\n }\n else if (single) {\n state.dump = '\\'' + object + '\\'';\n }\n else if (folded) {\n result = fold(object, max);\n state.dump = '>' + modifier + '\\n' + indentString(result, indent);\n }\n else if (literal) {\n if (!modifier) {\n object = object.replace(/\\n$/, '');\n }\n state.dump = '|' + modifier + '\\n' + indentString(object, indent);\n }\n else if (double) {\n double.finish();\n state.dump = '\"' + double.result + '\"';\n }\n else {\n throw new Error('Failed to dump scalar value');\n }\n return;\n}\nfunction fold(object, max) {\n var result = '', position = 0, length = object.length, trailing = /\\n+$/.exec(object), newLine;\n if (trailing) {\n length = trailing.index + 1;\n }\n while (position < length) {\n newLine = object.indexOf('\\n', position);\n if (newLine > length || newLine === -1) {\n if (result) {\n result += '\\n\\n';\n }\n result += foldLine(object.slice(position, length), max);\n position = length;\n }\n else {\n if (result) {\n result += '\\n\\n';\n }\n result += foldLine(object.slice(position, newLine), max);\n position = newLine + 1;\n }\n }\n if (trailing && trailing[0] !== '\\n') {\n result += trailing[0];\n }\n return result;\n}\nfunction foldLine(line, max) {\n if (line === '') {\n return line;\n }\n var foldRe = /[^\\s] [^\\s]/g, result = '', prevMatch = 0, foldStart = 0, match = foldRe.exec(line), index, foldEnd, folded;\n while (match) {\n index = match.index;\n if (index - foldStart > max) {\n if (prevMatch !== foldStart) {\n foldEnd = prevMatch;\n }\n else {\n foldEnd = index;\n }\n if (result) {\n result += '\\n';\n }\n folded = line.slice(foldStart, foldEnd);\n result += folded;\n foldStart = foldEnd + 1;\n }\n prevMatch = index + 1;\n match = foldRe.exec(line);\n }\n if (result) {\n result += '\\n';\n }\n if (foldStart !== prevMatch && line.length - foldStart > max) {\n result += line.slice(foldStart, prevMatch) + '\\n' +\n line.slice(prevMatch + 1);\n }\n else {\n result += line.slice(foldStart);\n }\n return result;\n}\nfunction simpleChar(character) {\n return CHAR_TAB !== character &&\n CHAR_LINE_FEED !== character &&\n CHAR_CARRIAGE_RETURN !== character &&\n CHAR_COMMA !== character &&\n CHAR_LEFT_SQUARE_BRACKET !== character &&\n CHAR_RIGHT_SQUARE_BRACKET !== character &&\n CHAR_LEFT_CURLY_BRACKET !== character &&\n CHAR_RIGHT_CURLY_BRACKET !== character &&\n CHAR_SHARP !== character &&\n CHAR_AMPERSAND !== character &&\n CHAR_ASTERISK !== character &&\n CHAR_EXCLAMATION !== character &&\n CHAR_VERTICAL_LINE !== character &&\n CHAR_GREATER_THAN !== character &&\n CHAR_SINGLE_QUOTE !== character &&\n CHAR_DOUBLE_QUOTE !== character &&\n CHAR_PERCENT !== character &&\n CHAR_COLON !== character &&\n !ESCAPE_SEQUENCES[character] &&\n !needsHexEscape(character);\n}\nfunction needsHexEscape(character) {\n return !((0x00020 <= character && character <= 0x00007E) ||\n (0x00085 === character) ||\n (0x000A0 <= character && character <= 0x00D7FF) ||\n (0x0E000 <= character && character <= 0x00FFFD) ||\n (0x10000 <= character && character <= 0x10FFFF));\n}\nfunction writeFlowSequence(state, level, object) {\n var _result = '', _tag = state.tag, index, length;\n for (index = 0, length = object.length; index < length; index += 1) {\n if (writeNode(state, level, object[index], false, false)) {\n if (0 !== index) {\n _result += ', ';\n }\n _result += state.dump;\n }\n }\n state.tag = _tag;\n state.dump = '[' + _result + ']';\n}\nfunction writeBlockSequence(state, level, object, compact) {\n var _result = '', _tag = state.tag, index, length;\n for (index = 0, length = object.length; index < length; index += 1) {\n if (writeNode(state, level + 1, object[index], true, true)) {\n if (!compact || 0 !== index) {\n _result += generateNextLine(state, level);\n }\n _result += '- ' + state.dump;\n }\n }\n state.tag = _tag;\n state.dump = _result || '[]';\n}\nfunction writeFlowMapping(state, level, object) {\n var _result = '', _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer;\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n if (0 !== index) {\n pairBuffer += ', ';\n }\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n if (!writeNode(state, level, objectKey, false, false)) {\n continue;\n }\n if (state.dump.length > 1024) {\n pairBuffer += '? ';\n }\n pairBuffer += state.dump + ': ';\n if (!writeNode(state, level, objectValue, false, false)) {\n continue;\n }\n pairBuffer += state.dump;\n _result += pairBuffer;\n }\n state.tag = _tag;\n state.dump = '{' + _result + '}';\n}\nfunction writeBlockMapping(state, level, object, compact) {\n var _result = '', _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer;\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n if (!compact || 0 !== index) {\n pairBuffer += generateNextLine(state, level);\n }\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n if (!writeNode(state, level + 1, objectKey, true, true)) {\n continue;\n }\n explicitPair = (null !== state.tag && '?' !== state.tag) ||\n (state.dump && state.dump.length > 1024);\n if (explicitPair) {\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += '?';\n }\n else {\n pairBuffer += '? ';\n }\n }\n pairBuffer += state.dump;\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level);\n }\n if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n continue;\n }\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += ':';\n }\n else {\n pairBuffer += ': ';\n }\n pairBuffer += state.dump;\n _result += pairBuffer;\n }\n state.tag = _tag;\n state.dump = _result || '{}';\n}\nfunction detectType(state, object, explicit) {\n var _result, typeList, index, length, type, style;\n typeList = explicit ? state.explicitTypes : state.implicitTypes;\n for (index = 0, length = typeList.length; index < length; index += 1) {\n type = typeList[index];\n if ((type.instanceOf || type.predicate) &&\n (!type.instanceOf || (('object' === typeof object) && (object instanceof type.instanceOf))) &&\n (!type.predicate || type.predicate(object))) {\n state.tag = explicit ? type.tag : '?';\n if (type.represent) {\n style = state.styleMap[type.tag] || type.defaultStyle;\n if ('[object Function]' === _toString.call(type.represent)) {\n _result = type.represent(object, style);\n }\n else if (_hasOwnProperty.call(type.represent, style)) {\n _result = type.represent[style](object, style);\n }\n else {\n throw new YAMLException('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n }\n state.dump = _result;\n }\n return true;\n }\n }\n return false;\n}\nfunction writeNode(state, level, object, block, compact) {\n state.tag = null;\n state.dump = object;\n if (!detectType(state, object, false)) {\n detectType(state, object, true);\n }\n var type = _toString.call(state.dump);\n if (block) {\n block = (0 > state.flowLevel || state.flowLevel > level);\n }\n if ((null !== state.tag && '?' !== state.tag) || (2 !== state.indent && level > 0)) {\n compact = false;\n }\n var objectOrArray = '[object Object]' === type || '[object Array]' === type, duplicateIndex, duplicate;\n if (objectOrArray) {\n duplicateIndex = state.duplicates.indexOf(object);\n duplicate = duplicateIndex !== -1;\n }\n if (duplicate && state.usedDuplicates[duplicateIndex]) {\n state.dump = '*ref_' + duplicateIndex;\n }\n else {\n if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n state.usedDuplicates[duplicateIndex] = true;\n }\n if ('[object Object]' === type) {\n if (block && (0 !== Object.keys(state.dump).length)) {\n writeBlockMapping(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + (0 === level ? '\\n' : '') + state.dump;\n }\n }\n else {\n writeFlowMapping(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n }\n else if ('[object Array]' === type) {\n if (block && (0 !== state.dump.length)) {\n writeBlockSequence(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + (0 === level ? '\\n' : '') + state.dump;\n }\n }\n else {\n writeFlowSequence(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n }\n else if ('[object String]' === type) {\n if ('?' !== state.tag) {\n writeScalar(state, state.dump, level);\n }\n }\n else {\n if (state.skipInvalid) {\n return false;\n }\n throw new YAMLException('unacceptable kind of an object to dump ' + type);\n }\n if (null !== state.tag && '?' !== state.tag) {\n state.dump = '!<' + state.tag + '> ' + state.dump;\n }\n }\n return true;\n}\nfunction getDuplicateReferences(object, state) {\n var objects = [], duplicatesIndexes = [], index, length;\n inspectNode(object, objects, duplicatesIndexes);\n for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n state.duplicates.push(objects[duplicatesIndexes[index]]);\n }\n state.usedDuplicates = new Array(length);\n}\nfunction inspectNode(object, objects, duplicatesIndexes) {\n var type = _toString.call(object), objectKeyList, index, length;\n if (null !== object && 'object' === typeof object) {\n index = objects.indexOf(object);\n if (-1 !== index) {\n if (-1 === duplicatesIndexes.indexOf(index)) {\n duplicatesIndexes.push(index);\n }\n }\n else {\n objects.push(object);\n if (Array.isArray(object)) {\n for (index = 0, length = object.length; index < length; index += 1) {\n inspectNode(object[index], objects, duplicatesIndexes);\n }\n }\n else {\n objectKeyList = Object.keys(object);\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n }\n }\n }\n }\n}\nfunction dump(input, options) {\n options = options || {};\n var state = new State(options);\n getDuplicateReferences(input, state);\n if (writeNode(state, 0, input, true, true)) {\n return state.dump + '\\n';\n }\n return '';\n}\nexports.dump = dump;\nfunction safeDump(input, options) {\n return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n}\nexports.safeDump = safeDump;\n//# sourceMappingURL=dumper.js.map","'use strict';\nvar YAMLException = (function () {\n function YAMLException(reason, mark, isWarning) {\n if (mark === void 0) { mark = null; }\n if (isWarning === void 0) { isWarning = false; }\n this.name = 'YAMLException';\n this.reason = reason;\n this.mark = mark;\n this.message = this.toString(false);\n this.isWarning = isWarning;\n }\n YAMLException.isInstance = function (instance) {\n if (instance != null && instance.getClassIdentifier\n && typeof (instance.getClassIdentifier) == \"function\") {\n for (var _i = 0, _a = instance.getClassIdentifier(); _i < _a.length; _i++) {\n var currentIdentifier = _a[_i];\n if (currentIdentifier == YAMLException.CLASS_IDENTIFIER)\n return true;\n }\n }\n return false;\n };\n YAMLException.prototype.getClassIdentifier = function () {\n var superIdentifiers = [];\n return superIdentifiers.concat(YAMLException.CLASS_IDENTIFIER);\n };\n YAMLException.prototype.toString = function (compact) {\n if (compact === void 0) { compact = false; }\n var result;\n result = 'JS-YAML: ' + (this.reason || '(unknown reason)');\n if (!compact && this.mark) {\n result += ' ' + this.mark.toString();\n }\n return result;\n };\n YAMLException.CLASS_IDENTIFIER = \"yaml-ast-parser.YAMLException\";\n return YAMLException;\n}());\nmodule.exports = YAMLException;\n//# sourceMappingURL=exception.js.map","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar loader_1 = require(\"./loader\");\nexports.load = loader_1.load;\nexports.loadAll = loader_1.loadAll;\nexports.safeLoad = loader_1.safeLoad;\nexports.safeLoadAll = loader_1.safeLoadAll;\nvar dumper_1 = require(\"./dumper\");\nexports.dump = dumper_1.dump;\nexports.safeDump = dumper_1.safeDump;\nexports.YAMLException = require(\"./exception\");\n__export(require(\"./yamlAST\"));\nfunction deprecated(name) {\n return function () {\n throw new Error('Function ' + name + ' is deprecated and cannot be used.');\n };\n}\n__export(require(\"./scalarInference\"));\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ast = require(\"./yamlAST\");\n'use strict';\nvar common = require(\"./common\");\nvar YAMLException = require(\"./exception\");\nvar Mark = require(\"./mark\");\nvar DEFAULT_SAFE_SCHEMA = require(\"./schema/default_safe\");\nvar DEFAULT_FULL_SCHEMA = require(\"./schema/default_full\");\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\nvar CONTEXT_FLOW_IN = 1;\nvar CONTEXT_FLOW_OUT = 2;\nvar CONTEXT_BLOCK_IN = 3;\nvar CONTEXT_BLOCK_OUT = 4;\nvar CHOMPING_CLIP = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP = 3;\nvar PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\nfunction is_EOL(c) {\n return (c === 0x0A) || (c === 0x0D);\n}\nfunction is_WHITE_SPACE(c) {\n return (c === 0x09) || (c === 0x20);\n}\nfunction is_WS_OR_EOL(c) {\n return (c === 0x09) ||\n (c === 0x20) ||\n (c === 0x0A) ||\n (c === 0x0D);\n}\nfunction is_FLOW_INDICATOR(c) {\n return 0x2C === c ||\n 0x5B === c ||\n 0x5D === c ||\n 0x7B === c ||\n 0x7D === c;\n}\nfunction fromHexCode(c) {\n var lc;\n if ((0x30 <= c) && (c <= 0x39)) {\n return c - 0x30;\n }\n lc = c | 0x20;\n if ((0x61 <= lc) && (lc <= 0x66)) {\n return lc - 0x61 + 10;\n }\n return -1;\n}\nfunction escapedHexLen(c) {\n if (c === 0x78) {\n return 2;\n }\n if (c === 0x75) {\n return 4;\n }\n if (c === 0x55) {\n return 8;\n }\n return 0;\n}\nfunction fromDecimalCode(c) {\n if ((0x30 <= c) && (c <= 0x39)) {\n return c - 0x30;\n }\n return -1;\n}\nfunction simpleEscapeSequence(c) {\n return (c === 0x30) ? '\\x00' :\n (c === 0x61) ? '\\x07' :\n (c === 0x62) ? '\\x08' :\n (c === 0x74) ? '\\x09' :\n (c === 0x09) ? '\\x09' :\n (c === 0x6E) ? '\\x0A' :\n (c === 0x76) ? '\\x0B' :\n (c === 0x66) ? '\\x0C' :\n (c === 0x72) ? '\\x0D' :\n (c === 0x65) ? '\\x1B' :\n (c === 0x20) ? ' ' :\n (c === 0x22) ? '\\x22' :\n (c === 0x2F) ? '/' :\n (c === 0x5C) ? '\\x5C' :\n (c === 0x4E) ? '\\x85' :\n (c === 0x5F) ? '\\xA0' :\n (c === 0x4C) ? '\\u2028' :\n (c === 0x50) ? '\\u2029' : '';\n}\nfunction charFromCodepoint(c) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c);\n }\n return String.fromCharCode(((c - 0x010000) >> 10) + 0xD800, ((c - 0x010000) & 0x03FF) + 0xDC00);\n}\nvar simpleEscapeCheck = new Array(256);\nvar simpleEscapeMap = new Array(256);\nvar customEscapeCheck = new Array(256);\nvar customEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n customEscapeMap[i] = simpleEscapeMap[i] = simpleEscapeSequence(i);\n simpleEscapeCheck[i] = simpleEscapeMap[i] ? 1 : 0;\n customEscapeCheck[i] = 1;\n if (!simpleEscapeCheck[i]) {\n customEscapeMap[i] = '\\\\' + String.fromCharCode(i);\n }\n}\nvar State = (function () {\n function State(input, options) {\n this.errorMap = {};\n this.errors = [];\n this.lines = [];\n this.input = input;\n this.filename = options['filename'] || null;\n this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;\n this.onWarning = options['onWarning'] || null;\n this.legacy = options['legacy'] || false;\n this.allowAnyEscape = options['allowAnyEscape'] || false;\n this.ignoreDuplicateKeys = options['ignoreDuplicateKeys'] || false;\n this.implicitTypes = this.schema.compiledImplicit;\n this.typeMap = this.schema.compiledTypeMap;\n this.length = input.length;\n this.position = 0;\n this.line = 0;\n this.lineStart = 0;\n this.lineIndent = 0;\n this.documents = [];\n }\n return State;\n}());\nfunction generateError(state, message, isWarning) {\n if (isWarning === void 0) { isWarning = false; }\n return new YAMLException(message, new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart)), isWarning);\n}\nfunction throwErrorFromPosition(state, position, message, isWarning, toLineEnd) {\n if (isWarning === void 0) { isWarning = false; }\n if (toLineEnd === void 0) { toLineEnd = false; }\n var line = positionToLine(state, position);\n if (!line) {\n return;\n }\n var hash = message + position;\n if (state.errorMap[hash]) {\n return;\n }\n var mark = new Mark(state.filename, state.input, position, line.line, (position - line.start));\n if (toLineEnd) {\n mark.toLineEnd = true;\n }\n var error = new YAMLException(message, mark, isWarning);\n state.errors.push(error);\n}\nfunction throwError(state, message) {\n var error = generateError(state, message);\n var hash = error.message + error.mark.position;\n if (state.errorMap[hash]) {\n return;\n }\n state.errors.push(error);\n state.errorMap[hash] = 1;\n var or = state.position;\n while (true) {\n if (state.position >= state.input.length - 1) {\n return;\n }\n var c = state.input.charAt(state.position);\n if (c == '\\n') {\n state.position--;\n if (state.position == or) {\n state.position += 1;\n }\n return;\n }\n if (c == '\\r') {\n state.position--;\n if (state.position == or) {\n state.position += 1;\n }\n return;\n }\n state.position++;\n }\n}\nfunction throwWarning(state, message) {\n var error = generateError(state, message);\n if (state.onWarning) {\n state.onWarning.call(null, error);\n }\n else {\n }\n}\nvar directiveHandlers = {\n YAML: function handleYamlDirective(state, name, args) {\n var match, major, minor;\n if (null !== state.version) {\n throwError(state, 'duplication of %YAML directive');\n }\n if (1 !== args.length) {\n throwError(state, 'YAML directive accepts exactly one argument');\n }\n match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n if (null === match) {\n throwError(state, 'ill-formed argument of the YAML directive');\n }\n major = parseInt(match[1], 10);\n minor = parseInt(match[2], 10);\n if (1 !== major) {\n throwError(state, 'found incompatible YAML document (version 1.2 is required)');\n }\n state.version = args[0];\n state.checkLineBreaks = (minor < 2);\n if (2 !== minor) {\n throwError(state, 'found incompatible YAML document (version 1.2 is required)');\n }\n },\n TAG: function handleTagDirective(state, name, args) {\n var handle, prefix;\n if (2 !== args.length) {\n throwError(state, 'TAG directive accepts exactly two arguments');\n }\n handle = args[0];\n prefix = args[1];\n if (!PATTERN_TAG_HANDLE.test(handle)) {\n throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n }\n if (_hasOwnProperty.call(state.tagMap, handle)) {\n throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n }\n if (!PATTERN_TAG_URI.test(prefix)) {\n throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n }\n state.tagMap[handle] = prefix;\n }\n};\nfunction captureSegment(state, start, end, checkJson) {\n var _position, _length, _character, _result;\n var scalar = state.result;\n if (scalar.startPosition == -1) {\n scalar.startPosition = start;\n }\n if (start <= end) {\n _result = state.input.slice(start, end);\n if (checkJson) {\n for (_position = 0, _length = _result.length; _position < _length; _position += 1) {\n _character = _result.charCodeAt(_position);\n if (!(0x09 === _character ||\n 0x20 <= _character && _character <= 0x10FFFF)) {\n throwError(state, 'expected valid JSON character');\n }\n }\n }\n else if (PATTERN_NON_PRINTABLE.test(_result)) {\n throwError(state, 'the stream contains non-printable characters');\n }\n scalar.value += _result;\n scalar.endPosition = end;\n }\n}\nfunction mergeMappings(state, destination, source) {\n var sourceKeys, key, index, quantity;\n if (!common.isObject(source)) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n }\n sourceKeys = Object.keys(source);\n for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n key = sourceKeys[index];\n if (!_hasOwnProperty.call(destination, key)) {\n destination[key] = source[key];\n }\n }\n}\nfunction storeMappingPair(state, _result, keyTag, keyNode, valueNode) {\n var index, quantity;\n if (keyNode == null) {\n return;\n }\n if (null === _result) {\n _result = {\n startPosition: keyNode.startPosition,\n endPosition: valueNode.endPosition,\n parent: null,\n errors: [],\n mappings: [], kind: ast.Kind.MAP\n };\n }\n var mapping = ast.newMapping(keyNode, valueNode);\n mapping.parent = _result;\n keyNode.parent = mapping;\n if (valueNode != null) {\n valueNode.parent = mapping;\n }\n !state.ignoreDuplicateKeys && _result.mappings.forEach(function (sibling) {\n if (sibling.key && sibling.key.value === (mapping.key && mapping.key.value)) {\n throwErrorFromPosition(state, mapping.key.startPosition, 'duplicate key');\n throwErrorFromPosition(state, sibling.key.startPosition, 'duplicate key');\n }\n });\n _result.mappings.push(mapping);\n _result.endPosition = valueNode ? valueNode.endPosition : keyNode.endPosition + 1;\n return _result;\n}\nfunction readLineBreak(state) {\n var ch;\n ch = state.input.charCodeAt(state.position);\n if (0x0A === ch) {\n state.position++;\n }\n else if (0x0D === ch) {\n state.position++;\n if (0x0A === state.input.charCodeAt(state.position)) {\n state.position++;\n }\n }\n else {\n throwError(state, 'a line break is expected');\n }\n state.line += 1;\n state.lineStart = state.position;\n state.lines.push({\n start: state.lineStart,\n line: state.line\n });\n}\nvar Line = (function () {\n function Line() {\n }\n return Line;\n}());\nfunction positionToLine(state, position) {\n var line;\n for (var i = 0; i < state.lines.length; i++) {\n if (state.lines[i].start > position) {\n break;\n }\n line = state.lines[i];\n }\n if (!line) {\n return {\n start: 0,\n line: 0\n };\n }\n return line;\n}\nfunction skipSeparationSpace(state, allowComments, checkIndent) {\n var lineBreaks = 0, ch = state.input.charCodeAt(state.position);\n while (0 !== ch) {\n while (is_WHITE_SPACE(ch)) {\n if (ch === 0x09) {\n state.errors.push(generateError(state, \"Using tabs can lead to unpredictable results\", true));\n }\n ch = state.input.charCodeAt(++state.position);\n }\n if (allowComments && 0x23 === ch) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0x0A && ch !== 0x0D && 0 !== ch);\n }\n if (is_EOL(ch)) {\n readLineBreak(state);\n ch = state.input.charCodeAt(state.position);\n lineBreaks++;\n state.lineIndent = 0;\n while (0x20 === ch) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n }\n else {\n break;\n }\n }\n if (-1 !== checkIndent && 0 !== lineBreaks && state.lineIndent < checkIndent) {\n throwWarning(state, 'deficient indentation');\n }\n return lineBreaks;\n}\nfunction testDocumentSeparator(state) {\n var _position = state.position, ch;\n ch = state.input.charCodeAt(_position);\n if ((0x2D === ch || 0x2E === ch) &&\n state.input.charCodeAt(_position + 1) === ch &&\n state.input.charCodeAt(_position + 2) === ch) {\n _position += 3;\n ch = state.input.charCodeAt(_position);\n if (ch === 0 || is_WS_OR_EOL(ch)) {\n return true;\n }\n }\n return false;\n}\nfunction writeFoldedLines(state, scalar, count) {\n if (1 === count) {\n scalar.value += ' ';\n }\n else if (count > 1) {\n scalar.value += common.repeat('\\n', count - 1);\n }\n}\nfunction readPlainScalar(state, nodeIndent, withinFlowCollection) {\n var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch;\n var state_result = ast.newScalar();\n state_result.plainScalar = true;\n state.result = state_result;\n ch = state.input.charCodeAt(state.position);\n if (is_WS_OR_EOL(ch) ||\n is_FLOW_INDICATOR(ch) ||\n 0x23 === ch ||\n 0x26 === ch ||\n 0x2A === ch ||\n 0x21 === ch ||\n 0x7C === ch ||\n 0x3E === ch ||\n 0x27 === ch ||\n 0x22 === ch ||\n 0x25 === ch ||\n 0x40 === ch ||\n 0x60 === ch) {\n return false;\n }\n if (0x3F === ch || 0x2D === ch) {\n following = state.input.charCodeAt(state.position + 1);\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n return false;\n }\n }\n state.kind = 'scalar';\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n while (0 !== ch) {\n if (0x3A === ch) {\n following = state.input.charCodeAt(state.position + 1);\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n break;\n }\n }\n else if (0x23 === ch) {\n preceding = state.input.charCodeAt(state.position - 1);\n if (is_WS_OR_EOL(preceding)) {\n break;\n }\n }\n else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\n withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n break;\n }\n else if (is_EOL(ch)) {\n _line = state.line;\n _lineStart = state.lineStart;\n _lineIndent = state.lineIndent;\n skipSeparationSpace(state, false, -1);\n if (state.lineIndent >= nodeIndent) {\n hasPendingContent = true;\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n else {\n state.position = captureEnd;\n state.line = _line;\n state.lineStart = _lineStart;\n state.lineIndent = _lineIndent;\n break;\n }\n }\n if (hasPendingContent) {\n captureSegment(state, captureStart, captureEnd, false);\n writeFoldedLines(state, state_result, state.line - _line);\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n }\n if (!is_WHITE_SPACE(ch)) {\n captureEnd = state.position + 1;\n }\n ch = state.input.charCodeAt(++state.position);\n if (state.position >= state.input.length) {\n return false;\n }\n }\n captureSegment(state, captureStart, captureEnd, false);\n if (state.result.startPosition != -1) {\n state_result.rawValue = state.input.substring(state_result.startPosition, state_result.endPosition);\n return true;\n }\n state.kind = _kind;\n state.result = _result;\n return false;\n}\nfunction readSingleQuotedScalar(state, nodeIndent) {\n var ch, captureStart, captureEnd;\n ch = state.input.charCodeAt(state.position);\n if (0x27 !== ch) {\n return false;\n }\n var scalar = ast.newScalar();\n scalar.singleQuoted = true;\n state.kind = 'scalar';\n state.result = scalar;\n scalar.startPosition = state.position;\n state.position++;\n captureStart = captureEnd = state.position;\n while (0 !== (ch = state.input.charCodeAt(state.position))) {\n if (0x27 === ch) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n scalar.endPosition = state.position;\n if (0x27 === ch) {\n captureStart = captureEnd = state.position;\n state.position++;\n }\n else {\n return true;\n }\n }\n else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, scalar, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n }\n else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar');\n }\n else {\n state.position++;\n captureEnd = state.position;\n scalar.endPosition = state.position;\n }\n }\n throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\nfunction readDoubleQuotedScalar(state, nodeIndent) {\n var captureStart, captureEnd, hexLength, hexResult, tmp, tmpEsc, ch;\n ch = state.input.charCodeAt(state.position);\n if (0x22 !== ch) {\n return false;\n }\n state.kind = 'scalar';\n var scalar = ast.newScalar();\n scalar.doubleQuoted = true;\n state.result = scalar;\n scalar.startPosition = state.position;\n state.position++;\n captureStart = captureEnd = state.position;\n while (0 !== (ch = state.input.charCodeAt(state.position))) {\n if (0x22 === ch) {\n captureSegment(state, captureStart, state.position, true);\n state.position++;\n scalar.endPosition = state.position;\n scalar.rawValue = state.input.substring(scalar.startPosition, scalar.endPosition);\n return true;\n }\n else if (0x5C === ch) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n if (is_EOL(ch)) {\n skipSeparationSpace(state, false, nodeIndent);\n }\n else if (ch < 256 && (state.allowAnyEscape ? customEscapeCheck[ch] : simpleEscapeCheck[ch])) {\n scalar.value += (state.allowAnyEscape ? customEscapeMap[ch] : simpleEscapeMap[ch]);\n state.position++;\n }\n else if ((tmp = escapedHexLen(ch)) > 0) {\n hexLength = tmp;\n hexResult = 0;\n for (; hexLength > 0; hexLength--) {\n ch = state.input.charCodeAt(++state.position);\n if ((tmp = fromHexCode(ch)) >= 0) {\n hexResult = (hexResult << 4) + tmp;\n }\n else {\n throwError(state, 'expected hexadecimal character');\n }\n }\n scalar.value += charFromCodepoint(hexResult);\n state.position++;\n }\n else {\n throwError(state, 'unknown escape sequence');\n }\n captureStart = captureEnd = state.position;\n }\n else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, scalar, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n }\n else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar');\n }\n else {\n state.position++;\n captureEnd = state.position;\n }\n }\n throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\nfunction readFlowCollection(state, nodeIndent) {\n var readNext = true, _line, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, keyNode, keyTag, valueNode, ch;\n ch = state.input.charCodeAt(state.position);\n if (ch === 0x5B) {\n terminator = 0x5D;\n isMapping = false;\n _result = ast.newItems();\n _result.startPosition = state.position;\n }\n else if (ch === 0x7B) {\n terminator = 0x7D;\n isMapping = true;\n _result = ast.newMap();\n _result.startPosition = state.position;\n }\n else {\n return false;\n }\n if (null !== state.anchor) {\n _result.anchorId = state.anchor;\n state.anchorMap[state.anchor] = _result;\n }\n ch = state.input.charCodeAt(++state.position);\n while (0 !== ch) {\n skipSeparationSpace(state, true, nodeIndent);\n ch = state.input.charCodeAt(state.position);\n if (ch === terminator) {\n state.position++;\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = isMapping ? 'mapping' : 'sequence';\n state.result = _result;\n _result.endPosition = state.position;\n return true;\n }\n else if (!readNext) {\n var p = state.position;\n throwError(state, 'missed comma between flow collection entries');\n state.position = p + 1;\n }\n keyTag = keyNode = valueNode = null;\n isPair = isExplicitPair = false;\n if (0x3F === ch) {\n following = state.input.charCodeAt(state.position + 1);\n if (is_WS_OR_EOL(following)) {\n isPair = isExplicitPair = true;\n state.position++;\n skipSeparationSpace(state, true, nodeIndent);\n }\n }\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n keyTag = state.tag;\n keyNode = state.result;\n skipSeparationSpace(state, true, nodeIndent);\n ch = state.input.charCodeAt(state.position);\n if ((isExplicitPair || state.line === _line) && 0x3A === ch) {\n isPair = true;\n ch = state.input.charCodeAt(++state.position);\n skipSeparationSpace(state, true, nodeIndent);\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n valueNode = state.result;\n }\n if (isMapping) {\n storeMappingPair(state, _result, keyTag, keyNode, valueNode);\n }\n else if (isPair) {\n var mp = storeMappingPair(state, null, keyTag, keyNode, valueNode);\n mp.parent = _result;\n _result.items.push(mp);\n }\n else {\n if (keyNode) {\n keyNode.parent = _result;\n }\n _result.items.push(keyNode);\n }\n _result.endPosition = state.position + 1;\n skipSeparationSpace(state, true, nodeIndent);\n ch = state.input.charCodeAt(state.position);\n if (0x2C === ch) {\n readNext = true;\n ch = state.input.charCodeAt(++state.position);\n }\n else {\n readNext = false;\n }\n }\n throwError(state, 'unexpected end of the stream within a flow collection');\n}\nfunction readBlockScalar(state, nodeIndent) {\n var captureStart, folding, chomping = CHOMPING_CLIP, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch;\n ch = state.input.charCodeAt(state.position);\n if (ch === 0x7C) {\n folding = false;\n }\n else if (ch === 0x3E) {\n folding = true;\n }\n else {\n return false;\n }\n var sc = ast.newScalar();\n state.kind = 'scalar';\n state.result = sc;\n sc.startPosition = state.position;\n while (0 !== ch) {\n ch = state.input.charCodeAt(++state.position);\n if (0x2B === ch || 0x2D === ch) {\n if (CHOMPING_CLIP === chomping) {\n chomping = (0x2B === ch) ? CHOMPING_KEEP : CHOMPING_STRIP;\n }\n else {\n throwError(state, 'repeat of a chomping mode identifier');\n }\n }\n else if ((tmp = fromDecimalCode(ch)) >= 0) {\n if (tmp === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n }\n else if (!detectedIndent) {\n textIndent = nodeIndent + tmp - 1;\n detectedIndent = true;\n }\n else {\n throwError(state, 'repeat of an indentation width identifier');\n }\n }\n else {\n break;\n }\n }\n if (is_WHITE_SPACE(ch)) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (is_WHITE_SPACE(ch));\n if (0x23 === ch) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (!is_EOL(ch) && (0 !== ch));\n }\n }\n while (0 !== ch) {\n readLineBreak(state);\n state.lineIndent = 0;\n ch = state.input.charCodeAt(state.position);\n while ((!detectedIndent || state.lineIndent < textIndent) &&\n (0x20 === ch)) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n if (!detectedIndent && state.lineIndent > textIndent) {\n textIndent = state.lineIndent;\n }\n if (is_EOL(ch)) {\n emptyLines++;\n continue;\n }\n if (state.lineIndent < textIndent) {\n if (chomping === CHOMPING_KEEP) {\n sc.value += common.repeat('\\n', emptyLines);\n }\n else if (chomping === CHOMPING_CLIP) {\n if (detectedIndent) {\n sc.value += '\\n';\n }\n }\n break;\n }\n if (folding) {\n if (is_WHITE_SPACE(ch)) {\n atMoreIndented = true;\n sc.value += common.repeat('\\n', emptyLines + 1);\n }\n else if (atMoreIndented) {\n atMoreIndented = false;\n sc.value += common.repeat('\\n', emptyLines + 1);\n }\n else if (0 === emptyLines) {\n if (detectedIndent) {\n sc.value += ' ';\n }\n }\n else {\n sc.value += common.repeat('\\n', emptyLines);\n }\n }\n else if (detectedIndent) {\n sc.value += common.repeat('\\n', emptyLines + 1);\n }\n else {\n }\n detectedIndent = true;\n emptyLines = 0;\n captureStart = state.position;\n while (!is_EOL(ch) && (0 !== ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n captureSegment(state, captureStart, state.position, false);\n }\n sc.endPosition = state.position;\n var i = state.position - 1;\n var needMinus = false;\n while (true) {\n var c = state.input[i];\n if (c == '\\r' || c == '\\n') {\n if (needMinus) {\n i--;\n }\n break;\n }\n if (c != ' ' && c != '\\t') {\n break;\n }\n i--;\n }\n sc.endPosition = i;\n sc.rawValue = state.input.substring(sc.startPosition, sc.endPosition);\n return true;\n}\nfunction readBlockSequence(state, nodeIndent) {\n var _line, _tag = state.tag, _anchor = state.anchor, _result = ast.newItems(), following, detected = false, ch;\n if (null !== state.anchor) {\n _result.anchorId = state.anchor;\n state.anchorMap[state.anchor] = _result;\n }\n _result.startPosition = state.position;\n ch = state.input.charCodeAt(state.position);\n while (0 !== ch) {\n if (0x2D !== ch) {\n break;\n }\n following = state.input.charCodeAt(state.position + 1);\n if (!is_WS_OR_EOL(following)) {\n break;\n }\n detected = true;\n state.position++;\n if (skipSeparationSpace(state, true, -1)) {\n if (state.lineIndent <= nodeIndent) {\n _result.items.push(null);\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n }\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n if (state.result) {\n state.result.parent = _result;\n _result.items.push(state.result);\n }\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n if ((state.line === _line || state.lineIndent > nodeIndent) && (0 !== ch)) {\n throwError(state, 'bad indentation of a sequence entry');\n }\n else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n _result.endPosition = state.position;\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'sequence';\n state.result = _result;\n _result.endPosition = state.position;\n return true;\n }\n return false;\n}\nfunction readBlockMapping(state, nodeIndent, flowIndent) {\n var following, allowCompact, _line, _tag = state.tag, _anchor = state.anchor, _result = ast.newMap(), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch;\n _result.startPosition = state.position;\n if (null !== state.anchor) {\n _result.anchorId = state.anchor;\n state.anchorMap[state.anchor] = _result;\n }\n ch = state.input.charCodeAt(state.position);\n while (0 !== ch) {\n following = state.input.charCodeAt(state.position + 1);\n _line = state.line;\n if ((0x3F === ch || 0x3A === ch) && is_WS_OR_EOL(following)) {\n if (0x3F === ch) {\n if (atExplicitKey) {\n storeMappingPair(state, _result, keyTag, keyNode, null);\n keyTag = keyNode = valueNode = null;\n }\n detected = true;\n atExplicitKey = true;\n allowCompact = true;\n }\n else if (atExplicitKey) {\n atExplicitKey = false;\n allowCompact = true;\n }\n else {\n throwError(state, 'incomplete explicit mapping pair; a key node is missed');\n }\n state.position += 1;\n ch = following;\n }\n else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n if (state.line === _line) {\n ch = state.input.charCodeAt(state.position);\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n if (0x3A === ch) {\n ch = state.input.charCodeAt(++state.position);\n if (!is_WS_OR_EOL(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n }\n if (atExplicitKey) {\n storeMappingPair(state, _result, keyTag, keyNode, null);\n keyTag = keyNode = valueNode = null;\n }\n detected = true;\n atExplicitKey = false;\n allowCompact = false;\n keyTag = state.tag;\n keyNode = state.result;\n }\n else if (state.position == state.lineStart && testDocumentSeparator(state)) {\n break;\n }\n else if (detected) {\n throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n }\n else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true;\n }\n }\n else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n while (state.position > 0) {\n ch = state.input.charCodeAt(--state.position);\n if (is_EOL(ch)) {\n state.position++;\n break;\n }\n }\n }\n else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true;\n }\n }\n else {\n break;\n }\n if (state.line === _line || state.lineIndent > nodeIndent) {\n if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n if (atExplicitKey) {\n keyNode = state.result;\n }\n else {\n valueNode = state.result;\n }\n }\n if (!atExplicitKey) {\n storeMappingPair(state, _result, keyTag, keyNode, valueNode);\n keyTag = keyNode = valueNode = null;\n }\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n }\n if (state.lineIndent > nodeIndent && (0 !== ch)) {\n throwError(state, 'bad indentation of a mapping entry');\n }\n else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n if (atExplicitKey) {\n storeMappingPair(state, _result, keyTag, keyNode, null);\n }\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'mapping';\n state.result = _result;\n }\n return detected;\n}\nfunction readTagProperty(state) {\n var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch;\n ch = state.input.charCodeAt(state.position);\n if (0x21 !== ch) {\n return false;\n }\n if (null !== state.tag) {\n throwError(state, 'duplication of a tag property');\n }\n ch = state.input.charCodeAt(++state.position);\n if (0x3C === ch) {\n isVerbatim = true;\n ch = state.input.charCodeAt(++state.position);\n }\n else if (0x21 === ch) {\n isNamed = true;\n tagHandle = '!!';\n ch = state.input.charCodeAt(++state.position);\n }\n else {\n tagHandle = '!';\n }\n _position = state.position;\n if (isVerbatim) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (0 !== ch && 0x3E !== ch);\n if (state.position < state.length) {\n tagName = state.input.slice(_position, state.position);\n ch = state.input.charCodeAt(++state.position);\n }\n else {\n throwError(state, 'unexpected end of the stream within a verbatim tag');\n }\n }\n else {\n while (0 !== ch && !is_WS_OR_EOL(ch)) {\n if (0x21 === ch) {\n if (!isNamed) {\n tagHandle = state.input.slice(_position - 1, state.position + 1);\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n throwError(state, 'named tag handle cannot contain such characters');\n }\n isNamed = true;\n _position = state.position + 1;\n }\n else {\n throwError(state, 'tag suffix cannot contain exclamation marks');\n }\n }\n ch = state.input.charCodeAt(++state.position);\n }\n tagName = state.input.slice(_position, state.position);\n if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n throwError(state, 'tag suffix cannot contain flow indicator characters');\n }\n }\n if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n throwError(state, 'tag name cannot contain such characters: ' + tagName);\n }\n if (isVerbatim) {\n state.tag = tagName;\n }\n else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {\n state.tag = state.tagMap[tagHandle] + tagName;\n }\n else if ('!' === tagHandle) {\n state.tag = '!' + tagName;\n }\n else if ('!!' === tagHandle) {\n state.tag = 'tag:yaml.org,2002:' + tagName;\n }\n else {\n throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n }\n return true;\n}\nfunction readAnchorProperty(state) {\n var _position, ch;\n ch = state.input.charCodeAt(state.position);\n if (0x26 !== ch) {\n return false;\n }\n if (null !== state.anchor) {\n throwError(state, 'duplication of an anchor property');\n }\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n if (state.position === _position) {\n throwError(state, 'name of an anchor node must contain at least one character');\n }\n state.anchor = state.input.slice(_position, state.position);\n return true;\n}\nfunction readAlias(state) {\n var _position, alias, len = state.length, input = state.input, ch;\n ch = state.input.charCodeAt(state.position);\n if (0x2A !== ch) {\n return false;\n }\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n if (state.position <= _position) {\n throwError(state, 'name of an alias node must contain at least one character');\n state.position = _position + 1;\n }\n alias = state.input.slice(_position, state.position);\n if (!state.anchorMap.hasOwnProperty(alias)) {\n throwError(state, 'unidentified alias \"' + alias + '\"');\n if (state.position <= _position) {\n state.position = _position + 1;\n }\n }\n state.result = ast.newAnchorRef(alias, _position, state.position, state.anchorMap[alias]);\n skipSeparationSpace(state, true, -1);\n return true;\n}\nfunction composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\n var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, type, flowIndent, blockIndent, _result;\n state.tag = null;\n state.anchor = null;\n state.kind = null;\n state.result = null;\n allowBlockStyles = allowBlockScalars = allowBlockCollections =\n CONTEXT_BLOCK_OUT === nodeContext ||\n CONTEXT_BLOCK_IN === nodeContext;\n if (allowToSeek) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n }\n else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n }\n else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n }\n var tagStart = state.position;\n var tagColumn = state.position - state.lineStart;\n if (1 === indentStatus) {\n while (readTagProperty(state) || readAnchorProperty(state)) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n allowBlockCollections = allowBlockStyles;\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n }\n else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n }\n else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n else {\n allowBlockCollections = false;\n }\n }\n }\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact;\n }\n if (1 === indentStatus || CONTEXT_BLOCK_OUT === nodeContext) {\n if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n flowIndent = parentIndent;\n }\n else {\n flowIndent = parentIndent + 1;\n }\n blockIndent = state.position - state.lineStart;\n if (1 === indentStatus) {\n if (allowBlockCollections &&\n (readBlockSequence(state, blockIndent) ||\n readBlockMapping(state, blockIndent, flowIndent)) ||\n readFlowCollection(state, flowIndent)) {\n hasContent = true;\n }\n else {\n if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\n readSingleQuotedScalar(state, flowIndent) ||\n readDoubleQuotedScalar(state, flowIndent)) {\n hasContent = true;\n }\n else if (readAlias(state)) {\n hasContent = true;\n if (null !== state.tag || null !== state.anchor) {\n throwError(state, 'alias node should not have any properties');\n }\n }\n else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n hasContent = true;\n if (null === state.tag) {\n state.tag = '?';\n }\n }\n if (null !== state.anchor) {\n state.anchorMap[state.anchor] = state.result;\n state.result.anchorId = state.anchor;\n }\n }\n }\n else if (0 === indentStatus) {\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n }\n }\n if (null !== state.tag && '!' !== state.tag) {\n if (state.tag == \"!include\") {\n if (!state.result) {\n state.result = ast.newScalar();\n state.result.startPosition = state.position;\n state.result.endPosition = state.position;\n throwError(state, \"!include without value\");\n }\n state.result.kind = ast.Kind.INCLUDE_REF;\n }\n else if ('?' === state.tag) {\n for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {\n type = state.implicitTypes[typeIndex];\n var vl = state.result['value'];\n if (type.resolve(vl)) {\n state.result.valueObject = type.construct(state.result['value']);\n state.tag = type.tag;\n if (null !== state.anchor) {\n state.result.anchorId = state.anchor;\n state.anchorMap[state.anchor] = state.result;\n }\n break;\n }\n }\n }\n else if (_hasOwnProperty.call(state.typeMap, state.tag)) {\n type = state.typeMap[state.tag];\n if (null !== state.result && type.kind !== state.kind) {\n throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n }\n if (!type.resolve(state.result)) {\n throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n }\n else {\n state.result = type.construct(state.result);\n if (null !== state.anchor) {\n state.result.anchorId = state.anchor;\n state.anchorMap[state.anchor] = state.result;\n }\n }\n }\n else {\n throwErrorFromPosition(state, tagStart, 'unknown tag <' + state.tag + '>', false, true);\n }\n }\n return null !== state.tag || null !== state.anchor || hasContent;\n}\nfunction readDocument(state) {\n var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch;\n state.version = null;\n state.checkLineBreaks = state.legacy;\n state.tagMap = {};\n state.anchorMap = {};\n while (0 !== (ch = state.input.charCodeAt(state.position))) {\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n if (state.lineIndent > 0 || 0x25 !== ch) {\n break;\n }\n hasDirectives = true;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n while (0 !== ch && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n directiveName = state.input.slice(_position, state.position);\n directiveArgs = [];\n if (directiveName.length < 1) {\n throwError(state, 'directive name must not be less than one character in length');\n }\n while (0 !== ch) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n if (0x23 === ch) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (0 !== ch && !is_EOL(ch));\n break;\n }\n if (is_EOL(ch)) {\n break;\n }\n _position = state.position;\n while (0 !== ch && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n directiveArgs.push(state.input.slice(_position, state.position));\n }\n if (0 !== ch) {\n readLineBreak(state);\n }\n if (_hasOwnProperty.call(directiveHandlers, directiveName)) {\n directiveHandlers[directiveName](state, directiveName, directiveArgs);\n }\n else {\n throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n state.position++;\n }\n }\n skipSeparationSpace(state, true, -1);\n if (0 === state.lineIndent &&\n 0x2D === state.input.charCodeAt(state.position) &&\n 0x2D === state.input.charCodeAt(state.position + 1) &&\n 0x2D === state.input.charCodeAt(state.position + 2)) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n else if (hasDirectives) {\n throwError(state, 'directives end mark is expected');\n }\n composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n skipSeparationSpace(state, true, -1);\n if (state.checkLineBreaks &&\n PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n }\n state.documents.push(state.result);\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n if (0x2E === state.input.charCodeAt(state.position)) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n return;\n }\n if (state.position < (state.length - 1)) {\n throwError(state, 'end of the stream or a document separator is expected');\n }\n else {\n return;\n }\n}\nfunction loadDocuments(input, options) {\n input = String(input);\n options = options || {};\n var inputLength = input.length;\n if (inputLength !== 0) {\n if (0x0A !== input.charCodeAt(inputLength - 1) &&\n 0x0D !== input.charCodeAt(inputLength - 1)) {\n input += '\\n';\n }\n if (input.charCodeAt(0) === 0xFEFF) {\n input = input.slice(1);\n }\n }\n var state = new State(input, options);\n state.input += '\\0';\n while (0x20 === state.input.charCodeAt(state.position)) {\n state.lineIndent += 1;\n state.position += 1;\n }\n while (state.position < (state.length - 1)) {\n var q = state.position;\n readDocument(state);\n if (state.position <= q) {\n for (; state.position < state.length - 1; state.position++) {\n var c = state.input.charAt(state.position);\n if (c == '\\n') {\n break;\n }\n }\n }\n }\n var documents = state.documents;\n var docsCount = documents.length;\n if (docsCount > 0) {\n documents[docsCount - 1].endPosition = inputLength;\n }\n for (var _i = 0, documents_1 = documents; _i < documents_1.length; _i++) {\n var x = documents_1[_i];\n x.errors = state.errors;\n if (x.startPosition > x.endPosition) {\n x.startPosition = x.endPosition;\n }\n }\n return documents;\n}\nfunction loadAll(input, iterator, options) {\n if (options === void 0) { options = {}; }\n var documents = loadDocuments(input, options), index, length;\n for (index = 0, length = documents.length; index < length; index += 1) {\n iterator(documents[index]);\n }\n}\nexports.loadAll = loadAll;\nfunction load(input, options) {\n if (options === void 0) { options = {}; }\n var documents = loadDocuments(input, options), index, length;\n if (0 === documents.length) {\n return undefined;\n }\n else if (1 === documents.length) {\n return documents[0];\n }\n var e = new YAMLException('expected a single document in the stream, but found more');\n e.mark = new Mark(\"\", \"\", 0, 0, 0);\n e.mark.position = documents[0].endPosition;\n documents[0].errors.push(e);\n return documents[0];\n}\nexports.load = load;\nfunction safeLoadAll(input, output, options) {\n if (options === void 0) { options = {}; }\n loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n}\nexports.safeLoadAll = safeLoadAll;\nfunction safeLoad(input, options) {\n if (options === void 0) { options = {}; }\n return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n}\nexports.safeLoad = safeLoad;\nmodule.exports.loadAll = loadAll;\nmodule.exports.load = load;\nmodule.exports.safeLoadAll = safeLoadAll;\nmodule.exports.safeLoad = safeLoad;\n//# sourceMappingURL=loader.js.map","'use strict';\nvar common = require(\"./common\");\nvar Mark = (function () {\n function Mark(name, buffer, position, line, column) {\n this.name = name;\n this.buffer = buffer;\n this.position = position;\n this.line = line;\n this.column = column;\n }\n Mark.prototype.getSnippet = function (indent, maxLength) {\n if (indent === void 0) { indent = 0; }\n if (maxLength === void 0) { maxLength = 75; }\n var head, start, tail, end, snippet;\n if (!this.buffer) {\n return null;\n }\n indent = indent || 4;\n maxLength = maxLength || 75;\n head = '';\n start = this.position;\n while (start > 0 && -1 === '\\x00\\r\\n\\x85\\u2028\\u2029'.indexOf(this.buffer.charAt(start - 1))) {\n start -= 1;\n if (this.position - start > (maxLength / 2 - 1)) {\n head = ' ... ';\n start += 5;\n break;\n }\n }\n tail = '';\n end = this.position;\n while (end < this.buffer.length && -1 === '\\x00\\r\\n\\x85\\u2028\\u2029'.indexOf(this.buffer.charAt(end))) {\n end += 1;\n if (end - this.position > (maxLength / 2 - 1)) {\n tail = ' ... ';\n end -= 5;\n break;\n }\n }\n snippet = this.buffer.slice(start, end);\n return common.repeat(' ', indent) + head + snippet + tail + '\\n' +\n common.repeat(' ', indent + this.position - start + head.length) + '^';\n };\n Mark.prototype.toString = function (compact) {\n if (compact === void 0) { compact = true; }\n var snippet, where = '';\n if (this.name) {\n where += 'in \"' + this.name + '\" ';\n }\n where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1);\n if (!compact) {\n snippet = this.getSnippet();\n if (snippet) {\n where += ':\\n' + snippet;\n }\n }\n return where;\n };\n return Mark;\n}());\nmodule.exports = Mark;\n//# sourceMappingURL=mark.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction parseYamlBoolean(input) {\n if ([\"true\", \"True\", \"TRUE\"].lastIndexOf(input) >= 0) {\n return true;\n }\n else if ([\"false\", \"False\", \"FALSE\"].lastIndexOf(input) >= 0) {\n return false;\n }\n throw \"Invalid boolean \\\"\" + input + \"\\\"\";\n}\nexports.parseYamlBoolean = parseYamlBoolean;\nfunction safeParseYamlInteger(input) {\n if (input.lastIndexOf('0o', 0) === 0) {\n return parseInt(input.substring(2), 8);\n }\n return parseInt(input);\n}\nfunction parseYamlInteger(input) {\n var result = safeParseYamlInteger(input);\n if (isNaN(result)) {\n throw \"Invalid integer \\\"\" + input + \"\\\"\";\n }\n return result;\n}\nexports.parseYamlInteger = parseYamlInteger;\nfunction parseYamlFloat(input) {\n if ([\".nan\", \".NaN\", \".NAN\"].lastIndexOf(input) >= 0) {\n return NaN;\n }\n var infinity = /^([-+])?(?:\\.inf|\\.Inf|\\.INF)$/;\n var match = infinity.exec(input);\n if (match) {\n return (match[1] === '-') ? -Infinity : Infinity;\n }\n var result = parseFloat(input);\n if (!isNaN(result)) {\n return result;\n }\n throw \"Invalid float \\\"\" + input + \"\\\"\";\n}\nexports.parseYamlFloat = parseYamlFloat;\nvar ScalarType;\n(function (ScalarType) {\n ScalarType[ScalarType[\"null\"] = 0] = \"null\";\n ScalarType[ScalarType[\"bool\"] = 1] = \"bool\";\n ScalarType[ScalarType[\"int\"] = 2] = \"int\";\n ScalarType[ScalarType[\"float\"] = 3] = \"float\";\n ScalarType[ScalarType[\"string\"] = 4] = \"string\";\n})(ScalarType = exports.ScalarType || (exports.ScalarType = {}));\nfunction determineScalarType(node) {\n if (node === undefined) {\n return ScalarType.null;\n }\n if (node.doubleQuoted || !node.plainScalar || node['singleQuoted']) {\n return ScalarType.string;\n }\n var value = node.value;\n if ([\"null\", \"Null\", \"NULL\", \"~\", ''].indexOf(value) >= 0) {\n return ScalarType.null;\n }\n if (value === null || value === undefined) {\n return ScalarType.null;\n }\n if ([\"true\", \"True\", \"TRUE\", \"false\", \"False\", \"FALSE\"].indexOf(value) >= 0) {\n return ScalarType.bool;\n }\n var base10 = /^[-+]?[0-9]+$/;\n var base8 = /^0o[0-7]+$/;\n var base16 = /^0x[0-9a-fA-F]+$/;\n if (base10.test(value) || base8.test(value) || base16.test(value)) {\n return ScalarType.int;\n }\n var float = /^[-+]?(\\.[0-9]+|[0-9]+(\\.[0-9]*)?)([eE][-+]?[0-9]+)?$/;\n var infinity = /^[-+]?(\\.inf|\\.Inf|\\.INF)$/;\n if (float.test(value) || infinity.test(value) || [\".nan\", \".NaN\", \".NAN\"].indexOf(value) >= 0) {\n return ScalarType.float;\n }\n return ScalarType.string;\n}\nexports.determineScalarType = determineScalarType;\n//# sourceMappingURL=scalarInference.js.map","'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar common = require(\"./common\");\nvar YAMLException = require(\"./exception\");\nvar type_1 = require(\"./type\");\nfunction compileList(schema, name, result) {\n var exclude = [];\n schema.include.forEach(function (includedSchema) {\n result = compileList(includedSchema, name, result);\n });\n schema[name].forEach(function (currentType) {\n result.forEach(function (previousType, previousIndex) {\n if (previousType.tag === currentType.tag) {\n exclude.push(previousIndex);\n }\n });\n result.push(currentType);\n });\n return result.filter(function (type, index) {\n return -1 === exclude.indexOf(index);\n });\n}\nfunction compileMap() {\n var result = {}, index, length;\n function collectType(type) {\n result[type.tag] = type;\n }\n for (index = 0, length = arguments.length; index < length; index += 1) {\n arguments[index].forEach(collectType);\n }\n return result;\n}\nvar Schema = (function () {\n function Schema(definition) {\n this.include = definition.include || [];\n this.implicit = definition.implicit || [];\n this.explicit = definition.explicit || [];\n this.implicit.forEach(function (type) {\n if (type.loadKind && 'scalar' !== type.loadKind) {\n throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n }\n });\n this.compiledImplicit = compileList(this, 'implicit', []);\n this.compiledExplicit = compileList(this, 'explicit', []);\n this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit);\n }\n Schema.DEFAULT = null;\n Schema.create = function createSchema() {\n var schemas, types;\n switch (arguments.length) {\n case 1:\n schemas = Schema.DEFAULT;\n types = arguments[0];\n break;\n case 2:\n schemas = arguments[0];\n types = arguments[1];\n break;\n default:\n throw new YAMLException('Wrong number of arguments for Schema.create function');\n }\n schemas = common.toArray(schemas);\n types = common.toArray(types);\n if (!schemas.every(function (schema) { return schema instanceof Schema; })) {\n throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.');\n }\n if (!types.every(function (type) { return type instanceof type_1.Type; })) {\n throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n return new Schema({\n include: schemas,\n explicit: types\n });\n };\n return Schema;\n}());\nexports.Schema = Schema;\n//# sourceMappingURL=schema.js.map","'use strict';\nvar schema_1 = require(\"../schema\");\nmodule.exports = new schema_1.Schema({\n include: [\n require('./json')\n ]\n});\n//# sourceMappingURL=core.js.map","'use strict';\nvar schema_1 = require(\"../schema\");\nvar schema = new schema_1.Schema({\n include: [\n require('./default_safe')\n ],\n explicit: [\n require('../type/js/undefined'),\n require('../type/js/regexp')\n ]\n});\nschema_1.Schema.DEFAULT = schema;\nmodule.exports = schema;\n//# sourceMappingURL=default_full.js.map","'use strict';\nvar schema_1 = require(\"../schema\");\nvar schema = new schema_1.Schema({\n include: [\n require('./core')\n ],\n implicit: [\n require('../type/timestamp'),\n require('../type/merge')\n ],\n explicit: [\n require('../type/binary'),\n require('../type/omap'),\n require('../type/pairs'),\n require('../type/set')\n ]\n});\nmodule.exports = schema;\n//# sourceMappingURL=default_safe.js.map","'use strict';\nvar schema_1 = require(\"../schema\");\nmodule.exports = new schema_1.Schema({\n explicit: [\n require('../type/str'),\n require('../type/seq'),\n require('../type/map')\n ]\n});\n//# sourceMappingURL=failsafe.js.map","'use strict';\nvar schema_1 = require(\"../schema\");\nmodule.exports = new schema_1.Schema({\n include: [\n require('./failsafe')\n ],\n implicit: [\n require('../type/null'),\n require('../type/bool'),\n require('../type/int'),\n require('../type/float')\n ]\n});\n//# sourceMappingURL=json.js.map","'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar YAMLException = require(\"./exception\");\nvar TYPE_CONSTRUCTOR_OPTIONS = [\n 'kind',\n 'resolve',\n 'construct',\n 'instanceOf',\n 'predicate',\n 'represent',\n 'defaultStyle',\n 'styleAliases'\n];\nvar YAML_NODE_KINDS = [\n 'scalar',\n 'sequence',\n 'mapping'\n];\nfunction compileStyleAliases(map) {\n var result = {};\n if (null !== map) {\n Object.keys(map).forEach(function (style) {\n map[style].forEach(function (alias) {\n result[String(alias)] = style;\n });\n });\n }\n return result;\n}\nvar Type = (function () {\n function Type(tag, options) {\n options = options || {};\n Object.keys(options).forEach(function (name) {\n if (-1 === TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)) {\n throw new YAMLException('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n }\n });\n this.tag = tag;\n this.kind = options['kind'] || null;\n this.resolve = options['resolve'] || function () { return true; };\n this.construct = options['construct'] || function (data) { return data; };\n this.instanceOf = options['instanceOf'] || null;\n this.predicate = options['predicate'] || null;\n this.represent = options['represent'] || null;\n this.defaultStyle = options['defaultStyle'] || null;\n this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\n if (-1 === YAML_NODE_KINDS.indexOf(this.kind)) {\n throw new YAMLException('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n }\n }\n return Type;\n}());\nexports.Type = Type;\n//# sourceMappingURL=type.js.map","'use strict';\nvar NodeBuffer = require('buffer').Buffer;\nvar type_1 = require(\"../type\");\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r';\nfunction resolveYamlBinary(data) {\n if (null === data) {\n return false;\n }\n var code, idx, bitlen = 0, len = 0, max = data.length, map = BASE64_MAP;\n for (idx = 0; idx < max; idx++) {\n code = map.indexOf(data.charAt(idx));\n if (code > 64) {\n continue;\n }\n if (code < 0) {\n return false;\n }\n bitlen += 6;\n }\n return (bitlen % 8) === 0;\n}\nfunction constructYamlBinary(data) {\n var code, idx, tailbits, input = data.replace(/[\\r\\n=]/g, ''), max = input.length, map = BASE64_MAP, bits = 0, result = [];\n for (idx = 0; idx < max; idx++) {\n if ((idx % 4 === 0) && idx) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n }\n bits = (bits << 6) | map.indexOf(input.charAt(idx));\n }\n tailbits = (max % 4) * 6;\n if (tailbits === 0) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n }\n else if (tailbits === 18) {\n result.push((bits >> 10) & 0xFF);\n result.push((bits >> 2) & 0xFF);\n }\n else if (tailbits === 12) {\n result.push((bits >> 4) & 0xFF);\n }\n if (NodeBuffer) {\n return new NodeBuffer(result);\n }\n return result;\n}\nfunction representYamlBinary(object) {\n var result = '', bits = 0, idx, tail, max = object.length, map = BASE64_MAP;\n for (idx = 0; idx < max; idx++) {\n if ((idx % 3 === 0) && idx) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n }\n bits = (bits << 8) + object[idx];\n }\n tail = max % 3;\n if (tail === 0) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n }\n else if (tail === 2) {\n result += map[(bits >> 10) & 0x3F];\n result += map[(bits >> 4) & 0x3F];\n result += map[(bits << 2) & 0x3F];\n result += map[64];\n }\n else if (tail === 1) {\n result += map[(bits >> 2) & 0x3F];\n result += map[(bits << 4) & 0x3F];\n result += map[64];\n result += map[64];\n }\n return result;\n}\nfunction isBinary(object) {\n return NodeBuffer && NodeBuffer.isBuffer(object);\n}\nmodule.exports = new type_1.Type('tag:yaml.org,2002:binary', {\n kind: 'scalar',\n resolve: resolveYamlBinary,\n construct: constructYamlBinary,\n predicate: isBinary,\n represent: representYamlBinary\n});\n//# sourceMappingURL=binary.js.map","\"use strict\";\n'use strict';\nvar type_1 = require(\"../type\");\nfunction resolveYamlBoolean(data) {\n if (null === data) {\n return false;\n }\n var max = data.length;\n return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\n (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\n}\nfunction constructYamlBoolean(data) {\n return data === 'true' ||\n data === 'True' ||\n data === 'TRUE';\n}\nfunction isBoolean(object) {\n return '[object Boolean]' === Object.prototype.toString.call(object);\n}\nmodule.exports = new type_1.Type('tag:yaml.org,2002:bool', {\n kind: 'scalar',\n resolve: resolveYamlBoolean,\n construct: constructYamlBoolean,\n predicate: isBoolean,\n represent: {\n lowercase: function (object) { return object ? 'true' : 'false'; },\n uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\n camelcase: function (object) { return object ? 'True' : 'False'; }\n },\n defaultStyle: 'lowercase'\n});\n//# sourceMappingURL=bool.js.map","'use strict';\nvar common = require(\"../common\");\nvar type_1 = require(\"../type\");\nvar YAML_FLOAT_PATTERN = new RegExp('^(?:[-+]?(?:[0-9][0-9_]*)\\\\.[0-9_]*(?:[eE][-+][0-9]+)?' +\n '|\\\\.[0-9_]+(?:[eE][-+][0-9]+)?' +\n '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*' +\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n '|\\\\.(?:nan|NaN|NAN))$');\nfunction resolveYamlFloat(data) {\n if (null === data) {\n return false;\n }\n var value, sign, base, digits;\n if (!YAML_FLOAT_PATTERN.test(data)) {\n return false;\n }\n return true;\n}\nfunction constructYamlFloat(data) {\n var value, sign, base, digits;\n value = data.replace(/_/g, '').toLowerCase();\n sign = '-' === value[0] ? -1 : 1;\n digits = [];\n if (0 <= '+-'.indexOf(value[0])) {\n value = value.slice(1);\n }\n if ('.inf' === value) {\n return (1 === sign) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n }\n else if ('.nan' === value) {\n return NaN;\n }\n else if (0 <= value.indexOf(':')) {\n value.split(':').forEach(function (v) {\n digits.unshift(parseFloat(v, 10));\n });\n value = 0.0;\n base = 1;\n digits.forEach(function (d) {\n value += d * base;\n base *= 60;\n });\n return sign * value;\n }\n return sign * parseFloat(value, 10);\n}\nfunction representYamlFloat(object, style) {\n if (isNaN(object)) {\n switch (style) {\n case 'lowercase':\n return '.nan';\n case 'uppercase':\n return '.NAN';\n case 'camelcase':\n return '.NaN';\n }\n }\n else if (Number.POSITIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase':\n return '.inf';\n case 'uppercase':\n return '.INF';\n case 'camelcase':\n return '.Inf';\n }\n }\n else if (Number.NEGATIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase':\n return '-.inf';\n case 'uppercase':\n return '-.INF';\n case 'camelcase':\n return '-.Inf';\n }\n }\n else if (common.isNegativeZero(object)) {\n return '-0.0';\n }\n return object.toString(10);\n}\nfunction isFloat(object) {\n return ('[object Number]' === Object.prototype.toString.call(object)) &&\n (0 !== object % 1 || common.isNegativeZero(object));\n}\nmodule.exports = new type_1.Type('tag:yaml.org,2002:float', {\n kind: 'scalar',\n resolve: resolveYamlFloat,\n construct: constructYamlFloat,\n predicate: isFloat,\n represent: representYamlFloat,\n defaultStyle: 'lowercase'\n});\n//# sourceMappingURL=float.js.map","'use strict';\nvar common = require(\"../common\");\nvar type_1 = require(\"../type\");\nfunction isHexCode(c) {\n return ((0x30 <= c) && (c <= 0x39)) ||\n ((0x41 <= c) && (c <= 0x46)) ||\n ((0x61 <= c) && (c <= 0x66));\n}\nfunction isOctCode(c) {\n return ((0x30 <= c) && (c <= 0x37));\n}\nfunction isDecCode(c) {\n return ((0x30 <= c) && (c <= 0x39));\n}\nfunction resolveYamlInteger(data) {\n if (null === data) {\n return false;\n }\n var max = data.length, index = 0, hasDigits = false, ch;\n if (!max) {\n return false;\n }\n ch = data[index];\n if (ch === '-' || ch === '+') {\n ch = data[++index];\n }\n if (ch === '0') {\n if (index + 1 === max) {\n return true;\n }\n ch = data[++index];\n if (ch === 'b') {\n index++;\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') {\n continue;\n }\n if (ch !== '0' && ch !== '1') {\n return false;\n }\n hasDigits = true;\n }\n return hasDigits;\n }\n if (ch === 'x') {\n index++;\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') {\n continue;\n }\n if (!isHexCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n return hasDigits;\n }\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') {\n continue;\n }\n if (!isOctCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n return hasDigits;\n }\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') {\n continue;\n }\n if (ch === ':') {\n break;\n }\n if (!isDecCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n if (!hasDigits) {\n return false;\n }\n if (ch !== ':') {\n return true;\n }\n return /^(:[0-5]?[0-9])+$/.test(data.slice(index));\n}\nfunction constructYamlInteger(data) {\n var value = data, sign = 1, ch, base, digits = [];\n if (value.indexOf('_') !== -1) {\n value = value.replace(/_/g, '');\n }\n ch = value[0];\n if (ch === '-' || ch === '+') {\n if (ch === '-') {\n sign = -1;\n }\n value = value.slice(1);\n ch = value[0];\n }\n if ('0' === value) {\n return 0;\n }\n if (ch === '0') {\n if (value[1] === 'b') {\n return sign * parseInt(value.slice(2), 2);\n }\n if (value[1] === 'x') {\n return sign * parseInt(value, 16);\n }\n return sign * parseInt(value, 8);\n }\n if (value.indexOf(':') !== -1) {\n value.split(':').forEach(function (v) {\n digits.unshift(parseInt(v, 10));\n });\n value = 0;\n base = 1;\n digits.forEach(function (d) {\n value += (d * base);\n base *= 60;\n });\n return sign * value;\n }\n return sign * parseInt(value, 10);\n}\nfunction isInteger(object) {\n return ('[object Number]' === Object.prototype.toString.call(object)) &&\n (0 === object % 1 && !common.isNegativeZero(object));\n}\nmodule.exports = new type_1.Type('tag:yaml.org,2002:int', {\n kind: 'scalar',\n resolve: resolveYamlInteger,\n construct: constructYamlInteger,\n predicate: isInteger,\n represent: {\n binary: function (object) { return '0b' + object.toString(2); },\n octal: function (object) { return '0' + object.toString(8); },\n decimal: function (object) { return object.toString(10); },\n hexadecimal: function (object) { return '0x' + object.toString(16).toUpperCase(); }\n },\n defaultStyle: 'decimal',\n styleAliases: {\n binary: [2, 'bin'],\n octal: [8, 'oct'],\n decimal: [10, 'dec'],\n hexadecimal: [16, 'hex']\n }\n});\n//# sourceMappingURL=int.js.map","'use strict';\nvar type_1 = require(\"../../type\");\nfunction resolveJavascriptRegExp(data) {\n if (null === data) {\n return false;\n }\n if (0 === data.length) {\n return false;\n }\n var regexp = data, tail = /\\/([gim]*)$/.exec(data), modifiers = '';\n if ('/' === regexp[0]) {\n if (tail) {\n modifiers = tail[1];\n }\n if (modifiers.length > 3) {\n return false;\n }\n if (regexp[regexp.length - modifiers.length - 1] !== '/') {\n return false;\n }\n regexp = regexp.slice(1, regexp.length - modifiers.length - 1);\n }\n try {\n var dummy = new RegExp(regexp, modifiers);\n return true;\n }\n catch (error) {\n return false;\n }\n}\nfunction constructJavascriptRegExp(data) {\n var regexp = data, tail = /\\/([gim]*)$/.exec(data), modifiers = '';\n if ('/' === regexp[0]) {\n if (tail) {\n modifiers = tail[1];\n }\n regexp = regexp.slice(1, regexp.length - modifiers.length - 1);\n }\n return new RegExp(regexp, modifiers);\n}\nfunction representJavascriptRegExp(object) {\n var result = '/' + object.source + '/';\n if (object.global) {\n result += 'g';\n }\n if (object.multiline) {\n result += 'm';\n }\n if (object.ignoreCase) {\n result += 'i';\n }\n return result;\n}\nfunction isRegExp(object) {\n return '[object RegExp]' === Object.prototype.toString.call(object);\n}\nmodule.exports = new type_1.Type('tag:yaml.org,2002:js/regexp', {\n kind: 'scalar',\n resolve: resolveJavascriptRegExp,\n construct: constructJavascriptRegExp,\n predicate: isRegExp,\n represent: representJavascriptRegExp\n});\n//# sourceMappingURL=regexp.js.map","'use strict';\nvar type_1 = require(\"../../type\");\nfunction resolveJavascriptUndefined() {\n return true;\n}\nfunction constructJavascriptUndefined() {\n return undefined;\n}\nfunction representJavascriptUndefined() {\n return '';\n}\nfunction isUndefined(object) {\n return 'undefined' === typeof object;\n}\nmodule.exports = new type_1.Type('tag:yaml.org,2002:js/undefined', {\n kind: 'scalar',\n resolve: resolveJavascriptUndefined,\n construct: constructJavascriptUndefined,\n predicate: isUndefined,\n represent: representJavascriptUndefined\n});\n//# sourceMappingURL=undefined.js.map","'use strict';\nvar type_1 = require(\"../type\");\nmodule.exports = new type_1.Type('tag:yaml.org,2002:map', {\n kind: 'mapping',\n construct: function (data) { return null !== data ? data : {}; }\n});\n//# sourceMappingURL=map.js.map","'use strict';\nvar type_1 = require(\"../type\");\nfunction resolveYamlMerge(data) {\n return '<<' === data || null === data;\n}\nmodule.exports = new type_1.Type('tag:yaml.org,2002:merge', {\n kind: 'scalar',\n resolve: resolveYamlMerge\n});\n//# sourceMappingURL=merge.js.map","'use strict';\nvar type_1 = require(\"../type\");\nfunction resolveYamlNull(data) {\n if (null === data) {\n return true;\n }\n var max = data.length;\n return (max === 1 && data === '~') ||\n (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\n}\nfunction constructYamlNull() {\n return null;\n}\nfunction isNull(object) {\n return null === object;\n}\nmodule.exports = new type_1.Type('tag:yaml.org,2002:null', {\n kind: 'scalar',\n resolve: resolveYamlNull,\n construct: constructYamlNull,\n predicate: isNull,\n represent: {\n canonical: function () { return '~'; },\n lowercase: function () { return 'null'; },\n uppercase: function () { return 'NULL'; },\n camelcase: function () { return 'Null'; }\n },\n defaultStyle: 'lowercase'\n});\n//# sourceMappingURL=null.js.map","'use strict';\nvar type_1 = require(\"../type\");\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\nvar _toString = Object.prototype.toString;\nfunction resolveYamlOmap(data) {\n if (null === data) {\n return true;\n }\n var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data;\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n pairHasKey = false;\n if ('[object Object]' !== _toString.call(pair)) {\n return false;\n }\n for (pairKey in pair) {\n if (_hasOwnProperty.call(pair, pairKey)) {\n if (!pairHasKey) {\n pairHasKey = true;\n }\n else {\n return false;\n }\n }\n }\n if (!pairHasKey) {\n return false;\n }\n if (-1 === objectKeys.indexOf(pairKey)) {\n objectKeys.push(pairKey);\n }\n else {\n return false;\n }\n }\n return true;\n}\nfunction constructYamlOmap(data) {\n return null !== data ? data : [];\n}\nmodule.exports = new type_1.Type('tag:yaml.org,2002:omap', {\n kind: 'sequence',\n resolve: resolveYamlOmap,\n construct: constructYamlOmap\n});\n//# sourceMappingURL=omap.js.map","'use strict';\nvar type_1 = require(\"../type\");\nvar ast = require(\"../yamlAST\");\nvar _toString = Object.prototype.toString;\nfunction resolveYamlPairs(data) {\n if (null === data) {\n return true;\n }\n if (data.kind != ast.Kind.SEQ) {\n return false;\n }\n var index, length, pair, keys, result, object = data.items;\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n if ('[object Object]' !== _toString.call(pair)) {\n return false;\n }\n if (!Array.isArray(pair.mappings)) {\n return false;\n }\n if (1 !== pair.mappings.length) {\n return false;\n }\n }\n return true;\n}\nfunction constructYamlPairs(data) {\n if (null === data || !Array.isArray(data.items)) {\n return [];\n }\n var index, length, keys, result, object = data.items;\n result = ast.newItems();\n result.parent = data.parent;\n result.startPosition = data.startPosition;\n result.endPosition = data.endPosition;\n for (index = 0, length = object.length; index < length; index += 1) {\n var pair = object[index];\n var mapping = pair.mappings[0];\n var pairSeq = ast.newItems();\n pairSeq.parent = result;\n pairSeq.startPosition = mapping.key.startPosition;\n pairSeq.endPosition = mapping.value.startPosition;\n mapping.key.parent = pairSeq;\n mapping.value.parent = pairSeq;\n pairSeq.items = [mapping.key, mapping.value];\n result.items.push(pairSeq);\n }\n return result;\n}\nmodule.exports = new type_1.Type('tag:yaml.org,2002:pairs', {\n kind: 'sequence',\n resolve: resolveYamlPairs,\n construct: constructYamlPairs\n});\n//# sourceMappingURL=pairs.js.map","'use strict';\nvar type_1 = require(\"../type\");\nmodule.exports = new type_1.Type('tag:yaml.org,2002:seq', {\n kind: 'sequence',\n construct: function (data) { return null !== data ? data : []; }\n});\n//# sourceMappingURL=seq.js.map","'use strict';\nvar type_1 = require(\"../type\");\nvar ast = require(\"../yamlAST\");\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction resolveYamlSet(data) {\n if (null === data) {\n return true;\n }\n if (data.kind != ast.Kind.MAP) {\n return false;\n }\n return true;\n}\nfunction constructYamlSet(data) {\n return null !== data ? data : {};\n}\nmodule.exports = new type_1.Type('tag:yaml.org,2002:set', {\n kind: 'mapping',\n resolve: resolveYamlSet,\n construct: constructYamlSet\n});\n//# sourceMappingURL=set.js.map","'use strict';\nvar type_1 = require(\"../type\");\nmodule.exports = new type_1.Type('tag:yaml.org,2002:str', {\n kind: 'scalar',\n construct: function (data) { return null !== data ? data : ''; }\n});\n//# sourceMappingURL=str.js.map","'use strict';\nvar type_1 = require(\"../type\");\nvar YAML_TIMESTAMP_REGEXP = new RegExp('^([0-9][0-9][0-9][0-9])' +\n '-([0-9][0-9]?)' +\n '-([0-9][0-9]?)' +\n '(?:(?:[Tt]|[ \\\\t]+)' +\n '([0-9][0-9]?)' +\n ':([0-9][0-9])' +\n ':([0-9][0-9])' +\n '(?:\\\\.([0-9]*))?' +\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' +\n '(?::([0-9][0-9]))?))?)?$');\nfunction resolveYamlTimestamp(data) {\n if (null === data) {\n return false;\n }\n var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date;\n match = YAML_TIMESTAMP_REGEXP.exec(data);\n if (null === match) {\n return false;\n }\n return true;\n}\nfunction constructYamlTimestamp(data) {\n var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date;\n match = YAML_TIMESTAMP_REGEXP.exec(data);\n if (null === match) {\n throw new Error('Date resolve error');\n }\n year = +(match[1]);\n month = +(match[2]) - 1;\n day = +(match[3]);\n if (!match[4]) {\n return new Date(Date.UTC(year, month, day));\n }\n hour = +(match[4]);\n minute = +(match[5]);\n second = +(match[6]);\n if (match[7]) {\n fraction = match[7].slice(0, 3);\n while (fraction.length < 3) {\n fraction = fraction + '0';\n }\n fraction = +fraction;\n }\n if (match[9]) {\n tz_hour = +(match[10]);\n tz_minute = +(match[11] || 0);\n delta = (tz_hour * 60 + tz_minute) * 60000;\n if ('-' === match[9]) {\n delta = -delta;\n }\n }\n date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n if (delta) {\n date.setTime(date.getTime() - delta);\n }\n return date;\n}\nfunction representYamlTimestamp(object) {\n return object.toISOString();\n}\nmodule.exports = new type_1.Type('tag:yaml.org,2002:timestamp', {\n kind: 'scalar',\n resolve: resolveYamlTimestamp,\n construct: constructYamlTimestamp,\n instanceOf: Date,\n represent: representYamlTimestamp\n});\n//# sourceMappingURL=timestamp.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Kind;\n(function (Kind) {\n Kind[Kind[\"SCALAR\"] = 0] = \"SCALAR\";\n Kind[Kind[\"MAPPING\"] = 1] = \"MAPPING\";\n Kind[Kind[\"MAP\"] = 2] = \"MAP\";\n Kind[Kind[\"SEQ\"] = 3] = \"SEQ\";\n Kind[Kind[\"ANCHOR_REF\"] = 4] = \"ANCHOR_REF\";\n Kind[Kind[\"INCLUDE_REF\"] = 5] = \"INCLUDE_REF\";\n})(Kind = exports.Kind || (exports.Kind = {}));\nfunction newMapping(key, value) {\n var end = (value ? value.endPosition : key.endPosition + 1);\n var node = {\n key: key,\n value: value,\n startPosition: key.startPosition,\n endPosition: end,\n kind: Kind.MAPPING,\n parent: null,\n errors: []\n };\n return node;\n}\nexports.newMapping = newMapping;\nfunction newAnchorRef(key, start, end, value) {\n return {\n errors: [],\n referencesAnchor: key,\n value: value,\n startPosition: start,\n endPosition: end,\n kind: Kind.ANCHOR_REF,\n parent: null\n };\n}\nexports.newAnchorRef = newAnchorRef;\nfunction newScalar(v) {\n if (v === void 0) { v = \"\"; }\n var result = {\n errors: [],\n startPosition: -1,\n endPosition: -1,\n value: \"\" + v,\n kind: Kind.SCALAR,\n parent: null,\n doubleQuoted: false,\n rawValue: \"\" + v,\n };\n if (typeof v !== \"string\") {\n result.valueObject = v;\n }\n return result;\n}\nexports.newScalar = newScalar;\nfunction newItems() {\n return {\n errors: [],\n startPosition: -1,\n endPosition: -1,\n items: [],\n kind: Kind.SEQ,\n parent: null\n };\n}\nexports.newItems = newItems;\nfunction newSeq() {\n return newItems();\n}\nexports.newSeq = newSeq;\nfunction newMap(mappings) {\n return {\n errors: [],\n startPosition: -1,\n endPosition: -1,\n mappings: mappings ? mappings : [],\n kind: Kind.MAP,\n parent: null\n };\n}\nexports.newMap = newMap;\n//# sourceMappingURL=yamlAST.js.map","import path from 'path';\nimport * as core from '@actions/core';\nimport * as github from '@actions/github';\nimport { loadConfig } from '@redocly/openapi-core';\nimport { ParsedEventData, ParsedInputData } from './types';\n\nexport function parseInputData(): ParsedInputData {\n const redoclyOrgSlug = core.getInput('organization', { required: true });\n const redoclyProjectSlug = core.getInput('project', { required: true });\n const mountPath = core.getInput('mountPath', { required: true });\n const files = core.getInput('files', { required: true }).split(' ');\n\n const redoclyDomain =\n core.getInput('domain') || 'https://app.cloud.redocly.com';\n const maxExecutionTime = Number(core.getInput('maxExecutionTime')) || 1200;\n const defaultBranch = core.getInput('defaultBranch') || undefined;\n\n const absoluteFilePaths = files.map(_path =>\n path.join(process.env.GITHUB_WORKSPACE || '', _path),\n );\n\n return {\n redoclyOrgSlug,\n redoclyProjectSlug,\n mountPath,\n files: absoluteFilePaths,\n redoclyDomain,\n maxExecutionTime,\n defaultBranch,\n };\n}\n\nexport async function parseEventData(\n defaultBranchOverride?: string,\n): Promise {\n if (\n !(\n github.context.eventName === 'push' ||\n github.context.eventName === 'pull_request'\n )\n ) {\n throw new Error(\n 'Unsupported GitHub event type. Only \"push\" and \"pull_request\" events are supported.',\n );\n }\n\n if (github.context.eventName === 'pull_request') {\n const allowedActions = ['opened', 'synchronize', 'reopened'];\n\n if (\n !github.context.payload.action ||\n !allowedActions.includes(github.context.payload.action)\n ) {\n throw new Error(\n 'Unsupported GitHub event. Only \"opened\", \"synchronize\" and \"reopened\" actions are supported for pull requests.',\n );\n }\n }\n\n const namespace = github.context.payload?.repository?.owner?.login;\n const repository = github.context.payload?.repository?.name;\n\n if (!namespace || !repository) {\n throw new Error(\n 'Invalid GitHub event data. Can not get owner or repository name from the event payload.',\n );\n }\n\n const branch =\n github.context.payload.pull_request?.['head']?.['ref'] ||\n github.context.ref.replace('refs/heads/', '');\n\n if (!branch) {\n throw new Error(\n 'Invalid GitHub event data. Can not get branch from the event payload.',\n );\n }\n\n const defaultBranch: string | undefined =\n defaultBranchOverride ||\n github.context.payload?.repository?.default_branch ||\n github.context.payload?.repository?.master_branch;\n\n if (!defaultBranch) {\n throw new Error(\n 'Invalid GitHub event data. Can not get default branch from the event payload. You can use the \"defaultBranch\" input to set it manually.',\n );\n }\n\n const commitSha = getCommitSha();\n\n if (!commitSha) {\n throw new Error(\n 'Invalid GitHub event data. Can not get commit sha from the event payload.',\n );\n }\n\n const githubToken = core.getInput('githubToken');\n const octokit = github.getOctokit(githubToken);\n\n const { data: commitData } = await octokit.rest.repos.getCommit({\n owner: namespace,\n repo: repository,\n ref: commitSha,\n });\n\n if (!commitData.commit.author?.name || !commitData.commit.author?.email) {\n throw new Error(\n 'Invalid GitHub event data. Can not get author name or email from the event payload.',\n );\n }\n\n const commit: ParsedEventData['commit'] = {\n commitSha,\n commitMessage: commitData.commit.message,\n commitUrl: commitData.html_url,\n commitAuthor: `${commitData.commit.author?.name} <${commitData.commit.author?.email}>`,\n commitCreatedAt: commitData.commit.author?.date,\n };\n\n return {\n eventName: github.context.eventName,\n namespace,\n repository,\n branch,\n defaultBranch,\n commit,\n };\n}\n\nexport function getCommitSha(): string | undefined {\n if (github.context.eventName === 'push') {\n return github.context.payload.after;\n }\n\n if (github.context.eventName === 'pull_request') {\n return github.context.payload.pull_request?.head?.sha;\n }\n}\n\n// Returns parsed config from the root or default config if not found\nexport async function getRedoclyConfig(): ReturnType {\n const redoclyConfig = await loadConfig();\n\n return redoclyConfig;\n}\n","import * as core from '@actions/core';\n\nimport { handlePush } from '@redocly/cli/lib/reunite/commands/push';\nimport { handlePushStatus } from '@redocly/cli/lib/reunite/commands/push-status';\n\nimport { setCommitStatuses } from './set-commit-statuses';\nimport { getRedoclyConfig, parseEventData, parseInputData } from './helpers';\n\nimport { dependencies } from '../package.json';\n\nconst redoclyCliVersion = dependencies['@redocly/cli'];\n\nexport async function run(): Promise {\n try {\n const inputData = parseInputData();\n const ghEvent = await parseEventData(inputData.defaultBranch);\n\n console.debug('Parsed input data', inputData);\n console.debug('Parsed GitHub event', ghEvent);\n\n const config = await getRedoclyConfig();\n\n const pushData = await handlePush({\n argv: {\n domain: inputData.redoclyDomain,\n organization: inputData.redoclyOrgSlug,\n project: inputData.redoclyProjectSlug,\n 'mount-path': inputData.mountPath,\n files: inputData.files,\n 'max-execution-time': inputData.maxExecutionTime,\n namespace: ghEvent.namespace,\n repository: ghEvent.repository,\n branch: ghEvent.branch,\n 'default-branch': ghEvent.defaultBranch,\n message: ghEvent.commit.commitMessage,\n 'commit-sha': ghEvent.commit.commitSha,\n 'commit-url': ghEvent.commit.commitUrl,\n author: ghEvent.commit.commitAuthor,\n 'created-at': ghEvent.commit.commitCreatedAt,\n },\n config,\n version: redoclyCliVersion,\n });\n\n if (!pushData?.pushId) {\n throw new Error('Missing push ID');\n }\n\n const pushStatusData = await handlePushStatus({\n argv: {\n organization: inputData.redoclyOrgSlug,\n project: inputData.redoclyProjectSlug,\n pushId: pushData.pushId,\n domain: inputData.redoclyDomain,\n wait: true,\n 'continue-on-deploy-failures': true,\n 'max-execution-time': inputData.maxExecutionTime,\n onRetry: async lastResult => {\n try {\n await setCommitStatuses({\n commitStatuses: lastResult.commit.statuses,\n owner: ghEvent.namespace,\n repo: ghEvent.repository,\n commitId: ghEvent.commit.commitSha,\n });\n } catch (error: unknown) {\n core.error(\n `Failed to set commit statuses. Error: ${(error as Error)?.message}`,\n );\n }\n },\n },\n config,\n version: redoclyCliVersion,\n });\n\n if (!pushStatusData) {\n throw new Error('Missing push status data');\n }\n\n console.debug(\n 'Amount of final commit statuses to set',\n pushStatusData.commit.statuses.length,\n );\n\n await setCommitStatuses({\n commitStatuses: pushStatusData.commit.statuses,\n owner: ghEvent.namespace,\n repo: ghEvent.repository,\n commitId: ghEvent.commit.commitSha,\n });\n\n console.debug('Action finished successfully. Push ID:', pushData.pushId);\n\n core.setOutput('pushId', pushData.pushId);\n } catch (error) {\n if (error instanceof Error) core.setFailed(error.message);\n }\n}\n","import * as core from '@actions/core';\nimport * as github from '@actions/github';\nimport type { RestEndpointMethodTypes } from '@octokit/rest';\nimport { DeploymentStatus } from '@redocly/cli/lib/reunite/api/types';\nimport { PushStatusSummary } from '@redocly/cli/lib/reunite/commands/push-status';\n\nexport async function setCommitStatuses({\n commitStatuses,\n owner,\n repo,\n commitId,\n}: {\n commitStatuses: PushStatusSummary['commit']['statuses'];\n owner: string;\n repo: string;\n commitId: string;\n}): Promise {\n const githubToken = core.getInput('githubToken');\n const octokit = github.getOctokit(githubToken);\n\n if (commitStatuses?.length > 0) {\n // TBD: Should we add a concurrency limit here to avoid hitting rate limits?\n await Promise.all(\n commitStatuses.map(async status => {\n await octokit.rest.repos.createCommitStatus({\n owner,\n repo,\n sha: commitId,\n state: mapDeploymentStateToGithubCommitState(status.status),\n target_url: status.url,\n context: status.name,\n description: status.description,\n });\n }),\n );\n }\n}\n\nfunction mapDeploymentStateToGithubCommitState(\n state?: DeploymentStatus,\n): RestEndpointMethodTypes['repos']['createCommitStatus']['parameters']['state'] {\n switch (state) {\n case 'pending':\n case 'running':\n return 'pending';\n case 'success':\n return 'success';\n case 'failed':\n return 'error';\n default:\n throw new TypeError(`Unknown deployment state: ${state}`);\n }\n}\n","module.exports = require(\"assert\");","module.exports = require(\"async_hooks\");","module.exports = require(\"buffer\");","module.exports = require(\"child_process\");","module.exports = require(\"crypto\");","module.exports = require(\"events\");","module.exports = require(\"fs\");","module.exports = require(\"http\");","module.exports = require(\"https\");","module.exports = require(\"net\");","module.exports = require(\"node:assert\");","module.exports = require(\"node:async_hooks\");","module.exports = require(\"node:buffer\");","module.exports = require(\"node:console\");","module.exports = require(\"node:crypto\");","module.exports = require(\"node:diagnostics_channel\");","module.exports = require(\"node:dns\");","module.exports = require(\"node:events\");","module.exports = require(\"node:fs\");","module.exports = require(\"node:fs/promises\");","module.exports = require(\"node:http\");","module.exports = require(\"node:http2\");","module.exports = require(\"node:net\");","module.exports = require(\"node:os\");","module.exports = require(\"node:path\");","module.exports = require(\"node:perf_hooks\");","module.exports = require(\"node:querystring\");","module.exports = require(\"node:sqlite\");","module.exports = require(\"node:stream\");","module.exports = require(\"node:timers\");","module.exports = require(\"node:tls\");","module.exports = require(\"node:url\");","module.exports = require(\"node:util\");","module.exports = require(\"node:util/types\");","module.exports = require(\"node:worker_threads\");","module.exports = require(\"node:zlib\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"perf_hooks\");","module.exports = require(\"process\");","module.exports = require(\"readline\");","module.exports = require(\"stream\");","module.exports = require(\"string_decoder\");","module.exports = require(\"timers\");","module.exports = require(\"tls\");","module.exports = require(\"tty\");","module.exports = require(\"url\");","module.exports = require(\"util\");","module.exports = require(\"zlib\");","const tty = require(\"tty\")\n\nconst env = process.env\n\nconst isDisabled = \"NO_COLOR\" in env\nconst isForced = \"FORCE_COLOR\" in env\nconst isWindows = process.platform === \"win32\"\n\nconst isCompatibleTerminal =\n tty && tty.isatty(1) && env.TERM && env.TERM !== \"dumb\"\n\nconst isCI =\n \"CI\" in env &&\n (\"GITHUB_ACTIONS\" in env || \"GITLAB_CI\" in env || \"CIRCLECI\" in env)\n\nlet enabled =\n !isDisabled && (isForced || isWindows || isCompatibleTerminal || isCI)\n\nconst raw = (open, close, searchRegex, replaceValue) => (s) =>\n enabled\n ? open +\n (~(s += \"\").indexOf(close, 4) // skip opening \\x1b[\n ? s.replace(searchRegex, replaceValue)\n : s) +\n close\n : s\n\nconst init = (open, close) => {\n return raw(\n `\\x1b[${open}m`,\n `\\x1b[${close}m`,\n new RegExp(`\\\\x1b\\\\[${close}m`, \"g\"),\n `\\x1b[${open}m`\n )\n}\n\nexports.options = Object.defineProperty({}, \"enabled\", {\n get: () => enabled,\n set: (value) => (enabled = value),\n})\n\nexports.reset = init(0, 0)\nexports.bold = raw(\"\\x1b[1m\", \"\\x1b[22m\", /\\x1b\\[22m/g, \"\\x1b[22m\\x1b[1m\")\nexports.dim = raw(\"\\x1b[2m\", \"\\x1b[22m\", /\\x1b\\[22m/g, \"\\x1b[22m\\x1b[2m\")\nexports.italic = init(3, 23)\nexports.underline = init(4, 24)\nexports.inverse = init(7, 27)\nexports.hidden = init(8, 28)\nexports.strikethrough = init(9, 29)\nexports.black = init(30, 39)\nexports.red = init(31, 39)\nexports.green = init(32, 39)\nexports.yellow = init(33, 39)\nexports.blue = init(34, 39)\nexports.magenta = init(35, 39)\nexports.cyan = init(36, 39)\nexports.white = init(37, 39)\nexports.gray = init(90, 39)\nexports.bgBlack = init(40, 49)\nexports.bgRed = init(41, 49)\nexports.bgGreen = init(42, 49)\nexports.bgYellow = init(43, 49)\nexports.bgBlue = init(44, 49)\nexports.bgMagenta = init(45, 49)\nexports.bgCyan = init(46, 49)\nexports.bgWhite = init(47, 49)\nexports.blackBright = init(90, 39)\nexports.redBright = init(91, 39)\nexports.greenBright = init(92, 39)\nexports.yellowBright = init(93, 39)\nexports.blueBright = init(94, 39)\nexports.magentaBright = init(95, 39)\nexports.cyanBright = init(96, 39)\nexports.whiteBright = init(97, 39)\nexports.bgBlackBright = init(100, 49)\nexports.bgRedBright = init(101, 49)\nexports.bgGreenBright = init(102, 49)\nexports.bgYellowBright = init(103, 49)\nexports.bgBlueBright = init(104, 49)\nexports.bgMagentaBright = init(105, 49)\nexports.bgCyanBright = init(106, 49)\nexports.bgWhiteBright = init(107, 49)\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tvar threw = true;\n\ttry {\n\t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\tthrew = false;\n\t} finally {\n\t\tif(threw) delete __webpack_module_cache__[moduleId];\n\t}\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","\nif (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + \"/\";","/**\n * The entrypoint for the action.\n */\nimport { run } from './main';\n\n// eslint-disable-next-line @typescript-eslint/no-floating-promises\nrun();\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{ + "version": 3, + "sources": ["../node_modules/@actions/core/src/utils.ts", "../node_modules/@actions/core/src/command.ts", "../node_modules/@actions/core/src/file-command.ts", "../node_modules/@actions/http-client/src/proxy.ts", "../node_modules/tunnel/lib/tunnel.js", "../node_modules/tunnel/index.js", "../node_modules/undici/lib/core/symbols.js", "../node_modules/undici/lib/util/timers.js", "../node_modules/undici/lib/core/errors.js", "../node_modules/undici/lib/core/constants.js", "../node_modules/undici/lib/core/tree.js", "../node_modules/undici/lib/core/util.js", "../node_modules/undici/lib/util/stats.js", "../node_modules/undici/lib/core/diagnostics.js", "../node_modules/undici/lib/core/request.js", "../node_modules/undici/lib/handler/wrap-handler.js", "../node_modules/undici/lib/dispatcher/dispatcher.js", "../node_modules/undici/lib/handler/unwrap-handler.js", "../node_modules/undici/lib/dispatcher/dispatcher-base.js", "../node_modules/undici/lib/core/connect.js", "../node_modules/undici/lib/llhttp/utils.js", "../node_modules/undici/lib/llhttp/constants.js", "../node_modules/undici/lib/llhttp/llhttp-wasm.js", "../node_modules/undici/lib/llhttp/llhttp_simd-wasm.js", "../node_modules/undici/lib/web/fetch/constants.js", "../node_modules/undici/lib/web/fetch/global.js", "../node_modules/undici/lib/encoding/index.js", "../node_modules/undici/lib/web/infra/index.js", "../node_modules/undici/lib/web/fetch/data-url.js", "../node_modules/undici/lib/util/runtime-features.js", "../node_modules/undici/lib/web/webidl/index.js", "../node_modules/undici/lib/web/fetch/util.js", "../node_modules/undici/lib/web/fetch/formdata.js", "../node_modules/undici/lib/web/fetch/formdata-parser.js", "../node_modules/undici/lib/util/promise.js", "../node_modules/undici/lib/web/fetch/body.js", "../node_modules/undici/lib/dispatcher/client-h1.js", "../node_modules/undici/lib/dispatcher/client-h2.js", "../node_modules/undici/lib/dispatcher/client.js", "../node_modules/undici/lib/dispatcher/fixed-queue.js", "../node_modules/undici/lib/dispatcher/pool-base.js", "../node_modules/undici/lib/dispatcher/pool.js", "../node_modules/undici/lib/dispatcher/balanced-pool.js", "../node_modules/undici/lib/dispatcher/round-robin-pool.js", "../node_modules/undici/lib/dispatcher/agent.js", "../node_modules/undici/lib/core/socks5-utils.js", "../node_modules/undici/lib/core/socks5-client.js", "../node_modules/undici/lib/dispatcher/socks5-proxy-agent.js", "../node_modules/undici/lib/dispatcher/proxy-agent.js", "../node_modules/undici/lib/dispatcher/env-http-proxy-agent.js", "../node_modules/undici/lib/handler/retry-handler.js", "../node_modules/undici/lib/dispatcher/retry-agent.js", "../node_modules/undici/lib/dispatcher/h2c-client.js", "../node_modules/undici/lib/api/readable.js", "../node_modules/undici/lib/api/api-request.js", "../node_modules/undici/lib/api/abort-signal.js", "../node_modules/undici/lib/api/api-stream.js", "../node_modules/undici/lib/api/api-pipeline.js", "../node_modules/undici/lib/api/api-upgrade.js", "../node_modules/undici/lib/api/api-connect.js", "../node_modules/undici/lib/api/index.js", "../node_modules/undici/lib/mock/mock-errors.js", "../node_modules/undici/lib/mock/mock-symbols.js", "../node_modules/undici/lib/mock/mock-utils.js", "../node_modules/undici/lib/mock/mock-interceptor.js", "../node_modules/undici/lib/mock/mock-client.js", "../node_modules/undici/lib/mock/mock-call-history.js", "../node_modules/undici/lib/mock/mock-pool.js", "../node_modules/undici/lib/mock/pending-interceptors-formatter.js", "../node_modules/undici/lib/mock/mock-agent.js", "../node_modules/undici/lib/mock/snapshot-utils.js", "../node_modules/undici/lib/mock/snapshot-recorder.js", "../node_modules/undici/lib/mock/snapshot-agent.js", "../node_modules/undici/lib/global.js", "../node_modules/undici/lib/handler/decorator-handler.js", "../node_modules/undici/lib/handler/redirect-handler.js", "../node_modules/undici/lib/interceptor/redirect.js", "../node_modules/undici/lib/interceptor/response-error.js", "../node_modules/undici/lib/interceptor/retry.js", "../node_modules/undici/lib/interceptor/dump.js", "../node_modules/undici/lib/interceptor/dns.js", "../node_modules/undici/lib/util/cache.js", "../node_modules/undici/lib/util/date.js", "../node_modules/undici/lib/handler/cache-handler.js", "../node_modules/undici/lib/cache/memory-cache-store.js", "../node_modules/undici/lib/handler/cache-revalidation-handler.js", "../node_modules/undici/lib/interceptor/cache.js", "../node_modules/undici/lib/interceptor/decompress.js", "../node_modules/undici/lib/handler/deduplication-handler.js", "../node_modules/undici/lib/interceptor/deduplicate.js", "../node_modules/undici/lib/cache/sqlite-cache-store.js", "../node_modules/undici/lib/web/fetch/headers.js", "../node_modules/undici/lib/web/fetch/response.js", "../node_modules/undici/lib/web/fetch/request.js", "../node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js", "../node_modules/undici/lib/web/fetch/index.js", "../node_modules/undici/lib/web/cache/util.js", "../node_modules/undici/lib/web/cache/cache.js", "../node_modules/undici/lib/web/cache/cachestorage.js", "../node_modules/undici/lib/web/cookies/constants.js", "../node_modules/undici/lib/web/cookies/util.js", "../node_modules/undici/lib/web/cookies/parse.js", "../node_modules/undici/lib/web/cookies/index.js", "../node_modules/undici/lib/web/websocket/events.js", "../node_modules/undici/lib/web/websocket/constants.js", "../node_modules/undici/lib/web/websocket/util.js", "../node_modules/undici/lib/web/websocket/frame.js", "../node_modules/undici/lib/web/websocket/connection.js", "../node_modules/undici/lib/web/websocket/permessage-deflate.js", "../node_modules/undici/lib/web/websocket/receiver.js", "../node_modules/undici/lib/web/websocket/sender.js", "../node_modules/undici/lib/web/websocket/websocket.js", "../node_modules/undici/lib/web/websocket/stream/websocketerror.js", "../node_modules/undici/lib/web/websocket/stream/websocketstream.js", "../node_modules/undici/lib/web/eventsource/util.js", "../node_modules/undici/lib/web/eventsource/eventsource-stream.js", "../node_modules/undici/lib/web/eventsource/eventsource.js", "../node_modules/undici/index.js", "../node_modules/@actions/http-client/src/index.ts", "../node_modules/@actions/http-client/src/auth.ts", "../node_modules/@actions/core/src/oidc-utils.ts", "../node_modules/@actions/core/src/summary.ts", "../node_modules/@actions/core/src/path-utils.ts", "../node_modules/@actions/io/src/io-util.ts", "../node_modules/@actions/io/src/io.ts", "../node_modules/@actions/exec/src/toolrunner.ts", "../node_modules/@actions/exec/src/exec.ts", "../node_modules/@actions/core/src/platform.ts", "../node_modules/@actions/core/src/core.ts", "../node_modules/@actions/github/src/context.ts", "../node_modules/@actions/github/src/internal/utils.ts", "../node_modules/universal-user-agent/dist-src/index.js", "../node_modules/before-after-hook/lib/register.js", "../node_modules/before-after-hook/lib/add.js", "../node_modules/before-after-hook/lib/remove.js", "../node_modules/before-after-hook/index.js", "../node_modules/@octokit/endpoint/dist-node/index.js", "../node_modules/deprecation/dist-node/index.js", "../node_modules/wrappy/wrappy.js", "../node_modules/once/once.js", "../node_modules/@octokit/request-error/dist-node/index.js", "../node_modules/@octokit/request/dist-node/index.js", "../node_modules/@octokit/graphql/dist-node/index.js", "../node_modules/@octokit/auth-token/dist-node/index.js", "../node_modules/@octokit/core/dist-node/index.js", "../node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js", "../node_modules/@octokit/plugin-paginate-rest/dist-node/index.js", "../node_modules/@actions/github/src/utils.ts", "../node_modules/@actions/github/src/github.ts", "../node_modules/@redocly/openapi-core/src/utils/does-yaml-file-exist.ts", "../node_modules/@redocly/openapi-core/src/utils/dequal.ts", "../node_modules/@redocly/openapi-core/src/utils/is-plain-object.ts", "../node_modules/@redocly/openapi-core/src/utils/is-empty-object.ts", "../node_modules/@redocly/openapi-core/src/utils/is-not-empty-array.ts", "../node_modules/@redocly/openapi-core/src/utils/is-not-empty-object.ts", "../node_modules/@redocly/openapi-core/src/utils/is-string.ts", "../node_modules/@redocly/openapi-core/src/utils/is-truthy.ts", "../node_modules/@redocly/openapi-core/src/utils/keys-of.ts", "../node_modules/@redocly/openapi-core/src/utils/pause.ts", "../node_modules/pluralize/pluralize.js", "../node_modules/@redocly/openapi-core/src/utils/pluralize.ts", "../node_modules/picomatch/lib/constants.js", "../node_modules/picomatch/lib/utils.js", "../node_modules/picomatch/lib/scan.js", "../node_modules/picomatch/lib/parse.js", "../node_modules/picomatch/lib/picomatch.js", "../node_modules/picomatch/index.js", "../node_modules/@redocly/openapi-core/src/env.ts", "../node_modules/@redocly/openapi-core/src/utils/read-file-from-url.ts", "../node_modules/@redocly/openapi-core/src/utils/slash.ts", "../node_modules/@redocly/openapi-core/src/utils/regex-from-string.ts", "../node_modules/@redocly/openapi-core/src/types/index.ts", "../node_modules/@redocly/openapi-core/src/types/oas2.ts", "../node_modules/@redocly/openapi-core/src/ref-utils.ts", "../node_modules/@redocly/openapi-core/src/types/oas3.ts", "../node_modules/@redocly/openapi-core/src/types/oas3_1.ts", "../node_modules/@redocly/openapi-core/src/types/oas3_2.ts", "../node_modules/@redocly/openapi-core/src/types/json-schema-draft7.shared.ts", "../node_modules/@redocly/openapi-core/src/types/asyncapi2.ts", "../node_modules/@redocly/openapi-core/src/types/asyncapi3.ts", "../node_modules/@redocly/openapi-core/src/types/arazzo.ts", "../node_modules/@redocly/openapi-core/src/types/overlay.ts", "../node_modules/@redocly/openapi-core/src/types/openrpc.ts", "../node_modules/@redocly/config/lib-esm/index.js", "../node_modules/@redocly/openapi-core/src/oas-types.ts", "../node_modules/@redocly/openapi-core/src/utils/is-custom-rule-id.ts", "../node_modules/@redocly/openapi-core/src/utils/omit.ts", "../node_modules/@redocly/ajv/lib/compile/codegen/code.ts", "../node_modules/@redocly/ajv/lib/compile/codegen/scope.ts", "../node_modules/@redocly/ajv/lib/compile/codegen/index.ts", "../node_modules/@redocly/ajv/lib/compile/util.ts", "../node_modules/@redocly/ajv/lib/compile/names.ts", "../node_modules/@redocly/ajv/lib/compile/errors.ts", "../node_modules/@redocly/ajv/lib/compile/validate/boolSchema.ts", "../node_modules/@redocly/ajv/lib/compile/rules.ts", "../node_modules/@redocly/ajv/lib/compile/validate/applicability.ts", "../node_modules/@redocly/ajv/lib/compile/validate/dataType.ts", "../node_modules/@redocly/ajv/lib/compile/validate/defaults.ts", "../node_modules/@redocly/ajv/lib/vocabularies/oasContext.ts", "../node_modules/@redocly/ajv/lib/vocabularies/code.ts", "../node_modules/@redocly/ajv/lib/compile/validate/keyword.ts", "../node_modules/@redocly/ajv/lib/compile/validate/subschema.ts", "../node_modules/fast-deep-equal/index.js", "../node_modules/json-schema-traverse/index.js", "../node_modules/@redocly/ajv/lib/compile/resolve.ts", "../node_modules/@redocly/ajv/lib/compile/validate/index.ts", "../node_modules/@redocly/ajv/lib/runtime/validation_error.ts", "../node_modules/@redocly/ajv/lib/compile/ref_error.ts", "../node_modules/@redocly/ajv/lib/compile/index.ts", "../node_modules/@redocly/ajv/dist/refs/data.json", "../node_modules/fast-uri/lib/utils.js", "../node_modules/fast-uri/lib/schemes.js", "../node_modules/fast-uri/index.js", "../node_modules/@redocly/ajv/lib/runtime/uri.ts", "../node_modules/@redocly/ajv/lib/core.ts", "../node_modules/@redocly/ajv/lib/vocabularies/core/id.ts", "../node_modules/@redocly/ajv/lib/vocabularies/core/ref.ts", "../node_modules/@redocly/ajv/lib/vocabularies/core/index.ts", "../node_modules/@redocly/ajv/lib/vocabularies/validation/limitNumber.ts", "../node_modules/@redocly/ajv/lib/vocabularies/validation/multipleOf.ts", "../node_modules/@redocly/ajv/lib/runtime/ucs2length.ts", "../node_modules/@redocly/ajv/lib/vocabularies/validation/limitLength.ts", "../node_modules/@redocly/ajv/lib/vocabularies/validation/pattern.ts", "../node_modules/@redocly/ajv/lib/vocabularies/validation/limitProperties.ts", "../node_modules/@redocly/ajv/lib/vocabularies/validation/required.ts", "../node_modules/@redocly/ajv/lib/vocabularies/validation/readOnly.ts", "../node_modules/@redocly/ajv/lib/vocabularies/validation/writeOnly.ts", "../node_modules/@redocly/ajv/lib/vocabularies/validation/limitItems.ts", "../node_modules/@redocly/ajv/lib/runtime/equal.ts", "../node_modules/@redocly/ajv/lib/vocabularies/validation/uniqueItems.ts", "../node_modules/@redocly/ajv/lib/vocabularies/validation/const.ts", "../node_modules/@redocly/ajv/lib/vocabularies/validation/enum.ts", "../node_modules/@redocly/ajv/lib/vocabularies/validation/index.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/additionalItems.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/items.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/prefixItems.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/items2020.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/contains.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/dependencies.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/propertyNames.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/additionalProperties.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/properties.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/patternProperties.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/not.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/anyOf.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/oneOf.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/allOf.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/if.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/thenElse.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/index.ts", "../node_modules/@redocly/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts", "../node_modules/@redocly/ajv/lib/vocabularies/dynamic/dynamicRef.ts", "../node_modules/@redocly/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts", "../node_modules/@redocly/ajv/lib/vocabularies/dynamic/recursiveRef.ts", "../node_modules/@redocly/ajv/lib/vocabularies/dynamic/index.ts", "../node_modules/@redocly/ajv/lib/vocabularies/validation/dependentRequired.ts", "../node_modules/@redocly/ajv/lib/vocabularies/applicator/dependentSchemas.ts", "../node_modules/@redocly/ajv/lib/vocabularies/validation/limitContains.ts", "../node_modules/@redocly/ajv/lib/vocabularies/next.ts", "../node_modules/@redocly/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts", "../node_modules/@redocly/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts", "../node_modules/@redocly/ajv/lib/vocabularies/unevaluated/index.ts", "../node_modules/@redocly/ajv/lib/vocabularies/format/format.ts", "../node_modules/@redocly/ajv/lib/vocabularies/format/index.ts", "../node_modules/@redocly/ajv/lib/vocabularies/metadata.ts", "../node_modules/@redocly/ajv/lib/vocabularies/draft2020.ts", "../node_modules/@redocly/ajv/lib/vocabularies/discriminator/types.ts", "../node_modules/@redocly/ajv/lib/vocabularies/discriminator/index.ts", "../node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/schema.json", "../node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/applicator.json", "../node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json", "../node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/content.json", "../node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/core.json", "../node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json", "../node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json", "../node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/validation.json", "../node_modules/@redocly/ajv/lib/refs/json-schema-2020-12/index.ts", "../node_modules/@redocly/ajv/lib/2020.ts", "../node_modules/@redocly/openapi-core/src/types/json-schema-adapter.ts", "../node_modules/@redocly/openapi-core/src/types/redocly-yaml.ts", "../node_modules/@redocly/openapi-core/src/types/entity.ts", "../node_modules/@redocly/openapi-core/src/rules/other/stats.ts", "../node_modules/@redocly/openapi-core/src/typings/arazzo.ts", "../node_modules/@redocly/openapi-core/src/detect-spec.ts", "../node_modules/js-yaml/dist/js-yaml.mjs", "../node_modules/@redocly/openapi-core/src/js-yaml/index.ts", "../node_modules/@redocly/openapi-core/src/config/constants.ts", "../node_modules/@redocly/openapi-core/src/config/get-resolve-config.ts", "../node_modules/@redocly/openapi-core/src/utils/get-intersection-length.ts", "../node_modules/@redocly/openapi-core/src/utils/is-ordered.ts", "../node_modules/@redocly/openapi-core/src/rules/common/assertions/asserts.ts", "../node_modules/@redocly/openapi-core/src/config/group-assertion-rules.ts", "../node_modules/@redocly/openapi-core/src/config/config.ts", "../node_modules/@redocly/openapi-core/lib/config/types.js", "../node_modules/@redocly/openapi-core/src/utils/is-defined.ts", "../node_modules/@redocly/openapi-core/src/config/rules.ts", "../node_modules/@redocly/openapi-core/src/decorators/arazzo/index.ts", "../node_modules/@redocly/openapi-core/src/decorators/async2/index.ts", "../node_modules/@redocly/openapi-core/src/decorators/async3/index.ts", "../node_modules/@redocly/openapi-core/src/utils/is-empty-array.ts", "../node_modules/@redocly/openapi-core/src/decorators/common/filters/filter-helper.ts", "../node_modules/@redocly/openapi-core/src/decorators/common/filters/filter-in.ts", "../node_modules/@redocly/openapi-core/src/decorators/common/filters/filter-out.ts", "../node_modules/@redocly/openapi-core/src/utils/yaml-fs-helper.ts", "../node_modules/@redocly/openapi-core/src/decorators/common/info-description-override.ts", "../node_modules/@redocly/openapi-core/src/decorators/common/info-override.ts", "../node_modules/@redocly/openapi-core/src/decorators/common/operation-description-override.ts", "../node_modules/@redocly/openapi-core/src/decorators/common/remove-x-internal.ts", "../node_modules/@redocly/openapi-core/src/decorators/common/tag-description-override.ts", "../node_modules/@redocly/openapi-core/src/decorators/oas2/remove-unused-components.ts", "../node_modules/@redocly/openapi-core/src/decorators/oas2/index.ts", "../node_modules/@redocly/openapi-core/src/decorators/oas3/media-type-examples-override.ts", "../node_modules/@redocly/openapi-core/src/utils/oas-has-component.ts", "../node_modules/@redocly/openapi-core/src/decorators/oas3/remove-unused-components.ts", "../node_modules/@redocly/openapi-core/src/decorators/oas3/index.ts", "../node_modules/@redocly/openapi-core/src/decorators/openrpc/index.ts", "../node_modules/@redocly/openapi-core/src/decorators/overlay1/index.ts", "../node_modules/@redocly/openapi-core/src/rules/arazzo/sourceDescription-type.ts", "../node_modules/colorette/index.js", "../node_modules/@redocly/openapi-core/src/utils/identity.ts", "../node_modules/@redocly/openapi-core/src/logger.ts", "../node_modules/@redocly/openapi-core/src/rules/common/assertions/utils.ts", "../node_modules/@redocly/openapi-core/src/rules/common/assertions/index.ts", "../node_modules/js-levenshtein/index.js", "../node_modules/@redocly/ajv/lib/vocabularies/validation/draft04/limitNumber.ts", "../node_modules/@redocly/ajv/lib/vocabularies/validation/draft04/limitNumberExclusive.ts", "../node_modules/@redocly/ajv/lib/vocabularies/draft4.ts", "../node_modules/@redocly/ajv/dist/refs/json-schema-draft-04.json", "../node_modules/@redocly/ajv/lib/draft4.ts", "../node_modules/ajv-formats/src/formats.ts", "../node_modules/ajv/lib/compile/codegen/code.ts", "../node_modules/ajv/lib/compile/codegen/scope.ts", "../node_modules/ajv/lib/compile/codegen/index.ts", "../node_modules/ajv/lib/compile/util.ts", "../node_modules/ajv/lib/compile/names.ts", "../node_modules/ajv/lib/compile/errors.ts", "../node_modules/ajv/lib/compile/validate/boolSchema.ts", "../node_modules/ajv/lib/compile/rules.ts", "../node_modules/ajv/lib/compile/validate/applicability.ts", "../node_modules/ajv/lib/compile/validate/dataType.ts", "../node_modules/ajv/lib/compile/validate/defaults.ts", "../node_modules/ajv/lib/vocabularies/oasContext.ts", "../node_modules/ajv/lib/vocabularies/code.ts", "../node_modules/ajv/lib/compile/validate/keyword.ts", "../node_modules/ajv/lib/compile/validate/subschema.ts", "../node_modules/ajv/lib/compile/resolve.ts", "../node_modules/ajv/lib/compile/validate/index.ts", "../node_modules/ajv/lib/runtime/validation_error.ts", "../node_modules/ajv/lib/compile/ref_error.ts", "../node_modules/ajv/lib/compile/index.ts", "../node_modules/ajv/dist/refs/data.json", "../node_modules/ajv/lib/runtime/uri.ts", "../node_modules/ajv/lib/core.ts", "../node_modules/ajv/lib/vocabularies/core/id.ts", "../node_modules/ajv/lib/vocabularies/core/ref.ts", "../node_modules/ajv/lib/vocabularies/core/index.ts", "../node_modules/ajv/lib/vocabularies/validation/limitNumber.ts", "../node_modules/ajv/lib/vocabularies/validation/multipleOf.ts", "../node_modules/ajv/lib/runtime/ucs2length.ts", "../node_modules/ajv/lib/vocabularies/validation/limitLength.ts", "../node_modules/ajv/lib/vocabularies/validation/pattern.ts", "../node_modules/ajv/lib/vocabularies/validation/limitProperties.ts", "../node_modules/ajv/lib/vocabularies/validation/required.ts", "../node_modules/ajv/lib/vocabularies/validation/readOnly.ts", "../node_modules/ajv/lib/vocabularies/validation/writeOnly.ts", "../node_modules/ajv/lib/vocabularies/validation/limitItems.ts", "../node_modules/ajv/lib/runtime/equal.ts", "../node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts", "../node_modules/ajv/lib/vocabularies/validation/const.ts", "../node_modules/ajv/lib/vocabularies/validation/enum.ts", "../node_modules/ajv/lib/vocabularies/validation/index.ts", "../node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts", "../node_modules/ajv/lib/vocabularies/applicator/items.ts", "../node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts", "../node_modules/ajv/lib/vocabularies/applicator/items2020.ts", "../node_modules/ajv/lib/vocabularies/applicator/contains.ts", "../node_modules/ajv/lib/vocabularies/applicator/dependencies.ts", "../node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts", "../node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts", "../node_modules/ajv/lib/vocabularies/applicator/properties.ts", "../node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts", "../node_modules/ajv/lib/vocabularies/applicator/not.ts", "../node_modules/ajv/lib/vocabularies/applicator/anyOf.ts", "../node_modules/ajv/lib/vocabularies/applicator/oneOf.ts", "../node_modules/ajv/lib/vocabularies/applicator/allOf.ts", "../node_modules/ajv/lib/vocabularies/applicator/if.ts", "../node_modules/ajv/lib/vocabularies/applicator/thenElse.ts", "../node_modules/ajv/lib/vocabularies/applicator/index.ts", "../node_modules/ajv/lib/vocabularies/format/format.ts", "../node_modules/ajv/lib/vocabularies/format/index.ts", "../node_modules/ajv/lib/vocabularies/metadata.ts", "../node_modules/ajv/lib/vocabularies/draft7.ts", "../node_modules/ajv/lib/vocabularies/discriminator/types.ts", "../node_modules/ajv/lib/vocabularies/discriminator/index.ts", "../node_modules/ajv/dist/refs/json-schema-draft-07.json", "../node_modules/ajv/lib/ajv.ts", "../node_modules/ajv-formats/src/limit.ts", "../node_modules/ajv-formats/src/index.ts", "../node_modules/@redocly/openapi-core/src/rules/ajv.ts", "../node_modules/@redocly/openapi-core/src/rules/utils.ts", "../node_modules/@redocly/openapi-core/src/rules/common/no-enum-type-mismatch.ts", "../node_modules/@redocly/openapi-core/src/rules/common/no-mixed-number-range-constraints.ts", "../node_modules/@redocly/openapi-core/src/utils/get-own.ts", "../node_modules/@redocly/openapi-core/src/rules/common/no-required-schema-properties-undefined.ts", "../node_modules/@redocly/openapi-core/src/rules/common/no-schema-type-mismatch.ts", "../node_modules/@redocly/openapi-core/src/errors/yaml-parse-error.ts", "../node_modules/@redocly/openapi-core/src/rules/common/no-unresolved-refs.ts", "../node_modules/@redocly/openapi-core/src/rules/common/struct.ts", "../node_modules/@redocly/openapi-core/src/rules/respect/no-criteria-xpath.ts", "../node_modules/@redocly/openapi-core/src/rules/respect/no-x-security-both-scheme-and-scheme-name.ts", "../node_modules/@redocly/openapi-core/src/rules/respect/no-x-security-scheme-name-without-openapi.ts", "../node_modules/@redocly/openapi-core/src/rules/respect/respect-supported-versions.ts", "../node_modules/@redocly/openapi-core/src/rules/respect/x-security-scheme-name-reference.ts", "../node_modules/@redocly/openapi-core/src/rules/respect/x-security-scheme-required-values.ts", "../node_modules/@redocly/openapi-core/src/rules/arazzo/criteria-unique.ts", "../node_modules/@redocly/openapi-core/src/rules/arazzo/outputs-defined.ts", "../node_modules/@redocly/openapi-core/src/rules/arazzo/parameters-unique.ts", "../node_modules/@redocly/openapi-core/src/rules/arazzo/requestBody-replacements-unique.ts", "../node_modules/@redocly/openapi-core/src/rules/arazzo/sourceDescriptions-name-unique.ts", "../node_modules/@redocly/openapi-core/src/rules/arazzo/sourceDescriptions-not-empty.ts", "../node_modules/@redocly/openapi-core/src/rules/arazzo/step-onFailure-unique.ts", "../node_modules/@redocly/openapi-core/src/rules/arazzo/step-onSuccess-unique.ts", "../node_modules/@redocly/openapi-core/src/rules/arazzo/stepId-unique.ts", "../node_modules/@redocly/openapi-core/src/rules/arazzo/workflow-dependsOn.ts", "../node_modules/@redocly/openapi-core/src/rules/arazzo/workflowId-unique.ts", "../node_modules/@redocly/openapi-core/src/rules/arazzo/index.ts", "../node_modules/@redocly/openapi-core/src/rules/common/info-contact.ts", "../node_modules/@redocly/openapi-core/src/rules/common/info-license-strict.ts", "../node_modules/@redocly/openapi-core/src/rules/common/no-duplicated-tag-names.ts", "../node_modules/@redocly/openapi-core/src/rules/common/operation-operationId.ts", "../node_modules/@redocly/openapi-core/src/rules/common/tag-description.ts", "../node_modules/@redocly/openapi-core/src/rules/common/tags-alphabetical.ts", "../node_modules/@redocly/openapi-core/src/rules/async2/channels-kebab-case.ts", "../node_modules/@redocly/openapi-core/src/rules/async2/no-channel-trailing-slash.ts", "../node_modules/@redocly/openapi-core/src/rules/async2/index.ts", "../node_modules/@redocly/openapi-core/src/rules/async3/channels-kebab-case.ts", "../node_modules/@redocly/openapi-core/src/rules/async3/no-channel-trailing-slash.ts", "../node_modules/@redocly/openapi-core/src/rules/async3/index.ts", "../node_modules/@redocly/openapi-core/src/rules/common/info-license.ts", "../node_modules/@redocly/openapi-core/src/rules/common/no-ambiguous-paths.ts", "../node_modules/@redocly/openapi-core/src/utils/is-path-parameter.ts", "../node_modules/@redocly/openapi-core/src/utils/split-camel-case-into-words.ts", "../node_modules/@redocly/openapi-core/src/rules/common/no-http-verbs-in-paths.ts", "../node_modules/@redocly/openapi-core/src/rules/common/no-identical-paths.ts", "../node_modules/@redocly/openapi-core/src/rules/common/no-invalid-parameter-examples.ts", "../node_modules/@redocly/openapi-core/src/rules/common/no-invalid-schema-examples.ts", "../node_modules/@redocly/openapi-core/src/rules/common/no-path-trailing-slash.ts", "../node_modules/@redocly/openapi-core/src/rules/common/operation-2xx-response.ts", "../node_modules/@redocly/openapi-core/src/rules/common/operation-4xx-response.ts", "../node_modules/@redocly/openapi-core/src/rules/common/operation-description.ts", "../node_modules/@redocly/openapi-core/src/rules/common/operation-operationId-unique.ts", "../node_modules/@redocly/openapi-core/src/rules/common/operation-operationId-url-safe.ts", "../node_modules/@redocly/openapi-core/src/rules/common/operation-parameters-unique.ts", "../node_modules/@redocly/openapi-core/src/rules/common/operation-singular-tag.ts", "../node_modules/@redocly/openapi-core/src/rules/common/operation-summary.ts", "../node_modules/@redocly/openapi-core/src/rules/common/operation-tag-defined.ts", "../node_modules/@redocly/openapi-core/src/rules/common/parameter-description.ts", "../node_modules/@redocly/openapi-core/src/rules/common/path-declaration-must-exist.ts", "../node_modules/@redocly/openapi-core/src/rules/common/path-http-verbs-order.ts", "../node_modules/@redocly/openapi-core/src/rules/common/path-not-include-query.ts", "../node_modules/@redocly/openapi-core/src/rules/common/path-params-defined.ts", "../node_modules/@redocly/openapi-core/src/rules/common/path-segment-plural.ts", "../node_modules/@redocly/openapi-core/src/rules/common/paths-kebab-case.ts", "../node_modules/@redocly/openapi-core/src/rules/common/required-string-property-missing-min-length.ts", "../node_modules/@redocly/openapi-core/src/utils/get-matching-status-code-range.ts", "../node_modules/@redocly/openapi-core/src/rules/common/response-contains-header.ts", "../node_modules/@redocly/openapi-core/src/rules/common/scalar-property-missing-example.ts", "../node_modules/@redocly/openapi-core/src/rules/common/security-defined.ts", "../node_modules/@redocly/openapi-core/src/rules/common/spec-strict-refs.ts", "../node_modules/@redocly/openapi-core/src/rules/oas2/boolean-parameter-prefixes.ts", "../node_modules/@redocly/openapi-core/src/utils/validate-mime-type.ts", "../node_modules/@redocly/openapi-core/src/rules/oas2/request-mime-type.ts", "../node_modules/@redocly/openapi-core/src/rules/oas2/response-contains-property.ts", "../node_modules/@redocly/openapi-core/src/rules/oas2/response-mime-type.ts", "../node_modules/@redocly/openapi-core/src/rules/oas2/index.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/array-parameter-serialization.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/boolean-parameter-prefixes.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/component-name-unique.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/no-empty-servers.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/no-example-value-and-externalValue.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/no-invalid-media-type-examples.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/no-server-example.com.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/no-server-trailing-slash.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/no-server-variables-empty-enum.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/no-undefined-server-variable.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/no-unused-components.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/nullable-type-sibling.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/operation-4xx-problem-details-rfc7807.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/request-mime-type.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/response-contains-property.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/response-mime-type.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/spec-components-invalid-map-name.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/spec-discriminator-defaultMapping.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/spec-example-values.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/spec-no-invalid-encoding-combinations.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/spec-no-invalid-tag-parents.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/spec-querystring-parameters.ts", "../node_modules/@redocly/openapi-core/src/rules/oas3/index.ts", "../node_modules/@redocly/openapi-core/src/rules/openrpc/no-unused-components.ts", "../node_modules/@redocly/openapi-core/src/rules/openrpc/spec-no-duplicated-method-params.ts", "../node_modules/@redocly/openapi-core/src/rules/openrpc/spec-no-required-params-after-optional.ts", "../node_modules/@redocly/openapi-core/src/rules/openrpc/index.ts", "../node_modules/@redocly/openapi-core/src/rules/overlay1/index.ts", "../node_modules/@redocly/openapi-core/src/config/all.ts", "../node_modules/@redocly/openapi-core/src/config/minimal.ts", "../node_modules/@redocly/openapi-core/src/config/recommended-strict.ts", "../node_modules/@redocly/openapi-core/src/config/recommended.ts", "../node_modules/@redocly/openapi-core/src/config/spec.ts", "../node_modules/@redocly/openapi-core/src/config/builtIn.ts", "../node_modules/@redocly/openapi-core/src/utils/make-ref-id.ts", "../node_modules/@redocly/openapi-core/src/utils/next-tick.ts", "../node_modules/@redocly/openapi-core/src/resolve.ts", "../node_modules/@redocly/openapi-core/src/visitors.ts", "../node_modules/@redocly/openapi-core/src/utils/assign-config.ts", "../node_modules/@redocly/openapi-core/src/config/utils.ts", "../node_modules/@redocly/openapi-core/src/config/bundle-extends.ts", "../node_modules/@redocly/openapi-core/src/config/visitors.ts", "../node_modules/@redocly/openapi-core/src/utils/stack.ts", "../node_modules/@redocly/openapi-core/src/walk.ts", "../node_modules/@redocly/openapi-core/src/bundle/bundle-visitor.ts", "../node_modules/@redocly/openapi-core/src/bundle/bundle-document.ts", "../node_modules/@redocly/openapi-core/src/bundle/bundle.ts", "../node_modules/@redocly/openapi-core/src/utils/is-not-string.ts", "../node_modules/@redocly/openapi-core/src/config/plugins-cache.ts", "../node_modules/@redocly/openapi-core/src/config/config-resolvers.ts", "../node_modules/@redocly/openapi-core/src/config/load.ts", "../node_modules/@redocly/openapi-core/src/config/index.ts", "../node_modules/yaml-ast-parser/src/yamlAST.ts", "../node_modules/yaml-ast-parser/src/common.ts", "../node_modules/yaml-ast-parser/src/exception.ts", "../node_modules/yaml-ast-parser/src/mark.ts", "../node_modules/yaml-ast-parser/src/type.ts", "../node_modules/yaml-ast-parser/src/schema.ts", "../node_modules/yaml-ast-parser/src/type/str.ts", "../node_modules/yaml-ast-parser/src/type/seq.ts", "../node_modules/yaml-ast-parser/src/type/map.ts", "../node_modules/yaml-ast-parser/src/schema/failsafe.ts", "../node_modules/yaml-ast-parser/src/type/null.ts", "../node_modules/yaml-ast-parser/src/type/bool.ts", "../node_modules/yaml-ast-parser/src/type/int.ts", "../node_modules/yaml-ast-parser/src/type/float.ts", "../node_modules/yaml-ast-parser/src/schema/json.ts", "../node_modules/yaml-ast-parser/src/schema/core.ts", "../node_modules/yaml-ast-parser/src/type/timestamp.ts", "../node_modules/yaml-ast-parser/src/type/merge.ts", "../node_modules/yaml-ast-parser/src/type/binary.ts", "../node_modules/yaml-ast-parser/src/type/omap.ts", "../node_modules/yaml-ast-parser/src/type/pairs.ts", "../node_modules/yaml-ast-parser/src/type/set.ts", "../node_modules/yaml-ast-parser/src/schema/default_safe.ts", "../node_modules/yaml-ast-parser/src/type/js/undefined.ts", "../node_modules/yaml-ast-parser/src/type/js/regexp.ts", "../node_modules/yaml-ast-parser/src/schema/default_full.ts", "../node_modules/yaml-ast-parser/src/loader.ts", "../node_modules/yaml-ast-parser/src/dumper.ts", "../node_modules/yaml-ast-parser/src/scalarInference.ts", "../node_modules/yaml-ast-parser/src/index.ts", "../node_modules/@redocly/openapi-core/src/format/codeframes.ts", "../node_modules/@redocly/openapi-core/src/format/format.ts", "../node_modules/@redocly/openapi-core/src/lint.ts", "../node_modules/@redocly/openapi-core/src/rules/catalog-entity/entity-key-valid.ts", "../node_modules/@redocly/openapi-core/src/utils/scorecards.ts", "../node_modules/@redocly/openapi-core/src/lint-entity.ts", "../node_modules/@redocly/openapi-core/src/utils/error.ts", "../node_modules/@redocly/openapi-core/src/index.ts", "../node_modules/@redocly/cli/src/utils/error.ts", "../node_modules/glob/node_modules/balanced-match/src/index.ts", "../node_modules/glob/node_modules/brace-expansion/src/index.ts", "../node_modules/glob/node_modules/minimatch/src/assert-valid-pattern.ts", "../node_modules/glob/node_modules/minimatch/src/brace-expressions.ts", "../node_modules/glob/node_modules/minimatch/src/unescape.ts", "../node_modules/glob/node_modules/minimatch/src/ast.ts", "../node_modules/glob/node_modules/minimatch/src/escape.ts", "../node_modules/glob/node_modules/minimatch/src/index.ts", "../node_modules/glob/src/glob.ts", "../node_modules/glob/node_modules/lru-cache/src/index.ts", "../node_modules/glob/node_modules/path-scurry/src/index.ts", "../node_modules/glob/node_modules/minipass/src/index.ts", "../node_modules/glob/src/pattern.ts", "../node_modules/glob/src/ignore.ts", "../node_modules/glob/src/processor.ts", "../node_modules/glob/src/walker.ts", "../node_modules/glob/src/has-magic.ts", "../node_modules/glob/src/index.ts", "../node_modules/@redocly/cli/src/utils/get-command-name-from-args.ts", "../node_modules/@redocly/cli/src/commands/lint.ts", "../node_modules/@redocly/cli/src/types.ts", "../node_modules/@redocly/cli/src/utils/miscellaneous.ts", "redocly-cli-package-shim:redocly-cli-package", "../node_modules/@redocly/cli/src/utils/constants.ts", "../node_modules/ms/index.js", "../node_modules/debug/src/common.js", "../node_modules/debug/src/browser.js", "../node_modules/has-flag/index.js", "../node_modules/supports-color/index.js", "../node_modules/debug/src/node.js", "../node_modules/debug/src/index.js", "../node_modules/agent-base/src/helpers.ts", "../node_modules/agent-base/src/index.ts", "../node_modules/https-proxy-agent/src/parse-proxy-response.ts", "../node_modules/https-proxy-agent/src/index.ts", "../node_modules/@redocly/cli/src/utils/proxy-agent.ts", "../node_modules/@redocly/cli/src/utils/fetch-with-timeout.ts", "../node_modules/@redocly/cli/src/reunite/api/api-client.ts", "../node_modules/@redocly/cli/src/reunite/api/domains.ts", "../node_modules/@redocly/cli/src/reunite/api/api-keys.ts", "../node_modules/@redocly/cli/src/reunite/api/index.ts", "../node_modules/@redocly/cli/src/utils/spinner.ts", "../node_modules/@redocly/cli/src/reunite/utils.ts", "../node_modules/@redocly/cli/src/reunite/commands/utils.ts", "../node_modules/@redocly/cli/src/reunite/commands/push-status.ts", "../node_modules/@redocly/cli/src/reunite/commands/push.ts", "../src/main.ts", "../src/set-commit-statuses.ts", "../src/helpers.ts", "../src/redocly-config.ts", "../src/redocly-cli.ts", "../package.json", "../src/index.ts"], + "sourcesContent": [null, null, null, null, "'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n", "module.exports = require('./lib/tunnel');\n", "'use strict'\n\nmodule.exports = {\n kClose: Symbol('close'),\n kDestroy: Symbol('destroy'),\n kDispatch: Symbol('dispatch'),\n kUrl: Symbol('url'),\n kWriting: Symbol('writing'),\n kResuming: Symbol('resuming'),\n kQueue: Symbol('queue'),\n kConnect: Symbol('connect'),\n kConnecting: Symbol('connecting'),\n kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'),\n kKeepAliveMaxTimeout: Symbol('max keep alive timeout'),\n kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'),\n kKeepAliveTimeoutValue: Symbol('keep alive timeout'),\n kKeepAlive: Symbol('keep alive'),\n kHeadersTimeout: Symbol('headers timeout'),\n kBodyTimeout: Symbol('body timeout'),\n kServerName: Symbol('server name'),\n kLocalAddress: Symbol('local address'),\n kHost: Symbol('host'),\n kNoRef: Symbol('no ref'),\n kBodyUsed: Symbol('used'),\n kBody: Symbol('abstracted request body'),\n kRunning: Symbol('running'),\n kBlocking: Symbol('blocking'),\n kPending: Symbol('pending'),\n kSize: Symbol('size'),\n kBusy: Symbol('busy'),\n kQueued: Symbol('queued'),\n kFree: Symbol('free'),\n kConnected: Symbol('connected'),\n kClosed: Symbol('closed'),\n kNeedDrain: Symbol('need drain'),\n kReset: Symbol('reset'),\n kDestroyed: Symbol.for('nodejs.stream.destroyed'),\n kResume: Symbol('resume'),\n kOnError: Symbol('on error'),\n kMaxHeadersSize: Symbol('max headers size'),\n kRunningIdx: Symbol('running index'),\n kPendingIdx: Symbol('pending index'),\n kError: Symbol('error'),\n kClients: Symbol('clients'),\n kClient: Symbol('client'),\n kParser: Symbol('parser'),\n kOnDestroyed: Symbol('destroy callbacks'),\n kPipelining: Symbol('pipelining'),\n kSocket: Symbol('socket'),\n kHostHeader: Symbol('host header'),\n kConnector: Symbol('connector'),\n kStrictContentLength: Symbol('strict content length'),\n kMaxRedirections: Symbol('maxRedirections'),\n kMaxRequests: Symbol('maxRequestsPerClient'),\n kProxy: Symbol('proxy agent options'),\n kCounter: Symbol('socket request counter'),\n kMaxResponseSize: Symbol('max response size'),\n kHTTP2Session: Symbol('http2Session'),\n kHTTP2SessionState: Symbol('http2Session state'),\n kRetryHandlerDefaultRetry: Symbol('retry agent default retry'),\n kConstruct: Symbol('constructable'),\n kListeners: Symbol('listeners'),\n kHTTPContext: Symbol('http context'),\n kMaxConcurrentStreams: Symbol('max concurrent streams'),\n kHTTP2InitialWindowSize: Symbol('http2 initial window size'),\n kHTTP2ConnectionWindowSize: Symbol('http2 connection window size'),\n kEnableConnectProtocol: Symbol('http2session connect protocol'),\n kRemoteSettings: Symbol('http2session remote settings'),\n kHTTP2Stream: Symbol('http2session client stream'),\n kPingInterval: Symbol('ping interval'),\n kNoProxyAgent: Symbol('no proxy agent'),\n kHttpProxyAgent: Symbol('http proxy agent'),\n kHttpsProxyAgent: Symbol('https proxy agent'),\n kSocks5ProxyAgent: Symbol('socks5 proxy agent')\n}\n", "'use strict'\n\n/**\n * This module offers an optimized timer implementation designed for scenarios\n * where high precision is not critical.\n *\n * The timer achieves faster performance by using a low-resolution approach,\n * with an accuracy target of within 500ms. This makes it particularly useful\n * for timers with delays of 1 second or more, where exact timing is less\n * crucial.\n *\n * It's important to note that Node.js timers are inherently imprecise, as\n * delays can occur due to the event loop being blocked by other operations.\n * Consequently, timers may trigger later than their scheduled time.\n */\n\n/**\n * The fastNow variable contains the internal fast timer clock value.\n *\n * @type {number}\n */\nlet fastNow = 0\n\n/**\n * RESOLUTION_MS represents the target resolution time in milliseconds.\n *\n * @type {number}\n * @default 1000\n */\nconst RESOLUTION_MS = 1e3\n\n/**\n * TICK_MS defines the desired interval in milliseconds between each tick.\n * The target value is set to half the resolution time, minus 1 ms, to account\n * for potential event loop overhead.\n *\n * @type {number}\n * @default 499\n */\nconst TICK_MS = (RESOLUTION_MS >> 1) - 1\n\n/**\n * fastNowTimeout is a Node.js timer used to manage and process\n * the FastTimers stored in the `fastTimers` array.\n *\n * @type {NodeJS.Timeout}\n */\nlet fastNowTimeout\n\n/**\n * The kFastTimer symbol is used to identify FastTimer instances.\n *\n * @type {Symbol}\n */\nconst kFastTimer = Symbol('kFastTimer')\n\n/**\n * The fastTimers array contains all active FastTimers.\n *\n * @type {FastTimer[]}\n */\nconst fastTimers = []\n\n/**\n * These constants represent the various states of a FastTimer.\n */\n\n/**\n * The `NOT_IN_LIST` constant indicates that the FastTimer is not included\n * in the `fastTimers` array. Timers with this status will not be processed\n * during the next tick by the `onTick` function.\n *\n * A FastTimer can be re-added to the `fastTimers` array by invoking the\n * `refresh` method on the FastTimer instance.\n *\n * @type {-2}\n */\nconst NOT_IN_LIST = -2\n\n/**\n * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled\n * for removal from the `fastTimers` array. A FastTimer in this state will\n * be removed in the next tick by the `onTick` function and will no longer\n * be processed.\n *\n * This status is also set when the `clear` method is called on the FastTimer instance.\n *\n * @type {-1}\n */\nconst TO_BE_CLEARED = -1\n\n/**\n * The `PENDING` constant signifies that the FastTimer is awaiting processing\n * in the next tick by the `onTick` function. Timers with this status will have\n * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick.\n *\n * @type {0}\n */\nconst PENDING = 0\n\n/**\n * The `ACTIVE` constant indicates that the FastTimer is active and waiting\n * for its timer to expire. During the next tick, the `onTick` function will\n * check if the timer has expired, and if so, it will execute the associated callback.\n *\n * @type {1}\n */\nconst ACTIVE = 1\n\n/**\n * The onTick function processes the fastTimers array.\n *\n * @returns {void}\n */\nfunction onTick () {\n /**\n * Increment the fastNow value by the TICK_MS value, despite the actual time\n * that has passed since the last tick. This approach ensures independence\n * from the system clock and delays caused by a blocked event loop.\n *\n * @type {number}\n */\n fastNow += TICK_MS\n\n /**\n * The `idx` variable is used to iterate over the `fastTimers` array.\n * Expired timers are removed by replacing them with the last element in the array.\n * Consequently, `idx` is only incremented when the current element is not removed.\n *\n * @type {number}\n */\n let idx = 0\n\n /**\n * The len variable will contain the length of the fastTimers array\n * and will be decremented when a FastTimer should be removed from the\n * fastTimers array.\n *\n * @type {number}\n */\n let len = fastTimers.length\n\n while (idx < len) {\n /**\n * @type {FastTimer}\n */\n const timer = fastTimers[idx]\n\n // If the timer is in the ACTIVE state and the timer has expired, it will\n // be processed in the next tick.\n if (timer._state === PENDING) {\n // Set the _idleStart value to the fastNow value minus the TICK_MS value\n // to account for the time the timer was in the PENDING state.\n timer._idleStart = fastNow - TICK_MS\n timer._state = ACTIVE\n } else if (\n timer._state === ACTIVE &&\n fastNow >= timer._idleStart + timer._idleTimeout\n ) {\n timer._state = TO_BE_CLEARED\n timer._idleStart = -1\n timer._onTimeout(timer._timerArg)\n }\n\n if (timer._state === TO_BE_CLEARED) {\n timer._state = NOT_IN_LIST\n\n // Move the last element to the current index and decrement len if it is\n // not the only element in the array.\n if (--len !== 0) {\n fastTimers[idx] = fastTimers[len]\n }\n } else {\n ++idx\n }\n }\n\n // Set the length of the fastTimers array to the new length and thus\n // removing the excess FastTimers elements from the array.\n fastTimers.length = len\n\n // If there are still active FastTimers in the array, refresh the Timer.\n // If there are no active FastTimers, the timer will be refreshed again\n // when a new FastTimer is instantiated.\n if (fastTimers.length !== 0) {\n refreshTimeout()\n }\n}\n\nfunction refreshTimeout () {\n // If the fastNowTimeout is already set and the Timer has the refresh()-\n // method available, call it to refresh the timer.\n // Some timer objects returned by setTimeout may not have a .refresh()\n // method (e.g. mocked timers in tests).\n if (fastNowTimeout?.refresh) {\n fastNowTimeout.refresh()\n // fastNowTimeout is not instantiated yet or refresh is not availabe,\n // create a new Timer.\n } else {\n clearTimeout(fastNowTimeout)\n fastNowTimeout = setTimeout(onTick, TICK_MS)\n // If the Timer has an unref method, call it to allow the process to exit,\n // if there are no other active handles. When using fake timers or mocked\n // environments (like Jest), .unref() may not be defined,\n fastNowTimeout?.unref()\n }\n}\n\n/**\n * The `FastTimer` class is a data structure designed to store and manage\n * timer information.\n */\nclass FastTimer {\n [kFastTimer] = true\n\n /**\n * The state of the timer, which can be one of the following:\n * - NOT_IN_LIST (-2)\n * - TO_BE_CLEARED (-1)\n * - PENDING (0)\n * - ACTIVE (1)\n *\n * @type {-2|-1|0|1}\n * @private\n */\n _state = NOT_IN_LIST\n\n /**\n * The number of milliseconds to wait before calling the callback.\n *\n * @type {number}\n * @private\n */\n _idleTimeout = -1\n\n /**\n * The time in milliseconds when the timer was started. This value is used to\n * calculate when the timer should expire.\n *\n * @type {number}\n * @default -1\n * @private\n */\n _idleStart = -1\n\n /**\n * The function to be executed when the timer expires.\n * @type {Function}\n * @private\n */\n _onTimeout\n\n /**\n * The argument to be passed to the callback when the timer expires.\n *\n * @type {*}\n * @private\n */\n _timerArg\n\n /**\n * @constructor\n * @param {Function} callback A function to be executed after the timer\n * expires.\n * @param {number} delay The time, in milliseconds that the timer should wait\n * before the specified function or code is executed.\n * @param {*} arg\n */\n constructor (callback, delay, arg) {\n this._onTimeout = callback\n this._idleTimeout = delay\n this._timerArg = arg\n\n this.refresh()\n }\n\n /**\n * Sets the timer's start time to the current time, and reschedules the timer\n * to call its callback at the previously specified duration adjusted to the\n * current time.\n * Using this on a timer that has already called its callback will reactivate\n * the timer.\n *\n * @returns {void}\n */\n refresh () {\n // In the special case that the timer is not in the list of active timers,\n // add it back to the array to be processed in the next tick by the onTick\n // function.\n if (this._state === NOT_IN_LIST) {\n fastTimers.push(this)\n }\n\n // If the timer is the only active timer, refresh the fastNowTimeout for\n // better resolution.\n if (!fastNowTimeout || fastTimers.length === 1) {\n refreshTimeout()\n }\n\n // Setting the state to PENDING will cause the timer to be reset in the\n // next tick by the onTick function.\n this._state = PENDING\n }\n\n /**\n * The `clear` method cancels the timer, preventing it from executing.\n *\n * @returns {void}\n * @private\n */\n clear () {\n // Set the state to TO_BE_CLEARED to mark the timer for removal in the next\n // tick by the onTick function.\n this._state = TO_BE_CLEARED\n\n // Reset the _idleStart value to -1 to indicate that the timer is no longer\n // active.\n this._idleStart = -1\n }\n}\n\n/**\n * This module exports a setTimeout and clearTimeout function that can be\n * used as a drop-in replacement for the native functions.\n */\nmodule.exports = {\n /**\n * The setTimeout() method sets a timer which executes a function once the\n * timer expires.\n * @param {Function} callback A function to be executed after the timer\n * expires.\n * @param {number} delay The time, in milliseconds that the timer should\n * wait before the specified function or code is executed.\n * @param {*} [arg] An optional argument to be passed to the callback function\n * when the timer expires.\n * @returns {NodeJS.Timeout|FastTimer}\n */\n setTimeout (callback, delay, arg) {\n // If the delay is less than or equal to the RESOLUTION_MS value return a\n // native Node.js Timer instance.\n return delay <= RESOLUTION_MS\n ? setTimeout(callback, delay, arg)\n : new FastTimer(callback, delay, arg)\n },\n /**\n * The clearTimeout method cancels an instantiated Timer previously created\n * by calling setTimeout.\n *\n * @param {NodeJS.Timeout|FastTimer} timeout\n */\n clearTimeout (timeout) {\n // If the timeout is a FastTimer, call its own clear method.\n if (timeout[kFastTimer]) {\n /**\n * @type {FastTimer}\n */\n timeout.clear()\n // Otherwise it is an instance of a native NodeJS.Timeout, so call the\n // Node.js native clearTimeout function.\n } else {\n clearTimeout(timeout)\n }\n },\n /**\n * The setFastTimeout() method sets a fastTimer which executes a function once\n * the timer expires.\n * @param {Function} callback A function to be executed after the timer\n * expires.\n * @param {number} delay The time, in milliseconds that the timer should\n * wait before the specified function or code is executed.\n * @param {*} [arg] An optional argument to be passed to the callback function\n * when the timer expires.\n * @returns {FastTimer}\n */\n setFastTimeout (callback, delay, arg) {\n return new FastTimer(callback, delay, arg)\n },\n /**\n * The clearTimeout method cancels an instantiated FastTimer previously\n * created by calling setFastTimeout.\n *\n * @param {FastTimer} timeout\n */\n clearFastTimeout (timeout) {\n timeout.clear()\n },\n /**\n * The now method returns the value of the internal fast timer clock.\n *\n * @returns {number}\n */\n now () {\n return fastNow\n },\n /**\n * Trigger the onTick function to process the fastTimers array.\n * Exported for testing purposes only.\n * Marking as deprecated to discourage any use outside of testing.\n * @deprecated\n * @param {number} [delay=0] The delay in milliseconds to add to the now value.\n */\n tick (delay = 0) {\n fastNow += delay - RESOLUTION_MS + 1\n onTick()\n onTick()\n },\n /**\n * Reset FastTimers.\n * Exported for testing purposes only.\n * Marking as deprecated to discourage any use outside of testing.\n * @deprecated\n */\n reset () {\n fastNow = 0\n fastTimers.length = 0\n clearTimeout(fastNowTimeout)\n fastNowTimeout = null\n },\n /**\n * Exporting for testing purposes only.\n * Marking as deprecated to discourage any use outside of testing.\n * @deprecated\n */\n kFastTimer\n}\n", "'use strict'\n\nconst kUndiciError = Symbol.for('undici.error.UND_ERR')\nclass UndiciError extends Error {\n constructor (message, options) {\n super(message, options)\n this.name = 'UndiciError'\n this.code = 'UND_ERR'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kUndiciError] === true\n }\n\n get [kUndiciError] () {\n return true\n }\n}\n\nconst kConnectTimeoutError = Symbol.for('undici.error.UND_ERR_CONNECT_TIMEOUT')\nclass ConnectTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'ConnectTimeoutError'\n this.message = message || 'Connect Timeout Error'\n this.code = 'UND_ERR_CONNECT_TIMEOUT'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kConnectTimeoutError] === true\n }\n\n get [kConnectTimeoutError] () {\n return true\n }\n}\n\nconst kHeadersTimeoutError = Symbol.for('undici.error.UND_ERR_HEADERS_TIMEOUT')\nclass HeadersTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'HeadersTimeoutError'\n this.message = message || 'Headers Timeout Error'\n this.code = 'UND_ERR_HEADERS_TIMEOUT'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kHeadersTimeoutError] === true\n }\n\n get [kHeadersTimeoutError] () {\n return true\n }\n}\n\nconst kHeadersOverflowError = Symbol.for('undici.error.UND_ERR_HEADERS_OVERFLOW')\nclass HeadersOverflowError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'HeadersOverflowError'\n this.message = message || 'Headers Overflow Error'\n this.code = 'UND_ERR_HEADERS_OVERFLOW'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kHeadersOverflowError] === true\n }\n\n get [kHeadersOverflowError] () {\n return true\n }\n}\n\nconst kBodyTimeoutError = Symbol.for('undici.error.UND_ERR_BODY_TIMEOUT')\nclass BodyTimeoutError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'BodyTimeoutError'\n this.message = message || 'Body Timeout Error'\n this.code = 'UND_ERR_BODY_TIMEOUT'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kBodyTimeoutError] === true\n }\n\n get [kBodyTimeoutError] () {\n return true\n }\n}\n\nconst kInvalidArgumentError = Symbol.for('undici.error.UND_ERR_INVALID_ARG')\nclass InvalidArgumentError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'InvalidArgumentError'\n this.message = message || 'Invalid Argument Error'\n this.code = 'UND_ERR_INVALID_ARG'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kInvalidArgumentError] === true\n }\n\n get [kInvalidArgumentError] () {\n return true\n }\n}\n\nconst kInvalidReturnValueError = Symbol.for('undici.error.UND_ERR_INVALID_RETURN_VALUE')\nclass InvalidReturnValueError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'InvalidReturnValueError'\n this.message = message || 'Invalid Return Value Error'\n this.code = 'UND_ERR_INVALID_RETURN_VALUE'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kInvalidReturnValueError] === true\n }\n\n get [kInvalidReturnValueError] () {\n return true\n }\n}\n\nconst kAbortError = Symbol.for('undici.error.UND_ERR_ABORT')\nclass AbortError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'AbortError'\n this.message = message || 'The operation was aborted'\n this.code = 'UND_ERR_ABORT'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kAbortError] === true\n }\n\n get [kAbortError] () {\n return true\n }\n}\n\nconst kRequestAbortedError = Symbol.for('undici.error.UND_ERR_ABORTED')\nclass RequestAbortedError extends AbortError {\n constructor (message) {\n super(message)\n this.name = 'AbortError'\n this.message = message || 'Request aborted'\n this.code = 'UND_ERR_ABORTED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kRequestAbortedError] === true\n }\n\n get [kRequestAbortedError] () {\n return true\n }\n}\n\nconst kInformationalError = Symbol.for('undici.error.UND_ERR_INFO')\nclass InformationalError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'InformationalError'\n this.message = message || 'Request information'\n this.code = 'UND_ERR_INFO'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kInformationalError] === true\n }\n\n get [kInformationalError] () {\n return true\n }\n}\n\nconst kRequestContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH')\nclass RequestContentLengthMismatchError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'RequestContentLengthMismatchError'\n this.message = message || 'Request body length does not match content-length header'\n this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kRequestContentLengthMismatchError] === true\n }\n\n get [kRequestContentLengthMismatchError] () {\n return true\n }\n}\n\nconst kResponseContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH')\nclass ResponseContentLengthMismatchError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'ResponseContentLengthMismatchError'\n this.message = message || 'Response body length does not match content-length header'\n this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kResponseContentLengthMismatchError] === true\n }\n\n get [kResponseContentLengthMismatchError] () {\n return true\n }\n}\n\nconst kClientDestroyedError = Symbol.for('undici.error.UND_ERR_DESTROYED')\nclass ClientDestroyedError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'ClientDestroyedError'\n this.message = message || 'The client is destroyed'\n this.code = 'UND_ERR_DESTROYED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kClientDestroyedError] === true\n }\n\n get [kClientDestroyedError] () {\n return true\n }\n}\n\nconst kClientClosedError = Symbol.for('undici.error.UND_ERR_CLOSED')\nclass ClientClosedError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'ClientClosedError'\n this.message = message || 'The client is closed'\n this.code = 'UND_ERR_CLOSED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kClientClosedError] === true\n }\n\n get [kClientClosedError] () {\n return true\n }\n}\n\nconst kSocketError = Symbol.for('undici.error.UND_ERR_SOCKET')\nclass SocketError extends UndiciError {\n constructor (message, socket) {\n super(message)\n this.name = 'SocketError'\n this.message = message || 'Socket error'\n this.code = 'UND_ERR_SOCKET'\n this.socket = socket\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kSocketError] === true\n }\n\n get [kSocketError] () {\n return true\n }\n}\n\nconst kNotSupportedError = Symbol.for('undici.error.UND_ERR_NOT_SUPPORTED')\nclass NotSupportedError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'NotSupportedError'\n this.message = message || 'Not supported error'\n this.code = 'UND_ERR_NOT_SUPPORTED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kNotSupportedError] === true\n }\n\n get [kNotSupportedError] () {\n return true\n }\n}\n\nconst kBalancedPoolMissingUpstreamError = Symbol.for('undici.error.UND_ERR_BPL_MISSING_UPSTREAM')\nclass BalancedPoolMissingUpstreamError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'MissingUpstreamError'\n this.message = message || 'No upstream has been added to the BalancedPool'\n this.code = 'UND_ERR_BPL_MISSING_UPSTREAM'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kBalancedPoolMissingUpstreamError] === true\n }\n\n get [kBalancedPoolMissingUpstreamError] () {\n return true\n }\n}\n\nconst kHTTPParserError = Symbol.for('undici.error.UND_ERR_HTTP_PARSER')\nclass HTTPParserError extends Error {\n constructor (message, code, data) {\n super(message)\n this.name = 'HTTPParserError'\n this.code = code ? `HPE_${code}` : undefined\n this.data = data ? data.toString() : undefined\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kHTTPParserError] === true\n }\n\n get [kHTTPParserError] () {\n return true\n }\n}\n\nconst kResponseExceededMaxSizeError = Symbol.for('undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE')\nclass ResponseExceededMaxSizeError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'ResponseExceededMaxSizeError'\n this.message = message || 'Response content exceeded max size'\n this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kResponseExceededMaxSizeError] === true\n }\n\n get [kResponseExceededMaxSizeError] () {\n return true\n }\n}\n\nconst kRequestRetryError = Symbol.for('undici.error.UND_ERR_REQ_RETRY')\nclass RequestRetryError extends UndiciError {\n constructor (message, code, { headers, data }) {\n super(message)\n this.name = 'RequestRetryError'\n this.message = message || 'Request retry error'\n this.code = 'UND_ERR_REQ_RETRY'\n this.statusCode = code\n this.data = data\n this.headers = headers\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kRequestRetryError] === true\n }\n\n get [kRequestRetryError] () {\n return true\n }\n}\n\nconst kResponseError = Symbol.for('undici.error.UND_ERR_RESPONSE')\nclass ResponseError extends UndiciError {\n constructor (message, code, { headers, body }) {\n super(message)\n this.name = 'ResponseError'\n this.message = message || 'Response error'\n this.code = 'UND_ERR_RESPONSE'\n this.statusCode = code\n this.body = body\n this.headers = headers\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kResponseError] === true\n }\n\n get [kResponseError] () {\n return true\n }\n}\n\nconst kSecureProxyConnectionError = Symbol.for('undici.error.UND_ERR_PRX_TLS')\nclass SecureProxyConnectionError extends UndiciError {\n constructor (cause, message, options = {}) {\n super(message, { cause, ...options })\n this.name = 'SecureProxyConnectionError'\n this.message = message || 'Secure Proxy Connection failed'\n this.code = 'UND_ERR_PRX_TLS'\n this.cause = cause\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kSecureProxyConnectionError] === true\n }\n\n get [kSecureProxyConnectionError] () {\n return true\n }\n}\n\nconst kMaxOriginsReachedError = Symbol.for('undici.error.UND_ERR_MAX_ORIGINS_REACHED')\nclass MaxOriginsReachedError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'MaxOriginsReachedError'\n this.message = message || 'Maximum allowed origins reached'\n this.code = 'UND_ERR_MAX_ORIGINS_REACHED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kMaxOriginsReachedError] === true\n }\n\n get [kMaxOriginsReachedError] () {\n return true\n }\n}\n\nclass Socks5ProxyError extends UndiciError {\n constructor (message, code) {\n super(message)\n this.name = 'Socks5ProxyError'\n this.message = message || 'SOCKS5 proxy error'\n this.code = code || 'UND_ERR_SOCKS5'\n }\n}\n\nconst kMessageSizeExceededError = Symbol.for('undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED')\nclass MessageSizeExceededError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'MessageSizeExceededError'\n this.message = message || 'Max decompressed message size exceeded'\n this.code = 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kMessageSizeExceededError] === true\n }\n\n get [kMessageSizeExceededError] () {\n return true\n }\n}\n\nmodule.exports = {\n AbortError,\n HTTPParserError,\n UndiciError,\n HeadersTimeoutError,\n HeadersOverflowError,\n BodyTimeoutError,\n RequestContentLengthMismatchError,\n ConnectTimeoutError,\n InvalidArgumentError,\n InvalidReturnValueError,\n RequestAbortedError,\n ClientDestroyedError,\n ClientClosedError,\n InformationalError,\n SocketError,\n NotSupportedError,\n ResponseContentLengthMismatchError,\n BalancedPoolMissingUpstreamError,\n ResponseExceededMaxSizeError,\n RequestRetryError,\n ResponseError,\n SecureProxyConnectionError,\n MaxOriginsReachedError,\n Socks5ProxyError,\n MessageSizeExceededError\n}\n", "'use strict'\n\n/**\n * @see https://developer.mozilla.org/docs/Web/HTTP/Headers\n */\nconst wellknownHeaderNames = /** @type {const} */ ([\n 'Accept',\n 'Accept-Encoding',\n 'Accept-Language',\n 'Accept-Ranges',\n 'Access-Control-Allow-Credentials',\n 'Access-Control-Allow-Headers',\n 'Access-Control-Allow-Methods',\n 'Access-Control-Allow-Origin',\n 'Access-Control-Expose-Headers',\n 'Access-Control-Max-Age',\n 'Access-Control-Request-Headers',\n 'Access-Control-Request-Method',\n 'Age',\n 'Allow',\n 'Alt-Svc',\n 'Alt-Used',\n 'Authorization',\n 'Cache-Control',\n 'Clear-Site-Data',\n 'Connection',\n 'Content-Disposition',\n 'Content-Encoding',\n 'Content-Language',\n 'Content-Length',\n 'Content-Location',\n 'Content-Range',\n 'Content-Security-Policy',\n 'Content-Security-Policy-Report-Only',\n 'Content-Type',\n 'Cookie',\n 'Cross-Origin-Embedder-Policy',\n 'Cross-Origin-Opener-Policy',\n 'Cross-Origin-Resource-Policy',\n 'Date',\n 'Device-Memory',\n 'Downlink',\n 'ECT',\n 'ETag',\n 'Expect',\n 'Expect-CT',\n 'Expires',\n 'Forwarded',\n 'From',\n 'Host',\n 'If-Match',\n 'If-Modified-Since',\n 'If-None-Match',\n 'If-Range',\n 'If-Unmodified-Since',\n 'Keep-Alive',\n 'Last-Modified',\n 'Link',\n 'Location',\n 'Max-Forwards',\n 'Origin',\n 'Permissions-Policy',\n 'Pragma',\n 'Proxy-Authenticate',\n 'Proxy-Authorization',\n 'RTT',\n 'Range',\n 'Referer',\n 'Referrer-Policy',\n 'Refresh',\n 'Retry-After',\n 'Sec-WebSocket-Accept',\n 'Sec-WebSocket-Extensions',\n 'Sec-WebSocket-Key',\n 'Sec-WebSocket-Protocol',\n 'Sec-WebSocket-Version',\n 'Server',\n 'Server-Timing',\n 'Service-Worker-Allowed',\n 'Service-Worker-Navigation-Preload',\n 'Set-Cookie',\n 'SourceMap',\n 'Strict-Transport-Security',\n 'Supports-Loading-Mode',\n 'TE',\n 'Timing-Allow-Origin',\n 'Trailer',\n 'Transfer-Encoding',\n 'Upgrade',\n 'Upgrade-Insecure-Requests',\n 'User-Agent',\n 'Vary',\n 'Via',\n 'WWW-Authenticate',\n 'X-Content-Type-Options',\n 'X-DNS-Prefetch-Control',\n 'X-Frame-Options',\n 'X-Permitted-Cross-Domain-Policies',\n 'X-Powered-By',\n 'X-Requested-With',\n 'X-XSS-Protection'\n])\n\n/** @type {Record, string>} */\nconst headerNameLowerCasedRecord = {}\n\n// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`.\nObject.setPrototypeOf(headerNameLowerCasedRecord, null)\n\n/**\n * @type {Record, Buffer>}\n */\nconst wellknownHeaderNameBuffers = {}\n\n// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`.\nObject.setPrototypeOf(wellknownHeaderNameBuffers, null)\n\n/**\n * @param {string} header Lowercased header\n * @returns {Buffer}\n */\nfunction getHeaderNameAsBuffer (header) {\n let buffer = wellknownHeaderNameBuffers[header]\n\n if (buffer === undefined) {\n buffer = Buffer.from(header)\n }\n\n return buffer\n}\n\nfor (let i = 0; i < wellknownHeaderNames.length; ++i) {\n const key = wellknownHeaderNames[i]\n const lowerCasedKey = key.toLowerCase()\n headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] =\n lowerCasedKey\n}\n\nmodule.exports = {\n wellknownHeaderNames,\n headerNameLowerCasedRecord,\n getHeaderNameAsBuffer\n}\n", "'use strict'\n\nconst {\n wellknownHeaderNames,\n headerNameLowerCasedRecord\n} = require('./constants')\n\nclass TstNode {\n /** @type {any} */\n value = null\n /** @type {null | TstNode} */\n left = null\n /** @type {null | TstNode} */\n middle = null\n /** @type {null | TstNode} */\n right = null\n /** @type {number} */\n code\n /**\n * @param {string} key\n * @param {any} value\n * @param {number} index\n */\n constructor (key, value, index) {\n if (index === undefined || index >= key.length) {\n throw new TypeError('Unreachable')\n }\n const code = this.code = key.charCodeAt(index)\n // check code is ascii string\n if (code > 0x7F) {\n throw new TypeError('key must be ascii string')\n }\n if (key.length !== ++index) {\n this.middle = new TstNode(key, value, index)\n } else {\n this.value = value\n }\n }\n\n /**\n * @param {string} key\n * @param {any} value\n * @returns {void}\n */\n add (key, value) {\n const length = key.length\n if (length === 0) {\n throw new TypeError('Unreachable')\n }\n let index = 0\n /**\n * @type {TstNode}\n */\n let node = this\n while (true) {\n const code = key.charCodeAt(index)\n // check code is ascii string\n if (code > 0x7F) {\n throw new TypeError('key must be ascii string')\n }\n if (node.code === code) {\n if (length === ++index) {\n node.value = value\n break\n } else if (node.middle !== null) {\n node = node.middle\n } else {\n node.middle = new TstNode(key, value, index)\n break\n }\n } else if (node.code < code) {\n if (node.left !== null) {\n node = node.left\n } else {\n node.left = new TstNode(key, value, index)\n break\n }\n } else if (node.right !== null) {\n node = node.right\n } else {\n node.right = new TstNode(key, value, index)\n break\n }\n }\n }\n\n /**\n * @param {Uint8Array} key\n * @returns {TstNode | null}\n */\n search (key) {\n const keylength = key.length\n let index = 0\n /**\n * @type {TstNode|null}\n */\n let node = this\n while (node !== null && index < keylength) {\n let code = key[index]\n // A-Z\n // First check if it is bigger than 0x5a.\n // Lowercase letters have higher char codes than uppercase ones.\n // Also we assume that headers will mostly contain lowercase characters.\n if (code <= 0x5a && code >= 0x41) {\n // Lowercase for uppercase.\n code |= 32\n }\n while (node !== null) {\n if (code === node.code) {\n if (keylength === ++index) {\n // Returns Node since it is the last key.\n return node\n }\n node = node.middle\n break\n }\n node = node.code < code ? node.left : node.right\n }\n }\n return null\n }\n}\n\nclass TernarySearchTree {\n /** @type {TstNode | null} */\n node = null\n\n /**\n * @param {string} key\n * @param {any} value\n * @returns {void}\n * */\n insert (key, value) {\n if (this.node === null) {\n this.node = new TstNode(key, value, 0)\n } else {\n this.node.add(key, value)\n }\n }\n\n /**\n * @param {Uint8Array} key\n * @returns {any}\n */\n lookup (key) {\n return this.node?.search(key)?.value ?? null\n }\n}\n\nconst tree = new TernarySearchTree()\n\nfor (let i = 0; i < wellknownHeaderNames.length; ++i) {\n const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]]\n tree.insert(key, key)\n}\n\nmodule.exports = {\n TernarySearchTree,\n tree\n}\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { kDestroyed, kBodyUsed, kListeners, kBody } = require('./symbols')\nconst { IncomingMessage } = require('node:http')\nconst stream = require('node:stream')\nconst net = require('node:net')\nconst { stringify } = require('node:querystring')\nconst { EventEmitter: EE } = require('node:events')\nconst timers = require('../util/timers')\nconst { InvalidArgumentError, ConnectTimeoutError } = require('./errors')\nconst { headerNameLowerCasedRecord } = require('./constants')\nconst { tree } = require('./tree')\n\nconst [nodeMajor, nodeMinor] = process.versions.node.split('.', 2).map(v => Number(v))\n\nclass BodyAsyncIterable {\n constructor (body) {\n this[kBody] = body\n this[kBodyUsed] = false\n }\n\n async * [Symbol.asyncIterator] () {\n assert(!this[kBodyUsed], 'disturbed')\n this[kBodyUsed] = true\n yield * this[kBody]\n }\n}\n\nfunction noop () {}\n\n/**\n * @param {*} body\n * @returns {*}\n */\nfunction wrapRequestBody (body) {\n if (isStream(body)) {\n // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp\n // so that it can be dispatched again?\n // TODO (fix): Do we need 100-expect support to provide a way to do this properly?\n if (bodyLength(body) === 0) {\n body\n .on('data', function () {\n assert(false)\n })\n }\n\n if (typeof body.readableDidRead !== 'boolean') {\n body[kBodyUsed] = false\n EE.prototype.on.call(body, 'data', function () {\n this[kBodyUsed] = true\n })\n }\n\n return body\n } else if (body && typeof body.pipeTo === 'function') {\n // TODO (fix): We can't access ReadableStream internal state\n // to determine whether or not it has been disturbed. This is just\n // a workaround.\n return new BodyAsyncIterable(body)\n } else if (body && isFormDataLike(body)) {\n return body\n } else if (\n body &&\n typeof body !== 'string' &&\n !ArrayBuffer.isView(body) &&\n isIterable(body)\n ) {\n // TODO: Should we allow re-using iterable if !this.opts.idempotent\n // or through some other flag?\n return new BodyAsyncIterable(body)\n } else {\n return body\n }\n}\n\n/**\n * @param {*} obj\n * @returns {obj is import('node:stream').Stream}\n */\nfunction isStream (obj) {\n return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function'\n}\n\n/**\n * @param {*} object\n * @returns {object is Blob}\n * based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License)\n */\nfunction isBlobLike (object) {\n if (object === null) {\n return false\n } else if (object instanceof Blob) {\n return true\n } else if (typeof object !== 'object') {\n return false\n } else {\n const sTag = object[Symbol.toStringTag]\n\n return (sTag === 'Blob' || sTag === 'File') && (\n ('stream' in object && typeof object.stream === 'function') ||\n ('arrayBuffer' in object && typeof object.arrayBuffer === 'function')\n )\n }\n}\n\n/**\n * @param {string} url The path to check for query strings or fragments.\n * @returns {boolean} Returns true if the path contains a query string or fragment.\n */\nfunction pathHasQueryOrFragment (url) {\n return (\n url.includes('?') ||\n url.includes('#')\n )\n}\n\n/**\n * @param {string} url The URL to add the query params to\n * @param {import('node:querystring').ParsedUrlQueryInput} queryParams The object to serialize into a URL query string\n * @returns {string} The URL with the query params added\n */\nfunction serializePathWithQuery (url, queryParams) {\n if (pathHasQueryOrFragment(url)) {\n throw new Error('Query params cannot be passed when url already contains \"?\" or \"#\".')\n }\n\n const stringified = stringify(queryParams)\n\n if (stringified) {\n url += '?' + stringified\n }\n\n return url\n}\n\n/**\n * @param {number|string|undefined} port\n * @returns {boolean}\n */\nfunction isValidPort (port) {\n const value = parseInt(port, 10)\n return (\n value === Number(port) &&\n value >= 0 &&\n value <= 65535\n )\n}\n\n/**\n * Check if the value is a valid http or https prefixed string.\n *\n * @param {string} value\n * @returns {boolean}\n */\nfunction isHttpOrHttpsPrefixed (value) {\n return (\n value != null &&\n value[0] === 'h' &&\n value[1] === 't' &&\n value[2] === 't' &&\n value[3] === 'p' &&\n (\n value[4] === ':' ||\n (\n value[4] === 's' &&\n value[5] === ':'\n )\n )\n )\n}\n\n/**\n * @param {string|URL|Record} url\n * @returns {URL}\n */\nfunction parseURL (url) {\n if (typeof url === 'string') {\n /**\n * @type {URL}\n */\n url = new URL(url)\n\n if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) {\n throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')\n }\n\n return url\n }\n\n if (!url || typeof url !== 'object') {\n throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.')\n }\n\n if (!(url instanceof URL)) {\n if (url.port != null && url.port !== '' && isValidPort(url.port) === false) {\n throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.')\n }\n\n if (url.path != null && typeof url.path !== 'string') {\n throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.')\n }\n\n if (url.pathname != null && typeof url.pathname !== 'string') {\n throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.')\n }\n\n if (url.hostname != null && typeof url.hostname !== 'string') {\n throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.')\n }\n\n if (url.origin != null && typeof url.origin !== 'string') {\n throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.')\n }\n\n if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) {\n throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')\n }\n\n const port = url.port != null\n ? url.port\n : (url.protocol === 'https:' ? 443 : 80)\n let origin = url.origin != null\n ? url.origin\n : `${url.protocol || ''}//${url.hostname || ''}:${port}`\n let path = url.path != null\n ? url.path\n : `${url.pathname || ''}${url.search || ''}`\n\n if (origin[origin.length - 1] === '/') {\n origin = origin.slice(0, origin.length - 1)\n }\n\n if (path && path[0] !== '/') {\n path = `/${path}`\n }\n // new URL(path, origin) is unsafe when `path` contains an absolute URL\n // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL:\n // If first parameter is a relative URL, second param is required, and will be used as the base URL.\n // If first parameter is an absolute URL, a given second param will be ignored.\n return new URL(`${origin}${path}`)\n }\n\n if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) {\n throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.')\n }\n\n return url\n}\n\n/**\n * @param {string|URL|Record} url\n * @returns {URL}\n */\nfunction parseOrigin (url) {\n url = parseURL(url)\n\n if (url.pathname !== '/' || url.search || url.hash) {\n throw new InvalidArgumentError('invalid url')\n }\n\n return url\n}\n\n/**\n * @param {string} host\n * @returns {string}\n */\nfunction getHostname (host) {\n if (host[0] === '[') {\n const idx = host.indexOf(']')\n\n assert(idx !== -1)\n return host.substring(1, idx)\n }\n\n const idx = host.indexOf(':')\n if (idx === -1) return host\n\n return host.substring(0, idx)\n}\n\n/**\n * IP addresses are not valid server names per RFC6066\n * Currently, the only server names supported are DNS hostnames\n * @param {string|null} host\n * @returns {string|null}\n */\nfunction getServerName (host) {\n if (!host) {\n return null\n }\n\n assert(typeof host === 'string')\n\n const servername = getHostname(host)\n if (net.isIP(servername)) {\n return ''\n }\n\n return servername\n}\n\n/**\n * @function\n * @template T\n * @param {T} obj\n * @returns {T}\n */\nfunction deepClone (obj) {\n return JSON.parse(JSON.stringify(obj))\n}\n\n/**\n * @param {*} obj\n * @returns {obj is AsyncIterable}\n */\nfunction isAsyncIterable (obj) {\n return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function')\n}\n\n/**\n * @param {*} obj\n * @returns {obj is Iterable}\n */\nfunction isIterable (obj) {\n return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function'))\n}\n\n/**\n * Checks whether an object has a safe Symbol.iterator \u2014 i.e. one that is\n * either own or inherited from a non-Object.prototype chain. This prevents\n * prototype-pollution attacks from injecting a fake iterator on\n * Object.prototype.\n * @param {object} obj\n * @returns {boolean}\n */\nfunction hasSafeIterator (obj) {\n const prototype = Object.getPrototypeOf(obj)\n const ownIterator = Object.prototype.hasOwnProperty.call(obj, Symbol.iterator)\n return ownIterator || (prototype != null && prototype !== Object.prototype && typeof obj[Symbol.iterator] === 'function')\n}\n\n/**\n * @param {Blob|Buffer|import ('stream').Stream} body\n * @returns {number|null}\n */\nfunction bodyLength (body) {\n if (body == null) {\n return 0\n } else if (isStream(body)) {\n const state = body._readableState\n return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length)\n ? state.length\n : null\n } else if (isBlobLike(body)) {\n return body.size != null ? body.size : null\n } else if (isBuffer(body)) {\n return body.byteLength\n }\n\n return null\n}\n\n/**\n * @param {import ('stream').Stream} body\n * @returns {boolean}\n */\nfunction isDestroyed (body) {\n return body && !!(body.destroyed || body[kDestroyed] || (stream.isDestroyed?.(body)))\n}\n\n/**\n * @param {import ('stream').Stream} stream\n * @param {Error} [err]\n * @returns {void}\n */\nfunction destroy (stream, err) {\n if (stream == null || !isStream(stream) || isDestroyed(stream)) {\n return\n }\n\n if (typeof stream.destroy === 'function') {\n if (Object.getPrototypeOf(stream).constructor === IncomingMessage) {\n // See: https://github.com/nodejs/node/pull/38505/files\n stream.socket = null\n }\n\n stream.destroy(err)\n } else if (err) {\n queueMicrotask(() => {\n stream.emit('error', err)\n })\n }\n\n if (stream.destroyed !== true) {\n stream[kDestroyed] = true\n }\n}\n\nconst KEEPALIVE_TIMEOUT_EXPR = /timeout=(\\d+)/\n/**\n * @param {string} val\n * @returns {number | null}\n */\nfunction parseKeepAliveTimeout (val) {\n const m = val.match(KEEPALIVE_TIMEOUT_EXPR)\n return m ? parseInt(m[1], 10) * 1000 : null\n}\n\n/**\n * Retrieves a header name and returns its lowercase value.\n * @param {string | Buffer} value Header name\n * @returns {string}\n */\nfunction headerNameToString (value) {\n return typeof value === 'string'\n ? headerNameLowerCasedRecord[value] ?? value.toLowerCase()\n : tree.lookup(value) ?? value.toString('latin1').toLowerCase()\n}\n\n/**\n * Receive the buffer as a string and return its lowercase value.\n * @param {Buffer} value Header name\n * @returns {string}\n */\nfunction bufferToLowerCasedHeaderName (value) {\n return tree.lookup(value) ?? value.toString('latin1').toLowerCase()\n}\n\n/**\n * @param {(Buffer | string)[]} headers\n * @param {Record} [obj]\n * @returns {Record}\n */\nfunction parseHeaders (headers, obj) {\n if (obj === undefined) obj = {}\n\n for (let i = 0; i < headers.length; i += 2) {\n const key = headerNameToString(headers[i])\n let val = obj[key]\n\n if (val !== undefined) {\n if (!Object.hasOwn(obj, key)) {\n const headersValue = typeof headers[i + 1] === 'string'\n ? headers[i + 1]\n : Array.isArray(headers[i + 1])\n ? headers[i + 1].map(x => x.toString('latin1'))\n : headers[i + 1].toString('latin1')\n\n if (key === '__proto__') {\n Object.defineProperty(obj, key, {\n value: headersValue,\n enumerable: true,\n configurable: true,\n writable: true\n })\n } else {\n obj[key] = headersValue\n }\n } else {\n if (typeof val === 'string') {\n val = [val]\n obj[key] = val\n }\n val.push(headers[i + 1].toString('latin1'))\n }\n } else {\n const headersValue = typeof headers[i + 1] === 'string'\n ? headers[i + 1]\n : Array.isArray(headers[i + 1])\n ? headers[i + 1].map(x => x.toString('latin1'))\n : headers[i + 1].toString('latin1')\n\n obj[key] = headersValue\n }\n }\n\n return obj\n}\n\n/**\n * @param {Buffer[]} headers\n * @returns {string[]}\n */\nfunction parseRawHeaders (headers) {\n const headersLength = headers.length\n /**\n * @type {string[]}\n */\n const ret = new Array(headersLength)\n\n let key\n let val\n\n for (let n = 0; n < headersLength; n += 2) {\n key = headers[n]\n val = headers[n + 1]\n\n typeof key !== 'string' && (key = key.toString())\n typeof val !== 'string' && (val = val.toString('latin1'))\n\n ret[n] = key\n ret[n + 1] = val\n }\n\n return ret\n}\n\n/**\n * @param {string[]} headers\n * @param {Buffer[]} headers\n */\nfunction encodeRawHeaders (headers) {\n if (!Array.isArray(headers)) {\n throw new TypeError('expected headers to be an array')\n }\n return headers.map(x => Buffer.from(x))\n}\n\n/**\n * @param {*} buffer\n * @returns {buffer is Buffer}\n */\nfunction isBuffer (buffer) {\n // See, https://github.com/mcollina/undici/pull/319\n return buffer instanceof Uint8Array || Buffer.isBuffer(buffer)\n}\n\n/**\n * Asserts that the handler object is a request handler.\n *\n * @param {object} handler\n * @param {string} method\n * @param {string} [upgrade]\n * @returns {asserts handler is import('../api/api-request').RequestHandler}\n */\nfunction assertRequestHandler (handler, method, upgrade) {\n if (!handler || typeof handler !== 'object') {\n throw new InvalidArgumentError('handler must be an object')\n }\n\n if (typeof handler.onRequestStart === 'function') {\n // TODO (fix): More checks...\n return\n }\n\n if (typeof handler.onConnect !== 'function') {\n throw new InvalidArgumentError('invalid onConnect method')\n }\n\n if (typeof handler.onError !== 'function') {\n throw new InvalidArgumentError('invalid onError method')\n }\n\n if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) {\n throw new InvalidArgumentError('invalid onBodySent method')\n }\n\n if (upgrade || method === 'CONNECT') {\n if (typeof handler.onUpgrade !== 'function') {\n throw new InvalidArgumentError('invalid onUpgrade method')\n }\n } else {\n if (typeof handler.onHeaders !== 'function') {\n throw new InvalidArgumentError('invalid onHeaders method')\n }\n\n if (typeof handler.onData !== 'function') {\n throw new InvalidArgumentError('invalid onData method')\n }\n\n if (typeof handler.onComplete !== 'function') {\n throw new InvalidArgumentError('invalid onComplete method')\n }\n }\n}\n\n/**\n * A body is disturbed if it has been read from and it cannot be re-used without\n * losing state or data.\n * @param {import('node:stream').Readable} body\n * @returns {boolean}\n */\nfunction isDisturbed (body) {\n // TODO (fix): Why is body[kBodyUsed] needed?\n return !!(body && (stream.isDisturbed(body) || body[kBodyUsed]))\n}\n\n/**\n * @typedef {object} SocketInfo\n * @property {string} [localAddress]\n * @property {number} [localPort]\n * @property {string} [remoteAddress]\n * @property {number} [remotePort]\n * @property {string} [remoteFamily]\n * @property {number} [timeout]\n * @property {number} bytesWritten\n * @property {number} bytesRead\n */\n\n/**\n * @param {import('net').Socket} socket\n * @returns {SocketInfo}\n */\nfunction getSocketInfo (socket) {\n return {\n localAddress: socket.localAddress,\n localPort: socket.localPort,\n remoteAddress: socket.remoteAddress,\n remotePort: socket.remotePort,\n remoteFamily: socket.remoteFamily,\n timeout: socket.timeout,\n bytesWritten: socket.bytesWritten,\n bytesRead: socket.bytesRead\n }\n}\n\n/**\n * @param {Iterable} iterable\n * @returns {ReadableStream}\n */\nfunction ReadableStreamFrom (iterable) {\n // We cannot use ReadableStream.from here because it does not return a byte stream.\n\n let iterator\n return new ReadableStream(\n {\n start () {\n iterator = iterable[Symbol.asyncIterator]()\n },\n pull (controller) {\n return iterator.next().then(({ done, value }) => {\n if (done) {\n return queueMicrotask(() => {\n controller.close()\n controller.byobRequest?.respond(0)\n })\n } else {\n const buf = Buffer.isBuffer(value) ? value : Buffer.from(value)\n if (buf.byteLength) {\n return controller.enqueue(new Uint8Array(buf))\n } else {\n return this.pull(controller)\n }\n }\n })\n },\n cancel () {\n return iterator.return()\n },\n type: 'bytes'\n }\n )\n}\n\n/**\n * The object should be a FormData instance and contains all the required\n * methods.\n * @param {*} object\n * @returns {object is FormData}\n */\nfunction isFormDataLike (object) {\n return (\n object &&\n typeof object === 'object' &&\n typeof object.append === 'function' &&\n typeof object.delete === 'function' &&\n typeof object.get === 'function' &&\n typeof object.getAll === 'function' &&\n typeof object.has === 'function' &&\n typeof object.set === 'function' &&\n object[Symbol.toStringTag] === 'FormData'\n )\n}\n\nfunction addAbortListener (signal, listener) {\n if ('addEventListener' in signal) {\n signal.addEventListener('abort', listener, { once: true })\n return () => signal.removeEventListener('abort', listener)\n }\n signal.once('abort', listener)\n return () => signal.removeListener('abort', listener)\n}\n\nconst validTokenChars = new Uint8Array([\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0-15\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16-31\n 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, // 32-47 (!\"#$%&'()*+,-./)\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 48-63 (0-9:;<=>?)\n 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 64-79 (@A-O)\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, // 80-95 (P-Z[\\]^_)\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 96-111 (`a-o)\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, // 112-127 (p-z{|}~)\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 128-143\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 144-159\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 160-175\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 176-191\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 192-207\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 208-223\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 224-239\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // 240-255\n])\n\n/**\n * @see https://tools.ietf.org/html/rfc7230#section-3.2.6\n * @param {number} c\n * @returns {boolean}\n */\nfunction isTokenCharCode (c) {\n return (validTokenChars[c] === 1)\n}\n\nconst tokenRegExp = /^[\\^_`a-zA-Z\\-0-9!#$%&'*+.|~]+$/\n\n/**\n * @param {string} characters\n * @returns {boolean}\n */\nfunction isValidHTTPToken (characters) {\n if (characters.length >= 12) return tokenRegExp.test(characters)\n if (characters.length === 0) return false\n\n for (let i = 0; i < characters.length; i++) {\n if (validTokenChars[characters.charCodeAt(i)] !== 1) {\n return false\n }\n }\n return true\n}\n\n// headerCharRegex have been lifted from\n// https://github.com/nodejs/node/blob/main/lib/_http_common.js\n\n/**\n * Matches if val contains an invalid field-vchar\n * field-value = *( field-content / obs-fold )\n * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n * field-vchar = VCHAR / obs-text\n */\nconst headerCharRegex = /[^\\t\\x20-\\x7e\\x80-\\xff]/\n\n/**\n * @param {string} characters\n * @returns {boolean}\n */\nfunction isValidHeaderValue (characters) {\n return !headerCharRegex.test(characters)\n}\n\nconst rangeHeaderRegex = /^bytes (\\d+)-(\\d+)\\/(\\d+)?$/\n\n/**\n * @typedef {object} RangeHeader\n * @property {number} start\n * @property {number | null} end\n * @property {number | null} size\n */\n\n/**\n * Parse accordingly to RFC 9110\n * @see https://www.rfc-editor.org/rfc/rfc9110#field.content-range\n * @param {string} [range]\n * @returns {RangeHeader|null}\n */\nfunction parseRangeHeader (range) {\n if (range == null || range === '') return { start: 0, end: null, size: null }\n\n const m = range ? range.match(rangeHeaderRegex) : null\n return m\n ? {\n start: parseInt(m[1]),\n end: m[2] ? parseInt(m[2]) : null,\n size: m[3] ? parseInt(m[3]) : null\n }\n : null\n}\n\n/**\n * @template {import(\"events\").EventEmitter} T\n * @param {T} obj\n * @param {string} name\n * @param {(...args: any[]) => void} listener\n * @returns {T}\n */\nfunction addListener (obj, name, listener) {\n const listeners = (obj[kListeners] ??= [])\n listeners.push([name, listener])\n obj.on(name, listener)\n return obj\n}\n\n/**\n * @template {import(\"events\").EventEmitter} T\n * @param {T} obj\n * @returns {T}\n */\nfunction removeAllListeners (obj) {\n if (obj[kListeners] != null) {\n for (const [name, listener] of obj[kListeners]) {\n obj.removeListener(name, listener)\n }\n obj[kListeners] = null\n }\n return obj\n}\n\n/**\n * @param {import ('../dispatcher/client')} client\n * @param {import ('../core/request')} request\n * @param {Error} err\n */\nfunction errorRequest (client, request, err) {\n try {\n request.onError(err)\n assert(request.aborted)\n } catch (err) {\n client.emit('error', err)\n }\n}\n\n/**\n * @param {WeakRef} socketWeakRef\n * @param {object} opts\n * @param {number} opts.timeout\n * @param {string} opts.hostname\n * @param {number} opts.port\n * @returns {() => void}\n */\nconst setupConnectTimeout = process.platform === 'win32'\n ? (socketWeakRef, opts) => {\n if (!opts.timeout) {\n return noop\n }\n\n let s1 = null\n let s2 = null\n const fastTimer = timers.setFastTimeout(() => {\n // setImmediate is added to make sure that we prioritize socket error events over timeouts\n s1 = setImmediate(() => {\n // Windows needs an extra setImmediate probably due to implementation differences in the socket logic\n s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts))\n })\n }, opts.timeout)\n return () => {\n timers.clearFastTimeout(fastTimer)\n clearImmediate(s1)\n clearImmediate(s2)\n }\n }\n : (socketWeakRef, opts) => {\n if (!opts.timeout) {\n return noop\n }\n\n let s1 = null\n const fastTimer = timers.setFastTimeout(() => {\n // setImmediate is added to make sure that we prioritize socket error events over timeouts\n s1 = setImmediate(() => {\n onConnectTimeout(socketWeakRef.deref(), opts)\n })\n }, opts.timeout)\n return () => {\n timers.clearFastTimeout(fastTimer)\n clearImmediate(s1)\n }\n }\n\n/**\n * @param {net.Socket} socket\n * @param {object} opts\n * @param {number} opts.timeout\n * @param {string} opts.hostname\n * @param {number} opts.port\n */\nfunction onConnectTimeout (socket, opts) {\n // The socket could be already garbage collected\n if (socket == null) {\n return\n }\n\n let message = 'Connect Timeout Error'\n if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) {\n message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(', ')},`\n } else {\n message += ` (attempted address: ${opts.hostname}:${opts.port},`\n }\n\n message += ` timeout: ${opts.timeout}ms)`\n\n destroy(socket, new ConnectTimeoutError(message))\n}\n\n/**\n * @param {string} urlString\n * @returns {string}\n */\nfunction getProtocolFromUrlString (urlString) {\n if (\n urlString[0] === 'h' &&\n urlString[1] === 't' &&\n urlString[2] === 't' &&\n urlString[3] === 'p'\n ) {\n switch (urlString[4]) {\n case ':':\n return 'http:'\n case 's':\n if (urlString[5] === ':') {\n return 'https:'\n }\n }\n }\n // fallback if none of the usual suspects\n return urlString.slice(0, urlString.indexOf(':') + 1)\n}\n\nconst kEnumerableProperty = Object.create(null)\nkEnumerableProperty.enumerable = true\n\nconst normalizedMethodRecordsBase = {\n delete: 'DELETE',\n DELETE: 'DELETE',\n get: 'GET',\n GET: 'GET',\n head: 'HEAD',\n HEAD: 'HEAD',\n options: 'OPTIONS',\n OPTIONS: 'OPTIONS',\n post: 'POST',\n POST: 'POST',\n put: 'PUT',\n PUT: 'PUT'\n}\n\nconst normalizedMethodRecords = {\n ...normalizedMethodRecordsBase,\n patch: 'patch',\n PATCH: 'PATCH'\n}\n\n// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`.\nObject.setPrototypeOf(normalizedMethodRecordsBase, null)\nObject.setPrototypeOf(normalizedMethodRecords, null)\n\nmodule.exports = {\n kEnumerableProperty,\n isDisturbed,\n isBlobLike,\n parseOrigin,\n parseURL,\n getServerName,\n isStream,\n isIterable,\n hasSafeIterator,\n isAsyncIterable,\n isDestroyed,\n headerNameToString,\n bufferToLowerCasedHeaderName,\n addListener,\n removeAllListeners,\n errorRequest,\n parseRawHeaders,\n encodeRawHeaders,\n parseHeaders,\n parseKeepAliveTimeout,\n destroy,\n bodyLength,\n deepClone,\n ReadableStreamFrom,\n isBuffer,\n assertRequestHandler,\n getSocketInfo,\n isFormDataLike,\n pathHasQueryOrFragment,\n serializePathWithQuery,\n addAbortListener,\n isValidHTTPToken,\n isValidHeaderValue,\n isTokenCharCode,\n parseRangeHeader,\n normalizedMethodRecordsBase,\n normalizedMethodRecords,\n isValidPort,\n isHttpOrHttpsPrefixed,\n nodeMajor,\n nodeMinor,\n safeHTTPMethods: Object.freeze(['GET', 'HEAD', 'OPTIONS', 'TRACE']),\n wrapRequestBody,\n setupConnectTimeout,\n getProtocolFromUrlString\n}\n", "'use strict'\n\nconst {\n kConnected,\n kPending,\n kRunning,\n kSize,\n kFree,\n kQueued\n} = require('../core/symbols')\n\nclass ClientStats {\n constructor (client) {\n this.connected = client[kConnected]\n this.pending = client[kPending]\n this.running = client[kRunning]\n this.size = client[kSize]\n }\n}\n\nclass PoolStats {\n constructor (pool) {\n this.connected = pool[kConnected]\n this.free = pool[kFree]\n this.pending = pool[kPending]\n this.queued = pool[kQueued]\n this.running = pool[kRunning]\n this.size = pool[kSize]\n }\n}\n\nmodule.exports = { ClientStats, PoolStats }\n", "'use strict'\n\nconst diagnosticsChannel = require('node:diagnostics_channel')\nconst util = require('node:util')\n\nconst undiciDebugLog = util.debuglog('undici')\nconst fetchDebuglog = util.debuglog('fetch')\nconst websocketDebuglog = util.debuglog('websocket')\n\nconst channels = {\n // Client\n beforeConnect: diagnosticsChannel.channel('undici:client:beforeConnect'),\n connected: diagnosticsChannel.channel('undici:client:connected'),\n connectError: diagnosticsChannel.channel('undici:client:connectError'),\n sendHeaders: diagnosticsChannel.channel('undici:client:sendHeaders'),\n // Request\n create: diagnosticsChannel.channel('undici:request:create'),\n bodySent: diagnosticsChannel.channel('undici:request:bodySent'),\n bodyChunkSent: diagnosticsChannel.channel('undici:request:bodyChunkSent'),\n bodyChunkReceived: diagnosticsChannel.channel('undici:request:bodyChunkReceived'),\n headers: diagnosticsChannel.channel('undici:request:headers'),\n trailers: diagnosticsChannel.channel('undici:request:trailers'),\n error: diagnosticsChannel.channel('undici:request:error'),\n // WebSocket\n open: diagnosticsChannel.channel('undici:websocket:open'),\n close: diagnosticsChannel.channel('undici:websocket:close'),\n socketError: diagnosticsChannel.channel('undici:websocket:socket_error'),\n ping: diagnosticsChannel.channel('undici:websocket:ping'),\n pong: diagnosticsChannel.channel('undici:websocket:pong'),\n // ProxyAgent\n proxyConnected: diagnosticsChannel.channel('undici:proxy:connected')\n}\n\nlet isTrackingClientEvents = false\n\nfunction trackClientEvents (debugLog = undiciDebugLog) {\n if (isTrackingClientEvents) {\n return\n }\n\n // Check if any of the channels already have subscribers to prevent duplicate subscriptions\n // This can happen when both Node.js built-in undici and undici as a dependency are present\n if (channels.beforeConnect.hasSubscribers || channels.connected.hasSubscribers ||\n channels.connectError.hasSubscribers || channels.sendHeaders.hasSubscribers) {\n isTrackingClientEvents = true\n return\n }\n\n isTrackingClientEvents = true\n\n diagnosticsChannel.subscribe('undici:client:beforeConnect',\n evt => {\n const {\n connectParams: { version, protocol, port, host }\n } = evt\n debugLog(\n 'connecting to %s%s using %s%s',\n host,\n port ? `:${port}` : '',\n protocol,\n version\n )\n })\n\n diagnosticsChannel.subscribe('undici:client:connected',\n evt => {\n const {\n connectParams: { version, protocol, port, host }\n } = evt\n debugLog(\n 'connected to %s%s using %s%s',\n host,\n port ? `:${port}` : '',\n protocol,\n version\n )\n })\n\n diagnosticsChannel.subscribe('undici:client:connectError',\n evt => {\n const {\n connectParams: { version, protocol, port, host },\n error\n } = evt\n debugLog(\n 'connection to %s%s using %s%s errored - %s',\n host,\n port ? `:${port}` : '',\n protocol,\n version,\n error.message\n )\n })\n\n diagnosticsChannel.subscribe('undici:client:sendHeaders',\n evt => {\n const {\n request: { method, path, origin }\n } = evt\n debugLog('sending request to %s %s%s', method, origin, path)\n })\n}\n\nlet isTrackingRequestEvents = false\n\nfunction trackRequestEvents (debugLog = undiciDebugLog) {\n if (isTrackingRequestEvents) {\n return\n }\n\n // Check if any of the channels already have subscribers to prevent duplicate subscriptions\n // This can happen when both Node.js built-in undici and undici as a dependency are present\n if (channels.headers.hasSubscribers || channels.trailers.hasSubscribers ||\n channels.error.hasSubscribers) {\n isTrackingRequestEvents = true\n return\n }\n\n isTrackingRequestEvents = true\n\n diagnosticsChannel.subscribe('undici:request:headers',\n evt => {\n const {\n request: { method, path, origin },\n response: { statusCode }\n } = evt\n debugLog(\n 'received response to %s %s%s - HTTP %d',\n method,\n origin,\n path,\n statusCode\n )\n })\n\n diagnosticsChannel.subscribe('undici:request:trailers',\n evt => {\n const {\n request: { method, path, origin }\n } = evt\n debugLog('trailers received from %s %s%s', method, origin, path)\n })\n\n diagnosticsChannel.subscribe('undici:request:error',\n evt => {\n const {\n request: { method, path, origin },\n error\n } = evt\n debugLog(\n 'request to %s %s%s errored - %s',\n method,\n origin,\n path,\n error.message\n )\n })\n}\n\nlet isTrackingWebSocketEvents = false\n\nfunction trackWebSocketEvents (debugLog = websocketDebuglog) {\n if (isTrackingWebSocketEvents) {\n return\n }\n\n // Check if any of the channels already have subscribers to prevent duplicate subscriptions\n // This can happen when both Node.js built-in undici and undici as a dependency are present\n if (channels.open.hasSubscribers || channels.close.hasSubscribers ||\n channels.socketError.hasSubscribers || channels.ping.hasSubscribers ||\n channels.pong.hasSubscribers) {\n isTrackingWebSocketEvents = true\n return\n }\n\n isTrackingWebSocketEvents = true\n\n diagnosticsChannel.subscribe('undici:websocket:open',\n evt => {\n if (evt.address != null) {\n const { address, port } = evt.address\n debugLog('connection opened %s%s', address, port ? `:${port}` : '')\n } else {\n debugLog('connection opened')\n }\n })\n\n diagnosticsChannel.subscribe('undici:websocket:close',\n evt => {\n const { websocket, code, reason } = evt\n debugLog(\n 'closed connection to %s - %s %s',\n websocket.url,\n code,\n reason\n )\n })\n\n diagnosticsChannel.subscribe('undici:websocket:socket_error',\n err => {\n debugLog('connection errored - %s', err.message)\n })\n\n diagnosticsChannel.subscribe('undici:websocket:ping',\n evt => {\n debugLog('ping received')\n })\n\n diagnosticsChannel.subscribe('undici:websocket:pong',\n evt => {\n debugLog('pong received')\n })\n}\n\nif (undiciDebugLog.enabled || fetchDebuglog.enabled) {\n trackClientEvents(fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog)\n trackRequestEvents(fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog)\n}\n\nif (websocketDebuglog.enabled) {\n trackClientEvents(undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog)\n trackWebSocketEvents(websocketDebuglog)\n}\n\nmodule.exports = {\n channels\n}\n", "'use strict'\n\nconst {\n InvalidArgumentError,\n NotSupportedError\n} = require('./errors')\nconst assert = require('node:assert')\nconst {\n isValidHTTPToken,\n isValidHeaderValue,\n isStream,\n destroy,\n isBuffer,\n isFormDataLike,\n isIterable,\n hasSafeIterator,\n isBlobLike,\n serializePathWithQuery,\n assertRequestHandler,\n getServerName,\n normalizedMethodRecords,\n getProtocolFromUrlString\n} = require('./util')\nconst { channels } = require('./diagnostics.js')\nconst { headerNameLowerCasedRecord } = require('./constants')\n\n// Verifies that a given path is valid does not contain control chars \\x00 to \\x20\nconst invalidPathRegex = /[^\\u0021-\\u00ff]/\n\nconst kHandler = Symbol('handler')\n\nclass Request {\n constructor (origin, {\n path,\n method,\n body,\n headers,\n query,\n idempotent,\n blocking,\n upgrade,\n headersTimeout,\n bodyTimeout,\n reset,\n expectContinue,\n servername,\n throwOnError,\n maxRedirections,\n typeOfService\n }, handler) {\n if (typeof path !== 'string') {\n throw new InvalidArgumentError('path must be a string')\n } else if (\n path[0] !== '/' &&\n !(path.startsWith('http://') || path.startsWith('https://')) &&\n method !== 'CONNECT'\n ) {\n throw new InvalidArgumentError('path must be an absolute URL or start with a slash')\n } else if (invalidPathRegex.test(path)) {\n throw new InvalidArgumentError('invalid request path')\n }\n\n if (typeof method !== 'string') {\n throw new InvalidArgumentError('method must be a string')\n } else if (normalizedMethodRecords[method] === undefined && !isValidHTTPToken(method)) {\n throw new InvalidArgumentError('invalid request method')\n }\n\n if (upgrade && typeof upgrade !== 'string') {\n throw new InvalidArgumentError('upgrade must be a string')\n }\n\n if (upgrade && !isValidHeaderValue(upgrade)) {\n throw new InvalidArgumentError('invalid upgrade header')\n }\n\n if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) {\n throw new InvalidArgumentError('invalid headersTimeout')\n }\n\n if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) {\n throw new InvalidArgumentError('invalid bodyTimeout')\n }\n\n if (reset != null && typeof reset !== 'boolean') {\n throw new InvalidArgumentError('invalid reset')\n }\n\n if (expectContinue != null && typeof expectContinue !== 'boolean') {\n throw new InvalidArgumentError('invalid expectContinue')\n }\n\n if (throwOnError != null) {\n throw new InvalidArgumentError('invalid throwOnError')\n }\n\n if (maxRedirections != null && maxRedirections !== 0) {\n throw new InvalidArgumentError('maxRedirections is not supported, use the redirect interceptor')\n }\n\n if (typeOfService != null && (!Number.isInteger(typeOfService) || typeOfService < 0 || typeOfService > 255)) {\n throw new InvalidArgumentError('typeOfService must be an integer between 0 and 255')\n }\n\n this.headersTimeout = headersTimeout\n\n this.bodyTimeout = bodyTimeout\n\n this.method = method\n\n this.typeOfService = typeOfService ?? 0\n\n this.abort = null\n\n if (body == null) {\n this.body = null\n } else if (isStream(body)) {\n this.body = body\n\n const rState = this.body._readableState\n if (!rState || !rState.autoDestroy) {\n this.endHandler = function autoDestroy () {\n destroy(this)\n }\n this.body.on('end', this.endHandler)\n }\n\n this.errorHandler = err => {\n if (this.abort) {\n this.abort(err)\n } else {\n this.error = err\n }\n }\n this.body.on('error', this.errorHandler)\n } else if (isBuffer(body)) {\n this.body = body.byteLength ? body : null\n } else if (ArrayBuffer.isView(body)) {\n this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null\n } else if (body instanceof ArrayBuffer) {\n this.body = body.byteLength ? Buffer.from(body) : null\n } else if (typeof body === 'string') {\n this.body = body.length ? Buffer.from(body) : null\n } else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) {\n this.body = body\n } else {\n throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable')\n }\n\n this.completed = false\n this.aborted = false\n\n this.upgrade = upgrade || null\n\n this.path = query ? serializePathWithQuery(path, query) : path\n\n // TODO: shall we maybe standardize it to an URL object?\n this.origin = origin\n\n this.protocol = getProtocolFromUrlString(origin)\n\n this.idempotent = idempotent == null\n ? method === 'HEAD' || method === 'GET'\n : idempotent\n\n this.blocking = blocking ?? this.method !== 'HEAD'\n\n this.reset = reset == null ? null : reset\n\n this.host = null\n\n this.contentLength = null\n\n this.contentType = null\n\n this.headers = []\n\n // Only for H2\n this.expectContinue = expectContinue != null ? expectContinue : false\n\n if (Array.isArray(headers)) {\n if (headers.length % 2 !== 0) {\n throw new InvalidArgumentError('headers array must be even')\n }\n for (let i = 0; i < headers.length; i += 2) {\n processHeader(this, headers[i], headers[i + 1])\n }\n } else if (headers && typeof headers === 'object') {\n if (hasSafeIterator(headers)) {\n for (const header of headers) {\n if (!Array.isArray(header) || header.length !== 2) {\n throw new InvalidArgumentError('headers must be in key-value pair format')\n }\n processHeader(this, header[0], header[1])\n }\n } else {\n const keys = Object.keys(headers)\n for (let i = 0; i < keys.length; ++i) {\n processHeader(this, keys[i], headers[keys[i]])\n }\n }\n } else if (headers != null) {\n throw new InvalidArgumentError('headers must be an object or an array')\n }\n\n assertRequestHandler(handler, method, upgrade)\n\n this.servername = servername || getServerName(this.host) || null\n\n this[kHandler] = handler\n\n if (channels.create.hasSubscribers) {\n channels.create.publish({ request: this })\n }\n }\n\n onBodySent (chunk) {\n if (channels.bodyChunkSent.hasSubscribers) {\n channels.bodyChunkSent.publish({ request: this, chunk })\n }\n if (this[kHandler].onBodySent) {\n try {\n return this[kHandler].onBodySent(chunk)\n } catch (err) {\n this.abort(err)\n }\n }\n }\n\n onRequestSent () {\n if (channels.bodySent.hasSubscribers) {\n channels.bodySent.publish({ request: this })\n }\n\n if (this[kHandler].onRequestSent) {\n try {\n return this[kHandler].onRequestSent()\n } catch (err) {\n this.abort(err)\n }\n }\n }\n\n onConnect (abort) {\n assert(!this.aborted)\n assert(!this.completed)\n\n if (this.error) {\n abort(this.error)\n } else {\n this.abort = abort\n return this[kHandler].onConnect(abort)\n }\n }\n\n onResponseStarted () {\n return this[kHandler].onResponseStarted?.()\n }\n\n onHeaders (statusCode, headers, resume, statusText) {\n assert(!this.aborted)\n assert(!this.completed)\n\n if (channels.headers.hasSubscribers) {\n channels.headers.publish({ request: this, response: { statusCode, headers, statusText } })\n }\n\n try {\n return this[kHandler].onHeaders(statusCode, headers, resume, statusText)\n } catch (err) {\n this.abort(err)\n }\n }\n\n onData (chunk) {\n assert(!this.aborted)\n assert(!this.completed)\n\n if (channels.bodyChunkReceived.hasSubscribers) {\n channels.bodyChunkReceived.publish({ request: this, chunk })\n }\n try {\n return this[kHandler].onData(chunk)\n } catch (err) {\n this.abort(err)\n return false\n }\n }\n\n onUpgrade (statusCode, headers, socket) {\n assert(!this.aborted)\n assert(!this.completed)\n\n return this[kHandler].onUpgrade(statusCode, headers, socket)\n }\n\n onComplete (trailers) {\n this.onFinally()\n\n assert(!this.aborted)\n assert(!this.completed)\n\n this.completed = true\n if (channels.trailers.hasSubscribers) {\n channels.trailers.publish({ request: this, trailers })\n }\n\n try {\n return this[kHandler].onComplete(trailers)\n } catch (err) {\n // TODO (fix): This might be a bad idea?\n this.onError(err)\n }\n }\n\n onError (error) {\n this.onFinally()\n\n if (channels.error.hasSubscribers) {\n channels.error.publish({ request: this, error })\n }\n\n if (this.aborted) {\n return\n }\n this.aborted = true\n\n return this[kHandler].onError(error)\n }\n\n onFinally () {\n if (this.errorHandler) {\n this.body.off('error', this.errorHandler)\n this.errorHandler = null\n }\n\n if (this.endHandler) {\n this.body.off('end', this.endHandler)\n this.endHandler = null\n }\n }\n\n addHeader (key, value) {\n processHeader(this, key, value)\n return this\n }\n}\n\nfunction processHeader (request, key, val) {\n if (val && (typeof val === 'object' && !Array.isArray(val))) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n } else if (val === undefined) {\n return\n }\n\n let headerName = headerNameLowerCasedRecord[key]\n\n if (headerName === undefined) {\n headerName = key.toLowerCase()\n if (headerNameLowerCasedRecord[headerName] === undefined && !isValidHTTPToken(headerName)) {\n throw new InvalidArgumentError('invalid header key')\n }\n }\n\n if (Array.isArray(val)) {\n const arr = []\n for (let i = 0; i < val.length; i++) {\n if (typeof val[i] === 'string') {\n if (!isValidHeaderValue(val[i])) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n }\n arr.push(val[i])\n } else if (val[i] === null) {\n arr.push('')\n } else if (typeof val[i] === 'object') {\n throw new InvalidArgumentError(`invalid ${key} header`)\n } else {\n arr.push(`${val[i]}`)\n }\n }\n val = arr\n } else if (typeof val === 'string') {\n if (!isValidHeaderValue(val)) {\n throw new InvalidArgumentError(`invalid ${key} header`)\n }\n } else if (val === null) {\n val = ''\n } else {\n val = `${val}`\n }\n\n if (headerName === 'host') {\n if (request.host !== null) {\n throw new InvalidArgumentError('duplicate host header')\n }\n if (typeof val !== 'string') {\n throw new InvalidArgumentError('invalid host header')\n }\n // Consumed by Client\n request.host = val\n } else if (headerName === 'content-length') {\n if (request.contentLength !== null) {\n throw new InvalidArgumentError('duplicate content-length header')\n }\n request.contentLength = parseInt(val, 10)\n if (!Number.isFinite(request.contentLength)) {\n throw new InvalidArgumentError('invalid content-length header')\n }\n } else if (request.contentType === null && headerName === 'content-type') {\n request.contentType = val\n request.headers.push(key, val)\n } else if (headerName === 'transfer-encoding' || headerName === 'keep-alive' || headerName === 'upgrade') {\n throw new InvalidArgumentError(`invalid ${headerName} header`)\n } else if (headerName === 'connection') {\n // Per RFC 7230 Section 6.1, Connection header can contain\n // a comma-separated list of connection option tokens (header names)\n const value = typeof val === 'string' ? val : null\n if (value === null) {\n throw new InvalidArgumentError('invalid connection header')\n }\n\n for (const token of value.toLowerCase().split(',')) {\n const trimmed = token.trim()\n if (!isValidHTTPToken(trimmed)) {\n throw new InvalidArgumentError('invalid connection header')\n }\n if (trimmed === 'close') {\n request.reset = true\n }\n }\n } else if (headerName === 'expect') {\n throw new NotSupportedError('expect header not supported')\n } else {\n request.headers.push(key, val)\n }\n}\n\nmodule.exports = Request\n", "'use strict'\n\nconst { InvalidArgumentError } = require('../core/errors')\n\nmodule.exports = class WrapHandler {\n #handler\n\n constructor (handler) {\n this.#handler = handler\n }\n\n static wrap (handler) {\n // TODO (fix): More checks...\n return handler.onRequestStart ? handler : new WrapHandler(handler)\n }\n\n // Unwrap Interface\n\n onConnect (abort, context) {\n return this.#handler.onConnect?.(abort, context)\n }\n\n onResponseStarted () {\n return this.#handler.onResponseStarted?.()\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n return this.#handler.onHeaders?.(statusCode, rawHeaders, resume, statusMessage)\n }\n\n onUpgrade (statusCode, rawHeaders, socket) {\n return this.#handler.onUpgrade?.(statusCode, rawHeaders, socket)\n }\n\n onData (data) {\n return this.#handler.onData?.(data)\n }\n\n onComplete (trailers) {\n return this.#handler.onComplete?.(trailers)\n }\n\n onError (err) {\n if (!this.#handler.onError) {\n throw err\n }\n\n return this.#handler.onError?.(err)\n }\n\n // Wrap Interface\n\n onRequestStart (controller, context) {\n this.#handler.onConnect?.((reason) => controller.abort(reason), context)\n }\n\n onRequestUpgrade (controller, statusCode, headers, socket) {\n const rawHeaders = []\n for (const [key, val] of Object.entries(headers)) {\n rawHeaders.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val))\n }\n\n this.#handler.onUpgrade?.(statusCode, rawHeaders, socket)\n }\n\n onResponseStart (controller, statusCode, headers, statusMessage) {\n const rawHeaders = []\n for (const [key, val] of Object.entries(headers)) {\n rawHeaders.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val))\n }\n\n if (this.#handler.onHeaders?.(statusCode, rawHeaders, () => controller.resume(), statusMessage) === false) {\n controller.pause()\n }\n }\n\n onResponseData (controller, data) {\n if (this.#handler.onData?.(data) === false) {\n controller.pause()\n }\n }\n\n onResponseEnd (controller, trailers) {\n const rawTrailers = []\n for (const [key, val] of Object.entries(trailers)) {\n rawTrailers.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val))\n }\n\n this.#handler.onComplete?.(rawTrailers)\n }\n\n onResponseError (controller, err) {\n if (!this.#handler.onError) {\n throw new InvalidArgumentError('invalid onError method')\n }\n\n this.#handler.onError?.(err)\n }\n}\n\nfunction toRawHeaderValue (value) {\n return Array.isArray(value)\n ? value.map((item) => Buffer.from(item, 'latin1'))\n : Buffer.from(value, 'latin1')\n}\n", "'use strict'\nconst EventEmitter = require('node:events')\nconst WrapHandler = require('../handler/wrap-handler')\n\nconst wrapInterceptor = (dispatch) => (opts, handler) => dispatch(opts, WrapHandler.wrap(handler))\n\nclass Dispatcher extends EventEmitter {\n dispatch () {\n throw new Error('not implemented')\n }\n\n close () {\n throw new Error('not implemented')\n }\n\n destroy () {\n throw new Error('not implemented')\n }\n\n compose (...args) {\n // So we handle [interceptor1, interceptor2] or interceptor1, interceptor2, ...\n const interceptors = Array.isArray(args[0]) ? args[0] : args\n let dispatch = this.dispatch.bind(this)\n\n for (const interceptor of interceptors) {\n if (interceptor == null) {\n continue\n }\n\n if (typeof interceptor !== 'function') {\n throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`)\n }\n\n dispatch = interceptor(dispatch)\n dispatch = wrapInterceptor(dispatch)\n\n if (dispatch == null || typeof dispatch !== 'function' || dispatch.length !== 2) {\n throw new TypeError('invalid interceptor')\n }\n }\n\n return new Proxy(this, {\n get: (target, key) => key === 'dispatch' ? dispatch : target[key]\n })\n }\n}\n\nmodule.exports = Dispatcher\n", "'use strict'\n\nconst { parseHeaders } = require('../core/util')\nconst { InvalidArgumentError } = require('../core/errors')\n\nconst kResume = Symbol('resume')\n\nclass UnwrapController {\n #paused = false\n #reason = null\n #aborted = false\n #abort\n\n [kResume] = null\n\n constructor (abort) {\n this.#abort = abort\n }\n\n pause () {\n this.#paused = true\n }\n\n resume () {\n if (this.#paused) {\n this.#paused = false\n this[kResume]?.()\n }\n }\n\n abort (reason) {\n if (!this.#aborted) {\n this.#aborted = true\n this.#reason = reason\n this.#abort(reason)\n }\n }\n\n get aborted () {\n return this.#aborted\n }\n\n get reason () {\n return this.#reason\n }\n\n get paused () {\n return this.#paused\n }\n}\n\nmodule.exports = class UnwrapHandler {\n #handler\n #controller\n\n constructor (handler) {\n this.#handler = handler\n }\n\n static unwrap (handler) {\n // TODO (fix): More checks...\n return !handler.onRequestStart ? handler : new UnwrapHandler(handler)\n }\n\n onConnect (abort, context) {\n this.#controller = new UnwrapController(abort)\n this.#handler.onRequestStart?.(this.#controller, context)\n }\n\n onResponseStarted () {\n return this.#handler.onResponseStarted?.()\n }\n\n onUpgrade (statusCode, rawHeaders, socket) {\n this.#handler.onRequestUpgrade?.(this.#controller, statusCode, parseHeaders(rawHeaders), socket)\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n this.#controller[kResume] = resume\n this.#handler.onResponseStart?.(this.#controller, statusCode, parseHeaders(rawHeaders), statusMessage)\n return !this.#controller.paused\n }\n\n onData (data) {\n this.#handler.onResponseData?.(this.#controller, data)\n return !this.#controller.paused\n }\n\n onComplete (rawTrailers) {\n this.#handler.onResponseEnd?.(this.#controller, parseHeaders(rawTrailers))\n }\n\n onError (err) {\n if (!this.#handler.onResponseError) {\n throw new InvalidArgumentError('invalid onError method')\n }\n\n this.#handler.onResponseError?.(this.#controller, err)\n }\n}\n", "'use strict'\n\nconst Dispatcher = require('./dispatcher')\nconst UnwrapHandler = require('../handler/unwrap-handler')\nconst {\n ClientDestroyedError,\n ClientClosedError,\n InvalidArgumentError\n} = require('../core/errors')\nconst { kDestroy, kClose, kClosed, kDestroyed, kDispatch } = require('../core/symbols')\n\nconst kOnDestroyed = Symbol('onDestroyed')\nconst kOnClosed = Symbol('onClosed')\n\nclass DispatcherBase extends Dispatcher {\n /** @type {boolean} */\n [kDestroyed] = false;\n\n /** @type {Array|null} */\n [kOnClosed] = null\n\n /** @returns {boolean} */\n get destroyed () {\n return this[kDestroyed]\n }\n\n /** @returns {boolean} */\n get closed () {\n return this[kClosed]\n }\n\n close (callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n this.close((err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (this[kDestroyed]) {\n const err = new ClientDestroyedError()\n queueMicrotask(() => callback(err, null))\n return\n }\n\n if (this[kClosed]) {\n if (this[kOnClosed]) {\n this[kOnClosed].push(callback)\n } else {\n queueMicrotask(() => callback(null, null))\n }\n return\n }\n\n this[kClosed] = true\n this[kOnClosed] ??= []\n this[kOnClosed].push(callback)\n\n const onClosed = () => {\n const callbacks = this[kOnClosed]\n this[kOnClosed] = null\n for (let i = 0; i < callbacks.length; i++) {\n callbacks[i](null, null)\n }\n }\n\n // Should not error.\n this[kClose]()\n .then(() => this.destroy())\n .then(() => queueMicrotask(onClosed))\n }\n\n destroy (err, callback) {\n if (typeof err === 'function') {\n callback = err\n err = null\n }\n\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n this.destroy(err, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (this[kDestroyed]) {\n if (this[kOnDestroyed]) {\n this[kOnDestroyed].push(callback)\n } else {\n queueMicrotask(() => callback(null, null))\n }\n return\n }\n\n if (!err) {\n err = new ClientDestroyedError()\n }\n\n this[kDestroyed] = true\n this[kOnDestroyed] ??= []\n this[kOnDestroyed].push(callback)\n\n const onDestroyed = () => {\n const callbacks = this[kOnDestroyed]\n this[kOnDestroyed] = null\n for (let i = 0; i < callbacks.length; i++) {\n callbacks[i](null, null)\n }\n }\n\n // Should not error.\n this[kDestroy](err)\n .then(() => queueMicrotask(onDestroyed))\n }\n\n dispatch (opts, handler) {\n if (!handler || typeof handler !== 'object') {\n throw new InvalidArgumentError('handler must be an object')\n }\n\n handler = UnwrapHandler.unwrap(handler)\n\n try {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('opts must be an object.')\n }\n\n if (this[kDestroyed] || this[kOnDestroyed]) {\n throw new ClientDestroyedError()\n }\n\n if (this[kClosed]) {\n throw new ClientClosedError()\n }\n\n return this[kDispatch](opts, handler)\n } catch (err) {\n if (typeof handler.onError !== 'function') {\n throw err\n }\n\n handler.onError(err)\n\n return false\n }\n }\n}\n\nmodule.exports = DispatcherBase\n", "'use strict'\n\nconst net = require('node:net')\nconst assert = require('node:assert')\nconst util = require('./util')\nconst { InvalidArgumentError } = require('./errors')\n\nlet tls // include tls conditionally since it is not always available\n\n// TODO: session re-use does not wait for the first\n// connection to resolve the session and might therefore\n// resolve the same servername multiple times even when\n// re-use is enabled.\n\nconst SessionCache = class WeakSessionCache {\n constructor (maxCachedSessions) {\n this._maxCachedSessions = maxCachedSessions\n this._sessionCache = new Map()\n this._sessionRegistry = new FinalizationRegistry((key) => {\n if (this._sessionCache.size < this._maxCachedSessions) {\n return\n }\n\n const ref = this._sessionCache.get(key)\n if (ref !== undefined && ref.deref() === undefined) {\n this._sessionCache.delete(key)\n }\n })\n }\n\n get (sessionKey) {\n const ref = this._sessionCache.get(sessionKey)\n return ref ? ref.deref() : null\n }\n\n set (sessionKey, session) {\n if (this._maxCachedSessions === 0) {\n return\n }\n\n this._sessionCache.set(sessionKey, new WeakRef(session))\n this._sessionRegistry.register(session, sessionKey)\n }\n}\n\nfunction buildConnector ({ allowH2, useH2c, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) {\n if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) {\n throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero')\n }\n\n const options = { path: socketPath, ...opts }\n const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions)\n timeout = timeout == null ? 10e3 : timeout\n allowH2 = allowH2 != null ? allowH2 : false\n return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) {\n let socket\n if (protocol === 'https:') {\n if (!tls) {\n tls = require('node:tls')\n }\n servername = servername || options.servername || util.getServerName(host) || null\n\n const sessionKey = servername || hostname\n assert(sessionKey)\n\n const session = customSession || sessionCache.get(sessionKey) || null\n\n port = port || 443\n\n socket = tls.connect({\n highWaterMark: 16384, // TLS in node can't have bigger HWM anyway...\n ...options,\n servername,\n session,\n localAddress,\n ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'],\n socket: httpSocket, // upgrade socket connection\n port,\n host: hostname\n })\n\n socket\n .on('session', function (session) {\n // TODO (fix): Can a session become invalid once established? Don't think so?\n sessionCache.set(sessionKey, session)\n })\n } else {\n assert(!httpSocket, 'httpSocket can only be sent on TLS update')\n\n port = port || 80\n\n socket = net.connect({\n highWaterMark: 64 * 1024, // Same as nodejs fs streams.\n ...options,\n localAddress,\n port,\n host: hostname\n })\n if (useH2c === true) {\n socket.alpnProtocol = 'h2'\n }\n }\n\n // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket\n if (options.keepAlive == null || options.keepAlive) {\n const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay\n socket.setKeepAlive(true, keepAliveInitialDelay)\n }\n\n const clearConnectTimeout = util.setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port })\n\n socket\n .setNoDelay(true)\n .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () {\n queueMicrotask(clearConnectTimeout)\n\n if (callback) {\n const cb = callback\n callback = null\n cb(null, this)\n }\n })\n .on('error', function (err) {\n queueMicrotask(clearConnectTimeout)\n\n if (callback) {\n const cb = callback\n callback = null\n cb(err)\n }\n })\n\n return socket\n }\n}\n\nmodule.exports = buildConnector\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.enumToMap = enumToMap;\nfunction enumToMap(obj, filter = [], exceptions = []) {\n const emptyFilter = (filter?.length ?? 0) === 0;\n const emptyExceptions = (exceptions?.length ?? 0) === 0;\n return Object.fromEntries(Object.entries(obj).filter(([, value]) => {\n return (typeof value === 'number' &&\n (emptyFilter || filter.includes(value)) &&\n (emptyExceptions || !exceptions.includes(value)));\n }));\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SPECIAL_HEADERS = exports.MINOR = exports.MAJOR = exports.HTAB_SP_VCHAR_OBS_TEXT = exports.QUOTED_STRING = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.HEX = exports.URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.STATUSES_HTTP = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.HEADER_STATE = exports.FINISH = exports.STATUSES = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0;\nconst utils_1 = require(\"./utils\");\n// Emums\nexports.ERROR = {\n OK: 0,\n INTERNAL: 1,\n STRICT: 2,\n CR_EXPECTED: 25,\n LF_EXPECTED: 3,\n UNEXPECTED_CONTENT_LENGTH: 4,\n UNEXPECTED_SPACE: 30,\n CLOSED_CONNECTION: 5,\n INVALID_METHOD: 6,\n INVALID_URL: 7,\n INVALID_CONSTANT: 8,\n INVALID_VERSION: 9,\n INVALID_HEADER_TOKEN: 10,\n INVALID_CONTENT_LENGTH: 11,\n INVALID_CHUNK_SIZE: 12,\n INVALID_STATUS: 13,\n INVALID_EOF_STATE: 14,\n INVALID_TRANSFER_ENCODING: 15,\n CB_MESSAGE_BEGIN: 16,\n CB_HEADERS_COMPLETE: 17,\n CB_MESSAGE_COMPLETE: 18,\n CB_CHUNK_HEADER: 19,\n CB_CHUNK_COMPLETE: 20,\n PAUSED: 21,\n PAUSED_UPGRADE: 22,\n PAUSED_H2_UPGRADE: 23,\n USER: 24,\n CB_URL_COMPLETE: 26,\n CB_STATUS_COMPLETE: 27,\n CB_METHOD_COMPLETE: 32,\n CB_VERSION_COMPLETE: 33,\n CB_HEADER_FIELD_COMPLETE: 28,\n CB_HEADER_VALUE_COMPLETE: 29,\n CB_CHUNK_EXTENSION_NAME_COMPLETE: 34,\n CB_CHUNK_EXTENSION_VALUE_COMPLETE: 35,\n CB_RESET: 31,\n CB_PROTOCOL_COMPLETE: 38,\n};\nexports.TYPE = {\n BOTH: 0, // default\n REQUEST: 1,\n RESPONSE: 2,\n};\nexports.FLAGS = {\n CONNECTION_KEEP_ALIVE: 1 << 0,\n CONNECTION_CLOSE: 1 << 1,\n CONNECTION_UPGRADE: 1 << 2,\n CHUNKED: 1 << 3,\n UPGRADE: 1 << 4,\n CONTENT_LENGTH: 1 << 5,\n SKIPBODY: 1 << 6,\n TRAILING: 1 << 7,\n // 1 << 8 is unused\n TRANSFER_ENCODING: 1 << 9,\n};\nexports.LENIENT_FLAGS = {\n HEADERS: 1 << 0,\n CHUNKED_LENGTH: 1 << 1,\n KEEP_ALIVE: 1 << 2,\n TRANSFER_ENCODING: 1 << 3,\n VERSION: 1 << 4,\n DATA_AFTER_CLOSE: 1 << 5,\n OPTIONAL_LF_AFTER_CR: 1 << 6,\n OPTIONAL_CRLF_AFTER_CHUNK: 1 << 7,\n OPTIONAL_CR_BEFORE_LF: 1 << 8,\n SPACES_AFTER_CHUNK_SIZE: 1 << 9,\n};\nexports.METHODS = {\n 'DELETE': 0,\n 'GET': 1,\n 'HEAD': 2,\n 'POST': 3,\n 'PUT': 4,\n /* pathological */\n 'CONNECT': 5,\n 'OPTIONS': 6,\n 'TRACE': 7,\n /* WebDAV */\n 'COPY': 8,\n 'LOCK': 9,\n 'MKCOL': 10,\n 'MOVE': 11,\n 'PROPFIND': 12,\n 'PROPPATCH': 13,\n 'SEARCH': 14,\n 'UNLOCK': 15,\n 'BIND': 16,\n 'REBIND': 17,\n 'UNBIND': 18,\n 'ACL': 19,\n /* subversion */\n 'REPORT': 20,\n 'MKACTIVITY': 21,\n 'CHECKOUT': 22,\n 'MERGE': 23,\n /* upnp */\n 'M-SEARCH': 24,\n 'NOTIFY': 25,\n 'SUBSCRIBE': 26,\n 'UNSUBSCRIBE': 27,\n /* RFC-5789 */\n 'PATCH': 28,\n 'PURGE': 29,\n /* CalDAV */\n 'MKCALENDAR': 30,\n /* RFC-2068, section 19.6.1.2 */\n 'LINK': 31,\n 'UNLINK': 32,\n /* icecast */\n 'SOURCE': 33,\n /* RFC-7540, section 11.6 */\n 'PRI': 34,\n /* RFC-2326 RTSP */\n 'DESCRIBE': 35,\n 'ANNOUNCE': 36,\n 'SETUP': 37,\n 'PLAY': 38,\n 'PAUSE': 39,\n 'TEARDOWN': 40,\n 'GET_PARAMETER': 41,\n 'SET_PARAMETER': 42,\n 'REDIRECT': 43,\n 'RECORD': 44,\n /* RAOP */\n 'FLUSH': 45,\n /* DRAFT https://www.ietf.org/archive/id/draft-ietf-httpbis-safe-method-w-body-02.html */\n 'QUERY': 46,\n};\nexports.STATUSES = {\n CONTINUE: 100,\n SWITCHING_PROTOCOLS: 101,\n PROCESSING: 102,\n EARLY_HINTS: 103,\n RESPONSE_IS_STALE: 110, // Unofficial\n REVALIDATION_FAILED: 111, // Unofficial\n DISCONNECTED_OPERATION: 112, // Unofficial\n HEURISTIC_EXPIRATION: 113, // Unofficial\n MISCELLANEOUS_WARNING: 199, // Unofficial\n OK: 200,\n CREATED: 201,\n ACCEPTED: 202,\n NON_AUTHORITATIVE_INFORMATION: 203,\n NO_CONTENT: 204,\n RESET_CONTENT: 205,\n PARTIAL_CONTENT: 206,\n MULTI_STATUS: 207,\n ALREADY_REPORTED: 208,\n TRANSFORMATION_APPLIED: 214, // Unofficial\n IM_USED: 226,\n MISCELLANEOUS_PERSISTENT_WARNING: 299, // Unofficial\n MULTIPLE_CHOICES: 300,\n MOVED_PERMANENTLY: 301,\n FOUND: 302,\n SEE_OTHER: 303,\n NOT_MODIFIED: 304,\n USE_PROXY: 305,\n SWITCH_PROXY: 306, // No longer used\n TEMPORARY_REDIRECT: 307,\n PERMANENT_REDIRECT: 308,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n PAYMENT_REQUIRED: 402,\n FORBIDDEN: 403,\n NOT_FOUND: 404,\n METHOD_NOT_ALLOWED: 405,\n NOT_ACCEPTABLE: 406,\n PROXY_AUTHENTICATION_REQUIRED: 407,\n REQUEST_TIMEOUT: 408,\n CONFLICT: 409,\n GONE: 410,\n LENGTH_REQUIRED: 411,\n PRECONDITION_FAILED: 412,\n PAYLOAD_TOO_LARGE: 413,\n URI_TOO_LONG: 414,\n UNSUPPORTED_MEDIA_TYPE: 415,\n RANGE_NOT_SATISFIABLE: 416,\n EXPECTATION_FAILED: 417,\n IM_A_TEAPOT: 418,\n PAGE_EXPIRED: 419, // Unofficial\n ENHANCE_YOUR_CALM: 420, // Unofficial\n MISDIRECTED_REQUEST: 421,\n UNPROCESSABLE_ENTITY: 422,\n LOCKED: 423,\n FAILED_DEPENDENCY: 424,\n TOO_EARLY: 425,\n UPGRADE_REQUIRED: 426,\n PRECONDITION_REQUIRED: 428,\n TOO_MANY_REQUESTS: 429,\n REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL: 430, // Unofficial\n REQUEST_HEADER_FIELDS_TOO_LARGE: 431,\n LOGIN_TIMEOUT: 440, // Unofficial\n NO_RESPONSE: 444, // Unofficial\n RETRY_WITH: 449, // Unofficial\n BLOCKED_BY_PARENTAL_CONTROL: 450, // Unofficial\n UNAVAILABLE_FOR_LEGAL_REASONS: 451,\n CLIENT_CLOSED_LOAD_BALANCED_REQUEST: 460, // Unofficial\n INVALID_X_FORWARDED_FOR: 463, // Unofficial\n REQUEST_HEADER_TOO_LARGE: 494, // Unofficial\n SSL_CERTIFICATE_ERROR: 495, // Unofficial\n SSL_CERTIFICATE_REQUIRED: 496, // Unofficial\n HTTP_REQUEST_SENT_TO_HTTPS_PORT: 497, // Unofficial\n INVALID_TOKEN: 498, // Unofficial\n CLIENT_CLOSED_REQUEST: 499, // Unofficial\n INTERNAL_SERVER_ERROR: 500,\n NOT_IMPLEMENTED: 501,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n HTTP_VERSION_NOT_SUPPORTED: 505,\n VARIANT_ALSO_NEGOTIATES: 506,\n INSUFFICIENT_STORAGE: 507,\n LOOP_DETECTED: 508,\n BANDWIDTH_LIMIT_EXCEEDED: 509,\n NOT_EXTENDED: 510,\n NETWORK_AUTHENTICATION_REQUIRED: 511,\n WEB_SERVER_UNKNOWN_ERROR: 520, // Unofficial\n WEB_SERVER_IS_DOWN: 521, // Unofficial\n CONNECTION_TIMEOUT: 522, // Unofficial\n ORIGIN_IS_UNREACHABLE: 523, // Unofficial\n TIMEOUT_OCCURED: 524, // Unofficial\n SSL_HANDSHAKE_FAILED: 525, // Unofficial\n INVALID_SSL_CERTIFICATE: 526, // Unofficial\n RAILGUN_ERROR: 527, // Unofficial\n SITE_IS_OVERLOADED: 529, // Unofficial\n SITE_IS_FROZEN: 530, // Unofficial\n IDENTITY_PROVIDER_AUTHENTICATION_ERROR: 561, // Unofficial\n NETWORK_READ_TIMEOUT: 598, // Unofficial\n NETWORK_CONNECT_TIMEOUT: 599, // Unofficial\n};\nexports.FINISH = {\n SAFE: 0,\n SAFE_WITH_CB: 1,\n UNSAFE: 2,\n};\nexports.HEADER_STATE = {\n GENERAL: 0,\n CONNECTION: 1,\n CONTENT_LENGTH: 2,\n TRANSFER_ENCODING: 3,\n UPGRADE: 4,\n CONNECTION_KEEP_ALIVE: 5,\n CONNECTION_CLOSE: 6,\n CONNECTION_UPGRADE: 7,\n TRANSFER_ENCODING_CHUNKED: 8,\n};\n// C headers\nexports.METHODS_HTTP = [\n exports.METHODS.DELETE,\n exports.METHODS.GET,\n exports.METHODS.HEAD,\n exports.METHODS.POST,\n exports.METHODS.PUT,\n exports.METHODS.CONNECT,\n exports.METHODS.OPTIONS,\n exports.METHODS.TRACE,\n exports.METHODS.COPY,\n exports.METHODS.LOCK,\n exports.METHODS.MKCOL,\n exports.METHODS.MOVE,\n exports.METHODS.PROPFIND,\n exports.METHODS.PROPPATCH,\n exports.METHODS.SEARCH,\n exports.METHODS.UNLOCK,\n exports.METHODS.BIND,\n exports.METHODS.REBIND,\n exports.METHODS.UNBIND,\n exports.METHODS.ACL,\n exports.METHODS.REPORT,\n exports.METHODS.MKACTIVITY,\n exports.METHODS.CHECKOUT,\n exports.METHODS.MERGE,\n exports.METHODS['M-SEARCH'],\n exports.METHODS.NOTIFY,\n exports.METHODS.SUBSCRIBE,\n exports.METHODS.UNSUBSCRIBE,\n exports.METHODS.PATCH,\n exports.METHODS.PURGE,\n exports.METHODS.MKCALENDAR,\n exports.METHODS.LINK,\n exports.METHODS.UNLINK,\n exports.METHODS.PRI,\n // TODO(indutny): should we allow it with HTTP?\n exports.METHODS.SOURCE,\n exports.METHODS.QUERY,\n];\nexports.METHODS_ICE = [\n exports.METHODS.SOURCE,\n];\nexports.METHODS_RTSP = [\n exports.METHODS.OPTIONS,\n exports.METHODS.DESCRIBE,\n exports.METHODS.ANNOUNCE,\n exports.METHODS.SETUP,\n exports.METHODS.PLAY,\n exports.METHODS.PAUSE,\n exports.METHODS.TEARDOWN,\n exports.METHODS.GET_PARAMETER,\n exports.METHODS.SET_PARAMETER,\n exports.METHODS.REDIRECT,\n exports.METHODS.RECORD,\n exports.METHODS.FLUSH,\n // For AirPlay\n exports.METHODS.GET,\n exports.METHODS.POST,\n];\nexports.METHOD_MAP = (0, utils_1.enumToMap)(exports.METHODS);\nexports.H_METHOD_MAP = Object.fromEntries(Object.entries(exports.METHODS).filter(([k]) => k.startsWith('H')));\nexports.STATUSES_HTTP = [\n exports.STATUSES.CONTINUE,\n exports.STATUSES.SWITCHING_PROTOCOLS,\n exports.STATUSES.PROCESSING,\n exports.STATUSES.EARLY_HINTS,\n exports.STATUSES.RESPONSE_IS_STALE,\n exports.STATUSES.REVALIDATION_FAILED,\n exports.STATUSES.DISCONNECTED_OPERATION,\n exports.STATUSES.HEURISTIC_EXPIRATION,\n exports.STATUSES.MISCELLANEOUS_WARNING,\n exports.STATUSES.OK,\n exports.STATUSES.CREATED,\n exports.STATUSES.ACCEPTED,\n exports.STATUSES.NON_AUTHORITATIVE_INFORMATION,\n exports.STATUSES.NO_CONTENT,\n exports.STATUSES.RESET_CONTENT,\n exports.STATUSES.PARTIAL_CONTENT,\n exports.STATUSES.MULTI_STATUS,\n exports.STATUSES.ALREADY_REPORTED,\n exports.STATUSES.TRANSFORMATION_APPLIED,\n exports.STATUSES.IM_USED,\n exports.STATUSES.MISCELLANEOUS_PERSISTENT_WARNING,\n exports.STATUSES.MULTIPLE_CHOICES,\n exports.STATUSES.MOVED_PERMANENTLY,\n exports.STATUSES.FOUND,\n exports.STATUSES.SEE_OTHER,\n exports.STATUSES.NOT_MODIFIED,\n exports.STATUSES.USE_PROXY,\n exports.STATUSES.SWITCH_PROXY,\n exports.STATUSES.TEMPORARY_REDIRECT,\n exports.STATUSES.PERMANENT_REDIRECT,\n exports.STATUSES.BAD_REQUEST,\n exports.STATUSES.UNAUTHORIZED,\n exports.STATUSES.PAYMENT_REQUIRED,\n exports.STATUSES.FORBIDDEN,\n exports.STATUSES.NOT_FOUND,\n exports.STATUSES.METHOD_NOT_ALLOWED,\n exports.STATUSES.NOT_ACCEPTABLE,\n exports.STATUSES.PROXY_AUTHENTICATION_REQUIRED,\n exports.STATUSES.REQUEST_TIMEOUT,\n exports.STATUSES.CONFLICT,\n exports.STATUSES.GONE,\n exports.STATUSES.LENGTH_REQUIRED,\n exports.STATUSES.PRECONDITION_FAILED,\n exports.STATUSES.PAYLOAD_TOO_LARGE,\n exports.STATUSES.URI_TOO_LONG,\n exports.STATUSES.UNSUPPORTED_MEDIA_TYPE,\n exports.STATUSES.RANGE_NOT_SATISFIABLE,\n exports.STATUSES.EXPECTATION_FAILED,\n exports.STATUSES.IM_A_TEAPOT,\n exports.STATUSES.PAGE_EXPIRED,\n exports.STATUSES.ENHANCE_YOUR_CALM,\n exports.STATUSES.MISDIRECTED_REQUEST,\n exports.STATUSES.UNPROCESSABLE_ENTITY,\n exports.STATUSES.LOCKED,\n exports.STATUSES.FAILED_DEPENDENCY,\n exports.STATUSES.TOO_EARLY,\n exports.STATUSES.UPGRADE_REQUIRED,\n exports.STATUSES.PRECONDITION_REQUIRED,\n exports.STATUSES.TOO_MANY_REQUESTS,\n exports.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL,\n exports.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE,\n exports.STATUSES.LOGIN_TIMEOUT,\n exports.STATUSES.NO_RESPONSE,\n exports.STATUSES.RETRY_WITH,\n exports.STATUSES.BLOCKED_BY_PARENTAL_CONTROL,\n exports.STATUSES.UNAVAILABLE_FOR_LEGAL_REASONS,\n exports.STATUSES.CLIENT_CLOSED_LOAD_BALANCED_REQUEST,\n exports.STATUSES.INVALID_X_FORWARDED_FOR,\n exports.STATUSES.REQUEST_HEADER_TOO_LARGE,\n exports.STATUSES.SSL_CERTIFICATE_ERROR,\n exports.STATUSES.SSL_CERTIFICATE_REQUIRED,\n exports.STATUSES.HTTP_REQUEST_SENT_TO_HTTPS_PORT,\n exports.STATUSES.INVALID_TOKEN,\n exports.STATUSES.CLIENT_CLOSED_REQUEST,\n exports.STATUSES.INTERNAL_SERVER_ERROR,\n exports.STATUSES.NOT_IMPLEMENTED,\n exports.STATUSES.BAD_GATEWAY,\n exports.STATUSES.SERVICE_UNAVAILABLE,\n exports.STATUSES.GATEWAY_TIMEOUT,\n exports.STATUSES.HTTP_VERSION_NOT_SUPPORTED,\n exports.STATUSES.VARIANT_ALSO_NEGOTIATES,\n exports.STATUSES.INSUFFICIENT_STORAGE,\n exports.STATUSES.LOOP_DETECTED,\n exports.STATUSES.BANDWIDTH_LIMIT_EXCEEDED,\n exports.STATUSES.NOT_EXTENDED,\n exports.STATUSES.NETWORK_AUTHENTICATION_REQUIRED,\n exports.STATUSES.WEB_SERVER_UNKNOWN_ERROR,\n exports.STATUSES.WEB_SERVER_IS_DOWN,\n exports.STATUSES.CONNECTION_TIMEOUT,\n exports.STATUSES.ORIGIN_IS_UNREACHABLE,\n exports.STATUSES.TIMEOUT_OCCURED,\n exports.STATUSES.SSL_HANDSHAKE_FAILED,\n exports.STATUSES.INVALID_SSL_CERTIFICATE,\n exports.STATUSES.RAILGUN_ERROR,\n exports.STATUSES.SITE_IS_OVERLOADED,\n exports.STATUSES.SITE_IS_FROZEN,\n exports.STATUSES.IDENTITY_PROVIDER_AUTHENTICATION_ERROR,\n exports.STATUSES.NETWORK_READ_TIMEOUT,\n exports.STATUSES.NETWORK_CONNECT_TIMEOUT,\n];\nexports.ALPHA = [];\nfor (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) {\n // Upper case\n exports.ALPHA.push(String.fromCharCode(i));\n // Lower case\n exports.ALPHA.push(String.fromCharCode(i + 0x20));\n}\nexports.NUM_MAP = {\n 0: 0, 1: 1, 2: 2, 3: 3, 4: 4,\n 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,\n};\nexports.HEX_MAP = {\n 0: 0, 1: 1, 2: 2, 3: 3, 4: 4,\n 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,\n A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF,\n a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf,\n};\nexports.NUM = [\n '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n];\nexports.ALPHANUM = exports.ALPHA.concat(exports.NUM);\nexports.MARK = ['-', '_', '.', '!', '~', '*', '\\'', '(', ')'];\nexports.USERINFO_CHARS = exports.ALPHANUM\n .concat(exports.MARK)\n .concat(['%', ';', ':', '&', '=', '+', '$', ',']);\n// TODO(indutny): use RFC\nexports.URL_CHAR = [\n '!', '\"', '$', '%', '&', '\\'',\n '(', ')', '*', '+', ',', '-', '.', '/',\n ':', ';', '<', '=', '>',\n '@', '[', '\\\\', ']', '^', '_',\n '`',\n '{', '|', '}', '~',\n].concat(exports.ALPHANUM);\nexports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']);\n/* Tokens as defined by rfc 2616. Also lowercases them.\n * token = 1*\n * separators = \"(\" | \")\" | \"<\" | \">\" | \"@\"\n * | \",\" | \";\" | \":\" | \"\\\" | <\">\n * | \"/\" | \"[\" | \"]\" | \"?\" | \"=\"\n * | \"{\" | \"}\" | SP | HT\n */\nexports.TOKEN = [\n '!', '#', '$', '%', '&', '\\'',\n '*', '+', '-', '.',\n '^', '_', '`',\n '|', '~',\n].concat(exports.ALPHANUM);\n/*\n * Verify that a char is a valid visible (printable) US-ASCII\n * character or %x80-FF\n */\nexports.HEADER_CHARS = ['\\t'];\nfor (let i = 32; i <= 255; i++) {\n if (i !== 127) {\n exports.HEADER_CHARS.push(i);\n }\n}\n// ',' = \\x44\nexports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44);\nexports.QUOTED_STRING = ['\\t', ' '];\nfor (let i = 0x21; i <= 0xff; i++) {\n if (i !== 0x22 && i !== 0x5c) { // All characters in ASCII except \\ and \"\n exports.QUOTED_STRING.push(i);\n }\n}\nexports.HTAB_SP_VCHAR_OBS_TEXT = ['\\t', ' '];\n// VCHAR: https://tools.ietf.org/html/rfc5234#appendix-B.1\nfor (let i = 0x21; i <= 0x7E; i++) {\n exports.HTAB_SP_VCHAR_OBS_TEXT.push(i);\n}\n// OBS_TEXT: https://datatracker.ietf.org/doc/html/rfc9110#name-collected-abnf\nfor (let i = 0x80; i <= 0xff; i++) {\n exports.HTAB_SP_VCHAR_OBS_TEXT.push(i);\n}\nexports.MAJOR = exports.NUM_MAP;\nexports.MINOR = exports.MAJOR;\nexports.SPECIAL_HEADERS = {\n 'connection': exports.HEADER_STATE.CONNECTION,\n 'content-length': exports.HEADER_STATE.CONTENT_LENGTH,\n 'proxy-connection': exports.HEADER_STATE.CONNECTION,\n 'transfer-encoding': exports.HEADER_STATE.TRANSFER_ENCODING,\n 'upgrade': exports.HEADER_STATE.UPGRADE,\n};\nexports.default = {\n ERROR: exports.ERROR,\n TYPE: exports.TYPE,\n FLAGS: exports.FLAGS,\n LENIENT_FLAGS: exports.LENIENT_FLAGS,\n METHODS: exports.METHODS,\n STATUSES: exports.STATUSES,\n FINISH: exports.FINISH,\n HEADER_STATE: exports.HEADER_STATE,\n ALPHA: exports.ALPHA,\n NUM_MAP: exports.NUM_MAP,\n HEX_MAP: exports.HEX_MAP,\n NUM: exports.NUM,\n ALPHANUM: exports.ALPHANUM,\n MARK: exports.MARK,\n USERINFO_CHARS: exports.USERINFO_CHARS,\n URL_CHAR: exports.URL_CHAR,\n HEX: exports.HEX,\n TOKEN: exports.TOKEN,\n HEADER_CHARS: exports.HEADER_CHARS,\n CONNECTION_TOKEN_CHARS: exports.CONNECTION_TOKEN_CHARS,\n QUOTED_STRING: exports.QUOTED_STRING,\n HTAB_SP_VCHAR_OBS_TEXT: exports.HTAB_SP_VCHAR_OBS_TEXT,\n MAJOR: exports.MAJOR,\n MINOR: exports.MINOR,\n SPECIAL_HEADERS: exports.SPECIAL_HEADERS,\n METHODS_HTTP: exports.METHODS_HTTP,\n METHODS_ICE: exports.METHODS_ICE,\n METHODS_RTSP: exports.METHODS_RTSP,\n METHOD_MAP: exports.METHOD_MAP,\n H_METHOD_MAP: exports.H_METHOD_MAP,\n STATUSES_HTTP: exports.STATUSES_HTTP,\n};\n", "'use strict'\n\nconst { Buffer } = require('node:buffer')\n\nconst wasmBase64 = 'AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBA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1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgL5YUCAgd/A34gASACaiEEAkAgACIDKAIMIgANACADKAIEBEAgAyABNgIECyMAQRBrIgkkAAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQ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IoAlwiAkUNACADIAIRAAAhAAsgAEUN5gIgAEEVRgRAIANBJDYCHCADIAE2AhQgA0GbGzYCECADQRU2AgxBACECDJQDC0EAIQIgA0EANgIcIAMgATYCFCADQZAONgIQIANBFDYCDAyTAwtBACECIANBADYCHCADIAE2AhQgA0G+IDYCECADQQI2AgwMkgMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABIAynaiIBEDIiAEUNKyADQQc2AhwgAyABNgIUIAMgADYCDAyRAwsgAy0ALkHAAHFFDQELQQAhAAJAIAMoAjgiAkUNACACKAJYIgJFDQAgAyACEQAAIQALIABFDSsgAEEVRgRAIANBCjYCHCADIAE2AhQgA0HrGTYCECADQRU2AgxBACECDJADC0EAIQIgA0EANgIcIAMgATYCFCADQZMMNgIQIANBEzYCDAyPAwtBACECIANBADYCHCADIAE2AhQgA0GCFTYCECADQQI2AgwMjgMLQQAhAiADQQA2AhwgAyABNgIUIANB3RQ2AhAgA0EZNgIMDI0DC0EAIQIgA0EANgIcIAMgATYCFCADQeYdNgIQIANBGTYCDAyMAwsgAEEVRg09QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIsDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFDSggA0ENNgIcIAMgATYCFCADIAA2AgwMigMLIABBFUYNOkEAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAyJAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMyIARQRAIAFBAWohAQwoCyADQQ42AhwgAyAANgIMIAMgAUEBajYCFAyIAwsgAEEVRg03QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIcDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDCcLIANBDzYCHCADIAA2AgwgAyABQQFqNgIUDIYDC0EAIQIgA0EANgIcIAMgATYCFCADQeIXNgIQIANBGTYCDAyFAwsgAEEVRg0zQQAhAiADQQA2AhwgAyABNgIUIANB1gw2AhAgA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R8hAgzCAgtBICECDMECC0EiIQIMwAILQSMhAgy/AgtBJSECDL4CC0HlACECDL0CCyADQT02AhwgAyABNgIUIAMgADYCDEEAIQIM1QILIANBGzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDNQCCyADQSA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzTAgsgA0ETNgIcIAMgATYCFCADQZgaNgIQIANBFTYCDEEAIQIM0gILIANBCzYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNECCyADQRA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzQAgsgA0EgNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIMzwILIANBCzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDM4CCyADQQw2AhwgAyABNgIUIANBpBw2AhAgA0EVNgIMQQAhAgzNAgtBACECIANBADYCHCADIAE2AhQgA0HdDjYCECADQRI2AgwMzAILAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB/QEhAgzMAgsCQAJAIAMtADZBAUcNAEEAIQACQCADKAI4IgJFDQAgAigCYCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUcNASADQfwBNgIcIAMgATYCFCADQdwZNgIQIANBFTYCDEEAIQIMzQILQdwBIQIMswILIANBADYCHCADIAE2AhQgA0H5CzYCECADQR82AgxBACECDMsCCwJAAkAgAy0AKEEBaw4CBAEAC0HbASECDLICC0HUASECDLECCyADQQI6ADFBACEAAkAgAygCOCICRQ0AIAIoAgAiAkUNACADIAIRAAAhAAsgAEUEQEHdASECDLECCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQbQMNgIQIANBEDYCDEEAIQIMygILIANB+wE2AhwgAyABNgIUIANBgRo2AhAgA0EVNgIMQQAhAgzJAgsgASAERgRAQfoBIQIMyQILIAEtAABByABGDQEgA0EBOgAoC0HAASECDK4CC0HaASECDK0CCyABIARHBEAgA0EMNgIIIAMgATYCBEHZASECDK0CC0H5ASECDMUCCyABIARGBEBB+AEhAgzFAgsgAS0AAEHIAEcNBCABQQFqIQFB2AEhAgyrAgsgASAERgRAQfcBIQIMxAILAkACQCABLQAAQcUAaw4QAAUFBQUFBQUFBQUFBQUFAQULIAFBAWohAUHWASECDKsCCyABQQFqIQFB1wEhAgyqAgtB9gEhAiABIARGDcICIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbrVAGotAABHDQMgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMMCCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIARQRAQeMBIQIMqgILIANB9QE2AhwgAyABNgIUIAMgADYCDEEAIQIMwgILQfQBIQIgASAERg3BAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEG41QBqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzCAgsgA0GBBDsBKCADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIADQMMAgsgA0EANgIAC0EAIQIgA0EANgIcIAMgATYCFCADQeUfNgIQIANBCDYCDAy/AgtB1QEhAgylAgsgA0HzATYCHCADIAE2AhQgAyAANgIMQQAhAgy9AgtBACEAAkAgAygCOCICRQ0AIAIoAkAiAkUNACADIAIRAAAhAAsgAEUNbiAAQRVHBEAgA0EANgIcIAMgATYCFCADQYIPNgIQIANBIDYCDEEAIQIMvQILIANBjwE2AhwgAyABNgIUIANB7Bs2AhAgA0EVNgIMQQAhAgy8AgsgASAERwRAIANBDTYCCCADIAE2AgRB0wEhAgyjAgtB8gEhAgy7AgsgASAERgRAQfEBIQIMuwILAkACQAJAIAEtAABByABrDgsAAQgICAgICAgIAggLIAFBAWohAUHQASECDKMCCyABQQFqIQFB0QEhAgyiAgsgAUEBaiEBQdIBIQIMoQILQfABIQIgASAERg25AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBtdUAai0AAEcNBCAAQQJGDQMgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuQILQe8BIQIgASAERg24AiADKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABBs9UAai0AAEcNAyAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuAILQe4BIQIgASAERg23AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMtwILIAMoAgQhACADQgA3AwAgAyAAIAVBAWoiARArIgBFDQIgA0HsATYCHCADIAE2AhQgAyAANgIMQQAhAgy2AgsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNnAIgA0HtATYCHCADIAE2AhQgAyAANgIMQQAhAgy0AgtBzwEhAgyaAgtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDLQCC0HOASECDJoCCyADQesBNgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMsgILIAEgBEYEQEHrASECDLICCyABLQAAQS9GBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GyODYCECADQQg2AgxBACECDLECC0HNASECDJcCCyABIARHBEAgA0EONgIIIAMgATYCBEHMASECDJcCC0HqASECDK8CCyABIARGBEBB6QEhAgyvAgsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFBywEhAgyWAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZcCIANB6AE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAEgBEYEQEHnASECDK4CCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5gE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILQcoBIQIMlAILIAEgBEYEQEHlASECDK0CC0EAIQBBASEFQQEhB0EAIQICQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQCABLQAAQTBrDgoKCQABAgMEBQYICwtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshAkEAIQVBACEHDAILQQkhAkEBIQBBACEFQQAhBwwBC0EAIQVBASECCyADIAI6ACsgAUEBaiEBAkACQCADLQAuQRBxDQACQAJAAkAgAy0AKg4DAQACBAsgB0UNAwwCCyAADQEMAgsgBUUNAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDQIgA0HiATYCHCADIAE2AhQgAyAANgIMQQAhAgyvAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZoCIANB4wE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ2YAiADQeQBNgIcIAMgATYCFCADIAA2AgwMrQILQckBIQIMkwILQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANBpA02AhAgA0EhNgIMQQAhAgytAgtByAEhAgyTAgsgA0HhATYCHCADIAE2AhQgA0HQGjYCECADQRU2AgxBACECDKsCCyABIARGBEBB4QEhAgyrAgsCQCABLQAAQSBGBEAgA0EAOwE0IAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANBmRE2AhAgA0EJNgIMQQAhAgyrAgtBxwEhAgyRAgsgASAERgRAQeABIQIMqgILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyrAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqgILQcYBIQIMkAILIAEgBEYEQEHfASECDKkCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqgILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKkCC0HFASECDI8CCyABIARGBEBB3gEhAgyoAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKkCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyoAgtBxAEhAgyOAgsgASAERgRAQd0BIQIMpwILAkACQAJAAkAgAS0AAEEKaw4XAgMDAAMDAwMDAwMDAwMDAwMDAwMDAwEDCyABQQFqDAULIAFBAWohAUHDASECDI8CCyABQQFqIQEgA0Evai0AAEEBcQ0IIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKcCCyADQQA2AhwgAyABNgIUIANBjQs2AhAgA0ENNgIMQQAhAgymAgsgASAERwRAIANBDzYCCCADIAE2AgRBASECDI0CC0HcASECDKUCCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtB2wEhAgymAgsgAygCBCEAIANBADYCBCADIAAgARAtIgBFBEAgAUEBaiEBDAQLIANB2gE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMpQILIAMoAgQhACADQQA2AgQgAyAAIAEQLSIADQEgAUEBagshAUHBASECDIoCCyADQdkBNgIcIAMgADYCDCADIAFBAWo2AhRBACECDKICC0HCASECDIgCCyADQS9qLQAAQQFxDQEgA0EANgIcIAMgATYCFCADQeQcNgIQIANBGTYCDEEAIQIMoAILIAEgBEYEQEHZASECDKACCwJAAkACQCABLQAAQQprDgQBAgIAAgsgAUEBaiEBDAILIAFBAWohAQwBCyADLQAuQcAAcUUNAQtBACE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aiEGAkADQCABLQAAIABB0dQAai0AAEcNGiAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7gELIANBADYCACAGQQFqIQFBHgwaC0GoASECIAEgBEYN7AEgAygCACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCABLQAAIABBytQAai0AAEcNGSAAQQZGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7QELIANBADYCACAGQQFqIQFBFQwZC0GnASECIAEgBEYN6wEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBx9QAai0AAEcNGCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7AELIANBADYCACAGQQFqIQFBFwwYC0GmASECIAEgBEYN6gEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBwdQAai0AAEcNFyAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6wELIANBADYCACAGQQFqIQFBGAwXCyABIARGBEBBpQEhAgzqAQsCQAJAIAEtAABByQBrDgcAGRkZGRkBGQsgAUEBaiEBQYsBIQIM0QELIAFBAWohAUGMASECDNABC0GkASECIAEgBEYN6AEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBptUAai0AAEcNFSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6QELIANBADYCACAGQQFqIQFBCQwVC0GjASECIAEgBEYN5wEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBpNUAai0AAEcNFCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6AELIANBADYCACAGQQFqIQFBHwwUC0GiASECIAEgBEYN5gEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBvtQAai0AAEcNEyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5wELIANBADYCACAG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AgzcAQsCQAJAIAEtAABBzgBrDgMACwELCyABQQFqIQFB/gAhAgzDAQsgAUEBaiEBQf8AIQIMwgELIAEgBEYEQEGXASECDNsBCyABLQAAQdkARw0IIAFBAWohAUEIDAcLQZYBIQIgASAERg3ZASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEGs1ABqLQAARw0GIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzaAQsgA0EANgIAIAZBAWohAUEFDAYLQZUBIQIgASAERg3YASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGm1ABqLQAARw0FIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzZAQsgA0EANgIAIAZBAWohAUEWDAULQZQBIQIgASAERg3XASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGh1QBqLQAARw0EIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzYAQsgA0EANgIAIAZBAWohAUEQDAQLIAEgBEYEQEGTASECDNcBCwJAAkAgAS0AAEHDAGsODAAGBgYGBgYGBgYGAQYLIAFBAWohAUH5ACECDL4BCyABQQFqIQFB+gAhAgy9AQtBkgEhAiABIARGDdUBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQaDUAGotAABHDQIgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNYBCyADQQA2AgAgBkEBaiEBQSQMAgsgA0EANgIADAILIAEgBEYEQEGRASECDNQBCyABLQAAQcwARw0BIAFBAWohAUETCzoAKSADKAIEIQAgA0EANgIEIAMgACABEC4iAA0CDAELQQAhAiADQQA2AhwgAyABNgIUIANB/h82AhAgA0EGNgIMDNEBC0H4ACECDLcBCyADQZABNgIcIAMgATYCFCADIAA2AgxBACECDM8BC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUYNASADQQA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JQBCyABQQFqDAYLIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIANBADYCHCADIAE2AhQgA0GNFDYCECADQQc2AgxBACECDKgBCwJAAkACQAJAA0AgAS0AAEGgygBqLQAAIgBBBUcEQAJAIABBAWsOBi4DBAUGAAYLQegAIQIMlAELIAQgAUEBaiIBRw0AC0H9ACECDKsBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQdsANgIcIAMgATYCFCADIAA2AgxBACECDKoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDKkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQfoANgIcIAMgATYCFCADIAA2AgxBACECDKgBCyADQQA2AhwgAyABNgIUIANB5Ag2AhAgA0EHNgIMQQAhAgynAQsgASAERg0BIAFBAWoLIQFBBiECDIwBC0H8ACECDKQBCwJAAkACQAJAA0AgAS0AAEGgyABqLQAAIgBBBUcEQCAAQQFrDgQpAgMEBQsgBCABQQFqIgFHDQALQfsAIQIMpwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMpgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMpQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMpAELIANBADYCHCADIAE2AhQgA0G8CjYCECADQQc2AgxBACECDKMBC0HPACECDIkBC0HRACECDIgBC0HnACECDIcBCyABIARGBEBB+gAhAgygAQ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EQCADQfEANgIcIAMgATYCFCADIAA2AgxBACECDJkBC0HfACECDH8LQQAhAAJAIAMoAjgiAkUNACACKAI0IgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANB6g02AhAgA0EmNgIMQQAhAgyZAQtB3gAhAgx/CyADQfAANgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMlwELIAMtAClBIUYNBiADQQA2AhwgAyABNgIUIANBkQo2AhAgA0EINgIMQQAhAgyWAQtB7wAhAiABIARGDZUBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDVAGotAABHDQIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJYBCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQKyIARQ0CIANB7QA2AhwgAyABNgIUIAMgADYCDEEAIQIMlQELIANBADYCAAsgAygCBCEAIANBADYCBCADIAAgARArIgBFDYABIANB7gA2AhwgAyABNgIUIAMgADYCDEEAIQIMkwELQdwAIQIMeQtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJMBC0HbACECDHkLIANB7AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyRAQsgAy0AKSIAQSNJDQAgAEEuRg0AIANBADYCHCADIAE2AhQgA0HJCTYCECADQQg2AgxBACECDJABC0HaACECDHYLIAEgBEYEQEHrACECDI8BCwJAIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMjwELQdkAIQIMdQsgASAERwRAIANBDjYCCCADIAE2AgRB2AAhAgx1C0HqACECDI0BCyABIARGBEBB6QAhAgyNAQsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFB1wAhAgx0CyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeiADQegANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyABIARGBEBB5wAhAgyMAQsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ17IANB5gA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELQdYAIQIMcgsgASAERgRAQeUAIQIMiwELQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIANgIcIAMgATYCFCADIAA2AgxBACECDI0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNfSADQeMANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeyADQeQANgIcIAMgATYCFCADIAA2AgwMiwELQdQAIQIMcQsgAy0AKUEiRg2GAUHTACECDHALQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALIABFBEBB1QAhAgxwCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQaQNNgIQIANBITYCDEEAIQIMiQELIANB4QA2AhwgAyABNgIUIANB0Bo2AhAgA0EVNgIMQQAhAgyIAQsgASAERgRAQeAAIQIMiAELAkACQAJAAkACQCABLQAAQQprDgQBBAQABAsgAUEBaiEBDAELIAFBAWohASADQS9qLQAAQQFxRQ0BC0HSACECDHALIANBADYCHCADIAE2AhQgA0G2ETYCECADQQk2AgxBACECDIgBCyADQQA2AhwgAyABNgIUIANBthE2AhAgA0EJNgIMQQAhAgyHAQsgASAERgRAQd8AIQIMhwELIAEtAABBCkYEQCABQQFqIQEMCQsgAy0ALkHAAHENCCADQQA2AhwgAyABNgIUIANBthE2AhAgA0ECNgIMQQAhAgyGAQsgASAERgRAQd0AIQIMhgELIAEtAAAiAkENRgRAIAFBAWohAUHQACECDG0LIAEhACACQQlrDgQFAQEFAQsgBCABIgBGBEBB3AAhAgyFAQsgAC0AAEEKRw0AIABBAWoMAgtBACECIANBADYCHCADIAA2AhQgA0HKLTYCECADQQc2AgwMgwELIAEgBEYEQEHbACECDIMBCwJAIAEtAABBCWsOBAMAAAMACyABQQFqCyEBQc4AIQIMaAsgASAERgRAQdoAIQIMgQELIAEtAABBCWsOBAABAQABC0EAIQIgA0EANgIcIANBmhI2AhAgA0EHNgIMIAMgAUEBajYCFAx/CyADQYASOwEqQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2QA2AhwgAyABNgIUIANB6ho2AhAgA0EVNgIMQQAhAgx+C0HNACECDGQLIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDHwLIAEgBEYEQEHZACECDHwLIAEtAABBIEcNPSABQQFqIQEgAy0ALkEBcQ09IANBADYCHCADIAE2AhQgA0HCHDYCECADQR42AgxBACECDHsLIAEgBEYEQEHYACECDHsLAkACQAJAAkACQCABLQAAIgBBCmsOBAIDAwABCyABQQFqIQFBLCECDGULIABBOkcNASADQQA2AhwgAyABNgIUIANB5xE2AhAgA0EKNgIMQQAhAgx9CyABQQFqIQEgA0Evai0AAEEBcUUNcyADLQAyQYABcUUEQCADQTJqIQIgAxA1QQAhAAJAIAMoAjgiBkUNACAGKAIoIgZFDQAgAyAGEQAAIQALAkACQCAADhZNTEsBAQEBAQEBAQEBAQEBAQEBAQEAAQsgA0EpNgIcIAMgATYCFCADQawZNgIQIANBFTYCDEEAIQIMfgsgA0EANgIcIAMgATYCFCADQeULNgIQIANBETYCDEEAIQIMfQtBACEAAkAgAygCOCICRQ0AIAIoAlwiAkUNACADIAI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QA6ACwLQTkhAgw5CyABIARGBEBBNiECDFILAkACQAJAAkACQCABLQAAQQprDgQAAgIBAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFDQIgA0EzNgIcIAMgATYCFCADIAA2AgxBACECDFULIAMoAgQhACADQQA2AgQgAyAAIAEQMSIARQRAIAFBAWohAQwGCyADQTI2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMVAsgAy0ALkEBcQRAQd8BIQIMOwsgAygCBCEAIANBADYCBCADIAAgARAxIgANAQxJC0E0IQIMOQsgA0E1NgIcIAMgATYCFCADIAA2AgxBACECDFELQTUhAgw3CyADQS9qLQAAQQFxDQAgA0EANgIcIAMgATYCFCADQesWNgIQIANBGTYCDEEAIQIMTwtBMyECDDULIAEgBEYEQEEyIQIMTgsCQCABLQAAQQpGBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GSFzYCECADQQM2AgxBACECDE4LQTIhAgw0CyABIARGBEBBMSECDE0LAkAgAS0AACIAQQlGDQAgAEEgRg0AQQEhAgJAIAMtACxBBWsOBAYEBQANCyADIAMvATJBCHI7ATIMDAsgAy0ALkEBcUUNASADLQAsQQhHDQAgA0EAOgAsC0E9IQIMMgsgA0EANgIcIAMgATYCFCADQcIWNgIQIANBCjYCDEEAIQIMSgtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiACcjsBMgwGCyABIARGBEBBMCECDEcLIAEtAABBCkYEQCABQQFqIQEMAQsgAy0ALkEBcQ0AIANBADYCHCADIAE2AhQgA0HcKDYCECADQQI2AgxBACECDEYLQTAhAgwsCyABQQFqIQFBMSECDCsLIAEgBEYEQEEvIQIMRAsgAS0AACIAQQlHIABBIEdxRQRAIAFBAWohASADLQAuQQFxDQEgA0EANgIcIAMgATYCFCADQZcQNgIQIANBCjYCDEEAIQIMRAtBASECAkACQAJAAkACQAJAIAMtACxBAmsOBwUEBAMBAgAECyADIAMvATJBCHI7ATIMAwtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiAC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QUFBQUFBQUFBQUFBQUAQanMAAsEAQAAAQBBwcwAC14CAgACAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAEGpzgALBQECAAEDAEHAzgALXwQFAAAFBQUFBQUFBQUFBQYFBQUFBQUFBQUFBQUABQAHCAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQAFAAUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEGp0AALBQEBAAEBAEHA0AALAQEAQdrQAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQanSAAsFAQEAAQEAQcDSAAsBAQBBytIACwYCAAAAAAIAQeHSAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw=='\n\nlet wasmBuffer\n\nObject.defineProperty(module, 'exports', {\n get: () => {\n return wasmBuffer\n ? wasmBuffer\n : (wasmBuffer = Buffer.from(wasmBase64, 'base64'))\n }\n})\n", "'use strict'\n\nconst { Buffer } = require('node:buffer')\n\nconst wasmBase64 = 'AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmV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sgBEH/AU0EQCAEQXhxQezVAGohAAJ/QcTVACgCACICQQEgBEEDdnQiA3FFBEBBxNUAIAIgA3I2AgAgAAwBCyAAKAIICyICIAE2AgwgACABNgIIIAEgADYCDCABIAI2AggMAQtBHyECIARB////B00EQCAEQSYgBEEIdmciAGt2QQFxIABBAXRrQT5qIQILIAEgAjYCHCABQgA3AhAgAkECdEH01wBqIQACQEHI1QAoAgAiA0EBIAJ0IgdxRQRAIAAgATYCAEHI1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgLhocCAwd/A34BeyABIAJqIQQCQCAAIgMoAgwiAA0AIAMoAgQEQCADIAE2AgQLIwBBEGsiCSQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC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zvAgsgA0EaNgIcIAMgADYCDCADIAFBAWo2AhQM9QILIABBFUYNH0EAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAz0AgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDBsLIANBHDYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgzzAgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDOsCCyADQR02AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM8gILIABBO0cNASABQQFqIQELQSYhAgzXAgtBACECIANBADYCHCADIAE2AhQgA0GfFTYCECADQQw2AgwM7wILIAEgBEcEQANAIAEtAABBIEcNhAIgBCABQQFqIgFHDQALQSwhAgzvAgtBLCECDO4CCyABIARGBEBBNCECDO4CCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtBNCECDO8CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNnwIgA0EyNgIcIAMgATYCFCADIAA2AgxBACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUEQCABQQFqIQEMnwILIANBMjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgztAgsgASAERwRAAkADQCABLQAAQTBrIgBB/wFxQQpPBEBBOiECDNcCCyADKQMgIgtCmbPmzJmz5swZVg0BIAMgC0IKfiIKNwMgIAogAK1C/wGDIgtCf4VWDQEgAyAKIAt8NwMgIAQgAUEBaiIBRw0AC0HAACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABQQFqIgEQMSIADRcM4gILQcAAIQIM7AILIAEgBEYEQEHJACECDOwCCwJAA0ACQCABLQAAQQlrDhgAAqICogKpAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAgCiAgsgBCABQQFqIgFHDQALQckAIQIM7AILIAFBAWohASADQS9qLQAAQQFxDaUCIANBADYCHCADIAE2AhQgA0GXEDYCECADQQo2AgxBACECDOsCCyABIARHBEADQCABLQAAQSBHDRUgBCABQQF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IAMgAhEAACEACyAARQRAQd0BIQIMsQILIABBFUcEQCADQQA2AhwgAyABNgIUIANBtAw2AhAgA0EQNgIMQQAhAgzKAgsgA0H7ATYCHCADIAE2AhQgA0GBGjYCECADQRU2AgxBACECDMkCCyABIARGBEBB+gEhAgzJAgsgAS0AAEHIAEYNASADQQE6ACgLQcABIQIMrgILQdoBIQIMrQILIAEgBEcEQCADQQw2AgggAyABNgIEQdkBIQIMrQILQfkBIQIMxQILIAEgBEYEQEH4ASECDMUCCyABLQAAQcgARw0EIAFBAWohAUHYASECDKsCCyABIARGBEBB9wEhAgzEAgsCQAJAIAEtAABBxQBrDhAABQUFBQUFBQUFBQUFBQUBBQsgAUEBaiEBQdYBIQIMqwILIAFBAWohAUHXASECDKoCC0H2ASECIAEgBEYNwgIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABButUAai0AAEcNAyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMwwILIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgBFBEBB4wEhAgyqAgsgA0H1ATYCHCADIAE2AhQgAyAANgIMQQAhAgzCAgtB9AEhAiABIARGDcECIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjVAGotAABHDQIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMICCyADQYEEOwEoIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgANAwwCCyADQQA2AgALQQAhAiADQQA2AhwgAyABNgIUIANB5R82AhAgA0EINgIMDL8CC0HVASECDKUCCyADQfMBNgIcIAMgATYCFCADIAA2AgxBACECDL0CC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ1uIABBFUcEQCADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgy9AgsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDLwCCyABIARHBEAgA0ENNgIIIAMgATYCBEHTASECDKMCC0HyASECDLsCCyABIARGBEBB8QEhAgy7AgsCQAJAAkAgAS0AAEHIAGsOCwABCAgICAgICAgCCAsgAUEBaiEBQdABIQIMowILIAFBAWohAUHRASECDKICCyABQQFqIQFB0gEhAgyhAgtB8AEhAiABIARGDbkCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEG11QBqLQAARw0EIABBAkYNAyAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy5AgtB7wEhAiABIARGDbgCIAMoAgAiACAEIAFraiEGIAEgAGtBAWohBQNAIAEtAAAgAEGz1QBqLQAARw0DIABBAUYNAiAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy4AgtB7gEhAiABIARGDbcCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEGw1QBqLQAARw0CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy3AgsgAygCBCEAIANCADcDACADIAAgBUEBaiIBECsiAEUNAiADQewBNgIcIAMgATYCFCADIAA2AgxBACECDLYCCyADQQA2AgALIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ2cAiADQe0BNgIcIAMgATYCFCADIAA2AgxBACECDLQCC0HPASECDJoCC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMtAILQc4BIQIMmgILIANB6wE2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyyAgsgASAERgRAQesBIQIMsgILIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMsQILQc0BIQIMlwILIAEgBEcEQCADQQ42AgggAyABNgIEQcwBIQIMlwILQeoBIQIMrwILIAEgBEYEQEHpASECDK8CCyABLQAAQTBrIgBB/wFxQQpJBEAgAyAAOgAqIAFBAWohAUHLASECDJYCCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNlwIgA0HoATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgASAERgRAQecBIQIMrgILAkAgAS0AAEEuRgRAIAFBAWohAQwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmAIgA0HmATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgtBygEhAgyUAgsgASAERgRAQeUBIQIMrQILQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIBNgIcIAMgATYCFCADIAA2AgxBACECDK8CCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmgIgA0HjATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5AE2AhwgAyABNgIUIAMgADYCDAytAgtByQEhAgyTAgtBACEAAkAgAygCOCICRQ0AIAIoAkQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GkDTYCECADQSE2AgxBACECDK0CC0HIASECDJMCCyADQeEBNgIcIAMgATYCFCADQdAaNgIQIANBFTYCDEEAIQIMqwILIAEgBEYEQEHhASECDKsCCwJAIAEtAABBIEYEQCADQQA7ATQgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GZETYCECADQQk2AgxBACECDKsCC0HHASECDJECCyABIARGBEBB4AEhAgyqAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKsCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyqAgtBxgEhAgyQAgsgASAERgRAQd8BIQIMqQILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyqAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqQILQcUBIQIMjwILIAEgBEYEQEHeASECDKgCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqQILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKgCC0HEASECDI4CCyABIARGBEBB3QEhAgynAgsCQAJAAkACQCABLQAAQQprDhcCAwMAAwMDAwMDAwMDAwMDAwMDAwMDAQMLIAFBAWoMBQsgAUEBaiEBQcMBIQIMjwILIAFBAWohASADQS9qLQAAQQFxDQggA0EANgIcIAMgATYCFCADQY0LNgIQIANBDTYCDEEAIQIMpwILIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKYCCyABIARHBEAgA0EPNgIIIAMgATYCBEEBIQIMjQILQdwBIQIMpQILAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0HbASECDKYCCyADKAIEIQAgA0EANgIEIAMgACABEC0iAEUEQCABQQFqIQEMBAsgA0HaATYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgylAgsgAygCBCEAIANBADYCBCAD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ARw0+IABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAySAgsgA0EANgIAIAZBAWohAUEoDD4LIAEgBEYEQEHMASECDJECCwJAAkACQCABLQAAQcUAaw4RAEFBQUFBQUFBQQFBQUFBQQJBCyABQQFqIQFBsQEhAgz5AQsgAUEBaiEBQbIBIQIM+AELIAFBAWohAUGzASECDPcBC0HLASECIAEgBEYNjwIgAygCACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCABLQAAIABBkdUAai0AAEcNPCAAQQZGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkAILIANBADYCACAGQQFqIQFBGgw8C0HKASECIAEgBEYNjgIgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBjdUAai0AAEcNOyAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMjwILIANBADYCACAGQQFqIQFBIQw7CyABIARGBEBByQEhAgyOAgsCQAJAIAEtAABBwQBrDhQAPT09PT09PT09PT09PT09PT09AT0LIAFBAWohAUGtASECDPUBCyABQQFqIQFBsAEhAgz0AQsgASAERgRAQcgBIQIMjQILAkACQCABLQAAQdUAaw4LADw8PDw8PDw8PAE8CyABQQFqIQFBrgEhAgz0AQsgAUEBaiEBQa8BIQIM8wELQccBIQIgASAERg2LAiADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw04IABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyMAgsgA0EANgIAIAZBAWohAUEqDDgLIAEgBEYEQEHGASECDIsCCyABLQAAQdAARw04IAFBAWohAUElDDcLQcUBIQIgASAERg2JAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGB1QBqLQAARw02IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyKAgsgA0EANgIAIAZBAWohAUEODDYLIAEgBEYEQEHEASECDIkCCyABLQAAQ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ABIAsgAUEBaiEBQZABIQIM2AELIAFBAWohAUGTASECDNcBCyABIARGBEBBqwEhAgzwAQsCQAJAIAEtAABBwQBrDg8AHx8fHx8fHx8fHx8fHwEfCyABQQFqIQFBkQEhAgzXAQsgAUEBaiEBQZIBIQIM1gELIAEgBEYEQEGqASECDO8BCyABLQAAQcwARw0cIAFBAWohAUEKDBsLQakBIQIgASAERg3tASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHR1ABqLQAARw0aIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzuAQsgA0EANgIAIAZBAWohAUEeDBoLQagBIQIgASAERg3sASADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEHK1ABqLQAARw0ZIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAztAQsgA0EANgIAIAZBAWohAUEVDBkLQacBIQIgASAERg3rASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHH1ABqLQAARw0YIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzsAQsgA0EANgIAIAZBAWohAUEXDBgLQaYBIQIgASAERg3qASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHB1ABqLQAARw0XIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzrAQsgA0EANgIAIAZBAWohAUEYDBcLIAEgBEYEQEGlASECDOoBCwJAAkAgAS0AAEHJAGsOBwAZGRkZGQEZCyABQQFqIQFBiwEhAgzRAQsgAUEBaiEBQYwBIQIM0AELQaQBIQIgASAERg3oASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm1QBqLQAARw0VIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzpAQsgA0EANgIAIAZBAWohAUEJDBULQaMBIQIgASAERg3nASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk1QBqLQAARw0UIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzoAQsgA0EANgIAIAZBAWohAUEfDBQLQaIBIQIgASAERg3mASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEG+1ABqLQAARw0TIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAznAQsgA0EANgIAIAZBAWohAUECDBMLQaEBIQIgASAERg3lASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYDQCABLQAAIABBvNQAai0AAEcNESAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5QELIAEgBEYEQEGgASECDOUBC0EBIAEtAABB3wBHDREaIAFBAWohAUGHASECDMsBCyADQQA2AgAgBkEBaiEBQYgBIQIMygELQZ8BIQIgASAERg3iASADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw0PIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzjAQsgA0EANgIAIAZBAWohAUEpDA8LQZ4BIQIgASAERg3hASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEG41ABqLQAARw0OIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAziAQsgA0EANgIAIAZBAWohAUEtDA4LIAEgBEYEQEGdASECDOEBCyABLQAAQcUARw0OIAFBAWohAUGEASECDMcBCyABIARGBEBBnAEhAgzgAQsCQAJAIAEtAABBzABrDggADw8PDw8PAQ8LIAFBAWohAUGCASECDMcBCyABQQFqIQFBgwEhAgzGAQtBmwEhAiABIARGDd4BIAMoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQbPUAGotAABHDQsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADN8BCyADQQA2AgAgBkEBaiEBQSMMCwtBmgEhAiABIARGDd0BIAMoAgAiACA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IQIM1AELIAEtAABBzABHDQEgAUEBaiEBQRMLOgApIAMoAgQhACADQQA2AgQgAyAAIAEQLiIADQIMAQtBACECIANBADYCHCADIAE2AhQgA0H+HzYCECADQQY2AgwM0QELQfgAIQIMtwELIANBkAE2AhwgAyABNgIUIAMgADYCDEEAIQIMzwELQQAhAAJAIAMoAjgiAkUNACACKAJAIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GCDzYCECADQSA2AgxBACECDM4BC0H3ACECDLQBCyADQY8BNgIcIAMgATYCFCADQewbNgIQIANBFTYCDEEAIQIMzAELIAEgBEYEQEGPASECDMwBCwJAIAEtAABBIEYEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQZsfNgIQIANBBjYCDEEAIQIMzAELQQIhAgyyAQsDQCABLQAAQSBHDQIgBCABQQFqIgFHDQALQY4BIQIMygELIAEgBEYEQEGNASECDMoBCwJAIAEtAABBCWsOBEoAAEoAC0H1ACECDLABCyADLQApQQVGBEBB9gAhAgywAQtB9AAhAgyvAQsgASAERgRAQYwBIQIMyAELIANBEDYCCCADIAE2AgQMCgsgASAERgRAQYsBIQIMxwELAkAgAS0AAEEJaw4ERwAARwALQfMAIQIMrQELIAEgBEcEQCADQRA2AgggAyABNgIEQfEAIQIMrQELQYoBIQIMxQELAkAgASAERwRAA0AgAS0AAEGg0ABqLQAAIgBBA0cEQAJAIABBAWsOAkkABAtB8AAhAgyvAQsgBCABQQFqIgFHDQALQYgBIQIMxgELQYgBIQIMxQELIANBADYCHCADIAE2AhQgA0HbIDYCECADQQc2AgxBACECDMQBCyABIARGBEBBiQEhAgzEAQsCQAJAAkAgAS0AAEGg0gBqLQAAQQFrDgNGAgABC0HyACECDKwBCyADQQA2AhwgAyABNgIUIANBtBI2AhAgA0EHNgIMQQAhAgzEAQtB6gAhAgyqAQsgASAERwRAIAFBAWohAUHvACECDKoBC0GHASECDMIBCyAEIAEiAEYEQEGGASECDMIBCyAALQAAIgFBL0YEQCAAQQFqIQFB7gAhAgypAQsgAUEJayICQRdLDQEgACEBQQEgAnRBm4CABHENQQwBCyAEIAEiAEYEQEGFASECDMEBCyAALQAAQS9HDQAgAEEBaiEBDAMLQQAhAiADQQA2AhwgAyAANgIUIANB2yA2AhAgA0EHNgIMDL8BCwJAAkACQAJAAkADQCABLQAAQaDOAGotAAAiAEEFRwRAAkACQCAAQQFrDghHBQYHCAAEAQgLQesAIQIMrQELIAFBAWohAUHtACECDKwBCyAEIAFBAWoiAUcNAAtBhAEhAgzDAQsgAUEBagwUCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDMEBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDMABCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDL8BCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy+AQsgASAERgRAQYMBIQIMvgELAkAgAS0AAEGgzgBqLQAAQQFrDgg+BAUGAAgCAwcLIAFBAWohAQtBAyECDKMBCyABQQFqDA0LQQAhAiADQQA2AhwgA0HREjYCECADQQc2AgwgAyABQQFqNgIUDLoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDLkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDLgBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDLcBCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy2AQtB7AAhAgycAQsgASAERgRAQYIBIQIMtQELIAFBAWoMAgsgASAERgRAQYEBIQIMtAELIAFBAWoMAQsgASAERg0BIAFBAWoLIQFBBCECDJgBC0GAASECDLABCwNAIAEtAABBoMwAai0AACIAQQJHBEAgAEEBRwRAQekAIQIMmQELDDELIAQgAUEBaiIBRw0AC0H/ACECDK8BCyABIARGBEBB/gAhAgyvAQsCQCABLQAAQQlrDjcvAwYvBAYGBgYGBgYGBgYGBgYGBgYGBgUGBgIGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYABgsgAUEBagshAUEFIQIMlAELIAFBAWoMBgsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgyrAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyqAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgypAQsgA0EANgIcIAMgATYCFCADQY0UNgIQIANBBzYCDEEAIQIMqAELAkACQAJAAkADQCABLQAAQaDKAGotAAAiAEEFRwRAAkAgAEEBaw4GLgMEBQYABgtB6AAhAgyUAQsgBCABQQFqIgFHDQALQf0AIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqAELIANBADYCHCADIAE2AhQgA0HkCDYCECADQQc2AgxBACECDKcBCyABIARGDQEgAUEBagshAUEGIQIMjAELQfwAIQIMpAELAkACQAJAAkADQCABLQAAQaDIAGotAAAiAEEFRwRAIABBAWsOBCkCAwQFCyAEIAFBAWoiAUcNAAtB+wAhAgynAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgymAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgylAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgykAQsgA0EANgIcIAMgATYCFCADQbwKNgIQIANBBzYCDEEAIQIMowELQc8AIQIMiQELQdEAIQIMiAELQecAIQIMhwELIAEgBEYEQEH6ACECDKABCwJAIAEtAABBCWsOBCAAACAACyABQQFqIQFB5gAhAgyGAQsgASAERgRAQfkAIQIMnwELAkAgAS0AAEEJaw4EHwAAHwALQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFBEBB4gEhAgyGAQsgAEEVRwRAIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDJ8BCyADQfgANgIcIAMgATYCFCADQeoaNgIQIANBFTYCDEEAIQIMngELIAEgBEcEQCADQQ02AgggAyABNgIEQeQAIQIMhQELQfcAIQIMnQELIAEgBEYEQEH2ACECDJ0BCwJAAkACQCABLQAAQcgAaw4LAAELCwsLCwsLCwILCyABQQFqIQFB3QAhAgyFAQsgAUEBaiEBQeAAIQIMhAELIAFBAWohAUHjACECDIMBC0H1ACECIAEgBEYNmwEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBtdUAai0AAEcNCCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMnAELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgAEQCADQfQANgIcIAMgATYCFCADIAA2AgxBACECDJwBC0HiACECDIIBC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMnAELQeEAIQIMggELIANB8wA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyaAQsgAy0AKSIAQSNrQQtJDQkCQCAAQQZLDQBBASAAdEHKAHFFDQAMCgtBACECIANBADYCHCADIAE2AhQgA0HtCTYCECADQQg2AgwMmQELQfIAIQIgASAERg2YASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGz1QBqLQAARw0FIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyZAQsgAygCBCEAIANCADcDACADIAAgBkEBaiIBECsiAARAIANB8QA2AhwgAyABNgIUIAMgADYCDEEAIQIMmQELQd8AIQIMfwtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJkBC0HeACECDH8LIANB8AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyXAQsgAy0AKUEhRg0GIANBADYCHCADIAE2AhQgA0GRCjYCECADQQg2AgxBACECDJYBC0HvACECIAEgBEYNlQEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMlgELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgBFDQIgA0HtADYCHCADIAE2AhQgAyAANgIMQQAhAgyVAQsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNgAEgA0HuADYCHCADIAE2AhQgAyAANgIMQQAhAgyTAQtB3AAhAgx5C0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMkwELQdsAIQIMeQsgA0HsADYCHCADIAE2AhQgA0GAGzYCECADQRU2AgxBACECDJEBCyADLQApIgBBI0kNACAAQS5GDQAgA0EANgIcIAMgATYCFCADQckJNgIQIANBCDYCDEEAIQIMkAELQdoAIQIMdgsgASAERgRAQesAIQIMjwELAkAgAS0AAEEvRgRAIAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANBs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AhAgA0EPNgIMQQAhAgxoC0EAIQACQCADKAI4IgJFDQAgAigCSCICRQ0AIAMgAhEAACEACyAARQRAQcEAIQIMTwsgAEEVRwRAIANBADYCHCADIAE2AhQgA0GmDzYCECADQRw2AgxBACECDGgLIANBygA2AhwgAyABNgIUIANBhRw2AhAgA0EVNgIMQQAhAgxnCyABIARHBEAgASECA0AgBCACIgFrQRBOBEAgAUEQaiEC/Qz/////////////////////IAH9AAAAIg1BB/1sIA39DODg4ODg4ODg4ODg4ODg4OD9bv0MX19fX19fX19fX19fX19fX/0mIA39DAkJCQkJCQkJCQkJCQkJCQn9I/1Q/VL9ZEF/c2giAEEQRg0BIAAgAWohAQwYCyABIARGBEBBxAAhAgxpCyABLQAAQcDBAGotAABBAUcNFyAEIAFBAWoiAkcNAAtBxAAhAgxnC0HEACECDGYLIAEgBEcEQANAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXEiAEEJRg0AIABBIEYNAAJAAkACQAJAIABB4wBrDhMAAwMDAwMDAwEDAwMDAwMDAwMCAwsgAUEBaiEBQTYhAgxSCyABQQFqIQFBNyECDFELIAFBAWohAUE4IQIMUAsMFQsgBCABQQFqIgFHDQALQTwhAgxmC0E8IQIMZQsgASAERgRAQcgAIQIMZQsgA0ESNgIIIAMgATYCBAJAAkACQAJAAkAgAy0ALEEBaw4EFAABAgkLIAMtADJBIHENA0HgASECDE8LAkAgAy8BMiIAQQhxRQ0AIAMtAChBAUcNACADLQAuQQhxRQ0CCyADIABB9/sDcUGABHI7ATIMCwsgAyADLwEyQRByOwEyDAQLIANBADYCBCADIAEgARAxIgAEQCADQcEANgIcIAMgADYCDCADIAFBAWo2AhRBACECDGYLIAFBAWohAQxYCyADQQA2AhwgAyABNgIUIANB9BM2AhAgA0EENgIMQQAhAgxkC0HHACECIAEgBEYNYyADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIABBwMUAai0AACABLQAAQSByRw0BIABBBkYNSiAAQQFqIQAgBCABQQF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QQAhAiADQQA2AhwgAyABNgIUIANBxBg2AhAgA0ECNgIMDAQLIANBAjYCHCADIAE2AhQgA0GpHjYCECADQRY2AgxBACECDAMLQd4AIQIgASAERg0CIAlBCGohByADKAIAIQUCQAJAIAEgBEcEQCAFQZbIAGohCCAEIAVqIAFrIQYgBUF/c0EKaiIFIAFqIQADQCABLQAAIAgtAABHBEBBAiEIDAMLIAVFBEBBACEIIAAhAQwDCyAFQQFrIQUgCEEBaiEIIAQgAUEBaiIBRw0ACyAGIQUgBCEBCyAHQQE2AgAgAyAFNgIADAELIANBADYCACAHIAg2AgALIAcgATYCBCAJKAIMIQACQAJAIAkoAghBAWsOAgQBAAsgA0EANgIcIANBwh42AhAgA0EXNgIMIAMgAEEBajYCFEEAIQIMAwsgA0EANgIcIAMgADYCFCADQdceNgIQIANBCTYCDEEAIQIMAgsgASAERgRAQSghAgwCCyADQQk2AgggAyABNgIEQSchAgwBCyABIARGBEBBASECDAELA0ACQAJAAkAgAS0AAEEKaw4EAAEBAAELIAFBAWohAQwBCyABQQFqIQEgAy0ALkEgcQ0AQQAhAiADQQA2AhwgAyABNgIUIANBoSE2AhAgA0EFNgIMDAILQQEhAiABIARHDQALCyAJQRBqJAAgAkUEQCADKAIMIQAMAQsgAyACNgIcQQAhACADKAIEIgFFDQAgAyABIAQgAygCCBEBACIBRQ0AIAMgBDYCFCADIAE2AgwgASEACyAAC74CAQJ/IABBADoAACAAQeQAaiIBQQFrQQA6AAAgAEEAOgACIABBADoAASABQQNrQQA6AAAgAUECa0EAOgAAIABBADoAAyABQQRrQQA6AABBACAAa0EDcSIBIABqIgBBADYCAEHkACABa0F8cSICIABqIgFBBGtBADYCAAJAIAJBCUkNACAAQQA2AgggAEEANgIEIAFBCGtBADYCACABQQxrQQA2AgAgAkEZSQ0AIABBADYCGCAAQQA2AhQgAEEANgIQIABBADYCDCABQRBrQQA2AgAgAUEUa0EANgIAIAFBGGtBADYCACABQRxrQQA2AgAgAiAAQQRxQRhyIgJrIgF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k9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw=='\n\nlet wasmBuffer\n\nObject.defineProperty(module, 'exports', {\n get: () => {\n return wasmBuffer\n ? wasmBuffer\n : (wasmBuffer = Buffer.from(wasmBase64, 'base64'))\n }\n})\n", "'use strict'\n\nconst corsSafeListedMethods = /** @type {const} */ (['GET', 'HEAD', 'POST'])\nconst corsSafeListedMethodsSet = new Set(corsSafeListedMethods)\n\nconst nullBodyStatus = /** @type {const} */ ([101, 204, 205, 304])\n\nconst redirectStatus = /** @type {const} */ ([301, 302, 303, 307, 308])\nconst redirectStatusSet = new Set(redirectStatus)\n\n/**\n * @see https://fetch.spec.whatwg.org/#block-bad-port\n */\nconst badPorts = /** @type {const} */ ([\n '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79',\n '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137',\n '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532',\n '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723',\n '2049', '3659', '4045', '4190', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6679',\n '6697', '10080'\n])\nconst badPortsSet = new Set(badPorts)\n\n/**\n * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-header\n */\nconst referrerPolicyTokens = /** @type {const} */ ([\n 'no-referrer',\n 'no-referrer-when-downgrade',\n 'same-origin',\n 'origin',\n 'strict-origin',\n 'origin-when-cross-origin',\n 'strict-origin-when-cross-origin',\n 'unsafe-url'\n])\n\n/**\n * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies\n */\nconst referrerPolicy = /** @type {const} */ ([\n '',\n ...referrerPolicyTokens\n])\nconst referrerPolicyTokensSet = new Set(referrerPolicyTokens)\n\nconst requestRedirect = /** @type {const} */ (['follow', 'manual', 'error'])\n\nconst safeMethods = /** @type {const} */ (['GET', 'HEAD', 'OPTIONS', 'TRACE'])\nconst safeMethodsSet = new Set(safeMethods)\n\nconst requestMode = /** @type {const} */ (['navigate', 'same-origin', 'no-cors', 'cors'])\n\nconst requestCredentials = /** @type {const} */ (['omit', 'same-origin', 'include'])\n\nconst requestCache = /** @type {const} */ ([\n 'default',\n 'no-store',\n 'reload',\n 'no-cache',\n 'force-cache',\n 'only-if-cached'\n])\n\n/**\n * @see https://fetch.spec.whatwg.org/#request-body-header-name\n */\nconst requestBodyHeader = /** @type {const} */ ([\n 'content-encoding',\n 'content-language',\n 'content-location',\n 'content-type',\n // See https://github.com/nodejs/undici/issues/2021\n // 'Content-Length' is a forbidden header name, which is typically\n // removed in the Headers implementation. However, undici doesn't\n // filter out headers, so we add it here.\n 'content-length'\n])\n\n/**\n * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex\n */\nconst requestDuplex = /** @type {const} */ ([\n 'half'\n])\n\n/**\n * @see http://fetch.spec.whatwg.org/#forbidden-method\n */\nconst forbiddenMethods = /** @type {const} */ (['CONNECT', 'TRACE', 'TRACK'])\nconst forbiddenMethodsSet = new Set(forbiddenMethods)\n\nconst subresource = /** @type {const} */ ([\n 'audio',\n 'audioworklet',\n 'font',\n 'image',\n 'manifest',\n 'paintworklet',\n 'script',\n 'style',\n 'track',\n 'video',\n 'xslt',\n ''\n])\nconst subresourceSet = new Set(subresource)\n\nmodule.exports = {\n subresource,\n forbiddenMethods,\n requestBodyHeader,\n referrerPolicy,\n requestRedirect,\n requestMode,\n requestCredentials,\n requestCache,\n redirectStatus,\n corsSafeListedMethods,\n nullBodyStatus,\n safeMethods,\n badPorts,\n requestDuplex,\n subresourceSet,\n badPortsSet,\n redirectStatusSet,\n corsSafeListedMethodsSet,\n safeMethodsSet,\n forbiddenMethodsSet,\n referrerPolicyTokens: referrerPolicyTokensSet\n}\n", "'use strict'\n\n// In case of breaking changes, increase the version\n// number to avoid conflicts.\nconst globalOrigin = Symbol.for('undici.globalOrigin.1')\n\nfunction getGlobalOrigin () {\n return globalThis[globalOrigin]\n}\n\nfunction setGlobalOrigin (newOrigin) {\n if (newOrigin === undefined) {\n Object.defineProperty(globalThis, globalOrigin, {\n value: undefined,\n writable: true,\n enumerable: false,\n configurable: false\n })\n\n return\n }\n\n const parsedURL = new URL(newOrigin)\n\n if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') {\n throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`)\n }\n\n Object.defineProperty(globalThis, globalOrigin, {\n value: parsedURL,\n writable: true,\n enumerable: false,\n configurable: false\n })\n}\n\nmodule.exports = {\n getGlobalOrigin,\n setGlobalOrigin\n}\n", "'use strict'\n\nconst textDecoder = new TextDecoder()\n\n/**\n * @see https://encoding.spec.whatwg.org/#utf-8-decode\n * @param {Uint8Array} buffer\n */\nfunction utf8DecodeBytes (buffer) {\n if (buffer.length === 0) {\n return ''\n }\n\n // 1. Let buffer be the result of peeking three bytes from\n // ioQueue, converted to a byte sequence.\n\n // 2. If buffer is 0xEF 0xBB 0xBF, then read three\n // bytes from ioQueue. (Do nothing with those bytes.)\n if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) {\n buffer = buffer.subarray(3)\n }\n\n // 3. Process a queue with an instance of UTF-8\u2019s\n // decoder, ioQueue, output, and \"replacement\".\n const output = textDecoder.decode(buffer)\n\n // 4. Return output.\n return output\n}\n\nmodule.exports = {\n utf8DecodeBytes\n}\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { utf8DecodeBytes } = require('../../encoding')\n\n/**\n * @param {(char: string) => boolean} condition\n * @param {string} input\n * @param {{ position: number }} position\n * @returns {string}\n *\n * @see https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points\n */\nfunction collectASequenceOfCodePoints (condition, input, position) {\n // 1. Let result be the empty string.\n let result = ''\n\n // 2. While position doesn\u2019t point past the end of input and the\n // code point at position within input meets the condition condition:\n while (position.position < input.length && condition(input[position.position])) {\n // 1. Append that code point to the end of result.\n result += input[position.position]\n\n // 2. Advance position by 1.\n position.position++\n }\n\n // 3. Return result.\n return result\n}\n\n/**\n * A faster collectASequenceOfCodePoints that only works when comparing a single character.\n * @param {string} char\n * @param {string} input\n * @param {{ position: number }} position\n * @returns {string}\n *\n * @see https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points\n */\nfunction collectASequenceOfCodePointsFast (char, input, position) {\n const idx = input.indexOf(char, position.position)\n const start = position.position\n\n if (idx === -1) {\n position.position = input.length\n return input.slice(start)\n }\n\n position.position = idx\n return input.slice(start, position.position)\n}\n\nconst ASCII_WHITESPACE_REPLACE_REGEX = /[\\u0009\\u000A\\u000C\\u000D\\u0020]/g // eslint-disable-line no-control-regex\n\n/**\n * @param {string} data\n * @returns {Uint8Array | 'failure'}\n *\n * @see https://infra.spec.whatwg.org/#forgiving-base64-decode\n */\nfunction forgivingBase64 (data) {\n // 1. Remove all ASCII whitespace from data.\n data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, '')\n\n let dataLength = data.length\n // 2. If data\u2019s code point length divides by 4 leaving\n // no remainder, then:\n if (dataLength % 4 === 0) {\n // 1. If data ends with one or two U+003D (=) code points,\n // then remove them from data.\n if (data.charCodeAt(dataLength - 1) === 0x003D) {\n --dataLength\n if (data.charCodeAt(dataLength - 1) === 0x003D) {\n --dataLength\n }\n }\n }\n\n // 3. If data\u2019s code point length divides by 4 leaving\n // a remainder of 1, then return failure.\n if (dataLength % 4 === 1) {\n return 'failure'\n }\n\n // 4. If data contains a code point that is not one of\n // U+002B (+)\n // U+002F (/)\n // ASCII alphanumeric\n // then return failure.\n if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) {\n return 'failure'\n }\n\n const buffer = Buffer.from(data, 'base64')\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength)\n}\n\n/**\n * @param {number} char\n * @returns {boolean}\n *\n * @see https://infra.spec.whatwg.org/#ascii-whitespace\n */\nfunction isASCIIWhitespace (char) {\n return (\n char === 0x09 || // \\t\n char === 0x0a || // \\n\n char === 0x0c || // \\f\n char === 0x0d || // \\r\n char === 0x20 // space\n )\n}\n\n/**\n * @param {Uint8Array} input\n * @returns {string}\n *\n * @see https://infra.spec.whatwg.org/#isomorphic-decode\n */\nfunction isomorphicDecode (input) {\n // 1. To isomorphic decode a byte sequence input, return a string whose code point\n // length is equal to input\u2019s length and whose code points have the same values\n // as the values of input\u2019s bytes, in the same order.\n const length = input.length\n if ((2 << 15) - 1 > length) {\n return String.fromCharCode.apply(null, input)\n }\n let result = ''\n let i = 0\n let addition = (2 << 15) - 1\n while (i < length) {\n if (i + addition > length) {\n addition = length - i\n }\n result += String.fromCharCode.apply(null, input.subarray(i, i += addition))\n }\n return result\n}\n\nconst invalidIsomorphicEncodeValueRegex = /[^\\x00-\\xFF]/ // eslint-disable-line no-control-regex\n\n/**\n * @param {string} input\n * @returns {string}\n *\n * @see https://infra.spec.whatwg.org/#isomorphic-encode\n */\nfunction isomorphicEncode (input) {\n // 1. Assert: input contains no code points greater than U+00FF.\n assert(!invalidIsomorphicEncodeValueRegex.test(input))\n\n // 2. Return a byte sequence whose length is equal to input\u2019s code\n // point length and whose bytes have the same values as the\n // values of input\u2019s code points, in the same order\n return input\n}\n\n/**\n * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value\n * @param {Uint8Array} bytes\n */\nfunction parseJSONFromBytes (bytes) {\n return JSON.parse(utf8DecodeBytes(bytes))\n}\n\n/**\n * @param {string} str\n * @param {boolean} [leading=true]\n * @param {boolean} [trailing=true]\n * @returns {string}\n *\n * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace\n */\nfunction removeASCIIWhitespace (str, leading = true, trailing = true) {\n return removeChars(str, leading, trailing, isASCIIWhitespace)\n}\n\n/**\n * @param {string} str\n * @param {boolean} leading\n * @param {boolean} trailing\n * @param {(charCode: number) => boolean} predicate\n * @returns {string}\n */\nfunction removeChars (str, leading, trailing, predicate) {\n let lead = 0\n let trail = str.length - 1\n\n if (leading) {\n while (lead < str.length && predicate(str.charCodeAt(lead))) lead++\n }\n\n if (trailing) {\n while (trail > 0 && predicate(str.charCodeAt(trail))) trail--\n }\n\n return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1)\n}\n\n// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string\nfunction serializeJavascriptValueToJSONString (value) {\n // 1. Let result be ? Call(%JSON.stringify%, undefined, \u00AB value \u00BB).\n const result = JSON.stringify(value)\n\n // 2. If result is undefined, then throw a TypeError.\n if (result === undefined) {\n throw new TypeError('Value is not JSON serializable')\n }\n\n // 3. Assert: result is a string.\n assert(typeof result === 'string')\n\n // 4. Return result.\n return result\n}\n\nmodule.exports = {\n collectASequenceOfCodePoints,\n collectASequenceOfCodePointsFast,\n forgivingBase64,\n isASCIIWhitespace,\n isomorphicDecode,\n isomorphicEncode,\n parseJSONFromBytes,\n removeASCIIWhitespace,\n removeChars,\n serializeJavascriptValueToJSONString\n}\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { forgivingBase64, collectASequenceOfCodePoints, collectASequenceOfCodePointsFast, isomorphicDecode, removeASCIIWhitespace, removeChars } = require('../infra')\n\nconst encoder = new TextEncoder()\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#http-token-code-point\n */\nconst HTTP_TOKEN_CODEPOINTS = /^[-!#$%&'*+.^_|~A-Za-z0-9]+$/u\nconst HTTP_WHITESPACE_REGEX = /[\\u000A\\u000D\\u0009\\u0020]/u // eslint-disable-line\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point\n */\nconst HTTP_QUOTED_STRING_TOKENS = /^[\\u0009\\u0020-\\u007E\\u0080-\\u00FF]+$/u // eslint-disable-line\n\n// https://fetch.spec.whatwg.org/#data-url-processor\n/** @param {URL} dataURL */\nfunction dataURLProcessor (dataURL) {\n // 1. Assert: dataURL\u2019s scheme is \"data\".\n assert(dataURL.protocol === 'data:')\n\n // 2. Let input be the result of running the URL\n // serializer on dataURL with exclude fragment\n // set to true.\n let input = URLSerializer(dataURL, true)\n\n // 3. Remove the leading \"data:\" string from input.\n input = input.slice(5)\n\n // 4. Let position point at the start of input.\n const position = { position: 0 }\n\n // 5. Let mimeType be the result of collecting a\n // sequence of code points that are not equal\n // to U+002C (,), given position.\n let mimeType = collectASequenceOfCodePointsFast(\n ',',\n input,\n position\n )\n\n // 6. Strip leading and trailing ASCII whitespace\n // from mimeType.\n // Undici implementation note: we need to store the\n // length because if the mimetype has spaces removed,\n // the wrong amount will be sliced from the input in\n // step #9\n const mimeTypeLength = mimeType.length\n mimeType = removeASCIIWhitespace(mimeType, true, true)\n\n // 7. If position is past the end of input, then\n // return failure\n if (position.position >= input.length) {\n return 'failure'\n }\n\n // 8. Advance position by 1.\n position.position++\n\n // 9. Let encodedBody be the remainder of input.\n const encodedBody = input.slice(mimeTypeLength + 1)\n\n // 10. Let body be the percent-decoding of encodedBody.\n let body = stringPercentDecode(encodedBody)\n\n // 11. If mimeType ends with U+003B (;), followed by\n // zero or more U+0020 SPACE, followed by an ASCII\n // case-insensitive match for \"base64\", then:\n if (/;(?:\\u0020*)base64$/ui.test(mimeType)) {\n // 1. Let stringBody be the isomorphic decode of body.\n const stringBody = isomorphicDecode(body)\n\n // 2. Set body to the forgiving-base64 decode of\n // stringBody.\n body = forgivingBase64(stringBody)\n\n // 3. If body is failure, then return failure.\n if (body === 'failure') {\n return 'failure'\n }\n\n // 4. Remove the last 6 code points from mimeType.\n mimeType = mimeType.slice(0, -6)\n\n // 5. Remove trailing U+0020 SPACE code points from mimeType,\n // if any.\n mimeType = mimeType.replace(/(\\u0020+)$/u, '')\n\n // 6. Remove the last U+003B (;) code point from mimeType.\n mimeType = mimeType.slice(0, -1)\n }\n\n // 12. If mimeType starts with U+003B (;), then prepend\n // \"text/plain\" to mimeType.\n if (mimeType.startsWith(';')) {\n mimeType = 'text/plain' + mimeType\n }\n\n // 13. Let mimeTypeRecord be the result of parsing\n // mimeType.\n let mimeTypeRecord = parseMIMEType(mimeType)\n\n // 14. If mimeTypeRecord is failure, then set\n // mimeTypeRecord to text/plain;charset=US-ASCII.\n if (mimeTypeRecord === 'failure') {\n mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII')\n }\n\n // 15. Return a new data: URL struct whose MIME\n // type is mimeTypeRecord and body is body.\n // https://fetch.spec.whatwg.org/#data-url-struct\n return { mimeType: mimeTypeRecord, body }\n}\n\n// https://url.spec.whatwg.org/#concept-url-serializer\n/**\n * @param {URL} url\n * @param {boolean} excludeFragment\n */\nfunction URLSerializer (url, excludeFragment = false) {\n if (!excludeFragment) {\n return url.href\n }\n\n const href = url.href\n const hashLength = url.hash.length\n\n const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength)\n\n if (!hashLength && href.endsWith('#')) {\n return serialized.slice(0, -1)\n }\n\n return serialized\n}\n\n// https://url.spec.whatwg.org/#string-percent-decode\n/** @param {string} input */\nfunction stringPercentDecode (input) {\n // 1. Let bytes be the UTF-8 encoding of input.\n const bytes = encoder.encode(input)\n\n // 2. Return the percent-decoding of bytes.\n return percentDecode(bytes)\n}\n\n/**\n * @param {number} byte\n */\nfunction isHexCharByte (byte) {\n // 0-9 A-F a-f\n return (byte >= 0x30 && byte <= 0x39) || (byte >= 0x41 && byte <= 0x46) || (byte >= 0x61 && byte <= 0x66)\n}\n\n/**\n * @param {number} byte\n */\nfunction hexByteToNumber (byte) {\n return (\n // 0-9\n byte >= 0x30 && byte <= 0x39\n ? (byte - 48)\n // Convert to uppercase\n // ((byte & 0xDF) - 65) + 10\n : ((byte & 0xDF) - 55)\n )\n}\n\n// https://url.spec.whatwg.org/#percent-decode\n/** @param {Uint8Array} input */\nfunction percentDecode (input) {\n const length = input.length\n // 1. Let output be an empty byte sequence.\n /** @type {Uint8Array} */\n const output = new Uint8Array(length)\n let j = 0\n let i = 0\n // 2. For each byte byte in input:\n while (i < length) {\n const byte = input[i]\n\n // 1. If byte is not 0x25 (%), then append byte to output.\n if (byte !== 0x25) {\n output[j++] = byte\n\n // 2. Otherwise, if byte is 0x25 (%) and the next two bytes\n // after byte in input are not in the ranges\n // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F),\n // and 0x61 (a) to 0x66 (f), all inclusive, append byte\n // to output.\n } else if (\n byte === 0x25 &&\n !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))\n ) {\n output[j++] = 0x25\n\n // 3. Otherwise:\n } else {\n // 1. Let bytePoint be the two bytes after byte in input,\n // decoded, and then interpreted as hexadecimal number.\n // 2. Append a byte whose value is bytePoint to output.\n output[j++] = (hexByteToNumber(input[i + 1]) << 4) | hexByteToNumber(input[i + 2])\n\n // 3. Skip the next two bytes in input.\n i += 2\n }\n ++i\n }\n\n // 3. Return output.\n return length === j ? output : output.subarray(0, j)\n}\n\n// https://mimesniff.spec.whatwg.org/#parse-a-mime-type\n/** @param {string} input */\nfunction parseMIMEType (input) {\n // 1. Remove any leading and trailing HTTP whitespace\n // from input.\n input = removeHTTPWhitespace(input, true, true)\n\n // 2. Let position be a position variable for input,\n // initially pointing at the start of input.\n const position = { position: 0 }\n\n // 3. Let type be the result of collecting a sequence\n // of code points that are not U+002F (/) from\n // input, given position.\n const type = collectASequenceOfCodePointsFast(\n '/',\n input,\n position\n )\n\n // 4. If type is the empty string or does not solely\n // contain HTTP token code points, then return failure.\n // https://mimesniff.spec.whatwg.org/#http-token-code-point\n if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) {\n return 'failure'\n }\n\n // 5. If position is past the end of input, then return\n // failure\n if (position.position >= input.length) {\n return 'failure'\n }\n\n // 6. Advance position by 1. (This skips past U+002F (/).)\n position.position++\n\n // 7. Let subtype be the result of collecting a sequence of\n // code points that are not U+003B (;) from input, given\n // position.\n let subtype = collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 8. Remove any trailing HTTP whitespace from subtype.\n subtype = removeHTTPWhitespace(subtype, false, true)\n\n // 9. If subtype is the empty string or does not solely\n // contain HTTP token code points, then return failure.\n if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) {\n return 'failure'\n }\n\n const typeLowercase = type.toLowerCase()\n const subtypeLowercase = subtype.toLowerCase()\n\n // 10. Let mimeType be a new MIME type record whose type\n // is type, in ASCII lowercase, and subtype is subtype,\n // in ASCII lowercase.\n // https://mimesniff.spec.whatwg.org/#mime-type\n const mimeType = {\n type: typeLowercase,\n subtype: subtypeLowercase,\n /** @type {Map} */\n parameters: new Map(),\n // https://mimesniff.spec.whatwg.org/#mime-type-essence\n essence: `${typeLowercase}/${subtypeLowercase}`\n }\n\n // 11. While position is not past the end of input:\n while (position.position < input.length) {\n // 1. Advance position by 1. (This skips past U+003B (;).)\n position.position++\n\n // 2. Collect a sequence of code points that are HTTP\n // whitespace from input given position.\n collectASequenceOfCodePoints(\n // https://fetch.spec.whatwg.org/#http-whitespace\n char => HTTP_WHITESPACE_REGEX.test(char),\n input,\n position\n )\n\n // 3. Let parameterName be the result of collecting a\n // sequence of code points that are not U+003B (;)\n // or U+003D (=) from input, given position.\n let parameterName = collectASequenceOfCodePoints(\n (char) => char !== ';' && char !== '=',\n input,\n position\n )\n\n // 4. Set parameterName to parameterName, in ASCII\n // lowercase.\n parameterName = parameterName.toLowerCase()\n\n // 5. If position is not past the end of input, then:\n if (position.position < input.length) {\n // 1. If the code point at position within input is\n // U+003B (;), then continue.\n if (input[position.position] === ';') {\n continue\n }\n\n // 2. Advance position by 1. (This skips past U+003D (=).)\n position.position++\n }\n\n // 6. If position is past the end of input, then break.\n if (position.position >= input.length) {\n break\n }\n\n // 7. Let parameterValue be null.\n let parameterValue = null\n\n // 8. If the code point at position within input is\n // U+0022 (\"), then:\n if (input[position.position] === '\"') {\n // 1. Set parameterValue to the result of collecting\n // an HTTP quoted string from input, given position\n // and the extract-value flag.\n parameterValue = collectAnHTTPQuotedString(input, position, true)\n\n // 2. Collect a sequence of code points that are not\n // U+003B (;) from input, given position.\n collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 9. Otherwise:\n } else {\n // 1. Set parameterValue to the result of collecting\n // a sequence of code points that are not U+003B (;)\n // from input, given position.\n parameterValue = collectASequenceOfCodePointsFast(\n ';',\n input,\n position\n )\n\n // 2. Remove any trailing HTTP whitespace from parameterValue.\n parameterValue = removeHTTPWhitespace(parameterValue, false, true)\n\n // 3. If parameterValue is the empty string, then continue.\n if (parameterValue.length === 0) {\n continue\n }\n }\n\n // 10. If all of the following are true\n // - parameterName is not the empty string\n // - parameterName solely contains HTTP token code points\n // - parameterValue solely contains HTTP quoted-string token code points\n // - mimeType\u2019s parameters[parameterName] does not exist\n // then set mimeType\u2019s parameters[parameterName] to parameterValue.\n if (\n parameterName.length !== 0 &&\n HTTP_TOKEN_CODEPOINTS.test(parameterName) &&\n (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) &&\n !mimeType.parameters.has(parameterName)\n ) {\n mimeType.parameters.set(parameterName, parameterValue)\n }\n }\n\n // 12. Return mimeType.\n return mimeType\n}\n\n// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string\n// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string\n/**\n * @param {string} input\n * @param {{ position: number }} position\n * @param {boolean} [extractValue=false]\n */\nfunction collectAnHTTPQuotedString (input, position, extractValue = false) {\n // 1. Let positionStart be position.\n const positionStart = position.position\n\n // 2. Let value be the empty string.\n let value = ''\n\n // 3. Assert: the code point at position within input\n // is U+0022 (\").\n assert(input[position.position] === '\"')\n\n // 4. Advance position by 1.\n position.position++\n\n // 5. While true:\n while (true) {\n // 1. Append the result of collecting a sequence of code points\n // that are not U+0022 (\") or U+005C (\\) from input, given\n // position, to value.\n value += collectASequenceOfCodePoints(\n (char) => char !== '\"' && char !== '\\\\',\n input,\n position\n )\n\n // 2. If position is past the end of input, then break.\n if (position.position >= input.length) {\n break\n }\n\n // 3. Let quoteOrBackslash be the code point at position within\n // input.\n const quoteOrBackslash = input[position.position]\n\n // 4. Advance position by 1.\n position.position++\n\n // 5. If quoteOrBackslash is U+005C (\\), then:\n if (quoteOrBackslash === '\\\\') {\n // 1. If position is past the end of input, then append\n // U+005C (\\) to value and break.\n if (position.position >= input.length) {\n value += '\\\\'\n break\n }\n\n // 2. Append the code point at position within input to value.\n value += input[position.position]\n\n // 3. Advance position by 1.\n position.position++\n\n // 6. Otherwise:\n } else {\n // 1. Assert: quoteOrBackslash is U+0022 (\").\n assert(quoteOrBackslash === '\"')\n\n // 2. Break.\n break\n }\n }\n\n // 6. If the extract-value flag is set, then return value.\n if (extractValue) {\n return value\n }\n\n // 7. Return the code points from positionStart to position,\n // inclusive, within input.\n return input.slice(positionStart, position.position)\n}\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type\n */\nfunction serializeAMimeType (mimeType) {\n assert(mimeType !== 'failure')\n const { parameters, essence } = mimeType\n\n // 1. Let serialization be the concatenation of mimeType\u2019s\n // type, U+002F (/), and mimeType\u2019s subtype.\n let serialization = essence\n\n // 2. For each name \u2192 value of mimeType\u2019s parameters:\n for (let [name, value] of parameters.entries()) {\n // 1. Append U+003B (;) to serialization.\n serialization += ';'\n\n // 2. Append name to serialization.\n serialization += name\n\n // 3. Append U+003D (=) to serialization.\n serialization += '='\n\n // 4. If value does not solely contain HTTP token code\n // points or value is the empty string, then:\n if (!HTTP_TOKEN_CODEPOINTS.test(value)) {\n // 1. Precede each occurrence of U+0022 (\") or\n // U+005C (\\) in value with U+005C (\\).\n value = value.replace(/[\\\\\"]/ug, '\\\\$&')\n\n // 2. Prepend U+0022 (\") to value.\n value = '\"' + value\n\n // 3. Append U+0022 (\") to value.\n value += '\"'\n }\n\n // 5. Append value to serialization.\n serialization += value\n }\n\n // 3. Return serialization.\n return serialization\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-whitespace\n * @param {number} char\n */\nfunction isHTTPWhiteSpace (char) {\n // \"\\r\\n\\t \"\n return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x020\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-whitespace\n * @param {string} str\n * @param {boolean} [leading=true]\n * @param {boolean} [trailing=true]\n */\nfunction removeHTTPWhitespace (str, leading = true, trailing = true) {\n return removeChars(str, leading, trailing, isHTTPWhiteSpace)\n}\n\n/**\n * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type\n * @param {Exclude, 'failure'>} mimeType\n */\nfunction minimizeSupportedMimeType (mimeType) {\n switch (mimeType.essence) {\n case 'application/ecmascript':\n case 'application/javascript':\n case 'application/x-ecmascript':\n case 'application/x-javascript':\n case 'text/ecmascript':\n case 'text/javascript':\n case 'text/javascript1.0':\n case 'text/javascript1.1':\n case 'text/javascript1.2':\n case 'text/javascript1.3':\n case 'text/javascript1.4':\n case 'text/javascript1.5':\n case 'text/jscript':\n case 'text/livescript':\n case 'text/x-ecmascript':\n case 'text/x-javascript':\n // 1. If mimeType is a JavaScript MIME type, then return \"text/javascript\".\n return 'text/javascript'\n case 'application/json':\n case 'text/json':\n // 2. If mimeType is a JSON MIME type, then return \"application/json\".\n return 'application/json'\n case 'image/svg+xml':\n // 3. If mimeType\u2019s essence is \"image/svg+xml\", then return \"image/svg+xml\".\n return 'image/svg+xml'\n case 'text/xml':\n case 'application/xml':\n // 4. If mimeType is an XML MIME type, then return \"application/xml\".\n return 'application/xml'\n }\n\n // 2. If mimeType is a JSON MIME type, then return \"application/json\".\n if (mimeType.subtype.endsWith('+json')) {\n return 'application/json'\n }\n\n // 4. If mimeType is an XML MIME type, then return \"application/xml\".\n if (mimeType.subtype.endsWith('+xml')) {\n return 'application/xml'\n }\n\n // 5. If mimeType is supported by the user agent, then return mimeType\u2019s essence.\n // Technically, node doesn't support any mimetypes.\n\n // 6. Return the empty string.\n return ''\n}\n\nmodule.exports = {\n dataURLProcessor,\n URLSerializer,\n stringPercentDecode,\n parseMIMEType,\n collectAnHTTPQuotedString,\n serializeAMimeType,\n removeHTTPWhitespace,\n minimizeSupportedMimeType,\n HTTP_TOKEN_CODEPOINTS\n}\n", "'use strict'\n\n/** @typedef {`node:${string}`} NodeModuleName */\n\n/** @type {Record any>} */\nconst lazyLoaders = {\n __proto__: null,\n 'node:crypto': () => require('node:crypto'),\n 'node:sqlite': () => require('node:sqlite'),\n 'node:worker_threads': () => require('node:worker_threads'),\n 'node:zlib': () => require('node:zlib')\n}\n\n/**\n * @param {NodeModuleName} moduleName\n * @returns {boolean}\n */\nfunction detectRuntimeFeatureByNodeModule (moduleName) {\n try {\n lazyLoaders[moduleName]()\n return true\n } catch (err) {\n if (err.code !== 'ERR_UNKNOWN_BUILTIN_MODULE' && err.code !== 'ERR_NO_CRYPTO') {\n throw err\n }\n return false\n }\n}\n\n/**\n * @param {NodeModuleName} moduleName\n * @param {string} property\n * @returns {boolean}\n */\nfunction detectRuntimeFeatureByExportedProperty (moduleName, property) {\n const module = lazyLoaders[moduleName]()\n return typeof module[property] !== 'undefined'\n}\n\nconst runtimeFeaturesByExportedProperty = /** @type {const} */ (['markAsUncloneable', 'zstd'])\n\n/** @type {Record} */\nconst exportedPropertyLookup = {\n markAsUncloneable: ['node:worker_threads', 'markAsUncloneable'],\n zstd: ['node:zlib', 'createZstdDecompress']\n}\n\n/** @typedef {typeof runtimeFeaturesByExportedProperty[number]} RuntimeFeatureByExportedProperty */\n\nconst runtimeFeaturesAsNodeModule = /** @type {const} */ (['crypto', 'sqlite'])\n/** @typedef {typeof runtimeFeaturesAsNodeModule[number]} RuntimeFeatureByNodeModule */\n\nconst features = /** @type {const} */ ([\n ...runtimeFeaturesAsNodeModule,\n ...runtimeFeaturesByExportedProperty\n])\n\n/** @typedef {typeof features[number]} Feature */\n\n/**\n * @param {Feature} feature\n * @returns {boolean}\n */\nfunction detectRuntimeFeature (feature) {\n if (runtimeFeaturesAsNodeModule.includes(/** @type {RuntimeFeatureByNodeModule} */ (feature))) {\n return detectRuntimeFeatureByNodeModule(`node:${feature}`)\n } else if (runtimeFeaturesByExportedProperty.includes(/** @type {RuntimeFeatureByExportedProperty} */ (feature))) {\n const [moduleName, property] = exportedPropertyLookup[feature]\n return detectRuntimeFeatureByExportedProperty(moduleName, property)\n }\n throw new TypeError(`unknown feature: ${feature}`)\n}\n\n/**\n * @class\n * @name RuntimeFeatures\n */\nclass RuntimeFeatures {\n /** @type {Map} */\n #map = new Map()\n\n /**\n * Clears all cached feature detections.\n */\n clear () {\n this.#map.clear()\n }\n\n /**\n * @param {Feature} feature\n * @returns {boolean}\n */\n has (feature) {\n return (\n this.#map.get(feature) ?? this.#detectRuntimeFeature(feature)\n )\n }\n\n /**\n * @param {Feature} feature\n * @param {boolean} value\n */\n set (feature, value) {\n if (features.includes(feature) === false) {\n throw new TypeError(`unknown feature: ${feature}`)\n }\n this.#map.set(feature, value)\n }\n\n /**\n * @param {Feature} feature\n * @returns {boolean}\n */\n #detectRuntimeFeature (feature) {\n const result = detectRuntimeFeature(feature)\n this.#map.set(feature, result)\n return result\n }\n}\n\nconst instance = new RuntimeFeatures()\n\nmodule.exports.runtimeFeatures = instance\nmodule.exports.default = instance\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { types, inspect } = require('node:util')\nconst { runtimeFeatures } = require('../../util/runtime-features')\n\nconst UNDEFINED = 1\nconst BOOLEAN = 2\nconst STRING = 3\nconst SYMBOL = 4\nconst NUMBER = 5\nconst BIGINT = 6\nconst NULL = 7\nconst OBJECT = 8 // function and object\n\nconst FunctionPrototypeSymbolHasInstance = Function.call.bind(Function.prototype[Symbol.hasInstance])\n\n/** @type {import('../../../types/webidl').Webidl} */\nconst webidl = {\n converters: {},\n util: {},\n errors: {},\n is: {}\n}\n\n/**\n * @description Instantiate an error.\n *\n * @param {Object} opts\n * @param {string} opts.header\n * @param {string} opts.message\n * @returns {TypeError}\n */\nwebidl.errors.exception = function (message) {\n return new TypeError(`${message.header}: ${message.message}`)\n}\n\n/**\n * @description Instantiate an error when conversion from one type to another has failed.\n *\n * @param {Object} opts\n * @param {string} opts.prefix\n * @param {string} opts.argument\n * @param {string[]} opts.types\n * @returns {TypeError}\n */\nwebidl.errors.conversionFailed = function (opts) {\n const plural = opts.types.length === 1 ? '' : ' one of'\n const message =\n `${opts.argument} could not be converted to` +\n `${plural}: ${opts.types.join(', ')}.`\n\n return webidl.errors.exception({\n header: opts.prefix,\n message\n })\n}\n\n/**\n * @description Instantiate an error when an invalid argument is provided\n *\n * @param {Object} context\n * @param {string} context.prefix\n * @param {string} context.value\n * @param {string} context.type\n * @returns {TypeError}\n */\nwebidl.errors.invalidArgument = function (context) {\n return webidl.errors.exception({\n header: context.prefix,\n message: `\"${context.value}\" is an invalid ${context.type}.`\n })\n}\n\n// https://webidl.spec.whatwg.org/#implements\nwebidl.brandCheck = function (V, I) {\n if (!FunctionPrototypeSymbolHasInstance(I, V)) {\n const err = new TypeError('Illegal invocation')\n err.code = 'ERR_INVALID_THIS' // node compat.\n throw err\n }\n}\n\nwebidl.brandCheckMultiple = function (List) {\n const prototypes = List.map((c) => webidl.util.MakeTypeAssertion(c))\n\n return (V) => {\n if (prototypes.every(typeCheck => !typeCheck(V))) {\n const err = new TypeError('Illegal invocation')\n err.code = 'ERR_INVALID_THIS' // node compat.\n throw err\n }\n }\n}\n\nwebidl.argumentLengthCheck = function ({ length }, min, ctx) {\n if (length < min) {\n throw webidl.errors.exception({\n message: `${min} argument${min !== 1 ? 's' : ''} required, ` +\n `but${length ? ' only' : ''} ${length} found.`,\n header: ctx\n })\n }\n}\n\nwebidl.illegalConstructor = function () {\n throw webidl.errors.exception({\n header: 'TypeError',\n message: 'Illegal constructor'\n })\n}\n\nwebidl.util.MakeTypeAssertion = function (I) {\n return (O) => FunctionPrototypeSymbolHasInstance(I, O)\n}\n\n// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values\nwebidl.util.Type = function (V) {\n switch (typeof V) {\n case 'undefined': return UNDEFINED\n case 'boolean': return BOOLEAN\n case 'string': return STRING\n case 'symbol': return SYMBOL\n case 'number': return NUMBER\n case 'bigint': return BIGINT\n case 'function':\n case 'object': {\n if (V === null) {\n return NULL\n }\n\n return OBJECT\n }\n }\n}\n\nwebidl.util.Types = {\n UNDEFINED,\n BOOLEAN,\n STRING,\n SYMBOL,\n NUMBER,\n BIGINT,\n NULL,\n OBJECT\n}\n\nwebidl.util.TypeValueToString = function (o) {\n switch (webidl.util.Type(o)) {\n case UNDEFINED: return 'Undefined'\n case BOOLEAN: return 'Boolean'\n case STRING: return 'String'\n case SYMBOL: return 'Symbol'\n case NUMBER: return 'Number'\n case BIGINT: return 'BigInt'\n case NULL: return 'Null'\n case OBJECT: return 'Object'\n }\n}\n\nwebidl.util.markAsUncloneable = runtimeFeatures.has('markAsUncloneable')\n ? require('node:worker_threads').markAsUncloneable\n : () => {}\n\n// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint\nwebidl.util.ConvertToInt = function (V, bitLength, signedness, flags) {\n let upperBound\n let lowerBound\n\n // 1. If bitLength is 64, then:\n if (bitLength === 64) {\n // 1. Let upperBound be 2^53 \u2212 1.\n upperBound = Math.pow(2, 53) - 1\n\n // 2. If signedness is \"unsigned\", then let lowerBound be 0.\n if (signedness === 'unsigned') {\n lowerBound = 0\n } else {\n // 3. Otherwise let lowerBound be \u22122^53 + 1.\n lowerBound = Math.pow(-2, 53) + 1\n }\n } else if (signedness === 'unsigned') {\n // 2. Otherwise, if signedness is \"unsigned\", then:\n\n // 1. Let lowerBound be 0.\n lowerBound = 0\n\n // 2. Let upperBound be 2^bitLength \u2212 1.\n upperBound = Math.pow(2, bitLength) - 1\n } else {\n // 3. Otherwise:\n\n // 1. Let lowerBound be -2^bitLength \u2212 1.\n lowerBound = Math.pow(-2, bitLength) - 1\n\n // 2. Let upperBound be 2^bitLength \u2212 1 \u2212 1.\n upperBound = Math.pow(2, bitLength - 1) - 1\n }\n\n // 4. Let x be ? ToNumber(V).\n let x = Number(V)\n\n // 5. If x is \u22120, then set x to +0.\n if (x === 0) {\n x = 0\n }\n\n // 6. If the conversion is to an IDL type associated\n // with the [EnforceRange] extended attribute, then:\n if (webidl.util.HasFlag(flags, webidl.attributes.EnforceRange)) {\n // 1. If x is NaN, +\u221E, or \u2212\u221E, then throw a TypeError.\n if (\n Number.isNaN(x) ||\n x === Number.POSITIVE_INFINITY ||\n x === Number.NEGATIVE_INFINITY\n ) {\n throw webidl.errors.exception({\n header: 'Integer conversion',\n message: `Could not convert ${webidl.util.Stringify(V)} to an integer.`\n })\n }\n\n // 2. Set x to IntegerPart(x).\n x = webidl.util.IntegerPart(x)\n\n // 3. If x < lowerBound or x > upperBound, then\n // throw a TypeError.\n if (x < lowerBound || x > upperBound) {\n throw webidl.errors.exception({\n header: 'Integer conversion',\n message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.`\n })\n }\n\n // 4. Return x.\n return x\n }\n\n // 7. If x is not NaN and the conversion is to an IDL\n // type associated with the [Clamp] extended\n // attribute, then:\n if (!Number.isNaN(x) && webidl.util.HasFlag(flags, webidl.attributes.Clamp)) {\n // 1. Set x to min(max(x, lowerBound), upperBound).\n x = Math.min(Math.max(x, lowerBound), upperBound)\n\n // 2. Round x to the nearest integer, choosing the\n // even integer if it lies halfway between two,\n // and choosing +0 rather than \u22120.\n if (Math.floor(x) % 2 === 0) {\n x = Math.floor(x)\n } else {\n x = Math.ceil(x)\n }\n\n // 3. Return x.\n return x\n }\n\n // 8. If x is NaN, +0, +\u221E, or \u2212\u221E, then return +0.\n if (\n Number.isNaN(x) ||\n (x === 0 && Object.is(0, x)) ||\n x === Number.POSITIVE_INFINITY ||\n x === Number.NEGATIVE_INFINITY\n ) {\n return 0\n }\n\n // 9. Set x to IntegerPart(x).\n x = webidl.util.IntegerPart(x)\n\n // 10. Set x to x modulo 2^bitLength.\n x = x % Math.pow(2, bitLength)\n\n // 11. If signedness is \"signed\" and x \u2265 2^bitLength \u2212 1,\n // then return x \u2212 2^bitLength.\n if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) {\n return x - Math.pow(2, bitLength)\n }\n\n // 12. Otherwise, return x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart\nwebidl.util.IntegerPart = function (n) {\n // 1. Let r be floor(abs(n)).\n const r = Math.floor(Math.abs(n))\n\n // 2. If n < 0, then return -1 \u00D7 r.\n if (n < 0) {\n return -1 * r\n }\n\n // 3. Otherwise, return r.\n return r\n}\n\nwebidl.util.Stringify = function (V) {\n const type = webidl.util.Type(V)\n\n switch (type) {\n case SYMBOL:\n return `Symbol(${V.description})`\n case OBJECT:\n return inspect(V)\n case STRING:\n return `\"${V}\"`\n case BIGINT:\n return `${V}n`\n default:\n return `${V}`\n }\n}\n\nwebidl.util.IsResizableArrayBuffer = function (V) {\n if (types.isArrayBuffer(V)) {\n return V.resizable\n }\n\n if (types.isSharedArrayBuffer(V)) {\n return V.growable\n }\n\n throw webidl.errors.exception({\n header: 'IsResizableArrayBuffer',\n message: `\"${webidl.util.Stringify(V)}\" is not an array buffer.`\n })\n}\n\nwebidl.util.HasFlag = function (flags, attributes) {\n return typeof flags === 'number' && (flags & attributes) === attributes\n}\n\n// https://webidl.spec.whatwg.org/#es-sequence\nwebidl.sequenceConverter = function (converter) {\n return (V, prefix, argument, Iterable) => {\n // 1. If Type(V) is not Object, throw a TypeError.\n if (webidl.util.Type(V) !== OBJECT) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.`\n })\n }\n\n // 2. Let method be ? GetMethod(V, @@iterator).\n /** @type {Generator} */\n const method = typeof Iterable === 'function' ? Iterable() : V?.[Symbol.iterator]?.()\n const seq = []\n let index = 0\n\n // 3. If method is undefined, throw a TypeError.\n if (\n method === undefined ||\n typeof method.next !== 'function'\n ) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} is not iterable.`\n })\n }\n\n // https://webidl.spec.whatwg.org/#create-sequence-from-iterable\n while (true) {\n const { done, value } = method.next()\n\n if (done) {\n break\n }\n\n seq.push(converter(value, prefix, `${argument}[${index++}]`))\n }\n\n return seq\n }\n}\n\n// https://webidl.spec.whatwg.org/#es-to-record\nwebidl.recordConverter = function (keyConverter, valueConverter) {\n return (O, prefix, argument) => {\n // 1. If Type(O) is not Object, throw a TypeError.\n if (webidl.util.Type(O) !== OBJECT) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} (\"${webidl.util.TypeValueToString(O)}\") is not an Object.`\n })\n }\n\n // 2. Let result be a new empty instance of record.\n const result = {}\n\n if (!types.isProxy(O)) {\n // 1. Let desc be ? O.[[GetOwnProperty]](key).\n const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]\n\n for (const key of keys) {\n const keyName = webidl.util.Stringify(key)\n\n // 1. Let typedKey be key converted to an IDL value of type K.\n const typedKey = keyConverter(key, prefix, `Key ${keyName} in ${argument}`)\n\n // 2. Let value be ? Get(O, key).\n // 3. Let typedValue be value converted to an IDL value of type V.\n const typedValue = valueConverter(O[key], prefix, `${argument}[${keyName}]`)\n\n // 4. Set result[typedKey] to typedValue.\n result[typedKey] = typedValue\n }\n\n // 5. Return result.\n return result\n }\n\n // 3. Let keys be ? O.[[OwnPropertyKeys]]().\n const keys = Reflect.ownKeys(O)\n\n // 4. For each key of keys.\n for (const key of keys) {\n // 1. Let desc be ? O.[[GetOwnProperty]](key).\n const desc = Reflect.getOwnPropertyDescriptor(O, key)\n\n // 2. If desc is not undefined and desc.[[Enumerable]] is true:\n if (desc?.enumerable) {\n // 1. Let typedKey be key converted to an IDL value of type K.\n const typedKey = keyConverter(key, prefix, argument)\n\n // 2. Let value be ? Get(O, key).\n // 3. Let typedValue be value converted to an IDL value of type V.\n const typedValue = valueConverter(O[key], prefix, argument)\n\n // 4. Set result[typedKey] to typedValue.\n result[typedKey] = typedValue\n }\n }\n\n // 5. Return result.\n return result\n }\n}\n\nwebidl.interfaceConverter = function (TypeCheck, name) {\n return (V, prefix, argument) => {\n if (!TypeCheck(V)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `Expected ${argument} (\"${webidl.util.Stringify(V)}\") to be an instance of ${name}.`\n })\n }\n\n return V\n }\n}\n\nwebidl.dictionaryConverter = function (converters) {\n // \"For each dictionary member member declared on dictionary, in lexicographical order:\"\n converters.sort((a, b) => (a.key > b.key) - (a.key < b.key))\n\n return (dictionary, prefix, argument) => {\n const dict = {}\n\n if (dictionary != null && webidl.util.Type(dictionary) !== OBJECT) {\n throw webidl.errors.exception({\n header: prefix,\n message: `Expected ${dictionary} to be one of: Null, Undefined, Object.`\n })\n }\n\n for (const options of converters) {\n const { key, defaultValue, required, converter } = options\n\n if (required === true) {\n if (dictionary == null || !Object.hasOwn(dictionary, key)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `Missing required key \"${key}\".`\n })\n }\n }\n\n let value = dictionary?.[key]\n const hasDefault = defaultValue !== undefined\n\n // Only use defaultValue if value is undefined and\n // a defaultValue options was provided.\n if (hasDefault && value === undefined) {\n value = defaultValue()\n }\n\n // A key can be optional and have no default value.\n // When this happens, do not perform a conversion,\n // and do not assign the key a value.\n if (required || hasDefault || value !== undefined) {\n value = converter(value, prefix, `${argument}.${key}`)\n\n if (\n options.allowedValues &&\n !options.allowedValues.includes(value)\n ) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.`\n })\n }\n\n dict[key] = value\n }\n }\n\n return dict\n }\n}\n\nwebidl.nullableConverter = function (converter) {\n return (V, prefix, argument) => {\n if (V === null) {\n return V\n }\n\n return converter(V, prefix, argument)\n }\n}\n\n/**\n * @param {*} value\n * @returns {boolean}\n */\nwebidl.is.USVString = function (value) {\n return (\n typeof value === 'string' &&\n value.isWellFormed()\n )\n}\n\nwebidl.is.ReadableStream = webidl.util.MakeTypeAssertion(ReadableStream)\nwebidl.is.Blob = webidl.util.MakeTypeAssertion(Blob)\nwebidl.is.URLSearchParams = webidl.util.MakeTypeAssertion(URLSearchParams)\nwebidl.is.File = webidl.util.MakeTypeAssertion(File)\nwebidl.is.URL = webidl.util.MakeTypeAssertion(URL)\nwebidl.is.AbortSignal = webidl.util.MakeTypeAssertion(AbortSignal)\nwebidl.is.MessagePort = webidl.util.MakeTypeAssertion(MessagePort)\n\nwebidl.is.BufferSource = function (V) {\n return types.isArrayBuffer(V) || (\n ArrayBuffer.isView(V) &&\n types.isArrayBuffer(V.buffer)\n )\n}\n\n// https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy\nwebidl.util.getCopyOfBytesHeldByBufferSource = function (bufferSource) {\n // 1. Let jsBufferSource be the result of converting bufferSource to a JavaScript value.\n const jsBufferSource = bufferSource\n\n // 2. Let jsArrayBuffer be jsBufferSource.\n let jsArrayBuffer = jsBufferSource\n\n // 3. Let offset be 0.\n let offset = 0\n\n // 4. Let length be 0.\n let length = 0\n\n // 5. If jsBufferSource has a [[ViewedArrayBuffer]] internal slot, then:\n if (types.isTypedArray(jsBufferSource) || types.isDataView(jsBufferSource)) {\n // 5.1. Set jsArrayBuffer to jsBufferSource.[[ViewedArrayBuffer]].\n jsArrayBuffer = jsBufferSource.buffer\n\n // 5.2. Set offset to jsBufferSource.[[ByteOffset]].\n offset = jsBufferSource.byteOffset\n\n // 5.3. Set length to jsBufferSource.[[ByteLength]].\n length = jsBufferSource.byteLength\n } else {\n // 6. Otherwise:\n\n // 6.1. Assert: jsBufferSource is an ArrayBuffer or SharedArrayBuffer object.\n assert(types.isAnyArrayBuffer(jsBufferSource))\n\n // 6.2. Set length to jsBufferSource.[[ArrayBufferByteLength]].\n length = jsBufferSource.byteLength\n }\n\n // 7. If IsDetachedBuffer(jsArrayBuffer) is true, then return the empty byte sequence.\n if (jsArrayBuffer.detached) {\n return new Uint8Array(0)\n }\n\n // 8. Let bytes be a new byte sequence of length equal to length.\n const bytes = new Uint8Array(length)\n\n // 9. For i in the range offset to offset + length \u2212 1, inclusive,\n // set bytes[i \u2212 offset] to GetValueFromBuffer(jsArrayBuffer, i, Uint8, true, Unordered).\n const view = new Uint8Array(jsArrayBuffer, offset, length)\n bytes.set(view)\n\n // 10. Return bytes.\n return bytes\n}\n\n// https://webidl.spec.whatwg.org/#es-DOMString\nwebidl.converters.DOMString = function (V, prefix, argument, flags) {\n // 1. If V is null and the conversion is to an IDL type\n // associated with the [LegacyNullToEmptyString]\n // extended attribute, then return the DOMString value\n // that represents the empty string.\n if (V === null && webidl.util.HasFlag(flags, webidl.attributes.LegacyNullToEmptyString)) {\n return ''\n }\n\n // 2. Let x be ? ToString(V).\n if (typeof V === 'symbol') {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} is a symbol, which cannot be converted to a DOMString.`\n })\n }\n\n // 3. Return the IDL DOMString value that represents the\n // same sequence of code units as the one the\n // ECMAScript String value x represents.\n return String(V)\n}\n\n// https://webidl.spec.whatwg.org/#es-ByteString\nwebidl.converters.ByteString = function (V, prefix, argument) {\n // 1. Let x be ? ToString(V).\n if (typeof V === 'symbol') {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} is a symbol, which cannot be converted to a ByteString.`\n })\n }\n\n const x = String(V)\n\n // 2. If the value of any element of x is greater than\n // 255, then throw a TypeError.\n for (let index = 0; index < x.length; index++) {\n if (x.charCodeAt(index) > 255) {\n throw new TypeError(\n 'Cannot convert argument to a ByteString because the character at ' +\n `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`\n )\n }\n }\n\n // 3. Return an IDL ByteString value whose length is the\n // length of x, and where the value of each element is\n // the value of the corresponding element of x.\n return x\n}\n\n/**\n * @param {unknown} value\n * @returns {string}\n * @see https://webidl.spec.whatwg.org/#es-USVString\n */\nwebidl.converters.USVString = function (value) {\n // TODO: rewrite this so we can control the errors thrown\n if (typeof value === 'string') {\n return value.toWellFormed()\n }\n return `${value}`.toWellFormed()\n}\n\n// https://webidl.spec.whatwg.org/#es-boolean\nwebidl.converters.boolean = function (V) {\n // 1. Let x be the result of computing ToBoolean(V).\n // https://262.ecma-international.org/10.0/index.html#table-10\n const x = Boolean(V)\n\n // 2. Return the IDL boolean value that is the one that represents\n // the same truth value as the ECMAScript Boolean value x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-any\nwebidl.converters.any = function (V) {\n return V\n}\n\n// https://webidl.spec.whatwg.org/#es-long-long\nwebidl.converters['long long'] = function (V, prefix, argument) {\n // 1. Let x be ? ConvertToInt(V, 64, \"signed\").\n const x = webidl.util.ConvertToInt(V, 64, 'signed', 0, prefix, argument)\n\n // 2. Return the IDL long long value that represents\n // the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-long-long\nwebidl.converters['unsigned long long'] = function (V, prefix, argument) {\n // 1. Let x be ? ConvertToInt(V, 64, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 64, 'unsigned', 0, prefix, argument)\n\n // 2. Return the IDL unsigned long long value that\n // represents the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-long\nwebidl.converters['unsigned long'] = function (V, prefix, argument) {\n // 1. Let x be ? ConvertToInt(V, 32, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 32, 'unsigned', 0, prefix, argument)\n\n // 2. Return the IDL unsigned long value that\n // represents the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#es-unsigned-short\nwebidl.converters['unsigned short'] = function (V, prefix, argument, flags) {\n // 1. Let x be ? ConvertToInt(V, 16, \"unsigned\").\n const x = webidl.util.ConvertToInt(V, 16, 'unsigned', flags, prefix, argument)\n\n // 2. Return the IDL unsigned short value that represents\n // the same numeric value as x.\n return x\n}\n\n// https://webidl.spec.whatwg.org/#idl-ArrayBuffer\nwebidl.converters.ArrayBuffer = function (V, prefix, argument, flags) {\n // 1. If V is not an Object, or V does not have an\n // [[ArrayBufferData]] internal slot, then throw a\n // TypeError.\n // 2. If IsSharedArrayBuffer(V) is true, then throw a\n // TypeError.\n // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances\n if (\n webidl.util.Type(V) !== OBJECT ||\n !types.isArrayBuffer(V)\n ) {\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${argument} (\"${webidl.util.Stringify(V)}\")`,\n types: ['ArrayBuffer']\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V) is true, then throw a\n // TypeError.\n if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a resizable ArrayBuffer.`\n })\n }\n\n // 4. Return the IDL ArrayBuffer value that is a\n // reference to the same object as V.\n return V\n}\n\n// https://webidl.spec.whatwg.org/#idl-SharedArrayBuffer\nwebidl.converters.SharedArrayBuffer = function (V, prefix, argument, flags) {\n // 1. If V is not an Object, or V does not have an\n // [[ArrayBufferData]] internal slot, then throw a\n // TypeError.\n // 2. If IsSharedArrayBuffer(V) is false, then throw a\n // TypeError.\n // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances\n if (\n webidl.util.Type(V) !== OBJECT ||\n !types.isSharedArrayBuffer(V)\n ) {\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${argument} (\"${webidl.util.Stringify(V)}\")`,\n types: ['SharedArrayBuffer']\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V) is true, then throw a\n // TypeError.\n if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a resizable SharedArrayBuffer.`\n })\n }\n\n // 4. Return the IDL SharedArrayBuffer value that is a\n // reference to the same object as V.\n return V\n}\n\n// https://webidl.spec.whatwg.org/#dfn-typed-array-type\nwebidl.converters.TypedArray = function (V, T, prefix, argument, flags) {\n // 1. Let T be the IDL type V is being converted to.\n\n // 2. If Type(V) is not Object, or V does not have a\n // [[TypedArrayName]] internal slot with a value\n // equal to T\u2019s name, then throw a TypeError.\n if (\n webidl.util.Type(V) !== OBJECT ||\n !types.isTypedArray(V) ||\n V.constructor.name !== T.name\n ) {\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${argument} (\"${webidl.util.Stringify(V)}\")`,\n types: [T.name]\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowShared] extended attribute, and\n // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a view on a shared array buffer.`\n })\n }\n\n // 4. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a view on a resizable array buffer.`\n })\n }\n\n // 5. Return the IDL value of type T that is a reference\n // to the same object as V.\n return V\n}\n\n// https://webidl.spec.whatwg.org/#idl-DataView\nwebidl.converters.DataView = function (V, prefix, argument, flags) {\n // 1. If Type(V) is not Object, or V does not have a\n // [[DataView]] internal slot, then throw a TypeError.\n if (webidl.util.Type(V) !== OBJECT || !types.isDataView(V)) {\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${argument} (\"${webidl.util.Stringify(V)}\")`,\n types: ['DataView']\n })\n }\n\n // 2. If the conversion is not to an IDL type associated\n // with the [AllowShared] extended attribute, and\n // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true,\n // then throw a TypeError.\n if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a view on a shared array buffer.`\n })\n }\n\n // 3. If the conversion is not to an IDL type associated\n // with the [AllowResizable] extended attribute, and\n // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is\n // true, then throw a TypeError.\n if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a view on a resizable array buffer.`\n })\n }\n\n // 4. Return the IDL DataView value that is a reference\n // to the same object as V.\n return V\n}\n\n// https://webidl.spec.whatwg.org/#ArrayBufferView\nwebidl.converters.ArrayBufferView = function (V, prefix, argument, flags) {\n if (\n webidl.util.Type(V) !== OBJECT ||\n !types.isArrayBufferView(V)\n ) {\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${argument} (\"${webidl.util.Stringify(V)}\")`,\n types: ['ArrayBufferView']\n })\n }\n\n if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a view on a shared array buffer.`\n })\n }\n\n if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a view on a resizable array buffer.`\n })\n }\n\n return V\n}\n\n// https://webidl.spec.whatwg.org/#BufferSource\nwebidl.converters.BufferSource = function (V, prefix, argument, flags) {\n if (types.isArrayBuffer(V)) {\n return webidl.converters.ArrayBuffer(V, prefix, argument, flags)\n }\n\n if (types.isArrayBufferView(V)) {\n flags &= ~webidl.attributes.AllowShared\n\n return webidl.converters.ArrayBufferView(V, prefix, argument, flags)\n }\n\n // Make this explicit for easier debugging\n if (types.isSharedArrayBuffer(V)) {\n throw webidl.errors.exception({\n header: prefix,\n message: `${argument} cannot be a SharedArrayBuffer.`\n })\n }\n\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${argument} (\"${webidl.util.Stringify(V)}\")`,\n types: ['ArrayBuffer', 'ArrayBufferView']\n })\n}\n\n// https://webidl.spec.whatwg.org/#AllowSharedBufferSource\nwebidl.converters.AllowSharedBufferSource = function (V, prefix, argument, flags) {\n if (types.isArrayBuffer(V)) {\n return webidl.converters.ArrayBuffer(V, prefix, argument, flags)\n }\n\n if (types.isSharedArrayBuffer(V)) {\n return webidl.converters.SharedArrayBuffer(V, prefix, argument, flags)\n }\n\n if (types.isArrayBufferView(V)) {\n flags |= webidl.attributes.AllowShared\n return webidl.converters.ArrayBufferView(V, prefix, argument, flags)\n }\n\n throw webidl.errors.conversionFailed({\n prefix,\n argument: `${argument} (\"${webidl.util.Stringify(V)}\")`,\n types: ['ArrayBuffer', 'SharedArrayBuffer', 'ArrayBufferView']\n })\n}\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.ByteString\n)\n\nwebidl.converters['sequence>'] = webidl.sequenceConverter(\n webidl.converters['sequence']\n)\n\nwebidl.converters['record'] = webidl.recordConverter(\n webidl.converters.ByteString,\n webidl.converters.ByteString\n)\n\nwebidl.converters.Blob = webidl.interfaceConverter(webidl.is.Blob, 'Blob')\n\nwebidl.converters.AbortSignal = webidl.interfaceConverter(\n webidl.is.AbortSignal,\n 'AbortSignal'\n)\n\n/**\n * [LegacyTreatNonObjectAsNull]\n * callback EventHandlerNonNull = any (Event event);\n * typedef EventHandlerNonNull? EventHandler;\n * @param {*} V\n */\nwebidl.converters.EventHandlerNonNull = function (V) {\n if (webidl.util.Type(V) !== OBJECT) {\n return null\n }\n\n // [I]f the value is not an object, it will be converted to null, and if the value is not callable,\n // it will be converted to a callback function value that does nothing when called.\n if (typeof V === 'function') {\n return V\n }\n\n return () => {}\n}\n\nwebidl.attributes = {\n Clamp: 1 << 0,\n EnforceRange: 1 << 1,\n AllowShared: 1 << 2,\n AllowResizable: 1 << 3,\n LegacyNullToEmptyString: 1 << 4\n}\n\nmodule.exports = {\n webidl\n}\n", "'use strict'\n\nconst { Transform } = require('node:stream')\nconst zlib = require('node:zlib')\nconst { redirectStatusSet, referrerPolicyTokens, badPortsSet } = require('./constants')\nconst { getGlobalOrigin } = require('./global')\nconst { collectAnHTTPQuotedString, parseMIMEType } = require('./data-url')\nconst { performance } = require('node:perf_hooks')\nconst { ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require('../../core/util')\nconst assert = require('node:assert')\nconst { isUint8Array } = require('node:util/types')\nconst { webidl } = require('../webidl')\nconst { isomorphicEncode, collectASequenceOfCodePoints, removeChars } = require('../infra')\n\nfunction responseURL (response) {\n // https://fetch.spec.whatwg.org/#responses\n // A response has an associated URL. It is a pointer to the last URL\n // in response\u2019s URL list and null if response\u2019s URL list is empty.\n const urlList = response.urlList\n const length = urlList.length\n return length === 0 ? null : urlList[length - 1].toString()\n}\n\n// https://fetch.spec.whatwg.org/#concept-response-location-url\nfunction responseLocationURL (response, requestFragment) {\n // 1. If response\u2019s status is not a redirect status, then return null.\n if (!redirectStatusSet.has(response.status)) {\n return null\n }\n\n // 2. Let location be the result of extracting header list values given\n // `Location` and response\u2019s header list.\n let location = response.headersList.get('location', true)\n\n // 3. If location is a header value, then set location to the result of\n // parsing location with response\u2019s URL.\n if (location !== null && isValidHeaderValue(location)) {\n if (!isValidEncodedURL(location)) {\n // Some websites respond location header in UTF-8 form without encoding them as ASCII\n // and major browsers redirect them to correctly UTF-8 encoded addresses.\n // Here, we handle that behavior in the same way.\n location = normalizeBinaryStringToUtf8(location)\n }\n location = new URL(location, responseURL(response))\n }\n\n // 4. If location is a URL whose fragment is null, then set location\u2019s\n // fragment to requestFragment.\n if (location && !location.hash) {\n location.hash = requestFragment\n }\n\n // 5. Return location.\n return location\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2\n * @param {string} url\n * @returns {boolean}\n */\nfunction isValidEncodedURL (url) {\n for (let i = 0; i < url.length; ++i) {\n const code = url.charCodeAt(i)\n\n if (\n code > 0x7E || // Non-US-ASCII + DEL\n code < 0x20 // Control characters NUL - US\n ) {\n return false\n }\n }\n return true\n}\n\n/**\n * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it.\n * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well.\n * @param {string} value\n * @returns {string}\n */\nfunction normalizeBinaryStringToUtf8 (value) {\n return Buffer.from(value, 'binary').toString('utf8')\n}\n\n/** @returns {URL} */\nfunction requestCurrentURL (request) {\n return request.urlList[request.urlList.length - 1]\n}\n\nfunction requestBadPort (request) {\n // 1. Let url be request\u2019s current URL.\n const url = requestCurrentURL(request)\n\n // 2. If url\u2019s scheme is an HTTP(S) scheme and url\u2019s port is a bad port,\n // then return blocked.\n if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) {\n return 'blocked'\n }\n\n // 3. Return allowed.\n return 'allowed'\n}\n\nfunction isErrorLike (object) {\n return object instanceof Error || (\n object?.constructor?.name === 'Error' ||\n object?.constructor?.name === 'DOMException'\n )\n}\n\n// Check whether |statusText| is a ByteString and\n// matches the Reason-Phrase token production.\n// RFC 2616: https://tools.ietf.org/html/rfc2616\n// RFC 7230: https://tools.ietf.org/html/rfc7230\n// \"reason-phrase = *( HTAB / SP / VCHAR / obs-text )\"\n// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116\nfunction isValidReasonPhrase (statusText) {\n for (let i = 0; i < statusText.length; ++i) {\n const c = statusText.charCodeAt(i)\n if (\n !(\n (\n c === 0x09 || // HTAB\n (c >= 0x20 && c <= 0x7e) || // SP / VCHAR\n (c >= 0x80 && c <= 0xff)\n ) // obs-text\n )\n ) {\n return false\n }\n }\n return true\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#header-name\n * @param {string} potentialValue\n */\nconst isValidHeaderName = isValidHTTPToken\n\n/**\n * @see https://fetch.spec.whatwg.org/#header-value\n * @param {string} potentialValue\n */\nfunction isValidHeaderValue (potentialValue) {\n // - Has no leading or trailing HTTP tab or space bytes.\n // - Contains no 0x00 (NUL) or HTTP newline bytes.\n return (\n potentialValue[0] === '\\t' ||\n potentialValue[0] === ' ' ||\n potentialValue[potentialValue.length - 1] === '\\t' ||\n potentialValue[potentialValue.length - 1] === ' ' ||\n potentialValue.includes('\\n') ||\n potentialValue.includes('\\r') ||\n potentialValue.includes('\\0')\n ) === false\n}\n\n/**\n * Parse a referrer policy from a Referrer-Policy header\n * @see https://w3c.github.io/webappsec-referrer-policy/#parse-referrer-policy-from-header\n */\nfunction parseReferrerPolicy (actualResponse) {\n // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response\u2019s header list.\n const policyHeader = (actualResponse.headersList.get('referrer-policy', true) ?? '').split(',')\n\n // 2. Let policy be the empty string.\n let policy = ''\n\n // 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.\n\n // Note: As the referrer-policy can contain multiple policies\n // separated by comma, we need to loop through all of them\n // and pick the first valid one.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy\n if (policyHeader.length) {\n // The right-most policy takes precedence.\n // The left-most policy is the fallback.\n for (let i = policyHeader.length; i !== 0; i--) {\n const token = policyHeader[i - 1].trim()\n if (referrerPolicyTokens.has(token)) {\n policy = token\n break\n }\n }\n }\n\n // 4. Return policy.\n return policy\n}\n\n/**\n * Given a request request and a response actualResponse, this algorithm\n * updates request\u2019s referrer policy according to the Referrer-Policy\n * header (if any) in actualResponse.\n * @see https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect\n * @param {import('./request').Request} request\n * @param {import('./response').Response} actualResponse\n */\nfunction setRequestReferrerPolicyOnRedirect (request, actualResponse) {\n // 1. Let policy be the result of executing \u00A7 8.1 Parse a referrer policy\n // from a Referrer-Policy header on actualResponse.\n const policy = parseReferrerPolicy(actualResponse)\n\n // 2. If policy is not the empty string, then set request\u2019s referrer policy to policy.\n if (policy !== '') {\n request.referrerPolicy = policy\n }\n}\n\n// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check\nfunction crossOriginResourcePolicyCheck () {\n // TODO\n return 'allowed'\n}\n\n// https://fetch.spec.whatwg.org/#concept-cors-check\nfunction corsCheck () {\n // TODO\n return 'success'\n}\n\n// https://fetch.spec.whatwg.org/#concept-tao-check\nfunction TAOCheck () {\n // TODO\n return 'success'\n}\n\nfunction appendFetchMetadata (httpRequest) {\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header\n // TODO\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header\n\n // 1. Assert: r\u2019s url is a potentially trustworthy URL.\n // TODO\n\n // 2. Let header be a Structured Header whose value is a token.\n let header = null\n\n // 3. Set header\u2019s value to r\u2019s mode.\n header = httpRequest.mode\n\n // 4. Set a structured field value `Sec-Fetch-Mode`/header in r\u2019s header list.\n httpRequest.headersList.set('sec-fetch-mode', header, true)\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header\n // TODO\n\n // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header\n // TODO\n}\n\n// https://fetch.spec.whatwg.org/#append-a-request-origin-header\nfunction appendRequestOriginHeader (request) {\n // 1. Let serializedOrigin be the result of byte-serializing a request origin\n // with request.\n // TODO: implement \"byte-serializing a request origin\"\n let serializedOrigin = request.origin\n\n // - \"'client' is changed to an origin during fetching.\"\n // This doesn't happen in undici (in most cases) because undici, by default,\n // has no concept of origin.\n // - request.origin can also be set to request.client.origin (client being\n // an environment settings object), which is undefined without using\n // setGlobalOrigin.\n if (serializedOrigin === 'client' || serializedOrigin === undefined) {\n return\n }\n\n // 2. If request\u2019s response tainting is \"cors\" or request\u2019s mode is \"websocket\",\n // then append (`Origin`, serializedOrigin) to request\u2019s header list.\n // 3. Otherwise, if request\u2019s method is neither `GET` nor `HEAD`, then:\n if (request.responseTainting === 'cors' || request.mode === 'websocket') {\n request.headersList.append('origin', serializedOrigin, true)\n } else if (request.method !== 'GET' && request.method !== 'HEAD') {\n // 1. Switch on request\u2019s referrer policy:\n switch (request.referrerPolicy) {\n case 'no-referrer':\n // Set serializedOrigin to `null`.\n serializedOrigin = null\n break\n case 'no-referrer-when-downgrade':\n case 'strict-origin':\n case 'strict-origin-when-cross-origin':\n // If request\u2019s origin is a tuple origin, its scheme is \"https\", and\n // request\u2019s current URL\u2019s scheme is not \"https\", then set\n // serializedOrigin to `null`.\n if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) {\n serializedOrigin = null\n }\n break\n case 'same-origin':\n // If request\u2019s origin is not same origin with request\u2019s current URL\u2019s\n // origin, then set serializedOrigin to `null`.\n if (!sameOrigin(request, requestCurrentURL(request))) {\n serializedOrigin = null\n }\n break\n default:\n // Do nothing.\n }\n\n // 2. Append (`Origin`, serializedOrigin) to request\u2019s header list.\n request.headersList.append('origin', serializedOrigin, true)\n }\n}\n\n// https://w3c.github.io/hr-time/#dfn-coarsen-time\nfunction coarsenTime (timestamp, crossOriginIsolatedCapability) {\n // TODO\n return timestamp\n}\n\n// https://fetch.spec.whatwg.org/#clamp-and-coarsen-connection-timing-info\nfunction clampAndCoarsenConnectionTimingInfo (connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) {\n if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) {\n return {\n domainLookupStartTime: defaultStartTime,\n domainLookupEndTime: defaultStartTime,\n connectionStartTime: defaultStartTime,\n connectionEndTime: defaultStartTime,\n secureConnectionStartTime: defaultStartTime,\n ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol\n }\n }\n\n return {\n domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability),\n domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability),\n connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability),\n connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability),\n secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability),\n ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol\n }\n}\n\n// https://w3c.github.io/hr-time/#dfn-coarsened-shared-current-time\nfunction coarsenedSharedCurrentTime (crossOriginIsolatedCapability) {\n return coarsenTime(performance.now(), crossOriginIsolatedCapability)\n}\n\n// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info\nfunction createOpaqueTimingInfo (timingInfo) {\n return {\n startTime: timingInfo.startTime ?? 0,\n redirectStartTime: 0,\n redirectEndTime: 0,\n postRedirectStartTime: timingInfo.startTime ?? 0,\n finalServiceWorkerStartTime: 0,\n finalNetworkResponseStartTime: 0,\n finalNetworkRequestStartTime: 0,\n endTime: 0,\n encodedBodySize: 0,\n decodedBodySize: 0,\n finalConnectionTimingInfo: null\n }\n}\n\n// https://html.spec.whatwg.org/multipage/origin.html#policy-container\nfunction makePolicyContainer () {\n // Note: the fetch spec doesn't make use of embedder policy or CSP list\n return {\n referrerPolicy: 'strict-origin-when-cross-origin'\n }\n}\n\n// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container\nfunction clonePolicyContainer (policyContainer) {\n return {\n referrerPolicy: policyContainer.referrerPolicy\n }\n}\n\n/**\n * Determine request\u2019s Referrer\n *\n * @see https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer\n */\nfunction determineRequestsReferrer (request) {\n // Given a request request, we can determine the correct referrer information\n // to send by examining its referrer policy as detailed in the following\n // steps, which return either no referrer or a URL:\n\n // 1. Let policy be request's referrer policy.\n const policy = request.referrerPolicy\n\n // Note: policy cannot (shouldn't) be null or an empty string.\n assert(policy)\n\n // 2. Let environment be request\u2019s client.\n\n let referrerSource = null\n\n // 3. Switch on request\u2019s referrer:\n\n // \"client\"\n if (request.referrer === 'client') {\n // Note: node isn't a browser and doesn't implement document/iframes,\n // so we bypass this step and replace it with our own.\n\n const globalOrigin = getGlobalOrigin()\n\n if (!globalOrigin || globalOrigin.origin === 'null') {\n return 'no-referrer'\n }\n\n // Note: we need to clone it as it's mutated\n referrerSource = new URL(globalOrigin)\n // a URL\n } else if (webidl.is.URL(request.referrer)) {\n // Let referrerSource be request\u2019s referrer.\n referrerSource = request.referrer\n }\n\n // 4. Let request\u2019s referrerURL be the result of stripping referrerSource for\n // use as a referrer.\n let referrerURL = stripURLForReferrer(referrerSource)\n\n // 5. Let referrerOrigin be the result of stripping referrerSource for use as\n // a referrer, with the origin-only flag set to true.\n const referrerOrigin = stripURLForReferrer(referrerSource, true)\n\n // 6. If the result of serializing referrerURL is a string whose length is\n // greater than 4096, set referrerURL to referrerOrigin.\n if (referrerURL.toString().length > 4096) {\n referrerURL = referrerOrigin\n }\n\n // 7. The user agent MAY alter referrerURL or referrerOrigin at this point\n // to enforce arbitrary policy considerations in the interests of minimizing\n // data leakage. For example, the user agent could strip the URL down to an\n // origin, modify its host, replace it with an empty string, etc.\n\n // 8. Execute the switch statements corresponding to the value of policy:\n switch (policy) {\n case 'no-referrer':\n // Return no referrer\n return 'no-referrer'\n case 'origin':\n // Return referrerOrigin\n if (referrerOrigin != null) {\n return referrerOrigin\n }\n return stripURLForReferrer(referrerSource, true)\n case 'unsafe-url':\n // Return referrerURL.\n return referrerURL\n case 'strict-origin': {\n const currentURL = requestCurrentURL(request)\n\n // 1. If referrerURL is a potentially trustworthy URL and request\u2019s\n // current URL is not a potentially trustworthy URL, then return no\n // referrer.\n if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {\n return 'no-referrer'\n }\n // 2. Return referrerOrigin\n return referrerOrigin\n }\n case 'strict-origin-when-cross-origin': {\n const currentURL = requestCurrentURL(request)\n\n // 1. If the origin of referrerURL and the origin of request\u2019s current\n // URL are the same, then return referrerURL.\n if (sameOrigin(referrerURL, currentURL)) {\n return referrerURL\n }\n\n // 2. If referrerURL is a potentially trustworthy URL and request\u2019s\n // current URL is not a potentially trustworthy URL, then return no\n // referrer.\n if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {\n return 'no-referrer'\n }\n\n // 3. Return referrerOrigin.\n return referrerOrigin\n }\n case 'same-origin':\n // 1. If the origin of referrerURL and the origin of request\u2019s current\n // URL are the same, then return referrerURL.\n if (sameOrigin(request, referrerURL)) {\n return referrerURL\n }\n // 2. Return no referrer.\n return 'no-referrer'\n case 'origin-when-cross-origin':\n // 1. If the origin of referrerURL and the origin of request\u2019s current\n // URL are the same, then return referrerURL.\n if (sameOrigin(request, referrerURL)) {\n return referrerURL\n }\n // 2. Return referrerOrigin.\n return referrerOrigin\n case 'no-referrer-when-downgrade': {\n const currentURL = requestCurrentURL(request)\n\n // 1. If referrerURL is a potentially trustworthy URL and request\u2019s\n // current URL is not a potentially trustworthy URL, then return no\n // referrer.\n if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) {\n return 'no-referrer'\n }\n // 2. Return referrerURL.\n return referrerURL\n }\n }\n}\n\n/**\n * Certain portions of URLs must not be included when sending a URL as the\n * value of a `Referer` header: a URLs fragment, username, and password\n * components must be stripped from the URL before it\u2019s sent out. This\n * algorithm accepts a origin-only flag, which defaults to false. If set to\n * true, the algorithm will additionally remove the URL\u2019s path and query\n * components, leaving only the scheme, host, and port.\n *\n * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url\n * @param {URL} url\n * @param {boolean} [originOnly=false]\n */\nfunction stripURLForReferrer (url, originOnly = false) {\n // 1. Assert: url is a URL.\n assert(webidl.is.URL(url))\n\n // Note: Create a new URL instance to avoid mutating the original URL.\n url = new URL(url)\n\n // 2. If url\u2019s scheme is a local scheme, then return no referrer.\n if (urlIsLocal(url)) {\n return 'no-referrer'\n }\n\n // 3. Set url\u2019s username to the empty string.\n url.username = ''\n\n // 4. Set url\u2019s password to the empty string.\n url.password = ''\n\n // 5. Set url\u2019s fragment to null.\n url.hash = ''\n\n // 6. If the origin-only flag is true, then:\n if (originOnly === true) {\n // 1. Set url\u2019s path to \u00AB the empty string \u00BB.\n url.pathname = ''\n\n // 2. Set url\u2019s query to null.\n url.search = ''\n }\n\n // 7. Return url.\n return url\n}\n\nconst isPotentialleTrustworthyIPv4 = RegExp.prototype.test\n .bind(/^127\\.(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){2}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)$/)\n\nconst isPotentiallyTrustworthyIPv6 = RegExp.prototype.test\n .bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/)\n\n/**\n * Check if host matches one of the CIDR notations 127.0.0.0/8 or ::1/128.\n *\n * @param {string} origin\n * @returns {boolean}\n */\nfunction isOriginIPPotentiallyTrustworthy (origin) {\n // IPv6\n if (origin.includes(':')) {\n // Remove brackets from IPv6 addresses\n if (origin[0] === '[' && origin[origin.length - 1] === ']') {\n origin = origin.slice(1, -1)\n }\n return isPotentiallyTrustworthyIPv6(origin)\n }\n\n // IPv4\n return isPotentialleTrustworthyIPv4(origin)\n}\n\n/**\n * A potentially trustworthy origin is one which a user agent can generally\n * trust as delivering data securely.\n *\n * Return value `true` means `Potentially Trustworthy`.\n * Return value `false` means `Not Trustworthy`.\n *\n * @see https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy\n * @param {string} origin\n * @returns {boolean}\n */\nfunction isOriginPotentiallyTrustworthy (origin) {\n // 1. If origin is an opaque origin, return \"Not Trustworthy\".\n if (origin == null || origin === 'null') {\n return false\n }\n\n // 2. Assert: origin is a tuple origin.\n origin = new URL(origin)\n\n // 3. If origin\u2019s scheme is either \"https\" or \"wss\",\n // return \"Potentially Trustworthy\".\n if (origin.protocol === 'https:' || origin.protocol === 'wss:') {\n return true\n }\n\n // 4. If origin\u2019s host matches one of the CIDR notations 127.0.0.0/8 or\n // ::1/128 [RFC4632], return \"Potentially Trustworthy\".\n if (isOriginIPPotentiallyTrustworthy(origin.hostname)) {\n return true\n }\n\n // 5. If the user agent conforms to the name resolution rules in\n // [let-localhost-be-localhost] and one of the following is true:\n\n // origin\u2019s host is \"localhost\" or \"localhost.\"\n if (origin.hostname === 'localhost' || origin.hostname === 'localhost.') {\n return true\n }\n\n // origin\u2019s host ends with \".localhost\" or \".localhost.\"\n if (origin.hostname.endsWith('.localhost') || origin.hostname.endsWith('.localhost.')) {\n return true\n }\n\n // 6. If origin\u2019s scheme is \"file\", return \"Potentially Trustworthy\".\n if (origin.protocol === 'file:') {\n return true\n }\n\n // 7. If origin\u2019s scheme component is one which the user agent considers to\n // be authenticated, return \"Potentially Trustworthy\".\n\n // 8. If origin has been configured as a trustworthy origin, return\n // \"Potentially Trustworthy\".\n\n // 9. Return \"Not Trustworthy\".\n return false\n}\n\n/**\n * A potentially trustworthy URL is one which either inherits context from its\n * creator (about:blank, about:srcdoc, data) or one whose origin is a\n * potentially trustworthy origin.\n *\n * Return value `true` means `Potentially Trustworthy`.\n * Return value `false` means `Not Trustworthy`.\n *\n * @see https://www.w3.org/TR/secure-contexts/#is-url-trustworthy\n * @param {URL} url\n * @returns {boolean}\n */\nfunction isURLPotentiallyTrustworthy (url) {\n // Given a URL record (url), the following algorithm returns \"Potentially\n // Trustworthy\" or \"Not Trustworthy\" as appropriate:\n if (!webidl.is.URL(url)) {\n return false\n }\n\n // 1. If url is \"about:blank\" or \"about:srcdoc\",\n // return \"Potentially Trustworthy\".\n if (url.href === 'about:blank' || url.href === 'about:srcdoc') {\n return true\n }\n\n // 2. If url\u2019s scheme is \"data\", return \"Potentially Trustworthy\".\n if (url.protocol === 'data:') return true\n\n // Note: The origin of blob: URLs is the origin of the context in which they\n // were created. Therefore, blobs created in a trustworthy origin will\n // themselves be potentially trustworthy.\n if (url.protocol === 'blob:') return true\n\n // 3. Return the result of executing \u00A7 3.1 Is origin potentially trustworthy?\n // on url\u2019s origin.\n return isOriginPotentiallyTrustworthy(url.origin)\n}\n\n// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request\nfunction tryUpgradeRequestToAPotentiallyTrustworthyURL (request) {\n // TODO\n}\n\n/**\n * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin}\n * @param {URL} A\n * @param {URL} B\n */\nfunction sameOrigin (A, B) {\n // 1. If A and B are the same opaque origin, then return true.\n if (A.origin === B.origin && A.origin === 'null') {\n return true\n }\n\n // 2. If A and B are both tuple origins and their schemes,\n // hosts, and port are identical, then return true.\n if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) {\n return true\n }\n\n // 3. Return false.\n return false\n}\n\nfunction isAborted (fetchParams) {\n return fetchParams.controller.state === 'aborted'\n}\n\nfunction isCancelled (fetchParams) {\n return fetchParams.controller.state === 'aborted' ||\n fetchParams.controller.state === 'terminated'\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-method-normalize\n * @param {string} method\n */\nfunction normalizeMethod (method) {\n return normalizedMethodRecordsBase[method.toLowerCase()] ?? method\n}\n\n// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object\nconst esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))\n\n/**\n * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object\n * @param {string} name name of the instance\n * @param {((target: any) => any)} kInternalIterator\n * @param {string | number} [keyIndex]\n * @param {string | number} [valueIndex]\n */\nfunction createIterator (name, kInternalIterator, keyIndex = 0, valueIndex = 1) {\n class FastIterableIterator {\n /** @type {any} */\n #target\n /** @type {'key' | 'value' | 'key+value'} */\n #kind\n /** @type {number} */\n #index\n\n /**\n * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object\n * @param {unknown} target\n * @param {'key' | 'value' | 'key+value'} kind\n */\n constructor (target, kind) {\n this.#target = target\n this.#kind = kind\n this.#index = 0\n }\n\n next () {\n // 1. Let interface be the interface for which the iterator prototype object exists.\n // 2. Let thisValue be the this value.\n // 3. Let object be ? ToObject(thisValue).\n // 4. If object is a platform object, then perform a security\n // check, passing:\n // 5. If object is not a default iterator object for interface,\n // then throw a TypeError.\n if (typeof this !== 'object' || this === null || !(#target in this)) {\n throw new TypeError(\n `'next' called on an object that does not implement interface ${name} Iterator.`\n )\n }\n\n // 6. Let index be object\u2019s index.\n // 7. Let kind be object\u2019s kind.\n // 8. Let values be object\u2019s target's value pairs to iterate over.\n const index = this.#index\n const values = kInternalIterator(this.#target)\n\n // 9. Let len be the length of values.\n const len = values.length\n\n // 10. If index is greater than or equal to len, then return\n // CreateIterResultObject(undefined, true).\n if (index >= len) {\n return {\n value: undefined,\n done: true\n }\n }\n\n // 11. Let pair be the entry in values at index index.\n const { [keyIndex]: key, [valueIndex]: value } = values[index]\n\n // 12. Set object\u2019s index to index + 1.\n this.#index = index + 1\n\n // 13. Return the iterator result for pair and kind.\n\n // https://webidl.spec.whatwg.org/#iterator-result\n\n // 1. Let result be a value determined by the value of kind:\n let result\n switch (this.#kind) {\n case 'key':\n // 1. Let idlKey be pair\u2019s key.\n // 2. Let key be the result of converting idlKey to an\n // ECMAScript value.\n // 3. result is key.\n result = key\n break\n case 'value':\n // 1. Let idlValue be pair\u2019s value.\n // 2. Let value be the result of converting idlValue to\n // an ECMAScript value.\n // 3. result is value.\n result = value\n break\n case 'key+value':\n // 1. Let idlKey be pair\u2019s key.\n // 2. Let idlValue be pair\u2019s value.\n // 3. Let key be the result of converting idlKey to an\n // ECMAScript value.\n // 4. Let value be the result of converting idlValue to\n // an ECMAScript value.\n // 5. Let array be ! ArrayCreate(2).\n // 6. Call ! CreateDataProperty(array, \"0\", key).\n // 7. Call ! CreateDataProperty(array, \"1\", value).\n // 8. result is array.\n result = [key, value]\n break\n }\n\n // 2. Return CreateIterResultObject(result, false).\n return {\n value: result,\n done: false\n }\n }\n }\n\n // https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object\n // @ts-ignore\n delete FastIterableIterator.prototype.constructor\n\n Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype)\n\n Object.defineProperties(FastIterableIterator.prototype, {\n [Symbol.toStringTag]: {\n writable: false,\n enumerable: false,\n configurable: true,\n value: `${name} Iterator`\n },\n next: { writable: true, enumerable: true, configurable: true }\n })\n\n /**\n * @param {unknown} target\n * @param {'key' | 'value' | 'key+value'} kind\n * @returns {IterableIterator}\n */\n return function (target, kind) {\n return new FastIterableIterator(target, kind)\n }\n}\n\n/**\n * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object\n * @param {string} name name of the instance\n * @param {any} object class\n * @param {(target: any) => any} kInternalIterator\n * @param {string | number} [keyIndex]\n * @param {string | number} [valueIndex]\n */\nfunction iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) {\n const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex)\n\n const properties = {\n keys: {\n writable: true,\n enumerable: true,\n configurable: true,\n value: function keys () {\n webidl.brandCheck(this, object)\n return makeIterator(this, 'key')\n }\n },\n values: {\n writable: true,\n enumerable: true,\n configurable: true,\n value: function values () {\n webidl.brandCheck(this, object)\n return makeIterator(this, 'value')\n }\n },\n entries: {\n writable: true,\n enumerable: true,\n configurable: true,\n value: function entries () {\n webidl.brandCheck(this, object)\n return makeIterator(this, 'key+value')\n }\n },\n forEach: {\n writable: true,\n enumerable: true,\n configurable: true,\n value: function forEach (callbackfn, thisArg = globalThis) {\n webidl.brandCheck(this, object)\n webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`)\n if (typeof callbackfn !== 'function') {\n throw new TypeError(\n `Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.`\n )\n }\n for (const { 0: key, 1: value } of makeIterator(this, 'key+value')) {\n callbackfn.call(thisArg, value, key, this)\n }\n }\n }\n }\n\n return Object.defineProperties(object.prototype, {\n ...properties,\n [Symbol.iterator]: {\n writable: true,\n enumerable: false,\n configurable: true,\n value: properties.entries.value\n }\n })\n}\n\n/**\n * @param {import('./body').ExtractBodyResult} body\n * @param {(bytes: Uint8Array) => void} processBody\n * @param {(error: Error) => void} processBodyError\n * @returns {void}\n *\n * @see https://fetch.spec.whatwg.org/#body-fully-read\n */\nfunction fullyReadBody (body, processBody, processBodyError) {\n // 1. If taskDestination is null, then set taskDestination to\n // the result of starting a new parallel queue.\n\n // 2. Let successSteps given a byte sequence bytes be to queue a\n // fetch task to run processBody given bytes, with taskDestination.\n const successSteps = processBody\n\n // 3. Let errorSteps be to queue a fetch task to run processBodyError,\n // with taskDestination.\n const errorSteps = processBodyError\n\n try {\n // 4. Let reader be the result of getting a reader for body\u2019s stream.\n // If that threw an exception, then run errorSteps with that\n // exception and return.\n const reader = body.stream.getReader()\n\n // 5. Read all bytes from reader, given successSteps and errorSteps.\n readAllBytes(reader, successSteps, errorSteps)\n } catch (e) {\n errorSteps(e)\n }\n}\n\n/**\n * @param {ReadableStreamController} controller\n */\nfunction readableStreamClose (controller) {\n try {\n controller.close()\n controller.byobRequest?.respond(0)\n } catch (err) {\n // TODO: add comment explaining why this error occurs.\n if (!err.message.includes('Controller is already closed') && !err.message.includes('ReadableStream is already closed')) {\n throw err\n }\n }\n}\n\n/**\n * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes\n * @see https://streams.spec.whatwg.org/#read-loop\n * @param {ReadableStream>} reader\n * @param {(bytes: Uint8Array) => void} successSteps\n * @param {(error: Error) => void} failureSteps\n * @returns {Promise}\n */\nasync function readAllBytes (reader, successSteps, failureSteps) {\n try {\n const bytes = []\n let byteLength = 0\n\n do {\n const { done, value: chunk } = await reader.read()\n\n if (done) {\n // 1. Call successSteps with bytes.\n successSteps(Buffer.concat(bytes, byteLength))\n return\n }\n\n // 1. If chunk is not a Uint8Array object, call failureSteps\n // with a TypeError and abort these steps.\n if (!isUint8Array(chunk)) {\n failureSteps(new TypeError('Received non-Uint8Array chunk'))\n return\n }\n\n // 2. Append the bytes represented by chunk to bytes.\n bytes.push(chunk)\n byteLength += chunk.length\n\n // 3. Read-loop given reader, bytes, successSteps, and failureSteps.\n } while (true)\n } catch (e) {\n // 1. Call failureSteps with e.\n failureSteps(e)\n }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#is-local\n * @param {URL} url\n * @returns {boolean}\n */\nfunction urlIsLocal (url) {\n assert('protocol' in url) // ensure it's a url object\n\n const protocol = url.protocol\n\n // A URL is local if its scheme is a local scheme.\n // A local scheme is \"about\", \"blob\", or \"data\".\n return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:'\n}\n\n/**\n * @param {string|URL} url\n * @returns {boolean}\n */\nfunction urlHasHttpsScheme (url) {\n return (\n (\n typeof url === 'string' &&\n url[5] === ':' &&\n url[0] === 'h' &&\n url[1] === 't' &&\n url[2] === 't' &&\n url[3] === 'p' &&\n url[4] === 's'\n ) ||\n url.protocol === 'https:'\n )\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#http-scheme\n * @param {URL} url\n */\nfunction urlIsHttpHttpsScheme (url) {\n assert('protocol' in url) // ensure it's a url object\n\n const protocol = url.protocol\n\n return protocol === 'http:' || protocol === 'https:'\n}\n\n/**\n * @typedef {Object} RangeHeaderValue\n * @property {number|null} rangeStartValue\n * @property {number|null} rangeEndValue\n */\n\n/**\n * @see https://fetch.spec.whatwg.org/#simple-range-header-value\n * @param {string} value\n * @param {boolean} allowWhitespace\n * @return {RangeHeaderValue|'failure'}\n */\nfunction simpleRangeHeaderValue (value, allowWhitespace) {\n // 1. Let data be the isomorphic decoding of value.\n // Note: isomorphic decoding takes a sequence of bytes (ie. a Uint8Array) and turns it into a string,\n // nothing more. We obviously don't need to do that if value is a string already.\n const data = value\n\n // 2. If data does not start with \"bytes\", then return failure.\n if (!data.startsWith('bytes')) {\n return 'failure'\n }\n\n // 3. Let position be a position variable for data, initially pointing at the 5th code point of data.\n const position = { position: 5 }\n\n // 4. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space,\n // from data given position.\n if (allowWhitespace) {\n collectASequenceOfCodePoints(\n (char) => char === '\\t' || char === ' ',\n data,\n position\n )\n }\n\n // 5. If the code point at position within data is not U+003D (=), then return failure.\n if (data.charCodeAt(position.position) !== 0x3D) {\n return 'failure'\n }\n\n // 6. Advance position by 1.\n position.position++\n\n // 7. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, from\n // data given position.\n if (allowWhitespace) {\n collectASequenceOfCodePoints(\n (char) => char === '\\t' || char === ' ',\n data,\n position\n )\n }\n\n // 8. Let rangeStart be the result of collecting a sequence of code points that are ASCII digits,\n // from data given position.\n const rangeStart = collectASequenceOfCodePoints(\n (char) => {\n const code = char.charCodeAt(0)\n\n return code >= 0x30 && code <= 0x39\n },\n data,\n position\n )\n\n // 9. Let rangeStartValue be rangeStart, interpreted as decimal number, if rangeStart is not the\n // empty string; otherwise null.\n const rangeStartValue = rangeStart.length ? Number(rangeStart) : null\n\n // 10. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space,\n // from data given position.\n if (allowWhitespace) {\n collectASequenceOfCodePoints(\n (char) => char === '\\t' || char === ' ',\n data,\n position\n )\n }\n\n // 11. If the code point at position within data is not U+002D (-), then return failure.\n if (data.charCodeAt(position.position) !== 0x2D) {\n return 'failure'\n }\n\n // 12. Advance position by 1.\n position.position++\n\n // 13. If allowWhitespace is true, collect a sequence of code points that are HTTP tab\n // or space, from data given position.\n // Note from Khafra: its the same step as in #8 again lol\n if (allowWhitespace) {\n collectASequenceOfCodePoints(\n (char) => char === '\\t' || char === ' ',\n data,\n position\n )\n }\n\n // 14. Let rangeEnd be the result of collecting a sequence of code points that are\n // ASCII digits, from data given position.\n // Note from Khafra: you wouldn't guess it, but this is also the same step as #8\n const rangeEnd = collectASequenceOfCodePoints(\n (char) => {\n const code = char.charCodeAt(0)\n\n return code >= 0x30 && code <= 0x39\n },\n data,\n position\n )\n\n // 15. Let rangeEndValue be rangeEnd, interpreted as decimal number, if rangeEnd\n // is not the empty string; otherwise null.\n // Note from Khafra: THE SAME STEP, AGAIN!!!\n // Note: why interpret as a decimal if we only collect ascii digits?\n const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null\n\n // 16. If position is not past the end of data, then return failure.\n if (position.position < data.length) {\n return 'failure'\n }\n\n // 17. If rangeEndValue and rangeStartValue are null, then return failure.\n if (rangeEndValue === null && rangeStartValue === null) {\n return 'failure'\n }\n\n // 18. If rangeStartValue and rangeEndValue are numbers, and rangeStartValue is\n // greater than rangeEndValue, then return failure.\n // Note: ... when can they not be numbers?\n if (rangeStartValue > rangeEndValue) {\n return 'failure'\n }\n\n // 19. Return (rangeStartValue, rangeEndValue).\n return { rangeStartValue, rangeEndValue }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#build-a-content-range\n * @param {number} rangeStart\n * @param {number} rangeEnd\n * @param {number} fullLength\n */\nfunction buildContentRange (rangeStart, rangeEnd, fullLength) {\n // 1. Let contentRange be `bytes `.\n let contentRange = 'bytes '\n\n // 2. Append rangeStart, serialized and isomorphic encoded, to contentRange.\n contentRange += isomorphicEncode(`${rangeStart}`)\n\n // 3. Append 0x2D (-) to contentRange.\n contentRange += '-'\n\n // 4. Append rangeEnd, serialized and isomorphic encoded to contentRange.\n contentRange += isomorphicEncode(`${rangeEnd}`)\n\n // 5. Append 0x2F (/) to contentRange.\n contentRange += '/'\n\n // 6. Append fullLength, serialized and isomorphic encoded to contentRange.\n contentRange += isomorphicEncode(`${fullLength}`)\n\n // 7. Return contentRange.\n return contentRange\n}\n\n// A Stream, which pipes the response to zlib.createInflate() or\n// zlib.createInflateRaw() depending on the first byte of the Buffer.\n// If the lower byte of the first byte is 0x08, then the stream is\n// interpreted as a zlib stream, otherwise it's interpreted as a\n// raw deflate stream.\nclass InflateStream extends Transform {\n #zlibOptions\n\n /** @param {zlib.ZlibOptions} [zlibOptions] */\n constructor (zlibOptions) {\n super()\n this.#zlibOptions = zlibOptions\n }\n\n _transform (chunk, encoding, callback) {\n if (!this._inflateStream) {\n if (chunk.length === 0) {\n callback()\n return\n }\n this._inflateStream = (chunk[0] & 0x0F) === 0x08\n ? zlib.createInflate(this.#zlibOptions)\n : zlib.createInflateRaw(this.#zlibOptions)\n\n this._inflateStream.on('data', this.push.bind(this))\n this._inflateStream.on('end', () => this.push(null))\n this._inflateStream.on('error', (err) => this.destroy(err))\n }\n\n this._inflateStream.write(chunk, encoding, callback)\n }\n\n _final (callback) {\n if (this._inflateStream) {\n this._inflateStream.end()\n this._inflateStream = null\n }\n callback()\n }\n}\n\n/**\n * @param {zlib.ZlibOptions} [zlibOptions]\n * @returns {InflateStream}\n */\nfunction createInflate (zlibOptions) {\n return new InflateStream(zlibOptions)\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type\n * @param {import('./headers').HeadersList} headers\n */\nfunction extractMimeType (headers) {\n // 1. Let charset be null.\n let charset = null\n\n // 2. Let essence be null.\n let essence = null\n\n // 3. Let mimeType be null.\n let mimeType = null\n\n // 4. Let values be the result of getting, decoding, and splitting `Content-Type` from headers.\n const values = getDecodeSplit('content-type', headers)\n\n // 5. If values is null, then return failure.\n if (values === null) {\n return 'failure'\n }\n\n // 6. For each value of values:\n for (const value of values) {\n // 6.1. Let temporaryMimeType be the result of parsing value.\n const temporaryMimeType = parseMIMEType(value)\n\n // 6.2. If temporaryMimeType is failure or its essence is \"*/*\", then continue.\n if (temporaryMimeType === 'failure' || temporaryMimeType.essence === '*/*') {\n continue\n }\n\n // 6.3. Set mimeType to temporaryMimeType.\n mimeType = temporaryMimeType\n\n // 6.4. If mimeType\u2019s essence is not essence, then:\n if (mimeType.essence !== essence) {\n // 6.4.1. Set charset to null.\n charset = null\n\n // 6.4.2. If mimeType\u2019s parameters[\"charset\"] exists, then set charset to\n // mimeType\u2019s parameters[\"charset\"].\n if (mimeType.parameters.has('charset')) {\n charset = mimeType.parameters.get('charset')\n }\n\n // 6.4.3. Set essence to mimeType\u2019s essence.\n essence = mimeType.essence\n } else if (!mimeType.parameters.has('charset') && charset !== null) {\n // 6.5. Otherwise, if mimeType\u2019s parameters[\"charset\"] does not exist, and\n // charset is non-null, set mimeType\u2019s parameters[\"charset\"] to charset.\n mimeType.parameters.set('charset', charset)\n }\n }\n\n // 7. If mimeType is null, then return failure.\n if (mimeType == null) {\n return 'failure'\n }\n\n // 8. Return mimeType.\n return mimeType\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split\n * @param {string|null} value\n */\nfunction gettingDecodingSplitting (value) {\n // 1. Let input be the result of isomorphic decoding value.\n const input = value\n\n // 2. Let position be a position variable for input, initially pointing at the start of input.\n const position = { position: 0 }\n\n // 3. Let values be a list of strings, initially empty.\n const values = []\n\n // 4. Let temporaryValue be the empty string.\n let temporaryValue = ''\n\n // 5. While position is not past the end of input:\n while (position.position < input.length) {\n // 5.1. Append the result of collecting a sequence of code points that are not U+0022 (\")\n // or U+002C (,) from input, given position, to temporaryValue.\n temporaryValue += collectASequenceOfCodePoints(\n (char) => char !== '\"' && char !== ',',\n input,\n position\n )\n\n // 5.2. If position is not past the end of input, then:\n if (position.position < input.length) {\n // 5.2.1. If the code point at position within input is U+0022 (\"), then:\n if (input.charCodeAt(position.position) === 0x22) {\n // 5.2.1.1. Append the result of collecting an HTTP quoted string from input, given position, to temporaryValue.\n temporaryValue += collectAnHTTPQuotedString(\n input,\n position\n )\n\n // 5.2.1.2. If position is not past the end of input, then continue.\n if (position.position < input.length) {\n continue\n }\n } else {\n // 5.2.2. Otherwise:\n\n // 5.2.2.1. Assert: the code point at position within input is U+002C (,).\n assert(input.charCodeAt(position.position) === 0x2C)\n\n // 5.2.2.2. Advance position by 1.\n position.position++\n }\n }\n\n // 5.3. Remove all HTTP tab or space from the start and end of temporaryValue.\n temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 0x9 || char === 0x20)\n\n // 5.4. Append temporaryValue to values.\n values.push(temporaryValue)\n\n // 5.6. Set temporaryValue to the empty string.\n temporaryValue = ''\n }\n\n // 6. Return values.\n return values\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split\n * @param {string} name lowercase header name\n * @param {import('./headers').HeadersList} list\n */\nfunction getDecodeSplit (name, list) {\n // 1. Let value be the result of getting name from list.\n const value = list.get(name, true)\n\n // 2. If value is null, then return null.\n if (value === null) {\n return null\n }\n\n // 3. Return the result of getting, decoding, and splitting value.\n return gettingDecodingSplitting(value)\n}\n\nfunction hasAuthenticationEntry (request) {\n return false\n}\n\n/**\n * @see https://url.spec.whatwg.org/#include-credentials\n * @param {URL} url\n */\nfunction includesCredentials (url) {\n // A URL includes credentials if its username or password is not the empty string.\n return !!(url.username || url.password)\n}\n\n/**\n * @see https://html.spec.whatwg.org/multipage/document-sequences.html#traversable-navigable\n * @param {object|string} navigable\n */\nfunction isTraversableNavigable (navigable) {\n // Returns true only if we have an actual traversable navigable object\n // that can prompt the user for credentials. In Node.js, this will always\n // be false since there's no Window object or navigable.\n return navigable != null && navigable !== 'client' && navigable !== 'no-traversable'\n}\n\nclass EnvironmentSettingsObjectBase {\n get baseUrl () {\n return getGlobalOrigin()\n }\n\n get origin () {\n return this.baseUrl?.origin\n }\n\n policyContainer = makePolicyContainer()\n}\n\nclass EnvironmentSettingsObject {\n settingsObject = new EnvironmentSettingsObjectBase()\n}\n\nconst environmentSettingsObject = new EnvironmentSettingsObject()\n\nmodule.exports = {\n isAborted,\n isCancelled,\n isValidEncodedURL,\n ReadableStreamFrom,\n tryUpgradeRequestToAPotentiallyTrustworthyURL,\n clampAndCoarsenConnectionTimingInfo,\n coarsenedSharedCurrentTime,\n determineRequestsReferrer,\n makePolicyContainer,\n clonePolicyContainer,\n appendFetchMetadata,\n appendRequestOriginHeader,\n TAOCheck,\n corsCheck,\n crossOriginResourcePolicyCheck,\n createOpaqueTimingInfo,\n setRequestReferrerPolicyOnRedirect,\n isValidHTTPToken,\n requestBadPort,\n requestCurrentURL,\n responseURL,\n responseLocationURL,\n isURLPotentiallyTrustworthy,\n isValidReasonPhrase,\n sameOrigin,\n normalizeMethod,\n iteratorMixin,\n createIterator,\n isValidHeaderName,\n isValidHeaderValue,\n isErrorLike,\n fullyReadBody,\n readableStreamClose,\n urlIsLocal,\n urlHasHttpsScheme,\n urlIsHttpHttpsScheme,\n readAllBytes,\n simpleRangeHeaderValue,\n buildContentRange,\n createInflate,\n extractMimeType,\n getDecodeSplit,\n environmentSettingsObject,\n isOriginIPPotentiallyTrustworthy,\n hasAuthenticationEntry,\n includesCredentials,\n isTraversableNavigable\n}\n", "'use strict'\n\nconst { iteratorMixin } = require('./util')\nconst { kEnumerableProperty } = require('../../core/util')\nconst { webidl } = require('../webidl')\nconst nodeUtil = require('node:util')\n\n// https://xhr.spec.whatwg.org/#formdata\nclass FormData {\n #state = []\n\n constructor (form = undefined) {\n webidl.util.markAsUncloneable(this)\n\n if (form !== undefined) {\n throw webidl.errors.conversionFailed({\n prefix: 'FormData constructor',\n argument: 'Argument 1',\n types: ['undefined']\n })\n }\n }\n\n append (name, value, filename = undefined) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.append'\n webidl.argumentLengthCheck(arguments, 2, prefix)\n\n name = webidl.converters.USVString(name)\n\n if (arguments.length === 3 || webidl.is.Blob(value)) {\n value = webidl.converters.Blob(value, prefix, 'value')\n\n if (filename !== undefined) {\n filename = webidl.converters.USVString(filename)\n }\n } else {\n value = webidl.converters.USVString(value)\n }\n\n // 1. Let value be value if given; otherwise blobValue.\n\n // 2. Let entry be the result of creating an entry with\n // name, value, and filename if given.\n const entry = makeEntry(name, value, filename)\n\n // 3. Append entry to this\u2019s entry list.\n this.#state.push(entry)\n }\n\n delete (name) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.delete'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n name = webidl.converters.USVString(name)\n\n // The delete(name) method steps are to remove all entries whose name\n // is name from this\u2019s entry list.\n this.#state = this.#state.filter(entry => entry.name !== name)\n }\n\n get (name) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.get'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n name = webidl.converters.USVString(name)\n\n // 1. If there is no entry whose name is name in this\u2019s entry list,\n // then return null.\n const idx = this.#state.findIndex((entry) => entry.name === name)\n if (idx === -1) {\n return null\n }\n\n // 2. Return the value of the first entry whose name is name from\n // this\u2019s entry list.\n return this.#state[idx].value\n }\n\n getAll (name) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.getAll'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n name = webidl.converters.USVString(name)\n\n // 1. If there is no entry whose name is name in this\u2019s entry list,\n // then return the empty list.\n // 2. Return the values of all entries whose name is name, in order,\n // from this\u2019s entry list.\n return this.#state\n .filter((entry) => entry.name === name)\n .map((entry) => entry.value)\n }\n\n has (name) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.has'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n name = webidl.converters.USVString(name)\n\n // The has(name) method steps are to return true if there is an entry\n // whose name is name in this\u2019s entry list; otherwise false.\n return this.#state.findIndex((entry) => entry.name === name) !== -1\n }\n\n set (name, value, filename = undefined) {\n webidl.brandCheck(this, FormData)\n\n const prefix = 'FormData.set'\n webidl.argumentLengthCheck(arguments, 2, prefix)\n\n name = webidl.converters.USVString(name)\n\n if (arguments.length === 3 || webidl.is.Blob(value)) {\n value = webidl.converters.Blob(value, prefix, 'value')\n\n if (filename !== undefined) {\n filename = webidl.converters.USVString(filename)\n }\n } else {\n value = webidl.converters.USVString(value)\n }\n\n // The set(name, value) and set(name, blobValue, filename) method steps\n // are:\n\n // 1. Let value be value if given; otherwise blobValue.\n\n // 2. Let entry be the result of creating an entry with name, value, and\n // filename if given.\n const entry = makeEntry(name, value, filename)\n\n // 3. If there are entries in this\u2019s entry list whose name is name, then\n // replace the first such entry with entry and remove the others.\n const idx = this.#state.findIndex((entry) => entry.name === name)\n if (idx !== -1) {\n this.#state = [\n ...this.#state.slice(0, idx),\n entry,\n ...this.#state.slice(idx + 1).filter((entry) => entry.name !== name)\n ]\n } else {\n // 4. Otherwise, append entry to this\u2019s entry list.\n this.#state.push(entry)\n }\n }\n\n [nodeUtil.inspect.custom] (depth, options) {\n const state = this.#state.reduce((a, b) => {\n if (a[b.name]) {\n if (Array.isArray(a[b.name])) {\n a[b.name].push(b.value)\n } else {\n a[b.name] = [a[b.name], b.value]\n }\n } else {\n a[b.name] = b.value\n }\n\n return a\n }, { __proto__: null })\n\n options.depth ??= depth\n options.colors ??= true\n\n const output = nodeUtil.formatWithOptions(options, state)\n\n // remove [Object null prototype]\n return `FormData ${output.slice(output.indexOf(']') + 2)}`\n }\n\n /**\n * @param {FormData} formData\n */\n static getFormDataState (formData) {\n return formData.#state\n }\n\n /**\n * @param {FormData} formData\n * @param {any[]} newState\n */\n static setFormDataState (formData, newState) {\n formData.#state = newState\n }\n}\n\nconst { getFormDataState, setFormDataState } = FormData\nReflect.deleteProperty(FormData, 'getFormDataState')\nReflect.deleteProperty(FormData, 'setFormDataState')\n\niteratorMixin('FormData', FormData, getFormDataState, 'name', 'value')\n\nObject.defineProperties(FormData.prototype, {\n append: kEnumerableProperty,\n delete: kEnumerableProperty,\n get: kEnumerableProperty,\n getAll: kEnumerableProperty,\n has: kEnumerableProperty,\n set: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'FormData',\n configurable: true\n }\n})\n\n/**\n * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry\n * @param {string} name\n * @param {string|Blob} value\n * @param {?string} filename\n * @returns\n */\nfunction makeEntry (name, value, filename) {\n // 1. Set name to the result of converting name into a scalar value string.\n // Note: This operation was done by the webidl converter USVString.\n\n // 2. If value is a string, then set value to the result of converting\n // value into a scalar value string.\n if (typeof value === 'string') {\n // Note: This operation was done by the webidl converter USVString.\n } else {\n // 3. Otherwise:\n\n // 1. If value is not a File object, then set value to a new File object,\n // representing the same bytes, whose name attribute value is \"blob\"\n if (!webidl.is.File(value)) {\n value = new File([value], 'blob', { type: value.type })\n }\n\n // 2. If filename is given, then set value to a new File object,\n // representing the same bytes, whose name attribute is filename.\n if (filename !== undefined) {\n /** @type {FilePropertyBag} */\n const options = {\n type: value.type,\n lastModified: value.lastModified\n }\n\n value = new File([value], filename, options)\n }\n }\n\n // 4. Return an entry whose name is name and whose value is value.\n return { name, value }\n}\n\nwebidl.is.FormData = webidl.util.MakeTypeAssertion(FormData)\n\nmodule.exports = { FormData, makeEntry, setFormDataState }\n", "'use strict'\n\nconst { bufferToLowerCasedHeaderName } = require('../../core/util')\nconst { HTTP_TOKEN_CODEPOINTS } = require('./data-url')\nconst { makeEntry } = require('./formdata')\nconst { webidl } = require('../webidl')\nconst assert = require('node:assert')\nconst { isomorphicDecode } = require('../infra')\n\nconst dd = Buffer.from('--')\nconst decoder = new TextDecoder()\nconst decoderIgnoreBOM = new TextDecoder('utf-8', { ignoreBOM: true })\n\n/**\n * @param {string} chars\n */\nfunction isAsciiString (chars) {\n for (let i = 0; i < chars.length; ++i) {\n if ((chars.charCodeAt(i) & ~0x7F) !== 0) {\n return false\n }\n }\n return true\n}\n\n/**\n * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary\n * @param {string} boundary\n */\nfunction validateBoundary (boundary) {\n const length = boundary.length\n\n // - its length is greater or equal to 27 and lesser or equal to 70, and\n if (length < 27 || length > 70) {\n return false\n }\n\n // - it is composed by bytes in the ranges 0x30 to 0x39, 0x41 to 0x5A, or\n // 0x61 to 0x7A, inclusive (ASCII alphanumeric), or which are 0x27 ('),\n // 0x2D (-) or 0x5F (_).\n for (let i = 0; i < length; ++i) {\n const cp = boundary.charCodeAt(i)\n\n if (!(\n (cp >= 0x30 && cp <= 0x39) ||\n (cp >= 0x41 && cp <= 0x5a) ||\n (cp >= 0x61 && cp <= 0x7a) ||\n cp === 0x27 ||\n cp === 0x2d ||\n cp === 0x5f\n )) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser\n * @param {Buffer} input\n * @param {ReturnType} mimeType\n */\nfunction multipartFormDataParser (input, mimeType) {\n // 1. Assert: mimeType\u2019s essence is \"multipart/form-data\".\n assert(mimeType !== 'failure' && mimeType.essence === 'multipart/form-data')\n\n const boundaryString = mimeType.parameters.get('boundary')\n\n // 2. If mimeType\u2019s parameters[\"boundary\"] does not exist, return failure.\n // Otherwise, let boundary be the result of UTF-8 decoding mimeType\u2019s\n // parameters[\"boundary\"].\n if (boundaryString === undefined) {\n throw parsingError('missing boundary in content-type header')\n }\n\n const boundary = Buffer.from(`--${boundaryString}`, 'utf8')\n\n // 3. Let entry list be an empty entry list.\n const entryList = []\n\n // 4. Let position be a pointer to a byte in input, initially pointing at\n // the first byte.\n const position = { position: 0 }\n\n // Note: Per RFC 2046 Section 5.1.1, we must ignore anything before the\n // first boundary delimiter line (preamble). Search for the first boundary.\n const firstBoundaryIndex = input.indexOf(boundary)\n\n if (firstBoundaryIndex === -1) {\n throw parsingError('no boundary found in multipart body')\n }\n\n // Start parsing from the first boundary, ignoring any preamble\n position.position = firstBoundaryIndex\n\n // 5. While true:\n while (true) {\n // 5.1. If position points to a sequence of bytes starting with 0x2D 0x2D\n // (`--`) followed by boundary, advance position by 2 + the length of\n // boundary. Otherwise, return failure.\n // Note: boundary is padded with 2 dashes already, no need to add 2.\n if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) {\n position.position += boundary.length\n } else {\n throw parsingError('expected a value starting with -- and the boundary')\n }\n\n // 5.2. If position points to the sequence of bytes 0x2D 0x2D 0x0D 0x0A\n // (`--` followed by CR LF) followed by the end of input, return entry list.\n // Note: Per RFC 2046 Section 5.1.1, we must ignore anything after the\n // final boundary delimiter (epilogue). Check for -- or --CRLF and return\n // regardless of what follows.\n if (bufferStartsWith(input, dd, position)) {\n // Found closing boundary delimiter (--), ignore any epilogue\n return entryList\n }\n\n // 5.3. If position does not point to a sequence of bytes starting with 0x0D\n // 0x0A (CR LF), return failure.\n if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) {\n throw parsingError('expected CRLF')\n }\n\n // 5.4. Advance position by 2. (This skips past the newline.)\n position.position += 2\n\n // 5.5. Let name, filename and contentType be the result of parsing\n // multipart/form-data headers on input and position, if the result\n // is not failure. Otherwise, return failure.\n const result = parseMultipartFormDataHeaders(input, position)\n\n let { name, filename, contentType, encoding } = result\n\n // 5.6. Advance position by 2. (This skips past the empty line that marks\n // the end of the headers.)\n position.position += 2\n\n // 5.7. Let body be the empty byte sequence.\n let body\n\n // 5.8. Body loop: While position is not past the end of input:\n // TODO: the steps here are completely wrong\n {\n const boundaryIndex = input.indexOf(boundary.subarray(2), position.position)\n\n if (boundaryIndex === -1) {\n throw parsingError('expected boundary after body')\n }\n\n body = input.subarray(position.position, boundaryIndex - 4)\n\n position.position += body.length\n\n // Note: position must be advanced by the body's length before being\n // decoded, otherwise the parsing will fail.\n if (encoding === 'base64') {\n body = Buffer.from(body.toString(), 'base64')\n }\n }\n\n // 5.9. If position does not point to a sequence of bytes starting with\n // 0x0D 0x0A (CR LF), return failure. Otherwise, advance position by 2.\n if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) {\n throw parsingError('expected CRLF')\n } else {\n position.position += 2\n }\n\n // 5.10. If filename is not null:\n let value\n\n if (filename !== null) {\n // 5.10.1. If contentType is null, set contentType to \"text/plain\".\n contentType ??= 'text/plain'\n\n // 5.10.2. If contentType is not an ASCII string, set contentType to the empty string.\n\n // Note: `buffer.isAscii` can be used at zero-cost, but converting a string to a buffer is a high overhead.\n // Content-Type is a relatively small string, so it is faster to use `String#charCodeAt`.\n if (!isAsciiString(contentType)) {\n contentType = ''\n }\n\n // 5.10.3. Let value be a new File object with name filename, type contentType, and body body.\n value = new File([body], filename, { type: contentType })\n } else {\n // 5.11. Otherwise:\n\n // 5.11.1. Let value be the UTF-8 decoding without BOM of body.\n value = decoderIgnoreBOM.decode(Buffer.from(body))\n }\n\n // 5.12. Assert: name is a scalar value string and value is either a scalar value string or a File object.\n assert(webidl.is.USVString(name))\n assert((typeof value === 'string' && webidl.is.USVString(value)) || webidl.is.File(value))\n\n // 5.13. Create an entry with name and value, and append it to entry list.\n entryList.push(makeEntry(name, value, filename))\n }\n}\n\n/**\n * Parses content-disposition attributes (e.g., name=\"value\" or filename*=utf-8''encoded)\n * @param {Buffer} input\n * @param {{ position: number }} position\n * @returns {{ name: string, value: string }}\n */\nfunction parseContentDispositionAttribute (input, position) {\n // Skip leading semicolon and whitespace\n if (input[position.position] === 0x3b /* ; */) {\n position.position++\n }\n\n // Skip whitespace\n collectASequenceOfBytes(\n (char) => char === 0x20 || char === 0x09,\n input,\n position\n )\n\n // Collect attribute name (token characters)\n const attributeName = collectASequenceOfBytes(\n (char) => isToken(char) && char !== 0x3d && char !== 0x2a, // not = or *\n input,\n position\n )\n\n if (attributeName.length === 0) {\n return null\n }\n\n const attrNameStr = attributeName.toString('ascii').toLowerCase()\n\n // Check for extended notation (attribute*)\n const isExtended = input[position.position] === 0x2a /* * */\n if (isExtended) {\n position.position++ // skip *\n }\n\n // Expect = sign\n if (input[position.position] !== 0x3d /* = */) {\n return null\n }\n position.position++ // skip =\n\n // Skip whitespace\n collectASequenceOfBytes(\n (char) => char === 0x20 || char === 0x09,\n input,\n position\n )\n\n let value\n\n if (isExtended) {\n // Extended attribute format: charset'language'encoded-value\n const headerValue = collectASequenceOfBytes(\n (char) => char !== 0x20 && char !== 0x0d && char !== 0x0a && char !== 0x3b, // not space, CRLF, or ;\n input,\n position\n )\n\n // Check for utf-8'' prefix (case insensitive)\n if (\n (headerValue[0] !== 0x75 && headerValue[0] !== 0x55) || // u or U\n (headerValue[1] !== 0x74 && headerValue[1] !== 0x54) || // t or T\n (headerValue[2] !== 0x66 && headerValue[2] !== 0x46) || // f or F\n headerValue[3] !== 0x2d || // -\n headerValue[4] !== 0x38 // 8\n ) {\n throw parsingError('unknown encoding, expected utf-8\\'\\'')\n }\n\n // Skip utf-8'' and decode the rest\n value = decodeURIComponent(decoder.decode(headerValue.subarray(7)))\n } else if (input[position.position] === 0x22 /* \" */) {\n // Quoted string\n position.position++ // skip opening quote\n\n const quotedValue = collectASequenceOfBytes(\n (char) => char !== 0x0a && char !== 0x0d && char !== 0x22, // not LF, CR, or \"\n input,\n position\n )\n\n if (input[position.position] !== 0x22) {\n throw parsingError('Closing quote not found')\n }\n position.position++ // skip closing quote\n\n value = decoder.decode(quotedValue)\n .replace(/%0A/ig, '\\n')\n .replace(/%0D/ig, '\\r')\n .replace(/%22/g, '\"')\n } else {\n // Token value (no quotes)\n const tokenValue = collectASequenceOfBytes(\n (char) => isToken(char) && char !== 0x3b, // not ;\n input,\n position\n )\n\n value = decoder.decode(tokenValue)\n }\n\n return { name: attrNameStr, value }\n}\n\n/**\n * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers\n * @param {Buffer} input\n * @param {{ position: number }} position\n */\nfunction parseMultipartFormDataHeaders (input, position) {\n // 1. Let name, filename and contentType be null.\n let name = null\n let filename = null\n let contentType = null\n let encoding = null\n\n // 2. While true:\n while (true) {\n // 2.1. If position points to a sequence of bytes starting with 0x0D 0x0A (CR LF):\n if (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) {\n // 2.1.1. If name is null, return failure.\n if (name === null) {\n throw parsingError('header name is null')\n }\n\n // 2.1.2. Return name, filename and contentType.\n return { name, filename, contentType, encoding }\n }\n\n // 2.2. Let header name be the result of collecting a sequence of bytes that are\n // not 0x0A (LF), 0x0D (CR) or 0x3A (:), given position.\n let headerName = collectASequenceOfBytes(\n (char) => char !== 0x0a && char !== 0x0d && char !== 0x3a,\n input,\n position\n )\n\n // 2.3. Remove any HTTP tab or space bytes from the start or end of header name.\n headerName = removeChars(headerName, true, true, (char) => char === 0x9 || char === 0x20)\n\n // 2.4. If header name does not match the field-name token production, return failure.\n if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) {\n throw parsingError('header name does not match the field-name token production')\n }\n\n // 2.5. If the byte at position is not 0x3A (:), return failure.\n if (input[position.position] !== 0x3a) {\n throw parsingError('expected :')\n }\n\n // 2.6. Advance position by 1.\n position.position++\n\n // 2.7. Collect a sequence of bytes that are HTTP tab or space bytes given position.\n // (Do nothing with those bytes.)\n collectASequenceOfBytes(\n (char) => char === 0x20 || char === 0x09,\n input,\n position\n )\n\n // 2.8. Byte-lowercase header name and switch on the result:\n switch (bufferToLowerCasedHeaderName(headerName)) {\n case 'content-disposition': {\n name = filename = null\n\n // Collect the disposition type (should be \"form-data\")\n const dispositionType = collectASequenceOfBytes(\n (char) => isToken(char),\n input,\n position\n )\n\n if (dispositionType.toString('ascii').toLowerCase() !== 'form-data') {\n throw parsingError('expected form-data for content-disposition header')\n }\n\n // Parse attributes recursively until CRLF\n while (\n position.position < input.length &&\n input[position.position] !== 0x0d &&\n input[position.position + 1] !== 0x0a\n ) {\n const attribute = parseContentDispositionAttribute(input, position)\n\n if (!attribute) {\n break\n }\n\n if (attribute.name === 'name') {\n name = attribute.value\n } else if (attribute.name === 'filename') {\n filename = attribute.value\n }\n }\n\n if (name === null) {\n throw parsingError('name attribute is required in content-disposition header')\n }\n\n break\n }\n case 'content-type': {\n // 1. Let header value be the result of collecting a sequence of bytes that are\n // not 0x0A (LF) or 0x0D (CR), given position.\n let headerValue = collectASequenceOfBytes(\n (char) => char !== 0x0a && char !== 0x0d,\n input,\n position\n )\n\n // 2. Remove any HTTP tab or space bytes from the end of header value.\n headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20)\n\n // 3. Set contentType to the isomorphic decoding of header value.\n contentType = isomorphicDecode(headerValue)\n\n break\n }\n case 'content-transfer-encoding': {\n let headerValue = collectASequenceOfBytes(\n (char) => char !== 0x0a && char !== 0x0d,\n input,\n position\n )\n\n headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20)\n\n encoding = isomorphicDecode(headerValue)\n\n break\n }\n default: {\n // Collect a sequence of bytes that are not 0x0A (LF) or 0x0D (CR), given position.\n // (Do nothing with those bytes.)\n collectASequenceOfBytes(\n (char) => char !== 0x0a && char !== 0x0d,\n input,\n position\n )\n }\n }\n\n // 2.9. If position does not point to a sequence of bytes starting with 0x0D 0x0A\n // (CR LF), return failure. Otherwise, advance position by 2 (past the newline).\n if (input[position.position] !== 0x0d && input[position.position + 1] !== 0x0a) {\n throw parsingError('expected CRLF')\n } else {\n position.position += 2\n }\n }\n}\n\n/**\n * @param {(char: number) => boolean} condition\n * @param {Buffer} input\n * @param {{ position: number }} position\n */\nfunction collectASequenceOfBytes (condition, input, position) {\n let start = position.position\n\n while (start < input.length && condition(input[start])) {\n ++start\n }\n\n return input.subarray(position.position, (position.position = start))\n}\n\n/**\n * @param {Buffer} buf\n * @param {boolean} leading\n * @param {boolean} trailing\n * @param {(charCode: number) => boolean} predicate\n * @returns {Buffer}\n */\nfunction removeChars (buf, leading, trailing, predicate) {\n let lead = 0\n let trail = buf.length - 1\n\n if (leading) {\n while (lead < buf.length && predicate(buf[lead])) lead++\n }\n\n if (trailing) {\n while (trail > 0 && predicate(buf[trail])) trail--\n }\n\n return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1)\n}\n\n/**\n * Checks if {@param buffer} starts with {@param start}\n * @param {Buffer} buffer\n * @param {Buffer} start\n * @param {{ position: number }} position\n */\nfunction bufferStartsWith (buffer, start, position) {\n if (buffer.length < start.length) {\n return false\n }\n\n for (let i = 0; i < start.length; i++) {\n if (start[i] !== buffer[position.position + i]) {\n return false\n }\n }\n\n return true\n}\n\nfunction parsingError (cause) {\n return new TypeError('Failed to parse body as FormData.', { cause: new TypeError(cause) })\n}\n\n/**\n * CTL = \n * @param {number} char\n */\nfunction isCTL (char) {\n return char <= 0x1f || char === 0x7f\n}\n\n/**\n * tspecials := \"(\" / \")\" / \"<\" / \">\" / \"@\" /\n * \",\" / \";\" / \":\" / \"\\\" / <\">\n * \"/\" / \"[\" / \"]\" / \"?\" / \"=\"\n * ; Must be in quoted-string,\n * ; to use within parameter values\n * @param {number} char\n */\nfunction isTSpecial (char) {\n return (\n char === 0x28 || // (\n char === 0x29 || // )\n char === 0x3c || // <\n char === 0x3e || // >\n char === 0x40 || // @\n char === 0x2c || // ,\n char === 0x3b || // ;\n char === 0x3a || // :\n char === 0x5c || // \\\n char === 0x22 || // \"\n char === 0x2f || // /\n char === 0x5b || // [\n char === 0x5d || // ]\n char === 0x3f || // ?\n char === 0x3d // +\n )\n}\n\n/**\n * token := 1*\n * @param {number} char\n */\nfunction isToken (char) {\n return (\n char <= 0x7f && // ascii\n char !== 0x20 && // space\n char !== 0x09 &&\n !isCTL(char) &&\n !isTSpecial(char)\n )\n}\n\nmodule.exports = {\n multipartFormDataParser,\n validateBoundary\n}\n", "'use strict'\n\n/**\n * @template {*} T\n * @typedef {Object} DeferredPromise\n * @property {Promise} promise\n * @property {(value?: T) => void} resolve\n * @property {(reason?: any) => void} reject\n */\n\n/**\n * @template {*} T\n * @returns {DeferredPromise} An object containing a promise and its resolve/reject methods.\n */\nfunction createDeferredPromise () {\n let res\n let rej\n const promise = new Promise((resolve, reject) => {\n res = resolve\n rej = reject\n })\n\n return { promise, resolve: res, reject: rej }\n}\n\nmodule.exports = {\n createDeferredPromise\n}\n", "'use strict'\n\nconst util = require('../../core/util')\nconst {\n ReadableStreamFrom,\n readableStreamClose,\n fullyReadBody,\n extractMimeType\n} = require('./util')\nconst { FormData, setFormDataState } = require('./formdata')\nconst { webidl } = require('../webidl')\nconst assert = require('node:assert')\nconst { isErrored, isDisturbed } = require('node:stream')\nconst { isUint8Array } = require('node:util/types')\nconst { serializeAMimeType } = require('./data-url')\nconst { multipartFormDataParser } = require('./formdata-parser')\nconst { createDeferredPromise } = require('../../util/promise')\nconst { parseJSONFromBytes } = require('../infra')\nconst { utf8DecodeBytes } = require('../../encoding')\nconst { runtimeFeatures } = require('../../util/runtime-features.js')\n\nconst random = runtimeFeatures.has('crypto')\n ? require('node:crypto').randomInt\n : (max) => Math.floor(Math.random() * max)\n\nconst textEncoder = new TextEncoder()\nfunction noop () {}\n\nconst streamRegistry = new FinalizationRegistry((weakRef) => {\n const stream = weakRef.deref()\n if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) {\n stream.cancel('Response object has been garbage collected').catch(noop)\n }\n})\n\n/**\n * Extract a body with type from a byte sequence or BodyInit object\n *\n * @param {import('../../../types').BodyInit} object - The BodyInit object to extract from\n * @param {boolean} [keepalive=false] - If true, indicates that the body\n * @returns {[{stream: ReadableStream, source: any, length: number | null}, string | null]} - Returns a tuple containing the body and its type\n *\n * @see https://fetch.spec.whatwg.org/#concept-bodyinit-extract\n */\nfunction extractBody (object, keepalive = false) {\n // 1. Let stream be null.\n let stream = null\n let controller = null\n\n // 2. If object is a ReadableStream object, then set stream to object.\n if (webidl.is.ReadableStream(object)) {\n stream = object\n } else if (webidl.is.Blob(object)) {\n // 3. Otherwise, if object is a Blob object, set stream to the\n // result of running object\u2019s get stream.\n stream = object.stream()\n } else {\n // 4. Otherwise, set stream to a new ReadableStream object, and set\n // up stream with byte reading support.\n stream = new ReadableStream({\n pull () {},\n start (c) {\n controller = c\n },\n cancel () {},\n type: 'bytes'\n })\n }\n\n // 5. Assert: stream is a ReadableStream object.\n assert(webidl.is.ReadableStream(stream))\n\n // 6. Let action be null.\n let action = null\n\n // 7. Let source be null.\n let source = null\n\n // 8. Let length be null.\n let length = null\n\n // 9. Let type be null.\n let type = null\n\n // 10. Switch on object:\n if (typeof object === 'string') {\n // Set source to the UTF-8 encoding of object.\n // Note: setting source to a Uint8Array here breaks some mocking assumptions.\n source = object\n\n // Set type to `text/plain;charset=UTF-8`.\n type = 'text/plain;charset=UTF-8'\n } else if (webidl.is.URLSearchParams(object)) {\n // URLSearchParams\n\n // spec says to run application/x-www-form-urlencoded on body.list\n // this is implemented in Node.js as apart of an URLSearchParams instance toString method\n // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490\n // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100\n\n // Set source to the result of running the application/x-www-form-urlencoded serializer with object\u2019s list.\n source = object.toString()\n\n // Set type to `application/x-www-form-urlencoded;charset=UTF-8`.\n type = 'application/x-www-form-urlencoded;charset=UTF-8'\n } else if (webidl.is.BufferSource(object)) {\n // Set source to a copy of the bytes held by object.\n source = webidl.util.getCopyOfBytesHeldByBufferSource(object)\n } else if (webidl.is.FormData(object)) {\n const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`\n const prefix = `--${boundary}\\r\\nContent-Disposition: form-data`\n\n /*! formdata-polyfill. MIT License. Jimmy W\u00E4rting */\n const formdataEscape = (str) =>\n str.replace(/\\n/g, '%0A').replace(/\\r/g, '%0D').replace(/\"/g, '%22')\n const normalizeLinefeeds = (value) => value.replace(/\\r?\\n|\\r/g, '\\r\\n')\n\n // Set action to this step: run the multipart/form-data\n // encoding algorithm, with object\u2019s entry list and UTF-8.\n // - This ensures that the body is immutable and can't be changed afterwords\n // - That the content-length is calculated in advance.\n // - And that all parts are pre-encoded and ready to be sent.\n\n const blobParts = []\n const rn = new Uint8Array([13, 10]) // '\\r\\n'\n length = 0\n let hasUnknownSizeValue = false\n\n for (const [name, value] of object) {\n if (typeof value === 'string') {\n const chunk = textEncoder.encode(prefix +\n `; name=\"${formdataEscape(normalizeLinefeeds(name))}\"` +\n `\\r\\n\\r\\n${normalizeLinefeeds(value)}\\r\\n`)\n blobParts.push(chunk)\n length += chunk.byteLength\n } else {\n const chunk = textEncoder.encode(`${prefix}; name=\"${formdataEscape(normalizeLinefeeds(name))}\"` +\n (value.name ? `; filename=\"${formdataEscape(value.name)}\"` : '') + '\\r\\n' +\n `Content-Type: ${\n value.type || 'application/octet-stream'\n }\\r\\n\\r\\n`)\n blobParts.push(chunk, value, rn)\n if (typeof value.size === 'number') {\n length += chunk.byteLength + value.size + rn.byteLength\n } else {\n hasUnknownSizeValue = true\n }\n }\n }\n\n // CRLF is appended to the body to function with legacy servers and match other implementations.\n // https://github.com/curl/curl/blob/3434c6b46e682452973972e8313613dfa58cd690/lib/mime.c#L1029-L1030\n // https://github.com/form-data/form-data/issues/63\n const chunk = textEncoder.encode(`--${boundary}--\\r\\n`)\n blobParts.push(chunk)\n length += chunk.byteLength\n if (hasUnknownSizeValue) {\n length = null\n }\n\n // Set source to object.\n source = object\n\n action = async function * () {\n for (const part of blobParts) {\n if (part.stream) {\n yield * part.stream()\n } else {\n yield part\n }\n }\n }\n\n // Set type to `multipart/form-data; boundary=`,\n // followed by the multipart/form-data boundary string generated\n // by the multipart/form-data encoding algorithm.\n type = `multipart/form-data; boundary=${boundary}`\n } else if (webidl.is.Blob(object)) {\n // Blob\n\n // Set source to object.\n source = object\n\n // Set length to object\u2019s size.\n length = object.size\n\n // If object\u2019s type attribute is not the empty byte sequence, set\n // type to its value.\n if (object.type) {\n type = object.type\n }\n } else if (typeof object[Symbol.asyncIterator] === 'function') {\n // If keepalive is true, then throw a TypeError.\n if (keepalive) {\n throw new TypeError('keepalive')\n }\n\n // If object is disturbed or locked, then throw a TypeError.\n if (util.isDisturbed(object) || object.locked) {\n throw new TypeError(\n 'Response body object should not be disturbed or locked'\n )\n }\n\n stream =\n webidl.is.ReadableStream(object) ? object : ReadableStreamFrom(object)\n }\n\n // 11. If source is a byte sequence, then set action to a\n // step that returns source and length to source\u2019s length.\n if (typeof source === 'string' || isUint8Array(source)) {\n action = () => {\n length = typeof source === 'string' ? Buffer.byteLength(source) : source.length\n return source\n }\n }\n\n // 12. If action is non-null, then run these steps in parallel:\n if (action != null) {\n ;(async () => {\n // 1. Run action.\n const result = action()\n\n // 2. Whenever one or more bytes are available and stream is not errored,\n // enqueue the result of creating a Uint8Array from the available bytes into stream.\n const iterator = result?.[Symbol.asyncIterator]?.()\n if (iterator) {\n for await (const bytes of iterator) {\n if (isErrored(stream)) break\n if (bytes.length) {\n controller.enqueue(new Uint8Array(bytes))\n }\n }\n } else if (result?.length && !isErrored(stream)) {\n controller.enqueue(typeof result === 'string' ? textEncoder.encode(result) : new Uint8Array(result))\n }\n\n // 3. When running action is done, close stream.\n queueMicrotask(() => readableStreamClose(controller))\n })()\n }\n\n // 13. Let body be a body whose stream is stream, source is source,\n // and length is length.\n const body = { stream, source, length }\n\n // 14. Return (body, type).\n return [body, type]\n}\n\n/**\n * @typedef {object} ExtractBodyResult\n * @property {ReadableStream>} stream - The ReadableStream containing the body data\n * @property {any} source - The original source of the body data\n * @property {number | null} length - The length of the body data, or null\n */\n\n/**\n * Safely extract a body with type from a byte sequence or BodyInit object.\n *\n * @param {import('../../../types').BodyInit} object - The BodyInit object to extract from\n * @param {boolean} [keepalive=false] - If true, indicates that the body\n * @returns {[ExtractBodyResult, string | null]} - Returns a tuple containing the body and its type\n *\n * @see https://fetch.spec.whatwg.org/#bodyinit-safely-extract\n */\nfunction safelyExtractBody (object, keepalive = false) {\n // To safely extract a body and a `Content-Type` value from\n // a byte sequence or BodyInit object object, run these steps:\n\n // 1. If object is a ReadableStream object, then:\n if (webidl.is.ReadableStream(object)) {\n // Assert: object is neither disturbed nor locked.\n assert(!util.isDisturbed(object), 'The body has already been consumed.')\n assert(!object.locked, 'The stream is locked.')\n }\n\n // 2. Return the results of extracting object.\n return extractBody(object, keepalive)\n}\n\nfunction cloneBody (body) {\n // To clone a body body, run these steps:\n\n // https://fetch.spec.whatwg.org/#concept-body-clone\n\n // 1. Let \u00AB out1, out2 \u00BB be the result of teeing body\u2019s stream.\n const { 0: out1, 1: out2 } = body.stream.tee()\n\n // 2. Set body\u2019s stream to out1.\n body.stream = out1\n\n // 3. Return a body whose stream is out2 and other members are copied from body.\n return {\n stream: out2,\n length: body.length,\n source: body.source\n }\n}\n\nfunction bodyMixinMethods (instance, getInternalState) {\n const methods = {\n blob () {\n // The blob() method steps are to return the result of\n // running consume body with this and the following step\n // given a byte sequence bytes: return a Blob whose\n // contents are bytes and whose type attribute is this\u2019s\n // MIME type.\n return consumeBody(this, (bytes) => {\n let mimeType = bodyMimeType(getInternalState(this))\n\n if (mimeType === null) {\n mimeType = ''\n } else if (mimeType) {\n mimeType = serializeAMimeType(mimeType)\n }\n\n // Return a Blob whose contents are bytes and type attribute\n // is mimeType.\n return new Blob([bytes], { type: mimeType })\n }, instance, getInternalState)\n },\n\n arrayBuffer () {\n // The arrayBuffer() method steps are to return the result\n // of running consume body with this and the following step\n // given a byte sequence bytes: return a new ArrayBuffer\n // whose contents are bytes.\n return consumeBody(this, (bytes) => {\n return new Uint8Array(bytes).buffer\n }, instance, getInternalState)\n },\n\n text () {\n // The text() method steps are to return the result of running\n // consume body with this and UTF-8 decode.\n return consumeBody(this, utf8DecodeBytes, instance, getInternalState)\n },\n\n json () {\n // The json() method steps are to return the result of running\n // consume body with this and parse JSON from bytes.\n return consumeBody(this, parseJSONFromBytes, instance, getInternalState)\n },\n\n formData () {\n // The formData() method steps are to return the result of running\n // consume body with this and the following step given a byte sequence bytes:\n return consumeBody(this, (value) => {\n // 1. Let mimeType be the result of get the MIME type with this.\n const mimeType = bodyMimeType(getInternalState(this))\n\n // 2. If mimeType is non-null, then switch on mimeType\u2019s essence and run\n // the corresponding steps:\n if (mimeType !== null) {\n switch (mimeType.essence) {\n case 'multipart/form-data': {\n // 1. ... [long step]\n // 2. If that fails for some reason, then throw a TypeError.\n const parsed = multipartFormDataParser(value, mimeType)\n\n // 3. Return a new FormData object, appending each entry,\n // resulting from the parsing operation, to its entry list.\n const fd = new FormData()\n setFormDataState(fd, parsed)\n\n return fd\n }\n case 'application/x-www-form-urlencoded': {\n // 1. Let entries be the result of parsing bytes.\n const entries = new URLSearchParams(value.toString())\n\n // 2. If entries is failure, then throw a TypeError.\n\n // 3. Return a new FormData object whose entry list is entries.\n const fd = new FormData()\n\n for (const [name, value] of entries) {\n fd.append(name, value)\n }\n\n return fd\n }\n }\n }\n\n // 3. Throw a TypeError.\n throw new TypeError(\n 'Content-Type was not one of \"multipart/form-data\" or \"application/x-www-form-urlencoded\".'\n )\n }, instance, getInternalState)\n },\n\n bytes () {\n // The bytes() method steps are to return the result of running consume body\n // with this and the following step given a byte sequence bytes: return the\n // result of creating a Uint8Array from bytes in this\u2019s relevant realm.\n return consumeBody(this, (bytes) => {\n return new Uint8Array(bytes)\n }, instance, getInternalState)\n }\n }\n\n return methods\n}\n\nfunction mixinBody (prototype, getInternalState) {\n Object.assign(prototype.prototype, bodyMixinMethods(prototype, getInternalState))\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-body-consume-body\n * @param {any} object internal state\n * @param {(value: unknown) => unknown} convertBytesToJSValue\n * @param {any} instance\n * @param {(target: any) => any} getInternalState\n */\nfunction consumeBody (object, convertBytesToJSValue, instance, getInternalState) {\n try {\n webidl.brandCheck(object, instance)\n } catch (e) {\n return Promise.reject(e)\n }\n\n object = getInternalState(object)\n\n // 1. If object is unusable, then return a promise rejected\n // with a TypeError.\n if (bodyUnusable(object)) {\n return Promise.reject(new TypeError('Body is unusable: Body has already been read'))\n }\n\n // 2. Let promise be a new promise.\n const promise = createDeferredPromise()\n\n // 3. Let errorSteps given error be to reject promise with error.\n const errorSteps = promise.reject\n\n // 4. Let successSteps given a byte sequence data be to resolve\n // promise with the result of running convertBytesToJSValue\n // with data. If that threw an exception, then run errorSteps\n // with that exception.\n const successSteps = (data) => {\n try {\n promise.resolve(convertBytesToJSValue(data))\n } catch (e) {\n errorSteps(e)\n }\n }\n\n // 5. If object\u2019s body is null, then run successSteps with an\n // empty byte sequence.\n if (object.body == null) {\n successSteps(Buffer.allocUnsafe(0))\n return promise.promise\n }\n\n // 6. Otherwise, fully read object\u2019s body given successSteps,\n // errorSteps, and object\u2019s relevant global object.\n fullyReadBody(object.body, successSteps, errorSteps)\n\n // 7. Return promise.\n return promise.promise\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#body-unusable\n * @param {any} object internal state\n */\nfunction bodyUnusable (object) {\n const body = object.body\n\n // An object including the Body interface mixin is\n // said to be unusable if its body is non-null and\n // its body\u2019s stream is disturbed or locked.\n return body != null && (body.stream.locked || util.isDisturbed(body.stream))\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-body-mime-type\n * @param {any} requestOrResponse internal state\n */\nfunction bodyMimeType (requestOrResponse) {\n // 1. Let headers be null.\n // 2. If requestOrResponse is a Request object, then set headers to requestOrResponse\u2019s request\u2019s header list.\n // 3. Otherwise, set headers to requestOrResponse\u2019s response\u2019s header list.\n /** @type {import('./headers').HeadersList} */\n const headers = requestOrResponse.headersList\n\n // 4. Let mimeType be the result of extracting a MIME type from headers.\n const mimeType = extractMimeType(headers)\n\n // 5. If mimeType is failure, then return null.\n if (mimeType === 'failure') {\n return null\n }\n\n // 6. Return mimeType.\n return mimeType\n}\n\nmodule.exports = {\n extractBody,\n safelyExtractBody,\n cloneBody,\n mixinBody,\n streamRegistry,\n bodyUnusable\n}\n", "'use strict'\n\n/* global WebAssembly */\n\nconst assert = require('node:assert')\nconst util = require('../core/util.js')\nconst { channels } = require('../core/diagnostics.js')\nconst timers = require('../util/timers.js')\nconst {\n RequestContentLengthMismatchError,\n ResponseContentLengthMismatchError,\n RequestAbortedError,\n HeadersTimeoutError,\n HeadersOverflowError,\n SocketError,\n InformationalError,\n BodyTimeoutError,\n HTTPParserError,\n ResponseExceededMaxSizeError\n} = require('../core/errors.js')\nconst {\n kUrl,\n kReset,\n kClient,\n kParser,\n kBlocking,\n kRunning,\n kPending,\n kSize,\n kWriting,\n kQueue,\n kNoRef,\n kKeepAliveDefaultTimeout,\n kHostHeader,\n kPendingIdx,\n kRunningIdx,\n kError,\n kPipelining,\n kSocket,\n kKeepAliveTimeoutValue,\n kMaxHeadersSize,\n kKeepAliveMaxTimeout,\n kKeepAliveTimeoutThreshold,\n kHeadersTimeout,\n kBodyTimeout,\n kStrictContentLength,\n kMaxRequests,\n kCounter,\n kMaxResponseSize,\n kOnError,\n kResume,\n kHTTPContext,\n kClosed\n} = require('../core/symbols.js')\n\nconst constants = require('../llhttp/constants.js')\nconst EMPTY_BUF = Buffer.alloc(0)\nconst FastBuffer = Buffer[Symbol.species]\nconst removeAllListeners = util.removeAllListeners\n\nlet extractBody\n\nfunction lazyllhttp () {\n const llhttpWasmData = process.env.JEST_WORKER_ID ? require('../llhttp/llhttp-wasm.js') : undefined\n\n let mod\n\n // We disable wasm SIMD on ppc64 as it seems to be broken on Power 9 architectures.\n let useWasmSIMD = process.arch !== 'ppc64'\n // The Env Variable UNDICI_NO_WASM_SIMD allows explicitly overriding the default behavior\n if (process.env.UNDICI_NO_WASM_SIMD === '1') {\n useWasmSIMD = true\n } else if (process.env.UNDICI_NO_WASM_SIMD === '0') {\n useWasmSIMD = false\n }\n\n if (useWasmSIMD) {\n try {\n mod = new WebAssembly.Module(require('../llhttp/llhttp_simd-wasm.js'))\n } catch {\n }\n }\n\n if (!mod) {\n // We could check if the error was caused by the simd option not\n // being enabled, but the occurring of this other error\n // * https://github.com/emscripten-core/emscripten/issues/11495\n // got me to remove that check to avoid breaking Node 12.\n mod = new WebAssembly.Module(llhttpWasmData || require('../llhttp/llhttp-wasm.js'))\n }\n\n return new WebAssembly.Instance(mod, {\n env: {\n /**\n * @param {number} p\n * @param {number} at\n * @param {number} len\n * @returns {number}\n */\n wasm_on_url: (p, at, len) => {\n return 0\n },\n /**\n * @param {number} p\n * @param {number} at\n * @param {number} len\n * @returns {number}\n */\n wasm_on_status: (p, at, len) => {\n assert(currentParser.ptr === p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len))\n },\n /**\n * @param {number} p\n * @returns {number}\n */\n wasm_on_message_begin: (p) => {\n assert(currentParser.ptr === p)\n return currentParser.onMessageBegin()\n },\n /**\n * @param {number} p\n * @param {number} at\n * @param {number} len\n * @returns {number}\n */\n wasm_on_header_field: (p, at, len) => {\n assert(currentParser.ptr === p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len))\n },\n /**\n * @param {number} p\n * @param {number} at\n * @param {number} len\n * @returns {number}\n */\n wasm_on_header_value: (p, at, len) => {\n assert(currentParser.ptr === p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len))\n },\n /**\n * @param {number} p\n * @param {number} statusCode\n * @param {0|1} upgrade\n * @param {0|1} shouldKeepAlive\n * @returns {number}\n */\n wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => {\n assert(currentParser.ptr === p)\n return currentParser.onHeadersComplete(statusCode, upgrade === 1, shouldKeepAlive === 1)\n },\n /**\n * @param {number} p\n * @param {number} at\n * @param {number} len\n * @returns {number}\n */\n wasm_on_body: (p, at, len) => {\n assert(currentParser.ptr === p)\n const start = at - currentBufferPtr + currentBufferRef.byteOffset\n return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len))\n },\n /**\n * @param {number} p\n * @returns {number}\n */\n wasm_on_message_complete: (p) => {\n assert(currentParser.ptr === p)\n return currentParser.onMessageComplete()\n }\n\n }\n })\n}\n\nlet llhttpInstance = null\n\n/**\n * @type {Parser|null}\n */\nlet currentParser = null\nlet currentBufferRef = null\n/**\n * @type {number}\n */\nlet currentBufferSize = 0\nlet currentBufferPtr = null\n\nconst USE_NATIVE_TIMER = 0\nconst USE_FAST_TIMER = 1\n\n// Use fast timers for headers and body to take eventual event loop\n// latency into account.\nconst TIMEOUT_HEADERS = 2 | USE_FAST_TIMER\nconst TIMEOUT_BODY = 4 | USE_FAST_TIMER\n\n// Use native timers to ignore event loop latency for keep-alive\n// handling.\nconst TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER\n\nclass Parser {\n /**\n * @param {import('./client.js')} client\n * @param {import('net').Socket} socket\n * @param {*} llhttp\n */\n constructor (client, socket, { exports }) {\n this.llhttp = exports\n this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE)\n this.client = client\n /**\n * @type {import('net').Socket}\n */\n this.socket = socket\n this.timeout = null\n this.timeoutValue = null\n this.timeoutType = null\n this.statusCode = 0\n this.statusText = ''\n this.upgrade = false\n this.headers = []\n this.headersSize = 0\n this.headersMaxSize = client[kMaxHeadersSize]\n this.shouldKeepAlive = false\n this.paused = false\n this.resume = this.resume.bind(this)\n\n this.bytesRead = 0\n\n this.keepAlive = ''\n this.contentLength = ''\n this.connection = ''\n this.maxResponseSize = client[kMaxResponseSize]\n }\n\n setTimeout (delay, type) {\n // If the existing timer and the new timer are of different timer type\n // (fast or native) or have different delay, we need to clear the existing\n // timer and set a new one.\n if (\n delay !== this.timeoutValue ||\n (type & USE_FAST_TIMER) ^ (this.timeoutType & USE_FAST_TIMER)\n ) {\n // If a timeout is already set, clear it with clearTimeout of the fast\n // timer implementation, as it can clear fast and native timers.\n if (this.timeout) {\n timers.clearTimeout(this.timeout)\n this.timeout = null\n }\n\n if (delay) {\n if (type & USE_FAST_TIMER) {\n this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this))\n } else {\n this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this))\n this.timeout?.unref()\n }\n }\n\n this.timeoutValue = delay\n } else if (this.timeout) {\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n this.timeoutType = type\n }\n\n resume () {\n if (this.socket.destroyed || !this.paused) {\n return\n }\n\n assert(this.ptr != null)\n assert(currentParser === null)\n\n this.llhttp.llhttp_resume(this.ptr)\n\n assert(this.timeoutType === TIMEOUT_BODY)\n if (this.timeout) {\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n this.paused = false\n this.execute(this.socket.read() || EMPTY_BUF) // Flush parser.\n this.readMore()\n }\n\n readMore () {\n while (!this.paused && this.ptr) {\n const chunk = this.socket.read()\n if (chunk === null) {\n break\n }\n this.execute(chunk)\n }\n }\n\n /**\n * @param {Buffer} chunk\n */\n execute (chunk) {\n assert(currentParser === null)\n assert(this.ptr != null)\n assert(!this.paused)\n\n const { socket, llhttp } = this\n\n // Allocate a new buffer if the current buffer is too small.\n if (chunk.length > currentBufferSize) {\n if (currentBufferPtr) {\n llhttp.free(currentBufferPtr)\n }\n // Allocate a buffer that is a multiple of 4096 bytes.\n currentBufferSize = Math.ceil(chunk.length / 4096) * 4096\n currentBufferPtr = llhttp.malloc(currentBufferSize)\n }\n\n new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(chunk)\n\n // Call `execute` on the wasm parser.\n // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data,\n // and finally the length of bytes to parse.\n // The return value is an error code or `constants.ERROR.OK`.\n try {\n let ret\n\n try {\n currentBufferRef = chunk\n currentParser = this\n ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, chunk.length)\n } finally {\n currentParser = null\n currentBufferRef = null\n }\n\n if (ret !== constants.ERROR.OK) {\n const data = chunk.subarray(llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr)\n\n if (ret === constants.ERROR.PAUSED_UPGRADE) {\n this.onUpgrade(data)\n } else if (ret === constants.ERROR.PAUSED) {\n this.paused = true\n socket.unshift(data)\n } else {\n const ptr = llhttp.llhttp_get_error_reason(this.ptr)\n let message = ''\n if (ptr) {\n const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0)\n message =\n 'Response does not match the HTTP/1.1 protocol (' +\n Buffer.from(llhttp.memory.buffer, ptr, len).toString() +\n ')'\n }\n throw new HTTPParserError(message, constants.ERROR[ret], data)\n }\n }\n } catch (err) {\n util.destroy(socket, err)\n }\n }\n\n destroy () {\n assert(currentParser === null)\n assert(this.ptr != null)\n\n this.llhttp.llhttp_free(this.ptr)\n this.ptr = null\n\n this.timeout && timers.clearTimeout(this.timeout)\n this.timeout = null\n this.timeoutValue = null\n this.timeoutType = null\n\n this.paused = false\n }\n\n /**\n * @param {Buffer} buf\n * @returns {0}\n */\n onStatus (buf) {\n this.statusText = buf.toString()\n return 0\n }\n\n /**\n * @returns {0|-1}\n */\n onMessageBegin () {\n const { socket, client } = this\n\n if (socket.destroyed) {\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n if (!request) {\n return -1\n }\n request.onResponseStarted()\n\n return 0\n }\n\n /**\n * @param {Buffer} buf\n * @returns {number}\n */\n onHeaderField (buf) {\n const len = this.headers.length\n\n if ((len & 1) === 0) {\n this.headers.push(buf)\n } else {\n this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf])\n }\n\n this.trackHeader(buf.length)\n\n return 0\n }\n\n /**\n * @param {Buffer} buf\n * @returns {number}\n */\n onHeaderValue (buf) {\n let len = this.headers.length\n\n if ((len & 1) === 1) {\n this.headers.push(buf)\n len += 1\n } else {\n this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf])\n }\n\n const key = this.headers[len - 2]\n if (key.length === 10) {\n const headerName = util.bufferToLowerCasedHeaderName(key)\n if (headerName === 'keep-alive') {\n this.keepAlive += buf.toString()\n } else if (headerName === 'connection') {\n this.connection += buf.toString()\n }\n } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === 'content-length') {\n this.contentLength += buf.toString()\n }\n\n this.trackHeader(buf.length)\n\n return 0\n }\n\n /**\n * @param {number} len\n */\n trackHeader (len) {\n this.headersSize += len\n if (this.headersSize >= this.headersMaxSize) {\n util.destroy(this.socket, new HeadersOverflowError())\n }\n }\n\n /**\n * @param {Buffer} head\n */\n onUpgrade (head) {\n const { upgrade, client, socket, headers, statusCode } = this\n\n assert(upgrade)\n assert(client[kSocket] === socket)\n assert(!socket.destroyed)\n assert(!this.paused)\n assert((headers.length & 1) === 0)\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n assert(request.upgrade || request.method === 'CONNECT')\n\n this.statusCode = 0\n this.statusText = ''\n this.shouldKeepAlive = false\n\n this.headers = []\n this.headersSize = 0\n\n socket.unshift(head)\n\n socket[kParser].destroy()\n socket[kParser] = null\n\n socket[kClient] = null\n socket[kError] = null\n\n removeAllListeners(socket)\n\n client[kSocket] = null\n client[kHTTPContext] = null // TODO (fix): This is hacky...\n client[kQueue][client[kRunningIdx]++] = null\n client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade'))\n\n try {\n request.onUpgrade(statusCode, headers, socket)\n } catch (err) {\n util.destroy(socket, err)\n }\n\n client[kResume]()\n }\n\n /**\n * @param {number} statusCode\n * @param {boolean} upgrade\n * @param {boolean} shouldKeepAlive\n * @returns {number}\n */\n onHeadersComplete (statusCode, upgrade, shouldKeepAlive) {\n const { client, socket, headers, statusText } = this\n\n if (socket.destroyed) {\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n\n if (!request) {\n return -1\n }\n\n assert(!this.upgrade)\n assert(this.statusCode < 200)\n\n if (statusCode === 100) {\n util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))\n return -1\n }\n\n /* this can only happen if server is misbehaving */\n if (upgrade && !request.upgrade) {\n util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket)))\n return -1\n }\n\n assert(this.timeoutType === TIMEOUT_HEADERS)\n\n this.statusCode = statusCode\n this.shouldKeepAlive = (\n shouldKeepAlive ||\n // Override llhttp value which does not allow keepAlive for HEAD.\n (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive')\n )\n\n if (this.statusCode >= 200) {\n const bodyTimeout = request.bodyTimeout != null\n ? request.bodyTimeout\n : client[kBodyTimeout]\n this.setTimeout(bodyTimeout, TIMEOUT_BODY)\n } else if (this.timeout) {\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n if (request.method === 'CONNECT') {\n assert(client[kRunning] === 1)\n this.upgrade = true\n return 2\n }\n\n if (upgrade) {\n assert(client[kRunning] === 1)\n this.upgrade = true\n return 2\n }\n\n assert((this.headers.length & 1) === 0)\n this.headers = []\n this.headersSize = 0\n\n if (this.shouldKeepAlive && client[kPipelining]) {\n const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null\n\n if (keepAliveTimeout != null) {\n const timeout = Math.min(\n keepAliveTimeout - client[kKeepAliveTimeoutThreshold],\n client[kKeepAliveMaxTimeout]\n )\n if (timeout <= 0) {\n socket[kReset] = true\n } else {\n client[kKeepAliveTimeoutValue] = timeout\n }\n } else {\n client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]\n }\n } else {\n // Stop more requests from being dispatched.\n socket[kReset] = true\n }\n\n const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false\n\n if (request.aborted) {\n return -1\n }\n\n if (request.method === 'HEAD') {\n return 1\n }\n\n if (statusCode < 200) {\n return 1\n }\n\n if (socket[kBlocking]) {\n socket[kBlocking] = false\n client[kResume]()\n }\n\n return pause ? constants.ERROR.PAUSED : 0\n }\n\n /**\n * @param {Buffer} buf\n * @returns {number}\n */\n onBody (buf) {\n const { client, socket, statusCode, maxResponseSize } = this\n\n if (socket.destroyed) {\n return -1\n }\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n\n assert(this.timeoutType === TIMEOUT_BODY)\n if (this.timeout) {\n if (this.timeout.refresh) {\n this.timeout.refresh()\n }\n }\n\n assert(statusCode >= 200)\n\n if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) {\n util.destroy(socket, new ResponseExceededMaxSizeError())\n return -1\n }\n\n this.bytesRead += buf.length\n\n if (request.onData(buf) === false) {\n return constants.ERROR.PAUSED\n }\n\n return 0\n }\n\n /**\n * @returns {number}\n */\n onMessageComplete () {\n const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this\n\n if (socket.destroyed && (!statusCode || shouldKeepAlive)) {\n return -1\n }\n\n if (upgrade) {\n return 0\n }\n\n assert(statusCode >= 100)\n assert((this.headers.length & 1) === 0)\n\n const request = client[kQueue][client[kRunningIdx]]\n assert(request)\n\n this.statusCode = 0\n this.statusText = ''\n this.bytesRead = 0\n this.contentLength = ''\n this.keepAlive = ''\n this.connection = ''\n\n this.headers = []\n this.headersSize = 0\n\n if (statusCode < 200) {\n return 0\n }\n\n if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) {\n util.destroy(socket, new ResponseContentLengthMismatchError())\n return -1\n }\n\n request.onComplete(headers)\n\n client[kQueue][client[kRunningIdx]++] = null\n\n if (socket[kWriting]) {\n assert(client[kRunning] === 0)\n // Response completed before request.\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (!shouldKeepAlive) {\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (socket[kReset] && client[kRunning] === 0) {\n // Destroy socket once all requests have completed.\n // The request at the tail of the pipeline is the one\n // that requested reset and no further requests should\n // have been queued since then.\n util.destroy(socket, new InformationalError('reset'))\n return constants.ERROR.PAUSED\n } else if (client[kPipelining] == null || client[kPipelining] === 1) {\n // We must wait a full event loop cycle to reuse this socket to make sure\n // that non-spec compliant servers are not closing the connection even if they\n // said they won't.\n setImmediate(client[kResume])\n } else {\n client[kResume]()\n }\n\n return 0\n }\n}\n\nfunction onParserTimeout (parserWeakRef) {\n const parser = parserWeakRef.deref()\n if (!parser) {\n return\n }\n\n const { socket, timeoutType, client, paused } = parser\n\n if (timeoutType === TIMEOUT_HEADERS) {\n if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {\n assert(!paused, 'cannot be paused while waiting for headers')\n util.destroy(socket, new HeadersTimeoutError())\n }\n } else if (timeoutType === TIMEOUT_BODY) {\n if (!paused) {\n util.destroy(socket, new BodyTimeoutError())\n }\n } else if (timeoutType === TIMEOUT_KEEP_ALIVE) {\n assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue])\n util.destroy(socket, new InformationalError('socket idle timeout'))\n }\n}\n\n/**\n * @param {import ('./client.js')} client\n * @param {import('net').Socket} socket\n * @returns\n */\nfunction connectH1 (client, socket) {\n client[kSocket] = socket\n\n if (!llhttpInstance) {\n llhttpInstance = lazyllhttp()\n }\n\n if (socket.errored) {\n throw socket.errored\n }\n\n if (socket.destroyed) {\n throw new SocketError('destroyed')\n }\n\n socket[kNoRef] = false\n socket[kWriting] = false\n socket[kReset] = false\n socket[kBlocking] = false\n socket[kParser] = new Parser(client, socket, llhttpInstance)\n\n util.addListener(socket, 'error', onHttpSocketError)\n util.addListener(socket, 'readable', onHttpSocketReadable)\n util.addListener(socket, 'end', onHttpSocketEnd)\n util.addListener(socket, 'close', onHttpSocketClose)\n\n socket[kClosed] = false\n socket.on('close', onSocketClose)\n\n return {\n version: 'h1',\n defaultPipelining: 1,\n write (request) {\n return writeH1(client, request)\n },\n resume () {\n resumeH1(client)\n },\n /**\n * @param {Error|undefined} err\n * @param {() => void} callback\n */\n destroy (err, callback) {\n if (socket[kClosed]) {\n queueMicrotask(callback)\n } else {\n socket.on('close', callback)\n socket.destroy(err)\n }\n },\n /**\n * @returns {boolean}\n */\n get destroyed () {\n return socket.destroyed\n },\n /**\n * @param {import('../core/request.js')} request\n * @returns {boolean}\n */\n busy (request) {\n if (socket[kWriting] || socket[kReset] || socket[kBlocking]) {\n return true\n }\n\n if (request) {\n if (client[kRunning] > 0 && !request.idempotent) {\n // Non-idempotent request cannot be retried.\n // Ensure that no other requests are inflight and\n // could cause failure.\n return true\n }\n\n if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) {\n // Don't dispatch an upgrade until all preceding requests have completed.\n // A misbehaving server might upgrade the connection before all pipelined\n // request has completed.\n return true\n }\n\n if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 &&\n (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) {\n // Request with stream or iterator body can error while other requests\n // are inflight and indirectly error those as well.\n // Ensure this doesn't happen by waiting for inflight\n // to complete before dispatching.\n\n // Request with stream or iterator body cannot be retried.\n // Ensure that no other requests are inflight and\n // could cause failure.\n return true\n }\n }\n\n return false\n }\n }\n}\n\nfunction onHttpSocketError (err) {\n assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')\n\n const parser = this[kParser]\n\n // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded\n // to the user.\n if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) {\n // We treat all incoming data so for as a valid response.\n parser.onMessageComplete()\n return\n }\n\n this[kError] = err\n\n this[kClient][kOnError](err)\n}\n\nfunction onHttpSocketReadable () {\n this[kParser]?.readMore()\n}\n\nfunction onHttpSocketEnd () {\n const parser = this[kParser]\n\n if (parser.statusCode && !parser.shouldKeepAlive) {\n // We treat all incoming data so far as a valid response.\n parser.onMessageComplete()\n return\n }\n\n util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this)))\n}\n\nfunction onHttpSocketClose () {\n const parser = this[kParser]\n\n if (parser) {\n if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) {\n // We treat all incoming data so far as a valid response.\n parser.onMessageComplete()\n }\n\n this[kParser].destroy()\n this[kParser] = null\n }\n\n const err = this[kError] || new SocketError('closed', util.getSocketInfo(this))\n\n const client = this[kClient]\n\n client[kSocket] = null\n client[kHTTPContext] = null // TODO (fix): This is hacky...\n\n if (client.destroyed) {\n assert(client[kPending] === 0)\n\n // Fail entire queue.\n const requests = client[kQueue].splice(client[kRunningIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n util.errorRequest(client, request, err)\n }\n } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') {\n // Fail head of pipeline.\n const request = client[kQueue][client[kRunningIdx]]\n client[kQueue][client[kRunningIdx]++] = null\n\n util.errorRequest(client, request, err)\n }\n\n client[kPendingIdx] = client[kRunningIdx]\n\n assert(client[kRunning] === 0)\n\n client.emit('disconnect', client[kUrl], [client], err)\n\n client[kResume]()\n}\n\nfunction onSocketClose () {\n this[kClosed] = true\n}\n\n/**\n * @param {import('./client.js')} client\n */\nfunction resumeH1 (client) {\n const socket = client[kSocket]\n\n if (socket && !socket.destroyed) {\n if (client[kSize] === 0) {\n if (!socket[kNoRef] && socket.unref) {\n socket.unref()\n socket[kNoRef] = true\n }\n } else if (socket[kNoRef] && socket.ref) {\n socket.ref()\n socket[kNoRef] = false\n }\n\n if (client[kSize] === 0) {\n if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) {\n socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE)\n }\n } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) {\n if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) {\n const request = client[kQueue][client[kRunningIdx]]\n const headersTimeout = request.headersTimeout != null\n ? request.headersTimeout\n : client[kHeadersTimeout]\n socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS)\n }\n }\n }\n}\n\n// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2\nfunction shouldSendContentLength (method) {\n return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT'\n}\n\n/**\n * @param {import('./client.js')} client\n * @param {import('../core/request.js')} request\n * @returns\n */\nfunction writeH1 (client, request) {\n const { method, path, host, upgrade, blocking, reset } = request\n\n let { body, headers, contentLength } = request\n\n // https://tools.ietf.org/html/rfc7231#section-4.3.1\n // https://tools.ietf.org/html/rfc7231#section-4.3.2\n // https://tools.ietf.org/html/rfc7231#section-4.3.5\n\n // Sending a payload body on a request that does not\n // expect it can cause undefined behavior on some\n // servers and corrupt connection state. Do not\n // re-use the connection for further requests.\n\n const expectsPayload = (\n method === 'PUT' ||\n method === 'POST' ||\n method === 'PATCH' ||\n method === 'QUERY' ||\n method === 'PROPFIND' ||\n method === 'PROPPATCH'\n )\n\n if (util.isFormDataLike(body)) {\n if (!extractBody) {\n extractBody = require('../web/fetch/body.js').extractBody\n }\n\n const [bodyStream, contentType] = extractBody(body)\n if (request.contentType == null) {\n headers.push('content-type', contentType)\n }\n body = bodyStream.stream\n contentLength = bodyStream.length\n } else if (util.isBlobLike(body) && request.contentType == null && body.type) {\n headers.push('content-type', body.type)\n }\n\n if (body && typeof body.read === 'function') {\n // Try to read EOF in order to get length.\n body.read(0)\n }\n\n const bodyLength = util.bodyLength(body)\n\n contentLength = bodyLength ?? contentLength\n\n if (contentLength === null) {\n contentLength = request.contentLength\n }\n\n if (contentLength === 0 && !expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD NOT send a Content-Length header field when\n // the request message does not contain a payload body and the method\n // semantics do not anticipate such a body.\n\n contentLength = null\n }\n\n // https://github.com/nodejs/undici/issues/2046\n // A user agent may send a Content-Length header with 0 value, this should be allowed.\n if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) {\n if (client[kStrictContentLength]) {\n util.errorRequest(client, request, new RequestContentLengthMismatchError())\n return false\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n const socket = client[kSocket]\n\n /**\n * @param {Error} [err]\n * @returns {void}\n */\n const abort = (err) => {\n if (request.aborted || request.completed) {\n return\n }\n\n util.errorRequest(client, request, err || new RequestAbortedError())\n\n util.destroy(body)\n util.destroy(socket, new InformationalError('aborted'))\n }\n\n try {\n request.onConnect(abort)\n } catch (err) {\n util.errorRequest(client, request, err)\n }\n\n if (request.aborted) {\n return false\n }\n\n if (method === 'HEAD') {\n // https://github.com/mcollina/undici/issues/258\n // Close after a HEAD request to interop with misbehaving servers\n // that may send a body in the response.\n\n socket[kReset] = true\n }\n\n if (upgrade || method === 'CONNECT') {\n // On CONNECT or upgrade, block pipeline from dispatching further\n // requests on this connection.\n\n socket[kReset] = true\n }\n\n if (reset != null) {\n socket[kReset] = reset\n }\n\n if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) {\n socket[kReset] = true\n }\n\n if (blocking) {\n socket[kBlocking] = true\n }\n\n if (socket.setTypeOfService) {\n socket.setTypeOfService(request.typeOfService)\n }\n\n let header = `${method} ${path} HTTP/1.1\\r\\n`\n\n if (typeof host === 'string') {\n header += `host: ${host}\\r\\n`\n } else {\n header += client[kHostHeader]\n }\n\n if (upgrade) {\n header += `connection: upgrade\\r\\nupgrade: ${upgrade}\\r\\n`\n } else if (client[kPipelining] && !socket[kReset]) {\n header += 'connection: keep-alive\\r\\n'\n } else {\n header += 'connection: close\\r\\n'\n }\n\n if (Array.isArray(headers)) {\n for (let n = 0; n < headers.length; n += 2) {\n const key = headers[n + 0]\n const val = headers[n + 1]\n\n if (Array.isArray(val)) {\n for (let i = 0; i < val.length; i++) {\n header += `${key}: ${val[i]}\\r\\n`\n }\n } else {\n header += `${key}: ${val}\\r\\n`\n }\n }\n }\n\n if (channels.sendHeaders.hasSubscribers) {\n channels.sendHeaders.publish({ request, headers: header, socket })\n }\n\n if (!body || bodyLength === 0) {\n writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload)\n } else if (util.isBuffer(body)) {\n writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload)\n } else if (util.isBlobLike(body)) {\n if (typeof body.stream === 'function') {\n writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload)\n } else {\n writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload)\n }\n } else if (util.isStream(body)) {\n writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload)\n } else if (util.isIterable(body)) {\n writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload)\n } else {\n assert(false)\n }\n\n return true\n}\n\n/**\n * @param {AbortCallback} abort\n * @param {import('stream').Stream} body\n * @param {import('./client.js')} client\n * @param {import('../core/request.js')} request\n * @param {import('net').Socket} socket\n * @param {number} contentLength\n * @param {string} header\n * @param {boolean} expectsPayload\n */\nfunction writeStream (abort, body, client, request, socket, contentLength, header, expectsPayload) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined')\n\n let finished = false\n\n const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header })\n\n /**\n * @param {Buffer} chunk\n * @returns {void}\n */\n const onData = function (chunk) {\n if (finished) {\n return\n }\n\n try {\n if (!writer.write(chunk) && this.pause) {\n this.pause()\n }\n } catch (err) {\n util.destroy(this, err)\n }\n }\n\n /**\n * @returns {void}\n */\n const onDrain = function () {\n if (finished) {\n return\n }\n\n if (body.resume) {\n body.resume()\n }\n }\n\n /**\n * @returns {void}\n */\n const onClose = function () {\n // 'close' might be emitted *before* 'error' for\n // broken streams. Wait a tick to avoid this case.\n queueMicrotask(() => {\n // It's only safe to remove 'error' listener after\n // 'close'.\n body.removeListener('error', onFinished)\n })\n\n if (!finished) {\n const err = new RequestAbortedError()\n queueMicrotask(() => onFinished(err))\n }\n }\n\n /**\n * @param {Error} [err]\n * @returns\n */\n const onFinished = function (err) {\n if (finished) {\n return\n }\n\n finished = true\n\n assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1))\n\n socket\n .off('drain', onDrain)\n .off('error', onFinished)\n\n body\n .removeListener('data', onData)\n .removeListener('end', onFinished)\n .removeListener('close', onClose)\n\n if (!err) {\n try {\n writer.end()\n } catch (er) {\n err = er\n }\n }\n\n writer.destroy(err)\n\n if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) {\n util.destroy(body, err)\n } else {\n util.destroy(body)\n }\n }\n\n body\n .on('data', onData)\n .on('end', onFinished)\n .on('error', onFinished)\n .on('close', onClose)\n\n if (body.resume) {\n body.resume()\n }\n\n socket\n .on('drain', onDrain)\n .on('error', onFinished)\n\n if (body.errorEmitted ?? body.errored) {\n setImmediate(onFinished, body.errored)\n } else if (body.endEmitted ?? body.readableEnded) {\n setImmediate(onFinished, null)\n }\n\n if (body.closeEmitted ?? body.closed) {\n setImmediate(onClose)\n }\n}\n\n/**\n * @typedef AbortCallback\n * @type {Function}\n * @param {Error} [err]\n * @returns {void}\n */\n\n/**\n * @param {AbortCallback} abort\n * @param {Uint8Array|null} body\n * @param {import('./client.js')} client\n * @param {import('../core/request.js')} request\n * @param {import('net').Socket} socket\n * @param {number} contentLength\n * @param {string} header\n * @param {boolean} expectsPayload\n * @returns {void}\n */\nfunction writeBuffer (abort, body, client, request, socket, contentLength, header, expectsPayload) {\n try {\n if (!body) {\n if (contentLength === 0) {\n socket.write(`${header}content-length: 0\\r\\n\\r\\n`, 'latin1')\n } else {\n assert(contentLength === null, 'no body must not have content length')\n socket.write(`${header}\\r\\n`, 'latin1')\n }\n } else if (util.isBuffer(body)) {\n assert(contentLength === body.byteLength, 'buffer body must have content length')\n\n socket.cork()\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n socket.write(body)\n socket.uncork()\n request.onBodySent(body)\n\n if (!expectsPayload && request.reset !== false) {\n socket[kReset] = true\n }\n }\n request.onRequestSent()\n\n client[kResume]()\n } catch (err) {\n abort(err)\n }\n}\n\n/**\n * @param {AbortCallback} abort\n * @param {Blob} body\n * @param {import('./client.js')} client\n * @param {import('../core/request.js')} request\n * @param {import('net').Socket} socket\n * @param {number} contentLength\n * @param {string} header\n * @param {boolean} expectsPayload\n * @returns {Promise}\n */\nasync function writeBlob (abort, body, client, request, socket, contentLength, header, expectsPayload) {\n assert(contentLength === body.size, 'blob body must have content length')\n\n try {\n if (contentLength != null && contentLength !== body.size) {\n throw new RequestContentLengthMismatchError()\n }\n\n const buffer = Buffer.from(await body.arrayBuffer())\n\n socket.cork()\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n socket.write(buffer)\n socket.uncork()\n\n request.onBodySent(buffer)\n request.onRequestSent()\n\n if (!expectsPayload && request.reset !== false) {\n socket[kReset] = true\n }\n\n client[kResume]()\n } catch (err) {\n abort(err)\n }\n}\n\n/**\n * @param {AbortCallback} abort\n * @param {Iterable} body\n * @param {import('./client.js')} client\n * @param {import('../core/request.js')} request\n * @param {import('net').Socket} socket\n * @param {number} contentLength\n * @param {string} header\n * @param {boolean} expectsPayload\n * @returns {Promise}\n */\nasync function writeIterable (abort, body, client, request, socket, contentLength, header, expectsPayload) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined')\n\n let callback = null\n function onDrain () {\n if (callback) {\n const cb = callback\n callback = null\n cb()\n }\n }\n\n const waitForDrain = () => new Promise((resolve, reject) => {\n assert(callback === null)\n\n if (socket[kError]) {\n reject(socket[kError])\n } else {\n callback = resolve\n }\n })\n\n socket\n .on('close', onDrain)\n .on('drain', onDrain)\n\n const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header })\n try {\n // It's up to the user to somehow abort the async iterable.\n for await (const chunk of body) {\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (!writer.write(chunk)) {\n await waitForDrain()\n }\n }\n\n writer.end()\n } catch (err) {\n writer.destroy(err)\n } finally {\n socket\n .off('close', onDrain)\n .off('drain', onDrain)\n }\n}\n\nclass AsyncWriter {\n /**\n *\n * @param {object} arg\n * @param {AbortCallback} arg.abort\n * @param {import('net').Socket} arg.socket\n * @param {import('../core/request.js')} arg.request\n * @param {number} arg.contentLength\n * @param {import('./client.js')} arg.client\n * @param {boolean} arg.expectsPayload\n * @param {string} arg.header\n */\n constructor ({ abort, socket, request, contentLength, client, expectsPayload, header }) {\n this.socket = socket\n this.request = request\n this.contentLength = contentLength\n this.client = client\n this.bytesWritten = 0\n this.expectsPayload = expectsPayload\n this.header = header\n this.abort = abort\n\n socket[kWriting] = true\n }\n\n /**\n * @param {Buffer} chunk\n * @returns\n */\n write (chunk) {\n const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this\n\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (socket.destroyed) {\n return false\n }\n\n const len = Buffer.byteLength(chunk)\n if (!len) {\n return true\n }\n\n // We should defer writing chunks.\n if (contentLength !== null && bytesWritten + len > contentLength) {\n if (client[kStrictContentLength]) {\n throw new RequestContentLengthMismatchError()\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n socket.cork()\n\n if (bytesWritten === 0) {\n if (!expectsPayload && request.reset !== false) {\n socket[kReset] = true\n }\n\n if (contentLength === null) {\n socket.write(`${header}transfer-encoding: chunked\\r\\n`, 'latin1')\n } else {\n socket.write(`${header}content-length: ${contentLength}\\r\\n\\r\\n`, 'latin1')\n }\n }\n\n if (contentLength === null) {\n socket.write(`\\r\\n${len.toString(16)}\\r\\n`, 'latin1')\n }\n\n this.bytesWritten += len\n\n const ret = socket.write(chunk)\n\n socket.uncork()\n\n request.onBodySent(chunk)\n\n if (!ret) {\n if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {\n if (socket[kParser].timeout.refresh) {\n socket[kParser].timeout.refresh()\n }\n }\n }\n\n return ret\n }\n\n /**\n * @returns {void}\n */\n end () {\n const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this\n request.onRequestSent()\n\n socket[kWriting] = false\n\n if (socket[kError]) {\n throw socket[kError]\n }\n\n if (socket.destroyed) {\n return\n }\n\n if (bytesWritten === 0) {\n if (expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD send a Content-Length in a request message when\n // no Transfer-Encoding is sent and the request method defines a meaning\n // for an enclosed payload body.\n\n socket.write(`${header}content-length: 0\\r\\n\\r\\n`, 'latin1')\n } else {\n socket.write(`${header}\\r\\n`, 'latin1')\n }\n } else if (contentLength === null) {\n socket.write('\\r\\n0\\r\\n\\r\\n', 'latin1')\n }\n\n if (contentLength !== null && bytesWritten !== contentLength) {\n if (client[kStrictContentLength]) {\n throw new RequestContentLengthMismatchError()\n } else {\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n }\n\n if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {\n if (socket[kParser].timeout.refresh) {\n socket[kParser].timeout.refresh()\n }\n }\n\n client[kResume]()\n }\n\n /**\n * @param {Error} [err]\n * @returns {void}\n */\n destroy (err) {\n const { socket, client, abort } = this\n\n socket[kWriting] = false\n\n if (err) {\n assert(client[kRunning] <= 1, 'pipeline should only contain this request')\n abort(err)\n }\n }\n}\n\nmodule.exports = connectH1\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { pipeline } = require('node:stream')\nconst util = require('../core/util.js')\nconst {\n RequestContentLengthMismatchError,\n RequestAbortedError,\n SocketError,\n InformationalError,\n InvalidArgumentError\n} = require('../core/errors.js')\nconst {\n kUrl,\n kReset,\n kClient,\n kRunning,\n kPending,\n kQueue,\n kPendingIdx,\n kRunningIdx,\n kError,\n kSocket,\n kStrictContentLength,\n kOnError,\n kMaxConcurrentStreams,\n kPingInterval,\n kHTTP2Session,\n kHTTP2InitialWindowSize,\n kHTTP2ConnectionWindowSize,\n kResume,\n kSize,\n kHTTPContext,\n kClosed,\n kBodyTimeout,\n kEnableConnectProtocol,\n kRemoteSettings,\n kHTTP2Stream,\n kHTTP2SessionState\n} = require('../core/symbols.js')\nconst { channels } = require('../core/diagnostics.js')\n\nconst kOpenStreams = Symbol('open streams')\n\nlet extractBody\n\n/** @type {import('http2')} */\nlet http2\ntry {\n http2 = require('node:http2')\n} catch {\n // @ts-ignore\n http2 = { constants: {} }\n}\n\nconst {\n constants: {\n HTTP2_HEADER_AUTHORITY,\n HTTP2_HEADER_METHOD,\n HTTP2_HEADER_PATH,\n HTTP2_HEADER_SCHEME,\n HTTP2_HEADER_CONTENT_LENGTH,\n HTTP2_HEADER_EXPECT,\n HTTP2_HEADER_STATUS,\n HTTP2_HEADER_PROTOCOL,\n NGHTTP2_REFUSED_STREAM,\n NGHTTP2_CANCEL\n }\n} = http2\n\nfunction parseH2Headers (headers) {\n const result = []\n\n for (const [name, value] of Object.entries(headers)) {\n // h2 may concat the header value by array\n // e.g. Set-Cookie\n if (Array.isArray(value)) {\n for (const subvalue of value) {\n // we need to provide each header value of header name\n // because the headers handler expect name-value pair\n result.push(Buffer.from(name), Buffer.from(subvalue))\n }\n } else {\n result.push(Buffer.from(name), Buffer.from(value))\n }\n }\n\n return result\n}\n\nfunction connectH2 (client, socket) {\n client[kSocket] = socket\n\n const http2InitialWindowSize = client[kHTTP2InitialWindowSize]\n const http2ConnectionWindowSize = client[kHTTP2ConnectionWindowSize]\n\n const session = http2.connect(client[kUrl], {\n createConnection: () => socket,\n peerMaxConcurrentStreams: client[kMaxConcurrentStreams],\n settings: {\n // TODO(metcoder95): add support for PUSH\n enablePush: false,\n ...(http2InitialWindowSize != null ? { initialWindowSize: http2InitialWindowSize } : null)\n }\n })\n\n client[kSocket] = socket\n session[kOpenStreams] = 0\n session[kClient] = client\n session[kSocket] = socket\n session[kHTTP2SessionState] = {\n ping: {\n interval: client[kPingInterval] === 0 ? null : setInterval(onHttp2SendPing, client[kPingInterval], session).unref()\n }\n }\n // We set it to true by default in a best-effort; however once connected to an H2 server\n // we will check if extended CONNECT protocol is supported or not\n // and set this value accordingly.\n session[kEnableConnectProtocol] = false\n // States whether or not we have received the remote settings from the server\n session[kRemoteSettings] = false\n\n // Apply connection-level flow control once connected (if supported).\n if (http2ConnectionWindowSize) {\n util.addListener(session, 'connect', applyConnectionWindowSize.bind(session, http2ConnectionWindowSize))\n }\n\n util.addListener(session, 'error', onHttp2SessionError)\n util.addListener(session, 'frameError', onHttp2FrameError)\n util.addListener(session, 'end', onHttp2SessionEnd)\n util.addListener(session, 'goaway', onHttp2SessionGoAway)\n util.addListener(session, 'close', onHttp2SessionClose)\n util.addListener(session, 'remoteSettings', onHttp2RemoteSettings)\n // TODO (@metcoder95): implement SETTINGS support\n // util.addListener(session, 'localSettings', onHttp2RemoteSettings)\n\n session.unref()\n\n client[kHTTP2Session] = session\n socket[kHTTP2Session] = session\n\n util.addListener(socket, 'error', onHttp2SocketError)\n util.addListener(socket, 'end', onHttp2SocketEnd)\n util.addListener(socket, 'close', onHttp2SocketClose)\n\n socket[kClosed] = false\n socket.on('close', onSocketClose)\n\n return {\n version: 'h2',\n defaultPipelining: Infinity,\n /**\n * @param {import('../core/request.js')} request\n * @returns {boolean}\n */\n write (request) {\n return writeH2(client, request)\n },\n /**\n * @returns {void}\n */\n resume () {\n resumeH2(client)\n },\n /**\n * @param {Error | null} err\n * @param {() => void} callback\n */\n destroy (err, callback) {\n if (socket[kClosed]) {\n queueMicrotask(callback)\n } else {\n socket.destroy(err).on('close', callback)\n }\n },\n /**\n * @type {boolean}\n */\n get destroyed () {\n return socket.destroyed\n },\n /**\n * @param {import('../core/request.js')} request\n * @returns {boolean}\n */\n busy (request) {\n if (request != null) {\n if (client[kRunning] > 0) {\n // We are already processing requests\n\n // Non-idempotent request cannot be retried.\n // Ensure that no other requests are inflight and\n // could cause failure.\n if (request.idempotent === false) return true\n // Don't dispatch an upgrade until all preceding requests have completed.\n // Possibly, we do not have remote settings confirmed yet.\n if ((request.upgrade === 'websocket' || request.method === 'CONNECT') && session[kRemoteSettings] === false) return true\n // Request with stream or iterator body can error while other requests\n // are inflight and indirectly error those as well.\n // Ensure this doesn't happen by waiting for inflight\n // to complete before dispatching.\n\n // Request with stream or iterator body cannot be retried.\n // Ensure that no other requests are inflight and\n // could cause failure.\n if (util.bodyLength(request.body) !== 0 &&\n (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) return true\n } else {\n return (request.upgrade === 'websocket' || request.method === 'CONNECT') && session[kRemoteSettings] === false\n }\n }\n\n return false\n }\n }\n}\n\nfunction resumeH2 (client) {\n const socket = client[kSocket]\n\n if (socket?.destroyed === false) {\n if (client[kSize] === 0 || client[kMaxConcurrentStreams] === 0) {\n socket.unref()\n client[kHTTP2Session].unref()\n } else {\n socket.ref()\n client[kHTTP2Session].ref()\n }\n }\n}\n\nfunction applyConnectionWindowSize (connectionWindowSize) {\n try {\n if (typeof this.setLocalWindowSize === 'function') {\n this.setLocalWindowSize(connectionWindowSize)\n }\n } catch {\n // Best-effort only.\n }\n}\n\nfunction onHttp2RemoteSettings (settings) {\n // Fallbacks are a safe bet, remote setting will always override\n this[kClient][kMaxConcurrentStreams] = settings.maxConcurrentStreams ?? this[kClient][kMaxConcurrentStreams]\n /**\n * From RFC-8441\n * A sender MUST NOT send a SETTINGS_ENABLE_CONNECT_PROTOCOL parameter\n * with the value of 0 after previously sending a value of 1.\n */\n // Note: Cannot be tested in Node, it does not supports disabling the extended CONNECT protocol once enabled\n if (this[kRemoteSettings] === true && this[kEnableConnectProtocol] === true && settings.enableConnectProtocol === false) {\n const err = new InformationalError('HTTP/2: Server disabled extended CONNECT protocol against RFC-8441')\n this[kSocket][kError] = err\n this[kClient][kOnError](err)\n return\n }\n\n this[kEnableConnectProtocol] = settings.enableConnectProtocol ?? this[kEnableConnectProtocol]\n this[kRemoteSettings] = true\n this[kClient][kResume]()\n}\n\nfunction onHttp2SendPing (session) {\n const state = session[kHTTP2SessionState]\n if ((session.closed || session.destroyed) && state.ping.interval != null) {\n clearInterval(state.ping.interval)\n state.ping.interval = null\n return\n }\n\n // If no ping sent, do nothing\n session.ping(onPing.bind(session))\n\n function onPing (err, duration) {\n const client = this[kClient]\n const socket = this[kClient]\n\n if (err != null) {\n const error = new InformationalError(`HTTP/2: \"PING\" errored - type ${err.message}`)\n socket[kError] = error\n client[kOnError](error)\n } else {\n client.emit('ping', duration)\n }\n }\n}\n\nfunction onHttp2SessionError (err) {\n assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')\n\n this[kSocket][kError] = err\n this[kClient][kOnError](err)\n}\n\nfunction onHttp2FrameError (type, code, id) {\n if (id === 0) {\n const err = new InformationalError(`HTTP/2: \"frameError\" received - type ${type}, code ${code}`)\n this[kSocket][kError] = err\n this[kClient][kOnError](err)\n }\n}\n\nfunction onHttp2SessionEnd () {\n const err = new SocketError('other side closed', util.getSocketInfo(this[kSocket]))\n this.destroy(err)\n util.destroy(this[kSocket], err)\n}\n\n/**\n * This is the root cause of #3011\n * We need to handle GOAWAY frames properly, and trigger the session close\n * along with the socket right away\n *\n * @this {import('http2').ClientHttp2Session}\n * @param {number} errorCode\n */\nfunction onHttp2SessionGoAway (errorCode) {\n // TODO(mcollina): Verify if GOAWAY implements the spec correctly:\n // https://datatracker.ietf.org/doc/html/rfc7540#section-6.8\n // Specifically, we do not verify the \"valid\" stream id.\n\n const err = this[kError] || new SocketError(`HTTP/2: \"GOAWAY\" frame received with code ${errorCode}`, util.getSocketInfo(this[kSocket]))\n const client = this[kClient]\n\n client[kSocket] = null\n client[kHTTPContext] = null\n\n // this is an HTTP2 session\n this.close()\n this[kHTTP2Session] = null\n\n util.destroy(this[kSocket], err)\n\n // Fail head of pipeline.\n if (client[kRunningIdx] < client[kQueue].length) {\n const request = client[kQueue][client[kRunningIdx]]\n client[kQueue][client[kRunningIdx]++] = null\n util.errorRequest(client, request, err)\n client[kPendingIdx] = client[kRunningIdx]\n }\n\n assert(client[kRunning] === 0)\n\n client.emit('disconnect', client[kUrl], [client], err)\n client.emit('connectionError', client[kUrl], [client], err)\n\n client[kResume]()\n}\n\nfunction onHttp2SessionClose () {\n const { [kClient]: client, [kHTTP2SessionState]: state } = this\n const { [kSocket]: socket } = client\n\n const err = this[kSocket][kError] || this[kError] || new SocketError('closed', util.getSocketInfo(socket))\n\n client[kSocket] = null\n client[kHTTPContext] = null\n\n if (state.ping.interval != null) {\n clearInterval(state.ping.interval)\n state.ping.interval = null\n }\n\n if (client.destroyed) {\n assert(client[kPending] === 0)\n\n // Fail entire queue.\n const requests = client[kQueue].splice(client[kRunningIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n util.errorRequest(client, request, err)\n }\n }\n}\n\nfunction onHttp2SocketClose () {\n const err = this[kError] || new SocketError('closed', util.getSocketInfo(this))\n\n const client = this[kHTTP2Session][kClient]\n\n client[kSocket] = null\n client[kHTTPContext] = null\n\n if (this[kHTTP2Session] !== null) {\n this[kHTTP2Session].destroy(err)\n }\n\n client[kPendingIdx] = client[kRunningIdx]\n\n assert(client[kRunning] === 0)\n\n client.emit('disconnect', client[kUrl], [client], err)\n\n client[kResume]()\n}\n\nfunction onHttp2SocketError (err) {\n assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')\n\n this[kError] = err\n\n this[kClient][kOnError](err)\n}\n\nfunction onHttp2SocketEnd () {\n util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this)))\n}\n\nfunction onSocketClose () {\n this[kClosed] = true\n}\n\n// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2\nfunction shouldSendContentLength (method) {\n return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT'\n}\n\nfunction writeH2 (client, request) {\n const requestTimeout = request.bodyTimeout ?? client[kBodyTimeout]\n const session = client[kHTTP2Session]\n const { method, path, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request\n let { body } = request\n\n if (upgrade != null && upgrade !== 'websocket') {\n util.errorRequest(client, request, new InvalidArgumentError(`Custom upgrade \"${upgrade}\" not supported over HTTP/2`))\n return false\n }\n\n const headers = {}\n for (let n = 0; n < reqHeaders.length; n += 2) {\n const key = reqHeaders[n + 0]\n const val = reqHeaders[n + 1]\n\n if (key === 'cookie') {\n if (headers[key] != null) {\n headers[key] = Array.isArray(headers[key]) ? (headers[key].push(val), headers[key]) : [headers[key], val]\n } else {\n headers[key] = val\n }\n\n continue\n }\n\n if (Array.isArray(val)) {\n for (let i = 0; i < val.length; i++) {\n if (headers[key]) {\n headers[key] += `, ${val[i]}`\n } else {\n headers[key] = val[i]\n }\n }\n } else if (headers[key]) {\n headers[key] += `, ${val}`\n } else {\n headers[key] = val\n }\n }\n\n /** @type {import('node:http2').ClientHttp2Stream} */\n let stream = null\n\n const { hostname, port } = client[kUrl]\n\n headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ''}`\n headers[HTTP2_HEADER_METHOD] = method\n\n const abort = (err) => {\n if (request.aborted || request.completed) {\n return\n }\n\n err = err || new RequestAbortedError()\n\n util.errorRequest(client, request, err)\n\n if (stream != null) {\n // Some chunks might still come after abort,\n // let's ignore them\n stream.removeAllListeners('data')\n\n // On Abort, we close the stream to send RST_STREAM frame\n stream.close()\n\n // We move the running index to the next request\n client[kOnError](err)\n client[kResume]()\n }\n\n // We do not destroy the socket as we can continue using the session\n // the stream gets destroyed and the session remains to create new streams\n util.destroy(body, err)\n }\n\n try {\n // We are already connected, streams are pending.\n // We can call on connect, and wait for abort\n request.onConnect(abort)\n } catch (err) {\n util.errorRequest(client, request, err)\n }\n\n if (request.aborted) {\n return false\n }\n\n if (upgrade || method === 'CONNECT') {\n session.ref()\n\n if (upgrade === 'websocket') {\n // We cannot upgrade to websocket if extended CONNECT protocol is not supported\n if (session[kEnableConnectProtocol] === false) {\n util.errorRequest(client, request, new InformationalError('HTTP/2: Extended CONNECT protocol not supported by server'))\n session.unref()\n return false\n }\n\n // We force the method to CONNECT\n // as per RFC-8441\n // https://datatracker.ietf.org/doc/html/rfc8441#section-4\n headers[HTTP2_HEADER_METHOD] = 'CONNECT'\n headers[HTTP2_HEADER_PROTOCOL] = 'websocket'\n // :path and :scheme headers must be omitted when sending CONNECT but set if extended-CONNECT\n headers[HTTP2_HEADER_PATH] = path\n\n if (protocol === 'ws:' || protocol === 'wss:') {\n headers[HTTP2_HEADER_SCHEME] = protocol === 'ws:' ? 'http' : 'https'\n } else {\n headers[HTTP2_HEADER_SCHEME] = protocol === 'http:' ? 'http' : 'https'\n }\n\n stream = session.request(headers, { endStream: false, signal })\n stream[kHTTP2Stream] = true\n\n stream.once('response', (headers, _flags) => {\n const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers\n\n request.onUpgrade(statusCode, parseH2Headers(realHeaders), stream)\n\n ++session[kOpenStreams]\n client[kQueue][client[kRunningIdx]++] = null\n })\n\n stream.on('error', () => {\n if (stream.rstCode === NGHTTP2_REFUSED_STREAM || stream.rstCode === NGHTTP2_CANCEL) {\n // NGHTTP2_REFUSED_STREAM (7) or NGHTTP2_CANCEL (8)\n // We do not treat those as errors as the server might\n // not support websockets and refuse the stream\n abort(new InformationalError(`HTTP/2: \"stream error\" received - code ${stream.rstCode}`))\n }\n })\n\n stream.once('close', () => {\n session[kOpenStreams] -= 1\n if (session[kOpenStreams] === 0) session.unref()\n })\n\n stream.setTimeout(requestTimeout)\n return true\n }\n\n // TODO: consolidate once we support CONNECT properly\n // NOTE: We are already connected, streams are pending, first request\n // will create a new stream. We trigger a request to create the stream and wait until\n // `ready` event is triggered\n // We disabled endStream to allow the user to write to the stream\n stream = session.request(headers, { endStream: false, signal })\n stream[kHTTP2Stream] = true\n stream.on('response', headers => {\n const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers\n\n request.onUpgrade(statusCode, parseH2Headers(realHeaders), stream)\n ++session[kOpenStreams]\n client[kQueue][client[kRunningIdx]++] = null\n })\n stream.once('close', () => {\n session[kOpenStreams] -= 1\n if (session[kOpenStreams] === 0) session.unref()\n })\n stream.setTimeout(requestTimeout)\n\n return true\n }\n\n // https://tools.ietf.org/html/rfc7540#section-8.3\n // :path and :scheme headers must be omitted when sending CONNECT\n headers[HTTP2_HEADER_PATH] = path\n headers[HTTP2_HEADER_SCHEME] = protocol === 'http:' ? 'http' : 'https'\n\n // https://tools.ietf.org/html/rfc7231#section-4.3.1\n // https://tools.ietf.org/html/rfc7231#section-4.3.2\n // https://tools.ietf.org/html/rfc7231#section-4.3.5\n\n // Sending a payload body on a request that does not\n // expect it can cause undefined behavior on some\n // servers and corrupt connection state. Do not\n // re-use the connection for further requests.\n\n const expectsPayload = (\n method === 'PUT' ||\n method === 'POST' ||\n method === 'PATCH'\n )\n\n if (body && typeof body.read === 'function') {\n // Try to read EOF in order to get length.\n body.read(0)\n }\n\n let contentLength = util.bodyLength(body)\n\n if (util.isFormDataLike(body)) {\n extractBody ??= require('../web/fetch/body.js').extractBody\n\n const [bodyStream, contentType] = extractBody(body)\n headers['content-type'] = contentType\n\n body = bodyStream.stream\n contentLength = bodyStream.length\n }\n\n if (contentLength == null) {\n contentLength = request.contentLength\n }\n\n if (!expectsPayload) {\n // https://tools.ietf.org/html/rfc7230#section-3.3.2\n // A user agent SHOULD NOT send a Content-Length header field when\n // the request message does not contain a payload body and the method\n // semantics do not anticipate such a body.\n // And for methods that don't expect a payload, omit Content-Length.\n contentLength = null\n }\n\n // https://github.com/nodejs/undici/issues/2046\n // A user agent may send a Content-Length header with 0 value, this should be allowed.\n if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) {\n if (client[kStrictContentLength]) {\n util.errorRequest(client, request, new RequestContentLengthMismatchError())\n return false\n }\n\n process.emitWarning(new RequestContentLengthMismatchError())\n }\n\n if (contentLength != null) {\n assert(body || contentLength === 0, 'no body must not have content length')\n headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`\n }\n\n session.ref()\n\n if (channels.sendHeaders.hasSubscribers) {\n let header = ''\n for (const key in headers) {\n header += `${key}: ${headers[key]}\\r\\n`\n }\n channels.sendHeaders.publish({ request, headers: header, socket: session[kSocket] })\n }\n\n // TODO(metcoder95): add support for sending trailers\n const shouldEndStream = method === 'GET' || method === 'HEAD' || body === null\n if (expectContinue) {\n headers[HTTP2_HEADER_EXPECT] = '100-continue'\n stream = session.request(headers, { endStream: shouldEndStream, signal })\n stream[kHTTP2Stream] = true\n\n stream.once('continue', writeBodyH2)\n } else {\n stream = session.request(headers, {\n endStream: shouldEndStream,\n signal\n })\n stream[kHTTP2Stream] = true\n\n writeBodyH2()\n }\n\n // Increment counter as we have new streams open\n ++session[kOpenStreams]\n stream.setTimeout(requestTimeout)\n\n // Track whether we received a response (headers)\n let responseReceived = false\n\n stream.once('response', headers => {\n const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers\n request.onResponseStarted()\n responseReceived = true\n\n // Due to the stream nature, it is possible we face a race condition\n // where the stream has been assigned, but the request has been aborted\n // the request remains in-flight and headers hasn't been received yet\n // for those scenarios, best effort is to destroy the stream immediately\n // as there's no value to keep it open.\n if (request.aborted) {\n stream.removeAllListeners('data')\n return\n }\n\n if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), '') === false) {\n stream.pause()\n }\n\n stream.on('data', (chunk) => {\n if (request.aborted || request.completed) {\n return\n }\n\n if (request.onData(chunk) === false) {\n stream.pause()\n }\n })\n })\n\n stream.once('end', () => {\n stream.removeAllListeners('data')\n // If we received a response, this is a normal completion\n if (responseReceived) {\n if (!request.aborted && !request.completed) {\n request.onComplete({})\n }\n\n client[kQueue][client[kRunningIdx]++] = null\n client[kResume]()\n } else {\n // Stream ended without receiving a response - this is an error\n // (e.g., server destroyed the stream before sending headers)\n abort(new InformationalError('HTTP/2: stream half-closed (remote)'))\n client[kQueue][client[kRunningIdx]++] = null\n client[kPendingIdx] = client[kRunningIdx]\n client[kResume]()\n }\n })\n\n stream.once('close', () => {\n stream.removeAllListeners('data')\n session[kOpenStreams] -= 1\n if (session[kOpenStreams] === 0) {\n session.unref()\n }\n })\n\n stream.once('error', function (err) {\n stream.removeAllListeners('data')\n abort(err)\n })\n\n stream.once('frameError', (type, code) => {\n stream.removeAllListeners('data')\n abort(new InformationalError(`HTTP/2: \"frameError\" received - type ${type}, code ${code}`))\n })\n\n stream.on('aborted', () => {\n stream.removeAllListeners('data')\n })\n\n stream.on('timeout', () => {\n const err = new InformationalError(`HTTP/2: \"stream timeout after ${requestTimeout}\"`)\n stream.removeAllListeners('data')\n session[kOpenStreams] -= 1\n\n if (session[kOpenStreams] === 0) {\n session.unref()\n }\n\n abort(err)\n })\n\n stream.once('trailers', trailers => {\n if (request.aborted || request.completed) {\n return\n }\n\n stream.removeAllListeners('data')\n request.onComplete(trailers)\n })\n\n return true\n\n function writeBodyH2 () {\n if (!body || contentLength === 0) {\n writeBuffer(\n abort,\n stream,\n null,\n client,\n request,\n client[kSocket],\n contentLength,\n expectsPayload\n )\n } else if (util.isBuffer(body)) {\n writeBuffer(\n abort,\n stream,\n body,\n client,\n request,\n client[kSocket],\n contentLength,\n expectsPayload\n )\n } else if (util.isBlobLike(body)) {\n if (typeof body.stream === 'function') {\n writeIterable(\n abort,\n stream,\n body.stream(),\n client,\n request,\n client[kSocket],\n contentLength,\n expectsPayload\n )\n } else {\n writeBlob(\n abort,\n stream,\n body,\n client,\n request,\n client[kSocket],\n contentLength,\n expectsPayload\n )\n }\n } else if (util.isStream(body)) {\n writeStream(\n abort,\n client[kSocket],\n expectsPayload,\n stream,\n body,\n client,\n request,\n contentLength\n )\n } else if (util.isIterable(body)) {\n writeIterable(\n abort,\n stream,\n body,\n client,\n request,\n client[kSocket],\n contentLength,\n expectsPayload\n )\n } else {\n assert(false)\n }\n }\n}\n\nfunction writeBuffer (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) {\n try {\n if (body != null && util.isBuffer(body)) {\n assert(contentLength === body.byteLength, 'buffer body must have content length')\n h2stream.cork()\n h2stream.write(body)\n h2stream.uncork()\n h2stream.end()\n\n request.onBodySent(body)\n }\n\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n request.onRequestSent()\n client[kResume]()\n } catch (error) {\n abort(error)\n }\n}\n\nfunction writeStream (abort, socket, expectsPayload, h2stream, body, client, request, contentLength) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined')\n\n // For HTTP/2, is enough to pipe the stream\n const pipe = pipeline(\n body,\n h2stream,\n (err) => {\n if (err) {\n util.destroy(pipe, err)\n abort(err)\n } else {\n util.removeAllListeners(pipe)\n request.onRequestSent()\n\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n client[kResume]()\n }\n }\n )\n\n util.addListener(pipe, 'data', onPipeData)\n\n function onPipeData (chunk) {\n request.onBodySent(chunk)\n }\n}\n\nasync function writeBlob (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) {\n assert(contentLength === body.size, 'blob body must have content length')\n\n try {\n if (contentLength != null && contentLength !== body.size) {\n throw new RequestContentLengthMismatchError()\n }\n\n const buffer = Buffer.from(await body.arrayBuffer())\n\n h2stream.cork()\n h2stream.write(buffer)\n h2stream.uncork()\n h2stream.end()\n\n request.onBodySent(buffer)\n request.onRequestSent()\n\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n client[kResume]()\n } catch (err) {\n abort(err)\n }\n}\n\nasync function writeIterable (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) {\n assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined')\n\n let callback = null\n function onDrain () {\n if (callback) {\n const cb = callback\n callback = null\n cb()\n }\n }\n\n const waitForDrain = () => new Promise((resolve, reject) => {\n assert(callback === null)\n\n if (socket[kError]) {\n reject(socket[kError])\n } else {\n callback = resolve\n }\n })\n\n h2stream\n .on('close', onDrain)\n .on('drain', onDrain)\n\n try {\n // It's up to the user to somehow abort the async iterable.\n for await (const chunk of body) {\n if (socket[kError]) {\n throw socket[kError]\n }\n\n const res = h2stream.write(chunk)\n request.onBodySent(chunk)\n if (!res) {\n await waitForDrain()\n }\n }\n\n h2stream.end()\n\n request.onRequestSent()\n\n if (!expectsPayload) {\n socket[kReset] = true\n }\n\n client[kResume]()\n } catch (err) {\n abort(err)\n } finally {\n h2stream\n .off('close', onDrain)\n .off('drain', onDrain)\n }\n}\n\nmodule.exports = connectH2\n", "'use strict'\n\nconst assert = require('node:assert')\nconst net = require('node:net')\nconst http = require('node:http')\nconst util = require('../core/util.js')\nconst { ClientStats } = require('../util/stats.js')\nconst { channels } = require('../core/diagnostics.js')\nconst Request = require('../core/request.js')\nconst DispatcherBase = require('./dispatcher-base')\nconst {\n InvalidArgumentError,\n InformationalError,\n ClientDestroyedError\n} = require('../core/errors.js')\nconst buildConnector = require('../core/connect.js')\nconst {\n kUrl,\n kServerName,\n kClient,\n kBusy,\n kConnect,\n kResuming,\n kRunning,\n kPending,\n kSize,\n kQueue,\n kConnected,\n kConnecting,\n kNeedDrain,\n kKeepAliveDefaultTimeout,\n kHostHeader,\n kPendingIdx,\n kRunningIdx,\n kError,\n kPipelining,\n kKeepAliveTimeoutValue,\n kMaxHeadersSize,\n kKeepAliveMaxTimeout,\n kKeepAliveTimeoutThreshold,\n kHeadersTimeout,\n kBodyTimeout,\n kStrictContentLength,\n kConnector,\n kMaxRequests,\n kCounter,\n kClose,\n kDestroy,\n kDispatch,\n kLocalAddress,\n kMaxResponseSize,\n kOnError,\n kHTTPContext,\n kMaxConcurrentStreams,\n kHTTP2InitialWindowSize,\n kHTTP2ConnectionWindowSize,\n kResume,\n kPingInterval\n} = require('../core/symbols.js')\nconst connectH1 = require('./client-h1.js')\nconst connectH2 = require('./client-h2.js')\n\nconst kClosedResolve = Symbol('kClosedResolve')\n\nconst getDefaultNodeMaxHeaderSize = http &&\n http.maxHeaderSize &&\n Number.isInteger(http.maxHeaderSize) &&\n http.maxHeaderSize > 0\n ? () => http.maxHeaderSize\n : () => { throw new InvalidArgumentError('http module not available or http.maxHeaderSize invalid') }\n\nconst noop = () => { }\n\nfunction getPipelining (client) {\n return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1\n}\n\n/**\n * @type {import('../../types/client.js').default}\n */\nclass Client extends DispatcherBase {\n /**\n *\n * @param {string|URL} url\n * @param {import('../../types/client.js').Client.Options} options\n */\n constructor (url, {\n maxHeaderSize,\n headersTimeout,\n socketTimeout,\n requestTimeout,\n connectTimeout,\n bodyTimeout,\n idleTimeout,\n keepAlive,\n keepAliveTimeout,\n maxKeepAliveTimeout,\n keepAliveMaxTimeout,\n keepAliveTimeoutThreshold,\n socketPath,\n pipelining,\n tls,\n strictContentLength,\n maxCachedSessions,\n connect,\n maxRequestsPerClient,\n localAddress,\n maxResponseSize,\n autoSelectFamily,\n autoSelectFamilyAttemptTimeout,\n // h2\n maxConcurrentStreams,\n allowH2,\n useH2c,\n initialWindowSize,\n connectionWindowSize,\n pingInterval\n } = {}) {\n if (keepAlive !== undefined) {\n throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')\n }\n\n if (socketTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead')\n }\n\n if (requestTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead')\n }\n\n if (idleTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead')\n }\n\n if (maxKeepAliveTimeout !== undefined) {\n throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead')\n }\n\n if (maxHeaderSize != null) {\n if (!Number.isInteger(maxHeaderSize) || maxHeaderSize < 1) {\n throw new InvalidArgumentError('invalid maxHeaderSize')\n }\n } else {\n // If maxHeaderSize is not provided, use the default value from the http module\n // or if that is not available, throw an error.\n maxHeaderSize = getDefaultNodeMaxHeaderSize()\n }\n\n if (socketPath != null && typeof socketPath !== 'string') {\n throw new InvalidArgumentError('invalid socketPath')\n }\n\n if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) {\n throw new InvalidArgumentError('invalid connectTimeout')\n }\n\n if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) {\n throw new InvalidArgumentError('invalid keepAliveTimeout')\n }\n\n if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) {\n throw new InvalidArgumentError('invalid keepAliveMaxTimeout')\n }\n\n if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) {\n throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold')\n }\n\n if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) {\n throw new InvalidArgumentError('headersTimeout must be a positive integer or zero')\n }\n\n if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) {\n throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) {\n throw new InvalidArgumentError('maxRequestsPerClient must be a positive number')\n }\n\n if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) {\n throw new InvalidArgumentError('localAddress must be valid string IP address')\n }\n\n if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) {\n throw new InvalidArgumentError('maxResponseSize must be a positive number')\n }\n\n if (\n autoSelectFamilyAttemptTimeout != null &&\n (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)\n ) {\n throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number')\n }\n\n // h2\n if (allowH2 != null && typeof allowH2 !== 'boolean') {\n throw new InvalidArgumentError('allowH2 must be a valid boolean value')\n }\n\n if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) {\n throw new InvalidArgumentError('maxConcurrentStreams must be a positive integer, greater than 0')\n }\n\n if (useH2c != null && typeof useH2c !== 'boolean') {\n throw new InvalidArgumentError('useH2c must be a valid boolean value')\n }\n\n if (initialWindowSize != null && (!Number.isInteger(initialWindowSize) || initialWindowSize < 1)) {\n throw new InvalidArgumentError('initialWindowSize must be a positive integer, greater than 0')\n }\n\n if (connectionWindowSize != null && (!Number.isInteger(connectionWindowSize) || connectionWindowSize < 1)) {\n throw new InvalidArgumentError('connectionWindowSize must be a positive integer, greater than 0')\n }\n\n if (pingInterval != null && (typeof pingInterval !== 'number' || !Number.isInteger(pingInterval) || pingInterval < 0)) {\n throw new InvalidArgumentError('pingInterval must be a positive integer, greater or equal to 0')\n }\n\n super()\n\n if (typeof connect !== 'function') {\n connect = buildConnector({\n ...tls,\n maxCachedSessions,\n allowH2,\n useH2c,\n socketPath,\n timeout: connectTimeout,\n ...(typeof autoSelectFamily === 'boolean' ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),\n ...connect\n })\n } else if (socketPath != null) {\n const customConnect = connect\n connect = (opts, callback) => customConnect({ ...opts, socketPath }, callback)\n }\n\n this[kUrl] = util.parseOrigin(url)\n this[kConnector] = connect\n this[kPipelining] = pipelining != null ? pipelining : 1\n this[kMaxHeadersSize] = maxHeaderSize\n this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout\n this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout\n this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold\n this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]\n this[kServerName] = null\n this[kLocalAddress] = localAddress != null ? localAddress : null\n this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming\n this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming\n this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\\r\\n`\n this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3\n this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3\n this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength\n this[kMaxRequests] = maxRequestsPerClient\n this[kClosedResolve] = null\n this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1\n this[kHTTPContext] = null\n // h2\n this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server\n // HTTP/2 window sizes are set to higher defaults than Node.js core for better performance:\n // - initialWindowSize: 262144 (256KB) vs Node.js default 65535 (64KB - 1)\n // Allows more data to be sent before requiring acknowledgment, improving throughput\n // especially on high-latency networks. This matches common production HTTP/2 servers.\n // - connectionWindowSize: 524288 (512KB) vs Node.js default (none set)\n // Provides better flow control for the entire connection across multiple streams.\n this[kHTTP2InitialWindowSize] = initialWindowSize != null ? initialWindowSize : 262144\n this[kHTTP2ConnectionWindowSize] = connectionWindowSize != null ? connectionWindowSize : 524288\n this[kPingInterval] = pingInterval != null ? pingInterval : 60e3 // Default ping interval for h2 - 1 minute\n\n // kQueue is built up of 3 sections separated by\n // the kRunningIdx and kPendingIdx indices.\n // | complete | running | pending |\n // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length\n // kRunningIdx points to the first running element.\n // kPendingIdx points to the first pending element.\n // This implements a fast queue with an amortized\n // time of O(1).\n\n this[kQueue] = []\n this[kRunningIdx] = 0\n this[kPendingIdx] = 0\n\n this[kResume] = (sync) => resume(this, sync)\n this[kOnError] = (err) => onError(this, err)\n }\n\n get pipelining () {\n return this[kPipelining]\n }\n\n set pipelining (value) {\n this[kPipelining] = value\n this[kResume](true)\n }\n\n get stats () {\n return new ClientStats(this)\n }\n\n get [kPending] () {\n return this[kQueue].length - this[kPendingIdx]\n }\n\n get [kRunning] () {\n return this[kPendingIdx] - this[kRunningIdx]\n }\n\n get [kSize] () {\n return this[kQueue].length - this[kRunningIdx]\n }\n\n get [kConnected] () {\n return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed\n }\n\n get [kBusy] () {\n return Boolean(\n this[kHTTPContext]?.busy(null) ||\n (this[kSize] >= (getPipelining(this) || 1)) ||\n this[kPending] > 0\n )\n }\n\n [kConnect] (cb) {\n connect(this)\n this.once('connect', cb)\n }\n\n [kDispatch] (opts, handler) {\n const request = new Request(this[kUrl].origin, opts, handler)\n\n this[kQueue].push(request)\n if (this[kResuming]) {\n // Do nothing.\n } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) {\n // Wait a tick in case stream/iterator is ended in the same tick.\n this[kResuming] = 1\n queueMicrotask(() => resume(this))\n } else {\n this[kResume](true)\n }\n\n if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) {\n this[kNeedDrain] = 2\n }\n\n return this[kNeedDrain] < 2\n }\n\n [kClose] () {\n // TODO: for H2 we need to gracefully flush the remaining enqueued\n // request and close each stream.\n return new Promise((resolve) => {\n if (this[kSize]) {\n this[kClosedResolve] = resolve\n } else {\n resolve(null)\n }\n })\n }\n\n [kDestroy] (err) {\n return new Promise((resolve) => {\n const requests = this[kQueue].splice(this[kPendingIdx])\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n util.errorRequest(this, request, err)\n }\n\n const callback = () => {\n if (this[kClosedResolve]) {\n // TODO (fix): Should we error here with ClientDestroyedError?\n this[kClosedResolve]()\n this[kClosedResolve] = null\n }\n resolve(null)\n }\n\n if (this[kHTTPContext]) {\n this[kHTTPContext].destroy(err, callback)\n this[kHTTPContext] = null\n } else {\n queueMicrotask(callback)\n }\n\n this[kResume]()\n })\n }\n}\n\nfunction onError (client, err) {\n if (\n client[kRunning] === 0 &&\n err.code !== 'UND_ERR_INFO' &&\n err.code !== 'UND_ERR_SOCKET'\n ) {\n // Error is not caused by running request and not a recoverable\n // socket error.\n\n assert(client[kPendingIdx] === client[kRunningIdx])\n\n const requests = client[kQueue].splice(client[kRunningIdx])\n\n for (let i = 0; i < requests.length; i++) {\n const request = requests[i]\n util.errorRequest(client, request, err)\n }\n assert(client[kSize] === 0)\n }\n}\n\n/**\n * @param {Client} client\n * @returns {void}\n */\nfunction connect (client) {\n assert(!client[kConnecting])\n assert(!client[kHTTPContext])\n\n let { host, hostname, protocol, port } = client[kUrl]\n\n // Resolve ipv6\n if (hostname[0] === '[') {\n const idx = hostname.indexOf(']')\n\n assert(idx !== -1)\n const ip = hostname.substring(1, idx)\n\n assert(net.isIPv6(ip))\n hostname = ip\n }\n\n client[kConnecting] = true\n\n if (channels.beforeConnect.hasSubscribers) {\n channels.beforeConnect.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n version: client[kHTTPContext]?.version,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector]\n })\n }\n\n try {\n client[kConnector]({\n host,\n hostname,\n protocol,\n port,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n }, (err, socket) => {\n if (err) {\n handleConnectError(client, err, { host, hostname, protocol, port })\n client[kResume]()\n return\n }\n\n if (client.destroyed) {\n util.destroy(socket.on('error', noop), new ClientDestroyedError())\n client[kResume]()\n return\n }\n\n assert(socket)\n\n try {\n client[kHTTPContext] = socket.alpnProtocol === 'h2'\n ? connectH2(client, socket)\n : connectH1(client, socket)\n } catch (err) {\n socket.destroy().on('error', noop)\n handleConnectError(client, err, { host, hostname, protocol, port })\n client[kResume]()\n return\n }\n\n client[kConnecting] = false\n\n socket[kCounter] = 0\n socket[kMaxRequests] = client[kMaxRequests]\n socket[kClient] = client\n socket[kError] = null\n\n if (channels.connected.hasSubscribers) {\n channels.connected.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n version: client[kHTTPContext]?.version,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector],\n socket\n })\n }\n\n client.emit('connect', client[kUrl], [client])\n client[kResume]()\n })\n } catch (err) {\n handleConnectError(client, err, { host, hostname, protocol, port })\n client[kResume]()\n }\n}\n\nfunction handleConnectError (client, err, { host, hostname, protocol, port }) {\n if (client.destroyed) {\n return\n }\n\n client[kConnecting] = false\n\n if (channels.connectError.hasSubscribers) {\n channels.connectError.publish({\n connectParams: {\n host,\n hostname,\n protocol,\n port,\n version: client[kHTTPContext]?.version,\n servername: client[kServerName],\n localAddress: client[kLocalAddress]\n },\n connector: client[kConnector],\n error: err\n })\n }\n\n if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {\n assert(client[kRunning] === 0)\n while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {\n const request = client[kQueue][client[kPendingIdx]++]\n util.errorRequest(client, request, err)\n }\n } else {\n onError(client, err)\n }\n\n client.emit('connectionError', client[kUrl], [client], err)\n}\n\nfunction emitDrain (client) {\n client[kNeedDrain] = 0\n client.emit('drain', client[kUrl], [client])\n}\n\nfunction resume (client, sync) {\n if (client[kResuming] === 2) {\n return\n }\n\n client[kResuming] = 2\n\n _resume(client, sync)\n client[kResuming] = 0\n\n if (client[kRunningIdx] > 256) {\n client[kQueue].splice(0, client[kRunningIdx])\n client[kPendingIdx] -= client[kRunningIdx]\n client[kRunningIdx] = 0\n }\n}\n\nfunction _resume (client, sync) {\n while (true) {\n if (client.destroyed) {\n assert(client[kPending] === 0)\n return\n }\n\n if (client[kClosedResolve] && !client[kSize]) {\n client[kClosedResolve]()\n client[kClosedResolve] = null\n return\n }\n\n if (client[kHTTPContext]) {\n client[kHTTPContext].resume()\n }\n\n if (client[kBusy]) {\n client[kNeedDrain] = 2\n } else if (client[kNeedDrain] === 2) {\n if (sync) {\n client[kNeedDrain] = 1\n queueMicrotask(() => emitDrain(client))\n } else {\n emitDrain(client)\n }\n continue\n }\n\n if (client[kPending] === 0) {\n return\n }\n\n if (client[kRunning] >= (getPipelining(client) || 1)) {\n return\n }\n\n const request = client[kQueue][client[kPendingIdx]]\n\n if (request === null) {\n return\n }\n\n if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) {\n if (client[kRunning] > 0) {\n return\n }\n\n client[kServerName] = request.servername\n client[kHTTPContext]?.destroy(new InformationalError('servername changed'), () => {\n client[kHTTPContext] = null\n resume(client)\n })\n }\n\n if (client[kConnecting]) {\n return\n }\n\n if (!client[kHTTPContext]) {\n connect(client)\n return\n }\n\n if (client[kHTTPContext].destroyed) {\n return\n }\n\n if (client[kHTTPContext].busy(request)) {\n return\n }\n\n if (!request.aborted && client[kHTTPContext].write(request)) {\n client[kPendingIdx]++\n } else {\n client[kQueue].splice(client[kPendingIdx], 1)\n }\n }\n}\n\nmodule.exports = Client\n", "'use strict'\n\n// Extracted from node/lib/internal/fixed_queue.js\n\n// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two.\nconst kSize = 2048\nconst kMask = kSize - 1\n\n// The FixedQueue is implemented as a singly-linked list of fixed-size\n// circular buffers. It looks something like this:\n//\n// head tail\n// | |\n// v v\n// +-----------+ <-----\\ +-----------+ <------\\ +-----------+\n// | [null] | \\----- | next | \\------- | next |\n// +-----------+ +-----------+ +-----------+\n// | item | <-- bottom | item | <-- bottom | undefined |\n// | item | | item | | undefined |\n// | item | | item | | undefined |\n// | item | | item | | undefined |\n// | item | | item | bottom --> | item |\n// | item | | item | | item |\n// | ... | | ... | | ... |\n// | item | | item | | item |\n// | item | | item | | item |\n// | undefined | <-- top | item | | item |\n// | undefined | | item | | item |\n// | undefined | | undefined | <-- top top --> | undefined |\n// +-----------+ +-----------+ +-----------+\n//\n// Or, if there is only one circular buffer, it looks something\n// like either of these:\n//\n// head tail head tail\n// | | | |\n// v v v v\n// +-----------+ +-----------+\n// | [null] | | [null] |\n// +-----------+ +-----------+\n// | undefined | | item |\n// | undefined | | item |\n// | item | <-- bottom top --> | undefined |\n// | item | | undefined |\n// | undefined | <-- top bottom --> | item |\n// | undefined | | item |\n// +-----------+ +-----------+\n//\n// Adding a value means moving `top` forward by one, removing means\n// moving `bottom` forward by one. After reaching the end, the queue\n// wraps around.\n//\n// When `top === bottom` the current queue is empty and when\n// `top + 1 === bottom` it's full. This wastes a single space of storage\n// but allows much quicker checks.\n\n/**\n * @type {FixedCircularBuffer}\n * @template T\n */\nclass FixedCircularBuffer {\n /** @type {number} */\n bottom = 0\n /** @type {number} */\n top = 0\n /** @type {Array} */\n list = new Array(kSize).fill(undefined)\n /** @type {T|null} */\n next = null\n\n /** @returns {boolean} */\n isEmpty () {\n return this.top === this.bottom\n }\n\n /** @returns {boolean} */\n isFull () {\n return ((this.top + 1) & kMask) === this.bottom\n }\n\n /**\n * @param {T} data\n * @returns {void}\n */\n push (data) {\n this.list[this.top] = data\n this.top = (this.top + 1) & kMask\n }\n\n /** @returns {T|null} */\n shift () {\n const nextItem = this.list[this.bottom]\n if (nextItem === undefined) { return null }\n this.list[this.bottom] = undefined\n this.bottom = (this.bottom + 1) & kMask\n return nextItem\n }\n}\n\n/**\n * @template T\n */\nmodule.exports = class FixedQueue {\n constructor () {\n /** @type {FixedCircularBuffer} */\n this.head = this.tail = new FixedCircularBuffer()\n }\n\n /** @returns {boolean} */\n isEmpty () {\n return this.head.isEmpty()\n }\n\n /** @param {T} data */\n push (data) {\n if (this.head.isFull()) {\n // Head is full: Creates a new queue, sets the old queue's `.next` to it,\n // and sets it as the new main queue.\n this.head = this.head.next = new FixedCircularBuffer()\n }\n this.head.push(data)\n }\n\n /** @returns {T|null} */\n shift () {\n const tail = this.tail\n const next = tail.shift()\n if (tail.isEmpty() && tail.next !== null) {\n // If there is another queue, it forms the new tail.\n this.tail = tail.next\n tail.next = null\n }\n return next\n }\n}\n", "'use strict'\n\nconst { PoolStats } = require('../util/stats.js')\nconst DispatcherBase = require('./dispatcher-base')\nconst FixedQueue = require('./fixed-queue')\nconst { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require('../core/symbols')\n\nconst kClients = Symbol('clients')\nconst kNeedDrain = Symbol('needDrain')\nconst kQueue = Symbol('queue')\nconst kClosedResolve = Symbol('closed resolve')\nconst kOnDrain = Symbol('onDrain')\nconst kOnConnect = Symbol('onConnect')\nconst kOnDisconnect = Symbol('onDisconnect')\nconst kOnConnectionError = Symbol('onConnectionError')\nconst kGetDispatcher = Symbol('get dispatcher')\nconst kAddClient = Symbol('add client')\nconst kRemoveClient = Symbol('remove client')\n\nclass PoolBase extends DispatcherBase {\n [kQueue] = new FixedQueue();\n\n [kQueued] = 0;\n\n [kClients] = [];\n\n [kNeedDrain] = false;\n\n [kOnDrain] (client, origin, targets) {\n const queue = this[kQueue]\n\n let needDrain = false\n\n while (!needDrain) {\n const item = queue.shift()\n if (!item) {\n break\n }\n this[kQueued]--\n needDrain = !client.dispatch(item.opts, item.handler)\n }\n\n client[kNeedDrain] = needDrain\n\n if (!needDrain && this[kNeedDrain]) {\n this[kNeedDrain] = false\n this.emit('drain', origin, [this, ...targets])\n }\n\n if (this[kClosedResolve] && queue.isEmpty()) {\n const closeAll = []\n for (let i = 0; i < this[kClients].length; i++) {\n const client = this[kClients][i]\n if (!client.destroyed) {\n closeAll.push(client.close())\n }\n }\n return Promise.all(closeAll)\n .then(this[kClosedResolve])\n }\n }\n\n [kOnConnect] = (origin, targets) => {\n this.emit('connect', origin, [this, ...targets])\n };\n\n [kOnDisconnect] = (origin, targets, err) => {\n this.emit('disconnect', origin, [this, ...targets], err)\n };\n\n [kOnConnectionError] = (origin, targets, err) => {\n this.emit('connectionError', origin, [this, ...targets], err)\n }\n\n get [kBusy] () {\n return this[kNeedDrain]\n }\n\n get [kConnected] () {\n let ret = 0\n for (const { [kConnected]: connected } of this[kClients]) {\n ret += connected\n }\n return ret\n }\n\n get [kFree] () {\n let ret = 0\n for (const { [kConnected]: connected, [kNeedDrain]: needDrain } of this[kClients]) {\n ret += connected && !needDrain\n }\n return ret\n }\n\n get [kPending] () {\n let ret = this[kQueued]\n for (const { [kPending]: pending } of this[kClients]) {\n ret += pending\n }\n return ret\n }\n\n get [kRunning] () {\n let ret = 0\n for (const { [kRunning]: running } of this[kClients]) {\n ret += running\n }\n return ret\n }\n\n get [kSize] () {\n let ret = this[kQueued]\n for (const { [kSize]: size } of this[kClients]) {\n ret += size\n }\n return ret\n }\n\n get stats () {\n return new PoolStats(this)\n }\n\n [kClose] () {\n if (this[kQueue].isEmpty()) {\n const closeAll = []\n for (let i = 0; i < this[kClients].length; i++) {\n const client = this[kClients][i]\n if (!client.destroyed) {\n closeAll.push(client.close())\n }\n }\n return Promise.all(closeAll)\n } else {\n return new Promise((resolve) => {\n this[kClosedResolve] = resolve\n })\n }\n }\n\n [kDestroy] (err) {\n while (true) {\n const item = this[kQueue].shift()\n if (!item) {\n break\n }\n item.handler.onError(err)\n }\n\n const destroyAll = new Array(this[kClients].length)\n for (let i = 0; i < this[kClients].length; i++) {\n destroyAll[i] = this[kClients][i].destroy(err)\n }\n return Promise.all(destroyAll)\n }\n\n [kDispatch] (opts, handler) {\n const dispatcher = this[kGetDispatcher]()\n\n if (!dispatcher) {\n this[kNeedDrain] = true\n this[kQueue].push({ opts, handler })\n this[kQueued]++\n } else if (!dispatcher.dispatch(opts, handler)) {\n dispatcher[kNeedDrain] = true\n this[kNeedDrain] = !this[kGetDispatcher]()\n }\n\n return !this[kNeedDrain]\n }\n\n [kAddClient] (client) {\n client\n .on('drain', this[kOnDrain].bind(this, client))\n .on('connect', this[kOnConnect])\n .on('disconnect', this[kOnDisconnect])\n .on('connectionError', this[kOnConnectionError])\n\n this[kClients].push(client)\n\n if (this[kNeedDrain]) {\n queueMicrotask(() => {\n if (this[kNeedDrain]) {\n this[kOnDrain](client, client[kUrl], [client, this])\n }\n })\n }\n\n return this\n }\n\n [kRemoveClient] (client) {\n client.close(() => {\n const idx = this[kClients].indexOf(client)\n if (idx !== -1) {\n this[kClients].splice(idx, 1)\n }\n })\n\n this[kNeedDrain] = this[kClients].some(dispatcher => (\n !dispatcher[kNeedDrain] &&\n dispatcher.closed !== true &&\n dispatcher.destroyed !== true\n ))\n }\n}\n\nmodule.exports = {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kRemoveClient,\n kGetDispatcher\n}\n", "'use strict'\n\nconst {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kGetDispatcher,\n kRemoveClient\n} = require('./pool-base')\nconst Client = require('./client')\nconst {\n InvalidArgumentError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { kUrl } = require('../core/symbols')\nconst buildConnector = require('../core/connect')\n\nconst kOptions = Symbol('options')\nconst kConnections = Symbol('connections')\nconst kFactory = Symbol('factory')\n\nfunction defaultFactory (origin, opts) {\n return new Client(origin, opts)\n}\n\nclass Pool extends PoolBase {\n constructor (origin, {\n connections,\n factory = defaultFactory,\n connect,\n connectTimeout,\n tls,\n maxCachedSessions,\n socketPath,\n autoSelectFamily,\n autoSelectFamilyAttemptTimeout,\n allowH2,\n clientTtl,\n ...options\n } = {}) {\n if (connections != null && (!Number.isFinite(connections) || connections < 0)) {\n throw new InvalidArgumentError('invalid connections')\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (typeof connect !== 'function') {\n connect = buildConnector({\n ...tls,\n maxCachedSessions,\n allowH2,\n socketPath,\n timeout: connectTimeout,\n ...(typeof autoSelectFamily === 'boolean' ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),\n ...connect\n })\n }\n\n super()\n\n this[kConnections] = connections || null\n this[kUrl] = util.parseOrigin(origin)\n this[kOptions] = { ...util.deepClone(options), connect, allowH2, clientTtl, socketPath }\n this[kOptions].interceptors = options.interceptors\n ? { ...options.interceptors }\n : undefined\n this[kFactory] = factory\n\n this.on('connect', (origin, targets) => {\n if (clientTtl != null && clientTtl > 0) {\n for (const target of targets) {\n Object.assign(target, { ttl: Date.now() })\n }\n }\n })\n\n this.on('connectionError', (origin, targets, error) => {\n // If a connection error occurs, we remove the client from the pool,\n // and emit a connectionError event. They will not be re-used.\n // Fixes https://github.com/nodejs/undici/issues/3895\n for (const target of targets) {\n // Do not use kRemoveClient here, as it will close the client,\n // but the client cannot be closed in this state.\n const idx = this[kClients].indexOf(target)\n if (idx !== -1) {\n this[kClients].splice(idx, 1)\n }\n }\n })\n }\n\n [kGetDispatcher] () {\n const clientTtlOption = this[kOptions].clientTtl\n for (const client of this[kClients]) {\n // check ttl of client and if it's stale, remove it from the pool\n if (clientTtlOption != null && clientTtlOption > 0 && client.ttl && ((Date.now() - client.ttl) > clientTtlOption)) {\n this[kRemoveClient](client)\n } else if (!client[kNeedDrain]) {\n return client\n }\n }\n\n if (!this[kConnections] || this[kClients].length < this[kConnections]) {\n const dispatcher = this[kFactory](this[kUrl], this[kOptions])\n this[kAddClient](dispatcher)\n return dispatcher\n }\n }\n}\n\nmodule.exports = Pool\n", "'use strict'\n\nconst {\n BalancedPoolMissingUpstreamError,\n InvalidArgumentError\n} = require('../core/errors')\nconst {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kRemoveClient,\n kGetDispatcher\n} = require('./pool-base')\nconst Pool = require('./pool')\nconst { kUrl } = require('../core/symbols')\nconst util = require('../core/util')\nconst kFactory = Symbol('factory')\n\nconst kOptions = Symbol('options')\nconst kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor')\nconst kCurrentWeight = Symbol('kCurrentWeight')\nconst kIndex = Symbol('kIndex')\nconst kWeight = Symbol('kWeight')\nconst kMaxWeightPerServer = Symbol('kMaxWeightPerServer')\nconst kErrorPenalty = Symbol('kErrorPenalty')\n\n/**\n * Calculate the greatest common divisor of two numbers by\n * using the Euclidean algorithm.\n *\n * @param {number} a\n * @param {number} b\n * @returns {number}\n */\nfunction getGreatestCommonDivisor (a, b) {\n if (a === 0) return b\n\n while (b !== 0) {\n const t = b\n b = a % b\n a = t\n }\n return a\n}\n\nfunction defaultFactory (origin, opts) {\n return new Pool(origin, opts)\n}\n\nclass BalancedPool extends PoolBase {\n constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) {\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n super()\n\n this[kOptions] = { ...util.deepClone(opts) }\n this[kOptions].interceptors = opts.interceptors\n ? { ...opts.interceptors }\n : undefined\n this[kIndex] = -1\n this[kCurrentWeight] = 0\n\n this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100\n this[kErrorPenalty] = this[kOptions].errorPenalty || 15\n\n if (!Array.isArray(upstreams)) {\n upstreams = [upstreams]\n }\n\n this[kFactory] = factory\n\n for (const upstream of upstreams) {\n this.addUpstream(upstream)\n }\n this._updateBalancedPoolStats()\n }\n\n addUpstream (upstream) {\n const upstreamOrigin = util.parseOrigin(upstream).origin\n\n if (this[kClients].find((pool) => (\n pool[kUrl].origin === upstreamOrigin &&\n pool.closed !== true &&\n pool.destroyed !== true\n ))) {\n return this\n }\n const pool = this[kFactory](upstreamOrigin, this[kOptions])\n\n this[kAddClient](pool)\n pool.on('connect', () => {\n pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty])\n })\n\n pool.on('connectionError', () => {\n pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty])\n this._updateBalancedPoolStats()\n })\n\n pool.on('disconnect', (...args) => {\n const err = args[2]\n if (err && err.code === 'UND_ERR_SOCKET') {\n // decrease the weight of the pool.\n pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty])\n this._updateBalancedPoolStats()\n }\n })\n\n for (const client of this[kClients]) {\n client[kWeight] = this[kMaxWeightPerServer]\n }\n\n this._updateBalancedPoolStats()\n\n return this\n }\n\n _updateBalancedPoolStats () {\n let result = 0\n for (let i = 0; i < this[kClients].length; i++) {\n result = getGreatestCommonDivisor(this[kClients][i][kWeight], result)\n }\n\n this[kGreatestCommonDivisor] = result\n }\n\n removeUpstream (upstream) {\n const upstreamOrigin = util.parseOrigin(upstream).origin\n\n const pool = this[kClients].find((pool) => (\n pool[kUrl].origin === upstreamOrigin &&\n pool.closed !== true &&\n pool.destroyed !== true\n ))\n\n if (pool) {\n this[kRemoveClient](pool)\n }\n\n return this\n }\n\n getUpstream (upstream) {\n const upstreamOrigin = util.parseOrigin(upstream).origin\n\n return this[kClients].find((pool) => (\n pool[kUrl].origin === upstreamOrigin &&\n pool.closed !== true &&\n pool.destroyed !== true\n ))\n }\n\n get upstreams () {\n return this[kClients]\n .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true)\n .map((p) => p[kUrl].origin)\n }\n\n [kGetDispatcher] () {\n // We validate that pools is greater than 0,\n // otherwise we would have to wait until an upstream\n // is added, which might never happen.\n if (this[kClients].length === 0) {\n throw new BalancedPoolMissingUpstreamError()\n }\n\n const dispatcher = this[kClients].find(dispatcher => (\n !dispatcher[kNeedDrain] &&\n dispatcher.closed !== true &&\n dispatcher.destroyed !== true\n ))\n\n if (!dispatcher) {\n return\n }\n\n const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true)\n\n if (allClientsBusy) {\n return\n }\n\n let counter = 0\n\n let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain])\n\n while (counter++ < this[kClients].length) {\n this[kIndex] = (this[kIndex] + 1) % this[kClients].length\n const pool = this[kClients][this[kIndex]]\n\n // find pool index with the largest weight\n if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) {\n maxWeightIndex = this[kIndex]\n }\n\n // decrease the current weight every `this[kClients].length`.\n if (this[kIndex] === 0) {\n // Set the current weight to the next lower weight.\n this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]\n\n if (this[kCurrentWeight] <= 0) {\n this[kCurrentWeight] = this[kMaxWeightPerServer]\n }\n }\n if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) {\n return pool\n }\n }\n\n this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]\n this[kIndex] = maxWeightIndex\n return this[kClients][maxWeightIndex]\n }\n}\n\nmodule.exports = BalancedPool\n", "'use strict'\n\nconst {\n PoolBase,\n kClients,\n kNeedDrain,\n kAddClient,\n kGetDispatcher,\n kRemoveClient\n} = require('./pool-base')\nconst Client = require('./client')\nconst {\n InvalidArgumentError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { kUrl } = require('../core/symbols')\nconst buildConnector = require('../core/connect')\n\nconst kOptions = Symbol('options')\nconst kConnections = Symbol('connections')\nconst kFactory = Symbol('factory')\nconst kIndex = Symbol('index')\n\nfunction defaultFactory (origin, opts) {\n return new Client(origin, opts)\n}\n\nclass RoundRobinPool extends PoolBase {\n constructor (origin, {\n connections,\n factory = defaultFactory,\n connect,\n connectTimeout,\n tls,\n maxCachedSessions,\n socketPath,\n autoSelectFamily,\n autoSelectFamilyAttemptTimeout,\n allowH2,\n clientTtl,\n ...options\n } = {}) {\n if (connections != null && (!Number.isFinite(connections) || connections < 0)) {\n throw new InvalidArgumentError('invalid connections')\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (typeof connect !== 'function') {\n connect = buildConnector({\n ...tls,\n maxCachedSessions,\n allowH2,\n socketPath,\n timeout: connectTimeout,\n ...(typeof autoSelectFamily === 'boolean' ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),\n ...connect\n })\n }\n\n super()\n\n this[kConnections] = connections || null\n this[kUrl] = util.parseOrigin(origin)\n this[kOptions] = { ...util.deepClone(options), connect, allowH2, clientTtl, socketPath }\n this[kOptions].interceptors = options.interceptors\n ? { ...options.interceptors }\n : undefined\n this[kFactory] = factory\n this[kIndex] = -1\n\n this.on('connect', (origin, targets) => {\n if (clientTtl != null && clientTtl > 0) {\n for (const target of targets) {\n Object.assign(target, { ttl: Date.now() })\n }\n }\n })\n\n this.on('connectionError', (origin, targets, error) => {\n for (const target of targets) {\n const idx = this[kClients].indexOf(target)\n if (idx !== -1) {\n this[kClients].splice(idx, 1)\n }\n }\n })\n }\n\n [kGetDispatcher] () {\n const clientTtlOption = this[kOptions].clientTtl\n const clientsLength = this[kClients].length\n\n // If we have no clients yet, create one\n if (clientsLength === 0) {\n const dispatcher = this[kFactory](this[kUrl], this[kOptions])\n this[kAddClient](dispatcher)\n return dispatcher\n }\n\n // Round-robin through existing clients\n let checked = 0\n while (checked < clientsLength) {\n this[kIndex] = (this[kIndex] + 1) % clientsLength\n const client = this[kClients][this[kIndex]]\n\n // Check if client is stale (TTL expired)\n if (clientTtlOption != null && clientTtlOption > 0 && client.ttl && ((Date.now() - client.ttl) > clientTtlOption)) {\n this[kRemoveClient](client)\n checked++\n continue\n }\n\n // Return client if it's not draining\n if (!client[kNeedDrain]) {\n return client\n }\n\n checked++\n }\n\n // All clients are busy, create a new one if we haven't reached the limit\n if (!this[kConnections] || clientsLength < this[kConnections]) {\n const dispatcher = this[kFactory](this[kUrl], this[kOptions])\n this[kAddClient](dispatcher)\n return dispatcher\n }\n }\n}\n\nmodule.exports = RoundRobinPool\n", "'use strict'\n\nconst { InvalidArgumentError, MaxOriginsReachedError } = require('../core/errors')\nconst { kClients, kRunning, kClose, kDestroy, kDispatch, kUrl } = require('../core/symbols')\nconst DispatcherBase = require('./dispatcher-base')\nconst Pool = require('./pool')\nconst Client = require('./client')\nconst util = require('../core/util')\n\nconst kOnConnect = Symbol('onConnect')\nconst kOnDisconnect = Symbol('onDisconnect')\nconst kOnConnectionError = Symbol('onConnectionError')\nconst kOnDrain = Symbol('onDrain')\nconst kFactory = Symbol('factory')\nconst kOptions = Symbol('options')\nconst kOrigins = Symbol('origins')\n\nfunction defaultFactory (origin, opts) {\n return opts && opts.connections === 1\n ? new Client(origin, opts)\n : new Pool(origin, opts)\n}\n\nclass Agent extends DispatcherBase {\n constructor ({ factory = defaultFactory, maxOrigins = Infinity, connect, ...options } = {}) {\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('factory must be a function.')\n }\n\n if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {\n throw new InvalidArgumentError('connect must be a function or an object')\n }\n\n if (typeof maxOrigins !== 'number' || Number.isNaN(maxOrigins) || maxOrigins <= 0) {\n throw new InvalidArgumentError('maxOrigins must be a number greater than 0')\n }\n\n super()\n\n if (connect && typeof connect !== 'function') {\n connect = { ...connect }\n }\n\n this[kOptions] = { ...util.deepClone(options), maxOrigins, connect }\n this[kFactory] = factory\n this[kClients] = new Map()\n this[kOrigins] = new Set()\n\n this[kOnDrain] = (origin, targets) => {\n this.emit('drain', origin, [this, ...targets])\n }\n\n this[kOnConnect] = (origin, targets) => {\n this.emit('connect', origin, [this, ...targets])\n }\n\n this[kOnDisconnect] = (origin, targets, err) => {\n this.emit('disconnect', origin, [this, ...targets], err)\n }\n\n this[kOnConnectionError] = (origin, targets, err) => {\n this.emit('connectionError', origin, [this, ...targets], err)\n }\n }\n\n get [kRunning] () {\n let ret = 0\n for (const { dispatcher } of this[kClients].values()) {\n ret += dispatcher[kRunning]\n }\n return ret\n }\n\n [kDispatch] (opts, handler) {\n let key\n if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) {\n key = String(opts.origin)\n } else {\n throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.')\n }\n\n if (this[kOrigins].size >= this[kOptions].maxOrigins && !this[kOrigins].has(key)) {\n throw new MaxOriginsReachedError()\n }\n\n const result = this[kClients].get(key)\n let dispatcher = result && result.dispatcher\n if (!dispatcher) {\n const closeClientIfUnused = (connected) => {\n const result = this[kClients].get(key)\n if (result) {\n if (connected) result.count -= 1\n if (result.count <= 0) {\n this[kClients].delete(key)\n if (!result.dispatcher.destroyed) {\n result.dispatcher.close()\n }\n }\n this[kOrigins].delete(key)\n }\n }\n dispatcher = this[kFactory](opts.origin, this[kOptions])\n .on('drain', this[kOnDrain])\n .on('connect', (origin, targets) => {\n const result = this[kClients].get(key)\n if (result) {\n result.count += 1\n }\n this[kOnConnect](origin, targets)\n })\n .on('disconnect', (origin, targets, err) => {\n closeClientIfUnused(true)\n this[kOnDisconnect](origin, targets, err)\n })\n .on('connectionError', (origin, targets, err) => {\n closeClientIfUnused(false)\n this[kOnConnectionError](origin, targets, err)\n })\n\n this[kClients].set(key, { count: 0, dispatcher })\n this[kOrigins].add(key)\n }\n\n return dispatcher.dispatch(opts, handler)\n }\n\n [kClose] () {\n const closePromises = []\n for (const { dispatcher } of this[kClients].values()) {\n closePromises.push(dispatcher.close())\n }\n this[kClients].clear()\n\n return Promise.all(closePromises)\n }\n\n [kDestroy] (err) {\n const destroyPromises = []\n for (const { dispatcher } of this[kClients].values()) {\n destroyPromises.push(dispatcher.destroy(err))\n }\n this[kClients].clear()\n\n return Promise.all(destroyPromises)\n }\n\n get stats () {\n const allClientStats = {}\n for (const { dispatcher } of this[kClients].values()) {\n if (dispatcher.stats) {\n allClientStats[dispatcher[kUrl].origin] = dispatcher.stats\n }\n }\n return allClientStats\n }\n}\n\nmodule.exports = Agent\n", "'use strict'\n\nconst { Buffer } = require('node:buffer')\nconst net = require('node:net')\nconst { InvalidArgumentError } = require('./errors')\n\n/**\n * Parse an address and determine its type\n * @param {string} address - The address to parse\n * @returns {{type: number, buffer: Buffer}} Address type and buffer\n */\nfunction parseAddress (address) {\n // Check if it's an IPv4 address\n if (net.isIPv4(address)) {\n const parts = address.split('.').map(Number)\n return {\n type: 0x01, // IPv4\n buffer: Buffer.from(parts)\n }\n }\n\n // Check if it's an IPv6 address\n if (net.isIPv6(address)) {\n return {\n type: 0x04, // IPv6\n buffer: parseIPv6(address)\n }\n }\n\n // Otherwise, treat as domain name\n const domainBuffer = Buffer.from(address, 'utf8')\n if (domainBuffer.length > 255) {\n throw new InvalidArgumentError('Domain name too long (max 255 bytes)')\n }\n\n return {\n type: 0x03, // Domain\n buffer: Buffer.concat([Buffer.from([domainBuffer.length]), domainBuffer])\n }\n}\n\n/**\n * Parse IPv6 address to buffer\n * @param {string} address - IPv6 address string\n * @returns {Buffer} 16-byte buffer\n */\nfunction parseIPv6 (address) {\n const buffer = Buffer.alloc(16)\n const parts = address.split(':')\n let partIndex = 0\n let bufferIndex = 0\n\n // Handle compressed notation (::)\n const doubleColonIndex = address.indexOf('::')\n if (doubleColonIndex !== -1) {\n // Count non-empty parts\n const nonEmptyParts = parts.filter(p => p.length > 0).length\n const skipParts = 8 - nonEmptyParts\n\n for (let i = 0; i < parts.length; i++) {\n if (parts[i] === '' && i === doubleColonIndex / 3) {\n // Skip empty parts for ::\n bufferIndex += skipParts * 2\n } else if (parts[i] !== '') {\n const value = parseInt(parts[i], 16)\n buffer.writeUInt16BE(value, bufferIndex)\n bufferIndex += 2\n }\n }\n } else {\n // No compression, parse normally\n for (const part of parts) {\n if (part === '') continue\n const value = parseInt(part, 16)\n buffer.writeUInt16BE(value, partIndex * 2)\n partIndex++\n }\n }\n\n return buffer\n}\n\n/**\n * Build a SOCKS5 address buffer\n * @param {number} type - Address type (1=IPv4, 3=Domain, 4=IPv6)\n * @param {Buffer} addressBuffer - The address data\n * @param {number} port - Port number\n * @returns {Buffer} Complete address buffer including type, address, and port\n */\nfunction buildAddressBuffer (type, addressBuffer, port) {\n const portBuffer = Buffer.allocUnsafe(2)\n portBuffer.writeUInt16BE(port, 0)\n\n return Buffer.concat([\n Buffer.from([type]),\n addressBuffer,\n portBuffer\n ])\n}\n\n/**\n * Parse address from SOCKS5 response\n * @param {Buffer} buffer - Buffer containing the address\n * @param {number} offset - Starting offset in buffer\n * @returns {{address: string, port: number, bytesRead: number}}\n */\nfunction parseResponseAddress (buffer, offset = 0) {\n if (buffer.length < offset + 1) {\n throw new InvalidArgumentError('Buffer too small to contain address type')\n }\n\n const addressType = buffer[offset]\n let address\n let currentOffset = offset + 1\n\n switch (addressType) {\n case 0x01: { // IPv4\n if (buffer.length < currentOffset + 6) {\n throw new InvalidArgumentError('Buffer too small for IPv4 address')\n }\n address = Array.from(buffer.subarray(currentOffset, currentOffset + 4)).join('.')\n currentOffset += 4\n break\n }\n\n case 0x03: { // Domain\n if (buffer.length < currentOffset + 1) {\n throw new InvalidArgumentError('Buffer too small for domain length')\n }\n const domainLength = buffer[currentOffset]\n currentOffset += 1\n\n if (buffer.length < currentOffset + domainLength + 2) {\n throw new InvalidArgumentError('Buffer too small for domain address')\n }\n address = buffer.subarray(currentOffset, currentOffset + domainLength).toString('utf8')\n currentOffset += domainLength\n break\n }\n\n case 0x04: { // IPv6\n if (buffer.length < currentOffset + 18) {\n throw new InvalidArgumentError('Buffer too small for IPv6 address')\n }\n // Convert buffer to IPv6 string\n const parts = []\n for (let i = 0; i < 8; i++) {\n const value = buffer.readUInt16BE(currentOffset + i * 2)\n parts.push(value.toString(16))\n }\n address = parts.join(':')\n currentOffset += 16\n break\n }\n\n default:\n throw new InvalidArgumentError(`Invalid address type: ${addressType}`)\n }\n\n // Parse port\n if (buffer.length < currentOffset + 2) {\n throw new InvalidArgumentError('Buffer too small for port')\n }\n const port = buffer.readUInt16BE(currentOffset)\n currentOffset += 2\n\n return {\n address,\n port,\n bytesRead: currentOffset - offset\n }\n}\n\n/**\n * Create error for SOCKS5 reply code\n * @param {number} replyCode - SOCKS5 reply code\n * @returns {Error} Appropriate error object\n */\nfunction createReplyError (replyCode) {\n const messages = {\n 0x01: 'General SOCKS server failure',\n 0x02: 'Connection not allowed by ruleset',\n 0x03: 'Network unreachable',\n 0x04: 'Host unreachable',\n 0x05: 'Connection refused',\n 0x06: 'TTL expired',\n 0x07: 'Command not supported',\n 0x08: 'Address type not supported'\n }\n\n const message = messages[replyCode] || `Unknown SOCKS5 error code: ${replyCode}`\n const error = new Error(message)\n error.code = `SOCKS5_${replyCode}`\n return error\n}\n\nmodule.exports = {\n parseAddress,\n parseIPv6,\n buildAddressBuffer,\n parseResponseAddress,\n createReplyError\n}\n", "'use strict'\n\nconst { EventEmitter } = require('node:events')\nconst { Buffer } = require('node:buffer')\nconst { InvalidArgumentError, Socks5ProxyError } = require('./errors')\nconst { debuglog } = require('node:util')\nconst { parseAddress } = require('./socks5-utils')\n\nconst debug = debuglog('undici:socks5')\n\n// SOCKS5 constants\nconst SOCKS_VERSION = 0x05\n\n// Authentication methods\nconst AUTH_METHODS = {\n NO_AUTH: 0x00,\n GSSAPI: 0x01,\n USERNAME_PASSWORD: 0x02,\n NO_ACCEPTABLE: 0xFF\n}\n\n// SOCKS5 commands\nconst COMMANDS = {\n CONNECT: 0x01,\n BIND: 0x02,\n UDP_ASSOCIATE: 0x03\n}\n\n// Address types\nconst ADDRESS_TYPES = {\n IPV4: 0x01,\n DOMAIN: 0x03,\n IPV6: 0x04\n}\n\n// Reply codes\nconst REPLY_CODES = {\n SUCCEEDED: 0x00,\n GENERAL_FAILURE: 0x01,\n CONNECTION_NOT_ALLOWED: 0x02,\n NETWORK_UNREACHABLE: 0x03,\n HOST_UNREACHABLE: 0x04,\n CONNECTION_REFUSED: 0x05,\n TTL_EXPIRED: 0x06,\n COMMAND_NOT_SUPPORTED: 0x07,\n ADDRESS_TYPE_NOT_SUPPORTED: 0x08\n}\n\n// State machine states\nconst STATES = {\n INITIAL: 'initial',\n HANDSHAKING: 'handshaking',\n AUTHENTICATING: 'authenticating',\n CONNECTING: 'connecting',\n CONNECTED: 'connected',\n ERROR: 'error',\n CLOSED: 'closed'\n}\n\n/**\n * SOCKS5 client implementation\n * Handles SOCKS5 protocol negotiation and connection establishment\n */\nclass Socks5Client extends EventEmitter {\n constructor (socket, options = {}) {\n super()\n\n if (!socket) {\n throw new InvalidArgumentError('socket is required')\n }\n\n this.socket = socket\n this.options = options\n this.state = STATES.INITIAL\n this.buffer = Buffer.alloc(0)\n\n // Authentication settings\n this.authMethods = []\n if (options.username && options.password) {\n this.authMethods.push(AUTH_METHODS.USERNAME_PASSWORD)\n }\n this.authMethods.push(AUTH_METHODS.NO_AUTH)\n\n // Socket event handlers\n this.socket.on('data', this.onData.bind(this))\n this.socket.on('error', this.onError.bind(this))\n this.socket.on('close', this.onClose.bind(this))\n }\n\n /**\n * Handle incoming data from the socket\n */\n onData (data) {\n debug('received data', data.length, 'bytes in state', this.state)\n this.buffer = Buffer.concat([this.buffer, data])\n\n try {\n switch (this.state) {\n case STATES.HANDSHAKING:\n this.handleHandshakeResponse()\n break\n case STATES.AUTHENTICATING:\n this.handleAuthResponse()\n break\n case STATES.CONNECTING:\n this.handleConnectResponse()\n break\n }\n } catch (err) {\n this.onError(err)\n }\n }\n\n /**\n * Handle socket errors\n */\n onError (err) {\n debug('socket error', err)\n this.state = STATES.ERROR\n this.emit('error', err)\n this.destroy()\n }\n\n /**\n * Handle socket close\n */\n onClose () {\n debug('socket closed')\n this.state = STATES.CLOSED\n this.emit('close')\n }\n\n /**\n * Destroy the client and underlying socket\n */\n destroy () {\n if (this.socket && !this.socket.destroyed) {\n this.socket.destroy()\n }\n }\n\n /**\n * Start the SOCKS5 handshake\n */\n handshake () {\n if (this.state !== STATES.INITIAL) {\n throw new InvalidArgumentError('Handshake already started')\n }\n\n debug('starting handshake with', this.authMethods.length, 'auth methods')\n this.state = STATES.HANDSHAKING\n\n // Build handshake request\n // +----+----------+----------+\n // |VER | NMETHODS | METHODS |\n // +----+----------+----------+\n // | 1 | 1 | 1 to 255 |\n // +----+----------+----------+\n const request = Buffer.alloc(2 + this.authMethods.length)\n request[0] = SOCKS_VERSION\n request[1] = this.authMethods.length\n this.authMethods.forEach((method, i) => {\n request[2 + i] = method\n })\n\n this.socket.write(request)\n }\n\n /**\n * Handle handshake response from server\n */\n handleHandshakeResponse () {\n if (this.buffer.length < 2) {\n return // Not enough data yet\n }\n\n const version = this.buffer[0]\n const method = this.buffer[1]\n\n if (version !== SOCKS_VERSION) {\n throw new Socks5ProxyError(`Invalid SOCKS version: ${version}`, 'UND_ERR_SOCKS5_VERSION')\n }\n\n if (method === AUTH_METHODS.NO_ACCEPTABLE) {\n throw new Socks5ProxyError('No acceptable authentication method', 'UND_ERR_SOCKS5_AUTH_REJECTED')\n }\n\n this.buffer = this.buffer.subarray(2)\n debug('server selected auth method', method)\n\n if (method === AUTH_METHODS.NO_AUTH) {\n this.emit('authenticated')\n } else if (method === AUTH_METHODS.USERNAME_PASSWORD) {\n this.state = STATES.AUTHENTICATING\n this.sendAuthRequest()\n } else {\n throw new Socks5ProxyError(`Unsupported authentication method: ${method}`, 'UND_ERR_SOCKS5_AUTH_METHOD')\n }\n }\n\n /**\n * Send username/password authentication request\n */\n sendAuthRequest () {\n const { username, password } = this.options\n\n if (!username || !password) {\n throw new InvalidArgumentError('Username and password required for authentication')\n }\n\n debug('sending username/password auth')\n\n // Username/Password authentication request (RFC 1929)\n // +----+------+----------+------+----------+\n // |VER | ULEN | UNAME | PLEN | PASSWD |\n // +----+------+----------+------+----------+\n // | 1 | 1 | 1 to 255 | 1 | 1 to 255 |\n // +----+------+----------+------+----------+\n const usernameBuffer = Buffer.from(username)\n const passwordBuffer = Buffer.from(password)\n\n if (usernameBuffer.length > 255 || passwordBuffer.length > 255) {\n throw new InvalidArgumentError('Username or password too long')\n }\n\n const request = Buffer.alloc(3 + usernameBuffer.length + passwordBuffer.length)\n request[0] = 0x01 // Sub-negotiation version\n request[1] = usernameBuffer.length\n usernameBuffer.copy(request, 2)\n request[2 + usernameBuffer.length] = passwordBuffer.length\n passwordBuffer.copy(request, 3 + usernameBuffer.length)\n\n this.socket.write(request)\n }\n\n /**\n * Handle authentication response\n */\n handleAuthResponse () {\n if (this.buffer.length < 2) {\n return // Not enough data yet\n }\n\n const version = this.buffer[0]\n const status = this.buffer[1]\n\n if (version !== 0x01) {\n throw new Socks5ProxyError(`Invalid auth sub-negotiation version: ${version}`, 'UND_ERR_SOCKS5_AUTH_VERSION')\n }\n\n if (status !== 0x00) {\n throw new Socks5ProxyError('Authentication failed', 'UND_ERR_SOCKS5_AUTH_FAILED')\n }\n\n this.buffer = this.buffer.subarray(2)\n debug('authentication successful')\n this.emit('authenticated')\n }\n\n /**\n * Send CONNECT command\n * @param {string} address - Target address (IP or domain)\n * @param {number} port - Target port\n */\n connect (address, port) {\n if (this.state === STATES.CONNECTED) {\n throw new InvalidArgumentError('Already connected')\n }\n\n debug('connecting to', address, port)\n this.state = STATES.CONNECTING\n\n const request = this.buildConnectRequest(COMMANDS.CONNECT, address, port)\n this.socket.write(request)\n }\n\n /**\n * Build a SOCKS5 request\n */\n buildConnectRequest (command, address, port) {\n // Parse address to determine type and buffer\n const { type: addressType, buffer: addressBuffer } = parseAddress(address)\n\n // Build request\n // +----+-----+-------+------+----------+----------+\n // |VER | CMD | RSV | ATYP | DST.ADDR | DST.PORT |\n // +----+-----+-------+------+----------+----------+\n // | 1 | 1 | X'00' | 1 | Variable | 2 |\n // +----+-----+-------+------+----------+----------+\n const request = Buffer.alloc(4 + addressBuffer.length + 2)\n request[0] = SOCKS_VERSION\n request[1] = command\n request[2] = 0x00 // Reserved\n request[3] = addressType\n addressBuffer.copy(request, 4)\n request.writeUInt16BE(port, 4 + addressBuffer.length)\n\n return request\n }\n\n /**\n * Handle CONNECT response\n */\n handleConnectResponse () {\n if (this.buffer.length < 4) {\n return // Not enough data for header\n }\n\n const version = this.buffer[0]\n const reply = this.buffer[1]\n const addressType = this.buffer[3]\n\n if (version !== SOCKS_VERSION) {\n throw new Socks5ProxyError(`Invalid SOCKS version in reply: ${version}`, 'UND_ERR_SOCKS5_REPLY_VERSION')\n }\n\n // Calculate the expected response length\n let responseLength = 4 // VER + REP + RSV + ATYP\n if (addressType === ADDRESS_TYPES.IPV4) {\n responseLength += 4 + 2 // IPv4 + port\n } else if (addressType === ADDRESS_TYPES.DOMAIN) {\n if (this.buffer.length < 5) {\n return // Need domain length byte\n }\n responseLength += 1 + this.buffer[4] + 2 // length byte + domain + port\n } else if (addressType === ADDRESS_TYPES.IPV6) {\n responseLength += 16 + 2 // IPv6 + port\n } else {\n throw new Socks5ProxyError(`Invalid address type in reply: ${addressType}`, 'UND_ERR_SOCKS5_ADDR_TYPE')\n }\n\n if (this.buffer.length < responseLength) {\n return // Not enough data for full response\n }\n\n if (reply !== REPLY_CODES.SUCCEEDED) {\n const errorMessage = this.getReplyErrorMessage(reply)\n throw new Socks5ProxyError(`SOCKS5 connection failed: ${errorMessage}`, `UND_ERR_SOCKS5_REPLY_${reply}`)\n }\n\n // Parse bound address and port\n let boundAddress\n let offset = 4\n\n if (addressType === ADDRESS_TYPES.IPV4) {\n boundAddress = Array.from(this.buffer.subarray(offset, offset + 4)).join('.')\n offset += 4\n } else if (addressType === ADDRESS_TYPES.DOMAIN) {\n const domainLength = this.buffer[offset]\n offset += 1\n boundAddress = this.buffer.subarray(offset, offset + domainLength).toString()\n offset += domainLength\n } else if (addressType === ADDRESS_TYPES.IPV6) {\n // Parse IPv6 address from 16-byte buffer\n const parts = []\n for (let i = 0; i < 8; i++) {\n const value = this.buffer.readUInt16BE(offset + i * 2)\n parts.push(value.toString(16))\n }\n boundAddress = parts.join(':')\n offset += 16\n }\n\n const boundPort = this.buffer.readUInt16BE(offset)\n\n this.buffer = this.buffer.subarray(responseLength)\n this.state = STATES.CONNECTED\n\n debug('connected, bound address:', boundAddress, 'port:', boundPort)\n this.emit('connected', { address: boundAddress, port: boundPort })\n }\n\n /**\n * Get human-readable error message for reply code\n */\n getReplyErrorMessage (reply) {\n switch (reply) {\n case REPLY_CODES.GENERAL_FAILURE:\n return 'General SOCKS server failure'\n case REPLY_CODES.CONNECTION_NOT_ALLOWED:\n return 'Connection not allowed by ruleset'\n case REPLY_CODES.NETWORK_UNREACHABLE:\n return 'Network unreachable'\n case REPLY_CODES.HOST_UNREACHABLE:\n return 'Host unreachable'\n case REPLY_CODES.CONNECTION_REFUSED:\n return 'Connection refused'\n case REPLY_CODES.TTL_EXPIRED:\n return 'TTL expired'\n case REPLY_CODES.COMMAND_NOT_SUPPORTED:\n return 'Command not supported'\n case REPLY_CODES.ADDRESS_TYPE_NOT_SUPPORTED:\n return 'Address type not supported'\n default:\n return `Unknown error code: ${reply}`\n }\n }\n}\n\nmodule.exports = {\n Socks5Client,\n AUTH_METHODS,\n COMMANDS,\n ADDRESS_TYPES,\n REPLY_CODES,\n STATES\n}\n", "'use strict'\n\nconst net = require('node:net')\nconst { URL } = require('node:url')\n\nlet tls // include tls conditionally since it is not always available\nconst DispatcherBase = require('./dispatcher-base')\nconst { InvalidArgumentError } = require('../core/errors')\nconst { Socks5Client } = require('../core/socks5-client')\nconst { kDispatch, kClose, kDestroy } = require('../core/symbols')\nconst Pool = require('./pool')\nconst buildConnector = require('../core/connect')\nconst { debuglog } = require('node:util')\n\nconst debug = debuglog('undici:socks5-proxy')\n\nconst kProxyUrl = Symbol('proxy url')\nconst kProxyHeaders = Symbol('proxy headers')\nconst kProxyAuth = Symbol('proxy auth')\nconst kPool = Symbol('pool')\nconst kConnector = Symbol('connector')\n\n// Static flag to ensure warning is only emitted once per process\nlet experimentalWarningEmitted = false\n\n/**\n * SOCKS5 proxy agent for dispatching requests through a SOCKS5 proxy\n */\nclass Socks5ProxyAgent extends DispatcherBase {\n constructor (proxyUrl, options = {}) {\n super()\n\n // Emit experimental warning only once\n if (!experimentalWarningEmitted) {\n process.emitWarning(\n 'SOCKS5 proxy support is experimental and subject to change',\n 'ExperimentalWarning'\n )\n experimentalWarningEmitted = true\n }\n\n if (!proxyUrl) {\n throw new InvalidArgumentError('Proxy URL is mandatory')\n }\n\n // Parse proxy URL\n const url = typeof proxyUrl === 'string' ? new URL(proxyUrl) : proxyUrl\n\n if (url.protocol !== 'socks5:' && url.protocol !== 'socks:') {\n throw new InvalidArgumentError('Proxy URL must use socks5:// or socks:// protocol')\n }\n\n this[kProxyUrl] = url\n this[kProxyHeaders] = options.headers || {}\n\n // Extract auth from URL or options\n this[kProxyAuth] = {\n username: options.username || (url.username ? decodeURIComponent(url.username) : null),\n password: options.password || (url.password ? decodeURIComponent(url.password) : null)\n }\n\n // Create connector for proxy connection\n this[kConnector] = options.connect || buildConnector({\n ...options.proxyTls,\n servername: options.proxyTls?.servername || url.hostname\n })\n\n // Pool for the actual HTTP connections (with SOCKS5 tunnel connect function)\n this[kPool] = null\n }\n\n /**\n * Create a SOCKS5 connection to the proxy\n */\n async createSocks5Connection (targetHost, targetPort) {\n const proxyHost = this[kProxyUrl].hostname\n const proxyPort = parseInt(this[kProxyUrl].port) || 1080\n\n debug('creating SOCKS5 connection to', proxyHost, proxyPort)\n\n // Connect to the SOCKS5 proxy\n const socket = await new Promise((resolve, reject) => {\n const onConnect = () => {\n socket.removeListener('error', onError)\n resolve(socket)\n }\n\n const onError = (err) => {\n socket.removeListener('connect', onConnect)\n reject(err)\n }\n\n const socket = net.connect({\n host: proxyHost,\n port: proxyPort\n })\n\n socket.once('connect', onConnect)\n socket.once('error', onError)\n })\n\n // Create SOCKS5 client\n const socks5Client = new Socks5Client(socket, this[kProxyAuth])\n\n // Handle SOCKS5 errors\n socks5Client.on('error', (err) => {\n debug('SOCKS5 error:', err)\n socket.destroy()\n })\n\n // Perform SOCKS5 handshake\n await socks5Client.handshake()\n\n // Wait for authentication (if required)\n await new Promise((resolve, reject) => {\n const timeout = setTimeout(() => {\n reject(new Error('SOCKS5 authentication timeout'))\n }, 5000)\n\n const onAuthenticated = () => {\n clearTimeout(timeout)\n socks5Client.removeListener('error', onError)\n resolve()\n }\n\n const onError = (err) => {\n clearTimeout(timeout)\n socks5Client.removeListener('authenticated', onAuthenticated)\n reject(err)\n }\n\n // Check if already authenticated (for NO_AUTH method)\n if (socks5Client.state === 'authenticated') {\n clearTimeout(timeout)\n resolve()\n } else {\n socks5Client.once('authenticated', onAuthenticated)\n socks5Client.once('error', onError)\n }\n })\n\n // Send CONNECT command\n await socks5Client.connect(targetHost, targetPort)\n\n // Wait for connection\n await new Promise((resolve, reject) => {\n const timeout = setTimeout(() => {\n reject(new Error('SOCKS5 connection timeout'))\n }, 5000)\n\n const onConnected = (info) => {\n debug('SOCKS5 tunnel established to', targetHost, targetPort, 'via', info)\n clearTimeout(timeout)\n socks5Client.removeListener('error', onError)\n resolve()\n }\n\n const onError = (err) => {\n clearTimeout(timeout)\n socks5Client.removeListener('connected', onConnected)\n reject(err)\n }\n\n socks5Client.once('connected', onConnected)\n socks5Client.once('error', onError)\n })\n\n return socket\n }\n\n /**\n * Dispatch a request through the SOCKS5 proxy\n */\n async [kDispatch] (opts, handler) {\n const { origin } = opts\n\n debug('dispatching request to', origin, 'via SOCKS5')\n\n try {\n // Create Pool with custom connect function if we don't have one yet\n if (!this[kPool] || this[kPool].destroyed || this[kPool].closed) {\n this[kPool] = new Pool(origin, {\n pipelining: opts.pipelining,\n connections: opts.connections,\n connect: async (connectOpts, callback) => {\n try {\n const url = new URL(origin)\n const targetHost = url.hostname\n const targetPort = parseInt(url.port) || (url.protocol === 'https:' ? 443 : 80)\n\n debug('establishing SOCKS5 connection to', targetHost, targetPort)\n\n // Create SOCKS5 tunnel\n const socket = await this.createSocks5Connection(targetHost, targetPort)\n\n // Handle TLS if needed\n let finalSocket = socket\n if (url.protocol === 'https:') {\n if (!tls) {\n tls = require('node:tls')\n }\n debug('upgrading to TLS')\n finalSocket = tls.connect({\n socket,\n servername: targetHost,\n ...connectOpts.tls || {}\n })\n\n await new Promise((resolve, reject) => {\n finalSocket.once('secureConnect', resolve)\n finalSocket.once('error', reject)\n })\n }\n\n callback(null, finalSocket)\n } catch (err) {\n debug('SOCKS5 connection error:', err)\n callback(err)\n }\n }\n })\n }\n\n // Dispatch the request through the pool\n return this[kPool][kDispatch](opts, handler)\n } catch (err) {\n debug('dispatch error:', err)\n if (typeof handler.onError === 'function') {\n handler.onError(err)\n } else {\n throw err\n }\n }\n }\n\n async [kClose] () {\n if (this[kPool]) {\n await this[kPool].close()\n }\n }\n\n async [kDestroy] (err) {\n if (this[kPool]) {\n await this[kPool].destroy(err)\n }\n }\n}\n\nmodule.exports = Socks5ProxyAgent\n", "'use strict'\n\nconst { kProxy, kClose, kDestroy, kDispatch } = require('../core/symbols')\nconst Agent = require('./agent')\nconst Pool = require('./pool')\nconst DispatcherBase = require('./dispatcher-base')\nconst { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require('../core/errors')\nconst buildConnector = require('../core/connect')\nconst Client = require('./client')\nconst { channels } = require('../core/diagnostics')\nconst Socks5ProxyAgent = require('./socks5-proxy-agent')\n\nconst kAgent = Symbol('proxy agent')\nconst kClient = Symbol('proxy client')\nconst kProxyHeaders = Symbol('proxy headers')\nconst kRequestTls = Symbol('request tls settings')\nconst kProxyTls = Symbol('proxy tls settings')\nconst kConnectEndpoint = Symbol('connect endpoint function')\nconst kTunnelProxy = Symbol('tunnel proxy')\n\nfunction defaultProtocolPort (protocol) {\n return protocol === 'https:' ? 443 : 80\n}\n\nfunction defaultFactory (origin, opts) {\n return new Pool(origin, opts)\n}\n\nconst noop = () => {}\n\nfunction defaultAgentFactory (origin, opts) {\n if (opts.connections === 1) {\n return new Client(origin, opts)\n }\n return new Pool(origin, opts)\n}\n\nclass Http1ProxyWrapper extends DispatcherBase {\n #client\n\n constructor (proxyUrl, { headers = {}, connect, factory }) {\n if (!proxyUrl) {\n throw new InvalidArgumentError('Proxy URL is mandatory')\n }\n\n super()\n\n this[kProxyHeaders] = headers\n if (factory) {\n this.#client = factory(proxyUrl, { connect })\n } else {\n this.#client = new Client(proxyUrl, { connect })\n }\n }\n\n [kDispatch] (opts, handler) {\n const onHeaders = handler.onHeaders\n handler.onHeaders = function (statusCode, data, resume) {\n if (statusCode === 407) {\n if (typeof handler.onError === 'function') {\n handler.onError(new InvalidArgumentError('Proxy Authentication Required (407)'))\n }\n return\n }\n if (onHeaders) onHeaders.call(this, statusCode, data, resume)\n }\n\n // Rewrite request as an HTTP1 Proxy request, without tunneling.\n const {\n origin,\n path = '/',\n headers = {}\n } = opts\n\n opts.path = origin + path\n\n if (!('host' in headers) && !('Host' in headers)) {\n const { host } = new URL(origin)\n headers.host = host\n }\n opts.headers = { ...this[kProxyHeaders], ...headers }\n\n return this.#client[kDispatch](opts, handler)\n }\n\n [kClose] () {\n return this.#client.close()\n }\n\n [kDestroy] (err) {\n return this.#client.destroy(err)\n }\n}\n\nclass ProxyAgent extends DispatcherBase {\n constructor (opts) {\n if (!opts || (typeof opts === 'object' && !(opts instanceof URL) && !opts.uri)) {\n throw new InvalidArgumentError('Proxy uri is mandatory')\n }\n\n const { clientFactory = defaultFactory } = opts\n if (typeof clientFactory !== 'function') {\n throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.')\n }\n\n const { proxyTunnel = true } = opts\n\n super()\n\n const url = this.#getUrl(opts)\n const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url\n\n this[kProxy] = { uri: href, protocol }\n this[kRequestTls] = opts.requestTls\n this[kProxyTls] = opts.proxyTls\n this[kProxyHeaders] = opts.headers || {}\n this[kTunnelProxy] = proxyTunnel\n\n if (opts.auth && opts.token) {\n throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token')\n } else if (opts.auth) {\n /* @deprecated in favour of opts.token */\n this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}`\n } else if (opts.token) {\n this[kProxyHeaders]['proxy-authorization'] = opts.token\n } else if (username && password) {\n this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}`\n }\n\n const connect = buildConnector({ ...opts.proxyTls })\n this[kConnectEndpoint] = buildConnector({ ...opts.requestTls })\n\n const agentFactory = opts.factory || defaultAgentFactory\n const factory = (origin, options) => {\n const { protocol } = new URL(origin)\n\n // Handle SOCKS5 proxy\n if (this[kProxy].protocol === 'socks5:' || this[kProxy].protocol === 'socks:') {\n return new Socks5ProxyAgent(this[kProxy].uri, {\n headers: this[kProxyHeaders],\n connect,\n factory: agentFactory,\n username: opts.username || username,\n password: opts.password || password,\n proxyTls: opts.proxyTls\n })\n }\n\n if (!this[kTunnelProxy] && protocol === 'http:' && this[kProxy].protocol === 'http:') {\n return new Http1ProxyWrapper(this[kProxy].uri, {\n headers: this[kProxyHeaders],\n connect,\n factory: agentFactory\n })\n }\n return agentFactory(origin, options)\n }\n\n // For SOCKS5 proxies, we don't need a client to the proxy itself\n // The SOCKS5 connection is handled within Socks5ProxyAgent\n if (protocol === 'socks5:' || protocol === 'socks:') {\n this[kClient] = null\n } else {\n this[kClient] = clientFactory(url, { connect })\n }\n\n this[kAgent] = new Agent({\n ...opts,\n factory,\n connect: async (opts, callback) => {\n // SOCKS5 proxies handle their own connections via Socks5ProxyAgent,\n // so this connect function should never be called for them.\n if (!this[kClient]) {\n callback(new InvalidArgumentError('Cannot establish tunnel connection without a proxy client'))\n return\n }\n\n let requestedPath = opts.host\n if (!opts.port) {\n requestedPath += `:${defaultProtocolPort(opts.protocol)}`\n }\n try {\n const connectParams = {\n origin,\n port,\n path: requestedPath,\n signal: opts.signal,\n headers: {\n ...this[kProxyHeaders],\n host: opts.host,\n ...(opts.connections == null || opts.connections > 0 ? { 'proxy-connection': 'keep-alive' } : {})\n },\n servername: this[kProxyTls]?.servername || proxyHostname\n }\n const { socket, statusCode } = await this[kClient].connect(connectParams)\n if (statusCode !== 200) {\n socket.on('error', noop).destroy()\n callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`))\n return\n }\n\n if (channels.proxyConnected.hasSubscribers) {\n channels.proxyConnected.publish({\n socket,\n connectParams\n })\n }\n\n if (opts.protocol !== 'https:') {\n callback(null, socket)\n return\n }\n let servername\n if (this[kRequestTls]) {\n servername = this[kRequestTls].servername\n } else {\n servername = opts.servername\n }\n this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback)\n } catch (err) {\n if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {\n // Throw a custom error to avoid loop in client.js#connect\n callback(new SecureProxyConnectionError(err))\n } else {\n callback(err)\n }\n }\n }\n })\n }\n\n dispatch (opts, handler) {\n const headers = buildHeaders(opts.headers)\n throwIfProxyAuthIsSent(headers)\n\n if (headers && !('host' in headers) && !('Host' in headers)) {\n const { host } = new URL(opts.origin)\n headers.host = host\n }\n\n return this[kAgent].dispatch(\n {\n ...opts,\n headers\n },\n handler\n )\n }\n\n /**\n * @param {import('../../types/proxy-agent').ProxyAgent.Options | string | URL} opts\n * @returns {URL}\n */\n #getUrl (opts) {\n if (typeof opts === 'string') {\n return new URL(opts)\n } else if (opts instanceof URL) {\n return opts\n } else {\n return new URL(opts.uri)\n }\n }\n\n [kClose] () {\n const promises = [this[kAgent].close()]\n if (this[kClient]) {\n promises.push(this[kClient].close())\n }\n return Promise.all(promises)\n }\n\n [kDestroy] () {\n const promises = [this[kAgent].destroy()]\n if (this[kClient]) {\n promises.push(this[kClient].destroy())\n }\n return Promise.all(promises)\n }\n}\n\n/**\n * @param {string[] | Record} headers\n * @returns {Record}\n */\nfunction buildHeaders (headers) {\n // When using undici.fetch, the headers list is stored\n // as an array.\n if (Array.isArray(headers)) {\n /** @type {Record} */\n const headersPair = {}\n\n for (let i = 0; i < headers.length; i += 2) {\n headersPair[headers[i]] = headers[i + 1]\n }\n\n return headersPair\n }\n\n return headers\n}\n\n/**\n * @param {Record} headers\n *\n * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers\n * Nevertheless, it was changed and to avoid a security vulnerability by end users\n * this check was created.\n * It should be removed in the next major version for performance reasons\n */\nfunction throwIfProxyAuthIsSent (headers) {\n const existProxyAuth = headers && Object.keys(headers)\n .find((key) => key.toLowerCase() === 'proxy-authorization')\n if (existProxyAuth) {\n throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor')\n }\n}\n\nmodule.exports = ProxyAgent\n", "'use strict'\n\nconst DispatcherBase = require('./dispatcher-base')\nconst { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require('../core/symbols')\nconst ProxyAgent = require('./proxy-agent')\nconst Agent = require('./agent')\n\nconst DEFAULT_PORTS = {\n 'http:': 80,\n 'https:': 443\n}\n\nclass EnvHttpProxyAgent extends DispatcherBase {\n #noProxyValue = null\n #noProxyEntries = null\n #opts = null\n\n constructor (opts = {}) {\n super()\n this.#opts = opts\n\n const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts\n\n this[kNoProxyAgent] = new Agent(agentOpts)\n\n const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY\n if (HTTP_PROXY) {\n this[kHttpProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTP_PROXY })\n } else {\n this[kHttpProxyAgent] = this[kNoProxyAgent]\n }\n\n const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY\n if (HTTPS_PROXY) {\n this[kHttpsProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTPS_PROXY })\n } else {\n this[kHttpsProxyAgent] = this[kHttpProxyAgent]\n }\n\n this.#parseNoProxy()\n }\n\n [kDispatch] (opts, handler) {\n const url = new URL(opts.origin)\n const agent = this.#getProxyAgentForUrl(url)\n return agent.dispatch(opts, handler)\n }\n\n [kClose] () {\n return Promise.all([\n this[kNoProxyAgent].close(),\n !this[kHttpProxyAgent][kClosed] && this[kHttpProxyAgent].close(),\n !this[kHttpsProxyAgent][kClosed] && this[kHttpsProxyAgent].close()\n ])\n }\n\n [kDestroy] (err) {\n return Promise.all([\n this[kNoProxyAgent].destroy(err),\n !this[kHttpProxyAgent][kDestroyed] && this[kHttpProxyAgent].destroy(err),\n !this[kHttpsProxyAgent][kDestroyed] && this[kHttpsProxyAgent].destroy(err)\n ])\n }\n\n #getProxyAgentForUrl (url) {\n let { protocol, host: hostname, port } = url\n\n // Stripping ports in this way instead of using parsedUrl.hostname to make\n // sure that the brackets around IPv6 addresses are kept.\n hostname = hostname.replace(/:\\d*$/, '').toLowerCase()\n port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0\n if (!this.#shouldProxy(hostname, port)) {\n return this[kNoProxyAgent]\n }\n if (protocol === 'https:') {\n return this[kHttpsProxyAgent]\n }\n return this[kHttpProxyAgent]\n }\n\n #shouldProxy (hostname, port) {\n if (this.#noProxyChanged) {\n this.#parseNoProxy()\n }\n\n if (this.#noProxyEntries.length === 0) {\n return true // Always proxy if NO_PROXY is not set or empty.\n }\n if (this.#noProxyValue === '*') {\n return false // Never proxy if wildcard is set.\n }\n\n for (let i = 0; i < this.#noProxyEntries.length; i++) {\n const entry = this.#noProxyEntries[i]\n if (entry.port && entry.port !== port) {\n continue // Skip if ports don't match.\n }\n // Don't proxy if the hostname is equal with the no_proxy host.\n if (hostname === entry.hostname) {\n return false\n }\n // Don't proxy if the hostname is the subdomain of the no_proxy host.\n // Reference - https://github.com/denoland/deno/blob/6fbce91e40cc07fc6da74068e5cc56fdd40f7b4c/ext/fetch/proxy.rs#L485\n if (hostname.slice(-(entry.hostname.length + 1)) === `.${entry.hostname}`) {\n return false\n }\n }\n\n return true\n }\n\n #parseNoProxy () {\n const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv\n const noProxySplit = noProxyValue.split(/[,\\s]/)\n const noProxyEntries = []\n\n for (let i = 0; i < noProxySplit.length; i++) {\n const entry = noProxySplit[i]\n if (!entry) {\n continue\n }\n const parsed = entry.match(/^(.+):(\\d+)$/)\n noProxyEntries.push({\n // strip leading dot or asterisk with dot\n hostname: (parsed ? parsed[1] : entry).replace(/^\\*?\\./, '').toLowerCase(),\n port: parsed ? Number.parseInt(parsed[2], 10) : 0\n })\n }\n\n this.#noProxyValue = noProxyValue\n this.#noProxyEntries = noProxyEntries\n }\n\n get #noProxyChanged () {\n if (this.#opts.noProxy !== undefined) {\n return false\n }\n return this.#noProxyValue !== this.#noProxyEnv\n }\n\n get #noProxyEnv () {\n return process.env.no_proxy ?? process.env.NO_PROXY ?? ''\n }\n}\n\nmodule.exports = EnvHttpProxyAgent\n", "'use strict'\nconst assert = require('node:assert')\n\nconst { kRetryHandlerDefaultRetry } = require('../core/symbols')\nconst { RequestRetryError } = require('../core/errors')\nconst WrapHandler = require('./wrap-handler')\nconst {\n isDisturbed,\n parseRangeHeader,\n wrapRequestBody\n} = require('../core/util')\n\nfunction calculateRetryAfterHeader (retryAfter) {\n const retryTime = new Date(retryAfter).getTime()\n return isNaN(retryTime) ? 0 : retryTime - Date.now()\n}\n\nclass RetryHandler {\n constructor (opts, { dispatch, handler }) {\n const { retryOptions, ...dispatchOpts } = opts\n const {\n // Retry scoped\n retry: retryFn,\n maxRetries,\n maxTimeout,\n minTimeout,\n timeoutFactor,\n // Response scoped\n methods,\n errorCodes,\n retryAfter,\n statusCodes,\n throwOnError\n } = retryOptions ?? {}\n\n this.error = null\n this.dispatch = dispatch\n this.handler = WrapHandler.wrap(handler)\n this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) }\n this.retryOpts = {\n throwOnError: throwOnError ?? true,\n retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry],\n retryAfter: retryAfter ?? true,\n maxTimeout: maxTimeout ?? 30 * 1000, // 30s,\n minTimeout: minTimeout ?? 500, // .5s\n timeoutFactor: timeoutFactor ?? 2,\n maxRetries: maxRetries ?? 5,\n // What errors we should retry\n methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'],\n // Indicates which errors to retry\n statusCodes: statusCodes ?? [500, 502, 503, 504, 429],\n // List of errors to retry\n errorCodes: errorCodes ?? [\n 'ECONNRESET',\n 'ECONNREFUSED',\n 'ENOTFOUND',\n 'ENETDOWN',\n 'ENETUNREACH',\n 'EHOSTDOWN',\n 'EHOSTUNREACH',\n 'EPIPE',\n 'UND_ERR_SOCKET'\n ]\n }\n\n this.retryCount = 0\n this.retryCountCheckpoint = 0\n this.headersSent = false\n this.start = 0\n this.end = null\n this.etag = null\n }\n\n onResponseStartWithRetry (controller, statusCode, headers, statusMessage, err) {\n if (this.retryOpts.throwOnError) {\n // Preserve old behavior for status codes that are not eligible for retry\n if (this.retryOpts.statusCodes.includes(statusCode) === false) {\n this.headersSent = true\n this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage)\n } else {\n this.error = err\n }\n\n return\n }\n\n if (isDisturbed(this.opts.body)) {\n this.headersSent = true\n this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage)\n return\n }\n\n function shouldRetry (passedErr) {\n if (passedErr) {\n this.headersSent = true\n this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage)\n controller.resume()\n return\n }\n\n this.error = err\n controller.resume()\n }\n\n controller.pause()\n this.retryOpts.retry(\n err,\n {\n state: { counter: this.retryCount },\n opts: { retryOptions: this.retryOpts, ...this.opts }\n },\n shouldRetry.bind(this)\n )\n }\n\n onRequestStart (controller, context) {\n if (!this.headersSent) {\n this.handler.onRequestStart?.(controller, context)\n }\n }\n\n onRequestUpgrade (controller, statusCode, headers, socket) {\n this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket)\n }\n\n static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) {\n const { statusCode, code, headers } = err\n const { method, retryOptions } = opts\n const {\n maxRetries,\n minTimeout,\n maxTimeout,\n timeoutFactor,\n statusCodes,\n errorCodes,\n methods\n } = retryOptions\n const { counter } = state\n\n // Any code that is not a Undici's originated and allowed to retry\n if (code && code !== 'UND_ERR_REQ_RETRY' && !errorCodes.includes(code)) {\n cb(err)\n return\n }\n\n // If a set of method are provided and the current method is not in the list\n if (Array.isArray(methods) && !methods.includes(method)) {\n cb(err)\n return\n }\n\n // If a set of status code are provided and the current status code is not in the list\n if (\n statusCode != null &&\n Array.isArray(statusCodes) &&\n !statusCodes.includes(statusCode)\n ) {\n cb(err)\n return\n }\n\n // If we reached the max number of retries\n if (counter > maxRetries) {\n cb(err)\n return\n }\n\n let retryAfterHeader = headers?.['retry-after']\n if (retryAfterHeader) {\n retryAfterHeader = Number(retryAfterHeader)\n retryAfterHeader = Number.isNaN(retryAfterHeader)\n ? calculateRetryAfterHeader(headers['retry-after'])\n : retryAfterHeader * 1e3 // Retry-After is in seconds\n }\n\n const retryTimeout =\n retryAfterHeader > 0\n ? Math.min(retryAfterHeader, maxTimeout)\n : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout)\n\n setTimeout(() => cb(null), retryTimeout)\n }\n\n onResponseStart (controller, statusCode, headers, statusMessage) {\n this.error = null\n this.retryCount += 1\n\n if (statusCode >= 300) {\n const err = new RequestRetryError('Request failed', statusCode, {\n headers,\n data: {\n count: this.retryCount\n }\n })\n\n this.onResponseStartWithRetry(controller, statusCode, headers, statusMessage, err)\n return\n }\n\n // Checkpoint for resume from where we left it\n if (this.headersSent) {\n // Only Partial Content 206 supposed to provide Content-Range,\n // any other status code that partially consumed the payload\n // should not be retried because it would result in downstream\n // wrongly concatenate multiple responses.\n if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) {\n throw new RequestRetryError('server does not support the range header and the payload was partially consumed', statusCode, {\n headers,\n data: { count: this.retryCount }\n })\n }\n\n const contentRange = parseRangeHeader(headers['content-range'])\n // If no content range\n if (!contentRange) {\n // We always throw here as we want to indicate that we entred unexpected path\n throw new RequestRetryError('Content-Range mismatch', statusCode, {\n headers,\n data: { count: this.retryCount }\n })\n }\n\n // Let's start with a weak etag check\n if (this.etag != null && this.etag !== headers.etag) {\n // We always throw here as we want to indicate that we entred unexpected path\n throw new RequestRetryError('ETag mismatch', statusCode, {\n headers,\n data: { count: this.retryCount }\n })\n }\n\n const { start, size, end = size ? size - 1 : null } = contentRange\n\n assert(this.start === start, 'content-range mismatch')\n assert(this.end == null || this.end === end, 'content-range mismatch')\n\n return\n }\n\n if (this.end == null) {\n if (statusCode === 206) {\n // First time we receive 206\n const range = parseRangeHeader(headers['content-range'])\n\n if (range == null) {\n this.headersSent = true\n this.handler.onResponseStart?.(\n controller,\n statusCode,\n headers,\n statusMessage\n )\n return\n }\n\n const { start, size, end = size ? size - 1 : null } = range\n assert(\n start != null && Number.isFinite(start),\n 'content-range mismatch'\n )\n assert(end != null && Number.isFinite(end), 'invalid content-length')\n\n this.start = start\n this.end = end\n }\n\n // We make our best to checkpoint the body for further range headers\n if (this.end == null) {\n const contentLength = headers['content-length']\n this.end = contentLength != null ? Number(contentLength) - 1 : null\n }\n\n assert(Number.isFinite(this.start))\n assert(\n this.end == null || Number.isFinite(this.end),\n 'invalid content-length'\n )\n\n this.resume = true\n this.etag = headers.etag != null ? headers.etag : null\n\n // Weak etags are not useful for comparison nor cache\n // for instance not safe to assume if the response is byte-per-byte\n // equal\n if (\n this.etag != null &&\n this.etag[0] === 'W' &&\n this.etag[1] === '/'\n ) {\n this.etag = null\n }\n\n this.headersSent = true\n this.handler.onResponseStart?.(\n controller,\n statusCode,\n headers,\n statusMessage\n )\n } else {\n throw new RequestRetryError('Request failed', statusCode, {\n headers,\n data: { count: this.retryCount }\n })\n }\n }\n\n onResponseData (controller, chunk) {\n if (this.error) {\n return\n }\n\n this.start += chunk.length\n\n this.handler.onResponseData?.(controller, chunk)\n }\n\n onResponseEnd (controller, trailers) {\n if (this.error && this.retryOpts.throwOnError) {\n throw this.error\n }\n\n if (!this.error) {\n this.retryCount = 0\n return this.handler.onResponseEnd?.(controller, trailers)\n }\n\n this.retry(controller)\n }\n\n retry (controller) {\n if (this.start !== 0) {\n const headers = { range: `bytes=${this.start}-${this.end ?? ''}` }\n\n // Weak etag check - weak etags will make comparison algorithms never match\n if (this.etag != null) {\n headers['if-match'] = this.etag\n }\n\n this.opts = {\n ...this.opts,\n headers: {\n ...this.opts.headers,\n ...headers\n }\n }\n }\n\n try {\n this.retryCountCheckpoint = this.retryCount\n this.dispatch(this.opts, this)\n } catch (err) {\n this.handler.onResponseError?.(controller, err)\n }\n }\n\n onResponseError (controller, err) {\n if (controller?.aborted || isDisturbed(this.opts.body)) {\n this.handler.onResponseError?.(controller, err)\n return\n }\n\n function shouldRetry (returnedErr) {\n if (!returnedErr) {\n this.retry(controller)\n return\n }\n\n this.handler?.onResponseError?.(controller, returnedErr)\n }\n\n // We reconcile in case of a mix between network errors\n // and server error response\n if (this.retryCount - this.retryCountCheckpoint > 0) {\n // We count the difference between the last checkpoint and the current retry count\n this.retryCount =\n this.retryCountCheckpoint +\n (this.retryCount - this.retryCountCheckpoint)\n } else {\n this.retryCount += 1\n }\n\n this.retryOpts.retry(\n err,\n {\n state: { counter: this.retryCount },\n opts: { retryOptions: this.retryOpts, ...this.opts }\n },\n shouldRetry.bind(this)\n )\n }\n}\n\nmodule.exports = RetryHandler\n", "'use strict'\n\nconst Dispatcher = require('./dispatcher')\nconst RetryHandler = require('../handler/retry-handler')\n\nclass RetryAgent extends Dispatcher {\n #agent = null\n #options = null\n constructor (agent, options = {}) {\n super(options)\n this.#agent = agent\n this.#options = options\n }\n\n dispatch (opts, handler) {\n const retry = new RetryHandler({\n ...opts,\n retryOptions: this.#options\n }, {\n dispatch: this.#agent.dispatch.bind(this.#agent),\n handler\n })\n return this.#agent.dispatch(opts, retry)\n }\n\n close () {\n return this.#agent.close()\n }\n\n destroy () {\n return this.#agent.destroy()\n }\n}\n\nmodule.exports = RetryAgent\n", "'use strict'\n\nconst { InvalidArgumentError } = require('../core/errors')\nconst Client = require('./client')\n\nclass H2CClient extends Client {\n constructor (origin, clientOpts) {\n if (typeof origin === 'string') {\n origin = new URL(origin)\n }\n\n if (origin.protocol !== 'http:') {\n throw new InvalidArgumentError(\n 'h2c-client: Only h2c protocol is supported'\n )\n }\n\n const { connect, maxConcurrentStreams, pipelining, ...opts } =\n clientOpts ?? {}\n let defaultMaxConcurrentStreams = 100\n let defaultPipelining = 100\n\n if (\n maxConcurrentStreams != null &&\n Number.isInteger(maxConcurrentStreams) &&\n maxConcurrentStreams > 0\n ) {\n defaultMaxConcurrentStreams = maxConcurrentStreams\n }\n\n if (pipelining != null && Number.isInteger(pipelining) && pipelining > 0) {\n defaultPipelining = pipelining\n }\n\n if (defaultPipelining > defaultMaxConcurrentStreams) {\n throw new InvalidArgumentError(\n 'h2c-client: pipelining cannot be greater than maxConcurrentStreams'\n )\n }\n\n super(origin, {\n ...opts,\n maxConcurrentStreams: defaultMaxConcurrentStreams,\n pipelining: defaultPipelining,\n allowH2: true,\n useH2c: true\n })\n }\n}\n\nmodule.exports = H2CClient\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { Readable } = require('node:stream')\nconst { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require('../core/errors')\nconst util = require('../core/util')\nconst { ReadableStreamFrom } = require('../core/util')\n\nconst kConsume = Symbol('kConsume')\nconst kReading = Symbol('kReading')\nconst kBody = Symbol('kBody')\nconst kAbort = Symbol('kAbort')\nconst kContentType = Symbol('kContentType')\nconst kContentLength = Symbol('kContentLength')\nconst kUsed = Symbol('kUsed')\nconst kBytesRead = Symbol('kBytesRead')\n\nconst noop = () => {}\n\n/**\n * @class\n * @extends {Readable}\n * @see https://fetch.spec.whatwg.org/#body\n */\nclass BodyReadable extends Readable {\n /**\n * @param {object} opts\n * @param {(this: Readable, size: number) => void} opts.resume\n * @param {() => (void | null)} opts.abort\n * @param {string} [opts.contentType = '']\n * @param {number} [opts.contentLength]\n * @param {number} [opts.highWaterMark = 64 * 1024]\n */\n constructor ({\n resume,\n abort,\n contentType = '',\n contentLength,\n highWaterMark = 64 * 1024 // Same as nodejs fs streams.\n }) {\n super({\n autoDestroy: true,\n read: resume,\n highWaterMark\n })\n\n this._readableState.dataEmitted = false\n\n this[kAbort] = abort\n\n /** @type {Consume | null} */\n this[kConsume] = null\n\n /** @type {number} */\n this[kBytesRead] = 0\n\n /** @type {ReadableStream|null} */\n this[kBody] = null\n\n /** @type {boolean} */\n this[kUsed] = false\n\n /** @type {string} */\n this[kContentType] = contentType\n\n /** @type {number|null} */\n this[kContentLength] = Number.isFinite(contentLength) ? contentLength : null\n\n /**\n * Is stream being consumed through Readable API?\n * This is an optimization so that we avoid checking\n * for 'data' and 'readable' listeners in the hot path\n * inside push().\n *\n * @type {boolean}\n */\n this[kReading] = false\n }\n\n /**\n * @param {Error|null} err\n * @param {(error:(Error|null)) => void} callback\n * @returns {void}\n */\n _destroy (err, callback) {\n if (!err && !this._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n if (err) {\n this[kAbort]()\n }\n\n // Workaround for Node \"bug\". If the stream is destroyed in same\n // tick as it is created, then a user who is waiting for a\n // promise (i.e micro tick) for installing an 'error' listener will\n // never get a chance and will always encounter an unhandled exception.\n if (!this[kUsed]) {\n setImmediate(callback, err)\n } else {\n callback(err)\n }\n }\n\n /**\n * @param {string|symbol} event\n * @param {(...args: any[]) => void} listener\n * @returns {this}\n */\n on (event, listener) {\n if (event === 'data' || event === 'readable') {\n this[kReading] = true\n this[kUsed] = true\n }\n return super.on(event, listener)\n }\n\n /**\n * @param {string|symbol} event\n * @param {(...args: any[]) => void} listener\n * @returns {this}\n */\n addListener (event, listener) {\n return this.on(event, listener)\n }\n\n /**\n * @param {string|symbol} event\n * @param {(...args: any[]) => void} listener\n * @returns {this}\n */\n off (event, listener) {\n const ret = super.off(event, listener)\n if (event === 'data' || event === 'readable') {\n this[kReading] = (\n this.listenerCount('data') > 0 ||\n this.listenerCount('readable') > 0\n )\n }\n return ret\n }\n\n /**\n * @param {string|symbol} event\n * @param {(...args: any[]) => void} listener\n * @returns {this}\n */\n removeListener (event, listener) {\n return this.off(event, listener)\n }\n\n /**\n * @param {Buffer|null} chunk\n * @returns {boolean}\n */\n push (chunk) {\n if (chunk) {\n this[kBytesRead] += chunk.length\n if (this[kConsume]) {\n consumePush(this[kConsume], chunk)\n return this[kReading] ? super.push(chunk) : true\n }\n }\n\n return super.push(chunk)\n }\n\n /**\n * Consumes and returns the body as a string.\n *\n * @see https://fetch.spec.whatwg.org/#dom-body-text\n * @returns {Promise}\n */\n text () {\n return consume(this, 'text')\n }\n\n /**\n * Consumes and returns the body as a JavaScript Object.\n *\n * @see https://fetch.spec.whatwg.org/#dom-body-json\n * @returns {Promise}\n */\n json () {\n return consume(this, 'json')\n }\n\n /**\n * Consumes and returns the body as a Blob\n *\n * @see https://fetch.spec.whatwg.org/#dom-body-blob\n * @returns {Promise}\n */\n blob () {\n return consume(this, 'blob')\n }\n\n /**\n * Consumes and returns the body as an Uint8Array.\n *\n * @see https://fetch.spec.whatwg.org/#dom-body-bytes\n * @returns {Promise}\n */\n bytes () {\n return consume(this, 'bytes')\n }\n\n /**\n * Consumes and returns the body as an ArrayBuffer.\n *\n * @see https://fetch.spec.whatwg.org/#dom-body-arraybuffer\n * @returns {Promise}\n */\n arrayBuffer () {\n return consume(this, 'arrayBuffer')\n }\n\n /**\n * Not implemented\n *\n * @see https://fetch.spec.whatwg.org/#dom-body-formdata\n * @throws {NotSupportedError}\n */\n async formData () {\n // TODO: Implement.\n throw new NotSupportedError()\n }\n\n /**\n * Returns true if the body is not null and the body has been consumed.\n * Otherwise, returns false.\n *\n * @see https://fetch.spec.whatwg.org/#dom-body-bodyused\n * @readonly\n * @returns {boolean}\n */\n get bodyUsed () {\n return util.isDisturbed(this)\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#dom-body-body\n * @readonly\n * @returns {ReadableStream}\n */\n get body () {\n if (!this[kBody]) {\n this[kBody] = ReadableStreamFrom(this)\n if (this[kConsume]) {\n // TODO: Is this the best way to force a lock?\n this[kBody].getReader() // Ensure stream is locked.\n assert(this[kBody].locked)\n }\n }\n return this[kBody]\n }\n\n /**\n * Dumps the response body by reading `limit` number of bytes.\n * @param {object} opts\n * @param {number} [opts.limit = 131072] Number of bytes to read.\n * @param {AbortSignal} [opts.signal] An AbortSignal to cancel the dump.\n * @returns {Promise}\n */\n dump (opts) {\n const signal = opts?.signal\n\n if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) {\n return Promise.reject(new InvalidArgumentError('signal must be an AbortSignal'))\n }\n\n const limit = opts?.limit && Number.isFinite(opts.limit)\n ? opts.limit\n : 128 * 1024\n\n if (signal?.aborted) {\n return Promise.reject(signal.reason ?? new AbortError())\n }\n\n if (this._readableState.closeEmitted) {\n return Promise.resolve(null)\n }\n\n return new Promise((resolve, reject) => {\n if (\n (this[kContentLength] && (this[kContentLength] > limit)) ||\n this[kBytesRead] > limit\n ) {\n this.destroy(new AbortError())\n }\n\n if (signal) {\n const onAbort = () => {\n this.destroy(signal.reason ?? new AbortError())\n }\n signal.addEventListener('abort', onAbort)\n this\n .on('close', function () {\n signal.removeEventListener('abort', onAbort)\n if (signal.aborted) {\n reject(signal.reason ?? new AbortError())\n } else {\n resolve(null)\n }\n })\n } else {\n this.on('close', resolve)\n }\n\n this\n .on('error', noop)\n .on('data', () => {\n if (this[kBytesRead] > limit) {\n this.destroy()\n }\n })\n .resume()\n })\n }\n\n /**\n * @param {BufferEncoding} encoding\n * @returns {this}\n */\n setEncoding (encoding) {\n if (Buffer.isEncoding(encoding)) {\n this._readableState.encoding = encoding\n }\n return this\n }\n}\n\n/**\n * @see https://streams.spec.whatwg.org/#readablestream-locked\n * @param {BodyReadable} bodyReadable\n * @returns {boolean}\n */\nfunction isLocked (bodyReadable) {\n // Consume is an implicit lock.\n return bodyReadable[kBody]?.locked === true || bodyReadable[kConsume] !== null\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#body-unusable\n * @param {BodyReadable} bodyReadable\n * @returns {boolean}\n */\nfunction isUnusable (bodyReadable) {\n return util.isDisturbed(bodyReadable) || isLocked(bodyReadable)\n}\n\n/**\n * @typedef {'text' | 'json' | 'blob' | 'bytes' | 'arrayBuffer'} ConsumeType\n */\n\n/**\n * @template {ConsumeType} T\n * @typedef {T extends 'text' ? string :\n * T extends 'json' ? unknown :\n * T extends 'blob' ? Blob :\n * T extends 'arrayBuffer' ? ArrayBuffer :\n * T extends 'bytes' ? Uint8Array :\n * never\n * } ConsumeReturnType\n */\n/**\n * @typedef {object} Consume\n * @property {ConsumeType} type\n * @property {BodyReadable} stream\n * @property {((value?: any) => void)} resolve\n * @property {((err: Error) => void)} reject\n * @property {number} length\n * @property {Buffer[]} body\n */\n\n/**\n * @template {ConsumeType} T\n * @param {BodyReadable} stream\n * @param {T} type\n * @returns {Promise>}\n */\nfunction consume (stream, type) {\n assert(!stream[kConsume])\n\n return new Promise((resolve, reject) => {\n if (isUnusable(stream)) {\n const rState = stream._readableState\n if (rState.destroyed && rState.closeEmitted === false) {\n stream\n .on('error', reject)\n .on('close', () => {\n reject(new TypeError('unusable'))\n })\n } else {\n reject(rState.errored ?? new TypeError('unusable'))\n }\n } else {\n queueMicrotask(() => {\n stream[kConsume] = {\n type,\n stream,\n resolve,\n reject,\n length: 0,\n body: []\n }\n\n stream\n .on('error', function (err) {\n consumeFinish(this[kConsume], err)\n })\n .on('close', function () {\n if (this[kConsume].body !== null) {\n consumeFinish(this[kConsume], new RequestAbortedError())\n }\n })\n\n consumeStart(stream[kConsume])\n })\n }\n })\n}\n\n/**\n * @param {Consume} consume\n * @returns {void}\n */\nfunction consumeStart (consume) {\n if (consume.body === null) {\n return\n }\n\n const { _readableState: state } = consume.stream\n\n if (state.bufferIndex) {\n const start = state.bufferIndex\n const end = state.buffer.length\n for (let n = start; n < end; n++) {\n consumePush(consume, state.buffer[n])\n }\n } else {\n for (const chunk of state.buffer) {\n consumePush(consume, chunk)\n }\n }\n\n if (state.endEmitted) {\n consumeEnd(this[kConsume], this._readableState.encoding)\n } else {\n consume.stream.on('end', function () {\n consumeEnd(this[kConsume], this._readableState.encoding)\n })\n }\n\n consume.stream.resume()\n\n while (consume.stream.read() != null) {\n // Loop\n }\n}\n\n/**\n * @param {Buffer[]} chunks\n * @param {number} length\n * @param {BufferEncoding} [encoding='utf8']\n * @returns {string}\n */\nfunction chunksDecode (chunks, length, encoding) {\n if (chunks.length === 0 || length === 0) {\n return ''\n }\n const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length)\n const bufferLength = buffer.length\n\n // Skip BOM.\n const start =\n bufferLength > 2 &&\n buffer[0] === 0xef &&\n buffer[1] === 0xbb &&\n buffer[2] === 0xbf\n ? 3\n : 0\n if (!encoding || encoding === 'utf8' || encoding === 'utf-8') {\n return buffer.utf8Slice(start, bufferLength)\n } else {\n return buffer.subarray(start, bufferLength).toString(encoding)\n }\n}\n\n/**\n * @param {Buffer[]} chunks\n * @param {number} length\n * @returns {Uint8Array}\n */\nfunction chunksConcat (chunks, length) {\n if (chunks.length === 0 || length === 0) {\n return new Uint8Array(0)\n }\n if (chunks.length === 1) {\n // fast-path\n return new Uint8Array(chunks[0])\n }\n const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer)\n\n let offset = 0\n for (let i = 0; i < chunks.length; ++i) {\n const chunk = chunks[i]\n buffer.set(chunk, offset)\n offset += chunk.length\n }\n\n return buffer\n}\n\n/**\n * @param {Consume} consume\n * @param {BufferEncoding} encoding\n * @returns {void}\n */\nfunction consumeEnd (consume, encoding) {\n const { type, body, resolve, stream, length } = consume\n\n try {\n if (type === 'text') {\n resolve(chunksDecode(body, length, encoding))\n } else if (type === 'json') {\n resolve(JSON.parse(chunksDecode(body, length, encoding)))\n } else if (type === 'arrayBuffer') {\n resolve(chunksConcat(body, length).buffer)\n } else if (type === 'blob') {\n resolve(new Blob(body, { type: stream[kContentType] }))\n } else if (type === 'bytes') {\n resolve(chunksConcat(body, length))\n }\n\n consumeFinish(consume)\n } catch (err) {\n stream.destroy(err)\n }\n}\n\n/**\n * @param {Consume} consume\n * @param {Buffer} chunk\n * @returns {void}\n */\nfunction consumePush (consume, chunk) {\n consume.length += chunk.length\n consume.body.push(chunk)\n}\n\n/**\n * @param {Consume} consume\n * @param {Error} [err]\n * @returns {void}\n */\nfunction consumeFinish (consume, err) {\n if (consume.body === null) {\n return\n }\n\n if (err) {\n consume.reject(err)\n } else {\n consume.resolve()\n }\n\n // Reset the consume object to allow for garbage collection.\n consume.type = null\n consume.stream = null\n consume.resolve = null\n consume.reject = null\n consume.length = 0\n consume.body = null\n}\n\nmodule.exports = {\n Readable: BodyReadable,\n chunksDecode\n}\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { AsyncResource } = require('node:async_hooks')\nconst { Readable } = require('./readable')\nconst { InvalidArgumentError, RequestAbortedError } = require('../core/errors')\nconst util = require('../core/util')\n\nfunction noop () {}\n\nclass RequestHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n const { signal, method, opaque, body, onInfo, responseHeaders, highWaterMark } = opts\n\n try {\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) {\n throw new InvalidArgumentError('invalid highWaterMark')\n }\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_REQUEST')\n } catch (err) {\n if (util.isStream(body)) {\n util.destroy(body.on('error', noop), err)\n }\n throw err\n }\n\n this.method = method\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.callback = callback\n this.res = null\n this.abort = null\n this.body = body\n this.trailers = {}\n this.context = null\n this.onInfo = onInfo || null\n this.highWaterMark = highWaterMark\n this.reason = null\n this.removeAbortListener = null\n\n if (signal?.aborted) {\n this.reason = signal.reason ?? new RequestAbortedError()\n } else if (signal) {\n this.removeAbortListener = util.addAbortListener(signal, () => {\n this.reason = signal.reason ?? new RequestAbortedError()\n if (this.res) {\n util.destroy(this.res.on('error', noop), this.reason)\n } else if (this.abort) {\n this.abort(this.reason)\n }\n })\n }\n }\n\n onConnect (abort, context) {\n if (this.reason) {\n abort(this.reason)\n return\n }\n\n assert(this.callback)\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this\n\n const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n\n if (statusCode < 200) {\n if (this.onInfo) {\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers\n const contentType = parsedHeaders['content-type']\n const contentLength = parsedHeaders['content-length']\n const res = new Readable({\n resume,\n abort,\n contentType,\n contentLength: this.method !== 'HEAD' && contentLength\n ? Number(contentLength)\n : null,\n highWaterMark\n })\n\n if (this.removeAbortListener) {\n res.on('close', this.removeAbortListener)\n this.removeAbortListener = null\n }\n\n this.callback = null\n this.res = res\n if (callback !== null) {\n try {\n this.runInAsyncScope(callback, null, null, {\n statusCode,\n statusText: statusMessage,\n headers,\n trailers: this.trailers,\n opaque,\n body: res,\n context\n })\n } catch (err) {\n // If the callback throws synchronously, we need to handle it\n // Remove reference to res to allow res being garbage collected\n this.res = null\n\n // Destroy the response stream\n util.destroy(res.on('error', noop), err)\n\n // Use queueMicrotask to re-throw the error so it reaches uncaughtException\n queueMicrotask(() => {\n throw err\n })\n }\n }\n }\n\n onData (chunk) {\n return this.res.push(chunk)\n }\n\n onComplete (trailers) {\n util.parseHeaders(trailers, this.trailers)\n this.res.push(null)\n }\n\n onError (err) {\n const { res, callback, body, opaque } = this\n\n if (callback) {\n // TODO: Does this need queueMicrotask?\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n\n if (res) {\n this.res = null\n // Ensure all queued handlers are invoked before destroying res.\n queueMicrotask(() => {\n util.destroy(res.on('error', noop), err)\n })\n }\n\n if (body) {\n this.body = null\n\n if (util.isStream(body)) {\n body.on('error', noop)\n util.destroy(body, err)\n }\n }\n\n if (this.removeAbortListener) {\n this.removeAbortListener()\n this.removeAbortListener = null\n }\n }\n}\n\nfunction request (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n request.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n const handler = new RequestHandler(opts, callback)\n\n this.dispatch(opts, handler)\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts?.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = request\nmodule.exports.RequestHandler = RequestHandler\n", "'use strict'\n\nconst { addAbortListener } = require('../core/util')\nconst { RequestAbortedError } = require('../core/errors')\n\nconst kListener = Symbol('kListener')\nconst kSignal = Symbol('kSignal')\n\nfunction abort (self) {\n if (self.abort) {\n self.abort(self[kSignal]?.reason)\n } else {\n self.reason = self[kSignal]?.reason ?? new RequestAbortedError()\n }\n removeSignal(self)\n}\n\nfunction addSignal (self, signal) {\n self.reason = null\n\n self[kSignal] = null\n self[kListener] = null\n\n if (!signal) {\n return\n }\n\n if (signal.aborted) {\n abort(self)\n return\n }\n\n self[kSignal] = signal\n self[kListener] = () => {\n abort(self)\n }\n\n addAbortListener(self[kSignal], self[kListener])\n}\n\nfunction removeSignal (self) {\n if (!self[kSignal]) {\n return\n }\n\n if ('removeEventListener' in self[kSignal]) {\n self[kSignal].removeEventListener('abort', self[kListener])\n } else {\n self[kSignal].removeListener('abort', self[kListener])\n }\n\n self[kSignal] = null\n self[kListener] = null\n}\n\nmodule.exports = {\n addSignal,\n removeSignal\n}\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { finished } = require('node:stream')\nconst { AsyncResource } = require('node:async_hooks')\nconst { InvalidArgumentError, InvalidReturnValueError } = require('../core/errors')\nconst util = require('../core/util')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nfunction noop () {}\n\nclass StreamHandler extends AsyncResource {\n constructor (opts, factory, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n const { signal, method, opaque, body, onInfo, responseHeaders } = opts\n\n try {\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n if (typeof factory !== 'function') {\n throw new InvalidArgumentError('invalid factory')\n }\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_STREAM')\n } catch (err) {\n if (util.isStream(body)) {\n util.destroy(body.on('error', noop), err)\n }\n throw err\n }\n\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.factory = factory\n this.callback = callback\n this.res = null\n this.abort = null\n this.context = null\n this.trailers = null\n this.body = body\n this.onInfo = onInfo || null\n\n if (util.isStream(body)) {\n body.on('error', (err) => {\n this.onError(err)\n })\n }\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (this.reason) {\n abort(this.reason)\n return\n }\n\n assert(this.callback)\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume, statusMessage) {\n const { factory, opaque, context, responseHeaders } = this\n\n const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n\n if (statusCode < 200) {\n if (this.onInfo) {\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n this.factory = null\n\n if (factory === null) {\n return\n }\n\n const res = this.runInAsyncScope(factory, null, {\n statusCode,\n headers,\n opaque,\n context\n })\n\n if (\n !res ||\n typeof res.write !== 'function' ||\n typeof res.end !== 'function' ||\n typeof res.on !== 'function'\n ) {\n throw new InvalidReturnValueError('expected Writable')\n }\n\n // TODO: Avoid finished. It registers an unnecessary amount of listeners.\n finished(res, { readable: false }, (err) => {\n const { callback, res, opaque, trailers, abort } = this\n\n this.res = null\n if (err || !res?.readable) {\n util.destroy(res, err)\n }\n\n this.callback = null\n this.runInAsyncScope(callback, null, err || null, { opaque, trailers })\n\n if (err) {\n abort()\n }\n })\n\n res.on('drain', resume)\n\n this.res = res\n\n const needDrain = res.writableNeedDrain !== undefined\n ? res.writableNeedDrain\n : res._writableState?.needDrain\n\n return needDrain !== true\n }\n\n onData (chunk) {\n const { res } = this\n\n return res ? res.write(chunk) : true\n }\n\n onComplete (trailers) {\n const { res } = this\n\n removeSignal(this)\n\n if (!res) {\n return\n }\n\n this.trailers = util.parseHeaders(trailers)\n\n res.end()\n }\n\n onError (err) {\n const { res, callback, opaque, body } = this\n\n removeSignal(this)\n\n this.factory = null\n\n if (res) {\n this.res = null\n util.destroy(res, err)\n } else if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n\n if (body) {\n this.body = null\n util.destroy(body, err)\n }\n }\n}\n\nfunction stream (opts, factory, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n stream.call(this, opts, factory, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n const handler = new StreamHandler(opts, factory, callback)\n\n this.dispatch(opts, handler)\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts?.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = stream\n", "'use strict'\n\nconst {\n Readable,\n Duplex,\n PassThrough\n} = require('node:stream')\nconst assert = require('node:assert')\nconst { AsyncResource } = require('node:async_hooks')\nconst {\n InvalidArgumentError,\n InvalidReturnValueError,\n RequestAbortedError\n} = require('../core/errors')\nconst util = require('../core/util')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nfunction noop () {}\n\nconst kResume = Symbol('resume')\n\nclass PipelineRequest extends Readable {\n constructor () {\n super({ autoDestroy: true })\n\n this[kResume] = null\n }\n\n _read () {\n const { [kResume]: resume } = this\n\n if (resume) {\n this[kResume] = null\n resume()\n }\n }\n\n _destroy (err, callback) {\n this._read()\n\n callback(err)\n }\n}\n\nclass PipelineResponse extends Readable {\n constructor (resume) {\n super({ autoDestroy: true })\n this[kResume] = resume\n }\n\n _read () {\n this[kResume]()\n }\n\n _destroy (err, callback) {\n if (!err && !this._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n callback(err)\n }\n}\n\nclass PipelineHandler extends AsyncResource {\n constructor (opts, handler) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof handler !== 'function') {\n throw new InvalidArgumentError('invalid handler')\n }\n\n const { signal, method, opaque, onInfo, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n if (method === 'CONNECT') {\n throw new InvalidArgumentError('invalid method')\n }\n\n if (onInfo && typeof onInfo !== 'function') {\n throw new InvalidArgumentError('invalid onInfo callback')\n }\n\n super('UNDICI_PIPELINE')\n\n this.opaque = opaque || null\n this.responseHeaders = responseHeaders || null\n this.handler = handler\n this.abort = null\n this.context = null\n this.onInfo = onInfo || null\n\n this.req = new PipelineRequest().on('error', noop)\n\n this.ret = new Duplex({\n readableObjectMode: opts.objectMode,\n autoDestroy: true,\n read: () => {\n const { body } = this\n\n if (body?.resume) {\n body.resume()\n }\n },\n write: (chunk, encoding, callback) => {\n const { req } = this\n\n if (req.push(chunk, encoding) || req._readableState.destroyed) {\n callback()\n } else {\n req[kResume] = callback\n }\n },\n destroy: (err, callback) => {\n const { body, req, res, ret, abort } = this\n\n if (!err && !ret._readableState.endEmitted) {\n err = new RequestAbortedError()\n }\n\n if (abort && err) {\n abort()\n }\n\n util.destroy(body, err)\n util.destroy(req, err)\n util.destroy(res, err)\n\n removeSignal(this)\n\n callback(err)\n }\n }).on('prefinish', () => {\n const { req } = this\n\n // Node < 15 does not call _final in same tick.\n req.push(null)\n })\n\n this.res = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n const { res } = this\n\n if (this.reason) {\n abort(this.reason)\n return\n }\n\n assert(!res, 'pipeline cannot be retried')\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders (statusCode, rawHeaders, resume) {\n const { opaque, handler, context } = this\n\n if (statusCode < 200) {\n if (this.onInfo) {\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n this.onInfo({ statusCode, headers })\n }\n return\n }\n\n this.res = new PipelineResponse(resume)\n\n let body\n try {\n this.handler = null\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n body = this.runInAsyncScope(handler, null, {\n statusCode,\n headers,\n opaque,\n body: this.res,\n context\n })\n } catch (err) {\n this.res.on('error', noop)\n throw err\n }\n\n if (!body || typeof body.on !== 'function') {\n throw new InvalidReturnValueError('expected Readable')\n }\n\n body\n .on('data', (chunk) => {\n const { ret, body } = this\n\n if (!ret.push(chunk) && body.pause) {\n body.pause()\n }\n })\n .on('error', (err) => {\n const { ret } = this\n\n util.destroy(ret, err)\n })\n .on('end', () => {\n const { ret } = this\n\n ret.push(null)\n })\n .on('close', () => {\n const { ret } = this\n\n if (!ret._readableState.ended) {\n util.destroy(ret, new RequestAbortedError())\n }\n })\n\n this.body = body\n }\n\n onData (chunk) {\n const { res } = this\n return res.push(chunk)\n }\n\n onComplete (trailers) {\n const { res } = this\n res.push(null)\n }\n\n onError (err) {\n const { ret } = this\n this.handler = null\n util.destroy(ret, err)\n }\n}\n\nfunction pipeline (opts, handler) {\n try {\n const pipelineHandler = new PipelineHandler(opts, handler)\n this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler)\n return pipelineHandler.ret\n } catch (err) {\n return new PassThrough().destroy(err)\n }\n}\n\nmodule.exports = pipeline\n", "'use strict'\n\nconst { InvalidArgumentError, SocketError } = require('../core/errors')\nconst { AsyncResource } = require('node:async_hooks')\nconst assert = require('node:assert')\nconst util = require('../core/util')\nconst { kHTTP2Stream } = require('../core/symbols')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nclass UpgradeHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n const { signal, opaque, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n super('UNDICI_UPGRADE')\n\n this.responseHeaders = responseHeaders || null\n this.opaque = opaque || null\n this.callback = callback\n this.abort = null\n this.context = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (this.reason) {\n abort(this.reason)\n return\n }\n\n assert(this.callback)\n\n this.abort = abort\n this.context = null\n }\n\n onHeaders () {\n throw new SocketError('bad upgrade', null)\n }\n\n onUpgrade (statusCode, rawHeaders, socket) {\n assert(socket[kHTTP2Stream] === true ? statusCode === 200 : statusCode === 101)\n\n const { callback, opaque, context } = this\n\n removeSignal(this)\n\n this.callback = null\n const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n this.runInAsyncScope(callback, null, null, {\n headers,\n socket,\n opaque,\n context\n })\n }\n\n onError (err) {\n const { callback, opaque } = this\n\n removeSignal(this)\n\n if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n }\n}\n\nfunction upgrade (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n upgrade.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n const upgradeHandler = new UpgradeHandler(opts, callback)\n const upgradeOpts = {\n ...opts,\n method: opts.method || 'GET',\n upgrade: opts.protocol || 'Websocket'\n }\n\n this.dispatch(upgradeOpts, upgradeHandler)\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts?.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = upgrade\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { AsyncResource } = require('node:async_hooks')\nconst { InvalidArgumentError, SocketError } = require('../core/errors')\nconst util = require('../core/util')\nconst { addSignal, removeSignal } = require('./abort-signal')\n\nclass ConnectHandler extends AsyncResource {\n constructor (opts, callback) {\n if (!opts || typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (typeof callback !== 'function') {\n throw new InvalidArgumentError('invalid callback')\n }\n\n const { signal, opaque, responseHeaders } = opts\n\n if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') {\n throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget')\n }\n\n super('UNDICI_CONNECT')\n\n this.opaque = opaque || null\n this.responseHeaders = responseHeaders || null\n this.callback = callback\n this.abort = null\n\n addSignal(this, signal)\n }\n\n onConnect (abort, context) {\n if (this.reason) {\n abort(this.reason)\n return\n }\n\n assert(this.callback)\n\n this.abort = abort\n this.context = context\n }\n\n onHeaders () {\n throw new SocketError('bad connect', null)\n }\n\n onUpgrade (statusCode, rawHeaders, socket) {\n const { callback, opaque, context } = this\n\n removeSignal(this)\n\n this.callback = null\n\n let headers = rawHeaders\n // Indicates is an HTTP2Session\n if (headers != null) {\n headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders)\n }\n\n this.runInAsyncScope(callback, null, null, {\n statusCode,\n headers,\n socket,\n opaque,\n context\n })\n }\n\n onError (err) {\n const { callback, opaque } = this\n\n removeSignal(this)\n\n if (callback) {\n this.callback = null\n queueMicrotask(() => {\n this.runInAsyncScope(callback, null, err, { opaque })\n })\n }\n }\n}\n\nfunction connect (opts, callback) {\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n connect.call(this, opts, (err, data) => {\n return err ? reject(err) : resolve(data)\n })\n })\n }\n\n try {\n const connectHandler = new ConnectHandler(opts, callback)\n const connectOptions = { ...opts, method: 'CONNECT' }\n\n this.dispatch(connectOptions, connectHandler)\n } catch (err) {\n if (typeof callback !== 'function') {\n throw err\n }\n const opaque = opts?.opaque\n queueMicrotask(() => callback(err, { opaque }))\n }\n}\n\nmodule.exports = connect\n", "'use strict'\n\nmodule.exports.request = require('./api-request')\nmodule.exports.stream = require('./api-stream')\nmodule.exports.pipeline = require('./api-pipeline')\nmodule.exports.upgrade = require('./api-upgrade')\nmodule.exports.connect = require('./api-connect')\n", "'use strict'\n\nconst { UndiciError } = require('../core/errors')\n\nconst kMockNotMatchedError = Symbol.for('undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED')\n\n/**\n * The request does not match any registered mock dispatches.\n */\nclass MockNotMatchedError extends UndiciError {\n constructor (message) {\n super(message)\n this.name = 'MockNotMatchedError'\n this.message = message || 'The request does not match any registered mock dispatches'\n this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED'\n }\n\n static [Symbol.hasInstance] (instance) {\n return instance && instance[kMockNotMatchedError] === true\n }\n\n get [kMockNotMatchedError] () {\n return true\n }\n}\n\nmodule.exports = {\n MockNotMatchedError\n}\n", "'use strict'\n\nmodule.exports = {\n kAgent: Symbol('agent'),\n kOptions: Symbol('options'),\n kFactory: Symbol('factory'),\n kDispatches: Symbol('dispatches'),\n kDispatchKey: Symbol('dispatch key'),\n kDefaultHeaders: Symbol('default headers'),\n kDefaultTrailers: Symbol('default trailers'),\n kContentLength: Symbol('content length'),\n kMockAgent: Symbol('mock agent'),\n kMockAgentSet: Symbol('mock agent set'),\n kMockAgentGet: Symbol('mock agent get'),\n kMockDispatch: Symbol('mock dispatch'),\n kClose: Symbol('close'),\n kOriginalClose: Symbol('original agent close'),\n kOriginalDispatch: Symbol('original dispatch'),\n kOrigin: Symbol('origin'),\n kIsMockActive: Symbol('is mock active'),\n kNetConnect: Symbol('net connect'),\n kGetNetConnect: Symbol('get net connect'),\n kConnected: Symbol('connected'),\n kIgnoreTrailingSlash: Symbol('ignore trailing slash'),\n kMockAgentMockCallHistoryInstance: Symbol('mock agent mock call history name'),\n kMockAgentRegisterCallHistory: Symbol('mock agent register mock call history'),\n kMockAgentAddCallHistoryLog: Symbol('mock agent add call history log'),\n kMockAgentIsCallHistoryEnabled: Symbol('mock agent is call history enabled'),\n kMockAgentAcceptsNonStandardSearchParameters: Symbol('mock agent accepts non standard search parameters'),\n kMockCallHistoryAddLog: Symbol('mock call history add log'),\n kTotalDispatchCount: Symbol('total dispatch count')\n}\n", "'use strict'\n\nconst { MockNotMatchedError } = require('./mock-errors')\nconst {\n kDispatches,\n kMockAgent,\n kOriginalDispatch,\n kOrigin,\n kGetNetConnect,\n kTotalDispatchCount\n} = require('./mock-symbols')\nconst { serializePathWithQuery } = require('../core/util')\nconst { STATUS_CODES } = require('node:http')\nconst {\n types: {\n isPromise\n }\n} = require('node:util')\nconst { InvalidArgumentError } = require('../core/errors')\n\nfunction matchValue (match, value) {\n if (typeof match === 'string') {\n return match === value\n }\n if (match instanceof RegExp) {\n return match.test(value)\n }\n if (typeof match === 'function') {\n return match(value) === true\n }\n return false\n}\n\nfunction lowerCaseEntries (headers) {\n return Object.fromEntries(\n Object.entries(headers).map(([headerName, headerValue]) => {\n return [headerName.toLocaleLowerCase(), headerValue]\n })\n )\n}\n\n/**\n * @param {import('../../index').Headers|string[]|Record} headers\n * @param {string} key\n */\nfunction getHeaderByName (headers, key) {\n if (Array.isArray(headers)) {\n for (let i = 0; i < headers.length; i += 2) {\n if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) {\n return headers[i + 1]\n }\n }\n\n return undefined\n } else if (typeof headers.get === 'function') {\n return headers.get(key)\n } else {\n return lowerCaseEntries(headers)[key.toLocaleLowerCase()]\n }\n}\n\n/** @param {string[]} headers */\nfunction buildHeadersFromArray (headers) { // fetch HeadersList\n const clone = headers.slice()\n const entries = []\n for (let index = 0; index < clone.length; index += 2) {\n entries.push([clone[index], clone[index + 1]])\n }\n return Object.fromEntries(entries)\n}\n\nfunction matchHeaders (mockDispatch, headers) {\n if (typeof mockDispatch.headers === 'function') {\n if (Array.isArray(headers)) { // fetch HeadersList\n headers = buildHeadersFromArray(headers)\n }\n return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {})\n }\n if (typeof mockDispatch.headers === 'undefined') {\n return true\n }\n if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') {\n return false\n }\n\n for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) {\n const headerValue = getHeaderByName(headers, matchHeaderName)\n\n if (!matchValue(matchHeaderValue, headerValue)) {\n return false\n }\n }\n return true\n}\n\nfunction normalizeSearchParams (query) {\n if (typeof query !== 'string') {\n return query\n }\n\n const originalQp = new URLSearchParams(query)\n const normalizedQp = new URLSearchParams()\n\n for (let [key, value] of originalQp.entries()) {\n key = key.replace('[]', '')\n\n const valueRepresentsString = /^(['\"]).*\\1$/.test(value)\n if (valueRepresentsString) {\n normalizedQp.append(key, value)\n continue\n }\n\n if (value.includes(',')) {\n const values = value.split(',')\n for (const v of values) {\n normalizedQp.append(key, v)\n }\n continue\n }\n\n normalizedQp.append(key, value)\n }\n\n return normalizedQp\n}\n\nfunction safeUrl (path) {\n if (typeof path !== 'string') {\n return path\n }\n const pathSegments = path.split('?', 3)\n if (pathSegments.length !== 2) {\n return path\n }\n\n const qp = new URLSearchParams(pathSegments.pop())\n qp.sort()\n return [...pathSegments, qp.toString()].join('?')\n}\n\nfunction matchKey (mockDispatch, { path, method, body, headers }) {\n const pathMatch = matchValue(mockDispatch.path, path)\n const methodMatch = matchValue(mockDispatch.method, method)\n const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true\n const headersMatch = matchHeaders(mockDispatch, headers)\n return pathMatch && methodMatch && bodyMatch && headersMatch\n}\n\nfunction getResponseData (data) {\n if (Buffer.isBuffer(data)) {\n return data\n } else if (data instanceof Uint8Array) {\n return data\n } else if (data instanceof ArrayBuffer) {\n return data\n } else if (typeof data === 'object') {\n return JSON.stringify(data)\n } else if (data) {\n return data.toString()\n } else {\n return ''\n }\n}\n\nfunction getMockDispatch (mockDispatches, key) {\n const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path\n const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath\n\n const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath)\n\n // Match path\n let matchedMockDispatches = mockDispatches\n .filter(({ consumed }) => !consumed)\n .filter(({ path, ignoreTrailingSlash }) => {\n return ignoreTrailingSlash\n ? matchValue(removeTrailingSlash(safeUrl(path)), resolvedPathWithoutTrailingSlash)\n : matchValue(safeUrl(path), resolvedPath)\n })\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`)\n }\n\n // Match method\n matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method))\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`)\n }\n\n // Match body\n matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true)\n if (matchedMockDispatches.length === 0) {\n throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`)\n }\n\n // Match headers\n matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers))\n if (matchedMockDispatches.length === 0) {\n const headers = typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers\n throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`)\n }\n\n return matchedMockDispatches[0]\n}\n\nfunction addMockDispatch (mockDispatches, key, data, opts) {\n const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false, ...opts }\n const replyData = typeof data === 'function' ? { callback: data } : { ...data }\n const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } }\n mockDispatches.push(newMockDispatch)\n // Track total number of intercepts ever registered for better error messages\n mockDispatches[kTotalDispatchCount] = (mockDispatches[kTotalDispatchCount] || 0) + 1\n return newMockDispatch\n}\n\nfunction deleteMockDispatch (mockDispatches, key) {\n const index = mockDispatches.findIndex(dispatch => {\n if (!dispatch.consumed) {\n return false\n }\n return matchKey(dispatch, key)\n })\n if (index !== -1) {\n mockDispatches.splice(index, 1)\n }\n}\n\n/**\n * @param {string} path Path to remove trailing slash from\n */\nfunction removeTrailingSlash (path) {\n while (path.endsWith('/')) {\n path = path.slice(0, -1)\n }\n\n if (path.length === 0) {\n path = '/'\n }\n\n return path\n}\n\nfunction buildKey (opts) {\n const { path, method, body, headers, query } = opts\n\n return {\n path,\n method,\n body,\n headers,\n query\n }\n}\n\nfunction generateKeyValues (data) {\n const keys = Object.keys(data)\n const result = []\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i]\n const value = data[key]\n const name = Buffer.from(`${key}`)\n if (Array.isArray(value)) {\n for (let j = 0; j < value.length; ++j) {\n result.push(name, Buffer.from(`${value[j]}`))\n }\n } else {\n result.push(name, Buffer.from(`${value}`))\n }\n }\n return result\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status\n * @param {number} statusCode\n */\nfunction getStatusText (statusCode) {\n return STATUS_CODES[statusCode] || 'unknown'\n}\n\nasync function getResponse (body) {\n const buffers = []\n for await (const data of body) {\n buffers.push(data)\n }\n return Buffer.concat(buffers).toString('utf8')\n}\n\n/**\n * Mock dispatch function used to simulate undici dispatches\n */\nfunction mockDispatch (opts, handler) {\n // Get mock dispatch from built key\n const key = buildKey(opts)\n const mockDispatch = getMockDispatch(this[kDispatches], key)\n\n mockDispatch.timesInvoked++\n\n // Here's where we resolve a callback if a callback is present for the dispatch data.\n if (mockDispatch.data.callback) {\n mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) }\n }\n\n // Parse mockDispatch data\n const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch\n const { timesInvoked, times } = mockDispatch\n\n // If it's used up and not persistent, mark as consumed\n mockDispatch.consumed = !persist && timesInvoked >= times\n mockDispatch.pending = timesInvoked < times\n\n // If specified, trigger dispatch error\n if (error !== null) {\n deleteMockDispatch(this[kDispatches], key)\n handler.onError(error)\n return true\n }\n\n // Track whether the request has been aborted\n let aborted = false\n let timer = null\n\n function abort (err) {\n if (aborted) {\n return\n }\n aborted = true\n\n // Clear the pending delayed response if any\n if (timer !== null) {\n clearTimeout(timer)\n timer = null\n }\n\n // Notify the handler of the abort\n handler.onError(err)\n }\n\n // Call onConnect to allow the handler to register the abort callback\n handler.onConnect?.(abort, null)\n\n // Handle the request with a delay if necessary\n if (typeof delay === 'number' && delay > 0) {\n timer = setTimeout(() => {\n timer = null\n handleReply(this[kDispatches])\n }, delay)\n } else {\n handleReply(this[kDispatches])\n }\n\n function handleReply (mockDispatches, _data = data) {\n // Don't send response if the request was aborted\n if (aborted) {\n return\n }\n\n // fetch's HeadersList is a 1D string array\n const optsHeaders = Array.isArray(opts.headers)\n ? buildHeadersFromArray(opts.headers)\n : opts.headers\n const body = typeof _data === 'function'\n ? _data({ ...opts, headers: optsHeaders })\n : _data\n\n // util.types.isPromise is likely needed for jest.\n if (isPromise(body)) {\n // If handleReply is asynchronous, throwing an error\n // in the callback will reject the promise, rather than\n // synchronously throw the error, which breaks some tests.\n // Rather, we wait for the callback to resolve if it is a\n // promise, and then re-run handleReply with the new body.\n return body.then((newData) => handleReply(mockDispatches, newData))\n }\n\n // Check again if aborted after async body resolution\n if (aborted) {\n return\n }\n\n const responseData = getResponseData(body)\n const responseHeaders = generateKeyValues(headers)\n const responseTrailers = generateKeyValues(trailers)\n\n handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode))\n handler.onData?.(Buffer.from(responseData))\n handler.onComplete?.(responseTrailers)\n deleteMockDispatch(mockDispatches, key)\n }\n\n function resume () {}\n\n return true\n}\n\nfunction buildMockDispatch () {\n const agent = this[kMockAgent]\n const origin = this[kOrigin]\n const originalDispatch = this[kOriginalDispatch]\n\n return function dispatch (opts, handler) {\n if (agent.isMockActive) {\n try {\n mockDispatch.call(this, opts, handler)\n } catch (error) {\n if (error.code === 'UND_MOCK_ERR_MOCK_NOT_MATCHED') {\n const netConnect = agent[kGetNetConnect]()\n const totalInterceptsCount = this[kDispatches][kTotalDispatchCount] || this[kDispatches].length\n const pendingInterceptsCount = this[kDispatches].filter(({ consumed }) => !consumed).length\n const interceptsMessage = `, ${pendingInterceptsCount} interceptor(s) remaining out of ${totalInterceptsCount} defined`\n if (netConnect === false) {\n throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)${interceptsMessage}`)\n }\n if (checkNetConnect(netConnect, origin)) {\n originalDispatch.call(this, opts, handler)\n } else {\n throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)${interceptsMessage}`)\n }\n } else {\n throw error\n }\n }\n } else {\n originalDispatch.call(this, opts, handler)\n }\n }\n}\n\nfunction checkNetConnect (netConnect, origin) {\n const url = new URL(origin)\n if (netConnect === true) {\n return true\n } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) {\n return true\n }\n return false\n}\n\nfunction normalizeOrigin (origin) {\n if (typeof origin !== 'string' && !(origin instanceof URL)) {\n return origin\n }\n\n if (origin instanceof URL) {\n return origin.origin\n }\n\n return origin.toLowerCase()\n}\n\nfunction buildAndValidateMockOptions (opts) {\n const { agent, ...mockOptions } = opts\n\n if ('enableCallHistory' in mockOptions && typeof mockOptions.enableCallHistory !== 'boolean') {\n throw new InvalidArgumentError('options.enableCallHistory must to be a boolean')\n }\n\n if ('acceptNonStandardSearchParameters' in mockOptions && typeof mockOptions.acceptNonStandardSearchParameters !== 'boolean') {\n throw new InvalidArgumentError('options.acceptNonStandardSearchParameters must to be a boolean')\n }\n\n if ('ignoreTrailingSlash' in mockOptions && typeof mockOptions.ignoreTrailingSlash !== 'boolean') {\n throw new InvalidArgumentError('options.ignoreTrailingSlash must to be a boolean')\n }\n\n return mockOptions\n}\n\nmodule.exports = {\n getResponseData,\n getMockDispatch,\n addMockDispatch,\n deleteMockDispatch,\n buildKey,\n generateKeyValues,\n matchValue,\n getResponse,\n getStatusText,\n mockDispatch,\n buildMockDispatch,\n checkNetConnect,\n buildAndValidateMockOptions,\n getHeaderByName,\n buildHeadersFromArray,\n normalizeSearchParams,\n normalizeOrigin\n}\n", "'use strict'\n\nconst { getResponseData, buildKey, addMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kDispatchKey,\n kDefaultHeaders,\n kDefaultTrailers,\n kContentLength,\n kMockDispatch,\n kIgnoreTrailingSlash\n} = require('./mock-symbols')\nconst { InvalidArgumentError } = require('../core/errors')\nconst { serializePathWithQuery } = require('../core/util')\n\n/**\n * Defines the scope API for an interceptor reply\n */\nclass MockScope {\n constructor (mockDispatch) {\n this[kMockDispatch] = mockDispatch\n }\n\n /**\n * Delay a reply by a set amount in ms.\n */\n delay (waitInMs) {\n if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) {\n throw new InvalidArgumentError('waitInMs must be a valid integer > 0')\n }\n\n this[kMockDispatch].delay = waitInMs\n return this\n }\n\n /**\n * For a defined reply, never mark as consumed.\n */\n persist () {\n this[kMockDispatch].persist = true\n return this\n }\n\n /**\n * Allow one to define a reply for a set amount of matching requests.\n */\n times (repeatTimes) {\n if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) {\n throw new InvalidArgumentError('repeatTimes must be a valid integer > 0')\n }\n\n this[kMockDispatch].times = repeatTimes\n return this\n }\n}\n\n/**\n * Defines an interceptor for a Mock\n */\nclass MockInterceptor {\n constructor (opts, mockDispatches) {\n if (typeof opts !== 'object') {\n throw new InvalidArgumentError('opts must be an object')\n }\n if (typeof opts.path === 'undefined') {\n throw new InvalidArgumentError('opts.path must be defined')\n }\n if (typeof opts.method === 'undefined') {\n opts.method = 'GET'\n }\n // See https://github.com/nodejs/undici/issues/1245\n // As per RFC 3986, clients are not supposed to send URI\n // fragments to servers when they retrieve a document,\n if (typeof opts.path === 'string') {\n if (opts.query) {\n opts.path = serializePathWithQuery(opts.path, opts.query)\n } else {\n // Matches https://github.com/nodejs/undici/blob/main/lib/web/fetch/index.js#L1811\n const parsedURL = new URL(opts.path, 'data://')\n opts.path = parsedURL.pathname + parsedURL.search\n }\n }\n if (typeof opts.method === 'string') {\n opts.method = opts.method.toUpperCase()\n }\n\n this[kDispatchKey] = buildKey(opts)\n this[kDispatches] = mockDispatches\n this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false\n this[kDefaultHeaders] = {}\n this[kDefaultTrailers] = {}\n this[kContentLength] = false\n }\n\n createMockScopeDispatchData ({ statusCode, data, responseOptions }) {\n const responseData = getResponseData(data)\n const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {}\n const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers }\n const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers }\n\n return { statusCode, data, headers, trailers }\n }\n\n validateReplyParameters (replyParameters) {\n if (typeof replyParameters.statusCode === 'undefined') {\n throw new InvalidArgumentError('statusCode must be defined')\n }\n if (typeof replyParameters.responseOptions !== 'object' || replyParameters.responseOptions === null) {\n throw new InvalidArgumentError('responseOptions must be an object')\n }\n }\n\n /**\n * Mock an undici request with a defined reply.\n */\n reply (replyOptionsCallbackOrStatusCode) {\n // Values of reply aren't available right now as they\n // can only be available when the reply callback is invoked.\n if (typeof replyOptionsCallbackOrStatusCode === 'function') {\n // We'll first wrap the provided callback in another function,\n // this function will properly resolve the data from the callback\n // when invoked.\n const wrappedDefaultsCallback = (opts) => {\n // Our reply options callback contains the parameter for statusCode, data and options.\n const resolvedData = replyOptionsCallbackOrStatusCode(opts)\n\n // Check if it is in the right format\n if (typeof resolvedData !== 'object' || resolvedData === null) {\n throw new InvalidArgumentError('reply options callback must return an object')\n }\n\n const replyParameters = { data: '', responseOptions: {}, ...resolvedData }\n this.validateReplyParameters(replyParameters)\n // Since the values can be obtained immediately we return them\n // from this higher order function that will be resolved later.\n return {\n ...this.createMockScopeDispatchData(replyParameters)\n }\n }\n\n // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data.\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] })\n return new MockScope(newMockDispatch)\n }\n\n // We can have either one or three parameters, if we get here,\n // we should have 1-3 parameters. So we spread the arguments of\n // this function to obtain the parameters, since replyData will always\n // just be the statusCode.\n const replyParameters = {\n statusCode: replyOptionsCallbackOrStatusCode,\n data: arguments[1] === undefined ? '' : arguments[1],\n responseOptions: arguments[2] === undefined ? {} : arguments[2]\n }\n this.validateReplyParameters(replyParameters)\n\n // Send in-already provided data like usual\n const dispatchData = this.createMockScopeDispatchData(replyParameters)\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] })\n return new MockScope(newMockDispatch)\n }\n\n /**\n * Mock an undici request with a defined error.\n */\n replyWithError (error) {\n if (typeof error === 'undefined') {\n throw new InvalidArgumentError('error must be defined')\n }\n\n const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] })\n return new MockScope(newMockDispatch)\n }\n\n /**\n * Set default reply headers on the interceptor for subsequent replies\n */\n defaultReplyHeaders (headers) {\n if (typeof headers === 'undefined') {\n throw new InvalidArgumentError('headers must be defined')\n }\n\n this[kDefaultHeaders] = headers\n return this\n }\n\n /**\n * Set default reply trailers on the interceptor for subsequent replies\n */\n defaultReplyTrailers (trailers) {\n if (typeof trailers === 'undefined') {\n throw new InvalidArgumentError('trailers must be defined')\n }\n\n this[kDefaultTrailers] = trailers\n return this\n }\n\n /**\n * Set reply content length header for replies on the interceptor\n */\n replyContentLength () {\n this[kContentLength] = true\n return this\n }\n}\n\nmodule.exports.MockInterceptor = MockInterceptor\nmodule.exports.MockScope = MockScope\n", "'use strict'\n\nconst { promisify } = require('node:util')\nconst Client = require('../dispatcher/client')\nconst { buildMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kMockAgent,\n kClose,\n kOriginalClose,\n kOrigin,\n kOriginalDispatch,\n kConnected,\n kIgnoreTrailingSlash\n} = require('./mock-symbols')\nconst { MockInterceptor } = require('./mock-interceptor')\nconst Symbols = require('../core/symbols')\nconst { InvalidArgumentError } = require('../core/errors')\n\n/**\n * MockClient provides an API that extends the Client to influence the mockDispatches.\n */\nclass MockClient extends Client {\n constructor (origin, opts) {\n if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n\n super(origin, opts)\n\n this[kMockAgent] = opts.agent\n this[kOrigin] = origin\n this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false\n this[kDispatches] = []\n this[kConnected] = 1\n this[kOriginalDispatch] = this.dispatch\n this[kOriginalClose] = this.close.bind(this)\n\n this.dispatch = buildMockDispatch.call(this)\n this.close = this[kClose]\n }\n\n get [Symbols.kConnected] () {\n return this[kConnected]\n }\n\n /**\n * Sets up the base interceptor for mocking replies from undici.\n */\n intercept (opts) {\n return new MockInterceptor(\n opts && { ignoreTrailingSlash: this[kIgnoreTrailingSlash], ...opts },\n this[kDispatches]\n )\n }\n\n cleanMocks () {\n this[kDispatches] = []\n }\n\n async [kClose] () {\n await promisify(this[kOriginalClose])()\n this[kConnected] = 0\n this[kMockAgent][Symbols.kClients].delete(this[kOrigin])\n }\n}\n\nmodule.exports = MockClient\n", "'use strict'\n\nconst { kMockCallHistoryAddLog } = require('./mock-symbols')\nconst { InvalidArgumentError } = require('../core/errors')\n\nfunction handleFilterCallsWithOptions (criteria, options, handler, store) {\n switch (options.operator) {\n case 'OR':\n store.push(...handler(criteria))\n\n return store\n case 'AND':\n return handler.call({ logs: store }, criteria)\n default:\n // guard -- should never happens because buildAndValidateFilterCallsOptions is called before\n throw new InvalidArgumentError('options.operator must to be a case insensitive string equal to \\'OR\\' or \\'AND\\'')\n }\n}\n\nfunction buildAndValidateFilterCallsOptions (options = {}) {\n const finalOptions = {}\n\n if ('operator' in options) {\n if (typeof options.operator !== 'string' || (options.operator.toUpperCase() !== 'OR' && options.operator.toUpperCase() !== 'AND')) {\n throw new InvalidArgumentError('options.operator must to be a case insensitive string equal to \\'OR\\' or \\'AND\\'')\n }\n\n return {\n ...finalOptions,\n operator: options.operator.toUpperCase()\n }\n }\n\n return finalOptions\n}\n\nfunction makeFilterCalls (parameterName) {\n return (parameterValue) => {\n if (typeof parameterValue === 'string' || parameterValue == null) {\n return this.logs.filter((log) => {\n return log[parameterName] === parameterValue\n })\n }\n if (parameterValue instanceof RegExp) {\n return this.logs.filter((log) => {\n return parameterValue.test(log[parameterName])\n })\n }\n\n throw new InvalidArgumentError(`${parameterName} parameter should be one of string, regexp, undefined or null`)\n }\n}\nfunction computeUrlWithMaybeSearchParameters (requestInit) {\n // path can contains query url parameters\n // or query can contains query url parameters\n try {\n const url = new URL(requestInit.path, requestInit.origin)\n\n // requestInit.path contains query url parameters\n // requestInit.query is then undefined\n if (url.search.length !== 0) {\n return url\n }\n\n // requestInit.query can be populated here\n url.search = new URLSearchParams(requestInit.query).toString()\n\n return url\n } catch (error) {\n throw new InvalidArgumentError('An error occurred when computing MockCallHistoryLog.url', { cause: error })\n }\n}\n\nclass MockCallHistoryLog {\n constructor (requestInit = {}) {\n this.body = requestInit.body\n this.headers = requestInit.headers\n this.method = requestInit.method\n\n const url = computeUrlWithMaybeSearchParameters(requestInit)\n\n this.fullUrl = url.toString()\n this.origin = url.origin\n this.path = url.pathname\n this.searchParams = Object.fromEntries(url.searchParams)\n this.protocol = url.protocol\n this.host = url.host\n this.port = url.port\n this.hash = url.hash\n }\n\n toMap () {\n return new Map([\n ['protocol', this.protocol],\n ['host', this.host],\n ['port', this.port],\n ['origin', this.origin],\n ['path', this.path],\n ['hash', this.hash],\n ['searchParams', this.searchParams],\n ['fullUrl', this.fullUrl],\n ['method', this.method],\n ['body', this.body],\n ['headers', this.headers]]\n )\n }\n\n toString () {\n const options = { betweenKeyValueSeparator: '->', betweenPairSeparator: '|' }\n let result = ''\n\n this.toMap().forEach((value, key) => {\n if (typeof value === 'string' || value === undefined || value === null) {\n result = `${result}${key}${options.betweenKeyValueSeparator}${value}${options.betweenPairSeparator}`\n }\n if ((typeof value === 'object' && value !== null) || Array.isArray(value)) {\n result = `${result}${key}${options.betweenKeyValueSeparator}${JSON.stringify(value)}${options.betweenPairSeparator}`\n }\n // maybe miss something for non Record / Array headers and searchParams here\n })\n\n // delete last betweenPairSeparator\n return result.slice(0, -1)\n }\n}\n\nclass MockCallHistory {\n logs = []\n\n calls () {\n return this.logs\n }\n\n firstCall () {\n return this.logs.at(0)\n }\n\n lastCall () {\n return this.logs.at(-1)\n }\n\n nthCall (number) {\n if (typeof number !== 'number') {\n throw new InvalidArgumentError('nthCall must be called with a number')\n }\n if (!Number.isInteger(number)) {\n throw new InvalidArgumentError('nthCall must be called with an integer')\n }\n if (Math.sign(number) !== 1) {\n throw new InvalidArgumentError('nthCall must be called with a positive value. use firstCall or lastCall instead')\n }\n\n // non zero based index. this is more human readable\n return this.logs.at(number - 1)\n }\n\n filterCalls (criteria, options) {\n // perf\n if (this.logs.length === 0) {\n return this.logs\n }\n if (typeof criteria === 'function') {\n return this.logs.filter(criteria)\n }\n if (criteria instanceof RegExp) {\n return this.logs.filter((log) => {\n return criteria.test(log.toString())\n })\n }\n if (typeof criteria === 'object' && criteria !== null) {\n // no criteria - returning all logs\n if (Object.keys(criteria).length === 0) {\n return this.logs\n }\n\n const finalOptions = { operator: 'OR', ...buildAndValidateFilterCallsOptions(options) }\n\n let maybeDuplicatedLogsFiltered = []\n if ('protocol' in criteria) {\n maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.protocol, finalOptions, this.filterCallsByProtocol, maybeDuplicatedLogsFiltered)\n }\n if ('host' in criteria) {\n maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.host, finalOptions, this.filterCallsByHost, maybeDuplicatedLogsFiltered)\n }\n if ('port' in criteria) {\n maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.port, finalOptions, this.filterCallsByPort, maybeDuplicatedLogsFiltered)\n }\n if ('origin' in criteria) {\n maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.origin, finalOptions, this.filterCallsByOrigin, maybeDuplicatedLogsFiltered)\n }\n if ('path' in criteria) {\n maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.path, finalOptions, this.filterCallsByPath, maybeDuplicatedLogsFiltered)\n }\n if ('hash' in criteria) {\n maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.hash, finalOptions, this.filterCallsByHash, maybeDuplicatedLogsFiltered)\n }\n if ('fullUrl' in criteria) {\n maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.fullUrl, finalOptions, this.filterCallsByFullUrl, maybeDuplicatedLogsFiltered)\n }\n if ('method' in criteria) {\n maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.method, finalOptions, this.filterCallsByMethod, maybeDuplicatedLogsFiltered)\n }\n\n const uniqLogsFiltered = [...new Set(maybeDuplicatedLogsFiltered)]\n\n return uniqLogsFiltered\n }\n\n throw new InvalidArgumentError('criteria parameter should be one of function, regexp, or object')\n }\n\n filterCallsByProtocol = makeFilterCalls.call(this, 'protocol')\n\n filterCallsByHost = makeFilterCalls.call(this, 'host')\n\n filterCallsByPort = makeFilterCalls.call(this, 'port')\n\n filterCallsByOrigin = makeFilterCalls.call(this, 'origin')\n\n filterCallsByPath = makeFilterCalls.call(this, 'path')\n\n filterCallsByHash = makeFilterCalls.call(this, 'hash')\n\n filterCallsByFullUrl = makeFilterCalls.call(this, 'fullUrl')\n\n filterCallsByMethod = makeFilterCalls.call(this, 'method')\n\n clear () {\n this.logs = []\n }\n\n [kMockCallHistoryAddLog] (requestInit) {\n const log = new MockCallHistoryLog(requestInit)\n\n this.logs.push(log)\n\n return log\n }\n\n * [Symbol.iterator] () {\n for (const log of this.calls()) {\n yield log\n }\n }\n}\n\nmodule.exports.MockCallHistory = MockCallHistory\nmodule.exports.MockCallHistoryLog = MockCallHistoryLog\n", "'use strict'\n\nconst { promisify } = require('node:util')\nconst Pool = require('../dispatcher/pool')\nconst { buildMockDispatch } = require('./mock-utils')\nconst {\n kDispatches,\n kMockAgent,\n kClose,\n kOriginalClose,\n kOrigin,\n kOriginalDispatch,\n kConnected,\n kIgnoreTrailingSlash\n} = require('./mock-symbols')\nconst { MockInterceptor } = require('./mock-interceptor')\nconst Symbols = require('../core/symbols')\nconst { InvalidArgumentError } = require('../core/errors')\n\n/**\n * MockPool provides an API that extends the Pool to influence the mockDispatches.\n */\nclass MockPool extends Pool {\n constructor (origin, opts) {\n if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n\n super(origin, opts)\n\n this[kMockAgent] = opts.agent\n this[kOrigin] = origin\n this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false\n this[kDispatches] = []\n this[kConnected] = 1\n this[kOriginalDispatch] = this.dispatch\n this[kOriginalClose] = this.close.bind(this)\n\n this.dispatch = buildMockDispatch.call(this)\n this.close = this[kClose]\n }\n\n get [Symbols.kConnected] () {\n return this[kConnected]\n }\n\n /**\n * Sets up the base interceptor for mocking replies from undici.\n */\n intercept (opts) {\n return new MockInterceptor(\n opts && { ignoreTrailingSlash: this[kIgnoreTrailingSlash], ...opts },\n this[kDispatches]\n )\n }\n\n cleanMocks () {\n this[kDispatches] = []\n }\n\n async [kClose] () {\n await promisify(this[kOriginalClose])()\n this[kConnected] = 0\n this[kMockAgent][Symbols.kClients].delete(this[kOrigin])\n }\n}\n\nmodule.exports = MockPool\n", "'use strict'\n\nconst { Transform } = require('node:stream')\nconst { Console } = require('node:console')\n\nconst PERSISTENT = process.versions.icu ? '\u2705' : 'Y '\nconst NOT_PERSISTENT = process.versions.icu ? '\u274C' : 'N '\n\n/**\n * Gets the output of `console.table(\u2026)` as a string.\n */\nmodule.exports = class PendingInterceptorsFormatter {\n constructor ({ disableColors } = {}) {\n this.transform = new Transform({\n transform (chunk, _enc, cb) {\n cb(null, chunk)\n }\n })\n\n this.logger = new Console({\n stdout: this.transform,\n inspectOptions: {\n colors: !disableColors && !process.env.CI\n }\n })\n }\n\n format (pendingInterceptors) {\n const withPrettyHeaders = pendingInterceptors.map(\n ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({\n Method: method,\n Origin: origin,\n Path: path,\n 'Status code': statusCode,\n Persistent: persist ? PERSISTENT : NOT_PERSISTENT,\n Invocations: timesInvoked,\n Remaining: persist ? Infinity : times - timesInvoked\n }))\n\n this.logger.table(withPrettyHeaders)\n return this.transform.read().toString()\n }\n}\n", "'use strict'\n\nconst { kClients } = require('../core/symbols')\nconst Agent = require('../dispatcher/agent')\nconst {\n kAgent,\n kMockAgentSet,\n kMockAgentGet,\n kDispatches,\n kIsMockActive,\n kNetConnect,\n kGetNetConnect,\n kOptions,\n kFactory,\n kMockAgentRegisterCallHistory,\n kMockAgentIsCallHistoryEnabled,\n kMockAgentAddCallHistoryLog,\n kMockAgentMockCallHistoryInstance,\n kMockAgentAcceptsNonStandardSearchParameters,\n kMockCallHistoryAddLog,\n kIgnoreTrailingSlash\n} = require('./mock-symbols')\nconst MockClient = require('./mock-client')\nconst MockPool = require('./mock-pool')\nconst { matchValue, normalizeSearchParams, buildAndValidateMockOptions, normalizeOrigin } = require('./mock-utils')\nconst { InvalidArgumentError, UndiciError } = require('../core/errors')\nconst Dispatcher = require('../dispatcher/dispatcher')\nconst PendingInterceptorsFormatter = require('./pending-interceptors-formatter')\nconst { MockCallHistory } = require('./mock-call-history')\n\nclass MockAgent extends Dispatcher {\n constructor (opts = {}) {\n super(opts)\n\n const mockOptions = buildAndValidateMockOptions(opts)\n\n this[kNetConnect] = true\n this[kIsMockActive] = true\n this[kMockAgentIsCallHistoryEnabled] = mockOptions.enableCallHistory ?? false\n this[kMockAgentAcceptsNonStandardSearchParameters] = mockOptions.acceptNonStandardSearchParameters ?? false\n this[kIgnoreTrailingSlash] = mockOptions.ignoreTrailingSlash ?? false\n\n // Instantiate Agent and encapsulate\n if (opts?.agent && typeof opts.agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument opts.agent must implement Agent')\n }\n const agent = opts?.agent ? opts.agent : new Agent(opts)\n this[kAgent] = agent\n\n this[kClients] = agent[kClients]\n this[kOptions] = mockOptions\n\n if (this[kMockAgentIsCallHistoryEnabled]) {\n this[kMockAgentRegisterCallHistory]()\n }\n }\n\n get (origin) {\n // Normalize origin to handle URL objects and case-insensitive hostnames\n const normalizedOrigin = normalizeOrigin(origin)\n const originKey = this[kIgnoreTrailingSlash] ? normalizedOrigin.replace(/\\/$/, '') : normalizedOrigin\n\n let dispatcher = this[kMockAgentGet](originKey)\n\n if (!dispatcher) {\n dispatcher = this[kFactory](originKey)\n this[kMockAgentSet](originKey, dispatcher)\n }\n return dispatcher\n }\n\n dispatch (opts, handler) {\n opts.origin = normalizeOrigin(opts.origin)\n\n // Call MockAgent.get to perform additional setup before dispatching as normal\n this.get(opts.origin)\n\n this[kMockAgentAddCallHistoryLog](opts)\n\n const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters]\n\n const dispatchOpts = { ...opts }\n\n if (acceptNonStandardSearchParameters && dispatchOpts.path) {\n const [path, searchParams] = dispatchOpts.path.split('?')\n const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters)\n dispatchOpts.path = `${path}?${normalizedSearchParams}`\n }\n\n return this[kAgent].dispatch(dispatchOpts, handler)\n }\n\n async close () {\n this.clearCallHistory()\n await this[kAgent].close()\n this[kClients].clear()\n }\n\n deactivate () {\n this[kIsMockActive] = false\n }\n\n activate () {\n this[kIsMockActive] = true\n }\n\n enableNetConnect (matcher) {\n if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) {\n if (Array.isArray(this[kNetConnect])) {\n this[kNetConnect].push(matcher)\n } else {\n this[kNetConnect] = [matcher]\n }\n } else if (typeof matcher === 'undefined') {\n this[kNetConnect] = true\n } else {\n throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.')\n }\n }\n\n disableNetConnect () {\n this[kNetConnect] = false\n }\n\n enableCallHistory () {\n this[kMockAgentIsCallHistoryEnabled] = true\n\n return this\n }\n\n disableCallHistory () {\n this[kMockAgentIsCallHistoryEnabled] = false\n\n return this\n }\n\n getCallHistory () {\n return this[kMockAgentMockCallHistoryInstance]\n }\n\n clearCallHistory () {\n if (this[kMockAgentMockCallHistoryInstance] !== undefined) {\n this[kMockAgentMockCallHistoryInstance].clear()\n }\n }\n\n // This is required to bypass issues caused by using global symbols - see:\n // https://github.com/nodejs/undici/issues/1447\n get isMockActive () {\n return this[kIsMockActive]\n }\n\n [kMockAgentRegisterCallHistory] () {\n if (this[kMockAgentMockCallHistoryInstance] === undefined) {\n this[kMockAgentMockCallHistoryInstance] = new MockCallHistory()\n }\n }\n\n [kMockAgentAddCallHistoryLog] (opts) {\n if (this[kMockAgentIsCallHistoryEnabled]) {\n // additional setup when enableCallHistory class method is used after mockAgent instantiation\n this[kMockAgentRegisterCallHistory]()\n\n // add call history log on every call (intercepted or not)\n this[kMockAgentMockCallHistoryInstance][kMockCallHistoryAddLog](opts)\n }\n }\n\n [kMockAgentSet] (origin, dispatcher) {\n this[kClients].set(origin, { count: 0, dispatcher })\n }\n\n [kFactory] (origin) {\n const mockOptions = Object.assign({ agent: this }, this[kOptions])\n return this[kOptions] && this[kOptions].connections === 1\n ? new MockClient(origin, mockOptions)\n : new MockPool(origin, mockOptions)\n }\n\n [kMockAgentGet] (origin) {\n // First check if we can immediately find it\n const result = this[kClients].get(origin)\n if (result?.dispatcher) {\n return result.dispatcher\n }\n\n // If the origin is not a string create a dummy parent pool and return to user\n if (typeof origin !== 'string') {\n const dispatcher = this[kFactory]('http://localhost:9999')\n this[kMockAgentSet](origin, dispatcher)\n return dispatcher\n }\n\n // If we match, create a pool and assign the same dispatches\n for (const [keyMatcher, result] of Array.from(this[kClients])) {\n if (result && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) {\n const dispatcher = this[kFactory](origin)\n this[kMockAgentSet](origin, dispatcher)\n dispatcher[kDispatches] = result.dispatcher[kDispatches]\n return dispatcher\n }\n }\n }\n\n [kGetNetConnect] () {\n return this[kNetConnect]\n }\n\n pendingInterceptors () {\n const mockAgentClients = this[kClients]\n\n return Array.from(mockAgentClients.entries())\n .flatMap(([origin, result]) => result.dispatcher[kDispatches].map(dispatch => ({ ...dispatch, origin })))\n .filter(({ pending }) => pending)\n }\n\n assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) {\n const pending = this.pendingInterceptors()\n\n if (pending.length === 0) {\n return\n }\n\n throw new UndiciError(\n pending.length === 1\n ? `1 interceptor is pending:\\n\\n${pendingInterceptorsFormatter.format(pending)}`.trim()\n : `${pending.length} interceptors are pending:\\n\\n${pendingInterceptorsFormatter.format(pending)}`.trim()\n )\n }\n}\n\nmodule.exports = MockAgent\n", "'use strict'\n\nconst { InvalidArgumentError } = require('../core/errors')\nconst { runtimeFeatures } = require('../util/runtime-features.js')\n\n/**\n * @typedef {Object} HeaderFilters\n * @property {Set} ignore - Set of headers to ignore for matching\n * @property {Set} exclude - Set of headers to exclude from matching\n * @property {Set} match - Set of headers to match (empty means match\n */\n\n/**\n * Creates cached header sets for performance\n *\n * @param {import('./snapshot-recorder').SnapshotRecorderMatchOptions} matchOptions - Matching options for headers\n * @returns {HeaderFilters} - Cached sets for ignore, exclude, and match headers\n */\nfunction createHeaderFilters (matchOptions = {}) {\n const { ignoreHeaders = [], excludeHeaders = [], matchHeaders = [], caseSensitive = false } = matchOptions\n\n return {\n ignore: new Set(ignoreHeaders.map(header => caseSensitive ? header : header.toLowerCase())),\n exclude: new Set(excludeHeaders.map(header => caseSensitive ? header : header.toLowerCase())),\n match: new Set(matchHeaders.map(header => caseSensitive ? header : header.toLowerCase()))\n }\n}\n\nconst crypto = runtimeFeatures.has('crypto')\n ? require('node:crypto')\n : null\n\n/**\n * @callback HashIdFunction\n * @param {string} value - The value to hash\n * @returns {string} - The base64url encoded hash of the value\n */\n\n/**\n * Generates a hash for a given value\n * @type {HashIdFunction}\n */\nconst hashId = crypto?.hash\n ? (value) => crypto.hash('sha256', value, 'base64url')\n : (value) => Buffer.from(value).toString('base64url')\n\n/**\n * @typedef {(url: string) => boolean} IsUrlExcluded Checks if a URL matches any of the exclude patterns\n */\n\n/** @typedef {{[key: Lowercase]: string}} NormalizedHeaders */\n/** @typedef {Array} UndiciHeaders */\n/** @typedef {Record} Headers */\n\n/**\n * @param {*} headers\n * @returns {headers is UndiciHeaders}\n */\nfunction isUndiciHeaders (headers) {\n return Array.isArray(headers) && (headers.length & 1) === 0\n}\n\n/**\n * Factory function to create a URL exclusion checker\n * @param {Array} [excludePatterns=[]] - Array of patterns to exclude\n * @returns {IsUrlExcluded} - A function that checks if a URL matches any of the exclude patterns\n */\nfunction isUrlExcludedFactory (excludePatterns = []) {\n if (excludePatterns.length === 0) {\n return () => false\n }\n\n return function isUrlExcluded (url) {\n let urlLowerCased\n\n for (const pattern of excludePatterns) {\n if (typeof pattern === 'string') {\n if (!urlLowerCased) {\n // Convert URL to lowercase only once\n urlLowerCased = url.toLowerCase()\n }\n // Simple string match (case-insensitive)\n if (urlLowerCased.includes(pattern.toLowerCase())) {\n return true\n }\n } else if (pattern instanceof RegExp) {\n // Regex pattern match\n if (pattern.test(url)) {\n return true\n }\n }\n }\n\n return false\n }\n}\n\n/**\n * Normalizes headers for consistent comparison\n *\n * @param {Object|UndiciHeaders} headers - Headers to normalize\n * @returns {NormalizedHeaders} - Normalized headers as a lowercase object\n */\nfunction normalizeHeaders (headers) {\n /** @type {NormalizedHeaders} */\n const normalizedHeaders = {}\n\n if (!headers) return normalizedHeaders\n\n // Handle array format (undici internal format: [name, value, name, value, ...])\n if (isUndiciHeaders(headers)) {\n for (let i = 0; i < headers.length; i += 2) {\n const key = headers[i]\n const value = headers[i + 1]\n if (key && value !== undefined) {\n // Convert Buffers to strings if needed\n const keyStr = Buffer.isBuffer(key) ? key.toString() : key\n const valueStr = Buffer.isBuffer(value) ? value.toString() : value\n normalizedHeaders[keyStr.toLowerCase()] = valueStr\n }\n }\n return normalizedHeaders\n }\n\n // Handle object format\n if (headers && typeof headers === 'object') {\n for (const [key, value] of Object.entries(headers)) {\n if (key && typeof key === 'string') {\n normalizedHeaders[key.toLowerCase()] = Array.isArray(value) ? value.join(', ') : String(value)\n }\n }\n }\n\n return normalizedHeaders\n}\n\nconst validSnapshotModes = /** @type {const} */ (['record', 'playback', 'update'])\n\n/** @typedef {typeof validSnapshotModes[number]} SnapshotMode */\n\n/**\n * @param {*} mode - The snapshot mode to validate\n * @returns {asserts mode is SnapshotMode}\n */\nfunction validateSnapshotMode (mode) {\n if (!validSnapshotModes.includes(mode)) {\n throw new InvalidArgumentError(`Invalid snapshot mode: ${mode}. Must be one of: ${validSnapshotModes.join(', ')}`)\n }\n}\n\nmodule.exports = {\n createHeaderFilters,\n hashId,\n isUndiciHeaders,\n normalizeHeaders,\n isUrlExcludedFactory,\n validateSnapshotMode\n}\n", "'use strict'\n\nconst { writeFile, readFile, mkdir } = require('node:fs/promises')\nconst { dirname, resolve } = require('node:path')\nconst { setTimeout, clearTimeout } = require('node:timers')\nconst { InvalidArgumentError, UndiciError } = require('../core/errors')\nconst { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require('./snapshot-utils')\n\n/**\n * @typedef {Object} SnapshotRequestOptions\n * @property {string} method - HTTP method (e.g. 'GET', 'POST', etc.)\n * @property {string} path - Request path\n * @property {string} origin - Request origin (base URL)\n * @property {import('./snapshot-utils').Headers|import('./snapshot-utils').UndiciHeaders} headers - Request headers\n * @property {import('./snapshot-utils').NormalizedHeaders} _normalizedHeaders - Request headers as a lowercase object\n * @property {string|Buffer} [body] - Request body (optional)\n */\n\n/**\n * @typedef {Object} SnapshotEntryRequest\n * @property {string} method - HTTP method (e.g. 'GET', 'POST', etc.)\n * @property {string} url - Full URL of the request\n * @property {import('./snapshot-utils').NormalizedHeaders} headers - Normalized headers as a lowercase object\n * @property {string|Buffer} [body] - Request body (optional)\n */\n\n/**\n * @typedef {Object} SnapshotEntryResponse\n * @property {number} statusCode - HTTP status code of the response\n * @property {import('./snapshot-utils').NormalizedHeaders} headers - Normalized response headers as a lowercase object\n * @property {string} body - Response body as a base64url encoded string\n * @property {Object} [trailers] - Optional response trailers\n */\n\n/**\n * @typedef {Object} SnapshotEntry\n * @property {SnapshotEntryRequest} request - The request object\n * @property {Array} responses - Array of response objects\n * @property {number} callCount - Number of times this snapshot has been called\n * @property {string} timestamp - ISO timestamp of when the snapshot was created\n */\n\n/**\n * @typedef {Object} SnapshotRecorderMatchOptions\n * @property {Array} [matchHeaders=[]] - Headers to match (empty array means match all headers)\n * @property {Array} [ignoreHeaders=[]] - Headers to ignore for matching\n * @property {Array} [excludeHeaders=[]] - Headers to exclude from matching\n * @property {boolean} [matchBody=true] - Whether to match request body\n * @property {boolean} [matchQuery=true] - Whether to match query properties\n * @property {boolean} [caseSensitive=false] - Whether header matching is case-sensitive\n */\n\n/**\n * @typedef {Object} SnapshotRecorderOptions\n * @property {string} [snapshotPath] - Path to save/load snapshots\n * @property {import('./snapshot-utils').SnapshotMode} [mode='record'] - Mode: 'record' or 'playback'\n * @property {number} [maxSnapshots=Infinity] - Maximum number of snapshots to keep\n * @property {boolean} [autoFlush=false] - Whether to automatically flush snapshots to disk\n * @property {number} [flushInterval=30000] - Auto-flush interval in milliseconds (default: 30 seconds)\n * @property {Array} [excludeUrls=[]] - URLs to exclude from recording\n * @property {function} [shouldRecord=null] - Function to filter requests for recording\n * @property {function} [shouldPlayback=null] - Function to filter requests\n */\n\n/**\n * @typedef {Object} SnapshotFormattedRequest\n * @property {string} method - HTTP method (e.g. 'GET', 'POST', etc.)\n * @property {string} url - Full URL of the request (with query parameters if matchQuery is true)\n * @property {import('./snapshot-utils').NormalizedHeaders} headers - Normalized headers as a lowercase object\n * @property {string} body - Request body (optional, only if matchBody is true)\n */\n\n/**\n * @typedef {Object} SnapshotInfo\n * @property {string} hash - Hash key for the snapshot\n * @property {SnapshotEntryRequest} request - The request object\n * @property {number} responseCount - Number of responses recorded for this request\n * @property {number} callCount - Number of times this snapshot has been called\n * @property {string} timestamp - ISO timestamp of when the snapshot was created\n */\n\n/**\n * Formats a request for consistent snapshot storage\n * Caches normalized headers to avoid repeated processing\n *\n * @param {SnapshotRequestOptions} opts - Request options\n * @param {import('./snapshot-utils').HeaderFilters} headerFilters - Cached header sets for performance\n * @param {SnapshotRecorderMatchOptions} [matchOptions] - Matching options for headers and body\n * @returns {SnapshotFormattedRequest} - Formatted request object\n */\nfunction formatRequestKey (opts, headerFilters, matchOptions = {}) {\n const url = new URL(opts.path, opts.origin)\n\n // Cache normalized headers if not already done\n const normalized = opts._normalizedHeaders || normalizeHeaders(opts.headers)\n if (!opts._normalizedHeaders) {\n opts._normalizedHeaders = normalized\n }\n\n return {\n method: opts.method || 'GET',\n url: matchOptions.matchQuery !== false ? url.toString() : `${url.origin}${url.pathname}`,\n headers: filterHeadersForMatching(normalized, headerFilters, matchOptions),\n body: matchOptions.matchBody !== false && opts.body ? String(opts.body) : ''\n }\n}\n\n/**\n * Filters headers based on matching configuration\n *\n * @param {import('./snapshot-utils').Headers} headers - Headers to filter\n * @param {import('./snapshot-utils').HeaderFilters} headerFilters - Cached sets for ignore, exclude, and match headers\n * @param {SnapshotRecorderMatchOptions} [matchOptions] - Matching options for headers\n */\nfunction filterHeadersForMatching (headers, headerFilters, matchOptions = {}) {\n if (!headers || typeof headers !== 'object') return {}\n\n const {\n caseSensitive = false\n } = matchOptions\n\n const filtered = {}\n const { ignore, exclude, match } = headerFilters\n\n for (const [key, value] of Object.entries(headers)) {\n const headerKey = caseSensitive ? key : key.toLowerCase()\n\n // Skip if in exclude list (for security)\n if (exclude.has(headerKey)) continue\n\n // Skip if in ignore list (for matching)\n if (ignore.has(headerKey)) continue\n\n // If matchHeaders is specified, only include those headers\n if (match.size !== 0) {\n if (!match.has(headerKey)) continue\n }\n\n filtered[headerKey] = value\n }\n\n return filtered\n}\n\n/**\n * Filters headers for storage (only excludes sensitive headers)\n *\n * @param {import('./snapshot-utils').Headers} headers - Headers to filter\n * @param {import('./snapshot-utils').HeaderFilters} headerFilters - Cached sets for ignore, exclude, and match headers\n * @param {SnapshotRecorderMatchOptions} [matchOptions] - Matching options for headers\n */\nfunction filterHeadersForStorage (headers, headerFilters, matchOptions = {}) {\n if (!headers || typeof headers !== 'object') return {}\n\n const {\n caseSensitive = false\n } = matchOptions\n\n const filtered = {}\n const { exclude: excludeSet } = headerFilters\n\n for (const [key, value] of Object.entries(headers)) {\n const headerKey = caseSensitive ? key : key.toLowerCase()\n\n // Skip if in exclude list (for security)\n if (excludeSet.has(headerKey)) continue\n\n filtered[headerKey] = value\n }\n\n return filtered\n}\n\n/**\n * Creates a hash key for request matching\n * Properly orders headers to avoid conflicts and uses crypto hashing when available\n *\n * @param {SnapshotFormattedRequest} formattedRequest - Request object\n * @returns {string} - Base64url encoded hash of the request\n */\nfunction createRequestHash (formattedRequest) {\n const parts = [\n formattedRequest.method,\n formattedRequest.url\n ]\n\n // Process headers in a deterministic way to avoid conflicts\n if (formattedRequest.headers && typeof formattedRequest.headers === 'object') {\n const headerKeys = Object.keys(formattedRequest.headers).sort()\n for (const key of headerKeys) {\n const values = Array.isArray(formattedRequest.headers[key])\n ? formattedRequest.headers[key]\n : [formattedRequest.headers[key]]\n\n // Add header name\n parts.push(key)\n\n // Add all values for this header, sorted for consistency\n for (const value of values.sort()) {\n parts.push(String(value))\n }\n }\n }\n\n // Add body\n parts.push(formattedRequest.body)\n\n const content = parts.join('|')\n\n return hashId(content)\n}\n\nclass SnapshotRecorder {\n /** @type {NodeJS.Timeout | null} */\n #flushTimeout\n\n /** @type {import('./snapshot-utils').IsUrlExcluded} */\n #isUrlExcluded\n\n /** @type {Map} */\n #snapshots = new Map()\n\n /** @type {string|undefined} */\n #snapshotPath\n\n /** @type {number} */\n #maxSnapshots = Infinity\n\n /** @type {boolean} */\n #autoFlush = false\n\n /** @type {import('./snapshot-utils').HeaderFilters} */\n #headerFilters\n\n /**\n * Creates a new SnapshotRecorder instance\n * @param {SnapshotRecorderOptions&SnapshotRecorderMatchOptions} [options={}] - Configuration options for the recorder\n */\n constructor (options = {}) {\n this.#snapshotPath = options.snapshotPath\n this.#maxSnapshots = options.maxSnapshots || Infinity\n this.#autoFlush = options.autoFlush || false\n this.flushInterval = options.flushInterval || 30000 // 30 seconds default\n this._flushTimer = null\n\n // Matching configuration\n /** @type {Required} */\n this.matchOptions = {\n matchHeaders: options.matchHeaders || [], // empty means match all headers\n ignoreHeaders: options.ignoreHeaders || [],\n excludeHeaders: options.excludeHeaders || [],\n matchBody: options.matchBody !== false, // default: true\n matchQuery: options.matchQuery !== false, // default: true\n caseSensitive: options.caseSensitive || false\n }\n\n // Cache processed header sets to avoid recreating them on every request\n this.#headerFilters = createHeaderFilters(this.matchOptions)\n\n // Request filtering callbacks\n this.shouldRecord = options.shouldRecord || (() => true) // function(requestOpts) -> boolean\n this.shouldPlayback = options.shouldPlayback || (() => true) // function(requestOpts) -> boolean\n\n // URL pattern filtering\n this.#isUrlExcluded = isUrlExcludedFactory(options.excludeUrls) // Array of regex patterns or strings\n\n // Start auto-flush timer if enabled\n if (this.#autoFlush && this.#snapshotPath) {\n this.#startAutoFlush()\n }\n }\n\n /**\n * Records a request-response interaction\n * @param {SnapshotRequestOptions} requestOpts - Request options\n * @param {SnapshotEntryResponse} response - Response data to record\n * @return {Promise} - Resolves when the recording is complete\n */\n async record (requestOpts, response) {\n // Check if recording should be filtered out\n if (!this.shouldRecord(requestOpts)) {\n return // Skip recording\n }\n\n // Check URL exclusion patterns\n if (this.isUrlExcluded(requestOpts)) {\n return // Skip recording\n }\n\n const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions)\n const hash = createRequestHash(request)\n\n // Extract response data - always store body as base64\n const normalizedHeaders = normalizeHeaders(response.headers)\n\n /** @type {SnapshotEntryResponse} */\n const responseData = {\n statusCode: response.statusCode,\n headers: filterHeadersForStorage(normalizedHeaders, this.#headerFilters, this.matchOptions),\n body: Buffer.isBuffer(response.body)\n ? response.body.toString('base64')\n : Buffer.from(String(response.body || '')).toString('base64'),\n trailers: response.trailers\n }\n\n // Remove oldest snapshot if we exceed maxSnapshots limit\n if (this.#snapshots.size >= this.#maxSnapshots && !this.#snapshots.has(hash)) {\n const oldestKey = this.#snapshots.keys().next().value\n this.#snapshots.delete(oldestKey)\n }\n\n // Support sequential responses - if snapshot exists, add to responses array\n const existingSnapshot = this.#snapshots.get(hash)\n if (existingSnapshot && existingSnapshot.responses) {\n existingSnapshot.responses.push(responseData)\n existingSnapshot.timestamp = new Date().toISOString()\n } else {\n this.#snapshots.set(hash, {\n request,\n responses: [responseData], // Always store as array for consistency\n callCount: 0,\n timestamp: new Date().toISOString()\n })\n }\n\n // Auto-flush if enabled\n if (this.#autoFlush && this.#snapshotPath) {\n this.#scheduleFlush()\n }\n }\n\n /**\n * Checks if a URL should be excluded from recording/playback\n * @param {SnapshotRequestOptions} requestOpts - Request options to check\n * @returns {boolean} - True if URL is excluded\n */\n isUrlExcluded (requestOpts) {\n const url = new URL(requestOpts.path, requestOpts.origin).toString()\n return this.#isUrlExcluded(url)\n }\n\n /**\n * Finds a matching snapshot for the given request\n * Returns the appropriate response based on call count for sequential responses\n *\n * @param {SnapshotRequestOptions} requestOpts - Request options to match\n * @returns {SnapshotEntry&Record<'response', SnapshotEntryResponse>|undefined} - Matching snapshot response or undefined if not found\n */\n findSnapshot (requestOpts) {\n // Check if playback should be filtered out\n if (!this.shouldPlayback(requestOpts)) {\n return undefined // Skip playback\n }\n\n // Check URL exclusion patterns\n if (this.isUrlExcluded(requestOpts)) {\n return undefined // Skip playback\n }\n\n const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions)\n const hash = createRequestHash(request)\n const snapshot = this.#snapshots.get(hash)\n\n if (!snapshot) return undefined\n\n // Handle sequential responses\n const currentCallCount = snapshot.callCount || 0\n const responseIndex = Math.min(currentCallCount, snapshot.responses.length - 1)\n snapshot.callCount = currentCallCount + 1\n\n return {\n ...snapshot,\n response: snapshot.responses[responseIndex]\n }\n }\n\n /**\n * Loads snapshots from file\n * @param {string} [filePath] - Optional file path to load snapshots from\n * @return {Promise} - Resolves when snapshots are loaded\n */\n async loadSnapshots (filePath) {\n const path = filePath || this.#snapshotPath\n if (!path) {\n throw new InvalidArgumentError('Snapshot path is required')\n }\n\n try {\n const data = await readFile(resolve(path), 'utf8')\n const parsed = JSON.parse(data)\n\n // Convert array format back to Map\n if (Array.isArray(parsed)) {\n this.#snapshots.clear()\n for (const { hash, snapshot } of parsed) {\n this.#snapshots.set(hash, snapshot)\n }\n } else {\n // Legacy object format\n this.#snapshots = new Map(Object.entries(parsed))\n }\n } catch (error) {\n if (error.code === 'ENOENT') {\n // File doesn't exist yet - that's ok for recording mode\n this.#snapshots.clear()\n } else {\n throw new UndiciError(`Failed to load snapshots from ${path}`, { cause: error })\n }\n }\n }\n\n /**\n * Saves snapshots to file\n *\n * @param {string} [filePath] - Optional file path to save snapshots\n * @returns {Promise} - Resolves when snapshots are saved\n */\n async saveSnapshots (filePath) {\n const path = filePath || this.#snapshotPath\n if (!path) {\n throw new InvalidArgumentError('Snapshot path is required')\n }\n\n const resolvedPath = resolve(path)\n\n // Ensure directory exists\n await mkdir(dirname(resolvedPath), { recursive: true })\n\n // Convert Map to serializable format\n const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({\n hash,\n snapshot\n }))\n\n await writeFile(resolvedPath, JSON.stringify(data, null, 2), { flush: true })\n }\n\n /**\n * Clears all recorded snapshots\n * @returns {void}\n */\n clear () {\n this.#snapshots.clear()\n }\n\n /**\n * Gets all recorded snapshots\n * @return {Array} - Array of all recorded snapshots\n */\n getSnapshots () {\n return Array.from(this.#snapshots.values())\n }\n\n /**\n * Gets snapshot count\n * @return {number} - Number of recorded snapshots\n */\n size () {\n return this.#snapshots.size\n }\n\n /**\n * Resets call counts for all snapshots (useful for test cleanup)\n * @returns {void}\n */\n resetCallCounts () {\n for (const snapshot of this.#snapshots.values()) {\n snapshot.callCount = 0\n }\n }\n\n /**\n * Deletes a specific snapshot by request options\n * @param {SnapshotRequestOptions} requestOpts - Request options to match\n * @returns {boolean} - True if snapshot was deleted, false if not found\n */\n deleteSnapshot (requestOpts) {\n const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions)\n const hash = createRequestHash(request)\n return this.#snapshots.delete(hash)\n }\n\n /**\n * Gets information about a specific snapshot\n * @param {SnapshotRequestOptions} requestOpts - Request options to match\n * @returns {SnapshotInfo|null} - Snapshot information or null if not found\n */\n getSnapshotInfo (requestOpts) {\n const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions)\n const hash = createRequestHash(request)\n const snapshot = this.#snapshots.get(hash)\n\n if (!snapshot) return null\n\n return {\n hash,\n request: snapshot.request,\n responseCount: snapshot.responses ? snapshot.responses.length : (snapshot.response ? 1 : 0), // .response for legacy snapshots\n callCount: snapshot.callCount || 0,\n timestamp: snapshot.timestamp\n }\n }\n\n /**\n * Replaces all snapshots with new data (full replacement)\n * @param {Array<{hash: string; snapshot: SnapshotEntry}>|Record} snapshotData - New snapshot data to replace existing ones\n * @returns {void}\n */\n replaceSnapshots (snapshotData) {\n this.#snapshots.clear()\n\n if (Array.isArray(snapshotData)) {\n for (const { hash, snapshot } of snapshotData) {\n this.#snapshots.set(hash, snapshot)\n }\n } else if (snapshotData && typeof snapshotData === 'object') {\n // Legacy object format\n this.#snapshots = new Map(Object.entries(snapshotData))\n }\n }\n\n /**\n * Starts the auto-flush timer\n * @returns {void}\n */\n #startAutoFlush () {\n return this.#scheduleFlush()\n }\n\n /**\n * Stops the auto-flush timer\n * @returns {void}\n */\n #stopAutoFlush () {\n if (this.#flushTimeout) {\n clearTimeout(this.#flushTimeout)\n // Ensure any pending flush is completed\n this.saveSnapshots().catch(() => {\n // Ignore flush errors\n })\n this.#flushTimeout = null\n }\n }\n\n /**\n * Schedules a flush (debounced to avoid excessive writes)\n */\n #scheduleFlush () {\n this.#flushTimeout = setTimeout(() => {\n this.saveSnapshots().catch(() => {\n // Ignore flush errors\n })\n if (this.#autoFlush) {\n this.#flushTimeout?.refresh()\n } else {\n this.#flushTimeout = null\n }\n }, 1000) // 1 second debounce\n }\n\n /**\n * Cleanup method to stop timers\n * @returns {void}\n */\n destroy () {\n this.#stopAutoFlush()\n if (this.#flushTimeout) {\n clearTimeout(this.#flushTimeout)\n this.#flushTimeout = null\n }\n }\n\n /**\n * Async close method that saves all recordings and performs cleanup\n * @returns {Promise}\n */\n async close () {\n // Save any pending recordings if we have a snapshot path\n if (this.#snapshotPath && this.#snapshots.size !== 0) {\n await this.saveSnapshots()\n }\n\n // Perform cleanup\n this.destroy()\n }\n}\n\nmodule.exports = { SnapshotRecorder, formatRequestKey, createRequestHash, filterHeadersForMatching, filterHeadersForStorage, createHeaderFilters }\n", "'use strict'\n\nconst Agent = require('../dispatcher/agent')\nconst MockAgent = require('./mock-agent')\nconst { SnapshotRecorder } = require('./snapshot-recorder')\nconst WrapHandler = require('../handler/wrap-handler')\nconst { InvalidArgumentError, UndiciError } = require('../core/errors')\nconst { validateSnapshotMode } = require('./snapshot-utils')\n\nconst kSnapshotRecorder = Symbol('kSnapshotRecorder')\nconst kSnapshotMode = Symbol('kSnapshotMode')\nconst kSnapshotPath = Symbol('kSnapshotPath')\nconst kSnapshotLoaded = Symbol('kSnapshotLoaded')\nconst kRealAgent = Symbol('kRealAgent')\n\n// Static flag to ensure warning is only emitted once per process\nlet warningEmitted = false\n\nclass SnapshotAgent extends MockAgent {\n constructor (opts = {}) {\n // Emit experimental warning only once\n if (!warningEmitted) {\n process.emitWarning(\n 'SnapshotAgent is experimental and subject to change',\n 'ExperimentalWarning'\n )\n warningEmitted = true\n }\n\n const {\n mode = 'record',\n snapshotPath = null,\n ...mockAgentOpts\n } = opts\n\n super(mockAgentOpts)\n\n validateSnapshotMode(mode)\n\n // Validate snapshotPath is provided when required\n if ((mode === 'playback' || mode === 'update') && !snapshotPath) {\n throw new InvalidArgumentError(`snapshotPath is required when mode is '${mode}'`)\n }\n\n this[kSnapshotMode] = mode\n this[kSnapshotPath] = snapshotPath\n\n this[kSnapshotRecorder] = new SnapshotRecorder({\n snapshotPath: this[kSnapshotPath],\n mode: this[kSnapshotMode],\n maxSnapshots: opts.maxSnapshots,\n autoFlush: opts.autoFlush,\n flushInterval: opts.flushInterval,\n matchHeaders: opts.matchHeaders,\n ignoreHeaders: opts.ignoreHeaders,\n excludeHeaders: opts.excludeHeaders,\n matchBody: opts.matchBody,\n matchQuery: opts.matchQuery,\n caseSensitive: opts.caseSensitive,\n shouldRecord: opts.shouldRecord,\n shouldPlayback: opts.shouldPlayback,\n excludeUrls: opts.excludeUrls\n })\n this[kSnapshotLoaded] = false\n\n // For recording/update mode, we need a real agent to make actual requests\n // For playback mode, we need a real agent if there are excluded URLs\n if (this[kSnapshotMode] === 'record' || this[kSnapshotMode] === 'update' ||\n (this[kSnapshotMode] === 'playback' && opts.excludeUrls && opts.excludeUrls.length > 0)) {\n this[kRealAgent] = new Agent(opts)\n }\n\n // Auto-load snapshots in playback/update mode\n if ((this[kSnapshotMode] === 'playback' || this[kSnapshotMode] === 'update') && this[kSnapshotPath]) {\n this.loadSnapshots().catch(() => {\n // Ignore load errors - file might not exist yet\n })\n }\n }\n\n dispatch (opts, handler) {\n handler = WrapHandler.wrap(handler)\n const mode = this[kSnapshotMode]\n\n // Check if URL should be excluded (pass through without mocking/recording)\n if (this[kSnapshotRecorder].isUrlExcluded(opts)) {\n // Real agent is guaranteed by constructor when excludeUrls is configured\n return this[kRealAgent].dispatch(opts, handler)\n }\n\n if (mode === 'playback' || mode === 'update') {\n // Ensure snapshots are loaded\n if (!this[kSnapshotLoaded]) {\n // Need to load asynchronously, delegate to async version\n return this.#asyncDispatch(opts, handler)\n }\n\n // Try to find existing snapshot (synchronous)\n const snapshot = this[kSnapshotRecorder].findSnapshot(opts)\n\n if (snapshot) {\n // Use recorded response (synchronous)\n return this.#replaySnapshot(snapshot, handler)\n } else if (mode === 'update') {\n // Make real request and record it (async required)\n return this.#recordAndReplay(opts, handler)\n } else {\n // Playback mode but no snapshot found\n const error = new UndiciError(`No snapshot found for ${opts.method || 'GET'} ${opts.path}`)\n if (handler.onError) {\n handler.onError(error)\n return\n }\n throw error\n }\n } else if (mode === 'record') {\n // Record mode - make real request and save response (async required)\n return this.#recordAndReplay(opts, handler)\n }\n }\n\n /**\n * Async version of dispatch for when we need to load snapshots first\n */\n async #asyncDispatch (opts, handler) {\n await this.loadSnapshots()\n return this.dispatch(opts, handler)\n }\n\n /**\n * Records a real request and replays the response\n */\n #recordAndReplay (opts, handler) {\n const responseData = {\n statusCode: null,\n headers: {},\n trailers: {},\n body: []\n }\n\n const self = this // Capture 'this' context for use within nested handler callbacks\n\n const recordingHandler = {\n onRequestStart (controller, context) {\n return handler.onRequestStart(controller, { ...context, history: this.history })\n },\n\n onRequestUpgrade (controller, statusCode, headers, socket) {\n return handler.onRequestUpgrade(controller, statusCode, headers, socket)\n },\n\n onResponseStart (controller, statusCode, headers, statusMessage) {\n responseData.statusCode = statusCode\n responseData.headers = headers\n return handler.onResponseStart(controller, statusCode, headers, statusMessage)\n },\n\n onResponseData (controller, chunk) {\n responseData.body.push(chunk)\n return handler.onResponseData(controller, chunk)\n },\n\n onResponseEnd (controller, trailers) {\n responseData.trailers = trailers\n\n // Record the interaction using captured 'self' context (fire and forget)\n const responseBody = Buffer.concat(responseData.body)\n self[kSnapshotRecorder].record(opts, {\n statusCode: responseData.statusCode,\n headers: responseData.headers,\n body: responseBody,\n trailers: responseData.trailers\n })\n .then(() => handler.onResponseEnd(controller, trailers))\n .catch((error) => handler.onResponseError(controller, error))\n }\n }\n\n // Use composed agent if available (includes interceptors), otherwise use real agent\n const agent = this[kRealAgent]\n return agent.dispatch(opts, recordingHandler)\n }\n\n /**\n * Replays a recorded response\n *\n * @param {Object} snapshot - The recorded snapshot to replay.\n * @param {Object} handler - The handler to call with the response data.\n * @returns {void}\n */\n #replaySnapshot (snapshot, handler) {\n try {\n const { response } = snapshot\n\n const controller = {\n pause () { },\n resume () { },\n abort (reason) {\n this.aborted = true\n this.reason = reason\n },\n\n aborted: false,\n paused: false\n }\n\n handler.onRequestStart(controller)\n\n handler.onResponseStart(controller, response.statusCode, response.headers)\n\n // Body is always stored as base64 string\n const body = Buffer.from(response.body, 'base64')\n handler.onResponseData(controller, body)\n\n handler.onResponseEnd(controller, response.trailers)\n } catch (error) {\n handler.onError?.(error)\n }\n }\n\n /**\n * Loads snapshots from file\n *\n * @param {string} [filePath] - Optional file path to load snapshots from.\n * @returns {Promise} - Resolves when snapshots are loaded.\n */\n async loadSnapshots (filePath) {\n await this[kSnapshotRecorder].loadSnapshots(filePath || this[kSnapshotPath])\n this[kSnapshotLoaded] = true\n\n // In playback mode, set up MockAgent interceptors for all snapshots\n if (this[kSnapshotMode] === 'playback') {\n this.#setupMockInterceptors()\n }\n }\n\n /**\n * Saves snapshots to file\n *\n * @param {string} [filePath] - Optional file path to save snapshots to.\n * @returns {Promise} - Resolves when snapshots are saved.\n */\n async saveSnapshots (filePath) {\n return this[kSnapshotRecorder].saveSnapshots(filePath || this[kSnapshotPath])\n }\n\n /**\n * Sets up MockAgent interceptors based on recorded snapshots.\n *\n * This method creates MockAgent interceptors for each recorded snapshot,\n * allowing the SnapshotAgent to fall back to MockAgent's standard intercept\n * mechanism in playback mode. Each interceptor is configured to persist\n * (remain active for multiple requests) and responds with the recorded\n * response data.\n *\n * Called automatically when loading snapshots in playback mode.\n *\n * @returns {void}\n */\n #setupMockInterceptors () {\n for (const snapshot of this[kSnapshotRecorder].getSnapshots()) {\n const { request, responses, response } = snapshot\n const url = new URL(request.url)\n\n const mockPool = this.get(url.origin)\n\n // Handle both new format (responses array) and legacy format (response object)\n const responseData = responses ? responses[0] : response\n if (!responseData) continue\n\n mockPool.intercept({\n path: url.pathname + url.search,\n method: request.method,\n headers: request.headers,\n body: request.body\n }).reply(responseData.statusCode, responseData.body, {\n headers: responseData.headers,\n trailers: responseData.trailers\n }).persist()\n }\n }\n\n /**\n * Gets the snapshot recorder\n * @return {SnapshotRecorder} - The snapshot recorder instance\n */\n getRecorder () {\n return this[kSnapshotRecorder]\n }\n\n /**\n * Gets the current mode\n * @return {import('./snapshot-utils').SnapshotMode} - The current snapshot mode\n */\n getMode () {\n return this[kSnapshotMode]\n }\n\n /**\n * Clears all snapshots\n * @returns {void}\n */\n clearSnapshots () {\n this[kSnapshotRecorder].clear()\n }\n\n /**\n * Resets call counts for all snapshots (useful for test cleanup)\n * @returns {void}\n */\n resetCallCounts () {\n this[kSnapshotRecorder].resetCallCounts()\n }\n\n /**\n * Deletes a specific snapshot by request options\n * @param {import('./snapshot-recorder').SnapshotRequestOptions} requestOpts - Request options to identify the snapshot\n * @return {Promise} - Returns true if the snapshot was deleted, false if not found\n */\n deleteSnapshot (requestOpts) {\n return this[kSnapshotRecorder].deleteSnapshot(requestOpts)\n }\n\n /**\n * Gets information about a specific snapshot\n * @returns {import('./snapshot-recorder').SnapshotInfo|null} - Snapshot information or null if not found\n */\n getSnapshotInfo (requestOpts) {\n return this[kSnapshotRecorder].getSnapshotInfo(requestOpts)\n }\n\n /**\n * Replaces all snapshots with new data (full replacement)\n * @param {Array<{hash: string; snapshot: import('./snapshot-recorder').SnapshotEntryshotEntry}>|Record} snapshotData - New snapshot data to replace existing snapshots\n * @returns {void}\n */\n replaceSnapshots (snapshotData) {\n this[kSnapshotRecorder].replaceSnapshots(snapshotData)\n }\n\n /**\n * Closes the agent, saving snapshots and cleaning up resources.\n *\n * @returns {Promise}\n */\n async close () {\n await this[kSnapshotRecorder].close()\n await this[kRealAgent]?.close()\n await super.close()\n }\n}\n\nmodule.exports = SnapshotAgent\n", "'use strict'\n\n// We include a version number for the Dispatcher API. In case of breaking changes,\n// this version number must be increased to avoid conflicts.\nconst globalDispatcher = Symbol.for('undici.globalDispatcher.1')\nconst { InvalidArgumentError } = require('./core/errors')\nconst Agent = require('./dispatcher/agent')\n\nif (getGlobalDispatcher() === undefined) {\n setGlobalDispatcher(new Agent())\n}\n\nfunction setGlobalDispatcher (agent) {\n if (!agent || typeof agent.dispatch !== 'function') {\n throw new InvalidArgumentError('Argument agent must implement Agent')\n }\n Object.defineProperty(globalThis, globalDispatcher, {\n value: agent,\n writable: true,\n enumerable: false,\n configurable: false\n })\n}\n\nfunction getGlobalDispatcher () {\n return globalThis[globalDispatcher]\n}\n\n// These are the globals that can be installed by undici.install().\n// Not exported by index.js to avoid use outside of this module.\nconst installedExports = /** @type {const} */ (\n [\n 'fetch',\n 'Headers',\n 'Response',\n 'Request',\n 'FormData',\n 'WebSocket',\n 'CloseEvent',\n 'ErrorEvent',\n 'MessageEvent',\n 'EventSource'\n ]\n)\n\nmodule.exports = {\n setGlobalDispatcher,\n getGlobalDispatcher,\n installedExports\n}\n", "'use strict'\n\nconst assert = require('node:assert')\nconst WrapHandler = require('./wrap-handler')\n\n/**\n * @deprecated\n */\nmodule.exports = class DecoratorHandler {\n #handler\n #onCompleteCalled = false\n #onErrorCalled = false\n #onResponseStartCalled = false\n\n constructor (handler) {\n if (typeof handler !== 'object' || handler === null) {\n throw new TypeError('handler must be an object')\n }\n this.#handler = WrapHandler.wrap(handler)\n }\n\n onRequestStart (...args) {\n this.#handler.onRequestStart?.(...args)\n }\n\n onRequestUpgrade (...args) {\n assert(!this.#onCompleteCalled)\n assert(!this.#onErrorCalled)\n\n return this.#handler.onRequestUpgrade?.(...args)\n }\n\n onResponseStart (...args) {\n assert(!this.#onCompleteCalled)\n assert(!this.#onErrorCalled)\n assert(!this.#onResponseStartCalled)\n\n this.#onResponseStartCalled = true\n\n return this.#handler.onResponseStart?.(...args)\n }\n\n onResponseData (...args) {\n assert(!this.#onCompleteCalled)\n assert(!this.#onErrorCalled)\n\n return this.#handler.onResponseData?.(...args)\n }\n\n onResponseEnd (...args) {\n assert(!this.#onCompleteCalled)\n assert(!this.#onErrorCalled)\n\n this.#onCompleteCalled = true\n return this.#handler.onResponseEnd?.(...args)\n }\n\n onResponseError (...args) {\n this.#onErrorCalled = true\n return this.#handler.onResponseError?.(...args)\n }\n\n /**\n * @deprecated\n */\n onBodySent () {}\n}\n", "'use strict'\n\nconst util = require('../core/util')\nconst { kBodyUsed } = require('../core/symbols')\nconst assert = require('node:assert')\nconst { InvalidArgumentError } = require('../core/errors')\nconst EE = require('node:events')\n\nconst redirectableStatusCodes = [300, 301, 302, 303, 307, 308]\n\nconst kBody = Symbol('body')\n\nconst noop = () => {}\n\nclass BodyAsyncIterable {\n constructor (body) {\n this[kBody] = body\n this[kBodyUsed] = false\n }\n\n async * [Symbol.asyncIterator] () {\n assert(!this[kBodyUsed], 'disturbed')\n this[kBodyUsed] = true\n yield * this[kBody]\n }\n}\n\nclass RedirectHandler {\n static buildDispatch (dispatcher, maxRedirections) {\n if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) {\n throw new InvalidArgumentError('maxRedirections must be a positive number')\n }\n\n const dispatch = dispatcher.dispatch.bind(dispatcher)\n return (opts, originalHandler) => dispatch(opts, new RedirectHandler(dispatch, maxRedirections, opts, originalHandler))\n }\n\n constructor (dispatch, maxRedirections, opts, handler) {\n if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) {\n throw new InvalidArgumentError('maxRedirections must be a positive number')\n }\n\n this.dispatch = dispatch\n this.location = null\n const { maxRedirections: _, ...cleanOpts } = opts\n this.opts = cleanOpts // opts must be a copy, exclude maxRedirections\n this.maxRedirections = maxRedirections\n this.handler = handler\n this.history = []\n\n if (util.isStream(this.opts.body)) {\n // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp\n // so that it can be dispatched again?\n // TODO (fix): Do we need 100-expect support to provide a way to do this properly?\n if (util.bodyLength(this.opts.body) === 0) {\n this.opts.body\n .on('data', function () {\n assert(false)\n })\n }\n\n if (typeof this.opts.body.readableDidRead !== 'boolean') {\n this.opts.body[kBodyUsed] = false\n EE.prototype.on.call(this.opts.body, 'data', function () {\n this[kBodyUsed] = true\n })\n }\n } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') {\n // TODO (fix): We can't access ReadableStream internal state\n // to determine whether or not it has been disturbed. This is just\n // a workaround.\n this.opts.body = new BodyAsyncIterable(this.opts.body)\n } else if (\n this.opts.body &&\n typeof this.opts.body !== 'string' &&\n !ArrayBuffer.isView(this.opts.body) &&\n util.isIterable(this.opts.body) &&\n !util.isFormDataLike(this.opts.body)\n ) {\n // TODO: Should we allow re-using iterable if !this.opts.idempotent\n // or through some other flag?\n this.opts.body = new BodyAsyncIterable(this.opts.body)\n }\n }\n\n onRequestStart (controller, context) {\n this.handler.onRequestStart?.(controller, { ...context, history: this.history })\n }\n\n onRequestUpgrade (controller, statusCode, headers, socket) {\n this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket)\n }\n\n onResponseStart (controller, statusCode, headers, statusMessage) {\n if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) {\n throw new Error('max redirects')\n }\n\n // https://tools.ietf.org/html/rfc7231#section-6.4.2\n // https://fetch.spec.whatwg.org/#http-redirect-fetch\n // In case of HTTP 301 or 302 with POST, change the method to GET\n if ((statusCode === 301 || statusCode === 302) && this.opts.method === 'POST') {\n this.opts.method = 'GET'\n if (util.isStream(this.opts.body)) {\n util.destroy(this.opts.body.on('error', noop))\n }\n this.opts.body = null\n }\n\n // https://tools.ietf.org/html/rfc7231#section-6.4.4\n // In case of HTTP 303, always replace method to be either HEAD or GET\n if (statusCode === 303 && this.opts.method !== 'HEAD') {\n this.opts.method = 'GET'\n if (util.isStream(this.opts.body)) {\n util.destroy(this.opts.body.on('error', noop))\n }\n this.opts.body = null\n }\n\n this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) || redirectableStatusCodes.indexOf(statusCode) === -1\n ? null\n : headers.location\n\n if (this.opts.origin) {\n this.history.push(new URL(this.opts.path, this.opts.origin))\n }\n\n if (!this.location) {\n this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage)\n return\n }\n\n const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)))\n const path = search ? `${pathname}${search}` : pathname\n\n // Check for redirect loops by seeing if we've already visited this URL in our history\n // This catches the case where Client/Pool try to handle cross-origin redirects but fail\n // and keep redirecting to the same URL in an infinite loop\n const redirectUrlString = `${origin}${path}`\n for (const historyUrl of this.history) {\n if (historyUrl.toString() === redirectUrlString) {\n throw new InvalidArgumentError(`Redirect loop detected. Cannot redirect to ${origin}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`)\n }\n }\n\n // Remove headers referring to the original URL.\n // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers.\n // https://tools.ietf.org/html/rfc7231#section-6.4\n this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin)\n this.opts.path = path\n this.opts.origin = origin\n this.opts.query = null\n }\n\n onResponseData (controller, chunk) {\n if (this.location) {\n /*\n https://tools.ietf.org/html/rfc7231#section-6.4\n\n TLDR: undici always ignores 3xx response bodies.\n\n Redirection is used to serve the requested resource from another URL, so it assumes that\n no body is generated (and thus can be ignored). Even though generating a body is not prohibited.\n\n For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually\n (which means it's optional and not mandated) contain just an hyperlink to the value of\n the Location response header, so the body can be ignored safely.\n\n For status 300, which is \"Multiple Choices\", the spec mentions both generating a Location\n response header AND a response body with the other possible location to follow.\n Since the spec explicitly chooses not to specify a format for such body and leave it to\n servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it.\n */\n } else {\n this.handler.onResponseData?.(controller, chunk)\n }\n }\n\n onResponseEnd (controller, trailers) {\n if (this.location) {\n /*\n https://tools.ietf.org/html/rfc7231#section-6.4\n\n TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections\n and neither are useful if present.\n\n See comment on onData method above for more detailed information.\n */\n this.dispatch(this.opts, this)\n } else {\n this.handler.onResponseEnd(controller, trailers)\n }\n }\n\n onResponseError (controller, error) {\n this.handler.onResponseError?.(controller, error)\n }\n}\n\n// https://tools.ietf.org/html/rfc7231#section-6.4.4\nfunction shouldRemoveHeader (header, removeContent, unknownOrigin) {\n if (header.length === 4) {\n return util.headerNameToString(header) === 'host'\n }\n if (removeContent && util.headerNameToString(header).startsWith('content-')) {\n return true\n }\n if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) {\n const name = util.headerNameToString(header)\n return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization'\n }\n return false\n}\n\n// https://tools.ietf.org/html/rfc7231#section-6.4\nfunction cleanRequestHeaders (headers, removeContent, unknownOrigin) {\n const ret = []\n if (Array.isArray(headers)) {\n for (let i = 0; i < headers.length; i += 2) {\n if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) {\n ret.push(headers[i], headers[i + 1])\n }\n }\n } else if (headers && typeof headers === 'object') {\n const entries = util.hasSafeIterator(headers) ? headers : Object.entries(headers)\n\n for (const [key, value] of entries) {\n if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) {\n ret.push(key, value)\n }\n }\n } else {\n assert(headers == null, 'headers must be an object or an array')\n }\n return ret\n}\n\nmodule.exports = RedirectHandler\n", "'use strict'\n\nconst RedirectHandler = require('../handler/redirect-handler')\n\nfunction createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections } = {}) {\n return (dispatch) => {\n return function Intercept (opts, handler) {\n const { maxRedirections = defaultMaxRedirections, ...rest } = opts\n\n if (maxRedirections == null || maxRedirections === 0) {\n return dispatch(opts, handler)\n }\n\n const dispatchOpts = { ...rest } // Stop sub dispatcher from also redirecting.\n const redirectHandler = new RedirectHandler(dispatch, maxRedirections, dispatchOpts, handler)\n return dispatch(dispatchOpts, redirectHandler)\n }\n }\n}\n\nmodule.exports = createRedirectInterceptor\n", "'use strict'\n\n// const { parseHeaders } = require('../core/util')\nconst DecoratorHandler = require('../handler/decorator-handler')\nconst { ResponseError } = require('../core/errors')\n\nclass ResponseErrorHandler extends DecoratorHandler {\n #statusCode\n #contentType\n #decoder\n #headers\n #body\n\n constructor (_opts, { handler }) {\n super(handler)\n }\n\n #checkContentType (contentType) {\n return (this.#contentType ?? '').indexOf(contentType) === 0\n }\n\n onRequestStart (controller, context) {\n this.#statusCode = 0\n this.#contentType = null\n this.#decoder = null\n this.#headers = null\n this.#body = ''\n\n return super.onRequestStart(controller, context)\n }\n\n onResponseStart (controller, statusCode, headers, statusMessage) {\n this.#statusCode = statusCode\n this.#headers = headers\n this.#contentType = headers['content-type']\n\n if (this.#statusCode < 400) {\n return super.onResponseStart(controller, statusCode, headers, statusMessage)\n }\n\n if (this.#checkContentType('application/json') || this.#checkContentType('text/plain')) {\n this.#decoder = new TextDecoder('utf-8')\n }\n }\n\n onResponseData (controller, chunk) {\n if (this.#statusCode < 400) {\n return super.onResponseData(controller, chunk)\n }\n\n this.#body += this.#decoder?.decode(chunk, { stream: true }) ?? ''\n }\n\n onResponseEnd (controller, trailers) {\n if (this.#statusCode >= 400) {\n this.#body += this.#decoder?.decode(undefined, { stream: false }) ?? ''\n\n if (this.#checkContentType('application/json')) {\n try {\n this.#body = JSON.parse(this.#body)\n } catch {\n // Do nothing...\n }\n }\n\n let err\n const stackTraceLimit = Error.stackTraceLimit\n Error.stackTraceLimit = 0\n try {\n err = new ResponseError('Response Error', this.#statusCode, {\n body: this.#body,\n headers: this.#headers\n })\n } finally {\n Error.stackTraceLimit = stackTraceLimit\n }\n\n super.onResponseError(controller, err)\n } else {\n super.onResponseEnd(controller, trailers)\n }\n }\n\n onResponseError (controller, err) {\n super.onResponseError(controller, err)\n }\n}\n\nmodule.exports = () => {\n return (dispatch) => {\n return function Intercept (opts, handler) {\n return dispatch(opts, new ResponseErrorHandler(opts, { handler }))\n }\n }\n}\n", "'use strict'\nconst RetryHandler = require('../handler/retry-handler')\n\nmodule.exports = globalOpts => {\n return dispatch => {\n return function retryInterceptor (opts, handler) {\n return dispatch(\n opts,\n new RetryHandler(\n { ...opts, retryOptions: { ...globalOpts, ...opts.retryOptions } },\n {\n handler,\n dispatch\n }\n )\n )\n }\n }\n}\n", "'use strict'\n\nconst { InvalidArgumentError, RequestAbortedError } = require('../core/errors')\nconst DecoratorHandler = require('../handler/decorator-handler')\n\nclass DumpHandler extends DecoratorHandler {\n #maxSize = 1024 * 1024\n #dumped = false\n #size = 0\n #controller = null\n aborted = false\n reason = false\n\n constructor ({ maxSize, signal }, handler) {\n if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) {\n throw new InvalidArgumentError('maxSize must be a number greater than 0')\n }\n\n super(handler)\n\n this.#maxSize = maxSize ?? this.#maxSize\n // this.#handler = handler\n }\n\n #abort (reason) {\n this.aborted = true\n this.reason = reason\n }\n\n onRequestStart (controller, context) {\n controller.abort = this.#abort.bind(this)\n this.#controller = controller\n\n return super.onRequestStart(controller, context)\n }\n\n onResponseStart (controller, statusCode, headers, statusMessage) {\n const contentLength = headers['content-length']\n\n if (contentLength != null && contentLength > this.#maxSize) {\n throw new RequestAbortedError(\n `Response size (${contentLength}) larger than maxSize (${\n this.#maxSize\n })`\n )\n }\n\n if (this.aborted === true) {\n return true\n }\n\n return super.onResponseStart(controller, statusCode, headers, statusMessage)\n }\n\n onResponseError (controller, err) {\n if (this.#dumped) {\n return\n }\n\n // On network errors before connect, controller will be null\n err = this.#controller?.reason ?? err\n\n super.onResponseError(controller, err)\n }\n\n onResponseData (controller, chunk) {\n this.#size = this.#size + chunk.length\n\n if (this.#size >= this.#maxSize) {\n this.#dumped = true\n\n if (this.aborted === true) {\n super.onResponseError(controller, this.reason)\n } else {\n super.onResponseEnd(controller, {})\n }\n }\n\n return true\n }\n\n onResponseEnd (controller, trailers) {\n if (this.#dumped) {\n return\n }\n\n if (this.#controller.aborted === true) {\n super.onResponseError(controller, this.reason)\n return\n }\n\n super.onResponseEnd(controller, trailers)\n }\n}\n\nfunction createDumpInterceptor (\n { maxSize: defaultMaxSize } = {\n maxSize: 1024 * 1024\n }\n) {\n return dispatch => {\n return function Intercept (opts, handler) {\n const { dumpMaxSize = defaultMaxSize } = opts\n\n const dumpHandler = new DumpHandler({ maxSize: dumpMaxSize, signal: opts.signal }, handler)\n\n return dispatch(opts, dumpHandler)\n }\n }\n}\n\nmodule.exports = createDumpInterceptor\n", "'use strict'\nconst { isIP } = require('node:net')\nconst { lookup } = require('node:dns')\nconst DecoratorHandler = require('../handler/decorator-handler')\nconst { InvalidArgumentError, InformationalError } = require('../core/errors')\nconst maxInt = Math.pow(2, 31) - 1\n\nfunction hasSafeIterator (headers) {\n const prototype = Object.getPrototypeOf(headers)\n const ownIterator = Object.prototype.hasOwnProperty.call(headers, Symbol.iterator)\n return ownIterator || (prototype != null && prototype !== Object.prototype && typeof headers[Symbol.iterator] === 'function')\n}\n\nfunction isHostHeader (key) {\n return typeof key === 'string' && key.toLowerCase() === 'host'\n}\n\nfunction normalizeHeaders (headers) {\n if (headers == null) {\n return null\n }\n\n if (Array.isArray(headers)) {\n if (headers.length === 0 || !Array.isArray(headers[0])) {\n return headers\n }\n\n const normalized = []\n for (const header of headers) {\n if (Array.isArray(header) && header.length === 2) {\n normalized.push(header[0], header[1])\n } else {\n normalized.push(header)\n }\n }\n\n return normalized\n }\n\n if (typeof headers === 'object' && hasSafeIterator(headers)) {\n const normalized = []\n for (const header of headers) {\n if (Array.isArray(header) && header.length === 2) {\n normalized.push(header[0], header[1])\n } else {\n normalized.push(header)\n }\n }\n\n return normalized\n }\n\n return headers\n}\n\nfunction hasHostHeader (headers) {\n if (headers == null) {\n return false\n }\n\n if (Array.isArray(headers)) {\n if (headers.length === 0) {\n return false\n }\n\n for (let i = 0; i < headers.length; i += 2) {\n if (isHostHeader(headers[i])) {\n return true\n }\n }\n\n return false\n }\n\n if (typeof headers === 'object') {\n for (const key in headers) {\n if (isHostHeader(key)) {\n return true\n }\n }\n }\n\n return false\n}\n\nfunction withHostHeader (host, headers) {\n const normalizedHeaders = normalizeHeaders(headers)\n\n if (hasHostHeader(normalizedHeaders)) {\n return normalizedHeaders\n }\n\n if (Array.isArray(normalizedHeaders)) {\n return ['host', host, ...normalizedHeaders]\n }\n\n if (normalizedHeaders && typeof normalizedHeaders === 'object') {\n return {\n host,\n ...normalizedHeaders\n }\n }\n\n return { host }\n}\n\nclass DNSStorage {\n #maxItems = 0\n #records = new Map()\n\n constructor (opts) {\n this.#maxItems = opts.maxItems\n }\n\n get size () {\n return this.#records.size\n }\n\n get (hostname) {\n return this.#records.get(hostname) ?? null\n }\n\n set (hostname, records) {\n this.#records.set(hostname, records)\n }\n\n delete (hostname) {\n this.#records.delete(hostname)\n }\n\n // Delegate to storage decide can we do more lookups or not\n full () {\n return this.size >= this.#maxItems\n }\n}\n\nclass DNSInstance {\n #maxTTL = 0\n #maxItems = 0\n dualStack = true\n affinity = null\n lookup = null\n pick = null\n storage = null\n\n constructor (opts) {\n this.#maxTTL = opts.maxTTL\n this.#maxItems = opts.maxItems\n this.dualStack = opts.dualStack\n this.affinity = opts.affinity\n this.lookup = opts.lookup ?? this.#defaultLookup\n this.pick = opts.pick ?? this.#defaultPick\n this.storage = opts.storage ?? new DNSStorage(opts)\n }\n\n runLookup (origin, opts, cb) {\n const ips = this.storage.get(origin.hostname)\n\n // If full, we just return the origin\n if (ips == null && this.storage.full()) {\n cb(null, origin)\n return\n }\n\n const newOpts = {\n affinity: this.affinity,\n dualStack: this.dualStack,\n lookup: this.lookup,\n pick: this.pick,\n ...opts.dns,\n maxTTL: this.#maxTTL,\n maxItems: this.#maxItems\n }\n\n // If no IPs we lookup\n if (ips == null) {\n this.lookup(origin, newOpts, (err, addresses) => {\n if (err || addresses == null || addresses.length === 0) {\n cb(err ?? new InformationalError('No DNS entries found'))\n return\n }\n\n this.setRecords(origin, addresses)\n const records = this.storage.get(origin.hostname)\n\n const ip = this.pick(\n origin,\n records,\n newOpts.affinity\n )\n\n let port\n if (typeof ip.port === 'number') {\n port = `:${ip.port}`\n } else if (origin.port !== '') {\n port = `:${origin.port}`\n } else {\n port = ''\n }\n\n cb(\n null,\n new URL(`${origin.protocol}//${\n ip.family === 6 ? `[${ip.address}]` : ip.address\n }${port}`)\n )\n })\n } else {\n // If there's IPs we pick\n const ip = this.pick(\n origin,\n ips,\n newOpts.affinity\n )\n\n // If no IPs we lookup - deleting old records\n if (ip == null) {\n this.storage.delete(origin.hostname)\n this.runLookup(origin, opts, cb)\n return\n }\n\n let port\n if (typeof ip.port === 'number') {\n port = `:${ip.port}`\n } else if (origin.port !== '') {\n port = `:${origin.port}`\n } else {\n port = ''\n }\n\n cb(\n null,\n new URL(`${origin.protocol}//${\n ip.family === 6 ? `[${ip.address}]` : ip.address\n }${port}`)\n )\n }\n }\n\n #defaultLookup (origin, opts, cb) {\n lookup(\n origin.hostname,\n {\n all: true,\n family: this.dualStack === false ? this.affinity : 0,\n order: 'ipv4first'\n },\n (err, addresses) => {\n if (err) {\n return cb(err)\n }\n\n const results = new Map()\n\n for (const addr of addresses) {\n // On linux we found duplicates, we attempt to remove them with\n // the latest record\n results.set(`${addr.address}:${addr.family}`, addr)\n }\n\n cb(null, results.values())\n }\n )\n }\n\n #defaultPick (origin, hostnameRecords, affinity) {\n let ip = null\n const { records, offset } = hostnameRecords\n\n let family\n if (this.dualStack) {\n if (affinity == null) {\n // Balance between ip families\n if (offset == null || offset === maxInt) {\n hostnameRecords.offset = 0\n affinity = 4\n } else {\n hostnameRecords.offset++\n affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4\n }\n }\n\n if (records[affinity] != null && records[affinity].ips.length > 0) {\n family = records[affinity]\n } else {\n family = records[affinity === 4 ? 6 : 4]\n }\n } else {\n family = records[affinity]\n }\n\n // If no IPs we return null\n if (family == null || family.ips.length === 0) {\n return ip\n }\n\n if (family.offset == null || family.offset === maxInt) {\n family.offset = 0\n } else {\n family.offset++\n }\n\n const position = family.offset % family.ips.length\n ip = family.ips[position] ?? null\n\n if (ip == null) {\n return ip\n }\n\n if (Date.now() - ip.timestamp > ip.ttl) { // record TTL is already in ms\n // We delete expired records\n // It is possible that they have different TTL, so we manage them individually\n family.ips.splice(position, 1)\n return this.pick(origin, hostnameRecords, affinity)\n }\n\n return ip\n }\n\n pickFamily (origin, ipFamily) {\n const records = this.storage.get(origin.hostname)?.records\n if (!records) {\n return null\n }\n\n const family = records[ipFamily]\n if (!family) {\n return null\n }\n\n if (family.offset == null || family.offset === maxInt) {\n family.offset = 0\n } else {\n family.offset++\n }\n\n const position = family.offset % family.ips.length\n const ip = family.ips[position] ?? null\n if (ip == null) {\n return ip\n }\n\n if (Date.now() - ip.timestamp > ip.ttl) { // record TTL is already in ms\n // We delete expired records\n // It is possible that they have different TTL, so we manage them individually\n family.ips.splice(position, 1)\n }\n\n return ip\n }\n\n setRecords (origin, addresses) {\n const timestamp = Date.now()\n const records = { records: { 4: null, 6: null } }\n let minTTL = this.#maxTTL\n for (const record of addresses) {\n record.timestamp = timestamp\n if (typeof record.ttl === 'number') {\n // The record TTL is expected to be in ms\n record.ttl = Math.min(record.ttl, this.#maxTTL)\n minTTL = Math.min(minTTL, record.ttl)\n } else {\n record.ttl = this.#maxTTL\n }\n\n const familyRecords = records.records[record.family] ?? { ips: [] }\n\n familyRecords.ips.push(record)\n records.records[record.family] = familyRecords\n }\n\n // We provide a default TTL if external storage will be used without TTL per record-level support\n this.storage.set(origin.hostname, records, { ttl: minTTL })\n }\n\n deleteRecords (origin) {\n this.storage.delete(origin.hostname)\n }\n\n getHandler (meta, opts) {\n return new DNSDispatchHandler(this, meta, opts)\n }\n}\n\nclass DNSDispatchHandler extends DecoratorHandler {\n #state = null\n #opts = null\n #dispatch = null\n #origin = null\n #controller = null\n #newOrigin = null\n #firstTry = true\n\n constructor (state, { origin, handler, dispatch, newOrigin }, opts) {\n super(handler)\n this.#origin = origin\n this.#newOrigin = newOrigin\n this.#opts = { ...opts }\n this.#state = state\n this.#dispatch = dispatch\n }\n\n onResponseError (controller, err) {\n switch (err.code) {\n case 'ETIMEDOUT':\n case 'ECONNREFUSED': {\n if (this.#state.dualStack) {\n if (!this.#firstTry) {\n super.onResponseError(controller, err)\n return\n }\n this.#firstTry = false\n\n // Pick an ip address from the other family\n const otherFamily = this.#newOrigin.hostname[0] === '[' ? 4 : 6\n const ip = this.#state.pickFamily(this.#origin, otherFamily)\n if (ip == null) {\n super.onResponseError(controller, err)\n return\n }\n\n let port\n if (typeof ip.port === 'number') {\n port = `:${ip.port}`\n } else if (this.#origin.port !== '') {\n port = `:${this.#origin.port}`\n } else {\n port = ''\n }\n\n const dispatchOpts = {\n ...this.#opts,\n origin: `${this.#origin.protocol}//${\n ip.family === 6 ? `[${ip.address}]` : ip.address\n }${port}`,\n headers: withHostHeader(this.#origin.host, this.#opts.headers)\n }\n this.#dispatch(dispatchOpts, this)\n return\n }\n\n // if dual-stack disabled, we error out\n super.onResponseError(controller, err)\n break\n }\n case 'ENOTFOUND':\n this.#state.deleteRecords(this.#origin)\n super.onResponseError(controller, err)\n break\n default:\n super.onResponseError(controller, err)\n break\n }\n }\n}\n\nmodule.exports = interceptorOpts => {\n if (\n interceptorOpts?.maxTTL != null &&\n (typeof interceptorOpts?.maxTTL !== 'number' || interceptorOpts?.maxTTL < 0)\n ) {\n throw new InvalidArgumentError('Invalid maxTTL. Must be a positive number')\n }\n\n if (\n interceptorOpts?.maxItems != null &&\n (typeof interceptorOpts?.maxItems !== 'number' ||\n interceptorOpts?.maxItems < 1)\n ) {\n throw new InvalidArgumentError(\n 'Invalid maxItems. Must be a positive number and greater than zero'\n )\n }\n\n if (\n interceptorOpts?.affinity != null &&\n interceptorOpts?.affinity !== 4 &&\n interceptorOpts?.affinity !== 6\n ) {\n throw new InvalidArgumentError('Invalid affinity. Must be either 4 or 6')\n }\n\n if (\n interceptorOpts?.dualStack != null &&\n typeof interceptorOpts?.dualStack !== 'boolean'\n ) {\n throw new InvalidArgumentError('Invalid dualStack. Must be a boolean')\n }\n\n if (\n interceptorOpts?.lookup != null &&\n typeof interceptorOpts?.lookup !== 'function'\n ) {\n throw new InvalidArgumentError('Invalid lookup. Must be a function')\n }\n\n if (\n interceptorOpts?.pick != null &&\n typeof interceptorOpts?.pick !== 'function'\n ) {\n throw new InvalidArgumentError('Invalid pick. Must be a function')\n }\n\n if (\n interceptorOpts?.storage != null &&\n (typeof interceptorOpts?.storage?.get !== 'function' ||\n typeof interceptorOpts?.storage?.set !== 'function' ||\n typeof interceptorOpts?.storage?.full !== 'function' ||\n typeof interceptorOpts?.storage?.delete !== 'function'\n )\n ) {\n throw new InvalidArgumentError('Invalid storage. Must be a object with methods: { get, set, full, delete }')\n }\n\n const dualStack = interceptorOpts?.dualStack ?? true\n let affinity\n if (dualStack) {\n affinity = interceptorOpts?.affinity ?? null\n } else {\n affinity = interceptorOpts?.affinity ?? 4\n }\n\n const opts = {\n maxTTL: interceptorOpts?.maxTTL ?? 10e3, // Expressed in ms\n lookup: interceptorOpts?.lookup ?? null,\n pick: interceptorOpts?.pick ?? null,\n dualStack,\n affinity,\n maxItems: interceptorOpts?.maxItems ?? Infinity,\n storage: interceptorOpts?.storage\n }\n\n const instance = new DNSInstance(opts)\n\n return dispatch => {\n return function dnsInterceptor (origDispatchOpts, handler) {\n const origin =\n origDispatchOpts.origin.constructor === URL\n ? origDispatchOpts.origin\n : new URL(origDispatchOpts.origin)\n\n if (isIP(origin.hostname) !== 0) {\n return dispatch(origDispatchOpts, handler)\n }\n\n instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => {\n if (err) {\n return handler.onResponseError(null, err)\n }\n\n const dispatchOpts = {\n ...origDispatchOpts,\n servername: origin.hostname, // For SNI on TLS\n origin: newOrigin.origin,\n headers: withHostHeader(origin.host, origDispatchOpts.headers)\n }\n\n dispatch(\n dispatchOpts,\n instance.getHandler(\n { origin, dispatch, handler, newOrigin },\n origDispatchOpts\n )\n )\n })\n\n return true\n }\n }\n}\n", "'use strict'\n\nconst {\n safeHTTPMethods,\n pathHasQueryOrFragment,\n hasSafeIterator\n} = require('../core/util')\n\nconst { serializePathWithQuery } = require('../core/util')\n\n/**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchOptions} opts\n */\nfunction makeCacheKey (opts) {\n if (!opts.origin) {\n throw new Error('opts.origin is undefined')\n }\n\n let fullPath = opts.path || '/'\n\n if (opts.query && !pathHasQueryOrFragment(opts.path)) {\n fullPath = serializePathWithQuery(fullPath, opts.query)\n }\n\n return {\n origin: opts.origin.toString(),\n method: opts.method,\n path: fullPath,\n headers: opts.headers\n }\n}\n\n/**\n * @param {Record}\n * @returns {Record}\n */\nfunction normalizeHeaders (opts) {\n let headers\n if (opts.headers == null) {\n headers = {}\n } else if (typeof opts.headers === 'object') {\n headers = {}\n\n if (hasSafeIterator(opts.headers)) {\n for (const x of opts.headers) {\n if (!Array.isArray(x)) {\n throw new Error('opts.headers is not a valid header map')\n }\n const [key, val] = x\n if (typeof key !== 'string' || typeof val !== 'string') {\n throw new Error('opts.headers is not a valid header map')\n }\n headers[key.toLowerCase()] = val\n }\n } else {\n for (const key of Object.keys(opts.headers)) {\n headers[key.toLowerCase()] = opts.headers[key]\n }\n }\n } else {\n throw new Error('opts.headers is not an object')\n }\n\n return headers\n}\n\n/**\n * @param {any} key\n */\nfunction assertCacheKey (key) {\n if (typeof key !== 'object') {\n throw new TypeError(`expected key to be object, got ${typeof key}`)\n }\n\n for (const property of ['origin', 'method', 'path']) {\n if (typeof key[property] !== 'string') {\n throw new TypeError(`expected key.${property} to be string, got ${typeof key[property]}`)\n }\n }\n\n if (key.headers !== undefined && typeof key.headers !== 'object') {\n throw new TypeError(`expected headers to be object, got ${typeof key}`)\n }\n}\n\n/**\n * @param {any} value\n */\nfunction assertCacheValue (value) {\n if (typeof value !== 'object') {\n throw new TypeError(`expected value to be object, got ${typeof value}`)\n }\n\n for (const property of ['statusCode', 'cachedAt', 'staleAt', 'deleteAt']) {\n if (typeof value[property] !== 'number') {\n throw new TypeError(`expected value.${property} to be number, got ${typeof value[property]}`)\n }\n }\n\n if (typeof value.statusMessage !== 'string') {\n throw new TypeError(`expected value.statusMessage to be string, got ${typeof value.statusMessage}`)\n }\n\n if (value.headers != null && typeof value.headers !== 'object') {\n throw new TypeError(`expected value.rawHeaders to be object, got ${typeof value.headers}`)\n }\n\n if (value.vary !== undefined && typeof value.vary !== 'object') {\n throw new TypeError(`expected value.vary to be object, got ${typeof value.vary}`)\n }\n\n if (value.etag !== undefined && typeof value.etag !== 'string') {\n throw new TypeError(`expected value.etag to be string, got ${typeof value.etag}`)\n }\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-cache-control\n * @see https://www.iana.org/assignments/http-cache-directives/http-cache-directives.xhtml\n\n * @param {string | string[]} header\n * @returns {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives}\n */\nfunction parseCacheControlHeader (header) {\n /**\n * @type {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives}\n */\n const output = {}\n\n let directives\n if (Array.isArray(header)) {\n directives = []\n\n for (const directive of header) {\n directives.push(...directive.split(','))\n }\n } else {\n directives = header.split(',')\n }\n\n for (let i = 0; i < directives.length; i++) {\n const directive = directives[i].toLowerCase()\n const keyValueDelimiter = directive.indexOf('=')\n\n let key\n let value\n if (keyValueDelimiter !== -1) {\n key = directive.substring(0, keyValueDelimiter).trimStart()\n value = directive.substring(keyValueDelimiter + 1)\n } else {\n key = directive.trim()\n }\n\n switch (key) {\n case 'min-fresh':\n case 'max-stale':\n case 'max-age':\n case 's-maxage':\n case 'stale-while-revalidate':\n case 'stale-if-error': {\n if (value === undefined || value[0] === ' ') {\n continue\n }\n\n if (\n value.length >= 2 &&\n value[0] === '\"' &&\n value[value.length - 1] === '\"'\n ) {\n value = value.substring(1, value.length - 1)\n }\n\n const parsedValue = parseInt(value, 10)\n // eslint-disable-next-line no-self-compare\n if (parsedValue !== parsedValue) {\n continue\n }\n\n if (key === 'max-age' && key in output && output[key] >= parsedValue) {\n continue\n }\n\n output[key] = parsedValue\n\n break\n }\n case 'private':\n case 'no-cache': {\n if (value) {\n // The private and no-cache directives can be unqualified (aka just\n // `private` or `no-cache`) or qualified (w/ a value). When they're\n // qualified, it's a list of headers like `no-cache=header1`,\n // `no-cache=\"header1\"`, or `no-cache=\"header1, header2\"`\n // If we're given multiple headers, the comma messes us up since\n // we split the full header by commas. So, let's loop through the\n // remaining parts in front of us until we find one that ends in a\n // quote. We can then just splice all of the parts in between the\n // starting quote and the ending quote out of the directives array\n // and continue parsing like normal.\n // https://www.rfc-editor.org/rfc/rfc9111.html#name-no-cache-2\n if (value[0] === '\"') {\n // Something like `no-cache=\"some-header\"` OR `no-cache=\"some-header, another-header\"`.\n\n // Add the first header on and cut off the leading quote\n const headers = [value.substring(1)]\n\n let foundEndingQuote = value[value.length - 1] === '\"'\n if (!foundEndingQuote) {\n // Something like `no-cache=\"some-header, another-header\"`\n // This can still be something invalid, e.g. `no-cache=\"some-header, ...`\n for (let j = i + 1; j < directives.length; j++) {\n const nextPart = directives[j]\n const nextPartLength = nextPart.length\n\n headers.push(nextPart.trim())\n\n if (nextPartLength !== 0 && nextPart[nextPartLength - 1] === '\"') {\n foundEndingQuote = true\n break\n }\n }\n }\n\n if (foundEndingQuote) {\n let lastHeader = headers[headers.length - 1]\n if (lastHeader[lastHeader.length - 1] === '\"') {\n lastHeader = lastHeader.substring(0, lastHeader.length - 1)\n headers[headers.length - 1] = lastHeader\n }\n\n if (key in output) {\n output[key] = output[key].concat(headers)\n } else {\n output[key] = headers\n }\n }\n } else {\n // Something like `no-cache=\"some-header\"`\n if (key in output) {\n output[key] = output[key].concat(value)\n } else {\n output[key] = [value]\n }\n }\n\n break\n }\n }\n // eslint-disable-next-line no-fallthrough\n case 'public':\n case 'no-store':\n case 'must-revalidate':\n case 'proxy-revalidate':\n case 'immutable':\n case 'no-transform':\n case 'must-understand':\n case 'only-if-cached':\n if (value) {\n // These are qualified (something like `public=...`) when they aren't\n // allowed to be, skip\n continue\n }\n\n output[key] = true\n break\n default:\n // Ignore unknown directives as per https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.3-1\n continue\n }\n }\n\n return output\n}\n\n/**\n * @param {string | string[]} varyHeader Vary header from the server\n * @param {Record} headers Request headers\n * @returns {Record}\n */\nfunction parseVaryHeader (varyHeader, headers) {\n if (typeof varyHeader === 'string' && varyHeader.includes('*')) {\n return headers\n }\n\n const output = /** @type {Record} */ ({})\n\n const varyingHeaders = typeof varyHeader === 'string'\n ? varyHeader.split(',')\n : varyHeader\n\n for (const header of varyingHeaders) {\n const trimmedHeader = header.trim().toLowerCase()\n\n output[trimmedHeader] = headers[trimmedHeader] ?? null\n }\n\n return output\n}\n\n/**\n * Note: this deviates from the spec a little. Empty etags (\"\", W/\"\") are valid,\n * however, including them in cached resposnes serves little to no purpose.\n *\n * @see https://www.rfc-editor.org/rfc/rfc9110.html#name-etag\n *\n * @param {string} etag\n * @returns {boolean}\n */\nfunction isEtagUsable (etag) {\n if (etag.length <= 2) {\n // Shortest an etag can be is two chars (just \"\"). This is where we deviate\n // from the spec requiring a min of 3 chars however\n return false\n }\n\n if (etag[0] === '\"' && etag[etag.length - 1] === '\"') {\n // ETag: \"\"asd123\"\" or ETag: \"W/\"asd123\"\", kinda undefined behavior in the\n // spec. Some servers will accept these while others don't.\n // ETag: \"asd123\"\n return !(etag[1] === '\"' || etag.startsWith('\"W/'))\n }\n\n if (etag.startsWith('W/\"') && etag[etag.length - 1] === '\"') {\n // ETag: W/\"\", also where we deviate from the spec & require a min of 3\n // chars\n // ETag: for W/\"\", W/\"asd123\"\n return etag.length !== 4\n }\n\n // Anything else\n return false\n}\n\n/**\n * @param {unknown} store\n * @returns {asserts store is import('../../types/cache-interceptor.d.ts').default.CacheStore}\n */\nfunction assertCacheStore (store, name = 'CacheStore') {\n if (typeof store !== 'object' || store === null) {\n throw new TypeError(`expected type of ${name} to be a CacheStore, got ${store === null ? 'null' : typeof store}`)\n }\n\n for (const fn of ['get', 'createWriteStream', 'delete']) {\n if (typeof store[fn] !== 'function') {\n throw new TypeError(`${name} needs to have a \\`${fn}()\\` function`)\n }\n }\n}\n/**\n * @param {unknown} methods\n * @returns {asserts methods is import('../../types/cache-interceptor.d.ts').default.CacheMethods[]}\n */\nfunction assertCacheMethods (methods, name = 'CacheMethods') {\n if (!Array.isArray(methods)) {\n throw new TypeError(`expected type of ${name} needs to be an array, got ${methods === null ? 'null' : typeof methods}`)\n }\n\n if (methods.length === 0) {\n throw new TypeError(`${name} needs to have at least one method`)\n }\n\n for (const method of methods) {\n if (!safeHTTPMethods.includes(method)) {\n throw new TypeError(`element of ${name}-array needs to be one of following values: ${safeHTTPMethods.join(', ')}, got ${method}`)\n }\n }\n}\n\n/**\n * Creates a string key for request deduplication purposes.\n * This key is used to identify in-flight requests that can be shared.\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey\n * @param {Set} [excludeHeaders] Set of lowercase header names to exclude from the key\n * @returns {string}\n */\nfunction makeDeduplicationKey (cacheKey, excludeHeaders) {\n // Create a deterministic string key from the cache key\n // Include origin, method, path, and sorted headers\n let key = `${cacheKey.origin}:${cacheKey.method}:${cacheKey.path}`\n\n if (cacheKey.headers) {\n const sortedHeaders = Object.keys(cacheKey.headers).sort()\n for (const header of sortedHeaders) {\n // Skip excluded headers\n if (excludeHeaders?.has(header.toLowerCase())) {\n continue\n }\n const value = cacheKey.headers[header]\n key += `:${header}=${Array.isArray(value) ? value.join(',') : value}`\n }\n }\n\n return key\n}\n\nmodule.exports = {\n makeCacheKey,\n normalizeHeaders,\n assertCacheKey,\n assertCacheValue,\n parseCacheControlHeader,\n parseVaryHeader,\n isEtagUsable,\n assertCacheMethods,\n assertCacheStore,\n makeDeduplicationKey\n}\n", "'use strict'\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc9110.html#name-date-time-formats\n *\n * @param {string} date\n * @returns {Date | undefined}\n */\nfunction parseHttpDate (date) {\n // Sun, 06 Nov 1994 08:49:37 GMT ; IMF-fixdate\n // Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format\n // Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format\n\n switch (date[3]) {\n case ',': return parseImfDate(date)\n case ' ': return parseAscTimeDate(date)\n default: return parseRfc850Date(date)\n }\n}\n\n/**\n * @see https://httpwg.org/specs/rfc9110.html#preferred.date.format\n *\n * @param {string} date\n * @returns {Date | undefined}\n */\nfunction parseImfDate (date) {\n if (\n date.length !== 29 ||\n date[4] !== ' ' ||\n date[7] !== ' ' ||\n date[11] !== ' ' ||\n date[16] !== ' ' ||\n date[19] !== ':' ||\n date[22] !== ':' ||\n date[25] !== ' ' ||\n date[26] !== 'G' ||\n date[27] !== 'M' ||\n date[28] !== 'T'\n ) {\n return undefined\n }\n\n let weekday = -1\n if (date[0] === 'S' && date[1] === 'u' && date[2] === 'n') { // Sunday\n weekday = 0\n } else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n') { // Monday\n weekday = 1\n } else if (date[0] === 'T' && date[1] === 'u' && date[2] === 'e') { // Tuesday\n weekday = 2\n } else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd') { // Wednesday\n weekday = 3\n } else if (date[0] === 'T' && date[1] === 'h' && date[2] === 'u') { // Thursday\n weekday = 4\n } else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i') { // Friday\n weekday = 5\n } else if (date[0] === 'S' && date[1] === 'a' && date[2] === 't') { // Saturday\n weekday = 6\n } else {\n return undefined // Not a valid day of the week\n }\n\n let day = 0\n if (date[5] === '0') {\n // Single digit day, e.g. \"Sun Nov 6 08:49:37 1994\"\n const code = date.charCodeAt(6)\n if (code < 49 || code > 57) {\n return undefined // Not a digit\n }\n day = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(5)\n if (code1 < 49 || code1 > 51) {\n return undefined // Not a digit between 1 and 3\n }\n const code2 = date.charCodeAt(6)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let monthIdx = -1\n if (\n (date[8] === 'J' && date[9] === 'a' && date[10] === 'n')\n ) {\n monthIdx = 0 // Jan\n } else if (\n (date[8] === 'F' && date[9] === 'e' && date[10] === 'b')\n ) {\n monthIdx = 1 // Feb\n } else if (\n (date[8] === 'M' && date[9] === 'a')\n ) {\n if (date[10] === 'r') {\n monthIdx = 2 // Mar\n } else if (date[10] === 'y') {\n monthIdx = 4 // May\n } else {\n return undefined // Invalid month\n }\n } else if (\n (date[8] === 'J')\n ) {\n if (date[9] === 'a' && date[10] === 'n') {\n monthIdx = 0 // Jan\n } else if (date[9] === 'u') {\n if (date[10] === 'n') {\n monthIdx = 5 // Jun\n } else if (date[10] === 'l') {\n monthIdx = 6 // Jul\n } else {\n return undefined // Invalid month\n }\n } else {\n return undefined // Invalid month\n }\n } else if (\n (date[8] === 'A')\n ) {\n if (date[9] === 'p' && date[10] === 'r') {\n monthIdx = 3 // Apr\n } else if (date[9] === 'u' && date[10] === 'g') {\n monthIdx = 7 // Aug\n } else {\n return undefined // Invalid month\n }\n } else if (\n (date[8] === 'S' && date[9] === 'e' && date[10] === 'p')\n ) {\n monthIdx = 8 // Sep\n } else if (\n (date[8] === 'O' && date[9] === 'c' && date[10] === 't')\n ) {\n monthIdx = 9 // Oct\n } else if (\n (date[8] === 'N' && date[9] === 'o' && date[10] === 'v')\n ) {\n monthIdx = 10 // Nov\n } else if (\n (date[8] === 'D' && date[9] === 'e' && date[10] === 'c')\n ) {\n monthIdx = 11 // Dec\n } else {\n // Not a valid month\n return undefined\n }\n\n const yearDigit1 = date.charCodeAt(12)\n if (yearDigit1 < 48 || yearDigit1 > 57) {\n return undefined // Not a digit\n }\n const yearDigit2 = date.charCodeAt(13)\n if (yearDigit2 < 48 || yearDigit2 > 57) {\n return undefined // Not a digit\n }\n const yearDigit3 = date.charCodeAt(14)\n if (yearDigit3 < 48 || yearDigit3 > 57) {\n return undefined // Not a digit\n }\n const yearDigit4 = date.charCodeAt(15)\n if (yearDigit4 < 48 || yearDigit4 > 57) {\n return undefined // Not a digit\n }\n const year = (yearDigit1 - 48) * 1000 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48)\n\n let hour = 0\n if (date[17] === '0') {\n const code = date.charCodeAt(18)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n hour = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(17)\n if (code1 < 48 || code1 > 50) {\n return undefined // Not a digit between 0 and 2\n }\n const code2 = date.charCodeAt(18)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n if (code1 === 50 && code2 > 51) {\n return undefined // Hour cannot be greater than 23\n }\n hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let minute = 0\n if (date[20] === '0') {\n const code = date.charCodeAt(21)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n minute = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(20)\n if (code1 < 48 || code1 > 53) {\n return undefined // Not a digit between 0 and 5\n }\n const code2 = date.charCodeAt(21)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let second = 0\n if (date[23] === '0') {\n const code = date.charCodeAt(24)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n second = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(23)\n if (code1 < 48 || code1 > 53) {\n return undefined // Not a digit between 0 and 5\n }\n const code2 = date.charCodeAt(24)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))\n return result.getUTCDay() === weekday ? result : undefined\n}\n\n/**\n * @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats\n *\n * @param {string} date\n * @returns {Date | undefined}\n */\nfunction parseAscTimeDate (date) {\n // This is assumed to be in UTC\n\n if (\n date.length !== 24 ||\n date[7] !== ' ' ||\n date[10] !== ' ' ||\n date[19] !== ' '\n ) {\n return undefined\n }\n\n let weekday = -1\n if (date[0] === 'S' && date[1] === 'u' && date[2] === 'n') { // Sunday\n weekday = 0\n } else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n') { // Monday\n weekday = 1\n } else if (date[0] === 'T' && date[1] === 'u' && date[2] === 'e') { // Tuesday\n weekday = 2\n } else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd') { // Wednesday\n weekday = 3\n } else if (date[0] === 'T' && date[1] === 'h' && date[2] === 'u') { // Thursday\n weekday = 4\n } else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i') { // Friday\n weekday = 5\n } else if (date[0] === 'S' && date[1] === 'a' && date[2] === 't') { // Saturday\n weekday = 6\n } else {\n return undefined // Not a valid day of the week\n }\n\n let monthIdx = -1\n if (\n (date[4] === 'J' && date[5] === 'a' && date[6] === 'n')\n ) {\n monthIdx = 0 // Jan\n } else if (\n (date[4] === 'F' && date[5] === 'e' && date[6] === 'b')\n ) {\n monthIdx = 1 // Feb\n } else if (\n (date[4] === 'M' && date[5] === 'a')\n ) {\n if (date[6] === 'r') {\n monthIdx = 2 // Mar\n } else if (date[6] === 'y') {\n monthIdx = 4 // May\n } else {\n return undefined // Invalid month\n }\n } else if (\n (date[4] === 'J')\n ) {\n if (date[5] === 'a' && date[6] === 'n') {\n monthIdx = 0 // Jan\n } else if (date[5] === 'u') {\n if (date[6] === 'n') {\n monthIdx = 5 // Jun\n } else if (date[6] === 'l') {\n monthIdx = 6 // Jul\n } else {\n return undefined // Invalid month\n }\n } else {\n return undefined // Invalid month\n }\n } else if (\n (date[4] === 'A')\n ) {\n if (date[5] === 'p' && date[6] === 'r') {\n monthIdx = 3 // Apr\n } else if (date[5] === 'u' && date[6] === 'g') {\n monthIdx = 7 // Aug\n } else {\n return undefined // Invalid month\n }\n } else if (\n (date[4] === 'S' && date[5] === 'e' && date[6] === 'p')\n ) {\n monthIdx = 8 // Sep\n } else if (\n (date[4] === 'O' && date[5] === 'c' && date[6] === 't')\n ) {\n monthIdx = 9 // Oct\n } else if (\n (date[4] === 'N' && date[5] === 'o' && date[6] === 'v')\n ) {\n monthIdx = 10 // Nov\n } else if (\n (date[4] === 'D' && date[5] === 'e' && date[6] === 'c')\n ) {\n monthIdx = 11 // Dec\n } else {\n // Not a valid month\n return undefined\n }\n\n let day = 0\n if (date[8] === ' ') {\n // Single digit day, e.g. \"Sun Nov 6 08:49:37 1994\"\n const code = date.charCodeAt(9)\n if (code < 49 || code > 57) {\n return undefined // Not a digit\n }\n day = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(8)\n if (code1 < 49 || code1 > 51) {\n return undefined // Not a digit between 1 and 3\n }\n const code2 = date.charCodeAt(9)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let hour = 0\n if (date[11] === '0') {\n const code = date.charCodeAt(12)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n hour = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(11)\n if (code1 < 48 || code1 > 50) {\n return undefined // Not a digit between 0 and 2\n }\n const code2 = date.charCodeAt(12)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n if (code1 === 50 && code2 > 51) {\n return undefined // Hour cannot be greater than 23\n }\n hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let minute = 0\n if (date[14] === '0') {\n const code = date.charCodeAt(15)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n minute = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(14)\n if (code1 < 48 || code1 > 53) {\n return undefined // Not a digit between 0 and 5\n }\n const code2 = date.charCodeAt(15)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let second = 0\n if (date[17] === '0') {\n const code = date.charCodeAt(18)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n second = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(17)\n if (code1 < 48 || code1 > 53) {\n return undefined // Not a digit between 0 and 5\n }\n const code2 = date.charCodeAt(18)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n const yearDigit1 = date.charCodeAt(20)\n if (yearDigit1 < 48 || yearDigit1 > 57) {\n return undefined // Not a digit\n }\n const yearDigit2 = date.charCodeAt(21)\n if (yearDigit2 < 48 || yearDigit2 > 57) {\n return undefined // Not a digit\n }\n const yearDigit3 = date.charCodeAt(22)\n if (yearDigit3 < 48 || yearDigit3 > 57) {\n return undefined // Not a digit\n }\n const yearDigit4 = date.charCodeAt(23)\n if (yearDigit4 < 48 || yearDigit4 > 57) {\n return undefined // Not a digit\n }\n const year = (yearDigit1 - 48) * 1000 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48)\n\n const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))\n return result.getUTCDay() === weekday ? result : undefined\n}\n\n/**\n * @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats\n *\n * @param {string} date\n * @returns {Date | undefined}\n */\nfunction parseRfc850Date (date) {\n let commaIndex = -1\n\n let weekday = -1\n if (date[0] === 'S') {\n if (date[1] === 'u' && date[2] === 'n' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') {\n weekday = 0 // Sunday\n commaIndex = 6\n } else if (date[1] === 'a' && date[2] === 't' && date[3] === 'u' && date[4] === 'r' && date[5] === 'd' && date[6] === 'a' && date[7] === 'y') {\n weekday = 6 // Saturday\n commaIndex = 8\n }\n } else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') {\n weekday = 1 // Monday\n commaIndex = 6\n } else if (date[0] === 'T') {\n if (date[1] === 'u' && date[2] === 'e' && date[3] === 's' && date[4] === 'd' && date[5] === 'a' && date[6] === 'y') {\n weekday = 2 // Tuesday\n commaIndex = 7\n } else if (date[1] === 'h' && date[2] === 'u' && date[3] === 'r' && date[4] === 's' && date[5] === 'd' && date[6] === 'a' && date[7] === 'y') {\n weekday = 4 // Thursday\n commaIndex = 8\n }\n } else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd' && date[3] === 'n' && date[4] === 'e' && date[5] === 's' && date[6] === 'd' && date[7] === 'a' && date[8] === 'y') {\n weekday = 3 // Wednesday\n commaIndex = 9\n } else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') {\n weekday = 5 // Friday\n commaIndex = 6\n } else {\n // Not a valid day name\n return undefined\n }\n\n if (\n date[commaIndex] !== ',' ||\n (date.length - commaIndex - 1) !== 23 ||\n date[commaIndex + 1] !== ' ' ||\n date[commaIndex + 4] !== '-' ||\n date[commaIndex + 8] !== '-' ||\n date[commaIndex + 11] !== ' ' ||\n date[commaIndex + 14] !== ':' ||\n date[commaIndex + 17] !== ':' ||\n date[commaIndex + 20] !== ' ' ||\n date[commaIndex + 21] !== 'G' ||\n date[commaIndex + 22] !== 'M' ||\n date[commaIndex + 23] !== 'T'\n ) {\n return undefined\n }\n\n let day = 0\n if (date[commaIndex + 2] === '0') {\n // Single digit day, e.g. \"Sun Nov 6 08:49:37 1994\"\n const code = date.charCodeAt(commaIndex + 3)\n if (code < 49 || code > 57) {\n return undefined // Not a digit\n }\n day = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(commaIndex + 2)\n if (code1 < 49 || code1 > 51) {\n return undefined // Not a digit between 1 and 3\n }\n const code2 = date.charCodeAt(commaIndex + 3)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let monthIdx = -1\n if (\n (date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'n')\n ) {\n monthIdx = 0 // Jan\n } else if (\n (date[commaIndex + 5] === 'F' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'b')\n ) {\n monthIdx = 1 // Feb\n } else if (\n (date[commaIndex + 5] === 'M' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'r')\n ) {\n monthIdx = 2 // Mar\n } else if (\n (date[commaIndex + 5] === 'A' && date[commaIndex + 6] === 'p' && date[commaIndex + 7] === 'r')\n ) {\n monthIdx = 3 // Apr\n } else if (\n (date[commaIndex + 5] === 'M' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'y')\n ) {\n monthIdx = 4 // May\n } else if (\n (date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'n')\n ) {\n monthIdx = 5 // Jun\n } else if (\n (date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'l')\n ) {\n monthIdx = 6 // Jul\n } else if (\n (date[commaIndex + 5] === 'A' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'g')\n ) {\n monthIdx = 7 // Aug\n } else if (\n (date[commaIndex + 5] === 'S' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'p')\n ) {\n monthIdx = 8 // Sep\n } else if (\n (date[commaIndex + 5] === 'O' && date[commaIndex + 6] === 'c' && date[commaIndex + 7] === 't')\n ) {\n monthIdx = 9 // Oct\n } else if (\n (date[commaIndex + 5] === 'N' && date[commaIndex + 6] === 'o' && date[commaIndex + 7] === 'v')\n ) {\n monthIdx = 10 // Nov\n } else if (\n (date[commaIndex + 5] === 'D' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'c')\n ) {\n monthIdx = 11 // Dec\n } else {\n // Not a valid month\n return undefined\n }\n\n const yearDigit1 = date.charCodeAt(commaIndex + 9)\n if (yearDigit1 < 48 || yearDigit1 > 57) {\n return undefined // Not a digit\n }\n const yearDigit2 = date.charCodeAt(commaIndex + 10)\n if (yearDigit2 < 48 || yearDigit2 > 57) {\n return undefined // Not a digit\n }\n\n let year = (yearDigit1 - 48) * 10 + (yearDigit2 - 48) // Convert ASCII codes to number\n\n // RFC 6265 states that the year is in the range 1970-2069.\n // @see https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.1\n //\n // 3. If the year-value is greater than or equal to 70 and less than or\n // equal to 99, increment the year-value by 1900.\n // 4. If the year-value is greater than or equal to 0 and less than or\n // equal to 69, increment the year-value by 2000.\n year += year < 70 ? 2000 : 1900\n\n let hour = 0\n if (date[commaIndex + 12] === '0') {\n const code = date.charCodeAt(commaIndex + 13)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n hour = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(commaIndex + 12)\n if (code1 < 48 || code1 > 50) {\n return undefined // Not a digit between 0 and 2\n }\n const code2 = date.charCodeAt(commaIndex + 13)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n if (code1 === 50 && code2 > 51) {\n return undefined // Hour cannot be greater than 23\n }\n hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let minute = 0\n if (date[commaIndex + 15] === '0') {\n const code = date.charCodeAt(commaIndex + 16)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n minute = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(commaIndex + 15)\n if (code1 < 48 || code1 > 53) {\n return undefined // Not a digit between 0 and 5\n }\n const code2 = date.charCodeAt(commaIndex + 16)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n let second = 0\n if (date[commaIndex + 18] === '0') {\n const code = date.charCodeAt(commaIndex + 19)\n if (code < 48 || code > 57) {\n return undefined // Not a digit\n }\n second = code - 48 // Convert ASCII code to number\n } else {\n const code1 = date.charCodeAt(commaIndex + 18)\n if (code1 < 48 || code1 > 53) {\n return undefined // Not a digit between 0 and 5\n }\n const code2 = date.charCodeAt(commaIndex + 19)\n if (code2 < 48 || code2 > 57) {\n return undefined // Not a digit\n }\n second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number\n }\n\n const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))\n return result.getUTCDay() === weekday ? result : undefined\n}\n\nmodule.exports = {\n parseHttpDate\n}\n", "'use strict'\n\nconst util = require('../core/util')\nconst {\n parseCacheControlHeader,\n parseVaryHeader,\n isEtagUsable\n} = require('../util/cache')\nconst { parseHttpDate } = require('../util/date.js')\n\nfunction noop () {}\n\n// Status codes that we can use some heuristics on to cache\nconst HEURISTICALLY_CACHEABLE_STATUS_CODES = [\n 200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414, 501\n]\n\n// Status codes which semantic is not handled by the cache\n// https://datatracker.ietf.org/doc/html/rfc9111#section-3\n// This list should not grow beyond 206 unless the RFC is updated\n// by a newer one including more. Please introduce another list if\n// implementing caching of responses with the 'must-understand' directive.\nconst NOT_UNDERSTOOD_STATUS_CODES = [\n 206\n]\n\nconst MAX_RESPONSE_AGE = 2147483647000\n\n/**\n * @typedef {import('../../types/dispatcher.d.ts').default.DispatchHandler} DispatchHandler\n *\n * @implements {DispatchHandler}\n */\nclass CacheHandler {\n /**\n * @type {import('../../types/cache-interceptor.d.ts').default.CacheKey}\n */\n #cacheKey\n\n /**\n * @type {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions['type']}\n */\n #cacheType\n\n /**\n * @type {number | undefined}\n */\n #cacheByDefault\n\n /**\n * @type {import('../../types/cache-interceptor.d.ts').default.CacheStore}\n */\n #store\n\n /**\n * @type {import('../../types/dispatcher.d.ts').default.DispatchHandler}\n */\n #handler\n\n /**\n * @type {import('node:stream').Writable | undefined}\n */\n #writeStream\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} opts\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey\n * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler\n */\n constructor ({ store, type, cacheByDefault }, cacheKey, handler) {\n this.#store = store\n this.#cacheType = type\n this.#cacheByDefault = cacheByDefault\n this.#cacheKey = cacheKey\n this.#handler = handler\n }\n\n onRequestStart (controller, context) {\n this.#writeStream?.destroy()\n this.#writeStream = undefined\n this.#handler.onRequestStart?.(controller, context)\n }\n\n onRequestUpgrade (controller, statusCode, headers, socket) {\n this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket)\n }\n\n /**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller\n * @param {number} statusCode\n * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders\n * @param {string} statusMessage\n */\n onResponseStart (\n controller,\n statusCode,\n resHeaders,\n statusMessage\n ) {\n const downstreamOnHeaders = () =>\n this.#handler.onResponseStart?.(\n controller,\n statusCode,\n resHeaders,\n statusMessage\n )\n const handler = this\n\n if (\n !util.safeHTTPMethods.includes(this.#cacheKey.method) &&\n statusCode >= 200 &&\n statusCode <= 399\n ) {\n // Successful response to an unsafe method, delete it from cache\n // https://www.rfc-editor.org/rfc/rfc9111.html#name-invalidating-stored-response\n try {\n this.#store.delete(this.#cacheKey)?.catch?.(noop)\n } catch {\n // Fail silently\n }\n return downstreamOnHeaders()\n }\n\n const cacheControlHeader = resHeaders['cache-control']\n const heuristicallyCacheable = resHeaders['last-modified'] && HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode)\n if (\n !cacheControlHeader &&\n !resHeaders['expires'] &&\n !heuristicallyCacheable &&\n !this.#cacheByDefault\n ) {\n // Don't have anything to tell us this response is cachable and we're not\n // caching by default\n return downstreamOnHeaders()\n }\n\n const cacheControlDirectives = cacheControlHeader ? parseCacheControlHeader(cacheControlHeader) : {}\n if (!canCacheResponse(this.#cacheType, statusCode, resHeaders, cacheControlDirectives, this.#cacheKey.headers)) {\n return downstreamOnHeaders()\n }\n\n const now = Date.now()\n const resAge = resHeaders.age ? getAge(resHeaders.age) : undefined\n if (resAge && resAge >= MAX_RESPONSE_AGE) {\n // Response considered stale\n return downstreamOnHeaders()\n }\n\n const resDate = typeof resHeaders.date === 'string'\n ? parseHttpDate(resHeaders.date)\n : undefined\n\n const staleAt =\n determineStaleAt(this.#cacheType, now, resAge, resHeaders, resDate, cacheControlDirectives) ??\n this.#cacheByDefault\n if (staleAt === undefined || (resAge && resAge > staleAt)) {\n return downstreamOnHeaders()\n }\n\n const baseTime = resDate ? resDate.getTime() : now\n const absoluteStaleAt = staleAt + baseTime\n if (now >= absoluteStaleAt) {\n // Response is already stale\n return downstreamOnHeaders()\n }\n\n let varyDirectives\n if (this.#cacheKey.headers && resHeaders.vary) {\n varyDirectives = parseVaryHeader(resHeaders.vary, this.#cacheKey.headers)\n if (!varyDirectives) {\n // Parse error\n return downstreamOnHeaders()\n }\n }\n\n const deleteAt = determineDeleteAt(baseTime, cacheControlDirectives, absoluteStaleAt)\n const strippedHeaders = stripNecessaryHeaders(resHeaders, cacheControlDirectives)\n\n /**\n * @type {import('../../types/cache-interceptor.d.ts').default.CacheValue}\n */\n const value = {\n statusCode,\n statusMessage,\n headers: strippedHeaders,\n vary: varyDirectives,\n cacheControlDirectives,\n cachedAt: resAge ? now - resAge : now,\n staleAt: absoluteStaleAt,\n deleteAt\n }\n\n // Not modified, re-use the cached value\n // https://www.rfc-editor.org/rfc/rfc9111.html#name-handling-304-not-modified\n if (statusCode === 304) {\n const handle304 = (cachedValue) => {\n if (!cachedValue) {\n // Do not create a new cache entry, as a 304 won't have a body - so cannot be cached.\n return downstreamOnHeaders()\n }\n\n // Re-use the cached value: statuscode, statusmessage, headers and body\n value.statusCode = cachedValue.statusCode\n value.statusMessage = cachedValue.statusMessage\n value.etag = cachedValue.etag\n value.headers = { ...cachedValue.headers, ...strippedHeaders }\n\n downstreamOnHeaders()\n\n this.#writeStream = this.#store.createWriteStream(this.#cacheKey, value)\n\n if (!this.#writeStream || !cachedValue?.body) {\n return\n }\n\n if (typeof cachedValue.body.values === 'function') {\n const bodyIterator = cachedValue.body.values()\n\n const streamCachedBody = () => {\n for (const chunk of bodyIterator) {\n const full = this.#writeStream.write(chunk) === false\n this.#handler.onResponseData?.(controller, chunk)\n // when stream is full stop writing until we get a 'drain' event\n if (full) {\n break\n }\n }\n }\n\n this.#writeStream\n .on('error', function () {\n handler.#writeStream = undefined\n handler.#store.delete(handler.#cacheKey)\n })\n .on('drain', () => {\n streamCachedBody()\n })\n .on('close', function () {\n if (handler.#writeStream === this) {\n handler.#writeStream = undefined\n }\n })\n\n streamCachedBody()\n } else if (typeof cachedValue.body.on === 'function') {\n // Readable stream body (e.g. from async/remote cache stores)\n cachedValue.body\n .on('data', (chunk) => {\n this.#writeStream.write(chunk)\n this.#handler.onResponseData?.(controller, chunk)\n })\n .on('end', () => {\n this.#writeStream.end()\n })\n .on('error', () => {\n this.#writeStream = undefined\n this.#store.delete(this.#cacheKey)\n })\n\n this.#writeStream\n .on('error', function () {\n handler.#writeStream = undefined\n handler.#store.delete(handler.#cacheKey)\n })\n .on('close', function () {\n if (handler.#writeStream === this) {\n handler.#writeStream = undefined\n }\n })\n }\n }\n\n /**\n * @type {import('../../types/cache-interceptor.d.ts').default.CacheValue}\n */\n const result = this.#store.get(this.#cacheKey)\n if (result && typeof result.then === 'function') {\n result.then(handle304)\n } else {\n handle304(result)\n }\n } else {\n if (typeof resHeaders.etag === 'string' && isEtagUsable(resHeaders.etag)) {\n value.etag = resHeaders.etag\n }\n\n this.#writeStream = this.#store.createWriteStream(this.#cacheKey, value)\n\n if (!this.#writeStream) {\n return downstreamOnHeaders()\n }\n\n this.#writeStream\n .on('drain', () => controller.resume())\n .on('error', function () {\n // TODO (fix): Make error somehow observable?\n handler.#writeStream = undefined\n\n // Delete the value in case the cache store is holding onto state from\n // the call to createWriteStream\n handler.#store.delete(handler.#cacheKey)\n })\n .on('close', function () {\n if (handler.#writeStream === this) {\n handler.#writeStream = undefined\n }\n\n // TODO (fix): Should we resume even if was paused downstream?\n controller.resume()\n })\n\n downstreamOnHeaders()\n }\n }\n\n onResponseData (controller, chunk) {\n if (this.#writeStream?.write(chunk) === false) {\n controller.pause()\n }\n\n this.#handler.onResponseData?.(controller, chunk)\n }\n\n onResponseEnd (controller, trailers) {\n this.#writeStream?.end()\n this.#handler.onResponseEnd?.(controller, trailers)\n }\n\n onResponseError (controller, err) {\n this.#writeStream?.destroy(err)\n this.#writeStream = undefined\n this.#handler.onResponseError?.(controller, err)\n }\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-storing-responses-to-authen\n *\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions['type']} cacheType\n * @param {number} statusCode\n * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives\n * @param {import('../../types/header.d.ts').IncomingHttpHeaders} [reqHeaders]\n */\nfunction canCacheResponse (cacheType, statusCode, resHeaders, cacheControlDirectives, reqHeaders) {\n // Status code must be final and understood.\n if (statusCode < 200 || NOT_UNDERSTOOD_STATUS_CODES.includes(statusCode)) {\n return false\n }\n // Responses with neither status codes that are heuristically cacheable, nor \"explicit enough\" caching\n // directives, are not cacheable. \"Explicit enough\": see https://www.rfc-editor.org/rfc/rfc9111.html#section-3\n if (!HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode) && !resHeaders['expires'] &&\n !cacheControlDirectives.public &&\n cacheControlDirectives['max-age'] === undefined &&\n // RFC 9111: a private response directive, if the cache is not shared\n !(cacheControlDirectives.private && cacheType === 'private') &&\n !(cacheControlDirectives['s-maxage'] !== undefined && cacheType === 'shared')\n ) {\n return false\n }\n\n if (cacheControlDirectives['no-store']) {\n return false\n }\n\n if (cacheType === 'shared' && cacheControlDirectives.private === true) {\n return false\n }\n\n // https://www.rfc-editor.org/rfc/rfc9111.html#section-4.1-5\n if (resHeaders.vary?.includes('*')) {\n return false\n }\n\n // https://www.rfc-editor.org/rfc/rfc9111.html#name-storing-responses-to-authen\n if (reqHeaders?.authorization) {\n if (\n !cacheControlDirectives.public &&\n !cacheControlDirectives['s-maxage'] &&\n !cacheControlDirectives['must-revalidate']\n ) {\n return false\n }\n\n if (typeof reqHeaders.authorization !== 'string') {\n return false\n }\n\n if (\n Array.isArray(cacheControlDirectives['no-cache']) &&\n cacheControlDirectives['no-cache'].includes('authorization')\n ) {\n return false\n }\n\n if (\n Array.isArray(cacheControlDirectives['private']) &&\n cacheControlDirectives['private'].includes('authorization')\n ) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * @param {string | string[]} ageHeader\n * @returns {number | undefined}\n */\nfunction getAge (ageHeader) {\n const age = parseInt(Array.isArray(ageHeader) ? ageHeader[0] : ageHeader)\n\n return isNaN(age) ? undefined : age * 1000\n}\n\n/**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions['type']} cacheType\n * @param {number} now\n * @param {number | undefined} age\n * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders\n * @param {Date | undefined} responseDate\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives\n *\n * @returns {number | undefined} time that the value is stale at in seconds or undefined if it shouldn't be cached\n */\nfunction determineStaleAt (cacheType, now, age, resHeaders, responseDate, cacheControlDirectives) {\n if (cacheType === 'shared') {\n // Prioritize s-maxage since we're a shared cache\n // s-maxage > max-age > Expire\n // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.2.10-3\n const sMaxAge = cacheControlDirectives['s-maxage']\n if (sMaxAge !== undefined) {\n return sMaxAge > 0 ? sMaxAge * 1000 : undefined\n }\n }\n\n const maxAge = cacheControlDirectives['max-age']\n if (maxAge !== undefined) {\n return maxAge > 0 ? maxAge * 1000 : undefined\n }\n\n if (typeof resHeaders.expires === 'string') {\n // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.3\n const expiresDate = parseHttpDate(resHeaders.expires)\n if (expiresDate) {\n if (now >= expiresDate.getTime()) {\n return undefined\n }\n\n if (responseDate) {\n if (responseDate >= expiresDate) {\n return undefined\n }\n\n if (age !== undefined && age > (expiresDate - responseDate)) {\n return undefined\n }\n }\n\n return expiresDate.getTime() - now\n }\n }\n\n if (typeof resHeaders['last-modified'] === 'string') {\n // https://www.rfc-editor.org/rfc/rfc9111.html#name-calculating-heuristic-fresh\n const lastModified = new Date(resHeaders['last-modified'])\n if (isValidDate(lastModified)) {\n if (lastModified.getTime() >= now) {\n return undefined\n }\n\n const responseAge = now - lastModified.getTime()\n\n return responseAge * 0.1\n }\n }\n\n if (cacheControlDirectives.immutable) {\n // https://www.rfc-editor.org/rfc/rfc8246.html#section-2.2\n return 31536000\n }\n\n return undefined\n}\n\n/**\n * @param {number} now\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives\n * @param {number} staleAt\n */\nfunction determineDeleteAt (now, cacheControlDirectives, staleAt) {\n let staleWhileRevalidate = -Infinity\n let staleIfError = -Infinity\n let immutable = -Infinity\n\n if (cacheControlDirectives['stale-while-revalidate']) {\n staleWhileRevalidate = staleAt + (cacheControlDirectives['stale-while-revalidate'] * 1000)\n }\n\n if (cacheControlDirectives['stale-if-error']) {\n staleIfError = staleAt + (cacheControlDirectives['stale-if-error'] * 1000)\n }\n\n if (cacheControlDirectives.immutable && staleWhileRevalidate === -Infinity && staleIfError === -Infinity) {\n immutable = now + 31536000000\n }\n\n // When no stale directives or immutable flag, add a revalidation buffer\n // equal to the freshness lifetime so the entry survives past staleAt long\n // enough to be revalidated instead of silently disappearing.\n if (staleWhileRevalidate === -Infinity && staleIfError === -Infinity && immutable === -Infinity) {\n const freshnessLifetime = staleAt - now\n return staleAt + freshnessLifetime\n }\n\n return Math.max(staleAt, staleWhileRevalidate, staleIfError, immutable)\n}\n\n/**\n * Strips headers required to be removed in cached responses\n * @param {import('../../types/header.d.ts').IncomingHttpHeaders} resHeaders\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives\n * @returns {Record}\n */\nfunction stripNecessaryHeaders (resHeaders, cacheControlDirectives) {\n const headersToRemove = [\n 'connection',\n 'proxy-authenticate',\n 'proxy-authentication-info',\n 'proxy-authorization',\n 'proxy-connection',\n 'te',\n 'transfer-encoding',\n 'upgrade',\n // We'll add age back when serving it\n 'age'\n ]\n\n if (resHeaders['connection']) {\n if (Array.isArray(resHeaders['connection'])) {\n // connection: a\n // connection: b\n headersToRemove.push(...resHeaders['connection'].map(header => header.trim()))\n } else {\n // connection: a, b\n headersToRemove.push(...resHeaders['connection'].split(',').map(header => header.trim()))\n }\n }\n\n if (Array.isArray(cacheControlDirectives['no-cache'])) {\n headersToRemove.push(...cacheControlDirectives['no-cache'])\n }\n\n if (Array.isArray(cacheControlDirectives['private'])) {\n headersToRemove.push(...cacheControlDirectives['private'])\n }\n\n let strippedHeaders\n for (const headerName of headersToRemove) {\n if (resHeaders[headerName]) {\n strippedHeaders ??= { ...resHeaders }\n delete strippedHeaders[headerName]\n }\n }\n\n return strippedHeaders ?? resHeaders\n}\n\n/**\n * @param {Date} date\n * @returns {boolean}\n */\nfunction isValidDate (date) {\n return date instanceof Date && Number.isFinite(date.valueOf())\n}\n\nmodule.exports = CacheHandler\n", "'use strict'\n\nconst { Writable } = require('node:stream')\nconst { EventEmitter } = require('node:events')\nconst { assertCacheKey, assertCacheValue } = require('../util/cache.js')\n\n/**\n * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheKey} CacheKey\n * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheValue} CacheValue\n * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheStore} CacheStore\n * @typedef {import('../../types/cache-interceptor.d.ts').default.GetResult} GetResult\n */\n\n/**\n * @implements {CacheStore}\n * @extends {EventEmitter}\n */\nclass MemoryCacheStore extends EventEmitter {\n #maxCount = 1024\n #maxSize = 104857600 // 100MB\n #maxEntrySize = 5242880 // 5MB\n\n #size = 0\n #count = 0\n #entries = new Map()\n #hasEmittedMaxSizeEvent = false\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.MemoryCacheStoreOpts | undefined} [opts]\n */\n constructor (opts) {\n super()\n if (opts) {\n if (typeof opts !== 'object') {\n throw new TypeError('MemoryCacheStore options must be an object')\n }\n\n if (opts.maxCount !== undefined) {\n if (\n typeof opts.maxCount !== 'number' ||\n !Number.isInteger(opts.maxCount) ||\n opts.maxCount < 0\n ) {\n throw new TypeError('MemoryCacheStore options.maxCount must be a non-negative integer')\n }\n this.#maxCount = opts.maxCount\n }\n\n if (opts.maxSize !== undefined) {\n if (\n typeof opts.maxSize !== 'number' ||\n !Number.isInteger(opts.maxSize) ||\n opts.maxSize < 0\n ) {\n throw new TypeError('MemoryCacheStore options.maxSize must be a non-negative integer')\n }\n this.#maxSize = opts.maxSize\n }\n\n if (opts.maxEntrySize !== undefined) {\n if (\n typeof opts.maxEntrySize !== 'number' ||\n !Number.isInteger(opts.maxEntrySize) ||\n opts.maxEntrySize < 0\n ) {\n throw new TypeError('MemoryCacheStore options.maxEntrySize must be a non-negative integer')\n }\n this.#maxEntrySize = opts.maxEntrySize\n }\n }\n }\n\n /**\n * Get the current size of the cache in bytes\n * @returns {number} The current size of the cache in bytes\n */\n get size () {\n return this.#size\n }\n\n /**\n * Check if the cache is full (either max size or max count reached)\n * @returns {boolean} True if the cache is full, false otherwise\n */\n isFull () {\n return this.#size >= this.#maxSize || this.#count >= this.#maxCount\n }\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} req\n * @returns {import('../../types/cache-interceptor.d.ts').default.GetResult | undefined}\n */\n get (key) {\n assertCacheKey(key)\n\n const topLevelKey = `${key.origin}:${key.path}`\n\n const now = Date.now()\n const entries = this.#entries.get(topLevelKey)\n\n const entry = entries ? findEntry(key, entries, now) : null\n\n return entry == null\n ? undefined\n : {\n statusMessage: entry.statusMessage,\n statusCode: entry.statusCode,\n headers: entry.headers,\n body: entry.body,\n vary: entry.vary ? entry.vary : undefined,\n etag: entry.etag,\n cacheControlDirectives: entry.cacheControlDirectives,\n cachedAt: entry.cachedAt,\n staleAt: entry.staleAt,\n deleteAt: entry.deleteAt\n }\n }\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue} val\n * @returns {Writable | undefined}\n */\n createWriteStream (key, val) {\n assertCacheKey(key)\n assertCacheValue(val)\n\n const topLevelKey = `${key.origin}:${key.path}`\n\n const store = this\n const entry = { ...key, ...val, body: [], size: 0 }\n\n return new Writable({\n write (chunk, encoding, callback) {\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding)\n }\n\n entry.size += chunk.byteLength\n\n if (entry.size >= store.#maxEntrySize) {\n this.destroy()\n } else {\n entry.body.push(chunk)\n }\n\n callback(null)\n },\n final (callback) {\n let entries = store.#entries.get(topLevelKey)\n if (!entries) {\n entries = []\n store.#entries.set(topLevelKey, entries)\n }\n const previousEntry = findEntry(key, entries, Date.now())\n if (previousEntry) {\n const index = entries.indexOf(previousEntry)\n entries.splice(index, 1, entry)\n store.#size -= previousEntry.size\n } else {\n entries.push(entry)\n store.#count += 1\n }\n\n store.#size += entry.size\n\n // Check if cache is full and emit event if needed\n if (store.#size > store.#maxSize || store.#count > store.#maxCount) {\n // Emit maxSizeExceeded event if we haven't already\n if (!store.#hasEmittedMaxSizeEvent) {\n store.emit('maxSizeExceeded', {\n size: store.#size,\n maxSize: store.#maxSize,\n count: store.#count,\n maxCount: store.#maxCount\n })\n store.#hasEmittedMaxSizeEvent = true\n }\n\n // Perform eviction\n for (const [key, entries] of store.#entries) {\n for (const entry of entries.splice(0, entries.length / 2)) {\n store.#size -= entry.size\n store.#count -= 1\n }\n if (entries.length === 0) {\n store.#entries.delete(key)\n }\n }\n\n // Reset the event flag after eviction\n if (store.#size < store.#maxSize && store.#count < store.#maxCount) {\n store.#hasEmittedMaxSizeEvent = false\n }\n }\n\n callback(null)\n }\n })\n }\n\n /**\n * @param {CacheKey} key\n */\n delete (key) {\n if (typeof key !== 'object') {\n throw new TypeError(`expected key to be object, got ${typeof key}`)\n }\n\n const topLevelKey = `${key.origin}:${key.path}`\n\n for (const entry of this.#entries.get(topLevelKey) ?? []) {\n this.#size -= entry.size\n this.#count -= 1\n }\n this.#entries.delete(topLevelKey)\n }\n}\n\nfunction findEntry (key, entries, now) {\n return entries.find((entry) => (\n entry.deleteAt > now &&\n entry.method === key.method &&\n (entry.vary == null || Object.keys(entry.vary).every(headerName => {\n if (entry.vary[headerName] === null) {\n return key.headers[headerName] === undefined\n }\n\n return entry.vary[headerName] === key.headers[headerName]\n }))\n ))\n}\n\nmodule.exports = MemoryCacheStore\n", "'use strict'\n\nconst assert = require('node:assert')\n\n/**\n * This takes care of revalidation requests we send to the origin. If we get\n * a response indicating that what we have is cached (via a HTTP 304), we can\n * continue using the cached value. Otherwise, we'll receive the new response\n * here, which we then just pass on to the next handler (most likely a\n * CacheHandler). Note that this assumes the proper headers were already\n * included in the request to tell the origin that we want to revalidate the\n * response (i.e. if-modified-since or if-none-match).\n *\n * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-validation\n *\n * @implements {import('../../types/dispatcher.d.ts').default.DispatchHandler}\n */\nclass CacheRevalidationHandler {\n #successful = false\n\n /**\n * @type {((boolean, any) => void) | null}\n */\n #callback\n\n /**\n * @type {(import('../../types/dispatcher.d.ts').default.DispatchHandler)}\n */\n #handler\n\n #context\n\n /**\n * @type {boolean}\n */\n #allowErrorStatusCodes\n\n /**\n * @param {(boolean) => void} callback Function to call if the cached value is valid\n * @param {import('../../types/dispatcher.d.ts').default.DispatchHandlers} handler\n * @param {boolean} allowErrorStatusCodes\n */\n constructor (callback, handler, allowErrorStatusCodes) {\n if (typeof callback !== 'function') {\n throw new TypeError('callback must be a function')\n }\n\n this.#callback = callback\n this.#handler = handler\n this.#allowErrorStatusCodes = allowErrorStatusCodes\n }\n\n onRequestStart (_, context) {\n this.#successful = false\n this.#context = context\n }\n\n onRequestUpgrade (controller, statusCode, headers, socket) {\n this.#handler.onRequestUpgrade?.(controller, statusCode, headers, socket)\n }\n\n onResponseStart (\n controller,\n statusCode,\n headers,\n statusMessage\n ) {\n assert(this.#callback != null)\n\n // https://www.rfc-editor.org/rfc/rfc9111.html#name-handling-a-validation-respo\n // https://datatracker.ietf.org/doc/html/rfc5861#section-4\n this.#successful = statusCode === 304 ||\n (this.#allowErrorStatusCodes && statusCode >= 500 && statusCode <= 504)\n this.#callback(this.#successful, this.#context)\n this.#callback = null\n\n if (this.#successful) {\n return true\n }\n\n this.#handler.onRequestStart?.(controller, this.#context)\n this.#handler.onResponseStart?.(\n controller,\n statusCode,\n headers,\n statusMessage\n )\n }\n\n onResponseData (controller, chunk) {\n if (this.#successful) {\n return\n }\n\n return this.#handler.onResponseData?.(controller, chunk)\n }\n\n onResponseEnd (controller, trailers) {\n if (this.#successful) {\n return\n }\n\n this.#handler.onResponseEnd?.(controller, trailers)\n }\n\n onResponseError (controller, err) {\n if (this.#successful) {\n return\n }\n\n if (this.#callback) {\n this.#callback(false)\n this.#callback = null\n }\n\n if (typeof this.#handler.onResponseError === 'function') {\n this.#handler.onResponseError(controller, err)\n } else {\n throw err\n }\n }\n}\n\nmodule.exports = CacheRevalidationHandler\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { Readable } = require('node:stream')\nconst util = require('../core/util')\nconst CacheHandler = require('../handler/cache-handler')\nconst MemoryCacheStore = require('../cache/memory-cache-store')\nconst CacheRevalidationHandler = require('../handler/cache-revalidation-handler')\nconst { assertCacheStore, assertCacheMethods, makeCacheKey, normalizeHeaders, parseCacheControlHeader } = require('../util/cache.js')\nconst { AbortError } = require('../core/errors.js')\n\n/**\n * @param {(string | RegExp)[] | undefined} origins\n * @param {string} name\n */\nfunction assertCacheOrigins (origins, name) {\n if (origins === undefined) return\n if (!Array.isArray(origins)) {\n throw new TypeError(`expected ${name} to be an array or undefined, got ${typeof origins}`)\n }\n for (let i = 0; i < origins.length; i++) {\n const origin = origins[i]\n if (typeof origin !== 'string' && !(origin instanceof RegExp)) {\n throw new TypeError(`expected ${name}[${i}] to be a string or RegExp, got ${typeof origin}`)\n }\n }\n}\n\nconst nop = () => {}\n\n/**\n * @typedef {(options: import('../../types/dispatcher.d.ts').default.DispatchOptions, handler: import('../../types/dispatcher.d.ts').default.DispatchHandler) => void} DispatchFn\n */\n\n/**\n * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} cacheControlDirectives\n * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts\n * @returns {boolean}\n */\nfunction needsRevalidation (result, cacheControlDirectives, { headers = {} }) {\n // Always revalidate requests with the no-cache request directive.\n if (cacheControlDirectives?.['no-cache']) {\n return true\n }\n\n // Always revalidate requests with unqualified no-cache response directive.\n if (result.cacheControlDirectives?.['no-cache'] && !Array.isArray(result.cacheControlDirectives['no-cache'])) {\n return true\n }\n\n // Always revalidate requests with conditional headers.\n if (headers['if-modified-since'] || headers['if-none-match']) {\n return true\n }\n\n return false\n}\n\n/**\n * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} cacheControlDirectives\n * @returns {boolean}\n */\nfunction isStale (result, cacheControlDirectives) {\n const now = Date.now()\n if (now > result.staleAt) {\n // Response is stale\n if (cacheControlDirectives?.['max-stale']) {\n // There's a threshold where we can serve stale responses, let's see if\n // we're in it\n // https://www.rfc-editor.org/rfc/rfc9111.html#name-max-stale\n const gracePeriod = result.staleAt + (cacheControlDirectives['max-stale'] * 1000)\n return now > gracePeriod\n }\n\n return true\n }\n\n if (cacheControlDirectives?.['min-fresh']) {\n // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.1.3\n\n // At this point, staleAt is always > now\n const timeLeftTillStale = result.staleAt - now\n const threshold = cacheControlDirectives['min-fresh'] * 1000\n\n return timeLeftTillStale <= threshold\n }\n\n return false\n}\n\n/**\n * Check if we're within the stale-while-revalidate window for a stale response\n * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result\n * @returns {boolean}\n */\nfunction withinStaleWhileRevalidateWindow (result) {\n const staleWhileRevalidate = result.cacheControlDirectives?.['stale-while-revalidate']\n if (!staleWhileRevalidate) {\n return false\n }\n\n const now = Date.now()\n const staleWhileRevalidateExpiry = result.staleAt + (staleWhileRevalidate * 1000)\n return now <= staleWhileRevalidateExpiry\n}\n\n/**\n * @param {DispatchFn} dispatch\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} globalOpts\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey\n * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler\n * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} reqCacheControl\n */\nfunction handleUncachedResponse (\n dispatch,\n globalOpts,\n cacheKey,\n handler,\n opts,\n reqCacheControl\n) {\n if (reqCacheControl?.['only-if-cached']) {\n let aborted = false\n try {\n if (typeof handler.onConnect === 'function') {\n handler.onConnect(() => {\n aborted = true\n })\n\n if (aborted) {\n return\n }\n }\n\n if (typeof handler.onHeaders === 'function') {\n handler.onHeaders(504, [], nop, 'Gateway Timeout')\n if (aborted) {\n return\n }\n }\n\n if (typeof handler.onComplete === 'function') {\n handler.onComplete([])\n }\n } catch (err) {\n if (typeof handler.onError === 'function') {\n handler.onError(err)\n }\n }\n\n return true\n }\n\n return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler))\n}\n\n/**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler\n * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts\n * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result\n * @param {number} age\n * @param {any} context\n * @param {boolean} isStale\n */\nfunction sendCachedValue (handler, opts, result, age, context, isStale) {\n // TODO (perf): Readable.from path can be optimized...\n const stream = util.isStream(result.body)\n ? result.body\n : Readable.from(result.body ?? [])\n\n assert(!stream.destroyed, 'stream should not be destroyed')\n assert(!stream.readableDidRead, 'stream should not be readableDidRead')\n\n const controller = {\n resume () {\n stream.resume()\n },\n pause () {\n stream.pause()\n },\n get paused () {\n return stream.isPaused()\n },\n get aborted () {\n return stream.destroyed\n },\n get reason () {\n return stream.errored\n },\n abort (reason) {\n stream.destroy(reason ?? new AbortError())\n }\n }\n\n stream\n .on('error', function (err) {\n if (!this.readableEnded) {\n if (typeof handler.onResponseError === 'function') {\n handler.onResponseError(controller, err)\n } else {\n throw err\n }\n }\n })\n .on('close', function () {\n if (!this.errored) {\n handler.onResponseEnd?.(controller, {})\n }\n })\n\n handler.onRequestStart?.(controller, context)\n\n if (stream.destroyed) {\n return\n }\n\n // Add the age header\n // https://www.rfc-editor.org/rfc/rfc9111.html#name-age\n const headers = { ...result.headers, age: String(age) }\n\n if (isStale) {\n // Add warning header\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Warning\n headers.warning = '110 - \"response is stale\"'\n }\n\n handler.onResponseStart?.(controller, result.statusCode, headers, result.statusMessage)\n\n if (opts.method === 'HEAD') {\n stream.destroy()\n } else {\n stream.on('data', function (chunk) {\n handler.onResponseData?.(controller, chunk)\n })\n }\n}\n\n/**\n * @param {DispatchFn} dispatch\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} globalOpts\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey\n * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler\n * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} reqCacheControl\n * @param {import('../../types/cache-interceptor.d.ts').default.GetResult | undefined} result\n */\nfunction handleResult (\n dispatch,\n globalOpts,\n cacheKey,\n handler,\n opts,\n reqCacheControl,\n result\n) {\n if (!result) {\n return handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl)\n }\n\n const now = Date.now()\n if (now > result.deleteAt) {\n // Response is expired, cache store shouldn't have given this to us\n return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler))\n }\n\n const age = Math.round((now - result.cachedAt) / 1000)\n if (reqCacheControl?.['max-age'] && age >= reqCacheControl['max-age']) {\n // Response is considered expired for this specific request\n // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.1.1\n return dispatch(opts, handler)\n }\n\n const stale = isStale(result, reqCacheControl)\n const revalidate = needsRevalidation(result, reqCacheControl, opts)\n\n // Check if the response is stale\n if (stale || revalidate) {\n if (util.isStream(opts.body) && util.bodyLength(opts.body) !== 0) {\n // If body is a stream we can't revalidate...\n // TODO (fix): This could be less strict...\n return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler))\n }\n\n // RFC 5861: If we're within stale-while-revalidate window, serve stale immediately\n // and revalidate in background, unless immediate revalidation is necessary\n if (!revalidate && withinStaleWhileRevalidateWindow(result)) {\n // Serve stale response immediately\n sendCachedValue(handler, opts, result, age, null, true)\n\n // Start background revalidation (fire-and-forget)\n queueMicrotask(() => {\n const headers = {\n ...opts.headers,\n 'if-modified-since': new Date(result.cachedAt).toUTCString()\n }\n\n if (result.etag) {\n headers['if-none-match'] = result.etag\n }\n\n if (result.vary) {\n for (const key in result.vary) {\n if (result.vary[key] != null) {\n headers[key] = result.vary[key]\n }\n }\n }\n\n // Background revalidation - update cache if we get new data\n dispatch(\n {\n ...opts,\n headers\n },\n new CacheHandler(globalOpts, cacheKey, {\n // Silent handler that just updates the cache\n onRequestStart () {},\n onRequestUpgrade () {},\n onResponseStart () {},\n onResponseData () {},\n onResponseEnd () {},\n onResponseError () {}\n })\n )\n })\n\n return true\n }\n\n let withinStaleIfErrorThreshold = false\n const staleIfErrorExpiry = result.cacheControlDirectives['stale-if-error'] ?? reqCacheControl?.['stale-if-error']\n if (staleIfErrorExpiry) {\n withinStaleIfErrorThreshold = now < (result.staleAt + (staleIfErrorExpiry * 1000))\n }\n\n const headers = {\n ...opts.headers,\n 'if-modified-since': new Date(result.cachedAt).toUTCString()\n }\n\n if (result.etag) {\n headers['if-none-match'] = result.etag\n }\n\n if (result.vary) {\n for (const key in result.vary) {\n if (result.vary[key] != null) {\n headers[key] = result.vary[key]\n }\n }\n }\n\n // We need to revalidate the response\n return dispatch(\n {\n ...opts,\n headers\n },\n new CacheRevalidationHandler(\n (success, context) => {\n if (success) {\n // TODO: successful revalidation should be considered fresh (not give stale warning).\n sendCachedValue(handler, opts, result, age, context, stale)\n } else if (util.isStream(result.body)) {\n result.body.on('error', nop).destroy()\n }\n },\n new CacheHandler(globalOpts, cacheKey, handler),\n withinStaleIfErrorThreshold\n )\n )\n }\n\n // Dump request body.\n if (util.isStream(opts.body)) {\n opts.body.on('error', nop).destroy()\n }\n\n sendCachedValue(handler, opts, result, age, null, false)\n}\n\n/**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions} [opts]\n * @returns {import('../../types/dispatcher.d.ts').default.DispatcherComposeInterceptor}\n */\nmodule.exports = (opts = {}) => {\n const {\n store = new MemoryCacheStore(),\n methods = ['GET'],\n cacheByDefault = undefined,\n type = 'shared',\n origins = undefined\n } = opts\n\n if (typeof opts !== 'object' || opts === null) {\n throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? 'null' : typeof opts}`)\n }\n\n assertCacheStore(store, 'opts.store')\n assertCacheMethods(methods, 'opts.methods')\n assertCacheOrigins(origins, 'opts.origins')\n\n if (typeof cacheByDefault !== 'undefined' && typeof cacheByDefault !== 'number') {\n throw new TypeError(`expected opts.cacheByDefault to be number or undefined, got ${typeof cacheByDefault}`)\n }\n\n if (typeof type !== 'undefined' && type !== 'shared' && type !== 'private') {\n throw new TypeError(`expected opts.type to be shared, private, or undefined, got ${typeof type}`)\n }\n\n const globalOpts = {\n store,\n methods,\n cacheByDefault,\n type\n }\n\n const safeMethodsToNotCache = util.safeHTTPMethods.filter(method => methods.includes(method) === false)\n\n return dispatch => {\n return (opts, handler) => {\n if (!opts.origin || safeMethodsToNotCache.includes(opts.method)) {\n // Not a method we want to cache or we don't have the origin, skip\n return dispatch(opts, handler)\n }\n\n // Check if origin is in whitelist\n if (origins !== undefined) {\n const requestOrigin = opts.origin.toString().toLowerCase()\n let isAllowed = false\n\n for (let i = 0; i < origins.length; i++) {\n const allowed = origins[i]\n if (typeof allowed === 'string') {\n if (allowed.toLowerCase() === requestOrigin) {\n isAllowed = true\n break\n }\n } else if (allowed.test(requestOrigin)) {\n isAllowed = true\n break\n }\n }\n\n if (!isAllowed) {\n return dispatch(opts, handler)\n }\n }\n\n opts = {\n ...opts,\n headers: normalizeHeaders(opts)\n }\n\n const reqCacheControl = opts.headers?.['cache-control']\n ? parseCacheControlHeader(opts.headers['cache-control'])\n : undefined\n\n if (reqCacheControl?.['no-store']) {\n return dispatch(opts, handler)\n }\n\n /**\n * @type {import('../../types/cache-interceptor.d.ts').default.CacheKey}\n */\n const cacheKey = makeCacheKey(opts)\n const result = store.get(cacheKey)\n\n if (result && typeof result.then === 'function') {\n return result\n .then(result => handleResult(dispatch,\n globalOpts,\n cacheKey,\n handler,\n opts,\n reqCacheControl,\n result\n ))\n } else {\n return handleResult(\n dispatch,\n globalOpts,\n cacheKey,\n handler,\n opts,\n reqCacheControl,\n result\n )\n }\n }\n }\n}\n", "'use strict'\n\nconst { createInflate, createGunzip, createBrotliDecompress, createZstdDecompress } = require('node:zlib')\nconst { pipeline } = require('node:stream')\nconst DecoratorHandler = require('../handler/decorator-handler')\nconst { runtimeFeatures } = require('../util/runtime-features')\n\n/** @typedef {import('node:stream').Transform} Transform */\n/** @typedef {import('node:stream').Transform} Controller */\n/** @typedef {Transform&import('node:zlib').Zlib} DecompressorStream */\n\n/** @type {Record DecompressorStream>} */\nconst supportedEncodings = {\n gzip: createGunzip,\n 'x-gzip': createGunzip,\n br: createBrotliDecompress,\n deflate: createInflate,\n compress: createInflate,\n 'x-compress': createInflate,\n ...(runtimeFeatures.has('zstd') ? { zstd: createZstdDecompress } : {})\n}\n\nconst defaultSkipStatusCodes = /** @type {const} */ ([204, 304])\n\nlet warningEmitted = /** @type {boolean} */ (false)\n\n/**\n * @typedef {Object} DecompressHandlerOptions\n * @property {number[]|Readonly} [skipStatusCodes=[204, 304]] - List of status codes to skip decompression for\n * @property {boolean} [skipErrorResponses] - Whether to skip decompression for error responses (status codes >= 400)\n */\n\nclass DecompressHandler extends DecoratorHandler {\n /** @type {Transform[]} */\n #decompressors = []\n /** @type {Readonly} */\n #skipStatusCodes\n /** @type {boolean} */\n #skipErrorResponses\n\n constructor (handler, { skipStatusCodes = defaultSkipStatusCodes, skipErrorResponses = true } = {}) {\n super(handler)\n this.#skipStatusCodes = skipStatusCodes\n this.#skipErrorResponses = skipErrorResponses\n }\n\n /**\n * Determines if decompression should be skipped based on encoding and status code\n * @param {string} contentEncoding - Content-Encoding header value\n * @param {number} statusCode - HTTP status code of the response\n * @returns {boolean} - True if decompression should be skipped\n */\n #shouldSkipDecompression (contentEncoding, statusCode) {\n if (!contentEncoding || statusCode < 200) return true\n if (this.#skipStatusCodes.includes(statusCode)) return true\n if (this.#skipErrorResponses && statusCode >= 400) return true\n return false\n }\n\n /**\n * Creates a chain of decompressors for multiple content encodings\n *\n * @param {string} encodings - Comma-separated list of content encodings\n * @returns {Array} - Array of decompressor streams\n * @throws {Error} - If the number of content-encodings exceeds the maximum allowed\n */\n #createDecompressionChain (encodings) {\n const parts = encodings.split(',')\n\n // Limit the number of content-encodings to prevent resource exhaustion.\n // CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206).\n const maxContentEncodings = 5\n if (parts.length > maxContentEncodings) {\n throw new Error(`too many content-encodings in response: ${parts.length}, maximum allowed is ${maxContentEncodings}`)\n }\n\n /** @type {DecompressorStream[]} */\n const decompressors = []\n\n for (let i = parts.length - 1; i >= 0; i--) {\n const encoding = parts[i].trim()\n if (!encoding) continue\n\n if (!supportedEncodings[encoding]) {\n decompressors.length = 0 // Clear if unsupported encoding\n return decompressors // Unsupported encoding\n }\n\n decompressors.push(supportedEncodings[encoding]())\n }\n\n return decompressors\n }\n\n /**\n * Sets up event handlers for a decompressor stream using readable events\n * @param {DecompressorStream} decompressor - The decompressor stream\n * @param {Controller} controller - The controller to coordinate with\n * @returns {void}\n */\n #setupDecompressorEvents (decompressor, controller) {\n decompressor.on('readable', () => {\n let chunk\n while ((chunk = decompressor.read()) !== null) {\n const result = super.onResponseData(controller, chunk)\n if (result === false) {\n break\n }\n }\n })\n\n decompressor.on('error', (error) => {\n super.onResponseError(controller, error)\n })\n }\n\n /**\n * Sets up event handling for a single decompressor\n * @param {Controller} controller - The controller to handle events\n * @returns {void}\n */\n #setupSingleDecompressor (controller) {\n const decompressor = this.#decompressors[0]\n this.#setupDecompressorEvents(decompressor, controller)\n\n decompressor.on('end', () => {\n super.onResponseEnd(controller, {})\n })\n }\n\n /**\n * Sets up event handling for multiple chained decompressors using pipeline\n * @param {Controller} controller - The controller to handle events\n * @returns {void}\n */\n #setupMultipleDecompressors (controller) {\n const lastDecompressor = this.#decompressors[this.#decompressors.length - 1]\n this.#setupDecompressorEvents(lastDecompressor, controller)\n\n pipeline(this.#decompressors, (err) => {\n if (err) {\n super.onResponseError(controller, err)\n return\n }\n super.onResponseEnd(controller, {})\n })\n }\n\n /**\n * Cleans up decompressor references to prevent memory leaks\n * @returns {void}\n */\n #cleanupDecompressors () {\n this.#decompressors.length = 0\n }\n\n /**\n * @param {Controller} controller\n * @param {number} statusCode\n * @param {Record} headers\n * @param {string} statusMessage\n * @returns {void}\n */\n onResponseStart (controller, statusCode, headers, statusMessage) {\n const contentEncoding = headers['content-encoding']\n\n // If content encoding is not supported or status code is in skip list\n if (this.#shouldSkipDecompression(contentEncoding, statusCode)) {\n return super.onResponseStart(controller, statusCode, headers, statusMessage)\n }\n\n const decompressors = this.#createDecompressionChain(contentEncoding.toLowerCase())\n\n if (decompressors.length === 0) {\n this.#cleanupDecompressors()\n return super.onResponseStart(controller, statusCode, headers, statusMessage)\n }\n\n this.#decompressors = decompressors\n\n // Remove compression headers since we're decompressing\n const { 'content-encoding': _, 'content-length': __, ...newHeaders } = headers\n\n if (this.#decompressors.length === 1) {\n this.#setupSingleDecompressor(controller)\n } else {\n this.#setupMultipleDecompressors(controller)\n }\n\n return super.onResponseStart(controller, statusCode, newHeaders, statusMessage)\n }\n\n /**\n * @param {Controller} controller\n * @param {Buffer} chunk\n * @returns {void}\n */\n onResponseData (controller, chunk) {\n if (this.#decompressors.length > 0) {\n this.#decompressors[0].write(chunk)\n return\n }\n super.onResponseData(controller, chunk)\n }\n\n /**\n * @param {Controller} controller\n * @param {Record | undefined} trailers\n * @returns {void}\n */\n onResponseEnd (controller, trailers) {\n if (this.#decompressors.length > 0) {\n this.#decompressors[0].end()\n this.#cleanupDecompressors()\n return\n }\n super.onResponseEnd(controller, trailers)\n }\n\n /**\n * @param {Controller} controller\n * @param {Error} err\n * @returns {void}\n */\n onResponseError (controller, err) {\n if (this.#decompressors.length > 0) {\n for (const decompressor of this.#decompressors) {\n decompressor.destroy(err)\n }\n this.#cleanupDecompressors()\n }\n super.onResponseError(controller, err)\n }\n}\n\n/**\n * Creates a decompression interceptor for HTTP responses\n * @param {DecompressHandlerOptions} [options] - Options for the interceptor\n * @returns {Function} - Interceptor function\n */\nfunction createDecompressInterceptor (options = {}) {\n // Emit experimental warning only once\n if (!warningEmitted) {\n process.emitWarning(\n 'DecompressInterceptor is experimental and subject to change',\n 'ExperimentalWarning'\n )\n warningEmitted = true\n }\n\n return (dispatch) => {\n return (opts, handler) => {\n const decompressHandler = new DecompressHandler(handler, options)\n return dispatch(opts, decompressHandler)\n }\n }\n}\n\nmodule.exports = createDecompressInterceptor\n", "'use strict'\n\nconst { RequestAbortedError } = require('../core/errors')\n\n/**\n * @typedef {import('../../types/dispatcher.d.ts').default.DispatchHandler} DispatchHandler\n */\n\nconst DEFAULT_MAX_BUFFER_SIZE = 5 * 1024 * 1024\n\n/**\n * @typedef {Object} WaitingHandler\n * @property {DispatchHandler} handler\n * @property {import('../../types/dispatcher.d.ts').default.DispatchController} controller\n * @property {Buffer[]} bufferedChunks\n * @property {number} bufferedBytes\n * @property {object | null} pendingTrailers\n * @property {boolean} done\n */\n\n/**\n * Handler that forwards response events to multiple waiting handlers.\n * Used for request deduplication.\n *\n * @implements {DispatchHandler}\n */\nclass DeduplicationHandler {\n /**\n * @type {DispatchHandler}\n */\n #primaryHandler\n\n /**\n * @type {WaitingHandler[]}\n */\n #waitingHandlers = []\n\n /**\n * @type {number}\n */\n #maxBufferSize = DEFAULT_MAX_BUFFER_SIZE\n\n /**\n * @type {number}\n */\n #statusCode = 0\n\n /**\n * @type {Record}\n */\n #headers = {}\n\n /**\n * @type {string}\n */\n #statusMessage = ''\n\n /**\n * @type {boolean}\n */\n #aborted = false\n\n /**\n * @type {boolean}\n */\n #responseStarted = false\n\n /**\n * @type {boolean}\n */\n #responseDataStarted = false\n\n /**\n * @type {boolean}\n */\n #completed = false\n\n /**\n * @type {import('../../types/dispatcher.d.ts').default.DispatchController | null}\n */\n #controller = null\n\n /**\n * @type {(() => void) | null}\n */\n #onComplete = null\n\n /**\n * @param {DispatchHandler} primaryHandler The primary handler\n * @param {() => void} onComplete Callback when request completes\n * @param {number} [maxBufferSize] Maximum paused buffer size per waiting handler\n */\n constructor (primaryHandler, onComplete, maxBufferSize = DEFAULT_MAX_BUFFER_SIZE) {\n this.#primaryHandler = primaryHandler\n this.#onComplete = onComplete\n this.#maxBufferSize = maxBufferSize\n }\n\n /**\n * Add a waiting handler that will receive response events.\n * Returns false if deduplication can no longer safely attach this handler.\n *\n * @param {DispatchHandler} handler\n * @returns {boolean}\n */\n addWaitingHandler (handler) {\n if (this.#completed || this.#responseDataStarted) {\n return false\n }\n\n const waitingHandler = this.#createWaitingHandler(handler)\n const waitingController = waitingHandler.controller\n\n try {\n handler.onRequestStart?.(waitingController, null)\n\n if (waitingController.aborted) {\n waitingHandler.done = true\n return true\n }\n\n if (this.#responseStarted) {\n handler.onResponseStart?.(\n waitingController,\n this.#statusCode,\n this.#headers,\n this.#statusMessage\n )\n }\n } catch {\n // Ignore errors from waiting handlers\n waitingHandler.done = true\n return true\n }\n\n if (!waitingController.aborted) {\n this.#waitingHandlers.push(waitingHandler)\n }\n\n return true\n }\n\n /**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller\n * @param {any} context\n */\n onRequestStart (controller, context) {\n this.#controller = controller\n this.#primaryHandler.onRequestStart?.(controller, context)\n }\n\n /**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller\n * @param {number} statusCode\n * @param {import('../../types/header.d.ts').IncomingHttpHeaders} headers\n * @param {Socket} socket\n */\n onRequestUpgrade (controller, statusCode, headers, socket) {\n this.#primaryHandler.onRequestUpgrade?.(controller, statusCode, headers, socket)\n }\n\n /**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller\n * @param {number} statusCode\n * @param {Record} headers\n * @param {string} statusMessage\n */\n onResponseStart (controller, statusCode, headers, statusMessage) {\n this.#responseStarted = true\n this.#statusCode = statusCode\n this.#headers = headers\n this.#statusMessage = statusMessage\n\n this.#primaryHandler.onResponseStart?.(controller, statusCode, headers, statusMessage)\n\n for (const waitingHandler of this.#waitingHandlers) {\n const { handler, controller: waitingController } = waitingHandler\n\n if (waitingHandler.done || waitingController.aborted) {\n waitingHandler.done = true\n continue\n }\n\n try {\n handler.onResponseStart?.(\n waitingController,\n statusCode,\n headers,\n statusMessage\n )\n } catch {\n // Ignore errors from waiting handlers\n }\n\n if (waitingController.aborted) {\n waitingHandler.done = true\n }\n }\n\n this.#pruneDoneWaitingHandlers()\n }\n\n /**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller\n * @param {Buffer} chunk\n */\n onResponseData (controller, chunk) {\n if (this.#aborted || this.#completed) {\n return\n }\n\n this.#responseDataStarted = true\n\n this.#primaryHandler.onResponseData?.(controller, chunk)\n\n for (const waitingHandler of this.#waitingHandlers) {\n const { handler, controller: waitingController } = waitingHandler\n\n if (waitingHandler.done || waitingController.aborted) {\n waitingHandler.done = true\n continue\n }\n\n if (waitingController.paused) {\n this.#bufferWaitingChunk(waitingHandler, chunk)\n continue\n }\n\n try {\n handler.onResponseData?.(waitingController, chunk)\n } catch {\n // Ignore errors from waiting handlers\n }\n\n if (waitingController.aborted) {\n waitingHandler.done = true\n waitingHandler.bufferedChunks = []\n waitingHandler.bufferedBytes = 0\n }\n }\n\n this.#pruneDoneWaitingHandlers()\n }\n\n /**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller\n * @param {object} trailers\n */\n onResponseEnd (controller, trailers) {\n if (this.#aborted || this.#completed) {\n return\n }\n\n this.#completed = true\n this.#primaryHandler.onResponseEnd?.(controller, trailers)\n\n for (const waitingHandler of this.#waitingHandlers) {\n if (waitingHandler.done || waitingHandler.controller.aborted) {\n waitingHandler.done = true\n continue\n }\n\n this.#flushWaitingHandler(waitingHandler)\n\n if (waitingHandler.done || waitingHandler.controller.aborted) {\n waitingHandler.done = true\n continue\n }\n\n if (waitingHandler.controller.paused && waitingHandler.bufferedChunks.length > 0) {\n waitingHandler.pendingTrailers = trailers\n continue\n }\n\n try {\n waitingHandler.handler.onResponseEnd?.(waitingHandler.controller, trailers)\n } catch {\n // Ignore errors from waiting handlers\n }\n\n waitingHandler.done = true\n }\n\n this.#pruneDoneWaitingHandlers()\n this.#onComplete?.()\n }\n\n /**\n * @param {import('../../types/dispatcher.d.ts').default.DispatchController} controller\n * @param {Error} err\n */\n onResponseError (controller, err) {\n if (this.#completed) {\n return\n }\n\n this.#aborted = true\n this.#completed = true\n\n this.#primaryHandler.onResponseError?.(controller, err)\n\n for (const waitingHandler of this.#waitingHandlers) {\n this.#errorWaitingHandler(waitingHandler, err)\n }\n\n this.#waitingHandlers = []\n this.#onComplete?.()\n }\n\n /**\n * @param {DispatchHandler} handler\n * @returns {WaitingHandler}\n */\n #createWaitingHandler (handler) {\n /** @type {WaitingHandler} */\n const waitingHandler = {\n handler,\n controller: null,\n bufferedChunks: [],\n bufferedBytes: 0,\n pendingTrailers: null,\n done: false\n }\n\n const state = {\n aborted: false,\n paused: false,\n reason: null\n }\n\n waitingHandler.controller = {\n resume: () => {\n if (state.aborted) {\n return\n }\n\n state.paused = false\n this.#flushWaitingHandler(waitingHandler)\n\n if (\n this.#completed &&\n waitingHandler.pendingTrailers &&\n waitingHandler.bufferedChunks.length === 0 &&\n !state.paused &&\n !state.aborted\n ) {\n try {\n waitingHandler.handler.onResponseEnd?.(waitingHandler.controller, waitingHandler.pendingTrailers)\n } catch {\n // Ignore errors from waiting handlers\n }\n\n waitingHandler.pendingTrailers = null\n waitingHandler.done = true\n }\n\n this.#pruneDoneWaitingHandlers()\n },\n pause: () => {\n if (!state.aborted) {\n state.paused = true\n }\n },\n get paused () { return state.paused },\n get aborted () { return state.aborted },\n get reason () { return state.reason },\n abort: (reason) => {\n state.aborted = true\n state.reason = reason ?? null\n waitingHandler.done = true\n waitingHandler.pendingTrailers = null\n waitingHandler.bufferedChunks = []\n waitingHandler.bufferedBytes = 0\n }\n }\n\n return waitingHandler\n }\n\n /**\n * @param {WaitingHandler} waitingHandler\n * @param {Buffer} chunk\n */\n #bufferWaitingChunk (waitingHandler, chunk) {\n if (waitingHandler.done || waitingHandler.controller.aborted) {\n waitingHandler.done = true\n waitingHandler.bufferedChunks = []\n waitingHandler.bufferedBytes = 0\n return\n }\n\n const bufferedChunk = Buffer.from(chunk)\n waitingHandler.bufferedChunks.push(bufferedChunk)\n waitingHandler.bufferedBytes += bufferedChunk.length\n\n if (waitingHandler.bufferedBytes > this.#maxBufferSize) {\n const err = new RequestAbortedError(`Deduplicated waiting handler exceeded maxBufferSize (${this.#maxBufferSize} bytes) while paused`)\n this.#errorWaitingHandler(waitingHandler, err)\n }\n }\n\n /**\n * @param {WaitingHandler} waitingHandler\n */\n #flushWaitingHandler (waitingHandler) {\n const { handler, controller } = waitingHandler\n\n while (\n !waitingHandler.done &&\n !controller.aborted &&\n !controller.paused &&\n waitingHandler.bufferedChunks.length > 0\n ) {\n const bufferedChunk = waitingHandler.bufferedChunks.shift()\n waitingHandler.bufferedBytes -= bufferedChunk.length\n\n try {\n handler.onResponseData?.(controller, bufferedChunk)\n } catch {\n // Ignore errors from waiting handlers\n }\n\n if (controller.aborted) {\n waitingHandler.done = true\n waitingHandler.pendingTrailers = null\n waitingHandler.bufferedChunks = []\n waitingHandler.bufferedBytes = 0\n break\n }\n }\n }\n\n /**\n * @param {WaitingHandler} waitingHandler\n * @param {Error} err\n */\n #errorWaitingHandler (waitingHandler, err) {\n if (waitingHandler.done) {\n return\n }\n\n waitingHandler.done = true\n waitingHandler.pendingTrailers = null\n waitingHandler.bufferedChunks = []\n waitingHandler.bufferedBytes = 0\n\n try {\n waitingHandler.controller.abort(err)\n waitingHandler.handler.onResponseError?.(waitingHandler.controller, err)\n } catch {\n // Ignore errors from waiting handlers\n }\n }\n\n #pruneDoneWaitingHandlers () {\n this.#waitingHandlers = this.#waitingHandlers.filter(waitingHandler => waitingHandler.done === false)\n }\n}\n\nmodule.exports = DeduplicationHandler\n", "'use strict'\n\nconst diagnosticsChannel = require('node:diagnostics_channel')\nconst util = require('../core/util')\nconst DeduplicationHandler = require('../handler/deduplication-handler')\nconst { normalizeHeaders, makeCacheKey, makeDeduplicationKey } = require('../util/cache.js')\n\nconst pendingRequestsChannel = diagnosticsChannel.channel('undici:request:pending-requests')\n\n/**\n * @param {import('../../types/interceptors.d.ts').default.DeduplicateInterceptorOpts} [opts]\n * @returns {import('../../types/dispatcher.d.ts').default.DispatcherComposeInterceptor}\n */\nmodule.exports = (opts = {}) => {\n const {\n methods = ['GET'],\n skipHeaderNames = [],\n excludeHeaderNames = [],\n maxBufferSize = 5 * 1024 * 1024\n } = opts\n\n if (typeof opts !== 'object' || opts === null) {\n throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? 'null' : typeof opts}`)\n }\n\n if (!Array.isArray(methods)) {\n throw new TypeError(`expected opts.methods to be an array, got ${typeof methods}`)\n }\n\n for (const method of methods) {\n if (!util.safeHTTPMethods.includes(method)) {\n throw new TypeError(`expected opts.methods to only contain safe HTTP methods, got ${method}`)\n }\n }\n\n if (!Array.isArray(skipHeaderNames)) {\n throw new TypeError(`expected opts.skipHeaderNames to be an array, got ${typeof skipHeaderNames}`)\n }\n\n if (!Array.isArray(excludeHeaderNames)) {\n throw new TypeError(`expected opts.excludeHeaderNames to be an array, got ${typeof excludeHeaderNames}`)\n }\n\n if (!Number.isFinite(maxBufferSize) || maxBufferSize <= 0) {\n throw new TypeError(`expected opts.maxBufferSize to be a positive finite number, got ${maxBufferSize}`)\n }\n\n // Convert to lowercase Set for case-insensitive header matching\n const skipHeaderNamesSet = new Set(skipHeaderNames.map(name => name.toLowerCase()))\n\n // Convert to lowercase Set for case-insensitive header exclusion from deduplication key\n const excludeHeaderNamesSet = new Set(excludeHeaderNames.map(name => name.toLowerCase()))\n\n /**\n * Map of pending requests for deduplication\n * @type {Map}\n */\n const pendingRequests = new Map()\n\n return dispatch => {\n return (opts, handler) => {\n if (!opts.origin || methods.includes(opts.method) === false) {\n return dispatch(opts, handler)\n }\n\n opts = {\n ...opts,\n headers: normalizeHeaders(opts)\n }\n\n // Skip deduplication if request contains any of the specified headers\n if (skipHeaderNamesSet.size > 0) {\n for (const headerName of Object.keys(opts.headers)) {\n if (skipHeaderNamesSet.has(headerName.toLowerCase())) {\n return dispatch(opts, handler)\n }\n }\n }\n\n const cacheKey = makeCacheKey(opts)\n const dedupeKey = makeDeduplicationKey(cacheKey, excludeHeaderNamesSet)\n\n // Check if there's already a pending request for this key\n const pendingHandler = pendingRequests.get(dedupeKey)\n if (pendingHandler) {\n // Add this handler to the waiting list when safe.\n // If body streaming has already started, this request must be sent independently.\n if (pendingHandler.addWaitingHandler(handler)) {\n return true\n }\n\n return dispatch(opts, handler)\n }\n\n // Create a new deduplication handler\n const deduplicationHandler = new DeduplicationHandler(\n handler,\n () => {\n // Clean up when request completes\n pendingRequests.delete(dedupeKey)\n if (pendingRequestsChannel.hasSubscribers) {\n pendingRequestsChannel.publish({ size: pendingRequests.size, key: dedupeKey, type: 'removed' })\n }\n },\n maxBufferSize\n )\n\n // Register the pending request\n pendingRequests.set(dedupeKey, deduplicationHandler)\n if (pendingRequestsChannel.hasSubscribers) {\n pendingRequestsChannel.publish({ size: pendingRequests.size, key: dedupeKey, type: 'added' })\n }\n\n return dispatch(opts, deduplicationHandler)\n }\n }\n}\n", "'use strict'\n\nconst { Writable } = require('node:stream')\nconst { assertCacheKey, assertCacheValue } = require('../util/cache.js')\n\nlet DatabaseSync\n\nconst VERSION = 3\n\n// 2gb\nconst MAX_ENTRY_SIZE = 2 * 1000 * 1000 * 1000\n\n/**\n * @typedef {import('../../types/cache-interceptor.d.ts').default.CacheStore} CacheStore\n * @implements {CacheStore}\n *\n * @typedef {{\n * id: Readonly,\n * body?: Uint8Array\n * statusCode: number\n * statusMessage: string\n * headers?: string\n * vary?: string\n * etag?: string\n * cacheControlDirectives?: string\n * cachedAt: number\n * staleAt: number\n * deleteAt: number\n * }} SqliteStoreValue\n */\nmodule.exports = class SqliteCacheStore {\n #maxEntrySize = MAX_ENTRY_SIZE\n #maxCount = Infinity\n\n /**\n * @type {import('node:sqlite').DatabaseSync}\n */\n #db\n\n /**\n * @type {import('node:sqlite').StatementSync}\n */\n #getValuesQuery\n\n /**\n * @type {import('node:sqlite').StatementSync}\n */\n #updateValueQuery\n\n /**\n * @type {import('node:sqlite').StatementSync}\n */\n #insertValueQuery\n\n /**\n * @type {import('node:sqlite').StatementSync}\n */\n #deleteExpiredValuesQuery\n\n /**\n * @type {import('node:sqlite').StatementSync}\n */\n #deleteByUrlQuery\n\n /**\n * @type {import('node:sqlite').StatementSync}\n */\n #countEntriesQuery\n\n /**\n * @type {import('node:sqlite').StatementSync | null}\n */\n #deleteOldValuesQuery\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.SqliteCacheStoreOpts | undefined} opts\n */\n constructor (opts) {\n if (opts) {\n if (typeof opts !== 'object') {\n throw new TypeError('SqliteCacheStore options must be an object')\n }\n\n if (opts.maxEntrySize !== undefined) {\n if (\n typeof opts.maxEntrySize !== 'number' ||\n !Number.isInteger(opts.maxEntrySize) ||\n opts.maxEntrySize < 0\n ) {\n throw new TypeError('SqliteCacheStore options.maxEntrySize must be a non-negative integer')\n }\n\n if (opts.maxEntrySize > MAX_ENTRY_SIZE) {\n throw new TypeError('SqliteCacheStore options.maxEntrySize must be less than 2gb')\n }\n\n this.#maxEntrySize = opts.maxEntrySize\n }\n\n if (opts.maxCount !== undefined) {\n if (\n typeof opts.maxCount !== 'number' ||\n !Number.isInteger(opts.maxCount) ||\n opts.maxCount < 0\n ) {\n throw new TypeError('SqliteCacheStore options.maxCount must be a non-negative integer')\n }\n this.#maxCount = opts.maxCount\n }\n }\n\n if (!DatabaseSync) {\n DatabaseSync = require('node:sqlite').DatabaseSync\n }\n this.#db = new DatabaseSync(opts?.location ?? ':memory:')\n\n this.#db.exec(`\n PRAGMA journal_mode = WAL;\n PRAGMA synchronous = NORMAL;\n PRAGMA temp_store = memory;\n PRAGMA optimize;\n\n CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION} (\n -- Data specific to us\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n url TEXT NOT NULL,\n method TEXT NOT NULL,\n\n -- Data returned to the interceptor\n body BUF NULL,\n deleteAt INTEGER NOT NULL,\n statusCode INTEGER NOT NULL,\n statusMessage TEXT NOT NULL,\n headers TEXT NULL,\n cacheControlDirectives TEXT NULL,\n etag TEXT NULL,\n vary TEXT NULL,\n cachedAt INTEGER NOT NULL,\n staleAt INTEGER NOT NULL\n );\n\n CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_getValuesQuery ON cacheInterceptorV${VERSION}(url, method, deleteAt);\n CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${VERSION}_deleteByUrlQuery ON cacheInterceptorV${VERSION}(deleteAt);\n `)\n\n this.#getValuesQuery = this.#db.prepare(`\n SELECT\n id,\n body,\n deleteAt,\n statusCode,\n statusMessage,\n headers,\n etag,\n cacheControlDirectives,\n vary,\n cachedAt,\n staleAt\n FROM cacheInterceptorV${VERSION}\n WHERE\n url = ?\n AND method = ?\n ORDER BY\n deleteAt ASC\n `)\n\n this.#updateValueQuery = this.#db.prepare(`\n UPDATE cacheInterceptorV${VERSION} SET\n body = ?,\n deleteAt = ?,\n statusCode = ?,\n statusMessage = ?,\n headers = ?,\n etag = ?,\n cacheControlDirectives = ?,\n cachedAt = ?,\n staleAt = ?\n WHERE\n id = ?\n `)\n\n this.#insertValueQuery = this.#db.prepare(`\n INSERT INTO cacheInterceptorV${VERSION} (\n url,\n method,\n body,\n deleteAt,\n statusCode,\n statusMessage,\n headers,\n etag,\n cacheControlDirectives,\n vary,\n cachedAt,\n staleAt\n ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\n `)\n\n this.#deleteByUrlQuery = this.#db.prepare(\n `DELETE FROM cacheInterceptorV${VERSION} WHERE url = ?`\n )\n\n this.#countEntriesQuery = this.#db.prepare(\n `SELECT COUNT(*) AS total FROM cacheInterceptorV${VERSION}`\n )\n\n this.#deleteExpiredValuesQuery = this.#db.prepare(\n `DELETE FROM cacheInterceptorV${VERSION} WHERE deleteAt <= ?`\n )\n\n this.#deleteOldValuesQuery = this.#maxCount === Infinity\n ? null\n : this.#db.prepare(`\n DELETE FROM cacheInterceptorV${VERSION}\n WHERE id IN (\n SELECT\n id\n FROM cacheInterceptorV${VERSION}\n ORDER BY cachedAt DESC\n LIMIT ?\n )\n `)\n }\n\n close () {\n this.#db.close()\n }\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key\n * @returns {(import('../../types/cache-interceptor.d.ts').default.GetResult & { body?: Buffer }) | undefined}\n */\n get (key) {\n assertCacheKey(key)\n\n const value = this.#findValue(key)\n return value\n ? {\n body: value.body ? Buffer.from(value.body.buffer, value.body.byteOffset, value.body.byteLength) : undefined,\n statusCode: value.statusCode,\n statusMessage: value.statusMessage,\n headers: value.headers ? JSON.parse(value.headers) : undefined,\n etag: value.etag ? value.etag : undefined,\n vary: value.vary ? JSON.parse(value.vary) : undefined,\n cacheControlDirectives: value.cacheControlDirectives\n ? JSON.parse(value.cacheControlDirectives)\n : undefined,\n cachedAt: value.cachedAt,\n staleAt: value.staleAt,\n deleteAt: value.deleteAt\n }\n : undefined\n }\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue & { body: null | Buffer | Array}} value\n */\n set (key, value) {\n assertCacheKey(key)\n\n const url = this.#makeValueUrl(key)\n const body = Array.isArray(value.body) ? Buffer.concat(value.body) : value.body\n const size = body?.byteLength\n\n if (size && size > this.#maxEntrySize) {\n return\n }\n\n const existingValue = this.#findValue(key, true)\n if (existingValue) {\n // Updating an existing response, let's overwrite it\n this.#updateValueQuery.run(\n body,\n value.deleteAt,\n value.statusCode,\n value.statusMessage,\n value.headers ? JSON.stringify(value.headers) : null,\n value.etag ? value.etag : null,\n value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null,\n value.cachedAt,\n value.staleAt,\n existingValue.id\n )\n } else {\n this.#prune()\n // New response, let's insert it\n this.#insertValueQuery.run(\n url,\n key.method,\n body,\n value.deleteAt,\n value.statusCode,\n value.statusMessage,\n value.headers ? JSON.stringify(value.headers) : null,\n value.etag ? value.etag : null,\n value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null,\n value.vary ? JSON.stringify(value.vary) : null,\n value.cachedAt,\n value.staleAt\n )\n }\n }\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheValue} value\n * @returns {Writable | undefined}\n */\n createWriteStream (key, value) {\n assertCacheKey(key)\n assertCacheValue(value)\n\n let size = 0\n /**\n * @type {Buffer[] | null}\n */\n const body = []\n const store = this\n\n return new Writable({\n decodeStrings: true,\n write (chunk, encoding, callback) {\n size += chunk.byteLength\n\n if (size < store.#maxEntrySize) {\n body.push(chunk)\n } else {\n this.destroy()\n }\n\n callback()\n },\n final (callback) {\n store.set(key, { ...value, body })\n callback()\n }\n })\n }\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key\n */\n delete (key) {\n if (typeof key !== 'object') {\n throw new TypeError(`expected key to be object, got ${typeof key}`)\n }\n\n this.#deleteByUrlQuery.run(this.#makeValueUrl(key))\n }\n\n #prune () {\n if (Number.isFinite(this.#maxCount) && this.size <= this.#maxCount) {\n return 0\n }\n\n {\n const removed = this.#deleteExpiredValuesQuery.run(Date.now()).changes\n if (removed) {\n return removed\n }\n }\n\n {\n const removed = this.#deleteOldValuesQuery?.run(Math.max(Math.floor(this.#maxCount * 0.1), 1)).changes\n if (removed) {\n return removed\n }\n }\n\n return 0\n }\n\n /**\n * Counts the number of rows in the cache\n * @returns {Number}\n */\n get size () {\n const { total } = this.#countEntriesQuery.get()\n return total\n }\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key\n * @returns {string}\n */\n #makeValueUrl (key) {\n return `${key.origin}/${key.path}`\n }\n\n /**\n * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key\n * @param {boolean} [canBeExpired=false]\n * @returns {SqliteStoreValue | undefined}\n */\n #findValue (key, canBeExpired = false) {\n const url = this.#makeValueUrl(key)\n const { headers, method } = key\n\n /**\n * @type {SqliteStoreValue[]}\n */\n const values = this.#getValuesQuery.all(url, method)\n\n if (values.length === 0) {\n return undefined\n }\n\n const now = Date.now()\n for (const value of values) {\n if (now >= value.deleteAt && !canBeExpired) {\n return undefined\n }\n\n let matches = true\n\n if (value.vary) {\n const vary = JSON.parse(value.vary)\n\n for (const header in vary) {\n if (!headerValueEquals(headers[header], vary[header])) {\n matches = false\n break\n }\n }\n }\n\n if (matches) {\n return value\n }\n }\n\n return undefined\n }\n}\n\n/**\n * @param {string|string[]|null|undefined} lhs\n * @param {string|string[]|null|undefined} rhs\n * @returns {boolean}\n */\nfunction headerValueEquals (lhs, rhs) {\n if (lhs == null && rhs == null) {\n return true\n }\n\n if ((lhs == null && rhs != null) ||\n (lhs != null && rhs == null)) {\n return false\n }\n\n if (Array.isArray(lhs) && Array.isArray(rhs)) {\n if (lhs.length !== rhs.length) {\n return false\n }\n\n return lhs.every((x, i) => x === rhs[i])\n }\n\n return lhs === rhs\n}\n", "// https://github.com/Ethan-Arrowood/undici-fetch\n\n'use strict'\n\nconst { kConstruct } = require('../../core/symbols')\nconst { kEnumerableProperty } = require('../../core/util')\nconst {\n iteratorMixin,\n isValidHeaderName,\n isValidHeaderValue\n} = require('./util')\nconst { webidl } = require('../webidl')\nconst assert = require('node:assert')\nconst util = require('node:util')\n\n/**\n * @param {number} code\n * @returns {code is (0x0a | 0x0d | 0x09 | 0x20)}\n */\nfunction isHTTPWhiteSpaceCharCode (code) {\n return code === 0x0a || code === 0x0d || code === 0x09 || code === 0x20\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize\n * @param {string} potentialValue\n * @returns {string}\n */\nfunction headerValueNormalize (potentialValue) {\n // To normalize a byte sequence potentialValue, remove\n // any leading and trailing HTTP whitespace bytes from\n // potentialValue.\n let i = 0; let j = potentialValue.length\n\n while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j\n while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i\n\n return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j)\n}\n\n/**\n * @param {Headers} headers\n * @param {Array|Object} object\n */\nfunction fill (headers, object) {\n // To fill a Headers object headers with a given object object, run these steps:\n\n // 1. If object is a sequence, then for each header in object:\n // Note: webidl conversion to array has already been done.\n if (Array.isArray(object)) {\n for (let i = 0; i < object.length; ++i) {\n const header = object[i]\n // 1. If header does not contain exactly two items, then throw a TypeError.\n if (header.length !== 2) {\n throw webidl.errors.exception({\n header: 'Headers constructor',\n message: `expected name/value pair to be length 2, found ${header.length}.`\n })\n }\n\n // 2. Append (header\u2019s first item, header\u2019s second item) to headers.\n appendHeader(headers, header[0], header[1])\n }\n } else if (typeof object === 'object' && object !== null) {\n // Note: null should throw\n\n // 2. Otherwise, object is a record, then for each key \u2192 value in object,\n // append (key, value) to headers\n const keys = Object.keys(object)\n for (let i = 0; i < keys.length; ++i) {\n appendHeader(headers, keys[i], object[keys[i]])\n }\n } else {\n throw webidl.errors.conversionFailed({\n prefix: 'Headers constructor',\n argument: 'Argument 1',\n types: ['sequence>', 'record']\n })\n }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#concept-headers-append\n * @param {Headers} headers\n * @param {string} name\n * @param {string} value\n */\nfunction appendHeader (headers, name, value) {\n // 1. Normalize value.\n value = headerValueNormalize(value)\n\n // 2. If name is not a header name or value is not a\n // header value, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.append',\n value: name,\n type: 'header name'\n })\n } else if (!isValidHeaderValue(value)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.append',\n value,\n type: 'header value'\n })\n }\n\n // 3. If headers\u2019s guard is \"immutable\", then throw a TypeError.\n // 4. Otherwise, if headers\u2019s guard is \"request\" and name is a\n // forbidden header name, return.\n // 5. Otherwise, if headers\u2019s guard is \"request-no-cors\":\n // TODO\n // Note: undici does not implement forbidden header names\n if (getHeadersGuard(headers) === 'immutable') {\n throw new TypeError('immutable')\n }\n\n // 6. Otherwise, if headers\u2019s guard is \"response\" and name is a\n // forbidden response-header name, return.\n\n // 7. Append (name, value) to headers\u2019s header list.\n return getHeadersList(headers).append(name, value, false)\n\n // 8. If headers\u2019s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from headers\n}\n\n// https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine\n/**\n * @param {Headers} target\n */\nfunction headersListSortAndCombine (target) {\n const headersList = getHeadersList(target)\n\n if (!headersList) {\n return []\n }\n\n if (headersList.sortedMap) {\n return headersList.sortedMap\n }\n\n // 1. Let headers be an empty list of headers with the key being the name\n // and value the value.\n const headers = []\n\n // 2. Let names be the result of convert header names to a sorted-lowercase\n // set with all the names of the headers in list.\n const names = headersList.toSortedArray()\n\n const cookies = headersList.cookies\n\n // fast-path\n if (cookies === null || cookies.length === 1) {\n // Note: The non-null assertion of value has already been done by `HeadersList#toSortedArray`\n return (headersList.sortedMap = names)\n }\n\n // 3. For each name of names:\n for (let i = 0; i < names.length; ++i) {\n const { 0: name, 1: value } = names[i]\n // 1. If name is `set-cookie`, then:\n if (name === 'set-cookie') {\n // 1. Let values be a list of all values of headers in list whose name\n // is a byte-case-insensitive match for name, in order.\n\n // 2. For each value of values:\n // 1. Append (name, value) to headers.\n for (let j = 0; j < cookies.length; ++j) {\n headers.push([name, cookies[j]])\n }\n } else {\n // 2. Otherwise:\n\n // 1. Let value be the result of getting name from list.\n\n // 2. Assert: value is non-null.\n // Note: This operation was done by `HeadersList#toSortedArray`.\n\n // 3. Append (name, value) to headers.\n headers.push([name, value])\n }\n }\n\n // 4. Return headers.\n return (headersList.sortedMap = headers)\n}\n\nfunction compareHeaderName (a, b) {\n return a[0] < b[0] ? -1 : 1\n}\n\nclass HeadersList {\n /** @type {[string, string][]|null} */\n cookies = null\n\n sortedMap\n headersMap\n\n constructor (init) {\n if (init instanceof HeadersList) {\n this.headersMap = new Map(init.headersMap)\n this.sortedMap = init.sortedMap\n this.cookies = init.cookies === null ? null : [...init.cookies]\n } else {\n this.headersMap = new Map(init)\n this.sortedMap = null\n }\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#header-list-contains\n * @param {string} name\n * @param {boolean} isLowerCase\n */\n contains (name, isLowerCase) {\n // A header list list contains a header name name if list\n // contains a header whose name is a byte-case-insensitive\n // match for name.\n\n return this.headersMap.has(isLowerCase ? name : name.toLowerCase())\n }\n\n clear () {\n this.headersMap.clear()\n this.sortedMap = null\n this.cookies = null\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#concept-header-list-append\n * @param {string} name\n * @param {string} value\n * @param {boolean} isLowerCase\n */\n append (name, value, isLowerCase) {\n this.sortedMap = null\n\n // 1. If list contains name, then set name to the first such\n // header\u2019s name.\n const lowercaseName = isLowerCase ? name : name.toLowerCase()\n const exists = this.headersMap.get(lowercaseName)\n\n // 2. Append (name, value) to list.\n if (exists) {\n const delimiter = lowercaseName === 'cookie' ? '; ' : ', '\n this.headersMap.set(lowercaseName, {\n name: exists.name,\n value: `${exists.value}${delimiter}${value}`\n })\n } else {\n this.headersMap.set(lowercaseName, { name, value })\n }\n\n if (lowercaseName === 'set-cookie') {\n (this.cookies ??= []).push(value)\n }\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#concept-header-list-set\n * @param {string} name\n * @param {string} value\n * @param {boolean} isLowerCase\n */\n set (name, value, isLowerCase) {\n this.sortedMap = null\n const lowercaseName = isLowerCase ? name : name.toLowerCase()\n\n if (lowercaseName === 'set-cookie') {\n this.cookies = [value]\n }\n\n // 1. If list contains name, then set the value of\n // the first such header to value and remove the\n // others.\n // 2. Otherwise, append header (name, value) to list.\n this.headersMap.set(lowercaseName, { name, value })\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#concept-header-list-delete\n * @param {string} name\n * @param {boolean} isLowerCase\n */\n delete (name, isLowerCase) {\n this.sortedMap = null\n if (!isLowerCase) name = name.toLowerCase()\n\n if (name === 'set-cookie') {\n this.cookies = null\n }\n\n this.headersMap.delete(name)\n }\n\n /**\n * @see https://fetch.spec.whatwg.org/#concept-header-list-get\n * @param {string} name\n * @param {boolean} isLowerCase\n * @returns {string | null}\n */\n get (name, isLowerCase) {\n // 1. If list does not contain name, then return null.\n // 2. Return the values of all headers in list whose name\n // is a byte-case-insensitive match for name,\n // separated from each other by 0x2C 0x20, in order.\n return this.headersMap.get(isLowerCase ? name : name.toLowerCase())?.value ?? null\n }\n\n * [Symbol.iterator] () {\n // use the lowercased name\n for (const { 0: name, 1: { value } } of this.headersMap) {\n yield [name, value]\n }\n }\n\n get entries () {\n const headers = {}\n\n if (this.headersMap.size !== 0) {\n for (const { name, value } of this.headersMap.values()) {\n headers[name] = value\n }\n }\n\n return headers\n }\n\n rawValues () {\n return this.headersMap.values()\n }\n\n get entriesList () {\n const headers = []\n\n if (this.headersMap.size !== 0) {\n for (const { 0: lowerName, 1: { name, value } } of this.headersMap) {\n if (lowerName === 'set-cookie') {\n for (const cookie of this.cookies) {\n headers.push([name, cookie])\n }\n } else {\n headers.push([name, value])\n }\n }\n }\n\n return headers\n }\n\n // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set\n toSortedArray () {\n const size = this.headersMap.size\n const array = new Array(size)\n // In most cases, you will use the fast-path.\n // fast-path: Use binary insertion sort for small arrays.\n if (size <= 32) {\n if (size === 0) {\n // If empty, it is an empty array. To avoid the first index assignment.\n return array\n }\n // Improve performance by unrolling loop and avoiding double-loop.\n // Double-loop-less version of the binary insertion sort.\n const iterator = this.headersMap[Symbol.iterator]()\n const firstValue = iterator.next().value\n // set [name, value] to first index.\n array[0] = [firstValue[0], firstValue[1].value]\n // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine\n // 3.2.2. Assert: value is non-null.\n assert(firstValue[1].value !== null)\n for (\n let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value;\n i < size;\n ++i\n ) {\n // get next value\n value = iterator.next().value\n // set [name, value] to current index.\n x = array[i] = [value[0], value[1].value]\n // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine\n // 3.2.2. Assert: value is non-null.\n assert(x[1] !== null)\n left = 0\n right = i\n // binary search\n while (left < right) {\n // middle index\n pivot = left + ((right - left) >> 1)\n // compare header name\n if (array[pivot][0] <= x[0]) {\n left = pivot + 1\n } else {\n right = pivot\n }\n }\n if (i !== pivot) {\n j = i\n while (j > left) {\n array[j] = array[--j]\n }\n array[left] = x\n }\n }\n /* c8 ignore next 4 */\n if (!iterator.next().done) {\n // This is for debugging and will never be called.\n throw new TypeError('Unreachable')\n }\n return array\n } else {\n // This case would be a rare occurrence.\n // slow-path: fallback\n let i = 0\n for (const { 0: name, 1: { value } } of this.headersMap) {\n array[i++] = [name, value]\n // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine\n // 3.2.2. Assert: value is non-null.\n assert(value !== null)\n }\n return array.sort(compareHeaderName)\n }\n }\n}\n\n// https://fetch.spec.whatwg.org/#headers-class\nclass Headers {\n #guard\n /**\n * @type {HeadersList}\n */\n #headersList\n\n /**\n * @param {HeadersInit|Symbol} [init]\n * @returns\n */\n constructor (init = undefined) {\n webidl.util.markAsUncloneable(this)\n\n if (init === kConstruct) {\n return\n }\n\n this.#headersList = new HeadersList()\n\n // The new Headers(init) constructor steps are:\n\n // 1. Set this\u2019s guard to \"none\".\n this.#guard = 'none'\n\n // 2. If init is given, then fill this with init.\n if (init !== undefined) {\n init = webidl.converters.HeadersInit(init, 'Headers constructor', 'init')\n fill(this, init)\n }\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-append\n append (name, value) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 2, 'Headers.append')\n\n const prefix = 'Headers.append'\n name = webidl.converters.ByteString(name, prefix, 'name')\n value = webidl.converters.ByteString(value, prefix, 'value')\n\n return appendHeader(this, name, value)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-delete\n delete (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, 'Headers.delete')\n\n const prefix = 'Headers.delete'\n name = webidl.converters.ByteString(name, prefix, 'name')\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix: 'Headers.delete',\n value: name,\n type: 'header name'\n })\n }\n\n // 2. If this\u2019s guard is \"immutable\", then throw a TypeError.\n // 3. Otherwise, if this\u2019s guard is \"request\" and name is a\n // forbidden header name, return.\n // 4. Otherwise, if this\u2019s guard is \"request-no-cors\", name\n // is not a no-CORS-safelisted request-header name, and\n // name is not a privileged no-CORS request-header name,\n // return.\n // 5. Otherwise, if this\u2019s guard is \"response\" and name is\n // a forbidden response-header name, return.\n // Note: undici does not implement forbidden header names\n if (this.#guard === 'immutable') {\n throw new TypeError('immutable')\n }\n\n // 6. If this\u2019s header list does not contain name, then\n // return.\n if (!this.#headersList.contains(name, false)) {\n return\n }\n\n // 7. Delete name from this\u2019s header list.\n // 8. If this\u2019s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from this.\n this.#headersList.delete(name, false)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-get\n get (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, 'Headers.get')\n\n const prefix = 'Headers.get'\n name = webidl.converters.ByteString(name, prefix, 'name')\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix,\n value: name,\n type: 'header name'\n })\n }\n\n // 2. Return the result of getting name from this\u2019s header\n // list.\n return this.#headersList.get(name, false)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-has\n has (name) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 1, 'Headers.has')\n\n const prefix = 'Headers.has'\n name = webidl.converters.ByteString(name, prefix, 'name')\n\n // 1. If name is not a header name, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix,\n value: name,\n type: 'header name'\n })\n }\n\n // 2. Return true if this\u2019s header list contains name;\n // otherwise false.\n return this.#headersList.contains(name, false)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-set\n set (name, value) {\n webidl.brandCheck(this, Headers)\n\n webidl.argumentLengthCheck(arguments, 2, 'Headers.set')\n\n const prefix = 'Headers.set'\n name = webidl.converters.ByteString(name, prefix, 'name')\n value = webidl.converters.ByteString(value, prefix, 'value')\n\n // 1. Normalize value.\n value = headerValueNormalize(value)\n\n // 2. If name is not a header name or value is not a\n // header value, then throw a TypeError.\n if (!isValidHeaderName(name)) {\n throw webidl.errors.invalidArgument({\n prefix,\n value: name,\n type: 'header name'\n })\n } else if (!isValidHeaderValue(value)) {\n throw webidl.errors.invalidArgument({\n prefix,\n value,\n type: 'header value'\n })\n }\n\n // 3. If this\u2019s guard is \"immutable\", then throw a TypeError.\n // 4. Otherwise, if this\u2019s guard is \"request\" and name is a\n // forbidden header name, return.\n // 5. Otherwise, if this\u2019s guard is \"request-no-cors\" and\n // name/value is not a no-CORS-safelisted request-header,\n // return.\n // 6. Otherwise, if this\u2019s guard is \"response\" and name is a\n // forbidden response-header name, return.\n // Note: undici does not implement forbidden header names\n if (this.#guard === 'immutable') {\n throw new TypeError('immutable')\n }\n\n // 7. Set (name, value) in this\u2019s header list.\n // 8. If this\u2019s guard is \"request-no-cors\", then remove\n // privileged no-CORS request headers from this\n this.#headersList.set(name, value, false)\n }\n\n // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie\n getSetCookie () {\n webidl.brandCheck(this, Headers)\n\n // 1. If this\u2019s header list does not contain `Set-Cookie`, then return \u00AB \u00BB.\n // 2. Return the values of all headers in this\u2019s header list whose name is\n // a byte-case-insensitive match for `Set-Cookie`, in order.\n\n const list = this.#headersList.cookies\n\n if (list) {\n return [...list]\n }\n\n return []\n }\n\n [util.inspect.custom] (depth, options) {\n options.depth ??= depth\n\n return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}`\n }\n\n static getHeadersGuard (o) {\n return o.#guard\n }\n\n static setHeadersGuard (o, guard) {\n o.#guard = guard\n }\n\n /**\n * @param {Headers} o\n */\n static getHeadersList (o) {\n return o.#headersList\n }\n\n /**\n * @param {Headers} target\n * @param {HeadersList} list\n */\n static setHeadersList (target, list) {\n target.#headersList = list\n }\n}\n\nconst { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers\nReflect.deleteProperty(Headers, 'getHeadersGuard')\nReflect.deleteProperty(Headers, 'setHeadersGuard')\nReflect.deleteProperty(Headers, 'getHeadersList')\nReflect.deleteProperty(Headers, 'setHeadersList')\n\niteratorMixin('Headers', Headers, headersListSortAndCombine, 0, 1)\n\nObject.defineProperties(Headers.prototype, {\n append: kEnumerableProperty,\n delete: kEnumerableProperty,\n get: kEnumerableProperty,\n has: kEnumerableProperty,\n set: kEnumerableProperty,\n getSetCookie: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'Headers',\n configurable: true\n },\n [util.inspect.custom]: {\n enumerable: false\n }\n})\n\nwebidl.converters.HeadersInit = function (V, prefix, argument) {\n if (webidl.util.Type(V) === webidl.util.Types.OBJECT) {\n const iterator = Reflect.get(V, Symbol.iterator)\n\n // A work-around to ensure we send the properly-cased Headers when V is a Headers object.\n // Read https://github.com/nodejs/undici/pull/3159#issuecomment-2075537226 before touching, please.\n if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) { // Headers object\n try {\n return getHeadersList(V).entriesList\n } catch {\n // fall-through\n }\n }\n\n if (typeof iterator === 'function') {\n return webidl.converters['sequence>'](V, prefix, argument, iterator.bind(V))\n }\n\n return webidl.converters['record'](V, prefix, argument)\n }\n\n throw webidl.errors.conversionFailed({\n prefix: 'Headers constructor',\n argument: 'Argument 1',\n types: ['sequence>', 'record']\n })\n}\n\nmodule.exports = {\n fill,\n // for test.\n compareHeaderName,\n Headers,\n HeadersList,\n getHeadersGuard,\n setHeadersGuard,\n setHeadersList,\n getHeadersList\n}\n", "'use strict'\n\nconst { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require('./headers')\nconst { extractBody, cloneBody, mixinBody, streamRegistry, bodyUnusable } = require('./body')\nconst util = require('../../core/util')\nconst nodeUtil = require('node:util')\nconst { kEnumerableProperty } = util\nconst {\n isValidReasonPhrase,\n isCancelled,\n isAborted,\n isErrorLike,\n environmentSettingsObject: relevantRealm\n} = require('./util')\nconst {\n redirectStatusSet,\n nullBodyStatus\n} = require('./constants')\nconst { webidl } = require('../webidl')\nconst { URLSerializer } = require('./data-url')\nconst { kConstruct } = require('../../core/symbols')\nconst assert = require('node:assert')\nconst { isomorphicEncode, serializeJavascriptValueToJSONString } = require('../infra')\n\nconst textEncoder = new TextEncoder('utf-8')\n\n// https://fetch.spec.whatwg.org/#response-class\nclass Response {\n /** @type {Headers} */\n #headers\n\n #state\n\n // Creates network error Response.\n static error () {\n // The static error() method steps are to return the result of creating a\n // Response object, given a new network error, \"immutable\", and this\u2019s\n // relevant Realm.\n const responseObject = fromInnerResponse(makeNetworkError(), 'immutable')\n\n return responseObject\n }\n\n // https://fetch.spec.whatwg.org/#dom-response-json\n static json (data, init = undefined) {\n webidl.argumentLengthCheck(arguments, 1, 'Response.json')\n\n if (init !== null) {\n init = webidl.converters.ResponseInit(init)\n }\n\n // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data.\n const bytes = textEncoder.encode(\n serializeJavascriptValueToJSONString(data)\n )\n\n // 2. Let body be the result of extracting bytes.\n const body = extractBody(bytes)\n\n // 3. Let responseObject be the result of creating a Response object, given a new response,\n // \"response\", and this\u2019s relevant Realm.\n const responseObject = fromInnerResponse(makeResponse({}), 'response')\n\n // 4. Perform initialize a response given responseObject, init, and (body, \"application/json\").\n initializeResponse(responseObject, init, { body: body[0], type: 'application/json' })\n\n // 5. Return responseObject.\n return responseObject\n }\n\n // Creates a redirect Response that redirects to url with status status.\n static redirect (url, status = 302) {\n webidl.argumentLengthCheck(arguments, 1, 'Response.redirect')\n\n url = webidl.converters.USVString(url)\n status = webidl.converters['unsigned short'](status)\n\n // 1. Let parsedURL be the result of parsing url with current settings\n // object\u2019s API base URL.\n // 2. If parsedURL is failure, then throw a TypeError.\n // TODO: base-URL?\n let parsedURL\n try {\n parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl)\n } catch (err) {\n throw new TypeError(`Failed to parse URL from ${url}`, { cause: err })\n }\n\n // 3. If status is not a redirect status, then throw a RangeError.\n if (!redirectStatusSet.has(status)) {\n throw new RangeError(`Invalid status code ${status}`)\n }\n\n // 4. Let responseObject be the result of creating a Response object,\n // given a new response, \"immutable\", and this\u2019s relevant Realm.\n const responseObject = fromInnerResponse(makeResponse({}), 'immutable')\n\n // 5. Set responseObject\u2019s response\u2019s status to status.\n responseObject.#state.status = status\n\n // 6. Let value be parsedURL, serialized and isomorphic encoded.\n const value = isomorphicEncode(URLSerializer(parsedURL))\n\n // 7. Append `Location`/value to responseObject\u2019s response\u2019s header list.\n responseObject.#state.headersList.append('location', value, true)\n\n // 8. Return responseObject.\n return responseObject\n }\n\n // https://fetch.spec.whatwg.org/#dom-response\n constructor (body = null, init = undefined) {\n webidl.util.markAsUncloneable(this)\n\n if (body === kConstruct) {\n return\n }\n\n if (body !== null) {\n body = webidl.converters.BodyInit(body, 'Response', 'body')\n }\n\n init = webidl.converters.ResponseInit(init)\n\n // 1. Set this\u2019s response to a new response.\n this.#state = makeResponse({})\n\n // 2. Set this\u2019s headers to a new Headers object with this\u2019s relevant\n // Realm, whose header list is this\u2019s response\u2019s header list and guard\n // is \"response\".\n this.#headers = new Headers(kConstruct)\n setHeadersGuard(this.#headers, 'response')\n setHeadersList(this.#headers, this.#state.headersList)\n\n // 3. Let bodyWithType be null.\n let bodyWithType = null\n\n // 4. If body is non-null, then set bodyWithType to the result of extracting body.\n if (body != null) {\n const [extractedBody, type] = extractBody(body)\n bodyWithType = { body: extractedBody, type }\n }\n\n // 5. Perform initialize a response given this, init, and bodyWithType.\n initializeResponse(this, init, bodyWithType)\n }\n\n // Returns response\u2019s type, e.g., \"cors\".\n get type () {\n webidl.brandCheck(this, Response)\n\n // The type getter steps are to return this\u2019s response\u2019s type.\n return this.#state.type\n }\n\n // Returns response\u2019s URL, if it has one; otherwise the empty string.\n get url () {\n webidl.brandCheck(this, Response)\n\n const urlList = this.#state.urlList\n\n // The url getter steps are to return the empty string if this\u2019s\n // response\u2019s URL is null; otherwise this\u2019s response\u2019s URL,\n // serialized with exclude fragment set to true.\n const url = urlList[urlList.length - 1] ?? null\n\n if (url === null) {\n return ''\n }\n\n return URLSerializer(url, true)\n }\n\n // Returns whether response was obtained through a redirect.\n get redirected () {\n webidl.brandCheck(this, Response)\n\n // The redirected getter steps are to return true if this\u2019s response\u2019s URL\n // list has more than one item; otherwise false.\n return this.#state.urlList.length > 1\n }\n\n // Returns response\u2019s status.\n get status () {\n webidl.brandCheck(this, Response)\n\n // The status getter steps are to return this\u2019s response\u2019s status.\n return this.#state.status\n }\n\n // Returns whether response\u2019s status is an ok status.\n get ok () {\n webidl.brandCheck(this, Response)\n\n // The ok getter steps are to return true if this\u2019s response\u2019s status is an\n // ok status; otherwise false.\n return this.#state.status >= 200 && this.#state.status <= 299\n }\n\n // Returns response\u2019s status message.\n get statusText () {\n webidl.brandCheck(this, Response)\n\n // The statusText getter steps are to return this\u2019s response\u2019s status\n // message.\n return this.#state.statusText\n }\n\n // Returns response\u2019s headers as Headers.\n get headers () {\n webidl.brandCheck(this, Response)\n\n // The headers getter steps are to return this\u2019s headers.\n return this.#headers\n }\n\n get body () {\n webidl.brandCheck(this, Response)\n\n return this.#state.body ? this.#state.body.stream : null\n }\n\n get bodyUsed () {\n webidl.brandCheck(this, Response)\n\n return !!this.#state.body && util.isDisturbed(this.#state.body.stream)\n }\n\n // Returns a clone of response.\n clone () {\n webidl.brandCheck(this, Response)\n\n // 1. If this is unusable, then throw a TypeError.\n if (bodyUnusable(this.#state)) {\n throw webidl.errors.exception({\n header: 'Response.clone',\n message: 'Body has already been consumed.'\n })\n }\n\n // 2. Let clonedResponse be the result of cloning this\u2019s response.\n const clonedResponse = cloneResponse(this.#state)\n\n // Note: To re-register because of a new stream.\n // Don't set finalizers other than for fetch responses.\n if (this.#state.urlList.length !== 0 && this.#state.body?.stream) {\n streamRegistry.register(this, new WeakRef(this.#state.body.stream))\n }\n\n // 3. Return the result of creating a Response object, given\n // clonedResponse, this\u2019s headers\u2019s guard, and this\u2019s relevant Realm.\n return fromInnerResponse(clonedResponse, getHeadersGuard(this.#headers))\n }\n\n [nodeUtil.inspect.custom] (depth, options) {\n if (options.depth === null) {\n options.depth = 2\n }\n\n options.colors ??= true\n\n const properties = {\n status: this.status,\n statusText: this.statusText,\n headers: this.headers,\n body: this.body,\n bodyUsed: this.bodyUsed,\n ok: this.ok,\n redirected: this.redirected,\n type: this.type,\n url: this.url\n }\n\n return `Response ${nodeUtil.formatWithOptions(options, properties)}`\n }\n\n /**\n * @param {Response} response\n */\n static getResponseHeaders (response) {\n return response.#headers\n }\n\n /**\n * @param {Response} response\n * @param {Headers} newHeaders\n */\n static setResponseHeaders (response, newHeaders) {\n response.#headers = newHeaders\n }\n\n /**\n * @param {Response} response\n */\n static getResponseState (response) {\n return response.#state\n }\n\n /**\n * @param {Response} response\n * @param {any} newState\n */\n static setResponseState (response, newState) {\n response.#state = newState\n }\n}\n\nconst { getResponseHeaders, setResponseHeaders, getResponseState, setResponseState } = Response\nReflect.deleteProperty(Response, 'getResponseHeaders')\nReflect.deleteProperty(Response, 'setResponseHeaders')\nReflect.deleteProperty(Response, 'getResponseState')\nReflect.deleteProperty(Response, 'setResponseState')\n\nmixinBody(Response, getResponseState)\n\nObject.defineProperties(Response.prototype, {\n type: kEnumerableProperty,\n url: kEnumerableProperty,\n status: kEnumerableProperty,\n ok: kEnumerableProperty,\n redirected: kEnumerableProperty,\n statusText: kEnumerableProperty,\n headers: kEnumerableProperty,\n clone: kEnumerableProperty,\n body: kEnumerableProperty,\n bodyUsed: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'Response',\n configurable: true\n }\n})\n\nObject.defineProperties(Response, {\n json: kEnumerableProperty,\n redirect: kEnumerableProperty,\n error: kEnumerableProperty\n})\n\n// https://fetch.spec.whatwg.org/#concept-response-clone\nfunction cloneResponse (response) {\n // To clone a response response, run these steps:\n\n // 1. If response is a filtered response, then return a new identical\n // filtered response whose internal response is a clone of response\u2019s\n // internal response.\n if (response.internalResponse) {\n return filterResponse(\n cloneResponse(response.internalResponse),\n response.type\n )\n }\n\n // 2. Let newResponse be a copy of response, except for its body.\n const newResponse = makeResponse({ ...response, body: null })\n\n // 3. If response\u2019s body is non-null, then set newResponse\u2019s body to the\n // result of cloning response\u2019s body.\n if (response.body != null) {\n newResponse.body = cloneBody(response.body)\n }\n\n // 4. Return newResponse.\n return newResponse\n}\n\nfunction makeResponse (init) {\n return {\n aborted: false,\n rangeRequested: false,\n timingAllowPassed: false,\n requestIncludesCredentials: false,\n type: 'default',\n status: 200,\n timingInfo: null,\n cacheState: '',\n statusText: '',\n ...init,\n headersList: init?.headersList\n ? new HeadersList(init?.headersList)\n : new HeadersList(),\n urlList: init?.urlList ? [...init.urlList] : []\n }\n}\n\nfunction makeNetworkError (reason) {\n const isError = isErrorLike(reason)\n return makeResponse({\n type: 'error',\n status: 0,\n error: isError\n ? reason\n : new Error(reason ? String(reason) : reason),\n aborted: reason && reason.name === 'AbortError'\n })\n}\n\n// @see https://fetch.spec.whatwg.org/#concept-network-error\nfunction isNetworkError (response) {\n return (\n // A network error is a response whose type is \"error\",\n response.type === 'error' &&\n // status is 0\n response.status === 0\n )\n}\n\nfunction makeFilteredResponse (response, state) {\n state = {\n internalResponse: response,\n ...state\n }\n\n return new Proxy(response, {\n get (target, p) {\n return p in state ? state[p] : target[p]\n },\n set (target, p, value) {\n assert(!(p in state))\n target[p] = value\n return true\n }\n })\n}\n\n// https://fetch.spec.whatwg.org/#concept-filtered-response\nfunction filterResponse (response, type) {\n // Set response to the following filtered response with response as its\n // internal response, depending on request\u2019s response tainting:\n if (type === 'basic') {\n // A basic filtered response is a filtered response whose type is \"basic\"\n // and header list excludes any headers in internal response\u2019s header list\n // whose name is a forbidden response-header name.\n\n // Note: undici does not implement forbidden response-header names\n return makeFilteredResponse(response, {\n type: 'basic',\n headersList: response.headersList\n })\n } else if (type === 'cors') {\n // A CORS filtered response is a filtered response whose type is \"cors\"\n // and header list excludes any headers in internal response\u2019s header\n // list whose name is not a CORS-safelisted response-header name, given\n // internal response\u2019s CORS-exposed header-name list.\n\n // Note: undici does not implement CORS-safelisted response-header names\n return makeFilteredResponse(response, {\n type: 'cors',\n headersList: response.headersList\n })\n } else if (type === 'opaque') {\n // An opaque filtered response is a filtered response whose type is\n // \"opaque\", URL list is the empty list, status is 0, status message\n // is the empty byte sequence, header list is empty, and body is null.\n\n return makeFilteredResponse(response, {\n type: 'opaque',\n urlList: [],\n status: 0,\n statusText: '',\n body: null\n })\n } else if (type === 'opaqueredirect') {\n // An opaque-redirect filtered response is a filtered response whose type\n // is \"opaqueredirect\", status is 0, status message is the empty byte\n // sequence, header list is empty, and body is null.\n\n return makeFilteredResponse(response, {\n type: 'opaqueredirect',\n status: 0,\n statusText: '',\n headersList: [],\n body: null\n })\n } else {\n assert(false)\n }\n}\n\n// https://fetch.spec.whatwg.org/#appropriate-network-error\nfunction makeAppropriateNetworkError (fetchParams, err = null) {\n // 1. Assert: fetchParams is canceled.\n assert(isCancelled(fetchParams))\n\n // 2. Return an aborted network error if fetchParams is aborted;\n // otherwise return a network error.\n return isAborted(fetchParams)\n ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err }))\n : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err }))\n}\n\n// https://whatpr.org/fetch/1392.html#initialize-a-response\nfunction initializeResponse (response, init, body) {\n // 1. If init[\"status\"] is not in the range 200 to 599, inclusive, then\n // throw a RangeError.\n if (init.status !== null && (init.status < 200 || init.status > 599)) {\n throw new RangeError('init[\"status\"] must be in the range of 200 to 599, inclusive.')\n }\n\n // 2. If init[\"statusText\"] does not match the reason-phrase token production,\n // then throw a TypeError.\n if ('statusText' in init && init.statusText != null) {\n // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2:\n // reason-phrase = *( HTAB / SP / VCHAR / obs-text )\n if (!isValidReasonPhrase(String(init.statusText))) {\n throw new TypeError('Invalid statusText')\n }\n }\n\n // 3. Set response\u2019s response\u2019s status to init[\"status\"].\n if ('status' in init && init.status != null) {\n getResponseState(response).status = init.status\n }\n\n // 4. Set response\u2019s response\u2019s status message to init[\"statusText\"].\n if ('statusText' in init && init.statusText != null) {\n getResponseState(response).statusText = init.statusText\n }\n\n // 5. If init[\"headers\"] exists, then fill response\u2019s headers with init[\"headers\"].\n if ('headers' in init && init.headers != null) {\n fill(getResponseHeaders(response), init.headers)\n }\n\n // 6. If body was given, then:\n if (body) {\n // 1. If response's status is a null body status, then throw a TypeError.\n if (nullBodyStatus.includes(response.status)) {\n throw webidl.errors.exception({\n header: 'Response constructor',\n message: `Invalid response status code ${response.status}`\n })\n }\n\n // 2. Set response's body to body's body.\n getResponseState(response).body = body.body\n\n // 3. If body's type is non-null and response's header list does not contain\n // `Content-Type`, then append (`Content-Type`, body's type) to response's header list.\n if (body.type != null && !getResponseState(response).headersList.contains('content-type', true)) {\n getResponseState(response).headersList.append('content-type', body.type, true)\n }\n }\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#response-create\n * @param {any} innerResponse\n * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard\n * @returns {Response}\n */\nfunction fromInnerResponse (innerResponse, guard) {\n const response = new Response(kConstruct)\n setResponseState(response, innerResponse)\n const headers = new Headers(kConstruct)\n setResponseHeaders(response, headers)\n setHeadersList(headers, innerResponse.headersList)\n setHeadersGuard(headers, guard)\n\n // Note: If innerResponse's urlList contains a URL, it is a fetch response.\n if (innerResponse.urlList.length !== 0 && innerResponse.body?.stream) {\n // If the target (response) is reclaimed, the cleanup callback may be called at some point with\n // the held value provided for it (innerResponse.body.stream). The held value can be any value:\n // a primitive or an object, even undefined. If the held value is an object, the registry keeps\n // a strong reference to it (so it can pass it to the cleanup callback later). Reworded from\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n streamRegistry.register(response, new WeakRef(innerResponse.body.stream))\n }\n\n return response\n}\n\n// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit\nwebidl.converters.XMLHttpRequestBodyInit = function (V, prefix, name) {\n if (typeof V === 'string') {\n return webidl.converters.USVString(V, prefix, name)\n }\n\n if (webidl.is.Blob(V)) {\n return V\n }\n\n if (webidl.is.BufferSource(V)) {\n return V\n }\n\n if (webidl.is.FormData(V)) {\n return V\n }\n\n if (webidl.is.URLSearchParams(V)) {\n return V\n }\n\n return webidl.converters.DOMString(V, prefix, name)\n}\n\n// https://fetch.spec.whatwg.org/#bodyinit\nwebidl.converters.BodyInit = function (V, prefix, argument) {\n if (webidl.is.ReadableStream(V)) {\n return V\n }\n\n // Note: the spec doesn't include async iterables,\n // this is an undici extension.\n if (V?.[Symbol.asyncIterator]) {\n return V\n }\n\n return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument)\n}\n\nwebidl.converters.ResponseInit = webidl.dictionaryConverter([\n {\n key: 'status',\n converter: webidl.converters['unsigned short'],\n defaultValue: () => 200\n },\n {\n key: 'statusText',\n converter: webidl.converters.ByteString,\n defaultValue: () => ''\n },\n {\n key: 'headers',\n converter: webidl.converters.HeadersInit\n }\n])\n\nwebidl.is.Response = webidl.util.MakeTypeAssertion(Response)\n\nmodule.exports = {\n isNetworkError,\n makeNetworkError,\n makeResponse,\n makeAppropriateNetworkError,\n filterResponse,\n Response,\n cloneResponse,\n fromInnerResponse,\n getResponseState\n}\n", "/* globals AbortController */\n\n'use strict'\n\nconst { extractBody, mixinBody, cloneBody, bodyUnusable } = require('./body')\nconst { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require('./headers')\nconst util = require('../../core/util')\nconst nodeUtil = require('node:util')\nconst {\n isValidHTTPToken,\n sameOrigin,\n environmentSettingsObject\n} = require('./util')\nconst {\n forbiddenMethodsSet,\n corsSafeListedMethodsSet,\n referrerPolicy,\n requestRedirect,\n requestMode,\n requestCredentials,\n requestCache,\n requestDuplex\n} = require('./constants')\nconst { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util\nconst { webidl } = require('../webidl')\nconst { URLSerializer } = require('./data-url')\nconst { kConstruct } = require('../../core/symbols')\nconst assert = require('node:assert')\nconst { getMaxListeners, setMaxListeners, defaultMaxListeners } = require('node:events')\n\nconst kAbortController = Symbol('abortController')\n\nconst requestFinalizer = new FinalizationRegistry(({ signal, abort }) => {\n signal.removeEventListener('abort', abort)\n})\n\nconst dependentControllerMap = new WeakMap()\n\nlet abortSignalHasEventHandlerLeakWarning\n\ntry {\n abortSignalHasEventHandlerLeakWarning = getMaxListeners(new AbortController().signal) > 0\n} catch {\n abortSignalHasEventHandlerLeakWarning = false\n}\n\nfunction buildAbort (acRef) {\n return abort\n\n function abort () {\n const ac = acRef.deref()\n if (ac !== undefined) {\n // Currently, there is a problem with FinalizationRegistry.\n // https://github.com/nodejs/node/issues/49344\n // https://github.com/nodejs/node/issues/47748\n // In the case of abort, the first step is to unregister from it.\n // If the controller can refer to it, it is still registered.\n // It will be removed in the future.\n requestFinalizer.unregister(abort)\n\n // Unsubscribe a listener.\n // FinalizationRegistry will no longer be called, so this must be done.\n this.removeEventListener('abort', abort)\n\n ac.abort(this.reason)\n\n const controllerList = dependentControllerMap.get(ac.signal)\n\n if (controllerList !== undefined) {\n if (controllerList.size !== 0) {\n for (const ref of controllerList) {\n const ctrl = ref.deref()\n if (ctrl !== undefined) {\n ctrl.abort(this.reason)\n }\n }\n controllerList.clear()\n }\n dependentControllerMap.delete(ac.signal)\n }\n }\n }\n}\n\nlet patchMethodWarning = false\n\n// https://fetch.spec.whatwg.org/#request-class\nclass Request {\n /** @type {AbortSignal} */\n #signal\n\n /** @type {import('../../dispatcher/dispatcher')} */\n #dispatcher\n\n /** @type {Headers} */\n #headers\n\n #state\n\n // https://fetch.spec.whatwg.org/#dom-request\n constructor (input, init = undefined) {\n webidl.util.markAsUncloneable(this)\n\n if (input === kConstruct) {\n return\n }\n\n const prefix = 'Request constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n input = webidl.converters.RequestInfo(input)\n init = webidl.converters.RequestInit(init)\n\n // 1. Let request be null.\n let request = null\n\n // 2. Let fallbackMode be null.\n let fallbackMode = null\n\n // 3. Let baseURL be this\u2019s relevant settings object\u2019s API base URL.\n const baseUrl = environmentSettingsObject.settingsObject.baseUrl\n\n // 4. Let signal be null.\n let signal = null\n\n // 5. If input is a string, then:\n if (typeof input === 'string') {\n this.#dispatcher = init.dispatcher\n\n // 1. Let parsedURL be the result of parsing input with baseURL.\n // 2. If parsedURL is failure, then throw a TypeError.\n let parsedURL\n try {\n parsedURL = new URL(input, baseUrl)\n } catch (err) {\n throw new TypeError('Failed to parse URL from ' + input, { cause: err })\n }\n\n // 3. If parsedURL includes credentials, then throw a TypeError.\n if (parsedURL.username || parsedURL.password) {\n throw new TypeError(\n 'Request cannot be constructed from a URL that includes credentials: ' +\n input\n )\n }\n\n // 4. Set request to a new request whose URL is parsedURL.\n request = makeRequest({ urlList: [parsedURL] })\n\n // 5. Set fallbackMode to \"cors\".\n fallbackMode = 'cors'\n } else {\n // 6. Otherwise:\n\n // 7. Assert: input is a Request object.\n assert(webidl.is.Request(input))\n\n // 8. Set request to input\u2019s request.\n request = input.#state\n\n // 9. Set signal to input\u2019s signal.\n signal = input.#signal\n\n this.#dispatcher = init.dispatcher || input.#dispatcher\n }\n\n // 7. Let origin be this\u2019s relevant settings object\u2019s origin.\n const origin = environmentSettingsObject.settingsObject.origin\n\n // 8. Let window be \"client\".\n let window = 'client'\n\n // 9. If request\u2019s window is an environment settings object and its origin\n // is same origin with origin, then set window to request\u2019s window.\n if (\n request.window?.constructor?.name === 'EnvironmentSettingsObject' &&\n sameOrigin(request.window, origin)\n ) {\n window = request.window\n }\n\n // 10. If init[\"window\"] exists and is non-null, then throw a TypeError.\n if (init.window != null) {\n throw new TypeError(`'window' option '${window}' must be null`)\n }\n\n // 11. If init[\"window\"] exists, then set window to \"no-window\".\n if ('window' in init) {\n window = 'no-window'\n }\n\n // 12. Set request to a new request with the following properties:\n request = makeRequest({\n // URL request\u2019s URL.\n // undici implementation note: this is set as the first item in request's urlList in makeRequest\n // method request\u2019s method.\n method: request.method,\n // header list A copy of request\u2019s header list.\n // undici implementation note: headersList is cloned in makeRequest\n headersList: request.headersList,\n // unsafe-request flag Set.\n unsafeRequest: request.unsafeRequest,\n // client This\u2019s relevant settings object.\n client: environmentSettingsObject.settingsObject,\n // window window.\n window,\n // priority request\u2019s priority.\n priority: request.priority,\n // origin request\u2019s origin. The propagation of the origin is only significant for navigation requests\n // being handled by a service worker. In this scenario a request can have an origin that is different\n // from the current client.\n origin: request.origin,\n // referrer request\u2019s referrer.\n referrer: request.referrer,\n // referrer policy request\u2019s referrer policy.\n referrerPolicy: request.referrerPolicy,\n // mode request\u2019s mode.\n mode: request.mode,\n // credentials mode request\u2019s credentials mode.\n credentials: request.credentials,\n // cache mode request\u2019s cache mode.\n cache: request.cache,\n // redirect mode request\u2019s redirect mode.\n redirect: request.redirect,\n // integrity metadata request\u2019s integrity metadata.\n integrity: request.integrity,\n // keepalive request\u2019s keepalive.\n keepalive: request.keepalive,\n // reload-navigation flag request\u2019s reload-navigation flag.\n reloadNavigation: request.reloadNavigation,\n // history-navigation flag request\u2019s history-navigation flag.\n historyNavigation: request.historyNavigation,\n // URL list A clone of request\u2019s URL list.\n urlList: [...request.urlList]\n })\n\n const initHasKey = Object.keys(init).length !== 0\n\n // 13. If init is not empty, then:\n if (initHasKey) {\n // 1. If request\u2019s mode is \"navigate\", then set it to \"same-origin\".\n if (request.mode === 'navigate') {\n request.mode = 'same-origin'\n }\n\n // 2. Unset request\u2019s reload-navigation flag.\n request.reloadNavigation = false\n\n // 3. Unset request\u2019s history-navigation flag.\n request.historyNavigation = false\n\n // 4. Set request\u2019s origin to \"client\".\n request.origin = 'client'\n\n // 5. Set request\u2019s referrer to \"client\"\n request.referrer = 'client'\n\n // 6. Set request\u2019s referrer policy to the empty string.\n request.referrerPolicy = ''\n\n // 7. Set request\u2019s URL to request\u2019s current URL.\n request.url = request.urlList[request.urlList.length - 1]\n\n // 8. Set request\u2019s URL list to \u00AB request\u2019s URL \u00BB.\n request.urlList = [request.url]\n }\n\n // 14. If init[\"referrer\"] exists, then:\n if (init.referrer !== undefined) {\n // 1. Let referrer be init[\"referrer\"].\n const referrer = init.referrer\n\n // 2. If referrer is the empty string, then set request\u2019s referrer to \"no-referrer\".\n if (referrer === '') {\n request.referrer = 'no-referrer'\n } else {\n // 1. Let parsedReferrer be the result of parsing referrer with\n // baseURL.\n // 2. If parsedReferrer is failure, then throw a TypeError.\n let parsedReferrer\n try {\n parsedReferrer = new URL(referrer, baseUrl)\n } catch (err) {\n throw new TypeError(`Referrer \"${referrer}\" is not a valid URL.`, { cause: err })\n }\n\n // 3. If one of the following is true\n // - parsedReferrer\u2019s scheme is \"about\" and path is the string \"client\"\n // - parsedReferrer\u2019s origin is not same origin with origin\n // then set request\u2019s referrer to \"client\".\n if (\n (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') ||\n (origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl))\n ) {\n request.referrer = 'client'\n } else {\n // 4. Otherwise, set request\u2019s referrer to parsedReferrer.\n request.referrer = parsedReferrer\n }\n }\n }\n\n // 15. If init[\"referrerPolicy\"] exists, then set request\u2019s referrer policy\n // to it.\n if (init.referrerPolicy !== undefined) {\n request.referrerPolicy = init.referrerPolicy\n }\n\n // 16. Let mode be init[\"mode\"] if it exists, and fallbackMode otherwise.\n let mode\n if (init.mode !== undefined) {\n mode = init.mode\n } else {\n mode = fallbackMode\n }\n\n // 17. If mode is \"navigate\", then throw a TypeError.\n if (mode === 'navigate') {\n throw webidl.errors.exception({\n header: 'Request constructor',\n message: 'invalid request mode navigate.'\n })\n }\n\n // 18. If mode is non-null, set request\u2019s mode to mode.\n if (mode != null) {\n request.mode = mode\n }\n\n // 19. If init[\"credentials\"] exists, then set request\u2019s credentials mode\n // to it.\n if (init.credentials !== undefined) {\n request.credentials = init.credentials\n }\n\n // 18. If init[\"cache\"] exists, then set request\u2019s cache mode to it.\n if (init.cache !== undefined) {\n request.cache = init.cache\n }\n\n // 21. If request\u2019s cache mode is \"only-if-cached\" and request\u2019s mode is\n // not \"same-origin\", then throw a TypeError.\n if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') {\n throw new TypeError(\n \"'only-if-cached' can be set only with 'same-origin' mode\"\n )\n }\n\n // 22. If init[\"redirect\"] exists, then set request\u2019s redirect mode to it.\n if (init.redirect !== undefined) {\n request.redirect = init.redirect\n }\n\n // 23. If init[\"integrity\"] exists, then set request\u2019s integrity metadata to it.\n if (init.integrity != null) {\n request.integrity = String(init.integrity)\n }\n\n // 24. If init[\"keepalive\"] exists, then set request\u2019s keepalive to it.\n if (init.keepalive !== undefined) {\n request.keepalive = Boolean(init.keepalive)\n }\n\n // 25. If init[\"method\"] exists, then:\n if (init.method !== undefined) {\n // 1. Let method be init[\"method\"].\n let method = init.method\n\n const mayBeNormalized = normalizedMethodRecords[method]\n\n if (mayBeNormalized !== undefined) {\n // Note: Bypass validation DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH and these lowercase ones\n request.method = mayBeNormalized\n } else {\n // 2. If method is not a method or method is a forbidden method, then\n // throw a TypeError.\n if (!isValidHTTPToken(method)) {\n throw new TypeError(`'${method}' is not a valid HTTP method.`)\n }\n\n const upperCase = method.toUpperCase()\n\n if (forbiddenMethodsSet.has(upperCase)) {\n throw new TypeError(`'${method}' HTTP method is unsupported.`)\n }\n\n // 3. Normalize method.\n // https://fetch.spec.whatwg.org/#concept-method-normalize\n // Note: must be in uppercase\n method = normalizedMethodRecordsBase[upperCase] ?? method\n\n // 4. Set request\u2019s method to method.\n request.method = method\n }\n\n if (!patchMethodWarning && request.method === 'patch') {\n process.emitWarning('Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.', {\n code: 'UNDICI-FETCH-patch'\n })\n\n patchMethodWarning = true\n }\n }\n\n // 26. If init[\"signal\"] exists, then set signal to it.\n if (init.signal !== undefined) {\n signal = init.signal\n }\n\n // 27. Set this\u2019s request to request.\n this.#state = request\n\n // 28. Set this\u2019s signal to a new AbortSignal object with this\u2019s relevant\n // Realm.\n // TODO: could this be simplified with AbortSignal.any\n // (https://dom.spec.whatwg.org/#dom-abortsignal-any)\n const ac = new AbortController()\n this.#signal = ac.signal\n\n // 29. If signal is not null, then make this\u2019s signal follow signal.\n if (signal != null) {\n if (signal.aborted) {\n ac.abort(signal.reason)\n } else {\n // Keep a strong ref to ac while request object\n // is alive. This is needed to prevent AbortController\n // from being prematurely garbage collected.\n // See, https://github.com/nodejs/undici/issues/1926.\n this[kAbortController] = ac\n\n const acRef = new WeakRef(ac)\n const abort = buildAbort(acRef)\n\n // If the max amount of listeners is equal to the default, increase it\n if (abortSignalHasEventHandlerLeakWarning && getMaxListeners(signal) === defaultMaxListeners) {\n setMaxListeners(1500, signal)\n }\n\n util.addAbortListener(signal, abort)\n // The third argument must be a registry key to be unregistered.\n // Without it, you cannot unregister.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry\n // abort is used as the unregister key. (because it is unique)\n requestFinalizer.register(ac, { signal, abort }, abort)\n }\n }\n\n // 30. Set this\u2019s headers to a new Headers object with this\u2019s relevant\n // Realm, whose header list is request\u2019s header list and guard is\n // \"request\".\n this.#headers = new Headers(kConstruct)\n setHeadersList(this.#headers, request.headersList)\n setHeadersGuard(this.#headers, 'request')\n\n // 31. If this\u2019s request\u2019s mode is \"no-cors\", then:\n if (mode === 'no-cors') {\n // 1. If this\u2019s request\u2019s method is not a CORS-safelisted method,\n // then throw a TypeError.\n if (!corsSafeListedMethodsSet.has(request.method)) {\n throw new TypeError(\n `'${request.method} is unsupported in no-cors mode.`\n )\n }\n\n // 2. Set this\u2019s headers\u2019s guard to \"request-no-cors\".\n setHeadersGuard(this.#headers, 'request-no-cors')\n }\n\n // 32. If init is not empty, then:\n if (initHasKey) {\n /** @type {HeadersList} */\n const headersList = getHeadersList(this.#headers)\n // 1. Let headers be a copy of this\u2019s headers and its associated header\n // list.\n // 2. If init[\"headers\"] exists, then set headers to init[\"headers\"].\n const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList)\n\n // 3. Empty this\u2019s headers\u2019s header list.\n headersList.clear()\n\n // 4. If headers is a Headers object, then for each header in its header\n // list, append header\u2019s name/header\u2019s value to this\u2019s headers.\n if (headers instanceof HeadersList) {\n for (const { name, value } of headers.rawValues()) {\n headersList.append(name, value, false)\n }\n // Note: Copy the `set-cookie` meta-data.\n headersList.cookies = headers.cookies\n } else {\n // 5. Otherwise, fill this\u2019s headers with headers.\n fillHeaders(this.#headers, headers)\n }\n }\n\n // 33. Let inputBody be input\u2019s request\u2019s body if input is a Request\n // object; otherwise null.\n const inputBody = webidl.is.Request(input) ? input.#state.body : null\n\n // 34. If either init[\"body\"] exists and is non-null or inputBody is\n // non-null, and request\u2019s method is `GET` or `HEAD`, then throw a\n // TypeError.\n if (\n (init.body != null || inputBody != null) &&\n (request.method === 'GET' || request.method === 'HEAD')\n ) {\n throw new TypeError('Request with GET/HEAD method cannot have body.')\n }\n\n // 35. Let initBody be null.\n let initBody = null\n\n // 36. If init[\"body\"] exists and is non-null, then:\n if (init.body != null) {\n // 1. Let Content-Type be null.\n // 2. Set initBody and Content-Type to the result of extracting\n // init[\"body\"], with keepalive set to request\u2019s keepalive.\n const [extractedBody, contentType] = extractBody(\n init.body,\n request.keepalive\n )\n initBody = extractedBody\n\n // 3, If Content-Type is non-null and this\u2019s headers\u2019s header list does\n // not contain `Content-Type`, then append `Content-Type`/Content-Type to\n // this\u2019s headers.\n if (contentType && !getHeadersList(this.#headers).contains('content-type', true)) {\n this.#headers.append('content-type', contentType, true)\n }\n }\n\n // 37. Let inputOrInitBody be initBody if it is non-null; otherwise\n // inputBody.\n const inputOrInitBody = initBody ?? inputBody\n\n // 38. If inputOrInitBody is non-null and inputOrInitBody\u2019s source is\n // null, then:\n if (inputOrInitBody != null && inputOrInitBody.source == null) {\n // 1. If initBody is non-null and init[\"duplex\"] does not exist,\n // then throw a TypeError.\n if (initBody != null && init.duplex == null) {\n throw new TypeError('RequestInit: duplex option is required when sending a body.')\n }\n\n // 2. If this\u2019s request\u2019s mode is neither \"same-origin\" nor \"cors\",\n // then throw a TypeError.\n if (request.mode !== 'same-origin' && request.mode !== 'cors') {\n throw new TypeError(\n 'If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\"'\n )\n }\n\n // 3. Set this\u2019s request\u2019s use-CORS-preflight flag.\n request.useCORSPreflightFlag = true\n }\n\n // 39. Let finalBody be inputOrInitBody.\n let finalBody = inputOrInitBody\n\n // 40. If initBody is null and inputBody is non-null, then:\n if (initBody == null && inputBody != null) {\n // 1. If input is unusable, then throw a TypeError.\n if (bodyUnusable(input.#state)) {\n throw new TypeError(\n 'Cannot construct a Request with a Request object that has already been used.'\n )\n }\n\n // 2. Set finalBody to the result of creating a proxy for inputBody.\n // https://streams.spec.whatwg.org/#readablestream-create-a-proxy\n const identityTransform = new TransformStream()\n inputBody.stream.pipeThrough(identityTransform)\n finalBody = {\n source: inputBody.source,\n length: inputBody.length,\n stream: identityTransform.readable\n }\n }\n\n // 41. Set this\u2019s request\u2019s body to finalBody.\n this.#state.body = finalBody\n }\n\n // Returns request\u2019s HTTP method, which is \"GET\" by default.\n get method () {\n webidl.brandCheck(this, Request)\n\n // The method getter steps are to return this\u2019s request\u2019s method.\n return this.#state.method\n }\n\n // Returns the URL of request as a string.\n get url () {\n webidl.brandCheck(this, Request)\n\n // The url getter steps are to return this\u2019s request\u2019s URL, serialized.\n return URLSerializer(this.#state.url)\n }\n\n // Returns a Headers object consisting of the headers associated with request.\n // Note that headers added in the network layer by the user agent will not\n // be accounted for in this object, e.g., the \"Host\" header.\n get headers () {\n webidl.brandCheck(this, Request)\n\n // The headers getter steps are to return this\u2019s headers.\n return this.#headers\n }\n\n // Returns the kind of resource requested by request, e.g., \"document\"\n // or \"script\".\n get destination () {\n webidl.brandCheck(this, Request)\n\n // The destination getter are to return this\u2019s request\u2019s destination.\n return this.#state.destination\n }\n\n // Returns the referrer of request. Its value can be a same-origin URL if\n // explicitly set in init, the empty string to indicate no referrer, and\n // \"about:client\" when defaulting to the global\u2019s default. This is used\n // during fetching to determine the value of the `Referer` header of the\n // request being made.\n get referrer () {\n webidl.brandCheck(this, Request)\n\n // 1. If this\u2019s request\u2019s referrer is \"no-referrer\", then return the\n // empty string.\n if (this.#state.referrer === 'no-referrer') {\n return ''\n }\n\n // 2. If this\u2019s request\u2019s referrer is \"client\", then return\n // \"about:client\".\n if (this.#state.referrer === 'client') {\n return 'about:client'\n }\n\n // Return this\u2019s request\u2019s referrer, serialized.\n return this.#state.referrer.toString()\n }\n\n // Returns the referrer policy associated with request.\n // This is used during fetching to compute the value of the request\u2019s\n // referrer.\n get referrerPolicy () {\n webidl.brandCheck(this, Request)\n\n // The referrerPolicy getter steps are to return this\u2019s request\u2019s referrer policy.\n return this.#state.referrerPolicy\n }\n\n // Returns the mode associated with request, which is a string indicating\n // whether the request will use CORS, or will be restricted to same-origin\n // URLs.\n get mode () {\n webidl.brandCheck(this, Request)\n\n // The mode getter steps are to return this\u2019s request\u2019s mode.\n return this.#state.mode\n }\n\n // Returns the credentials mode associated with request,\n // which is a string indicating whether credentials will be sent with the\n // request always, never, or only when sent to a same-origin URL.\n get credentials () {\n webidl.brandCheck(this, Request)\n\n // The credentials getter steps are to return this\u2019s request\u2019s credentials mode.\n return this.#state.credentials\n }\n\n // Returns the cache mode associated with request,\n // which is a string indicating how the request will\n // interact with the browser\u2019s cache when fetching.\n get cache () {\n webidl.brandCheck(this, Request)\n\n // The cache getter steps are to return this\u2019s request\u2019s cache mode.\n return this.#state.cache\n }\n\n // Returns the redirect mode associated with request,\n // which is a string indicating how redirects for the\n // request will be handled during fetching. A request\n // will follow redirects by default.\n get redirect () {\n webidl.brandCheck(this, Request)\n\n // The redirect getter steps are to return this\u2019s request\u2019s redirect mode.\n return this.#state.redirect\n }\n\n // Returns request\u2019s subresource integrity metadata, which is a\n // cryptographic hash of the resource being fetched. Its value\n // consists of multiple hashes separated by whitespace. [SRI]\n get integrity () {\n webidl.brandCheck(this, Request)\n\n // The integrity getter steps are to return this\u2019s request\u2019s integrity\n // metadata.\n return this.#state.integrity\n }\n\n // Returns a boolean indicating whether or not request can outlive the\n // global in which it was created.\n get keepalive () {\n webidl.brandCheck(this, Request)\n\n // The keepalive getter steps are to return this\u2019s request\u2019s keepalive.\n return this.#state.keepalive\n }\n\n // Returns a boolean indicating whether or not request is for a reload\n // navigation.\n get isReloadNavigation () {\n webidl.brandCheck(this, Request)\n\n // The isReloadNavigation getter steps are to return true if this\u2019s\n // request\u2019s reload-navigation flag is set; otherwise false.\n return this.#state.reloadNavigation\n }\n\n // Returns a boolean indicating whether or not request is for a history\n // navigation (a.k.a. back-forward navigation).\n get isHistoryNavigation () {\n webidl.brandCheck(this, Request)\n\n // The isHistoryNavigation getter steps are to return true if this\u2019s request\u2019s\n // history-navigation flag is set; otherwise false.\n return this.#state.historyNavigation\n }\n\n // Returns the signal associated with request, which is an AbortSignal\n // object indicating whether or not request has been aborted, and its\n // abort event handler.\n get signal () {\n webidl.brandCheck(this, Request)\n\n // The signal getter steps are to return this\u2019s signal.\n return this.#signal\n }\n\n get body () {\n webidl.brandCheck(this, Request)\n\n return this.#state.body ? this.#state.body.stream : null\n }\n\n get bodyUsed () {\n webidl.brandCheck(this, Request)\n\n return !!this.#state.body && util.isDisturbed(this.#state.body.stream)\n }\n\n get duplex () {\n webidl.brandCheck(this, Request)\n\n return 'half'\n }\n\n // Returns a clone of request.\n clone () {\n webidl.brandCheck(this, Request)\n\n // 1. If this is unusable, then throw a TypeError.\n if (bodyUnusable(this.#state)) {\n throw new TypeError('unusable')\n }\n\n // 2. Let clonedRequest be the result of cloning this\u2019s request.\n const clonedRequest = cloneRequest(this.#state)\n\n // 3. Let clonedRequestObject be the result of creating a Request object,\n // given clonedRequest, this\u2019s headers\u2019s guard, and this\u2019s relevant Realm.\n // 4. Make clonedRequestObject\u2019s signal follow this\u2019s signal.\n const ac = new AbortController()\n if (this.signal.aborted) {\n ac.abort(this.signal.reason)\n } else {\n let list = dependentControllerMap.get(this.signal)\n if (list === undefined) {\n list = new Set()\n dependentControllerMap.set(this.signal, list)\n }\n const acRef = new WeakRef(ac)\n list.add(acRef)\n util.addAbortListener(\n ac.signal,\n buildAbort(acRef)\n )\n }\n\n // 4. Return clonedRequestObject.\n return fromInnerRequest(clonedRequest, this.#dispatcher, ac.signal, getHeadersGuard(this.#headers))\n }\n\n [nodeUtil.inspect.custom] (depth, options) {\n if (options.depth === null) {\n options.depth = 2\n }\n\n options.colors ??= true\n\n const properties = {\n method: this.method,\n url: this.url,\n headers: this.headers,\n destination: this.destination,\n referrer: this.referrer,\n referrerPolicy: this.referrerPolicy,\n mode: this.mode,\n credentials: this.credentials,\n cache: this.cache,\n redirect: this.redirect,\n integrity: this.integrity,\n keepalive: this.keepalive,\n isReloadNavigation: this.isReloadNavigation,\n isHistoryNavigation: this.isHistoryNavigation,\n signal: this.signal\n }\n\n return `Request ${nodeUtil.formatWithOptions(options, properties)}`\n }\n\n /**\n * @param {Request} request\n * @param {AbortSignal} newSignal\n */\n static setRequestSignal (request, newSignal) {\n request.#signal = newSignal\n return request\n }\n\n /**\n * @param {Request} request\n */\n static getRequestDispatcher (request) {\n return request.#dispatcher\n }\n\n /**\n * @param {Request} request\n * @param {import('../../dispatcher/dispatcher')} newDispatcher\n */\n static setRequestDispatcher (request, newDispatcher) {\n request.#dispatcher = newDispatcher\n }\n\n /**\n * @param {Request} request\n * @param {Headers} newHeaders\n */\n static setRequestHeaders (request, newHeaders) {\n request.#headers = newHeaders\n }\n\n /**\n * @param {Request} request\n */\n static getRequestState (request) {\n return request.#state\n }\n\n /**\n * @param {Request} request\n * @param {any} newState\n */\n static setRequestState (request, newState) {\n request.#state = newState\n }\n}\n\nconst { setRequestSignal, getRequestDispatcher, setRequestDispatcher, setRequestHeaders, getRequestState, setRequestState } = Request\nReflect.deleteProperty(Request, 'setRequestSignal')\nReflect.deleteProperty(Request, 'getRequestDispatcher')\nReflect.deleteProperty(Request, 'setRequestDispatcher')\nReflect.deleteProperty(Request, 'setRequestHeaders')\nReflect.deleteProperty(Request, 'getRequestState')\nReflect.deleteProperty(Request, 'setRequestState')\n\nmixinBody(Request, getRequestState)\n\n// https://fetch.spec.whatwg.org/#requests\nfunction makeRequest (init) {\n return {\n method: init.method ?? 'GET',\n localURLsOnly: init.localURLsOnly ?? false,\n unsafeRequest: init.unsafeRequest ?? false,\n body: init.body ?? null,\n client: init.client ?? null,\n reservedClient: init.reservedClient ?? null,\n replacesClientId: init.replacesClientId ?? '',\n window: init.window ?? 'client',\n keepalive: init.keepalive ?? false,\n serviceWorkers: init.serviceWorkers ?? 'all',\n initiator: init.initiator ?? '',\n destination: init.destination ?? '',\n priority: init.priority ?? null,\n origin: init.origin ?? 'client',\n policyContainer: init.policyContainer ?? 'client',\n referrer: init.referrer ?? 'client',\n referrerPolicy: init.referrerPolicy ?? '',\n mode: init.mode ?? 'no-cors',\n useCORSPreflightFlag: init.useCORSPreflightFlag ?? false,\n credentials: init.credentials ?? 'same-origin',\n useCredentials: init.useCredentials ?? false,\n cache: init.cache ?? 'default',\n redirect: init.redirect ?? 'follow',\n integrity: init.integrity ?? '',\n cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? '',\n parserMetadata: init.parserMetadata ?? '',\n reloadNavigation: init.reloadNavigation ?? false,\n historyNavigation: init.historyNavigation ?? false,\n userActivation: init.userActivation ?? false,\n taintedOrigin: init.taintedOrigin ?? false,\n redirectCount: init.redirectCount ?? 0,\n responseTainting: init.responseTainting ?? 'basic',\n preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false,\n done: init.done ?? false,\n timingAllowFailed: init.timingAllowFailed ?? false,\n useURLCredentials: init.useURLCredentials ?? undefined,\n traversableForUserPrompts: init.traversableForUserPrompts ?? 'client',\n urlList: init.urlList,\n url: init.urlList[0],\n headersList: init.headersList\n ? new HeadersList(init.headersList)\n : new HeadersList()\n }\n}\n\n// https://fetch.spec.whatwg.org/#concept-request-clone\nfunction cloneRequest (request) {\n // To clone a request request, run these steps:\n\n // 1. Let newRequest be a copy of request, except for its body.\n const newRequest = makeRequest({ ...request, body: null })\n\n // 2. If request\u2019s body is non-null, set newRequest\u2019s body to the\n // result of cloning request\u2019s body.\n if (request.body != null) {\n newRequest.body = cloneBody(request.body)\n }\n\n // 3. Return newRequest.\n return newRequest\n}\n\n/**\n * @see https://fetch.spec.whatwg.org/#request-create\n * @param {any} innerRequest\n * @param {import('../../dispatcher/agent')} dispatcher\n * @param {AbortSignal} signal\n * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard\n * @returns {Request}\n */\nfunction fromInnerRequest (innerRequest, dispatcher, signal, guard) {\n const request = new Request(kConstruct)\n setRequestState(request, innerRequest)\n setRequestDispatcher(request, dispatcher)\n setRequestSignal(request, signal)\n const headers = new Headers(kConstruct)\n setRequestHeaders(request, headers)\n setHeadersList(headers, innerRequest.headersList)\n setHeadersGuard(headers, guard)\n return request\n}\n\nObject.defineProperties(Request.prototype, {\n method: kEnumerableProperty,\n url: kEnumerableProperty,\n headers: kEnumerableProperty,\n redirect: kEnumerableProperty,\n clone: kEnumerableProperty,\n signal: kEnumerableProperty,\n duplex: kEnumerableProperty,\n destination: kEnumerableProperty,\n body: kEnumerableProperty,\n bodyUsed: kEnumerableProperty,\n isHistoryNavigation: kEnumerableProperty,\n isReloadNavigation: kEnumerableProperty,\n keepalive: kEnumerableProperty,\n integrity: kEnumerableProperty,\n cache: kEnumerableProperty,\n credentials: kEnumerableProperty,\n attribute: kEnumerableProperty,\n referrerPolicy: kEnumerableProperty,\n referrer: kEnumerableProperty,\n mode: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'Request',\n configurable: true\n }\n})\n\nwebidl.is.Request = webidl.util.MakeTypeAssertion(Request)\n\n/**\n * @param {*} V\n * @returns {import('../../../types/fetch').Request|string}\n *\n * @see https://fetch.spec.whatwg.org/#requestinfo\n */\nwebidl.converters.RequestInfo = function (V) {\n if (typeof V === 'string') {\n return webidl.converters.USVString(V)\n }\n\n if (webidl.is.Request(V)) {\n return V\n }\n\n return webidl.converters.USVString(V)\n}\n\n/**\n * @param {*} V\n * @returns {import('../../../types/fetch').RequestInit}\n * @see https://fetch.spec.whatwg.org/#requestinit\n */\nwebidl.converters.RequestInit = webidl.dictionaryConverter([\n {\n key: 'method',\n converter: webidl.converters.ByteString\n },\n {\n key: 'headers',\n converter: webidl.converters.HeadersInit\n },\n {\n key: 'body',\n converter: webidl.nullableConverter(\n webidl.converters.BodyInit\n )\n },\n {\n key: 'referrer',\n converter: webidl.converters.USVString\n },\n {\n key: 'referrerPolicy',\n converter: webidl.converters.DOMString,\n // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy\n allowedValues: referrerPolicy\n },\n {\n key: 'mode',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#concept-request-mode\n allowedValues: requestMode\n },\n {\n key: 'credentials',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestcredentials\n allowedValues: requestCredentials\n },\n {\n key: 'cache',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestcache\n allowedValues: requestCache\n },\n {\n key: 'redirect',\n converter: webidl.converters.DOMString,\n // https://fetch.spec.whatwg.org/#requestredirect\n allowedValues: requestRedirect\n },\n {\n key: 'integrity',\n converter: webidl.converters.DOMString\n },\n {\n key: 'keepalive',\n converter: webidl.converters.boolean\n },\n {\n key: 'signal',\n converter: webidl.nullableConverter(\n (signal) => webidl.converters.AbortSignal(\n signal,\n 'RequestInit',\n 'signal'\n )\n )\n },\n {\n key: 'window',\n converter: webidl.converters.any\n },\n {\n key: 'duplex',\n converter: webidl.converters.DOMString,\n allowedValues: requestDuplex\n },\n {\n key: 'dispatcher', // undici specific option\n converter: webidl.converters.any\n },\n {\n key: 'priority',\n converter: webidl.converters.DOMString,\n allowedValues: ['high', 'low', 'auto'],\n defaultValue: () => 'auto'\n }\n])\n\nmodule.exports = {\n Request,\n makeRequest,\n fromInnerRequest,\n cloneRequest,\n getRequestDispatcher,\n getRequestState\n}\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { runtimeFeatures } = require('../../util/runtime-features.js')\n\n/**\n * @typedef {object} Metadata\n * @property {SRIHashAlgorithm} alg - The algorithm used for the hash.\n * @property {string} val - The base64-encoded hash value.\n */\n\n/**\n * @typedef {Metadata[]} MetadataList\n */\n\n/**\n * @typedef {('sha256' | 'sha384' | 'sha512')} SRIHashAlgorithm\n */\n\n/**\n * @type {Map}\n *\n * The valid SRI hash algorithm token set is the ordered set \u00AB \"sha256\",\n * \"sha384\", \"sha512\" \u00BB (corresponding to SHA-256, SHA-384, and SHA-512\n * respectively). The ordering of this set is meaningful, with stronger\n * algorithms appearing later in the set.\n *\n * @see https://w3c.github.io/webappsec-subresource-integrity/#valid-sri-hash-algorithm-token-set\n */\nconst validSRIHashAlgorithmTokenSet = new Map([['sha256', 0], ['sha384', 1], ['sha512', 2]])\n\n// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable\n/** @type {import('node:crypto')} */\nlet crypto\n\nif (runtimeFeatures.has('crypto')) {\n crypto = require('node:crypto')\n const cryptoHashes = crypto.getHashes()\n\n // If no hashes are available, we cannot support SRI.\n if (cryptoHashes.length === 0) {\n validSRIHashAlgorithmTokenSet.clear()\n }\n\n for (const algorithm of validSRIHashAlgorithmTokenSet.keys()) {\n // If the algorithm is not supported, remove it from the list.\n if (cryptoHashes.includes(algorithm) === false) {\n validSRIHashAlgorithmTokenSet.delete(algorithm)\n }\n }\n} else {\n // If crypto is not available, we cannot support SRI.\n validSRIHashAlgorithmTokenSet.clear()\n}\n\n/**\n * @typedef GetSRIHashAlgorithmIndex\n * @type {(algorithm: SRIHashAlgorithm) => number}\n * @param {SRIHashAlgorithm} algorithm\n * @returns {number} The index of the algorithm in the valid SRI hash algorithm\n * token set.\n */\n\nconst getSRIHashAlgorithmIndex = /** @type {GetSRIHashAlgorithmIndex} */ (Map.prototype.get.bind(\n validSRIHashAlgorithmTokenSet))\n\n/**\n * @typedef IsValidSRIHashAlgorithm\n * @type {(algorithm: string) => algorithm is SRIHashAlgorithm}\n * @param {*} algorithm\n * @returns {algorithm is SRIHashAlgorithm}\n */\n\nconst isValidSRIHashAlgorithm = /** @type {IsValidSRIHashAlgorithm} */ (\n Map.prototype.has.bind(validSRIHashAlgorithmTokenSet)\n)\n\n/**\n * @param {Uint8Array} bytes\n * @param {string} metadataList\n * @returns {boolean}\n *\n * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist\n */\nconst bytesMatch = runtimeFeatures.has('crypto') === false || validSRIHashAlgorithmTokenSet.size === 0\n // If node is not built with OpenSSL support, we cannot check\n // a request's integrity, so allow it by default (the spec will\n // allow requests if an invalid hash is given, as precedence).\n ? () => true\n : (bytes, metadataList) => {\n // 1. Let parsedMetadata be the result of parsing metadataList.\n const parsedMetadata = parseMetadata(metadataList)\n\n // 2. If parsedMetadata is empty set, return true.\n if (parsedMetadata.length === 0) {\n return true\n }\n\n // 3. Let metadata be the result of getting the strongest\n // metadata from parsedMetadata.\n const metadata = getStrongestMetadata(parsedMetadata)\n\n // 4. For each item in metadata:\n for (const item of metadata) {\n // 1. Let algorithm be the item[\"alg\"].\n const algorithm = item.alg\n\n // 2. Let expectedValue be the item[\"val\"].\n const expectedValue = item.val\n\n // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e\n // \"be liberal with padding\". This is annoying, and it's not even in the spec.\n\n // 3. Let actualValue be the result of applying algorithm to bytes .\n const actualValue = applyAlgorithmToBytes(algorithm, bytes)\n\n // 4. If actualValue is a case-sensitive match for expectedValue,\n // return true.\n if (caseSensitiveMatch(actualValue, expectedValue)) {\n return true\n }\n }\n\n // 5. Return false.\n return false\n }\n\n/**\n * @param {MetadataList} metadataList\n * @returns {MetadataList} The strongest hash algorithm from the metadata list.\n */\nfunction getStrongestMetadata (metadataList) {\n // 1. Let result be the empty set and strongest be the empty string.\n const result = []\n /** @type {Metadata|null} */\n let strongest = null\n\n // 2. For each item in set:\n for (const item of metadataList) {\n // 1. Assert: item[\"alg\"] is a valid SRI hash algorithm token.\n assert(isValidSRIHashAlgorithm(item.alg), 'Invalid SRI hash algorithm token')\n\n // 2. If result is the empty set, then:\n if (result.length === 0) {\n // 1. Append item to result.\n result.push(item)\n\n // 2. Set strongest to item.\n strongest = item\n\n // 3. Continue.\n continue\n }\n\n // 3. Let currentAlgorithm be strongest[\"alg\"], and currentAlgorithmIndex be\n // the index of currentAlgorithm in the valid SRI hash algorithm token set.\n const currentAlgorithm = /** @type {Metadata} */ (strongest).alg\n const currentAlgorithmIndex = getSRIHashAlgorithmIndex(currentAlgorithm)\n\n // 4. Let newAlgorithm be the item[\"alg\"], and newAlgorithmIndex be the\n // index of newAlgorithm in the valid SRI hash algorithm token set.\n const newAlgorithm = item.alg\n const newAlgorithmIndex = getSRIHashAlgorithmIndex(newAlgorithm)\n\n // 5. If newAlgorithmIndex is less than currentAlgorithmIndex, then continue.\n if (newAlgorithmIndex < currentAlgorithmIndex) {\n continue\n\n // 6. Otherwise, if newAlgorithmIndex is greater than\n // currentAlgorithmIndex:\n } else if (newAlgorithmIndex > currentAlgorithmIndex) {\n // 1. Set strongest to item.\n strongest = item\n\n // 2. Set result to \u00AB item \u00BB.\n result[0] = item\n result.length = 1\n\n // 7. Otherwise, newAlgorithmIndex and currentAlgorithmIndex are the same\n // value. Append item to result.\n } else {\n result.push(item)\n }\n }\n\n // 3. Return result.\n return result\n}\n\n/**\n * @param {string} metadata\n * @returns {MetadataList}\n *\n * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata\n */\nfunction parseMetadata (metadata) {\n // 1. Let result be the empty set.\n /** @type {MetadataList} */\n const result = []\n\n // 2. For each item returned by splitting metadata on spaces:\n for (const item of metadata.split(' ')) {\n // 1. Let expression-and-options be the result of splitting item on U+003F (?).\n const expressionAndOptions = item.split('?', 1)\n\n // 2. Let algorithm-expression be expression-and-options[0].\n const algorithmExpression = expressionAndOptions[0]\n\n // 3. Let base64-value be the empty string.\n let base64Value = ''\n\n // 4. Let algorithm-and-value be the result of splitting algorithm-expression on U+002D (-).\n const algorithmAndValue = [algorithmExpression.slice(0, 6), algorithmExpression.slice(7)]\n\n // 5. Let algorithm be algorithm-and-value[0].\n const algorithm = algorithmAndValue[0]\n\n // 6. If algorithm is not a valid SRI hash algorithm token, then continue.\n if (!isValidSRIHashAlgorithm(algorithm)) {\n continue\n }\n\n // 7. If algorithm-and-value[1] exists, set base64-value to\n // algorithm-and-value[1].\n if (algorithmAndValue[1]) {\n base64Value = algorithmAndValue[1]\n }\n\n // 8. Let metadata be the ordered map\n // \u00AB[\"alg\" \u2192 algorithm, \"val\" \u2192 base64-value]\u00BB.\n const metadata = {\n alg: algorithm,\n val: base64Value\n }\n\n // 9. Append metadata to result.\n result.push(metadata)\n }\n\n // 3. Return result.\n return result\n}\n\n/**\n * Applies the specified hash algorithm to the given bytes\n *\n * @typedef {(algorithm: SRIHashAlgorithm, bytes: Uint8Array) => string} ApplyAlgorithmToBytes\n * @param {SRIHashAlgorithm} algorithm\n * @param {Uint8Array} bytes\n * @returns {string}\n */\nconst applyAlgorithmToBytes = (algorithm, bytes) => {\n return crypto.hash(algorithm, bytes, 'base64')\n}\n\n/**\n * Compares two base64 strings, allowing for base64url\n * in the second string.\n *\n * @param {string} actualValue base64 encoded string\n * @param {string} expectedValue base64 or base64url encoded string\n * @returns {boolean}\n */\nfunction caseSensitiveMatch (actualValue, expectedValue) {\n // Ignore padding characters from the end of the strings by\n // decreasing the length by 1 or 2 if the last characters are `=`.\n let actualValueLength = actualValue.length\n if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === '=') {\n actualValueLength -= 1\n }\n if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === '=') {\n actualValueLength -= 1\n }\n let expectedValueLength = expectedValue.length\n if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === '=') {\n expectedValueLength -= 1\n }\n if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === '=') {\n expectedValueLength -= 1\n }\n\n if (actualValueLength !== expectedValueLength) {\n return false\n }\n\n for (let i = 0; i < actualValueLength; ++i) {\n if (\n actualValue[i] === expectedValue[i] ||\n (actualValue[i] === '+' && expectedValue[i] === '-') ||\n (actualValue[i] === '/' && expectedValue[i] === '_')\n ) {\n continue\n }\n return false\n }\n\n return true\n}\n\nmodule.exports = {\n applyAlgorithmToBytes,\n bytesMatch,\n caseSensitiveMatch,\n isValidSRIHashAlgorithm,\n getStrongestMetadata,\n parseMetadata\n}\n", "// https://github.com/Ethan-Arrowood/undici-fetch\n\n'use strict'\n\nconst {\n makeNetworkError,\n makeAppropriateNetworkError,\n filterResponse,\n makeResponse,\n fromInnerResponse,\n getResponseState\n} = require('./response')\nconst { HeadersList } = require('./headers')\nconst { Request, cloneRequest, getRequestDispatcher, getRequestState } = require('./request')\nconst zlib = require('node:zlib')\nconst {\n makePolicyContainer,\n clonePolicyContainer,\n requestBadPort,\n TAOCheck,\n appendRequestOriginHeader,\n responseLocationURL,\n requestCurrentURL,\n setRequestReferrerPolicyOnRedirect,\n tryUpgradeRequestToAPotentiallyTrustworthyURL,\n createOpaqueTimingInfo,\n appendFetchMetadata,\n corsCheck,\n crossOriginResourcePolicyCheck,\n determineRequestsReferrer,\n coarsenedSharedCurrentTime,\n sameOrigin,\n isCancelled,\n isAborted,\n isErrorLike,\n fullyReadBody,\n readableStreamClose,\n urlIsLocal,\n urlIsHttpHttpsScheme,\n urlHasHttpsScheme,\n clampAndCoarsenConnectionTimingInfo,\n simpleRangeHeaderValue,\n buildContentRange,\n createInflate,\n extractMimeType,\n hasAuthenticationEntry,\n includesCredentials,\n isTraversableNavigable\n} = require('./util')\nconst assert = require('node:assert')\nconst { safelyExtractBody, extractBody } = require('./body')\nconst {\n redirectStatusSet,\n nullBodyStatus,\n safeMethodsSet,\n requestBodyHeader,\n subresourceSet\n} = require('./constants')\nconst EE = require('node:events')\nconst { Readable, pipeline, finished, isErrored, isReadable } = require('node:stream')\nconst { addAbortListener, bufferToLowerCasedHeaderName } = require('../../core/util')\nconst { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require('./data-url')\nconst { getGlobalDispatcher } = require('../../global')\nconst { webidl } = require('../webidl')\nconst { STATUS_CODES } = require('node:http')\nconst { bytesMatch } = require('../subresource-integrity/subresource-integrity')\nconst { createDeferredPromise } = require('../../util/promise')\nconst { isomorphicEncode } = require('../infra')\nconst { runtimeFeatures } = require('../../util/runtime-features')\n\n// Node.js v23.8.0+ and v22.15.0+ supports Zstandard\nconst hasZstd = runtimeFeatures.has('zstd')\n\nconst GET_OR_HEAD = ['GET', 'HEAD']\n\nconst defaultUserAgent = typeof __UNDICI_IS_NODE__ !== 'undefined' || typeof esbuildDetection !== 'undefined'\n ? 'node'\n : 'undici'\n\n/** @type {import('buffer').resolveObjectURL} */\nlet resolveObjectURL\n\nclass Fetch extends EE {\n constructor (dispatcher) {\n super()\n\n this.dispatcher = dispatcher\n this.connection = null\n this.dump = false\n this.state = 'ongoing'\n }\n\n terminate (reason) {\n if (this.state !== 'ongoing') {\n return\n }\n\n this.state = 'terminated'\n this.connection?.destroy(reason)\n this.emit('terminated', reason)\n }\n\n // https://fetch.spec.whatwg.org/#fetch-controller-abort\n abort (error) {\n if (this.state !== 'ongoing') {\n return\n }\n\n // 1. Set controller\u2019s state to \"aborted\".\n this.state = 'aborted'\n\n // 2. Let fallbackError be an \"AbortError\" DOMException.\n // 3. Set error to fallbackError if it is not given.\n if (!error) {\n error = new DOMException('The operation was aborted.', 'AbortError')\n }\n\n // 4. Let serializedError be StructuredSerialize(error).\n // If that threw an exception, catch it, and let\n // serializedError be StructuredSerialize(fallbackError).\n\n // 5. Set controller\u2019s serialized abort reason to serializedError.\n this.serializedAbortReason = error\n\n this.connection?.destroy(error)\n this.emit('terminated', error)\n }\n}\n\nfunction handleFetchDone (response) {\n finalizeAndReportTiming(response, 'fetch')\n}\n\n// https://fetch.spec.whatwg.org/#fetch-method\nfunction fetch (input, init = undefined) {\n webidl.argumentLengthCheck(arguments, 1, 'globalThis.fetch')\n\n // 1. Let p be a new promise.\n let p = createDeferredPromise()\n\n // 2. Let requestObject be the result of invoking the initial value of\n // Request as constructor with input and init as arguments. If this throws\n // an exception, reject p with it and return p.\n let requestObject\n\n try {\n requestObject = new Request(input, init)\n } catch (e) {\n p.reject(e)\n return p.promise\n }\n\n // 3. Let request be requestObject\u2019s request.\n const request = getRequestState(requestObject)\n\n // 4. If requestObject\u2019s signal\u2019s aborted flag is set, then:\n if (requestObject.signal.aborted) {\n // 1. Abort the fetch() call with p, request, null, and\n // requestObject\u2019s signal\u2019s abort reason.\n abortFetch(p, request, null, requestObject.signal.reason, null)\n\n // 2. Return p.\n return p.promise\n }\n\n // 5. Let globalObject be request\u2019s client\u2019s global object.\n const globalObject = request.client.globalObject\n\n // 6. If globalObject is a ServiceWorkerGlobalScope object, then set\n // request\u2019s service-workers mode to \"none\".\n if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') {\n request.serviceWorkers = 'none'\n }\n\n // 7. Let responseObject be null.\n let responseObject = null\n\n // 8. Let relevantRealm be this\u2019s relevant Realm.\n\n // 9. Let locallyAborted be false.\n let locallyAborted = false\n\n // 10. Let controller be null.\n let controller = null\n\n // 11. Add the following abort steps to requestObject\u2019s signal:\n addAbortListener(\n requestObject.signal,\n () => {\n // 1. Set locallyAborted to true.\n locallyAborted = true\n\n // 2. Assert: controller is non-null.\n assert(controller != null)\n\n // 3. Abort controller with requestObject\u2019s signal\u2019s abort reason.\n controller.abort(requestObject.signal.reason)\n\n const realResponse = responseObject?.deref()\n\n // 4. Abort the fetch() call with p, request, responseObject,\n // and requestObject\u2019s signal\u2019s abort reason.\n abortFetch(p, request, realResponse, requestObject.signal.reason, controller.controller)\n }\n )\n\n // 12. Let handleFetchDone given response response be to finalize and\n // report timing with response, globalObject, and \"fetch\".\n // see function handleFetchDone\n\n // 13. Set controller to the result of calling fetch given request,\n // with processResponseEndOfBody set to handleFetchDone, and processResponse\n // given response being these substeps:\n\n const processResponse = (response) => {\n // 1. If locallyAborted is true, terminate these substeps.\n if (locallyAborted) {\n return\n }\n\n // 2. If response\u2019s aborted flag is set, then:\n if (response.aborted) {\n // 1. Let deserializedError be the result of deserialize a serialized\n // abort reason given controller\u2019s serialized abort reason and\n // relevantRealm.\n\n // 2. Abort the fetch() call with p, request, responseObject, and\n // deserializedError.\n\n abortFetch(p, request, responseObject, controller.serializedAbortReason, controller.controller)\n return\n }\n\n // 3. If response is a network error, then reject p with a TypeError\n // and terminate these substeps.\n if (response.type === 'error') {\n p.reject(new TypeError('fetch failed', { cause: response.error }))\n return\n }\n\n // 4. Set responseObject to the result of creating a Response object,\n // given response, \"immutable\", and relevantRealm.\n responseObject = new WeakRef(fromInnerResponse(response, 'immutable'))\n\n // 5. Resolve p with responseObject.\n p.resolve(responseObject.deref())\n p = null\n }\n\n controller = fetching({\n request,\n processResponseEndOfBody: handleFetchDone,\n processResponse,\n dispatcher: getRequestDispatcher(requestObject), // undici\n // Keep requestObject alive to prevent its AbortController from being GC'd\n // See https://github.com/nodejs/undici/issues/4627\n requestObject\n })\n\n // 14. Return p.\n return p.promise\n}\n\n// https://fetch.spec.whatwg.org/#finalize-and-report-timing\nfunction finalizeAndReportTiming (response, initiatorType = 'other') {\n // 1. If response is an aborted network error, then return.\n if (response.type === 'error' && response.aborted) {\n return\n }\n\n // 2. If response\u2019s URL list is null or empty, then return.\n if (!response.urlList?.length) {\n return\n }\n\n // 3. Let originalURL be response\u2019s URL list[0].\n const originalURL = response.urlList[0]\n\n // 4. Let timingInfo be response\u2019s timing info.\n let timingInfo = response.timingInfo\n\n // 5. Let cacheState be response\u2019s cache state.\n let cacheState = response.cacheState\n\n // 6. If originalURL\u2019s scheme is not an HTTP(S) scheme, then return.\n if (!urlIsHttpHttpsScheme(originalURL)) {\n return\n }\n\n // 7. If timingInfo is null, then return.\n if (timingInfo === null) {\n return\n }\n\n // 8. If response\u2019s timing allow passed flag is not set, then:\n if (!response.timingAllowPassed) {\n // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo.\n timingInfo = createOpaqueTimingInfo({\n startTime: timingInfo.startTime\n })\n\n // 2. Set cacheState to the empty string.\n cacheState = ''\n }\n\n // 9. Set timingInfo\u2019s end time to the coarsened shared current time\n // given global\u2019s relevant settings object\u2019s cross-origin isolated\n // capability.\n // TODO: given global\u2019s relevant settings object\u2019s cross-origin isolated\n // capability?\n timingInfo.endTime = coarsenedSharedCurrentTime()\n\n // 10. Set response\u2019s timing info to timingInfo.\n response.timingInfo = timingInfo\n\n // 11. Mark resource timing for timingInfo, originalURL, initiatorType,\n // global, and cacheState.\n markResourceTiming(\n timingInfo,\n originalURL.href,\n initiatorType,\n globalThis,\n cacheState,\n '', // bodyType\n response.status\n )\n}\n\n// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing\nconst markResourceTiming = performance.markResourceTiming\n\n// https://fetch.spec.whatwg.org/#abort-fetch\nfunction abortFetch (p, request, responseObject, error, controller /* undici-specific */) {\n // 1. Reject promise with error.\n if (p) {\n // We might have already resolved the promise at this stage\n p.reject(error)\n }\n\n // 2. If request\u2019s body is not null and is readable, then cancel request\u2019s\n // body with error.\n if (request.body?.stream != null && isReadable(request.body.stream)) {\n request.body.stream.cancel(error).catch((err) => {\n if (err.code === 'ERR_INVALID_STATE') {\n // Node bug?\n return\n }\n throw err\n })\n }\n\n // 3. If responseObject is null, then return.\n if (responseObject == null) {\n return\n }\n\n // 4. Let response be responseObject\u2019s response.\n const response = getResponseState(responseObject)\n\n // 5. If response\u2019s body is not null and is readable, then error response\u2019s\n // body with error.\n if (response.body?.stream != null && isReadable(response.body.stream)) {\n controller.error(error)\n }\n}\n\n// https://fetch.spec.whatwg.org/#fetching\nfunction fetching ({\n request,\n processRequestBodyChunkLength,\n processRequestEndOfBody,\n processResponse,\n processResponseEndOfBody,\n processResponseConsumeBody,\n useParallelQueue = false,\n dispatcher = getGlobalDispatcher(), // undici\n requestObject = null // Keep alive to prevent AbortController GC, see #4627\n}) {\n // Ensure that the dispatcher is set accordingly\n assert(dispatcher)\n\n // 1. Let taskDestination be null.\n let taskDestination = null\n\n // 2. Let crossOriginIsolatedCapability be false.\n let crossOriginIsolatedCapability = false\n\n // 3. If request\u2019s client is non-null, then:\n if (request.client != null) {\n // 1. Set taskDestination to request\u2019s client\u2019s global object.\n taskDestination = request.client.globalObject\n\n // 2. Set crossOriginIsolatedCapability to request\u2019s client\u2019s cross-origin\n // isolated capability.\n crossOriginIsolatedCapability =\n request.client.crossOriginIsolatedCapability\n }\n\n // 4. If useParallelQueue is true, then set taskDestination to the result of\n // starting a new parallel queue.\n // TODO\n\n // 5. Let timingInfo be a new fetch timing info whose start time and\n // post-redirect start time are the coarsened shared current time given\n // crossOriginIsolatedCapability.\n const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability)\n const timingInfo = createOpaqueTimingInfo({\n startTime: currentTime\n })\n\n // 6. Let fetchParams be a new fetch params whose\n // request is request,\n // timing info is timingInfo,\n // process request body chunk length is processRequestBodyChunkLength,\n // process request end-of-body is processRequestEndOfBody,\n // process response is processResponse,\n // process response consume body is processResponseConsumeBody,\n // process response end-of-body is processResponseEndOfBody,\n // task destination is taskDestination,\n // and cross-origin isolated capability is crossOriginIsolatedCapability.\n const fetchParams = {\n controller: new Fetch(dispatcher),\n request,\n timingInfo,\n processRequestBodyChunkLength,\n processRequestEndOfBody,\n processResponse,\n processResponseConsumeBody,\n processResponseEndOfBody,\n taskDestination,\n crossOriginIsolatedCapability,\n // Keep requestObject alive to prevent its AbortController from being GC'd\n requestObject\n }\n\n // 7. If request\u2019s body is a byte sequence, then set request\u2019s body to\n // request\u2019s body as a body.\n // NOTE: Since fetching is only called from fetch, body should already be\n // extracted.\n assert(!request.body || request.body.stream)\n\n // 8. If request\u2019s window is \"client\", then set request\u2019s window to request\u2019s\n // client, if request\u2019s client\u2019s global object is a Window object; otherwise\n // \"no-window\".\n if (request.window === 'client') {\n // TODO: What if request.client is null?\n request.window =\n request.client?.globalObject?.constructor?.name === 'Window'\n ? request.client\n : 'no-window'\n }\n\n // 9. If request\u2019s origin is \"client\", then set request\u2019s origin to request\u2019s\n // client\u2019s origin.\n if (request.origin === 'client') {\n request.origin = request.client.origin\n }\n\n // 10. If all of the following conditions are true:\n // TODO\n\n // 11. If request\u2019s policy container is \"client\", then:\n if (request.policyContainer === 'client') {\n // 1. If request\u2019s client is non-null, then set request\u2019s policy\n // container to a clone of request\u2019s client\u2019s policy container. [HTML]\n if (request.client != null) {\n request.policyContainer = clonePolicyContainer(\n request.client.policyContainer\n )\n } else {\n // 2. Otherwise, set request\u2019s policy container to a new policy\n // container.\n request.policyContainer = makePolicyContainer()\n }\n }\n\n // 12. If request\u2019s header list does not contain `Accept`, then:\n if (!request.headersList.contains('accept', true)) {\n // 1. Let value be `*/*`.\n const value = '*/*'\n\n // 2. A user agent should set value to the first matching statement, if\n // any, switching on request\u2019s destination:\n // \"document\"\n // \"frame\"\n // \"iframe\"\n // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8`\n // \"image\"\n // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5`\n // \"style\"\n // `text/css,*/*;q=0.1`\n // TODO\n\n // 3. Append `Accept`/value to request\u2019s header list.\n request.headersList.append('accept', value, true)\n }\n\n // 13. If request\u2019s header list does not contain `Accept-Language`, then\n // user agents should append `Accept-Language`/an appropriate value to\n // request\u2019s header list.\n if (!request.headersList.contains('accept-language', true)) {\n request.headersList.append('accept-language', '*', true)\n }\n\n // 14. If request\u2019s priority is null, then use request\u2019s initiator and\n // destination appropriately in setting request\u2019s priority to a\n // user-agent-defined object.\n if (request.priority === null) {\n // TODO\n }\n\n // 15. If request is a subresource request, then:\n if (subresourceSet.has(request.destination)) {\n // TODO\n }\n\n // 16. Run main fetch given fetchParams.\n mainFetch(fetchParams, false)\n\n // 17. Return fetchParam's controller\n return fetchParams.controller\n}\n\n// https://fetch.spec.whatwg.org/#concept-main-fetch\nasync function mainFetch (fetchParams, recursive) {\n try {\n // 1. Let request be fetchParams\u2019s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. If request\u2019s local-URLs-only flag is set and request\u2019s current URL is\n // not local, then set response to a network error.\n if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) {\n response = makeNetworkError('local URLs only')\n }\n\n // 4. Run report Content Security Policy violations for request.\n // TODO\n\n // 5. Upgrade request to a potentially trustworthy URL, if appropriate.\n tryUpgradeRequestToAPotentiallyTrustworthyURL(request)\n\n // 6. If should request be blocked due to a bad port, should fetching request\n // be blocked as mixed content, or should request be blocked by Content\n // Security Policy returns blocked, then set response to a network error.\n if (requestBadPort(request) === 'blocked') {\n response = makeNetworkError('bad port')\n }\n // TODO: should fetching request be blocked as mixed content?\n // TODO: should request be blocked by Content Security Policy?\n\n // 7. If request\u2019s referrer policy is the empty string, then set request\u2019s\n // referrer policy to request\u2019s policy container\u2019s referrer policy.\n if (request.referrerPolicy === '') {\n request.referrerPolicy = request.policyContainer.referrerPolicy\n }\n\n // 8. If request\u2019s referrer is not \"no-referrer\", then set request\u2019s\n // referrer to the result of invoking determine request\u2019s referrer.\n if (request.referrer !== 'no-referrer') {\n request.referrer = determineRequestsReferrer(request)\n }\n\n // 9. Set request\u2019s current URL\u2019s scheme to \"https\" if all of the following\n // conditions are true:\n // - request\u2019s current URL\u2019s scheme is \"http\"\n // - request\u2019s current URL\u2019s host is a domain\n // - Matching request\u2019s current URL\u2019s host per Known HSTS Host Domain Name\n // Matching results in either a superdomain match with an asserted\n // includeSubDomains directive or a congruent match (with or without an\n // asserted includeSubDomains directive). [HSTS]\n // TODO\n\n // 10. If recursive is false, then run the remaining steps in parallel.\n // TODO\n\n // 11. If response is null, then set response to the result of running\n // the steps corresponding to the first matching statement:\n if (response === null) {\n const currentURL = requestCurrentURL(request)\n if (\n // - request\u2019s current URL\u2019s origin is same origin with request\u2019s origin,\n // and request\u2019s response tainting is \"basic\"\n (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') ||\n // request\u2019s current URL\u2019s scheme is \"data\"\n (currentURL.protocol === 'data:') ||\n // - request\u2019s mode is \"navigate\" or \"websocket\"\n (request.mode === 'navigate' || request.mode === 'websocket')\n ) {\n // 1. Set request\u2019s response tainting to \"basic\".\n request.responseTainting = 'basic'\n\n // 2. Return the result of running scheme fetch given fetchParams.\n response = await schemeFetch(fetchParams)\n\n // request\u2019s mode is \"same-origin\"\n } else if (request.mode === 'same-origin') {\n // 1. Return a network error.\n response = makeNetworkError('request mode cannot be \"same-origin\"')\n\n // request\u2019s mode is \"no-cors\"\n } else if (request.mode === 'no-cors') {\n // 1. If request\u2019s redirect mode is not \"follow\", then return a network\n // error.\n if (request.redirect !== 'follow') {\n response = makeNetworkError(\n 'redirect mode cannot be \"follow\" for \"no-cors\" request'\n )\n } else {\n // 2. Set request\u2019s response tainting to \"opaque\".\n request.responseTainting = 'opaque'\n\n // 3. Return the result of running scheme fetch given fetchParams.\n response = await schemeFetch(fetchParams)\n }\n // request\u2019s current URL\u2019s scheme is not an HTTP(S) scheme\n } else if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) {\n // Return a network error.\n response = makeNetworkError('URL scheme must be a HTTP(S) scheme')\n\n // - request\u2019s use-CORS-preflight flag is set\n // - request\u2019s unsafe-request flag is set and either request\u2019s method is\n // not a CORS-safelisted method or CORS-unsafe request-header names with\n // request\u2019s header list is not empty\n // 1. Set request\u2019s response tainting to \"cors\".\n // 2. Let corsWithPreflightResponse be the result of running HTTP fetch\n // given fetchParams and true.\n // 3. If corsWithPreflightResponse is a network error, then clear cache\n // entries using request.\n // 4. Return corsWithPreflightResponse.\n // TODO\n\n // Otherwise\n } else {\n // 1. Set request\u2019s response tainting to \"cors\".\n request.responseTainting = 'cors'\n\n // 2. Return the result of running HTTP fetch given fetchParams.\n response = await httpFetch(fetchParams)\n }\n }\n\n // 12. If recursive is true, then return response.\n if (recursive) {\n return response\n }\n\n // 13. If response is not a network error and response is not a filtered\n // response, then:\n if (response.status !== 0 && !response.internalResponse) {\n // If request\u2019s response tainting is \"cors\", then:\n if (request.responseTainting === 'cors') {\n // 1. Let headerNames be the result of extracting header list values\n // given `Access-Control-Expose-Headers` and response\u2019s header list.\n // TODO\n // 2. If request\u2019s credentials mode is not \"include\" and headerNames\n // contains `*`, then set response\u2019s CORS-exposed header-name list to\n // all unique header names in response\u2019s header list.\n // TODO\n // 3. Otherwise, if headerNames is not null or failure, then set\n // response\u2019s CORS-exposed header-name list to headerNames.\n // TODO\n }\n\n // Set response to the following filtered response with response as its\n // internal response, depending on request\u2019s response tainting:\n if (request.responseTainting === 'basic') {\n response = filterResponse(response, 'basic')\n } else if (request.responseTainting === 'cors') {\n response = filterResponse(response, 'cors')\n } else if (request.responseTainting === 'opaque') {\n response = filterResponse(response, 'opaque')\n } else {\n assert(false)\n }\n }\n\n // 14. Let internalResponse be response, if response is a network error,\n // and response\u2019s internal response otherwise.\n let internalResponse =\n response.status === 0 ? response : response.internalResponse\n\n // 15. If internalResponse\u2019s URL list is empty, then set it to a clone of\n // request\u2019s URL list.\n if (internalResponse.urlList.length === 0) {\n internalResponse.urlList.push(...request.urlList)\n }\n\n // 16. If request\u2019s timing allow failed flag is unset, then set\n // internalResponse\u2019s timing allow passed flag.\n if (!request.timingAllowFailed) {\n response.timingAllowPassed = true\n }\n\n // 17. If response is not a network error and any of the following returns\n // blocked\n // - should internalResponse to request be blocked as mixed content\n // - should internalResponse to request be blocked by Content Security Policy\n // - should internalResponse to request be blocked due to its MIME type\n // - should internalResponse to request be blocked due to nosniff\n // TODO\n\n // 18. If response\u2019s type is \"opaque\", internalResponse\u2019s status is 206,\n // internalResponse\u2019s range-requested flag is set, and request\u2019s header\n // list does not contain `Range`, then set response and internalResponse\n // to a network error.\n if (\n response.type === 'opaque' &&\n internalResponse.status === 206 &&\n internalResponse.rangeRequested &&\n !request.headers.contains('range', true)\n ) {\n response = internalResponse = makeNetworkError()\n }\n\n // 19. If response is not a network error and either request\u2019s method is\n // `HEAD` or `CONNECT`, or internalResponse\u2019s status is a null body status,\n // set internalResponse\u2019s body to null and disregard any enqueuing toward\n // it (if any).\n if (\n response.status !== 0 &&\n (request.method === 'HEAD' ||\n request.method === 'CONNECT' ||\n nullBodyStatus.includes(internalResponse.status))\n ) {\n internalResponse.body = null\n fetchParams.controller.dump = true\n }\n\n // 20. If request\u2019s integrity metadata is not the empty string, then:\n if (request.integrity) {\n // 1. Let processBodyError be this step: run fetch finale given fetchParams\n // and a network error.\n const processBodyError = (reason) =>\n fetchFinale(fetchParams, makeNetworkError(reason))\n\n // 2. If request\u2019s response tainting is \"opaque\", or response\u2019s body is null,\n // then run processBodyError and abort these steps.\n if (request.responseTainting === 'opaque' || response.body == null) {\n processBodyError(response.error)\n return\n }\n\n // 3. Let processBody given bytes be these steps:\n const processBody = (bytes) => {\n // 1. If bytes do not match request\u2019s integrity metadata,\n // then run processBodyError and abort these steps. [SRI]\n if (!bytesMatch(bytes, request.integrity)) {\n processBodyError('integrity mismatch')\n return\n }\n\n // 2. Set response\u2019s body to bytes as a body.\n response.body = safelyExtractBody(bytes)[0]\n\n // 3. Run fetch finale given fetchParams and response.\n fetchFinale(fetchParams, response)\n }\n\n // 4. Fully read response\u2019s body given processBody and processBodyError.\n fullyReadBody(response.body, processBody, processBodyError)\n } else {\n // 21. Otherwise, run fetch finale given fetchParams and response.\n fetchFinale(fetchParams, response)\n }\n } catch (err) {\n fetchParams.controller.terminate(err)\n }\n}\n\n// https://fetch.spec.whatwg.org/#concept-scheme-fetch\n// given a fetch params fetchParams\nfunction schemeFetch (fetchParams) {\n // Note: since the connection is destroyed on redirect, which sets fetchParams to a\n // cancelled state, we do not want this condition to trigger *unless* there have been\n // no redirects. See https://github.com/nodejs/undici/issues/1776\n // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) {\n return Promise.resolve(makeAppropriateNetworkError(fetchParams))\n }\n\n // 2. Let request be fetchParams\u2019s request.\n const { request } = fetchParams\n\n const { protocol: scheme } = requestCurrentURL(request)\n\n // 3. Switch on request\u2019s current URL\u2019s scheme and run the associated steps:\n switch (scheme) {\n case 'about:': {\n // If request\u2019s current URL\u2019s path is the string \"blank\", then return a new response\n // whose status message is `OK`, header list is \u00AB (`Content-Type`, `text/html;charset=utf-8`) \u00BB,\n // and body is the empty byte sequence as a body.\n\n // Otherwise, return a network error.\n return Promise.resolve(makeNetworkError('about scheme is not supported'))\n }\n case 'blob:': {\n if (!resolveObjectURL) {\n resolveObjectURL = require('node:buffer').resolveObjectURL\n }\n\n // 1. Let blobURLEntry be request\u2019s current URL\u2019s blob URL entry.\n const blobURLEntry = requestCurrentURL(request)\n\n // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56\n // Buffer.resolveObjectURL does not ignore URL queries.\n if (blobURLEntry.search.length !== 0) {\n return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.'))\n }\n\n const blob = resolveObjectURL(blobURLEntry.toString())\n\n // 2. If request\u2019s method is not `GET`, blobURLEntry is null, or blobURLEntry\u2019s\n // object is not a Blob object, then return a network error.\n if (request.method !== 'GET' || !webidl.is.Blob(blob)) {\n return Promise.resolve(makeNetworkError('invalid method'))\n }\n\n // 3. Let blob be blobURLEntry\u2019s object.\n // Note: done above\n\n // 4. Let response be a new response.\n const response = makeResponse()\n\n // 5. Let fullLength be blob\u2019s size.\n const fullLength = blob.size\n\n // 6. Let serializedFullLength be fullLength, serialized and isomorphic encoded.\n const serializedFullLength = isomorphicEncode(`${fullLength}`)\n\n // 7. Let type be blob\u2019s type.\n const type = blob.type\n\n // 8. If request\u2019s header list does not contain `Range`:\n // 9. Otherwise:\n if (!request.headersList.contains('range', true)) {\n // 1. Let bodyWithType be the result of safely extracting blob.\n // Note: in the FileAPI a blob \"object\" is a Blob *or* a MediaSource.\n // In node, this can only ever be a Blob. Therefore we can safely\n // use extractBody directly.\n const bodyWithType = extractBody(blob)\n\n // 2. Set response\u2019s status message to `OK`.\n response.statusText = 'OK'\n\n // 3. Set response\u2019s body to bodyWithType\u2019s body.\n response.body = bodyWithType[0]\n\n // 4. Set response\u2019s header list to \u00AB (`Content-Length`, serializedFullLength), (`Content-Type`, type) \u00BB.\n response.headersList.set('content-length', serializedFullLength, true)\n response.headersList.set('content-type', type, true)\n } else {\n // 1. Set response\u2019s range-requested flag.\n response.rangeRequested = true\n\n // 2. Let rangeHeader be the result of getting `Range` from request\u2019s header list.\n const rangeHeader = request.headersList.get('range', true)\n\n // 3. Let rangeValue be the result of parsing a single range header value given rangeHeader and true.\n const rangeValue = simpleRangeHeaderValue(rangeHeader, true)\n\n // 4. If rangeValue is failure, then return a network error.\n if (rangeValue === 'failure') {\n return Promise.resolve(makeNetworkError('failed to fetch the data URL'))\n }\n\n // 5. Let (rangeStart, rangeEnd) be rangeValue.\n let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue\n\n // 6. If rangeStart is null:\n // 7. Otherwise:\n if (rangeStart === null) {\n // 1. Set rangeStart to fullLength \u2212 rangeEnd.\n rangeStart = fullLength - rangeEnd\n\n // 2. Set rangeEnd to rangeStart + rangeEnd \u2212 1.\n rangeEnd = rangeStart + rangeEnd - 1\n } else {\n // 1. If rangeStart is greater than or equal to fullLength, then return a network error.\n if (rangeStart >= fullLength) {\n return Promise.resolve(makeNetworkError('Range start is greater than the blob\\'s size.'))\n }\n\n // 2. If rangeEnd is null or rangeEnd is greater than or equal to fullLength, then set\n // rangeEnd to fullLength \u2212 1.\n if (rangeEnd === null || rangeEnd >= fullLength) {\n rangeEnd = fullLength - 1\n }\n }\n\n // 8. Let slicedBlob be the result of invoking slice blob given blob, rangeStart,\n // rangeEnd + 1, and type.\n const slicedBlob = blob.slice(rangeStart, rangeEnd + 1, type)\n\n // 9. Let slicedBodyWithType be the result of safely extracting slicedBlob.\n // Note: same reason as mentioned above as to why we use extractBody\n const slicedBodyWithType = extractBody(slicedBlob)\n\n // 10. Set response\u2019s body to slicedBodyWithType\u2019s body.\n response.body = slicedBodyWithType[0]\n\n // 11. Let serializedSlicedLength be slicedBlob\u2019s size, serialized and isomorphic encoded.\n const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`)\n\n // 12. Let contentRange be the result of invoking build a content range given rangeStart,\n // rangeEnd, and fullLength.\n const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength)\n\n // 13. Set response\u2019s status to 206.\n response.status = 206\n\n // 14. Set response\u2019s status message to `Partial Content`.\n response.statusText = 'Partial Content'\n\n // 15. Set response\u2019s header list to \u00AB (`Content-Length`, serializedSlicedLength),\n // (`Content-Type`, type), (`Content-Range`, contentRange) \u00BB.\n response.headersList.set('content-length', serializedSlicedLength, true)\n response.headersList.set('content-type', type, true)\n response.headersList.set('content-range', contentRange, true)\n }\n\n // 10. Return response.\n return Promise.resolve(response)\n }\n case 'data:': {\n // 1. Let dataURLStruct be the result of running the\n // data: URL processor on request\u2019s current URL.\n const currentURL = requestCurrentURL(request)\n const dataURLStruct = dataURLProcessor(currentURL)\n\n // 2. If dataURLStruct is failure, then return a\n // network error.\n if (dataURLStruct === 'failure') {\n return Promise.resolve(makeNetworkError('failed to fetch the data URL'))\n }\n\n // 3. Let mimeType be dataURLStruct\u2019s MIME type, serialized.\n const mimeType = serializeAMimeType(dataURLStruct.mimeType)\n\n // 4. Return a response whose status message is `OK`,\n // header list is \u00AB (`Content-Type`, mimeType) \u00BB,\n // and body is dataURLStruct\u2019s body as a body.\n return Promise.resolve(makeResponse({\n statusText: 'OK',\n headersList: [\n ['content-type', { name: 'Content-Type', value: mimeType }]\n ],\n body: safelyExtractBody(dataURLStruct.body)[0]\n }))\n }\n case 'file:': {\n // For now, unfortunate as it is, file URLs are left as an exercise for the reader.\n // When in doubt, return a network error.\n return Promise.resolve(makeNetworkError('not implemented... yet...'))\n }\n case 'http:':\n case 'https:': {\n // Return the result of running HTTP fetch given fetchParams.\n\n return httpFetch(fetchParams)\n .catch((err) => makeNetworkError(err))\n }\n default: {\n return Promise.resolve(makeNetworkError('unknown scheme'))\n }\n }\n}\n\n// https://fetch.spec.whatwg.org/#finalize-response\nfunction finalizeResponse (fetchParams, response) {\n // 1. Set fetchParams\u2019s request\u2019s done flag.\n fetchParams.request.done = true\n\n // 2, If fetchParams\u2019s process response done is not null, then queue a fetch\n // task to run fetchParams\u2019s process response done given response, with\n // fetchParams\u2019s task destination.\n if (fetchParams.processResponseDone != null) {\n queueMicrotask(() => fetchParams.processResponseDone(response))\n }\n}\n\n// https://fetch.spec.whatwg.org/#fetch-finale\nfunction fetchFinale (fetchParams, response) {\n // 1. Let timingInfo be fetchParams\u2019s timing info.\n let timingInfo = fetchParams.timingInfo\n\n // 2. If response is not a network error and fetchParams\u2019s request\u2019s client is a secure context,\n // then set timingInfo\u2019s server-timing headers to the result of getting, decoding, and splitting\n // `Server-Timing` from response\u2019s internal response\u2019s header list.\n // TODO\n\n // 3. Let processResponseEndOfBody be the following steps:\n const processResponseEndOfBody = () => {\n // 1. Let unsafeEndTime be the unsafe shared current time.\n const unsafeEndTime = Date.now() // ?\n\n // 2. If fetchParams\u2019s request\u2019s destination is \"document\", then set fetchParams\u2019s controller\u2019s\n // full timing info to fetchParams\u2019s timing info.\n if (fetchParams.request.destination === 'document') {\n fetchParams.controller.fullTimingInfo = timingInfo\n }\n\n // 3. Set fetchParams\u2019s controller\u2019s report timing steps to the following steps given a global object global:\n fetchParams.controller.reportTimingSteps = () => {\n // 1. If fetchParams\u2019s request\u2019s URL\u2019s scheme is not an HTTP(S) scheme, then return.\n if (!urlIsHttpHttpsScheme(fetchParams.request.url)) {\n return\n }\n\n // 2. Set timingInfo\u2019s end time to the relative high resolution time given unsafeEndTime and global.\n timingInfo.endTime = unsafeEndTime\n\n // 3. Let cacheState be response\u2019s cache state.\n let cacheState = response.cacheState\n\n // 4. Let bodyInfo be response\u2019s body info.\n const bodyInfo = response.bodyInfo\n\n // 5. If response\u2019s timing allow passed flag is not set, then set timingInfo to the result of creating an\n // opaque timing info for timingInfo and set cacheState to the empty string.\n if (!response.timingAllowPassed) {\n timingInfo = createOpaqueTimingInfo(timingInfo)\n\n cacheState = ''\n }\n\n // 6. Let responseStatus be 0.\n let responseStatus = 0\n\n // 7. If fetchParams\u2019s request\u2019s mode is not \"navigate\" or response\u2019s has-cross-origin-redirects is false:\n if (fetchParams.request.mode !== 'navigator' || !response.hasCrossOriginRedirects) {\n // 1. Set responseStatus to response\u2019s status.\n responseStatus = response.status\n\n // 2. Let mimeType be the result of extracting a MIME type from response\u2019s header list.\n const mimeType = extractMimeType(response.headersList)\n\n // 3. If mimeType is not failure, then set bodyInfo\u2019s content type to the result of minimizing a supported MIME type given mimeType.\n if (mimeType !== 'failure') {\n bodyInfo.contentType = minimizeSupportedMimeType(mimeType)\n }\n }\n\n // 8. If fetchParams\u2019s request\u2019s initiator type is non-null, then mark resource timing given timingInfo,\n // fetchParams\u2019s request\u2019s URL, fetchParams\u2019s request\u2019s initiator type, global, cacheState, bodyInfo,\n // and responseStatus.\n if (fetchParams.request.initiatorType != null) {\n markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus)\n }\n }\n\n // 4. Let processResponseEndOfBodyTask be the following steps:\n const processResponseEndOfBodyTask = () => {\n // 1. Set fetchParams\u2019s request\u2019s done flag.\n fetchParams.request.done = true\n\n // 2. If fetchParams\u2019s process response end-of-body is non-null, then run fetchParams\u2019s process\n // response end-of-body given response.\n if (fetchParams.processResponseEndOfBody != null) {\n queueMicrotask(() => fetchParams.processResponseEndOfBody(response))\n }\n\n // 3. If fetchParams\u2019s request\u2019s initiator type is non-null and fetchParams\u2019s request\u2019s client\u2019s\n // global object is fetchParams\u2019s task destination, then run fetchParams\u2019s controller\u2019s report\n // timing steps given fetchParams\u2019s request\u2019s client\u2019s global object.\n if (fetchParams.request.initiatorType != null) {\n fetchParams.controller.reportTimingSteps()\n }\n }\n\n // 5. Queue a fetch task to run processResponseEndOfBodyTask with fetchParams\u2019s task destination\n queueMicrotask(() => processResponseEndOfBodyTask())\n }\n\n // 4. If fetchParams\u2019s process response is non-null, then queue a fetch task to run fetchParams\u2019s\n // process response given response, with fetchParams\u2019s task destination.\n if (fetchParams.processResponse != null) {\n queueMicrotask(() => {\n fetchParams.processResponse(response)\n fetchParams.processResponse = null\n })\n }\n\n // 5. Let internalResponse be response, if response is a network error; otherwise response\u2019s internal response.\n const internalResponse = response.type === 'error' ? response : (response.internalResponse ?? response)\n\n // 6. If internalResponse\u2019s body is null, then run processResponseEndOfBody.\n // 7. Otherwise:\n if (internalResponse.body == null) {\n processResponseEndOfBody()\n } else {\n // mcollina: all the following steps of the specs are skipped.\n // The internal transform stream is not needed.\n // See https://github.com/nodejs/undici/pull/3093#issuecomment-2050198541\n\n // 1. Let transformStream be a new TransformStream.\n // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, enqueues chunk in transformStream.\n // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm and flushAlgorithm\n // set to processResponseEndOfBody.\n // 4. Set internalResponse\u2019s body\u2019s stream to the result of internalResponse\u2019s body\u2019s stream piped through transformStream.\n\n finished(internalResponse.body.stream, () => {\n processResponseEndOfBody()\n })\n }\n}\n\n// https://fetch.spec.whatwg.org/#http-fetch\nasync function httpFetch (fetchParams) {\n // 1. Let request be fetchParams\u2019s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. Let actualResponse be null.\n let actualResponse = null\n\n // 4. Let timingInfo be fetchParams\u2019s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 5. If request\u2019s service-workers mode is \"all\", then:\n if (request.serviceWorkers === 'all') {\n // TODO\n }\n\n // 6. If response is null, then:\n if (response === null) {\n // 1. If makeCORSPreflight is true and one of these conditions is true:\n // TODO\n\n // 2. If request\u2019s redirect mode is \"follow\", then set request\u2019s\n // service-workers mode to \"none\".\n if (request.redirect === 'follow') {\n request.serviceWorkers = 'none'\n }\n\n // 3. Set response and actualResponse to the result of running\n // HTTP-network-or-cache fetch given fetchParams.\n actualResponse = response = await httpNetworkOrCacheFetch(fetchParams)\n\n // 4. If request\u2019s response tainting is \"cors\" and a CORS check\n // for request and response returns failure, then return a network error.\n if (\n request.responseTainting === 'cors' &&\n corsCheck(request, response) === 'failure'\n ) {\n return makeNetworkError('cors failure')\n }\n\n // 5. If the TAO check for request and response returns failure, then set\n // request\u2019s timing allow failed flag.\n if (TAOCheck(request, response) === 'failure') {\n request.timingAllowFailed = true\n }\n }\n\n // 7. If either request\u2019s response tainting or response\u2019s type\n // is \"opaque\", and the cross-origin resource policy check with\n // request\u2019s origin, request\u2019s client, request\u2019s destination,\n // and actualResponse returns blocked, then return a network error.\n if (\n (request.responseTainting === 'opaque' || response.type === 'opaque') &&\n crossOriginResourcePolicyCheck(\n request.origin,\n request.client,\n request.destination,\n actualResponse\n ) === 'blocked'\n ) {\n return makeNetworkError('blocked')\n }\n\n // 8. If actualResponse\u2019s status is a redirect status, then:\n if (redirectStatusSet.has(actualResponse.status)) {\n // 1. If actualResponse\u2019s status is not 303, request\u2019s body is not null,\n // and the connection uses HTTP/2, then user agents may, and are even\n // encouraged to, transmit an RST_STREAM frame.\n // See, https://github.com/whatwg/fetch/issues/1288\n if (request.redirect !== 'manual') {\n fetchParams.controller.connection.destroy(undefined, false)\n }\n\n // 2. Switch on request\u2019s redirect mode:\n if (request.redirect === 'error') {\n // Set response to a network error.\n response = makeNetworkError('unexpected redirect')\n } else if (request.redirect === 'manual') {\n // Set response to an opaque-redirect filtered response whose internal\n // response is actualResponse.\n // NOTE(spec): On the web this would return an `opaqueredirect` response,\n // but that doesn't make sense server side.\n // See https://github.com/nodejs/undici/issues/1193.\n response = actualResponse\n } else if (request.redirect === 'follow') {\n // Set response to the result of running HTTP-redirect fetch given\n // fetchParams and response.\n response = await httpRedirectFetch(fetchParams, response)\n } else {\n assert(false)\n }\n }\n\n // 9. Set response\u2019s timing info to timingInfo.\n response.timingInfo = timingInfo\n\n // 10. Return response.\n return response\n}\n\n// https://fetch.spec.whatwg.org/#http-redirect-fetch\nfunction httpRedirectFetch (fetchParams, response) {\n // 1. Let request be fetchParams\u2019s request.\n const request = fetchParams.request\n\n // 2. Let actualResponse be response, if response is not a filtered response,\n // and response\u2019s internal response otherwise.\n const actualResponse = response.internalResponse\n ? response.internalResponse\n : response\n\n // 3. Let locationURL be actualResponse\u2019s location URL given request\u2019s current\n // URL\u2019s fragment.\n let locationURL\n\n try {\n locationURL = responseLocationURL(\n actualResponse,\n requestCurrentURL(request).hash\n )\n\n // 4. If locationURL is null, then return response.\n if (locationURL == null) {\n return response\n }\n } catch (err) {\n // 5. If locationURL is failure, then return a network error.\n return Promise.resolve(makeNetworkError(err))\n }\n\n // 6. If locationURL\u2019s scheme is not an HTTP(S) scheme, then return a network\n // error.\n if (!urlIsHttpHttpsScheme(locationURL)) {\n return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme'))\n }\n\n // 7. If request\u2019s redirect count is 20, then return a network error.\n if (request.redirectCount === 20) {\n return Promise.resolve(makeNetworkError('redirect count exceeded'))\n }\n\n // 8. Increase request\u2019s redirect count by 1.\n request.redirectCount += 1\n\n // 9. If request\u2019s mode is \"cors\", locationURL includes credentials, and\n // request\u2019s origin is not same origin with locationURL\u2019s origin, then return\n // a network error.\n if (\n request.mode === 'cors' &&\n (locationURL.username || locationURL.password) &&\n !sameOrigin(request, locationURL)\n ) {\n return Promise.resolve(makeNetworkError('cross origin not allowed for request mode \"cors\"'))\n }\n\n // 10. If request\u2019s response tainting is \"cors\" and locationURL includes\n // credentials, then return a network error.\n if (\n request.responseTainting === 'cors' &&\n (locationURL.username || locationURL.password)\n ) {\n return Promise.resolve(makeNetworkError(\n 'URL cannot contain credentials for request mode \"cors\"'\n ))\n }\n\n // 11. If actualResponse\u2019s status is not 303, request\u2019s body is non-null,\n // and request\u2019s body\u2019s source is null, then return a network error.\n if (\n actualResponse.status !== 303 &&\n request.body != null &&\n request.body.source == null\n ) {\n return Promise.resolve(makeNetworkError())\n }\n\n // 12. If one of the following is true\n // - actualResponse\u2019s status is 301 or 302 and request\u2019s method is `POST`\n // - actualResponse\u2019s status is 303 and request\u2019s method is not `GET` or `HEAD`\n if (\n ([301, 302].includes(actualResponse.status) && request.method === 'POST') ||\n (actualResponse.status === 303 &&\n !GET_OR_HEAD.includes(request.method))\n ) {\n // then:\n // 1. Set request\u2019s method to `GET` and request\u2019s body to null.\n request.method = 'GET'\n request.body = null\n\n // 2. For each headerName of request-body-header name, delete headerName from\n // request\u2019s header list.\n for (const headerName of requestBodyHeader) {\n request.headersList.delete(headerName)\n }\n }\n\n // 13. If request\u2019s current URL\u2019s origin is not same origin with locationURL\u2019s\n // origin, then for each headerName of CORS non-wildcard request-header name,\n // delete headerName from request\u2019s header list.\n if (!sameOrigin(requestCurrentURL(request), locationURL)) {\n // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name\n request.headersList.delete('authorization', true)\n\n // https://fetch.spec.whatwg.org/#authentication-entries\n request.headersList.delete('proxy-authorization', true)\n\n // \"Cookie\" and \"Host\" are forbidden request-headers, which undici doesn't implement.\n request.headersList.delete('cookie', true)\n request.headersList.delete('host', true)\n }\n\n // 14. If request's body is non-null, then set request's body to the first return\n // value of safely extracting request's body's source.\n if (request.body != null) {\n assert(request.body.source != null)\n request.body = safelyExtractBody(request.body.source)[0]\n }\n\n // 15. Let timingInfo be fetchParams\u2019s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 16. Set timingInfo\u2019s redirect end time and post-redirect start time to the\n // coarsened shared current time given fetchParams\u2019s cross-origin isolated\n // capability.\n timingInfo.redirectEndTime = timingInfo.postRedirectStartTime =\n coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability)\n\n // 17. If timingInfo\u2019s redirect start time is 0, then set timingInfo\u2019s\n // redirect start time to timingInfo\u2019s start time.\n if (timingInfo.redirectStartTime === 0) {\n timingInfo.redirectStartTime = timingInfo.startTime\n }\n\n // 18. Append locationURL to request\u2019s URL list.\n request.urlList.push(locationURL)\n\n // 19. Invoke set request\u2019s referrer policy on redirect on request and\n // actualResponse.\n setRequestReferrerPolicyOnRedirect(request, actualResponse)\n\n // 20. Return the result of running main fetch given fetchParams and true.\n return mainFetch(fetchParams, true)\n}\n\n// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch\nasync function httpNetworkOrCacheFetch (\n fetchParams,\n isAuthenticationFetch = false,\n isNewConnectionFetch = false\n) {\n // 1. Let request be fetchParams\u2019s request.\n const request = fetchParams.request\n\n // 2. Let httpFetchParams be null.\n let httpFetchParams = null\n\n // 3. Let httpRequest be null.\n let httpRequest = null\n\n // 4. Let response be null.\n let response = null\n\n // 5. Let storedResponse be null.\n // TODO: cache\n\n // 6. Let httpCache be null.\n const httpCache = null\n\n // 7. Let the revalidatingFlag be unset.\n const revalidatingFlag = false\n\n // 8. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. If request\u2019s window is \"no-window\" and request\u2019s redirect mode is\n // \"error\", then set httpFetchParams to fetchParams and httpRequest to\n // request.\n if (request.window === 'no-window' && request.redirect === 'error') {\n httpFetchParams = fetchParams\n httpRequest = request\n } else {\n // Otherwise:\n\n // 1. Set httpRequest to a clone of request.\n httpRequest = cloneRequest(request)\n\n // 2. Set httpFetchParams to a copy of fetchParams.\n httpFetchParams = { ...fetchParams }\n\n // 3. Set httpFetchParams\u2019s request to httpRequest.\n httpFetchParams.request = httpRequest\n }\n\n // 3. Let includeCredentials be true if one of\n const includeCredentials =\n request.credentials === 'include' ||\n (request.credentials === 'same-origin' &&\n request.responseTainting === 'basic')\n\n // 4. Let contentLength be httpRequest\u2019s body\u2019s length, if httpRequest\u2019s\n // body is non-null; otherwise null.\n const contentLength = httpRequest.body ? httpRequest.body.length : null\n\n // 5. Let contentLengthHeaderValue be null.\n let contentLengthHeaderValue = null\n\n // 6. If httpRequest\u2019s body is null and httpRequest\u2019s method is `POST` or\n // `PUT`, then set contentLengthHeaderValue to `0`.\n if (\n httpRequest.body == null &&\n ['POST', 'PUT'].includes(httpRequest.method)\n ) {\n contentLengthHeaderValue = '0'\n }\n\n // 7. If contentLength is non-null, then set contentLengthHeaderValue to\n // contentLength, serialized and isomorphic encoded.\n if (contentLength != null) {\n contentLengthHeaderValue = isomorphicEncode(`${contentLength}`)\n }\n\n // 8. If contentLengthHeaderValue is non-null, then append\n // `Content-Length`/contentLengthHeaderValue to httpRequest\u2019s header\n // list.\n if (contentLengthHeaderValue != null) {\n httpRequest.headersList.append('content-length', contentLengthHeaderValue, true)\n }\n\n // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`,\n // contentLengthHeaderValue) to httpRequest\u2019s header list.\n\n // 10. If contentLength is non-null and httpRequest\u2019s keepalive is true,\n // then:\n if (contentLength != null && httpRequest.keepalive) {\n // NOTE: keepalive is a noop outside of browser context.\n }\n\n // 11. If httpRequest\u2019s referrer is a URL, then append\n // `Referer`/httpRequest\u2019s referrer, serialized and isomorphic encoded,\n // to httpRequest\u2019s header list.\n if (webidl.is.URL(httpRequest.referrer)) {\n httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href), true)\n }\n\n // 12. Append a request `Origin` header for httpRequest.\n appendRequestOriginHeader(httpRequest)\n\n // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA]\n appendFetchMetadata(httpRequest)\n\n // 14. If httpRequest\u2019s header list does not contain `User-Agent`, then\n // user agents should append `User-Agent`/default `User-Agent` value to\n // httpRequest\u2019s header list.\n if (!httpRequest.headersList.contains('user-agent', true)) {\n httpRequest.headersList.append('user-agent', defaultUserAgent, true)\n }\n\n // 15. If httpRequest\u2019s cache mode is \"default\" and httpRequest\u2019s header\n // list contains `If-Modified-Since`, `If-None-Match`,\n // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set\n // httpRequest\u2019s cache mode to \"no-store\".\n if (\n httpRequest.cache === 'default' &&\n (httpRequest.headersList.contains('if-modified-since', true) ||\n httpRequest.headersList.contains('if-none-match', true) ||\n httpRequest.headersList.contains('if-unmodified-since', true) ||\n httpRequest.headersList.contains('if-match', true) ||\n httpRequest.headersList.contains('if-range', true))\n ) {\n httpRequest.cache = 'no-store'\n }\n\n // 16. If httpRequest\u2019s cache mode is \"no-cache\", httpRequest\u2019s prevent\n // no-cache cache-control header modification flag is unset, and\n // httpRequest\u2019s header list does not contain `Cache-Control`, then append\n // `Cache-Control`/`max-age=0` to httpRequest\u2019s header list.\n if (\n httpRequest.cache === 'no-cache' &&\n !httpRequest.preventNoCacheCacheControlHeaderModification &&\n !httpRequest.headersList.contains('cache-control', true)\n ) {\n httpRequest.headersList.append('cache-control', 'max-age=0', true)\n }\n\n // 17. If httpRequest\u2019s cache mode is \"no-store\" or \"reload\", then:\n if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') {\n // 1. If httpRequest\u2019s header list does not contain `Pragma`, then append\n // `Pragma`/`no-cache` to httpRequest\u2019s header list.\n if (!httpRequest.headersList.contains('pragma', true)) {\n httpRequest.headersList.append('pragma', 'no-cache', true)\n }\n\n // 2. If httpRequest\u2019s header list does not contain `Cache-Control`,\n // then append `Cache-Control`/`no-cache` to httpRequest\u2019s header list.\n if (!httpRequest.headersList.contains('cache-control', true)) {\n httpRequest.headersList.append('cache-control', 'no-cache', true)\n }\n }\n\n // 18. If httpRequest\u2019s header list contains `Range`, then append\n // `Accept-Encoding`/`identity` to httpRequest\u2019s header list.\n if (httpRequest.headersList.contains('range', true)) {\n httpRequest.headersList.append('accept-encoding', 'identity', true)\n }\n\n // 19. Modify httpRequest\u2019s header list per HTTP. Do not append a given\n // header if httpRequest\u2019s header list contains that header\u2019s name.\n // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129\n if (!httpRequest.headersList.contains('accept-encoding', true)) {\n if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) {\n httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate', true)\n } else {\n httpRequest.headersList.append('accept-encoding', 'gzip, deflate', true)\n }\n }\n\n httpRequest.headersList.delete('host', true)\n\n // 21. If includeCredentials is true, then:\n if (includeCredentials) {\n // 1. If the user agent is not configured to block cookies for httpRequest\n // (see section 7 of [COOKIES]), then:\n // TODO: credentials\n\n // 2. If httpRequest\u2019s header list does not contain `Authorization`, then:\n if (!httpRequest.headersList.contains('authorization', true)) {\n // 1. Let authorizationValue be null.\n let authorizationValue = null\n\n // 2. If there\u2019s an authentication entry for httpRequest and either\n // httpRequest\u2019s use-URL-credentials flag is unset or httpRequest\u2019s\n // current URL does not include credentials, then set\n // authorizationValue to authentication entry.\n if (hasAuthenticationEntry(httpRequest) && (\n httpRequest.useURLCredentials === undefined || !includesCredentials(requestCurrentURL(httpRequest))\n )) {\n // TODO\n } else if (includesCredentials(requestCurrentURL(httpRequest)) && isAuthenticationFetch) {\n // 3. Otherwise, if httpRequest\u2019s current URL does include credentials\n // and isAuthenticationFetch is true, set authorizationValue to\n // httpRequest\u2019s current URL, converted to an `Authorization` value\n const { username, password } = requestCurrentURL(httpRequest)\n authorizationValue = `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`\n }\n\n // 4. If authorizationValue is non-null, then append (`Authorization`,\n // authorizationValue) to httpRequest\u2019s header list.\n if (authorizationValue !== null) {\n httpRequest.headersList.append('Authorization', authorizationValue, false)\n }\n }\n }\n\n // 21. If there\u2019s a proxy-authentication entry, use it as appropriate.\n // TODO: proxy-authentication\n\n // 22. Set httpCache to the result of determining the HTTP cache\n // partition, given httpRequest.\n // TODO: cache\n\n // 23. If httpCache is null, then set httpRequest\u2019s cache mode to\n // \"no-store\".\n if (httpCache == null) {\n httpRequest.cache = 'no-store'\n }\n\n // 24. If httpRequest\u2019s cache mode is neither \"no-store\" nor \"reload\",\n // then:\n if (httpRequest.cache !== 'no-store' && httpRequest.cache !== 'reload') {\n // TODO: cache\n }\n\n // 9. If aborted, then return the appropriate network error for fetchParams.\n // TODO\n\n // 10. If response is null, then:\n if (response == null) {\n // 1. If httpRequest\u2019s cache mode is \"only-if-cached\", then return a\n // network error.\n if (httpRequest.cache === 'only-if-cached') {\n return makeNetworkError('only if cached')\n }\n\n // 2. Let forwardResponse be the result of running HTTP-network fetch\n // given httpFetchParams, includeCredentials, and isNewConnectionFetch.\n const forwardResponse = await httpNetworkFetch(\n httpFetchParams,\n includeCredentials,\n isNewConnectionFetch\n )\n\n // 3. If httpRequest\u2019s method is unsafe and forwardResponse\u2019s status is\n // in the range 200 to 399, inclusive, invalidate appropriate stored\n // responses in httpCache, as per the \"Invalidation\" chapter of HTTP\n // Caching, and set storedResponse to null. [HTTP-CACHING]\n if (\n !safeMethodsSet.has(httpRequest.method) &&\n forwardResponse.status >= 200 &&\n forwardResponse.status <= 399\n ) {\n // TODO: cache\n }\n\n // 4. If the revalidatingFlag is set and forwardResponse\u2019s status is 304,\n // then:\n if (revalidatingFlag && forwardResponse.status === 304) {\n // TODO: cache\n }\n\n // 5. If response is null, then:\n if (response == null) {\n // 1. Set response to forwardResponse.\n response = forwardResponse\n\n // 2. Store httpRequest and forwardResponse in httpCache, as per the\n // \"Storing Responses in Caches\" chapter of HTTP Caching. [HTTP-CACHING]\n // TODO: cache\n }\n }\n\n // 11. Set response\u2019s URL list to a clone of httpRequest\u2019s URL list.\n response.urlList = [...httpRequest.urlList]\n\n // 12. If httpRequest\u2019s header list contains `Range`, then set response\u2019s\n // range-requested flag.\n if (httpRequest.headersList.contains('range', true)) {\n response.rangeRequested = true\n }\n\n // 13. Set response\u2019s request-includes-credentials to includeCredentials.\n response.requestIncludesCredentials = includeCredentials\n\n // 14. If response\u2019s status is 401, httpRequest\u2019s response tainting is not \"cors\",\n // includeCredentials is true, and request\u2019s traversable for user prompts is\n // a traversable navigable:\n //\n // In Node.js there is no traversable navigable to prompt the user, but we\n // still need to handle URL-embedded credentials so authentication retries\n // for WebSocket handshakes continue to work.\n if (response.status === 401 && httpRequest.responseTainting !== 'cors' && includeCredentials && (\n request.useURLCredentials !== undefined ||\n isTraversableNavigable(request.traversableForUserPrompts)\n )) {\n // 2. If request\u2019s body is non-null, then:\n if (request.body != null) {\n // 1. If request\u2019s body\u2019s source is null, then return a network error.\n if (request.body.source == null) {\n // Note: In Node.js, this code path should not be reached because\n // isTraversableNavigable() returns false for non-navigable contexts.\n // However, we handle it gracefully by returning the response instead of\n // a network error, as we won't actually retry the request.\n // This aligns with the Fetch spec discussion in whatwg/fetch#1132,\n // which allows implementations flexibility when credentials can't be obtained.\n return response\n }\n\n // 2. Set request\u2019s body to the body of the result of safely extracting\n // request\u2019s body\u2019s source.\n request.body = safelyExtractBody(request.body.source)[0]\n }\n\n // 3. If request\u2019s use-URL-credentials flag is unset or isAuthenticationFetch is\n // true, then:\n if (request.useURLCredentials === undefined || isAuthenticationFetch) {\n // 1. If fetchParams is canceled, then return the appropriate network error\n // for fetchParams.\n if (isCancelled(fetchParams)) {\n return makeAppropriateNetworkError(fetchParams)\n }\n\n // 2. Let username and password be the result of prompting the end user for a\n // username and password, respectively, in request\u2019s traversable for user prompts.\n // TODO\n\n // 3. Set the username given request\u2019s current URL and username.\n // requestCurrentURL(request).username = TODO\n\n // 4. Set the password given request\u2019s current URL and password.\n // requestCurrentURL(request).password = TODO\n\n // In browsers, the user will be prompted to enter a username/password before the request\n // is re-sent. To prevent an infinite 401 loop, return the response for now.\n // https://github.com/nodejs/undici/pull/4756\n return response\n }\n\n // 4. Set response to the result of running HTTP-network-or-cache fetch given\n // fetchParams and true.\n fetchParams.controller.connection.destroy()\n\n response = await httpNetworkOrCacheFetch(fetchParams, true)\n }\n\n // 15. If response\u2019s status is 407, then:\n if (response.status === 407) {\n // 1. If request\u2019s window is \"no-window\", then return a network error.\n if (request.window === 'no-window') {\n return makeNetworkError()\n }\n\n // 2. ???\n\n // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams)) {\n return makeAppropriateNetworkError(fetchParams)\n }\n\n // 4. Prompt the end user as appropriate in request\u2019s window and store\n // the result as a proxy-authentication entry. [HTTP-AUTH]\n // TODO: Invoke some kind of callback?\n\n // 5. Set response to the result of running HTTP-network-or-cache fetch given\n // fetchParams.\n // TODO\n return makeNetworkError('proxy authentication required')\n }\n\n // 16. If all of the following are true\n if (\n // response\u2019s status is 421\n response.status === 421 &&\n // isNewConnectionFetch is false\n !isNewConnectionFetch &&\n // request\u2019s body is null, or request\u2019s body is non-null and request\u2019s body\u2019s source is non-null\n (request.body == null || request.body.source != null)\n ) {\n // then:\n\n // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams)) {\n return makeAppropriateNetworkError(fetchParams)\n }\n\n // 2. Set response to the result of running HTTP-network-or-cache\n // fetch given fetchParams, isAuthenticationFetch, and true.\n\n // TODO (spec): The spec doesn't specify this but we need to cancel\n // the active response before we can start a new one.\n // https://github.com/whatwg/fetch/issues/1293\n fetchParams.controller.connection.destroy()\n\n response = await httpNetworkOrCacheFetch(\n fetchParams,\n isAuthenticationFetch,\n true\n )\n }\n\n // 17. If isAuthenticationFetch is true, then create an authentication entry\n if (isAuthenticationFetch) {\n // TODO\n }\n\n // 18. Return response.\n return response\n}\n\n// https://fetch.spec.whatwg.org/#http-network-fetch\nasync function httpNetworkFetch (\n fetchParams,\n includeCredentials = false,\n forceNewConnection = false\n) {\n assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed)\n\n fetchParams.controller.connection = {\n abort: null,\n destroyed: false,\n destroy (err, abort = true) {\n if (!this.destroyed) {\n this.destroyed = true\n if (abort) {\n this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError'))\n }\n }\n }\n }\n\n // 1. Let request be fetchParams\u2019s request.\n const request = fetchParams.request\n\n // 2. Let response be null.\n let response = null\n\n // 3. Let timingInfo be fetchParams\u2019s timing info.\n const timingInfo = fetchParams.timingInfo\n\n // 4. Let httpCache be the result of determining the HTTP cache partition,\n // given request.\n // TODO: cache\n const httpCache = null\n\n // 5. If httpCache is null, then set request\u2019s cache mode to \"no-store\".\n if (httpCache == null) {\n request.cache = 'no-store'\n }\n\n // 6. Let networkPartitionKey be the result of determining the network\n // partition key given request.\n // TODO\n\n // 7. Let newConnection be \"yes\" if forceNewConnection is true; otherwise\n // \"no\".\n const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars\n\n // 8. Switch on request\u2019s mode:\n if (request.mode === 'websocket') {\n // Let connection be the result of obtaining a WebSocket connection,\n // given request\u2019s current URL.\n // TODO\n } else {\n // Let connection be the result of obtaining a connection, given\n // networkPartitionKey, request\u2019s current URL\u2019s origin,\n // includeCredentials, and forceNewConnection.\n // TODO\n }\n\n // 9. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. If connection is failure, then return a network error.\n\n // 2. Set timingInfo\u2019s final connection timing info to the result of\n // calling clamp and coarsen connection timing info with connection\u2019s\n // timing info, timingInfo\u2019s post-redirect start time, and fetchParams\u2019s\n // cross-origin isolated capability.\n\n // 3. If connection is not an HTTP/2 connection, request\u2019s body is non-null,\n // and request\u2019s body\u2019s source is null, then append (`Transfer-Encoding`,\n // `chunked`) to request\u2019s header list.\n\n // 4. Set timingInfo\u2019s final network-request start time to the coarsened\n // shared current time given fetchParams\u2019s cross-origin isolated\n // capability.\n\n // 5. Set response to the result of making an HTTP request over connection\n // using request with the following caveats:\n\n // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS]\n // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH]\n\n // - If request\u2019s body is non-null, and request\u2019s body\u2019s source is null,\n // then the user agent may have a buffer of up to 64 kibibytes and store\n // a part of request\u2019s body in that buffer. If the user agent reads from\n // request\u2019s body beyond that buffer\u2019s size and the user agent needs to\n // resend request, then instead return a network error.\n\n // - Set timingInfo\u2019s final network-response start time to the coarsened\n // shared current time given fetchParams\u2019s cross-origin isolated capability,\n // immediately after the user agent\u2019s HTTP parser receives the first byte\n // of the response (e.g., frame header bytes for HTTP/2 or response status\n // line for HTTP/1.x).\n\n // - Wait until all the headers are transmitted.\n\n // - Any responses whose status is in the range 100 to 199, inclusive,\n // and is not 101, are to be ignored, except for the purposes of setting\n // timingInfo\u2019s final network-response start time above.\n\n // - If request\u2019s header list contains `Transfer-Encoding`/`chunked` and\n // response is transferred via HTTP/1.0 or older, then return a network\n // error.\n\n // - If the HTTP request results in a TLS client certificate dialog, then:\n\n // 1. If request\u2019s window is an environment settings object, make the\n // dialog available in request\u2019s window.\n\n // 2. Otherwise, return a network error.\n\n // To transmit request\u2019s body body, run these steps:\n let requestBody = null\n // 1. If body is null and fetchParams\u2019s process request end-of-body is\n // non-null, then queue a fetch task given fetchParams\u2019s process request\n // end-of-body and fetchParams\u2019s task destination.\n if (request.body == null && fetchParams.processRequestEndOfBody) {\n queueMicrotask(() => fetchParams.processRequestEndOfBody())\n } else if (request.body != null) {\n // 2. Otherwise, if body is non-null:\n\n // 1. Let processBodyChunk given bytes be these steps:\n const processBodyChunk = async function * (bytes) {\n // 1. If the ongoing fetch is terminated, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. Run this step in parallel: transmit bytes.\n yield bytes\n\n // 3. If fetchParams\u2019s process request body is non-null, then run\n // fetchParams\u2019s process request body given bytes\u2019s length.\n fetchParams.processRequestBodyChunkLength?.(bytes.byteLength)\n }\n\n // 2. Let processEndOfBody be these steps:\n const processEndOfBody = () => {\n // 1. If fetchParams is canceled, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. If fetchParams\u2019s process request end-of-body is non-null,\n // then run fetchParams\u2019s process request end-of-body.\n if (fetchParams.processRequestEndOfBody) {\n fetchParams.processRequestEndOfBody()\n }\n }\n\n // 3. Let processBodyError given e be these steps:\n const processBodyError = (e) => {\n // 1. If fetchParams is canceled, then abort these steps.\n if (isCancelled(fetchParams)) {\n return\n }\n\n // 2. If e is an \"AbortError\" DOMException, then abort fetchParams\u2019s controller.\n if (e.name === 'AbortError') {\n fetchParams.controller.abort()\n } else {\n fetchParams.controller.terminate(e)\n }\n }\n\n // 4. Incrementally read request\u2019s body given processBodyChunk, processEndOfBody,\n // processBodyError, and fetchParams\u2019s task destination.\n requestBody = (async function * () {\n try {\n for await (const bytes of request.body.stream) {\n yield * processBodyChunk(bytes)\n }\n processEndOfBody()\n } catch (err) {\n processBodyError(err)\n }\n })()\n }\n\n try {\n // socket is only provided for websockets\n const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody })\n\n if (socket) {\n response = makeResponse({ status, statusText, headersList, socket })\n } else {\n const iterator = body[Symbol.asyncIterator]()\n fetchParams.controller.next = () => iterator.next()\n\n response = makeResponse({ status, statusText, headersList })\n }\n } catch (err) {\n // 10. If aborted, then:\n if (err.name === 'AbortError') {\n // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame.\n fetchParams.controller.connection.destroy()\n\n // 2. Return the appropriate network error for fetchParams.\n return makeAppropriateNetworkError(fetchParams, err)\n }\n\n return makeNetworkError(err)\n }\n\n // 11. Let pullAlgorithm be an action that resumes the ongoing fetch\n // if it is suspended.\n const pullAlgorithm = () => {\n return fetchParams.controller.resume()\n }\n\n // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams\u2019s\n // controller with reason, given reason.\n const cancelAlgorithm = (reason) => {\n // If the aborted fetch was already terminated, then we do not\n // need to do anything.\n if (!isCancelled(fetchParams)) {\n fetchParams.controller.abort(reason)\n }\n }\n\n // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by\n // the user agent.\n // TODO\n\n // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object\n // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent.\n // TODO\n\n // 15. Let stream be a new ReadableStream.\n // 16. Set up stream with byte reading support with pullAlgorithm set to pullAlgorithm,\n // cancelAlgorithm set to cancelAlgorithm.\n const stream = new ReadableStream(\n {\n start (controller) {\n fetchParams.controller.controller = controller\n },\n pull: pullAlgorithm,\n cancel: cancelAlgorithm,\n type: 'bytes'\n }\n )\n\n // 17. Run these steps, but abort when the ongoing fetch is terminated:\n\n // 1. Set response\u2019s body to a new body whose stream is stream.\n response.body = { stream, source: null, length: null }\n\n // 2. If response is not a network error and request\u2019s cache mode is\n // not \"no-store\", then update response in httpCache for request.\n // TODO\n\n // 3. If includeCredentials is true and the user agent is not configured\n // to block cookies for request (see section 7 of [COOKIES]), then run the\n // \"set-cookie-string\" parsing algorithm (see section 5.2 of [COOKIES]) on\n // the value of each header whose name is a byte-case-insensitive match for\n // `Set-Cookie` in response\u2019s header list, if any, and request\u2019s current URL.\n // TODO\n\n // 18. If aborted, then:\n // TODO\n\n // 19. Run these steps in parallel:\n\n // 1. Run these steps, but abort when fetchParams is canceled:\n if (!fetchParams.controller.resume) {\n fetchParams.controller.on('terminated', onAborted)\n }\n\n fetchParams.controller.resume = async () => {\n // 1. While true\n while (true) {\n // 1-3. See onData...\n\n // 4. Set bytes to the result of handling content codings given\n // codings and bytes.\n let bytes\n let isFailure\n try {\n const { done, value } = await fetchParams.controller.next()\n\n if (isAborted(fetchParams)) {\n break\n }\n\n bytes = done ? undefined : value\n } catch (err) {\n if (fetchParams.controller.ended && !timingInfo.encodedBodySize) {\n // zlib doesn't like empty streams.\n bytes = undefined\n } else {\n bytes = err\n\n // err may be propagated from the result of calling readablestream.cancel,\n // which might not be an error. https://github.com/nodejs/undici/issues/2009\n isFailure = true\n }\n }\n\n if (bytes === undefined) {\n // 2. Otherwise, if the bytes transmission for response\u2019s message\n // body is done normally and stream is readable, then close\n // stream, finalize response for fetchParams and response, and\n // abort these in-parallel steps.\n readableStreamClose(fetchParams.controller.controller)\n\n finalizeResponse(fetchParams, response)\n\n return\n }\n\n // 5. Increase timingInfo\u2019s decoded body size by bytes\u2019s length.\n timingInfo.decodedBodySize += bytes?.byteLength ?? 0\n\n // 6. If bytes is failure, then terminate fetchParams\u2019s controller.\n if (isFailure) {\n fetchParams.controller.terminate(bytes)\n return\n }\n\n // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes\n // into stream.\n const buffer = new Uint8Array(bytes)\n if (buffer.byteLength) {\n fetchParams.controller.controller.enqueue(buffer)\n }\n\n // 8. If stream is errored, then terminate the ongoing fetch.\n if (isErrored(stream)) {\n fetchParams.controller.terminate()\n return\n }\n\n // 9. If stream doesn\u2019t need more data ask the user agent to suspend\n // the ongoing fetch.\n if (fetchParams.controller.controller.desiredSize <= 0) {\n return\n }\n }\n }\n\n // 2. If aborted, then:\n function onAborted (reason) {\n // 2. If fetchParams is aborted, then:\n if (isAborted(fetchParams)) {\n // 1. Set response\u2019s aborted flag.\n response.aborted = true\n\n // 2. If stream is readable, then error stream with the result of\n // deserialize a serialized abort reason given fetchParams\u2019s\n // controller\u2019s serialized abort reason and an\n // implementation-defined realm.\n if (isReadable(stream)) {\n fetchParams.controller.controller.error(\n fetchParams.controller.serializedAbortReason\n )\n }\n } else {\n // 3. Otherwise, if stream is readable, error stream with a TypeError.\n if (isReadable(stream)) {\n fetchParams.controller.controller.error(new TypeError('terminated', {\n cause: isErrorLike(reason) ? reason : undefined\n }))\n }\n }\n\n // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame.\n // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so.\n fetchParams.controller.connection.destroy()\n }\n\n // 20. Return response.\n return response\n\n function dispatch ({ body }) {\n const url = requestCurrentURL(request)\n /** @type {import('../../..').Agent} */\n const agent = fetchParams.controller.dispatcher\n\n const path = url.pathname + url.search\n const hasTrailingQuestionMark = url.search.length === 0 && url.href[url.href.length - url.hash.length - 1] === '?'\n\n return new Promise((resolve, reject) => agent.dispatch(\n {\n path: hasTrailingQuestionMark ? `${path}?` : path,\n origin: url.origin,\n method: request.method,\n body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body,\n headers: request.headersList.entries,\n maxRedirections: 0,\n upgrade: request.mode === 'websocket' ? 'websocket' : undefined\n },\n {\n body: null,\n abort: null,\n\n onConnect (abort) {\n // TODO (fix): Do we need connection here?\n const { connection } = fetchParams.controller\n\n // Set timingInfo\u2019s final connection timing info to the result of calling clamp and coarsen\n // connection timing info with connection\u2019s timing info, timingInfo\u2019s post-redirect start\n // time, and fetchParams\u2019s cross-origin isolated capability.\n // TODO: implement connection timing\n timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(undefined, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability)\n\n if (connection.destroyed) {\n abort(new DOMException('The operation was aborted.', 'AbortError'))\n } else {\n fetchParams.controller.on('terminated', abort)\n this.abort = connection.abort = abort\n }\n\n // Set timingInfo\u2019s final network-request start time to the coarsened shared current time given\n // fetchParams\u2019s cross-origin isolated capability.\n timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability)\n },\n\n onResponseStarted () {\n // Set timingInfo\u2019s final network-response start time to the coarsened shared current\n // time given fetchParams\u2019s cross-origin isolated capability, immediately after the\n // user agent\u2019s HTTP parser receives the first byte of the response (e.g., frame header\n // bytes for HTTP/2 or response status line for HTTP/1.x).\n timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability)\n },\n\n onHeaders (status, rawHeaders, resume, statusText) {\n if (status < 200) {\n return false\n }\n\n const headersList = new HeadersList()\n\n for (let i = 0; i < rawHeaders.length; i += 2) {\n const nameStr = bufferToLowerCasedHeaderName(rawHeaders[i])\n const value = rawHeaders[i + 1]\n if (Array.isArray(value) && !Buffer.isBuffer(rawHeaders[i + 1])) {\n for (const val of value) {\n headersList.append(nameStr, val.toString('latin1'), true)\n }\n } else {\n headersList.append(nameStr, value.toString('latin1'), true)\n }\n }\n const location = headersList.get('location', true)\n\n this.body = new Readable({ read: resume })\n\n const willFollow = location && request.redirect === 'follow' &&\n redirectStatusSet.has(status)\n\n const decoders = []\n\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding\n if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) {\n // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1\n const contentEncoding = headersList.get('content-encoding', true)\n // \"All content-coding values are case-insensitive...\"\n /** @type {string[]} */\n const codings = contentEncoding ? contentEncoding.toLowerCase().split(',') : []\n\n // Limit the number of content-encodings to prevent resource exhaustion.\n // CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206).\n const maxContentEncodings = 5\n if (codings.length > maxContentEncodings) {\n reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`))\n return true\n }\n\n for (let i = codings.length - 1; i >= 0; --i) {\n const coding = codings[i].trim()\n // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2\n if (coding === 'x-gzip' || coding === 'gzip') {\n decoders.push(zlib.createGunzip({\n // Be less strict when decoding compressed responses, since sometimes\n // servers send slightly invalid responses that are still accepted\n // by common browsers.\n // Always using Z_SYNC_FLUSH is what cURL does.\n flush: zlib.constants.Z_SYNC_FLUSH,\n finishFlush: zlib.constants.Z_SYNC_FLUSH\n }))\n } else if (coding === 'deflate') {\n decoders.push(createInflate({\n flush: zlib.constants.Z_SYNC_FLUSH,\n finishFlush: zlib.constants.Z_SYNC_FLUSH\n }))\n } else if (coding === 'br') {\n decoders.push(zlib.createBrotliDecompress({\n flush: zlib.constants.BROTLI_OPERATION_FLUSH,\n finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH\n }))\n } else if (coding === 'zstd' && hasZstd) {\n decoders.push(zlib.createZstdDecompress({\n flush: zlib.constants.ZSTD_e_continue,\n finishFlush: zlib.constants.ZSTD_e_end\n }))\n } else {\n decoders.length = 0\n break\n }\n }\n }\n\n const onError = this.onError.bind(this)\n\n resolve({\n status,\n statusText,\n headersList,\n body: decoders.length\n ? pipeline(this.body, ...decoders, (err) => {\n if (err) {\n this.onError(err)\n }\n }).on('error', onError)\n : this.body.on('error', onError)\n })\n\n return true\n },\n\n onData (chunk) {\n if (fetchParams.controller.dump) {\n return\n }\n\n // 1. If one or more bytes have been transmitted from response\u2019s\n // message body, then:\n\n // 1. Let bytes be the transmitted bytes.\n const bytes = chunk\n\n // 2. Let codings be the result of extracting header list values\n // given `Content-Encoding` and response\u2019s header list.\n // See pullAlgorithm.\n\n // 3. Increase timingInfo\u2019s encoded body size by bytes\u2019s length.\n timingInfo.encodedBodySize += bytes.byteLength\n\n // 4. See pullAlgorithm...\n\n return this.body.push(bytes)\n },\n\n onComplete () {\n if (this.abort) {\n fetchParams.controller.off('terminated', this.abort)\n }\n\n fetchParams.controller.ended = true\n\n this.body.push(null)\n },\n\n onError (error) {\n if (this.abort) {\n fetchParams.controller.off('terminated', this.abort)\n }\n\n this.body?.destroy(error)\n\n fetchParams.controller.terminate(error)\n\n reject(error)\n },\n\n onRequestUpgrade (_controller, status, headers, socket) {\n // We need to support 200 for websocket over h2 as per RFC-8441\n // Absence of session means H1\n if ((socket.session != null && status !== 200) || (socket.session == null && status !== 101)) {\n return false\n }\n\n const headersList = new HeadersList()\n\n for (const [name, value] of Object.entries(headers)) {\n if (value == null) {\n continue\n }\n\n const headerName = name.toLowerCase()\n\n if (Array.isArray(value)) {\n for (const entry of value) {\n headersList.append(headerName, String(entry), true)\n }\n } else {\n headersList.append(headerName, String(value), true)\n }\n }\n\n resolve({\n status,\n statusText: STATUS_CODES[status],\n headersList,\n socket\n })\n\n return true\n },\n\n onUpgrade (status, rawHeaders, socket) {\n // We need to support 200 for websocket over h2 as per RFC-8441\n // Absence of session means H1\n if ((socket.session != null && status !== 200) || (socket.session == null && status !== 101)) {\n return false\n }\n\n const headersList = new HeadersList()\n\n for (let i = 0; i < rawHeaders.length; i += 2) {\n const nameStr = bufferToLowerCasedHeaderName(rawHeaders[i])\n const value = rawHeaders[i + 1]\n if (Array.isArray(value) && !Buffer.isBuffer(rawHeaders[i + 1])) {\n for (const val of value) {\n headersList.append(nameStr, val.toString('latin1'), true)\n }\n } else {\n headersList.append(nameStr, value.toString('latin1'), true)\n }\n }\n\n resolve({\n status,\n statusText: STATUS_CODES[status],\n headersList,\n socket\n })\n\n return true\n }\n }\n ))\n }\n}\n\nmodule.exports = {\n fetch,\n Fetch,\n fetching,\n finalizeAndReportTiming\n}\n", "'use strict'\n\nconst assert = require('node:assert')\nconst { URLSerializer } = require('../fetch/data-url')\nconst { isValidHeaderName } = require('../fetch/util')\n\n/**\n * @see https://url.spec.whatwg.org/#concept-url-equals\n * @param {URL} A\n * @param {URL} B\n * @param {boolean | undefined} excludeFragment\n * @returns {boolean}\n */\nfunction urlEquals (A, B, excludeFragment = false) {\n const serializedA = URLSerializer(A, excludeFragment)\n\n const serializedB = URLSerializer(B, excludeFragment)\n\n return serializedA === serializedB\n}\n\n/**\n * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262\n * @param {string} header\n */\nfunction getFieldValues (header) {\n assert(header !== null)\n\n const values = []\n\n for (let value of header.split(',')) {\n value = value.trim()\n\n if (isValidHeaderName(value)) {\n values.push(value)\n }\n }\n\n return values\n}\n\nmodule.exports = {\n urlEquals,\n getFieldValues\n}\n", "'use strict'\n\nconst assert = require('node:assert')\n\nconst { kConstruct } = require('../../core/symbols')\nconst { urlEquals, getFieldValues } = require('./util')\nconst { kEnumerableProperty, isDisturbed } = require('../../core/util')\nconst { webidl } = require('../webidl')\nconst { cloneResponse, fromInnerResponse, getResponseState } = require('../fetch/response')\nconst { Request, fromInnerRequest, getRequestState } = require('../fetch/request')\nconst { fetching } = require('../fetch/index')\nconst { urlIsHttpHttpsScheme, readAllBytes } = require('../fetch/util')\nconst { createDeferredPromise } = require('../../util/promise')\n\n/**\n * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation\n * @typedef {Object} CacheBatchOperation\n * @property {'delete' | 'put'} type\n * @property {any} request\n * @property {any} response\n * @property {import('../../../types/cache').CacheQueryOptions} options\n */\n\n/**\n * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list\n * @typedef {[any, any][]} requestResponseList\n */\n\nclass Cache {\n /**\n * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list\n * @type {requestResponseList}\n */\n #relevantRequestResponseList\n\n constructor () {\n if (arguments[0] !== kConstruct) {\n webidl.illegalConstructor()\n }\n\n webidl.util.markAsUncloneable(this)\n this.#relevantRequestResponseList = arguments[1]\n }\n\n async match (request, options = {}) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.match'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options, prefix, 'options')\n\n const p = this.#internalMatchAll(request, options, 1)\n\n if (p.length === 0) {\n return\n }\n\n return p[0]\n }\n\n async matchAll (request = undefined, options = {}) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.matchAll'\n if (request !== undefined) request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options, prefix, 'options')\n\n return this.#internalMatchAll(request, options)\n }\n\n async add (request) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.add'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n request = webidl.converters.RequestInfo(request)\n\n // 1.\n const requests = [request]\n\n // 2.\n const responseArrayPromise = this.addAll(requests)\n\n // 3.\n return await responseArrayPromise\n }\n\n async addAll (requests) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.addAll'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n // 1.\n const responsePromises = []\n\n // 2.\n const requestList = []\n\n // 3.\n for (let request of requests) {\n if (request === undefined) {\n throw webidl.errors.conversionFailed({\n prefix,\n argument: 'Argument 1',\n types: ['undefined is not allowed']\n })\n }\n\n request = webidl.converters.RequestInfo(request)\n\n if (typeof request === 'string') {\n continue\n }\n\n // 3.1\n const r = getRequestState(request)\n\n // 3.2\n if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Expected http/s scheme when method is not GET.'\n })\n }\n }\n\n // 4.\n /** @type {ReturnType[]} */\n const fetchControllers = []\n\n // 5.\n for (const request of requests) {\n // 5.1\n const r = getRequestState(new Request(request))\n\n // 5.2\n if (!urlIsHttpHttpsScheme(r.url)) {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Expected http/s scheme.'\n })\n }\n\n // 5.4\n r.initiator = 'fetch'\n r.destination = 'subresource'\n\n // 5.5\n requestList.push(r)\n\n // 5.6\n const responsePromise = createDeferredPromise()\n\n // 5.7\n fetchControllers.push(fetching({\n request: r,\n processResponse (response) {\n // 1.\n if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) {\n responsePromise.reject(webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'Received an invalid status code or the request failed.'\n }))\n } else if (response.headersList.contains('vary')) { // 2.\n // 2.1\n const fieldValues = getFieldValues(response.headersList.get('vary'))\n\n // 2.2\n for (const fieldValue of fieldValues) {\n // 2.2.1\n if (fieldValue === '*') {\n responsePromise.reject(webidl.errors.exception({\n header: 'Cache.addAll',\n message: 'invalid vary field value'\n }))\n\n for (const controller of fetchControllers) {\n controller.abort()\n }\n\n return\n }\n }\n }\n },\n processResponseEndOfBody (response) {\n // 1.\n if (response.aborted) {\n responsePromise.reject(new DOMException('aborted', 'AbortError'))\n return\n }\n\n // 2.\n responsePromise.resolve(response)\n }\n }))\n\n // 5.8\n responsePromises.push(responsePromise.promise)\n }\n\n // 6.\n const p = Promise.all(responsePromises)\n\n // 7.\n const responses = await p\n\n // 7.1\n const operations = []\n\n // 7.2\n let index = 0\n\n // 7.3\n for (const response of responses) {\n // 7.3.1\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'put', // 7.3.2\n request: requestList[index], // 7.3.3\n response // 7.3.4\n }\n\n operations.push(operation) // 7.3.5\n\n index++ // 7.3.6\n }\n\n // 7.5\n const cacheJobPromise = createDeferredPromise()\n\n // 7.6.1\n let errorData = null\n\n // 7.6.2\n try {\n this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n // 7.6.3\n queueMicrotask(() => {\n // 7.6.3.1\n if (errorData === null) {\n cacheJobPromise.resolve(undefined)\n } else {\n // 7.6.3.2\n cacheJobPromise.reject(errorData)\n }\n })\n\n // 7.7\n return cacheJobPromise.promise\n }\n\n async put (request, response) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.put'\n webidl.argumentLengthCheck(arguments, 2, prefix)\n\n request = webidl.converters.RequestInfo(request)\n response = webidl.converters.Response(response, prefix, 'response')\n\n // 1.\n let innerRequest = null\n\n // 2.\n if (webidl.is.Request(request)) {\n innerRequest = getRequestState(request)\n } else { // 3.\n innerRequest = getRequestState(new Request(request))\n }\n\n // 4.\n if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Expected an http/s scheme when method is not GET'\n })\n }\n\n // 5.\n const innerResponse = getResponseState(response)\n\n // 6.\n if (innerResponse.status === 206) {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Got 206 status'\n })\n }\n\n // 7.\n if (innerResponse.headersList.contains('vary')) {\n // 7.1.\n const fieldValues = getFieldValues(innerResponse.headersList.get('vary'))\n\n // 7.2.\n for (const fieldValue of fieldValues) {\n // 7.2.1\n if (fieldValue === '*') {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Got * vary field value'\n })\n }\n }\n }\n\n // 8.\n if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) {\n throw webidl.errors.exception({\n header: prefix,\n message: 'Response body is locked or disturbed'\n })\n }\n\n // 9.\n const clonedResponse = cloneResponse(innerResponse)\n\n // 10.\n const bodyReadPromise = createDeferredPromise()\n\n // 11.\n if (innerResponse.body != null) {\n // 11.1\n const stream = innerResponse.body.stream\n\n // 11.2\n const reader = stream.getReader()\n\n // 11.3\n readAllBytes(reader, bodyReadPromise.resolve, bodyReadPromise.reject)\n } else {\n bodyReadPromise.resolve(undefined)\n }\n\n // 12.\n /** @type {CacheBatchOperation[]} */\n const operations = []\n\n // 13.\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'put', // 14.\n request: innerRequest, // 15.\n response: clonedResponse // 16.\n }\n\n // 17.\n operations.push(operation)\n\n // 19.\n const bytes = await bodyReadPromise.promise\n\n if (clonedResponse.body != null) {\n clonedResponse.body.source = bytes\n }\n\n // 19.1\n const cacheJobPromise = createDeferredPromise()\n\n // 19.2.1\n let errorData = null\n\n // 19.2.2\n try {\n this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n // 19.2.3\n queueMicrotask(() => {\n // 19.2.3.1\n if (errorData === null) {\n cacheJobPromise.resolve()\n } else { // 19.2.3.2\n cacheJobPromise.reject(errorData)\n }\n })\n\n return cacheJobPromise.promise\n }\n\n async delete (request, options = {}) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.delete'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options, prefix, 'options')\n\n /**\n * @type {Request}\n */\n let r = null\n\n if (webidl.is.Request(request)) {\n r = getRequestState(request)\n\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return false\n }\n } else {\n assert(typeof request === 'string')\n\n r = getRequestState(new Request(request))\n }\n\n /** @type {CacheBatchOperation[]} */\n const operations = []\n\n /** @type {CacheBatchOperation} */\n const operation = {\n type: 'delete',\n request: r,\n options\n }\n\n operations.push(operation)\n\n const cacheJobPromise = createDeferredPromise()\n\n let errorData = null\n let requestResponses\n\n try {\n requestResponses = this.#batchCacheOperations(operations)\n } catch (e) {\n errorData = e\n }\n\n queueMicrotask(() => {\n if (errorData === null) {\n cacheJobPromise.resolve(!!requestResponses?.length)\n } else {\n cacheJobPromise.reject(errorData)\n }\n })\n\n return cacheJobPromise.promise\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys\n * @param {any} request\n * @param {import('../../../types/cache').CacheQueryOptions} options\n * @returns {Promise}\n */\n async keys (request = undefined, options = {}) {\n webidl.brandCheck(this, Cache)\n\n const prefix = 'Cache.keys'\n\n if (request !== undefined) request = webidl.converters.RequestInfo(request)\n options = webidl.converters.CacheQueryOptions(options, prefix, 'options')\n\n // 1.\n let r = null\n\n // 2.\n if (request !== undefined) {\n // 2.1\n if (webidl.is.Request(request)) {\n // 2.1.1\n r = getRequestState(request)\n\n // 2.1.2\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return []\n }\n } else if (typeof request === 'string') { // 2.2\n r = getRequestState(new Request(request))\n }\n }\n\n // 4.\n const promise = createDeferredPromise()\n\n // 5.\n // 5.1\n const requests = []\n\n // 5.2\n if (request === undefined) {\n // 5.2.1\n for (const requestResponse of this.#relevantRequestResponseList) {\n // 5.2.1.1\n requests.push(requestResponse[0])\n }\n } else { // 5.3\n // 5.3.1\n const requestResponses = this.#queryCache(r, options)\n\n // 5.3.2\n for (const requestResponse of requestResponses) {\n // 5.3.2.1\n requests.push(requestResponse[0])\n }\n }\n\n // 5.4\n queueMicrotask(() => {\n // 5.4.1\n const requestList = []\n\n // 5.4.2\n for (const request of requests) {\n const requestObject = fromInnerRequest(\n request,\n undefined,\n new AbortController().signal,\n 'immutable'\n )\n // 5.4.2.1\n requestList.push(requestObject)\n }\n\n // 5.4.3\n promise.resolve(Object.freeze(requestList))\n })\n\n return promise.promise\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm\n * @param {CacheBatchOperation[]} operations\n * @returns {requestResponseList}\n */\n #batchCacheOperations (operations) {\n // 1.\n const cache = this.#relevantRequestResponseList\n\n // 2.\n const backupCache = [...cache]\n\n // 3.\n const addedItems = []\n\n // 4.1\n const resultList = []\n\n try {\n // 4.2\n for (const operation of operations) {\n // 4.2.1\n if (operation.type !== 'delete' && operation.type !== 'put') {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'operation type does not match \"delete\" or \"put\"'\n })\n }\n\n // 4.2.2\n if (operation.type === 'delete' && operation.response != null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'delete operation should not have an associated response'\n })\n }\n\n // 4.2.3\n if (this.#queryCache(operation.request, operation.options, addedItems).length) {\n throw new DOMException('???', 'InvalidStateError')\n }\n\n // 4.2.4\n let requestResponses\n\n // 4.2.5\n if (operation.type === 'delete') {\n // 4.2.5.1\n requestResponses = this.#queryCache(operation.request, operation.options)\n\n // TODO: the spec is wrong, this is needed to pass WPTs\n if (requestResponses.length === 0) {\n return []\n }\n\n // 4.2.5.2\n for (const requestResponse of requestResponses) {\n const idx = cache.indexOf(requestResponse)\n assert(idx !== -1)\n\n // 4.2.5.2.1\n cache.splice(idx, 1)\n }\n } else if (operation.type === 'put') { // 4.2.6\n // 4.2.6.1\n if (operation.response == null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'put operation should have an associated response'\n })\n }\n\n // 4.2.6.2\n const r = operation.request\n\n // 4.2.6.3\n if (!urlIsHttpHttpsScheme(r.url)) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'expected http or https scheme'\n })\n }\n\n // 4.2.6.4\n if (r.method !== 'GET') {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'not get method'\n })\n }\n\n // 4.2.6.5\n if (operation.options != null) {\n throw webidl.errors.exception({\n header: 'Cache.#batchCacheOperations',\n message: 'options must not be defined'\n })\n }\n\n // 4.2.6.6\n requestResponses = this.#queryCache(operation.request)\n\n // 4.2.6.7\n for (const requestResponse of requestResponses) {\n const idx = cache.indexOf(requestResponse)\n assert(idx !== -1)\n\n // 4.2.6.7.1\n cache.splice(idx, 1)\n }\n\n // 4.2.6.8\n cache.push([operation.request, operation.response])\n\n // 4.2.6.10\n addedItems.push([operation.request, operation.response])\n }\n\n // 4.2.7\n resultList.push([operation.request, operation.response])\n }\n\n // 4.3\n return resultList\n } catch (e) { // 5.\n // 5.1\n this.#relevantRequestResponseList.length = 0\n\n // 5.2\n this.#relevantRequestResponseList = backupCache\n\n // 5.3\n throw e\n }\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#query-cache\n * @param {any} requestQuery\n * @param {import('../../../types/cache').CacheQueryOptions} options\n * @param {requestResponseList} targetStorage\n * @returns {requestResponseList}\n */\n #queryCache (requestQuery, options, targetStorage) {\n /** @type {requestResponseList} */\n const resultList = []\n\n const storage = targetStorage ?? this.#relevantRequestResponseList\n\n for (const requestResponse of storage) {\n const [cachedRequest, cachedResponse] = requestResponse\n if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) {\n resultList.push(requestResponse)\n }\n }\n\n return resultList\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm\n * @param {any} requestQuery\n * @param {any} request\n * @param {any | null} response\n * @param {import('../../../types/cache').CacheQueryOptions | undefined} options\n * @returns {boolean}\n */\n #requestMatchesCachedItem (requestQuery, request, response = null, options) {\n // if (options?.ignoreMethod === false && request.method === 'GET') {\n // return false\n // }\n\n const queryURL = new URL(requestQuery.url)\n\n const cachedURL = new URL(request.url)\n\n if (options?.ignoreSearch) {\n cachedURL.search = ''\n\n queryURL.search = ''\n }\n\n if (!urlEquals(queryURL, cachedURL, true)) {\n return false\n }\n\n if (\n response == null ||\n options?.ignoreVary ||\n !response.headersList.contains('vary')\n ) {\n return true\n }\n\n const fieldValues = getFieldValues(response.headersList.get('vary'))\n\n for (const fieldValue of fieldValues) {\n if (fieldValue === '*') {\n return false\n }\n\n const requestValue = request.headersList.get(fieldValue)\n const queryValue = requestQuery.headersList.get(fieldValue)\n\n // If one has the header and the other doesn't, or one has\n // a different value than the other, return false\n if (requestValue !== queryValue) {\n return false\n }\n }\n\n return true\n }\n\n #internalMatchAll (request, options, maxResponses = Infinity) {\n // 1.\n let r = null\n\n // 2.\n if (request !== undefined) {\n if (webidl.is.Request(request)) {\n // 2.1.1\n r = getRequestState(request)\n\n // 2.1.2\n if (r.method !== 'GET' && !options.ignoreMethod) {\n return []\n }\n } else if (typeof request === 'string') {\n // 2.2.1\n r = getRequestState(new Request(request))\n }\n }\n\n // 5.\n // 5.1\n const responses = []\n\n // 5.2\n if (request === undefined) {\n // 5.2.1\n for (const requestResponse of this.#relevantRequestResponseList) {\n responses.push(requestResponse[1])\n }\n } else { // 5.3\n // 5.3.1\n const requestResponses = this.#queryCache(r, options)\n\n // 5.3.2\n for (const requestResponse of requestResponses) {\n responses.push(requestResponse[1])\n }\n }\n\n // 5.4\n // We don't implement CORs so we don't need to loop over the responses, yay!\n\n // 5.5.1\n const responseList = []\n\n // 5.5.2\n for (const response of responses) {\n // 5.5.2.1\n const responseObject = fromInnerResponse(cloneResponse(response), 'immutable')\n\n responseList.push(responseObject)\n\n if (responseList.length >= maxResponses) {\n break\n }\n }\n\n // 6.\n return Object.freeze(responseList)\n }\n}\n\nObject.defineProperties(Cache.prototype, {\n [Symbol.toStringTag]: {\n value: 'Cache',\n configurable: true\n },\n match: kEnumerableProperty,\n matchAll: kEnumerableProperty,\n add: kEnumerableProperty,\n addAll: kEnumerableProperty,\n put: kEnumerableProperty,\n delete: kEnumerableProperty,\n keys: kEnumerableProperty\n})\n\nconst cacheQueryOptionConverters = [\n {\n key: 'ignoreSearch',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'ignoreMethod',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'ignoreVary',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n }\n]\n\nwebidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters)\n\nwebidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([\n ...cacheQueryOptionConverters,\n {\n key: 'cacheName',\n converter: webidl.converters.DOMString\n }\n])\n\nwebidl.converters.Response = webidl.interfaceConverter(\n webidl.is.Response,\n 'Response'\n)\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.RequestInfo\n)\n\nmodule.exports = {\n Cache\n}\n", "'use strict'\n\nconst { Cache } = require('./cache')\nconst { webidl } = require('../webidl')\nconst { kEnumerableProperty } = require('../../core/util')\nconst { kConstruct } = require('../../core/symbols')\n\nclass CacheStorage {\n /**\n * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map\n * @type {Map}\n */\n async has (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n\n const prefix = 'CacheStorage.has'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName')\n\n // 2.1.1\n // 2.2\n return this.#caches.has(cacheName)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open\n * @param {string} cacheName\n * @returns {Promise}\n */\n async open (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n\n const prefix = 'CacheStorage.open'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName')\n\n // 2.1\n if (this.#caches.has(cacheName)) {\n // await caches.open('v1') !== await caches.open('v1')\n\n // 2.1.1\n const cache = this.#caches.get(cacheName)\n\n // 2.1.1.1\n return new Cache(kConstruct, cache)\n }\n\n // 2.2\n const cache = []\n\n // 2.3\n this.#caches.set(cacheName, cache)\n\n // 2.4\n return new Cache(kConstruct, cache)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete\n * @param {string} cacheName\n * @returns {Promise}\n */\n async delete (cacheName) {\n webidl.brandCheck(this, CacheStorage)\n\n const prefix = 'CacheStorage.delete'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName')\n\n return this.#caches.delete(cacheName)\n }\n\n /**\n * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys\n * @returns {Promise}\n */\n async keys () {\n webidl.brandCheck(this, CacheStorage)\n\n // 2.1\n const keys = this.#caches.keys()\n\n // 2.2\n return [...keys]\n }\n}\n\nObject.defineProperties(CacheStorage.prototype, {\n [Symbol.toStringTag]: {\n value: 'CacheStorage',\n configurable: true\n },\n match: kEnumerableProperty,\n has: kEnumerableProperty,\n open: kEnumerableProperty,\n delete: kEnumerableProperty,\n keys: kEnumerableProperty\n})\n\nmodule.exports = {\n CacheStorage\n}\n", "'use strict'\n\n// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size\nconst maxAttributeValueSize = 1024\n\n// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size\nconst maxNameValuePairSize = 4096\n\nmodule.exports = {\n maxAttributeValueSize,\n maxNameValuePairSize\n}\n", "'use strict'\n\n/**\n * @param {string} value\n * @returns {boolean}\n */\nfunction isCTLExcludingHtab (value) {\n for (let i = 0; i < value.length; ++i) {\n const code = value.charCodeAt(i)\n\n if (\n (code >= 0x00 && code <= 0x08) ||\n (code >= 0x0A && code <= 0x1F) ||\n code === 0x7F\n ) {\n return true\n }\n }\n return false\n}\n\n/**\n CHAR = \n token = 1*\n separators = \"(\" | \")\" | \"<\" | \">\" | \"@\"\n | \",\" | \";\" | \":\" | \"\\\" | <\">\n | \"/\" | \"[\" | \"]\" | \"?\" | \"=\"\n | \"{\" | \"}\" | SP | HT\n * @param {string} name\n */\nfunction validateCookieName (name) {\n for (let i = 0; i < name.length; ++i) {\n const code = name.charCodeAt(i)\n\n if (\n code < 0x21 || // exclude CTLs (0-31), SP and HT\n code > 0x7E || // exclude non-ascii and DEL\n code === 0x22 || // \"\n code === 0x28 || // (\n code === 0x29 || // )\n code === 0x3C || // <\n code === 0x3E || // >\n code === 0x40 || // @\n code === 0x2C || // ,\n code === 0x3B || // ;\n code === 0x3A || // :\n code === 0x5C || // \\\n code === 0x2F || // /\n code === 0x5B || // [\n code === 0x5D || // ]\n code === 0x3F || // ?\n code === 0x3D || // =\n code === 0x7B || // {\n code === 0x7D // }\n ) {\n throw new Error('Invalid cookie name')\n }\n }\n}\n\n/**\n cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )\n cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n ; US-ASCII characters excluding CTLs,\n ; whitespace DQUOTE, comma, semicolon,\n ; and backslash\n * @param {string} value\n */\nfunction validateCookieValue (value) {\n let len = value.length\n let i = 0\n\n // if the value is wrapped in DQUOTE\n if (value[0] === '\"') {\n if (len === 1 || value[len - 1] !== '\"') {\n throw new Error('Invalid cookie value')\n }\n --len\n ++i\n }\n\n while (i < len) {\n const code = value.charCodeAt(i++)\n\n if (\n code < 0x21 || // exclude CTLs (0-31)\n code > 0x7E || // non-ascii and DEL (127)\n code === 0x22 || // \"\n code === 0x2C || // ,\n code === 0x3B || // ;\n code === 0x5C // \\\n ) {\n throw new Error('Invalid cookie value')\n }\n }\n}\n\n/**\n * path-value = \n * @param {string} path\n */\nfunction validateCookiePath (path) {\n for (let i = 0; i < path.length; ++i) {\n const code = path.charCodeAt(i)\n\n if (\n code < 0x20 || // exclude CTLs (0-31)\n code === 0x7F || // DEL\n code === 0x3B // ;\n ) {\n throw new Error('Invalid cookie path')\n }\n }\n}\n\n/**\n * I have no idea why these values aren't allowed to be honest,\n * but Deno tests these. - Khafra\n * @param {string} domain\n */\nfunction validateCookieDomain (domain) {\n if (\n domain.startsWith('-') ||\n domain.endsWith('.') ||\n domain.endsWith('-')\n ) {\n throw new Error('Invalid cookie domain')\n }\n}\n\nconst IMFDays = [\n 'Sun', 'Mon', 'Tue', 'Wed',\n 'Thu', 'Fri', 'Sat'\n]\n\nconst IMFMonths = [\n 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',\n 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'\n]\n\nconst IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, '0'))\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1\n * @param {number|Date} date\n IMF-fixdate = day-name \",\" SP date1 SP time-of-day SP GMT\n ; fixed length/zone/capitalization subset of the format\n ; see Section 3.3 of [RFC5322]\n\n day-name = %x4D.6F.6E ; \"Mon\", case-sensitive\n / %x54.75.65 ; \"Tue\", case-sensitive\n / %x57.65.64 ; \"Wed\", case-sensitive\n / %x54.68.75 ; \"Thu\", case-sensitive\n / %x46.72.69 ; \"Fri\", case-sensitive\n / %x53.61.74 ; \"Sat\", case-sensitive\n / %x53.75.6E ; \"Sun\", case-sensitive\n date1 = day SP month SP year\n ; e.g., 02 Jun 1982\n\n day = 2DIGIT\n month = %x4A.61.6E ; \"Jan\", case-sensitive\n / %x46.65.62 ; \"Feb\", case-sensitive\n / %x4D.61.72 ; \"Mar\", case-sensitive\n / %x41.70.72 ; \"Apr\", case-sensitive\n / %x4D.61.79 ; \"May\", case-sensitive\n / %x4A.75.6E ; \"Jun\", case-sensitive\n / %x4A.75.6C ; \"Jul\", case-sensitive\n / %x41.75.67 ; \"Aug\", case-sensitive\n / %x53.65.70 ; \"Sep\", case-sensitive\n / %x4F.63.74 ; \"Oct\", case-sensitive\n / %x4E.6F.76 ; \"Nov\", case-sensitive\n / %x44.65.63 ; \"Dec\", case-sensitive\n year = 4DIGIT\n\n GMT = %x47.4D.54 ; \"GMT\", case-sensitive\n\n time-of-day = hour \":\" minute \":\" second\n ; 00:00:00 - 23:59:60 (leap second)\n\n hour = 2DIGIT\n minute = 2DIGIT\n second = 2DIGIT\n */\nfunction toIMFDate (date) {\n if (typeof date === 'number') {\n date = new Date(date)\n }\n\n return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT`\n}\n\n/**\n max-age-av = \"Max-Age=\" non-zero-digit *DIGIT\n ; In practice, both expires-av and max-age-av\n ; are limited to dates representable by the\n ; user agent.\n * @param {number} maxAge\n */\nfunction validateCookieMaxAge (maxAge) {\n if (maxAge < 0) {\n throw new Error('Invalid cookie max-age')\n }\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1\n * @param {import('./index').Cookie} cookie\n */\nfunction stringify (cookie) {\n if (cookie.name.length === 0) {\n return null\n }\n\n validateCookieName(cookie.name)\n validateCookieValue(cookie.value)\n\n const out = [`${cookie.name}=${cookie.value}`]\n\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2\n if (cookie.name.startsWith('__Secure-')) {\n cookie.secure = true\n }\n\n if (cookie.name.startsWith('__Host-')) {\n cookie.secure = true\n cookie.domain = null\n cookie.path = '/'\n }\n\n if (cookie.secure) {\n out.push('Secure')\n }\n\n if (cookie.httpOnly) {\n out.push('HttpOnly')\n }\n\n if (typeof cookie.maxAge === 'number') {\n validateCookieMaxAge(cookie.maxAge)\n out.push(`Max-Age=${cookie.maxAge}`)\n }\n\n if (cookie.domain) {\n validateCookieDomain(cookie.domain)\n out.push(`Domain=${cookie.domain}`)\n }\n\n if (cookie.path) {\n validateCookiePath(cookie.path)\n out.push(`Path=${cookie.path}`)\n }\n\n if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') {\n out.push(`Expires=${toIMFDate(cookie.expires)}`)\n }\n\n if (cookie.sameSite) {\n out.push(`SameSite=${cookie.sameSite}`)\n }\n\n for (const part of cookie.unparsed) {\n if (!part.includes('=')) {\n throw new Error('Invalid unparsed')\n }\n\n const [key, ...value] = part.split('=')\n\n out.push(`${key.trim()}=${value.join('=')}`)\n }\n\n return out.join('; ')\n}\n\nmodule.exports = {\n isCTLExcludingHtab,\n validateCookieName,\n validateCookiePath,\n validateCookieValue,\n toIMFDate,\n stringify\n}\n", "'use strict'\n\nconst { collectASequenceOfCodePointsFast } = require('../infra')\nconst { maxNameValuePairSize, maxAttributeValueSize } = require('./constants')\nconst { isCTLExcludingHtab } = require('./util')\nconst assert = require('node:assert')\nconst { unescape: qsUnescape } = require('node:querystring')\n\n/**\n * @description Parses the field-value attributes of a set-cookie header string.\n * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4\n * @param {string} header\n * @returns {import('./index').Cookie|null} if the header is invalid, null will be returned\n */\nfunction parseSetCookie (header) {\n // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F\n // character (CTL characters excluding HTAB): Abort these steps and\n // ignore the set-cookie-string entirely.\n if (isCTLExcludingHtab(header)) {\n return null\n }\n\n let nameValuePair = ''\n let unparsedAttributes = ''\n let name = ''\n let value = ''\n\n // 2. If the set-cookie-string contains a %x3B (\";\") character:\n if (header.includes(';')) {\n // 1. The name-value-pair string consists of the characters up to,\n // but not including, the first %x3B (\";\"), and the unparsed-\n // attributes consist of the remainder of the set-cookie-string\n // (including the %x3B (\";\") in question).\n const position = { position: 0 }\n\n nameValuePair = collectASequenceOfCodePointsFast(';', header, position)\n unparsedAttributes = header.slice(position.position)\n } else {\n // Otherwise:\n\n // 1. The name-value-pair string consists of all the characters\n // contained in the set-cookie-string, and the unparsed-\n // attributes is the empty string.\n nameValuePair = header\n }\n\n // 3. If the name-value-pair string lacks a %x3D (\"=\") character, then\n // the name string is empty, and the value string is the value of\n // name-value-pair.\n if (!nameValuePair.includes('=')) {\n value = nameValuePair\n } else {\n // Otherwise, the name string consists of the characters up to, but\n // not including, the first %x3D (\"=\") character, and the (possibly\n // empty) value string consists of the characters after the first\n // %x3D (\"=\") character.\n const position = { position: 0 }\n name = collectASequenceOfCodePointsFast(\n '=',\n nameValuePair,\n position\n )\n value = nameValuePair.slice(position.position + 1)\n }\n\n // 4. Remove any leading or trailing WSP characters from the name\n // string and the value string.\n name = name.trim()\n value = value.trim()\n\n // 5. If the sum of the lengths of the name string and the value string\n // is more than 4096 octets, abort these steps and ignore the set-\n // cookie-string entirely.\n if (name.length + value.length > maxNameValuePairSize) {\n return null\n }\n\n // 6. The cookie-name is the name string, and the cookie-value is the\n // value string.\n // https://datatracker.ietf.org/doc/html/rfc6265\n // To maximize compatibility with user agents, servers that wish to\n // store arbitrary data in a cookie-value SHOULD encode that data, for\n // example, using Base64 [RFC4648].\n return {\n name, value: qsUnescape(value), ...parseUnparsedAttributes(unparsedAttributes)\n }\n}\n\n/**\n * Parses the remaining attributes of a set-cookie header\n * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4\n * @param {string} unparsedAttributes\n * @param {Object.} [cookieAttributeList={}]\n */\nfunction parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) {\n // 1. If the unparsed-attributes string is empty, skip the rest of\n // these steps.\n if (unparsedAttributes.length === 0) {\n return cookieAttributeList\n }\n\n // 2. Discard the first character of the unparsed-attributes (which\n // will be a %x3B (\";\") character).\n assert(unparsedAttributes[0] === ';')\n unparsedAttributes = unparsedAttributes.slice(1)\n\n let cookieAv = ''\n\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n if (unparsedAttributes.includes(';')) {\n // 1. Consume the characters of the unparsed-attributes up to, but\n // not including, the first %x3B (\";\") character.\n cookieAv = collectASequenceOfCodePointsFast(\n ';',\n unparsedAttributes,\n { position: 0 }\n )\n unparsedAttributes = unparsedAttributes.slice(cookieAv.length)\n } else {\n // Otherwise:\n\n // 1. Consume the remainder of the unparsed-attributes.\n cookieAv = unparsedAttributes\n unparsedAttributes = ''\n }\n\n // Let the cookie-av string be the characters consumed in this step.\n\n let attributeName = ''\n let attributeValue = ''\n\n // 4. If the cookie-av string contains a %x3D (\"=\") character:\n if (cookieAv.includes('=')) {\n // 1. The (possibly empty) attribute-name string consists of the\n // characters up to, but not including, the first %x3D (\"=\")\n // character, and the (possibly empty) attribute-value string\n // consists of the characters after the first %x3D (\"=\")\n // character.\n const position = { position: 0 }\n\n attributeName = collectASequenceOfCodePointsFast(\n '=',\n cookieAv,\n position\n )\n attributeValue = cookieAv.slice(position.position + 1)\n } else {\n // Otherwise:\n\n // 1. The attribute-name string consists of the entire cookie-av\n // string, and the attribute-value string is empty.\n attributeName = cookieAv\n }\n\n // 5. Remove any leading or trailing WSP characters from the attribute-\n // name string and the attribute-value string.\n attributeName = attributeName.trim()\n attributeValue = attributeValue.trim()\n\n // 6. If the attribute-value is longer than 1024 octets, ignore the\n // cookie-av string and return to Step 1 of this algorithm.\n if (attributeValue.length > maxAttributeValueSize) {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 7. Process the attribute-name and attribute-value according to the\n // requirements in the following subsections. (Notice that\n // attributes with unrecognized attribute-names are ignored.)\n const attributeNameLowercase = attributeName.toLowerCase()\n\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1\n // If the attribute-name case-insensitively matches the string\n // \"Expires\", the user agent MUST process the cookie-av as follows.\n if (attributeNameLowercase === 'expires') {\n // 1. Let the expiry-time be the result of parsing the attribute-value\n // as cookie-date (see Section 5.1.1).\n const expiryTime = new Date(attributeValue)\n\n // 2. If the attribute-value failed to parse as a cookie date, ignore\n // the cookie-av.\n\n cookieAttributeList.expires = expiryTime\n } else if (attributeNameLowercase === 'max-age') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2\n // If the attribute-name case-insensitively matches the string \"Max-\n // Age\", the user agent MUST process the cookie-av as follows.\n\n // 1. If the first character of the attribute-value is not a DIGIT or a\n // \"-\" character, ignore the cookie-av.\n const charCode = attributeValue.charCodeAt(0)\n\n if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 2. If the remainder of attribute-value contains a non-DIGIT\n // character, ignore the cookie-av.\n if (!/^\\d+$/.test(attributeValue)) {\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n }\n\n // 3. Let delta-seconds be the attribute-value converted to an integer.\n const deltaSeconds = Number(attributeValue)\n\n // 4. Let cookie-age-limit be the maximum age of the cookie (which\n // SHOULD be 400 days or less, see Section 4.1.2.2).\n\n // 5. Set delta-seconds to the smaller of its present value and cookie-\n // age-limit.\n // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs)\n\n // 6. If delta-seconds is less than or equal to zero (0), let expiry-\n // time be the earliest representable date and time. Otherwise, let\n // the expiry-time be the current date and time plus delta-seconds\n // seconds.\n // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds\n\n // 7. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Max-Age and an attribute-value of expiry-time.\n cookieAttributeList.maxAge = deltaSeconds\n } else if (attributeNameLowercase === 'domain') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3\n // If the attribute-name case-insensitively matches the string \"Domain\",\n // the user agent MUST process the cookie-av as follows.\n\n // 1. Let cookie-domain be the attribute-value.\n let cookieDomain = attributeValue\n\n // 2. If cookie-domain starts with %x2E (\".\"), let cookie-domain be\n // cookie-domain without its leading %x2E (\".\").\n if (cookieDomain[0] === '.') {\n cookieDomain = cookieDomain.slice(1)\n }\n\n // 3. Convert the cookie-domain to lower case.\n cookieDomain = cookieDomain.toLowerCase()\n\n // 4. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Domain and an attribute-value of cookie-domain.\n cookieAttributeList.domain = cookieDomain\n } else if (attributeNameLowercase === 'path') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4\n // If the attribute-name case-insensitively matches the string \"Path\",\n // the user agent MUST process the cookie-av as follows.\n\n // 1. If the attribute-value is empty or if the first character of the\n // attribute-value is not %x2F (\"/\"):\n let cookiePath = ''\n if (attributeValue.length === 0 || attributeValue[0] !== '/') {\n // 1. Let cookie-path be the default-path.\n cookiePath = '/'\n } else {\n // Otherwise:\n\n // 1. Let cookie-path be the attribute-value.\n cookiePath = attributeValue\n }\n\n // 2. Append an attribute to the cookie-attribute-list with an\n // attribute-name of Path and an attribute-value of cookie-path.\n cookieAttributeList.path = cookiePath\n } else if (attributeNameLowercase === 'secure') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5\n // If the attribute-name case-insensitively matches the string \"Secure\",\n // the user agent MUST append an attribute to the cookie-attribute-list\n // with an attribute-name of Secure and an empty attribute-value.\n\n cookieAttributeList.secure = true\n } else if (attributeNameLowercase === 'httponly') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6\n // If the attribute-name case-insensitively matches the string\n // \"HttpOnly\", the user agent MUST append an attribute to the cookie-\n // attribute-list with an attribute-name of HttpOnly and an empty\n // attribute-value.\n\n cookieAttributeList.httpOnly = true\n } else if (attributeNameLowercase === 'samesite') {\n // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7\n // If the attribute-name case-insensitively matches the string\n // \"SameSite\", the user agent MUST process the cookie-av as follows:\n\n // 1. Let enforcement be \"Default\".\n let enforcement = 'Default'\n\n const attributeValueLowercase = attributeValue.toLowerCase()\n // 2. If cookie-av's attribute-value is a case-insensitive match for\n // \"None\", set enforcement to \"None\".\n if (attributeValueLowercase.includes('none')) {\n enforcement = 'None'\n }\n\n // 3. If cookie-av's attribute-value is a case-insensitive match for\n // \"Strict\", set enforcement to \"Strict\".\n if (attributeValueLowercase.includes('strict')) {\n enforcement = 'Strict'\n }\n\n // 4. If cookie-av's attribute-value is a case-insensitive match for\n // \"Lax\", set enforcement to \"Lax\".\n if (attributeValueLowercase.includes('lax')) {\n enforcement = 'Lax'\n }\n\n // 5. Append an attribute to the cookie-attribute-list with an\n // attribute-name of \"SameSite\" and an attribute-value of\n // enforcement.\n cookieAttributeList.sameSite = enforcement\n } else {\n cookieAttributeList.unparsed ??= []\n\n cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`)\n }\n\n // 8. Return to Step 1 of this algorithm.\n return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList)\n}\n\nmodule.exports = {\n parseSetCookie,\n parseUnparsedAttributes\n}\n", "'use strict'\n\nconst { parseSetCookie } = require('./parse')\nconst { stringify } = require('./util')\nconst { webidl } = require('../webidl')\nconst { Headers } = require('../fetch/headers')\n\nconst brandChecks = webidl.brandCheckMultiple([Headers, globalThis.Headers].filter(Boolean))\n\n/**\n * @typedef {Object} Cookie\n * @property {string} name\n * @property {string} value\n * @property {Date|number} [expires]\n * @property {number} [maxAge]\n * @property {string} [domain]\n * @property {string} [path]\n * @property {boolean} [secure]\n * @property {boolean} [httpOnly]\n * @property {'Strict'|'Lax'|'None'} [sameSite]\n * @property {string[]} [unparsed]\n */\n\n/**\n * @param {Headers} headers\n * @returns {Record}\n */\nfunction getCookies (headers) {\n webidl.argumentLengthCheck(arguments, 1, 'getCookies')\n\n brandChecks(headers)\n\n const cookie = headers.get('cookie')\n\n /** @type {Record} */\n const out = {}\n\n if (!cookie) {\n return out\n }\n\n for (const piece of cookie.split(';')) {\n const [name, ...value] = piece.split('=')\n\n out[name.trim()] = value.join('=')\n }\n\n return out\n}\n\n/**\n * @param {Headers} headers\n * @param {string} name\n * @param {{ path?: string, domain?: string }|undefined} attributes\n * @returns {void}\n */\nfunction deleteCookie (headers, name, attributes) {\n brandChecks(headers)\n\n const prefix = 'deleteCookie'\n webidl.argumentLengthCheck(arguments, 2, prefix)\n\n name = webidl.converters.DOMString(name, prefix, 'name')\n attributes = webidl.converters.DeleteCookieAttributes(attributes)\n\n // Matches behavior of\n // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278\n setCookie(headers, {\n name,\n value: '',\n expires: new Date(0),\n ...attributes\n })\n}\n\n/**\n * @param {Headers} headers\n * @returns {Cookie[]}\n */\nfunction getSetCookies (headers) {\n webidl.argumentLengthCheck(arguments, 1, 'getSetCookies')\n\n brandChecks(headers)\n\n const cookies = headers.getSetCookie()\n\n if (!cookies) {\n return []\n }\n\n return cookies.map((pair) => parseSetCookie(pair))\n}\n\n/**\n * Parses a cookie string\n * @param {string} cookie\n */\nfunction parseCookie (cookie) {\n cookie = webidl.converters.DOMString(cookie)\n\n return parseSetCookie(cookie)\n}\n\n/**\n * @param {Headers} headers\n * @param {Cookie} cookie\n * @returns {void}\n */\nfunction setCookie (headers, cookie) {\n webidl.argumentLengthCheck(arguments, 2, 'setCookie')\n\n brandChecks(headers)\n\n cookie = webidl.converters.Cookie(cookie)\n\n const str = stringify(cookie)\n\n if (str) {\n headers.append('set-cookie', str, true)\n }\n}\n\nwebidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'path',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'domain',\n defaultValue: () => null\n }\n])\n\nwebidl.converters.Cookie = webidl.dictionaryConverter([\n {\n converter: webidl.converters.DOMString,\n key: 'name'\n },\n {\n converter: webidl.converters.DOMString,\n key: 'value'\n },\n {\n converter: webidl.nullableConverter((value) => {\n if (typeof value === 'number') {\n return webidl.converters['unsigned long long'](value)\n }\n\n return new Date(value)\n }),\n key: 'expires',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters['long long']),\n key: 'maxAge',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'domain',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.DOMString),\n key: 'path',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.boolean),\n key: 'secure',\n defaultValue: () => null\n },\n {\n converter: webidl.nullableConverter(webidl.converters.boolean),\n key: 'httpOnly',\n defaultValue: () => null\n },\n {\n converter: webidl.converters.USVString,\n key: 'sameSite',\n allowedValues: ['Strict', 'Lax', 'None']\n },\n {\n converter: webidl.sequenceConverter(webidl.converters.DOMString),\n key: 'unparsed',\n defaultValue: () => []\n }\n])\n\nmodule.exports = {\n getCookies,\n deleteCookie,\n getSetCookies,\n setCookie,\n parseCookie\n}\n", "'use strict'\n\nconst { webidl } = require('../webidl')\nconst { kEnumerableProperty } = require('../../core/util')\nconst { kConstruct } = require('../../core/symbols')\n\n/**\n * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent\n */\nclass MessageEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict = {}) {\n if (type === kConstruct) {\n super(arguments[1], arguments[2])\n webidl.util.markAsUncloneable(this)\n return\n }\n\n const prefix = 'MessageEvent constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n type = webidl.converters.DOMString(type, prefix, 'type')\n eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, 'eventInitDict')\n\n super(type, eventInitDict)\n\n this.#eventInit = eventInitDict\n webidl.util.markAsUncloneable(this)\n }\n\n get data () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.data\n }\n\n get origin () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.origin\n }\n\n get lastEventId () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.lastEventId\n }\n\n get source () {\n webidl.brandCheck(this, MessageEvent)\n\n return this.#eventInit.source\n }\n\n get ports () {\n webidl.brandCheck(this, MessageEvent)\n\n if (!Object.isFrozen(this.#eventInit.ports)) {\n Object.freeze(this.#eventInit.ports)\n }\n\n return this.#eventInit.ports\n }\n\n initMessageEvent (\n type,\n bubbles = false,\n cancelable = false,\n data = null,\n origin = '',\n lastEventId = '',\n source = null,\n ports = []\n ) {\n webidl.brandCheck(this, MessageEvent)\n\n webidl.argumentLengthCheck(arguments, 1, 'MessageEvent.initMessageEvent')\n\n return new MessageEvent(type, {\n bubbles, cancelable, data, origin, lastEventId, source, ports\n })\n }\n\n static createFastMessageEvent (type, init) {\n const messageEvent = new MessageEvent(kConstruct, type, init)\n messageEvent.#eventInit = init\n messageEvent.#eventInit.data ??= null\n messageEvent.#eventInit.origin ??= ''\n messageEvent.#eventInit.lastEventId ??= ''\n messageEvent.#eventInit.source ??= null\n messageEvent.#eventInit.ports ??= []\n return messageEvent\n }\n}\n\nconst { createFastMessageEvent } = MessageEvent\ndelete MessageEvent.createFastMessageEvent\n\n/**\n * @see https://websockets.spec.whatwg.org/#the-closeevent-interface\n */\nclass CloseEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict = {}) {\n const prefix = 'CloseEvent constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n type = webidl.converters.DOMString(type, prefix, 'type')\n eventInitDict = webidl.converters.CloseEventInit(eventInitDict)\n\n super(type, eventInitDict)\n\n this.#eventInit = eventInitDict\n webidl.util.markAsUncloneable(this)\n }\n\n get wasClean () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.wasClean\n }\n\n get code () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.code\n }\n\n get reason () {\n webidl.brandCheck(this, CloseEvent)\n\n return this.#eventInit.reason\n }\n}\n\n// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface\nclass ErrorEvent extends Event {\n #eventInit\n\n constructor (type, eventInitDict) {\n const prefix = 'ErrorEvent constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n super(type, eventInitDict)\n webidl.util.markAsUncloneable(this)\n\n type = webidl.converters.DOMString(type, prefix, 'type')\n eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {})\n\n this.#eventInit = eventInitDict\n }\n\n get message () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.message\n }\n\n get filename () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.filename\n }\n\n get lineno () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.lineno\n }\n\n get colno () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.colno\n }\n\n get error () {\n webidl.brandCheck(this, ErrorEvent)\n\n return this.#eventInit.error\n }\n}\n\nObject.defineProperties(MessageEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'MessageEvent',\n configurable: true\n },\n data: kEnumerableProperty,\n origin: kEnumerableProperty,\n lastEventId: kEnumerableProperty,\n source: kEnumerableProperty,\n ports: kEnumerableProperty,\n initMessageEvent: kEnumerableProperty\n})\n\nObject.defineProperties(CloseEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'CloseEvent',\n configurable: true\n },\n reason: kEnumerableProperty,\n code: kEnumerableProperty,\n wasClean: kEnumerableProperty\n})\n\nObject.defineProperties(ErrorEvent.prototype, {\n [Symbol.toStringTag]: {\n value: 'ErrorEvent',\n configurable: true\n },\n message: kEnumerableProperty,\n filename: kEnumerableProperty,\n lineno: kEnumerableProperty,\n colno: kEnumerableProperty,\n error: kEnumerableProperty\n})\n\nwebidl.converters.MessagePort = webidl.interfaceConverter(\n webidl.is.MessagePort,\n 'MessagePort'\n)\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.MessagePort\n)\n\nconst eventInit = [\n {\n key: 'bubbles',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'cancelable',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'composed',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n }\n]\n\nwebidl.converters.MessageEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'data',\n converter: webidl.converters.any,\n defaultValue: () => null\n },\n {\n key: 'origin',\n converter: webidl.converters.USVString,\n defaultValue: () => ''\n },\n {\n key: 'lastEventId',\n converter: webidl.converters.DOMString,\n defaultValue: () => ''\n },\n {\n key: 'source',\n // Node doesn't implement WindowProxy or ServiceWorker, so the only\n // valid value for source is a MessagePort.\n converter: webidl.nullableConverter(webidl.converters.MessagePort),\n defaultValue: () => null\n },\n {\n key: 'ports',\n converter: webidl.converters['sequence'],\n defaultValue: () => []\n }\n])\n\nwebidl.converters.CloseEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'wasClean',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'code',\n converter: webidl.converters['unsigned short'],\n defaultValue: () => 0\n },\n {\n key: 'reason',\n converter: webidl.converters.USVString,\n defaultValue: () => ''\n }\n])\n\nwebidl.converters.ErrorEventInit = webidl.dictionaryConverter([\n ...eventInit,\n {\n key: 'message',\n converter: webidl.converters.DOMString,\n defaultValue: () => ''\n },\n {\n key: 'filename',\n converter: webidl.converters.USVString,\n defaultValue: () => ''\n },\n {\n key: 'lineno',\n converter: webidl.converters['unsigned long'],\n defaultValue: () => 0\n },\n {\n key: 'colno',\n converter: webidl.converters['unsigned long'],\n defaultValue: () => 0\n },\n {\n key: 'error',\n converter: webidl.converters.any\n }\n])\n\nmodule.exports = {\n MessageEvent,\n CloseEvent,\n ErrorEvent,\n createFastMessageEvent\n}\n", "'use strict'\n\n/**\n * This is a Globally Unique Identifier unique used to validate that the\n * endpoint accepts websocket connections.\n * @see https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3\n * @type {'258EAFA5-E914-47DA-95CA-C5AB0DC85B11'}\n */\nconst uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'\n\n/**\n * @type {PropertyDescriptor}\n */\nconst staticPropertyDescriptors = {\n enumerable: true,\n writable: false,\n configurable: false\n}\n\n/**\n * The states of the WebSocket connection.\n *\n * @readonly\n * @enum\n * @property {0} CONNECTING\n * @property {1} OPEN\n * @property {2} CLOSING\n * @property {3} CLOSED\n */\nconst states = {\n CONNECTING: 0,\n OPEN: 1,\n CLOSING: 2,\n CLOSED: 3\n}\n\n/**\n * @readonly\n * @enum\n * @property {0} NOT_SENT\n * @property {1} PROCESSING\n * @property {2} SENT\n */\nconst sentCloseFrameState = {\n SENT: 1,\n RECEIVED: 2\n}\n\n/**\n * The WebSocket opcodes.\n *\n * @readonly\n * @enum\n * @property {0x0} CONTINUATION\n * @property {0x1} TEXT\n * @property {0x2} BINARY\n * @property {0x8} CLOSE\n * @property {0x9} PING\n * @property {0xA} PONG\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.2\n */\nconst opcodes = {\n CONTINUATION: 0x0,\n TEXT: 0x1,\n BINARY: 0x2,\n CLOSE: 0x8,\n PING: 0x9,\n PONG: 0xA\n}\n\n/**\n * The maximum value for an unsigned 16-bit integer.\n *\n * @type {65535} 2 ** 16 - 1\n */\nconst maxUnsigned16Bit = 65535\n\n/**\n * The states of the parser.\n *\n * @readonly\n * @enum\n * @property {0} INFO\n * @property {2} PAYLOADLENGTH_16\n * @property {3} PAYLOADLENGTH_64\n * @property {4} READ_DATA\n */\nconst parserStates = {\n INFO: 0,\n PAYLOADLENGTH_16: 2,\n PAYLOADLENGTH_64: 3,\n READ_DATA: 4\n}\n\n/**\n * An empty buffer.\n *\n * @type {Buffer}\n */\nconst emptyBuffer = Buffer.allocUnsafe(0)\n\n/**\n * @readonly\n * @property {1} text\n * @property {2} typedArray\n * @property {3} arrayBuffer\n * @property {4} blob\n */\nconst sendHints = {\n text: 1,\n typedArray: 2,\n arrayBuffer: 3,\n blob: 4\n}\n\nmodule.exports = {\n uid,\n sentCloseFrameState,\n staticPropertyDescriptors,\n states,\n opcodes,\n maxUnsigned16Bit,\n parserStates,\n emptyBuffer,\n sendHints\n}\n", "'use strict'\n\nconst { states, opcodes } = require('./constants')\nconst { isUtf8 } = require('node:buffer')\nconst { removeHTTPWhitespace } = require('../fetch/data-url')\nconst { collectASequenceOfCodePointsFast } = require('../infra')\n\n/**\n * @param {number} readyState\n * @returns {boolean}\n */\nfunction isConnecting (readyState) {\n // If the WebSocket connection is not yet established, and the connection\n // is not yet closed, then the WebSocket connection is in the CONNECTING state.\n return readyState === states.CONNECTING\n}\n\n/**\n * @param {number} readyState\n * @returns {boolean}\n */\nfunction isEstablished (readyState) {\n // If the server's response is validated as provided for above, it is\n // said that _The WebSocket Connection is Established_ and that the\n // WebSocket Connection is in the OPEN state.\n return readyState === states.OPEN\n}\n\n/**\n * @param {number} readyState\n * @returns {boolean}\n */\nfunction isClosing (readyState) {\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n return readyState === states.CLOSING\n}\n\n/**\n * @param {number} readyState\n * @returns {boolean}\n */\nfunction isClosed (readyState) {\n return readyState === states.CLOSED\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#concept-event-fire\n * @param {string} e\n * @param {EventTarget} target\n * @param {(...args: ConstructorParameters) => Event} eventFactory\n * @param {EventInit | undefined} eventInitDict\n * @returns {void}\n */\nfunction fireEvent (e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) {\n // 1. If eventConstructor is not given, then let eventConstructor be Event.\n\n // 2. Let event be the result of creating an event given eventConstructor,\n // in the relevant realm of target.\n // 3. Initialize event\u2019s type attribute to e.\n const event = eventFactory(e, eventInitDict)\n\n // 4. Initialize any other IDL attributes of event as described in the\n // invocation of this algorithm.\n\n // 5. Return the result of dispatching event at target, with legacy target\n // override flag set if set.\n target.dispatchEvent(event)\n}\n\n/**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n * @param {import('./websocket').Handler} handler\n * @param {number} type Opcode\n * @param {Buffer} data application data\n * @returns {void}\n */\nfunction websocketMessageReceived (handler, type, data) {\n handler.onMessage(type, data)\n}\n\n/**\n * @param {Buffer} buffer\n * @returns {ArrayBuffer}\n */\nfunction toArrayBuffer (buffer) {\n if (buffer.byteLength === buffer.buffer.byteLength) {\n return buffer.buffer\n }\n return new Uint8Array(buffer).buffer\n}\n\n/**\n * @see https://datatracker.ietf.org/doc/html/rfc6455\n * @see https://datatracker.ietf.org/doc/html/rfc2616\n * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407\n * @param {string} protocol\n * @returns {boolean}\n */\nfunction isValidSubprotocol (protocol) {\n // If present, this value indicates one\n // or more comma-separated subprotocol the client wishes to speak,\n // ordered by preference. The elements that comprise this value\n // MUST be non-empty strings with characters in the range U+0021 to\n // U+007E not including separator characters as defined in\n // [RFC2616] and MUST all be unique strings.\n if (protocol.length === 0) {\n return false\n }\n\n for (let i = 0; i < protocol.length; ++i) {\n const code = protocol.charCodeAt(i)\n\n if (\n code < 0x21 || // CTL, contains SP (0x20) and HT (0x09)\n code > 0x7E ||\n code === 0x22 || // \"\n code === 0x28 || // (\n code === 0x29 || // )\n code === 0x2C || // ,\n code === 0x2F || // /\n code === 0x3A || // :\n code === 0x3B || // ;\n code === 0x3C || // <\n code === 0x3D || // =\n code === 0x3E || // >\n code === 0x3F || // ?\n code === 0x40 || // @\n code === 0x5B || // [\n code === 0x5C || // \\\n code === 0x5D || // ]\n code === 0x7B || // {\n code === 0x7D // }\n ) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4\n * @param {number} code\n * @returns {boolean}\n */\nfunction isValidStatusCode (code) {\n if (code >= 1000 && code < 1015) {\n return (\n code !== 1004 && // reserved\n code !== 1005 && // \"MUST NOT be set as a status code\"\n code !== 1006 // \"MUST NOT be set as a status code\"\n )\n }\n\n return code >= 3000 && code <= 4999\n}\n\n/**\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5\n * @param {number} opcode\n * @returns {boolean}\n */\nfunction isControlFrame (opcode) {\n return (\n opcode === opcodes.CLOSE ||\n opcode === opcodes.PING ||\n opcode === opcodes.PONG\n )\n}\n\n/**\n * @param {number} opcode\n * @returns {boolean}\n */\nfunction isContinuationFrame (opcode) {\n return opcode === opcodes.CONTINUATION\n}\n\n/**\n * @param {number} opcode\n * @returns {boolean}\n */\nfunction isTextBinaryFrame (opcode) {\n return opcode === opcodes.TEXT || opcode === opcodes.BINARY\n}\n\n/**\n *\n * @param {number} opcode\n * @returns {boolean}\n */\nfunction isValidOpcode (opcode) {\n return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode)\n}\n\n/**\n * Parses a Sec-WebSocket-Extensions header value.\n * @param {string} extensions\n * @returns {Map}\n */\n// TODO(@Uzlopak, @KhafraDev): make compliant https://datatracker.ietf.org/doc/html/rfc6455#section-9.1\nfunction parseExtensions (extensions) {\n const position = { position: 0 }\n const extensionList = new Map()\n\n while (position.position < extensions.length) {\n const pair = collectASequenceOfCodePointsFast(';', extensions, position)\n const [name, value = ''] = pair.split('=', 2)\n\n extensionList.set(\n removeHTTPWhitespace(name, true, false),\n removeHTTPWhitespace(value, false, true)\n )\n\n position.position++\n }\n\n return extensionList\n}\n\n/**\n * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2\n * @description \"client-max-window-bits = 1*DIGIT\"\n * @param {string} value\n * @returns {boolean}\n */\nfunction isValidClientWindowBits (value) {\n // Must have at least one character\n if (value.length === 0) {\n return false\n }\n\n // Check all characters are ASCII digits\n for (let i = 0; i < value.length; i++) {\n const byte = value.charCodeAt(i)\n\n if (byte < 0x30 || byte > 0x39) {\n return false\n }\n }\n\n // Check numeric range: zlib requires windowBits in range 8-15\n const num = Number.parseInt(value, 10)\n return num >= 8 && num <= 15\n}\n\n/**\n * @see https://whatpr.org/websockets/48/7b748d3...d5570f3.html#get-a-url-record\n * @param {string} url\n * @param {string} [baseURL]\n */\nfunction getURLRecord (url, baseURL) {\n // 1. Let urlRecord be the result of applying the URL parser to url with baseURL .\n // 2. If urlRecord is failure, then throw a \" SyntaxError \" DOMException .\n let urlRecord\n\n try {\n urlRecord = new URL(url, baseURL)\n } catch (e) {\n throw new DOMException(e, 'SyntaxError')\n }\n\n // 3. If urlRecord \u2019s scheme is \" http \", then set urlRecord \u2019s scheme to \" ws \".\n // 4. Otherwise, if urlRecord \u2019s scheme is \" https \", set urlRecord \u2019s scheme to \" wss \".\n if (urlRecord.protocol === 'http:') {\n urlRecord.protocol = 'ws:'\n } else if (urlRecord.protocol === 'https:') {\n urlRecord.protocol = 'wss:'\n }\n\n // 5. If urlRecord \u2019s scheme is not \" ws \" or \" wss \", then throw a \" SyntaxError \" DOMException .\n if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') {\n throw new DOMException('expected a ws: or wss: url', 'SyntaxError')\n }\n\n // If urlRecord \u2019s fragment is non-null, then throw a \" SyntaxError \" DOMException .\n if (urlRecord.hash.length || urlRecord.href.endsWith('#')) {\n throw new DOMException('hash', 'SyntaxError')\n }\n\n // Return urlRecord .\n return urlRecord\n}\n\n// https://whatpr.org/websockets/48.html#validate-close-code-and-reason\nfunction validateCloseCodeAndReason (code, reason) {\n // 1. If code is not null, but is neither an integer equal to\n // 1000 nor an integer in the range 3000 to 4999, inclusive,\n // throw an \"InvalidAccessError\" DOMException.\n if (code !== null) {\n if (code !== 1000 && (code < 3000 || code > 4999)) {\n throw new DOMException('invalid code', 'InvalidAccessError')\n }\n }\n\n // 2. If reason is not null, then:\n if (reason !== null) {\n // 2.1. Let reasonBytes be the result of UTF-8 encoding reason.\n // 2.2. If reasonBytes is longer than 123 bytes, then throw a\n // \"SyntaxError\" DOMException.\n const reasonBytesLength = Buffer.byteLength(reason)\n\n if (reasonBytesLength > 123) {\n throw new DOMException(`Reason must be less than 123 bytes; received ${reasonBytesLength}`, 'SyntaxError')\n }\n }\n}\n\n/**\n * Converts a Buffer to utf-8, even on platforms without icu.\n * @type {(buffer: Buffer) => string}\n */\nconst utf8Decode = (() => {\n if (typeof process.versions.icu === 'string') {\n const fatalDecoder = new TextDecoder('utf-8', { fatal: true })\n return fatalDecoder.decode.bind(fatalDecoder)\n }\n return function (buffer) {\n if (isUtf8(buffer)) {\n return buffer.toString('utf-8')\n }\n throw new TypeError('Invalid utf-8 received.')\n }\n})()\n\nmodule.exports = {\n isConnecting,\n isEstablished,\n isClosing,\n isClosed,\n fireEvent,\n isValidSubprotocol,\n isValidStatusCode,\n websocketMessageReceived,\n utf8Decode,\n isControlFrame,\n isContinuationFrame,\n isTextBinaryFrame,\n isValidOpcode,\n parseExtensions,\n isValidClientWindowBits,\n toArrayBuffer,\n getURLRecord,\n validateCloseCodeAndReason\n}\n", "'use strict'\n\nconst { runtimeFeatures } = require('../../util/runtime-features')\nconst { maxUnsigned16Bit, opcodes } = require('./constants')\n\nconst BUFFER_SIZE = 8 * 1024\n\nlet buffer = null\nlet bufIdx = BUFFER_SIZE\n\nconst randomFillSync = runtimeFeatures.has('crypto')\n ? require('node:crypto').randomFillSync\n // not full compatibility, but minimum.\n : function randomFillSync (buffer, _offset, _size) {\n for (let i = 0; i < buffer.length; ++i) {\n buffer[i] = Math.random() * 255 | 0\n }\n return buffer\n }\n\nfunction generateMask () {\n if (bufIdx === BUFFER_SIZE) {\n bufIdx = 0\n randomFillSync((buffer ??= Buffer.allocUnsafeSlow(BUFFER_SIZE)), 0, BUFFER_SIZE)\n }\n return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]]\n}\n\nclass WebsocketFrameSend {\n /**\n * @param {Buffer|undefined} data\n */\n constructor (data) {\n this.frameData = data\n }\n\n createFrame (opcode) {\n const frameData = this.frameData\n const maskKey = generateMask()\n const bodyLength = frameData?.byteLength ?? 0\n\n /** @type {number} */\n let payloadLength = bodyLength // 0-125\n let offset = 6\n\n if (bodyLength > maxUnsigned16Bit) {\n offset += 8 // payload length is next 8 bytes\n payloadLength = 127\n } else if (bodyLength > 125) {\n offset += 2 // payload length is next 2 bytes\n payloadLength = 126\n }\n\n const buffer = Buffer.allocUnsafe(bodyLength + offset)\n\n // Clear first 2 bytes, everything else is overwritten\n buffer[0] = buffer[1] = 0\n buffer[0] |= 0x80 // FIN\n buffer[0] = (buffer[0] & 0xF0) + opcode // opcode\n\n /*! ws. MIT License. Einar Otto Stangvik */\n buffer[offset - 4] = maskKey[0]\n buffer[offset - 3] = maskKey[1]\n buffer[offset - 2] = maskKey[2]\n buffer[offset - 1] = maskKey[3]\n\n buffer[1] = payloadLength\n\n if (payloadLength === 126) {\n buffer.writeUInt16BE(bodyLength, 2)\n } else if (payloadLength === 127) {\n // Clear extended payload length\n buffer[2] = buffer[3] = 0\n buffer.writeUIntBE(bodyLength, 4, 6)\n }\n\n buffer[1] |= 0x80 // MASK\n\n // mask body\n for (let i = 0; i < bodyLength; ++i) {\n buffer[offset + i] = frameData[i] ^ maskKey[i & 3]\n }\n\n return buffer\n }\n\n /**\n * @param {Uint8Array} buffer\n */\n static createFastTextFrame (buffer) {\n const maskKey = generateMask()\n\n const bodyLength = buffer.length\n\n // mask body\n for (let i = 0; i < bodyLength; ++i) {\n buffer[i] ^= maskKey[i & 3]\n }\n\n let payloadLength = bodyLength\n let offset = 6\n\n if (bodyLength > maxUnsigned16Bit) {\n offset += 8 // payload length is next 8 bytes\n payloadLength = 127\n } else if (bodyLength > 125) {\n offset += 2 // payload length is next 2 bytes\n payloadLength = 126\n }\n const head = Buffer.allocUnsafeSlow(offset)\n\n head[0] = 0x80 /* FIN */ | opcodes.TEXT /* opcode TEXT */\n head[1] = payloadLength | 0x80 /* MASK */\n head[offset - 4] = maskKey[0]\n head[offset - 3] = maskKey[1]\n head[offset - 2] = maskKey[2]\n head[offset - 1] = maskKey[3]\n\n if (payloadLength === 126) {\n head.writeUInt16BE(bodyLength, 2)\n } else if (payloadLength === 127) {\n head[2] = head[3] = 0\n head.writeUIntBE(bodyLength, 4, 6)\n }\n\n return [head, buffer]\n }\n}\n\nmodule.exports = {\n WebsocketFrameSend,\n generateMask // for benchmark\n}\n", "'use strict'\n\nconst { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require('./constants')\nconst { parseExtensions, isClosed, isClosing, isEstablished, isConnecting, validateCloseCodeAndReason } = require('./util')\nconst { makeRequest } = require('../fetch/request')\nconst { fetching } = require('../fetch/index')\nconst { Headers, getHeadersList } = require('../fetch/headers')\nconst { getDecodeSplit } = require('../fetch/util')\nconst { WebsocketFrameSend } = require('./frame')\nconst assert = require('node:assert')\nconst { runtimeFeatures } = require('../../util/runtime-features')\n\nconst crypto = runtimeFeatures.has('crypto')\n ? require('node:crypto')\n : null\n\nlet warningEmitted = false\n\n/**\n * @see https://websockets.spec.whatwg.org/#concept-websocket-establish\n * @param {URL} url\n * @param {string|string[]} protocols\n * @param {import('./websocket').Handler} handler\n * @param {Partial} options\n */\nfunction establishWebSocketConnection (url, protocols, client, handler, options) {\n // 1. Let requestURL be a copy of url, with its scheme set to \"http\", if url\u2019s\n // scheme is \"ws\", and to \"https\" otherwise.\n const requestURL = url\n\n requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:'\n\n // 2. Let request be a new request, whose URL is requestURL, client is client,\n // service-workers mode is \"none\", referrer is \"no-referrer\", mode is\n // \"websocket\", credentials mode is \"include\", cache mode is \"no-store\" ,\n // redirect mode is \"error\", and use-URL-credentials flag is set.\n const request = makeRequest({\n urlList: [requestURL],\n client,\n serviceWorkers: 'none',\n referrer: 'no-referrer',\n mode: 'websocket',\n credentials: 'include',\n cache: 'no-store',\n redirect: 'error',\n useURLCredentials: true\n })\n\n // Note: undici extension, allow setting custom headers.\n if (options.headers) {\n const headersList = getHeadersList(new Headers(options.headers))\n\n request.headersList = headersList\n }\n\n // 3. Append (`Upgrade`, `websocket`) to request\u2019s header list.\n // 4. Append (`Connection`, `Upgrade`) to request\u2019s header list.\n // Note: both of these are handled by undici currently.\n // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397\n\n // 5. Let keyValue be a nonce consisting of a randomly selected\n // 16-byte value that has been forgiving-base64-encoded and\n // isomorphic encoded.\n const keyValue = crypto.randomBytes(16).toString('base64')\n\n // 6. Append (`Sec-WebSocket-Key`, keyValue) to request\u2019s\n // header list.\n request.headersList.append('sec-websocket-key', keyValue, true)\n\n // 7. Append (`Sec-WebSocket-Version`, `13`) to request\u2019s\n // header list.\n request.headersList.append('sec-websocket-version', '13', true)\n\n // 8. For each protocol in protocols, combine\n // (`Sec-WebSocket-Protocol`, protocol) in request\u2019s header\n // list.\n for (const protocol of protocols) {\n request.headersList.append('sec-websocket-protocol', protocol, true)\n }\n\n // 9. Let permessageDeflate be a user-agent defined\n // \"permessage-deflate\" extension header value.\n // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673\n const permessageDeflate = 'permessage-deflate; client_max_window_bits'\n\n // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to\n // request\u2019s header list.\n request.headersList.append('sec-websocket-extensions', permessageDeflate, true)\n\n // 11. Fetch request with useParallelQueue set to true, and\n // processResponse given response being these steps:\n const controller = fetching({\n request,\n useParallelQueue: true,\n dispatcher: options.dispatcher,\n processResponse (response) {\n // 1. If response is a network error or its status is not 101,\n // fail the WebSocket connection.\n // if (response.type === 'error' || ((response.socket?.session != null && response.status !== 200) && response.status !== 101)) {\n if (response.type === 'error' || response.status !== 101) {\n // The presence of a session property on the socket indicates HTTP2\n // HTTP1\n if (response.socket?.session == null) {\n failWebsocketConnection(handler, 1002, 'Received network error or non-101 status code.', response.error)\n return\n }\n\n // HTTP2\n if (response.status !== 200) {\n failWebsocketConnection(handler, 1002, 'Received network error or non-200 status code.', response.error)\n return\n }\n }\n\n if (warningEmitted === false && response.socket?.session != null) {\n process.emitWarning('WebSocket over HTTP2 is experimental, and subject to change.', 'ExperimentalWarning')\n warningEmitted = true\n }\n\n // 2. If protocols is not the empty list and extracting header\n // list values given `Sec-WebSocket-Protocol` and response\u2019s\n // header list results in null, failure, or the empty byte\n // sequence, then fail the WebSocket connection.\n if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) {\n failWebsocketConnection(handler, 1002, 'Server did not respond with sent protocols.')\n return\n }\n\n // 3. Follow the requirements stated step 2 to step 6, inclusive,\n // of the last set of steps in section 4.1 of The WebSocket\n // Protocol to validate response. This either results in fail\n // the WebSocket connection or the WebSocket connection is\n // established.\n\n // 2. If the response lacks an |Upgrade| header field or the |Upgrade|\n // header field contains a value that is not an ASCII case-\n // insensitive match for the value \"websocket\", the client MUST\n // _Fail the WebSocket Connection_.\n // For H2, no upgrade header is expected.\n if (response.socket.session == null && response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') {\n failWebsocketConnection(handler, 1002, 'Server did not set Upgrade header to \"websocket\".')\n return\n }\n\n // 3. If the response lacks a |Connection| header field or the\n // |Connection| header field doesn't contain a token that is an\n // ASCII case-insensitive match for the value \"Upgrade\", the client\n // MUST _Fail the WebSocket Connection_.\n // For H2, no connection header is expected.\n if (response.socket.session == null && response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') {\n failWebsocketConnection(handler, 1002, 'Server did not set Connection header to \"upgrade\".')\n return\n }\n\n // 4. If the response lacks a |Sec-WebSocket-Accept| header field or\n // the |Sec-WebSocket-Accept| contains a value other than the\n // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket-\n // Key| (as a string, not base64-decoded) with the string \"258EAFA5-\n // E914-47DA-95CA-C5AB0DC85B11\" but ignoring any leading and\n // trailing whitespace, the client MUST _Fail the WebSocket\n // Connection_.\n const secWSAccept = response.headersList.get('Sec-WebSocket-Accept')\n const digest = crypto.hash('sha1', keyValue + uid, 'base64')\n if (secWSAccept !== digest) {\n failWebsocketConnection(handler, 1002, 'Incorrect hash received in Sec-WebSocket-Accept header.')\n return\n }\n\n // 5. If the response includes a |Sec-WebSocket-Extensions| header\n // field and this header field indicates the use of an extension\n // that was not present in the client's handshake (the server has\n // indicated an extension not requested by the client), the client\n // MUST _Fail the WebSocket Connection_. (The parsing of this\n // header field to determine which extensions are requested is\n // discussed in Section 9.1.)\n const secExtension = response.headersList.get('Sec-WebSocket-Extensions')\n let extensions\n\n if (secExtension !== null) {\n extensions = parseExtensions(secExtension)\n\n if (!extensions.has('permessage-deflate')) {\n failWebsocketConnection(handler, 1002, 'Sec-WebSocket-Extensions header does not match.')\n return\n }\n }\n\n // 6. If the response includes a |Sec-WebSocket-Protocol| header field\n // and this header field indicates the use of a subprotocol that was\n // not present in the client's handshake (the server has indicated a\n // subprotocol not requested by the client), the client MUST _Fail\n // the WebSocket Connection_.\n const secProtocol = response.headersList.get('Sec-WebSocket-Protocol')\n\n if (secProtocol !== null) {\n const requestProtocols = getDecodeSplit('sec-websocket-protocol', request.headersList)\n\n // The client can request that the server use a specific subprotocol by\n // including the |Sec-WebSocket-Protocol| field in its handshake. If it\n // is specified, the server needs to include the same field and one of\n // the selected subprotocol values in its response for the connection to\n // be established.\n if (!requestProtocols.includes(secProtocol)) {\n failWebsocketConnection(handler, 1002, 'Protocol was not set in the opening handshake.')\n return\n }\n }\n\n response.socket.on('data', handler.onSocketData)\n response.socket.on('close', handler.onSocketClose)\n response.socket.on('error', handler.onSocketError)\n\n handler.wasEverConnected = true\n handler.onConnectionEstablished(response, extensions)\n }\n })\n\n return controller\n}\n\n/**\n * @see https://whatpr.org/websockets/48.html#close-the-websocket\n * @param {import('./websocket').Handler} object\n * @param {number} [code=null]\n * @param {string} [reason='']\n */\nfunction closeWebSocketConnection (object, code, reason, validate = false) {\n // 1. If code was not supplied, let code be null.\n code ??= null\n\n // 2. If reason was not supplied, let reason be the empty string.\n reason ??= ''\n\n // 3. Validate close code and reason with code and reason.\n if (validate) validateCloseCodeAndReason(code, reason)\n\n // 4. Run the first matching steps from the following list:\n // - If object\u2019s ready state is CLOSING (2) or CLOSED (3)\n // - If the WebSocket connection is not yet established [WSP]\n // - If the WebSocket closing handshake has not yet been started [WSP]\n // - Otherwise\n if (isClosed(object.readyState) || isClosing(object.readyState)) {\n // Do nothing.\n } else if (!isEstablished(object.readyState)) {\n // Fail the WebSocket connection and set object\u2019s ready state to CLOSING (2). [WSP]\n failWebsocketConnection(object)\n object.readyState = states.CLOSING\n } else if (!object.closeState.has(sentCloseFrameState.SENT) && !object.closeState.has(sentCloseFrameState.RECEIVED)) {\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n\n const frame = new WebsocketFrameSend()\n\n // If neither code nor reason is present, the WebSocket Close\n // message must not have a body.\n\n // If code is present, then the status code to use in the\n // WebSocket Close message must be the integer given by code.\n // If code is null and reason is the empty string, the WebSocket Close frame must not have a body.\n // If reason is non-empty but code is null, then set code to 1000 (\"Normal Closure\").\n if (reason.length !== 0 && code === null) {\n code = 1000\n }\n\n // If code is set, then the status code to use in the WebSocket Close frame must be the integer given by code.\n assert(code === null || Number.isInteger(code))\n\n if (code === null && reason.length === 0) {\n frame.frameData = emptyBuffer\n } else if (code !== null && reason === null) {\n frame.frameData = Buffer.allocUnsafe(2)\n frame.frameData.writeUInt16BE(code, 0)\n } else if (code !== null && reason !== null) {\n // If reason is also present, then reasonBytes must be\n // provided in the Close message after the status code.\n frame.frameData = Buffer.allocUnsafe(2 + Buffer.byteLength(reason))\n frame.frameData.writeUInt16BE(code, 0)\n // the body MAY contain UTF-8-encoded data with value /reason/\n frame.frameData.write(reason, 2, 'utf-8')\n } else {\n frame.frameData = emptyBuffer\n }\n\n object.socket.write(frame.createFrame(opcodes.CLOSE))\n\n object.closeState.add(sentCloseFrameState.SENT)\n\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n object.readyState = states.CLOSING\n } else {\n // Set object\u2019s ready state to CLOSING (2).\n object.readyState = states.CLOSING\n }\n}\n\n/**\n * @param {import('./websocket').Handler} handler\n * @param {number} code\n * @param {string|undefined} reason\n * @param {unknown} cause\n * @returns {void}\n */\nfunction failWebsocketConnection (handler, code, reason, cause) {\n // If _The WebSocket Connection is Established_ prior to the point where\n // the endpoint is required to _Fail the WebSocket Connection_, the\n // endpoint SHOULD send a Close frame with an appropriate status code\n // (Section 7.4) before proceeding to _Close the WebSocket Connection_.\n if (isEstablished(handler.readyState)) {\n closeWebSocketConnection(handler, code, reason, false)\n }\n\n handler.controller.abort()\n\n if (isConnecting(handler.readyState)) {\n // If the connection was not established, we must still emit an 'error' and 'close' events\n handler.onSocketClose()\n } else if (handler.socket?.destroyed === false) {\n handler.socket.destroy()\n }\n}\n\nmodule.exports = {\n establishWebSocketConnection,\n failWebsocketConnection,\n closeWebSocketConnection\n}\n", "'use strict'\n\nconst { createInflateRaw, Z_DEFAULT_WINDOWBITS } = require('node:zlib')\nconst { isValidClientWindowBits } = require('./util')\nconst { MessageSizeExceededError } = require('../../core/errors')\n\nconst tail = Buffer.from([0x00, 0x00, 0xff, 0xff])\nconst kBuffer = Symbol('kBuffer')\nconst kLength = Symbol('kLength')\n\n// Default maximum decompressed message size: 4 MB\nconst kDefaultMaxDecompressedSize = 4 * 1024 * 1024\n\nclass PerMessageDeflate {\n /** @type {import('node:zlib').InflateRaw} */\n #inflate\n\n #options = {}\n\n /** @type {boolean} */\n #aborted = false\n\n /** @type {Function|null} */\n #currentCallback = null\n\n /**\n * @param {Map} extensions\n */\n constructor (extensions) {\n this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover')\n this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits')\n }\n\n decompress (chunk, fin, callback) {\n // An endpoint uses the following algorithm to decompress a message.\n // 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the\n // payload of the message.\n // 2. Decompress the resulting data using DEFLATE.\n\n if (this.#aborted) {\n callback(new MessageSizeExceededError())\n return\n }\n\n if (!this.#inflate) {\n let windowBits = Z_DEFAULT_WINDOWBITS\n\n if (this.#options.serverMaxWindowBits) { // empty values default to Z_DEFAULT_WINDOWBITS\n if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) {\n callback(new Error('Invalid server_max_window_bits'))\n return\n }\n\n windowBits = Number.parseInt(this.#options.serverMaxWindowBits)\n }\n\n try {\n this.#inflate = createInflateRaw({ windowBits })\n } catch (err) {\n callback(err)\n return\n }\n this.#inflate[kBuffer] = []\n this.#inflate[kLength] = 0\n\n this.#inflate.on('data', (data) => {\n if (this.#aborted) {\n return\n }\n\n this.#inflate[kLength] += data.length\n\n if (this.#inflate[kLength] > kDefaultMaxDecompressedSize) {\n this.#aborted = true\n this.#inflate.removeAllListeners()\n this.#inflate.destroy()\n this.#inflate = null\n\n if (this.#currentCallback) {\n const cb = this.#currentCallback\n this.#currentCallback = null\n cb(new MessageSizeExceededError())\n }\n return\n }\n\n this.#inflate[kBuffer].push(data)\n })\n\n this.#inflate.on('error', (err) => {\n this.#inflate = null\n callback(err)\n })\n }\n\n this.#currentCallback = callback\n this.#inflate.write(chunk)\n if (fin) {\n this.#inflate.write(tail)\n }\n\n this.#inflate.flush(() => {\n if (this.#aborted || !this.#inflate) {\n return\n }\n\n const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength])\n\n this.#inflate[kBuffer].length = 0\n this.#inflate[kLength] = 0\n this.#currentCallback = null\n\n callback(null, full)\n })\n }\n}\n\nmodule.exports = { PerMessageDeflate }\n", "'use strict'\n\nconst { Writable } = require('node:stream')\nconst assert = require('node:assert')\nconst { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require('./constants')\nconst {\n isValidStatusCode,\n isValidOpcode,\n websocketMessageReceived,\n utf8Decode,\n isControlFrame,\n isTextBinaryFrame,\n isContinuationFrame\n} = require('./util')\nconst { failWebsocketConnection } = require('./connection')\nconst { WebsocketFrameSend } = require('./frame')\nconst { PerMessageDeflate } = require('./permessage-deflate')\nconst { MessageSizeExceededError } = require('../../core/errors')\n\n// This code was influenced by ws released under the MIT license.\n// Copyright (c) 2011 Einar Otto Stangvik \n// Copyright (c) 2013 Arnout Kazemier and contributors\n// Copyright (c) 2016 Luigi Pinca and contributors\n\nclass ByteParser extends Writable {\n #buffers = []\n #fragmentsBytes = 0\n #byteOffset = 0\n #loop = false\n\n #state = parserStates.INFO\n\n #info = {}\n #fragments = []\n\n /** @type {Map} */\n #extensions\n\n /** @type {import('./websocket').Handler} */\n #handler\n\n /**\n * @param {import('./websocket').Handler} handler\n * @param {Map|null} extensions\n */\n constructor (handler, extensions) {\n super()\n\n this.#handler = handler\n this.#extensions = extensions == null ? new Map() : extensions\n\n if (this.#extensions.has('permessage-deflate')) {\n this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions))\n }\n }\n\n /**\n * @param {Buffer} chunk\n * @param {() => void} callback\n */\n _write (chunk, _, callback) {\n this.#buffers.push(chunk)\n this.#byteOffset += chunk.length\n this.#loop = true\n\n this.run(callback)\n }\n\n /**\n * Runs whenever a new chunk is received.\n * Callback is called whenever there are no more chunks buffering,\n * or not enough bytes are buffered to parse.\n */\n run (callback) {\n while (this.#loop) {\n if (this.#state === parserStates.INFO) {\n // If there aren't enough bytes to parse the payload length, etc.\n if (this.#byteOffset < 2) {\n return callback()\n }\n\n const buffer = this.consume(2)\n const fin = (buffer[0] & 0x80) !== 0\n const opcode = buffer[0] & 0x0F\n const masked = (buffer[1] & 0x80) === 0x80\n\n const fragmented = !fin && opcode !== opcodes.CONTINUATION\n const payloadLength = buffer[1] & 0x7F\n\n const rsv1 = buffer[0] & 0x40\n const rsv2 = buffer[0] & 0x20\n const rsv3 = buffer[0] & 0x10\n\n if (!isValidOpcode(opcode)) {\n failWebsocketConnection(this.#handler, 1002, 'Invalid opcode received')\n return callback()\n }\n\n if (masked) {\n failWebsocketConnection(this.#handler, 1002, 'Frame cannot be masked')\n return callback()\n }\n\n // MUST be 0 unless an extension is negotiated that defines meanings\n // for non-zero values. If a nonzero value is received and none of\n // the negotiated extensions defines the meaning of such a nonzero\n // value, the receiving endpoint MUST _Fail the WebSocket\n // Connection_.\n // This document allocates the RSV1 bit of the WebSocket header for\n // PMCEs and calls the bit the \"Per-Message Compressed\" bit. On a\n // WebSocket connection where a PMCE is in use, this bit indicates\n // whether a message is compressed or not.\n if (rsv1 !== 0 && !this.#extensions.has('permessage-deflate')) {\n failWebsocketConnection(this.#handler, 1002, 'Expected RSV1 to be clear.')\n return\n }\n\n if (rsv2 !== 0 || rsv3 !== 0) {\n failWebsocketConnection(this.#handler, 1002, 'RSV1, RSV2, RSV3 must be clear')\n return\n }\n\n if (fragmented && !isTextBinaryFrame(opcode)) {\n // Only text and binary frames can be fragmented\n failWebsocketConnection(this.#handler, 1002, 'Invalid frame type was fragmented.')\n return\n }\n\n // If we are already parsing a text/binary frame and do not receive either\n // a continuation frame or close frame, fail the connection.\n if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) {\n failWebsocketConnection(this.#handler, 1002, 'Expected continuation frame')\n return\n }\n\n if (this.#info.fragmented && fragmented) {\n // A fragmented frame can't be fragmented itself\n failWebsocketConnection(this.#handler, 1002, 'Fragmented frame exceeded 125 bytes.')\n return\n }\n\n // \"All control frames MUST have a payload length of 125 bytes or less\n // and MUST NOT be fragmented.\"\n if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) {\n failWebsocketConnection(this.#handler, 1002, 'Control frame either too large or fragmented')\n return\n }\n\n if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) {\n failWebsocketConnection(this.#handler, 1002, 'Unexpected continuation frame')\n return\n }\n\n if (payloadLength <= 125) {\n this.#info.payloadLength = payloadLength\n this.#state = parserStates.READ_DATA\n } else if (payloadLength === 126) {\n this.#state = parserStates.PAYLOADLENGTH_16\n } else if (payloadLength === 127) {\n this.#state = parserStates.PAYLOADLENGTH_64\n }\n\n if (isTextBinaryFrame(opcode)) {\n this.#info.binaryType = opcode\n this.#info.compressed = rsv1 !== 0\n }\n\n this.#info.opcode = opcode\n this.#info.masked = masked\n this.#info.fin = fin\n this.#info.fragmented = fragmented\n } else if (this.#state === parserStates.PAYLOADLENGTH_16) {\n if (this.#byteOffset < 2) {\n return callback()\n }\n\n const buffer = this.consume(2)\n\n this.#info.payloadLength = buffer.readUInt16BE(0)\n this.#state = parserStates.READ_DATA\n } else if (this.#state === parserStates.PAYLOADLENGTH_64) {\n if (this.#byteOffset < 8) {\n return callback()\n }\n\n const buffer = this.consume(8)\n const upper = buffer.readUInt32BE(0)\n const lower = buffer.readUInt32BE(4)\n\n // 2^31 is the maximum bytes an arraybuffer can contain\n // on 32-bit systems. Although, on 64-bit systems, this is\n // 2^53-1 bytes.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length\n // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275\n // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e\n if (upper !== 0 || lower > 2 ** 31 - 1) {\n failWebsocketConnection(this.#handler, 1009, 'Received payload length > 2^31 bytes.')\n return\n }\n\n this.#info.payloadLength = lower\n this.#state = parserStates.READ_DATA\n } else if (this.#state === parserStates.READ_DATA) {\n if (this.#byteOffset < this.#info.payloadLength) {\n return callback()\n }\n\n const body = this.consume(this.#info.payloadLength)\n\n if (isControlFrame(this.#info.opcode)) {\n this.#loop = this.parseControlFrame(body)\n this.#state = parserStates.INFO\n } else {\n if (!this.#info.compressed) {\n this.writeFragments(body)\n\n // If the frame is not fragmented, a message has been received.\n // If the frame is fragmented, it will terminate with a fin bit set\n // and an opcode of 0 (continuation), therefore we handle that when\n // parsing continuation frames, not here.\n if (!this.#info.fragmented && this.#info.fin) {\n websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments())\n }\n\n this.#state = parserStates.INFO\n } else {\n this.#extensions.get('permessage-deflate').decompress(body, this.#info.fin, (error, data) => {\n if (error) {\n // Use 1009 (Message Too Big) for decompression size limit errors\n const code = error instanceof MessageSizeExceededError ? 1009 : 1007\n failWebsocketConnection(this.#handler, code, error.message)\n return\n }\n\n this.writeFragments(data)\n\n if (!this.#info.fin) {\n this.#state = parserStates.INFO\n this.#loop = true\n this.run(callback)\n return\n }\n\n websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments())\n\n this.#loop = true\n this.#state = parserStates.INFO\n this.run(callback)\n })\n\n this.#loop = false\n break\n }\n }\n }\n }\n }\n\n /**\n * Take n bytes from the buffered Buffers\n * @param {number} n\n * @returns {Buffer}\n */\n consume (n) {\n if (n > this.#byteOffset) {\n throw new Error('Called consume() before buffers satiated.')\n } else if (n === 0) {\n return emptyBuffer\n }\n\n this.#byteOffset -= n\n\n const first = this.#buffers[0]\n\n if (first.length > n) {\n // replace with remaining buffer\n this.#buffers[0] = first.subarray(n, first.length)\n return first.subarray(0, n)\n } else if (first.length === n) {\n // prefect match\n return this.#buffers.shift()\n } else {\n let offset = 0\n // If Buffer.allocUnsafe is used, extra copies will be made because the offset is non-zero.\n const buffer = Buffer.allocUnsafeSlow(n)\n while (offset !== n) {\n const next = this.#buffers[0]\n const length = next.length\n\n if (length + offset === n) {\n buffer.set(this.#buffers.shift(), offset)\n break\n } else if (length + offset > n) {\n buffer.set(next.subarray(0, n - offset), offset)\n this.#buffers[0] = next.subarray(n - offset)\n break\n } else {\n buffer.set(this.#buffers.shift(), offset)\n offset += length\n }\n }\n\n return buffer\n }\n }\n\n writeFragments (fragment) {\n this.#fragmentsBytes += fragment.length\n this.#fragments.push(fragment)\n }\n\n consumeFragments () {\n const fragments = this.#fragments\n\n if (fragments.length === 1) {\n // single fragment\n this.#fragmentsBytes = 0\n return fragments.shift()\n }\n\n let offset = 0\n // If Buffer.allocUnsafe is used, extra copies will be made because the offset is non-zero.\n const output = Buffer.allocUnsafeSlow(this.#fragmentsBytes)\n\n for (let i = 0; i < fragments.length; ++i) {\n const buffer = fragments[i]\n output.set(buffer, offset)\n offset += buffer.length\n }\n\n this.#fragments = []\n this.#fragmentsBytes = 0\n\n return output\n }\n\n parseCloseBody (data) {\n assert(data.length !== 1)\n\n // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5\n /** @type {number|undefined} */\n let code\n\n if (data.length >= 2) {\n // _The WebSocket Connection Close Code_ is\n // defined as the status code (Section 7.4) contained in the first Close\n // control frame received by the application\n code = data.readUInt16BE(0)\n }\n\n if (code !== undefined && !isValidStatusCode(code)) {\n return { code: 1002, reason: 'Invalid status code', error: true }\n }\n\n // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6\n /** @type {Buffer} */\n let reason = data.subarray(2)\n\n // Remove BOM\n if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) {\n reason = reason.subarray(3)\n }\n\n try {\n reason = utf8Decode(reason)\n } catch {\n return { code: 1007, reason: 'Invalid UTF-8', error: true }\n }\n\n return { code, reason, error: false }\n }\n\n /**\n * Parses control frames.\n * @param {Buffer} body\n */\n parseControlFrame (body) {\n const { opcode, payloadLength } = this.#info\n\n if (opcode === opcodes.CLOSE) {\n if (payloadLength === 1) {\n failWebsocketConnection(this.#handler, 1002, 'Received close frame with a 1-byte body.')\n return false\n }\n\n this.#info.closeInfo = this.parseCloseBody(body)\n\n if (this.#info.closeInfo.error) {\n const { code, reason } = this.#info.closeInfo\n\n failWebsocketConnection(this.#handler, code, reason)\n return false\n }\n\n // Upon receiving such a frame, the other peer sends a\n // Close frame in response, if it hasn't already sent one.\n if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {\n // If an endpoint receives a Close frame and did not previously send a\n // Close frame, the endpoint MUST send a Close frame in response. (When\n // sending a Close frame in response, the endpoint typically echos the\n // status code it received.)\n let body = emptyBuffer\n if (this.#info.closeInfo.code) {\n body = Buffer.allocUnsafe(2)\n body.writeUInt16BE(this.#info.closeInfo.code, 0)\n }\n const closeFrame = new WebsocketFrameSend(body)\n\n this.#handler.socket.write(closeFrame.createFrame(opcodes.CLOSE))\n this.#handler.closeState.add(sentCloseFrameState.SENT)\n }\n\n // Upon either sending or receiving a Close control frame, it is said\n // that _The WebSocket Closing Handshake is Started_ and that the\n // WebSocket connection is in the CLOSING state.\n this.#handler.readyState = states.CLOSING\n this.#handler.closeState.add(sentCloseFrameState.RECEIVED)\n\n return false\n } else if (opcode === opcodes.PING) {\n // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in\n // response, unless it already received a Close frame.\n // A Pong frame sent in response to a Ping frame must have identical\n // \"Application data\"\n\n if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {\n const frame = new WebsocketFrameSend(body)\n\n this.#handler.socket.write(frame.createFrame(opcodes.PONG))\n\n this.#handler.onPing(body)\n }\n } else if (opcode === opcodes.PONG) {\n // A Pong frame MAY be sent unsolicited. This serves as a\n // unidirectional heartbeat. A response to an unsolicited Pong frame is\n // not expected.\n this.#handler.onPong(body)\n }\n\n return true\n }\n\n get closingInfo () {\n return this.#info.closeInfo\n }\n}\n\nmodule.exports = {\n ByteParser\n}\n", "'use strict'\n\nconst { WebsocketFrameSend } = require('./frame')\nconst { opcodes, sendHints } = require('./constants')\nconst FixedQueue = require('../../dispatcher/fixed-queue')\n\n/**\n * @typedef {object} SendQueueNode\n * @property {Promise | null} promise\n * @property {((...args: any[]) => any)} callback\n * @property {Buffer | null} frame\n */\n\nclass SendQueue {\n /**\n * @type {FixedQueue}\n */\n #queue = new FixedQueue()\n\n /**\n * @type {boolean}\n */\n #running = false\n\n /** @type {import('node:net').Socket} */\n #socket\n\n constructor (socket) {\n this.#socket = socket\n }\n\n add (item, cb, hint) {\n if (hint !== sendHints.blob) {\n if (!this.#running) {\n // TODO(@tsctx): support fast-path for string on running\n if (hint === sendHints.text) {\n // special fast-path for string\n const { 0: head, 1: body } = WebsocketFrameSend.createFastTextFrame(item)\n this.#socket.cork()\n this.#socket.write(head)\n this.#socket.write(body, cb)\n this.#socket.uncork()\n } else {\n // direct writing\n this.#socket.write(createFrame(item, hint), cb)\n }\n } else {\n /** @type {SendQueueNode} */\n const node = {\n promise: null,\n callback: cb,\n frame: createFrame(item, hint)\n }\n this.#queue.push(node)\n }\n return\n }\n\n /** @type {SendQueueNode} */\n const node = {\n promise: item.arrayBuffer().then((ab) => {\n node.promise = null\n node.frame = createFrame(ab, hint)\n }),\n callback: cb,\n frame: null\n }\n\n this.#queue.push(node)\n\n if (!this.#running) {\n this.#run()\n }\n }\n\n async #run () {\n this.#running = true\n const queue = this.#queue\n while (!queue.isEmpty()) {\n const node = queue.shift()\n // wait pending promise\n if (node.promise !== null) {\n await node.promise\n }\n // write\n this.#socket.write(node.frame, node.callback)\n // cleanup\n node.callback = node.frame = null\n }\n this.#running = false\n }\n}\n\nfunction createFrame (data, hint) {\n return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.text ? opcodes.TEXT : opcodes.BINARY)\n}\n\nfunction toBuffer (data, hint) {\n switch (hint) {\n case sendHints.text:\n case sendHints.typedArray:\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength)\n case sendHints.arrayBuffer:\n case sendHints.blob:\n return new Uint8Array(data)\n }\n}\n\nmodule.exports = { SendQueue }\n", "'use strict'\n\nconst { isArrayBuffer } = require('node:util/types')\nconst { webidl } = require('../webidl')\nconst { URLSerializer } = require('../fetch/data-url')\nconst { environmentSettingsObject } = require('../fetch/util')\nconst { staticPropertyDescriptors, states, sentCloseFrameState, sendHints, opcodes } = require('./constants')\nconst {\n isConnecting,\n isEstablished,\n isClosing,\n isClosed,\n isValidSubprotocol,\n fireEvent,\n utf8Decode,\n toArrayBuffer,\n getURLRecord\n} = require('./util')\nconst { establishWebSocketConnection, closeWebSocketConnection, failWebsocketConnection } = require('./connection')\nconst { ByteParser } = require('./receiver')\nconst { kEnumerableProperty } = require('../../core/util')\nconst { getGlobalDispatcher } = require('../../global')\nconst { ErrorEvent, CloseEvent, createFastMessageEvent } = require('./events')\nconst { SendQueue } = require('./sender')\nconst { WebsocketFrameSend } = require('./frame')\nconst { channels } = require('../../core/diagnostics')\n\nfunction getSocketAddress (socket) {\n if (typeof socket?.address === 'function') {\n return socket.address()\n }\n\n if (typeof socket?.session?.socket?.address === 'function') {\n return socket.session.socket.address()\n }\n\n return null\n}\n\n/**\n * @typedef {object} Handler\n * @property {(response: any, extensions?: string[]) => void} onConnectionEstablished\n * @property {(opcode: number, data: Buffer) => void} onMessage\n * @property {(error: Error) => void} onParserError\n * @property {() => void} onParserDrain\n * @property {(chunk: Buffer) => void} onSocketData\n * @property {(err: Error) => void} onSocketError\n * @property {() => void} onSocketClose\n * @property {(body: Buffer) => void} onPing\n * @property {(body: Buffer) => void} onPong\n *\n * @property {number} readyState\n * @property {import('stream').Duplex} socket\n * @property {Set} closeState\n * @property {import('../fetch/index').Fetch} controller\n * @property {boolean} [wasEverConnected=false]\n */\n\n// https://websockets.spec.whatwg.org/#interface-definition\nclass WebSocket extends EventTarget {\n #events = {\n open: null,\n error: null,\n close: null,\n message: null\n }\n\n #bufferedAmount = 0\n #protocol = ''\n #extensions = ''\n\n /** @type {SendQueue} */\n #sendQueue\n\n /** @type {Handler} */\n #handler = {\n onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions),\n onMessage: (opcode, data) => this.#onMessage(opcode, data),\n onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message),\n onParserDrain: () => this.#onParserDrain(),\n onSocketData: (chunk) => {\n if (!this.#parser.write(chunk)) {\n this.#handler.socket.pause()\n }\n },\n onSocketError: (err) => {\n this.#handler.readyState = states.CLOSING\n\n if (channels.socketError.hasSubscribers) {\n channels.socketError.publish(err)\n }\n\n this.#handler.socket.destroy()\n },\n onSocketClose: () => this.#onSocketClose(),\n onPing: (body) => {\n if (channels.ping.hasSubscribers) {\n channels.ping.publish({\n payload: body,\n websocket: this\n })\n }\n },\n onPong: (body) => {\n if (channels.pong.hasSubscribers) {\n channels.pong.publish({\n payload: body,\n websocket: this\n })\n }\n },\n\n readyState: states.CONNECTING,\n socket: null,\n closeState: new Set(),\n controller: null,\n wasEverConnected: false\n }\n\n #url\n #binaryType\n /** @type {import('./receiver').ByteParser} */\n #parser\n\n /**\n * @param {string} url\n * @param {string|string[]} protocols\n */\n constructor (url, protocols = []) {\n super()\n\n webidl.util.markAsUncloneable(this)\n\n const prefix = 'WebSocket constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols, prefix, 'options')\n\n url = webidl.converters.USVString(url)\n protocols = options.protocols\n\n // 1. Let baseURL be this's relevant settings object's API base URL.\n const baseURL = environmentSettingsObject.settingsObject.baseUrl\n\n // 2. Let urlRecord be the result of getting a URL record given url and baseURL.\n const urlRecord = getURLRecord(url, baseURL)\n\n // 3. If protocols is a string, set protocols to a sequence consisting\n // of just that string.\n if (typeof protocols === 'string') {\n protocols = [protocols]\n }\n\n // 4. If any of the values in protocols occur more than once or otherwise\n // fail to match the requirements for elements that comprise the value\n // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket\n // protocol, then throw a \"SyntaxError\" DOMException.\n if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n // 5. Set this's url to urlRecord.\n this.#url = new URL(urlRecord.href)\n\n // 6. Let client be this's relevant settings object.\n const client = environmentSettingsObject.settingsObject\n\n // 7. Run this step in parallel:\n // 7.1. Establish a WebSocket connection given urlRecord, protocols,\n // and client.\n this.#handler.controller = establishWebSocketConnection(\n urlRecord,\n protocols,\n client,\n this.#handler,\n options\n )\n\n // Each WebSocket object has an associated ready state, which is a\n // number representing the state of the connection. Initially it must\n // be CONNECTING (0).\n this.#handler.readyState = WebSocket.CONNECTING\n\n // The extensions attribute must initially return the empty string.\n\n // The protocol attribute must initially return the empty string.\n\n // Each WebSocket object has an associated binary type, which is a\n // BinaryType. Initially it must be \"blob\".\n this.#binaryType = 'blob'\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#dom-websocket-close\n * @param {number|undefined} code\n * @param {string|undefined} reason\n */\n close (code = undefined, reason = undefined) {\n webidl.brandCheck(this, WebSocket)\n\n const prefix = 'WebSocket.close'\n\n if (code !== undefined) {\n code = webidl.converters['unsigned short'](code, prefix, 'code', webidl.attributes.Clamp)\n }\n\n if (reason !== undefined) {\n reason = webidl.converters.USVString(reason)\n }\n\n // 1. If code is the special value \"missing\", then set code to null.\n code ??= null\n\n // 2. If reason is the special value \"missing\", then set reason to the empty string.\n reason ??= ''\n\n // 3. Close the WebSocket with this, code, and reason.\n closeWebSocketConnection(this.#handler, code, reason, true)\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#dom-websocket-send\n * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data\n */\n send (data) {\n webidl.brandCheck(this, WebSocket)\n\n const prefix = 'WebSocket.send'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n data = webidl.converters.WebSocketSendData(data, prefix, 'data')\n\n // 1. If this's ready state is CONNECTING, then throw an\n // \"InvalidStateError\" DOMException.\n if (isConnecting(this.#handler.readyState)) {\n throw new DOMException('Sent before connected.', 'InvalidStateError')\n }\n\n // 2. Run the appropriate set of steps from the following list:\n // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1\n // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2\n\n if (!isEstablished(this.#handler.readyState) || isClosing(this.#handler.readyState)) {\n return\n }\n\n // If data is a string\n if (typeof data === 'string') {\n // If the WebSocket connection is established and the WebSocket\n // closing handshake has not yet started, then the user agent\n // must send a WebSocket Message comprised of the data argument\n // using a text frame opcode; if the data cannot be sent, e.g.\n // because it would need to be buffered but the buffer is full,\n // the user agent must flag the WebSocket as full and then close\n // the WebSocket connection. Any invocation of this method with a\n // string argument that does not throw an exception must increase\n // the bufferedAmount attribute by the number of bytes needed to\n // express the argument as UTF-8.\n\n const buffer = Buffer.from(data)\n\n this.#bufferedAmount += buffer.byteLength\n this.#sendQueue.add(buffer, () => {\n this.#bufferedAmount -= buffer.byteLength\n }, sendHints.text)\n } else if (isArrayBuffer(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need\n // to be buffered but the buffer is full, the user agent must flag\n // the WebSocket as full and then close the WebSocket connection.\n // The data to be sent is the data stored in the buffer described\n // by the ArrayBuffer object. Any invocation of this method with an\n // ArrayBuffer argument that does not throw an exception must\n // increase the bufferedAmount attribute by the length of the\n // ArrayBuffer in bytes.\n\n this.#bufferedAmount += data.byteLength\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= data.byteLength\n }, sendHints.arrayBuffer)\n } else if (ArrayBuffer.isView(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need to\n // be buffered but the buffer is full, the user agent must flag the\n // WebSocket as full and then close the WebSocket connection. The\n // data to be sent is the data stored in the section of the buffer\n // described by the ArrayBuffer object that data references. Any\n // invocation of this method with this kind of argument that does\n // not throw an exception must increase the bufferedAmount attribute\n // by the length of data\u2019s buffer in bytes.\n\n this.#bufferedAmount += data.byteLength\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= data.byteLength\n }, sendHints.typedArray)\n } else if (webidl.is.Blob(data)) {\n // If the WebSocket connection is established, and the WebSocket\n // closing handshake has not yet started, then the user agent must\n // send a WebSocket Message comprised of data using a binary frame\n // opcode; if the data cannot be sent, e.g. because it would need to\n // be buffered but the buffer is full, the user agent must flag the\n // WebSocket as full and then close the WebSocket connection. The data\n // to be sent is the raw data represented by the Blob object. Any\n // invocation of this method with a Blob argument that does not throw\n // an exception must increase the bufferedAmount attribute by the size\n // of the Blob object\u2019s raw data, in bytes.\n\n this.#bufferedAmount += data.size\n this.#sendQueue.add(data, () => {\n this.#bufferedAmount -= data.size\n }, sendHints.blob)\n }\n }\n\n get readyState () {\n webidl.brandCheck(this, WebSocket)\n\n // The readyState getter steps are to return this's ready state.\n return this.#handler.readyState\n }\n\n get bufferedAmount () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#bufferedAmount\n }\n\n get url () {\n webidl.brandCheck(this, WebSocket)\n\n // The url getter steps are to return this's url, serialized.\n return URLSerializer(this.#url)\n }\n\n get extensions () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#extensions\n }\n\n get protocol () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#protocol\n }\n\n get onopen () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.open\n }\n\n set onopen (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.open) {\n this.removeEventListener('open', this.#events.open)\n }\n\n const listener = webidl.converters.EventHandlerNonNull(fn)\n\n if (listener !== null) {\n this.addEventListener('open', listener)\n this.#events.open = fn\n } else {\n this.#events.open = null\n }\n }\n\n get onerror () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.error\n }\n\n set onerror (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.error) {\n this.removeEventListener('error', this.#events.error)\n }\n\n const listener = webidl.converters.EventHandlerNonNull(fn)\n\n if (listener !== null) {\n this.addEventListener('error', listener)\n this.#events.error = fn\n } else {\n this.#events.error = null\n }\n }\n\n get onclose () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.close\n }\n\n set onclose (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.close) {\n this.removeEventListener('close', this.#events.close)\n }\n\n const listener = webidl.converters.EventHandlerNonNull(fn)\n\n if (listener !== null) {\n this.addEventListener('close', listener)\n this.#events.close = fn\n } else {\n this.#events.close = null\n }\n }\n\n get onmessage () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#events.message\n }\n\n set onmessage (fn) {\n webidl.brandCheck(this, WebSocket)\n\n if (this.#events.message) {\n this.removeEventListener('message', this.#events.message)\n }\n\n const listener = webidl.converters.EventHandlerNonNull(fn)\n\n if (listener !== null) {\n this.addEventListener('message', listener)\n this.#events.message = fn\n } else {\n this.#events.message = null\n }\n }\n\n get binaryType () {\n webidl.brandCheck(this, WebSocket)\n\n return this.#binaryType\n }\n\n set binaryType (type) {\n webidl.brandCheck(this, WebSocket)\n\n if (type !== 'blob' && type !== 'arraybuffer') {\n this.#binaryType = 'blob'\n } else {\n this.#binaryType = type\n }\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n */\n #onConnectionEstablished (response, parsedExtensions) {\n // processResponse is called when the \"response's header list has been received and initialized.\"\n // once this happens, the connection is open\n this.#handler.socket = response.socket\n\n const parser = new ByteParser(this.#handler, parsedExtensions)\n parser.on('drain', () => this.#handler.onParserDrain())\n parser.on('error', (err) => this.#handler.onParserError(err))\n\n this.#parser = parser\n this.#sendQueue = new SendQueue(response.socket)\n\n // 1. Change the ready state to OPEN (1).\n this.#handler.readyState = states.OPEN\n\n // 2. Change the extensions attribute\u2019s value to the extensions in use, if\n // it is not the null value.\n // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1\n const extensions = response.headersList.get('sec-websocket-extensions')\n\n if (extensions !== null) {\n this.#extensions = extensions\n }\n\n // 3. Change the protocol attribute\u2019s value to the subprotocol in use, if\n // it is not the null value.\n // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9\n const protocol = response.headersList.get('sec-websocket-protocol')\n\n if (protocol !== null) {\n this.#protocol = protocol\n }\n\n // 4. Fire an event named open at the WebSocket object.\n fireEvent('open', this)\n\n if (channels.open.hasSubscribers) {\n // Convert headers to a plain object for the event\n const headers = response.headersList.entries\n channels.open.publish({\n address: getSocketAddress(response.socket),\n protocol: this.#protocol,\n extensions: this.#extensions,\n websocket: this,\n handshakeResponse: {\n status: response.status,\n statusText: response.statusText,\n headers\n }\n })\n }\n }\n\n #onMessage (type, data) {\n // 1. If ready state is not OPEN (1), then return.\n if (this.#handler.readyState !== states.OPEN) {\n return\n }\n\n // 2. Let dataForEvent be determined by switching on type and binary type:\n let dataForEvent\n\n if (type === opcodes.TEXT) {\n // -> type indicates that the data is Text\n // a new DOMString containing data\n try {\n dataForEvent = utf8Decode(data)\n } catch {\n failWebsocketConnection(this.#handler, 1007, 'Received invalid UTF-8 in text frame.')\n return\n }\n } else if (type === opcodes.BINARY) {\n if (this.#binaryType === 'blob') {\n // -> type indicates that the data is Binary and binary type is \"blob\"\n // a new Blob object, created in the relevant Realm of the WebSocket\n // object, that represents data as its raw data\n dataForEvent = new Blob([data])\n } else {\n // -> type indicates that the data is Binary and binary type is \"arraybuffer\"\n // a new ArrayBuffer object, created in the relevant Realm of the\n // WebSocket object, whose contents are data\n dataForEvent = toArrayBuffer(data)\n }\n }\n\n // 3. Fire an event named message at the WebSocket object, using MessageEvent,\n // with the origin attribute initialized to the serialization of the WebSocket\n // object\u2019s url's origin, and the data attribute initialized to dataForEvent.\n fireEvent('message', this, createFastMessageEvent, {\n origin: this.#url.origin,\n data: dataForEvent\n })\n }\n\n #onParserDrain () {\n this.#handler.socket.resume()\n }\n\n /**\n * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol\n * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4\n */\n #onSocketClose () {\n // If the TCP connection was closed after the\n // WebSocket closing handshake was completed, the WebSocket connection\n // is said to have been closed _cleanly_.\n const wasClean =\n this.#handler.closeState.has(sentCloseFrameState.SENT) &&\n this.#handler.closeState.has(sentCloseFrameState.RECEIVED)\n\n let code = 1005\n let reason = ''\n\n const result = this.#parser?.closingInfo\n\n if (result && !result.error) {\n code = result.code ?? 1005\n reason = result.reason\n }\n\n // 1. Change the ready state to CLOSED (3).\n this.#handler.readyState = states.CLOSED\n\n // 2. If the user agent was required to fail the WebSocket\n // connection, or if the WebSocket connection was closed\n // after being flagged as full, fire an event named error\n // at the WebSocket object.\n if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {\n // If _The WebSocket\n // Connection is Closed_ and no Close control frame was received by the\n // endpoint (such as could occur if the underlying transport connection\n // is lost), _The WebSocket Connection Close Code_ is considered to be\n // 1006.\n code = 1006\n\n fireEvent('error', this, (type, init) => new ErrorEvent(type, init), {\n error: new TypeError(reason)\n })\n }\n\n // 3. Fire an event named close at the WebSocket object,\n // using CloseEvent, with the wasClean attribute\n // initialized to true if the connection closed cleanly\n // and false otherwise, the code attribute initialized to\n // the WebSocket connection close code, and the reason\n // attribute initialized to the result of applying UTF-8\n // decode without BOM to the WebSocket connection close\n // reason.\n // TODO: process.nextTick\n fireEvent('close', this, (type, init) => new CloseEvent(type, init), {\n wasClean, code, reason\n })\n\n if (channels.close.hasSubscribers) {\n channels.close.publish({\n websocket: this,\n code,\n reason\n })\n }\n }\n\n /**\n * @param {WebSocket} ws\n * @param {Buffer|undefined} buffer\n */\n static ping (ws, buffer) {\n if (Buffer.isBuffer(buffer)) {\n if (buffer.length > 125) {\n throw new TypeError('A PING frame cannot have a body larger than 125 bytes.')\n }\n } else if (buffer !== undefined) {\n throw new TypeError('Expected buffer payload')\n }\n\n // An endpoint MAY send a Ping frame any time after the connection is\n // established and before the connection is closed.\n const readyState = ws.#handler.readyState\n\n if (isEstablished(readyState) && !isClosing(readyState) && !isClosed(readyState)) {\n const frame = new WebsocketFrameSend(buffer)\n ws.#handler.socket.write(frame.createFrame(opcodes.PING))\n }\n }\n}\n\nconst { ping } = WebSocket\nReflect.deleteProperty(WebSocket, 'ping')\n\n// https://websockets.spec.whatwg.org/#dom-websocket-connecting\nWebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING\n// https://websockets.spec.whatwg.org/#dom-websocket-open\nWebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN\n// https://websockets.spec.whatwg.org/#dom-websocket-closing\nWebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING\n// https://websockets.spec.whatwg.org/#dom-websocket-closed\nWebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED\n\nObject.defineProperties(WebSocket.prototype, {\n CONNECTING: staticPropertyDescriptors,\n OPEN: staticPropertyDescriptors,\n CLOSING: staticPropertyDescriptors,\n CLOSED: staticPropertyDescriptors,\n url: kEnumerableProperty,\n readyState: kEnumerableProperty,\n bufferedAmount: kEnumerableProperty,\n onopen: kEnumerableProperty,\n onerror: kEnumerableProperty,\n onclose: kEnumerableProperty,\n close: kEnumerableProperty,\n onmessage: kEnumerableProperty,\n binaryType: kEnumerableProperty,\n send: kEnumerableProperty,\n extensions: kEnumerableProperty,\n protocol: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'WebSocket',\n writable: false,\n enumerable: false,\n configurable: true\n }\n})\n\nObject.defineProperties(WebSocket, {\n CONNECTING: staticPropertyDescriptors,\n OPEN: staticPropertyDescriptors,\n CLOSING: staticPropertyDescriptors,\n CLOSED: staticPropertyDescriptors\n})\n\nwebidl.converters['sequence'] = webidl.sequenceConverter(\n webidl.converters.DOMString\n)\n\nwebidl.converters['DOMString or sequence'] = function (V, prefix, argument) {\n if (webidl.util.Type(V) === webidl.util.Types.OBJECT && Symbol.iterator in V) {\n return webidl.converters['sequence'](V)\n }\n\n return webidl.converters.DOMString(V, prefix, argument)\n}\n\n// This implements the proposal made in https://github.com/whatwg/websockets/issues/42\nwebidl.converters.WebSocketInit = webidl.dictionaryConverter([\n {\n key: 'protocols',\n converter: webidl.converters['DOMString or sequence'],\n defaultValue: () => []\n },\n {\n key: 'dispatcher',\n converter: webidl.converters.any,\n defaultValue: () => getGlobalDispatcher()\n },\n {\n key: 'headers',\n converter: webidl.nullableConverter(webidl.converters.HeadersInit)\n }\n])\n\nwebidl.converters['DOMString or sequence or WebSocketInit'] = function (V) {\n if (webidl.util.Type(V) === webidl.util.Types.OBJECT && !(Symbol.iterator in V)) {\n return webidl.converters.WebSocketInit(V)\n }\n\n return { protocols: webidl.converters['DOMString or sequence'](V) }\n}\n\nwebidl.converters.WebSocketSendData = function (V) {\n if (webidl.util.Type(V) === webidl.util.Types.OBJECT) {\n if (webidl.is.Blob(V)) {\n return V\n }\n\n if (webidl.is.BufferSource(V)) {\n return V\n }\n }\n\n return webidl.converters.USVString(V)\n}\n\nmodule.exports = {\n WebSocket,\n ping\n}\n", "'use strict'\n\nconst { webidl } = require('../../webidl')\nconst { validateCloseCodeAndReason } = require('../util')\nconst { kConstruct } = require('../../../core/symbols')\nconst { kEnumerableProperty } = require('../../../core/util')\n\nfunction createInheritableDOMException () {\n // https://github.com/nodejs/node/issues/59677\n class Test extends DOMException {\n get reason () {\n return ''\n }\n }\n\n if (new Test().reason !== undefined) {\n return DOMException\n }\n\n return new Proxy(DOMException, {\n construct (target, args, newTarget) {\n const instance = Reflect.construct(target, args, target)\n Object.setPrototypeOf(instance, newTarget.prototype)\n return instance\n }\n })\n}\n\nclass WebSocketError extends createInheritableDOMException() {\n #closeCode\n #reason\n\n constructor (message = '', init = undefined) {\n message = webidl.converters.DOMString(message, 'WebSocketError', 'message')\n\n // 1. Set this 's name to \" WebSocketError \".\n // 2. Set this 's message to message .\n super(message, 'WebSocketError')\n\n if (init === kConstruct) {\n return\n } else if (init !== null) {\n init = webidl.converters.WebSocketCloseInfo(init)\n }\n\n // 3. Let code be init [\" closeCode \"] if it exists , or null otherwise.\n let code = init.closeCode ?? null\n\n // 4. Let reason be init [\" reason \"] if it exists , or the empty string otherwise.\n const reason = init.reason ?? ''\n\n // 5. Validate close code and reason with code and reason .\n validateCloseCodeAndReason(code, reason)\n\n // 6. If reason is non-empty, but code is not set, then set code to 1000 (\"Normal Closure\").\n if (reason.length !== 0 && code === null) {\n code = 1000\n }\n\n // 7. Set this 's closeCode to code .\n this.#closeCode = code\n\n // 8. Set this 's reason to reason .\n this.#reason = reason\n }\n\n get closeCode () {\n return this.#closeCode\n }\n\n get reason () {\n return this.#reason\n }\n\n /**\n * @param {string} message\n * @param {number|null} code\n * @param {string} reason\n */\n static createUnvalidatedWebSocketError (message, code, reason) {\n const error = new WebSocketError(message, kConstruct)\n error.#closeCode = code\n error.#reason = reason\n return error\n }\n}\n\nconst { createUnvalidatedWebSocketError } = WebSocketError\ndelete WebSocketError.createUnvalidatedWebSocketError\n\nObject.defineProperties(WebSocketError.prototype, {\n closeCode: kEnumerableProperty,\n reason: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'WebSocketError',\n writable: false,\n enumerable: false,\n configurable: true\n }\n})\n\nwebidl.is.WebSocketError = webidl.util.MakeTypeAssertion(WebSocketError)\n\nmodule.exports = { WebSocketError, createUnvalidatedWebSocketError }\n", "'use strict'\n\nconst { createDeferredPromise } = require('../../../util/promise')\nconst { environmentSettingsObject } = require('../../fetch/util')\nconst { states, opcodes, sentCloseFrameState } = require('../constants')\nconst { webidl } = require('../../webidl')\nconst { getURLRecord, isValidSubprotocol, isEstablished, utf8Decode } = require('../util')\nconst { establishWebSocketConnection, failWebsocketConnection, closeWebSocketConnection } = require('../connection')\nconst { channels } = require('../../../core/diagnostics')\nconst { WebsocketFrameSend } = require('../frame')\nconst { ByteParser } = require('../receiver')\nconst { WebSocketError, createUnvalidatedWebSocketError } = require('./websocketerror')\nconst { kEnumerableProperty } = require('../../../core/util')\nconst { utf8DecodeBytes } = require('../../../encoding')\n\nlet emittedExperimentalWarning = false\n\nclass WebSocketStream {\n // Each WebSocketStream object has an associated url , which is a URL record .\n /** @type {URL} */\n #url\n\n // Each WebSocketStream object has an associated opened promise , which is a promise.\n /** @type {import('../../../util/promise').DeferredPromise} */\n #openedPromise\n\n // Each WebSocketStream object has an associated closed promise , which is a promise.\n /** @type {import('../../../util/promise').DeferredPromise} */\n #closedPromise\n\n // Each WebSocketStream object has an associated readable stream , which is a ReadableStream .\n /** @type {ReadableStream} */\n #readableStream\n /** @type {ReadableStreamDefaultController} */\n #readableStreamController\n\n // Each WebSocketStream object has an associated writable stream , which is a WritableStream .\n /** @type {WritableStream} */\n #writableStream\n\n // Each WebSocketStream object has an associated boolean handshake aborted , which is initially false.\n #handshakeAborted = false\n\n /** @type {import('../websocket').Handler} */\n #handler = {\n // https://whatpr.org/websockets/48/7b748d3...d5570f3.html#feedback-to-websocket-stream-from-the-protocol\n onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions),\n onMessage: (opcode, data) => this.#onMessage(opcode, data),\n onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message),\n onParserDrain: () => this.#handler.socket.resume(),\n onSocketData: (chunk) => {\n if (!this.#parser.write(chunk)) {\n this.#handler.socket.pause()\n }\n },\n onSocketError: (err) => {\n this.#handler.readyState = states.CLOSING\n\n if (channels.socketError.hasSubscribers) {\n channels.socketError.publish(err)\n }\n\n this.#handler.socket.destroy()\n },\n onSocketClose: () => this.#onSocketClose(),\n onPing: () => {},\n onPong: () => {},\n\n readyState: states.CONNECTING,\n socket: null,\n closeState: new Set(),\n controller: null,\n wasEverConnected: false\n }\n\n /** @type {import('../receiver').ByteParser} */\n #parser\n\n constructor (url, options = undefined) {\n if (!emittedExperimentalWarning) {\n process.emitWarning('WebSocketStream is experimental! Expect it to change at any time.', {\n code: 'UNDICI-WSS'\n })\n emittedExperimentalWarning = true\n }\n\n webidl.argumentLengthCheck(arguments, 1, 'WebSocket')\n\n url = webidl.converters.USVString(url)\n if (options !== null) {\n options = webidl.converters.WebSocketStreamOptions(options)\n }\n\n // 1. Let baseURL be this 's relevant settings object 's API base URL .\n const baseURL = environmentSettingsObject.settingsObject.baseUrl\n\n // 2. Let urlRecord be the result of getting a URL record given url and baseURL .\n const urlRecord = getURLRecord(url, baseURL)\n\n // 3. Let protocols be options [\" protocols \"] if it exists , otherwise an empty sequence.\n const protocols = options.protocols\n\n // 4. 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 . [WSP]\n if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) {\n throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError')\n }\n\n // 5. Set this 's url to urlRecord .\n this.#url = urlRecord.toString()\n\n // 6. Set this 's opened promise and closed promise to new promises.\n this.#openedPromise = createDeferredPromise()\n this.#closedPromise = createDeferredPromise()\n\n // 7. Apply backpressure to the WebSocket.\n // TODO\n\n // 8. If options [\" signal \"] exists ,\n if (options.signal != null) {\n // 8.1. Let signal be options [\" signal \"].\n const signal = options.signal\n\n // 8.2. If signal is aborted , then reject this 's opened promise and closed promise with signal \u2019s abort reason\n // and return.\n if (signal.aborted) {\n this.#openedPromise.reject(signal.reason)\n this.#closedPromise.reject(signal.reason)\n return\n }\n\n // 8.3. Add the following abort steps to signal :\n signal.addEventListener('abort', () => {\n // 8.3.1. If the WebSocket connection is not yet established : [WSP]\n if (!isEstablished(this.#handler.readyState)) {\n // 8.3.1.1. Fail the WebSocket connection .\n failWebsocketConnection(this.#handler)\n\n // Set this 's ready state to CLOSING .\n this.#handler.readyState = states.CLOSING\n\n // Reject this 's opened promise and closed promise with signal \u2019s abort reason .\n this.#openedPromise.reject(signal.reason)\n this.#closedPromise.reject(signal.reason)\n\n // Set this 's handshake aborted to true.\n this.#handshakeAborted = true\n }\n }, { once: true })\n }\n\n // 9. Let client be this 's relevant settings object .\n const client = environmentSettingsObject.settingsObject\n\n // 10. Run this step in parallel :\n // 10.1. Establish a WebSocket connection given urlRecord , protocols , and client . [FETCH]\n this.#handler.controller = establishWebSocketConnection(\n urlRecord,\n protocols,\n client,\n this.#handler,\n options\n )\n }\n\n // The url getter steps are to return this 's url , serialized .\n get url () {\n return this.#url.toString()\n }\n\n // The opened getter steps are to return this 's opened promise .\n get opened () {\n return this.#openedPromise.promise\n }\n\n // The closed getter steps are to return this 's closed promise .\n get closed () {\n return this.#closedPromise.promise\n }\n\n // The close( closeInfo ) method steps are:\n close (closeInfo = undefined) {\n if (closeInfo !== null) {\n closeInfo = webidl.converters.WebSocketCloseInfo(closeInfo)\n }\n\n // 1. Let code be closeInfo [\" closeCode \"] if present, or null otherwise.\n const code = closeInfo.closeCode ?? null\n\n // 2. Let reason be closeInfo [\" reason \"].\n const reason = closeInfo.reason\n\n // 3. Close the WebSocket with this , code , and reason .\n closeWebSocketConnection(this.#handler, code, reason, true)\n }\n\n #write (chunk) {\n // See /websockets/stream/tentative/write.any.html\n chunk = webidl.converters.WebSocketStreamWrite(chunk)\n\n // 1. Let promise be a new promise created in stream \u2019s relevant realm .\n const promise = createDeferredPromise()\n\n // 2. Let data be null.\n let data = null\n\n // 3. Let opcode be null.\n let opcode = null\n\n // 4. If chunk is a BufferSource ,\n if (webidl.is.BufferSource(chunk)) {\n // 4.1. Set data to a copy of the bytes given chunk .\n data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk.slice())\n\n // 4.2. Set opcode to a binary frame opcode.\n opcode = opcodes.BINARY\n } else {\n // 5. Otherwise,\n\n // 5.1. Let string be the result of converting chunk to an IDL USVString .\n // If this throws an exception, return a promise rejected with the exception.\n let string\n\n try {\n string = webidl.converters.DOMString(chunk)\n } catch (e) {\n promise.reject(e)\n return promise.promise\n }\n\n // 5.2. Set data to the result of UTF-8 encoding string .\n data = new TextEncoder().encode(string)\n\n // 5.3. Set opcode to a text frame opcode.\n opcode = opcodes.TEXT\n }\n\n // 6. In parallel,\n // 6.1. Wait until there is sufficient buffer space in stream to send the message.\n\n // 6.2. If the closing handshake has not yet started , Send a WebSocket Message to stream comprised of data using opcode .\n if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {\n const frame = new WebsocketFrameSend(data)\n\n this.#handler.socket.write(frame.createFrame(opcode), () => {\n promise.resolve(undefined)\n })\n }\n\n // 6.3. Queue a global task on the WebSocket task source given stream \u2019s relevant global object to resolve promise with undefined.\n return promise.promise\n }\n\n /** @type {import('../websocket').Handler['onConnectionEstablished']} */\n #onConnectionEstablished (response, parsedExtensions) {\n this.#handler.socket = response.socket\n\n const parser = new ByteParser(this.#handler, parsedExtensions)\n parser.on('drain', () => this.#handler.onParserDrain())\n parser.on('error', (err) => this.#handler.onParserError(err))\n\n this.#parser = parser\n\n // 1. Change stream \u2019s ready state to OPEN (1).\n this.#handler.readyState = states.OPEN\n\n // 2. Set stream \u2019s was ever connected to true.\n // This is done in the opening handshake.\n\n // 3. Let extensions be the extensions in use .\n const extensions = parsedExtensions ?? ''\n\n // 4. Let protocol be the subprotocol in use .\n const protocol = response.headersList.get('sec-websocket-protocol') ?? ''\n\n // 5. Let pullAlgorithm be an action that pulls bytes from stream .\n // 6. Let cancelAlgorithm be an action that cancels stream with reason , given reason .\n // 7. Let readable be a new ReadableStream .\n // 8. Set up readable with pullAlgorithm and cancelAlgorithm .\n const readable = new ReadableStream({\n start: (controller) => {\n this.#readableStreamController = controller\n },\n pull (controller) {\n let chunk\n while (controller.desiredSize > 0 && (chunk = response.socket.read()) !== null) {\n controller.enqueue(chunk)\n }\n },\n cancel: (reason) => this.#cancel(reason)\n })\n\n // 9. Let writeAlgorithm be an action that writes chunk to stream , given chunk .\n // 10. Let closeAlgorithm be an action that closes stream .\n // 11. Let abortAlgorithm be an action that aborts stream with reason , given reason .\n // 12. Let writable be a new WritableStream .\n // 13. Set up writable with writeAlgorithm , closeAlgorithm , and abortAlgorithm .\n const writable = new WritableStream({\n write: (chunk) => this.#write(chunk),\n close: () => closeWebSocketConnection(this.#handler, null, null),\n abort: (reason) => this.#closeUsingReason(reason)\n })\n\n // Set stream \u2019s readable stream to readable .\n this.#readableStream = readable\n\n // Set stream \u2019s writable stream to writable .\n this.#writableStream = writable\n\n // Resolve stream \u2019s opened promise with WebSocketOpenInfo \u00AB[ \" extensions \" \u2192 extensions , \" protocol \" \u2192 protocol , \" readable \" \u2192 readable , \" writable \" \u2192 writable ]\u00BB.\n this.#openedPromise.resolve({\n extensions,\n protocol,\n readable,\n writable\n })\n }\n\n /** @type {import('../websocket').Handler['onMessage']} */\n #onMessage (type, data) {\n // 1. If stream\u2019s ready state is not OPEN (1), then return.\n if (this.#handler.readyState !== states.OPEN) {\n return\n }\n\n // 2. Let chunk be determined by switching on type:\n // - type indicates that the data is Text\n // a new DOMString containing data\n // - type indicates that the data is Binary\n // a new Uint8Array object, created in the relevant Realm of the\n // WebSocketStream object, whose contents are data\n let chunk\n\n if (type === opcodes.TEXT) {\n try {\n chunk = utf8Decode(data)\n } catch {\n failWebsocketConnection(this.#handler, 'Received invalid UTF-8 in text frame.')\n return\n }\n } else if (type === opcodes.BINARY) {\n chunk = new Uint8Array(data.buffer, data.byteOffset, data.byteLength)\n }\n\n // 3. Enqueue chunk into stream\u2019s readable stream.\n this.#readableStreamController.enqueue(chunk)\n\n // 4. Apply backpressure to the WebSocket.\n }\n\n /** @type {import('../websocket').Handler['onSocketClose']} */\n #onSocketClose () {\n const wasClean =\n this.#handler.closeState.has(sentCloseFrameState.SENT) &&\n this.#handler.closeState.has(sentCloseFrameState.RECEIVED)\n\n // 1. Change the ready state to CLOSED (3).\n this.#handler.readyState = states.CLOSED\n\n // 2. If stream \u2019s handshake aborted is true, then return.\n if (this.#handshakeAborted) {\n return\n }\n\n // 3. If stream \u2019s was ever connected is false, then reject stream \u2019s opened promise with a new WebSocketError.\n if (!this.#handler.wasEverConnected) {\n this.#openedPromise.reject(new WebSocketError('Socket never opened'))\n }\n\n const result = this.#parser?.closingInfo\n\n // 4. Let code be the WebSocket connection close code .\n // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5\n // If this Close control frame contains no status code, _The WebSocket\n // Connection Close Code_ is considered to be 1005. If _The WebSocket\n // Connection is Closed_ and no Close control frame was received by the\n // endpoint (such as could occur if the underlying transport connection\n // is lost), _The WebSocket Connection Close Code_ is considered to be\n // 1006.\n let code = result?.code ?? 1005\n\n if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {\n code = 1006\n }\n\n // 5. Let reason be the result of applying UTF-8 decode without BOM to the WebSocket connection close reason .\n const reason = result?.reason == null ? '' : utf8DecodeBytes(Buffer.from(result.reason))\n\n // 6. If the connection was closed cleanly ,\n if (wasClean) {\n // 6.1. Close stream \u2019s readable stream .\n this.#readableStreamController.close()\n\n // 6.2. Error stream \u2019s writable stream with an \" InvalidStateError \" DOMException indicating that a closed WebSocketStream cannot be written to.\n if (!this.#writableStream.locked) {\n this.#writableStream.abort(new DOMException('A closed WebSocketStream cannot be written to', 'InvalidStateError'))\n }\n\n // 6.3. Resolve stream \u2019s closed promise with WebSocketCloseInfo \u00AB[ \" closeCode \" \u2192 code , \" reason \" \u2192 reason ]\u00BB.\n this.#closedPromise.resolve({\n closeCode: code,\n reason\n })\n } else {\n // 7. Otherwise,\n\n // 7.1. Let error be a new WebSocketError whose closeCode is code and reason is reason .\n const error = createUnvalidatedWebSocketError('unclean close', code, reason)\n\n // 7.2. Error stream \u2019s readable stream with error .\n this.#readableStreamController?.error(error)\n\n // 7.3. Error stream \u2019s writable stream with error .\n this.#writableStream?.abort(error)\n\n // 7.4. Reject stream \u2019s closed promise with error .\n this.#closedPromise.reject(error)\n }\n }\n\n #closeUsingReason (reason) {\n // 1. Let code be null.\n let code = null\n\n // 2. Let reasonString be the empty string.\n let reasonString = ''\n\n // 3. If reason implements WebSocketError ,\n if (webidl.is.WebSocketError(reason)) {\n // 3.1. Set code to reason \u2019s closeCode .\n code = reason.closeCode\n\n // 3.2. Set reasonString to reason \u2019s reason .\n reasonString = reason.reason\n }\n\n // 4. Close the WebSocket with stream , code , and reasonString . If this throws an exception,\n // discard code and reasonString and close the WebSocket with stream .\n closeWebSocketConnection(this.#handler, code, reasonString)\n }\n\n // To cancel a WebSocketStream stream given reason , close using reason giving stream and reason .\n #cancel (reason) {\n this.#closeUsingReason(reason)\n }\n}\n\nObject.defineProperties(WebSocketStream.prototype, {\n url: kEnumerableProperty,\n opened: kEnumerableProperty,\n closed: kEnumerableProperty,\n close: kEnumerableProperty,\n [Symbol.toStringTag]: {\n value: 'WebSocketStream',\n writable: false,\n enumerable: false,\n configurable: true\n }\n})\n\nwebidl.converters.WebSocketStreamOptions = webidl.dictionaryConverter([\n {\n key: 'protocols',\n converter: webidl.sequenceConverter(webidl.converters.USVString),\n defaultValue: () => []\n },\n {\n key: 'signal',\n converter: webidl.nullableConverter(webidl.converters.AbortSignal),\n defaultValue: () => null\n }\n])\n\nwebidl.converters.WebSocketCloseInfo = webidl.dictionaryConverter([\n {\n key: 'closeCode',\n converter: (V) => webidl.converters['unsigned short'](V, webidl.attributes.EnforceRange)\n },\n {\n key: 'reason',\n converter: webidl.converters.USVString,\n defaultValue: () => ''\n }\n])\n\nwebidl.converters.WebSocketStreamWrite = function (V) {\n if (typeof V === 'string') {\n return webidl.converters.USVString(V)\n }\n\n return webidl.converters.BufferSource(V)\n}\n\nmodule.exports = { WebSocketStream }\n", "'use strict'\n\n/**\n * Checks if the given value is a valid LastEventId.\n * @param {string} value\n * @returns {boolean}\n */\nfunction isValidLastEventId (value) {\n // LastEventId should not contain U+0000 NULL\n return value.indexOf('\\u0000') === -1\n}\n\n/**\n * Checks if the given value is a base 10 digit.\n * @param {string} value\n * @returns {boolean}\n */\nfunction isASCIINumber (value) {\n if (value.length === 0) return false\n for (let i = 0; i < value.length; i++) {\n if (value.charCodeAt(i) < 0x30 || value.charCodeAt(i) > 0x39) return false\n }\n return true\n}\n\nmodule.exports = {\n isValidLastEventId,\n isASCIINumber\n}\n", "'use strict'\nconst { Transform } = require('node:stream')\nconst { isASCIINumber, isValidLastEventId } = require('./util')\n\n/**\n * @type {number[]} BOM\n */\nconst BOM = [0xEF, 0xBB, 0xBF]\n/**\n * @type {10} LF\n */\nconst LF = 0x0A\n/**\n * @type {13} CR\n */\nconst CR = 0x0D\n/**\n * @type {58} COLON\n */\nconst COLON = 0x3A\n/**\n * @type {32} SPACE\n */\nconst SPACE = 0x20\n\n/**\n * @typedef {object} EventSourceStreamEvent\n * @type {object}\n * @property {string} [event] The event type.\n * @property {string} [data] The data of the message.\n * @property {string} [id] A unique ID for the event.\n * @property {string} [retry] The reconnection time, in milliseconds.\n */\n\n/**\n * @typedef eventSourceSettings\n * @type {object}\n * @property {string} [lastEventId] The last event ID received from the server.\n * @property {string} [origin] The origin of the event source.\n * @property {number} [reconnectionTime] The reconnection time, in milliseconds.\n */\n\nclass EventSourceStream extends Transform {\n /**\n * @type {eventSourceSettings}\n */\n state\n\n /**\n * Leading byte-order-mark check.\n * @type {boolean}\n */\n checkBOM = true\n\n /**\n * @type {boolean}\n */\n crlfCheck = false\n\n /**\n * @type {boolean}\n */\n eventEndCheck = false\n\n /**\n * @type {Buffer|null}\n */\n buffer = null\n\n pos = 0\n\n event = {\n data: undefined,\n event: undefined,\n id: undefined,\n retry: undefined\n }\n\n /**\n * @param {object} options\n * @param {boolean} [options.readableObjectMode]\n * @param {eventSourceSettings} [options.eventSourceSettings]\n * @param {(chunk: any, encoding?: BufferEncoding | undefined) => boolean} [options.push]\n */\n constructor (options = {}) {\n // Enable object mode as EventSourceStream emits objects of shape\n // EventSourceStreamEvent\n options.readableObjectMode = true\n\n super(options)\n\n this.state = options.eventSourceSettings || {}\n if (options.push) {\n this.push = options.push\n }\n }\n\n /**\n * @param {Buffer} chunk\n * @param {string} _encoding\n * @param {Function} callback\n * @returns {void}\n */\n _transform (chunk, _encoding, callback) {\n if (chunk.length === 0) {\n callback()\n return\n }\n\n // Cache the chunk in the buffer, as the data might not be complete while\n // processing it\n // TODO: Investigate if there is a more performant way to handle\n // incoming chunks\n // see: https://github.com/nodejs/undici/issues/2630\n if (this.buffer) {\n this.buffer = Buffer.concat([this.buffer, chunk])\n } else {\n this.buffer = chunk\n }\n\n // Strip leading byte-order-mark if we opened the stream and started\n // the processing of the incoming data\n if (this.checkBOM) {\n switch (this.buffer.length) {\n case 1:\n // Check if the first byte is the same as the first byte of the BOM\n if (this.buffer[0] === BOM[0]) {\n // If it is, we need to wait for more data\n callback()\n return\n }\n // Set the checkBOM flag to false as we don't need to check for the\n // BOM anymore\n this.checkBOM = false\n\n // The buffer only contains one byte so we need to wait for more data\n callback()\n return\n case 2:\n // Check if the first two bytes are the same as the first two bytes\n // of the BOM\n if (\n this.buffer[0] === BOM[0] &&\n this.buffer[1] === BOM[1]\n ) {\n // If it is, we need to wait for more data, because the third byte\n // is needed to determine if it is the BOM or not\n callback()\n return\n }\n\n // Set the checkBOM flag to false as we don't need to check for the\n // BOM anymore\n this.checkBOM = false\n break\n case 3:\n // Check if the first three bytes are the same as the first three\n // bytes of the BOM\n if (\n this.buffer[0] === BOM[0] &&\n this.buffer[1] === BOM[1] &&\n this.buffer[2] === BOM[2]\n ) {\n // If it is, we can drop the buffered data, as it is only the BOM\n this.buffer = Buffer.alloc(0)\n // Set the checkBOM flag to false as we don't need to check for the\n // BOM anymore\n this.checkBOM = false\n\n // Await more data\n callback()\n return\n }\n // If it is not the BOM, we can start processing the data\n this.checkBOM = false\n break\n default:\n // The buffer is longer than 3 bytes, so we can drop the BOM if it is\n // present\n if (\n this.buffer[0] === BOM[0] &&\n this.buffer[1] === BOM[1] &&\n this.buffer[2] === BOM[2]\n ) {\n // Remove the BOM from the buffer\n this.buffer = this.buffer.subarray(3)\n }\n\n // Set the checkBOM flag to false as we don't need to check for the\n this.checkBOM = false\n break\n }\n }\n\n while (this.pos < this.buffer.length) {\n // If the previous line ended with an end-of-line, we need to check\n // if the next character is also an end-of-line.\n if (this.eventEndCheck) {\n // If the the current character is an end-of-line, then the event\n // is finished and we can process it\n\n // If the previous line ended with a carriage return, we need to\n // check if the current character is a line feed and remove it\n // from the buffer.\n if (this.crlfCheck) {\n // If the current character is a line feed, we can remove it\n // from the buffer and reset the crlfCheck flag\n if (this.buffer[this.pos] === LF) {\n this.buffer = this.buffer.subarray(this.pos + 1)\n this.pos = 0\n this.crlfCheck = false\n\n // It is possible that the line feed is not the end of the\n // event. We need to check if the next character is an\n // end-of-line character to determine if the event is\n // finished. We simply continue the loop to check the next\n // character.\n\n // As we removed the line feed from the buffer and set the\n // crlfCheck flag to false, we basically don't make any\n // distinction between a line feed and a carriage return.\n continue\n }\n this.crlfCheck = false\n }\n\n if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) {\n // If the current character is a carriage return, we need to\n // set the crlfCheck flag to true, as we need to check if the\n // next character is a line feed so we can remove it from the\n // buffer\n if (this.buffer[this.pos] === CR) {\n this.crlfCheck = true\n }\n\n this.buffer = this.buffer.subarray(this.pos + 1)\n this.pos = 0\n if (\n this.event.data !== undefined || this.event.event || this.event.id !== undefined || this.event.retry) {\n this.processEvent(this.event)\n }\n this.clearEvent()\n continue\n }\n // If the current character is not an end-of-line, then the event\n // is not finished and we have to reset the eventEndCheck flag\n this.eventEndCheck = false\n continue\n }\n\n // If the current character is an end-of-line, we can process the\n // line\n if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) {\n // If the current character is a carriage return, we need to\n // set the crlfCheck flag to true, as we need to check if the\n // next character is a line feed\n if (this.buffer[this.pos] === CR) {\n this.crlfCheck = true\n }\n\n // In any case, we can process the line as we reached an\n // end-of-line character\n this.parseLine(this.buffer.subarray(0, this.pos), this.event)\n\n // Remove the processed line from the buffer\n this.buffer = this.buffer.subarray(this.pos + 1)\n // Reset the position as we removed the processed line from the buffer\n this.pos = 0\n // A line was processed and this could be the end of the event. We need\n // to check if the next line is empty to determine if the event is\n // finished.\n this.eventEndCheck = true\n continue\n }\n\n this.pos++\n }\n\n callback()\n }\n\n /**\n * @param {Buffer} line\n * @param {EventSourceStreamEvent} event\n */\n parseLine (line, event) {\n // If the line is empty (a blank line)\n // Dispatch the event, as defined below.\n // This will be handled in the _transform method\n if (line.length === 0) {\n return\n }\n\n // If the line starts with a U+003A COLON character (:)\n // Ignore the line.\n const colonPosition = line.indexOf(COLON)\n if (colonPosition === 0) {\n return\n }\n\n let field = ''\n let value = ''\n\n // If the line contains a U+003A COLON character (:)\n if (colonPosition !== -1) {\n // Collect the characters on the line before the first U+003A COLON\n // character (:), and let field be that string.\n // TODO: Investigate if there is a more performant way to extract the\n // field\n // see: https://github.com/nodejs/undici/issues/2630\n field = line.subarray(0, colonPosition).toString('utf8')\n\n // Collect the characters on the line after the first U+003A COLON\n // character (:), and let value be that string.\n // If value starts with a U+0020 SPACE character, remove it from value.\n let valueStart = colonPosition + 1\n if (line[valueStart] === SPACE) {\n ++valueStart\n }\n // TODO: Investigate if there is a more performant way to extract the\n // value\n // see: https://github.com/nodejs/undici/issues/2630\n value = line.subarray(valueStart).toString('utf8')\n\n // Otherwise, the string is not empty but does not contain a U+003A COLON\n // character (:)\n } else {\n // Process the field using the steps described below, using the whole\n // line as the field name, and the empty string as the field value.\n field = line.toString('utf8')\n value = ''\n }\n\n // Modify the event with the field name and value. The value is also\n // decoded as UTF-8\n switch (field) {\n case 'data':\n if (event[field] === undefined) {\n event[field] = value\n } else {\n event[field] += `\\n${value}`\n }\n break\n case 'retry':\n if (isASCIINumber(value)) {\n event[field] = value\n }\n break\n case 'id':\n if (isValidLastEventId(value)) {\n event[field] = value\n }\n break\n case 'event':\n if (value.length > 0) {\n event[field] = value\n }\n break\n }\n }\n\n /**\n * @param {EventSourceStreamEvent} event\n */\n processEvent (event) {\n if (event.retry && isASCIINumber(event.retry)) {\n this.state.reconnectionTime = parseInt(event.retry, 10)\n }\n\n if (event.id !== undefined && isValidLastEventId(event.id)) {\n this.state.lastEventId = event.id\n }\n\n // only dispatch event, when data is provided\n if (event.data !== undefined) {\n this.push({\n type: event.event || 'message',\n options: {\n data: event.data,\n lastEventId: this.state.lastEventId,\n origin: this.state.origin\n }\n })\n }\n }\n\n clearEvent () {\n this.event = {\n data: undefined,\n event: undefined,\n id: undefined,\n retry: undefined\n }\n }\n}\n\nmodule.exports = {\n EventSourceStream\n}\n", "'use strict'\n\nconst { pipeline } = require('node:stream')\nconst { fetching } = require('../fetch')\nconst { makeRequest } = require('../fetch/request')\nconst { webidl } = require('../webidl')\nconst { EventSourceStream } = require('./eventsource-stream')\nconst { parseMIMEType } = require('../fetch/data-url')\nconst { createFastMessageEvent } = require('../websocket/events')\nconst { isNetworkError } = require('../fetch/response')\nconst { kEnumerableProperty } = require('../../core/util')\nconst { environmentSettingsObject } = require('../fetch/util')\n\nlet experimentalWarned = false\n\n/**\n * A reconnection time, in milliseconds. This must initially be an implementation-defined value,\n * probably in the region of a few seconds.\n *\n * In Comparison:\n * - Chrome uses 3000ms.\n * - Deno uses 5000ms.\n *\n * @type {3000}\n */\nconst defaultReconnectionTime = 3000\n\n/**\n * The readyState attribute represents the state of the connection.\n * @typedef ReadyState\n * @type {0|1|2}\n * @readonly\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev\n */\n\n/**\n * The connection has not yet been established, or it was closed and the user\n * agent is reconnecting.\n * @type {0}\n */\nconst CONNECTING = 0\n\n/**\n * The user agent has an open connection and is dispatching events as it\n * receives them.\n * @type {1}\n */\nconst OPEN = 1\n\n/**\n * The connection is not open, and the user agent is not trying to reconnect.\n * @type {2}\n */\nconst CLOSED = 2\n\n/**\n * Requests for the element will have their mode set to \"cors\" and their credentials mode set to \"same-origin\".\n * @type {'anonymous'}\n */\nconst ANONYMOUS = 'anonymous'\n\n/**\n * Requests for the element will have their mode set to \"cors\" and their credentials mode set to \"include\".\n * @type {'use-credentials'}\n */\nconst USE_CREDENTIALS = 'use-credentials'\n\n/**\n * The EventSource interface is used to receive server-sent events. It\n * connects to a server over HTTP and receives events in text/event-stream\n * format without closing the connection.\n * @extends {EventTarget}\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events\n * @api public\n */\nclass EventSource extends EventTarget {\n #events = {\n open: null,\n error: null,\n message: null\n }\n\n #url\n #withCredentials = false\n\n /**\n * @type {ReadyState}\n */\n #readyState = CONNECTING\n\n #request = null\n #controller = null\n\n #dispatcher\n\n /**\n * @type {import('./eventsource-stream').eventSourceSettings}\n */\n #state\n\n /**\n * Creates a new EventSource object.\n * @param {string} url\n * @param {EventSourceInit} [eventSourceInitDict={}]\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface\n */\n constructor (url, eventSourceInitDict = {}) {\n // 1. Let ev be a new EventSource object.\n super()\n\n webidl.util.markAsUncloneable(this)\n\n const prefix = 'EventSource constructor'\n webidl.argumentLengthCheck(arguments, 1, prefix)\n\n if (!experimentalWarned) {\n experimentalWarned = true\n process.emitWarning('EventSource is experimental, expect them to change at any time.', {\n code: 'UNDICI-ES'\n })\n }\n\n url = webidl.converters.USVString(url)\n eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, 'eventSourceInitDict')\n\n this.#dispatcher = eventSourceInitDict.node.dispatcher || eventSourceInitDict.dispatcher\n this.#state = {\n lastEventId: '',\n reconnectionTime: eventSourceInitDict.node.reconnectionTime\n }\n\n // 2. Let settings be ev's relevant settings object.\n // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object\n const settings = environmentSettingsObject\n\n let urlRecord\n\n try {\n // 3. Let urlRecord be the result of encoding-parsing a URL given url, relative to settings.\n urlRecord = new URL(url, settings.settingsObject.baseUrl)\n this.#state.origin = urlRecord.origin\n } catch (e) {\n // 4. If urlRecord is failure, then throw a \"SyntaxError\" DOMException.\n throw new DOMException(e, 'SyntaxError')\n }\n\n // 5. Set ev's url to urlRecord.\n this.#url = urlRecord.href\n\n // 6. Let corsAttributeState be Anonymous.\n let corsAttributeState = ANONYMOUS\n\n // 7. If the value of eventSourceInitDict's withCredentials member is true,\n // then set corsAttributeState to Use Credentials and set ev's\n // withCredentials attribute to true.\n if (eventSourceInitDict.withCredentials === true) {\n corsAttributeState = USE_CREDENTIALS\n this.#withCredentials = true\n }\n\n // 8. Let request be the result of creating a potential-CORS request given\n // urlRecord, the empty string, and corsAttributeState.\n const initRequest = {\n redirect: 'follow',\n keepalive: true,\n // @see https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attributes\n mode: 'cors',\n credentials: corsAttributeState === 'anonymous'\n ? 'same-origin'\n : 'omit',\n referrer: 'no-referrer'\n }\n\n // 9. Set request's client to settings.\n initRequest.client = environmentSettingsObject.settingsObject\n\n // 10. User agents may set (`Accept`, `text/event-stream`) in request's header list.\n initRequest.headersList = [['accept', { name: 'accept', value: 'text/event-stream' }]]\n\n // 11. Set request's cache mode to \"no-store\".\n initRequest.cache = 'no-store'\n\n // 12. Set request's initiator type to \"other\".\n initRequest.initiator = 'other'\n\n initRequest.urlList = [new URL(this.#url)]\n\n // 13. Set ev's request to request.\n this.#request = makeRequest(initRequest)\n\n this.#connect()\n }\n\n /**\n * Returns the state of this EventSource object's connection. It can have the\n * values described below.\n * @returns {ReadyState}\n * @readonly\n */\n get readyState () {\n return this.#readyState\n }\n\n /**\n * Returns the URL providing the event stream.\n * @readonly\n * @returns {string}\n */\n get url () {\n return this.#url\n }\n\n /**\n * Returns a boolean indicating whether the EventSource object was\n * instantiated with CORS credentials set (true), or not (false, the default).\n */\n get withCredentials () {\n return this.#withCredentials\n }\n\n #connect () {\n if (this.#readyState === CLOSED) return\n\n this.#readyState = CONNECTING\n\n const fetchParams = {\n request: this.#request,\n dispatcher: this.#dispatcher\n }\n\n // 14. Let processEventSourceEndOfBody given response res be the following step: if res is not a network error, then reestablish the connection.\n const processEventSourceEndOfBody = (response) => {\n if (!isNetworkError(response)) {\n return this.#reconnect()\n }\n }\n\n // 15. Fetch request, with processResponseEndOfBody set to processEventSourceEndOfBody...\n fetchParams.processResponseEndOfBody = processEventSourceEndOfBody\n\n // and processResponse set to the following steps given response res:\n fetchParams.processResponse = (response) => {\n // 1. If res is an aborted network error, then fail the connection.\n\n if (isNetworkError(response)) {\n // 1. When a user agent is to fail the connection, the user agent\n // must queue a task which, if the readyState attribute is set to a\n // value other than CLOSED, sets the readyState attribute to CLOSED\n // and fires an event named error at the EventSource object. Once the\n // user agent has failed the connection, it does not attempt to\n // reconnect.\n if (response.aborted) {\n this.close()\n this.dispatchEvent(new Event('error'))\n return\n // 2. Otherwise, if res is a network error, then reestablish the\n // connection, unless the user agent knows that to be futile, in\n // which case the user agent may fail the connection.\n } else {\n this.#reconnect()\n return\n }\n }\n\n // 3. Otherwise, if res's status is not 200, or if res's `Content-Type`\n // is not `text/event-stream`, then fail the connection.\n const contentType = response.headersList.get('content-type', true)\n const mimeType = contentType !== null ? parseMIMEType(contentType) : 'failure'\n const contentTypeValid = mimeType !== 'failure' && mimeType.essence === 'text/event-stream'\n if (\n response.status !== 200 ||\n contentTypeValid === false\n ) {\n this.close()\n this.dispatchEvent(new Event('error'))\n return\n }\n\n // 4. Otherwise, announce the connection and interpret res's body\n // line by line.\n\n // When a user agent is to announce the connection, the user agent\n // must queue a task which, if the readyState attribute is set to a\n // value other than CLOSED, sets the readyState attribute to OPEN\n // and fires an event named open at the EventSource object.\n // @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model\n this.#readyState = OPEN\n this.dispatchEvent(new Event('open'))\n\n // If redirected to a different origin, set the origin to the new origin.\n this.#state.origin = response.urlList[response.urlList.length - 1].origin\n\n const eventSourceStream = new EventSourceStream({\n eventSourceSettings: this.#state,\n push: (event) => {\n this.dispatchEvent(createFastMessageEvent(\n event.type,\n event.options\n ))\n }\n })\n\n pipeline(response.body.stream,\n eventSourceStream,\n (error) => {\n if (\n error?.aborted === false\n ) {\n this.close()\n this.dispatchEvent(new Event('error'))\n }\n })\n }\n\n this.#controller = fetching(fetchParams)\n }\n\n /**\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model\n * @returns {void}\n */\n #reconnect () {\n // When a user agent is to reestablish the connection, the user agent must\n // run the following steps. These steps are run in parallel, not as part of\n // a task. (The tasks that it queues, of course, are run like normal tasks\n // and not themselves in parallel.)\n\n // 1. Queue a task to run the following steps:\n\n // 1. If the readyState attribute is set to CLOSED, abort the task.\n if (this.#readyState === CLOSED) return\n\n // 2. Set the readyState attribute to CONNECTING.\n this.#readyState = CONNECTING\n\n // 3. Fire an event named error at the EventSource object.\n this.dispatchEvent(new Event('error'))\n\n // 2. Wait a delay equal to the reconnection time of the event source.\n setTimeout(() => {\n // 5. Queue a task to run the following steps:\n\n // 1. If the EventSource object's readyState attribute is not set to\n // CONNECTING, then return.\n if (this.#readyState !== CONNECTING) return\n\n // 2. Let request be the EventSource object's request.\n // 3. If the EventSource object's last event ID string is not the empty\n // string, then:\n // 1. Let lastEventIDValue be the EventSource object's last event ID\n // string, encoded as UTF-8.\n // 2. Set (`Last-Event-ID`, lastEventIDValue) in request's header\n // list.\n if (this.#state.lastEventId.length) {\n this.#request.headersList.set('last-event-id', this.#state.lastEventId, true)\n }\n\n // 4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section.\n this.#connect()\n }, this.#state.reconnectionTime)?.unref()\n }\n\n /**\n * Closes the connection, if any, and sets the readyState attribute to\n * CLOSED.\n */\n close () {\n webidl.brandCheck(this, EventSource)\n\n if (this.#readyState === CLOSED) return\n this.#readyState = CLOSED\n this.#controller.abort()\n this.#request = null\n }\n\n get onopen () {\n return this.#events.open\n }\n\n set onopen (fn) {\n if (this.#events.open) {\n this.removeEventListener('open', this.#events.open)\n }\n\n const listener = webidl.converters.EventHandlerNonNull(fn)\n\n if (listener !== null) {\n this.addEventListener('open', listener)\n this.#events.open = fn\n } else {\n this.#events.open = null\n }\n }\n\n get onmessage () {\n return this.#events.message\n }\n\n set onmessage (fn) {\n if (this.#events.message) {\n this.removeEventListener('message', this.#events.message)\n }\n\n const listener = webidl.converters.EventHandlerNonNull(fn)\n\n if (listener !== null) {\n this.addEventListener('message', listener)\n this.#events.message = fn\n } else {\n this.#events.message = null\n }\n }\n\n get onerror () {\n return this.#events.error\n }\n\n set onerror (fn) {\n if (this.#events.error) {\n this.removeEventListener('error', this.#events.error)\n }\n\n const listener = webidl.converters.EventHandlerNonNull(fn)\n\n if (listener !== null) {\n this.addEventListener('error', listener)\n this.#events.error = fn\n } else {\n this.#events.error = null\n }\n }\n}\n\nconst constantsPropertyDescriptors = {\n CONNECTING: {\n __proto__: null,\n configurable: false,\n enumerable: true,\n value: CONNECTING,\n writable: false\n },\n OPEN: {\n __proto__: null,\n configurable: false,\n enumerable: true,\n value: OPEN,\n writable: false\n },\n CLOSED: {\n __proto__: null,\n configurable: false,\n enumerable: true,\n value: CLOSED,\n writable: false\n }\n}\n\nObject.defineProperties(EventSource, constantsPropertyDescriptors)\nObject.defineProperties(EventSource.prototype, constantsPropertyDescriptors)\n\nObject.defineProperties(EventSource.prototype, {\n close: kEnumerableProperty,\n onerror: kEnumerableProperty,\n onmessage: kEnumerableProperty,\n onopen: kEnumerableProperty,\n readyState: kEnumerableProperty,\n url: kEnumerableProperty,\n withCredentials: kEnumerableProperty\n})\n\nwebidl.converters.EventSourceInitDict = webidl.dictionaryConverter([\n {\n key: 'withCredentials',\n converter: webidl.converters.boolean,\n defaultValue: () => false\n },\n {\n key: 'dispatcher', // undici only\n converter: webidl.converters.any\n },\n {\n key: 'node', // undici only\n converter: webidl.dictionaryConverter([\n {\n key: 'reconnectionTime',\n converter: webidl.converters['unsigned long'],\n defaultValue: () => defaultReconnectionTime\n },\n {\n key: 'dispatcher',\n converter: webidl.converters.any\n }\n ]),\n defaultValue: () => ({})\n }\n])\n\nmodule.exports = {\n EventSource,\n defaultReconnectionTime\n}\n", "'use strict'\n\nconst Client = require('./lib/dispatcher/client')\nconst Dispatcher = require('./lib/dispatcher/dispatcher')\nconst Pool = require('./lib/dispatcher/pool')\nconst BalancedPool = require('./lib/dispatcher/balanced-pool')\nconst RoundRobinPool = require('./lib/dispatcher/round-robin-pool')\nconst Agent = require('./lib/dispatcher/agent')\nconst ProxyAgent = require('./lib/dispatcher/proxy-agent')\nconst Socks5ProxyAgent = require('./lib/dispatcher/socks5-proxy-agent')\nconst EnvHttpProxyAgent = require('./lib/dispatcher/env-http-proxy-agent')\nconst RetryAgent = require('./lib/dispatcher/retry-agent')\nconst H2CClient = require('./lib/dispatcher/h2c-client')\nconst errors = require('./lib/core/errors')\nconst util = require('./lib/core/util')\nconst { InvalidArgumentError } = errors\nconst api = require('./lib/api')\nconst buildConnector = require('./lib/core/connect')\nconst MockClient = require('./lib/mock/mock-client')\nconst { MockCallHistory, MockCallHistoryLog } = require('./lib/mock/mock-call-history')\nconst MockAgent = require('./lib/mock/mock-agent')\nconst MockPool = require('./lib/mock/mock-pool')\nconst SnapshotAgent = require('./lib/mock/snapshot-agent')\nconst mockErrors = require('./lib/mock/mock-errors')\nconst RetryHandler = require('./lib/handler/retry-handler')\nconst { getGlobalDispatcher, setGlobalDispatcher } = require('./lib/global')\nconst DecoratorHandler = require('./lib/handler/decorator-handler')\nconst RedirectHandler = require('./lib/handler/redirect-handler')\n\nObject.assign(Dispatcher.prototype, api)\n\nmodule.exports.Dispatcher = Dispatcher\nmodule.exports.Client = Client\nmodule.exports.Pool = Pool\nmodule.exports.BalancedPool = BalancedPool\nmodule.exports.RoundRobinPool = RoundRobinPool\nmodule.exports.Agent = Agent\nmodule.exports.ProxyAgent = ProxyAgent\nmodule.exports.Socks5ProxyAgent = Socks5ProxyAgent\nmodule.exports.EnvHttpProxyAgent = EnvHttpProxyAgent\nmodule.exports.RetryAgent = RetryAgent\nmodule.exports.H2CClient = H2CClient\nmodule.exports.RetryHandler = RetryHandler\n\nmodule.exports.DecoratorHandler = DecoratorHandler\nmodule.exports.RedirectHandler = RedirectHandler\nmodule.exports.interceptors = {\n redirect: require('./lib/interceptor/redirect'),\n responseError: require('./lib/interceptor/response-error'),\n retry: require('./lib/interceptor/retry'),\n dump: require('./lib/interceptor/dump'),\n dns: require('./lib/interceptor/dns'),\n cache: require('./lib/interceptor/cache'),\n decompress: require('./lib/interceptor/decompress'),\n deduplicate: require('./lib/interceptor/deduplicate')\n}\n\nmodule.exports.cacheStores = {\n MemoryCacheStore: require('./lib/cache/memory-cache-store')\n}\n\nconst SqliteCacheStore = require('./lib/cache/sqlite-cache-store')\nmodule.exports.cacheStores.SqliteCacheStore = SqliteCacheStore\n\nmodule.exports.buildConnector = buildConnector\nmodule.exports.errors = errors\nmodule.exports.util = {\n parseHeaders: util.parseHeaders,\n headerNameToString: util.headerNameToString\n}\n\nfunction makeDispatcher (fn) {\n return (url, opts, handler) => {\n if (typeof opts === 'function') {\n handler = opts\n opts = null\n }\n\n if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) {\n throw new InvalidArgumentError('invalid url')\n }\n\n if (opts != null && typeof opts !== 'object') {\n throw new InvalidArgumentError('invalid opts')\n }\n\n if (opts && opts.path != null) {\n if (typeof opts.path !== 'string') {\n throw new InvalidArgumentError('invalid opts.path')\n }\n\n let path = opts.path\n if (!opts.path.startsWith('/')) {\n path = `/${path}`\n }\n\n url = new URL(util.parseOrigin(url).origin + path)\n } else {\n if (!opts) {\n opts = typeof url === 'object' ? url : {}\n }\n\n url = util.parseURL(url)\n }\n\n const { agent, dispatcher = getGlobalDispatcher() } = opts\n\n if (agent) {\n throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?')\n }\n\n return fn.call(dispatcher, {\n ...opts,\n origin: url.origin,\n path: url.search ? `${url.pathname}${url.search}` : url.pathname,\n method: opts.method || (opts.body ? 'PUT' : 'GET')\n }, handler)\n }\n}\n\nmodule.exports.setGlobalDispatcher = setGlobalDispatcher\nmodule.exports.getGlobalDispatcher = getGlobalDispatcher\n\nconst fetchImpl = require('./lib/web/fetch').fetch\n\n// Capture __filename at module load time for stack trace augmentation.\n// This may be undefined when bundled in environments like Node.js internals.\nconst currentFilename = typeof __filename !== 'undefined' ? __filename : undefined\n\nfunction appendFetchStackTrace (err, filename) {\n if (!err || typeof err !== 'object') {\n return\n }\n\n const stack = typeof err.stack === 'string' ? err.stack : ''\n const normalizedFilename = filename.replace(/\\\\/g, '/')\n\n if (stack && (stack.includes(filename) || stack.includes(normalizedFilename))) {\n return\n }\n\n const capture = {}\n Error.captureStackTrace(capture, appendFetchStackTrace)\n\n if (!capture.stack) {\n return\n }\n\n const captureLines = capture.stack.split('\\n').slice(1).join('\\n')\n\n err.stack = stack ? `${stack}\\n${captureLines}` : capture.stack\n}\n\nmodule.exports.fetch = function fetch (init, options = undefined) {\n return fetchImpl(init, options).catch(err => {\n if (currentFilename) {\n appendFetchStackTrace(err, currentFilename)\n } else if (err && typeof err === 'object') {\n Error.captureStackTrace(err, module.exports.fetch)\n }\n throw err\n })\n}\nmodule.exports.Headers = require('./lib/web/fetch/headers').Headers\nmodule.exports.Response = require('./lib/web/fetch/response').Response\nmodule.exports.Request = require('./lib/web/fetch/request').Request\nmodule.exports.FormData = require('./lib/web/fetch/formdata').FormData\n\nconst { setGlobalOrigin, getGlobalOrigin } = require('./lib/web/fetch/global')\n\nmodule.exports.setGlobalOrigin = setGlobalOrigin\nmodule.exports.getGlobalOrigin = getGlobalOrigin\n\nconst { CacheStorage } = require('./lib/web/cache/cachestorage')\nconst { kConstruct } = require('./lib/core/symbols')\n\nmodule.exports.caches = new CacheStorage(kConstruct)\n\nconst { deleteCookie, getCookies, getSetCookies, setCookie, parseCookie } = require('./lib/web/cookies')\n\nmodule.exports.deleteCookie = deleteCookie\nmodule.exports.getCookies = getCookies\nmodule.exports.getSetCookies = getSetCookies\nmodule.exports.setCookie = setCookie\nmodule.exports.parseCookie = parseCookie\n\nconst { parseMIMEType, serializeAMimeType } = require('./lib/web/fetch/data-url')\n\nmodule.exports.parseMIMEType = parseMIMEType\nmodule.exports.serializeAMimeType = serializeAMimeType\n\nconst { CloseEvent, ErrorEvent, MessageEvent } = require('./lib/web/websocket/events')\nconst { WebSocket, ping } = require('./lib/web/websocket/websocket')\nmodule.exports.WebSocket = WebSocket\nmodule.exports.CloseEvent = CloseEvent\nmodule.exports.ErrorEvent = ErrorEvent\nmodule.exports.MessageEvent = MessageEvent\nmodule.exports.ping = ping\n\nmodule.exports.WebSocketStream = require('./lib/web/websocket/stream/websocketstream').WebSocketStream\nmodule.exports.WebSocketError = require('./lib/web/websocket/stream/websocketerror').WebSocketError\n\nmodule.exports.request = makeDispatcher(api.request)\nmodule.exports.stream = makeDispatcher(api.stream)\nmodule.exports.pipeline = makeDispatcher(api.pipeline)\nmodule.exports.connect = makeDispatcher(api.connect)\nmodule.exports.upgrade = makeDispatcher(api.upgrade)\n\nmodule.exports.MockClient = MockClient\nmodule.exports.MockCallHistory = MockCallHistory\nmodule.exports.MockCallHistoryLog = MockCallHistoryLog\nmodule.exports.MockPool = MockPool\nmodule.exports.MockAgent = MockAgent\nmodule.exports.SnapshotAgent = SnapshotAgent\nmodule.exports.mockErrors = mockErrors\n\nconst { EventSource } = require('./lib/web/eventsource/eventsource')\n\nmodule.exports.EventSource = EventSource\n\nfunction install () {\n globalThis.fetch = module.exports.fetch\n globalThis.Headers = module.exports.Headers\n globalThis.Response = module.exports.Response\n globalThis.Request = module.exports.Request\n globalThis.FormData = module.exports.FormData\n globalThis.WebSocket = module.exports.WebSocket\n globalThis.CloseEvent = module.exports.CloseEvent\n globalThis.ErrorEvent = module.exports.ErrorEvent\n globalThis.MessageEvent = module.exports.MessageEvent\n globalThis.EventSource = module.exports.EventSource\n}\n\nmodule.exports.install = install\n", null, null, null, null, null, null, null, null, null, null, null, null, null, "export function getUserAgent() {\n if (typeof navigator === \"object\" && \"userAgent\" in navigator) {\n return navigator.userAgent;\n }\n if (typeof process === \"object\" && process.version !== undefined) {\n return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`;\n }\n return \"\";\n}\n", "module.exports = register;\n\nfunction register(state, name, method, options) {\n if (typeof method !== \"function\") {\n throw new Error(\"method for before hook must be a function\");\n }\n\n if (!options) {\n options = {};\n }\n\n if (Array.isArray(name)) {\n return name.reverse().reduce(function (callback, name) {\n return register.bind(null, state, name, callback, options);\n }, method)();\n }\n\n return Promise.resolve().then(function () {\n if (!state.registry[name]) {\n return method(options);\n }\n\n return state.registry[name].reduce(function (method, registered) {\n return registered.hook.bind(null, method, options);\n }, method)();\n });\n}\n", "module.exports = addHook;\n\nfunction addHook(state, kind, name, hook) {\n var orig = hook;\n if (!state.registry[name]) {\n state.registry[name] = [];\n }\n\n if (kind === \"before\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(orig.bind(null, options))\n .then(method.bind(null, options));\n };\n }\n\n if (kind === \"after\") {\n hook = function (method, options) {\n var result;\n return Promise.resolve()\n .then(method.bind(null, options))\n .then(function (result_) {\n result = result_;\n return orig(result, options);\n })\n .then(function () {\n return result;\n });\n };\n }\n\n if (kind === \"error\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(method.bind(null, options))\n .catch(function (error) {\n return orig(error, options);\n });\n };\n }\n\n state.registry[name].push({\n hook: hook,\n orig: orig,\n });\n}\n", "module.exports = removeHook;\n\nfunction removeHook(state, name, method) {\n if (!state.registry[name]) {\n return;\n }\n\n var index = state.registry[name]\n .map(function (registered) {\n return registered.orig;\n })\n .indexOf(method);\n\n if (index === -1) {\n return;\n }\n\n state.registry[name].splice(index, 1);\n}\n", "var register = require(\"./lib/register\");\nvar addHook = require(\"./lib/add\");\nvar removeHook = require(\"./lib/remove\");\n\n// bind with array of arguments: https://stackoverflow.com/a/21792913\nvar bind = Function.bind;\nvar bindable = bind.bind(bind);\n\nfunction bindApi(hook, state, name) {\n var removeHookRef = bindable(removeHook, null).apply(\n null,\n name ? [state, name] : [state]\n );\n hook.api = { remove: removeHookRef };\n hook.remove = removeHookRef;\n [\"before\", \"error\", \"after\", \"wrap\"].forEach(function (kind) {\n var args = name ? [state, kind, name] : [state, kind];\n hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args);\n });\n}\n\nfunction HookSingular() {\n var singularHookName = \"h\";\n var singularHookState = {\n registry: {},\n };\n var singularHook = register.bind(null, singularHookState, singularHookName);\n bindApi(singularHook, singularHookState, singularHookName);\n return singularHook;\n}\n\nfunction HookCollection() {\n var state = {\n registry: {},\n };\n\n var hook = register.bind(null, state);\n bindApi(hook, state);\n\n return hook;\n}\n\nvar collectionHookDeprecationMessageDisplayed = false;\nfunction Hook() {\n if (!collectionHookDeprecationMessageDisplayed) {\n console.warn(\n '[before-after-hook]: \"Hook()\" repurposing warning, use \"Hook.Collection()\". Read more: https://git.io/upgrade-before-after-hook-to-1.4'\n );\n collectionHookDeprecationMessageDisplayed = true;\n }\n return HookCollection();\n}\n\nHook.Singular = HookSingular.bind();\nHook.Collection = HookCollection.bind();\n\nmodule.exports = Hook;\n// expose constructors as a named property for TypeScript\nmodule.exports.Hook = Hook;\nmodule.exports.Singular = Hook.Singular;\nmodule.exports.Collection = Hook.Collection;\n", "\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n endpoint: () => endpoint\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/defaults.js\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"9.0.6\";\n\n// pkg/dist-src/defaults.js\nvar userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;\nvar DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent\n },\n mediaType: {\n format: \"\"\n }\n};\n\n// pkg/dist-src/util/lowercase-keys.js\nfunction lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n\n// pkg/dist-src/util/is-plain-object.js\nfunction isPlainObject(value) {\n if (typeof value !== \"object\" || value === null)\n return false;\n if (Object.prototype.toString.call(value) !== \"[object Object]\")\n return false;\n const proto = Object.getPrototypeOf(value);\n if (proto === null)\n return true;\n const Ctor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);\n}\n\n// pkg/dist-src/util/merge-deep.js\nfunction mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n } else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n\n// pkg/dist-src/util/remove-undefined-properties.js\nfunction removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === void 0) {\n delete obj[key];\n }\n }\n return obj;\n}\n\n// pkg/dist-src/merge.js\nfunction merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n } else {\n options = Object.assign({}, route);\n }\n options.headers = lowercaseKeys(options.headers);\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n if (options.url === \"/graphql\") {\n if (defaults && defaults.mediaType.previews?.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(\n (preview) => !mergedOptions.mediaType.previews.includes(preview)\n ).concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, \"\"));\n }\n return mergedOptions;\n}\n\n// pkg/dist-src/util/add-query-parameters.js\nfunction addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return url + separator + names.map((name) => {\n if (name === \"q\") {\n return \"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\");\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n }).join(\"&\");\n}\n\n// pkg/dist-src/util/extract-url-variable-names.js\nvar urlVariableRegex = /\\{[^{}}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/(?:^\\W+)|(?:(? a.concat(b), []);\n}\n\n// pkg/dist-src/util/omit.js\nfunction omit(object, keysToOmit) {\n const result = { __proto__: null };\n for (const key of Object.keys(object)) {\n if (keysToOmit.indexOf(key) === -1) {\n result[key] = object[key];\n }\n }\n return result;\n}\n\n// pkg/dist-src/util/url-template.js\nfunction encodeReserved(str) {\n return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n }).join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value = operator === \"+\" || operator === \"#\" ? encodeReserved(value) : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n } else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== void 0 && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(\n encodeValue(operator, value, isKeyOperator(operator) ? key : \"\")\n );\n } else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n result.push(\n encodeValue(operator, value2, isKeyOperator(operator) ? key : \"\")\n );\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n } else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n tmp.push(encodeValue(operator, value2));\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n } else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n } else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n } else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n } else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nfunction parseUrl(template) {\n return {\n expand: expand.bind(null, template)\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n template = template.replace(\n /\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g,\n function(_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function(variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n } else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n } else {\n return values.join(\",\");\n }\n } else {\n return encodeReserved(literal);\n }\n }\n );\n if (template === \"/\") {\n return template;\n } else {\n return template.replace(/\\/$/, \"\");\n }\n}\n\n// pkg/dist-src/parse.js\nfunction parse(options) {\n let method = options.method.toUpperCase();\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\"\n ]);\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n headers.accept = headers.accept.split(/,/).map(\n (format) => format.replace(\n /application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/,\n `application/vnd$1$2.${options.mediaType.format}`\n )\n ).join(\",\");\n }\n if (url.endsWith(\"/graphql\")) {\n if (options.mediaType.previews?.length) {\n const previewsFromAcceptHeader = headers.accept.match(/(? {\n const format = options.mediaType.format ? `.${options.mediaType.format}` : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n }).join(\",\");\n }\n }\n }\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n } else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n } else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n return Object.assign(\n { method, url, headers },\n typeof body !== \"undefined\" ? { body } : null,\n options.request ? { request: options.request } : null\n );\n}\n\n// pkg/dist-src/endpoint-with-defaults.js\nfunction endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS2 = merge(oldDefaults, newDefaults);\n const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2);\n return Object.assign(endpoint2, {\n DEFAULTS: DEFAULTS2,\n defaults: withDefaults.bind(null, DEFAULTS2),\n merge: merge.bind(null, DEFAULTS2),\n parse\n });\n}\n\n// pkg/dist-src/index.js\nvar endpoint = withDefaults(null, DEFAULTS);\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n endpoint\n});\n", "'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nclass Deprecation extends Error {\n constructor(message) {\n super(message); // Maintains proper stack trace (only available on V8)\n\n /* istanbul ignore next */\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = 'Deprecation';\n }\n\n}\n\nexports.Deprecation = Deprecation;\n", "// Returns a wrapper function that returns a wrapped callback\n// The wrapper function should do some stuff, and return a\n// presumably different callback function.\n// This makes sure that own properties are retained, so that\n// decorations and such are not lost along the way.\nmodule.exports = wrappy\nfunction wrappy (fn, cb) {\n if (fn && cb) return wrappy(fn)(cb)\n\n if (typeof fn !== 'function')\n throw new TypeError('need wrapper function')\n\n Object.keys(fn).forEach(function (k) {\n wrapper[k] = fn[k]\n })\n\n return wrapper\n\n function wrapper() {\n var args = new Array(arguments.length)\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i]\n }\n var ret = fn.apply(this, args)\n var cb = args[args.length-1]\n if (typeof ret === 'function' && ret !== cb) {\n Object.keys(cb).forEach(function (k) {\n ret[k] = cb[k]\n })\n }\n return ret\n }\n}\n", "var wrappy = require('wrappy')\nmodule.exports = wrappy(once)\nmodule.exports.strict = wrappy(onceStrict)\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n\n Object.defineProperty(Function.prototype, 'onceStrict', {\n value: function () {\n return onceStrict(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var f = function () {\n if (f.called) return f.value\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n f.called = false\n return f\n}\n\nfunction onceStrict (fn) {\n var f = function () {\n if (f.called)\n throw new Error(f.onceError)\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n var name = fn.name || 'Function wrapped with `once`'\n f.onceError = name + \" shouldn't be called more than once\"\n f.called = false\n return f\n}\n", "\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n RequestError: () => RequestError\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_deprecation = require(\"deprecation\");\nvar import_once = __toESM(require(\"once\"));\nvar logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation));\nvar logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation));\nvar RequestError = class extends Error {\n constructor(message, statusCode, options) {\n super(message);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(\n /(? {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n request: () => request\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_endpoint = require(\"@octokit/endpoint\");\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"8.4.1\";\n\n// pkg/dist-src/is-plain-object.js\nfunction isPlainObject(value) {\n if (typeof value !== \"object\" || value === null)\n return false;\n if (Object.prototype.toString.call(value) !== \"[object Object]\")\n return false;\n const proto = Object.getPrototypeOf(value);\n if (proto === null)\n return true;\n const Ctor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);\n}\n\n// pkg/dist-src/fetch-wrapper.js\nvar import_request_error = require(\"@octokit/request-error\");\n\n// pkg/dist-src/get-buffer-response.js\nfunction getBufferResponse(response) {\n return response.arrayBuffer();\n}\n\n// pkg/dist-src/fetch-wrapper.js\nfunction fetchWrapper(requestOptions) {\n var _a, _b, _c, _d;\n const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;\n const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;\n if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n let { fetch } = globalThis;\n if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) {\n fetch = requestOptions.request.fetch;\n }\n if (!fetch) {\n throw new Error(\n \"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\"\n );\n }\n return fetch(requestOptions.url, {\n method: requestOptions.method,\n body: requestOptions.body,\n redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect,\n headers: requestOptions.headers,\n signal: (_d = requestOptions.request) == null ? void 0 : _d.signal,\n // duplex must be set if request.body is ReadableStream or Async Iterables.\n // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.\n ...requestOptions.body && { duplex: \"half\" }\n }).then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^<>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(\n `[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`\n );\n }\n if (status === 204 || status === 205) {\n return;\n }\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new import_request_error.RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: void 0\n },\n request: requestOptions\n });\n }\n if (status === 304) {\n throw new import_request_error.RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response)\n },\n request: requestOptions\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new import_request_error.RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data\n },\n request: requestOptions\n });\n throw error;\n }\n return parseSuccessResponseBody ? await getResponseData(response) : response.body;\n }).then((data) => {\n return {\n status,\n url,\n headers,\n data\n };\n }).catch((error) => {\n if (error instanceof import_request_error.RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n let message = error.message;\n if (error.name === \"TypeError\" && \"cause\" in error) {\n if (error.cause instanceof Error) {\n message = error.cause.message;\n } else if (typeof error.cause === \"string\") {\n message = error.cause;\n }\n }\n throw new import_request_error.RequestError(message, 500, {\n request: requestOptions\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json().catch(() => response.text()).catch(() => \"\");\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBufferResponse(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n let suffix;\n if (\"documentation_url\" in data) {\n suffix = ` - ${data.documentation_url}`;\n } else {\n suffix = \"\";\n }\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}${suffix}`;\n }\n return `${data.message}${suffix}`;\n }\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(oldEndpoint, newDefaults) {\n const endpoint2 = oldEndpoint.defaults(newDefaults);\n const newApi = function(route, parameters) {\n const endpointOptions = endpoint2.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint2.parse(endpointOptions));\n }\n const request2 = (route2, parameters2) => {\n return fetchWrapper(\n endpoint2.parse(endpoint2.merge(route2, parameters2))\n );\n };\n Object.assign(request2, {\n endpoint: endpoint2,\n defaults: withDefaults.bind(null, endpoint2)\n });\n return endpointOptions.request.hook(request2, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint: endpoint2,\n defaults: withDefaults.bind(null, endpoint2)\n });\n}\n\n// pkg/dist-src/index.js\nvar request = withDefaults(import_endpoint.endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`\n }\n});\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n request\n});\n", "\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar index_exports = {};\n__export(index_exports, {\n GraphqlResponseError: () => GraphqlResponseError,\n graphql: () => graphql2,\n withCustomRequest: () => withCustomRequest\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_request3 = require(\"@octokit/request\");\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"7.1.1\";\n\n// pkg/dist-src/with-defaults.js\nvar import_request2 = require(\"@octokit/request\");\n\n// pkg/dist-src/graphql.js\nvar import_request = require(\"@octokit/request\");\n\n// pkg/dist-src/error.js\nfunction _buildMessageForResponseErrors(data) {\n return `Request failed due to following response errors:\n` + data.errors.map((e) => ` - ${e.message}`).join(\"\\n\");\n}\nvar GraphqlResponseError = class extends Error {\n constructor(request2, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request2;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\";\n this.errors = response.errors;\n this.data = response.data;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n};\n\n// pkg/dist-src/graphql.js\nvar NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\"\n];\nvar FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nvar GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nfunction graphql(request2, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(\n new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`)\n );\n }\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;\n return Promise.reject(\n new Error(\n `[@octokit/graphql] \"${key}\" cannot be used as variable name`\n )\n );\n }\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(\n parsedOptions\n ).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request2(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlResponseError(\n requestOptions,\n headers,\n response.data\n );\n }\n return response.data.data;\n });\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(request2, newDefaults) {\n const newRequest = request2.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: newRequest.endpoint\n });\n}\n\n// pkg/dist-src/index.js\nvar graphql2 = withDefaults(import_request3.request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`\n },\n method: \"POST\",\n url: \"/graphql\"\n});\nfunction withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\"\n });\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n GraphqlResponseError,\n graphql,\n withCustomRequest\n});\n", "\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n createTokenAuth: () => createTokenAuth\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/auth.js\nvar REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nvar REGEX_IS_INSTALLATION = /^ghs_/;\nvar REGEX_IS_USER_TO_SERVER = /^ghu_/;\nasync function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp ? \"app\" : isInstallation ? \"installation\" : isUserToServer ? \"user-to-server\" : \"oauth\";\n return {\n type: \"token\",\n token,\n tokenType\n };\n}\n\n// pkg/dist-src/with-authorization-prefix.js\nfunction withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n\n// pkg/dist-src/hook.js\nasync function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(\n route,\n parameters\n );\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n\n// pkg/dist-src/index.js\nvar createTokenAuth = function createTokenAuth2(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\n \"[@octokit/auth-token] Token passed to createTokenAuth is not a string\"\n );\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token)\n });\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n createTokenAuth\n});\n", "\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar index_exports = {};\n__export(index_exports, {\n Octokit: () => Octokit\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_universal_user_agent = require(\"universal-user-agent\");\nvar import_before_after_hook = require(\"before-after-hook\");\nvar import_request = require(\"@octokit/request\");\nvar import_graphql = require(\"@octokit/graphql\");\nvar import_auth_token = require(\"@octokit/auth-token\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"5.2.2\";\n\n// pkg/dist-src/index.js\nvar noop = () => {\n};\nvar consoleWarn = console.warn.bind(console);\nvar consoleError = console.error.bind(console);\nfunction createLogger(logger = {}) {\n if (typeof logger.debug !== \"function\") {\n logger.debug = noop;\n }\n if (typeof logger.info !== \"function\") {\n logger.info = noop;\n }\n if (typeof logger.warn !== \"function\") {\n logger.warn = consoleWarn;\n }\n if (typeof logger.error !== \"function\") {\n logger.error = consoleError;\n }\n return logger;\n}\nvar userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;\nvar Octokit = class {\n static {\n this.VERSION = VERSION;\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(\n Object.assign(\n {},\n defaults,\n options,\n options.userAgent && defaults.userAgent ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`\n } : null\n )\n );\n }\n };\n return OctokitWithDefaults;\n }\n static {\n this.plugins = [];\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n const currentPlugins = this.plugins;\n const NewOctokit = class extends this {\n static {\n this.plugins = currentPlugins.concat(\n newPlugins.filter((plugin) => !currentPlugins.includes(plugin))\n );\n }\n };\n return NewOctokit;\n }\n constructor(options = {}) {\n const hook = new import_before_after_hook.Collection();\n const requestDefaults = {\n baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\")\n }),\n mediaType: {\n previews: [],\n format: \"\"\n }\n };\n requestDefaults.headers[\"user-agent\"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail;\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = import_request.request.defaults(requestDefaults);\n this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults);\n this.log = createLogger(options.log);\n this.hook = hook;\n if (!options.authStrategy) {\n if (!options.auth) {\n this.auth = async () => ({\n type: \"unauthenticated\"\n });\n } else {\n const auth = (0, import_auth_token.createTokenAuth)(options.auth);\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n } else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(\n Object.assign(\n {\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions\n },\n options.auth\n )\n );\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n const classConstructor = this.constructor;\n for (let i = 0; i < classConstructor.plugins.length; ++i) {\n Object.assign(this, classConstructor.plugins[i](this, options));\n }\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n Octokit\n});\n", "\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n legacyRestEndpointMethods: () => legacyRestEndpointMethods,\n restEndpointMethods: () => restEndpointMethods\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"10.4.1\";\n\n// pkg/dist-src/generated/endpoints.js\nvar Endpoints = {\n actions: {\n addCustomLabelsToSelfHostedRunnerForOrg: [\n \"POST /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n addCustomLabelsToSelfHostedRunnerForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n addSelectedRepoToOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\"\n ],\n approveWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve\"\n ],\n cancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\"\n ],\n createEnvironmentVariable: [\n \"POST /repositories/{repository_id}/environments/{environment_name}/variables\"\n ],\n createOrUpdateEnvironmentSecret: [\n \"PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\"\n ],\n createOrgVariable: [\"POST /orgs/{org}/actions/variables\"],\n createRegistrationTokenForOrg: [\n \"POST /orgs/{org}/actions/runners/registration-token\"\n ],\n createRegistrationTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/registration-token\"\n ],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/remove-token\"\n ],\n createRepoVariable: [\"POST /repos/{owner}/{repo}/actions/variables\"],\n createWorkflowDispatch: [\n \"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\"\n ],\n deleteActionsCacheById: [\n \"DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}\"\n ],\n deleteActionsCacheByKey: [\n \"DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}\"\n ],\n deleteArtifact: [\n \"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"\n ],\n deleteEnvironmentSecret: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n deleteEnvironmentVariable: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteOrgVariable: [\"DELETE /orgs/{org}/actions/variables/{name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\"\n ],\n deleteRepoVariable: [\n \"DELETE /repos/{owner}/{repo}/actions/variables/{name}\"\n ],\n deleteSelfHostedRunnerFromOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}\"\n ],\n deleteSelfHostedRunnerFromRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\"\n ],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\n \"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"\n ],\n disableSelectedRepositoryGithubActionsOrganization: [\n \"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\"\n ],\n disableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\"\n ],\n downloadArtifact: [\n \"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\"\n ],\n downloadJobLogsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\"\n ],\n downloadWorkflowRunAttemptLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs\"\n ],\n downloadWorkflowRunLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"\n ],\n enableSelectedRepositoryGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\"\n ],\n enableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\"\n ],\n forceCancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel\"\n ],\n generateRunnerJitconfigForOrg: [\n \"POST /orgs/{org}/actions/runners/generate-jitconfig\"\n ],\n generateRunnerJitconfigForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig\"\n ],\n getActionsCacheList: [\"GET /repos/{owner}/{repo}/actions/caches\"],\n getActionsCacheUsage: [\"GET /repos/{owner}/{repo}/actions/cache/usage\"],\n getActionsCacheUsageByRepoForOrg: [\n \"GET /orgs/{org}/actions/cache/usage-by-repository\"\n ],\n getActionsCacheUsageForOrg: [\"GET /orgs/{org}/actions/cache/usage\"],\n getAllowedActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/selected-actions\"\n ],\n getAllowedActionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\"\n ],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getCustomOidcSubClaimForRepo: [\n \"GET /repos/{owner}/{repo}/actions/oidc/customization/sub\"\n ],\n getEnvironmentPublicKey: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key\"\n ],\n getEnvironmentSecret: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n getEnvironmentVariable: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n getGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/workflow\"\n ],\n getGithubActionsDefaultWorkflowPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/workflow\"\n ],\n getGithubActionsPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions\"\n ],\n getGithubActionsPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions\"\n ],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getOrgVariable: [\"GET /orgs/{org}/actions/variables/{name}\"],\n getPendingDeploymentsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"\n ],\n getRepoPermissions: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n {},\n { renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"] }\n ],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getRepoVariable: [\"GET /repos/{owner}/{repo}/actions/variables/{name}\"],\n getReviewsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals\"\n ],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\"\n ],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowAccessToRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/access\"\n ],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}\"\n ],\n getWorkflowRunUsage: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\"\n ],\n getWorkflowUsage: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\"\n ],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listEnvironmentSecrets: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\"\n ],\n listEnvironmentVariables: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables\"\n ],\n listJobsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\"\n ],\n listJobsForWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\"\n ],\n listLabelsForSelfHostedRunnerForOrg: [\n \"GET /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n listLabelsForSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listOrgVariables: [\"GET /orgs/{org}/actions/variables\"],\n listRepoOrganizationSecrets: [\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\"\n ],\n listRepoOrganizationVariables: [\n \"GET /repos/{owner}/{repo}/actions/organization-variables\"\n ],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoVariables: [\"GET /repos/{owner}/{repo}/actions/variables\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/downloads\"\n ],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\"\n ],\n listSelectedReposForOrgVariable: [\n \"GET /orgs/{org}/actions/variables/{name}/repositories\"\n ],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/repositories\"\n ],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\"\n ],\n listWorkflowRuns: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\"\n ],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n reRunJobForWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun\"\n ],\n reRunWorkflow: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun\"],\n reRunWorkflowFailedJobs: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs\"\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n removeCustomLabelFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}\"\n ],\n removeCustomLabelFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n removeSelectedRepoFromOrgVariable: [\n \"DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\"\n ],\n reviewCustomGatesForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule\"\n ],\n reviewPendingDeploymentsForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"\n ],\n setAllowedActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/selected-actions\"\n ],\n setAllowedActionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\"\n ],\n setCustomLabelsForSelfHostedRunnerForOrg: [\n \"PUT /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n setCustomLabelsForSelfHostedRunnerForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n setCustomOidcSubClaimForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/oidc/customization/sub\"\n ],\n setGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/workflow\"\n ],\n setGithubActionsDefaultWorkflowPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/workflow\"\n ],\n setGithubActionsPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions\"\n ],\n setGithubActionsPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\"\n ],\n setSelectedReposForOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories\"\n ],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories\"\n ],\n setWorkflowAccessToRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/access\"\n ],\n updateEnvironmentVariable: [\n \"PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n updateOrgVariable: [\"PATCH /orgs/{org}/actions/variables/{name}\"],\n updateRepoVariable: [\n \"PATCH /repos/{owner}/{repo}/actions/variables/{name}\"\n ]\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\n \"DELETE /notifications/threads/{thread_id}/subscription\"\n ],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\n \"GET /notifications/threads/{thread_id}/subscription\"\n ],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\n \"GET /users/{username}/events/orgs/{org}\"\n ],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\n \"GET /users/{username}/received_events/public\"\n ],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/notifications\"\n ],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsDone: [\"DELETE /notifications/threads/{thread_id}\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\n \"PUT /notifications/threads/{thread_id}/subscription\"\n ],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"]\n },\n apps: {\n addRepoToInstallation: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"addRepoToInstallationForAuthenticatedUser\"] }\n ],\n addRepoToInstallationForAuthenticatedUser: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\"\n ],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\n \"POST /app/installations/{installation_id}/access_tokens\"\n ],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\n \"GET /marketplace_listing/accounts/{account_id}\"\n ],\n getSubscriptionPlanForAccountStubbed: [\n \"GET /marketplace_listing/stubbed/accounts/{account_id}\"\n ],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n getWebhookDelivery: [\"GET /app/hook/deliveries/{delivery_id}\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\"\n ],\n listInstallationReposForAuthenticatedUser: [\n \"GET /user/installations/{installation_id}/repositories\"\n ],\n listInstallationRequestsForAuthenticatedApp: [\n \"GET /app/installation-requests\"\n ],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\n \"GET /user/marketplace_purchases/stubbed\"\n ],\n listWebhookDeliveries: [\"GET /app/hook/deliveries\"],\n redeliverWebhookDelivery: [\n \"POST /app/hook/deliveries/{delivery_id}/attempts\"\n ],\n removeRepoFromInstallation: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"removeRepoFromInstallationForAuthenticatedUser\"] }\n ],\n removeRepoFromInstallationForAuthenticatedUser: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\"\n ],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\n \"DELETE /app/installations/{installation_id}/suspended\"\n ],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"]\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\n \"GET /users/{username}/settings/billing/actions\"\n ],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\n \"GET /users/{username}/settings/billing/packages\"\n ],\n getSharedStorageBillingOrg: [\n \"GET /orgs/{org}/settings/billing/shared-storage\"\n ],\n getSharedStorageBillingUser: [\n \"GET /users/{username}/settings/billing/shared-storage\"\n ]\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\"\n ],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\"\n ],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestRun: [\n \"POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest\"\n ],\n rerequestSuite: [\n \"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\"\n ],\n setSuitesPreferences: [\n \"PATCH /repos/{owner}/{repo}/check-suites/preferences\"\n ],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"]\n },\n codeScanning: {\n deleteAnalysis: [\n \"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\"\n ],\n getAlert: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n {},\n { renamedParameters: { alert_id: \"alert_number\" } }\n ],\n getAnalysis: [\n \"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\"\n ],\n getCodeqlDatabase: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}\"\n ],\n getDefaultSetup: [\"GET /repos/{owner}/{repo}/code-scanning/default-setup\"],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/code-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n {},\n { renamed: [\"codeScanning\", \"listAlertInstances\"] }\n ],\n listCodeqlDatabases: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases\"\n ],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\"\n ],\n updateDefaultSetup: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/default-setup\"\n ],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"]\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\"GET /codes_of_conduct\"],\n getConductCode: [\"GET /codes_of_conduct/{key}\"]\n },\n codespaces: {\n addRepositoryForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n checkPermissionsForDevcontainer: [\n \"GET /repos/{owner}/{repo}/codespaces/permissions_check\"\n ],\n codespaceMachinesForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/machines\"\n ],\n createForAuthenticatedUser: [\"POST /user/codespaces\"],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}\"\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n createOrUpdateSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}\"\n ],\n createWithPrForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces\"\n ],\n createWithRepoForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/codespaces\"\n ],\n deleteForAuthenticatedUser: [\"DELETE /user/codespaces/{codespace_name}\"],\n deleteFromOrganization: [\n \"DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/codespaces/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n deleteSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}\"\n ],\n exportForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/exports\"\n ],\n getCodespacesForUserInOrg: [\n \"GET /orgs/{org}/members/{username}/codespaces\"\n ],\n getExportDetailsForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/exports/{export_id}\"\n ],\n getForAuthenticatedUser: [\"GET /user/codespaces/{codespace_name}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/codespaces/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/codespaces/secrets/{secret_name}\"],\n getPublicKeyForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/public-key\"\n ],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/public-key\"\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n getSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}\"\n ],\n listDevcontainersInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\"\n ],\n listForAuthenticatedUser: [\"GET /user/codespaces\"],\n listInOrganization: [\n \"GET /orgs/{org}/codespaces\",\n {},\n { renamedParameters: { org_id: \"org\" } }\n ],\n listInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces\"\n ],\n listOrgSecrets: [\"GET /orgs/{org}/codespaces/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/codespaces/secrets\"],\n listRepositoriesForSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}/repositories\"\n ],\n listSecretsForAuthenticatedUser: [\"GET /user/codespaces/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\"\n ],\n preFlightWithRepoForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/new\"\n ],\n publishForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/publish\"\n ],\n removeRepositoryForSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n repoMachinesForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/machines\"\n ],\n setRepositoriesForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories\"\n ],\n startForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/start\"],\n stopForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/stop\"],\n stopInOrganization: [\n \"POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop\"\n ],\n updateForAuthenticatedUser: [\"PATCH /user/codespaces/{codespace_name}\"]\n },\n copilot: {\n addCopilotSeatsForTeams: [\n \"POST /orgs/{org}/copilot/billing/selected_teams\"\n ],\n addCopilotSeatsForUsers: [\n \"POST /orgs/{org}/copilot/billing/selected_users\"\n ],\n cancelCopilotSeatAssignmentForTeams: [\n \"DELETE /orgs/{org}/copilot/billing/selected_teams\"\n ],\n cancelCopilotSeatAssignmentForUsers: [\n \"DELETE /orgs/{org}/copilot/billing/selected_users\"\n ],\n getCopilotOrganizationDetails: [\"GET /orgs/{org}/copilot/billing\"],\n getCopilotSeatDetailsForUser: [\n \"GET /orgs/{org}/members/{username}/copilot\"\n ],\n listCopilotSeats: [\"GET /orgs/{org}/copilot/billing/seats\"]\n },\n dependabot: {\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}\"\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/dependabot/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n getAlert: [\"GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/dependabot/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/dependabot/secrets/{secret_name}\"],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/public-key\"\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/dependabot/alerts\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/dependabot/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/dependabot/alerts\"],\n listOrgSecrets: [\"GET /orgs/{org}/dependabot/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/dependabot/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories\"\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"\n ]\n },\n dependencyGraph: {\n createRepositorySnapshot: [\n \"POST /repos/{owner}/{repo}/dependency-graph/snapshots\"\n ],\n diffRange: [\n \"GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}\"\n ],\n exportSbom: [\"GET /repos/{owner}/{repo}/dependency-graph/sbom\"]\n },\n emojis: { get: [\"GET /emojis\"] },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"]\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"]\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"]\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\n \"GET /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"] }\n ],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\n \"DELETE /repos/{owner}/{repo}/interaction-limits\"\n ],\n removeRestrictionsForYourPublicRepos: [\n \"DELETE /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"] }\n ],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\n \"PUT /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"] }\n ]\n },\n issues: {\n addAssignees: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\"\n ],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n checkUserCanBeAssignedToIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}\"\n ],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\"\n ],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\"\n ],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\n \"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\"\n ],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\"\n ],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\"\n ],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\"\n ],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\"\n ],\n removeAssignees: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\"\n ],\n removeLabel: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\"\n ],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\n \"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\"\n ]\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"]\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\n \"POST /markdown/raw\",\n { headers: { \"content-type\": \"text/plain; charset=utf-8\" } }\n ]\n },\n meta: {\n get: [\"GET /meta\"],\n getAllVersions: [\"GET /versions\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"]\n },\n migrations: {\n cancelImport: [\n \"DELETE /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import\"\n }\n ],\n deleteArchiveForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/archive\"\n ],\n deleteArchiveForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/archive\"\n ],\n downloadArchiveForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/archive\"\n ],\n getArchiveForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/archive\"\n ],\n getCommitAuthors: [\n \"GET /repos/{owner}/{repo}/import/authors\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors\"\n }\n ],\n getImportStatus: [\n \"GET /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status\"\n }\n ],\n getLargeFiles: [\n \"GET /repos/{owner}/{repo}/import/large_files\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files\"\n }\n ],\n getStatusForAuthenticatedUser: [\"GET /user/migrations/{migration_id}\"],\n getStatusForOrg: [\"GET /orgs/{org}/migrations/{migration_id}\"],\n listForAuthenticatedUser: [\"GET /user/migrations\"],\n listForOrg: [\"GET /orgs/{org}/migrations\"],\n listReposForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/repositories\"\n ],\n listReposForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/repositories\"],\n listReposForUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n {},\n { renamed: [\"migrations\", \"listReposForAuthenticatedUser\"] }\n ],\n mapCommitAuthor: [\n \"PATCH /repos/{owner}/{repo}/import/authors/{author_id}\",\n {},\n {\n deprecated: \"octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author\"\n }\n ],\n setLfsPreference: [\n \"PATCH /repos/{owner}/{repo}/import/lfs\",\n {},\n {\n deprecated: \"octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference\"\n }\n ],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n startImport: [\n \"PUT /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import\"\n }\n ],\n unlockRepoForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\"\n ],\n unlockRepoForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\"\n ],\n updateImport: [\n \"PATCH /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import\"\n }\n ]\n },\n oidc: {\n getOidcCustomSubTemplateForOrg: [\n \"GET /orgs/{org}/actions/oidc/customization/sub\"\n ],\n updateOidcCustomSubTemplateForOrg: [\n \"PUT /orgs/{org}/actions/oidc/customization/sub\"\n ]\n },\n orgs: {\n addSecurityManagerTeam: [\n \"PUT /orgs/{org}/security-managers/teams/{team_slug}\"\n ],\n assignTeamToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\"\n ],\n assignUserToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/users/{username}/{role_id}\"\n ],\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\n \"PUT /orgs/{org}/outside_collaborators/{username}\"\n ],\n createCustomOrganizationRole: [\"POST /orgs/{org}/organization-roles\"],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createOrUpdateCustomProperties: [\"PATCH /orgs/{org}/properties/schema\"],\n createOrUpdateCustomPropertiesValuesForRepos: [\n \"PATCH /orgs/{org}/properties/values\"\n ],\n createOrUpdateCustomProperty: [\n \"PUT /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n delete: [\"DELETE /orgs/{org}\"],\n deleteCustomOrganizationRole: [\n \"DELETE /orgs/{org}/organization-roles/{role_id}\"\n ],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n enableOrDisableSecurityProductOnAllOrgRepos: [\n \"POST /orgs/{org}/{security_product}/{enablement}\"\n ],\n get: [\"GET /orgs/{org}\"],\n getAllCustomProperties: [\"GET /orgs/{org}/properties/schema\"],\n getCustomProperty: [\n \"GET /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getOrgRole: [\"GET /orgs/{org}/organization-roles/{role_id}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}\"\n ],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listCustomPropertiesValuesForRepos: [\"GET /orgs/{org}/properties/values\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOrgRoleTeams: [\"GET /orgs/{org}/organization-roles/{role_id}/teams\"],\n listOrgRoleUsers: [\"GET /orgs/{org}/organization-roles/{role_id}/users\"],\n listOrgRoles: [\"GET /orgs/{org}/organization-roles\"],\n listOrganizationFineGrainedPermissions: [\n \"GET /orgs/{org}/organization-fine-grained-permissions\"\n ],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPatGrantRepositories: [\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\"\n ],\n listPatGrantRequestRepositories: [\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\"\n ],\n listPatGrantRequests: [\"GET /orgs/{org}/personal-access-token-requests\"],\n listPatGrants: [\"GET /orgs/{org}/personal-access-tokens\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listSecurityManagerTeams: [\"GET /orgs/{org}/security-managers\"],\n listWebhookDeliveries: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n patchCustomOrganizationRole: [\n \"PATCH /orgs/{org}/organization-roles/{role_id}\"\n ],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"\n ],\n removeCustomProperty: [\n \"DELETE /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\n \"DELETE /orgs/{org}/outside_collaborators/{username}\"\n ],\n removePublicMembershipForAuthenticatedUser: [\n \"DELETE /orgs/{org}/public_members/{username}\"\n ],\n removeSecurityManagerTeam: [\n \"DELETE /orgs/{org}/security-managers/teams/{team_slug}\"\n ],\n reviewPatGrantRequest: [\n \"POST /orgs/{org}/personal-access-token-requests/{pat_request_id}\"\n ],\n reviewPatGrantRequestsInBulk: [\n \"POST /orgs/{org}/personal-access-token-requests\"\n ],\n revokeAllOrgRolesTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}\"\n ],\n revokeAllOrgRolesUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}\"\n ],\n revokeOrgRoleTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\"\n ],\n revokeOrgRoleUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}\"\n ],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\n \"PUT /orgs/{org}/public_members/{username}\"\n ],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\n \"PATCH /user/memberships/orgs/{org}\"\n ],\n updatePatAccess: [\"POST /orgs/{org}/personal-access-tokens/{pat_id}\"],\n updatePatAccesses: [\"POST /orgs/{org}/personal-access-tokens\"],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"]\n },\n packages: {\n deletePackageForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}\"\n ],\n deletePackageForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}\"\n ],\n deletePackageForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}\"\n ],\n deletePackageVersionForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n deletePackageVersionForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n deletePackageVersionForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n {},\n { renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByOrg\"] }\n ],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n {},\n {\n renamed: [\n \"packages\",\n \"getAllPackageVersionsForPackageOwnedByAuthenticatedUser\"\n ]\n }\n ],\n getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\"\n ],\n getAllPackageVersionsForPackageOwnedByOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\"\n ],\n getAllPackageVersionsForPackageOwnedByUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions\"\n ],\n getPackageForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}\"\n ],\n getPackageForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}\"\n ],\n getPackageForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}\"\n ],\n getPackageVersionForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getPackageVersionForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getPackageVersionForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n listDockerMigrationConflictingPackagesForAuthenticatedUser: [\n \"GET /user/docker/conflicts\"\n ],\n listDockerMigrationConflictingPackagesForOrganization: [\n \"GET /orgs/{org}/docker/conflicts\"\n ],\n listDockerMigrationConflictingPackagesForUser: [\n \"GET /users/{username}/docker/conflicts\"\n ],\n listPackagesForAuthenticatedUser: [\"GET /user/packages\"],\n listPackagesForOrganization: [\"GET /orgs/{org}/packages\"],\n listPackagesForUser: [\"GET /users/{username}/packages\"],\n restorePackageForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageVersionForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ],\n restorePackageVersionForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ],\n restorePackageVersionForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ]\n },\n projects: {\n addCollaborator: [\"PUT /projects/{project_id}/collaborators/{username}\"],\n createCard: [\"POST /projects/columns/{column_id}/cards\"],\n createColumn: [\"POST /projects/{project_id}/columns\"],\n createForAuthenticatedUser: [\"POST /user/projects\"],\n createForOrg: [\"POST /orgs/{org}/projects\"],\n createForRepo: [\"POST /repos/{owner}/{repo}/projects\"],\n delete: [\"DELETE /projects/{project_id}\"],\n deleteCard: [\"DELETE /projects/columns/cards/{card_id}\"],\n deleteColumn: [\"DELETE /projects/columns/{column_id}\"],\n get: [\"GET /projects/{project_id}\"],\n getCard: [\"GET /projects/columns/cards/{card_id}\"],\n getColumn: [\"GET /projects/columns/{column_id}\"],\n getPermissionForUser: [\n \"GET /projects/{project_id}/collaborators/{username}/permission\"\n ],\n listCards: [\"GET /projects/columns/{column_id}/cards\"],\n listCollaborators: [\"GET /projects/{project_id}/collaborators\"],\n listColumns: [\"GET /projects/{project_id}/columns\"],\n listForOrg: [\"GET /orgs/{org}/projects\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/projects\"],\n listForUser: [\"GET /users/{username}/projects\"],\n moveCard: [\"POST /projects/columns/cards/{card_id}/moves\"],\n moveColumn: [\"POST /projects/columns/{column_id}/moves\"],\n removeCollaborator: [\n \"DELETE /projects/{project_id}/collaborators/{username}\"\n ],\n update: [\"PATCH /projects/{project_id}\"],\n updateCard: [\"PATCH /projects/columns/cards/{card_id}\"],\n updateColumn: [\"PATCH /projects/columns/{column_id}\"]\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\"\n ],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\"\n ],\n deletePendingReview: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n deleteReviewComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\"\n ],\n dismissReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\"\n ],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\"\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n listReviewComments: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\"\n ],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n requestReviewers: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n submitReview: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\"\n ],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\"\n ],\n updateReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n updateReviewComment: [\n \"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\"\n ]\n },\n rateLimit: { get: [\"GET /rate_limit\"] },\n reactions: {\n createForCommitComment: [\n \"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\"\n ],\n createForIssue: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\"\n ],\n createForIssueComment: [\n \"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\n ],\n createForPullRequestReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"\n ],\n createForRelease: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/reactions\"\n ],\n createForTeamDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"\n ],\n createForTeamDiscussionInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"\n ],\n deleteForCommitComment: [\n \"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForIssue: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\"\n ],\n deleteForIssueComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForPullRequestComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForRelease: [\n \"DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}\"\n ],\n deleteForTeamDiscussion: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\"\n ],\n deleteForTeamDiscussionComment: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\"\n ],\n listForCommitComment: [\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\"\n ],\n listForIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n listForIssueComment: [\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\n ],\n listForPullRequestReviewComment: [\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"\n ],\n listForRelease: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\"\n ],\n listForTeamDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"\n ],\n listForTeamDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"\n ]\n },\n repos: {\n acceptInvitation: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"acceptInvitationForAuthenticatedUser\"] }\n ],\n acceptInvitationForAuthenticatedUser: [\n \"PATCH /user/repository_invitations/{invitation_id}\"\n ],\n addAppAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n addTeamAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n addUserAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n cancelPagesDeployment: [\n \"POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel\"\n ],\n checkAutomatedSecurityFixes: [\n \"GET /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkVulnerabilityAlerts: [\n \"GET /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n codeownersErrors: [\"GET /repos/{owner}/{repo}/codeowners/errors\"],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n compareCommitsWithBasehead: [\n \"GET /repos/{owner}/{repo}/compare/{basehead}\"\n ],\n createAutolink: [\"POST /repos/{owner}/{repo}/autolinks\"],\n createCommitComment: [\n \"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\"\n ],\n createCommitSignatureProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentBranchPolicy: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\"\n ],\n createDeploymentProtectionRule: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\"\n ],\n createDeploymentStatus: [\n \"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"\n ],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateCustomPropertiesValues: [\n \"PATCH /repos/{owner}/{repo}/properties/values\"\n ],\n createOrUpdateEnvironment: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createOrgRuleset: [\"POST /orgs/{org}/rulesets\"],\n createPagesDeployment: [\"POST /repos/{owner}/{repo}/pages/deployments\"],\n createPagesSite: [\"POST /repos/{owner}/{repo}/pages\"],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createRepoRuleset: [\"POST /repos/{owner}/{repo}/rulesets\"],\n createTagProtection: [\"POST /repos/{owner}/{repo}/tags/protection\"],\n createUsingTemplate: [\n \"POST /repos/{template_owner}/{template_repo}/generate\"\n ],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"declineInvitationForAuthenticatedUser\"] }\n ],\n declineInvitationForAuthenticatedUser: [\n \"DELETE /user/repository_invitations/{invitation_id}\"\n ],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"\n ],\n deleteAdminBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n deleteAnEnvironment: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n deleteAutolink: [\"DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n deleteBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\n \"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\"\n ],\n deleteDeploymentBranchPolicy: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\n \"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\"\n ],\n deleteOrgRuleset: [\"DELETE /orgs/{org}/rulesets/{ruleset_id}\"],\n deletePagesSite: [\"DELETE /repos/{owner}/{repo}/pages\"],\n deletePullRequestReviewProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\n \"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\"\n ],\n deleteRepoRuleset: [\"DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n deleteTagProtection: [\n \"DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}\"\n ],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\n \"DELETE /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n disableDeploymentProtectionRule: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\"\n ],\n disablePrivateVulnerabilityReporting: [\n \"DELETE /repos/{owner}/{repo}/private-vulnerability-reporting\"\n ],\n disableVulnerabilityAlerts: [\n \"DELETE /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n downloadArchive: [\n \"GET /repos/{owner}/{repo}/zipball/{ref}\",\n {},\n { renamed: [\"repos\", \"downloadZipballArchive\"] }\n ],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\n \"PUT /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n enablePrivateVulnerabilityReporting: [\n \"PUT /repos/{owner}/{repo}/private-vulnerability-reporting\"\n ],\n enableVulnerabilityAlerts: [\n \"PUT /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n generateReleaseNotes: [\n \"POST /repos/{owner}/{repo}/releases/generate-notes\"\n ],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"\n ],\n getAdminBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n getAllDeploymentProtectionRules: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\"\n ],\n getAllEnvironments: [\"GET /repos/{owner}/{repo}/environments\"],\n getAllStatusCheckContexts: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\"\n ],\n getAllTopics: [\"GET /repos/{owner}/{repo}/topics\"],\n getAppsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\"\n ],\n getAutolink: [\"GET /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n getBranchRules: [\"GET /repos/{owner}/{repo}/rules/branches/{branch}\"],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\n \"GET /repos/{owner}/{repo}/collaborators/{username}/permission\"\n ],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getCustomDeploymentProtectionRule: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\"\n ],\n getCustomPropertiesValues: [\"GET /repos/{owner}/{repo}/properties/values\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentBranchPolicy: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n getDeploymentStatus: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\"\n ],\n getEnvironment: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getOrgRuleSuite: [\"GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}\"],\n getOrgRuleSuites: [\"GET /orgs/{org}/rulesets/rule-suites\"],\n getOrgRuleset: [\"GET /orgs/{org}/rulesets/{ruleset_id}\"],\n getOrgRulesets: [\"GET /orgs/{org}/rulesets\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getPagesDeployment: [\n \"GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}\"\n ],\n getPagesHealthCheck: [\"GET /repos/{owner}/{repo}/pages/health\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getReadmeInDirectory: [\"GET /repos/{owner}/{repo}/readme/{dir}\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getRepoRuleSuite: [\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}\"\n ],\n getRepoRuleSuites: [\"GET /repos/{owner}/{repo}/rulesets/rule-suites\"],\n getRepoRuleset: [\"GET /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n getRepoRulesets: [\"GET /repos/{owner}/{repo}/rulesets\"],\n getStatusChecksProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n getTeamsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\"\n ],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\"\n ],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\"\n ],\n getWebhookDelivery: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}\"\n ],\n listActivities: [\"GET /repos/{owner}/{repo}/activity\"],\n listAutolinks: [\"GET /repos/{owner}/{repo}/autolinks\"],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\"\n ],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\"\n ],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\"\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listCustomDeploymentRuleIntegrations: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\"\n ],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentBranchPolicies: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\"\n ],\n listDeploymentStatuses: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"\n ],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\"\n ],\n listReleaseAssets: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\"\n ],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTagProtection: [\"GET /repos/{owner}/{repo}/tags/protection\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhookDeliveries: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\"\n ],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n mergeUpstream: [\"POST /repos/{owner}/{repo}/merge-upstream\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"\n ],\n removeAppAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n removeCollaborator: [\n \"DELETE /repos/{owner}/{repo}/collaborators/{username}\"\n ],\n removeStatusCheckContexts: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n removeStatusCheckProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n removeTeamAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n removeUserAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\"PUT /repos/{owner}/{repo}/topics\"],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n setAppAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n setStatusCheckContexts: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n setTeamAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n setUserAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateDeploymentBranchPolicy: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\n \"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\"\n ],\n updateOrgRuleset: [\"PUT /orgs/{org}/rulesets/{ruleset_id}\"],\n updatePullRequestReviewProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\n \"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\"\n ],\n updateRepoRuleset: [\"PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n updateStatusCheckPotection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n {},\n { renamed: [\"repos\", \"updateStatusCheckProtection\"] }\n ],\n updateStatusCheckProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\n \"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\"\n ],\n uploadReleaseAsset: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\",\n { baseUrl: \"https://uploads.github.com\" }\n ]\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\"],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\"],\n users: [\"GET /search/users\"]\n },\n secretScanning: {\n getAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/secret-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n listLocationsForAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\"\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"\n ]\n },\n securityAdvisories: {\n createFork: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks\"\n ],\n createPrivateVulnerabilityReport: [\n \"POST /repos/{owner}/{repo}/security-advisories/reports\"\n ],\n createRepositoryAdvisory: [\n \"POST /repos/{owner}/{repo}/security-advisories\"\n ],\n createRepositoryAdvisoryCveRequest: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve\"\n ],\n getGlobalAdvisory: [\"GET /advisories/{ghsa_id}\"],\n getRepositoryAdvisory: [\n \"GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}\"\n ],\n listGlobalAdvisories: [\"GET /advisories\"],\n listOrgRepositoryAdvisories: [\"GET /orgs/{org}/security-advisories\"],\n listRepositoryAdvisories: [\"GET /repos/{owner}/{repo}/security-advisories\"],\n updateRepositoryAdvisory: [\n \"PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}\"\n ]\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n addOrUpdateProjectPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n addOrUpdateRepoPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n checkPermissionsForProjectInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n checkPermissionsForRepoInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"\n ],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n deleteDiscussionInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n getDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n getMembershipForUserInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"\n ],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/invitations\"\n ],\n listProjectsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects\"],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n removeProjectInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n removeRepoInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n updateDiscussionCommentInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n updateDiscussionInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"]\n },\n users: {\n addEmailForAuthenticated: [\n \"POST /user/emails\",\n {},\n { renamed: [\"users\", \"addEmailForAuthenticatedUser\"] }\n ],\n addEmailForAuthenticatedUser: [\"POST /user/emails\"],\n addSocialAccountForAuthenticatedUser: [\"POST /user/social_accounts\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\n \"POST /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"createGpgKeyForAuthenticatedUser\"] }\n ],\n createGpgKeyForAuthenticatedUser: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\n \"POST /user/keys\",\n {},\n { renamed: [\"users\", \"createPublicSshKeyForAuthenticatedUser\"] }\n ],\n createPublicSshKeyForAuthenticatedUser: [\"POST /user/keys\"],\n createSshSigningKeyForAuthenticatedUser: [\"POST /user/ssh_signing_keys\"],\n deleteEmailForAuthenticated: [\n \"DELETE /user/emails\",\n {},\n { renamed: [\"users\", \"deleteEmailForAuthenticatedUser\"] }\n ],\n deleteEmailForAuthenticatedUser: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\n \"DELETE /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"deleteGpgKeyForAuthenticatedUser\"] }\n ],\n deleteGpgKeyForAuthenticatedUser: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\n \"DELETE /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"deletePublicSshKeyForAuthenticatedUser\"] }\n ],\n deletePublicSshKeyForAuthenticatedUser: [\"DELETE /user/keys/{key_id}\"],\n deleteSocialAccountForAuthenticatedUser: [\"DELETE /user/social_accounts\"],\n deleteSshSigningKeyForAuthenticatedUser: [\n \"DELETE /user/ssh_signing_keys/{ssh_signing_key_id}\"\n ],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\n \"GET /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"getGpgKeyForAuthenticatedUser\"] }\n ],\n getGpgKeyForAuthenticatedUser: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\n \"GET /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"getPublicSshKeyForAuthenticatedUser\"] }\n ],\n getPublicSshKeyForAuthenticatedUser: [\"GET /user/keys/{key_id}\"],\n getSshSigningKeyForAuthenticatedUser: [\n \"GET /user/ssh_signing_keys/{ssh_signing_key_id}\"\n ],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\n \"GET /user/blocks\",\n {},\n { renamed: [\"users\", \"listBlockedByAuthenticatedUser\"] }\n ],\n listBlockedByAuthenticatedUser: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\n \"GET /user/emails\",\n {},\n { renamed: [\"users\", \"listEmailsForAuthenticatedUser\"] }\n ],\n listEmailsForAuthenticatedUser: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\n \"GET /user/following\",\n {},\n { renamed: [\"users\", \"listFollowedByAuthenticatedUser\"] }\n ],\n listFollowedByAuthenticatedUser: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\n \"GET /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"listGpgKeysForAuthenticatedUser\"] }\n ],\n listGpgKeysForAuthenticatedUser: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\n \"GET /user/public_emails\",\n {},\n { renamed: [\"users\", \"listPublicEmailsForAuthenticatedUser\"] }\n ],\n listPublicEmailsForAuthenticatedUser: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\n \"GET /user/keys\",\n {},\n { renamed: [\"users\", \"listPublicSshKeysForAuthenticatedUser\"] }\n ],\n listPublicSshKeysForAuthenticatedUser: [\"GET /user/keys\"],\n listSocialAccountsForAuthenticatedUser: [\"GET /user/social_accounts\"],\n listSocialAccountsForUser: [\"GET /users/{username}/social_accounts\"],\n listSshSigningKeysForAuthenticatedUser: [\"GET /user/ssh_signing_keys\"],\n listSshSigningKeysForUser: [\"GET /users/{username}/ssh_signing_keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\n \"PATCH /user/email/visibility\",\n {},\n { renamed: [\"users\", \"setPrimaryEmailVisibilityForAuthenticatedUser\"] }\n ],\n setPrimaryEmailVisibilityForAuthenticatedUser: [\n \"PATCH /user/email/visibility\"\n ],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"]\n }\n};\nvar endpoints_default = Endpoints;\n\n// pkg/dist-src/endpoints-to-methods.js\nvar endpointMethodsMap = /* @__PURE__ */ new Map();\nfor (const [scope, endpoints] of Object.entries(endpoints_default)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign(\n {\n method,\n url\n },\n defaults\n );\n if (!endpointMethodsMap.has(scope)) {\n endpointMethodsMap.set(scope, /* @__PURE__ */ new Map());\n }\n endpointMethodsMap.get(scope).set(methodName, {\n scope,\n methodName,\n endpointDefaults,\n decorations\n });\n }\n}\nvar handler = {\n has({ scope }, methodName) {\n return endpointMethodsMap.get(scope).has(methodName);\n },\n getOwnPropertyDescriptor(target, methodName) {\n return {\n value: this.get(target, methodName),\n // ensures method is in the cache\n configurable: true,\n writable: true,\n enumerable: true\n };\n },\n defineProperty(target, methodName, descriptor) {\n Object.defineProperty(target.cache, methodName, descriptor);\n return true;\n },\n deleteProperty(target, methodName) {\n delete target.cache[methodName];\n return true;\n },\n ownKeys({ scope }) {\n return [...endpointMethodsMap.get(scope).keys()];\n },\n set(target, methodName, value) {\n return target.cache[methodName] = value;\n },\n get({ octokit, scope, cache }, methodName) {\n if (cache[methodName]) {\n return cache[methodName];\n }\n const method = endpointMethodsMap.get(scope).get(methodName);\n if (!method) {\n return void 0;\n }\n const { endpointDefaults, decorations } = method;\n if (decorations) {\n cache[methodName] = decorate(\n octokit,\n scope,\n methodName,\n endpointDefaults,\n decorations\n );\n } else {\n cache[methodName] = octokit.request.defaults(endpointDefaults);\n }\n return cache[methodName];\n }\n};\nfunction endpointsToMethods(octokit) {\n const newMethods = {};\n for (const scope of endpointMethodsMap.keys()) {\n newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler);\n }\n return newMethods;\n}\nfunction decorate(octokit, scope, methodName, defaults, decorations) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n function withDecorations(...args) {\n let options = requestWithDefaults.endpoint.merge(...args);\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: void 0\n });\n return requestWithDefaults(options);\n }\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(\n `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`\n );\n }\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n if (decorations.renamedParameters) {\n const options2 = requestWithDefaults.endpoint.merge(...args);\n for (const [name, alias] of Object.entries(\n decorations.renamedParameters\n )) {\n if (name in options2) {\n octokit.log.warn(\n `\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`\n );\n if (!(alias in options2)) {\n options2[alias] = options2[name];\n }\n delete options2[name];\n }\n }\n return requestWithDefaults(options2);\n }\n return requestWithDefaults(...args);\n }\n return Object.assign(withDecorations, requestWithDefaults);\n}\n\n// pkg/dist-src/index.js\nfunction restEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit);\n return {\n rest: api\n };\n}\nrestEndpointMethods.VERSION = VERSION;\nfunction legacyRestEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit);\n return {\n ...api,\n rest: api\n };\n}\nlegacyRestEndpointMethods.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n legacyRestEndpointMethods,\n restEndpointMethods\n});\n", "\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n composePaginateRest: () => composePaginateRest,\n isPaginatingEndpoint: () => isPaginatingEndpoint,\n paginateRest: () => paginateRest,\n paginatingEndpoints: () => paginatingEndpoints\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"9.2.2\";\n\n// pkg/dist-src/normalize-paginated-list-response.js\nfunction normalizePaginatedListResponse(response) {\n if (!response.data) {\n return {\n ...response,\n data: []\n };\n }\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization)\n return response;\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n response.data.total_count = totalCount;\n return response;\n}\n\n// pkg/dist-src/iterator.js\nfunction iterator(octokit, route, parameters) {\n const options = typeof route === \"function\" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url)\n return { done: true };\n try {\n const response = await requestMethod({ method, url, headers });\n const normalizedResponse = normalizePaginatedListResponse(response);\n url = ((normalizedResponse.headers.link || \"\").match(\n /<([^<>]+)>;\\s*rel=\"next\"/\n ) || [])[1];\n return { value: normalizedResponse };\n } catch (error) {\n if (error.status !== 409)\n throw error;\n url = \"\";\n return {\n value: {\n status: 200,\n headers: {},\n data: []\n }\n };\n }\n }\n })\n };\n}\n\n// pkg/dist-src/paginate.js\nfunction paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = void 0;\n }\n return gather(\n octokit,\n [],\n iterator(octokit, route, parameters)[Symbol.asyncIterator](),\n mapFn\n );\n}\nfunction gather(octokit, results, iterator2, mapFn) {\n return iterator2.next().then((result) => {\n if (result.done) {\n return results;\n }\n let earlyExit = false;\n function done() {\n earlyExit = true;\n }\n results = results.concat(\n mapFn ? mapFn(result.value, done) : result.value.data\n );\n if (earlyExit) {\n return results;\n }\n return gather(octokit, results, iterator2, mapFn);\n });\n}\n\n// pkg/dist-src/compose-paginate.js\nvar composePaginateRest = Object.assign(paginate, {\n iterator\n});\n\n// pkg/dist-src/generated/paginating-endpoints.js\nvar paginatingEndpoints = [\n \"GET /advisories\",\n \"GET /app/hook/deliveries\",\n \"GET /app/installation-requests\",\n \"GET /app/installations\",\n \"GET /assignments/{assignment_id}/accepted_assignments\",\n \"GET /classrooms\",\n \"GET /classrooms/{classroom_id}/assignments\",\n \"GET /enterprises/{enterprise}/dependabot/alerts\",\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n \"GET /events\",\n \"GET /gists\",\n \"GET /gists/public\",\n \"GET /gists/starred\",\n \"GET /gists/{gist_id}/comments\",\n \"GET /gists/{gist_id}/commits\",\n \"GET /gists/{gist_id}/forks\",\n \"GET /installation/repositories\",\n \"GET /issues\",\n \"GET /licenses\",\n \"GET /marketplace_listing/plans\",\n \"GET /marketplace_listing/plans/{plan_id}/accounts\",\n \"GET /marketplace_listing/stubbed/plans\",\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"GET /networks/{owner}/{repo}/events\",\n \"GET /notifications\",\n \"GET /organizations\",\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n \"GET /orgs/{org}/actions/permissions/repositories\",\n \"GET /orgs/{org}/actions/runners\",\n \"GET /orgs/{org}/actions/secrets\",\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/actions/variables\",\n \"GET /orgs/{org}/actions/variables/{name}/repositories\",\n \"GET /orgs/{org}/blocks\",\n \"GET /orgs/{org}/code-scanning/alerts\",\n \"GET /orgs/{org}/codespaces\",\n \"GET /orgs/{org}/codespaces/secrets\",\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/copilot/billing/seats\",\n \"GET /orgs/{org}/dependabot/alerts\",\n \"GET /orgs/{org}/dependabot/secrets\",\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/events\",\n \"GET /orgs/{org}/failed_invitations\",\n \"GET /orgs/{org}/hooks\",\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries\",\n \"GET /orgs/{org}/installations\",\n \"GET /orgs/{org}/invitations\",\n \"GET /orgs/{org}/invitations/{invitation_id}/teams\",\n \"GET /orgs/{org}/issues\",\n \"GET /orgs/{org}/members\",\n \"GET /orgs/{org}/members/{username}/codespaces\",\n \"GET /orgs/{org}/migrations\",\n \"GET /orgs/{org}/migrations/{migration_id}/repositories\",\n \"GET /orgs/{org}/organization-roles/{role_id}/teams\",\n \"GET /orgs/{org}/organization-roles/{role_id}/users\",\n \"GET /orgs/{org}/outside_collaborators\",\n \"GET /orgs/{org}/packages\",\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n \"GET /orgs/{org}/personal-access-token-requests\",\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\",\n \"GET /orgs/{org}/personal-access-tokens\",\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\",\n \"GET /orgs/{org}/projects\",\n \"GET /orgs/{org}/properties/values\",\n \"GET /orgs/{org}/public_members\",\n \"GET /orgs/{org}/repos\",\n \"GET /orgs/{org}/rulesets\",\n \"GET /orgs/{org}/rulesets/rule-suites\",\n \"GET /orgs/{org}/secret-scanning/alerts\",\n \"GET /orgs/{org}/security-advisories\",\n \"GET /orgs/{org}/teams\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n \"GET /orgs/{org}/teams/{team_slug}/members\",\n \"GET /orgs/{org}/teams/{team_slug}/projects\",\n \"GET /orgs/{org}/teams/{team_slug}/repos\",\n \"GET /orgs/{org}/teams/{team_slug}/teams\",\n \"GET /projects/columns/{column_id}/cards\",\n \"GET /projects/{project_id}/collaborators\",\n \"GET /projects/{project_id}/columns\",\n \"GET /repos/{owner}/{repo}/actions/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/caches\",\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\",\n \"GET /repos/{owner}/{repo}/actions/organization-variables\",\n \"GET /repos/{owner}/{repo}/actions/runners\",\n \"GET /repos/{owner}/{repo}/actions/runs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/secrets\",\n \"GET /repos/{owner}/{repo}/actions/variables\",\n \"GET /repos/{owner}/{repo}/actions/workflows\",\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n \"GET /repos/{owner}/{repo}/activity\",\n \"GET /repos/{owner}/{repo}/assignees\",\n \"GET /repos/{owner}/{repo}/branches\",\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n \"GET /repos/{owner}/{repo}/code-scanning/analyses\",\n \"GET /repos/{owner}/{repo}/codespaces\",\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n \"GET /repos/{owner}/{repo}/codespaces/secrets\",\n \"GET /repos/{owner}/{repo}/collaborators\",\n \"GET /repos/{owner}/{repo}/comments\",\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/commits\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/status\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n \"GET /repos/{owner}/{repo}/contributors\",\n \"GET /repos/{owner}/{repo}/dependabot/alerts\",\n \"GET /repos/{owner}/{repo}/dependabot/secrets\",\n \"GET /repos/{owner}/{repo}/deployments\",\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n \"GET /repos/{owner}/{repo}/environments\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\",\n \"GET /repos/{owner}/{repo}/events\",\n \"GET /repos/{owner}/{repo}/forks\",\n \"GET /repos/{owner}/{repo}/hooks\",\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n \"GET /repos/{owner}/{repo}/invitations\",\n \"GET /repos/{owner}/{repo}/issues\",\n \"GET /repos/{owner}/{repo}/issues/comments\",\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n \"GET /repos/{owner}/{repo}/keys\",\n \"GET /repos/{owner}/{repo}/labels\",\n \"GET /repos/{owner}/{repo}/milestones\",\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n \"GET /repos/{owner}/{repo}/notifications\",\n \"GET /repos/{owner}/{repo}/pages/builds\",\n \"GET /repos/{owner}/{repo}/projects\",\n \"GET /repos/{owner}/{repo}/pulls\",\n \"GET /repos/{owner}/{repo}/pulls/comments\",\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n \"GET /repos/{owner}/{repo}/releases\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n \"GET /repos/{owner}/{repo}/rules/branches/{branch}\",\n \"GET /repos/{owner}/{repo}/rulesets\",\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n \"GET /repos/{owner}/{repo}/security-advisories\",\n \"GET /repos/{owner}/{repo}/stargazers\",\n \"GET /repos/{owner}/{repo}/subscribers\",\n \"GET /repos/{owner}/{repo}/tags\",\n \"GET /repos/{owner}/{repo}/teams\",\n \"GET /repos/{owner}/{repo}/topics\",\n \"GET /repositories\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables\",\n \"GET /search/code\",\n \"GET /search/commits\",\n \"GET /search/issues\",\n \"GET /search/labels\",\n \"GET /search/repositories\",\n \"GET /search/topics\",\n \"GET /search/users\",\n \"GET /teams/{team_id}/discussions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/reactions\",\n \"GET /teams/{team_id}/invitations\",\n \"GET /teams/{team_id}/members\",\n \"GET /teams/{team_id}/projects\",\n \"GET /teams/{team_id}/repos\",\n \"GET /teams/{team_id}/teams\",\n \"GET /user/blocks\",\n \"GET /user/codespaces\",\n \"GET /user/codespaces/secrets\",\n \"GET /user/emails\",\n \"GET /user/followers\",\n \"GET /user/following\",\n \"GET /user/gpg_keys\",\n \"GET /user/installations\",\n \"GET /user/installations/{installation_id}/repositories\",\n \"GET /user/issues\",\n \"GET /user/keys\",\n \"GET /user/marketplace_purchases\",\n \"GET /user/marketplace_purchases/stubbed\",\n \"GET /user/memberships/orgs\",\n \"GET /user/migrations\",\n \"GET /user/migrations/{migration_id}/repositories\",\n \"GET /user/orgs\",\n \"GET /user/packages\",\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n \"GET /user/public_emails\",\n \"GET /user/repos\",\n \"GET /user/repository_invitations\",\n \"GET /user/social_accounts\",\n \"GET /user/ssh_signing_keys\",\n \"GET /user/starred\",\n \"GET /user/subscriptions\",\n \"GET /user/teams\",\n \"GET /users\",\n \"GET /users/{username}/events\",\n \"GET /users/{username}/events/orgs/{org}\",\n \"GET /users/{username}/events/public\",\n \"GET /users/{username}/followers\",\n \"GET /users/{username}/following\",\n \"GET /users/{username}/gists\",\n \"GET /users/{username}/gpg_keys\",\n \"GET /users/{username}/keys\",\n \"GET /users/{username}/orgs\",\n \"GET /users/{username}/packages\",\n \"GET /users/{username}/projects\",\n \"GET /users/{username}/received_events\",\n \"GET /users/{username}/received_events/public\",\n \"GET /users/{username}/repos\",\n \"GET /users/{username}/social_accounts\",\n \"GET /users/{username}/ssh_signing_keys\",\n \"GET /users/{username}/starred\",\n \"GET /users/{username}/subscriptions\"\n];\n\n// pkg/dist-src/paginating-endpoints.js\nfunction isPaginatingEndpoint(arg) {\n if (typeof arg === \"string\") {\n return paginatingEndpoints.includes(arg);\n } else {\n return false;\n }\n}\n\n// pkg/dist-src/index.js\nfunction paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit)\n })\n };\n}\npaginateRest.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n composePaginateRest,\n isPaginatingEndpoint,\n paginateRest,\n paginatingEndpoints\n});\n", null, null, null, null, null, null, null, null, null, null, null, null, "/* global define */\n\n(function (root, pluralize) {\n /* istanbul ignore else */\n if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') {\n // Node.\n module.exports = pluralize();\n } else if (typeof define === 'function' && define.amd) {\n // AMD, registers as an anonymous module.\n define(function () {\n return pluralize();\n });\n } else {\n // Browser global.\n root.pluralize = pluralize();\n }\n})(this, function () {\n // Rule storage - pluralize and singularize need to be run sequentially,\n // while other rules can be optimized using an object for instant lookups.\n var pluralRules = [];\n var singularRules = [];\n var uncountables = {};\n var irregularPlurals = {};\n var irregularSingles = {};\n\n /**\n * Sanitize a pluralization rule to a usable regular expression.\n *\n * @param {(RegExp|string)} rule\n * @return {RegExp}\n */\n function sanitizeRule (rule) {\n if (typeof rule === 'string') {\n return new RegExp('^' + rule + '$', 'i');\n }\n\n return rule;\n }\n\n /**\n * Pass in a word token to produce a function that can replicate the case on\n * another word.\n *\n * @param {string} word\n * @param {string} token\n * @return {Function}\n */\n function restoreCase (word, token) {\n // Tokens are an exact match.\n if (word === token) return token;\n\n // Lower cased words. E.g. \"hello\".\n if (word === word.toLowerCase()) return token.toLowerCase();\n\n // Upper cased words. E.g. \"WHISKY\".\n if (word === word.toUpperCase()) return token.toUpperCase();\n\n // Title cased words. E.g. \"Title\".\n if (word[0] === word[0].toUpperCase()) {\n return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();\n }\n\n // Lower cased words. E.g. \"test\".\n return token.toLowerCase();\n }\n\n /**\n * Interpolate a regexp string.\n *\n * @param {string} str\n * @param {Array} args\n * @return {string}\n */\n function interpolate (str, args) {\n return str.replace(/\\$(\\d{1,2})/g, function (match, index) {\n return args[index] || '';\n });\n }\n\n /**\n * Replace a word using a rule.\n *\n * @param {string} word\n * @param {Array} rule\n * @return {string}\n */\n function replace (word, rule) {\n return word.replace(rule[0], function (match, index) {\n var result = interpolate(rule[1], arguments);\n\n if (match === '') {\n return restoreCase(word[index - 1], result);\n }\n\n return restoreCase(match, result);\n });\n }\n\n /**\n * Sanitize a word by passing in the word and sanitization rules.\n *\n * @param {string} token\n * @param {string} word\n * @param {Array} rules\n * @return {string}\n */\n function sanitizeWord (token, word, rules) {\n // Empty string or doesn't need fixing.\n if (!token.length || uncountables.hasOwnProperty(token)) {\n return word;\n }\n\n var len = rules.length;\n\n // Iterate over the sanitization rules and use the first one to match.\n while (len--) {\n var rule = rules[len];\n\n if (rule[0].test(word)) return replace(word, rule);\n }\n\n return word;\n }\n\n /**\n * Replace a word with the updated word.\n *\n * @param {Object} replaceMap\n * @param {Object} keepMap\n * @param {Array} rules\n * @return {Function}\n */\n function replaceWord (replaceMap, keepMap, rules) {\n return function (word) {\n // Get the correct token and case restoration functions.\n var token = word.toLowerCase();\n\n // Check against the keep object map.\n if (keepMap.hasOwnProperty(token)) {\n return restoreCase(word, token);\n }\n\n // Check against the replacement map for a direct word replacement.\n if (replaceMap.hasOwnProperty(token)) {\n return restoreCase(word, replaceMap[token]);\n }\n\n // Run all the rules against the word.\n return sanitizeWord(token, word, rules);\n };\n }\n\n /**\n * Check if a word is part of the map.\n */\n function checkWord (replaceMap, keepMap, rules, bool) {\n return function (word) {\n var token = word.toLowerCase();\n\n if (keepMap.hasOwnProperty(token)) return true;\n if (replaceMap.hasOwnProperty(token)) return false;\n\n return sanitizeWord(token, token, rules) === token;\n };\n }\n\n /**\n * Pluralize or singularize a word based on the passed in count.\n *\n * @param {string} word The word to pluralize\n * @param {number} count How many of the word exist\n * @param {boolean} inclusive Whether to prefix with the number (e.g. 3 ducks)\n * @return {string}\n */\n function pluralize (word, count, inclusive) {\n var pluralized = count === 1\n ? pluralize.singular(word) : pluralize.plural(word);\n\n return (inclusive ? count + ' ' : '') + pluralized;\n }\n\n /**\n * Pluralize a word.\n *\n * @type {Function}\n */\n pluralize.plural = replaceWord(\n irregularSingles, irregularPlurals, pluralRules\n );\n\n /**\n * Check if a word is plural.\n *\n * @type {Function}\n */\n pluralize.isPlural = checkWord(\n irregularSingles, irregularPlurals, pluralRules\n );\n\n /**\n * Singularize a word.\n *\n * @type {Function}\n */\n pluralize.singular = replaceWord(\n irregularPlurals, irregularSingles, singularRules\n );\n\n /**\n * Check if a word is singular.\n *\n * @type {Function}\n */\n pluralize.isSingular = checkWord(\n irregularPlurals, irregularSingles, singularRules\n );\n\n /**\n * Add a pluralization rule to the collection.\n *\n * @param {(string|RegExp)} rule\n * @param {string} replacement\n */\n pluralize.addPluralRule = function (rule, replacement) {\n pluralRules.push([sanitizeRule(rule), replacement]);\n };\n\n /**\n * Add a singularization rule to the collection.\n *\n * @param {(string|RegExp)} rule\n * @param {string} replacement\n */\n pluralize.addSingularRule = function (rule, replacement) {\n singularRules.push([sanitizeRule(rule), replacement]);\n };\n\n /**\n * Add an uncountable word rule.\n *\n * @param {(string|RegExp)} word\n */\n pluralize.addUncountableRule = function (word) {\n if (typeof word === 'string') {\n uncountables[word.toLowerCase()] = true;\n return;\n }\n\n // Set singular and plural references for the word.\n pluralize.addPluralRule(word, '$0');\n pluralize.addSingularRule(word, '$0');\n };\n\n /**\n * Add an irregular word definition.\n *\n * @param {string} single\n * @param {string} plural\n */\n pluralize.addIrregularRule = function (single, plural) {\n plural = plural.toLowerCase();\n single = single.toLowerCase();\n\n irregularSingles[single] = plural;\n irregularPlurals[plural] = single;\n };\n\n /**\n * Irregular rules.\n */\n [\n // Pronouns.\n ['I', 'we'],\n ['me', 'us'],\n ['he', 'they'],\n ['she', 'they'],\n ['them', 'them'],\n ['myself', 'ourselves'],\n ['yourself', 'yourselves'],\n ['itself', 'themselves'],\n ['herself', 'themselves'],\n ['himself', 'themselves'],\n ['themself', 'themselves'],\n ['is', 'are'],\n ['was', 'were'],\n ['has', 'have'],\n ['this', 'these'],\n ['that', 'those'],\n // Words ending in with a consonant and `o`.\n ['echo', 'echoes'],\n ['dingo', 'dingoes'],\n ['volcano', 'volcanoes'],\n ['tornado', 'tornadoes'],\n ['torpedo', 'torpedoes'],\n // Ends with `us`.\n ['genus', 'genera'],\n ['viscus', 'viscera'],\n // Ends with `ma`.\n ['stigma', 'stigmata'],\n ['stoma', 'stomata'],\n ['dogma', 'dogmata'],\n ['lemma', 'lemmata'],\n ['schema', 'schemata'],\n ['anathema', 'anathemata'],\n // Other irregular rules.\n ['ox', 'oxen'],\n ['axe', 'axes'],\n ['die', 'dice'],\n ['yes', 'yeses'],\n ['foot', 'feet'],\n ['eave', 'eaves'],\n ['goose', 'geese'],\n ['tooth', 'teeth'],\n ['quiz', 'quizzes'],\n ['human', 'humans'],\n ['proof', 'proofs'],\n ['carve', 'carves'],\n ['valve', 'valves'],\n ['looey', 'looies'],\n ['thief', 'thieves'],\n ['groove', 'grooves'],\n ['pickaxe', 'pickaxes'],\n ['passerby', 'passersby']\n ].forEach(function (rule) {\n return pluralize.addIrregularRule(rule[0], rule[1]);\n });\n\n /**\n * Pluralization rules.\n */\n [\n [/s?$/i, 's'],\n [/[^\\u0000-\\u007F]$/i, '$0'],\n [/([^aeiou]ese)$/i, '$1'],\n [/(ax|test)is$/i, '$1es'],\n [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, '$1es'],\n [/(e[mn]u)s?$/i, '$1s'],\n [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, '$1'],\n [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1i'],\n [/(alumn|alg|vertebr)(?:a|ae)$/i, '$1ae'],\n [/(seraph|cherub)(?:im)?$/i, '$1im'],\n [/(her|at|gr)o$/i, '$1oes'],\n [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, '$1a'],\n [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, '$1a'],\n [/sis$/i, 'ses'],\n [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, '$1$2ves'],\n [/([^aeiouy]|qu)y$/i, '$1ies'],\n [/([^ch][ieo][ln])ey$/i, '$1ies'],\n [/(x|ch|ss|sh|zz)$/i, '$1es'],\n [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, '$1ices'],\n [/\\b((?:tit)?m|l)(?:ice|ouse)$/i, '$1ice'],\n [/(pe)(?:rson|ople)$/i, '$1ople'],\n [/(child)(?:ren)?$/i, '$1ren'],\n [/eaux$/i, '$0'],\n [/m[ae]n$/i, 'men'],\n ['thou', 'you']\n ].forEach(function (rule) {\n return pluralize.addPluralRule(rule[0], rule[1]);\n });\n\n /**\n * Singularization rules.\n */\n [\n [/s$/i, ''],\n [/(ss)$/i, '$1'],\n [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\\w]|^)li)ves$/i, '$1fe'],\n [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, '$1f'],\n [/ies$/i, 'y'],\n [/\\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, '$1ie'],\n [/\\b(mon|smil)ies$/i, '$1ey'],\n [/\\b((?:tit)?m|l)ice$/i, '$1ouse'],\n [/(seraph|cherub)im$/i, '$1'],\n [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, '$1'],\n [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, '$1sis'],\n [/(movie|twelve|abuse|e[mn]u)s$/i, '$1'],\n [/(test)(?:is|es)$/i, '$1is'],\n [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1us'],\n [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, '$1um'],\n [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, '$1on'],\n [/(alumn|alg|vertebr)ae$/i, '$1a'],\n [/(cod|mur|sil|vert|ind)ices$/i, '$1ex'],\n [/(matr|append)ices$/i, '$1ix'],\n [/(pe)(rson|ople)$/i, '$1rson'],\n [/(child)ren$/i, '$1'],\n [/(eau)x?$/i, '$1'],\n [/men$/i, 'man']\n ].forEach(function (rule) {\n return pluralize.addSingularRule(rule[0], rule[1]);\n });\n\n /**\n * Uncountable rules.\n */\n [\n // Singular words with no plurals.\n 'adulthood',\n 'advice',\n 'agenda',\n 'aid',\n 'aircraft',\n 'alcohol',\n 'ammo',\n 'analytics',\n 'anime',\n 'athletics',\n 'audio',\n 'bison',\n 'blood',\n 'bream',\n 'buffalo',\n 'butter',\n 'carp',\n 'cash',\n 'chassis',\n 'chess',\n 'clothing',\n 'cod',\n 'commerce',\n 'cooperation',\n 'corps',\n 'debris',\n 'diabetes',\n 'digestion',\n 'elk',\n 'energy',\n 'equipment',\n 'excretion',\n 'expertise',\n 'firmware',\n 'flounder',\n 'fun',\n 'gallows',\n 'garbage',\n 'graffiti',\n 'hardware',\n 'headquarters',\n 'health',\n 'herpes',\n 'highjinks',\n 'homework',\n 'housework',\n 'information',\n 'jeans',\n 'justice',\n 'kudos',\n 'labour',\n 'literature',\n 'machinery',\n 'mackerel',\n 'mail',\n 'media',\n 'mews',\n 'moose',\n 'music',\n 'mud',\n 'manga',\n 'news',\n 'only',\n 'personnel',\n 'pike',\n 'plankton',\n 'pliers',\n 'police',\n 'pollution',\n 'premises',\n 'rain',\n 'research',\n 'rice',\n 'salmon',\n 'scissors',\n 'series',\n 'sewage',\n 'shambles',\n 'shrimp',\n 'software',\n 'species',\n 'staff',\n 'swine',\n 'tennis',\n 'traffic',\n 'transportation',\n 'trout',\n 'tuna',\n 'wealth',\n 'welfare',\n 'whiting',\n 'wildebeest',\n 'wildlife',\n 'you',\n /pok[e\u00E9]mon$/i,\n // Regexes.\n /[^aeiou]ese$/i, // \"chinese\", \"japanese\"\n /deer$/i, // \"deer\", \"reindeer\"\n /fish$/i, // \"fish\", \"blowfish\", \"angelfish\"\n /measles$/i,\n /o[iu]s$/i, // \"carnivorous\"\n /pox$/i, // \"chickpox\", \"smallpox\"\n /sheep$/i\n ].forEach(pluralize.addUncountableRule);\n\n return pluralize;\n});\n", null, "'use strict';\n\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\nconst DEFAULT_MAX_EXTGLOB_RECURSION = 0;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\nconst SEP = '/';\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR,\n SEP\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,\n SEP: '\\\\'\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n __proto__: null,\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n DEFAULT_MAX_EXTGLOB_RECURSION,\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n __proto__: null,\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n", "/*global navigator*/\n'use strict';\n\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.isWindows = () => {\n if (typeof navigator !== 'undefined' && navigator.platform) {\n const platform = navigator.platform.toLowerCase();\n return platform === 'win32' || platform === 'windows';\n }\n\n if (typeof process !== 'undefined' && process.platform) {\n return process.platform === 'win32';\n }\n\n return false;\n};\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n\nexports.basename = (path, { windows } = {}) => {\n const segs = path.split(windows ? /[\\\\/]/ : '/');\n const last = segs[segs.length - 1];\n\n if (last === '') {\n return segs[segs.length - 2];\n }\n\n return last;\n};\n", "'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not\n * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let negatedExtglob = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n if (code === CHAR_EXCLAMATION_MARK && index === start) {\n negatedExtglob = true;\n }\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_LEFT_PARENTHESES) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated,\n negatedExtglob\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n", "'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\nconst splitTopLevel = input => {\n const parts = [];\n let bracket = 0;\n let paren = 0;\n let quote = 0;\n let value = '';\n let escaped = false;\n\n for (const ch of input) {\n if (escaped === true) {\n value += ch;\n escaped = false;\n continue;\n }\n\n if (ch === '\\\\') {\n value += ch;\n escaped = true;\n continue;\n }\n\n if (ch === '\"') {\n quote = quote === 1 ? 0 : 1;\n value += ch;\n continue;\n }\n\n if (quote === 0) {\n if (ch === '[') {\n bracket++;\n } else if (ch === ']' && bracket > 0) {\n bracket--;\n } else if (bracket === 0) {\n if (ch === '(') {\n paren++;\n } else if (ch === ')' && paren > 0) {\n paren--;\n } else if (ch === '|' && paren === 0) {\n parts.push(value);\n value = '';\n continue;\n }\n }\n }\n\n value += ch;\n }\n\n parts.push(value);\n return parts;\n};\n\nconst isPlainBranch = branch => {\n let escaped = false;\n\n for (const ch of branch) {\n if (escaped === true) {\n escaped = false;\n continue;\n }\n\n if (ch === '\\\\') {\n escaped = true;\n continue;\n }\n\n if (/[?*+@!()[\\]{}]/.test(ch)) {\n return false;\n }\n }\n\n return true;\n};\n\nconst normalizeSimpleBranch = branch => {\n let value = branch.trim();\n let changed = true;\n\n while (changed === true) {\n changed = false;\n\n if (/^@\\([^\\\\()[\\]{}|]+\\)$/.test(value)) {\n value = value.slice(2, -1);\n changed = true;\n }\n }\n\n if (!isPlainBranch(value)) {\n return;\n }\n\n return value.replace(/\\\\(.)/g, '$1');\n};\n\nconst hasRepeatedCharPrefixOverlap = branches => {\n const values = branches.map(normalizeSimpleBranch).filter(Boolean);\n\n for (let i = 0; i < values.length; i++) {\n for (let j = i + 1; j < values.length; j++) {\n const a = values[i];\n const b = values[j];\n const char = a[0];\n\n if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {\n continue;\n }\n\n if (a === b || a.startsWith(b) || b.startsWith(a)) {\n return true;\n }\n }\n }\n\n return false;\n};\n\nconst parseRepeatedExtglob = (pattern, requireEnd = true) => {\n if ((pattern[0] !== '+' && pattern[0] !== '*') || pattern[1] !== '(') {\n return;\n }\n\n let bracket = 0;\n let paren = 0;\n let quote = 0;\n let escaped = false;\n\n for (let i = 1; i < pattern.length; i++) {\n const ch = pattern[i];\n\n if (escaped === true) {\n escaped = false;\n continue;\n }\n\n if (ch === '\\\\') {\n escaped = true;\n continue;\n }\n\n if (ch === '\"') {\n quote = quote === 1 ? 0 : 1;\n continue;\n }\n\n if (quote === 1) {\n continue;\n }\n\n if (ch === '[') {\n bracket++;\n continue;\n }\n\n if (ch === ']' && bracket > 0) {\n bracket--;\n continue;\n }\n\n if (bracket > 0) {\n continue;\n }\n\n if (ch === '(') {\n paren++;\n continue;\n }\n\n if (ch === ')') {\n paren--;\n\n if (paren === 0) {\n if (requireEnd === true && i !== pattern.length - 1) {\n return;\n }\n\n return {\n type: pattern[0],\n body: pattern.slice(2, i),\n end: i\n };\n }\n }\n }\n};\n\nconst getStarExtglobSequenceOutput = pattern => {\n let index = 0;\n const chars = [];\n\n while (index < pattern.length) {\n const match = parseRepeatedExtglob(pattern.slice(index), false);\n\n if (!match || match.type !== '*') {\n return;\n }\n\n const branches = splitTopLevel(match.body).map(branch => branch.trim());\n if (branches.length !== 1) {\n return;\n }\n\n const branch = normalizeSimpleBranch(branches[0]);\n if (!branch || branch.length !== 1) {\n return;\n }\n\n chars.push(branch);\n index += match.end + 1;\n }\n\n if (chars.length < 1) {\n return;\n }\n\n const source = chars.length === 1\n ? utils.escapeRegex(chars[0])\n : `[${chars.map(ch => utils.escapeRegex(ch)).join('')}]`;\n\n return `${source}*`;\n};\n\nconst repeatedExtglobRecursion = pattern => {\n let depth = 0;\n let value = pattern.trim();\n let match = parseRepeatedExtglob(value);\n\n while (match) {\n depth++;\n value = match.body.trim();\n match = parseRepeatedExtglob(value);\n }\n\n return depth;\n};\n\nconst analyzeRepeatedExtglob = (body, options) => {\n if (options.maxExtglobRecursion === false) {\n return { risky: false };\n }\n\n const max =\n typeof options.maxExtglobRecursion === 'number'\n ? options.maxExtglobRecursion\n : constants.DEFAULT_MAX_EXTGLOB_RECURSION;\n\n const branches = splitTopLevel(body).map(branch => branch.trim());\n\n if (branches.length > 1) {\n if (\n branches.some(branch => branch === '') ||\n branches.some(branch => /^[*?]+$/.test(branch)) ||\n hasRepeatedCharPrefixOverlap(branches)\n ) {\n return { risky: true };\n }\n }\n\n for (const branch of branches) {\n const safeOutput = getStarExtglobSequenceOutput(branch);\n if (safeOutput) {\n return { risky: true, safeOutput };\n }\n\n if (repeatedExtglobRecursion(branch) > max) {\n return { risky: true };\n }\n }\n\n return { risky: false };\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(opts.windows);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = opts => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index] || '';\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren') {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.output = (prev.output || prev.value) + tok.value;\n prev.value += tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n token.startIndex = state.index;\n token.tokensIndex = tokens.length;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n const literal = input.slice(token.startIndex, state.index + 1);\n const body = input.slice(token.startIndex + 2, state.index);\n const analysis = analyzeRepeatedExtglob(body, opts);\n\n if ((token.type === 'plus' || token.type === 'star') && analysis.risky) {\n const safeOutput = analysis.safeOutput\n ? (token.output ? '' : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput)\n : undefined;\n const open = tokens[token.tokensIndex];\n\n open.type = 'text';\n open.value = literal;\n open.output = safeOutput || utils.escapeRegex(literal);\n\n for (let i = token.tokensIndex + 1; i < tokens.length; i++) {\n tokens[i].value = '';\n tokens[i].output = '';\n delete tokens[i].suffix;\n }\n\n state.output = token.output + open.output;\n state.backtrack = true;\n\n push({ type: 'paren', extglob: true, value, output: '' });\n decrement('parens');\n return;\n }\n\n let output = token.close + (opts.capture ? ')' : '');\n let rest;\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.inner.includes('*') && (rest = remaining()) && /^\\.[^\\\\/.]+$/.test(rest)) {\n // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.\n // In this case, we need to parse the string and use it in the output of the original pattern.\n // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.\n //\n // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.\n const expression = parse(rest, { ...options, fastpaths: false }).output;\n\n output = token.close = `)${expression})${extglobStar})`;\n }\n\n if (token.prev.type === 'bos') {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance();\n } else {\n value += advance();\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = '\\\\}';\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(opts.windows);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = opts => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n", "'use strict';\n\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = opts.windows;\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(utils.basename(input));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Compile a regular expression from the `state` object returned by the\n * [parse()](#parse) method.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const state = picomatch.parse('*.js');\n * // picomatch.compileRe(state[, options]);\n *\n * console.log(picomatch.compileRe(state));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {Object} `state`\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.\n * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.\n * @return {RegExp}\n * @api public\n */\n\npicomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return state.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${state.output})${append}`;\n if (state && state.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = state;\n }\n\n return regex;\n};\n\n/**\n * Create a regular expression from a parsed glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.makeRe(state[, options]);\n *\n * const result = picomatch.makeRe('*.js');\n * console.log(result);\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `state` The object returned from the `.parse` method.\n * @param {Object} `options`\n * @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.\n * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n let parsed = { negated: false, fastpaths: true };\n\n if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n parsed.output = parse.fastpaths(input, options);\n }\n\n if (!parsed.output) {\n parsed = parse(input, options);\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n", "'use strict';\n\nconst pico = require('./lib/picomatch');\nconst utils = require('./lib/utils');\n\nfunction picomatch(glob, options, returnState = false) {\n // default to os.platform()\n if (options && (options.windows === null || options.windows === undefined)) {\n // don't mutate the original options object\n options = { ...options, windows: utils.isWindows() };\n }\n\n return pico(glob, options, returnState);\n}\n\nObject.assign(picomatch, pico);\nmodule.exports = picomatch;\n", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "var he={hide:{type:\"boolean\",default:!1},component:{type:\"string\",enum:[\"radio\",\"checkbox\"],default:\"checkbox\"},label:{type:\"string\"},items:{type:\"array\",items:{type:\"string\"}}},E={type:\"object\",properties:he,additionalProperties:!1},Ue={type:\"object\",properties:{hide:{type:\"boolean\",default:!1},label:{type:\"string\"},placeholder:{type:\"string\"}},additionalProperties:!1},a={type:\"object\",properties:{hide:{type:\"boolean\",default:!1},type:{type:\"string\",enum:[\"rating\",\"sentiment\",\"comment\",\"reasons\",\"mood\",\"scale\"],default:\"sentiment\"},settings:{type:\"object\",properties:{label:{type:\"string\"},submitText:{type:\"string\"},buttonText:{type:\"string\"},component:{type:\"string\",enum:[\"radio\",\"checkbox\"],default:\"checkbox\"},items:{type:\"array\",items:{type:\"string\"},minItems:1},leftScaleLabel:{type:\"string\"},rightScaleLabel:{type:\"string\"},reasons:{type:\"object\",properties:{...he,like:E,dislike:E,satisfied:E,neutral:E,dissatisfied:E},additionalProperties:!1},comment:{type:\"object\",properties:{hide:{type:\"boolean\",default:!1},label:{type:\"string\"},likeLabel:{type:\"string\"},dislikeLabel:{type:\"string\"},satisfiedLabel:{type:\"string\"},neutralLabel:{type:\"string\"},dissatisfiedLabel:{type:\"string\"}},additionalProperties:!1},optionalEmail:Ue},additionalProperties:!1}},additionalProperties:!1};var Fe={type:\"object\",properties:{languages:{type:\"array\",items:{type:\"object\",properties:{lang:{type:\"string\",examples:[\"curl\",\"JavaScript\",\"Node.js\",\"Python\",\"Java8+Apache\",\"Java\",\"C#\",\"C#+Newtonsoft\",\"PHP\",\"Go\",\"Ruby\",\"R\",\"Payload\"]},label:{type:\"string\"},options:{type:\"object\",properties:{indent:{type:\"string\"},withImports:{type:\"boolean\"},withComments:{type:\"boolean\"},binary:{type:\"boolean\"},credentials:{type:\"string\",enum:[\"omit\",\"same-origin\",\"include\"]}},additionalProperties:!1}},required:[\"lang\"],additionalProperties:!1}},skipOptionalParameters:{type:\"boolean\"},withOAuth2Call:{type:\"boolean\"}},additionalProperties:!1},R={type:\"array\",items:{type:\"object\",properties:{title:{type:\"string\"},url:{type:\"string\"}},required:[\"url\"],additionalProperties:!1}},S={type:\"object\",properties:{licenseKey:{type:\"string\"},hideLoading:{type:\"boolean\"},disableRouter:{type:\"boolean\"},hideSidebar:{type:\"boolean\"},feedback:a,hideReplay:{type:\"boolean\"},oAuth2RedirectURI:{type:\"string\",nullable:!0},corsProxyUrl:{type:\"string\"},sortRequiredPropsFirst:{type:\"boolean\"},sanitize:{type:\"boolean\"},hideDownloadButtons:{type:\"boolean\"},downloadUrls:R,onlyRequiredInSamples:{type:\"boolean\"},generatedSamplesMaxDepth:{oneOf:[{type:\"number\"},{type:\"string\"}]},showExtensions:{oneOf:[{type:\"boolean\"},{type:\"string\"},{type:\"array\",items:{type:\"string\"}}]},hideSchemaTitles:{type:\"boolean\"},jsonSamplesExpandLevel:{oneOf:[{type:\"number\"},{type:\"string\"}]},schemasExpansionLevel:{oneOf:[{type:\"number\"},{type:\"string\"}]},mockServer:{type:\"object\",properties:{url:{type:\"string\"},position:{type:\"string\",enum:[\"first\",\"last\",\"replace\",\"off\"]},description:{type:\"string\"}}},maxDisplayedEnumValues:{type:\"number\"},schemaDefinitionsTagName:{type:\"string\"},layout:{type:\"string\",enum:[\"stacked\",\"three-panel\"]},hideInfoMetadata:{type:\"boolean\"},events:{type:\"object\"},skipBundle:{type:\"boolean\"},routingBasePath:{type:\"string\"},codeSamples:Fe,ignoreNamedSchemas:{oneOf:[{type:\"array\",items:{type:\"string\"}},{type:\"string\"}]},hidePropertiesPrefix:{type:\"boolean\"},excludeFromSearch:{type:\"boolean\"},showSchemaCatalogLinks:{type:\"boolean\"}},additionalProperties:!1};var C={type:\"object\",properties:{includeByName:{type:\"array\",items:{type:\"string\"}},excludeByName:{type:\"array\",items:{type:\"string\"}}},additionalProperties:!1},ze={type:\"object\",properties:{name:{type:\"string\"},items:C,queries:C,mutations:C,subscriptions:C,types:C,directives:C},required:[\"name\"],additionalProperties:!1},Ge={type:\"object\",properties:{requireExactGroups:{type:\"boolean\"},groups:{type:\"array\",items:ze},otherItemsGroupName:{type:\"string\"}},required:[\"requireExactGroups\",\"groups\",\"otherItemsGroupName\"],additionalProperties:!1},Ye={type:\"object\",properties:{name:{type:\"string\"},url:{type:\"string\",format:\"uri\"},email:{type:\"string\",format:\"email\"}},additionalProperties:!1},Ke={type:\"object\",properties:{name:{type:\"string\"},url:{type:\"string\",format:\"uri\"},identifier:{type:\"string\"}},additionalProperties:!1},He={type:\"object\",properties:{title:{type:\"string\"},version:{type:\"string\"},description:{type:\"string\"},termsOfService:{type:\"string\",format:\"uri\"},contact:Ye,license:Ke},additionalProperties:!1},P={type:\"object\",properties:{menu:{type:\"object\",properties:{...Ge.properties},additionalProperties:!1},sidebar:{type:\"object\",properties:{hide:{type:\"boolean\"}}},downloadUrls:R,apiLogo:{type:\"object\",properties:{imageUrl:{type:\"string\"},href:{type:\"string\"},altText:{type:\"string\"},backgroundColor:{type:\"string\"}}},jsonSamplesDepth:{type:\"number\"},samplesMaxInlineArgs:{type:\"number\"},licenseKey:{type:\"string\"},fieldExpandLevel:{type:\"number\"},baseUrlPath:{type:\"string\"},metadata:{type:\"object\",properties:{apiId:{type:\"string\"}},additionalProperties:!0},feedback:a,layout:{type:\"string\",enum:[\"stacked\",\"three-panel\"]},showBuiltInScalars:{type:\"boolean\"},showBuiltInDirectives:{type:\"boolean\"},info:He},additionalProperties:!1};var Se={type:\"object\",properties:{downloadUrls:R,apiLogo:{type:\"object\",properties:{imageUrl:{type:\"string\"},href:{type:\"string\"},altText:{type:\"string\"},backgroundColor:{type:\"string\"}}},jsonSamplesDepth:{type:\"number\"},samplesMaxInlineArgs:{type:\"number\"},fieldExpandLevel:{type:\"number\"},baseUrlPath:{type:\"string\"},metadata:{type:\"object\",properties:{apiId:{type:\"string\"}},additionalProperties:!0},feedback:a,layout:{type:\"string\",enum:[\"stacked\",\"three-panel\"]}},additionalProperties:!1};var We={type:\"object\",properties:{label:{type:\"string\"},lang:{enum:[\"curl\",\"C#\",\"Go\",\"Java\",\"Java8+Apache\",\"JavaScript\",\"Node.js\",\"PHP\",\"Python\",\"R\",\"Ruby\"]}},required:[\"lang\"]},Ve={type:\"object\",properties:{enum:{type:\"string\"},enumSingleValue:{type:\"string\"},enumArray:{type:\"string\"},default:{type:\"string\"},deprecated:{type:\"string\"},example:{type:\"string\"},examples:{type:\"string\"},nullable:{type:\"string\"},recursive:{type:\"string\"},arrayOf:{type:\"string\"},webhook:{type:\"string\"},authorizations:{type:\"string\"},tryItAuthBasicUsername:{type:\"string\"},tryItAuthBasicPassword:{type:\"string\"}}},Ce={type:\"object\",properties:{label:{type:\"string\"},link:{type:\"string\"},target:{type:\"string\"}},required:[\"label\",\"link\"]},$e={type:\"object\",properties:{beforeInfo:{type:\"array\",items:Ce},end:{type:\"array\",items:Ce}}},u={type:\"object\",properties:{main:{type:\"string\"},light:{type:\"string\"},dark:{type:\"string\"},contrastText:{type:\"string\"}}},A={type:\"object\",properties:{backgroundColor:{type:\"string\"},borderColor:{type:\"string\"},color:{type:\"string\"},tabTextColor:{type:\"string\"}}},Je={type:\"object\",properties:D(u.properties,[\"light\",\"dark\"])},Xe={type:\"object\",properties:{basic:{type:\"string\"},delete:{type:\"string\"},get:{type:\"string\"},head:{type:\"string\"},link:{type:\"string\"},options:{type:\"string\"},patch:{type:\"string\"},post:{type:\"string\"},put:{type:\"string\"}}},Qe={type:\"object\",properties:{error:A,info:A,redirect:A,success:A}},Ze={type:\"object\",properties:j(u.properties,[\"dark\"])},et={type:\"object\",properties:{primary:{type:\"string\"},secondary:{type:\"string\"},light:{type:\"string\"}}},tt={type:\"object\",properties:{accent:u,border:Je,error:u,http:Xe,primary:u,responses:Qe,secondary:Ze,success:u,text:et,tonalOffset:{type:\"number\"},warning:u}},L={type:\"object\",properties:{fontSize:{type:\"string\"},padding:{type:\"string\"},minWidth:{type:\"string\"}}},rt={type:\"object\",properties:{small:L,medium:L,large:L,xlarge:L}},n={type:\"object\",properties:{fontFamily:{type:\"string\"},fontSize:{type:\"string\"},fontWeight:{type:\"string\"},lineHeight:{type:\"string\"}}},ot={type:\"object\",properties:{...j(n.properties,[\"fontSize\",\"lineHeight\"]),borderRadius:{type:\"string\"},hoverStyle:{type:\"string\"},boxShadow:{type:\"string\"},hoverBoxShadow:{type:\"string\"},sizes:rt}},Pe={type:\"object\",properties:D(n.properties,[\"fontSize\",\"lineHeight\"])},it={type:\"object\",properties:{medium:Pe,small:Pe}},st={type:\"object\",properties:{...j(n.properties,[\"fontSize\",\"lineHeight\"]),borderRadius:{type:\"string\"},color:{type:\"string\"},sizes:it}},at={type:\"object\",properties:{top:{type:\"string\"},width:{type:\"string\"},height:{type:\"string\"}}},nt={type:\"object\",properties:{borderRadius:{type:\"string\"},backgroundColor:{type:\"string\"}}},je={type:\"object\",properties:{fullWidth:{type:\"boolean\"}}},pt={type:\"object\",properties:{buttons:ot,httpBadges:st,layoutControls:at,panels:nt,tryItButton:je,tryItSendButton:je}},N={type:\"object\",properties:{small:{type:\"string\"},medium:{type:\"string\"},large:{type:\"string\"}}},ct={type:\"object\",properties:{maxWidth:N}},lt={type:\"object\",properties:{maxWidth:N,middlePanelMaxWidth:N}},yt={type:\"object\",properties:{showDarkRightPanel:{type:\"boolean\"},stacked:ct,\"three-panel\":lt}},xe={type:\"object\",properties:{backgroundColor:{type:\"string\"},border:{type:\"string\"}}},dt={type:\"object\",properties:{breakFieldNames:{type:\"boolean\"},caretColor:{type:\"string\"},caretSize:{type:\"string\"},constraints:xe,defaultDetailsWidth:{type:\"string\"},examples:xe,labelsTextSize:{type:\"string\"},linesColor:{type:\"string\"},nestedBackground:{type:\"string\"},nestingSpacing:{type:\"string\"},requireLabelColor:{type:\"string\"},typeNameColor:{type:\"string\"},typeTitleColor:{type:\"string\"}}},Te={type:\"object\",properties:{subItemsColor:{type:\"string\"},textTransform:{type:\"string\"},fontWeight:{type:\"string\"}}},gt={type:\"object\",properties:D(Te.properties,[\"textTransform\"])},mt={type:\"object\",properties:{unit:{type:\"number\"},paddingHorizontal:{type:\"string\"},paddingVertical:{type:\"string\"},offsetTop:{type:\"string\"},offsetLeft:{type:\"string\"},offsetNesting:{type:\"string\"}}},ut={type:\"object\",properties:{...j(n.properties,[\"fontWeight\",\"lineHeight\"]),activeBgColor:{type:\"string\"},activeTextColor:{type:\"string\"},backgroundColor:{type:\"string\"},borderRadius:{type:\"string\"},breakPath:{type:\"boolean\"},caretColor:{type:\"string\"},caretSize:{type:\"string\"},groupItems:Te,level1items:gt,rightLineColor:{type:\"string\"},separatorLabelColor:{type:\"string\"},showAtBreakpoint:{type:\"string\"},spacing:mt,textColor:{type:\"string\"},width:{type:\"string\"}}},O={type:\"object\",properties:{...n.properties,color:{type:\"string\"},transform:{type:\"string\"}}},bt={type:\"object\",properties:{...n.properties,backgroundColor:{type:\"string\"},color:{type:\"string\"},wordBreak:{type:\"string\",enum:[\"break-all\",\"break-word\",\"keep-all\",\"normal\",\"revert\",\"unset\",\"inherit\",\"initial\"]},wrap:{type:\"boolean\"}}},ft={type:\"object\",properties:j(n.properties,[\"fontSize\"])},ht={type:\"object\",properties:{color:{type:\"string\"},hover:{type:\"string\"},textDecoration:{type:\"string\"},hoverTextDecoration:{type:\"string\"},visited:{type:\"string\"}}},St={type:\"object\",properties:{code:bt,fieldName:n,...D(n.properties,[\"fontSize\",\"fontFamily\"]),fontWeightBold:{type:\"string\"},fontWeightLight:{type:\"string\"},fontWeightRegular:{type:\"string\"},heading1:O,heading2:O,heading3:O,headings:ft,lineHeight:{type:\"string\"},links:ht,optimizeSpeed:{type:\"boolean\"},rightPanelHeading:O,smoothing:{type:\"string\",enum:[\"auto\",\"none\",\"antialiased\",\"subpixel-antialiased\",\"grayscale\"]}}},Ct={type:\"object\",properties:{color:{type:\"string\"},...j(n.properties,[\"fontWeight\"])}},Pt={type:\"object\",properties:{backgroundColor:{type:\"string\"},borderRadius:{type:\"string\"},tokens:Ct}},jt={type:\"object\",properties:{gutter:{type:\"string\"},maxHeight:{type:\"string\"},maxWidth:{type:\"string\"}}},xt={type:\"object\",properties:{backgroundColor:{type:\"string\"},color:{type:\"string\"}}},ve={type:\"object\",properties:{custom:{type:\"string\"}}},vt={type:\"object\",properties:{DownloadButton:ve,NextSectionButton:ve}},Tt={type:\"object\",properties:{backgroundColor:{type:\"string\"},panelBackgroundColor:{type:\"string\"},panelControlsBackgroundColor:{type:\"string\"},showAtBreakpoint:{type:\"string\"},textColor:{type:\"string\"},width:{type:\"string\"}}},kt={type:\"object\",properties:{borderRadius:{type:\"string\"}}},Et={type:\"object\",properties:{sectionHorizontal:{type:\"number\"},sectionVertical:{type:\"number\"},unit:{type:\"number\"}}},Rt={type:\"object\",properties:{breakpoints:N,codeBlock:Pt,colors:tt,components:pt,layout:yt,logo:jt,fab:xt,overrides:vt,rightPanel:Tt,schema:dt,shape:kt,sidebar:ut,spacing:Et,typography:St,links:{properties:{color:{type:\"string\"}}},codeSample:{properties:{backgroundColor:{type:\"string\"}}}}},It={type:\"object\",properties:{skipOptionalParameters:{type:\"boolean\"},languages:{type:\"array\",items:We}},required:[\"languages\"]},ie={type:\"object\",properties:{theme:Rt,ctrlFHijack:{type:\"boolean\"},defaultSampleLanguage:{type:\"string\"},disableDeepLinks:{type:\"boolean\"},disableSearch:{type:\"boolean\"},disableSidebar:{type:\"boolean\"},downloadDefinitionUrl:{type:\"string\"},expandDefaultServerVariables:{type:\"boolean\"},enumSkipQuotes:{type:\"boolean\"},expandDefaultRequest:{type:\"boolean\"},expandDefaultResponse:{type:\"boolean\"},expandResponses:{type:\"string\"},expandSingleSchemaField:{type:\"boolean\"},generateCodeSamples:It,generatedPayloadSamplesMaxDepth:{type:\"number\"},hideDownloadButton:{type:\"boolean\"},hideHostname:{type:\"boolean\"},hideInfoSection:{type:\"boolean\"},hideLogo:{type:\"boolean\"},hideRequestPayloadSample:{type:\"boolean\"},hideRightPanel:{type:\"boolean\"},hideSchemaPattern:{type:\"boolean\"},hideSingleRequestSampleTab:{type:\"boolean\"},hideSecuritySection:{type:\"boolean\"},hideTryItPanel:{type:\"boolean\"},hideFab:{type:\"boolean\"},hideOneOfDescription:{type:\"boolean\"},htmlTemplate:{type:\"string\"},jsonSampleExpandLevel:{oneOf:[{type:\"number\",minimum:1},{type:\"string\"}]},labels:Ve,menuToggle:{type:\"boolean\"},nativeScrollbars:{type:\"boolean\"},noAutoAuth:{type:\"boolean\"},onDeepLinkClick:{type:\"object\"},pagination:{enum:[\"none\",\"section\",\"item\"]},pathInMiddlePanel:{type:\"boolean\"},payloadSampleIdx:{type:\"number\",minimum:0},requiredPropsFirst:{type:\"boolean\"},routingStrategy:{type:\"string\"},samplesTabsMaxCount:{type:\"number\"},schemaExpansionLevel:{oneOf:[{type:\"number\",minimum:0},{type:\"string\"}]},minCharacterLengthToInitSearch:{type:\"number\",minimum:1},maxResponseHeadersToShowInTryIt:{type:\"number\",minimum:0},scrollYOffset:{oneOf:[{type:\"number\"},{type:\"string\"}]},searchAutoExpand:{type:\"boolean\"},searchFieldLevelBoost:{type:\"number\",minimum:0},searchMaxDepth:{type:\"number\",minimum:1},searchMode:{type:\"string\",enum:[\"default\",\"path-only\"]},searchOperationTitleBoost:{type:\"number\"},searchTagTitleBoost:{type:\"number\"},sendXUserAgentInTryIt:{type:\"boolean\"},showChangeLayoutButton:{type:\"boolean\"},showConsole:{type:\"boolean\"},showNextButton:{type:\"boolean\"},showRightPanelToggle:{type:\"boolean\"},showSecuritySchemeType:{type:\"boolean\"},showWebhookVerb:{type:\"boolean\"},showObjectSchemaExamples:{type:\"boolean\"},disableTryItRequestUrlEncoding:{type:\"boolean\"},sidebarLinks:$e,sideNavStyle:{type:\"string\",enum:[\"summary-only\",\"path-first\",\"id-only\",\"path-only\"]},simpleOneOfTypeLabel:{type:\"boolean\"},sortEnumValuesAlphabetically:{type:\"boolean\"},sortOperationsAlphabetically:{type:\"boolean\"},sortPropsAlphabetically:{type:\"boolean\"},sortTagsAlphabetically:{type:\"boolean\"},suppressWarnings:{type:\"boolean\"},unstable_externalDescription:{type:\"boolean\"},unstable_ignoreMimeParameters:{type:\"boolean\"},untrustedDefinition:{type:\"boolean\"},showAccessMode:{type:\"boolean\"},preserveOriginalExtensionsName:{type:\"boolean\"},markdownHeadingsAnchorLevel:{type:\"number\"}},additionalProperties:!1};function D(d,m){return Object.fromEntries(m.filter(o=>o in d).map(o=>[o,d[o]]))}function j(d,m){return Object.fromEntries(Object.entries(d).filter(([o])=>!m.includes(o)))}var p={nodeTypeName:void 0,type:\"object\",additionalProperties:{oneOf:[{type:\"string\"},{type:\"object\"}]},description:\"The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.\",documentationLink:\"https://redocly.com/docs/cli/configuration/reference/rules#rules\"},go=[\"rules\",\"oas2Rules\",\"oas3_0Rules\",\"oas3_1Rules\",\"oas3_2Rules\",\"async2Rules\",\"async3Rules\",\"arazzo1Rules\",\"overlay1Rules\",\"openrpc1Rules\"],At={rules:p,oas2Rules:p,oas3_0Rules:p,oas3_1Rules:p,oas3_2Rules:p,async2Rules:p,async3Rules:p,arazzo1Rules:p,overlay1Rules:p,openrpc1Rules:p},mo=[\"preprocessors\",\"oas2Preprocessors\",\"oas3_0Preprocessors\",\"oas3_1Preprocessors\",\"oas3_2Preprocessors\",\"async2Preprocessors\",\"async3Preprocessors\",\"arazzo1Preprocessors\",\"overlay1Preprocessors\",\"openrpc1Preprocessors\"],c={nodeTypeName:void 0,type:\"object\",additionalProperties:!0},Lt={preprocessors:c,oas2Preprocessors:c,oas3_0Preprocessors:c,oas3_1Preprocessors:c,oas3_2Preprocessors:c,async2Preprocessors:c,async3Preprocessors:c,arazzo1Preprocessors:c,overlay1Preprocessors:c,openrpc1Preprocessors:c},l={nodeTypeName:void 0,type:\"object\",additionalProperties:!0},uo=[\"decorators\",\"oas2Decorators\",\"oas3_0Decorators\",\"oas3_1Decorators\",\"oas3_2Decorators\",\"async2Decorators\",\"async3Decorators\",\"arazzo1Decorators\",\"overlay1Decorators\",\"openrpc1Decorators\"],Ot={decorators:l,oas2Decorators:l,oas3_0Decorators:l,oas3_1Decorators:l,oas3_2Decorators:l,async2Decorators:l,async3Decorators:l,arazzo1Decorators:l,overlay1Decorators:l,openrpc1Decorators:l},Nt={nodeTypeName:void 0,type:\"array\",items:{type:\"string\"},description:\"Use extends to inherit rules and their configurations from other rulesets.\",documentationLink:\"https://redocly.com/docs/cli/configuration/reference/extends\"},b={...At,...Ot,...Lt,extends:Nt};var q=d=>d;var i=q({RedirectSource:\"RedirectSource\",Redirects:\"Redirects\",ScorecardClassic:\"ScorecardClassic\",ScorecardClassicLevelList:\"ScorecardClassicLevelList\",ScorecardClassicLevel:\"ScorecardClassicLevel\",ScorecardClassicTargetList:\"ScorecardClassicTargetList\",ScorecardClassicTarget:\"ScorecardClassicTarget\",ScorecardClassicTargetWhere:\"ScorecardClassicTargetWhere\",ScorecardClassicTargetWhereMetadata:\"ScorecardClassicTargetWhereMetadata\",ScorecardClassicTeamMetadataProperty:\"ScorecardClassicTeamMetadataProperty\"});var r={type:\"object\",properties:{hide:{type:\"boolean\"}},additionalProperties:!1},ke={type:\"object\",properties:{src:{type:\"string\"},async:{type:\"boolean\"},crossorigin:{type:\"string\"},defer:{type:\"boolean\"},fetchpriority:{type:\"string\"},integrity:{type:\"string\"},module:{type:\"boolean\"},nomodule:{type:\"boolean\"},nonce:{type:\"string\"},referrerpolicy:{type:\"string\"},type:{type:\"string\"}},required:[\"src\"],additionalProperties:!0},se={type:\"object\",properties:{page:{type:\"string\"},directory:{type:\"string\"},disconnect:{type:\"boolean\",default:!1},group:{type:\"string\"},label:{type:\"string\"},href:{type:\"string\"},external:{type:\"boolean\"},labelTranslationKey:{type:\"string\"},groupTranslationKey:{type:\"string\"},icon:{oneOf:[{type:\"string\"},{type:\"object\",properties:{srcSet:{type:\"string\"}},required:[\"srcSet\"]}]},separator:{type:\"string\"},separatorLine:{type:\"boolean\"},linePosition:{type:\"string\",enum:[\"top\",\"bottom\"],default:\"top\"},version:{type:\"string\"},menuStyle:{type:\"string\",enum:[\"drilldown\"]},expanded:{type:\"string\",const:\"always\"},selectFirstItemOnExpand:{type:\"boolean\"},flatten:{type:\"boolean\"},linkedSidebars:{type:\"array\",items:{type:\"string\"}},items:{type:\"array\",items:{type:\"object\",additionalProperties:!0}},rbac:{type:\"object\",additionalProperties:{type:\"string\"}},additionalProps:{type:\"object\",additionalProperties:!0}}},ae={type:\"array\",items:{...se,properties:{...se.properties,items:{type:\"array\",items:se}}}},Dt={type:\"object\",properties:{name:{type:\"string\"},icon:{type:\"string\"},folder:{type:\"string\"}},additionalProperties:!1,required:[\"name\",\"folder\"]},qt={type:\"object\",properties:{hide:{type:\"boolean\",default:!1},suggestions:{default:[],type:\"array\",items:{type:\"string\"}},prompt:{type:\"string\"}},additionalProperties:!1},wt={type:\"array\",items:{type:\"object\",required:[\"name\",\"field\",\"type\"],properties:{name:{type:\"string\"},field:{type:\"string\"},type:{type:\"string\",enum:[\"multi-select\",\"select\",\"tags\"]}},additionalProperties:!1}},_t={type:\"object\",properties:{facets:wt,...r.properties},additionalProperties:!1},Mt={type:\"object\",properties:{page:{type:\"string\"},label:{type:\"string\"},labelTranslationKey:{type:\"string\"}},required:[\"page\"]},w={type:\"object\",properties:{image:{type:\"string\"},srcSet:{type:\"string\"},altText:{type:\"string\"},link:{type:\"string\"},favicon:{type:\"string\"}},additionalProperties:!1},_={type:\"object\",properties:{items:ae,...r.properties},additionalProperties:!1},M={type:\"object\",additionalProperties:Dt},B={type:\"object\",properties:{items:ae,copyrightText:{type:\"string\"},logo:r,...r.properties},additionalProperties:!1},U={type:\"object\",properties:{separatorLine:{type:\"boolean\"},linePosition:{type:\"string\",enum:[\"top\",\"bottom\"],default:\"bottom\"},...r.properties},additionalProperties:!1},F={type:\"object\",properties:{head:{type:\"array\",items:ke},body:{type:\"array\",items:ke}},additionalProperties:!1},z={type:\"array\",items:{type:\"object\",properties:{href:{type:\"string\"},as:{type:\"string\"},crossorigin:{type:\"string\"},fetchpriority:{type:\"string\"},hreflang:{type:\"string\"},imagesizes:{type:\"string\"},imagesrcset:{type:\"string\"},integrity:{type:\"string\"},media:{type:\"string\"},prefetch:{type:\"string\"},referrerpolicy:{type:\"string\"},rel:{type:\"string\"},sizes:{type:\"string\"},title:{type:\"string\"},type:{type:\"string\"}},required:[\"href\"],additionalProperties:!0}},G={type:\"object\",properties:{engine:{type:\"string\",enum:[\"flexsearch\",\"typesense\"],default:\"flexsearch\"},ai:qt,filters:_t,placement:{type:\"string\",default:\"navbar\"},shortcuts:{type:\"array\",items:{type:\"string\"},default:[\"\\u2318+K,ctrl+K\"]},suggestedPages:{type:\"array\",items:Mt},...r.properties},additionalProperties:!1},Y={type:\"object\",properties:{hide:{type:\"boolean\"},suggestions:{default:[],type:\"array\",items:{type:\"string\"}},prompt:{type:\"string\"},trigger:{type:\"object\",properties:{hide:{type:\"boolean\",default:!1},inputType:{type:\"string\",enum:[\"button\",\"icon\"],default:\"button\"},inputIcon:{type:\"string\",enum:[\"chat\",\"sparkles\",\"redocly\"],default:\"sparkles\"}},additionalProperties:!1}},additionalProperties:!1},K={type:\"object\",properties:{ignoreDetection:{type:\"boolean\"},modes:{type:\"array\",items:{type:\"string\"},default:[\"light\",\"dark\"]},...r.properties},additionalProperties:!1},x={type:\"string\",enum:[\"slate\",\"pink\",\"coral\",\"amber\",\"jade\",\"cyan\",\"ocean\",\"indigo\",\"iris\"]},Bt={type:\"object\",properties:{...r.properties,items:{type:\"array\",items:{type:\"string\",enum:[\"copy\",\"view\",\"chatgpt\",\"claude\",\"docs-mcp-cursor\",\"docs-mcp-vscode\"]},default:[\"copy\",\"view\",\"chatgpt\",\"claude\",\"docs-mcp-cursor\",\"docs-mcp-vscode\"]}},additionalProperties:!1},H={type:\"object\",properties:{nextButton:{type:\"object\",properties:{text:{type:\"string\"},...r.properties},additionalProperties:!1,default:{}},previousButton:{type:\"object\",properties:{text:{type:\"string\"},...r.properties},additionalProperties:!1,default:{}},actions:Bt},additionalProperties:!1},W={type:\"object\",properties:{elementFormat:{type:\"string\",default:\"icon\"},copy:{type:\"object\",properties:{...r.properties},additionalProperties:!1,default:{hide:!1}},report:{type:\"object\",properties:{tooltipText:{type:\"string\"},buttonText:{type:\"string\"},label:{type:\"string\"},...r.properties},additionalProperties:!1,default:{hide:!1}},expand:{type:\"object\",properties:{...r.properties},additionalProperties:!1,default:{hide:!1}},collapse:{type:\"object\",properties:{...r.properties},additionalProperties:!1,default:{hide:!1}}},additionalProperties:!1},V={type:\"object\",properties:{frontMatterKeysToResolve:{type:\"array\",items:{type:\"string\"},default:[\"image\",\"links\"]},partialsFolders:{type:\"array\",items:{type:\"string\"},default:[\"**/_partials/**\"]},lastUpdatedBlock:{type:\"object\",properties:{format:{type:\"string\",enum:[\"timeago\",\"iso\",\"long\",\"short\"],default:\"timeago\"},locale:{type:\"string\"},...r.properties},additionalProperties:!1,default:{}},toc:{type:\"object\",properties:{header:{type:\"string\",default:\"On this page\"},depth:{type:\"integer\",default:3,minimum:1},...r.properties},additionalProperties:!1,default:{}},editPage:{type:\"object\",properties:{baseUrl:{type:\"string\"},...r.properties},additionalProperties:!1,default:{}}},additionalProperties:!1,default:{}},v={...S,properties:{...S.properties,...ie.properties}},vo={...S,properties:{...S.properties,...ie.properties}},Ut={type:\"object\",properties:{includeInDevelopment:{type:\"boolean\"},scriptUrl:{type:\"string\"},pageViewEventName:{type:\"string\"}},additionalProperties:!1,required:[\"scriptUrl\"]},Ft={type:\"object\",properties:{includeInDevelopment:{type:\"boolean\"},apiKey:{type:\"string\"},head:{type:\"boolean\"},respectDNT:{type:\"boolean\"},exclude:{type:\"array\",items:{type:\"string\"}},outboundClickEventName:{type:\"string\"},pageViewEventName:{type:\"string\"},amplitudeConfig:{type:\"object\",additionalProperties:!0}},additionalProperties:!1,required:[\"apiKey\"]},zt={type:\"object\",properties:{includeInDevelopment:{type:\"boolean\"},orgId:{type:\"string\"}},additionalProperties:!1,required:[\"orgId\"]},Gt={type:\"object\",properties:{includeInDevelopment:{type:\"boolean\"},appId:{type:\"string\"}},additionalProperties:!1,required:[\"appId\"]},Yt={type:\"object\",properties:{includeInDevelopment:{type:\"boolean\"},writeKey:{type:\"string\",minLength:10},trackPage:{type:\"boolean\"},dataPlaneUrl:{type:\"string\"},controlPlaneUrl:{type:\"string\"},sdkUrl:{type:\"string\"},loadOptions:{type:\"object\",additionalProperties:!0}},additionalProperties:!1,required:[\"writeKey\"]},Kt={type:\"object\",properties:{includeInDevelopment:{type:\"boolean\"},writeKey:{type:\"string\",minLength:10},trackPage:{type:\"boolean\"},includeTitleInPageCall:{type:\"boolean\"},host:{type:\"string\"}},additionalProperties:!1,required:[\"writeKey\"]},Ht={type:\"object\",properties:{includeInDevelopment:{type:\"boolean\"},trackingId:{type:\"string\"},gtmAuth:{type:\"string\"},gtmPreview:{type:\"string\"},defaultDataLayer:{},dataLayerName:{type:\"string\"},enableWebVitalsTracking:{type:\"boolean\"},selfHostedOrigin:{type:\"string\"},pageViewEventName:{type:\"string\"}},additionalProperties:!1,required:[\"trackingId\"]},ne={type:\"object\",properties:{includeInDevelopment:{type:\"boolean\"},trackingId:{type:\"string\"},conversionId:{type:\"string\"},floodlightId:{type:\"string\"},optimizeId:{type:\"string\"},exclude:{type:\"array\",items:{type:\"string\"}}},additionalProperties:!1,required:[\"trackingId\"]},Wt={type:\"object\",properties:{includeInDevelopment:{type:\"boolean\"},trackingId:{type:\"string\"},conversionId:{type:\"string\"},floodlightId:{type:\"string\"},head:{type:\"boolean\"},respectDNT:{type:\"boolean\"},exclude:{type:\"array\",items:{type:\"string\"}},optimizeId:{type:\"string\"},anonymizeIp:{type:\"boolean\"},cookieExpires:{type:\"number\"},trackers:{type:\"object\",additionalProperties:ne}},additionalProperties:!1,required:[\"trackingId\"]},$={type:\"object\",properties:{adobe:Ut,amplitude:Ft,fullstory:zt,heap:Gt,rudderstack:Yt,segment:Kt,gtm:Ht,ga:Wt}},J={type:\"object\",properties:{items:{type:\"array\",items:{type:\"object\",properties:{label:{type:\"string\"},external:{type:\"boolean\"},link:{type:\"string\"},separatorLine:{type:\"boolean\"}},additionalProperties:!0},default:[]},hideLoginButton:{type:\"boolean\"},...r.properties},additionalProperties:!1},X={type:\"object\",properties:{hide:{type:\"boolean\"},showForUnversioned:{type:\"boolean\"}}},Q={type:\"object\",properties:{hide:{type:\"boolean\"},prefixItems:{type:\"array\",items:{type:\"object\",properties:{label:{type:\"string\"},labelTranslationKey:{type:\"string\"},page:{type:\"string\"},icon:{type:\"string\"}},additionalProperties:!1,default:{}}}},additionalProperties:!1},Vt={type:\"object\",additionalProperties:!1,required:[\"title\",\"property\"],properties:{type:{type:\"string\",enum:[\"select\",\"checkboxes\",\"date-range\"],default:\"checkboxes\"},title:{type:\"string\"},titleTranslationKey:{type:\"string\"},property:{type:\"string\"},parentFilter:{type:\"string\"},valuesMapping:{type:\"object\",additionalProperties:{type:\"string\"}},missingCategoryName:{type:\"string\"},missingCategoryNameTranslationKey:{type:\"string\"},options:{type:\"array\",items:{type:\"string\"}}}},$t={type:\"object\",additionalProperties:!0,required:[\"slug\",\"items\"],properties:{show:{type:\"boolean\"},slug:{type:\"string\"},filters:{type:\"array\",items:Vt},groupByFirstFilter:{type:\"boolean\"},filterValuesCasing:{type:\"string\",enum:[\"sentence\",\"original\",\"lowercase\",\"uppercase\"]},items:ae,requiredPermission:{type:\"string\"},separateVersions:{type:\"boolean\"},title:{type:\"string\"},titleTranslationKey:{type:\"string\"},description:{type:\"string\"},descriptionTranslationKey:{type:\"string\"}}},T={type:\"object\",patternProperties:{\".*\":$t}},k={nodeTypeName:i.ScorecardClassic,description:\"Add and create sets of rules and test your API description files against them. With these rules you can maintain quality across your existing APIs and ensure that newly-added or updated APIs match your criteria. An API scorecard can include multiple sets of rules, corresponding to different quality levels.\",documentationLink:\"https://redocly.com/docs/realm/config/scorecard-classic\",type:\"object\",additionalProperties:!0,required:[],properties:{ignoreNonCompliant:{type:\"boolean\",default:!1},teamMetadataProperty:{nodeTypeName:i.ScorecardClassicTeamMetadataProperty,description:\"Provide custom team label and team metadata property.\",documentationLink:\"https://redocly.com/docs/realm/config/scorecard-classic#team-metadata-object\",type:\"object\",properties:{property:{type:\"string\"},label:{type:\"string\"},default:{type:\"string\"}}},levels:{nodeTypeName:i.ScorecardClassicLevelList,description:\"List of levels to score against.\",type:\"array\",items:{nodeTypeName:i.ScorecardClassicLevel,documentationLink:\"https://redocly.com/docs/realm/config/scorecard-classic#level-object\",type:\"object\",required:[\"name\"],properties:{name:{type:\"string\"},color:{type:\"string\"},...b},additionalProperties:!1}},targets:{nodeTypeName:i.ScorecardClassicTargetList,description:\"Provide custom `minimumLevel` for specific targets.\",type:\"array\",items:{nodeTypeName:i.ScorecardClassicTarget,type:\"object\",required:[\"where\"],properties:{minimumLevel:{type:\"string\"},rules:{type:\"object\",additionalProperties:!0},where:{nodeTypeName:i.ScorecardClassicTargetWhere,description:\"Specify which API descriptions to apply the `minimumLevel` to based on the metadata.\",documentationLink:\"https://redocly.com/docs/realm/config/scorecard-classic#where-object\",type:\"object\",required:[\"metadata\"],properties:{metadata:{nodeTypeName:i.ScorecardClassicTargetWhereMetadata,type:\"object\",additionalProperties:{type:\"string\"}}},additionalProperties:!1}},additionalProperties:!1}},ignore:{type:\"array\",items:{type:\"string\"}},fromProjectUrl:{type:\"string\",format:\"uri\"}}};var Jt={type:\"object\",required:[\"key\"],properties:{key:{type:\"string\"}},additionalProperties:!1},Xt={type:\"object\",required:[\"type\"],properties:{type:{type:\"string\"}},additionalProperties:!1},Qt={type:\"object\",required:[\"property\",\"title\"],properties:{property:{type:\"string\"},hide:{type:\"boolean\"},label:{type:\"string\"},options:{type:\"array\",items:{type:\"string\"}},type:{type:\"string\",enum:[\"select\",\"checkboxes\",\"date-range\"],default:\"checkboxes\"},title:{type:\"string\"},titleTranslationKey:{type:\"string\"},parentFilter:{type:\"string\"},valuesMapping:{type:\"object\",additionalProperties:{type:\"string\"}}},additionalProperties:!1},y={type:\"object\",properties:{slug:{type:\"string\"},hide:{type:\"boolean\"},includes:{type:\"array\",items:Xt},excludes:{type:\"array\",items:Jt},filters:{type:\"array\",items:Qt},titleTranslationKey:{type:\"string\"},descriptionTranslationKey:{type:\"string\"},catalogSwitcherLabelTranslationKey:{type:\"string\"}},additionalProperties:!1},Zt={type:\"object\",properties:{type:{type:\"string\",enum:[\"string\",\"number\",\"boolean\",\"array\",\"object\"]},description:{type:\"string\"},example:{oneOf:[{type:\"string\"},{type:\"number\"},{type:\"boolean\"},{type:\"array\"},{type:\"object\"}]},enum:{type:\"array\",items:{type:\"string\"}},pattern:{type:\"string\"},format:{type:\"string\"},minimum:{type:\"number\"},maximum:{type:\"number\"},items:{type:\"object\"}},additionalProperties:!0},er={type:\"object\",required:[\"type\",\"properties\"],properties:{type:{type:\"string\",enum:[\"object\"]},description:{type:\"string\"},properties:{type:\"object\",additionalProperties:Zt},required:{type:\"array\",items:{type:\"string\"}},additionalProperties:{type:\"boolean\"}},additionalProperties:!0},tr={type:\"object\",required:[\"name\",\"description\",\"metadataSchema\"],properties:{name:{type:\"string\",description:\"Display name of the entity type\"},description:{type:\"string\",description:\"Description of the entity type\"},metadataSchema:er,icon:{type:\"object\",properties:{src:{type:\"string\"},srcSet:{type:\"string\"}},additionalProperties:!1}},additionalProperties:!1},rr={type:\"object\",additionalProperties:tr},Z={type:\"object\",properties:{show:{type:\"boolean\",default:!1},entityTypes:rr,catalogs:{type:\"object\",properties:{all:y,services:y,domains:y,teams:y,users:y,apiDescriptions:y,dataSchemas:y,apiOperations:y},additionalProperties:y}},additionalProperties:!1};var Ee={type:\"string\",enum:[\"eq\",\"in\",\"gt\",\"gte\",\"lt\",\"lte\",\"contains\",\"startsWith\",\"endsWith\",\"exists\",\"isEmpty\",\"between\",\"matches\",\"some\",\"every\",\"none\"]},ce={type:\"string\",enum:[\"and\",\"or\"]},pe={type:\"object\",properties:{field:{type:\"string\"},operator:Ee,value:{oneOf:[{type:\"boolean\"},{type:\"string\"},{type:\"number\"}]},modifier:{type:\"string\",enum:[\"not\"]},match:{type:\"array\",items:{type:\"object\",properties:{field:{type:\"string\"},operator:Ee,value:{oneOf:[{type:\"boolean\"},{type:\"string\"},{type:\"number\"}]},modifier:{type:\"string\",enum:[\"not\"]}}}}}},or={type:\"object\",properties:{operator:ce,conditions:{type:\"array\",items:pe}},required:[\"operator\",\"conditions\"],additionalProperties:!1},Re={type:\"array\",items:{oneOf:[pe,{type:\"object\",properties:{operator:ce,conditions:{type:\"array\",items:{oneOf:[pe,or]}}},required:[\"operator\",\"conditions\"],additionalProperties:!1}]}},Ae={type:\"object\",properties:{defined:{type:\"boolean\"},nonEmpty:{type:\"boolean\"},eq:{},gt:{type:\"number\"},gte:{type:\"number\"},lt:{type:\"number\"},lte:{type:\"number\"},const:{}},additionalProperties:!1},ir={type:\"array\",items:{type:\"object\",properties:{subject:{type:\"object\",properties:{type:{type:\"string\",enum:[\"Entity\",\"EntityMetadata\",\"EntityRelations\",\"EntityRelation\"]},property:{type:\"string\"}},required:[\"type\",\"property\"],additionalProperties:!1},assertions:Ae},required:[\"subject\",\"assertions\"],additionalProperties:!1}},sr={type:\"object\",properties:{title:{type:\"string\"},subject:{type:\"object\",properties:{type:{type:\"string\",enum:[\"Entity\",\"EntityMetadata\",\"EntityRelations\",\"EntityRelation\"]},property:{type:\"string\"}},required:[\"type\",\"property\"],additionalProperties:!1},severity:{type:\"string\",enum:[\"error\",\"warn\",\"off\"]},message:{type:\"string\"},assertions:Ae,where:ir,weight:{type:\"number\",default:1}},required:[\"subject\",\"assertions\"],additionalProperties:!1},ar={type:\"object\",additionalProperties:{oneOf:[{type:\"string\"},{type:\"object\",properties:{severity:{type:\"string\",enum:[\"error\",\"warn\",\"off\"]},weight:{type:\"number\",default:1}},additionalProperties:!0},sr]}},nr={type:\"object\",properties:{name:{type:\"string\"},extends:b.extends,rules:ar},required:[\"name\"],additionalProperties:!1},Ie={type:\"object\",properties:{event:{type:\"string\",enum:[\"runtime\",\"manual\"]}},required:[\"event\"],additionalProperties:!1},pr={oneOf:[Ie,{type:\"array\",items:Ie}]},cr={type:\"object\",properties:{name:{type:\"string\"},key:{type:\"string\"},description:{type:\"string\"},entities:{oneOf:[Re,{type:\"object\",properties:{operator:ce,conditions:Re},required:[\"operator\",\"conditions\"],additionalProperties:!1}]},levels:{type:\"array\",items:nr,minItems:1},trigger:pr},required:[\"name\",\"key\",\"entities\",\"levels\"],additionalProperties:!1},ee={type:\"array\",items:cr};var s={type:\"object\",properties:{imports:{type:\"array\",items:{type:\"string\"}},logo:w,navbar:_,products:M,footer:B,sidebar:U,scripts:F,links:z,feedback:a,search:G,aiAssistant:Y,colorMode:K,palette:x,navigation:H,codeSnippet:W,markdown:V,openapi:v,asyncapi:Se,graphql:P,analytics:$,userMenu:J,versionPicker:X,breadcrumbs:Q,catalog:T,entitiesCatalog:Z,catalogClassic:T,scorecard:k,scorecardClassic:k,scorecards:ee},additionalProperties:!0};var le=\"https://redocly.com/sso/teams\",ye=(o=>(o.OIDC=\"OIDC\",o.SAML2=\"SAML2\",o))(ye||{}),de=(o=>(o.SERVICE_ACCOUNT=\"SERVICE_ACCOUNT\",o.OAUTH2=\"OAUTH2\",o))(de||{}),lr=\"redocly::teams-rbac\",yr=\"redocly::route-rbac\",Le=(o=>(o.STACKED=\"stacked\",o.THREE_PANEL=\"three-panel\",o))(Le||{});function te(d,m,o){return Object.fromEntries(Object.entries(d).map(([f,h])=>{if(!(f===m&&o!==\"properties\"))return typeof h!=\"object\"||!h?[f,h]:Array.isArray(h)?[f,h.map(oe=>typeof oe==\"object\"?te(oe,m,f):oe)]:[f,te(h,m,f)]}).filter(Boolean))}var dr={type:\"object\",additionalProperties:{type:\"string\"}},gr={type:\"object\",additionalProperties:!1,patternProperties:{\"^[a-zA-Z0-9_-]+$\":{type:\"string\",pattern:\"^https?://[^\\\\s/$.?#].[^\\\\s]*$\"}}},re={type:\"string\",enum:[\"error\",\"warn\",\"off\"]},mr={type:\"object\",additionalProperties:!1,properties:{schemaCheck:re,statusCodeCheck:re,contentTypeCheck:re,successCriteriaCheck:re}},ur={type:\"object\",properties:{event:{type:\"string\",enum:[\"schedule\"]},interval:{type:\"string\",enum:[\"1m\",\"2m\",\"5m\",\"10m\",\"15m\",\"30m\",\"1h\",\"3h\",\"6h\",\"12h\",\"1d\",\"7d\"]}},required:[\"event\"],additionalProperties:!1},br={type:\"object\",properties:{event:{type:\"string\",enum:[\"build\"]}},required:[\"event\"],additionalProperties:!1},fr={type:\"object\",properties:{warn:{type:\"number\"},error:{type:\"number\"}},additionalProperties:!1},Oe={type:\"object\",properties:{ignoreLint:{oneOf:[{type:\"boolean\",default:!1},{type:\"object\",additionalProperties:{type:\"boolean\"}}]},ignoreLinkChecker:{type:\"boolean\"},ignoreMarkdocErrors:{type:\"boolean\"},ignoreRespectMonitoring:{type:\"boolean\"},jobs:{type:\"array\",items:{type:\"object\",properties:{path:{type:\"string\",pattern:\"^(?!\\\\/|\\\\.\\\\./)\"},agent:{type:\"string\",enum:[\"respect\"]},trigger:{oneOf:[ur,br]},inputs:dr,servers:gr,severity:mr,slo:fr},required:[\"path\",\"trigger\",\"agent\"],additionalProperties:!1}}},additionalProperties:!1};var hr={type:\"object\",properties:{end_session_endpoint:{type:\"string\"},token_endpoint:{type:\"string\"},authorization_endpoint:{type:\"string\"},jwks_uri:{type:\"string\"}},required:[\"token_endpoint\",\"authorization_endpoint\"],additionalProperties:!0},Sr={type:\"object\",properties:{type:{type:\"string\",const:\"OIDC\"},title:{type:\"string\"},pkce:{type:\"boolean\",default:!1},configurationUrl:{type:\"string\",minLength:1},configuration:hr,clientId:{type:\"string\",minLength:1},clientSecret:{type:\"string\",minLength:0},teamsClaimName:{type:\"string\"},teamsClaimMap:{type:\"object\",additionalProperties:{type:\"string\"}},defaultTeams:{type:\"array\",items:{type:\"string\"}},scopes:{type:\"array\",items:{type:\"string\"}},tokenExpirationTime:{type:\"number\"},authorizationRequestCustomParams:{type:\"object\",additionalProperties:{type:\"string\"}},introspectEndpoint:{type:\"string\"},tokenRequestCustomParams:{type:\"object\",additionalProperties:{type:\"string\"}},audience:{type:\"array\",items:{type:\"string\"}}},required:[\"type\",\"clientId\"],oneOf:[{required:[\"configurationUrl\"]},{required:[\"configuration\"]}],additionalProperties:!1},Cr={type:\"object\",properties:{type:{type:\"string\",const:\"SAML2\"},title:{type:\"string\"},issuerId:{type:\"string\"},entityId:{type:\"string\"},ssoUrl:{type:\"string\"},x509PublicCert:{type:\"string\"},teamsAttributeName:{type:\"string\",default:le},teamsAttributeMap:{type:\"object\",additionalProperties:{type:\"string\"}},defaultTeams:{type:\"array\",items:{type:\"string\"}}},additionalProperties:!1,required:[\"type\",\"issuerId\",\"ssoUrl\",\"x509PublicCert\"]},Pr={oneOf:[Sr,Cr],discriminator:{propertyName:\"type\"}},jr={type:\"object\",additionalProperties:Pr},we={oneOf:[{type:\"array\",items:{type:\"string\",enum:[\"REDOCLY\",\"CORPORATE\",\"GUEST\"]},uniqueItems:!0},{type:\"string\",enum:[\"REDOCLY\",\"CORPORATE\",\"GUEST\"]}]},_e={type:\"boolean\"},Me={type:\"string\",pattern:\"^https?://.*\"},Be={type:\"string\",pattern:\"^https?://.*\"},xr={type:\"object\",properties:{to:{type:\"string\"},type:{type:\"number\",default:301}},additionalProperties:!1,nodeTypeName:i.RedirectSource,description:\"Source is an absolute path that must start with a forward slash.\",documentationLink:\"https://redocly.com/docs/realm/config/redirects#sources-map\"},vr={type:\"object\",additionalProperties:xr,default:{},nodeTypeName:i.Redirects,description:\"Use redirects to change which resource a URL points to, maintaining working links when you move, rename, or restructure content.\",documentationLink:\"https://redocly.com/docs/realm/config/redirects\"},Tr={type:\"string\",enum:[\"info\",\"success\",\"warning\",\"error\"],default:\"info\"},e={type:\"object\",additionalProperties:{type:\"string\"}},kr={type:\"object\",properties:{trackingId:{type:\"string\"},content:{type:\"string\"},dismissible:{type:\"boolean\",default:!1},target:{type:\"string\"},color:Tr,rbac:e,startAt:{type:\"string\",format:\"date-time\"},endAt:{type:\"string\",format:\"date-time\"}},required:[\"content\"],additionalProperties:!1},Er={type:\"array\",items:kr,default:[]},me={type:\"object\",properties:{root:{type:\"string\"},output:{type:\"string\",pattern:\"(.ya?ml|.json)$\"},rbac:e,openapi:v,graphql:P,theme:{type:\"object\",properties:{openapi:v,graphql:P},additionalProperties:!1},title:{type:\"string\"},metadata:{type:\"object\",additionalProperties:!0},...b},required:[\"root\"]},Rr={type:\"object\",additionalProperties:!0},Ir={type:\"object\",additionalProperties:{type:\"object\",additionalProperties:!0}},Ne={type:\"object\",properties:{hide:{type:\"boolean\",default:!1},title:{type:\"string\"},description:{type:\"string\"},details:{type:\"object\",properties:{path:{type:\"string\"},content:{type:\"string\"}},additionalProperties:!1},excludeFiles:{type:\"array\",items:{type:\"string\"},default:[]},sections:{type:\"array\",items:{type:\"object\",properties:{title:{type:\"string\"},description:{type:\"string\"},includeFiles:{type:\"array\",items:{type:\"string\"},default:[]},excludeFiles:{type:\"array\",items:{type:\"string\"},default:[]}},required:[\"title\"],additionalProperties:!1}}},default:{hide:!1,title:void 0,description:void 0,details:void 0,sections:[{title:\"Table of contents\",includeFiles:[\"**/*\"],excludeFiles:[]}]},additionalProperties:!1},De={type:\"object\",properties:{title:{type:\"string\"},projectTitle:{type:\"string\"},description:{type:\"string\"},siteUrl:{type:\"string\"},image:{type:\"string\"},keywords:{oneOf:[{type:\"array\",items:{type:\"string\"}},{type:\"string\"}]},lang:{type:\"string\"},jsonLd:{type:\"object\"},meta:{type:\"array\",items:{type:\"object\",properties:{name:{type:\"string\"},content:{type:\"string\"}},required:[\"name\",\"content\"],additionalProperties:!1}},llmstxt:Ne},default:{llmstxt:Ne.default},additionalProperties:!1},Ar={type:\"object\",properties:{folders:{type:\"array\",items:{type:\"string\"}}},additionalProperties:!1},Lr={type:\"object\",properties:{catalogs:{type:\"object\",properties:{all:e,services:e,domains:e,teams:e,users:e,apiDescriptions:e,dataSchemas:e,apiOperations:e},additionalProperties:e},entitiesTypes:{type:\"object\",properties:{service:e,domain:e,team:e,user:e,apiDescription:e,apiOperation:e,dataSchema:e},additionalProperties:e},entitiesGroups:{type:\"array\",items:{type:\"object\",properties:{entities:{type:\"array\",items:{type:\"string\"}},config:e},additionalProperties:!1}},entities:{type:\"object\",properties:{\"**\":e},additionalProperties:e}},additionalProperties:!1},ue={type:\"object\",properties:{teamNamePatterns:{type:\"array\",items:{type:\"string\"}},teamFolders:{type:\"array\",items:{type:\"string\"}},teamFoldersBaseRoles:e,cms:e,reunite:e,features:{type:\"object\",properties:{aiSearch:e},additionalProperties:!1},content:{type:\"object\",properties:{\"**\":e},additionalProperties:e},entitiesCatalog:Lr},additionalProperties:e},Or={type:\"object\",properties:{static:{type:\"string\"}},additionalProperties:!1,required:[\"static\"]},Nr={type:\"object\",properties:{idp:{type:\"string\"}},additionalProperties:!1,required:[\"idp\"]},Dr={type:\"object\",properties:{type:{type:\"string\",const:\"GRAVITEE\"},apiBaseUrl:{type:\"string\"},env:{type:\"string\"},allowApiProductsOutsideCatalog:{type:\"boolean\",default:!1},stage:{type:\"string\",default:\"non-production\"},auth:{oneOf:[Or,Nr]}},additionalProperties:!1,required:[\"type\",\"apiBaseUrl\"]},qr={type:\"object\",properties:{type:{type:\"string\",const:\"OAUTH2\"},tokenEndpoint:{type:\"string\"},clientId:{type:\"string\"},clientSecret:{type:\"string\"}},additionalProperties:!1,required:[\"type\",\"tokenEndpoint\",\"clientId\",\"clientSecret\"]},wr={type:\"object\",properties:{type:{type:\"string\",const:\"SERVICE_ACCOUNT\"},serviceAccountEmail:{type:\"string\"},serviceAccountPrivateKey:{type:\"string\"}},additionalProperties:!1,required:[\"type\",\"serviceAccountEmail\",\"serviceAccountPrivateKey\"]},ge={type:\"object\",properties:{type:{type:\"string\",const:\"APIGEE_X\"},apiUrl:{type:\"string\"},stage:{type:\"string\",default:\"non-production\"},organizationName:{type:\"string\"},ignoreApiProducts:{type:\"array\",items:{type:\"string\"}},allowApiProductsOutsideCatalog:{type:\"boolean\",default:!1},auth:{type:\"object\",oneOf:[qr,wr],discriminator:{propertyName:\"type\"}}},additionalProperties:!1,required:[\"type\",\"organizationName\",\"auth\"]},_r={...ge,properties:{...ge.properties,type:{type:\"string\",const:\"APIGEE_EDGE\"}}},Mr={type:\"object\",oneOf:[ge,_r,Dr],discriminator:{propertyName:\"type\"}},Br={type:\"object\",required:[\"adapters\"],additionalProperties:!1,properties:{adapters:{type:\"array\",items:Mr}}},qe={type:\"object\",properties:{defaultLocale:{type:\"string\"},locales:{type:\"array\",items:{type:\"object\",properties:{code:{type:\"string\"},name:{type:\"string\"}},required:[\"code\"]}}},additionalProperties:!1,required:[\"defaultLocale\"]},Ur={type:\"object\",properties:{name:{type:\"string\"},value:{type:\"string\"}},additionalProperties:!1,required:[\"name\",\"value\"]},Fr={type:\"object\",properties:{hide:{type:\"boolean\",default:!1},docs:{type:\"object\",properties:{hide:{type:\"boolean\",default:!1},name:{type:\"string\",default:\"Docs MCP server\"},ignore:{type:\"array\",items:{type:\"string\"},default:[]}},additionalProperties:!1}},additionalProperties:!1,default:{hide:!1,docs:{hide:!1,name:\"MCP server\",ignore:[]}}},zr={type:\"object\",properties:{requiresLogin:_e,logoutReturnUrl:Me,residency:Be,sso:we,rbac:ue},additionalProperties:!1},I={type:\"object\",properties:{imports:{type:\"array\",items:{type:\"string\"}},licenseKey:{type:\"string\"},redirects:vr,seo:De,rbac:ue,apiFunctions:Ar,requiresLogin:_e,responseHeaders:{type:\"object\",additionalProperties:{type:\"array\",items:Ur}},mockServer:{type:\"object\",properties:{off:{type:\"boolean\",default:!1},position:{type:\"string\",enum:[\"first\",\"last\",\"replace\",\"off\"],default:\"first\"},strictExamples:{type:\"boolean\",default:!1},errorIfForcedExampleNotFound:{type:\"boolean\",default:!1},description:{type:\"string\"}}},apis:{type:\"object\",additionalProperties:me},...b,ssoDirect:jr,sso:we,residency:Be,logoutReturnUrl:Me,access:zr,developerOnboarding:Br,removeAttribution:{type:\"boolean\"},i18n:qe,l10n:qe,metadata:Rr,metadataGlobs:Ir,ignore:{type:\"array\",items:{type:\"string\"}},theme:s,reunite:Oe,logo:w,navbar:_,products:M,footer:B,sidebar:U,scripts:F,links:z,feedback:a,search:G,aiAssistant:Y,colorMode:K,palette:x,navigation:H,codeSnippet:W,markdown:V,openapi:v,graphql:P,analytics:$,userMenu:J,versionPicker:X,breadcrumbs:Q,catalog:T,entitiesCatalog:Z,catalogClassic:T,scorecard:k,scorecardClassic:k,scorecards:ee,mcp:Fr,corsProxy:{type:\"object\",properties:{allowedTargets:{type:\"array\",items:{type:\"string\"}}},additionalProperties:!1},banner:Er},default:{redirects:{},seo:De.default},additionalProperties:!0},Gr={...te(I,\"default\"),additionalProperties:!1},Yr={$id:\"root-redocly-config\",...I,properties:{plugins:{type:\"array\",items:{type:\"string\"}},...I.properties,env:{type:\"object\",additionalProperties:Gr}},default:{},additionalProperties:!1};var be={type:\"object\",properties:{logo:s.properties.logo,navbar:s.properties.navbar,footer:s.properties.footer,sidebar:s.properties.sidebar,search:s.properties.search,codeSnippet:s.properties.codeSnippet,breadcrumbs:s.properties.breadcrumbs,openapi:s.properties.openapi,feedback:s.properties.feedback,palette:x,mockServer:I.properties.mockServer,analytics:{type:\"object\",properties:{ga:ne}}},additionalProperties:!0,default:{}},Kr={$id:\"product-config-override\",type:\"object\",properties:{...be.properties,apis:{type:\"object\",additionalProperties:me},theme:be},additionalProperties:!1};var fe=[\"partOf\",\"hasParts\",\"creates\",\"createdBy\",\"owns\",\"ownedBy\",\"implements\",\"implementedBy\",\"dependsOn\",\"dependencyOf\",\"uses\",\"usedBy\",\"produces\",\"consumes\",\"linksTo\",\"supersedes\",\"supersededBy\",\"compatibleWith\",\"extends\",\"extendedBy\",\"relatesTo\",\"hasMember\",\"memberOf\",\"triggers\",\"triggeredBy\",\"returns\",\"returnedBy\"],t=q({UserEntity:\"UserEntity\",UserEntityMetadata:\"UserEntityMetadata\",ApiDescriptionEntity:\"ApiDescriptionEntity\",ApiDescriptionEntityMetadata:\"ApiDescriptionEntityMetadata\",ApiOperationEntity:\"ApiOperationEntity\",ApiOperationEntityMetadata:\"ApiOperationEntityMetadata\",DataSchemaEntity:\"DataSchemaEntity\",DataSchemaEntityMetadata:\"DataSchemaEntityMetadata\",ServiceEntity:\"ServiceEntity\",DomainEntity:\"DomainEntity\",TeamEntity:\"TeamEntity\",Entity:\"Entity\",EntityMetadata:\"EntityMetadata\",EntityLinkList:\"EntityLinkList\",EntityLink:\"EntityLink\",EntityRelation:\"EntityRelation\",EntityRelationList:\"EntityRelationList\",EntityContact:\"EntityContact\",EntitySlackContact:\"EntitySlackContact\",EntitySlackChannel:\"EntitySlackChannel\"});var Hr={type:\"object\",nodeTypeName:t.UserEntityMetadata,properties:{email:{type:\"string\",description:\"Email of the user\"}},required:[\"email\"],additionalProperties:!0},Wr={type:\"object\",nodeTypeName:t.ApiDescriptionEntityMetadata,properties:{specType:{type:\"string\",enum:[\"jsonschema\",\"openapi\",\"asyncapi\",\"avro\",\"zod\",\"graphql\",\"protobuf\",\"arazzo\"],description:\"Type of the API description\"},descriptionFile:{type:\"string\",description:\"Path to the file containing the API description\"}},required:[\"specType\",\"descriptionFile\"],additionalProperties:!0},Vr={type:\"object\",nodeTypeName:t.ApiOperationEntityMetadata,properties:{method:{type:\"string\",enum:[\"GET\",\"POST\",\"PUT\",\"DELETE\",\"PATCH\",\"MUTATION\",\"QUERY\",\"SUBSCRIBE\",\"PUBLISH\"],description:\"HTTP method of the API operation\"},path:{type:\"string\",description:\"Path of the API operation\"},payload:{type:\"array\",items:{type:\"string\",description:\"Related dataSchema name\"}},responses:{type:\"array\",items:{type:\"string\",description:\"Related dataSchema name\"}}},required:[\"method\",\"path\"],additionalProperties:!0},$r={type:\"object\",nodeTypeName:t.DataSchemaEntityMetadata,properties:{specType:{type:\"string\",enum:[\"jsonschema\",\"openapi\",\"asyncapi\",\"avro\",\"zod\",\"graphql\",\"protobuf\",\"arazzo\"],description:\"Specification type of the data schema\"},schema:{type:\"string\",description:\"Inline schema of the data structure\"},sdl:{type:\"string\",description:\"SDL of the data structure\"}},required:[\"specType\"],additionalProperties:!0},Jr={type:\"object\",properties:{},nodeTypeName:t.EntityMetadata,additionalProperties:!0},Xr={type:\"object\",nodeTypeName:t.EntitySlackChannel,properties:{name:{type:\"string\",minLength:2,maxLength:150},url:{type:\"string\"}},required:[\"name\"],additionalProperties:!1},Qr={type:\"object\",nodeTypeName:t.EntitySlackContact,properties:{channels:{type:\"array\",items:Xr}},required:[\"channels\"],additionalProperties:!1},Zr={type:\"object\",nodeTypeName:t.EntityContact,properties:{slack:Qr},additionalProperties:!1},eo={type:\"object\",nodeTypeName:t.EntityLink,properties:{label:{type:\"string\",minLength:2,maxLength:150},url:{type:\"string\"}},required:[\"label\",\"url\"],additionalProperties:!1},to={type:\"object\",nodeTypeName:t.EntityRelation,properties:{type:{type:\"string\",enum:fe},key:{type:\"string\",minLength:2,maxLength:100},version:{type:\"string\"},revision:{type:\"string\"}},required:[\"type\",\"key\"],additionalProperties:!1},g={version:{type:\"string\"},key:{type:\"string\",pattern:\"^[a-z0-9]+(?:-[a-z0-9]+)*$\",minLength:2,maxLength:150},type:{type:\"string\",enum:[\"user\",\"data-schema\",\"api-operation\",\"api-description\",\"service\",\"domain\",\"team\"]},title:{type:\"string\",minLength:2,maxLength:200},summary:{type:\"string\",minLength:1,maxLength:500},tags:{type:\"array\",items:{type:\"string\",minLength:1,maxLength:50}},git:{type:\"array\",items:{type:\"string\"}},contact:Zr,links:{type:\"array\",nodeTypeName:t.EntityLinkList,items:eo},relations:{type:\"array\",nodeTypeName:t.EntityRelationList,items:to},metadata:Jr},ci={type:\"object\",discriminator:{propertyName:\"type\"},oneOf:[{type:\"object\",properties:{...g,type:{const:\"user\"},metadata:Hr},required:[\"key\",\"title\",\"type\",\"metadata\"],additionalProperties:!1,nodeTypeName:t.UserEntity},{type:\"object\",nodeTypeName:t.ApiOperationEntity,properties:{...g,type:{const:\"api-operation\"},metadata:Vr},required:[\"key\",\"title\",\"type\",\"metadata\"],additionalProperties:!1},{type:\"object\",nodeTypeName:t.DataSchemaEntity,properties:{...g,type:{const:\"data-schema\"},metadata:$r},required:[\"key\",\"title\",\"type\",\"metadata\"],additionalProperties:!1},{type:\"object\",nodeTypeName:t.ApiDescriptionEntity,properties:{...g,type:{const:\"api-description\"},metadata:Wr},required:[\"key\",\"title\",\"type\",\"metadata\"],additionalProperties:!1},{type:\"object\",nodeTypeName:t.ServiceEntity,properties:{...g,type:{const:\"service\"}},required:[\"key\",\"title\",\"type\"],additionalProperties:!1},{type:\"object\",nodeTypeName:t.DomainEntity,properties:{...g,type:{const:\"domain\"}},required:[\"key\",\"title\",\"type\"],additionalProperties:!1},{type:\"object\",nodeTypeName:t.TeamEntity,properties:{...g,type:{const:\"team\"}},required:[\"key\",\"title\",\"type\"],additionalProperties:!1}]},li={type:\"object\",nodeTypeName:t.Entity,properties:{...g},required:[\"key\",\"title\",\"type\"],additionalProperties:!1};export{de as ApigeeDevOnboardingIntegrationAuthType,ye as AuthProviderType,i as CONFIG_NODE_TYPE_NAMES,le as DEFAULT_TEAM_CLAIM_NAME,t as ENTITY_NODE_TYPE_NAMES,fe as ENTITY_RELATION_TYPES,Le as LayoutVariant,yr as REDOCLY_ROUTE_RBAC,lr as REDOCLY_TEAMS_RBAC,Wr as apiDescriptionMetadataSchema,Vr as apiOperationMetadataSchema,b as configGovernanceSchema,$r as dataSchemaMetadataSchema,uo as decoratorTypes,Jr as defaultMetadataSchema,g as entityBaseProperties,Zr as entityContactFileSchema,li as entityFileDefaultSchema,ci as entityFileSchema,eo as entityLinkFileSchema,to as entityRelationFileSchema,mo as preprocessorTypes,Kr as productConfigOverrideSchema,be as productThemeOverrideSchema,ue as rbacConfigSchema,S as redocConfigSchema,Yr as rootRedoclyConfigSchema,go as ruleTypes,Xr as slackChannelFileSchema,Qr as slackContactFileSchema,Hr as userMetadataSchema};\n", null, null, null, "// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nexport abstract class _CodeOrName {\n abstract readonly str: string\n abstract readonly names: UsedNames\n abstract toString(): string\n abstract emptyStr(): boolean\n}\n\nexport const IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i\n\nexport class Name extends _CodeOrName {\n readonly str: string\n constructor(s: string) {\n super()\n if (!IDENTIFIER.test(s)) throw new Error(\"CodeGen: name must be a valid identifier\")\n this.str = s\n }\n\n toString(): string {\n return this.str\n }\n\n emptyStr(): boolean {\n return false\n }\n\n get names(): UsedNames {\n return {[this.str]: 1}\n }\n}\n\nexport class _Code extends _CodeOrName {\n readonly _items: readonly CodeItem[]\n private _str?: string\n private _names?: UsedNames\n\n constructor(code: string | readonly CodeItem[]) {\n super()\n this._items = typeof code === \"string\" ? [code] : code\n }\n\n toString(): string {\n return this.str\n }\n\n emptyStr(): boolean {\n if (this._items.length > 1) return false\n const item = this._items[0]\n return item === \"\" || item === '\"\"'\n }\n\n get str(): string {\n return (this._str ??= this._items.reduce((s: string, c: CodeItem) => `${s}${c}`, \"\"))\n }\n\n get names(): UsedNames {\n return (this._names ??= this._items.reduce((names: UsedNames, c) => {\n if (c instanceof Name) names[c.str] = (names[c.str] || 0) + 1\n return names\n }, {}))\n }\n}\n\nexport type CodeItem = Name | string | number | boolean | null\n\nexport type UsedNames = Record\n\nexport type Code = _Code | Name\n\nexport type SafeExpr = Code | number | boolean | null\n\nexport const nil = new _Code(\"\")\n\ntype CodeArg = SafeExpr | string | undefined\n\nexport function _(strs: TemplateStringsArray, ...args: CodeArg[]): _Code {\n const code: CodeItem[] = [strs[0]]\n let i = 0\n while (i < args.length) {\n addCodeArg(code, args[i])\n code.push(strs[++i])\n }\n return new _Code(code)\n}\n\nconst plus = new _Code(\"+\")\n\nexport function str(strs: TemplateStringsArray, ...args: (CodeArg | string[])[]): _Code {\n const expr: CodeItem[] = [safeStringify(strs[0])]\n let i = 0\n while (i < args.length) {\n expr.push(plus)\n addCodeArg(expr, args[i])\n expr.push(plus, safeStringify(strs[++i]))\n }\n optimize(expr)\n return new _Code(expr)\n}\n\nexport function addCodeArg(code: CodeItem[], arg: CodeArg | string[]): void {\n if (arg instanceof _Code) code.push(...arg._items)\n else if (arg instanceof Name) code.push(arg)\n else code.push(interpolate(arg))\n}\n\nfunction optimize(expr: CodeItem[]): void {\n let i = 1\n while (i < expr.length - 1) {\n if (expr[i] === plus) {\n const res = mergeExprItems(expr[i - 1], expr[i + 1])\n if (res !== undefined) {\n expr.splice(i - 1, 3, res)\n continue\n }\n expr[i++] = \"+\"\n }\n i++\n }\n}\n\nfunction mergeExprItems(a: CodeItem, b: CodeItem): CodeItem | undefined {\n if (b === '\"\"') return a\n if (a === '\"\"') return b\n if (typeof a == \"string\") {\n if (b instanceof Name || a[a.length - 1] !== '\"') return\n if (typeof b != \"string\") return `${a.slice(0, -1)}${b}\"`\n if (b[0] === '\"') return a.slice(0, -1) + b.slice(1)\n return\n }\n if (typeof b == \"string\" && b[0] === '\"' && !(a instanceof Name)) return `\"${a}${b.slice(1)}`\n return\n}\n\nexport function strConcat(c1: Code, c2: Code): Code {\n return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`\n}\n\n// TODO do not allow arrays here\nfunction interpolate(x?: string | string[] | number | boolean | null): SafeExpr | string {\n return typeof x == \"number\" || typeof x == \"boolean\" || x === null\n ? x\n : safeStringify(Array.isArray(x) ? x.join(\",\") : x)\n}\n\nexport function stringify(x: unknown): Code {\n return new _Code(safeStringify(x))\n}\n\nexport function safeStringify(x: unknown): string {\n return JSON.stringify(x)\n .replace(/\\u2028/g, \"\\\\u2028\")\n .replace(/\\u2029/g, \"\\\\u2029\")\n}\n\nexport function getProperty(key: Code | string | number): Code {\n return typeof key == \"string\" && IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`\n}\n\n//Does best effort to format the name properly\nexport function getEsmExportName(key: Code | string | number): Code {\n if (typeof key == \"string\" && IDENTIFIER.test(key)) {\n return new _Code(`${key}`)\n }\n throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`)\n}\n\nexport function regexpCode(rx: RegExp): Code {\n return new _Code(rx.toString())\n}\n", "import {_, nil, Code, Name} from \"./code\"\n\ninterface NameGroup {\n prefix: string\n index: number\n}\n\nexport interface NameValue {\n ref: ValueReference // this is the reference to any value that can be referred to from generated code via `globals` var in the closure\n key?: unknown // any key to identify a global to avoid duplicates, if not passed ref is used\n code?: Code // this is the code creating the value needed for standalone code wit_out closure - can be a primitive value, function or import (`require`)\n}\n\nexport type ValueReference = unknown // possibly make CodeGen parameterized type on this type\n\nclass ValueError extends Error {\n readonly value?: NameValue\n constructor(name: ValueScopeName) {\n super(`CodeGen: \"code\" for ${name} not defined`)\n this.value = name.value\n }\n}\n\ninterface ScopeOptions {\n prefixes?: Set\n parent?: Scope\n}\n\ninterface ValueScopeOptions extends ScopeOptions {\n scope: ScopeStore\n es5?: boolean\n lines?: boolean\n}\n\nexport type ScopeStore = Record\n\ntype ScopeValues = {\n [Prefix in string]?: Map\n}\n\nexport type ScopeValueSets = {\n [Prefix in string]?: Set\n}\n\nexport enum UsedValueState {\n Started,\n Completed,\n}\n\nexport type UsedScopeValues = {\n [Prefix in string]?: Map\n}\n\nexport const varKinds = {\n const: new Name(\"const\"),\n let: new Name(\"let\"),\n var: new Name(\"var\"),\n}\n\nexport class Scope {\n protected readonly _names: {[Prefix in string]?: NameGroup} = {}\n protected readonly _prefixes?: Set\n protected readonly _parent?: Scope\n\n constructor({prefixes, parent}: ScopeOptions = {}) {\n this._prefixes = prefixes\n this._parent = parent\n }\n\n toName(nameOrPrefix: Name | string): Name {\n return nameOrPrefix instanceof Name ? nameOrPrefix : this.name(nameOrPrefix)\n }\n\n name(prefix: string): Name {\n return new Name(this._newName(prefix))\n }\n\n protected _newName(prefix: string): string {\n const ng = this._names[prefix] || this._nameGroup(prefix)\n return `${prefix}${ng.index++}`\n }\n\n private _nameGroup(prefix: string): NameGroup {\n if (this._parent?._prefixes?.has(prefix) || (this._prefixes && !this._prefixes.has(prefix))) {\n throw new Error(`CodeGen: prefix \"${prefix}\" is not allowed in this scope`)\n }\n return (this._names[prefix] = {prefix, index: 0})\n }\n}\n\ninterface ScopePath {\n property: string\n itemIndex: number\n}\n\nexport class ValueScopeName extends Name {\n readonly prefix: string\n value?: NameValue\n scopePath?: Code\n\n constructor(prefix: string, nameStr: string) {\n super(nameStr)\n this.prefix = prefix\n }\n\n setValue(value: NameValue, {property, itemIndex}: ScopePath): void {\n this.value = value\n this.scopePath = _`.${new Name(property)}[${itemIndex}]`\n }\n}\n\ninterface VSOptions extends ValueScopeOptions {\n _n: Code\n}\n\nconst line = _`\\n`\n\nexport class ValueScope extends Scope {\n protected readonly _values: ScopeValues = {}\n protected readonly _scope: ScopeStore\n readonly opts: VSOptions\n\n constructor(opts: ValueScopeOptions) {\n super(opts)\n this._scope = opts.scope\n this.opts = {...opts, _n: opts.lines ? line : nil}\n }\n\n get(): ScopeStore {\n return this._scope\n }\n\n name(prefix: string): ValueScopeName {\n return new ValueScopeName(prefix, this._newName(prefix))\n }\n\n value(nameOrPrefix: ValueScopeName | string, value: NameValue): ValueScopeName {\n if (value.ref === undefined) throw new Error(\"CodeGen: ref must be passed in value\")\n const name = this.toName(nameOrPrefix) as ValueScopeName\n const {prefix} = name\n const valueKey = value.key ?? value.ref\n let vs = this._values[prefix]\n if (vs) {\n const _name = vs.get(valueKey)\n if (_name) return _name\n } else {\n vs = this._values[prefix] = new Map()\n }\n vs.set(valueKey, name)\n\n const s = this._scope[prefix] || (this._scope[prefix] = [])\n const itemIndex = s.length\n s[itemIndex] = value.ref\n name.setValue(value, {property: prefix, itemIndex})\n return name\n }\n\n getValue(prefix: string, keyOrRef: unknown): ValueScopeName | undefined {\n const vs = this._values[prefix]\n if (!vs) return\n return vs.get(keyOrRef)\n }\n\n scopeRefs(scopeName: Name, values: ScopeValues | ScopeValueSets = this._values): Code {\n return this._reduceValues(values, (name: ValueScopeName) => {\n if (name.scopePath === undefined) throw new Error(`CodeGen: name \"${name}\" has no value`)\n return _`${scopeName}${name.scopePath}`\n })\n }\n\n scopeCode(\n values: ScopeValues | ScopeValueSets = this._values,\n usedValues?: UsedScopeValues,\n getCode?: (n: ValueScopeName) => Code | undefined\n ): Code {\n return this._reduceValues(\n values,\n (name: ValueScopeName) => {\n if (name.value === undefined) throw new Error(`CodeGen: name \"${name}\" has no value`)\n return name.value.code\n },\n usedValues,\n getCode\n )\n }\n\n private _reduceValues(\n values: ScopeValues | ScopeValueSets,\n valueCode: (n: ValueScopeName) => Code | undefined,\n usedValues: UsedScopeValues = {},\n getCode?: (n: ValueScopeName) => Code | undefined\n ): Code {\n let code: Code = nil\n for (const prefix in values) {\n const vs = values[prefix]\n if (!vs) continue\n const nameSet = (usedValues[prefix] = usedValues[prefix] || new Map())\n vs.forEach((name: ValueScopeName) => {\n if (nameSet.has(name)) return\n nameSet.set(name, UsedValueState.Started)\n let c = valueCode(name)\n if (c) {\n const def = this.opts.es5 ? varKinds.var : varKinds.const\n code = _`${code}${def} ${name} = ${c};${this.opts._n}`\n } else if ((c = getCode?.(name))) {\n code = _`${code}${c}${this.opts._n}`\n } else {\n throw new ValueError(name)\n }\n nameSet.set(name, UsedValueState.Completed)\n })\n }\n return code\n }\n}\n", "import type {ScopeValueSets, NameValue, ValueScope, ValueScopeName} from \"./scope\"\nimport {_, nil, _Code, Code, Name, UsedNames, CodeItem, addCodeArg, _CodeOrName} from \"./code\"\nimport {Scope, varKinds} from \"./scope\"\n\nexport {_, str, strConcat, nil, getProperty, stringify, regexpCode, Name, Code} from \"./code\"\nexport {Scope, ScopeStore, ValueScope, ValueScopeName, ScopeValueSets, varKinds} from \"./scope\"\n\n// type for expressions that can be safely inserted in code without quotes\nexport type SafeExpr = Code | number | boolean | null\n\n// type that is either Code of function that adds code to CodeGen instance using its methods\nexport type Block = Code | (() => void)\n\nexport const operators = {\n GT: new _Code(\">\"),\n GTE: new _Code(\">=\"),\n LT: new _Code(\"<\"),\n LTE: new _Code(\"<=\"),\n EQ: new _Code(\"===\"),\n NEQ: new _Code(\"!==\"),\n NOT: new _Code(\"!\"),\n OR: new _Code(\"||\"),\n AND: new _Code(\"&&\"),\n ADD: new _Code(\"+\"),\n}\n\nabstract class Node {\n abstract readonly names: UsedNames\n\n optimizeNodes(): this | ChildNode | ChildNode[] | undefined {\n return this\n }\n\n optimizeNames(_names: UsedNames, _constants: Constants): this | undefined {\n return this\n }\n\n // get count(): number {\n // return 1\n // }\n}\n\nclass Def extends Node {\n constructor(\n private readonly varKind: Name,\n private readonly name: Name,\n private rhs?: SafeExpr\n ) {\n super()\n }\n\n render({es5, _n}: CGOptions): string {\n const varKind = es5 ? varKinds.var : this.varKind\n const rhs = this.rhs === undefined ? \"\" : ` = ${this.rhs}`\n return `${varKind} ${this.name}${rhs};` + _n\n }\n\n optimizeNames(names: UsedNames, constants: Constants): this | undefined {\n if (!names[this.name.str]) return\n if (this.rhs) this.rhs = optimizeExpr(this.rhs, names, constants)\n return this\n }\n\n get names(): UsedNames {\n return this.rhs instanceof _CodeOrName ? this.rhs.names : {}\n }\n}\n\nclass Assign extends Node {\n constructor(\n readonly lhs: Code,\n public rhs: SafeExpr,\n private readonly sideEffects?: boolean\n ) {\n super()\n }\n\n render({_n}: CGOptions): string {\n return `${this.lhs} = ${this.rhs};` + _n\n }\n\n optimizeNames(names: UsedNames, constants: Constants): this | undefined {\n if (this.lhs instanceof Name && !names[this.lhs.str] && !this.sideEffects) return\n this.rhs = optimizeExpr(this.rhs, names, constants)\n return this\n }\n\n get names(): UsedNames {\n const names = this.lhs instanceof Name ? {} : {...this.lhs.names}\n return addExprNames(names, this.rhs)\n }\n}\n\nclass AssignOp extends Assign {\n constructor(\n lhs: Code,\n private readonly op: Code,\n rhs: SafeExpr,\n sideEffects?: boolean\n ) {\n super(lhs, rhs, sideEffects)\n }\n\n render({_n}: CGOptions): string {\n return `${this.lhs} ${this.op}= ${this.rhs};` + _n\n }\n}\n\nclass Label extends Node {\n readonly names: UsedNames = {}\n constructor(readonly label: Name) {\n super()\n }\n\n render({_n}: CGOptions): string {\n return `${this.label}:` + _n\n }\n}\n\nclass Break extends Node {\n readonly names: UsedNames = {}\n constructor(readonly label?: Code) {\n super()\n }\n\n render({_n}: CGOptions): string {\n const label = this.label ? ` ${this.label}` : \"\"\n return `break${label};` + _n\n }\n}\n\nclass Throw extends Node {\n constructor(readonly error: Code) {\n super()\n }\n\n render({_n}: CGOptions): string {\n return `throw ${this.error};` + _n\n }\n\n get names(): UsedNames {\n return this.error.names\n }\n}\n\nclass AnyCode extends Node {\n constructor(private code: SafeExpr) {\n super()\n }\n\n render({_n}: CGOptions): string {\n return `${this.code};` + _n\n }\n\n optimizeNodes(): this | undefined {\n return `${this.code}` ? this : undefined\n }\n\n optimizeNames(names: UsedNames, constants: Constants): this {\n this.code = optimizeExpr(this.code, names, constants)\n return this\n }\n\n get names(): UsedNames {\n return this.code instanceof _CodeOrName ? this.code.names : {}\n }\n}\n\nabstract class ParentNode extends Node {\n constructor(readonly nodes: ChildNode[] = []) {\n super()\n }\n\n render(opts: CGOptions): string {\n return this.nodes.reduce((code, n) => code + n.render(opts), \"\")\n }\n\n optimizeNodes(): this | ChildNode | ChildNode[] | undefined {\n const {nodes} = this\n let i = nodes.length\n while (i--) {\n const n = nodes[i].optimizeNodes()\n if (Array.isArray(n)) nodes.splice(i, 1, ...n)\n else if (n) nodes[i] = n\n else nodes.splice(i, 1)\n }\n return nodes.length > 0 ? this : undefined\n }\n\n optimizeNames(names: UsedNames, constants: Constants): this | undefined {\n const {nodes} = this\n let i = nodes.length\n while (i--) {\n // iterating backwards improves 1-pass optimization\n const n = nodes[i]\n if (n.optimizeNames(names, constants)) continue\n subtractNames(names, n.names)\n nodes.splice(i, 1)\n }\n return nodes.length > 0 ? this : undefined\n }\n\n get names(): UsedNames {\n return this.nodes.reduce((names: UsedNames, n) => addNames(names, n.names), {})\n }\n\n // get count(): number {\n // return this.nodes.reduce((c, n) => c + n.count, 1)\n // }\n}\n\nabstract class BlockNode extends ParentNode {\n render(opts: CGOptions): string {\n return \"{\" + opts._n + super.render(opts) + \"}\" + opts._n\n }\n}\n\nclass Root extends ParentNode {}\n\nclass Else extends BlockNode {\n static readonly kind = \"else\"\n}\n\nclass If extends BlockNode {\n static readonly kind = \"if\"\n else?: If | Else\n constructor(\n private condition: Code | boolean,\n nodes?: ChildNode[]\n ) {\n super(nodes)\n }\n\n render(opts: CGOptions): string {\n let code = `if(${this.condition})` + super.render(opts)\n if (this.else) code += \"else \" + this.else.render(opts)\n return code\n }\n\n optimizeNodes(): If | ChildNode[] | undefined {\n super.optimizeNodes()\n const cond = this.condition\n if (cond === true) return this.nodes // else is ignored here\n let e = this.else\n if (e) {\n const ns = e.optimizeNodes()\n e = this.else = Array.isArray(ns) ? new Else(ns) : (ns as Else | undefined)\n }\n if (e) {\n if (cond === false) return e instanceof If ? e : e.nodes\n if (this.nodes.length) return this\n return new If(not(cond), e instanceof If ? [e] : e.nodes)\n }\n if (cond === false || !this.nodes.length) return undefined\n return this\n }\n\n optimizeNames(names: UsedNames, constants: Constants): this | undefined {\n this.else = this.else?.optimizeNames(names, constants)\n if (!(super.optimizeNames(names, constants) || this.else)) return\n this.condition = optimizeExpr(this.condition, names, constants)\n return this\n }\n\n get names(): UsedNames {\n const names = super.names\n addExprNames(names, this.condition)\n if (this.else) addNames(names, this.else.names)\n return names\n }\n\n // get count(): number {\n // return super.count + (this.else?.count || 0)\n // }\n}\n\nabstract class For extends BlockNode {\n static readonly kind = \"for\"\n}\n\nclass ForLoop extends For {\n constructor(private iteration: Code) {\n super()\n }\n\n render(opts: CGOptions): string {\n return `for(${this.iteration})` + super.render(opts)\n }\n\n optimizeNames(names: UsedNames, constants: Constants): this | undefined {\n if (!super.optimizeNames(names, constants)) return\n this.iteration = optimizeExpr(this.iteration, names, constants)\n return this\n }\n\n get names(): UsedNames {\n return addNames(super.names, this.iteration.names)\n }\n}\n\nclass ForRange extends For {\n constructor(\n private readonly varKind: Name,\n private readonly name: Name,\n private readonly from: SafeExpr,\n private readonly to: SafeExpr\n ) {\n super()\n }\n\n render(opts: CGOptions): string {\n const varKind = opts.es5 ? varKinds.var : this.varKind\n const {name, from, to} = this\n return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts)\n }\n\n get names(): UsedNames {\n const names = addExprNames(super.names, this.from)\n return addExprNames(names, this.to)\n }\n}\n\nclass ForIter extends For {\n constructor(\n private readonly loop: \"of\" | \"in\",\n private readonly varKind: Name,\n private readonly name: Name,\n private iterable: Code\n ) {\n super()\n }\n\n render(opts: CGOptions): string {\n return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts)\n }\n\n optimizeNames(names: UsedNames, constants: Constants): this | undefined {\n if (!super.optimizeNames(names, constants)) return\n this.iterable = optimizeExpr(this.iterable, names, constants)\n return this\n }\n\n get names(): UsedNames {\n return addNames(super.names, this.iterable.names)\n }\n}\n\nclass Func extends BlockNode {\n static readonly kind = \"func\"\n constructor(\n public name: Name,\n public args: Code,\n public async?: boolean\n ) {\n super()\n }\n\n render(opts: CGOptions): string {\n const _async = this.async ? \"async \" : \"\"\n return `${_async}function ${this.name}(${this.args})` + super.render(opts)\n }\n}\n\nclass Return extends ParentNode {\n static readonly kind = \"return\"\n\n render(opts: CGOptions): string {\n return \"return \" + super.render(opts)\n }\n}\n\nclass Try extends BlockNode {\n catch?: Catch\n finally?: Finally\n\n render(opts: CGOptions): string {\n let code = \"try\" + super.render(opts)\n if (this.catch) code += this.catch.render(opts)\n if (this.finally) code += this.finally.render(opts)\n return code\n }\n\n optimizeNodes(): this {\n super.optimizeNodes()\n this.catch?.optimizeNodes() as Catch | undefined\n this.finally?.optimizeNodes() as Finally | undefined\n return this\n }\n\n optimizeNames(names: UsedNames, constants: Constants): this {\n super.optimizeNames(names, constants)\n this.catch?.optimizeNames(names, constants)\n this.finally?.optimizeNames(names, constants)\n return this\n }\n\n get names(): UsedNames {\n const names = super.names\n if (this.catch) addNames(names, this.catch.names)\n if (this.finally) addNames(names, this.finally.names)\n return names\n }\n\n // get count(): number {\n // return super.count + (this.catch?.count || 0) + (this.finally?.count || 0)\n // }\n}\n\nclass Catch extends BlockNode {\n static readonly kind = \"catch\"\n constructor(readonly error: Name) {\n super()\n }\n\n render(opts: CGOptions): string {\n return `catch(${this.error})` + super.render(opts)\n }\n}\n\nclass Finally extends BlockNode {\n static readonly kind = \"finally\"\n render(opts: CGOptions): string {\n return \"finally\" + super.render(opts)\n }\n}\n\ntype StartBlockNode = If | For | Func | Return | Try\n\ntype LeafNode = Def | Assign | Label | Break | Throw | AnyCode\n\ntype ChildNode = StartBlockNode | LeafNode\n\ntype EndBlockNodeType =\n | typeof If\n | typeof Else\n | typeof For\n | typeof Func\n | typeof Return\n | typeof Catch\n | typeof Finally\n\ntype Constants = Record\n\nexport interface CodeGenOptions {\n es5?: boolean\n lines?: boolean\n ownProperties?: boolean\n}\n\ninterface CGOptions extends CodeGenOptions {\n _n: \"\\n\" | \"\"\n}\n\nexport class CodeGen {\n readonly _scope: Scope\n readonly _extScope: ValueScope\n readonly _values: ScopeValueSets = {}\n private readonly _nodes: ParentNode[]\n private readonly _blockStarts: number[] = []\n private readonly _constants: Constants = {}\n private readonly opts: CGOptions\n\n constructor(extScope: ValueScope, opts: CodeGenOptions = {}) {\n this.opts = {...opts, _n: opts.lines ? \"\\n\" : \"\"}\n this._extScope = extScope\n this._scope = new Scope({parent: extScope})\n this._nodes = [new Root()]\n }\n\n toString(): string {\n return this._root.render(this.opts)\n }\n\n // returns unique name in the internal scope\n name(prefix: string): Name {\n return this._scope.name(prefix)\n }\n\n // reserves unique name in the external scope\n scopeName(prefix: string): ValueScopeName {\n return this._extScope.name(prefix)\n }\n\n // reserves unique name in the external scope and assigns value to it\n scopeValue(prefixOrName: ValueScopeName | string, value: NameValue): Name {\n const name = this._extScope.value(prefixOrName, value)\n const vs = this._values[name.prefix] || (this._values[name.prefix] = new Set())\n vs.add(name)\n return name\n }\n\n getScopeValue(prefix: string, keyOrRef: unknown): ValueScopeName | undefined {\n return this._extScope.getValue(prefix, keyOrRef)\n }\n\n // return code that assigns values in the external scope to the names that are used internally\n // (same names that were returned by gen.scopeName or gen.scopeValue)\n scopeRefs(scopeName: Name): Code {\n return this._extScope.scopeRefs(scopeName, this._values)\n }\n\n scopeCode(): Code {\n return this._extScope.scopeCode(this._values)\n }\n\n private _def(\n varKind: Name,\n nameOrPrefix: Name | string,\n rhs?: SafeExpr,\n constant?: boolean\n ): Name {\n const name = this._scope.toName(nameOrPrefix)\n if (rhs !== undefined && constant) this._constants[name.str] = rhs\n this._leafNode(new Def(varKind, name, rhs))\n return name\n }\n\n // `const` declaration (`var` in es5 mode)\n const(nameOrPrefix: Name | string, rhs: SafeExpr, _constant?: boolean): Name {\n return this._def(varKinds.const, nameOrPrefix, rhs, _constant)\n }\n\n // `let` declaration with optional assignment (`var` in es5 mode)\n let(nameOrPrefix: Name | string, rhs?: SafeExpr, _constant?: boolean): Name {\n return this._def(varKinds.let, nameOrPrefix, rhs, _constant)\n }\n\n // `var` declaration with optional assignment\n var(nameOrPrefix: Name | string, rhs?: SafeExpr, _constant?: boolean): Name {\n return this._def(varKinds.var, nameOrPrefix, rhs, _constant)\n }\n\n // assignment code\n assign(lhs: Code, rhs: SafeExpr, sideEffects?: boolean): CodeGen {\n return this._leafNode(new Assign(lhs, rhs, sideEffects))\n }\n\n // `+=` code\n add(lhs: Code, rhs: SafeExpr): CodeGen {\n return this._leafNode(new AssignOp(lhs, operators.ADD, rhs))\n }\n\n // appends passed SafeExpr to code or executes Block\n code(c: Block | SafeExpr): CodeGen {\n if (typeof c == \"function\") c()\n else if (c !== nil) this._leafNode(new AnyCode(c))\n return this\n }\n\n // returns code for object literal for the passed argument list of key-value pairs\n object(...keyValues: [Name | string, SafeExpr | string][]): _Code {\n const code: CodeItem[] = [\"{\"]\n for (const [key, value] of keyValues) {\n if (code.length > 1) code.push(\",\")\n code.push(key)\n if (key !== value || this.opts.es5) {\n code.push(\":\")\n addCodeArg(code, value)\n }\n }\n code.push(\"}\")\n return new _Code(code)\n }\n\n // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)\n if(condition: Code | boolean, thenBody?: Block, elseBody?: Block): CodeGen {\n this._blockNode(new If(condition))\n\n if (thenBody && elseBody) {\n this.code(thenBody).else().code(elseBody).endIf()\n } else if (thenBody) {\n this.code(thenBody).endIf()\n } else if (elseBody) {\n throw new Error('CodeGen: \"else\" body without \"then\" body')\n }\n return this\n }\n\n // `else if` clause - invalid without `if` or after `else` clauses\n elseIf(condition: Code | boolean): CodeGen {\n return this._elseNode(new If(condition))\n }\n\n // `else` clause - only valid after `if` or `else if` clauses\n else(): CodeGen {\n return this._elseNode(new Else())\n }\n\n // end `if` statement (needed if gen.if was used only with condition)\n endIf(): CodeGen {\n return this._endBlockNode(If, Else)\n }\n\n private _for(node: For, forBody?: Block): CodeGen {\n this._blockNode(node)\n if (forBody) this.code(forBody).endFor()\n return this\n }\n\n // a generic `for` clause (or statement if `forBody` is passed)\n for(iteration: Code, forBody?: Block): CodeGen {\n return this._for(new ForLoop(iteration), forBody)\n }\n\n // `for` statement for a range of values\n forRange(\n nameOrPrefix: Name | string,\n from: SafeExpr,\n to: SafeExpr,\n forBody: (index: Name) => void,\n varKind: Code = this.opts.es5 ? varKinds.var : varKinds.let\n ): CodeGen {\n const name = this._scope.toName(nameOrPrefix)\n return this._for(new ForRange(varKind, name, from, to), () => forBody(name))\n }\n\n // `for-of` statement (in es5 mode replace with a normal for loop)\n forOf(\n nameOrPrefix: Name | string,\n iterable: Code,\n forBody: (item: Name) => void,\n varKind: Code = varKinds.const\n ): CodeGen {\n const name = this._scope.toName(nameOrPrefix)\n if (this.opts.es5) {\n const arr = iterable instanceof Name ? iterable : this.var(\"_arr\", iterable)\n return this.forRange(\"_i\", 0, _`${arr}.length`, (i) => {\n this.var(name, _`${arr}[${i}]`)\n forBody(name)\n })\n }\n return this._for(new ForIter(\"of\", varKind, name, iterable), () => forBody(name))\n }\n\n // `for-in` statement.\n // With option `ownProperties` replaced with a `for-of` loop for object keys\n forIn(\n nameOrPrefix: Name | string,\n obj: Code,\n forBody: (item: Name) => void,\n varKind: Code = this.opts.es5 ? varKinds.var : varKinds.const\n ): CodeGen {\n if (this.opts.ownProperties) {\n return this.forOf(nameOrPrefix, _`Object.keys(${obj})`, forBody)\n }\n const name = this._scope.toName(nameOrPrefix)\n return this._for(new ForIter(\"in\", varKind, name, obj), () => forBody(name))\n }\n\n // end `for` loop\n endFor(): CodeGen {\n return this._endBlockNode(For)\n }\n\n // `label` statement\n label(label: Name): CodeGen {\n return this._leafNode(new Label(label))\n }\n\n // `break` statement\n break(label?: Code): CodeGen {\n return this._leafNode(new Break(label))\n }\n\n // `return` statement\n return(value: Block | SafeExpr): CodeGen {\n const node = new Return()\n this._blockNode(node)\n this.code(value)\n if (node.nodes.length !== 1) throw new Error('CodeGen: \"return\" should have one node')\n return this._endBlockNode(Return)\n }\n\n // `try` statement\n try(tryBody: Block, catchCode?: (e: Name) => void, finallyCode?: Block): CodeGen {\n if (!catchCode && !finallyCode) throw new Error('CodeGen: \"try\" without \"catch\" and \"finally\"')\n const node = new Try()\n this._blockNode(node)\n this.code(tryBody)\n if (catchCode) {\n const error = this.name(\"e\")\n this._currNode = node.catch = new Catch(error)\n catchCode(error)\n }\n if (finallyCode) {\n this._currNode = node.finally = new Finally()\n this.code(finallyCode)\n }\n return this._endBlockNode(Catch, Finally)\n }\n\n // `throw` statement\n throw(error: Code): CodeGen {\n return this._leafNode(new Throw(error))\n }\n\n // start self-balancing block\n block(body?: Block, nodeCount?: number): CodeGen {\n this._blockStarts.push(this._nodes.length)\n if (body) this.code(body).endBlock(nodeCount)\n return this\n }\n\n // end the current self-balancing block\n endBlock(nodeCount?: number): CodeGen {\n const len = this._blockStarts.pop()\n if (len === undefined) throw new Error(\"CodeGen: not in self-balancing block\")\n const toClose = this._nodes.length - len\n if (toClose < 0 || (nodeCount !== undefined && toClose !== nodeCount)) {\n throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`)\n }\n this._nodes.length = len\n return this\n }\n\n // `function` heading (or definition if funcBody is passed)\n func(name: Name, args: Code = nil, async?: boolean, funcBody?: Block): CodeGen {\n this._blockNode(new Func(name, args, async))\n if (funcBody) this.code(funcBody).endFunc()\n return this\n }\n\n // end function definition\n endFunc(): CodeGen {\n return this._endBlockNode(Func)\n }\n\n optimize(n = 1): void {\n while (n-- > 0) {\n this._root.optimizeNodes()\n this._root.optimizeNames(this._root.names, this._constants)\n }\n }\n\n private _leafNode(node: LeafNode): CodeGen {\n this._currNode.nodes.push(node)\n return this\n }\n\n private _blockNode(node: StartBlockNode): void {\n this._currNode.nodes.push(node)\n this._nodes.push(node)\n }\n\n private _endBlockNode(N1: EndBlockNodeType, N2?: EndBlockNodeType): CodeGen {\n const n = this._currNode\n if (n instanceof N1 || (N2 && n instanceof N2)) {\n this._nodes.pop()\n return this\n }\n throw new Error(`CodeGen: not in block \"${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}\"`)\n }\n\n private _elseNode(node: If | Else): CodeGen {\n const n = this._currNode\n if (!(n instanceof If)) {\n throw new Error('CodeGen: \"else\" without \"if\"')\n }\n this._currNode = n.else = node\n return this\n }\n\n private get _root(): Root {\n return this._nodes[0] as Root\n }\n\n private get _currNode(): ParentNode {\n const ns = this._nodes\n return ns[ns.length - 1]\n }\n\n private set _currNode(node: ParentNode) {\n const ns = this._nodes\n ns[ns.length - 1] = node\n }\n\n // get nodeCount(): number {\n // return this._root.count\n // }\n}\n\nfunction addNames(names: UsedNames, from: UsedNames): UsedNames {\n for (const n in from) names[n] = (names[n] || 0) + (from[n] || 0)\n return names\n}\n\nfunction addExprNames(names: UsedNames, from: SafeExpr): UsedNames {\n return from instanceof _CodeOrName ? addNames(names, from.names) : names\n}\n\nfunction optimizeExpr(expr: T, names: UsedNames, constants: Constants): T\nfunction optimizeExpr(expr: SafeExpr, names: UsedNames, constants: Constants): SafeExpr {\n if (expr instanceof Name) return replaceName(expr)\n if (!canOptimize(expr)) return expr\n return new _Code(\n expr._items.reduce((items: CodeItem[], c: SafeExpr | string) => {\n if (c instanceof Name) c = replaceName(c)\n if (c instanceof _Code) items.push(...c._items)\n else items.push(c)\n return items\n }, [])\n )\n\n function replaceName(n: Name): SafeExpr {\n const c = constants[n.str]\n if (c === undefined || names[n.str] !== 1) return n\n delete names[n.str]\n return c\n }\n\n function canOptimize(e: SafeExpr): e is _Code {\n return (\n e instanceof _Code &&\n e._items.some(\n (c) => c instanceof Name && names[c.str] === 1 && constants[c.str] !== undefined\n )\n )\n }\n}\n\nfunction subtractNames(names: UsedNames, from: UsedNames): void {\n for (const n in from) names[n] = (names[n] || 0) - (from[n] || 0)\n}\n\nexport function not(x: T): T\nexport function not(x: Code | SafeExpr): Code | SafeExpr {\n return typeof x == \"boolean\" || typeof x == \"number\" || x === null ? !x : _`!${par(x)}`\n}\n\nconst andCode = mappend(operators.AND)\n\n// boolean AND (&&) expression with the passed arguments\nexport function and(...args: Code[]): Code {\n return args.reduce(andCode)\n}\n\nconst orCode = mappend(operators.OR)\n\n// boolean OR (||) expression with the passed arguments\nexport function or(...args: Code[]): Code {\n return args.reduce(orCode)\n}\n\ntype MAppend = (x: Code, y: Code) => Code\n\nfunction mappend(op: Code): MAppend {\n return (x, y) => (x === nil ? y : y === nil ? x : _`${par(x)} ${op} ${par(y)}`)\n}\n\nfunction par(x: Code): Code {\n return x instanceof Name ? x : _`(${x})`\n}\n", "import type {AnySchema, EvaluatedProperties, EvaluatedItems} from \"../types\"\nimport type {SchemaCxt, SchemaObjCxt} from \".\"\nimport {_, getProperty, Code, Name, CodeGen} from \"./codegen\"\nimport {_Code} from \"./codegen/code\"\nimport type {Rule, ValidationRules} from \"./rules\"\n\n// TODO refactor to use Set\nexport function toHash(arr: T[]): {[K in T]?: true} {\n const hash: {[K in T]?: true} = {}\n for (const item of arr) hash[item] = true\n return hash\n}\n\nexport function alwaysValidSchema(it: SchemaCxt, schema: AnySchema): boolean | void {\n if (typeof schema == \"boolean\") return schema\n if (Object.keys(schema).length === 0) return true\n checkUnknownRules(it, schema)\n return !schemaHasRules(schema, it.self.RULES.all)\n}\n\nexport function checkUnknownRules(it: SchemaCxt, schema: AnySchema = it.schema): void {\n const {opts, self} = it\n if (!opts.strictSchema) return\n if (typeof schema === \"boolean\") return\n const rules = self.RULES.keywords\n for (const key in schema) {\n if (!rules[key]) checkStrictMode(it, `unknown keyword: \"${key}\"`)\n }\n}\n\nexport function schemaHasRules(\n schema: AnySchema,\n rules: {[Key in string]?: boolean | Rule}\n): boolean {\n if (typeof schema == \"boolean\") return !schema\n for (const key in schema) if (rules[key]) return true\n return false\n}\n\nexport function schemaHasRulesButRef(schema: AnySchema, RULES: ValidationRules): boolean {\n if (typeof schema == \"boolean\") return !schema\n for (const key in schema) if (key !== \"$ref\" && RULES.all[key]) return true\n return false\n}\n\nexport function schemaRefOrVal(\n {topSchemaRef, schemaPath}: SchemaObjCxt,\n schema: unknown,\n keyword: string,\n $data?: string | false\n): Code | number | boolean {\n if (!$data) {\n if (typeof schema == \"number\" || typeof schema == \"boolean\") return schema\n if (typeof schema == \"string\") return _`${schema}`\n }\n return _`${topSchemaRef}${schemaPath}${getProperty(keyword)}`\n}\n\nexport function unescapeFragment(str: string): string {\n return unescapeJsonPointer(decodeURIComponent(str))\n}\n\nexport function escapeFragment(str: string | number): string {\n return encodeURIComponent(escapeJsonPointer(str))\n}\n\nexport function escapeJsonPointer(str: string | number): string {\n if (typeof str == \"number\") return `${str}`\n return str.replace(/~/g, \"~0\").replace(/\\//g, \"~1\")\n}\n\nexport function unescapeJsonPointer(str: string): string {\n return str.replace(/~1/g, \"/\").replace(/~0/g, \"~\")\n}\n\nexport function eachItem(xs: T | T[], f: (x: T) => void): void {\n if (Array.isArray(xs)) {\n for (const x of xs) f(x)\n } else {\n f(xs)\n }\n}\n\ntype SomeEvaluated = EvaluatedProperties | EvaluatedItems\n\ntype MergeEvaluatedFunc = (\n gen: CodeGen,\n from: Name | T,\n to: Name | Exclude | undefined,\n toName?: typeof Name\n) => Name | T\n\ninterface MakeMergeFuncArgs {\n mergeNames: (gen: CodeGen, from: Name, to: Name) => void\n mergeToName: (gen: CodeGen, from: T, to: Name) => void\n mergeValues: (from: T, to: Exclude) => T\n resultToName: (gen: CodeGen, res?: T) => Name\n}\n\nfunction makeMergeEvaluated({\n mergeNames,\n mergeToName,\n mergeValues,\n resultToName,\n}: MakeMergeFuncArgs): MergeEvaluatedFunc {\n return (gen, from, to, toName) => {\n const res =\n to === undefined\n ? from\n : to instanceof Name\n ? (from instanceof Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to)\n : from instanceof Name\n ? (mergeToName(gen, to, from), from)\n : mergeValues(from, to)\n return toName === Name && !(res instanceof Name) ? resultToName(gen, res) : res\n }\n}\n\ninterface MergeEvaluated {\n props: MergeEvaluatedFunc\n items: MergeEvaluatedFunc\n}\n\nexport const mergeEvaluated: MergeEvaluated = {\n props: makeMergeEvaluated({\n mergeNames: (gen, from, to) =>\n gen.if(_`${to} !== true && ${from} !== undefined`, () => {\n gen.if(\n _`${from} === true`,\n () => gen.assign(to, true),\n () => gen.assign(to, _`${to} || {}`).code(_`Object.assign(${to}, ${from})`)\n )\n }),\n mergeToName: (gen, from, to) =>\n gen.if(_`${to} !== true`, () => {\n if (from === true) {\n gen.assign(to, true)\n } else {\n gen.assign(to, _`${to} || {}`)\n setEvaluated(gen, to, from)\n }\n }),\n mergeValues: (from, to) => (from === true ? true : {...from, ...to}),\n resultToName: evaluatedPropsToName,\n }),\n items: makeMergeEvaluated({\n mergeNames: (gen, from, to) =>\n gen.if(_`${to} !== true && ${from} !== undefined`, () =>\n gen.assign(to, _`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)\n ),\n mergeToName: (gen, from, to) =>\n gen.if(_`${to} !== true`, () =>\n gen.assign(to, from === true ? true : _`${to} > ${from} ? ${to} : ${from}`)\n ),\n mergeValues: (from, to) => (from === true ? true : Math.max(from, to)),\n resultToName: (gen, items) => gen.var(\"items\", items),\n }),\n}\n\nexport function evaluatedPropsToName(gen: CodeGen, ps?: EvaluatedProperties): Name {\n if (ps === true) return gen.var(\"props\", true)\n const props = gen.var(\"props\", _`{}`)\n if (ps !== undefined) setEvaluated(gen, props, ps)\n return props\n}\n\nexport function setEvaluated(gen: CodeGen, props: Name, ps: {[K in string]?: true}): void {\n Object.keys(ps).forEach((p) => gen.assign(_`${props}${getProperty(p)}`, true))\n}\n\nconst snippets: {[S in string]?: _Code} = {}\n\nexport function useFunc(gen: CodeGen, f: {code: string}): Name {\n return gen.scopeValue(\"func\", {\n ref: f,\n code: snippets[f.code] || (snippets[f.code] = new _Code(f.code)),\n })\n}\n\nexport enum Type {\n Num,\n Str,\n}\n\nexport function getErrorPath(\n dataProp: Name | string | number,\n dataPropType?: Type,\n jsPropertySyntax?: boolean\n): Code | string {\n // let path\n if (dataProp instanceof Name) {\n const isNumber = dataPropType === Type.Num\n return jsPropertySyntax\n ? isNumber\n ? _`\"[\" + ${dataProp} + \"]\"`\n : _`\"['\" + ${dataProp} + \"']\"`\n : isNumber\n ? _`\"/\" + ${dataProp}`\n : _`\"/\" + ${dataProp}.replace(/~/g, \"~0\").replace(/\\\\//g, \"~1\")` // TODO maybe use global escapePointer\n }\n return jsPropertySyntax ? getProperty(dataProp).toString() : \"/\" + escapeJsonPointer(dataProp)\n}\n\nexport function checkStrictMode(\n it: SchemaCxt,\n msg: string,\n mode: boolean | \"log\" = it.opts.strictSchema\n): void {\n if (!mode) return\n msg = `strict mode: ${msg}`\n if (mode === true) throw new Error(msg)\n it.self.logger.warn(msg)\n}\n", "import {Name} from \"./codegen\"\n\nconst names = {\n // validation function arguments\n data: new Name(\"data\"), // data passed to validation function\n // args passed from referencing schema\n valCxt: new Name(\"valCxt\"), // validation/data context - should not be used directly, it is destructured to the names below\n instancePath: new Name(\"instancePath\"),\n parentData: new Name(\"parentData\"),\n parentDataProperty: new Name(\"parentDataProperty\"),\n rootData: new Name(\"rootData\"), // root data - same as the data passed to the first/top validation function\n dynamicAnchors: new Name(\"dynamicAnchors\"), // used to support recursiveRef and dynamicRef\n isAllOfVariant: new Name(\"isAllOfVariant\"), // used to check in runtime if the current function (ref) is called from allOf\n // function scoped variables\n vErrors: new Name(\"vErrors\"), // null or array of validation errors\n errors: new Name(\"errors\"), // counter of validation errors\n this: new Name(\"this\"),\n // \"globals\"\n self: new Name(\"self\"),\n scope: new Name(\"scope\"),\n // JTD serialize/parse name for JSON string and position\n json: new Name(\"json\"),\n jsonPos: new Name(\"jsonPos\"),\n jsonLen: new Name(\"jsonLen\"),\n jsonPart: new Name(\"jsonPart\"),\n}\n\nexport default names\n", "import type {KeywordErrorCxt, KeywordErrorDefinition} from \"../types\"\nimport type {SchemaCxt} from \"./index\"\nimport {CodeGen, _, str, strConcat, Code, Name} from \"./codegen\"\nimport {SafeExpr} from \"./codegen/code\"\nimport {getErrorPath, Type} from \"./util\"\nimport N from \"./names\"\n\nexport const keywordError: KeywordErrorDefinition = {\n message: ({keyword}) => str`must pass \"${keyword}\" keyword validation`,\n}\n\nexport const keyword$DataError: KeywordErrorDefinition = {\n message: ({keyword, schemaType}) =>\n schemaType\n ? str`\"${keyword}\" keyword must be ${schemaType} ($data)`\n : str`\"${keyword}\" keyword is invalid ($data)`,\n}\n\nexport interface ErrorPaths {\n instancePath?: Code\n schemaPath?: string\n parentSchema?: boolean\n}\n\nexport function reportError(\n cxt: KeywordErrorCxt,\n error: KeywordErrorDefinition = keywordError,\n errorPaths?: ErrorPaths,\n overrideAllErrors?: boolean\n): void {\n const {it} = cxt\n const {gen, compositeRule, allErrors} = it\n const errObj = errorObjectCode(cxt, error, errorPaths)\n if (overrideAllErrors ?? (compositeRule || allErrors)) {\n addError(gen, errObj)\n } else {\n returnErrors(it, _`[${errObj}]`)\n }\n}\n\nexport function reportExtraError(\n cxt: KeywordErrorCxt,\n error: KeywordErrorDefinition = keywordError,\n errorPaths?: ErrorPaths\n): void {\n const {it} = cxt\n const {gen, compositeRule, allErrors} = it\n const errObj = errorObjectCode(cxt, error, errorPaths)\n addError(gen, errObj)\n if (!(compositeRule || allErrors)) {\n returnErrors(it, N.vErrors)\n }\n}\n\nexport function resetErrorsCount(gen: CodeGen, errsCount: Name): void {\n gen.assign(N.errors, errsCount)\n gen.if(_`${N.vErrors} !== null`, () =>\n gen.if(\n errsCount,\n () => gen.assign(_`${N.vErrors}.length`, errsCount),\n () => gen.assign(N.vErrors, null)\n )\n )\n}\n\nexport function extendErrors({\n gen,\n keyword,\n schemaValue,\n data,\n errsCount,\n it,\n}: KeywordErrorCxt): void {\n /* istanbul ignore if */\n if (errsCount === undefined) throw new Error(\"ajv implementation error\")\n const err = gen.name(\"err\")\n gen.forRange(\"i\", errsCount, N.errors, (i) => {\n gen.const(err, _`${N.vErrors}[${i}]`)\n gen.if(_`${err}.instancePath === undefined`, () =>\n gen.assign(_`${err}.instancePath`, strConcat(N.instancePath, it.errorPath))\n )\n gen.assign(_`${err}.schemaPath`, str`${it.errSchemaPath}/${keyword}`)\n if (it.opts.verbose) {\n gen.assign(_`${err}.schema`, schemaValue)\n gen.assign(_`${err}.data`, data)\n }\n })\n}\n\nfunction addError(gen: CodeGen, errObj: Code): void {\n const err = gen.const(\"err\", errObj)\n gen.if(\n _`${N.vErrors} === null`,\n () => gen.assign(N.vErrors, _`[${err}]`),\n _`${N.vErrors}.push(${err})`\n )\n gen.code(_`${N.errors}++`)\n}\n\nfunction returnErrors(it: SchemaCxt, errs: Code): void {\n const {gen, validateName, schemaEnv} = it\n if (schemaEnv.$async) {\n gen.throw(_`new ${it.ValidationError as Name}(${errs})`)\n } else {\n gen.assign(_`${validateName}.errors`, errs)\n gen.return(false)\n }\n}\n\nconst E = {\n keyword: new Name(\"keyword\"),\n schemaPath: new Name(\"schemaPath\"), // also used in JTD errors\n params: new Name(\"params\"),\n propertyName: new Name(\"propertyName\"),\n message: new Name(\"message\"),\n schema: new Name(\"schema\"),\n parentSchema: new Name(\"parentSchema\"),\n}\n\nfunction errorObjectCode(\n cxt: KeywordErrorCxt,\n error: KeywordErrorDefinition,\n errorPaths?: ErrorPaths\n): Code {\n const {createErrors} = cxt.it\n if (createErrors === false) return _`{}`\n return errorObject(cxt, error, errorPaths)\n}\n\nfunction errorObject(\n cxt: KeywordErrorCxt,\n error: KeywordErrorDefinition,\n errorPaths: ErrorPaths = {}\n): Code {\n const {gen, it} = cxt\n const keyValues: [Name, SafeExpr | string][] = [\n errorInstancePath(it, errorPaths),\n errorSchemaPath(cxt, errorPaths),\n ]\n extraErrorProps(cxt, error, keyValues)\n return gen.object(...keyValues)\n}\n\nfunction errorInstancePath({errorPath}: SchemaCxt, {instancePath}: ErrorPaths): [Name, Code] {\n const instPath = instancePath\n ? str`${errorPath}${getErrorPath(instancePath, Type.Str)}`\n : errorPath\n return [N.instancePath, strConcat(N.instancePath, instPath)]\n}\n\nfunction errorSchemaPath(\n {keyword, it: {errSchemaPath}}: KeywordErrorCxt,\n {schemaPath, parentSchema}: ErrorPaths\n): [Name, string | Code] {\n let schPath = parentSchema ? errSchemaPath : str`${errSchemaPath}/${keyword}`\n if (schemaPath) {\n schPath = str`${schPath}${getErrorPath(schemaPath, Type.Str)}`\n }\n return [E.schemaPath, schPath]\n}\n\nfunction extraErrorProps(\n cxt: KeywordErrorCxt,\n {params, message}: KeywordErrorDefinition,\n keyValues: [Name, SafeExpr | string][]\n): void {\n const {keyword, data, schemaValue, it} = cxt\n const {opts, propertyName, topSchemaRef, schemaPath} = it\n keyValues.push(\n [E.keyword, keyword],\n [E.params, typeof params == \"function\" ? params(cxt) : params || _`{}`]\n )\n if (opts.messages) {\n keyValues.push([E.message, typeof message == \"function\" ? message(cxt) : message])\n }\n if (opts.verbose) {\n keyValues.push(\n [E.schema, schemaValue],\n [E.parentSchema, _`${topSchemaRef}${schemaPath}`],\n [N.data, data]\n )\n }\n if (propertyName) keyValues.push([E.propertyName, propertyName])\n}\n", "import type {KeywordErrorDefinition, KeywordErrorCxt} from \"../../types\"\nimport type {SchemaCxt} from \"..\"\nimport {reportError} from \"../errors\"\nimport {_, Name} from \"../codegen\"\nimport N from \"../names\"\n\nconst boolError: KeywordErrorDefinition = {\n message: \"boolean schema is false\",\n}\n\nexport function topBoolOrEmptySchema(it: SchemaCxt): void {\n const {gen, schema, validateName} = it\n if (schema === false) {\n falseSchemaError(it, false)\n } else if (typeof schema == \"object\" && schema.$async === true) {\n gen.return(N.data)\n } else {\n gen.assign(_`${validateName}.errors`, null)\n gen.return(true)\n }\n}\n\nexport function boolOrEmptySchema(it: SchemaCxt, valid: Name): void {\n const {gen, schema} = it\n if (schema === false) {\n gen.var(valid, false) // TODO var\n falseSchemaError(it)\n } else {\n gen.var(valid, true) // TODO var\n }\n}\n\nfunction falseSchemaError(it: SchemaCxt, overrideAllErrors?: boolean): void {\n const {gen, data} = it\n // TODO maybe some other interface should be used for non-keyword validation errors...\n const cxt: KeywordErrorCxt = {\n gen,\n keyword: \"false schema\",\n data,\n schema: false,\n schemaCode: false,\n schemaValue: false,\n params: {},\n it,\n }\n reportError(cxt, boolError, undefined, overrideAllErrors)\n}\n", "import type {AddedKeywordDefinition} from \"../types\"\n\nconst _jsonTypes = [\"string\", \"number\", \"integer\", \"boolean\", \"null\", \"object\", \"array\"] as const\n\nexport type JSONType = (typeof _jsonTypes)[number]\n\nconst jsonTypes: Set = new Set(_jsonTypes)\n\nexport function isJSONType(x: unknown): x is JSONType {\n return typeof x == \"string\" && jsonTypes.has(x)\n}\n\ntype ValidationTypes = {\n [K in JSONType]: boolean | RuleGroup | undefined\n}\n\nexport interface ValidationRules {\n rules: RuleGroup[]\n post: RuleGroup\n all: {[Key in string]?: boolean | Rule} // rules that have to be validated\n keywords: {[Key in string]?: boolean} // all known keywords (superset of \"all\")\n types: ValidationTypes\n}\n\nexport interface RuleGroup {\n type?: JSONType\n rules: Rule[]\n}\n\n// This interface wraps KeywordDefinition because definition can have multiple keywords\nexport interface Rule {\n keyword: string\n definition: AddedKeywordDefinition\n}\n\nexport function getRules(): ValidationRules {\n const groups: Record<\"number\" | \"string\" | \"array\" | \"object\", RuleGroup> = {\n number: {type: \"number\", rules: []},\n string: {type: \"string\", rules: []},\n array: {type: \"array\", rules: []},\n object: {type: \"object\", rules: []},\n }\n return {\n types: {...groups, integer: true, boolean: true, null: true},\n rules: [{rules: []}, groups.number, groups.string, groups.array, groups.object],\n post: {rules: []},\n all: {},\n keywords: {},\n }\n}\n", "import type {AnySchemaObject} from \"../../types\"\nimport type {SchemaObjCxt} from \"..\"\nimport type {JSONType, RuleGroup, Rule} from \"../rules\"\n\nexport function schemaHasRulesForType(\n {schema, self}: SchemaObjCxt,\n type: JSONType\n): boolean | undefined {\n const group = self.RULES.types[type]\n return group && group !== true && shouldUseGroup(schema, group)\n}\n\nexport function shouldUseGroup(schema: AnySchemaObject, group: RuleGroup): boolean {\n return group.rules.some((rule) => shouldUseRule(schema, rule))\n}\n\nexport function shouldUseRule(schema: AnySchemaObject, rule: Rule): boolean | undefined {\n return (\n schema[rule.keyword] !== undefined ||\n rule.definition.implements?.some((kwd) => schema[kwd] !== undefined)\n )\n}\n", "import type {\n KeywordErrorDefinition,\n KeywordErrorCxt,\n ErrorObject,\n AnySchemaObject,\n} from \"../../types\"\nimport type {SchemaObjCxt} from \"..\"\nimport {isJSONType, JSONType} from \"../rules\"\nimport {schemaHasRulesForType} from \"./applicability\"\nimport {reportError} from \"../errors\"\nimport {_, nil, and, not, operators, Code, Name} from \"../codegen\"\nimport {toHash, schemaRefOrVal} from \"../util\"\n\nexport enum DataType {\n Correct,\n Wrong,\n}\n\nexport function getSchemaTypes(schema: AnySchemaObject): JSONType[] {\n const types = getJSONTypes(schema.type)\n const hasNull = types.includes(\"null\")\n if (hasNull) {\n if (schema.nullable === false) throw new Error(\"type: null contradicts nullable: false\")\n } else {\n if (!types.length && schema.nullable !== undefined) {\n throw new Error('\"nullable\" cannot be used without \"type\"')\n }\n if (schema.nullable === true) types.push(\"null\")\n }\n return types\n}\n\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nexport function getJSONTypes(ts: unknown | unknown[]): JSONType[] {\n const types: unknown[] = Array.isArray(ts) ? ts : ts ? [ts] : []\n if (types.every(isJSONType)) return types\n throw new Error(\"type must be JSONType or JSONType[]: \" + types.join(\",\"))\n}\n\nexport function coerceAndCheckDataType(it: SchemaObjCxt, types: JSONType[]): boolean {\n const {gen, data, opts} = it\n const coerceTo = coerceToTypes(types, opts.coerceTypes)\n const checkTypes =\n types.length > 0 &&\n !(coerceTo.length === 0 && types.length === 1 && schemaHasRulesForType(it, types[0]))\n if (checkTypes) {\n const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong)\n gen.if(wrongType, () => {\n if (coerceTo.length) coerceData(it, types, coerceTo)\n else reportTypeError(it)\n })\n }\n return checkTypes\n}\n\nconst COERCIBLE: Set = new Set([\"string\", \"number\", \"integer\", \"boolean\", \"null\"])\nfunction coerceToTypes(types: JSONType[], coerceTypes?: boolean | \"array\"): JSONType[] {\n return coerceTypes\n ? types.filter((t) => COERCIBLE.has(t) || (coerceTypes === \"array\" && t === \"array\"))\n : []\n}\n\nfunction coerceData(it: SchemaObjCxt, types: JSONType[], coerceTo: JSONType[]): void {\n const {gen, data, opts} = it\n const dataType = gen.let(\"dataType\", _`typeof ${data}`)\n const coerced = gen.let(\"coerced\", _`undefined`)\n if (opts.coerceTypes === \"array\") {\n gen.if(_`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () =>\n gen\n .assign(data, _`${data}[0]`)\n .assign(dataType, _`typeof ${data}`)\n .if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data))\n )\n }\n gen.if(_`${coerced} !== undefined`)\n for (const t of coerceTo) {\n if (COERCIBLE.has(t) || (t === \"array\" && opts.coerceTypes === \"array\")) {\n coerceSpecificType(t)\n }\n }\n gen.else()\n reportTypeError(it)\n gen.endIf()\n\n gen.if(_`${coerced} !== undefined`, () => {\n gen.assign(data, coerced)\n assignParentData(it, coerced)\n })\n\n function coerceSpecificType(t: string): void {\n switch (t) {\n case \"string\":\n gen\n .elseIf(_`${dataType} == \"number\" || ${dataType} == \"boolean\"`)\n .assign(coerced, _`\"\" + ${data}`)\n .elseIf(_`${data} === null`)\n .assign(coerced, _`\"\"`)\n return\n case \"number\":\n gen\n .elseIf(\n _`${dataType} == \"boolean\" || ${data} === null\n || (${dataType} == \"string\" && ${data} && ${data} == +${data})`\n )\n .assign(coerced, _`+${data}`)\n return\n case \"integer\":\n gen\n .elseIf(\n _`${dataType} === \"boolean\" || ${data} === null\n || (${dataType} === \"string\" && ${data} && ${data} == +${data} && !(${data} % 1))`\n )\n .assign(coerced, _`+${data}`)\n return\n case \"boolean\":\n gen\n .elseIf(_`${data} === \"false\" || ${data} === 0 || ${data} === null`)\n .assign(coerced, false)\n .elseIf(_`${data} === \"true\" || ${data} === 1`)\n .assign(coerced, true)\n return\n case \"null\":\n gen.elseIf(_`${data} === \"\" || ${data} === 0 || ${data} === false`)\n gen.assign(coerced, null)\n return\n\n case \"array\":\n gen\n .elseIf(\n _`${dataType} === \"string\" || ${dataType} === \"number\"\n || ${dataType} === \"boolean\" || ${data} === null`\n )\n .assign(coerced, _`[${data}]`)\n }\n }\n}\n\nfunction assignParentData({gen, parentData, parentDataProperty}: SchemaObjCxt, expr: Name): void {\n // TODO use gen.property\n gen.if(_`${parentData} !== undefined`, () =>\n gen.assign(_`${parentData}[${parentDataProperty}]`, expr)\n )\n}\n\nexport function checkDataType(\n dataType: JSONType,\n data: Name,\n strictNums?: boolean | \"log\",\n correct = DataType.Correct\n): Code {\n const EQ = correct === DataType.Correct ? operators.EQ : operators.NEQ\n let cond: Code\n switch (dataType) {\n case \"null\":\n return _`${data} ${EQ} null`\n case \"array\":\n cond = _`Array.isArray(${data})`\n break\n case \"object\":\n cond = _`${data} && typeof ${data} == \"object\" && !Array.isArray(${data})`\n break\n case \"integer\":\n cond = numCond(_`!(${data} % 1) && !isNaN(${data})`)\n break\n case \"number\":\n cond = numCond()\n break\n default:\n return _`typeof ${data} ${EQ} ${dataType}`\n }\n return correct === DataType.Correct ? cond : not(cond)\n\n function numCond(_cond: Code = nil): Code {\n return and(_`typeof ${data} == \"number\"`, _cond, strictNums ? _`isFinite(${data})` : nil)\n }\n}\n\nexport function checkDataTypes(\n dataTypes: JSONType[],\n data: Name,\n strictNums?: boolean | \"log\",\n correct?: DataType\n): Code {\n if (dataTypes.length === 1) {\n return checkDataType(dataTypes[0], data, strictNums, correct)\n }\n let cond: Code\n const types = toHash(dataTypes)\n if (types.array && types.object) {\n const notObj = _`typeof ${data} != \"object\"`\n cond = types.null ? notObj : _`!${data} || ${notObj}`\n delete types.null\n delete types.array\n delete types.object\n } else {\n cond = nil\n }\n if (types.number) delete types.integer\n for (const t in types) cond = and(cond, checkDataType(t as JSONType, data, strictNums, correct))\n return cond\n}\n\nexport type TypeError = ErrorObject<\"type\", {type: string}>\n\nconst typeError: KeywordErrorDefinition = {\n message: ({schema}) => `must be ${schema}`,\n params: ({schema, schemaValue}) =>\n typeof schema == \"string\" ? _`{type: ${schema}}` : _`{type: ${schemaValue}}`,\n}\n\nexport function reportTypeError(it: SchemaObjCxt): void {\n const cxt = getTypeErrorContext(it)\n reportError(cxt, typeError)\n}\n\nfunction getTypeErrorContext(it: SchemaObjCxt): KeywordErrorCxt {\n const {gen, data, schema} = it\n const schemaCode = schemaRefOrVal(it, schema, \"type\")\n return {\n gen,\n keyword: \"type\",\n data,\n schema: schema.type,\n schemaCode,\n schemaValue: schemaCode,\n parentSchema: schema,\n params: {},\n it,\n }\n}\n", "import type {SchemaObjCxt} from \"..\"\nimport {_, getProperty, stringify} from \"../codegen\"\nimport {checkStrictMode} from \"../util\"\n\nexport function assignDefaults(it: SchemaObjCxt, ty?: string): void {\n const {properties, items} = it.schema\n if (ty === \"object\" && properties) {\n for (const key in properties) {\n assignDefault(it, key, properties[key].default)\n }\n } else if (ty === \"array\" && Array.isArray(items)) {\n items.forEach((sch, i: number) => assignDefault(it, i, sch.default))\n }\n}\n\nfunction assignDefault(it: SchemaObjCxt, prop: string | number, defaultValue: unknown): void {\n const {gen, compositeRule, data, opts} = it\n if (defaultValue === undefined) return\n const childData = _`${data}${getProperty(prop)}`\n if (compositeRule) {\n checkStrictMode(it, `default is ignored for: ${childData}`)\n return\n }\n\n let condition = _`${childData} === undefined`\n if (opts.useDefaults === \"empty\") {\n condition = _`${condition} || ${childData} === null || ${childData} === \"\"`\n }\n // `${childData} === undefined` +\n // (opts.useDefaults === \"empty\" ? ` || ${childData} === null || ${childData} === \"\"` : \"\")\n gen.if(condition, _`${childData} = ${stringify(defaultValue)}`)\n}\n", "import type {AnySchemaObject} from \"../types\"\n\nimport {_, or, type Code} from \"../compile/codegen\"\nimport N from \"../compile/names\"\n\nexport function getSkipCondition(schema: AnySchemaObject, prop: string): Code | undefined {\n const propSchema = schema.properties?.[prop]\n if (!propSchema) return undefined\n\n const hasReadOnly = propSchema.readOnly === true\n const hasWriteOnly = propSchema.writeOnly === true\n\n if (!hasReadOnly && !hasWriteOnly) return undefined\n\n const conditions: Code[] = []\n const apiContext = _`typeof ${N.this} == \"object\" && ${N.this} && ${N.this}.apiContext`\n\n if (hasReadOnly) {\n conditions.push(_`${apiContext} === \"request\"`)\n }\n\n if (hasWriteOnly) {\n conditions.push(_`${apiContext} === \"response\"`)\n }\n\n return or(...conditions)\n}\n", "import type {AnySchema, SchemaMap} from \"../types\"\nimport type {SchemaCxt} from \"../compile\"\nimport type {KeywordCxt} from \"../compile/validate\"\nimport {CodeGen, _, and, or, not, nil, strConcat, getProperty, Code, Name} from \"../compile/codegen\"\nimport {alwaysValidSchema, Type} from \"../compile/util\"\nimport N from \"../compile/names\"\nimport {useFunc} from \"../compile/util\"\nimport {getSkipCondition} from \"./oasContext\"\nexport function checkReportMissingProp(cxt: KeywordCxt, prop: string): void {\n const {gen, data, it} = cxt\n gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {\n cxt.setParams({missingProperty: _`${prop}`}, true)\n cxt.error()\n })\n}\n\nexport function checkMissingProp(\n {gen, data, it: {opts}, parentSchema}: KeywordCxt,\n properties: string[],\n missing: Name\n): Code {\n return or(\n ...properties.map((prop) =>\n and(\n not(getSkipCondition(parentSchema, prop) ?? _`false`),\n noPropertyInData(gen, data, prop, opts.ownProperties),\n _`${missing} = ${prop}`\n )\n )\n )\n}\n\nexport function reportMissingProp(cxt: KeywordCxt, missing: Name): void {\n cxt.setParams({missingProperty: missing}, true)\n cxt.error()\n}\n\nexport function hasPropFunc(gen: CodeGen): Name {\n return gen.scopeValue(\"func\", {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ref: Object.prototype.hasOwnProperty,\n code: _`Object.prototype.hasOwnProperty`,\n })\n}\n\nexport function isOwnProperty(gen: CodeGen, data: Name, property: Name | string): Code {\n return _`${hasPropFunc(gen)}.call(${data}, ${property})`\n}\n\nexport function propertyInData(\n gen: CodeGen,\n data: Name,\n property: Name | string,\n ownProperties?: boolean\n): Code {\n const cond = _`${data}${getProperty(property)} !== undefined`\n return ownProperties ? _`${cond} && ${isOwnProperty(gen, data, property)}` : cond\n}\n\nexport function noPropertyInData(\n gen: CodeGen,\n data: Name,\n property: Name | string,\n ownProperties?: boolean\n): Code {\n const cond = _`${data}${getProperty(property)} === undefined`\n return ownProperties ? or(cond, not(isOwnProperty(gen, data, property))) : cond\n}\n\nexport function allSchemaProperties(schemaMap?: SchemaMap): string[] {\n return schemaMap ? Object.keys(schemaMap).filter((p) => p !== \"__proto__\") : []\n}\n\nexport function schemaProperties(it: SchemaCxt, schemaMap: SchemaMap): string[] {\n return allSchemaProperties(schemaMap).filter(\n (p) => !alwaysValidSchema(it, schemaMap[p] as AnySchema)\n )\n}\n\nexport function callValidateCode(\n {schemaCode, data, it: {gen, topSchemaRef, schemaPath, errorPath}, it}: KeywordCxt,\n func: Code,\n context: Code,\n passSchema?: boolean\n): Code {\n const dataAndSchema = passSchema ? _`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data\n const valCxt: [Name, Code | number][] = [\n [N.instancePath, strConcat(N.instancePath, errorPath)],\n [N.parentData, it.parentData],\n [N.parentDataProperty, it.parentDataProperty],\n [N.rootData, N.rootData],\n [N.isAllOfVariant, it.isAllOfVariant ? 1 : 0],\n ]\n if (it.opts.dynamicRef) valCxt.push([N.dynamicAnchors, N.dynamicAnchors])\n const args = _`${dataAndSchema}, ${gen.object(...valCxt)}`\n return context !== nil ? _`${func}.call(${context}, ${args})` : _`${func}(${args})`\n}\n\nconst newRegExp = _`new RegExp`\n\nexport function usePattern({gen, it: {opts}}: KeywordCxt, pattern: string): Name {\n const u = opts.unicodeRegExp ? \"u\" : \"\"\n const {regExp} = opts.code\n const rx = regExp(pattern, u)\n\n return gen.scopeValue(\"pattern\", {\n key: rx.toString(),\n ref: rx,\n code: _`${regExp.code === \"new RegExp\" ? newRegExp : useFunc(gen, regExp)}(${pattern}, ${u})`,\n })\n}\n\nexport function validateArray(cxt: KeywordCxt): Name {\n const {gen, data, keyword, it} = cxt\n const valid = gen.name(\"valid\")\n if (it.allErrors) {\n const validArr = gen.let(\"valid\", true)\n validateItems(() => gen.assign(validArr, false))\n return validArr\n }\n gen.var(valid, true)\n validateItems(() => gen.break())\n return valid\n\n function validateItems(notValid: () => void): void {\n const len = gen.const(\"len\", _`${data}.length`)\n gen.forRange(\"i\", 0, len, (i) => {\n cxt.subschema(\n {\n keyword,\n dataProp: i,\n dataPropType: Type.Num,\n },\n valid\n )\n gen.if(not(valid), notValid)\n })\n }\n}\n\nexport function validateUnion(cxt: KeywordCxt): void {\n const {gen, schema, keyword, parentSchema, it} = cxt\n /* istanbul ignore if */\n if (!Array.isArray(schema)) throw new Error(\"ajv implementation error\")\n if (it.opts.discriminator && parentSchema.discriminator) return\n const alwaysValid = schema.some((sch: AnySchema) => alwaysValidSchema(it, sch))\n if (alwaysValid && !it.opts.unevaluated) return\n\n const valid = gen.let(\"valid\", false)\n const schValid = gen.name(\"_valid\")\n\n gen.block(() =>\n schema.forEach((_sch: AnySchema, i: number) => {\n const schCxt = cxt.subschema(\n {\n keyword,\n schemaProp: i,\n compositeRule: true,\n },\n schValid\n )\n gen.assign(valid, _`${valid} || ${schValid}`)\n const merged = cxt.mergeValidEvaluated(schCxt, schValid)\n // can short-circuit if `unevaluatedProperties/Items` not supported (opts.unevaluated !== true)\n // or if all properties and items were evaluated (it.props === true && it.items === true)\n if (!merged) gen.if(not(valid))\n })\n )\n\n cxt.result(\n valid,\n () => cxt.reset(),\n () => cxt.error(true)\n )\n}\n", "import type {KeywordCxt} from \".\"\nimport type {\n AnySchema,\n SchemaValidateFunction,\n AnyValidateFunction,\n AddedKeywordDefinition,\n MacroKeywordDefinition,\n FuncKeywordDefinition,\n} from \"../../types\"\nimport type {SchemaObjCxt} from \"..\"\nimport {_, nil, not, stringify, Code, Name, CodeGen} from \"../codegen\"\nimport N from \"../names\"\nimport type {JSONType} from \"../rules\"\nimport {callValidateCode} from \"../../vocabularies/code\"\nimport {extendErrors} from \"../errors\"\n\ntype KeywordCompilationResult = AnySchema | SchemaValidateFunction | AnyValidateFunction\n\nexport function macroKeywordCode(cxt: KeywordCxt, def: MacroKeywordDefinition): void {\n const {gen, keyword, schema, parentSchema, it} = cxt\n const macroSchema = def.macro.call(it.self, schema, parentSchema, it)\n const schemaRef = useKeyword(gen, keyword, macroSchema)\n if (it.opts.validateSchema !== false) it.self.validateSchema(macroSchema, true)\n\n const valid = gen.name(\"valid\")\n cxt.subschema(\n {\n schema: macroSchema,\n schemaPath: nil,\n errSchemaPath: `${it.errSchemaPath}/${keyword}`,\n topSchemaRef: schemaRef,\n compositeRule: true,\n },\n valid\n )\n cxt.pass(valid, () => cxt.error(true))\n}\n\nexport function funcKeywordCode(cxt: KeywordCxt, def: FuncKeywordDefinition): void {\n const {gen, keyword, schema, parentSchema, $data, it} = cxt\n checkAsyncKeyword(it, def)\n const validate =\n !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate\n const validateRef = useKeyword(gen, keyword, validate)\n const valid = gen.let(\"valid\")\n cxt.block$data(valid, validateKeyword)\n cxt.ok(def.valid ?? valid)\n\n function validateKeyword(): void {\n if (def.errors === false) {\n assignValid()\n if (def.modifying) modifyData(cxt)\n reportErrs(() => cxt.error())\n } else {\n const ruleErrs = def.async ? validateAsync() : validateSync()\n if (def.modifying) modifyData(cxt)\n reportErrs(() => addErrs(cxt, ruleErrs))\n }\n }\n\n function validateAsync(): Name {\n const ruleErrs = gen.let(\"ruleErrs\", null)\n gen.try(\n () => assignValid(_`await `),\n (e) =>\n gen.assign(valid, false).if(\n _`${e} instanceof ${it.ValidationError as Name}`,\n () => gen.assign(ruleErrs, _`${e}.errors`),\n () => gen.throw(e)\n )\n )\n return ruleErrs\n }\n\n function validateSync(): Code {\n const validateErrs = _`${validateRef}.errors`\n gen.assign(validateErrs, null)\n assignValid(nil)\n return validateErrs\n }\n\n function assignValid(_await: Code = def.async ? _`await ` : nil): void {\n const passCxt = it.opts.passContext ? N.this : N.self\n const passSchema = !((\"compile\" in def && !$data) || def.schema === false)\n gen.assign(\n valid,\n _`${_await}${callValidateCode(cxt, validateRef, passCxt, passSchema)}`,\n def.modifying\n )\n }\n\n function reportErrs(errors: () => void): void {\n gen.if(not(def.valid ?? valid), errors)\n }\n}\n\nfunction modifyData(cxt: KeywordCxt): void {\n const {gen, data, it} = cxt\n gen.if(it.parentData, () => gen.assign(data, _`${it.parentData}[${it.parentDataProperty}]`))\n}\n\nfunction addErrs(cxt: KeywordCxt, errs: Code): void {\n const {gen} = cxt\n gen.if(\n _`Array.isArray(${errs})`,\n () => {\n gen\n .assign(N.vErrors, _`${N.vErrors} === null ? ${errs} : ${N.vErrors}.concat(${errs})`)\n .assign(N.errors, _`${N.vErrors}.length`)\n extendErrors(cxt)\n },\n () => cxt.error()\n )\n}\n\nfunction checkAsyncKeyword({schemaEnv}: SchemaObjCxt, def: FuncKeywordDefinition): void {\n if (def.async && !schemaEnv.$async) throw new Error(\"async keyword in sync schema\")\n}\n\nfunction useKeyword(gen: CodeGen, keyword: string, result?: KeywordCompilationResult): Name {\n if (result === undefined) throw new Error(`keyword \"${keyword}\" failed to compile`)\n return gen.scopeValue(\n \"keyword\",\n typeof result == \"function\" ? {ref: result} : {ref: result, code: stringify(result)}\n )\n}\n\nexport function validSchemaType(\n schema: unknown,\n schemaType: JSONType[],\n allowUndefined = false\n): boolean {\n // TODO add tests\n return (\n !schemaType.length ||\n schemaType.some((st) =>\n st === \"array\"\n ? Array.isArray(schema)\n : st === \"object\"\n ? schema && typeof schema == \"object\" && !Array.isArray(schema)\n : typeof schema == st || (allowUndefined && typeof schema == \"undefined\")\n )\n )\n}\n\nexport function validateKeywordUsage(\n {schema, opts, self, errSchemaPath}: SchemaObjCxt,\n def: AddedKeywordDefinition,\n keyword: string\n): void {\n /* istanbul ignore if */\n if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {\n throw new Error(\"ajv implementation error\")\n }\n\n const deps = def.dependencies\n if (deps?.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {\n throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(\",\")}`)\n }\n\n if (def.validateSchema) {\n const valid = def.validateSchema(schema[keyword])\n if (!valid) {\n const msg =\n `keyword \"${keyword}\" value is invalid at path \"${errSchemaPath}\": ` +\n self.errorsText(def.validateSchema.errors)\n if (opts.validateSchema === \"log\") self.logger.error(msg)\n else throw new Error(msg)\n }\n }\n}\n", "import type {AnySchema} from \"../../types\"\nimport type {SchemaObjCxt} from \"..\"\nimport {_, str, getProperty, Code, Name} from \"../codegen\"\nimport {escapeFragment, getErrorPath, Type} from \"../util\"\nimport type {JSONType} from \"../rules\"\n\nexport interface SubschemaContext {\n // TODO use Optional? align with SchemCxt property types\n schema: AnySchema\n schemaPath: Code\n errSchemaPath: string\n topSchemaRef?: Code\n errorPath?: Code\n dataLevel?: number\n dataTypes?: JSONType[]\n data?: Name\n parentData?: Name\n parentDataProperty?: Code | number\n dataNames?: Name[]\n dataPathArr?: (Code | number)[]\n propertyName?: Name\n jtdDiscriminator?: string\n jtdMetadata?: boolean\n compositeRule?: true\n createErrors?: boolean\n allErrors?: boolean\n}\n\nexport type SubschemaArgs = Partial<{\n keyword: string\n schemaProp: string | number\n schema: AnySchema\n schemaPath: Code\n errSchemaPath: string\n topSchemaRef: Code\n data: Name | Code\n dataProp: Code | string | number\n dataTypes: JSONType[]\n definedProperties: Set\n propertyName: Name\n dataPropType: Type\n jtdDiscriminator: string\n jtdMetadata: boolean\n compositeRule: true\n createErrors: boolean\n allErrors: boolean\n}>\n\nexport function getSubschema(\n it: SchemaObjCxt,\n {keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef}: SubschemaArgs\n): SubschemaContext {\n if (keyword !== undefined && schema !== undefined) {\n throw new Error('both \"keyword\" and \"schema\" passed, only one allowed')\n }\n\n if (keyword !== undefined) {\n const sch = it.schema[keyword]\n return schemaProp === undefined\n ? {\n schema: sch,\n schemaPath: _`${it.schemaPath}${getProperty(keyword)}`,\n errSchemaPath: `${it.errSchemaPath}/${keyword}`,\n }\n : {\n schema: sch[schemaProp],\n schemaPath: _`${it.schemaPath}${getProperty(keyword)}${getProperty(schemaProp)}`,\n errSchemaPath: `${it.errSchemaPath}/${keyword}/${escapeFragment(schemaProp)}`,\n }\n }\n\n if (schema !== undefined) {\n if (schemaPath === undefined || errSchemaPath === undefined || topSchemaRef === undefined) {\n throw new Error('\"schemaPath\", \"errSchemaPath\" and \"topSchemaRef\" are required with \"schema\"')\n }\n return {\n schema,\n schemaPath,\n topSchemaRef,\n errSchemaPath,\n }\n }\n\n throw new Error('either \"keyword\" or \"schema\" must be passed')\n}\n\nexport function extendSubschemaData(\n subschema: SubschemaContext,\n it: SchemaObjCxt,\n {dataProp, dataPropType: dpType, data, dataTypes, propertyName}: SubschemaArgs\n): void {\n if (data !== undefined && dataProp !== undefined) {\n throw new Error('both \"data\" and \"dataProp\" passed, only one allowed')\n }\n\n const {gen} = it\n\n if (dataProp !== undefined) {\n const {errorPath, dataPathArr, opts} = it\n const nextData = gen.let(\"data\", _`${it.data}${getProperty(dataProp)}`, true)\n dataContextProps(nextData)\n subschema.errorPath = str`${errorPath}${getErrorPath(dataProp, dpType, opts.jsPropertySyntax)}`\n subschema.parentDataProperty = _`${dataProp}`\n subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty]\n }\n\n if (data !== undefined) {\n const nextData = data instanceof Name ? data : gen.let(\"data\", data, true) // replaceable if used once?\n dataContextProps(nextData)\n if (propertyName !== undefined) subschema.propertyName = propertyName\n // TODO something is possibly wrong here with not changing parentDataProperty and not appending dataPathArr\n }\n\n if (dataTypes) subschema.dataTypes = dataTypes\n\n function dataContextProps(_nextData: Name): void {\n subschema.data = _nextData\n subschema.dataLevel = it.dataLevel + 1\n subschema.dataTypes = []\n it.definedProperties = new Set()\n subschema.parentData = it.data\n subschema.dataNames = [...it.dataNames, _nextData]\n }\n}\n\nexport function extendSubschemaMode(\n subschema: SubschemaContext,\n {jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors}: SubschemaArgs\n): void {\n if (compositeRule !== undefined) subschema.compositeRule = compositeRule\n if (createErrors !== undefined) subschema.createErrors = createErrors\n if (allErrors !== undefined) subschema.allErrors = allErrors\n subschema.jtdDiscriminator = jtdDiscriminator // not inherited\n subschema.jtdMetadata = jtdMetadata // not inherited\n}\n", "'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n", "'use strict';\n\nvar traverse = module.exports = function (schema, opts, cb) {\n // Legacy support for v0.3.1 and earlier.\n if (typeof opts == 'function') {\n cb = opts;\n opts = {};\n }\n\n cb = opts.cb || cb;\n var pre = (typeof cb == 'function') ? cb : cb.pre || function() {};\n var post = cb.post || function() {};\n\n _traverse(opts, pre, post, schema, '', schema);\n};\n\n\ntraverse.keywords = {\n additionalItems: true,\n items: true,\n contains: true,\n additionalProperties: true,\n propertyNames: true,\n not: true,\n if: true,\n then: true,\n else: true\n};\n\ntraverse.arrayKeywords = {\n items: true,\n allOf: true,\n anyOf: true,\n oneOf: true\n};\n\ntraverse.propsKeywords = {\n $defs: true,\n definitions: true,\n properties: true,\n patternProperties: true,\n dependencies: true\n};\n\ntraverse.skipKeywords = {\n default: true,\n enum: true,\n const: true,\n required: true,\n maximum: true,\n minimum: true,\n exclusiveMaximum: true,\n exclusiveMinimum: true,\n multipleOf: true,\n maxLength: true,\n minLength: true,\n pattern: true,\n format: true,\n maxItems: true,\n minItems: true,\n uniqueItems: true,\n maxProperties: true,\n minProperties: true\n};\n\n\nfunction _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {\n if (schema && typeof schema == 'object' && !Array.isArray(schema)) {\n pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n for (var key in schema) {\n var sch = schema[key];\n if (Array.isArray(sch)) {\n if (key in traverse.arrayKeywords) {\n for (var i=0; i (count += countKeys(sch)))\n }\n if (count === Infinity) return Infinity\n }\n return count\n}\n\nexport function getFullPath(resolver: UriResolver, id = \"\", normalize?: boolean): string {\n if (normalize !== false) id = normalizeId(id)\n const p = resolver.parse(id)\n return _getFullPath(resolver, p)\n}\n\nexport function _getFullPath(resolver: UriResolver, p: URIComponent): string {\n const serialized = resolver.serialize(p)\n return serialized.split(\"#\")[0] + \"#\"\n}\n\nconst TRAILING_SLASH_HASH = /#\\/?$/\nexport function normalizeId(id: string | undefined): string {\n return id ? id.replace(TRAILING_SLASH_HASH, \"\") : \"\"\n}\n\nexport function resolveUrl(resolver: UriResolver, baseId: string, id: string): string {\n id = normalizeId(id)\n return resolver.resolve(baseId, id)\n}\n\nconst ANCHOR = /^[a-z_][-a-z0-9._]*$/i\n\nexport function getSchemaRefs(this: Ajv, schema: AnySchema, baseId: string): LocalRefs {\n if (typeof schema == \"boolean\") return {}\n const {schemaId, uriResolver} = this.opts\n const schId = normalizeId(schema[schemaId] || baseId)\n const baseIds: {[JsonPtr in string]?: string} = {\"\": schId}\n const pathPrefix = getFullPath(uriResolver, schId, false)\n const localRefs: LocalRefs = {}\n const schemaRefs: Set = new Set()\n\n traverse(schema, {allKeys: true}, (sch, jsonPtr, _, parentJsonPtr) => {\n if (parentJsonPtr === undefined) return\n const fullPath = pathPrefix + jsonPtr\n let innerBaseId = baseIds[parentJsonPtr]\n if (typeof sch[schemaId] == \"string\") innerBaseId = addRef.call(this, sch[schemaId])\n addAnchor.call(this, sch.$anchor)\n addAnchor.call(this, sch.$dynamicAnchor)\n baseIds[jsonPtr] = innerBaseId\n\n function addRef(this: Ajv, ref: string): string {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const _resolve = this.opts.uriResolver.resolve\n ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref)\n if (schemaRefs.has(ref)) throw ambiguos(ref)\n schemaRefs.add(ref)\n let schOrRef = this.refs[ref]\n if (typeof schOrRef == \"string\") schOrRef = this.refs[schOrRef]\n if (typeof schOrRef == \"object\") {\n checkAmbiguosRef(sch, schOrRef.schema, ref)\n } else if (ref !== normalizeId(fullPath)) {\n if (ref[0] === \"#\") {\n checkAmbiguosRef(sch, localRefs[ref], ref)\n localRefs[ref] = sch\n } else {\n this.refs[ref] = fullPath\n }\n }\n return ref\n }\n\n function addAnchor(this: Ajv, anchor: unknown): void {\n if (typeof anchor == \"string\") {\n if (!ANCHOR.test(anchor)) throw new Error(`invalid anchor \"${anchor}\"`)\n addRef.call(this, `#${anchor}`)\n }\n }\n })\n\n return localRefs\n\n function checkAmbiguosRef(sch1: AnySchema, sch2: AnySchema | undefined, ref: string): void {\n if (sch2 !== undefined && !equal(sch1, sch2)) throw ambiguos(ref)\n }\n\n function ambiguos(ref: string): Error {\n return new Error(`reference \"${ref}\" resolves to more than one schema`)\n }\n}\n", "import type {\n AddedKeywordDefinition,\n AnySchema,\n AnySchemaObject,\n KeywordErrorCxt,\n KeywordCxtParams,\n} from \"../../types\"\nimport type {SchemaCxt, SchemaObjCxt} from \"..\"\nimport type {InstanceOptions} from \"../../core\"\nimport {boolOrEmptySchema, topBoolOrEmptySchema} from \"./boolSchema\"\nimport {coerceAndCheckDataType, getSchemaTypes} from \"./dataType\"\nimport {shouldUseGroup, shouldUseRule} from \"./applicability\"\nimport {checkDataType, checkDataTypes, reportTypeError, DataType} from \"./dataType\"\nimport {assignDefaults} from \"./defaults\"\nimport {funcKeywordCode, macroKeywordCode, validateKeywordUsage, validSchemaType} from \"./keyword\"\nimport {getSubschema, extendSubschemaData, SubschemaArgs, extendSubschemaMode} from \"./subschema\"\nimport {_, nil, str, or, not, getProperty, Block, Code, Name, CodeGen} from \"../codegen\"\nimport N from \"../names\"\nimport {resolveUrl} from \"../resolve\"\nimport {\n schemaRefOrVal,\n schemaHasRulesButRef,\n checkUnknownRules,\n checkStrictMode,\n unescapeJsonPointer,\n mergeEvaluated,\n} from \"../util\"\nimport type {JSONType, Rule, RuleGroup} from \"../rules\"\nimport {\n ErrorPaths,\n reportError,\n reportExtraError,\n resetErrorsCount,\n keyword$DataError,\n} from \"../errors\"\n\n// schema compilation - generates validation function, subschemaCode (below) is used for subschemas\nexport function validateFunctionCode(it: SchemaCxt): void {\n if (isSchemaObj(it)) {\n checkKeywords(it)\n if (schemaCxtHasRules(it)) {\n topSchemaObjCode(it)\n return\n }\n }\n validateFunction(it, () => topBoolOrEmptySchema(it))\n}\n\nfunction validateFunction(\n {gen, validateName, schema, schemaEnv, opts}: SchemaCxt,\n body: Block\n): void {\n if (opts.code.es5) {\n gen.func(validateName, _`${N.data}, ${N.valCxt}`, schemaEnv.$async, () => {\n gen.code(_`\"use strict\"; ${funcSourceUrl(schema, opts)}`)\n destructureValCxtES5(gen, opts)\n gen.code(body)\n })\n } else {\n gen.func(validateName, _`${N.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () =>\n gen.code(funcSourceUrl(schema, opts)).code(body)\n )\n }\n}\n\nfunction destructureValCxt(opts: InstanceOptions): Code {\n return _`{${N.instancePath}=\"\", ${N.parentData}, ${N.parentDataProperty}, ${N.rootData}=${\n N.data\n }${opts.dynamicRef ? _`, ${N.dynamicAnchors}={}` : nil}, ${N.isAllOfVariant} = 0}={}`\n}\n\nfunction destructureValCxtES5(gen: CodeGen, opts: InstanceOptions): void {\n gen.if(\n N.valCxt,\n () => {\n gen.var(N.instancePath, _`${N.valCxt}.${N.instancePath}`)\n gen.var(N.parentData, _`${N.valCxt}.${N.parentData}`)\n gen.var(N.parentDataProperty, _`${N.valCxt}.${N.parentDataProperty}`)\n gen.var(N.rootData, _`${N.valCxt}.${N.rootData}`)\n gen.var(N.isAllOfVariant, _`${N.valCxt}.${N.isAllOfVariant}`)\n if (opts.dynamicRef) gen.var(N.dynamicAnchors, _`${N.valCxt}.${N.dynamicAnchors}`)\n },\n () => {\n gen.var(N.instancePath, _`\"\"`)\n gen.var(N.parentData, _`undefined`)\n gen.var(N.parentDataProperty, _`undefined`)\n gen.var(N.rootData, N.data)\n gen.var(N.isAllOfVariant, _`0`)\n if (opts.dynamicRef) gen.var(N.dynamicAnchors, _`{}`)\n }\n )\n}\n\nfunction topSchemaObjCode(it: SchemaObjCxt): void {\n const {schema, opts, gen} = it\n validateFunction(it, () => {\n if (opts.$comment && schema.$comment) commentKeyword(it)\n checkNoDefault(it)\n gen.let(N.vErrors, null)\n gen.let(N.errors, 0)\n if (opts.unevaluated) resetEvaluated(it)\n typeAndKeywords(it)\n returnResults(it)\n })\n return\n}\n\nfunction resetEvaluated(it: SchemaObjCxt): void {\n // TODO maybe some hook to execute it in the end to check whether props/items are Name, as in assignEvaluated\n const {gen, validateName} = it\n it.evaluated = gen.const(\"evaluated\", _`${validateName}.evaluated`)\n gen.if(_`${it.evaluated}.dynamicProps`, () => gen.assign(_`${it.evaluated}.props`, _`undefined`))\n gen.if(_`${it.evaluated}.dynamicItems`, () => gen.assign(_`${it.evaluated}.items`, _`undefined`))\n}\n\nfunction funcSourceUrl(schema: AnySchema, opts: InstanceOptions): Code {\n const schId = typeof schema == \"object\" && schema[opts.schemaId]\n return schId && (opts.code.source || opts.code.process) ? _`/*# sourceURL=${schId} */` : nil\n}\n\n// schema compilation - this function is used recursively to generate code for sub-schemas\nfunction subschemaCode(it: SchemaCxt, valid: Name): void {\n if (isSchemaObj(it)) {\n checkKeywords(it)\n if (schemaCxtHasRules(it)) {\n subSchemaObjCode(it, valid)\n return\n }\n }\n boolOrEmptySchema(it, valid)\n}\n\nfunction schemaCxtHasRules({schema, self}: SchemaCxt): boolean {\n if (typeof schema == \"boolean\") return !schema\n for (const key in schema) if (self.RULES.all[key]) return true\n return false\n}\n\nfunction isSchemaObj(it: SchemaCxt): it is SchemaObjCxt {\n return typeof it.schema != \"boolean\"\n}\n\nfunction subSchemaObjCode(it: SchemaObjCxt, valid: Name): void {\n const {schema, gen, opts} = it\n if (opts.$comment && schema.$comment) commentKeyword(it)\n updateContext(it)\n checkAsyncSchema(it)\n const errsCount = gen.const(\"_errs\", N.errors)\n typeAndKeywords(it, errsCount)\n // TODO var\n gen.var(valid, _`${errsCount} === ${N.errors}`)\n}\n\nfunction checkKeywords(it: SchemaObjCxt): void {\n checkUnknownRules(it)\n checkRefsAndKeywords(it)\n}\n\nfunction typeAndKeywords(it: SchemaObjCxt, errsCount?: Name): void {\n if (it.opts.jtd) return schemaKeywords(it, [], false, errsCount)\n const types = getSchemaTypes(it.schema)\n const checkedTypes = coerceAndCheckDataType(it, types)\n schemaKeywords(it, types, !checkedTypes, errsCount)\n}\n\nfunction checkRefsAndKeywords(it: SchemaObjCxt): void {\n const {schema, errSchemaPath, opts, self} = it\n if (schema.$ref && opts.ignoreKeywordsWithRef && schemaHasRulesButRef(schema, self.RULES)) {\n self.logger.warn(`$ref: keywords ignored in schema at path \"${errSchemaPath}\"`)\n }\n}\n\nfunction checkNoDefault(it: SchemaObjCxt): void {\n const {schema, opts} = it\n if (schema.default !== undefined && opts.useDefaults && opts.strictSchema) {\n checkStrictMode(it, \"default is ignored in the schema root\")\n }\n}\n\nfunction updateContext(it: SchemaObjCxt): void {\n const schId = it.schema[it.opts.schemaId]\n if (schId) it.baseId = resolveUrl(it.opts.uriResolver, it.baseId, schId)\n}\n\nfunction checkAsyncSchema(it: SchemaObjCxt): void {\n if (it.schema.$async && !it.schemaEnv.$async) throw new Error(\"async schema in sync schema\")\n}\n\nfunction commentKeyword({gen, schemaEnv, schema, errSchemaPath, opts}: SchemaObjCxt): void {\n const msg = schema.$comment\n if (opts.$comment === true) {\n gen.code(_`${N.self}.logger.log(${msg})`)\n } else if (typeof opts.$comment == \"function\") {\n const schemaPath = str`${errSchemaPath}/$comment`\n const rootName = gen.scopeValue(\"root\", {ref: schemaEnv.root})\n gen.code(_`${N.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`)\n }\n}\n\nfunction returnResults(it: SchemaCxt): void {\n const {gen, schemaEnv, validateName, ValidationError, opts} = it\n if (schemaEnv.$async) {\n // TODO assign unevaluated\n gen.if(\n _`${N.errors} === 0`,\n () => gen.return(N.data),\n () => gen.throw(_`new ${ValidationError as Name}(${N.vErrors})`)\n )\n } else {\n gen.assign(_`${validateName}.errors`, N.vErrors)\n if (opts.unevaluated) assignEvaluated(it)\n gen.return(_`${N.errors} === 0`)\n }\n}\n\nfunction assignEvaluated({gen, evaluated, props, items}: SchemaCxt): void {\n if (props instanceof Name) gen.assign(_`${evaluated}.props`, props)\n if (items instanceof Name) gen.assign(_`${evaluated}.items`, items)\n}\n\nfunction schemaKeywords(\n it: SchemaObjCxt,\n types: JSONType[],\n typeErrors: boolean,\n errsCount?: Name\n): void {\n const {gen, schema, data, allErrors, opts, self} = it\n const {RULES} = self\n if (schema.$ref && (opts.ignoreKeywordsWithRef || !schemaHasRulesButRef(schema, RULES))) {\n gen.block(() => keywordCode(it, \"$ref\", (RULES.all.$ref as Rule).definition)) // TODO typecast\n return\n }\n if (!opts.jtd) checkStrictTypes(it, types)\n gen.block(() => {\n for (const group of RULES.rules) groupKeywords(group)\n groupKeywords(RULES.post)\n })\n\n function groupKeywords(group: RuleGroup): void {\n if (!shouldUseGroup(schema, group)) return\n if (group.type) {\n gen.if(checkDataType(group.type, data, opts.strictNumbers))\n iterateKeywords(it, group)\n if (types.length === 1 && types[0] === group.type && typeErrors) {\n gen.else()\n reportTypeError(it)\n }\n gen.endIf()\n } else {\n iterateKeywords(it, group)\n }\n // TODO make it \"ok\" call?\n if (!allErrors) gen.if(_`${N.errors} === ${errsCount || 0}`)\n }\n}\n\nfunction iterateKeywords(it: SchemaObjCxt, group: RuleGroup): void {\n const {\n gen,\n schema,\n opts: {useDefaults},\n } = it\n if (useDefaults) assignDefaults(it, group.type)\n gen.block(() => {\n for (const rule of group.rules) {\n if (shouldUseRule(schema, rule) || shouldForceUnevaluatedProperties(schema, rule)) {\n keywordCode(it, rule.keyword, rule.definition, group.type)\n }\n }\n })\n\n function shouldForceUnevaluatedProperties(schemaObj: AnySchemaObject, rule: Rule): boolean {\n return !!(\n rule.keyword === \"unevaluatedProperties\" &&\n (schemaObj.properties || schemaObj.patternProperties) &&\n !it.isAllOfVariant &&\n it.opts.defaultUnevaluatedProperties === false\n )\n }\n}\n\nfunction checkStrictTypes(it: SchemaObjCxt, types: JSONType[]): void {\n if (it.schemaEnv.meta || !it.opts.strictTypes) return\n checkContextTypes(it, types)\n if (!it.opts.allowUnionTypes) checkMultipleTypes(it, types)\n checkKeywordTypes(it, it.dataTypes)\n}\n\nfunction checkContextTypes(it: SchemaObjCxt, types: JSONType[]): void {\n if (!types.length) return\n if (!it.dataTypes.length) {\n it.dataTypes = types\n return\n }\n types.forEach((t) => {\n if (!includesType(it.dataTypes, t)) {\n strictTypesError(it, `type \"${t}\" not allowed by context \"${it.dataTypes.join(\",\")}\"`)\n }\n })\n narrowSchemaTypes(it, types)\n}\n\nfunction checkMultipleTypes(it: SchemaObjCxt, ts: JSONType[]): void {\n if (ts.length > 1 && !(ts.length === 2 && ts.includes(\"null\"))) {\n strictTypesError(it, \"use allowUnionTypes to allow union type keyword\")\n }\n}\n\nfunction checkKeywordTypes(it: SchemaObjCxt, ts: JSONType[]): void {\n const rules = it.self.RULES.all\n for (const keyword in rules) {\n const rule = rules[keyword]\n if (typeof rule == \"object\" && shouldUseRule(it.schema, rule)) {\n const {type} = rule.definition\n if (type.length && !type.some((t) => hasApplicableType(ts, t))) {\n strictTypesError(it, `missing type \"${type.join(\",\")}\" for keyword \"${keyword}\"`)\n }\n }\n }\n}\n\nfunction hasApplicableType(schTs: JSONType[], kwdT: JSONType): boolean {\n return schTs.includes(kwdT) || (kwdT === \"number\" && schTs.includes(\"integer\"))\n}\n\nfunction includesType(ts: JSONType[], t: JSONType): boolean {\n return ts.includes(t) || (t === \"integer\" && ts.includes(\"number\"))\n}\n\nfunction narrowSchemaTypes(it: SchemaObjCxt, withTypes: JSONType[]): void {\n const ts: JSONType[] = []\n for (const t of it.dataTypes) {\n if (includesType(withTypes, t)) ts.push(t)\n else if (withTypes.includes(\"integer\") && t === \"number\") ts.push(\"integer\")\n }\n it.dataTypes = ts\n}\n\nfunction strictTypesError(it: SchemaObjCxt, msg: string): void {\n const schemaPath = it.schemaEnv.baseId + it.errSchemaPath\n msg += ` at \"${schemaPath}\" (strictTypes)`\n checkStrictMode(it, msg, it.opts.strictTypes)\n}\n\nexport class KeywordCxt implements KeywordErrorCxt {\n readonly gen: CodeGen\n readonly allErrors?: boolean\n readonly keyword: string\n readonly data: Name // Name referencing the current level of the data instance\n readonly $data?: string | false\n schema: any // keyword value in the schema\n readonly schemaValue: Code | number | boolean // Code reference to keyword schema value or primitive value\n readonly schemaCode: Code | number | boolean // Code reference to resolved schema value (different if schema is $data)\n readonly schemaType: JSONType[] // allowed type(s) of keyword value in the schema\n readonly parentSchema: AnySchemaObject\n readonly errsCount?: Name // Name reference to the number of validation errors collected before this keyword,\n // requires option trackErrors in keyword definition\n params: KeywordCxtParams // object to pass parameters to error messages from keyword code\n readonly it: SchemaObjCxt // schema compilation context (schema is guaranteed to be an object, not boolean)\n readonly def: AddedKeywordDefinition\n\n constructor(it: SchemaObjCxt, def: AddedKeywordDefinition, keyword: string) {\n validateKeywordUsage(it, def, keyword)\n this.gen = it.gen\n this.allErrors = it.allErrors\n this.keyword = keyword\n this.data = it.data\n this.schema = it.schema[keyword]\n this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data\n this.schemaValue = schemaRefOrVal(it, this.schema, keyword, this.$data)\n this.schemaType = def.schemaType\n this.parentSchema = it.schema\n this.params = {}\n this.it = it\n this.def = def\n\n if (this.$data) {\n this.schemaCode = it.gen.const(\"vSchema\", getData(this.$data, it))\n } else {\n this.schemaCode = this.schemaValue\n if (!validSchemaType(this.schema, def.schemaType, def.allowUndefined)) {\n throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`)\n }\n }\n\n if (\"code\" in def ? def.trackErrors : def.errors !== false) {\n this.errsCount = it.gen.const(\"_errs\", N.errors)\n }\n }\n\n result(condition: Code, successAction?: () => void, failAction?: () => void): void {\n this.failResult(not(condition), successAction, failAction)\n }\n\n failResult(condition: Code, successAction?: () => void, failAction?: () => void): void {\n this.gen.if(condition)\n if (failAction) failAction()\n else this.error()\n if (successAction) {\n this.gen.else()\n successAction()\n if (this.allErrors) this.gen.endIf()\n } else {\n if (this.allErrors) this.gen.endIf()\n else this.gen.else()\n }\n }\n\n pass(condition: Code, failAction?: () => void): void {\n this.failResult(not(condition), undefined, failAction)\n }\n\n fail(condition?: Code): void {\n if (condition === undefined) {\n this.error()\n if (!this.allErrors) this.gen.if(false) // this branch will be removed by gen.optimize\n return\n }\n this.gen.if(condition)\n this.error()\n if (this.allErrors) this.gen.endIf()\n else this.gen.else()\n }\n\n fail$data(condition: Code): void {\n if (!this.$data) return this.fail(condition)\n const {schemaCode} = this\n this.fail(_`${schemaCode} !== undefined && (${or(this.invalid$data(), condition)})`)\n }\n\n error(append?: boolean, errorParams?: KeywordCxtParams, errorPaths?: ErrorPaths): void {\n if (errorParams) {\n this.setParams(errorParams)\n this._error(append, errorPaths)\n this.setParams({})\n return\n }\n this._error(append, errorPaths)\n }\n\n private _error(append?: boolean, errorPaths?: ErrorPaths): void {\n ;(append ? reportExtraError : reportError)(this, this.def.error, errorPaths)\n }\n\n $dataError(): void {\n reportError(this, this.def.$dataError || keyword$DataError)\n }\n\n reset(): void {\n if (this.errsCount === undefined) throw new Error('add \"trackErrors\" to keyword definition')\n resetErrorsCount(this.gen, this.errsCount)\n }\n\n ok(cond: Code | boolean): void {\n if (!this.allErrors) this.gen.if(cond)\n }\n\n setParams(obj: KeywordCxtParams, assign?: true): void {\n if (assign) Object.assign(this.params, obj)\n else this.params = obj\n }\n\n block$data(valid: Name, codeBlock: () => void, $dataValid: Code = nil): void {\n this.gen.block(() => {\n this.check$data(valid, $dataValid)\n codeBlock()\n })\n }\n\n check$data(valid: Name = nil, $dataValid: Code = nil): void {\n if (!this.$data) return\n const {gen, schemaCode, schemaType, def} = this\n gen.if(or(_`${schemaCode} === undefined`, $dataValid))\n if (valid !== nil) gen.assign(valid, true)\n if (schemaType.length || def.validateSchema) {\n gen.elseIf(this.invalid$data())\n this.$dataError()\n if (valid !== nil) gen.assign(valid, false)\n }\n gen.else()\n }\n\n invalid$data(): Code {\n const {gen, schemaCode, schemaType, def, it} = this\n return or(wrong$DataType(), invalid$DataSchema())\n\n function wrong$DataType(): Code {\n if (schemaType.length) {\n /* istanbul ignore if */\n if (!(schemaCode instanceof Name)) throw new Error(\"ajv implementation error\")\n const st = Array.isArray(schemaType) ? schemaType : [schemaType]\n return _`${checkDataTypes(st, schemaCode, it.opts.strictNumbers, DataType.Wrong)}`\n }\n return nil\n }\n\n function invalid$DataSchema(): Code {\n if (def.validateSchema) {\n const validateSchemaRef = gen.scopeValue(\"validate$data\", {ref: def.validateSchema}) // TODO value.code for standalone\n return _`!${validateSchemaRef}(${schemaCode})`\n }\n return nil\n }\n }\n\n subschema(appl: SubschemaArgs, valid: Name, isAllOfVariant?: boolean): SchemaCxt {\n const subschema = getSubschema(this.it, appl)\n extendSubschemaData(subschema, this.it, appl)\n extendSubschemaMode(subschema, appl)\n const nextContext = {\n ...this.it,\n ...subschema,\n items: undefined,\n props: undefined,\n isAllOfVariant,\n }\n subschemaCode(nextContext, valid)\n return nextContext\n }\n\n mergeEvaluated(schemaCxt: SchemaCxt, toName?: typeof Name): void {\n const {it, gen} = this\n if (!it.opts.unevaluated) return\n if (it.props !== true && schemaCxt.props !== undefined) {\n it.props = mergeEvaluated.props(gen, schemaCxt.props, it.props, toName)\n }\n if (it.items !== true && schemaCxt.items !== undefined) {\n it.items = mergeEvaluated.items(gen, schemaCxt.items, it.items, toName)\n }\n }\n\n mergeValidEvaluated(schemaCxt: SchemaCxt, valid: Name): boolean | void {\n const {it, gen} = this\n if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {\n gen.if(valid, () => this.mergeEvaluated(schemaCxt, Name))\n return true\n }\n }\n}\n\nfunction keywordCode(\n it: SchemaObjCxt,\n keyword: string,\n def: AddedKeywordDefinition,\n ruleType?: JSONType\n): void {\n const cxt = new KeywordCxt(it, def, keyword)\n if (\"code\" in def) {\n def.code(cxt, ruleType)\n } else if (cxt.$data && def.validate) {\n funcKeywordCode(cxt, def)\n } else if (\"macro\" in def) {\n macroKeywordCode(cxt, def)\n } else if (def.compile || def.validate) {\n funcKeywordCode(cxt, def)\n }\n}\n\nconst JSON_POINTER = /^\\/(?:[^~]|~0|~1)*$/\nconst RELATIVE_JSON_POINTER = /^([0-9]+)(#|\\/(?:[^~]|~0|~1)*)?$/\nexport function getData(\n $data: string,\n {dataLevel, dataNames, dataPathArr}: SchemaCxt\n): Code | number {\n let jsonPointer\n let data: Code\n if ($data === \"\") return N.rootData\n if ($data[0] === \"/\") {\n if (!JSON_POINTER.test($data)) throw new Error(`Invalid JSON-pointer: ${$data}`)\n jsonPointer = $data\n data = N.rootData\n } else {\n const matches = RELATIVE_JSON_POINTER.exec($data)\n if (!matches) throw new Error(`Invalid JSON-pointer: ${$data}`)\n const up: number = +matches[1]\n jsonPointer = matches[2]\n if (jsonPointer === \"#\") {\n if (up >= dataLevel) throw new Error(errorMsg(\"property/index\", up))\n return dataPathArr[dataLevel - up]\n }\n if (up > dataLevel) throw new Error(errorMsg(\"data\", up))\n data = dataNames[dataLevel - up]\n if (!jsonPointer) return data\n }\n\n let expr = data\n const segments = jsonPointer.split(\"/\")\n for (const segment of segments) {\n if (segment) {\n data = _`${data}${getProperty(unescapeJsonPointer(segment))}`\n expr = _`${expr} && ${data}`\n }\n }\n return expr\n\n function errorMsg(pointerType: string, up: number): string {\n return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`\n }\n}\n", "import type {ErrorObject} from \"../types\"\n\nexport default class ValidationError extends Error {\n readonly errors: Partial[]\n readonly ajv: true\n readonly validation: true\n\n constructor(errors: Partial[]) {\n super(\"validation failed\")\n this.errors = errors\n this.ajv = this.validation = true\n }\n}\n", "import {resolveUrl, normalizeId, getFullPath} from \"./resolve\"\nimport type {UriResolver} from \"../types\"\n\nexport default class MissingRefError extends Error {\n readonly missingRef: string\n readonly missingSchema: string\n\n constructor(resolver: UriResolver, baseId: string, ref: string, msg?: string) {\n super(msg || `can't resolve reference ${ref} from id ${baseId}`)\n this.missingRef = resolveUrl(resolver, baseId, ref)\n this.missingSchema = normalizeId(getFullPath(resolver, this.missingRef))\n }\n}\n", "import type {\n AnySchema,\n AnySchemaObject,\n AnyValidateFunction,\n AsyncValidateFunction,\n EvaluatedProperties,\n EvaluatedItems,\n} from \"../types\"\nimport type Ajv from \"../core\"\nimport type {InstanceOptions} from \"../core\"\nimport {CodeGen, _, nil, stringify, Name, Code, ValueScopeName} from \"./codegen\"\nimport ValidationError from \"../runtime/validation_error\"\nimport N from \"./names\"\nimport {LocalRefs, getFullPath, _getFullPath, inlineRef, normalizeId, resolveUrl} from \"./resolve\"\nimport {schemaHasRulesButRef, unescapeFragment} from \"./util\"\nimport {validateFunctionCode} from \"./validate\"\nimport {URIComponent} from \"fast-uri\"\nimport {JSONType} from \"./rules\"\n\nexport type SchemaRefs = {\n [Ref in string]?: SchemaEnv | AnySchema\n}\n\nexport interface SchemaCxt {\n readonly gen: CodeGen\n readonly allErrors?: boolean // validation mode - whether to collect all errors or break on error\n readonly data: Name // Name with reference to the current part of data instance\n readonly parentData: Name // should be used in keywords modifying data\n readonly parentDataProperty: Code | number // should be used in keywords modifying data\n readonly dataNames: Name[]\n readonly dataPathArr: (Code | number)[]\n readonly dataLevel: number // the level of the currently validated data,\n // it can be used to access both the property names and the data on all levels from the top.\n dataTypes: JSONType[] // data types applied to the current part of data instance\n definedProperties: Set // set of properties to keep track of for required checks\n readonly topSchemaRef: Code\n readonly validateName: Name\n evaluated?: Name\n readonly ValidationError?: Name\n readonly schema: AnySchema // current schema object - equal to parentSchema passed via KeywordCxt\n readonly schemaEnv: SchemaEnv\n readonly rootId: string\n baseId: string // the current schema base URI that should be used as the base for resolving URIs in references (\\$ref)\n readonly schemaPath: Code // the run-time expression that evaluates to the property name of the current schema\n readonly errSchemaPath: string // this is actual string, should not be changed to Code\n readonly errorPath: Code\n readonly propertyName?: Name\n readonly compositeRule?: boolean // true indicates that the current schema is inside the compound keyword,\n // where failing some rule doesn't mean validation failure (`anyOf`, `oneOf`, `not`, `if`).\n // This flag is used to determine whether you can return validation result immediately after any error in case the option `allErrors` is not `true.\n // You only need to use it if you have many steps in your keywords and potentially can define multiple errors.\n props?: EvaluatedProperties | Name // properties evaluated by this schema - used by parent schema or assigned to validation function\n items?: EvaluatedItems | Name // last item evaluated by this schema - used by parent schema or assigned to validation function\n jtdDiscriminator?: string\n jtdMetadata?: boolean\n readonly createErrors?: boolean\n readonly opts: InstanceOptions // Ajv instance option.\n readonly self: Ajv // current Ajv instance\n readonly isAllOfVariant?: boolean // if the current schema is direct child of allOf\n}\n\nexport interface SchemaObjCxt extends SchemaCxt {\n readonly schema: AnySchemaObject\n}\ninterface SchemaEnvArgs {\n readonly schema: AnySchema\n readonly schemaId?: \"$id\" | \"id\"\n readonly root?: SchemaEnv\n readonly baseId?: string\n readonly schemaPath?: string\n readonly localRefs?: LocalRefs\n readonly meta?: boolean\n}\n\nexport class SchemaEnv implements SchemaEnvArgs {\n readonly schema: AnySchema\n readonly schemaId?: \"$id\" | \"id\"\n readonly root: SchemaEnv\n baseId: string // TODO possibly, it should be readonly\n schemaPath?: string\n localRefs?: LocalRefs\n readonly meta?: boolean\n readonly $async?: boolean // true if the current schema is asynchronous.\n readonly refs: SchemaRefs = {}\n readonly dynamicAnchors: {[Ref in string]?: true} = {}\n validate?: AnyValidateFunction\n validateName?: ValueScopeName\n serialize?: (data: unknown) => string\n serializeName?: ValueScopeName\n parse?: (data: string) => unknown\n parseName?: ValueScopeName\n\n constructor(env: SchemaEnvArgs) {\n let schema: AnySchemaObject | undefined\n if (typeof env.schema == \"object\") schema = env.schema\n this.schema = env.schema\n this.schemaId = env.schemaId\n this.root = env.root || this\n this.baseId = env.baseId ?? normalizeId(schema?.[env.schemaId || \"$id\"])\n this.schemaPath = env.schemaPath\n this.localRefs = env.localRefs\n this.meta = env.meta\n this.$async = schema?.$async\n this.refs = {}\n }\n}\n\n// let codeSize = 0\n// let nodeCount = 0\n\n// Compiles schema in SchemaEnv\nexport function compileSchema(this: Ajv, sch: SchemaEnv): SchemaEnv {\n // TODO refactor - remove compilations\n const _sch = getCompilingSchema.call(this, sch)\n if (_sch) return _sch\n const rootId = getFullPath(this.opts.uriResolver, sch.root.baseId) // TODO if getFullPath removed 1 tests fails\n const {es5, lines} = this.opts.code\n const {ownProperties} = this.opts\n const gen = new CodeGen(this.scope, {es5, lines, ownProperties})\n\n let _ValidationError\n if (sch.$async) {\n _ValidationError = gen.scopeValue(\"Error\", {\n ref: ValidationError,\n code: _`require(\"ajv/dist/runtime/validation_error\").default`,\n })\n }\n\n const validateName = gen.scopeName(\"validate\")\n sch.validateName = validateName\n\n const schemaCxt: SchemaCxt = {\n gen,\n allErrors: this.opts.allErrors,\n data: N.data,\n parentData: N.parentData,\n parentDataProperty: N.parentDataProperty,\n dataNames: [N.data],\n dataPathArr: [nil], // TODO can its length be used as dataLevel if nil is removed?\n dataLevel: 0,\n dataTypes: [],\n definedProperties: new Set(),\n topSchemaRef: gen.scopeValue(\n \"schema\",\n this.opts.code.source === true\n ? {ref: sch.schema, code: stringify(sch.schema)}\n : {ref: sch.schema}\n ),\n validateName,\n ValidationError: _ValidationError,\n schema: sch.schema,\n schemaEnv: sch,\n rootId,\n baseId: sch.baseId || rootId,\n schemaPath: nil,\n errSchemaPath: sch.schemaPath || (this.opts.jtd ? \"\" : \"#\"),\n errorPath: _`\"\"`,\n opts: this.opts,\n self: this,\n }\n\n let sourceCode: string | undefined\n try {\n this._compilations.add(sch)\n validateFunctionCode(schemaCxt)\n gen.optimize(this.opts.code.optimize)\n // gen.optimize(1)\n const validateCode = gen.toString()\n sourceCode = `const visitedNodesForRef = new WeakMap(); ${gen.scopeRefs(\n N.scope\n )}return ${validateCode}`\n // console.log((codeSize += sourceCode.length), (nodeCount += gen.nodeCount))\n if (this.opts.code.process) sourceCode = this.opts.code.process(sourceCode, sch)\n // console.log(\"\\n\\n\\n *** \\n\", sourceCode)\n const makeValidate = new Function(`${N.self}`, `${N.scope}`, sourceCode)\n const validate: AnyValidateFunction = makeValidate(this, this.scope.get())\n this.scope.value(validateName, {ref: validate})\n\n validate.errors = null\n validate.schema = sch.schema\n validate.schemaEnv = sch\n if (sch.$async) (validate as AsyncValidateFunction).$async = true\n if (this.opts.code.source === true) {\n validate.source = {validateName, validateCode, scopeValues: gen._values}\n }\n if (this.opts.unevaluated) {\n const {props, items} = schemaCxt\n validate.evaluated = {\n props: props instanceof Name ? undefined : props,\n items: items instanceof Name ? undefined : items,\n dynamicProps: props instanceof Name,\n dynamicItems: items instanceof Name,\n }\n if (validate.source) validate.source.evaluated = stringify(validate.evaluated)\n }\n sch.validate = validate\n return sch\n } catch (e) {\n delete sch.validate\n delete sch.validateName\n if (sourceCode) this.logger.error(\"Error compiling schema, function code:\", sourceCode)\n // console.log(\"\\n\\n\\n *** \\n\", sourceCode, this.opts)\n throw e\n } finally {\n this._compilations.delete(sch)\n }\n}\n\nexport function resolveRef(\n this: Ajv,\n root: SchemaEnv,\n baseId: string,\n origRef: string\n): AnySchema | SchemaEnv | undefined {\n const ref = resolveUrl(this.opts.uriResolver, baseId, origRef)\n const schOrFunc = root.refs[ref]\n if (schOrFunc) return schOrFunc\n\n let _sch = resolve.call(this, root, ref)\n if (_sch === undefined) {\n const schema = root.localRefs?.[ref] // TODO maybe localRefs should hold SchemaEnv\n const {schemaId} = this.opts\n if (schema) _sch = new SchemaEnv({schema, schemaId, root, baseId})\n }\n\n if (_sch === undefined && this.opts.loadSchemaSync) {\n const remoteSchema = this.opts.loadSchemaSync(baseId, origRef, ref)\n\n if (remoteSchema && !(this.refs[ref] || this.schemas[ref])) {\n this.addSchema(remoteSchema, ref, undefined)\n _sch = resolve.call(this, root, ref)\n }\n }\n\n if (_sch === undefined) return\n return (root.refs[ref] = inlineOrCompile.call(this, _sch))\n}\n\nfunction inlineOrCompile(this: Ajv, sch: SchemaEnv): AnySchema | SchemaEnv {\n if (inlineRef(sch.schema, this.opts.inlineRefs)) return sch.schema\n return sch.validate ? sch : compileSchema.call(this, sch)\n}\n\n// Index of schema compilation in the currently compiled list\nexport function getCompilingSchema(this: Ajv, schEnv: SchemaEnv): SchemaEnv | void {\n for (const sch of this._compilations) {\n if (sameSchemaEnv(sch, schEnv)) return sch\n }\n}\n\nfunction sameSchemaEnv(s1: SchemaEnv, s2: SchemaEnv): boolean {\n return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId\n}\n\n// resolve and compile the references ($ref)\n// TODO returns AnySchemaObject (if the schema can be inlined) or validation function\nfunction resolve(\n this: Ajv,\n root: SchemaEnv, // information about the root schema for the current schema\n ref: string // reference to resolve\n): SchemaEnv | undefined {\n let sch\n while (typeof (sch = this.refs[ref]) == \"string\") ref = sch\n return sch || this.schemas[ref] || resolveSchema.call(this, root, ref)\n}\n\n// Resolve schema, its root and baseId\nexport function resolveSchema(\n this: Ajv,\n root: SchemaEnv, // root object with properties schema, refs TODO below SchemaEnv is assigned to it\n ref: string // reference to resolve\n): SchemaEnv | undefined {\n const p = this.opts.uriResolver.parse(ref)\n const refPath = _getFullPath(this.opts.uriResolver, p)\n let baseId = getFullPath(this.opts.uriResolver, root.baseId, undefined)\n // TODO `Object.keys(root.schema).length > 0` should not be needed - but removing breaks 2 tests\n if (Object.keys(root.schema).length > 0 && refPath === baseId) {\n return getJsonPointer.call(this, p, root)\n }\n\n const id = normalizeId(refPath)\n const schOrRef = this.refs[id] || this.schemas[id]\n if (typeof schOrRef == \"string\") {\n const sch = resolveSchema.call(this, root, schOrRef)\n if (typeof sch?.schema !== \"object\") return\n return getJsonPointer.call(this, p, sch)\n }\n\n if (typeof schOrRef?.schema !== \"object\") return\n if (!schOrRef.validate) compileSchema.call(this, schOrRef)\n if (id === normalizeId(ref)) {\n const {schema} = schOrRef\n const {schemaId} = this.opts\n const schId = schema[schemaId]\n if (schId) baseId = resolveUrl(this.opts.uriResolver, baseId, schId)\n return new SchemaEnv({schema, schemaId, root, baseId})\n }\n return getJsonPointer.call(this, p, schOrRef)\n}\n\nconst PREVENT_SCOPE_CHANGE = new Set([\n \"properties\",\n \"patternProperties\",\n \"enum\",\n \"dependencies\",\n \"definitions\",\n])\n\nfunction getJsonPointer(\n this: Ajv,\n parsedRef: URIComponent,\n {baseId, schema, root}: SchemaEnv\n): SchemaEnv | undefined {\n if (parsedRef.fragment?.[0] !== \"/\") return\n for (const part of parsedRef.fragment.slice(1).split(\"/\")) {\n if (typeof schema === \"boolean\") return\n const partSchema = schema[unescapeFragment(part)]\n if (partSchema === undefined) return\n schema = partSchema\n // TODO PREVENT_SCOPE_CHANGE could be defined in keyword def?\n const schId = typeof schema === \"object\" && schema[this.opts.schemaId]\n if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {\n baseId = resolveUrl(this.opts.uriResolver, baseId, schId)\n }\n }\n let env: SchemaEnv | undefined\n if (typeof schema != \"boolean\" && schema.$ref && !schemaHasRulesButRef(schema, this.RULES)) {\n const $ref = resolveUrl(this.opts.uriResolver, baseId, schema.$ref)\n env = resolveSchema.call(this, root, $ref)\n }\n // even though resolution failed we need to return SchemaEnv to throw exception\n // so that compileAsync loads missing schema.\n const {schemaId} = this.opts\n env = env || new SchemaEnv({schema, schemaId, root, baseId})\n if (env.schema !== env.root.schema) return env\n return undefined\n}\n", "{\n \"$id\": \"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\",\n \"description\": \"Meta-schema for $data reference (JSON AnySchema extension proposal)\",\n \"type\": \"object\",\n \"required\": [\"$data\"],\n \"properties\": {\n \"$data\": {\n \"type\": \"string\",\n \"anyOf\": [{\"format\": \"relative-json-pointer\"}, {\"format\": \"json-pointer\"}]\n }\n },\n \"additionalProperties\": false\n}\n", "'use strict'\n\n/** @type {(value: string) => boolean} */\nconst isUUID = RegExp.prototype.test.bind(/^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$/iu)\n\n/** @type {(value: string) => boolean} */\nconst isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)$/u)\n\n/** @type {(value: string) => boolean} */\nconst isHexPair = RegExp.prototype.test.bind(/^[\\da-f]{2}$/iu)\n\n/** @type {(value: string) => boolean} */\nconst isUnreserved = RegExp.prototype.test.bind(/^[\\da-z\\-._~]$/iu)\n\n/** @type {(value: string) => boolean} */\nconst isPathCharacter = RegExp.prototype.test.bind(/^[\\da-z\\-._~!$&'()*+,;=:@/]$/iu)\n\n/**\n * @param {Array} input\n * @returns {string}\n */\nfunction stringArrayToHexStripped (input) {\n let acc = ''\n let code = 0\n let i = 0\n\n for (i = 0; i < input.length; i++) {\n code = input[i].charCodeAt(0)\n if (code === 48) {\n continue\n }\n if (!((code >= 48 && code <= 57) || (code >= 65 && code <= 70) || (code >= 97 && code <= 102))) {\n return ''\n }\n acc += input[i]\n break\n }\n\n for (i += 1; i < input.length; i++) {\n code = input[i].charCodeAt(0)\n if (!((code >= 48 && code <= 57) || (code >= 65 && code <= 70) || (code >= 97 && code <= 102))) {\n return ''\n }\n acc += input[i]\n }\n return acc\n}\n\n/**\n * @typedef {Object} GetIPV6Result\n * @property {boolean} error - Indicates if there was an error parsing the IPv6 address.\n * @property {string} address - The parsed IPv6 address.\n * @property {string} [zone] - The zone identifier, if present.\n */\n\n/**\n * @param {string} value\n * @returns {boolean}\n */\nconst nonSimpleDomain = RegExp.prototype.test.bind(/[^!\"$&'()*+,\\-.;=_`a-z{}~]/u)\n\n/**\n * @param {Array} buffer\n * @returns {boolean}\n */\nfunction consumeIsZone (buffer) {\n buffer.length = 0\n return true\n}\n\n/**\n * @param {Array} buffer\n * @param {Array} address\n * @param {GetIPV6Result} output\n * @returns {boolean}\n */\nfunction consumeHextets (buffer, address, output) {\n if (buffer.length) {\n const hex = stringArrayToHexStripped(buffer)\n if (hex !== '') {\n address.push(hex)\n } else {\n output.error = true\n return false\n }\n buffer.length = 0\n }\n return true\n}\n\n/**\n * @param {string} input\n * @returns {GetIPV6Result}\n */\nfunction getIPV6 (input) {\n let tokenCount = 0\n const output = { error: false, address: '', zone: '' }\n /** @type {Array} */\n const address = []\n /** @type {Array} */\n const buffer = []\n let endipv6Encountered = false\n let endIpv6 = false\n\n let consume = consumeHextets\n\n for (let i = 0; i < input.length; i++) {\n const cursor = input[i]\n if (cursor === '[' || cursor === ']') { continue }\n if (cursor === ':') {\n if (endipv6Encountered === true) {\n endIpv6 = true\n }\n if (!consume(buffer, address, output)) { break }\n if (++tokenCount > 7) {\n // not valid\n output.error = true\n break\n }\n if (i > 0 && input[i - 1] === ':') {\n endipv6Encountered = true\n }\n address.push(':')\n continue\n } else if (cursor === '%') {\n if (!consume(buffer, address, output)) { break }\n // switch to zone detection\n consume = consumeIsZone\n } else {\n buffer.push(cursor)\n continue\n }\n }\n if (buffer.length) {\n if (consume === consumeIsZone) {\n output.zone = buffer.join('')\n } else if (endIpv6) {\n address.push(buffer.join(''))\n } else {\n address.push(stringArrayToHexStripped(buffer))\n }\n }\n output.address = address.join('')\n return output\n}\n\n/**\n * @typedef {Object} NormalizeIPv6Result\n * @property {string} host - The normalized host.\n * @property {string} [escapedHost] - The escaped host.\n * @property {boolean} isIPV6 - Indicates if the host is an IPv6 address.\n */\n\n/**\n * @param {string} host\n * @returns {NormalizeIPv6Result}\n */\nfunction normalizeIPv6 (host) {\n if (findToken(host, ':') < 2) { return { host, isIPV6: false } }\n const ipv6 = getIPV6(host)\n\n if (!ipv6.error) {\n let newHost = ipv6.address\n let escapedHost = ipv6.address\n if (ipv6.zone) {\n newHost += '%' + ipv6.zone\n escapedHost += '%25' + ipv6.zone\n }\n return { host: newHost, isIPV6: true, escapedHost }\n } else {\n return { host, isIPV6: false }\n }\n}\n\n/**\n * @param {string} str\n * @param {string} token\n * @returns {number}\n */\nfunction findToken (str, token) {\n let ind = 0\n for (let i = 0; i < str.length; i++) {\n if (str[i] === token) ind++\n }\n return ind\n}\n\n/**\n * @param {string} path\n * @returns {string}\n *\n * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n */\nfunction removeDotSegments (path) {\n let input = path\n const output = []\n let nextSlash = -1\n let len = 0\n\n // eslint-disable-next-line no-cond-assign\n while (len = input.length) {\n if (len === 1) {\n if (input === '.') {\n break\n } else if (input === '/') {\n output.push('/')\n break\n } else {\n output.push(input)\n break\n }\n } else if (len === 2) {\n if (input[0] === '.') {\n if (input[1] === '.') {\n break\n } else if (input[1] === '/') {\n input = input.slice(2)\n continue\n }\n } else if (input[0] === '/') {\n if (input[1] === '.' || input[1] === '/') {\n output.push('/')\n break\n }\n }\n } else if (len === 3) {\n if (input === '/..') {\n if (output.length !== 0) {\n output.pop()\n }\n output.push('/')\n break\n }\n }\n if (input[0] === '.') {\n if (input[1] === '.') {\n if (input[2] === '/') {\n input = input.slice(3)\n continue\n }\n } else if (input[1] === '/') {\n input = input.slice(2)\n continue\n }\n } else if (input[0] === '/') {\n if (input[1] === '.') {\n if (input[2] === '/') {\n input = input.slice(2)\n continue\n } else if (input[2] === '.') {\n if (input[3] === '/') {\n input = input.slice(3)\n if (output.length !== 0) {\n output.pop()\n }\n continue\n }\n }\n }\n }\n\n // Rule 2E: Move normal path segment to output\n if ((nextSlash = input.indexOf('/', 1)) === -1) {\n output.push(input)\n break\n } else {\n output.push(input.slice(0, nextSlash))\n input = input.slice(nextSlash)\n }\n }\n\n return output.join('')\n}\n\n/**\n * Re-escape RFC 3986 gen-delims that must not appear literally in the host.\n * After the URI regex parses, these characters cannot be literal in the host\n * field, so any that appear after decoding came from percent-encoding and\n * must be restored to prevent authority structure changes.\n *\n * @param {string} host\n * @param {boolean} isIP - true for IPv4/IPv6 hosts (skip colon re-escaping)\n * @returns {string}\n */\nconst HOST_DELIMS = { '@': '%40', '/': '%2F', '?': '%3F', '#': '%23', ':': '%3A' }\nconst HOST_DELIM_RE = /[@/?#:]/g\nconst HOST_DELIM_NO_COLON_RE = /[@/?#]/g\n\nfunction reescapeHostDelimiters (host, isIP) {\n const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE\n re.lastIndex = 0\n return host.replace(re, (ch) => HOST_DELIMS[ch])\n}\n\n/**\n * Normalizes percent escapes and optionally decodes only unreserved ASCII bytes.\n * Reserved delimiters such as `%2F` and `%2E` stay escaped.\n *\n * @param {string} input\n * @param {boolean} [decodeUnreserved=false]\n * @returns {string}\n */\nfunction normalizePercentEncoding (input, decodeUnreserved = false) {\n if (input.indexOf('%') === -1) {\n return input\n }\n\n let output = ''\n\n for (let i = 0; i < input.length; i++) {\n if (input[i] === '%' && i + 2 < input.length) {\n const hex = input.slice(i + 1, i + 3)\n if (isHexPair(hex)) {\n const normalizedHex = hex.toUpperCase()\n const decoded = String.fromCharCode(parseInt(normalizedHex, 16))\n\n if (decodeUnreserved && isUnreserved(decoded)) {\n output += decoded\n } else {\n output += '%' + normalizedHex\n }\n\n i += 2\n continue\n }\n }\n\n output += input[i]\n }\n\n return output\n}\n\n/**\n * Normalizes path data without turning reserved escapes into live path syntax.\n * Valid escapes are uppercased, raw unsafe characters are escaped, and only\n * unreserved bytes that are not `.` are decoded.\n *\n * @param {string} input\n * @returns {string}\n */\nfunction normalizePathEncoding (input) {\n let output = ''\n\n for (let i = 0; i < input.length; i++) {\n if (input[i] === '%' && i + 2 < input.length) {\n const hex = input.slice(i + 1, i + 3)\n if (isHexPair(hex)) {\n const normalizedHex = hex.toUpperCase()\n const decoded = String.fromCharCode(parseInt(normalizedHex, 16))\n\n if (decoded !== '.' && isUnreserved(decoded)) {\n output += decoded\n } else {\n output += '%' + normalizedHex\n }\n\n i += 2\n continue\n }\n }\n\n if (isPathCharacter(input[i])) {\n output += input[i]\n } else {\n output += escape(input[i])\n }\n }\n\n return output\n}\n\n/**\n * Escapes a component while preserving existing valid percent escapes.\n *\n * @param {string} input\n * @returns {string}\n */\nfunction escapePreservingEscapes (input) {\n let output = ''\n\n for (let i = 0; i < input.length; i++) {\n if (input[i] === '%' && i + 2 < input.length) {\n const hex = input.slice(i + 1, i + 3)\n if (isHexPair(hex)) {\n output += '%' + hex.toUpperCase()\n i += 2\n continue\n }\n }\n\n output += escape(input[i])\n }\n\n return output\n}\n\n/**\n * @param {import('../types/index').URIComponent} component\n * @returns {string|undefined}\n */\nfunction recomposeAuthority (component) {\n const uriTokens = []\n\n if (component.userinfo !== undefined) {\n uriTokens.push(component.userinfo)\n uriTokens.push('@')\n }\n\n if (component.host !== undefined) {\n let host = unescape(component.host)\n if (!isIPv4(host)) {\n const ipV6res = normalizeIPv6(host)\n if (ipV6res.isIPV6 === true) {\n host = `[${ipV6res.escapedHost}]`\n } else {\n host = reescapeHostDelimiters(host, false)\n }\n }\n uriTokens.push(host)\n }\n\n if (typeof component.port === 'number' || typeof component.port === 'string') {\n uriTokens.push(':')\n uriTokens.push(String(component.port))\n }\n\n return uriTokens.length ? uriTokens.join('') : undefined\n};\n\nmodule.exports = {\n nonSimpleDomain,\n recomposeAuthority,\n reescapeHostDelimiters,\n normalizePercentEncoding,\n normalizePathEncoding,\n escapePreservingEscapes,\n removeDotSegments,\n isIPv4,\n isUUID,\n normalizeIPv6,\n stringArrayToHexStripped\n}\n", "'use strict'\n\nconst { isUUID } = require('./utils')\nconst URN_REG = /([\\da-z][\\d\\-a-z]{0,31}):((?:[\\w!$'()*+,\\-.:;=@]|%[\\da-f]{2})+)/iu\n\nconst supportedSchemeNames = /** @type {const} */ (['http', 'https', 'ws',\n 'wss', 'urn', 'urn:uuid'])\n\n/** @typedef {supportedSchemeNames[number]} SchemeName */\n\n/**\n * @param {string} name\n * @returns {name is SchemeName}\n */\nfunction isValidSchemeName (name) {\n return supportedSchemeNames.indexOf(/** @type {*} */ (name)) !== -1\n}\n\n/**\n * @callback SchemeFn\n * @param {import('../types/index').URIComponent} component\n * @param {import('../types/index').Options} options\n * @returns {import('../types/index').URIComponent}\n */\n\n/**\n * @typedef {Object} SchemeHandler\n * @property {SchemeName} scheme - The scheme name.\n * @property {boolean} [domainHost] - Indicates if the scheme supports domain hosts.\n * @property {SchemeFn} parse - Function to parse the URI component for this scheme.\n * @property {SchemeFn} serialize - Function to serialize the URI component for this scheme.\n * @property {boolean} [skipNormalize] - Indicates if normalization should be skipped for this scheme.\n * @property {boolean} [absolutePath] - Indicates if the scheme uses absolute paths.\n * @property {boolean} [unicodeSupport] - Indicates if the scheme supports Unicode.\n */\n\n/**\n * @param {import('../types/index').URIComponent} wsComponent\n * @returns {boolean}\n */\nfunction wsIsSecure (wsComponent) {\n if (wsComponent.secure === true) {\n return true\n } else if (wsComponent.secure === false) {\n return false\n } else if (wsComponent.scheme) {\n return (\n wsComponent.scheme.length === 3 &&\n (wsComponent.scheme[0] === 'w' || wsComponent.scheme[0] === 'W') &&\n (wsComponent.scheme[1] === 's' || wsComponent.scheme[1] === 'S') &&\n (wsComponent.scheme[2] === 's' || wsComponent.scheme[2] === 'S')\n )\n } else {\n return false\n }\n}\n\n/** @type {SchemeFn} */\nfunction httpParse (component) {\n if (!component.host) {\n component.error = component.error || 'HTTP URIs must have a host.'\n }\n\n return component\n}\n\n/** @type {SchemeFn} */\nfunction httpSerialize (component) {\n const secure = String(component.scheme).toLowerCase() === 'https'\n\n // normalize the default port\n if (component.port === (secure ? 443 : 80) || component.port === '') {\n component.port = undefined\n }\n\n // normalize the empty path\n if (!component.path) {\n component.path = '/'\n }\n\n // NOTE: We do not parse query strings for HTTP URIs\n // as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n // and not the HTTP spec.\n\n return component\n}\n\n/** @type {SchemeFn} */\nfunction wsParse (wsComponent) {\n// indicate if the secure flag is set\n wsComponent.secure = wsIsSecure(wsComponent)\n\n // construct resouce name\n wsComponent.resourceName = (wsComponent.path || '/') + (wsComponent.query ? '?' + wsComponent.query : '')\n wsComponent.path = undefined\n wsComponent.query = undefined\n\n return wsComponent\n}\n\n/** @type {SchemeFn} */\nfunction wsSerialize (wsComponent) {\n// normalize the default port\n if (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === '') {\n wsComponent.port = undefined\n }\n\n // ensure scheme matches secure flag\n if (typeof wsComponent.secure === 'boolean') {\n wsComponent.scheme = (wsComponent.secure ? 'wss' : 'ws')\n wsComponent.secure = undefined\n }\n\n // reconstruct path from resource name\n if (wsComponent.resourceName) {\n const [path, query] = wsComponent.resourceName.split('?')\n wsComponent.path = (path && path !== '/' ? path : undefined)\n wsComponent.query = query\n wsComponent.resourceName = undefined\n }\n\n // forbid fragment component\n wsComponent.fragment = undefined\n\n return wsComponent\n}\n\n/** @type {SchemeFn} */\nfunction urnParse (urnComponent, options) {\n if (!urnComponent.path) {\n urnComponent.error = 'URN can not be parsed'\n return urnComponent\n }\n const matches = urnComponent.path.match(URN_REG)\n if (matches) {\n const scheme = options.scheme || urnComponent.scheme || 'urn'\n urnComponent.nid = matches[1].toLowerCase()\n urnComponent.nss = matches[2]\n const urnScheme = `${scheme}:${options.nid || urnComponent.nid}`\n const schemeHandler = getSchemeHandler(urnScheme)\n urnComponent.path = undefined\n\n if (schemeHandler) {\n urnComponent = schemeHandler.parse(urnComponent, options)\n }\n } else {\n urnComponent.error = urnComponent.error || 'URN can not be parsed.'\n }\n\n return urnComponent\n}\n\n/** @type {SchemeFn} */\nfunction urnSerialize (urnComponent, options) {\n if (urnComponent.nid === undefined) {\n throw new Error('URN without nid cannot be serialized')\n }\n const scheme = options.scheme || urnComponent.scheme || 'urn'\n const nid = urnComponent.nid.toLowerCase()\n const urnScheme = `${scheme}:${options.nid || nid}`\n const schemeHandler = getSchemeHandler(urnScheme)\n\n if (schemeHandler) {\n urnComponent = schemeHandler.serialize(urnComponent, options)\n }\n\n const uriComponent = urnComponent\n const nss = urnComponent.nss\n uriComponent.path = `${nid || options.nid}:${nss}`\n\n options.skipEscape = true\n return uriComponent\n}\n\n/** @type {SchemeFn} */\nfunction urnuuidParse (urnComponent, options) {\n const uuidComponent = urnComponent\n uuidComponent.uuid = uuidComponent.nss\n uuidComponent.nss = undefined\n\n if (!options.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) {\n uuidComponent.error = uuidComponent.error || 'UUID is not valid.'\n }\n\n return uuidComponent\n}\n\n/** @type {SchemeFn} */\nfunction urnuuidSerialize (uuidComponent) {\n const urnComponent = uuidComponent\n // normalize UUID\n urnComponent.nss = (uuidComponent.uuid || '').toLowerCase()\n return urnComponent\n}\n\nconst http = /** @type {SchemeHandler} */ ({\n scheme: 'http',\n domainHost: true,\n parse: httpParse,\n serialize: httpSerialize\n})\n\nconst https = /** @type {SchemeHandler} */ ({\n scheme: 'https',\n domainHost: http.domainHost,\n parse: httpParse,\n serialize: httpSerialize\n})\n\nconst ws = /** @type {SchemeHandler} */ ({\n scheme: 'ws',\n domainHost: true,\n parse: wsParse,\n serialize: wsSerialize\n})\n\nconst wss = /** @type {SchemeHandler} */ ({\n scheme: 'wss',\n domainHost: ws.domainHost,\n parse: ws.parse,\n serialize: ws.serialize\n})\n\nconst urn = /** @type {SchemeHandler} */ ({\n scheme: 'urn',\n parse: urnParse,\n serialize: urnSerialize,\n skipNormalize: true\n})\n\nconst urnuuid = /** @type {SchemeHandler} */ ({\n scheme: 'urn:uuid',\n parse: urnuuidParse,\n serialize: urnuuidSerialize,\n skipNormalize: true\n})\n\nconst SCHEMES = /** @type {Record} */ ({\n http,\n https,\n ws,\n wss,\n urn,\n 'urn:uuid': urnuuid\n})\n\nObject.setPrototypeOf(SCHEMES, null)\n\n/**\n * @param {string|undefined} scheme\n * @returns {SchemeHandler|undefined}\n */\nfunction getSchemeHandler (scheme) {\n return (\n scheme && (\n SCHEMES[/** @type {SchemeName} */ (scheme)] ||\n SCHEMES[/** @type {SchemeName} */(scheme.toLowerCase())])\n ) ||\n undefined\n}\n\nmodule.exports = {\n wsIsSecure,\n SCHEMES,\n isValidSchemeName,\n getSchemeHandler,\n}\n", "'use strict'\n\nconst { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require('./lib/utils')\nconst { SCHEMES, getSchemeHandler } = require('./lib/schemes')\n\n/**\n * @template {import('./types/index').URIComponent|string} T\n * @param {T} uri\n * @param {import('./types/index').Options} [options]\n * @returns {T}\n */\nfunction normalize (uri, options) {\n if (typeof uri === 'string') {\n uri = /** @type {T} */ (normalizeString(uri, options))\n } else if (typeof uri === 'object') {\n uri = /** @type {T} */ (parse(serialize(uri, options), options))\n }\n return uri\n}\n\n/**\n * @param {string} baseURI\n * @param {string} relativeURI\n * @param {import('./types/index').Options} [options]\n * @returns {string}\n */\nfunction resolve (baseURI, relativeURI, options) {\n const schemelessOptions = options ? Object.assign({ scheme: 'null' }, options) : { scheme: 'null' }\n const resolved = resolveComponent(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true)\n schemelessOptions.skipEscape = true\n return serialize(resolved, schemelessOptions)\n}\n\n/**\n * @param {import ('./types/index').URIComponent} base\n * @param {import ('./types/index').URIComponent} relative\n * @param {import('./types/index').Options} [options]\n * @param {boolean} [skipNormalization=false]\n * @returns {import ('./types/index').URIComponent}\n */\nfunction resolveComponent (base, relative, options, skipNormalization) {\n /** @type {import('./types/index').URIComponent} */\n const target = {}\n if (!skipNormalization) {\n base = parse(serialize(base, options), options) // normalize base component\n relative = parse(serialize(relative, options), options) // normalize relative component\n }\n options = options || {}\n\n if (!options.tolerant && relative.scheme) {\n target.scheme = relative.scheme\n // target.authority = relative.authority;\n target.userinfo = relative.userinfo\n target.host = relative.host\n target.port = relative.port\n target.path = removeDotSegments(relative.path || '')\n target.query = relative.query\n } else {\n if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n // target.authority = relative.authority;\n target.userinfo = relative.userinfo\n target.host = relative.host\n target.port = relative.port\n target.path = removeDotSegments(relative.path || '')\n target.query = relative.query\n } else {\n if (!relative.path) {\n target.path = base.path\n if (relative.query !== undefined) {\n target.query = relative.query\n } else {\n target.query = base.query\n }\n } else {\n if (relative.path[0] === '/') {\n target.path = removeDotSegments(relative.path)\n } else {\n if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n target.path = '/' + relative.path\n } else if (!base.path) {\n target.path = relative.path\n } else {\n target.path = base.path.slice(0, base.path.lastIndexOf('/') + 1) + relative.path\n }\n target.path = removeDotSegments(target.path)\n }\n target.query = relative.query\n }\n // target.authority = base.authority;\n target.userinfo = base.userinfo\n target.host = base.host\n target.port = base.port\n }\n target.scheme = base.scheme\n }\n\n target.fragment = relative.fragment\n\n return target\n}\n\n/**\n * @param {import ('./types/index').URIComponent|string} uriA\n * @param {import ('./types/index').URIComponent|string} uriB\n * @param {import ('./types/index').Options} options\n * @returns {boolean}\n */\nfunction equal (uriA, uriB, options) {\n const normalizedA = normalizeComparableURI(uriA, options)\n const normalizedB = normalizeComparableURI(uriB, options)\n\n return normalizedA !== undefined && normalizedB !== undefined && normalizedA.toLowerCase() === normalizedB.toLowerCase()\n}\n\n/**\n * @param {Readonly} cmpts\n * @param {import('./types/index').Options} [opts]\n * @returns {string}\n */\nfunction serialize (cmpts, opts) {\n const component = {\n host: cmpts.host,\n scheme: cmpts.scheme,\n userinfo: cmpts.userinfo,\n port: cmpts.port,\n path: cmpts.path,\n query: cmpts.query,\n nid: cmpts.nid,\n nss: cmpts.nss,\n uuid: cmpts.uuid,\n fragment: cmpts.fragment,\n reference: cmpts.reference,\n resourceName: cmpts.resourceName,\n secure: cmpts.secure,\n error: ''\n }\n const options = Object.assign({}, opts)\n const uriTokens = []\n\n // find scheme handler\n const schemeHandler = getSchemeHandler(options.scheme || component.scheme)\n\n // perform scheme specific serialization\n if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options)\n\n if (component.path !== undefined) {\n if (!options.skipEscape) {\n component.path = escapePreservingEscapes(component.path)\n\n if (component.scheme !== undefined) {\n component.path = component.path.split('%3A').join(':')\n }\n } else {\n component.path = normalizePercentEncoding(component.path)\n }\n }\n\n if (options.reference !== 'suffix' && component.scheme) {\n uriTokens.push(component.scheme, ':')\n }\n\n const authority = recomposeAuthority(component)\n if (authority !== undefined) {\n if (options.reference !== 'suffix') {\n uriTokens.push('//')\n }\n\n uriTokens.push(authority)\n\n if (component.path && component.path[0] !== '/') {\n uriTokens.push('/')\n }\n }\n if (component.path !== undefined) {\n let s = component.path\n\n if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n s = removeDotSegments(s)\n }\n\n if (\n authority === undefined &&\n s[0] === '/' &&\n s[1] === '/'\n ) {\n // don't allow the path to start with \"//\"\n s = '/%2F' + s.slice(2)\n }\n\n uriTokens.push(s)\n }\n\n if (component.query !== undefined) {\n uriTokens.push('?', component.query)\n }\n\n if (component.fragment !== undefined) {\n uriTokens.push('#', component.fragment)\n }\n return uriTokens.join('')\n}\n\nconst URI_PARSE = /^(?:([^#/:?]+):)?(?:\\/\\/((?:([^#/?@]*)@)?(\\[[^#/?\\]]+\\]|[^#/:?]*)(?::(\\d*))?))?([^#?]*)(?:\\?([^#]*))?(?:#((?:.|[\\n\\r])*))?/u\n\n/**\n * @param {import('./types/index').URIComponent} parsed\n * @param {RegExpMatchArray} matches\n * @returns {string|undefined}\n */\nfunction getParseError (parsed, matches) {\n if (matches[2] !== undefined && parsed.path && parsed.path[0] !== '/') {\n return 'URI path must start with \"/\" when authority is present.'\n }\n\n if (typeof parsed.port === 'number' && (parsed.port < 0 || parsed.port > 65535)) {\n return 'URI port is malformed.'\n }\n\n return undefined\n}\n\n/**\n * @param {string} uri\n * @param {import('./types/index').Options} [opts]\n * @returns {{ parsed: import('./types/index').URIComponent, malformedAuthorityOrPort: boolean }}\n */\nfunction parseWithStatus (uri, opts) {\n const options = Object.assign({}, opts)\n /** @type {import('./types/index').URIComponent} */\n const parsed = {\n scheme: undefined,\n userinfo: undefined,\n host: '',\n port: undefined,\n path: '',\n query: undefined,\n fragment: undefined\n }\n\n let malformedAuthorityOrPort = false\n\n let isIP = false\n if (options.reference === 'suffix') {\n if (options.scheme) {\n uri = options.scheme + ':' + uri\n } else {\n uri = '//' + uri\n }\n }\n\n const matches = uri.match(URI_PARSE)\n\n if (matches) {\n // store each component\n parsed.scheme = matches[1]\n parsed.userinfo = matches[3]\n parsed.host = matches[4]\n parsed.port = parseInt(matches[5], 10)\n parsed.path = matches[6] || ''\n parsed.query = matches[7]\n parsed.fragment = matches[8]\n\n // fix port number\n if (isNaN(parsed.port)) {\n parsed.port = matches[5]\n }\n\n const parseError = getParseError(parsed, matches)\n if (parseError !== undefined) {\n parsed.error = parsed.error || parseError\n malformedAuthorityOrPort = true\n }\n\n if (parsed.host) {\n const ipv4result = isIPv4(parsed.host)\n if (ipv4result === false) {\n const ipv6result = normalizeIPv6(parsed.host)\n parsed.host = ipv6result.host.toLowerCase()\n isIP = ipv6result.isIPV6\n } else {\n isIP = true\n }\n }\n if (parsed.scheme === undefined && parsed.userinfo === undefined && parsed.host === undefined && parsed.port === undefined && parsed.query === undefined && !parsed.path) {\n parsed.reference = 'same-document'\n } else if (parsed.scheme === undefined) {\n parsed.reference = 'relative'\n } else if (parsed.fragment === undefined) {\n parsed.reference = 'absolute'\n } else {\n parsed.reference = 'uri'\n }\n\n // check for reference errors\n if (options.reference && options.reference !== 'suffix' && options.reference !== parsed.reference) {\n parsed.error = parsed.error || 'URI is not a ' + options.reference + ' reference.'\n }\n\n // find scheme handler\n const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme)\n\n // check if scheme can't handle IRIs\n if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n // if host component is a domain name\n if (parsed.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost)) && isIP === false && nonSimpleDomain(parsed.host)) {\n // convert Unicode IDN -> ASCII IDN\n try {\n parsed.host = URL.domainToASCII(parsed.host.toLowerCase())\n } catch (e) {\n parsed.error = parsed.error || \"Host's domain name can not be converted to ASCII: \" + e\n }\n }\n // convert IRI -> URI\n }\n\n if (!schemeHandler || (schemeHandler && !schemeHandler.skipNormalize)) {\n if (uri.indexOf('%') !== -1) {\n if (parsed.scheme !== undefined) {\n parsed.scheme = unescape(parsed.scheme)\n }\n if (parsed.host !== undefined) {\n parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP)\n }\n }\n if (parsed.path) {\n parsed.path = normalizePathEncoding(parsed.path)\n }\n if (parsed.fragment) {\n try {\n parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment))\n } catch {\n parsed.error = parsed.error || 'URI malformed'\n }\n }\n }\n\n // perform scheme specific parsing\n if (schemeHandler && schemeHandler.parse) {\n schemeHandler.parse(parsed, options)\n }\n } else {\n parsed.error = parsed.error || 'URI can not be parsed.'\n }\n return { parsed, malformedAuthorityOrPort }\n}\n\n/**\n * @param {string} uri\n * @param {import('./types/index').Options} [opts]\n * @returns\n */\nfunction parse (uri, opts) {\n return parseWithStatus(uri, opts).parsed\n}\n\n/**\n * @param {string} uri\n * @param {import('./types/index').Options} [opts]\n * @returns {string}\n */\nfunction normalizeString (uri, opts) {\n return normalizeStringWithStatus(uri, opts).normalized\n}\n\n/**\n * @param {string} uri\n * @param {import('./types/index').Options} [opts]\n * @returns {{ normalized: string, malformedAuthorityOrPort: boolean }}\n */\nfunction normalizeStringWithStatus (uri, opts) {\n const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts)\n return {\n normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),\n malformedAuthorityOrPort\n }\n}\n\n/**\n * @param {import ('./types/index').URIComponent|string} uri\n * @param {import('./types/index').Options} [opts]\n * @returns {string|undefined}\n */\nfunction normalizeComparableURI (uri, opts) {\n if (typeof uri === 'string') {\n const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts)\n return malformedAuthorityOrPort ? undefined : normalized\n }\n\n if (typeof uri === 'object') {\n return serialize(uri, opts)\n }\n}\n\nconst fastUri = {\n SCHEMES,\n normalize,\n resolve,\n resolveComponent,\n equal,\n serialize,\n parse\n}\n\nmodule.exports = fastUri\nmodule.exports.default = fastUri\nmodule.exports.fastUri = fastUri\n", "import * as uri from \"fast-uri\"\n\ntype URI = typeof uri & {code: string}\n;(uri as URI).code = 'require(\"ajv/dist/runtime/uri\").default'\n\nexport default uri as URI\n", "export {\n Format,\n FormatDefinition,\n AsyncFormatDefinition,\n KeywordDefinition,\n KeywordErrorDefinition,\n CodeKeywordDefinition,\n MacroKeywordDefinition,\n FuncKeywordDefinition,\n Vocabulary,\n Schema,\n SchemaObject,\n AnySchemaObject,\n AsyncSchema,\n AnySchema,\n ValidateFunction,\n AsyncValidateFunction,\n AnyValidateFunction,\n ErrorObject,\n ErrorNoParams,\n} from \"./types\"\n\nexport {SchemaCxt, SchemaObjCxt} from \"./compile\"\nexport interface Plugin {\n (ajv: Ajv, options?: Opts): Ajv\n [prop: string]: any\n}\n\nexport {KeywordCxt} from \"./compile/validate\"\nexport {DefinedError} from \"./vocabularies/errors\"\nexport {JSONType} from \"./compile/rules\"\nexport {JSONSchemaType} from \"./types/json-schema\"\nexport {JTDSchemaType, SomeJTDSchemaType, JTDDataType} from \"./types/jtd-schema\"\nexport {_, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions} from \"./compile/codegen\"\n\nimport type {\n Schema,\n AnySchema,\n AnySchemaObject,\n SchemaObject,\n AsyncSchema,\n Vocabulary,\n KeywordDefinition,\n AddedKeywordDefinition,\n AnyValidateFunction,\n ValidateFunction,\n AsyncValidateFunction,\n ErrorObject,\n Format,\n AddedFormat,\n RegExpEngine,\n UriResolver,\n} from \"./types\"\nimport type {JSONSchemaType} from \"./types/json-schema\"\nimport type {JTDSchemaType, SomeJTDSchemaType, JTDDataType} from \"./types/jtd-schema\"\nimport ValidationError from \"./runtime/validation_error\"\nimport MissingRefError from \"./compile/ref_error\"\nimport {getRules, ValidationRules, Rule, RuleGroup, JSONType} from \"./compile/rules\"\nimport {SchemaEnv, compileSchema, resolveSchema} from \"./compile\"\nimport {Code, ValueScope} from \"./compile/codegen\"\nimport {normalizeId, getSchemaRefs} from \"./compile/resolve\"\nimport {getJSONTypes} from \"./compile/validate/dataType\"\nimport {eachItem} from \"./compile/util\"\nimport * as $dataRefSchema from \"./refs/data.json\"\n\nimport DefaultUriResolver from \"./runtime/uri\"\n\nconst defaultRegExp: RegExpEngine = (str, flags) => new RegExp(str, flags)\ndefaultRegExp.code = \"new RegExp\"\n\nconst META_IGNORE_OPTIONS: (keyof Options)[] = [\n \"removeAdditional\",\n \"useDefaults\",\n \"coerceTypes\",\n \"defaultUnevaluatedProperties\",\n \"defaultAdditionalProperties\",\n]\nconst EXT_SCOPE_NAMES = new Set([\n \"validate\",\n \"serialize\",\n \"parse\",\n \"wrapper\",\n \"root\",\n \"schema\",\n \"keyword\",\n \"pattern\",\n \"formats\",\n \"validate$data\",\n \"func\",\n \"obj\",\n \"Error\",\n])\n\nexport type Options = CurrentOptions & DeprecatedOptions\n\nexport interface CurrentOptions {\n // strict mode options (NEW)\n strict?: boolean | \"log\"\n strictSchema?: boolean | \"log\"\n strictNumbers?: boolean | \"log\"\n strictTypes?: boolean | \"log\"\n strictTuples?: boolean | \"log\"\n strictRequired?: boolean | \"log\"\n allowMatchingProperties?: boolean // disables a strict mode restriction\n allowUnionTypes?: boolean\n validateFormats?: boolean\n // validation and reporting options:\n $data?: boolean\n allErrors?: boolean\n verbose?: boolean\n discriminator?: boolean\n unicodeRegExp?: boolean\n timestamp?: \"string\" | \"date\" // JTD only\n parseDate?: boolean // JTD only\n allowDate?: boolean // JTD only\n specialNumbers?: \"fast\" | \"null\" // JTD only\n $comment?:\n | true\n | ((comment: string, schemaPath?: string, rootSchema?: AnySchemaObject) => unknown)\n formats?: {[Name in string]?: Format}\n keywords?: Vocabulary\n schemas?: AnySchema[] | {[Key in string]?: AnySchema}\n logger?: Logger | false\n loadSchema?: (uri: string) => Promise\n loadSchemaSync?: (base: string, $ref: string, id: string) => AnySchemaObject | boolean\n // options to modify validated data:\n removeAdditional?: boolean | \"all\" | \"failing\"\n defaultUnevaluatedProperties?: boolean\n defaultAdditionalProperties?: boolean // @deprecated\n\n useDefaults?: boolean | \"empty\"\n coerceTypes?: boolean | \"array\"\n // advanced options:\n next?: boolean // NEW\n unevaluated?: boolean // NEW\n dynamicRef?: boolean // NEW\n schemaId?: \"id\" | \"$id\"\n jtd?: boolean // NEW\n meta?: SchemaObject | boolean\n defaultMeta?: string | AnySchemaObject\n validateSchema?: boolean | \"log\"\n addUsedSchema?: boolean\n inlineRefs?: boolean | number\n passContext?: boolean\n loopRequired?: number\n loopEnum?: number // NEW\n ownProperties?: boolean\n multipleOfPrecision?: number\n int32range?: boolean // JTD only\n messages?: boolean\n code?: CodeOptions // NEW\n uriResolver?: UriResolver\n}\n\nexport interface CodeOptions {\n es5?: boolean\n esm?: boolean\n lines?: boolean\n optimize?: boolean | number\n formats?: Code // code to require (or construct) map of available formats - for standalone code\n source?: boolean\n process?: (code: string, schema?: SchemaEnv) => string\n regExp?: RegExpEngine\n}\n\ninterface InstanceCodeOptions extends CodeOptions {\n regExp: RegExpEngine\n optimize: number\n}\n\ninterface DeprecatedOptions {\n /** @deprecated */\n ignoreKeywordsWithRef?: boolean\n /** @deprecated */\n jsPropertySyntax?: boolean // added instead of jsonPointers\n /** @deprecated */\n unicode?: boolean\n}\n\ninterface RemovedOptions {\n format?: boolean\n errorDataPath?: \"object\" | \"property\"\n nullable?: boolean // \"nullable\" keyword is supported by default\n jsonPointers?: boolean\n extendRefs?: true | \"ignore\" | \"fail\"\n missingRefs?: true | \"ignore\" | \"fail\"\n processCode?: (code: string, schema?: SchemaEnv) => string\n sourceCode?: boolean\n strictDefaults?: boolean\n strictKeywords?: boolean\n uniqueItems?: boolean\n unknownFormats?: true | string[] | \"ignore\"\n cache?: any\n serialize?: (schema: AnySchema) => unknown\n ajvErrors?: boolean\n}\n\ntype OptionsInfo = {\n [K in keyof T]-?: string | undefined\n}\n\nconst removedOptions: OptionsInfo = {\n errorDataPath: \"\",\n format: \"`validateFormats: false` can be used instead.\",\n nullable: '\"nullable\" keyword is supported by default.',\n jsonPointers: \"Deprecated jsPropertySyntax can be used instead.\",\n extendRefs: \"Deprecated ignoreKeywordsWithRef can be used instead.\",\n missingRefs: \"Pass empty schema with $id that should be ignored to ajv.addSchema.\",\n processCode: \"Use option `code: {process: (code, schemaEnv: object) => string}`\",\n sourceCode: \"Use option `code: {source: true}`\",\n strictDefaults: \"It is default now, see option `strict`.\",\n strictKeywords: \"It is default now, see option `strict`.\",\n uniqueItems: '\"uniqueItems\" keyword is always validated.',\n unknownFormats: \"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).\",\n cache: \"Map is used as cache, schema object as key.\",\n serialize: \"Map is used as cache, schema object as key.\",\n ajvErrors: \"It is default now.\",\n}\n\nconst deprecatedOptions: OptionsInfo = {\n ignoreKeywordsWithRef: \"\",\n jsPropertySyntax: \"\",\n unicode: '\"minLength\"/\"maxLength\" account for unicode characters by default.',\n}\n\ntype RequiredInstanceOptions = {\n [K in\n | \"strictSchema\"\n | \"strictNumbers\"\n | \"strictTypes\"\n | \"strictTuples\"\n | \"strictRequired\"\n | \"inlineRefs\"\n | \"loopRequired\"\n | \"loopEnum\"\n | \"meta\"\n | \"messages\"\n | \"schemaId\"\n | \"addUsedSchema\"\n | \"validateSchema\"\n | \"validateFormats\"\n | \"int32range\"\n | \"unicodeRegExp\"\n | \"uriResolver\"]: NonNullable\n} & {code: InstanceCodeOptions}\n\nexport type InstanceOptions = Options & RequiredInstanceOptions\n\nconst MAX_EXPRESSION = 200\n\n// eslint-disable-next-line complexity\nfunction requiredOptions(o: Options): RequiredInstanceOptions {\n const s = o.strict\n const _optz = o.code?.optimize\n const optimize = _optz === true || _optz === undefined ? 1 : _optz || 0\n const regExp = o.code?.regExp ?? defaultRegExp\n const uriResolver = o.uriResolver ?? DefaultUriResolver\n return {\n strictSchema: o.strictSchema ?? s ?? true,\n strictNumbers: o.strictNumbers ?? s ?? true,\n strictTypes: o.strictTypes ?? s ?? \"log\",\n strictTuples: o.strictTuples ?? s ?? \"log\",\n strictRequired: o.strictRequired ?? s ?? false,\n code: o.code ? {...o.code, optimize, regExp} : {optimize, regExp},\n loopRequired: o.loopRequired ?? MAX_EXPRESSION,\n loopEnum: o.loopEnum ?? MAX_EXPRESSION,\n meta: o.meta ?? true,\n messages: o.messages ?? true,\n inlineRefs: o.inlineRefs ?? true,\n schemaId: o.schemaId ?? \"$id\",\n addUsedSchema: o.addUsedSchema ?? true,\n validateSchema: o.validateSchema ?? true,\n validateFormats: o.validateFormats ?? true,\n unicodeRegExp: o.unicodeRegExp ?? true,\n int32range: o.int32range ?? true,\n uriResolver: uriResolver,\n }\n}\n\nexport interface Logger {\n log(...args: unknown[]): unknown\n warn(...args: unknown[]): unknown\n error(...args: unknown[]): unknown\n}\n\nexport default class Ajv {\n opts: InstanceOptions\n errors?: ErrorObject[] | null // errors from the last validation\n logger: Logger\n // shared external scope values for compiled functions\n readonly scope: ValueScope\n readonly schemas: {[Key in string]?: SchemaEnv} = {}\n readonly refs: {[Ref in string]?: SchemaEnv | string} = {}\n readonly formats: {[Name in string]?: AddedFormat} = {}\n readonly RULES: ValidationRules\n readonly _compilations: Set = new Set()\n private readonly _loading: {[Ref in string]?: Promise} = {}\n private readonly _cache: Map = new Map()\n private readonly _metaOpts: InstanceOptions\n\n static ValidationError = ValidationError\n static MissingRefError = MissingRefError\n\n constructor(opts: Options = {}) {\n opts = this.opts = {...opts, ...requiredOptions(opts)}\n const {es5, lines} = this.opts.code\n\n this.scope = new ValueScope({scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines})\n this.logger = getLogger(opts.logger)\n const formatOpt = opts.validateFormats\n opts.validateFormats = false\n\n this.RULES = getRules()\n checkOptions.call(this, removedOptions, opts, \"NOT SUPPORTED\")\n checkOptions.call(this, deprecatedOptions, opts, \"DEPRECATED\", \"warn\")\n this._metaOpts = getMetaSchemaOptions.call(this)\n\n if (opts.formats) addInitialFormats.call(this)\n this._addVocabularies()\n this._addDefaultMetaSchema()\n if (opts.keywords) addInitialKeywords.call(this, opts.keywords)\n if (typeof opts.meta == \"object\") this.addMetaSchema(opts.meta)\n addInitialSchemas.call(this)\n opts.validateFormats = formatOpt\n }\n\n _addVocabularies(): void {\n this.addKeyword(\"$async\")\n }\n\n _addDefaultMetaSchema(): void {\n const {$data, meta, schemaId} = this.opts\n let _dataRefSchema: SchemaObject = $dataRefSchema\n if (schemaId === \"id\") {\n _dataRefSchema = {...$dataRefSchema}\n _dataRefSchema.id = _dataRefSchema.$id\n delete _dataRefSchema.$id\n }\n if (meta && $data) this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false)\n }\n\n defaultMeta(): string | AnySchemaObject | undefined {\n const {meta, schemaId} = this.opts\n return (this.opts.defaultMeta = typeof meta == \"object\" ? meta[schemaId] || meta : undefined)\n }\n\n // Set the defaultUnevaluatedProperties option.\n // WARNING: This only affects schemas compiled AFTER this method is called.\n // Already-compiled schemas in the cache will NOT be affected.\n // Consider clearing the cache or creating a new Ajv instance if you need\n // different behavior for the same schemas.\n setDefaultUnevaluatedProperties(value: boolean): void {\n this.opts.defaultUnevaluatedProperties = value\n }\n\n // Validate data using schema\n // AnySchema will be compiled and cached using schema itself as a key for Map\n validate(schema: Schema | string, data: unknown): boolean\n validate(schemaKeyRef: AnySchema | string, data: unknown): boolean | Promise\n validate(schema: Schema | JSONSchemaType | string, data: unknown): data is T\n // Separated for type inference to work\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n validate(schema: JTDSchemaType, data: unknown): data is T\n // This overload is only intended for typescript inference, the first\n // argument prevents manual type annotation from matching this overload\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n validate(\n schema: T,\n data: unknown\n ): data is JTDDataType\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n validate(schema: AsyncSchema, data: unknown | T): Promise\n validate(schemaKeyRef: AnySchema | string, data: unknown): data is T | Promise\n validate(\n schemaKeyRef: AnySchema | string, // key, ref or schema object\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n data: unknown | T // to be validated\n ): boolean | Promise {\n let v: AnyValidateFunction | undefined\n if (typeof schemaKeyRef == \"string\") {\n v = this.getSchema(schemaKeyRef)\n if (!v) throw new Error(`no schema with key or ref \"${schemaKeyRef}\"`)\n } else {\n v = this.compile(schemaKeyRef)\n }\n\n const valid = v(data)\n if (!(\"$async\" in v)) this.errors = v.errors\n return valid\n }\n\n // Create validation function for passed schema\n // _meta: true if schema is a meta-schema. Used internally to compile meta schemas of user-defined keywords.\n compile(schema: Schema | JSONSchemaType, _meta?: boolean): ValidateFunction\n // Separated for type inference to work\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n compile(schema: JTDSchemaType, _meta?: boolean): ValidateFunction\n // This overload is only intended for typescript inference, the first\n // argument prevents manual type annotation from matching this overload\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n compile(\n schema: T,\n _meta?: boolean\n ): ValidateFunction>\n compile(schema: AsyncSchema, _meta?: boolean): AsyncValidateFunction\n compile(schema: AnySchema, _meta?: boolean): AnyValidateFunction\n compile(schema: AnySchema, _meta?: boolean): AnyValidateFunction {\n const sch = this._addSchema(schema, _meta)\n return (sch.validate || this._compileSchemaEnv(sch)) as AnyValidateFunction\n }\n\n // Creates validating function for passed schema with asynchronous loading of missing schemas.\n // `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema.\n // TODO allow passing schema URI\n // meta - optional true to compile meta-schema\n compileAsync(\n schema: SchemaObject | JSONSchemaType,\n _meta?: boolean\n ): Promise>\n // Separated for type inference to work\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n compileAsync(schema: JTDSchemaType, _meta?: boolean): Promise>\n compileAsync(schema: AsyncSchema, meta?: boolean): Promise>\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n compileAsync(\n schema: AnySchemaObject,\n meta?: boolean\n ): Promise>\n compileAsync(\n schema: AnySchemaObject,\n meta?: boolean\n ): Promise> {\n if (typeof this.opts.loadSchema != \"function\") {\n throw new Error(\"options.loadSchema should be a function\")\n }\n const {loadSchema} = this.opts\n return runCompileAsync.call(this, schema, meta)\n\n async function runCompileAsync(\n this: Ajv,\n _schema: AnySchemaObject,\n _meta?: boolean\n ): Promise {\n await loadMetaSchema.call(this, _schema.$schema)\n const sch = this._addSchema(_schema, _meta)\n return sch.validate || _compileAsync.call(this, sch)\n }\n\n async function loadMetaSchema(this: Ajv, $ref?: string): Promise {\n if ($ref && !this.getSchema($ref)) {\n await runCompileAsync.call(this, {$ref}, true)\n }\n }\n\n async function _compileAsync(this: Ajv, sch: SchemaEnv): Promise {\n try {\n return this._compileSchemaEnv(sch)\n } catch (e) {\n if (!(e instanceof MissingRefError)) throw e\n checkLoaded.call(this, e)\n await loadMissingSchema.call(this, e.missingSchema)\n return _compileAsync.call(this, sch)\n }\n }\n\n function checkLoaded(this: Ajv, {missingSchema: ref, missingRef}: MissingRefError): void {\n if (this.refs[ref]) {\n throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`)\n }\n }\n\n async function loadMissingSchema(this: Ajv, ref: string): Promise {\n const _schema = await _loadSchema.call(this, ref)\n if (!this.refs[ref]) await loadMetaSchema.call(this, _schema.$schema)\n if (!this.refs[ref]) this.addSchema(_schema, ref, meta)\n }\n\n async function _loadSchema(this: Ajv, ref: string): Promise {\n const p = this._loading[ref]\n if (p) return p\n try {\n return await (this._loading[ref] = loadSchema(ref))\n } finally {\n delete this._loading[ref]\n }\n }\n }\n\n // Adds schema to the instance\n addSchema(\n schema: AnySchema | AnySchema[], // If array is passed, `key` will be ignored\n key?: string, // Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.\n _meta?: boolean, // true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.\n _validateSchema = this.opts.validateSchema // false to skip schema validation. Used internally, option validateSchema should be used instead.\n ): Ajv {\n if (Array.isArray(schema)) {\n for (const sch of schema) this.addSchema(sch, undefined, _meta, _validateSchema)\n return this\n }\n let id: string | undefined\n if (typeof schema === \"object\") {\n const {schemaId} = this.opts\n id = schema[schemaId]\n if (id !== undefined && typeof id != \"string\") {\n throw new Error(`schema ${schemaId} must be string`)\n }\n }\n key = normalizeId(key || id)\n this._checkUnique(key)\n this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true)\n return this\n }\n\n // Add schema that will be used to validate other schemas\n // options in META_IGNORE_OPTIONS are alway set to false\n addMetaSchema(\n schema: AnySchemaObject,\n key?: string, // schema key\n _validateSchema = this.opts.validateSchema // false to skip schema validation, can be used to override validateSchema option for meta-schema\n ): Ajv {\n this.addSchema(schema, key, true, _validateSchema)\n return this\n }\n\n // Validate schema against its meta-schema\n validateSchema(schema: AnySchema, throwOrLogError?: boolean): boolean | Promise {\n if (typeof schema == \"boolean\") return true\n let $schema: string | AnySchemaObject | undefined\n $schema = schema.$schema\n if ($schema !== undefined && typeof $schema != \"string\") {\n throw new Error(\"$schema must be a string\")\n }\n $schema = $schema || this.opts.defaultMeta || this.defaultMeta()\n if (!$schema) {\n this.logger.warn(\"meta-schema not available\")\n this.errors = null\n return true\n }\n const valid = this.validate($schema, schema)\n if (!valid && throwOrLogError) {\n const message = \"schema is invalid: \" + this.errorsText()\n if (this.opts.validateSchema === \"log\") this.logger.error(message)\n else throw new Error(message)\n }\n return valid\n }\n\n // Get compiled schema by `key` or `ref`.\n // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)\n getSchema(keyRef: string): AnyValidateFunction | undefined {\n let sch\n while (typeof (sch = getSchEnv.call(this, keyRef)) == \"string\") keyRef = sch\n if (sch === undefined) {\n const {schemaId} = this.opts\n const root = new SchemaEnv({schema: {}, schemaId})\n sch = resolveSchema.call(this, root, keyRef)\n if (!sch) return\n this.refs[keyRef] = sch\n }\n return (sch.validate || this._compileSchemaEnv(sch)) as AnyValidateFunction | undefined\n }\n\n // Remove cached schema(s).\n // If no parameter is passed all schemas but meta-schemas are removed.\n // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.\n // Even if schema is referenced by other schemas it still can be removed as other schemas have local references.\n removeSchema(schemaKeyRef?: AnySchema | string | RegExp): Ajv {\n if (schemaKeyRef instanceof RegExp) {\n this._removeAllSchemas(this.schemas, schemaKeyRef)\n this._removeAllSchemas(this.refs, schemaKeyRef)\n return this\n }\n switch (typeof schemaKeyRef) {\n case \"undefined\":\n this._removeAllSchemas(this.schemas)\n this._removeAllSchemas(this.refs)\n this._cache.clear()\n return this\n case \"string\": {\n const sch = getSchEnv.call(this, schemaKeyRef)\n if (typeof sch == \"object\") this._cache.delete(sch.schema)\n delete this.schemas[schemaKeyRef]\n delete this.refs[schemaKeyRef]\n return this\n }\n case \"object\": {\n const cacheKey = schemaKeyRef\n this._cache.delete(cacheKey)\n let id = schemaKeyRef[this.opts.schemaId]\n if (id) {\n id = normalizeId(id)\n delete this.schemas[id]\n delete this.refs[id]\n }\n return this\n }\n default:\n throw new Error(\"ajv.removeSchema: invalid parameter\")\n }\n }\n\n // add \"vocabulary\" - a collection of keywords\n addVocabulary(definitions: Vocabulary): Ajv {\n for (const def of definitions) this.addKeyword(def)\n return this\n }\n\n addKeyword(\n kwdOrDef: string | KeywordDefinition,\n def?: KeywordDefinition // deprecated\n ): Ajv {\n let keyword: string | string[]\n if (typeof kwdOrDef == \"string\") {\n keyword = kwdOrDef\n if (typeof def == \"object\") {\n this.logger.warn(\"these parameters are deprecated, see docs for addKeyword\")\n def.keyword = keyword\n }\n } else if (typeof kwdOrDef == \"object\" && def === undefined) {\n def = kwdOrDef\n keyword = def.keyword\n if (Array.isArray(keyword) && !keyword.length) {\n throw new Error(\"addKeywords: keyword must be string or non-empty array\")\n }\n } else {\n throw new Error(\"invalid addKeywords parameters\")\n }\n\n checkKeyword.call(this, keyword, def)\n if (!def) {\n eachItem(keyword, (kwd) => addRule.call(this, kwd))\n return this\n }\n keywordMetaschema.call(this, def)\n const definition: AddedKeywordDefinition = {\n ...def,\n type: getJSONTypes(def.type),\n schemaType: getJSONTypes(def.schemaType),\n }\n eachItem(\n keyword,\n definition.type.length === 0\n ? (k) => addRule.call(this, k, definition)\n : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t))\n )\n return this\n }\n\n getKeyword(keyword: string): AddedKeywordDefinition | boolean {\n const rule = this.RULES.all[keyword]\n return typeof rule == \"object\" ? rule.definition : !!rule\n }\n\n // Remove keyword\n removeKeyword(keyword: string): Ajv {\n // TODO return type should be Ajv\n const {RULES} = this\n delete RULES.keywords[keyword]\n delete RULES.all[keyword]\n for (const group of RULES.rules) {\n const i = group.rules.findIndex((rule) => rule.keyword === keyword)\n if (i >= 0) group.rules.splice(i, 1)\n }\n return this\n }\n\n // Add format\n addFormat(name: string, format: Format): Ajv {\n if (typeof format == \"string\") format = new RegExp(format)\n this.formats[name] = format\n return this\n }\n\n errorsText(\n errors: ErrorObject[] | null | undefined = this.errors, // optional array of validation errors\n {separator = \", \", dataVar = \"data\"}: ErrorsTextOptions = {} // optional options with properties `separator` and `dataVar`\n ): string {\n if (!errors || errors.length === 0) return \"No errors\"\n return errors\n .map((e) => `${dataVar}${e.instancePath} ${e.message}`)\n .reduce((text, msg) => text + separator + msg)\n }\n\n $dataMetaSchema(metaSchema: AnySchemaObject, keywordsJsonPointers: string[]): AnySchemaObject {\n const rules = this.RULES.all\n metaSchema = JSON.parse(JSON.stringify(metaSchema))\n for (const jsonPointer of keywordsJsonPointers) {\n const segments = jsonPointer.split(\"/\").slice(1) // first segment is an empty string\n let keywords = metaSchema\n for (const seg of segments) keywords = keywords[seg] as AnySchemaObject\n\n for (const key in rules) {\n const rule = rules[key]\n if (typeof rule != \"object\") continue\n const {$data} = rule.definition\n const schema = keywords[key] as AnySchemaObject | undefined\n if ($data && schema) keywords[key] = schemaOrData(schema)\n }\n }\n\n return metaSchema\n }\n\n private _removeAllSchemas(schemas: {[Ref in string]?: SchemaEnv | string}, regex?: RegExp): void {\n for (const keyRef in schemas) {\n const sch = schemas[keyRef]\n if (!regex || regex.test(keyRef)) {\n if (typeof sch == \"string\") {\n delete schemas[keyRef]\n } else if (sch && !sch.meta) {\n this._cache.delete(sch.schema)\n delete schemas[keyRef]\n }\n }\n }\n }\n\n _addSchema(\n schema: AnySchema,\n meta?: boolean,\n baseId?: string,\n validateSchema = this.opts.validateSchema,\n addSchema = this.opts.addUsedSchema\n ): SchemaEnv {\n let id: string | undefined\n const {schemaId} = this.opts\n if (typeof schema == \"object\") {\n id = schema[schemaId]\n } else {\n if (this.opts.jtd) throw new Error(\"schema must be object\")\n else if (typeof schema != \"boolean\") throw new Error(\"schema must be object or boolean\")\n }\n let sch = this._cache.get(schema)\n if (sch !== undefined) return sch\n\n baseId = normalizeId(id || baseId)\n const localRefs = getSchemaRefs.call(this, schema, baseId)\n sch = new SchemaEnv({schema, schemaId, meta, baseId, localRefs})\n this._cache.set(sch.schema, sch)\n if (addSchema && !baseId.startsWith(\"#\")) {\n // TODO atm it is allowed to overwrite schemas without id (instead of not adding them)\n if (baseId) this._checkUnique(baseId)\n this.refs[baseId] = sch\n }\n if (validateSchema) this.validateSchema(schema, true)\n return sch\n }\n\n private _checkUnique(id: string): void {\n if (this.schemas[id] || this.refs[id]) {\n throw new Error(`schema with key or id \"${id}\" already exists`)\n }\n }\n\n private _compileSchemaEnv(sch: SchemaEnv): AnyValidateFunction {\n if (sch.meta) this._compileMetaSchema(sch)\n else compileSchema.call(this, sch)\n\n /* istanbul ignore if */\n if (!sch.validate) throw new Error(\"ajv implementation error\")\n return sch.validate\n }\n\n private _compileMetaSchema(sch: SchemaEnv): void {\n const currentOpts = this.opts\n this.opts = this._metaOpts\n try {\n compileSchema.call(this, sch)\n } finally {\n this.opts = currentOpts\n }\n }\n}\n\nexport interface ErrorsTextOptions {\n separator?: string\n dataVar?: string\n}\n\nfunction checkOptions(\n this: Ajv,\n checkOpts: OptionsInfo,\n options: Options & RemovedOptions,\n msg: string,\n log: \"warn\" | \"error\" = \"error\"\n): void {\n for (const key in checkOpts) {\n const opt = key as keyof typeof checkOpts\n if (opt in options) this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`)\n }\n}\n\nfunction getSchEnv(this: Ajv, keyRef: string): SchemaEnv | string | undefined {\n keyRef = normalizeId(keyRef) // TODO tests fail without this line\n return this.schemas[keyRef] || this.refs[keyRef]\n}\n\nfunction addInitialSchemas(this: Ajv): void {\n const optsSchemas = this.opts.schemas\n if (!optsSchemas) return\n if (Array.isArray(optsSchemas)) this.addSchema(optsSchemas)\n else for (const key in optsSchemas) this.addSchema(optsSchemas[key] as AnySchema, key)\n}\n\nfunction addInitialFormats(this: Ajv): void {\n for (const name in this.opts.formats) {\n const format = this.opts.formats[name]\n if (format) this.addFormat(name, format)\n }\n}\n\nfunction addInitialKeywords(\n this: Ajv,\n defs: Vocabulary | {[K in string]?: KeywordDefinition}\n): void {\n if (Array.isArray(defs)) {\n this.addVocabulary(defs)\n return\n }\n this.logger.warn(\"keywords option as map is deprecated, pass array\")\n for (const keyword in defs) {\n const def = defs[keyword] as KeywordDefinition\n if (!def.keyword) def.keyword = keyword\n this.addKeyword(def)\n }\n}\n\nfunction getMetaSchemaOptions(this: Ajv): InstanceOptions {\n const metaOpts = {...this.opts}\n for (const opt of META_IGNORE_OPTIONS) delete metaOpts[opt]\n return metaOpts\n}\n\nconst noLogs = {log() {}, warn() {}, error() {}}\n\nfunction getLogger(logger?: Partial | false): Logger {\n if (logger === false) return noLogs\n if (logger === undefined) return console\n if (logger.log && logger.warn && logger.error) return logger as Logger\n throw new Error(\"logger must implement log, warn and error methods\")\n}\n\nconst KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i\n\nfunction checkKeyword(this: Ajv, keyword: string | string[], def?: KeywordDefinition): void {\n const {RULES} = this\n eachItem(keyword, (kwd) => {\n if (RULES.keywords[kwd]) throw new Error(`Keyword ${kwd} is already defined`)\n if (!KEYWORD_NAME.test(kwd)) throw new Error(`Keyword ${kwd} has invalid name`)\n })\n if (!def) return\n if (def.$data && !(\"code\" in def || \"validate\" in def)) {\n throw new Error('$data keyword must have \"code\" or \"validate\" function')\n }\n}\n\nfunction addRule(\n this: Ajv,\n keyword: string,\n definition?: AddedKeywordDefinition,\n dataType?: JSONType\n): void {\n const post = definition?.post\n if (dataType && post) throw new Error('keyword with \"post\" flag cannot have \"type\"')\n const {RULES} = this\n let ruleGroup = post ? RULES.post : RULES.rules.find(({type: t}) => t === dataType)\n if (!ruleGroup) {\n ruleGroup = {type: dataType, rules: []}\n RULES.rules.push(ruleGroup)\n }\n RULES.keywords[keyword] = true\n if (!definition) return\n\n const rule: Rule = {\n keyword,\n definition: {\n ...definition,\n type: getJSONTypes(definition.type),\n schemaType: getJSONTypes(definition.schemaType),\n },\n }\n if (definition.before) addBeforeRule.call(this, ruleGroup, rule, definition.before)\n else ruleGroup.rules.push(rule)\n RULES.all[keyword] = rule\n definition.implements?.forEach((kwd) => this.addKeyword(kwd))\n}\n\nfunction addBeforeRule(this: Ajv, ruleGroup: RuleGroup, rule: Rule, before: string): void {\n const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before)\n if (i >= 0) {\n ruleGroup.rules.splice(i, 0, rule)\n } else {\n ruleGroup.rules.push(rule)\n this.logger.warn(`rule ${before} is not defined`)\n }\n}\n\nfunction keywordMetaschema(this: Ajv, def: KeywordDefinition): void {\n let {metaSchema} = def\n if (metaSchema === undefined) return\n if (def.$data && this.opts.$data) metaSchema = schemaOrData(metaSchema)\n def.validateSchema = this.compile(metaSchema, true)\n}\n\nconst $dataRef = {\n $ref: \"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\",\n}\n\nfunction schemaOrData(schema: AnySchema): AnySchemaObject {\n return {anyOf: [schema, $dataRef]}\n}\n", "import type {CodeKeywordDefinition} from \"../../types\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"id\",\n code() {\n throw new Error('NOT SUPPORTED: keyword \"id\", use \"$id\" for schema ID')\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, AnySchema} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport MissingRefError from \"../../compile/ref_error\"\nimport {callValidateCode} from \"../code\"\nimport {_, nil, stringify, Code, Name} from \"../../compile/codegen\"\nimport N from \"../../compile/names\"\nimport {SchemaEnv, resolveRef} from \"../../compile\"\nimport {mergeEvaluated} from \"../../compile/util\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"$ref\",\n schemaType: \"string\",\n code(cxt: KeywordCxt): void {\n const {gen, schema: $ref, it} = cxt\n const {baseId, schemaEnv: env, validateName, opts, self} = it\n const {root} = env\n if (($ref === \"#\" || $ref === \"#/\") && baseId === root.baseId) return callRootRef()\n const schOrEnv = resolveRef.call(self, root, baseId, $ref)\n if (schOrEnv === undefined) throw new MissingRefError(it.opts.uriResolver, baseId, $ref)\n if (schOrEnv instanceof SchemaEnv) return callValidate(schOrEnv)\n return inlineRefSchema(schOrEnv)\n\n function callRootRef(): void {\n if (env === root) return callRef(cxt, validateName, env, env.$async)\n const rootName = gen.scopeValue(\"root\", {ref: root})\n return callRef(cxt, _`${rootName}.validate`, root, root.$async)\n }\n\n function callValidate(sch: SchemaEnv): void {\n const v = getValidate(cxt, sch)\n callRef(cxt, v, sch, sch.$async)\n }\n\n function inlineRefSchema(sch: AnySchema): void {\n const schName = gen.scopeValue(\n \"schema\",\n opts.code.source === true ? {ref: sch, code: stringify(sch)} : {ref: sch}\n )\n const valid = gen.name(\"valid\")\n const schCxt = cxt.subschema(\n {\n schema: sch,\n dataTypes: [],\n schemaPath: nil,\n topSchemaRef: schName,\n errSchemaPath: $ref,\n },\n valid,\n it.isAllOfVariant // pass isAllOfVariant into inlined $ref\n )\n cxt.mergeEvaluated(schCxt)\n cxt.ok(valid)\n }\n },\n}\n\nexport function getValidate(cxt: KeywordCxt, sch: SchemaEnv): Code {\n const {gen} = cxt\n return sch.validate\n ? gen.scopeValue(\"validate\", {ref: sch.validate})\n : _`${gen.scopeValue(\"wrapper\", {ref: sch})}.validate`\n}\n\nexport function callRef(cxt: KeywordCxt, v: Code, sch?: SchemaEnv, $async?: boolean): void {\n const {gen, it} = cxt\n const {allErrors, schemaEnv: env, opts} = it\n const passCxt = opts.passContext ? N.this : nil\n if ($async) callAsyncRef()\n else callSyncRef()\n\n function callAsyncRef(): void {\n if (!env.$async) throw new Error(\"async schema referenced by sync schema\")\n const valid = gen.let(\"valid\")\n gen.try(\n () => {\n gen.code(_`await ${callValidateCode(cxt, v, passCxt)}`)\n addEvaluatedFrom(v) // TODO will not work with async, it has to be returned with the result\n if (!allErrors) gen.assign(valid, true)\n },\n (e) => {\n gen.if(_`!(${e} instanceof ${it.ValidationError as Name})`, () => gen.throw(e))\n addErrorsFrom(e)\n if (!allErrors) gen.assign(valid, false)\n }\n )\n cxt.ok(valid)\n }\n\n function callSyncRef(): void {\n const visitedNodes: Name = gen.name(\"visitedNodes\")\n gen.code(\n _`const ${visitedNodes} = (typeof visitedNodesForRef !== 'undefined') && visitedNodesForRef.get(${v}) || new Set()`\n )\n gen.if(_`!${visitedNodes}.has(${cxt.data})`, () => {\n gen.code(\n _`if (typeof visitedNodesForRef !== 'undefined') visitedNodesForRef.set(${v}, ${visitedNodes})`\n )\n gen.code(_`const dataNode = ${cxt.data}`)\n gen.code(\n _`if (typeof dataNode === \"object\" && dataNode !== null) ${visitedNodes}.add(dataNode)`\n )\n const res = cxt.result(\n callValidateCode(cxt, v, passCxt),\n () => addEvaluatedFrom(v),\n () => addErrorsFrom(v)\n )\n gen.code(_`${visitedNodes}.delete(dataNode)`)\n return res\n })\n }\n\n function addErrorsFrom(source: Code): void {\n const errs = _`${source}.errors`\n gen.assign(N.vErrors, _`${N.vErrors} === null ? ${errs} : ${N.vErrors}.concat(${errs})`) // TODO tagged\n gen.assign(N.errors, _`${N.vErrors}.length`)\n }\n\n function addEvaluatedFrom(source: Code): void {\n if (!it.opts.unevaluated) return\n const schEvaluated = sch?.validate?.evaluated\n // TODO refactor\n if (it.props !== true) {\n if (schEvaluated && !schEvaluated.dynamicProps) {\n if (schEvaluated.props !== undefined) {\n it.props = mergeEvaluated.props(gen, schEvaluated.props, it.props)\n }\n } else {\n const props = gen.var(\"props\", _`${source}.evaluated.props`)\n it.props = mergeEvaluated.props(gen, props, it.props, Name)\n }\n }\n if (it.items !== true) {\n if (schEvaluated && !schEvaluated.dynamicItems) {\n if (schEvaluated.items !== undefined) {\n it.items = mergeEvaluated.items(gen, schEvaluated.items, it.items)\n }\n } else {\n const items = gen.var(\"items\", _`${source}.evaluated.items`)\n it.items = mergeEvaluated.items(gen, items, it.items, Name)\n }\n }\n }\n}\n\nexport default def\n", "import type {Vocabulary} from \"../../types\"\nimport idKeyword from \"./id\"\nimport refKeyword from \"./ref\"\n\nconst core: Vocabulary = [\n \"$schema\",\n \"$id\",\n \"$defs\",\n \"$vocabulary\",\n {keyword: \"$comment\"},\n \"definitions\",\n idKeyword,\n refKeyword,\n]\n\nexport default core\n", "import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, operators, Code} from \"../../compile/codegen\"\n\nconst ops = operators\n\ntype Kwd = \"maximum\" | \"minimum\" | \"exclusiveMaximum\" | \"exclusiveMinimum\"\n\ntype Comparison = \"<=\" | \">=\" | \"<\" | \">\"\n\nconst KWDs: {[K in Kwd]: {okStr: Comparison; ok: Code; fail: Code}} = {\n maximum: {okStr: \"<=\", ok: ops.LTE, fail: ops.GT},\n minimum: {okStr: \">=\", ok: ops.GTE, fail: ops.LT},\n exclusiveMaximum: {okStr: \"<\", ok: ops.LT, fail: ops.GTE},\n exclusiveMinimum: {okStr: \">\", ok: ops.GT, fail: ops.LTE},\n}\n\nexport type LimitNumberError = ErrorObject<\n Kwd,\n {limit: number; comparison: Comparison},\n number | {$data: string}\n>\n\nconst error: KeywordErrorDefinition = {\n message: ({keyword, schemaCode}) => str`must be ${KWDs[keyword as Kwd].okStr} ${schemaCode}`,\n params: ({keyword, schemaCode}) =>\n _`{comparison: ${KWDs[keyword as Kwd].okStr}, limit: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: Object.keys(KWDs),\n type: \"number\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {keyword, data, schemaCode} = cxt\n cxt.fail$data(_`${data} ${KWDs[keyword as Kwd].fail} ${schemaCode} || isNaN(${data})`)\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str} from \"../../compile/codegen\"\n\nexport type MultipleOfError = ErrorObject<\n \"multipleOf\",\n {multipleOf: number},\n number | {$data: string}\n>\n\nconst error: KeywordErrorDefinition = {\n message: ({schemaCode}) => str`must be multiple of ${schemaCode}`,\n params: ({schemaCode}) => _`{multipleOf: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"multipleOf\",\n type: \"number\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, data, schemaCode, it} = cxt\n // const bdt = bad$DataType(schemaCode, def.schemaType, $data)\n const prec = it.opts.multipleOfPrecision\n const res = gen.let(\"res\")\n const invalid = prec\n ? _`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}`\n : _`${res} !== parseInt(${res})`\n cxt.fail$data(_`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`)\n },\n}\n\nexport default def\n", "// https://mathiasbynens.be/notes/javascript-encoding\n// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode\nexport default function ucs2length(str: string): number {\n const len = str.length\n let length = 0\n let pos = 0\n let value: number\n while (pos < len) {\n length++\n value = str.charCodeAt(pos++)\n if (value >= 0xd800 && value <= 0xdbff && pos < len) {\n // high surrogate, and there is a next character\n value = str.charCodeAt(pos)\n if ((value & 0xfc00) === 0xdc00) pos++ // low surrogate\n }\n }\n return length\n}\n\nucs2length.code = 'require(\"ajv/dist/runtime/ucs2length\").default'\n", "import type {CodeKeywordDefinition, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, operators} from \"../../compile/codegen\"\nimport {useFunc} from \"../../compile/util\"\nimport ucs2length from \"../../runtime/ucs2length\"\n\nconst error: KeywordErrorDefinition = {\n message({keyword, schemaCode}) {\n const comp = keyword === \"maxLength\" ? \"more\" : \"fewer\"\n return str`must NOT have ${comp} than ${schemaCode} characters`\n },\n params: ({schemaCode}) => _`{limit: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: [\"maxLength\", \"minLength\"],\n type: \"string\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {keyword, data, schemaCode, it} = cxt\n const op = keyword === \"maxLength\" ? operators.GT : operators.LT\n const len =\n it.opts.unicode === false ? _`${data}.length` : _`${useFunc(cxt.gen, ucs2length)}(${data})`\n cxt.fail$data(_`${len} ${op} ${schemaCode}`)\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {usePattern} from \"../code\"\nimport {useFunc} from \"../../compile/util\"\nimport {_, str} from \"../../compile/codegen\"\n\nexport type PatternError = ErrorObject<\"pattern\", {pattern: string}, string | {$data: string}>\n\nconst error: KeywordErrorDefinition = {\n message: ({schemaCode}) => str`must match pattern \"${schemaCode}\"`,\n params: ({schemaCode}) => _`{pattern: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"pattern\",\n type: \"string\",\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, data, $data, schema, schemaCode, it} = cxt\n const u = it.opts.unicodeRegExp ? \"u\" : \"\"\n if ($data) {\n const {regExp} = it.opts.code\n const regExpCode = regExp.code === \"new RegExp\" ? _`new RegExp` : useFunc(gen, regExp)\n const valid = gen.let(\"valid\")\n gen.try(\n () => gen.assign(valid, _`${regExpCode}(${schemaCode}, ${u}).test(${data})`),\n () => gen.assign(valid, false)\n )\n cxt.fail$data(_`!${valid}`)\n } else {\n const regExp = usePattern(cxt, schema)\n cxt.fail$data(_`!${regExp}.test(${data})`)\n }\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, operators} from \"../../compile/codegen\"\n\nconst error: KeywordErrorDefinition = {\n message({keyword, schemaCode}) {\n const comp = keyword === \"maxProperties\" ? \"more\" : \"fewer\"\n return str`must NOT have ${comp} than ${schemaCode} properties`\n },\n params: ({schemaCode}) => _`{limit: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: [\"maxProperties\", \"minProperties\"],\n type: \"object\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {keyword, data, schemaCode} = cxt\n const op = keyword === \"maxProperties\" ? operators.GT : operators.LT\n cxt.fail$data(_`Object.keys(${data}).length ${op} ${schemaCode}`)\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {\n checkReportMissingProp,\n checkMissingProp,\n reportMissingProp,\n propertyInData,\n noPropertyInData,\n} from \"../code\"\nimport {getSkipCondition} from \"../oasContext\"\nimport {_, str, nil, not, Name, Code} from \"../../compile/codegen\"\nimport {checkStrictMode} from \"../../compile/util\"\n\nexport type RequiredError = ErrorObject<\n \"required\",\n {missingProperty: string},\n string[] | {$data: string}\n>\n\nconst error: KeywordErrorDefinition = {\n message: ({params: {missingProperty}}) => str`must have required property '${missingProperty}'`,\n params: ({params: {missingProperty}}) => _`{missingProperty: ${missingProperty}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"required\",\n type: \"object\",\n schemaType: \"array\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, schema, schemaCode, data, $data, it} = cxt\n const {opts} = it\n if (!$data && schema.length === 0) return\n const useLoop = schema.length >= opts.loopRequired\n if (it.allErrors) allErrorsMode()\n else exitOnErrorMode()\n\n if (opts.strictRequired) {\n const props = cxt.parentSchema.properties\n const {definedProperties} = cxt.it\n for (const requiredKey of schema) {\n if (props?.[requiredKey] === undefined && !definedProperties.has(requiredKey)) {\n const schemaPath = it.schemaEnv.baseId + it.errSchemaPath\n const msg = `required property \"${requiredKey}\" is not defined at \"${schemaPath}\" (strictRequired)`\n checkStrictMode(it, msg, it.opts.strictRequired)\n }\n }\n }\n\n function allErrorsMode(): void {\n if (useLoop || $data) {\n cxt.block$data(nil, loopAllRequired)\n } else {\n for (const prop of schema) {\n const skip = getSkipCondition(cxt.parentSchema, prop) ?? _`false`\n /**\n * Generate a runtime check: validate `required` only when this property\n * should NOT be skipped in the current context (readOnly/writeOnly).\n */\n gen.if(not(skip), () => checkReportMissingProp(cxt, prop))\n }\n }\n }\n\n function exitOnErrorMode(): void {\n const missing = gen.let(\"missing\")\n if (useLoop || $data) {\n const valid = gen.let(\"valid\", true)\n cxt.block$data(valid, () => loopUntilMissing(missing, valid))\n cxt.ok(valid)\n } else {\n gen.if(checkMissingProp(cxt, schema, missing))\n reportMissingProp(cxt, missing)\n gen.else()\n }\n }\n\n function loopAllRequired(): void {\n gen.forOf(\"prop\", schemaCode as Code, (prop) => {\n cxt.setParams({missingProperty: prop})\n gen.if(noPropertyInData(gen, data, prop, opts.ownProperties), () => cxt.error())\n })\n }\n\n function loopUntilMissing(missing: Name, valid: Name): void {\n cxt.setParams({missingProperty: missing})\n gen.forOf(\n missing,\n schemaCode as Code,\n () => {\n gen.assign(valid, propertyInData(gen, data, missing, opts.ownProperties))\n gen.if(not(valid), () => {\n cxt.error()\n gen.break()\n })\n },\n nil\n )\n }\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str} from \"../../compile/codegen\"\nimport N from \"../../compile/names\"\n\nconst error: KeywordErrorDefinition = {\n message: () => str`must NOT be present in request context`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"readOnly\",\n schemaType: \"boolean\",\n error,\n code(cxt: KeywordCxt) {\n if (cxt.schema !== true) return\n\n const apiContext = _`(${N.this} && ${N.this}.apiContext)`\n\n cxt.fail(_`${apiContext} === \"request\"`)\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str} from \"../../compile/codegen\"\nimport N from \"../../compile/names\"\n\nconst error: KeywordErrorDefinition = {\n message: () => str`must NOT be present in response context`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"writeOnly\",\n schemaType: \"boolean\",\n error,\n code(cxt: KeywordCxt) {\n if (cxt.schema !== true) return\n const apiContext = _`(${N.this} && ${N.this}.apiContext)`\n\n cxt.fail(_`${apiContext} === \"response\"`)\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, operators} from \"../../compile/codegen\"\n\nconst error: KeywordErrorDefinition = {\n message({keyword, schemaCode}) {\n const comp = keyword === \"maxItems\" ? \"more\" : \"fewer\"\n return str`must NOT have ${comp} than ${schemaCode} items`\n },\n params: ({schemaCode}) => _`{limit: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: [\"maxItems\", \"minItems\"],\n type: \"array\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {keyword, data, schemaCode} = cxt\n const op = keyword === \"maxItems\" ? operators.GT : operators.LT\n cxt.fail$data(_`${data}.length ${op} ${schemaCode}`)\n },\n}\n\nexport default def\n", "// https://github.com/ajv-validator/ajv/issues/889\nimport * as equal from \"fast-deep-equal\"\n\ntype Equal = typeof equal & {code: string}\n;(equal as Equal).code = 'require(\"ajv/dist/runtime/equal\").default'\n\nexport default equal as Equal\n", "import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {checkDataTypes, getSchemaTypes, DataType} from \"../../compile/validate/dataType\"\nimport {_, str, Name} from \"../../compile/codegen\"\nimport {useFunc} from \"../../compile/util\"\nimport equal from \"../../runtime/equal\"\n\nexport type UniqueItemsError = ErrorObject<\n \"uniqueItems\",\n {i: number; j: number},\n boolean | {$data: string}\n>\n\nconst error: KeywordErrorDefinition = {\n message: ({params: {i, j}}) =>\n str`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,\n params: ({params: {i, j}}) => _`{i: ${i}, j: ${j}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"uniqueItems\",\n type: \"array\",\n schemaType: \"boolean\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, data, $data, schema, parentSchema, schemaCode, it} = cxt\n if (!$data && !schema) return\n const valid = gen.let(\"valid\")\n const itemTypes = parentSchema.items ? getSchemaTypes(parentSchema.items) : []\n cxt.block$data(valid, validateUniqueItems, _`${schemaCode} === false`)\n cxt.ok(valid)\n\n function validateUniqueItems(): void {\n const i = gen.let(\"i\", _`${data}.length`)\n const j = gen.let(\"j\")\n cxt.setParams({i, j})\n gen.assign(valid, true)\n gen.if(_`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j))\n }\n\n function canOptimize(): boolean {\n return itemTypes.length > 0 && !itemTypes.some((t) => t === \"object\" || t === \"array\")\n }\n\n function loopN(i: Name, j: Name): void {\n const item = gen.name(\"item\")\n const wrongType = checkDataTypes(itemTypes, item, it.opts.strictNumbers, DataType.Wrong)\n const indices = gen.const(\"indices\", _`{}`)\n gen.for(_`;${i}--;`, () => {\n gen.let(item, _`${data}[${i}]`)\n gen.if(wrongType, _`continue`)\n if (itemTypes.length > 1) gen.if(_`typeof ${item} == \"string\"`, _`${item} += \"_\"`)\n gen\n .if(_`typeof ${indices}[${item}] == \"number\"`, () => {\n gen.assign(j, _`${indices}[${item}]`)\n cxt.error()\n gen.assign(valid, false).break()\n })\n .code(_`${indices}[${item}] = ${i}`)\n })\n }\n\n function loopN2(i: Name, j: Name): void {\n const eql = useFunc(gen, equal)\n const outer = gen.name(\"outer\")\n gen.label(outer).for(_`;${i}--;`, () =>\n gen.for(_`${j} = ${i}; ${j}--;`, () =>\n gen.if(_`${eql}(${data}[${i}], ${data}[${j}])`, () => {\n cxt.error()\n gen.assign(valid, false).break(outer)\n })\n )\n )\n }\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_} from \"../../compile/codegen\"\nimport {useFunc} from \"../../compile/util\"\nimport equal from \"../../runtime/equal\"\n\nexport type ConstError = ErrorObject<\"const\", {allowedValue: any}>\n\nconst error: KeywordErrorDefinition = {\n message: \"must be equal to constant\",\n params: ({schemaCode}) => _`{allowedValue: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"const\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, data, $data, schemaCode, schema} = cxt\n if ($data || (schema && typeof schema == \"object\")) {\n cxt.fail$data(_`!${useFunc(gen, equal)}(${data}, ${schemaCode})`)\n } else {\n cxt.fail(_`${schema} !== ${data}`)\n }\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, or, Name, Code} from \"../../compile/codegen\"\nimport {useFunc} from \"../../compile/util\"\nimport equal from \"../../runtime/equal\"\n\nexport type EnumError = ErrorObject<\"enum\", {allowedValues: any[]}, any[] | {$data: string}>\n\nconst error: KeywordErrorDefinition = {\n message: \"must be equal to one of the allowed values\",\n params: ({schemaCode}) => _`{allowedValues: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"enum\",\n schemaType: \"array\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, data, $data, schema, schemaCode, it} = cxt\n if (!$data && schema.length === 0) throw new Error(\"enum must have non-empty array\")\n const useLoop = schema.length >= it.opts.loopEnum\n let eql: Name | undefined\n const getEql = (): Name => (eql ??= useFunc(gen, equal))\n\n let valid: Code\n if (useLoop || $data) {\n valid = gen.let(\"valid\")\n cxt.block$data(valid, loopEnum)\n } else {\n /* istanbul ignore if */\n if (!Array.isArray(schema)) throw new Error(\"ajv implementation error\")\n const vSchema = gen.const(\"vSchema\", schemaCode)\n valid = or(...schema.map((_x: unknown, i: number) => equalCode(vSchema, i)))\n }\n cxt.pass(valid)\n\n function loopEnum(): void {\n gen.assign(valid, false)\n gen.forOf(\"v\", schemaCode as Code, (v) =>\n gen.if(_`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break())\n )\n }\n\n function equalCode(vSchema: Name, i: number): Code {\n const sch = schema[i]\n return typeof sch === \"object\" && sch !== null\n ? _`${getEql()}(${data}, ${vSchema}[${i}])`\n : _`${data} === ${sch}`\n }\n },\n}\n\nexport default def\n", "import type {ErrorObject, Vocabulary} from \"../../types\"\nimport limitNumber, {LimitNumberError} from \"./limitNumber\"\nimport multipleOf, {MultipleOfError} from \"./multipleOf\"\nimport limitLength from \"./limitLength\"\nimport pattern, {PatternError} from \"./pattern\"\nimport limitProperties from \"./limitProperties\"\nimport required, {RequiredError} from \"./required\"\nimport readOnlyKeyword from \"./readOnly\"\nimport writeOnlyKeyword from \"./writeOnly\"\nimport limitItems from \"./limitItems\"\nimport uniqueItems, {UniqueItemsError} from \"./uniqueItems\"\nimport constKeyword, {ConstError} from \"./const\"\nimport enumKeyword, {EnumError} from \"./enum\"\n\nconst validation: Vocabulary = [\n // number\n limitNumber,\n multipleOf,\n // string\n limitLength,\n pattern,\n // object\n limitProperties,\n required,\n readOnlyKeyword,\n writeOnlyKeyword,\n // array\n limitItems,\n uniqueItems,\n // any\n {keyword: \"type\", schemaType: [\"string\", \"array\"]},\n {keyword: \"nullable\", schemaType: \"boolean\"},\n constKeyword,\n enumKeyword,\n]\n\nexport default validation\n\ntype LimitError = ErrorObject<\n \"maxItems\" | \"minItems\" | \"minProperties\" | \"maxProperties\" | \"minLength\" | \"maxLength\",\n {limit: number},\n number | {$data: string}\n>\n\nexport type ValidationKeywordError =\n | LimitError\n | LimitNumberError\n | MultipleOfError\n | PatternError\n | RequiredError\n | UniqueItemsError\n | ConstError\n | EnumError\n", "import type {\n CodeKeywordDefinition,\n ErrorObject,\n KeywordErrorDefinition,\n AnySchema,\n} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, not, Name} from \"../../compile/codegen\"\nimport {alwaysValidSchema, checkStrictMode, Type} from \"../../compile/util\"\n\nexport type AdditionalItemsError = ErrorObject<\"additionalItems\", {limit: number}, AnySchema>\n\nconst error: KeywordErrorDefinition = {\n message: ({params: {len}}) => str`must NOT have more than ${len} items`,\n params: ({params: {len}}) => _`{limit: ${len}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"additionalItems\" as const,\n type: \"array\",\n schemaType: [\"boolean\", \"object\"],\n before: \"uniqueItems\",\n error,\n code(cxt: KeywordCxt) {\n const {parentSchema, it} = cxt\n const {items} = parentSchema\n if (!Array.isArray(items)) {\n checkStrictMode(it, '\"additionalItems\" is ignored when \"items\" is not an array of schemas')\n return\n }\n validateAdditionalItems(cxt, items)\n },\n}\n\nexport function validateAdditionalItems(cxt: KeywordCxt, items: AnySchema[]): void {\n const {gen, schema, data, keyword, it} = cxt\n it.items = true\n const len = gen.const(\"len\", _`${data}.length`)\n if (schema === false) {\n cxt.setParams({len: items.length})\n cxt.pass(_`${len} <= ${items.length}`)\n } else if (typeof schema == \"object\" && !alwaysValidSchema(it, schema)) {\n const valid = gen.var(\"valid\", _`${len} <= ${items.length}`) // TODO var\n gen.if(not(valid), () => validateItems(valid))\n cxt.ok(valid)\n }\n\n function validateItems(valid: Name): void {\n gen.forRange(\"i\", items.length, len, (i) => {\n cxt.subschema({keyword, dataProp: i, dataPropType: Type.Num}, valid)\n if (!it.allErrors) gen.if(not(valid), () => gen.break())\n })\n }\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, AnySchema, AnySchemaObject} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_} from \"../../compile/codegen\"\nimport {alwaysValidSchema, mergeEvaluated, checkStrictMode} from \"../../compile/util\"\nimport {validateArray} from \"../code\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"items\",\n type: \"array\",\n schemaType: [\"object\", \"array\", \"boolean\"],\n before: \"uniqueItems\",\n code(cxt: KeywordCxt) {\n const {schema, it} = cxt\n if (Array.isArray(schema)) return validateTuple(cxt, \"additionalItems\", schema)\n it.items = true\n if (alwaysValidSchema(it, schema)) return\n cxt.ok(validateArray(cxt))\n },\n}\n\nexport function validateTuple(\n cxt: KeywordCxt,\n extraItems: string,\n schArr: AnySchema[] = cxt.schema\n): void {\n const {gen, parentSchema, data, keyword, it} = cxt\n checkStrictTuple(parentSchema)\n if (it.opts.unevaluated && schArr.length && it.items !== true) {\n it.items = mergeEvaluated.items(gen, schArr.length, it.items)\n }\n const valid = gen.name(\"valid\")\n const len = gen.const(\"len\", _`${data}.length`)\n schArr.forEach((sch: AnySchema, i: number) => {\n if (alwaysValidSchema(it, sch)) return\n gen.if(_`${len} > ${i}`, () =>\n cxt.subschema(\n {\n keyword,\n schemaProp: i,\n dataProp: i,\n },\n valid\n )\n )\n cxt.ok(valid)\n })\n\n function checkStrictTuple(sch: AnySchemaObject): void {\n const {opts, errSchemaPath} = it\n const l = schArr.length\n const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false)\n if (opts.strictTuples && !fullTuple) {\n const msg = `\"${keyword}\" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path \"${errSchemaPath}\"`\n checkStrictMode(it, msg, opts.strictTuples)\n }\n }\n}\n\nexport default def\n", "import type {CodeKeywordDefinition} from \"../../types\"\nimport {validateTuple} from \"./items\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"prefixItems\",\n type: \"array\",\n schemaType: [\"array\"],\n before: \"uniqueItems\",\n code: (cxt) => validateTuple(cxt, \"items\"),\n}\n\nexport default def\n", "import type {\n CodeKeywordDefinition,\n KeywordErrorDefinition,\n ErrorObject,\n AnySchema,\n} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str} from \"../../compile/codegen\"\nimport {alwaysValidSchema} from \"../../compile/util\"\nimport {validateArray} from \"../code\"\nimport {validateAdditionalItems} from \"./additionalItems\"\n\nexport type ItemsError = ErrorObject<\"items\", {limit: number}, AnySchema>\n\nconst error: KeywordErrorDefinition = {\n message: ({params: {len}}) => str`must NOT have more than ${len} items`,\n params: ({params: {len}}) => _`{limit: ${len}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"items\",\n type: \"array\",\n schemaType: [\"object\", \"boolean\"],\n before: \"uniqueItems\",\n error,\n code(cxt: KeywordCxt) {\n const {schema, parentSchema, it} = cxt\n const {prefixItems} = parentSchema\n it.items = true\n if (alwaysValidSchema(it, schema)) return\n if (prefixItems) validateAdditionalItems(cxt, prefixItems)\n else cxt.ok(validateArray(cxt))\n },\n}\n\nexport default def\n", "import type {\n CodeKeywordDefinition,\n KeywordErrorDefinition,\n ErrorObject,\n AnySchema,\n} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, Name} from \"../../compile/codegen\"\nimport {alwaysValidSchema, checkStrictMode, Type} from \"../../compile/util\"\n\nexport type ContainsError = ErrorObject<\n \"contains\",\n {minContains: number; maxContains?: number},\n AnySchema\n>\n\nconst error: KeywordErrorDefinition = {\n message: ({params: {min, max}}) =>\n max === undefined\n ? str`must contain at least ${min} valid item(s)`\n : str`must contain at least ${min} and no more than ${max} valid item(s)`,\n params: ({params: {min, max}}) =>\n max === undefined ? _`{minContains: ${min}}` : _`{minContains: ${min}, maxContains: ${max}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"contains\",\n type: \"array\",\n schemaType: [\"object\", \"boolean\"],\n before: \"uniqueItems\",\n trackErrors: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, schema, parentSchema, data, it} = cxt\n let min: number\n let max: number | undefined\n const {minContains, maxContains} = parentSchema\n if (it.opts.next) {\n min = minContains === undefined ? 1 : minContains\n max = maxContains\n } else {\n min = 1\n }\n const len = gen.const(\"len\", _`${data}.length`)\n cxt.setParams({min, max})\n if (max === undefined && min === 0) {\n checkStrictMode(it, `\"minContains\" == 0 without \"maxContains\": \"contains\" keyword ignored`)\n return\n }\n if (max !== undefined && min > max) {\n checkStrictMode(it, `\"minContains\" > \"maxContains\" is always invalid`)\n cxt.fail()\n return\n }\n if (alwaysValidSchema(it, schema)) {\n let cond = _`${len} >= ${min}`\n if (max !== undefined) cond = _`${cond} && ${len} <= ${max}`\n cxt.pass(cond)\n return\n }\n\n it.items = true\n const valid = gen.name(\"valid\")\n if (max === undefined && min === 1) {\n validateItems(valid, () => gen.if(valid, () => gen.break()))\n } else if (min === 0) {\n gen.let(valid, true)\n if (max !== undefined) gen.if(_`${data}.length > 0`, validateItemsWithCount)\n } else {\n gen.let(valid, false)\n validateItemsWithCount()\n }\n cxt.result(valid, () => cxt.reset())\n\n function validateItemsWithCount(): void {\n const schValid = gen.name(\"_valid\")\n const count = gen.let(\"count\", 0)\n validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)))\n }\n\n function validateItems(_valid: Name, block: () => void): void {\n gen.forRange(\"i\", 0, len, (i) => {\n cxt.subschema(\n {\n keyword: \"contains\",\n dataProp: i,\n dataPropType: Type.Num,\n compositeRule: true,\n },\n _valid\n )\n block()\n })\n }\n\n function checkLimits(count: Name): void {\n gen.code(_`${count}++`)\n if (max === undefined) {\n gen.if(_`${count} >= ${min}`, () => gen.assign(valid, true).break())\n } else {\n gen.if(_`${count} > ${max}`, () => gen.assign(valid, false).break())\n if (min === 1) gen.assign(valid, true)\n else gen.if(_`${count} >= ${min}`, () => gen.assign(valid, true))\n }\n }\n },\n}\n\nexport default def\n", "import type {\n CodeKeywordDefinition,\n ErrorObject,\n KeywordErrorDefinition,\n SchemaMap,\n AnySchema,\n} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str} from \"../../compile/codegen\"\nimport {alwaysValidSchema} from \"../../compile/util\"\nimport {checkReportMissingProp, checkMissingProp, reportMissingProp, propertyInData} from \"../code\"\n\nexport type PropertyDependencies = {[K in string]?: string[]}\n\nexport interface DependenciesErrorParams {\n property: string\n missingProperty: string\n depsCount: number\n deps: string // TODO change to string[]\n}\n\ntype SchemaDependencies = SchemaMap\n\nexport type DependenciesError = ErrorObject<\n \"dependencies\",\n DependenciesErrorParams,\n {[K in string]?: string[] | AnySchema}\n>\n\nexport const error: KeywordErrorDefinition = {\n message: ({params: {property, depsCount, deps}}) => {\n const property_ies = depsCount === 1 ? \"property\" : \"properties\"\n return str`must have ${property_ies} ${deps} when property ${property} is present`\n },\n params: ({params: {property, depsCount, deps, missingProperty}}) =>\n _`{property: ${property},\n missingProperty: ${missingProperty},\n depsCount: ${depsCount},\n deps: ${deps}}`, // TODO change to reference\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"dependencies\",\n type: \"object\",\n schemaType: \"object\",\n error,\n code(cxt: KeywordCxt) {\n const [propDeps, schDeps] = splitDependencies(cxt)\n validatePropertyDeps(cxt, propDeps)\n validateSchemaDeps(cxt, schDeps)\n },\n}\n\nfunction splitDependencies({schema}: KeywordCxt): [PropertyDependencies, SchemaDependencies] {\n const propertyDeps: PropertyDependencies = {}\n const schemaDeps: SchemaDependencies = {}\n for (const key in schema) {\n if (key === \"__proto__\") continue\n const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps\n deps[key] = schema[key]\n }\n return [propertyDeps, schemaDeps]\n}\n\nexport function validatePropertyDeps(\n cxt: KeywordCxt,\n propertyDeps: {[K in string]?: string[]} = cxt.schema\n): void {\n const {gen, data, it} = cxt\n if (Object.keys(propertyDeps).length === 0) return\n const missing = gen.let(\"missing\")\n for (const prop in propertyDeps) {\n const deps = propertyDeps[prop] as string[]\n if (deps.length === 0) continue\n const hasProperty = propertyInData(gen, data, prop, it.opts.ownProperties)\n cxt.setParams({\n property: prop,\n depsCount: deps.length,\n deps: deps.join(\", \"),\n })\n if (it.allErrors) {\n gen.if(hasProperty, () => {\n for (const depProp of deps) {\n checkReportMissingProp(cxt, depProp)\n }\n })\n } else {\n gen.if(_`${hasProperty} && (${checkMissingProp(cxt, deps, missing)})`)\n reportMissingProp(cxt, missing)\n gen.else()\n }\n }\n}\n\nexport function validateSchemaDeps(cxt: KeywordCxt, schemaDeps: SchemaMap = cxt.schema): void {\n const {gen, data, keyword, it} = cxt\n const valid = gen.name(\"valid\")\n for (const prop in schemaDeps) {\n if (alwaysValidSchema(it, schemaDeps[prop] as AnySchema)) continue\n gen.if(\n propertyInData(gen, data, prop, it.opts.ownProperties),\n () => {\n const schCxt = cxt.subschema({keyword, schemaProp: prop}, valid)\n cxt.mergeValidEvaluated(schCxt, valid)\n },\n () => gen.var(valid, true) // TODO var\n )\n cxt.ok(valid)\n }\n}\n\nexport default def\n", "import type {\n CodeKeywordDefinition,\n ErrorObject,\n KeywordErrorDefinition,\n AnySchema,\n} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, not} from \"../../compile/codegen\"\nimport {alwaysValidSchema} from \"../../compile/util\"\n\nexport type PropertyNamesError = ErrorObject<\"propertyNames\", {propertyName: string}, AnySchema>\n\nconst error: KeywordErrorDefinition = {\n message: \"property name must be valid\",\n params: ({params}) => _`{propertyName: ${params.propertyName}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"propertyNames\",\n type: \"object\",\n schemaType: [\"object\", \"boolean\"],\n error,\n code(cxt: KeywordCxt) {\n const {gen, schema, data, it} = cxt\n if (alwaysValidSchema(it, schema)) return\n const valid = gen.name(\"valid\")\n\n gen.forIn(\"key\", data, (key) => {\n cxt.setParams({propertyName: key})\n cxt.subschema(\n {\n keyword: \"propertyNames\",\n data: key,\n dataTypes: [\"string\"],\n propertyName: key,\n compositeRule: true,\n },\n valid\n )\n gen.if(not(valid), () => {\n cxt.error(true)\n if (!it.allErrors) gen.break()\n })\n })\n\n cxt.ok(valid)\n },\n}\n\nexport default def\n", "import type {\n CodeKeywordDefinition,\n AddedKeywordDefinition,\n ErrorObject,\n KeywordErrorDefinition,\n AnySchema,\n} from \"../../types\"\nimport {allSchemaProperties, usePattern, isOwnProperty} from \"../code\"\nimport {_, nil, or, not, Code, Name} from \"../../compile/codegen\"\nimport N from \"../../compile/names\"\nimport type {SubschemaArgs} from \"../../compile/validate/subschema\"\nimport {alwaysValidSchema, schemaRefOrVal, Type} from \"../../compile/util\"\n\nexport type AdditionalPropertiesError = ErrorObject<\n \"additionalProperties\",\n {additionalProperty: string},\n AnySchema\n>\n\nconst error: KeywordErrorDefinition = {\n message: \"must NOT have additional properties\",\n params: ({params}) => _`{additionalProperty: ${params.additionalProperty}}`,\n}\n\nconst def: CodeKeywordDefinition & AddedKeywordDefinition = {\n keyword: \"additionalProperties\",\n type: [\"object\"],\n schemaType: [\"boolean\", \"object\"],\n allowUndefined: true,\n trackErrors: true,\n error,\n code(cxt) {\n const {gen, parentSchema, data, errsCount, it} = cxt\n const {schema = it.opts.defaultAdditionalProperties} = cxt\n /* istanbul ignore if */\n if (!errsCount) throw new Error(\"ajv implementation error\")\n const {allErrors, opts} = it\n it.props = true\n if (opts.removeAdditional !== \"all\" && alwaysValidSchema(it, schema)) return\n const props = allSchemaProperties(parentSchema.properties)\n const patProps = allSchemaProperties(parentSchema.patternProperties)\n checkAdditionalProperties()\n cxt.ok(_`${errsCount} === ${N.errors}`)\n\n function checkAdditionalProperties(): void {\n gen.forIn(\"key\", data, (key: Name) => {\n if (!props.length && !patProps.length) additionalPropertyCode(key)\n else gen.if(isAdditional(key), () => additionalPropertyCode(key))\n })\n }\n\n function isAdditional(key: Name): Code {\n let definedProp: Code\n if (props.length > 8) {\n // TODO maybe an option instead of hard-coded 8?\n const propsSchema = schemaRefOrVal(it, parentSchema.properties, \"properties\")\n definedProp = isOwnProperty(gen, propsSchema as Code, key)\n } else if (props.length) {\n definedProp = or(...props.map((p) => _`${key} === ${p}`))\n } else {\n definedProp = nil\n }\n if (patProps.length) {\n definedProp = or(definedProp, ...patProps.map((p) => _`${usePattern(cxt, p)}.test(${key})`))\n }\n return not(definedProp)\n }\n\n function deleteAdditional(key: Name): void {\n gen.code(_`delete ${data}[${key}]`)\n }\n\n function additionalPropertyCode(key: Name): void {\n if (opts.removeAdditional === \"all\" || (opts.removeAdditional && schema === false)) {\n deleteAdditional(key)\n return\n }\n\n if (schema === false) {\n cxt.setParams({additionalProperty: key})\n cxt.error()\n if (!allErrors) gen.break()\n return\n }\n\n if (typeof schema == \"object\" && !alwaysValidSchema(it, schema)) {\n const valid = gen.name(\"valid\")\n if (opts.removeAdditional === \"failing\") {\n applyAdditionalSchema(key, valid, false)\n gen.if(not(valid), () => {\n cxt.reset()\n deleteAdditional(key)\n })\n } else {\n applyAdditionalSchema(key, valid)\n if (!allErrors) gen.if(not(valid), () => gen.break())\n }\n }\n }\n\n function applyAdditionalSchema(key: Name, valid: Name, errors?: false): void {\n const subschema: SubschemaArgs = {\n keyword: \"additionalProperties\",\n dataProp: key,\n dataPropType: Type.Str,\n }\n if (errors === false) {\n Object.assign(subschema, {\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n })\n }\n cxt.subschema(subschema, valid)\n }\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition} from \"../../types\"\nimport {KeywordCxt} from \"../../compile/validate\"\nimport {propertyInData, allSchemaProperties} from \"../code\"\nimport {alwaysValidSchema, toHash, mergeEvaluated} from \"../../compile/util\"\nimport apDef from \"./additionalProperties\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"properties\",\n type: \"object\",\n schemaType: \"object\",\n code(cxt: KeywordCxt) {\n const {gen, schema, parentSchema, data, it} = cxt\n if (\n (it.opts.removeAdditional === \"all\" && parentSchema.additionalProperties === undefined) ||\n it.opts.defaultAdditionalProperties === false\n ) {\n apDef.code(new KeywordCxt(it, apDef, \"additionalProperties\"))\n }\n const allProps = allSchemaProperties(schema)\n for (const prop of allProps) {\n it.definedProperties.add(prop)\n }\n if (it.opts.unevaluated && allProps.length && it.props !== true) {\n it.props = mergeEvaluated.props(gen, toHash(allProps), it.props)\n }\n const properties = allProps.filter((p) => !alwaysValidSchema(it, schema[p]))\n if (properties.length === 0) return\n const valid = gen.name(\"valid\")\n\n for (const prop of properties) {\n if (hasDefault(prop)) {\n applyPropertySchema(prop)\n } else {\n gen.if(propertyInData(gen, data, prop, it.opts.ownProperties))\n applyPropertySchema(prop)\n if (!it.allErrors) gen.else().var(valid, true)\n gen.endIf()\n }\n cxt.it.definedProperties.add(prop)\n cxt.ok(valid)\n }\n\n function hasDefault(prop: string): boolean | undefined {\n return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== undefined\n }\n\n function applyPropertySchema(prop: string): void {\n cxt.subschema(\n {\n keyword: \"properties\",\n schemaProp: prop,\n dataProp: prop,\n },\n valid\n )\n }\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {allSchemaProperties, usePattern} from \"../code\"\nimport {_, not, Name} from \"../../compile/codegen\"\nimport {alwaysValidSchema, checkStrictMode} from \"../../compile/util\"\nimport {evaluatedPropsToName, Type} from \"../../compile/util\"\nimport {AnySchema} from \"../../types\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"patternProperties\",\n type: \"object\",\n schemaType: \"object\",\n code(cxt: KeywordCxt) {\n const {gen, schema, data, parentSchema, it} = cxt\n const {opts} = it\n const patterns = allSchemaProperties(schema)\n const alwaysValidPatterns = patterns.filter((p) =>\n alwaysValidSchema(it, schema[p] as AnySchema)\n )\n\n if (\n patterns.length === 0 ||\n (alwaysValidPatterns.length === patterns.length &&\n (!it.opts.unevaluated || it.props === true))\n ) {\n return\n }\n\n const checkProperties =\n opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties\n const valid = gen.name(\"valid\")\n if (it.props !== true && !(it.props instanceof Name)) {\n it.props = evaluatedPropsToName(gen, it.props)\n }\n const {props} = it\n validatePatternProperties()\n\n function validatePatternProperties(): void {\n for (const pat of patterns) {\n if (checkProperties) checkMatchingProperties(pat)\n if (it.allErrors) {\n validateProperties(pat)\n } else {\n gen.var(valid, true) // TODO var\n validateProperties(pat)\n gen.if(valid)\n }\n }\n }\n\n function checkMatchingProperties(pat: string): void {\n for (const prop in checkProperties) {\n if (new RegExp(pat).test(prop)) {\n checkStrictMode(\n it,\n `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`\n )\n }\n }\n }\n\n function validateProperties(pat: string): void {\n gen.forIn(\"key\", data, (key) => {\n gen.if(_`${usePattern(cxt, pat)}.test(${key})`, () => {\n const alwaysValid = alwaysValidPatterns.includes(pat)\n if (!alwaysValid) {\n cxt.subschema(\n {\n keyword: \"patternProperties\",\n schemaProp: pat,\n dataProp: key,\n dataPropType: Type.Str,\n },\n valid\n )\n }\n\n if (it.opts.unevaluated && props !== true) {\n gen.assign(_`${props}[${key}]`, true)\n } else if (!alwaysValid && !it.allErrors) {\n // can short-circuit if `unevaluatedProperties` is not supported (opts.next === false)\n // or if all properties were evaluated (props === true)\n gen.if(not(valid), () => gen.break())\n }\n })\n })\n }\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, ErrorNoParams, AnySchema} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {alwaysValidSchema} from \"../../compile/util\"\n\nexport type NotKeywordError = ErrorNoParams<\"not\", AnySchema>\n\nconst def: CodeKeywordDefinition = {\n keyword: \"not\",\n schemaType: [\"object\", \"boolean\"],\n trackErrors: true,\n code(cxt: KeywordCxt) {\n const {gen, schema, it} = cxt\n if (alwaysValidSchema(it, schema)) {\n cxt.fail()\n return\n }\n\n const valid = gen.name(\"valid\")\n cxt.subschema(\n {\n keyword: \"not\",\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n },\n valid\n )\n\n cxt.failResult(\n valid,\n () => cxt.reset(),\n () => cxt.error()\n )\n },\n error: {message: \"must NOT be valid\"},\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, ErrorNoParams, AnySchema} from \"../../types\"\nimport {validateUnion} from \"../code\"\n\nexport type AnyOfError = ErrorNoParams<\"anyOf\", AnySchema[]>\n\nconst def: CodeKeywordDefinition = {\n keyword: \"anyOf\",\n schemaType: \"array\",\n trackErrors: true,\n code: validateUnion,\n error: {message: \"must match a schema in anyOf\"},\n}\n\nexport default def\n", "import type {\n CodeKeywordDefinition,\n ErrorObject,\n KeywordErrorDefinition,\n AnySchema,\n} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, Name} from \"../../compile/codegen\"\nimport {alwaysValidSchema} from \"../../compile/util\"\nimport {SchemaCxt} from \"../../compile\"\n\nexport type OneOfError = ErrorObject<\n \"oneOf\",\n {passingSchemas: [number, number] | null},\n AnySchema[]\n>\n\nconst error: KeywordErrorDefinition = {\n message: \"must match exactly one schema in oneOf\",\n params: ({params}) => _`{passingSchemas: ${params.passing}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"oneOf\",\n schemaType: \"array\",\n trackErrors: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, schema, parentSchema, it} = cxt\n /* istanbul ignore if */\n if (!Array.isArray(schema)) throw new Error(\"ajv implementation error\")\n if (it.opts.discriminator && parentSchema.discriminator) return\n const schArr: AnySchema[] = schema\n const valid = gen.let(\"valid\", false)\n const passing = gen.let(\"passing\", null)\n const schValid = gen.name(\"_valid\")\n cxt.setParams({passing})\n // TODO possibly fail straight away (with warning or exception) if there are two empty always valid schemas\n\n gen.block(validateOneOf)\n\n cxt.result(\n valid,\n () => cxt.reset(),\n () => cxt.error(true)\n )\n\n function validateOneOf(): void {\n schArr.forEach((sch: AnySchema, i: number) => {\n let schCxt: SchemaCxt | undefined\n if (alwaysValidSchema(it, sch)) {\n gen.var(schValid, true)\n } else {\n schCxt = cxt.subschema(\n {\n keyword: \"oneOf\",\n schemaProp: i,\n compositeRule: true,\n },\n schValid\n )\n }\n\n if (i > 0) {\n gen\n .if(_`${schValid} && ${valid}`)\n .assign(valid, false)\n .assign(passing, _`[${passing}, ${i}]`)\n .else()\n }\n\n gen.if(schValid, () => {\n gen.assign(valid, true)\n gen.assign(passing, i)\n if (schCxt) cxt.mergeEvaluated(schCxt, Name)\n })\n })\n }\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, AnySchema} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {alwaysValidSchema} from \"../../compile/util\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"allOf\",\n schemaType: \"array\",\n code(cxt: KeywordCxt) {\n const {gen, schema, it} = cxt\n /* istanbul ignore if */\n if (!Array.isArray(schema)) throw new Error(\"ajv implementation error\")\n const valid = gen.name(\"valid\")\n schema.forEach((sch: AnySchema, i: number) => {\n if (alwaysValidSchema(it, sch)) return\n const schCxt = cxt.subschema({keyword: \"allOf\", schemaProp: i}, valid, true)\n cxt.ok(valid)\n cxt.mergeEvaluated(schCxt)\n })\n },\n}\n\nexport default def\n", "import type {\n CodeKeywordDefinition,\n ErrorObject,\n KeywordErrorDefinition,\n AnySchema,\n} from \"../../types\"\nimport type {SchemaObjCxt} from \"../../compile\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, not, Name} from \"../../compile/codegen\"\nimport {alwaysValidSchema, checkStrictMode} from \"../../compile/util\"\n\nexport type IfKeywordError = ErrorObject<\"if\", {failingKeyword: string}, AnySchema>\n\nconst error: KeywordErrorDefinition = {\n message: ({params}) => str`must match \"${params.ifClause}\" schema`,\n params: ({params}) => _`{failingKeyword: ${params.ifClause}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"if\",\n schemaType: [\"object\", \"boolean\"],\n trackErrors: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, parentSchema, it} = cxt\n if (parentSchema.then === undefined && parentSchema.else === undefined) {\n checkStrictMode(it, '\"if\" without \"then\" and \"else\" is ignored')\n }\n const hasThen = hasSchema(it, \"then\")\n const hasElse = hasSchema(it, \"else\")\n if (!hasThen && !hasElse) return\n\n const valid = gen.let(\"valid\", true)\n const schValid = gen.name(\"_valid\")\n validateIf()\n cxt.reset()\n\n if (hasThen && hasElse) {\n const ifClause = gen.let(\"ifClause\")\n cxt.setParams({ifClause})\n gen.if(schValid, validateClause(\"then\", ifClause), validateClause(\"else\", ifClause))\n } else if (hasThen) {\n gen.if(schValid, validateClause(\"then\"))\n } else {\n gen.if(not(schValid), validateClause(\"else\"))\n }\n\n cxt.pass(valid, () => cxt.error(true))\n\n function validateIf(): void {\n const schCxt = cxt.subschema(\n {\n keyword: \"if\",\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n },\n schValid\n )\n cxt.mergeEvaluated(schCxt)\n }\n\n function validateClause(keyword: string, ifClause?: Name): () => void {\n return () => {\n const schCxt = cxt.subschema({keyword}, schValid)\n gen.assign(valid, schValid)\n cxt.mergeValidEvaluated(schCxt, valid)\n if (ifClause) gen.assign(ifClause, _`${keyword}`)\n else cxt.setParams({ifClause: keyword})\n }\n }\n },\n}\n\nfunction hasSchema(it: SchemaObjCxt, keyword: string): boolean {\n const schema = it.schema[keyword]\n return schema !== undefined && !alwaysValidSchema(it, schema)\n}\n\nexport default def\n", "import type {CodeKeywordDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {checkStrictMode} from \"../../compile/util\"\n\nconst def: CodeKeywordDefinition = {\n keyword: [\"then\", \"else\"],\n schemaType: [\"object\", \"boolean\"],\n code({keyword, parentSchema, it}: KeywordCxt) {\n if (parentSchema.if === undefined) checkStrictMode(it, `\"${keyword}\" without \"if\" is ignored`)\n },\n}\n\nexport default def\n", "import type {ErrorNoParams, Vocabulary} from \"../../types\"\nimport additionalItems, {AdditionalItemsError} from \"./additionalItems\"\nimport prefixItems from \"./prefixItems\"\nimport items from \"./items\"\nimport items2020, {ItemsError} from \"./items2020\"\nimport contains, {ContainsError} from \"./contains\"\nimport dependencies, {DependenciesError} from \"./dependencies\"\nimport propertyNames, {PropertyNamesError} from \"./propertyNames\"\nimport additionalProperties, {AdditionalPropertiesError} from \"./additionalProperties\"\nimport properties from \"./properties\"\nimport patternProperties from \"./patternProperties\"\nimport notKeyword, {NotKeywordError} from \"./not\"\nimport anyOf, {AnyOfError} from \"./anyOf\"\nimport oneOf, {OneOfError} from \"./oneOf\"\nimport allOf from \"./allOf\"\nimport ifKeyword, {IfKeywordError} from \"./if\"\nimport thenElse from \"./thenElse\"\n\nexport default function getApplicator(draft2020 = false): Vocabulary {\n const applicator = [\n // any\n notKeyword,\n anyOf,\n oneOf,\n allOf,\n ifKeyword,\n thenElse,\n // object\n propertyNames,\n additionalProperties,\n dependencies,\n properties,\n patternProperties,\n ]\n // array\n if (draft2020) applicator.push(prefixItems, items2020)\n else applicator.push(additionalItems, items)\n applicator.push(contains)\n return applicator\n}\n\nexport type ApplicatorKeywordError =\n | ErrorNoParams<\"false schema\">\n | AdditionalItemsError\n | ItemsError\n | ContainsError\n | AdditionalPropertiesError\n | DependenciesError\n | IfKeywordError\n | AnyOfError\n | OneOfError\n | NotKeywordError\n | PropertyNamesError\n", "import type {CodeKeywordDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, getProperty, Code} from \"../../compile/codegen\"\nimport N from \"../../compile/names\"\nimport {SchemaEnv, compileSchema} from \"../../compile\"\nimport {getValidate} from \"../core/ref\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"$dynamicAnchor\",\n schemaType: \"string\",\n code: (cxt) => dynamicAnchor(cxt, cxt.schema),\n}\n\nexport function dynamicAnchor(cxt: KeywordCxt, anchor: string): void {\n const {gen, it} = cxt\n it.schemaEnv.root.dynamicAnchors[anchor] = true\n const v = _`${N.dynamicAnchors}${getProperty(anchor)}`\n const validate = it.errSchemaPath === \"#\" ? it.validateName : _getValidate(cxt)\n gen.if(_`!${v}`, () => gen.assign(v, validate))\n}\n\nfunction _getValidate(cxt: KeywordCxt): Code {\n const {schemaEnv, schema, self} = cxt.it\n const {root, baseId, localRefs, meta} = schemaEnv.root\n const {schemaId} = self.opts\n const sch = new SchemaEnv({schema, schemaId, root, baseId, localRefs, meta})\n compileSchema.call(self, sch)\n return getValidate(cxt, sch)\n}\n\nexport default def\n", "import type {CodeKeywordDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, getProperty, Code, Name} from \"../../compile/codegen\"\nimport N from \"../../compile/names\"\nimport {callRef} from \"../core/ref\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"$dynamicRef\",\n schemaType: \"string\",\n code: (cxt) => dynamicRef(cxt, cxt.schema),\n}\n\nexport function dynamicRef(cxt: KeywordCxt, ref: string): void {\n const {gen, keyword, it} = cxt\n if (ref[0] !== \"#\") throw new Error(`\"${keyword}\" only supports hash fragment reference`)\n const anchor = ref.slice(1)\n if (it.allErrors) {\n _dynamicRef()\n } else {\n const valid = gen.let(\"valid\", false)\n _dynamicRef(valid)\n cxt.ok(valid)\n }\n\n function _dynamicRef(valid?: Name): void {\n // TODO the assumption here is that `recursiveRef: #` always points to the root\n // of the schema object, which is not correct, because there may be $id that\n // makes # point to it, and the target schema may not contain dynamic/recursiveAnchor.\n // Because of that 2 tests in recursiveRef.json fail.\n // This is a similar problem to #815 (`$id` doesn't alter resolution scope for `{ \"$ref\": \"#\" }`).\n // (This problem is not tested in JSON-Schema-Test-Suite)\n if (it.schemaEnv.root.dynamicAnchors[anchor]) {\n const v = gen.let(\"_v\", _`${N.dynamicAnchors}${getProperty(anchor)}`)\n gen.if(v, _callRef(v, valid), _callRef(it.validateName, valid))\n } else {\n _callRef(it.validateName, valid)()\n }\n }\n\n function _callRef(validate: Code, valid?: Name): () => void {\n return valid\n ? () =>\n gen.block(() => {\n callRef(cxt, validate)\n gen.let(valid, true)\n })\n : () => callRef(cxt, validate)\n }\n}\n\nexport default def\n", "import type {CodeKeywordDefinition} from \"../../types\"\nimport {dynamicAnchor} from \"./dynamicAnchor\"\nimport {checkStrictMode} from \"../../compile/util\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"$recursiveAnchor\",\n schemaType: \"boolean\",\n code(cxt) {\n if (cxt.schema) dynamicAnchor(cxt, \"\")\n else checkStrictMode(cxt.it, \"$recursiveAnchor: false is ignored\")\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition} from \"../../types\"\nimport {dynamicRef} from \"./dynamicRef\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"$recursiveRef\",\n schemaType: \"string\",\n code: (cxt) => dynamicRef(cxt, cxt.schema),\n}\n\nexport default def\n", "import type {Vocabulary} from \"../../types\"\nimport dynamicAnchor from \"./dynamicAnchor\"\nimport dynamicRef from \"./dynamicRef\"\nimport recursiveAnchor from \"./recursiveAnchor\"\nimport recursiveRef from \"./recursiveRef\"\n\nconst dynamic: Vocabulary = [dynamicAnchor, dynamicRef, recursiveAnchor, recursiveRef]\n\nexport default dynamic\n", "import type {CodeKeywordDefinition, ErrorObject} from \"../../types\"\nimport {\n validatePropertyDeps,\n error,\n DependenciesErrorParams,\n PropertyDependencies,\n} from \"../applicator/dependencies\"\n\nexport type DependentRequiredError = ErrorObject<\n \"dependentRequired\",\n DependenciesErrorParams,\n PropertyDependencies\n>\n\nconst def: CodeKeywordDefinition = {\n keyword: \"dependentRequired\",\n type: \"object\",\n schemaType: \"object\",\n error,\n code: (cxt) => validatePropertyDeps(cxt),\n}\n\nexport default def\n", "import type {CodeKeywordDefinition} from \"../../types\"\nimport {validateSchemaDeps} from \"./dependencies\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"dependentSchemas\",\n type: \"object\",\n schemaType: \"object\",\n code: (cxt) => validateSchemaDeps(cxt),\n}\n\nexport default def\n", "import type {CodeKeywordDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {checkStrictMode} from \"../../compile/util\"\n\nconst def: CodeKeywordDefinition = {\n keyword: [\"maxContains\", \"minContains\"],\n type: \"array\",\n schemaType: \"number\",\n code({keyword, parentSchema, it}: KeywordCxt) {\n if (parentSchema.contains === undefined) {\n checkStrictMode(it, `\"${keyword}\" without \"contains\" is ignored`)\n }\n },\n}\n\nexport default def\n", "import type {Vocabulary} from \"../types\"\nimport dependentRequired from \"./validation/dependentRequired\"\nimport dependentSchemas from \"./applicator/dependentSchemas\"\nimport limitContains from \"./validation/limitContains\"\n\nconst next: Vocabulary = [dependentRequired, dependentSchemas, limitContains]\n\nexport default next\n", "import type {\n CodeKeywordDefinition,\n KeywordErrorDefinition,\n ErrorObject,\n AnySchema,\n} from \"../../types\"\nimport {_, not, and, Name, Code} from \"../../compile/codegen\"\nimport {alwaysValidSchema, Type} from \"../../compile/util\"\nimport N from \"../../compile/names\"\n\nexport type UnevaluatedPropertiesError = ErrorObject<\n \"unevaluatedProperties\",\n {unevaluatedProperty: string},\n AnySchema\n>\n\nconst error: KeywordErrorDefinition = {\n message: \"must NOT have unevaluated properties\",\n params: ({params}) => _`{unevaluatedProperty: ${params.unevaluatedProperty}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"unevaluatedProperties\",\n type: \"object\",\n schemaType: [\"boolean\", \"object\"],\n allowUndefined: true,\n trackErrors: true,\n error,\n code(cxt) {\n const {gen, schema = cxt.it.opts.defaultUnevaluatedProperties, data, errsCount, it} = cxt\n const isForced = cxt.schema === undefined && cxt.it.opts.defaultUnevaluatedProperties === false\n /* istanbul ignore if */\n if (!errsCount) throw new Error(\"ajv implementation error\")\n const {allErrors, props} = it\n if (props instanceof Name) {\n gen.if(_`${props} !== true`, () =>\n gen.forIn(\"key\", data, (key: Name) =>\n gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))\n )\n )\n } else if (props !== true) {\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const staticCheck = () =>\n gen.forIn(\"key\", data, (key: Name) =>\n props === undefined\n ? unevaluatedPropCode(key)\n : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key))\n )\n\n if (isForced && it.errorPath.emptyStr() && !it.compositeRule) {\n // $refs are compiled into functions\n // We need to check in runtime if function was called from allOf.\n // We need to check only on the top level of the function:\n // it is ensured with `it.errorPath.emptyStr()` check\n gen.if(_`${N.isAllOfVariant} === 0`, staticCheck)\n } else {\n if (!it.compositeRule || cxt.schema !== undefined) {\n staticCheck()\n }\n }\n }\n\n if (!isForced) {\n // disable shot-circut for forced unevaluatedProperties=false\n // we may run or not the check in runtime so we can't short-circuit in compile-time\n it.props = true\n }\n\n cxt.ok(_`${errsCount} === ${N.errors}`)\n\n function unevaluatedPropCode(key: Name): void {\n if (schema === false) {\n cxt.setParams({unevaluatedProperty: key})\n cxt.error()\n if (!allErrors) gen.break()\n return\n }\n\n if (!alwaysValidSchema(it, schema)) {\n const valid = gen.name(\"valid\")\n cxt.subschema(\n {\n keyword: \"unevaluatedProperties\",\n dataProp: key,\n dataPropType: Type.Str,\n },\n valid\n )\n if (!allErrors) gen.if(not(valid), () => gen.break())\n }\n }\n\n function unevaluatedDynamic(evaluatedProps: Name, key: Name): Code {\n return _`!${evaluatedProps} || !${evaluatedProps}[${key}]`\n }\n\n function unevaluatedStatic(evaluatedProps: {[K in string]?: true}, key: Name): Code {\n const ps: Code[] = []\n for (const p in evaluatedProps) {\n if (evaluatedProps[p] === true) ps.push(_`${key} !== ${p}`)\n }\n return and(...ps)\n }\n },\n}\n\nexport default def\n", "import type {\n CodeKeywordDefinition,\n ErrorObject,\n KeywordErrorDefinition,\n AnySchema,\n} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, not, Name} from \"../../compile/codegen\"\nimport {alwaysValidSchema, Type} from \"../../compile/util\"\n\nexport type UnevaluatedItemsError = ErrorObject<\"unevaluatedItems\", {limit: number}, AnySchema>\n\nconst error: KeywordErrorDefinition = {\n message: ({params: {len}}) => str`must NOT have more than ${len} items`,\n params: ({params: {len}}) => _`{limit: ${len}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"unevaluatedItems\",\n type: \"array\",\n schemaType: [\"boolean\", \"object\"],\n error,\n code(cxt: KeywordCxt) {\n const {gen, schema, data, it} = cxt\n const items = it.items || 0\n if (items === true) return\n const len = gen.const(\"len\", _`${data}.length`)\n if (schema === false) {\n cxt.setParams({len: items})\n cxt.fail(_`${len} > ${items}`)\n } else if (typeof schema == \"object\" && !alwaysValidSchema(it, schema)) {\n const valid = gen.var(\"valid\", _`${len} <= ${items}`)\n gen.if(not(valid), () => validateItems(valid, items))\n cxt.ok(valid)\n }\n it.items = true\n\n function validateItems(valid: Name, from: Name | number): void {\n gen.forRange(\"i\", from, len, (i) => {\n cxt.subschema({keyword: \"unevaluatedItems\", dataProp: i, dataPropType: Type.Num}, valid)\n if (!it.allErrors) gen.if(not(valid), () => gen.break())\n })\n }\n },\n}\n\nexport default def\n", "import type {Vocabulary} from \"../../types\"\nimport unevaluatedProperties from \"./unevaluatedProperties\"\nimport unevaluatedItems from \"./unevaluatedItems\"\n\nconst unevaluated: Vocabulary = [unevaluatedProperties, unevaluatedItems]\n\nexport default unevaluated\n", "import type {\n AddedFormat,\n FormatValidator,\n AsyncFormatValidator,\n CodeKeywordDefinition,\n KeywordErrorDefinition,\n ErrorObject,\n} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, nil, or, Code, getProperty, regexpCode} from \"../../compile/codegen\"\n\ntype FormatValidate =\n | FormatValidator\n | FormatValidator\n | AsyncFormatValidator\n | AsyncFormatValidator\n | RegExp\n | string\n | true\n\nexport type FormatError = ErrorObject<\"format\", {format: string}, string | {$data: string}>\n\nconst error: KeywordErrorDefinition = {\n message: ({schemaCode}) => str`must match format \"${schemaCode}\"`,\n params: ({schemaCode}) => _`{format: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"format\",\n type: [\"number\", \"string\"],\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt: KeywordCxt, ruleType?: string) {\n const {gen, data, $data, schema, schemaCode, it} = cxt\n const {opts, errSchemaPath, schemaEnv, self} = it\n if (!opts.validateFormats) return\n\n if ($data) validate$DataFormat()\n else validateFormat()\n\n function validate$DataFormat(): void {\n const fmts = gen.scopeValue(\"formats\", {\n ref: self.formats,\n code: opts.code.formats,\n })\n const fDef = gen.const(\"fDef\", _`${fmts}[${schemaCode}]`)\n const fType = gen.let(\"fType\")\n const format = gen.let(\"format\")\n // TODO simplify\n gen.if(\n _`typeof ${fDef} == \"object\" && !(${fDef} instanceof RegExp)`,\n () => gen.assign(fType, _`${fDef}.type || \"string\"`).assign(format, _`${fDef}.validate`),\n () => gen.assign(fType, _`\"string\"`).assign(format, fDef)\n )\n cxt.fail$data(or(unknownFmt(), invalidFmt()))\n\n function unknownFmt(): Code {\n if (opts.strictSchema === false) return nil\n return _`${schemaCode} && !${format}`\n }\n\n function invalidFmt(): Code {\n const callFormat = schemaEnv.$async\n ? _`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))`\n : _`${format}(${data})`\n const validData = _`(typeof ${format} == \"function\" ? ${callFormat} : ${format}.test(${data}))`\n return _`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`\n }\n }\n\n function validateFormat(): void {\n const formatDef: AddedFormat | undefined = self.formats[schema]\n if (!formatDef) {\n unknownFormat()\n return\n }\n if (formatDef === true) return\n const [fmtType, format, fmtRef] = getFormat(formatDef)\n if (fmtType === ruleType) cxt.pass(validCondition())\n\n function unknownFormat(): void {\n if (opts.strictSchema === false) {\n self.logger.warn(unknownMsg())\n return\n }\n throw new Error(unknownMsg())\n\n function unknownMsg(): string {\n return `unknown format \"${schema as string}\" ignored in schema at path \"${errSchemaPath}\"`\n }\n }\n\n function getFormat(fmtDef: AddedFormat): [string, FormatValidate, Code] {\n const code =\n fmtDef instanceof RegExp\n ? regexpCode(fmtDef)\n : opts.code.formats\n ? _`${opts.code.formats}${getProperty(schema)}`\n : undefined\n const fmt = gen.scopeValue(\"formats\", {key: schema, ref: fmtDef, code})\n if (typeof fmtDef == \"object\" && !(fmtDef instanceof RegExp)) {\n return [fmtDef.type || \"string\", fmtDef.validate, _`${fmt}.validate`]\n }\n\n return [\"string\", fmtDef, fmt]\n }\n\n function validCondition(): Code {\n if (typeof formatDef == \"object\" && !(formatDef instanceof RegExp) && formatDef.async) {\n if (!schemaEnv.$async) throw new Error(\"async format in sync schema\")\n return _`await ${fmtRef}(${data})`\n }\n return typeof format == \"function\" ? _`${fmtRef}(${data})` : _`${fmtRef}.test(${data})`\n }\n }\n },\n}\n\nexport default def\n", "import type {Vocabulary} from \"../../types\"\nimport formatKeyword from \"./format\"\n\nconst format: Vocabulary = [formatKeyword]\n\nexport default format\n", "import type {Vocabulary} from \"../types\"\n\nexport const metadataVocabulary: Vocabulary = [\n \"title\",\n \"description\",\n \"default\",\n \"deprecated\",\n /**\n * readOnly/writeOnly are handled as validation keywords when OAS context is provided.\n * Keeping them here would register them as annotation-only metadata and would\n * prevent the context-aware validation behavior.\n *\n * @see ./validation/readOnly.ts\n * @see ./validation/writeOnly.ts\n */\n // \"readOnly\",\n // \"writeOnly\",\n \"examples\",\n]\n\nexport const contentVocabulary: Vocabulary = [\n \"contentMediaType\",\n \"contentEncoding\",\n \"contentSchema\",\n]\n", "import type {Vocabulary} from \"../types\"\nimport coreVocabulary from \"./core\"\nimport validationVocabulary from \"./validation\"\nimport getApplicatorVocabulary from \"./applicator\"\nimport dynamicVocabulary from \"./dynamic\"\nimport nextVocabulary from \"./next\"\nimport unevaluatedVocabulary from \"./unevaluated\"\nimport formatVocabulary from \"./format\"\nimport {metadataVocabulary, contentVocabulary} from \"./metadata\"\n\nconst draft2020Vocabularies: Vocabulary[] = [\n dynamicVocabulary,\n coreVocabulary,\n validationVocabulary,\n getApplicatorVocabulary(true),\n formatVocabulary,\n metadataVocabulary,\n contentVocabulary,\n nextVocabulary,\n unevaluatedVocabulary,\n]\n\nexport default draft2020Vocabularies\n", "import type {ErrorObject} from \"../../types\"\n\nexport enum DiscrError {\n Tag = \"tag\",\n Mapping = \"mapping\",\n}\n\nexport type DiscrErrorObj = ErrorObject<\n \"discriminator\",\n {error: E; tag: string; tagValue: unknown},\n string\n>\n", "import type {CodeKeywordDefinition, AnySchemaObject, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, getProperty, Name} from \"../../compile/codegen\"\nimport {DiscrError, DiscrErrorObj} from \"../discriminator/types\"\nimport {resolveRef, SchemaEnv} from \"../../compile\"\nimport MissingRefError from \"../../compile/ref_error\"\nimport {schemaHasRulesButRef} from \"../../compile/util\"\n\nexport type DiscriminatorError = DiscrErrorObj | DiscrErrorObj\n\nconst error: KeywordErrorDefinition = {\n message: ({params: {discrError, tagName}}) =>\n discrError === DiscrError.Tag\n ? `tag \"${tagName}\" must be string`\n : `value of tag \"${tagName}\" must be in oneOf or anyOf`,\n params: ({params: {discrError, tag, tagName}}) =>\n _`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`,\n}\n\nfunction getDiscriminatorPropertyFromAllOf(\n sch: AnySchemaObject,\n tagName: string\n): AnySchemaObject | undefined {\n if (!sch.allOf || !Array.isArray(sch.allOf)) {\n return undefined\n }\n\n for (const subschema of sch.allOf) {\n if (subschema?.properties?.[tagName]) {\n return subschema.properties[tagName] as AnySchemaObject\n }\n }\n\n return undefined\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"discriminator\",\n type: \"object\",\n schemaType: \"object\",\n error,\n code(cxt: KeywordCxt) {\n const {gen, data, schema, parentSchema, it} = cxt\n\n const keyword = parentSchema.oneOf ? \"oneOf\" : parentSchema.anyOf ? \"anyOf\" : undefined\n\n if (!it.opts.discriminator) {\n throw new Error(\"discriminator: requires discriminator option\")\n }\n const tagName = schema.propertyName\n if (typeof tagName != \"string\") throw new Error(\"discriminator: requires propertyName\")\n if (!keyword) throw new Error(\"discriminator: requires oneOf or anyOf composite keyword\")\n const parentSchemaVariants = parentSchema[keyword]\n const valid = gen.let(\"valid\", false)\n const tag = gen.const(\"tag\", _`${data}${getProperty(tagName)}`)\n gen.if(\n _`typeof ${tag} == \"string\"`,\n () => validateMapping(),\n () => cxt.error(false, {discrError: DiscrError.Tag, tag, tagName})\n )\n cxt.ok(valid)\n\n function validateMapping(): void {\n const mapping = getMapping()\n gen.if(false)\n for (const tagValue in mapping) {\n gen.elseIf(_`${tag} === ${tagValue}`)\n gen.assign(valid, applyTagSchema(mapping[tagValue]))\n }\n gen.else()\n cxt.error(false, {discrError: DiscrError.Mapping, tag, tagName})\n gen.endIf()\n }\n\n function applyTagSchema(schemaProp?: number): Name {\n const _valid = gen.name(\"valid\")\n const schCxt = cxt.subschema({keyword, schemaProp}, _valid)\n cxt.mergeEvaluated(schCxt, Name)\n return _valid\n }\n\n function getMapping(): {[T in string]?: number} {\n const discriminatorMapping: {[T in string]?: number} = {}\n const topRequired = hasRequired(parentSchema)\n let tagRequired = true\n for (let i = 0; i < parentSchemaVariants.length; i++) {\n let sch = parentSchemaVariants[i]\n const schRef = sch?.$ref\n\n if (schRef && schema.mapping) {\n const {mapping} = schema\n const matchedKeys = Object.keys(mapping).filter((key) => mapping[key] === sch.$ref)\n\n if (matchedKeys.length) {\n for (const key of matchedKeys) {\n addMapping(key, i)\n }\n continue\n }\n }\n\n if (schRef && !schemaHasRulesButRef(sch, it.self.RULES)) {\n sch = resolveRef.call(it.self, it.schemaEnv.root, it.baseId, schRef)\n if (sch instanceof SchemaEnv) sch = sch.schema\n if (sch === undefined) throw new MissingRefError(it.opts.uriResolver, it.baseId, schRef)\n }\n\n let propSch = sch?.properties?.[tagName]\n if (!propSch && sch?.allOf) {\n propSch = getDiscriminatorPropertyFromAllOf(sch, tagName)\n }\n\n if (typeof propSch != \"object\") {\n throw new Error(\n `discriminator: ${keyword} subschemas (or referenced schemas) must have \"properties/${tagName}\" or match mapping`\n )\n }\n tagRequired = tagRequired && (topRequired || hasRequired(sch))\n addMappings(propSch, i)\n }\n if (!tagRequired) throw new Error(`discriminator: \"${tagName}\" must be required`)\n return discriminatorMapping\n\n function hasRequired(sch: AnySchemaObject): boolean {\n if (Array.isArray(sch.required) && sch.required.includes(tagName)) {\n return true\n }\n\n if (sch.allOf && Array.isArray(sch.allOf)) {\n for (const subschema of sch.allOf) {\n const subSch = subschema as AnySchemaObject\n if (Array.isArray(subSch.required) && subSch.required.includes(tagName)) {\n return true\n }\n }\n }\n\n return false\n }\n\n function addMappings(sch: AnySchemaObject, i: number): void {\n if (sch.const) {\n addMapping(sch.const, i)\n } else if (sch.enum) {\n for (const tagValue of sch.enum) {\n addMapping(tagValue, i)\n }\n } else {\n throw new Error(`discriminator: \"properties/${tagName}\" must have \"const\" or \"enum\"`)\n }\n }\n\n function addMapping(tagValue: unknown, i: number): void {\n if (typeof tagValue != \"string\" || tagValue in discriminatorMapping) {\n throw new Error(`discriminator: \"${tagName}\" values must be unique strings`)\n }\n discriminatorMapping[tagValue] = i\n }\n }\n },\n}\n\nexport default def\n", "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$vocabulary\": {\n \"https://json-schema.org/draft/2020-12/vocab/core\": true,\n \"https://json-schema.org/draft/2020-12/vocab/applicator\": true,\n \"https://json-schema.org/draft/2020-12/vocab/unevaluated\": true,\n \"https://json-schema.org/draft/2020-12/vocab/validation\": true,\n \"https://json-schema.org/draft/2020-12/vocab/meta-data\": true,\n \"https://json-schema.org/draft/2020-12/vocab/format-annotation\": true,\n \"https://json-schema.org/draft/2020-12/vocab/content\": true\n },\n \"$dynamicAnchor\": \"meta\",\n\n \"title\": \"Core and Validation specifications meta-schema\",\n \"allOf\": [\n {\"$ref\": \"meta/core\"},\n {\"$ref\": \"meta/applicator\"},\n {\"$ref\": \"meta/unevaluated\"},\n {\"$ref\": \"meta/validation\"},\n {\"$ref\": \"meta/meta-data\"},\n {\"$ref\": \"meta/format-annotation\"},\n {\"$ref\": \"meta/content\"}\n ],\n \"type\": [\"object\", \"boolean\"],\n \"$comment\": \"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.\",\n \"properties\": {\n \"definitions\": {\n \"$comment\": \"\\\"definitions\\\" has been replaced by \\\"$defs\\\".\",\n \"type\": \"object\",\n \"additionalProperties\": {\"$dynamicRef\": \"#meta\"},\n \"deprecated\": true,\n \"default\": {}\n },\n \"dependencies\": {\n \"$comment\": \"\\\"dependencies\\\" has been split and replaced by \\\"dependentSchemas\\\" and \\\"dependentRequired\\\" in order to serve their differing semantics.\",\n \"type\": \"object\",\n \"additionalProperties\": {\n \"anyOf\": [{\"$dynamicRef\": \"#meta\"}, {\"$ref\": \"meta/validation#/$defs/stringArray\"}]\n },\n \"deprecated\": true,\n \"default\": {}\n },\n \"$recursiveAnchor\": {\n \"$comment\": \"\\\"$recursiveAnchor\\\" has been replaced by \\\"$dynamicAnchor\\\".\",\n \"$ref\": \"meta/core#/$defs/anchorString\",\n \"deprecated\": true\n },\n \"$recursiveRef\": {\n \"$comment\": \"\\\"$recursiveRef\\\" has been replaced by \\\"$dynamicRef\\\".\",\n \"$ref\": \"meta/core#/$defs/uriReferenceString\",\n \"deprecated\": true\n }\n }\n}\n", "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://json-schema.org/draft/2020-12/meta/applicator\",\n \"$vocabulary\": {\n \"https://json-schema.org/draft/2020-12/vocab/applicator\": true\n },\n \"$dynamicAnchor\": \"meta\",\n\n \"title\": \"Applicator vocabulary meta-schema\",\n \"type\": [\"object\", \"boolean\"],\n \"properties\": {\n \"prefixItems\": {\"$ref\": \"#/$defs/schemaArray\"},\n \"items\": {\"$dynamicRef\": \"#meta\"},\n \"contains\": {\"$dynamicRef\": \"#meta\"},\n \"additionalProperties\": {\"$dynamicRef\": \"#meta\"},\n \"properties\": {\n \"type\": \"object\",\n \"additionalProperties\": {\"$dynamicRef\": \"#meta\"},\n \"default\": {}\n },\n \"patternProperties\": {\n \"type\": \"object\",\n \"additionalProperties\": {\"$dynamicRef\": \"#meta\"},\n \"propertyNames\": {\"format\": \"regex\"},\n \"default\": {}\n },\n \"dependentSchemas\": {\n \"type\": \"object\",\n \"additionalProperties\": {\"$dynamicRef\": \"#meta\"},\n \"default\": {}\n },\n \"propertyNames\": {\"$dynamicRef\": \"#meta\"},\n \"if\": {\"$dynamicRef\": \"#meta\"},\n \"then\": {\"$dynamicRef\": \"#meta\"},\n \"else\": {\"$dynamicRef\": \"#meta\"},\n \"allOf\": {\"$ref\": \"#/$defs/schemaArray\"},\n \"anyOf\": {\"$ref\": \"#/$defs/schemaArray\"},\n \"oneOf\": {\"$ref\": \"#/$defs/schemaArray\"},\n \"not\": {\"$dynamicRef\": \"#meta\"}\n },\n \"$defs\": {\n \"schemaArray\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\"$dynamicRef\": \"#meta\"}\n }\n }\n}\n", "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://json-schema.org/draft/2020-12/meta/unevaluated\",\n \"$vocabulary\": {\n \"https://json-schema.org/draft/2020-12/vocab/unevaluated\": true\n },\n \"$dynamicAnchor\": \"meta\",\n\n \"title\": \"Unevaluated applicator vocabulary meta-schema\",\n \"type\": [\"object\", \"boolean\"],\n \"properties\": {\n \"unevaluatedItems\": {\"$dynamicRef\": \"#meta\"},\n \"unevaluatedProperties\": {\"$dynamicRef\": \"#meta\"}\n }\n}\n", "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://json-schema.org/draft/2020-12/meta/content\",\n \"$vocabulary\": {\n \"https://json-schema.org/draft/2020-12/vocab/content\": true\n },\n \"$dynamicAnchor\": \"meta\",\n\n \"title\": \"Content vocabulary meta-schema\",\n\n \"type\": [\"object\", \"boolean\"],\n \"properties\": {\n \"contentEncoding\": {\"type\": \"string\"},\n \"contentMediaType\": {\"type\": \"string\"},\n \"contentSchema\": {\"$dynamicRef\": \"#meta\"}\n }\n}\n", "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://json-schema.org/draft/2020-12/meta/core\",\n \"$vocabulary\": {\n \"https://json-schema.org/draft/2020-12/vocab/core\": true\n },\n \"$dynamicAnchor\": \"meta\",\n\n \"title\": \"Core vocabulary meta-schema\",\n \"type\": [\"object\", \"boolean\"],\n \"properties\": {\n \"$id\": {\n \"$ref\": \"#/$defs/uriReferenceString\",\n \"$comment\": \"Non-empty fragments not allowed.\",\n \"pattern\": \"^[^#]*#?$\"\n },\n \"$schema\": {\"$ref\": \"#/$defs/uriString\"},\n \"$ref\": {\"$ref\": \"#/$defs/uriReferenceString\"},\n \"$anchor\": {\"$ref\": \"#/$defs/anchorString\"},\n \"$dynamicRef\": {\"$ref\": \"#/$defs/uriReferenceString\"},\n \"$dynamicAnchor\": {\"$ref\": \"#/$defs/anchorString\"},\n \"$vocabulary\": {\n \"type\": \"object\",\n \"propertyNames\": {\"$ref\": \"#/$defs/uriString\"},\n \"additionalProperties\": {\n \"type\": \"boolean\"\n }\n },\n \"$comment\": {\n \"type\": \"string\"\n },\n \"$defs\": {\n \"type\": \"object\",\n \"additionalProperties\": {\"$dynamicRef\": \"#meta\"}\n }\n },\n \"$defs\": {\n \"anchorString\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z_][-A-Za-z0-9._]*$\"\n },\n \"uriString\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n },\n \"uriReferenceString\": {\n \"type\": \"string\",\n \"format\": \"uri-reference\"\n }\n }\n}\n", "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://json-schema.org/draft/2020-12/meta/format-annotation\",\n \"$vocabulary\": {\n \"https://json-schema.org/draft/2020-12/vocab/format-annotation\": true\n },\n \"$dynamicAnchor\": \"meta\",\n\n \"title\": \"Format vocabulary meta-schema for annotation results\",\n \"type\": [\"object\", \"boolean\"],\n \"properties\": {\n \"format\": {\"type\": \"string\"}\n }\n}\n", "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://json-schema.org/draft/2020-12/meta/meta-data\",\n \"$vocabulary\": {\n \"https://json-schema.org/draft/2020-12/vocab/meta-data\": true\n },\n \"$dynamicAnchor\": \"meta\",\n\n \"title\": \"Meta-data vocabulary meta-schema\",\n\n \"type\": [\"object\", \"boolean\"],\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"default\": true,\n \"deprecated\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"readOnly\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"writeOnly\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"examples\": {\n \"type\": \"array\",\n \"items\": true\n }\n }\n}\n", "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://json-schema.org/draft/2020-12/meta/validation\",\n \"$vocabulary\": {\n \"https://json-schema.org/draft/2020-12/vocab/validation\": true\n },\n \"$dynamicAnchor\": \"meta\",\n\n \"title\": \"Validation vocabulary meta-schema\",\n \"type\": [\"object\", \"boolean\"],\n \"properties\": {\n \"type\": {\n \"anyOf\": [\n {\"$ref\": \"#/$defs/simpleTypes\"},\n {\n \"type\": \"array\",\n \"items\": {\"$ref\": \"#/$defs/simpleTypes\"},\n \"minItems\": 1,\n \"uniqueItems\": true\n }\n ]\n },\n \"const\": true,\n \"enum\": {\n \"type\": \"array\",\n \"items\": true\n },\n \"multipleOf\": {\n \"type\": \"number\",\n \"exclusiveMinimum\": 0\n },\n \"maximum\": {\n \"type\": \"number\"\n },\n \"exclusiveMaximum\": {\n \"type\": \"number\"\n },\n \"minimum\": {\n \"type\": \"number\"\n },\n \"exclusiveMinimum\": {\n \"type\": \"number\"\n },\n \"maxLength\": {\"$ref\": \"#/$defs/nonNegativeInteger\"},\n \"minLength\": {\"$ref\": \"#/$defs/nonNegativeIntegerDefault0\"},\n \"pattern\": {\n \"type\": \"string\",\n \"format\": \"regex\"\n },\n \"maxItems\": {\"$ref\": \"#/$defs/nonNegativeInteger\"},\n \"minItems\": {\"$ref\": \"#/$defs/nonNegativeIntegerDefault0\"},\n \"uniqueItems\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"maxContains\": {\"$ref\": \"#/$defs/nonNegativeInteger\"},\n \"minContains\": {\n \"$ref\": \"#/$defs/nonNegativeInteger\",\n \"default\": 1\n },\n \"maxProperties\": {\"$ref\": \"#/$defs/nonNegativeInteger\"},\n \"minProperties\": {\"$ref\": \"#/$defs/nonNegativeIntegerDefault0\"},\n \"required\": {\"$ref\": \"#/$defs/stringArray\"},\n \"dependentRequired\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"$ref\": \"#/$defs/stringArray\"\n }\n }\n },\n \"$defs\": {\n \"nonNegativeInteger\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"nonNegativeIntegerDefault0\": {\n \"$ref\": \"#/$defs/nonNegativeInteger\",\n \"default\": 0\n },\n \"simpleTypes\": {\n \"enum\": [\"array\", \"boolean\", \"integer\", \"null\", \"number\", \"object\", \"string\"]\n },\n \"stringArray\": {\n \"type\": \"array\",\n \"items\": {\"type\": \"string\"},\n \"uniqueItems\": true,\n \"default\": []\n }\n }\n}\n", "import type Ajv from \"../../core\"\nimport type {AnySchemaObject} from \"../../types\"\nimport * as metaSchema from \"./schema.json\"\nimport * as applicator from \"./meta/applicator.json\"\nimport * as unevaluated from \"./meta/unevaluated.json\"\nimport * as content from \"./meta/content.json\"\nimport * as core from \"./meta/core.json\"\nimport * as format from \"./meta/format-annotation.json\"\nimport * as metadata from \"./meta/meta-data.json\"\nimport * as validation from \"./meta/validation.json\"\n\nconst META_SUPPORT_DATA = [\"/properties\"]\n\nexport default function addMetaSchema2020(this: Ajv, $data?: boolean): Ajv {\n ;[\n metaSchema,\n applicator,\n unevaluated,\n content,\n core,\n with$data(this, format),\n metadata,\n with$data(this, validation),\n ].forEach((sch) => this.addMetaSchema(sch, undefined, false))\n return this\n\n function with$data(ajv: Ajv, sch: AnySchemaObject): AnySchemaObject {\n return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch\n }\n}\n", "import type {AnySchemaObject} from \"./types\"\nimport AjvCore, {Options} from \"./core\"\n\nimport draft2020Vocabularies from \"./vocabularies/draft2020\"\nimport discriminator from \"./vocabularies/discriminator\"\nimport addMetaSchema2020 from \"./refs/json-schema-2020-12\"\n\nconst META_SCHEMA_ID = \"https://json-schema.org/draft/2020-12/schema\"\n\nexport class Ajv2020 extends AjvCore {\n constructor(opts: Options = {}) {\n super({\n ...opts,\n dynamicRef: true,\n next: true,\n unevaluated: true,\n })\n }\n\n _addVocabularies(): void {\n super._addVocabularies()\n draft2020Vocabularies.forEach((v) => this.addVocabulary(v))\n if (this.opts.discriminator) this.addKeyword(discriminator)\n }\n\n _addDefaultMetaSchema(): void {\n super._addDefaultMetaSchema()\n const {$data, meta} = this.opts\n if (!meta) return\n addMetaSchema2020.call(this, $data)\n this.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID\n }\n\n defaultMeta(): string | AnySchemaObject | undefined {\n return (this.opts.defaultMeta =\n super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined))\n }\n}\n\nmodule.exports = exports = Ajv2020\nmodule.exports.Ajv2020 = Ajv2020\nObject.defineProperty(exports, \"__esModule\", {value: true})\n\nexport default Ajv2020\n\nexport {\n Format,\n FormatDefinition,\n AsyncFormatDefinition,\n KeywordDefinition,\n KeywordErrorDefinition,\n CodeKeywordDefinition,\n MacroKeywordDefinition,\n FuncKeywordDefinition,\n Vocabulary,\n Schema,\n SchemaObject,\n AnySchemaObject,\n AsyncSchema,\n AnySchema,\n ValidateFunction,\n AsyncValidateFunction,\n ErrorObject,\n ErrorNoParams,\n Context,\n} from \"./types\"\n\nexport {Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions} from \"./core\"\nexport {SchemaCxt, SchemaObjCxt} from \"./compile\"\nexport {KeywordCxt} from \"./compile/validate\"\nexport {DefinedError} from \"./vocabularies/errors\"\nexport {JSONType} from \"./compile/rules\"\nexport {JSONSchemaType} from \"./types/json-schema\"\nexport {_, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions} from \"./compile/codegen\"\nexport {default as ValidationError} from \"./runtime/validation_error\"\nexport {default as MissingRefError} from \"./compile/ref_error\"\n", null, null, null, null, null, null, "\n/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);\n}\n\n\nvar isNothing_1 = isNothing;\nvar isObject_1 = isObject;\nvar toArray_1 = toArray;\nvar repeat_1 = repeat;\nvar isNegativeZero_1 = isNegativeZero;\nvar extend_1 = extend;\n\nvar common = {\n\tisNothing: isNothing_1,\n\tisObject: isObject_1,\n\ttoArray: toArray_1,\n\trepeat: repeat_1,\n\tisNegativeZero: isNegativeZero_1,\n\textend: extend_1\n};\n\n// YAML error class. http://stackoverflow.com/questions/8458984\n\n\nfunction formatError(exception, compact) {\n var where = '', message = exception.reason || '(unknown reason)';\n\n if (!exception.mark) return message;\n\n if (exception.mark.name) {\n where += 'in \"' + exception.mark.name + '\" ';\n }\n\n where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')';\n\n if (!compact && exception.mark.snippet) {\n where += '\\n\\n' + exception.mark.snippet;\n }\n\n return message + ' ' + where;\n}\n\n\nfunction YAMLException$1(reason, mark) {\n // Super constructor\n Error.call(this);\n\n this.name = 'YAMLException';\n this.reason = reason;\n this.mark = mark;\n this.message = formatError(this, false);\n\n // Include stack trace in error object\n if (Error.captureStackTrace) {\n // Chrome and NodeJS\n Error.captureStackTrace(this, this.constructor);\n } else {\n // FF, IE 10+ and Safari 6+. Fallback for others\n this.stack = (new Error()).stack || '';\n }\n}\n\n\n// Inherit from Error\nYAMLException$1.prototype = Object.create(Error.prototype);\nYAMLException$1.prototype.constructor = YAMLException$1;\n\n\nYAMLException$1.prototype.toString = function toString(compact) {\n return this.name + ': ' + formatError(this, compact);\n};\n\n\nvar exception = YAMLException$1;\n\n// get snippet for a single line, respecting maxLength\nfunction getLine(buffer, lineStart, lineEnd, position, maxLineLength) {\n var head = '';\n var tail = '';\n var maxHalfLength = Math.floor(maxLineLength / 2) - 1;\n\n if (position - lineStart > maxHalfLength) {\n head = ' ... ';\n lineStart = position - maxHalfLength + head.length;\n }\n\n if (lineEnd - position > maxHalfLength) {\n tail = ' ...';\n lineEnd = position + maxHalfLength - tail.length;\n }\n\n return {\n str: head + buffer.slice(lineStart, lineEnd).replace(/\\t/g, '\u2192') + tail,\n pos: position - lineStart + head.length // relative position\n };\n}\n\n\nfunction padStart(string, max) {\n return common.repeat(' ', max - string.length) + string;\n}\n\n\nfunction makeSnippet(mark, options) {\n options = Object.create(options || null);\n\n if (!mark.buffer) return null;\n\n if (!options.maxLength) options.maxLength = 79;\n if (typeof options.indent !== 'number') options.indent = 1;\n if (typeof options.linesBefore !== 'number') options.linesBefore = 3;\n if (typeof options.linesAfter !== 'number') options.linesAfter = 2;\n\n var re = /\\r?\\n|\\r|\\0/g;\n var lineStarts = [ 0 ];\n var lineEnds = [];\n var match;\n var foundLineNo = -1;\n\n while ((match = re.exec(mark.buffer))) {\n lineEnds.push(match.index);\n lineStarts.push(match.index + match[0].length);\n\n if (mark.position <= match.index && foundLineNo < 0) {\n foundLineNo = lineStarts.length - 2;\n }\n }\n\n if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;\n\n var result = '', i, line;\n var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;\n var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);\n\n for (i = 1; i <= options.linesBefore; i++) {\n if (foundLineNo - i < 0) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo - i],\n lineEnds[foundLineNo - i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),\n maxLineLength\n );\n result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n' + result;\n }\n\n line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);\n result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\\n';\n\n for (i = 1; i <= options.linesAfter; i++) {\n if (foundLineNo + i >= lineEnds.length) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo + i],\n lineEnds[foundLineNo + i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),\n maxLineLength\n );\n result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n }\n\n return result.replace(/\\n$/, '');\n}\n\n\nvar snippet = makeSnippet;\n\nvar TYPE_CONSTRUCTOR_OPTIONS = [\n 'kind',\n 'multi',\n 'resolve',\n 'construct',\n 'instanceOf',\n 'predicate',\n 'represent',\n 'representName',\n 'defaultStyle',\n 'styleAliases'\n];\n\nvar YAML_NODE_KINDS = [\n 'scalar',\n 'sequence',\n 'mapping'\n];\n\nfunction compileStyleAliases(map) {\n var result = {};\n\n if (map !== null) {\n Object.keys(map).forEach(function (style) {\n map[style].forEach(function (alias) {\n result[String(alias)] = style;\n });\n });\n }\n\n return result;\n}\n\nfunction Type$1(tag, options) {\n options = options || {};\n\n Object.keys(options).forEach(function (name) {\n if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {\n throw new exception('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n }\n });\n\n // TODO: Add tag format check.\n this.options = options; // keep original options in case user wants to extend this type later\n this.tag = tag;\n this.kind = options['kind'] || null;\n this.resolve = options['resolve'] || function () { return true; };\n this.construct = options['construct'] || function (data) { return data; };\n this.instanceOf = options['instanceOf'] || null;\n this.predicate = options['predicate'] || null;\n this.represent = options['represent'] || null;\n this.representName = options['representName'] || null;\n this.defaultStyle = options['defaultStyle'] || null;\n this.multi = options['multi'] || false;\n this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\n\n if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {\n throw new exception('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n }\n}\n\nvar type = Type$1;\n\n/*eslint-disable max-len*/\n\n\n\n\n\nfunction compileList(schema, name) {\n var result = [];\n\n schema[name].forEach(function (currentType) {\n var newIndex = result.length;\n\n result.forEach(function (previousType, previousIndex) {\n if (previousType.tag === currentType.tag &&\n previousType.kind === currentType.kind &&\n previousType.multi === currentType.multi) {\n\n newIndex = previousIndex;\n }\n });\n\n result[newIndex] = currentType;\n });\n\n return result;\n}\n\n\nfunction compileMap(/* lists... */) {\n var result = {\n scalar: {},\n sequence: {},\n mapping: {},\n fallback: {},\n multi: {\n scalar: [],\n sequence: [],\n mapping: [],\n fallback: []\n }\n }, index, length;\n\n function collectType(type) {\n if (type.multi) {\n result.multi[type.kind].push(type);\n result.multi['fallback'].push(type);\n } else {\n result[type.kind][type.tag] = result['fallback'][type.tag] = type;\n }\n }\n\n for (index = 0, length = arguments.length; index < length; index += 1) {\n arguments[index].forEach(collectType);\n }\n return result;\n}\n\n\nfunction Schema$1(definition) {\n return this.extend(definition);\n}\n\n\nSchema$1.prototype.extend = function extend(definition) {\n var implicit = [];\n var explicit = [];\n\n if (definition instanceof type) {\n // Schema.extend(type)\n explicit.push(definition);\n\n } else if (Array.isArray(definition)) {\n // Schema.extend([ type1, type2, ... ])\n explicit = explicit.concat(definition);\n\n } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {\n // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })\n if (definition.implicit) implicit = implicit.concat(definition.implicit);\n if (definition.explicit) explicit = explicit.concat(definition.explicit);\n\n } else {\n throw new exception('Schema.extend argument should be a Type, [ Type ], ' +\n 'or a schema definition ({ implicit: [...], explicit: [...] })');\n }\n\n implicit.forEach(function (type$1) {\n if (!(type$1 instanceof type)) {\n throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n\n if (type$1.loadKind && type$1.loadKind !== 'scalar') {\n throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n }\n\n if (type$1.multi) {\n throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.');\n }\n });\n\n explicit.forEach(function (type$1) {\n if (!(type$1 instanceof type)) {\n throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n });\n\n var result = Object.create(Schema$1.prototype);\n\n result.implicit = (this.implicit || []).concat(implicit);\n result.explicit = (this.explicit || []).concat(explicit);\n\n result.compiledImplicit = compileList(result, 'implicit');\n result.compiledExplicit = compileList(result, 'explicit');\n result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);\n\n return result;\n};\n\n\nvar schema = Schema$1;\n\nvar str = new type('tag:yaml.org,2002:str', {\n kind: 'scalar',\n construct: function (data) { return data !== null ? data : ''; }\n});\n\nvar seq = new type('tag:yaml.org,2002:seq', {\n kind: 'sequence',\n construct: function (data) { return data !== null ? data : []; }\n});\n\nvar map = new type('tag:yaml.org,2002:map', {\n kind: 'mapping',\n construct: function (data) { return data !== null ? data : {}; }\n});\n\nvar failsafe = new schema({\n explicit: [\n str,\n seq,\n map\n ]\n});\n\nfunction resolveYamlNull(data) {\n if (data === null) return true;\n\n var max = data.length;\n\n return (max === 1 && data === '~') ||\n (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\n}\n\nfunction constructYamlNull() {\n return null;\n}\n\nfunction isNull(object) {\n return object === null;\n}\n\nvar _null = new type('tag:yaml.org,2002:null', {\n kind: 'scalar',\n resolve: resolveYamlNull,\n construct: constructYamlNull,\n predicate: isNull,\n represent: {\n canonical: function () { return '~'; },\n lowercase: function () { return 'null'; },\n uppercase: function () { return 'NULL'; },\n camelcase: function () { return 'Null'; },\n empty: function () { return ''; }\n },\n defaultStyle: 'lowercase'\n});\n\nfunction resolveYamlBoolean(data) {\n if (data === null) return false;\n\n var max = data.length;\n\n return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\n (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\n}\n\nfunction constructYamlBoolean(data) {\n return data === 'true' ||\n data === 'True' ||\n data === 'TRUE';\n}\n\nfunction isBoolean(object) {\n return Object.prototype.toString.call(object) === '[object Boolean]';\n}\n\nvar bool = new type('tag:yaml.org,2002:bool', {\n kind: 'scalar',\n resolve: resolveYamlBoolean,\n construct: constructYamlBoolean,\n predicate: isBoolean,\n represent: {\n lowercase: function (object) { return object ? 'true' : 'false'; },\n uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\n camelcase: function (object) { return object ? 'True' : 'False'; }\n },\n defaultStyle: 'lowercase'\n});\n\nfunction isHexCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||\n ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||\n ((0x61/* a */ <= c) && (c <= 0x66/* f */));\n}\n\nfunction isOctCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));\n}\n\nfunction isDecCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));\n}\n\nfunction resolveYamlInteger(data) {\n if (data === null) return false;\n\n var max = data.length,\n index = 0,\n hasDigits = false,\n ch;\n\n if (!max) return false;\n\n ch = data[index];\n\n // sign\n if (ch === '-' || ch === '+') {\n ch = data[++index];\n }\n\n if (ch === '0') {\n // 0\n if (index + 1 === max) return true;\n ch = data[++index];\n\n // base 2, base 8, base 16\n\n if (ch === 'b') {\n // base 2\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch !== '0' && ch !== '1') return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'x') {\n // base 16\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isHexCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'o') {\n // base 8\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isOctCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n }\n\n // base 10 (except 0)\n\n // value should not start with `_`;\n if (ch === '_') return false;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isDecCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n\n // Should have digits and should not end with `_`\n if (!hasDigits || ch === '_') return false;\n\n return true;\n}\n\nfunction constructYamlInteger(data) {\n var value = data, sign = 1, ch;\n\n if (value.indexOf('_') !== -1) {\n value = value.replace(/_/g, '');\n }\n\n ch = value[0];\n\n if (ch === '-' || ch === '+') {\n if (ch === '-') sign = -1;\n value = value.slice(1);\n ch = value[0];\n }\n\n if (value === '0') return 0;\n\n if (ch === '0') {\n if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);\n if (value[1] === 'x') return sign * parseInt(value.slice(2), 16);\n if (value[1] === 'o') return sign * parseInt(value.slice(2), 8);\n }\n\n return sign * parseInt(value, 10);\n}\n\nfunction isInteger(object) {\n return (Object.prototype.toString.call(object)) === '[object Number]' &&\n (object % 1 === 0 && !common.isNegativeZero(object));\n}\n\nvar int = new type('tag:yaml.org,2002:int', {\n kind: 'scalar',\n resolve: resolveYamlInteger,\n construct: constructYamlInteger,\n predicate: isInteger,\n represent: {\n binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },\n octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); },\n decimal: function (obj) { return obj.toString(10); },\n /* eslint-disable max-len */\n hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }\n },\n defaultStyle: 'decimal',\n styleAliases: {\n binary: [ 2, 'bin' ],\n octal: [ 8, 'oct' ],\n decimal: [ 10, 'dec' ],\n hexadecimal: [ 16, 'hex' ]\n }\n});\n\nvar YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n // special case, seems not from spec\n '|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$');\n\nfunction resolveYamlFloat(data) {\n if (data === null) return false;\n\n if (!YAML_FLOAT_PATTERN.test(data) ||\n // Quick hack to not allow integers end with `_`\n // Probably should update regexp & check speed\n data[data.length - 1] === '_') {\n return false;\n }\n\n return true;\n}\n\nfunction constructYamlFloat(data) {\n var value, sign;\n\n value = data.replace(/_/g, '').toLowerCase();\n sign = value[0] === '-' ? -1 : 1;\n\n if ('+-'.indexOf(value[0]) >= 0) {\n value = value.slice(1);\n }\n\n if (value === '.inf') {\n return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n\n } else if (value === '.nan') {\n return NaN;\n }\n return sign * parseFloat(value, 10);\n}\n\n\nvar SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;\n\nfunction representYamlFloat(object, style) {\n var res;\n\n if (isNaN(object)) {\n switch (style) {\n case 'lowercase': return '.nan';\n case 'uppercase': return '.NAN';\n case 'camelcase': return '.NaN';\n }\n } else if (Number.POSITIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '.inf';\n case 'uppercase': return '.INF';\n case 'camelcase': return '.Inf';\n }\n } else if (Number.NEGATIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '-.inf';\n case 'uppercase': return '-.INF';\n case 'camelcase': return '-.Inf';\n }\n } else if (common.isNegativeZero(object)) {\n return '-0.0';\n }\n\n res = object.toString(10);\n\n // JS stringifier can build scientific format without dots: 5e-100,\n // while YAML requres dot: 5.e-100. Fix it with simple hack\n\n return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;\n}\n\nfunction isFloat(object) {\n return (Object.prototype.toString.call(object) === '[object Number]') &&\n (object % 1 !== 0 || common.isNegativeZero(object));\n}\n\nvar float = new type('tag:yaml.org,2002:float', {\n kind: 'scalar',\n resolve: resolveYamlFloat,\n construct: constructYamlFloat,\n predicate: isFloat,\n represent: representYamlFloat,\n defaultStyle: 'lowercase'\n});\n\nvar json = failsafe.extend({\n implicit: [\n _null,\n bool,\n int,\n float\n ]\n});\n\nvar core = json;\n\nvar YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9])' + // [2] month\n '-([0-9][0-9])$'); // [3] day\n\nvar YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9]?)' + // [2] month\n '-([0-9][0-9]?)' + // [3] day\n '(?:[Tt]|[ \\\\t]+)' + // ...\n '([0-9][0-9]?)' + // [4] hour\n ':([0-9][0-9])' + // [5] minute\n ':([0-9][0-9])' + // [6] second\n '(?:\\\\.([0-9]*))?' + // [7] fraction\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour\n '(?::([0-9][0-9]))?))?$'); // [11] tz_minute\n\nfunction resolveYamlTimestamp(data) {\n if (data === null) return false;\n if (YAML_DATE_REGEXP.exec(data) !== null) return true;\n if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;\n return false;\n}\n\nfunction constructYamlTimestamp(data) {\n var match, year, month, day, hour, minute, second, fraction = 0,\n delta = null, tz_hour, tz_minute, date;\n\n match = YAML_DATE_REGEXP.exec(data);\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);\n\n if (match === null) throw new Error('Date resolve error');\n\n // match: [1] year [2] month [3] day\n\n year = +(match[1]);\n month = +(match[2]) - 1; // JS month starts with 0\n day = +(match[3]);\n\n if (!match[4]) { // no hour\n return new Date(Date.UTC(year, month, day));\n }\n\n // match: [4] hour [5] minute [6] second [7] fraction\n\n hour = +(match[4]);\n minute = +(match[5]);\n second = +(match[6]);\n\n if (match[7]) {\n fraction = match[7].slice(0, 3);\n while (fraction.length < 3) { // milli-seconds\n fraction += '0';\n }\n fraction = +fraction;\n }\n\n // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\n\n if (match[9]) {\n tz_hour = +(match[10]);\n tz_minute = +(match[11] || 0);\n delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\n if (match[9] === '-') delta = -delta;\n }\n\n date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n\n if (delta) date.setTime(date.getTime() - delta);\n\n return date;\n}\n\nfunction representYamlTimestamp(object /*, style*/) {\n return object.toISOString();\n}\n\nvar timestamp = new type('tag:yaml.org,2002:timestamp', {\n kind: 'scalar',\n resolve: resolveYamlTimestamp,\n construct: constructYamlTimestamp,\n instanceOf: Date,\n represent: representYamlTimestamp\n});\n\nfunction resolveYamlMerge(data) {\n return data === '<<' || data === null;\n}\n\nvar merge = new type('tag:yaml.org,2002:merge', {\n kind: 'scalar',\n resolve: resolveYamlMerge\n});\n\n/*eslint-disable no-bitwise*/\n\n\n\n\n\n// [ 64, 65, 66 ] -> [ padding, CR, LF ]\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r';\n\n\nfunction resolveYamlBinary(data) {\n if (data === null) return false;\n\n var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;\n\n // Convert one by one.\n for (idx = 0; idx < max; idx++) {\n code = map.indexOf(data.charAt(idx));\n\n // Skip CR/LF\n if (code > 64) continue;\n\n // Fail on illegal characters\n if (code < 0) return false;\n\n bitlen += 6;\n }\n\n // If there are any bits left, source was corrupted\n return (bitlen % 8) === 0;\n}\n\nfunction constructYamlBinary(data) {\n var idx, tailbits,\n input = data.replace(/[\\r\\n=]/g, ''), // remove CR/LF & padding to simplify scan\n max = input.length,\n map = BASE64_MAP,\n bits = 0,\n result = [];\n\n // Collect by 6*4 bits (3 bytes)\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 4 === 0) && idx) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n }\n\n bits = (bits << 6) | map.indexOf(input.charAt(idx));\n }\n\n // Dump tail\n\n tailbits = (max % 4) * 6;\n\n if (tailbits === 0) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n } else if (tailbits === 18) {\n result.push((bits >> 10) & 0xFF);\n result.push((bits >> 2) & 0xFF);\n } else if (tailbits === 12) {\n result.push((bits >> 4) & 0xFF);\n }\n\n return new Uint8Array(result);\n}\n\nfunction representYamlBinary(object /*, style*/) {\n var result = '', bits = 0, idx, tail,\n max = object.length,\n map = BASE64_MAP;\n\n // Convert every three bytes to 4 ASCII characters.\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 3 === 0) && idx) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n }\n\n bits = (bits << 8) + object[idx];\n }\n\n // Dump tail\n\n tail = max % 3;\n\n if (tail === 0) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n } else if (tail === 2) {\n result += map[(bits >> 10) & 0x3F];\n result += map[(bits >> 4) & 0x3F];\n result += map[(bits << 2) & 0x3F];\n result += map[64];\n } else if (tail === 1) {\n result += map[(bits >> 2) & 0x3F];\n result += map[(bits << 4) & 0x3F];\n result += map[64];\n result += map[64];\n }\n\n return result;\n}\n\nfunction isBinary(obj) {\n return Object.prototype.toString.call(obj) === '[object Uint8Array]';\n}\n\nvar binary = new type('tag:yaml.org,2002:binary', {\n kind: 'scalar',\n resolve: resolveYamlBinary,\n construct: constructYamlBinary,\n predicate: isBinary,\n represent: representYamlBinary\n});\n\nvar _hasOwnProperty$3 = Object.prototype.hasOwnProperty;\nvar _toString$2 = Object.prototype.toString;\n\nfunction resolveYamlOmap(data) {\n if (data === null) return true;\n\n var objectKeys = [], index, length, pair, pairKey, pairHasKey,\n object = data;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n pairHasKey = false;\n\n if (_toString$2.call(pair) !== '[object Object]') return false;\n\n for (pairKey in pair) {\n if (_hasOwnProperty$3.call(pair, pairKey)) {\n if (!pairHasKey) pairHasKey = true;\n else return false;\n }\n }\n\n if (!pairHasKey) return false;\n\n if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);\n else return false;\n }\n\n return true;\n}\n\nfunction constructYamlOmap(data) {\n return data !== null ? data : [];\n}\n\nvar omap = new type('tag:yaml.org,2002:omap', {\n kind: 'sequence',\n resolve: resolveYamlOmap,\n construct: constructYamlOmap\n});\n\nvar _toString$1 = Object.prototype.toString;\n\nfunction resolveYamlPairs(data) {\n if (data === null) return true;\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n if (_toString$1.call(pair) !== '[object Object]') return false;\n\n keys = Object.keys(pair);\n\n if (keys.length !== 1) return false;\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return true;\n}\n\nfunction constructYamlPairs(data) {\n if (data === null) return [];\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n keys = Object.keys(pair);\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return result;\n}\n\nvar pairs = new type('tag:yaml.org,2002:pairs', {\n kind: 'sequence',\n resolve: resolveYamlPairs,\n construct: constructYamlPairs\n});\n\nvar _hasOwnProperty$2 = Object.prototype.hasOwnProperty;\n\nfunction resolveYamlSet(data) {\n if (data === null) return true;\n\n var key, object = data;\n\n for (key in object) {\n if (_hasOwnProperty$2.call(object, key)) {\n if (object[key] !== null) return false;\n }\n }\n\n return true;\n}\n\nfunction constructYamlSet(data) {\n return data !== null ? data : {};\n}\n\nvar set = new type('tag:yaml.org,2002:set', {\n kind: 'mapping',\n resolve: resolveYamlSet,\n construct: constructYamlSet\n});\n\nvar _default = core.extend({\n implicit: [\n timestamp,\n merge\n ],\n explicit: [\n binary,\n omap,\n pairs,\n set\n ]\n});\n\n/*eslint-disable max-len,no-use-before-define*/\n\n\n\n\n\n\n\nvar _hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\n\nvar CONTEXT_FLOW_IN = 1;\nvar CONTEXT_FLOW_OUT = 2;\nvar CONTEXT_BLOCK_IN = 3;\nvar CONTEXT_BLOCK_OUT = 4;\n\n\nvar CHOMPING_CLIP = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP = 3;\n\n\nvar PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\n\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\n\nfunction is_EOL(c) {\n return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);\n}\n\nfunction is_WHITE_SPACE(c) {\n return (c === 0x09/* Tab */) || (c === 0x20/* Space */);\n}\n\nfunction is_WS_OR_EOL(c) {\n return (c === 0x09/* Tab */) ||\n (c === 0x20/* Space */) ||\n (c === 0x0A/* LF */) ||\n (c === 0x0D/* CR */);\n}\n\nfunction is_FLOW_INDICATOR(c) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */;\n}\n\nfunction fromHexCode(c) {\n var lc;\n\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n /*eslint-disable no-bitwise*/\n lc = c | 0x20;\n\n if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {\n return lc - 0x61 + 10;\n }\n\n return -1;\n}\n\nfunction escapedHexLen(c) {\n if (c === 0x78/* x */) { return 2; }\n if (c === 0x75/* u */) { return 4; }\n if (c === 0x55/* U */) { return 8; }\n return 0;\n}\n\nfunction fromDecimalCode(c) {\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n return -1;\n}\n\nfunction simpleEscapeSequence(c) {\n /* eslint-disable indent */\n return (c === 0x30/* 0 */) ? '\\x00' :\n (c === 0x61/* a */) ? '\\x07' :\n (c === 0x62/* b */) ? '\\x08' :\n (c === 0x74/* t */) ? '\\x09' :\n (c === 0x09/* Tab */) ? '\\x09' :\n (c === 0x6E/* n */) ? '\\x0A' :\n (c === 0x76/* v */) ? '\\x0B' :\n (c === 0x66/* f */) ? '\\x0C' :\n (c === 0x72/* r */) ? '\\x0D' :\n (c === 0x65/* e */) ? '\\x1B' :\n (c === 0x20/* Space */) ? ' ' :\n (c === 0x22/* \" */) ? '\\x22' :\n (c === 0x2F/* / */) ? '/' :\n (c === 0x5C/* \\ */) ? '\\x5C' :\n (c === 0x4E/* N */) ? '\\x85' :\n (c === 0x5F/* _ */) ? '\\xA0' :\n (c === 0x4C/* L */) ? '\\u2028' :\n (c === 0x50/* P */) ? '\\u2029' : '';\n}\n\nfunction charFromCodepoint(c) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c);\n }\n // Encode UTF-16 surrogate pair\n // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n );\n}\n\n// set a property of a literal object, while protecting against prototype pollution,\n// see https://github.com/nodeca/js-yaml/issues/164 for more details\nfunction setProperty(object, key, value) {\n // used for this specific key only because Object.defineProperty is slow\n if (key === '__proto__') {\n Object.defineProperty(object, key, {\n configurable: true,\n enumerable: true,\n writable: true,\n value: value\n });\n } else {\n object[key] = value;\n }\n}\n\nvar simpleEscapeCheck = new Array(256); // integer, for fast access\nvar simpleEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;\n simpleEscapeMap[i] = simpleEscapeSequence(i);\n}\n\n\nfunction State$1(input, options) {\n this.input = input;\n\n this.filename = options['filename'] || null;\n this.schema = options['schema'] || _default;\n this.onWarning = options['onWarning'] || null;\n // (Hidden) Remove? makes the loader to expect YAML 1.1 documents\n // if such documents have no explicit %YAML directive\n this.legacy = options['legacy'] || false;\n\n this.json = options['json'] || false;\n this.listener = options['listener'] || null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.typeMap = this.schema.compiledTypeMap;\n\n this.length = input.length;\n this.position = 0;\n this.line = 0;\n this.lineStart = 0;\n this.lineIndent = 0;\n\n // position of first leading tab in the current line,\n // used to make sure there are no tabs in the indentation\n this.firstTabInLine = -1;\n\n this.documents = [];\n\n /*\n this.version;\n this.checkLineBreaks;\n this.tagMap;\n this.anchorMap;\n this.tag;\n this.anchor;\n this.kind;\n this.result;*/\n\n}\n\n\nfunction generateError(state, message) {\n var mark = {\n name: state.filename,\n buffer: state.input.slice(0, -1), // omit trailing \\0\n position: state.position,\n line: state.line,\n column: state.position - state.lineStart\n };\n\n mark.snippet = snippet(mark);\n\n return new exception(message, mark);\n}\n\nfunction throwError(state, message) {\n throw generateError(state, message);\n}\n\nfunction throwWarning(state, message) {\n if (state.onWarning) {\n state.onWarning.call(null, generateError(state, message));\n }\n}\n\n\nvar directiveHandlers = {\n\n YAML: function handleYamlDirective(state, name, args) {\n\n var match, major, minor;\n\n if (state.version !== null) {\n throwError(state, 'duplication of %YAML directive');\n }\n\n if (args.length !== 1) {\n throwError(state, 'YAML directive accepts exactly one argument');\n }\n\n match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n\n if (match === null) {\n throwError(state, 'ill-formed argument of the YAML directive');\n }\n\n major = parseInt(match[1], 10);\n minor = parseInt(match[2], 10);\n\n if (major !== 1) {\n throwError(state, 'unacceptable YAML version of the document');\n }\n\n state.version = args[0];\n state.checkLineBreaks = (minor < 2);\n\n if (minor !== 1 && minor !== 2) {\n throwWarning(state, 'unsupported YAML version of the document');\n }\n },\n\n TAG: function handleTagDirective(state, name, args) {\n\n var handle, prefix;\n\n if (args.length !== 2) {\n throwError(state, 'TAG directive accepts exactly two arguments');\n }\n\n handle = args[0];\n prefix = args[1];\n\n if (!PATTERN_TAG_HANDLE.test(handle)) {\n throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n }\n\n if (_hasOwnProperty$1.call(state.tagMap, handle)) {\n throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n }\n\n if (!PATTERN_TAG_URI.test(prefix)) {\n throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n }\n\n try {\n prefix = decodeURIComponent(prefix);\n } catch (err) {\n throwError(state, 'tag prefix is malformed: ' + prefix);\n }\n\n state.tagMap[handle] = prefix;\n }\n};\n\n\nfunction captureSegment(state, start, end, checkJson) {\n var _position, _length, _character, _result;\n\n if (start < end) {\n _result = state.input.slice(start, end);\n\n if (checkJson) {\n for (_position = 0, _length = _result.length; _position < _length; _position += 1) {\n _character = _result.charCodeAt(_position);\n if (!(_character === 0x09 ||\n (0x20 <= _character && _character <= 0x10FFFF))) {\n throwError(state, 'expected valid JSON character');\n }\n }\n } else if (PATTERN_NON_PRINTABLE.test(_result)) {\n throwError(state, 'the stream contains non-printable characters');\n }\n\n state.result += _result;\n }\n}\n\nfunction mergeMappings(state, destination, source, overridableKeys) {\n var sourceKeys, key, index, quantity;\n\n if (!common.isObject(source)) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n }\n\n sourceKeys = Object.keys(source);\n\n for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n key = sourceKeys[index];\n\n if (!_hasOwnProperty$1.call(destination, key)) {\n setProperty(destination, key, source[key]);\n overridableKeys[key] = true;\n }\n }\n}\n\nfunction storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode,\n startLine, startLineStart, startPos) {\n\n var index, quantity;\n\n // The output is a plain object here, so keys can only be strings.\n // We need to convert keyNode to a string, but doing so can hang the process\n // (deeply nested arrays that explode exponentially using aliases).\n if (Array.isArray(keyNode)) {\n keyNode = Array.prototype.slice.call(keyNode);\n\n for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {\n if (Array.isArray(keyNode[index])) {\n throwError(state, 'nested arrays are not supported inside keys');\n }\n\n if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {\n keyNode[index] = '[object Object]';\n }\n }\n }\n\n // Avoid code execution in load() via toString property\n // (still use its own toString for arrays, timestamps,\n // and whatever user schema extensions happen to have @@toStringTag)\n if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {\n keyNode = '[object Object]';\n }\n\n\n keyNode = String(keyNode);\n\n if (_result === null) {\n _result = {};\n }\n\n if (keyTag === 'tag:yaml.org,2002:merge') {\n if (Array.isArray(valueNode)) {\n for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {\n mergeMappings(state, _result, valueNode[index], overridableKeys);\n }\n } else {\n mergeMappings(state, _result, valueNode, overridableKeys);\n }\n } else {\n if (!state.json &&\n !_hasOwnProperty$1.call(overridableKeys, keyNode) &&\n _hasOwnProperty$1.call(_result, keyNode)) {\n state.line = startLine || state.line;\n state.lineStart = startLineStart || state.lineStart;\n state.position = startPos || state.position;\n throwError(state, 'duplicated mapping key');\n }\n\n setProperty(_result, keyNode, valueNode);\n delete overridableKeys[keyNode];\n }\n\n return _result;\n}\n\nfunction readLineBreak(state) {\n var ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x0A/* LF */) {\n state.position++;\n } else if (ch === 0x0D/* CR */) {\n state.position++;\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {\n state.position++;\n }\n } else {\n throwError(state, 'a line break is expected');\n }\n\n state.line += 1;\n state.lineStart = state.position;\n state.firstTabInLine = -1;\n}\n\nfunction skipSeparationSpace(state, allowComments, checkIndent) {\n var lineBreaks = 0,\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {\n state.firstTabInLine = state.position;\n }\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (allowComments && ch === 0x23/* # */) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);\n }\n\n if (is_EOL(ch)) {\n readLineBreak(state);\n\n ch = state.input.charCodeAt(state.position);\n lineBreaks++;\n state.lineIndent = 0;\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n } else {\n break;\n }\n }\n\n if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {\n throwWarning(state, 'deficient indentation');\n }\n\n return lineBreaks;\n}\n\nfunction testDocumentSeparator(state) {\n var _position = state.position,\n ch;\n\n ch = state.input.charCodeAt(_position);\n\n // Condition state.position === state.lineStart is tested\n // in parent on each call, for efficiency. No needs to test here again.\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(_position + 1) &&\n ch === state.input.charCodeAt(_position + 2)) {\n\n _position += 3;\n\n ch = state.input.charCodeAt(_position);\n\n if (ch === 0 || is_WS_OR_EOL(ch)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction writeFoldedLines(state, count) {\n if (count === 1) {\n state.result += ' ';\n } else if (count > 1) {\n state.result += common.repeat('\\n', count - 1);\n }\n}\n\n\nfunction readPlainScalar(state, nodeIndent, withinFlowCollection) {\n var preceding,\n following,\n captureStart,\n captureEnd,\n hasPendingContent,\n _line,\n _lineStart,\n _lineIndent,\n _kind = state.kind,\n _result = state.result,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (is_WS_OR_EOL(ch) ||\n is_FLOW_INDICATOR(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */) {\n return false;\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n return false;\n }\n }\n\n state.kind = 'scalar';\n state.result = '';\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n\n while (ch !== 0) {\n if (ch === 0x3A/* : */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n break;\n }\n\n } else if (ch === 0x23/* # */) {\n preceding = state.input.charCodeAt(state.position - 1);\n\n if (is_WS_OR_EOL(preceding)) {\n break;\n }\n\n } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\n withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n break;\n\n } else if (is_EOL(ch)) {\n _line = state.line;\n _lineStart = state.lineStart;\n _lineIndent = state.lineIndent;\n skipSeparationSpace(state, false, -1);\n\n if (state.lineIndent >= nodeIndent) {\n hasPendingContent = true;\n ch = state.input.charCodeAt(state.position);\n continue;\n } else {\n state.position = captureEnd;\n state.line = _line;\n state.lineStart = _lineStart;\n state.lineIndent = _lineIndent;\n break;\n }\n }\n\n if (hasPendingContent) {\n captureSegment(state, captureStart, captureEnd, false);\n writeFoldedLines(state, state.line - _line);\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n }\n\n if (!is_WHITE_SPACE(ch)) {\n captureEnd = state.position + 1;\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, captureEnd, false);\n\n if (state.result) {\n return true;\n }\n\n state.kind = _kind;\n state.result = _result;\n return false;\n}\n\nfunction readSingleQuotedScalar(state, nodeIndent) {\n var ch,\n captureStart, captureEnd;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x27/* ' */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x27/* ' */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x27/* ' */) {\n captureStart = state.position;\n state.position++;\n captureEnd = state.position;\n } else {\n return true;\n }\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\n\nfunction readDoubleQuotedScalar(state, nodeIndent) {\n var captureStart,\n captureEnd,\n hexLength,\n hexResult,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x22/* \" */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x22/* \" */) {\n captureSegment(state, captureStart, state.position, true);\n state.position++;\n return true;\n\n } else if (ch === 0x5C/* \\ */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (is_EOL(ch)) {\n skipSeparationSpace(state, false, nodeIndent);\n\n // TODO: rework to inline fn with no type cast?\n } else if (ch < 256 && simpleEscapeCheck[ch]) {\n state.result += simpleEscapeMap[ch];\n state.position++;\n\n } else if ((tmp = escapedHexLen(ch)) > 0) {\n hexLength = tmp;\n hexResult = 0;\n\n for (; hexLength > 0; hexLength--) {\n ch = state.input.charCodeAt(++state.position);\n\n if ((tmp = fromHexCode(ch)) >= 0) {\n hexResult = (hexResult << 4) + tmp;\n\n } else {\n throwError(state, 'expected hexadecimal character');\n }\n }\n\n state.result += charFromCodepoint(hexResult);\n\n state.position++;\n\n } else {\n throwError(state, 'unknown escape sequence');\n }\n\n captureStart = captureEnd = state.position;\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\n\nfunction readFlowCollection(state, nodeIndent) {\n var readNext = true,\n _line,\n _lineStart,\n _pos,\n _tag = state.tag,\n _result,\n _anchor = state.anchor,\n following,\n terminator,\n isPair,\n isExplicitPair,\n isMapping,\n overridableKeys = Object.create(null),\n keyNode,\n keyTag,\n valueNode,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x5B/* [ */) {\n terminator = 0x5D;/* ] */\n isMapping = false;\n _result = [];\n } else if (ch === 0x7B/* { */) {\n terminator = 0x7D;/* } */\n isMapping = true;\n _result = {};\n } else {\n return false;\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n while (ch !== 0) {\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === terminator) {\n state.position++;\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = isMapping ? 'mapping' : 'sequence';\n state.result = _result;\n return true;\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries');\n } else if (ch === 0x2C/* , */) {\n // \"flow collection entries can never be completely empty\", as per YAML 1.2, section 7.4\n throwError(state, \"expected the node content, but found ','\");\n }\n\n keyTag = keyNode = valueNode = null;\n isPair = isExplicitPair = false;\n\n if (ch === 0x3F/* ? */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following)) {\n isPair = isExplicitPair = true;\n state.position++;\n skipSeparationSpace(state, true, nodeIndent);\n }\n }\n\n _line = state.line; // Save the current line.\n _lineStart = state.lineStart;\n _pos = state.position;\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n keyTag = state.tag;\n keyNode = state.result;\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {\n isPair = true;\n ch = state.input.charCodeAt(++state.position);\n skipSeparationSpace(state, true, nodeIndent);\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n valueNode = state.result;\n }\n\n if (isMapping) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);\n } else if (isPair) {\n _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));\n } else {\n _result.push(keyNode);\n }\n\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x2C/* , */) {\n readNext = true;\n ch = state.input.charCodeAt(++state.position);\n } else {\n readNext = false;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection');\n}\n\nfunction readBlockScalar(state, nodeIndent) {\n var captureStart,\n folding,\n chomping = CHOMPING_CLIP,\n didReadContent = false,\n detectedIndent = false,\n textIndent = nodeIndent,\n emptyLines = 0,\n atMoreIndented = false,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x7C/* | */) {\n folding = false;\n } else if (ch === 0x3E/* > */) {\n folding = true;\n } else {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n\n while (ch !== 0) {\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\n if (CHOMPING_CLIP === chomping) {\n chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;\n } else {\n throwError(state, 'repeat of a chomping mode identifier');\n }\n\n } else if ((tmp = fromDecimalCode(ch)) >= 0) {\n if (tmp === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n } else if (!detectedIndent) {\n textIndent = nodeIndent + tmp - 1;\n detectedIndent = true;\n } else {\n throwError(state, 'repeat of an indentation width identifier');\n }\n\n } else {\n break;\n }\n }\n\n if (is_WHITE_SPACE(ch)) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (is_WHITE_SPACE(ch));\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (!is_EOL(ch) && (ch !== 0));\n }\n }\n\n while (ch !== 0) {\n readLineBreak(state);\n state.lineIndent = 0;\n\n ch = state.input.charCodeAt(state.position);\n\n while ((!detectedIndent || state.lineIndent < textIndent) &&\n (ch === 0x20/* Space */)) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (!detectedIndent && state.lineIndent > textIndent) {\n textIndent = state.lineIndent;\n }\n\n if (is_EOL(ch)) {\n emptyLines++;\n continue;\n }\n\n // End of the scalar.\n if (state.lineIndent < textIndent) {\n\n // Perform the chomping.\n if (chomping === CHOMPING_KEEP) {\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n } else if (chomping === CHOMPING_CLIP) {\n if (didReadContent) { // i.e. only if the scalar is not empty.\n state.result += '\\n';\n }\n }\n\n // Break this `while` cycle and go to the funciton's epilogue.\n break;\n }\n\n // Folded style: use fancy rules to handle line breaks.\n if (folding) {\n\n // Lines starting with white space characters (more-indented lines) are not folded.\n if (is_WHITE_SPACE(ch)) {\n atMoreIndented = true;\n // except for the first content line (cf. Example 8.1)\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n\n // End of more-indented block.\n } else if (atMoreIndented) {\n atMoreIndented = false;\n state.result += common.repeat('\\n', emptyLines + 1);\n\n // Just one line break - perceive as the same line.\n } else if (emptyLines === 0) {\n if (didReadContent) { // i.e. only if we have already read some scalar content.\n state.result += ' ';\n }\n\n // Several line breaks - perceive as different lines.\n } else {\n state.result += common.repeat('\\n', emptyLines);\n }\n\n // Literal style: just add exact number of line breaks between content lines.\n } else {\n // Keep all line breaks except the header line break.\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n }\n\n didReadContent = true;\n detectedIndent = true;\n emptyLines = 0;\n captureStart = state.position;\n\n while (!is_EOL(ch) && (ch !== 0)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, state.position, false);\n }\n\n return true;\n}\n\nfunction readBlockSequence(state, nodeIndent) {\n var _line,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = [],\n following,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n if (ch !== 0x2D/* - */) {\n break;\n }\n\n following = state.input.charCodeAt(state.position + 1);\n\n if (!is_WS_OR_EOL(following)) {\n break;\n }\n\n detected = true;\n state.position++;\n\n if (skipSeparationSpace(state, true, -1)) {\n if (state.lineIndent <= nodeIndent) {\n _result.push(null);\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n _result.push(state.result);\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a sequence entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'sequence';\n state.result = _result;\n return true;\n }\n return false;\n}\n\nfunction readBlockMapping(state, nodeIndent, flowIndent) {\n var following,\n allowCompact,\n _line,\n _keyLine,\n _keyLineStart,\n _keyPos,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = {},\n overridableKeys = Object.create(null),\n keyTag = null,\n keyNode = null,\n valueNode = null,\n atExplicitKey = false,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (!atExplicitKey && state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n following = state.input.charCodeAt(state.position + 1);\n _line = state.line; // Save the current line.\n\n //\n // Explicit notation case. There are two separate blocks:\n // first for the key (denoted by \"?\") and second for the value (denoted by \":\")\n //\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = true;\n allowCompact = true;\n\n } else if (atExplicitKey) {\n // i.e. 0x3A/* : */ === character after the explicit key.\n atExplicitKey = false;\n allowCompact = true;\n\n } else {\n throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');\n }\n\n state.position += 1;\n ch = following;\n\n //\n // Implicit notation case. Flow-style node as the key first, then \":\", and the value.\n //\n } else {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n\n if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n // Neither implicit nor explicit notation.\n // Reading is done. Go to the epilogue.\n break;\n }\n\n if (state.line === _line) {\n ch = state.input.charCodeAt(state.position);\n\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position);\n\n if (!is_WS_OR_EOL(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n }\n\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = false;\n allowCompact = false;\n keyTag = state.tag;\n keyNode = state.result;\n\n } else if (detected) {\n throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n }\n\n //\n // Common reading code for both explicit and implicit notations.\n //\n if (state.line === _line || state.lineIndent > nodeIndent) {\n if (atExplicitKey) {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n }\n\n if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n if (atExplicitKey) {\n keyNode = state.result;\n } else {\n valueNode = state.result;\n }\n }\n\n if (!atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n }\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a mapping entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n //\n // Epilogue.\n //\n\n // Special case: last mapping's node contains only the key in explicit notation.\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n }\n\n // Expose the resulting mapping.\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'mapping';\n state.result = _result;\n }\n\n return detected;\n}\n\nfunction readTagProperty(state) {\n var _position,\n isVerbatim = false,\n isNamed = false,\n tagHandle,\n tagName,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x21/* ! */) return false;\n\n if (state.tag !== null) {\n throwError(state, 'duplication of a tag property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true;\n ch = state.input.charCodeAt(++state.position);\n\n } else if (ch === 0x21/* ! */) {\n isNamed = true;\n tagHandle = '!!';\n ch = state.input.charCodeAt(++state.position);\n\n } else {\n tagHandle = '!';\n }\n\n _position = state.position;\n\n if (isVerbatim) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && ch !== 0x3E/* > */);\n\n if (state.position < state.length) {\n tagName = state.input.slice(_position, state.position);\n ch = state.input.charCodeAt(++state.position);\n } else {\n throwError(state, 'unexpected end of the stream within a verbatim tag');\n }\n } else {\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(_position - 1, state.position + 1);\n\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n throwError(state, 'named tag handle cannot contain such characters');\n }\n\n isNamed = true;\n _position = state.position + 1;\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks');\n }\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n tagName = state.input.slice(_position, state.position);\n\n if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n throwError(state, 'tag suffix cannot contain flow indicator characters');\n }\n }\n\n if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n throwError(state, 'tag name cannot contain such characters: ' + tagName);\n }\n\n try {\n tagName = decodeURIComponent(tagName);\n } catch (err) {\n throwError(state, 'tag name is malformed: ' + tagName);\n }\n\n if (isVerbatim) {\n state.tag = tagName;\n\n } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) {\n state.tag = state.tagMap[tagHandle] + tagName;\n\n } else if (tagHandle === '!') {\n state.tag = '!' + tagName;\n\n } else if (tagHandle === '!!') {\n state.tag = 'tag:yaml.org,2002:' + tagName;\n\n } else {\n throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n }\n\n return true;\n}\n\nfunction readAnchorProperty(state) {\n var _position,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x26/* & */) return false;\n\n if (state.anchor !== null) {\n throwError(state, 'duplication of an anchor property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an anchor node must contain at least one character');\n }\n\n state.anchor = state.input.slice(_position, state.position);\n return true;\n}\n\nfunction readAlias(state) {\n var _position, alias,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x2A/* * */) return false;\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an alias node must contain at least one character');\n }\n\n alias = state.input.slice(_position, state.position);\n\n if (!_hasOwnProperty$1.call(state.anchorMap, alias)) {\n throwError(state, 'unidentified alias \"' + alias + '\"');\n }\n\n state.result = state.anchorMap[alias];\n skipSeparationSpace(state, true, -1);\n return true;\n}\n\nfunction composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\n var allowBlockStyles,\n allowBlockScalars,\n allowBlockCollections,\n indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n }\n\n if (indentStatus === 1) {\n while (readTagProperty(state) || readAnchorProperty(state)) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n allowBlockCollections = allowBlockStyles;\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n } else {\n allowBlockCollections = false;\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact;\n }\n\n if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {\n if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n flowIndent = parentIndent;\n } else {\n flowIndent = parentIndent + 1;\n }\n\n blockIndent = state.position - state.lineStart;\n\n if (indentStatus === 1) {\n if (allowBlockCollections &&\n (readBlockSequence(state, blockIndent) ||\n readBlockMapping(state, blockIndent, flowIndent)) ||\n readFlowCollection(state, flowIndent)) {\n hasContent = true;\n } else {\n if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\n readSingleQuotedScalar(state, flowIndent) ||\n readDoubleQuotedScalar(state, flowIndent)) {\n hasContent = true;\n\n } else if (readAlias(state)) {\n hasContent = true;\n\n if (state.tag !== null || state.anchor !== null) {\n throwError(state, 'alias node should not have any properties');\n }\n\n } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n hasContent = true;\n\n if (state.tag === null) {\n state.tag = '?';\n }\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else if (indentStatus === 0) {\n // Special case: block sequences are allowed to have same indentation level as the parent.\n // http://www.yaml.org/spec/1.2/spec.html#id2799784\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n }\n }\n\n if (state.tag === null) {\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n\n } else if (state.tag === '?') {\n // Implicit resolving is not allowed for non-scalar types, and '?'\n // non-specific tag is only automatically assigned to plain scalars.\n //\n // We only need to check kind conformity in case user explicitly assigns '?'\n // tag, for example like this: \"! [0]\"\n //\n if (state.result !== null && state.kind !== 'scalar') {\n throwError(state, 'unacceptable node kind for ! tag; it should be \"scalar\", not \"' + state.kind + '\"');\n }\n\n for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {\n type = state.implicitTypes[typeIndex];\n\n if (type.resolve(state.result)) { // `state.result` updated in resolver if matched\n state.result = type.construct(state.result);\n state.tag = type.tag;\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n break;\n }\n }\n } else if (state.tag !== '!') {\n if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) {\n type = state.typeMap[state.kind || 'fallback'][state.tag];\n } else {\n // looking for multi type\n type = null;\n typeList = state.typeMap.multi[state.kind || 'fallback'];\n\n for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {\n if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {\n type = typeList[typeIndex];\n break;\n }\n }\n }\n\n if (!type) {\n throwError(state, 'unknown tag !<' + state.tag + '>');\n }\n\n if (state.result !== null && type.kind !== state.kind) {\n throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n }\n\n if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched\n throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n } else {\n state.result = type.construct(state.result, state.tag);\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n }\n\n if (state.listener !== null) {\n state.listener('close', state);\n }\n return state.tag !== null || state.anchor !== null || hasContent;\n}\n\nfunction readDocument(state) {\n var documentStart = state.position,\n _position,\n directiveName,\n directiveArgs,\n hasDirectives = false,\n ch;\n\n state.version = null;\n state.checkLineBreaks = state.legacy;\n state.tagMap = Object.create(null);\n state.anchorMap = Object.create(null);\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if (state.lineIndent > 0 || ch !== 0x25/* % */) {\n break;\n }\n\n hasDirectives = true;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveName = state.input.slice(_position, state.position);\n directiveArgs = [];\n\n if (directiveName.length < 1) {\n throwError(state, 'directive name must not be less than one character in length');\n }\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && !is_EOL(ch));\n break;\n }\n\n if (is_EOL(ch)) break;\n\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveArgs.push(state.input.slice(_position, state.position));\n }\n\n if (ch !== 0) readLineBreak(state);\n\n if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) {\n directiveHandlers[directiveName](state, directiveName, directiveArgs);\n } else {\n throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n }\n }\n\n skipSeparationSpace(state, true, -1);\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected');\n }\n\n composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n skipSeparationSpace(state, true, -1);\n\n if (state.checkLineBreaks &&\n PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n }\n\n state.documents.push(state.result);\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n\n if (state.input.charCodeAt(state.position) === 0x2E/* . */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n return;\n }\n\n if (state.position < (state.length - 1)) {\n throwError(state, 'end of the stream or a document separator is expected');\n } else {\n return;\n }\n}\n\n\nfunction loadDocuments(input, options) {\n input = String(input);\n options = options || {};\n\n if (input.length !== 0) {\n\n // Add tailing `\\n` if not exists\n if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&\n input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {\n input += '\\n';\n }\n\n // Strip BOM\n if (input.charCodeAt(0) === 0xFEFF) {\n input = input.slice(1);\n }\n }\n\n var state = new State$1(input, options);\n\n var nullpos = input.indexOf('\\0');\n\n if (nullpos !== -1) {\n state.position = nullpos;\n throwError(state, 'null byte is not allowed in input');\n }\n\n // Use 0 as string terminator. That significantly simplifies bounds check.\n state.input += '\\0';\n\n while (state.input.charCodeAt(state.position) === 0x20/* Space */) {\n state.lineIndent += 1;\n state.position += 1;\n }\n\n while (state.position < (state.length - 1)) {\n readDocument(state);\n }\n\n return state.documents;\n}\n\n\nfunction loadAll$1(input, iterator, options) {\n if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {\n options = iterator;\n iterator = null;\n }\n\n var documents = loadDocuments(input, options);\n\n if (typeof iterator !== 'function') {\n return documents;\n }\n\n for (var index = 0, length = documents.length; index < length; index += 1) {\n iterator(documents[index]);\n }\n}\n\n\nfunction load$1(input, options) {\n var documents = loadDocuments(input, options);\n\n if (documents.length === 0) {\n /*eslint-disable no-undefined*/\n return undefined;\n } else if (documents.length === 1) {\n return documents[0];\n }\n throw new exception('expected a single document in the stream, but found more');\n}\n\n\nvar loadAll_1 = loadAll$1;\nvar load_1 = load$1;\n\nvar loader = {\n\tloadAll: loadAll_1,\n\tload: load_1\n};\n\n/*eslint-disable no-use-before-define*/\n\n\n\n\n\nvar _toString = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar CHAR_BOM = 0xFEFF;\nvar CHAR_TAB = 0x09; /* Tab */\nvar CHAR_LINE_FEED = 0x0A; /* LF */\nvar CHAR_CARRIAGE_RETURN = 0x0D; /* CR */\nvar CHAR_SPACE = 0x20; /* Space */\nvar CHAR_EXCLAMATION = 0x21; /* ! */\nvar CHAR_DOUBLE_QUOTE = 0x22; /* \" */\nvar CHAR_SHARP = 0x23; /* # */\nvar CHAR_PERCENT = 0x25; /* % */\nvar CHAR_AMPERSAND = 0x26; /* & */\nvar CHAR_SINGLE_QUOTE = 0x27; /* ' */\nvar CHAR_ASTERISK = 0x2A; /* * */\nvar CHAR_COMMA = 0x2C; /* , */\nvar CHAR_MINUS = 0x2D; /* - */\nvar CHAR_COLON = 0x3A; /* : */\nvar CHAR_EQUALS = 0x3D; /* = */\nvar CHAR_GREATER_THAN = 0x3E; /* > */\nvar CHAR_QUESTION = 0x3F; /* ? */\nvar CHAR_COMMERCIAL_AT = 0x40; /* @ */\nvar CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\nvar CHAR_GRAVE_ACCENT = 0x60; /* ` */\nvar CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */\nvar CHAR_VERTICAL_LINE = 0x7C; /* | */\nvar CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */\n\nvar ESCAPE_SEQUENCES = {};\n\nESCAPE_SEQUENCES[0x00] = '\\\\0';\nESCAPE_SEQUENCES[0x07] = '\\\\a';\nESCAPE_SEQUENCES[0x08] = '\\\\b';\nESCAPE_SEQUENCES[0x09] = '\\\\t';\nESCAPE_SEQUENCES[0x0A] = '\\\\n';\nESCAPE_SEQUENCES[0x0B] = '\\\\v';\nESCAPE_SEQUENCES[0x0C] = '\\\\f';\nESCAPE_SEQUENCES[0x0D] = '\\\\r';\nESCAPE_SEQUENCES[0x1B] = '\\\\e';\nESCAPE_SEQUENCES[0x22] = '\\\\\"';\nESCAPE_SEQUENCES[0x5C] = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85] = '\\\\N';\nESCAPE_SEQUENCES[0xA0] = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\n\nvar DEPRECATED_BOOLEANS_SYNTAX = [\n 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\n 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\n];\n\nvar DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;\n\nfunction compileStyleMap(schema, map) {\n var result, keys, index, length, tag, style, type;\n\n if (map === null) return {};\n\n result = {};\n keys = Object.keys(map);\n\n for (index = 0, length = keys.length; index < length; index += 1) {\n tag = keys[index];\n style = String(map[tag]);\n\n if (tag.slice(0, 2) === '!!') {\n tag = 'tag:yaml.org,2002:' + tag.slice(2);\n }\n type = schema.compiledTypeMap['fallback'][tag];\n\n if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n style = type.styleAliases[style];\n }\n\n result[tag] = style;\n }\n\n return result;\n}\n\nfunction encodeHex(character) {\n var string, handle, length;\n\n string = character.toString(16).toUpperCase();\n\n if (character <= 0xFF) {\n handle = 'x';\n length = 2;\n } else if (character <= 0xFFFF) {\n handle = 'u';\n length = 4;\n } else if (character <= 0xFFFFFFFF) {\n handle = 'U';\n length = 8;\n } else {\n throw new exception('code point within a string may not be greater than 0xFFFFFFFF');\n }\n\n return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\n\n\nvar QUOTING_TYPE_SINGLE = 1,\n QUOTING_TYPE_DOUBLE = 2;\n\nfunction State(options) {\n this.schema = options['schema'] || _default;\n this.indent = Math.max(1, (options['indent'] || 2));\n this.noArrayIndent = options['noArrayIndent'] || false;\n this.skipInvalid = options['skipInvalid'] || false;\n this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\n this.styleMap = compileStyleMap(this.schema, options['styles'] || null);\n this.sortKeys = options['sortKeys'] || false;\n this.lineWidth = options['lineWidth'] || 80;\n this.noRefs = options['noRefs'] || false;\n this.noCompatMode = options['noCompatMode'] || false;\n this.condenseFlow = options['condenseFlow'] || false;\n this.quotingType = options['quotingType'] === '\"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;\n this.forceQuotes = options['forceQuotes'] || false;\n this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.explicitTypes = this.schema.compiledExplicit;\n\n this.tag = null;\n this.result = '';\n\n this.duplicates = [];\n this.usedDuplicates = null;\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString(string, spaces) {\n var ind = common.repeat(' ', spaces),\n position = 0,\n next = -1,\n result = '',\n line,\n length = string.length;\n\n while (position < length) {\n next = string.indexOf('\\n', position);\n if (next === -1) {\n line = string.slice(position);\n position = length;\n } else {\n line = string.slice(position, next + 1);\n position = next + 1;\n }\n\n if (line.length && line !== '\\n') result += ind;\n\n result += line;\n }\n\n return result;\n}\n\nfunction generateNextLine(state, level) {\n return '\\n' + common.repeat(' ', state.indent * level);\n}\n\nfunction testImplicitResolving(state, str) {\n var index, length, type;\n\n for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n type = state.implicitTypes[index];\n\n if (type.resolve(str)) {\n return true;\n }\n }\n\n return false;\n}\n\n// [33] s-white ::= s-space | s-tab\nfunction isWhitespace(c) {\n return c === CHAR_SPACE || c === CHAR_TAB;\n}\n\n// Returns true if the character can be printed without escaping.\n// From YAML 1.2: \"any allowed characters known to be non-printable\n// should also be escaped. [However,] This isn\u2019t mandatory\"\n// Derived from nb-char - \\t - #x85 - #xA0 - #x2028 - #x2029.\nfunction isPrintable(c) {\n return (0x00020 <= c && c <= 0x00007E)\n || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)\n || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM)\n || (0x10000 <= c && c <= 0x10FFFF);\n}\n\n// [34] ns-char ::= nb-char - s-white\n// [27] nb-char ::= c-printable - b-char - c-byte-order-mark\n// [26] b-char ::= b-line-feed | b-carriage-return\n// Including s-white (for some reason, examples doesn't match specs in this aspect)\n// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark\nfunction isNsCharOrWhitespace(c) {\n return isPrintable(c)\n && c !== CHAR_BOM\n // - b-char\n && c !== CHAR_CARRIAGE_RETURN\n && c !== CHAR_LINE_FEED;\n}\n\n// [127] ns-plain-safe(c) ::= c = flow-out \u21D2 ns-plain-safe-out\n// c = flow-in \u21D2 ns-plain-safe-in\n// c = block-key \u21D2 ns-plain-safe-out\n// c = flow-key \u21D2 ns-plain-safe-in\n// [128] ns-plain-safe-out ::= ns-char\n// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator\n// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - \u201C:\u201D - \u201C#\u201D )\n// | ( /* An ns-char preceding */ \u201C#\u201D )\n// | ( \u201C:\u201D /* Followed by an ns-plain-safe(c) */ )\nfunction isPlainSafe(c, prev, inblock) {\n var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);\n var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);\n return (\n // ns-plain-safe\n inblock ? // c = flow-in\n cIsNsCharOrWhitespace\n : cIsNsCharOrWhitespace\n // - c-flow-indicator\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n )\n // ns-plain-char\n && c !== CHAR_SHARP // false on '#'\n && !(prev === CHAR_COLON && !cIsNsChar) // false on ': '\n || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#'\n || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]'\n}\n\n// Simplified test for values allowed as the first character in plain style.\nfunction isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( \u201C?\u201D | \u201C:\u201D | \u201C-\u201D ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable(c) && c !== CHAR_BOM\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // \u201C-\u201D | \u201C?\u201D | \u201C:\u201D | \u201C,\u201D | \u201C[\u201D | \u201C]\u201D | \u201C{\u201D | \u201C}\u201D\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | \u201C#\u201D | \u201C&\u201D | \u201C*\u201D | \u201C!\u201D | \u201C|\u201D | \u201C=\u201D | \u201C>\u201D | \u201C'\u201D | \u201C\"\u201D\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | \u201C%\u201D | \u201C@\u201D | \u201C`\u201D)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}\n\n// Simplified test for values allowed as the last character in plain style.\nfunction isPlainSafeLast(c) {\n // just not whitespace or colon, it will be checked to be plain character later\n return !isWhitespace(c) && c !== CHAR_COLON;\n}\n\n// Same as 'string'.codePointAt(pos), but works in older browsers.\nfunction codePointAt(string, pos) {\n var first = string.charCodeAt(pos), second;\n if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) {\n second = string.charCodeAt(pos + 1);\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n }\n }\n return first;\n}\n\n// Determines whether block indentation indicator is required.\nfunction needIndentIndicator(string) {\n var leadingSpaceRe = /^\\n* /;\n return leadingSpaceRe.test(string);\n}\n\nvar STYLE_PLAIN = 1,\n STYLE_SINGLE = 2,\n STYLE_LITERAL = 3,\n STYLE_FOLDED = 4,\n STYLE_DOUBLE = 5;\n\n// Determines which scalar styles are possible and returns the preferred style.\n// lineWidth = -1 => no limit.\n// Pre-conditions: str.length > 0.\n// Post-conditions:\n// STYLE_PLAIN or STYLE_SINGLE => no \\n are in the string.\n// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).\n// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).\nfunction chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth,\n testAmbiguousType, quotingType, forceQuotes, inblock) {\n\n var i;\n var char = 0;\n var prevChar = null;\n var hasLineBreak = false;\n var hasFoldableLine = false; // only checked if shouldTrackWidth\n var shouldTrackWidth = lineWidth !== -1;\n var previousLineBreak = -1; // count the first line correctly\n var plain = isPlainSafeFirst(codePointAt(string, 0))\n && isPlainSafeLast(codePointAt(string, string.length - 1));\n\n if (singleLineOnly || forceQuotes) {\n // Case: no block styles.\n // Check for disallowed characters to rule out plain and single.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n } else {\n // Case: block styles permitted.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (char === CHAR_LINE_FEED) {\n hasLineBreak = true;\n // Check if any line can be folded.\n if (shouldTrackWidth) {\n hasFoldableLine = hasFoldableLine ||\n // Foldable line = too long, and not more-indented.\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' ');\n previousLineBreak = i;\n }\n } else if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n // in case the end is missing a \\n\n hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' '));\n }\n // Although every style can represent \\n without escaping, prefer block styles\n // for multiline, since they're more readable and they don't add empty lines.\n // Also prefer folding a super-long line.\n if (!hasLineBreak && !hasFoldableLine) {\n // Strings interpretable as another type have to be quoted;\n // e.g. the string 'true' vs. the boolean true.\n if (plain && !forceQuotes && !testAmbiguousType(string)) {\n return STYLE_PLAIN;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n }\n // Edge case: block indentation indicator can only have one digit.\n if (indentPerLevel > 9 && needIndentIndicator(string)) {\n return STYLE_DOUBLE;\n }\n // At this point we know block styles are valid.\n // Prefer literal style unless we want to fold.\n if (!forceQuotes) {\n return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n}\n\n// Note: line breaking/folding is implemented for only the folded style.\n// NB. We drop the last trailing newline (if any) of a returned block scalar\n// since the dumper adds its own newline. This always works:\n// \u2022 No ending newline => unaffected; already using strip \"-\" chomping.\n// \u2022 Ending newline => removed then restored.\n// Importantly, this keeps the \"+\" chomp indicator from gaining an extra line.\nfunction writeScalar(state, string, level, iskey, inblock) {\n state.dump = (function () {\n if (string.length === 0) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? '\"\"' : \"''\";\n }\n if (!state.noCompatMode) {\n if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? ('\"' + string + '\"') : (\"'\" + string + \"'\");\n }\n }\n\n var indent = state.indent * Math.max(1, level); // no 0-indent scalars\n // As indentation gets deeper, let the width decrease monotonically\n // to the lower bound min(state.lineWidth, 40).\n // Note that this implies\n // state.lineWidth \u2264 40 + state.indent: width is fixed at the lower bound.\n // state.lineWidth > 40 + state.indent: width decreases until the lower bound.\n // This behaves better than a constant minimum width which disallows narrower options,\n // or an indent threshold which causes the width to suddenly increase.\n var lineWidth = state.lineWidth === -1\n ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);\n\n // Without knowing if keys are implicit/explicit, assume implicit for safety.\n var singleLineOnly = iskey\n // No block styles in flow mode.\n || (state.flowLevel > -1 && level >= state.flowLevel);\n function testAmbiguity(string) {\n return testImplicitResolving(state, string);\n }\n\n switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth,\n testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {\n\n case STYLE_PLAIN:\n return string;\n case STYLE_SINGLE:\n return \"'\" + string.replace(/'/g, \"''\") + \"'\";\n case STYLE_LITERAL:\n return '|' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(string, indent));\n case STYLE_FOLDED:\n return '>' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(foldString(string, lineWidth), indent));\n case STYLE_DOUBLE:\n return '\"' + escapeString(string) + '\"';\n default:\n throw new exception('impossible error: invalid scalar style');\n }\n }());\n}\n\n// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.\nfunction blockHeader(string, indentPerLevel) {\n var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';\n\n // note the special case: the string '\\n' counts as a \"trailing\" empty line.\n var clip = string[string.length - 1] === '\\n';\n var keep = clip && (string[string.length - 2] === '\\n' || string === '\\n');\n var chomp = keep ? '+' : (clip ? '' : '-');\n\n return indentIndicator + chomp + '\\n';\n}\n\n// (See the note for writeScalar.)\nfunction dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}\n\n// Note: a long line without a suitable break point will exceed the width limit.\n// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.\nfunction foldString(string, width) {\n // In folded style, $k$ consecutive newlines output as $k+1$ newlines\u2014\n // unless they're before or after a more-indented line, or at the very\n // beginning or end, in which case $k$ maps to $k$.\n // Therefore, parse each chunk as newline(s) followed by a content line.\n var lineRe = /(\\n+)([^\\n]*)/g;\n\n // first line (possibly an empty line)\n var result = (function () {\n var nextLF = string.indexOf('\\n');\n nextLF = nextLF !== -1 ? nextLF : string.length;\n lineRe.lastIndex = nextLF;\n return foldLine(string.slice(0, nextLF), width);\n }());\n // If we haven't reached the first content line yet, don't add an extra \\n.\n var prevMoreIndented = string[0] === '\\n' || string[0] === ' ';\n var moreIndented;\n\n // rest of the lines\n var match;\n while ((match = lineRe.exec(string))) {\n var prefix = match[1], line = match[2];\n moreIndented = (line[0] === ' ');\n result += prefix\n + (!prevMoreIndented && !moreIndented && line !== ''\n ? '\\n' : '')\n + foldLine(line, width);\n prevMoreIndented = moreIndented;\n }\n\n return result;\n}\n\n// Greedy line breaking.\n// Picks the longest line under the limit each time,\n// otherwise settles for the shortest line over the limit.\n// NB. More-indented lines *cannot* be folded, as that would add an extra \\n.\nfunction foldLine(line, width) {\n if (line === '' || line[0] === ' ') return line;\n\n // Since a more-indented line adds a \\n, breaks can't be followed by a space.\n var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.\n var match;\n // start is an inclusive index. end, curr, and next are exclusive.\n var start = 0, end, curr = 0, next = 0;\n var result = '';\n\n // Invariants: 0 <= start <= length-1.\n // 0 <= curr <= next <= max(0, length-2). curr - start <= width.\n // Inside the loop:\n // A match implies length >= 2, so curr and next are <= length-2.\n while ((match = breakRe.exec(line))) {\n next = match.index;\n // maintain invariant: curr - start <= width\n if (next - start > width) {\n end = (curr > start) ? curr : next; // derive end <= length-2\n result += '\\n' + line.slice(start, end);\n // skip the space that was output as \\n\n start = end + 1; // derive start <= length-1\n }\n curr = next;\n }\n\n // By the invariants, start <= length-1, so there is something left over.\n // It is either the whole string or a part starting from non-whitespace.\n result += '\\n';\n // Insert a break if the remainder is too long and there is a break available.\n if (line.length - start > width && curr > start) {\n result += line.slice(start, curr) + '\\n' + line.slice(curr + 1);\n } else {\n result += line.slice(start);\n }\n\n return result.slice(1); // drop extra \\n joiner\n}\n\n// Escapes a double-quoted string.\nfunction escapeString(string) {\n var result = '';\n var char = 0;\n var escapeSeq;\n\n for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n escapeSeq = ESCAPE_SEQUENCES[char];\n\n if (!escapeSeq && isPrintable(char)) {\n result += string[i];\n if (char >= 0x10000) result += string[i + 1];\n } else {\n result += escapeSeq || encodeHex(char);\n }\n }\n\n return result;\n}\n\nfunction writeFlowSequence(state, level, object) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level, value, false, false) ||\n (typeof value === 'undefined' &&\n writeNode(state, level, null, false, false))) {\n\n if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '');\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = '[' + _result + ']';\n}\n\nfunction writeBlockSequence(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level + 1, value, true, true, false, true) ||\n (typeof value === 'undefined' &&\n writeNode(state, level + 1, null, true, true, false, true))) {\n\n if (!compact || _result !== '') {\n _result += generateNextLine(state, level);\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n _result += '-';\n } else {\n _result += '- ';\n }\n\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = _result || '[]'; // Empty sequence if no valid values.\n}\n\nfunction writeFlowMapping(state, level, object) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n pairBuffer;\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n\n pairBuffer = '';\n if (_result !== '') pairBuffer += ', ';\n\n if (state.condenseFlow) pairBuffer += '\"';\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level, objectKey, false, false)) {\n continue; // Skip this pair because of invalid key;\n }\n\n if (state.dump.length > 1024) pairBuffer += '? ';\n\n pairBuffer += state.dump + (state.condenseFlow ? '\"' : '') + ':' + (state.condenseFlow ? '' : ' ');\n\n if (!writeNode(state, level, objectValue, false, false)) {\n continue; // Skip this pair because of invalid value.\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = '{' + _result + '}';\n}\n\nfunction writeBlockMapping(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n explicitPair,\n pairBuffer;\n\n // Allow sorting keys so that the output file is deterministic\n if (state.sortKeys === true) {\n // Default sorting\n objectKeyList.sort();\n } else if (typeof state.sortKeys === 'function') {\n // Custom sort function\n objectKeyList.sort(state.sortKeys);\n } else if (state.sortKeys) {\n // Something is wrong\n throw new exception('sortKeys must be a boolean or a function');\n }\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n\n if (!compact || _result !== '') {\n pairBuffer += generateNextLine(state, level);\n }\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level + 1, objectKey, true, true, true)) {\n continue; // Skip this pair because of invalid key.\n }\n\n explicitPair = (state.tag !== null && state.tag !== '?') ||\n (state.dump && state.dump.length > 1024);\n\n if (explicitPair) {\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += '?';\n } else {\n pairBuffer += '? ';\n }\n }\n\n pairBuffer += state.dump;\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level);\n }\n\n if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n continue; // Skip this pair because of invalid value.\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += ':';\n } else {\n pairBuffer += ': ';\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = _result || '{}'; // Empty mapping if no valid pairs.\n}\n\nfunction detectType(state, object, explicit) {\n var _result, typeList, index, length, type, style;\n\n typeList = explicit ? state.explicitTypes : state.implicitTypes;\n\n for (index = 0, length = typeList.length; index < length; index += 1) {\n type = typeList[index];\n\n if ((type.instanceOf || type.predicate) &&\n (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&\n (!type.predicate || type.predicate(object))) {\n\n if (explicit) {\n if (type.multi && type.representName) {\n state.tag = type.representName(object);\n } else {\n state.tag = type.tag;\n }\n } else {\n state.tag = '?';\n }\n\n if (type.represent) {\n style = state.styleMap[type.tag] || type.defaultStyle;\n\n if (_toString.call(type.represent) === '[object Function]') {\n _result = type.represent(object, style);\n } else if (_hasOwnProperty.call(type.represent, style)) {\n _result = type.represent[style](object, style);\n } else {\n throw new exception('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n }\n\n state.dump = _result;\n }\n\n return true;\n }\n }\n\n return false;\n}\n\n// Serializes `object` and writes it to global `result`.\n// Returns true on success, or false on invalid object.\n//\nfunction writeNode(state, level, object, block, compact, iskey, isblockseq) {\n state.tag = null;\n state.dump = object;\n\n if (!detectType(state, object, false)) {\n detectType(state, object, true);\n }\n\n var type = _toString.call(state.dump);\n var inblock = block;\n var tagStr;\n\n if (block) {\n block = (state.flowLevel < 0 || state.flowLevel > level);\n }\n\n var objectOrArray = type === '[object Object]' || type === '[object Array]',\n duplicateIndex,\n duplicate;\n\n if (objectOrArray) {\n duplicateIndex = state.duplicates.indexOf(object);\n duplicate = duplicateIndex !== -1;\n }\n\n if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {\n compact = false;\n }\n\n if (duplicate && state.usedDuplicates[duplicateIndex]) {\n state.dump = '*ref_' + duplicateIndex;\n } else {\n if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n state.usedDuplicates[duplicateIndex] = true;\n }\n if (type === '[object Object]') {\n if (block && (Object.keys(state.dump).length !== 0)) {\n writeBlockMapping(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowMapping(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object Array]') {\n if (block && (state.dump.length !== 0)) {\n if (state.noArrayIndent && !isblockseq && level > 0) {\n writeBlockSequence(state, level - 1, state.dump, compact);\n } else {\n writeBlockSequence(state, level, state.dump, compact);\n }\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowSequence(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object String]') {\n if (state.tag !== '?') {\n writeScalar(state, state.dump, level, iskey, inblock);\n }\n } else if (type === '[object Undefined]') {\n return false;\n } else {\n if (state.skipInvalid) return false;\n throw new exception('unacceptable kind of an object to dump ' + type);\n }\n\n if (state.tag !== null && state.tag !== '?') {\n // Need to encode all characters except those allowed by the spec:\n //\n // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */\n // [36] ns-hex-digit ::= ns-dec-digit\n // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */\n // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */\n // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | \u201C-\u201D\n // [39] ns-uri-char ::= \u201C%\u201D ns-hex-digit ns-hex-digit | ns-word-char | \u201C#\u201D\n // | \u201C;\u201D | \u201C/\u201D | \u201C?\u201D | \u201C:\u201D | \u201C@\u201D | \u201C&\u201D | \u201C=\u201D | \u201C+\u201D | \u201C$\u201D | \u201C,\u201D\n // | \u201C_\u201D | \u201C.\u201D | \u201C!\u201D | \u201C~\u201D | \u201C*\u201D | \u201C'\u201D | \u201C(\u201D | \u201C)\u201D | \u201C[\u201D | \u201C]\u201D\n //\n // Also need to encode '!' because it has special meaning (end of tag prefix).\n //\n tagStr = encodeURI(\n state.tag[0] === '!' ? state.tag.slice(1) : state.tag\n ).replace(/!/g, '%21');\n\n if (state.tag[0] === '!') {\n tagStr = '!' + tagStr;\n } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') {\n tagStr = '!!' + tagStr.slice(18);\n } else {\n tagStr = '!<' + tagStr + '>';\n }\n\n state.dump = tagStr + ' ' + state.dump;\n }\n }\n\n return true;\n}\n\nfunction getDuplicateReferences(object, state) {\n var objects = [],\n duplicatesIndexes = [],\n index,\n length;\n\n inspectNode(object, objects, duplicatesIndexes);\n\n for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n state.duplicates.push(objects[duplicatesIndexes[index]]);\n }\n state.usedDuplicates = new Array(length);\n}\n\nfunction inspectNode(object, objects, duplicatesIndexes) {\n var objectKeyList,\n index,\n length;\n\n if (object !== null && typeof object === 'object') {\n index = objects.indexOf(object);\n if (index !== -1) {\n if (duplicatesIndexes.indexOf(index) === -1) {\n duplicatesIndexes.push(index);\n }\n } else {\n objects.push(object);\n\n if (Array.isArray(object)) {\n for (index = 0, length = object.length; index < length; index += 1) {\n inspectNode(object[index], objects, duplicatesIndexes);\n }\n } else {\n objectKeyList = Object.keys(object);\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n }\n }\n }\n }\n}\n\nfunction dump$1(input, options) {\n options = options || {};\n\n var state = new State(options);\n\n if (!state.noRefs) getDuplicateReferences(input, state);\n\n var value = input;\n\n if (state.replacer) {\n value = state.replacer.call({ '': value }, '', value);\n }\n\n if (writeNode(state, 0, value, true, true)) return state.dump + '\\n';\n\n return '';\n}\n\nvar dump_1 = dump$1;\n\nvar dumper = {\n\tdump: dump_1\n};\n\nfunction renamed(from, to) {\n return function () {\n throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' +\n 'Use yaml.' + to + ' instead, which is now safe by default.');\n };\n}\n\n\nvar Type = type;\nvar Schema = schema;\nvar FAILSAFE_SCHEMA = failsafe;\nvar JSON_SCHEMA = json;\nvar CORE_SCHEMA = core;\nvar DEFAULT_SCHEMA = _default;\nvar load = loader.load;\nvar loadAll = loader.loadAll;\nvar dump = dumper.dump;\nvar YAMLException = exception;\n\n// Re-export all types in case user wants to create custom schema\nvar types = {\n binary: binary,\n float: float,\n map: map,\n null: _null,\n pairs: pairs,\n set: set,\n timestamp: timestamp,\n bool: bool,\n int: int,\n merge: merge,\n omap: omap,\n seq: seq,\n str: str\n};\n\n// Removed functions from JS-YAML 3.0.x\nvar safeLoad = renamed('safeLoad', 'load');\nvar safeLoadAll = renamed('safeLoadAll', 'loadAll');\nvar safeDump = renamed('safeDump', 'dump');\n\nvar jsYaml = {\n\tType: Type,\n\tSchema: Schema,\n\tFAILSAFE_SCHEMA: FAILSAFE_SCHEMA,\n\tJSON_SCHEMA: JSON_SCHEMA,\n\tCORE_SCHEMA: CORE_SCHEMA,\n\tDEFAULT_SCHEMA: DEFAULT_SCHEMA,\n\tload: load,\n\tloadAll: loadAll,\n\tdump: dump,\n\tYAMLException: YAMLException,\n\ttypes: types,\n\tsafeLoad: safeLoad,\n\tsafeLoadAll: safeLoadAll,\n\tsafeDump: safeDump\n};\n\nexport { CORE_SCHEMA, DEFAULT_SCHEMA, FAILSAFE_SCHEMA, JSON_SCHEMA, Schema, Type, YAMLException, jsYaml as default, dump, load, loadAll, safeDump, safeLoad, safeLoadAll, types };\n", null, null, null, null, null, null, null, null, "export {};\n//# sourceMappingURL=types.js.map", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "import * as tty from \"tty\"\n\nconst env = process.env\n\nconst isDisabled = \"NO_COLOR\" in env\nconst isForced = \"FORCE_COLOR\" in env\nconst isWindows = process.platform === \"win32\"\n\nconst isCompatibleTerminal =\n tty && tty.isatty(1) && env.TERM && env.TERM !== \"dumb\"\n\nconst isCI =\n \"CI\" in env &&\n (\"GITHUB_ACTIONS\" in env || \"GITLAB_CI\" in env || \"CIRCLECI\" in env)\n\nlet enabled =\n !isDisabled && (isForced || isWindows || isCompatibleTerminal || isCI)\n\nconst raw = (open, close, searchRegex, replaceValue) => (s) =>\n enabled\n ? open +\n (~(s += \"\").indexOf(close, 4) // skip opening \\x1b[\n ? s.replace(searchRegex, replaceValue)\n : s) +\n close\n : s\n\nconst init = (open, close) => {\n return raw(\n `\\x1b[${open}m`,\n `\\x1b[${close}m`,\n new RegExp(`\\\\x1b\\\\[${close}m`, \"g\"),\n `\\x1b[${open}m`\n )\n}\n\nexport const options = Object.defineProperty({}, \"enabled\", {\n get: () => enabled,\n set: (value) => (enabled = value),\n})\n\nexport const reset = init(0, 0)\nexport const bold = raw(\"\\x1b[1m\", \"\\x1b[22m\", /\\x1b\\[22m/g, \"\\x1b[22m\\x1b[1m\")\nexport const dim = raw(\"\\x1b[2m\", \"\\x1b[22m\", /\\x1b\\[22m/g, \"\\x1b[22m\\x1b[2m\")\nexport const italic = init(3, 23)\nexport const underline = init(4, 24)\nexport const inverse = init(7, 27)\nexport const hidden = init(8, 28)\nexport const strikethrough = init(9, 29)\nexport const black = init(30, 39)\nexport const red = init(31, 39)\nexport const green = init(32, 39)\nexport const yellow = init(33, 39)\nexport const blue = init(34, 39)\nexport const magenta = init(35, 39)\nexport const cyan = init(36, 39)\nexport const white = init(37, 39)\nexport const gray = init(90, 39)\nexport const bgBlack = init(40, 49)\nexport const bgRed = init(41, 49)\nexport const bgGreen = init(42, 49)\nexport const bgYellow = init(43, 49)\nexport const bgBlue = init(44, 49)\nexport const bgMagenta = init(45, 49)\nexport const bgCyan = init(46, 49)\nexport const bgWhite = init(47, 49)\nexport const blackBright = init(90, 39)\nexport const redBright = init(91, 39)\nexport const greenBright = init(92, 39)\nexport const yellowBright = init(93, 39)\nexport const blueBright = init(94, 39)\nexport const magentaBright = init(95, 39)\nexport const cyanBright = init(96, 39)\nexport const whiteBright = init(97, 39)\nexport const bgBlackBright = init(100, 49)\nexport const bgRedBright = init(101, 49)\nexport const bgGreenBright = init(102, 49)\nexport const bgYellowBright = init(103, 49)\nexport const bgBlueBright = init(104, 49)\nexport const bgMagentaBright = init(105, 49)\nexport const bgCyanBright = init(106, 49)\nexport const bgWhiteBright = init(107, 49)\n", null, null, null, null, "'use strict';\nmodule.exports = (function()\n{\n function _min(d0, d1, d2, bx, ay)\n {\n return d0 < d1 || d2 < d1\n ? d0 > d2\n ? d2 + 1\n : d0 + 1\n : bx === ay\n ? d1\n : d1 + 1;\n }\n\n return function(a, b)\n {\n if (a === b) {\n return 0;\n }\n\n if (a.length > b.length) {\n var tmp = a;\n a = b;\n b = tmp;\n }\n\n var la = a.length;\n var lb = b.length;\n\n while (la > 0 && (a.charCodeAt(la - 1) === b.charCodeAt(lb - 1))) {\n la--;\n lb--;\n }\n\n var offset = 0;\n\n while (offset < la && (a.charCodeAt(offset) === b.charCodeAt(offset))) {\n offset++;\n }\n\n la -= offset;\n lb -= offset;\n\n if (la === 0 || lb < 3) {\n return lb;\n }\n\n var x = 0;\n var y;\n var d0;\n var d1;\n var d2;\n var d3;\n var dd;\n var dy;\n var ay;\n var bx0;\n var bx1;\n var bx2;\n var bx3;\n\n var vector = [];\n\n for (y = 0; y < la; y++) {\n vector.push(y + 1);\n vector.push(a.charCodeAt(offset + y));\n }\n\n var len = vector.length - 1;\n\n for (; x < lb - 3;) {\n bx0 = b.charCodeAt(offset + (d0 = x));\n bx1 = b.charCodeAt(offset + (d1 = x + 1));\n bx2 = b.charCodeAt(offset + (d2 = x + 2));\n bx3 = b.charCodeAt(offset + (d3 = x + 3));\n dd = (x += 4);\n for (y = 0; y < len; y += 2) {\n dy = vector[y];\n ay = vector[y + 1];\n d0 = _min(dy, d0, d1, bx0, ay);\n d1 = _min(d0, d1, d2, bx1, ay);\n d2 = _min(d1, d2, d3, bx2, ay);\n dd = _min(d2, d3, dd, bx3, ay);\n vector[y] = dd;\n d3 = d2;\n d2 = d1;\n d1 = d0;\n d0 = dy;\n }\n }\n\n for (; x < lb;) {\n bx0 = b.charCodeAt(offset + (d0 = x));\n dd = ++x;\n for (y = 0; y < len; y += 2) {\n dy = vector[y];\n vector[y] = dd = _min(dy, d0, dd, bx0, vector[y + 1]);\n d0 = dy;\n }\n }\n\n return dd;\n };\n})();\n\n", "import type {\n CodeKeywordDefinition,\n ErrorObject,\n KeywordErrorDefinition,\n KeywordErrorCxt,\n} from \"../../../types\"\nimport type {KeywordCxt} from \"../../../compile/validate\"\nimport {_, str, operators, Code} from \"../../../compile/codegen\"\n\nconst ops = operators\n\nexport type LimitKwd = \"maximum\" | \"minimum\"\n\nexport type ExclusiveLimitKwd = \"exclusiveMaximum\" | \"exclusiveMinimum\"\n\ntype Comparison = \"<=\" | \">=\" | \"<\" | \">\"\n\ninterface KwdOp {\n okStr: Comparison\n ok: Code\n fail: Code\n}\n\ninterface KwdDef {\n exclusive: ExclusiveLimitKwd\n ops: [KwdOp, KwdOp]\n}\n\nconst KWDs: {[K in LimitKwd]: KwdDef} = {\n maximum: {\n exclusive: \"exclusiveMaximum\",\n ops: [\n {okStr: \"<=\", ok: ops.LTE, fail: ops.GT},\n {okStr: \"<\", ok: ops.LT, fail: ops.GTE},\n ],\n },\n minimum: {\n exclusive: \"exclusiveMinimum\",\n ops: [\n {okStr: \">=\", ok: ops.GTE, fail: ops.LT},\n {okStr: \">\", ok: ops.GT, fail: ops.LTE},\n ],\n },\n}\n\nexport type LimitNumberError = ErrorObject<\n LimitKwd,\n {limit: number; comparison: Comparison},\n number | {$data: string}\n>\n\nconst error: KeywordErrorDefinition = {\n message: (cxt) => str`must be ${kwdOp(cxt).okStr} ${cxt.schemaCode}`,\n params: (cxt) => _`{comparison: ${kwdOp(cxt).okStr}, limit: ${cxt.schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: Object.keys(KWDs),\n type: \"number\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {data, schemaCode} = cxt\n cxt.fail$data(_`${data} ${kwdOp(cxt).fail} ${schemaCode} || isNaN(${data})`)\n },\n}\n\nfunction kwdOp(cxt: KeywordErrorCxt): KwdOp {\n const keyword = cxt.keyword as LimitKwd\n const opsIdx = cxt.parentSchema?.[KWDs[keyword].exclusive] ? 1 : 0\n return KWDs[keyword].ops[opsIdx]\n}\n\nexport default def\n", "import type {\n CodeKeywordDefinition,\n // ErrorObject,\n // KeywordErrorDefinition,\n} from \"../../../types\"\nimport type {KeywordCxt} from \"../../../compile/validate\"\nimport {LimitKwd, ExclusiveLimitKwd} from \"./limitNumber\"\n\nconst KWDs: {[K in ExclusiveLimitKwd]: LimitKwd} = {\n exclusiveMaximum: \"maximum\",\n exclusiveMinimum: \"minimum\",\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: Object.keys(KWDs),\n type: \"number\",\n schemaType: \"boolean\",\n code({keyword, parentSchema}: KeywordCxt) {\n const limitKwd = KWDs[keyword as ExclusiveLimitKwd]\n if (parentSchema[limitKwd] === undefined) {\n throw new Error(`${keyword} can only be used with ${limitKwd}`)\n }\n },\n}\n\nexport default def\n", "import {Vocabulary} from \"../types\"\nimport refKeyword from \"./core/ref\"\nimport getApplicatorVocabulary from \"./applicator\"\nimport unevaluatedVocabulary from \"./unevaluated\"\nimport formatVocabulary from \"./format\"\nimport validationVocabulary from \"./validation\"\nimport limitNumber from \"./validation/draft04/limitNumber\"\nimport limitNumberExclusive from \"./validation/draft04/limitNumberExclusive\"\n\nconst metadataVocabulary: Vocabulary = [\"title\", \"description\", \"default\"]\n\nconst coreVocabulary: Vocabulary = [\n \"$schema\",\n \"id\",\n \"$defs\",\n {keyword: \"$comment\"},\n \"definitions\",\n refKeyword,\n]\n\nconst validation: Vocabulary = [...validationVocabulary.slice(1), limitNumber, limitNumberExclusive]\n\nconst draft4Vocabularies: Vocabulary[] = [\n coreVocabulary,\n validation,\n getApplicatorVocabulary(),\n formatVocabulary,\n metadataVocabulary,\n unevaluatedVocabulary,\n]\n\nexport default draft4Vocabularies\n", "{\n \"id\": \"http://json-schema.org/draft-04/schema#\",\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"description\": \"Core schema meta-schema\",\n \"definitions\": {\n \"schemaArray\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\"$ref\": \"#\"}\n },\n \"positiveInteger\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"positiveIntegerDefault0\": {\n \"allOf\": [{\"$ref\": \"#/definitions/positiveInteger\"}, {\"default\": 0}]\n },\n \"simpleTypes\": {\n \"enum\": [\"array\", \"boolean\", \"integer\", \"null\", \"number\", \"object\", \"string\"]\n },\n \"stringArray\": {\n \"type\": \"array\",\n \"items\": {\"type\": \"string\"},\n \"minItems\": 1,\n \"uniqueItems\": true\n }\n },\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n },\n \"$schema\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"default\": {},\n \"multipleOf\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"exclusiveMinimum\": true\n },\n \"maximum\": {\n \"type\": \"number\"\n },\n \"exclusiveMaximum\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"minimum\": {\n \"type\": \"number\"\n },\n \"exclusiveMinimum\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"maxLength\": {\"$ref\": \"#/definitions/positiveInteger\"},\n \"minLength\": {\"$ref\": \"#/definitions/positiveIntegerDefault0\"},\n \"pattern\": {\n \"type\": \"string\",\n \"format\": \"regex\"\n },\n \"additionalItems\": {\n \"anyOf\": [{\"type\": \"boolean\"}, {\"$ref\": \"#\"}],\n \"default\": {}\n },\n \"items\": {\n \"anyOf\": [{\"$ref\": \"#\"}, {\"$ref\": \"#/definitions/schemaArray\"}],\n \"default\": {}\n },\n \"maxItems\": {\"$ref\": \"#/definitions/positiveInteger\"},\n \"minItems\": {\"$ref\": \"#/definitions/positiveIntegerDefault0\"},\n \"uniqueItems\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"maxProperties\": {\"$ref\": \"#/definitions/positiveInteger\"},\n \"minProperties\": {\"$ref\": \"#/definitions/positiveIntegerDefault0\"},\n \"required\": {\"$ref\": \"#/definitions/stringArray\"},\n \"additionalProperties\": {\n \"anyOf\": [{\"type\": \"boolean\"}, {\"$ref\": \"#\"}],\n \"default\": {}\n },\n \"definitions\": {\n \"type\": \"object\",\n \"additionalProperties\": {\"$ref\": \"#\"},\n \"default\": {}\n },\n \"properties\": {\n \"type\": \"object\",\n \"additionalProperties\": {\"$ref\": \"#\"},\n \"default\": {}\n },\n \"patternProperties\": {\n \"type\": \"object\",\n \"additionalProperties\": {\"$ref\": \"#\"},\n \"default\": {}\n },\n \"dependencies\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"anyOf\": [{\"$ref\": \"#\"}, {\"$ref\": \"#/definitions/stringArray\"}]\n }\n },\n \"enum\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true\n },\n \"type\": {\n \"anyOf\": [\n {\"$ref\": \"#/definitions/simpleTypes\"},\n {\n \"type\": \"array\",\n \"items\": {\"$ref\": \"#/definitions/simpleTypes\"},\n \"minItems\": 1,\n \"uniqueItems\": true\n }\n ]\n },\n \"allOf\": {\"$ref\": \"#/definitions/schemaArray\"},\n \"anyOf\": {\"$ref\": \"#/definitions/schemaArray\"},\n \"oneOf\": {\"$ref\": \"#/definitions/schemaArray\"},\n \"not\": {\"$ref\": \"#\"}\n },\n \"dependencies\": {\n \"exclusiveMaximum\": [\"maximum\"],\n \"exclusiveMinimum\": [\"minimum\"]\n },\n \"default\": {}\n}\n", "import type {AnySchemaObject, Options} from \"./core\"\nimport AjvCore from \"./core\"\nimport draft4Vocabularies from \"./vocabularies/draft4\"\nimport discriminator from \"./vocabularies/discriminator\"\nimport * as draft4MetaSchema from \"./refs/json-schema-draft-04.json\"\n\nconst META_SUPPORT_DATA = [\"/properties\"]\n\nconst META_SCHEMA_ID = \"http://json-schema.org/draft-04/schema\"\n\nexport class Ajv extends AjvCore {\n constructor(opts: Options = {}) {\n super({\n ...opts,\n schemaId: \"id\",\n dynamicRef: true,\n unevaluated: true,\n })\n }\n\n _addVocabularies(): void {\n super._addVocabularies()\n draft4Vocabularies.forEach((v) => this.addVocabulary(v))\n if (this.opts.discriminator) this.addKeyword(discriminator)\n }\n\n _addDefaultMetaSchema(): void {\n super._addDefaultMetaSchema()\n if (!this.opts.meta) return\n const metaSchema = this.opts.$data\n ? this.$dataMetaSchema(draft4MetaSchema, META_SUPPORT_DATA)\n : draft4MetaSchema\n this.addMetaSchema(metaSchema, META_SCHEMA_ID, false)\n this.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID\n }\n\n defaultMeta(): string | AnySchemaObject | undefined {\n return (this.opts.defaultMeta =\n super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined))\n }\n}\n\nmodule.exports = exports = Ajv\nObject.defineProperty(exports, \"__esModule\", {value: true})\n\nexport default Ajv\n\nexport {\n Format,\n FormatDefinition,\n AsyncFormatDefinition,\n KeywordDefinition,\n KeywordErrorDefinition,\n CodeKeywordDefinition,\n MacroKeywordDefinition,\n FuncKeywordDefinition,\n Vocabulary,\n Schema,\n SchemaObject,\n AnySchemaObject,\n AsyncSchema,\n AnySchema,\n ValidateFunction,\n AsyncValidateFunction,\n SchemaValidateFunction,\n ErrorObject,\n ErrorNoParams,\n Context,\n} from \"./types\"\n\nexport {Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions} from \"./core\"\nexport {SchemaCxt, SchemaObjCxt} from \"./compile\"\nexport {KeywordCxt} from \"./compile/validate\"\nexport {DefinedError} from \"./vocabularies/errors\"\nexport {JSONType} from \"./compile/rules\"\nexport {JSONSchemaType} from \"./types/json-schema\"\nexport {_, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions} from \"./compile/codegen\"\nexport {default as ValidationError} from \"./runtime/validation_error\"\nexport {default as MissingRefError} from \"./compile/ref_error\"\n", "import type {Format, FormatDefinition} from \"ajv\"\nimport type {FormatValidator, FormatCompare} from \"ajv/dist/types\"\n\nexport type FormatMode = \"fast\" | \"full\"\n\nexport type FormatName =\n | \"date\"\n | \"time\"\n | \"date-time\"\n | \"iso-time\"\n | \"iso-date-time\"\n | \"duration\"\n | \"uri\"\n | \"uri-reference\"\n | \"uri-template\"\n | \"url\"\n | \"email\"\n | \"hostname\"\n | \"ipv4\"\n | \"ipv6\"\n | \"regex\"\n | \"uuid\"\n | \"json-pointer\"\n | \"json-pointer-uri-fragment\"\n | \"relative-json-pointer\"\n | \"byte\"\n | \"int32\"\n | \"int64\"\n | \"float\"\n | \"double\"\n | \"password\"\n | \"binary\"\n\nexport type DefinedFormats = {\n [key in FormatName]: Format\n}\n\nfunction fmtDef(\n validate: RegExp | FormatValidator,\n compare: FormatCompare\n): FormatDefinition {\n return {validate, compare}\n}\n\nexport const fullFormats: DefinedFormats = {\n // date: http://tools.ietf.org/html/rfc3339#section-5.6\n date: fmtDef(date, compareDate),\n // date-time: http://tools.ietf.org/html/rfc3339#section-5.6\n time: fmtDef(getTime(true), compareTime),\n \"date-time\": fmtDef(getDateTime(true), compareDateTime),\n \"iso-time\": fmtDef(getTime(), compareIsoTime),\n \"iso-date-time\": fmtDef(getDateTime(), compareIsoDateTime),\n // duration: https://tools.ietf.org/html/rfc3339#appendix-A\n duration: /^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$/,\n uri,\n \"uri-reference\":\n /^(?:[a-z][a-z0-9+\\-.]*:)?(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'\"()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[a-z0-9\\-._~!$&'\"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'\"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,\n // uri-template: https://tools.ietf.org/html/rfc6570\n \"uri-template\":\n /^(?:(?:[^\\x00-\\x20\"'<>%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i,\n // For the source: https://gist.github.com/dperini/729294\n // For test cases: https://mathiasbynens.be/demo/url-regex\n url: /^(?:https?|ftp):\\/\\/(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)(?:\\.(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu,\n email:\n /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,\n hostname:\n /^(?=.{1,253}\\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\\.?$/i,\n // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html\n ipv4: /^(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)$/,\n ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))$/i,\n regex,\n // uuid: http://tools.ietf.org/html/rfc4122\n uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,\n // JSON-pointer: https://tools.ietf.org/html/rfc6901\n // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A\n \"json-pointer\": /^(?:\\/(?:[^~/]|~0|~1)*)*$/,\n \"json-pointer-uri-fragment\": /^#(?:\\/(?:[a-z0-9_\\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,\n // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00\n \"relative-json-pointer\": /^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,\n // the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types\n // byte: https://github.com/miguelmota/is-base64\n byte,\n // signed 32 bit integer\n int32: {type: \"number\", validate: validateInt32},\n // signed 64 bit integer\n int64: {type: \"number\", validate: validateInt64},\n // C-type float\n float: {type: \"number\", validate: validateNumber},\n // C-type double\n double: {type: \"number\", validate: validateNumber},\n // hint to the UI to hide input strings\n password: true,\n // unchecked string payload\n binary: true,\n}\n\nexport const fastFormats: DefinedFormats = {\n ...fullFormats,\n date: fmtDef(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d$/, compareDate),\n time: fmtDef(\n /^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i,\n compareTime\n ),\n \"date-time\": fmtDef(\n /^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\dt(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i,\n compareDateTime\n ),\n \"iso-time\": fmtDef(\n /^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,\n compareIsoTime\n ),\n \"iso-date-time\": fmtDef(\n /^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d[t\\s](?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,\n compareIsoDateTime\n ),\n // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js\n uri: /^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/)?[^\\s]*$/i,\n \"uri-reference\": /^(?:(?:[a-z][a-z0-9+\\-.]*:)?\\/?\\/)?(?:[^\\\\\\s#][^\\s#]*)?(?:#[^\\\\\\s]*)?$/i,\n // email (sources from jsen validator):\n // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363\n // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')\n email:\n /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,\n}\n\nexport const formatNames = Object.keys(fullFormats) as FormatName[]\n\nfunction isLeapYear(year: number): boolean {\n // https://tools.ietf.org/html/rfc3339#appendix-C\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0)\n}\n\nconst DATE = /^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/\nconst DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]\n\nfunction date(str: string): boolean {\n // full-date from http://tools.ietf.org/html/rfc3339#section-5.6\n const matches: string[] | null = DATE.exec(str)\n if (!matches) return false\n const year: number = +matches[1]\n const month: number = +matches[2]\n const day: number = +matches[3]\n return (\n month >= 1 &&\n month <= 12 &&\n day >= 1 &&\n day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month])\n )\n}\n\nfunction compareDate(d1: string, d2: string): number | undefined {\n if (!(d1 && d2)) return undefined\n if (d1 > d2) return 1\n if (d1 < d2) return -1\n return 0\n}\n\nconst TIME = /^(\\d\\d):(\\d\\d):(\\d\\d(?:\\.\\d+)?)(z|([+-])(\\d\\d)(?::?(\\d\\d))?)?$/i\n\nfunction getTime(strictTimeZone?: boolean): (str: string) => boolean {\n return function time(str: string): boolean {\n const matches: string[] | null = TIME.exec(str)\n if (!matches) return false\n const hr: number = +matches[1]\n const min: number = +matches[2]\n const sec: number = +matches[3]\n const tz: string | undefined = matches[4]\n const tzSign: number = matches[5] === \"-\" ? -1 : 1\n const tzH: number = +(matches[6] || 0)\n const tzM: number = +(matches[7] || 0)\n if (tzH > 23 || tzM > 59 || (strictTimeZone && !tz)) return false\n if (hr <= 23 && min <= 59 && sec < 60) return true\n // leap second\n const utcMin = min - tzM * tzSign\n const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0)\n return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61\n }\n}\n\nfunction compareTime(s1: string, s2: string): number | undefined {\n if (!(s1 && s2)) return undefined\n const t1 = new Date(\"2020-01-01T\" + s1).valueOf()\n const t2 = new Date(\"2020-01-01T\" + s2).valueOf()\n if (!(t1 && t2)) return undefined\n return t1 - t2\n}\n\nfunction compareIsoTime(t1: string, t2: string): number | undefined {\n if (!(t1 && t2)) return undefined\n const a1 = TIME.exec(t1)\n const a2 = TIME.exec(t2)\n if (!(a1 && a2)) return undefined\n t1 = a1[1] + a1[2] + a1[3]\n t2 = a2[1] + a2[2] + a2[3]\n if (t1 > t2) return 1\n if (t1 < t2) return -1\n return 0\n}\n\nconst DATE_TIME_SEPARATOR = /t|\\s/i\nfunction getDateTime(strictTimeZone?: boolean): (str: string) => boolean {\n const time = getTime(strictTimeZone)\n\n return function date_time(str: string): boolean {\n // http://tools.ietf.org/html/rfc3339#section-5.6\n const dateTime: string[] = str.split(DATE_TIME_SEPARATOR)\n return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1])\n }\n}\n\nfunction compareDateTime(dt1: string, dt2: string): number | undefined {\n if (!(dt1 && dt2)) return undefined\n const d1 = new Date(dt1).valueOf()\n const d2 = new Date(dt2).valueOf()\n if (!(d1 && d2)) return undefined\n return d1 - d2\n}\n\nfunction compareIsoDateTime(dt1: string, dt2: string): number | undefined {\n if (!(dt1 && dt2)) return undefined\n const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR)\n const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR)\n const res = compareDate(d1, d2)\n if (res === undefined) return undefined\n return res || compareTime(t1, t2)\n}\n\nconst NOT_URI_FRAGMENT = /\\/|:/\nconst URI =\n /^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i\n\nfunction uri(str: string): boolean {\n // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required \".\"\n return NOT_URI_FRAGMENT.test(str) && URI.test(str)\n}\n\nconst BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm\n\nfunction byte(str: string): boolean {\n BYTE.lastIndex = 0\n return BYTE.test(str)\n}\n\nconst MIN_INT32 = -(2 ** 31)\nconst MAX_INT32 = 2 ** 31 - 1\n\nfunction validateInt32(value: number): boolean {\n return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32\n}\n\nfunction validateInt64(value: number): boolean {\n // JSON and javascript max Int is 2**53, so any int that passes isInteger is valid for Int64\n return Number.isInteger(value)\n}\n\nfunction validateNumber(): boolean {\n return true\n}\n\nconst Z_ANCHOR = /[^\\\\]\\\\Z/\nfunction regex(str: string): boolean {\n if (Z_ANCHOR.test(str)) return false\n try {\n new RegExp(str)\n return true\n } catch (e) {\n return false\n }\n}\n", "// eslint-disable-next-line @typescript-eslint/no-extraneous-class\nexport abstract class _CodeOrName {\n abstract readonly str: string\n abstract readonly names: UsedNames\n abstract toString(): string\n abstract emptyStr(): boolean\n}\n\nexport const IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i\n\nexport class Name extends _CodeOrName {\n readonly str: string\n constructor(s: string) {\n super()\n if (!IDENTIFIER.test(s)) throw new Error(\"CodeGen: name must be a valid identifier\")\n this.str = s\n }\n\n toString(): string {\n return this.str\n }\n\n emptyStr(): boolean {\n return false\n }\n\n get names(): UsedNames {\n return {[this.str]: 1}\n }\n}\n\nexport class _Code extends _CodeOrName {\n readonly _items: readonly CodeItem[]\n private _str?: string\n private _names?: UsedNames\n\n constructor(code: string | readonly CodeItem[]) {\n super()\n this._items = typeof code === \"string\" ? [code] : code\n }\n\n toString(): string {\n return this.str\n }\n\n emptyStr(): boolean {\n if (this._items.length > 1) return false\n const item = this._items[0]\n return item === \"\" || item === '\"\"'\n }\n\n get str(): string {\n return (this._str ??= this._items.reduce((s: string, c: CodeItem) => `${s}${c}`, \"\"))\n }\n\n get names(): UsedNames {\n return (this._names ??= this._items.reduce((names: UsedNames, c) => {\n if (c instanceof Name) names[c.str] = (names[c.str] || 0) + 1\n return names\n }, {}))\n }\n}\n\nexport type CodeItem = Name | string | number | boolean | null\n\nexport type UsedNames = Record\n\nexport type Code = _Code | Name\n\nexport type SafeExpr = Code | number | boolean | null\n\nexport const nil = new _Code(\"\")\n\ntype CodeArg = SafeExpr | string | undefined\n\nexport function _(strs: TemplateStringsArray, ...args: CodeArg[]): _Code {\n const code: CodeItem[] = [strs[0]]\n let i = 0\n while (i < args.length) {\n addCodeArg(code, args[i])\n code.push(strs[++i])\n }\n return new _Code(code)\n}\n\nconst plus = new _Code(\"+\")\n\nexport function str(strs: TemplateStringsArray, ...args: (CodeArg | string[])[]): _Code {\n const expr: CodeItem[] = [safeStringify(strs[0])]\n let i = 0\n while (i < args.length) {\n expr.push(plus)\n addCodeArg(expr, args[i])\n expr.push(plus, safeStringify(strs[++i]))\n }\n optimize(expr)\n return new _Code(expr)\n}\n\nexport function addCodeArg(code: CodeItem[], arg: CodeArg | string[]): void {\n if (arg instanceof _Code) code.push(...arg._items)\n else if (arg instanceof Name) code.push(arg)\n else code.push(interpolate(arg))\n}\n\nfunction optimize(expr: CodeItem[]): void {\n let i = 1\n while (i < expr.length - 1) {\n if (expr[i] === plus) {\n const res = mergeExprItems(expr[i - 1], expr[i + 1])\n if (res !== undefined) {\n expr.splice(i - 1, 3, res)\n continue\n }\n expr[i++] = \"+\"\n }\n i++\n }\n}\n\nfunction mergeExprItems(a: CodeItem, b: CodeItem): CodeItem | undefined {\n if (b === '\"\"') return a\n if (a === '\"\"') return b\n if (typeof a == \"string\") {\n if (b instanceof Name || a[a.length - 1] !== '\"') return\n if (typeof b != \"string\") return `${a.slice(0, -1)}${b}\"`\n if (b[0] === '\"') return a.slice(0, -1) + b.slice(1)\n return\n }\n if (typeof b == \"string\" && b[0] === '\"' && !(a instanceof Name)) return `\"${a}${b.slice(1)}`\n return\n}\n\nexport function strConcat(c1: Code, c2: Code): Code {\n return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`\n}\n\n// TODO do not allow arrays here\nfunction interpolate(x?: string | string[] | number | boolean | null): SafeExpr | string {\n return typeof x == \"number\" || typeof x == \"boolean\" || x === null\n ? x\n : safeStringify(Array.isArray(x) ? x.join(\",\") : x)\n}\n\nexport function stringify(x: unknown): Code {\n return new _Code(safeStringify(x))\n}\n\nexport function safeStringify(x: unknown): string {\n return JSON.stringify(x)\n .replace(/\\u2028/g, \"\\\\u2028\")\n .replace(/\\u2029/g, \"\\\\u2029\")\n}\n\nexport function getProperty(key: Code | string | number): Code {\n return typeof key == \"string\" && IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`\n}\n\n//Does best effort to format the name properly\nexport function getEsmExportName(key: Code | string | number): Code {\n if (typeof key == \"string\" && IDENTIFIER.test(key)) {\n return new _Code(`${key}`)\n }\n throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`)\n}\n\nexport function regexpCode(rx: RegExp): Code {\n return new _Code(rx.toString())\n}\n", "import {_, nil, Code, Name} from \"./code\"\n\ninterface NameGroup {\n prefix: string\n index: number\n}\n\nexport interface NameValue {\n ref: ValueReference // this is the reference to any value that can be referred to from generated code via `globals` var in the closure\n key?: unknown // any key to identify a global to avoid duplicates, if not passed ref is used\n code?: Code // this is the code creating the value needed for standalone code wit_out closure - can be a primitive value, function or import (`require`)\n}\n\nexport type ValueReference = unknown // possibly make CodeGen parameterized type on this type\n\nclass ValueError extends Error {\n readonly value?: NameValue\n constructor(name: ValueScopeName) {\n super(`CodeGen: \"code\" for ${name} not defined`)\n this.value = name.value\n }\n}\n\ninterface ScopeOptions {\n prefixes?: Set\n parent?: Scope\n}\n\ninterface ValueScopeOptions extends ScopeOptions {\n scope: ScopeStore\n es5?: boolean\n lines?: boolean\n}\n\nexport type ScopeStore = Record\n\ntype ScopeValues = {\n [Prefix in string]?: Map\n}\n\nexport type ScopeValueSets = {\n [Prefix in string]?: Set\n}\n\nexport enum UsedValueState {\n Started,\n Completed,\n}\n\nexport type UsedScopeValues = {\n [Prefix in string]?: Map\n}\n\nexport const varKinds = {\n const: new Name(\"const\"),\n let: new Name(\"let\"),\n var: new Name(\"var\"),\n}\n\nexport class Scope {\n protected readonly _names: {[Prefix in string]?: NameGroup} = {}\n protected readonly _prefixes?: Set\n protected readonly _parent?: Scope\n\n constructor({prefixes, parent}: ScopeOptions = {}) {\n this._prefixes = prefixes\n this._parent = parent\n }\n\n toName(nameOrPrefix: Name | string): Name {\n return nameOrPrefix instanceof Name ? nameOrPrefix : this.name(nameOrPrefix)\n }\n\n name(prefix: string): Name {\n return new Name(this._newName(prefix))\n }\n\n protected _newName(prefix: string): string {\n const ng = this._names[prefix] || this._nameGroup(prefix)\n return `${prefix}${ng.index++}`\n }\n\n private _nameGroup(prefix: string): NameGroup {\n if (this._parent?._prefixes?.has(prefix) || (this._prefixes && !this._prefixes.has(prefix))) {\n throw new Error(`CodeGen: prefix \"${prefix}\" is not allowed in this scope`)\n }\n return (this._names[prefix] = {prefix, index: 0})\n }\n}\n\ninterface ScopePath {\n property: string\n itemIndex: number\n}\n\nexport class ValueScopeName extends Name {\n readonly prefix: string\n value?: NameValue\n scopePath?: Code\n\n constructor(prefix: string, nameStr: string) {\n super(nameStr)\n this.prefix = prefix\n }\n\n setValue(value: NameValue, {property, itemIndex}: ScopePath): void {\n this.value = value\n this.scopePath = _`.${new Name(property)}[${itemIndex}]`\n }\n}\n\ninterface VSOptions extends ValueScopeOptions {\n _n: Code\n}\n\nconst line = _`\\n`\n\nexport class ValueScope extends Scope {\n protected readonly _values: ScopeValues = {}\n protected readonly _scope: ScopeStore\n readonly opts: VSOptions\n\n constructor(opts: ValueScopeOptions) {\n super(opts)\n this._scope = opts.scope\n this.opts = {...opts, _n: opts.lines ? line : nil}\n }\n\n get(): ScopeStore {\n return this._scope\n }\n\n name(prefix: string): ValueScopeName {\n return new ValueScopeName(prefix, this._newName(prefix))\n }\n\n value(nameOrPrefix: ValueScopeName | string, value: NameValue): ValueScopeName {\n if (value.ref === undefined) throw new Error(\"CodeGen: ref must be passed in value\")\n const name = this.toName(nameOrPrefix) as ValueScopeName\n const {prefix} = name\n const valueKey = value.key ?? value.ref\n let vs = this._values[prefix]\n if (vs) {\n const _name = vs.get(valueKey)\n if (_name) return _name\n } else {\n vs = this._values[prefix] = new Map()\n }\n vs.set(valueKey, name)\n\n const s = this._scope[prefix] || (this._scope[prefix] = [])\n const itemIndex = s.length\n s[itemIndex] = value.ref\n name.setValue(value, {property: prefix, itemIndex})\n return name\n }\n\n getValue(prefix: string, keyOrRef: unknown): ValueScopeName | undefined {\n const vs = this._values[prefix]\n if (!vs) return\n return vs.get(keyOrRef)\n }\n\n scopeRefs(scopeName: Name, values: ScopeValues | ScopeValueSets = this._values): Code {\n return this._reduceValues(values, (name: ValueScopeName) => {\n if (name.scopePath === undefined) throw new Error(`CodeGen: name \"${name}\" has no value`)\n return _`${scopeName}${name.scopePath}`\n })\n }\n\n scopeCode(\n values: ScopeValues | ScopeValueSets = this._values,\n usedValues?: UsedScopeValues,\n getCode?: (n: ValueScopeName) => Code | undefined\n ): Code {\n return this._reduceValues(\n values,\n (name: ValueScopeName) => {\n if (name.value === undefined) throw new Error(`CodeGen: name \"${name}\" has no value`)\n return name.value.code\n },\n usedValues,\n getCode\n )\n }\n\n private _reduceValues(\n values: ScopeValues | ScopeValueSets,\n valueCode: (n: ValueScopeName) => Code | undefined,\n usedValues: UsedScopeValues = {},\n getCode?: (n: ValueScopeName) => Code | undefined\n ): Code {\n let code: Code = nil\n for (const prefix in values) {\n const vs = values[prefix]\n if (!vs) continue\n const nameSet = (usedValues[prefix] = usedValues[prefix] || new Map())\n vs.forEach((name: ValueScopeName) => {\n if (nameSet.has(name)) return\n nameSet.set(name, UsedValueState.Started)\n let c = valueCode(name)\n if (c) {\n const def = this.opts.es5 ? varKinds.var : varKinds.const\n code = _`${code}${def} ${name} = ${c};${this.opts._n}`\n } else if ((c = getCode?.(name))) {\n code = _`${code}${c}${this.opts._n}`\n } else {\n throw new ValueError(name)\n }\n nameSet.set(name, UsedValueState.Completed)\n })\n }\n return code\n }\n}\n", "import type {ScopeValueSets, NameValue, ValueScope, ValueScopeName} from \"./scope\"\nimport {_, nil, _Code, Code, Name, UsedNames, CodeItem, addCodeArg, _CodeOrName} from \"./code\"\nimport {Scope, varKinds} from \"./scope\"\n\nexport {_, str, strConcat, nil, getProperty, stringify, regexpCode, Name, Code} from \"./code\"\nexport {Scope, ScopeStore, ValueScope, ValueScopeName, ScopeValueSets, varKinds} from \"./scope\"\n\n// type for expressions that can be safely inserted in code without quotes\nexport type SafeExpr = Code | number | boolean | null\n\n// type that is either Code of function that adds code to CodeGen instance using its methods\nexport type Block = Code | (() => void)\n\nexport const operators = {\n GT: new _Code(\">\"),\n GTE: new _Code(\">=\"),\n LT: new _Code(\"<\"),\n LTE: new _Code(\"<=\"),\n EQ: new _Code(\"===\"),\n NEQ: new _Code(\"!==\"),\n NOT: new _Code(\"!\"),\n OR: new _Code(\"||\"),\n AND: new _Code(\"&&\"),\n ADD: new _Code(\"+\"),\n}\n\nabstract class Node {\n abstract readonly names: UsedNames\n\n optimizeNodes(): this | ChildNode | ChildNode[] | undefined {\n return this\n }\n\n optimizeNames(_names: UsedNames, _constants: Constants): this | undefined {\n return this\n }\n\n // get count(): number {\n // return 1\n // }\n}\n\nclass Def extends Node {\n constructor(\n private readonly varKind: Name,\n private readonly name: Name,\n private rhs?: SafeExpr\n ) {\n super()\n }\n\n render({es5, _n}: CGOptions): string {\n const varKind = es5 ? varKinds.var : this.varKind\n const rhs = this.rhs === undefined ? \"\" : ` = ${this.rhs}`\n return `${varKind} ${this.name}${rhs};` + _n\n }\n\n optimizeNames(names: UsedNames, constants: Constants): this | undefined {\n if (!names[this.name.str]) return\n if (this.rhs) this.rhs = optimizeExpr(this.rhs, names, constants)\n return this\n }\n\n get names(): UsedNames {\n return this.rhs instanceof _CodeOrName ? this.rhs.names : {}\n }\n}\n\nclass Assign extends Node {\n constructor(\n readonly lhs: Code,\n public rhs: SafeExpr,\n private readonly sideEffects?: boolean\n ) {\n super()\n }\n\n render({_n}: CGOptions): string {\n return `${this.lhs} = ${this.rhs};` + _n\n }\n\n optimizeNames(names: UsedNames, constants: Constants): this | undefined {\n if (this.lhs instanceof Name && !names[this.lhs.str] && !this.sideEffects) return\n this.rhs = optimizeExpr(this.rhs, names, constants)\n return this\n }\n\n get names(): UsedNames {\n const names = this.lhs instanceof Name ? {} : {...this.lhs.names}\n return addExprNames(names, this.rhs)\n }\n}\n\nclass AssignOp extends Assign {\n constructor(\n lhs: Code,\n private readonly op: Code,\n rhs: SafeExpr,\n sideEffects?: boolean\n ) {\n super(lhs, rhs, sideEffects)\n }\n\n render({_n}: CGOptions): string {\n return `${this.lhs} ${this.op}= ${this.rhs};` + _n\n }\n}\n\nclass Label extends Node {\n readonly names: UsedNames = {}\n constructor(readonly label: Name) {\n super()\n }\n\n render({_n}: CGOptions): string {\n return `${this.label}:` + _n\n }\n}\n\nclass Break extends Node {\n readonly names: UsedNames = {}\n constructor(readonly label?: Code) {\n super()\n }\n\n render({_n}: CGOptions): string {\n const label = this.label ? ` ${this.label}` : \"\"\n return `break${label};` + _n\n }\n}\n\nclass Throw extends Node {\n constructor(readonly error: Code) {\n super()\n }\n\n render({_n}: CGOptions): string {\n return `throw ${this.error};` + _n\n }\n\n get names(): UsedNames {\n return this.error.names\n }\n}\n\nclass AnyCode extends Node {\n constructor(private code: SafeExpr) {\n super()\n }\n\n render({_n}: CGOptions): string {\n return `${this.code};` + _n\n }\n\n optimizeNodes(): this | undefined {\n return `${this.code}` ? this : undefined\n }\n\n optimizeNames(names: UsedNames, constants: Constants): this {\n this.code = optimizeExpr(this.code, names, constants)\n return this\n }\n\n get names(): UsedNames {\n return this.code instanceof _CodeOrName ? this.code.names : {}\n }\n}\n\nabstract class ParentNode extends Node {\n constructor(readonly nodes: ChildNode[] = []) {\n super()\n }\n\n render(opts: CGOptions): string {\n return this.nodes.reduce((code, n) => code + n.render(opts), \"\")\n }\n\n optimizeNodes(): this | ChildNode | ChildNode[] | undefined {\n const {nodes} = this\n let i = nodes.length\n while (i--) {\n const n = nodes[i].optimizeNodes()\n if (Array.isArray(n)) nodes.splice(i, 1, ...n)\n else if (n) nodes[i] = n\n else nodes.splice(i, 1)\n }\n return nodes.length > 0 ? this : undefined\n }\n\n optimizeNames(names: UsedNames, constants: Constants): this | undefined {\n const {nodes} = this\n let i = nodes.length\n while (i--) {\n // iterating backwards improves 1-pass optimization\n const n = nodes[i]\n if (n.optimizeNames(names, constants)) continue\n subtractNames(names, n.names)\n nodes.splice(i, 1)\n }\n return nodes.length > 0 ? this : undefined\n }\n\n get names(): UsedNames {\n return this.nodes.reduce((names: UsedNames, n) => addNames(names, n.names), {})\n }\n\n // get count(): number {\n // return this.nodes.reduce((c, n) => c + n.count, 1)\n // }\n}\n\nabstract class BlockNode extends ParentNode {\n render(opts: CGOptions): string {\n return \"{\" + opts._n + super.render(opts) + \"}\" + opts._n\n }\n}\n\nclass Root extends ParentNode {}\n\nclass Else extends BlockNode {\n static readonly kind = \"else\"\n}\n\nclass If extends BlockNode {\n static readonly kind = \"if\"\n else?: If | Else\n constructor(\n private condition: Code | boolean,\n nodes?: ChildNode[]\n ) {\n super(nodes)\n }\n\n render(opts: CGOptions): string {\n let code = `if(${this.condition})` + super.render(opts)\n if (this.else) code += \"else \" + this.else.render(opts)\n return code\n }\n\n optimizeNodes(): If | ChildNode[] | undefined {\n super.optimizeNodes()\n const cond = this.condition\n if (cond === true) return this.nodes // else is ignored here\n let e = this.else\n if (e) {\n const ns = e.optimizeNodes()\n e = this.else = Array.isArray(ns) ? new Else(ns) : (ns as Else | undefined)\n }\n if (e) {\n if (cond === false) return e instanceof If ? e : e.nodes\n if (this.nodes.length) return this\n return new If(not(cond), e instanceof If ? [e] : e.nodes)\n }\n if (cond === false || !this.nodes.length) return undefined\n return this\n }\n\n optimizeNames(names: UsedNames, constants: Constants): this | undefined {\n this.else = this.else?.optimizeNames(names, constants)\n if (!(super.optimizeNames(names, constants) || this.else)) return\n this.condition = optimizeExpr(this.condition, names, constants)\n return this\n }\n\n get names(): UsedNames {\n const names = super.names\n addExprNames(names, this.condition)\n if (this.else) addNames(names, this.else.names)\n return names\n }\n\n // get count(): number {\n // return super.count + (this.else?.count || 0)\n // }\n}\n\nabstract class For extends BlockNode {\n static readonly kind = \"for\"\n}\n\nclass ForLoop extends For {\n constructor(private iteration: Code) {\n super()\n }\n\n render(opts: CGOptions): string {\n return `for(${this.iteration})` + super.render(opts)\n }\n\n optimizeNames(names: UsedNames, constants: Constants): this | undefined {\n if (!super.optimizeNames(names, constants)) return\n this.iteration = optimizeExpr(this.iteration, names, constants)\n return this\n }\n\n get names(): UsedNames {\n return addNames(super.names, this.iteration.names)\n }\n}\n\nclass ForRange extends For {\n constructor(\n private readonly varKind: Name,\n private readonly name: Name,\n private readonly from: SafeExpr,\n private readonly to: SafeExpr\n ) {\n super()\n }\n\n render(opts: CGOptions): string {\n const varKind = opts.es5 ? varKinds.var : this.varKind\n const {name, from, to} = this\n return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts)\n }\n\n get names(): UsedNames {\n const names = addExprNames(super.names, this.from)\n return addExprNames(names, this.to)\n }\n}\n\nclass ForIter extends For {\n constructor(\n private readonly loop: \"of\" | \"in\",\n private readonly varKind: Name,\n private readonly name: Name,\n private iterable: Code\n ) {\n super()\n }\n\n render(opts: CGOptions): string {\n return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts)\n }\n\n optimizeNames(names: UsedNames, constants: Constants): this | undefined {\n if (!super.optimizeNames(names, constants)) return\n this.iterable = optimizeExpr(this.iterable, names, constants)\n return this\n }\n\n get names(): UsedNames {\n return addNames(super.names, this.iterable.names)\n }\n}\n\nclass Func extends BlockNode {\n static readonly kind = \"func\"\n constructor(\n public name: Name,\n public args: Code,\n public async?: boolean\n ) {\n super()\n }\n\n render(opts: CGOptions): string {\n const _async = this.async ? \"async \" : \"\"\n return `${_async}function ${this.name}(${this.args})` + super.render(opts)\n }\n}\n\nclass Return extends ParentNode {\n static readonly kind = \"return\"\n\n render(opts: CGOptions): string {\n return \"return \" + super.render(opts)\n }\n}\n\nclass Try extends BlockNode {\n catch?: Catch\n finally?: Finally\n\n render(opts: CGOptions): string {\n let code = \"try\" + super.render(opts)\n if (this.catch) code += this.catch.render(opts)\n if (this.finally) code += this.finally.render(opts)\n return code\n }\n\n optimizeNodes(): this {\n super.optimizeNodes()\n this.catch?.optimizeNodes() as Catch | undefined\n this.finally?.optimizeNodes() as Finally | undefined\n return this\n }\n\n optimizeNames(names: UsedNames, constants: Constants): this {\n super.optimizeNames(names, constants)\n this.catch?.optimizeNames(names, constants)\n this.finally?.optimizeNames(names, constants)\n return this\n }\n\n get names(): UsedNames {\n const names = super.names\n if (this.catch) addNames(names, this.catch.names)\n if (this.finally) addNames(names, this.finally.names)\n return names\n }\n\n // get count(): number {\n // return super.count + (this.catch?.count || 0) + (this.finally?.count || 0)\n // }\n}\n\nclass Catch extends BlockNode {\n static readonly kind = \"catch\"\n constructor(readonly error: Name) {\n super()\n }\n\n render(opts: CGOptions): string {\n return `catch(${this.error})` + super.render(opts)\n }\n}\n\nclass Finally extends BlockNode {\n static readonly kind = \"finally\"\n render(opts: CGOptions): string {\n return \"finally\" + super.render(opts)\n }\n}\n\ntype StartBlockNode = If | For | Func | Return | Try\n\ntype LeafNode = Def | Assign | Label | Break | Throw | AnyCode\n\ntype ChildNode = StartBlockNode | LeafNode\n\ntype EndBlockNodeType =\n | typeof If\n | typeof Else\n | typeof For\n | typeof Func\n | typeof Return\n | typeof Catch\n | typeof Finally\n\ntype Constants = Record\n\nexport interface CodeGenOptions {\n es5?: boolean\n lines?: boolean\n ownProperties?: boolean\n}\n\ninterface CGOptions extends CodeGenOptions {\n _n: \"\\n\" | \"\"\n}\n\nexport class CodeGen {\n readonly _scope: Scope\n readonly _extScope: ValueScope\n readonly _values: ScopeValueSets = {}\n private readonly _nodes: ParentNode[]\n private readonly _blockStarts: number[] = []\n private readonly _constants: Constants = {}\n private readonly opts: CGOptions\n\n constructor(extScope: ValueScope, opts: CodeGenOptions = {}) {\n this.opts = {...opts, _n: opts.lines ? \"\\n\" : \"\"}\n this._extScope = extScope\n this._scope = new Scope({parent: extScope})\n this._nodes = [new Root()]\n }\n\n toString(): string {\n return this._root.render(this.opts)\n }\n\n // returns unique name in the internal scope\n name(prefix: string): Name {\n return this._scope.name(prefix)\n }\n\n // reserves unique name in the external scope\n scopeName(prefix: string): ValueScopeName {\n return this._extScope.name(prefix)\n }\n\n // reserves unique name in the external scope and assigns value to it\n scopeValue(prefixOrName: ValueScopeName | string, value: NameValue): Name {\n const name = this._extScope.value(prefixOrName, value)\n const vs = this._values[name.prefix] || (this._values[name.prefix] = new Set())\n vs.add(name)\n return name\n }\n\n getScopeValue(prefix: string, keyOrRef: unknown): ValueScopeName | undefined {\n return this._extScope.getValue(prefix, keyOrRef)\n }\n\n // return code that assigns values in the external scope to the names that are used internally\n // (same names that were returned by gen.scopeName or gen.scopeValue)\n scopeRefs(scopeName: Name): Code {\n return this._extScope.scopeRefs(scopeName, this._values)\n }\n\n scopeCode(): Code {\n return this._extScope.scopeCode(this._values)\n }\n\n private _def(\n varKind: Name,\n nameOrPrefix: Name | string,\n rhs?: SafeExpr,\n constant?: boolean\n ): Name {\n const name = this._scope.toName(nameOrPrefix)\n if (rhs !== undefined && constant) this._constants[name.str] = rhs\n this._leafNode(new Def(varKind, name, rhs))\n return name\n }\n\n // `const` declaration (`var` in es5 mode)\n const(nameOrPrefix: Name | string, rhs: SafeExpr, _constant?: boolean): Name {\n return this._def(varKinds.const, nameOrPrefix, rhs, _constant)\n }\n\n // `let` declaration with optional assignment (`var` in es5 mode)\n let(nameOrPrefix: Name | string, rhs?: SafeExpr, _constant?: boolean): Name {\n return this._def(varKinds.let, nameOrPrefix, rhs, _constant)\n }\n\n // `var` declaration with optional assignment\n var(nameOrPrefix: Name | string, rhs?: SafeExpr, _constant?: boolean): Name {\n return this._def(varKinds.var, nameOrPrefix, rhs, _constant)\n }\n\n // assignment code\n assign(lhs: Code, rhs: SafeExpr, sideEffects?: boolean): CodeGen {\n return this._leafNode(new Assign(lhs, rhs, sideEffects))\n }\n\n // `+=` code\n add(lhs: Code, rhs: SafeExpr): CodeGen {\n return this._leafNode(new AssignOp(lhs, operators.ADD, rhs))\n }\n\n // appends passed SafeExpr to code or executes Block\n code(c: Block | SafeExpr): CodeGen {\n if (typeof c == \"function\") c()\n else if (c !== nil) this._leafNode(new AnyCode(c))\n return this\n }\n\n // returns code for object literal for the passed argument list of key-value pairs\n object(...keyValues: [Name | string, SafeExpr | string][]): _Code {\n const code: CodeItem[] = [\"{\"]\n for (const [key, value] of keyValues) {\n if (code.length > 1) code.push(\",\")\n code.push(key)\n if (key !== value || this.opts.es5) {\n code.push(\":\")\n addCodeArg(code, value)\n }\n }\n code.push(\"}\")\n return new _Code(code)\n }\n\n // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)\n if(condition: Code | boolean, thenBody?: Block, elseBody?: Block): CodeGen {\n this._blockNode(new If(condition))\n\n if (thenBody && elseBody) {\n this.code(thenBody).else().code(elseBody).endIf()\n } else if (thenBody) {\n this.code(thenBody).endIf()\n } else if (elseBody) {\n throw new Error('CodeGen: \"else\" body without \"then\" body')\n }\n return this\n }\n\n // `else if` clause - invalid without `if` or after `else` clauses\n elseIf(condition: Code | boolean): CodeGen {\n return this._elseNode(new If(condition))\n }\n\n // `else` clause - only valid after `if` or `else if` clauses\n else(): CodeGen {\n return this._elseNode(new Else())\n }\n\n // end `if` statement (needed if gen.if was used only with condition)\n endIf(): CodeGen {\n return this._endBlockNode(If, Else)\n }\n\n private _for(node: For, forBody?: Block): CodeGen {\n this._blockNode(node)\n if (forBody) this.code(forBody).endFor()\n return this\n }\n\n // a generic `for` clause (or statement if `forBody` is passed)\n for(iteration: Code, forBody?: Block): CodeGen {\n return this._for(new ForLoop(iteration), forBody)\n }\n\n // `for` statement for a range of values\n forRange(\n nameOrPrefix: Name | string,\n from: SafeExpr,\n to: SafeExpr,\n forBody: (index: Name) => void,\n varKind: Code = this.opts.es5 ? varKinds.var : varKinds.let\n ): CodeGen {\n const name = this._scope.toName(nameOrPrefix)\n return this._for(new ForRange(varKind, name, from, to), () => forBody(name))\n }\n\n // `for-of` statement (in es5 mode replace with a normal for loop)\n forOf(\n nameOrPrefix: Name | string,\n iterable: Code,\n forBody: (item: Name) => void,\n varKind: Code = varKinds.const\n ): CodeGen {\n const name = this._scope.toName(nameOrPrefix)\n if (this.opts.es5) {\n const arr = iterable instanceof Name ? iterable : this.var(\"_arr\", iterable)\n return this.forRange(\"_i\", 0, _`${arr}.length`, (i) => {\n this.var(name, _`${arr}[${i}]`)\n forBody(name)\n })\n }\n return this._for(new ForIter(\"of\", varKind, name, iterable), () => forBody(name))\n }\n\n // `for-in` statement.\n // With option `ownProperties` replaced with a `for-of` loop for object keys\n forIn(\n nameOrPrefix: Name | string,\n obj: Code,\n forBody: (item: Name) => void,\n varKind: Code = this.opts.es5 ? varKinds.var : varKinds.const\n ): CodeGen {\n if (this.opts.ownProperties) {\n return this.forOf(nameOrPrefix, _`Object.keys(${obj})`, forBody)\n }\n const name = this._scope.toName(nameOrPrefix)\n return this._for(new ForIter(\"in\", varKind, name, obj), () => forBody(name))\n }\n\n // end `for` loop\n endFor(): CodeGen {\n return this._endBlockNode(For)\n }\n\n // `label` statement\n label(label: Name): CodeGen {\n return this._leafNode(new Label(label))\n }\n\n // `break` statement\n break(label?: Code): CodeGen {\n return this._leafNode(new Break(label))\n }\n\n // `return` statement\n return(value: Block | SafeExpr): CodeGen {\n const node = new Return()\n this._blockNode(node)\n this.code(value)\n if (node.nodes.length !== 1) throw new Error('CodeGen: \"return\" should have one node')\n return this._endBlockNode(Return)\n }\n\n // `try` statement\n try(tryBody: Block, catchCode?: (e: Name) => void, finallyCode?: Block): CodeGen {\n if (!catchCode && !finallyCode) throw new Error('CodeGen: \"try\" without \"catch\" and \"finally\"')\n const node = new Try()\n this._blockNode(node)\n this.code(tryBody)\n if (catchCode) {\n const error = this.name(\"e\")\n this._currNode = node.catch = new Catch(error)\n catchCode(error)\n }\n if (finallyCode) {\n this._currNode = node.finally = new Finally()\n this.code(finallyCode)\n }\n return this._endBlockNode(Catch, Finally)\n }\n\n // `throw` statement\n throw(error: Code): CodeGen {\n return this._leafNode(new Throw(error))\n }\n\n // start self-balancing block\n block(body?: Block, nodeCount?: number): CodeGen {\n this._blockStarts.push(this._nodes.length)\n if (body) this.code(body).endBlock(nodeCount)\n return this\n }\n\n // end the current self-balancing block\n endBlock(nodeCount?: number): CodeGen {\n const len = this._blockStarts.pop()\n if (len === undefined) throw new Error(\"CodeGen: not in self-balancing block\")\n const toClose = this._nodes.length - len\n if (toClose < 0 || (nodeCount !== undefined && toClose !== nodeCount)) {\n throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`)\n }\n this._nodes.length = len\n return this\n }\n\n // `function` heading (or definition if funcBody is passed)\n func(name: Name, args: Code = nil, async?: boolean, funcBody?: Block): CodeGen {\n this._blockNode(new Func(name, args, async))\n if (funcBody) this.code(funcBody).endFunc()\n return this\n }\n\n // end function definition\n endFunc(): CodeGen {\n return this._endBlockNode(Func)\n }\n\n optimize(n = 1): void {\n while (n-- > 0) {\n this._root.optimizeNodes()\n this._root.optimizeNames(this._root.names, this._constants)\n }\n }\n\n private _leafNode(node: LeafNode): CodeGen {\n this._currNode.nodes.push(node)\n return this\n }\n\n private _blockNode(node: StartBlockNode): void {\n this._currNode.nodes.push(node)\n this._nodes.push(node)\n }\n\n private _endBlockNode(N1: EndBlockNodeType, N2?: EndBlockNodeType): CodeGen {\n const n = this._currNode\n if (n instanceof N1 || (N2 && n instanceof N2)) {\n this._nodes.pop()\n return this\n }\n throw new Error(`CodeGen: not in block \"${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}\"`)\n }\n\n private _elseNode(node: If | Else): CodeGen {\n const n = this._currNode\n if (!(n instanceof If)) {\n throw new Error('CodeGen: \"else\" without \"if\"')\n }\n this._currNode = n.else = node\n return this\n }\n\n private get _root(): Root {\n return this._nodes[0] as Root\n }\n\n private get _currNode(): ParentNode {\n const ns = this._nodes\n return ns[ns.length - 1]\n }\n\n private set _currNode(node: ParentNode) {\n const ns = this._nodes\n ns[ns.length - 1] = node\n }\n\n // get nodeCount(): number {\n // return this._root.count\n // }\n}\n\nfunction addNames(names: UsedNames, from: UsedNames): UsedNames {\n for (const n in from) names[n] = (names[n] || 0) + (from[n] || 0)\n return names\n}\n\nfunction addExprNames(names: UsedNames, from: SafeExpr): UsedNames {\n return from instanceof _CodeOrName ? addNames(names, from.names) : names\n}\n\nfunction optimizeExpr(expr: T, names: UsedNames, constants: Constants): T\nfunction optimizeExpr(expr: SafeExpr, names: UsedNames, constants: Constants): SafeExpr {\n if (expr instanceof Name) return replaceName(expr)\n if (!canOptimize(expr)) return expr\n return new _Code(\n expr._items.reduce((items: CodeItem[], c: SafeExpr | string) => {\n if (c instanceof Name) c = replaceName(c)\n if (c instanceof _Code) items.push(...c._items)\n else items.push(c)\n return items\n }, [])\n )\n\n function replaceName(n: Name): SafeExpr {\n const c = constants[n.str]\n if (c === undefined || names[n.str] !== 1) return n\n delete names[n.str]\n return c\n }\n\n function canOptimize(e: SafeExpr): e is _Code {\n return (\n e instanceof _Code &&\n e._items.some(\n (c) => c instanceof Name && names[c.str] === 1 && constants[c.str] !== undefined\n )\n )\n }\n}\n\nfunction subtractNames(names: UsedNames, from: UsedNames): void {\n for (const n in from) names[n] = (names[n] || 0) - (from[n] || 0)\n}\n\nexport function not(x: T): T\nexport function not(x: Code | SafeExpr): Code | SafeExpr {\n return typeof x == \"boolean\" || typeof x == \"number\" || x === null ? !x : _`!${par(x)}`\n}\n\nconst andCode = mappend(operators.AND)\n\n// boolean AND (&&) expression with the passed arguments\nexport function and(...args: Code[]): Code {\n return args.reduce(andCode)\n}\n\nconst orCode = mappend(operators.OR)\n\n// boolean OR (||) expression with the passed arguments\nexport function or(...args: Code[]): Code {\n return args.reduce(orCode)\n}\n\ntype MAppend = (x: Code, y: Code) => Code\n\nfunction mappend(op: Code): MAppend {\n return (x, y) => (x === nil ? y : y === nil ? x : _`${par(x)} ${op} ${par(y)}`)\n}\n\nfunction par(x: Code): Code {\n return x instanceof Name ? x : _`(${x})`\n}\n", "import type {AnySchema, EvaluatedProperties, EvaluatedItems} from \"../types\"\nimport type {SchemaCxt, SchemaObjCxt} from \".\"\nimport {_, getProperty, Code, Name, CodeGen} from \"./codegen\"\nimport {_Code} from \"./codegen/code\"\nimport type {Rule, ValidationRules} from \"./rules\"\n\n// TODO refactor to use Set\nexport function toHash(arr: T[]): {[K in T]?: true} {\n const hash: {[K in T]?: true} = {}\n for (const item of arr) hash[item] = true\n return hash\n}\n\nexport function alwaysValidSchema(it: SchemaCxt, schema: AnySchema): boolean | void {\n if (typeof schema == \"boolean\") return schema\n if (Object.keys(schema).length === 0) return true\n checkUnknownRules(it, schema)\n return !schemaHasRules(schema, it.self.RULES.all)\n}\n\nexport function checkUnknownRules(it: SchemaCxt, schema: AnySchema = it.schema): void {\n const {opts, self} = it\n if (!opts.strictSchema) return\n if (typeof schema === \"boolean\") return\n const rules = self.RULES.keywords\n for (const key in schema) {\n if (!rules[key]) checkStrictMode(it, `unknown keyword: \"${key}\"`)\n }\n}\n\nexport function schemaHasRules(\n schema: AnySchema,\n rules: {[Key in string]?: boolean | Rule}\n): boolean {\n if (typeof schema == \"boolean\") return !schema\n for (const key in schema) if (rules[key]) return true\n return false\n}\n\nexport function schemaHasRulesButRef(schema: AnySchema, RULES: ValidationRules): boolean {\n if (typeof schema == \"boolean\") return !schema\n for (const key in schema) if (key !== \"$ref\" && RULES.all[key]) return true\n return false\n}\n\nexport function schemaRefOrVal(\n {topSchemaRef, schemaPath}: SchemaObjCxt,\n schema: unknown,\n keyword: string,\n $data?: string | false\n): Code | number | boolean {\n if (!$data) {\n if (typeof schema == \"number\" || typeof schema == \"boolean\") return schema\n if (typeof schema == \"string\") return _`${schema}`\n }\n return _`${topSchemaRef}${schemaPath}${getProperty(keyword)}`\n}\n\nexport function unescapeFragment(str: string): string {\n return unescapeJsonPointer(decodeURIComponent(str))\n}\n\nexport function escapeFragment(str: string | number): string {\n return encodeURIComponent(escapeJsonPointer(str))\n}\n\nexport function escapeJsonPointer(str: string | number): string {\n if (typeof str == \"number\") return `${str}`\n return str.replace(/~/g, \"~0\").replace(/\\//g, \"~1\")\n}\n\nexport function unescapeJsonPointer(str: string): string {\n return str.replace(/~1/g, \"/\").replace(/~0/g, \"~\")\n}\n\nexport function eachItem(xs: T | T[], f: (x: T) => void): void {\n if (Array.isArray(xs)) {\n for (const x of xs) f(x)\n } else {\n f(xs)\n }\n}\n\ntype SomeEvaluated = EvaluatedProperties | EvaluatedItems\n\ntype MergeEvaluatedFunc = (\n gen: CodeGen,\n from: Name | T,\n to: Name | Exclude | undefined,\n toName?: typeof Name\n) => Name | T\n\ninterface MakeMergeFuncArgs {\n mergeNames: (gen: CodeGen, from: Name, to: Name) => void\n mergeToName: (gen: CodeGen, from: T, to: Name) => void\n mergeValues: (from: T, to: Exclude) => T\n resultToName: (gen: CodeGen, res?: T) => Name\n}\n\nfunction makeMergeEvaluated({\n mergeNames,\n mergeToName,\n mergeValues,\n resultToName,\n}: MakeMergeFuncArgs): MergeEvaluatedFunc {\n return (gen, from, to, toName) => {\n const res =\n to === undefined\n ? from\n : to instanceof Name\n ? (from instanceof Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to)\n : from instanceof Name\n ? (mergeToName(gen, to, from), from)\n : mergeValues(from, to)\n return toName === Name && !(res instanceof Name) ? resultToName(gen, res) : res\n }\n}\n\ninterface MergeEvaluated {\n props: MergeEvaluatedFunc\n items: MergeEvaluatedFunc\n}\n\nexport const mergeEvaluated: MergeEvaluated = {\n props: makeMergeEvaluated({\n mergeNames: (gen, from, to) =>\n gen.if(_`${to} !== true && ${from} !== undefined`, () => {\n gen.if(\n _`${from} === true`,\n () => gen.assign(to, true),\n () => gen.assign(to, _`${to} || {}`).code(_`Object.assign(${to}, ${from})`)\n )\n }),\n mergeToName: (gen, from, to) =>\n gen.if(_`${to} !== true`, () => {\n if (from === true) {\n gen.assign(to, true)\n } else {\n gen.assign(to, _`${to} || {}`)\n setEvaluated(gen, to, from)\n }\n }),\n mergeValues: (from, to) => (from === true ? true : {...from, ...to}),\n resultToName: evaluatedPropsToName,\n }),\n items: makeMergeEvaluated({\n mergeNames: (gen, from, to) =>\n gen.if(_`${to} !== true && ${from} !== undefined`, () =>\n gen.assign(to, _`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)\n ),\n mergeToName: (gen, from, to) =>\n gen.if(_`${to} !== true`, () =>\n gen.assign(to, from === true ? true : _`${to} > ${from} ? ${to} : ${from}`)\n ),\n mergeValues: (from, to) => (from === true ? true : Math.max(from, to)),\n resultToName: (gen, items) => gen.var(\"items\", items),\n }),\n}\n\nexport function evaluatedPropsToName(gen: CodeGen, ps?: EvaluatedProperties): Name {\n if (ps === true) return gen.var(\"props\", true)\n const props = gen.var(\"props\", _`{}`)\n if (ps !== undefined) setEvaluated(gen, props, ps)\n return props\n}\n\nexport function setEvaluated(gen: CodeGen, props: Name, ps: {[K in string]?: true}): void {\n Object.keys(ps).forEach((p) => gen.assign(_`${props}${getProperty(p)}`, true))\n}\n\nconst snippets: {[S in string]?: _Code} = {}\n\nexport function useFunc(gen: CodeGen, f: {code: string}): Name {\n return gen.scopeValue(\"func\", {\n ref: f,\n code: snippets[f.code] || (snippets[f.code] = new _Code(f.code)),\n })\n}\n\nexport enum Type {\n Num,\n Str,\n}\n\nexport function getErrorPath(\n dataProp: Name | string | number,\n dataPropType?: Type,\n jsPropertySyntax?: boolean\n): Code | string {\n // let path\n if (dataProp instanceof Name) {\n const isNumber = dataPropType === Type.Num\n return jsPropertySyntax\n ? isNumber\n ? _`\"[\" + ${dataProp} + \"]\"`\n : _`\"['\" + ${dataProp} + \"']\"`\n : isNumber\n ? _`\"/\" + ${dataProp}`\n : _`\"/\" + ${dataProp}.replace(/~/g, \"~0\").replace(/\\\\//g, \"~1\")` // TODO maybe use global escapePointer\n }\n return jsPropertySyntax ? getProperty(dataProp).toString() : \"/\" + escapeJsonPointer(dataProp)\n}\n\nexport function checkStrictMode(\n it: SchemaCxt,\n msg: string,\n mode: boolean | \"log\" = it.opts.strictSchema\n): void {\n if (!mode) return\n msg = `strict mode: ${msg}`\n if (mode === true) throw new Error(msg)\n it.self.logger.warn(msg)\n}\n", "import {Name} from \"./codegen\"\n\nconst names = {\n // validation function arguments\n data: new Name(\"data\"), // data passed to validation function\n // args passed from referencing schema\n valCxt: new Name(\"valCxt\"), // validation/data context - should not be used directly, it is destructured to the names below\n instancePath: new Name(\"instancePath\"),\n parentData: new Name(\"parentData\"),\n parentDataProperty: new Name(\"parentDataProperty\"),\n rootData: new Name(\"rootData\"), // root data - same as the data passed to the first/top validation function\n dynamicAnchors: new Name(\"dynamicAnchors\"), // used to support recursiveRef and dynamicRef\n isAllOfVariant: new Name(\"isAllOfVariant\"), // used to check in runtime if the current function (ref) is called from allOf\n // function scoped variables\n vErrors: new Name(\"vErrors\"), // null or array of validation errors\n errors: new Name(\"errors\"), // counter of validation errors\n this: new Name(\"this\"),\n // \"globals\"\n self: new Name(\"self\"),\n scope: new Name(\"scope\"),\n // JTD serialize/parse name for JSON string and position\n json: new Name(\"json\"),\n jsonPos: new Name(\"jsonPos\"),\n jsonLen: new Name(\"jsonLen\"),\n jsonPart: new Name(\"jsonPart\"),\n}\n\nexport default names\n", "import type {KeywordErrorCxt, KeywordErrorDefinition} from \"../types\"\nimport type {SchemaCxt} from \"./index\"\nimport {CodeGen, _, str, strConcat, Code, Name} from \"./codegen\"\nimport {SafeExpr} from \"./codegen/code\"\nimport {getErrorPath, Type} from \"./util\"\nimport N from \"./names\"\n\nexport const keywordError: KeywordErrorDefinition = {\n message: ({keyword}) => str`must pass \"${keyword}\" keyword validation`,\n}\n\nexport const keyword$DataError: KeywordErrorDefinition = {\n message: ({keyword, schemaType}) =>\n schemaType\n ? str`\"${keyword}\" keyword must be ${schemaType} ($data)`\n : str`\"${keyword}\" keyword is invalid ($data)`,\n}\n\nexport interface ErrorPaths {\n instancePath?: Code\n schemaPath?: string\n parentSchema?: boolean\n}\n\nexport function reportError(\n cxt: KeywordErrorCxt,\n error: KeywordErrorDefinition = keywordError,\n errorPaths?: ErrorPaths,\n overrideAllErrors?: boolean\n): void {\n const {it} = cxt\n const {gen, compositeRule, allErrors} = it\n const errObj = errorObjectCode(cxt, error, errorPaths)\n if (overrideAllErrors ?? (compositeRule || allErrors)) {\n addError(gen, errObj)\n } else {\n returnErrors(it, _`[${errObj}]`)\n }\n}\n\nexport function reportExtraError(\n cxt: KeywordErrorCxt,\n error: KeywordErrorDefinition = keywordError,\n errorPaths?: ErrorPaths\n): void {\n const {it} = cxt\n const {gen, compositeRule, allErrors} = it\n const errObj = errorObjectCode(cxt, error, errorPaths)\n addError(gen, errObj)\n if (!(compositeRule || allErrors)) {\n returnErrors(it, N.vErrors)\n }\n}\n\nexport function resetErrorsCount(gen: CodeGen, errsCount: Name): void {\n gen.assign(N.errors, errsCount)\n gen.if(_`${N.vErrors} !== null`, () =>\n gen.if(\n errsCount,\n () => gen.assign(_`${N.vErrors}.length`, errsCount),\n () => gen.assign(N.vErrors, null)\n )\n )\n}\n\nexport function extendErrors({\n gen,\n keyword,\n schemaValue,\n data,\n errsCount,\n it,\n}: KeywordErrorCxt): void {\n /* istanbul ignore if */\n if (errsCount === undefined) throw new Error(\"ajv implementation error\")\n const err = gen.name(\"err\")\n gen.forRange(\"i\", errsCount, N.errors, (i) => {\n gen.const(err, _`${N.vErrors}[${i}]`)\n gen.if(_`${err}.instancePath === undefined`, () =>\n gen.assign(_`${err}.instancePath`, strConcat(N.instancePath, it.errorPath))\n )\n gen.assign(_`${err}.schemaPath`, str`${it.errSchemaPath}/${keyword}`)\n if (it.opts.verbose) {\n gen.assign(_`${err}.schema`, schemaValue)\n gen.assign(_`${err}.data`, data)\n }\n })\n}\n\nfunction addError(gen: CodeGen, errObj: Code): void {\n const err = gen.const(\"err\", errObj)\n gen.if(\n _`${N.vErrors} === null`,\n () => gen.assign(N.vErrors, _`[${err}]`),\n _`${N.vErrors}.push(${err})`\n )\n gen.code(_`${N.errors}++`)\n}\n\nfunction returnErrors(it: SchemaCxt, errs: Code): void {\n const {gen, validateName, schemaEnv} = it\n if (schemaEnv.$async) {\n gen.throw(_`new ${it.ValidationError as Name}(${errs})`)\n } else {\n gen.assign(_`${validateName}.errors`, errs)\n gen.return(false)\n }\n}\n\nconst E = {\n keyword: new Name(\"keyword\"),\n schemaPath: new Name(\"schemaPath\"), // also used in JTD errors\n params: new Name(\"params\"),\n propertyName: new Name(\"propertyName\"),\n message: new Name(\"message\"),\n schema: new Name(\"schema\"),\n parentSchema: new Name(\"parentSchema\"),\n}\n\nfunction errorObjectCode(\n cxt: KeywordErrorCxt,\n error: KeywordErrorDefinition,\n errorPaths?: ErrorPaths\n): Code {\n const {createErrors} = cxt.it\n if (createErrors === false) return _`{}`\n return errorObject(cxt, error, errorPaths)\n}\n\nfunction errorObject(\n cxt: KeywordErrorCxt,\n error: KeywordErrorDefinition,\n errorPaths: ErrorPaths = {}\n): Code {\n const {gen, it} = cxt\n const keyValues: [Name, SafeExpr | string][] = [\n errorInstancePath(it, errorPaths),\n errorSchemaPath(cxt, errorPaths),\n ]\n extraErrorProps(cxt, error, keyValues)\n return gen.object(...keyValues)\n}\n\nfunction errorInstancePath({errorPath}: SchemaCxt, {instancePath}: ErrorPaths): [Name, Code] {\n const instPath = instancePath\n ? str`${errorPath}${getErrorPath(instancePath, Type.Str)}`\n : errorPath\n return [N.instancePath, strConcat(N.instancePath, instPath)]\n}\n\nfunction errorSchemaPath(\n {keyword, it: {errSchemaPath}}: KeywordErrorCxt,\n {schemaPath, parentSchema}: ErrorPaths\n): [Name, string | Code] {\n let schPath = parentSchema ? errSchemaPath : str`${errSchemaPath}/${keyword}`\n if (schemaPath) {\n schPath = str`${schPath}${getErrorPath(schemaPath, Type.Str)}`\n }\n return [E.schemaPath, schPath]\n}\n\nfunction extraErrorProps(\n cxt: KeywordErrorCxt,\n {params, message}: KeywordErrorDefinition,\n keyValues: [Name, SafeExpr | string][]\n): void {\n const {keyword, data, schemaValue, it} = cxt\n const {opts, propertyName, topSchemaRef, schemaPath} = it\n keyValues.push(\n [E.keyword, keyword],\n [E.params, typeof params == \"function\" ? params(cxt) : params || _`{}`]\n )\n if (opts.messages) {\n keyValues.push([E.message, typeof message == \"function\" ? message(cxt) : message])\n }\n if (opts.verbose) {\n keyValues.push(\n [E.schema, schemaValue],\n [E.parentSchema, _`${topSchemaRef}${schemaPath}`],\n [N.data, data]\n )\n }\n if (propertyName) keyValues.push([E.propertyName, propertyName])\n}\n", "import type {KeywordErrorDefinition, KeywordErrorCxt} from \"../../types\"\nimport type {SchemaCxt} from \"..\"\nimport {reportError} from \"../errors\"\nimport {_, Name} from \"../codegen\"\nimport N from \"../names\"\n\nconst boolError: KeywordErrorDefinition = {\n message: \"boolean schema is false\",\n}\n\nexport function topBoolOrEmptySchema(it: SchemaCxt): void {\n const {gen, schema, validateName} = it\n if (schema === false) {\n falseSchemaError(it, false)\n } else if (typeof schema == \"object\" && schema.$async === true) {\n gen.return(N.data)\n } else {\n gen.assign(_`${validateName}.errors`, null)\n gen.return(true)\n }\n}\n\nexport function boolOrEmptySchema(it: SchemaCxt, valid: Name): void {\n const {gen, schema} = it\n if (schema === false) {\n gen.var(valid, false) // TODO var\n falseSchemaError(it)\n } else {\n gen.var(valid, true) // TODO var\n }\n}\n\nfunction falseSchemaError(it: SchemaCxt, overrideAllErrors?: boolean): void {\n const {gen, data} = it\n // TODO maybe some other interface should be used for non-keyword validation errors...\n const cxt: KeywordErrorCxt = {\n gen,\n keyword: \"false schema\",\n data,\n schema: false,\n schemaCode: false,\n schemaValue: false,\n params: {},\n it,\n }\n reportError(cxt, boolError, undefined, overrideAllErrors)\n}\n", "import type {AddedKeywordDefinition} from \"../types\"\n\nconst _jsonTypes = [\"string\", \"number\", \"integer\", \"boolean\", \"null\", \"object\", \"array\"] as const\n\nexport type JSONType = (typeof _jsonTypes)[number]\n\nconst jsonTypes: Set = new Set(_jsonTypes)\n\nexport function isJSONType(x: unknown): x is JSONType {\n return typeof x == \"string\" && jsonTypes.has(x)\n}\n\ntype ValidationTypes = {\n [K in JSONType]: boolean | RuleGroup | undefined\n}\n\nexport interface ValidationRules {\n rules: RuleGroup[]\n post: RuleGroup\n all: {[Key in string]?: boolean | Rule} // rules that have to be validated\n keywords: {[Key in string]?: boolean} // all known keywords (superset of \"all\")\n types: ValidationTypes\n}\n\nexport interface RuleGroup {\n type?: JSONType\n rules: Rule[]\n}\n\n// This interface wraps KeywordDefinition because definition can have multiple keywords\nexport interface Rule {\n keyword: string\n definition: AddedKeywordDefinition\n}\n\nexport function getRules(): ValidationRules {\n const groups: Record<\"number\" | \"string\" | \"array\" | \"object\", RuleGroup> = {\n number: {type: \"number\", rules: []},\n string: {type: \"string\", rules: []},\n array: {type: \"array\", rules: []},\n object: {type: \"object\", rules: []},\n }\n return {\n types: {...groups, integer: true, boolean: true, null: true},\n rules: [{rules: []}, groups.number, groups.string, groups.array, groups.object],\n post: {rules: []},\n all: {},\n keywords: {},\n }\n}\n", "import type {AnySchemaObject} from \"../../types\"\nimport type {SchemaObjCxt} from \"..\"\nimport type {JSONType, RuleGroup, Rule} from \"../rules\"\n\nexport function schemaHasRulesForType(\n {schema, self}: SchemaObjCxt,\n type: JSONType\n): boolean | undefined {\n const group = self.RULES.types[type]\n return group && group !== true && shouldUseGroup(schema, group)\n}\n\nexport function shouldUseGroup(schema: AnySchemaObject, group: RuleGroup): boolean {\n return group.rules.some((rule) => shouldUseRule(schema, rule))\n}\n\nexport function shouldUseRule(schema: AnySchemaObject, rule: Rule): boolean | undefined {\n return (\n schema[rule.keyword] !== undefined ||\n rule.definition.implements?.some((kwd) => schema[kwd] !== undefined)\n )\n}\n", "import type {\n KeywordErrorDefinition,\n KeywordErrorCxt,\n ErrorObject,\n AnySchemaObject,\n} from \"../../types\"\nimport type {SchemaObjCxt} from \"..\"\nimport {isJSONType, JSONType} from \"../rules\"\nimport {schemaHasRulesForType} from \"./applicability\"\nimport {reportError} from \"../errors\"\nimport {_, nil, and, not, operators, Code, Name} from \"../codegen\"\nimport {toHash, schemaRefOrVal} from \"../util\"\n\nexport enum DataType {\n Correct,\n Wrong,\n}\n\nexport function getSchemaTypes(schema: AnySchemaObject): JSONType[] {\n const types = getJSONTypes(schema.type)\n const hasNull = types.includes(\"null\")\n if (hasNull) {\n if (schema.nullable === false) throw new Error(\"type: null contradicts nullable: false\")\n } else {\n if (!types.length && schema.nullable !== undefined) {\n throw new Error('\"nullable\" cannot be used without \"type\"')\n }\n if (schema.nullable === true) types.push(\"null\")\n }\n return types\n}\n\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nexport function getJSONTypes(ts: unknown | unknown[]): JSONType[] {\n const types: unknown[] = Array.isArray(ts) ? ts : ts ? [ts] : []\n if (types.every(isJSONType)) return types\n throw new Error(\"type must be JSONType or JSONType[]: \" + types.join(\",\"))\n}\n\nexport function coerceAndCheckDataType(it: SchemaObjCxt, types: JSONType[]): boolean {\n const {gen, data, opts} = it\n const coerceTo = coerceToTypes(types, opts.coerceTypes)\n const checkTypes =\n types.length > 0 &&\n !(coerceTo.length === 0 && types.length === 1 && schemaHasRulesForType(it, types[0]))\n if (checkTypes) {\n const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong)\n gen.if(wrongType, () => {\n if (coerceTo.length) coerceData(it, types, coerceTo)\n else reportTypeError(it)\n })\n }\n return checkTypes\n}\n\nconst COERCIBLE: Set = new Set([\"string\", \"number\", \"integer\", \"boolean\", \"null\"])\nfunction coerceToTypes(types: JSONType[], coerceTypes?: boolean | \"array\"): JSONType[] {\n return coerceTypes\n ? types.filter((t) => COERCIBLE.has(t) || (coerceTypes === \"array\" && t === \"array\"))\n : []\n}\n\nfunction coerceData(it: SchemaObjCxt, types: JSONType[], coerceTo: JSONType[]): void {\n const {gen, data, opts} = it\n const dataType = gen.let(\"dataType\", _`typeof ${data}`)\n const coerced = gen.let(\"coerced\", _`undefined`)\n if (opts.coerceTypes === \"array\") {\n gen.if(_`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () =>\n gen\n .assign(data, _`${data}[0]`)\n .assign(dataType, _`typeof ${data}`)\n .if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data))\n )\n }\n gen.if(_`${coerced} !== undefined`)\n for (const t of coerceTo) {\n if (COERCIBLE.has(t) || (t === \"array\" && opts.coerceTypes === \"array\")) {\n coerceSpecificType(t)\n }\n }\n gen.else()\n reportTypeError(it)\n gen.endIf()\n\n gen.if(_`${coerced} !== undefined`, () => {\n gen.assign(data, coerced)\n assignParentData(it, coerced)\n })\n\n function coerceSpecificType(t: string): void {\n switch (t) {\n case \"string\":\n gen\n .elseIf(_`${dataType} == \"number\" || ${dataType} == \"boolean\"`)\n .assign(coerced, _`\"\" + ${data}`)\n .elseIf(_`${data} === null`)\n .assign(coerced, _`\"\"`)\n return\n case \"number\":\n gen\n .elseIf(\n _`${dataType} == \"boolean\" || ${data} === null\n || (${dataType} == \"string\" && ${data} && ${data} == +${data})`\n )\n .assign(coerced, _`+${data}`)\n return\n case \"integer\":\n gen\n .elseIf(\n _`${dataType} === \"boolean\" || ${data} === null\n || (${dataType} === \"string\" && ${data} && ${data} == +${data} && !(${data} % 1))`\n )\n .assign(coerced, _`+${data}`)\n return\n case \"boolean\":\n gen\n .elseIf(_`${data} === \"false\" || ${data} === 0 || ${data} === null`)\n .assign(coerced, false)\n .elseIf(_`${data} === \"true\" || ${data} === 1`)\n .assign(coerced, true)\n return\n case \"null\":\n gen.elseIf(_`${data} === \"\" || ${data} === 0 || ${data} === false`)\n gen.assign(coerced, null)\n return\n\n case \"array\":\n gen\n .elseIf(\n _`${dataType} === \"string\" || ${dataType} === \"number\"\n || ${dataType} === \"boolean\" || ${data} === null`\n )\n .assign(coerced, _`[${data}]`)\n }\n }\n}\n\nfunction assignParentData({gen, parentData, parentDataProperty}: SchemaObjCxt, expr: Name): void {\n // TODO use gen.property\n gen.if(_`${parentData} !== undefined`, () =>\n gen.assign(_`${parentData}[${parentDataProperty}]`, expr)\n )\n}\n\nexport function checkDataType(\n dataType: JSONType,\n data: Name,\n strictNums?: boolean | \"log\",\n correct = DataType.Correct\n): Code {\n const EQ = correct === DataType.Correct ? operators.EQ : operators.NEQ\n let cond: Code\n switch (dataType) {\n case \"null\":\n return _`${data} ${EQ} null`\n case \"array\":\n cond = _`Array.isArray(${data})`\n break\n case \"object\":\n cond = _`${data} && typeof ${data} == \"object\" && !Array.isArray(${data})`\n break\n case \"integer\":\n cond = numCond(_`!(${data} % 1) && !isNaN(${data})`)\n break\n case \"number\":\n cond = numCond()\n break\n default:\n return _`typeof ${data} ${EQ} ${dataType}`\n }\n return correct === DataType.Correct ? cond : not(cond)\n\n function numCond(_cond: Code = nil): Code {\n return and(_`typeof ${data} == \"number\"`, _cond, strictNums ? _`isFinite(${data})` : nil)\n }\n}\n\nexport function checkDataTypes(\n dataTypes: JSONType[],\n data: Name,\n strictNums?: boolean | \"log\",\n correct?: DataType\n): Code {\n if (dataTypes.length === 1) {\n return checkDataType(dataTypes[0], data, strictNums, correct)\n }\n let cond: Code\n const types = toHash(dataTypes)\n if (types.array && types.object) {\n const notObj = _`typeof ${data} != \"object\"`\n cond = types.null ? notObj : _`!${data} || ${notObj}`\n delete types.null\n delete types.array\n delete types.object\n } else {\n cond = nil\n }\n if (types.number) delete types.integer\n for (const t in types) cond = and(cond, checkDataType(t as JSONType, data, strictNums, correct))\n return cond\n}\n\nexport type TypeError = ErrorObject<\"type\", {type: string}>\n\nconst typeError: KeywordErrorDefinition = {\n message: ({schema}) => `must be ${schema}`,\n params: ({schema, schemaValue}) =>\n typeof schema == \"string\" ? _`{type: ${schema}}` : _`{type: ${schemaValue}}`,\n}\n\nexport function reportTypeError(it: SchemaObjCxt): void {\n const cxt = getTypeErrorContext(it)\n reportError(cxt, typeError)\n}\n\nfunction getTypeErrorContext(it: SchemaObjCxt): KeywordErrorCxt {\n const {gen, data, schema} = it\n const schemaCode = schemaRefOrVal(it, schema, \"type\")\n return {\n gen,\n keyword: \"type\",\n data,\n schema: schema.type,\n schemaCode,\n schemaValue: schemaCode,\n parentSchema: schema,\n params: {},\n it,\n }\n}\n", "import type {SchemaObjCxt} from \"..\"\nimport {_, getProperty, stringify} from \"../codegen\"\nimport {checkStrictMode} from \"../util\"\n\nexport function assignDefaults(it: SchemaObjCxt, ty?: string): void {\n const {properties, items} = it.schema\n if (ty === \"object\" && properties) {\n for (const key in properties) {\n assignDefault(it, key, properties[key].default)\n }\n } else if (ty === \"array\" && Array.isArray(items)) {\n items.forEach((sch, i: number) => assignDefault(it, i, sch.default))\n }\n}\n\nfunction assignDefault(it: SchemaObjCxt, prop: string | number, defaultValue: unknown): void {\n const {gen, compositeRule, data, opts} = it\n if (defaultValue === undefined) return\n const childData = _`${data}${getProperty(prop)}`\n if (compositeRule) {\n checkStrictMode(it, `default is ignored for: ${childData}`)\n return\n }\n\n let condition = _`${childData} === undefined`\n if (opts.useDefaults === \"empty\") {\n condition = _`${condition} || ${childData} === null || ${childData} === \"\"`\n }\n // `${childData} === undefined` +\n // (opts.useDefaults === \"empty\" ? ` || ${childData} === null || ${childData} === \"\"` : \"\")\n gen.if(condition, _`${childData} = ${stringify(defaultValue)}`)\n}\n", "import type {AnySchemaObject} from \"../types\"\n\nimport {_, or, type Code} from \"../compile/codegen\"\nimport N from \"../compile/names\"\n\nexport function getSkipCondition(schema: AnySchemaObject, prop: string): Code | undefined {\n const propSchema = schema.properties?.[prop]\n if (!propSchema) return undefined\n\n const hasReadOnly = propSchema.readOnly === true\n const hasWriteOnly = propSchema.writeOnly === true\n\n if (!hasReadOnly && !hasWriteOnly) return undefined\n\n const conditions: Code[] = []\n const apiContext = _`typeof ${N.this} == \"object\" && ${N.this} && ${N.this}.apiContext`\n\n if (hasReadOnly) {\n conditions.push(_`${apiContext} === \"request\"`)\n }\n\n if (hasWriteOnly) {\n conditions.push(_`${apiContext} === \"response\"`)\n }\n\n return or(...conditions)\n}\n", "import type {AnySchema, SchemaMap} from \"../types\"\nimport type {SchemaCxt} from \"../compile\"\nimport type {KeywordCxt} from \"../compile/validate\"\nimport {CodeGen, _, and, or, not, nil, strConcat, getProperty, Code, Name} from \"../compile/codegen\"\nimport {alwaysValidSchema, Type} from \"../compile/util\"\nimport N from \"../compile/names\"\nimport {useFunc} from \"../compile/util\"\nimport {getSkipCondition} from \"./oasContext\"\nexport function checkReportMissingProp(cxt: KeywordCxt, prop: string): void {\n const {gen, data, it} = cxt\n gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {\n cxt.setParams({missingProperty: _`${prop}`}, true)\n cxt.error()\n })\n}\n\nexport function checkMissingProp(\n {gen, data, it: {opts}, parentSchema}: KeywordCxt,\n properties: string[],\n missing: Name\n): Code {\n return or(\n ...properties.map((prop) =>\n and(\n not(getSkipCondition(parentSchema, prop) ?? _`false`),\n noPropertyInData(gen, data, prop, opts.ownProperties),\n _`${missing} = ${prop}`\n )\n )\n )\n}\n\nexport function reportMissingProp(cxt: KeywordCxt, missing: Name): void {\n cxt.setParams({missingProperty: missing}, true)\n cxt.error()\n}\n\nexport function hasPropFunc(gen: CodeGen): Name {\n return gen.scopeValue(\"func\", {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ref: Object.prototype.hasOwnProperty,\n code: _`Object.prototype.hasOwnProperty`,\n })\n}\n\nexport function isOwnProperty(gen: CodeGen, data: Name, property: Name | string): Code {\n return _`${hasPropFunc(gen)}.call(${data}, ${property})`\n}\n\nexport function propertyInData(\n gen: CodeGen,\n data: Name,\n property: Name | string,\n ownProperties?: boolean\n): Code {\n const cond = _`${data}${getProperty(property)} !== undefined`\n return ownProperties ? _`${cond} && ${isOwnProperty(gen, data, property)}` : cond\n}\n\nexport function noPropertyInData(\n gen: CodeGen,\n data: Name,\n property: Name | string,\n ownProperties?: boolean\n): Code {\n const cond = _`${data}${getProperty(property)} === undefined`\n return ownProperties ? or(cond, not(isOwnProperty(gen, data, property))) : cond\n}\n\nexport function allSchemaProperties(schemaMap?: SchemaMap): string[] {\n return schemaMap ? Object.keys(schemaMap).filter((p) => p !== \"__proto__\") : []\n}\n\nexport function schemaProperties(it: SchemaCxt, schemaMap: SchemaMap): string[] {\n return allSchemaProperties(schemaMap).filter(\n (p) => !alwaysValidSchema(it, schemaMap[p] as AnySchema)\n )\n}\n\nexport function callValidateCode(\n {schemaCode, data, it: {gen, topSchemaRef, schemaPath, errorPath}, it}: KeywordCxt,\n func: Code,\n context: Code,\n passSchema?: boolean\n): Code {\n const dataAndSchema = passSchema ? _`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data\n const valCxt: [Name, Code | number][] = [\n [N.instancePath, strConcat(N.instancePath, errorPath)],\n [N.parentData, it.parentData],\n [N.parentDataProperty, it.parentDataProperty],\n [N.rootData, N.rootData],\n [N.isAllOfVariant, it.isAllOfVariant ? 1 : 0],\n ]\n if (it.opts.dynamicRef) valCxt.push([N.dynamicAnchors, N.dynamicAnchors])\n const args = _`${dataAndSchema}, ${gen.object(...valCxt)}`\n return context !== nil ? _`${func}.call(${context}, ${args})` : _`${func}(${args})`\n}\n\nconst newRegExp = _`new RegExp`\n\nexport function usePattern({gen, it: {opts}}: KeywordCxt, pattern: string): Name {\n const u = opts.unicodeRegExp ? \"u\" : \"\"\n const {regExp} = opts.code\n const rx = regExp(pattern, u)\n\n return gen.scopeValue(\"pattern\", {\n key: rx.toString(),\n ref: rx,\n code: _`${regExp.code === \"new RegExp\" ? newRegExp : useFunc(gen, regExp)}(${pattern}, ${u})`,\n })\n}\n\nexport function validateArray(cxt: KeywordCxt): Name {\n const {gen, data, keyword, it} = cxt\n const valid = gen.name(\"valid\")\n if (it.allErrors) {\n const validArr = gen.let(\"valid\", true)\n validateItems(() => gen.assign(validArr, false))\n return validArr\n }\n gen.var(valid, true)\n validateItems(() => gen.break())\n return valid\n\n function validateItems(notValid: () => void): void {\n const len = gen.const(\"len\", _`${data}.length`)\n gen.forRange(\"i\", 0, len, (i) => {\n cxt.subschema(\n {\n keyword,\n dataProp: i,\n dataPropType: Type.Num,\n },\n valid\n )\n gen.if(not(valid), notValid)\n })\n }\n}\n\nexport function validateUnion(cxt: KeywordCxt): void {\n const {gen, schema, keyword, parentSchema, it} = cxt\n /* istanbul ignore if */\n if (!Array.isArray(schema)) throw new Error(\"ajv implementation error\")\n if (it.opts.discriminator && parentSchema.discriminator) return\n const alwaysValid = schema.some((sch: AnySchema) => alwaysValidSchema(it, sch))\n if (alwaysValid && !it.opts.unevaluated) return\n\n const valid = gen.let(\"valid\", false)\n const schValid = gen.name(\"_valid\")\n\n gen.block(() =>\n schema.forEach((_sch: AnySchema, i: number) => {\n const schCxt = cxt.subschema(\n {\n keyword,\n schemaProp: i,\n compositeRule: true,\n },\n schValid\n )\n gen.assign(valid, _`${valid} || ${schValid}`)\n const merged = cxt.mergeValidEvaluated(schCxt, schValid)\n // can short-circuit if `unevaluatedProperties/Items` not supported (opts.unevaluated !== true)\n // or if all properties and items were evaluated (it.props === true && it.items === true)\n if (!merged) gen.if(not(valid))\n })\n )\n\n cxt.result(\n valid,\n () => cxt.reset(),\n () => cxt.error(true)\n )\n}\n", "import type {KeywordCxt} from \".\"\nimport type {\n AnySchema,\n SchemaValidateFunction,\n AnyValidateFunction,\n AddedKeywordDefinition,\n MacroKeywordDefinition,\n FuncKeywordDefinition,\n} from \"../../types\"\nimport type {SchemaObjCxt} from \"..\"\nimport {_, nil, not, stringify, Code, Name, CodeGen} from \"../codegen\"\nimport N from \"../names\"\nimport type {JSONType} from \"../rules\"\nimport {callValidateCode} from \"../../vocabularies/code\"\nimport {extendErrors} from \"../errors\"\n\ntype KeywordCompilationResult = AnySchema | SchemaValidateFunction | AnyValidateFunction\n\nexport function macroKeywordCode(cxt: KeywordCxt, def: MacroKeywordDefinition): void {\n const {gen, keyword, schema, parentSchema, it} = cxt\n const macroSchema = def.macro.call(it.self, schema, parentSchema, it)\n const schemaRef = useKeyword(gen, keyword, macroSchema)\n if (it.opts.validateSchema !== false) it.self.validateSchema(macroSchema, true)\n\n const valid = gen.name(\"valid\")\n cxt.subschema(\n {\n schema: macroSchema,\n schemaPath: nil,\n errSchemaPath: `${it.errSchemaPath}/${keyword}`,\n topSchemaRef: schemaRef,\n compositeRule: true,\n },\n valid\n )\n cxt.pass(valid, () => cxt.error(true))\n}\n\nexport function funcKeywordCode(cxt: KeywordCxt, def: FuncKeywordDefinition): void {\n const {gen, keyword, schema, parentSchema, $data, it} = cxt\n checkAsyncKeyword(it, def)\n const validate =\n !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate\n const validateRef = useKeyword(gen, keyword, validate)\n const valid = gen.let(\"valid\")\n cxt.block$data(valid, validateKeyword)\n cxt.ok(def.valid ?? valid)\n\n function validateKeyword(): void {\n if (def.errors === false) {\n assignValid()\n if (def.modifying) modifyData(cxt)\n reportErrs(() => cxt.error())\n } else {\n const ruleErrs = def.async ? validateAsync() : validateSync()\n if (def.modifying) modifyData(cxt)\n reportErrs(() => addErrs(cxt, ruleErrs))\n }\n }\n\n function validateAsync(): Name {\n const ruleErrs = gen.let(\"ruleErrs\", null)\n gen.try(\n () => assignValid(_`await `),\n (e) =>\n gen.assign(valid, false).if(\n _`${e} instanceof ${it.ValidationError as Name}`,\n () => gen.assign(ruleErrs, _`${e}.errors`),\n () => gen.throw(e)\n )\n )\n return ruleErrs\n }\n\n function validateSync(): Code {\n const validateErrs = _`${validateRef}.errors`\n gen.assign(validateErrs, null)\n assignValid(nil)\n return validateErrs\n }\n\n function assignValid(_await: Code = def.async ? _`await ` : nil): void {\n const passCxt = it.opts.passContext ? N.this : N.self\n const passSchema = !((\"compile\" in def && !$data) || def.schema === false)\n gen.assign(\n valid,\n _`${_await}${callValidateCode(cxt, validateRef, passCxt, passSchema)}`,\n def.modifying\n )\n }\n\n function reportErrs(errors: () => void): void {\n gen.if(not(def.valid ?? valid), errors)\n }\n}\n\nfunction modifyData(cxt: KeywordCxt): void {\n const {gen, data, it} = cxt\n gen.if(it.parentData, () => gen.assign(data, _`${it.parentData}[${it.parentDataProperty}]`))\n}\n\nfunction addErrs(cxt: KeywordCxt, errs: Code): void {\n const {gen} = cxt\n gen.if(\n _`Array.isArray(${errs})`,\n () => {\n gen\n .assign(N.vErrors, _`${N.vErrors} === null ? ${errs} : ${N.vErrors}.concat(${errs})`)\n .assign(N.errors, _`${N.vErrors}.length`)\n extendErrors(cxt)\n },\n () => cxt.error()\n )\n}\n\nfunction checkAsyncKeyword({schemaEnv}: SchemaObjCxt, def: FuncKeywordDefinition): void {\n if (def.async && !schemaEnv.$async) throw new Error(\"async keyword in sync schema\")\n}\n\nfunction useKeyword(gen: CodeGen, keyword: string, result?: KeywordCompilationResult): Name {\n if (result === undefined) throw new Error(`keyword \"${keyword}\" failed to compile`)\n return gen.scopeValue(\n \"keyword\",\n typeof result == \"function\" ? {ref: result} : {ref: result, code: stringify(result)}\n )\n}\n\nexport function validSchemaType(\n schema: unknown,\n schemaType: JSONType[],\n allowUndefined = false\n): boolean {\n // TODO add tests\n return (\n !schemaType.length ||\n schemaType.some((st) =>\n st === \"array\"\n ? Array.isArray(schema)\n : st === \"object\"\n ? schema && typeof schema == \"object\" && !Array.isArray(schema)\n : typeof schema == st || (allowUndefined && typeof schema == \"undefined\")\n )\n )\n}\n\nexport function validateKeywordUsage(\n {schema, opts, self, errSchemaPath}: SchemaObjCxt,\n def: AddedKeywordDefinition,\n keyword: string\n): void {\n /* istanbul ignore if */\n if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) {\n throw new Error(\"ajv implementation error\")\n }\n\n const deps = def.dependencies\n if (deps?.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) {\n throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(\",\")}`)\n }\n\n if (def.validateSchema) {\n const valid = def.validateSchema(schema[keyword])\n if (!valid) {\n const msg =\n `keyword \"${keyword}\" value is invalid at path \"${errSchemaPath}\": ` +\n self.errorsText(def.validateSchema.errors)\n if (opts.validateSchema === \"log\") self.logger.error(msg)\n else throw new Error(msg)\n }\n }\n}\n", "import type {AnySchema} from \"../../types\"\nimport type {SchemaObjCxt} from \"..\"\nimport {_, str, getProperty, Code, Name} from \"../codegen\"\nimport {escapeFragment, getErrorPath, Type} from \"../util\"\nimport type {JSONType} from \"../rules\"\n\nexport interface SubschemaContext {\n // TODO use Optional? align with SchemCxt property types\n schema: AnySchema\n schemaPath: Code\n errSchemaPath: string\n topSchemaRef?: Code\n errorPath?: Code\n dataLevel?: number\n dataTypes?: JSONType[]\n data?: Name\n parentData?: Name\n parentDataProperty?: Code | number\n dataNames?: Name[]\n dataPathArr?: (Code | number)[]\n propertyName?: Name\n jtdDiscriminator?: string\n jtdMetadata?: boolean\n compositeRule?: true\n createErrors?: boolean\n allErrors?: boolean\n}\n\nexport type SubschemaArgs = Partial<{\n keyword: string\n schemaProp: string | number\n schema: AnySchema\n schemaPath: Code\n errSchemaPath: string\n topSchemaRef: Code\n data: Name | Code\n dataProp: Code | string | number\n dataTypes: JSONType[]\n definedProperties: Set\n propertyName: Name\n dataPropType: Type\n jtdDiscriminator: string\n jtdMetadata: boolean\n compositeRule: true\n createErrors: boolean\n allErrors: boolean\n}>\n\nexport function getSubschema(\n it: SchemaObjCxt,\n {keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef}: SubschemaArgs\n): SubschemaContext {\n if (keyword !== undefined && schema !== undefined) {\n throw new Error('both \"keyword\" and \"schema\" passed, only one allowed')\n }\n\n if (keyword !== undefined) {\n const sch = it.schema[keyword]\n return schemaProp === undefined\n ? {\n schema: sch,\n schemaPath: _`${it.schemaPath}${getProperty(keyword)}`,\n errSchemaPath: `${it.errSchemaPath}/${keyword}`,\n }\n : {\n schema: sch[schemaProp],\n schemaPath: _`${it.schemaPath}${getProperty(keyword)}${getProperty(schemaProp)}`,\n errSchemaPath: `${it.errSchemaPath}/${keyword}/${escapeFragment(schemaProp)}`,\n }\n }\n\n if (schema !== undefined) {\n if (schemaPath === undefined || errSchemaPath === undefined || topSchemaRef === undefined) {\n throw new Error('\"schemaPath\", \"errSchemaPath\" and \"topSchemaRef\" are required with \"schema\"')\n }\n return {\n schema,\n schemaPath,\n topSchemaRef,\n errSchemaPath,\n }\n }\n\n throw new Error('either \"keyword\" or \"schema\" must be passed')\n}\n\nexport function extendSubschemaData(\n subschema: SubschemaContext,\n it: SchemaObjCxt,\n {dataProp, dataPropType: dpType, data, dataTypes, propertyName}: SubschemaArgs\n): void {\n if (data !== undefined && dataProp !== undefined) {\n throw new Error('both \"data\" and \"dataProp\" passed, only one allowed')\n }\n\n const {gen} = it\n\n if (dataProp !== undefined) {\n const {errorPath, dataPathArr, opts} = it\n const nextData = gen.let(\"data\", _`${it.data}${getProperty(dataProp)}`, true)\n dataContextProps(nextData)\n subschema.errorPath = str`${errorPath}${getErrorPath(dataProp, dpType, opts.jsPropertySyntax)}`\n subschema.parentDataProperty = _`${dataProp}`\n subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty]\n }\n\n if (data !== undefined) {\n const nextData = data instanceof Name ? data : gen.let(\"data\", data, true) // replaceable if used once?\n dataContextProps(nextData)\n if (propertyName !== undefined) subschema.propertyName = propertyName\n // TODO something is possibly wrong here with not changing parentDataProperty and not appending dataPathArr\n }\n\n if (dataTypes) subschema.dataTypes = dataTypes\n\n function dataContextProps(_nextData: Name): void {\n subschema.data = _nextData\n subschema.dataLevel = it.dataLevel + 1\n subschema.dataTypes = []\n it.definedProperties = new Set()\n subschema.parentData = it.data\n subschema.dataNames = [...it.dataNames, _nextData]\n }\n}\n\nexport function extendSubschemaMode(\n subschema: SubschemaContext,\n {jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors}: SubschemaArgs\n): void {\n if (compositeRule !== undefined) subschema.compositeRule = compositeRule\n if (createErrors !== undefined) subschema.createErrors = createErrors\n if (allErrors !== undefined) subschema.allErrors = allErrors\n subschema.jtdDiscriminator = jtdDiscriminator // not inherited\n subschema.jtdMetadata = jtdMetadata // not inherited\n}\n", "import type {AnySchema, AnySchemaObject, UriResolver} from \"../types\"\nimport type Ajv from \"../ajv\"\nimport type {URIComponent} from \"fast-uri\"\nimport {eachItem} from \"./util\"\nimport * as equal from \"fast-deep-equal\"\nimport * as traverse from \"json-schema-traverse\"\n\n// the hash of local references inside the schema (created by getSchemaRefs), used for inline resolution\nexport type LocalRefs = {[Ref in string]?: AnySchemaObject}\n\n// TODO refactor to use keyword definitions\nconst SIMPLE_INLINED = new Set([\n \"type\",\n \"format\",\n \"pattern\",\n \"maxLength\",\n \"minLength\",\n \"maxProperties\",\n \"minProperties\",\n \"maxItems\",\n \"minItems\",\n \"maximum\",\n \"minimum\",\n \"uniqueItems\",\n \"multipleOf\",\n \"required\",\n \"enum\",\n \"const\",\n])\n\nexport function inlineRef(schema: AnySchema, limit: boolean | number = true): boolean {\n if (typeof schema == \"boolean\") return true\n if (limit === true) return !hasRef(schema)\n if (!limit) return false\n return countKeys(schema) <= limit\n}\n\nconst REF_KEYWORDS = new Set([\n \"$ref\",\n \"$recursiveRef\",\n \"$recursiveAnchor\",\n \"$dynamicRef\",\n \"$dynamicAnchor\",\n])\n\nfunction hasRef(schema: AnySchemaObject): boolean {\n for (const key in schema) {\n if (REF_KEYWORDS.has(key)) return true\n const sch = schema[key]\n if (Array.isArray(sch) && sch.some(hasRef)) return true\n if (typeof sch == \"object\" && hasRef(sch)) return true\n }\n return false\n}\n\nfunction countKeys(schema: AnySchemaObject): number {\n let count = 0\n for (const key in schema) {\n if (key === \"$ref\") return Infinity\n count++\n if (SIMPLE_INLINED.has(key)) continue\n if (typeof schema[key] == \"object\") {\n eachItem(schema[key], (sch) => (count += countKeys(sch)))\n }\n if (count === Infinity) return Infinity\n }\n return count\n}\n\nexport function getFullPath(resolver: UriResolver, id = \"\", normalize?: boolean): string {\n if (normalize !== false) id = normalizeId(id)\n const p = resolver.parse(id)\n return _getFullPath(resolver, p)\n}\n\nexport function _getFullPath(resolver: UriResolver, p: URIComponent): string {\n const serialized = resolver.serialize(p)\n return serialized.split(\"#\")[0] + \"#\"\n}\n\nconst TRAILING_SLASH_HASH = /#\\/?$/\nexport function normalizeId(id: string | undefined): string {\n return id ? id.replace(TRAILING_SLASH_HASH, \"\") : \"\"\n}\n\nexport function resolveUrl(resolver: UriResolver, baseId: string, id: string): string {\n id = normalizeId(id)\n return resolver.resolve(baseId, id)\n}\n\nconst ANCHOR = /^[a-z_][-a-z0-9._]*$/i\n\nexport function getSchemaRefs(this: Ajv, schema: AnySchema, baseId: string): LocalRefs {\n if (typeof schema == \"boolean\") return {}\n const {schemaId, uriResolver} = this.opts\n const schId = normalizeId(schema[schemaId] || baseId)\n const baseIds: {[JsonPtr in string]?: string} = {\"\": schId}\n const pathPrefix = getFullPath(uriResolver, schId, false)\n const localRefs: LocalRefs = {}\n const schemaRefs: Set = new Set()\n\n traverse(schema, {allKeys: true}, (sch, jsonPtr, _, parentJsonPtr) => {\n if (parentJsonPtr === undefined) return\n const fullPath = pathPrefix + jsonPtr\n let innerBaseId = baseIds[parentJsonPtr]\n if (typeof sch[schemaId] == \"string\") innerBaseId = addRef.call(this, sch[schemaId])\n addAnchor.call(this, sch.$anchor)\n addAnchor.call(this, sch.$dynamicAnchor)\n baseIds[jsonPtr] = innerBaseId\n\n function addRef(this: Ajv, ref: string): string {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const _resolve = this.opts.uriResolver.resolve\n ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref)\n if (schemaRefs.has(ref)) throw ambiguos(ref)\n schemaRefs.add(ref)\n let schOrRef = this.refs[ref]\n if (typeof schOrRef == \"string\") schOrRef = this.refs[schOrRef]\n if (typeof schOrRef == \"object\") {\n checkAmbiguosRef(sch, schOrRef.schema, ref)\n } else if (ref !== normalizeId(fullPath)) {\n if (ref[0] === \"#\") {\n checkAmbiguosRef(sch, localRefs[ref], ref)\n localRefs[ref] = sch\n } else {\n this.refs[ref] = fullPath\n }\n }\n return ref\n }\n\n function addAnchor(this: Ajv, anchor: unknown): void {\n if (typeof anchor == \"string\") {\n if (!ANCHOR.test(anchor)) throw new Error(`invalid anchor \"${anchor}\"`)\n addRef.call(this, `#${anchor}`)\n }\n }\n })\n\n return localRefs\n\n function checkAmbiguosRef(sch1: AnySchema, sch2: AnySchema | undefined, ref: string): void {\n if (sch2 !== undefined && !equal(sch1, sch2)) throw ambiguos(ref)\n }\n\n function ambiguos(ref: string): Error {\n return new Error(`reference \"${ref}\" resolves to more than one schema`)\n }\n}\n", "import type {\n AddedKeywordDefinition,\n AnySchema,\n AnySchemaObject,\n KeywordErrorCxt,\n KeywordCxtParams,\n} from \"../../types\"\nimport type {SchemaCxt, SchemaObjCxt} from \"..\"\nimport type {InstanceOptions} from \"../../core\"\nimport {boolOrEmptySchema, topBoolOrEmptySchema} from \"./boolSchema\"\nimport {coerceAndCheckDataType, getSchemaTypes} from \"./dataType\"\nimport {shouldUseGroup, shouldUseRule} from \"./applicability\"\nimport {checkDataType, checkDataTypes, reportTypeError, DataType} from \"./dataType\"\nimport {assignDefaults} from \"./defaults\"\nimport {funcKeywordCode, macroKeywordCode, validateKeywordUsage, validSchemaType} from \"./keyword\"\nimport {getSubschema, extendSubschemaData, SubschemaArgs, extendSubschemaMode} from \"./subschema\"\nimport {_, nil, str, or, not, getProperty, Block, Code, Name, CodeGen} from \"../codegen\"\nimport N from \"../names\"\nimport {resolveUrl} from \"../resolve\"\nimport {\n schemaRefOrVal,\n schemaHasRulesButRef,\n checkUnknownRules,\n checkStrictMode,\n unescapeJsonPointer,\n mergeEvaluated,\n} from \"../util\"\nimport type {JSONType, Rule, RuleGroup} from \"../rules\"\nimport {\n ErrorPaths,\n reportError,\n reportExtraError,\n resetErrorsCount,\n keyword$DataError,\n} from \"../errors\"\n\n// schema compilation - generates validation function, subschemaCode (below) is used for subschemas\nexport function validateFunctionCode(it: SchemaCxt): void {\n if (isSchemaObj(it)) {\n checkKeywords(it)\n if (schemaCxtHasRules(it)) {\n topSchemaObjCode(it)\n return\n }\n }\n validateFunction(it, () => topBoolOrEmptySchema(it))\n}\n\nfunction validateFunction(\n {gen, validateName, schema, schemaEnv, opts}: SchemaCxt,\n body: Block\n): void {\n if (opts.code.es5) {\n gen.func(validateName, _`${N.data}, ${N.valCxt}`, schemaEnv.$async, () => {\n gen.code(_`\"use strict\"; ${funcSourceUrl(schema, opts)}`)\n destructureValCxtES5(gen, opts)\n gen.code(body)\n })\n } else {\n gen.func(validateName, _`${N.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () =>\n gen.code(funcSourceUrl(schema, opts)).code(body)\n )\n }\n}\n\nfunction destructureValCxt(opts: InstanceOptions): Code {\n return _`{${N.instancePath}=\"\", ${N.parentData}, ${N.parentDataProperty}, ${N.rootData}=${\n N.data\n }${opts.dynamicRef ? _`, ${N.dynamicAnchors}={}` : nil}, ${N.isAllOfVariant} = 0}={}`\n}\n\nfunction destructureValCxtES5(gen: CodeGen, opts: InstanceOptions): void {\n gen.if(\n N.valCxt,\n () => {\n gen.var(N.instancePath, _`${N.valCxt}.${N.instancePath}`)\n gen.var(N.parentData, _`${N.valCxt}.${N.parentData}`)\n gen.var(N.parentDataProperty, _`${N.valCxt}.${N.parentDataProperty}`)\n gen.var(N.rootData, _`${N.valCxt}.${N.rootData}`)\n gen.var(N.isAllOfVariant, _`${N.valCxt}.${N.isAllOfVariant}`)\n if (opts.dynamicRef) gen.var(N.dynamicAnchors, _`${N.valCxt}.${N.dynamicAnchors}`)\n },\n () => {\n gen.var(N.instancePath, _`\"\"`)\n gen.var(N.parentData, _`undefined`)\n gen.var(N.parentDataProperty, _`undefined`)\n gen.var(N.rootData, N.data)\n gen.var(N.isAllOfVariant, _`0`)\n if (opts.dynamicRef) gen.var(N.dynamicAnchors, _`{}`)\n }\n )\n}\n\nfunction topSchemaObjCode(it: SchemaObjCxt): void {\n const {schema, opts, gen} = it\n validateFunction(it, () => {\n if (opts.$comment && schema.$comment) commentKeyword(it)\n checkNoDefault(it)\n gen.let(N.vErrors, null)\n gen.let(N.errors, 0)\n if (opts.unevaluated) resetEvaluated(it)\n typeAndKeywords(it)\n returnResults(it)\n })\n return\n}\n\nfunction resetEvaluated(it: SchemaObjCxt): void {\n // TODO maybe some hook to execute it in the end to check whether props/items are Name, as in assignEvaluated\n const {gen, validateName} = it\n it.evaluated = gen.const(\"evaluated\", _`${validateName}.evaluated`)\n gen.if(_`${it.evaluated}.dynamicProps`, () => gen.assign(_`${it.evaluated}.props`, _`undefined`))\n gen.if(_`${it.evaluated}.dynamicItems`, () => gen.assign(_`${it.evaluated}.items`, _`undefined`))\n}\n\nfunction funcSourceUrl(schema: AnySchema, opts: InstanceOptions): Code {\n const schId = typeof schema == \"object\" && schema[opts.schemaId]\n return schId && (opts.code.source || opts.code.process) ? _`/*# sourceURL=${schId} */` : nil\n}\n\n// schema compilation - this function is used recursively to generate code for sub-schemas\nfunction subschemaCode(it: SchemaCxt, valid: Name): void {\n if (isSchemaObj(it)) {\n checkKeywords(it)\n if (schemaCxtHasRules(it)) {\n subSchemaObjCode(it, valid)\n return\n }\n }\n boolOrEmptySchema(it, valid)\n}\n\nfunction schemaCxtHasRules({schema, self}: SchemaCxt): boolean {\n if (typeof schema == \"boolean\") return !schema\n for (const key in schema) if (self.RULES.all[key]) return true\n return false\n}\n\nfunction isSchemaObj(it: SchemaCxt): it is SchemaObjCxt {\n return typeof it.schema != \"boolean\"\n}\n\nfunction subSchemaObjCode(it: SchemaObjCxt, valid: Name): void {\n const {schema, gen, opts} = it\n if (opts.$comment && schema.$comment) commentKeyword(it)\n updateContext(it)\n checkAsyncSchema(it)\n const errsCount = gen.const(\"_errs\", N.errors)\n typeAndKeywords(it, errsCount)\n // TODO var\n gen.var(valid, _`${errsCount} === ${N.errors}`)\n}\n\nfunction checkKeywords(it: SchemaObjCxt): void {\n checkUnknownRules(it)\n checkRefsAndKeywords(it)\n}\n\nfunction typeAndKeywords(it: SchemaObjCxt, errsCount?: Name): void {\n if (it.opts.jtd) return schemaKeywords(it, [], false, errsCount)\n const types = getSchemaTypes(it.schema)\n const checkedTypes = coerceAndCheckDataType(it, types)\n schemaKeywords(it, types, !checkedTypes, errsCount)\n}\n\nfunction checkRefsAndKeywords(it: SchemaObjCxt): void {\n const {schema, errSchemaPath, opts, self} = it\n if (schema.$ref && opts.ignoreKeywordsWithRef && schemaHasRulesButRef(schema, self.RULES)) {\n self.logger.warn(`$ref: keywords ignored in schema at path \"${errSchemaPath}\"`)\n }\n}\n\nfunction checkNoDefault(it: SchemaObjCxt): void {\n const {schema, opts} = it\n if (schema.default !== undefined && opts.useDefaults && opts.strictSchema) {\n checkStrictMode(it, \"default is ignored in the schema root\")\n }\n}\n\nfunction updateContext(it: SchemaObjCxt): void {\n const schId = it.schema[it.opts.schemaId]\n if (schId) it.baseId = resolveUrl(it.opts.uriResolver, it.baseId, schId)\n}\n\nfunction checkAsyncSchema(it: SchemaObjCxt): void {\n if (it.schema.$async && !it.schemaEnv.$async) throw new Error(\"async schema in sync schema\")\n}\n\nfunction commentKeyword({gen, schemaEnv, schema, errSchemaPath, opts}: SchemaObjCxt): void {\n const msg = schema.$comment\n if (opts.$comment === true) {\n gen.code(_`${N.self}.logger.log(${msg})`)\n } else if (typeof opts.$comment == \"function\") {\n const schemaPath = str`${errSchemaPath}/$comment`\n const rootName = gen.scopeValue(\"root\", {ref: schemaEnv.root})\n gen.code(_`${N.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`)\n }\n}\n\nfunction returnResults(it: SchemaCxt): void {\n const {gen, schemaEnv, validateName, ValidationError, opts} = it\n if (schemaEnv.$async) {\n // TODO assign unevaluated\n gen.if(\n _`${N.errors} === 0`,\n () => gen.return(N.data),\n () => gen.throw(_`new ${ValidationError as Name}(${N.vErrors})`)\n )\n } else {\n gen.assign(_`${validateName}.errors`, N.vErrors)\n if (opts.unevaluated) assignEvaluated(it)\n gen.return(_`${N.errors} === 0`)\n }\n}\n\nfunction assignEvaluated({gen, evaluated, props, items}: SchemaCxt): void {\n if (props instanceof Name) gen.assign(_`${evaluated}.props`, props)\n if (items instanceof Name) gen.assign(_`${evaluated}.items`, items)\n}\n\nfunction schemaKeywords(\n it: SchemaObjCxt,\n types: JSONType[],\n typeErrors: boolean,\n errsCount?: Name\n): void {\n const {gen, schema, data, allErrors, opts, self} = it\n const {RULES} = self\n if (schema.$ref && (opts.ignoreKeywordsWithRef || !schemaHasRulesButRef(schema, RULES))) {\n gen.block(() => keywordCode(it, \"$ref\", (RULES.all.$ref as Rule).definition)) // TODO typecast\n return\n }\n if (!opts.jtd) checkStrictTypes(it, types)\n gen.block(() => {\n for (const group of RULES.rules) groupKeywords(group)\n groupKeywords(RULES.post)\n })\n\n function groupKeywords(group: RuleGroup): void {\n if (!shouldUseGroup(schema, group)) return\n if (group.type) {\n gen.if(checkDataType(group.type, data, opts.strictNumbers))\n iterateKeywords(it, group)\n if (types.length === 1 && types[0] === group.type && typeErrors) {\n gen.else()\n reportTypeError(it)\n }\n gen.endIf()\n } else {\n iterateKeywords(it, group)\n }\n // TODO make it \"ok\" call?\n if (!allErrors) gen.if(_`${N.errors} === ${errsCount || 0}`)\n }\n}\n\nfunction iterateKeywords(it: SchemaObjCxt, group: RuleGroup): void {\n const {\n gen,\n schema,\n opts: {useDefaults},\n } = it\n if (useDefaults) assignDefaults(it, group.type)\n gen.block(() => {\n for (const rule of group.rules) {\n if (shouldUseRule(schema, rule) || shouldForceUnevaluatedProperties(schema, rule)) {\n keywordCode(it, rule.keyword, rule.definition, group.type)\n }\n }\n })\n\n function shouldForceUnevaluatedProperties(schemaObj: AnySchemaObject, rule: Rule): boolean {\n return !!(\n rule.keyword === \"unevaluatedProperties\" &&\n (schemaObj.properties || schemaObj.patternProperties) &&\n !it.isAllOfVariant &&\n it.opts.defaultUnevaluatedProperties === false\n )\n }\n}\n\nfunction checkStrictTypes(it: SchemaObjCxt, types: JSONType[]): void {\n if (it.schemaEnv.meta || !it.opts.strictTypes) return\n checkContextTypes(it, types)\n if (!it.opts.allowUnionTypes) checkMultipleTypes(it, types)\n checkKeywordTypes(it, it.dataTypes)\n}\n\nfunction checkContextTypes(it: SchemaObjCxt, types: JSONType[]): void {\n if (!types.length) return\n if (!it.dataTypes.length) {\n it.dataTypes = types\n return\n }\n types.forEach((t) => {\n if (!includesType(it.dataTypes, t)) {\n strictTypesError(it, `type \"${t}\" not allowed by context \"${it.dataTypes.join(\",\")}\"`)\n }\n })\n narrowSchemaTypes(it, types)\n}\n\nfunction checkMultipleTypes(it: SchemaObjCxt, ts: JSONType[]): void {\n if (ts.length > 1 && !(ts.length === 2 && ts.includes(\"null\"))) {\n strictTypesError(it, \"use allowUnionTypes to allow union type keyword\")\n }\n}\n\nfunction checkKeywordTypes(it: SchemaObjCxt, ts: JSONType[]): void {\n const rules = it.self.RULES.all\n for (const keyword in rules) {\n const rule = rules[keyword]\n if (typeof rule == \"object\" && shouldUseRule(it.schema, rule)) {\n const {type} = rule.definition\n if (type.length && !type.some((t) => hasApplicableType(ts, t))) {\n strictTypesError(it, `missing type \"${type.join(\",\")}\" for keyword \"${keyword}\"`)\n }\n }\n }\n}\n\nfunction hasApplicableType(schTs: JSONType[], kwdT: JSONType): boolean {\n return schTs.includes(kwdT) || (kwdT === \"number\" && schTs.includes(\"integer\"))\n}\n\nfunction includesType(ts: JSONType[], t: JSONType): boolean {\n return ts.includes(t) || (t === \"integer\" && ts.includes(\"number\"))\n}\n\nfunction narrowSchemaTypes(it: SchemaObjCxt, withTypes: JSONType[]): void {\n const ts: JSONType[] = []\n for (const t of it.dataTypes) {\n if (includesType(withTypes, t)) ts.push(t)\n else if (withTypes.includes(\"integer\") && t === \"number\") ts.push(\"integer\")\n }\n it.dataTypes = ts\n}\n\nfunction strictTypesError(it: SchemaObjCxt, msg: string): void {\n const schemaPath = it.schemaEnv.baseId + it.errSchemaPath\n msg += ` at \"${schemaPath}\" (strictTypes)`\n checkStrictMode(it, msg, it.opts.strictTypes)\n}\n\nexport class KeywordCxt implements KeywordErrorCxt {\n readonly gen: CodeGen\n readonly allErrors?: boolean\n readonly keyword: string\n readonly data: Name // Name referencing the current level of the data instance\n readonly $data?: string | false\n schema: any // keyword value in the schema\n readonly schemaValue: Code | number | boolean // Code reference to keyword schema value or primitive value\n readonly schemaCode: Code | number | boolean // Code reference to resolved schema value (different if schema is $data)\n readonly schemaType: JSONType[] // allowed type(s) of keyword value in the schema\n readonly parentSchema: AnySchemaObject\n readonly errsCount?: Name // Name reference to the number of validation errors collected before this keyword,\n // requires option trackErrors in keyword definition\n params: KeywordCxtParams // object to pass parameters to error messages from keyword code\n readonly it: SchemaObjCxt // schema compilation context (schema is guaranteed to be an object, not boolean)\n readonly def: AddedKeywordDefinition\n\n constructor(it: SchemaObjCxt, def: AddedKeywordDefinition, keyword: string) {\n validateKeywordUsage(it, def, keyword)\n this.gen = it.gen\n this.allErrors = it.allErrors\n this.keyword = keyword\n this.data = it.data\n this.schema = it.schema[keyword]\n this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data\n this.schemaValue = schemaRefOrVal(it, this.schema, keyword, this.$data)\n this.schemaType = def.schemaType\n this.parentSchema = it.schema\n this.params = {}\n this.it = it\n this.def = def\n\n if (this.$data) {\n this.schemaCode = it.gen.const(\"vSchema\", getData(this.$data, it))\n } else {\n this.schemaCode = this.schemaValue\n if (!validSchemaType(this.schema, def.schemaType, def.allowUndefined)) {\n throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`)\n }\n }\n\n if (\"code\" in def ? def.trackErrors : def.errors !== false) {\n this.errsCount = it.gen.const(\"_errs\", N.errors)\n }\n }\n\n result(condition: Code, successAction?: () => void, failAction?: () => void): void {\n this.failResult(not(condition), successAction, failAction)\n }\n\n failResult(condition: Code, successAction?: () => void, failAction?: () => void): void {\n this.gen.if(condition)\n if (failAction) failAction()\n else this.error()\n if (successAction) {\n this.gen.else()\n successAction()\n if (this.allErrors) this.gen.endIf()\n } else {\n if (this.allErrors) this.gen.endIf()\n else this.gen.else()\n }\n }\n\n pass(condition: Code, failAction?: () => void): void {\n this.failResult(not(condition), undefined, failAction)\n }\n\n fail(condition?: Code): void {\n if (condition === undefined) {\n this.error()\n if (!this.allErrors) this.gen.if(false) // this branch will be removed by gen.optimize\n return\n }\n this.gen.if(condition)\n this.error()\n if (this.allErrors) this.gen.endIf()\n else this.gen.else()\n }\n\n fail$data(condition: Code): void {\n if (!this.$data) return this.fail(condition)\n const {schemaCode} = this\n this.fail(_`${schemaCode} !== undefined && (${or(this.invalid$data(), condition)})`)\n }\n\n error(append?: boolean, errorParams?: KeywordCxtParams, errorPaths?: ErrorPaths): void {\n if (errorParams) {\n this.setParams(errorParams)\n this._error(append, errorPaths)\n this.setParams({})\n return\n }\n this._error(append, errorPaths)\n }\n\n private _error(append?: boolean, errorPaths?: ErrorPaths): void {\n ;(append ? reportExtraError : reportError)(this, this.def.error, errorPaths)\n }\n\n $dataError(): void {\n reportError(this, this.def.$dataError || keyword$DataError)\n }\n\n reset(): void {\n if (this.errsCount === undefined) throw new Error('add \"trackErrors\" to keyword definition')\n resetErrorsCount(this.gen, this.errsCount)\n }\n\n ok(cond: Code | boolean): void {\n if (!this.allErrors) this.gen.if(cond)\n }\n\n setParams(obj: KeywordCxtParams, assign?: true): void {\n if (assign) Object.assign(this.params, obj)\n else this.params = obj\n }\n\n block$data(valid: Name, codeBlock: () => void, $dataValid: Code = nil): void {\n this.gen.block(() => {\n this.check$data(valid, $dataValid)\n codeBlock()\n })\n }\n\n check$data(valid: Name = nil, $dataValid: Code = nil): void {\n if (!this.$data) return\n const {gen, schemaCode, schemaType, def} = this\n gen.if(or(_`${schemaCode} === undefined`, $dataValid))\n if (valid !== nil) gen.assign(valid, true)\n if (schemaType.length || def.validateSchema) {\n gen.elseIf(this.invalid$data())\n this.$dataError()\n if (valid !== nil) gen.assign(valid, false)\n }\n gen.else()\n }\n\n invalid$data(): Code {\n const {gen, schemaCode, schemaType, def, it} = this\n return or(wrong$DataType(), invalid$DataSchema())\n\n function wrong$DataType(): Code {\n if (schemaType.length) {\n /* istanbul ignore if */\n if (!(schemaCode instanceof Name)) throw new Error(\"ajv implementation error\")\n const st = Array.isArray(schemaType) ? schemaType : [schemaType]\n return _`${checkDataTypes(st, schemaCode, it.opts.strictNumbers, DataType.Wrong)}`\n }\n return nil\n }\n\n function invalid$DataSchema(): Code {\n if (def.validateSchema) {\n const validateSchemaRef = gen.scopeValue(\"validate$data\", {ref: def.validateSchema}) // TODO value.code for standalone\n return _`!${validateSchemaRef}(${schemaCode})`\n }\n return nil\n }\n }\n\n subschema(appl: SubschemaArgs, valid: Name, isAllOfVariant?: boolean): SchemaCxt {\n const subschema = getSubschema(this.it, appl)\n extendSubschemaData(subschema, this.it, appl)\n extendSubschemaMode(subschema, appl)\n const nextContext = {\n ...this.it,\n ...subschema,\n items: undefined,\n props: undefined,\n isAllOfVariant,\n }\n subschemaCode(nextContext, valid)\n return nextContext\n }\n\n mergeEvaluated(schemaCxt: SchemaCxt, toName?: typeof Name): void {\n const {it, gen} = this\n if (!it.opts.unevaluated) return\n if (it.props !== true && schemaCxt.props !== undefined) {\n it.props = mergeEvaluated.props(gen, schemaCxt.props, it.props, toName)\n }\n if (it.items !== true && schemaCxt.items !== undefined) {\n it.items = mergeEvaluated.items(gen, schemaCxt.items, it.items, toName)\n }\n }\n\n mergeValidEvaluated(schemaCxt: SchemaCxt, valid: Name): boolean | void {\n const {it, gen} = this\n if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {\n gen.if(valid, () => this.mergeEvaluated(schemaCxt, Name))\n return true\n }\n }\n}\n\nfunction keywordCode(\n it: SchemaObjCxt,\n keyword: string,\n def: AddedKeywordDefinition,\n ruleType?: JSONType\n): void {\n const cxt = new KeywordCxt(it, def, keyword)\n if (\"code\" in def) {\n def.code(cxt, ruleType)\n } else if (cxt.$data && def.validate) {\n funcKeywordCode(cxt, def)\n } else if (\"macro\" in def) {\n macroKeywordCode(cxt, def)\n } else if (def.compile || def.validate) {\n funcKeywordCode(cxt, def)\n }\n}\n\nconst JSON_POINTER = /^\\/(?:[^~]|~0|~1)*$/\nconst RELATIVE_JSON_POINTER = /^([0-9]+)(#|\\/(?:[^~]|~0|~1)*)?$/\nexport function getData(\n $data: string,\n {dataLevel, dataNames, dataPathArr}: SchemaCxt\n): Code | number {\n let jsonPointer\n let data: Code\n if ($data === \"\") return N.rootData\n if ($data[0] === \"/\") {\n if (!JSON_POINTER.test($data)) throw new Error(`Invalid JSON-pointer: ${$data}`)\n jsonPointer = $data\n data = N.rootData\n } else {\n const matches = RELATIVE_JSON_POINTER.exec($data)\n if (!matches) throw new Error(`Invalid JSON-pointer: ${$data}`)\n const up: number = +matches[1]\n jsonPointer = matches[2]\n if (jsonPointer === \"#\") {\n if (up >= dataLevel) throw new Error(errorMsg(\"property/index\", up))\n return dataPathArr[dataLevel - up]\n }\n if (up > dataLevel) throw new Error(errorMsg(\"data\", up))\n data = dataNames[dataLevel - up]\n if (!jsonPointer) return data\n }\n\n let expr = data\n const segments = jsonPointer.split(\"/\")\n for (const segment of segments) {\n if (segment) {\n data = _`${data}${getProperty(unescapeJsonPointer(segment))}`\n expr = _`${expr} && ${data}`\n }\n }\n return expr\n\n function errorMsg(pointerType: string, up: number): string {\n return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`\n }\n}\n", "import type {ErrorObject} from \"../types\"\n\nexport default class ValidationError extends Error {\n readonly errors: Partial[]\n readonly ajv: true\n readonly validation: true\n\n constructor(errors: Partial[]) {\n super(\"validation failed\")\n this.errors = errors\n this.ajv = this.validation = true\n }\n}\n", "import {resolveUrl, normalizeId, getFullPath} from \"./resolve\"\nimport type {UriResolver} from \"../types\"\n\nexport default class MissingRefError extends Error {\n readonly missingRef: string\n readonly missingSchema: string\n\n constructor(resolver: UriResolver, baseId: string, ref: string, msg?: string) {\n super(msg || `can't resolve reference ${ref} from id ${baseId}`)\n this.missingRef = resolveUrl(resolver, baseId, ref)\n this.missingSchema = normalizeId(getFullPath(resolver, this.missingRef))\n }\n}\n", "import type {\n AnySchema,\n AnySchemaObject,\n AnyValidateFunction,\n AsyncValidateFunction,\n EvaluatedProperties,\n EvaluatedItems,\n} from \"../types\"\nimport type Ajv from \"../core\"\nimport type {InstanceOptions} from \"../core\"\nimport {CodeGen, _, nil, stringify, Name, Code, ValueScopeName} from \"./codegen\"\nimport ValidationError from \"../runtime/validation_error\"\nimport N from \"./names\"\nimport {LocalRefs, getFullPath, _getFullPath, inlineRef, normalizeId, resolveUrl} from \"./resolve\"\nimport {schemaHasRulesButRef, unescapeFragment} from \"./util\"\nimport {validateFunctionCode} from \"./validate\"\nimport {URIComponent} from \"fast-uri\"\nimport {JSONType} from \"./rules\"\n\nexport type SchemaRefs = {\n [Ref in string]?: SchemaEnv | AnySchema\n}\n\nexport interface SchemaCxt {\n readonly gen: CodeGen\n readonly allErrors?: boolean // validation mode - whether to collect all errors or break on error\n readonly data: Name // Name with reference to the current part of data instance\n readonly parentData: Name // should be used in keywords modifying data\n readonly parentDataProperty: Code | number // should be used in keywords modifying data\n readonly dataNames: Name[]\n readonly dataPathArr: (Code | number)[]\n readonly dataLevel: number // the level of the currently validated data,\n // it can be used to access both the property names and the data on all levels from the top.\n dataTypes: JSONType[] // data types applied to the current part of data instance\n definedProperties: Set // set of properties to keep track of for required checks\n readonly topSchemaRef: Code\n readonly validateName: Name\n evaluated?: Name\n readonly ValidationError?: Name\n readonly schema: AnySchema // current schema object - equal to parentSchema passed via KeywordCxt\n readonly schemaEnv: SchemaEnv\n readonly rootId: string\n baseId: string // the current schema base URI that should be used as the base for resolving URIs in references (\\$ref)\n readonly schemaPath: Code // the run-time expression that evaluates to the property name of the current schema\n readonly errSchemaPath: string // this is actual string, should not be changed to Code\n readonly errorPath: Code\n readonly propertyName?: Name\n readonly compositeRule?: boolean // true indicates that the current schema is inside the compound keyword,\n // where failing some rule doesn't mean validation failure (`anyOf`, `oneOf`, `not`, `if`).\n // This flag is used to determine whether you can return validation result immediately after any error in case the option `allErrors` is not `true.\n // You only need to use it if you have many steps in your keywords and potentially can define multiple errors.\n props?: EvaluatedProperties | Name // properties evaluated by this schema - used by parent schema or assigned to validation function\n items?: EvaluatedItems | Name // last item evaluated by this schema - used by parent schema or assigned to validation function\n jtdDiscriminator?: string\n jtdMetadata?: boolean\n readonly createErrors?: boolean\n readonly opts: InstanceOptions // Ajv instance option.\n readonly self: Ajv // current Ajv instance\n readonly isAllOfVariant?: boolean // if the current schema is direct child of allOf\n}\n\nexport interface SchemaObjCxt extends SchemaCxt {\n readonly schema: AnySchemaObject\n}\ninterface SchemaEnvArgs {\n readonly schema: AnySchema\n readonly schemaId?: \"$id\" | \"id\"\n readonly root?: SchemaEnv\n readonly baseId?: string\n readonly schemaPath?: string\n readonly localRefs?: LocalRefs\n readonly meta?: boolean\n}\n\nexport class SchemaEnv implements SchemaEnvArgs {\n readonly schema: AnySchema\n readonly schemaId?: \"$id\" | \"id\"\n readonly root: SchemaEnv\n baseId: string // TODO possibly, it should be readonly\n schemaPath?: string\n localRefs?: LocalRefs\n readonly meta?: boolean\n readonly $async?: boolean // true if the current schema is asynchronous.\n readonly refs: SchemaRefs = {}\n readonly dynamicAnchors: {[Ref in string]?: true} = {}\n validate?: AnyValidateFunction\n validateName?: ValueScopeName\n serialize?: (data: unknown) => string\n serializeName?: ValueScopeName\n parse?: (data: string) => unknown\n parseName?: ValueScopeName\n\n constructor(env: SchemaEnvArgs) {\n let schema: AnySchemaObject | undefined\n if (typeof env.schema == \"object\") schema = env.schema\n this.schema = env.schema\n this.schemaId = env.schemaId\n this.root = env.root || this\n this.baseId = env.baseId ?? normalizeId(schema?.[env.schemaId || \"$id\"])\n this.schemaPath = env.schemaPath\n this.localRefs = env.localRefs\n this.meta = env.meta\n this.$async = schema?.$async\n this.refs = {}\n }\n}\n\n// let codeSize = 0\n// let nodeCount = 0\n\n// Compiles schema in SchemaEnv\nexport function compileSchema(this: Ajv, sch: SchemaEnv): SchemaEnv {\n // TODO refactor - remove compilations\n const _sch = getCompilingSchema.call(this, sch)\n if (_sch) return _sch\n const rootId = getFullPath(this.opts.uriResolver, sch.root.baseId) // TODO if getFullPath removed 1 tests fails\n const {es5, lines} = this.opts.code\n const {ownProperties} = this.opts\n const gen = new CodeGen(this.scope, {es5, lines, ownProperties})\n\n let _ValidationError\n if (sch.$async) {\n _ValidationError = gen.scopeValue(\"Error\", {\n ref: ValidationError,\n code: _`require(\"ajv/dist/runtime/validation_error\").default`,\n })\n }\n\n const validateName = gen.scopeName(\"validate\")\n sch.validateName = validateName\n\n const schemaCxt: SchemaCxt = {\n gen,\n allErrors: this.opts.allErrors,\n data: N.data,\n parentData: N.parentData,\n parentDataProperty: N.parentDataProperty,\n dataNames: [N.data],\n dataPathArr: [nil], // TODO can its length be used as dataLevel if nil is removed?\n dataLevel: 0,\n dataTypes: [],\n definedProperties: new Set(),\n topSchemaRef: gen.scopeValue(\n \"schema\",\n this.opts.code.source === true\n ? {ref: sch.schema, code: stringify(sch.schema)}\n : {ref: sch.schema}\n ),\n validateName,\n ValidationError: _ValidationError,\n schema: sch.schema,\n schemaEnv: sch,\n rootId,\n baseId: sch.baseId || rootId,\n schemaPath: nil,\n errSchemaPath: sch.schemaPath || (this.opts.jtd ? \"\" : \"#\"),\n errorPath: _`\"\"`,\n opts: this.opts,\n self: this,\n }\n\n let sourceCode: string | undefined\n try {\n this._compilations.add(sch)\n validateFunctionCode(schemaCxt)\n gen.optimize(this.opts.code.optimize)\n // gen.optimize(1)\n const validateCode = gen.toString()\n sourceCode = `const visitedNodesForRef = new WeakMap(); ${gen.scopeRefs(\n N.scope\n )}return ${validateCode}`\n // console.log((codeSize += sourceCode.length), (nodeCount += gen.nodeCount))\n if (this.opts.code.process) sourceCode = this.opts.code.process(sourceCode, sch)\n // console.log(\"\\n\\n\\n *** \\n\", sourceCode)\n const makeValidate = new Function(`${N.self}`, `${N.scope}`, sourceCode)\n const validate: AnyValidateFunction = makeValidate(this, this.scope.get())\n this.scope.value(validateName, {ref: validate})\n\n validate.errors = null\n validate.schema = sch.schema\n validate.schemaEnv = sch\n if (sch.$async) (validate as AsyncValidateFunction).$async = true\n if (this.opts.code.source === true) {\n validate.source = {validateName, validateCode, scopeValues: gen._values}\n }\n if (this.opts.unevaluated) {\n const {props, items} = schemaCxt\n validate.evaluated = {\n props: props instanceof Name ? undefined : props,\n items: items instanceof Name ? undefined : items,\n dynamicProps: props instanceof Name,\n dynamicItems: items instanceof Name,\n }\n if (validate.source) validate.source.evaluated = stringify(validate.evaluated)\n }\n sch.validate = validate\n return sch\n } catch (e) {\n delete sch.validate\n delete sch.validateName\n if (sourceCode) this.logger.error(\"Error compiling schema, function code:\", sourceCode)\n // console.log(\"\\n\\n\\n *** \\n\", sourceCode, this.opts)\n throw e\n } finally {\n this._compilations.delete(sch)\n }\n}\n\nexport function resolveRef(\n this: Ajv,\n root: SchemaEnv,\n baseId: string,\n origRef: string\n): AnySchema | SchemaEnv | undefined {\n const ref = resolveUrl(this.opts.uriResolver, baseId, origRef)\n const schOrFunc = root.refs[ref]\n if (schOrFunc) return schOrFunc\n\n let _sch = resolve.call(this, root, ref)\n if (_sch === undefined) {\n const schema = root.localRefs?.[ref] // TODO maybe localRefs should hold SchemaEnv\n const {schemaId} = this.opts\n if (schema) _sch = new SchemaEnv({schema, schemaId, root, baseId})\n }\n\n if (_sch === undefined && this.opts.loadSchemaSync) {\n const remoteSchema = this.opts.loadSchemaSync(baseId, origRef, ref)\n\n if (remoteSchema && !(this.refs[ref] || this.schemas[ref])) {\n this.addSchema(remoteSchema, ref, undefined)\n _sch = resolve.call(this, root, ref)\n }\n }\n\n if (_sch === undefined) return\n return (root.refs[ref] = inlineOrCompile.call(this, _sch))\n}\n\nfunction inlineOrCompile(this: Ajv, sch: SchemaEnv): AnySchema | SchemaEnv {\n if (inlineRef(sch.schema, this.opts.inlineRefs)) return sch.schema\n return sch.validate ? sch : compileSchema.call(this, sch)\n}\n\n// Index of schema compilation in the currently compiled list\nexport function getCompilingSchema(this: Ajv, schEnv: SchemaEnv): SchemaEnv | void {\n for (const sch of this._compilations) {\n if (sameSchemaEnv(sch, schEnv)) return sch\n }\n}\n\nfunction sameSchemaEnv(s1: SchemaEnv, s2: SchemaEnv): boolean {\n return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId\n}\n\n// resolve and compile the references ($ref)\n// TODO returns AnySchemaObject (if the schema can be inlined) or validation function\nfunction resolve(\n this: Ajv,\n root: SchemaEnv, // information about the root schema for the current schema\n ref: string // reference to resolve\n): SchemaEnv | undefined {\n let sch\n while (typeof (sch = this.refs[ref]) == \"string\") ref = sch\n return sch || this.schemas[ref] || resolveSchema.call(this, root, ref)\n}\n\n// Resolve schema, its root and baseId\nexport function resolveSchema(\n this: Ajv,\n root: SchemaEnv, // root object with properties schema, refs TODO below SchemaEnv is assigned to it\n ref: string // reference to resolve\n): SchemaEnv | undefined {\n const p = this.opts.uriResolver.parse(ref)\n const refPath = _getFullPath(this.opts.uriResolver, p)\n let baseId = getFullPath(this.opts.uriResolver, root.baseId, undefined)\n // TODO `Object.keys(root.schema).length > 0` should not be needed - but removing breaks 2 tests\n if (Object.keys(root.schema).length > 0 && refPath === baseId) {\n return getJsonPointer.call(this, p, root)\n }\n\n const id = normalizeId(refPath)\n const schOrRef = this.refs[id] || this.schemas[id]\n if (typeof schOrRef == \"string\") {\n const sch = resolveSchema.call(this, root, schOrRef)\n if (typeof sch?.schema !== \"object\") return\n return getJsonPointer.call(this, p, sch)\n }\n\n if (typeof schOrRef?.schema !== \"object\") return\n if (!schOrRef.validate) compileSchema.call(this, schOrRef)\n if (id === normalizeId(ref)) {\n const {schema} = schOrRef\n const {schemaId} = this.opts\n const schId = schema[schemaId]\n if (schId) baseId = resolveUrl(this.opts.uriResolver, baseId, schId)\n return new SchemaEnv({schema, schemaId, root, baseId})\n }\n return getJsonPointer.call(this, p, schOrRef)\n}\n\nconst PREVENT_SCOPE_CHANGE = new Set([\n \"properties\",\n \"patternProperties\",\n \"enum\",\n \"dependencies\",\n \"definitions\",\n])\n\nfunction getJsonPointer(\n this: Ajv,\n parsedRef: URIComponent,\n {baseId, schema, root}: SchemaEnv\n): SchemaEnv | undefined {\n if (parsedRef.fragment?.[0] !== \"/\") return\n for (const part of parsedRef.fragment.slice(1).split(\"/\")) {\n if (typeof schema === \"boolean\") return\n const partSchema = schema[unescapeFragment(part)]\n if (partSchema === undefined) return\n schema = partSchema\n // TODO PREVENT_SCOPE_CHANGE could be defined in keyword def?\n const schId = typeof schema === \"object\" && schema[this.opts.schemaId]\n if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {\n baseId = resolveUrl(this.opts.uriResolver, baseId, schId)\n }\n }\n let env: SchemaEnv | undefined\n if (typeof schema != \"boolean\" && schema.$ref && !schemaHasRulesButRef(schema, this.RULES)) {\n const $ref = resolveUrl(this.opts.uriResolver, baseId, schema.$ref)\n env = resolveSchema.call(this, root, $ref)\n }\n // even though resolution failed we need to return SchemaEnv to throw exception\n // so that compileAsync loads missing schema.\n const {schemaId} = this.opts\n env = env || new SchemaEnv({schema, schemaId, root, baseId})\n if (env.schema !== env.root.schema) return env\n return undefined\n}\n", "{\n \"$id\": \"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\",\n \"description\": \"Meta-schema for $data reference (JSON AnySchema extension proposal)\",\n \"type\": \"object\",\n \"required\": [\"$data\"],\n \"properties\": {\n \"$data\": {\n \"type\": \"string\",\n \"anyOf\": [{\"format\": \"relative-json-pointer\"}, {\"format\": \"json-pointer\"}]\n }\n },\n \"additionalProperties\": false\n}\n", "import * as uri from \"fast-uri\"\n\ntype URI = typeof uri & {code: string}\n;(uri as URI).code = 'require(\"ajv/dist/runtime/uri\").default'\n\nexport default uri as URI\n", "export {\n Format,\n FormatDefinition,\n AsyncFormatDefinition,\n KeywordDefinition,\n KeywordErrorDefinition,\n CodeKeywordDefinition,\n MacroKeywordDefinition,\n FuncKeywordDefinition,\n Vocabulary,\n Schema,\n SchemaObject,\n AnySchemaObject,\n AsyncSchema,\n AnySchema,\n ValidateFunction,\n AsyncValidateFunction,\n AnyValidateFunction,\n ErrorObject,\n ErrorNoParams,\n} from \"./types\"\n\nexport {SchemaCxt, SchemaObjCxt} from \"./compile\"\nexport interface Plugin {\n (ajv: Ajv, options?: Opts): Ajv\n [prop: string]: any\n}\n\nexport {KeywordCxt} from \"./compile/validate\"\nexport {DefinedError} from \"./vocabularies/errors\"\nexport {JSONType} from \"./compile/rules\"\nexport {JSONSchemaType} from \"./types/json-schema\"\nexport {JTDSchemaType, SomeJTDSchemaType, JTDDataType} from \"./types/jtd-schema\"\nexport {_, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions} from \"./compile/codegen\"\n\nimport type {\n Schema,\n AnySchema,\n AnySchemaObject,\n SchemaObject,\n AsyncSchema,\n Vocabulary,\n KeywordDefinition,\n AddedKeywordDefinition,\n AnyValidateFunction,\n ValidateFunction,\n AsyncValidateFunction,\n ErrorObject,\n Format,\n AddedFormat,\n RegExpEngine,\n UriResolver,\n} from \"./types\"\nimport type {JSONSchemaType} from \"./types/json-schema\"\nimport type {JTDSchemaType, SomeJTDSchemaType, JTDDataType} from \"./types/jtd-schema\"\nimport ValidationError from \"./runtime/validation_error\"\nimport MissingRefError from \"./compile/ref_error\"\nimport {getRules, ValidationRules, Rule, RuleGroup, JSONType} from \"./compile/rules\"\nimport {SchemaEnv, compileSchema, resolveSchema} from \"./compile\"\nimport {Code, ValueScope} from \"./compile/codegen\"\nimport {normalizeId, getSchemaRefs} from \"./compile/resolve\"\nimport {getJSONTypes} from \"./compile/validate/dataType\"\nimport {eachItem} from \"./compile/util\"\nimport * as $dataRefSchema from \"./refs/data.json\"\n\nimport DefaultUriResolver from \"./runtime/uri\"\n\nconst defaultRegExp: RegExpEngine = (str, flags) => new RegExp(str, flags)\ndefaultRegExp.code = \"new RegExp\"\n\nconst META_IGNORE_OPTIONS: (keyof Options)[] = [\n \"removeAdditional\",\n \"useDefaults\",\n \"coerceTypes\",\n \"defaultUnevaluatedProperties\",\n \"defaultAdditionalProperties\",\n]\nconst EXT_SCOPE_NAMES = new Set([\n \"validate\",\n \"serialize\",\n \"parse\",\n \"wrapper\",\n \"root\",\n \"schema\",\n \"keyword\",\n \"pattern\",\n \"formats\",\n \"validate$data\",\n \"func\",\n \"obj\",\n \"Error\",\n])\n\nexport type Options = CurrentOptions & DeprecatedOptions\n\nexport interface CurrentOptions {\n // strict mode options (NEW)\n strict?: boolean | \"log\"\n strictSchema?: boolean | \"log\"\n strictNumbers?: boolean | \"log\"\n strictTypes?: boolean | \"log\"\n strictTuples?: boolean | \"log\"\n strictRequired?: boolean | \"log\"\n allowMatchingProperties?: boolean // disables a strict mode restriction\n allowUnionTypes?: boolean\n validateFormats?: boolean\n // validation and reporting options:\n $data?: boolean\n allErrors?: boolean\n verbose?: boolean\n discriminator?: boolean\n unicodeRegExp?: boolean\n timestamp?: \"string\" | \"date\" // JTD only\n parseDate?: boolean // JTD only\n allowDate?: boolean // JTD only\n specialNumbers?: \"fast\" | \"null\" // JTD only\n $comment?:\n | true\n | ((comment: string, schemaPath?: string, rootSchema?: AnySchemaObject) => unknown)\n formats?: {[Name in string]?: Format}\n keywords?: Vocabulary\n schemas?: AnySchema[] | {[Key in string]?: AnySchema}\n logger?: Logger | false\n loadSchema?: (uri: string) => Promise\n loadSchemaSync?: (base: string, $ref: string, id: string) => AnySchemaObject | boolean\n // options to modify validated data:\n removeAdditional?: boolean | \"all\" | \"failing\"\n defaultUnevaluatedProperties?: boolean\n defaultAdditionalProperties?: boolean // @deprecated\n\n useDefaults?: boolean | \"empty\"\n coerceTypes?: boolean | \"array\"\n // advanced options:\n next?: boolean // NEW\n unevaluated?: boolean // NEW\n dynamicRef?: boolean // NEW\n schemaId?: \"id\" | \"$id\"\n jtd?: boolean // NEW\n meta?: SchemaObject | boolean\n defaultMeta?: string | AnySchemaObject\n validateSchema?: boolean | \"log\"\n addUsedSchema?: boolean\n inlineRefs?: boolean | number\n passContext?: boolean\n loopRequired?: number\n loopEnum?: number // NEW\n ownProperties?: boolean\n multipleOfPrecision?: number\n int32range?: boolean // JTD only\n messages?: boolean\n code?: CodeOptions // NEW\n uriResolver?: UriResolver\n}\n\nexport interface CodeOptions {\n es5?: boolean\n esm?: boolean\n lines?: boolean\n optimize?: boolean | number\n formats?: Code // code to require (or construct) map of available formats - for standalone code\n source?: boolean\n process?: (code: string, schema?: SchemaEnv) => string\n regExp?: RegExpEngine\n}\n\ninterface InstanceCodeOptions extends CodeOptions {\n regExp: RegExpEngine\n optimize: number\n}\n\ninterface DeprecatedOptions {\n /** @deprecated */\n ignoreKeywordsWithRef?: boolean\n /** @deprecated */\n jsPropertySyntax?: boolean // added instead of jsonPointers\n /** @deprecated */\n unicode?: boolean\n}\n\ninterface RemovedOptions {\n format?: boolean\n errorDataPath?: \"object\" | \"property\"\n nullable?: boolean // \"nullable\" keyword is supported by default\n jsonPointers?: boolean\n extendRefs?: true | \"ignore\" | \"fail\"\n missingRefs?: true | \"ignore\" | \"fail\"\n processCode?: (code: string, schema?: SchemaEnv) => string\n sourceCode?: boolean\n strictDefaults?: boolean\n strictKeywords?: boolean\n uniqueItems?: boolean\n unknownFormats?: true | string[] | \"ignore\"\n cache?: any\n serialize?: (schema: AnySchema) => unknown\n ajvErrors?: boolean\n}\n\ntype OptionsInfo = {\n [K in keyof T]-?: string | undefined\n}\n\nconst removedOptions: OptionsInfo = {\n errorDataPath: \"\",\n format: \"`validateFormats: false` can be used instead.\",\n nullable: '\"nullable\" keyword is supported by default.',\n jsonPointers: \"Deprecated jsPropertySyntax can be used instead.\",\n extendRefs: \"Deprecated ignoreKeywordsWithRef can be used instead.\",\n missingRefs: \"Pass empty schema with $id that should be ignored to ajv.addSchema.\",\n processCode: \"Use option `code: {process: (code, schemaEnv: object) => string}`\",\n sourceCode: \"Use option `code: {source: true}`\",\n strictDefaults: \"It is default now, see option `strict`.\",\n strictKeywords: \"It is default now, see option `strict`.\",\n uniqueItems: '\"uniqueItems\" keyword is always validated.',\n unknownFormats: \"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).\",\n cache: \"Map is used as cache, schema object as key.\",\n serialize: \"Map is used as cache, schema object as key.\",\n ajvErrors: \"It is default now.\",\n}\n\nconst deprecatedOptions: OptionsInfo = {\n ignoreKeywordsWithRef: \"\",\n jsPropertySyntax: \"\",\n unicode: '\"minLength\"/\"maxLength\" account for unicode characters by default.',\n}\n\ntype RequiredInstanceOptions = {\n [K in\n | \"strictSchema\"\n | \"strictNumbers\"\n | \"strictTypes\"\n | \"strictTuples\"\n | \"strictRequired\"\n | \"inlineRefs\"\n | \"loopRequired\"\n | \"loopEnum\"\n | \"meta\"\n | \"messages\"\n | \"schemaId\"\n | \"addUsedSchema\"\n | \"validateSchema\"\n | \"validateFormats\"\n | \"int32range\"\n | \"unicodeRegExp\"\n | \"uriResolver\"]: NonNullable\n} & {code: InstanceCodeOptions}\n\nexport type InstanceOptions = Options & RequiredInstanceOptions\n\nconst MAX_EXPRESSION = 200\n\n// eslint-disable-next-line complexity\nfunction requiredOptions(o: Options): RequiredInstanceOptions {\n const s = o.strict\n const _optz = o.code?.optimize\n const optimize = _optz === true || _optz === undefined ? 1 : _optz || 0\n const regExp = o.code?.regExp ?? defaultRegExp\n const uriResolver = o.uriResolver ?? DefaultUriResolver\n return {\n strictSchema: o.strictSchema ?? s ?? true,\n strictNumbers: o.strictNumbers ?? s ?? true,\n strictTypes: o.strictTypes ?? s ?? \"log\",\n strictTuples: o.strictTuples ?? s ?? \"log\",\n strictRequired: o.strictRequired ?? s ?? false,\n code: o.code ? {...o.code, optimize, regExp} : {optimize, regExp},\n loopRequired: o.loopRequired ?? MAX_EXPRESSION,\n loopEnum: o.loopEnum ?? MAX_EXPRESSION,\n meta: o.meta ?? true,\n messages: o.messages ?? true,\n inlineRefs: o.inlineRefs ?? true,\n schemaId: o.schemaId ?? \"$id\",\n addUsedSchema: o.addUsedSchema ?? true,\n validateSchema: o.validateSchema ?? true,\n validateFormats: o.validateFormats ?? true,\n unicodeRegExp: o.unicodeRegExp ?? true,\n int32range: o.int32range ?? true,\n uriResolver: uriResolver,\n }\n}\n\nexport interface Logger {\n log(...args: unknown[]): unknown\n warn(...args: unknown[]): unknown\n error(...args: unknown[]): unknown\n}\n\nexport default class Ajv {\n opts: InstanceOptions\n errors?: ErrorObject[] | null // errors from the last validation\n logger: Logger\n // shared external scope values for compiled functions\n readonly scope: ValueScope\n readonly schemas: {[Key in string]?: SchemaEnv} = {}\n readonly refs: {[Ref in string]?: SchemaEnv | string} = {}\n readonly formats: {[Name in string]?: AddedFormat} = {}\n readonly RULES: ValidationRules\n readonly _compilations: Set = new Set()\n private readonly _loading: {[Ref in string]?: Promise} = {}\n private readonly _cache: Map = new Map()\n private readonly _metaOpts: InstanceOptions\n\n static ValidationError = ValidationError\n static MissingRefError = MissingRefError\n\n constructor(opts: Options = {}) {\n opts = this.opts = {...opts, ...requiredOptions(opts)}\n const {es5, lines} = this.opts.code\n\n this.scope = new ValueScope({scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines})\n this.logger = getLogger(opts.logger)\n const formatOpt = opts.validateFormats\n opts.validateFormats = false\n\n this.RULES = getRules()\n checkOptions.call(this, removedOptions, opts, \"NOT SUPPORTED\")\n checkOptions.call(this, deprecatedOptions, opts, \"DEPRECATED\", \"warn\")\n this._metaOpts = getMetaSchemaOptions.call(this)\n\n if (opts.formats) addInitialFormats.call(this)\n this._addVocabularies()\n this._addDefaultMetaSchema()\n if (opts.keywords) addInitialKeywords.call(this, opts.keywords)\n if (typeof opts.meta == \"object\") this.addMetaSchema(opts.meta)\n addInitialSchemas.call(this)\n opts.validateFormats = formatOpt\n }\n\n _addVocabularies(): void {\n this.addKeyword(\"$async\")\n }\n\n _addDefaultMetaSchema(): void {\n const {$data, meta, schemaId} = this.opts\n let _dataRefSchema: SchemaObject = $dataRefSchema\n if (schemaId === \"id\") {\n _dataRefSchema = {...$dataRefSchema}\n _dataRefSchema.id = _dataRefSchema.$id\n delete _dataRefSchema.$id\n }\n if (meta && $data) this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false)\n }\n\n defaultMeta(): string | AnySchemaObject | undefined {\n const {meta, schemaId} = this.opts\n return (this.opts.defaultMeta = typeof meta == \"object\" ? meta[schemaId] || meta : undefined)\n }\n\n // Set the defaultUnevaluatedProperties option.\n // WARNING: This only affects schemas compiled AFTER this method is called.\n // Already-compiled schemas in the cache will NOT be affected.\n // Consider clearing the cache or creating a new Ajv instance if you need\n // different behavior for the same schemas.\n setDefaultUnevaluatedProperties(value: boolean): void {\n this.opts.defaultUnevaluatedProperties = value\n }\n\n // Validate data using schema\n // AnySchema will be compiled and cached using schema itself as a key for Map\n validate(schema: Schema | string, data: unknown): boolean\n validate(schemaKeyRef: AnySchema | string, data: unknown): boolean | Promise\n validate(schema: Schema | JSONSchemaType | string, data: unknown): data is T\n // Separated for type inference to work\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n validate(schema: JTDSchemaType, data: unknown): data is T\n // This overload is only intended for typescript inference, the first\n // argument prevents manual type annotation from matching this overload\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n validate(\n schema: T,\n data: unknown\n ): data is JTDDataType\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n validate(schema: AsyncSchema, data: unknown | T): Promise\n validate(schemaKeyRef: AnySchema | string, data: unknown): data is T | Promise\n validate(\n schemaKeyRef: AnySchema | string, // key, ref or schema object\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n data: unknown | T // to be validated\n ): boolean | Promise {\n let v: AnyValidateFunction | undefined\n if (typeof schemaKeyRef == \"string\") {\n v = this.getSchema(schemaKeyRef)\n if (!v) throw new Error(`no schema with key or ref \"${schemaKeyRef}\"`)\n } else {\n v = this.compile(schemaKeyRef)\n }\n\n const valid = v(data)\n if (!(\"$async\" in v)) this.errors = v.errors\n return valid\n }\n\n // Create validation function for passed schema\n // _meta: true if schema is a meta-schema. Used internally to compile meta schemas of user-defined keywords.\n compile(schema: Schema | JSONSchemaType, _meta?: boolean): ValidateFunction\n // Separated for type inference to work\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n compile(schema: JTDSchemaType, _meta?: boolean): ValidateFunction\n // This overload is only intended for typescript inference, the first\n // argument prevents manual type annotation from matching this overload\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n compile(\n schema: T,\n _meta?: boolean\n ): ValidateFunction>\n compile(schema: AsyncSchema, _meta?: boolean): AsyncValidateFunction\n compile(schema: AnySchema, _meta?: boolean): AnyValidateFunction\n compile(schema: AnySchema, _meta?: boolean): AnyValidateFunction {\n const sch = this._addSchema(schema, _meta)\n return (sch.validate || this._compileSchemaEnv(sch)) as AnyValidateFunction\n }\n\n // Creates validating function for passed schema with asynchronous loading of missing schemas.\n // `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema.\n // TODO allow passing schema URI\n // meta - optional true to compile meta-schema\n compileAsync(\n schema: SchemaObject | JSONSchemaType,\n _meta?: boolean\n ): Promise>\n // Separated for type inference to work\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n compileAsync(schema: JTDSchemaType, _meta?: boolean): Promise>\n compileAsync(schema: AsyncSchema, meta?: boolean): Promise>\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n compileAsync(\n schema: AnySchemaObject,\n meta?: boolean\n ): Promise>\n compileAsync(\n schema: AnySchemaObject,\n meta?: boolean\n ): Promise> {\n if (typeof this.opts.loadSchema != \"function\") {\n throw new Error(\"options.loadSchema should be a function\")\n }\n const {loadSchema} = this.opts\n return runCompileAsync.call(this, schema, meta)\n\n async function runCompileAsync(\n this: Ajv,\n _schema: AnySchemaObject,\n _meta?: boolean\n ): Promise {\n await loadMetaSchema.call(this, _schema.$schema)\n const sch = this._addSchema(_schema, _meta)\n return sch.validate || _compileAsync.call(this, sch)\n }\n\n async function loadMetaSchema(this: Ajv, $ref?: string): Promise {\n if ($ref && !this.getSchema($ref)) {\n await runCompileAsync.call(this, {$ref}, true)\n }\n }\n\n async function _compileAsync(this: Ajv, sch: SchemaEnv): Promise {\n try {\n return this._compileSchemaEnv(sch)\n } catch (e) {\n if (!(e instanceof MissingRefError)) throw e\n checkLoaded.call(this, e)\n await loadMissingSchema.call(this, e.missingSchema)\n return _compileAsync.call(this, sch)\n }\n }\n\n function checkLoaded(this: Ajv, {missingSchema: ref, missingRef}: MissingRefError): void {\n if (this.refs[ref]) {\n throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`)\n }\n }\n\n async function loadMissingSchema(this: Ajv, ref: string): Promise {\n const _schema = await _loadSchema.call(this, ref)\n if (!this.refs[ref]) await loadMetaSchema.call(this, _schema.$schema)\n if (!this.refs[ref]) this.addSchema(_schema, ref, meta)\n }\n\n async function _loadSchema(this: Ajv, ref: string): Promise {\n const p = this._loading[ref]\n if (p) return p\n try {\n return await (this._loading[ref] = loadSchema(ref))\n } finally {\n delete this._loading[ref]\n }\n }\n }\n\n // Adds schema to the instance\n addSchema(\n schema: AnySchema | AnySchema[], // If array is passed, `key` will be ignored\n key?: string, // Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.\n _meta?: boolean, // true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.\n _validateSchema = this.opts.validateSchema // false to skip schema validation. Used internally, option validateSchema should be used instead.\n ): Ajv {\n if (Array.isArray(schema)) {\n for (const sch of schema) this.addSchema(sch, undefined, _meta, _validateSchema)\n return this\n }\n let id: string | undefined\n if (typeof schema === \"object\") {\n const {schemaId} = this.opts\n id = schema[schemaId]\n if (id !== undefined && typeof id != \"string\") {\n throw new Error(`schema ${schemaId} must be string`)\n }\n }\n key = normalizeId(key || id)\n this._checkUnique(key)\n this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true)\n return this\n }\n\n // Add schema that will be used to validate other schemas\n // options in META_IGNORE_OPTIONS are alway set to false\n addMetaSchema(\n schema: AnySchemaObject,\n key?: string, // schema key\n _validateSchema = this.opts.validateSchema // false to skip schema validation, can be used to override validateSchema option for meta-schema\n ): Ajv {\n this.addSchema(schema, key, true, _validateSchema)\n return this\n }\n\n // Validate schema against its meta-schema\n validateSchema(schema: AnySchema, throwOrLogError?: boolean): boolean | Promise {\n if (typeof schema == \"boolean\") return true\n let $schema: string | AnySchemaObject | undefined\n $schema = schema.$schema\n if ($schema !== undefined && typeof $schema != \"string\") {\n throw new Error(\"$schema must be a string\")\n }\n $schema = $schema || this.opts.defaultMeta || this.defaultMeta()\n if (!$schema) {\n this.logger.warn(\"meta-schema not available\")\n this.errors = null\n return true\n }\n const valid = this.validate($schema, schema)\n if (!valid && throwOrLogError) {\n const message = \"schema is invalid: \" + this.errorsText()\n if (this.opts.validateSchema === \"log\") this.logger.error(message)\n else throw new Error(message)\n }\n return valid\n }\n\n // Get compiled schema by `key` or `ref`.\n // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)\n getSchema(keyRef: string): AnyValidateFunction | undefined {\n let sch\n while (typeof (sch = getSchEnv.call(this, keyRef)) == \"string\") keyRef = sch\n if (sch === undefined) {\n const {schemaId} = this.opts\n const root = new SchemaEnv({schema: {}, schemaId})\n sch = resolveSchema.call(this, root, keyRef)\n if (!sch) return\n this.refs[keyRef] = sch\n }\n return (sch.validate || this._compileSchemaEnv(sch)) as AnyValidateFunction | undefined\n }\n\n // Remove cached schema(s).\n // If no parameter is passed all schemas but meta-schemas are removed.\n // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.\n // Even if schema is referenced by other schemas it still can be removed as other schemas have local references.\n removeSchema(schemaKeyRef?: AnySchema | string | RegExp): Ajv {\n if (schemaKeyRef instanceof RegExp) {\n this._removeAllSchemas(this.schemas, schemaKeyRef)\n this._removeAllSchemas(this.refs, schemaKeyRef)\n return this\n }\n switch (typeof schemaKeyRef) {\n case \"undefined\":\n this._removeAllSchemas(this.schemas)\n this._removeAllSchemas(this.refs)\n this._cache.clear()\n return this\n case \"string\": {\n const sch = getSchEnv.call(this, schemaKeyRef)\n if (typeof sch == \"object\") this._cache.delete(sch.schema)\n delete this.schemas[schemaKeyRef]\n delete this.refs[schemaKeyRef]\n return this\n }\n case \"object\": {\n const cacheKey = schemaKeyRef\n this._cache.delete(cacheKey)\n let id = schemaKeyRef[this.opts.schemaId]\n if (id) {\n id = normalizeId(id)\n delete this.schemas[id]\n delete this.refs[id]\n }\n return this\n }\n default:\n throw new Error(\"ajv.removeSchema: invalid parameter\")\n }\n }\n\n // add \"vocabulary\" - a collection of keywords\n addVocabulary(definitions: Vocabulary): Ajv {\n for (const def of definitions) this.addKeyword(def)\n return this\n }\n\n addKeyword(\n kwdOrDef: string | KeywordDefinition,\n def?: KeywordDefinition // deprecated\n ): Ajv {\n let keyword: string | string[]\n if (typeof kwdOrDef == \"string\") {\n keyword = kwdOrDef\n if (typeof def == \"object\") {\n this.logger.warn(\"these parameters are deprecated, see docs for addKeyword\")\n def.keyword = keyword\n }\n } else if (typeof kwdOrDef == \"object\" && def === undefined) {\n def = kwdOrDef\n keyword = def.keyword\n if (Array.isArray(keyword) && !keyword.length) {\n throw new Error(\"addKeywords: keyword must be string or non-empty array\")\n }\n } else {\n throw new Error(\"invalid addKeywords parameters\")\n }\n\n checkKeyword.call(this, keyword, def)\n if (!def) {\n eachItem(keyword, (kwd) => addRule.call(this, kwd))\n return this\n }\n keywordMetaschema.call(this, def)\n const definition: AddedKeywordDefinition = {\n ...def,\n type: getJSONTypes(def.type),\n schemaType: getJSONTypes(def.schemaType),\n }\n eachItem(\n keyword,\n definition.type.length === 0\n ? (k) => addRule.call(this, k, definition)\n : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t))\n )\n return this\n }\n\n getKeyword(keyword: string): AddedKeywordDefinition | boolean {\n const rule = this.RULES.all[keyword]\n return typeof rule == \"object\" ? rule.definition : !!rule\n }\n\n // Remove keyword\n removeKeyword(keyword: string): Ajv {\n // TODO return type should be Ajv\n const {RULES} = this\n delete RULES.keywords[keyword]\n delete RULES.all[keyword]\n for (const group of RULES.rules) {\n const i = group.rules.findIndex((rule) => rule.keyword === keyword)\n if (i >= 0) group.rules.splice(i, 1)\n }\n return this\n }\n\n // Add format\n addFormat(name: string, format: Format): Ajv {\n if (typeof format == \"string\") format = new RegExp(format)\n this.formats[name] = format\n return this\n }\n\n errorsText(\n errors: ErrorObject[] | null | undefined = this.errors, // optional array of validation errors\n {separator = \", \", dataVar = \"data\"}: ErrorsTextOptions = {} // optional options with properties `separator` and `dataVar`\n ): string {\n if (!errors || errors.length === 0) return \"No errors\"\n return errors\n .map((e) => `${dataVar}${e.instancePath} ${e.message}`)\n .reduce((text, msg) => text + separator + msg)\n }\n\n $dataMetaSchema(metaSchema: AnySchemaObject, keywordsJsonPointers: string[]): AnySchemaObject {\n const rules = this.RULES.all\n metaSchema = JSON.parse(JSON.stringify(metaSchema))\n for (const jsonPointer of keywordsJsonPointers) {\n const segments = jsonPointer.split(\"/\").slice(1) // first segment is an empty string\n let keywords = metaSchema\n for (const seg of segments) keywords = keywords[seg] as AnySchemaObject\n\n for (const key in rules) {\n const rule = rules[key]\n if (typeof rule != \"object\") continue\n const {$data} = rule.definition\n const schema = keywords[key] as AnySchemaObject | undefined\n if ($data && schema) keywords[key] = schemaOrData(schema)\n }\n }\n\n return metaSchema\n }\n\n private _removeAllSchemas(schemas: {[Ref in string]?: SchemaEnv | string}, regex?: RegExp): void {\n for (const keyRef in schemas) {\n const sch = schemas[keyRef]\n if (!regex || regex.test(keyRef)) {\n if (typeof sch == \"string\") {\n delete schemas[keyRef]\n } else if (sch && !sch.meta) {\n this._cache.delete(sch.schema)\n delete schemas[keyRef]\n }\n }\n }\n }\n\n _addSchema(\n schema: AnySchema,\n meta?: boolean,\n baseId?: string,\n validateSchema = this.opts.validateSchema,\n addSchema = this.opts.addUsedSchema\n ): SchemaEnv {\n let id: string | undefined\n const {schemaId} = this.opts\n if (typeof schema == \"object\") {\n id = schema[schemaId]\n } else {\n if (this.opts.jtd) throw new Error(\"schema must be object\")\n else if (typeof schema != \"boolean\") throw new Error(\"schema must be object or boolean\")\n }\n let sch = this._cache.get(schema)\n if (sch !== undefined) return sch\n\n baseId = normalizeId(id || baseId)\n const localRefs = getSchemaRefs.call(this, schema, baseId)\n sch = new SchemaEnv({schema, schemaId, meta, baseId, localRefs})\n this._cache.set(sch.schema, sch)\n if (addSchema && !baseId.startsWith(\"#\")) {\n // TODO atm it is allowed to overwrite schemas without id (instead of not adding them)\n if (baseId) this._checkUnique(baseId)\n this.refs[baseId] = sch\n }\n if (validateSchema) this.validateSchema(schema, true)\n return sch\n }\n\n private _checkUnique(id: string): void {\n if (this.schemas[id] || this.refs[id]) {\n throw new Error(`schema with key or id \"${id}\" already exists`)\n }\n }\n\n private _compileSchemaEnv(sch: SchemaEnv): AnyValidateFunction {\n if (sch.meta) this._compileMetaSchema(sch)\n else compileSchema.call(this, sch)\n\n /* istanbul ignore if */\n if (!sch.validate) throw new Error(\"ajv implementation error\")\n return sch.validate\n }\n\n private _compileMetaSchema(sch: SchemaEnv): void {\n const currentOpts = this.opts\n this.opts = this._metaOpts\n try {\n compileSchema.call(this, sch)\n } finally {\n this.opts = currentOpts\n }\n }\n}\n\nexport interface ErrorsTextOptions {\n separator?: string\n dataVar?: string\n}\n\nfunction checkOptions(\n this: Ajv,\n checkOpts: OptionsInfo,\n options: Options & RemovedOptions,\n msg: string,\n log: \"warn\" | \"error\" = \"error\"\n): void {\n for (const key in checkOpts) {\n const opt = key as keyof typeof checkOpts\n if (opt in options) this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`)\n }\n}\n\nfunction getSchEnv(this: Ajv, keyRef: string): SchemaEnv | string | undefined {\n keyRef = normalizeId(keyRef) // TODO tests fail without this line\n return this.schemas[keyRef] || this.refs[keyRef]\n}\n\nfunction addInitialSchemas(this: Ajv): void {\n const optsSchemas = this.opts.schemas\n if (!optsSchemas) return\n if (Array.isArray(optsSchemas)) this.addSchema(optsSchemas)\n else for (const key in optsSchemas) this.addSchema(optsSchemas[key] as AnySchema, key)\n}\n\nfunction addInitialFormats(this: Ajv): void {\n for (const name in this.opts.formats) {\n const format = this.opts.formats[name]\n if (format) this.addFormat(name, format)\n }\n}\n\nfunction addInitialKeywords(\n this: Ajv,\n defs: Vocabulary | {[K in string]?: KeywordDefinition}\n): void {\n if (Array.isArray(defs)) {\n this.addVocabulary(defs)\n return\n }\n this.logger.warn(\"keywords option as map is deprecated, pass array\")\n for (const keyword in defs) {\n const def = defs[keyword] as KeywordDefinition\n if (!def.keyword) def.keyword = keyword\n this.addKeyword(def)\n }\n}\n\nfunction getMetaSchemaOptions(this: Ajv): InstanceOptions {\n const metaOpts = {...this.opts}\n for (const opt of META_IGNORE_OPTIONS) delete metaOpts[opt]\n return metaOpts\n}\n\nconst noLogs = {log() {}, warn() {}, error() {}}\n\nfunction getLogger(logger?: Partial | false): Logger {\n if (logger === false) return noLogs\n if (logger === undefined) return console\n if (logger.log && logger.warn && logger.error) return logger as Logger\n throw new Error(\"logger must implement log, warn and error methods\")\n}\n\nconst KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i\n\nfunction checkKeyword(this: Ajv, keyword: string | string[], def?: KeywordDefinition): void {\n const {RULES} = this\n eachItem(keyword, (kwd) => {\n if (RULES.keywords[kwd]) throw new Error(`Keyword ${kwd} is already defined`)\n if (!KEYWORD_NAME.test(kwd)) throw new Error(`Keyword ${kwd} has invalid name`)\n })\n if (!def) return\n if (def.$data && !(\"code\" in def || \"validate\" in def)) {\n throw new Error('$data keyword must have \"code\" or \"validate\" function')\n }\n}\n\nfunction addRule(\n this: Ajv,\n keyword: string,\n definition?: AddedKeywordDefinition,\n dataType?: JSONType\n): void {\n const post = definition?.post\n if (dataType && post) throw new Error('keyword with \"post\" flag cannot have \"type\"')\n const {RULES} = this\n let ruleGroup = post ? RULES.post : RULES.rules.find(({type: t}) => t === dataType)\n if (!ruleGroup) {\n ruleGroup = {type: dataType, rules: []}\n RULES.rules.push(ruleGroup)\n }\n RULES.keywords[keyword] = true\n if (!definition) return\n\n const rule: Rule = {\n keyword,\n definition: {\n ...definition,\n type: getJSONTypes(definition.type),\n schemaType: getJSONTypes(definition.schemaType),\n },\n }\n if (definition.before) addBeforeRule.call(this, ruleGroup, rule, definition.before)\n else ruleGroup.rules.push(rule)\n RULES.all[keyword] = rule\n definition.implements?.forEach((kwd) => this.addKeyword(kwd))\n}\n\nfunction addBeforeRule(this: Ajv, ruleGroup: RuleGroup, rule: Rule, before: string): void {\n const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before)\n if (i >= 0) {\n ruleGroup.rules.splice(i, 0, rule)\n } else {\n ruleGroup.rules.push(rule)\n this.logger.warn(`rule ${before} is not defined`)\n }\n}\n\nfunction keywordMetaschema(this: Ajv, def: KeywordDefinition): void {\n let {metaSchema} = def\n if (metaSchema === undefined) return\n if (def.$data && this.opts.$data) metaSchema = schemaOrData(metaSchema)\n def.validateSchema = this.compile(metaSchema, true)\n}\n\nconst $dataRef = {\n $ref: \"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\",\n}\n\nfunction schemaOrData(schema: AnySchema): AnySchemaObject {\n return {anyOf: [schema, $dataRef]}\n}\n", "import type {CodeKeywordDefinition} from \"../../types\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"id\",\n code() {\n throw new Error('NOT SUPPORTED: keyword \"id\", use \"$id\" for schema ID')\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, AnySchema} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport MissingRefError from \"../../compile/ref_error\"\nimport {callValidateCode} from \"../code\"\nimport {_, nil, stringify, Code, Name} from \"../../compile/codegen\"\nimport N from \"../../compile/names\"\nimport {SchemaEnv, resolveRef} from \"../../compile\"\nimport {mergeEvaluated} from \"../../compile/util\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"$ref\",\n schemaType: \"string\",\n code(cxt: KeywordCxt): void {\n const {gen, schema: $ref, it} = cxt\n const {baseId, schemaEnv: env, validateName, opts, self} = it\n const {root} = env\n if (($ref === \"#\" || $ref === \"#/\") && baseId === root.baseId) return callRootRef()\n const schOrEnv = resolveRef.call(self, root, baseId, $ref)\n if (schOrEnv === undefined) throw new MissingRefError(it.opts.uriResolver, baseId, $ref)\n if (schOrEnv instanceof SchemaEnv) return callValidate(schOrEnv)\n return inlineRefSchema(schOrEnv)\n\n function callRootRef(): void {\n if (env === root) return callRef(cxt, validateName, env, env.$async)\n const rootName = gen.scopeValue(\"root\", {ref: root})\n return callRef(cxt, _`${rootName}.validate`, root, root.$async)\n }\n\n function callValidate(sch: SchemaEnv): void {\n const v = getValidate(cxt, sch)\n callRef(cxt, v, sch, sch.$async)\n }\n\n function inlineRefSchema(sch: AnySchema): void {\n const schName = gen.scopeValue(\n \"schema\",\n opts.code.source === true ? {ref: sch, code: stringify(sch)} : {ref: sch}\n )\n const valid = gen.name(\"valid\")\n const schCxt = cxt.subschema(\n {\n schema: sch,\n dataTypes: [],\n schemaPath: nil,\n topSchemaRef: schName,\n errSchemaPath: $ref,\n },\n valid,\n it.isAllOfVariant // pass isAllOfVariant into inlined $ref\n )\n cxt.mergeEvaluated(schCxt)\n cxt.ok(valid)\n }\n },\n}\n\nexport function getValidate(cxt: KeywordCxt, sch: SchemaEnv): Code {\n const {gen} = cxt\n return sch.validate\n ? gen.scopeValue(\"validate\", {ref: sch.validate})\n : _`${gen.scopeValue(\"wrapper\", {ref: sch})}.validate`\n}\n\nexport function callRef(cxt: KeywordCxt, v: Code, sch?: SchemaEnv, $async?: boolean): void {\n const {gen, it} = cxt\n const {allErrors, schemaEnv: env, opts} = it\n const passCxt = opts.passContext ? N.this : nil\n if ($async) callAsyncRef()\n else callSyncRef()\n\n function callAsyncRef(): void {\n if (!env.$async) throw new Error(\"async schema referenced by sync schema\")\n const valid = gen.let(\"valid\")\n gen.try(\n () => {\n gen.code(_`await ${callValidateCode(cxt, v, passCxt)}`)\n addEvaluatedFrom(v) // TODO will not work with async, it has to be returned with the result\n if (!allErrors) gen.assign(valid, true)\n },\n (e) => {\n gen.if(_`!(${e} instanceof ${it.ValidationError as Name})`, () => gen.throw(e))\n addErrorsFrom(e)\n if (!allErrors) gen.assign(valid, false)\n }\n )\n cxt.ok(valid)\n }\n\n function callSyncRef(): void {\n const visitedNodes: Name = gen.name(\"visitedNodes\")\n gen.code(\n _`const ${visitedNodes} = (typeof visitedNodesForRef !== 'undefined') && visitedNodesForRef.get(${v}) || new Set()`\n )\n gen.if(_`!${visitedNodes}.has(${cxt.data})`, () => {\n gen.code(\n _`if (typeof visitedNodesForRef !== 'undefined') visitedNodesForRef.set(${v}, ${visitedNodes})`\n )\n gen.code(_`const dataNode = ${cxt.data}`)\n gen.code(\n _`if (typeof dataNode === \"object\" && dataNode !== null) ${visitedNodes}.add(dataNode)`\n )\n const res = cxt.result(\n callValidateCode(cxt, v, passCxt),\n () => addEvaluatedFrom(v),\n () => addErrorsFrom(v)\n )\n gen.code(_`${visitedNodes}.delete(dataNode)`)\n return res\n })\n }\n\n function addErrorsFrom(source: Code): void {\n const errs = _`${source}.errors`\n gen.assign(N.vErrors, _`${N.vErrors} === null ? ${errs} : ${N.vErrors}.concat(${errs})`) // TODO tagged\n gen.assign(N.errors, _`${N.vErrors}.length`)\n }\n\n function addEvaluatedFrom(source: Code): void {\n if (!it.opts.unevaluated) return\n const schEvaluated = sch?.validate?.evaluated\n // TODO refactor\n if (it.props !== true) {\n if (schEvaluated && !schEvaluated.dynamicProps) {\n if (schEvaluated.props !== undefined) {\n it.props = mergeEvaluated.props(gen, schEvaluated.props, it.props)\n }\n } else {\n const props = gen.var(\"props\", _`${source}.evaluated.props`)\n it.props = mergeEvaluated.props(gen, props, it.props, Name)\n }\n }\n if (it.items !== true) {\n if (schEvaluated && !schEvaluated.dynamicItems) {\n if (schEvaluated.items !== undefined) {\n it.items = mergeEvaluated.items(gen, schEvaluated.items, it.items)\n }\n } else {\n const items = gen.var(\"items\", _`${source}.evaluated.items`)\n it.items = mergeEvaluated.items(gen, items, it.items, Name)\n }\n }\n }\n}\n\nexport default def\n", "import type {Vocabulary} from \"../../types\"\nimport idKeyword from \"./id\"\nimport refKeyword from \"./ref\"\n\nconst core: Vocabulary = [\n \"$schema\",\n \"$id\",\n \"$defs\",\n \"$vocabulary\",\n {keyword: \"$comment\"},\n \"definitions\",\n idKeyword,\n refKeyword,\n]\n\nexport default core\n", "import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, operators, Code} from \"../../compile/codegen\"\n\nconst ops = operators\n\ntype Kwd = \"maximum\" | \"minimum\" | \"exclusiveMaximum\" | \"exclusiveMinimum\"\n\ntype Comparison = \"<=\" | \">=\" | \"<\" | \">\"\n\nconst KWDs: {[K in Kwd]: {okStr: Comparison; ok: Code; fail: Code}} = {\n maximum: {okStr: \"<=\", ok: ops.LTE, fail: ops.GT},\n minimum: {okStr: \">=\", ok: ops.GTE, fail: ops.LT},\n exclusiveMaximum: {okStr: \"<\", ok: ops.LT, fail: ops.GTE},\n exclusiveMinimum: {okStr: \">\", ok: ops.GT, fail: ops.LTE},\n}\n\nexport type LimitNumberError = ErrorObject<\n Kwd,\n {limit: number; comparison: Comparison},\n number | {$data: string}\n>\n\nconst error: KeywordErrorDefinition = {\n message: ({keyword, schemaCode}) => str`must be ${KWDs[keyword as Kwd].okStr} ${schemaCode}`,\n params: ({keyword, schemaCode}) =>\n _`{comparison: ${KWDs[keyword as Kwd].okStr}, limit: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: Object.keys(KWDs),\n type: \"number\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {keyword, data, schemaCode} = cxt\n cxt.fail$data(_`${data} ${KWDs[keyword as Kwd].fail} ${schemaCode} || isNaN(${data})`)\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str} from \"../../compile/codegen\"\n\nexport type MultipleOfError = ErrorObject<\n \"multipleOf\",\n {multipleOf: number},\n number | {$data: string}\n>\n\nconst error: KeywordErrorDefinition = {\n message: ({schemaCode}) => str`must be multiple of ${schemaCode}`,\n params: ({schemaCode}) => _`{multipleOf: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"multipleOf\",\n type: \"number\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, data, schemaCode, it} = cxt\n // const bdt = bad$DataType(schemaCode, def.schemaType, $data)\n const prec = it.opts.multipleOfPrecision\n const res = gen.let(\"res\")\n const invalid = prec\n ? _`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}`\n : _`${res} !== parseInt(${res})`\n cxt.fail$data(_`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`)\n },\n}\n\nexport default def\n", "// https://mathiasbynens.be/notes/javascript-encoding\n// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode\nexport default function ucs2length(str: string): number {\n const len = str.length\n let length = 0\n let pos = 0\n let value: number\n while (pos < len) {\n length++\n value = str.charCodeAt(pos++)\n if (value >= 0xd800 && value <= 0xdbff && pos < len) {\n // high surrogate, and there is a next character\n value = str.charCodeAt(pos)\n if ((value & 0xfc00) === 0xdc00) pos++ // low surrogate\n }\n }\n return length\n}\n\nucs2length.code = 'require(\"ajv/dist/runtime/ucs2length\").default'\n", "import type {CodeKeywordDefinition, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, operators} from \"../../compile/codegen\"\nimport {useFunc} from \"../../compile/util\"\nimport ucs2length from \"../../runtime/ucs2length\"\n\nconst error: KeywordErrorDefinition = {\n message({keyword, schemaCode}) {\n const comp = keyword === \"maxLength\" ? \"more\" : \"fewer\"\n return str`must NOT have ${comp} than ${schemaCode} characters`\n },\n params: ({schemaCode}) => _`{limit: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: [\"maxLength\", \"minLength\"],\n type: \"string\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {keyword, data, schemaCode, it} = cxt\n const op = keyword === \"maxLength\" ? operators.GT : operators.LT\n const len =\n it.opts.unicode === false ? _`${data}.length` : _`${useFunc(cxt.gen, ucs2length)}(${data})`\n cxt.fail$data(_`${len} ${op} ${schemaCode}`)\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {usePattern} from \"../code\"\nimport {useFunc} from \"../../compile/util\"\nimport {_, str} from \"../../compile/codegen\"\n\nexport type PatternError = ErrorObject<\"pattern\", {pattern: string}, string | {$data: string}>\n\nconst error: KeywordErrorDefinition = {\n message: ({schemaCode}) => str`must match pattern \"${schemaCode}\"`,\n params: ({schemaCode}) => _`{pattern: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"pattern\",\n type: \"string\",\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, data, $data, schema, schemaCode, it} = cxt\n const u = it.opts.unicodeRegExp ? \"u\" : \"\"\n if ($data) {\n const {regExp} = it.opts.code\n const regExpCode = regExp.code === \"new RegExp\" ? _`new RegExp` : useFunc(gen, regExp)\n const valid = gen.let(\"valid\")\n gen.try(\n () => gen.assign(valid, _`${regExpCode}(${schemaCode}, ${u}).test(${data})`),\n () => gen.assign(valid, false)\n )\n cxt.fail$data(_`!${valid}`)\n } else {\n const regExp = usePattern(cxt, schema)\n cxt.fail$data(_`!${regExp}.test(${data})`)\n }\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, operators} from \"../../compile/codegen\"\n\nconst error: KeywordErrorDefinition = {\n message({keyword, schemaCode}) {\n const comp = keyword === \"maxProperties\" ? \"more\" : \"fewer\"\n return str`must NOT have ${comp} than ${schemaCode} properties`\n },\n params: ({schemaCode}) => _`{limit: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: [\"maxProperties\", \"minProperties\"],\n type: \"object\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {keyword, data, schemaCode} = cxt\n const op = keyword === \"maxProperties\" ? operators.GT : operators.LT\n cxt.fail$data(_`Object.keys(${data}).length ${op} ${schemaCode}`)\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {\n checkReportMissingProp,\n checkMissingProp,\n reportMissingProp,\n propertyInData,\n noPropertyInData,\n} from \"../code\"\nimport {getSkipCondition} from \"../oasContext\"\nimport {_, str, nil, not, Name, Code} from \"../../compile/codegen\"\nimport {checkStrictMode} from \"../../compile/util\"\n\nexport type RequiredError = ErrorObject<\n \"required\",\n {missingProperty: string},\n string[] | {$data: string}\n>\n\nconst error: KeywordErrorDefinition = {\n message: ({params: {missingProperty}}) => str`must have required property '${missingProperty}'`,\n params: ({params: {missingProperty}}) => _`{missingProperty: ${missingProperty}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"required\",\n type: \"object\",\n schemaType: \"array\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, schema, schemaCode, data, $data, it} = cxt\n const {opts} = it\n if (!$data && schema.length === 0) return\n const useLoop = schema.length >= opts.loopRequired\n if (it.allErrors) allErrorsMode()\n else exitOnErrorMode()\n\n if (opts.strictRequired) {\n const props = cxt.parentSchema.properties\n const {definedProperties} = cxt.it\n for (const requiredKey of schema) {\n if (props?.[requiredKey] === undefined && !definedProperties.has(requiredKey)) {\n const schemaPath = it.schemaEnv.baseId + it.errSchemaPath\n const msg = `required property \"${requiredKey}\" is not defined at \"${schemaPath}\" (strictRequired)`\n checkStrictMode(it, msg, it.opts.strictRequired)\n }\n }\n }\n\n function allErrorsMode(): void {\n if (useLoop || $data) {\n cxt.block$data(nil, loopAllRequired)\n } else {\n for (const prop of schema) {\n const skip = getSkipCondition(cxt.parentSchema, prop) ?? _`false`\n /**\n * Generate a runtime check: validate `required` only when this property\n * should NOT be skipped in the current context (readOnly/writeOnly).\n */\n gen.if(not(skip), () => checkReportMissingProp(cxt, prop))\n }\n }\n }\n\n function exitOnErrorMode(): void {\n const missing = gen.let(\"missing\")\n if (useLoop || $data) {\n const valid = gen.let(\"valid\", true)\n cxt.block$data(valid, () => loopUntilMissing(missing, valid))\n cxt.ok(valid)\n } else {\n gen.if(checkMissingProp(cxt, schema, missing))\n reportMissingProp(cxt, missing)\n gen.else()\n }\n }\n\n function loopAllRequired(): void {\n gen.forOf(\"prop\", schemaCode as Code, (prop) => {\n cxt.setParams({missingProperty: prop})\n gen.if(noPropertyInData(gen, data, prop, opts.ownProperties), () => cxt.error())\n })\n }\n\n function loopUntilMissing(missing: Name, valid: Name): void {\n cxt.setParams({missingProperty: missing})\n gen.forOf(\n missing,\n schemaCode as Code,\n () => {\n gen.assign(valid, propertyInData(gen, data, missing, opts.ownProperties))\n gen.if(not(valid), () => {\n cxt.error()\n gen.break()\n })\n },\n nil\n )\n }\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str} from \"../../compile/codegen\"\nimport N from \"../../compile/names\"\n\nconst error: KeywordErrorDefinition = {\n message: () => str`must NOT be present in request context`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"readOnly\",\n schemaType: \"boolean\",\n error,\n code(cxt: KeywordCxt) {\n if (cxt.schema !== true) return\n\n const apiContext = _`(${N.this} && ${N.this}.apiContext)`\n\n cxt.fail(_`${apiContext} === \"request\"`)\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str} from \"../../compile/codegen\"\nimport N from \"../../compile/names\"\n\nconst error: KeywordErrorDefinition = {\n message: () => str`must NOT be present in response context`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"writeOnly\",\n schemaType: \"boolean\",\n error,\n code(cxt: KeywordCxt) {\n if (cxt.schema !== true) return\n const apiContext = _`(${N.this} && ${N.this}.apiContext)`\n\n cxt.fail(_`${apiContext} === \"response\"`)\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, operators} from \"../../compile/codegen\"\n\nconst error: KeywordErrorDefinition = {\n message({keyword, schemaCode}) {\n const comp = keyword === \"maxItems\" ? \"more\" : \"fewer\"\n return str`must NOT have ${comp} than ${schemaCode} items`\n },\n params: ({schemaCode}) => _`{limit: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: [\"maxItems\", \"minItems\"],\n type: \"array\",\n schemaType: \"number\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {keyword, data, schemaCode} = cxt\n const op = keyword === \"maxItems\" ? operators.GT : operators.LT\n cxt.fail$data(_`${data}.length ${op} ${schemaCode}`)\n },\n}\n\nexport default def\n", "// https://github.com/ajv-validator/ajv/issues/889\nimport * as equal from \"fast-deep-equal\"\n\ntype Equal = typeof equal & {code: string}\n;(equal as Equal).code = 'require(\"ajv/dist/runtime/equal\").default'\n\nexport default equal as Equal\n", "import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {checkDataTypes, getSchemaTypes, DataType} from \"../../compile/validate/dataType\"\nimport {_, str, Name} from \"../../compile/codegen\"\nimport {useFunc} from \"../../compile/util\"\nimport equal from \"../../runtime/equal\"\n\nexport type UniqueItemsError = ErrorObject<\n \"uniqueItems\",\n {i: number; j: number},\n boolean | {$data: string}\n>\n\nconst error: KeywordErrorDefinition = {\n message: ({params: {i, j}}) =>\n str`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,\n params: ({params: {i, j}}) => _`{i: ${i}, j: ${j}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"uniqueItems\",\n type: \"array\",\n schemaType: \"boolean\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, data, $data, schema, parentSchema, schemaCode, it} = cxt\n if (!$data && !schema) return\n const valid = gen.let(\"valid\")\n const itemTypes = parentSchema.items ? getSchemaTypes(parentSchema.items) : []\n cxt.block$data(valid, validateUniqueItems, _`${schemaCode} === false`)\n cxt.ok(valid)\n\n function validateUniqueItems(): void {\n const i = gen.let(\"i\", _`${data}.length`)\n const j = gen.let(\"j\")\n cxt.setParams({i, j})\n gen.assign(valid, true)\n gen.if(_`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j))\n }\n\n function canOptimize(): boolean {\n return itemTypes.length > 0 && !itemTypes.some((t) => t === \"object\" || t === \"array\")\n }\n\n function loopN(i: Name, j: Name): void {\n const item = gen.name(\"item\")\n const wrongType = checkDataTypes(itemTypes, item, it.opts.strictNumbers, DataType.Wrong)\n const indices = gen.const(\"indices\", _`{}`)\n gen.for(_`;${i}--;`, () => {\n gen.let(item, _`${data}[${i}]`)\n gen.if(wrongType, _`continue`)\n if (itemTypes.length > 1) gen.if(_`typeof ${item} == \"string\"`, _`${item} += \"_\"`)\n gen\n .if(_`typeof ${indices}[${item}] == \"number\"`, () => {\n gen.assign(j, _`${indices}[${item}]`)\n cxt.error()\n gen.assign(valid, false).break()\n })\n .code(_`${indices}[${item}] = ${i}`)\n })\n }\n\n function loopN2(i: Name, j: Name): void {\n const eql = useFunc(gen, equal)\n const outer = gen.name(\"outer\")\n gen.label(outer).for(_`;${i}--;`, () =>\n gen.for(_`${j} = ${i}; ${j}--;`, () =>\n gen.if(_`${eql}(${data}[${i}], ${data}[${j}])`, () => {\n cxt.error()\n gen.assign(valid, false).break(outer)\n })\n )\n )\n }\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_} from \"../../compile/codegen\"\nimport {useFunc} from \"../../compile/util\"\nimport equal from \"../../runtime/equal\"\n\nexport type ConstError = ErrorObject<\"const\", {allowedValue: any}>\n\nconst error: KeywordErrorDefinition = {\n message: \"must be equal to constant\",\n params: ({schemaCode}) => _`{allowedValue: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"const\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, data, $data, schemaCode, schema} = cxt\n if ($data || (schema && typeof schema == \"object\")) {\n cxt.fail$data(_`!${useFunc(gen, equal)}(${data}, ${schemaCode})`)\n } else {\n cxt.fail(_`${schema} !== ${data}`)\n }\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, or, Name, Code} from \"../../compile/codegen\"\nimport {useFunc} from \"../../compile/util\"\nimport equal from \"../../runtime/equal\"\n\nexport type EnumError = ErrorObject<\"enum\", {allowedValues: any[]}, any[] | {$data: string}>\n\nconst error: KeywordErrorDefinition = {\n message: \"must be equal to one of the allowed values\",\n params: ({schemaCode}) => _`{allowedValues: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"enum\",\n schemaType: \"array\",\n $data: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, data, $data, schema, schemaCode, it} = cxt\n if (!$data && schema.length === 0) throw new Error(\"enum must have non-empty array\")\n const useLoop = schema.length >= it.opts.loopEnum\n let eql: Name | undefined\n const getEql = (): Name => (eql ??= useFunc(gen, equal))\n\n let valid: Code\n if (useLoop || $data) {\n valid = gen.let(\"valid\")\n cxt.block$data(valid, loopEnum)\n } else {\n /* istanbul ignore if */\n if (!Array.isArray(schema)) throw new Error(\"ajv implementation error\")\n const vSchema = gen.const(\"vSchema\", schemaCode)\n valid = or(...schema.map((_x: unknown, i: number) => equalCode(vSchema, i)))\n }\n cxt.pass(valid)\n\n function loopEnum(): void {\n gen.assign(valid, false)\n gen.forOf(\"v\", schemaCode as Code, (v) =>\n gen.if(_`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break())\n )\n }\n\n function equalCode(vSchema: Name, i: number): Code {\n const sch = schema[i]\n return typeof sch === \"object\" && sch !== null\n ? _`${getEql()}(${data}, ${vSchema}[${i}])`\n : _`${data} === ${sch}`\n }\n },\n}\n\nexport default def\n", "import type {ErrorObject, Vocabulary} from \"../../types\"\nimport limitNumber, {LimitNumberError} from \"./limitNumber\"\nimport multipleOf, {MultipleOfError} from \"./multipleOf\"\nimport limitLength from \"./limitLength\"\nimport pattern, {PatternError} from \"./pattern\"\nimport limitProperties from \"./limitProperties\"\nimport required, {RequiredError} from \"./required\"\nimport readOnlyKeyword from \"./readOnly\"\nimport writeOnlyKeyword from \"./writeOnly\"\nimport limitItems from \"./limitItems\"\nimport uniqueItems, {UniqueItemsError} from \"./uniqueItems\"\nimport constKeyword, {ConstError} from \"./const\"\nimport enumKeyword, {EnumError} from \"./enum\"\n\nconst validation: Vocabulary = [\n // number\n limitNumber,\n multipleOf,\n // string\n limitLength,\n pattern,\n // object\n limitProperties,\n required,\n readOnlyKeyword,\n writeOnlyKeyword,\n // array\n limitItems,\n uniqueItems,\n // any\n {keyword: \"type\", schemaType: [\"string\", \"array\"]},\n {keyword: \"nullable\", schemaType: \"boolean\"},\n constKeyword,\n enumKeyword,\n]\n\nexport default validation\n\ntype LimitError = ErrorObject<\n \"maxItems\" | \"minItems\" | \"minProperties\" | \"maxProperties\" | \"minLength\" | \"maxLength\",\n {limit: number},\n number | {$data: string}\n>\n\nexport type ValidationKeywordError =\n | LimitError\n | LimitNumberError\n | MultipleOfError\n | PatternError\n | RequiredError\n | UniqueItemsError\n | ConstError\n | EnumError\n", "import type {\n CodeKeywordDefinition,\n ErrorObject,\n KeywordErrorDefinition,\n AnySchema,\n} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, not, Name} from \"../../compile/codegen\"\nimport {alwaysValidSchema, checkStrictMode, Type} from \"../../compile/util\"\n\nexport type AdditionalItemsError = ErrorObject<\"additionalItems\", {limit: number}, AnySchema>\n\nconst error: KeywordErrorDefinition = {\n message: ({params: {len}}) => str`must NOT have more than ${len} items`,\n params: ({params: {len}}) => _`{limit: ${len}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"additionalItems\" as const,\n type: \"array\",\n schemaType: [\"boolean\", \"object\"],\n before: \"uniqueItems\",\n error,\n code(cxt: KeywordCxt) {\n const {parentSchema, it} = cxt\n const {items} = parentSchema\n if (!Array.isArray(items)) {\n checkStrictMode(it, '\"additionalItems\" is ignored when \"items\" is not an array of schemas')\n return\n }\n validateAdditionalItems(cxt, items)\n },\n}\n\nexport function validateAdditionalItems(cxt: KeywordCxt, items: AnySchema[]): void {\n const {gen, schema, data, keyword, it} = cxt\n it.items = true\n const len = gen.const(\"len\", _`${data}.length`)\n if (schema === false) {\n cxt.setParams({len: items.length})\n cxt.pass(_`${len} <= ${items.length}`)\n } else if (typeof schema == \"object\" && !alwaysValidSchema(it, schema)) {\n const valid = gen.var(\"valid\", _`${len} <= ${items.length}`) // TODO var\n gen.if(not(valid), () => validateItems(valid))\n cxt.ok(valid)\n }\n\n function validateItems(valid: Name): void {\n gen.forRange(\"i\", items.length, len, (i) => {\n cxt.subschema({keyword, dataProp: i, dataPropType: Type.Num}, valid)\n if (!it.allErrors) gen.if(not(valid), () => gen.break())\n })\n }\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, AnySchema, AnySchemaObject} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_} from \"../../compile/codegen\"\nimport {alwaysValidSchema, mergeEvaluated, checkStrictMode} from \"../../compile/util\"\nimport {validateArray} from \"../code\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"items\",\n type: \"array\",\n schemaType: [\"object\", \"array\", \"boolean\"],\n before: \"uniqueItems\",\n code(cxt: KeywordCxt) {\n const {schema, it} = cxt\n if (Array.isArray(schema)) return validateTuple(cxt, \"additionalItems\", schema)\n it.items = true\n if (alwaysValidSchema(it, schema)) return\n cxt.ok(validateArray(cxt))\n },\n}\n\nexport function validateTuple(\n cxt: KeywordCxt,\n extraItems: string,\n schArr: AnySchema[] = cxt.schema\n): void {\n const {gen, parentSchema, data, keyword, it} = cxt\n checkStrictTuple(parentSchema)\n if (it.opts.unevaluated && schArr.length && it.items !== true) {\n it.items = mergeEvaluated.items(gen, schArr.length, it.items)\n }\n const valid = gen.name(\"valid\")\n const len = gen.const(\"len\", _`${data}.length`)\n schArr.forEach((sch: AnySchema, i: number) => {\n if (alwaysValidSchema(it, sch)) return\n gen.if(_`${len} > ${i}`, () =>\n cxt.subschema(\n {\n keyword,\n schemaProp: i,\n dataProp: i,\n },\n valid\n )\n )\n cxt.ok(valid)\n })\n\n function checkStrictTuple(sch: AnySchemaObject): void {\n const {opts, errSchemaPath} = it\n const l = schArr.length\n const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false)\n if (opts.strictTuples && !fullTuple) {\n const msg = `\"${keyword}\" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path \"${errSchemaPath}\"`\n checkStrictMode(it, msg, opts.strictTuples)\n }\n }\n}\n\nexport default def\n", "import type {CodeKeywordDefinition} from \"../../types\"\nimport {validateTuple} from \"./items\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"prefixItems\",\n type: \"array\",\n schemaType: [\"array\"],\n before: \"uniqueItems\",\n code: (cxt) => validateTuple(cxt, \"items\"),\n}\n\nexport default def\n", "import type {\n CodeKeywordDefinition,\n KeywordErrorDefinition,\n ErrorObject,\n AnySchema,\n} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str} from \"../../compile/codegen\"\nimport {alwaysValidSchema} from \"../../compile/util\"\nimport {validateArray} from \"../code\"\nimport {validateAdditionalItems} from \"./additionalItems\"\n\nexport type ItemsError = ErrorObject<\"items\", {limit: number}, AnySchema>\n\nconst error: KeywordErrorDefinition = {\n message: ({params: {len}}) => str`must NOT have more than ${len} items`,\n params: ({params: {len}}) => _`{limit: ${len}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"items\",\n type: \"array\",\n schemaType: [\"object\", \"boolean\"],\n before: \"uniqueItems\",\n error,\n code(cxt: KeywordCxt) {\n const {schema, parentSchema, it} = cxt\n const {prefixItems} = parentSchema\n it.items = true\n if (alwaysValidSchema(it, schema)) return\n if (prefixItems) validateAdditionalItems(cxt, prefixItems)\n else cxt.ok(validateArray(cxt))\n },\n}\n\nexport default def\n", "import type {\n CodeKeywordDefinition,\n KeywordErrorDefinition,\n ErrorObject,\n AnySchema,\n} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, Name} from \"../../compile/codegen\"\nimport {alwaysValidSchema, checkStrictMode, Type} from \"../../compile/util\"\n\nexport type ContainsError = ErrorObject<\n \"contains\",\n {minContains: number; maxContains?: number},\n AnySchema\n>\n\nconst error: KeywordErrorDefinition = {\n message: ({params: {min, max}}) =>\n max === undefined\n ? str`must contain at least ${min} valid item(s)`\n : str`must contain at least ${min} and no more than ${max} valid item(s)`,\n params: ({params: {min, max}}) =>\n max === undefined ? _`{minContains: ${min}}` : _`{minContains: ${min}, maxContains: ${max}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"contains\",\n type: \"array\",\n schemaType: [\"object\", \"boolean\"],\n before: \"uniqueItems\",\n trackErrors: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, schema, parentSchema, data, it} = cxt\n let min: number\n let max: number | undefined\n const {minContains, maxContains} = parentSchema\n if (it.opts.next) {\n min = minContains === undefined ? 1 : minContains\n max = maxContains\n } else {\n min = 1\n }\n const len = gen.const(\"len\", _`${data}.length`)\n cxt.setParams({min, max})\n if (max === undefined && min === 0) {\n checkStrictMode(it, `\"minContains\" == 0 without \"maxContains\": \"contains\" keyword ignored`)\n return\n }\n if (max !== undefined && min > max) {\n checkStrictMode(it, `\"minContains\" > \"maxContains\" is always invalid`)\n cxt.fail()\n return\n }\n if (alwaysValidSchema(it, schema)) {\n let cond = _`${len} >= ${min}`\n if (max !== undefined) cond = _`${cond} && ${len} <= ${max}`\n cxt.pass(cond)\n return\n }\n\n it.items = true\n const valid = gen.name(\"valid\")\n if (max === undefined && min === 1) {\n validateItems(valid, () => gen.if(valid, () => gen.break()))\n } else if (min === 0) {\n gen.let(valid, true)\n if (max !== undefined) gen.if(_`${data}.length > 0`, validateItemsWithCount)\n } else {\n gen.let(valid, false)\n validateItemsWithCount()\n }\n cxt.result(valid, () => cxt.reset())\n\n function validateItemsWithCount(): void {\n const schValid = gen.name(\"_valid\")\n const count = gen.let(\"count\", 0)\n validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)))\n }\n\n function validateItems(_valid: Name, block: () => void): void {\n gen.forRange(\"i\", 0, len, (i) => {\n cxt.subschema(\n {\n keyword: \"contains\",\n dataProp: i,\n dataPropType: Type.Num,\n compositeRule: true,\n },\n _valid\n )\n block()\n })\n }\n\n function checkLimits(count: Name): void {\n gen.code(_`${count}++`)\n if (max === undefined) {\n gen.if(_`${count} >= ${min}`, () => gen.assign(valid, true).break())\n } else {\n gen.if(_`${count} > ${max}`, () => gen.assign(valid, false).break())\n if (min === 1) gen.assign(valid, true)\n else gen.if(_`${count} >= ${min}`, () => gen.assign(valid, true))\n }\n }\n },\n}\n\nexport default def\n", "import type {\n CodeKeywordDefinition,\n ErrorObject,\n KeywordErrorDefinition,\n SchemaMap,\n AnySchema,\n} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str} from \"../../compile/codegen\"\nimport {alwaysValidSchema} from \"../../compile/util\"\nimport {checkReportMissingProp, checkMissingProp, reportMissingProp, propertyInData} from \"../code\"\n\nexport type PropertyDependencies = {[K in string]?: string[]}\n\nexport interface DependenciesErrorParams {\n property: string\n missingProperty: string\n depsCount: number\n deps: string // TODO change to string[]\n}\n\ntype SchemaDependencies = SchemaMap\n\nexport type DependenciesError = ErrorObject<\n \"dependencies\",\n DependenciesErrorParams,\n {[K in string]?: string[] | AnySchema}\n>\n\nexport const error: KeywordErrorDefinition = {\n message: ({params: {property, depsCount, deps}}) => {\n const property_ies = depsCount === 1 ? \"property\" : \"properties\"\n return str`must have ${property_ies} ${deps} when property ${property} is present`\n },\n params: ({params: {property, depsCount, deps, missingProperty}}) =>\n _`{property: ${property},\n missingProperty: ${missingProperty},\n depsCount: ${depsCount},\n deps: ${deps}}`, // TODO change to reference\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"dependencies\",\n type: \"object\",\n schemaType: \"object\",\n error,\n code(cxt: KeywordCxt) {\n const [propDeps, schDeps] = splitDependencies(cxt)\n validatePropertyDeps(cxt, propDeps)\n validateSchemaDeps(cxt, schDeps)\n },\n}\n\nfunction splitDependencies({schema}: KeywordCxt): [PropertyDependencies, SchemaDependencies] {\n const propertyDeps: PropertyDependencies = {}\n const schemaDeps: SchemaDependencies = {}\n for (const key in schema) {\n if (key === \"__proto__\") continue\n const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps\n deps[key] = schema[key]\n }\n return [propertyDeps, schemaDeps]\n}\n\nexport function validatePropertyDeps(\n cxt: KeywordCxt,\n propertyDeps: {[K in string]?: string[]} = cxt.schema\n): void {\n const {gen, data, it} = cxt\n if (Object.keys(propertyDeps).length === 0) return\n const missing = gen.let(\"missing\")\n for (const prop in propertyDeps) {\n const deps = propertyDeps[prop] as string[]\n if (deps.length === 0) continue\n const hasProperty = propertyInData(gen, data, prop, it.opts.ownProperties)\n cxt.setParams({\n property: prop,\n depsCount: deps.length,\n deps: deps.join(\", \"),\n })\n if (it.allErrors) {\n gen.if(hasProperty, () => {\n for (const depProp of deps) {\n checkReportMissingProp(cxt, depProp)\n }\n })\n } else {\n gen.if(_`${hasProperty} && (${checkMissingProp(cxt, deps, missing)})`)\n reportMissingProp(cxt, missing)\n gen.else()\n }\n }\n}\n\nexport function validateSchemaDeps(cxt: KeywordCxt, schemaDeps: SchemaMap = cxt.schema): void {\n const {gen, data, keyword, it} = cxt\n const valid = gen.name(\"valid\")\n for (const prop in schemaDeps) {\n if (alwaysValidSchema(it, schemaDeps[prop] as AnySchema)) continue\n gen.if(\n propertyInData(gen, data, prop, it.opts.ownProperties),\n () => {\n const schCxt = cxt.subschema({keyword, schemaProp: prop}, valid)\n cxt.mergeValidEvaluated(schCxt, valid)\n },\n () => gen.var(valid, true) // TODO var\n )\n cxt.ok(valid)\n }\n}\n\nexport default def\n", "import type {\n CodeKeywordDefinition,\n ErrorObject,\n KeywordErrorDefinition,\n AnySchema,\n} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, not} from \"../../compile/codegen\"\nimport {alwaysValidSchema} from \"../../compile/util\"\n\nexport type PropertyNamesError = ErrorObject<\"propertyNames\", {propertyName: string}, AnySchema>\n\nconst error: KeywordErrorDefinition = {\n message: \"property name must be valid\",\n params: ({params}) => _`{propertyName: ${params.propertyName}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"propertyNames\",\n type: \"object\",\n schemaType: [\"object\", \"boolean\"],\n error,\n code(cxt: KeywordCxt) {\n const {gen, schema, data, it} = cxt\n if (alwaysValidSchema(it, schema)) return\n const valid = gen.name(\"valid\")\n\n gen.forIn(\"key\", data, (key) => {\n cxt.setParams({propertyName: key})\n cxt.subschema(\n {\n keyword: \"propertyNames\",\n data: key,\n dataTypes: [\"string\"],\n propertyName: key,\n compositeRule: true,\n },\n valid\n )\n gen.if(not(valid), () => {\n cxt.error(true)\n if (!it.allErrors) gen.break()\n })\n })\n\n cxt.ok(valid)\n },\n}\n\nexport default def\n", "import type {\n CodeKeywordDefinition,\n AddedKeywordDefinition,\n ErrorObject,\n KeywordErrorDefinition,\n AnySchema,\n} from \"../../types\"\nimport {allSchemaProperties, usePattern, isOwnProperty} from \"../code\"\nimport {_, nil, or, not, Code, Name} from \"../../compile/codegen\"\nimport N from \"../../compile/names\"\nimport type {SubschemaArgs} from \"../../compile/validate/subschema\"\nimport {alwaysValidSchema, schemaRefOrVal, Type} from \"../../compile/util\"\n\nexport type AdditionalPropertiesError = ErrorObject<\n \"additionalProperties\",\n {additionalProperty: string},\n AnySchema\n>\n\nconst error: KeywordErrorDefinition = {\n message: \"must NOT have additional properties\",\n params: ({params}) => _`{additionalProperty: ${params.additionalProperty}}`,\n}\n\nconst def: CodeKeywordDefinition & AddedKeywordDefinition = {\n keyword: \"additionalProperties\",\n type: [\"object\"],\n schemaType: [\"boolean\", \"object\"],\n allowUndefined: true,\n trackErrors: true,\n error,\n code(cxt) {\n const {gen, parentSchema, data, errsCount, it} = cxt\n const {schema = it.opts.defaultAdditionalProperties} = cxt\n /* istanbul ignore if */\n if (!errsCount) throw new Error(\"ajv implementation error\")\n const {allErrors, opts} = it\n it.props = true\n if (opts.removeAdditional !== \"all\" && alwaysValidSchema(it, schema)) return\n const props = allSchemaProperties(parentSchema.properties)\n const patProps = allSchemaProperties(parentSchema.patternProperties)\n checkAdditionalProperties()\n cxt.ok(_`${errsCount} === ${N.errors}`)\n\n function checkAdditionalProperties(): void {\n gen.forIn(\"key\", data, (key: Name) => {\n if (!props.length && !patProps.length) additionalPropertyCode(key)\n else gen.if(isAdditional(key), () => additionalPropertyCode(key))\n })\n }\n\n function isAdditional(key: Name): Code {\n let definedProp: Code\n if (props.length > 8) {\n // TODO maybe an option instead of hard-coded 8?\n const propsSchema = schemaRefOrVal(it, parentSchema.properties, \"properties\")\n definedProp = isOwnProperty(gen, propsSchema as Code, key)\n } else if (props.length) {\n definedProp = or(...props.map((p) => _`${key} === ${p}`))\n } else {\n definedProp = nil\n }\n if (patProps.length) {\n definedProp = or(definedProp, ...patProps.map((p) => _`${usePattern(cxt, p)}.test(${key})`))\n }\n return not(definedProp)\n }\n\n function deleteAdditional(key: Name): void {\n gen.code(_`delete ${data}[${key}]`)\n }\n\n function additionalPropertyCode(key: Name): void {\n if (opts.removeAdditional === \"all\" || (opts.removeAdditional && schema === false)) {\n deleteAdditional(key)\n return\n }\n\n if (schema === false) {\n cxt.setParams({additionalProperty: key})\n cxt.error()\n if (!allErrors) gen.break()\n return\n }\n\n if (typeof schema == \"object\" && !alwaysValidSchema(it, schema)) {\n const valid = gen.name(\"valid\")\n if (opts.removeAdditional === \"failing\") {\n applyAdditionalSchema(key, valid, false)\n gen.if(not(valid), () => {\n cxt.reset()\n deleteAdditional(key)\n })\n } else {\n applyAdditionalSchema(key, valid)\n if (!allErrors) gen.if(not(valid), () => gen.break())\n }\n }\n }\n\n function applyAdditionalSchema(key: Name, valid: Name, errors?: false): void {\n const subschema: SubschemaArgs = {\n keyword: \"additionalProperties\",\n dataProp: key,\n dataPropType: Type.Str,\n }\n if (errors === false) {\n Object.assign(subschema, {\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n })\n }\n cxt.subschema(subschema, valid)\n }\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition} from \"../../types\"\nimport {KeywordCxt} from \"../../compile/validate\"\nimport {propertyInData, allSchemaProperties} from \"../code\"\nimport {alwaysValidSchema, toHash, mergeEvaluated} from \"../../compile/util\"\nimport apDef from \"./additionalProperties\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"properties\",\n type: \"object\",\n schemaType: \"object\",\n code(cxt: KeywordCxt) {\n const {gen, schema, parentSchema, data, it} = cxt\n if (\n (it.opts.removeAdditional === \"all\" && parentSchema.additionalProperties === undefined) ||\n it.opts.defaultAdditionalProperties === false\n ) {\n apDef.code(new KeywordCxt(it, apDef, \"additionalProperties\"))\n }\n const allProps = allSchemaProperties(schema)\n for (const prop of allProps) {\n it.definedProperties.add(prop)\n }\n if (it.opts.unevaluated && allProps.length && it.props !== true) {\n it.props = mergeEvaluated.props(gen, toHash(allProps), it.props)\n }\n const properties = allProps.filter((p) => !alwaysValidSchema(it, schema[p]))\n if (properties.length === 0) return\n const valid = gen.name(\"valid\")\n\n for (const prop of properties) {\n if (hasDefault(prop)) {\n applyPropertySchema(prop)\n } else {\n gen.if(propertyInData(gen, data, prop, it.opts.ownProperties))\n applyPropertySchema(prop)\n if (!it.allErrors) gen.else().var(valid, true)\n gen.endIf()\n }\n cxt.it.definedProperties.add(prop)\n cxt.ok(valid)\n }\n\n function hasDefault(prop: string): boolean | undefined {\n return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== undefined\n }\n\n function applyPropertySchema(prop: string): void {\n cxt.subschema(\n {\n keyword: \"properties\",\n schemaProp: prop,\n dataProp: prop,\n },\n valid\n )\n }\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {allSchemaProperties, usePattern} from \"../code\"\nimport {_, not, Name} from \"../../compile/codegen\"\nimport {alwaysValidSchema, checkStrictMode} from \"../../compile/util\"\nimport {evaluatedPropsToName, Type} from \"../../compile/util\"\nimport {AnySchema} from \"../../types\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"patternProperties\",\n type: \"object\",\n schemaType: \"object\",\n code(cxt: KeywordCxt) {\n const {gen, schema, data, parentSchema, it} = cxt\n const {opts} = it\n const patterns = allSchemaProperties(schema)\n const alwaysValidPatterns = patterns.filter((p) =>\n alwaysValidSchema(it, schema[p] as AnySchema)\n )\n\n if (\n patterns.length === 0 ||\n (alwaysValidPatterns.length === patterns.length &&\n (!it.opts.unevaluated || it.props === true))\n ) {\n return\n }\n\n const checkProperties =\n opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties\n const valid = gen.name(\"valid\")\n if (it.props !== true && !(it.props instanceof Name)) {\n it.props = evaluatedPropsToName(gen, it.props)\n }\n const {props} = it\n validatePatternProperties()\n\n function validatePatternProperties(): void {\n for (const pat of patterns) {\n if (checkProperties) checkMatchingProperties(pat)\n if (it.allErrors) {\n validateProperties(pat)\n } else {\n gen.var(valid, true) // TODO var\n validateProperties(pat)\n gen.if(valid)\n }\n }\n }\n\n function checkMatchingProperties(pat: string): void {\n for (const prop in checkProperties) {\n if (new RegExp(pat).test(prop)) {\n checkStrictMode(\n it,\n `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`\n )\n }\n }\n }\n\n function validateProperties(pat: string): void {\n gen.forIn(\"key\", data, (key) => {\n gen.if(_`${usePattern(cxt, pat)}.test(${key})`, () => {\n const alwaysValid = alwaysValidPatterns.includes(pat)\n if (!alwaysValid) {\n cxt.subschema(\n {\n keyword: \"patternProperties\",\n schemaProp: pat,\n dataProp: key,\n dataPropType: Type.Str,\n },\n valid\n )\n }\n\n if (it.opts.unevaluated && props !== true) {\n gen.assign(_`${props}[${key}]`, true)\n } else if (!alwaysValid && !it.allErrors) {\n // can short-circuit if `unevaluatedProperties` is not supported (opts.next === false)\n // or if all properties were evaluated (props === true)\n gen.if(not(valid), () => gen.break())\n }\n })\n })\n }\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, ErrorNoParams, AnySchema} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {alwaysValidSchema} from \"../../compile/util\"\n\nexport type NotKeywordError = ErrorNoParams<\"not\", AnySchema>\n\nconst def: CodeKeywordDefinition = {\n keyword: \"not\",\n schemaType: [\"object\", \"boolean\"],\n trackErrors: true,\n code(cxt: KeywordCxt) {\n const {gen, schema, it} = cxt\n if (alwaysValidSchema(it, schema)) {\n cxt.fail()\n return\n }\n\n const valid = gen.name(\"valid\")\n cxt.subschema(\n {\n keyword: \"not\",\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n },\n valid\n )\n\n cxt.failResult(\n valid,\n () => cxt.reset(),\n () => cxt.error()\n )\n },\n error: {message: \"must NOT be valid\"},\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, ErrorNoParams, AnySchema} from \"../../types\"\nimport {validateUnion} from \"../code\"\n\nexport type AnyOfError = ErrorNoParams<\"anyOf\", AnySchema[]>\n\nconst def: CodeKeywordDefinition = {\n keyword: \"anyOf\",\n schemaType: \"array\",\n trackErrors: true,\n code: validateUnion,\n error: {message: \"must match a schema in anyOf\"},\n}\n\nexport default def\n", "import type {\n CodeKeywordDefinition,\n ErrorObject,\n KeywordErrorDefinition,\n AnySchema,\n} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, Name} from \"../../compile/codegen\"\nimport {alwaysValidSchema} from \"../../compile/util\"\nimport {SchemaCxt} from \"../../compile\"\n\nexport type OneOfError = ErrorObject<\n \"oneOf\",\n {passingSchemas: [number, number] | null},\n AnySchema[]\n>\n\nconst error: KeywordErrorDefinition = {\n message: \"must match exactly one schema in oneOf\",\n params: ({params}) => _`{passingSchemas: ${params.passing}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"oneOf\",\n schemaType: \"array\",\n trackErrors: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, schema, parentSchema, it} = cxt\n /* istanbul ignore if */\n if (!Array.isArray(schema)) throw new Error(\"ajv implementation error\")\n if (it.opts.discriminator && parentSchema.discriminator) return\n const schArr: AnySchema[] = schema\n const valid = gen.let(\"valid\", false)\n const passing = gen.let(\"passing\", null)\n const schValid = gen.name(\"_valid\")\n cxt.setParams({passing})\n // TODO possibly fail straight away (with warning or exception) if there are two empty always valid schemas\n\n gen.block(validateOneOf)\n\n cxt.result(\n valid,\n () => cxt.reset(),\n () => cxt.error(true)\n )\n\n function validateOneOf(): void {\n schArr.forEach((sch: AnySchema, i: number) => {\n let schCxt: SchemaCxt | undefined\n if (alwaysValidSchema(it, sch)) {\n gen.var(schValid, true)\n } else {\n schCxt = cxt.subschema(\n {\n keyword: \"oneOf\",\n schemaProp: i,\n compositeRule: true,\n },\n schValid\n )\n }\n\n if (i > 0) {\n gen\n .if(_`${schValid} && ${valid}`)\n .assign(valid, false)\n .assign(passing, _`[${passing}, ${i}]`)\n .else()\n }\n\n gen.if(schValid, () => {\n gen.assign(valid, true)\n gen.assign(passing, i)\n if (schCxt) cxt.mergeEvaluated(schCxt, Name)\n })\n })\n }\n },\n}\n\nexport default def\n", "import type {CodeKeywordDefinition, AnySchema} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {alwaysValidSchema} from \"../../compile/util\"\n\nconst def: CodeKeywordDefinition = {\n keyword: \"allOf\",\n schemaType: \"array\",\n code(cxt: KeywordCxt) {\n const {gen, schema, it} = cxt\n /* istanbul ignore if */\n if (!Array.isArray(schema)) throw new Error(\"ajv implementation error\")\n const valid = gen.name(\"valid\")\n schema.forEach((sch: AnySchema, i: number) => {\n if (alwaysValidSchema(it, sch)) return\n const schCxt = cxt.subschema({keyword: \"allOf\", schemaProp: i}, valid, true)\n cxt.ok(valid)\n cxt.mergeEvaluated(schCxt)\n })\n },\n}\n\nexport default def\n", "import type {\n CodeKeywordDefinition,\n ErrorObject,\n KeywordErrorDefinition,\n AnySchema,\n} from \"../../types\"\nimport type {SchemaObjCxt} from \"../../compile\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, not, Name} from \"../../compile/codegen\"\nimport {alwaysValidSchema, checkStrictMode} from \"../../compile/util\"\n\nexport type IfKeywordError = ErrorObject<\"if\", {failingKeyword: string}, AnySchema>\n\nconst error: KeywordErrorDefinition = {\n message: ({params}) => str`must match \"${params.ifClause}\" schema`,\n params: ({params}) => _`{failingKeyword: ${params.ifClause}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"if\",\n schemaType: [\"object\", \"boolean\"],\n trackErrors: true,\n error,\n code(cxt: KeywordCxt) {\n const {gen, parentSchema, it} = cxt\n if (parentSchema.then === undefined && parentSchema.else === undefined) {\n checkStrictMode(it, '\"if\" without \"then\" and \"else\" is ignored')\n }\n const hasThen = hasSchema(it, \"then\")\n const hasElse = hasSchema(it, \"else\")\n if (!hasThen && !hasElse) return\n\n const valid = gen.let(\"valid\", true)\n const schValid = gen.name(\"_valid\")\n validateIf()\n cxt.reset()\n\n if (hasThen && hasElse) {\n const ifClause = gen.let(\"ifClause\")\n cxt.setParams({ifClause})\n gen.if(schValid, validateClause(\"then\", ifClause), validateClause(\"else\", ifClause))\n } else if (hasThen) {\n gen.if(schValid, validateClause(\"then\"))\n } else {\n gen.if(not(schValid), validateClause(\"else\"))\n }\n\n cxt.pass(valid, () => cxt.error(true))\n\n function validateIf(): void {\n const schCxt = cxt.subschema(\n {\n keyword: \"if\",\n compositeRule: true,\n createErrors: false,\n allErrors: false,\n },\n schValid\n )\n cxt.mergeEvaluated(schCxt)\n }\n\n function validateClause(keyword: string, ifClause?: Name): () => void {\n return () => {\n const schCxt = cxt.subschema({keyword}, schValid)\n gen.assign(valid, schValid)\n cxt.mergeValidEvaluated(schCxt, valid)\n if (ifClause) gen.assign(ifClause, _`${keyword}`)\n else cxt.setParams({ifClause: keyword})\n }\n }\n },\n}\n\nfunction hasSchema(it: SchemaObjCxt, keyword: string): boolean {\n const schema = it.schema[keyword]\n return schema !== undefined && !alwaysValidSchema(it, schema)\n}\n\nexport default def\n", "import type {CodeKeywordDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {checkStrictMode} from \"../../compile/util\"\n\nconst def: CodeKeywordDefinition = {\n keyword: [\"then\", \"else\"],\n schemaType: [\"object\", \"boolean\"],\n code({keyword, parentSchema, it}: KeywordCxt) {\n if (parentSchema.if === undefined) checkStrictMode(it, `\"${keyword}\" without \"if\" is ignored`)\n },\n}\n\nexport default def\n", "import type {ErrorNoParams, Vocabulary} from \"../../types\"\nimport additionalItems, {AdditionalItemsError} from \"./additionalItems\"\nimport prefixItems from \"./prefixItems\"\nimport items from \"./items\"\nimport items2020, {ItemsError} from \"./items2020\"\nimport contains, {ContainsError} from \"./contains\"\nimport dependencies, {DependenciesError} from \"./dependencies\"\nimport propertyNames, {PropertyNamesError} from \"./propertyNames\"\nimport additionalProperties, {AdditionalPropertiesError} from \"./additionalProperties\"\nimport properties from \"./properties\"\nimport patternProperties from \"./patternProperties\"\nimport notKeyword, {NotKeywordError} from \"./not\"\nimport anyOf, {AnyOfError} from \"./anyOf\"\nimport oneOf, {OneOfError} from \"./oneOf\"\nimport allOf from \"./allOf\"\nimport ifKeyword, {IfKeywordError} from \"./if\"\nimport thenElse from \"./thenElse\"\n\nexport default function getApplicator(draft2020 = false): Vocabulary {\n const applicator = [\n // any\n notKeyword,\n anyOf,\n oneOf,\n allOf,\n ifKeyword,\n thenElse,\n // object\n propertyNames,\n additionalProperties,\n dependencies,\n properties,\n patternProperties,\n ]\n // array\n if (draft2020) applicator.push(prefixItems, items2020)\n else applicator.push(additionalItems, items)\n applicator.push(contains)\n return applicator\n}\n\nexport type ApplicatorKeywordError =\n | ErrorNoParams<\"false schema\">\n | AdditionalItemsError\n | ItemsError\n | ContainsError\n | AdditionalPropertiesError\n | DependenciesError\n | IfKeywordError\n | AnyOfError\n | OneOfError\n | NotKeywordError\n | PropertyNamesError\n", "import type {\n AddedFormat,\n FormatValidator,\n AsyncFormatValidator,\n CodeKeywordDefinition,\n KeywordErrorDefinition,\n ErrorObject,\n} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, str, nil, or, Code, getProperty, regexpCode} from \"../../compile/codegen\"\n\ntype FormatValidate =\n | FormatValidator\n | FormatValidator\n | AsyncFormatValidator\n | AsyncFormatValidator\n | RegExp\n | string\n | true\n\nexport type FormatError = ErrorObject<\"format\", {format: string}, string | {$data: string}>\n\nconst error: KeywordErrorDefinition = {\n message: ({schemaCode}) => str`must match format \"${schemaCode}\"`,\n params: ({schemaCode}) => _`{format: ${schemaCode}}`,\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"format\",\n type: [\"number\", \"string\"],\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt: KeywordCxt, ruleType?: string) {\n const {gen, data, $data, schema, schemaCode, it} = cxt\n const {opts, errSchemaPath, schemaEnv, self} = it\n if (!opts.validateFormats) return\n\n if ($data) validate$DataFormat()\n else validateFormat()\n\n function validate$DataFormat(): void {\n const fmts = gen.scopeValue(\"formats\", {\n ref: self.formats,\n code: opts.code.formats,\n })\n const fDef = gen.const(\"fDef\", _`${fmts}[${schemaCode}]`)\n const fType = gen.let(\"fType\")\n const format = gen.let(\"format\")\n // TODO simplify\n gen.if(\n _`typeof ${fDef} == \"object\" && !(${fDef} instanceof RegExp)`,\n () => gen.assign(fType, _`${fDef}.type || \"string\"`).assign(format, _`${fDef}.validate`),\n () => gen.assign(fType, _`\"string\"`).assign(format, fDef)\n )\n cxt.fail$data(or(unknownFmt(), invalidFmt()))\n\n function unknownFmt(): Code {\n if (opts.strictSchema === false) return nil\n return _`${schemaCode} && !${format}`\n }\n\n function invalidFmt(): Code {\n const callFormat = schemaEnv.$async\n ? _`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))`\n : _`${format}(${data})`\n const validData = _`(typeof ${format} == \"function\" ? ${callFormat} : ${format}.test(${data}))`\n return _`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`\n }\n }\n\n function validateFormat(): void {\n const formatDef: AddedFormat | undefined = self.formats[schema]\n if (!formatDef) {\n unknownFormat()\n return\n }\n if (formatDef === true) return\n const [fmtType, format, fmtRef] = getFormat(formatDef)\n if (fmtType === ruleType) cxt.pass(validCondition())\n\n function unknownFormat(): void {\n if (opts.strictSchema === false) {\n self.logger.warn(unknownMsg())\n return\n }\n throw new Error(unknownMsg())\n\n function unknownMsg(): string {\n return `unknown format \"${schema as string}\" ignored in schema at path \"${errSchemaPath}\"`\n }\n }\n\n function getFormat(fmtDef: AddedFormat): [string, FormatValidate, Code] {\n const code =\n fmtDef instanceof RegExp\n ? regexpCode(fmtDef)\n : opts.code.formats\n ? _`${opts.code.formats}${getProperty(schema)}`\n : undefined\n const fmt = gen.scopeValue(\"formats\", {key: schema, ref: fmtDef, code})\n if (typeof fmtDef == \"object\" && !(fmtDef instanceof RegExp)) {\n return [fmtDef.type || \"string\", fmtDef.validate, _`${fmt}.validate`]\n }\n\n return [\"string\", fmtDef, fmt]\n }\n\n function validCondition(): Code {\n if (typeof formatDef == \"object\" && !(formatDef instanceof RegExp) && formatDef.async) {\n if (!schemaEnv.$async) throw new Error(\"async format in sync schema\")\n return _`await ${fmtRef}(${data})`\n }\n return typeof format == \"function\" ? _`${fmtRef}(${data})` : _`${fmtRef}.test(${data})`\n }\n }\n },\n}\n\nexport default def\n", "import type {Vocabulary} from \"../../types\"\nimport formatKeyword from \"./format\"\n\nconst format: Vocabulary = [formatKeyword]\n\nexport default format\n", "import type {Vocabulary} from \"../types\"\n\nexport const metadataVocabulary: Vocabulary = [\n \"title\",\n \"description\",\n \"default\",\n \"deprecated\",\n /**\n * readOnly/writeOnly are handled as validation keywords when OAS context is provided.\n * Keeping them here would register them as annotation-only metadata and would\n * prevent the context-aware validation behavior.\n *\n * @see ./validation/readOnly.ts\n * @see ./validation/writeOnly.ts\n */\n // \"readOnly\",\n // \"writeOnly\",\n \"examples\",\n]\n\nexport const contentVocabulary: Vocabulary = [\n \"contentMediaType\",\n \"contentEncoding\",\n \"contentSchema\",\n]\n", "import type {Vocabulary} from \"../types\"\nimport coreVocabulary from \"./core\"\nimport validationVocabulary from \"./validation\"\nimport getApplicatorVocabulary from \"./applicator\"\nimport formatVocabulary from \"./format\"\nimport {metadataVocabulary, contentVocabulary} from \"./metadata\"\n\nconst draft7Vocabularies: Vocabulary[] = [\n coreVocabulary,\n validationVocabulary,\n getApplicatorVocabulary(),\n formatVocabulary,\n metadataVocabulary,\n contentVocabulary,\n]\n\nexport default draft7Vocabularies\n", "import type {ErrorObject} from \"../../types\"\n\nexport enum DiscrError {\n Tag = \"tag\",\n Mapping = \"mapping\",\n}\n\nexport type DiscrErrorObj = ErrorObject<\n \"discriminator\",\n {error: E; tag: string; tagValue: unknown},\n string\n>\n", "import type {CodeKeywordDefinition, AnySchemaObject, KeywordErrorDefinition} from \"../../types\"\nimport type {KeywordCxt} from \"../../compile/validate\"\nimport {_, getProperty, Name} from \"../../compile/codegen\"\nimport {DiscrError, DiscrErrorObj} from \"../discriminator/types\"\nimport {resolveRef, SchemaEnv} from \"../../compile\"\nimport MissingRefError from \"../../compile/ref_error\"\nimport {schemaHasRulesButRef} from \"../../compile/util\"\n\nexport type DiscriminatorError = DiscrErrorObj | DiscrErrorObj\n\nconst error: KeywordErrorDefinition = {\n message: ({params: {discrError, tagName}}) =>\n discrError === DiscrError.Tag\n ? `tag \"${tagName}\" must be string`\n : `value of tag \"${tagName}\" must be in oneOf or anyOf`,\n params: ({params: {discrError, tag, tagName}}) =>\n _`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`,\n}\n\nfunction getDiscriminatorPropertyFromAllOf(\n sch: AnySchemaObject,\n tagName: string\n): AnySchemaObject | undefined {\n if (!sch.allOf || !Array.isArray(sch.allOf)) {\n return undefined\n }\n\n for (const subschema of sch.allOf) {\n if (subschema?.properties?.[tagName]) {\n return subschema.properties[tagName] as AnySchemaObject\n }\n }\n\n return undefined\n}\n\nconst def: CodeKeywordDefinition = {\n keyword: \"discriminator\",\n type: \"object\",\n schemaType: \"object\",\n error,\n code(cxt: KeywordCxt) {\n const {gen, data, schema, parentSchema, it} = cxt\n\n const keyword = parentSchema.oneOf ? \"oneOf\" : parentSchema.anyOf ? \"anyOf\" : undefined\n\n if (!it.opts.discriminator) {\n throw new Error(\"discriminator: requires discriminator option\")\n }\n const tagName = schema.propertyName\n if (typeof tagName != \"string\") throw new Error(\"discriminator: requires propertyName\")\n if (!keyword) throw new Error(\"discriminator: requires oneOf or anyOf composite keyword\")\n const parentSchemaVariants = parentSchema[keyword]\n const valid = gen.let(\"valid\", false)\n const tag = gen.const(\"tag\", _`${data}${getProperty(tagName)}`)\n gen.if(\n _`typeof ${tag} == \"string\"`,\n () => validateMapping(),\n () => cxt.error(false, {discrError: DiscrError.Tag, tag, tagName})\n )\n cxt.ok(valid)\n\n function validateMapping(): void {\n const mapping = getMapping()\n gen.if(false)\n for (const tagValue in mapping) {\n gen.elseIf(_`${tag} === ${tagValue}`)\n gen.assign(valid, applyTagSchema(mapping[tagValue]))\n }\n gen.else()\n cxt.error(false, {discrError: DiscrError.Mapping, tag, tagName})\n gen.endIf()\n }\n\n function applyTagSchema(schemaProp?: number): Name {\n const _valid = gen.name(\"valid\")\n const schCxt = cxt.subschema({keyword, schemaProp}, _valid)\n cxt.mergeEvaluated(schCxt, Name)\n return _valid\n }\n\n function getMapping(): {[T in string]?: number} {\n const discriminatorMapping: {[T in string]?: number} = {}\n const topRequired = hasRequired(parentSchema)\n let tagRequired = true\n for (let i = 0; i < parentSchemaVariants.length; i++) {\n let sch = parentSchemaVariants[i]\n const schRef = sch?.$ref\n\n if (schRef && schema.mapping) {\n const {mapping} = schema\n const matchedKeys = Object.keys(mapping).filter((key) => mapping[key] === sch.$ref)\n\n if (matchedKeys.length) {\n for (const key of matchedKeys) {\n addMapping(key, i)\n }\n continue\n }\n }\n\n if (schRef && !schemaHasRulesButRef(sch, it.self.RULES)) {\n sch = resolveRef.call(it.self, it.schemaEnv.root, it.baseId, schRef)\n if (sch instanceof SchemaEnv) sch = sch.schema\n if (sch === undefined) throw new MissingRefError(it.opts.uriResolver, it.baseId, schRef)\n }\n\n let propSch = sch?.properties?.[tagName]\n if (!propSch && sch?.allOf) {\n propSch = getDiscriminatorPropertyFromAllOf(sch, tagName)\n }\n\n if (typeof propSch != \"object\") {\n throw new Error(\n `discriminator: ${keyword} subschemas (or referenced schemas) must have \"properties/${tagName}\" or match mapping`\n )\n }\n tagRequired = tagRequired && (topRequired || hasRequired(sch))\n addMappings(propSch, i)\n }\n if (!tagRequired) throw new Error(`discriminator: \"${tagName}\" must be required`)\n return discriminatorMapping\n\n function hasRequired(sch: AnySchemaObject): boolean {\n if (Array.isArray(sch.required) && sch.required.includes(tagName)) {\n return true\n }\n\n if (sch.allOf && Array.isArray(sch.allOf)) {\n for (const subschema of sch.allOf) {\n const subSch = subschema as AnySchemaObject\n if (Array.isArray(subSch.required) && subSch.required.includes(tagName)) {\n return true\n }\n }\n }\n\n return false\n }\n\n function addMappings(sch: AnySchemaObject, i: number): void {\n if (sch.const) {\n addMapping(sch.const, i)\n } else if (sch.enum) {\n for (const tagValue of sch.enum) {\n addMapping(tagValue, i)\n }\n } else {\n throw new Error(`discriminator: \"properties/${tagName}\" must have \"const\" or \"enum\"`)\n }\n }\n\n function addMapping(tagValue: unknown, i: number): void {\n if (typeof tagValue != \"string\" || tagValue in discriminatorMapping) {\n throw new Error(`discriminator: \"${tagName}\" values must be unique strings`)\n }\n discriminatorMapping[tagValue] = i\n }\n }\n },\n}\n\nexport default def\n", "{\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"$id\": \"http://json-schema.org/draft-07/schema#\",\n \"title\": \"Core schema meta-schema\",\n \"definitions\": {\n \"schemaArray\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\"$ref\": \"#\"}\n },\n \"nonNegativeInteger\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"nonNegativeIntegerDefault0\": {\n \"allOf\": [{\"$ref\": \"#/definitions/nonNegativeInteger\"}, {\"default\": 0}]\n },\n \"simpleTypes\": {\n \"enum\": [\"array\", \"boolean\", \"integer\", \"null\", \"number\", \"object\", \"string\"]\n },\n \"stringArray\": {\n \"type\": \"array\",\n \"items\": {\"type\": \"string\"},\n \"uniqueItems\": true,\n \"default\": []\n }\n },\n \"type\": [\"object\", \"boolean\"],\n \"properties\": {\n \"$id\": {\n \"type\": \"string\",\n \"format\": \"uri-reference\"\n },\n \"$schema\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n },\n \"$ref\": {\n \"type\": \"string\",\n \"format\": \"uri-reference\"\n },\n \"$comment\": {\n \"type\": \"string\"\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"default\": true,\n \"readOnly\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"examples\": {\n \"type\": \"array\",\n \"items\": true\n },\n \"multipleOf\": {\n \"type\": \"number\",\n \"exclusiveMinimum\": 0\n },\n \"maximum\": {\n \"type\": \"number\"\n },\n \"exclusiveMaximum\": {\n \"type\": \"number\"\n },\n \"minimum\": {\n \"type\": \"number\"\n },\n \"exclusiveMinimum\": {\n \"type\": \"number\"\n },\n \"maxLength\": {\"$ref\": \"#/definitions/nonNegativeInteger\"},\n \"minLength\": {\"$ref\": \"#/definitions/nonNegativeIntegerDefault0\"},\n \"pattern\": {\n \"type\": \"string\",\n \"format\": \"regex\"\n },\n \"additionalItems\": {\"$ref\": \"#\"},\n \"items\": {\n \"anyOf\": [{\"$ref\": \"#\"}, {\"$ref\": \"#/definitions/schemaArray\"}],\n \"default\": true\n },\n \"maxItems\": {\"$ref\": \"#/definitions/nonNegativeInteger\"},\n \"minItems\": {\"$ref\": \"#/definitions/nonNegativeIntegerDefault0\"},\n \"uniqueItems\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"contains\": {\"$ref\": \"#\"},\n \"maxProperties\": {\"$ref\": \"#/definitions/nonNegativeInteger\"},\n \"minProperties\": {\"$ref\": \"#/definitions/nonNegativeIntegerDefault0\"},\n \"required\": {\"$ref\": \"#/definitions/stringArray\"},\n \"additionalProperties\": {\"$ref\": \"#\"},\n \"definitions\": {\n \"type\": \"object\",\n \"additionalProperties\": {\"$ref\": \"#\"},\n \"default\": {}\n },\n \"properties\": {\n \"type\": \"object\",\n \"additionalProperties\": {\"$ref\": \"#\"},\n \"default\": {}\n },\n \"patternProperties\": {\n \"type\": \"object\",\n \"additionalProperties\": {\"$ref\": \"#\"},\n \"propertyNames\": {\"format\": \"regex\"},\n \"default\": {}\n },\n \"dependencies\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"anyOf\": [{\"$ref\": \"#\"}, {\"$ref\": \"#/definitions/stringArray\"}]\n }\n },\n \"propertyNames\": {\"$ref\": \"#\"},\n \"const\": true,\n \"enum\": {\n \"type\": \"array\",\n \"items\": true,\n \"minItems\": 1,\n \"uniqueItems\": true\n },\n \"type\": {\n \"anyOf\": [\n {\"$ref\": \"#/definitions/simpleTypes\"},\n {\n \"type\": \"array\",\n \"items\": {\"$ref\": \"#/definitions/simpleTypes\"},\n \"minItems\": 1,\n \"uniqueItems\": true\n }\n ]\n },\n \"format\": {\"type\": \"string\"},\n \"contentMediaType\": {\"type\": \"string\"},\n \"contentEncoding\": {\"type\": \"string\"},\n \"if\": {\"$ref\": \"#\"},\n \"then\": {\"$ref\": \"#\"},\n \"else\": {\"$ref\": \"#\"},\n \"allOf\": {\"$ref\": \"#/definitions/schemaArray\"},\n \"anyOf\": {\"$ref\": \"#/definitions/schemaArray\"},\n \"oneOf\": {\"$ref\": \"#/definitions/schemaArray\"},\n \"not\": {\"$ref\": \"#\"}\n },\n \"default\": true\n}\n", "import type {AnySchemaObject} from \"./types\"\nimport AjvCore from \"./core\"\nimport draft7Vocabularies from \"./vocabularies/draft7\"\nimport discriminator from \"./vocabularies/discriminator\"\nimport * as draft7MetaSchema from \"./refs/json-schema-draft-07.json\"\n\nconst META_SUPPORT_DATA = [\"/properties\"]\n\nconst META_SCHEMA_ID = \"http://json-schema.org/draft-07/schema\"\n\nexport class Ajv extends AjvCore {\n _addVocabularies(): void {\n super._addVocabularies()\n draft7Vocabularies.forEach((v) => this.addVocabulary(v))\n if (this.opts.discriminator) this.addKeyword(discriminator)\n }\n\n _addDefaultMetaSchema(): void {\n super._addDefaultMetaSchema()\n if (!this.opts.meta) return\n const metaSchema = this.opts.$data\n ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA)\n : draft7MetaSchema\n this.addMetaSchema(metaSchema, META_SCHEMA_ID, false)\n this.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID\n }\n\n defaultMeta(): string | AnySchemaObject | undefined {\n return (this.opts.defaultMeta =\n super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined))\n }\n}\n\nmodule.exports = exports = Ajv\nmodule.exports.Ajv = Ajv\nObject.defineProperty(exports, \"__esModule\", {value: true})\n\nexport default Ajv\n\nexport {\n Format,\n FormatDefinition,\n AsyncFormatDefinition,\n KeywordDefinition,\n KeywordErrorDefinition,\n CodeKeywordDefinition,\n MacroKeywordDefinition,\n FuncKeywordDefinition,\n Vocabulary,\n Schema,\n SchemaObject,\n AnySchemaObject,\n AsyncSchema,\n AnySchema,\n ValidateFunction,\n AsyncValidateFunction,\n SchemaValidateFunction,\n ErrorObject,\n ErrorNoParams,\n Context,\n} from \"./types\"\n\nexport {Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions} from \"./core\"\nexport {SchemaCxt, SchemaObjCxt} from \"./compile\"\nexport {KeywordCxt} from \"./compile/validate\"\nexport {DefinedError} from \"./vocabularies/errors\"\nexport {JSONType} from \"./compile/rules\"\nexport {JSONSchemaType} from \"./types/json-schema\"\nexport {_, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions} from \"./compile/codegen\"\nexport {default as ValidationError} from \"./runtime/validation_error\"\nexport {default as MissingRefError} from \"./compile/ref_error\"\n", "import type Ajv from \"ajv\"\nimport type {\n Plugin,\n CodeKeywordDefinition,\n KeywordErrorDefinition,\n Code,\n Name,\n ErrorObject,\n} from \"ajv\"\nimport type {AddedFormat} from \"ajv/dist/types\"\nimport type {Rule} from \"ajv/dist/compile/rules\"\nimport {KeywordCxt} from \"ajv\"\nimport {_, str, or, getProperty, operators} from \"ajv/dist/compile/codegen\"\n\ntype Kwd = \"formatMaximum\" | \"formatMinimum\" | \"formatExclusiveMaximum\" | \"formatExclusiveMinimum\"\n\ntype Comparison = \"<=\" | \">=\" | \"<\" | \">\"\n\nconst ops = operators\n\nconst KWDs: {[K in Kwd]: {okStr: Comparison; ok: Code; fail: Code}} = {\n formatMaximum: {okStr: \"<=\", ok: ops.LTE, fail: ops.GT},\n formatMinimum: {okStr: \">=\", ok: ops.GTE, fail: ops.LT},\n formatExclusiveMaximum: {okStr: \"<\", ok: ops.LT, fail: ops.GTE},\n formatExclusiveMinimum: {okStr: \">\", ok: ops.GT, fail: ops.LTE},\n}\n\nexport type LimitFormatError = ErrorObject\n\nconst error: KeywordErrorDefinition = {\n message: ({keyword, schemaCode}) => str`should be ${KWDs[keyword as Kwd].okStr} ${schemaCode}`,\n params: ({keyword, schemaCode}) =>\n _`{comparison: ${KWDs[keyword as Kwd].okStr}, limit: ${schemaCode}}`,\n}\n\nexport const formatLimitDefinition: CodeKeywordDefinition = {\n keyword: Object.keys(KWDs),\n type: \"string\",\n schemaType: \"string\",\n $data: true,\n error,\n code(cxt) {\n const {gen, data, schemaCode, keyword, it} = cxt\n const {opts, self} = it\n if (!opts.validateFormats) return\n\n const fCxt = new KeywordCxt(it, (self.RULES.all.format as Rule).definition, \"format\")\n if (fCxt.$data) validate$DataFormat()\n else validateFormat()\n\n function validate$DataFormat(): void {\n const fmts = gen.scopeValue(\"formats\", {\n ref: self.formats,\n code: opts.code.formats,\n })\n const fmt = gen.const(\"fmt\", _`${fmts}[${fCxt.schemaCode}]`)\n cxt.fail$data(\n or(\n _`typeof ${fmt} != \"object\"`,\n _`${fmt} instanceof RegExp`,\n _`typeof ${fmt}.compare != \"function\"`,\n compareCode(fmt)\n )\n )\n }\n\n function validateFormat(): void {\n const format = fCxt.schema as string\n const fmtDef: AddedFormat | undefined = self.formats[format]\n if (!fmtDef || fmtDef === true) return\n if (\n typeof fmtDef != \"object\" ||\n fmtDef instanceof RegExp ||\n typeof fmtDef.compare != \"function\"\n ) {\n throw new Error(`\"${keyword}\": format \"${format}\" does not define \"compare\" function`)\n }\n const fmt = gen.scopeValue(\"formats\", {\n key: format,\n ref: fmtDef,\n code: opts.code.formats ? _`${opts.code.formats}${getProperty(format)}` : undefined,\n })\n\n cxt.fail$data(compareCode(fmt))\n }\n\n function compareCode(fmt: Name): Code {\n return _`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword as Kwd].fail} 0`\n }\n },\n dependencies: [\"format\"],\n}\n\nconst formatLimitPlugin: Plugin = (ajv: Ajv): Ajv => {\n ajv.addKeyword(formatLimitDefinition)\n return ajv\n}\n\nexport default formatLimitPlugin\n", "import {\n DefinedFormats,\n FormatMode,\n FormatName,\n formatNames,\n fastFormats,\n fullFormats,\n} from \"./formats\"\nimport formatLimit from \"./limit\"\nimport type Ajv from \"ajv\"\nimport type {Plugin, Format} from \"ajv\"\nimport {_, Name} from \"ajv/dist/compile/codegen\"\n\nexport {FormatMode, FormatName} from \"./formats\"\nexport {LimitFormatError} from \"./limit\"\nexport interface FormatOptions {\n mode?: FormatMode\n formats?: FormatName[]\n keywords?: boolean\n}\n\nexport type FormatsPluginOptions = FormatName[] | FormatOptions\n\nexport interface FormatsPlugin extends Plugin {\n get: (format: FormatName, mode?: FormatMode) => Format\n}\n\nconst fullName = new Name(\"fullFormats\")\nconst fastName = new Name(\"fastFormats\")\n\nconst formatsPlugin: FormatsPlugin = (\n ajv: Ajv,\n opts: FormatsPluginOptions = {keywords: true}\n): Ajv => {\n if (Array.isArray(opts)) {\n addFormats(ajv, opts, fullFormats, fullName)\n return ajv\n }\n const [formats, exportName] =\n opts.mode === \"fast\" ? [fastFormats, fastName] : [fullFormats, fullName]\n const list = opts.formats || formatNames\n addFormats(ajv, list, formats, exportName)\n if (opts.keywords) formatLimit(ajv)\n return ajv\n}\n\nformatsPlugin.get = (name: FormatName, mode: FormatMode = \"full\"): Format => {\n const formats = mode === \"fast\" ? fastFormats : fullFormats\n const f = formats[name]\n if (!f) throw new Error(`Unknown format \"${name}\"`)\n return f\n}\n\nfunction addFormats(ajv: Ajv, list: FormatName[], fs: DefinedFormats, exportName: Name): void {\n ajv.opts.code.formats ??= _`require(\"ajv-formats/dist/formats\").${exportName}`\n for (const f of list) ajv.addFormat(f, fs[f])\n}\n\nmodule.exports = exports = formatsPlugin\nObject.defineProperty(exports, \"__esModule\", {value: true})\n\nexport default formatsPlugin\n", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "\n/**\n * Created by kor on 06/05/15.\n */\nimport YAMLException = require('./exception');\nexport enum Kind{\n SCALAR,\n MAPPING,\n MAP,\n SEQ,\n ANCHOR_REF,\n INCLUDE_REF\n}\n\nexport interface YAMLDocument {\n startPosition:number\n endPosition:number\n errors:YAMLException[]\n}\nexport interface YAMLNode extends YAMLDocument{\n startPosition:number\n endPosition:number\n kind:Kind\n anchorId?:string\n valueObject?:any\n parent:YAMLNode\n errors:YAMLException[]\n /**\n * @deprecated Inspect kind and cast to the appropriate subtype instead.\n */\n value?:any\n\n /**\n * @deprecated Inspect kind and cast to the appropriate subtype instead.\n */\n key?:any\n\n /**\n * @deprecated Inspect kind and cast to the appropriate subtype instead.\n */\n mappings?:any\n}\n\nexport interface YAMLAnchorReference extends YAMLNode{\n referencesAnchor:string\n value:YAMLNode\n}\nexport interface YAMLScalar extends YAMLNode{\n value:string\n doubleQuoted?:boolean\n singleQuoted?:boolean\n plainScalar?:boolean\n rawValue:string\n}\n\nexport interface YAMLMapping extends YAMLNode{\n key:YAMLScalar\n value:YAMLNode\n}\nexport interface YAMLSequence extends YAMLNode{\n items:YAMLNode[]\n}\nexport interface YamlMap extends YAMLNode{\n mappings:YAMLMapping[]\n}\nexport function newMapping(key:YAMLScalar,value:YAMLNode):YAMLMapping{\n var end = (value ? value.endPosition : key.endPosition + 1); //FIXME.workaround, end should be defied by position of ':'\n //console.log('key: ' + key.value + ' ' + key.startPosition + '..' + key.endPosition + ' ' + value + ' end: ' + end);\n var node = {\n key: key,\n value: value,\n startPosition: key.startPosition,\n endPosition: end,\n kind: Kind.MAPPING,\n parent: null,\n errors: []\n };\n return node\n}\nexport function newAnchorRef(key:string,start:number,end:number,value:YAMLNode):YAMLAnchorReference{\n return {\n errors:[],\n referencesAnchor:key,\n value:value,\n startPosition:start,\n endPosition:end,\n kind:Kind.ANCHOR_REF,\n parent:null\n }\n}\nexport function newScalar(v:string|boolean|number=\"\"):YAMLScalar{\n const result:YAMLScalar = {\n errors:[],\n startPosition:-1,\n endPosition:-1,\n value:\"\"+v,\n kind:Kind.SCALAR,\n parent:null,\n doubleQuoted:false,\n rawValue:\"\"+v,\n };\n if(typeof v !== \"string\"){\n result.valueObject = v;\n }\n return result\n}\nexport function newItems():YAMLSequence{\n return {\n errors:[],\n startPosition:-1,\n endPosition:-1,\n items:[],\n kind:Kind.SEQ,\n parent:null\n }\n}\nexport function newSeq():YAMLSequence{\n return newItems();\n}\nexport function newMap(mappings?: YAMLMapping[]):YamlMap{\n return {\n errors:[],\n startPosition:-1,\n endPosition:-1,\n mappings: mappings ? mappings : [],\n kind:Kind.MAP,\n parent:null\n }\n}\n", "\n\n'use strict';\n\n\nexport function isNothing(subject) {\n return (typeof subject === 'undefined') || (null === subject);\n}\n\n\nexport function isObject(subject) {\n return (typeof subject === 'object') && (null !== subject);\n}\n\n\nexport function toArray(sequence) {\n if (Array.isArray(sequence)) {\n return sequence;\n } else if (isNothing(sequence)) {\n return [];\n }\n return [ sequence ];\n}\n\n\nexport function extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nexport function repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nexport function isNegativeZero(number) {\n return (0 === number) && (Number.NEGATIVE_INFINITY === 1 / number);\n}\n\n\n", "\nimport Mark=require(\"./mark\")\n'use strict';\nclass YAMLException {\n\n message:string\n reason:string\n name:string\n mark:Mark\n isWarning:boolean\n\n private static CLASS_IDENTIFIER = \"yaml-ast-parser.YAMLException\";\n\n public static isInstance(instance : any) : instance is YAMLException {\n if(instance != null && instance.getClassIdentifier\n && typeof(instance.getClassIdentifier) == \"function\"){\n\n for (let currentIdentifier of instance.getClassIdentifier()){\n if(currentIdentifier == YAMLException.CLASS_IDENTIFIER) return true;\n }\n }\n\n return false;\n }\n\n public getClassIdentifier() : string[] {\n var superIdentifiers = [];\n\n return superIdentifiers.concat(YAMLException.CLASS_IDENTIFIER);\n }\n\n constructor(reason:string, mark:Mark=null,isWarning=false) {\n this.name = 'YAMLException';\n this.reason = reason;\n this.mark = mark;\n this.message = this.toString(false);\n this.isWarning = isWarning;\n }\n\n toString(compact:boolean=false){\n var result;\n\n result = 'JS-YAML: ' + (this.reason || '(unknown reason)');\n\n if (!compact && this.mark) {\n result += ' ' + this.mark.toString();\n }\n\n return result;\n\n }\n}\nexport=YAMLException", "\n'use strict';\n\n\nimport common = require('./common');\n\nclass Mark{\n\n constructor(public name:string, public buffer:string, public position:number, public line:number, public column:number) {\n }\n\n filePath: string;\n\n toLineEnd:boolean;\n\n getSnippet(indent:number=0, maxLength:number=75) {\n var head, start, tail, end, snippet;\n\n if (!this.buffer) {\n return null;\n }\n\n indent = indent || 4;\n maxLength = maxLength || 75;\n\n head = '';\n start = this.position;\n\n while (start > 0 && -1 === '\\x00\\r\\n\\x85\\u2028\\u2029'.indexOf(this.buffer.charAt(start - 1))) {\n start -= 1;\n if (this.position - start > (maxLength / 2 - 1)) {\n head = ' ... ';\n start += 5;\n break;\n }\n }\n\n tail = '';\n end = this.position;\n\n while (end < this.buffer.length && -1 === '\\x00\\r\\n\\x85\\u2028\\u2029'.indexOf(this.buffer.charAt(end))) {\n end += 1;\n if (end - this.position > (maxLength / 2 - 1)) {\n tail = ' ... ';\n end -= 5;\n break;\n }\n }\n\n snippet = this.buffer.slice(start, end);\n\n return common.repeat(' ', indent) + head + snippet + tail + '\\n' +\n common.repeat(' ', indent + this.position - start + head.length) + '^';\n }\n\n toString (compact:boolean=true) {\n var snippet, where = '';\n\n if (this.name) {\n where += 'in \"' + this.name + '\" ';\n }\n\n where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1);\n\n if (!compact) {\n snippet = this.getSnippet();\n\n if (snippet) {\n where += ':\\n' + snippet;\n }\n }\n\n return where;\n}\n\n}\nexport = Mark", "'use strict';\n\nimport YAMLException = require('./exception');\n\nvar TYPE_CONSTRUCTOR_OPTIONS = [\n 'kind',\n 'resolve',\n 'construct',\n 'instanceOf',\n 'predicate',\n 'represent',\n 'defaultStyle',\n 'styleAliases'\n];\n\nvar YAML_NODE_KINDS = [\n 'scalar',\n 'sequence',\n 'mapping'\n];\n\nfunction compileStyleAliases(map) {\n var result = {};\n\n if (null !== map) {\n Object.keys(map).forEach(function (style) {\n map[style].forEach(function (alias) {\n result[String(alias)] = style;\n });\n });\n }\n\n return result;\n}\n\nexport class Type {\n\n tag;\n kind;\n resolve;\n construct;\n instanceOf;\n predicate;\n represent;\n defaultStyle;\n styleAliases;\n loadKind;\n\n constructor(tag, options) {\n options = options || {};\n\n Object.keys(options).forEach(function (name) {\n if (-1 === TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)) {\n throw new YAMLException('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n }\n });\n\n // TODO: Add tag format check.\n this.tag = tag;\n this.kind = options['kind'] || null;\n this.resolve = options['resolve'] || function () { return true; };\n this.construct = options['construct'] || function (data) { return data; };\n this.instanceOf = options['instanceOf'] || null;\n this.predicate = options['predicate'] || null;\n this.represent = options['represent'] || null;\n this.defaultStyle = options['defaultStyle'] || null;\n this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\n\n if (-1 === YAML_NODE_KINDS.indexOf(this.kind)) {\n throw new YAMLException('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n }\n }\n}", "\n\n'use strict';\n\n/*eslint-disable max-len*/\n\nimport common = require('./common');\nimport YAMLException = require('./exception');\nimport {Type} from './type';\n\n\nfunction compileList(schema: Schema, name, result) {\n var exclude = [];\n\n schema.include.forEach(function (includedSchema) {\n result = compileList(includedSchema, name, result);\n });\n\n schema[name].forEach(function (currentType) {\n result.forEach(function (previousType, previousIndex) {\n if (previousType.tag === currentType.tag) {\n exclude.push(previousIndex);\n }\n });\n\n result.push(currentType);\n });\n\n return result.filter(function (type, index) {\n return -1 === exclude.indexOf(index);\n });\n}\n\n\nfunction compileMap(/* lists... */) {\n var result = {}, index, length;\n\n function collectType(type) {\n result[type.tag] = type;\n }\n\n for (index = 0, length = arguments.length; index < length; index += 1) {\n arguments[index].forEach(collectType);\n }\n\n return result;\n}\n\nexport interface SchemaDefinition{\n include?:Schema[]\n implicit?:Type[]\n explicit?:Type[]\n}\n\nexport class Schema {\n\n include:Schema[]\n implicit:Type[]\n explicit:Type[]\n\n compiledImplicit:any[]\n compiledExplicit:any[]\n compiledTypeMap:any[]\n constructor(definition:SchemaDefinition) {\n this.include = definition.include || [];\n this.implicit = definition.implicit || [];\n this.explicit = definition.explicit || [];\n\n this.implicit.forEach(function (type) {\n if (type.loadKind && 'scalar' !== type.loadKind) {\n throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n }\n });\n\n this.compiledImplicit = compileList(this, 'implicit', []);\n this.compiledExplicit = compileList(this, 'explicit', []);\n this.compiledTypeMap = (compileMap)(this.compiledImplicit, this.compiledExplicit);\n }\n\n static DEFAULT=null;\n static create=function createSchema() {\n var schemas, types;\n\n switch (arguments.length) {\n case 1:\n schemas = Schema.DEFAULT;\n types = arguments[0];\n break;\n\n case 2:\n schemas = arguments[0];\n types = arguments[1];\n break;\n\n default:\n throw new YAMLException('Wrong number of arguments for Schema.create function');\n }\n\n schemas = common.toArray(schemas);\n types = common.toArray(types);\n\n if (!schemas.every(function (schema) { return schema instanceof Schema; })) {\n throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.');\n }\n\n if (!types.every(function (type) { return type instanceof Type; })) {\n throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n\n return new Schema({\n include: schemas,\n explicit: types\n });\n }\n}", "\n\n'use strict';\n\nimport {Type} from '../type';\n\nexport = new Type('tag:yaml.org,2002:str', {\n kind: 'scalar',\n construct: function (data) { return null !== data ? data : ''; }\n});\n", "\n\n'use strict';\n\nimport {Type} from '../type';\n\nexport = new Type('tag:yaml.org,2002:seq', {\n kind: 'sequence',\n construct: function (data) { return null !== data ? data : []; }\n});\n", "\n\n'use strict';\n\nimport {Type} from '../type';\n\nexport= new Type('tag:yaml.org,2002:map', {\n kind: 'mapping',\n construct: function (data) { return null !== data ? data : {}; }\n});\n", "\n\n// Standard YAML's Failsafe schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2802346\n\n\n'use strict';\n\n\ndeclare function require(n:string):any\n\nimport {Schema} from '../schema';\n\n\nexport = new Schema({\n explicit: [\n require('../type/str'),\n require('../type/seq'),\n require('../type/map')\n ]\n});\n", "\n\n'use strict';\n\nimport {Type} from '../type';\n\nfunction resolveYamlNull(data) {\n if (null === data) {\n return true;\n }\n\n var max = data.length;\n\n return (max === 1 && data === '~') ||\n (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\n}\n\nfunction constructYamlNull() {\n return null;\n}\n\nfunction isNull(object) {\n return null === object;\n}\n\nexport = new Type('tag:yaml.org,2002:null', {\n kind: 'scalar',\n resolve: resolveYamlNull,\n construct: constructYamlNull,\n predicate: isNull,\n represent: {\n canonical: function () { return '~'; },\n lowercase: function () { return 'null'; },\n uppercase: function () { return 'NULL'; },\n camelcase: function () { return 'Null'; }\n },\n defaultStyle: 'lowercase'\n});\n", "\n\ndeclare function require(n:string):any\n\n'use strict';\n\nimport {Type} from '../type';\n\nfunction resolveYamlBoolean(data) {\n if (null === data) {\n return false;\n }\n\n var max = data.length;\n\n return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\n (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\n}\n\nfunction constructYamlBoolean(data) {\n return data === 'true' ||\n data === 'True' ||\n data === 'TRUE';\n}\n\nfunction isBoolean(object) {\n return '[object Boolean]' === Object.prototype.toString.call(object);\n}\n\nexport = new Type('tag:yaml.org,2002:bool', {\n kind: 'scalar',\n resolve: resolveYamlBoolean,\n construct: constructYamlBoolean,\n predicate: isBoolean,\n represent: {\n lowercase: function (object) { return object ? 'true' : 'false'; },\n uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\n camelcase: function (object) { return object ? 'True' : 'False'; }\n },\n defaultStyle: 'lowercase'\n});\n", "\n\n'use strict';\n\nimport common = require('../common');\nimport {Type} from '../type';\n\nfunction isHexCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||\n ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||\n ((0x61/* a */ <= c) && (c <= 0x66/* f */));\n}\n\nfunction isOctCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));\n}\n\nfunction isDecCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));\n}\n\nfunction resolveYamlInteger(data) {\n if (null === data) {\n return false;\n }\n\n var max = data.length,\n index = 0,\n hasDigits = false,\n ch;\n\n if (!max) { return false; }\n\n ch = data[index];\n\n // sign\n if (ch === '-' || ch === '+') {\n ch = data[++index];\n }\n\n if (ch === '0') {\n // 0\n if (index + 1 === max) { return true; }\n ch = data[++index];\n\n // base 2, base 8, base 16\n\n if (ch === 'b') {\n // base 2\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') { continue; }\n if (ch !== '0' && ch !== '1') {\n return false;\n }\n hasDigits = true;\n }\n return hasDigits;\n }\n\n\n if (ch === 'x') {\n // base 16\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') { continue; }\n if (!isHexCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n return hasDigits;\n }\n\n // base 8\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') { continue; }\n if (!isOctCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n return hasDigits;\n }\n\n // base 10 (except 0) or base 60\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') { continue; }\n if (ch === ':') { break; }\n if (!isDecCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n\n if (!hasDigits) { return false; }\n\n // if !base60 - done;\n if (ch !== ':') { return true; }\n\n // base60 almost not used, no needs to optimize\n return /^(:[0-5]?[0-9])+$/.test(data.slice(index));\n}\n\nfunction constructYamlInteger(data) {\n var value = data, sign = 1, ch, base, digits = [];\n\n if (value.indexOf('_') !== -1) {\n value = value.replace(/_/g, '');\n }\n\n ch = value[0];\n\n if (ch === '-' || ch === '+') {\n if (ch === '-') { sign = -1; }\n value = value.slice(1);\n ch = value[0];\n }\n\n if ('0' === value) {\n return 0;\n }\n\n if (ch === '0') {\n if (value[1] === 'b') {\n return sign * parseInt(value.slice(2), 2);\n }\n if (value[1] === 'x') {\n return sign * parseInt(value, 16);\n }\n return sign * parseInt(value, 8);\n\n }\n\n if (value.indexOf(':') !== -1) {\n value.split(':').forEach(function (v) {\n digits.unshift(parseInt(v, 10));\n });\n\n value = 0;\n base = 1;\n\n digits.forEach(function (d) {\n value += (d * base);\n base *= 60;\n });\n\n return sign * value;\n\n }\n\n return sign * parseInt(value, 10);\n}\n\nfunction isInteger(object) {\n return ('[object Number]' === Object.prototype.toString.call(object)) &&\n (0 === object % 1 && !common.isNegativeZero(object));\n}\n\nexport = new Type('tag:yaml.org,2002:int', {\n kind: 'scalar',\n resolve: resolveYamlInteger,\n construct: constructYamlInteger,\n predicate: isInteger,\n represent: {\n binary: function (object) { return '0b' + object.toString(2); },\n octal: function (object) { return '0' + object.toString(8); },\n decimal: function (object) { return object.toString(10); },\n hexadecimal: function (object) { return '0x' + object.toString(16).toUpperCase(); }\n },\n defaultStyle: 'decimal',\n styleAliases: {\n binary: [ 2, 'bin' ],\n octal: [ 8, 'oct' ],\n decimal: [ 10, 'dec' ],\n hexadecimal: [ 16, 'hex' ]\n }\n});\n", "\n\n'use strict';\n\nimport common = require('../common');\nimport {Type} from '../type';\n\nvar YAML_FLOAT_PATTERN = new RegExp(\n '^(?:[-+]?(?:[0-9][0-9_]*)\\\\.[0-9_]*(?:[eE][-+][0-9]+)?' +\n '|\\\\.[0-9_]+(?:[eE][-+][0-9]+)?' +\n '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*' +\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n '|\\\\.(?:nan|NaN|NAN))$');\n\nfunction resolveYamlFloat(data) {\n if (null === data) {\n return false;\n }\n\n var value, sign, base, digits;\n\n if (!YAML_FLOAT_PATTERN.test(data)) {\n return false;\n }\n return true;\n}\n\nfunction constructYamlFloat(data) {\n var value, sign, base, digits;\n\n value = data.replace(/_/g, '').toLowerCase();\n sign = '-' === value[0] ? -1 : 1;\n digits = [];\n\n if (0 <= '+-'.indexOf(value[0])) {\n value = value.slice(1);\n }\n\n if ('.inf' === value) {\n return (1 === sign) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n\n } else if ('.nan' === value) {\n return NaN;\n\n } else if (0 <= value.indexOf(':')) {\n value.split(':').forEach(function (v) {\n digits.unshift((parseFloat)(v, 10));\n });\n\n value = 0.0;\n base = 1;\n\n digits.forEach(function (d) {\n value += d * base;\n base *= 60;\n });\n\n return sign * value;\n\n }\n return sign * (parseFloat)(value, 10);\n}\n\nfunction representYamlFloat(object, style) {\n if (isNaN(object)) {\n switch (style) {\n case 'lowercase':\n return '.nan';\n case 'uppercase':\n return '.NAN';\n case 'camelcase':\n return '.NaN';\n }\n } else if (Number.POSITIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase':\n return '.inf';\n case 'uppercase':\n return '.INF';\n case 'camelcase':\n return '.Inf';\n }\n } else if (Number.NEGATIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase':\n return '-.inf';\n case 'uppercase':\n return '-.INF';\n case 'camelcase':\n return '-.Inf';\n }\n } else if (common.isNegativeZero(object)) {\n return '-0.0';\n }\n return object.toString(10);\n}\n\nfunction isFloat(object) {\n return ('[object Number]' === Object.prototype.toString.call(object)) &&\n (0 !== object % 1 || common.isNegativeZero(object));\n}\n\nexport= new Type('tag:yaml.org,2002:float', {\n kind: 'scalar',\n resolve: resolveYamlFloat,\n construct: constructYamlFloat,\n predicate: isFloat,\n represent: representYamlFloat,\n defaultStyle: 'lowercase'\n});\n", "\n\n// Standard YAML's JSON schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2803231\n//\n// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.\n// So, this schema is not such strict as defined in the YAML specification.\n// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc.\n\n\n'use strict';\n\n\ndeclare function require(n:string):any\nimport {Schema} from '../schema';\n\n\nexport = new Schema({\n include: [\n require('./failsafe')\n ],\n implicit: [\n require('../type/null'),\n require('../type/bool'),\n require('../type/int'),\n require('../type/float')\n ]\n});\n", "\n\n// Standard YAML's Core schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2804923\n//\n// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.\n// So, Core schema has no distinctions from JSON schema is JS-YAML.\n\n\n'use strict';\n\ndeclare function require(n:string):any\n\nimport {Schema} from '../schema';\n\n\nexport = new Schema({\n include: [\n require('./json')\n ]\n});\n", "\n\n'use strict';\n\nimport {Type} from '../type';\n\nvar YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9]?)' + // [2] month\n '-([0-9][0-9]?)' + // [3] day\n '(?:(?:[Tt]|[ \\\\t]+)' + // ...\n '([0-9][0-9]?)' + // [4] hour\n ':([0-9][0-9])' + // [5] minute\n ':([0-9][0-9])' + // [6] second\n '(?:\\\\.([0-9]*))?' + // [7] fraction\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour\n '(?::([0-9][0-9]))?))?)?$'); // [11] tz_minute\n\nfunction resolveYamlTimestamp(data) {\n if (null === data) {\n return false;\n }\n\n var match, year, month, day, hour, minute, second, fraction = 0,\n delta = null, tz_hour, tz_minute, date;\n\n match = YAML_TIMESTAMP_REGEXP.exec(data);\n\n if (null === match) {\n return false;\n }\n\n return true;\n}\n\nfunction constructYamlTimestamp(data) {\n var match, year, month, day, hour, minute, second, fraction:number|string = 0,\n delta = null, tz_hour, tz_minute, date;\n\n match = YAML_TIMESTAMP_REGEXP.exec(data);\n\n if (null === match) {\n throw new Error('Date resolve error');\n }\n\n // match: [1] year [2] month [3] day\n\n year = +(match[1]);\n month = +(match[2]) - 1; // JS month starts with 0\n day = +(match[3]);\n\n if (!match[4]) { // no hour\n return new Date(Date.UTC(year, month, day));\n }\n\n // match: [4] hour [5] minute [6] second [7] fraction\n\n hour = +(match[4]);\n minute = +(match[5]);\n second = +(match[6]);\n\n if (match[7]) {\n fraction = match[7].slice(0, 3);\n while ((fraction).length < 3) { // milli-seconds\n fraction =fraction+ '0';\n }\n fraction = +fraction;\n }\n\n // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\n\n if (match[9]) {\n tz_hour = +(match[10]);\n tz_minute = +(match[11] || 0);\n delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\n if ('-' === match[9]) {\n delta = -delta;\n }\n }\n\n date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n\n if (delta) {\n date.setTime(date.getTime() - delta);\n }\n\n return date;\n}\n\nfunction representYamlTimestamp(object /*, style*/) {\n return object.toISOString();\n}\n\nexport = new Type('tag:yaml.org,2002:timestamp', {\n kind: 'scalar',\n resolve: resolveYamlTimestamp,\n construct: constructYamlTimestamp,\n instanceOf: Date,\n represent: representYamlTimestamp\n});\n", "\n\n'use strict';\n\nimport {Type} from '../type';\n\nfunction resolveYamlMerge(data) {\n return '<<' === data || null === data;\n}\n\nexport = new Type('tag:yaml.org,2002:merge', {\n kind: 'scalar',\n resolve: resolveYamlMerge\n});\n", "\n\n'use strict';\ndeclare function require(n:string):any\n\n/*eslint-disable no-bitwise*/\n\n// A trick for browserified version.\n// Since we make browserifier to ignore `buffer` module, NodeBuffer will be undefined\nvar NodeBuffer = require('buffer').Buffer;\nimport {Type} from '../type';\n\n\n// [ 64, 65, 66 ] -> [ padding, CR, LF ]\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r';\n\n\nfunction resolveYamlBinary(data) {\n if (null === data) {\n return false;\n }\n\n var code, idx, bitlen = 0, len = 0, max = data.length, map = BASE64_MAP;\n\n // Convert one by one.\n for (idx = 0; idx < max; idx++) {\n code = map.indexOf(data.charAt(idx));\n\n // Skip CR/LF\n if (code > 64) { continue; }\n\n // Fail on illegal characters\n if (code < 0) { return false; }\n\n bitlen += 6;\n }\n\n // If there are any bits left, source was corrupted\n return (bitlen % 8) === 0;\n}\n\nfunction constructYamlBinary(data) {\n var code, idx, tailbits,\n input = data.replace(/[\\r\\n=]/g, ''), // remove CR/LF & padding to simplify scan\n max = input.length,\n map = BASE64_MAP,\n bits = 0,\n result = [];\n\n // Collect by 6*4 bits (3 bytes)\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 4 === 0) && idx) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n }\n\n bits = (bits << 6) | map.indexOf(input.charAt(idx));\n }\n\n // Dump tail\n\n tailbits = (max % 4) * 6;\n\n if (tailbits === 0) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n } else if (tailbits === 18) {\n result.push((bits >> 10) & 0xFF);\n result.push((bits >> 2) & 0xFF);\n } else if (tailbits === 12) {\n result.push((bits >> 4) & 0xFF);\n }\n\n // Wrap into Buffer for NodeJS and leave Array for browser\n if (NodeBuffer) {\n return new NodeBuffer(result);\n }\n\n return result;\n}\n\nfunction representYamlBinary(object /*, style*/) {\n var result = '', bits = 0, idx, tail,\n max = object.length,\n map = BASE64_MAP;\n\n // Convert every three bytes to 4 ASCII characters.\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 3 === 0) && idx) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n }\n\n bits = (bits << 8) + object[idx];\n }\n\n // Dump tail\n\n tail = max % 3;\n\n if (tail === 0) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n } else if (tail === 2) {\n result += map[(bits >> 10) & 0x3F];\n result += map[(bits >> 4) & 0x3F];\n result += map[(bits << 2) & 0x3F];\n result += map[64];\n } else if (tail === 1) {\n result += map[(bits >> 2) & 0x3F];\n result += map[(bits << 4) & 0x3F];\n result += map[64];\n result += map[64];\n }\n\n return result;\n}\n\nfunction isBinary(object) {\n return NodeBuffer && NodeBuffer.isBuffer(object);\n}\n\nexport = new Type('tag:yaml.org,2002:binary', {\n kind: 'scalar',\n resolve: resolveYamlBinary,\n construct: constructYamlBinary,\n predicate: isBinary,\n represent: representYamlBinary\n});\n", "\n\n'use strict';\n\nimport {Type} from '../type';\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\nvar _toString = Object.prototype.toString;\n\nfunction resolveYamlOmap(data) {\n if (null === data) {\n return true;\n }\n\n var objectKeys = [], index, length, pair, pairKey, pairHasKey,\n object = data;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n pairHasKey = false;\n\n if ('[object Object]' !== _toString.call(pair)) {\n return false;\n }\n\n for (pairKey in pair) {\n if (_hasOwnProperty.call(pair, pairKey)) {\n if (!pairHasKey) {\n pairHasKey = true;\n } else {\n return false;\n }\n }\n }\n\n if (!pairHasKey) {\n return false;\n }\n\n if (-1 === objectKeys.indexOf(pairKey)) {\n objectKeys.push(pairKey);\n } else {\n return false;\n }\n }\n\n return true;\n}\n\nfunction constructYamlOmap(data) {\n return null !== data ? data : [];\n}\n\nexport = new Type('tag:yaml.org,2002:omap', {\n kind: 'sequence',\n resolve: resolveYamlOmap,\n construct: constructYamlOmap\n});\n", "\n\n'use strict';\n\nimport {Type} from '../type';\nimport ast =require(\"../yamlAST\");\n\nvar _toString = Object.prototype.toString;\n\nfunction resolveYamlPairs(data) {\n if (null === data) {\n return true;\n }\n if(data.kind != ast.Kind.SEQ){\n return false;\n }\n\n var index, length, pair, keys, result,\n object = data.items;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n if ('[object Object]' !== _toString.call(pair)) {\n return false;\n }\n\n if (!Array.isArray(pair.mappings)) {\n return false;\n }\n\n if (1 !== pair.mappings.length) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction constructYamlPairs(data) {\n if (null === data || !Array.isArray(data.items)) {\n return [];\n }\n\n let index, length, keys, result,\n object = data.items;\n\n result = ast.newItems();\n result.parent = data.parent;\n result.startPosition = data.startPosition;\n result.endPosition = data.endPosition;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n let pair = object[index];\n\n let mapping = pair.mappings[0];\n \n let pairSeq = ast.newItems();\n pairSeq.parent = result;\n pairSeq.startPosition = mapping.key.startPosition\n pairSeq.endPosition = mapping.value.startPosition\n mapping.key.parent = pairSeq;\n mapping.value.parent = pairSeq;\n pairSeq.items = [mapping.key,mapping.value];\n \n result.items.push(pairSeq);\n }\n\n return result;\n}\n\nexport = new Type('tag:yaml.org,2002:pairs', {\n kind: 'sequence',\n resolve: resolveYamlPairs,\n construct: constructYamlPairs\n});\n", "\n\n'use strict';\n\nimport {Type} from '../type';\nimport ast = require(\"../yamlAST\");\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction resolveYamlSet(data) {\n if (null === data) {\n return true;\n }\n\n if(data.kind != ast.Kind.MAP){\n return false;\n }\n\n return true;\n}\n\nfunction constructYamlSet(data) {\n return null !== data ? data : {};\n}\n\nexport = new Type('tag:yaml.org,2002:set', {\n kind: 'mapping',\n resolve: resolveYamlSet,\n construct: constructYamlSet\n});\n", "\n\n// JS-YAML's default schema for `safeLoad` function.\n// It is not described in the YAML specification.\n//\n// This schema is based on standard YAML's Core schema and includes most of\n// extra types described at YAML tag repository. (http://yaml.org/type/)\n\n\n'use strict';\n\n\n\ndeclare function require(n:string):any\nimport {Schema} from '../schema';\nvar schema=new Schema({\n include: [\n require('./core')\n ],\n implicit: [\n require('../type/timestamp'),\n require('../type/merge')\n ],\n explicit: [\n require('../type/binary'),\n require('../type/omap'),\n require('../type/pairs'),\n require('../type/set')\n ]\n})\nexport = schema;\n", "\n\n'use strict';\n\nimport {Type} from '../../type';\n\nfunction resolveJavascriptUndefined() {\n return true;\n}\n\nfunction constructJavascriptUndefined() {\n /*eslint-disable no-undefined*/\n return undefined;\n}\n\nfunction representJavascriptUndefined() {\n return '';\n}\n\nfunction isUndefined(object) {\n return 'undefined' === typeof object;\n}\n\nexport = new Type('tag:yaml.org,2002:js/undefined', {\n kind: 'scalar',\n resolve: resolveJavascriptUndefined,\n construct: constructJavascriptUndefined,\n predicate: isUndefined,\n represent: representJavascriptUndefined\n});\n", "\n\n'use strict';\n\nimport {Type} from '../../type';\n\nfunction resolveJavascriptRegExp(data) {\n if (null === data) {\n return false;\n }\n\n if (0 === data.length) {\n return false;\n }\n\n var regexp = data,\n tail = /\\/([gim]*)$/.exec(data),\n modifiers = '';\n\n // if regexp starts with '/' it can have modifiers and must be properly closed\n // `/foo/gim` - modifiers tail can be maximum 3 chars\n if ('/' === regexp[0]) {\n if (tail) {\n modifiers = tail[1];\n }\n\n if (modifiers.length > 3) { return false; }\n // if expression starts with /, is should be properly terminated\n if (regexp[regexp.length - modifiers.length - 1] !== '/') { return false; }\n\n regexp = regexp.slice(1, regexp.length - modifiers.length - 1);\n }\n\n try {\n var dummy = new RegExp(regexp, modifiers);\n return true;\n } catch (error) {\n return false;\n }\n}\n\nfunction constructJavascriptRegExp(data) {\n var regexp = data,\n tail = /\\/([gim]*)$/.exec(data),\n modifiers = '';\n\n // `/foo/gim` - tail can be maximum 4 chars\n if ('/' === regexp[0]) {\n if (tail) {\n modifiers = tail[1];\n }\n regexp = regexp.slice(1, regexp.length - modifiers.length - 1);\n }\n\n return new RegExp(regexp, modifiers);\n}\n\nfunction representJavascriptRegExp(object /*, style*/) {\n var result = '/' + object.source + '/';\n\n if (object.global) {\n result += 'g';\n }\n\n if (object.multiline) {\n result += 'm';\n }\n\n if (object.ignoreCase) {\n result += 'i';\n }\n\n return result;\n}\n\nfunction isRegExp(object) {\n return '[object RegExp]' === Object.prototype.toString.call(object);\n}\n\nexport = new Type('tag:yaml.org,2002:js/regexp', {\n kind: 'scalar',\n resolve: resolveJavascriptRegExp,\n construct: constructJavascriptRegExp,\n predicate: isRegExp,\n represent: representJavascriptRegExp\n});\n", "\n\n// JS-YAML's default schema for `load` function.\n// It is not described in the YAML specification.\n//\n// This schema is based on JS-YAML's default safe schema and includes\n// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function.\n//\n// Also this schema is used as default base schema at `Schema.create` function.\n\n\n'use strict';\ndeclare function require(n:string):any\n\nimport {Schema} from '../schema';\n\nvar schema=new Schema({\n include: [\n require('./default_safe')\n ],\n explicit: [\n require('../type/js/undefined'),\n require('../type/js/regexp')\n\n ]\n})\nSchema.DEFAULT = schema;\nexport =schema;\n", "import ast=require(\"./yamlAST\")\n'use strict';\n\n/*eslint-disable max-len,no-use-before-define*/\n\nimport common = require('./common');\nimport YAMLException = require('./exception');\nimport Mark = require('./mark');\nimport {Schema} from './schema'\nimport DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');\nimport DEFAULT_FULL_SCHEMA = require('./schema/default_full');\n\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\nvar CONTEXT_FLOW_IN = 1;\nvar CONTEXT_FLOW_OUT = 2;\nvar CONTEXT_BLOCK_IN = 3;\nvar CONTEXT_BLOCK_OUT = 4;\n\n\nvar CHOMPING_CLIP = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP = 3;\n\n\nvar PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\n\n\nfunction is_EOL(c) {\n return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);\n}\n\nfunction is_WHITE_SPACE(c) {\n return (c === 0x09/* Tab */) || (c === 0x20/* Space */);\n}\n\nfunction is_WS_OR_EOL(c) {\n return (c === 0x09/* Tab */) ||\n (c === 0x20/* Space */) ||\n (c === 0x0A/* LF */) ||\n (c === 0x0D/* CR */);\n}\n\nfunction is_FLOW_INDICATOR(c) {\n return 0x2C/* , */ === c ||\n 0x5B/* [ */ === c ||\n 0x5D/* ] */ === c ||\n 0x7B/* { */ === c ||\n 0x7D/* } */ === c;\n}\n\nfunction fromHexCode(c) {\n var lc;\n\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n /*eslint-disable no-bitwise*/\n lc = c | 0x20;\n\n if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {\n return lc - 0x61 + 10;\n }\n\n return -1;\n}\n\nfunction escapedHexLen(c) {\n if (c === 0x78/* x */) { return 2; }\n if (c === 0x75/* u */) { return 4; }\n if (c === 0x55/* U */) { return 8; }\n return 0;\n}\n\nfunction fromDecimalCode(c) {\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n return -1;\n}\n\nfunction simpleEscapeSequence(c) {\n return (c === 0x30/* 0 */) ? '\\x00' :\n (c === 0x61/* a */) ? '\\x07' :\n (c === 0x62/* b */) ? '\\x08' :\n (c === 0x74/* t */) ? '\\x09' :\n (c === 0x09/* Tab */) ? '\\x09' :\n (c === 0x6E/* n */) ? '\\x0A' :\n (c === 0x76/* v */) ? '\\x0B' :\n (c === 0x66/* f */) ? '\\x0C' :\n (c === 0x72/* r */) ? '\\x0D' :\n (c === 0x65/* e */) ? '\\x1B' :\n (c === 0x20/* Space */) ? ' ' :\n (c === 0x22/* \" */) ? '\\x22' :\n (c === 0x2F/* / */) ? '/' :\n (c === 0x5C/* \\ */) ? '\\x5C' :\n (c === 0x4E/* N */) ? '\\x85' :\n (c === 0x5F/* _ */) ? '\\xA0' :\n (c === 0x4C/* L */) ? '\\u2028' :\n (c === 0x50/* P */) ? '\\u2029' : '';\n}\n\nfunction charFromCodepoint(c) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c);\n }\n // Encode UTF-16 surrogate pair\n // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\n return String.fromCharCode(((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00);\n}\n\nvar simpleEscapeCheck = new Array(256); // integer, for fast access\nvar simpleEscapeMap = new Array(256);\nvar customEscapeCheck = new Array(256); // integer, for fast access\nvar customEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n customEscapeMap[i] = simpleEscapeMap[i] = simpleEscapeSequence(i);\n simpleEscapeCheck[i] = simpleEscapeMap[i] ? 1 : 0;\n customEscapeCheck[i] = 1;\n\n if (!simpleEscapeCheck[i]) {\n customEscapeMap[i] = '\\\\' + String.fromCharCode(i);\n }\n}\n\n\n\nclass State{\n\n input:string\n filename:string;\n schema: Schema\n errorMap:any={}\n errors:YAMLException[]=[]\n onWarning:()=>any\n legacy:boolean;\n implicitTypes:any\n typeMap:any\n length:number\n position:number\n line:number\n lineStart:number\n lineIndent:number\n documents:ast.YAMLNode[];\n kind:string\n result:ast.YAMLNode\n tag:string\n anchor:string\n anchorMap:{ [name:string]:ast.YAMLNode}\n tagMap:any\n version:string\n checkLineBreaks:boolean\n allowAnyEscape:boolean\n ignoreDuplicateKeys: boolean;\n\n lines: Line[] = [];\n\n constructor(input:string,options:any){\n this.input = input;\n\n this.filename = options['filename'] || null;\n this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;\n this.onWarning = options['onWarning'] || null;\n this.legacy = options['legacy'] || false;\n this.allowAnyEscape = options['allowAnyEscape'] || false;\n this.ignoreDuplicateKeys = options['ignoreDuplicateKeys'] || false;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.typeMap = this.schema.compiledTypeMap;\n\n this.length = input.length;\n this.position = 0;\n this.line = 0;\n this.lineStart = 0;\n this.lineIndent = 0;\n\n this.documents = [];\n\n }\n}\n\n\n\nfunction generateError(state, message, isWarning=false) {\n return new YAMLException(\n message,\n new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart)),\n isWarning);\n}\n\nfunction throwErrorFromPosition(state, position: number, message, isWarning=false, toLineEnd=false) {\n var line = positionToLine(state, position);\n\n if(!line) {\n return;\n }\n\n var hash = message + position;\n \n if(state.errorMap[hash]) {\n return;\n }\n \n var mark = new Mark(state.filename, state.input, position, line.line, (position - line.start));\n if(toLineEnd){\n mark.toLineEnd = true;\n }\n \n var error = new YAMLException(message, mark, isWarning);\n state.errors.push(error);\n}\n\nfunction throwError(state:State, message) {\n //FIXME\n var error=generateError(state,message);\n var hash=error.message+error.mark.position;\n if (state.errorMap[hash]) {\n return;\n }\n state.errors.push(error);\n state.errorMap[hash]=1;\n var or=state.position;\n while (true){\n if (state.position>=state.input.length-1){\n return;\n }\n var c=state.input.charAt(state.position);\n if (c=='\\n'){\n\n state.position--;\n if (state.position==or){\n state.position+=1;\n }\n return;\n }\n if (c=='\\r'){\n state.position--;\n if (state.position==or){\n state.position+=1;\n }\n return;\n }\n state.position++;\n }\n //throw generateError(state, message);\n}\n\nfunction throwWarning(state, message) {\n var error = generateError(state, message);\n\n if (state.onWarning) {\n state.onWarning.call(null, error);\n } else {\n //throw error;\n }\n}\n\n\nvar directiveHandlers = {\n\n YAML: function handleYamlDirective(state, name, args) {\n\n var match, major, minor;\n\n if (null !== state.version) {\n throwError(state, 'duplication of %YAML directive');\n }\n\n if (1 !== args.length) {\n throwError(state, 'YAML directive accepts exactly one argument');\n }\n\n match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n\n if (null === match) {\n throwError(state, 'ill-formed argument of the YAML directive');\n }\n\n major = parseInt(match[1], 10);\n minor = parseInt(match[2], 10);\n\n if (1 !== major) {\n throwError(state, 'found incompatible YAML document (version 1.2 is required)');\n }\n\n state.version = args[0];\n state.checkLineBreaks = (minor < 2);\n\n if (2 !== minor) {\n throwError(state, 'found incompatible YAML document (version 1.2 is required)');\n }\n },\n\n TAG: function handleTagDirective(state, name, args) {\n\n var handle, prefix;\n\n if (2 !== args.length) {\n throwError(state, 'TAG directive accepts exactly two arguments');\n }\n\n handle = args[0];\n prefix = args[1];\n\n if (!PATTERN_TAG_HANDLE.test(handle)) {\n throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n }\n\n if (_hasOwnProperty.call(state.tagMap, handle)) {\n throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n }\n\n if (!PATTERN_TAG_URI.test(prefix)) {\n throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n }\n\n state.tagMap[handle] = prefix;\n }\n};\n\n\nfunction captureSegment(state:State, start:number, end:number, checkJson:boolean):void {\n var _position, _length, _character, _result;\n var scalar:ast.YAMLScalar=state.result;\n if (scalar.startPosition==-1){\n scalar.startPosition=start;\n }\n if (start <= end) {\n _result = state.input.slice(start, end);\n\n if (checkJson) {\n for (_position = 0, _length = _result.length;\n _position < _length;\n _position += 1) {\n _character = _result.charCodeAt(_position);\n if (!(0x09 === _character ||\n 0x20 <= _character && _character <= 0x10FFFF)) {\n throwError(state, 'expected valid JSON character');\n }\n }\n } else if (PATTERN_NON_PRINTABLE.test(_result)) {\n throwError(state, 'the stream contains non-printable characters');\n }\n\n scalar.value+=_result;\n scalar.endPosition=end;\n }\n}\n\nfunction mergeMappings(state:State, destination, source) {\n var sourceKeys, key, index, quantity;\n\n if (!common.isObject(source)) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n }\n\n sourceKeys = Object.keys(source);\n\n for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n key = sourceKeys[index];\n\n if (!_hasOwnProperty.call(destination, key)) {\n destination[key] = source[key];\n }\n }\n}\n\nfunction storeMappingPair(state:State, _result:ast.YamlMap, keyTag, keyNode:ast.YAMLNode,\n valueNode:ast.YAMLNode):ast.YamlMap {\n var index, quantity;\n if (keyNode==null){\n return;\n }\n //keyNode = String(keyNode);\n\n if (null === _result) {\n _result = {\n startPosition:keyNode.startPosition,\n endPosition:valueNode.endPosition,\n parent:null,\n errors:[],\n mappings: [],kind:ast.Kind.MAP};\n }\n\n // if ('tag:yaml.org,2002:merge' === keyTag) {\n // if (Array.isArray(valueNode)) {\n // for (index = 0, quantity = (valueNode).length; index < quantity; index += 1) {\n // mergeMappings(state, _result, valueNode[index]);\n // }\n // } else {\n // mergeMappings(state, _result, valueNode);\n // }\n // } else {\n\n var mapping=ast.newMapping(keyNode,valueNode);\n mapping.parent=_result;\n keyNode.parent=mapping;\n if (valueNode!=null) {\n valueNode.parent = mapping;\n }\n \n !state.ignoreDuplicateKeys && _result.mappings.forEach(sibling => {\n if(sibling.key && sibling.key.value === (mapping.key && mapping.key.value)) {\n throwErrorFromPosition(state, mapping.key.startPosition, 'duplicate key');\n throwErrorFromPosition(state, sibling.key.startPosition, 'duplicate key');\n }\n });\n \n _result.mappings.push(mapping)\n _result.endPosition=valueNode? valueNode.endPosition : keyNode.endPosition+1; //FIXME.workaround should be position of ':' indeed\n // }\n\n return _result;\n}\n\nfunction readLineBreak(state:State) {\n var ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (0x0A/* LF */ === ch) {\n state.position++;\n } else if (0x0D/* CR */ === ch) {\n state.position++;\n if (0x0A/* LF */ === state.input.charCodeAt(state.position)) {\n state.position++;\n }\n } else {\n throwError(state, 'a line break is expected');\n }\n\n state.line += 1;\n state.lineStart = state.position;\n \n state.lines.push({\n start: state.lineStart,\n line: state.line\n });\n}\n\nclass Line {\n start: number;\n line: number;\n}\n\nfunction positionToLine(state: State, position: number): Line {\n var line: Line;\n \n for(var i = 0; i < state.lines.length; i++) {\n if(state.lines[i].start > position) {\n break;\n }\n \n line = state.lines[i];\n }\n\n if(!line) {\n return {\n start: 0,\n line: 0\n }\n }\n \n return line;\n}\n\nfunction skipSeparationSpace(state:State, allowComments, checkIndent) {\n var lineBreaks = 0,\n ch = state.input.charCodeAt(state.position);\n\n while (0 !== ch) {\n while (is_WHITE_SPACE(ch)) {\n if(ch===0x09/*Tab*/){\n state.errors.push(generateError(state,\"Using tabs can lead to unpredictable results\",true));\n }\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (allowComments && 0x23/* # */ === ch) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && 0 !== ch);\n }\n\n if (is_EOL(ch)) {\n readLineBreak(state);\n\n ch = state.input.charCodeAt(state.position);\n lineBreaks++;\n state.lineIndent = 0;\n\n while (0x20/* Space */ === ch) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n } else {\n break;\n }\n }\n\n if (-1 !== checkIndent && 0 !== lineBreaks && state.lineIndent < checkIndent) {\n throwWarning(state, 'deficient indentation');\n }\n\n return lineBreaks;\n}\n\nfunction testDocumentSeparator(state:State) {\n var _position = state.position,\n ch;\n\n ch = state.input.charCodeAt(_position);\n\n // Condition state.position === state.lineStart is tested\n // in parent on each call, for efficiency. No needs to test here again.\n if ((0x2D/* - */ === ch || 0x2E/* . */ === ch) &&\n state.input.charCodeAt(_position + 1) === ch &&\n state.input.charCodeAt(_position + 2) === ch) {\n\n _position += 3;\n\n ch = state.input.charCodeAt(_position);\n\n if (ch === 0 || is_WS_OR_EOL(ch)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction writeFoldedLines(state:State,scalar:ast.YAMLScalar, count:number) {\n if (1 === count) {\n scalar.value += ' ';\n } else if (count > 1) {\n scalar.value += common.repeat('\\n', count - 1);\n }\n}\n\n\nfunction readPlainScalar(state:State, nodeIndent, withinFlowCollection) {\n var preceding,\n following,\n captureStart,\n captureEnd,\n hasPendingContent,\n _line,\n _lineStart,\n _lineIndent,\n _kind = state.kind,\n _result = state.result,\n ch;\n var state_result=ast.newScalar();\n state_result.plainScalar=true;\n state.result=state_result;\n ch = state.input.charCodeAt(state.position);\n\n if (is_WS_OR_EOL(ch) ||\n is_FLOW_INDICATOR(ch) ||\n 0x23/* # */ === ch ||\n 0x26/* & */ === ch ||\n 0x2A/* * */ === ch ||\n 0x21/* ! */ === ch ||\n 0x7C/* | */ === ch ||\n 0x3E/* > */ === ch ||\n 0x27/* ' */ === ch ||\n 0x22/* \" */ === ch ||\n 0x25/* % */ === ch ||\n 0x40/* @ */ === ch ||\n 0x60/* ` */ === ch) {\n return false;\n }\n\n if (0x3F/* ? */ === ch || 0x2D/* - */ === ch) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n return false;\n }\n }\n\n state.kind = 'scalar';\n //state.result = '';\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n\n while (0 !== ch) {\n if (0x3A/* : */ === ch) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n break;\n }\n\n } else if (0x23/* # */ === ch) {\n preceding = state.input.charCodeAt(state.position - 1);\n\n if (is_WS_OR_EOL(preceding)) {\n break;\n }\n\n } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\n withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n break;\n\n } else if (is_EOL(ch)) {\n _line = state.line;\n _lineStart = state.lineStart;\n _lineIndent = state.lineIndent;\n skipSeparationSpace(state, false, -1);\n\n if (state.lineIndent >= nodeIndent) {\n hasPendingContent = true;\n ch = state.input.charCodeAt(state.position);\n continue;\n } else {\n state.position = captureEnd;\n state.line = _line;\n state.lineStart = _lineStart;\n state.lineIndent = _lineIndent;\n break;\n }\n }\n\n if (hasPendingContent) {\n captureSegment(state, captureStart, captureEnd, false);\n writeFoldedLines(state, state_result,state.line - _line);\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n }\n\n if (!is_WHITE_SPACE(ch)) {\n captureEnd = state.position + 1;\n }\n\n ch = state.input.charCodeAt(++state.position);\n if (state.position>=state.input.length){\n return false;\n\n }\n }\n\n captureSegment(state, captureStart, captureEnd, false);\n\n if (state.result.startPosition!=-1) {\n state_result.rawValue = state.input.substring(state_result.startPosition, state_result.endPosition);\n return true;\n }\n\n state.kind = _kind;\n state.result = _result;\n return false;\n}\n\nfunction readSingleQuotedScalar(state:State, nodeIndent) {\n var ch,\n captureStart, captureEnd;\n\n ch = state.input.charCodeAt(state.position);\n\n if (0x27/* ' */ !== ch) {\n return false;\n }\n var scalar=ast.newScalar();\n scalar.singleQuoted=true;\n state.kind = 'scalar';\n state.result = scalar;\n scalar.startPosition=state.position;\n\n state.position++;\n captureStart = captureEnd = state.position;\n\n while (0 !== (ch = state.input.charCodeAt(state.position))) {\n //console.log('ch: <' + String.fromCharCode(ch) + '>');\n if (0x27/* ' */ === ch) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n //console.log('next: <' + String.fromCharCode(ch) + '>');\n scalar.endPosition=state.position;\n if (0x27/* ' */ === ch) {\n captureStart = captureEnd = state.position;\n state.position++;\n } else {\n return true;\n }\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, scalar,skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n scalar.endPosition=state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\n\nfunction readDoubleQuotedScalar(state:State, nodeIndent:number) {\n var captureStart,\n captureEnd,\n hexLength,\n hexResult,\n tmp, tmpEsc,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (0x22/* \" */ !== ch) {\n return false;\n }\n\n state.kind = 'scalar';\n var scalar=ast.newScalar();\n scalar.doubleQuoted=true;\n state.result = scalar;\n scalar.startPosition=state.position;\n state.position++;\n captureStart = captureEnd = state.position;\n while (0 !== (ch = state.input.charCodeAt(state.position))) {\n if (0x22/* \" */ === ch) {\n captureSegment(state, captureStart, state.position, true);\n state.position++;\n scalar.endPosition=state.position;\n scalar.rawValue = state.input.substring(scalar.startPosition, scalar.endPosition);\n return true;\n\n } else if (0x5C/* \\ */ === ch) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (is_EOL(ch)) {\n skipSeparationSpace(state, false, nodeIndent);\n\n // TODO: rework to inline fn with no type cast?\n } else if (ch < 256 && (state.allowAnyEscape ? customEscapeCheck[ch] : simpleEscapeCheck[ch])) {\n scalar.value += (state.allowAnyEscape ? customEscapeMap[ch] : simpleEscapeMap[ch]);\n state.position++;\n\n } else if ((tmp = escapedHexLen(ch)) > 0) {\n hexLength = tmp;\n hexResult = 0;\n\n for (; hexLength > 0; hexLength--) {\n ch = state.input.charCodeAt(++state.position);\n\n if ((tmp = fromHexCode(ch)) >= 0) {\n hexResult = (hexResult << 4) + tmp;\n\n } else {\n throwError(state, 'expected hexadecimal character');\n }\n }\n\n scalar.value += charFromCodepoint(hexResult);\n\n state.position++;\n\n } else {\n throwError(state, 'unknown escape sequence');\n }\n\n captureStart = captureEnd = state.position;\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, scalar,skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\n\nfunction readFlowCollection(state:State, nodeIndent) {\n var readNext = true,\n _line,\n _tag = state.tag,\n _result:ast.YAMLNode,\n _anchor = state.anchor,\n following,\n terminator,\n isPair,\n isExplicitPair,\n isMapping,\n keyNode,\n keyTag,\n valueNode,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x5B/* [ */) {\n terminator = 0x5D;/* ] */\n isMapping = false;\n _result = ast.newItems();\n _result.startPosition=state.position\n } else if (ch === 0x7B/* { */) {\n terminator = 0x7D;/* } */\n isMapping = true;\n _result = ast.newMap();\n _result.startPosition=state.position\n } else {\n return false;\n }\n\n if (null !== state.anchor) {\n _result.anchorId=state.anchor;\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n while (0 !== ch) {\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === terminator) {\n state.position++;\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = isMapping ? 'mapping' : 'sequence';\n state.result = _result;\n _result.endPosition=state.position\n return true;\n } else if (!readNext) {\n var p=state.position\n throwError(state, 'missed comma between flow collection entries');\n state.position=p+1;\n }\n\n keyTag = keyNode = valueNode = null;\n isPair = isExplicitPair = false;\n\n if (0x3F/* ? */ === ch) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following)) {\n isPair = isExplicitPair = true;\n state.position++;\n skipSeparationSpace(state, true, nodeIndent);\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n keyTag = state.tag;\n keyNode = state.result;\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((isExplicitPair || state.line === _line) && 0x3A/* : */ === ch) {\n isPair = true;\n ch = state.input.charCodeAt(++state.position);\n skipSeparationSpace(state, true, nodeIndent);\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n valueNode = state.result;\n }\n\n if (isMapping) {\n storeMappingPair(state, (_result), keyTag, keyNode, valueNode);\n } else if (isPair) {\n var mp=storeMappingPair(state, null, keyTag, keyNode, valueNode);\n mp.parent=_result;\n (_result).items.push(mp);\n } else {\n if(keyNode) {\n keyNode.parent = _result;\n }\n (_result).items.push(keyNode);\n }\n _result.endPosition=state.position+1/*need to add one more char*/;\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (0x2C/* , */ === ch) {\n readNext = true;\n ch = state.input.charCodeAt(++state.position);\n } else {\n readNext = false;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection');\n}\n\nfunction readBlockScalar(state:State, nodeIndent) {\n var captureStart,\n folding,\n chomping = CHOMPING_CLIP,\n detectedIndent = false,\n textIndent = nodeIndent,\n emptyLines = 0,\n atMoreIndented = false,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x7C/* | */) {\n folding = false;\n } else if (ch === 0x3E/* > */) {\n folding = true;\n } else {\n return false;\n }\n var sc=ast.newScalar();\n state.kind = 'scalar';\n state.result = sc;\n sc.startPosition=state.position\n while (0 !== ch) {\n ch = state.input.charCodeAt(++state.position);\n\n if (0x2B/* + */ === ch || 0x2D/* - */ === ch) {\n if (CHOMPING_CLIP === chomping) {\n chomping = (0x2B/* + */ === ch) ? CHOMPING_KEEP : CHOMPING_STRIP;\n } else {\n throwError(state, 'repeat of a chomping mode identifier');\n }\n\n } else if ((tmp = fromDecimalCode(ch)) >= 0) {\n if (tmp === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n } else if (!detectedIndent) {\n textIndent = nodeIndent + tmp - 1;\n detectedIndent = true;\n } else {\n throwError(state, 'repeat of an indentation width identifier');\n }\n\n } else {\n break;\n }\n }\n\n if (is_WHITE_SPACE(ch)) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (is_WHITE_SPACE(ch));\n\n if (0x23/* # */ === ch) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (!is_EOL(ch) && (0 !== ch));\n }\n }\n\n while (0 !== ch) {\n readLineBreak(state);\n state.lineIndent = 0;\n\n ch = state.input.charCodeAt(state.position);\n\n while ((!detectedIndent || state.lineIndent < textIndent) &&\n (0x20/* Space */ === ch)) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (!detectedIndent && state.lineIndent > textIndent) {\n textIndent = state.lineIndent;\n }\n\n if (is_EOL(ch)) {\n emptyLines++;\n continue;\n }\n\n // End of the scalar.\n if (state.lineIndent < textIndent) {\n\n // Perform the chomping.\n if (chomping === CHOMPING_KEEP) {\n sc.value+= common.repeat('\\n', emptyLines);\n } else if (chomping === CHOMPING_CLIP) {\n if (detectedIndent) { // i.e. only if the scalar is not empty.\n sc.value += '\\n';\n }\n }\n\n // Break this `while` cycle and go to the funciton's epilogue.\n break;\n }\n\n // Folded style: use fancy rules to handle line breaks.\n if (folding) {\n\n // Lines starting with white space characters (more-indented lines) are not folded.\n if (is_WHITE_SPACE(ch)) {\n atMoreIndented = true;\n sc.value += common.repeat('\\n', emptyLines + 1);\n\n // End of more-indented block.\n } else if (atMoreIndented) {\n atMoreIndented = false;\n sc.value += common.repeat('\\n', emptyLines + 1);\n\n // Just one line break - perceive as the same line.\n } else if (0 === emptyLines) {\n if (detectedIndent) { // i.e. only if we have already read some scalar content.\n sc.value += ' ';\n }\n\n // Several line breaks - perceive as different lines.\n } else {\n sc.value += common.repeat('\\n', emptyLines);\n }\n\n // Literal style: just add exact number of line breaks between content lines.\n } else if (detectedIndent) {\n // If current line isn't the first one - count line break from the last content line.\n sc.value += common.repeat('\\n', emptyLines + 1);\n } else {\n // In case of the first content line - count only empty lines.\n }\n\n detectedIndent = true;\n emptyLines = 0;\n captureStart = state.position;\n\n while (!is_EOL(ch) && (0 !== ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, state.position, false);\n }\n sc.endPosition=state.position;\n var i=state.position-1;\n var needMinus=false;\n while (true){\n var c=state.input[i];\n if (c=='\\r'||c=='\\n'){\n if (needMinus) {\n i--;\n }\n break;\n }\n if (c!=' '&&c!='\\t'){\n break;\n }\n i--;\n //needMinus=true;\n\n }\n sc.endPosition=i;\n sc.rawValue = state.input.substring(sc.startPosition, sc.endPosition);\n return true;\n}\n\nfunction readBlockSequence(state:State, nodeIndent) {\n var _line,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = ast.newItems(),\n following,\n detected = false,\n ch;\n\n if (null !== state.anchor) {\n _result.anchorId=state.anchor;\n state.anchorMap[state.anchor] = _result;\n }\n _result.startPosition=state.position;\n ch = state.input.charCodeAt(state.position);\n\n while (0 !== ch) {\n\n if (0x2D/* - */ !== ch) {\n break;\n }\n\n following = state.input.charCodeAt(state.position + 1);\n\n if (!is_WS_OR_EOL(following)) {\n break;\n }\n\n detected = true;\n state.position++;\n\n if (skipSeparationSpace(state, true, -1)) {\n if (state.lineIndent <= nodeIndent) {\n _result.items.push(null);\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n if(state.result) {\n state.result.parent = _result;\n _result.items.push(state.result);\n }\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (0 !== ch)) {\n throwError(state, 'bad indentation of a sequence entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n _result.endPosition=state.position\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'sequence';\n state.result = _result;\n _result.endPosition=state.position;\n return true;\n }\n return false;\n}\n\nfunction readBlockMapping(state:State, nodeIndent, flowIndent) {\n var following,\n allowCompact,\n _line,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = ast.newMap(),\n keyTag = null,\n keyNode = null,\n valueNode = null,\n atExplicitKey = false,\n detected = false,\n ch;\n _result.startPosition=state.position\n if (null !== state.anchor) {\n _result.anchorId=state.anchor;\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (0 !== ch) {\n following = state.input.charCodeAt(state.position + 1);\n _line = state.line; // Save the current line.\n\n //\n // Explicit notation case. There are two separate blocks:\n // first for the key (denoted by \"?\") and second for the value (denoted by \":\")\n //\n if ((0x3F/* ? */ === ch || 0x3A/* : */ === ch) && is_WS_OR_EOL(following)) {\n\n if (0x3F/* ? */ === ch) {\n if (atExplicitKey) {\n storeMappingPair(state, _result, keyTag, keyNode, null);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = true;\n allowCompact = true;\n\n } else if (atExplicitKey) {\n // i.e. 0x3A/* : */ === character after the explicit key.\n atExplicitKey = false;\n allowCompact = true;\n\n } else {\n throwError(state, 'incomplete explicit mapping pair; a key node is missed');\n }\n\n state.position += 1;\n ch = following;\n\n //\n // Implicit notation case. Flow-style node as the key first, then \":\", and the value.\n //\n } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n\n if (state.line === _line) {\n ch = state.input.charCodeAt(state.position);\n\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (0x3A/* : */ === ch) {\n ch = state.input.charCodeAt(++state.position);\n\n if (!is_WS_OR_EOL(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n }\n\n if (atExplicitKey) {\n storeMappingPair(state, _result, keyTag, keyNode, null);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = false;\n allowCompact = false;\n keyTag = state.tag;\n keyNode = state.result;\n\n } else if (state.position == state.lineStart && testDocumentSeparator(state)) {\n break; // Reading is done. Go to the epilogue.\n } else if (detected) {\n throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n while (state.position>0){\n ch = state.input.charCodeAt(--state.position);\n if (is_EOL(ch)){\n state.position++;\n break;\n }\n }\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else {\n break; // Reading is done. Go to the epilogue.\n }\n\n //\n // Common reading code for both explicit and implicit notations.\n //\n if (state.line === _line || state.lineIndent > nodeIndent) {\n if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n if (atExplicitKey) {\n keyNode = state.result;\n } else {\n valueNode = state.result;\n }\n }\n\n if (!atExplicitKey) {\n storeMappingPair(state, _result, keyTag, keyNode, valueNode);\n keyTag = keyNode = valueNode = null;\n }\n\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n }\n\n if (state.lineIndent > nodeIndent && (0 !== ch)) {\n throwError(state, 'bad indentation of a mapping entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n //\n // Epilogue.\n //\n\n // Special case: last mapping's node contains only the key in explicit notation.\n if (atExplicitKey) {\n storeMappingPair(state, _result, keyTag, keyNode, null);\n }\n\n // Expose the resulting mapping.\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'mapping';\n state.result = _result;\n }\n\n return detected;\n}\n\nfunction readTagProperty(state:State) {\n var _position,\n isVerbatim = false,\n isNamed = false,\n tagHandle,\n tagName,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (0x21/* ! */ !== ch) {\n return false;\n }\n\n if (null !== state.tag) {\n throwError(state, 'duplication of a tag property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n if (0x3C/* < */ === ch) {\n isVerbatim = true;\n ch = state.input.charCodeAt(++state.position);\n\n } else if (0x21/* ! */ === ch) {\n isNamed = true;\n tagHandle = '!!';\n ch = state.input.charCodeAt(++state.position);\n\n } else {\n tagHandle = '!';\n }\n\n _position = state.position;\n\n if (isVerbatim) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (0 !== ch && 0x3E/* > */ !== ch);\n\n if (state.position < state.length) {\n tagName = state.input.slice(_position, state.position);\n ch = state.input.charCodeAt(++state.position);\n } else {\n throwError(state, 'unexpected end of the stream within a verbatim tag');\n }\n } else {\n while (0 !== ch && !is_WS_OR_EOL(ch)) {\n\n if (0x21/* ! */ === ch) {\n if (!isNamed) {\n tagHandle = state.input.slice(_position - 1, state.position + 1);\n\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n throwError(state, 'named tag handle cannot contain such characters');\n }\n\n isNamed = true;\n _position = state.position + 1;\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks');\n }\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n tagName = state.input.slice(_position, state.position);\n\n if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n throwError(state, 'tag suffix cannot contain flow indicator characters');\n }\n }\n\n if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n throwError(state, 'tag name cannot contain such characters: ' + tagName);\n }\n\n if (isVerbatim) {\n state.tag = tagName;\n\n } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {\n state.tag = state.tagMap[tagHandle] + tagName;\n\n } else if ('!' === tagHandle) {\n state.tag = '!' + tagName;\n\n } else if ('!!' === tagHandle) {\n state.tag = 'tag:yaml.org,2002:' + tagName;\n\n } else {\n throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n }\n\n return true;\n}\n\nfunction readAnchorProperty(state:State) {\n var _position,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (0x26/* & */ !== ch) {\n return false;\n }\n\n if (null !== state.anchor) {\n throwError(state, 'duplication of an anchor property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an anchor node must contain at least one character');\n }\n\n state.anchor = state.input.slice(_position, state.position);\n return true;\n}\n\nfunction readAlias(state:State) {\n var _position, alias,\n len = state.length,\n input = state.input,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (0x2A/* * */ !== ch) {\n return false;\n }\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position <= _position) {\n throwError(state, 'name of an alias node must contain at least one character');\n state.position=_position+1;\n }\n alias = state.input.slice(_position, state.position);\n\n if (!state.anchorMap.hasOwnProperty(alias)) {\n throwError(state, 'unidentified alias \"' + alias + '\"');\n if (state.position<=_position){\n state.position=_position+1;\n }\n }\n\n state.result = ast.newAnchorRef(alias,_position,state.position,state.anchorMap[alias]);\n skipSeparationSpace(state, true, -1);\n return true;\n}\n\nfunction composeNode(state:State, parentIndent, nodeContext, allowToSeek, allowCompact) {\n var allowBlockStyles,\n allowBlockScalars,\n allowBlockCollections,\n indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n }\n\n let tagStart = state.position;\n let tagColumn = state.position - state.lineStart;\n if (1 === indentStatus) {\n while (readTagProperty(state) || readAnchorProperty(state)) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n allowBlockCollections = allowBlockStyles;\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n } else {\n allowBlockCollections = false;\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact;\n }\n\n if (1 === indentStatus || CONTEXT_BLOCK_OUT === nodeContext) {\n if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n flowIndent = parentIndent;\n } else {\n flowIndent = parentIndent + 1;\n }\n\n blockIndent = state.position - state.lineStart;\n\n if (1 === indentStatus) {\n if (allowBlockCollections &&\n (readBlockSequence(state, blockIndent) ||\n readBlockMapping(state, blockIndent, flowIndent)) ||\n readFlowCollection(state, flowIndent)) {\n hasContent = true;\n } else {\n if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\n readSingleQuotedScalar(state, flowIndent) ||\n readDoubleQuotedScalar(state, flowIndent)) {\n hasContent = true;\n\n } else if (readAlias(state)) {\n hasContent = true;\n\n if (null !== state.tag || null !== state.anchor) {\n throwError(state, 'alias node should not have any properties');\n }\n\n } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n hasContent = true;\n\n if (null === state.tag) {\n state.tag = '?';\n }\n }\n\n if (null !== state.anchor) {\n state.anchorMap[state.anchor] = state.result;\n state.result.anchorId=state.anchor\n }\n }\n } else if (0 === indentStatus) {\n // Special case: block sequences are allowed to have same indentation level as the parent.\n // http://www.yaml.org/spec/1.2/spec.html#id2799784\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n }\n }\n\n if (null !== state.tag && '!' !== state.tag) {\n if (state.tag==\"!include\"){\n if (!state.result){\n state.result=ast.newScalar();\n state.result.startPosition=state.position;\n state.result.endPosition=state.position;\n throwError(state,\"!include without value\");\n }\n state.result.kind=ast.Kind.INCLUDE_REF\n }\n else if ('?' === state.tag) {\n for (typeIndex = 0, typeQuantity = state.implicitTypes.length;\n typeIndex < typeQuantity;\n typeIndex += 1) {\n type = state.implicitTypes[typeIndex];\n\n // Implicit resolving is not allowed for non-scalar types, and '?'\n // non-specific tag is only assigned to plain scalars. So, it isn't\n // needed to check for 'kind' conformity.\n var vl=state.result['value'];\n if (type.resolve(vl)) { // `state.result` updated in resolver if matched\n state.result.valueObject = type.construct(state.result['value']);\n state.tag = type.tag;\n if (null !== state.anchor) {\n state.result.anchorId=state.anchor\n state.anchorMap[state.anchor] = state.result;\n }\n break;\n }\n }\n } else if (_hasOwnProperty.call(state.typeMap, state.tag)) {\n type = state.typeMap[state.tag];\n\n if (null !== state.result && type.kind !== state.kind) {\n throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n }\n\n if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched\n throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n } else {\n state.result = type.construct(state.result);\n if (null !== state.anchor) {\n state.result.anchorId=state.anchor\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else {\n throwErrorFromPosition(state,tagStart,'unknown tag <' + state.tag + '>',false,true);\n }\n }\n\n return null !== state.tag || null !== state.anchor || hasContent;\n}\n\nfunction readDocument(state:State) {\n var documentStart = state.position,\n _position,\n directiveName,\n directiveArgs,\n hasDirectives = false,\n ch;\n\n state.version = null;\n state.checkLineBreaks = state.legacy;\n state.tagMap = {};\n state.anchorMap = {};\n\n while (0 !== (ch = state.input.charCodeAt(state.position))) {\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if (state.lineIndent > 0 || 0x25/* % */ !== ch) {\n break;\n }\n\n hasDirectives = true;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (0 !== ch && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveName = state.input.slice(_position, state.position);\n directiveArgs = [];\n\n if (directiveName.length < 1) {\n throwError(state, 'directive name must not be less than one character in length');\n }\n\n while (0 !== ch) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (0x23/* # */ === ch) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (0 !== ch && !is_EOL(ch));\n break;\n }\n\n if (is_EOL(ch)) {\n break;\n }\n\n _position = state.position;\n\n while (0 !== ch && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveArgs.push(state.input.slice(_position, state.position));\n }\n\n if (0 !== ch) {\n readLineBreak(state);\n }\n\n if (_hasOwnProperty.call(directiveHandlers, directiveName)) {\n directiveHandlers[directiveName](state, directiveName, directiveArgs);\n } else {\n throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n state.position++;\n }\n }\n\n skipSeparationSpace(state, true, -1);\n\n if (0 === state.lineIndent &&\n 0x2D/* - */ === state.input.charCodeAt(state.position) &&\n 0x2D/* - */ === state.input.charCodeAt(state.position + 1) &&\n 0x2D/* - */ === state.input.charCodeAt(state.position + 2)) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected');\n }\n\n composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n skipSeparationSpace(state, true, -1);\n\n if (state.checkLineBreaks &&\n PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n }\n\n state.documents.push(state.result);\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n\n if (0x2E/* . */ === state.input.charCodeAt(state.position)) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n return;\n }\n\n if (state.position < (state.length - 1)) {\n throwError(state, 'end of the stream or a document separator is expected');\n } else {\n return;\n }\n}\n\n\nfunction loadDocuments(input:string, options) {\n input = String(input);\n options = options || {};\n\n let inputLength = input.length;\n if (inputLength !== 0) {\n\n // Add tailing `\\n` if not exists\n if (0x0A/* LF */ !== input.charCodeAt(inputLength - 1) &&\n 0x0D/* CR */ !== input.charCodeAt(inputLength - 1)) {\n input += '\\n';\n }\n\n // Strip BOM\n if (input.charCodeAt(0) === 0xFEFF) {\n input = input.slice(1);\n }\n }\n\n var state = new State(input, options);\n\n // Use 0 as string terminator. That significantly simplifies bounds check.\n state.input += '\\0';\n\n while (0x20/* Space */ === state.input.charCodeAt(state.position)) {\n state.lineIndent += 1;\n state.position += 1;\n }\n\n while (state.position < (state.length - 1)) {\n var q=state.position\n readDocument(state);\n if (state.position<=q){\n for (;state.position0){\n //last document takes the file till the end\n documents[docsCount-1].endPosition = inputLength;\n }\n\n for(let x of documents){\n x.errors=state.errors;\n if(x.startPosition>x.endPosition){\n x.startPosition = x.endPosition;\n }\n }\n return documents;\n}\n\n\nexport function loadAll(input: string, iterator: (document: ast.YAMLNode) => void, options: LoadOptions = {}) {\n var documents = loadDocuments(input, options), index, length;\n\n for (index = 0, length = documents.length; index < length; index += 1) {\n iterator(documents[index]);\n }\n}\n\n\nexport function load(input:string, options: LoadOptions = {}): ast.YAMLNode {\n var documents = loadDocuments(input, options), index, length;\n\n if (0 === documents.length) {\n /*eslint-disable no-undefined*/\n return undefined;\n } else if (1 === documents.length) {\n return documents[0];\n }\n var e=new YAMLException('expected a single document in the stream, but found more');\n e.mark=new Mark(\"\",\"\",0,0,0);\n e.mark.position=documents[0].endPosition;\n documents[0].errors.push(e);\n //it is an artifact which is caused by the fact that we are checking next char before stopping parse\n\n\n return documents[0];\n}\n\n\nexport function safeLoadAll(input: string, output: (document: ast.YAMLNode) => void, options: LoadOptions = {}) {\n loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n}\n\n\nexport function safeLoad(input:string, options: LoadOptions = {}): ast.YAMLNode {\n return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n}\n\nexport interface LoadOptions{\n filename?: string,\n schema?: any,\n onWarning?: () => any,\n legacy?: boolean,\n allowAnyEscape?: boolean,\n ignoreDuplicateKeys?: boolean\n}\n\ndeclare var module:any;\n\nmodule.exports.loadAll = loadAll;\nmodule.exports.load = load;\nmodule.exports.safeLoadAll = safeLoadAll;\nmodule.exports.safeLoad = safeLoad;\n", "\n\n'use strict';\ndeclare function require(n:string):any\n/*eslint-disable no-use-before-define*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar DEFAULT_FULL_SCHEMA = require('./schema/default_full');\nvar DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');\n\nvar _toString = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar CHAR_TAB = 0x09; /* Tab */\nvar CHAR_LINE_FEED = 0x0A; /* LF */\nvar CHAR_CARRIAGE_RETURN = 0x0D; /* CR */\nvar CHAR_SPACE = 0x20; /* Space */\nvar CHAR_EXCLAMATION = 0x21; /* ! */\nvar CHAR_DOUBLE_QUOTE = 0x22; /* \" */\nvar CHAR_SHARP = 0x23; /* # */\nvar CHAR_PERCENT = 0x25; /* % */\nvar CHAR_AMPERSAND = 0x26; /* & */\nvar CHAR_SINGLE_QUOTE = 0x27; /* ' */\nvar CHAR_ASTERISK = 0x2A; /* * */\nvar CHAR_COMMA = 0x2C; /* , */\nvar CHAR_MINUS = 0x2D; /* - */\nvar CHAR_COLON = 0x3A; /* : */\nvar CHAR_GREATER_THAN = 0x3E; /* > */\nvar CHAR_QUESTION = 0x3F; /* ? */\nvar CHAR_COMMERCIAL_AT = 0x40; /* @ */\nvar CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\nvar CHAR_GRAVE_ACCENT = 0x60; /* ` */\nvar CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */\nvar CHAR_VERTICAL_LINE = 0x7C; /* | */\nvar CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */\n\nvar ESCAPE_SEQUENCES = {};\n\nESCAPE_SEQUENCES[0x00] = '\\\\0';\nESCAPE_SEQUENCES[0x07] = '\\\\a';\nESCAPE_SEQUENCES[0x08] = '\\\\b';\nESCAPE_SEQUENCES[0x09] = '\\\\t';\nESCAPE_SEQUENCES[0x0A] = '\\\\n';\nESCAPE_SEQUENCES[0x0B] = '\\\\v';\nESCAPE_SEQUENCES[0x0C] = '\\\\f';\nESCAPE_SEQUENCES[0x0D] = '\\\\r';\nESCAPE_SEQUENCES[0x1B] = '\\\\e';\nESCAPE_SEQUENCES[0x22] = '\\\\\"';\nESCAPE_SEQUENCES[0x5C] = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85] = '\\\\N';\nESCAPE_SEQUENCES[0xA0] = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\n\nvar DEPRECATED_BOOLEANS_SYNTAX = [\n 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\n 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\n];\n\nfunction compileStyleMap(schema, map) {\n var result, keys, index, length, tag, style, type;\n\n if (null === map) {\n return {};\n }\n\n result = {};\n keys = Object.keys(map);\n\n for (index = 0, length = keys.length; index < length; index += 1) {\n tag = keys[index];\n style = String(map[tag]);\n\n if ('!!' === tag.slice(0, 2)) {\n tag = 'tag:yaml.org,2002:' + tag.slice(2);\n }\n\n type = schema.compiledTypeMap[tag];\n\n if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n style = type.styleAliases[style];\n }\n\n result[tag] = style;\n }\n\n return result;\n}\n\nfunction encodeHex(character) {\n var string, handle, length;\n\n string = character.toString(16).toUpperCase();\n\n if (character <= 0xFF) {\n handle = 'x';\n length = 2;\n } else if (character <= 0xFFFF) {\n handle = 'u';\n length = 4;\n } else if (character <= 0xFFFFFFFF) {\n handle = 'U';\n length = 8;\n } else {\n throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');\n }\n\n return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\n\nfunction State(options) {\n this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;\n this.indent = Math.max(1, (options['indent'] || 2));\n this.skipInvalid = options['skipInvalid'] || false;\n this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\n this.styleMap = compileStyleMap(this.schema, options['styles'] || null);\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.explicitTypes = this.schema.compiledExplicit;\n\n this.tag = null;\n this.result = '';\n\n this.duplicates = [];\n this.usedDuplicates = null;\n}\n\nfunction indentString(string:string, spaces) {\n var ind = common.repeat(' ', spaces),\n position = 0,\n next = -1,\n result = '',\n line,\n length = string.length;\n\n while (position < length) {\n next = string.indexOf('\\n', position);\n if (next === -1) {\n line = string.slice(position);\n position = length;\n } else {\n line = string.slice(position, next + 1);\n position = next + 1;\n }\n if (line.length && line !== '\\n') {\n result += ind;\n }\n result += line;\n }\n\n return result;\n}\n\nfunction generateNextLine(state, level) {\n return '\\n' + common.repeat(' ', state.indent * level);\n}\n\nfunction testImplicitResolving(state, str) {\n var index, length, type;\n\n for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n type = state.implicitTypes[index];\n\n if (type.resolve(str)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction StringBuilder(source) {\n this.source = source;\n this.result = '';\n this.checkpoint = 0;\n}\n\nStringBuilder.prototype.takeUpTo = function (position) {\n var er;\n\n if (position < this.checkpoint) {\n er = new Error('position should be > checkpoint');\n er.position = position;\n er.checkpoint = this.checkpoint;\n throw er;\n }\n\n this.result += this.source.slice(this.checkpoint, position);\n this.checkpoint = position;\n return this;\n};\n\nStringBuilder.prototype.escapeChar = function () {\n var character, esc;\n\n character = this.source.charCodeAt(this.checkpoint);\n esc = ESCAPE_SEQUENCES[character] || encodeHex(character);\n this.result += esc;\n this.checkpoint += 1;\n\n return this;\n};\n\nStringBuilder.prototype.finish = function () {\n if (this.source.length > this.checkpoint) {\n this.takeUpTo(this.source.length);\n }\n};\n\nfunction writeScalar(state, object, level) {\n var simple, first, spaceWrap, folded, literal, single, double,\n sawLineFeed, linePosition, longestLine, indent, max, character,\n position, escapeSeq, hexEsc, previous, lineLength, modifier,\n trailingLineBreaks, result;\n\n if (0 === object.length) {\n state.dump = \"''\";\n return;\n }\n if (object.indexOf(\"!include\")==0){\n state.dump=\"\"+object;//FIXME\n return;\n }\n if (object.indexOf(\"!$$$novalue\")==0){\n state.dump=\"\";//FIXME\n return;\n }\n if (-1 !== DEPRECATED_BOOLEANS_SYNTAX.indexOf(object)) {\n state.dump = \"'\" + object + \"'\";\n return;\n }\n\n simple = true;\n first = object.length ? object.charCodeAt(0) : 0;\n spaceWrap = (CHAR_SPACE === first ||\n CHAR_SPACE === object.charCodeAt(object.length - 1));\n\n // Simplified check for restricted first characters\n // http://www.yaml.org/spec/1.2/spec.html#ns-plain-first%28c%29\n if (CHAR_MINUS === first ||\n CHAR_QUESTION === first ||\n CHAR_COMMERCIAL_AT === first ||\n CHAR_GRAVE_ACCENT === first) {\n simple = false;\n }\n\n // can only use > and | if not wrapped in spaces.\n if (spaceWrap) {\n simple = false;\n folded = false;\n literal = false;\n } else {\n folded = true;\n literal = true;\n }\n\n single = true;\n double = new StringBuilder(object);\n\n sawLineFeed = false;\n linePosition = 0;\n longestLine = 0;\n\n indent = state.indent * level;\n max = 80;\n if (indent < 40) {\n max -= indent;\n } else {\n max = 40;\n }\n\n for (position = 0; position < object.length; position++) {\n character = object.charCodeAt(position);\n if (simple) {\n // Characters that can never appear in the simple scalar\n if (!simpleChar(character)) {\n simple = false;\n } else {\n // Still simple. If we make it all the way through like\n // this, then we can just dump the string as-is.\n continue;\n }\n }\n\n if (single && character === CHAR_SINGLE_QUOTE) {\n single = false;\n }\n\n escapeSeq = ESCAPE_SEQUENCES[character];\n hexEsc = needsHexEscape(character);\n\n if (!escapeSeq && !hexEsc) {\n continue;\n }\n\n if (character !== CHAR_LINE_FEED &&\n character !== CHAR_DOUBLE_QUOTE &&\n character !== CHAR_SINGLE_QUOTE) {\n folded = false;\n literal = false;\n } else if (character === CHAR_LINE_FEED) {\n sawLineFeed = true;\n single = false;\n if (position > 0) {\n previous = object.charCodeAt(position - 1);\n if (previous === CHAR_SPACE) {\n literal = false;\n folded = false;\n }\n }\n if (folded) {\n lineLength = position - linePosition;\n linePosition = position;\n if (lineLength > longestLine) {\n longestLine = lineLength;\n }\n }\n }\n\n if (character !== CHAR_DOUBLE_QUOTE) {\n single = false;\n }\n\n double.takeUpTo(position);\n double.escapeChar();\n }\n\n if (simple && testImplicitResolving(state, object)) {\n simple = false;\n }\n\n modifier = '';\n if (folded || literal) {\n trailingLineBreaks = 0;\n if (object.charCodeAt(object.length - 1) === CHAR_LINE_FEED) {\n trailingLineBreaks += 1;\n if (object.charCodeAt(object.length - 2) === CHAR_LINE_FEED) {\n trailingLineBreaks += 1;\n }\n }\n\n if (trailingLineBreaks === 0) {\n modifier = '-';\n } else if (trailingLineBreaks === 2) {\n modifier = '+';\n }\n }\n\n if (literal && longestLine < max) {\n folded = false;\n }\n\n // If it's literally one line, then don't bother with the literal.\n // We may still want to do a fold, though, if it's a super long line.\n if (!sawLineFeed) {\n literal = false;\n }\n\n if (simple) {\n state.dump = object;\n } else if (single) {\n state.dump = '\\'' + object + '\\'';\n } else if (folded) {\n result = fold(object, max);\n state.dump = '>' + modifier + '\\n' + indentString(result, indent);\n } else if (literal) {\n if (!modifier) {\n object = object.replace(/\\n$/, '');\n }\n state.dump = '|' + modifier + '\\n' + indentString(object, indent);\n } else if (double) {\n double.finish();\n state.dump = '\"' + double.result + '\"';\n } else {\n throw new Error('Failed to dump scalar value');\n }\n\n return;\n}\n\n// The `trailing` var is a regexp match of any trailing `\\n` characters.\n//\n// There are three cases we care about:\n//\n// 1. One trailing `\\n` on the string. Just use `|` or `>`.\n// This is the assumed default. (trailing = null)\n// 2. No trailing `\\n` on the string. Use `|-` or `>-` to \"chomp\" the end.\n// 3. More than one trailing `\\n` on the string. Use `|+` or `>+`.\n//\n// In the case of `>+`, these line breaks are *not* doubled (like the line\n// breaks within the string), so it's important to only end with the exact\n// same number as we started.\nfunction fold(object, max) {\n var result = '',\n position = 0,\n length = object.length,\n trailing = /\\n+$/.exec(object),\n newLine;\n\n if (trailing) {\n length = trailing.index + 1;\n }\n\n while (position < length) {\n newLine = object.indexOf('\\n', position);\n if (newLine > length || newLine === -1) {\n if (result) {\n result += '\\n\\n';\n }\n result += foldLine(object.slice(position, length), max);\n position = length;\n } else {\n if (result) {\n result += '\\n\\n';\n }\n result += foldLine(object.slice(position, newLine), max);\n position = newLine + 1;\n }\n }\n if (trailing && trailing[0] !== '\\n') {\n result += trailing[0];\n }\n\n return result;\n}\n\nfunction foldLine(line, max) {\n if (line === '') {\n return line;\n }\n\n var foldRe = /[^\\s] [^\\s]/g,\n result = '',\n prevMatch = 0,\n foldStart = 0,\n match = foldRe.exec(line),\n index,\n foldEnd,\n folded;\n\n while (match) {\n index = match.index;\n\n // when we cross the max len, if the previous match would've\n // been ok, use that one, and carry on. If there was no previous\n // match on this fold section, then just have a long line.\n if (index - foldStart > max) {\n if (prevMatch !== foldStart) {\n foldEnd = prevMatch;\n } else {\n foldEnd = index;\n }\n\n if (result) {\n result += '\\n';\n }\n folded = line.slice(foldStart, foldEnd);\n result += folded;\n foldStart = foldEnd + 1;\n }\n prevMatch = index + 1;\n match = foldRe.exec(line);\n }\n\n if (result) {\n result += '\\n';\n }\n\n // if we end up with one last word at the end, then the last bit might\n // be slightly bigger than we wanted, because we exited out of the loop.\n if (foldStart !== prevMatch && line.length - foldStart > max) {\n result += line.slice(foldStart, prevMatch) + '\\n' +\n line.slice(prevMatch + 1);\n } else {\n result += line.slice(foldStart);\n }\n\n return result;\n}\n\n// Returns true if character can be found in a simple scalar\nfunction simpleChar(character) {\n return CHAR_TAB !== character &&\n CHAR_LINE_FEED !== character &&\n CHAR_CARRIAGE_RETURN !== character &&\n CHAR_COMMA !== character &&\n CHAR_LEFT_SQUARE_BRACKET !== character &&\n CHAR_RIGHT_SQUARE_BRACKET !== character &&\n CHAR_LEFT_CURLY_BRACKET !== character &&\n CHAR_RIGHT_CURLY_BRACKET !== character &&\n CHAR_SHARP !== character &&\n CHAR_AMPERSAND !== character &&\n CHAR_ASTERISK !== character &&\n CHAR_EXCLAMATION !== character &&\n CHAR_VERTICAL_LINE !== character &&\n CHAR_GREATER_THAN !== character &&\n CHAR_SINGLE_QUOTE !== character &&\n CHAR_DOUBLE_QUOTE !== character &&\n CHAR_PERCENT !== character &&\n CHAR_COLON !== character &&\n !ESCAPE_SEQUENCES[character] &&\n !needsHexEscape(character);\n}\n\n// Returns true if the character code needs to be escaped.\nfunction needsHexEscape(character) {\n return !((0x00020 <= character && character <= 0x00007E) ||\n (0x00085 === character) ||\n (0x000A0 <= character && character <= 0x00D7FF) ||\n (0x0E000 <= character && character <= 0x00FFFD) ||\n (0x10000 <= character && character <= 0x10FFFF));\n}\n\nfunction writeFlowSequence(state, level, object) {\n var _result = '',\n _tag = state.tag,\n index,\n length;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n // Write only valid elements.\n if (writeNode(state, level, object[index], false, false)) {\n if (0 !== index) {\n _result += ', ';\n }\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = '[' + _result + ']';\n}\n\nfunction writeBlockSequence(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n index,\n length;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n // Write only valid elements.\n if (writeNode(state, level + 1, object[index], true, true)) {\n if (!compact || 0 !== index) {\n _result += generateNextLine(state, level);\n }\n _result += '- ' + state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = _result || '[]'; // Empty sequence if no valid values.\n}\n\nfunction writeFlowMapping(state, level, object) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n pairBuffer;\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n\n if (0 !== index) {\n pairBuffer += ', ';\n }\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (!writeNode(state, level, objectKey, false, false)) {\n continue; // Skip this pair because of invalid key;\n }\n\n if (state.dump.length > 1024) {\n pairBuffer += '? ';\n }\n\n pairBuffer += state.dump + ': ';\n\n if (!writeNode(state, level, objectValue, false, false)) {\n continue; // Skip this pair because of invalid value.\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = '{' + _result + '}';\n}\n\nfunction writeBlockMapping(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n explicitPair,\n pairBuffer;\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n\n if (!compact || 0 !== index) {\n pairBuffer += generateNextLine(state, level);\n }\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (!writeNode(state, level + 1, objectKey, true, true)) {\n continue; // Skip this pair because of invalid key.\n }\n\n explicitPair = (null !== state.tag && '?' !== state.tag) ||\n (state.dump && state.dump.length > 1024);\n\n if (explicitPair) {\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += '?';\n } else {\n pairBuffer += '? ';\n }\n }\n\n pairBuffer += state.dump;\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level);\n }\n\n if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n continue; // Skip this pair because of invalid value.\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += ':';\n } else {\n pairBuffer += ': ';\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = _result || '{}'; // Empty mapping if no valid pairs.\n}\n\nfunction detectType(state, object, explicit) {\n var _result, typeList, index, length, type, style;\n\n typeList = explicit ? state.explicitTypes : state.implicitTypes;\n\n for (index = 0, length = typeList.length; index < length; index += 1) {\n type = typeList[index];\n\n if ((type.instanceOf || type.predicate) &&\n (!type.instanceOf || (('object' === typeof object) && (object instanceof type.instanceOf))) &&\n (!type.predicate || type.predicate(object))) {\n\n state.tag = explicit ? type.tag : '?';\n\n if (type.represent) {\n style = state.styleMap[type.tag] || type.defaultStyle;\n\n if ('[object Function]' === _toString.call(type.represent)) {\n _result = type.represent(object, style);\n } else if (_hasOwnProperty.call(type.represent, style)) {\n _result = type.represent[style](object, style);\n } else {\n throw new YAMLException('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n }\n\n state.dump = _result;\n }\n\n return true;\n }\n }\n\n return false;\n}\n\n// Serializes `object` and writes it to global `result`.\n// Returns true on success, or false on invalid object.\n//\nfunction writeNode(state, level, object, block, compact) {\n state.tag = null;\n state.dump = object;\n\n if (!detectType(state, object, false)) {\n detectType(state, object, true);\n }\n\n var type = _toString.call(state.dump);\n\n if (block) {\n block = (0 > state.flowLevel || state.flowLevel > level);\n }\n\n if ((null !== state.tag && '?' !== state.tag) || (2 !== state.indent && level > 0)) {\n compact = false;\n }\n\n var objectOrArray = '[object Object]' === type || '[object Array]' === type,\n duplicateIndex,\n duplicate;\n\n if (objectOrArray) {\n duplicateIndex = state.duplicates.indexOf(object);\n duplicate = duplicateIndex !== -1;\n }\n\n if (duplicate && state.usedDuplicates[duplicateIndex]) {\n state.dump = '*ref_' + duplicateIndex;\n } else {\n if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n state.usedDuplicates[duplicateIndex] = true;\n }\n if ('[object Object]' === type) {\n if (block && (0 !== Object.keys(state.dump).length)) {\n writeBlockMapping(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + (0 === level ? '\\n' : '') + state.dump;\n }\n } else {\n writeFlowMapping(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if ('[object Array]' === type) {\n if (block && (0 !== state.dump.length)) {\n writeBlockSequence(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + (0 === level ? '\\n' : '') + state.dump;\n }\n } else {\n writeFlowSequence(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if ('[object String]' === type) {\n if ('?' !== state.tag) {\n writeScalar(state, state.dump, level);\n }\n } else {\n if (state.skipInvalid) {\n return false;\n }\n throw new YAMLException('unacceptable kind of an object to dump ' + type);\n }\n\n if (null !== state.tag && '?' !== state.tag) {\n state.dump = '!<' + state.tag + '> ' + state.dump;\n }\n }\n\n return true;\n}\n\nfunction getDuplicateReferences(object, state) {\n var objects = [],\n duplicatesIndexes = [],\n index,\n length;\n\n inspectNode(object, objects, duplicatesIndexes);\n\n for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n state.duplicates.push(objects[duplicatesIndexes[index]]);\n }\n state.usedDuplicates = new Array(length);\n}\n\nfunction inspectNode(object, objects, duplicatesIndexes) {\n var type = _toString.call(object),\n objectKeyList,\n index,\n length;\n\n if (null !== object && 'object' === typeof object) {\n index = objects.indexOf(object);\n if (-1 !== index) {\n if (-1 === duplicatesIndexes.indexOf(index)) {\n duplicatesIndexes.push(index);\n }\n } else {\n objects.push(object);\n\n if (Array.isArray(object)) {\n for (index = 0, length = object.length; index < length; index += 1) {\n inspectNode(object[index], objects, duplicatesIndexes);\n }\n } else {\n objectKeyList = Object.keys(object);\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n }\n }\n }\n }\n}\n\nexport function dump(input, options) {\n options = options || {};\n\n var state = new State(options);\n\n getDuplicateReferences(input, state);\n\n if (writeNode(state, 0, input, true, true)) {\n return state.dump + '\\n';\n }\n return '';\n}\n\nexport function safeDump(input, options) {\n return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n}\n", "import { YAMLScalar } from './yamlAST'\n\nexport function parseYamlBoolean(input: string): boolean {\n if ([\"true\", \"True\", \"TRUE\"].lastIndexOf(input) >= 0) {\n return true;\n }\n else if ([\"false\", \"False\", \"FALSE\"].lastIndexOf(input) >= 0) {\n return false;\n }\n throw `Invalid boolean \"${input}\"`\n}\n\nfunction safeParseYamlInteger(input: string): number {\n // Use startsWith when es6 methods becomes available\n if (input.lastIndexOf('0o', 0) === 0) {\n return parseInt(input.substring(2), 8)\n }\n\n return parseInt(input);\n}\n\nexport function parseYamlInteger(input: string): number {\n const result = safeParseYamlInteger(input)\n\n if (isNaN(result)) {\n throw `Invalid integer \"${input}\"`\n }\n\n return result;\n}\n\nexport function parseYamlFloat(input: string): number {\n\n if ([\".nan\", \".NaN\", \".NAN\"].lastIndexOf(input) >= 0) {\n return NaN;\n }\n\n const infinity = /^([-+])?(?:\\.inf|\\.Inf|\\.INF)$/\n const match = infinity.exec(input)\n if (match) {\n return (match[1] === '-') ? -Infinity : Infinity;\n }\n\n const result = parseFloat(input)\n\n if (!isNaN(result)) {\n return result;\n }\n\n throw `Invalid float \"${input}\"`\n}\n\nexport enum ScalarType {\n null, bool, int, float, string\n}\n\n/** Determines the type of a scalar according to\n * the YAML 1.2 Core Schema (http://www.yaml.org/spec/1.2/spec.html#id2804923)\n */\nexport function determineScalarType(node: YAMLScalar): ScalarType {\n if (node === undefined) {\n return ScalarType.null;\n }\n\n if (node.doubleQuoted || !node.plainScalar || node['singleQuoted']) {\n return ScalarType.string\n }\n\n const value = node.value;\n\n if ([\"null\", \"Null\", \"NULL\", \"~\", ''].indexOf(value) >= 0) {\n return ScalarType.null;\n }\n\n if (value === null || value === undefined) {\n return ScalarType.null;\n }\n\n if ([\"true\", \"True\", \"TRUE\", \"false\", \"False\", \"FALSE\"].indexOf(value) >= 0) {\n return ScalarType.bool;\n }\n\n const base10 = /^[-+]?[0-9]+$/\n const base8 = /^0o[0-7]+$/\n const base16 = /^0x[0-9a-fA-F]+$/\n\n if (base10.test(value) || base8.test(value) || base16.test(value)) {\n return ScalarType.int;\n }\n\n const float = /^[-+]?(\\.[0-9]+|[0-9]+(\\.[0-9]*)?)([eE][-+]?[0-9]+)?$/\n const infinity = /^[-+]?(\\.inf|\\.Inf|\\.INF)$/\n if (float.test(value) || infinity.test(value) || [\".nan\", \".NaN\", \".NAN\"].indexOf(value) >= 0) {\n return ScalarType.float;\n }\n\n return ScalarType.string;\n}", "\n/**\n * Created by kor on 06/05/15.\n */\n\nexport {load, loadAll, safeLoad, safeLoadAll, LoadOptions} from './loader';\nexport {dump, safeDump} from './dumper';\n\nimport Mark=require(\"./mark\")\nexport import YAMLException = require('./exception');\n\nexport * from './yamlAST'\n\nexport type Error = YAMLException\n\nfunction deprecated(name) {\n return function () {\n throw new Error('Function ' + name + ' is deprecated and cannot be used.');\n };\n}\n\nexport * from './scalarInference'\n", null, null, null, null, null, null, null, null, null, "export const balanced = (\n a: string | RegExp,\n b: string | RegExp,\n str: string,\n) => {\n const ma = a instanceof RegExp ? maybeMatch(a, str) : a\n const mb = b instanceof RegExp ? maybeMatch(b, str) : b\n\n const r = ma !== null && mb != null && range(ma, mb, str)\n\n return (\n r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + ma.length, r[1]),\n post: str.slice(r[1] + mb.length),\n }\n )\n}\n\nconst maybeMatch = (reg: RegExp, str: string) => {\n const m = str.match(reg)\n return m ? m[0] : null\n}\n\nexport const range = (\n a: string,\n b: string,\n str: string,\n): undefined | [number, number] => {\n let begs: number[],\n beg: number | undefined,\n left: number,\n right: number | undefined = undefined,\n result: undefined | [number, number]\n let ai = str.indexOf(a)\n let bi = str.indexOf(b, ai + 1)\n let i = ai\n\n if (ai >= 0 && bi > 0) {\n if (a === b) {\n return [ai, bi]\n }\n begs = []\n left = str.length\n\n while (i >= 0 && !result) {\n if (i === ai) {\n begs.push(i)\n ai = str.indexOf(a, i + 1)\n } else if (begs.length === 1) {\n const r = begs.pop()\n if (r !== undefined) result = [r, bi]\n } else {\n beg = begs.pop()\n if (beg !== undefined && beg < left) {\n left = beg\n right = bi\n }\n\n bi = str.indexOf(b, i + 1)\n }\n\n i = ai < bi && ai >= 0 ? ai : bi\n }\n\n if (begs.length && right !== undefined) {\n result = [left, right]\n }\n }\n\n return result\n}\n", "import { balanced } from 'balanced-match'\n\nconst escSlash = '\\0SLASH' + Math.random() + '\\0'\nconst escOpen = '\\0OPEN' + Math.random() + '\\0'\nconst escClose = '\\0CLOSE' + Math.random() + '\\0'\nconst escComma = '\\0COMMA' + Math.random() + '\\0'\nconst escPeriod = '\\0PERIOD' + Math.random() + '\\0'\nconst escSlashPattern = new RegExp(escSlash, 'g')\nconst escOpenPattern = new RegExp(escOpen, 'g')\nconst escClosePattern = new RegExp(escClose, 'g')\nconst escCommaPattern = new RegExp(escComma, 'g')\nconst escPeriodPattern = new RegExp(escPeriod, 'g')\nconst slashPattern = /\\\\\\\\/g\nconst openPattern = /\\\\{/g\nconst closePattern = /\\\\}/g\nconst commaPattern = /\\\\,/g\nconst periodPattern = /\\\\./g\n\nexport const EXPANSION_MAX = 100_000\n\nfunction numeric(str: string) {\n return !isNaN(str as any) ? parseInt(str, 10) : str.charCodeAt(0)\n}\n\nfunction escapeBraces(str: string) {\n return str\n .replace(slashPattern, escSlash)\n .replace(openPattern, escOpen)\n .replace(closePattern, escClose)\n .replace(commaPattern, escComma)\n .replace(periodPattern, escPeriod)\n}\n\nfunction unescapeBraces(str: string) {\n return str\n .replace(escSlashPattern, '\\\\')\n .replace(escOpenPattern, '{')\n .replace(escClosePattern, '}')\n .replace(escCommaPattern, ',')\n .replace(escPeriodPattern, '.')\n}\n\n/**\n * Basically just str.split(\",\"), but handling cases\n * where we have nested braced sections, which should be\n * treated as individual members, like {a,{b,c},d}\n */\nfunction parseCommaParts(str: string) {\n if (!str) {\n return ['']\n }\n\n const parts: string[] = []\n const m = balanced('{', '}', str)\n\n if (!m) {\n return str.split(',')\n }\n\n const { pre, body, post } = m\n const p = pre.split(',')\n\n p[p.length - 1] += '{' + body + '}'\n const postParts = parseCommaParts(post)\n if (post.length) {\n ;(p[p.length - 1] as string) += postParts.shift()\n p.push.apply(p, postParts)\n }\n\n parts.push.apply(parts, p)\n\n return parts\n}\n\nexport type BraceExpansionOptions = {\n max?: number\n}\n\nexport function expand(str: string, options: BraceExpansionOptions = {}) {\n if (!str) {\n return []\n }\n\n const { max = EXPANSION_MAX } = options\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.slice(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.slice(2)\n }\n\n return expand_(escapeBraces(str), max, true).map(unescapeBraces)\n}\n\nfunction embrace(str: string) {\n return '{' + str + '}'\n}\n\nfunction isPadded(el: string) {\n return /^-?0\\d/.test(el)\n}\n\nfunction lte(i: number, y: number) {\n return i <= y\n}\n\nfunction gte(i: number, y: number) {\n return i >= y\n}\n\nfunction expand_(str: string, max: number, isTop: boolean): string[] {\n /** @type {string[]} */\n const expansions: string[] = []\n\n const m = balanced('{', '}', str)\n if (!m) return [str]\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n const pre = m.pre\n const post: string[] = m.post.length ? expand_(m.post, max, false) : ['']\n\n if (/\\$$/.test(m.pre)) {\n for (let k = 0; k < post.length && k < max; k++) {\n const expansion = pre + '{' + m.body + '}' + post[k]\n expansions.push(expansion)\n }\n } else {\n const isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body)\n const isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(\n m.body,\n )\n const isSequence = isNumericSequence || isAlphaSequence\n const isOptions = m.body.indexOf(',') >= 0\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,(?!,).*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post\n return expand_(str, max, true)\n }\n return [str]\n }\n\n let n: string[]\n if (isSequence) {\n n = m.body.split(/\\.\\./)\n } else {\n n = parseCommaParts(m.body)\n if (n.length === 1 && n[0] !== undefined) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand_(n[0], max, false).map(embrace)\n //XXX is this necessary? Can't seem to hit it in tests.\n /* c8 ignore start */\n if (n.length === 1) {\n return post.map(p => m.pre + n[0] + p)\n }\n /* c8 ignore stop */\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n let N: string[]\n\n if (isSequence && n[0] !== undefined && n[1] !== undefined) {\n const x = numeric(n[0])\n const y = numeric(n[1])\n const width = Math.max(n[0].length, n[1].length)\n let incr =\n n.length === 3 && n[2] !== undefined ? Math.abs(numeric(n[2])) : 1\n let test = lte\n const reverse = y < x\n if (reverse) {\n incr *= -1\n test = gte\n }\n const pad = n.some(isPadded)\n\n N = []\n\n for (let i = x; test(i, y); i += incr) {\n let c\n if (isAlphaSequence) {\n c = String.fromCharCode(i)\n if (c === '\\\\') {\n c = ''\n }\n } else {\n c = String(i)\n if (pad) {\n const need = width - c.length\n if (need > 0) {\n const z = new Array(need + 1).join('0')\n if (i < 0) {\n c = '-' + z + c.slice(1)\n } else {\n c = z + c\n }\n }\n }\n }\n N.push(c)\n }\n } else {\n N = []\n\n for (let j = 0; j < n.length; j++) {\n N.push.apply(N, expand_(n[j] as string, max, false))\n }\n }\n\n for (let j = 0; j < N.length; j++) {\n for (let k = 0; k < post.length && expansions.length < max; k++) {\n const expansion = pre + N[j] + post[k]\n if (!isTop || isSequence || expansion) {\n expansions.push(expansion)\n }\n }\n }\n }\n\n return expansions\n}\n", "const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: any) => void = (\n pattern: any,\n): asserts pattern is string => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n", "// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n\n// { : [, /u flag required, negated]\nconst posixClasses: { [k: string]: [e: string, u: boolean, n?: boolean] } =\n {\n '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n '[:cntrl:]': ['\\\\p{Cc}', true],\n '[:digit:]': ['\\\\p{Nd}', true],\n '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n '[:lower:]': ['\\\\p{Ll}', true],\n '[:print:]': ['\\\\p{C}', true],\n '[:punct:]': ['\\\\p{P}', true],\n '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n '[:upper:]': ['\\\\p{Lu}', true],\n '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n '[:xdigit:]': ['A-Fa-f0-9', false],\n }\n\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s: string) => s.replace(/[[\\]\\\\-]/g, '\\\\$&')\n// escape all regexp magic characters\nconst regexpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges: string[]): string => ranges.join('')\n\nexport type ParseClassResult = [\n src: string,\n uFlag: boolean,\n consumed: number,\n hasMagic: boolean,\n]\n\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (\n glob: string,\n position: number,\n): ParseClassResult => {\n const pos = position\n /* c8 ignore start */\n if (glob.charAt(pos) !== '[') {\n throw new Error('not in a brace expression')\n }\n /* c8 ignore stop */\n const ranges: string[] = []\n const negs: string[] = []\n\n let i = pos + 1\n let sawStart = false\n let uflag = false\n let escaping = false\n let negate = false\n let endPos = pos\n let rangeStart = ''\n WHILE: while (i < glob.length) {\n const c = glob.charAt(i)\n if ((c === '!' || c === '^') && i === pos + 1) {\n negate = true\n i++\n continue\n }\n\n if (c === ']' && sawStart && !escaping) {\n endPos = i + 1\n break\n }\n\n sawStart = true\n if (c === '\\\\') {\n if (!escaping) {\n escaping = true\n i++\n continue\n }\n // escaped \\ char, fall through and treat like normal char\n }\n if (c === '[' && !escaping) {\n // either a posix class, a collation equivalent, or just a [\n for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n if (glob.startsWith(cls, i)) {\n // invalid, [a-[] is fine, but not [a-[:alpha]]\n if (rangeStart) {\n return ['$.', false, glob.length - pos, true]\n }\n i += cls.length\n if (neg) negs.push(unip)\n else ranges.push(unip)\n uflag = uflag || u\n continue WHILE\n }\n }\n }\n\n // now it's just a normal character, effectively\n escaping = false\n if (rangeStart) {\n // throw this range away if it's not valid, but others\n // can still match.\n if (c > rangeStart) {\n ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c))\n } else if (c === rangeStart) {\n ranges.push(braceEscape(c))\n }\n rangeStart = ''\n i++\n continue\n }\n\n // now might be the start of a range.\n // can be either c-d or c-] or c] or c] at this point\n if (glob.startsWith('-]', i + 1)) {\n ranges.push(braceEscape(c + '-'))\n i += 2\n continue\n }\n if (glob.startsWith('-', i + 1)) {\n rangeStart = c\n i += 2\n continue\n }\n\n // not the start of a range, just a single character\n ranges.push(braceEscape(c))\n i++\n }\n\n if (endPos < i) {\n // didn't see the end of the class, not a valid class,\n // but might still be valid as a literal match.\n return ['', false, 0, false]\n }\n\n // if we got no ranges and no negates, then we have a range that\n // cannot possibly match anything, and that poisons the whole glob\n if (!ranges.length && !negs.length) {\n return ['$.', false, glob.length - pos, true]\n }\n\n // if we got one positive range, and it's a single character, then that's\n // not actually a magic pattern, it's just that one literal character.\n // we should not treat that as \"magic\", we should just return the literal\n // character. [_] is a perfectly valid way to escape glob magic chars.\n if (\n negs.length === 0 &&\n ranges.length === 1 &&\n /^\\\\?.$/.test(ranges[0]) &&\n !negate\n ) {\n const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]\n return [regexpEscape(r), false, endPos - pos, false]\n }\n\n const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'\n const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'\n const comb =\n ranges.length && negs.length ? '(' + sranges + '|' + snegs + ')'\n : ranges.length ? sranges\n : snegs\n\n return [comb, uflag, endPos - pos, true]\n}\n", "import { MinimatchOptions } from './index.js'\n\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link MinimatchOptions.windowsPathsNoEscape} option is used, then\n * square-bracket escapes are removed, but not backslash escapes.\n *\n * For example, it will turn the string `'[*]'` into `*`, but it will not\n * turn `'\\\\*'` into `'*'`, because `\\` is a path separator in\n * `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both square-bracket escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n *\n * When `magicalBraces` is not set, escapes of braces (`{` and `}`) will not be\n * unescaped.\n */\n\nexport const unescape = (\n s: string,\n {\n windowsPathsNoEscape = false,\n magicalBraces = true,\n }: Pick = {},\n) => {\n if (magicalBraces) {\n return windowsPathsNoEscape ?\n s.replace(/\\[([^\\/\\\\])\\]/g, '$1')\n : s\n .replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g, '$1$2')\n .replace(/\\\\([^\\/])/g, '$1')\n }\n return windowsPathsNoEscape ?\n s.replace(/\\[([^\\/\\\\{}])\\]/g, '$1')\n : s\n .replace(/((?!\\\\).|^)\\[([^\\/\\\\{}])\\]/g, '$1$2')\n .replace(/\\\\([^\\/{}])/g, '$1')\n}\n", "// parse a single path portion\n\nimport { parseClass } from './brace-expressions.js'\nimport { MinimatchOptions, MMRegExp } from './index.js'\nimport { unescape } from './unescape.js'\n\n// classes [] are handled by the parseClass method\n// for positive extglobs, we sub-parse the contents, and combine,\n// with the appropriate regexp close.\n// for negative extglobs, we sub-parse the contents, but then\n// have to include the rest of the pattern, then the parent, etc.,\n// as the thing that cannot be because RegExp negative lookaheads\n// are different from globs.\n//\n// So for example:\n// a@(i|w!(x|y)z|j)b => ^a(i|w((!?(x|y)zb).*)z|j)b$\n// 1 2 3 4 5 6 1 2 3 46 5 6\n//\n// Assembling the extglob requires not just the negated patterns themselves,\n// but also anything following the negative patterns up to the boundary\n// of the current pattern, plus anything following in the parent pattern.\n//\n//\n// So, first, we parse the string into an AST of extglobs, without turning\n// anything into regexps yet.\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y']}, 'z'], ['j']]}, 'b']\n//\n// Then, for all the negative extglobs, we append whatever comes after in\n// each parent as their tail\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y'], 'z', 'b'}, 'z'], ['j']]}, 'b']\n//\n// Lastly, we turn each of these pieces into a regexp, and join\n//\n// v----- .* because there's more following,\n// v v otherwise, .+ because it must be\n// v v *something* there.\n// ['^a', {@ ['i', 'w(?:(!?(?:x|y).*zb$).*)z', 'j' ]}, 'b$']\n// copy what follows into here--^^^^^\n// ['^a', '(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)', 'b$']\n// ['^a(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)b$']\n\nexport type ExtglobType = '!' | '?' | '+' | '*' | '@'\nconst types = new Set(['!', '?', '+', '*', '@'])\nconst isExtglobType = (c: string): c is ExtglobType =>\n types.has(c as ExtglobType)\n\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))'\nconst startNoDot = '(?!\\\\.)'\n\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.'])\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.'])\nconst reSpecials = new Set('().*{}+?[]^$\\\\!')\nconst regExpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// any single thing other than /\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?'\n\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\n\nexport class AST {\n type: ExtglobType | null\n readonly #root: AST\n\n #hasMagic?: boolean\n #uflag: boolean = false\n #parts: (string | AST)[] = []\n readonly #parent?: AST\n readonly #parentIndex: number\n #negs: AST[]\n #filledNegs: boolean = false\n #options: MinimatchOptions\n #toString?: string\n // set to true if it's an extglob with no children\n // (which really means one child of '')\n #emptyExt: boolean = false\n\n constructor(\n type: ExtglobType | null,\n parent?: AST,\n options: MinimatchOptions = {},\n ) {\n this.type = type\n // extglobs are inherently magical\n if (type) this.#hasMagic = true\n this.#parent = parent\n this.#root = this.#parent ? this.#parent.#root : this\n this.#options = this.#root === this ? options : this.#root.#options\n this.#negs = this.#root === this ? [] : this.#root.#negs\n if (type === '!' && !this.#root.#filledNegs) this.#negs.push(this)\n this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0\n }\n\n get hasMagic(): boolean | undefined {\n /* c8 ignore start */\n if (this.#hasMagic !== undefined) return this.#hasMagic\n /* c8 ignore stop */\n for (const p of this.#parts) {\n if (typeof p === 'string') continue\n if (p.type || p.hasMagic) return (this.#hasMagic = true)\n }\n // note: will be undefined until we generate the regexp src and find out\n return this.#hasMagic\n }\n\n // reconstructs the pattern\n toString(): string {\n if (this.#toString !== undefined) return this.#toString\n if (!this.type) {\n return (this.#toString = this.#parts.map(p => String(p)).join(''))\n } else {\n return (this.#toString =\n this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')')\n }\n }\n\n #fillNegs() {\n /* c8 ignore start */\n if (this !== this.#root) throw new Error('should only call on root')\n if (this.#filledNegs) return this\n /* c8 ignore stop */\n\n // call toString() once to fill this out\n this.toString()\n this.#filledNegs = true\n let n: AST | undefined\n while ((n = this.#negs.pop())) {\n if (n.type !== '!') continue\n // walk up the tree, appending everthing that comes AFTER parentIndex\n let p: AST | undefined = n\n let pp = p.#parent\n while (pp) {\n for (\n let i = p.#parentIndex + 1;\n !pp.type && i < pp.#parts.length;\n i++\n ) {\n for (const part of n.#parts) {\n /* c8 ignore start */\n if (typeof part === 'string') {\n throw new Error('string part in extglob AST??')\n }\n /* c8 ignore stop */\n part.copyIn(pp.#parts[i])\n }\n }\n p = pp\n pp = p.#parent\n }\n }\n return this\n }\n\n push(...parts: (string | AST)[]) {\n for (const p of parts) {\n if (p === '') continue\n /* c8 ignore start */\n if (\n typeof p !== 'string' &&\n !(p instanceof AST && p.#parent === this)\n ) {\n throw new Error('invalid part: ' + p)\n }\n /* c8 ignore stop */\n this.#parts.push(p)\n }\n }\n\n toJSON() {\n const ret: any[] =\n this.type === null ?\n this.#parts\n .slice()\n .map(p => (typeof p === 'string' ? p : p.toJSON()))\n : [this.type, ...this.#parts.map(p => (p as AST).toJSON())]\n if (this.isStart() && !this.type) ret.unshift([])\n if (\n this.isEnd() &&\n (this === this.#root ||\n (this.#root.#filledNegs && this.#parent?.type === '!'))\n ) {\n ret.push({})\n }\n return ret\n }\n\n isStart(): boolean {\n if (this.#root === this) return true\n // if (this.type) return !!this.#parent?.isStart()\n if (!this.#parent?.isStart()) return false\n if (this.#parentIndex === 0) return true\n // if everything AHEAD of this is a negation, then it's still the \"start\"\n const p = this.#parent\n for (let i = 0; i < this.#parentIndex; i++) {\n const pp = p.#parts[i]\n if (!(pp instanceof AST && pp.type === '!')) {\n return false\n }\n }\n return true\n }\n\n isEnd(): boolean {\n if (this.#root === this) return true\n if (this.#parent?.type === '!') return true\n if (!this.#parent?.isEnd()) return false\n if (!this.type) return this.#parent?.isEnd()\n // if not root, it'll always have a parent\n /* c8 ignore start */\n const pl = this.#parent ? this.#parent.#parts.length : 0\n /* c8 ignore stop */\n return this.#parentIndex === pl - 1\n }\n\n copyIn(part: AST | string) {\n if (typeof part === 'string') this.push(part)\n else this.push(part.clone(this))\n }\n\n clone(parent: AST) {\n const c = new AST(this.type, parent)\n for (const p of this.#parts) {\n c.copyIn(p)\n }\n return c\n }\n\n static #parseAST(\n str: string,\n ast: AST,\n pos: number,\n opt: MinimatchOptions,\n ): number {\n let escaping = false\n let inBrace = false\n let braceStart = -1\n let braceNeg = false\n if (ast.type === null) {\n // outside of a extglob, append until we find a start\n let i = pos\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {\n ast.push(acc)\n acc = ''\n const ext = new AST(c, ast)\n i = AST.#parseAST(str, ext, i, opt)\n ast.push(ext)\n continue\n }\n acc += c\n }\n ast.push(acc)\n return i\n }\n\n // some kind of extglob, pos is at the (\n // find the next | or )\n let i = pos + 1\n let part = new AST(null, ast)\n const parts: AST[] = []\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n if (isExtglobType(c) && str.charAt(i) === '(') {\n part.push(acc)\n acc = ''\n const ext = new AST(c, part)\n part.push(ext)\n i = AST.#parseAST(str, ext, i, opt)\n continue\n }\n if (c === '|') {\n part.push(acc)\n acc = ''\n parts.push(part)\n part = new AST(null, ast)\n continue\n }\n if (c === ')') {\n if (acc === '' && ast.#parts.length === 0) {\n ast.#emptyExt = true\n }\n part.push(acc)\n acc = ''\n ast.push(...parts, part)\n return i\n }\n acc += c\n }\n\n // unfinished extglob\n // if we got here, it was a malformed extglob! not an extglob, but\n // maybe something else in there.\n ast.type = null\n ast.#hasMagic = undefined\n ast.#parts = [str.substring(pos - 1)]\n return i\n }\n\n static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n const ast = new AST(null, undefined, options)\n AST.#parseAST(pattern, ast, 0, options)\n return ast\n }\n\n // returns the regular expression if there's magic, or the unescaped\n // string if not.\n toMMPattern(): MMRegExp | string {\n // should only be called on root\n /* c8 ignore start */\n if (this !== this.#root) return this.#root.toMMPattern()\n /* c8 ignore stop */\n const glob = this.toString()\n const [re, body, hasMagic, uflag] = this.toRegExpSource()\n // if we're in nocase mode, and not nocaseMagicOnly, then we do\n // still need a regular expression if we have to case-insensitively\n // match capital/lowercase characters.\n const anyMagic =\n hasMagic ||\n this.#hasMagic ||\n (this.#options.nocase &&\n !this.#options.nocaseMagicOnly &&\n glob.toUpperCase() !== glob.toLowerCase())\n if (!anyMagic) {\n return body\n }\n\n const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '')\n return Object.assign(new RegExp(`^${re}$`, flags), {\n _src: re,\n _glob: glob,\n })\n }\n\n get options() {\n return this.#options\n }\n\n // returns the string match, the regexp source, whether there's magic\n // in the regexp (so a regular expression is required) and whether or\n // not the uflag is needed for the regular expression (for posix classes)\n // TODO: instead of injecting the start/end at this point, just return\n // the BODY of the regexp, along with the start/end portions suitable\n // for binding the start/end in either a joined full-path makeRe context\n // (where we bind to (^|/), or a standalone matchPart context (where\n // we bind to ^, and not /). Otherwise slashes get duped!\n //\n // In part-matching mode, the start is:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n // - if dots allowed or not possible: ^\n // - if dots possible and not allowed: ^(?!\\.)\n // end is:\n // - if not isEnd(): nothing\n // - else: $\n //\n // In full-path matching mode, we put the slash at the START of the\n // pattern, so start is:\n // - if first pattern: same as part-matching mode\n // - if not isStart(): nothing\n // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n // - if dots allowed or not possible: /\n // - if dots possible and not allowed: /(?!\\.)\n // end is:\n // - if last pattern, same as part-matching mode\n // - else nothing\n //\n // Always put the (?:$|/) on negated tails, though, because that has to be\n // there to bind the end of the negated pattern portion, and it's easier to\n // just stick it in now rather than try to inject it later in the middle of\n // the pattern.\n //\n // We can just always return the same end, and leave it up to the caller\n // to know whether it's going to be used joined or in parts.\n // And, if the start is adjusted slightly, can do the same there:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n // - if dots allowed or not possible: (?:/|^)\n // - if dots possible and not allowed: (?:/|^)(?!\\.)\n //\n // But it's better to have a simpler binding without a conditional, for\n // performance, so probably better to return both start options.\n //\n // Then the caller just ignores the end if it's not the first pattern,\n // and the start always gets applied.\n //\n // But that's always going to be $ if it's the ending pattern, or nothing,\n // so the caller can just attach $ at the end of the pattern when building.\n //\n // So the todo is:\n // - better detect what kind of start is needed\n // - return both flavors of starting pattern\n // - attach $ at the end of the pattern when creating the actual RegExp\n //\n // Ah, but wait, no, that all only applies to the root when the first pattern\n // is not an extglob. If the first pattern IS an extglob, then we need all\n // that dot prevention biz to live in the extglob portions, because eg\n // +(*|.x*) can match .xy but not .yx.\n //\n // So, return the two flavors if it's #root and the first child is not an\n // AST, otherwise leave it to the child AST to handle it, and there,\n // use the (?:^|/) style of start binding.\n //\n // Even simplified further:\n // - Since the start for a join is eg /(?!\\.) and the start for a part\n // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n // or start or whatever) and prepend ^ or / at the Regexp construction.\n toRegExpSource(\n allowDot?: boolean,\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n const dot = allowDot ?? !!this.#options.dot\n if (this.#root === this) this.#fillNegs()\n if (!this.type) {\n const noEmpty =\n this.isStart() &&\n this.isEnd() &&\n !this.#parts.some(s => typeof s !== 'string')\n const src = this.#parts\n .map(p => {\n const [re, _, hasMagic, uflag] =\n typeof p === 'string' ?\n AST.#parseGlob(p, this.#hasMagic, noEmpty)\n : p.toRegExpSource(allowDot)\n this.#hasMagic = this.#hasMagic || hasMagic\n this.#uflag = this.#uflag || uflag\n return re\n })\n .join('')\n\n let start = ''\n if (this.isStart()) {\n if (typeof this.#parts[0] === 'string') {\n // this is the string that will match the start of the pattern,\n // so we need to protect against dots and such.\n\n // '.' and '..' cannot match unless the pattern is that exactly,\n // even if it starts with . or dot:true is set.\n const dotTravAllowed =\n this.#parts.length === 1 && justDots.has(this.#parts[0])\n if (!dotTravAllowed) {\n const aps = addPatternStart\n // check if we have a possibility of matching . or ..,\n // and prevent that.\n const needNoTrav =\n // dots are allowed, and the pattern starts with [ or .\n (dot && aps.has(src.charAt(0))) ||\n // the pattern starts with \\., and then [ or .\n (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n // the pattern starts with \\.\\., and then [ or .\n (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)))\n // no need to prevent dots if it can't match a dot, or if a\n // sub-pattern will be preventing it anyway.\n const needNoDot = !dot && !allowDot && aps.has(src.charAt(0))\n\n start =\n needNoTrav ? startNoTraversal\n : needNoDot ? startNoDot\n : ''\n }\n }\n }\n\n // append the \"end of path portion\" pattern to negation tails\n let end = ''\n if (\n this.isEnd() &&\n this.#root.#filledNegs &&\n this.#parent?.type === '!'\n ) {\n end = '(?:$|\\\\/)'\n }\n const final = start + src + end\n return [\n final,\n unescape(src),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n // We need to calculate the body *twice* if it's a repeat pattern\n // at the start, once in nodot mode, then again in dot mode, so a\n // pattern like *(?) can match 'x.y'\n\n const repeated = this.type === '*' || this.type === '+'\n // some kind of extglob\n const start = this.type === '!' ? '(?:(?!(?:' : '(?:'\n let body = this.#partsToRegExp(dot)\n\n if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n // invalid extglob, has to at least be *something* present, if it's\n // the entire path portion.\n const s = this.toString()\n this.#parts = [s]\n this.type = null\n this.#hasMagic = undefined\n return [s, unescape(this.toString()), false, false]\n }\n\n // XXX abstract out this map method\n let bodyDotAllowed =\n !repeated || allowDot || dot || !startNoDot ?\n ''\n : this.#partsToRegExp(true)\n if (bodyDotAllowed === body) {\n bodyDotAllowed = ''\n }\n if (bodyDotAllowed) {\n body = `(?:${body})(?:${bodyDotAllowed})*?`\n }\n\n // an empty !() is exactly equivalent to a starNoEmpty\n let final = ''\n if (this.type === '!' && this.#emptyExt) {\n final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty\n } else {\n const close =\n this.type === '!' ?\n // !() must match something,but !(x) can match ''\n '))' +\n (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n star +\n ')'\n : this.type === '@' ? ')'\n : this.type === '?' ? ')?'\n : this.type === '+' && bodyDotAllowed ? ')'\n : this.type === '*' && bodyDotAllowed ? `)?`\n : `)${this.type}`\n final = start + body + close\n }\n return [\n final,\n unescape(body),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n #partsToRegExp(dot: boolean) {\n return this.#parts\n .map(p => {\n // extglob ASTs should only contain parent ASTs\n /* c8 ignore start */\n if (typeof p === 'string') {\n throw new Error('string type in extglob ast??')\n }\n /* c8 ignore stop */\n // can ignore hasMagic, because extglobs are already always magic\n const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot)\n this.#uflag = this.#uflag || uflag\n return re\n })\n .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n .join('|')\n }\n\n static #parseGlob(\n glob: string,\n hasMagic: boolean | undefined,\n noEmpty: boolean = false,\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n let escaping = false\n let re = ''\n let uflag = false\n // multiple stars that aren't globstars coalesce into one *\n let inStar = false\n for (let i = 0; i < glob.length; i++) {\n const c = glob.charAt(i)\n if (escaping) {\n escaping = false\n re += (reSpecials.has(c) ? '\\\\' : '') + c\n continue\n }\n if (c === '*') {\n if (inStar) continue\n inStar = true\n re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star\n hasMagic = true\n continue\n } else {\n inStar = false\n }\n if (c === '\\\\') {\n if (i === glob.length - 1) {\n re += '\\\\\\\\'\n } else {\n escaping = true\n }\n continue\n }\n if (c === '[') {\n const [src, needUflag, consumed, magic] = parseClass(glob, i)\n if (consumed) {\n re += src\n uflag = uflag || needUflag\n i += consumed - 1\n hasMagic = hasMagic || magic\n continue\n }\n }\n if (c === '?') {\n re += qmark\n hasMagic = true\n continue\n }\n re += regExpEscape(c)\n }\n return [re, unescape(glob), !!hasMagic, uflag]\n }\n}\n", "import { MinimatchOptions } from './index.js'\n\n/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link MinimatchOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character. In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n *\n * If the {@link MinimatchOptions.magicalBraces} option is used,\n * then braces (`{` and `}`) will be escaped.\n */\nexport const escape = (\n s: string,\n {\n windowsPathsNoEscape = false,\n magicalBraces = false,\n }: Pick = {},\n) => {\n // don't need to escape +@! because we escape the parens\n // that make those magic, and escaping ! as [!] isn't valid,\n // because [!]] is a valid glob class meaning not ']'.\n if (magicalBraces) {\n return windowsPathsNoEscape ?\n s.replace(/[?*()[\\]{}]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\{}]/g, '\\\\$&')\n }\n return windowsPathsNoEscape ?\n s.replace(/[?*()[\\]]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&')\n}\n", "import { expand } from 'brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport { AST, ExtglobType } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\nexport type Platform =\n | 'aix'\n | 'android'\n | 'darwin'\n | 'freebsd'\n | 'haiku'\n | 'linux'\n | 'openbsd'\n | 'sunos'\n | 'win32'\n | 'cygwin'\n | 'netbsd'\n\nexport interface MinimatchOptions {\n /** do not expand `{x,y}` style braces */\n nobrace?: boolean\n /** do not treat patterns starting with `#` as a comment */\n nocomment?: boolean\n /** do not treat patterns starting with `!` as a negation */\n nonegate?: boolean\n /** print LOTS of debugging output */\n debug?: boolean\n /** treat `**` the same as `*` */\n noglobstar?: boolean\n /** do not expand extglobs like `+(a|b)` */\n noext?: boolean\n /** return the pattern if nothing matches */\n nonull?: boolean\n /** treat `\\\\` as a path separator, not an escape character */\n windowsPathsNoEscape?: boolean\n /**\n * inverse of {@link MinimatchOptions.windowsPathsNoEscape}\n * @deprecated\n */\n allowWindowsEscape?: boolean\n /**\n * Compare a partial path to a pattern. As long as the parts\n * of the path that are present are not contradicted by the\n * pattern, it will be treated as a match. This is useful in\n * applications where you're walking through a folder structure,\n * and don't yet have the full path, but want to ensure that you\n * do not walk down paths that can never be a match.\n */\n partial?: boolean\n /** allow matches that start with `.` even if the pattern does not */\n dot?: boolean\n /** ignore case */\n nocase?: boolean\n /** ignore case only in wildcard patterns */\n nocaseMagicOnly?: boolean\n /** consider braces to be \"magic\" for the purpose of `hasMagic` */\n magicalBraces?: boolean\n /**\n * If set, then patterns without slashes will be matched\n * against the basename of the path if it contains slashes.\n * For example, `a?b` would match the path `/xyz/123/acb`, but\n * not `/xyz/acb/123`.\n */\n matchBase?: boolean\n /** invert the results of negated matches */\n flipNegate?: boolean\n /** do not collapse multiple `/` into a single `/` */\n preserveMultipleSlashes?: boolean\n /**\n * A number indicating the level of optimization that should be done\n * to the pattern prior to parsing and using it for matches.\n */\n optimizationLevel?: number\n /** operating system platform */\n platform?: Platform\n /**\n * When a pattern starts with a UNC path or drive letter, and in\n * `nocase:true` mode, do not convert the root portions of the\n * pattern into a case-insensitive regular expression, and instead\n * leave them as strings.\n *\n * This is the default when the platform is `win32` and\n * `nocase:true` is set.\n */\n windowsNoMagicRoot?: boolean\n /**\n * max number of `{...}` patterns to expand. Default 100_000.\n */\n braceExpandMax?: number\n}\n\nexport const minimatch = (\n p: string,\n pattern: string,\n options: MinimatchOptions = {},\n) => {\n assertValidPattern(pattern)\n\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false\n }\n\n return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n ext = ext.toLowerCase()\n return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n ext = ext.toLowerCase()\n return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) =>\n !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) =>\n f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) =>\n f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExt([$0])\n if (!ext) return noext\n ext = ext.toLowerCase()\n return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExtDot([$0])\n if (!ext) return noext\n ext = ext.toLowerCase()\n return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExtDot([$0])\n return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExt([$0])\n return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n const len = $0.length\n return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n const len = $0.length\n return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n typeof process === 'object' && process ?\n (typeof process.env === 'object' &&\n process.env &&\n process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n process.platform\n : 'posix') as Platform\n\nexport type Sep = '\\\\' | '/'\n\nconst path: { [k: string]: { sep: Sep } } = {\n win32: { sep: '\\\\' },\n posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep =\n defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n (pattern: string, options: MinimatchOptions = {}) =>\n (p: string) =>\n minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch\n }\n\n const orig = minimatch\n\n const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n orig(p, pattern, ext(def, options))\n\n return Object.assign(m, {\n Minimatch: class Minimatch extends orig.Minimatch {\n constructor(pattern: string, options: MinimatchOptions = {}) {\n super(pattern, ext(def, options))\n }\n static defaults(options: MinimatchOptions) {\n return orig.defaults(ext(def, options)).Minimatch\n }\n },\n\n AST: class AST extends orig.AST {\n /* c8 ignore start */\n constructor(\n type: ExtglobType | null,\n parent?: AST,\n options: MinimatchOptions = {},\n ) {\n super(type, parent, ext(def, options))\n }\n /* c8 ignore stop */\n\n static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n return orig.AST.fromGlob(pattern, ext(def, options))\n }\n },\n\n unescape: (\n s: string,\n options: Pick<\n MinimatchOptions,\n 'windowsPathsNoEscape' | 'magicalBraces'\n > = {},\n ) => orig.unescape(s, ext(def, options)),\n\n escape: (\n s: string,\n options: Pick<\n MinimatchOptions,\n 'windowsPathsNoEscape' | 'magicalBraces'\n > = {},\n ) => orig.escape(s, ext(def, options)),\n\n filter: (pattern: string, options: MinimatchOptions = {}) =>\n orig.filter(pattern, ext(def, options)),\n\n defaults: (options: MinimatchOptions) =>\n orig.defaults(ext(def, options)),\n\n makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n orig.makeRe(pattern, ext(def, options)),\n\n braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n orig.braceExpand(pattern, ext(def, options)),\n\n match: (\n list: string[],\n pattern: string,\n options: MinimatchOptions = {},\n ) => orig.match(list, pattern, ext(def, options)),\n\n sep: orig.sep,\n GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n pattern: string,\n options: MinimatchOptions = {},\n) => {\n assertValidPattern(pattern)\n\n // Thanks to Yeting Li for\n // improving this regexp to avoid a ReDOS vulnerability.\n if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n // shortcut. no need to expand.\n return [pattern]\n }\n\n return expand(pattern, { max: options.braceExpandMax })\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n list: string[],\n pattern: string,\n options: MinimatchOptions = {},\n) => {\n const mm = new Minimatch(pattern, options)\n list = list.filter(f => mm.match(f))\n if (mm.options.nonull && !list.length) {\n list.push(pattern)\n }\n return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n _src?: string\n _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n options: MinimatchOptions\n set: ParseReturnFiltered[][]\n pattern: string\n\n windowsPathsNoEscape: boolean\n nonegate: boolean\n negate: boolean\n comment: boolean\n empty: boolean\n preserveMultipleSlashes: boolean\n partial: boolean\n globSet: string[]\n globParts: string[][]\n nocase: boolean\n\n isWindows: boolean\n platform: Platform\n windowsNoMagicRoot: boolean\n\n regexp: false | null | MMRegExp\n constructor(pattern: string, options: MinimatchOptions = {}) {\n assertValidPattern(pattern)\n\n options = options || {}\n this.options = options\n this.pattern = pattern\n this.platform = options.platform || defaultPlatform\n this.isWindows = this.platform === 'win32'\n // avoid the annoying deprecation flag lol\n const awe = ('allowWindow' + 'sEscape') as keyof MinimatchOptions\n this.windowsPathsNoEscape =\n !!options.windowsPathsNoEscape || options[awe] === false\n if (this.windowsPathsNoEscape) {\n this.pattern = this.pattern.replace(/\\\\/g, '/')\n }\n this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n this.regexp = null\n this.negate = false\n this.nonegate = !!options.nonegate\n this.comment = false\n this.empty = false\n this.partial = !!options.partial\n this.nocase = !!this.options.nocase\n this.windowsNoMagicRoot =\n options.windowsNoMagicRoot !== undefined ?\n options.windowsNoMagicRoot\n : !!(this.isWindows && this.nocase)\n\n this.globSet = []\n this.globParts = []\n this.set = []\n\n // make the set of regexps etc.\n this.make()\n }\n\n hasMagic(): boolean {\n if (this.options.magicalBraces && this.set.length > 1) {\n return true\n }\n for (const pattern of this.set) {\n for (const part of pattern) {\n if (typeof part !== 'string') return true\n }\n }\n return false\n }\n\n debug(..._: any[]) {}\n\n make() {\n const pattern = this.pattern\n const options = this.options\n\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true\n return\n }\n\n if (!pattern) {\n this.empty = true\n return\n }\n\n // step 1: figure out negation, etc.\n this.parseNegate()\n\n // step 2: expand braces\n this.globSet = [...new Set(this.braceExpand())]\n\n if (options.debug) {\n this.debug = (...args: any[]) => console.error(...args)\n }\n\n this.debug(this.pattern, this.globSet)\n\n // step 3: now we have a set, so turn each one into a series of\n // path-portion matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n //\n // First, we preprocess to make the glob pattern sets a bit simpler\n // and deduped. There are some perf-killing patterns that can cause\n // problems with a glob walk, but we can simplify them down a bit.\n const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n this.globParts = this.preprocess(rawGlobParts)\n this.debug(this.pattern, this.globParts)\n\n // glob --> regexps\n let set = this.globParts.map((s, _, __) => {\n if (this.isWindows && this.windowsNoMagicRoot) {\n // check if it's a drive or unc path.\n const isUNC =\n s[0] === '' &&\n s[1] === '' &&\n (s[2] === '?' || !globMagic.test(s[2])) &&\n !globMagic.test(s[3])\n const isDrive = /^[a-z]:/i.test(s[0])\n if (isUNC) {\n return [\n ...s.slice(0, 4),\n ...s.slice(4).map(ss => this.parse(ss)),\n ]\n } else if (isDrive) {\n return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n }\n }\n return s.map(ss => this.parse(ss))\n })\n\n this.debug(this.pattern, set)\n\n // filter out everything that didn't compile properly.\n this.set = set.filter(\n s => s.indexOf(false) === -1,\n ) as ParseReturnFiltered[][]\n\n // do not treat the ? in UNC paths as magic\n if (this.isWindows) {\n for (let i = 0; i < this.set.length; i++) {\n const p = this.set[i]\n if (\n p[0] === '' &&\n p[1] === '' &&\n this.globParts[i][2] === '?' &&\n typeof p[3] === 'string' &&\n /^[a-z]:$/i.test(p[3])\n ) {\n p[2] = '?'\n }\n }\n }\n\n this.debug(this.pattern, this.set)\n }\n\n // various transforms to equivalent pattern sets that are\n // faster to process in a filesystem walk. The goal is to\n // eliminate what we can, and push all ** patterns as far\n // to the right as possible, even if it increases the number\n // of patterns that we have to process.\n preprocess(globParts: string[][]) {\n // if we're not in globstar mode, then turn ** into *\n if (this.options.noglobstar) {\n for (let i = 0; i < globParts.length; i++) {\n for (let j = 0; j < globParts[i].length; j++) {\n if (globParts[i][j] === '**') {\n globParts[i][j] = '*'\n }\n }\n }\n }\n\n const { optimizationLevel = 1 } = this.options\n\n if (optimizationLevel >= 2) {\n // aggressive optimization for the purpose of fs walking\n globParts = this.firstPhasePreProcess(globParts)\n globParts = this.secondPhasePreProcess(globParts)\n } else if (optimizationLevel >= 1) {\n // just basic optimizations to remove some .. parts\n globParts = this.levelOneOptimize(globParts)\n } else {\n // just collapse multiple ** portions into one\n globParts = this.adjascentGlobstarOptimize(globParts)\n }\n\n return globParts\n }\n\n // just get rid of adjascent ** portions\n adjascentGlobstarOptimize(globParts: string[][]) {\n return globParts.map(parts => {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let i = gs\n while (parts[i + 1] === '**') {\n i++\n }\n if (i !== gs) {\n parts.splice(gs, i - gs)\n }\n }\n return parts\n })\n }\n\n // get rid of adjascent ** and resolve .. portions\n levelOneOptimize(globParts: string[][]) {\n return globParts.map(parts => {\n parts = parts.reduce((set: string[], part) => {\n const prev = set[set.length - 1]\n if (part === '**' && prev === '**') {\n return set\n }\n if (part === '..') {\n if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n set.pop()\n return set\n }\n }\n set.push(part)\n return set\n }, [])\n return parts.length === 0 ? [''] : parts\n })\n }\n\n levelTwoFileOptimize(parts: string | string[]) {\n if (!Array.isArray(parts)) {\n parts = this.slashSplit(parts)\n }\n let didSomething: boolean = false\n do {\n didSomething = false\n //

// -> 
/\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
/

/../ ->

/\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (p && p !== '.' && p !== '..' && p !== '**') {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
 is 1 or more portions\n  //  is 1 or more portions\n  // 

is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n //

// -> 
/\n  // 
/

/../ ->

/\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

/**/**/ -> 
/**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
// -> 
/\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
/

/../ ->

/\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
/*/,
/

/} ->

/*/\n  // {
/,
/} -> 
/\n  // {
/**/,
/} -> 
/**/\n  //\n  // {
/**/,
/**/

/} ->

/**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes,\n        )\n        if (matched) {\n          globParts[i] = []\n          globParts[j] = matched\n          break\n        }\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false,\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(\n    file: string[],\n    pattern: ParseReturn[],\n    partial: boolean = false,\n  ) {\n    const options = this.options\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive =\n        typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi =\n        fileUNC ? 3\n        : fileDrive ? 0\n        : undefined\n      const pdi =\n        patternUNC ? 3\n        : patternDrive ? 0\n        : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [\n          file[fdi],\n          pattern[pdi] as string,\n        ]\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          if (pdi > fdi) {\n            pattern = pattern.slice(pdi)\n          } else if (fdi > pdi) {\n            file = file.slice(fdi)\n          }\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // don't need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    this.debug('matchOne', this, { file, pattern })\n    this.debug('matchOne', file.length, pattern.length)\n\n    for (\n      var fi = 0, pi = 0, fl = file.length, pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      var p = pattern[pi]\n      var f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      if (p === GLOBSTAR) {\n        this.debug('GLOBSTAR', [pattern, p, f])\n\n        // \"**\"\n        // a/**/b/**/c would match the following:\n        // a/b/x/y/z/c\n        // a/x/y/z/b/c\n        // a/b/x/b/x/c\n        // a/b/c\n        // To do this, take the rest of the pattern after\n        // the **, and see if it would match the file remainder.\n        // If so, return success.\n        // If not, the ** \"swallows\" a segment, and try again.\n        // This is recursively awful.\n        //\n        // a/**/b/**/c matching a/b/x/y/z/c\n        // - a matches a\n        // - doublestar\n        //   - matchOne(b/x/y/z/c, b/**/c)\n        //     - b matches b\n        //     - doublestar\n        //       - matchOne(x/y/z/c, c) -> no\n        //       - matchOne(y/z/c, c) -> no\n        //       - matchOne(z/c, c) -> no\n        //       - matchOne(c, c) yes, hit\n        var fr = fi\n        var pr = pi + 1\n        if (pr === pl) {\n          this.debug('** at the end')\n          // a ** at the end will just swallow the rest.\n          // We have found a match.\n          // however, it will not swallow /.x, unless\n          // options.dot is set.\n          // . and .. are *never* matched by **, for explosively\n          // exponential reasons.\n          for (; fi < fl; fi++) {\n            if (\n              file[fi] === '.' ||\n              file[fi] === '..' ||\n              (!options.dot && file[fi].charAt(0) === '.')\n            )\n              return false\n          }\n          return true\n        }\n\n        // ok, let's see if we can swallow whatever we can.\n        while (fr < fl) {\n          var swallowee = file[fr]\n\n          this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n          // XXX remove this slice.  Just pass the start index.\n          if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n            this.debug('globstar found match!', fr, fl, swallowee)\n            // found a match.\n            return true\n          } else {\n            // can't swallow \".\" or \"..\" ever.\n            // can only swallow \".foo\" when explicitly asked.\n            if (\n              swallowee === '.' ||\n              swallowee === '..' ||\n              (!options.dot && swallowee.charAt(0) === '.')\n            ) {\n              this.debug('dot detected!', file, fr, pattern, pr)\n              break\n            }\n\n            // ** swallows a segment, and continue.\n            this.debug('globstar swallow a segment, and continue')\n            fr++\n          }\n        }\n\n        // no match was found.\n        // However, in partial mode, we can't say this is necessarily over.\n        /* c8 ignore start */\n        if (partial) {\n          // ran out of file\n          this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n          if (fr === fl) {\n            return true\n          }\n        }\n        /* c8 ignore stop */\n        return false\n      }\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase ?\n          options.dot ?\n            starDotExtTestNocaseDot\n          : starDotExtTestNocase\n        : options.dot ? starDotExtTestDot\n        : starDotExtTest)(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase ?\n          options.dot ?\n            qmarksTestNocaseDot\n          : qmarksTestNocase\n        : options.dot ? qmarksTestDot\n        : qmarksTest)(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar =\n      options.noglobstar ? star\n      : options.dot ? twoStarDot\n      : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return (\n            typeof p === 'string' ? regExpEscape(p)\n            : p === GLOBSTAR ? GLOBSTAR\n            : p._src\n          )\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        const filtered = pp.filter(p => p !== GLOBSTAR)\n\n        // For partial matches, we need to make the pattern match\n        // any prefix of the full path. We do this by generating\n        // alternative patterns that match progressively longer prefixes.\n        if (this.partial && filtered.length >= 1) {\n          const prefixes: string[] = []\n          for (let i = 1; i <= filtered.length; i++) {\n            prefixes.push(filtered.slice(0, i).join('/'))\n          }\n          return '(?:' + prefixes.join('|') + ')'\n        }\n\n        return filtered.join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // In partial mode, '/' should always match as it's a valid prefix for any pattern\n    if (this.partial) {\n      re = '^(?:\\\\/|' + open + re.slice(1, -1) + close + ')$'\n    }\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch (ex) {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (let i = 0; i < set.length; i++) {\n      const pattern = set[i]\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n", "import { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport { fileURLToPath } from 'node:url'\nimport {\n  FSOption,\n  Path,\n  PathScurry,\n  PathScurryDarwin,\n  PathScurryPosix,\n  PathScurryWin32,\n} from 'path-scurry'\nimport { IgnoreLike } from './ignore.js'\nimport { Pattern } from './pattern.js'\nimport { GlobStream, GlobWalker } from './walker.js'\n\nexport type MatchSet = Minimatch['set']\nexport type GlobParts = Exclude\n\n// if no process global, just call it linux.\n// so we default to case-sensitive, / separators\nconst defaultPlatform: NodeJS.Platform =\n  (\n    typeof process === 'object' &&\n    process &&\n    typeof process.platform === 'string'\n  ) ?\n    process.platform\n  : 'linux'\n\n/**\n * A `GlobOptions` object may be provided to any of the exported methods, and\n * must be provided to the `Glob` constructor.\n *\n * All options are optional, boolean, and false by default, unless otherwise\n * noted.\n *\n * All resolved options are added to the Glob object as properties.\n *\n * If you are running many `glob` operations, you can pass a Glob object as the\n * `options` argument to a subsequent operation to share the previously loaded\n * cache.\n */\nexport interface GlobOptions {\n  /**\n   * Set to `true` to always receive absolute paths for\n   * matched files. Set to `false` to always return relative paths.\n   *\n   * When this option is not set, absolute paths are returned for patterns\n   * that are absolute, and otherwise paths are returned that are relative\n   * to the `cwd` setting.\n   *\n   * This does _not_ make an extra system call to get\n   * the realpath, it only does string path resolution.\n   *\n   * Conflicts with {@link withFileTypes}\n   */\n  absolute?: boolean\n\n  /**\n   * Set to false to enable {@link windowsPathsNoEscape}\n   *\n   * @deprecated\n   */\n  allowWindowsEscape?: boolean\n\n  /**\n   * The current working directory in which to search. Defaults to\n   * `process.cwd()`.\n   *\n   * May be eiher a string path or a `file://` URL object or string.\n   */\n  cwd?: string | URL\n\n  /**\n   * Include `.dot` files in normal matches and `globstar`\n   * matches. Note that an explicit dot in a portion of the pattern\n   * will always match dot files.\n   */\n  dot?: boolean\n\n  /**\n   * Prepend all relative path strings with `./` (or `.\\` on Windows).\n   *\n   * Without this option, returned relative paths are \"bare\", so instead of\n   * returning `'./foo/bar'`, they are returned as `'foo/bar'`.\n   *\n   * Relative patterns starting with `'../'` are not prepended with `./`, even\n   * if this option is set.\n   */\n  dotRelative?: boolean\n\n  /**\n   * Follow symlinked directories when expanding `**`\n   * patterns. This can result in a lot of duplicate references in\n   * the presence of cyclic links, and make performance quite bad.\n   *\n   * By default, a `**` in a pattern will follow 1 symbolic link if\n   * it is not the first item in the pattern, or none if it is the\n   * first item in the pattern, following the same behavior as Bash.\n   */\n  follow?: boolean\n\n  /**\n   * string or string[], or an object with `ignored` and `childrenIgnored`\n   * methods.\n   *\n   * If a string or string[] is provided, then this is treated as a glob\n   * pattern or array of glob patterns to exclude from matches. To ignore all\n   * children within a directory, as well as the entry itself, append `'/**'`\n   * to the ignore pattern.\n   *\n   * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of\n   * any other settings.\n   *\n   * If an object is provided that has `ignored(path)` and/or\n   * `childrenIgnored(path)` methods, then these methods will be called to\n   * determine whether any Path is a match or if its children should be\n   * traversed, respectively.\n   */\n  ignore?: string | string[] | IgnoreLike\n\n  /**\n   * Treat brace expansion like `{a,b}` as a \"magic\" pattern. Has no\n   * effect if {@link nobrace} is set.\n   *\n   * Only has effect on the {@link hasMagic} function.\n   */\n  magicalBraces?: boolean\n\n  /**\n   * Add a `/` character to directory matches. Note that this requires\n   * additional stat calls in some cases.\n   */\n  mark?: boolean\n\n  /**\n   * Perform a basename-only match if the pattern does not contain any slash\n   * characters. That is, `*.js` would be treated as equivalent to\n   * `**\\/*.js`, matching all js files in all directories.\n   */\n  matchBase?: boolean\n\n  /**\n   * Limit the directory traversal to a given depth below the cwd.\n   * Note that this does NOT prevent traversal to sibling folders,\n   * root patterns, and so on. It only limits the maximum folder depth\n   * that the walk will descend, relative to the cwd.\n   */\n  maxDepth?: number\n\n  /**\n   * Do not expand `{a,b}` and `{1..3}` brace sets.\n   */\n  nobrace?: boolean\n\n  /**\n   * Perform a case-insensitive match. This defaults to `true` on macOS and\n   * Windows systems, and `false` on all others.\n   *\n   * **Note** `nocase` should only be explicitly set when it is\n   * known that the filesystem's case sensitivity differs from the\n   * platform default. If set `true` on case-sensitive file\n   * systems, or `false` on case-insensitive file systems, then the\n   * walk may return more or less results than expected.\n   */\n  nocase?: boolean\n\n  /**\n   * Do not match directories, only files. (Note: to match\n   * _only_ directories, put a `/` at the end of the pattern.)\n   */\n  nodir?: boolean\n\n  /**\n   * Do not match \"extglob\" patterns such as `+(a|b)`.\n   */\n  noext?: boolean\n\n  /**\n   * Do not match `**` against multiple filenames. (Ie, treat it as a normal\n   * `*` instead.)\n   *\n   * Conflicts with {@link matchBase}\n   */\n  noglobstar?: boolean\n\n  /**\n   * Defaults to value of `process.platform` if available, or `'linux'` if\n   * not. Setting `platform:'win32'` on non-Windows systems may cause strange\n   * behavior.\n   */\n  platform?: NodeJS.Platform\n\n  /**\n   * Set to true to call `fs.realpath` on all of the\n   * results. In the case of an entry that cannot be resolved, the\n   * entry is omitted. This incurs a slight performance penalty, of\n   * course, because of the added system calls.\n   */\n  realpath?: boolean\n\n  /**\n   *\n   * A string path resolved against the `cwd` option, which\n   * is used as the starting point for absolute patterns that start\n   * with `/`, (but not drive letters or UNC paths on Windows).\n   *\n   * Note that this _doesn't_ necessarily limit the walk to the\n   * `root` directory, and doesn't affect the cwd starting point for\n   * non-absolute patterns. A pattern containing `..` will still be\n   * able to traverse out of the root directory, if it is not an\n   * actual root directory on the filesystem, and any non-absolute\n   * patterns will be matched in the `cwd`. For example, the\n   * pattern `/../*` with `{root:'/some/path'}` will return all\n   * files in `/some`, not all files in `/some/path`. The pattern\n   * `*` with `{root:'/some/path'}` will return all the entries in\n   * the cwd, not the entries in `/some/path`.\n   *\n   * To start absolute and non-absolute patterns in the same\n   * path, you can use `{root:''}`. However, be aware that on\n   * Windows systems, a pattern like `x:/*` or `//host/share/*` will\n   * _always_ start in the `x:/` or `//host/share` directory,\n   * regardless of the `root` setting.\n   */\n  root?: string\n\n  /**\n   * A [PathScurry](http://npm.im/path-scurry) object used\n   * to traverse the file system. If the `nocase` option is set\n   * explicitly, then any provided `scurry` object must match this\n   * setting.\n   */\n  scurry?: PathScurry\n\n  /**\n   * Call `lstat()` on all entries, whether required or not to determine\n   * if it's a valid match. When used with {@link withFileTypes}, this means\n   * that matches will include data such as modified time, permissions, and\n   * so on.  Note that this will incur a performance cost due to the added\n   * system calls.\n   */\n  stat?: boolean\n\n  /**\n   * An AbortSignal which will cancel the Glob walk when\n   * triggered.\n   */\n  signal?: AbortSignal\n\n  /**\n   * Use `\\\\` as a path separator _only_, and\n   *  _never_ as an escape character. If set, all `\\\\` characters are\n   *  replaced with `/` in the pattern.\n   *\n   *  Note that this makes it **impossible** to match against paths\n   *  containing literal glob pattern characters, but allows matching\n   *  with patterns constructed using `path.join()` and\n   *  `path.resolve()` on Windows platforms, mimicking the (buggy!)\n   *  behavior of Glob v7 and before on Windows. Please use with\n   *  caution, and be mindful of [the caveat below about Windows\n   *  paths](#windows). (For legacy reasons, this is also set if\n   *  `allowWindowsEscape` is set to the exact value `false`.)\n   */\n  windowsPathsNoEscape?: boolean\n\n  /**\n   * Return [PathScurry](http://npm.im/path-scurry)\n   * `Path` objects instead of strings. These are similar to a\n   * NodeJS `Dirent` object, but with additional methods and\n   * properties.\n   *\n   * Conflicts with {@link absolute}\n   */\n  withFileTypes?: boolean\n\n  /**\n   * An fs implementation to override some or all of the defaults.  See\n   * http://npm.im/path-scurry for details about what can be overridden.\n   */\n  fs?: FSOption\n\n  /**\n   * Just passed along to Minimatch.  Note that this makes all pattern\n   * matching operations slower and *extremely* noisy.\n   */\n  debug?: boolean\n\n  /**\n   * Return `/` delimited paths, even on Windows.\n   *\n   * On posix systems, this has no effect.  But, on Windows, it means that\n   * paths will be `/` delimited, and absolute paths will be their full\n   * resolved UNC forms, eg instead of `'C:\\\\foo\\\\bar'`, it would return\n   * `'//?/C:/foo/bar'`\n   */\n  posix?: boolean\n\n  /**\n   * Do not match any children of any matches. For example, the pattern\n   * `**\\/foo` would match `a/foo`, but not `a/foo/b/foo` in this mode.\n   *\n   * This is especially useful for cases like \"find all `node_modules`\n   * folders, but not the ones in `node_modules`\".\n   *\n   * In order to support this, the `Ignore` implementation must support an\n   * `add(pattern: string)` method. If using the default `Ignore` class, then\n   * this is fine, but if this is set to `false`, and a custom `Ignore` is\n   * provided that does not have an `add()` method, then it will throw an\n   * error.\n   *\n   * **Caveat** It *only* ignores matches that would be a descendant of a\n   * previous match, and only if that descendant is matched *after* the\n   * ancestor is encountered. Since the file system walk happens in\n   * indeterminate order, it's possible that a match will already be added\n   * before its ancestor, if multiple or braced patterns are used.\n   *\n   * For example:\n   *\n   * ```ts\n   * const results = await glob([\n   *   // likely to match first, since it's just a stat\n   *   'a/b/c/d/e/f',\n   *\n   *   // this pattern is more complicated! It must to various readdir()\n   *   // calls and test the results against a regular expression, and that\n   *   // is certainly going to take a little bit longer.\n   *   //\n   *   // So, later on, it encounters a match at 'a/b/c/d/e', but it's too\n   *   // late to ignore a/b/c/d/e/f, because it's already been emitted.\n   *   'a/[bdf]/?/[a-z]/*',\n   * ], { includeChildMatches: false })\n   * ```\n   *\n   * It's best to only set this to `false` if you can be reasonably sure that\n   * no components of the pattern will potentially match one another's file\n   * system descendants, or if the occasional included child entry will not\n   * cause problems.\n   *\n   * @default true\n   */\n  includeChildMatches?: boolean\n\n  /**\n   * max number of `{...}` patterns to expand. Default `1_000`.\n   *\n   * Note: this is much less than minimatch's default of `100_000`,\n   * because Glob has higher memory requirements due to walking\n   * the file system tree.\n   */\n  braceExpandMax?: number\n}\n\nexport type GlobOptionsWithFileTypesTrue = GlobOptions & {\n  withFileTypes: true\n  // string options not relevant if returning Path objects.\n  absolute?: undefined\n  mark?: undefined\n  posix?: undefined\n}\n\nexport type GlobOptionsWithFileTypesFalse = GlobOptions & {\n  withFileTypes?: false\n}\n\nexport type GlobOptionsWithFileTypesUnset = GlobOptions & {\n  withFileTypes?: undefined\n}\n\nexport type Result =\n  Opts extends GlobOptionsWithFileTypesTrue ? Path\n  : Opts extends GlobOptionsWithFileTypesFalse ? string\n  : Opts extends GlobOptionsWithFileTypesUnset ? string\n  : string | Path\nexport type Results = Result[]\n\nexport type FileTypes =\n  Opts extends GlobOptionsWithFileTypesTrue ? true\n  : Opts extends GlobOptionsWithFileTypesFalse ? false\n  : Opts extends GlobOptionsWithFileTypesUnset ? false\n  : boolean\n\n/**\n * An object that can perform glob pattern traversals.\n */\nexport class Glob implements GlobOptions {\n  absolute?: boolean\n  cwd: string\n  root?: string\n  dot: boolean\n  dotRelative: boolean\n  follow: boolean\n  ignore?: string | string[] | IgnoreLike\n  magicalBraces: boolean\n  mark?: boolean\n  matchBase: boolean\n  maxDepth: number\n  nobrace: boolean\n  nocase: boolean\n  nodir: boolean\n  noext: boolean\n  noglobstar: boolean\n  pattern: string[]\n  platform: NodeJS.Platform\n  realpath: boolean\n  scurry: PathScurry\n  stat: boolean\n  signal?: AbortSignal\n  windowsPathsNoEscape: boolean\n  withFileTypes: FileTypes\n  includeChildMatches: boolean\n\n  /**\n   * The options provided to the constructor.\n   */\n  opts: Opts\n\n  /**\n   * An array of parsed immutable {@link Pattern} objects.\n   */\n  patterns: Pattern[]\n\n  /**\n   * All options are stored as properties on the `Glob` object.\n   *\n   * See {@link GlobOptions} for full options descriptions.\n   *\n   * Note that a previous `Glob` object can be passed as the\n   * `GlobOptions` to another `Glob` instantiation to re-use settings\n   * and caches with a new pattern.\n   *\n   * Traversal functions can be called multiple times to run the walk\n   * again.\n   */\n  constructor(pattern: string | string[], opts: Opts) {\n    /* c8 ignore start */\n    if (!opts) throw new TypeError('glob options required')\n    /* c8 ignore stop */\n    this.withFileTypes = !!opts.withFileTypes as FileTypes\n    this.signal = opts.signal\n    this.follow = !!opts.follow\n    this.dot = !!opts.dot\n    this.dotRelative = !!opts.dotRelative\n    this.nodir = !!opts.nodir\n    this.mark = !!opts.mark\n    if (!opts.cwd) {\n      this.cwd = ''\n    } else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {\n      opts.cwd = fileURLToPath(opts.cwd)\n    }\n    this.cwd = opts.cwd || ''\n    this.root = opts.root\n    this.magicalBraces = !!opts.magicalBraces\n    this.nobrace = !!opts.nobrace\n    this.noext = !!opts.noext\n    this.realpath = !!opts.realpath\n    this.absolute = opts.absolute\n    this.includeChildMatches = opts.includeChildMatches !== false\n\n    this.noglobstar = !!opts.noglobstar\n    this.matchBase = !!opts.matchBase\n    this.maxDepth =\n      typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity\n    this.stat = !!opts.stat\n    this.ignore = opts.ignore\n\n    if (this.withFileTypes && this.absolute !== undefined) {\n      throw new Error('cannot set absolute and withFileTypes:true')\n    }\n\n    if (typeof pattern === 'string') {\n      pattern = [pattern]\n    }\n\n    this.windowsPathsNoEscape =\n      !!opts.windowsPathsNoEscape ||\n      (opts as { allowWindowsEscape?: boolean }).allowWindowsEscape ===\n        false\n\n    if (this.windowsPathsNoEscape) {\n      pattern = pattern.map(p => p.replace(/\\\\/g, '/'))\n    }\n\n    if (this.matchBase) {\n      if (opts.noglobstar) {\n        throw new TypeError('base matching requires globstar')\n      }\n      pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`))\n    }\n\n    this.pattern = pattern\n\n    this.platform = opts.platform || defaultPlatform\n    this.opts = { ...opts, platform: this.platform }\n    if (opts.scurry) {\n      this.scurry = opts.scurry\n      if (\n        opts.nocase !== undefined &&\n        opts.nocase !== opts.scurry.nocase\n      ) {\n        throw new Error('nocase option contradicts provided scurry option')\n      }\n    } else {\n      const Scurry =\n        opts.platform === 'win32' ? PathScurryWin32\n        : opts.platform === 'darwin' ? PathScurryDarwin\n        : opts.platform ? PathScurryPosix\n        : PathScurry\n      this.scurry = new Scurry(this.cwd, {\n        nocase: opts.nocase,\n        fs: opts.fs,\n      })\n    }\n    this.nocase = this.scurry.nocase\n\n    // If you do nocase:true on a case-sensitive file system, then\n    // we need to use regexps instead of strings for non-magic\n    // path portions, because statting `aBc` won't return results\n    // for the file `AbC` for example.\n    const nocaseMagicOnly =\n      this.platform === 'darwin' || this.platform === 'win32'\n\n    const mmo: MinimatchOptions = {\n      braceExpandMax: 10_000,\n      ...opts,\n      dot: this.dot,\n      matchBase: this.matchBase,\n      nobrace: this.nobrace,\n      // default nocase based on platform\n      nocase: this.nocase,\n      nocaseMagicOnly,\n      nocomment: true,\n      noext: this.noext,\n      nonegate: true,\n      optimizationLevel: 2,\n      platform: this.platform,\n      windowsPathsNoEscape: this.windowsPathsNoEscape,\n      debug: !!this.opts.debug,\n    }\n\n    const mms = this.pattern.map(p => new Minimatch(p, mmo))\n    const [matchSet, globParts] = mms.reduce(\n      (set: [MatchSet, GlobParts], m) => {\n        set[0].push(...m.set)\n        set[1].push(...m.globParts)\n        return set\n      },\n      [[], []],\n    )\n    this.patterns = matchSet.map((set, i) => {\n      const g = globParts[i]\n      /* c8 ignore start */\n      if (!g) throw new Error('invalid pattern object')\n      /* c8 ignore stop */\n      return new Pattern(set, g, 0, this.platform)\n    })\n  }\n\n  /**\n   * Returns a Promise that resolves to the results array.\n   */\n  async walk(): Promise>\n  async walk(): Promise<(string | Path)[]> {\n    // Walkers always return array of Path objects, so we just have to\n    // coerce them into the right shape.  It will have already called\n    // realpath() if the option was set to do so, so we know that's cached.\n    // start out knowing the cwd, at least\n    return [\n      ...(await new GlobWalker(this.patterns, this.scurry.cwd, {\n        ...this.opts,\n        maxDepth:\n          this.maxDepth !== Infinity ?\n            this.maxDepth + this.scurry.cwd.depth()\n          : Infinity,\n        platform: this.platform,\n        nocase: this.nocase,\n        includeChildMatches: this.includeChildMatches,\n      }).walk()),\n    ]\n  }\n\n  /**\n   * synchronous {@link Glob.walk}\n   */\n  walkSync(): Results\n  walkSync(): (string | Path)[] {\n    return [\n      ...new GlobWalker(this.patterns, this.scurry.cwd, {\n        ...this.opts,\n        maxDepth:\n          this.maxDepth !== Infinity ?\n            this.maxDepth + this.scurry.cwd.depth()\n          : Infinity,\n        platform: this.platform,\n        nocase: this.nocase,\n        includeChildMatches: this.includeChildMatches,\n      }).walkSync(),\n    ]\n  }\n\n  /**\n   * Stream results asynchronously.\n   */\n  stream(): Minipass, Result>\n  stream(): Minipass {\n    return new GlobStream(this.patterns, this.scurry.cwd, {\n      ...this.opts,\n      maxDepth:\n        this.maxDepth !== Infinity ?\n          this.maxDepth + this.scurry.cwd.depth()\n        : Infinity,\n      platform: this.platform,\n      nocase: this.nocase,\n      includeChildMatches: this.includeChildMatches,\n    }).stream()\n  }\n\n  /**\n   * Stream results synchronously.\n   */\n  streamSync(): Minipass, Result>\n  streamSync(): Minipass {\n    return new GlobStream(this.patterns, this.scurry.cwd, {\n      ...this.opts,\n      maxDepth:\n        this.maxDepth !== Infinity ?\n          this.maxDepth + this.scurry.cwd.depth()\n        : Infinity,\n      platform: this.platform,\n      nocase: this.nocase,\n      includeChildMatches: this.includeChildMatches,\n    }).streamSync()\n  }\n\n  /**\n   * Default sync iteration function. Returns a Generator that\n   * iterates over the results.\n   */\n  iterateSync(): Generator, void, void> {\n    return this.streamSync()[Symbol.iterator]()\n  }\n  [Symbol.iterator]() {\n    return this.iterateSync()\n  }\n\n  /**\n   * Default async iteration function. Returns an AsyncGenerator that\n   * iterates over the results.\n   */\n  iterate(): AsyncGenerator, void, void> {\n    return this.stream()[Symbol.asyncIterator]()\n  }\n  [Symbol.asyncIterator]() {\n    return this.iterate()\n  }\n}\n", "/**\n * @module LRUCache\n */\n\n// module-private names and types\n// this provides the default Perf object source.\n// it can be passed in via configuration to override it\n// for a single LRU object.\nexport type Perf = { now: () => number }\nconst defaultPerf: Perf =\n  (\n    typeof performance === 'object' &&\n    performance &&\n    typeof performance.now === 'function'\n  ) ?\n    performance\n  : Date\n\nconst warned = new Set()\n\n// either a function or a class\ntype ForC = ((...a: any[]) => any) | { new (...a: any[]): any }\n\n/* c8 ignore start */\nconst PROCESS = (\n  typeof process === 'object' && !!process ?\n    process\n  : {}) as { [k: string]: any }\n/* c8 ignore start */\n\nconst emitWarning = (\n  msg: string,\n  type: string,\n  code: string,\n  fn: ForC,\n) => {\n  typeof PROCESS.emitWarning === 'function' ?\n    PROCESS.emitWarning(msg, type, code, fn)\n  : console.error(`[${code}] ${type}: ${msg}`)\n}\n\nlet AC = globalThis.AbortController\nlet AS = globalThis.AbortSignal\n\n/* c8 ignore start */\nif (typeof AC === 'undefined') {\n  //@ts-ignore\n  AS = class AbortSignal {\n    onabort?: (...a: any[]) => any\n    _onabort: ((...a: any[]) => any)[] = []\n    reason?: any\n    aborted: boolean = false\n    addEventListener(_: string, fn: (...a: any[]) => any) {\n      this._onabort.push(fn)\n    }\n  }\n  //@ts-ignore\n  AC = class AbortController {\n    constructor() {\n      warnACPolyfill()\n    }\n    signal = new AS()\n    abort(reason: any) {\n      if (this.signal.aborted) return\n      //@ts-ignore\n      this.signal.reason = reason\n      //@ts-ignore\n      this.signal.aborted = true\n      //@ts-ignore\n      for (const fn of this.signal._onabort) {\n        fn(reason)\n      }\n      this.signal.onabort?.(reason)\n    }\n  }\n  let printACPolyfillWarning =\n    PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'\n  const warnACPolyfill = () => {\n    if (!printACPolyfillWarning) return\n    printACPolyfillWarning = false\n    emitWarning(\n      'AbortController is not defined. If using lru-cache in ' +\n        'node 14, load an AbortController polyfill from the ' +\n        '`node-abort-controller` package. A minimal polyfill is ' +\n        'provided for use by LRUCache.fetch(), but it should not be ' +\n        'relied upon in other contexts (eg, passing it to other APIs that ' +\n        'use AbortController/AbortSignal might have undesirable effects). ' +\n        'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.',\n      'NO_ABORT_CONTROLLER',\n      'ENOTSUP',\n      warnACPolyfill,\n    )\n  }\n}\n/* c8 ignore stop */\n\nconst shouldWarn = (code: string) => !warned.has(code)\n\nconst TYPE = Symbol('type')\nexport type PosInt = number & { [TYPE]: 'Positive Integer' }\nexport type Index = number & { [TYPE]: 'LRUCache Index' }\n\nconst isPosInt = (n: any): n is PosInt =>\n  n && n === Math.floor(n) && n > 0 && isFinite(n)\n\nexport type UintArray = Uint8Array | Uint16Array | Uint32Array\nexport type NumberArray = UintArray | number[]\n\n/* c8 ignore start */\n// This is a little bit ridiculous, tbh.\n// The maximum array length is 2^32-1 or thereabouts on most JS impls.\n// And well before that point, you're caching the entire world, I mean,\n// that's ~32GB of just integers for the next/prev links, plus whatever\n// else to hold that many keys and values.  Just filling the memory with\n// zeroes at init time is brutal when you get that big.\n// But why not be complete?\n// Maybe in the future, these limits will have expanded.\nconst getUintArray = (max: number) =>\n  !isPosInt(max) ? null\n  : max <= Math.pow(2, 8) ? Uint8Array\n  : max <= Math.pow(2, 16) ? Uint16Array\n  : max <= Math.pow(2, 32) ? Uint32Array\n  : max <= Number.MAX_SAFE_INTEGER ? ZeroArray\n  : null\n/* c8 ignore stop */\n\nclass ZeroArray extends Array {\n  constructor(size: number) {\n    super(size)\n    this.fill(0)\n  }\n}\nexport type { ZeroArray }\nexport type { Stack }\n\nexport type StackLike = Stack | Index[]\nclass Stack {\n  heap: NumberArray\n  length: number\n  // private constructor\n  static #constructing: boolean = false\n  static create(max: number): StackLike {\n    const HeapCls = getUintArray(max)\n    if (!HeapCls) return []\n    Stack.#constructing = true\n    const s = new Stack(max, HeapCls)\n    Stack.#constructing = false\n    return s\n  }\n  constructor(max: number, HeapCls: { new (n: number): NumberArray }) {\n    /* c8 ignore start */\n    if (!Stack.#constructing) {\n      throw new TypeError('instantiate Stack using Stack.create(n)')\n    }\n    /* c8 ignore stop */\n    this.heap = new HeapCls(max)\n    this.length = 0\n  }\n  push(n: Index) {\n    this.heap[this.length++] = n\n  }\n  pop(): Index {\n    return this.heap[--this.length] as Index\n  }\n}\n\n/**\n * Promise representing an in-progress {@link LRUCache#fetch} call\n */\nexport type BackgroundFetch = Promise & {\n  __returned: BackgroundFetch | undefined\n  __abortController: AbortController\n  __staleWhileFetching: V | undefined\n}\n\nexport type DisposeTask = [\n  value: V,\n  key: K,\n  reason: LRUCache.DisposeReason,\n]\n\nexport namespace LRUCache {\n  /**\n   * An integer greater than 0, reflecting the calculated size of items\n   */\n  export type Size = number\n\n  /**\n   * Integer greater than 0, representing some number of milliseconds, or the\n   * time at which a TTL started counting from.\n   */\n  export type Milliseconds = number\n\n  /**\n   * An integer greater than 0, reflecting a number of items\n   */\n  export type Count = number\n\n  /**\n   * The reason why an item was removed from the cache, passed\n   * to the {@link Disposer} methods.\n   *\n   * - `evict`: The item was evicted because it is the least recently used,\n   *   and the cache is full.\n   * - `set`: A new value was set, overwriting the old value being disposed.\n   * - `delete`: The item was explicitly deleted, either by calling\n   *   {@link LRUCache#delete}, {@link LRUCache#clear}, or\n   *   {@link LRUCache#set} with an undefined value.\n   * - `expire`: The item was removed due to exceeding its TTL.\n   * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned\n   *   `undefined` or was aborted, causing the item to be deleted.\n   */\n  export type DisposeReason =\n    | 'evict'\n    | 'set'\n    | 'delete'\n    | 'expire'\n    | 'fetch'\n  /**\n   * A method called upon item removal, passed as the\n   * {@link OptionsBase.dispose} and/or\n   * {@link OptionsBase.disposeAfter} options.\n   */\n  export type Disposer = (\n    value: V,\n    key: K,\n    reason: DisposeReason,\n  ) => void\n\n  /**\n   * The reason why an item was added to the cache, passed\n   * to the {@link Inserter} methods.\n   *\n   * - `add`: the item was not found in the cache, and was added\n   * - `update`: the item was in the cache, with the same value provided\n   * - `replace`: the item was in the cache, and replaced\n   */\n  export type InsertReason = 'add' | 'update' | 'replace'\n\n  /**\n   * A method called upon item insertion, passed as the\n   * {@link OptionsBase.insert}\n   */\n  export type Inserter = (\n    value: V,\n    key: K,\n    reason: InsertReason,\n  ) => void\n\n  /**\n   * A function that returns the effective calculated size\n   * of an entry in the cache.\n   */\n  export type SizeCalculator = (value: V, key: K) => Size\n\n  /**\n   * Options provided to the\n   * {@link OptionsBase.fetchMethod} function.\n   */\n  export interface FetcherOptions {\n    signal: AbortSignal\n    options: FetcherFetchOptions\n    /**\n     * Object provided in the {@link FetchOptions.context} option to\n     * {@link LRUCache#fetch}\n     */\n    context: FC\n  }\n\n  /**\n   * Occasionally, it may be useful to track the internal behavior of the\n   * cache, particularly for logging, debugging, or for behavior within the\n   * `fetchMethod`. To do this, you can pass a `status` object to the\n   * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set},\n   * {@link LRUCache#memo}, and {@link LRUCache#has} methods.\n   *\n   * The `status` option should be a plain JavaScript object. The following\n   * fields will be set on it appropriately, depending on the situation.\n   */\n  export interface Status {\n    /**\n     * The status of a set() operation.\n     *\n     * - add: the item was not found in the cache, and was added\n     * - update: the item was in the cache, with the same value provided\n     * - replace: the item was in the cache, and replaced\n     * - miss: the item was not added to the cache for some reason\n     */\n    set?: 'add' | 'update' | 'replace' | 'miss'\n\n    /**\n     * the ttl stored for the item, or undefined if ttls are not used.\n     */\n    ttl?: Milliseconds\n\n    /**\n     * the start time for the item, or undefined if ttls are not used.\n     */\n    start?: Milliseconds\n\n    /**\n     * The timestamp used for TTL calculation\n     */\n    now?: Milliseconds\n\n    /**\n     * the remaining ttl for the item, or undefined if ttls are not used.\n     */\n    remainingTTL?: Milliseconds\n\n    /**\n     * The calculated size for the item, if sizes are used.\n     */\n    entrySize?: Size\n\n    /**\n     * The total calculated size of the cache, if sizes are used.\n     */\n    totalCalculatedSize?: Size\n\n    /**\n     * A flag indicating that the item was not stored, due to exceeding the\n     * {@link OptionsBase.maxEntrySize}\n     */\n    maxEntrySizeExceeded?: true\n\n    /**\n     * The old value, specified in the case of `set:'update'` or\n     * `set:'replace'`\n     */\n    oldValue?: V\n\n    /**\n     * The results of a {@link LRUCache#has} operation\n     *\n     * - hit: the item was found in the cache\n     * - stale: the item was found in the cache, but is stale\n     * - miss: the item was not found in the cache\n     */\n    has?: 'hit' | 'stale' | 'miss'\n\n    /**\n     * The status of a {@link LRUCache#fetch} operation.\n     * Note that this can change as the underlying fetch() moves through\n     * various states.\n     *\n     * - inflight: there is another fetch() for this key which is in process\n     * - get: there is no {@link OptionsBase.fetchMethod}, so\n     *   {@link LRUCache#get} was called.\n     * - miss: the item is not in cache, and will be fetched.\n     * - hit: the item is in the cache, and was resolved immediately.\n     * - stale: the item is in the cache, but stale.\n     * - refresh: the item is in the cache, and not stale, but\n     *   {@link FetchOptions.forceRefresh} was specified.\n     */\n    fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'\n\n    /**\n     * The {@link OptionsBase.fetchMethod} was called\n     */\n    fetchDispatched?: true\n\n    /**\n     * The cached value was updated after a successful call to\n     * {@link OptionsBase.fetchMethod}\n     */\n    fetchUpdated?: true\n\n    /**\n     * The reason for a fetch() rejection.  Either the error raised by the\n     * {@link OptionsBase.fetchMethod}, or the reason for an\n     * AbortSignal.\n     */\n    fetchError?: Error\n\n    /**\n     * The fetch received an abort signal\n     */\n    fetchAborted?: true\n\n    /**\n     * The abort signal received was ignored, and the fetch was allowed to\n     * continue.\n     */\n    fetchAbortIgnored?: true\n\n    /**\n     * The fetchMethod promise resolved successfully\n     */\n    fetchResolved?: true\n\n    /**\n     * The fetchMethod promise was rejected\n     */\n    fetchRejected?: true\n\n    /**\n     * The status of a {@link LRUCache#get} operation.\n     *\n     * - fetching: The item is currently being fetched.  If a previous value\n     *   is present and allowed, that will be returned.\n     * - stale: The item is in the cache, and is stale.\n     * - hit: the item is in the cache\n     * - miss: the item is not in the cache\n     */\n    get?: 'stale' | 'hit' | 'miss'\n\n    /**\n     * A fetch or get operation returned a stale value.\n     */\n    returnedStale?: true\n  }\n\n  /**\n   * options which override the options set in the LRUCache constructor\n   * when calling {@link LRUCache#fetch}.\n   *\n   * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n   * {@link OptionsBase.noDeleteOnFetchRejection},\n   * {@link OptionsBase.allowStaleOnFetchRejection},\n   * {@link FetchOptions.forceRefresh}, and\n   * {@link FetcherOptions.context}\n   *\n   * Any of these may be modified in the {@link OptionsBase.fetchMethod}\n   * function, but the {@link GetOptions} fields will of course have no\n   * effect, as the {@link LRUCache#get} call already happened by the time\n   * the fetchMethod is called.\n   */\n  export interface FetcherFetchOptions\n    extends Pick<\n      OptionsBase,\n      | 'allowStale'\n      | 'updateAgeOnGet'\n      | 'noDeleteOnStaleGet'\n      | 'sizeCalculation'\n      | 'ttl'\n      | 'noDisposeOnSet'\n      | 'noUpdateTTL'\n      | 'noDeleteOnFetchRejection'\n      | 'allowStaleOnFetchRejection'\n      | 'ignoreFetchAbort'\n      | 'allowStaleOnFetchAbort'\n    > {\n    status?: Status\n    size?: Size\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#fetch} method.\n   */\n  export interface FetchOptions\n    extends FetcherFetchOptions {\n    /**\n     * Set to true to force a re-load of the existing data, even if it\n     * is not yet stale.\n     */\n    forceRefresh?: boolean\n    /**\n     * Context provided to the {@link OptionsBase.fetchMethod} as\n     * the {@link FetcherOptions.context} param.\n     *\n     * If the FC type is specified as unknown (the default),\n     * undefined or void, then this is optional.  Otherwise, it will\n     * be required.\n     */\n    context?: FC\n    signal?: AbortSignal\n    status?: Status\n  }\n  /**\n   * Options provided to {@link LRUCache#fetch} when the FC type is something\n   * other than `unknown`, `undefined`, or `void`\n   */\n  export interface FetchOptionsWithContext\n    extends FetchOptions {\n    context: FC\n  }\n  /**\n   * Options provided to {@link LRUCache#fetch} when the FC type is\n   * `undefined` or `void`\n   */\n  export interface FetchOptionsNoContext\n    extends FetchOptions {\n    context?: undefined\n  }\n\n  export interface MemoOptions\n    extends Pick<\n      OptionsBase,\n      | 'allowStale'\n      | 'updateAgeOnGet'\n      | 'noDeleteOnStaleGet'\n      | 'sizeCalculation'\n      | 'ttl'\n      | 'noDisposeOnSet'\n      | 'noUpdateTTL'\n      | 'noDeleteOnFetchRejection'\n      | 'allowStaleOnFetchRejection'\n      | 'ignoreFetchAbort'\n      | 'allowStaleOnFetchAbort'\n    > {\n    /**\n     * Set to true to force a re-load of the existing data, even if it\n     * is not yet stale.\n     */\n    forceRefresh?: boolean\n    /**\n     * Context provided to the {@link OptionsBase.memoMethod} as\n     * the {@link MemoizerOptions.context} param.\n     *\n     * If the FC type is specified as unknown (the default),\n     * undefined or void, then this is optional.  Otherwise, it will\n     * be required.\n     */\n    context?: FC\n    status?: Status\n  }\n  /**\n   * Options provided to {@link LRUCache#memo} when the FC type is something\n   * other than `unknown`, `undefined`, or `void`\n   */\n  export interface MemoOptionsWithContext\n    extends MemoOptions {\n    context: FC\n  }\n  /**\n   * Options provided to {@link LRUCache#memo} when the FC type is\n   * `undefined` or `void`\n   */\n  export interface MemoOptionsNoContext\n    extends MemoOptions {\n    context?: undefined\n  }\n\n  /**\n   * Options provided to the\n   * {@link OptionsBase.memoMethod} function.\n   */\n  export interface MemoizerOptions {\n    options: MemoizerMemoOptions\n    /**\n     * Object provided in the {@link MemoOptions.context} option to\n     * {@link LRUCache#memo}\n     */\n    context: FC\n  }\n\n  /**\n   * options which override the options set in the LRUCache constructor\n   * when calling {@link LRUCache#memo}.\n   *\n   * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n   * {@link MemoOptions.forceRefresh}, and\n   * {@link MemoOptions.context}\n   *\n   * Any of these may be modified in the {@link OptionsBase.memoMethod}\n   * function, but the {@link GetOptions} fields will of course have no\n   * effect, as the {@link LRUCache#get} call already happened by the time\n   * the memoMethod is called.\n   */\n  export interface MemoizerMemoOptions\n    extends Pick<\n      OptionsBase,\n      | 'allowStale'\n      | 'updateAgeOnGet'\n      | 'noDeleteOnStaleGet'\n      | 'sizeCalculation'\n      | 'ttl'\n      | 'noDisposeOnSet'\n      | 'noUpdateTTL'\n    > {\n    status?: Status\n    size?: Size\n    start?: Milliseconds\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#has} method.\n   */\n  export interface HasOptions\n    extends Pick, 'updateAgeOnHas'> {\n    status?: Status\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#get} method.\n   */\n  export interface GetOptions\n    extends Pick<\n      OptionsBase,\n      'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'\n    > {\n    status?: Status\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#peek} method.\n   */\n  export interface PeekOptions\n    extends Pick, 'allowStale'> {}\n\n  /**\n   * Options that may be passed to the {@link LRUCache#set} method.\n   */\n  export interface SetOptions\n    extends Pick<\n      OptionsBase,\n      'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'\n    > {\n    /**\n     * If size tracking is enabled, then setting an explicit size\n     * in the {@link LRUCache#set} call will prevent calling the\n     * {@link OptionsBase.sizeCalculation} function.\n     */\n    size?: Size\n    /**\n     * If TTL tracking is enabled, then setting an explicit start\n     * time in the {@link LRUCache#set} call will override the\n     * default time from `performance.now()` or `Date.now()`.\n     *\n     * Note that it must be a valid value for whichever time-tracking\n     * method is in use.\n     */\n    start?: Milliseconds\n    status?: Status\n  }\n\n  /**\n   * The type signature for the {@link OptionsBase.fetchMethod} option.\n   */\n  export type Fetcher = (\n    key: K,\n    staleValue: V | undefined,\n    options: FetcherOptions,\n  ) => Promise | V | undefined | void\n\n  /**\n   * the type signature for the {@link OptionsBase.memoMethod} option.\n   */\n  export type Memoizer = (\n    key: K,\n    staleValue: V | undefined,\n    options: MemoizerOptions,\n  ) => V\n\n  /**\n   * Options which may be passed to the {@link LRUCache} constructor.\n   *\n   * Most of these may be overridden in the various options that use\n   * them.\n   *\n   * Despite all being technically optional, the constructor requires that\n   * a cache is at minimum limited by one or more of {@link OptionsBase.max},\n   * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}.\n   *\n   * If {@link OptionsBase.ttl} is used alone, then it is strongly advised\n   * (and in fact required by the type definitions here) that the cache\n   * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially\n   * unbounded storage.\n   *\n   * All options are also available on the {@link LRUCache} instance, making\n   * it safe to pass an LRUCache instance as the options argumemnt to\n   * make another empty cache of the same type.\n   *\n   * Some options are marked as read-only, because changing them after\n   * instantiation is not safe. Changing any of the other options will of\n   * course only have an effect on subsequent method calls.\n   */\n  export interface OptionsBase {\n    /**\n     * The maximum number of items to store in the cache before evicting\n     * old entries. This is read-only on the {@link LRUCache} instance,\n     * and may not be overridden.\n     *\n     * If set, then storage space will be pre-allocated at construction\n     * time, and the cache will perform significantly faster.\n     *\n     * Note that significantly fewer items may be stored, if\n     * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also\n     * set.\n     *\n     * **It is strongly recommended to set a `max` to prevent unbounded growth\n     * of the cache.**\n     */\n    max?: Count\n\n    /**\n     * Max time in milliseconds for items to live in cache before they are\n     * considered stale.  Note that stale items are NOT preemptively removed by\n     * default, and MAY live in the cache, contributing to its LRU max, long\n     * after they have expired, unless {@link OptionsBase.ttlAutopurge} is\n     * set.\n     *\n     * If set to `0` (the default value), then that means \"do not track\n     * TTL\", not \"expire immediately\".\n     *\n     * Also, as this cache is optimized for LRU/MRU operations, some of\n     * the staleness/TTL checks will reduce performance, as they will incur\n     * overhead by deleting items.\n     *\n     * This is not primarily a TTL cache, and does not make strong TTL\n     * guarantees. There is no pre-emptive pruning of expired items, but you\n     * _may_ set a TTL on the cache, and it will treat expired items as missing\n     * when they are fetched, and delete them.\n     *\n     * Optional, but must be a non-negative integer in ms if specified.\n     *\n     * This may be overridden by passing an options object to `cache.set()`.\n     *\n     * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n     * positive integer if set.\n     *\n     * Even if ttl tracking is enabled, **it is strongly recommended to set a\n     * `max` to prevent unbounded growth of the cache.**\n     *\n     * If ttl tracking is enabled, and `max` and `maxSize` are not set,\n     * and `ttlAutopurge` is not set, then a warning will be emitted\n     * cautioning about the potential for unbounded memory consumption.\n     * (The TypeScript definitions will also discourage this.)\n     */\n    ttl?: Milliseconds\n\n    /**\n     * Minimum amount of time in ms in which to check for staleness.\n     * Defaults to 1, which means that the current time is checked\n     * at most once per millisecond.\n     *\n     * Set to 0 to check the current time every time staleness is tested.\n     * (This reduces performance, and is theoretically unnecessary.)\n     *\n     * Setting this to a higher value will improve performance somewhat\n     * while using ttl tracking, albeit at the expense of keeping stale\n     * items around a bit longer than their TTLs would indicate.\n     *\n     * @default 1\n     */\n    ttlResolution?: Milliseconds\n\n    /**\n     * Preemptively remove stale items from the cache.\n     *\n     * Note that this may *significantly* degrade performance, especially if\n     * the cache is storing a large number of items. It is almost always best\n     * to just leave the stale items in the cache, and let them fall out as new\n     * items are added.\n     *\n     * Note that this means that {@link OptionsBase.allowStale} is a bit\n     * pointless, as stale items will be deleted almost as soon as they\n     * expire.\n     *\n     * Use with caution!\n     */\n    ttlAutopurge?: boolean\n\n    /**\n     * When using time-expiring entries with `ttl`, setting this to `true` will\n     * make each item's age reset to 0 whenever it is retrieved from cache with\n     * {@link LRUCache#get}, causing it to not expire. (It can still fall out\n     * of cache based on recency of use, of course.)\n     *\n     * Has no effect if {@link OptionsBase.ttl} is not set.\n     *\n     * This may be overridden by passing an options object to `cache.get()`.\n     */\n    updateAgeOnGet?: boolean\n\n    /**\n     * When using time-expiring entries with `ttl`, setting this to `true` will\n     * make each item's age reset to 0 whenever its presence in the cache is\n     * checked with {@link LRUCache#has}, causing it to not expire. (It can\n     * still fall out of cache based on recency of use, of course.)\n     *\n     * Has no effect if {@link OptionsBase.ttl} is not set.\n     */\n    updateAgeOnHas?: boolean\n\n    /**\n     * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return\n     * stale data, if available.\n     *\n     * By default, if you set `ttl`, stale items will only be deleted from the\n     * cache when you `get(key)`. That is, it's not preemptively pruning items,\n     * unless {@link OptionsBase.ttlAutopurge} is set.\n     *\n     * If you set `allowStale:true`, it'll return the stale value *as well as*\n     * deleting it. If you don't set this, then it'll return `undefined` when\n     * you try to get a stale entry.\n     *\n     * Note that when a stale entry is fetched, _even if it is returned due to\n     * `allowStale` being set_, it is removed from the cache immediately. You\n     * can suppress this behavior by setting\n     * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in\n     * the options provided to {@link LRUCache#get}.\n     *\n     * This may be overridden by passing an options object to `cache.get()`.\n     * The `cache.has()` method will always return `false` for stale items.\n     *\n     * Only relevant if a ttl is set.\n     */\n    allowStale?: boolean\n\n    /**\n     * Function that is called on items when they are dropped from the\n     * cache, as `dispose(value, key, reason)`.\n     *\n     * This can be handy if you want to close file descriptors or do\n     * other cleanup tasks when items are no longer stored in the cache.\n     *\n     * **NOTE**: It is called _before_ the item has been fully removed\n     * from the cache, so if you want to put it right back in, you need\n     * to wait until the next tick. If you try to add it back in during\n     * the `dispose()` function call, it will break things in subtle and\n     * weird ways.\n     *\n     * Unlike several other options, this may _not_ be overridden by\n     * passing an option to `set()`, for performance reasons.\n     *\n     * The `reason` will be one of the following strings, corresponding\n     * to the reason for the item's deletion:\n     *\n     * - `evict` Item was evicted to make space for a new addition\n     * - `set` Item was overwritten by a new value\n     * - `expire` Item expired its TTL\n     * - `fetch` Item was deleted due to a failed or aborted fetch, or a\n     *   fetchMethod returning `undefined.\n     * - `delete` Item was removed by explicit `cache.delete(key)`,\n     *   `cache.clear()`, or `cache.set(key, undefined)`.\n     */\n    dispose?: Disposer\n\n    /**\n     * Function that is called when new items are inserted into the cache,\n     * as `onInsert(value, key, reason)`.\n     *\n     * This can be useful if you need to perform actions when an item is\n     * added, such as logging or tracking insertions.\n     *\n     * Unlike some other options, this may _not_ be overridden by passing\n     * an option to `set()`, for performance and consistency reasons.\n     */\n    onInsert?: Inserter\n\n    /**\n     * The same as {@link OptionsBase.dispose}, but called *after* the entry\n     * is completely removed and the cache is once again in a clean state.\n     *\n     * It is safe to add an item right back into the cache at this point.\n     * However, note that it is *very* easy to inadvertently create infinite\n     * recursion this way.\n     */\n    disposeAfter?: Disposer\n\n    /**\n     * Set to true to suppress calling the\n     * {@link OptionsBase.dispose} function if the entry key is\n     * still accessible within the cache.\n     *\n     * This may be overridden by passing an options object to\n     * {@link LRUCache#set}.\n     *\n     * Only relevant if `dispose` or `disposeAfter` are set.\n     */\n    noDisposeOnSet?: boolean\n\n    /**\n     * Boolean flag to tell the cache to not update the TTL when setting a new\n     * value for an existing key (ie, when updating a value rather than\n     * inserting a new value).  Note that the TTL value is _always_ set (if\n     * provided) when adding a new entry into the cache.\n     *\n     * Has no effect if a {@link OptionsBase.ttl} is not set.\n     *\n     * May be passed as an option to {@link LRUCache#set}.\n     */\n    noUpdateTTL?: boolean\n\n    /**\n     * Set to a positive integer to track the sizes of items added to the\n     * cache, and automatically evict items in order to stay below this size.\n     * Note that this may result in fewer than `max` items being stored.\n     *\n     * Attempting to add an item to the cache whose calculated size is greater\n     * that this amount will be a no-op. The item will not be cached, and no\n     * other items will be evicted.\n     *\n     * Optional, must be a positive integer if provided.\n     *\n     * Sets `maxEntrySize` to the same value, unless a different value is\n     * provided for `maxEntrySize`.\n     *\n     * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n     * positive integer if set.\n     *\n     * Even if size tracking is enabled, **it is strongly recommended to set a\n     * `max` to prevent unbounded growth of the cache.**\n     *\n     * Note also that size tracking can negatively impact performance,\n     * though for most cases, only minimally.\n     */\n    maxSize?: Size\n\n    /**\n     * The maximum allowed size for any single item in the cache.\n     *\n     * If a larger item is passed to {@link LRUCache#set} or returned by a\n     * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then\n     * it will not be stored in the cache.\n     *\n     * Attempting to add an item whose calculated size is greater than\n     * this amount will not cache the item or evict any old items, but\n     * WILL delete an existing value if one is already present.\n     *\n     * Optional, must be a positive integer if provided. Defaults to\n     * the value of `maxSize` if provided.\n     */\n    maxEntrySize?: Size\n\n    /**\n     * A function that returns a number indicating the item's size.\n     *\n     * Requires {@link OptionsBase.maxSize} to be set.\n     *\n     * If not provided, and {@link OptionsBase.maxSize} or\n     * {@link OptionsBase.maxEntrySize} are set, then all\n     * {@link LRUCache#set} calls **must** provide an explicit\n     * {@link SetOptions.size} or sizeCalculation param.\n     */\n    sizeCalculation?: SizeCalculator\n\n    /**\n     * Method that provides the implementation for {@link LRUCache#fetch}\n     *\n     * ```ts\n     * fetchMethod(key, staleValue, { signal, options, context })\n     * ```\n     *\n     * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent\n     * to `Promise.resolve(cache.get(key))`.\n     *\n     * If at any time, `signal.aborted` is set to `true`, or if the\n     * `signal.onabort` method is called, or if it emits an `'abort'` event\n     * which you can listen to with `addEventListener`, then that means that\n     * the fetch should be abandoned. This may be passed along to async\n     * functions aware of AbortController/AbortSignal behavior.\n     *\n     * The `fetchMethod` should **only** return `undefined` or a Promise\n     * resolving to `undefined` if the AbortController signaled an `abort`\n     * event. In all other cases, it should return or resolve to a value\n     * suitable for adding to the cache.\n     *\n     * The `options` object is a union of the options that may be provided to\n     * `set()` and `get()`. If they are modified, then that will result in\n     * modifying the settings to `cache.set()` when the value is resolved, and\n     * in the case of\n     * {@link OptionsBase.noDeleteOnFetchRejection} and\n     * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of\n     * `fetchMethod` failures.\n     *\n     * For example, a DNS cache may update the TTL based on the value returned\n     * from a remote DNS server by changing `options.ttl` in the `fetchMethod`.\n     */\n    fetchMethod?: Fetcher\n\n    /**\n     * Method that provides the implementation for {@link LRUCache#memo}\n     */\n    memoMethod?: Memoizer\n\n    /**\n     * Set to true to suppress the deletion of stale data when a\n     * {@link OptionsBase.fetchMethod} returns a rejected promise.\n     */\n    noDeleteOnFetchRejection?: boolean\n\n    /**\n     * Do not delete stale items when they are retrieved with\n     * {@link LRUCache#get}.\n     *\n     * Note that the `get` return value will still be `undefined`\n     * unless {@link OptionsBase.allowStale} is true.\n     *\n     * When using time-expiring entries with `ttl`, by default stale\n     * items will be removed from the cache when the key is accessed\n     * with `cache.get()`.\n     *\n     * Setting this option will cause stale items to remain in the cache, until\n     * they are explicitly deleted with `cache.delete(key)`, or retrieved with\n     * `noDeleteOnStaleGet` set to `false`.\n     *\n     * This may be overridden by passing an options object to `cache.get()`.\n     *\n     * Only relevant if a ttl is used.\n     */\n    noDeleteOnStaleGet?: boolean\n\n    /**\n     * Set to true to allow returning stale data when a\n     * {@link OptionsBase.fetchMethod} throws an error or returns a rejected\n     * promise.\n     *\n     * This differs from using {@link OptionsBase.allowStale} in that stale\n     * data will ONLY be returned in the case that the {@link LRUCache#fetch}\n     * fails, not any other times.\n     *\n     * If a `fetchMethod` fails, and there is no stale value available, the\n     * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are\n     * suppressed.\n     *\n     * Implies `noDeleteOnFetchRejection`.\n     *\n     * This may be set in calls to `fetch()`, or defaulted on the constructor,\n     * or overridden by modifying the options object in the `fetchMethod`.\n     */\n    allowStaleOnFetchRejection?: boolean\n\n    /**\n     * Set to true to return a stale value from the cache when the\n     * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches\n     * an `'abort'` event, whether user-triggered, or due to internal cache\n     * behavior.\n     *\n     * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying\n     * {@link OptionsBase.fetchMethod} will still be considered canceled, and\n     * any value it returns will be ignored and not cached.\n     *\n     * Caveat: since fetches are aborted when a new value is explicitly\n     * set in the cache, this can lead to fetch returning a stale value,\n     * since that was the fallback value _at the moment the `fetch()` was\n     * initiated_, even though the new updated value is now present in\n     * the cache.\n     *\n     * For example:\n     *\n     * ```ts\n     * const cache = new LRUCache({\n     *   ttl: 100,\n     *   fetchMethod: async (url, oldValue, { signal }) =>  {\n     *     const res = await fetch(url, { signal })\n     *     return await res.json()\n     *   }\n     * })\n     * cache.set('https://example.com/', { some: 'data' })\n     * // 100ms go by...\n     * const result = cache.fetch('https://example.com/')\n     * cache.set('https://example.com/', { other: 'thing' })\n     * console.log(await result) // { some: 'data' }\n     * console.log(cache.get('https://example.com/')) // { other: 'thing' }\n     * ```\n     */\n    allowStaleOnFetchAbort?: boolean\n\n    /**\n     * Set to true to ignore the `abort` event emitted by the `AbortSignal`\n     * object passed to {@link OptionsBase.fetchMethod}, and still cache the\n     * resulting resolution value, as long as it is not `undefined`.\n     *\n     * When used on its own, this means aborted {@link LRUCache#fetch} calls\n     * are not immediately resolved or rejected when they are aborted, and\n     * instead take the full time to await.\n     *\n     * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted\n     * {@link LRUCache#fetch} calls will resolve immediately to their stale\n     * cached value or `undefined`, and will continue to process and eventually\n     * update the cache when they resolve, as long as the resulting value is\n     * not `undefined`, thus supporting a \"return stale on timeout while\n     * refreshing\" mechanism by passing `AbortSignal.timeout(n)` as the signal.\n     *\n     * For example:\n     *\n     * ```ts\n     * const c = new LRUCache({\n     *   ttl: 100,\n     *   ignoreFetchAbort: true,\n     *   allowStaleOnFetchAbort: true,\n     *   fetchMethod: async (key, oldValue, { signal }) => {\n     *     // note: do NOT pass the signal to fetch()!\n     *     // let's say this fetch can take a long time.\n     *     const res = await fetch(`https://slow-backend-server/${key}`)\n     *     return await res.json()\n     *   },\n     * })\n     *\n     * // this will return the stale value after 100ms, while still\n     * // updating in the background for next time.\n     * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) })\n     * ```\n     *\n     * **Note**: regardless of this setting, an `abort` event _is still\n     * emitted on the `AbortSignal` object_, so may result in invalid results\n     * when passed to other underlying APIs that use AbortSignals.\n     *\n     * This may be overridden in the {@link OptionsBase.fetchMethod} or the\n     * call to {@link LRUCache#fetch}.\n     */\n    ignoreFetchAbort?: boolean\n\n    /**\n     * In some cases, you may want to swap out the performance/Date object\n     * used for TTL tracking. This should almost certainly NOT be done in\n     * production environments!\n     *\n     * This value defaults to `global.performance` if it has a `now()` method,\n     * or the `global.Date` object otherwise.\n     */\n    perf?: Perf\n  }\n\n  export interface OptionsMaxLimit\n    extends OptionsBase {\n    max: Count\n  }\n  export interface OptionsTTLLimit\n    extends OptionsBase {\n    ttl: Milliseconds\n    ttlAutopurge: boolean\n  }\n  export interface OptionsSizeLimit\n    extends OptionsBase {\n    maxSize: Size\n  }\n\n  /**\n   * The valid safe options for the {@link LRUCache} constructor\n   */\n  export type Options =\n    | OptionsMaxLimit\n    | OptionsSizeLimit\n    | OptionsTTLLimit\n\n  /**\n   * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump},\n   * and returned by {@link LRUCache#info}.\n   */\n  export interface Entry {\n    value: V\n    ttl?: Milliseconds\n    size?: Size\n    start?: Milliseconds\n  }\n}\n\n/**\n * Default export, the thing you're using this module to get.\n *\n * The `K` and `V` types define the key and value types, respectively. The\n * optional `FC` type defines the type of the `context` object passed to\n * `cache.fetch()` and `cache.memo()`.\n *\n * Keys and values **must not** be `null` or `undefined`.\n *\n * All properties from the options object (with the exception of `max`,\n * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are\n * added as normal public members. (The listed options are read-only getters.)\n *\n * Changing any of these will alter the defaults for subsequent method calls.\n */\nexport class LRUCache {\n  // options that cannot be changed without disaster\n  readonly #max: LRUCache.Count\n  readonly #maxSize: LRUCache.Size\n  readonly #dispose?: LRUCache.Disposer\n  readonly #onInsert?: LRUCache.Inserter\n  readonly #disposeAfter?: LRUCache.Disposer\n  readonly #fetchMethod?: LRUCache.Fetcher\n  readonly #memoMethod?: LRUCache.Memoizer\n  readonly #perf: Perf\n\n  /**\n   * {@link LRUCache.OptionsBase.perf}\n   */\n  get perf() {\n    return this.#perf\n  }\n\n  /**\n   * {@link LRUCache.OptionsBase.ttl}\n   */\n  ttl: LRUCache.Milliseconds\n\n  /**\n   * {@link LRUCache.OptionsBase.ttlResolution}\n   */\n  ttlResolution: LRUCache.Milliseconds\n  /**\n   * {@link LRUCache.OptionsBase.ttlAutopurge}\n   */\n  ttlAutopurge: boolean\n  /**\n   * {@link LRUCache.OptionsBase.updateAgeOnGet}\n   */\n  updateAgeOnGet: boolean\n  /**\n   * {@link LRUCache.OptionsBase.updateAgeOnHas}\n   */\n  updateAgeOnHas: boolean\n  /**\n   * {@link LRUCache.OptionsBase.allowStale}\n   */\n  allowStale: boolean\n\n  /**\n   * {@link LRUCache.OptionsBase.noDisposeOnSet}\n   */\n  noDisposeOnSet: boolean\n  /**\n   * {@link LRUCache.OptionsBase.noUpdateTTL}\n   */\n  noUpdateTTL: boolean\n  /**\n   * {@link LRUCache.OptionsBase.maxEntrySize}\n   */\n  maxEntrySize: LRUCache.Size\n  /**\n   * {@link LRUCache.OptionsBase.sizeCalculation}\n   */\n  sizeCalculation?: LRUCache.SizeCalculator\n  /**\n   * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}\n   */\n  noDeleteOnFetchRejection: boolean\n  /**\n   * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}\n   */\n  noDeleteOnStaleGet: boolean\n  /**\n   * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}\n   */\n  allowStaleOnFetchAbort: boolean\n  /**\n   * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}\n   */\n  allowStaleOnFetchRejection: boolean\n  /**\n   * {@link LRUCache.OptionsBase.ignoreFetchAbort}\n   */\n  ignoreFetchAbort: boolean\n\n  // computed properties\n  #size: LRUCache.Count\n  #calculatedSize: LRUCache.Size\n  #keyMap: Map\n  #keyList: (K | undefined)[]\n  #valList: (V | BackgroundFetch | undefined)[]\n  #next: NumberArray\n  #prev: NumberArray\n  #head: Index\n  #tail: Index\n  #free: StackLike\n  #disposed?: DisposeTask[]\n  #sizes?: ZeroArray\n  #starts?: ZeroArray\n  #ttls?: ZeroArray\n  #autopurgeTimers?: (undefined | ReturnType)[]\n\n  #hasDispose: boolean\n  #hasFetchMethod: boolean\n  #hasDisposeAfter: boolean\n  #hasOnInsert: boolean\n\n  /**\n   * Do not call this method unless you need to inspect the\n   * inner workings of the cache.  If anything returned by this\n   * object is modified in any way, strange breakage may occur.\n   *\n   * These fields are private for a reason!\n   *\n   * @internal\n   */\n  static unsafeExposeInternals<\n    K extends {},\n    V extends {},\n    FC extends unknown = unknown,\n  >(c: LRUCache) {\n    return {\n      // properties\n      starts: c.#starts,\n      ttls: c.#ttls,\n      autopurgeTimers: c.#autopurgeTimers,\n      sizes: c.#sizes,\n      keyMap: c.#keyMap as Map,\n      keyList: c.#keyList,\n      valList: c.#valList,\n      next: c.#next,\n      prev: c.#prev,\n      get head() {\n        return c.#head\n      },\n      get tail() {\n        return c.#tail\n      },\n      free: c.#free,\n      // methods\n      isBackgroundFetch: (p: any) => c.#isBackgroundFetch(p),\n      backgroundFetch: (\n        k: K,\n        index: number | undefined,\n        options: LRUCache.FetchOptions,\n        context: any,\n      ): BackgroundFetch =>\n        c.#backgroundFetch(\n          k,\n          index as Index | undefined,\n          options,\n          context,\n        ),\n      moveToTail: (index: number): void => c.#moveToTail(index as Index),\n      indexes: (options?: { allowStale: boolean }) => c.#indexes(options),\n      rindexes: (options?: { allowStale: boolean }) =>\n        c.#rindexes(options),\n      isStale: (index: number | undefined) => c.#isStale(index as Index),\n    }\n  }\n\n  // Protected read-only members\n\n  /**\n   * {@link LRUCache.OptionsBase.max} (read-only)\n   */\n  get max(): LRUCache.Count {\n    return this.#max\n  }\n  /**\n   * {@link LRUCache.OptionsBase.maxSize} (read-only)\n   */\n  get maxSize(): LRUCache.Count {\n    return this.#maxSize\n  }\n  /**\n   * The total computed size of items in the cache (read-only)\n   */\n  get calculatedSize(): LRUCache.Size {\n    return this.#calculatedSize\n  }\n  /**\n   * The number of items stored in the cache (read-only)\n   */\n  get size(): LRUCache.Count {\n    return this.#size\n  }\n  /**\n   * {@link LRUCache.OptionsBase.fetchMethod} (read-only)\n   */\n  get fetchMethod(): LRUCache.Fetcher | undefined {\n    return this.#fetchMethod\n  }\n  get memoMethod(): LRUCache.Memoizer | undefined {\n    return this.#memoMethod\n  }\n  /**\n   * {@link LRUCache.OptionsBase.dispose} (read-only)\n   */\n  get dispose() {\n    return this.#dispose\n  }\n  /**\n   * {@link LRUCache.OptionsBase.onInsert} (read-only)\n   */\n  get onInsert() {\n    return this.#onInsert\n  }\n  /**\n   * {@link LRUCache.OptionsBase.disposeAfter} (read-only)\n   */\n  get disposeAfter() {\n    return this.#disposeAfter\n  }\n\n  constructor(options: LRUCache.Options | LRUCache) {\n    const {\n      max = 0,\n      ttl,\n      ttlResolution = 1,\n      ttlAutopurge,\n      updateAgeOnGet,\n      updateAgeOnHas,\n      allowStale,\n      dispose,\n      onInsert,\n      disposeAfter,\n      noDisposeOnSet,\n      noUpdateTTL,\n      maxSize = 0,\n      maxEntrySize = 0,\n      sizeCalculation,\n      fetchMethod,\n      memoMethod,\n      noDeleteOnFetchRejection,\n      noDeleteOnStaleGet,\n      allowStaleOnFetchRejection,\n      allowStaleOnFetchAbort,\n      ignoreFetchAbort,\n      perf,\n    } = options\n\n    if (perf !== undefined) {\n      if (typeof perf?.now !== 'function') {\n        throw new TypeError(\n          'perf option must have a now() method if specified',\n        )\n      }\n    }\n\n    this.#perf = perf ?? defaultPerf\n\n    if (max !== 0 && !isPosInt(max)) {\n      throw new TypeError('max option must be a nonnegative integer')\n    }\n\n    const UintArray = max ? getUintArray(max) : Array\n    if (!UintArray) {\n      throw new Error('invalid max value: ' + max)\n    }\n\n    this.#max = max\n    this.#maxSize = maxSize\n    this.maxEntrySize = maxEntrySize || this.#maxSize\n    this.sizeCalculation = sizeCalculation\n    if (this.sizeCalculation) {\n      if (!this.#maxSize && !this.maxEntrySize) {\n        throw new TypeError(\n          'cannot set sizeCalculation without setting maxSize or maxEntrySize',\n        )\n      }\n      if (typeof this.sizeCalculation !== 'function') {\n        throw new TypeError('sizeCalculation set to non-function')\n      }\n    }\n\n    if (memoMethod !== undefined && typeof memoMethod !== 'function') {\n      throw new TypeError('memoMethod must be a function if defined')\n    }\n    this.#memoMethod = memoMethod\n\n    if (fetchMethod !== undefined && typeof fetchMethod !== 'function') {\n      throw new TypeError('fetchMethod must be a function if specified')\n    }\n    this.#fetchMethod = fetchMethod\n    this.#hasFetchMethod = !!fetchMethod\n\n    this.#keyMap = new Map()\n    this.#keyList = new Array(max).fill(undefined)\n    this.#valList = new Array(max).fill(undefined)\n    this.#next = new UintArray(max)\n    this.#prev = new UintArray(max)\n    this.#head = 0 as Index\n    this.#tail = 0 as Index\n    this.#free = Stack.create(max)\n    this.#size = 0\n    this.#calculatedSize = 0\n\n    if (typeof dispose === 'function') {\n      this.#dispose = dispose\n    }\n    if (typeof onInsert === 'function') {\n      this.#onInsert = onInsert\n    }\n    if (typeof disposeAfter === 'function') {\n      this.#disposeAfter = disposeAfter\n      this.#disposed = []\n    } else {\n      this.#disposeAfter = undefined\n      this.#disposed = undefined\n    }\n    this.#hasDispose = !!this.#dispose\n    this.#hasOnInsert = !!this.#onInsert\n    this.#hasDisposeAfter = !!this.#disposeAfter\n\n    this.noDisposeOnSet = !!noDisposeOnSet\n    this.noUpdateTTL = !!noUpdateTTL\n    this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection\n    this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection\n    this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort\n    this.ignoreFetchAbort = !!ignoreFetchAbort\n\n    // NB: maxEntrySize is set to maxSize if it's set\n    if (this.maxEntrySize !== 0) {\n      if (this.#maxSize !== 0) {\n        if (!isPosInt(this.#maxSize)) {\n          throw new TypeError(\n            'maxSize must be a positive integer if specified',\n          )\n        }\n      }\n      if (!isPosInt(this.maxEntrySize)) {\n        throw new TypeError(\n          'maxEntrySize must be a positive integer if specified',\n        )\n      }\n      this.#initializeSizeTracking()\n    }\n\n    this.allowStale = !!allowStale\n    this.noDeleteOnStaleGet = !!noDeleteOnStaleGet\n    this.updateAgeOnGet = !!updateAgeOnGet\n    this.updateAgeOnHas = !!updateAgeOnHas\n    this.ttlResolution =\n      isPosInt(ttlResolution) || ttlResolution === 0 ? ttlResolution : 1\n    this.ttlAutopurge = !!ttlAutopurge\n    this.ttl = ttl || 0\n    if (this.ttl) {\n      if (!isPosInt(this.ttl)) {\n        throw new TypeError('ttl must be a positive integer if specified')\n      }\n      this.#initializeTTLTracking()\n    }\n\n    // do not allow completely unbounded caches\n    if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {\n      throw new TypeError(\n        'At least one of max, maxSize, or ttl is required',\n      )\n    }\n    if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {\n      const code = 'LRU_CACHE_UNBOUNDED'\n      if (shouldWarn(code)) {\n        warned.add(code)\n        const msg =\n          'TTL caching without ttlAutopurge, max, or maxSize can ' +\n          'result in unbounded memory consumption.'\n        emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache)\n      }\n    }\n  }\n\n  /**\n   * Return the number of ms left in the item's TTL. If item is not in cache,\n   * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.\n   */\n  getRemainingTTL(key: K) {\n    return this.#keyMap.has(key) ? Infinity : 0\n  }\n\n  #initializeTTLTracking() {\n    const ttls = new ZeroArray(this.#max)\n    const starts = new ZeroArray(this.#max)\n    this.#ttls = ttls\n    this.#starts = starts\n    const purgeTimers =\n      this.ttlAutopurge ?\n        new Array>(this.#max)\n      : undefined\n    this.#autopurgeTimers = purgeTimers\n\n    this.#setItemTTL = (index, ttl, start = this.#perf.now()) => {\n      starts[index] = ttl !== 0 ? start : 0\n      ttls[index] = ttl\n      // clear out the purge timer if we're setting TTL to 0, and\n      // previously had a ttl purge timer running, so it doesn't\n      // fire unnecessarily.\n      if (purgeTimers?.[index]) {\n        clearTimeout(purgeTimers[index])\n        purgeTimers[index] = undefined\n      }\n      if (ttl !== 0 && purgeTimers) {\n        const t = setTimeout(() => {\n          if (this.#isStale(index)) {\n            this.#delete(this.#keyList[index] as K, 'expire')\n          }\n        }, ttl + 1)\n        // unref() not supported on all platforms\n        /* c8 ignore start */\n        if (t.unref) {\n          t.unref()\n        }\n        /* c8 ignore stop */\n        purgeTimers[index] = t\n      }\n    }\n\n    this.#updateItemAge = index => {\n      starts[index] = ttls[index] !== 0 ? this.#perf.now() : 0\n    }\n\n    this.#statusTTL = (status, index) => {\n      if (ttls[index]) {\n        const ttl = ttls[index]\n        const start = starts[index]\n        /* c8 ignore next */\n        if (!ttl || !start) return\n        status.ttl = ttl\n        status.start = start\n        status.now = cachedNow || getNow()\n        const age = status.now - start\n        status.remainingTTL = ttl - age\n      }\n    }\n\n    // debounce calls to perf.now() to 1s so we're not hitting\n    // that costly call repeatedly.\n    let cachedNow = 0\n    const getNow = () => {\n      const n = this.#perf.now()\n      if (this.ttlResolution > 0) {\n        cachedNow = n\n        const t = setTimeout(() => (cachedNow = 0), this.ttlResolution)\n        // not available on all platforms\n        /* c8 ignore start */\n        if (t.unref) {\n          t.unref()\n        }\n        /* c8 ignore stop */\n      }\n      return n\n    }\n\n    this.getRemainingTTL = key => {\n      const index = this.#keyMap.get(key)\n      if (index === undefined) {\n        return 0\n      }\n      const ttl = ttls[index]\n      const start = starts[index]\n      if (!ttl || !start) {\n        return Infinity\n      }\n      const age = (cachedNow || getNow()) - start\n      return ttl - age\n    }\n\n    this.#isStale = index => {\n      const s = starts[index]\n      const t = ttls[index]\n      return !!t && !!s && (cachedNow || getNow()) - s > t\n    }\n  }\n\n  // conditionally set private methods related to TTL\n  #updateItemAge: (index: Index) => void = () => {}\n  #statusTTL: (status: LRUCache.Status, index: Index) => void = () => {}\n  #setItemTTL: (\n    index: Index,\n    ttl: LRUCache.Milliseconds,\n    start?: LRUCache.Milliseconds,\n    // ignore because we never call this if we're not already in TTL mode\n    /* c8 ignore start */\n  ) => void = () => {}\n  /* c8 ignore stop */\n\n  #isStale: (index: Index) => boolean = () => false\n\n  #initializeSizeTracking() {\n    const sizes = new ZeroArray(this.#max)\n    this.#calculatedSize = 0\n    this.#sizes = sizes\n    this.#removeItemSize = index => {\n      this.#calculatedSize -= sizes[index] as number\n      sizes[index] = 0\n    }\n    this.#requireSize = (k, v, size, sizeCalculation) => {\n      // provisionally accept background fetches.\n      // actual value size will be checked when they return.\n      if (this.#isBackgroundFetch(v)) {\n        return 0\n      }\n      if (!isPosInt(size)) {\n        if (sizeCalculation) {\n          if (typeof sizeCalculation !== 'function') {\n            throw new TypeError('sizeCalculation must be a function')\n          }\n          size = sizeCalculation(v, k)\n          if (!isPosInt(size)) {\n            throw new TypeError(\n              'sizeCalculation return invalid (expect positive integer)',\n            )\n          }\n        } else {\n          throw new TypeError(\n            'invalid size value (must be positive integer). ' +\n              'When maxSize or maxEntrySize is used, sizeCalculation ' +\n              'or size must be set.',\n          )\n        }\n      }\n      return size\n    }\n    this.#addItemSize = (\n      index: Index,\n      size: LRUCache.Size,\n      status?: LRUCache.Status,\n    ) => {\n      sizes[index] = size\n      if (this.#maxSize) {\n        const maxSize = this.#maxSize - (sizes[index] as number)\n        while (this.#calculatedSize > maxSize) {\n          this.#evict(true)\n        }\n      }\n      this.#calculatedSize += sizes[index] as number\n      if (status) {\n        status.entrySize = size\n        status.totalCalculatedSize = this.#calculatedSize\n      }\n    }\n  }\n\n  #removeItemSize: (index: Index) => void = _i => {}\n  #addItemSize: (\n    index: Index,\n    size: LRUCache.Size,\n    status?: LRUCache.Status,\n  ) => void = (_i, _s, _st) => {}\n  #requireSize: (\n    k: K,\n    v: V | BackgroundFetch,\n    size?: LRUCache.Size,\n    sizeCalculation?: LRUCache.SizeCalculator,\n  ) => LRUCache.Size = (\n    _k: K,\n    _v: V | BackgroundFetch,\n    size?: LRUCache.Size,\n    sizeCalculation?: LRUCache.SizeCalculator,\n  ) => {\n    if (size || sizeCalculation) {\n      throw new TypeError(\n        'cannot set size without setting maxSize or maxEntrySize on cache',\n      )\n    }\n    return 0\n  };\n\n  *#indexes({ allowStale = this.allowStale } = {}) {\n    if (this.#size) {\n      for (let i = this.#tail; true; ) {\n        if (!this.#isValidIndex(i)) {\n          break\n        }\n        if (allowStale || !this.#isStale(i)) {\n          yield i\n        }\n        if (i === this.#head) {\n          break\n        } else {\n          i = this.#prev[i] as Index\n        }\n      }\n    }\n  }\n\n  *#rindexes({ allowStale = this.allowStale } = {}) {\n    if (this.#size) {\n      for (let i = this.#head; true; ) {\n        if (!this.#isValidIndex(i)) {\n          break\n        }\n        if (allowStale || !this.#isStale(i)) {\n          yield i\n        }\n        if (i === this.#tail) {\n          break\n        } else {\n          i = this.#next[i] as Index\n        }\n      }\n    }\n  }\n\n  #isValidIndex(index: Index) {\n    return (\n      index !== undefined &&\n      this.#keyMap.get(this.#keyList[index] as K) === index\n    )\n  }\n\n  /**\n   * Return a generator yielding `[key, value]` pairs,\n   * in order from most recently used to least recently used.\n   */\n  *entries() {\n    for (const i of this.#indexes()) {\n      if (\n        this.#valList[i] !== undefined &&\n        this.#keyList[i] !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield [this.#keyList[i], this.#valList[i]] as [K, V]\n      }\n    }\n  }\n\n  /**\n   * Inverse order version of {@link LRUCache.entries}\n   *\n   * Return a generator yielding `[key, value]` pairs,\n   * in order from least recently used to most recently used.\n   */\n  *rentries() {\n    for (const i of this.#rindexes()) {\n      if (\n        this.#valList[i] !== undefined &&\n        this.#keyList[i] !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield [this.#keyList[i], this.#valList[i]]\n      }\n    }\n  }\n\n  /**\n   * Return a generator yielding the keys in the cache,\n   * in order from most recently used to least recently used.\n   */\n  *keys() {\n    for (const i of this.#indexes()) {\n      const k = this.#keyList[i]\n      if (k !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {\n        yield k\n      }\n    }\n  }\n\n  /**\n   * Inverse order version of {@link LRUCache.keys}\n   *\n   * Return a generator yielding the keys in the cache,\n   * in order from least recently used to most recently used.\n   */\n  *rkeys() {\n    for (const i of this.#rindexes()) {\n      const k = this.#keyList[i]\n      if (k !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {\n        yield k\n      }\n    }\n  }\n\n  /**\n   * Return a generator yielding the values in the cache,\n   * in order from most recently used to least recently used.\n   */\n  *values() {\n    for (const i of this.#indexes()) {\n      const v = this.#valList[i]\n      if (v !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {\n        yield this.#valList[i] as V\n      }\n    }\n  }\n\n  /**\n   * Inverse order version of {@link LRUCache.values}\n   *\n   * Return a generator yielding the values in the cache,\n   * in order from least recently used to most recently used.\n   */\n  *rvalues() {\n    for (const i of this.#rindexes()) {\n      const v = this.#valList[i]\n      if (v !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {\n        yield this.#valList[i]\n      }\n    }\n  }\n\n  /**\n   * Iterating over the cache itself yields the same results as\n   * {@link LRUCache.entries}\n   */\n  [Symbol.iterator]() {\n    return this.entries()\n  }\n\n  /**\n   * A String value that is used in the creation of the default string\n   * description of an object. Called by the built-in method\n   * `Object.prototype.toString`.\n   */\n  [Symbol.toStringTag] = 'LRUCache'\n\n  /**\n   * Find a value for which the supplied fn method returns a truthy value,\n   * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.\n   */\n  find(\n    fn: (v: V, k: K, self: LRUCache) => boolean,\n    getOptions: LRUCache.GetOptions = {},\n  ) {\n    for (const i of this.#indexes()) {\n      const v = this.#valList[i]\n      const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n      if (value === undefined) continue\n      if (fn(value, this.#keyList[i] as K, this)) {\n        return this.get(this.#keyList[i] as K, getOptions)\n      }\n    }\n  }\n\n  /**\n   * Call the supplied function on each item in the cache, in order from most\n   * recently used to least recently used.\n   *\n   * `fn` is called as `fn(value, key, cache)`.\n   *\n   * If `thisp` is provided, function will be called in the `this`-context of\n   * the provided object, or the cache if no `thisp` object is provided.\n   *\n   * Does not update age or recenty of use, or iterate over stale values.\n   */\n  forEach(\n    fn: (v: V, k: K, self: LRUCache) => any,\n    thisp: any = this,\n  ) {\n    for (const i of this.#indexes()) {\n      const v = this.#valList[i]\n      const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n      if (value === undefined) continue\n      fn.call(thisp, value, this.#keyList[i] as K, this)\n    }\n  }\n\n  /**\n   * The same as {@link LRUCache.forEach} but items are iterated over in\n   * reverse order.  (ie, less recently used items are iterated over first.)\n   */\n  rforEach(\n    fn: (v: V, k: K, self: LRUCache) => any,\n    thisp: any = this,\n  ) {\n    for (const i of this.#rindexes()) {\n      const v = this.#valList[i]\n      const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n      if (value === undefined) continue\n      fn.call(thisp, value, this.#keyList[i] as K, this)\n    }\n  }\n\n  /**\n   * Delete any stale entries. Returns true if anything was removed,\n   * false otherwise.\n   */\n  purgeStale() {\n    let deleted = false\n    for (const i of this.#rindexes({ allowStale: true })) {\n      if (this.#isStale(i)) {\n        this.#delete(this.#keyList[i] as K, 'expire')\n        deleted = true\n      }\n    }\n    return deleted\n  }\n\n  /**\n   * Get the extended info about a given entry, to get its value, size, and\n   * TTL info simultaneously. Returns `undefined` if the key is not present.\n   *\n   * Unlike {@link LRUCache#dump}, which is designed to be portable and survive\n   * serialization, the `start` value is always the current timestamp, and the\n   * `ttl` is a calculated remaining time to live (negative if expired).\n   *\n   * Always returns stale values, if their info is found in the cache, so be\n   * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})\n   * if relevant.\n   */\n  info(key: K): LRUCache.Entry | undefined {\n    const i = this.#keyMap.get(key)\n    if (i === undefined) return undefined\n    const v = this.#valList[i]\n    /* c8 ignore start - this isn't tested for the info function,\n     * but it's the same logic as found in other places. */\n    const value: V | undefined =\n      this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n    if (value === undefined) return undefined\n    /* c8 ignore end */\n    const entry: LRUCache.Entry = { value }\n    if (this.#ttls && this.#starts) {\n      const ttl = this.#ttls[i]\n      const start = this.#starts[i]\n      if (ttl && start) {\n        const remain = ttl - (this.#perf.now() - start)\n        entry.ttl = remain\n        entry.start = Date.now()\n      }\n    }\n    if (this.#sizes) {\n      entry.size = this.#sizes[i]\n    }\n    return entry\n  }\n\n  /**\n   * Return an array of [key, {@link LRUCache.Entry}] tuples which can be\n   * passed to {@link LRUCache#load}.\n   *\n   * The `start` fields are calculated relative to a portable `Date.now()`\n   * timestamp, even if `performance.now()` is available.\n   *\n   * Stale entries are always included in the `dump`, even if\n   * {@link LRUCache.OptionsBase.allowStale} is false.\n   *\n   * Note: this returns an actual array, not a generator, so it can be more\n   * easily passed around.\n   */\n  dump() {\n    const arr: [K, LRUCache.Entry][] = []\n    for (const i of this.#indexes({ allowStale: true })) {\n      const key = this.#keyList[i]\n      const v = this.#valList[i]\n      const value: V | undefined =\n        this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n      if (value === undefined || key === undefined) continue\n      const entry: LRUCache.Entry = { value }\n      if (this.#ttls && this.#starts) {\n        entry.ttl = this.#ttls[i]\n        // always dump the start relative to a portable timestamp\n        // it's ok for this to be a bit slow, it's a rare operation.\n        const age = this.#perf.now() - (this.#starts[i] as number)\n        entry.start = Math.floor(Date.now() - age)\n      }\n      if (this.#sizes) {\n        entry.size = this.#sizes[i]\n      }\n      arr.unshift([key, entry])\n    }\n    return arr\n  }\n\n  /**\n   * Reset the cache and load in the items in entries in the order listed.\n   *\n   * The shape of the resulting cache may be different if the same options are\n   * not used in both caches.\n   *\n   * The `start` fields are assumed to be calculated relative to a portable\n   * `Date.now()` timestamp, even if `performance.now()` is available.\n   */\n  load(arr: [K, LRUCache.Entry][]) {\n    this.clear()\n    for (const [key, entry] of arr) {\n      if (entry.start) {\n        // entry.start is a portable timestamp, but we may be using\n        // node's performance.now(), so calculate the offset, so that\n        // we get the intended remaining TTL, no matter how long it's\n        // been on ice.\n        //\n        // it's ok for this to be a bit slow, it's a rare operation.\n        const age = Date.now() - entry.start\n        entry.start = this.#perf.now() - age\n      }\n      this.set(key, entry.value, entry)\n    }\n  }\n\n  /**\n   * Add a value to the cache.\n   *\n   * Note: if `undefined` is specified as a value, this is an alias for\n   * {@link LRUCache#delete}\n   *\n   * Fields on the {@link LRUCache.SetOptions} options param will override\n   * their corresponding values in the constructor options for the scope\n   * of this single `set()` operation.\n   *\n   * If `start` is provided, then that will set the effective start\n   * time for the TTL calculation. Note that this must be a previous\n   * value of `performance.now()` if supported, or a previous value of\n   * `Date.now()` if not.\n   *\n   * Options object may also include `size`, which will prevent\n   * calling the `sizeCalculation` function and just use the specified\n   * number if it is a positive integer, and `noDisposeOnSet` which\n   * will prevent calling a `dispose` function in the case of\n   * overwrites.\n   *\n   * If the `size` (or return value of `sizeCalculation`) for a given\n   * entry is greater than `maxEntrySize`, then the item will not be\n   * added to the cache.\n   *\n   * Will update the recency of the entry.\n   *\n   * If the value is `undefined`, then this is an alias for\n   * `cache.delete(key)`. `undefined` is never stored in the cache.\n   */\n  set(\n    k: K,\n    v: V | BackgroundFetch | undefined,\n    setOptions: LRUCache.SetOptions = {},\n  ) {\n    if (v === undefined) {\n      this.delete(k)\n      return this\n    }\n    const {\n      ttl = this.ttl,\n      start,\n      noDisposeOnSet = this.noDisposeOnSet,\n      sizeCalculation = this.sizeCalculation,\n      status,\n    } = setOptions\n    let { noUpdateTTL = this.noUpdateTTL } = setOptions\n\n    const size = this.#requireSize(\n      k,\n      v,\n      setOptions.size || 0,\n      sizeCalculation,\n    )\n    // if the item doesn't fit, don't do anything\n    // NB: maxEntrySize set to maxSize by default\n    if (this.maxEntrySize && size > this.maxEntrySize) {\n      if (status) {\n        status.set = 'miss'\n        status.maxEntrySizeExceeded = true\n      }\n      // have to delete, in case something is there already.\n      this.#delete(k, 'set')\n      return this\n    }\n    let index = this.#size === 0 ? undefined : this.#keyMap.get(k)\n    if (index === undefined) {\n      // addition\n      index = (\n        this.#size === 0 ? this.#tail\n        : this.#free.length !== 0 ? this.#free.pop()\n        : this.#size === this.#max ? this.#evict(false)\n        : this.#size) as Index\n      this.#keyList[index] = k\n      this.#valList[index] = v\n      this.#keyMap.set(k, index)\n      this.#next[this.#tail] = index\n      this.#prev[index] = this.#tail\n      this.#tail = index\n      this.#size++\n      this.#addItemSize(index, size, status)\n      if (status) status.set = 'add'\n      noUpdateTTL = false\n      if (this.#hasOnInsert) {\n        this.#onInsert?.(v as V, k, 'add')\n      }\n    } else {\n      // update\n      this.#moveToTail(index)\n      const oldVal = this.#valList[index] as V | BackgroundFetch\n      if (v !== oldVal) {\n        if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {\n          oldVal.__abortController.abort(new Error('replaced'))\n          const { __staleWhileFetching: s } = oldVal\n          if (s !== undefined && !noDisposeOnSet) {\n            if (this.#hasDispose) {\n              this.#dispose?.(s as V, k, 'set')\n            }\n            if (this.#hasDisposeAfter) {\n              this.#disposed?.push([s as V, k, 'set'])\n            }\n          }\n        } else if (!noDisposeOnSet) {\n          if (this.#hasDispose) {\n            this.#dispose?.(oldVal as V, k, 'set')\n          }\n          if (this.#hasDisposeAfter) {\n            this.#disposed?.push([oldVal as V, k, 'set'])\n          }\n        }\n        this.#removeItemSize(index)\n        this.#addItemSize(index, size, status)\n        this.#valList[index] = v\n        if (status) {\n          status.set = 'replace'\n          const oldValue =\n            oldVal && this.#isBackgroundFetch(oldVal) ?\n              oldVal.__staleWhileFetching\n            : oldVal\n          if (oldValue !== undefined) status.oldValue = oldValue\n        }\n      } else if (status) {\n        status.set = 'update'\n      }\n\n      if (this.#hasOnInsert) {\n        this.onInsert?.(v as V, k, v === oldVal ? 'update' : 'replace')\n      }\n    }\n    if (ttl !== 0 && !this.#ttls) {\n      this.#initializeTTLTracking()\n    }\n    if (this.#ttls) {\n      if (!noUpdateTTL) {\n        this.#setItemTTL(index, ttl, start)\n      }\n      if (status) this.#statusTTL(status, index)\n    }\n    if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {\n      const dt = this.#disposed\n      let task: DisposeTask | undefined\n      while ((task = dt?.shift())) {\n        this.#disposeAfter?.(...task)\n      }\n    }\n    return this\n  }\n\n  /**\n   * Evict the least recently used item, returning its value or\n   * `undefined` if cache is empty.\n   */\n  pop(): V | undefined {\n    try {\n      while (this.#size) {\n        const val = this.#valList[this.#head]\n        this.#evict(true)\n        if (this.#isBackgroundFetch(val)) {\n          if (val.__staleWhileFetching) {\n            return val.__staleWhileFetching\n          }\n        } else if (val !== undefined) {\n          return val\n        }\n      }\n    } finally {\n      if (this.#hasDisposeAfter && this.#disposed) {\n        const dt = this.#disposed\n        let task: DisposeTask | undefined\n        while ((task = dt?.shift())) {\n          this.#disposeAfter?.(...task)\n        }\n      }\n    }\n  }\n\n  #evict(free: boolean) {\n    const head = this.#head\n    const k = this.#keyList[head] as K\n    const v = this.#valList[head] as V\n    if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {\n      v.__abortController.abort(new Error('evicted'))\n    } else if (this.#hasDispose || this.#hasDisposeAfter) {\n      if (this.#hasDispose) {\n        this.#dispose?.(v, k, 'evict')\n      }\n      if (this.#hasDisposeAfter) {\n        this.#disposed?.push([v, k, 'evict'])\n      }\n    }\n    this.#removeItemSize(head)\n    if (this.#autopurgeTimers?.[head]) {\n      clearTimeout(this.#autopurgeTimers[head])\n      this.#autopurgeTimers[head] = undefined\n    }\n    // if we aren't about to use the index, then null these out\n    if (free) {\n      this.#keyList[head] = undefined\n      this.#valList[head] = undefined\n      this.#free.push(head)\n    }\n    if (this.#size === 1) {\n      this.#head = this.#tail = 0 as Index\n      this.#free.length = 0\n    } else {\n      this.#head = this.#next[head] as Index\n    }\n    this.#keyMap.delete(k)\n    this.#size--\n    return head\n  }\n\n  /**\n   * Check if a key is in the cache, without updating the recency of use.\n   * Will return false if the item is stale, even though it is technically\n   * in the cache.\n   *\n   * Check if a key is in the cache, without updating the recency of\n   * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set\n   * to `true` in either the options or the constructor.\n   *\n   * Will return `false` if the item is stale, even though it is technically in\n   * the cache. The difference can be determined (if it matters) by using a\n   * `status` argument, and inspecting the `has` field.\n   *\n   * Will not update item age unless\n   * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.\n   */\n  has(k: K, hasOptions: LRUCache.HasOptions = {}) {\n    const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions\n    const index = this.#keyMap.get(k)\n    if (index !== undefined) {\n      const v = this.#valList[index]\n      if (\n        this.#isBackgroundFetch(v) &&\n        v.__staleWhileFetching === undefined\n      ) {\n        return false\n      }\n      if (!this.#isStale(index)) {\n        if (updateAgeOnHas) {\n          this.#updateItemAge(index)\n        }\n        if (status) {\n          status.has = 'hit'\n          this.#statusTTL(status, index)\n        }\n        return true\n      } else if (status) {\n        status.has = 'stale'\n        this.#statusTTL(status, index)\n      }\n    } else if (status) {\n      status.has = 'miss'\n    }\n    return false\n  }\n\n  /**\n   * Like {@link LRUCache#get} but doesn't update recency or delete stale\n   * items.\n   *\n   * Returns `undefined` if the item is stale, unless\n   * {@link LRUCache.OptionsBase.allowStale} is set.\n   */\n  peek(k: K, peekOptions: LRUCache.PeekOptions = {}) {\n    const { allowStale = this.allowStale } = peekOptions\n    const index = this.#keyMap.get(k)\n    if (index === undefined || (!allowStale && this.#isStale(index))) {\n      return\n    }\n    const v = this.#valList[index]\n    // either stale and allowed, or forcing a refresh of non-stale value\n    return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n  }\n\n  #backgroundFetch(\n    k: K,\n    index: Index | undefined,\n    options: LRUCache.FetchOptions,\n    context: any,\n  ): BackgroundFetch {\n    const v = index === undefined ? undefined : this.#valList[index]\n    if (this.#isBackgroundFetch(v)) {\n      return v\n    }\n\n    const ac = new AC()\n    const { signal } = options\n    // when/if our AC signals, then stop listening to theirs.\n    signal?.addEventListener('abort', () => ac.abort(signal.reason), {\n      signal: ac.signal,\n    })\n\n    const fetchOpts = {\n      signal: ac.signal,\n      options,\n      context,\n    }\n\n    const cb = (v: V | undefined, updateCache = false): V | undefined => {\n      const { aborted } = ac.signal\n      const ignoreAbort = options.ignoreFetchAbort && v !== undefined\n      const proceed = options.ignoreFetchAbort ||\n        !!(options.allowStaleOnFetchAbort && v !== undefined)\n      if (options.status) {\n        if (aborted && !updateCache) {\n          options.status.fetchAborted = true\n          options.status.fetchError = ac.signal.reason\n          if (ignoreAbort) options.status.fetchAbortIgnored = true\n        } else {\n          options.status.fetchResolved = true\n        }\n      }\n      if (aborted && !ignoreAbort && !updateCache) {\n        return fetchFail(ac.signal.reason, proceed)\n      }\n      // either we didn't abort, and are still here, or we did, and ignored\n      const bf = p as BackgroundFetch\n      // if nothing else has been written there but we're set to update the\n      // cache and ignore the abort, or if it's still pending on this specific\n      // background request, then write it to the cache.\n      const vl = this.#valList[index as Index]\n      if (vl === p || (ignoreAbort && updateCache && vl === undefined)) {\n        if (v === undefined) {\n          if (bf.__staleWhileFetching !== undefined) {\n            this.#valList[index as Index] = bf.__staleWhileFetching\n          } else {\n            this.#delete(k, 'fetch')\n          }\n        } else {\n          if (options.status) options.status.fetchUpdated = true\n          this.set(k, v, fetchOpts.options)\n        }\n      }\n      return v\n    }\n\n    const eb = (er: any) => {\n      if (options.status) {\n        options.status.fetchRejected = true\n        options.status.fetchError = er\n      }\n      // do not pass go, do not collect $200\n      return fetchFail(er, false)\n    }\n\n    const fetchFail = (er: any, proceed: boolean): V | undefined => {\n      const { aborted } = ac.signal\n      const allowStaleAborted = aborted && options.allowStaleOnFetchAbort\n      const allowStale =\n        allowStaleAborted || options.allowStaleOnFetchRejection\n      const noDelete = allowStale || options.noDeleteOnFetchRejection\n      const bf = p as BackgroundFetch\n      if (this.#valList[index as Index] === p) {\n        // if we allow stale on fetch rejections, then we need to ensure that\n        // the stale value is not removed from the cache when the fetch fails.\n        const del = !noDelete ||\n          !proceed && bf.__staleWhileFetching === undefined\n        if (del) {\n          this.#delete(k, 'fetch')\n        } else if (!allowStaleAborted) {\n          // still replace the *promise* with the stale value,\n          // since we are done with the promise at this point.\n          // leave it untouched if we're still waiting for an\n          // aborted background fetch that hasn't yet returned.\n          this.#valList[index as Index] = bf.__staleWhileFetching\n        }\n      }\n      if (allowStale) {\n        if (options.status && bf.__staleWhileFetching !== undefined) {\n          options.status.returnedStale = true\n        }\n        return bf.__staleWhileFetching\n      } else if (bf.__returned === bf) {\n        throw er\n      }\n    }\n\n    const pcall = (\n      res: (v: V | undefined) => void,\n      rej: (e: any) => void,\n    ) => {\n      const fmp = this.#fetchMethod?.(k, v, fetchOpts)\n      if (fmp && fmp instanceof Promise) {\n        fmp.then(v => res(v === undefined ? undefined : v), rej)\n      }\n      // ignored, we go until we finish, regardless.\n      // defer check until we are actually aborting,\n      // so fetchMethod can override.\n      ac.signal.addEventListener('abort', () => {\n        if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) {\n          res(undefined)\n          // when it eventually resolves, update the cache.\n          if (options.allowStaleOnFetchAbort) {\n            res = v => cb(v, true)\n          }\n        }\n      })\n    }\n\n    if (options.status) options.status.fetchDispatched = true\n    const p = new Promise(pcall).then(cb, eb)\n    const bf: BackgroundFetch = Object.assign(p, {\n      __abortController: ac,\n      __staleWhileFetching: v,\n      __returned: undefined,\n    })\n\n    if (index === undefined) {\n      // internal, don't expose status.\n      this.set(k, bf, { ...fetchOpts.options, status: undefined })\n      index = this.#keyMap.get(k)\n    } else {\n      this.#valList[index] = bf\n    }\n    return bf\n  }\n\n  #isBackgroundFetch(p: any): p is BackgroundFetch {\n    if (!this.#hasFetchMethod) return false\n    const b = p as BackgroundFetch\n    return (\n      !!b &&\n      b instanceof Promise &&\n      b.hasOwnProperty('__staleWhileFetching') &&\n      b.__abortController instanceof AC\n    )\n  }\n\n  /**\n   * Make an asynchronous cached fetch using the\n   * {@link LRUCache.OptionsBase.fetchMethod} function.\n   *\n   * If the value is in the cache and not stale, then the returned\n   * Promise resolves to the value.\n   *\n   * If not in the cache, or beyond its TTL staleness, then\n   * `fetchMethod(key, staleValue, { options, signal, context })` is\n   * called, and the value returned will be added to the cache once\n   * resolved.\n   *\n   * If called with `allowStale`, and an asynchronous fetch is\n   * currently in progress to reload a stale value, then the former\n   * stale value will be returned.\n   *\n   * If called with `forceRefresh`, then the cached item will be\n   * re-fetched, even if it is not stale. However, if `allowStale` is also\n   * set, then the old value will still be returned. This is useful\n   * in cases where you want to force a reload of a cached value. If\n   * a background fetch is already in progress, then `forceRefresh`\n   * has no effect.\n   *\n   * If multiple fetches for the same key are issued, then they will all be\n   * coalesced into a single call to fetchMethod.\n   *\n   * Note that this means that handling options such as\n   * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort},\n   * {@link LRUCache.FetchOptions.signal},\n   * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be\n   * determined by the FIRST fetch() call for a given key.\n   *\n   * This is a known (fixable) shortcoming which will be addresed on when\n   * someone complains about it, as the fix would involve added complexity and\n   * may not be worth the costs for this edge case.\n   *\n   * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is\n   * effectively an alias for `Promise.resolve(cache.get(key))`.\n   *\n   * When the fetch method resolves to a value, if the fetch has not\n   * been aborted due to deletion, eviction, or being overwritten,\n   * then it is added to the cache using the options provided.\n   *\n   * If the key is evicted or deleted before the `fetchMethod`\n   * resolves, then the AbortSignal passed to the `fetchMethod` will\n   * receive an `abort` event, and the promise returned by `fetch()`\n   * will reject with the reason for the abort.\n   *\n   * If a `signal` is passed to the `fetch()` call, then aborting the\n   * signal will abort the fetch and cause the `fetch()` promise to\n   * reject with the reason provided.\n   *\n   * **Setting `context`**\n   *\n   * If an `FC` type is set to a type other than `unknown`, `void`, or\n   * `undefined` in the {@link LRUCache} constructor, then all\n   * calls to `cache.fetch()` _must_ provide a `context` option. If\n   * set to `undefined` or `void`, then calls to fetch _must not_\n   * provide a `context` option.\n   *\n   * The `context` param allows you to provide arbitrary data that\n   * might be relevant in the course of fetching the data. It is only\n   * relevant for the course of a single `fetch()` operation, and\n   * discarded afterwards.\n   *\n   * **Note: `fetch()` calls are inflight-unique**\n   *\n   * If you call `fetch()` multiple times with the same key value,\n   * then every call after the first will resolve on the same\n   * promise1,\n   * _even if they have different settings that would otherwise change\n   * the behavior of the fetch_, such as `noDeleteOnFetchRejection`\n   * or `ignoreFetchAbort`.\n   *\n   * In most cases, this is not a problem (in fact, only fetching\n   * something once is what you probably want, if you're caching in\n   * the first place). If you are changing the fetch() options\n   * dramatically between runs, there's a good chance that you might\n   * be trying to fit divergent semantics into a single object, and\n   * would be better off with multiple cache instances.\n   *\n   * **1**: Ie, they're not the \"same Promise\", but they resolve at\n   * the same time, because they're both waiting on the same\n   * underlying fetchMethod response.\n   */\n\n  fetch(\n    k: K,\n    fetchOptions: unknown extends FC ? LRUCache.FetchOptions\n    : FC extends undefined | void ? LRUCache.FetchOptionsNoContext\n    : LRUCache.FetchOptionsWithContext,\n  ): Promise\n\n  // this overload not allowed if context is required\n  fetch(\n    k: unknown extends FC ? K\n    : FC extends undefined | void ? K\n    : never,\n    fetchOptions?: unknown extends FC ? LRUCache.FetchOptions\n    : FC extends undefined | void ? LRUCache.FetchOptionsNoContext\n    : never,\n  ): Promise\n\n  async fetch(\n    k: K,\n    fetchOptions: LRUCache.FetchOptions = {},\n  ): Promise {\n    const {\n      // get options\n      allowStale = this.allowStale,\n      updateAgeOnGet = this.updateAgeOnGet,\n      noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n      // set options\n      ttl = this.ttl,\n      noDisposeOnSet = this.noDisposeOnSet,\n      size = 0,\n      sizeCalculation = this.sizeCalculation,\n      noUpdateTTL = this.noUpdateTTL,\n      // fetch exclusive options\n      noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,\n      allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,\n      ignoreFetchAbort = this.ignoreFetchAbort,\n      allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,\n      context,\n      forceRefresh = false,\n      status,\n      signal,\n    } = fetchOptions\n\n    if (!this.#hasFetchMethod) {\n      if (status) status.fetch = 'get'\n      return this.get(k, {\n        allowStale,\n        updateAgeOnGet,\n        noDeleteOnStaleGet,\n        status,\n      })\n    }\n\n    const options = {\n      allowStale,\n      updateAgeOnGet,\n      noDeleteOnStaleGet,\n      ttl,\n      noDisposeOnSet,\n      size,\n      sizeCalculation,\n      noUpdateTTL,\n      noDeleteOnFetchRejection,\n      allowStaleOnFetchRejection,\n      allowStaleOnFetchAbort,\n      ignoreFetchAbort,\n      status,\n      signal,\n    }\n\n    let index = this.#keyMap.get(k)\n    if (index === undefined) {\n      if (status) status.fetch = 'miss'\n      const p = this.#backgroundFetch(k, index, options, context)\n      return (p.__returned = p)\n    } else {\n      // in cache, maybe already fetching\n      const v = this.#valList[index]\n      if (this.#isBackgroundFetch(v)) {\n        const stale = allowStale && v.__staleWhileFetching !== undefined\n        if (status) {\n          status.fetch = 'inflight'\n          if (stale) status.returnedStale = true\n        }\n        return stale ? v.__staleWhileFetching : (v.__returned = v)\n      }\n\n      // if we force a refresh, that means do NOT serve the cached value,\n      // unless we are already in the process of refreshing the cache.\n      const isStale = this.#isStale(index)\n      if (!forceRefresh && !isStale) {\n        if (status) status.fetch = 'hit'\n        this.#moveToTail(index)\n        if (updateAgeOnGet) {\n          this.#updateItemAge(index)\n        }\n        if (status) this.#statusTTL(status, index)\n        return v\n      }\n\n      // ok, it is stale or a forced refresh, and not already fetching.\n      // refresh the cache.\n      const p = this.#backgroundFetch(k, index, options, context)\n      const hasStale = p.__staleWhileFetching !== undefined\n      const staleVal = hasStale && allowStale\n      if (status) {\n        status.fetch = isStale ? 'stale' : 'refresh'\n        if (staleVal && isStale) status.returnedStale = true\n      }\n      return staleVal ? p.__staleWhileFetching : (p.__returned = p)\n    }\n  }\n\n  /**\n   * In some cases, `cache.fetch()` may resolve to `undefined`, either because\n   * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning\n   * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or\n   * because `ignoreFetchAbort` was specified (either to the constructor or\n   * in the {@link LRUCache.FetchOptions}). Also, the\n   * {@link LRUCache.OptionsBase.fetchMethod} may return `undefined` or `void`, making\n   * the test even more complicated.\n   *\n   * Because inferring the cases where `undefined` might be returned are so\n   * cumbersome, but testing for `undefined` can also be annoying, this method\n   * can be used, which will reject if `this.fetch()` resolves to undefined.\n   */\n  forceFetch(\n    k: K,\n    fetchOptions: unknown extends FC ? LRUCache.FetchOptions\n    : FC extends undefined | void ? LRUCache.FetchOptionsNoContext\n    : LRUCache.FetchOptionsWithContext,\n  ): Promise\n  // this overload not allowed if context is required\n  forceFetch(\n    k: unknown extends FC ? K\n    : FC extends undefined | void ? K\n    : never,\n    fetchOptions?: unknown extends FC ? LRUCache.FetchOptions\n    : FC extends undefined | void ? LRUCache.FetchOptionsNoContext\n    : never,\n  ): Promise\n  async forceFetch(\n    k: K,\n    fetchOptions: LRUCache.FetchOptions = {},\n  ): Promise {\n    const v = await this.fetch(\n      k,\n      fetchOptions as unknown extends FC ? LRUCache.FetchOptions\n      : FC extends undefined | void ? LRUCache.FetchOptionsNoContext\n      : LRUCache.FetchOptionsWithContext,\n    )\n    if (v === undefined) throw new Error('fetch() returned undefined')\n    return v\n  }\n\n  /**\n   * If the key is found in the cache, then this is equivalent to\n   * {@link LRUCache#get}. If not, in the cache, then calculate the value using\n   * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache.\n   *\n   * If an `FC` type is set to a type other than `unknown`, `void`, or\n   * `undefined` in the LRUCache constructor, then all calls to `cache.memo()`\n   * _must_ provide a `context` option. If set to `undefined` or `void`, then\n   * calls to memo _must not_ provide a `context` option.\n   *\n   * The `context` param allows you to provide arbitrary data that might be\n   * relevant in the course of fetching the data. It is only relevant for the\n   * course of a single `memo()` operation, and discarded afterwards.\n   */\n  memo(\n    k: K,\n    memoOptions: unknown extends FC ? LRUCache.MemoOptions\n    : FC extends undefined | void ? LRUCache.MemoOptionsNoContext\n    : LRUCache.MemoOptionsWithContext,\n  ): V\n  // this overload not allowed if context is required\n  memo(\n    k: unknown extends FC ? K\n    : FC extends undefined | void ? K\n    : never,\n    memoOptions?: unknown extends FC ? LRUCache.MemoOptions\n    : FC extends undefined | void ? LRUCache.MemoOptionsNoContext\n    : never,\n  ): V\n  memo(k: K, memoOptions: LRUCache.MemoOptions = {}) {\n    const memoMethod = this.#memoMethod\n    if (!memoMethod) {\n      throw new Error('no memoMethod provided to constructor')\n    }\n    const { context, forceRefresh, ...options } = memoOptions\n    const v = this.get(k, options)\n    if (!forceRefresh && v !== undefined) return v\n    const vv = memoMethod(k, v, {\n      options,\n      context,\n    } as LRUCache.MemoizerOptions)\n    this.set(k, vv, options)\n    return vv\n  }\n\n  /**\n   * Return a value from the cache. Will update the recency of the cache\n   * entry found.\n   *\n   * If the key is not found, get() will return `undefined`.\n   */\n  get(k: K, getOptions: LRUCache.GetOptions = {}) {\n    const {\n      allowStale = this.allowStale,\n      updateAgeOnGet = this.updateAgeOnGet,\n      noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n      status,\n    } = getOptions\n    const index = this.#keyMap.get(k)\n    if (index !== undefined) {\n      const value = this.#valList[index]\n      const fetching = this.#isBackgroundFetch(value)\n      if (status) this.#statusTTL(status, index)\n      if (this.#isStale(index)) {\n        if (status) status.get = 'stale'\n        // delete only if not an in-flight background fetch\n        if (!fetching) {\n          if (!noDeleteOnStaleGet) {\n            this.#delete(k, 'expire')\n          }\n          if (status && allowStale) status.returnedStale = true\n          return allowStale ? value : undefined\n        } else {\n          if (\n            status &&\n            allowStale &&\n            value.__staleWhileFetching !== undefined\n          ) {\n            status.returnedStale = true\n          }\n          return allowStale ? value.__staleWhileFetching : undefined\n        }\n      } else {\n        if (status) status.get = 'hit'\n        // if we're currently fetching it, we don't actually have it yet\n        // it's not stale, which means this isn't a staleWhileRefetching.\n        // If it's not stale, and fetching, AND has a __staleWhileFetching\n        // value, then that means the user fetched with {forceRefresh:true},\n        // so it's safe to return that value.\n        if (fetching) {\n          return value.__staleWhileFetching\n        }\n        this.#moveToTail(index)\n        if (updateAgeOnGet) {\n          this.#updateItemAge(index)\n        }\n        return value\n      }\n    } else if (status) {\n      status.get = 'miss'\n    }\n  }\n\n  #connect(p: Index, n: Index) {\n    this.#prev[n] = p\n    this.#next[p] = n\n  }\n\n  #moveToTail(index: Index): void {\n    // if tail already, nothing to do\n    // if head, move head to next[index]\n    // else\n    //   move next[prev[index]] to next[index] (head has no prev)\n    //   move prev[next[index]] to prev[index]\n    // prev[index] = tail\n    // next[tail] = index\n    // tail = index\n    if (index !== this.#tail) {\n      if (index === this.#head) {\n        this.#head = this.#next[index] as Index\n      } else {\n        this.#connect(\n          this.#prev[index] as Index,\n          this.#next[index] as Index,\n        )\n      }\n      this.#connect(this.#tail, index)\n      this.#tail = index\n    }\n  }\n\n  /**\n   * Deletes a key out of the cache.\n   *\n   * Returns true if the key was deleted, false otherwise.\n   */\n  delete(k: K) {\n    return this.#delete(k, 'delete')\n  }\n\n  #delete(k: K, reason: LRUCache.DisposeReason) {\n    let deleted = false\n    if (this.#size !== 0) {\n      const index = this.#keyMap.get(k)\n      if (index !== undefined) {\n        if (this.#autopurgeTimers?.[index]) {\n          clearTimeout(this.#autopurgeTimers?.[index])\n          this.#autopurgeTimers[index] = undefined\n        }\n        deleted = true\n        if (this.#size === 1) {\n          this.#clear(reason)\n        } else {\n          this.#removeItemSize(index)\n          const v = this.#valList[index]\n          if (this.#isBackgroundFetch(v)) {\n            v.__abortController.abort(new Error('deleted'))\n          } else if (this.#hasDispose || this.#hasDisposeAfter) {\n            if (this.#hasDispose) {\n              this.#dispose?.(v as V, k, reason)\n            }\n            if (this.#hasDisposeAfter) {\n              this.#disposed?.push([v as V, k, reason])\n            }\n          }\n          this.#keyMap.delete(k)\n          this.#keyList[index] = undefined\n          this.#valList[index] = undefined\n          if (index === this.#tail) {\n            this.#tail = this.#prev[index] as Index\n          } else if (index === this.#head) {\n            this.#head = this.#next[index] as Index\n          } else {\n            const pi = this.#prev[index] as number\n            this.#next[pi] = this.#next[index] as number\n            const ni = this.#next[index] as number\n            this.#prev[ni] = this.#prev[index] as number\n          }\n          this.#size--\n          this.#free.push(index)\n        }\n      }\n    }\n    if (this.#hasDisposeAfter && this.#disposed?.length) {\n      const dt = this.#disposed\n      let task: DisposeTask | undefined\n      while ((task = dt?.shift())) {\n        this.#disposeAfter?.(...task)\n      }\n    }\n    return deleted\n  }\n\n  /**\n   * Clear the cache entirely, throwing away all values.\n   */\n  clear() {\n    return this.#clear('delete')\n  }\n  #clear(reason: LRUCache.DisposeReason) {\n    for (const index of this.#rindexes({ allowStale: true })) {\n      const v = this.#valList[index]\n      if (this.#isBackgroundFetch(v)) {\n        v.__abortController.abort(new Error('deleted'))\n      } else {\n        const k = this.#keyList[index]\n        if (this.#hasDispose) {\n          this.#dispose?.(v as V, k as K, reason)\n        }\n        if (this.#hasDisposeAfter) {\n          this.#disposed?.push([v as V, k as K, reason])\n        }\n      }\n    }\n\n    this.#keyMap.clear()\n    this.#valList.fill(undefined)\n    this.#keyList.fill(undefined)\n    if (this.#ttls && this.#starts) {\n      this.#ttls.fill(0)\n      this.#starts.fill(0)\n      for (const t of this.#autopurgeTimers ?? []) {\n        if (t !== undefined) clearTimeout(t)\n      }\n      this.#autopurgeTimers?.fill(undefined)\n    }\n    if (this.#sizes) {\n      this.#sizes.fill(0)\n    }\n    this.#head = 0 as Index\n    this.#tail = 0 as Index\n    this.#free.length = 0\n    this.#calculatedSize = 0\n    this.#size = 0\n    if (this.#hasDisposeAfter && this.#disposed) {\n      const dt = this.#disposed\n      let task: DisposeTask | undefined\n      while ((task = dt?.shift())) {\n        this.#disposeAfter?.(...task)\n      }\n    }\n  }\n}\n", "import { LRUCache } from 'lru-cache'\nimport { posix, win32 } from 'node:path'\n\nimport { fileURLToPath } from 'node:url'\n\nimport {\n  lstatSync,\n  readdir as readdirCB,\n  readdirSync,\n  readlinkSync,\n  realpathSync as rps,\n} from 'fs'\nimport * as actualFS from 'node:fs'\n\nconst realpathSync = rps.native\n// TODO: test perf of fs/promises realpath vs realpathCB,\n// since the promises one uses realpath.native\n\nimport { lstat, readdir, readlink, realpath } from 'node:fs/promises'\n\nimport { Minipass } from 'minipass'\nimport type { Dirent, Stats } from 'node:fs'\n\n/**\n * An object that will be used to override the default `fs`\n * methods.  Any methods that are not overridden will use Node's\n * built-in implementations.\n *\n * - lstatSync\n * - readdir (callback `withFileTypes` Dirent variant, used for\n *   readdirCB and most walks)\n * - readdirSync\n * - readlinkSync\n * - realpathSync\n * - promises: Object containing the following async methods:\n *   - lstat\n *   - readdir (Dirent variant only)\n *   - readlink\n *   - realpath\n */\nexport interface FSOption {\n  lstatSync?: (path: string) => Stats\n  readdir?: (\n    path: string,\n    options: { withFileTypes: true },\n    cb: (er: NodeJS.ErrnoException | null, entries?: Dirent[]) => any,\n  ) => void\n  readdirSync?: (\n    path: string,\n    options: { withFileTypes: true },\n  ) => Dirent[]\n  readlinkSync?: (path: string) => string\n  realpathSync?: (path: string) => string\n  promises?: {\n    lstat?: (path: string) => Promise\n    readdir?: (\n      path: string,\n      options: { withFileTypes: true },\n    ) => Promise\n    readlink?: (path: string) => Promise\n    realpath?: (path: string) => Promise\n    [k: string]: any\n  }\n  [k: string]: any\n}\n\ninterface FSValue {\n  lstatSync: (path: string) => Stats\n  readdir: (\n    path: string,\n    options: { withFileTypes: true },\n    cb: (er: NodeJS.ErrnoException | null, entries?: Dirent[]) => any,\n  ) => void\n  readdirSync: (path: string, options: { withFileTypes: true }) => Dirent[]\n  readlinkSync: (path: string) => string\n  realpathSync: (path: string) => string\n  promises: {\n    lstat: (path: string) => Promise\n    readdir: (\n      path: string,\n      options: { withFileTypes: true },\n    ) => Promise\n    readlink: (path: string) => Promise\n    realpath: (path: string) => Promise\n    [k: string]: any\n  }\n  [k: string]: any\n}\n\nconst defaultFS: FSValue = {\n  lstatSync,\n  readdir: readdirCB,\n  readdirSync,\n  readlinkSync,\n  realpathSync,\n  promises: {\n    lstat,\n    readdir,\n    readlink,\n    realpath,\n  },\n}\n\n// if they just gave us require('fs') then use our default\nconst fsFromOption = (fsOption?: FSOption): FSValue =>\n  !fsOption || fsOption === defaultFS || fsOption === actualFS ?\n    defaultFS\n  : {\n      ...defaultFS,\n      ...fsOption,\n      promises: {\n        ...defaultFS.promises,\n        ...(fsOption.promises || {}),\n      },\n    }\n\n// turn something like //?/c:/ into c:\\\nconst uncDriveRegexp = /^\\\\\\\\\\?\\\\([a-z]:)\\\\?$/i\nconst uncToDrive = (rootPath: string): string =>\n  rootPath.replace(/\\//g, '\\\\').replace(uncDriveRegexp, '$1\\\\')\n\n// windows paths are separated by either / or \\\nconst eitherSep = /[\\\\\\/]/\n\nconst UNKNOWN = 0 // may not even exist, for all we know\nconst IFIFO = 0b0001\nconst IFCHR = 0b0010\nconst IFDIR = 0b0100\nconst IFBLK = 0b0110\nconst IFREG = 0b1000\nconst IFLNK = 0b1010\nconst IFSOCK = 0b1100\nconst IFMT = 0b1111\n\nexport type Type =\n  | 'Unknown'\n  | 'FIFO'\n  | 'CharacterDevice'\n  | 'Directory'\n  | 'BlockDevice'\n  | 'File'\n  | 'SymbolicLink'\n  | 'Socket'\n\n// mask to unset low 4 bits\nconst IFMT_UNKNOWN = ~IFMT\n\n// set after successfully calling readdir() and getting entries.\nconst READDIR_CALLED = 0b0000_0001_0000\n// set after a successful lstat()\nconst LSTAT_CALLED = 0b0000_0010_0000\n// set if an entry (or one of its parents) is definitely not a dir\nconst ENOTDIR = 0b0000_0100_0000\n// set if an entry (or one of its parents) does not exist\n// (can also be set on lstat errors like EACCES or ENAMETOOLONG)\nconst ENOENT = 0b0000_1000_0000\n// cannot have child entries -- also verify &IFMT is either IFDIR or IFLNK\n// set if we fail to readlink\nconst ENOREADLINK = 0b0001_0000_0000\n// set if we know realpath() will fail\nconst ENOREALPATH = 0b0010_0000_0000\n\nconst ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH\nconst TYPEMASK = 0b0011_1111_1111\n\nconst entToType = (s: Dirent | Stats) =>\n  s.isFile() ? IFREG\n  : s.isDirectory() ? IFDIR\n  : s.isSymbolicLink() ? IFLNK\n  : s.isCharacterDevice() ? IFCHR\n  : s.isBlockDevice() ? IFBLK\n  : s.isSocket() ? IFSOCK\n  : s.isFIFO() ? IFIFO\n  : UNKNOWN\n\n// normalize unicode path names\nconst normalizeCache = new LRUCache({ max: 2 ** 12 })\nconst normalize = (s: string) => {\n  const c = normalizeCache.get(s)\n  if (c) return c\n  const n = s.normalize('NFKD')\n  normalizeCache.set(s, n)\n  return n\n}\n\nconst normalizeNocaseCache = new LRUCache({ max: 2 ** 12 })\nconst normalizeNocase = (s: string) => {\n  const c = normalizeNocaseCache.get(s)\n  if (c) return c\n  const n = normalize(s.toLowerCase())\n  normalizeNocaseCache.set(s, n)\n  return n\n}\n\n/**\n * Options that may be provided to the Path constructor\n */\nexport interface PathOpts {\n  fullpath?: string\n  relative?: string\n  relativePosix?: string\n  parent?: PathBase\n  /**\n   * See {@link FSOption}\n   */\n  fs?: FSOption\n}\n\n/**\n * An LRUCache for storing resolved path strings or Path objects.\n * @internal\n */\nexport class ResolveCache extends LRUCache {\n  constructor() {\n    super({ max: 256 })\n  }\n}\n\n// In order to prevent blowing out the js heap by allocating hundreds of\n// thousands of Path entries when walking extremely large trees, the \"children\"\n// in this tree are represented by storing an array of Path entries in an\n// LRUCache, indexed by the parent.  At any time, Path.children() may return an\n// empty array, indicating that it doesn't know about any of its children, and\n// thus has to rebuild that cache.  This is fine, it just means that we don't\n// benefit as much from having the cached entries, but huge directory walks\n// don't blow out the stack, and smaller ones are still as fast as possible.\n//\n//It does impose some complexity when building up the readdir data, because we\n//need to pass a reference to the children array that we started with.\n\n/**\n * an LRUCache for storing child entries.\n * @internal\n */\nexport class ChildrenCache extends LRUCache {\n  constructor(maxSize: number = 16 * 1024) {\n    super({\n      maxSize,\n      // parent + children\n      sizeCalculation: a => a.length + 1,\n    })\n  }\n}\n\n/**\n * Array of Path objects, plus a marker indicating the first provisional entry\n *\n * @internal\n */\nexport type Children = PathBase[] & { provisional: number }\n\nconst setAsCwd = Symbol('PathScurry setAsCwd')\n\n/**\n * Path objects are sort of like a super-powered\n * {@link https://nodejs.org/docs/latest/api/fs.html#class-fsdirent fs.Dirent}\n *\n * Each one represents a single filesystem entry on disk, which may or may not\n * exist. It includes methods for reading various types of information via\n * lstat, readlink, and readdir, and caches all information to the greatest\n * degree possible.\n *\n * Note that fs operations that would normally throw will instead return an\n * \"empty\" value. This is in order to prevent excessive overhead from error\n * stack traces.\n */\nexport abstract class PathBase implements Dirent {\n  /**\n   * the basename of this path\n   *\n   * **Important**: *always* test the path name against any test string\n   * usingthe {@link isNamed} method, and not by directly comparing this\n   * string. Otherwise, unicode path strings that the system sees as identical\n   * will not be properly treated as the same path, leading to incorrect\n   * behavior and possible security issues.\n   */\n  name: string\n  /**\n   * the Path entry corresponding to the path root.\n   *\n   * @internal\n   */\n  root: PathBase\n  /**\n   * All roots found within the current PathScurry family\n   *\n   * @internal\n   */\n  roots: { [k: string]: PathBase }\n  /**\n   * a reference to the parent path, or undefined in the case of root entries\n   *\n   * @internal\n   */\n  parent?: PathBase\n  /**\n   * boolean indicating whether paths are compared case-insensitively\n   * @internal\n   */\n  nocase: boolean\n\n  /**\n   * boolean indicating that this path is the current working directory\n   * of the PathScurry collection that contains it.\n   */\n  isCWD: boolean = false\n\n  /**\n   * the string or regexp used to split paths. On posix, it is `'/'`, and on\n   * windows it is a RegExp matching either `'/'` or `'\\\\'`\n   */\n  abstract splitSep: string | RegExp\n  /**\n   * The path separator string to use when joining paths\n   */\n  abstract sep: string\n\n  // potential default fs override\n  #fs: FSValue\n\n  // Stats fields\n  #dev?: number\n  get dev() {\n    return this.#dev\n  }\n  #mode?: number\n  get mode() {\n    return this.#mode\n  }\n  #nlink?: number\n  get nlink() {\n    return this.#nlink\n  }\n  #uid?: number\n  get uid() {\n    return this.#uid\n  }\n  #gid?: number\n  get gid() {\n    return this.#gid\n  }\n  #rdev?: number\n  get rdev() {\n    return this.#rdev\n  }\n  #blksize?: number\n  get blksize() {\n    return this.#blksize\n  }\n  #ino?: number\n  get ino() {\n    return this.#ino\n  }\n  #size?: number\n  get size() {\n    return this.#size\n  }\n  #blocks?: number\n  get blocks() {\n    return this.#blocks\n  }\n  #atimeMs?: number\n  get atimeMs() {\n    return this.#atimeMs\n  }\n  #mtimeMs?: number\n  get mtimeMs() {\n    return this.#mtimeMs\n  }\n  #ctimeMs?: number\n  get ctimeMs() {\n    return this.#ctimeMs\n  }\n  #birthtimeMs?: number\n  get birthtimeMs() {\n    return this.#birthtimeMs\n  }\n  #atime?: Date\n  get atime() {\n    return this.#atime\n  }\n  #mtime?: Date\n  get mtime() {\n    return this.#mtime\n  }\n  #ctime?: Date\n  get ctime() {\n    return this.#ctime\n  }\n  #birthtime?: Date\n  get birthtime() {\n    return this.#birthtime\n  }\n\n  #matchName: string\n  #depth?: number\n  #fullpath?: string\n  #fullpathPosix?: string\n  #relative?: string\n  #relativePosix?: string\n  #type: number\n  #children: ChildrenCache\n  #linkTarget?: PathBase\n  #realpath?: PathBase\n\n  /**\n   * This property is for compatibility with the Dirent class as of\n   * Node v20, where Dirent['parentPath'] refers to the path of the\n   * directory that was passed to readdir. For root entries, it's the path\n   * to the entry itself.\n   */\n  get parentPath(): string {\n    return (this.parent || this).fullpath()\n  }\n\n  /* c8 ignore start */\n  /**\n   * Deprecated alias for Dirent['parentPath'] Somewhat counterintuitively,\n   * this property refers to the *parent* path, not the path object itself.\n   *\n   * @deprecated\n   */\n  get path(): string {\n    return this.parentPath\n  }\n  /* c8 ignore stop */\n\n  /**\n   * Do not create new Path objects directly.  They should always be accessed\n   * via the PathScurry class or other methods on the Path class.\n   *\n   * @internal\n   */\n  constructor(\n    name: string,\n    type: number = UNKNOWN,\n    root: PathBase | undefined,\n    roots: { [k: string]: PathBase },\n    nocase: boolean,\n    children: ChildrenCache,\n    opts: PathOpts,\n  ) {\n    this.name = name\n    this.#matchName = nocase ? normalizeNocase(name) : normalize(name)\n    this.#type = type & TYPEMASK\n    this.nocase = nocase\n    this.roots = roots\n    this.root = root || this\n    this.#children = children\n    this.#fullpath = opts.fullpath\n    this.#relative = opts.relative\n    this.#relativePosix = opts.relativePosix\n    this.parent = opts.parent\n    if (this.parent) {\n      this.#fs = this.parent.#fs\n    } else {\n      this.#fs = fsFromOption(opts.fs)\n    }\n  }\n\n  /**\n   * Returns the depth of the Path object from its root.\n   *\n   * For example, a path at `/foo/bar` would have a depth of 2.\n   */\n  depth(): number {\n    if (this.#depth !== undefined) return this.#depth\n    if (!this.parent) return (this.#depth = 0)\n    return (this.#depth = this.parent.depth() + 1)\n  }\n\n  /**\n   * @internal\n   */\n  abstract getRootString(path: string): string\n  /**\n   * @internal\n   */\n  abstract getRoot(rootPath: string): PathBase\n  /**\n   * @internal\n   */\n  abstract newChild(name: string, type?: number, opts?: PathOpts): PathBase\n\n  /**\n   * @internal\n   */\n  childrenCache() {\n    return this.#children\n  }\n\n  /**\n   * Get the Path object referenced by the string path, resolved from this Path\n   */\n  resolve(path?: string): PathBase {\n    if (!path) {\n      return this\n    }\n    const rootPath = this.getRootString(path)\n    const dir = path.substring(rootPath.length)\n    const dirParts = dir.split(this.splitSep)\n    const result: PathBase =\n      rootPath ?\n        this.getRoot(rootPath).#resolveParts(dirParts)\n      : this.#resolveParts(dirParts)\n    return result\n  }\n\n  #resolveParts(dirParts: string[]) {\n    let p: PathBase = this\n    for (const part of dirParts) {\n      p = p.child(part)\n    }\n    return p\n  }\n\n  /**\n   * Returns the cached children Path objects, if still available.  If they\n   * have fallen out of the cache, then returns an empty array, and resets the\n   * READDIR_CALLED bit, so that future calls to readdir() will require an fs\n   * lookup.\n   *\n   * @internal\n   */\n  children(): Children {\n    const cached = this.#children.get(this)\n    if (cached) {\n      return cached\n    }\n    const children: Children = Object.assign([], { provisional: 0 })\n    this.#children.set(this, children)\n    this.#type &= ~READDIR_CALLED\n    return children\n  }\n\n  /**\n   * Resolves a path portion and returns or creates the child Path.\n   *\n   * Returns `this` if pathPart is `''` or `'.'`, or `parent` if pathPart is\n   * `'..'`.\n   *\n   * This should not be called directly.  If `pathPart` contains any path\n   * separators, it will lead to unsafe undefined behavior.\n   *\n   * Use `Path.resolve()` instead.\n   *\n   * @internal\n   */\n  child(pathPart: string, opts?: PathOpts): PathBase {\n    if (pathPart === '' || pathPart === '.') {\n      return this\n    }\n    if (pathPart === '..') {\n      return this.parent || this\n    }\n\n    // find the child\n    const children = this.children()\n    const name =\n      this.nocase ? normalizeNocase(pathPart) : normalize(pathPart)\n    for (const p of children) {\n      if (p.#matchName === name) {\n        return p\n      }\n    }\n\n    // didn't find it, create provisional child, since it might not\n    // actually exist.  If we know the parent isn't a dir, then\n    // in fact it CAN'T exist.\n    const s = this.parent ? this.sep : ''\n    const fullpath =\n      this.#fullpath ? this.#fullpath + s + pathPart : undefined\n    const pchild = this.newChild(pathPart, UNKNOWN, {\n      ...opts,\n      parent: this,\n      fullpath,\n    })\n\n    if (!this.canReaddir()) {\n      pchild.#type |= ENOENT\n    }\n\n    // don't have to update provisional, because if we have real children,\n    // then provisional is set to children.length, otherwise a lower number\n    children.push(pchild)\n    return pchild\n  }\n\n  /**\n   * The relative path from the cwd. If it does not share an ancestor with\n   * the cwd, then this ends up being equivalent to the fullpath()\n   */\n  relative(): string {\n    if (this.isCWD) return ''\n    if (this.#relative !== undefined) {\n      return this.#relative\n    }\n    const name = this.name\n    const p = this.parent\n    if (!p) {\n      return (this.#relative = this.name)\n    }\n    const pv = p.relative()\n    return pv + (!pv || !p.parent ? '' : this.sep) + name\n  }\n\n  /**\n   * The relative path from the cwd, using / as the path separator.\n   * If it does not share an ancestor with\n   * the cwd, then this ends up being equivalent to the fullpathPosix()\n   * On posix systems, this is identical to relative().\n   */\n  relativePosix(): string {\n    if (this.sep === '/') return this.relative()\n    if (this.isCWD) return ''\n    if (this.#relativePosix !== undefined) return this.#relativePosix\n    const name = this.name\n    const p = this.parent\n    if (!p) {\n      return (this.#relativePosix = this.fullpathPosix())\n    }\n    const pv = p.relativePosix()\n    return pv + (!pv || !p.parent ? '' : '/') + name\n  }\n\n  /**\n   * The fully resolved path string for this Path entry\n   */\n  fullpath(): string {\n    if (this.#fullpath !== undefined) {\n      return this.#fullpath\n    }\n    const name = this.name\n    const p = this.parent\n    if (!p) {\n      return (this.#fullpath = this.name)\n    }\n    const pv = p.fullpath()\n    const fp = pv + (!p.parent ? '' : this.sep) + name\n    return (this.#fullpath = fp)\n  }\n\n  /**\n   * On platforms other than windows, this is identical to fullpath.\n   *\n   * On windows, this is overridden to return the forward-slash form of the\n   * full UNC path.\n   */\n  fullpathPosix(): string {\n    if (this.#fullpathPosix !== undefined) return this.#fullpathPosix\n    if (this.sep === '/') return (this.#fullpathPosix = this.fullpath())\n    if (!this.parent) {\n      const p = this.fullpath().replace(/\\\\/g, '/')\n      if (/^[a-z]:\\//i.test(p)) {\n        return (this.#fullpathPosix = `//?/${p}`)\n      } else {\n        return (this.#fullpathPosix = p)\n      }\n    }\n    const p = this.parent\n    const pfpp = p.fullpathPosix()\n    const fpp = pfpp + (!pfpp || !p.parent ? '' : '/') + this.name\n    return (this.#fullpathPosix = fpp)\n  }\n\n  /**\n   * Is the Path of an unknown type?\n   *\n   * Note that we might know *something* about it if there has been a previous\n   * filesystem operation, for example that it does not exist, or is not a\n   * link, or whether it has child entries.\n   */\n  isUnknown(): boolean {\n    return (this.#type & IFMT) === UNKNOWN\n  }\n\n  isType(type: Type): boolean {\n    return this[`is${type}`]()\n  }\n\n  getType(): Type {\n    return (\n      this.isUnknown() ? 'Unknown'\n      : this.isDirectory() ? 'Directory'\n      : this.isFile() ? 'File'\n      : this.isSymbolicLink() ? 'SymbolicLink'\n      : this.isFIFO() ? 'FIFO'\n      : this.isCharacterDevice() ? 'CharacterDevice'\n      : this.isBlockDevice() ? 'BlockDevice'\n      : /* c8 ignore start */ this.isSocket() ? 'Socket'\n      : 'Unknown'\n    )\n    /* c8 ignore stop */\n  }\n\n  /**\n   * Is the Path a regular file?\n   */\n  isFile(): boolean {\n    return (this.#type & IFMT) === IFREG\n  }\n\n  /**\n   * Is the Path a directory?\n   */\n  isDirectory(): boolean {\n    return (this.#type & IFMT) === IFDIR\n  }\n\n  /**\n   * Is the path a character device?\n   */\n  isCharacterDevice(): boolean {\n    return (this.#type & IFMT) === IFCHR\n  }\n\n  /**\n   * Is the path a block device?\n   */\n  isBlockDevice(): boolean {\n    return (this.#type & IFMT) === IFBLK\n  }\n\n  /**\n   * Is the path a FIFO pipe?\n   */\n  isFIFO(): boolean {\n    return (this.#type & IFMT) === IFIFO\n  }\n\n  /**\n   * Is the path a socket?\n   */\n  isSocket(): boolean {\n    return (this.#type & IFMT) === IFSOCK\n  }\n\n  /**\n   * Is the path a symbolic link?\n   */\n  isSymbolicLink(): boolean {\n    return (this.#type & IFLNK) === IFLNK\n  }\n\n  /**\n   * Return the entry if it has been subject of a successful lstat, or\n   * undefined otherwise.\n   *\n   * Does not read the filesystem, so an undefined result *could* simply\n   * mean that we haven't called lstat on it.\n   */\n  lstatCached(): PathBase | undefined {\n    return this.#type & LSTAT_CALLED ? this : undefined\n  }\n\n  /**\n   * Return the cached link target if the entry has been the subject of a\n   * successful readlink, or undefined otherwise.\n   *\n   * Does not read the filesystem, so an undefined result *could* just mean we\n   * don't have any cached data. Only use it if you are very sure that a\n   * readlink() has been called at some point.\n   */\n  readlinkCached(): PathBase | undefined {\n    return this.#linkTarget\n  }\n\n  /**\n   * Returns the cached realpath target if the entry has been the subject\n   * of a successful realpath, or undefined otherwise.\n   *\n   * Does not read the filesystem, so an undefined result *could* just mean we\n   * don't have any cached data. Only use it if you are very sure that a\n   * realpath() has been called at some point.\n   */\n  realpathCached(): PathBase | undefined {\n    return this.#realpath\n  }\n\n  /**\n   * Returns the cached child Path entries array if the entry has been the\n   * subject of a successful readdir(), or [] otherwise.\n   *\n   * Does not read the filesystem, so an empty array *could* just mean we\n   * don't have any cached data. Only use it if you are very sure that a\n   * readdir() has been called recently enough to still be valid.\n   */\n  readdirCached(): PathBase[] {\n    const children = this.children()\n    return children.slice(0, children.provisional)\n  }\n\n  /**\n   * Return true if it's worth trying to readlink.  Ie, we don't (yet) have\n   * any indication that readlink will definitely fail.\n   *\n   * Returns false if the path is known to not be a symlink, if a previous\n   * readlink failed, or if the entry does not exist.\n   */\n  canReadlink(): boolean {\n    if (this.#linkTarget) return true\n    if (!this.parent) return false\n    // cases where it cannot possibly succeed\n    const ifmt = this.#type & IFMT\n    return !(\n      (ifmt !== UNKNOWN && ifmt !== IFLNK) ||\n      this.#type & ENOREADLINK ||\n      this.#type & ENOENT\n    )\n  }\n\n  /**\n   * Return true if readdir has previously been successfully called on this\n   * path, indicating that cachedReaddir() is likely valid.\n   */\n  calledReaddir(): boolean {\n    return !!(this.#type & READDIR_CALLED)\n  }\n\n  /**\n   * Returns true if the path is known to not exist. That is, a previous lstat\n   * or readdir failed to verify its existence when that would have been\n   * expected, or a parent entry was marked either enoent or enotdir.\n   */\n  isENOENT(): boolean {\n    return !!(this.#type & ENOENT)\n  }\n\n  /**\n   * Return true if the path is a match for the given path name.  This handles\n   * case sensitivity and unicode normalization.\n   *\n   * Note: even on case-sensitive systems, it is **not** safe to test the\n   * equality of the `.name` property to determine whether a given pathname\n   * matches, due to unicode normalization mismatches.\n   *\n   * Always use this method instead of testing the `path.name` property\n   * directly.\n   */\n  isNamed(n: string): boolean {\n    return !this.nocase ?\n        this.#matchName === normalize(n)\n      : this.#matchName === normalizeNocase(n)\n  }\n\n  /**\n   * Return the Path object corresponding to the target of a symbolic link.\n   *\n   * If the Path is not a symbolic link, or if the readlink call fails for any\n   * reason, `undefined` is returned.\n   *\n   * Result is cached, and thus may be outdated if the filesystem is mutated.\n   */\n  async readlink(): Promise {\n    const target = this.#linkTarget\n    if (target) {\n      return target\n    }\n    if (!this.canReadlink()) {\n      return undefined\n    }\n    /* c8 ignore start */\n    // already covered by the canReadlink test, here for ts grumples\n    if (!this.parent) {\n      return undefined\n    }\n    /* c8 ignore stop */\n    try {\n      const read = await this.#fs.promises.readlink(this.fullpath())\n      const linkTarget = (await this.parent.realpath())?.resolve(read)\n      if (linkTarget) {\n        return (this.#linkTarget = linkTarget)\n      }\n    } catch (er) {\n      this.#readlinkFail((er as NodeJS.ErrnoException).code)\n      return undefined\n    }\n  }\n\n  /**\n   * Synchronous {@link PathBase.readlink}\n   */\n  readlinkSync(): PathBase | undefined {\n    const target = this.#linkTarget\n    if (target) {\n      return target\n    }\n    if (!this.canReadlink()) {\n      return undefined\n    }\n    /* c8 ignore start */\n    // already covered by the canReadlink test, here for ts grumples\n    if (!this.parent) {\n      return undefined\n    }\n    /* c8 ignore stop */\n    try {\n      const read = this.#fs.readlinkSync(this.fullpath())\n      const linkTarget = this.parent.realpathSync()?.resolve(read)\n      if (linkTarget) {\n        return (this.#linkTarget = linkTarget)\n      }\n    } catch (er) {\n      this.#readlinkFail((er as NodeJS.ErrnoException).code)\n      return undefined\n    }\n  }\n\n  #readdirSuccess(children: Children) {\n    // succeeded, mark readdir called bit\n    this.#type |= READDIR_CALLED\n    // mark all remaining provisional children as ENOENT\n    for (let p = children.provisional; p < children.length; p++) {\n      const c = children[p]\n      if (c) c.#markENOENT()\n    }\n  }\n\n  #markENOENT() {\n    // mark as UNKNOWN and ENOENT\n    if (this.#type & ENOENT) return\n    this.#type = (this.#type | ENOENT) & IFMT_UNKNOWN\n    this.#markChildrenENOENT()\n  }\n\n  #markChildrenENOENT() {\n    // all children are provisional and do not exist\n    const children = this.children()\n    children.provisional = 0\n    for (const p of children) {\n      p.#markENOENT()\n    }\n  }\n\n  #markENOREALPATH() {\n    this.#type |= ENOREALPATH\n    this.#markENOTDIR()\n  }\n\n  // save the information when we know the entry is not a dir\n  #markENOTDIR() {\n    // entry is not a directory, so any children can't exist.\n    // this *should* be impossible, since any children created\n    // after it's been marked ENOTDIR should be marked ENOENT,\n    // so it won't even get to this point.\n    /* c8 ignore start */\n    if (this.#type & ENOTDIR) return\n    /* c8 ignore stop */\n    let t = this.#type\n    // this could happen if we stat a dir, then delete it,\n    // then try to read it or one of its children.\n    if ((t & IFMT) === IFDIR) t &= IFMT_UNKNOWN\n    this.#type = t | ENOTDIR\n    this.#markChildrenENOENT()\n  }\n\n  #readdirFail(code: string = '') {\n    // markENOTDIR and markENOENT also set provisional=0\n    if (code === 'ENOTDIR' || code === 'EPERM') {\n      this.#markENOTDIR()\n    } else if (code === 'ENOENT') {\n      this.#markENOENT()\n    } else {\n      this.children().provisional = 0\n    }\n  }\n\n  #lstatFail(code: string = '') {\n    // Windows just raises ENOENT in this case, disable for win CI\n    /* c8 ignore start */\n    if (code === 'ENOTDIR') {\n      // already know it has a parent by this point\n      const p = this.parent as PathBase\n      p.#markENOTDIR()\n    } else if (code === 'ENOENT') {\n      /* c8 ignore stop */\n      this.#markENOENT()\n    }\n  }\n\n  #readlinkFail(code: string = '') {\n    let ter = this.#type\n    ter |= ENOREADLINK\n    if (code === 'ENOENT') ter |= ENOENT\n    // windows gets a weird error when you try to readlink a file\n    if (code === 'EINVAL' || code === 'UNKNOWN') {\n      // exists, but not a symlink, we don't know WHAT it is, so remove\n      // all IFMT bits.\n      ter &= IFMT_UNKNOWN\n    }\n    this.#type = ter\n    // windows just gets ENOENT in this case.  We do cover the case,\n    // just disabled because it's impossible on Windows CI\n    /* c8 ignore start */\n    if (code === 'ENOTDIR' && this.parent) {\n      this.parent.#markENOTDIR()\n    }\n    /* c8 ignore stop */\n  }\n\n  #readdirAddChild(e: Dirent, c: Children) {\n    return (\n      this.#readdirMaybePromoteChild(e, c) ||\n      this.#readdirAddNewChild(e, c)\n    )\n  }\n\n  #readdirAddNewChild(e: Dirent, c: Children): PathBase {\n    // alloc new entry at head, so it's never provisional\n    const type = entToType(e)\n    const child = this.newChild(e.name, type, { parent: this })\n    const ifmt = child.#type & IFMT\n    if (ifmt !== IFDIR && ifmt !== IFLNK && ifmt !== UNKNOWN) {\n      child.#type |= ENOTDIR\n    }\n    c.unshift(child)\n    c.provisional++\n    return child\n  }\n\n  #readdirMaybePromoteChild(e: Dirent, c: Children): PathBase | undefined {\n    for (let p = c.provisional; p < c.length; p++) {\n      const pchild = c[p]\n      const name =\n        this.nocase ? normalizeNocase(e.name) : normalize(e.name)\n      if (name !== pchild!.#matchName) {\n        continue\n      }\n\n      return this.#readdirPromoteChild(e, pchild!, p, c)\n    }\n  }\n\n  #readdirPromoteChild(\n    e: Dirent,\n    p: PathBase,\n    index: number,\n    c: Children,\n  ): PathBase {\n    const v = p.name\n    // retain any other flags, but set ifmt from dirent\n    p.#type = (p.#type & IFMT_UNKNOWN) | entToType(e)\n    // case sensitivity fixing when we learn the true name.\n    if (v !== e.name) p.name = e.name\n\n    // just advance provisional index (potentially off the list),\n    // otherwise we have to splice/pop it out and re-insert at head\n    if (index !== c.provisional) {\n      if (index === c.length - 1) c.pop()\n      else c.splice(index, 1)\n      c.unshift(p)\n    }\n    c.provisional++\n    return p\n  }\n\n  /**\n   * Call lstat() on this Path, and update all known information that can be\n   * determined.\n   *\n   * Note that unlike `fs.lstat()`, the returned value does not contain some\n   * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that\n   * information is required, you will need to call `fs.lstat` yourself.\n   *\n   * If the Path refers to a nonexistent file, or if the lstat call fails for\n   * any reason, `undefined` is returned.  Otherwise the updated Path object is\n   * returned.\n   *\n   * Results are cached, and thus may be out of date if the filesystem is\n   * mutated.\n   */\n  async lstat(): Promise {\n    if ((this.#type & ENOENT) === 0) {\n      try {\n        this.#applyStat(await this.#fs.promises.lstat(this.fullpath()))\n        return this\n      } catch (er) {\n        this.#lstatFail((er as NodeJS.ErrnoException).code)\n      }\n    }\n  }\n\n  /**\n   * synchronous {@link PathBase.lstat}\n   */\n  lstatSync(): PathBase | undefined {\n    if ((this.#type & ENOENT) === 0) {\n      try {\n        this.#applyStat(this.#fs.lstatSync(this.fullpath()))\n        return this\n      } catch (er) {\n        this.#lstatFail((er as NodeJS.ErrnoException).code)\n      }\n    }\n  }\n\n  #applyStat(st: Stats) {\n    const {\n      atime,\n      atimeMs,\n      birthtime,\n      birthtimeMs,\n      blksize,\n      blocks,\n      ctime,\n      ctimeMs,\n      dev,\n      gid,\n      ino,\n      mode,\n      mtime,\n      mtimeMs,\n      nlink,\n      rdev,\n      size,\n      uid,\n    } = st\n    this.#atime = atime\n    this.#atimeMs = atimeMs\n    this.#birthtime = birthtime\n    this.#birthtimeMs = birthtimeMs\n    this.#blksize = blksize\n    this.#blocks = blocks\n    this.#ctime = ctime\n    this.#ctimeMs = ctimeMs\n    this.#dev = dev\n    this.#gid = gid\n    this.#ino = ino\n    this.#mode = mode\n    this.#mtime = mtime\n    this.#mtimeMs = mtimeMs\n    this.#nlink = nlink\n    this.#rdev = rdev\n    this.#size = size\n    this.#uid = uid\n    const ifmt = entToType(st)\n    // retain any other flags, but set the ifmt\n    this.#type = (this.#type & IFMT_UNKNOWN) | ifmt | LSTAT_CALLED\n    if (ifmt !== UNKNOWN && ifmt !== IFDIR && ifmt !== IFLNK) {\n      this.#type |= ENOTDIR\n    }\n  }\n\n  #onReaddirCB: ((\n    er: NodeJS.ErrnoException | null,\n    entries: Path[],\n  ) => any)[] = []\n  #readdirCBInFlight: boolean = false\n  #callOnReaddirCB(children: Path[]) {\n    this.#readdirCBInFlight = false\n    const cbs = this.#onReaddirCB.slice()\n    this.#onReaddirCB.length = 0\n    cbs.forEach(cb => cb(null, children))\n  }\n\n  /**\n   * Standard node-style callback interface to get list of directory entries.\n   *\n   * If the Path cannot or does not contain any children, then an empty array\n   * is returned.\n   *\n   * Results are cached, and thus may be out of date if the filesystem is\n   * mutated.\n   *\n   * @param cb The callback called with (er, entries).  Note that the `er`\n   * param is somewhat extraneous, as all readdir() errors are handled and\n   * simply result in an empty set of entries being returned.\n   * @param allowZalgo Boolean indicating that immediately known results should\n   * *not* be deferred with `queueMicrotask`. Defaults to `false`. Release\n   * zalgo at your peril, the dark pony lord is devious and unforgiving.\n   */\n  readdirCB(\n    cb: (er: NodeJS.ErrnoException | null, entries: PathBase[]) => any,\n    allowZalgo: boolean = false,\n  ): void {\n    if (!this.canReaddir()) {\n      if (allowZalgo) cb(null, [])\n      else queueMicrotask(() => cb(null, []))\n      return\n    }\n\n    const children = this.children()\n    if (this.calledReaddir()) {\n      const c = children.slice(0, children.provisional)\n      if (allowZalgo) cb(null, c)\n      else queueMicrotask(() => cb(null, c))\n      return\n    }\n\n    // don't have to worry about zalgo at this point.\n    this.#onReaddirCB.push(cb)\n    if (this.#readdirCBInFlight) {\n      return\n    }\n    this.#readdirCBInFlight = true\n\n    // else read the directory, fill up children\n    // de-provisionalize any provisional children.\n    const fullpath = this.fullpath()\n    this.#fs.readdir(fullpath, { withFileTypes: true }, (er, entries) => {\n      if (er) {\n        this.#readdirFail((er as NodeJS.ErrnoException).code)\n        children.provisional = 0\n      } else {\n        // if we didn't get an error, we always get entries.\n        //@ts-ignore\n        for (const e of entries) {\n          this.#readdirAddChild(e, children)\n        }\n        this.#readdirSuccess(children)\n      }\n      this.#callOnReaddirCB(children.slice(0, children.provisional))\n      return\n    })\n  }\n\n  #asyncReaddirInFlight?: Promise\n\n  /**\n   * Return an array of known child entries.\n   *\n   * If the Path cannot or does not contain any children, then an empty array\n   * is returned.\n   *\n   * Results are cached, and thus may be out of date if the filesystem is\n   * mutated.\n   */\n  async readdir(): Promise {\n    if (!this.canReaddir()) {\n      return []\n    }\n\n    const children = this.children()\n    if (this.calledReaddir()) {\n      return children.slice(0, children.provisional)\n    }\n\n    // else read the directory, fill up children\n    // de-provisionalize any provisional children.\n    const fullpath = this.fullpath()\n    if (this.#asyncReaddirInFlight) {\n      await this.#asyncReaddirInFlight\n    } else {\n      /* c8 ignore start */\n      let resolve: () => void = () => {}\n      /* c8 ignore stop */\n      this.#asyncReaddirInFlight = new Promise(\n        res => (resolve = res),\n      )\n      try {\n        for (const e of await this.#fs.promises.readdir(fullpath, {\n          withFileTypes: true,\n        })) {\n          this.#readdirAddChild(e, children)\n        }\n        this.#readdirSuccess(children)\n      } catch (er) {\n        this.#readdirFail((er as NodeJS.ErrnoException).code)\n        children.provisional = 0\n      }\n      this.#asyncReaddirInFlight = undefined\n      resolve()\n    }\n    return children.slice(0, children.provisional)\n  }\n\n  /**\n   * synchronous {@link PathBase.readdir}\n   */\n  readdirSync(): PathBase[] {\n    if (!this.canReaddir()) {\n      return []\n    }\n\n    const children = this.children()\n    if (this.calledReaddir()) {\n      return children.slice(0, children.provisional)\n    }\n\n    // else read the directory, fill up children\n    // de-provisionalize any provisional children.\n    const fullpath = this.fullpath()\n    try {\n      for (const e of this.#fs.readdirSync(fullpath, {\n        withFileTypes: true,\n      })) {\n        this.#readdirAddChild(e, children)\n      }\n      this.#readdirSuccess(children)\n    } catch (er) {\n      this.#readdirFail((er as NodeJS.ErrnoException).code)\n      children.provisional = 0\n    }\n    return children.slice(0, children.provisional)\n  }\n\n  canReaddir() {\n    if (this.#type & ENOCHILD) return false\n    const ifmt = IFMT & this.#type\n    // we always set ENOTDIR when setting IFMT, so should be impossible\n    /* c8 ignore start */\n    if (!(ifmt === UNKNOWN || ifmt === IFDIR || ifmt === IFLNK)) {\n      return false\n    }\n    /* c8 ignore stop */\n    return true\n  }\n\n  shouldWalk(\n    dirs: Set,\n    walkFilter?: (e: PathBase) => boolean,\n  ): boolean {\n    return (\n      (this.#type & IFDIR) === IFDIR &&\n      !(this.#type & ENOCHILD) &&\n      !dirs.has(this) &&\n      (!walkFilter || walkFilter(this))\n    )\n  }\n\n  /**\n   * Return the Path object corresponding to path as resolved\n   * by realpath(3).\n   *\n   * If the realpath call fails for any reason, `undefined` is returned.\n   *\n   * Result is cached, and thus may be outdated if the filesystem is mutated.\n   * On success, returns a Path object.\n   */\n  async realpath(): Promise {\n    if (this.#realpath) return this.#realpath\n    if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type) return undefined\n    try {\n      const rp = await this.#fs.promises.realpath(this.fullpath())\n      return (this.#realpath = this.resolve(rp))\n    } catch (_) {\n      this.#markENOREALPATH()\n    }\n  }\n\n  /**\n   * Synchronous {@link realpath}\n   */\n  realpathSync(): PathBase | undefined {\n    if (this.#realpath) return this.#realpath\n    if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type) return undefined\n    try {\n      const rp = this.#fs.realpathSync(this.fullpath())\n      return (this.#realpath = this.resolve(rp))\n    } catch (_) {\n      this.#markENOREALPATH()\n    }\n  }\n\n  /**\n   * Internal method to mark this Path object as the scurry cwd,\n   * called by {@link PathScurry#chdir}\n   *\n   * @internal\n   */\n  [setAsCwd](oldCwd: PathBase): void {\n    if (oldCwd === this) return\n    oldCwd.isCWD = false\n    this.isCWD = true\n\n    const changed = new Set([])\n    let rp = []\n    let p: PathBase = this\n    while (p && p.parent) {\n      changed.add(p)\n      p.#relative = rp.join(this.sep)\n      p.#relativePosix = rp.join('/')\n      p = p.parent\n      rp.push('..')\n    }\n    // now un-memoize parents of old cwd\n    p = oldCwd\n    while (p && p.parent && !changed.has(p)) {\n      p.#relative = undefined\n      p.#relativePosix = undefined\n      p = p.parent\n    }\n  }\n}\n\n/**\n * Path class used on win32 systems\n *\n * Uses `'\\\\'` as the path separator for returned paths, either `'\\\\'` or `'/'`\n * as the path separator for parsing paths.\n */\nexport class PathWin32 extends PathBase {\n  /**\n   * Separator for generating path strings.\n   */\n  sep: '\\\\' = '\\\\'\n  /**\n   * Separator for parsing path strings.\n   */\n  splitSep: RegExp = eitherSep\n\n  /**\n   * Do not create new Path objects directly.  They should always be accessed\n   * via the PathScurry class or other methods on the Path class.\n   *\n   * @internal\n   */\n  constructor(\n    name: string,\n    type: number = UNKNOWN,\n    root: PathBase | undefined,\n    roots: { [k: string]: PathBase },\n    nocase: boolean,\n    children: ChildrenCache,\n    opts: PathOpts,\n  ) {\n    super(name, type, root, roots, nocase, children, opts)\n  }\n\n  /**\n   * @internal\n   */\n  newChild(name: string, type: number = UNKNOWN, opts: PathOpts = {}) {\n    return new PathWin32(\n      name,\n      type,\n      this.root,\n      this.roots,\n      this.nocase,\n      this.childrenCache(),\n      opts,\n    )\n  }\n\n  /**\n   * @internal\n   */\n  getRootString(path: string): string {\n    return win32.parse(path).root\n  }\n\n  /**\n   * @internal\n   */\n  getRoot(rootPath: string): PathBase {\n    rootPath = uncToDrive(rootPath.toUpperCase())\n    if (rootPath === this.root.name) {\n      return this.root\n    }\n    // ok, not that one, check if it matches another we know about\n    for (const [compare, root] of Object.entries(this.roots)) {\n      if (this.sameRoot(rootPath, compare)) {\n        return (this.roots[rootPath] = root)\n      }\n    }\n    // otherwise, have to create a new one.\n    return (this.roots[rootPath] = new PathScurryWin32(\n      rootPath,\n      this,\n    ).root)\n  }\n\n  /**\n   * @internal\n   */\n  sameRoot(rootPath: string, compare: string = this.root.name): boolean {\n    // windows can (rarely) have case-sensitive filesystem, but\n    // UNC and drive letters are always case-insensitive, and canonically\n    // represented uppercase.\n    rootPath = rootPath\n      .toUpperCase()\n      .replace(/\\//g, '\\\\')\n      .replace(uncDriveRegexp, '$1\\\\')\n    return rootPath === compare\n  }\n}\n\n/**\n * Path class used on all posix systems.\n *\n * Uses `'/'` as the path separator.\n */\nexport class PathPosix extends PathBase {\n  /**\n   * separator for parsing path strings\n   */\n  splitSep: '/' = '/'\n  /**\n   * separator for generating path strings\n   */\n  sep: '/' = '/'\n\n  /**\n   * Do not create new Path objects directly.  They should always be accessed\n   * via the PathScurry class or other methods on the Path class.\n   *\n   * @internal\n   */\n  constructor(\n    name: string,\n    type: number = UNKNOWN,\n    root: PathBase | undefined,\n    roots: { [k: string]: PathBase },\n    nocase: boolean,\n    children: ChildrenCache,\n    opts: PathOpts,\n  ) {\n    super(name, type, root, roots, nocase, children, opts)\n  }\n\n  /**\n   * @internal\n   */\n  getRootString(path: string): string {\n    return path.startsWith('/') ? '/' : ''\n  }\n\n  /**\n   * @internal\n   */\n  getRoot(_rootPath: string): PathBase {\n    return this.root\n  }\n\n  /**\n   * @internal\n   */\n  newChild(name: string, type: number = UNKNOWN, opts: PathOpts = {}) {\n    return new PathPosix(\n      name,\n      type,\n      this.root,\n      this.roots,\n      this.nocase,\n      this.childrenCache(),\n      opts,\n    )\n  }\n}\n\n/**\n * Options that may be provided to the PathScurry constructor\n */\nexport interface PathScurryOpts {\n  /**\n   * perform case-insensitive path matching. Default based on platform\n   * subclass.\n   */\n  nocase?: boolean\n  /**\n   * Number of Path entries to keep in the cache of Path child references.\n   *\n   * Setting this higher than 65536 will dramatically increase the data\n   * consumption and construction time overhead of each PathScurry.\n   *\n   * Setting this value to 256 or lower will significantly reduce the data\n   * consumption and construction time overhead, but may also reduce resolve()\n   * and readdir() performance on large filesystems.\n   *\n   * Default `16384`.\n   */\n  childrenCacheSize?: number\n  /**\n   * An object that overrides the built-in functions from the fs and\n   * fs/promises modules.\n   *\n   * See {@link FSOption}\n   */\n  fs?: FSOption\n}\n\n/**\n * The base class for all PathScurry classes, providing the interface for path\n * resolution and filesystem operations.\n *\n * Typically, you should *not* instantiate this class directly, but rather one\n * of the platform-specific classes, or the exported {@link PathScurry} which\n * defaults to the current platform.\n */\nexport abstract class PathScurryBase {\n  /**\n   * The root Path entry for the current working directory of this Scurry\n   */\n  root: PathBase\n  /**\n   * The string path for the root of this Scurry's current working directory\n   */\n  rootPath: string\n  /**\n   * A collection of all roots encountered, referenced by rootPath\n   */\n  roots: { [k: string]: PathBase }\n  /**\n   * The Path entry corresponding to this PathScurry's current working directory.\n   */\n  cwd: PathBase\n  #resolveCache: ResolveCache\n  #resolvePosixCache: ResolveCache\n  #children: ChildrenCache\n  /**\n   * Perform path comparisons case-insensitively.\n   *\n   * Defaults true on Darwin and Windows systems, false elsewhere.\n   */\n  nocase: boolean\n\n  /**\n   * The path separator used for parsing paths\n   *\n   * `'/'` on Posix systems, either `'/'` or `'\\\\'` on Windows\n   */\n  abstract sep: string | RegExp\n\n  #fs: FSValue\n\n  /**\n   * This class should not be instantiated directly.\n   *\n   * Use PathScurryWin32, PathScurryDarwin, PathScurryPosix, or PathScurry\n   *\n   * @internal\n   */\n  constructor(\n    cwd: URL | string = process.cwd(),\n    pathImpl: typeof win32 | typeof posix,\n    sep: string | RegExp,\n    {\n      nocase,\n      childrenCacheSize = 16 * 1024,\n      fs = defaultFS,\n    }: PathScurryOpts = {},\n  ) {\n    this.#fs = fsFromOption(fs)\n    if (cwd instanceof URL || cwd.startsWith('file://')) {\n      cwd = fileURLToPath(cwd)\n    }\n    // resolve and split root, and then add to the store.\n    // this is the only time we call path.resolve()\n    const cwdPath = pathImpl.resolve(cwd)\n    this.roots = Object.create(null)\n    this.rootPath = this.parseRootPath(cwdPath)\n    this.#resolveCache = new ResolveCache()\n    this.#resolvePosixCache = new ResolveCache()\n    this.#children = new ChildrenCache(childrenCacheSize)\n\n    const split = cwdPath.substring(this.rootPath.length).split(sep)\n    // resolve('/') leaves '', splits to [''], we don't want that.\n    if (split.length === 1 && !split[0]) {\n      split.pop()\n    }\n    /* c8 ignore start */\n    if (nocase === undefined) {\n      throw new TypeError(\n        'must provide nocase setting to PathScurryBase ctor',\n      )\n    }\n    /* c8 ignore stop */\n    this.nocase = nocase\n    this.root = this.newRoot(this.#fs)\n    this.roots[this.rootPath] = this.root\n    let prev: PathBase = this.root\n    let len = split.length - 1\n    const joinSep = pathImpl.sep\n    let abs = this.rootPath\n    let sawFirst = false\n    for (const part of split) {\n      const l = len--\n      prev = prev.child(part, {\n        relative: new Array(l).fill('..').join(joinSep),\n        relativePosix: new Array(l).fill('..').join('/'),\n        fullpath: (abs += (sawFirst ? '' : joinSep) + part),\n      })\n      sawFirst = true\n    }\n    this.cwd = prev\n  }\n\n  /**\n   * Get the depth of a provided path, string, or the cwd\n   */\n  depth(path: Path | string = this.cwd): number {\n    if (typeof path === 'string') {\n      path = this.cwd.resolve(path)\n    }\n    return path.depth()\n  }\n\n  /**\n   * Parse the root portion of a path string\n   *\n   * @internal\n   */\n  abstract parseRootPath(dir: string): string\n  /**\n   * create a new Path to use as root during construction.\n   *\n   * @internal\n   */\n  abstract newRoot(fs: FSValue): PathBase\n  /**\n   * Determine whether a given path string is absolute\n   */\n  abstract isAbsolute(p: string): boolean\n\n  /**\n   * Return the cache of child entries.  Exposed so subclasses can create\n   * child Path objects in a platform-specific way.\n   *\n   * @internal\n   */\n  childrenCache() {\n    return this.#children\n  }\n\n  /**\n   * Resolve one or more path strings to a resolved string\n   *\n   * Same interface as require('path').resolve.\n   *\n   * Much faster than path.resolve() when called multiple times for the same\n   * path, because the resolved Path objects are cached.  Much slower\n   * otherwise.\n   */\n  resolve(...paths: string[]): string {\n    // first figure out the minimum number of paths we have to test\n    // we always start at cwd, but any absolutes will bump the start\n    let r = ''\n    for (let i = paths.length - 1; i >= 0; i--) {\n      const p = paths[i]\n      if (!p || p === '.') continue\n      r = r ? `${p}/${r}` : p\n      if (this.isAbsolute(p)) {\n        break\n      }\n    }\n    const cached = this.#resolveCache.get(r)\n    if (cached !== undefined) {\n      return cached\n    }\n    const result = this.cwd.resolve(r).fullpath()\n    this.#resolveCache.set(r, result)\n    return result\n  }\n\n  /**\n   * Resolve one or more path strings to a resolved string, returning\n   * the posix path.  Identical to .resolve() on posix systems, but on\n   * windows will return a forward-slash separated UNC path.\n   *\n   * Same interface as require('path').resolve.\n   *\n   * Much faster than path.resolve() when called multiple times for the same\n   * path, because the resolved Path objects are cached.  Much slower\n   * otherwise.\n   */\n  resolvePosix(...paths: string[]): string {\n    // first figure out the minimum number of paths we have to test\n    // we always start at cwd, but any absolutes will bump the start\n    let r = ''\n    for (let i = paths.length - 1; i >= 0; i--) {\n      const p = paths[i]\n      if (!p || p === '.') continue\n      r = r ? `${p}/${r}` : p\n      if (this.isAbsolute(p)) {\n        break\n      }\n    }\n    const cached = this.#resolvePosixCache.get(r)\n    if (cached !== undefined) {\n      return cached\n    }\n    const result = this.cwd.resolve(r).fullpathPosix()\n    this.#resolvePosixCache.set(r, result)\n    return result\n  }\n\n  /**\n   * find the relative path from the cwd to the supplied path string or entry\n   */\n  relative(entry: PathBase | string = this.cwd): string {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return entry.relative()\n  }\n\n  /**\n   * find the relative path from the cwd to the supplied path string or\n   * entry, using / as the path delimiter, even on Windows.\n   */\n  relativePosix(entry: PathBase | string = this.cwd): string {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return entry.relativePosix()\n  }\n\n  /**\n   * Return the basename for the provided string or Path object\n   */\n  basename(entry: PathBase | string = this.cwd): string {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return entry.name\n  }\n\n  /**\n   * Return the dirname for the provided string or Path object\n   */\n  dirname(entry: PathBase | string = this.cwd): string {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return (entry.parent || entry).fullpath()\n  }\n\n  /**\n   * Return an array of known child entries.\n   *\n   * First argument may be either a string, or a Path object.\n   *\n   * If the Path cannot or does not contain any children, then an empty array\n   * is returned.\n   *\n   * Results are cached, and thus may be out of date if the filesystem is\n   * mutated.\n   *\n   * Unlike `fs.readdir()`, the `withFileTypes` option defaults to `true`. Set\n   * `{ withFileTypes: false }` to return strings.\n   */\n\n  readdir(): Promise\n  readdir(opts: { withFileTypes: true }): Promise\n  readdir(opts: { withFileTypes: false }): Promise\n  readdir(opts: { withFileTypes: boolean }): Promise\n  readdir(entry: PathBase | string): Promise\n  readdir(\n    entry: PathBase | string,\n    opts: { withFileTypes: true },\n  ): Promise\n  readdir(\n    entry: PathBase | string,\n    opts: { withFileTypes: false },\n  ): Promise\n  readdir(\n    entry: PathBase | string,\n    opts: { withFileTypes: boolean },\n  ): Promise\n  async readdir(\n    entry: PathBase | string | { withFileTypes: boolean } = this.cwd,\n    opts: { withFileTypes: boolean } = {\n      withFileTypes: true,\n    },\n  ): Promise {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const { withFileTypes } = opts\n    if (!entry.canReaddir()) {\n      return []\n    } else {\n      const p = await entry.readdir()\n      return withFileTypes ? p : p.map(e => e.name)\n    }\n  }\n\n  /**\n   * synchronous {@link PathScurryBase.readdir}\n   */\n  readdirSync(): PathBase[]\n  readdirSync(opts: { withFileTypes: true }): PathBase[]\n  readdirSync(opts: { withFileTypes: false }): string[]\n  readdirSync(opts: { withFileTypes: boolean }): PathBase[] | string[]\n  readdirSync(entry: PathBase | string): PathBase[]\n  readdirSync(\n    entry: PathBase | string,\n    opts: { withFileTypes: true },\n  ): PathBase[]\n  readdirSync(\n    entry: PathBase | string,\n    opts: { withFileTypes: false },\n  ): string[]\n  readdirSync(\n    entry: PathBase | string,\n    opts: { withFileTypes: boolean },\n  ): PathBase[] | string[]\n  readdirSync(\n    entry: PathBase | string | { withFileTypes: boolean } = this.cwd,\n    opts: { withFileTypes: boolean } = {\n      withFileTypes: true,\n    },\n  ): PathBase[] | string[] {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const { withFileTypes = true } = opts\n    if (!entry.canReaddir()) {\n      return []\n    } else if (withFileTypes) {\n      return entry.readdirSync()\n    } else {\n      return entry.readdirSync().map(e => e.name)\n    }\n  }\n\n  /**\n   * Call lstat() on the string or Path object, and update all known\n   * information that can be determined.\n   *\n   * Note that unlike `fs.lstat()`, the returned value does not contain some\n   * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that\n   * information is required, you will need to call `fs.lstat` yourself.\n   *\n   * If the Path refers to a nonexistent file, or if the lstat call fails for\n   * any reason, `undefined` is returned.  Otherwise the updated Path object is\n   * returned.\n   *\n   * Results are cached, and thus may be out of date if the filesystem is\n   * mutated.\n   */\n  async lstat(\n    entry: string | PathBase = this.cwd,\n  ): Promise {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return entry.lstat()\n  }\n\n  /**\n   * synchronous {@link PathScurryBase.lstat}\n   */\n  lstatSync(entry: string | PathBase = this.cwd): PathBase | undefined {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return entry.lstatSync()\n  }\n\n  /**\n   * Return the Path object or string path corresponding to the target of a\n   * symbolic link.\n   *\n   * If the path is not a symbolic link, or if the readlink call fails for any\n   * reason, `undefined` is returned.\n   *\n   * Result is cached, and thus may be outdated if the filesystem is mutated.\n   *\n   * `{withFileTypes}` option defaults to `false`.\n   *\n   * On success, returns a Path object if `withFileTypes` option is true,\n   * otherwise a string.\n   */\n  readlink(): Promise\n  readlink(opt: { withFileTypes: false }): Promise\n  readlink(opt: { withFileTypes: true }): Promise\n  readlink(opt: {\n    withFileTypes: boolean\n  }): Promise\n  readlink(\n    entry: string | PathBase,\n    opt?: { withFileTypes: false },\n  ): Promise\n  readlink(\n    entry: string | PathBase,\n    opt: { withFileTypes: true },\n  ): Promise\n  readlink(\n    entry: string | PathBase,\n    opt: { withFileTypes: boolean },\n  ): Promise\n  async readlink(\n    entry: string | PathBase | { withFileTypes: boolean } = this.cwd,\n    { withFileTypes }: { withFileTypes: boolean } = {\n      withFileTypes: false,\n    },\n  ): Promise {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      withFileTypes = entry.withFileTypes\n      entry = this.cwd\n    }\n    const e = await entry.readlink()\n    return withFileTypes ? e : e?.fullpath()\n  }\n\n  /**\n   * synchronous {@link PathScurryBase.readlink}\n   */\n  readlinkSync(): string | undefined\n  readlinkSync(opt: { withFileTypes: false }): string | undefined\n  readlinkSync(opt: { withFileTypes: true }): PathBase | undefined\n  readlinkSync(opt: {\n    withFileTypes: boolean\n  }): PathBase | string | undefined\n  readlinkSync(\n    entry: string | PathBase,\n    opt?: { withFileTypes: false },\n  ): string | undefined\n  readlinkSync(\n    entry: string | PathBase,\n    opt: { withFileTypes: true },\n  ): PathBase | undefined\n  readlinkSync(\n    entry: string | PathBase,\n    opt: { withFileTypes: boolean },\n  ): string | PathBase | undefined\n  readlinkSync(\n    entry: string | PathBase | { withFileTypes: boolean } = this.cwd,\n    { withFileTypes }: { withFileTypes: boolean } = {\n      withFileTypes: false,\n    },\n  ): string | PathBase | undefined {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      withFileTypes = entry.withFileTypes\n      entry = this.cwd\n    }\n    const e = entry.readlinkSync()\n    return withFileTypes ? e : e?.fullpath()\n  }\n\n  /**\n   * Return the Path object or string path corresponding to path as resolved\n   * by realpath(3).\n   *\n   * If the realpath call fails for any reason, `undefined` is returned.\n   *\n   * Result is cached, and thus may be outdated if the filesystem is mutated.\n   *\n   * `{withFileTypes}` option defaults to `false`.\n   *\n   * On success, returns a Path object if `withFileTypes` option is true,\n   * otherwise a string.\n   */\n  realpath(): Promise\n  realpath(opt: { withFileTypes: false }): Promise\n  realpath(opt: { withFileTypes: true }): Promise\n  realpath(opt: {\n    withFileTypes: boolean\n  }): Promise\n  realpath(\n    entry: string | PathBase,\n    opt?: { withFileTypes: false },\n  ): Promise\n  realpath(\n    entry: string | PathBase,\n    opt: { withFileTypes: true },\n  ): Promise\n  realpath(\n    entry: string | PathBase,\n    opt: { withFileTypes: boolean },\n  ): Promise\n  async realpath(\n    entry: string | PathBase | { withFileTypes: boolean } = this.cwd,\n    { withFileTypes }: { withFileTypes: boolean } = {\n      withFileTypes: false,\n    },\n  ): Promise {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      withFileTypes = entry.withFileTypes\n      entry = this.cwd\n    }\n    const e = await entry.realpath()\n    return withFileTypes ? e : e?.fullpath()\n  }\n\n  realpathSync(): string | undefined\n  realpathSync(opt: { withFileTypes: false }): string | undefined\n  realpathSync(opt: { withFileTypes: true }): PathBase | undefined\n  realpathSync(opt: {\n    withFileTypes: boolean\n  }): PathBase | string | undefined\n  realpathSync(\n    entry: string | PathBase,\n    opt?: { withFileTypes: false },\n  ): string | undefined\n  realpathSync(\n    entry: string | PathBase,\n    opt: { withFileTypes: true },\n  ): PathBase | undefined\n  realpathSync(\n    entry: string | PathBase,\n    opt: { withFileTypes: boolean },\n  ): string | PathBase | undefined\n  realpathSync(\n    entry: string | PathBase | { withFileTypes: boolean } = this.cwd,\n    { withFileTypes }: { withFileTypes: boolean } = {\n      withFileTypes: false,\n    },\n  ): string | PathBase | undefined {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      withFileTypes = entry.withFileTypes\n      entry = this.cwd\n    }\n    const e = entry.realpathSync()\n    return withFileTypes ? e : e?.fullpath()\n  }\n\n  /**\n   * Asynchronously walk the directory tree, returning an array of\n   * all path strings or Path objects found.\n   *\n   * Note that this will be extremely memory-hungry on large filesystems.\n   * In such cases, it may be better to use the stream or async iterator\n   * walk implementation.\n   */\n  walk(): Promise\n  walk(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Promise\n  walk(opts: WalkOptionsWithFileTypesFalse): Promise\n  walk(opts: WalkOptions): Promise\n  walk(entry: string | PathBase): Promise\n  walk(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Promise\n  walk(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): Promise\n  walk(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): Promise\n  async walk(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    opts: WalkOptions = {},\n  ): Promise {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const {\n      withFileTypes = true,\n      follow = false,\n      filter,\n      walkFilter,\n    } = opts\n    const results: (string | PathBase)[] = []\n    if (!filter || filter(entry)) {\n      results.push(withFileTypes ? entry : entry.fullpath())\n    }\n    const dirs = new Set()\n    const walk = (\n      dir: PathBase,\n      cb: (er?: NodeJS.ErrnoException) => void,\n    ) => {\n      dirs.add(dir)\n      dir.readdirCB((er, entries) => {\n        /* c8 ignore start */\n        if (er) {\n          return cb(er)\n        }\n        /* c8 ignore stop */\n        let len = entries.length\n        if (!len) return cb()\n        const next = () => {\n          if (--len === 0) {\n            cb()\n          }\n        }\n        for (const e of entries) {\n          if (!filter || filter(e)) {\n            results.push(withFileTypes ? e : e.fullpath())\n          }\n          if (follow && e.isSymbolicLink()) {\n            e.realpath()\n              .then(r => (r?.isUnknown() ? r.lstat() : r))\n              .then(r =>\n                r?.shouldWalk(dirs, walkFilter) ? walk(r, next) : next(),\n              )\n          } else {\n            if (e.shouldWalk(dirs, walkFilter)) {\n              walk(e, next)\n            } else {\n              next()\n            }\n          }\n        }\n      }, true) // zalgooooooo\n    }\n\n    const start = entry\n    return new Promise((res, rej) => {\n      walk(start, er => {\n        /* c8 ignore start */\n        if (er) return rej(er)\n        /* c8 ignore stop */\n        res(results as PathBase[] | string[])\n      })\n    })\n  }\n\n  /**\n   * Synchronously walk the directory tree, returning an array of\n   * all path strings or Path objects found.\n   *\n   * Note that this will be extremely memory-hungry on large filesystems.\n   * In such cases, it may be better to use the stream or async iterator\n   * walk implementation.\n   */\n  walkSync(): PathBase[]\n  walkSync(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): PathBase[]\n  walkSync(opts: WalkOptionsWithFileTypesFalse): string[]\n  walkSync(opts: WalkOptions): string[] | PathBase[]\n  walkSync(entry: string | PathBase): PathBase[]\n  walkSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesUnset | WalkOptionsWithFileTypesTrue,\n  ): PathBase[]\n  walkSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): string[]\n  walkSync(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): PathBase[] | string[]\n  walkSync(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    opts: WalkOptions = {},\n  ): PathBase[] | string[] {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const {\n      withFileTypes = true,\n      follow = false,\n      filter,\n      walkFilter,\n    } = opts\n    const results: (string | PathBase)[] = []\n    if (!filter || filter(entry)) {\n      results.push(withFileTypes ? entry : entry.fullpath())\n    }\n    const dirs = new Set([entry])\n    for (const dir of dirs) {\n      const entries = dir.readdirSync()\n      for (const e of entries) {\n        if (!filter || filter(e)) {\n          results.push(withFileTypes ? e : e.fullpath())\n        }\n        let r: PathBase | undefined = e\n        if (e.isSymbolicLink()) {\n          if (!(follow && (r = e.realpathSync()))) continue\n          if (r.isUnknown()) r.lstatSync()\n        }\n        if (r.shouldWalk(dirs, walkFilter)) {\n          dirs.add(r)\n        }\n      }\n    }\n    return results as string[] | PathBase[]\n  }\n\n  /**\n   * Support for `for await`\n   *\n   * Alias for {@link PathScurryBase.iterate}\n   *\n   * Note: As of Node 19, this is very slow, compared to other methods of\n   * walking.  Consider using {@link PathScurryBase.stream} if memory overhead\n   * and backpressure are concerns, or {@link PathScurryBase.walk} if not.\n   */\n  [Symbol.asyncIterator]() {\n    return this.iterate()\n  }\n\n  /**\n   * Async generator form of {@link PathScurryBase.walk}\n   *\n   * Note: As of Node 19, this is very slow, compared to other methods of\n   * walking, especially if most/all of the directory tree has been previously\n   * walked.  Consider using {@link PathScurryBase.stream} if memory overhead\n   * and backpressure are concerns, or {@link PathScurryBase.walk} if not.\n   */\n  iterate(): AsyncGenerator\n  iterate(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): AsyncGenerator\n  iterate(\n    opts: WalkOptionsWithFileTypesFalse,\n  ): AsyncGenerator\n  iterate(opts: WalkOptions): AsyncGenerator\n  iterate(entry: string | PathBase): AsyncGenerator\n  iterate(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): AsyncGenerator\n  iterate(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): AsyncGenerator\n  iterate(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): AsyncGenerator\n  iterate(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    options: WalkOptions = {},\n  ): AsyncGenerator {\n    // iterating async over the stream is significantly more performant,\n    // especially in the warm-cache scenario, because it buffers up directory\n    // entries in the background instead of waiting for a yield for each one.\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      options = entry\n      entry = this.cwd\n    }\n    return this.stream(entry, options)[Symbol.asyncIterator]()\n  }\n\n  /**\n   * Iterating over a PathScurry performs a synchronous walk.\n   *\n   * Alias for {@link PathScurryBase.iterateSync}\n   */\n  [Symbol.iterator]() {\n    return this.iterateSync()\n  }\n\n  iterateSync(): Generator\n  iterateSync(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Generator\n  iterateSync(\n    opts: WalkOptionsWithFileTypesFalse,\n  ): Generator\n  iterateSync(opts: WalkOptions): Generator\n  iterateSync(entry: string | PathBase): Generator\n  iterateSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Generator\n  iterateSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): Generator\n  iterateSync(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): Generator\n  *iterateSync(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    opts: WalkOptions = {},\n  ): Generator {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const {\n      withFileTypes = true,\n      follow = false,\n      filter,\n      walkFilter,\n    } = opts\n    if (!filter || filter(entry)) {\n      yield withFileTypes ? entry : entry.fullpath()\n    }\n    const dirs = new Set([entry])\n    for (const dir of dirs) {\n      const entries = dir.readdirSync()\n      for (const e of entries) {\n        if (!filter || filter(e)) {\n          yield withFileTypes ? e : e.fullpath()\n        }\n        let r: PathBase | undefined = e\n        if (e.isSymbolicLink()) {\n          if (!(follow && (r = e.realpathSync()))) continue\n          if (r.isUnknown()) r.lstatSync()\n        }\n        if (r.shouldWalk(dirs, walkFilter)) {\n          dirs.add(r)\n        }\n      }\n    }\n  }\n\n  /**\n   * Stream form of {@link PathScurryBase.walk}\n   *\n   * Returns a Minipass stream that emits {@link PathBase} objects by default,\n   * or strings if `{ withFileTypes: false }` is set in the options.\n   */\n  stream(): Minipass\n  stream(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Minipass\n  stream(opts: WalkOptionsWithFileTypesFalse): Minipass\n  stream(opts: WalkOptions): Minipass\n  stream(entry: string | PathBase): Minipass\n  stream(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesUnset | WalkOptionsWithFileTypesTrue,\n  ): Minipass\n  stream(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): Minipass\n  stream(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): Minipass | Minipass\n  stream(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    opts: WalkOptions = {},\n  ): Minipass | Minipass {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const {\n      withFileTypes = true,\n      follow = false,\n      filter,\n      walkFilter,\n    } = opts\n    const results = new Minipass({ objectMode: true })\n    if (!filter || filter(entry)) {\n      results.write(withFileTypes ? entry : entry.fullpath())\n    }\n    const dirs = new Set()\n    const queue: PathBase[] = [entry]\n    let processing = 0\n    const process = () => {\n      let paused = false\n      while (!paused) {\n        const dir = queue.shift()\n        if (!dir) {\n          if (processing === 0) results.end()\n          return\n        }\n\n        processing++\n        dirs.add(dir)\n\n        const onReaddir = (\n          er: null | NodeJS.ErrnoException,\n          entries: PathBase[],\n          didRealpaths: boolean = false,\n        ) => {\n          /* c8 ignore start */\n          if (er) return results.emit('error', er)\n          /* c8 ignore stop */\n          if (follow && !didRealpaths) {\n            const promises: Promise[] = []\n            for (const e of entries) {\n              if (e.isSymbolicLink()) {\n                promises.push(\n                  e\n                    .realpath()\n                    .then((r: PathBase | undefined) =>\n                      r?.isUnknown() ? r.lstat() : r,\n                    ),\n                )\n              }\n            }\n            if (promises.length) {\n              Promise.all(promises).then(() =>\n                onReaddir(null, entries, true),\n              )\n              return\n            }\n          }\n\n          for (const e of entries) {\n            if (e && (!filter || filter(e))) {\n              if (!results.write(withFileTypes ? e : e.fullpath())) {\n                paused = true\n              }\n            }\n          }\n\n          processing--\n          for (const e of entries) {\n            const r = e.realpathCached() || e\n            if (r.shouldWalk(dirs, walkFilter)) {\n              queue.push(r)\n            }\n          }\n          if (paused && !results.flowing) {\n            results.once('drain', process)\n          } else if (!sync) {\n            process()\n          }\n        }\n\n        // zalgo containment\n        let sync = true\n        dir.readdirCB(onReaddir, true)\n        sync = false\n      }\n    }\n    process()\n    return results as Minipass | Minipass\n  }\n\n  /**\n   * Synchronous form of {@link PathScurryBase.stream}\n   *\n   * Returns a Minipass stream that emits {@link PathBase} objects by default,\n   * or strings if `{ withFileTypes: false }` is set in the options.\n   *\n   * Will complete the walk in a single tick if the stream is consumed fully.\n   * Otherwise, will pause as needed for stream backpressure.\n   */\n  streamSync(): Minipass\n  streamSync(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Minipass\n  streamSync(opts: WalkOptionsWithFileTypesFalse): Minipass\n  streamSync(opts: WalkOptions): Minipass\n  streamSync(entry: string | PathBase): Minipass\n  streamSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesUnset | WalkOptionsWithFileTypesTrue,\n  ): Minipass\n  streamSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): Minipass\n  streamSync(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): Minipass | Minipass\n  streamSync(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    opts: WalkOptions = {},\n  ): Minipass | Minipass {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const {\n      withFileTypes = true,\n      follow = false,\n      filter,\n      walkFilter,\n    } = opts\n    const results = new Minipass({ objectMode: true })\n    const dirs = new Set()\n    if (!filter || filter(entry)) {\n      results.write(withFileTypes ? entry : entry.fullpath())\n    }\n    const queue: PathBase[] = [entry]\n    let processing = 0\n    const process = () => {\n      let paused = false\n      while (!paused) {\n        const dir = queue.shift()\n        if (!dir) {\n          if (processing === 0) results.end()\n          return\n        }\n        processing++\n        dirs.add(dir)\n\n        const entries = dir.readdirSync()\n        for (const e of entries) {\n          if (!filter || filter(e)) {\n            if (!results.write(withFileTypes ? e : e.fullpath())) {\n              paused = true\n            }\n          }\n        }\n        processing--\n        for (const e of entries) {\n          let r: PathBase | undefined = e\n          if (e.isSymbolicLink()) {\n            if (!(follow && (r = e.realpathSync()))) continue\n            if (r.isUnknown()) r.lstatSync()\n          }\n          if (r.shouldWalk(dirs, walkFilter)) {\n            queue.push(r)\n          }\n        }\n      }\n      if (paused && !results.flowing) results.once('drain', process)\n    }\n    process()\n    return results as Minipass | Minipass\n  }\n\n  chdir(path: string | Path = this.cwd) {\n    const oldCwd = this.cwd\n    this.cwd = typeof path === 'string' ? this.cwd.resolve(path) : path\n    this.cwd[setAsCwd](oldCwd)\n  }\n}\n\n/**\n * Options provided to all walk methods.\n */\nexport interface WalkOptions {\n  /**\n   * Return results as {@link PathBase} objects rather than strings.\n   * When set to false, results are fully resolved paths, as returned by\n   * {@link PathBase.fullpath}.\n   * @default true\n   */\n  withFileTypes?: boolean\n\n  /**\n   *  Attempt to read directory entries from symbolic links. Otherwise, only\n   *  actual directories are traversed. Regardless of this setting, a given\n   *  target path will only ever be walked once, meaning that a symbolic link\n   *  to a previously traversed directory will never be followed.\n   *\n   *  Setting this imposes a slight performance penalty, because `readlink`\n   *  must be called on all symbolic links encountered, in order to avoid\n   *  infinite cycles.\n   * @default false\n   */\n  follow?: boolean\n\n  /**\n   * Only return entries where the provided function returns true.\n   *\n   * This will not prevent directories from being traversed, even if they do\n   * not pass the filter, though it will prevent directories themselves from\n   * being included in the result set.  See {@link walkFilter}\n   *\n   * Asynchronous functions are not supported here.\n   *\n   * By default, if no filter is provided, all entries and traversed\n   * directories are included.\n   */\n  filter?: (entry: PathBase) => boolean\n\n  /**\n   * Only traverse directories (and in the case of {@link follow} being set to\n   * true, symbolic links to directories) if the provided function returns\n   * true.\n   *\n   * This will not prevent directories from being included in the result set,\n   * even if they do not pass the supplied filter function.  See {@link filter}\n   * to do that.\n   *\n   * Asynchronous functions are not supported here.\n   */\n  walkFilter?: (entry: PathBase) => boolean\n}\n\nexport type WalkOptionsWithFileTypesUnset = WalkOptions & {\n  withFileTypes?: undefined\n}\nexport type WalkOptionsWithFileTypesTrue = WalkOptions & {\n  withFileTypes: true\n}\nexport type WalkOptionsWithFileTypesFalse = WalkOptions & {\n  withFileTypes: false\n}\n\n/**\n * Windows implementation of {@link PathScurryBase}\n *\n * Defaults to case insensitve, uses `'\\\\'` to generate path strings.  Uses\n * {@link PathWin32} for Path objects.\n */\nexport class PathScurryWin32 extends PathScurryBase {\n  /**\n   * separator for generating path strings\n   */\n  sep: '\\\\' = '\\\\'\n\n  constructor(\n    cwd: URL | string = process.cwd(),\n    opts: PathScurryOpts = {},\n  ) {\n    const { nocase = true } = opts\n    super(cwd, win32, '\\\\', { ...opts, nocase })\n    this.nocase = nocase\n    for (let p: PathBase | undefined = this.cwd; p; p = p.parent) {\n      p.nocase = this.nocase\n    }\n  }\n\n  /**\n   * @internal\n   */\n  parseRootPath(dir: string): string {\n    // if the path starts with a single separator, it's not a UNC, and we'll\n    // just get separator as the root, and driveFromUNC will return \\\n    // In that case, mount \\ on the root from the cwd.\n    return win32.parse(dir).root.toUpperCase()\n  }\n\n  /**\n   * @internal\n   */\n  newRoot(fs: FSValue) {\n    return new PathWin32(\n      this.rootPath,\n      IFDIR,\n      undefined,\n      this.roots,\n      this.nocase,\n      this.childrenCache(),\n      { fs },\n    )\n  }\n\n  /**\n   * Return true if the provided path string is an absolute path\n   */\n  isAbsolute(p: string): boolean {\n    return (\n      p.startsWith('/') || p.startsWith('\\\\') || /^[a-z]:(\\/|\\\\)/i.test(p)\n    )\n  }\n}\n\n/**\n * {@link PathScurryBase} implementation for all posix systems other than Darwin.\n *\n * Defaults to case-sensitive matching, uses `'/'` to generate path strings.\n *\n * Uses {@link PathPosix} for Path objects.\n */\nexport class PathScurryPosix extends PathScurryBase {\n  /**\n   * separator for generating path strings\n   */\n  sep: '/' = '/'\n  constructor(\n    cwd: URL | string = process.cwd(),\n    opts: PathScurryOpts = {},\n  ) {\n    const { nocase = false } = opts\n    super(cwd, posix, '/', { ...opts, nocase })\n    this.nocase = nocase\n  }\n\n  /**\n   * @internal\n   */\n  parseRootPath(_dir: string): string {\n    return '/'\n  }\n\n  /**\n   * @internal\n   */\n  newRoot(fs: FSValue) {\n    return new PathPosix(\n      this.rootPath,\n      IFDIR,\n      undefined,\n      this.roots,\n      this.nocase,\n      this.childrenCache(),\n      { fs },\n    )\n  }\n\n  /**\n   * Return true if the provided path string is an absolute path\n   */\n  isAbsolute(p: string): boolean {\n    return p.startsWith('/')\n  }\n}\n\n/**\n * {@link PathScurryBase} implementation for Darwin (macOS) systems.\n *\n * Defaults to case-insensitive matching, uses `'/'` for generating path\n * strings.\n *\n * Uses {@link PathPosix} for Path objects.\n */\nexport class PathScurryDarwin extends PathScurryPosix {\n  constructor(\n    cwd: URL | string = process.cwd(),\n    opts: PathScurryOpts = {},\n  ) {\n    const { nocase = true } = opts\n    super(cwd, { ...opts, nocase })\n  }\n}\n\n/**\n * Default {@link PathBase} implementation for the current platform.\n *\n * {@link PathWin32} on Windows systems, {@link PathPosix} on all others.\n */\nexport const Path = process.platform === 'win32' ? PathWin32 : PathPosix\nexport type Path = PathBase | InstanceType\n\n/**\n * Default {@link PathScurryBase} implementation for the current platform.\n *\n * {@link PathScurryWin32} on Windows systems, {@link PathScurryDarwin} on\n * Darwin (macOS) systems, {@link PathScurryPosix} on all others.\n */\nexport const PathScurry:\n  | typeof PathScurryWin32\n  | typeof PathScurryDarwin\n  | typeof PathScurryPosix =\n  process.platform === 'win32' ? PathScurryWin32\n  : process.platform === 'darwin' ? PathScurryDarwin\n  : PathScurryPosix\nexport type PathScurry = PathScurryBase | InstanceType\n", "const proc =\n  typeof process === 'object' && process\n    ? process\n    : {\n        stdout: null,\n        stderr: null,\n      }\nimport { EventEmitter } from 'node:events'\nimport Stream from 'node:stream'\nimport { StringDecoder } from 'node:string_decoder'\n\n/**\n * Same as StringDecoder, but exposing the `lastNeed` flag on the type\n */\ntype SD = StringDecoder & { lastNeed: boolean }\n\nexport type { SD, Pipe, PipeProxyErrors }\n\n/**\n * Return true if the argument is a Minipass stream, Node stream, or something\n * else that Minipass can interact with.\n */\nexport const isStream = (\n  s: any\n): s is Minipass.Readable | Minipass.Writable =>\n  !!s &&\n  typeof s === 'object' &&\n  (s instanceof Minipass ||\n    s instanceof Stream ||\n    isReadable(s) ||\n    isWritable(s))\n\n/**\n * Return true if the argument is a valid {@link Minipass.Readable}\n */\nexport const isReadable = (s: any): s is Minipass.Readable =>\n  !!s &&\n  typeof s === 'object' &&\n  s instanceof EventEmitter &&\n  typeof (s as Minipass.Readable).pipe === 'function' &&\n  // node core Writable streams have a pipe() method, but it throws\n  (s as Minipass.Readable).pipe !== Stream.Writable.prototype.pipe\n\n/**\n * Return true if the argument is a valid {@link Minipass.Writable}\n */\nexport const isWritable = (s: any): s is Minipass.Readable =>\n  !!s &&\n  typeof s === 'object' &&\n  s instanceof EventEmitter &&\n  typeof (s as Minipass.Writable).write === 'function' &&\n  typeof (s as Minipass.Writable).end === 'function'\n\nconst EOF = Symbol('EOF')\nconst MAYBE_EMIT_END = Symbol('maybeEmitEnd')\nconst EMITTED_END = Symbol('emittedEnd')\nconst EMITTING_END = Symbol('emittingEnd')\nconst EMITTED_ERROR = Symbol('emittedError')\nconst CLOSED = Symbol('closed')\nconst READ = Symbol('read')\nconst FLUSH = Symbol('flush')\nconst FLUSHCHUNK = Symbol('flushChunk')\nconst ENCODING = Symbol('encoding')\nconst DECODER = Symbol('decoder')\nconst FLOWING = Symbol('flowing')\nconst PAUSED = Symbol('paused')\nconst RESUME = Symbol('resume')\nconst BUFFER = Symbol('buffer')\nconst PIPES = Symbol('pipes')\nconst BUFFERLENGTH = Symbol('bufferLength')\nconst BUFFERPUSH = Symbol('bufferPush')\nconst BUFFERSHIFT = Symbol('bufferShift')\nconst OBJECTMODE = Symbol('objectMode')\n// internal event when stream is destroyed\nconst DESTROYED = Symbol('destroyed')\n// internal event when stream has an error\nconst ERROR = Symbol('error')\nconst EMITDATA = Symbol('emitData')\nconst EMITEND = Symbol('emitEnd')\nconst EMITEND2 = Symbol('emitEnd2')\nconst ASYNC = Symbol('async')\nconst ABORT = Symbol('abort')\nconst ABORTED = Symbol('aborted')\nconst SIGNAL = Symbol('signal')\nconst DATALISTENERS = Symbol('dataListeners')\nconst DISCARDED = Symbol('discarded')\n\nconst defer = (fn: (...a: any[]) => any) => Promise.resolve().then(fn)\nconst nodefer = (fn: (...a: any[]) => any) => fn()\n\n// events that mean 'the stream is over'\n// these are treated specially, and re-emitted\n// if they are listened for after emitting.\ntype EndishEvent = 'end' | 'finish' | 'prefinish'\nconst isEndish = (ev: any): ev is EndishEvent =>\n  ev === 'end' || ev === 'finish' || ev === 'prefinish'\n\nconst isArrayBufferLike = (b: any): b is ArrayBufferLike =>\n  b instanceof ArrayBuffer ||\n  (!!b &&\n    typeof b === 'object' &&\n    b.constructor &&\n    b.constructor.name === 'ArrayBuffer' &&\n    b.byteLength >= 0)\n\nconst isArrayBufferView = (b: any): b is ArrayBufferView =>\n  !Buffer.isBuffer(b) && ArrayBuffer.isView(b)\n\n/**\n * Options that may be passed to stream.pipe()\n */\nexport interface PipeOptions {\n  /**\n   * end the destination stream when the source stream ends\n   */\n  end?: boolean\n  /**\n   * proxy errors from the source stream to the destination stream\n   */\n  proxyErrors?: boolean\n}\n\n/**\n * Internal class representing a pipe to a destination stream.\n *\n * @internal\n */\nclass Pipe {\n  src: Minipass\n  dest: Minipass\n  opts: PipeOptions\n  ondrain: () => any\n  constructor(\n    src: Minipass,\n    dest: Minipass.Writable,\n    opts: PipeOptions\n  ) {\n    this.src = src\n    this.dest = dest as Minipass\n    this.opts = opts\n    this.ondrain = () => src[RESUME]()\n    this.dest.on('drain', this.ondrain)\n  }\n  unpipe() {\n    this.dest.removeListener('drain', this.ondrain)\n  }\n  // only here for the prototype\n  /* c8 ignore start */\n  proxyErrors(_er: any) {}\n  /* c8 ignore stop */\n  end() {\n    this.unpipe()\n    if (this.opts.end) this.dest.end()\n  }\n}\n\n/**\n * Internal class representing a pipe to a destination stream where\n * errors are proxied.\n *\n * @internal\n */\nclass PipeProxyErrors extends Pipe {\n  unpipe() {\n    this.src.removeListener('error', this.proxyErrors)\n    super.unpipe()\n  }\n  constructor(\n    src: Minipass,\n    dest: Minipass.Writable,\n    opts: PipeOptions\n  ) {\n    super(src, dest, opts)\n    this.proxyErrors = (er: Error) => this.dest.emit('error', er)\n    src.on('error', this.proxyErrors)\n  }\n}\n\nexport namespace Minipass {\n  /**\n   * Encoding used to create a stream that outputs strings rather than\n   * Buffer objects.\n   */\n  export type Encoding = BufferEncoding | 'buffer' | null\n\n  /**\n   * Any stream that Minipass can pipe into\n   */\n  export type Writable =\n    | Minipass\n    | NodeJS.WriteStream\n    | (NodeJS.WriteStream & { fd: number })\n    | (EventEmitter & {\n        end(): any\n        write(chunk: any, ...args: any[]): any\n      })\n\n  /**\n   * Any stream that can be read from\n   */\n  export type Readable =\n    | Minipass\n    | NodeJS.ReadStream\n    | (NodeJS.ReadStream & { fd: number })\n    | (EventEmitter & {\n        pause(): any\n        resume(): any\n        pipe(...destArgs: any[]): any\n      })\n\n  /**\n   * Utility type that can be iterated sync or async\n   */\n  export type DualIterable = Iterable & AsyncIterable\n\n  type EventArguments = Record\n\n  /**\n   * The listing of events that a Minipass class can emit.\n   * Extend this when extending the Minipass class, and pass as\n   * the third template argument.  The key is the name of the event,\n   * and the value is the argument list.\n   *\n   * Any undeclared events will still be allowed, but the handler will get\n   * arguments as `unknown[]`.\n   */\n  export interface Events\n    extends EventArguments {\n    readable: []\n    data: [chunk: RType]\n    error: [er: unknown]\n    abort: [reason: unknown]\n    drain: []\n    resume: []\n    end: []\n    finish: []\n    prefinish: []\n    close: []\n    [DESTROYED]: [er?: unknown]\n    [ERROR]: [er: unknown]\n  }\n\n  /**\n   * String or buffer-like data that can be joined and sliced\n   */\n  export type ContiguousData =\n    | Buffer\n    | ArrayBufferLike\n    | ArrayBufferView\n    | string\n  export type BufferOrString = Buffer | string\n\n  /**\n   * Options passed to the Minipass constructor.\n   */\n  export type SharedOptions = {\n    /**\n     * Defer all data emission and other events until the end of the\n     * current tick, similar to Node core streams\n     */\n    async?: boolean\n    /**\n     * A signal which will abort the stream\n     */\n    signal?: AbortSignal\n    /**\n     * Output string encoding. Set to `null` or `'buffer'` (or omit) to\n     * emit Buffer objects rather than strings.\n     *\n     * Conflicts with `objectMode`\n     */\n    encoding?: BufferEncoding | null | 'buffer'\n    /**\n     * Output data exactly as it was written, supporting non-buffer/string\n     * data (such as arbitrary objects, falsey values, etc.)\n     *\n     * Conflicts with `encoding`\n     */\n    objectMode?: boolean\n  }\n\n  /**\n   * Options for a string encoded output\n   */\n  export type EncodingOptions = SharedOptions & {\n    encoding: BufferEncoding\n    objectMode?: false\n  }\n\n  /**\n   * Options for contiguous data buffer output\n   */\n  export type BufferOptions = SharedOptions & {\n    encoding?: null | 'buffer'\n    objectMode?: false\n  }\n\n  /**\n   * Options for objectMode arbitrary output\n   */\n  export type ObjectModeOptions = SharedOptions & {\n    objectMode: true\n    encoding?: null\n  }\n\n  /**\n   * Utility type to determine allowed options based on read type\n   */\n  export type Options =\n    | ObjectModeOptions\n    | (T extends string\n        ? EncodingOptions\n        : T extends Buffer\n        ? BufferOptions\n        : SharedOptions)\n}\n\nconst isObjectModeOptions = (\n  o: Minipass.SharedOptions\n): o is Minipass.ObjectModeOptions => !!o.objectMode\n\nconst isEncodingOptions = (\n  o: Minipass.SharedOptions\n): o is Minipass.EncodingOptions =>\n  !o.objectMode && !!o.encoding && o.encoding !== 'buffer'\n\n/**\n * Main export, the Minipass class\n *\n * `RType` is the type of data emitted, defaults to Buffer\n *\n * `WType` is the type of data to be written, if RType is buffer or string,\n * then any {@link Minipass.ContiguousData} is allowed.\n *\n * `Events` is the set of event handler signatures that this object\n * will emit, see {@link Minipass.Events}\n */\nexport class Minipass<\n    RType extends unknown = Buffer,\n    WType extends unknown = RType extends Minipass.BufferOrString\n      ? Minipass.ContiguousData\n      : RType,\n    Events extends Minipass.Events = Minipass.Events\n  >\n  extends EventEmitter\n  implements Minipass.DualIterable\n{\n  [FLOWING]: boolean = false;\n  [PAUSED]: boolean = false;\n  [PIPES]: Pipe[] = [];\n  [BUFFER]: RType[] = [];\n  [OBJECTMODE]: boolean;\n  [ENCODING]: BufferEncoding | null;\n  [ASYNC]: boolean;\n  [DECODER]: SD | null;\n  [EOF]: boolean = false;\n  [EMITTED_END]: boolean = false;\n  [EMITTING_END]: boolean = false;\n  [CLOSED]: boolean = false;\n  [EMITTED_ERROR]: unknown = null;\n  [BUFFERLENGTH]: number = 0;\n  [DESTROYED]: boolean = false;\n  [SIGNAL]?: AbortSignal;\n  [ABORTED]: boolean = false;\n  [DATALISTENERS]: number = 0;\n  [DISCARDED]: boolean = false\n\n  /**\n   * true if the stream can be written\n   */\n  writable: boolean = true\n  /**\n   * true if the stream can be read\n   */\n  readable: boolean = true\n\n  /**\n   * If `RType` is Buffer, then options do not need to be provided.\n   * Otherwise, an options object must be provided to specify either\n   * {@link Minipass.SharedOptions.objectMode} or\n   * {@link Minipass.SharedOptions.encoding}, as appropriate.\n   */\n  constructor(\n    ...args:\n      | [Minipass.ObjectModeOptions]\n      | (RType extends Buffer\n          ? [] | [Minipass.Options]\n          : [Minipass.Options])\n  ) {\n    const options: Minipass.Options = (args[0] ||\n      {}) as Minipass.Options\n    super()\n    if (options.objectMode && typeof options.encoding === 'string') {\n      throw new TypeError(\n        'Encoding and objectMode may not be used together'\n      )\n    }\n    if (isObjectModeOptions(options)) {\n      this[OBJECTMODE] = true\n      this[ENCODING] = null\n    } else if (isEncodingOptions(options)) {\n      this[ENCODING] = options.encoding\n      this[OBJECTMODE] = false\n    } else {\n      this[OBJECTMODE] = false\n      this[ENCODING] = null\n    }\n    this[ASYNC] = !!options.async\n    this[DECODER] = this[ENCODING]\n      ? (new StringDecoder(this[ENCODING]) as SD)\n      : null\n\n    //@ts-ignore - private option for debugging and testing\n    if (options && options.debugExposeBuffer === true) {\n      Object.defineProperty(this, 'buffer', { get: () => this[BUFFER] })\n    }\n    //@ts-ignore - private option for debugging and testing\n    if (options && options.debugExposePipes === true) {\n      Object.defineProperty(this, 'pipes', { get: () => this[PIPES] })\n    }\n\n    const { signal } = options\n    if (signal) {\n      this[SIGNAL] = signal\n      if (signal.aborted) {\n        this[ABORT]()\n      } else {\n        signal.addEventListener('abort', () => this[ABORT]())\n      }\n    }\n  }\n\n  /**\n   * The amount of data stored in the buffer waiting to be read.\n   *\n   * For Buffer strings, this will be the total byte length.\n   * For string encoding streams, this will be the string character length,\n   * according to JavaScript's `string.length` logic.\n   * For objectMode streams, this is a count of the items waiting to be\n   * emitted.\n   */\n  get bufferLength() {\n    return this[BUFFERLENGTH]\n  }\n\n  /**\n   * The `BufferEncoding` currently in use, or `null`\n   */\n  get encoding() {\n    return this[ENCODING]\n  }\n\n  /**\n   * @deprecated - This is a read only property\n   */\n  set encoding(_enc) {\n    throw new Error('Encoding must be set at instantiation time')\n  }\n\n  /**\n   * @deprecated - Encoding may only be set at instantiation time\n   */\n  setEncoding(_enc: Minipass.Encoding) {\n    throw new Error('Encoding must be set at instantiation time')\n  }\n\n  /**\n   * True if this is an objectMode stream\n   */\n  get objectMode() {\n    return this[OBJECTMODE]\n  }\n\n  /**\n   * @deprecated - This is a read-only property\n   */\n  set objectMode(_om) {\n    throw new Error('objectMode must be set at instantiation time')\n  }\n\n  /**\n   * true if this is an async stream\n   */\n  get ['async'](): boolean {\n    return this[ASYNC]\n  }\n  /**\n   * Set to true to make this stream async.\n   *\n   * Once set, it cannot be unset, as this would potentially cause incorrect\n   * behavior.  Ie, a sync stream can be made async, but an async stream\n   * cannot be safely made sync.\n   */\n  set ['async'](a: boolean) {\n    this[ASYNC] = this[ASYNC] || !!a\n  }\n\n  // drop everything and get out of the flow completely\n  [ABORT]() {\n    this[ABORTED] = true\n    this.emit('abort', this[SIGNAL]?.reason)\n    this.destroy(this[SIGNAL]?.reason)\n  }\n\n  /**\n   * True if the stream has been aborted.\n   */\n  get aborted() {\n    return this[ABORTED]\n  }\n  /**\n   * No-op setter. Stream aborted status is set via the AbortSignal provided\n   * in the constructor options.\n   */\n  set aborted(_) {}\n\n  /**\n   * Write data into the stream\n   *\n   * If the chunk written is a string, and encoding is not specified, then\n   * `utf8` will be assumed. If the stream encoding matches the encoding of\n   * a written string, and the state of the string decoder allows it, then\n   * the string will be passed through to either the output or the internal\n   * buffer without any processing. Otherwise, it will be turned into a\n   * Buffer object for processing into the desired encoding.\n   *\n   * If provided, `cb` function is called immediately before return for\n   * sync streams, or on next tick for async streams, because for this\n   * base class, a chunk is considered \"processed\" once it is accepted\n   * and either emitted or buffered. That is, the callback does not indicate\n   * that the chunk has been eventually emitted, though of course child\n   * classes can override this function to do whatever processing is required\n   * and call `super.write(...)` only once processing is completed.\n   */\n  write(chunk: WType, cb?: () => void): boolean\n  write(\n    chunk: WType,\n    encoding?: Minipass.Encoding,\n    cb?: () => void\n  ): boolean\n  write(\n    chunk: WType,\n    encoding?: Minipass.Encoding | (() => void),\n    cb?: () => void\n  ): boolean {\n    if (this[ABORTED]) return false\n    if (this[EOF]) throw new Error('write after end')\n\n    if (this[DESTROYED]) {\n      this.emit(\n        'error',\n        Object.assign(\n          new Error('Cannot call write after a stream was destroyed'),\n          { code: 'ERR_STREAM_DESTROYED' }\n        )\n      )\n      return true\n    }\n\n    if (typeof encoding === 'function') {\n      cb = encoding\n      encoding = 'utf8'\n    }\n\n    if (!encoding) encoding = 'utf8'\n\n    const fn = this[ASYNC] ? defer : nodefer\n\n    // convert array buffers and typed array views into buffers\n    // at some point in the future, we may want to do the opposite!\n    // leave strings and buffers as-is\n    // anything is only allowed if in object mode, so throw\n    if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {\n      if (isArrayBufferView(chunk)) {\n        //@ts-ignore - sinful unsafe type changing\n        chunk = Buffer.from(\n          chunk.buffer,\n          chunk.byteOffset,\n          chunk.byteLength\n        )\n      } else if (isArrayBufferLike(chunk)) {\n        //@ts-ignore - sinful unsafe type changing\n        chunk = Buffer.from(chunk)\n      } else if (typeof chunk !== 'string') {\n        throw new Error(\n          'Non-contiguous data written to non-objectMode stream'\n        )\n      }\n    }\n\n    // handle object mode up front, since it's simpler\n    // this yields better performance, fewer checks later.\n    if (this[OBJECTMODE]) {\n      // maybe impossible?\n      /* c8 ignore start */\n      if (this[FLOWING] && this[BUFFERLENGTH] !== 0) this[FLUSH](true)\n      /* c8 ignore stop */\n\n      if (this[FLOWING]) this.emit('data', chunk as unknown as RType)\n      else this[BUFFERPUSH](chunk as unknown as RType)\n\n      if (this[BUFFERLENGTH] !== 0) this.emit('readable')\n\n      if (cb) fn(cb)\n\n      return this[FLOWING]\n    }\n\n    // at this point the chunk is a buffer or string\n    // don't buffer it up or send it to the decoder\n    if (!(chunk as Minipass.BufferOrString).length) {\n      if (this[BUFFERLENGTH] !== 0) this.emit('readable')\n      if (cb) fn(cb)\n      return this[FLOWING]\n    }\n\n    // fast-path writing strings of same encoding to a stream with\n    // an empty buffer, skipping the buffer/decoder dance\n    if (\n      typeof chunk === 'string' &&\n      // unless it is a string already ready for us to use\n      !(encoding === this[ENCODING] && !this[DECODER]?.lastNeed)\n    ) {\n      //@ts-ignore - sinful unsafe type change\n      chunk = Buffer.from(chunk, encoding)\n    }\n\n    if (Buffer.isBuffer(chunk) && this[ENCODING]) {\n      //@ts-ignore - sinful unsafe type change\n      chunk = this[DECODER].write(chunk)\n    }\n\n    // Note: flushing CAN potentially switch us into not-flowing mode\n    if (this[FLOWING] && this[BUFFERLENGTH] !== 0) this[FLUSH](true)\n\n    if (this[FLOWING]) this.emit('data', chunk as unknown as RType)\n    else this[BUFFERPUSH](chunk as unknown as RType)\n\n    if (this[BUFFERLENGTH] !== 0) this.emit('readable')\n\n    if (cb) fn(cb)\n\n    return this[FLOWING]\n  }\n\n  /**\n   * Low-level explicit read method.\n   *\n   * In objectMode, the argument is ignored, and one item is returned if\n   * available.\n   *\n   * `n` is the number of bytes (or in the case of encoding streams,\n   * characters) to consume. If `n` is not provided, then the entire buffer\n   * is returned, or `null` is returned if no data is available.\n   *\n   * If `n` is greater that the amount of data in the internal buffer,\n   * then `null` is returned.\n   */\n  read(n?: number | null): RType | null {\n    if (this[DESTROYED]) return null\n    this[DISCARDED] = false\n\n    if (\n      this[BUFFERLENGTH] === 0 ||\n      n === 0 ||\n      (n && n > this[BUFFERLENGTH])\n    ) {\n      this[MAYBE_EMIT_END]()\n      return null\n    }\n\n    if (this[OBJECTMODE]) n = null\n\n    if (this[BUFFER].length > 1 && !this[OBJECTMODE]) {\n      // not object mode, so if we have an encoding, then RType is string\n      // otherwise, must be Buffer\n      this[BUFFER] = [\n        (this[ENCODING]\n          ? this[BUFFER].join('')\n          : Buffer.concat(\n              this[BUFFER] as Buffer[],\n              this[BUFFERLENGTH]\n            )) as RType,\n      ]\n    }\n\n    const ret = this[READ](n || null, this[BUFFER][0] as RType)\n    this[MAYBE_EMIT_END]()\n    return ret\n  }\n\n  [READ](n: number | null, chunk: RType) {\n    if (this[OBJECTMODE]) this[BUFFERSHIFT]()\n    else {\n      const c = chunk as Minipass.BufferOrString\n      if (n === c.length || n === null) this[BUFFERSHIFT]()\n      else if (typeof c === 'string') {\n        this[BUFFER][0] = c.slice(n) as RType\n        chunk = c.slice(0, n) as RType\n        this[BUFFERLENGTH] -= n\n      } else {\n        this[BUFFER][0] = c.subarray(n) as RType\n        chunk = c.subarray(0, n) as RType\n        this[BUFFERLENGTH] -= n\n      }\n    }\n\n    this.emit('data', chunk)\n\n    if (!this[BUFFER].length && !this[EOF]) this.emit('drain')\n\n    return chunk\n  }\n\n  /**\n   * End the stream, optionally providing a final write.\n   *\n   * See {@link Minipass#write} for argument descriptions\n   */\n  end(cb?: () => void): this\n  end(chunk: WType, cb?: () => void): this\n  end(chunk: WType, encoding?: Minipass.Encoding, cb?: () => void): this\n  end(\n    chunk?: WType | (() => void),\n    encoding?: Minipass.Encoding | (() => void),\n    cb?: () => void\n  ): this {\n    if (typeof chunk === 'function') {\n      cb = chunk as () => void\n      chunk = undefined\n    }\n    if (typeof encoding === 'function') {\n      cb = encoding\n      encoding = 'utf8'\n    }\n    if (chunk !== undefined) this.write(chunk, encoding)\n    if (cb) this.once('end', cb)\n    this[EOF] = true\n    this.writable = false\n\n    // if we haven't written anything, then go ahead and emit,\n    // even if we're not reading.\n    // we'll re-emit if a new 'end' listener is added anyway.\n    // This makes MP more suitable to write-only use cases.\n    if (this[FLOWING] || !this[PAUSED]) this[MAYBE_EMIT_END]()\n    return this\n  }\n\n  // don't let the internal resume be overwritten\n  [RESUME]() {\n    if (this[DESTROYED]) return\n\n    if (!this[DATALISTENERS] && !this[PIPES].length) {\n      this[DISCARDED] = true\n    }\n    this[PAUSED] = false\n    this[FLOWING] = true\n    this.emit('resume')\n    if (this[BUFFER].length) this[FLUSH]()\n    else if (this[EOF]) this[MAYBE_EMIT_END]()\n    else this.emit('drain')\n  }\n\n  /**\n   * Resume the stream if it is currently in a paused state\n   *\n   * If called when there are no pipe destinations or `data` event listeners,\n   * this will place the stream in a \"discarded\" state, where all data will\n   * be thrown away. The discarded state is removed if a pipe destination or\n   * data handler is added, if pause() is called, or if any synchronous or\n   * asynchronous iteration is started.\n   */\n  resume() {\n    return this[RESUME]()\n  }\n\n  /**\n   * Pause the stream\n   */\n  pause() {\n    this[FLOWING] = false\n    this[PAUSED] = true\n    this[DISCARDED] = false\n  }\n\n  /**\n   * true if the stream has been forcibly destroyed\n   */\n  get destroyed() {\n    return this[DESTROYED]\n  }\n\n  /**\n   * true if the stream is currently in a flowing state, meaning that\n   * any writes will be immediately emitted.\n   */\n  get flowing() {\n    return this[FLOWING]\n  }\n\n  /**\n   * true if the stream is currently in a paused state\n   */\n  get paused() {\n    return this[PAUSED]\n  }\n\n  [BUFFERPUSH](chunk: RType) {\n    if (this[OBJECTMODE]) this[BUFFERLENGTH] += 1\n    else this[BUFFERLENGTH] += (chunk as Minipass.BufferOrString).length\n    this[BUFFER].push(chunk)\n  }\n\n  [BUFFERSHIFT](): RType {\n    if (this[OBJECTMODE]) this[BUFFERLENGTH] -= 1\n    else\n      this[BUFFERLENGTH] -= (\n        this[BUFFER][0] as Minipass.BufferOrString\n      ).length\n    return this[BUFFER].shift() as RType\n  }\n\n  [FLUSH](noDrain: boolean = false) {\n    do {} while (\n      this[FLUSHCHUNK](this[BUFFERSHIFT]()) &&\n      this[BUFFER].length\n    )\n\n    if (!noDrain && !this[BUFFER].length && !this[EOF]) this.emit('drain')\n  }\n\n  [FLUSHCHUNK](chunk: RType) {\n    this.emit('data', chunk)\n    return this[FLOWING]\n  }\n\n  /**\n   * Pipe all data emitted by this stream into the destination provided.\n   *\n   * Triggers the flow of data.\n   */\n  pipe(dest: W, opts?: PipeOptions): W {\n    if (this[DESTROYED]) return dest\n    this[DISCARDED] = false\n\n    const ended = this[EMITTED_END]\n    opts = opts || {}\n    if (dest === proc.stdout || dest === proc.stderr) opts.end = false\n    else opts.end = opts.end !== false\n    opts.proxyErrors = !!opts.proxyErrors\n\n    // piping an ended stream ends immediately\n    if (ended) {\n      if (opts.end) dest.end()\n    } else {\n      // \"as\" here just ignores the WType, which pipes don't care about,\n      // since they're only consuming from us, and writing to the dest\n      this[PIPES].push(\n        !opts.proxyErrors\n          ? new Pipe(this as Minipass, dest, opts)\n          : new PipeProxyErrors(this as Minipass, dest, opts)\n      )\n      if (this[ASYNC]) defer(() => this[RESUME]())\n      else this[RESUME]()\n    }\n\n    return dest\n  }\n\n  /**\n   * Fully unhook a piped destination stream.\n   *\n   * If the destination stream was the only consumer of this stream (ie,\n   * there are no other piped destinations or `'data'` event listeners)\n   * then the flow of data will stop until there is another consumer or\n   * {@link Minipass#resume} is explicitly called.\n   */\n  unpipe(dest: W) {\n    const p = this[PIPES].find(p => p.dest === dest)\n    if (p) {\n      if (this[PIPES].length === 1) {\n        if (this[FLOWING] && this[DATALISTENERS] === 0) {\n          this[FLOWING] = false\n        }\n        this[PIPES] = []\n      } else this[PIPES].splice(this[PIPES].indexOf(p), 1)\n      p.unpipe()\n    }\n  }\n\n  /**\n   * Alias for {@link Minipass#on}\n   */\n  addListener(\n    ev: Event,\n    handler: (...args: Events[Event]) => any\n  ): this {\n    return this.on(ev, handler)\n  }\n\n  /**\n   * Mostly identical to `EventEmitter.on`, with the following\n   * behavior differences to prevent data loss and unnecessary hangs:\n   *\n   * - Adding a 'data' event handler will trigger the flow of data\n   *\n   * - Adding a 'readable' event handler when there is data waiting to be read\n   *   will cause 'readable' to be emitted immediately.\n   *\n   * - Adding an 'endish' event handler ('end', 'finish', etc.) which has\n   *   already passed will cause the event to be emitted immediately and all\n   *   handlers removed.\n   *\n   * - Adding an 'error' event handler after an error has been emitted will\n   *   cause the event to be re-emitted immediately with the error previously\n   *   raised.\n   */\n  on(\n    ev: Event,\n    handler: (...args: Events[Event]) => any\n  ): this {\n    const ret = super.on(\n      ev as string | symbol,\n      handler as (...a: any[]) => any\n    )\n    if (ev === 'data') {\n      this[DISCARDED] = false\n      this[DATALISTENERS]++\n      if (!this[PIPES].length && !this[FLOWING]) {\n        this[RESUME]()\n      }\n    } else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) {\n      super.emit('readable')\n    } else if (isEndish(ev) && this[EMITTED_END]) {\n      super.emit(ev)\n      this.removeAllListeners(ev)\n    } else if (ev === 'error' && this[EMITTED_ERROR]) {\n      const h = handler as (...a: Events['error']) => any\n      if (this[ASYNC]) defer(() => h.call(this, this[EMITTED_ERROR]))\n      else h.call(this, this[EMITTED_ERROR])\n    }\n    return ret\n  }\n\n  /**\n   * Alias for {@link Minipass#off}\n   */\n  removeListener(\n    ev: Event,\n    handler: (...args: Events[Event]) => any\n  ) {\n    return this.off(ev, handler)\n  }\n\n  /**\n   * Mostly identical to `EventEmitter.off`\n   *\n   * If a 'data' event handler is removed, and it was the last consumer\n   * (ie, there are no pipe destinations or other 'data' event listeners),\n   * then the flow of data will stop until there is another consumer or\n   * {@link Minipass#resume} is explicitly called.\n   */\n  off(\n    ev: Event,\n    handler: (...args: Events[Event]) => any\n  ) {\n    const ret = super.off(\n      ev as string | symbol,\n      handler as (...a: any[]) => any\n    )\n    // if we previously had listeners, and now we don't, and we don't\n    // have any pipes, then stop the flow, unless it's been explicitly\n    // put in a discarded flowing state via stream.resume().\n    if (ev === 'data') {\n      this[DATALISTENERS] = this.listeners('data').length\n      if (\n        this[DATALISTENERS] === 0 &&\n        !this[DISCARDED] &&\n        !this[PIPES].length\n      ) {\n        this[FLOWING] = false\n      }\n    }\n    return ret\n  }\n\n  /**\n   * Mostly identical to `EventEmitter.removeAllListeners`\n   *\n   * If all 'data' event handlers are removed, and they were the last consumer\n   * (ie, there are no pipe destinations), then the flow of data will stop\n   * until there is another consumer or {@link Minipass#resume} is explicitly\n   * called.\n   */\n  removeAllListeners(ev?: Event) {\n    const ret = super.removeAllListeners(ev as string | symbol | undefined)\n    if (ev === 'data' || ev === undefined) {\n      this[DATALISTENERS] = 0\n      if (!this[DISCARDED] && !this[PIPES].length) {\n        this[FLOWING] = false\n      }\n    }\n    return ret\n  }\n\n  /**\n   * true if the 'end' event has been emitted\n   */\n  get emittedEnd() {\n    return this[EMITTED_END]\n  }\n\n  [MAYBE_EMIT_END]() {\n    if (\n      !this[EMITTING_END] &&\n      !this[EMITTED_END] &&\n      !this[DESTROYED] &&\n      this[BUFFER].length === 0 &&\n      this[EOF]\n    ) {\n      this[EMITTING_END] = true\n      this.emit('end')\n      this.emit('prefinish')\n      this.emit('finish')\n      if (this[CLOSED]) this.emit('close')\n      this[EMITTING_END] = false\n    }\n  }\n\n  /**\n   * Mostly identical to `EventEmitter.emit`, with the following\n   * behavior differences to prevent data loss and unnecessary hangs:\n   *\n   * If the stream has been destroyed, and the event is something other\n   * than 'close' or 'error', then `false` is returned and no handlers\n   * are called.\n   *\n   * If the event is 'end', and has already been emitted, then the event\n   * is ignored. If the stream is in a paused or non-flowing state, then\n   * the event will be deferred until data flow resumes. If the stream is\n   * async, then handlers will be called on the next tick rather than\n   * immediately.\n   *\n   * If the event is 'close', and 'end' has not yet been emitted, then\n   * the event will be deferred until after 'end' is emitted.\n   *\n   * If the event is 'error', and an AbortSignal was provided for the stream,\n   * and there are no listeners, then the event is ignored, matching the\n   * behavior of node core streams in the presense of an AbortSignal.\n   *\n   * If the event is 'finish' or 'prefinish', then all listeners will be\n   * removed after emitting the event, to prevent double-firing.\n   */\n  emit(\n    ev: Event,\n    ...args: Events[Event]\n  ): boolean {\n    const data = args[0]\n    // error and close are only events allowed after calling destroy()\n    if (\n      ev !== 'error' &&\n      ev !== 'close' &&\n      ev !== DESTROYED &&\n      this[DESTROYED]\n    ) {\n      return false\n    } else if (ev === 'data') {\n      return !this[OBJECTMODE] && !data\n        ? false\n        : this[ASYNC]\n        ? (defer(() => this[EMITDATA](data as RType)), true)\n        : this[EMITDATA](data as RType)\n    } else if (ev === 'end') {\n      return this[EMITEND]()\n    } else if (ev === 'close') {\n      this[CLOSED] = true\n      // don't emit close before 'end' and 'finish'\n      if (!this[EMITTED_END] && !this[DESTROYED]) return false\n      const ret = super.emit('close')\n      this.removeAllListeners('close')\n      return ret\n    } else if (ev === 'error') {\n      this[EMITTED_ERROR] = data\n      super.emit(ERROR, data)\n      const ret =\n        !this[SIGNAL] || this.listeners('error').length\n          ? super.emit('error', data)\n          : false\n      this[MAYBE_EMIT_END]()\n      return ret\n    } else if (ev === 'resume') {\n      const ret = super.emit('resume')\n      this[MAYBE_EMIT_END]()\n      return ret\n    } else if (ev === 'finish' || ev === 'prefinish') {\n      const ret = super.emit(ev)\n      this.removeAllListeners(ev)\n      return ret\n    }\n\n    // Some other unknown event\n    const ret = super.emit(ev as string, ...args)\n    this[MAYBE_EMIT_END]()\n    return ret\n  }\n\n  [EMITDATA](data: RType) {\n    for (const p of this[PIPES]) {\n      if (p.dest.write(data as RType) === false) this.pause()\n    }\n    const ret = this[DISCARDED] ? false : super.emit('data', data)\n    this[MAYBE_EMIT_END]()\n    return ret\n  }\n\n  [EMITEND]() {\n    if (this[EMITTED_END]) return false\n\n    this[EMITTED_END] = true\n    this.readable = false\n    return this[ASYNC]\n      ? (defer(() => this[EMITEND2]()), true)\n      : this[EMITEND2]()\n  }\n\n  [EMITEND2]() {\n    if (this[DECODER]) {\n      const data = this[DECODER].end()\n      if (data) {\n        for (const p of this[PIPES]) {\n          p.dest.write(data as RType)\n        }\n        if (!this[DISCARDED]) super.emit('data', data)\n      }\n    }\n\n    for (const p of this[PIPES]) {\n      p.end()\n    }\n    const ret = super.emit('end')\n    this.removeAllListeners('end')\n    return ret\n  }\n\n  /**\n   * Return a Promise that resolves to an array of all emitted data once\n   * the stream ends.\n   */\n  async collect(): Promise {\n    const buf: RType[] & { dataLength: number } = Object.assign([], {\n      dataLength: 0,\n    })\n    if (!this[OBJECTMODE]) buf.dataLength = 0\n    // set the promise first, in case an error is raised\n    // by triggering the flow here.\n    const p = this.promise()\n    this.on('data', c => {\n      buf.push(c)\n      if (!this[OBJECTMODE])\n        buf.dataLength += (c as Minipass.BufferOrString).length\n    })\n    await p\n    return buf\n  }\n\n  /**\n   * Return a Promise that resolves to the concatenation of all emitted data\n   * once the stream ends.\n   *\n   * Not allowed on objectMode streams.\n   */\n  async concat(): Promise {\n    if (this[OBJECTMODE]) {\n      throw new Error('cannot concat in objectMode')\n    }\n    const buf = await this.collect()\n    return (\n      this[ENCODING]\n        ? buf.join('')\n        : Buffer.concat(buf as Buffer[], buf.dataLength)\n    ) as RType\n  }\n\n  /**\n   * Return a void Promise that resolves once the stream ends.\n   */\n  async promise(): Promise {\n    return new Promise((resolve, reject) => {\n      this.on(DESTROYED, () => reject(new Error('stream destroyed')))\n      this.on('error', er => reject(er))\n      this.on('end', () => resolve())\n    })\n  }\n\n  /**\n   * Asynchronous `for await of` iteration.\n   *\n   * This will continue emitting all chunks until the stream terminates.\n   */\n  [Symbol.asyncIterator](): AsyncGenerator {\n    // set this up front, in case the consumer doesn't call next()\n    // right away.\n    this[DISCARDED] = false\n    let stopped = false\n    const stop = async (): Promise> => {\n      this.pause()\n      stopped = true\n      return { value: undefined, done: true }\n    }\n    const next = (): Promise> => {\n      if (stopped) return stop()\n      const res = this.read()\n      if (res !== null) return Promise.resolve({ done: false, value: res })\n\n      if (this[EOF]) return stop()\n\n      let resolve!: (res: IteratorResult) => void\n      let reject!: (er: unknown) => void\n      const onerr = (er: unknown) => {\n        this.off('data', ondata)\n        this.off('end', onend)\n        this.off(DESTROYED, ondestroy)\n        stop()\n        reject(er)\n      }\n      const ondata = (value: RType) => {\n        this.off('error', onerr)\n        this.off('end', onend)\n        this.off(DESTROYED, ondestroy)\n        this.pause()\n        resolve({ value, done: !!this[EOF] })\n      }\n      const onend = () => {\n        this.off('error', onerr)\n        this.off('data', ondata)\n        this.off(DESTROYED, ondestroy)\n        stop()\n        resolve({ done: true, value: undefined })\n      }\n      const ondestroy = () => onerr(new Error('stream destroyed'))\n      return new Promise>((res, rej) => {\n        reject = rej\n        resolve = res\n        this.once(DESTROYED, ondestroy)\n        this.once('error', onerr)\n        this.once('end', onend)\n        this.once('data', ondata)\n      })\n    }\n\n    return {\n      next,\n      throw: stop,\n      return: stop,\n      [Symbol.asyncIterator]() {\n        return this\n      },\n      [Symbol.asyncDispose]: async () => {},\n    }\n  }\n\n  /**\n   * Synchronous `for of` iteration.\n   *\n   * The iteration will terminate when the internal buffer runs out, even\n   * if the stream has not yet terminated.\n   */\n  [Symbol.iterator](): Generator {\n    // set this up front, in case the consumer doesn't call next()\n    // right away.\n    this[DISCARDED] = false\n    let stopped = false\n    const stop = (): IteratorReturnResult => {\n      this.pause()\n      this.off(ERROR, stop)\n      this.off(DESTROYED, stop)\n      this.off('end', stop)\n      stopped = true\n      return { done: true, value: undefined }\n    }\n\n    const next = (): IteratorResult => {\n      if (stopped) return stop()\n      const value = this.read()\n      return value === null ? stop() : { done: false, value }\n    }\n\n    this.once('end', stop)\n    this.once(ERROR, stop)\n    this.once(DESTROYED, stop)\n\n    return {\n      next,\n      throw: stop,\n      return: stop,\n      [Symbol.iterator]() {\n        return this\n      },\n      [Symbol.dispose]: () => {},\n    }\n  }\n\n  /**\n   * Destroy a stream, preventing it from being used for any further purpose.\n   *\n   * If the stream has a `close()` method, then it will be called on\n   * destruction.\n   *\n   * After destruction, any attempt to write data, read data, or emit most\n   * events will be ignored.\n   *\n   * If an error argument is provided, then it will be emitted in an\n   * 'error' event.\n   */\n  destroy(er?: unknown) {\n    if (this[DESTROYED]) {\n      if (er) this.emit('error', er)\n      else this.emit(DESTROYED)\n      return this\n    }\n\n    this[DESTROYED] = true\n    this[DISCARDED] = true\n\n    // throw away all buffered data, it's never coming out\n    this[BUFFER].length = 0\n    this[BUFFERLENGTH] = 0\n\n    const wc = this as Minipass & {\n      close?: () => void\n    }\n    if (typeof wc.close === 'function' && !this[CLOSED]) wc.close()\n\n    if (er) this.emit('error', er)\n    // if no error to emit, still reject pending promises\n    else this.emit(DESTROYED)\n\n    return this\n  }\n\n  /**\n   * Alias for {@link isStream}\n   *\n   * Former export location, maintained for backwards compatibility.\n   *\n   * @deprecated\n   */\n  static get isStream() {\n    return isStream\n  }\n}\n", "// this is just a very light wrapper around 2 arrays with an offset index\n\nimport { GLOBSTAR } from 'minimatch'\nexport type MMPattern = string | RegExp | typeof GLOBSTAR\n\n// an array of length >= 1\nexport type PatternList = [p: MMPattern, ...rest: MMPattern[]]\nexport type UNCPatternList = [\n  p0: '',\n  p1: '',\n  p2: string,\n  p3: string,\n  ...rest: MMPattern[],\n]\nexport type DrivePatternList = [p0: string, ...rest: MMPattern[]]\nexport type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]\nexport type GlobList = [p: string, ...rest: string[]]\n\nconst isPatternList = (pl: MMPattern[]): pl is PatternList =>\n  pl.length >= 1\nconst isGlobList = (gl: string[]): gl is GlobList => gl.length >= 1\n\nconst customInspect = Symbol.for('nodejs.util.inspect.custom')\n\n/**\n * An immutable-ish view on an array of glob parts and their parsed\n * results\n */\nexport class Pattern {\n  readonly #patternList: PatternList\n  readonly #globList: GlobList\n  readonly #index: number\n  readonly length: number\n  readonly #platform: NodeJS.Platform\n  #rest?: Pattern | null\n  #globString?: string\n  #isDrive?: boolean\n  #isUNC?: boolean\n  #isAbsolute?: boolean\n  #followGlobstar: boolean = true\n\n  constructor(\n    patternList: MMPattern[],\n    globList: string[],\n    index: number,\n    platform: NodeJS.Platform,\n  ) {\n    if (!isPatternList(patternList)) {\n      throw new TypeError('empty pattern list')\n    }\n    if (!isGlobList(globList)) {\n      throw new TypeError('empty glob list')\n    }\n    if (globList.length !== patternList.length) {\n      throw new TypeError('mismatched pattern list and glob list lengths')\n    }\n    this.length = patternList.length\n    if (index < 0 || index >= this.length) {\n      throw new TypeError('index out of range')\n    }\n    this.#patternList = patternList\n    this.#globList = globList\n    this.#index = index\n    this.#platform = platform\n\n    // normalize root entries of absolute patterns on initial creation.\n    if (this.#index === 0) {\n      // c: => ['c:/']\n      // C:/ => ['C:/']\n      // C:/x => ['C:/', 'x']\n      // //host/share => ['//host/share/']\n      // //host/share/ => ['//host/share/']\n      // //host/share/x => ['//host/share/', 'x']\n      // /etc => ['/', 'etc']\n      // / => ['/']\n      if (this.isUNC()) {\n        // '' / '' / 'host' / 'share'\n        const [p0, p1, p2, p3, ...prest] = this.#patternList\n        const [g0, g1, g2, g3, ...grest] = this.#globList\n        if (prest[0] === '') {\n          // ends in /\n          prest.shift()\n          grest.shift()\n        }\n        const p = [p0, p1, p2, p3, ''].join('/')\n        const g = [g0, g1, g2, g3, ''].join('/')\n        this.#patternList = [p, ...prest]\n        this.#globList = [g, ...grest]\n        this.length = this.#patternList.length\n      } else if (this.isDrive() || this.isAbsolute()) {\n        const [p1, ...prest] = this.#patternList\n        const [g1, ...grest] = this.#globList\n        if (prest[0] === '') {\n          // ends in /\n          prest.shift()\n          grest.shift()\n        }\n        const p = (p1 as string) + '/'\n        const g = g1 + '/'\n        this.#patternList = [p, ...prest]\n        this.#globList = [g, ...grest]\n        this.length = this.#patternList.length\n      }\n    }\n  }\n\n  [customInspect]() {\n    return 'Pattern <' + this.#globList.slice(this.#index).join('/') + '>'\n  }\n\n  /**\n   * The first entry in the parsed list of patterns\n   */\n  pattern(): MMPattern {\n    return this.#patternList[this.#index] as MMPattern\n  }\n\n  /**\n   * true of if pattern() returns a string\n   */\n  isString(): boolean {\n    return typeof this.#patternList[this.#index] === 'string'\n  }\n  /**\n   * true of if pattern() returns GLOBSTAR\n   */\n  isGlobstar(): boolean {\n    return this.#patternList[this.#index] === GLOBSTAR\n  }\n  /**\n   * true if pattern() returns a regexp\n   */\n  isRegExp(): boolean {\n    return this.#patternList[this.#index] instanceof RegExp\n  }\n\n  /**\n   * The /-joined set of glob parts that make up this pattern\n   */\n  globString(): string {\n    return (this.#globString =\n      this.#globString ||\n      (this.#index === 0 ?\n        this.isAbsolute() ?\n          this.#globList[0] + this.#globList.slice(1).join('/')\n        : this.#globList.join('/')\n      : this.#globList.slice(this.#index).join('/')))\n  }\n\n  /**\n   * true if there are more pattern parts after this one\n   */\n  hasMore(): boolean {\n    return this.length > this.#index + 1\n  }\n\n  /**\n   * The rest of the pattern after this part, or null if this is the end\n   */\n  rest(): Pattern | null {\n    if (this.#rest !== undefined) return this.#rest\n    if (!this.hasMore()) return (this.#rest = null)\n    this.#rest = new Pattern(\n      this.#patternList,\n      this.#globList,\n      this.#index + 1,\n      this.#platform,\n    )\n    this.#rest.#isAbsolute = this.#isAbsolute\n    this.#rest.#isUNC = this.#isUNC\n    this.#rest.#isDrive = this.#isDrive\n    return this.#rest\n  }\n\n  /**\n   * true if the pattern represents a //unc/path/ on windows\n   */\n  isUNC(): boolean {\n    const pl = this.#patternList\n    return this.#isUNC !== undefined ?\n        this.#isUNC\n      : (this.#isUNC =\n          this.#platform === 'win32' &&\n          this.#index === 0 &&\n          pl[0] === '' &&\n          pl[1] === '' &&\n          typeof pl[2] === 'string' &&\n          !!pl[2] &&\n          typeof pl[3] === 'string' &&\n          !!pl[3])\n  }\n\n  // pattern like C:/...\n  // split = ['C:', ...]\n  // XXX: would be nice to handle patterns like `c:*` to test the cwd\n  // in c: for *, but I don't know of a way to even figure out what that\n  // cwd is without actually chdir'ing into it?\n  /**\n   * True if the pattern starts with a drive letter on Windows\n   */\n  isDrive(): boolean {\n    const pl = this.#patternList\n    return this.#isDrive !== undefined ?\n        this.#isDrive\n      : (this.#isDrive =\n          this.#platform === 'win32' &&\n          this.#index === 0 &&\n          this.length > 1 &&\n          typeof pl[0] === 'string' &&\n          /^[a-z]:$/i.test(pl[0]))\n  }\n\n  // pattern = '/' or '/...' or '/x/...'\n  // split = ['', ''] or ['', ...] or ['', 'x', ...]\n  // Drive and UNC both considered absolute on windows\n  /**\n   * True if the pattern is rooted on an absolute path\n   */\n  isAbsolute(): boolean {\n    const pl = this.#patternList\n    return this.#isAbsolute !== undefined ?\n        this.#isAbsolute\n      : (this.#isAbsolute =\n          (pl[0] === '' && pl.length > 1) ||\n          this.isDrive() ||\n          this.isUNC())\n  }\n\n  /**\n   * consume the root of the pattern, and return it\n   */\n  root(): string {\n    const p = this.#patternList[0]\n    return (\n        typeof p === 'string' && this.isAbsolute() && this.#index === 0\n      ) ?\n        p\n      : ''\n  }\n\n  /**\n   * Check to see if the current globstar pattern is allowed to follow\n   * a symbolic link.\n   */\n  checkFollowGlobstar(): boolean {\n    return !(\n      this.#index === 0 ||\n      !this.isGlobstar() ||\n      !this.#followGlobstar\n    )\n  }\n\n  /**\n   * Mark that the current globstar pattern is following a symbolic link\n   */\n  markFollowGlobstar(): boolean {\n    if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)\n      return false\n    this.#followGlobstar = false\n    return true\n  }\n}\n", "// give it a pattern, and it'll be able to tell you if\n// a given path should be ignored.\n// Ignoring a path ignores its children if the pattern ends in /**\n// Ignores are always parsed in dot:true mode\n\nimport { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\nexport interface IgnoreLike {\n  ignored?: (p: Path) => boolean\n  childrenIgnored?: (p: Path) => boolean\n  add?: (ignore: string) => void\n}\n\nconst defaultPlatform: NodeJS.Platform =\n  (\n    typeof process === 'object' &&\n    process &&\n    typeof process.platform === 'string'\n  ) ?\n    process.platform\n  : 'linux'\n\n/**\n * Class used to process ignored patterns\n */\nexport class Ignore implements IgnoreLike {\n  relative: Minimatch[]\n  relativeChildren: Minimatch[]\n  absolute: Minimatch[]\n  absoluteChildren: Minimatch[]\n  platform: NodeJS.Platform\n  mmopts: MinimatchOptions\n\n  constructor(\n    ignored: string[],\n    {\n      nobrace,\n      nocase,\n      noext,\n      noglobstar,\n      platform = defaultPlatform,\n    }: GlobWalkerOpts,\n  ) {\n    this.relative = []\n    this.absolute = []\n    this.relativeChildren = []\n    this.absoluteChildren = []\n    this.platform = platform\n    this.mmopts = {\n      dot: true,\n      nobrace,\n      nocase,\n      noext,\n      noglobstar,\n      optimizationLevel: 2,\n      platform,\n      nocomment: true,\n      nonegate: true,\n    }\n    for (const ign of ignored) this.add(ign)\n  }\n\n  add(ign: string) {\n    // this is a little weird, but it gives us a clean set of optimized\n    // minimatch matchers, without getting tripped up if one of them\n    // ends in /** inside a brace section, and it's only inefficient at\n    // the start of the walk, not along it.\n    // It'd be nice if the Pattern class just had a .test() method, but\n    // handling globstars is a bit of a pita, and that code already lives\n    // in minimatch anyway.\n    // Another way would be if maybe Minimatch could take its set/globParts\n    // as an option, and then we could at least just use Pattern to test\n    // for absolute-ness.\n    // Yet another way, Minimatch could take an array of glob strings, and\n    // a cwd option, and do the right thing.\n    const mm = new Minimatch(ign, this.mmopts)\n    for (let i = 0; i < mm.set.length; i++) {\n      const parsed = mm.set[i]\n      const globParts = mm.globParts[i]\n      /* c8 ignore start */\n      if (!parsed || !globParts) {\n        throw new Error('invalid pattern object')\n      }\n      // strip off leading ./ portions\n      // https://github.com/isaacs/node-glob/issues/570\n      while (parsed[0] === '.' && globParts[0] === '.') {\n        parsed.shift()\n        globParts.shift()\n      }\n      /* c8 ignore stop */\n      const p = new Pattern(parsed, globParts, 0, this.platform)\n      const m = new Minimatch(p.globString(), this.mmopts)\n      const children = globParts[globParts.length - 1] === '**'\n      const absolute = p.isAbsolute()\n      if (absolute) this.absolute.push(m)\n      else this.relative.push(m)\n      if (children) {\n        if (absolute) this.absoluteChildren.push(m)\n        else this.relativeChildren.push(m)\n      }\n    }\n  }\n\n  ignored(p: Path): boolean {\n    const fullpath = p.fullpath()\n    const fullpaths = `${fullpath}/`\n    const relative = p.relative() || '.'\n    const relatives = `${relative}/`\n    for (const m of this.relative) {\n      if (m.match(relative) || m.match(relatives)) return true\n    }\n    for (const m of this.absolute) {\n      if (m.match(fullpath) || m.match(fullpaths)) return true\n    }\n    return false\n  }\n\n  childrenIgnored(p: Path): boolean {\n    const fullpath = p.fullpath() + '/'\n    const relative = (p.relative() || '.') + '/'\n    for (const m of this.relativeChildren) {\n      if (m.match(relative)) return true\n    }\n    for (const m of this.absoluteChildren) {\n      if (m.match(fullpath)) return true\n    }\n    return false\n  }\n}\n", "// synchronous utility for filtering entries and calculating subwalks\n\nimport { GLOBSTAR, MMRegExp } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { MMPattern, Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\n/**\n * A cache of which patterns have been processed for a given Path\n */\nexport class HasWalkedCache {\n  store: Map>\n  constructor(store: Map> = new Map()) {\n    this.store = store\n  }\n  copy() {\n    return new HasWalkedCache(new Map(this.store))\n  }\n  hasWalked(target: Path, pattern: Pattern) {\n    return this.store.get(target.fullpath())?.has(pattern.globString())\n  }\n  storeWalked(target: Path, pattern: Pattern) {\n    const fullpath = target.fullpath()\n    const cached = this.store.get(fullpath)\n    if (cached) cached.add(pattern.globString())\n    else this.store.set(fullpath, new Set([pattern.globString()]))\n  }\n}\n\n/**\n * A record of which paths have been matched in a given walk step,\n * and whether they only are considered a match if they are a directory,\n * and whether their absolute or relative path should be returned.\n */\nexport class MatchRecord {\n  store: Map = new Map()\n  add(target: Path, absolute: boolean, ifDir: boolean) {\n    const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0)\n    const current = this.store.get(target)\n    this.store.set(target, current === undefined ? n : n & current)\n  }\n  // match, absolute, ifdir\n  entries(): [Path, boolean, boolean][] {\n    return [...this.store.entries()].map(([path, n]) => [\n      path,\n      !!(n & 2),\n      !!(n & 1),\n    ])\n  }\n}\n\n/**\n * A collection of patterns that must be processed in a subsequent step\n * for a given path.\n */\nexport class SubWalks {\n  store: Map = new Map()\n  add(target: Path, pattern: Pattern) {\n    if (!target.canReaddir()) {\n      return\n    }\n    const subs = this.store.get(target)\n    if (subs) {\n      if (!subs.find(p => p.globString() === pattern.globString())) {\n        subs.push(pattern)\n      }\n    } else this.store.set(target, [pattern])\n  }\n  get(target: Path): Pattern[] {\n    const subs = this.store.get(target)\n    /* c8 ignore start */\n    if (!subs) {\n      throw new Error('attempting to walk unknown path')\n    }\n    /* c8 ignore stop */\n    return subs\n  }\n  entries(): [Path, Pattern[]][] {\n    return this.keys().map(k => [k, this.store.get(k) as Pattern[]])\n  }\n  keys(): Path[] {\n    return [...this.store.keys()].filter(t => t.canReaddir())\n  }\n}\n\n/**\n * The class that processes patterns for a given path.\n *\n * Handles child entry filtering, and determining whether a path's\n * directory contents must be read.\n */\nexport class Processor {\n  hasWalkedCache: HasWalkedCache\n  matches = new MatchRecord()\n  subwalks = new SubWalks()\n  patterns?: Pattern[]\n  follow: boolean\n  dot: boolean\n  opts: GlobWalkerOpts\n\n  constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache) {\n    this.opts = opts\n    this.follow = !!opts.follow\n    this.dot = !!opts.dot\n    this.hasWalkedCache =\n      hasWalkedCache ? hasWalkedCache.copy() : new HasWalkedCache()\n  }\n\n  processPatterns(target: Path, patterns: Pattern[]) {\n    this.patterns = patterns\n    const processingSet: [Path, Pattern][] = patterns.map(p => [target, p])\n\n    // map of paths to the magic-starting subwalks they need to walk\n    // first item in patterns is the filter\n\n    for (let [t, pattern] of processingSet) {\n      this.hasWalkedCache.storeWalked(t, pattern)\n\n      const root = pattern.root()\n      const absolute = pattern.isAbsolute() && this.opts.absolute !== false\n\n      // start absolute patterns at root\n      if (root) {\n        t = t.resolve(\n          root === '/' && this.opts.root !== undefined ?\n            this.opts.root\n          : root,\n        )\n        const rest = pattern.rest()\n        if (!rest) {\n          this.matches.add(t, true, false)\n          continue\n        } else {\n          pattern = rest\n        }\n      }\n\n      if (t.isENOENT()) continue\n\n      let p: MMPattern\n      let rest: Pattern | null\n      let changed = false\n      while (\n        typeof (p = pattern.pattern()) === 'string' &&\n        (rest = pattern.rest())\n      ) {\n        const c = t.resolve(p)\n        t = c\n        pattern = rest\n        changed = true\n      }\n      p = pattern.pattern()\n      rest = pattern.rest()\n      if (changed) {\n        if (this.hasWalkedCache.hasWalked(t, pattern)) continue\n        this.hasWalkedCache.storeWalked(t, pattern)\n      }\n\n      // now we have either a final string for a known entry,\n      // more strings for an unknown entry,\n      // or a pattern starting with magic, mounted on t.\n      if (typeof p === 'string') {\n        // must not be final entry, otherwise we would have\n        // concatenated it earlier.\n        const ifDir = p === '..' || p === '' || p === '.'\n        this.matches.add(t.resolve(p), absolute, ifDir)\n        continue\n      } else if (p === GLOBSTAR) {\n        // if no rest, match and subwalk pattern\n        // if rest, process rest and subwalk pattern\n        // if it's a symlink, but we didn't get here by way of a\n        // globstar match (meaning it's the first time THIS globstar\n        // has traversed a symlink), then we follow it. Otherwise, stop.\n        if (\n          !t.isSymbolicLink() ||\n          this.follow ||\n          pattern.checkFollowGlobstar()\n        ) {\n          this.subwalks.add(t, pattern)\n        }\n        const rp = rest?.pattern()\n        const rrest = rest?.rest()\n        if (!rest || ((rp === '' || rp === '.') && !rrest)) {\n          // only HAS to be a dir if it ends in **/ or **/.\n          // but ending in ** will match files as well.\n          this.matches.add(t, absolute, rp === '' || rp === '.')\n        } else {\n          if (rp === '..') {\n            // this would mean you're matching **/.. at the fs root,\n            // and no thanks, I'm not gonna test that specific case.\n            /* c8 ignore start */\n            const tp = t.parent || t\n            /* c8 ignore stop */\n            if (!rrest) this.matches.add(tp, absolute, true)\n            else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {\n              this.subwalks.add(tp, rrest)\n            }\n          }\n        }\n      } else if (p instanceof RegExp) {\n        this.subwalks.add(t, pattern)\n      }\n    }\n\n    return this\n  }\n\n  subwalkTargets(): Path[] {\n    return this.subwalks.keys()\n  }\n\n  child() {\n    return new Processor(this.opts, this.hasWalkedCache)\n  }\n\n  // return a new Processor containing the subwalks for each\n  // child entry, and a set of matches, and\n  // a hasWalkedCache that's a copy of this one\n  // then we're going to call\n  filterEntries(parent: Path, entries: Path[]): Processor {\n    const patterns = this.subwalks.get(parent)\n    // put matches and entry walks into the results processor\n    const results = this.child()\n    for (const e of entries) {\n      for (const pattern of patterns) {\n        const absolute = pattern.isAbsolute()\n        const p = pattern.pattern()\n        const rest = pattern.rest()\n        if (p === GLOBSTAR) {\n          results.testGlobstar(e, pattern, rest, absolute)\n        } else if (p instanceof RegExp) {\n          results.testRegExp(e, p, rest, absolute)\n        } else {\n          results.testString(e, p, rest, absolute)\n        }\n      }\n    }\n    return results\n  }\n\n  testGlobstar(\n    e: Path,\n    pattern: Pattern,\n    rest: Pattern | null,\n    absolute: boolean,\n  ) {\n    if (this.dot || !e.name.startsWith('.')) {\n      if (!pattern.hasMore()) {\n        this.matches.add(e, absolute, false)\n      }\n      if (e.canReaddir()) {\n        // if we're in follow mode or it's not a symlink, just keep\n        // testing the same pattern. If there's more after the globstar,\n        // then this symlink consumes the globstar. If not, then we can\n        // follow at most ONE symlink along the way, so we mark it, which\n        // also checks to ensure that it wasn't already marked.\n        if (this.follow || !e.isSymbolicLink()) {\n          this.subwalks.add(e, pattern)\n        } else if (e.isSymbolicLink()) {\n          if (rest && pattern.checkFollowGlobstar()) {\n            this.subwalks.add(e, rest)\n          } else if (pattern.markFollowGlobstar()) {\n            this.subwalks.add(e, pattern)\n          }\n        }\n      }\n    }\n    // if the NEXT thing matches this entry, then also add\n    // the rest.\n    if (rest) {\n      const rp = rest.pattern()\n      if (\n        typeof rp === 'string' &&\n        // dots and empty were handled already\n        rp !== '..' &&\n        rp !== '' &&\n        rp !== '.'\n      ) {\n        this.testString(e, rp, rest.rest(), absolute)\n      } else if (rp === '..') {\n        /* c8 ignore start */\n        const ep = e.parent || e\n        /* c8 ignore stop */\n        this.subwalks.add(ep, rest)\n      } else if (rp instanceof RegExp) {\n        this.testRegExp(e, rp, rest.rest(), absolute)\n      }\n    }\n  }\n\n  testRegExp(\n    e: Path,\n    p: MMRegExp,\n    rest: Pattern | null,\n    absolute: boolean,\n  ) {\n    if (!p.test(e.name)) return\n    if (!rest) {\n      this.matches.add(e, absolute, false)\n    } else {\n      this.subwalks.add(e, rest)\n    }\n  }\n\n  testString(e: Path, p: string, rest: Pattern | null, absolute: boolean) {\n    // should never happen?\n    if (!e.isNamed(p)) return\n    if (!rest) {\n      this.matches.add(e, absolute, false)\n    } else {\n      this.subwalks.add(e, rest)\n    }\n  }\n}\n", "/**\n * Single-use utility classes to provide functionality to the {@link Glob}\n * methods.\n *\n * @module\n */\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport { Ignore, IgnoreLike } from './ignore.js'\n\n// XXX can we somehow make it so that it NEVER processes a given path more than\n// once, enough that the match set tracking is no longer needed?  that'd speed\n// things up a lot.  Or maybe bring back nounique, and skip it in that case?\n\n// a single minimatch set entry with 1 or more parts\nimport { Pattern } from './pattern.js'\nimport { Processor } from './processor.js'\n\nexport interface GlobWalkerOpts {\n  absolute?: boolean\n  allowWindowsEscape?: boolean\n  cwd?: string | URL\n  dot?: boolean\n  dotRelative?: boolean\n  follow?: boolean\n  ignore?: string | string[] | IgnoreLike\n  mark?: boolean\n  matchBase?: boolean\n  // Note: maxDepth here means \"maximum actual Path.depth()\",\n  // not \"maximum depth beyond cwd\"\n  maxDepth?: number\n  nobrace?: boolean\n  nocase?: boolean\n  nodir?: boolean\n  noext?: boolean\n  noglobstar?: boolean\n  platform?: NodeJS.Platform\n  posix?: boolean\n  realpath?: boolean\n  root?: string\n  stat?: boolean\n  signal?: AbortSignal\n  windowsPathsNoEscape?: boolean\n  withFileTypes?: boolean\n  includeChildMatches?: boolean\n}\n\nexport type GWOFileTypesTrue = GlobWalkerOpts & {\n  withFileTypes: true\n}\nexport type GWOFileTypesFalse = GlobWalkerOpts & {\n  withFileTypes: false\n}\nexport type GWOFileTypesUnset = GlobWalkerOpts & {\n  withFileTypes?: undefined\n}\n\nexport type Result =\n  O extends GWOFileTypesTrue ? Path\n  : O extends GWOFileTypesFalse ? string\n  : O extends GWOFileTypesUnset ? string\n  : Path | string\n\nexport type Matches =\n  O extends GWOFileTypesTrue ? Set\n  : O extends GWOFileTypesFalse ? Set\n  : O extends GWOFileTypesUnset ? Set\n  : Set\n\nexport type MatchStream = Minipass<\n  Result,\n  Result\n>\n\nconst makeIgnore = (\n  ignore: string | string[] | IgnoreLike,\n  opts: GlobWalkerOpts,\n): IgnoreLike =>\n  typeof ignore === 'string' ? new Ignore([ignore], opts)\n  : Array.isArray(ignore) ? new Ignore(ignore, opts)\n  : ignore\n\n/**\n * basic walking utilities that all the glob walker types use\n */\nexport abstract class GlobUtil {\n  path: Path\n  patterns: Pattern[]\n  opts: O\n  seen: Set = new Set()\n  paused: boolean = false\n  aborted: boolean = false\n  #onResume: (() => any)[] = []\n  #ignore?: IgnoreLike\n  #sep: '\\\\' | '/'\n  signal?: AbortSignal\n  maxDepth: number\n  includeChildMatches: boolean\n\n  constructor(patterns: Pattern[], path: Path, opts: O)\n  constructor(patterns: Pattern[], path: Path, opts: O) {\n    this.patterns = patterns\n    this.path = path\n    this.opts = opts\n    this.#sep = !opts.posix && opts.platform === 'win32' ? '\\\\' : '/'\n    this.includeChildMatches = opts.includeChildMatches !== false\n    if (opts.ignore || !this.includeChildMatches) {\n      this.#ignore = makeIgnore(opts.ignore ?? [], opts)\n      if (\n        !this.includeChildMatches &&\n        typeof this.#ignore.add !== 'function'\n      ) {\n        const m = 'cannot ignore child matches, ignore lacks add() method.'\n        throw new Error(m)\n      }\n    }\n    // ignore, always set with maxDepth, but it's optional on the\n    // GlobOptions type\n    /* c8 ignore start */\n    this.maxDepth = opts.maxDepth || Infinity\n    /* c8 ignore stop */\n    if (opts.signal) {\n      this.signal = opts.signal\n      this.signal.addEventListener('abort', () => {\n        this.#onResume.length = 0\n      })\n    }\n  }\n\n  #ignored(path: Path): boolean {\n    return this.seen.has(path) || !!this.#ignore?.ignored?.(path)\n  }\n  #childrenIgnored(path: Path): boolean {\n    return !!this.#ignore?.childrenIgnored?.(path)\n  }\n\n  // backpressure mechanism\n  pause() {\n    this.paused = true\n  }\n  resume() {\n    /* c8 ignore start */\n    if (this.signal?.aborted) return\n    /* c8 ignore stop */\n    this.paused = false\n    let fn: (() => any) | undefined = undefined\n    while (!this.paused && (fn = this.#onResume.shift())) {\n      fn()\n    }\n  }\n  onResume(fn: () => any) {\n    if (this.signal?.aborted) return\n    /* c8 ignore start */\n    if (!this.paused) {\n      fn()\n    } else {\n      /* c8 ignore stop */\n      this.#onResume.push(fn)\n    }\n  }\n\n  // do the requisite realpath/stat checking, and return the path\n  // to add or undefined to filter it out.\n  async matchCheck(e: Path, ifDir: boolean): Promise {\n    if (ifDir && this.opts.nodir) return undefined\n    let rpc: Path | undefined\n    if (this.opts.realpath) {\n      rpc = e.realpathCached() || (await e.realpath())\n      if (!rpc) return undefined\n      e = rpc\n    }\n    const needStat = e.isUnknown() || this.opts.stat\n    const s = needStat ? await e.lstat() : e\n    if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {\n      const target = await s.realpath()\n      /* c8 ignore start */\n      if (target && (target.isUnknown() || this.opts.stat)) {\n        await target.lstat()\n      }\n      /* c8 ignore stop */\n    }\n    return this.matchCheckTest(s, ifDir)\n  }\n\n  matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined {\n    return (\n        e &&\n          (this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&\n          (!ifDir || e.canReaddir()) &&\n          (!this.opts.nodir || !e.isDirectory()) &&\n          (!this.opts.nodir ||\n            !this.opts.follow ||\n            !e.isSymbolicLink() ||\n            !e.realpathCached()?.isDirectory()) &&\n          !this.#ignored(e)\n      ) ?\n        e\n      : undefined\n  }\n\n  matchCheckSync(e: Path, ifDir: boolean): Path | undefined {\n    if (ifDir && this.opts.nodir) return undefined\n    let rpc: Path | undefined\n    if (this.opts.realpath) {\n      rpc = e.realpathCached() || e.realpathSync()\n      if (!rpc) return undefined\n      e = rpc\n    }\n    const needStat = e.isUnknown() || this.opts.stat\n    const s = needStat ? e.lstatSync() : e\n    if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {\n      const target = s.realpathSync()\n      if (target && (target?.isUnknown() || this.opts.stat)) {\n        target.lstatSync()\n      }\n    }\n    return this.matchCheckTest(s, ifDir)\n  }\n\n  abstract matchEmit(p: Result): void\n  abstract matchEmit(p: string | Path): void\n\n  matchFinish(e: Path, absolute: boolean) {\n    if (this.#ignored(e)) return\n    // we know we have an ignore if this is false, but TS doesn't\n    if (!this.includeChildMatches && this.#ignore?.add) {\n      const ign = `${e.relativePosix()}/**`\n      this.#ignore.add(ign)\n    }\n    const abs =\n      this.opts.absolute === undefined ? absolute : this.opts.absolute\n    this.seen.add(e)\n    const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''\n    // ok, we have what we need!\n    if (this.opts.withFileTypes) {\n      this.matchEmit(e)\n    } else if (abs) {\n      const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath()\n      this.matchEmit(abs + mark)\n    } else {\n      const rel = this.opts.posix ? e.relativePosix() : e.relative()\n      const pre =\n        this.opts.dotRelative && !rel.startsWith('..' + this.#sep) ?\n          '.' + this.#sep\n        : ''\n      this.matchEmit(!rel ? '.' + mark : pre + rel + mark)\n    }\n  }\n\n  async match(e: Path, absolute: boolean, ifDir: boolean): Promise {\n    const p = await this.matchCheck(e, ifDir)\n    if (p) this.matchFinish(p, absolute)\n  }\n\n  matchSync(e: Path, absolute: boolean, ifDir: boolean): void {\n    const p = this.matchCheckSync(e, ifDir)\n    if (p) this.matchFinish(p, absolute)\n  }\n\n  walkCB(target: Path, patterns: Pattern[], cb: () => any) {\n    /* c8 ignore start */\n    if (this.signal?.aborted) cb()\n    /* c8 ignore stop */\n    this.walkCB2(target, patterns, new Processor(this.opts), cb)\n  }\n\n  walkCB2(\n    target: Path,\n    patterns: Pattern[],\n    processor: Processor,\n    cb: () => any,\n  ) {\n    if (this.#childrenIgnored(target)) return cb()\n    if (this.signal?.aborted) cb()\n    if (this.paused) {\n      this.onResume(() => this.walkCB2(target, patterns, processor, cb))\n      return\n    }\n    processor.processPatterns(target, patterns)\n\n    // done processing.  all of the above is sync, can be abstracted out.\n    // subwalks is a map of paths to the entry filters they need\n    // matches is a map of paths to [absolute, ifDir] tuples.\n    let tasks = 1\n    const next = () => {\n      if (--tasks === 0) cb()\n    }\n\n    for (const [m, absolute, ifDir] of processor.matches.entries()) {\n      if (this.#ignored(m)) continue\n      tasks++\n      this.match(m, absolute, ifDir).then(() => next())\n    }\n\n    for (const t of processor.subwalkTargets()) {\n      if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n        continue\n      }\n      tasks++\n      const childrenCached = t.readdirCached()\n      if (t.calledReaddir())\n        this.walkCB3(t, childrenCached, processor, next)\n      else {\n        t.readdirCB(\n          (_, entries) => this.walkCB3(t, entries, processor, next),\n          true,\n        )\n      }\n    }\n\n    next()\n  }\n\n  walkCB3(\n    target: Path,\n    entries: Path[],\n    processor: Processor,\n    cb: () => any,\n  ) {\n    processor = processor.filterEntries(target, entries)\n\n    let tasks = 1\n    const next = () => {\n      if (--tasks === 0) cb()\n    }\n\n    for (const [m, absolute, ifDir] of processor.matches.entries()) {\n      if (this.#ignored(m)) continue\n      tasks++\n      this.match(m, absolute, ifDir).then(() => next())\n    }\n    for (const [target, patterns] of processor.subwalks.entries()) {\n      tasks++\n      this.walkCB2(target, patterns, processor.child(), next)\n    }\n\n    next()\n  }\n\n  walkCBSync(target: Path, patterns: Pattern[], cb: () => any) {\n    /* c8 ignore start */\n    if (this.signal?.aborted) cb()\n    /* c8 ignore stop */\n    this.walkCB2Sync(target, patterns, new Processor(this.opts), cb)\n  }\n\n  walkCB2Sync(\n    target: Path,\n    patterns: Pattern[],\n    processor: Processor,\n    cb: () => any,\n  ) {\n    if (this.#childrenIgnored(target)) return cb()\n    if (this.signal?.aborted) cb()\n    if (this.paused) {\n      this.onResume(() =>\n        this.walkCB2Sync(target, patterns, processor, cb),\n      )\n      return\n    }\n    processor.processPatterns(target, patterns)\n\n    // done processing.  all of the above is sync, can be abstracted out.\n    // subwalks is a map of paths to the entry filters they need\n    // matches is a map of paths to [absolute, ifDir] tuples.\n    let tasks = 1\n    const next = () => {\n      if (--tasks === 0) cb()\n    }\n\n    for (const [m, absolute, ifDir] of processor.matches.entries()) {\n      if (this.#ignored(m)) continue\n      this.matchSync(m, absolute, ifDir)\n    }\n\n    for (const t of processor.subwalkTargets()) {\n      if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n        continue\n      }\n      tasks++\n      const children = t.readdirSync()\n      this.walkCB3Sync(t, children, processor, next)\n    }\n\n    next()\n  }\n\n  walkCB3Sync(\n    target: Path,\n    entries: Path[],\n    processor: Processor,\n    cb: () => any,\n  ) {\n    processor = processor.filterEntries(target, entries)\n\n    let tasks = 1\n    const next = () => {\n      if (--tasks === 0) cb()\n    }\n\n    for (const [m, absolute, ifDir] of processor.matches.entries()) {\n      if (this.#ignored(m)) continue\n      this.matchSync(m, absolute, ifDir)\n    }\n    for (const [target, patterns] of processor.subwalks.entries()) {\n      tasks++\n      this.walkCB2Sync(target, patterns, processor.child(), next)\n    }\n\n    next()\n  }\n}\n\nexport class GlobWalker<\n  O extends GlobWalkerOpts = GlobWalkerOpts,\n> extends GlobUtil {\n  matches = new Set>()\n\n  constructor(patterns: Pattern[], path: Path, opts: O) {\n    super(patterns, path, opts)\n  }\n\n  matchEmit(e: Result): void {\n    this.matches.add(e)\n  }\n\n  async walk(): Promise>> {\n    if (this.signal?.aborted) throw this.signal.reason\n    if (this.path.isUnknown()) {\n      await this.path.lstat()\n    }\n    await new Promise((res, rej) => {\n      this.walkCB(this.path, this.patterns, () => {\n        if (this.signal?.aborted) {\n          rej(this.signal.reason)\n        } else {\n          res(this.matches)\n        }\n      })\n    })\n    return this.matches\n  }\n\n  walkSync(): Set> {\n    if (this.signal?.aborted) throw this.signal.reason\n    if (this.path.isUnknown()) {\n      this.path.lstatSync()\n    }\n    // nothing for the callback to do, because this never pauses\n    this.walkCBSync(this.path, this.patterns, () => {\n      if (this.signal?.aborted) throw this.signal.reason\n    })\n    return this.matches\n  }\n}\n\nexport class GlobStream<\n  O extends GlobWalkerOpts = GlobWalkerOpts,\n> extends GlobUtil {\n  results: Minipass, Result>\n\n  constructor(patterns: Pattern[], path: Path, opts: O) {\n    super(patterns, path, opts)\n    this.results = new Minipass, Result>({\n      signal: this.signal,\n      objectMode: true,\n    })\n    this.results.on('drain', () => this.resume())\n    this.results.on('resume', () => this.resume())\n  }\n\n  matchEmit(e: Result): void {\n    this.results.write(e)\n    if (!this.results.flowing) this.pause()\n  }\n\n  stream(): MatchStream {\n    const target = this.path\n    if (target.isUnknown()) {\n      target.lstat().then(() => {\n        this.walkCB(target, this.patterns, () => this.results.end())\n      })\n    } else {\n      this.walkCB(target, this.patterns, () => this.results.end())\n    }\n    return this.results\n  }\n\n  streamSync(): MatchStream {\n    if (this.path.isUnknown()) {\n      this.path.lstatSync()\n    }\n    this.walkCBSync(this.path, this.patterns, () => this.results.end())\n    return this.results\n  }\n}\n", "import { Minimatch } from 'minimatch'\nimport { GlobOptions } from './glob.js'\n\n/**\n * Return true if the patterns provided contain any magic glob characters,\n * given the options provided.\n *\n * Brace expansion is not considered \"magic\" unless the `magicalBraces` option\n * is set, as brace expansion just turns one string into an array of strings.\n * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and\n * `'xby'` both do not contain any magic glob characters, and it's treated the\n * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`\n * is in the options, brace expansion _is_ treated as a pattern having magic.\n */\nexport const hasMagic = (\n  pattern: string | string[],\n  options: GlobOptions = {},\n): boolean => {\n  if (!Array.isArray(pattern)) {\n    pattern = [pattern]\n  }\n  for (const p of pattern) {\n    if (new Minimatch(p, options).hasMagic()) return true\n  }\n  return false\n}\n", "import { escape, unescape } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport type {\n  GlobOptions,\n  GlobOptionsWithFileTypesFalse,\n  GlobOptionsWithFileTypesTrue,\n  GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nimport { Glob } from './glob.js'\nimport { hasMagic } from './has-magic.js'\n\nexport { escape, unescape } from 'minimatch'\nexport type {\n  FSOption,\n  Path,\n  WalkOptions,\n  WalkOptionsWithFileTypesTrue,\n  WalkOptionsWithFileTypesUnset,\n} from 'path-scurry'\nexport { Glob } from './glob.js'\nexport type {\n  GlobOptions,\n  GlobOptionsWithFileTypesFalse,\n  GlobOptionsWithFileTypesTrue,\n  GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nexport { hasMagic } from './has-magic.js'\nexport { Ignore } from './ignore.js'\nexport type { IgnoreLike } from './ignore.js'\nexport type { MatchStream } from './walker.js'\n\n/**\n * Syncronous form of {@link globStream}. Will read all the matches as fast as\n * you consume them, even all in a single tick if you consume them immediately,\n * but will still respond to backpressure if they're not consumed immediately.\n */\nexport function globStreamSync(\n  pattern: string | string[],\n  options: GlobOptionsWithFileTypesTrue,\n): Minipass\nexport function globStreamSync(\n  pattern: string | string[],\n  options: GlobOptionsWithFileTypesFalse,\n): Minipass\nexport function globStreamSync(\n  pattern: string | string[],\n  options: GlobOptionsWithFileTypesUnset,\n): Minipass\nexport function globStreamSync(\n  pattern: string | string[],\n  options: GlobOptions,\n): Minipass | Minipass\nexport function globStreamSync(\n  pattern: string | string[],\n  options: GlobOptions = {},\n) {\n  return new Glob(pattern, options).streamSync()\n}\n\n/**\n * Return a stream that emits all the strings or `Path` objects and\n * then emits `end` when completed.\n */\nexport function globStream(\n  pattern: string | string[],\n  options: GlobOptionsWithFileTypesFalse,\n): Minipass\nexport function globStream(\n  pattern: string | string[],\n  options: GlobOptionsWithFileTypesTrue,\n): Minipass\nexport function globStream(\n  pattern: string | string[],\n  options?: GlobOptionsWithFileTypesUnset | undefined,\n): Minipass\nexport function globStream(\n  pattern: string | string[],\n  options: GlobOptions,\n): Minipass | Minipass\nexport function globStream(\n  pattern: string | string[],\n  options: GlobOptions = {},\n) {\n  return new Glob(pattern, options).stream()\n}\n\n/**\n * Synchronous form of {@link glob}\n */\nexport function globSync(\n  pattern: string | string[],\n  options: GlobOptionsWithFileTypesFalse,\n): string[]\nexport function globSync(\n  pattern: string | string[],\n  options: GlobOptionsWithFileTypesTrue,\n): Path[]\nexport function globSync(\n  pattern: string | string[],\n  options?: GlobOptionsWithFileTypesUnset | undefined,\n): string[]\nexport function globSync(\n  pattern: string | string[],\n  options: GlobOptions,\n): Path[] | string[]\nexport function globSync(\n  pattern: string | string[],\n  options: GlobOptions = {},\n) {\n  return new Glob(pattern, options).walkSync()\n}\n\n/**\n * Perform an asynchronous glob search for the pattern(s) specified. Returns\n * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the\n * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for\n * full option descriptions.\n */\nasync function glob_(\n  pattern: string | string[],\n  options?: GlobOptionsWithFileTypesUnset | undefined,\n): Promise\nasync function glob_(\n  pattern: string | string[],\n  options: GlobOptionsWithFileTypesTrue,\n): Promise\nasync function glob_(\n  pattern: string | string[],\n  options: GlobOptionsWithFileTypesFalse,\n): Promise\nasync function glob_(\n  pattern: string | string[],\n  options: GlobOptions,\n): Promise\nasync function glob_(\n  pattern: string | string[],\n  options: GlobOptions = {},\n) {\n  return new Glob(pattern, options).walk()\n}\n\n/**\n * Return a sync iterator for walking glob pattern matches.\n */\nexport function globIterateSync(\n  pattern: string | string[],\n  options?: GlobOptionsWithFileTypesUnset | undefined,\n): Generator\nexport function globIterateSync(\n  pattern: string | string[],\n  options: GlobOptionsWithFileTypesTrue,\n): Generator\nexport function globIterateSync(\n  pattern: string | string[],\n  options: GlobOptionsWithFileTypesFalse,\n): Generator\nexport function globIterateSync(\n  pattern: string | string[],\n  options: GlobOptions,\n): Generator | Generator\nexport function globIterateSync(\n  pattern: string | string[],\n  options: GlobOptions = {},\n) {\n  return new Glob(pattern, options).iterateSync()\n}\n\n/**\n * Return an async iterator for walking glob pattern matches.\n */\nexport function globIterate(\n  pattern: string | string[],\n  options?: GlobOptionsWithFileTypesUnset | undefined,\n): AsyncGenerator\nexport function globIterate(\n  pattern: string | string[],\n  options: GlobOptionsWithFileTypesTrue,\n): AsyncGenerator\nexport function globIterate(\n  pattern: string | string[],\n  options: GlobOptionsWithFileTypesFalse,\n): AsyncGenerator\nexport function globIterate(\n  pattern: string | string[],\n  options: GlobOptions,\n): AsyncGenerator | AsyncGenerator\nexport function globIterate(\n  pattern: string | string[],\n  options: GlobOptions = {},\n) {\n  return new Glob(pattern, options).iterate()\n}\n\n// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc\nexport const streamSync = globStreamSync\nexport const stream = Object.assign(globStream, { sync: globStreamSync })\nexport const iterateSync = globIterateSync\nexport const iterate = Object.assign(globIterate, {\n  sync: globIterateSync,\n})\nexport const sync = Object.assign(globSync, {\n  stream: globStreamSync,\n  iterate: globIterateSync,\n})\n\nexport const glob = Object.assign(glob_, {\n  glob: glob_,\n  globSync,\n  sync,\n  globStream,\n  stream,\n  globStreamSync,\n  streamSync,\n  globIterate,\n  iterate,\n  globIterateSync,\n  iterateSync,\n  Glob,\n  hasMagic,\n  escape,\n  unescape,\n})\nglob.glob = glob\n", null, null, null, null, "\n  export const name = \"@redocly/cli\";\n  export const version = \"2.31.2\";\n  export const engines = {\"node\":\">=22.12.0 || >=20.19.0 <21.0.0\",\"npm\":\">=10\"};\n", null, "/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n *  - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n  options = options || {};\n  var type = typeof val;\n  if (type === 'string' && val.length > 0) {\n    return parse(val);\n  } else if (type === 'number' && isFinite(val)) {\n    return options.long ? fmtLong(val) : fmtShort(val);\n  }\n  throw new Error(\n    'val is not a non-empty string or a valid number. val=' +\n      JSON.stringify(val)\n  );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n  str = String(str);\n  if (str.length > 100) {\n    return;\n  }\n  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(\n    str\n  );\n  if (!match) {\n    return;\n  }\n  var n = parseFloat(match[1]);\n  var type = (match[2] || 'ms').toLowerCase();\n  switch (type) {\n    case 'years':\n    case 'year':\n    case 'yrs':\n    case 'yr':\n    case 'y':\n      return n * y;\n    case 'weeks':\n    case 'week':\n    case 'w':\n      return n * w;\n    case 'days':\n    case 'day':\n    case 'd':\n      return n * d;\n    case 'hours':\n    case 'hour':\n    case 'hrs':\n    case 'hr':\n    case 'h':\n      return n * h;\n    case 'minutes':\n    case 'minute':\n    case 'mins':\n    case 'min':\n    case 'm':\n      return n * m;\n    case 'seconds':\n    case 'second':\n    case 'secs':\n    case 'sec':\n    case 's':\n      return n * s;\n    case 'milliseconds':\n    case 'millisecond':\n    case 'msecs':\n    case 'msec':\n    case 'ms':\n      return n;\n    default:\n      return undefined;\n  }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n  var msAbs = Math.abs(ms);\n  if (msAbs >= d) {\n    return Math.round(ms / d) + 'd';\n  }\n  if (msAbs >= h) {\n    return Math.round(ms / h) + 'h';\n  }\n  if (msAbs >= m) {\n    return Math.round(ms / m) + 'm';\n  }\n  if (msAbs >= s) {\n    return Math.round(ms / s) + 's';\n  }\n  return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n  var msAbs = Math.abs(ms);\n  if (msAbs >= d) {\n    return plural(ms, msAbs, d, 'day');\n  }\n  if (msAbs >= h) {\n    return plural(ms, msAbs, h, 'hour');\n  }\n  if (msAbs >= m) {\n    return plural(ms, msAbs, m, 'minute');\n  }\n  if (msAbs >= s) {\n    return plural(ms, msAbs, s, 'second');\n  }\n  return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n  var isPlural = msAbs >= n * 1.5;\n  return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n", "\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n", "/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n", "'use strict';\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n", "'use strict';\nconst os = require('os');\nconst tty = require('tty');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n", "/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n *   $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = `  ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n", "/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "import * as core from '@actions/core';\n\nimport { setCommitStatuses } from './set-commit-statuses';\nimport { getRedoclyConfig, parseEventData, parseInputData } from './helpers';\nimport { loadRedoclyCliCommands } from './redocly-cli';\nimport type { PushStatusSummary } from '@redocly/cli/lib/reunite/commands/push-status';\n\n// eslint-disable-next-line import/extensions\nimport { dependencies } from '../package.json';\n\nconst redoclyCliVersion = dependencies['@redocly/cli'];\n\nexport async function run(): Promise {\n  try {\n    const inputData = parseInputData();\n    const ghEvent = await parseEventData(inputData.defaultBranch);\n\n    console.debug('Parsed input data', inputData);\n    console.debug('Parsed GitHub event', ghEvent);\n\n    const config = await getRedoclyConfig();\n    const { handlePush, handlePushStatus } = await loadRedoclyCliCommands();\n\n    const pushData = await handlePush({\n      argv: {\n        domain: inputData.redoclyDomain,\n        organization: inputData.redoclyOrgSlug,\n        project: inputData.redoclyProjectSlug,\n        'mount-path': inputData.mountPath,\n        files: inputData.files,\n        'max-execution-time': inputData.maxExecutionTime,\n        namespace: ghEvent.namespace,\n        repository: ghEvent.repository,\n        branch: ghEvent.branch,\n        'default-branch': ghEvent.defaultBranch,\n        message: ghEvent.commit.commitMessage,\n        'commit-sha': ghEvent.commit.commitSha,\n        'commit-url': ghEvent.commit.commitUrl,\n        author: ghEvent.commit.commitAuthor,\n        'created-at': ghEvent.commit.commitCreatedAt,\n      },\n      config,\n      version: redoclyCliVersion,\n    });\n\n    if (!pushData?.pushId) {\n      throw new Error('Missing push ID');\n    }\n\n    const pushStatusData = await handlePushStatus({\n      argv: {\n        organization: inputData.redoclyOrgSlug,\n        project: inputData.redoclyProjectSlug,\n        pushId: pushData.pushId,\n        domain: inputData.redoclyDomain,\n        wait: true,\n        'continue-on-deploy-failures': true,\n        'max-execution-time': inputData.maxExecutionTime,\n        onRetry: async (lastResult: PushStatusSummary) => {\n          try {\n            await setCommitStatuses({\n              commitStatuses: lastResult.commit.statuses,\n              owner: ghEvent.namespace,\n              repo: ghEvent.repository,\n              commitId: ghEvent.commit.commitSha,\n            });\n          } catch (error: unknown) {\n            core.error(\n              `Failed to set commit statuses. Error: ${(error as Error)?.message}`,\n            );\n          }\n        },\n      },\n      config,\n      version: redoclyCliVersion,\n    });\n\n    if (!pushStatusData) {\n      throw new Error('Missing push status data');\n    }\n\n    console.debug(\n      'Amount of final commit statuses to set',\n      pushStatusData.commit.statuses.length,\n    );\n\n    await setCommitStatuses({\n      commitStatuses: pushStatusData.commit.statuses,\n      owner: ghEvent.namespace,\n      repo: ghEvent.repository,\n      commitId: ghEvent.commit.commitSha,\n    });\n\n    console.debug('Action finished successfully. Push ID:', pushData.pushId);\n\n    core.setOutput('pushId', pushData.pushId);\n  } catch (error) {\n    if (error instanceof Error) core.setFailed(error.message);\n  }\n}\n", "import * as core from '@actions/core';\nimport * as github from '@actions/github';\nimport type { RestEndpointMethodTypes } from '@octokit/rest';\nimport type { DeploymentStatus } from '@redocly/cli/lib/reunite/api/types';\nimport type { PushStatusSummary } from '@redocly/cli/lib/reunite/commands/push-status';\n\ntype CommitStatus = PushStatusSummary['commit']['statuses'][number];\n\nexport async function setCommitStatuses({\n  commitStatuses,\n  owner,\n  repo,\n  commitId,\n}: {\n  commitStatuses: CommitStatus[];\n  owner: string;\n  repo: string;\n  commitId: string;\n}): Promise {\n  const githubToken = core.getInput('githubToken');\n  const octokit = github.getOctokit(githubToken);\n\n  if (commitStatuses?.length > 0) {\n    // TBD: Should we add a concurrency limit here to avoid hitting rate limits?\n    await Promise.all(\n      commitStatuses.map(async status => {\n        await octokit.rest.repos.createCommitStatus({\n          owner,\n          repo,\n          sha: commitId,\n          state: mapDeploymentStateToGithubCommitState(status.status),\n          target_url: status.url,\n          context: status.name,\n          description: status.description,\n        });\n      }),\n    );\n  }\n}\n\nfunction mapDeploymentStateToGithubCommitState(\n  state?: DeploymentStatus,\n): RestEndpointMethodTypes['repos']['createCommitStatus']['parameters']['state'] {\n  switch (state) {\n    case 'pending':\n    case 'running':\n      return 'pending';\n    case 'success':\n      return 'success';\n    case 'failed':\n      return 'error';\n    default:\n      throw new TypeError(`Unknown deployment state: ${state}`);\n  }\n}\n", "import path from 'path';\nimport * as core from '@actions/core';\nimport * as github from '@actions/github';\nimport { ParsedEventData, ParsedInputData } from './types';\nimport { loadRedoclyConfig } from './redocly-config';\n\nexport function parseInputData(): ParsedInputData {\n  const redoclyOrgSlug = core.getInput('organization', { required: true });\n  const redoclyProjectSlug = core.getInput('project', { required: true });\n  const mountPath = core.getInput('mountPath', { required: true });\n  const files = core.getInput('files', { required: true }).split(' ');\n\n  const redoclyDomain =\n    core.getInput('domain') || 'https://app.cloud.redocly.com';\n  const maxExecutionTime = Number(core.getInput('maxExecutionTime')) || 1200;\n  const defaultBranch = core.getInput('defaultBranch') || undefined;\n\n  const absoluteFilePaths = files.map(_path =>\n    path.join(process.env.GITHUB_WORKSPACE || '', _path),\n  );\n\n  return {\n    redoclyOrgSlug,\n    redoclyProjectSlug,\n    mountPath,\n    files: absoluteFilePaths,\n    redoclyDomain,\n    maxExecutionTime,\n    defaultBranch,\n  };\n}\n\nexport async function parseEventData(\n  defaultBranchOverride?: string,\n): Promise {\n  if (\n    !(\n      github.context.eventName === 'push' ||\n      github.context.eventName === 'pull_request'\n    )\n  ) {\n    throw new Error(\n      'Unsupported GitHub event type. Only \"push\" and \"pull_request\" events are supported.',\n    );\n  }\n\n  if (github.context.eventName === 'pull_request') {\n    const allowedActions = ['opened', 'synchronize', 'reopened'];\n\n    if (\n      !github.context.payload.action ||\n      !allowedActions.includes(github.context.payload.action)\n    ) {\n      throw new Error(\n        'Unsupported GitHub event. Only \"opened\", \"synchronize\" and \"reopened\" actions are supported for pull requests.',\n      );\n    }\n  }\n\n  const namespace = github.context.payload?.repository?.owner?.login;\n  const repository = github.context.payload?.repository?.name;\n\n  if (!namespace || !repository) {\n    throw new Error(\n      'Invalid GitHub event data. Can not get owner or repository name from the event payload.',\n    );\n  }\n\n  const branch =\n    github.context.payload.pull_request?.['head']?.['ref'] ||\n    github.context.ref.replace('refs/heads/', '');\n\n  if (!branch) {\n    throw new Error(\n      'Invalid GitHub event data. Can not get branch from the event payload.',\n    );\n  }\n\n  const defaultBranch: string | undefined =\n    defaultBranchOverride ||\n    github.context.payload?.repository?.default_branch ||\n    github.context.payload?.repository?.master_branch;\n\n  if (!defaultBranch) {\n    throw new Error(\n      'Invalid GitHub event data. Can not get default branch from the event payload. You can use the \"defaultBranch\" input to set it manually.',\n    );\n  }\n\n  const commitSha = getCommitSha();\n\n  if (!commitSha) {\n    throw new Error(\n      'Invalid GitHub event data. Can not get commit sha from the event payload.',\n    );\n  }\n\n  const githubToken = core.getInput('githubToken');\n  const octokit = github.getOctokit(githubToken);\n\n  const { data: commitData } = await octokit.rest.repos.getCommit({\n    owner: namespace,\n    repo: repository,\n    ref: commitSha,\n  });\n\n  if (!commitData.commit.author?.name || !commitData.commit.author?.email) {\n    throw new Error(\n      'Invalid GitHub event data. Can not get author name or email from the event payload.',\n    );\n  }\n\n  const commit: ParsedEventData['commit'] = {\n    commitSha,\n    commitMessage: commitData.commit.message,\n    commitUrl: commitData.html_url,\n    commitAuthor: `${commitData.commit.author?.name} <${commitData.commit.author?.email}>`,\n    commitCreatedAt: commitData.commit.author?.date,\n  };\n\n  return {\n    eventName: github.context.eventName,\n    namespace,\n    repository,\n    branch,\n    defaultBranch,\n    commit,\n  };\n}\n\nexport function getCommitSha(): string | undefined {\n  if (github.context.eventName === 'push') {\n    return github.context.payload.after;\n  }\n\n  if (github.context.eventName === 'pull_request') {\n    return github.context.payload.pull_request?.head?.sha;\n  }\n}\n\n// Returns parsed config from the root or default config if not found\nexport async function getRedoclyConfig(): ReturnType {\n  return loadRedoclyConfig();\n}\n", "// Defer loading @redocly/openapi-core until call time. The package is pure\n// ESM; statically importing it from CJS jest would crash with ERR_REQUIRE_ESM.\nimport type { loadConfig } from '@redocly/openapi-core';\n\nexport async function loadRedoclyConfig(): ReturnType {\n  const { loadConfig: load } = await import('@redocly/openapi-core');\n\n  return load();\n}\n", "// Defer loading @redocly/cli until call time. The cli is pure ESM; statically\n// importing it from CJS jest would crash with ERR_REQUIRE_ESM.\nimport type { handlePush } from '@redocly/cli/lib/reunite/commands/push';\nimport type { handlePushStatus } from '@redocly/cli/lib/reunite/commands/push-status';\n\ntype RedoclyCliCommands = {\n  handlePush: typeof handlePush;\n  handlePushStatus: typeof handlePushStatus;\n};\n\nexport async function loadRedoclyCliCommands(): Promise {\n  const [push, pushStatus] = await Promise.all([\n    import('@redocly/cli/lib/reunite/commands/push'),\n    import('@redocly/cli/lib/reunite/commands/push-status'),\n  ]);\n\n  return {\n    handlePush: push.handlePush,\n    handlePushStatus: pushStatus.handlePushStatus,\n  };\n}\n", "{\n  \"name\": \"@redocly/reunite-push-action\",\n  \"description\": \"GitHub Action for pushing files to Redocly Reunite app\",\n  \"version\": \"1.0.0\",\n  \"author\": \"Redocly\",\n  \"private\": true,\n  \"type\": \"module\",\n  \"keywords\": [\n    \"actions\",\n    \"node\",\n    \"setup\",\n    \"redocly\"\n  ],\n  \"exports\": {\n    \".\": \"./dist/index.js\"\n  },\n  \"engines\": {\n    \"node\": \">=20.19.0\"\n  },\n  \"scripts\": {\n    \"all\": \"npm run prettier && npm run lint && npm run test && npm run package\",\n    \"prettier:check\": \"npx prettier --check .\",\n    \"prettier\": \"npx prettier --write .\",\n    \"lint\": \"npx eslint . -c ./.github/linters/.eslintrc.yml\",\n    \"test\": \"npx jest\",\n    \"test:watch\": \"npm run test -- --watch\",\n    \"test:coverage\": \"npm run test -- --coverage\",\n    \"test:ci\": \"npm run test -- --coverage --ci --silent --testLocationInResults --json --outputFile=results.json\",\n    \"package\": \"node scripts/build.mjs\",\n    \"package:watch\": \"npm run package -- --watch\",\n    \"bundle\": \"npm run prettier && npm run package\",\n    \"compile-fake-server\": \"tsc -p tsconfig.fake-server.json\",\n    \"fake-server:start\": \"npm run compile-fake-server && pm2 start ./fake-api-server/.dist/fake-api-server.js\",\n    \"release\": \"./script/release\"\n  },\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"@actions/core\": \"^1.10.1\",\n    \"@actions/github\": \"^6.0.0\",\n    \"@octokit/rest\": \"^20.1.0\",\n    \"@redocly/cli\": \"2.31.2\",\n    \"@redocly/openapi-core\": \"2.31.2\"\n  },\n  \"devDependencies\": {\n    \"@jest/globals\": \"^29.7.0\",\n    \"@types/express\": \"^4.17.21\",\n    \"@types/jest\": \"^29.5.14\",\n    \"@types/node\": \"^20.12.7\",\n    \"@typescript-eslint/eslint-plugin\": \"^8.59.4\",\n    \"@typescript-eslint/parser\": \"^8.59.4\",\n    \"@vercel/ncc\": \"^0.38.1\",\n    \"esbuild\": \"0.28.0\",\n    \"eslint\": \"^8.57.0\",\n    \"eslint-import-resolver-typescript\": \"^4.4.4\",\n    \"eslint-plugin-github\": \"^5.1.8\",\n    \"eslint-plugin-jest\": \"^29.15.2\",\n    \"eslint-plugin-jsonc\": \"^2.15.1\",\n    \"eslint-plugin-prettier\": \"^5.1.3\",\n    \"express\": \"^4.21.1\",\n    \"jest\": \"^29.7.0\",\n    \"make-coverage-badge\": \"^1.2.0\",\n    \"pm2\": \"^6.0.14\",\n    \"prettier\": \"^3.2.5\",\n    \"prettier-eslint\": \"^16.3.0\",\n    \"ts-jest\": \"^29.1.2\",\n    \"ts-node\": \"^10.9.2\",\n    \"typescript\": \"^5.4.5\"\n  },\n  \"eslintConfig\": {\n    \"extends\": \"./.github/linters/.eslintrc.yml\"\n  },\n  \"overrides\": {\n    \"systeminformation@<5.27.14\": \">=5.27.14\",\n    \"undici\": \"^7.24.0\",\n    \"@typescript-eslint/typescript-estree\": {\n      \"minimatch\": \">=9.0.7\"\n    },\n    \"handlebars\": \">=4.7.9\",\n    \"flatted\": \">=3.4.2\"\n  }\n}\n", "/**\n * The entrypoint for the action.\n */\nimport { run } from './main';\n\n// eslint-disable-next-line @typescript-eslint/no-floating-promises\nrun();\n"],
+  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,aAAgB,eAAe,OAAU;AACvC,UAAI,UAAU,QAAQ,UAAU,QAAW;AACzC,eAAO;iBACE,OAAO,UAAU,YAAY,iBAAiB,QAAQ;AAC/D,eAAO;;AAET,aAAO,KAAK,UAAU,KAAK;IAC7B;AAPA,YAAA,iBAAA;AAeA,aAAgB,oBACd,sBAA0C;AAE1C,UAAI,CAAC,OAAO,KAAK,oBAAoB,EAAE,QAAQ;AAC7C,eAAO,CAAA;;AAGT,aAAO;QACL,OAAO,qBAAqB;QAC5B,MAAM,qBAAqB;QAC3B,MAAM,qBAAqB;QAC3B,SAAS,qBAAqB;QAC9B,KAAK,qBAAqB;QAC1B,WAAW,qBAAqB;;IAEpC;AAfA,YAAA,sBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzBA,QAAAA,MAAA,aAAA,UAAA,IAAA,CAAA;AACA,QAAA,UAAA;AA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MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA;AAAA;;;AC5dA;AAAA,uDAAAE,SAAA;AAAA;AAKA,QAAM;AAAA;AAAA,MAA6C;AAAA,QACjD;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA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ACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA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;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,IAAM,mBAAmB;MACvB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;AAIF,IAAM,mBAAmB;MACvB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;AAIF,IAAM,qBAAqB;MACzB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;AAIF,IAAM,qBAAqB;MACzB;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;AAIF,IAAM,sBAAsB;MAC1B;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;AAIF,IAAM,uBAAuB,CAAC,cAAc;AAG5C,IAAM,uBAAuB;MAC3B;MACA;MACA;MACA;MACA;;AAIF,IAAM,qBAAqB,CAAC,UAAU,oBAAoB;AAG1D,IAAM,eAAe;MACnB,GAAG;MACH,GAAG;MACH,GAAG;MACH,GAAG;MACH,GAAG;MACH,GAAG;MACH,GAAG;MACH,GAAG;;AAIL,IAAM,wBAAwB;MAC5B;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;AAIF,IAAM,wBAAwB;MAC5B;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;AAIF,IA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,kBAAM,kBAAkB;AAAA,cACtB,gBAAgB,WAAW,OAAO;AAAA,cAClC,OAAO,QAAQ;AAAA,cACf,MAAM,QAAQ;AAAA,cACd,UAAU,QAAQ,OAAO;AAAA,YAC3B,CAAC;AAAA,UACH,SAASC,QAAgB;AACvB,YAAK;AAAA,cACH,yCAA0CA,QAAiB,OAAO;AAAA,YACpE;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,MACA;AAAA,MACA,SAAS;AAAA,IACX,CAAC;AAED,QAAI,CAAC,gBAAgB;AACnB,YAAM,IAAI,MAAM,0BAA0B;AAAA,IAC5C;AAEA,YAAQ;AAAA,MACN;AAAA,MACA,eAAe,OAAO,SAAS;AAAA,IACjC;AAEA,UAAM,kBAAkB;AAAA,MACtB,gBAAgB,eAAe,OAAO;AAAA,MACtC,OAAO,QAAQ;AAAA,MACf,MAAM,QAAQ;AAAA,MACd,UAAU,QAAQ,OAAO;AAAA,IAC3B,CAAC;AAED,YAAQ,MAAM,0CAA0C,SAAS,MAAM;AAEvE,IAAK,gBAAU,UAAU,SAAS,MAAM;AAAA,EAC1C,SAASA,QAAO;AACd,QAAIA,kBAAiB,MAAO,CAAK,gBAAUA,OAAM,OAAO;AAAA,EAC1D;AACF;;;AM7FA,IAAI;",
+  "names": ["os", "s", "fs", "os", "getProxyUrl", "x", "url", "options", "i", "error", "socket", "j", "k", "require_tunnel", "module", "module", "module", "module", "options", "module", "i", "module", "i", "module", "v", "url", "path", "idx", "stream", "i", "x", "n", "c", "err", "module", "module", "version", "error", "path", "module", "path", "reset", "i", "error", "module", "context", "module", "module", "context", "module", "resolve", "i", "err", "module", "options", "session", "require_utils", "filter", "require_constants", "k", "i", "c", "module", "Buffer", "module", "Buffer", "require_constants", "module", "module", "module", "module", "i", "str", "module", "url", "j", "i", "type", "str", "module", "module", "types", "context", "V", "I", "c", "O", "x", "n", "r", "type", "seq", "keys", "a", "b", "options", "T", "require_util", "module", "performance", "url", "i", "c", "timestamp", "A", "B", "e", "module", "entry", "options", "a", "b", "module", "i", "module", "resolve", "module", "c", "type", "str", "chunk", "value", "e", "module", "p", "at", "exports", "type", "pause", "i", "path", "reset", "n", "er", "resolve", "module", "error", "type", "i", "path", "n", "headers", "resolve", "module", "url", "connect", "resolve", "i", "err", "module", "module", "i", "client", "resolve", "module", "options", "origin", "error", "module", "a", "b", "t", "pool", "i", "p", "dispatcher", "module", "options", "origin", "error", "module", "Agent", "options", "result", "module", "Buffer", "p", "i", "type", "error", "module", "Buffer", "options", "i", "version", "module", "URL", "options", "url", "resolve", "socket", "module", "Agent", "path", "ProxyAgent", "url", "origin", "options", "protocol", "opts", "promises", "i", "module", "ProxyAgent", "Agent", "url", "i", "module", "context", "module", "options", "module", "module", "resolve", "type", "consume", "n", "i", "module", "context", "resolve", "module", "module", "context", "res", "opaque", "resolve", "module", "context", "body", "module", "context", "resolve", "module", "context", "resolve", "module", "module", "module", "module", "match", "i", "mockDispatch", "v", "path", "j", "error", "url", "module", "replyParameters", "newMockDispatch", "error", "module", "module", "options", "url", "error", "module", "module", "path", "module", "Agent", "path", "result", "module", "url", "i", "module", "dirname", "resolve", "setTimeout", "clearTimeout", "url", "match", "options", "path", "error", "module", "Agent", "error", "context", "url", "require_global", "module", "Agent", "module", "module", "_", "context", "path", "error", "i", "module", "module", "context", "module", "module", "context", "module", "i", "timestamp", "module", "x", "i", "j", "module", "module", "type", "context", "module", "key", "entries", "entry", "module", "_", "context", "require_cache", "module", "i", "context", "isStale", "headers", "type", "opts", "result", "module", "i", "error", "_", "options", "module", "context", "module", "opts", "module", "url", "x", "i", "module", "i", "j", "a", "b", "init", "x", "options", "V", "module", "Response", "init", "url", "type", "options", "p", "V", "require_request", "module", "init", "window", "options", "V", "module", "metadata", "i", "module", "error", "fetch", "init", "p", "e", "type", "url", "path", "resolve", "i", "require_util", "module", "A", "B", "require_cache", "module", "options", "p", "r", "e", "request", "module", "options", "cache", "require_constants", "module", "require_util", "module", "i", "path", "_", "module", "module", "str", "module", "type", "init", "require_constants", "module", "require_util", "module", "e", "type", "init", "i", "url", "module", "randomFillSync", "buffer", "i", "module", "url", "options", "module", "module", "_", "error", "n", "i", "body", "module", "node", "module", "url", "options", "p", "type", "init", "ws", "V", "module", "init", "error", "module", "url", "options", "p", "e", "type", "error", "V", "require_util", "module", "i", "module", "options", "module", "url", "e", "error", "module", "Agent", "ProxyAgent", "url", "path", "fetch", "init", "options", "HttpCodes", "Headers", "MediaTypes", "getProxyUrl", "resolve", "_default", "options", "ms", "a", "c", "k", "options", "error", "options", "path", "fs", "path", "p", "_a", "path", "options", "p", "e", "os", "path", "options", "a", "s", "n", "str", "x", "i", "resolve", "error", "c", "tr", "options", "stdout", "stderr", "version", "stdout", "os", "path", "ExitCode", "getInput", "options", "x", "setOutput", "enabled", "setFailed", "error", "path", "options", "url", "getUserAgent", "navigator", "userAgent", "process", "version", "undefined", "substr", "platform", "arch", "module", "options", "name", "method", "module", "options", "error", "module", "module", "require_dist_node", "module", "__defProp", "__getOwnPropDesc", "__getOwnPropNames", "__hasOwnProp", "__export", "all", "__copyProps", "to", "isPlainObject", "options", "merge", "url", "a", "b", "omit", "str", "c", "isDefined", "context", "k", "_", "require_dist_node", "module", "k", "i", "cb", "module", "require_dist_node", "module", "__create", "__defProp", "__getOwnPropDesc", "__getOwnPropNames", "__getProtoOf", "__hasOwnProp", "__export", "all", "__copyProps", "to", "__toESM", "options", "require_dist_node", "module", "__defProp", "__getOwnPropDesc", "__getOwnPropNames", "__hasOwnProp", "__export", "all", "__copyProps", "to", "isPlainObject", "url", "fetch", "error", "require_dist_node", "module", "__defProp", "__getOwnPropDesc", "__getOwnPropNames", "__hasOwnProp", "__export", "all", "__copyProps", "to", "e", "options", "require_dist_node", "module", "__defProp", "__getOwnPropDesc", "__getOwnPropNames", "__hasOwnProp", "__export", "all", "__copyProps", "to", "require_dist_node", "module", "__defProp", "__getOwnPropDesc", "__getOwnPropNames", "__hasOwnProp", "__export", "all", "__copyProps", "to", "logger", "options", "i", "require_dist_node", "module", "__defProp", "__getOwnPropDesc", "__getOwnPropNames", "__hasOwnProp", "__export", "all", "__copyProps", "to", "url", "options", "options2", "require_dist_node", "module", "__defProp", "__getOwnPropDesc", "__getOwnPropNames", "__hasOwnProp", "__export", "all", "__copyProps", "to", "options", "url", "error", "options", "getOctokit", "options", "ms", "resolve", "module", "pluralize", "str", "match", "rules", "bool", "pluralizeOne", "require_constants", "module", "require_utils", "str", "match", "options", "path", "module", "CHAR_ASTERISK", "CHAR_COMMA", "CHAR_LEFT_SQUARE_BRACKET", "CHAR_RIGHT_SQUARE_BRACKET", "options", "str", "n", "i", "require_parse", "module", "options", "v", "type", "i", "j", "a", "b", "match", "branch", "opts", "n", "value", "rest", "t", "str", "source", "module", "isObject", "picomatch", "options", "str", "state", "match", "p", "require_picomatch", "module", "picomatch", "options", "url", "picomatch", "path", "types", "options", "type", "t", "path", "e", "relative", "responseCodeRegexp", "Root", "Tag", "TagGroup", "ExternalDocs", "SecurityRequirement", "Info", "Logo", "Contact", "License", "Paths", "PathItem", "Parameter", "Operation", "XCodeSample", "Example", "EnumDescriptions", "Header", "Responses", "Response", "Schema", "Xml", "SchemaProperties", "SecurityScheme", "Root", "License", "Info", "Components", "Operation", "Schema", "SchemaProperties", "SecurityScheme", "Root", "Tag", "Server", "SecurityScheme", "OAuth2Flows", "PathItem", "Parameter", "Response", "MediaType", "Discriminator", "Components", "Example", "Xml", "Schema", "Schema", "SchemaProperties", "DiscriminatorMapping", "Discriminator", "Root", "Tag", "ExternalDocs", "SecurityRequirement", "Server", "ServerVariable", "Info", "Contact", "License", "Parameter", "Operation", "Components", "ImplicitFlow", "PasswordFlow", "ClientCredentials", "AuthorizationCode", "SecurityScheme", "Schema", "SchemaProperties", "DiscriminatorMapping", "Discriminator", "Root", "Channel", "Server", "Info", "Parameter", "Message", "OperationTrait", "MessageTrait", "Operation", "Components", "ImplicitFlow", "PasswordFlow", "ClientCredentials", "AuthorizationCode", "SecurityScheme", "ServerVariable", "Contact", "License", "Tag", "Schema", "Discriminator", "DiscriminatorMapping", "SchemaProperties", "ExternalDocs", "Root", "Components", "Info", "Parameter", "RequestBody", "Root", "Info", "Root", "Info", "Contact", "License", "Server", "ServerVariable", "Example", "Link", "Components", "Tag", "ExternalDocs", "Schema", "SchemaProperties", "DiscriminatorMapping", "Discriminator", "oe", "spec", "s", "c", "_", "i", "str", "a", "b", "x", "UsedValueState", "vs", "s", "c", "error", "n", "i", "Root", "e", "ns", "to", "vs", "c", "N2", "x", "or", "y", "it", "schema", "rules", "str", "xs", "x", "to", "ps", "p", "Type", "error", "it", "i", "E", "it", "schema", "x", "schema", "type", "DataType", "schema", "types", "ts", "it", "t", "it", "i", "schema", "it", "p", "context", "u", "i", "schema", "schema", "it", "e", "_a", "st", "it", "schema", "module", "a", "b", "i", "module", "schema", "i", "str", "schema", "hasRef", "p", "_", "it", "schema", "types", "t", "ts", "rules", "type", "st", "env", "schema", "e", "resolve", "resolveSchema", "p", "module", "require_utils", "module", "i", "str", "path", "re", "module", "path", "options", "ws", "module", "options", "resolve", "relative", "s", "e", "str", "s", "_e", "_r", "_s", "_t", "Ajv", "v", "schema", "e", "p", "k", "t", "i", "rules", "options", "logger", "it", "env", "v", "e", "core", "error", "error", "it", "str", "error", "it", "error", "schema", "it", "u", "error", "error", "schema", "it", "error", "error", "error", "error", "i", "j", "schema", "it", "t", "error", "schema", "error", "schema", "it", "i", "v", "error", "it", "schema", "i", "schema", "it", "i", "l", "error", "schema", "it", "error", "schema", "it", "i", "schema", "it", "error", "schema", "it", "error", "it", "schema", "p", "schema", "it", "p", "schema", "it", "p", "schema", "it", "error", "schema", "it", "i", "schema", "it", "i", "error", "it", "schema", "it", "it", "v", "schema", "it", "v", "it", "error", "schema", "it", "isForced", "ps", "p", "error", "schema", "it", "i", "error", "schema", "it", "DiscrError", "error", "schema", "it", "i", "module", "require_applicator", "module", "require_unevaluated", "module", "module", "require_core", "module", "module", "module", "require_validation", "module", "core", "ajv", "Ajv2020", "v", "module", "schema", "_", "i", "r", "Ajv", "path", "version", "types", "Schema", "_", "init_arazzo", "version", "specVersions", "init_arazzo", "exception", "options", "re", "match", "i", "map", "schema", "type", "c", "str", "string", "to", "core", "extend", "init_js_yaml", "str", "resolve", "options", "i", "options", "isDefined", "hasRef", "isValid", "context", "plugin", "fs", "path", "init_js_yaml", "rules", "types", "version", "decorators", "preprocessors", "p", "specVersions", "init_types", "x", "rules", "type", "init_arazzo", "decorators", "decorators", "i", "key", "httpMethods", "DEFAULT_STRATEGY", "httpMethods", "fs", "path", "init_js_yaml", "e", "_", "e", "originalMapping", "i", "key", "e", "getComponentKey", "type", "schema", "decorators", "init_oas2", "type", "RemoveUnusedComponents", "init_remove_unused_components", "schema", "decorators", "init_oas3", "init_remove_unused_components", "RemoveUnusedComponents", "decorators", "init_openrpc", "decorators", "env", "s", "str", "asserts", "_", "context", "parts", "Assertions", "_", "module", "a", "b", "x", "y", "error", "module", "Ajv", "v", "module", "str", "hr", "dt2", "e", "s", "c", "_", "i", "str", "a", "b", "x", "UsedValueState", "vs", "s", "c", "error", "n", "i", "Root", "e", "ns", "to", "vs", "c", "N2", "x", "or", "y", "it", "schema", "rules", "str", "xs", "x", "to", "ps", "p", "Type", "error", "it", "i", "E", "it", "schema", "x", "schema", "type", "DataType", "schema", "types", "ts", "it", "t", "it", "i", "schema", "it", "p", "context", "u", "i", "schema", "schema", "it", "e", "_a", "st", "it", "schema", "schema", "hasRef", "p", "_", "it", "schema", "types", "t", "ts", "rules", "type", "st", "env", "schema", "e", "resolve", "resolveSchema", "p", "require_data", "module", "str", "s", "_e", "_r", "_s", "_t", "Ajv", "v", "schema", "e", "p", "k", "t", "i", "rules", "options", "logger", "it", "env", "v", "e", "core", "error", "error", "it", "str", "error", "it", "error", "schema", "it", "u", "error", "error", "schema", "it", "error", "error", "error", "error", "i", "j", "schema", "it", "t", "error", "schema", "error", "schema", "it", "i", "v", "error", "it", "schema", "i", "schema", "it", "i", "l", "error", "schema", "it", "error", "schema", "it", "i", "schema", "it", "error", "schema", "it", "error", "it", "schema", "p", "schema", "it", "p", "schema", "it", "p", "schema", "it", "error", "schema", "it", "i", "schema", "it", "i", "error", "it", "schema", "it", "error", "schema", "it", "DiscrError", "error", "schema", "it", "i", "module", "Ajv", "v", "module", "error", "it", "ajv", "ajv", "addFormats", "fs", "module", "resolve", "options", "Ajv2020", "AjvDraft4", "addFormats", "schema", "ajv", "error", "e", "import__", "type", "i", "levenshtein", "a", "b", "schema", "options", "resolve", "error", "e", "responseCodeRegexp", "init_utils", "init_utils", "schema", "type", "schema", "init_utils", "_", "schema", "s", "i", "schema", "error", "_", "resolve", "init_utils", "type", "resolve", "i", "context", "init_arazzo", "context", "path", "definedWorkflowOutputs", "match", "definedStepOutputs", "init_arazzo", "Assertions", "init_utils", "init_utils", "init_utils", "init_utils", "init_utils", "init_utils", "i", "s", "rules", "preprocessors", "init_async2", "Assertions", "ChannelsKebabCase", "init_channels_kebab_case", "s", "NoChannelTrailingSlash", "init_no_channel_trailing_slash", "rules", "preprocessors", "init_async3", "init_channels_kebab_case", "init_no_channel_trailing_slash", "Assertions", "ChannelsKebabCase", "NoChannelTrailingSlash", "init_utils", "a", "b", "i", "str", "e", "Paths", "init_utils", "init_utils", "schema", "init_utils", "init_utils", "init_utils", "init_utils", "t", "i", "path", "k", "i", "_", "depth", "path", "import_pluralize", "pluralize", "s", "schema", "_", "options", "schema", "t", "resolve", "path", "type", "options", "p", "type", "options", "key", "schema", "rules", "preprocessors", "init_oas2", "Assertions", "schema", "options", "BooleanParameterPrefixes", "init_boolean_parameter_prefixes", "options", "p", "schema", "options", "type", "resolve", "_", "v", "init_utils", "context", "resolve", "location", "e", "type", "resolve", "_", "schema", "schema", "init_utils", "_", "schema", "RequestMimeType", "init_request_mime_type", "ResponseContainsProperty", "init_response_contains_property", "options", "key", "schema", "ResponseMimeType", "init_response_mime_type", "init_utils", "schema", "s", "t", "p", "rules", "preprocessors", "init_oas3", "init_boolean_parameter_prefixes", "init_request_mime_type", "init_response_contains_property", "init_response_mime_type", "Assertions", "BooleanParameterPrefixes", "RequestMimeType", "ResponseMimeType", "ResponseContainsProperty", "NoUnusedComponents", "init_no_unused_components", "type", "resolve", "_", "schema", "resolve", "resolve", "rules", "preprocessors", "init_openrpc", "init_no_unused_components", "Assertions", "NoUnusedComponents", "rules", "preprocessors", "init_overlay1", "Assertions", "init_arazzo", "init_oas2", "init_oas3", "init_openrpc", "init_async2", "init_async3", "init_overlay1", "rules", "preprocessors", "decorators", "resolve", "fs", "path", "e", "type", "i", "_", "document", "resolvedRef", "refId", "error", "init_js_yaml", "safeLoad", "types", "v", "a", "b", "to", "type", "ruleConf", "stack", "name", "context", "k", "rules", "init_utils", "path", "init_utils", "p", "init_visitors", "document", "type", "resolve", "node", "error", "context", "opts", "ctx", "i", "k", "resolvedNode", "location", "l", "version", "document", "types", "rules", "preprocessors", "decorators", "RemoveUnusedComponents", "init_remove_unused_components", "document", "init_visitors", "context", "fs", "module", "path", "url", "p", "e", "init_utils", "fs", "path", "options", "document", "resolve", "init_config", "init_types", "init_utils", "Kind", "v", "isNothing", "isObject", "toArray", "extend", "repeat", "isNegativeZero", "module", "YAMLException", "_i", "module", "common", "Mark", "snippet", "TYPE_CONSTRUCTOR_OPTIONS", "YAML_NODE_KINDS", "compileStyleAliases", "map", "Type", "options", "require_schema", "common", "compileList", "schema", "type", "compileMap", "Schema", "types", "module", "module", "module", "module", "module", "resolveYamlNull", "constructYamlNull", "isNull", "resolveYamlBoolean", "constructYamlBoolean", "isBoolean", "module", "module", "common", "isHexCode", "c", "isOctCode", "isDecCode", "resolveYamlInteger", "constructYamlInteger", "v", "isInteger", "module", "common", "YAML_FLOAT_PATTERN", "resolveYamlFloat", "constructYamlFloat", "v", "representYamlFloat", "isFloat", "module", "require_core", "module", "module", "YAML_TIMESTAMP_REGEXP", "resolveYamlTimestamp", "match", "constructYamlTimestamp", "representYamlTimestamp", "module", "resolveYamlMerge", "module", "BASE64_MAP", "resolveYamlBinary", "map", "constructYamlBinary", "representYamlBinary", "isBinary", "module", "_hasOwnProperty", "_toString", "resolveYamlOmap", "constructYamlOmap", "module", "_toString", "resolveYamlPairs", "constructYamlPairs", "module", "resolveYamlSet", "constructYamlSet", "module", "schema", "module", "module", "error", "module", "schema", "common", "_hasOwnProperty", "CONTEXT_FLOW_IN", "CONTEXT_FLOW_OUT", "CONTEXT_BLOCK_IN", "CONTEXT_BLOCK_OUT", "CHOMPING_CLIP", "CHOMPING_STRIP", "CHOMPING_KEEP", "PATTERN_NON_PRINTABLE", "PATTERN_NON_ASCII_LINE_BREAKS", "PATTERN_FLOW_INDICATORS", "PATTERN_TAG_HANDLE", "PATTERN_TAG_URI", "is_EOL", "c", "is_WHITE_SPACE", "is_WS_OR_EOL", "is_FLOW_INDICATOR", "fromHexCode", "escapedHexLen", "fromDecimalCode", "simpleEscapeSequence", "charFromCodepoint", "simpleEscapeCheck", "simpleEscapeMap", "i", "State", "options", "generateError", "error", "throwError", "or", "throwWarning", "directiveHandlers", "handleYamlDirective", "match", "handleTagDirective", "captureSegment", "storeMappingPair", "readLineBreak", "skipSeparationSpace", "testDocumentSeparator", "writeFoldedLines", "readPlainScalar", "readSingleQuotedScalar", "readDoubleQuotedScalar", "readFlowCollection", "p", "composeNode", "readBlockScalar", "readBlockSequence", "readBlockMapping", "readTagProperty", "readAnchorProperty", "readAlias", "type", "readDocument", "loadDocuments", "q", "_i", "x", "loadAll", "load", "e", "safeLoadAll", "safeLoad", "module", "common", "_toString", "_hasOwnProperty", "CHAR_TAB", "CHAR_LINE_FEED", "CHAR_CARRIAGE_RETURN", "CHAR_SPACE", "CHAR_EXCLAMATION", "CHAR_DOUBLE_QUOTE", "CHAR_SHARP", "CHAR_PERCENT", "CHAR_AMPERSAND", "CHAR_SINGLE_QUOTE", "CHAR_ASTERISK", "CHAR_COMMA", "CHAR_MINUS", "CHAR_COLON", "CHAR_GREATER_THAN", "CHAR_QUESTION", "CHAR_COMMERCIAL_AT", "CHAR_LEFT_SQUARE_BRACKET", "CHAR_RIGHT_SQUARE_BRACKET", "CHAR_GRAVE_ACCENT", "CHAR_LEFT_CURLY_BRACKET", "CHAR_VERTICAL_LINE", "CHAR_RIGHT_CURLY_BRACKET", "ESCAPE_SEQUENCES", "DEPRECATED_BOOLEANS_SYNTAX", "compileStyleMap", "schema", "map", "type", "encodeHex", "State", "options", "indentString", "generateNextLine", "testImplicitResolving", "str", "er", "writeScalar", "foldLine", "match", "writeFlowSequence", "writeNode", "writeBlockSequence", "writeFlowMapping", "writeBlockMapping", "detectType", "getDuplicateReferences", "inspectNode", "dump", "safeDump", "match", "ScalarType", "float", "__export", "i", "_", "str", "path", "cwd", "version", "a", "b", "i", "p", "color", "s", "v", "k", "toString", "str", "document", "rules", "types", "preprocessors", "redoclyConfigSchemaWithoutTheme", "_", "propertiesWithoutTheme", "rules", "document", "document", "types", "Assertions", "rules", "schema", "init_config", "init_config", "init_js_yaml", "init_error", "fileURLToPath", "posix", "win32", "lstatSync", "readdirCB", "readdirSync", "readlinkSync", "rps", "actualFS", "lstat", "readdir", "readlink", "realpath", "EventEmitter", "Stream", "StringDecoder", "numeric", "str", "escapeBraces", "slashPattern", "escSlash", "openPattern", "escOpen", "closePattern", "escClose", "commaPattern", "escComma", "periodPattern", "escPeriod", "unescapeBraces", "escSlashPattern", "escOpenPattern", "escClosePattern", "escCommaPattern", "escPeriodPattern", "parseCommaParts", "parts", "m", "balanced", "pre", "body", "post", "p", "postParts", "expand", "options", "max", "EXPANSION_MAX", "expand_", "embrace", "isPadded", "el", "lte", "i", "y", "gte", "isTop", "expansions", "k", "expansion", "isNumericSequence", "isAlphaSequence", "isSequence", "isOptions", "n", "N", "x", "width", "incr", "test", "pad", "c", "need", "z", "j", "globStreamSync", "pattern", "Glob", "globStream", "globSync", "glob_", "globIterateSync", "globIterate", "maybeMatch", "range", "assertValidPattern", "posixClasses", "braceEscape", "regexpEscape", "rangesToString", "parseClass", "unescape", "types", "isExtglobType", "startNoTraversal", "startNoDot", "addPatternStart", "justDots", "reSpecials", "regExpEscape", "qmark", "star", "starNoEmpty", "AST", "escape", "minimatch", "starDotExtRE", "starDotExtTest", "starDotExtTestDot", "starDotExtTestNocase", "starDotExtTestNocaseDot", "starDotStarRE", "starDotStarTest", "starDotStarTestDot", "dotStarRE", "dotStarTest", "starRE", "starTest", "starTestDot", "qmarksRE", "qmarksTestNocase", "qmarksTestNocaseDot", "qmarksTestDot", "qmarksTest", "qmarksTestNoExt", "qmarksTestNoExtDot", "defaultPlatform", "path", "sep", "GLOBSTAR", "twoStarDot", "twoStarNoDot", "filter", "ext", "defaults", "braceExpand", "makeRe", "match", "globMagic", "Minimatch", "defaultPerf", "warned", "PROCESS", "emitWarning", "AC", "AS", "shouldWarn", "isPosInt", "getUintArray", "ZeroArray", "Stack", "LRUCache", "proc", "isStream", "isReadable", "isWritable", "EOF", "MAYBE_EMIT_END", "EMITTED_END", "EMITTING_END", "EMITTED_ERROR", "CLOSED", "READ", "FLUSH", "FLUSHCHUNK", "ENCODING", "DECODER", "FLOWING", "PAUSED", "RESUME", "BUFFER", "PIPES", "BUFFERLENGTH", "BUFFERPUSH", "BUFFERSHIFT", "OBJECTMODE", "DESTROYED", "ERROR", "EMITDATA", "EMITEND", "EMITEND2", "ASYNC", "ABORT", "ABORTED", "SIGNAL", "DATALISTENERS", "DISCARDED", "defer", "nodefer", "isEndish", "isArrayBufferLike", "isArrayBufferView", "Pipe", "PipeProxyErrors", "isObjectModeOptions", "isEncodingOptions", "Minipass", "realpathSync", "defaultFS", "fsFromOption", "uncDriveRegexp", "uncToDrive", "eitherSep", "UNKNOWN", "IFIFO", "IFCHR", "IFDIR", "IFBLK", "IFREG", "IFLNK", "IFSOCK", "IFMT", "IFMT_UNKNOWN", "READDIR_CALLED", "LSTAT_CALLED", "ENOTDIR", "ENOENT", "ENOREADLINK", "ENOREALPATH", "ENOCHILD", "TYPEMASK", "entToType", "normalizeCache", "normalize", "normalizeNocaseCache", "normalizeNocase", "ResolveCache", "ChildrenCache", "setAsCwd", "PathBase", "PathWin32", "PathPosix", "PathScurryBase", "PathScurryWin32", "PathScurryPosix", "PathScurryDarwin", "Path", "PathScurry", "isPatternList", "isGlobList", "customInspect", "Pattern", "Ignore", "HasWalkedCache", "MatchRecord", "SubWalks", "Processor", "makeIgnore", "GlobUtil", "GlobWalker", "GlobStream", "hasMagic", "streamSync", "stream", "iterateSync", "iterate", "sync", "glob", "a", "b", "ma", "mb", "r", "reg", "begs", "beg", "left", "right", "result", "ai", "bi", "s", "ranges", "position", "pos", "negs", "sawStart", "uflag", "escaping", "negate", "endPos", "rangeStart", "WHILE", "cls", "unip", "u", "neg", "sranges", "snegs", "windowsPathsNoEscape", "magicalBraces", "_AST", "#root", "#hasMagic", "#uflag", "#parts", "#parent", "#parentIndex", "#negs", "#filledNegs", "#options", "#toString", "#emptyExt", "type", "parent", "#fillNegs", "pp", "part", "ret", "pl", "#parseAST", "ast", "opt", "inBrace", "braceStart", "braceNeg", "acc", "re", "flags", "allowDot", "dot", "noEmpty", "src", "_", "#parseGlob", "start", "aps", "needNoTrav", "needNoDot", "end", "repeated", "#partsToRegExp", "bodyDotAllowed", "final", "close", "_hasMagic", "inStar", "needUflag", "consumed", "magic", "f", "$0", "noext", "len", "def", "orig", "list", "mm", "awe", "args", "rawGlobParts", "set", "__", "isUNC", "isDrive", "ss", "globParts", "optimizationLevel", "gs", "prev", "didSomething", "dd", "gss", "next", "p2", "other", "splin", "matched", "emptyGSMatch", "which", "negateOffset", "file", "partial", "fileDrive", "fileUNC", "patternDrive", "patternUNC", "fdi", "pdi", "fd", "pd", "fi", "pi", "fl", "fr", "pr", "swallowee", "hit", "fastTest", "twoStar", "filtered", "prefixes", "open", "ff", "filename", "msg", "code", "fn", "warnACPolyfill", "reason", "printACPolyfillWarning", "size", "_Stack", "#constructing", "HeapCls", "_LRUCache", "#max", "#maxSize", "#dispose", "#onInsert", "#disposeAfter", "#fetchMethod", "#memoMethod", "#perf", "#size", "#calculatedSize", "#keyMap", "#keyList", "#valList", "#next", "#prev", "#head", "#tail", "#free", "#disposed", "#sizes", "#starts", "#ttls", "#autopurgeTimers", "#hasDispose", "#hasFetchMethod", "#hasDisposeAfter", "#hasOnInsert", "#isBackgroundFetch", "index", "context", "#backgroundFetch", "#moveToTail", "#indexes", "#rindexes", "#isStale", "ttl", "ttlResolution", "ttlAutopurge", "updateAgeOnGet", "updateAgeOnHas", "allowStale", "dispose", "onInsert", "disposeAfter", "noDisposeOnSet", "noUpdateTTL", "maxSize", "maxEntrySize", "sizeCalculation", "fetchMethod", "memoMethod", "noDeleteOnFetchRejection", "noDeleteOnStaleGet", "allowStaleOnFetchRejection", "allowStaleOnFetchAbort", "ignoreFetchAbort", "perf", "UintArray", "#initializeSizeTracking", "#initializeTTLTracking", "key", "ttls", "starts", "purgeTimers", "#setItemTTL", "t", "#delete", "#updateItemAge", "#statusTTL", "status", "cachedNow", "getNow", "age", "sizes", "#removeItemSize", "#requireSize", "v", "#addItemSize", "#evict", "_i", "_s", "_st", "_k", "_v", "#isValidIndex", "getOptions", "value", "thisp", "deleted", "entry", "remain", "arr", "setOptions", "oldVal", "oldValue", "dt", "task", "val", "free", "head", "hasOptions", "peekOptions", "ac", "signal", "fetchOpts", "cb", "updateCache", "aborted", "ignoreAbort", "proceed", "fetchFail", "bf", "vl", "eb", "er", "allowStaleAborted", "noDelete", "pcall", "res", "rej", "fmp", "fetchOptions", "forceRefresh", "stale", "isStale", "staleVal", "memoOptions", "vv", "fetching", "#connect", "#clear", "ni", "ev", "dest", "opts", "_er", "o", "_enc", "_om", "chunk", "encoding", "noDrain", "ended", "handler", "h", "data", "buf", "resolve", "reject", "stopped", "stop", "onerr", "ondata", "onend", "ondestroy", "wc", "fsOption", "rootPath", "L", "#fs", "#dev", "#mode", "#nlink", "#uid", "#gid", "#rdev", "#blksize", "#ino", "#blocks", "#atimeMs", "#mtimeMs", "#ctimeMs", "#birthtimeMs", "#atime", "#mtime", "#ctime", "#birthtime", "#matchName", "#depth", "#fullpath", "#fullpathPosix", "#relative", "#relativePosix", "#type", "#children", "#linkTarget", "#realpath", "name", "root", "roots", "nocase", "children", "dirParts", "#resolveParts", "cached", "pathPart", "fullpath", "pchild", "pv", "fp", "pfpp", "fpp", "ifmt", "target", "read", "linkTarget", "#readlinkFail", "#readdirSuccess", "#markENOENT", "#markChildrenENOENT", "#markENOREALPATH", "#markENOTDIR", "#readdirFail", "#lstatFail", "ter", "#readdirAddChild", "e", "#readdirMaybePromoteChild", "#readdirAddNewChild", "child", "#readdirPromoteChild", "#applyStat", "st", "atime", "atimeMs", "birthtime", "birthtimeMs", "blksize", "blocks", "ctime", "ctimeMs", "dev", "gid", "ino", "mode", "mtime", "mtimeMs", "nlink", "rdev", "uid", "#onReaddirCB", "#readdirCBInFlight", "#callOnReaddirCB", "cbs", "allowZalgo", "entries", "#asyncReaddirInFlight", "dirs", "walkFilter", "rp", "oldCwd", "changed", "_PathWin32", "compare", "_PathPosix", "_rootPath", "#resolveCache", "#resolvePosixCache", "cwd", "pathImpl", "childrenCacheSize", "fs", "cwdPath", "split", "joinSep", "abs", "sawFirst", "l", "paths", "withFileTypes", "follow", "results", "walk", "dir", "queue", "processing", "process", "paused", "onReaddir", "didRealpaths", "promises", "_dir", "gl", "_Pattern", "#patternList", "#globList", "#index", "#platform", "#rest", "#globString", "#isDrive", "#isUNC", "#isAbsolute", "#followGlobstar", "patternList", "globList", "platform", "p0", "p1", "p3", "prest", "g0", "g1", "g2", "g3", "grest", "g", "ignored", "nobrace", "noglobstar", "ign", "parsed", "absolute", "fullpaths", "relative", "relatives", "_HasWalkedCache", "store", "ifDir", "current", "subs", "_Processor", "hasWalkedCache", "patterns", "processingSet", "rest", "rrest", "tp", "ep", "ignore", "#onResume", "#ignore", "#sep", "#ignored", "#childrenIgnored", "rpc", "mark", "rel", "processor", "tasks", "childrenCached", "Scurry", "nocaseMagicOnly", "mmo", "mms", "matchSet", "init_lint", "init_error", "init_types", "process", "performance", "s", "init_lint", "init_types", "init_error", "init_constants", "module", "s", "w", "y", "options", "type", "str", "match", "n", "ms", "require_common", "module", "env", "enabled", "i", "ms", "match", "extend", "v", "ns", "module", "load", "c", "match", "error", "r", "v", "module", "module", "os", "tty", "env", "version", "module", "tty", "init", "load", "error", "_", "k", "useColors", "c", "i", "v", "str", "require_src", "module", "json", "str", "url", "req", "resolve", "Agent", "options", "l", "v", "resolve", "b", "options", "HttpsProxyAgent", "omit", "s", "url", "s", "url", "options", "init_constants", "url", "options", "a", "b", "url", "process", "init_utils", "error", "init_utils", "init_error", "url", "init_utils", "fs", "path", "init_error", "init_utils", "core", "core", "github", "path", "load", "path", "handlePush", "handlePushStatus", "error"]
+}
diff --git a/dist/licenses.txt b/dist/licenses.txt
deleted file mode 100644
index f53608f..0000000
--- a/dist/licenses.txt
+++ /dev/null
@@ -1,4054 +0,0 @@
-@actions/core
-MIT
-The MIT License (MIT)
-
-Copyright 2019 GitHub
-
-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.
-
-@actions/exec
-MIT
-The MIT License (MIT)
-
-Copyright 2019 GitHub
-
-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.
-
-@actions/github
-MIT
-The MIT License (MIT)
-
-Copyright 2019 GitHub
-
-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.
-
-@actions/http-client
-MIT
-Actions Http Client for Node.js
-
-Copyright (c) GitHub, Inc.
-
-All rights reserved.
-
-MIT License
-
-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.
-
-
-@actions/io
-MIT
-The MIT License (MIT)
-
-Copyright 2019 GitHub
-
-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.
-
-@octokit/auth-token
-MIT
-The MIT License
-
-Copyright (c) 2019 Octokit 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.
-
-
-@octokit/core
-MIT
-The MIT License
-
-Copyright (c) 2019 Octokit 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.
-
-
-@octokit/endpoint
-MIT
-The MIT License
-
-Copyright (c) 2018 Octokit 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.
-
-
-@octokit/graphql
-MIT
-The MIT License
-
-Copyright (c) 2018 Octokit 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.
-
-
-@octokit/plugin-paginate-rest
-MIT
-MIT License Copyright (c) 2019 Octokit 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 (including the next paragraph) 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.
-
-
-@octokit/plugin-rest-endpoint-methods
-MIT
-MIT License Copyright (c) 2019 Octokit 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 (including the next paragraph) 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.
-
-
-@octokit/request
-MIT
-The MIT License
-
-Copyright (c) 2018 Octokit 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.
-
-
-@octokit/request-error
-MIT
-The MIT License
-
-Copyright (c) 2019 Octokit 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.
-
-
-@opentelemetry/api
-Apache-2.0
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-@opentelemetry/context-async-hooks
-Apache-2.0
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-@opentelemetry/core
-Apache-2.0
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-@opentelemetry/exporter-trace-otlp-http
-Apache-2.0
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-@opentelemetry/otlp-exporter-base
-Apache-2.0
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-@opentelemetry/otlp-transformer
-Apache-2.0
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-@opentelemetry/propagator-b3
-Apache-2.0
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-@opentelemetry/propagator-jaeger
-Apache-2.0
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-@opentelemetry/resources
-Apache-2.0
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-@opentelemetry/sdk-metrics
-Apache-2.0
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-@opentelemetry/sdk-trace-base
-Apache-2.0
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-@opentelemetry/sdk-trace-node
-Apache-2.0
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-@opentelemetry/semantic-conventions
-Apache-2.0
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-@protobufjs/aspromise
-BSD-3-Clause
-Copyright (c) 2016, Daniel Wirtz  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright
-  notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright
-  notice, this list of conditions and the following disclaimer in the
-  documentation and/or other materials provided with the distribution.
-* Neither the name of its author, nor the names of its contributors
-  may be used to endorse or promote products derived from this software
-  without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-@protobufjs/base64
-BSD-3-Clause
-Copyright (c) 2016, Daniel Wirtz  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright
-  notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright
-  notice, this list of conditions and the following disclaimer in the
-  documentation and/or other materials provided with the distribution.
-* Neither the name of its author, nor the names of its contributors
-  may be used to endorse or promote products derived from this software
-  without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-@protobufjs/eventemitter
-BSD-3-Clause
-Copyright (c) 2016, Daniel Wirtz  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright
-  notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright
-  notice, this list of conditions and the following disclaimer in the
-  documentation and/or other materials provided with the distribution.
-* Neither the name of its author, nor the names of its contributors
-  may be used to endorse or promote products derived from this software
-  without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-@protobufjs/float
-BSD-3-Clause
-Copyright (c) 2016, Daniel Wirtz  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright
-  notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright
-  notice, this list of conditions and the following disclaimer in the
-  documentation and/or other materials provided with the distribution.
-* Neither the name of its author, nor the names of its contributors
-  may be used to endorse or promote products derived from this software
-  without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-@protobufjs/inquire
-BSD-3-Clause
-Copyright (c) 2016, Daniel Wirtz  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright
-  notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright
-  notice, this list of conditions and the following disclaimer in the
-  documentation and/or other materials provided with the distribution.
-* Neither the name of its author, nor the names of its contributors
-  may be used to endorse or promote products derived from this software
-  without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-@protobufjs/pool
-BSD-3-Clause
-Copyright (c) 2016, Daniel Wirtz  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright
-  notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright
-  notice, this list of conditions and the following disclaimer in the
-  documentation and/or other materials provided with the distribution.
-* Neither the name of its author, nor the names of its contributors
-  may be used to endorse or promote products derived from this software
-  without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-@protobufjs/utf8
-BSD-3-Clause
-Copyright (c) 2016, Daniel Wirtz  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright
-  notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright
-  notice, this list of conditions and the following disclaimer in the
-  documentation and/or other materials provided with the distribution.
-* Neither the name of its author, nor the names of its contributors
-  may be used to endorse or promote products derived from this software
-  without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-@redocly/ajv
-MIT
-The MIT License (MIT)
-
-Copyright (c) 2015-2021 Evgeny Poberezkin
-
-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.
-
-
-
-@redocly/cli
-MIT
-
-@redocly/config
-MIT
-Copyright 2024 Redocly Inc.
-
-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.
-
-
-@redocly/openapi-core
-MIT
-
-agent-base
-MIT
-(The MIT License)
-
-Copyright (c) 2013 Nathan Rajlich 
-
-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.
-
-balanced-match
-MIT
-(MIT)
-
-Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.
-
-
-before-after-hook
-Apache-2.0
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "{}"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright 2018 Gregor Martynus and other contributors.
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-brace-expansion
-MIT
-MIT License
-
-Copyright (c) 2013 Julian Gruber 
-
-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.
-
-
-colorette
-MIT
-Copyright © Jorge Bucaran <>
-
-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.
-
-
-concat-map
-MIT
-This software is released under the MIT license:
-
-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.
-
-
-debug
-MIT
-(The MIT License)
-
-Copyright (c) 2014-2017 TJ Holowaychuk 
-Copyright (c) 2018-2021 Josh Junon
-
-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.
-
-
-
-deprecation
-ISC
-The ISC License
-
-Copyright (c) Gregor Martynus and contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
-fast-deep-equal
-MIT
-MIT License
-
-Copyright (c) 2017 Evgeny Poberezkin
-
-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.
-
-
-fs.realpath
-ISC
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-----
-
-This library bundles a version of the `fs.realpath` and `fs.realpathSync`
-methods from Node.js v0.10 under the terms of the Node.js MIT license.
-
-Node's license follows, also included at the header of `old.js` which contains
-the licensed code:
-
-  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.
-
-
-glob
-ISC
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-## Glob Logo
-
-Glob's logo created by Tanya Brassie , licensed
-under a Creative Commons Attribution-ShareAlike 4.0 International License
-https://creativecommons.org/licenses/by-sa/4.0/
-
-
-has-flag
-MIT
-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.
-
-
-https-proxy-agent
-MIT
-(The MIT License)
-
-Copyright (c) 2013 Nathan Rajlich 
-
-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.
-
-inflight
-ISC
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
-inherits
-ISC
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
-
-
-js-levenshtein
-MIT
-MIT License
-
-Copyright (c) 2017 Gustaf Andersson
-
-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.
-
-
-js-yaml
-MIT
-(The MIT License)
-
-Copyright (C) 2011-2015 by Vitaly Puzrin
-
-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.
-
-
-json-schema-traverse
-MIT
-MIT License
-
-Copyright (c) 2017 Evgeny Poberezkin
-
-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.
-
-
-minimatch
-ISC
-The ISC License
-
-Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
-ms
-MIT
-The MIT License (MIT)
-
-Copyright (c) 2016 Zeit, Inc.
-
-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.
-
-
-once
-ISC
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
-path-is-absolute
-MIT
-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.
-
-
-pluralize
-MIT
-The MIT License (MIT)
-
-Copyright (c) 2013 Blake Embrey (hello@blakeembrey.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.
-
-
-protobufjs
-BSD-3-Clause
-This license applies to all parts of protobuf.js except those files
-either explicitly including or referencing a different license or
-located in a directory containing a different LICENSE file.
-
----
-
-Copyright (c) 2016, Daniel Wirtz  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright
-  notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright
-  notice, this list of conditions and the following disclaimer in the
-  documentation and/or other materials provided with the distribution.
-* Neither the name of its author, nor the names of its contributors
-  may be used to endorse or promote products derived from this software
-  without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
----
-
-Code generated by the command line utilities is owned by the owner
-of the input file used when generating it. This code is not
-standalone and requires a support library to be linked with it. This
-support library is itself covered by the above license.
-
-
-semver
-ISC
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
-supports-color
-MIT
-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.
-
-
-tunnel
-MIT
-The MIT License (MIT)
-
-Copyright (c) 2012 Koichi Kobayashi
-
-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.
-
-
-undici
-MIT
-MIT License
-
-Copyright (c) Matteo Collina and Undici 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.
-
-
-universal-user-agent
-ISC
-# [ISC License](https://spdx.org/licenses/ISC)
-
-Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m)
-
-Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
-uri-js-replace
-MIT
-
-wrappy
-ISC
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-
-yaml-ast-parser
-Apache-2.0
-Copyright 2015 (c) MuleSoft, Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
-either express or implied. See the License for the specific
-language governing permissions and limitations under the License.
diff --git a/dist/sourcemap-register.js b/dist/sourcemap-register.js
deleted file mode 100644
index 466141d..0000000
--- a/dist/sourcemap-register.js
+++ /dev/null
@@ -1 +0,0 @@
-(()=>{var e={650:e=>{var r=Object.prototype.toString;var n=typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function isArrayBuffer(e){return r.call(e).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(e,r,t){r>>>=0;var o=e.byteLength-r;if(o<0){throw new RangeError("'offset' is out of bounds")}if(t===undefined){t=o}else{t>>>=0;if(t>o){throw new RangeError("'length' is out of bounds")}}return n?Buffer.from(e.slice(r,r+t)):new Buffer(new Uint8Array(e.slice(r,r+t)))}function fromString(e,r){if(typeof r!=="string"||r===""){r="utf8"}if(!Buffer.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}return n?Buffer.from(e,r):new Buffer(e,r)}function bufferFrom(e,r,t){if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){return fromArrayBuffer(e,r,t)}if(typeof e==="string"){return fromString(e,r)}return n?Buffer.from(e):new Buffer(e)}e.exports=bufferFrom},274:(e,r,n)=>{var t=n(339);var o=Object.prototype.hasOwnProperty;var i=typeof Map!=="undefined";function ArraySet(){this._array=[];this._set=i?new Map:Object.create(null)}ArraySet.fromArray=function ArraySet_fromArray(e,r){var n=new ArraySet;for(var t=0,o=e.length;t=0){return r}}else{var n=t.toSetString(e);if(o.call(this._set,n)){return this._set[n]}}throw new Error('"'+e+'" is not in the set.')};ArraySet.prototype.at=function ArraySet_at(e){if(e>=0&&e{var t=n(190);var o=5;var i=1<>1;return r?-n:n}r.encode=function base64VLQ_encode(e){var r="";var n;var i=toVLQSigned(e);do{n=i&a;i>>>=o;if(i>0){n|=u}r+=t.encode(n)}while(i>0);return r};r.decode=function base64VLQ_decode(e,r,n){var i=e.length;var s=0;var l=0;var c,p;do{if(r>=i){throw new Error("Expected more digits in base 64 VLQ value.")}p=t.decode(e.charCodeAt(r++));if(p===-1){throw new Error("Invalid base64 digit: "+e.charAt(r-1))}c=!!(p&u);p&=a;s=s+(p<{var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e{r.GREATEST_LOWER_BOUND=1;r.LEAST_UPPER_BOUND=2;function recursiveSearch(e,n,t,o,i,a){var u=Math.floor((n-e)/2)+e;var s=i(t,o[u],true);if(s===0){return u}else if(s>0){if(n-u>1){return recursiveSearch(u,n,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){return n1){return recursiveSearch(e,u,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){return u}else{return e<0?-1:e}}}r.search=function search(e,n,t,o){if(n.length===0){return-1}var i=recursiveSearch(-1,n.length,e,n,t,o||r.GREATEST_LOWER_BOUND);if(i<0){return-1}while(i-1>=0){if(t(n[i],n[i-1],true)!==0){break}--i}return i}},680:(e,r,n)=>{var t=n(339);function generatedPositionAfter(e,r){var n=e.generatedLine;var o=r.generatedLine;var i=e.generatedColumn;var a=r.generatedColumn;return o>n||o==n&&a>=i||t.compareByGeneratedPositionsInflated(e,r)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(e,r){this._array.forEach(e,r)};MappingList.prototype.add=function MappingList_add(e){if(generatedPositionAfter(this._last,e)){this._last=e;this._array.push(e)}else{this._sorted=false;this._array.push(e)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(t.compareByGeneratedPositionsInflated);this._sorted=true}return this._array};r.H=MappingList},758:(e,r)=>{function swap(e,r,n){var t=e[r];e[r]=e[n];e[n]=t}function randomIntInRange(e,r){return Math.round(e+Math.random()*(r-e))}function doQuickSort(e,r,n,t){if(n{var t;var o=n(339);var i=n(345);var a=n(274).I;var u=n(449);var s=n(758).U;function SourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}return n.sections!=null?new IndexedSourceMapConsumer(n,r):new BasicSourceMapConsumer(n,r)}SourceMapConsumer.fromSourceMap=function(e,r){return BasicSourceMapConsumer.fromSourceMap(e,r)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){if(!this.__generatedMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){if(!this.__originalMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._charIsMappingSeparator=function SourceMapConsumer_charIsMappingSeparator(e,r){var n=e.charAt(r);return n===";"||n===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(e,r){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(e,r,n){var t=r||null;var i=n||SourceMapConsumer.GENERATED_ORDER;var a;switch(i){case SourceMapConsumer.GENERATED_ORDER:a=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;a.map((function(e){var r=e.source===null?null:this._sources.at(e.source);r=o.computeSourceURL(u,r,this._sourceMapURL);return{source:r,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}}),this).forEach(e,t)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(e){var r=o.getArg(e,"line");var n={source:o.getArg(e,"source"),originalLine:r,originalColumn:o.getArg(e,"column",0)};n.source=this._findSourceIndex(n.source);if(n.source<0){return[]}var t=[];var a=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(a>=0){var u=this._originalMappings[a];if(e.column===undefined){var s=u.originalLine;while(u&&u.originalLine===s){t.push({line:o.getArg(u,"generatedLine",null),column:o.getArg(u,"generatedColumn",null),lastColumn:o.getArg(u,"lastGeneratedColumn",null)});u=this._originalMappings[++a]}}else{var l=u.originalColumn;while(u&&u.originalLine===r&&u.originalColumn==l){t.push({line:o.getArg(u,"generatedLine",null),column:o.getArg(u,"generatedColumn",null),lastColumn:o.getArg(u,"lastGeneratedColumn",null)});u=this._originalMappings[++a]}}}return t};r.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sources");var u=o.getArg(n,"names",[]);var s=o.getArg(n,"sourceRoot",null);var l=o.getArg(n,"sourcesContent",null);var c=o.getArg(n,"mappings");var p=o.getArg(n,"file",null);if(t!=this._version){throw new Error("Unsupported version: "+t)}if(s){s=o.normalize(s)}i=i.map(String).map(o.normalize).map((function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}));this._names=a.fromArray(u.map(String),true);this._sources=a.fromArray(i,true);this._absoluteSources=this._sources.toArray().map((function(e){return o.computeSourceURL(s,e,r)}));this.sourceRoot=s;this.sourcesContent=l;this._mappings=c;this._sourceMapURL=r;this.file=p}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.prototype._findSourceIndex=function(e){var r=e;if(this.sourceRoot!=null){r=o.relative(this.sourceRoot,r)}if(this._sources.has(r)){return this._sources.indexOf(r)}var n;for(n=0;n1){v.source=l+_[1];l+=_[1];v.originalLine=i+_[2];i=v.originalLine;v.originalLine+=1;v.originalColumn=a+_[3];a=v.originalColumn;if(_.length>4){v.name=c+_[4];c+=_[4]}}m.push(v);if(typeof v.originalLine==="number"){d.push(v)}}}s(m,o.compareByGeneratedPositionsDeflated);this.__generatedMappings=m;s(d,o.compareByOriginalPositions);this.__originalMappings=d};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(e,r,n,t,o,a){if(e[n]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+e[n])}if(e[t]<0){throw new TypeError("Column must be greater than or equal to 0, got "+e[t])}return i.search(e,r,o,a)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var e=0;e=0){var t=this._generatedMappings[n];if(t.generatedLine===r.generatedLine){var i=o.getArg(t,"source",null);if(i!==null){i=this._sources.at(i);i=o.computeSourceURL(this.sourceRoot,i,this._sourceMapURL)}var a=o.getArg(t,"name",null);if(a!==null){a=this._names.at(a)}return{source:i,line:o.getArg(t,"originalLine",null),column:o.getArg(t,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.hasContentsOfAllSources=function BasicSourceMapConsumer_hasContentsOfAllSources(){if(!this.sourcesContent){return false}return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return e==null}))};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(e,r){if(!this.sourcesContent){return null}var n=this._findSourceIndex(e);if(n>=0){return this.sourcesContent[n]}var t=e;if(this.sourceRoot!=null){t=o.relative(this.sourceRoot,t)}var i;if(this.sourceRoot!=null&&(i=o.urlParse(this.sourceRoot))){var a=t.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(a)){return this.sourcesContent[this._sources.indexOf(a)]}if((!i.path||i.path=="/")&&this._sources.has("/"+t)){return this.sourcesContent[this._sources.indexOf("/"+t)]}}if(r){return null}else{throw new Error('"'+t+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(e){var r=o.getArg(e,"source");r=this._findSourceIndex(r);if(r<0){return{line:null,column:null,lastColumn:null}}var n={source:r,originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")};var t=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(t>=0){var i=this._originalMappings[t];if(i.source===n.source){return{line:o.getArg(i,"generatedLine",null),column:o.getArg(i,"generatedColumn",null),lastColumn:o.getArg(i,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};t=BasicSourceMapConsumer;function IndexedSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sections");if(t!=this._version){throw new Error("Unsupported version: "+t)}this._sources=new a;this._names=new a;var u={line:-1,column:0};this._sections=i.map((function(e){if(e.url){throw new Error("Support for url field in sections not implemented.")}var n=o.getArg(e,"offset");var t=o.getArg(n,"line");var i=o.getArg(n,"column");if(t{var t=n(449);var o=n(339);var i=n(274).I;var a=n(680).H;function SourceMapGenerator(e){if(!e){e={}}this._file=o.getArg(e,"file",null);this._sourceRoot=o.getArg(e,"sourceRoot",null);this._skipValidation=o.getArg(e,"skipValidation",false);this._sources=new i;this._names=new i;this._mappings=new a;this._sourcesContents=null}SourceMapGenerator.prototype._version=3;SourceMapGenerator.fromSourceMap=function SourceMapGenerator_fromSourceMap(e){var r=e.sourceRoot;var n=new SourceMapGenerator({file:e.file,sourceRoot:r});e.eachMapping((function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};if(e.source!=null){t.source=e.source;if(r!=null){t.source=o.relative(r,t.source)}t.original={line:e.originalLine,column:e.originalColumn};if(e.name!=null){t.name=e.name}}n.addMapping(t)}));e.sources.forEach((function(t){var i=t;if(r!==null){i=o.relative(r,t)}if(!n._sources.has(i)){n._sources.add(i)}var a=e.sourceContentFor(t);if(a!=null){n.setSourceContent(t,a)}}));return n};SourceMapGenerator.prototype.addMapping=function SourceMapGenerator_addMapping(e){var r=o.getArg(e,"generated");var n=o.getArg(e,"original",null);var t=o.getArg(e,"source",null);var i=o.getArg(e,"name",null);if(!this._skipValidation){this._validateMapping(r,n,t,i)}if(t!=null){t=String(t);if(!this._sources.has(t)){this._sources.add(t)}}if(i!=null){i=String(i);if(!this._names.has(i)){this._names.add(i)}}this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:t,name:i})};SourceMapGenerator.prototype.setSourceContent=function SourceMapGenerator_setSourceContent(e,r){var n=e;if(this._sourceRoot!=null){n=o.relative(this._sourceRoot,n)}if(r!=null){if(!this._sourcesContents){this._sourcesContents=Object.create(null)}this._sourcesContents[o.toSetString(n)]=r}else if(this._sourcesContents){delete this._sourcesContents[o.toSetString(n)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}};SourceMapGenerator.prototype.applySourceMap=function SourceMapGenerator_applySourceMap(e,r,n){var t=r;if(r==null){if(e.file==null){throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, "+'or the source map\'s "file" property. Both were omitted.')}t=e.file}var a=this._sourceRoot;if(a!=null){t=o.relative(a,t)}var u=new i;var s=new i;this._mappings.unsortedForEach((function(r){if(r.source===t&&r.originalLine!=null){var i=e.originalPositionFor({line:r.originalLine,column:r.originalColumn});if(i.source!=null){r.source=i.source;if(n!=null){r.source=o.join(n,r.source)}if(a!=null){r.source=o.relative(a,r.source)}r.originalLine=i.line;r.originalColumn=i.column;if(i.name!=null){r.name=i.name}}}var l=r.source;if(l!=null&&!u.has(l)){u.add(l)}var c=r.name;if(c!=null&&!s.has(c)){s.add(c)}}),this);this._sources=u;this._names=s;e.sources.forEach((function(r){var t=e.sourceContentFor(r);if(t!=null){if(n!=null){r=o.join(n,r)}if(a!=null){r=o.relative(a,r)}this.setSourceContent(r,t)}}),this)};SourceMapGenerator.prototype._validateMapping=function SourceMapGenerator_validateMapping(e,r,n,t){if(r&&typeof r.line!=="number"&&typeof r.column!=="number"){throw new Error("original.line and original.column are not numbers -- you probably meant to omit "+"the original mapping entirely and only map the generated position. If so, pass "+"null for the original mapping instead of an object with empty or null values.")}if(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!t){return}else if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:t}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var e=0;var r=1;var n=0;var i=0;var a=0;var u=0;var s="";var l;var c;var p;var f;var g=this._mappings.toArray();for(var h=0,d=g.length;h0){if(!o.compareByGeneratedPositionsInflated(c,g[h-1])){continue}l+=","}}l+=t.encode(c.generatedColumn-e);e=c.generatedColumn;if(c.source!=null){f=this._sources.indexOf(c.source);l+=t.encode(f-u);u=f;l+=t.encode(c.originalLine-1-i);i=c.originalLine-1;l+=t.encode(c.originalColumn-n);n=c.originalColumn;if(c.name!=null){p=this._names.indexOf(c.name);l+=t.encode(p-a);a=p}}s+=l}return s};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(e,r){return e.map((function(e){if(!this._sourcesContents){return null}if(r!=null){e=o.relative(r,e)}var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){e.file=this._file}if(this._sourceRoot!=null){e.sourceRoot=this._sourceRoot}if(this._sourcesContents){e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)}return e};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};r.h=SourceMapGenerator},351:(e,r,n)=>{var t;var o=n(591).h;var i=n(339);var a=/(\r?\n)/;var u=10;var s="$$$isSourceNode$$$";function SourceNode(e,r,n,t,o){this.children=[];this.sourceContents={};this.line=e==null?null:e;this.column=r==null?null:r;this.source=n==null?null:n;this.name=o==null?null:o;this[s]=true;if(t!=null)this.add(t)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(e,r,n){var t=new SourceNode;var o=e.split(a);var u=0;var shiftNextLine=function(){var e=getNextLine();var r=getNextLine()||"";return e+r;function getNextLine(){return u=0;r--){this.prepend(e[r])}}else if(e[s]||typeof e==="string"){this.children.unshift(e)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e)}return this};SourceNode.prototype.walk=function SourceNode_walk(e){var r;for(var n=0,t=this.children.length;n0){r=[];for(n=0;n{function getArg(e,r,n){if(r in e){return e[r]}else if(arguments.length===3){return n}else{throw new Error('"'+r+'" is a required argument.')}}r.getArg=getArg;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;var t=/^data:.+\,.+$/;function urlParse(e){var r=e.match(n);if(!r){return null}return{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}}r.urlParse=urlParse;function urlGenerate(e){var r="";if(e.scheme){r+=e.scheme+":"}r+="//";if(e.auth){r+=e.auth+"@"}if(e.host){r+=e.host}if(e.port){r+=":"+e.port}if(e.path){r+=e.path}return r}r.urlGenerate=urlGenerate;function normalize(e){var n=e;var t=urlParse(e);if(t){if(!t.path){return e}n=t.path}var o=r.isAbsolute(n);var i=n.split(/\/+/);for(var a,u=0,s=i.length-1;s>=0;s--){a=i[s];if(a==="."){i.splice(s,1)}else if(a===".."){u++}else if(u>0){if(a===""){i.splice(s+1,u);u=0}else{i.splice(s,2);u--}}}n=i.join("/");if(n===""){n=o?"/":"."}if(t){t.path=n;return urlGenerate(t)}return n}r.normalize=normalize;function join(e,r){if(e===""){e="."}if(r===""){r="."}var n=urlParse(r);var o=urlParse(e);if(o){e=o.path||"/"}if(n&&!n.scheme){if(o){n.scheme=o.scheme}return urlGenerate(n)}if(n||r.match(t)){return r}if(o&&!o.host&&!o.path){o.host=r;return urlGenerate(o)}var i=r.charAt(0)==="/"?r:normalize(e.replace(/\/+$/,"")+"/"+r);if(o){o.path=i;return urlGenerate(o)}return i}r.join=join;r.isAbsolute=function(e){return e.charAt(0)==="/"||n.test(e)};function relative(e,r){if(e===""){e="."}e=e.replace(/\/$/,"");var n=0;while(r.indexOf(e+"/")!==0){var t=e.lastIndexOf("/");if(t<0){return r}e=e.slice(0,t);if(e.match(/^([^\/]+:\/)?\/*$/)){return r}++n}return Array(n+1).join("../")+r.substr(e.length+1)}r.relative=relative;var o=function(){var e=Object.create(null);return!("__proto__"in e)}();function identity(e){return e}function toSetString(e){if(isProtoString(e)){return"$"+e}return e}r.toSetString=o?identity:toSetString;function fromSetString(e){if(isProtoString(e)){return e.slice(1)}return e}r.fromSetString=o?identity:fromSetString;function isProtoString(e){if(!e){return false}var r=e.length;if(r<9){return false}if(e.charCodeAt(r-1)!==95||e.charCodeAt(r-2)!==95||e.charCodeAt(r-3)!==111||e.charCodeAt(r-4)!==116||e.charCodeAt(r-5)!==111||e.charCodeAt(r-6)!==114||e.charCodeAt(r-7)!==112||e.charCodeAt(r-8)!==95||e.charCodeAt(r-9)!==95){return false}for(var n=r-10;n>=0;n--){if(e.charCodeAt(n)!==36){return false}}return true}function compareByOriginalPositions(e,r,n){var t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0||n){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0){return t}t=e.generatedLine-r.generatedLine;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByOriginalPositions=compareByOriginalPositions;function compareByGeneratedPositionsDeflated(e,r,n){var t=e.generatedLine-r.generatedLine;if(t!==0){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0||n){return t}t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsDeflated=compareByGeneratedPositionsDeflated;function strcmp(e,r){if(e===r){return 0}if(e===null){return 1}if(r===null){return-1}if(e>r){return 1}return-1}function compareByGeneratedPositionsInflated(e,r){var n=e.generatedLine-r.generatedLine;if(n!==0){return n}n=e.generatedColumn-r.generatedColumn;if(n!==0){return n}n=strcmp(e.source,r.source);if(n!==0){return n}n=e.originalLine-r.originalLine;if(n!==0){return n}n=e.originalColumn-r.originalColumn;if(n!==0){return n}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsInflated=compareByGeneratedPositionsInflated;function parseSourceMapInput(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}r.parseSourceMapInput=parseSourceMapInput;function computeSourceURL(e,r,n){r=r||"";if(e){if(e[e.length-1]!=="/"&&r[0]!=="/"){e+="/"}r=e+r}if(n){var t=urlParse(n);if(!t){throw new Error("sourceMapURL could not be parsed")}if(t.path){var o=t.path.lastIndexOf("/");if(o>=0){t.path=t.path.substring(0,o+1)}}r=join(urlGenerate(t),r)}return normalize(r)}r.computeSourceURL=computeSourceURL},997:(e,r,n)=>{n(591).h;r.SourceMapConsumer=n(952).SourceMapConsumer;n(351)},284:(e,r,n)=>{e=n.nmd(e);var t=n(997).SourceMapConsumer;var o=n(17);var i;try{i=n(147);if(!i.existsSync||!i.readFileSync){i=null}}catch(e){}var a=n(650);function dynamicRequire(e,r){return e.require(r)}var u=false;var s=false;var l=false;var c="auto";var p={};var f={};var g=/^data:application\/json[^,]+base64,/;var h=[];var d=[];function isInBrowser(){if(c==="browser")return true;if(c==="node")return false;return typeof window!=="undefined"&&typeof XMLHttpRequest==="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function hasGlobalProcessEventEmitter(){return typeof process==="object"&&process!==null&&typeof process.on==="function"}function globalProcessVersion(){if(typeof process==="object"&&process!==null){return process.version}else{return""}}function globalProcessStderr(){if(typeof process==="object"&&process!==null){return process.stderr}}function globalProcessExit(e){if(typeof process==="object"&&process!==null&&typeof process.exit==="function"){return process.exit(e)}}function handlerExec(e){return function(r){for(var n=0;n"}var n=this.getLineNumber();if(n!=null){r+=":"+n;var t=this.getColumnNumber();if(t){r+=":"+t}}}var o="";var i=this.getFunctionName();var a=true;var u=this.isConstructor();var s=!(this.isToplevel()||u);if(s){var l=this.getTypeName();if(l==="[object Object]"){l="null"}var c=this.getMethodName();if(i){if(l&&i.indexOf(l)!=0){o+=l+"."}o+=i;if(c&&i.indexOf("."+c)!=i.length-c.length-1){o+=" [as "+c+"]"}}else{o+=l+"."+(c||"")}}else if(u){o+="new "+(i||"")}else if(i){o+=i}else{o+=r;a=false}if(a){o+=" ("+r+")"}return o}function cloneCallSite(e){var r={};Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(n){r[n]=/^(?:is|get)/.test(n)?function(){return e[n].call(e)}:e[n]}));r.toString=CallSiteToString;return r}function wrapCallSite(e,r){if(r===undefined){r={nextPosition:null,curPosition:null}}if(e.isNative()){r.curPosition=null;return e}var n=e.getFileName()||e.getScriptNameOrSourceURL();if(n){var t=e.getLineNumber();var o=e.getColumnNumber()-1;var i=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;var a=i.test(globalProcessVersion())?0:62;if(t===1&&o>a&&!isInBrowser()&&!e.isEval()){o-=a}var u=mapSourcePosition({source:n,line:t,column:o});r.curPosition=u;e=cloneCallSite(e);var s=e.getFunctionName;e.getFunctionName=function(){if(r.nextPosition==null){return s()}return r.nextPosition.name||s()};e.getFileName=function(){return u.source};e.getLineNumber=function(){return u.line};e.getColumnNumber=function(){return u.column+1};e.getScriptNameOrSourceURL=function(){return u.source};return e}var l=e.isEval()&&e.getEvalOrigin();if(l){l=mapEvalOrigin(l);e=cloneCallSite(e);e.getEvalOrigin=function(){return l};return e}return e}function prepareStackTrace(e,r){if(l){p={};f={}}var n=e.name||"Error";var t=e.message||"";var o=n+": "+t;var i={nextPosition:null,curPosition:null};var a=[];for(var u=r.length-1;u>=0;u--){a.push("\n    at "+wrapCallSite(r[u],i));i.nextPosition=i.curPosition}i.curPosition=i.nextPosition=null;return o+a.reverse().join("")}function getErrorSource(e){var r=/\n    at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(r){var n=r[1];var t=+r[2];var o=+r[3];var a=p[n];if(!a&&i&&i.existsSync(n)){try{a=i.readFileSync(n,"utf8")}catch(e){a=""}}if(a){var u=a.split(/(?:\r\n|\r|\n)/)[t-1];if(u){return n+":"+t+"\n"+u+"\n"+new Array(o).join(" ")+"^"}}}return null}function printErrorAndExit(e){var r=getErrorSource(e);var n=globalProcessStderr();if(n&&n._handle&&n._handle.setBlocking){n._handle.setBlocking(true)}if(r){console.error();console.error(r)}console.error(e.stack);globalProcessExit(1)}function shimEmitUncaughtException(){var e=process.emit;process.emit=function(r){if(r==="uncaughtException"){var n=arguments[1]&&arguments[1].stack;var t=this.listeners(r).length>0;if(n&&!t){return printErrorAndExit(arguments[1])}}return e.apply(this,arguments)}}var S=h.slice(0);var _=d.slice(0);r.wrapCallSite=wrapCallSite;r.getErrorSource=getErrorSource;r.mapSourcePosition=mapSourcePosition;r.retrieveSourceMap=v;r.install=function(r){r=r||{};if(r.environment){c=r.environment;if(["node","browser","auto"].indexOf(c)===-1){throw new Error("environment "+c+" was unknown. Available options are {auto, browser, node}")}}if(r.retrieveFile){if(r.overrideRetrieveFile){h.length=0}h.unshift(r.retrieveFile)}if(r.retrieveSourceMap){if(r.overrideRetrieveSourceMap){d.length=0}d.unshift(r.retrieveSourceMap)}if(r.hookRequire&&!isInBrowser()){var n=dynamicRequire(e,"module");var t=n.prototype._compile;if(!t.__sourceMapSupport){n.prototype._compile=function(e,r){p[r]=e;f[r]=undefined;return t.call(this,e,r)};n.prototype._compile.__sourceMapSupport=true}}if(!l){l="emptyCacheBetweenOperations"in r?r.emptyCacheBetweenOperations:false}if(!u){u=true;Error.prepareStackTrace=prepareStackTrace}if(!s){var o="handleUncaughtExceptions"in r?r.handleUncaughtExceptions:true;try{var i=dynamicRequire(e,"worker_threads");if(i.isMainThread===false){o=false}}catch(e){}if(o&&hasGlobalProcessEventEmitter()){s=true;shimEmitUncaughtException()}}};r.resetRetrieveHandlers=function(){h.length=0;d.length=0;h=S.slice(0);d=_.slice(0);v=handlerExec(d);m=handlerExec(h)}},147:e=>{"use strict";e.exports=require("fs")},17:e=>{"use strict";e.exports=require("path")}};var r={};function __webpack_require__(n){var t=r[n];if(t!==undefined){return t.exports}var o=r[n]={id:n,loaded:false,exports:{}};var i=true;try{e[n](o,o.exports,__webpack_require__);i=false}finally{if(i)delete r[n]}o.loaded=true;return o.exports}(()=>{__webpack_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __webpack_require__!=="undefined")__webpack_require__.ab=__dirname+"/";var n={};(()=>{__webpack_require__(284).install()})();module.exports=n})();
\ No newline at end of file
diff --git a/fake-api-server/fake-api-server.ts b/fake-api-server/fake-api-server.ts
index 622ecba..436a782 100644
--- a/fake-api-server/fake-api-server.ts
+++ b/fake-api-server/fake-api-server.ts
@@ -1,5 +1,5 @@
 import express from 'express';
-import { PushResponse } from '@redocly/cli/lib/reunite/api/types';
+import type { PushResponse } from '@redocly/cli/lib/reunite/api/types.js';
 
 const app = express();
 const port = 3000;
diff --git a/jest.config.json b/jest.config.json
index 954186e..66f1f77 100644
--- a/jest.config.json
+++ b/jest.config.json
@@ -12,6 +12,11 @@
   "coverageReporters": ["json-summary", "text", "lcov"],
   "collectCoverage": true,
   "collectCoverageFrom": ["./src/**"],
+  "coveragePathIgnorePatterns": [
+    "/node_modules/",
+    "src/redocly-cli.ts",
+    "src/redocly-config.ts"
+  ],
   "coverageThreshold": {
     "global": {
       "branches": 50,
diff --git a/package-lock.json b/package-lock.json
index 4f29629..6cb294f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12,19 +12,22 @@
         "@actions/core": "^1.10.1",
         "@actions/github": "^6.0.0",
         "@octokit/rest": "^20.1.0",
-        "@redocly/cli": "1.34.13"
+        "@redocly/cli": "2.31.2",
+        "@redocly/openapi-core": "2.31.2"
       },
       "devDependencies": {
         "@jest/globals": "^29.7.0",
         "@types/express": "^4.17.21",
         "@types/jest": "^29.5.14",
         "@types/node": "^20.12.7",
-        "@typescript-eslint/eslint-plugin": "^7.7.0",
-        "@typescript-eslint/parser": "^7.7.0",
+        "@typescript-eslint/eslint-plugin": "^8.59.4",
+        "@typescript-eslint/parser": "^8.59.4",
         "@vercel/ncc": "^0.38.1",
+        "esbuild": "0.28.0",
         "eslint": "^8.57.0",
-        "eslint-plugin-github": "^4.10.2",
-        "eslint-plugin-jest": "^28.2.0",
+        "eslint-import-resolver-typescript": "^4.4.4",
+        "eslint-plugin-github": "^5.1.8",
+        "eslint-plugin-jest": "^29.15.2",
         "eslint-plugin-jsonc": "^2.15.1",
         "eslint-plugin-prettier": "^5.1.3",
         "express": "^4.21.1",
@@ -38,16 +41,7 @@
         "typescript": "^5.4.5"
       },
       "engines": {
-        "node": ">=20"
-      }
-    },
-    "node_modules/@aashutoshrathi/word-wrap": {
-      "version": "1.2.6",
-      "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",
-      "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==",
-      "dev": true,
-      "engines": {
-        "node": ">=0.10.0"
+        "node": ">=20.19.0"
       }
     },
     "node_modules/@actions/core": {
@@ -70,20 +64,25 @@
       }
     },
     "node_modules/@actions/github": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz",
-      "integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==",
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.1.tgz",
+      "integrity": "sha512-xbZVcaqD4XnQAe35qSQqskb3SqIAfRyLBrHMd/8TuL7hJSz2QtbDwnNM8zWx4zO5l2fnGtseNE3MbEvD7BxVMw==",
+      "license": "MIT",
       "dependencies": {
         "@actions/http-client": "^2.2.0",
         "@octokit/core": "^5.0.1",
-        "@octokit/plugin-paginate-rest": "^9.0.0",
-        "@octokit/plugin-rest-endpoint-methods": "^10.0.0"
+        "@octokit/plugin-paginate-rest": "^9.2.2",
+        "@octokit/plugin-rest-endpoint-methods": "^10.4.0",
+        "@octokit/request": "^8.4.1",
+        "@octokit/request-error": "^5.1.1",
+        "undici": "^5.28.5"
       }
     },
     "node_modules/@actions/http-client": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.0.tgz",
-      "integrity": "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==",
+      "version": "2.2.3",
+      "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz",
+      "integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==",
+      "license": "MIT",
       "dependencies": {
         "tunnel": "^0.0.6",
         "undici": "^5.25.4"
@@ -95,58 +94,47 @@
       "integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==",
       "license": "MIT"
     },
-    "node_modules/@ampproject/remapping": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
-      "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==",
-      "dev": true,
-      "dependencies": {
-        "@jridgewell/gen-mapping": "^0.3.5",
-        "@jridgewell/trace-mapping": "^0.3.24"
-      },
-      "engines": {
-        "node": ">=6.0.0"
-      }
-    },
     "node_modules/@babel/code-frame": {
-      "version": "7.26.2",
-      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz",
-      "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==",
+      "version": "7.29.0",
+      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz",
+      "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==",
       "license": "MIT",
       "dependencies": {
-        "@babel/helper-validator-identifier": "^7.25.9",
+        "@babel/helper-validator-identifier": "^7.28.5",
         "js-tokens": "^4.0.0",
-        "picocolors": "^1.0.0"
+        "picocolors": "^1.1.1"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/compat-data": {
-      "version": "7.23.5",
-      "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz",
-      "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==",
+      "version": "7.29.3",
+      "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.3.tgz",
+      "integrity": "sha512-LIVqM46zQWZhj17qA8wb4nW/ixr2y1Nw+r1etiAWgRM6U1IqP+LNhL1yg440jYZR72jCWcWbLWzIosH+uP1fqg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/core": {
-      "version": "7.24.0",
-      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz",
-      "integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==",
-      "dev": true,
-      "dependencies": {
-        "@ampproject/remapping": "^2.2.0",
-        "@babel/code-frame": "^7.23.5",
-        "@babel/generator": "^7.23.6",
-        "@babel/helper-compilation-targets": "^7.23.6",
-        "@babel/helper-module-transforms": "^7.23.3",
-        "@babel/helpers": "^7.24.0",
-        "@babel/parser": "^7.24.0",
-        "@babel/template": "^7.24.0",
-        "@babel/traverse": "^7.24.0",
-        "@babel/types": "^7.24.0",
+      "version": "7.29.0",
+      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz",
+      "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@babel/code-frame": "^7.29.0",
+        "@babel/generator": "^7.29.0",
+        "@babel/helper-compilation-targets": "^7.28.6",
+        "@babel/helper-module-transforms": "^7.28.6",
+        "@babel/helpers": "^7.28.6",
+        "@babel/parser": "^7.29.0",
+        "@babel/template": "^7.28.6",
+        "@babel/traverse": "^7.29.0",
+        "@babel/types": "^7.29.0",
+        "@jridgewell/remapping": "^2.3.5",
         "convert-source-map": "^2.0.0",
         "debug": "^4.1.0",
         "gensync": "^1.0.0-beta.2",
@@ -166,34 +154,38 @@
       "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
       "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
       "dev": true,
+      "license": "ISC",
       "bin": {
         "semver": "bin/semver.js"
       }
     },
     "node_modules/@babel/generator": {
-      "version": "7.23.6",
-      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz",
-      "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==",
+      "version": "7.29.1",
+      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz",
+      "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@babel/types": "^7.23.6",
-        "@jridgewell/gen-mapping": "^0.3.2",
-        "@jridgewell/trace-mapping": "^0.3.17",
-        "jsesc": "^2.5.1"
+        "@babel/parser": "^7.29.0",
+        "@babel/types": "^7.29.0",
+        "@jridgewell/gen-mapping": "^0.3.12",
+        "@jridgewell/trace-mapping": "^0.3.28",
+        "jsesc": "^3.0.2"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/helper-compilation-targets": {
-      "version": "7.23.6",
-      "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz",
-      "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==",
+      "version": "7.28.6",
+      "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz",
+      "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@babel/compat-data": "^7.23.5",
-        "@babel/helper-validator-option": "^7.23.5",
-        "browserslist": "^4.22.2",
+        "@babel/compat-data": "^7.28.6",
+        "@babel/helper-validator-option": "^7.27.1",
+        "browserslist": "^4.24.0",
         "lru-cache": "^5.1.1",
         "semver": "^6.3.1"
       },
@@ -206,67 +198,45 @@
       "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
       "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
       "dev": true,
+      "license": "ISC",
       "bin": {
         "semver": "bin/semver.js"
       }
     },
-    "node_modules/@babel/helper-environment-visitor": {
-      "version": "7.22.20",
-      "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
-      "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==",
-      "dev": true,
-      "engines": {
-        "node": ">=6.9.0"
-      }
-    },
-    "node_modules/@babel/helper-function-name": {
-      "version": "7.23.0",
-      "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz",
-      "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==",
-      "dev": true,
-      "dependencies": {
-        "@babel/template": "^7.22.15",
-        "@babel/types": "^7.23.0"
-      },
-      "engines": {
-        "node": ">=6.9.0"
-      }
-    },
-    "node_modules/@babel/helper-hoist-variables": {
-      "version": "7.22.5",
-      "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz",
-      "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==",
+    "node_modules/@babel/helper-globals": {
+      "version": "7.28.0",
+      "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz",
+      "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==",
       "dev": true,
-      "dependencies": {
-        "@babel/types": "^7.22.5"
-      },
+      "license": "MIT",
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/helper-module-imports": {
-      "version": "7.22.15",
-      "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz",
-      "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==",
+      "version": "7.28.6",
+      "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz",
+      "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@babel/types": "^7.22.15"
+        "@babel/traverse": "^7.28.6",
+        "@babel/types": "^7.28.6"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/helper-module-transforms": {
-      "version": "7.23.3",
-      "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz",
-      "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==",
+      "version": "7.28.6",
+      "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz",
+      "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@babel/helper-environment-visitor": "^7.22.20",
-        "@babel/helper-module-imports": "^7.22.15",
-        "@babel/helper-simple-access": "^7.22.5",
-        "@babel/helper-split-export-declaration": "^7.22.6",
-        "@babel/helper-validator-identifier": "^7.22.20"
+        "@babel/helper-module-imports": "^7.28.6",
+        "@babel/helper-validator-identifier": "^7.28.5",
+        "@babel/traverse": "^7.28.6"
       },
       "engines": {
         "node": ">=6.9.0"
@@ -276,42 +246,19 @@
       }
     },
     "node_modules/@babel/helper-plugin-utils": {
-      "version": "7.24.0",
-      "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz",
-      "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==",
-      "dev": true,
-      "engines": {
-        "node": ">=6.9.0"
-      }
-    },
-    "node_modules/@babel/helper-simple-access": {
-      "version": "7.22.5",
-      "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz",
-      "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==",
-      "dev": true,
-      "dependencies": {
-        "@babel/types": "^7.22.5"
-      },
-      "engines": {
-        "node": ">=6.9.0"
-      }
-    },
-    "node_modules/@babel/helper-split-export-declaration": {
-      "version": "7.22.6",
-      "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",
-      "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",
+      "version": "7.28.6",
+      "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz",
+      "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==",
       "dev": true,
-      "dependencies": {
-        "@babel/types": "^7.22.5"
-      },
+      "license": "MIT",
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/helper-string-parser": {
-      "version": "7.25.9",
-      "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz",
-      "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==",
+      "version": "7.27.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
+      "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -319,45 +266,46 @@
       }
     },
     "node_modules/@babel/helper-validator-identifier": {
-      "version": "7.25.9",
-      "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz",
-      "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==",
+      "version": "7.28.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",
+      "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",
       "license": "MIT",
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/helper-validator-option": {
-      "version": "7.23.5",
-      "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz",
-      "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==",
+      "version": "7.27.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz",
+      "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/helpers": {
-      "version": "7.27.0",
-      "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.0.tgz",
-      "integrity": "sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==",
+      "version": "7.29.2",
+      "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz",
+      "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/template": "^7.27.0",
-        "@babel/types": "^7.27.0"
+        "@babel/template": "^7.28.6",
+        "@babel/types": "^7.29.0"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/parser": {
-      "version": "7.27.0",
-      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.0.tgz",
-      "integrity": "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==",
+      "version": "7.29.3",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.3.tgz",
+      "integrity": "sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/types": "^7.27.0"
+        "@babel/types": "^7.29.0"
       },
       "bin": {
         "parser": "bin/babel-parser.js"
@@ -371,6 +319,7 @@
       "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz",
       "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/helper-plugin-utils": "^7.8.0"
       },
@@ -383,6 +332,7 @@
       "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz",
       "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/helper-plugin-utils": "^7.8.0"
       },
@@ -395,6 +345,7 @@
       "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz",
       "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/helper-plugin-utils": "^7.12.13"
       },
@@ -402,11 +353,44 @@
         "@babel/core": "^7.0.0-0"
       }
     },
+    "node_modules/@babel/plugin-syntax-class-static-block": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz",
+      "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "engines": {
+        "node": ">=6.9.0"
+      },
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
+      }
+    },
+    "node_modules/@babel/plugin-syntax-import-attributes": {
+      "version": "7.28.6",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.28.6.tgz",
+      "integrity": "sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@babel/helper-plugin-utils": "^7.28.6"
+      },
+      "engines": {
+        "node": ">=6.9.0"
+      },
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
+      }
+    },
     "node_modules/@babel/plugin-syntax-import-meta": {
       "version": "7.10.4",
       "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz",
       "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/helper-plugin-utils": "^7.10.4"
       },
@@ -419,6 +403,7 @@
       "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz",
       "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/helper-plugin-utils": "^7.8.0"
       },
@@ -427,12 +412,13 @@
       }
     },
     "node_modules/@babel/plugin-syntax-jsx": {
-      "version": "7.23.3",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz",
-      "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==",
+      "version": "7.28.6",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz",
+      "integrity": "sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.22.5"
+        "@babel/helper-plugin-utils": "^7.28.6"
       },
       "engines": {
         "node": ">=6.9.0"
@@ -446,6 +432,7 @@
       "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz",
       "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/helper-plugin-utils": "^7.10.4"
       },
@@ -458,6 +445,7 @@
       "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz",
       "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/helper-plugin-utils": "^7.8.0"
       },
@@ -470,6 +458,7 @@
       "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz",
       "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/helper-plugin-utils": "^7.10.4"
       },
@@ -482,6 +471,7 @@
       "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz",
       "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/helper-plugin-utils": "^7.8.0"
       },
@@ -494,6 +484,7 @@
       "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz",
       "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/helper-plugin-utils": "^7.8.0"
       },
@@ -506,6 +497,7 @@
       "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz",
       "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/helper-plugin-utils": "^7.8.0"
       },
@@ -513,11 +505,28 @@
         "@babel/core": "^7.0.0-0"
       }
     },
+    "node_modules/@babel/plugin-syntax-private-property-in-object": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz",
+      "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "engines": {
+        "node": ">=6.9.0"
+      },
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
+      }
+    },
     "node_modules/@babel/plugin-syntax-top-level-await": {
       "version": "7.14.5",
       "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz",
       "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/helper-plugin-utils": "^7.14.5"
       },
@@ -529,12 +538,13 @@
       }
     },
     "node_modules/@babel/plugin-syntax-typescript": {
-      "version": "7.23.3",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz",
-      "integrity": "sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==",
+      "version": "7.28.6",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz",
+      "integrity": "sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.22.5"
+        "@babel/helper-plugin-utils": "^7.28.6"
       },
       "engines": {
         "node": ">=6.9.0"
@@ -544,71 +554,57 @@
       }
     },
     "node_modules/@babel/runtime": {
-      "version": "7.27.0",
-      "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.0.tgz",
-      "integrity": "sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==",
+      "version": "7.29.2",
+      "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.2.tgz",
+      "integrity": "sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==",
       "license": "MIT",
-      "dependencies": {
-        "regenerator-runtime": "^0.14.0"
-      },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/template": {
-      "version": "7.27.0",
-      "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.0.tgz",
-      "integrity": "sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA==",
+      "version": "7.28.6",
+      "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz",
+      "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/code-frame": "^7.26.2",
-        "@babel/parser": "^7.27.0",
-        "@babel/types": "^7.27.0"
+        "@babel/code-frame": "^7.28.6",
+        "@babel/parser": "^7.28.6",
+        "@babel/types": "^7.28.6"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/traverse": {
-      "version": "7.24.0",
-      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz",
-      "integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==",
-      "dev": true,
-      "dependencies": {
-        "@babel/code-frame": "^7.23.5",
-        "@babel/generator": "^7.23.6",
-        "@babel/helper-environment-visitor": "^7.22.20",
-        "@babel/helper-function-name": "^7.23.0",
-        "@babel/helper-hoist-variables": "^7.22.5",
-        "@babel/helper-split-export-declaration": "^7.22.6",
-        "@babel/parser": "^7.24.0",
-        "@babel/types": "^7.24.0",
-        "debug": "^4.3.1",
-        "globals": "^11.1.0"
+      "version": "7.29.0",
+      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz",
+      "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@babel/code-frame": "^7.29.0",
+        "@babel/generator": "^7.29.0",
+        "@babel/helper-globals": "^7.28.0",
+        "@babel/parser": "^7.29.0",
+        "@babel/template": "^7.28.6",
+        "@babel/types": "^7.29.0",
+        "debug": "^4.3.1"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
-    "node_modules/@babel/traverse/node_modules/globals": {
-      "version": "11.12.0",
-      "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
-      "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
-      "dev": true,
-      "engines": {
-        "node": ">=4"
-      }
-    },
     "node_modules/@babel/types": {
-      "version": "7.27.0",
-      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.0.tgz",
-      "integrity": "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==",
+      "version": "7.29.0",
+      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz",
+      "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/helper-string-parser": "^7.25.9",
-        "@babel/helper-validator-identifier": "^7.25.9"
+        "@babel/helper-string-parser": "^7.27.1",
+        "@babel/helper-validator-identifier": "^7.28.5"
       },
       "engines": {
         "node": ">=6.9.0"
@@ -618,13 +614,15 @@
       "version": "0.2.3",
       "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz",
       "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/@cspotcode/source-map-support": {
       "version": "0.8.1",
       "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
       "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jridgewell/trace-mapping": "0.3.9"
       },
@@ -637,11 +635,70 @@
       "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
       "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jridgewell/resolve-uri": "^3.0.3",
         "@jridgewell/sourcemap-codec": "^1.4.10"
       }
     },
+    "node_modules/@emnapi/core": {
+      "version": "1.10.0",
+      "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz",
+      "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==",
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "dependencies": {
+        "@emnapi/wasi-threads": "1.2.1",
+        "tslib": "^2.4.0"
+      }
+    },
+    "node_modules/@emnapi/core/node_modules/tslib": {
+      "version": "2.8.1",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+      "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+      "dev": true,
+      "license": "0BSD",
+      "optional": true
+    },
+    "node_modules/@emnapi/runtime": {
+      "version": "1.10.0",
+      "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz",
+      "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==",
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "dependencies": {
+        "tslib": "^2.4.0"
+      }
+    },
+    "node_modules/@emnapi/runtime/node_modules/tslib": {
+      "version": "2.8.1",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+      "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+      "dev": true,
+      "license": "0BSD",
+      "optional": true
+    },
+    "node_modules/@emnapi/wasi-threads": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz",
+      "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==",
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "dependencies": {
+        "tslib": "^2.4.0"
+      }
+    },
+    "node_modules/@emnapi/wasi-threads/node_modules/tslib": {
+      "version": "2.8.1",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+      "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+      "dev": true,
+      "license": "0BSD",
+      "optional": true
+    },
     "node_modules/@emotion/is-prop-valid": {
       "version": "1.4.0",
       "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.4.0.tgz",
@@ -657,90 +714,608 @@
       "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==",
       "license": "MIT"
     },
-    "node_modules/@emotion/unitless": {
-      "version": "0.10.0",
-      "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.10.0.tgz",
-      "integrity": "sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg==",
-      "license": "MIT"
-    },
-    "node_modules/@eslint-community/eslint-utils": {
-      "version": "4.4.0",
-      "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
-      "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
+    "node_modules/@esbuild/aix-ppc64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.0.tgz",
+      "integrity": "sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA==",
+      "cpu": [
+        "ppc64"
+      ],
       "dev": true,
-      "dependencies": {
-        "eslint-visitor-keys": "^3.3.0"
-      },
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "aix"
+      ],
       "engines": {
-        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
-      },
-      "peerDependencies": {
-        "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
+        "node": ">=18"
       }
     },
-    "node_modules/@eslint-community/regexpp": {
-      "version": "4.10.0",
-      "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz",
-      "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==",
+    "node_modules/@esbuild/android-arm": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.0.tgz",
+      "integrity": "sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ==",
+      "cpu": [
+        "arm"
+      ],
       "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "android"
+      ],
       "engines": {
-        "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
+        "node": ">=18"
       }
     },
-    "node_modules/@eslint/eslintrc": {
-      "version": "2.1.4",
-      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz",
-      "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==",
+    "node_modules/@esbuild/android-arm64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.0.tgz",
+      "integrity": "sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw==",
+      "cpu": [
+        "arm64"
+      ],
       "dev": true,
-      "dependencies": {
-        "ajv": "^6.12.4",
-        "debug": "^4.3.2",
-        "espree": "^9.6.0",
-        "globals": "^13.19.0",
-        "ignore": "^5.2.0",
-        "import-fresh": "^3.2.1",
-        "js-yaml": "^4.1.0",
-        "minimatch": "^3.1.2",
-        "strip-json-comments": "^3.1.1"
-      },
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "android"
+      ],
       "engines": {
-        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://opencollective.com/eslint"
+        "node": ">=18"
       }
     },
-    "node_modules/@eslint/eslintrc/node_modules/brace-expansion": {
-      "version": "1.1.14",
-      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
-      "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
+    "node_modules/@esbuild/android-x64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.0.tgz",
+      "integrity": "sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA==",
+      "cpu": [
+        "x64"
+      ],
       "dev": true,
       "license": "MIT",
-      "dependencies": {
-        "balanced-match": "^1.0.0",
-        "concat-map": "0.0.1"
-      }
-    },
-    "node_modules/@eslint/eslintrc/node_modules/minimatch": {
-      "version": "3.1.5",
-      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
-      "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "brace-expansion": "^1.1.7"
-      },
+      "optional": true,
+      "os": [
+        "android"
+      ],
       "engines": {
-        "node": "*"
+        "node": ">=18"
       }
     },
-    "node_modules/@eslint/js": {
-      "version": "8.57.0",
-      "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz",
-      "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==",
+    "node_modules/@esbuild/darwin-arm64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.0.tgz",
+      "integrity": "sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q==",
+      "cpu": [
+        "arm64"
+      ],
       "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
       "engines": {
-        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/darwin-x64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.0.tgz",
+      "integrity": "sha512-fyzLm/DLDl/84OCfp2f/XQ4flmORsjU7VKt8HLjvIXChJoFFOIL6pLJPH4Yhd1n1gGFF9mPwtlN5Wf82DZs+LQ==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/freebsd-arm64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.0.tgz",
+      "integrity": "sha512-l9GeW5UZBT9k9brBYI+0WDffcRxgHQD8ShN2Ur4xWq/NFzUKm3k5lsH4PdaRgb2w7mI9u61nr2gI2mLI27Nh3Q==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "freebsd"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/freebsd-x64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.0.tgz",
+      "integrity": "sha512-BXoQai/A0wPO6Es3yFJ7APCiKGc1tdAEOgeTNy3SsB491S3aHn4S4r3e976eUnPdU+NbdtmBuLncYir2tMU9Nw==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "freebsd"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-arm": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.0.tgz",
+      "integrity": "sha512-CjaaREJagqJp7iTaNQjjidaNbCKYcd4IDkzbwwxtSvjI7NZm79qiHc8HqciMddQ6CKvJT6aBd8lO9kN/ZudLlw==",
+      "cpu": [
+        "arm"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-arm64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.0.tgz",
+      "integrity": "sha512-RVyzfb3FWsGA55n6WY0MEIEPURL1FcbhFE6BffZEMEekfCzCIMtB5yyDcFnVbTnwk+CLAgTujmV/Lgvih56W+A==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-ia32": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.0.tgz",
+      "integrity": "sha512-KBnSTt1kxl9x70q+ydterVdl+Cn0H18ngRMRCEQfrbqdUuntQQ0LoMZv47uB97NljZFzY6HcfqEZ2SAyIUTQBQ==",
+      "cpu": [
+        "ia32"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-loong64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.0.tgz",
+      "integrity": "sha512-zpSlUce1mnxzgBADvxKXX5sl8aYQHo2ezvMNI8I0lbblJtp8V4odlm3Yzlj7gPyt3T8ReksE6bK+pT3WD+aJRg==",
+      "cpu": [
+        "loong64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-mips64el": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.0.tgz",
+      "integrity": "sha512-2jIfP6mmjkdmeTlsX/9vmdmhBmKADrWqN7zcdtHIeNSCH1SqIoNI63cYsjQR8J+wGa4Y5izRcSHSm8K3QWmk3w==",
+      "cpu": [
+        "mips64el"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-ppc64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.0.tgz",
+      "integrity": "sha512-bc0FE9wWeC0WBm49IQMPSPILRocGTQt3j5KPCA8os6VprfuJ7KD+5PzESSrJ6GmPIPJK965ZJHTUlSA6GNYEhg==",
+      "cpu": [
+        "ppc64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-riscv64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.0.tgz",
+      "integrity": "sha512-SQPZOwoTTT/HXFXQJG/vBX8sOFagGqvZyXcgLA3NhIqcBv1BJU1d46c0rGcrij2B56Z2rNiSLaZOYW5cUk7yLQ==",
+      "cpu": [
+        "riscv64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-s390x": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.0.tgz",
+      "integrity": "sha512-SCfR0HN8CEEjnYnySJTd2cw0k9OHB/YFzt5zgJEwa+wL/T/raGWYMBqwDNAC6dqFKmJYZoQBRfHjgwLHGSrn3Q==",
+      "cpu": [
+        "s390x"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/linux-x64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.0.tgz",
+      "integrity": "sha512-us0dSb9iFxIi8srnpl931Nvs65it/Jd2a2K3qs7fz2WfGPHqzfzZTfec7oxZJRNPXPnNYZtanmRc4AL/JwVzHQ==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/netbsd-arm64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.0.tgz",
+      "integrity": "sha512-CR/RYotgtCKwtftMwJlUU7xCVNg3lMYZ0RzTmAHSfLCXw3NtZtNpswLEj/Kkf6kEL3Gw+BpOekRX0BYCtklhUw==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "netbsd"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/netbsd-x64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.0.tgz",
+      "integrity": "sha512-nU1yhmYutL+fQ71Kxnhg8uEOdC0pwEW9entHykTgEbna2pw2dkbFSMeqjjyHZoCmt8SBkOSvV+yNmm94aUrrqw==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "netbsd"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/openbsd-arm64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.0.tgz",
+      "integrity": "sha512-cXb5vApOsRsxsEl4mcZ1XY3D4DzcoMxR/nnc4IyqYs0rTI8ZKmW6kyyg+11Z8yvgMfAEldKzP7AdP64HnSC/6g==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "openbsd"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/openbsd-x64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.0.tgz",
+      "integrity": "sha512-8wZM2qqtv9UP3mzy7HiGYNH/zjTA355mpeuA+859TyR+e+Tc08IHYpLJuMsfpDJwoLo1ikIJI8jC3GFjnRClzA==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "openbsd"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/openharmony-arm64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.0.tgz",
+      "integrity": "sha512-FLGfyizszcef5C3YtoyQDACyg95+dndv79i2EekILBofh5wpCa1KuBqOWKrEHZg3zrL3t5ouE5jgr94vA+Wb2w==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "openharmony"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/sunos-x64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.0.tgz",
+      "integrity": "sha512-1ZgjUoEdHZZl/YlV76TSCz9Hqj9h9YmMGAgAPYd+q4SicWNX3G5GCyx9uhQWSLcbvPW8Ni7lj4gDa1T40akdlw==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "sunos"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/win32-arm64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.0.tgz",
+      "integrity": "sha512-Q9StnDmQ/enxnpxCCLSg0oo4+34B9TdXpuyPeTedN/6+iXBJ4J+zwfQI28u/Jl40nOYAxGoNi7mFP40RUtkmUA==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/win32-ia32": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.0.tgz",
+      "integrity": "sha512-zF3ag/gfiCe6U2iczcRzSYJKH1DCI+ByzSENHlM2FcDbEeo5Zd2C86Aq0tKUYAJJ1obRP84ymxIAksZUcdztHA==",
+      "cpu": [
+        "ia32"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@esbuild/win32-x64": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.0.tgz",
+      "integrity": "sha512-pEl1bO9mfAmIC+tW5btTmrKaujg3zGtUmWNdCw/xs70FBjwAL3o9OEKNHvNmnyylD6ubxUERiEhdsL0xBQ9efw==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@eslint-community/eslint-utils": {
+      "version": "4.9.1",
+      "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz",
+      "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "eslint-visitor-keys": "^3.4.3"
+      },
+      "engines": {
+        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://opencollective.com/eslint"
+      },
+      "peerDependencies": {
+        "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
+      }
+    },
+    "node_modules/@eslint-community/regexpp": {
+      "version": "4.12.2",
+      "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz",
+      "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
+      }
+    },
+    "node_modules/@eslint/compat": {
+      "version": "1.4.1",
+      "resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.4.1.tgz",
+      "integrity": "sha512-cfO82V9zxxGBxcQDr1lfaYB7wykTa0b00mGa36FrJl7iTFd0Z2cHfEYuxcBRP/iNijCsWsEkA+jzT8hGYmv33w==",
+      "dev": true,
+      "license": "Apache-2.0",
+      "dependencies": {
+        "@eslint/core": "^0.17.0"
+      },
+      "engines": {
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+      },
+      "peerDependencies": {
+        "eslint": "^8.40 || 9"
+      },
+      "peerDependenciesMeta": {
+        "eslint": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/@eslint/core": {
+      "version": "0.17.0",
+      "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz",
+      "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==",
+      "dev": true,
+      "license": "Apache-2.0",
+      "dependencies": {
+        "@types/json-schema": "^7.0.15"
+      },
+      "engines": {
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+      }
+    },
+    "node_modules/@eslint/eslintrc": {
+      "version": "2.1.4",
+      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz",
+      "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "ajv": "^6.12.4",
+        "debug": "^4.3.2",
+        "espree": "^9.6.0",
+        "globals": "^13.19.0",
+        "ignore": "^5.2.0",
+        "import-fresh": "^3.2.1",
+        "js-yaml": "^4.1.0",
+        "minimatch": "^3.1.2",
+        "strip-json-comments": "^3.1.1"
+      },
+      "engines": {
+        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://opencollective.com/eslint"
+      }
+    },
+    "node_modules/@eslint/eslintrc/node_modules/ajv": {
+      "version": "6.15.0",
+      "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz",
+      "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "fast-deep-equal": "^3.1.1",
+        "fast-json-stable-stringify": "^2.0.0",
+        "json-schema-traverse": "^0.4.1",
+        "uri-js": "^4.2.2"
+      },
+      "funding": {
+        "type": "github",
+        "url": "https://github.com/sponsors/epoberezkin"
+      }
+    },
+    "node_modules/@eslint/eslintrc/node_modules/balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/@eslint/eslintrc/node_modules/brace-expansion": {
+      "version": "1.1.14",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
+      "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "node_modules/@eslint/eslintrc/node_modules/ignore": {
+      "version": "5.3.2",
+      "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+      "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">= 4"
+      }
+    },
+    "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+      "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/@eslint/eslintrc/node_modules/minimatch": {
+      "version": "3.1.5",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
+      "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "brace-expansion": "^1.1.7"
+      },
+      "engines": {
+        "node": "*"
+      }
+    },
+    "node_modules/@eslint/js": {
+      "version": "8.57.1",
+      "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz",
+      "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
       }
     },
     "node_modules/@exodus/schemasafe": {
@@ -763,15 +1338,18 @@
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/@github/browserslist-config/-/browserslist-config-1.0.0.tgz",
       "integrity": "sha512-gIhjdJp/c2beaIWWIlsXdqXVRUz3r2BxBCpfz/F3JXHvSAQ1paMYjLH+maEATtENg+k5eLV7gA+9yPp762ieuw==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/@humanwhocodes/config-array": {
-      "version": "0.11.14",
-      "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
-      "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==",
+      "version": "0.13.0",
+      "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",
+      "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==",
+      "deprecated": "Use @eslint/config-array instead",
       "dev": true,
+      "license": "Apache-2.0",
       "dependencies": {
-        "@humanwhocodes/object-schema": "^2.0.2",
+        "@humanwhocodes/object-schema": "^2.0.3",
         "debug": "^4.3.1",
         "minimatch": "^3.0.5"
       },
@@ -779,6 +1357,13 @@
         "node": ">=10.10.0"
       }
     },
+    "node_modules/@humanwhocodes/config-array/node_modules/balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+      "dev": true,
+      "license": "MIT"
+    },
     "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": {
       "version": "1.1.14",
       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
@@ -808,6 +1393,7 @@
       "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
       "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
       "dev": true,
+      "license": "Apache-2.0",
       "engines": {
         "node": ">=12.22"
       },
@@ -826,16 +1412,19 @@
       }
     },
     "node_modules/@humanwhocodes/object-schema": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz",
-      "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==",
-      "dev": true
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz",
+      "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",
+      "deprecated": "Use @eslint/object-schema instead",
+      "dev": true,
+      "license": "BSD-3-Clause"
     },
     "node_modules/@istanbuljs/load-nyc-config": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
       "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==",
       "dev": true,
+      "license": "ISC",
       "dependencies": {
         "camelcase": "^5.3.1",
         "find-up": "^4.1.0",
@@ -852,6 +1441,7 @@
       "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
       "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "sprintf-js": "~1.0.2"
       }
@@ -861,6 +1451,7 @@
       "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
       "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "locate-path": "^5.0.0",
         "path-exists": "^4.0.0"
@@ -888,6 +1479,7 @@
       "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
       "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "p-locate": "^4.1.0"
       },
@@ -900,6 +1492,7 @@
       "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
       "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "p-try": "^2.0.0"
       },
@@ -915,6 +1508,7 @@
       "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
       "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "p-limit": "^2.2.0"
       },
@@ -927,15 +1521,24 @@
       "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
       "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
+    "node_modules/@istanbuljs/load-nyc-config/node_modules/sprintf-js": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+      "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
+      "dev": true,
+      "license": "BSD-3-Clause"
+    },
     "node_modules/@istanbuljs/schema": {
-      "version": "0.1.3",
-      "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
-      "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==",
+      "version": "0.1.6",
+      "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.6.tgz",
+      "integrity": "sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
@@ -945,6 +1548,7 @@
       "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz",
       "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/types": "^29.6.3",
         "@types/node": "*",
@@ -962,6 +1566,7 @@
       "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz",
       "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/console": "^29.7.0",
         "@jest/reporters": "^29.7.0",
@@ -1009,6 +1614,7 @@
       "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz",
       "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/fake-timers": "^29.7.0",
         "@jest/types": "^29.6.3",
@@ -1024,6 +1630,7 @@
       "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz",
       "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "expect": "^29.7.0",
         "jest-snapshot": "^29.7.0"
@@ -1037,6 +1644,7 @@
       "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz",
       "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "jest-get-type": "^29.6.3"
       },
@@ -1049,6 +1657,7 @@
       "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz",
       "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/types": "^29.6.3",
         "@sinonjs/fake-timers": "^10.0.2",
@@ -1066,6 +1675,7 @@
       "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz",
       "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/environment": "^29.7.0",
         "@jest/expect": "^29.7.0",
@@ -1081,6 +1691,7 @@
       "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz",
       "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@bcoe/v8-coverage": "^0.2.3",
         "@jest/console": "^29.7.0",
@@ -1119,10 +1730,65 @@
         }
       }
     },
+    "node_modules/@jest/reporters/node_modules/balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/@jest/reporters/node_modules/brace-expansion": {
+      "version": "1.1.14",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
+      "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "node_modules/@jest/reporters/node_modules/glob": {
+      "version": "7.2.3",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+      "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+      "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "^3.1.1",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
+      },
+      "engines": {
+        "node": "*"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
+    "node_modules/@jest/reporters/node_modules/minimatch": {
+      "version": "3.1.5",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
+      "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "brace-expansion": "^1.1.7"
+      },
+      "engines": {
+        "node": "*"
+      }
+    },
     "node_modules/@jest/schemas": {
       "version": "29.6.3",
       "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz",
       "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==",
+      "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@sinclair/typebox": "^0.27.8"
       },
@@ -1135,6 +1801,7 @@
       "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz",
       "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jridgewell/trace-mapping": "^0.3.18",
         "callsites": "^3.0.0",
@@ -1149,6 +1816,7 @@
       "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz",
       "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/console": "^29.7.0",
         "@jest/types": "^29.6.3",
@@ -1164,6 +1832,7 @@
       "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz",
       "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/test-result": "^29.7.0",
         "graceful-fs": "^4.2.9",
@@ -1179,6 +1848,7 @@
       "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz",
       "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/core": "^7.11.6",
         "@jest/types": "^29.6.3",
@@ -1205,6 +1875,7 @@
       "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz",
       "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/schemas": "^29.6.3",
         "@types/istanbul-lib-coverage": "^2.0.0",
@@ -1218,17 +1889,25 @@
       }
     },
     "node_modules/@jridgewell/gen-mapping": {
-      "version": "0.3.5",
-      "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
-      "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==",
+      "version": "0.3.13",
+      "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
+      "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@jridgewell/set-array": "^1.2.1",
-        "@jridgewell/sourcemap-codec": "^1.4.10",
+        "@jridgewell/sourcemap-codec": "^1.5.0",
+        "@jridgewell/trace-mapping": "^0.3.24"
+      }
+    },
+    "node_modules/@jridgewell/remapping": {
+      "version": "2.3.5",
+      "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",
+      "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@jridgewell/gen-mapping": "^0.3.5",
         "@jridgewell/trace-mapping": "^0.3.24"
-      },
-      "engines": {
-        "node": ">=6.0.0"
       }
     },
     "node_modules/@jridgewell/resolve-uri": {
@@ -1236,57 +1915,58 @@
       "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
       "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
       "dev": true,
-      "engines": {
-        "node": ">=6.0.0"
-      }
-    },
-    "node_modules/@jridgewell/set-array": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",
-      "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
-      "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=6.0.0"
       }
     },
     "node_modules/@jridgewell/sourcemap-codec": {
-      "version": "1.4.15",
-      "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
-      "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
-      "dev": true
+      "version": "1.5.5",
+      "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
+      "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/@jridgewell/trace-mapping": {
-      "version": "0.3.25",
-      "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
-      "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
+      "version": "0.3.31",
+      "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",
+      "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jridgewell/resolve-uri": "^3.1.0",
         "@jridgewell/sourcemap-codec": "^1.4.14"
       }
     },
-    "node_modules/@jsep-plugin/assignment": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.3.0.tgz",
-      "integrity": "sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ==",
+    "node_modules/@napi-rs/wasm-runtime": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz",
+      "integrity": "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==",
+      "dev": true,
       "license": "MIT",
-      "engines": {
-        "node": ">= 10.16.0"
+      "optional": true,
+      "dependencies": {
+        "@tybys/wasm-util": "^0.10.1"
+      },
+      "funding": {
+        "type": "github",
+        "url": "https://github.com/sponsors/Brooooooklyn"
       },
       "peerDependencies": {
-        "jsep": "^0.4.0||^1.0.0"
+        "@emnapi/core": "^1.7.1",
+        "@emnapi/runtime": "^1.7.1"
       }
     },
-    "node_modules/@jsep-plugin/regex": {
-      "version": "1.0.4",
-      "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.4.tgz",
-      "integrity": "sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==",
+    "node_modules/@noble/hashes": {
+      "version": "1.8.0",
+      "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz",
+      "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==",
       "license": "MIT",
       "engines": {
-        "node": ">= 10.16.0"
+        "node": "^14.21.3 || >=16"
       },
-      "peerDependencies": {
-        "jsep": "^0.4.0||^1.0.0"
+      "funding": {
+        "url": "https://paulmillr.com/funding/"
       }
     },
     "node_modules/@nodable/entities": {
@@ -1306,6 +1986,7 @@
       "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
       "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@nodelib/fs.stat": "2.0.5",
         "run-parallel": "^1.1.9"
@@ -1319,6 +2000,7 @@
       "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
       "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 8"
       }
@@ -1328,6 +2010,7 @@
       "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
       "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@nodelib/fs.scandir": "2.1.5",
         "fastq": "^1.6.0"
@@ -1340,19 +2023,21 @@
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz",
       "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==",
+      "license": "MIT",
       "engines": {
         "node": ">= 18"
       }
     },
     "node_modules/@octokit/core": {
-      "version": "5.2.0",
-      "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.0.tgz",
-      "integrity": "sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==",
+      "version": "5.2.2",
+      "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.2.tgz",
+      "integrity": "sha512-/g2d4sW9nUDJOMz3mabVQvOGhVa4e/BN/Um7yca9Bb2XTzPPnfTWHWQg+IsEYO7M3Vx+EXvaM/I2pJWIMun1bg==",
+      "license": "MIT",
       "dependencies": {
         "@octokit/auth-token": "^4.0.0",
         "@octokit/graphql": "^7.1.0",
-        "@octokit/request": "^8.3.1",
-        "@octokit/request-error": "^5.1.0",
+        "@octokit/request": "^8.4.1",
+        "@octokit/request-error": "^5.1.1",
         "@octokit/types": "^13.0.0",
         "before-after-hook": "^2.2.0",
         "universal-user-agent": "^6.0.0"
@@ -1389,9 +2074,9 @@
       }
     },
     "node_modules/@octokit/openapi-types": {
-      "version": "23.0.1",
-      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
-      "integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==",
+      "version": "24.2.0",
+      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
+      "integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
       "license": "MIT"
     },
     "node_modules/@octokit/plugin-paginate-rest": {
@@ -1412,12 +2097,14 @@
     "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": {
       "version": "20.0.0",
       "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
-      "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="
+      "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==",
+      "license": "MIT"
     },
     "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": {
       "version": "12.6.0",
       "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
       "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
+      "license": "MIT",
       "dependencies": {
         "@octokit/openapi-types": "^20.0.0"
       }
@@ -1426,6 +2113,7 @@
       "version": "4.0.1",
       "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-4.0.1.tgz",
       "integrity": "sha512-GihNqNpGHorUrO7Qa9JbAl0dbLnqJVrV8OXe2Zm5/Y4wFkZQDfTreBzVmiRfJVfE4mClXdihHnbpyyO9FSX4HA==",
+      "license": "MIT",
       "engines": {
         "node": ">= 18"
       },
@@ -1437,6 +2125,7 @@
       "version": "10.4.1",
       "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz",
       "integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==",
+      "license": "MIT",
       "dependencies": {
         "@octokit/types": "^12.6.0"
       },
@@ -1450,12 +2139,14 @@
     "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": {
       "version": "20.0.0",
       "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
-      "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="
+      "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==",
+      "license": "MIT"
     },
     "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": {
       "version": "12.6.0",
       "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
       "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
+      "license": "MIT",
       "dependencies": {
         "@octokit/openapi-types": "^20.0.0"
       }
@@ -1535,253 +2226,222 @@
       }
     },
     "node_modules/@octokit/types": {
-      "version": "13.8.0",
-      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
-      "integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
+      "version": "13.10.0",
+      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
+      "integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
       "license": "MIT",
       "dependencies": {
-        "@octokit/openapi-types": "^23.0.1"
+        "@octokit/openapi-types": "^24.2.0"
       }
     },
     "node_modules/@opentelemetry/api": {
-      "version": "1.9.0",
-      "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz",
-      "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==",
+      "version": "1.9.1",
+      "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.1.tgz",
+      "integrity": "sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q==",
       "license": "Apache-2.0",
       "engines": {
         "node": ">=8.0.0"
       }
     },
     "node_modules/@opentelemetry/api-logs": {
-      "version": "0.53.0",
-      "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz",
-      "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==",
+      "version": "0.214.0",
+      "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.214.0.tgz",
+      "integrity": "sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==",
       "license": "Apache-2.0",
       "dependencies": {
-        "@opentelemetry/api": "^1.0.0"
+        "@opentelemetry/api": "^1.3.0"
       },
       "engines": {
-        "node": ">=14"
+        "node": ">=8.0.0"
       }
     },
     "node_modules/@opentelemetry/context-async-hooks": {
-      "version": "1.26.0",
-      "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.26.0.tgz",
-      "integrity": "sha512-HedpXXYzzbaoutw6DFLWLDket2FwLkLpil4hGCZ1xYEIMTcivdfwEOISgdbLEWyG3HW52gTq2V9mOVJrONgiwg==",
+      "version": "2.6.1",
+      "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.6.1.tgz",
+      "integrity": "sha512-XHzhwRNkBpeP8Fs/qjGrAf9r9PRv67wkJQ/7ZPaBQQ68DYlTBBx5MF9LvPx7mhuXcDessKK2b+DcxqwpgkcivQ==",
       "license": "Apache-2.0",
       "engines": {
-        "node": ">=14"
+        "node": "^18.19.0 || >=20.6.0"
       },
       "peerDependencies": {
         "@opentelemetry/api": ">=1.0.0 <1.10.0"
       }
     },
     "node_modules/@opentelemetry/core": {
-      "version": "1.26.0",
-      "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.26.0.tgz",
-      "integrity": "sha512-1iKxXXE8415Cdv0yjG3G6hQnB5eVEsJce3QaawX8SjDn0mAS0ZM8fAbZZJD4ajvhC15cePvosSCut404KrIIvQ==",
+      "version": "2.6.1",
+      "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.1.tgz",
+      "integrity": "sha512-8xHSGWpJP9wBxgBpnqGL0R3PbdWQndL1Qp50qrg71+B28zK5OQmUgcDKLJgzyAAV38t4tOyLMGDD60LneR5W8g==",
       "license": "Apache-2.0",
       "dependencies": {
-        "@opentelemetry/semantic-conventions": "1.27.0"
+        "@opentelemetry/semantic-conventions": "^1.29.0"
       },
       "engines": {
-        "node": ">=14"
+        "node": "^18.19.0 || >=20.6.0"
       },
       "peerDependencies": {
         "@opentelemetry/api": ">=1.0.0 <1.10.0"
       }
     },
     "node_modules/@opentelemetry/exporter-trace-otlp-http": {
-      "version": "0.53.0",
-      "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.53.0.tgz",
-      "integrity": "sha512-m7F5ZTq+V9mKGWYpX8EnZ7NjoqAU7VemQ1E2HAG+W/u0wpY1x0OmbxAXfGKFHCspdJk8UKlwPGrpcB8nay3P8A==",
+      "version": "0.214.0",
+      "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.214.0.tgz",
+      "integrity": "sha512-kIN8nTBMgV2hXzV/a20BCFilPZdAIMYYJGSgfMMRm/Xa+07y5hRDS2Vm12A/z8Cdu3Sq++ZvJfElokX2rkgGgw==",
       "license": "Apache-2.0",
       "dependencies": {
-        "@opentelemetry/core": "1.26.0",
-        "@opentelemetry/otlp-exporter-base": "0.53.0",
-        "@opentelemetry/otlp-transformer": "0.53.0",
-        "@opentelemetry/resources": "1.26.0",
-        "@opentelemetry/sdk-trace-base": "1.26.0"
+        "@opentelemetry/core": "2.6.1",
+        "@opentelemetry/otlp-exporter-base": "0.214.0",
+        "@opentelemetry/otlp-transformer": "0.214.0",
+        "@opentelemetry/resources": "2.6.1",
+        "@opentelemetry/sdk-trace-base": "2.6.1"
       },
       "engines": {
-        "node": ">=14"
+        "node": "^18.19.0 || >=20.6.0"
       },
       "peerDependencies": {
-        "@opentelemetry/api": "^1.0.0"
+        "@opentelemetry/api": "^1.3.0"
       }
     },
     "node_modules/@opentelemetry/otlp-exporter-base": {
-      "version": "0.53.0",
-      "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.53.0.tgz",
-      "integrity": "sha512-UCWPreGQEhD6FjBaeDuXhiMf6kkBODF0ZQzrk/tuQcaVDJ+dDQ/xhJp192H9yWnKxVpEjFrSSLnpqmX4VwX+eA==",
+      "version": "0.214.0",
+      "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.214.0.tgz",
+      "integrity": "sha512-u1Gdv0/E9wP+apqWf7Wv2npXmgJtxsW2XL0TEv9FZloTZRuMBKmu8cYVXwS4Hm3q/f/3FuCnPTgiwYvIqRSpRg==",
       "license": "Apache-2.0",
       "dependencies": {
-        "@opentelemetry/core": "1.26.0",
-        "@opentelemetry/otlp-transformer": "0.53.0"
+        "@opentelemetry/core": "2.6.1",
+        "@opentelemetry/otlp-transformer": "0.214.0"
       },
       "engines": {
-        "node": ">=14"
+        "node": "^18.19.0 || >=20.6.0"
       },
       "peerDependencies": {
-        "@opentelemetry/api": "^1.0.0"
+        "@opentelemetry/api": "^1.3.0"
       }
     },
     "node_modules/@opentelemetry/otlp-transformer": {
-      "version": "0.53.0",
-      "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.53.0.tgz",
-      "integrity": "sha512-rM0sDA9HD8dluwuBxLetUmoqGJKSAbWenwD65KY9iZhUxdBHRLrIdrABfNDP7aiTjcgK8XFyTn5fhDz7N+W6DA==",
+      "version": "0.214.0",
+      "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.214.0.tgz",
+      "integrity": "sha512-DSaYcuBRh6uozfsWN3R8HsN0yDhCuWP7tOFdkUOVaWD1KVJg8m4qiLUsg/tNhTLS9HUYUcwNpwL2eroLtsZZ/w==",
       "license": "Apache-2.0",
       "dependencies": {
-        "@opentelemetry/api-logs": "0.53.0",
-        "@opentelemetry/core": "1.26.0",
-        "@opentelemetry/resources": "1.26.0",
-        "@opentelemetry/sdk-logs": "0.53.0",
-        "@opentelemetry/sdk-metrics": "1.26.0",
-        "@opentelemetry/sdk-trace-base": "1.26.0",
-        "protobufjs": "^7.3.0"
+        "@opentelemetry/api-logs": "0.214.0",
+        "@opentelemetry/core": "2.6.1",
+        "@opentelemetry/resources": "2.6.1",
+        "@opentelemetry/sdk-logs": "0.214.0",
+        "@opentelemetry/sdk-metrics": "2.6.1",
+        "@opentelemetry/sdk-trace-base": "2.6.1",
+        "protobufjs": "^7.0.0"
       },
       "engines": {
-        "node": ">=14"
+        "node": "^18.19.0 || >=20.6.0"
       },
       "peerDependencies": {
         "@opentelemetry/api": "^1.3.0"
       }
     },
-    "node_modules/@opentelemetry/propagator-b3": {
-      "version": "1.26.0",
-      "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.26.0.tgz",
-      "integrity": "sha512-vvVkQLQ/lGGyEy9GT8uFnI047pajSOVnZI2poJqVGD3nJ+B9sFGdlHNnQKophE3lHfnIH0pw2ubrCTjZCgIj+Q==",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@opentelemetry/core": "1.26.0"
-      },
-      "engines": {
-        "node": ">=14"
-      },
-      "peerDependencies": {
-        "@opentelemetry/api": ">=1.0.0 <1.10.0"
-      }
-    },
-    "node_modules/@opentelemetry/propagator-jaeger": {
-      "version": "1.26.0",
-      "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.26.0.tgz",
-      "integrity": "sha512-DelFGkCdaxA1C/QA0Xilszfr0t4YbGd3DjxiCDPh34lfnFr+VkkrjV9S8ZTJvAzfdKERXhfOxIKBoGPJwoSz7Q==",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@opentelemetry/core": "1.26.0"
-      },
-      "engines": {
-        "node": ">=14"
-      },
-      "peerDependencies": {
-        "@opentelemetry/api": ">=1.0.0 <1.10.0"
-      }
-    },
     "node_modules/@opentelemetry/resources": {
-      "version": "1.26.0",
-      "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.26.0.tgz",
-      "integrity": "sha512-CPNYchBE7MBecCSVy0HKpUISEeJOniWqcHaAHpmasZ3j9o6V3AyBzhRc90jdmemq0HOxDr6ylhUbDhBqqPpeNw==",
+      "version": "2.6.1",
+      "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.6.1.tgz",
+      "integrity": "sha512-lID/vxSuKWXM55XhAKNoYXu9Cutoq5hFdkbTdI/zDKQktXzcWBVhNsOkiZFTMU9UtEWuGRNe0HUgmsFldIdxVA==",
       "license": "Apache-2.0",
       "dependencies": {
-        "@opentelemetry/core": "1.26.0",
-        "@opentelemetry/semantic-conventions": "1.27.0"
+        "@opentelemetry/core": "2.6.1",
+        "@opentelemetry/semantic-conventions": "^1.29.0"
       },
       "engines": {
-        "node": ">=14"
+        "node": "^18.19.0 || >=20.6.0"
       },
       "peerDependencies": {
-        "@opentelemetry/api": ">=1.0.0 <1.10.0"
+        "@opentelemetry/api": ">=1.3.0 <1.10.0"
       }
     },
     "node_modules/@opentelemetry/sdk-logs": {
-      "version": "0.53.0",
-      "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.53.0.tgz",
-      "integrity": "sha512-dhSisnEgIj/vJZXZV6f6KcTnyLDx/VuQ6l3ejuZpMpPlh9S1qMHiZU9NMmOkVkwwHkMy3G6mEBwdP23vUZVr4g==",
+      "version": "0.214.0",
+      "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.214.0.tgz",
+      "integrity": "sha512-zf6acnScjhsaBUU22zXZ/sLWim1dfhUAbGXdMmHmNG3LfBnQ3DKsOCITb2IZwoUsNNMTogqFKBnlIPPftUgGwA==",
       "license": "Apache-2.0",
       "dependencies": {
-        "@opentelemetry/api-logs": "0.53.0",
-        "@opentelemetry/core": "1.26.0",
-        "@opentelemetry/resources": "1.26.0"
+        "@opentelemetry/api-logs": "0.214.0",
+        "@opentelemetry/core": "2.6.1",
+        "@opentelemetry/resources": "2.6.1",
+        "@opentelemetry/semantic-conventions": "^1.29.0"
       },
       "engines": {
-        "node": ">=14"
+        "node": "^18.19.0 || >=20.6.0"
       },
       "peerDependencies": {
         "@opentelemetry/api": ">=1.4.0 <1.10.0"
       }
     },
     "node_modules/@opentelemetry/sdk-metrics": {
-      "version": "1.26.0",
-      "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.26.0.tgz",
-      "integrity": "sha512-0SvDXmou/JjzSDOjUmetAAvcKQW6ZrvosU0rkbDGpXvvZN+pQF6JbK/Kd4hNdK4q/22yeruqvukXEJyySTzyTQ==",
+      "version": "2.6.1",
+      "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.6.1.tgz",
+      "integrity": "sha512-9t9hJHX15meBy2NmTJxL+NJfXmnausR2xUDvE19XQce0Qi/GBtDGamU8nS1RMbdgDmhgpm3VaOu2+fiS/SfTpQ==",
       "license": "Apache-2.0",
       "dependencies": {
-        "@opentelemetry/core": "1.26.0",
-        "@opentelemetry/resources": "1.26.0"
+        "@opentelemetry/core": "2.6.1",
+        "@opentelemetry/resources": "2.6.1"
       },
       "engines": {
-        "node": ">=14"
+        "node": "^18.19.0 || >=20.6.0"
       },
       "peerDependencies": {
-        "@opentelemetry/api": ">=1.3.0 <1.10.0"
+        "@opentelemetry/api": ">=1.9.0 <1.10.0"
       }
     },
     "node_modules/@opentelemetry/sdk-trace-base": {
-      "version": "1.26.0",
-      "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.26.0.tgz",
-      "integrity": "sha512-olWQldtvbK4v22ymrKLbIcBi9L2SpMO84sCPY54IVsJhP9fRsxJT194C/AVaAuJzLE30EdhhM1VmvVYR7az+cw==",
+      "version": "2.6.1",
+      "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.6.1.tgz",
+      "integrity": "sha512-r86ut4T1e8vNwB35CqCcKd45yzqH6/6Wzvpk2/cZB8PsPLlZFTvrh8yfOS3CYZYcUmAx4hHTZJ8AO8Dj8nrdhw==",
       "license": "Apache-2.0",
       "dependencies": {
-        "@opentelemetry/core": "1.26.0",
-        "@opentelemetry/resources": "1.26.0",
-        "@opentelemetry/semantic-conventions": "1.27.0"
+        "@opentelemetry/core": "2.6.1",
+        "@opentelemetry/resources": "2.6.1",
+        "@opentelemetry/semantic-conventions": "^1.29.0"
       },
       "engines": {
-        "node": ">=14"
+        "node": "^18.19.0 || >=20.6.0"
       },
       "peerDependencies": {
-        "@opentelemetry/api": ">=1.0.0 <1.10.0"
+        "@opentelemetry/api": ">=1.3.0 <1.10.0"
       }
     },
     "node_modules/@opentelemetry/sdk-trace-node": {
-      "version": "1.26.0",
-      "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.26.0.tgz",
-      "integrity": "sha512-Fj5IVKrj0yeUwlewCRwzOVcr5avTuNnMHWf7GPc1t6WaT78J6CJyF3saZ/0RkZfdeNO8IcBl/bNcWMVZBMRW8Q==",
+      "version": "2.6.1",
+      "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.6.1.tgz",
+      "integrity": "sha512-Hh2i4FwHWRFhnO2Q/p6svMxy8MPsNCG0uuzUY3glqm0rwM0nQvbTO1dXSp9OqQoTKXcQzaz9q1f65fsurmOhNw==",
       "license": "Apache-2.0",
       "dependencies": {
-        "@opentelemetry/context-async-hooks": "1.26.0",
-        "@opentelemetry/core": "1.26.0",
-        "@opentelemetry/propagator-b3": "1.26.0",
-        "@opentelemetry/propagator-jaeger": "1.26.0",
-        "@opentelemetry/sdk-trace-base": "1.26.0",
-        "semver": "^7.5.2"
+        "@opentelemetry/context-async-hooks": "2.6.1",
+        "@opentelemetry/core": "2.6.1",
+        "@opentelemetry/sdk-trace-base": "2.6.1"
       },
       "engines": {
-        "node": ">=14"
+        "node": "^18.19.0 || >=20.6.0"
       },
       "peerDependencies": {
         "@opentelemetry/api": ">=1.0.0 <1.10.0"
       }
     },
     "node_modules/@opentelemetry/semantic-conventions": {
-      "version": "1.27.0",
-      "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.27.0.tgz",
-      "integrity": "sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==",
+      "version": "1.40.0",
+      "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.40.0.tgz",
+      "integrity": "sha512-cifvXDhcqMwwTlTK04GBNeIe7yyo28Mfby85QXFe1Yk8nmi36Ab/5UQwptOx84SsoGNRg+EVSjwzfSZMy6pmlw==",
       "license": "Apache-2.0",
       "engines": {
         "node": ">=14"
       }
     },
     "node_modules/@pkgr/core": {
-      "version": "0.1.1",
-      "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz",
-      "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==",
+      "version": "0.2.9",
+      "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz",
+      "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": "^12.20.0 || ^14.18.0 || >=16.0.0"
       },
       "funding": {
-        "url": "https://opencollective.com/unts"
+        "url": "https://opencollective.com/pkgr"
       }
     },
     "node_modules/@pm2/agent": {
@@ -1826,6 +2486,24 @@
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/@pm2/agent/node_modules/debug": {
+      "version": "4.3.7",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
+      "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "ms": "^2.1.3"
+      },
+      "engines": {
+        "node": ">=6.0"
+      },
+      "peerDependenciesMeta": {
+        "supports-color": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/@pm2/agent/node_modules/lru-cache": {
       "version": "6.0.0",
       "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
@@ -1905,6 +2583,24 @@
         "lodash": "^4.17.14"
       }
     },
+    "node_modules/@pm2/io/node_modules/debug": {
+      "version": "4.3.7",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
+      "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "ms": "^2.1.3"
+      },
+      "engines": {
+        "node": ">=6.0"
+      },
+      "peerDependenciesMeta": {
+        "supports-color": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/@pm2/io/node_modules/eventemitter2": {
       "version": "6.4.9",
       "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz",
@@ -1941,13 +2637,6 @@
         "node": ">=10"
       }
     },
-    "node_modules/@pm2/io/node_modules/tslib": {
-      "version": "1.9.3",
-      "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
-      "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
-      "dev": true,
-      "license": "Apache-2.0"
-    },
     "node_modules/@pm2/io/node_modules/yallist": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
@@ -1960,6 +2649,7 @@
       "resolved": "https://registry.npmjs.org/@pm2/js-api/-/js-api-0.8.0.tgz",
       "integrity": "sha512-nmWzrA/BQZik3VBz+npRcNIu01kdBhWL0mxKmP1ciF/gTcujPTQqt027N9fc1pK9ERM8RipFhymw7RcmCyOEYA==",
       "dev": true,
+      "license": "Apache-2",
       "dependencies": {
         "async": "^2.6.3",
         "debug": "~4.3.1",
@@ -1976,21 +2666,42 @@
       "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
       "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "lodash": "^4.17.14"
       }
     },
+    "node_modules/@pm2/js-api/node_modules/debug": {
+      "version": "4.3.7",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
+      "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "ms": "^2.1.3"
+      },
+      "engines": {
+        "node": ">=6.0"
+      },
+      "peerDependenciesMeta": {
+        "supports-color": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/@pm2/js-api/node_modules/eventemitter2": {
       "version": "6.4.9",
       "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz",
       "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/@pm2/pm2-version-check": {
       "version": "1.0.4",
       "resolved": "https://registry.npmjs.org/@pm2/pm2-version-check/-/pm2-version-check-1.0.4.tgz",
       "integrity": "sha512-SXsM27SGH3yTWKc2fKR4SYNxsmnvuBQ9dd6QHtEWmiZ/VqaOYPAIlS8+vMcn27YLtAEBGvNRSh3TPNvtjZgfqA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "debug": "^4.3.1"
       }
@@ -2008,25 +2719,24 @@
       "license": "BSD-3-Clause"
     },
     "node_modules/@protobufjs/codegen": {
-      "version": "2.0.4",
-      "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
-      "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==",
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.5.tgz",
+      "integrity": "sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g==",
       "license": "BSD-3-Clause"
     },
     "node_modules/@protobufjs/eventemitter": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
-      "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==",
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.1.tgz",
+      "integrity": "sha512-vW1GmwMZNnL+gMRaovlh9yZX74kc+TTU3FObkkurpMaRtBfLP3ldjS9KQWlwZgraRE0+dheEEoAxdzcJQ8eXZg==",
       "license": "BSD-3-Clause"
     },
     "node_modules/@protobufjs/fetch": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
-      "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==",
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.1.tgz",
+      "integrity": "sha512-GpptLrs57adMSuHi3VNj0mAF8dwh36LMaYF6XyJ6JMWlVsc+t42tm1HSEDmOs3A8fC9yyeisgLhsTVQokOZ0zw==",
       "license": "BSD-3-Clause",
       "dependencies": {
-        "@protobufjs/aspromise": "^1.1.1",
-        "@protobufjs/inquire": "^1.1.0"
+        "@protobufjs/aspromise": "^1.1.1"
       }
     },
     "node_modules/@protobufjs/float": {
@@ -2036,9 +2746,9 @@
       "license": "BSD-3-Clause"
     },
     "node_modules/@protobufjs/inquire": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
-      "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==",
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.2.tgz",
+      "integrity": "sha512-pa0vFRuws4wkvaXKK1uXZMAwAX4/t8ANaJo45iw/oQHNQ9q5xUzwgFmVJGXiga2BeN+zpX7Vf9vmsiIa2J+MUw==",
       "license": "BSD-3-Clause"
     },
     "node_modules/@protobufjs/path": {
@@ -2054,64 +2764,60 @@
       "license": "BSD-3-Clause"
     },
     "node_modules/@protobufjs/utf8": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
-      "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==",
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.1.tgz",
+      "integrity": "sha512-oOAWABowe8EAbMyWKM0tYDKi8Yaox52D+HWZhAIJqQXbqe0xI/GV7FhLWqlEKreMkfDjshR5FKgi3mnle0h6Eg==",
       "license": "BSD-3-Clause"
     },
     "node_modules/@redocly/ajv": {
-      "version": "8.11.2",
-      "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz",
-      "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==",
+      "version": "8.18.3",
+      "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.18.3.tgz",
+      "integrity": "sha512-l42u0of3hY98sN2A+M4qTX1O/KrpgGH32Hu9kP2GtHyD5Dfqq86PKFLe5dwaD8DEnNmlOlll2BAmeEtf0DaySg==",
       "license": "MIT",
       "dependencies": {
-        "fast-deep-equal": "^3.1.1",
+        "fast-deep-equal": "^3.1.3",
+        "fast-uri": "^3.0.1",
         "json-schema-traverse": "^1.0.0",
-        "require-from-string": "^2.0.2",
-        "uri-js-replace": "^1.0.1"
+        "require-from-string": "^2.0.2"
       },
       "funding": {
         "type": "github",
         "url": "https://github.com/sponsors/epoberezkin"
       }
     },
-    "node_modules/@redocly/ajv/node_modules/json-schema-traverse": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
-      "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
-      "license": "MIT"
-    },
     "node_modules/@redocly/cli": {
-      "version": "1.34.13",
-      "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-1.34.13.tgz",
-      "integrity": "sha512-1qfjy82uLLANwv//ET3H4ak6ciHP1ccTW0hAeBWWX1SRDPh7iHxjAu1kbnvcB8V4//+OaxBXUx9ETzDrqbhjQw==",
-      "license": "MIT",
-      "dependencies": {
-        "@opentelemetry/api": "1.9.0",
-        "@opentelemetry/exporter-trace-otlp-http": "0.53.0",
-        "@opentelemetry/resources": "1.26.0",
-        "@opentelemetry/sdk-trace-node": "1.26.0",
-        "@opentelemetry/semantic-conventions": "1.27.0",
-        "@redocly/config": "0.22.0",
-        "@redocly/openapi-core": "1.34.13",
-        "@redocly/respect-core": "1.34.13",
-        "abort-controller": "3.0.0",
-        "chokidar": "3.5.3",
-        "colorette": "1.4.0",
-        "core-js": "3.32.1",
+      "version": "2.31.2",
+      "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-2.31.2.tgz",
+      "integrity": "sha512-MqO0I6UvB4d7VOTOrYAbVwS+AgUZ4Bxp7d2vCbUseiEYGxArvkzXtwWNLfNKryXvUrVB8kfmvLuRp7LLHFvvDA==",
+      "license": "MIT",
+      "dependencies": {
+        "@opentelemetry/exporter-trace-otlp-http": "0.214.0",
+        "@opentelemetry/resources": "2.6.1",
+        "@opentelemetry/sdk-trace-node": "2.6.1",
+        "@opentelemetry/semantic-conventions": "1.40.0",
+        "@redocly/cli-otel": "0.3.1",
+        "@redocly/openapi-core": "2.31.2",
+        "@redocly/respect-core": "2.31.2",
+        "ajv": "npm:@redocly/ajv@8.18.1",
+        "ajv-formats": "^3.0.1",
+        "colorette": "^1.2.0",
+        "cookie": "^0.7.2",
         "dotenv": "16.4.7",
-        "form-data": "4.0.4",
-        "get-port-please": "3.0.1",
-        "glob": "7.2.3",
-        "handlebars": "4.7.8",
-        "mobx": "6.12.3",
-        "pluralize": "8.0.0",
+        "glob": "^13.0.5",
+        "handlebars": "^4.7.9",
+        "https-proxy-agent": "^7.0.5",
+        "mobx": "^6.0.4",
+        "picomatch": "^4.0.4",
+        "pluralize": "^8.0.0",
         "react": "^17.0.0 || ^18.2.0 || ^19.2.1",
         "react-dom": "^17.0.0 || ^18.2.0 || ^19.2.1",
-        "redoc": "2.5.0",
-        "semver": "7.7.4",
-        "simple-websocket": "9.1.0",
-        "styled-components": "6.3.9",
+        "redoc": "2.5.1",
+        "semver": "^7.5.2",
+        "set-cookie-parser": "^2.3.5",
+        "simple-websocket": "^9.0.0",
+        "styled-components": "6.4.1",
+        "ulid": "^3.0.1",
+        "undici": "6.24.0",
         "yargs": "17.0.1"
       },
       "bin": {
@@ -2119,164 +2825,81 @@
         "redocly": "bin/cli.js"
       },
       "engines": {
-        "node": ">=18.17.0",
-        "npm": ">=9.5.0"
+        "node": ">=22.12.0 || >=20.19.0 <21.0.0",
+        "npm": ">=10"
       }
     },
-    "node_modules/@redocly/cli/node_modules/chokidar": {
-      "version": "3.5.3",
-      "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
-      "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
-      "funding": [
-        {
-          "type": "individual",
-          "url": "https://paulmillr.com/funding/"
-        }
-      ],
+    "node_modules/@redocly/cli-otel": {
+      "version": "0.3.1",
+      "resolved": "https://registry.npmjs.org/@redocly/cli-otel/-/cli-otel-0.3.1.tgz",
+      "integrity": "sha512-TbC4bK2zLtU/O9I2pszHPP0rtJOvFhQmEwQ/FHxERPu71fgKG8POUDP2jSiGmsXE7NdGSHBKqnf+y9Acn2jq5g==",
       "license": "MIT",
       "dependencies": {
-        "anymatch": "~3.1.2",
-        "braces": "~3.0.2",
-        "glob-parent": "~5.1.2",
-        "is-binary-path": "~2.1.0",
-        "is-glob": "~4.0.1",
-        "normalize-path": "~3.0.0",
-        "readdirp": "~3.6.0"
-      },
-      "engines": {
-        "node": ">= 8.10.0"
-      },
-      "optionalDependencies": {
-        "fsevents": "~2.3.2"
-      }
-    },
-    "node_modules/@redocly/cli/node_modules/cliui": {
-      "version": "7.0.4",
-      "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
-      "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
-      "dependencies": {
-        "string-width": "^4.2.0",
-        "strip-ansi": "^6.0.0",
-        "wrap-ansi": "^7.0.0"
-      }
-    },
-    "node_modules/@redocly/cli/node_modules/glob-parent": {
-      "version": "5.1.2",
-      "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
-      "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
-      "license": "ISC",
-      "dependencies": {
-        "is-glob": "^4.0.1"
-      },
-      "engines": {
-        "node": ">= 6"
+        "ulid": "^2.3.0"
       }
     },
-    "node_modules/@redocly/cli/node_modules/semver": {
-      "version": "7.7.4",
-      "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",
-      "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",
-      "license": "ISC",
+    "node_modules/@redocly/cli-otel/node_modules/ulid": {
+      "version": "2.4.0",
+      "resolved": "https://registry.npmjs.org/ulid/-/ulid-2.4.0.tgz",
+      "integrity": "sha512-fIRiVTJNcSRmXKPZtGzFQv9WRrZ3M9eoptl/teFJvjOzmpU+/K/JH6HZ8deBfb5vMEpicJcLn7JmvdknlMq7Zg==",
+      "license": "MIT",
       "bin": {
-        "semver": "bin/semver.js"
-      },
-      "engines": {
-        "node": ">=10"
+        "ulid": "bin/cli.js"
       }
     },
-    "node_modules/@redocly/cli/node_modules/yargs": {
-      "version": "17.0.1",
-      "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.0.1.tgz",
-      "integrity": "sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ==",
+    "node_modules/@redocly/config": {
+      "version": "0.48.2",
+      "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.48.2.tgz",
+      "integrity": "sha512-DUHthTRdj+caAQWCtJae4yzvxaUDuwQkFsZFVaAEyORd8Bt8K2wYso61jYZuR/kQZaDejfUREtQTVVZ5VYTqgw==",
+      "license": "MIT",
       "dependencies": {
-        "cliui": "^7.0.2",
-        "escalade": "^3.1.1",
-        "get-caller-file": "^2.0.5",
-        "require-directory": "^2.1.1",
-        "string-width": "^4.2.0",
-        "y18n": "^5.0.5",
-        "yargs-parser": "^20.2.2"
-      },
-      "engines": {
-        "node": ">=12"
-      }
-    },
-    "node_modules/@redocly/cli/node_modules/yargs-parser": {
-      "version": "20.2.9",
-      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
-      "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
-      "engines": {
-        "node": ">=10"
+        "json-schema-to-ts": "2.7.2"
       }
     },
-    "node_modules/@redocly/config": {
-      "version": "0.22.0",
-      "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.0.tgz",
-      "integrity": "sha512-gAy93Ddo01Z3bHuVdPWfCwzgfaYgMdaZPcfL7JZ7hWJoK9V0lXDbigTWkhiPFAaLWzbOJ+kbUQG1+XwIm0KRGQ==",
-      "license": "MIT"
-    },
     "node_modules/@redocly/openapi-core": {
-      "version": "1.34.13",
-      "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.13.tgz",
-      "integrity": "sha512-4Tm4ysZkexx6ZTX7knqSZTqPlNgIvXc7Ha0pd30I694/GD0KtJE2xrElycfPds0vCLFAqoKyIzBtOF1xrLo8KA==",
+      "version": "2.31.2",
+      "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-2.31.2.tgz",
+      "integrity": "sha512-qKXAdKTRKqWArIWbMOHOELJGgfISMFD5pK0w5CaklH8LAn5M6BbyCocqz52IqMMUIiEyAsqb46a4vtuqPhLZwg==",
       "license": "MIT",
       "dependencies": {
-        "@redocly/ajv": "8.11.2",
-        "@redocly/config": "0.22.0",
-        "colorette": "1.4.0",
-        "https-proxy-agent": "7.0.6",
-        "js-levenshtein": "1.1.6",
-        "js-yaml": "4.1.1",
-        "minimatch": "5.1.9",
-        "pluralize": "8.0.0",
+        "@redocly/ajv": "^8.18.1",
+        "@redocly/config": "^0.48.2",
+        "ajv": "npm:@redocly/ajv@8.18.1",
+        "ajv-formats": "^3.0.1",
+        "colorette": "^1.2.0",
+        "js-levenshtein": "^1.1.6",
+        "js-yaml": "^4.1.0",
+        "picomatch": "^4.0.4",
+        "pluralize": "^8.0.0",
         "yaml-ast-parser": "0.0.43"
       },
       "engines": {
-        "node": ">=18.17.0",
-        "npm": ">=9.5.0"
-      }
-    },
-    "node_modules/@redocly/openapi-core/node_modules/minimatch": {
-      "version": "5.1.9",
-      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz",
-      "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==",
-      "license": "ISC",
-      "dependencies": {
-        "brace-expansion": "^2.0.1"
-      },
-      "engines": {
-        "node": ">=10"
+        "node": ">=22.12.0 || >=20.19.0 <21.0.0",
+        "npm": ">=10"
       }
     },
     "node_modules/@redocly/respect-core": {
-      "version": "1.34.13",
-      "resolved": "https://registry.npmjs.org/@redocly/respect-core/-/respect-core-1.34.13.tgz",
-      "integrity": "sha512-py7c11iC98yv7BHlvk4h4ePrsvAMwGZ+PuS22Oyh8rFeennaps3azdNquSrKg7f5RsUA9yd0SswXSfkzuJ5Nrw==",
-      "license": "MIT",
-      "dependencies": {
-        "@faker-js/faker": "7.6.0",
-        "@redocly/ajv": "8.11.2",
-        "@redocly/openapi-core": "1.34.13",
-        "better-ajv-errors": "1.2.0",
-        "colorette": "2.0.20",
-        "concat-stream": "2.0.0",
-        "cookie": "0.7.2",
-        "dotenv": "16.4.7",
-        "form-data": "4.0.4",
-        "jest-diff": "29.7.0",
-        "jest-matcher-utils": "29.7.0",
-        "js-yaml": "4.1.0",
-        "json-pointer": "0.6.2",
-        "jsonpath-plus": "10.3.0",
-        "open": "10.1.0",
-        "openapi-sampler": "1.7.0",
-        "outdent": "0.8.0",
-        "set-cookie-parser": "2.7.1",
-        "undici": "6.24.1"
+      "version": "2.31.2",
+      "resolved": "https://registry.npmjs.org/@redocly/respect-core/-/respect-core-2.31.2.tgz",
+      "integrity": "sha512-M5zQV9M8uazCl46EVKKjWPo7M8EFNHFQOdovhqH+IfdAop5kHPi1fR1xSwrckak84XON0a+CqPU7z7+YCON0Bg==",
+      "license": "MIT",
+      "dependencies": {
+        "@faker-js/faker": "^7.6.0",
+        "@noble/hashes": "^1.8.0",
+        "@redocly/ajv": "^8.18.1",
+        "@redocly/openapi-core": "2.31.2",
+        "ajv": "npm:@redocly/ajv@8.18.1",
+        "better-ajv-errors": "^2.0.3",
+        "colorette": "^2.0.20",
+        "json-pointer": "^0.6.2",
+        "jsonpath-rfc9535": "1.3.0",
+        "openapi-sampler": "^1.7.1",
+        "outdent": "^0.8.0",
+        "picomatch": "^4.0.4"
       },
       "engines": {
-        "node": ">=18.17.0",
-        "npm": ">=9.5.0"
+        "node": ">=22.12.0 || >=20.19.0 <21.0.0",
+        "npm": ">=10"
       }
     },
     "node_modules/@redocly/respect-core/node_modules/colorette": {
@@ -2285,28 +2908,26 @@
       "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==",
       "license": "MIT"
     },
-    "node_modules/@redocly/respect-core/node_modules/js-yaml": {
-      "version": "4.1.0",
-      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
-      "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
-      "license": "MIT",
-      "dependencies": {
-        "argparse": "^2.0.1"
-      },
-      "bin": {
-        "js-yaml": "bin/js-yaml.js"
-      }
+    "node_modules/@rtsao/scc": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz",
+      "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==",
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/@sinclair/typebox": {
-      "version": "0.27.8",
-      "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
-      "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA=="
+      "version": "0.27.10",
+      "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz",
+      "integrity": "sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==",
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/@sinonjs/commons": {
       "version": "3.0.1",
       "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz",
       "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==",
       "dev": true,
+      "license": "BSD-3-Clause",
       "dependencies": {
         "type-detect": "4.0.8"
       }
@@ -2316,6 +2937,7 @@
       "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz",
       "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==",
       "dev": true,
+      "license": "BSD-3-Clause",
       "dependencies": {
         "@sinonjs/commons": "^3.0.0"
       }
@@ -2328,34 +2950,58 @@
       "license": "MIT"
     },
     "node_modules/@tsconfig/node10": {
-      "version": "1.0.11",
-      "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz",
-      "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==",
-      "dev": true
+      "version": "1.0.12",
+      "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz",
+      "integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==",
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/@tsconfig/node12": {
       "version": "1.0.11",
       "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
       "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/@tsconfig/node14": {
       "version": "1.0.3",
       "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
       "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/@tsconfig/node16": {
       "version": "1.0.4",
       "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
       "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/@tybys/wasm-util": {
+      "version": "0.10.2",
+      "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz",
+      "integrity": "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==",
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "dependencies": {
+        "tslib": "^2.4.0"
+      }
+    },
+    "node_modules/@tybys/wasm-util/node_modules/tslib": {
+      "version": "2.8.1",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+      "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+      "dev": true,
+      "license": "0BSD",
+      "optional": true
     },
     "node_modules/@types/babel__core": {
       "version": "7.20.5",
       "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
       "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/parser": "^7.20.7",
         "@babel/types": "^7.20.7",
@@ -2365,10 +3011,11 @@
       }
     },
     "node_modules/@types/babel__generator": {
-      "version": "7.6.8",
-      "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz",
-      "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==",
+      "version": "7.27.0",
+      "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz",
+      "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/types": "^7.0.0"
       }
@@ -2378,25 +3025,28 @@
       "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz",
       "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/parser": "^7.1.0",
         "@babel/types": "^7.0.0"
       }
     },
     "node_modules/@types/babel__traverse": {
-      "version": "7.20.5",
-      "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz",
-      "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==",
+      "version": "7.28.0",
+      "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz",
+      "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@babel/types": "^7.20.7"
+        "@babel/types": "^7.28.2"
       }
     },
     "node_modules/@types/body-parser": {
-      "version": "1.19.5",
-      "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz",
-      "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==",
+      "version": "1.19.6",
+      "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz",
+      "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@types/connect": "*",
         "@types/node": "*"
@@ -2407,27 +3057,30 @@
       "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz",
       "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@types/node": "*"
       }
     },
     "node_modules/@types/express": {
-      "version": "4.17.21",
-      "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz",
-      "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==",
+      "version": "4.17.25",
+      "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.25.tgz",
+      "integrity": "sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@types/body-parser": "*",
         "@types/express-serve-static-core": "^4.17.33",
         "@types/qs": "*",
-        "@types/serve-static": "*"
+        "@types/serve-static": "^1"
       }
     },
     "node_modules/@types/express-serve-static-core": {
-      "version": "4.19.0",
-      "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.0.tgz",
-      "integrity": "sha512-bGyep3JqPCRry1wq+O5n7oiBgGWmeIJXPjXXCo8EK0u8duZGSYar7cGqd3ML2JUsLGeB7fmc06KYo9fLGWqPvQ==",
+      "version": "4.19.8",
+      "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.8.tgz",
+      "integrity": "sha512-02S5fmqeoKzVZCHPZid4b8JH2eM5HzQLZWN2FohQEy/0eXTq8VXZfSN6Pcr3F6N9R/vNrj7cpgbhjie6m/1tCA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@types/node": "*",
         "@types/qs": "*",
@@ -2440,27 +3093,31 @@
       "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz",
       "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@types/node": "*"
       }
     },
     "node_modules/@types/http-errors": {
-      "version": "2.0.4",
-      "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz",
-      "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==",
-      "dev": true
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz",
+      "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==",
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/@types/istanbul-lib-coverage": {
       "version": "2.0.6",
       "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz",
       "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/@types/istanbul-lib-report": {
       "version": "3.0.3",
       "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz",
       "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@types/istanbul-lib-coverage": "*"
       }
@@ -2470,6 +3127,7 @@
       "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz",
       "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@types/istanbul-lib-report": "*"
       }
@@ -2479,6 +3137,7 @@
       "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz",
       "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "expect": "^29.0.0",
         "pretty-format": "^29.0.0"
@@ -2487,77 +3146,84 @@
     "node_modules/@types/json-schema": {
       "version": "7.0.15",
       "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
-      "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="
+      "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
+      "license": "MIT"
     },
     "node_modules/@types/json5": {
       "version": "0.0.29",
       "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
       "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/@types/mime": {
       "version": "1.3.5",
       "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz",
       "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/@types/node": {
-      "version": "20.12.7",
-      "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz",
-      "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==",
+      "version": "20.19.41",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.41.tgz",
+      "integrity": "sha512-ECymXOukMnOoVkC2bb1Vc/w/836DXncOg5m8Xj1RH7xSHZJWNYY6Zh7EH477vcnD5egKNNfy2RpNOmuChhFPgQ==",
+      "license": "MIT",
       "dependencies": {
-        "undici-types": "~5.26.4"
+        "undici-types": "~6.21.0"
       }
     },
     "node_modules/@types/qs": {
-      "version": "6.9.15",
-      "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz",
-      "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==",
-      "dev": true
+      "version": "6.15.1",
+      "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.15.1.tgz",
+      "integrity": "sha512-GZHUBZR9hckSUhrxmp1nG6NwdpM9fCunJwyThLW1X3AyHgd9IlHb6VANpQQqDr2o/qQp6McZ3y/IA2rVzKzSbw==",
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/@types/range-parser": {
       "version": "1.2.7",
       "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz",
       "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==",
-      "dev": true
-    },
-    "node_modules/@types/semver": {
-      "version": "7.5.8",
-      "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz",
-      "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/@types/send": {
-      "version": "0.17.4",
-      "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz",
-      "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==",
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.1.tgz",
+      "integrity": "sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@types/mime": "^1",
         "@types/node": "*"
       }
     },
     "node_modules/@types/serve-static": {
-      "version": "1.15.7",
-      "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz",
-      "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==",
+      "version": "1.15.10",
+      "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.10.tgz",
+      "integrity": "sha512-tRs1dB+g8Itk72rlSI2ZrW6vZg0YrLI81iQSTkMmOqnqCaNr/8Ek4VwWcN5vZgCYWbg/JJSGBlUaYGAOP73qBw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@types/http-errors": "*",
         "@types/node": "*",
-        "@types/send": "*"
+        "@types/send": "<1"
+      }
+    },
+    "node_modules/@types/serve-static/node_modules/@types/send": {
+      "version": "0.17.6",
+      "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.6.tgz",
+      "integrity": "sha512-Uqt8rPBE8SY0RK8JB1EzVOIZ32uqy8HwdxCnoCOsYrvnswqmFZ/k+9Ikidlk/ImhsdvBsloHbAlewb2IEBV/Og==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@types/mime": "^1",
+        "@types/node": "*"
       }
     },
     "node_modules/@types/stack-utils": {
       "version": "2.0.3",
       "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz",
       "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==",
-      "dev": true
-    },
-    "node_modules/@types/stylis": {
-      "version": "4.2.7",
-      "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.7.tgz",
-      "integrity": "sha512-VgDNokpBoKF+wrdvhAAfS55OMQpL6QRglwTwNC3kIgBrzZxA4WsFj+2eLfEA/uMUDzBcEhYmjSbwQakn/i3ajA==",
+      "dev": true,
       "license": "MIT"
     },
     "node_modules/@types/trusted-types": {
@@ -2568,10 +3234,11 @@
       "optional": true
     },
     "node_modules/@types/yargs": {
-      "version": "17.0.32",
-      "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz",
-      "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==",
+      "version": "17.0.35",
+      "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz",
+      "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@types/yargs-parser": "*"
       }
@@ -2580,122 +3247,153 @@
       "version": "21.0.3",
       "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz",
       "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/@typescript-eslint/eslint-plugin": {
-      "version": "7.7.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.0.tgz",
-      "integrity": "sha512-GJWR0YnfrKnsRoluVO3PRb9r5aMZriiMMM/RHj5nnTrBy1/wIgk76XCtCKcnXGjpZQJQRFtGV9/0JJ6n30uwpQ==",
+      "version": "8.59.4",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.59.4.tgz",
+      "integrity": "sha512-PegsU+XfyJJNjd4+u/k6f9yTyp0lEXXiPopUNobZcIAUJFGICFLN+sP0Rb3JehVmiij1Ph0dFGYqODoRo/2+6A==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@eslint-community/regexpp": "^4.10.0",
-        "@typescript-eslint/scope-manager": "7.7.0",
-        "@typescript-eslint/type-utils": "7.7.0",
-        "@typescript-eslint/utils": "7.7.0",
-        "@typescript-eslint/visitor-keys": "7.7.0",
-        "debug": "^4.3.4",
-        "graphemer": "^1.4.0",
-        "ignore": "^5.3.1",
+        "@eslint-community/regexpp": "^4.12.2",
+        "@typescript-eslint/scope-manager": "8.59.4",
+        "@typescript-eslint/type-utils": "8.59.4",
+        "@typescript-eslint/utils": "8.59.4",
+        "@typescript-eslint/visitor-keys": "8.59.4",
+        "ignore": "^7.0.5",
         "natural-compare": "^1.4.0",
-        "semver": "^7.6.0",
-        "ts-api-utils": "^1.3.0"
+        "ts-api-utils": "^2.5.0"
       },
       "engines": {
-        "node": "^18.18.0 || >=20.0.0"
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
       },
       "funding": {
         "type": "opencollective",
         "url": "https://opencollective.com/typescript-eslint"
       },
       "peerDependencies": {
-        "@typescript-eslint/parser": "^7.0.0",
-        "eslint": "^8.56.0"
-      },
-      "peerDependenciesMeta": {
-        "typescript": {
-          "optional": true
-        }
+        "@typescript-eslint/parser": "^8.59.4",
+        "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+        "typescript": ">=4.8.4 <6.1.0"
       }
     },
     "node_modules/@typescript-eslint/parser": {
-      "version": "7.7.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.0.tgz",
-      "integrity": "sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg==",
+      "version": "8.59.4",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.59.4.tgz",
+      "integrity": "sha512-zORHqO/tuhxY1zWuTvMUqddRxpiFJ72xVfcNoWpqdLjs6lfPbuQBJuW4pk+49/uBMy7Ssr4bzgjiKmmDB1UbZQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/scope-manager": "7.7.0",
-        "@typescript-eslint/types": "7.7.0",
-        "@typescript-eslint/typescript-estree": "7.7.0",
-        "@typescript-eslint/visitor-keys": "7.7.0",
-        "debug": "^4.3.4"
+        "@typescript-eslint/scope-manager": "8.59.4",
+        "@typescript-eslint/types": "8.59.4",
+        "@typescript-eslint/typescript-estree": "8.59.4",
+        "@typescript-eslint/visitor-keys": "8.59.4",
+        "debug": "^4.4.3"
       },
       "engines": {
-        "node": "^18.18.0 || >=20.0.0"
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
       },
       "funding": {
         "type": "opencollective",
         "url": "https://opencollective.com/typescript-eslint"
       },
       "peerDependencies": {
-        "eslint": "^8.56.0"
+        "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+        "typescript": ">=4.8.4 <6.1.0"
+      }
+    },
+    "node_modules/@typescript-eslint/project-service": {
+      "version": "8.59.4",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.59.4.tgz",
+      "integrity": "sha512-Ly00Vu4oAacfDeHp2Zg85ioNG6l8HG+tN1D7J+xTHSxu9y0awYKJ2zH1rFBn8ZSfuGK+7FxK3Cgl3uAz0aZZLg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@typescript-eslint/tsconfig-utils": "^8.59.4",
+        "@typescript-eslint/types": "^8.59.4",
+        "debug": "^4.4.3"
       },
-      "peerDependenciesMeta": {
-        "typescript": {
-          "optional": true
-        }
+      "engines": {
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/typescript-eslint"
+      },
+      "peerDependencies": {
+        "typescript": ">=4.8.4 <6.1.0"
       }
     },
     "node_modules/@typescript-eslint/scope-manager": {
-      "version": "7.7.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.0.tgz",
-      "integrity": "sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw==",
+      "version": "8.59.4",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.59.4.tgz",
+      "integrity": "sha512-mUeR/3H1WrTAddJrwut8OoPjfauaztMQmRwV5fQTUyNVJCLiUXXe4lGEyYIL2oFDpP7UtgbGJXCt72wT0z2S3Q==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/types": "7.7.0",
-        "@typescript-eslint/visitor-keys": "7.7.0"
+        "@typescript-eslint/types": "8.59.4",
+        "@typescript-eslint/visitor-keys": "8.59.4"
+      },
+      "engines": {
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
       },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/typescript-eslint"
+      }
+    },
+    "node_modules/@typescript-eslint/tsconfig-utils": {
+      "version": "8.59.4",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.59.4.tgz",
+      "integrity": "sha512-DLCpnKgD4alVxTBSKulK+gU1KCqOgUXfDRDXh2mZgzokQKa/70ax93I2uVO3m/LLvIAtWZIFoiifudmIqAxpMA==",
+      "dev": true,
+      "license": "MIT",
       "engines": {
-        "node": "^18.18.0 || >=20.0.0"
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
       },
       "funding": {
         "type": "opencollective",
         "url": "https://opencollective.com/typescript-eslint"
+      },
+      "peerDependencies": {
+        "typescript": ">=4.8.4 <6.1.0"
       }
     },
     "node_modules/@typescript-eslint/type-utils": {
-      "version": "7.7.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.7.0.tgz",
-      "integrity": "sha512-bOp3ejoRYrhAlnT/bozNQi3nio9tIgv3U5C0mVDdZC7cpcQEDZXvq8inrHYghLVwuNABRqrMW5tzAv88Vy77Sg==",
+      "version": "8.59.4",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.59.4.tgz",
+      "integrity": "sha512-uonTuPAAKr9XaBGqJ3LjYTh72zy5DyGesljO9gtmk/eFW0W1fRHjnwVYKB35Lm8d5Q5CluEW3gPHjTvZTmgrfA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/typescript-estree": "7.7.0",
-        "@typescript-eslint/utils": "7.7.0",
-        "debug": "^4.3.4",
-        "ts-api-utils": "^1.3.0"
+        "@typescript-eslint/types": "8.59.4",
+        "@typescript-eslint/typescript-estree": "8.59.4",
+        "@typescript-eslint/utils": "8.59.4",
+        "debug": "^4.4.3",
+        "ts-api-utils": "^2.5.0"
       },
       "engines": {
-        "node": "^18.18.0 || >=20.0.0"
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
       },
       "funding": {
         "type": "opencollective",
         "url": "https://opencollective.com/typescript-eslint"
       },
       "peerDependencies": {
-        "eslint": "^8.56.0"
-      },
-      "peerDependenciesMeta": {
-        "typescript": {
-          "optional": true
-        }
+        "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+        "typescript": ">=4.8.4 <6.1.0"
       }
     },
     "node_modules/@typescript-eslint/types": {
-      "version": "7.7.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.0.tgz",
-      "integrity": "sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w==",
+      "version": "8.59.4",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.59.4.tgz",
+      "integrity": "sha512-F1o7WJcCq+bc8dwcO/YsSEOudAH8RDtaOhM6wcAQhcUsFhnWQl81JKy48q1hoxAU0qrzM89+31GYh1515Zde3Q==",
       "dev": true,
+      "license": "MIT",
       "engines": {
-        "node": "^18.18.0 || >=20.0.0"
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
       },
       "funding": {
         "type": "opencollective",
@@ -2703,122 +3401,454 @@
       }
     },
     "node_modules/@typescript-eslint/typescript-estree": {
-      "version": "7.7.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.0.tgz",
-      "integrity": "sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ==",
+      "version": "8.59.4",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.59.4.tgz",
+      "integrity": "sha512-F+RuOmcDXo4+TPdfd/TCLS3m2nw8gE9XXyZLrA3JBfaA5tz9TtdkyD3YJFmPxulyc2cKbEok/CvFE3MgSLWnag==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/types": "7.7.0",
-        "@typescript-eslint/visitor-keys": "7.7.0",
-        "debug": "^4.3.4",
-        "globby": "^11.1.0",
-        "is-glob": "^4.0.3",
-        "minimatch": "^9.0.4",
-        "semver": "^7.6.0",
-        "ts-api-utils": "^1.3.0"
+        "@typescript-eslint/project-service": "8.59.4",
+        "@typescript-eslint/tsconfig-utils": "8.59.4",
+        "@typescript-eslint/types": "8.59.4",
+        "@typescript-eslint/visitor-keys": "8.59.4",
+        "debug": "^4.4.3",
+        "minimatch": "^10.2.2",
+        "semver": "^7.7.3",
+        "tinyglobby": "^0.2.15",
+        "ts-api-utils": "^2.5.0"
       },
       "engines": {
-        "node": "^18.18.0 || >=20.0.0"
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
       },
       "funding": {
         "type": "opencollective",
         "url": "https://opencollective.com/typescript-eslint"
       },
-      "peerDependenciesMeta": {
-        "typescript": {
-          "optional": true
-        }
+      "peerDependencies": {
+        "typescript": ">=4.8.4 <6.1.0"
       }
     },
-    "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
-      "version": "9.0.9",
-      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz",
-      "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==",
+    "node_modules/@typescript-eslint/utils": {
+      "version": "8.59.4",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.59.4.tgz",
+      "integrity": "sha512-cYXeNAUsG4lJo5dbc1FcKm+JwIWrj1/UpTORsC6tGMjEZ81DYcvIr9/ueikhMa/Y/gDQYGp+YX9/xQrXje5BJw==",
       "dev": true,
-      "license": "ISC",
+      "license": "MIT",
       "dependencies": {
-        "brace-expansion": "^2.0.2"
+        "@eslint-community/eslint-utils": "^4.9.1",
+        "@typescript-eslint/scope-manager": "8.59.4",
+        "@typescript-eslint/types": "8.59.4",
+        "@typescript-eslint/typescript-estree": "8.59.4"
       },
       "engines": {
-        "node": ">=16 || 14 >=14.17"
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
       },
       "funding": {
-        "url": "https://github.com/sponsors/isaacs"
+        "type": "opencollective",
+        "url": "https://opencollective.com/typescript-eslint"
+      },
+      "peerDependencies": {
+        "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+        "typescript": ">=4.8.4 <6.1.0"
       }
     },
-    "node_modules/@typescript-eslint/utils": {
-      "version": "7.7.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.0.tgz",
-      "integrity": "sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig==",
+    "node_modules/@typescript-eslint/visitor-keys": {
+      "version": "8.59.4",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.59.4.tgz",
+      "integrity": "sha512-U3gxVaDVnuZKhSspW/MzMxE1kq7zOdc072FcSNoqA1I9p8HyKbBFfEHoWckBAMgNMph4MamwS5iTVzFmrnt8TQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@typescript-eslint/types": "8.59.4",
+        "eslint-visitor-keys": "^5.0.0"
+      },
+      "engines": {
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/typescript-eslint"
+      }
+    },
+    "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",
+      "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==",
+      "dev": true,
+      "license": "Apache-2.0",
+      "engines": {
+        "node": "^20.19.0 || ^22.13.0 || >=24"
+      },
+      "funding": {
+        "url": "https://opencollective.com/eslint"
+      }
+    },
+    "node_modules/@ungap/structured-clone": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.1.tgz",
+      "integrity": "sha512-mUFwbeTqrVgDQxFveS+df2yfap6iuP20NAKAsBt5jDEoOTDew+zwLAOilHCeQJOVSvmgCX4ogqIrA0mnyr08yQ==",
+      "dev": true,
+      "license": "ISC"
+    },
+    "node_modules/@unrs/resolver-binding-android-arm-eabi": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.12.2.tgz",
+      "integrity": "sha512-g5T90pqg1bo/7mytQx6F4iBNC0Wsh9cu+z9veDbFjc7HjpesJFWD7QMS0NGStXM075+7dJPPVvBbpZlnrdpi/w==",
+      "cpu": [
+        "arm"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "android"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-android-arm64": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.12.2.tgz",
+      "integrity": "sha512-YGCRZv/9GLhwmz6mYDeTsm/92BAyR28l6c2ReweVW5pWgfsitWLY8upvfRlGdoyD8HjeTHSYJWyZGD4KJA/nFQ==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "android"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-darwin-arm64": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.12.2.tgz",
+      "integrity": "sha512-u9DiNT1auQMO20A9SyTuG3wUgQWB9Z7KjAg0uFuCDR1FsAY8A0CG2S6JpHS1xwm/w1G08bjXZDcyOCjv1WAm2w==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "darwin"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-darwin-x64": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.12.2.tgz",
+      "integrity": "sha512-f7rPLi/T1HVKZu/u6t87lroib16n8vrSzcyxI7lg4BGO9UF26KhQL44sd9eOUgrTYhvRXtWOIZT5PejdPyJfUA==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "darwin"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-freebsd-x64": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.12.2.tgz",
+      "integrity": "sha512-BpcOjWCJub6nRZUS2zA20pmLvjtqAtGejETaIyRLiZiQf++cbrjltLA5NN/xaXfqeOBOSlMFbemIl5/S5tljmg==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "freebsd"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.12.2.tgz",
+      "integrity": "sha512-vZTDvdSISZjJx66OzJqtsOhzifbqRjbmI1Mnu49fQDwog5GtDI4QidRiEAYbZCRj9C8YZEW+3ZjqsyS9GR4k2A==",
+      "cpu": [
+        "arm"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.12.2.tgz",
+      "integrity": "sha512-BiPI+IrIlwcW4nLLMM21+B1dFPzd55yAVgVGrdgDjNef+ch03GdxrcyaIz8X9SsQirh/kCQ7mviyWlMxdh2D7g==",
+      "cpu": [
+        "arm"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-linux-arm64-gnu": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.12.2.tgz",
+      "integrity": "sha512-zJc0H99FEPoFfSrNpa91HYfxzfAJCr502oxNK1cfdC9hlaFI43RT+JFCann9JUgZmLzzntChHyn13Sgn9ljHNg==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "libc": [
+        "glibc"
+      ],
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-linux-arm64-musl": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.12.2.tgz",
+      "integrity": "sha512-KQ3Lki6l+Pz1k/eBipN41ES+YUK30beLGb9YqcB1O542cyLCNE6GaxrfcY3T6EezmGGk84wb5XyO9loTM9tkcA==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "libc": [
+        "musl"
+      ],
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-linux-loong64-gnu": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-gnu/-/resolver-binding-linux-loong64-gnu-1.12.2.tgz",
+      "integrity": "sha512-3SJGEh1DborhG6pyxvhPzCT4bbSIVihsvgJc13P1bHG7KLdNDaF9T3gsTwFc7Jw/5Y5/iWOjkEx7Zy0NvCGX3Q==",
+      "cpu": [
+        "loong64"
+      ],
+      "dev": true,
+      "libc": [
+        "glibc"
+      ],
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-linux-loong64-musl": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-musl/-/resolver-binding-linux-loong64-musl-1.12.2.tgz",
+      "integrity": "sha512-jiuG/Obbel7uw1PwHNFfrkiKhLAF6mnyZ6aWlOAVN9WqKm8v0OFGnciJIHu8+CMvXLQ8AD51LPzAoUfT21D5Ew==",
+      "cpu": [
+        "loong64"
+      ],
+      "dev": true,
+      "libc": [
+        "musl"
+      ],
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.12.2.tgz",
+      "integrity": "sha512-q7xRvVpmcfeL+LlZg8Pbbo6QaTZwDU5BaGZbwfhkEsXJn3Was8xYfE0RBH266xZt0rM6B7i8xAYIvjthuUIWHg==",
+      "cpu": [
+        "ppc64"
+      ],
+      "dev": true,
+      "libc": [
+        "glibc"
+      ],
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.12.2.tgz",
+      "integrity": "sha512-0CVdx6lcnT3Q9inOH8tsMIOJ6ImndllMjqJHg8RLVdB7Vq4SfkEXl9mCSsVNuNA4MCYycRicCUxPCabVHJRr6A==",
+      "cpu": [
+        "riscv64"
+      ],
+      "dev": true,
+      "libc": [
+        "glibc"
+      ],
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-linux-riscv64-musl": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.12.2.tgz",
+      "integrity": "sha512-iOwlRo9vnp6R6ohHQS11n0NnfdXx/omhkocmIfaPRpQhKZ+3BDMkkdRVh53qjkFkpPddf+FETA28NwGN7l5l+w==",
+      "cpu": [
+        "riscv64"
+      ],
+      "dev": true,
+      "libc": [
+        "musl"
+      ],
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-linux-s390x-gnu": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.12.2.tgz",
+      "integrity": "sha512-HYJtLfXq94q8iZNFT1lknx258wlkkWhZeUXJRqzKBBUJ00CvZ+N33zgbCqimLjsyw5Va6uUxhVa12mI+kaveEw==",
+      "cpu": [
+        "s390x"
+      ],
+      "dev": true,
+      "libc": [
+        "glibc"
+      ],
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-linux-x64-gnu": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.12.2.tgz",
+      "integrity": "sha512-mPsUhunKKDih5O96Y6enDQyHc1SqBPlY1E/SfMWDM3EdJ95Z9CArPeCVwCCqbP45ljvivdEk8Fxn+SIb1rDAJQ==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "libc": [
+        "glibc"
+      ],
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-linux-x64-musl": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.12.2.tgz",
+      "integrity": "sha512-azrt6+5ydLd8Vt210AAFis/lZevSfPw93EJRIJG+xPu4WCJ8K0kppCTpMyLPcKT7H15M4Jnt2tMp5bOvCkRC6A==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "libc": [
+        "musl"
+      ],
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "linux"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-openharmony-arm64": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-openharmony-arm64/-/resolver-binding-openharmony-arm64-1.12.2.tgz",
+      "integrity": "sha512-YZ9hP4O0X9PQb8eO980qmLNGH4zT3I9+SZTdt0Pr0YyuGQhYKoOZkV02VzrzyOZJ5xIJ3UFIenKkUkGg8GjgWQ==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "openharmony"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-wasm32-wasi": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.12.2.tgz",
+      "integrity": "sha512-tYFDIkMxSflfEc/h92ZWNsZlHSwgimbNHSO3PL2JWQHfCuC2q316jMyYU9TIWZsFK2bQwyK5VAdYgn8ygPj69A==",
+      "cpu": [
+        "wasm32"
+      ],
       "dev": true,
+      "license": "MIT",
+      "optional": true,
       "dependencies": {
-        "@eslint-community/eslint-utils": "^4.4.0",
-        "@types/json-schema": "^7.0.15",
-        "@types/semver": "^7.5.8",
-        "@typescript-eslint/scope-manager": "7.7.0",
-        "@typescript-eslint/types": "7.7.0",
-        "@typescript-eslint/typescript-estree": "7.7.0",
-        "semver": "^7.6.0"
+        "@emnapi/core": "1.10.0",
+        "@emnapi/runtime": "1.10.0",
+        "@napi-rs/wasm-runtime": "^1.1.4"
       },
       "engines": {
-        "node": "^18.18.0 || >=20.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/typescript-eslint"
-      },
-      "peerDependencies": {
-        "eslint": "^8.56.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@typescript-eslint/visitor-keys": {
-      "version": "7.7.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.0.tgz",
-      "integrity": "sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA==",
+    "node_modules/@unrs/resolver-binding-win32-arm64-msvc": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.12.2.tgz",
+      "integrity": "sha512-qzNyg3xL0VPQmCaUh+N5jSitce6k+uCBfMDesWRnlULOZaqUkaJ0ybdT+UqlAWJoQjuqfIU/0Ptx9bteN4D82g==",
+      "cpu": [
+        "arm64"
+      ],
       "dev": true,
-      "dependencies": {
-        "@typescript-eslint/types": "7.7.0",
-        "eslint-visitor-keys": "^3.4.3"
-      },
-      "engines": {
-        "node": "^18.18.0 || >=20.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/typescript-eslint"
-      }
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ]
     },
-    "node_modules/@ungap/structured-clone": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
-      "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==",
-      "dev": true
+    "node_modules/@unrs/resolver-binding-win32-ia32-msvc": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.12.2.tgz",
+      "integrity": "sha512-WD9sY00OfpHVGfsnHZoA8jVT+esS/Bg8z8jzxp5BnDCjjwsuKsPQrzswwpFy4J1AUJbXPRfkpcX0mXrzeXW79g==",
+      "cpu": [
+        "ia32"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ]
+    },
+    "node_modules/@unrs/resolver-binding-win32-x64-msvc": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.12.2.tgz",
+      "integrity": "sha512-nAB74NfSNKknqQ1RrYj6uz8FcXEomu/MATJZxh/x+BArzN2U3JbOYC0APYzUIGhVY3m5hRxA8VPNdPBoG8txlA==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ]
     },
     "node_modules/@vercel/ncc": {
-      "version": "0.38.1",
-      "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.1.tgz",
-      "integrity": "sha512-IBBb+iI2NLu4VQn3Vwldyi2QwaXt5+hTyh58ggAMoCGE6DJmPvwL3KPBWcJl1m9LYPChBLE980Jw+CS4Wokqxw==",
+      "version": "0.38.4",
+      "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.4.tgz",
+      "integrity": "sha512-8LwjnlP39s08C08J5NstzriPvW1SP8Zfpp1BvC2sI35kPeZnHfxVkCwu4/+Wodgnd60UtT1n8K8zw+Mp7J9JmQ==",
       "dev": true,
+      "license": "MIT",
       "bin": {
         "ncc": "dist/ncc/cli.js"
       }
     },
-    "node_modules/abort-controller": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
-      "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
-      "dependencies": {
-        "event-target-shim": "^5.0.0"
-      },
-      "engines": {
-        "node": ">=6.5"
-      }
-    },
     "node_modules/accepts": {
       "version": "1.3.8",
       "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
       "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "mime-types": "~2.1.34",
         "negotiator": "0.6.3"
@@ -2828,10 +3858,11 @@
       }
     },
     "node_modules/acorn": {
-      "version": "8.11.3",
-      "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
-      "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
+      "version": "8.16.0",
+      "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz",
+      "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
       "dev": true,
+      "license": "MIT",
       "bin": {
         "acorn": "bin/acorn"
       },
@@ -2844,44 +3875,67 @@
       "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
       "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
       "dev": true,
+      "license": "MIT",
       "peerDependencies": {
         "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
       }
     },
     "node_modules/acorn-walk": {
-      "version": "8.3.2",
-      "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz",
-      "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==",
+      "version": "8.3.5",
+      "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.5.tgz",
+      "integrity": "sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==",
       "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "acorn": "^8.11.0"
+      },
       "engines": {
         "node": ">=0.4.0"
       }
     },
     "node_modules/agent-base": {
-      "version": "7.1.3",
-      "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz",
-      "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==",
+      "version": "7.1.4",
+      "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",
+      "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==",
       "license": "MIT",
       "engines": {
         "node": ">= 14"
       }
     },
     "node_modules/ajv": {
-      "version": "6.14.0",
-      "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz",
-      "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==",
+      "name": "@redocly/ajv",
+      "version": "8.18.1",
+      "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.18.1.tgz",
+      "integrity": "sha512-Ifm/pP/tul1qmAecpbVxCBluVE32rKfjf8gYXH4xI2gCv9mRWFhJMHzkPDM4TXlxwPQYIFegymlsy8lXz7optA==",
       "license": "MIT",
       "dependencies": {
-        "fast-deep-equal": "^3.1.1",
-        "fast-json-stable-stringify": "^2.0.0",
-        "json-schema-traverse": "^0.4.1",
-        "uri-js": "^4.2.2"
+        "fast-deep-equal": "^3.1.3",
+        "fast-uri": "^3.0.1",
+        "json-schema-traverse": "^1.0.0",
+        "require-from-string": "^2.0.2"
       },
       "funding": {
         "type": "github",
         "url": "https://github.com/sponsors/epoberezkin"
       }
     },
+    "node_modules/ajv-formats": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz",
+      "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==",
+      "license": "MIT",
+      "dependencies": {
+        "ajv": "^8.0.0"
+      },
+      "peerDependencies": {
+        "ajv": "^8.0.0"
+      },
+      "peerDependenciesMeta": {
+        "ajv": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/amp": {
       "version": "0.3.1",
       "resolved": "https://registry.npmjs.org/amp/-/amp-0.3.1.tgz",
@@ -2904,6 +3958,7 @@
       "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz",
       "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=6"
       }
@@ -2913,6 +3968,7 @@
       "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
       "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "type-fest": "^0.21.3"
       },
@@ -2928,6 +3984,7 @@
       "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
       "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
       "dev": true,
+      "license": "(MIT OR CC0-1.0)",
       "engines": {
         "node": ">=10"
       },
@@ -2939,6 +3996,7 @@
       "version": "5.0.1",
       "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
       "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
@@ -2947,6 +4005,7 @@
       "version": "4.3.0",
       "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
       "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+      "license": "MIT",
       "dependencies": {
         "color-convert": "^2.0.1"
       },
@@ -2971,6 +4030,8 @@
       "version": "3.1.3",
       "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
       "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+      "dev": true,
+      "license": "ISC",
       "dependencies": {
         "normalize-path": "^3.0.0",
         "picomatch": "^2.0.4"
@@ -2979,34 +4040,51 @@
         "node": ">= 8"
       }
     },
+    "node_modules/anymatch/node_modules/picomatch": {
+      "version": "2.3.2",
+      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
+      "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=8.6"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/jonschlinkert"
+      }
+    },
     "node_modules/arg": {
       "version": "4.1.3",
       "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
       "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/argparse": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
-      "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
+      "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+      "license": "Python-2.0"
     },
     "node_modules/aria-query": {
-      "version": "5.3.0",
-      "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
-      "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
+      "version": "5.3.2",
+      "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz",
+      "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==",
       "dev": true,
-      "dependencies": {
-        "dequal": "^2.0.3"
+      "license": "Apache-2.0",
+      "engines": {
+        "node": ">= 0.4"
       }
     },
     "node_modules/array-buffer-byte-length": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz",
-      "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==",
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz",
+      "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.5",
-        "is-array-buffer": "^3.0.4"
+        "call-bound": "^1.0.3",
+        "is-array-buffer": "^3.0.5"
       },
       "engines": {
         "node": ">= 0.4"
@@ -3019,19 +4097,24 @@
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
       "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/array-includes": {
-      "version": "3.1.7",
-      "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz",
-      "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==",
+      "version": "3.1.9",
+      "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz",
+      "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.2.0",
-        "es-abstract": "^1.22.1",
-        "get-intrinsic": "^1.2.1",
-        "is-string": "^1.0.7"
+        "call-bind": "^1.0.8",
+        "call-bound": "^1.0.4",
+        "define-properties": "^1.2.1",
+        "es-abstract": "^1.24.0",
+        "es-object-atoms": "^1.1.1",
+        "get-intrinsic": "^1.3.0",
+        "is-string": "^1.1.1",
+        "math-intrinsics": "^1.1.0"
       },
       "engines": {
         "node": ">= 0.4"
@@ -3045,40 +4128,25 @@
       "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
       "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
-    "node_modules/array.prototype.filter": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.3.tgz",
-      "integrity": "sha512-VizNcj/RGJiUyQBgzwxzE5oHdeuXY5hSbbmKMlphj1cy1Vl7Pn2asCGbSrru6hSQjmCzqTBPVWAF/whmEOVHbw==",
-      "dev": true,
-      "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.2.0",
-        "es-abstract": "^1.22.1",
-        "es-array-method-boxes-properly": "^1.0.0",
-        "is-string": "^1.0.7"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
     "node_modules/array.prototype.findlastindex": {
-      "version": "1.2.4",
-      "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.4.tgz",
-      "integrity": "sha512-hzvSHUshSpCflDR1QMUBLHGHP1VIEBegT4pix9H/Z92Xw3ySoy6c2qh7lJWTJnRJ8JCZ9bJNCgTyYaJGcJu6xQ==",
+      "version": "1.2.6",
+      "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz",
+      "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.5",
+        "call-bind": "^1.0.8",
+        "call-bound": "^1.0.4",
         "define-properties": "^1.2.1",
-        "es-abstract": "^1.22.3",
+        "es-abstract": "^1.23.9",
         "es-errors": "^1.3.0",
-        "es-shim-unscopables": "^1.0.2"
+        "es-object-atoms": "^1.1.1",
+        "es-shim-unscopables": "^1.1.0"
       },
       "engines": {
         "node": ">= 0.4"
@@ -3088,15 +4156,16 @@
       }
     },
     "node_modules/array.prototype.flat": {
-      "version": "1.3.2",
-      "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz",
-      "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==",
+      "version": "1.3.3",
+      "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz",
+      "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.2.0",
-        "es-abstract": "^1.22.1",
-        "es-shim-unscopables": "^1.0.0"
+        "call-bind": "^1.0.8",
+        "define-properties": "^1.2.1",
+        "es-abstract": "^1.23.5",
+        "es-shim-unscopables": "^1.0.2"
       },
       "engines": {
         "node": ">= 0.4"
@@ -3106,15 +4175,16 @@
       }
     },
     "node_modules/array.prototype.flatmap": {
-      "version": "1.3.2",
-      "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz",
-      "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==",
+      "version": "1.3.3",
+      "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz",
+      "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.2.0",
-        "es-abstract": "^1.22.1",
-        "es-shim-unscopables": "^1.0.0"
+        "call-bind": "^1.0.8",
+        "define-properties": "^1.2.1",
+        "es-abstract": "^1.23.5",
+        "es-shim-unscopables": "^1.0.2"
       },
       "engines": {
         "node": ">= 0.4"
@@ -3124,19 +4194,19 @@
       }
     },
     "node_modules/arraybuffer.prototype.slice": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz",
-      "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==",
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz",
+      "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "array-buffer-byte-length": "^1.0.1",
-        "call-bind": "^1.0.5",
+        "call-bind": "^1.0.8",
         "define-properties": "^1.2.1",
-        "es-abstract": "^1.22.3",
-        "es-errors": "^1.2.1",
-        "get-intrinsic": "^1.2.3",
-        "is-array-buffer": "^3.0.4",
-        "is-shared-array-buffer": "^1.0.2"
+        "es-abstract": "^1.23.5",
+        "es-errors": "^1.3.0",
+        "get-intrinsic": "^1.2.6",
+        "is-array-buffer": "^3.0.4"
       },
       "engines": {
         "node": ">= 0.4"
@@ -3162,34 +4232,39 @@
       "version": "0.0.8",
       "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz",
       "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/ast-types/node_modules/tslib": {
+      "version": "2.8.1",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+      "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+      "dev": true,
+      "license": "0BSD"
     },
     "node_modules/async": {
-      "version": "3.2.5",
-      "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz",
-      "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==",
-      "dev": true
+      "version": "3.2.6",
+      "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",
+      "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",
+      "dev": true,
+      "license": "MIT"
     },
-    "node_modules/asynciterator.prototype": {
+    "node_modules/async-function": {
       "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz",
-      "integrity": "sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==",
+      "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz",
+      "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==",
       "dev": true,
-      "dependencies": {
-        "has-symbols": "^1.0.3"
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.4"
       }
     },
-    "node_modules/asynckit": {
-      "version": "0.4.0",
-      "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
-      "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
-      "license": "MIT"
-    },
     "node_modules/available-typed-arrays": {
       "version": "1.0.7",
       "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",
       "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "possible-typed-array-names": "^1.0.0"
       },
@@ -3201,21 +4276,23 @@
       }
     },
     "node_modules/axe-core": {
-      "version": "4.7.0",
-      "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.7.0.tgz",
-      "integrity": "sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==",
+      "version": "4.11.4",
+      "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.11.4.tgz",
+      "integrity": "sha512-KunSNx+TVpkAw/6ULfhnx+HWRecjqZGTOyquAoWHYLRSdK1tB5Ihce1ZW+UY3fj33bYAFWPu7W/GRSmmrCGuxA==",
       "dev": true,
+      "license": "MPL-2.0",
       "engines": {
         "node": ">=4"
       }
     },
     "node_modules/axobject-query": {
-      "version": "3.2.1",
-      "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz",
-      "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==",
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz",
+      "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==",
       "dev": true,
-      "dependencies": {
-        "dequal": "^2.0.3"
+      "license": "Apache-2.0",
+      "engines": {
+        "node": ">= 0.4"
       }
     },
     "node_modules/babel-jest": {
@@ -3223,6 +4300,7 @@
       "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz",
       "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/transform": "^29.7.0",
         "@types/babel__core": "^7.1.14",
@@ -3244,6 +4322,7 @@
       "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz",
       "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==",
       "dev": true,
+      "license": "BSD-3-Clause",
       "dependencies": {
         "@babel/helper-plugin-utils": "^7.0.0",
         "@istanbuljs/load-nyc-config": "^1.0.0",
@@ -3260,6 +4339,7 @@
       "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz",
       "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==",
       "dev": true,
+      "license": "BSD-3-Clause",
       "dependencies": {
         "@babel/core": "^7.12.3",
         "@babel/parser": "^7.14.7",
@@ -3276,6 +4356,7 @@
       "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
       "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
       "dev": true,
+      "license": "ISC",
       "bin": {
         "semver": "bin/semver.js"
       }
@@ -3285,6 +4366,7 @@
       "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz",
       "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/template": "^7.3.3",
         "@babel/types": "^7.3.3",
@@ -3296,26 +4378,30 @@
       }
     },
     "node_modules/babel-preset-current-node-syntax": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz",
-      "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==",
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz",
+      "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/plugin-syntax-async-generators": "^7.8.4",
         "@babel/plugin-syntax-bigint": "^7.8.3",
-        "@babel/plugin-syntax-class-properties": "^7.8.3",
-        "@babel/plugin-syntax-import-meta": "^7.8.3",
+        "@babel/plugin-syntax-class-properties": "^7.12.13",
+        "@babel/plugin-syntax-class-static-block": "^7.14.5",
+        "@babel/plugin-syntax-import-attributes": "^7.24.7",
+        "@babel/plugin-syntax-import-meta": "^7.10.4",
         "@babel/plugin-syntax-json-strings": "^7.8.3",
-        "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3",
+        "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",
         "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3",
-        "@babel/plugin-syntax-numeric-separator": "^7.8.3",
+        "@babel/plugin-syntax-numeric-separator": "^7.10.4",
         "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
         "@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
         "@babel/plugin-syntax-optional-chaining": "^7.8.3",
-        "@babel/plugin-syntax-top-level-await": "^7.8.3"
+        "@babel/plugin-syntax-private-property-in-object": "^7.14.5",
+        "@babel/plugin-syntax-top-level-await": "^7.14.5"
       },
       "peerDependencies": {
-        "@babel/core": "^7.0.0"
+        "@babel/core": "^7.0.0 || ^8.0.0-0"
       }
     },
     "node_modules/babel-preset-jest": {
@@ -3323,6 +4409,7 @@
       "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz",
       "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "babel-plugin-jest-hoist": "^29.6.3",
         "babel-preset-current-node-syntax": "^1.0.0"
@@ -3335,9 +4422,26 @@
       }
     },
     "node_modules/balanced-match": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
-      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
+      "version": "4.0.4",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
+      "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
+      "license": "MIT",
+      "engines": {
+        "node": "18 || 20 || >=22"
+      }
+    },
+    "node_modules/baseline-browser-mapping": {
+      "version": "2.10.31",
+      "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.31.tgz",
+      "integrity": "sha512-MujYO3eP72uvmSE0i4wltsodRfIpZATP3jvzRNRGGxgzId7aVocVJJV3nf01qnzzKFGxQVC9bpWxl5cjxTr/7Q==",
+      "dev": true,
+      "license": "Apache-2.0",
+      "bin": {
+        "baseline-browser-mapping": "dist/cli.cjs"
+      },
+      "engines": {
+        "node": ">=6.0.0"
+      }
     },
     "node_modules/basic-ftp": {
       "version": "5.3.1",
@@ -3352,22 +4456,23 @@
     "node_modules/before-after-hook": {
       "version": "2.2.3",
       "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
-      "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
+      "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==",
+      "license": "Apache-2.0"
     },
     "node_modules/better-ajv-errors": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/better-ajv-errors/-/better-ajv-errors-1.2.0.tgz",
-      "integrity": "sha512-UW+IsFycygIo7bclP9h5ugkNH8EjCSgqyFB/yQ4Hqqa1OEYDtb0uFIkYE0b6+CjkgJYVM5UKI/pJPxjYe9EZlA==",
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/better-ajv-errors/-/better-ajv-errors-2.0.3.tgz",
+      "integrity": "sha512-t1vxUP+vYKsaYi/BbKo2K98nEAZmfi4sjwvmRT8aOPDzPJeAtLurfoIDazVkLILxO4K+Sw4YrLYnBQ46l6pePg==",
       "license": "Apache-2.0",
       "dependencies": {
-        "@babel/code-frame": "^7.16.0",
-        "@humanwhocodes/momoa": "^2.0.2",
+        "@babel/code-frame": "^7.27.1",
+        "@humanwhocodes/momoa": "^2.0.4",
         "chalk": "^4.1.2",
-        "jsonpointer": "^5.0.0",
+        "jsonpointer": "^5.0.1",
         "leven": "^3.1.0 < 4"
       },
       "engines": {
-        "node": ">= 12.13.0"
+        "node": ">= 18.20.6"
       },
       "peerDependencies": {
         "ajv": "4.11.8 - 8"
@@ -3377,6 +4482,8 @@
       "version": "2.3.0",
       "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
       "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
+      "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       },
@@ -3388,12 +4495,13 @@
       "version": "0.1.0",
       "resolved": "https://registry.npmjs.org/bodec/-/bodec-0.1.0.tgz",
       "integrity": "sha512-Ylo+MAo5BDUq1KA3f3R/MFhh+g8cnHmo8bz3YPGhI1znrMaf77ol1sfvYJzsw3nTE+Y2GryfDxBaR+AqpAkEHQ==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/body-parser": {
-      "version": "1.20.4",
-      "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz",
-      "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==",
+      "version": "1.20.5",
+      "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.5.tgz",
+      "integrity": "sha512-3grm+/2tUOvu2cjJkvsIxrv/wVpfXQW4PsQHYm7yk4vfpu7Ekl6nEsYBoJUL6qDwZUx8wUhQ8tR2qz+ad9c9OA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -3405,7 +4513,7 @@
         "http-errors": "~2.0.1",
         "iconv-lite": "~0.4.24",
         "on-finished": "~2.4.1",
-        "qs": "~6.14.0",
+        "qs": "~6.15.1",
         "raw-body": "~2.5.3",
         "type-is": "~1.6.18",
         "unpipe": "~1.0.0"
@@ -3420,60 +4528,36 @@
       "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
       "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
       "dev": true,
-      "dependencies": {
-        "ms": "2.0.0"
-      }
-    },
-    "node_modules/body-parser/node_modules/http-errors": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
-      "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
-      "dev": true,
       "license": "MIT",
       "dependencies": {
-        "depd": "~2.0.0",
-        "inherits": "~2.0.4",
-        "setprototypeof": "~1.2.0",
-        "statuses": "~2.0.2",
-        "toidentifier": "~1.0.1"
-      },
-      "engines": {
-        "node": ">= 0.8"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/express"
+        "ms": "2.0.0"
       }
     },
     "node_modules/body-parser/node_modules/ms": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
       "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
-      "dev": true
-    },
-    "node_modules/body-parser/node_modules/statuses": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
-      "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
       "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.8"
-      }
+      "license": "MIT"
     },
     "node_modules/brace-expansion": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz",
-      "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==",
+      "version": "5.0.6",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",
+      "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",
       "license": "MIT",
       "dependencies": {
-        "balanced-match": "^1.0.0"
+        "balanced-match": "^4.0.2"
+      },
+      "engines": {
+        "node": "18 || 20 || >=22"
       }
     },
     "node_modules/braces": {
       "version": "3.0.3",
       "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
       "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
+      "dev": true,
+      "license": "MIT",
       "dependencies": {
         "fill-range": "^7.1.1"
       },
@@ -3482,9 +4566,9 @@
       }
     },
     "node_modules/browserslist": {
-      "version": "4.23.0",
-      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz",
-      "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==",
+      "version": "4.28.2",
+      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz",
+      "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==",
       "dev": true,
       "funding": [
         {
@@ -3500,11 +4584,13 @@
           "url": "https://github.com/sponsors/ai"
         }
       ],
+      "license": "MIT",
       "dependencies": {
-        "caniuse-lite": "^1.0.30001587",
-        "electron-to-chromium": "^1.4.668",
-        "node-releases": "^2.0.14",
-        "update-browserslist-db": "^1.0.13"
+        "baseline-browser-mapping": "^2.10.12",
+        "caniuse-lite": "^1.0.30001782",
+        "electron-to-chromium": "^1.5.328",
+        "node-releases": "^2.0.36",
+        "update-browserslist-db": "^1.2.3"
       },
       "bin": {
         "browserslist": "cli.js"
@@ -3518,6 +4604,7 @@
       "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz",
       "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "fast-json-stable-stringify": "2.x"
       },
@@ -3530,29 +4617,17 @@
       "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz",
       "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==",
       "dev": true,
+      "license": "Apache-2.0",
       "dependencies": {
         "node-int64": "^0.4.0"
       }
     },
     "node_modules/buffer-from": {
-      "version": "1.1.2",
-      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
-      "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
-    },
-    "node_modules/bundle-name": {
-      "version": "4.1.0",
-      "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz",
-      "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==",
-      "license": "MIT",
-      "dependencies": {
-        "run-applescript": "^7.0.0"
-      },
-      "engines": {
-        "node": ">=18"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+      "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/bytes": {
       "version": "3.1.2",
@@ -3565,16 +4640,16 @@
       }
     },
     "node_modules/call-bind": {
-      "version": "1.0.7",
-      "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
-      "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
+      "version": "1.0.9",
+      "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz",
+      "integrity": "sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "es-define-property": "^1.0.0",
-        "es-errors": "^1.3.0",
-        "function-bind": "^1.1.2",
-        "get-intrinsic": "^1.2.4",
-        "set-function-length": "^1.2.1"
+        "call-bind-apply-helpers": "^1.0.2",
+        "es-define-property": "^1.0.1",
+        "get-intrinsic": "^1.3.0",
+        "set-function-length": "^1.2.2"
       },
       "engines": {
         "node": ">= 0.4"
@@ -3587,6 +4662,7 @@
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
       "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
         "es-errors": "^1.3.0",
@@ -3624,6 +4700,7 @@
       "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
       "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=6"
       }
@@ -3633,6 +4710,7 @@
       "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
       "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=6"
       }
@@ -3647,9 +4725,9 @@
       }
     },
     "node_modules/caniuse-lite": {
-      "version": "1.0.30001593",
-      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001593.tgz",
-      "integrity": "sha512-UWM1zlo3cZfkpBysd7AS+z+v007q9G1+fLTUU42rQnY6t2axoogPW/xol6T7juU5EUoOhML4WgBIdG+9yYqAjQ==",
+      "version": "1.0.30001793",
+      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001793.tgz",
+      "integrity": "sha512-iwSsYWaCOoh26cV8NwNRViHlrfUvYsHDfRVcbtmw0Kg6PJIZZXwMkj1442FYLBGkeUf1juAsU3DTfxW579mrPA==",
       "dev": true,
       "funding": [
         {
@@ -3664,12 +4742,14 @@
           "type": "github",
           "url": "https://github.com/sponsors/ai"
         }
-      ]
+      ],
+      "license": "CC-BY-4.0"
     },
     "node_modules/chalk": {
       "version": "4.1.2",
       "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
       "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+      "license": "MIT",
       "dependencies": {
         "ansi-styles": "^4.1.0",
         "supports-color": "^7.1.0"
@@ -3686,6 +4766,7 @@
       "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz",
       "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=10"
       }
@@ -3694,13 +4775,15 @@
       "version": "0.1.2",
       "resolved": "https://registry.npmjs.org/charm/-/charm-0.1.2.tgz",
       "integrity": "sha512-syedaZ9cPe7r3hoQA9twWYKu5AIyCswN5+szkmPBe9ccdLrj4bYaCnLVPTLd2kgVRc7+zoX4tyPgRnFKCj5YjQ==",
-      "dev": true
+      "dev": true,
+      "license": "MIT/X11"
     },
     "node_modules/chokidar": {
       "version": "3.6.0",
       "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
       "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "anymatch": "~3.1.2",
         "braces": "~3.0.2",
@@ -3725,6 +4808,7 @@
       "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
       "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
       "dev": true,
+      "license": "ISC",
       "dependencies": {
         "is-glob": "^4.0.1"
       },
@@ -3743,15 +4827,17 @@
           "url": "https://github.com/sponsors/sibiraj-s"
         }
       ],
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
     "node_modules/cjs-module-lexer": {
-      "version": "1.2.3",
-      "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz",
-      "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==",
-      "dev": true
+      "version": "1.4.3",
+      "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz",
+      "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==",
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/classnames": {
       "version": "2.5.1",
@@ -3776,6 +4862,7 @@
       "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
       "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "ansi-styles": "^4.1.0",
         "supports-color": "^7.1.0"
@@ -3785,16 +4872,14 @@
       }
     },
     "node_modules/cliui": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
-      "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+      "version": "7.0.4",
+      "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
+      "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
+      "license": "ISC",
       "dependencies": {
         "string-width": "^4.2.0",
-        "strip-ansi": "^6.0.1",
+        "strip-ansi": "^6.0.0",
         "wrap-ansi": "^7.0.0"
-      },
-      "engines": {
-        "node": ">=12"
       }
     },
     "node_modules/clsx": {
@@ -3811,21 +4896,24 @@
       "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
       "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "iojs": ">= 1.0.0",
         "node": ">= 0.12.0"
       }
     },
     "node_modules/collect-v8-coverage": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz",
-      "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==",
-      "dev": true
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz",
+      "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==",
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/color-convert": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
       "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+      "license": "MIT",
       "dependencies": {
         "color-name": "~1.1.4"
       },
@@ -3836,7 +4924,8 @@
     "node_modules/color-name": {
       "version": "1.1.4",
       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
-      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "license": "MIT"
     },
     "node_modules/colorette": {
       "version": "1.4.0",
@@ -3844,29 +4933,19 @@
       "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==",
       "license": "MIT"
     },
-    "node_modules/combined-stream": {
-      "version": "1.0.8",
-      "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
-      "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
-      "license": "MIT",
-      "dependencies": {
-        "delayed-stream": "~1.0.0"
-      },
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
     "node_modules/commander": {
       "version": "2.15.1",
       "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
       "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/common-tags": {
       "version": "1.8.2",
       "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz",
       "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=4.0.0"
       }
@@ -3874,28 +4953,16 @@
     "node_modules/concat-map": {
       "version": "0.0.1",
       "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
-      "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
-    },
-    "node_modules/concat-stream": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz",
-      "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==",
-      "engines": [
-        "node >= 6.0"
-      ],
-      "license": "MIT",
-      "dependencies": {
-        "buffer-from": "^1.0.0",
-        "inherits": "^2.0.3",
-        "readable-stream": "^3.0.2",
-        "typedarray": "^0.0.6"
-      }
+      "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/content-disposition": {
       "version": "0.5.4",
       "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
       "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "safe-buffer": "5.2.1"
       },
@@ -3908,6 +4975,7 @@
       "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
       "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.6"
       }
@@ -3916,7 +4984,8 @@
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
       "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/cookie": {
       "version": "0.7.2",
@@ -3928,17 +4997,19 @@
       }
     },
     "node_modules/cookie-signature": {
-      "version": "1.0.6",
-      "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
-      "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
-      "dev": true
+      "version": "1.0.7",
+      "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",
+      "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==",
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/core-js": {
-      "version": "3.32.1",
-      "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.32.1.tgz",
-      "integrity": "sha512-lqufgNn9NLnESg5mQeYsxQP5w7wrViSj0jr/kv6ECQiByzQkrn1MKvV0L3acttpDqfQrHLwr2KCMgX5b8X+lyQ==",
+      "version": "3.49.0",
+      "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.49.0.tgz",
+      "integrity": "sha512-es1U2+YTtzpwkxVLwAFdSpaIMyQaq0PBgm3YD1W3Qpsn1NAmO3KSgZfu+oGSWVu6NvLHoHCV/aYcsE5wiB7ALg==",
       "hasInstallScript": true,
       "license": "MIT",
+      "peer": true,
       "funding": {
         "type": "opencollective",
         "url": "https://opencollective.com/core-js"
@@ -3949,6 +5020,7 @@
       "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz",
       "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/types": "^29.6.3",
         "chalk": "^4.0.0",
@@ -3969,13 +5041,15 @@
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
       "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/croner": {
       "version": "4.1.97",
       "resolved": "https://registry.npmjs.org/croner/-/croner-4.1.97.tgz",
       "integrity": "sha512-/f6gpQuxDaqXu+1kwQYSckUglPaOrHdbIlBAu0YuW8/Cdb45XwXYNUBXg3r/9Mo6n540Kn/smKcZWko5x99KrQ==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/cross-spawn": {
       "version": "7.0.6",
@@ -4022,13 +5096,15 @@
       "version": "0.1.2",
       "resolved": "https://registry.npmjs.org/culvert/-/culvert-0.1.2.tgz",
       "integrity": "sha512-yi1x3EAWKjQTreYWeSd98431AV+IEE0qoDyOoaHJ7KJ21gv6HtBXHVLX74opVSGqcR8/AbjJBHAHpcOy2bj5Gg==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/damerau-levenshtein": {
       "version": "1.0.8",
       "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz",
       "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==",
-      "dev": true
+      "dev": true,
+      "license": "BSD-2-Clause"
     },
     "node_modules/data-uri-to-buffer": {
       "version": "6.0.2",
@@ -4040,6 +5116,60 @@
         "node": ">= 14"
       }
     },
+    "node_modules/data-view-buffer": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz",
+      "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "call-bound": "^1.0.3",
+        "es-errors": "^1.3.0",
+        "is-data-view": "^1.0.2"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/data-view-byte-length": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz",
+      "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "call-bound": "^1.0.3",
+        "es-errors": "^1.3.0",
+        "is-data-view": "^1.0.2"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/inspect-js"
+      }
+    },
+    "node_modules/data-view-byte-offset": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz",
+      "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "call-bound": "^1.0.2",
+        "es-errors": "^1.3.0",
+        "is-data-view": "^1.0.1"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
     "node_modules/dayjs": {
       "version": "1.11.15",
       "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.15.tgz",
@@ -4048,11 +5178,12 @@
       "license": "MIT"
     },
     "node_modules/debug": {
-      "version": "4.3.4",
-      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
-      "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+      "version": "4.4.3",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+      "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+      "license": "MIT",
       "dependencies": {
-        "ms": "2.1.2"
+        "ms": "^2.1.3"
       },
       "engines": {
         "node": ">=6.0"
@@ -4069,10 +5200,11 @@
       "integrity": "sha512-m8FnyHXV1QX+S1cl+KPFDIl6NMkxtKsy6+U/aYyjrOqWMuwAwYWu7ePqrsUHtDR5Y8Yk2pi/KIDSgF+vT4cPOQ=="
     },
     "node_modules/dedent": {
-      "version": "1.5.1",
-      "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz",
-      "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==",
+      "version": "1.7.2",
+      "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz",
+      "integrity": "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==",
       "dev": true,
+      "license": "MIT",
       "peerDependencies": {
         "babel-plugin-macros": "^3.1.0"
       },
@@ -4086,43 +5218,17 @@
       "version": "0.1.4",
       "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
       "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/deepmerge": {
       "version": "4.3.1",
       "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
       "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
       "dev": true,
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/default-browser": {
-      "version": "5.5.0",
-      "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.0.tgz",
-      "integrity": "sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw==",
-      "license": "MIT",
-      "dependencies": {
-        "bundle-name": "^4.1.0",
-        "default-browser-id": "^5.0.0"
-      },
-      "engines": {
-        "node": ">=18"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/default-browser-id": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz",
-      "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==",
       "license": "MIT",
       "engines": {
-        "node": ">=18"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "node": ">=0.10.0"
       }
     },
     "node_modules/define-data-property": {
@@ -4130,6 +5236,7 @@
       "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
       "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "es-define-property": "^1.0.0",
         "es-errors": "^1.3.0",
@@ -4142,23 +5249,12 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/define-lazy-prop": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz",
-      "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
     "node_modules/define-properties": {
       "version": "1.2.1",
       "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",
       "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "define-data-property": "^1.0.1",
         "has-property-descriptors": "^1.0.0",
@@ -4186,20 +5282,12 @@
         "node": ">= 14"
       }
     },
-    "node_modules/delayed-stream": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
-      "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.4.0"
-      }
-    },
     "node_modules/depd": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
       "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.8"
       }
@@ -4207,22 +5295,15 @@
     "node_modules/deprecation": {
       "version": "2.3.1",
       "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
-      "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
-    },
-    "node_modules/dequal": {
-      "version": "2.0.3",
-      "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
-      "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
-      "dev": true,
-      "engines": {
-        "node": ">=6"
-      }
+      "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==",
+      "license": "ISC"
     },
     "node_modules/destroy": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
       "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.8",
         "npm": "1.2.8000 || >= 1.4.16"
@@ -4233,6 +5314,7 @@
       "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz",
       "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
@@ -4248,11 +5330,13 @@
       }
     },
     "node_modules/diff-sequences": {
-      "version": "29.6.3",
-      "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz",
-      "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==",
+      "version": "27.5.1",
+      "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz",
+      "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==",
+      "dev": true,
+      "license": "MIT",
       "engines": {
-        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
       }
     },
     "node_modules/dir-glob": {
@@ -4260,6 +5344,7 @@
       "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
       "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "path-type": "^4.0.0"
       },
@@ -4271,13 +5356,15 @@
       "version": "1.1.3",
       "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz",
       "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/doctrine": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
       "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
       "dev": true,
+      "license": "Apache-2.0",
       "dependencies": {
         "esutils": "^2.0.2"
       },
@@ -4286,9 +5373,9 @@
       }
     },
     "node_modules/dompurify": {
-      "version": "3.4.0",
-      "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.0.tgz",
-      "integrity": "sha512-nolgK9JcaUXMSmW+j1yaSvaEaoXYHwWyGJlkoCTghc97KgGDDSnpoU/PlEnw63Ah+TGKFOyY+X5LnxaWbCSfXg==",
+      "version": "3.4.5",
+      "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.5.tgz",
+      "integrity": "sha512-OrwIBKsdNSVEeubdJ1HBv/wNENRM9ytAVCv7YXt//A3vPdVMNuACRqK9mXCGCBW2ln7BT/A4X0jXHo2Gu89miA==",
       "license": "(MPL-2.0 OR Apache-2.0)",
       "optionalDependencies": {
         "@types/trusted-types": "^2.0.7"
@@ -4310,6 +5397,7 @@
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
       "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
         "call-bind-apply-helpers": "^1.0.1",
@@ -4324,19 +5412,22 @@
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
       "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/electron-to-chromium": {
-      "version": "1.4.690",
-      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.690.tgz",
-      "integrity": "sha512-+2OAGjUx68xElQhydpcbqH50hE8Vs2K6TkAeLhICYfndb67CVH0UsZaijmRUE3rHlIxU1u0jxwhgVe6fK3YANA==",
-      "dev": true
+      "version": "1.5.361",
+      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.361.tgz",
+      "integrity": "sha512-Q6Hts7N9FnJc5LeGRINFvLhCI9xZmNtTDe5ZbcVezQz7cU4a8Aua3GH1b8J2XY8Al9PF+OCwYqhgsOOheMdvkA==",
+      "dev": true,
+      "license": "ISC"
     },
     "node_modules/emittery": {
       "version": "0.13.1",
       "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz",
       "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=12"
       },
@@ -4348,13 +5439,15 @@
       "version": "9.2.2",
       "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
       "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/encodeurl": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
       "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.8"
       }
@@ -4364,6 +5457,7 @@
       "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz",
       "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "ansi-colors": "^4.1.1"
       },
@@ -4372,61 +5466,76 @@
       }
     },
     "node_modules/error-ex": {
-      "version": "1.3.2",
-      "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
-      "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+      "version": "1.3.4",
+      "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz",
+      "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "is-arrayish": "^0.2.1"
       }
     },
     "node_modules/es-abstract": {
-      "version": "1.22.5",
-      "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.5.tgz",
-      "integrity": "sha512-oW69R+4q2wG+Hc3KZePPZxOiisRIqfKBVo/HLx94QcJeWGU/8sZhCvc829rd1kS366vlJbzBfXf9yWwf0+Ko7w==",
+      "version": "1.24.2",
+      "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.2.tgz",
+      "integrity": "sha512-2FpH9Q5i2RRwyEP1AylXe6nYLR5OhaJTZwmlcP0dL/+JCbgg7yyEo/sEK6HeGZRf3dFpWwThaRHVApXSkW3xeg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "array-buffer-byte-length": "^1.0.1",
-        "arraybuffer.prototype.slice": "^1.0.3",
+        "array-buffer-byte-length": "^1.0.2",
+        "arraybuffer.prototype.slice": "^1.0.4",
         "available-typed-arrays": "^1.0.7",
-        "call-bind": "^1.0.7",
-        "es-define-property": "^1.0.0",
+        "call-bind": "^1.0.8",
+        "call-bound": "^1.0.4",
+        "data-view-buffer": "^1.0.2",
+        "data-view-byte-length": "^1.0.2",
+        "data-view-byte-offset": "^1.0.1",
+        "es-define-property": "^1.0.1",
         "es-errors": "^1.3.0",
-        "es-set-tostringtag": "^2.0.3",
-        "es-to-primitive": "^1.2.1",
-        "function.prototype.name": "^1.1.6",
-        "get-intrinsic": "^1.2.4",
-        "get-symbol-description": "^1.0.2",
-        "globalthis": "^1.0.3",
-        "gopd": "^1.0.1",
+        "es-object-atoms": "^1.1.1",
+        "es-set-tostringtag": "^2.1.0",
+        "es-to-primitive": "^1.3.0",
+        "function.prototype.name": "^1.1.8",
+        "get-intrinsic": "^1.3.0",
+        "get-proto": "^1.0.1",
+        "get-symbol-description": "^1.1.0",
+        "globalthis": "^1.0.4",
+        "gopd": "^1.2.0",
         "has-property-descriptors": "^1.0.2",
-        "has-proto": "^1.0.3",
-        "has-symbols": "^1.0.3",
-        "hasown": "^2.0.1",
-        "internal-slot": "^1.0.7",
-        "is-array-buffer": "^3.0.4",
+        "has-proto": "^1.2.0",
+        "has-symbols": "^1.1.0",
+        "hasown": "^2.0.2",
+        "internal-slot": "^1.1.0",
+        "is-array-buffer": "^3.0.5",
         "is-callable": "^1.2.7",
+        "is-data-view": "^1.0.2",
         "is-negative-zero": "^2.0.3",
-        "is-regex": "^1.1.4",
-        "is-shared-array-buffer": "^1.0.3",
-        "is-string": "^1.0.7",
-        "is-typed-array": "^1.1.13",
-        "is-weakref": "^1.0.2",
-        "object-inspect": "^1.13.1",
+        "is-regex": "^1.2.1",
+        "is-set": "^2.0.3",
+        "is-shared-array-buffer": "^1.0.4",
+        "is-string": "^1.1.1",
+        "is-typed-array": "^1.1.15",
+        "is-weakref": "^1.1.1",
+        "math-intrinsics": "^1.1.0",
+        "object-inspect": "^1.13.4",
         "object-keys": "^1.1.1",
-        "object.assign": "^4.1.5",
-        "regexp.prototype.flags": "^1.5.2",
-        "safe-array-concat": "^1.1.0",
-        "safe-regex-test": "^1.0.3",
-        "string.prototype.trim": "^1.2.8",
-        "string.prototype.trimend": "^1.0.7",
-        "string.prototype.trimstart": "^1.0.7",
-        "typed-array-buffer": "^1.0.2",
-        "typed-array-byte-length": "^1.0.1",
-        "typed-array-byte-offset": "^1.0.2",
-        "typed-array-length": "^1.0.5",
-        "unbox-primitive": "^1.0.2",
-        "which-typed-array": "^1.1.14"
+        "object.assign": "^4.1.7",
+        "own-keys": "^1.0.1",
+        "regexp.prototype.flags": "^1.5.4",
+        "safe-array-concat": "^1.1.3",
+        "safe-push-apply": "^1.0.0",
+        "safe-regex-test": "^1.1.0",
+        "set-proto": "^1.0.0",
+        "stop-iteration-iterator": "^1.1.0",
+        "string.prototype.trim": "^1.2.10",
+        "string.prototype.trimend": "^1.0.9",
+        "string.prototype.trimstart": "^1.0.8",
+        "typed-array-buffer": "^1.0.3",
+        "typed-array-byte-length": "^1.0.3",
+        "typed-array-byte-offset": "^1.0.4",
+        "typed-array-length": "^1.0.7",
+        "unbox-primitive": "^1.1.0",
+        "which-typed-array": "^1.1.19"
       },
       "engines": {
         "node": ">= 0.4"
@@ -4435,16 +5544,11 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/es-array-method-boxes-properly": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz",
-      "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==",
-      "dev": true
-    },
     "node_modules/es-define-property": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
       "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">= 0.4"
@@ -4454,32 +5558,8 @@
       "version": "1.3.0",
       "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
       "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
-      "engines": {
-        "node": ">= 0.4"
-      }
-    },
-    "node_modules/es-iterator-helpers": {
-      "version": "1.0.17",
-      "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.17.tgz",
-      "integrity": "sha512-lh7BsUqelv4KUbR5a/ZTaGGIMLCjPGPqJ6q+Oq24YP0RdyptX1uzm4vvaqzk7Zx3bpl/76YLTTDj9L7uYQ92oQ==",
       "dev": true,
-      "dependencies": {
-        "asynciterator.prototype": "^1.0.0",
-        "call-bind": "^1.0.7",
-        "define-properties": "^1.2.1",
-        "es-abstract": "^1.22.4",
-        "es-errors": "^1.3.0",
-        "es-set-tostringtag": "^2.0.2",
-        "function-bind": "^1.1.2",
-        "get-intrinsic": "^1.2.4",
-        "globalthis": "^1.0.3",
-        "has-property-descriptors": "^1.0.2",
-        "has-proto": "^1.0.1",
-        "has-symbols": "^1.0.3",
-        "internal-slot": "^1.0.7",
-        "iterator.prototype": "^1.1.2",
-        "safe-array-concat": "^1.1.0"
-      },
+      "license": "MIT",
       "engines": {
         "node": ">= 0.4"
       }
@@ -4488,6 +5568,7 @@
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
       "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
         "es-errors": "^1.3.0"
@@ -4500,6 +5581,7 @@
       "version": "2.1.0",
       "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
       "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
         "es-errors": "^1.3.0",
@@ -4512,23 +5594,28 @@
       }
     },
     "node_modules/es-shim-unscopables": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz",
-      "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==",
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz",
+      "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "hasown": "^2.0.0"
+        "hasown": "^2.0.2"
+      },
+      "engines": {
+        "node": ">= 0.4"
       }
     },
     "node_modules/es-to-primitive": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
-      "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz",
+      "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "is-callable": "^1.1.4",
-        "is-date-object": "^1.0.1",
-        "is-symbol": "^1.0.2"
+        "is-callable": "^1.2.7",
+        "is-date-object": "^1.0.5",
+        "is-symbol": "^1.0.4"
       },
       "engines": {
         "node": ">= 0.4"
@@ -4543,10 +5630,53 @@
       "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==",
       "license": "MIT"
     },
+    "node_modules/esbuild": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.0.tgz",
+      "integrity": "sha512-sNR9MHpXSUV/XB4zmsFKN+QgVG82Cc7+/aaxJ8Adi8hyOac+EXptIp45QBPaVyX3N70664wRbTcLTOemCAnyqw==",
+      "dev": true,
+      "hasInstallScript": true,
+      "license": "MIT",
+      "bin": {
+        "esbuild": "bin/esbuild"
+      },
+      "engines": {
+        "node": ">=18"
+      },
+      "optionalDependencies": {
+        "@esbuild/aix-ppc64": "0.28.0",
+        "@esbuild/android-arm": "0.28.0",
+        "@esbuild/android-arm64": "0.28.0",
+        "@esbuild/android-x64": "0.28.0",
+        "@esbuild/darwin-arm64": "0.28.0",
+        "@esbuild/darwin-x64": "0.28.0",
+        "@esbuild/freebsd-arm64": "0.28.0",
+        "@esbuild/freebsd-x64": "0.28.0",
+        "@esbuild/linux-arm": "0.28.0",
+        "@esbuild/linux-arm64": "0.28.0",
+        "@esbuild/linux-ia32": "0.28.0",
+        "@esbuild/linux-loong64": "0.28.0",
+        "@esbuild/linux-mips64el": "0.28.0",
+        "@esbuild/linux-ppc64": "0.28.0",
+        "@esbuild/linux-riscv64": "0.28.0",
+        "@esbuild/linux-s390x": "0.28.0",
+        "@esbuild/linux-x64": "0.28.0",
+        "@esbuild/netbsd-arm64": "0.28.0",
+        "@esbuild/netbsd-x64": "0.28.0",
+        "@esbuild/openbsd-arm64": "0.28.0",
+        "@esbuild/openbsd-x64": "0.28.0",
+        "@esbuild/openharmony-arm64": "0.28.0",
+        "@esbuild/sunos-x64": "0.28.0",
+        "@esbuild/win32-arm64": "0.28.0",
+        "@esbuild/win32-ia32": "0.28.0",
+        "@esbuild/win32-x64": "0.28.0"
+      }
+    },
     "node_modules/escalade": {
-      "version": "3.1.2",
-      "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",
-      "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==",
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
+      "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
+      "license": "MIT",
       "engines": {
         "node": ">=6"
       }
@@ -4555,13 +5685,15 @@
       "version": "1.0.3",
       "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
       "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/escape-string-regexp": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
       "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=10"
       },
@@ -4592,16 +5724,18 @@
       }
     },
     "node_modules/eslint": {
-      "version": "8.57.0",
-      "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz",
-      "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==",
+      "version": "8.57.1",
+      "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz",
+      "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==",
+      "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@eslint-community/eslint-utils": "^4.2.0",
         "@eslint-community/regexpp": "^4.6.1",
         "@eslint/eslintrc": "^2.1.4",
-        "@eslint/js": "8.57.0",
-        "@humanwhocodes/config-array": "^0.11.14",
+        "@eslint/js": "8.57.1",
+        "@humanwhocodes/config-array": "^0.13.0",
         "@humanwhocodes/module-importer": "^1.0.1",
         "@nodelib/fs.walk": "^1.2.8",
         "@ungap/structured-clone": "^1.2.0",
@@ -4647,10 +5781,11 @@
       }
     },
     "node_modules/eslint-compat-utils": {
-      "version": "0.5.0",
-      "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.0.tgz",
-      "integrity": "sha512-dc6Y8tzEcSYZMHa+CMPLi/hyo1FzNeonbhJL7Ol0ccuKQkwopJcJBA9YL/xmMTLU1eKigXo9vj9nALElWYSowg==",
+      "version": "0.6.5",
+      "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.6.5.tgz",
+      "integrity": "sha512-vAUHYzue4YAa2hNACjB8HvUQj5yehAZgiClyFVVom9cP8z5NSFq3PwB/TtJslN2zAMgRX6FCFCjYBbQh71g5RQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "semver": "^7.5.4"
       },
@@ -4662,26 +5797,56 @@
       }
     },
     "node_modules/eslint-config-prettier": {
-      "version": "9.1.0",
-      "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz",
-      "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==",
+      "version": "10.1.8",
+      "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz",
+      "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==",
       "dev": true,
+      "license": "MIT",
       "bin": {
         "eslint-config-prettier": "bin/cli.js"
       },
+      "funding": {
+        "url": "https://opencollective.com/eslint-config-prettier"
+      },
       "peerDependencies": {
         "eslint": ">=7.0.0"
       }
     },
+    "node_modules/eslint-import-context": {
+      "version": "0.1.9",
+      "resolved": "https://registry.npmjs.org/eslint-import-context/-/eslint-import-context-0.1.9.tgz",
+      "integrity": "sha512-K9Hb+yRaGAGUbwjhFNHvSmmkZs9+zbuoe3kFQ4V1wYjrepUFYM2dZAfNtjbbj3qsPfUfsA68Bx/ICWQMi+C8Eg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "get-tsconfig": "^4.10.1",
+        "stable-hash-x": "^0.2.0"
+      },
+      "engines": {
+        "node": "^12.20.0 || ^14.18.0 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://opencollective.com/eslint-import-context"
+      },
+      "peerDependencies": {
+        "unrs-resolver": "^1.0.0"
+      },
+      "peerDependenciesMeta": {
+        "unrs-resolver": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/eslint-import-resolver-node": {
-      "version": "0.3.9",
-      "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz",
-      "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==",
+      "version": "0.3.10",
+      "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.10.tgz",
+      "integrity": "sha512-tRrKqFyCaKict5hOd244sL6EQFNycnMQnBe+j8uqGNXYzsImGbGUU4ibtoaBmv5FLwJwcFJNeg1GeVjQfbMrDQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "debug": "^3.2.7",
-        "is-core-module": "^2.13.0",
-        "resolve": "^1.22.4"
+        "is-core-module": "^2.16.1",
+        "resolve": "^2.0.0-next.6"
       }
     },
     "node_modules/eslint-import-resolver-node/node_modules/debug": {
@@ -4689,15 +5854,74 @@
       "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
       "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "ms": "^2.1.1"
       }
     },
+    "node_modules/eslint-import-resolver-typescript": {
+      "version": "4.4.4",
+      "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-4.4.4.tgz",
+      "integrity": "sha512-1iM2zeBvrYmUNTj2vSC/90JTHDth+dfOfiNKkxApWRsTJYNrc8rOdxxIf5vazX+BiAXTeOT0UvWpGI/7qIWQOw==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "debug": "^4.4.1",
+        "eslint-import-context": "^0.1.8",
+        "get-tsconfig": "^4.10.1",
+        "is-bun-module": "^2.0.0",
+        "stable-hash-x": "^0.2.0",
+        "tinyglobby": "^0.2.14",
+        "unrs-resolver": "^1.7.11"
+      },
+      "engines": {
+        "node": "^16.17.0 || >=18.6.0"
+      },
+      "funding": {
+        "url": "https://opencollective.com/eslint-import-resolver-typescript"
+      },
+      "peerDependencies": {
+        "eslint": "*",
+        "eslint-plugin-import": "*",
+        "eslint-plugin-import-x": "*"
+      },
+      "peerDependenciesMeta": {
+        "eslint-plugin-import": {
+          "optional": true
+        },
+        "eslint-plugin-import-x": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/eslint-json-compat-utils": {
+      "version": "0.2.3",
+      "resolved": "https://registry.npmjs.org/eslint-json-compat-utils/-/eslint-json-compat-utils-0.2.3.tgz",
+      "integrity": "sha512-RbBmDFyu7FqnjE8F0ZxPNzx5UaptdeS9Uu50r7A+D7s/+FCX+ybiyViYEgFUaFIFqSWJgZRTpL5d8Kanxxl2lQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "esquery": "^1.6.0"
+      },
+      "engines": {
+        "node": ">=12"
+      },
+      "peerDependencies": {
+        "eslint": "*",
+        "jsonc-eslint-parser": "^2.4.0 || ^3.0.0"
+      },
+      "peerDependenciesMeta": {
+        "@eslint/json": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/eslint-module-utils": {
-      "version": "2.8.1",
-      "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz",
-      "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==",
+      "version": "2.12.1",
+      "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz",
+      "integrity": "sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "debug": "^3.2.7"
       },
@@ -4715,17 +5939,19 @@
       "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
       "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "ms": "^2.1.1"
       }
     },
     "node_modules/eslint-plugin-escompat": {
-      "version": "3.4.0",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-escompat/-/eslint-plugin-escompat-3.4.0.tgz",
-      "integrity": "sha512-ufTPv8cwCxTNoLnTZBFTQ5SxU2w7E7wiMIS7PSxsgP1eAxFjtSaoZ80LRn64hI8iYziE6kJG6gX/ZCJVxh48Bg==",
+      "version": "3.11.4",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-escompat/-/eslint-plugin-escompat-3.11.4.tgz",
+      "integrity": "sha512-j0ywwNnIufshOzgAu+PfIig1c7VRClKSNKzpniMT2vXQ4leL5q+e/SpMFQU0nrdL2WFFM44XmhSuwmxb3G0CJg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "browserslist": "^4.21.0"
+        "browserslist": "^4.23.1"
       },
       "peerDependencies": {
         "eslint": ">=5.14.1"
@@ -4736,6 +5962,7 @@
       "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz",
       "integrity": "sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "escape-string-regexp": "^1.0.5",
         "ignore": "^5.0.5"
@@ -4755,15 +5982,27 @@
       "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
       "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=0.8.0"
       }
     },
+    "node_modules/eslint-plugin-eslint-comments/node_modules/ignore": {
+      "version": "5.3.2",
+      "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+      "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">= 4"
+      }
+    },
     "node_modules/eslint-plugin-filenames": {
       "version": "1.3.2",
       "resolved": "https://registry.npmjs.org/eslint-plugin-filenames/-/eslint-plugin-filenames-1.3.2.tgz",
       "integrity": "sha512-tqxJTiEM5a0JmRCUYQmxw23vtTxrb2+a3Q2mMOPhFxvt7ZQQJmdiuMby9B/vUAuVMghyP7oET+nIf6EO6CBd/w==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "lodash.camelcase": "4.3.0",
         "lodash.kebabcase": "4.1.1",
@@ -4775,77 +6014,117 @@
       }
     },
     "node_modules/eslint-plugin-github": {
-      "version": "4.10.2",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-4.10.2.tgz",
-      "integrity": "sha512-F1F5aAFgi1Y5hYoTFzGQACBkw5W1hu2Fu5FSTrMlXqrojJnKl1S2pWO/rprlowRQpt+hzHhqSpsfnodJEVd5QA==",
+      "version": "5.1.8",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-5.1.8.tgz",
+      "integrity": "sha512-A6q+R3EBMF7hxIViWpQsalqpu3O0POcQ9VpN1m9W2I8yGumw+SFxXZUTafBd9X9mgUJhaU4M9qSifC1q/39H3A==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
+        "@eslint/compat": "^1.2.3",
+        "@eslint/eslintrc": "^3.1.0",
+        "@eslint/js": "^9.14.0",
         "@github/browserslist-config": "^1.0.0",
-        "@typescript-eslint/eslint-plugin": "^7.0.1",
-        "@typescript-eslint/parser": "^7.0.1",
+        "@typescript-eslint/eslint-plugin": "^8.0.0",
+        "@typescript-eslint/parser": "^8.0.0",
         "aria-query": "^5.3.0",
         "eslint-config-prettier": ">=8.0.0",
-        "eslint-plugin-escompat": "^3.3.3",
+        "eslint-plugin-escompat": "^3.11.3",
         "eslint-plugin-eslint-comments": "^3.2.0",
         "eslint-plugin-filenames": "^1.3.2",
         "eslint-plugin-i18n-text": "^1.0.1",
-        "eslint-plugin-import": "^2.25.2",
-        "eslint-plugin-jsx-a11y": "^6.7.1",
+        "eslint-plugin-import": "^2.31.0",
+        "eslint-plugin-jsx-a11y": "^6.10.2",
         "eslint-plugin-no-only-tests": "^3.0.0",
-        "eslint-plugin-prettier": "^5.0.0",
+        "eslint-plugin-prettier": "^5.2.1",
         "eslint-rule-documentation": ">=1.0.0",
+        "globals": "^15.12.0",
         "jsx-ast-utils": "^3.3.2",
         "prettier": "^3.0.0",
-        "svg-element-attributes": "^1.3.1"
+        "svg-element-attributes": "^1.3.1",
+        "typescript-eslint": "^8.14.0"
       },
       "bin": {
         "eslint-ignore-errors": "bin/eslint-ignore-errors.js"
       },
       "peerDependencies": {
-        "eslint": "^8.0.1"
+        "eslint": "^8 || ^9"
       }
     },
-    "node_modules/eslint-plugin-i18n-text": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-i18n-text/-/eslint-plugin-i18n-text-1.0.1.tgz",
-      "integrity": "sha512-3G3UetST6rdqhqW9SfcfzNYMpQXS7wNkJvp6dsXnjzGiku6Iu5hl3B0kmk6lIcFPwYjhQIY+tXVRtK9TlGT7RA==",
+    "node_modules/eslint-plugin-github/node_modules/@eslint/eslintrc": {
+      "version": "3.3.5",
+      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.5.tgz",
+      "integrity": "sha512-4IlJx0X0qftVsN5E+/vGujTRIFtwuLbNsVUe7TO6zYPDR1O6nFwvwhIKEKSrl6dZchmYBITazxKoUYOjdtjlRg==",
       "dev": true,
-      "peerDependencies": {
-        "eslint": ">=5.0.0"
+      "license": "MIT",
+      "dependencies": {
+        "ajv": "^6.14.0",
+        "debug": "^4.3.2",
+        "espree": "^10.0.1",
+        "globals": "^14.0.0",
+        "ignore": "^5.2.0",
+        "import-fresh": "^3.2.1",
+        "js-yaml": "^4.1.1",
+        "minimatch": "^3.1.5",
+        "strip-json-comments": "^3.1.1"
+      },
+      "engines": {
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+      },
+      "funding": {
+        "url": "https://opencollective.com/eslint"
       }
     },
-    "node_modules/eslint-plugin-import": {
-      "version": "2.29.1",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz",
-      "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==",
+    "node_modules/eslint-plugin-github/node_modules/@eslint/eslintrc/node_modules/globals": {
+      "version": "14.0.0",
+      "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",
+      "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",
       "dev": true,
-      "dependencies": {
-        "array-includes": "^3.1.7",
-        "array.prototype.findlastindex": "^1.2.3",
-        "array.prototype.flat": "^1.3.2",
-        "array.prototype.flatmap": "^1.3.2",
-        "debug": "^3.2.7",
-        "doctrine": "^2.1.0",
-        "eslint-import-resolver-node": "^0.3.9",
-        "eslint-module-utils": "^2.8.0",
-        "hasown": "^2.0.0",
-        "is-core-module": "^2.13.1",
-        "is-glob": "^4.0.3",
-        "minimatch": "^3.1.2",
-        "object.fromentries": "^2.0.7",
-        "object.groupby": "^1.0.1",
-        "object.values": "^1.1.7",
-        "semver": "^6.3.1",
-        "tsconfig-paths": "^3.15.0"
+      "license": "MIT",
+      "engines": {
+        "node": ">=18"
       },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/eslint-plugin-github/node_modules/@eslint/js": {
+      "version": "9.39.4",
+      "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.4.tgz",
+      "integrity": "sha512-nE7DEIchvtiFTwBw4Lfbu59PG+kCofhjsKaCWzxTpt4lfRjRMqG6uMBzKXuEcyXhOHoUp9riAm7/aWYGhXZ9cw==",
+      "dev": true,
+      "license": "MIT",
       "engines": {
-        "node": ">=4"
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
       },
-      "peerDependencies": {
-        "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8"
+      "funding": {
+        "url": "https://eslint.org/donate"
       }
     },
-    "node_modules/eslint-plugin-import/node_modules/brace-expansion": {
+    "node_modules/eslint-plugin-github/node_modules/ajv": {
+      "version": "6.15.0",
+      "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz",
+      "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "fast-deep-equal": "^3.1.1",
+        "fast-json-stable-stringify": "^2.0.0",
+        "json-schema-traverse": "^0.4.1",
+        "uri-js": "^4.2.2"
+      },
+      "funding": {
+        "type": "github",
+        "url": "https://github.com/sponsors/epoberezkin"
+      }
+    },
+    "node_modules/eslint-plugin-github/node_modules/balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/eslint-plugin-github/node_modules/brace-expansion": {
       "version": "1.1.14",
       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
       "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
@@ -4856,28 +6135,68 @@
         "concat-map": "0.0.1"
       }
     },
-    "node_modules/eslint-plugin-import/node_modules/debug": {
-      "version": "3.2.7",
-      "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
-      "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+    "node_modules/eslint-plugin-github/node_modules/eslint-visitor-keys": {
+      "version": "4.2.1",
+      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
+      "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
       "dev": true,
-      "dependencies": {
-        "ms": "^2.1.1"
+      "license": "Apache-2.0",
+      "engines": {
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+      },
+      "funding": {
+        "url": "https://opencollective.com/eslint"
       }
     },
-    "node_modules/eslint-plugin-import/node_modules/doctrine": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
-      "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
+    "node_modules/eslint-plugin-github/node_modules/espree": {
+      "version": "10.4.0",
+      "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz",
+      "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==",
       "dev": true,
+      "license": "BSD-2-Clause",
       "dependencies": {
-        "esutils": "^2.0.2"
+        "acorn": "^8.15.0",
+        "acorn-jsx": "^5.3.2",
+        "eslint-visitor-keys": "^4.2.1"
       },
       "engines": {
-        "node": ">=0.10.0"
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+      },
+      "funding": {
+        "url": "https://opencollective.com/eslint"
       }
     },
-    "node_modules/eslint-plugin-import/node_modules/minimatch": {
+    "node_modules/eslint-plugin-github/node_modules/globals": {
+      "version": "15.15.0",
+      "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz",
+      "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=18"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/eslint-plugin-github/node_modules/ignore": {
+      "version": "5.3.2",
+      "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+      "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">= 4"
+      }
+    },
+    "node_modules/eslint-plugin-github/node_modules/json-schema-traverse": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+      "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/eslint-plugin-github/node_modules/minimatch": {
       "version": "3.1.5",
       "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
       "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
@@ -4890,153 +6209,160 @@
         "node": "*"
       }
     },
-    "node_modules/eslint-plugin-import/node_modules/semver": {
-      "version": "6.3.1",
-      "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
-      "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+    "node_modules/eslint-plugin-i18n-text": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-i18n-text/-/eslint-plugin-i18n-text-1.0.1.tgz",
+      "integrity": "sha512-3G3UetST6rdqhqW9SfcfzNYMpQXS7wNkJvp6dsXnjzGiku6Iu5hl3B0kmk6lIcFPwYjhQIY+tXVRtK9TlGT7RA==",
       "dev": true,
-      "bin": {
-        "semver": "bin/semver.js"
+      "license": "MIT",
+      "peerDependencies": {
+        "eslint": ">=5.0.0"
       }
     },
-    "node_modules/eslint-plugin-jest": {
-      "version": "28.2.0",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.2.0.tgz",
-      "integrity": "sha512-yRDti/a+f+SMSmNTiT9/M/MzXGkitl8CfzUxnpoQcTyfq8gUrXMriVcWU36W1X6BZSUoyUCJrDAWWUA2N4hE5g==",
+    "node_modules/eslint-plugin-import": {
+      "version": "2.32.0",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz",
+      "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/utils": "^6.0.0"
+        "@rtsao/scc": "^1.1.0",
+        "array-includes": "^3.1.9",
+        "array.prototype.findlastindex": "^1.2.6",
+        "array.prototype.flat": "^1.3.3",
+        "array.prototype.flatmap": "^1.3.3",
+        "debug": "^3.2.7",
+        "doctrine": "^2.1.0",
+        "eslint-import-resolver-node": "^0.3.9",
+        "eslint-module-utils": "^2.12.1",
+        "hasown": "^2.0.2",
+        "is-core-module": "^2.16.1",
+        "is-glob": "^4.0.3",
+        "minimatch": "^3.1.2",
+        "object.fromentries": "^2.0.8",
+        "object.groupby": "^1.0.3",
+        "object.values": "^1.2.1",
+        "semver": "^6.3.1",
+        "string.prototype.trimend": "^1.0.9",
+        "tsconfig-paths": "^3.15.0"
       },
       "engines": {
-        "node": "^16.10.0 || ^18.12.0 || >=20.0.0"
+        "node": ">=4"
       },
       "peerDependencies": {
-        "@typescript-eslint/eslint-plugin": "^6.0.0 || ^7.0.0",
-        "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0",
-        "jest": "*"
-      },
-      "peerDependenciesMeta": {
-        "@typescript-eslint/eslint-plugin": {
-          "optional": true
-        },
-        "jest": {
-          "optional": true
-        }
+        "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9"
       }
     },
-    "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/scope-manager": {
-      "version": "6.21.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz",
-      "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==",
+    "node_modules/eslint-plugin-import/node_modules/balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
       "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/eslint-plugin-import/node_modules/brace-expansion": {
+      "version": "1.1.14",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
+      "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
+      "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/types": "6.21.0",
-        "@typescript-eslint/visitor-keys": "6.21.0"
-      },
-      "engines": {
-        "node": "^16.0.0 || >=18.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/typescript-eslint"
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
       }
     },
-    "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/types": {
-      "version": "6.21.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz",
-      "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==",
-      "dev": true,
-      "engines": {
-        "node": "^16.0.0 || >=18.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/typescript-eslint"
+    "node_modules/eslint-plugin-import/node_modules/debug": {
+      "version": "3.2.7",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+      "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "ms": "^2.1.1"
       }
     },
-    "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/typescript-estree": {
-      "version": "6.21.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz",
-      "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==",
+    "node_modules/eslint-plugin-import/node_modules/doctrine": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
+      "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
       "dev": true,
+      "license": "Apache-2.0",
       "dependencies": {
-        "@typescript-eslint/types": "6.21.0",
-        "@typescript-eslint/visitor-keys": "6.21.0",
-        "debug": "^4.3.4",
-        "globby": "^11.1.0",
-        "is-glob": "^4.0.3",
-        "minimatch": "9.0.3",
-        "semver": "^7.5.4",
-        "ts-api-utils": "^1.0.1"
+        "esutils": "^2.0.2"
       },
       "engines": {
-        "node": "^16.0.0 || >=18.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/typescript-eslint"
-      },
-      "peerDependenciesMeta": {
-        "typescript": {
-          "optional": true
-        }
+        "node": ">=0.10.0"
       }
     },
-    "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/utils": {
-      "version": "6.21.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz",
-      "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==",
+    "node_modules/eslint-plugin-import/node_modules/minimatch": {
+      "version": "3.1.5",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
+      "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
       "dev": true,
+      "license": "ISC",
       "dependencies": {
-        "@eslint-community/eslint-utils": "^4.4.0",
-        "@types/json-schema": "^7.0.12",
-        "@types/semver": "^7.5.0",
-        "@typescript-eslint/scope-manager": "6.21.0",
-        "@typescript-eslint/types": "6.21.0",
-        "@typescript-eslint/typescript-estree": "6.21.0",
-        "semver": "^7.5.4"
+        "brace-expansion": "^1.1.7"
       },
       "engines": {
-        "node": "^16.0.0 || >=18.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/typescript-eslint"
-      },
-      "peerDependencies": {
-        "eslint": "^7.0.0 || ^8.0.0"
+        "node": "*"
       }
     },
-    "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/visitor-keys": {
-      "version": "6.21.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz",
-      "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==",
+    "node_modules/eslint-plugin-import/node_modules/semver": {
+      "version": "6.3.1",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+      "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+      "dev": true,
+      "license": "ISC",
+      "bin": {
+        "semver": "bin/semver.js"
+      }
+    },
+    "node_modules/eslint-plugin-jest": {
+      "version": "29.15.2",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-29.15.2.tgz",
+      "integrity": "sha512-kEN4r9RZl1xcsb4arGq89LrcVdOUFII/JSCwtTPJyv16mDwmPrcuEQwpxqZHeINvcsd7oK5O/rhdGlxFRaZwvQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/types": "6.21.0",
-        "eslint-visitor-keys": "^3.4.1"
+        "@typescript-eslint/utils": "^8.0.0"
       },
       "engines": {
-        "node": "^16.0.0 || >=18.0.0"
+        "node": "^20.12.0 || ^22.0.0 || >=24.0.0"
       },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/typescript-eslint"
+      "peerDependencies": {
+        "@typescript-eslint/eslint-plugin": "^8.0.0",
+        "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+        "jest": "*",
+        "typescript": ">=4.8.4 <7.0.0"
+      },
+      "peerDependenciesMeta": {
+        "@typescript-eslint/eslint-plugin": {
+          "optional": true
+        },
+        "jest": {
+          "optional": true
+        },
+        "typescript": {
+          "optional": true
+        }
       }
     },
     "node_modules/eslint-plugin-jsonc": {
-      "version": "2.15.1",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-jsonc/-/eslint-plugin-jsonc-2.15.1.tgz",
-      "integrity": "sha512-PVFrqIJa8BbM/e828RSn0SwB/Z5ye+2LDuy2XqG6AymNgPsfApRRcznsbxP7VrjdLEU4Nb+g9n/d6opyp0jp9A==",
+      "version": "2.21.1",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-jsonc/-/eslint-plugin-jsonc-2.21.1.tgz",
+      "integrity": "sha512-dbNR5iEnQeORwsK2WZzr3QaMtFCY3kKJVMRHPzUpKzMhmVy2zIpVgFDpX8MNoIdoqz6KCpCfOJavhfiSbZbN+w==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@eslint-community/eslint-utils": "^4.2.0",
-        "eslint-compat-utils": "^0.5.0",
-        "espree": "^9.6.1",
+        "@eslint-community/eslint-utils": "^4.5.1",
+        "diff-sequences": "^27.5.1",
+        "eslint-compat-utils": "^0.6.4",
+        "eslint-json-compat-utils": "^0.2.1",
+        "espree": "^9.6.1 || ^10.3.0",
         "graphemer": "^1.4.0",
-        "jsonc-eslint-parser": "^2.0.4",
+        "jsonc-eslint-parser": "^2.4.0",
         "natural-compare": "^1.4.0",
-        "synckit": "^0.6.0"
+        "synckit": "^0.6.2 || ^0.7.3 || ^0.11.5"
       },
       "engines": {
         "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -5049,35 +6375,42 @@
       }
     },
     "node_modules/eslint-plugin-jsx-a11y": {
-      "version": "6.8.0",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.8.0.tgz",
-      "integrity": "sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA==",
+      "version": "6.10.2",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz",
+      "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@babel/runtime": "^7.23.2",
-        "aria-query": "^5.3.0",
-        "array-includes": "^3.1.7",
+        "aria-query": "^5.3.2",
+        "array-includes": "^3.1.8",
         "array.prototype.flatmap": "^1.3.2",
         "ast-types-flow": "^0.0.8",
-        "axe-core": "=4.7.0",
-        "axobject-query": "^3.2.1",
+        "axe-core": "^4.10.0",
+        "axobject-query": "^4.1.0",
         "damerau-levenshtein": "^1.0.8",
         "emoji-regex": "^9.2.2",
-        "es-iterator-helpers": "^1.0.15",
-        "hasown": "^2.0.0",
+        "hasown": "^2.0.2",
         "jsx-ast-utils": "^3.3.5",
         "language-tags": "^1.0.9",
         "minimatch": "^3.1.2",
-        "object.entries": "^1.1.7",
-        "object.fromentries": "^2.0.7"
+        "object.fromentries": "^2.0.8",
+        "safe-regex-test": "^1.0.3",
+        "string.prototype.includes": "^2.0.1"
       },
       "engines": {
         "node": ">=4.0"
       },
       "peerDependencies": {
-        "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8"
+        "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9"
       }
     },
+    "node_modules/eslint-plugin-jsx-a11y/node_modules/balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+      "dev": true,
+      "license": "MIT"
+    },
     "node_modules/eslint-plugin-jsx-a11y/node_modules/brace-expansion": {
       "version": "1.1.14",
       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
@@ -5103,22 +6436,24 @@
       }
     },
     "node_modules/eslint-plugin-no-only-tests": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-3.1.0.tgz",
-      "integrity": "sha512-Lf4YW/bL6Un1R6A76pRZyE1dl1vr31G/ev8UzIc/geCgFWyrKil8hVjYqWVKGB/UIGmb6Slzs9T0wNezdSVegw==",
+      "version": "3.4.0",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-3.4.0.tgz",
+      "integrity": "sha512-4S3/9Nb7A2tiMcpzEQE9bQSlpeOz6WJkgryBuou/SA8W2x2c8Zf4j0NvTKBjv6qNhF9T79tmkecm/0CHqV0UGg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=5.0.0"
       }
     },
     "node_modules/eslint-plugin-prettier": {
-      "version": "5.1.3",
-      "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz",
-      "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==",
+      "version": "5.5.5",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.5.tgz",
+      "integrity": "sha512-hscXkbqUZ2sPithAuLm5MXL+Wph+U7wHngPBv9OMWwlP8iaflyxpjTYZkmdgB4/vPIhemRlBEoLrH7UC1n7aUw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "prettier-linter-helpers": "^1.0.0",
-        "synckit": "^0.8.6"
+        "prettier-linter-helpers": "^1.0.1",
+        "synckit": "^0.11.12"
       },
       "engines": {
         "node": "^14.18.0 || >=16.0.0"
@@ -5129,7 +6464,7 @@
       "peerDependencies": {
         "@types/eslint": ">=8.0.0",
         "eslint": ">=8.0.0",
-        "eslint-config-prettier": "*",
+        "eslint-config-prettier": ">= 7.0.0 <10.0.0 || >=10.1.0",
         "prettier": ">=3.0.0"
       },
       "peerDependenciesMeta": {
@@ -5141,27 +6476,12 @@
         }
       }
     },
-    "node_modules/eslint-plugin-prettier/node_modules/synckit": {
-      "version": "0.8.8",
-      "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz",
-      "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==",
-      "dev": true,
-      "dependencies": {
-        "@pkgr/core": "^0.1.0",
-        "tslib": "^2.6.2"
-      },
-      "engines": {
-        "node": "^14.18.0 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://opencollective.com/unts"
-      }
-    },
     "node_modules/eslint-rule-documentation": {
       "version": "1.0.23",
       "resolved": "https://registry.npmjs.org/eslint-rule-documentation/-/eslint-rule-documentation-1.0.23.tgz",
       "integrity": "sha512-pWReu3fkohwyvztx/oQWWgld2iad25TfUdi6wvhhaDPIQjHU/pyvlKgXFw1kX31SQK2Nq9MH+vRDWB0ZLy8fYw==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=4.0.0"
       }
@@ -5171,6 +6491,7 @@
       "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
       "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",
       "dev": true,
+      "license": "BSD-2-Clause",
       "dependencies": {
         "esrecurse": "^4.3.0",
         "estraverse": "^5.2.0"
@@ -5187,6 +6508,7 @@
       "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
       "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
       "dev": true,
+      "license": "Apache-2.0",
       "engines": {
         "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
       },
@@ -5194,6 +6516,30 @@
         "url": "https://opencollective.com/eslint"
       }
     },
+    "node_modules/eslint/node_modules/ajv": {
+      "version": "6.15.0",
+      "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz",
+      "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "fast-deep-equal": "^3.1.1",
+        "fast-json-stable-stringify": "^2.0.0",
+        "json-schema-traverse": "^0.4.1",
+        "uri-js": "^4.2.2"
+      },
+      "funding": {
+        "type": "github",
+        "url": "https://github.com/sponsors/epoberezkin"
+      }
+    },
+    "node_modules/eslint/node_modules/balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+      "dev": true,
+      "license": "MIT"
+    },
     "node_modules/eslint/node_modules/brace-expansion": {
       "version": "1.1.14",
       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
@@ -5205,6 +6551,23 @@
         "concat-map": "0.0.1"
       }
     },
+    "node_modules/eslint/node_modules/ignore": {
+      "version": "5.3.2",
+      "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+      "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">= 4"
+      }
+    },
+    "node_modules/eslint/node_modules/json-schema-traverse": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+      "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+      "dev": true,
+      "license": "MIT"
+    },
     "node_modules/eslint/node_modules/minimatch": {
       "version": "3.1.5",
       "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
@@ -5223,6 +6586,7 @@
       "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
       "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==",
       "dev": true,
+      "license": "BSD-2-Clause",
       "dependencies": {
         "acorn": "^8.9.0",
         "acorn-jsx": "^5.3.2",
@@ -5240,6 +6604,7 @@
       "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
       "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
       "dev": true,
+      "license": "BSD-2-Clause",
       "bin": {
         "esparse": "bin/esparse.js",
         "esvalidate": "bin/esvalidate.js"
@@ -5249,10 +6614,11 @@
       }
     },
     "node_modules/esquery": {
-      "version": "1.5.0",
-      "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz",
-      "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==",
+      "version": "1.7.0",
+      "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz",
+      "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==",
       "dev": true,
+      "license": "BSD-3-Clause",
       "dependencies": {
         "estraverse": "^5.1.0"
       },
@@ -5265,6 +6631,7 @@
       "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
       "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
       "dev": true,
+      "license": "BSD-2-Clause",
       "dependencies": {
         "estraverse": "^5.2.0"
       },
@@ -5277,6 +6644,7 @@
       "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
       "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
       "dev": true,
+      "license": "BSD-2-Clause",
       "engines": {
         "node": ">=4.0"
       }
@@ -5286,6 +6654,7 @@
       "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
       "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
       "dev": true,
+      "license": "BSD-2-Clause",
       "engines": {
         "node": ">=0.10.0"
       }
@@ -5295,18 +6664,11 @@
       "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
       "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.6"
       }
     },
-    "node_modules/event-target-shim": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
-      "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
-      "engines": {
-        "node": ">=6"
-      }
-    },
     "node_modules/eventemitter2": {
       "version": "5.0.1",
       "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-5.0.1.tgz",
@@ -5325,6 +6687,7 @@
       "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
       "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "cross-spawn": "^7.0.3",
         "get-stream": "^6.0.0",
@@ -5357,6 +6720,7 @@
       "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz",
       "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/expect-utils": "^29.7.0",
         "jest-get-type": "^29.6.3",
@@ -5369,15 +6733,15 @@
       }
     },
     "node_modules/express": {
-      "version": "4.22.1",
-      "resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz",
-      "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==",
+      "version": "4.22.2",
+      "resolved": "https://registry.npmjs.org/express/-/express-4.22.2.tgz",
+      "integrity": "sha512-IuL+Elrou2ZvCFHs18/CIzy2Nzvo25nZ1/D2eIZlz7c+QUayAcYoiM2BthCjs+EBHVpjYjcuLDAiCWgeIX3X1Q==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "accepts": "~1.3.8",
         "array-flatten": "1.1.1",
-        "body-parser": "~1.20.3",
+        "body-parser": "~1.20.5",
         "content-disposition": "~0.5.4",
         "content-type": "~1.0.4",
         "cookie": "~0.7.1",
@@ -5396,7 +6760,7 @@
         "parseurl": "~1.3.3",
         "path-to-regexp": "~0.1.12",
         "proxy-addr": "~2.0.7",
-        "qs": "~6.14.0",
+        "qs": "~6.15.1",
         "range-parser": "~1.2.1",
         "safe-buffer": "5.2.1",
         "send": "~0.19.0",
@@ -5420,6 +6784,7 @@
       "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
       "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "ms": "2.0.0"
       }
@@ -5428,13 +6793,15 @@
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
       "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/extrareqp2": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/extrareqp2/-/extrareqp2-1.0.0.tgz",
       "integrity": "sha512-Gum0g1QYb6wpPJCVypWP3bbIuaibcFiJcpuPM10YSXp/tzqi84x9PJageob+eN4xVRIOto4wjSGNLyMD54D2xA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "follow-redirects": "^1.14.0"
       }
@@ -5442,25 +6809,28 @@
     "node_modules/fast-deep-equal": {
       "version": "3.1.3",
       "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
-      "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
+      "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+      "license": "MIT"
     },
     "node_modules/fast-diff": {
       "version": "1.3.0",
       "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz",
       "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==",
-      "dev": true
+      "dev": true,
+      "license": "Apache-2.0"
     },
     "node_modules/fast-glob": {
-      "version": "3.3.2",
-      "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
-      "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
+      "version": "3.3.3",
+      "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
+      "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@nodelib/fs.stat": "^2.0.2",
         "@nodelib/fs.walk": "^1.2.3",
         "glob-parent": "^5.1.2",
         "merge2": "^1.3.0",
-        "micromatch": "^4.0.4"
+        "micromatch": "^4.0.8"
       },
       "engines": {
         "node": ">=8.6.0"
@@ -5471,6 +6841,7 @@
       "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
       "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
       "dev": true,
+      "license": "ISC",
       "dependencies": {
         "is-glob": "^4.0.1"
       },
@@ -5488,13 +6859,16 @@
     "node_modules/fast-json-stable-stringify": {
       "version": "2.1.0",
       "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
-      "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
+      "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/fast-levenshtein": {
       "version": "2.0.6",
       "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
       "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/fast-safe-stringify": {
       "version": "2.1.1",
@@ -5502,10 +6876,26 @@
       "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==",
       "license": "MIT"
     },
+    "node_modules/fast-uri": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz",
+      "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/fastify"
+        },
+        {
+          "type": "opencollective",
+          "url": "https://opencollective.com/fastify"
+        }
+      ],
+      "license": "BSD-3-Clause"
+    },
     "node_modules/fast-xml-builder": {
-      "version": "1.1.5",
-      "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.1.5.tgz",
-      "integrity": "sha512-4TJn/8FKLeslLAH3dnohXqE3QSoxkhvaMzepOIZytwJXZO69Bfz0HBdDHzOTOon6G59Zrk6VQ2bEiv1t61rfkA==",
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.2.0.tgz",
+      "integrity": "sha512-00aAWieqff+ZJhsXA4g1g7M8k+7AYoMUUHF+/zFb5U6Uv/P0Vl4QZo84/IcufzYalLuEj9928bXN9PbbFzMF0Q==",
       "funding": [
         {
           "type": "github",
@@ -5514,13 +6904,14 @@
       ],
       "license": "MIT",
       "dependencies": {
-        "path-expression-matcher": "^1.1.3"
+        "path-expression-matcher": "^1.5.0",
+        "xml-naming": "^0.1.0"
       }
     },
     "node_modules/fast-xml-parser": {
-      "version": "5.7.1",
-      "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.7.1.tgz",
-      "integrity": "sha512-8Cc3f8GUGUULg34pBch/KGyPLglS+OFs05deyOlY7fL2MTagYPKrVQNmR1fLF/yJ9PH5ZSTd3YDF6pnmeZU+zA==",
+      "version": "5.8.0",
+      "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.8.0.tgz",
+      "integrity": "sha512-6bIM7fsJxeo3uXv7OncQYsBAMPJ7V16Slahl/6M98C/i2q+vB1+4a0MtrvYwDFEUrwDSbAmeLDRXsOBwrL7yAg==",
       "funding": [
         {
           "type": "github",
@@ -5530,19 +6921,21 @@
       "license": "MIT",
       "dependencies": {
         "@nodable/entities": "^2.1.0",
-        "fast-xml-builder": "^1.1.5",
+        "fast-xml-builder": "^1.2.0",
         "path-expression-matcher": "^1.5.0",
-        "strnum": "^2.2.3"
+        "strnum": "^2.3.0",
+        "xml-naming": "^0.1.0"
       },
       "bin": {
         "fxparser": "src/cli/cli.js"
       }
     },
     "node_modules/fastq": {
-      "version": "1.17.1",
-      "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz",
-      "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==",
+      "version": "1.20.1",
+      "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz",
+      "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==",
       "dev": true,
+      "license": "ISC",
       "dependencies": {
         "reusify": "^1.0.4"
       }
@@ -5552,6 +6945,7 @@
       "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz",
       "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==",
       "dev": true,
+      "license": "Apache-2.0",
       "dependencies": {
         "bser": "2.1.1"
       }
@@ -5563,11 +6957,30 @@
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/fdir": {
+      "version": "6.5.0",
+      "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+      "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=12.0.0"
+      },
+      "peerDependencies": {
+        "picomatch": "^3 || ^4"
+      },
+      "peerDependenciesMeta": {
+        "picomatch": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/file-entry-cache": {
       "version": "6.0.1",
       "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
       "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "flat-cache": "^3.0.4"
       },
@@ -5579,6 +6992,8 @@
       "version": "7.1.1",
       "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
       "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
+      "dev": true,
+      "license": "MIT",
       "dependencies": {
         "to-regex-range": "^5.0.1"
       },
@@ -5587,17 +7002,18 @@
       }
     },
     "node_modules/finalhandler": {
-      "version": "1.3.1",
-      "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz",
-      "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==",
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz",
+      "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "debug": "2.6.9",
         "encodeurl": "~2.0.0",
         "escape-html": "~1.0.3",
-        "on-finished": "2.4.1",
+        "on-finished": "~2.4.1",
         "parseurl": "~1.3.3",
-        "statuses": "2.0.1",
+        "statuses": "~2.0.2",
         "unpipe": "~1.0.0"
       },
       "engines": {
@@ -5609,6 +7025,7 @@
       "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
       "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "ms": "2.0.0"
       }
@@ -5617,13 +7034,15 @@
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
       "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/find-up": {
       "version": "5.0.0",
       "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
       "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "locate-path": "^6.0.0",
         "path-exists": "^4.0.0"
@@ -5640,6 +7059,7 @@
       "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz",
       "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "flatted": "^3.2.9",
         "keyv": "^4.5.3",
@@ -5678,12 +7098,19 @@
       }
     },
     "node_modules/for-each": {
-      "version": "0.3.3",
-      "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
-      "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",
+      "version": "0.3.5",
+      "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz",
+      "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "is-callable": "^1.1.3"
+        "is-callable": "^1.2.7"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
     "node_modules/foreach": {
@@ -5692,27 +7119,12 @@
       "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==",
       "license": "MIT"
     },
-    "node_modules/form-data": {
-      "version": "4.0.4",
-      "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
-      "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==",
-      "license": "MIT",
-      "dependencies": {
-        "asynckit": "^0.4.0",
-        "combined-stream": "^1.0.8",
-        "es-set-tostringtag": "^2.1.0",
-        "hasown": "^2.0.2",
-        "mime-types": "^2.1.12"
-      },
-      "engines": {
-        "node": ">= 6"
-      }
-    },
     "node_modules/forwarded": {
       "version": "0.2.0",
       "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
       "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.6"
       }
@@ -5722,6 +7134,7 @@
       "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
       "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.6"
       }
@@ -5729,13 +7142,17 @@
     "node_modules/fs.realpath": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
-      "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
+      "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
+      "dev": true,
+      "license": "ISC"
     },
     "node_modules/fsevents": {
       "version": "2.3.3",
       "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
       "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+      "dev": true,
       "hasInstallScript": true,
+      "license": "MIT",
       "optional": true,
       "os": [
         "darwin"
@@ -5748,20 +7165,25 @@
       "version": "1.1.2",
       "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
       "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+      "dev": true,
+      "license": "MIT",
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
       }
     },
     "node_modules/function.prototype.name": {
-      "version": "1.1.6",
-      "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz",
-      "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==",
+      "version": "1.1.8",
+      "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz",
+      "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.2.0",
-        "es-abstract": "^1.22.1",
-        "functions-have-names": "^1.2.3"
+        "call-bind": "^1.0.8",
+        "call-bound": "^1.0.3",
+        "define-properties": "^1.2.1",
+        "functions-have-names": "^1.2.3",
+        "hasown": "^2.0.2",
+        "is-callable": "^1.2.7"
       },
       "engines": {
         "node": ">= 0.4"
@@ -5775,15 +7197,27 @@
       "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz",
       "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
       "dev": true,
+      "license": "MIT",
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
       }
     },
+    "node_modules/generator-function": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz",
+      "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
     "node_modules/gensync": {
       "version": "1.0.0-beta.2",
       "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
       "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=6.9.0"
       }
@@ -5792,6 +7226,7 @@
       "version": "2.0.5",
       "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
       "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+      "license": "ISC",
       "engines": {
         "node": "6.* || 8.* || >= 10.*"
       }
@@ -5800,6 +7235,7 @@
       "version": "1.3.0",
       "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
       "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
         "call-bind-apply-helpers": "^1.0.2",
@@ -5825,20 +7261,16 @@
       "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz",
       "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8.0.0"
       }
     },
-    "node_modules/get-port-please": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/get-port-please/-/get-port-please-3.0.1.tgz",
-      "integrity": "sha512-R5pcVO8Z1+pVDu8Ml3xaJCEkBiiy1VQN9za0YqH8GIi1nIqD4IzQhzY6dDzMRtdS1lyiGlucRzm8IN8wtLIXng==",
-      "license": "MIT"
-    },
     "node_modules/get-proto": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
       "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
         "dunder-proto": "^1.0.1",
@@ -5853,6 +7285,7 @@
       "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
       "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=10"
       },
@@ -5861,14 +7294,15 @@
       }
     },
     "node_modules/get-symbol-description": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz",
-      "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==",
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz",
+      "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.5",
+        "call-bound": "^1.0.3",
         "es-errors": "^1.3.0",
-        "get-intrinsic": "^1.2.4"
+        "get-intrinsic": "^1.2.6"
       },
       "engines": {
         "node": ">= 0.4"
@@ -5877,10 +7311,23 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
+    "node_modules/get-tsconfig": {
+      "version": "4.14.0",
+      "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.0.tgz",
+      "integrity": "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "resolve-pkg-maps": "^1.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
+      }
+    },
     "node_modules/get-uri": {
-      "version": "6.0.4",
-      "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.4.tgz",
-      "integrity": "sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==",
+      "version": "6.0.5",
+      "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.5.tgz",
+      "integrity": "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -5896,28 +7343,28 @@
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/git-node-fs/-/git-node-fs-1.0.0.tgz",
       "integrity": "sha512-bLQypt14llVXBg0S0u8q8HmU7g9p3ysH+NvVlae5vILuUvs759665HvmR5+wb04KjHyjFcDRxdYb4kyNnluMUQ==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/git-sha1": {
       "version": "0.1.2",
       "resolved": "https://registry.npmjs.org/git-sha1/-/git-sha1-0.1.2.tgz",
       "integrity": "sha512-2e/nZezdVlyCopOCYHeW0onkbZg7xP1Ad6pndPy1rCygeRykefUS6r7oA5cJRGEFvseiaz5a/qUHFVX1dd6Isg==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/glob": {
-      "version": "7.2.3",
-      "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
-      "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+      "version": "13.0.6",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
+      "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
+      "license": "BlueOak-1.0.0",
       "dependencies": {
-        "fs.realpath": "^1.0.0",
-        "inflight": "^1.0.4",
-        "inherits": "2",
-        "minimatch": "^3.1.1",
-        "once": "^1.3.0",
-        "path-is-absolute": "^1.0.0"
+        "minimatch": "^10.2.2",
+        "minipass": "^7.1.3",
+        "path-scurry": "^2.0.2"
       },
       "engines": {
-        "node": "*"
+        "node": "18 || 20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
@@ -5928,6 +7375,7 @@
       "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
       "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
       "dev": true,
+      "license": "ISC",
       "dependencies": {
         "is-glob": "^4.0.3"
       },
@@ -5935,33 +7383,12 @@
         "node": ">=10.13.0"
       }
     },
-    "node_modules/glob/node_modules/brace-expansion": {
-      "version": "1.1.14",
-      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
-      "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
-      "license": "MIT",
-      "dependencies": {
-        "balanced-match": "^1.0.0",
-        "concat-map": "0.0.1"
-      }
-    },
-    "node_modules/glob/node_modules/minimatch": {
-      "version": "3.1.5",
-      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
-      "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
-      "license": "ISC",
-      "dependencies": {
-        "brace-expansion": "^1.1.7"
-      },
-      "engines": {
-        "node": "*"
-      }
-    },
     "node_modules/globals": {
       "version": "13.24.0",
       "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",
       "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "type-fest": "^0.20.2"
       },
@@ -5973,12 +7400,14 @@
       }
     },
     "node_modules/globalthis": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz",
-      "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==",
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",
+      "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "define-properties": "^1.1.3"
+        "define-properties": "^1.2.1",
+        "gopd": "^1.0.1"
       },
       "engines": {
         "node": ">= 0.4"
@@ -5992,6 +7421,7 @@
       "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
       "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "array-union": "^2.1.0",
         "dir-glob": "^3.0.1",
@@ -6007,10 +7437,21 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
+    "node_modules/globby/node_modules/ignore": {
+      "version": "5.3.2",
+      "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
+      "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">= 4"
+      }
+    },
     "node_modules/gopd": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
       "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">= 0.4"
@@ -6023,13 +7464,15 @@
       "version": "4.2.11",
       "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
       "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
-      "dev": true
+      "dev": true,
+      "license": "ISC"
     },
     "node_modules/graphemer": {
       "version": "1.4.0",
       "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
       "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/handlebars": {
       "version": "4.7.9",
@@ -6057,6 +7500,7 @@
       "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
       "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "ansi-regex": "^2.0.0"
       },
@@ -6069,15 +7513,20 @@
       "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
       "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=0.10.0"
       }
     },
     "node_modules/has-bigints": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz",
-      "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==",
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz",
+      "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==",
       "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.4"
+      },
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
       }
@@ -6086,6 +7535,7 @@
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
       "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
@@ -6095,6 +7545,7 @@
       "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
       "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "es-define-property": "^1.0.0"
       },
@@ -6103,10 +7554,14 @@
       }
     },
     "node_modules/has-proto": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
-      "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz",
+      "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==",
       "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "dunder-proto": "^1.0.0"
+      },
       "engines": {
         "node": ">= 0.4"
       },
@@ -6118,6 +7573,7 @@
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
       "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">= 0.4"
@@ -6130,6 +7586,8 @@
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
       "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
+      "dev": true,
+      "license": "MIT",
       "dependencies": {
         "has-symbols": "^1.0.3"
       },
@@ -6141,9 +7599,10 @@
       }
     },
     "node_modules/hasown": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
-      "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz",
+      "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
         "function-bind": "^1.1.2"
@@ -6156,22 +7615,28 @@
       "version": "2.0.2",
       "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
       "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/http-errors": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
-      "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
+      "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "depd": "2.0.0",
-        "inherits": "2.0.4",
-        "setprototypeof": "1.2.0",
-        "statuses": "2.0.1",
-        "toidentifier": "1.0.1"
+        "depd": "~2.0.0",
+        "inherits": "~2.0.4",
+        "setprototypeof": "~1.2.0",
+        "statuses": "~2.0.2",
+        "toidentifier": "~1.0.1"
       },
       "engines": {
         "node": ">= 0.8"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/express"
       }
     },
     "node_modules/http-proxy-agent": {
@@ -6212,6 +7677,7 @@
       "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
       "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
       "dev": true,
+      "license": "Apache-2.0",
       "engines": {
         "node": ">=10.17.0"
       }
@@ -6230,19 +7696,21 @@
       }
     },
     "node_modules/ignore": {
-      "version": "5.3.1",
-      "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
-      "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==",
+      "version": "7.0.5",
+      "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz",
+      "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 4"
       }
     },
     "node_modules/import-fresh": {
-      "version": "3.3.0",
-      "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
-      "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
+      "version": "3.3.1",
+      "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",
+      "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "parent-module": "^1.0.0",
         "resolve-from": "^4.0.0"
@@ -6255,10 +7723,11 @@
       }
     },
     "node_modules/import-local": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz",
-      "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==",
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz",
+      "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "pkg-dir": "^4.2.0",
         "resolve-cwd": "^3.0.0"
@@ -6278,6 +7747,7 @@
       "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
       "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=0.8.19"
       }
@@ -6287,6 +7757,7 @@
       "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
       "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
@@ -6295,6 +7766,9 @@
       "version": "1.0.6",
       "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
       "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+      "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
+      "dev": true,
+      "license": "ISC",
       "dependencies": {
         "once": "^1.3.0",
         "wrappy": "1"
@@ -6303,66 +7777,61 @@
     "node_modules/inherits": {
       "version": "2.0.4",
       "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
-      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+      "license": "ISC"
     },
     "node_modules/ini": {
       "version": "1.3.8",
       "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
       "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
-      "dev": true
+      "dev": true,
+      "license": "ISC"
     },
     "node_modules/internal-slot": {
-      "version": "1.0.7",
-      "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz",
-      "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==",
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz",
+      "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "es-errors": "^1.3.0",
-        "hasown": "^2.0.0",
-        "side-channel": "^1.0.4"
+        "hasown": "^2.0.2",
+        "side-channel": "^1.1.0"
       },
       "engines": {
         "node": ">= 0.4"
       }
     },
     "node_modules/ip-address": {
-      "version": "9.0.5",
-      "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz",
-      "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==",
+      "version": "10.2.0",
+      "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.2.0.tgz",
+      "integrity": "sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==",
       "dev": true,
       "license": "MIT",
-      "dependencies": {
-        "jsbn": "1.1.0",
-        "sprintf-js": "^1.1.3"
-      },
       "engines": {
         "node": ">= 12"
       }
     },
-    "node_modules/ip-address/node_modules/sprintf-js": {
-      "version": "1.1.3",
-      "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",
-      "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==",
-      "dev": true,
-      "license": "BSD-3-Clause"
-    },
     "node_modules/ipaddr.js": {
       "version": "1.9.1",
       "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
       "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.10"
       }
     },
     "node_modules/is-array-buffer": {
-      "version": "3.0.4",
-      "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz",
-      "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==",
+      "version": "3.0.5",
+      "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz",
+      "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "get-intrinsic": "^1.2.1"
+        "call-bind": "^1.0.8",
+        "call-bound": "^1.0.3",
+        "get-intrinsic": "^1.2.6"
       },
       "engines": {
         "node": ">= 0.4"
@@ -6375,15 +7844,21 @@
       "version": "0.2.1",
       "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
       "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/is-async-function": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz",
-      "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==",
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz",
+      "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "has-tostringtag": "^1.0.0"
+        "async-function": "^1.0.0",
+        "call-bound": "^1.0.3",
+        "get-proto": "^1.0.1",
+        "has-tostringtag": "^1.0.2",
+        "safe-regex-test": "^1.1.0"
       },
       "engines": {
         "node": ">= 0.4"
@@ -6393,12 +7868,16 @@
       }
     },
     "node_modules/is-bigint": {
-      "version": "1.0.4",
-      "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
-      "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==",
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz",
+      "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "has-bigints": "^1.0.1"
+        "has-bigints": "^1.0.2"
+      },
+      "engines": {
+        "node": ">= 0.4"
       },
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
@@ -6408,6 +7887,8 @@
       "version": "2.1.0",
       "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
       "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+      "dev": true,
+      "license": "MIT",
       "dependencies": {
         "binary-extensions": "^2.0.0"
       },
@@ -6416,13 +7897,14 @@
       }
     },
     "node_modules/is-boolean-object": {
-      "version": "1.1.2",
-      "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz",
-      "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==",
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz",
+      "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "has-tostringtag": "^1.0.0"
+        "call-bound": "^1.0.3",
+        "has-tostringtag": "^1.0.2"
       },
       "engines": {
         "node": ">= 0.4"
@@ -6431,11 +7913,22 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
+    "node_modules/is-bun-module": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz",
+      "integrity": "sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "semver": "^7.7.1"
+      }
+    },
     "node_modules/is-callable": {
       "version": "1.2.7",
       "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
       "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.4"
       },
@@ -6444,24 +7937,31 @@
       }
     },
     "node_modules/is-core-module": {
-      "version": "2.13.1",
-      "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
-      "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==",
+      "version": "2.16.2",
+      "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz",
+      "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "hasown": "^2.0.0"
+        "hasown": "^2.0.3"
+      },
+      "engines": {
+        "node": ">= 0.4"
       },
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/is-date-object": {
-      "version": "1.0.5",
-      "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz",
-      "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==",
+    "node_modules/is-data-view": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz",
+      "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "has-tostringtag": "^1.0.0"
+        "call-bound": "^1.0.2",
+        "get-intrinsic": "^1.2.6",
+        "is-typed-array": "^1.1.13"
       },
       "engines": {
         "node": ">= 0.4"
@@ -6470,36 +7970,44 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/is-docker": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz",
-      "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==",
+    "node_modules/is-date-object": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz",
+      "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==",
+      "dev": true,
       "license": "MIT",
-      "bin": {
-        "is-docker": "cli.js"
+      "dependencies": {
+        "call-bound": "^1.0.2",
+        "has-tostringtag": "^1.0.2"
       },
       "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+        "node": ">= 0.4"
       },
       "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
     "node_modules/is-extglob": {
       "version": "2.1.1",
       "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
       "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+      "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=0.10.0"
       }
     },
     "node_modules/is-finalizationregistry": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz",
-      "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==",
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz",
+      "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2"
+        "call-bound": "^1.0.3"
+      },
+      "engines": {
+        "node": ">= 0.4"
       },
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
@@ -6509,6 +8017,7 @@
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
       "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
@@ -6518,17 +8027,23 @@
       "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz",
       "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=6"
       }
     },
     "node_modules/is-generator-function": {
-      "version": "1.0.10",
-      "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz",
-      "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==",
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz",
+      "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "has-tostringtag": "^1.0.0"
+        "call-bound": "^1.0.4",
+        "generator-function": "^2.0.0",
+        "get-proto": "^1.0.1",
+        "has-tostringtag": "^1.0.2",
+        "safe-regex-test": "^1.1.0"
       },
       "engines": {
         "node": ">= 0.4"
@@ -6541,6 +8056,8 @@
       "version": "4.0.3",
       "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
       "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+      "dev": true,
+      "license": "MIT",
       "dependencies": {
         "is-extglob": "^2.1.1"
       },
@@ -6548,29 +8065,15 @@
         "node": ">=0.10.0"
       }
     },
-    "node_modules/is-inside-container": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz",
-      "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==",
+    "node_modules/is-map": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz",
+      "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==",
+      "dev": true,
       "license": "MIT",
-      "dependencies": {
-        "is-docker": "^3.0.0"
-      },
-      "bin": {
-        "is-inside-container": "cli.js"
-      },
       "engines": {
-        "node": ">=14.16"
+        "node": ">= 0.4"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/is-map": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz",
-      "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==",
-      "dev": true,
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
       }
@@ -6580,6 +8083,7 @@
       "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz",
       "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.4"
       },
@@ -6591,17 +8095,21 @@
       "version": "7.0.0",
       "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
       "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+      "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=0.12.0"
       }
     },
     "node_modules/is-number-object": {
-      "version": "1.0.7",
-      "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz",
-      "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==",
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz",
+      "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "has-tostringtag": "^1.0.0"
+        "call-bound": "^1.0.3",
+        "has-tostringtag": "^1.0.2"
       },
       "engines": {
         "node": ">= 0.4"
@@ -6615,18 +8123,22 @@
       "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
       "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
     "node_modules/is-regex": {
-      "version": "1.1.4",
-      "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
-      "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==",
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz",
+      "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "has-tostringtag": "^1.0.0"
+        "call-bound": "^1.0.2",
+        "gopd": "^1.2.0",
+        "has-tostringtag": "^1.0.2",
+        "hasown": "^2.0.2"
       },
       "engines": {
         "node": ">= 0.4"
@@ -6636,21 +8148,26 @@
       }
     },
     "node_modules/is-set": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz",
-      "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==",
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz",
+      "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==",
       "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.4"
+      },
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
       }
     },
     "node_modules/is-shared-array-buffer": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz",
-      "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==",
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz",
+      "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.7"
+        "call-bound": "^1.0.3"
       },
       "engines": {
         "node": ">= 0.4"
@@ -6664,6 +8181,7 @@
       "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
       "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       },
@@ -6672,12 +8190,14 @@
       }
     },
     "node_modules/is-string": {
-      "version": "1.0.7",
-      "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz",
-      "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==",
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz",
+      "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "has-tostringtag": "^1.0.0"
+        "call-bound": "^1.0.3",
+        "has-tostringtag": "^1.0.2"
       },
       "engines": {
         "node": ">= 0.4"
@@ -6687,12 +8207,15 @@
       }
     },
     "node_modules/is-symbol": {
-      "version": "1.0.4",
-      "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz",
-      "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==",
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz",
+      "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "has-symbols": "^1.0.2"
+        "call-bound": "^1.0.2",
+        "has-symbols": "^1.1.0",
+        "safe-regex-test": "^1.1.0"
       },
       "engines": {
         "node": ">= 0.4"
@@ -6702,12 +8225,13 @@
       }
     },
     "node_modules/is-typed-array": {
-      "version": "1.1.13",
-      "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz",
-      "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==",
+      "version": "1.1.15",
+      "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz",
+      "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "which-typed-array": "^1.1.14"
+        "which-typed-array": "^1.1.16"
       },
       "engines": {
         "node": ">= 0.4"
@@ -6717,80 +8241,81 @@
       }
     },
     "node_modules/is-weakmap": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz",
-      "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==",
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz",
+      "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==",
       "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.4"
+      },
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
       }
     },
     "node_modules/is-weakref": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz",
-      "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==",
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz",
+      "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2"
+        "call-bound": "^1.0.3"
+      },
+      "engines": {
+        "node": ">= 0.4"
       },
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
       }
     },
     "node_modules/is-weakset": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz",
-      "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==",
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz",
+      "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==",
       "dev": true,
-      "dependencies": {
-        "call-bind": "^1.0.2",
-        "get-intrinsic": "^1.1.1"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/is-wsl": {
-      "version": "3.1.1",
-      "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz",
-      "integrity": "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==",
       "license": "MIT",
       "dependencies": {
-        "is-inside-container": "^1.0.0"
+        "call-bound": "^1.0.3",
+        "get-intrinsic": "^1.2.6"
       },
       "engines": {
-        "node": ">=16"
+        "node": ">= 0.4"
       },
       "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
     "node_modules/isarray": {
       "version": "2.0.5",
       "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
       "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/isexe": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
       "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
-      "dev": true
+      "dev": true,
+      "license": "ISC"
     },
     "node_modules/istanbul-lib-coverage": {
       "version": "3.2.2",
       "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz",
       "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==",
       "dev": true,
+      "license": "BSD-3-Clause",
       "engines": {
         "node": ">=8"
       }
     },
     "node_modules/istanbul-lib-instrument": {
-      "version": "6.0.2",
-      "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz",
-      "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==",
+      "version": "6.0.3",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz",
+      "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==",
       "dev": true,
+      "license": "BSD-3-Clause",
       "dependencies": {
         "@babel/core": "^7.23.9",
         "@babel/parser": "^7.23.9",
@@ -6807,6 +8332,7 @@
       "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz",
       "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==",
       "dev": true,
+      "license": "BSD-3-Clause",
       "dependencies": {
         "istanbul-lib-coverage": "^3.0.0",
         "make-dir": "^4.0.0",
@@ -6821,6 +8347,7 @@
       "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz",
       "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==",
       "dev": true,
+      "license": "BSD-3-Clause",
       "dependencies": {
         "debug": "^4.1.1",
         "istanbul-lib-coverage": "^3.0.0",
@@ -6831,10 +8358,11 @@
       }
     },
     "node_modules/istanbul-reports": {
-      "version": "3.1.7",
-      "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz",
-      "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==",
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz",
+      "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==",
       "dev": true,
+      "license": "BSD-3-Clause",
       "dependencies": {
         "html-escaper": "^2.0.0",
         "istanbul-lib-report": "^3.0.0"
@@ -6843,24 +8371,12 @@
         "node": ">=8"
       }
     },
-    "node_modules/iterator.prototype": {
-      "version": "1.1.2",
-      "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz",
-      "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==",
-      "dev": true,
-      "dependencies": {
-        "define-properties": "^1.2.1",
-        "get-intrinsic": "^1.2.1",
-        "has-symbols": "^1.0.3",
-        "reflect.getprototypeof": "^1.0.4",
-        "set-function-name": "^2.0.1"
-      }
-    },
     "node_modules/jest": {
       "version": "29.7.0",
       "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz",
       "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/core": "^29.7.0",
         "@jest/types": "^29.6.3",
@@ -6887,6 +8403,7 @@
       "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz",
       "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "execa": "^5.0.0",
         "jest-util": "^29.7.0",
@@ -6901,6 +8418,7 @@
       "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz",
       "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/environment": "^29.7.0",
         "@jest/expect": "^29.7.0",
@@ -6932,6 +8450,7 @@
       "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz",
       "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/core": "^29.7.0",
         "@jest/test-result": "^29.7.0",
@@ -6960,11 +8479,46 @@
         }
       }
     },
+    "node_modules/jest-cli/node_modules/cliui": {
+      "version": "8.0.1",
+      "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+      "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "string-width": "^4.2.0",
+        "strip-ansi": "^6.0.1",
+        "wrap-ansi": "^7.0.0"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/jest-cli/node_modules/yargs": {
+      "version": "17.7.2",
+      "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+      "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "cliui": "^8.0.1",
+        "escalade": "^3.1.1",
+        "get-caller-file": "^2.0.5",
+        "require-directory": "^2.1.1",
+        "string-width": "^4.2.3",
+        "y18n": "^5.0.5",
+        "yargs-parser": "^21.1.1"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
     "node_modules/jest-config": {
       "version": "29.7.0",
       "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz",
       "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/core": "^7.11.6",
         "@jest/test-sequencer": "^29.7.0",
@@ -7005,10 +8559,65 @@
         }
       }
     },
+    "node_modules/jest-config/node_modules/balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/jest-config/node_modules/brace-expansion": {
+      "version": "1.1.14",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
+      "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "node_modules/jest-config/node_modules/glob": {
+      "version": "7.2.3",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+      "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+      "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "^3.1.1",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
+      },
+      "engines": {
+        "node": "*"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
+    "node_modules/jest-config/node_modules/minimatch": {
+      "version": "3.1.5",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
+      "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "brace-expansion": "^1.1.7"
+      },
+      "engines": {
+        "node": "*"
+      }
+    },
     "node_modules/jest-diff": {
       "version": "29.7.0",
       "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz",
       "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==",
+      "dev": true,
+      "license": "MIT",
       "dependencies": {
         "chalk": "^4.0.0",
         "diff-sequences": "^29.6.3",
@@ -7019,11 +8628,22 @@
         "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
+    "node_modules/jest-diff/node_modules/diff-sequences": {
+      "version": "29.6.3",
+      "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz",
+      "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      }
+    },
     "node_modules/jest-docblock": {
       "version": "29.7.0",
       "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz",
       "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "detect-newline": "^3.0.0"
       },
@@ -7036,6 +8656,7 @@
       "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz",
       "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/types": "^29.6.3",
         "chalk": "^4.0.0",
@@ -7052,6 +8673,7 @@
       "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz",
       "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/environment": "^29.7.0",
         "@jest/fake-timers": "^29.7.0",
@@ -7068,6 +8690,8 @@
       "version": "29.6.3",
       "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz",
       "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==",
+      "dev": true,
+      "license": "MIT",
       "engines": {
         "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
@@ -7077,6 +8701,7 @@
       "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz",
       "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/types": "^29.6.3",
         "@types/graceful-fs": "^4.1.3",
@@ -7102,6 +8727,7 @@
       "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz",
       "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "jest-get-type": "^29.6.3",
         "pretty-format": "^29.7.0"
@@ -7114,6 +8740,8 @@
       "version": "29.7.0",
       "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz",
       "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==",
+      "dev": true,
+      "license": "MIT",
       "dependencies": {
         "chalk": "^4.0.0",
         "jest-diff": "^29.7.0",
@@ -7129,6 +8757,7 @@
       "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz",
       "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/code-frame": "^7.12.13",
         "@jest/types": "^29.6.3",
@@ -7149,6 +8778,7 @@
       "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz",
       "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/types": "^29.6.3",
         "@types/node": "*",
@@ -7163,6 +8793,7 @@
       "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz",
       "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=6"
       },
@@ -7180,6 +8811,7 @@
       "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz",
       "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
@@ -7189,6 +8821,7 @@
       "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz",
       "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "chalk": "^4.0.0",
         "graceful-fs": "^4.2.9",
@@ -7209,6 +8842,7 @@
       "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz",
       "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "jest-regex-util": "^29.6.3",
         "jest-snapshot": "^29.7.0"
@@ -7217,11 +8851,34 @@
         "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
+    "node_modules/jest-resolve/node_modules/resolve": {
+      "version": "1.22.12",
+      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz",
+      "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "es-errors": "^1.3.0",
+        "is-core-module": "^2.16.1",
+        "path-parse": "^1.0.7",
+        "supports-preserve-symlinks-flag": "^1.0.0"
+      },
+      "bin": {
+        "resolve": "bin/resolve"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
     "node_modules/jest-runner": {
       "version": "29.7.0",
       "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz",
       "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/console": "^29.7.0",
         "@jest/environment": "^29.7.0",
@@ -7254,6 +8911,7 @@
       "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz",
       "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/environment": "^29.7.0",
         "@jest/fake-timers": "^29.7.0",
@@ -7282,11 +8940,65 @@
         "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
+    "node_modules/jest-runtime/node_modules/balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/jest-runtime/node_modules/brace-expansion": {
+      "version": "1.1.14",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
+      "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "node_modules/jest-runtime/node_modules/glob": {
+      "version": "7.2.3",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+      "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+      "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "^3.1.1",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
+      },
+      "engines": {
+        "node": "*"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
+    "node_modules/jest-runtime/node_modules/minimatch": {
+      "version": "3.1.5",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
+      "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "brace-expansion": "^1.1.7"
+      },
+      "engines": {
+        "node": "*"
+      }
+    },
     "node_modules/jest-snapshot": {
       "version": "29.7.0",
       "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz",
       "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/core": "^7.11.6",
         "@babel/generator": "^7.7.2",
@@ -7318,6 +9030,7 @@
       "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz",
       "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/types": "^29.6.3",
         "@types/node": "*",
@@ -7330,11 +9043,25 @@
         "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
+    "node_modules/jest-util/node_modules/picomatch": {
+      "version": "2.3.2",
+      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
+      "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=8.6"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/jonschlinkert"
+      }
+    },
     "node_modules/jest-validate": {
       "version": "29.7.0",
       "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz",
       "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/types": "^29.6.3",
         "camelcase": "^6.2.0",
@@ -7352,6 +9079,7 @@
       "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
       "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=10"
       },
@@ -7364,6 +9092,7 @@
       "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz",
       "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/test-result": "^29.7.0",
         "@jest/types": "^29.6.3",
@@ -7383,6 +9112,7 @@
       "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz",
       "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@types/node": "*",
         "jest-util": "^29.7.0",
@@ -7398,6 +9128,7 @@
       "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
       "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "has-flag": "^4.0.0"
       },
@@ -7413,6 +9144,7 @@
       "resolved": "https://registry.npmjs.org/js-git/-/js-git-0.7.8.tgz",
       "integrity": "sha512-+E5ZH/HeRnoc/LW0AmAyhU+mNcWBzAKE+30+IDMLSLbbK+Tdt02AdkOKq9u15rlJsDEGFqtgckc8ZM59LhhiUA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "bodec": "^0.1.0",
         "culvert": "^0.1.2",
@@ -7432,7 +9164,8 @@
     "node_modules/js-tokens": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
-      "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
+      "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+      "license": "MIT"
     },
     "node_modules/js-yaml": {
       "version": "4.1.1",
@@ -7446,45 +9179,32 @@
         "js-yaml": "bin/js-yaml.js"
       }
     },
-    "node_modules/jsbn": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz",
-      "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/jsep": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.4.0.tgz",
-      "integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==",
-      "license": "MIT",
-      "engines": {
-        "node": ">= 10.16.0"
-      }
-    },
     "node_modules/jsesc": {
-      "version": "2.5.2",
-      "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
-      "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
+      "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
       "dev": true,
+      "license": "MIT",
       "bin": {
         "jsesc": "bin/jsesc"
       },
       "engines": {
-        "node": ">=4"
+        "node": ">=6"
       }
     },
     "node_modules/json-buffer": {
       "version": "3.0.1",
       "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
       "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/json-parse-even-better-errors": {
       "version": "2.3.1",
       "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
       "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/json-pointer": {
       "version": "0.6.2",
@@ -7495,22 +9215,39 @@
         "foreach": "^2.0.4"
       }
     },
+    "node_modules/json-schema-to-ts": {
+      "version": "2.7.2",
+      "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-2.7.2.tgz",
+      "integrity": "sha512-R1JfqKqbBR4qE8UyBR56Ms30LL62/nlhoz+1UkfI/VE7p54Awu919FZ6ZUPG8zIa3XB65usPJgr1ONVncUGSaQ==",
+      "license": "MIT",
+      "dependencies": {
+        "@babel/runtime": "^7.18.3",
+        "@types/json-schema": "^7.0.9",
+        "ts-algebra": "^1.2.0"
+      },
+      "engines": {
+        "node": ">=16"
+      }
+    },
     "node_modules/json-schema-traverse": {
-      "version": "0.4.1",
-      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
-      "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+      "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+      "license": "MIT"
     },
     "node_modules/json-stable-stringify-without-jsonify": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
       "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/json-stringify-safe": {
       "version": "5.0.1",
       "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
       "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",
       "dev": true,
+      "license": "ISC",
       "optional": true
     },
     "node_modules/json5": {
@@ -7518,6 +9255,7 @@
       "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
       "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
       "dev": true,
+      "license": "MIT",
       "bin": {
         "json5": "lib/cli.js"
       },
@@ -7526,10 +9264,11 @@
       }
     },
     "node_modules/jsonc-eslint-parser": {
-      "version": "2.4.0",
-      "resolved": "https://registry.npmjs.org/jsonc-eslint-parser/-/jsonc-eslint-parser-2.4.0.tgz",
-      "integrity": "sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==",
+      "version": "2.4.2",
+      "resolved": "https://registry.npmjs.org/jsonc-eslint-parser/-/jsonc-eslint-parser-2.4.2.tgz",
+      "integrity": "sha512-1e4qoRgnn448pRuMvKGsFFymUCquZV0mpGgOyIKNgD3JVDTsVJyRBGH/Fm0tBb8WsWGgmB1mDe6/yJMQM37DUA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "acorn": "^8.5.0",
         "eslint-visitor-keys": "^3.0.0",
@@ -7543,22 +9282,13 @@
         "url": "https://github.com/sponsors/ota-meshi"
       }
     },
-    "node_modules/jsonpath-plus": {
-      "version": "10.3.0",
-      "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz",
-      "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==",
-      "license": "MIT",
-      "dependencies": {
-        "@jsep-plugin/assignment": "^1.3.0",
-        "@jsep-plugin/regex": "^1.0.4",
-        "jsep": "^1.4.0"
-      },
-      "bin": {
-        "jsonpath": "bin/jsonpath-cli.js",
-        "jsonpath-plus": "bin/jsonpath-cli.js"
-      },
+    "node_modules/jsonpath-rfc9535": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/jsonpath-rfc9535/-/jsonpath-rfc9535-1.3.0.tgz",
+      "integrity": "sha512-3jFHya7oZ45aDxIIdx+/zQARahHXxFSMWBkcBUldfXpLS9VCXDJyTKt35kQfEXLqh0K3Ixw/9xFnvcDStaxh7Q==",
+      "license": "Apache-2.0",
       "engines": {
-        "node": ">=18.0.0"
+        "node": ">=20"
       }
     },
     "node_modules/jsonpointer": {
@@ -7575,6 +9305,7 @@
       "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz",
       "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "array-includes": "^3.1.6",
         "array.prototype.flat": "^1.3.1",
@@ -7590,6 +9321,7 @@
       "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
       "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "json-buffer": "3.0.1"
       }
@@ -7599,21 +9331,24 @@
       "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
       "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=6"
       }
     },
     "node_modules/language-subtag-registry": {
-      "version": "0.3.22",
-      "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz",
-      "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==",
-      "dev": true
+      "version": "0.3.23",
+      "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz",
+      "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==",
+      "dev": true,
+      "license": "CC0-1.0"
     },
     "node_modules/language-tags": {
       "version": "1.0.9",
       "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz",
       "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "language-subtag-registry": "^0.3.20"
       },
@@ -7625,6 +9360,7 @@
       "version": "3.1.0",
       "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
       "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==",
+      "license": "MIT",
       "engines": {
         "node": ">=6"
       }
@@ -7634,6 +9370,7 @@
       "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
       "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "prelude-ls": "^1.2.1",
         "type-check": "~0.4.0"
@@ -7646,13 +9383,15 @@
       "version": "1.2.4",
       "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
       "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/locate-path": {
       "version": "6.0.0",
       "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
       "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "p-locate": "^5.0.0"
       },
@@ -7674,43 +9413,50 @@
       "version": "4.3.0",
       "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
       "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/lodash.kebabcase": {
       "version": "4.1.1",
       "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz",
       "integrity": "sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/lodash.memoize": {
       "version": "4.1.2",
       "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
       "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/lodash.merge": {
       "version": "4.6.2",
       "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
       "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/lodash.snakecase": {
       "version": "4.1.1",
       "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz",
       "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/lodash.upperfirst": {
       "version": "4.3.1",
       "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz",
       "integrity": "sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/loglevel": {
-      "version": "1.9.1",
-      "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz",
-      "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==",
+      "version": "1.9.2",
+      "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.2.tgz",
+      "integrity": "sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.6.0"
       },
@@ -7724,6 +9470,7 @@
       "resolved": "https://registry.npmjs.org/loglevel-colored-level-prefix/-/loglevel-colored-level-prefix-1.0.0.tgz",
       "integrity": "sha512-u45Wcxxc+SdAlh4yeF/uKlC1SPUPCy0gullSNKXod5I4bmifzk+Q4lSLExNEVn19tGaJipbZ4V4jbFn79/6mVA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "chalk": "^1.1.3",
         "loglevel": "^1.4.1"
@@ -7734,6 +9481,7 @@
       "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
       "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=0.10.0"
       }
@@ -7743,6 +9491,7 @@
       "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
       "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=0.10.0"
       }
@@ -7752,6 +9501,7 @@
       "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
       "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "ansi-styles": "^2.2.1",
         "escape-string-regexp": "^1.0.2",
@@ -7768,6 +9518,7 @@
       "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
       "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=0.8.0"
       }
@@ -7777,6 +9528,7 @@
       "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
       "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "ansi-regex": "^2.0.0"
       },
@@ -7789,6 +9541,7 @@
       "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
       "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=0.8.0"
       }
@@ -7816,6 +9569,7 @@
       "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
       "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
       "dev": true,
+      "license": "ISC",
       "dependencies": {
         "yallist": "^3.0.2"
       }
@@ -7831,6 +9585,7 @@
       "resolved": "https://registry.npmjs.org/make-coverage-badge/-/make-coverage-badge-1.2.0.tgz",
       "integrity": "sha512-nA1eQZJ9vcY2UoQLVIdzqyRoNtAZHWlXJfrHkaMB/pQgTYBPmbImkykfxWeAtUQuLJXzb6eAhbR7nEgrt+S7FA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "mri": "1.1.4"
       },
@@ -7847,6 +9602,7 @@
       "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz",
       "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "semver": "^7.5.3"
       },
@@ -7861,13 +9617,15 @@
       "version": "1.3.6",
       "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
       "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
-      "dev": true
+      "dev": true,
+      "license": "ISC"
     },
     "node_modules/makeerror": {
       "version": "1.0.12",
       "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz",
       "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==",
       "dev": true,
+      "license": "BSD-3-Clause",
       "dependencies": {
         "tmpl": "1.0.5"
       }
@@ -7894,6 +9652,7 @@
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
       "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">= 0.4"
@@ -7904,6 +9663,7 @@
       "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
       "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.6"
       }
@@ -7913,6 +9673,7 @@
       "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
       "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
       "dev": true,
+      "license": "MIT",
       "funding": {
         "url": "https://github.com/sponsors/sindresorhus"
       }
@@ -7921,13 +9682,15 @@
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
       "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/merge2": {
       "version": "1.4.1",
       "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
       "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 8"
       }
@@ -7937,6 +9700,7 @@
       "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
       "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.6"
       }
@@ -7946,6 +9710,7 @@
       "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
       "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "braces": "^3.0.3",
         "picomatch": "^2.3.1"
@@ -7954,11 +9719,25 @@
         "node": ">=8.6"
       }
     },
+    "node_modules/micromatch/node_modules/picomatch": {
+      "version": "2.3.2",
+      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
+      "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=8.6"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/jonschlinkert"
+      }
+    },
     "node_modules/mime": {
       "version": "1.6.0",
       "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
       "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
       "dev": true,
+      "license": "MIT",
       "bin": {
         "mime": "cli.js"
       },
@@ -7970,6 +9749,8 @@
       "version": "1.52.0",
       "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
       "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+      "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.6"
       }
@@ -7978,6 +9759,8 @@
       "version": "2.1.35",
       "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
       "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+      "dev": true,
+      "license": "MIT",
       "dependencies": {
         "mime-db": "1.52.0"
       },
@@ -7990,62 +9773,50 @@
       "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
       "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=6"
       }
     },
     "node_modules/minimatch": {
-      "version": "9.0.8",
-      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.8.tgz",
-      "integrity": "sha512-reYkDYtj/b19TeqbNZCV4q9t+Yxylf/rYBsLb42SXJatTv4/ylq5lEiAmhA/IToxO7NI2UzNMghHoHuaqDkAjw==",
-      "dev": true,
-      "license": "ISC",
+      "version": "10.2.5",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
+      "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
+      "license": "BlueOak-1.0.0",
       "dependencies": {
-        "brace-expansion": "^5.0.2"
+        "brace-expansion": "^5.0.5"
       },
       "engines": {
-        "node": ">=16 || 14 >=14.17"
+        "node": "18 || 20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       }
     },
-    "node_modules/minimatch/node_modules/balanced-match": {
-      "version": "4.0.4",
-      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
-      "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": "18 || 20 || >=22"
-      }
-    },
-    "node_modules/minimatch/node_modules/brace-expansion": {
-      "version": "5.0.5",
-      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz",
-      "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "balanced-match": "^4.0.2"
-      },
-      "engines": {
-        "node": "18 || 20 || >=22"
-      }
-    },
     "node_modules/minimist": {
       "version": "1.2.8",
       "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
       "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+      "license": "MIT",
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
       }
     },
+    "node_modules/minipass": {
+      "version": "7.1.3",
+      "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
+      "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
+      "license": "BlueOak-1.0.0",
+      "engines": {
+        "node": ">=16 || 14 >=14.17"
+      }
+    },
     "node_modules/mkdirp": {
       "version": "1.0.4",
       "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
       "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
       "dev": true,
+      "license": "MIT",
       "bin": {
         "mkdirp": "bin/cmd.js"
       },
@@ -8054,9 +9825,9 @@
       }
     },
     "node_modules/mobx": {
-      "version": "6.12.3",
-      "resolved": "https://registry.npmjs.org/mobx/-/mobx-6.12.3.tgz",
-      "integrity": "sha512-c8NKkO4R2lShkSXZ2Ongj1ycjugjzFFo/UswHBnS62y07DMcTc9Rvo03/3nRyszIvwPNljlkd4S828zIBv/piw==",
+      "version": "6.15.3",
+      "resolved": "https://registry.npmjs.org/mobx/-/mobx-6.15.3.tgz",
+      "integrity": "sha512-6+ZSYDs5zgH5CdGfEU2q2Lsa5PztVryL1ys7kAImTU25n2A9LAMj/yneVsQpd03MfwMLDQF+7kakJR9Z+cQxSw==",
       "license": "MIT",
       "funding": {
         "type": "opencollective",
@@ -8064,12 +9835,12 @@
       }
     },
     "node_modules/mobx-react": {
-      "version": "9.2.1",
-      "resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-9.2.1.tgz",
-      "integrity": "sha512-WJNNm0FB2n0Z0u+jS1QHmmWyV8l2WiAj8V8I/96kbUEN2YbYCoKW+hbbqKKRUBqElu0llxM7nWKehvRIkhBVJw==",
+      "version": "9.2.0",
+      "resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-9.2.0.tgz",
+      "integrity": "sha512-dkGWCx+S0/1mfiuFfHRH8D9cplmwhxOV5CkXMp38u6rQGG2Pv3FWYztS0M7ncR6TyPRQKaTG/pnitInoYE9Vrw==",
       "license": "MIT",
       "dependencies": {
-        "mobx-react-lite": "^4.1.1"
+        "mobx-react-lite": "^4.1.0"
       },
       "funding": {
         "type": "opencollective",
@@ -8114,9 +9885,9 @@
       }
     },
     "node_modules/module-details-from-path": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.3.tgz",
-      "integrity": "sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A==",
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.4.tgz",
+      "integrity": "sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==",
       "dev": true,
       "license": "MIT"
     },
@@ -8125,50 +9896,53 @@
       "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.4.tgz",
       "integrity": "sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=4"
       }
     },
     "node_modules/ms": {
-      "version": "2.1.2",
-      "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
-      "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+      "version": "2.1.3",
+      "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+      "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+      "license": "MIT"
     },
     "node_modules/mute-stream": {
       "version": "0.0.8",
       "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
       "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
-      "dev": true
+      "dev": true,
+      "license": "ISC"
     },
-    "node_modules/nanoid": {
-      "version": "3.3.11",
-      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
-      "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/ai"
-        }
-      ],
+    "node_modules/napi-postinstall": {
+      "version": "0.3.4",
+      "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz",
+      "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==",
+      "dev": true,
       "license": "MIT",
       "bin": {
-        "nanoid": "bin/nanoid.cjs"
+        "napi-postinstall": "lib/cli.js"
       },
       "engines": {
-        "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+        "node": "^12.20.0 || ^14.18.0 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://opencollective.com/napi-postinstall"
       }
     },
     "node_modules/natural-compare": {
       "version": "1.4.0",
       "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
       "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/needle": {
       "version": "2.4.0",
       "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz",
       "integrity": "sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "debug": "^3.2.6",
         "iconv-lite": "^0.4.4",
@@ -8186,6 +9960,7 @@
       "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
       "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "ms": "^2.1.1"
       }
@@ -8195,6 +9970,7 @@
       "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
       "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.6"
       }
@@ -8202,18 +9978,48 @@
     "node_modules/neo-async": {
       "version": "2.6.2",
       "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
-      "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="
+      "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
+      "license": "MIT"
     },
     "node_modules/netmask": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz",
-      "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==",
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.1.1.tgz",
+      "integrity": "sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA==",
       "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">= 0.4.0"
       }
     },
+    "node_modules/node-exports-info": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmjs.org/node-exports-info/-/node-exports-info-1.6.0.tgz",
+      "integrity": "sha512-pyFS63ptit/P5WqUkt+UUfe+4oevH+bFeIiPPdfb0pFeYEu/1ELnJu5l+5EcTKYL5M7zaAa7S8ddywgXypqKCw==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "array.prototype.flatmap": "^1.3.3",
+        "es-errors": "^1.3.0",
+        "object.entries": "^1.1.9",
+        "semver": "^6.3.1"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/node-exports-info/node_modules/semver": {
+      "version": "6.3.1",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+      "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+      "dev": true,
+      "license": "ISC",
+      "bin": {
+        "semver": "bin/semver.js"
+      }
+    },
     "node_modules/node-fetch": {
       "version": "2.7.0",
       "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
@@ -8250,7 +10056,8 @@
       "version": "0.4.0",
       "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz",
       "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/node-readfiles": {
       "version": "0.2.0",
@@ -8262,15 +10069,21 @@
       }
     },
     "node_modules/node-releases": {
-      "version": "2.0.14",
-      "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz",
-      "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==",
-      "dev": true
+      "version": "2.0.46",
+      "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.46.tgz",
+      "integrity": "sha512-GYVXHE2KnrzAfsAjl4uP++evGFCrAU1jta4ubEjIG7YWt/64Gqv66a30yKwWczVjA6j3bM4nBwH7Pk1JmDHaxQ==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=18"
+      }
     },
     "node_modules/normalize-path": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
       "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+      "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=0.10.0"
       }
@@ -8280,6 +10093,7 @@
       "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
       "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "path-key": "^3.0.0"
       },
@@ -8384,19 +10198,23 @@
       "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
       "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.4"
       }
     },
     "node_modules/object.assign": {
-      "version": "4.1.5",
-      "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz",
-      "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==",
+      "version": "4.1.7",
+      "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz",
+      "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.5",
+        "call-bind": "^1.0.8",
+        "call-bound": "^1.0.3",
         "define-properties": "^1.2.1",
-        "has-symbols": "^1.0.3",
+        "es-object-atoms": "^1.0.0",
+        "has-symbols": "^1.1.0",
         "object-keys": "^1.1.1"
       },
       "engines": {
@@ -8407,28 +10225,32 @@
       }
     },
     "node_modules/object.entries": {
-      "version": "1.1.7",
-      "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz",
-      "integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==",
+      "version": "1.1.9",
+      "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz",
+      "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.2.0",
-        "es-abstract": "^1.22.1"
+        "call-bind": "^1.0.8",
+        "call-bound": "^1.0.4",
+        "define-properties": "^1.2.1",
+        "es-object-atoms": "^1.1.1"
       },
       "engines": {
         "node": ">= 0.4"
       }
     },
     "node_modules/object.fromentries": {
-      "version": "2.0.7",
-      "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz",
-      "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==",
+      "version": "2.0.8",
+      "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz",
+      "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.2.0",
-        "es-abstract": "^1.22.1"
+        "call-bind": "^1.0.7",
+        "define-properties": "^1.2.1",
+        "es-abstract": "^1.23.2",
+        "es-object-atoms": "^1.0.0"
       },
       "engines": {
         "node": ">= 0.4"
@@ -8438,27 +10260,31 @@
       }
     },
     "node_modules/object.groupby": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.2.tgz",
-      "integrity": "sha512-bzBq58S+x+uo0VjurFT0UktpKHOZmv4/xePiOA1nbB9pMqpGK7rUPNgf+1YC+7mE+0HzhTMqNUuCqvKhj6FnBw==",
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz",
+      "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "array.prototype.filter": "^1.0.3",
-        "call-bind": "^1.0.5",
+        "call-bind": "^1.0.7",
         "define-properties": "^1.2.1",
-        "es-abstract": "^1.22.3",
-        "es-errors": "^1.0.0"
+        "es-abstract": "^1.23.2"
+      },
+      "engines": {
+        "node": ">= 0.4"
       }
     },
     "node_modules/object.values": {
-      "version": "1.1.7",
-      "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz",
-      "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==",
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz",
+      "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.2.0",
-        "es-abstract": "^1.22.1"
+        "call-bind": "^1.0.8",
+        "call-bound": "^1.0.3",
+        "define-properties": "^1.2.1",
+        "es-object-atoms": "^1.0.0"
       },
       "engines": {
         "node": ">= 0.4"
@@ -8472,6 +10298,7 @@
       "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
       "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "ee-first": "1.1.1"
       },
@@ -8483,6 +10310,7 @@
       "version": "1.4.0",
       "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
       "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+      "license": "ISC",
       "dependencies": {
         "wrappy": "1"
       }
@@ -8492,6 +10320,7 @@
       "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
       "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "mimic-fn": "^2.1.0"
       },
@@ -8502,47 +10331,30 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/open": {
-      "version": "10.1.0",
-      "resolved": "https://registry.npmjs.org/open/-/open-10.1.0.tgz",
-      "integrity": "sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==",
-      "license": "MIT",
-      "dependencies": {
-        "default-browser": "^5.2.1",
-        "define-lazy-prop": "^3.0.0",
-        "is-inside-container": "^1.0.0",
-        "is-wsl": "^3.1.0"
-      },
-      "engines": {
-        "node": ">=18"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
     "node_modules/openapi-sampler": {
-      "version": "1.7.0",
-      "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.7.0.tgz",
-      "integrity": "sha512-fWq32F5vqGpgRJYIarC/9Y1wC9tKnRDcCOjsDJ7MIcSv2HsE7kNifcXIZ8FVtNStBUWxYrEk/MKqVF0SwZ5gog==",
+      "version": "1.7.3",
+      "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.7.3.tgz",
+      "integrity": "sha512-Qgy2+Z7xR3l7kXurtzi1PCtzAINkFKhBADBe/8cidC2fQrLUQTudLiJjQDnqJXoisWAR6zaHhC0hP6Hn5vja+g==",
       "license": "MIT",
       "dependencies": {
         "@types/json-schema": "^7.0.7",
-        "fast-xml-parser": "^5.3.4",
+        "fast-xml-parser": "^5.5.1",
         "json-pointer": "0.6.2"
       }
     },
     "node_modules/optionator": {
-      "version": "0.9.3",
-      "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
-      "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==",
+      "version": "0.9.4",
+      "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
+      "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@aashutoshrathi/word-wrap": "^1.2.3",
         "deep-is": "^0.1.3",
         "fast-levenshtein": "^2.0.6",
         "levn": "^0.4.1",
         "prelude-ls": "^1.2.1",
-        "type-check": "^0.4.0"
+        "type-check": "^0.4.0",
+        "word-wrap": "^1.2.5"
       },
       "engines": {
         "node": ">= 0.8.0"
@@ -8554,11 +10366,30 @@
       "integrity": "sha512-KiOAIsdpUTcAXuykya5fnVVT+/5uS0Q1mrkRHcF89tpieSmY33O/tmc54CqwA+bfhbtEfZUNLHaPUiB9X3jt1A==",
       "license": "MIT"
     },
+    "node_modules/own-keys": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz",
+      "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "get-intrinsic": "^1.2.6",
+        "object-keys": "^1.1.1",
+        "safe-push-apply": "^1.0.0"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
     "node_modules/p-limit": {
       "version": "3.1.0",
       "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
       "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "yocto-queue": "^0.1.0"
       },
@@ -8574,6 +10405,7 @@
       "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
       "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "p-limit": "^3.0.2"
       },
@@ -8589,6 +10421,7 @@
       "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
       "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=6"
       }
@@ -8631,13 +10464,15 @@
       "version": "0.2.9",
       "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz",
       "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/parent-module": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
       "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "callsites": "^3.0.0"
       },
@@ -8650,6 +10485,7 @@
       "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
       "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@babel/code-frame": "^7.0.0",
         "error-ex": "^1.3.1",
@@ -8668,6 +10504,7 @@
       "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
       "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.8"
       }
@@ -8683,6 +10520,7 @@
       "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
       "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
@@ -8706,6 +10544,8 @@
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
       "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+      "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=0.10.0"
       }
@@ -8715,15 +10555,42 @@
       "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
       "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
-    "node_modules/path-parse": {
-      "version": "1.0.7",
-      "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
-      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
-      "dev": true
+    "node_modules/path-parse": {
+      "version": "1.0.7",
+      "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/path-scurry": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",
+      "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==",
+      "license": "BlueOak-1.0.0",
+      "dependencies": {
+        "lru-cache": "^11.0.0",
+        "minipass": "^7.1.2"
+      },
+      "engines": {
+        "node": "18 || 20 || >=22"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
+    "node_modules/path-scurry/node_modules/lru-cache": {
+      "version": "11.5.0",
+      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.0.tgz",
+      "integrity": "sha512-5YgH9UJd7wVb9hIouI2adWpgqrrICkt070Dnj8EUY1+B4B2P9eRLPAkAAo6NICA7CEhOIeBHl46u9zSNpNu7zA==",
+      "license": "BlueOak-1.0.0",
+      "engines": {
+        "node": "20 || >=22"
+      }
     },
     "node_modules/path-to-regexp": {
       "version": "0.1.13",
@@ -8737,6 +10604,7 @@
       "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
       "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
@@ -8754,12 +10622,12 @@
       "license": "ISC"
     },
     "node_modules/picomatch": {
-      "version": "2.3.2",
-      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
-      "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
+      "version": "4.0.4",
+      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
+      "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
       "license": "MIT",
       "engines": {
-        "node": ">=8.6"
+        "node": ">=12"
       },
       "funding": {
         "url": "https://github.com/sponsors/jonschlinkert"
@@ -8770,6 +10638,7 @@
       "resolved": "https://registry.npmjs.org/pidusage/-/pidusage-3.0.2.tgz",
       "integrity": "sha512-g0VU+y08pKw5M8EZ2rIGiEBaB8wrQMjYGFfW2QVIfyT8V+fq8YFLkvlz4bz5ljvFDJYNFCWT3PWqcRr2FKO81w==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "safe-buffer": "^5.2.1"
       },
@@ -8778,10 +10647,11 @@
       }
     },
     "node_modules/pirates": {
-      "version": "4.0.6",
-      "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz",
-      "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==",
+      "version": "4.0.7",
+      "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz",
+      "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 6"
       }
@@ -8791,6 +10661,7 @@
       "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
       "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "find-up": "^4.0.0"
       },
@@ -8803,6 +10674,7 @@
       "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
       "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "locate-path": "^5.0.0",
         "path-exists": "^4.0.0"
@@ -8816,6 +10688,7 @@
       "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
       "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "p-locate": "^4.1.0"
       },
@@ -8828,6 +10701,7 @@
       "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
       "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "p-try": "^2.0.0"
       },
@@ -8843,6 +10717,7 @@
       "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
       "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "p-limit": "^2.2.0"
       },
@@ -8943,6 +10818,7 @@
       "resolved": "https://registry.npmjs.org/pm2-deploy/-/pm2-deploy-1.0.2.tgz",
       "integrity": "sha512-YJx6RXKrVrWaphEYf++EdOOx9EH18vM8RSZN/P1Y+NokTKqYAca/ejXwVLyiEpNju4HPZEk3Y2uZouwMqUlcgg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "run-series": "^1.1.8",
         "tv4": "^1.3.0"
@@ -8956,6 +10832,7 @@
       "resolved": "https://registry.npmjs.org/pm2-multimeter/-/pm2-multimeter-0.1.2.tgz",
       "integrity": "sha512-S+wT6XfyKfd7SJIBqRgOctGxaBzUOmVQzTAS+cg04TsEUObJVreha7lvCfX8zzGVr871XwCSnHUU7DQQ5xEsfA==",
       "dev": true,
+      "license": "MIT/X11",
       "dependencies": {
         "charm": "~0.1.1"
       }
@@ -8965,6 +10842,7 @@
       "resolved": "https://registry.npmjs.org/pm2-sysmonit/-/pm2-sysmonit-1.2.8.tgz",
       "integrity": "sha512-ACOhlONEXdCTVwKieBIQLSi2tQZ8eKinhcr9JpZSUAL8Qy0ajIgRtsLxG/lwPOW3JEKqPyw/UaHmTWhUzpP4kA==",
       "dev": true,
+      "license": "Apache",
       "optional": true,
       "dependencies": {
         "async": "^3.2.0",
@@ -8979,6 +10857,7 @@
       "resolved": "https://registry.npmjs.org/pidusage/-/pidusage-2.0.21.tgz",
       "integrity": "sha512-cv3xAQos+pugVX+BfXpHsbyz/dLzX+lr44zNMsYiGxUw+kV5sgQCIcLd1z+0vq+KyC7dJ+/ts2PsfgWfSC3WXA==",
       "dev": true,
+      "license": "MIT",
       "optional": true,
       "dependencies": {
         "safe-buffer": "^5.2.1"
@@ -8987,54 +10866,30 @@
         "node": ">=8"
       }
     },
-    "node_modules/pm2/node_modules/async": {
-      "version": "3.2.6",
-      "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",
-      "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/pm2/node_modules/debug": {
-      "version": "4.4.3",
-      "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
-      "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
+    "node_modules/pm2/node_modules/semver": {
+      "version": "7.7.2",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
+      "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "ms": "^2.1.3"
+      "license": "ISC",
+      "bin": {
+        "semver": "bin/semver.js"
       },
       "engines": {
-        "node": ">=6.0"
-      },
-      "peerDependenciesMeta": {
-        "supports-color": {
-          "optional": true
-        }
+        "node": ">=10"
       }
     },
-    "node_modules/pm2/node_modules/ms": {
-      "version": "2.1.3",
-      "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
-      "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
-      "dev": true,
-      "license": "MIT"
-    },
     "node_modules/pm2/node_modules/source-map-support": {
       "version": "0.5.21",
       "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
       "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "buffer-from": "^1.0.0",
         "source-map": "^0.6.0"
       }
     },
-    "node_modules/pm2/node_modules/sprintf-js": {
-      "version": "1.1.2",
-      "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz",
-      "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==",
-      "dev": true
-    },
     "node_modules/polished": {
       "version": "4.3.1",
       "resolved": "https://registry.npmjs.org/polished/-/polished-4.3.1.tgz",
@@ -9048,40 +10903,13 @@
       }
     },
     "node_modules/possible-typed-array-names": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz",
-      "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==",
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz",
+      "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==",
       "dev": true,
-      "engines": {
-        "node": ">= 0.4"
-      }
-    },
-    "node_modules/postcss": {
-      "version": "8.4.49",
-      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz",
-      "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==",
-      "funding": [
-        {
-          "type": "opencollective",
-          "url": "https://opencollective.com/postcss/"
-        },
-        {
-          "type": "tidelift",
-          "url": "https://tidelift.com/funding/github/npm/postcss"
-        },
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/ai"
-        }
-      ],
       "license": "MIT",
-      "dependencies": {
-        "nanoid": "^3.3.7",
-        "picocolors": "^1.1.1",
-        "source-map-js": "^1.2.1"
-      },
       "engines": {
-        "node": "^10 || ^12 || >=14"
+        "node": ">= 0.4"
       }
     },
     "node_modules/postcss-value-parser": {
@@ -9095,15 +10923,17 @@
       "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
       "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.8.0"
       }
     },
     "node_modules/prettier": {
-      "version": "3.2.5",
-      "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz",
-      "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==",
+      "version": "3.8.3",
+      "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.3.tgz",
+      "integrity": "sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw==",
       "dev": true,
+      "license": "MIT",
       "bin": {
         "prettier": "bin/prettier.cjs"
       },
@@ -9115,27 +10945,31 @@
       }
     },
     "node_modules/prettier-eslint": {
-      "version": "16.3.0",
-      "resolved": "https://registry.npmjs.org/prettier-eslint/-/prettier-eslint-16.3.0.tgz",
-      "integrity": "sha512-Lh102TIFCr11PJKUMQ2kwNmxGhTsv/KzUg9QYF2Gkw259g/kPgndZDWavk7/ycbRvj2oz4BPZ1gCU8bhfZH/Xg==",
+      "version": "16.4.2",
+      "resolved": "https://registry.npmjs.org/prettier-eslint/-/prettier-eslint-16.4.2.tgz",
+      "integrity": "sha512-vtJAQEkaN8fW5QKl08t7A5KCjlZuDUNeIlr9hgolMS5s3+uzbfRHDwaRnzrdqnY2YpHDmeDS/8zY0MKQHXJtaA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@typescript-eslint/parser": "^6.7.5",
-        "common-tags": "^1.4.0",
-        "dlv": "^1.1.0",
-        "eslint": "^8.7.0",
+        "@typescript-eslint/parser": "^6.21.0",
+        "common-tags": "^1.8.2",
+        "dlv": "^1.1.3",
+        "eslint": "^8.57.1",
         "indent-string": "^4.0.0",
-        "lodash.merge": "^4.6.0",
+        "lodash.merge": "^4.6.2",
         "loglevel-colored-level-prefix": "^1.0.0",
-        "prettier": "^3.0.1",
+        "prettier": "^3.5.3",
         "pretty-format": "^29.7.0",
         "require-relative": "^0.8.7",
-        "typescript": "^5.2.2",
-        "vue-eslint-parser": "^9.1.0"
+        "tslib": "^2.8.1",
+        "vue-eslint-parser": "^9.4.3"
       },
       "engines": {
         "node": ">=16.10.0"
       },
+      "funding": {
+        "url": "https://opencollective.com/prettier-eslint"
+      },
       "peerDependencies": {
         "prettier-plugin-svelte": "^3.0.0",
         "svelte-eslint-parser": "*"
@@ -9154,6 +10988,7 @@
       "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz",
       "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==",
       "dev": true,
+      "license": "BSD-2-Clause",
       "dependencies": {
         "@typescript-eslint/scope-manager": "6.21.0",
         "@typescript-eslint/types": "6.21.0",
@@ -9182,6 +11017,7 @@
       "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz",
       "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@typescript-eslint/types": "6.21.0",
         "@typescript-eslint/visitor-keys": "6.21.0"
@@ -9199,6 +11035,7 @@
       "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz",
       "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": "^16.0.0 || >=18.0.0"
       },
@@ -9212,6 +11049,7 @@
       "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz",
       "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==",
       "dev": true,
+      "license": "BSD-2-Clause",
       "dependencies": {
         "@typescript-eslint/types": "6.21.0",
         "@typescript-eslint/visitor-keys": "6.21.0",
@@ -9240,6 +11078,7 @@
       "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz",
       "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@typescript-eslint/types": "6.21.0",
         "eslint-visitor-keys": "^3.4.1"
@@ -9252,11 +11091,32 @@
         "url": "https://opencollective.com/typescript-eslint"
       }
     },
+    "node_modules/prettier-eslint/node_modules/ts-api-utils": {
+      "version": "1.4.3",
+      "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz",
+      "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=16"
+      },
+      "peerDependencies": {
+        "typescript": ">=4.2.0"
+      }
+    },
+    "node_modules/prettier-eslint/node_modules/tslib": {
+      "version": "2.8.1",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+      "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+      "dev": true,
+      "license": "0BSD"
+    },
     "node_modules/prettier-linter-helpers": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz",
-      "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==",
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.1.tgz",
+      "integrity": "sha512-SxToR7P8Y2lWmv/kTzVLC1t/GDI2WGjMwNhLLE9qtH8Q13C+aEmuRlzDst4Up4s0Wc8sF2M+J57iB3cMLqftfg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "fast-diff": "^1.1.2"
       },
@@ -9268,6 +11128,8 @@
       "version": "29.7.0",
       "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz",
       "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==",
+      "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@jest/schemas": "^29.6.3",
         "ansi-styles": "^5.0.0",
@@ -9281,6 +11143,8 @@
       "version": "5.2.0",
       "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
       "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
+      "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=10"
       },
@@ -9302,6 +11166,7 @@
       "resolved": "https://registry.npmjs.org/promptly/-/promptly-2.2.0.tgz",
       "integrity": "sha512-aC9j+BZsRSSzEsXBNBwDnAxujdx19HycZoKgRgzWnS8eOHg1asuf9heuLprfbe739zY3IdUQx+Egv6Jn135WHA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "read": "^1.0.4"
       }
@@ -9311,6 +11176,7 @@
       "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz",
       "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "kleur": "^3.0.3",
         "sisteransi": "^1.0.5"
@@ -9337,24 +11203,24 @@
       "license": "MIT"
     },
     "node_modules/protobufjs": {
-      "version": "7.5.5",
-      "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.5.tgz",
-      "integrity": "sha512-3wY1AxV+VBNW8Yypfd1yQY9pXnqTAN+KwQxL8iYm3/BjKYMNg4i0owhEe26PWDOMaIrzeeF98Lqd5NGz4omiIg==",
+      "version": "7.6.1",
+      "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.1.tgz",
+      "integrity": "sha512-4K0myLaWL5EteuSAro91EGFgcfVgxb64Jx+7oDAY6GOkXD4M69yuSEljNcInGVCA5sOPxmZ/EqDLj2x0Q0+Ygg==",
       "hasInstallScript": true,
       "license": "BSD-3-Clause",
       "dependencies": {
         "@protobufjs/aspromise": "^1.1.2",
         "@protobufjs/base64": "^1.1.2",
-        "@protobufjs/codegen": "^2.0.4",
-        "@protobufjs/eventemitter": "^1.1.0",
-        "@protobufjs/fetch": "^1.1.0",
+        "@protobufjs/codegen": "^2.0.5",
+        "@protobufjs/eventemitter": "^1.1.1",
+        "@protobufjs/fetch": "^1.1.1",
         "@protobufjs/float": "^1.0.2",
-        "@protobufjs/inquire": "^1.1.0",
+        "@protobufjs/inquire": "^1.1.2",
         "@protobufjs/path": "^1.1.2",
         "@protobufjs/pool": "^1.1.0",
-        "@protobufjs/utf8": "^1.1.0",
+        "@protobufjs/utf8": "^1.1.1",
         "@types/node": ">=13.7.0",
-        "long": "^5.0.0"
+        "long": "^5.3.2"
       },
       "engines": {
         "node": ">=12.0.0"
@@ -9365,6 +11231,7 @@
       "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
       "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "forwarded": "0.2.0",
         "ipaddr.js": "1.9.1"
@@ -9414,14 +11281,16 @@
       "version": "2.3.1",
       "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
       "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+      "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=6"
       }
     },
     "node_modules/pure-rand": {
-      "version": "6.0.4",
-      "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.4.tgz",
-      "integrity": "sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==",
+      "version": "6.1.0",
+      "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz",
+      "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==",
       "dev": true,
       "funding": [
         {
@@ -9432,12 +11301,13 @@
           "type": "opencollective",
           "url": "https://opencollective.com/fast-check"
         }
-      ]
+      ],
+      "license": "MIT"
     },
     "node_modules/qs": {
-      "version": "6.14.2",
-      "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz",
-      "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==",
+      "version": "6.15.2",
+      "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.2.tgz",
+      "integrity": "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==",
       "dev": true,
       "license": "BSD-3-Clause",
       "dependencies": {
@@ -9467,12 +11337,14 @@
           "type": "consulting",
           "url": "https://feross.org/support"
         }
-      ]
+      ],
+      "license": "MIT"
     },
     "node_modules/randombytes": {
       "version": "2.1.0",
       "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
       "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+      "license": "MIT",
       "dependencies": {
         "safe-buffer": "^5.1.0"
       }
@@ -9482,6 +11354,7 @@
       "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
       "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.6"
       }
@@ -9502,62 +11375,33 @@
         "node": ">= 0.8"
       }
     },
-    "node_modules/raw-body/node_modules/http-errors": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
-      "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "depd": "~2.0.0",
-        "inherits": "~2.0.4",
-        "setprototypeof": "~1.2.0",
-        "statuses": "~2.0.2",
-        "toidentifier": "~1.0.1"
-      },
-      "engines": {
-        "node": ">= 0.8"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/express"
-      }
-    },
-    "node_modules/raw-body/node_modules/statuses": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
-      "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
     "node_modules/react": {
-      "version": "19.2.5",
-      "resolved": "https://registry.npmjs.org/react/-/react-19.2.5.tgz",
-      "integrity": "sha512-llUJLzz1zTUBrskt2pwZgLq59AemifIftw4aB7JxOqf1HY2FDaGDxgwpAPVzHU1kdWabH7FauP4i1oEeer2WCA==",
+      "version": "19.2.6",
+      "resolved": "https://registry.npmjs.org/react/-/react-19.2.6.tgz",
+      "integrity": "sha512-sfWGGfavi0xr8Pg0sVsyHMAOziVYKgPLNrS7ig+ivMNb3wbCBw3KxtflsGBAwD3gYQlE/AEZsTLgToRrSCjb0Q==",
       "license": "MIT",
       "engines": {
         "node": ">=0.10.0"
       }
     },
     "node_modules/react-dom": {
-      "version": "19.2.5",
-      "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.5.tgz",
-      "integrity": "sha512-J5bAZz+DXMMwW/wV3xzKke59Af6CHY7G4uYLN1OvBcKEsWOs4pQExj86BBKamxl/Ik5bx9whOrvBlSDfWzgSag==",
+      "version": "19.2.6",
+      "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.6.tgz",
+      "integrity": "sha512-0prMI+hvBbPjsWnxDLxlCGyM8PN6UuWjEUCYmZhO67xIV9Xasa/r/vDnq+Xyq4Lo27g8QSbO5YzARu0D1Sps3g==",
       "license": "MIT",
       "dependencies": {
         "scheduler": "^0.27.0"
       },
       "peerDependencies": {
-        "react": "^19.2.5"
+        "react": "^19.2.6"
       }
     },
     "node_modules/react-is": {
-      "version": "18.2.0",
-      "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz",
-      "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w=="
+      "version": "18.3.1",
+      "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz",
+      "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==",
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/react-tabs": {
       "version": "6.1.1",
@@ -9577,6 +11421,7 @@
       "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz",
       "integrity": "sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==",
       "dev": true,
+      "license": "ISC",
       "dependencies": {
         "mute-stream": "~0.0.4"
       },
@@ -9588,6 +11433,7 @@
       "version": "3.6.2",
       "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
       "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
+      "license": "MIT",
       "dependencies": {
         "inherits": "^2.0.3",
         "string_decoder": "^1.1.1",
@@ -9601,6 +11447,8 @@
       "version": "3.6.0",
       "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
       "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+      "dev": true,
+      "license": "MIT",
       "dependencies": {
         "picomatch": "^2.2.1"
       },
@@ -9608,10 +11456,23 @@
         "node": ">=8.10.0"
       }
     },
+    "node_modules/readdirp/node_modules/picomatch": {
+      "version": "2.3.2",
+      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
+      "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=8.6"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/jonschlinkert"
+      }
+    },
     "node_modules/redoc": {
-      "version": "2.5.0",
-      "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.5.0.tgz",
-      "integrity": "sha512-NpYsOZ1PD9qFdjbLVBZJWptqE+4Y6TkUuvEOqPUmoH7AKOmPcE+hYjotLxQNTqVoWL4z0T2uxILmcc8JGDci+Q==",
+      "version": "2.5.1",
+      "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.5.1.tgz",
+      "integrity": "sha512-LmqA+4A3CmhTllGG197F0arUpmChukAj9klfSdxNRemT9Hr07xXr7OGKu4PHzBs359sgrJ+4JwmOlM7nxLPGMg==",
       "license": "MIT",
       "dependencies": {
         "@redocly/openapi-core": "^1.4.0",
@@ -9623,7 +11484,7 @@
         "lunr": "^2.3.9",
         "mark.js": "^8.11.1",
         "marked": "^4.3.0",
-        "mobx-react": "^9.1.1",
+        "mobx-react": "9.2.0",
         "openapi-sampler": "^1.5.0",
         "path-browserify": "^1.0.1",
         "perfect-scrollbar": "^1.5.5",
@@ -9648,19 +11509,91 @@
         "styled-components": "^4.1.1 || ^5.1.1 || ^6.0.5"
       }
     },
+    "node_modules/redoc/node_modules/@redocly/ajv": {
+      "version": "8.11.2",
+      "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz",
+      "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==",
+      "license": "MIT",
+      "dependencies": {
+        "fast-deep-equal": "^3.1.1",
+        "json-schema-traverse": "^1.0.0",
+        "require-from-string": "^2.0.2",
+        "uri-js-replace": "^1.0.1"
+      },
+      "funding": {
+        "type": "github",
+        "url": "https://github.com/sponsors/epoberezkin"
+      }
+    },
+    "node_modules/redoc/node_modules/@redocly/config": {
+      "version": "0.22.0",
+      "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.0.tgz",
+      "integrity": "sha512-gAy93Ddo01Z3bHuVdPWfCwzgfaYgMdaZPcfL7JZ7hWJoK9V0lXDbigTWkhiPFAaLWzbOJ+kbUQG1+XwIm0KRGQ==",
+      "license": "MIT"
+    },
+    "node_modules/redoc/node_modules/@redocly/openapi-core": {
+      "version": "1.34.14",
+      "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.14.tgz",
+      "integrity": "sha512-y+xFx+Zz54Xhr8jUdnLENYnt7Y7GEDL6Q03ga7rTtX8DVwefX9H+hQEPgJp1nda7vdH+wJ9/HBVvyfBuW9x6rA==",
+      "license": "MIT",
+      "dependencies": {
+        "@redocly/ajv": "8.11.2",
+        "@redocly/config": "0.22.0",
+        "colorette": "1.4.0",
+        "https-proxy-agent": "7.0.6",
+        "js-levenshtein": "1.1.6",
+        "js-yaml": "4.1.1",
+        "minimatch": "5.1.9",
+        "pluralize": "8.0.0",
+        "yaml-ast-parser": "0.0.43"
+      },
+      "engines": {
+        "node": ">=18.17.0",
+        "npm": ">=9.5.0"
+      }
+    },
+    "node_modules/redoc/node_modules/balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+      "license": "MIT"
+    },
+    "node_modules/redoc/node_modules/brace-expansion": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz",
+      "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==",
+      "license": "MIT",
+      "dependencies": {
+        "balanced-match": "^1.0.0"
+      }
+    },
+    "node_modules/redoc/node_modules/minimatch": {
+      "version": "5.1.9",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz",
+      "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==",
+      "license": "ISC",
+      "dependencies": {
+        "brace-expansion": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=10"
+      }
+    },
     "node_modules/reflect.getprototypeof": {
-      "version": "1.0.5",
-      "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.5.tgz",
-      "integrity": "sha512-62wgfC8dJWrmxv44CA36pLDnP6KKl3Vhxb7PL+8+qrrFMMoJij4vgiMP8zV4O8+CBMXY1mHxI5fITGHXFHVmQQ==",
+      "version": "1.0.10",
+      "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz",
+      "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.5",
+        "call-bind": "^1.0.8",
         "define-properties": "^1.2.1",
-        "es-abstract": "^1.22.3",
-        "es-errors": "^1.0.0",
-        "get-intrinsic": "^1.2.3",
-        "globalthis": "^1.0.3",
-        "which-builtin-type": "^1.1.3"
+        "es-abstract": "^1.23.9",
+        "es-errors": "^1.3.0",
+        "es-object-atoms": "^1.0.0",
+        "get-intrinsic": "^1.2.7",
+        "get-proto": "^1.0.1",
+        "which-builtin-type": "^1.2.1"
       },
       "engines": {
         "node": ">= 0.4"
@@ -9678,21 +11611,19 @@
         "url": "https://github.com/Mermade/oas-kit?sponsor=1"
       }
     },
-    "node_modules/regenerator-runtime": {
-      "version": "0.14.1",
-      "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
-      "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="
-    },
     "node_modules/regexp.prototype.flags": {
-      "version": "1.5.2",
-      "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz",
-      "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==",
+      "version": "1.5.4",
+      "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz",
+      "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.6",
+        "call-bind": "^1.0.8",
         "define-properties": "^1.2.1",
         "es-errors": "^1.3.0",
-        "set-function-name": "^2.0.1"
+        "get-proto": "^1.0.1",
+        "gopd": "^1.2.0",
+        "set-function-name": "^2.0.2"
       },
       "engines": {
         "node": ">= 0.4"
@@ -9705,6 +11636,7 @@
       "version": "2.1.1",
       "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
       "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+      "license": "MIT",
       "engines": {
         "node": ">=0.10.0"
       }
@@ -9730,28 +11662,58 @@
         "resolve": "^1.22.1"
       },
       "engines": {
-        "node": ">=6"
+        "node": ">=6"
+      }
+    },
+    "node_modules/require-in-the-middle/node_modules/resolve": {
+      "version": "1.22.12",
+      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz",
+      "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "es-errors": "^1.3.0",
+        "is-core-module": "^2.16.1",
+        "path-parse": "^1.0.7",
+        "supports-preserve-symlinks-flag": "^1.0.0"
+      },
+      "bin": {
+        "resolve": "bin/resolve"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
     "node_modules/require-relative": {
       "version": "0.8.7",
       "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz",
       "integrity": "sha512-AKGr4qvHiryxRb19m3PsLRGuKVAbJLUD7E6eOaHkfKhwc+vSgVOCY5xNvm9EkolBKTOf0GrQAZKLimOCz81Khg==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/resolve": {
-      "version": "1.22.8",
-      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
-      "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
+      "version": "2.0.0-next.7",
+      "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.7.tgz",
+      "integrity": "sha512-tqt+NBWwyaMgw3zDsnygx4CByWjQEJHOPMdslYhppaQSJUtL/D4JO9CcBBlhPoI8lz9oJIDXkwXfhF4aWqP8xQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "is-core-module": "^2.13.0",
+        "es-errors": "^1.3.0",
+        "is-core-module": "^2.16.2",
+        "node-exports-info": "^1.6.0",
+        "object-keys": "^1.1.1",
         "path-parse": "^1.0.7",
         "supports-preserve-symlinks-flag": "^1.0.0"
       },
       "bin": {
         "resolve": "bin/resolve"
       },
+      "engines": {
+        "node": ">= 0.4"
+      },
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
       }
@@ -9761,6 +11723,7 @@
       "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
       "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "resolve-from": "^5.0.0"
       },
@@ -9773,6 +11736,7 @@
       "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
       "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
@@ -9782,24 +11746,37 @@
       "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
       "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=4"
       }
     },
+    "node_modules/resolve-pkg-maps": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
+      "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
+      "dev": true,
+      "license": "MIT",
+      "funding": {
+        "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
+      }
+    },
     "node_modules/resolve.exports": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz",
-      "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==",
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz",
+      "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=10"
       }
     },
     "node_modules/reusify": {
-      "version": "1.0.4",
-      "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
-      "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
+      "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "iojs": ">=1.0.0",
         "node": ">=0.10.0"
@@ -9809,7 +11786,9 @@
       "version": "3.0.2",
       "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
       "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+      "deprecated": "Rimraf versions prior to v4 are no longer supported",
       "dev": true,
+      "license": "ISC",
       "dependencies": {
         "glob": "^7.1.3"
       },
@@ -9820,16 +11799,57 @@
         "url": "https://github.com/sponsors/isaacs"
       }
     },
-    "node_modules/run-applescript": {
-      "version": "7.1.0",
-      "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz",
-      "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==",
+    "node_modules/rimraf/node_modules/balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/rimraf/node_modules/brace-expansion": {
+      "version": "1.1.14",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
+      "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==",
+      "dev": true,
       "license": "MIT",
+      "dependencies": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "node_modules/rimraf/node_modules/glob": {
+      "version": "7.2.3",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+      "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+      "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "^3.1.1",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
+      },
       "engines": {
-        "node": ">=18"
+        "node": "*"
       },
       "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
+    "node_modules/rimraf/node_modules/minimatch": {
+      "version": "3.1.5",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
+      "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "brace-expansion": "^1.1.7"
+      },
+      "engines": {
+        "node": "*"
       }
     },
     "node_modules/run-parallel": {
@@ -9851,6 +11871,7 @@
           "url": "https://feross.org/support"
         }
       ],
+      "license": "MIT",
       "dependencies": {
         "queue-microtask": "^1.2.2"
       }
@@ -9873,17 +11894,20 @@
           "type": "consulting",
           "url": "https://feross.org/support"
         }
-      ]
+      ],
+      "license": "MIT"
     },
     "node_modules/safe-array-concat": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz",
-      "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==",
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.4.tgz",
+      "integrity": "sha512-wtZlHyOje6OZTGqAoaDKxFkgRtkF9CnHAVnCHKfuj200wAgL+bSJhdsCD2l0Qx/2ekEXjPWcyKkfGb5CPboslg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.5",
-        "get-intrinsic": "^1.2.2",
-        "has-symbols": "^1.0.3",
+        "call-bind": "^1.0.9",
+        "call-bound": "^1.0.4",
+        "get-intrinsic": "^1.3.0",
+        "has-symbols": "^1.1.0",
         "isarray": "^2.0.5"
       },
       "engines": {
@@ -9910,17 +11934,36 @@
           "type": "consulting",
           "url": "https://feross.org/support"
         }
-      ]
+      ],
+      "license": "MIT"
+    },
+    "node_modules/safe-push-apply": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz",
+      "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "es-errors": "^1.3.0",
+        "isarray": "^2.0.5"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
     },
     "node_modules/safe-regex-test": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz",
-      "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==",
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz",
+      "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.6",
+        "call-bound": "^1.0.2",
         "es-errors": "^1.3.0",
-        "is-regex": "^1.1.4"
+        "is-regex": "^1.2.1"
       },
       "engines": {
         "node": ">= 0.4"
@@ -9933,13 +11976,18 @@
       "version": "2.1.2",
       "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
       "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/sax": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz",
-      "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==",
-      "dev": true
+      "version": "1.6.0",
+      "resolved": "https://registry.npmjs.org/sax/-/sax-1.6.0.tgz",
+      "integrity": "sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==",
+      "dev": true,
+      "license": "BlueOak-1.0.0",
+      "engines": {
+        "node": ">=11.0.0"
+      }
     },
     "node_modules/scheduler": {
       "version": "0.27.0",
@@ -9948,9 +11996,9 @@
       "license": "MIT"
     },
     "node_modules/semver": {
-      "version": "7.7.2",
-      "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
-      "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
+      "version": "7.8.1",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.1.tgz",
+      "integrity": "sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==",
       "license": "ISC",
       "bin": {
         "semver": "bin/semver.js"
@@ -9960,24 +12008,25 @@
       }
     },
     "node_modules/send": {
-      "version": "0.19.0",
-      "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
-      "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
+      "version": "0.19.2",
+      "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz",
+      "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "debug": "2.6.9",
         "depd": "2.0.0",
         "destroy": "1.2.0",
-        "encodeurl": "~1.0.2",
+        "encodeurl": "~2.0.0",
         "escape-html": "~1.0.3",
         "etag": "~1.8.1",
-        "fresh": "0.5.2",
-        "http-errors": "2.0.0",
+        "fresh": "~0.5.2",
+        "http-errors": "~2.0.1",
         "mime": "1.6.0",
         "ms": "2.1.3",
-        "on-finished": "2.4.1",
+        "on-finished": "~2.4.1",
         "range-parser": "~1.2.1",
-        "statuses": "2.0.1"
+        "statuses": "~2.0.2"
       },
       "engines": {
         "node": ">= 0.8.0"
@@ -9988,6 +12037,7 @@
       "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
       "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "ms": "2.0.0"
       }
@@ -9996,56 +12046,44 @@
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
       "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
-      "dev": true
-    },
-    "node_modules/send/node_modules/encodeurl": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
-      "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
       "dev": true,
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
-    "node_modules/send/node_modules/ms": {
-      "version": "2.1.3",
-      "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
-      "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
-      "dev": true
+      "license": "MIT"
     },
     "node_modules/serve-static": {
-      "version": "1.16.2",
-      "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz",
-      "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==",
+      "version": "1.16.3",
+      "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz",
+      "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "encodeurl": "~2.0.0",
         "escape-html": "~1.0.3",
         "parseurl": "~1.3.3",
-        "send": "0.19.0"
+        "send": "~0.19.1"
       },
       "engines": {
         "node": ">= 0.8.0"
       }
     },
     "node_modules/set-cookie-parser": {
-      "version": "2.7.1",
-      "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz",
-      "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==",
+      "version": "2.7.2",
+      "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz",
+      "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==",
       "license": "MIT"
     },
     "node_modules/set-function-length": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz",
-      "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==",
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
+      "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "define-data-property": "^1.1.2",
+        "define-data-property": "^1.1.4",
         "es-errors": "^1.3.0",
         "function-bind": "^1.1.2",
-        "get-intrinsic": "^1.2.3",
+        "get-intrinsic": "^1.2.4",
         "gopd": "^1.0.1",
-        "has-property-descriptors": "^1.0.1"
+        "has-property-descriptors": "^1.0.2"
       },
       "engines": {
         "node": ">= 0.4"
@@ -10056,6 +12094,7 @@
       "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz",
       "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "define-data-property": "^1.1.4",
         "es-errors": "^1.3.0",
@@ -10066,23 +12105,34 @@
         "node": ">= 0.4"
       }
     },
+    "node_modules/set-proto": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz",
+      "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "dunder-proto": "^1.0.1",
+        "es-errors": "^1.3.0",
+        "es-object-atoms": "^1.0.0"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
     "node_modules/setprototypeof": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
       "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
-      "dev": true
-    },
-    "node_modules/shallowequal": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",
-      "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==",
-      "license": "MIT"
+      "dev": true,
+      "license": "ISC"
     },
     "node_modules/shebang-command": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
       "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "shebang-regex": "^3.0.0"
       },
@@ -10095,6 +12145,7 @@
       "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
       "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
@@ -10181,14 +12232,14 @@
       }
     },
     "node_modules/side-channel-list": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
-      "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",
+      "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "es-errors": "^1.3.0",
-        "object-inspect": "^1.13.3"
+        "object-inspect": "^1.13.4"
       },
       "engines": {
         "node": ">= 0.4"
@@ -10240,7 +12291,8 @@
       "version": "3.0.7",
       "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
       "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
-      "dev": true
+      "dev": true,
+      "license": "ISC"
     },
     "node_modules/simple-websocket": {
       "version": "9.1.0",
@@ -10260,6 +12312,7 @@
           "url": "https://feross.org/support"
         }
       ],
+      "license": "MIT",
       "dependencies": {
         "debug": "^4.3.1",
         "queue-microtask": "^1.2.2",
@@ -10272,13 +12325,15 @@
       "version": "1.0.5",
       "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
       "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/slash": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
       "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
@@ -10304,13 +12359,13 @@
       }
     },
     "node_modules/socks": {
-      "version": "2.8.4",
-      "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.4.tgz",
-      "integrity": "sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==",
+      "version": "2.8.9",
+      "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.9.tgz",
+      "integrity": "sha512-LJhUYUvItdQ0LkJTmPeaEObWXAqFyfmP85x0tch/ez9cahmhlBBLbIqDFnvBnUJGagb0JbIQrkBs1wJ+yRYpEw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "ip-address": "^9.0.5",
+        "ip-address": "^10.1.1",
         "smart-buffer": "^4.2.0"
       },
       "engines": {
@@ -10337,14 +12392,6 @@
       "version": "0.6.1",
       "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
       "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/source-map-js": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
-      "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
       "license": "BSD-3-Clause",
       "engines": {
         "node": ">=0.10.0"
@@ -10355,22 +12402,35 @@
       "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz",
       "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "buffer-from": "^1.0.0",
         "source-map": "^0.6.0"
       }
     },
     "node_modules/sprintf-js": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
-      "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
-      "dev": true
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz",
+      "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==",
+      "dev": true,
+      "license": "BSD-3-Clause"
+    },
+    "node_modules/stable-hash-x": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/stable-hash-x/-/stable-hash-x-0.2.0.tgz",
+      "integrity": "sha512-o3yWv49B/o4QZk5ZcsALc6t0+eCelPc44zZsLtCQnZPDwFpDYSWcDnrv2TtMmMbQ7uKo3J0HTURCqckw23czNQ==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=12.0.0"
+      }
     },
     "node_modules/stack-utils": {
       "version": "2.0.6",
       "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",
       "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "escape-string-regexp": "^2.0.0"
       },
@@ -10383,15 +12443,17 @@
       "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
       "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
     "node_modules/statuses": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
-      "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
+      "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.8"
       }
@@ -10401,10 +12463,25 @@
       "resolved": "https://registry.npmjs.org/stickyfill/-/stickyfill-1.1.1.tgz",
       "integrity": "sha512-GCp7vHAfpao+Qh/3Flh9DXEJ/qSi0KJwJw6zYlZOtRYXWUIpMM6mC2rIep/dK8RQqwW0KxGJIllmjPIBOGN8AA=="
     },
+    "node_modules/stop-iteration-iterator": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz",
+      "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "es-errors": "^1.3.0",
+        "internal-slot": "^1.1.0"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
     "node_modules/string_decoder": {
       "version": "1.3.0",
       "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
       "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+      "license": "MIT",
       "dependencies": {
         "safe-buffer": "~5.2.0"
       }
@@ -10414,6 +12491,7 @@
       "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz",
       "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "char-regex": "^1.0.2",
         "strip-ansi": "^6.0.0"
@@ -10426,6 +12504,7 @@
       "version": "4.2.3",
       "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
       "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+      "license": "MIT",
       "dependencies": {
         "emoji-regex": "^8.0.0",
         "is-fullwidth-code-point": "^3.0.0",
@@ -10438,17 +12517,38 @@
     "node_modules/string-width/node_modules/emoji-regex": {
       "version": "8.0.0",
       "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
-      "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
+      "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+      "license": "MIT"
+    },
+    "node_modules/string.prototype.includes": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz",
+      "integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "call-bind": "^1.0.7",
+        "define-properties": "^1.2.1",
+        "es-abstract": "^1.23.3"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      }
     },
     "node_modules/string.prototype.trim": {
-      "version": "1.2.8",
-      "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz",
-      "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==",
+      "version": "1.2.10",
+      "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz",
+      "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.2.0",
-        "es-abstract": "^1.22.1"
+        "call-bind": "^1.0.8",
+        "call-bound": "^1.0.2",
+        "define-data-property": "^1.1.4",
+        "define-properties": "^1.2.1",
+        "es-abstract": "^1.23.5",
+        "es-object-atoms": "^1.0.0",
+        "has-property-descriptors": "^1.0.2"
       },
       "engines": {
         "node": ">= 0.4"
@@ -10458,28 +12558,37 @@
       }
     },
     "node_modules/string.prototype.trimend": {
-      "version": "1.0.7",
-      "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz",
-      "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==",
+      "version": "1.0.9",
+      "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz",
+      "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.2.0",
-        "es-abstract": "^1.22.1"
+        "call-bind": "^1.0.8",
+        "call-bound": "^1.0.2",
+        "define-properties": "^1.2.1",
+        "es-object-atoms": "^1.0.0"
+      },
+      "engines": {
+        "node": ">= 0.4"
       },
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
       }
     },
     "node_modules/string.prototype.trimstart": {
-      "version": "1.0.7",
-      "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz",
-      "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==",
+      "version": "1.0.8",
+      "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz",
+      "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.2.0",
-        "es-abstract": "^1.22.1"
+        "call-bind": "^1.0.7",
+        "define-properties": "^1.2.1",
+        "es-object-atoms": "^1.0.0"
+      },
+      "engines": {
+        "node": ">= 0.4"
       },
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
@@ -10489,6 +12598,7 @@
       "version": "6.0.1",
       "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
       "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+      "license": "MIT",
       "dependencies": {
         "ansi-regex": "^5.0.1"
       },
@@ -10501,6 +12611,7 @@
       "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",
       "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
@@ -10510,6 +12621,7 @@
       "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
       "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=6"
       }
@@ -10519,6 +12631,7 @@
       "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
       "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=8"
       },
@@ -10527,9 +12640,9 @@
       }
     },
     "node_modules/strnum": {
-      "version": "2.2.3",
-      "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.3.tgz",
-      "integrity": "sha512-oKx6RUCuHfT3oyVjtnrmn19H1SiCqgJSg+54XqURKp5aCMbrXrhLjRN9TjuwMjiYstZ0MzDrHqkGZ5dFTKd+zg==",
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.3.0.tgz",
+      "integrity": "sha512-ums3KNd42PGyx5xaoVTO1mjU1bH3NpY4vsrVlnv9PNGqQj8wd7rJ6nEypLrJ7z5vxK5RP0yMLo6J/Gsm62DI5Q==",
       "funding": [
         {
           "type": "github",
@@ -10539,20 +12652,15 @@
       "license": "MIT"
     },
     "node_modules/styled-components": {
-      "version": "6.3.9",
-      "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.3.9.tgz",
-      "integrity": "sha512-J72R4ltw0UBVUlEjTzI0gg2STOqlI9JBhQOL4Dxt7aJOnnSesy0qJDn4PYfMCafk9cWOaVg129Pesl5o+DIh0Q==",
+      "version": "6.4.1",
+      "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.4.1.tgz",
+      "integrity": "sha512-ADu2dF53esUzzM4I0ewxhxFtsDd6v4V6dNkg3vG0iFKhnt06sJneTZnRvujAosZwW0XD58IKgGMQoqri4wHRqg==",
       "license": "MIT",
       "dependencies": {
         "@emotion/is-prop-valid": "1.4.0",
-        "@emotion/unitless": "0.10.0",
-        "@types/stylis": "4.2.7",
         "css-to-react-native": "3.2.0",
         "csstype": "3.2.3",
-        "postcss": "8.4.49",
-        "shallowequal": "1.1.0",
-        "stylis": "4.3.6",
-        "tslib": "2.8.1"
+        "stylis": "4.3.6"
       },
       "engines": {
         "node": ">= 16"
@@ -10562,12 +12670,20 @@
         "url": "https://opencollective.com/styled-components"
       },
       "peerDependencies": {
+        "css-to-react-native": ">= 3.2.0",
         "react": ">= 16.8.0",
-        "react-dom": ">= 16.8.0"
+        "react-dom": ">= 16.8.0",
+        "react-native": ">= 0.68.0"
       },
       "peerDependenciesMeta": {
+        "css-to-react-native": {
+          "optional": true
+        },
         "react-dom": {
           "optional": true
+        },
+        "react-native": {
+          "optional": true
         }
       }
     },
@@ -10581,6 +12697,7 @@
       "version": "7.2.0",
       "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
       "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+      "license": "MIT",
       "dependencies": {
         "has-flag": "^4.0.0"
       },
@@ -10593,6 +12710,7 @@
       "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
       "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.4"
       },
@@ -10605,6 +12723,7 @@
       "resolved": "https://registry.npmjs.org/svg-element-attributes/-/svg-element-attributes-1.3.1.tgz",
       "integrity": "sha512-Bh05dSOnJBf3miNMqpsormfNtfidA/GxQVakhtn0T4DECWKeXQRQUceYjJ+OxYiiLdGe4Jo9iFV8wICFapFeIA==",
       "dev": true,
+      "license": "MIT",
       "funding": {
         "type": "github",
         "url": "https://github.com/sponsors/wooorm"
@@ -10638,21 +12757,25 @@
       }
     },
     "node_modules/synckit": {
-      "version": "0.6.2",
-      "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.6.2.tgz",
-      "integrity": "sha512-Vhf+bUa//YSTYKseDiiEuQmhGCoIF3CVBhunm3r/DQnYiGT4JssmnKQc44BIyOZRK2pKjXXAgbhfmbeoC9CJpA==",
+      "version": "0.11.12",
+      "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.12.tgz",
+      "integrity": "sha512-Bh7QjT8/SuKUIfObSXNHNSK6WHo6J1tHCqJsuaFDP7gP0fkzSfTxI8y85JrppZ0h8l0maIgc2tfuZQ6/t3GtnQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "tslib": "^2.3.1"
+        "@pkgr/core": "^0.2.9"
       },
       "engines": {
-        "node": ">=12.20"
+        "node": "^14.18.0 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://opencollective.com/synckit"
       }
     },
     "node_modules/systeminformation": {
-      "version": "5.31.1",
-      "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.31.1.tgz",
-      "integrity": "sha512-6pRwxoGeV/roJYpsfcP6tN9mep6pPeCtXbUOCdVa0nme05Brwcwdge/fVNhIZn2wuUitAKZm4IYa7QjnRIa9zA==",
+      "version": "5.31.6",
+      "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.31.6.tgz",
+      "integrity": "sha512-Uv2b2uGGM6ns+26czgW2cYRabYdnswM0ddSOOlryHOaelzsmDSet1iM/NT7VOYxW8x/BW+HkY+b1Ve2pLTSGSA==",
       "dev": true,
       "license": "MIT",
       "optional": true,
@@ -10682,6 +12805,7 @@
       "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",
       "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==",
       "dev": true,
+      "license": "ISC",
       "dependencies": {
         "@istanbuljs/schema": "^0.1.2",
         "glob": "^7.1.4",
@@ -10691,6 +12815,13 @@
         "node": ">=8"
       }
     },
+    "node_modules/test-exclude/node_modules/balanced-match": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+      "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+      "dev": true,
+      "license": "MIT"
+    },
     "node_modules/test-exclude/node_modules/brace-expansion": {
       "version": "1.1.14",
       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz",
@@ -10702,6 +12833,28 @@
         "concat-map": "0.0.1"
       }
     },
+    "node_modules/test-exclude/node_modules/glob": {
+      "version": "7.2.3",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+      "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+      "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "^3.1.1",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
+      },
+      "engines": {
+        "node": "*"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
     "node_modules/test-exclude/node_modules/minimatch": {
       "version": "3.1.5",
       "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",
@@ -10719,18 +12872,39 @@
       "version": "0.2.0",
       "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
       "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/tinyglobby": {
+      "version": "0.2.16",
+      "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz",
+      "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "fdir": "^6.5.0",
+        "picomatch": "^4.0.4"
+      },
+      "engines": {
+        "node": ">=12.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/SuperchupuDev"
+      }
     },
     "node_modules/tmpl": {
       "version": "1.0.5",
       "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz",
       "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==",
-      "dev": true
+      "dev": true,
+      "license": "BSD-3-Clause"
     },
     "node_modules/to-regex-range": {
       "version": "5.0.1",
       "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
       "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+      "dev": true,
+      "license": "MIT",
       "dependencies": {
         "is-number": "^7.0.0"
       },
@@ -10743,6 +12917,7 @@
       "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
       "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=0.6"
       }
@@ -10753,50 +12928,64 @@
       "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
       "license": "MIT"
     },
+    "node_modules/ts-algebra": {
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/ts-algebra/-/ts-algebra-1.2.2.tgz",
+      "integrity": "sha512-kloPhf1hq3JbCPOTYoOWDKxebWjNb2o/LKnNfkWhxVVisFFmMJPPdJeGoGmM+iRLyoXAR61e08Pb+vUXINg8aA==",
+      "license": "MIT"
+    },
     "node_modules/ts-api-utils": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz",
-      "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==",
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz",
+      "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
-        "node": ">=16"
+        "node": ">=18.12"
       },
       "peerDependencies": {
-        "typescript": ">=4.2.0"
+        "typescript": ">=4.8.4"
       }
     },
     "node_modules/ts-jest": {
-      "version": "29.1.2",
-      "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz",
-      "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==",
+      "version": "29.4.11",
+      "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.11.tgz",
+      "integrity": "sha512-IrFl7l9AuB/qrNw5quqvAv/hmKMb8dhWOH4jQOGo0Oq8tCeo1O86/iTFG1FaRimgUkF13l4PcepO8ATFT6Ns4g==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "bs-logger": "0.x",
-        "fast-json-stable-stringify": "2.x",
-        "jest-util": "^29.0.0",
+        "bs-logger": "^0.2.6",
+        "fast-json-stable-stringify": "^2.1.0",
+        "handlebars": "^4.7.9",
         "json5": "^2.2.3",
-        "lodash.memoize": "4.x",
-        "make-error": "1.x",
-        "semver": "^7.5.3",
-        "yargs-parser": "^21.0.1"
+        "lodash.memoize": "^4.1.2",
+        "make-error": "^1.3.6",
+        "semver": "^7.8.0",
+        "type-fest": "^4.41.0",
+        "yargs-parser": "^21.1.1"
       },
       "bin": {
         "ts-jest": "cli.js"
       },
       "engines": {
-        "node": "^16.10.0 || ^18.0.0 || >=20.0.0"
+        "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0"
       },
       "peerDependencies": {
         "@babel/core": ">=7.0.0-beta.0 <8",
-        "@jest/types": "^29.0.0",
-        "babel-jest": "^29.0.0",
-        "jest": "^29.0.0",
-        "typescript": ">=4.3 <6"
+        "@jest/transform": "^29.0.0 || ^30.0.0",
+        "@jest/types": "^29.0.0 || ^30.0.0",
+        "babel-jest": "^29.0.0 || ^30.0.0",
+        "jest": "^29.0.0 || ^30.0.0",
+        "jest-util": "^29.0.0 || ^30.0.0",
+        "typescript": ">=4.3 <7"
       },
       "peerDependenciesMeta": {
         "@babel/core": {
           "optional": true
         },
+        "@jest/transform": {
+          "optional": true
+        },
         "@jest/types": {
           "optional": true
         },
@@ -10805,14 +12994,31 @@
         },
         "esbuild": {
           "optional": true
+        },
+        "jest-util": {
+          "optional": true
         }
       }
     },
+    "node_modules/ts-jest/node_modules/type-fest": {
+      "version": "4.41.0",
+      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz",
+      "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==",
+      "dev": true,
+      "license": "(MIT OR CC0-1.0)",
+      "engines": {
+        "node": ">=16"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
     "node_modules/ts-node": {
       "version": "10.9.2",
       "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
       "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@cspotcode/source-map-support": "^0.8.0",
         "@tsconfig/node10": "^1.0.7",
@@ -10856,6 +13062,7 @@
       "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
       "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@types/json5": "^0.0.29",
         "json5": "^1.0.2",
@@ -10868,6 +13075,7 @@
       "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
       "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "minimist": "^1.2.0"
       },
@@ -10880,20 +13088,23 @@
       "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
       "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=4"
       }
     },
     "node_modules/tslib": {
-      "version": "2.8.1",
-      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
-      "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
-      "license": "0BSD"
+      "version": "1.9.3",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
+      "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
+      "dev": true,
+      "license": "Apache-2.0"
     },
     "node_modules/tunnel": {
       "version": "0.0.6",
       "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
       "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
+      "license": "MIT",
       "engines": {
         "node": ">=0.6.11 <=0.7.0 || >=0.7.3"
       }
@@ -10903,6 +13114,16 @@
       "resolved": "https://registry.npmjs.org/tv4/-/tv4-1.3.0.tgz",
       "integrity": "sha512-afizzfpJgvPr+eDkREK4MxJ/+r8nEEHcmitwgnPUqpaP+FpwQyadnxNoSACbgc/b1LsZYtODGoPiFxQrgJgjvw==",
       "dev": true,
+      "license": [
+        {
+          "type": "Public Domain",
+          "url": "http://geraintluff.github.io/tv4/LICENSE.txt"
+        },
+        {
+          "type": "MIT",
+          "url": "http://jsonary.com/LICENSE.txt"
+        }
+      ],
       "engines": {
         "node": ">= 0.8.0"
       }
@@ -10912,6 +13133,7 @@
       "resolved": "https://registry.npmjs.org/tx2/-/tx2-1.0.5.tgz",
       "integrity": "sha512-sJ24w0y03Md/bxzK4FU8J8JveYYUbSs2FViLJ2D/8bytSiyPRbuE3DyL/9UKYXTZlV3yXq0L8GLlhobTnekCVg==",
       "dev": true,
+      "license": "MIT",
       "optional": true,
       "dependencies": {
         "json-stringify-safe": "^5.0.1"
@@ -10922,6 +13144,7 @@
       "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
       "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "prelude-ls": "^1.2.1"
       },
@@ -10934,6 +13157,7 @@
       "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
       "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=4"
       }
@@ -10943,6 +13167,7 @@
       "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
       "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
       "dev": true,
+      "license": "(MIT OR CC0-1.0)",
       "engines": {
         "node": ">=10"
       },
@@ -10955,6 +13180,7 @@
       "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
       "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "media-typer": "0.3.0",
         "mime-types": "~2.1.24"
@@ -10964,30 +13190,32 @@
       }
     },
     "node_modules/typed-array-buffer": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz",
-      "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==",
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz",
+      "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.7",
+        "call-bound": "^1.0.3",
         "es-errors": "^1.3.0",
-        "is-typed-array": "^1.1.13"
+        "is-typed-array": "^1.1.14"
       },
       "engines": {
         "node": ">= 0.4"
       }
     },
     "node_modules/typed-array-byte-length": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz",
-      "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==",
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz",
+      "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.7",
+        "call-bind": "^1.0.8",
         "for-each": "^0.3.3",
-        "gopd": "^1.0.1",
-        "has-proto": "^1.0.3",
-        "is-typed-array": "^1.1.13"
+        "gopd": "^1.2.0",
+        "has-proto": "^1.2.0",
+        "is-typed-array": "^1.1.14"
       },
       "engines": {
         "node": ">= 0.4"
@@ -10997,17 +13225,19 @@
       }
     },
     "node_modules/typed-array-byte-offset": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz",
-      "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==",
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz",
+      "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "available-typed-arrays": "^1.0.7",
-        "call-bind": "^1.0.7",
+        "call-bind": "^1.0.8",
         "for-each": "^0.3.3",
-        "gopd": "^1.0.1",
-        "has-proto": "^1.0.3",
-        "is-typed-array": "^1.1.13"
+        "gopd": "^1.2.0",
+        "has-proto": "^1.2.0",
+        "is-typed-array": "^1.1.15",
+        "reflect.getprototypeof": "^1.0.9"
       },
       "engines": {
         "node": ">= 0.4"
@@ -11017,17 +13247,18 @@
       }
     },
     "node_modules/typed-array-length": {
-      "version": "1.0.5",
-      "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.5.tgz",
-      "integrity": "sha512-yMi0PlwuznKHxKmcpoOdeLwxBoVPkqZxd7q2FgMkmD3bNwvF5VW0+UlUQ1k1vmktTu4Yu13Q0RIxEP8+B+wloA==",
+      "version": "1.0.7",
+      "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz",
+      "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "call-bind": "^1.0.7",
         "for-each": "^0.3.3",
         "gopd": "^1.0.1",
-        "has-proto": "^1.0.3",
         "is-typed-array": "^1.1.13",
-        "possible-typed-array-names": "^1.0.0"
+        "possible-typed-array-names": "^1.0.0",
+        "reflect.getprototypeof": "^1.0.6"
       },
       "engines": {
         "node": ">= 0.4"
@@ -11036,17 +13267,12 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/typedarray": {
-      "version": "0.0.6",
-      "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
-      "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==",
-      "license": "MIT"
-    },
     "node_modules/typescript": {
-      "version": "5.4.5",
-      "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
-      "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
+      "version": "5.9.3",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
+      "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
       "dev": true,
+      "license": "Apache-2.0",
       "bin": {
         "tsc": "bin/tsc",
         "tsserver": "bin/tsserver"
@@ -11055,10 +13281,35 @@
         "node": ">=14.17"
       }
     },
+    "node_modules/typescript-eslint": {
+      "version": "8.59.4",
+      "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.59.4.tgz",
+      "integrity": "sha512-Rw6+44QNFaXtgHSjPy+Kw8hrJniMYzR85E9yLmOLcfZ91/rz+JXQbDTCmc6ccxMPY6K6PgAq26f0JCBfR7LIPQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@typescript-eslint/eslint-plugin": "8.59.4",
+        "@typescript-eslint/parser": "8.59.4",
+        "@typescript-eslint/typescript-estree": "8.59.4",
+        "@typescript-eslint/utils": "8.59.4"
+      },
+      "engines": {
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/typescript-eslint"
+      },
+      "peerDependencies": {
+        "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
+        "typescript": ">=4.8.4 <6.1.0"
+      }
+    },
     "node_modules/uglify-js": {
-      "version": "3.17.4",
-      "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz",
-      "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==",
+      "version": "3.19.3",
+      "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz",
+      "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==",
+      "license": "BSD-2-Clause",
       "optional": true,
       "bin": {
         "uglifyjs": "bin/uglifyjs"
@@ -11067,16 +13318,29 @@
         "node": ">=0.8.0"
       }
     },
+    "node_modules/ulid": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/ulid/-/ulid-3.0.2.tgz",
+      "integrity": "sha512-yu26mwteFYzBAot7KVMqFGCVpsF6g8wXfJzQUHvu1no3+rRRSFcSV2nKeYvNPLD2J4b08jYBDhHUjeH0ygIl9w==",
+      "license": "MIT",
+      "bin": {
+        "ulid": "dist/cli.js"
+      }
+    },
     "node_modules/unbox-primitive": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
-      "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==",
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz",
+      "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2",
+        "call-bound": "^1.0.3",
         "has-bigints": "^1.0.2",
-        "has-symbols": "^1.0.3",
-        "which-boxed-primitive": "^1.0.2"
+        "has-symbols": "^1.1.0",
+        "which-boxed-primitive": "^1.1.1"
+      },
+      "engines": {
+        "node": ">= 0.4"
       },
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
@@ -11092,28 +13356,69 @@
       }
     },
     "node_modules/undici-types": {
-      "version": "5.26.5",
-      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
-      "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
+      "version": "6.21.0",
+      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
+      "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
+      "license": "MIT"
     },
     "node_modules/universal-user-agent": {
       "version": "6.0.1",
       "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz",
-      "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ=="
+      "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==",
+      "license": "ISC"
     },
     "node_modules/unpipe": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
       "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.8"
       }
     },
+    "node_modules/unrs-resolver": {
+      "version": "1.12.2",
+      "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.12.2.tgz",
+      "integrity": "sha512-dmlRxBJJayXjqTwC+JtF1HhJmgf3ftQ3YejFcZrf4+KKtJv0qDsK1pjqaaVjG7wJ5NJ6UVP1OqRMQ71Z4C3rxQ==",
+      "dev": true,
+      "hasInstallScript": true,
+      "license": "MIT",
+      "dependencies": {
+        "napi-postinstall": "^0.3.4"
+      },
+      "funding": {
+        "url": "https://opencollective.com/unrs-resolver"
+      },
+      "optionalDependencies": {
+        "@unrs/resolver-binding-android-arm-eabi": "1.12.2",
+        "@unrs/resolver-binding-android-arm64": "1.12.2",
+        "@unrs/resolver-binding-darwin-arm64": "1.12.2",
+        "@unrs/resolver-binding-darwin-x64": "1.12.2",
+        "@unrs/resolver-binding-freebsd-x64": "1.12.2",
+        "@unrs/resolver-binding-linux-arm-gnueabihf": "1.12.2",
+        "@unrs/resolver-binding-linux-arm-musleabihf": "1.12.2",
+        "@unrs/resolver-binding-linux-arm64-gnu": "1.12.2",
+        "@unrs/resolver-binding-linux-arm64-musl": "1.12.2",
+        "@unrs/resolver-binding-linux-loong64-gnu": "1.12.2",
+        "@unrs/resolver-binding-linux-loong64-musl": "1.12.2",
+        "@unrs/resolver-binding-linux-ppc64-gnu": "1.12.2",
+        "@unrs/resolver-binding-linux-riscv64-gnu": "1.12.2",
+        "@unrs/resolver-binding-linux-riscv64-musl": "1.12.2",
+        "@unrs/resolver-binding-linux-s390x-gnu": "1.12.2",
+        "@unrs/resolver-binding-linux-x64-gnu": "1.12.2",
+        "@unrs/resolver-binding-linux-x64-musl": "1.12.2",
+        "@unrs/resolver-binding-openharmony-arm64": "1.12.2",
+        "@unrs/resolver-binding-wasm32-wasi": "1.12.2",
+        "@unrs/resolver-binding-win32-arm64-msvc": "1.12.2",
+        "@unrs/resolver-binding-win32-ia32-msvc": "1.12.2",
+        "@unrs/resolver-binding-win32-x64-msvc": "1.12.2"
+      }
+    },
     "node_modules/update-browserslist-db": {
-      "version": "1.0.13",
-      "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz",
-      "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==",
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",
+      "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==",
       "dev": true,
       "funding": [
         {
@@ -11129,9 +13434,10 @@
           "url": "https://github.com/sponsors/ai"
         }
       ],
+      "license": "MIT",
       "dependencies": {
-        "escalade": "^3.1.1",
-        "picocolors": "^1.0.0"
+        "escalade": "^3.2.0",
+        "picocolors": "^1.1.1"
       },
       "bin": {
         "update-browserslist-db": "cli.js"
@@ -11144,6 +13450,8 @@
       "version": "4.4.1",
       "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
       "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+      "dev": true,
+      "license": "BSD-2-Clause",
       "dependencies": {
         "punycode": "^2.1.0"
       }
@@ -11172,13 +13480,15 @@
     "node_modules/util-deprecate": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
-      "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
+      "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
+      "license": "MIT"
     },
     "node_modules/utils-merge": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
       "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.4.0"
       }
@@ -11187,13 +13497,15 @@
       "version": "3.0.1",
       "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
       "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
     "node_modules/v8-to-istanbul": {
-      "version": "9.2.0",
-      "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz",
-      "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==",
+      "version": "9.3.0",
+      "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz",
+      "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==",
       "dev": true,
+      "license": "ISC",
       "dependencies": {
         "@jridgewell/trace-mapping": "^0.3.12",
         "@types/istanbul-lib-coverage": "^2.0.1",
@@ -11208,6 +13520,7 @@
       "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
       "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">= 0.8"
       }
@@ -11217,6 +13530,7 @@
       "resolved": "https://registry.npmjs.org/vizion/-/vizion-2.2.1.tgz",
       "integrity": "sha512-sfAcO2yeSU0CSPFI/DmZp3FsFE9T+8913nv1xWBOyzODv13fwkn6Vl7HqxGpkr9F608M+8SuFId3s+BlZqfXww==",
       "dev": true,
+      "license": "Apache-2.0",
       "dependencies": {
         "async": "^2.6.3",
         "git-node-fs": "^1.0.0",
@@ -11232,15 +13546,17 @@
       "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
       "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "lodash": "^4.17.14"
       }
     },
     "node_modules/vue-eslint-parser": {
-      "version": "9.4.2",
-      "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.4.2.tgz",
-      "integrity": "sha512-Ry9oiGmCAK91HrKMtCrKFWmSFWvYkpGglCeFAIqDdr9zdXmMMpJOmUJS7WWsW7fX81h6mwHmUZCQQ1E0PkSwYQ==",
+      "version": "9.4.3",
+      "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.4.3.tgz",
+      "integrity": "sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "debug": "^4.3.4",
         "eslint-scope": "^7.1.1",
@@ -11265,6 +13581,7 @@
       "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz",
       "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==",
       "dev": true,
+      "license": "Apache-2.0",
       "dependencies": {
         "makeerror": "1.0.12"
       }
@@ -11290,6 +13607,7 @@
       "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
       "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
       "dev": true,
+      "license": "ISC",
       "dependencies": {
         "isexe": "^2.0.0"
       },
@@ -11301,39 +13619,45 @@
       }
     },
     "node_modules/which-boxed-primitive": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
-      "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz",
+      "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "is-bigint": "^1.0.1",
-        "is-boolean-object": "^1.1.0",
-        "is-number-object": "^1.0.4",
-        "is-string": "^1.0.5",
-        "is-symbol": "^1.0.3"
+        "is-bigint": "^1.1.0",
+        "is-boolean-object": "^1.2.1",
+        "is-number-object": "^1.1.1",
+        "is-string": "^1.1.1",
+        "is-symbol": "^1.1.1"
+      },
+      "engines": {
+        "node": ">= 0.4"
       },
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
       }
     },
     "node_modules/which-builtin-type": {
-      "version": "1.1.3",
-      "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz",
-      "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==",
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz",
+      "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "function.prototype.name": "^1.1.5",
-        "has-tostringtag": "^1.0.0",
+        "call-bound": "^1.0.2",
+        "function.prototype.name": "^1.1.6",
+        "has-tostringtag": "^1.0.2",
         "is-async-function": "^2.0.0",
-        "is-date-object": "^1.0.5",
-        "is-finalizationregistry": "^1.0.2",
+        "is-date-object": "^1.1.0",
+        "is-finalizationregistry": "^1.1.0",
         "is-generator-function": "^1.0.10",
-        "is-regex": "^1.1.4",
+        "is-regex": "^1.2.1",
         "is-weakref": "^1.0.2",
         "isarray": "^2.0.5",
-        "which-boxed-primitive": "^1.0.2",
-        "which-collection": "^1.0.1",
-        "which-typed-array": "^1.1.9"
+        "which-boxed-primitive": "^1.1.0",
+        "which-collection": "^1.0.2",
+        "which-typed-array": "^1.1.16"
       },
       "engines": {
         "node": ">= 0.4"
@@ -11343,31 +13667,38 @@
       }
     },
     "node_modules/which-collection": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz",
-      "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==",
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz",
+      "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "is-map": "^2.0.1",
-        "is-set": "^2.0.1",
-        "is-weakmap": "^2.0.1",
-        "is-weakset": "^2.0.1"
+        "is-map": "^2.0.3",
+        "is-set": "^2.0.3",
+        "is-weakmap": "^2.0.2",
+        "is-weakset": "^2.0.3"
+      },
+      "engines": {
+        "node": ">= 0.4"
       },
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
       }
     },
     "node_modules/which-typed-array": {
-      "version": "1.1.14",
-      "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.14.tgz",
-      "integrity": "sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==",
+      "version": "1.1.20",
+      "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.20.tgz",
+      "integrity": "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "available-typed-arrays": "^1.0.6",
-        "call-bind": "^1.0.5",
-        "for-each": "^0.3.3",
-        "gopd": "^1.0.1",
-        "has-tostringtag": "^1.0.1"
+        "available-typed-arrays": "^1.0.7",
+        "call-bind": "^1.0.8",
+        "call-bound": "^1.0.4",
+        "for-each": "^0.3.5",
+        "get-proto": "^1.0.1",
+        "gopd": "^1.2.0",
+        "has-tostringtag": "^1.0.2"
       },
       "engines": {
         "node": ">= 0.4"
@@ -11376,15 +13707,27 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
+    "node_modules/word-wrap": {
+      "version": "1.2.5",
+      "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
+      "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
     "node_modules/wordwrap": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
-      "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q=="
+      "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==",
+      "license": "MIT"
     },
     "node_modules/wrap-ansi": {
       "version": "7.0.0",
       "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
       "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+      "license": "MIT",
       "dependencies": {
         "ansi-styles": "^4.0.0",
         "string-width": "^4.1.0",
@@ -11400,13 +13743,15 @@
     "node_modules/wrappy": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
-      "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
+      "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+      "license": "ISC"
     },
     "node_modules/write-file-atomic": {
       "version": "4.0.2",
       "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz",
       "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==",
       "dev": true,
+      "license": "ISC",
       "dependencies": {
         "imurmurhash": "^0.1.4",
         "signal-exit": "^3.0.7"
@@ -11436,10 +13781,26 @@
         }
       }
     },
+    "node_modules/xml-naming": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/xml-naming/-/xml-naming-0.1.0.tgz",
+      "integrity": "sha512-k8KO9hrMyNk6tUWqUfkTEZbezRRpONVOzUTnc97VnCvyj6Tf9lyUR9EDAIeiVLv56jsMcoXEwjW8Kv5yPY52lw==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/NaturalIntelligence"
+        }
+      ],
+      "license": "MIT",
+      "engines": {
+        "node": ">=16.0.0"
+      }
+    },
     "node_modules/y18n": {
       "version": "5.0.8",
       "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
       "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+      "license": "ISC",
       "engines": {
         "node": ">=10"
       }
@@ -11448,7 +13809,8 @@
       "version": "3.1.1",
       "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
       "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
-      "dev": true
+      "dev": true,
+      "license": "ISC"
     },
     "node_modules/yaml": {
       "version": "1.10.3",
@@ -11466,17 +13828,18 @@
       "license": "Apache-2.0"
     },
     "node_modules/yargs": {
-      "version": "17.7.2",
-      "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
-      "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+      "version": "17.0.1",
+      "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.0.1.tgz",
+      "integrity": "sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ==",
+      "license": "MIT",
       "dependencies": {
-        "cliui": "^8.0.1",
+        "cliui": "^7.0.2",
         "escalade": "^3.1.1",
         "get-caller-file": "^2.0.5",
         "require-directory": "^2.1.1",
-        "string-width": "^4.2.3",
+        "string-width": "^4.2.0",
         "y18n": "^5.0.5",
-        "yargs-parser": "^21.1.1"
+        "yargs-parser": "^20.2.2"
       },
       "engines": {
         "node": ">=12"
@@ -11486,15 +13849,27 @@
       "version": "21.1.1",
       "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
       "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+      "dev": true,
+      "license": "ISC",
       "engines": {
         "node": ">=12"
       }
     },
+    "node_modules/yargs/node_modules/yargs-parser": {
+      "version": "20.2.9",
+      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
+      "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
+      "license": "ISC",
+      "engines": {
+        "node": ">=10"
+      }
+    },
     "node_modules/yn": {
       "version": "3.1.1",
       "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
       "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=6"
       }
@@ -11504,6 +13879,7 @@
       "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
       "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
       "dev": true,
+      "license": "MIT",
       "engines": {
         "node": ">=10"
       },
diff --git a/package.json b/package.json
index 961eeb4..660fcfc 100644
--- a/package.json
+++ b/package.json
@@ -4,6 +4,7 @@
   "version": "1.0.0",
   "author": "Redocly",
   "private": true,
+  "type": "module",
   "keywords": [
     "actions",
     "node",
@@ -14,7 +15,7 @@
     ".": "./dist/index.js"
   },
   "engines": {
-    "node": ">=20"
+    "node": ">=20.19.0"
   },
   "scripts": {
     "all": "npm run prettier && npm run lint && npm run test && npm run package",
@@ -25,7 +26,7 @@
     "test:watch": "npm run test -- --watch",
     "test:coverage": "npm run test -- --coverage",
     "test:ci": "npm run test -- --coverage --ci --silent --testLocationInResults --json --outputFile=results.json",
-    "package": "npx ncc build src/index.ts -o dist --source-map --license licenses.txt --transpile-only",
+    "package": "node scripts/build.mjs",
     "package:watch": "npm run package -- --watch",
     "bundle": "npm run prettier && npm run package",
     "compile-fake-server": "tsc -p tsconfig.fake-server.json",
@@ -37,19 +38,22 @@
     "@actions/core": "^1.10.1",
     "@actions/github": "^6.0.0",
     "@octokit/rest": "^20.1.0",
-    "@redocly/cli": "1.34.13"
+    "@redocly/cli": "2.31.2",
+    "@redocly/openapi-core": "2.31.2"
   },
   "devDependencies": {
     "@jest/globals": "^29.7.0",
     "@types/express": "^4.17.21",
     "@types/jest": "^29.5.14",
     "@types/node": "^20.12.7",
-    "@typescript-eslint/eslint-plugin": "^7.7.0",
-    "@typescript-eslint/parser": "^7.7.0",
+    "@typescript-eslint/eslint-plugin": "^8.59.4",
+    "@typescript-eslint/parser": "^8.59.4",
     "@vercel/ncc": "^0.38.1",
+    "esbuild": "0.28.0",
     "eslint": "^8.57.0",
-    "eslint-plugin-github": "^4.10.2",
-    "eslint-plugin-jest": "^28.2.0",
+    "eslint-import-resolver-typescript": "^4.4.4",
+    "eslint-plugin-github": "^5.1.8",
+    "eslint-plugin-jest": "^29.15.2",
     "eslint-plugin-jsonc": "^2.15.1",
     "eslint-plugin-prettier": "^5.1.3",
     "express": "^4.21.1",
diff --git a/scripts/build.mjs b/scripts/build.mjs
new file mode 100644
index 0000000..c950001
--- /dev/null
+++ b/scripts/build.mjs
@@ -0,0 +1,67 @@
+import { readFile } from 'node:fs/promises';
+
+import { build } from 'esbuild';
+
+const cliPackageJson = JSON.parse(
+  await readFile('node_modules/@redocly/cli/package.json', 'utf8'),
+);
+const cliPackageModule = `
+  export const name = ${JSON.stringify(cliPackageJson.name)};
+  export const version = ${JSON.stringify(cliPackageJson.version)};
+  export const engines = ${JSON.stringify(cliPackageJson.engines)};
+`;
+
+await build({
+  entryPoints: ['src/index.ts'],
+  bundle: true,
+  platform: 'node',
+  format: 'esm',
+  target: 'node20',
+  outfile: 'dist/index.js',
+  sourcemap: true,
+  banner: {
+    js: "import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);",
+  },
+  plugins: [
+    {
+      name: 'redocly-cli-package-shim',
+      setup(pluginBuild) {
+        pluginBuild.onResolve(
+          { filter: /(?:^|\/)utils\/package\.js$/ },
+          args => {
+            if (!args.importer.includes('@redocly/cli')) {
+              return null;
+            }
+
+            return {
+              path: 'redocly-cli-package',
+              namespace: 'redocly-cli-package-shim',
+            };
+          },
+        );
+
+        pluginBuild.onResolve({ filter: /^\.\/package\.js$/ }, args => {
+          if (!args.importer.includes('@redocly/cli/lib/utils/')) {
+            return null;
+          }
+
+          return {
+            path: 'redocly-cli-package',
+            namespace: 'redocly-cli-package-shim',
+          };
+        });
+
+        pluginBuild.onLoad(
+          {
+            filter: /^redocly-cli-package$/,
+            namespace: 'redocly-cli-package-shim',
+          },
+          () => ({
+            contents: cliPackageModule,
+            loader: 'js',
+          }),
+        );
+      },
+    },
+  ],
+});
diff --git a/src/__tests__/fixtures.ts b/src/__tests__/fixtures.ts
index 767692d..ffbb224 100644
--- a/src/__tests__/fixtures.ts
+++ b/src/__tests__/fixtures.ts
@@ -1,4 +1,4 @@
-import { PushStatusSummary } from '@redocly/cli/lib/reunite/commands/push-status';
+import type { PushStatusSummary } from '@redocly/cli/lib/reunite/commands/push-status';
 import { ParsedEventData, ParsedInputData } from '../types';
 
 export const parsedInputDataStub: ParsedInputData = {
diff --git a/src/__tests__/helpers.test.ts b/src/__tests__/helpers.test.ts
index 69d2971..b0447e5 100644
--- a/src/__tests__/helpers.test.ts
+++ b/src/__tests__/helpers.test.ts
@@ -1,10 +1,13 @@
 import * as core from '@actions/core';
 import * as github from '@actions/github';
 import { parseInputData, parseEventData, getRedoclyConfig } from '../helpers';
-import { loadConfig } from '@redocly/openapi-core';
 import { WebhookPayload } from '@actions/github/lib/interfaces';
+import * as redoclyConfig from '../redocly-config';
 
 let getInputMock: jest.SpiedFunction;
+let loadRedoclyConfigMock: jest.SpiedFunction<
+  typeof redoclyConfig.loadRedoclyConfig
+>;
 
 jest.mock('@actions/github', () => ({
   ...jest.requireActual('@actions/github'),
@@ -68,6 +71,9 @@ describe('helpers', () => {
       GITHUB_WORKSPACE: '/home/runner/work/reunite-push-action/',
     };
     getInputMock = jest.spyOn(core, 'getInput').mockImplementation();
+    loadRedoclyConfigMock = jest
+      .spyOn(redoclyConfig, 'loadRedoclyConfig')
+      .mockResolvedValue({} as Awaited>);
   });
 
   afterAll(() => {
@@ -307,8 +313,9 @@ describe('helpers', () => {
 
   describe('getRedoclyConfig', () => {
     it('should return redocly config', async () => {
-      const redoclyConfig = await getRedoclyConfig();
-      expect(typeof redoclyConfig).toBe(typeof loadConfig({}));
+      const config = await getRedoclyConfig();
+      expect(loadRedoclyConfigMock).toHaveBeenCalledTimes(1);
+      expect(config).toBeDefined();
     });
   });
 });
diff --git a/src/__tests__/main.test.ts b/src/__tests__/main.test.ts
index f05f02f..21b807d 100644
--- a/src/__tests__/main.test.ts
+++ b/src/__tests__/main.test.ts
@@ -1,9 +1,8 @@
 import * as core from '@actions/core';
-import * as handlePushCommand from '@redocly/cli/lib/reunite/commands/push';
-import * as handlePushStatusCommand from '@redocly/cli/lib/reunite/commands/push-status';
 
 import * as main from '../main';
 import * as helpers from '../helpers';
+import * as redoclyCli from '../redocly-cli';
 
 import * as commitStatusUtils from '../set-commit-statuses';
 import {
@@ -16,9 +15,16 @@ const runMock = jest.spyOn(main, 'run');
 
 let parseInputDataMock: jest.SpiedFunction;
 let parseEventDataMock: jest.SpiedFunction;
-let handlePushMock: jest.SpiedFunction;
-let handlePushStatusMock: jest.SpiedFunction<
-  typeof handlePushStatusCommand.handlePushStatus
+let getRedoclyConfigMock: jest.SpiedFunction;
+type RedoclyCliCommands = Awaited<
+  ReturnType
+>;
+let handlePushMock: jest.MockedFunction;
+let handlePushStatusMock: jest.MockedFunction<
+  RedoclyCliCommands['handlePushStatus']
+>;
+let loadRedoclyCliCommandsMock: jest.SpiedFunction<
+  typeof redoclyCli.loadRedoclyCliCommands
 >;
 let setOutputMock: jest.SpiedFunction;
 let setFailedMock: jest.SpiedFunction;
@@ -39,15 +45,24 @@ describe('action', () => {
       .spyOn(helpers, 'parseEventData')
       .mockImplementation(async () => parsedEventPushDataMock);
 
-    handlePushMock = jest
-      .spyOn(handlePushCommand, 'handlePush')
-      .mockImplementation(async () => ({
-        pushId: 'test-push-id',
-      }));
+    getRedoclyConfigMock = jest
+      .spyOn(helpers, 'getRedoclyConfig')
+      .mockResolvedValue(
+        {} as Awaited>,
+      );
+
+    handlePushMock = jest.fn().mockResolvedValue({
+      pushId: 'test-push-id',
+    });
+
+    handlePushStatusMock = jest.fn().mockResolvedValue(pushStatusSummaryStub);
 
-    handlePushStatusMock = jest
-      .spyOn(handlePushStatusCommand, 'handlePushStatus')
-      .mockImplementation(async () => pushStatusSummaryStub);
+    loadRedoclyCliCommandsMock = jest
+      .spyOn(redoclyCli, 'loadRedoclyCliCommands')
+      .mockResolvedValue({
+        handlePush: handlePushMock,
+        handlePushStatus: handlePushStatusMock,
+      });
 
     setCommitStatusMock = jest
       .spyOn(commitStatusUtils, 'setCommitStatuses')
@@ -63,6 +78,8 @@ describe('action', () => {
     expect(runMock).toHaveReturned();
     expect(parseInputDataMock).toHaveBeenCalled();
     expect(parseEventDataMock).toHaveBeenCalled();
+    expect(getRedoclyConfigMock).toHaveBeenCalled();
+    expect(loadRedoclyCliCommandsMock).toHaveBeenCalled();
     expect(handlePushMock).toHaveBeenCalled();
     expect(handlePushStatusMock).toHaveBeenCalled();
     expect(setCommitStatusMock).toHaveBeenCalled();
diff --git a/src/helpers.ts b/src/helpers.ts
index e8405b5..9d50258 100644
--- a/src/helpers.ts
+++ b/src/helpers.ts
@@ -1,8 +1,8 @@
 import path from 'path';
 import * as core from '@actions/core';
 import * as github from '@actions/github';
-import { loadConfig } from '@redocly/openapi-core';
 import { ParsedEventData, ParsedInputData } from './types';
+import { loadRedoclyConfig } from './redocly-config';
 
 export function parseInputData(): ParsedInputData {
   const redoclyOrgSlug = core.getInput('organization', { required: true });
@@ -139,8 +139,6 @@ export function getCommitSha(): string | undefined {
 }
 
 // Returns parsed config from the root or default config if not found
-export async function getRedoclyConfig(): ReturnType {
-  const redoclyConfig = await loadConfig();
-
-  return redoclyConfig;
+export async function getRedoclyConfig(): ReturnType {
+  return loadRedoclyConfig();
 }
diff --git a/src/main.ts b/src/main.ts
index d97e7d8..523b0c4 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,11 +1,11 @@
 import * as core from '@actions/core';
 
-import { handlePush } from '@redocly/cli/lib/reunite/commands/push';
-import { handlePushStatus } from '@redocly/cli/lib/reunite/commands/push-status';
-
 import { setCommitStatuses } from './set-commit-statuses';
 import { getRedoclyConfig, parseEventData, parseInputData } from './helpers';
+import { loadRedoclyCliCommands } from './redocly-cli';
+import type { PushStatusSummary } from '@redocly/cli/lib/reunite/commands/push-status';
 
+// eslint-disable-next-line import/extensions
 import { dependencies } from '../package.json';
 
 const redoclyCliVersion = dependencies['@redocly/cli'];
@@ -19,6 +19,7 @@ export async function run(): Promise {
     console.debug('Parsed GitHub event', ghEvent);
 
     const config = await getRedoclyConfig();
+    const { handlePush, handlePushStatus } = await loadRedoclyCliCommands();
 
     const pushData = await handlePush({
       argv: {
@@ -55,7 +56,7 @@ export async function run(): Promise {
         wait: true,
         'continue-on-deploy-failures': true,
         'max-execution-time': inputData.maxExecutionTime,
-        onRetry: async lastResult => {
+        onRetry: async (lastResult: PushStatusSummary) => {
           try {
             await setCommitStatuses({
               commitStatuses: lastResult.commit.statuses,
diff --git a/src/redocly-cli.ts b/src/redocly-cli.ts
new file mode 100644
index 0000000..b3c1baf
--- /dev/null
+++ b/src/redocly-cli.ts
@@ -0,0 +1,21 @@
+// Defer loading @redocly/cli until call time. The cli is pure ESM; statically
+// importing it from CJS jest would crash with ERR_REQUIRE_ESM.
+import type { handlePush } from '@redocly/cli/lib/reunite/commands/push';
+import type { handlePushStatus } from '@redocly/cli/lib/reunite/commands/push-status';
+
+type RedoclyCliCommands = {
+  handlePush: typeof handlePush;
+  handlePushStatus: typeof handlePushStatus;
+};
+
+export async function loadRedoclyCliCommands(): Promise {
+  const [push, pushStatus] = await Promise.all([
+    import('@redocly/cli/lib/reunite/commands/push'),
+    import('@redocly/cli/lib/reunite/commands/push-status'),
+  ]);
+
+  return {
+    handlePush: push.handlePush,
+    handlePushStatus: pushStatus.handlePushStatus,
+  };
+}
diff --git a/src/redocly-config.ts b/src/redocly-config.ts
new file mode 100644
index 0000000..e693f6f
--- /dev/null
+++ b/src/redocly-config.ts
@@ -0,0 +1,9 @@
+// Defer loading @redocly/openapi-core until call time. The package is pure
+// ESM; statically importing it from CJS jest would crash with ERR_REQUIRE_ESM.
+import type { loadConfig } from '@redocly/openapi-core';
+
+export async function loadRedoclyConfig(): ReturnType {
+  const { loadConfig: load } = await import('@redocly/openapi-core');
+
+  return load();
+}
diff --git a/src/set-commit-statuses.ts b/src/set-commit-statuses.ts
index 8b1d26a..16aced5 100644
--- a/src/set-commit-statuses.ts
+++ b/src/set-commit-statuses.ts
@@ -1,8 +1,10 @@
 import * as core from '@actions/core';
 import * as github from '@actions/github';
 import type { RestEndpointMethodTypes } from '@octokit/rest';
-import { DeploymentStatus } from '@redocly/cli/lib/reunite/api/types';
-import { PushStatusSummary } from '@redocly/cli/lib/reunite/commands/push-status';
+import type { DeploymentStatus } from '@redocly/cli/lib/reunite/api/types';
+import type { PushStatusSummary } from '@redocly/cli/lib/reunite/commands/push-status';
+
+type CommitStatus = PushStatusSummary['commit']['statuses'][number];
 
 export async function setCommitStatuses({
   commitStatuses,
@@ -10,7 +12,7 @@ export async function setCommitStatuses({
   repo,
   commitId,
 }: {
-  commitStatuses: PushStatusSummary['commit']['statuses'];
+  commitStatuses: CommitStatus[];
   owner: string;
   repo: string;
   commitId: string;
diff --git a/tsconfig.json b/tsconfig.json
index 683546b..9684028 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -2,9 +2,9 @@
   "$schema": "https://json.schemastore.org/tsconfig",
   "compilerOptions": {
     "target": "ES2022",
-    "module": "NodeNext",
+    "module": "ESNext",
     "rootDir": "./src",
-    "moduleResolution": "NodeNext",
+    "moduleResolution": "bundler",
     "baseUrl": "./",
     "sourceMap": true,
     "outDir": "./dist",